const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/js/FormulaEditor.0HQ2ATyO.chunk.js","static/js/theme.mnyG70gE.chunk.js","static/js/extends.CfN_tLZB.chunk.js","static/js/client.5wdLOPyT.chunk.js"])))=>i.map(i=>d[i]);
import { a as __commonJSMin, c as __require, i as require_react, l as __toCommonJS, n as require_compiler_runtime, o as __esmMin, r as require_jsx_runtime, s as __exportAll, t as theme, u as __toESM } from "./theme.mnyG70gE.chunk.js";
import { $n as toDate$1, Bn as buildMatchPatternFn, C as keyframes, Cn as getNumberFormat, Ct as saveSyncedPrefs, Dn as integerToCurrencyWithDecimal, En as integerToCurrency, Gn as buildFormatLongFn, Gr as listen, Gt as useDispatch, H as popModal, Hn as localize$84, Ht as useCreatePayeeMutation, Jn as endOfMonth, Jr as logger, Jt as getActivePayees, Kn as formatDistance$87, Kr as send, Kt as useSelector, Ln as formatDistance$86, Nn as setNumberFormat, On as last$1, Pn as titleFirst, Qn as getDefaultOptions$1, Qr as v4, Rn as enUS, S as cx, Sn as getChangedValues, T as getAccountsById, Tn as integerToAmount, U as pushModal, Un as buildLocalizeFn, Ut as useDeletePayeeLocationMutation, Vn as buildMatchFn, Wn as formatRelative$84, Xn as normalizeDates, Xr as getUndoState, Xt as payeeQueries, Yn as differenceInCalendarMonths$1, Yr as getTaggedState, Yt as getPayeesById, Zn as getTimezoneOffsetInMilliseconds, Zr as setUndoState, Zt as locationService, _ as useGlobalPref, _n as applyChanges, _r as addConsumeAwareSignal, ai as require_shim, an as useAccounts, ar as millisecondsInWeek, b as tokens$1, br as ensureQueryFn, c as useTheme, ci as t$1, cr as useQuery$1, dr as useQueryClient, en as addNotification, er as constructFrom, gi as process$1, hi as init_build_shims, hn as amountToInteger, ii as useTranslation, ir as millisecondsInSecond, jn as parseNumberFormat, li as __vitePreload, lr as useBaseQuery, mi as global, mn as amountToCurrency, n as _objectWithoutPropertiesLoose$1, nr as millisecondsInHour, oi as Trans, on as accountQueries, or as useMutation, pi as isPlaywright, pn as memoizeOne, pr as QueryObserver, qr as sendCatch, rr as millisecondsInMinute, si as instance, sr as queryOptions, t as _extends, ti as require_react_dom, tr as millisecondsInDay, v as styles, vn as applyFindReplace, vr as addToEnd, wn as groupById, wr as keepPreviousData, x as css, xn as diffItems, xt as savePrefs, y as breakpoints, yn as currencyToAmount, yr as addToStart, zn as match$83 } from "./extends.CfN_tLZB.chunk.js";
//#region ../loot-core/src/shared/query.ts
init_build_shims();
var import_react = /* @__PURE__ */ __toESM(require_react());
var import_shim = require_shim();
var import_react_dom = /* @__PURE__ */ __toESM(require_react_dom(), 1);
var Query = class Query {
	state;
	constructor(state) {
		this.state = {
			tableOptions: state.tableOptions || {},
			filterExpressions: state.filterExpressions || [],
			selectExpressions: state.selectExpressions || [],
			groupExpressions: state.groupExpressions || [],
			orderExpressions: state.orderExpressions || [],
			calculation: false,
			rawMode: false,
			withDead: false,
			validateRefs: true,
			limit: null,
			offset: null,
			...state
		};
	}
	filter(expr) {
		return new Query({
			...this.state,
			filterExpressions: [...this.state.filterExpressions, expr]
		});
	}
	unfilter(exprs) {
		if (!exprs) return new Query({
			...this.state,
			filterExpressions: []
		});
		const exprSet = new Set(exprs);
		return new Query({
			...this.state,
			filterExpressions: this.state.filterExpressions.filter((expr) => !exprSet.has(Object.keys(expr)[0]))
		});
	}
	select(exprs = []) {
		if (!Array.isArray(exprs)) exprs = [exprs];
		return new Query({
			...this.state,
			selectExpressions: exprs,
			calculation: false
		});
	}
	calculate(expr) {
		return new Query({
			...this.state,
			selectExpressions: [{ result: expr }],
			calculation: true
		});
	}
	groupBy(exprs) {
		if (!Array.isArray(exprs)) exprs = [exprs];
		return new Query({
			...this.state,
			groupExpressions: [...this.state.groupExpressions, ...exprs]
		});
	}
	orderBy(exprs) {
		if (!Array.isArray(exprs)) exprs = [exprs];
		return new Query({
			...this.state,
			orderExpressions: [...this.state.orderExpressions, ...exprs]
		});
	}
	limit(num) {
		return new Query({
			...this.state,
			limit: num
		});
	}
	offset(num) {
		return new Query({
			...this.state,
			offset: num
		});
	}
	raw() {
		return new Query({
			...this.state,
			rawMode: true
		});
	}
	withDead() {
		return new Query({
			...this.state,
			withDead: true
		});
	}
	withoutValidatedRefs() {
		return new Query({
			...this.state,
			validateRefs: false
		});
	}
	options(opts) {
		return new Query({
			...this.state,
			tableOptions: opts
		});
	}
	reset() {
		return q$1(this.state.table);
	}
	serialize() {
		return this.state;
	}
	serializeAsString() {
		return JSON.stringify(this.serialize());
	}
};
function getPrimaryOrderBy(query, defaultOrderBy) {
	const orderExprs = query.serialize().orderExpressions;
	if (orderExprs.length === 0) {
		if (defaultOrderBy) return {
			order: "asc",
			...defaultOrderBy
		};
		return null;
	}
	const firstOrder = orderExprs[0];
	if (typeof firstOrder === "string") return {
		field: firstOrder,
		order: "asc"
	};
	const [field] = Object.keys(firstOrder);
	return {
		field,
		order: firstOrder[field]
	};
}
function q$1(table) {
	return new Query({ table });
}
//#endregion
//#region ../../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js
function infiniteQueryBehavior(pages) {
	return { onFetch: (context, query) => {
		const options = context.options;
		const direction = context.fetchOptions?.meta?.fetchMore?.direction;
		const oldPages = context.state.data?.pages || [];
		const oldPageParams = context.state.data?.pageParams || [];
		let result = {
			pages: [],
			pageParams: []
		};
		let currentPage = 0;
		const fetchFn = async () => {
			let cancelled = false;
			const addSignalProperty = (object) => {
				addConsumeAwareSignal(object, () => context.signal, () => cancelled = true);
			};
			const queryFn = ensureQueryFn(context.options, context.fetchOptions);
			const fetchPage = async (data, param, previous) => {
				if (cancelled) return Promise.reject();
				if (param == null && data.pages.length) return Promise.resolve(data);
				const createQueryFnContext = () => {
					const queryFnContext2 = {
						client: context.client,
						queryKey: context.queryKey,
						pageParam: param,
						direction: previous ? "backward" : "forward",
						meta: context.options.meta
					};
					addSignalProperty(queryFnContext2);
					return queryFnContext2;
				};
				const page = await queryFn(createQueryFnContext());
				const { maxPages } = context.options;
				const addTo = previous ? addToStart : addToEnd;
				return {
					pages: addTo(data.pages, page, maxPages),
					pageParams: addTo(data.pageParams, param, maxPages)
				};
			};
			if (direction && oldPages.length) {
				const previous = direction === "backward";
				const pageParamFn = previous ? getPreviousPageParam : getNextPageParam;
				const oldData = {
					pages: oldPages,
					pageParams: oldPageParams
				};
				result = await fetchPage(oldData, pageParamFn(options, oldData), previous);
			} else {
				const remainingPages = pages ?? oldPages.length;
				do {
					const param = currentPage === 0 ? oldPageParams[0] ?? options.initialPageParam : getNextPageParam(options, result);
					if (currentPage > 0 && param == null) break;
					result = await fetchPage(result, param);
					currentPage++;
				} while (currentPage < remainingPages);
			}
			return result;
		};
		if (context.options.persister) context.fetchFn = () => {
			return context.options.persister?.(fetchFn, {
				client: context.client,
				queryKey: context.queryKey,
				meta: context.options.meta,
				signal: context.signal
			}, query);
		};
		else context.fetchFn = fetchFn;
	} };
}
function getNextPageParam(options, { pages, pageParams }) {
	const lastIndex = pages.length - 1;
	return pages.length > 0 ? options.getNextPageParam(pages[lastIndex], pages, pageParams[lastIndex], pageParams) : void 0;
}
function getPreviousPageParam(options, { pages, pageParams }) {
	return pages.length > 0 ? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams) : void 0;
}
function hasNextPage(options, data) {
	if (!data) return false;
	return getNextPageParam(options, data) != null;
}
function hasPreviousPage(options, data) {
	if (!data || !options.getPreviousPageParam) return false;
	return getPreviousPageParam(options, data) != null;
}
//#endregion
//#region ../../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js
var InfiniteQueryObserver = class extends QueryObserver {
	constructor(client, options) {
		super(client, options);
	}
	bindMethods() {
		super.bindMethods();
		this.fetchNextPage = this.fetchNextPage.bind(this);
		this.fetchPreviousPage = this.fetchPreviousPage.bind(this);
	}
	setOptions(options) {
		super.setOptions({
			...options,
			behavior: infiniteQueryBehavior()
		});
	}
	getOptimisticResult(options) {
		options.behavior = infiniteQueryBehavior();
		return super.getOptimisticResult(options);
	}
	fetchNextPage(options) {
		return this.fetch({
			...options,
			meta: { fetchMore: { direction: "forward" } }
		});
	}
	fetchPreviousPage(options) {
		return this.fetch({
			...options,
			meta: { fetchMore: { direction: "backward" } }
		});
	}
	createResult(query, options) {
		const { state } = query;
		const parentResult = super.createResult(query, options);
		const { isFetching, isRefetching, isError, isRefetchError } = parentResult;
		const fetchDirection = state.fetchMeta?.fetchMore?.direction;
		const isFetchNextPageError = isError && fetchDirection === "forward";
		const isFetchingNextPage = isFetching && fetchDirection === "forward";
		const isFetchPreviousPageError = isError && fetchDirection === "backward";
		const isFetchingPreviousPage = isFetching && fetchDirection === "backward";
		return {
			...parentResult,
			fetchNextPage: this.fetchNextPage,
			fetchPreviousPage: this.fetchPreviousPage,
			hasNextPage: hasNextPage(options, state.data),
			hasPreviousPage: hasPreviousPage(options, state.data),
			isFetchNextPageError,
			isFetchingNextPage,
			isFetchPreviousPageError,
			isFetchingPreviousPage,
			isRefetchError: isRefetchError && !isFetchNextPageError && !isFetchPreviousPageError,
			isRefetching: isRefetching && !isFetchingNextPage && !isFetchingPreviousPage
		};
	}
};
//#endregion
//#region ../../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.js
function infiniteQueryOptions(options) {
	return options;
}
//#endregion
//#region ../../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.js
function useInfiniteQuery(options, queryClient) {
	return useBaseQuery(options, InfiniteQueryObserver, queryClient);
}
//#endregion
//#region ../../node_modules/date-fns/addDays.js
/**
* The {@link addDays} function options.
*/
/**
* @name addDays
* @category Day Helpers
* @summary Add the specified number of days to the given date.
*
* @description
* Add the specified number of days to the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param amount - The amount of days to be added.
* @param options - An object with options
*
* @returns The new date with the days added
*
* @example
* // Add 10 days to 1 September 2014:
* const result = addDays(new Date(2014, 8, 1), 10)
* //=> Thu Sep 11 2014 00:00:00
*/
function addDays$1(date, amount, options) {
	const _date = toDate$1(date, options?.in);
	if (isNaN(amount)) return constructFrom(options?.in || date, NaN);
	if (!amount) return _date;
	_date.setDate(_date.getDate() + amount);
	return _date;
}
//#endregion
//#region ../../node_modules/date-fns/addMonths.js
/**
* The {@link addMonths} function options.
*/
/**
* @name addMonths
* @category Month Helpers
* @summary Add the specified number of months to the given date.
*
* @description
* Add the specified number of months to the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param amount - The amount of months to be added.
* @param options - The options object
*
* @returns The new date with the months added
*
* @example
* // Add 5 months to 1 September 2014:
* const result = addMonths(new Date(2014, 8, 1), 5)
* //=> Sun Feb 01 2015 00:00:00
*
* // Add one month to 30 January 2023:
* const result = addMonths(new Date(2023, 0, 30), 1)
* //=> Tue Feb 28 2023 00:00:00
*/
function addMonths$1(date, amount, options) {
	const _date = toDate$1(date, options?.in);
	if (isNaN(amount)) return constructFrom(options?.in || date, NaN);
	if (!amount) return _date;
	const dayOfMonth = _date.getDate();
	const endOfDesiredMonth = constructFrom(options?.in || date, _date.getTime());
	endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);
	if (dayOfMonth >= endOfDesiredMonth.getDate()) return endOfDesiredMonth;
	else {
		_date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);
		return _date;
	}
}
//#endregion
//#region ../../node_modules/date-fns/isWeekend.js
/**
* The {@link isWeekend} function options.
*/
/**
* @name isWeekend
* @category Weekday Helpers
* @summary Does the given date fall on a weekend?
*
* @description
* Does the given date fall on a weekend? A weekend is either Saturday (`6`) or Sunday (`0`).
*
* @param date - The date to check
* @param options - An object with options
*
* @returns The date falls on a weekend
*
* @example
* // Does 5 October 2014 fall on a weekend?
* const result = isWeekend(new Date(2014, 9, 5))
* //=> true
*/
function isWeekend(date, options) {
	const day = toDate$1(date, options?.in).getDay();
	return day === 0 || day === 6;
}
//#endregion
//#region ../../node_modules/date-fns/startOfWeek.js
/**
* The {@link startOfWeek} function options.
*/
/**
* @name startOfWeek
* @category Week Helpers
* @summary Return the start of a week for the given date.
*
* @description
* Return the start of a week for the given date.
* The result will be in the local timezone.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The original date
* @param options - An object with options
*
* @returns The start of a week
*
* @example
* // The start of a week for 2 September 2014 11:55:00:
* const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))
* //=> Sun Aug 31 2014 00:00:00
*
* @example
* // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:
* const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })
* //=> Mon Sep 01 2014 00:00:00
*/
function startOfWeek(date, options) {
	const defaultOptions = getDefaultOptions$1();
	const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions.weekStartsOn ?? defaultOptions.locale?.options?.weekStartsOn ?? 0;
	const _date = toDate$1(date, options?.in);
	const day = _date.getDay();
	const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
	_date.setDate(_date.getDate() - diff);
	_date.setHours(0, 0, 0, 0);
	return _date;
}
//#endregion
//#region ../../node_modules/date-fns/startOfISOWeek.js
/**
* The {@link startOfISOWeek} function options.
*/
/**
* @name startOfISOWeek
* @category ISO Week Helpers
* @summary Return the start of an ISO week for the given date.
*
* @description
* Return the start of an ISO week for the given date.
* The result will be in the local timezone.
*
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The original date
* @param options - An object with options
*
* @returns The start of an ISO week
*
* @example
* // The start of an ISO week for 2 September 2014 11:55:00:
* const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))
* //=> Mon Sep 01 2014 00:00:00
*/
function startOfISOWeek(date, options) {
	return startOfWeek(date, {
		...options,
		weekStartsOn: 1
	});
}
//#endregion
//#region ../../node_modules/date-fns/getISOWeekYear.js
/**
* The {@link getISOWeekYear} function options.
*/
/**
* @name getISOWeekYear
* @category ISO Week-Numbering Year Helpers
* @summary Get the ISO week-numbering year of the given date.
*
* @description
* Get the ISO week-numbering year of the given date,
* which always starts 3 days before the year's first Thursday.
*
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
*
* @param date - The given date
*
* @returns The ISO week-numbering year
*
* @example
* // Which ISO-week numbering year is 2 January 2005?
* const result = getISOWeekYear(new Date(2005, 0, 2))
* //=> 2004
*/
function getISOWeekYear(date, options) {
	const _date = toDate$1(date, options?.in);
	const year = _date.getFullYear();
	const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);
	fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
	fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
	const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);
	const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);
	fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
	fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
	const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);
	if (_date.getTime() >= startOfNextYear.getTime()) return year + 1;
	else if (_date.getTime() >= startOfThisYear.getTime()) return year;
	else return year - 1;
}
//#endregion
//#region ../../node_modules/date-fns/startOfDay.js
/**
* The {@link startOfDay} function options.
*/
/**
* @name startOfDay
* @category Day Helpers
* @summary Return the start of a day for the given date.
*
* @description
* Return the start of a day for the given date.
* The result will be in the local timezone.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The original date
* @param options - The options
*
* @returns The start of a day
*
* @example
* // The start of a day for 2 September 2014 11:55:00:
* const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
* //=> Tue Sep 02 2014 00:00:00
*/
function startOfDay(date, options) {
	const _date = toDate$1(date, options?.in);
	_date.setHours(0, 0, 0, 0);
	return _date;
}
//#endregion
//#region ../../node_modules/date-fns/differenceInCalendarDays.js
/**
* The {@link differenceInCalendarDays} function options.
*/
/**
* @name differenceInCalendarDays
* @category Day Helpers
* @summary Get the number of calendar days between the given dates.
*
* @description
* Get the number of calendar days between the given dates. This means that the times are removed
* from the dates and then the difference in days is calculated.
*
* @param laterDate - The later date
* @param earlierDate - The earlier date
* @param options - The options object
*
* @returns The number of calendar days
*
* @example
* // How many calendar days are between
* // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?
* const result = differenceInCalendarDays(
*   new Date(2012, 6, 2, 0, 0),
*   new Date(2011, 6, 2, 23, 0)
* )
* //=> 366
* // How many calendar days are between
* // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?
* const result = differenceInCalendarDays(
*   new Date(2011, 6, 3, 0, 1),
*   new Date(2011, 6, 2, 23, 59)
* )
* //=> 1
*/
function differenceInCalendarDays$1(laterDate, earlierDate, options) {
	const [laterDate_, earlierDate_] = normalizeDates(options?.in, laterDate, earlierDate);
	const laterStartOfDay = startOfDay(laterDate_);
	const earlierStartOfDay = startOfDay(earlierDate_);
	const laterTimestamp = +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);
	const earlierTimestamp = +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);
	return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);
}
//#endregion
//#region ../../node_modules/date-fns/startOfISOWeekYear.js
/**
* The {@link startOfISOWeekYear} function options.
*/
/**
* @name startOfISOWeekYear
* @category ISO Week-Numbering Year Helpers
* @summary Return the start of an ISO week-numbering year for the given date.
*
* @description
* Return the start of an ISO week-numbering year,
* which always starts 3 days before the year's first Thursday.
* The result will be in the local timezone.
*
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The original date
* @param options - An object with options
*
* @returns The start of an ISO week-numbering year
*
* @example
* // The start of an ISO week-numbering year for 2 July 2005:
* const result = startOfISOWeekYear(new Date(2005, 6, 2))
* //=> Mon Jan 03 2005 00:00:00
*/
function startOfISOWeekYear(date, options) {
	const year = getISOWeekYear(date, options);
	const fourthOfJanuary = constructFrom(options?.in || date, 0);
	fourthOfJanuary.setFullYear(year, 0, 4);
	fourthOfJanuary.setHours(0, 0, 0, 0);
	return startOfISOWeek(fourthOfJanuary);
}
//#endregion
//#region ../../node_modules/date-fns/addWeeks.js
/**
* The {@link addWeeks} function options.
*/
/**
* @name addWeeks
* @category Week Helpers
* @summary Add the specified number of weeks to the given date.
*
* @description
* Add the specified number of weeks to the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param amount - The amount of weeks to be added.
* @param options - An object with options
*
* @returns The new date with the weeks added
*
* @example
* // Add 4 weeks to 1 September 2014:
* const result = addWeeks(new Date(2014, 8, 1), 4)
* //=> Mon Sep 29 2014 00:00:00
*/
function addWeeks$1(date, amount, options) {
	return addDays$1(date, amount * 7, options);
}
//#endregion
//#region ../../node_modules/date-fns/addYears.js
/**
* The {@link addYears} function options.
*/
/**
* @name addYears
* @category Year Helpers
* @summary Add the specified number of years to the given date.
*
* @description
* Add the specified number of years to the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type.
*
* @param date - The date to be changed
* @param amount - The amount of years to be added.
* @param options - The options
*
* @returns The new date with the years added
*
* @example
* // Add 5 years to 1 September 2014:
* const result = addYears(new Date(2014, 8, 1), 5)
* //=> Sun Sep 01 2019 00:00:00
*/
function addYears$1(date, amount, options) {
	return addMonths$1(date, amount * 12, options);
}
//#endregion
//#region ../../node_modules/date-fns/isDate.js
/**
* @name isDate
* @category Common Helpers
* @summary Is the given value a date?
*
* @description
* Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
*
* @param value - The value to check
*
* @returns True if the given value is a date
*
* @example
* // For a valid date:
* const result = isDate(new Date())
* //=> true
*
* @example
* // For an invalid date:
* const result = isDate(new Date(NaN))
* //=> true
*
* @example
* // For some value:
* const result = isDate('2014-02-31')
* //=> false
*
* @example
* // For an object:
* const result = isDate({})
* //=> false
*/
function isDate$1(value) {
	return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]";
}
//#endregion
//#region ../../node_modules/date-fns/isValid.js
/**
* @name isValid
* @category Common Helpers
* @summary Is the given date valid?
*
* @description
* Returns false if argument is Invalid Date and true otherwise.
* Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)
* Invalid Date is a Date, whose time value is NaN.
*
* Time value of Date: http://es5.github.io/#x15.9.1.1
*
* @param date - The date to check
*
* @returns The date is valid
*
* @example
* // For the valid date:
* const result = isValid(new Date(2014, 1, 31))
* //=> true
*
* @example
* // For the value, convertible into a date:
* const result = isValid(1393804800000)
* //=> true
*
* @example
* // For the invalid date:
* const result = isValid(new Date(''))
* //=> false
*/
function isValid$3(date) {
	return !(!isDate$1(date) && typeof date !== "number" || isNaN(+toDate$1(date)));
}
//#endregion
//#region ../../node_modules/date-fns/startOfMonth.js
/**
* The {@link startOfMonth} function options.
*/
/**
* @name startOfMonth
* @category Month Helpers
* @summary Return the start of a month for the given date.
*
* @description
* Return the start of a month for the given date. The result will be in the local timezone.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments.
* Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed,
* or inferred from the arguments.
*
* @param date - The original date
* @param options - An object with options
*
* @returns The start of a month
*
* @example
* // The start of a month for 2 September 2014 11:55:00:
* const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))
* //=> Mon Sep 01 2014 00:00:00
*/
function startOfMonth(date, options) {
	const _date = toDate$1(date, options?.in);
	_date.setDate(1);
	_date.setHours(0, 0, 0, 0);
	return _date;
}
//#endregion
//#region ../../node_modules/date-fns/startOfYear.js
/**
* The {@link startOfYear} function options.
*/
/**
* @name startOfYear
* @category Year Helpers
* @summary Return the start of a year for the given date.
*
* @description
* Return the start of a year for the given date.
* The result will be in the local timezone.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The original date
* @param options - The options
*
* @returns The start of a year
*
* @example
* // The start of a year for 2 September 2014 11:55:00:
* const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))
* //=> Wed Jan 01 2014 00:00:00
*/
function startOfYear(date, options) {
	const date_ = toDate$1(date, options?.in);
	date_.setFullYear(date_.getFullYear(), 0, 1);
	date_.setHours(0, 0, 0, 0);
	return date_;
}
//#endregion
//#region ../../node_modules/date-fns/endOfWeek.js
/**
* The {@link endOfWeek} function options.
*/
/**
* @name endOfWeek
* @category Week Helpers
* @summary Return the end of a week for the given date.
*
* @description
* Return the end of a week for the given date.
* The result will be in the local timezone.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The original date
* @param options - An object with options
*
* @returns The end of a week
*
* @example
* // The end of a week for 2 September 2014 11:55:00:
* const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))
* //=> Sat Sep 06 2014 23:59:59.999
*
* @example
* // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:
* const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })
* //=> Sun Sep 07 2014 23:59:59.999
*/
function endOfWeek(date, options) {
	const defaultOptions = getDefaultOptions$1();
	const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions.weekStartsOn ?? defaultOptions.locale?.options?.weekStartsOn ?? 0;
	const _date = toDate$1(date, options?.in);
	const day = _date.getDay();
	const diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);
	_date.setDate(_date.getDate() + diff);
	_date.setHours(23, 59, 59, 999);
	return _date;
}
//#endregion
//#region ../../node_modules/date-fns/getDayOfYear.js
/**
* The {@link getDayOfYear} function options.
*/
/**
* @name getDayOfYear
* @category Day Helpers
* @summary Get the day of the year of the given date.
*
* @description
* Get the day of the year of the given date.
*
* @param date - The given date
* @param options - The options
*
* @returns The day of year
*
* @example
* // Which day of the year is 2 July 2014?
* const result = getDayOfYear(new Date(2014, 6, 2))
* //=> 183
*/
function getDayOfYear(date, options) {
	const _date = toDate$1(date, options?.in);
	return differenceInCalendarDays$1(_date, startOfYear(_date)) + 1;
}
//#endregion
//#region ../../node_modules/date-fns/getISOWeek.js
/**
* The {@link getISOWeek} function options.
*/
/**
* @name getISOWeek
* @category ISO Week Helpers
* @summary Get the ISO week of the given date.
*
* @description
* Get the ISO week of the given date.
*
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
*
* @param date - The given date
* @param options - The options
*
* @returns The ISO week
*
* @example
* // Which week of the ISO-week numbering year is 2 January 2005?
* const result = getISOWeek(new Date(2005, 0, 2))
* //=> 53
*/
function getISOWeek(date, options) {
	const _date = toDate$1(date, options?.in);
	const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);
	return Math.round(diff / millisecondsInWeek) + 1;
}
//#endregion
//#region ../../node_modules/date-fns/getWeekYear.js
/**
* The {@link getWeekYear} function options.
*/
/**
* @name getWeekYear
* @category Week-Numbering Year Helpers
* @summary Get the local week-numbering year of the given date.
*
* @description
* Get the local week-numbering year of the given date.
* The exact calculation depends on the values of
* `options.weekStartsOn` (which is the index of the first day of the week)
* and `options.firstWeekContainsDate` (which is the day of January, which is always in
* the first week of the week-numbering year)
*
* Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
*
* @param date - The given date
* @param options - An object with options.
*
* @returns The local week-numbering year
*
* @example
* // Which week numbering year is 26 December 2004 with the default settings?
* const result = getWeekYear(new Date(2004, 11, 26))
* //=> 2005
*
* @example
* // Which week numbering year is 26 December 2004 if week starts on Saturday?
* const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })
* //=> 2004
*
* @example
* // Which week numbering year is 26 December 2004 if the first week contains 4 January?
* const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })
* //=> 2004
*/
function getWeekYear(date, options) {
	const _date = toDate$1(date, options?.in);
	const year = _date.getFullYear();
	const defaultOptions = getDefaultOptions$1();
	const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions.firstWeekContainsDate ?? defaultOptions.locale?.options?.firstWeekContainsDate ?? 1;
	const firstWeekOfNextYear = constructFrom(options?.in || date, 0);
	firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);
	firstWeekOfNextYear.setHours(0, 0, 0, 0);
	const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);
	const firstWeekOfThisYear = constructFrom(options?.in || date, 0);
	firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);
	firstWeekOfThisYear.setHours(0, 0, 0, 0);
	const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);
	if (+_date >= +startOfNextYear) return year + 1;
	else if (+_date >= +startOfThisYear) return year;
	else return year - 1;
}
//#endregion
//#region ../../node_modules/date-fns/startOfWeekYear.js
/**
* The {@link startOfWeekYear} function options.
*/
/**
* @name startOfWeekYear
* @category Week-Numbering Year Helpers
* @summary Return the start of a local week-numbering year for the given date.
*
* @description
* Return the start of a local week-numbering year.
* The exact calculation depends on the values of
* `options.weekStartsOn` (which is the index of the first day of the week)
* and `options.firstWeekContainsDate` (which is the day of January, which is always in
* the first week of the week-numbering year)
*
* Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type.
*
* @param date - The original date
* @param options - An object with options
*
* @returns The start of a week-numbering year
*
* @example
* // The start of an a week-numbering year for 2 July 2005 with default settings:
* const result = startOfWeekYear(new Date(2005, 6, 2))
* //=> Sun Dec 26 2004 00:00:00
*
* @example
* // The start of a week-numbering year for 2 July 2005
* // if Monday is the first day of week
* // and 4 January is always in the first week of the year:
* const result = startOfWeekYear(new Date(2005, 6, 2), {
*   weekStartsOn: 1,
*   firstWeekContainsDate: 4
* })
* //=> Mon Jan 03 2005 00:00:00
*/
function startOfWeekYear(date, options) {
	const defaultOptions = getDefaultOptions$1();
	const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions.firstWeekContainsDate ?? defaultOptions.locale?.options?.firstWeekContainsDate ?? 1;
	const year = getWeekYear(date, options);
	const firstWeek = constructFrom(options?.in || date, 0);
	firstWeek.setFullYear(year, 0, firstWeekContainsDate);
	firstWeek.setHours(0, 0, 0, 0);
	return startOfWeek(firstWeek, options);
}
//#endregion
//#region ../../node_modules/date-fns/getWeek.js
/**
* The {@link getWeek} function options.
*/
/**
* @name getWeek
* @category Week Helpers
* @summary Get the local week index of the given date.
*
* @description
* Get the local week index of the given date.
* The exact calculation depends on the values of
* `options.weekStartsOn` (which is the index of the first day of the week)
* and `options.firstWeekContainsDate` (which is the day of January, which is always in
* the first week of the week-numbering year)
*
* Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
*
* @param date - The given date
* @param options - An object with options
*
* @returns The week
*
* @example
* // Which week of the local week numbering year is 2 January 2005 with default options?
* const result = getWeek(new Date(2005, 0, 2))
* //=> 2
*
* @example
* // Which week of the local week numbering year is 2 January 2005,
* // if Monday is the first day of the week,
* // and the first week of the year always contains 4 January?
* const result = getWeek(new Date(2005, 0, 2), {
*   weekStartsOn: 1,
*   firstWeekContainsDate: 4
* })
* //=> 53
*/
function getWeek(date, options) {
	const _date = toDate$1(date, options?.in);
	const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);
	return Math.round(diff / millisecondsInWeek) + 1;
}
//#endregion
//#region ../../node_modules/date-fns/_lib/addLeadingZeros.js
function addLeadingZeros(number, targetLength) {
	return (number < 0 ? "-" : "") + Math.abs(number).toString().padStart(targetLength, "0");
}
//#endregion
//#region ../../node_modules/date-fns/_lib/format/lightFormatters.js
var lightFormatters = {
	y(date, token) {
		const signedYear = date.getFullYear();
		const year = signedYear > 0 ? signedYear : 1 - signedYear;
		return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
	},
	M(date, token) {
		const month = date.getMonth();
		return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
	},
	d(date, token) {
		return addLeadingZeros(date.getDate(), token.length);
	},
	a(date, token) {
		const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? "pm" : "am";
		switch (token) {
			case "a":
			case "aa": return dayPeriodEnumValue.toUpperCase();
			case "aaa": return dayPeriodEnumValue;
			case "aaaaa": return dayPeriodEnumValue[0];
			default: return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
		}
	},
	h(date, token) {
		return addLeadingZeros(date.getHours() % 12 || 12, token.length);
	},
	H(date, token) {
		return addLeadingZeros(date.getHours(), token.length);
	},
	m(date, token) {
		return addLeadingZeros(date.getMinutes(), token.length);
	},
	s(date, token) {
		return addLeadingZeros(date.getSeconds(), token.length);
	},
	S(date, token) {
		const numberOfDigits = token.length;
		const milliseconds = date.getMilliseconds();
		return addLeadingZeros(Math.trunc(milliseconds * Math.pow(10, numberOfDigits - 3)), token.length);
	}
};
//#endregion
//#region ../../node_modules/date-fns/_lib/format/formatters.js
var dayPeriodEnum = {
	am: "am",
	pm: "pm",
	midnight: "midnight",
	noon: "noon",
	morning: "morning",
	afternoon: "afternoon",
	evening: "evening",
	night: "night"
};
var formatters = {
	G: function(date, token, localize) {
		const era = date.getFullYear() > 0 ? 1 : 0;
		switch (token) {
			case "G":
			case "GG":
			case "GGG": return localize.era(era, { width: "abbreviated" });
			case "GGGGG": return localize.era(era, { width: "narrow" });
			default: return localize.era(era, { width: "wide" });
		}
	},
	y: function(date, token, localize) {
		if (token === "yo") {
			const signedYear = date.getFullYear();
			const year = signedYear > 0 ? signedYear : 1 - signedYear;
			return localize.ordinalNumber(year, { unit: "year" });
		}
		return lightFormatters.y(date, token);
	},
	Y: function(date, token, localize, options) {
		const signedWeekYear = getWeekYear(date, options);
		const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
		if (token === "YY") return addLeadingZeros(weekYear % 100, 2);
		if (token === "Yo") return localize.ordinalNumber(weekYear, { unit: "year" });
		return addLeadingZeros(weekYear, token.length);
	},
	R: function(date, token) {
		return addLeadingZeros(getISOWeekYear(date), token.length);
	},
	u: function(date, token) {
		return addLeadingZeros(date.getFullYear(), token.length);
	},
	Q: function(date, token, localize) {
		const quarter = Math.ceil((date.getMonth() + 1) / 3);
		switch (token) {
			case "Q": return String(quarter);
			case "QQ": return addLeadingZeros(quarter, 2);
			case "Qo": return localize.ordinalNumber(quarter, { unit: "quarter" });
			case "QQQ": return localize.quarter(quarter, {
				width: "abbreviated",
				context: "formatting"
			});
			case "QQQQQ": return localize.quarter(quarter, {
				width: "narrow",
				context: "formatting"
			});
			default: return localize.quarter(quarter, {
				width: "wide",
				context: "formatting"
			});
		}
	},
	q: function(date, token, localize) {
		const quarter = Math.ceil((date.getMonth() + 1) / 3);
		switch (token) {
			case "q": return String(quarter);
			case "qq": return addLeadingZeros(quarter, 2);
			case "qo": return localize.ordinalNumber(quarter, { unit: "quarter" });
			case "qqq": return localize.quarter(quarter, {
				width: "abbreviated",
				context: "standalone"
			});
			case "qqqqq": return localize.quarter(quarter, {
				width: "narrow",
				context: "standalone"
			});
			default: return localize.quarter(quarter, {
				width: "wide",
				context: "standalone"
			});
		}
	},
	M: function(date, token, localize) {
		const month = date.getMonth();
		switch (token) {
			case "M":
			case "MM": return lightFormatters.M(date, token);
			case "Mo": return localize.ordinalNumber(month + 1, { unit: "month" });
			case "MMM": return localize.month(month, {
				width: "abbreviated",
				context: "formatting"
			});
			case "MMMMM": return localize.month(month, {
				width: "narrow",
				context: "formatting"
			});
			default: return localize.month(month, {
				width: "wide",
				context: "formatting"
			});
		}
	},
	L: function(date, token, localize) {
		const month = date.getMonth();
		switch (token) {
			case "L": return String(month + 1);
			case "LL": return addLeadingZeros(month + 1, 2);
			case "Lo": return localize.ordinalNumber(month + 1, { unit: "month" });
			case "LLL": return localize.month(month, {
				width: "abbreviated",
				context: "standalone"
			});
			case "LLLLL": return localize.month(month, {
				width: "narrow",
				context: "standalone"
			});
			default: return localize.month(month, {
				width: "wide",
				context: "standalone"
			});
		}
	},
	w: function(date, token, localize, options) {
		const week = getWeek(date, options);
		if (token === "wo") return localize.ordinalNumber(week, { unit: "week" });
		return addLeadingZeros(week, token.length);
	},
	I: function(date, token, localize) {
		const isoWeek = getISOWeek(date);
		if (token === "Io") return localize.ordinalNumber(isoWeek, { unit: "week" });
		return addLeadingZeros(isoWeek, token.length);
	},
	d: function(date, token, localize) {
		if (token === "do") return localize.ordinalNumber(date.getDate(), { unit: "date" });
		return lightFormatters.d(date, token);
	},
	D: function(date, token, localize) {
		const dayOfYear = getDayOfYear(date);
		if (token === "Do") return localize.ordinalNumber(dayOfYear, { unit: "dayOfYear" });
		return addLeadingZeros(dayOfYear, token.length);
	},
	E: function(date, token, localize) {
		const dayOfWeek = date.getDay();
		switch (token) {
			case "E":
			case "EE":
			case "EEE": return localize.day(dayOfWeek, {
				width: "abbreviated",
				context: "formatting"
			});
			case "EEEEE": return localize.day(dayOfWeek, {
				width: "narrow",
				context: "formatting"
			});
			case "EEEEEE": return localize.day(dayOfWeek, {
				width: "short",
				context: "formatting"
			});
			default: return localize.day(dayOfWeek, {
				width: "wide",
				context: "formatting"
			});
		}
	},
	e: function(date, token, localize, options) {
		const dayOfWeek = date.getDay();
		const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
		switch (token) {
			case "e": return String(localDayOfWeek);
			case "ee": return addLeadingZeros(localDayOfWeek, 2);
			case "eo": return localize.ordinalNumber(localDayOfWeek, { unit: "day" });
			case "eee": return localize.day(dayOfWeek, {
				width: "abbreviated",
				context: "formatting"
			});
			case "eeeee": return localize.day(dayOfWeek, {
				width: "narrow",
				context: "formatting"
			});
			case "eeeeee": return localize.day(dayOfWeek, {
				width: "short",
				context: "formatting"
			});
			default: return localize.day(dayOfWeek, {
				width: "wide",
				context: "formatting"
			});
		}
	},
	c: function(date, token, localize, options) {
		const dayOfWeek = date.getDay();
		const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
		switch (token) {
			case "c": return String(localDayOfWeek);
			case "cc": return addLeadingZeros(localDayOfWeek, token.length);
			case "co": return localize.ordinalNumber(localDayOfWeek, { unit: "day" });
			case "ccc": return localize.day(dayOfWeek, {
				width: "abbreviated",
				context: "standalone"
			});
			case "ccccc": return localize.day(dayOfWeek, {
				width: "narrow",
				context: "standalone"
			});
			case "cccccc": return localize.day(dayOfWeek, {
				width: "short",
				context: "standalone"
			});
			default: return localize.day(dayOfWeek, {
				width: "wide",
				context: "standalone"
			});
		}
	},
	i: function(date, token, localize) {
		const dayOfWeek = date.getDay();
		const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
		switch (token) {
			case "i": return String(isoDayOfWeek);
			case "ii": return addLeadingZeros(isoDayOfWeek, token.length);
			case "io": return localize.ordinalNumber(isoDayOfWeek, { unit: "day" });
			case "iii": return localize.day(dayOfWeek, {
				width: "abbreviated",
				context: "formatting"
			});
			case "iiiii": return localize.day(dayOfWeek, {
				width: "narrow",
				context: "formatting"
			});
			case "iiiiii": return localize.day(dayOfWeek, {
				width: "short",
				context: "formatting"
			});
			default: return localize.day(dayOfWeek, {
				width: "wide",
				context: "formatting"
			});
		}
	},
	a: function(date, token, localize) {
		const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? "pm" : "am";
		switch (token) {
			case "a":
			case "aa": return localize.dayPeriod(dayPeriodEnumValue, {
				width: "abbreviated",
				context: "formatting"
			});
			case "aaa": return localize.dayPeriod(dayPeriodEnumValue, {
				width: "abbreviated",
				context: "formatting"
			}).toLowerCase();
			case "aaaaa": return localize.dayPeriod(dayPeriodEnumValue, {
				width: "narrow",
				context: "formatting"
			});
			default: return localize.dayPeriod(dayPeriodEnumValue, {
				width: "wide",
				context: "formatting"
			});
		}
	},
	b: function(date, token, localize) {
		const hours = date.getHours();
		let dayPeriodEnumValue;
		if (hours === 12) dayPeriodEnumValue = dayPeriodEnum.noon;
		else if (hours === 0) dayPeriodEnumValue = dayPeriodEnum.midnight;
		else dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
		switch (token) {
			case "b":
			case "bb": return localize.dayPeriod(dayPeriodEnumValue, {
				width: "abbreviated",
				context: "formatting"
			});
			case "bbb": return localize.dayPeriod(dayPeriodEnumValue, {
				width: "abbreviated",
				context: "formatting"
			}).toLowerCase();
			case "bbbbb": return localize.dayPeriod(dayPeriodEnumValue, {
				width: "narrow",
				context: "formatting"
			});
			default: return localize.dayPeriod(dayPeriodEnumValue, {
				width: "wide",
				context: "formatting"
			});
		}
	},
	B: function(date, token, localize) {
		const hours = date.getHours();
		let dayPeriodEnumValue;
		if (hours >= 17) dayPeriodEnumValue = dayPeriodEnum.evening;
		else if (hours >= 12) dayPeriodEnumValue = dayPeriodEnum.afternoon;
		else if (hours >= 4) dayPeriodEnumValue = dayPeriodEnum.morning;
		else dayPeriodEnumValue = dayPeriodEnum.night;
		switch (token) {
			case "B":
			case "BB":
			case "BBB": return localize.dayPeriod(dayPeriodEnumValue, {
				width: "abbreviated",
				context: "formatting"
			});
			case "BBBBB": return localize.dayPeriod(dayPeriodEnumValue, {
				width: "narrow",
				context: "formatting"
			});
			default: return localize.dayPeriod(dayPeriodEnumValue, {
				width: "wide",
				context: "formatting"
			});
		}
	},
	h: function(date, token, localize) {
		if (token === "ho") {
			let hours = date.getHours() % 12;
			if (hours === 0) hours = 12;
			return localize.ordinalNumber(hours, { unit: "hour" });
		}
		return lightFormatters.h(date, token);
	},
	H: function(date, token, localize) {
		if (token === "Ho") return localize.ordinalNumber(date.getHours(), { unit: "hour" });
		return lightFormatters.H(date, token);
	},
	K: function(date, token, localize) {
		const hours = date.getHours() % 12;
		if (token === "Ko") return localize.ordinalNumber(hours, { unit: "hour" });
		return addLeadingZeros(hours, token.length);
	},
	k: function(date, token, localize) {
		let hours = date.getHours();
		if (hours === 0) hours = 24;
		if (token === "ko") return localize.ordinalNumber(hours, { unit: "hour" });
		return addLeadingZeros(hours, token.length);
	},
	m: function(date, token, localize) {
		if (token === "mo") return localize.ordinalNumber(date.getMinutes(), { unit: "minute" });
		return lightFormatters.m(date, token);
	},
	s: function(date, token, localize) {
		if (token === "so") return localize.ordinalNumber(date.getSeconds(), { unit: "second" });
		return lightFormatters.s(date, token);
	},
	S: function(date, token) {
		return lightFormatters.S(date, token);
	},
	X: function(date, token, _localize) {
		const timezoneOffset = date.getTimezoneOffset();
		if (timezoneOffset === 0) return "Z";
		switch (token) {
			case "X": return formatTimezoneWithOptionalMinutes(timezoneOffset);
			case "XXXX":
			case "XX": return formatTimezone(timezoneOffset);
			default: return formatTimezone(timezoneOffset, ":");
		}
	},
	x: function(date, token, _localize) {
		const timezoneOffset = date.getTimezoneOffset();
		switch (token) {
			case "x": return formatTimezoneWithOptionalMinutes(timezoneOffset);
			case "xxxx":
			case "xx": return formatTimezone(timezoneOffset);
			default: return formatTimezone(timezoneOffset, ":");
		}
	},
	O: function(date, token, _localize) {
		const timezoneOffset = date.getTimezoneOffset();
		switch (token) {
			case "O":
			case "OO":
			case "OOO": return "GMT" + formatTimezoneShort(timezoneOffset, ":");
			default: return "GMT" + formatTimezone(timezoneOffset, ":");
		}
	},
	z: function(date, token, _localize) {
		const timezoneOffset = date.getTimezoneOffset();
		switch (token) {
			case "z":
			case "zz":
			case "zzz": return "GMT" + formatTimezoneShort(timezoneOffset, ":");
			default: return "GMT" + formatTimezone(timezoneOffset, ":");
		}
	},
	t: function(date, token, _localize) {
		return addLeadingZeros(Math.trunc(+date / 1e3), token.length);
	},
	T: function(date, token, _localize) {
		return addLeadingZeros(+date, token.length);
	}
};
function formatTimezoneShort(offset, delimiter = "") {
	const sign = offset > 0 ? "-" : "+";
	const absOffset = Math.abs(offset);
	const hours = Math.trunc(absOffset / 60);
	const minutes = absOffset % 60;
	if (minutes === 0) return sign + String(hours);
	return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
}
function formatTimezoneWithOptionalMinutes(offset, delimiter) {
	if (offset % 60 === 0) return (offset > 0 ? "-" : "+") + addLeadingZeros(Math.abs(offset) / 60, 2);
	return formatTimezone(offset, delimiter);
}
function formatTimezone(offset, delimiter = "") {
	const sign = offset > 0 ? "-" : "+";
	const absOffset = Math.abs(offset);
	const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);
	const minutes = addLeadingZeros(absOffset % 60, 2);
	return sign + hours + delimiter + minutes;
}
//#endregion
//#region ../../node_modules/date-fns/_lib/format/longFormatters.js
var dateLongFormatter = (pattern, formatLong) => {
	switch (pattern) {
		case "P": return formatLong.date({ width: "short" });
		case "PP": return formatLong.date({ width: "medium" });
		case "PPP": return formatLong.date({ width: "long" });
		default: return formatLong.date({ width: "full" });
	}
};
var timeLongFormatter = (pattern, formatLong) => {
	switch (pattern) {
		case "p": return formatLong.time({ width: "short" });
		case "pp": return formatLong.time({ width: "medium" });
		case "ppp": return formatLong.time({ width: "long" });
		default: return formatLong.time({ width: "full" });
	}
};
var dateTimeLongFormatter = (pattern, formatLong) => {
	const matchResult = pattern.match(/(P+)(p+)?/) || [];
	const datePattern = matchResult[1];
	const timePattern = matchResult[2];
	if (!timePattern) return dateLongFormatter(pattern, formatLong);
	let dateTimeFormat;
	switch (datePattern) {
		case "P":
			dateTimeFormat = formatLong.dateTime({ width: "short" });
			break;
		case "PP":
			dateTimeFormat = formatLong.dateTime({ width: "medium" });
			break;
		case "PPP":
			dateTimeFormat = formatLong.dateTime({ width: "long" });
			break;
		default:
			dateTimeFormat = formatLong.dateTime({ width: "full" });
			break;
	}
	return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong)).replace("{{time}}", timeLongFormatter(timePattern, formatLong));
};
var longFormatters = {
	p: timeLongFormatter,
	P: dateTimeLongFormatter
};
//#endregion
//#region ../../node_modules/date-fns/_lib/protectedTokens.js
var dayOfYearTokenRE = /^D+$/;
var weekYearTokenRE = /^Y+$/;
var throwTokens = [
	"D",
	"DD",
	"YY",
	"YYYY"
];
function isProtectedDayOfYearToken(token) {
	return dayOfYearTokenRE.test(token);
}
function isProtectedWeekYearToken(token) {
	return weekYearTokenRE.test(token);
}
function warnOrThrowProtectedError(token, format, input) {
	const _message = message(token, format, input);
	console.warn(_message);
	if (throwTokens.includes(token)) throw new RangeError(_message);
}
function message(token, format, input) {
	const subject = token[0] === "Y" ? "years" : "days of the month";
	return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
}
//#endregion
//#region ../../node_modules/date-fns/format.js
var formattingTokensRegExp$1 = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
var longFormattingTokensRegExp$1 = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
var escapedStringRegExp$1 = /^'([^]*?)'?$/;
var doubleQuoteRegExp$1 = /''/g;
var unescapedLatinCharacterRegExp$1 = /[a-zA-Z]/;
/**
* The {@link format} function options.
*/
/**
* @name format
* @alias formatDate
* @category Common Helpers
* @summary Format the date.
*
* @description
* Return the formatted date string in the given format. The result may vary by locale.
*
* > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.
* > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* The characters wrapped between two single quotes characters (') are escaped.
* Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.
* (see the last example)
*
* Format of the string is based on Unicode Technical Standard #35:
* https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
* with a few additions (see note 7 below the table).
*
* Accepted patterns:
* | Unit                            | Pattern | Result examples                   | Notes |
* |---------------------------------|---------|-----------------------------------|-------|
* | Era                             | G..GGG  | AD, BC                            |       |
* |                                 | GGGG    | Anno Domini, Before Christ        | 2     |
* |                                 | GGGGG   | A, B                              |       |
* | Calendar year                   | y       | 44, 1, 1900, 2017                 | 5     |
* |                                 | yo      | 44th, 1st, 0th, 17th              | 5,7   |
* |                                 | yy      | 44, 01, 00, 17                    | 5     |
* |                                 | yyy     | 044, 001, 1900, 2017              | 5     |
* |                                 | yyyy    | 0044, 0001, 1900, 2017            | 5     |
* |                                 | yyyyy   | ...                               | 3,5   |
* | Local week-numbering year       | Y       | 44, 1, 1900, 2017                 | 5     |
* |                                 | Yo      | 44th, 1st, 1900th, 2017th         | 5,7   |
* |                                 | YY      | 44, 01, 00, 17                    | 5,8   |
* |                                 | YYY     | 044, 001, 1900, 2017              | 5     |
* |                                 | YYYY    | 0044, 0001, 1900, 2017            | 5,8   |
* |                                 | YYYYY   | ...                               | 3,5   |
* | ISO week-numbering year         | R       | -43, 0, 1, 1900, 2017             | 5,7   |
* |                                 | RR      | -43, 00, 01, 1900, 2017           | 5,7   |
* |                                 | RRR     | -043, 000, 001, 1900, 2017        | 5,7   |
* |                                 | RRRR    | -0043, 0000, 0001, 1900, 2017     | 5,7   |
* |                                 | RRRRR   | ...                               | 3,5,7 |
* | Extended year                   | u       | -43, 0, 1, 1900, 2017             | 5     |
* |                                 | uu      | -43, 01, 1900, 2017               | 5     |
* |                                 | uuu     | -043, 001, 1900, 2017             | 5     |
* |                                 | uuuu    | -0043, 0001, 1900, 2017           | 5     |
* |                                 | uuuuu   | ...                               | 3,5   |
* | Quarter (formatting)            | Q       | 1, 2, 3, 4                        |       |
* |                                 | Qo      | 1st, 2nd, 3rd, 4th                | 7     |
* |                                 | QQ      | 01, 02, 03, 04                    |       |
* |                                 | QQQ     | Q1, Q2, Q3, Q4                    |       |
* |                                 | QQQQ    | 1st quarter, 2nd quarter, ...     | 2     |
* |                                 | QQQQQ   | 1, 2, 3, 4                        | 4     |
* | Quarter (stand-alone)           | q       | 1, 2, 3, 4                        |       |
* |                                 | qo      | 1st, 2nd, 3rd, 4th                | 7     |
* |                                 | qq      | 01, 02, 03, 04                    |       |
* |                                 | qqq     | Q1, Q2, Q3, Q4                    |       |
* |                                 | qqqq    | 1st quarter, 2nd quarter, ...     | 2     |
* |                                 | qqqqq   | 1, 2, 3, 4                        | 4     |
* | Month (formatting)              | M       | 1, 2, ..., 12                     |       |
* |                                 | Mo      | 1st, 2nd, ..., 12th               | 7     |
* |                                 | MM      | 01, 02, ..., 12                   |       |
* |                                 | MMM     | Jan, Feb, ..., Dec                |       |
* |                                 | MMMM    | January, February, ..., December  | 2     |
* |                                 | MMMMM   | J, F, ..., D                      |       |
* | Month (stand-alone)             | L       | 1, 2, ..., 12                     |       |
* |                                 | Lo      | 1st, 2nd, ..., 12th               | 7     |
* |                                 | LL      | 01, 02, ..., 12                   |       |
* |                                 | LLL     | Jan, Feb, ..., Dec                |       |
* |                                 | LLLL    | January, February, ..., December  | 2     |
* |                                 | LLLLL   | J, F, ..., D                      |       |
* | Local week of year              | w       | 1, 2, ..., 53                     |       |
* |                                 | wo      | 1st, 2nd, ..., 53th               | 7     |
* |                                 | ww      | 01, 02, ..., 53                   |       |
* | ISO week of year                | I       | 1, 2, ..., 53                     | 7     |
* |                                 | Io      | 1st, 2nd, ..., 53th               | 7     |
* |                                 | II      | 01, 02, ..., 53                   | 7     |
* | Day of month                    | d       | 1, 2, ..., 31                     |       |
* |                                 | do      | 1st, 2nd, ..., 31st               | 7     |
* |                                 | dd      | 01, 02, ..., 31                   |       |
* | Day of year                     | D       | 1, 2, ..., 365, 366               | 9     |
* |                                 | Do      | 1st, 2nd, ..., 365th, 366th       | 7     |
* |                                 | DD      | 01, 02, ..., 365, 366             | 9     |
* |                                 | DDD     | 001, 002, ..., 365, 366           |       |
* |                                 | DDDD    | ...                               | 3     |
* | Day of week (formatting)        | E..EEE  | Mon, Tue, Wed, ..., Sun           |       |
* |                                 | EEEE    | Monday, Tuesday, ..., Sunday      | 2     |
* |                                 | EEEEE   | M, T, W, T, F, S, S               |       |
* |                                 | EEEEEE  | Mo, Tu, We, Th, Fr, Sa, Su        |       |
* | ISO day of week (formatting)    | i       | 1, 2, 3, ..., 7                   | 7     |
* |                                 | io      | 1st, 2nd, ..., 7th                | 7     |
* |                                 | ii      | 01, 02, ..., 07                   | 7     |
* |                                 | iii     | Mon, Tue, Wed, ..., Sun           | 7     |
* |                                 | iiii    | Monday, Tuesday, ..., Sunday      | 2,7   |
* |                                 | iiiii   | M, T, W, T, F, S, S               | 7     |
* |                                 | iiiiii  | Mo, Tu, We, Th, Fr, Sa, Su        | 7     |
* | Local day of week (formatting)  | e       | 2, 3, 4, ..., 1                   |       |
* |                                 | eo      | 2nd, 3rd, ..., 1st                | 7     |
* |                                 | ee      | 02, 03, ..., 01                   |       |
* |                                 | eee     | Mon, Tue, Wed, ..., Sun           |       |
* |                                 | eeee    | Monday, Tuesday, ..., Sunday      | 2     |
* |                                 | eeeee   | M, T, W, T, F, S, S               |       |
* |                                 | eeeeee  | Mo, Tu, We, Th, Fr, Sa, Su        |       |
* | Local day of week (stand-alone) | c       | 2, 3, 4, ..., 1                   |       |
* |                                 | co      | 2nd, 3rd, ..., 1st                | 7     |
* |                                 | cc      | 02, 03, ..., 01                   |       |
* |                                 | ccc     | Mon, Tue, Wed, ..., Sun           |       |
* |                                 | cccc    | Monday, Tuesday, ..., Sunday      | 2     |
* |                                 | ccccc   | M, T, W, T, F, S, S               |       |
* |                                 | cccccc  | Mo, Tu, We, Th, Fr, Sa, Su        |       |
* | AM, PM                          | a..aa   | AM, PM                            |       |
* |                                 | aaa     | am, pm                            |       |
* |                                 | aaaa    | a.m., p.m.                        | 2     |
* |                                 | aaaaa   | a, p                              |       |
* | AM, PM, noon, midnight          | b..bb   | AM, PM, noon, midnight            |       |
* |                                 | bbb     | am, pm, noon, midnight            |       |
* |                                 | bbbb    | a.m., p.m., noon, midnight        | 2     |
* |                                 | bbbbb   | a, p, n, mi                       |       |
* | Flexible day period             | B..BBB  | at night, in the morning, ...     |       |
* |                                 | BBBB    | at night, in the morning, ...     | 2     |
* |                                 | BBBBB   | at night, in the morning, ...     |       |
* | Hour [1-12]                     | h       | 1, 2, ..., 11, 12                 |       |
* |                                 | ho      | 1st, 2nd, ..., 11th, 12th         | 7     |
* |                                 | hh      | 01, 02, ..., 11, 12               |       |
* | Hour [0-23]                     | H       | 0, 1, 2, ..., 23                  |       |
* |                                 | Ho      | 0th, 1st, 2nd, ..., 23rd          | 7     |
* |                                 | HH      | 00, 01, 02, ..., 23               |       |
* | Hour [0-11]                     | K       | 1, 2, ..., 11, 0                  |       |
* |                                 | Ko      | 1st, 2nd, ..., 11th, 0th          | 7     |
* |                                 | KK      | 01, 02, ..., 11, 00               |       |
* | Hour [1-24]                     | k       | 24, 1, 2, ..., 23                 |       |
* |                                 | ko      | 24th, 1st, 2nd, ..., 23rd         | 7     |
* |                                 | kk      | 24, 01, 02, ..., 23               |       |
* | Minute                          | m       | 0, 1, ..., 59                     |       |
* |                                 | mo      | 0th, 1st, ..., 59th               | 7     |
* |                                 | mm      | 00, 01, ..., 59                   |       |
* | Second                          | s       | 0, 1, ..., 59                     |       |
* |                                 | so      | 0th, 1st, ..., 59th               | 7     |
* |                                 | ss      | 00, 01, ..., 59                   |       |
* | Fraction of second              | S       | 0, 1, ..., 9                      |       |
* |                                 | SS      | 00, 01, ..., 99                   |       |
* |                                 | SSS     | 000, 001, ..., 999                |       |
* |                                 | SSSS    | ...                               | 3     |
* | Timezone (ISO-8601 w/ Z)        | X       | -08, +0530, Z                     |       |
* |                                 | XX      | -0800, +0530, Z                   |       |
* |                                 | XXX     | -08:00, +05:30, Z                 |       |
* |                                 | XXXX    | -0800, +0530, Z, +123456          | 2     |
* |                                 | XXXXX   | -08:00, +05:30, Z, +12:34:56      |       |
* | Timezone (ISO-8601 w/o Z)       | x       | -08, +0530, +00                   |       |
* |                                 | xx      | -0800, +0530, +0000               |       |
* |                                 | xxx     | -08:00, +05:30, +00:00            | 2     |
* |                                 | xxxx    | -0800, +0530, +0000, +123456      |       |
* |                                 | xxxxx   | -08:00, +05:30, +00:00, +12:34:56 |       |
* | Timezone (GMT)                  | O...OOO | GMT-8, GMT+5:30, GMT+0            |       |
* |                                 | OOOO    | GMT-08:00, GMT+05:30, GMT+00:00   | 2     |
* | Timezone (specific non-locat.)  | z...zzz | GMT-8, GMT+5:30, GMT+0            | 6     |
* |                                 | zzzz    | GMT-08:00, GMT+05:30, GMT+00:00   | 2,6   |
* | Seconds timestamp               | t       | 512969520                         | 7     |
* |                                 | tt      | ...                               | 3,7   |
* | Milliseconds timestamp          | T       | 512969520900                      | 7     |
* |                                 | TT      | ...                               | 3,7   |
* | Long localized date             | P       | 04/29/1453                        | 7     |
* |                                 | PP      | Apr 29, 1453                      | 7     |
* |                                 | PPP     | April 29th, 1453                  | 7     |
* |                                 | PPPP    | Friday, April 29th, 1453          | 2,7   |
* | Long localized time             | p       | 12:00 AM                          | 7     |
* |                                 | pp      | 12:00:00 AM                       | 7     |
* |                                 | ppp     | 12:00:00 AM GMT+2                 | 7     |
* |                                 | pppp    | 12:00:00 AM GMT+02:00             | 2,7   |
* | Combination of date and time    | Pp      | 04/29/1453, 12:00 AM              | 7     |
* |                                 | PPpp    | Apr 29, 1453, 12:00:00 AM         | 7     |
* |                                 | PPPppp  | April 29th, 1453 at ...           | 7     |
* |                                 | PPPPpppp| Friday, April 29th, 1453 at ...   | 2,7   |
* Notes:
* 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
*    are the same as "stand-alone" units, but are different in some languages.
*    "Formatting" units are declined according to the rules of the language
*    in the context of a date. "Stand-alone" units are always nominative singular:
*
*    `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`
*
*    `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
*
* 2. Any sequence of the identical letters is a pattern, unless it is escaped by
*    the single quote characters (see below).
*    If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)
*    the output will be the same as default pattern for this unit, usually
*    the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units
*    are marked with "2" in the last column of the table.
*
*    `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`
*
*    `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`
*
*    `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`
*
*    `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`
*
*    `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`
*
* 3. Some patterns could be unlimited length (such as `yyyyyyyy`).
*    The output will be padded with zeros to match the length of the pattern.
*
*    `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`
*
* 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.
*    These tokens represent the shortest form of the quarter.
*
* 5. The main difference between `y` and `u` patterns are B.C. years:
*
*    | Year | `y` | `u` |
*    |------|-----|-----|
*    | AC 1 |   1 |   1 |
*    | BC 1 |   1 |   0 |
*    | BC 2 |   2 |  -1 |
*
*    Also `yy` always returns the last two digits of a year,
*    while `uu` pads single digit years to 2 characters and returns other years unchanged:
*
*    | Year | `yy` | `uu` |
*    |------|------|------|
*    | 1    |   01 |   01 |
*    | 14   |   14 |   14 |
*    | 376  |   76 |  376 |
*    | 1453 |   53 | 1453 |
*
*    The same difference is true for local and ISO week-numbering years (`Y` and `R`),
*    except local week-numbering years are dependent on `options.weekStartsOn`
*    and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)
*    and [getWeekYear](https://date-fns.org/docs/getWeekYear)).
*
* 6. Specific non-location timezones are currently unavailable in `date-fns`,
*    so right now these tokens fall back to GMT timezones.
*
* 7. These patterns are not in the Unicode Technical Standard #35:
*    - `i`: ISO day of week
*    - `I`: ISO week of year
*    - `R`: ISO week-numbering year
*    - `t`: seconds timestamp
*    - `T`: milliseconds timestamp
*    - `o`: ordinal number modifier
*    - `P`: long localized date
*    - `p`: long localized time
*
* 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
*    You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
*    You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* @param date - The original date
* @param format - The string of tokens
* @param options - An object with options
*
* @returns The formatted date string
*
* @throws `date` must not be Invalid Date
* @throws `options.locale` must contain `localize` property
* @throws `options.locale` must contain `formatLong` property
* @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* @throws format string contains an unescaped latin alphabet character
*
* @example
* // Represent 11 February 2014 in middle-endian format:
* const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')
* //=> '02/11/2014'
*
* @example
* // Represent 2 July 2014 in Esperanto:
* import { eoLocale } from 'date-fns/locale/eo'
* const result = format(new Date(2014, 6, 2), "do 'de' MMMM yyyy", {
*   locale: eoLocale
* })
* //=> '2-a de julio 2014'
*
* @example
* // Escape string by single quote characters:
* const result = format(new Date(2014, 6, 2, 15), "h 'o''clock'")
* //=> "3 o'clock"
*/
function format$4(date, formatStr, options) {
	const defaultOptions = getDefaultOptions$1();
	const locale = options?.locale ?? defaultOptions.locale ?? enUS;
	const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions.firstWeekContainsDate ?? defaultOptions.locale?.options?.firstWeekContainsDate ?? 1;
	const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions.weekStartsOn ?? defaultOptions.locale?.options?.weekStartsOn ?? 0;
	const originalDate = toDate$1(date, options?.in);
	if (!isValid$3(originalDate)) throw new RangeError("Invalid time value");
	let parts = formatStr.match(longFormattingTokensRegExp$1).map((substring) => {
		const firstCharacter = substring[0];
		if (firstCharacter === "p" || firstCharacter === "P") {
			const longFormatter = longFormatters[firstCharacter];
			return longFormatter(substring, locale.formatLong);
		}
		return substring;
	}).join("").match(formattingTokensRegExp$1).map((substring) => {
		if (substring === "''") return {
			isToken: false,
			value: "'"
		};
		const firstCharacter = substring[0];
		if (firstCharacter === "'") return {
			isToken: false,
			value: cleanEscapedString$1(substring)
		};
		if (formatters[firstCharacter]) return {
			isToken: true,
			value: substring
		};
		if (firstCharacter.match(unescapedLatinCharacterRegExp$1)) throw new RangeError("Format string contains an unescaped latin alphabet character `" + firstCharacter + "`");
		return {
			isToken: false,
			value: substring
		};
	});
	if (locale.localize.preprocessor) parts = locale.localize.preprocessor(originalDate, parts);
	const formatterOptions = {
		firstWeekContainsDate,
		weekStartsOn,
		locale
	};
	return parts.map((part) => {
		if (!part.isToken) return part.value;
		const token = part.value;
		if (!options?.useAdditionalWeekYearTokens && isProtectedWeekYearToken(token) || !options?.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(token)) warnOrThrowProtectedError(token, formatStr, String(date));
		const formatter = formatters[token[0]];
		return formatter(originalDate, token, locale.localize, formatterOptions);
	}).join("");
}
function cleanEscapedString$1(input) {
	const matched = input.match(escapedStringRegExp$1);
	if (!matched) return input;
	return matched[1].replace(doubleQuoteRegExp$1, "'");
}
//#endregion
//#region ../../node_modules/date-fns/getDay.js
/**
* The {@link getDay} function options.
*/
/**
* @name getDay
* @category Weekday Helpers
* @summary Get the day of the week of the given date.
*
* @description
* Get the day of the week of the given date.
*
* @param date - The given date
* @param options - The options
*
* @returns The day of week, 0 represents Sunday
*
* @example
* // Which day of the week is 29 February 2012?
* const result = getDay(new Date(2012, 1, 29))
* //=> 3
*/
function getDay$1(date, options) {
	return toDate$1(date, options?.in).getDay();
}
//#endregion
//#region ../../node_modules/date-fns/getDefaultOptions.js
/**
* @name getDefaultOptions
* @category Common Helpers
* @summary Get default options.
* @pure false
*
* @description
* Returns an object that contains defaults for
* `options.locale`, `options.weekStartsOn` and `options.firstWeekContainsDate`
* arguments for all functions.
*
* You can change these with [setDefaultOptions](https://date-fns.org/docs/setDefaultOptions).
*
* @returns The default options
*
* @example
* const result = getDefaultOptions()
* //=> {}
*
* @example
* setDefaultOptions({ weekStarsOn: 1, firstWeekContainsDate: 4 })
* const result = getDefaultOptions()
* //=> { weekStarsOn: 1, firstWeekContainsDate: 4 }
*/
function getDefaultOptions() {
	return Object.assign({}, getDefaultOptions$1());
}
//#endregion
//#region ../../node_modules/date-fns/getISODay.js
/**
* The {@link getISODay} function options.
*/
/**
* @name getISODay
* @category Weekday Helpers
* @summary Get the day of the ISO week of the given date.
*
* @description
* Get the day of the ISO week of the given date,
* which is 7 for Sunday, 1 for Monday etc.
*
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
*
* @param date - The given date
* @param options - An object with options
*
* @returns The day of ISO week
*
* @example
* // Which day of the ISO week is 26 February 2012?
* const result = getISODay(new Date(2012, 1, 26))
* //=> 7
*/
function getISODay(date, options) {
	const day = toDate$1(date, options?.in).getDay();
	return day === 0 ? 7 : day;
}
//#endregion
//#region ../../node_modules/date-fns/isAfter.js
/**
* @name isAfter
* @category Common Helpers
* @summary Is the first date after the second one?
*
* @description
* Is the first date after the second one?
*
* @param date - The date that should be after the other one to return true
* @param dateToCompare - The date to compare with
*
* @returns The first date is after the second date
*
* @example
* // Is 10 July 1989 after 11 February 1987?
* const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))
* //=> true
*/
function isAfter$2(date, dateToCompare) {
	return +toDate$1(date) > +toDate$1(dateToCompare);
}
//#endregion
//#region ../../node_modules/date-fns/isBefore.js
/**
* @name isBefore
* @category Common Helpers
* @summary Is the first date before the second one?
*
* @description
* Is the first date before the second one?
*
* @param date - The date that should be before the other one to return true
* @param dateToCompare - The date to compare with
*
* @returns The first date is before the second date
*
* @example
* // Is 10 July 1989 before 11 February 1987?
* const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))
* //=> false
*/
function isBefore$2(date, dateToCompare) {
	return +toDate$1(date) < +toDate$1(dateToCompare);
}
//#endregion
//#region ../../node_modules/date-fns/transpose.js
/**
* @name transpose
* @category Generic Helpers
* @summary Transpose the date to the given constructor.
*
* @description
* The function transposes the date to the given constructor. It helps you
* to transpose the date in the system time zone to say `UTCDate` or any other
* date extension.
*
* @typeParam InputDate - The input `Date` type derived from the passed argument.
* @typeParam ResultDate - The result `Date` type derived from the passed constructor.
*
* @param date - The date to use values from
* @param constructor - The date constructor to use
*
* @returns Date transposed to the given constructor
*
* @example
* // Create July 10, 2022 00:00 in locale time zone
* const date = new Date(2022, 6, 10)
* //=> 'Sun Jul 10 2022 00:00:00 GMT+0800 (Singapore Standard Time)'
*
* @example
* // Transpose the date to July 10, 2022 00:00 in UTC
* transpose(date, UTCDate)
* //=> 'Sun Jul 10 2022 00:00:00 GMT+0000 (Coordinated Universal Time)'
*/
function transpose(date, constructor) {
	const date_ = isConstructor(constructor) ? new constructor(0) : constructFrom(constructor, 0);
	date_.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());
	date_.setHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
	return date_;
}
function isConstructor(constructor) {
	return typeof constructor === "function" && constructor.prototype?.constructor === constructor;
}
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/Setter.js
var TIMEZONE_UNIT_PRIORITY = 10;
var Setter = class {
	subPriority = 0;
	validate(_utcDate, _options) {
		return true;
	}
};
var ValueSetter = class extends Setter {
	constructor(value, validateValue, setValue, priority, subPriority) {
		super();
		this.value = value;
		this.validateValue = validateValue;
		this.setValue = setValue;
		this.priority = priority;
		if (subPriority) this.subPriority = subPriority;
	}
	validate(date, options) {
		return this.validateValue(date, this.value, options);
	}
	set(date, flags, options) {
		return this.setValue(date, flags, this.value, options);
	}
};
var DateTimezoneSetter = class extends Setter {
	priority = TIMEZONE_UNIT_PRIORITY;
	subPriority = -1;
	constructor(context, reference) {
		super();
		this.context = context || ((date) => constructFrom(reference, date));
	}
	set(date, flags) {
		if (flags.timestampIsSet) return date;
		return constructFrom(date, transpose(date, this.context));
	}
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/Parser.js
var Parser$1 = class {
	run(dateString, token, match, options) {
		const result = this.parse(dateString, token, match, options);
		if (!result) return null;
		return {
			setter: new ValueSetter(result.value, this.validate, this.set, this.priority, this.subPriority),
			rest: result.rest
		};
	}
	validate(_utcDate, _value, _options) {
		return true;
	}
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/EraParser.js
var EraParser = class extends Parser$1 {
	priority = 140;
	parse(dateString, token, match) {
		switch (token) {
			case "G":
			case "GG":
			case "GGG": return match.era(dateString, { width: "abbreviated" }) || match.era(dateString, { width: "narrow" });
			case "GGGGG": return match.era(dateString, { width: "narrow" });
			default: return match.era(dateString, { width: "wide" }) || match.era(dateString, { width: "abbreviated" }) || match.era(dateString, { width: "narrow" });
		}
	}
	set(date, flags, value) {
		flags.era = value;
		date.setFullYear(value, 0, 1);
		date.setHours(0, 0, 0, 0);
		return date;
	}
	incompatibleTokens = [
		"R",
		"u",
		"t",
		"T"
	];
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/constants.js
var numericPatterns = {
	month: /^(1[0-2]|0?\d)/,
	date: /^(3[0-1]|[0-2]?\d)/,
	dayOfYear: /^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,
	week: /^(5[0-3]|[0-4]?\d)/,
	hour23h: /^(2[0-3]|[0-1]?\d)/,
	hour24h: /^(2[0-4]|[0-1]?\d)/,
	hour11h: /^(1[0-1]|0?\d)/,
	hour12h: /^(1[0-2]|0?\d)/,
	minute: /^[0-5]?\d/,
	second: /^[0-5]?\d/,
	singleDigit: /^\d/,
	twoDigits: /^\d{1,2}/,
	threeDigits: /^\d{1,3}/,
	fourDigits: /^\d{1,4}/,
	anyDigitsSigned: /^-?\d+/,
	singleDigitSigned: /^-?\d/,
	twoDigitsSigned: /^-?\d{1,2}/,
	threeDigitsSigned: /^-?\d{1,3}/,
	fourDigitsSigned: /^-?\d{1,4}/
};
var timezonePatterns = {
	basicOptionalMinutes: /^([+-])(\d{2})(\d{2})?|Z/,
	basic: /^([+-])(\d{2})(\d{2})|Z/,
	basicOptionalSeconds: /^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,
	extended: /^([+-])(\d{2}):(\d{2})|Z/,
	extendedOptionalSeconds: /^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/utils.js
function mapValue(parseFnResult, mapFn) {
	if (!parseFnResult) return parseFnResult;
	return {
		value: mapFn(parseFnResult.value),
		rest: parseFnResult.rest
	};
}
function parseNumericPattern(pattern, dateString) {
	const matchResult = dateString.match(pattern);
	if (!matchResult) return null;
	return {
		value: parseInt(matchResult[0], 10),
		rest: dateString.slice(matchResult[0].length)
	};
}
function parseTimezonePattern(pattern, dateString) {
	const matchResult = dateString.match(pattern);
	if (!matchResult) return null;
	if (matchResult[0] === "Z") return {
		value: 0,
		rest: dateString.slice(1)
	};
	const sign = matchResult[1] === "+" ? 1 : -1;
	const hours = matchResult[2] ? parseInt(matchResult[2], 10) : 0;
	const minutes = matchResult[3] ? parseInt(matchResult[3], 10) : 0;
	const seconds = matchResult[5] ? parseInt(matchResult[5], 10) : 0;
	return {
		value: sign * (hours * millisecondsInHour + minutes * millisecondsInMinute + seconds * millisecondsInSecond),
		rest: dateString.slice(matchResult[0].length)
	};
}
function parseAnyDigitsSigned(dateString) {
	return parseNumericPattern(numericPatterns.anyDigitsSigned, dateString);
}
function parseNDigits(n, dateString) {
	switch (n) {
		case 1: return parseNumericPattern(numericPatterns.singleDigit, dateString);
		case 2: return parseNumericPattern(numericPatterns.twoDigits, dateString);
		case 3: return parseNumericPattern(numericPatterns.threeDigits, dateString);
		case 4: return parseNumericPattern(numericPatterns.fourDigits, dateString);
		default: return parseNumericPattern(new RegExp("^\\d{1," + n + "}"), dateString);
	}
}
function parseNDigitsSigned(n, dateString) {
	switch (n) {
		case 1: return parseNumericPattern(numericPatterns.singleDigitSigned, dateString);
		case 2: return parseNumericPattern(numericPatterns.twoDigitsSigned, dateString);
		case 3: return parseNumericPattern(numericPatterns.threeDigitsSigned, dateString);
		case 4: return parseNumericPattern(numericPatterns.fourDigitsSigned, dateString);
		default: return parseNumericPattern(new RegExp("^-?\\d{1," + n + "}"), dateString);
	}
}
function dayPeriodEnumToHours(dayPeriod) {
	switch (dayPeriod) {
		case "morning": return 4;
		case "evening": return 17;
		case "pm":
		case "noon":
		case "afternoon": return 12;
		default: return 0;
	}
}
function normalizeTwoDigitYear(twoDigitYear, currentYear) {
	const isCommonEra = currentYear > 0;
	const absCurrentYear = isCommonEra ? currentYear : 1 - currentYear;
	let result;
	if (absCurrentYear <= 50) result = twoDigitYear || 100;
	else {
		const rangeEnd = absCurrentYear + 50;
		const rangeEndCentury = Math.trunc(rangeEnd / 100) * 100;
		const isPreviousCentury = twoDigitYear >= rangeEnd % 100;
		result = twoDigitYear + rangeEndCentury - (isPreviousCentury ? 100 : 0);
	}
	return isCommonEra ? result : 1 - result;
}
function isLeapYearIndex$1(year) {
	return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;
}
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/YearParser.js
var YearParser = class extends Parser$1 {
	priority = 130;
	incompatibleTokens = [
		"Y",
		"R",
		"u",
		"w",
		"I",
		"i",
		"e",
		"c",
		"t",
		"T"
	];
	parse(dateString, token, match) {
		const valueCallback = (year) => ({
			year,
			isTwoDigitYear: token === "yy"
		});
		switch (token) {
			case "y": return mapValue(parseNDigits(4, dateString), valueCallback);
			case "yo": return mapValue(match.ordinalNumber(dateString, { unit: "year" }), valueCallback);
			default: return mapValue(parseNDigits(token.length, dateString), valueCallback);
		}
	}
	validate(_date, value) {
		return value.isTwoDigitYear || value.year > 0;
	}
	set(date, flags, value) {
		const currentYear = date.getFullYear();
		if (value.isTwoDigitYear) {
			const normalizedTwoDigitYear = normalizeTwoDigitYear(value.year, currentYear);
			date.setFullYear(normalizedTwoDigitYear, 0, 1);
			date.setHours(0, 0, 0, 0);
			return date;
		}
		const year = !("era" in flags) || flags.era === 1 ? value.year : 1 - value.year;
		date.setFullYear(year, 0, 1);
		date.setHours(0, 0, 0, 0);
		return date;
	}
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js
var LocalWeekYearParser = class extends Parser$1 {
	priority = 130;
	parse(dateString, token, match) {
		const valueCallback = (year) => ({
			year,
			isTwoDigitYear: token === "YY"
		});
		switch (token) {
			case "Y": return mapValue(parseNDigits(4, dateString), valueCallback);
			case "Yo": return mapValue(match.ordinalNumber(dateString, { unit: "year" }), valueCallback);
			default: return mapValue(parseNDigits(token.length, dateString), valueCallback);
		}
	}
	validate(_date, value) {
		return value.isTwoDigitYear || value.year > 0;
	}
	set(date, flags, value, options) {
		const currentYear = getWeekYear(date, options);
		if (value.isTwoDigitYear) {
			const normalizedTwoDigitYear = normalizeTwoDigitYear(value.year, currentYear);
			date.setFullYear(normalizedTwoDigitYear, 0, options.firstWeekContainsDate);
			date.setHours(0, 0, 0, 0);
			return startOfWeek(date, options);
		}
		const year = !("era" in flags) || flags.era === 1 ? value.year : 1 - value.year;
		date.setFullYear(year, 0, options.firstWeekContainsDate);
		date.setHours(0, 0, 0, 0);
		return startOfWeek(date, options);
	}
	incompatibleTokens = [
		"y",
		"R",
		"u",
		"Q",
		"q",
		"M",
		"L",
		"I",
		"d",
		"D",
		"i",
		"t",
		"T"
	];
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js
var ISOWeekYearParser = class extends Parser$1 {
	priority = 130;
	parse(dateString, token) {
		if (token === "R") return parseNDigitsSigned(4, dateString);
		return parseNDigitsSigned(token.length, dateString);
	}
	set(date, _flags, value) {
		const firstWeekOfYear = constructFrom(date, 0);
		firstWeekOfYear.setFullYear(value, 0, 4);
		firstWeekOfYear.setHours(0, 0, 0, 0);
		return startOfISOWeek(firstWeekOfYear);
	}
	incompatibleTokens = [
		"G",
		"y",
		"Y",
		"u",
		"Q",
		"q",
		"M",
		"L",
		"w",
		"d",
		"D",
		"e",
		"c",
		"t",
		"T"
	];
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js
var ExtendedYearParser = class extends Parser$1 {
	priority = 130;
	parse(dateString, token) {
		if (token === "u") return parseNDigitsSigned(4, dateString);
		return parseNDigitsSigned(token.length, dateString);
	}
	set(date, _flags, value) {
		date.setFullYear(value, 0, 1);
		date.setHours(0, 0, 0, 0);
		return date;
	}
	incompatibleTokens = [
		"G",
		"y",
		"Y",
		"R",
		"w",
		"I",
		"i",
		"e",
		"c",
		"t",
		"T"
	];
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/QuarterParser.js
var QuarterParser = class extends Parser$1 {
	priority = 120;
	parse(dateString, token, match) {
		switch (token) {
			case "Q":
			case "QQ": return parseNDigits(token.length, dateString);
			case "Qo": return match.ordinalNumber(dateString, { unit: "quarter" });
			case "QQQ": return match.quarter(dateString, {
				width: "abbreviated",
				context: "formatting"
			}) || match.quarter(dateString, {
				width: "narrow",
				context: "formatting"
			});
			case "QQQQQ": return match.quarter(dateString, {
				width: "narrow",
				context: "formatting"
			});
			default: return match.quarter(dateString, {
				width: "wide",
				context: "formatting"
			}) || match.quarter(dateString, {
				width: "abbreviated",
				context: "formatting"
			}) || match.quarter(dateString, {
				width: "narrow",
				context: "formatting"
			});
		}
	}
	validate(_date, value) {
		return value >= 1 && value <= 4;
	}
	set(date, _flags, value) {
		date.setMonth((value - 1) * 3, 1);
		date.setHours(0, 0, 0, 0);
		return date;
	}
	incompatibleTokens = [
		"Y",
		"R",
		"q",
		"M",
		"L",
		"w",
		"I",
		"d",
		"D",
		"i",
		"e",
		"c",
		"t",
		"T"
	];
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js
var StandAloneQuarterParser = class extends Parser$1 {
	priority = 120;
	parse(dateString, token, match) {
		switch (token) {
			case "q":
			case "qq": return parseNDigits(token.length, dateString);
			case "qo": return match.ordinalNumber(dateString, { unit: "quarter" });
			case "qqq": return match.quarter(dateString, {
				width: "abbreviated",
				context: "standalone"
			}) || match.quarter(dateString, {
				width: "narrow",
				context: "standalone"
			});
			case "qqqqq": return match.quarter(dateString, {
				width: "narrow",
				context: "standalone"
			});
			default: return match.quarter(dateString, {
				width: "wide",
				context: "standalone"
			}) || match.quarter(dateString, {
				width: "abbreviated",
				context: "standalone"
			}) || match.quarter(dateString, {
				width: "narrow",
				context: "standalone"
			});
		}
	}
	validate(_date, value) {
		return value >= 1 && value <= 4;
	}
	set(date, _flags, value) {
		date.setMonth((value - 1) * 3, 1);
		date.setHours(0, 0, 0, 0);
		return date;
	}
	incompatibleTokens = [
		"Y",
		"R",
		"Q",
		"M",
		"L",
		"w",
		"I",
		"d",
		"D",
		"i",
		"e",
		"c",
		"t",
		"T"
	];
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/MonthParser.js
var MonthParser = class extends Parser$1 {
	incompatibleTokens = [
		"Y",
		"R",
		"q",
		"Q",
		"L",
		"w",
		"I",
		"D",
		"i",
		"e",
		"c",
		"t",
		"T"
	];
	priority = 110;
	parse(dateString, token, match) {
		const valueCallback = (value) => value - 1;
		switch (token) {
			case "M": return mapValue(parseNumericPattern(numericPatterns.month, dateString), valueCallback);
			case "MM": return mapValue(parseNDigits(2, dateString), valueCallback);
			case "Mo": return mapValue(match.ordinalNumber(dateString, { unit: "month" }), valueCallback);
			case "MMM": return match.month(dateString, {
				width: "abbreviated",
				context: "formatting"
			}) || match.month(dateString, {
				width: "narrow",
				context: "formatting"
			});
			case "MMMMM": return match.month(dateString, {
				width: "narrow",
				context: "formatting"
			});
			default: return match.month(dateString, {
				width: "wide",
				context: "formatting"
			}) || match.month(dateString, {
				width: "abbreviated",
				context: "formatting"
			}) || match.month(dateString, {
				width: "narrow",
				context: "formatting"
			});
		}
	}
	validate(_date, value) {
		return value >= 0 && value <= 11;
	}
	set(date, _flags, value) {
		date.setMonth(value, 1);
		date.setHours(0, 0, 0, 0);
		return date;
	}
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js
var StandAloneMonthParser = class extends Parser$1 {
	priority = 110;
	parse(dateString, token, match) {
		const valueCallback = (value) => value - 1;
		switch (token) {
			case "L": return mapValue(parseNumericPattern(numericPatterns.month, dateString), valueCallback);
			case "LL": return mapValue(parseNDigits(2, dateString), valueCallback);
			case "Lo": return mapValue(match.ordinalNumber(dateString, { unit: "month" }), valueCallback);
			case "LLL": return match.month(dateString, {
				width: "abbreviated",
				context: "standalone"
			}) || match.month(dateString, {
				width: "narrow",
				context: "standalone"
			});
			case "LLLLL": return match.month(dateString, {
				width: "narrow",
				context: "standalone"
			});
			default: return match.month(dateString, {
				width: "wide",
				context: "standalone"
			}) || match.month(dateString, {
				width: "abbreviated",
				context: "standalone"
			}) || match.month(dateString, {
				width: "narrow",
				context: "standalone"
			});
		}
	}
	validate(_date, value) {
		return value >= 0 && value <= 11;
	}
	set(date, _flags, value) {
		date.setMonth(value, 1);
		date.setHours(0, 0, 0, 0);
		return date;
	}
	incompatibleTokens = [
		"Y",
		"R",
		"q",
		"Q",
		"M",
		"w",
		"I",
		"D",
		"i",
		"e",
		"c",
		"t",
		"T"
	];
};
//#endregion
//#region ../../node_modules/date-fns/setWeek.js
/**
* The {@link setWeek} function options.
*/
/**
* @name setWeek
* @category Week Helpers
* @summary Set the local week to the given date.
*
* @description
* Set the local week to the given date, saving the weekday number.
* The exact calculation depends on the values of
* `options.weekStartsOn` (which is the index of the first day of the week)
* and `options.firstWeekContainsDate` (which is the day of January, which is always in
* the first week of the week-numbering year)
*
* Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param week - The week of the new date
* @param options - An object with options
*
* @returns The new date with the local week set
*
* @example
* // Set the 1st week to 2 January 2005 with default options:
* const result = setWeek(new Date(2005, 0, 2), 1)
* //=> Sun Dec 26 2004 00:00:00
*
* @example
* // Set the 1st week to 2 January 2005,
* // if Monday is the first day of the week,
* // and the first week of the year always contains 4 January:
* const result = setWeek(new Date(2005, 0, 2), 1, {
*   weekStartsOn: 1,
*   firstWeekContainsDate: 4
* })
* //=> Sun Jan 4 2004 00:00:00
*/
function setWeek(date, week, options) {
	const date_ = toDate$1(date, options?.in);
	const diff = getWeek(date_, options) - week;
	date_.setDate(date_.getDate() - diff * 7);
	return toDate$1(date_, options?.in);
}
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js
var LocalWeekParser = class extends Parser$1 {
	priority = 100;
	parse(dateString, token, match) {
		switch (token) {
			case "w": return parseNumericPattern(numericPatterns.week, dateString);
			case "wo": return match.ordinalNumber(dateString, { unit: "week" });
			default: return parseNDigits(token.length, dateString);
		}
	}
	validate(_date, value) {
		return value >= 1 && value <= 53;
	}
	set(date, _flags, value, options) {
		return startOfWeek(setWeek(date, value, options), options);
	}
	incompatibleTokens = [
		"y",
		"R",
		"u",
		"q",
		"Q",
		"M",
		"L",
		"I",
		"d",
		"D",
		"i",
		"t",
		"T"
	];
};
//#endregion
//#region ../../node_modules/date-fns/setISOWeek.js
/**
* The {@link setISOWeek} function options.
*/
/**
* @name setISOWeek
* @category ISO Week Helpers
* @summary Set the ISO week to the given date.
*
* @description
* Set the ISO week to the given date, saving the weekday number.
*
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The `Date` type of the context function.
*
* @param date - The date to be changed
* @param week - The ISO week of the new date
* @param options - An object with options
*
* @returns The new date with the ISO week set
*
* @example
* // Set the 53rd ISO week to 7 August 2004:
* const result = setISOWeek(new Date(2004, 7, 7), 53)
* //=> Sat Jan 01 2005 00:00:00
*/
function setISOWeek(date, week, options) {
	const _date = toDate$1(date, options?.in);
	const diff = getISOWeek(_date, options) - week;
	_date.setDate(_date.getDate() - diff * 7);
	return _date;
}
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js
var ISOWeekParser = class extends Parser$1 {
	priority = 100;
	parse(dateString, token, match) {
		switch (token) {
			case "I": return parseNumericPattern(numericPatterns.week, dateString);
			case "Io": return match.ordinalNumber(dateString, { unit: "week" });
			default: return parseNDigits(token.length, dateString);
		}
	}
	validate(_date, value) {
		return value >= 1 && value <= 53;
	}
	set(date, _flags, value) {
		return startOfISOWeek(setISOWeek(date, value));
	}
	incompatibleTokens = [
		"y",
		"Y",
		"u",
		"q",
		"Q",
		"M",
		"L",
		"w",
		"d",
		"D",
		"e",
		"c",
		"t",
		"T"
	];
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/DateParser.js
var DAYS_IN_MONTH = [
	31,
	28,
	31,
	30,
	31,
	30,
	31,
	31,
	30,
	31,
	30,
	31
];
var DAYS_IN_MONTH_LEAP_YEAR = [
	31,
	29,
	31,
	30,
	31,
	30,
	31,
	31,
	30,
	31,
	30,
	31
];
var DateParser = class extends Parser$1 {
	priority = 90;
	subPriority = 1;
	parse(dateString, token, match) {
		switch (token) {
			case "d": return parseNumericPattern(numericPatterns.date, dateString);
			case "do": return match.ordinalNumber(dateString, { unit: "date" });
			default: return parseNDigits(token.length, dateString);
		}
	}
	validate(date, value) {
		const isLeapYear = isLeapYearIndex$1(date.getFullYear());
		const month = date.getMonth();
		if (isLeapYear) return value >= 1 && value <= DAYS_IN_MONTH_LEAP_YEAR[month];
		else return value >= 1 && value <= DAYS_IN_MONTH[month];
	}
	set(date, _flags, value) {
		date.setDate(value);
		date.setHours(0, 0, 0, 0);
		return date;
	}
	incompatibleTokens = [
		"Y",
		"R",
		"q",
		"Q",
		"w",
		"I",
		"D",
		"i",
		"e",
		"c",
		"t",
		"T"
	];
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js
var DayOfYearParser = class extends Parser$1 {
	priority = 90;
	subpriority = 1;
	parse(dateString, token, match) {
		switch (token) {
			case "D":
			case "DD": return parseNumericPattern(numericPatterns.dayOfYear, dateString);
			case "Do": return match.ordinalNumber(dateString, { unit: "date" });
			default: return parseNDigits(token.length, dateString);
		}
	}
	validate(date, value) {
		if (isLeapYearIndex$1(date.getFullYear())) return value >= 1 && value <= 366;
		else return value >= 1 && value <= 365;
	}
	set(date, _flags, value) {
		date.setMonth(0, value);
		date.setHours(0, 0, 0, 0);
		return date;
	}
	incompatibleTokens = [
		"Y",
		"R",
		"q",
		"Q",
		"M",
		"L",
		"w",
		"I",
		"d",
		"E",
		"i",
		"e",
		"c",
		"t",
		"T"
	];
};
//#endregion
//#region ../../node_modules/date-fns/setDay.js
/**
* The {@link setDay} function options.
*/
/**
* @name setDay
* @category Weekday Helpers
* @summary Set the day of the week to the given date.
*
* @description
* Set the day of the week to the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param day - The day of the week of the new date
* @param options - An object with options.
*
* @returns The new date with the day of the week set
*
* @example
* // Set week day to Sunday, with the default weekStartsOn of Sunday:
* const result = setDay(new Date(2014, 8, 1), 0)
* //=> Sun Aug 31 2014 00:00:00
*
* @example
* // Set week day to Sunday, with a weekStartsOn of Monday:
* const result = setDay(new Date(2014, 8, 1), 0, { weekStartsOn: 1 })
* //=> Sun Sep 07 2014 00:00:00
*/
function setDay(date, day, options) {
	const defaultOptions = getDefaultOptions$1();
	const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions.weekStartsOn ?? defaultOptions.locale?.options?.weekStartsOn ?? 0;
	const date_ = toDate$1(date, options?.in);
	const currentDay = date_.getDay();
	const dayIndex = (day % 7 + 7) % 7;
	const delta = 7 - weekStartsOn;
	return addDays$1(date_, day < 0 || day > 6 ? day - (currentDay + delta) % 7 : (dayIndex + delta) % 7 - (currentDay + delta) % 7, options);
}
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/DayParser.js
var DayParser = class extends Parser$1 {
	priority = 90;
	parse(dateString, token, match) {
		switch (token) {
			case "E":
			case "EE":
			case "EEE": return match.day(dateString, {
				width: "abbreviated",
				context: "formatting"
			}) || match.day(dateString, {
				width: "short",
				context: "formatting"
			}) || match.day(dateString, {
				width: "narrow",
				context: "formatting"
			});
			case "EEEEE": return match.day(dateString, {
				width: "narrow",
				context: "formatting"
			});
			case "EEEEEE": return match.day(dateString, {
				width: "short",
				context: "formatting"
			}) || match.day(dateString, {
				width: "narrow",
				context: "formatting"
			});
			default: return match.day(dateString, {
				width: "wide",
				context: "formatting"
			}) || match.day(dateString, {
				width: "abbreviated",
				context: "formatting"
			}) || match.day(dateString, {
				width: "short",
				context: "formatting"
			}) || match.day(dateString, {
				width: "narrow",
				context: "formatting"
			});
		}
	}
	validate(_date, value) {
		return value >= 0 && value <= 6;
	}
	set(date, _flags, value, options) {
		date = setDay(date, value, options);
		date.setHours(0, 0, 0, 0);
		return date;
	}
	incompatibleTokens = [
		"D",
		"i",
		"e",
		"c",
		"t",
		"T"
	];
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js
var LocalDayParser = class extends Parser$1 {
	priority = 90;
	parse(dateString, token, match, options) {
		const valueCallback = (value) => {
			const wholeWeekDays = Math.floor((value - 1) / 7) * 7;
			return (value + options.weekStartsOn + 6) % 7 + wholeWeekDays;
		};
		switch (token) {
			case "e":
			case "ee": return mapValue(parseNDigits(token.length, dateString), valueCallback);
			case "eo": return mapValue(match.ordinalNumber(dateString, { unit: "day" }), valueCallback);
			case "eee": return match.day(dateString, {
				width: "abbreviated",
				context: "formatting"
			}) || match.day(dateString, {
				width: "short",
				context: "formatting"
			}) || match.day(dateString, {
				width: "narrow",
				context: "formatting"
			});
			case "eeeee": return match.day(dateString, {
				width: "narrow",
				context: "formatting"
			});
			case "eeeeee": return match.day(dateString, {
				width: "short",
				context: "formatting"
			}) || match.day(dateString, {
				width: "narrow",
				context: "formatting"
			});
			default: return match.day(dateString, {
				width: "wide",
				context: "formatting"
			}) || match.day(dateString, {
				width: "abbreviated",
				context: "formatting"
			}) || match.day(dateString, {
				width: "short",
				context: "formatting"
			}) || match.day(dateString, {
				width: "narrow",
				context: "formatting"
			});
		}
	}
	validate(_date, value) {
		return value >= 0 && value <= 6;
	}
	set(date, _flags, value, options) {
		date = setDay(date, value, options);
		date.setHours(0, 0, 0, 0);
		return date;
	}
	incompatibleTokens = [
		"y",
		"R",
		"u",
		"q",
		"Q",
		"M",
		"L",
		"I",
		"d",
		"D",
		"E",
		"i",
		"c",
		"t",
		"T"
	];
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js
var StandAloneLocalDayParser = class extends Parser$1 {
	priority = 90;
	parse(dateString, token, match, options) {
		const valueCallback = (value) => {
			const wholeWeekDays = Math.floor((value - 1) / 7) * 7;
			return (value + options.weekStartsOn + 6) % 7 + wholeWeekDays;
		};
		switch (token) {
			case "c":
			case "cc": return mapValue(parseNDigits(token.length, dateString), valueCallback);
			case "co": return mapValue(match.ordinalNumber(dateString, { unit: "day" }), valueCallback);
			case "ccc": return match.day(dateString, {
				width: "abbreviated",
				context: "standalone"
			}) || match.day(dateString, {
				width: "short",
				context: "standalone"
			}) || match.day(dateString, {
				width: "narrow",
				context: "standalone"
			});
			case "ccccc": return match.day(dateString, {
				width: "narrow",
				context: "standalone"
			});
			case "cccccc": return match.day(dateString, {
				width: "short",
				context: "standalone"
			}) || match.day(dateString, {
				width: "narrow",
				context: "standalone"
			});
			default: return match.day(dateString, {
				width: "wide",
				context: "standalone"
			}) || match.day(dateString, {
				width: "abbreviated",
				context: "standalone"
			}) || match.day(dateString, {
				width: "short",
				context: "standalone"
			}) || match.day(dateString, {
				width: "narrow",
				context: "standalone"
			});
		}
	}
	validate(_date, value) {
		return value >= 0 && value <= 6;
	}
	set(date, _flags, value, options) {
		date = setDay(date, value, options);
		date.setHours(0, 0, 0, 0);
		return date;
	}
	incompatibleTokens = [
		"y",
		"R",
		"u",
		"q",
		"Q",
		"M",
		"L",
		"I",
		"d",
		"D",
		"E",
		"i",
		"e",
		"t",
		"T"
	];
};
//#endregion
//#region ../../node_modules/date-fns/setISODay.js
/**
* The {@link setISODay} function options.
*/
/**
* @name setISODay
* @category Weekday Helpers
* @summary Set the day of the ISO week to the given date.
*
* @description
* Set the day of the ISO week to the given date.
* ISO week starts with Monday.
* 7 is the index of Sunday, 1 is the index of Monday, etc.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param day - The day of the ISO week of the new date
* @param options - An object with options
*
* @returns The new date with the day of the ISO week set
*
* @example
* // Set Sunday to 1 September 2014:
* const result = setISODay(new Date(2014, 8, 1), 7)
* //=> Sun Sep 07 2014 00:00:00
*/
function setISODay(date, day, options) {
	const date_ = toDate$1(date, options?.in);
	return addDays$1(date_, day - getISODay(date_, options), options);
}
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/ISODayParser.js
var ISODayParser = class extends Parser$1 {
	priority = 90;
	parse(dateString, token, match) {
		const valueCallback = (value) => {
			if (value === 0) return 7;
			return value;
		};
		switch (token) {
			case "i":
			case "ii": return parseNDigits(token.length, dateString);
			case "io": return match.ordinalNumber(dateString, { unit: "day" });
			case "iii": return mapValue(match.day(dateString, {
				width: "abbreviated",
				context: "formatting"
			}) || match.day(dateString, {
				width: "short",
				context: "formatting"
			}) || match.day(dateString, {
				width: "narrow",
				context: "formatting"
			}), valueCallback);
			case "iiiii": return mapValue(match.day(dateString, {
				width: "narrow",
				context: "formatting"
			}), valueCallback);
			case "iiiiii": return mapValue(match.day(dateString, {
				width: "short",
				context: "formatting"
			}) || match.day(dateString, {
				width: "narrow",
				context: "formatting"
			}), valueCallback);
			default: return mapValue(match.day(dateString, {
				width: "wide",
				context: "formatting"
			}) || match.day(dateString, {
				width: "abbreviated",
				context: "formatting"
			}) || match.day(dateString, {
				width: "short",
				context: "formatting"
			}) || match.day(dateString, {
				width: "narrow",
				context: "formatting"
			}), valueCallback);
		}
	}
	validate(_date, value) {
		return value >= 1 && value <= 7;
	}
	set(date, _flags, value) {
		date = setISODay(date, value);
		date.setHours(0, 0, 0, 0);
		return date;
	}
	incompatibleTokens = [
		"y",
		"Y",
		"u",
		"q",
		"Q",
		"M",
		"L",
		"w",
		"d",
		"D",
		"E",
		"e",
		"c",
		"t",
		"T"
	];
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/AMPMParser.js
var AMPMParser = class extends Parser$1 {
	priority = 80;
	parse(dateString, token, match) {
		switch (token) {
			case "a":
			case "aa":
			case "aaa": return match.dayPeriod(dateString, {
				width: "abbreviated",
				context: "formatting"
			}) || match.dayPeriod(dateString, {
				width: "narrow",
				context: "formatting"
			});
			case "aaaaa": return match.dayPeriod(dateString, {
				width: "narrow",
				context: "formatting"
			});
			default: return match.dayPeriod(dateString, {
				width: "wide",
				context: "formatting"
			}) || match.dayPeriod(dateString, {
				width: "abbreviated",
				context: "formatting"
			}) || match.dayPeriod(dateString, {
				width: "narrow",
				context: "formatting"
			});
		}
	}
	set(date, _flags, value) {
		date.setHours(dayPeriodEnumToHours(value), 0, 0, 0);
		return date;
	}
	incompatibleTokens = [
		"b",
		"B",
		"H",
		"k",
		"t",
		"T"
	];
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js
var AMPMMidnightParser = class extends Parser$1 {
	priority = 80;
	parse(dateString, token, match) {
		switch (token) {
			case "b":
			case "bb":
			case "bbb": return match.dayPeriod(dateString, {
				width: "abbreviated",
				context: "formatting"
			}) || match.dayPeriod(dateString, {
				width: "narrow",
				context: "formatting"
			});
			case "bbbbb": return match.dayPeriod(dateString, {
				width: "narrow",
				context: "formatting"
			});
			default: return match.dayPeriod(dateString, {
				width: "wide",
				context: "formatting"
			}) || match.dayPeriod(dateString, {
				width: "abbreviated",
				context: "formatting"
			}) || match.dayPeriod(dateString, {
				width: "narrow",
				context: "formatting"
			});
		}
	}
	set(date, _flags, value) {
		date.setHours(dayPeriodEnumToHours(value), 0, 0, 0);
		return date;
	}
	incompatibleTokens = [
		"a",
		"B",
		"H",
		"k",
		"t",
		"T"
	];
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js
var DayPeriodParser = class extends Parser$1 {
	priority = 80;
	parse(dateString, token, match) {
		switch (token) {
			case "B":
			case "BB":
			case "BBB": return match.dayPeriod(dateString, {
				width: "abbreviated",
				context: "formatting"
			}) || match.dayPeriod(dateString, {
				width: "narrow",
				context: "formatting"
			});
			case "BBBBB": return match.dayPeriod(dateString, {
				width: "narrow",
				context: "formatting"
			});
			default: return match.dayPeriod(dateString, {
				width: "wide",
				context: "formatting"
			}) || match.dayPeriod(dateString, {
				width: "abbreviated",
				context: "formatting"
			}) || match.dayPeriod(dateString, {
				width: "narrow",
				context: "formatting"
			});
		}
	}
	set(date, _flags, value) {
		date.setHours(dayPeriodEnumToHours(value), 0, 0, 0);
		return date;
	}
	incompatibleTokens = [
		"a",
		"b",
		"t",
		"T"
	];
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js
var Hour1to12Parser = class extends Parser$1 {
	priority = 70;
	parse(dateString, token, match) {
		switch (token) {
			case "h": return parseNumericPattern(numericPatterns.hour12h, dateString);
			case "ho": return match.ordinalNumber(dateString, { unit: "hour" });
			default: return parseNDigits(token.length, dateString);
		}
	}
	validate(_date, value) {
		return value >= 1 && value <= 12;
	}
	set(date, _flags, value) {
		const isPM = date.getHours() >= 12;
		if (isPM && value < 12) date.setHours(value + 12, 0, 0, 0);
		else if (!isPM && value === 12) date.setHours(0, 0, 0, 0);
		else date.setHours(value, 0, 0, 0);
		return date;
	}
	incompatibleTokens = [
		"H",
		"K",
		"k",
		"t",
		"T"
	];
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js
var Hour0to23Parser = class extends Parser$1 {
	priority = 70;
	parse(dateString, token, match) {
		switch (token) {
			case "H": return parseNumericPattern(numericPatterns.hour23h, dateString);
			case "Ho": return match.ordinalNumber(dateString, { unit: "hour" });
			default: return parseNDigits(token.length, dateString);
		}
	}
	validate(_date, value) {
		return value >= 0 && value <= 23;
	}
	set(date, _flags, value) {
		date.setHours(value, 0, 0, 0);
		return date;
	}
	incompatibleTokens = [
		"a",
		"b",
		"h",
		"K",
		"k",
		"t",
		"T"
	];
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js
var Hour0To11Parser = class extends Parser$1 {
	priority = 70;
	parse(dateString, token, match) {
		switch (token) {
			case "K": return parseNumericPattern(numericPatterns.hour11h, dateString);
			case "Ko": return match.ordinalNumber(dateString, { unit: "hour" });
			default: return parseNDigits(token.length, dateString);
		}
	}
	validate(_date, value) {
		return value >= 0 && value <= 11;
	}
	set(date, _flags, value) {
		if (date.getHours() >= 12 && value < 12) date.setHours(value + 12, 0, 0, 0);
		else date.setHours(value, 0, 0, 0);
		return date;
	}
	incompatibleTokens = [
		"h",
		"H",
		"k",
		"t",
		"T"
	];
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js
var Hour1To24Parser = class extends Parser$1 {
	priority = 70;
	parse(dateString, token, match) {
		switch (token) {
			case "k": return parseNumericPattern(numericPatterns.hour24h, dateString);
			case "ko": return match.ordinalNumber(dateString, { unit: "hour" });
			default: return parseNDigits(token.length, dateString);
		}
	}
	validate(_date, value) {
		return value >= 1 && value <= 24;
	}
	set(date, _flags, value) {
		const hours = value <= 24 ? value % 24 : value;
		date.setHours(hours, 0, 0, 0);
		return date;
	}
	incompatibleTokens = [
		"a",
		"b",
		"h",
		"H",
		"K",
		"t",
		"T"
	];
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/MinuteParser.js
var MinuteParser = class extends Parser$1 {
	priority = 60;
	parse(dateString, token, match) {
		switch (token) {
			case "m": return parseNumericPattern(numericPatterns.minute, dateString);
			case "mo": return match.ordinalNumber(dateString, { unit: "minute" });
			default: return parseNDigits(token.length, dateString);
		}
	}
	validate(_date, value) {
		return value >= 0 && value <= 59;
	}
	set(date, _flags, value) {
		date.setMinutes(value, 0, 0);
		return date;
	}
	incompatibleTokens = ["t", "T"];
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/SecondParser.js
var SecondParser = class extends Parser$1 {
	priority = 50;
	parse(dateString, token, match) {
		switch (token) {
			case "s": return parseNumericPattern(numericPatterns.second, dateString);
			case "so": return match.ordinalNumber(dateString, { unit: "second" });
			default: return parseNDigits(token.length, dateString);
		}
	}
	validate(_date, value) {
		return value >= 0 && value <= 59;
	}
	set(date, _flags, value) {
		date.setSeconds(value, 0);
		return date;
	}
	incompatibleTokens = ["t", "T"];
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js
var FractionOfSecondParser = class extends Parser$1 {
	priority = 30;
	parse(dateString, token) {
		const valueCallback = (value) => Math.trunc(value * Math.pow(10, -token.length + 3));
		return mapValue(parseNDigits(token.length, dateString), valueCallback);
	}
	set(date, _flags, value) {
		date.setMilliseconds(value);
		return date;
	}
	incompatibleTokens = ["t", "T"];
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js
var ISOTimezoneWithZParser = class extends Parser$1 {
	priority = 10;
	parse(dateString, token) {
		switch (token) {
			case "X": return parseTimezonePattern(timezonePatterns.basicOptionalMinutes, dateString);
			case "XX": return parseTimezonePattern(timezonePatterns.basic, dateString);
			case "XXXX": return parseTimezonePattern(timezonePatterns.basicOptionalSeconds, dateString);
			case "XXXXX": return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds, dateString);
			default: return parseTimezonePattern(timezonePatterns.extended, dateString);
		}
	}
	set(date, flags, value) {
		if (flags.timestampIsSet) return date;
		return constructFrom(date, date.getTime() - getTimezoneOffsetInMilliseconds(date) - value);
	}
	incompatibleTokens = [
		"t",
		"T",
		"x"
	];
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js
var ISOTimezoneParser = class extends Parser$1 {
	priority = 10;
	parse(dateString, token) {
		switch (token) {
			case "x": return parseTimezonePattern(timezonePatterns.basicOptionalMinutes, dateString);
			case "xx": return parseTimezonePattern(timezonePatterns.basic, dateString);
			case "xxxx": return parseTimezonePattern(timezonePatterns.basicOptionalSeconds, dateString);
			case "xxxxx": return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds, dateString);
			default: return parseTimezonePattern(timezonePatterns.extended, dateString);
		}
	}
	set(date, flags, value) {
		if (flags.timestampIsSet) return date;
		return constructFrom(date, date.getTime() - getTimezoneOffsetInMilliseconds(date) - value);
	}
	incompatibleTokens = [
		"t",
		"T",
		"X"
	];
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js
var TimestampSecondsParser = class extends Parser$1 {
	priority = 40;
	parse(dateString) {
		return parseAnyDigitsSigned(dateString);
	}
	set(date, _flags, value) {
		return [constructFrom(date, value * 1e3), { timestampIsSet: true }];
	}
	incompatibleTokens = "*";
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js
var TimestampMillisecondsParser = class extends Parser$1 {
	priority = 20;
	parse(dateString) {
		return parseAnyDigitsSigned(dateString);
	}
	set(date, _flags, value) {
		return [constructFrom(date, value), { timestampIsSet: true }];
	}
	incompatibleTokens = "*";
};
//#endregion
//#region ../../node_modules/date-fns/parse/_lib/parsers.js
var parsers = {
	G: new EraParser(),
	y: new YearParser(),
	Y: new LocalWeekYearParser(),
	R: new ISOWeekYearParser(),
	u: new ExtendedYearParser(),
	Q: new QuarterParser(),
	q: new StandAloneQuarterParser(),
	M: new MonthParser(),
	L: new StandAloneMonthParser(),
	w: new LocalWeekParser(),
	I: new ISOWeekParser(),
	d: new DateParser(),
	D: new DayOfYearParser(),
	E: new DayParser(),
	e: new LocalDayParser(),
	c: new StandAloneLocalDayParser(),
	i: new ISODayParser(),
	a: new AMPMParser(),
	b: new AMPMMidnightParser(),
	B: new DayPeriodParser(),
	h: new Hour1to12Parser(),
	H: new Hour0to23Parser(),
	K: new Hour0To11Parser(),
	k: new Hour1To24Parser(),
	m: new MinuteParser(),
	s: new SecondParser(),
	S: new FractionOfSecondParser(),
	X: new ISOTimezoneWithZParser(),
	x: new ISOTimezoneParser(),
	t: new TimestampSecondsParser(),
	T: new TimestampMillisecondsParser()
};
//#endregion
//#region ../../node_modules/date-fns/parse.js
/**
* The {@link parse} function options.
*/
var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
var escapedStringRegExp = /^'([^]*?)'?$/;
var doubleQuoteRegExp = /''/g;
var notWhitespaceRegExp = /\S/;
var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
/**
* @name parse
* @category Common Helpers
* @summary Parse the date.
*
* @description
* Return the date parsed from string using the given format string.
*
* > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.
* > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* The characters in the format string wrapped between two single quotes characters (') are escaped.
* Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.
*
* Format of the format string is based on Unicode Technical Standard #35:
* https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
* with a few additions (see note 5 below the table).
*
* Not all tokens are compatible. Combinations that don't make sense or could lead to bugs are prohibited
* and will throw `RangeError`. For example usage of 24-hour format token with AM/PM token will throw an exception:
*
* ```javascript
* parse('23 AM', 'HH a', new Date())
* //=> RangeError: The format string mustn't contain `HH` and `a` at the same time
* ```
*
* See the compatibility table: https://docs.google.com/spreadsheets/d/e/2PACX-1vQOPU3xUhplll6dyoMmVUXHKl_8CRDs6_ueLmex3SoqwhuolkuN3O05l4rqx5h1dKX8eb46Ul-CCSrq/pubhtml?gid=0&single=true
*
* Accepted format string patterns:
* | Unit                            |Prior| Pattern | Result examples                   | Notes |
* |---------------------------------|-----|---------|-----------------------------------|-------|
* | Era                             | 140 | G..GGG  | AD, BC                            |       |
* |                                 |     | GGGG    | Anno Domini, Before Christ        | 2     |
* |                                 |     | GGGGG   | A, B                              |       |
* | Calendar year                   | 130 | y       | 44, 1, 1900, 2017, 9999           | 4     |
* |                                 |     | yo      | 44th, 1st, 1900th, 9999999th      | 4,5   |
* |                                 |     | yy      | 44, 01, 00, 17                    | 4     |
* |                                 |     | yyy     | 044, 001, 123, 999                | 4     |
* |                                 |     | yyyy    | 0044, 0001, 1900, 2017            | 4     |
* |                                 |     | yyyyy   | ...                               | 2,4   |
* | Local week-numbering year       | 130 | Y       | 44, 1, 1900, 2017, 9000           | 4     |
* |                                 |     | Yo      | 44th, 1st, 1900th, 9999999th      | 4,5   |
* |                                 |     | YY      | 44, 01, 00, 17                    | 4,6   |
* |                                 |     | YYY     | 044, 001, 123, 999                | 4     |
* |                                 |     | YYYY    | 0044, 0001, 1900, 2017            | 4,6   |
* |                                 |     | YYYYY   | ...                               | 2,4   |
* | ISO week-numbering year         | 130 | R       | -43, 1, 1900, 2017, 9999, -9999   | 4,5   |
* |                                 |     | RR      | -43, 01, 00, 17                   | 4,5   |
* |                                 |     | RRR     | -043, 001, 123, 999, -999         | 4,5   |
* |                                 |     | RRRR    | -0043, 0001, 2017, 9999, -9999    | 4,5   |
* |                                 |     | RRRRR   | ...                               | 2,4,5 |
* | Extended year                   | 130 | u       | -43, 1, 1900, 2017, 9999, -999    | 4     |
* |                                 |     | uu      | -43, 01, 99, -99                  | 4     |
* |                                 |     | uuu     | -043, 001, 123, 999, -999         | 4     |
* |                                 |     | uuuu    | -0043, 0001, 2017, 9999, -9999    | 4     |
* |                                 |     | uuuuu   | ...                               | 2,4   |
* | Quarter (formatting)            | 120 | Q       | 1, 2, 3, 4                        |       |
* |                                 |     | Qo      | 1st, 2nd, 3rd, 4th                | 5     |
* |                                 |     | QQ      | 01, 02, 03, 04                    |       |
* |                                 |     | QQQ     | Q1, Q2, Q3, Q4                    |       |
* |                                 |     | QQQQ    | 1st quarter, 2nd quarter, ...     | 2     |
* |                                 |     | QQQQQ   | 1, 2, 3, 4                        | 4     |
* | Quarter (stand-alone)           | 120 | q       | 1, 2, 3, 4                        |       |
* |                                 |     | qo      | 1st, 2nd, 3rd, 4th                | 5     |
* |                                 |     | qq      | 01, 02, 03, 04                    |       |
* |                                 |     | qqq     | Q1, Q2, Q3, Q4                    |       |
* |                                 |     | qqqq    | 1st quarter, 2nd quarter, ...     | 2     |
* |                                 |     | qqqqq   | 1, 2, 3, 4                        | 3     |
* | Month (formatting)              | 110 | M       | 1, 2, ..., 12                     |       |
* |                                 |     | Mo      | 1st, 2nd, ..., 12th               | 5     |
* |                                 |     | MM      | 01, 02, ..., 12                   |       |
* |                                 |     | MMM     | Jan, Feb, ..., Dec                |       |
* |                                 |     | MMMM    | January, February, ..., December  | 2     |
* |                                 |     | MMMMM   | J, F, ..., D                      |       |
* | Month (stand-alone)             | 110 | L       | 1, 2, ..., 12                     |       |
* |                                 |     | Lo      | 1st, 2nd, ..., 12th               | 5     |
* |                                 |     | LL      | 01, 02, ..., 12                   |       |
* |                                 |     | LLL     | Jan, Feb, ..., Dec                |       |
* |                                 |     | LLLL    | January, February, ..., December  | 2     |
* |                                 |     | LLLLL   | J, F, ..., D                      |       |
* | Local week of year              | 100 | w       | 1, 2, ..., 53                     |       |
* |                                 |     | wo      | 1st, 2nd, ..., 53th               | 5     |
* |                                 |     | ww      | 01, 02, ..., 53                   |       |
* | ISO week of year                | 100 | I       | 1, 2, ..., 53                     | 5     |
* |                                 |     | Io      | 1st, 2nd, ..., 53th               | 5     |
* |                                 |     | II      | 01, 02, ..., 53                   | 5     |
* | Day of month                    |  90 | d       | 1, 2, ..., 31                     |       |
* |                                 |     | do      | 1st, 2nd, ..., 31st               | 5     |
* |                                 |     | dd      | 01, 02, ..., 31                   |       |
* | Day of year                     |  90 | D       | 1, 2, ..., 365, 366               | 7     |
* |                                 |     | Do      | 1st, 2nd, ..., 365th, 366th       | 5     |
* |                                 |     | DD      | 01, 02, ..., 365, 366             | 7     |
* |                                 |     | DDD     | 001, 002, ..., 365, 366           |       |
* |                                 |     | DDDD    | ...                               | 2     |
* | Day of week (formatting)        |  90 | E..EEE  | Mon, Tue, Wed, ..., Sun           |       |
* |                                 |     | EEEE    | Monday, Tuesday, ..., Sunday      | 2     |
* |                                 |     | EEEEE   | M, T, W, T, F, S, S               |       |
* |                                 |     | EEEEEE  | Mo, Tu, We, Th, Fr, Sa, Su        |       |
* | ISO day of week (formatting)    |  90 | i       | 1, 2, 3, ..., 7                   | 5     |
* |                                 |     | io      | 1st, 2nd, ..., 7th                | 5     |
* |                                 |     | ii      | 01, 02, ..., 07                   | 5     |
* |                                 |     | iii     | Mon, Tue, Wed, ..., Sun           | 5     |
* |                                 |     | iiii    | Monday, Tuesday, ..., Sunday      | 2,5   |
* |                                 |     | iiiii   | M, T, W, T, F, S, S               | 5     |
* |                                 |     | iiiiii  | Mo, Tu, We, Th, Fr, Sa, Su        | 5     |
* | Local day of week (formatting)  |  90 | e       | 2, 3, 4, ..., 1                   |       |
* |                                 |     | eo      | 2nd, 3rd, ..., 1st                | 5     |
* |                                 |     | ee      | 02, 03, ..., 01                   |       |
* |                                 |     | eee     | Mon, Tue, Wed, ..., Sun           |       |
* |                                 |     | eeee    | Monday, Tuesday, ..., Sunday      | 2     |
* |                                 |     | eeeee   | M, T, W, T, F, S, S               |       |
* |                                 |     | eeeeee  | Mo, Tu, We, Th, Fr, Sa, Su        |       |
* | Local day of week (stand-alone) |  90 | c       | 2, 3, 4, ..., 1                   |       |
* |                                 |     | co      | 2nd, 3rd, ..., 1st                | 5     |
* |                                 |     | cc      | 02, 03, ..., 01                   |       |
* |                                 |     | ccc     | Mon, Tue, Wed, ..., Sun           |       |
* |                                 |     | cccc    | Monday, Tuesday, ..., Sunday      | 2     |
* |                                 |     | ccccc   | M, T, W, T, F, S, S               |       |
* |                                 |     | cccccc  | Mo, Tu, We, Th, Fr, Sa, Su        |       |
* | AM, PM                          |  80 | a..aaa  | AM, PM                            |       |
* |                                 |     | aaaa    | a.m., p.m.                        | 2     |
* |                                 |     | aaaaa   | a, p                              |       |
* | AM, PM, noon, midnight          |  80 | b..bbb  | AM, PM, noon, midnight            |       |
* |                                 |     | bbbb    | a.m., p.m., noon, midnight        | 2     |
* |                                 |     | bbbbb   | a, p, n, mi                       |       |
* | Flexible day period             |  80 | B..BBB  | at night, in the morning, ...     |       |
* |                                 |     | BBBB    | at night, in the morning, ...     | 2     |
* |                                 |     | BBBBB   | at night, in the morning, ...     |       |
* | Hour [1-12]                     |  70 | h       | 1, 2, ..., 11, 12                 |       |
* |                                 |     | ho      | 1st, 2nd, ..., 11th, 12th         | 5     |
* |                                 |     | hh      | 01, 02, ..., 11, 12               |       |
* | Hour [0-23]                     |  70 | H       | 0, 1, 2, ..., 23                  |       |
* |                                 |     | Ho      | 0th, 1st, 2nd, ..., 23rd          | 5     |
* |                                 |     | HH      | 00, 01, 02, ..., 23               |       |
* | Hour [0-11]                     |  70 | K       | 1, 2, ..., 11, 0                  |       |
* |                                 |     | Ko      | 1st, 2nd, ..., 11th, 0th          | 5     |
* |                                 |     | KK      | 01, 02, ..., 11, 00               |       |
* | Hour [1-24]                     |  70 | k       | 24, 1, 2, ..., 23                 |       |
* |                                 |     | ko      | 24th, 1st, 2nd, ..., 23rd         | 5     |
* |                                 |     | kk      | 24, 01, 02, ..., 23               |       |
* | Minute                          |  60 | m       | 0, 1, ..., 59                     |       |
* |                                 |     | mo      | 0th, 1st, ..., 59th               | 5     |
* |                                 |     | mm      | 00, 01, ..., 59                   |       |
* | Second                          |  50 | s       | 0, 1, ..., 59                     |       |
* |                                 |     | so      | 0th, 1st, ..., 59th               | 5     |
* |                                 |     | ss      | 00, 01, ..., 59                   |       |
* | Seconds timestamp               |  40 | t       | 512969520                         |       |
* |                                 |     | tt      | ...                               | 2     |
* | Fraction of second              |  30 | S       | 0, 1, ..., 9                      |       |
* |                                 |     | SS      | 00, 01, ..., 99                   |       |
* |                                 |     | SSS     | 000, 001, ..., 999                |       |
* |                                 |     | SSSS    | ...                               | 2     |
* | Milliseconds timestamp          |  20 | T       | 512969520900                      |       |
* |                                 |     | TT      | ...                               | 2     |
* | Timezone (ISO-8601 w/ Z)        |  10 | X       | -08, +0530, Z                     |       |
* |                                 |     | XX      | -0800, +0530, Z                   |       |
* |                                 |     | XXX     | -08:00, +05:30, Z                 |       |
* |                                 |     | XXXX    | -0800, +0530, Z, +123456          | 2     |
* |                                 |     | XXXXX   | -08:00, +05:30, Z, +12:34:56      |       |
* | Timezone (ISO-8601 w/o Z)       |  10 | x       | -08, +0530, +00                   |       |
* |                                 |     | xx      | -0800, +0530, +0000               |       |
* |                                 |     | xxx     | -08:00, +05:30, +00:00            | 2     |
* |                                 |     | xxxx    | -0800, +0530, +0000, +123456      |       |
* |                                 |     | xxxxx   | -08:00, +05:30, +00:00, +12:34:56 |       |
* | Long localized date             |  NA | P       | 05/29/1453                        | 5,8   |
* |                                 |     | PP      | May 29, 1453                      |       |
* |                                 |     | PPP     | May 29th, 1453                    |       |
* |                                 |     | PPPP    | Sunday, May 29th, 1453            | 2,5,8 |
* | Long localized time             |  NA | p       | 12:00 AM                          | 5,8   |
* |                                 |     | pp      | 12:00:00 AM                       |       |
* | Combination of date and time    |  NA | Pp      | 05/29/1453, 12:00 AM              |       |
* |                                 |     | PPpp    | May 29, 1453, 12:00:00 AM         |       |
* |                                 |     | PPPpp   | May 29th, 1453 at ...             |       |
* |                                 |     | PPPPpp  | Sunday, May 29th, 1453 at ...     | 2,5,8 |
* Notes:
* 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
*    are the same as "stand-alone" units, but are different in some languages.
*    "Formatting" units are declined according to the rules of the language
*    in the context of a date. "Stand-alone" units are always nominative singular.
*    In `format` function, they will produce different result:
*
*    `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`
*
*    `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
*
*    `parse` will try to match both formatting and stand-alone units interchangeably.
*
* 2. Any sequence of the identical letters is a pattern, unless it is escaped by
*    the single quote characters (see below).
*    If the sequence is longer than listed in table:
*    - for numerical units (`yyyyyyyy`) `parse` will try to match a number
*      as wide as the sequence
*    - for text units (`MMMMMMMM`) `parse` will try to match the widest variation of the unit.
*      These variations are marked with "2" in the last column of the table.
*
* 3. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.
*    These tokens represent the shortest form of the quarter.
*
* 4. The main difference between `y` and `u` patterns are B.C. years:
*
*    | Year | `y` | `u` |
*    |------|-----|-----|
*    | AC 1 |   1 |   1 |
*    | BC 1 |   1 |   0 |
*    | BC 2 |   2 |  -1 |
*
*    Also `yy` will try to guess the century of two digit year by proximity with `referenceDate`:
*
*    `parse('50', 'yy', new Date(2018, 0, 1)) //=> Sat Jan 01 2050 00:00:00`
*
*    `parse('75', 'yy', new Date(2018, 0, 1)) //=> Wed Jan 01 1975 00:00:00`
*
*    while `uu` will just assign the year as is:
*
*    `parse('50', 'uu', new Date(2018, 0, 1)) //=> Sat Jan 01 0050 00:00:00`
*
*    `parse('75', 'uu', new Date(2018, 0, 1)) //=> Tue Jan 01 0075 00:00:00`
*
*    The same difference is true for local and ISO week-numbering years (`Y` and `R`),
*    except local week-numbering years are dependent on `options.weekStartsOn`
*    and `options.firstWeekContainsDate` (compare [setISOWeekYear](https://date-fns.org/docs/setISOWeekYear)
*    and [setWeekYear](https://date-fns.org/docs/setWeekYear)).
*
* 5. These patterns are not in the Unicode Technical Standard #35:
*    - `i`: ISO day of week
*    - `I`: ISO week of year
*    - `R`: ISO week-numbering year
*    - `o`: ordinal number modifier
*    - `P`: long localized date
*    - `p`: long localized time
*
* 6. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
*    You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* 7. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
*    You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* 8. `P+` tokens do not have a defined priority since they are merely aliases to other tokens based
*    on the given locale.
*
*    using `en-US` locale: `P` => `MM/dd/yyyy`
*    using `en-US` locale: `p` => `hh:mm a`
*    using `pt-BR` locale: `P` => `dd/MM/yyyy`
*    using `pt-BR` locale: `p` => `HH:mm`
*
* Values will be assigned to the date in the descending order of its unit's priority.
* Units of an equal priority overwrite each other in the order of appearance.
*
* If no values of higher priority are parsed (e.g. when parsing string 'January 1st' without a year),
* the values will be taken from 3rd argument `referenceDate` which works as a context of parsing.
*
* `referenceDate` must be passed for correct work of the function.
* If you're not sure which `referenceDate` to supply, create a new instance of Date:
* `parse('02/11/2014', 'MM/dd/yyyy', new Date())`
* In this case parsing will be done in the context of the current date.
* If `referenceDate` is `Invalid Date` or a value not convertible to valid `Date`,
* then `Invalid Date` will be returned.
*
* The result may vary by locale.
*
* If `formatString` matches with `dateString` but does not provides tokens, `referenceDate` will be returned.
*
* If parsing failed, `Invalid Date` will be returned.
* Invalid Date is a Date, whose time value is NaN.
* Time value of Date: http://es5.github.io/#x15.9.1.1
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param dateStr - The string to parse
* @param formatStr - The string of tokens
* @param referenceDate - defines values missing from the parsed dateString
* @param options - An object with options.
*   see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*   see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* @returns The parsed date
*
* @throws `options.locale` must contain `match` property
* @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* @throws format string contains an unescaped latin alphabet character
*
* @example
* // Parse 11 February 2014 from middle-endian format:
* var result = parse('02/11/2014', 'MM/dd/yyyy', new Date())
* //=> Tue Feb 11 2014 00:00:00
*
* @example
* // Parse 28th of February in Esperanto locale in the context of 2010 year:
* import eo from 'date-fns/locale/eo'
* var result = parse('28-a de februaro', "do 'de' MMMM", new Date(2010, 0, 1), {
*   locale: eo
* })
* //=> Sun Feb 28 2010 00:00:00
*/
function parse$5(dateStr, formatStr, referenceDate, options) {
	const invalidDate = () => constructFrom(options?.in || referenceDate, NaN);
	const defaultOptions = getDefaultOptions();
	const locale = options?.locale ?? defaultOptions.locale ?? enUS;
	const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions.firstWeekContainsDate ?? defaultOptions.locale?.options?.firstWeekContainsDate ?? 1;
	const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions.weekStartsOn ?? defaultOptions.locale?.options?.weekStartsOn ?? 0;
	if (!formatStr) return dateStr ? invalidDate() : toDate$1(referenceDate, options?.in);
	const subFnOptions = {
		firstWeekContainsDate,
		weekStartsOn,
		locale
	};
	const setters = [new DateTimezoneSetter(options?.in, referenceDate)];
	const tokens = formatStr.match(longFormattingTokensRegExp).map((substring) => {
		const firstCharacter = substring[0];
		if (firstCharacter in longFormatters) {
			const longFormatter = longFormatters[firstCharacter];
			return longFormatter(substring, locale.formatLong);
		}
		return substring;
	}).join("").match(formattingTokensRegExp);
	const usedTokens = [];
	for (let token of tokens) {
		if (!options?.useAdditionalWeekYearTokens && isProtectedWeekYearToken(token)) warnOrThrowProtectedError(token, formatStr, dateStr);
		if (!options?.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(token)) warnOrThrowProtectedError(token, formatStr, dateStr);
		const firstCharacter = token[0];
		const parser = parsers[firstCharacter];
		if (parser) {
			const { incompatibleTokens } = parser;
			if (Array.isArray(incompatibleTokens)) {
				const incompatibleToken = usedTokens.find((usedToken) => incompatibleTokens.includes(usedToken.token) || usedToken.token === firstCharacter);
				if (incompatibleToken) throw new RangeError(`The format string mustn't contain \`${incompatibleToken.fullToken}\` and \`${token}\` at the same time`);
			} else if (parser.incompatibleTokens === "*" && usedTokens.length > 0) throw new RangeError(`The format string mustn't contain \`${token}\` and any other token at the same time`);
			usedTokens.push({
				token: firstCharacter,
				fullToken: token
			});
			const parseResult = parser.run(dateStr, token, locale.match, subFnOptions);
			if (!parseResult) return invalidDate();
			setters.push(parseResult.setter);
			dateStr = parseResult.rest;
		} else {
			if (firstCharacter.match(unescapedLatinCharacterRegExp)) throw new RangeError("Format string contains an unescaped latin alphabet character `" + firstCharacter + "`");
			if (token === "''") token = "'";
			else if (firstCharacter === "'") token = cleanEscapedString(token);
			if (dateStr.indexOf(token) === 0) dateStr = dateStr.slice(token.length);
			else return invalidDate();
		}
	}
	if (dateStr.length > 0 && notWhitespaceRegExp.test(dateStr)) return invalidDate();
	const uniquePrioritySetters = setters.map((setter) => setter.priority).sort((a, b) => b - a).filter((priority, index, array) => array.indexOf(priority) === index).map((priority) => setters.filter((setter) => setter.priority === priority).sort((a, b) => b.subPriority - a.subPriority)).map((setterArray) => setterArray[0]);
	let date = toDate$1(referenceDate, options?.in);
	if (isNaN(+date)) return invalidDate();
	const flags = {};
	for (const setter of uniquePrioritySetters) {
		if (!setter.validate(date, subFnOptions)) return invalidDate();
		const result = setter.set(date, flags, subFnOptions);
		if (Array.isArray(result)) {
			date = result[0];
			Object.assign(flags, result[1]);
		} else date = result;
	}
	return date;
}
function cleanEscapedString(input) {
	return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
}
//#endregion
//#region ../../node_modules/date-fns/isSameWeek.js
var import_jsx_runtime = require_jsx_runtime();
/**
* The {@link isSameWeek} function options.
*/
/**
* @name isSameWeek
* @category Week Helpers
* @summary Are the given dates in the same week (and month and year)?
*
* @description
* Are the given dates in the same week (and month and year)?
*
* @param laterDate - The first date to check
* @param earlierDate - The second date to check
* @param options - An object with options
*
* @returns The dates are in the same week (and month and year)
*
* @example
* // Are 31 August 2014 and 4 September 2014 in the same week?
* const result = isSameWeek(new Date(2014, 7, 31), new Date(2014, 8, 4))
* //=> true
*
* @example
* // If week starts with Monday,
* // are 31 August 2014 and 4 September 2014 in the same week?
* const result = isSameWeek(new Date(2014, 7, 31), new Date(2014, 8, 4), {
*   weekStartsOn: 1
* })
* //=> false
*
* @example
* // Are 1 January 2014 and 1 January 2015 in the same week?
* const result = isSameWeek(new Date(2014, 0, 1), new Date(2015, 0, 1))
* //=> false
*/
function isSameWeek(laterDate, earlierDate, options) {
	const [laterDate_, earlierDate_] = normalizeDates(options?.in, laterDate, earlierDate);
	return +startOfWeek(laterDate_, options) === +startOfWeek(earlierDate_, options);
}
//#endregion
//#region ../../node_modules/date-fns/subDays.js
/**
* The {@link subDays} function options.
*/
/**
* @name subDays
* @category Day Helpers
* @summary Subtract the specified number of days from the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param amount - The amount of days to be subtracted.
* @param options - An object with options
*
* @returns The new date with the days subtracted
*
* @example
* // Subtract 10 days from 1 September 2014:
* const result = subDays(new Date(2014, 8, 1), 10)
* //=> Fri Aug 22 2014 00:00:00
*/
function subDays$1(date, amount, options) {
	return addDays$1(date, -amount, options);
}
//#endregion
//#region ../../node_modules/date-fns/nextDay.js
/**
* The {@link nextDay} function options.
*/
/**
* @name nextDay
* @category Weekday Helpers
* @summary When is the next day of the week? 0-6 the day of the week, 0 represents Sunday.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to check
* @param day - Day of the week
* @param options - An object with options
*
* @returns The date is the next day of the week
*
* @example
* // When is the next Monday after Mar, 20, 2020?
* const result = nextDay(new Date(2020, 2, 20), 1)
* //=> Mon Mar 23 2020 00:00:00
*
* @example
* // When is the next Tuesday after Mar, 21, 2020?
* const result = nextDay(new Date(2020, 2, 21), 2)
* //=> Tue Mar 24 2020 00:00:00
*/
function nextDay(date, day, options) {
	let delta = day - getDay$1(date, options);
	if (delta <= 0) delta += 7;
	return addDays$1(date, delta, options);
}
//#endregion
//#region ../../node_modules/date-fns/nextMonday.js
/**
* The {@link nextMonday} function options.
*/
/**
* @name nextMonday
* @category Weekday Helpers
* @summary When is the next Monday?
*
* @description
* When is the next Monday?
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, returned from the context function if passed, or inferred from the arguments.
*
* @param date - The date to start counting from
* @param options - An object with options
*
* @returns The next Monday
*
* @example
* // When is the next Monday after Mar, 22, 2020?
* const result = nextMonday(new Date(2020, 2, 22))
* //=> Mon Mar 23 2020 00:00:00
*/
function nextMonday(date, options) {
	return nextDay(date, 1, options);
}
//#endregion
//#region ../../node_modules/date-fns/parseISO.js
/**
* The {@link parseISO} function options.
*/
/**
* @name parseISO
* @category Common Helpers
* @summary Parse ISO string
*
* @description
* Parse the given string in ISO 8601 format and return an instance of Date.
*
* Function accepts complete ISO 8601 formats as well as partial implementations.
* ISO 8601: http://en.wikipedia.org/wiki/ISO_8601
*
* If the argument isn't a string, the function cannot parse the string or
* the values are invalid, it returns Invalid Date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param argument - The value to convert
* @param options - An object with options
*
* @returns The parsed date in the local time zone
*
* @example
* // Convert string '2014-02-11T11:30:30' to date:
* const result = parseISO('2014-02-11T11:30:30')
* //=> Tue Feb 11 2014 11:30:30
*
* @example
* // Convert string '+02014101' to date,
* // if the additional number of digits in the extended year format is 1:
* const result = parseISO('+02014101', { additionalDigits: 1 })
* //=> Fri Apr 11 2014 00:00:00
*/
function parseISO(argument, options) {
	const invalidDate = () => constructFrom(options?.in, NaN);
	const additionalDigits = options?.additionalDigits ?? 2;
	const dateStrings = splitDateString(argument);
	let date;
	if (dateStrings.date) {
		const parseYearResult = parseYear(dateStrings.date, additionalDigits);
		date = parseDate$1(parseYearResult.restDateString, parseYearResult.year);
	}
	if (!date || isNaN(+date)) return invalidDate();
	const timestamp = +date;
	let time = 0;
	let offset;
	if (dateStrings.time) {
		time = parseTime(dateStrings.time);
		if (isNaN(time)) return invalidDate();
	}
	if (dateStrings.timezone) {
		offset = parseTimezone(dateStrings.timezone);
		if (isNaN(offset)) return invalidDate();
	} else {
		const tmpDate = new Date(timestamp + time);
		const result = toDate$1(0, options?.in);
		result.setFullYear(tmpDate.getUTCFullYear(), tmpDate.getUTCMonth(), tmpDate.getUTCDate());
		result.setHours(tmpDate.getUTCHours(), tmpDate.getUTCMinutes(), tmpDate.getUTCSeconds(), tmpDate.getUTCMilliseconds());
		return result;
	}
	return toDate$1(timestamp + time + offset, options?.in);
}
var patterns = {
	dateTimeDelimiter: /[T ]/,
	timeZoneDelimiter: /[Z ]/i,
	timezone: /([Z+-].*)$/
};
var dateRegex = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/;
var timeRegex = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/;
var timezoneRegex = /^([+-])(\d{2})(?::?(\d{2}))?$/;
function splitDateString(dateString) {
	const dateStrings = {};
	const array = dateString.split(patterns.dateTimeDelimiter);
	let timeString;
	if (array.length > 2) return dateStrings;
	if (/:/.test(array[0])) timeString = array[0];
	else {
		dateStrings.date = array[0];
		timeString = array[1];
		if (patterns.timeZoneDelimiter.test(dateStrings.date)) {
			dateStrings.date = dateString.split(patterns.timeZoneDelimiter)[0];
			timeString = dateString.substr(dateStrings.date.length, dateString.length);
		}
	}
	if (timeString) {
		const token = patterns.timezone.exec(timeString);
		if (token) {
			dateStrings.time = timeString.replace(token[1], "");
			dateStrings.timezone = token[1];
		} else dateStrings.time = timeString;
	}
	return dateStrings;
}
function parseYear(dateString, additionalDigits) {
	const regex = new RegExp("^(?:(\\d{4}|[+-]\\d{" + (4 + additionalDigits) + "})|(\\d{2}|[+-]\\d{" + (2 + additionalDigits) + "})$)");
	const captures = dateString.match(regex);
	if (!captures) return {
		year: NaN,
		restDateString: ""
	};
	const year = captures[1] ? parseInt(captures[1]) : null;
	const century = captures[2] ? parseInt(captures[2]) : null;
	return {
		year: century === null ? year : century * 100,
		restDateString: dateString.slice((captures[1] || captures[2]).length)
	};
}
function parseDate$1(dateString, year) {
	if (year === null) return /* @__PURE__ */ new Date(NaN);
	const captures = dateString.match(dateRegex);
	if (!captures) return /* @__PURE__ */ new Date(NaN);
	const isWeekDate = !!captures[4];
	const dayOfYear = parseDateUnit(captures[1]);
	const month = parseDateUnit(captures[2]) - 1;
	const day = parseDateUnit(captures[3]);
	const week = parseDateUnit(captures[4]);
	const dayOfWeek = parseDateUnit(captures[5]) - 1;
	if (isWeekDate) {
		if (!validateWeekDate(year, week, dayOfWeek)) return /* @__PURE__ */ new Date(NaN);
		return dayOfISOWeekYear(year, week, dayOfWeek);
	} else {
		const date = /* @__PURE__ */ new Date(0);
		if (!validateDate(year, month, day) || !validateDayOfYearDate(year, dayOfYear)) return /* @__PURE__ */ new Date(NaN);
		date.setUTCFullYear(year, month, Math.max(dayOfYear, day));
		return date;
	}
}
function parseDateUnit(value) {
	return value ? parseInt(value) : 1;
}
function parseTime(timeString) {
	const captures = timeString.match(timeRegex);
	if (!captures) return NaN;
	const hours = parseTimeUnit(captures[1]);
	const minutes = parseTimeUnit(captures[2]);
	const seconds = parseTimeUnit(captures[3]);
	if (!validateTime(hours, minutes, seconds)) return NaN;
	return hours * millisecondsInHour + minutes * millisecondsInMinute + seconds * 1e3;
}
function parseTimeUnit(value) {
	return value && parseFloat(value.replace(",", ".")) || 0;
}
function parseTimezone(timezoneString) {
	if (timezoneString === "Z") return 0;
	const captures = timezoneString.match(timezoneRegex);
	if (!captures) return 0;
	const sign = captures[1] === "+" ? -1 : 1;
	const hours = parseInt(captures[2]);
	const minutes = captures[3] && parseInt(captures[3]) || 0;
	if (!validateTimezone(hours, minutes)) return NaN;
	return sign * (hours * millisecondsInHour + minutes * millisecondsInMinute);
}
function dayOfISOWeekYear(isoWeekYear, week, day) {
	const date = /* @__PURE__ */ new Date(0);
	date.setUTCFullYear(isoWeekYear, 0, 4);
	const fourthOfJanuaryDay = date.getUTCDay() || 7;
	const diff = (week - 1) * 7 + day + 1 - fourthOfJanuaryDay;
	date.setUTCDate(date.getUTCDate() + diff);
	return date;
}
var daysInMonths = [
	31,
	null,
	31,
	30,
	31,
	30,
	31,
	31,
	30,
	31,
	30,
	31
];
function isLeapYearIndex(year) {
	return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;
}
function validateDate(year, month, date) {
	return month >= 0 && month <= 11 && date >= 1 && date <= (daysInMonths[month] || (isLeapYearIndex(year) ? 29 : 28));
}
function validateDayOfYearDate(year, dayOfYear) {
	return dayOfYear >= 1 && dayOfYear <= (isLeapYearIndex(year) ? 366 : 365);
}
function validateWeekDate(_year, week, day) {
	return week >= 1 && week <= 53 && day >= 0 && day <= 6;
}
function validateTime(hours, minutes, seconds) {
	if (hours === 24) return minutes === 0 && seconds === 0;
	return seconds >= 0 && seconds < 60 && minutes >= 0 && minutes < 60 && hours >= 0 && hours < 25;
}
function validateTimezone(_hours, minutes) {
	return minutes >= 0 && minutes <= 59;
}
//#endregion
//#region ../../node_modules/date-fns/previousDay.js
/**
* The {@link previousDay} function options.
*/
/**
* @name previousDay
* @category Weekday Helpers
* @summary When is the previous day of the week?
*
* @description
* When is the previous day of the week? 0-6 the day of the week, 0 represents Sunday.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to check
* @param day - The day of the week
* @param options - An object with options
*
* @returns The date is the previous day of week
*
* @example
* // When is the previous Monday before Mar, 20, 2020?
* const result = previousDay(new Date(2020, 2, 20), 1)
* //=> Mon Mar 16 2020 00:00:00
*
* @example
* // When is the previous Tuesday before Mar, 21, 2020?
* const result = previousDay(new Date(2020, 2, 21), 2)
* //=> Tue Mar 17 2020 00:00:00
*/
function previousDay(date, day, options) {
	let delta = getDay$1(date, options) - day;
	if (delta <= 0) delta += 7;
	return subDays$1(date, delta, options);
}
//#endregion
//#region ../../node_modules/date-fns/previousFriday.js
/**
* The {@link previousFriday} function options.
*/
/**
* @name previousFriday
* @category Weekday Helpers
* @summary When is the previous Friday?
*
* @description
* When is the previous Friday?
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [UTCDate](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to start counting from
* @param options - The options
*
* @returns The previous Friday
*
* @example
* // When is the previous Friday before Jun, 19, 2021?
* const result = previousFriday(new Date(2021, 5, 19))
* //=> Fri June 18 2021 00:00:00
*/
function previousFriday(date, options) {
	return previousDay(date, 5, options);
}
//#endregion
//#region ../../node_modules/date-fns/subMonths.js
/**
* The subMonths function options.
*/
/**
* @name subMonths
* @category Month Helpers
* @summary Subtract the specified number of months from the given date.
*
* @description
* Subtract the specified number of months from the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param amount - The amount of months to be subtracted.
* @param options - An object with options
*
* @returns The new date with the months subtracted
*
* @example
* // Subtract 5 months from 1 February 2015:
* const result = subMonths(new Date(2015, 1, 1), 5)
* //=> Mon Sep 01 2014 00:00:00
*/
function subMonths$1(date, amount, options) {
	return addMonths$1(date, -amount, options);
}
//#endregion
//#region ../../node_modules/date-fns/subWeeks.js
/**
* The {@link subWeeks} function options.
*/
/**
* @name subWeeks
* @category Week Helpers
* @summary Subtract the specified number of weeks from the given date.
*
* @description
* Subtract the specified number of weeks from the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param amount - The amount of weeks to be subtracted.
* @param options - An object with options
*
* @returns The new date with the weeks subtracted
*
* @example
* // Subtract 4 weeks from 1 September 2014:
* const result = subWeeks(new Date(2014, 8, 1), 4)
* //=> Mon Aug 04 2014 00:00:00
*/
function subWeeks$1(date, amount, options) {
	return addWeeks$1(date, -amount, options);
}
//#endregion
//#region ../../node_modules/date-fns/subYears.js
/**
* The {@link subYears} function options.
*/
/**
* @name subYears
* @category Year Helpers
* @summary Subtract the specified number of years from the given date.
*
* @description
* Subtract the specified number of years from the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param amount - The amount of years to be subtracted.
* @param options - An object with options
*
* @returns The new date with the years subtracted
*
* @example
* // Subtract 5 years from 1 September 2014:
* const result = subYears(new Date(2014, 8, 1), 5)
* //=> Tue Sep 01 2009 00:00:00
*/
function subYears$1(date, amount, options) {
	return addYears$1(date, -amount, options);
}
//#endregion
//#region src/hooks/useOnVisible.ts
var import_compiler_runtime = require_compiler_runtime();
/**
* Runs the given callback when the document becomes visible (e.g. user
* switches back to the tab). Uses a guard so the callback is not invoked
* again until the previous invocation has finished (handles async callbacks).
*/
function useOnVisible(callback, options = {}) {
	const { isEnabled = true } = options;
	const inProgress = (0, import_react.useRef)(false);
	const runCallback = (0, import_react.useEffectEvent)(async () => {
		if (inProgress.current) return;
		inProgress.current = true;
		try {
			await callback();
		} finally {
			inProgress.current = false;
		}
	});
	(0, import_react.useEffect)(() => {
		if (!isEnabled) return;
		function onVisibilityChange() {
			if (document.visibilityState !== "visible") return;
			runCallback();
		}
		document.addEventListener("visibilitychange", onVisibilityChange);
		return () => document.removeEventListener("visibilitychange", onVisibilityChange);
	}, [isEnabled]);
}
//#endregion
//#region src/components/ServerContext.tsx
var ServerContext = (0, import_react.createContext)({
	url: null,
	version: "",
	multiuserEnabled: false,
	availableLoginMethods: [],
	setURL: () => Promise.reject(/* @__PURE__ */ new Error("ServerContext not initialized")),
	refreshLoginMethods: () => Promise.reject(/* @__PURE__ */ new Error("ServerContext not initialized")),
	setMultiuserEnabled: () => {
		throw new Error("ServerContext not initialized");
	},
	setLoginMethods: () => {
		throw new Error("ServerContext not initialized");
	}
});
var useServerURL = () => {
	return (0, import_react.useContext)(ServerContext).url;
};
var useServerVersion = () => {
	return (0, import_react.useContext)(ServerContext).version;
};
var useSetServerURL = () => {
	return (0, import_react.useContext)(ServerContext).setURL;
};
var useMultiuserEnabled = () => {
	const { multiuserEnabled } = (0, import_react.useContext)(ServerContext);
	const loginMethod = useLoginMethod();
	return multiuserEnabled && loginMethod === "openid";
};
var useLoginMethod = () => {
	const $ = (0, import_compiler_runtime.c)(2);
	const availableLoginMethods = (0, import_react.useContext)(ServerContext).availableLoginMethods;
	if (!availableLoginMethods || availableLoginMethods.length === 0) return "password";
	let t0;
	if ($[0] !== availableLoginMethods) {
		t0 = availableLoginMethods.filter(_temp$18)[0]?.method ?? "password";
		$[0] = availableLoginMethods;
		$[1] = t0;
	} else t0 = $[1];
	return t0;
};
var useAvailableLoginMethods = () => {
	return (0, import_react.useContext)(ServerContext).availableLoginMethods;
};
async function getServerVersion() {
	if (isPlaywright) return "99.9.9";
	const result = await send("get-server-version");
	if ("version" in result) return result.version;
	return "";
}
var useRefreshLoginMethods = () => {
	return (0, import_react.useContext)(ServerContext).refreshLoginMethods;
};
var useSetMultiuserEnabled = () => {
	return (0, import_react.useContext)(ServerContext).setMultiuserEnabled;
};
var useSetLoginMethods = () => {
	return (0, import_react.useContext)(ServerContext).setLoginMethods;
};
function ServerProvider(t0) {
	const $ = (0, import_compiler_runtime.c)(22);
	const { children } = t0;
	const dispatch = useDispatch();
	const [serverURL, setServerURL] = (0, import_react.useState)("");
	const [version, setVersion] = (0, import_react.useState)("");
	const [multiuserEnabled, setMultiuserEnabled] = (0, import_react.useState)(false);
	let t1;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = [];
		$[0] = t1;
	} else t1 = $[0];
	const [availableLoginMethods, setAvailableLoginMethods] = (0, import_react.useState)(t1);
	let t2;
	let t3;
	if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = () => {
			(async function run() {
				const serverURL_0 = await send("get-server-url");
				if (!serverURL_0) return;
				setServerURL(serverURL_0);
				setVersion(await getServerVersion());
			})();
		};
		t3 = [];
		$[1] = t2;
		$[2] = t3;
	} else {
		t2 = $[1];
		t3 = $[2];
	}
	(0, import_react.useEffect)(t2, t3);
	let t4;
	if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
		t4 = async () => {
			setVersion(await getServerVersion());
		};
		$[3] = t4;
	} else t4 = $[3];
	const t5 = !!serverURL;
	let t6;
	if ($[4] !== t5) {
		t6 = { isEnabled: t5 };
		$[4] = t5;
		$[5] = t6;
	} else t6 = $[5];
	useOnVisible(t4, t6);
	let t7;
	if ($[6] !== dispatch || $[7] !== serverURL) {
		t7 = async () => {
			if (serverURL) {
				const data = await send("subscribe-get-login-methods");
				if ("error" in data) {
					dispatch(addNotification({ notification: {
						type: "error",
						title: t$1("Failed to refresh login methods"),
						message: data.error ?? t$1("Unknown")
					} }));
					setAvailableLoginMethods([]);
				} else if (data.methods) setAvailableLoginMethods(data.methods);
				else setAvailableLoginMethods([]);
			}
		};
		$[6] = dispatch;
		$[7] = serverURL;
		$[8] = t7;
	} else t7 = $[8];
	const refreshLoginMethods = t7;
	let t8;
	let t9;
	if ($[9] !== serverURL) {
		t8 = () => {
			if (serverURL) send("subscribe-needs-bootstrap").then((data_0) => {
				if ("hasServer" in data_0 && data_0.hasServer) {
					setAvailableLoginMethods(data_0.availableLoginMethods || []);
					setMultiuserEnabled(data_0.multiuser || false);
				}
			});
		};
		t9 = [serverURL];
		$[9] = serverURL;
		$[10] = t8;
		$[11] = t9;
	} else {
		t8 = $[10];
		t9 = $[11];
	}
	(0, import_react.useEffect)(t8, t9);
	let t10;
	if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
		t10 = async (url, t11) => {
			const { error } = await send("set-server-url", {
				...t11 === void 0 ? {} : t11,
				url
			});
			if (!error) {
				setServerURL(await send("get-server-url"));
				setVersion(await getServerVersion());
			}
			return { error };
		};
		$[12] = t10;
	} else t10 = $[12];
	const setURL = t10;
	const t11 = version ? `v${version}` : "N/A";
	let t12;
	if ($[13] !== availableLoginMethods || $[14] !== multiuserEnabled || $[15] !== refreshLoginMethods || $[16] !== serverURL || $[17] !== t11) {
		t12 = {
			url: serverURL,
			multiuserEnabled,
			availableLoginMethods,
			setURL,
			version: t11,
			refreshLoginMethods,
			setMultiuserEnabled,
			setLoginMethods: setAvailableLoginMethods
		};
		$[13] = availableLoginMethods;
		$[14] = multiuserEnabled;
		$[15] = refreshLoginMethods;
		$[16] = serverURL;
		$[17] = t11;
		$[18] = t12;
	} else t12 = $[18];
	let t13;
	if ($[19] !== children || $[20] !== t12) {
		t13 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ServerContext.Provider, {
			value: t12,
			children
		});
		$[19] = children;
		$[20] = t12;
		$[21] = t13;
	} else t13 = $[21];
	return t13;
}
function _temp$18(m) {
	return m.active;
}
//#endregion
//#region ../../node_modules/react-error-boundary/dist/react-error-boundary.js
var h = (0, import_react.createContext)(null), c = {
	didCatch: !1,
	error: null
};
var m$1 = class extends import_react.Component {
	constructor(e) {
		super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = c;
	}
	static getDerivedStateFromError(e) {
		return {
			didCatch: !0,
			error: e
		};
	}
	resetErrorBoundary(...e) {
		const { error: t } = this.state;
		t !== null && (this.props.onReset?.({
			args: e,
			reason: "imperative-api"
		}), this.setState(c));
	}
	componentDidCatch(e, t) {
		this.props.onError?.(e, t);
	}
	componentDidUpdate(e, t) {
		const { didCatch: o } = this.state, { resetKeys: s } = this.props;
		o && t.error !== null && C$2(e.resetKeys, s) && (this.props.onReset?.({
			next: s,
			prev: e.resetKeys,
			reason: "keys"
		}), this.setState(c));
	}
	render() {
		const { children: e, fallbackRender: t, FallbackComponent: o, fallback: s } = this.props, { didCatch: n, error: a } = this.state;
		let i = e;
		if (n) {
			const u = {
				error: a,
				resetErrorBoundary: this.resetErrorBoundary
			};
			if (typeof t == "function") i = t(u);
			else if (o) i = (0, import_react.createElement)(o, u);
			else if (s !== void 0) i = s;
			else throw a;
		}
		return (0, import_react.createElement)(h.Provider, { value: {
			didCatch: n,
			error: a,
			resetErrorBoundary: this.resetErrorBoundary
		} }, i);
	}
};
function C$2(r = [], e = []) {
	return r.length !== e.length || r.some((t, o) => !Object.is(t, e[o]));
}
function g(r) {
	return r !== null && typeof r == "object" && "didCatch" in r && typeof r.didCatch == "boolean" && "error" in r && "resetErrorBoundary" in r && typeof r.resetErrorBoundary == "function";
}
function x$2(r) {
	if (!g(r)) throw new Error("ErrorBoundaryContext not found");
}
function k$1() {
	const r = (0, import_react.useContext)(h);
	x$2(r);
	const { error: e, resetErrorBoundary: t } = r, [o, s] = (0, import_react.useState)({
		error: null,
		hasError: !1
	}), n = (0, import_react.useMemo)(() => ({
		error: e,
		resetBoundary: () => {
			t(), s({
				error: null,
				hasError: !1
			});
		},
		showBoundary: (a) => s({
			error: a,
			hasError: !0
		})
	}), [e, t]);
	if (o.hasError) throw o.error;
	return n;
}
//#endregion
//#region ../../node_modules/react-hotkeys-hook/dist/index.js
var j$1 = [
	"shift",
	"alt",
	"meta",
	"mod",
	"ctrl",
	"control"
], Q = {
	esc: "escape",
	return: "enter",
	left: "arrowleft",
	right: "arrowright",
	up: "arrowup",
	down: "arrowdown",
	ShiftLeft: "shift",
	ShiftRight: "shift",
	AltLeft: "alt",
	AltRight: "alt",
	MetaLeft: "meta",
	MetaRight: "meta",
	OSLeft: "meta",
	OSRight: "meta",
	ControlLeft: "ctrl",
	ControlRight: "ctrl"
};
function K(e) {
	return (Q[e.trim()] || e.trim()).toLowerCase().replace(/key|digit|numpad/, "");
}
function D$2(e) {
	return j$1.includes(e);
}
function H(e, r = ",") {
	return e.toLowerCase().split(r);
}
function P$1(e, r = "+", o = ">", i = !1, c, a) {
	let n = [], y = !1;
	e = e.trim(), e.includes(o) ? (y = !0, n = e.toLocaleLowerCase().split(o).map((f) => K(f))) : n = e.toLocaleLowerCase().split(r).map((f) => K(f));
	const u = {
		alt: n.includes("alt"),
		ctrl: n.includes("ctrl") || n.includes("control"),
		shift: n.includes("shift"),
		meta: n.includes("meta"),
		mod: n.includes("mod"),
		useKey: i
	}, l = n.filter((f) => !j$1.includes(f));
	return {
		...u,
		keys: l,
		description: c,
		isSequence: y,
		hotkey: e,
		metadata: a
	};
}
typeof document < "u" && (document.addEventListener("keydown", (e) => {
	e.code !== void 0 && _([K(e.code)]);
}), document.addEventListener("keyup", (e) => {
	e.code !== void 0 && I$1([K(e.code)]);
})), typeof window < "u" && (window.addEventListener("blur", () => {
	L$1.clear();
}), window.addEventListener("contextmenu", () => {
	setTimeout(() => {
		L$1.clear();
	}, 0);
}));
var L$1 = /* @__PURE__ */ new Set();
function R$2(e) {
	return Array.isArray(e);
}
function U$1(e, r = ",") {
	return (R$2(e) ? e : e.split(r)).every((i) => L$1.has(i.trim().toLowerCase()));
}
function _(e) {
	const r = Array.isArray(e) ? e : [e];
	L$1.has("meta") && L$1.forEach((o) => {
		D$2(o) || L$1.delete(o.toLowerCase());
	}), r.forEach((o) => {
		L$1.add(o.toLowerCase());
	});
}
function I$1(e) {
	e === "meta" ? L$1.clear() : (Array.isArray(e) ? e : [e]).forEach((o) => {
		L$1.delete(o.toLowerCase());
	});
}
function V$1(e, r, o) {
	(typeof o == "function" && o(e, r) || o === !0) && e.preventDefault();
}
function X(e, r, o) {
	return typeof o == "function" ? o(e, r) : o === !0 || o === void 0;
}
var Y = [
	"input",
	"textarea",
	"select",
	"searchbox",
	"slider",
	"spinbutton",
	"menuitem",
	"menuitemcheckbox",
	"menuitemradio",
	"option",
	"radio",
	"textbox"
];
function Z(e) {
	return F$2(e, Y);
}
function F$2(e, r = !1) {
	const { target: o, composed: i } = e;
	let c, a;
	return ee(o) && i ? (c = e.composedPath()[0] && e.composedPath()[0].tagName, a = e.composedPath()[0] && e.composedPath()[0].role) : (c = o && o.tagName, a = o && o.role), R$2(r) ? !!(c && r && r.some((n) => n.toLowerCase() === c.toLowerCase() || n === a)) : !!(c && r && r);
}
function ee(e) {
	return !!e.tagName && !e.tagName.startsWith("-") && e.tagName.includes("-");
}
function te$1(e, r) {
	return e.length === 0 && r ? !1 : r ? e.some((o) => r.includes(o)) || e.includes("*") : !0;
}
var re$1 = (e, r, o = !1) => {
	const { alt: i, meta: c, mod: a, shift: n, ctrl: y, keys: u, useKey: l } = r, { code: f, key: t, ctrlKey: d, metaKey: m, shiftKey: g, altKey: k } = e, p = K(f);
	if (l && u?.length === 1 && u.includes(t.toLowerCase())) return !0;
	if (!u?.includes(p) && ![
		"ctrl",
		"control",
		"unknown",
		"meta",
		"alt",
		"shift",
		"os"
	].includes(p)) return !1;
	if (!o) {
		if (i !== k && p !== "alt" || n !== g && p !== "shift") return !1;
		if (a) {
			if (!m && !d) return !1;
		} else if (c !== m && p !== "meta" && p !== "os" || y !== d && p !== "ctrl" && p !== "control") return !1;
	}
	return u && u.length === 1 && u.includes(p) ? !0 : u && u.length > 0 ? u.includes(p) ? U$1(u) : !1 : !u || u.length === 0;
}, $ = (0, import_react.createContext)(void 0), oe = () => (0, import_react.useContext)($);
function ne({ addHotkey: e, removeHotkey: r, children: o }) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)($.Provider, {
		value: {
			addHotkey: e,
			removeHotkey: r
		},
		children: o
	});
}
function x$1(e, r) {
	return e && r && typeof e == "object" && typeof r == "object" ? Object.keys(e).length === Object.keys(r).length && Object.keys(e).reduce((o, i) => o && x$1(e[i], r[i]), !0) : e === r;
}
var W$2 = (0, import_react.createContext)({
	hotkeys: [],
	activeScopes: [],
	toggleScope: () => {},
	enableScope: () => {},
	disableScope: () => {}
}), se$1 = () => (0, import_react.useContext)(W$2), de$1 = ({ initiallyActiveScopes: e = ["*"], children: r }) => {
	const [o, i] = (0, import_react.useState)(e), [c, a] = (0, import_react.useState)([]), n = (0, import_react.useCallback)((t) => {
		i((d) => d.includes("*") ? [t] : Array.from(/* @__PURE__ */ new Set([...d, t])));
	}, []), y = (0, import_react.useCallback)((t) => {
		i((d) => d.filter((m) => m !== t));
	}, []), u = (0, import_react.useCallback)((t) => {
		i((d) => d.includes(t) ? d.filter((m) => m !== t) : d.includes("*") ? [t] : Array.from(/* @__PURE__ */ new Set([...d, t])));
	}, []), l = (0, import_react.useCallback)((t) => {
		a((d) => [...d, t]);
	}, []), f = (0, import_react.useCallback)((t) => {
		a((d) => d.filter((m) => !x$1(m, t)));
	}, []);
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(W$2.Provider, {
		value: {
			activeScopes: o,
			hotkeys: c,
			enableScope: n,
			disableScope: y,
			toggleScope: u
		},
		children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ne, {
			addHotkey: l,
			removeHotkey: f,
			children: r
		})
	});
};
function ie(e) {
	const r = (0, import_react.useRef)(void 0);
	return x$1(r.current, e) || (r.current = e), r.current;
}
var N$1 = (e) => {
	e.stopPropagation(), e.preventDefault(), e.stopImmediatePropagation();
}, ce = typeof window < "u" ? import_react.useLayoutEffect : import_react.useEffect;
function fe(e, r, o, i) {
	const c = (0, import_react.useRef)(null), a = (0, import_react.useRef)(!1), n = Array.isArray(o) ? Array.isArray(i) ? void 0 : i : o, y = R$2(e) ? e.join(n?.delimiter) : e, u = Array.isArray(o) ? o : Array.isArray(i) ? i : void 0, l = (0, import_react.useCallback)(r, u ?? []), f = (0, import_react.useRef)(l);
	u ? f.current = l : f.current = r;
	const t = ie(n), { activeScopes: d } = se$1(), m = oe();
	return ce(() => {
		if (t?.enabled === !1 || !te$1(d, t?.scopes)) return;
		let g = [], k;
		const p = (s, B = !1) => {
			if (!(Z(s) && !F$2(s, t?.enableOnFormTags))) {
				if (c.current !== null) {
					const v = c.current.getRootNode();
					if ((v instanceof Document || v instanceof ShadowRoot) && v.activeElement !== c.current && !c.current.contains(v.activeElement)) {
						N$1(s);
						return;
					}
				}
				s.target?.isContentEditable && !t?.enableOnContentEditable || H(y, t?.delimiter).forEach((v) => {
					if (v.includes(t?.splitKey ?? "+") && v.includes(t?.sequenceSplitKey ?? ">")) {
						console.warn(`Hotkey ${v} contains both ${t?.splitKey ?? "+"} and ${t?.sequenceSplitKey ?? ">"} which is not supported.`);
						return;
					}
					const h = P$1(v, t?.splitKey, t?.sequenceSplitKey, t?.useKey, t?.description, t?.metadata);
					if (h.isSequence) {
						k = setTimeout(() => {
							g = [];
						}, t?.sequenceTimeoutMs ?? 1e3);
						const C = h.useKey ? s.key : K(s.code);
						if (D$2(C.toLowerCase())) return;
						g.push(C);
						if (C !== h.keys?.[g.length - 1]) {
							g = [], k && clearTimeout(k);
							return;
						}
						g.length === h.keys?.length && (f.current(s, h), k && clearTimeout(k), g = []);
					} else if (re$1(s, h, t?.ignoreModifiers) || h.keys?.includes("*")) {
						if (t?.ignoreEventWhen?.(s) || B && a.current) return;
						if (V$1(s, h, t?.preventDefault), !X(s, h, t?.enabled)) {
							N$1(s);
							return;
						}
						f.current(s, h), B || (a.current = !0);
					}
				});
			}
		}, O = (s) => {
			s.code !== void 0 && (_(K(s.code)), (t?.keydown === void 0 && t?.keyup !== !0 || t?.keydown) && p(s));
		}, q = (s) => {
			s.code !== void 0 && (I$1(K(s.code)), a.current = !1, t?.keyup && p(s, !0));
		}, E = c.current || n?.document || document;
		return E.addEventListener("keyup", q, n?.eventListenerOptions), E.addEventListener("keydown", O, n?.eventListenerOptions), m && H(y, t?.delimiter).forEach((s) => {
			m.addHotkey(P$1(s, t?.splitKey, t?.sequenceSplitKey, t?.useKey, t?.description, t?.metadata));
		}), () => {
			E.removeEventListener("keyup", q, n?.eventListenerOptions), E.removeEventListener("keydown", O, n?.eventListenerOptions), m && H(y, t?.delimiter).forEach((s) => {
				m.removeHotkey(P$1(s, t?.splitKey, t?.sequenceSplitKey, t?.useKey, t?.description, t?.metadata));
			}), g = [], k && clearTimeout(k);
		};
	}, [
		y,
		t,
		d
	]), c;
}
//#endregion
//#region ../../node_modules/react-router/dist/development/chunk-LFPYN7LY.mjs
var PopStateEventType = "popstate";
function isLocation(obj) {
	return typeof obj === "object" && obj != null && "pathname" in obj && "search" in obj && "hash" in obj && "state" in obj && "key" in obj;
}
function createBrowserHistory(options = {}) {
	function createBrowserLocation(window2, globalHistory) {
		let maskedLocation = globalHistory.state?.masked;
		let { pathname, search, hash } = maskedLocation || window2.location;
		return createLocation("", {
			pathname,
			search,
			hash
		}, globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || "default", maskedLocation ? {
			pathname: window2.location.pathname,
			search: window2.location.search,
			hash: window2.location.hash
		} : void 0);
	}
	function createBrowserHref(window2, to) {
		return typeof to === "string" ? to : createPath(to);
	}
	return getUrlBasedHistory(createBrowserLocation, createBrowserHref, null, options);
}
function invariant(value, message) {
	if (value === false || value === null || typeof value === "undefined") throw new Error(message);
}
function warning(cond, message) {
	if (!cond) {
		if (typeof console !== "undefined") console.warn(message);
		try {
			throw new Error(message);
		} catch (e) {}
	}
}
function createKey() {
	return Math.random().toString(36).substring(2, 10);
}
function getHistoryState(location, index) {
	return {
		usr: location.state,
		key: location.key,
		idx: index,
		masked: location.unstable_mask ? {
			pathname: location.pathname,
			search: location.search,
			hash: location.hash
		} : void 0
	};
}
function createLocation(current, to, state = null, key, unstable_mask) {
	return {
		pathname: typeof current === "string" ? current : current.pathname,
		search: "",
		hash: "",
		...typeof to === "string" ? parsePath(to) : to,
		state,
		key: to && to.key || key || createKey(),
		unstable_mask
	};
}
function createPath({ pathname = "/", search = "", hash = "" }) {
	if (search && search !== "?") pathname += search.charAt(0) === "?" ? search : "?" + search;
	if (hash && hash !== "#") pathname += hash.charAt(0) === "#" ? hash : "#" + hash;
	return pathname;
}
function parsePath(path) {
	let parsedPath = {};
	if (path) {
		let hashIndex = path.indexOf("#");
		if (hashIndex >= 0) {
			parsedPath.hash = path.substring(hashIndex);
			path = path.substring(0, hashIndex);
		}
		let searchIndex = path.indexOf("?");
		if (searchIndex >= 0) {
			parsedPath.search = path.substring(searchIndex);
			path = path.substring(0, searchIndex);
		}
		if (path) parsedPath.pathname = path;
	}
	return parsedPath;
}
function getUrlBasedHistory(getLocation, createHref2, validateLocation, options = {}) {
	let { window: window2 = document.defaultView, v5Compat = false } = options;
	let globalHistory = window2.history;
	let action = "POP";
	let listener = null;
	let index = getIndex();
	if (index == null) {
		index = 0;
		globalHistory.replaceState({
			...globalHistory.state,
			idx: index
		}, "");
	}
	function getIndex() {
		return (globalHistory.state || { idx: null }).idx;
	}
	function handlePop() {
		action = "POP";
		let nextIndex = getIndex();
		let delta = nextIndex == null ? null : nextIndex - index;
		index = nextIndex;
		if (listener) listener({
			action,
			location: history.location,
			delta
		});
	}
	function push(to, state) {
		action = "PUSH";
		let location = isLocation(to) ? to : createLocation(history.location, to, state);
		if (validateLocation) validateLocation(location, to);
		index = getIndex() + 1;
		let historyState = getHistoryState(location, index);
		let url = history.createHref(location.unstable_mask || location);
		try {
			globalHistory.pushState(historyState, "", url);
		} catch (error) {
			if (error instanceof DOMException && error.name === "DataCloneError") throw error;
			window2.location.assign(url);
		}
		if (v5Compat && listener) listener({
			action,
			location: history.location,
			delta: 1
		});
	}
	function replace2(to, state) {
		action = "REPLACE";
		let location = isLocation(to) ? to : createLocation(history.location, to, state);
		if (validateLocation) validateLocation(location, to);
		index = getIndex();
		let historyState = getHistoryState(location, index);
		let url = history.createHref(location.unstable_mask || location);
		globalHistory.replaceState(historyState, "", url);
		if (v5Compat && listener) listener({
			action,
			location: history.location,
			delta: 0
		});
	}
	function createURL(to) {
		return createBrowserURLImpl(to);
	}
	let history = {
		get action() {
			return action;
		},
		get location() {
			return getLocation(window2, globalHistory);
		},
		listen(fn) {
			if (listener) throw new Error("A history only accepts one active listener");
			window2.addEventListener(PopStateEventType, handlePop);
			listener = fn;
			return () => {
				window2.removeEventListener(PopStateEventType, handlePop);
				listener = null;
			};
		},
		createHref(to) {
			return createHref2(window2, to);
		},
		createURL,
		encodeLocation(to) {
			let url = createURL(to);
			return {
				pathname: url.pathname,
				search: url.search,
				hash: url.hash
			};
		},
		push,
		replace: replace2,
		go(n) {
			return globalHistory.go(n);
		}
	};
	return history;
}
function createBrowserURLImpl(to, isAbsolute = false) {
	let base = "http://localhost";
	if (typeof window !== "undefined") base = window.location.origin !== "null" ? window.location.origin : window.location.href;
	invariant(base, "No window.location.(origin|href) available to create URL");
	let href = typeof to === "string" ? to : createPath(to);
	href = href.replace(/ $/, "%20");
	if (!isAbsolute && href.startsWith("//")) href = base + href;
	return new URL(href, base);
}
function matchRoutes(routes, locationArg, basename = "/") {
	return matchRoutesImpl(routes, locationArg, basename, false);
}
function matchRoutesImpl(routes, locationArg, basename, allowPartial) {
	let pathname = stripBasename((typeof locationArg === "string" ? parsePath(locationArg) : locationArg).pathname || "/", basename);
	if (pathname == null) return null;
	let branches = flattenRoutes(routes);
	rankRouteBranches(branches);
	let matches = null;
	for (let i = 0; matches == null && i < branches.length; ++i) {
		let decoded = decodePath(pathname);
		matches = matchRouteBranch(branches[i], decoded, allowPartial);
	}
	return matches;
}
function convertRouteMatchToUiMatch(match, loaderData) {
	let { route, pathname, params } = match;
	return {
		id: route.id,
		pathname,
		params,
		data: loaderData[route.id],
		loaderData: loaderData[route.id],
		handle: route.handle
	};
}
function flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = "", _hasParentOptionalSegments = false) {
	let flattenRoute = (route, index, hasParentOptionalSegments = _hasParentOptionalSegments, relativePath) => {
		let meta = {
			relativePath: relativePath === void 0 ? route.path || "" : relativePath,
			caseSensitive: route.caseSensitive === true,
			childrenIndex: index,
			route
		};
		if (meta.relativePath.startsWith("/")) {
			if (!meta.relativePath.startsWith(parentPath) && hasParentOptionalSegments) return;
			invariant(meta.relativePath.startsWith(parentPath), `Absolute route path "${meta.relativePath}" nested under path "${parentPath}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`);
			meta.relativePath = meta.relativePath.slice(parentPath.length);
		}
		let path = joinPaths([parentPath, meta.relativePath]);
		let routesMeta = parentsMeta.concat(meta);
		if (route.children && route.children.length > 0) {
			invariant(route.index !== true, `Index routes must not have child routes. Please remove all child routes from route path "${path}".`);
			flattenRoutes(route.children, branches, routesMeta, path, hasParentOptionalSegments);
		}
		if (route.path == null && !route.index) return;
		branches.push({
			path,
			score: computeScore(path, route.index),
			routesMeta
		});
	};
	routes.forEach((route, index) => {
		if (route.path === "" || !route.path?.includes("?")) flattenRoute(route, index);
		else for (let exploded of explodeOptionalSegments(route.path)) flattenRoute(route, index, true, exploded);
	});
	return branches;
}
function explodeOptionalSegments(path) {
	let segments = path.split("/");
	if (segments.length === 0) return [];
	let [first, ...rest] = segments;
	let isOptional = first.endsWith("?");
	let required = first.replace(/\?$/, "");
	if (rest.length === 0) return isOptional ? [required, ""] : [required];
	let restExploded = explodeOptionalSegments(rest.join("/"));
	let result = [];
	result.push(...restExploded.map((subpath) => subpath === "" ? required : [required, subpath].join("/")));
	if (isOptional) result.push(...restExploded);
	return result.map((exploded) => path.startsWith("/") && exploded === "" ? "/" : exploded);
}
function rankRouteBranches(branches) {
	branches.sort((a, b) => a.score !== b.score ? b.score - a.score : compareIndexes(a.routesMeta.map((meta) => meta.childrenIndex), b.routesMeta.map((meta) => meta.childrenIndex)));
}
var paramRe = /^:[\w-]+$/;
var dynamicSegmentValue = 3;
var indexRouteValue = 2;
var emptySegmentValue = 1;
var staticSegmentValue = 10;
var splatPenalty = -2;
var isSplat = (s) => s === "*";
function computeScore(path, index) {
	let segments = path.split("/");
	let initialScore = segments.length;
	if (segments.some(isSplat)) initialScore += splatPenalty;
	if (index) initialScore += indexRouteValue;
	return segments.filter((s) => !isSplat(s)).reduce((score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : segment === "" ? emptySegmentValue : staticSegmentValue), initialScore);
}
function compareIndexes(a, b) {
	return a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]) ? a[a.length - 1] - b[b.length - 1] : 0;
}
function matchRouteBranch(branch, pathname, allowPartial = false) {
	let { routesMeta } = branch;
	let matchedParams = {};
	let matchedPathname = "/";
	let matches = [];
	for (let i = 0; i < routesMeta.length; ++i) {
		let meta = routesMeta[i];
		let end = i === routesMeta.length - 1;
		let remainingPathname = matchedPathname === "/" ? pathname : pathname.slice(matchedPathname.length) || "/";
		let match = matchPath({
			path: meta.relativePath,
			caseSensitive: meta.caseSensitive,
			end
		}, remainingPathname);
		let route = meta.route;
		if (!match && end && allowPartial && !routesMeta[routesMeta.length - 1].route.index) match = matchPath({
			path: meta.relativePath,
			caseSensitive: meta.caseSensitive,
			end: false
		}, remainingPathname);
		if (!match) return null;
		Object.assign(matchedParams, match.params);
		matches.push({
			params: matchedParams,
			pathname: joinPaths([matchedPathname, match.pathname]),
			pathnameBase: normalizePathname(joinPaths([matchedPathname, match.pathnameBase])),
			route
		});
		if (match.pathnameBase !== "/") matchedPathname = joinPaths([matchedPathname, match.pathnameBase]);
	}
	return matches;
}
function matchPath(pattern, pathname) {
	if (typeof pattern === "string") pattern = {
		path: pattern,
		caseSensitive: false,
		end: true
	};
	let [matcher, compiledParams] = compilePath(pattern.path, pattern.caseSensitive, pattern.end);
	let match = pathname.match(matcher);
	if (!match) return null;
	let matchedPathname = match[0];
	let pathnameBase = matchedPathname.replace(/(.)\/+$/, "$1");
	let captureGroups = match.slice(1);
	return {
		params: compiledParams.reduce((memo2, { paramName, isOptional }, index) => {
			if (paramName === "*") {
				let splatValue = captureGroups[index] || "";
				pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\/+$/, "$1");
			}
			const value = captureGroups[index];
			if (isOptional && !value) memo2[paramName] = void 0;
			else memo2[paramName] = (value || "").replace(/%2F/g, "/");
			return memo2;
		}, {}),
		pathname: matchedPathname,
		pathnameBase,
		pattern
	};
}
function compilePath(path, caseSensitive = false, end = true) {
	warning(path === "*" || !path.endsWith("*") || path.endsWith("/*"), `Route path "${path}" will be treated as if it were "${path.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${path.replace(/\*$/, "/*")}".`);
	let params = [];
	let regexpSource = "^" + path.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, (match, paramName, isOptional, index, str) => {
		params.push({
			paramName,
			isOptional: isOptional != null
		});
		if (isOptional) {
			let nextChar = str.charAt(index + match.length);
			if (nextChar && nextChar !== "/") return "/([^\\/]*)";
			return "(?:/([^\\/]*))?";
		}
		return "/([^\\/]+)";
	}).replace(/\/([\w-]+)\?(\/|$)/g, "(/$1)?$2");
	if (path.endsWith("*")) {
		params.push({ paramName: "*" });
		regexpSource += path === "*" || path === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$";
	} else if (end) regexpSource += "\\/*$";
	else if (path !== "" && path !== "/") regexpSource += "(?:(?=\\/|$))";
	return [new RegExp(regexpSource, caseSensitive ? void 0 : "i"), params];
}
function decodePath(value) {
	try {
		return value.split("/").map((v) => decodeURIComponent(v).replace(/\//g, "%2F")).join("/");
	} catch (error) {
		warning(false, `The URL path "${value}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${error}).`);
		return value;
	}
}
function stripBasename(pathname, basename) {
	if (basename === "/") return pathname;
	if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) return null;
	let startIndex = basename.endsWith("/") ? basename.length - 1 : basename.length;
	let nextChar = pathname.charAt(startIndex);
	if (nextChar && nextChar !== "/") return null;
	return pathname.slice(startIndex) || "/";
}
var ABSOLUTE_URL_REGEX$1 = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
function resolvePath(to, fromPathname = "/") {
	let { pathname: toPathname, search = "", hash = "" } = typeof to === "string" ? parsePath(to) : to;
	let pathname;
	if (toPathname) {
		toPathname = toPathname.replace(/\/\/+/g, "/");
		if (toPathname.startsWith("/")) pathname = resolvePathname(toPathname.substring(1), "/");
		else pathname = resolvePathname(toPathname, fromPathname);
	} else pathname = fromPathname;
	return {
		pathname,
		search: normalizeSearch(search),
		hash: normalizeHash(hash)
	};
}
function resolvePathname(relativePath, fromPathname) {
	let segments = fromPathname.replace(/\/+$/, "").split("/");
	relativePath.split("/").forEach((segment) => {
		if (segment === "..") {
			if (segments.length > 1) segments.pop();
		} else if (segment !== ".") segments.push(segment);
	});
	return segments.length > 1 ? segments.join("/") : "/";
}
function getInvalidPathError(char, field, dest, path) {
	return `Cannot include a '${char}' character in a manually specified \`to.${field}\` field [${JSON.stringify(path)}].  Please separate it out to the \`to.${dest}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
}
function getPathContributingMatches(matches) {
	return matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0);
}
function getResolveToMatches(matches) {
	let pathMatches = getPathContributingMatches(matches);
	return pathMatches.map((match, idx) => idx === pathMatches.length - 1 ? match.pathname : match.pathnameBase);
}
function resolveTo(toArg, routePathnames, locationPathname, isPathRelative = false) {
	let to;
	if (typeof toArg === "string") to = parsePath(toArg);
	else {
		to = { ...toArg };
		invariant(!to.pathname || !to.pathname.includes("?"), getInvalidPathError("?", "pathname", "search", to));
		invariant(!to.pathname || !to.pathname.includes("#"), getInvalidPathError("#", "pathname", "hash", to));
		invariant(!to.search || !to.search.includes("#"), getInvalidPathError("#", "search", "hash", to));
	}
	let isEmptyPath = toArg === "" || to.pathname === "";
	let toPathname = isEmptyPath ? "/" : to.pathname;
	let from;
	if (toPathname == null) from = locationPathname;
	else {
		let routePathnameIndex = routePathnames.length - 1;
		if (!isPathRelative && toPathname.startsWith("..")) {
			let toSegments = toPathname.split("/");
			while (toSegments[0] === "..") {
				toSegments.shift();
				routePathnameIndex -= 1;
			}
			to.pathname = toSegments.join("/");
		}
		from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : "/";
	}
	let path = resolvePath(to, from);
	let hasExplicitTrailingSlash = toPathname && toPathname !== "/" && toPathname.endsWith("/");
	let hasCurrentTrailingSlash = (isEmptyPath || toPathname === ".") && locationPathname.endsWith("/");
	if (!path.pathname.endsWith("/") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) path.pathname += "/";
	return path;
}
var joinPaths = (paths) => paths.join("/").replace(/\/\/+/g, "/");
var normalizePathname = (pathname) => pathname.replace(/\/+$/, "").replace(/^\/*/, "/");
var normalizeSearch = (search) => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search;
var normalizeHash = (hash) => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash;
var ErrorResponseImpl = class {
	constructor(status, statusText, data2, internal = false) {
		this.status = status;
		this.statusText = statusText || "";
		this.internal = internal;
		if (data2 instanceof Error) {
			this.data = data2.toString();
			this.error = data2;
		} else this.data = data2;
	}
};
function isRouteErrorResponse(error) {
	return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error;
}
function getRoutePattern(matches) {
	return matches.map((m) => m.route.path).filter(Boolean).join("/").replace(/\/\/*/g, "/") || "/";
}
var isBrowser$1 = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
function parseToInfo(_to, basename) {
	let to = _to;
	if (typeof to !== "string" || !ABSOLUTE_URL_REGEX$1.test(to)) return {
		absoluteURL: void 0,
		isExternal: false,
		to
	};
	let absoluteURL = to;
	let isExternal = false;
	if (isBrowser$1) try {
		let currentUrl = new URL(window.location.href);
		let targetUrl = to.startsWith("//") ? new URL(currentUrl.protocol + to) : new URL(to);
		let path = stripBasename(targetUrl.pathname, basename);
		if (targetUrl.origin === currentUrl.origin && path != null) to = path + targetUrl.search + targetUrl.hash;
		else isExternal = true;
	} catch (e) {
		warning(false, `<Link to="${to}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`);
	}
	return {
		absoluteURL,
		isExternal,
		to
	};
}
Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
var validMutationMethodsArr = [
	"POST",
	"PUT",
	"PATCH",
	"DELETE"
];
new Set(validMutationMethodsArr);
var validRequestMethodsArr = ["GET", ...validMutationMethodsArr];
new Set(validRequestMethodsArr);
var DataRouterContext = import_react.createContext(null);
DataRouterContext.displayName = "DataRouter";
var DataRouterStateContext = import_react.createContext(null);
DataRouterStateContext.displayName = "DataRouterState";
var RSCRouterContext = import_react.createContext(false);
var ViewTransitionContext = import_react.createContext({ isTransitioning: false });
ViewTransitionContext.displayName = "ViewTransition";
var FetchersContext = import_react.createContext(/* @__PURE__ */ new Map());
FetchersContext.displayName = "Fetchers";
var AwaitContext = import_react.createContext(null);
AwaitContext.displayName = "Await";
var NavigationContext = import_react.createContext(null);
NavigationContext.displayName = "Navigation";
var LocationContext = import_react.createContext(null);
LocationContext.displayName = "Location";
var RouteContext = import_react.createContext({
	outlet: null,
	matches: [],
	isDataRoute: false
});
RouteContext.displayName = "Route";
var RouteErrorContext = import_react.createContext(null);
RouteErrorContext.displayName = "RouteError";
var ERROR_DIGEST_BASE = "REACT_ROUTER_ERROR";
var ERROR_DIGEST_REDIRECT = "REDIRECT";
var ERROR_DIGEST_ROUTE_ERROR_RESPONSE = "ROUTE_ERROR_RESPONSE";
function decodeRedirectErrorDigest(digest) {
	if (digest.startsWith(`${ERROR_DIGEST_BASE}:${ERROR_DIGEST_REDIRECT}:{`)) try {
		let parsed = JSON.parse(digest.slice(28));
		if (typeof parsed === "object" && parsed && typeof parsed.status === "number" && typeof parsed.statusText === "string" && typeof parsed.location === "string" && typeof parsed.reloadDocument === "boolean" && typeof parsed.replace === "boolean") return parsed;
	} catch {}
}
function decodeRouteErrorResponseDigest(digest) {
	if (digest.startsWith(`${ERROR_DIGEST_BASE}:${ERROR_DIGEST_ROUTE_ERROR_RESPONSE}:{`)) try {
		let parsed = JSON.parse(digest.slice(40));
		if (typeof parsed === "object" && parsed && typeof parsed.status === "number" && typeof parsed.statusText === "string") return new ErrorResponseImpl(parsed.status, parsed.statusText, parsed.data);
	} catch {}
}
function useHref(to, { relative } = {}) {
	invariant(useInRouterContext(), `useHref() may be used only in the context of a <Router> component.`);
	let { basename, navigator } = import_react.useContext(NavigationContext);
	let { hash, pathname, search } = useResolvedPath(to, { relative });
	let joinedPathname = pathname;
	if (basename !== "/") joinedPathname = pathname === "/" ? basename : joinPaths([basename, pathname]);
	return navigator.createHref({
		pathname: joinedPathname,
		search,
		hash
	});
}
function useInRouterContext() {
	return import_react.useContext(LocationContext) != null;
}
function useLocation() {
	invariant(useInRouterContext(), `useLocation() may be used only in the context of a <Router> component.`);
	return import_react.useContext(LocationContext).location;
}
function useMatch(pattern) {
	invariant(useInRouterContext(), `useMatch() may be used only in the context of a <Router> component.`);
	let { pathname } = useLocation();
	return import_react.useMemo(() => matchPath(pattern, decodePath(pathname)), [pathname, pattern]);
}
var navigateEffectWarning = `You should call navigate() in a React.useEffect(), not when your component is first rendered.`;
function useIsomorphicLayoutEffect$3(cb) {
	if (!import_react.useContext(NavigationContext).static) import_react.useLayoutEffect(cb);
}
function useNavigate$1() {
	let { isDataRoute } = import_react.useContext(RouteContext);
	return isDataRoute ? useNavigateStable() : useNavigateUnstable();
}
function useNavigateUnstable() {
	invariant(useInRouterContext(), `useNavigate() may be used only in the context of a <Router> component.`);
	let dataRouterContext = import_react.useContext(DataRouterContext);
	let { basename, navigator } = import_react.useContext(NavigationContext);
	let { matches } = import_react.useContext(RouteContext);
	let { pathname: locationPathname } = useLocation();
	let routePathnamesJson = JSON.stringify(getResolveToMatches(matches));
	let activeRef = import_react.useRef(false);
	useIsomorphicLayoutEffect$3(() => {
		activeRef.current = true;
	});
	return import_react.useCallback((to, options = {}) => {
		warning(activeRef.current, navigateEffectWarning);
		if (!activeRef.current) return;
		if (typeof to === "number") {
			navigator.go(to);
			return;
		}
		let path = resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, options.relative === "path");
		if (dataRouterContext == null && basename !== "/") path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
		(!!options.replace ? navigator.replace : navigator.push)(path, options.state, options);
	}, [
		basename,
		navigator,
		routePathnamesJson,
		locationPathname,
		dataRouterContext
	]);
}
import_react.createContext(null);
function useParams() {
	let { matches } = import_react.useContext(RouteContext);
	let routeMatch = matches[matches.length - 1];
	return routeMatch ? routeMatch.params : {};
}
function useResolvedPath(to, { relative } = {}) {
	let { matches } = import_react.useContext(RouteContext);
	let { pathname: locationPathname } = useLocation();
	let routePathnamesJson = JSON.stringify(getResolveToMatches(matches));
	return import_react.useMemo(() => resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, relative === "path"), [
		to,
		routePathnamesJson,
		locationPathname,
		relative
	]);
}
function useRoutes(routes, locationArg) {
	return useRoutesImpl(routes, locationArg);
}
function useRoutesImpl(routes, locationArg, dataRouterOpts) {
	invariant(useInRouterContext(), `useRoutes() may be used only in the context of a <Router> component.`);
	let { navigator } = import_react.useContext(NavigationContext);
	let { matches: parentMatches } = import_react.useContext(RouteContext);
	let routeMatch = parentMatches[parentMatches.length - 1];
	let parentParams = routeMatch ? routeMatch.params : {};
	let parentPathname = routeMatch ? routeMatch.pathname : "/";
	let parentPathnameBase = routeMatch ? routeMatch.pathnameBase : "/";
	let parentRoute = routeMatch && routeMatch.route;
	{
		let parentPath = parentRoute && parentRoute.path || "";
		warningOnce(parentPathname, !parentRoute || parentPath.endsWith("*") || parentPath.endsWith("*?"), `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${parentPathname}" (under <Route path="${parentPath}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.

Please change the parent <Route path="${parentPath}"> to <Route path="${parentPath === "/" ? "*" : `${parentPath}/*`}">.`);
	}
	let locationFromContext = useLocation();
	let location;
	if (locationArg) {
		let parsedLocationArg = typeof locationArg === "string" ? parsePath(locationArg) : locationArg;
		invariant(parentPathnameBase === "/" || parsedLocationArg.pathname?.startsWith(parentPathnameBase), `When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${parentPathnameBase}" but pathname "${parsedLocationArg.pathname}" was given in the \`location\` prop.`);
		location = parsedLocationArg;
	} else location = locationFromContext;
	let pathname = location.pathname || "/";
	let remainingPathname = pathname;
	if (parentPathnameBase !== "/") {
		let parentSegments = parentPathnameBase.replace(/^\//, "").split("/");
		remainingPathname = "/" + pathname.replace(/^\//, "").split("/").slice(parentSegments.length).join("/");
	}
	let matches = matchRoutes(routes, { pathname: remainingPathname });
	warning(parentRoute || matches != null, `No routes matched location "${location.pathname}${location.search}${location.hash}" `);
	warning(matches == null || matches[matches.length - 1].route.element !== void 0 || matches[matches.length - 1].route.Component !== void 0 || matches[matches.length - 1].route.lazy !== void 0, `Matched leaf route at location "${location.pathname}${location.search}${location.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);
	let renderedMatches = _renderMatches(matches && matches.map((match) => Object.assign({}, match, {
		params: Object.assign({}, parentParams, match.params),
		pathname: joinPaths([parentPathnameBase, navigator.encodeLocation ? navigator.encodeLocation(match.pathname.replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : match.pathname]),
		pathnameBase: match.pathnameBase === "/" ? parentPathnameBase : joinPaths([parentPathnameBase, navigator.encodeLocation ? navigator.encodeLocation(match.pathnameBase.replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : match.pathnameBase])
	})), parentMatches, dataRouterOpts);
	if (locationArg && renderedMatches) return /* @__PURE__ */ import_react.createElement(LocationContext.Provider, { value: {
		location: {
			pathname: "/",
			search: "",
			hash: "",
			state: null,
			key: "default",
			unstable_mask: void 0,
			...location
		},
		navigationType: "POP"
	} }, renderedMatches);
	return renderedMatches;
}
function DefaultErrorComponent() {
	let error = useRouteError();
	let message = isRouteErrorResponse(error) ? `${error.status} ${error.statusText}` : error instanceof Error ? error.message : JSON.stringify(error);
	let stack = error instanceof Error ? error.stack : null;
	let lightgrey = "rgba(200,200,200, 0.5)";
	let preStyles = {
		padding: "0.5rem",
		backgroundColor: lightgrey
	};
	let codeStyles = {
		padding: "2px 4px",
		backgroundColor: lightgrey
	};
	let devInfo = null;
	console.error("Error handled by React Router default ErrorBoundary:", error);
	devInfo = /* @__PURE__ */ import_react.createElement(import_react.Fragment, null, /* @__PURE__ */ import_react.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ import_react.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ import_react.createElement("code", { style: codeStyles }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ import_react.createElement("code", { style: codeStyles }, "errorElement"), " prop on your route."));
	return /* @__PURE__ */ import_react.createElement(import_react.Fragment, null, /* @__PURE__ */ import_react.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ import_react.createElement("h3", { style: { fontStyle: "italic" } }, message), stack ? /* @__PURE__ */ import_react.createElement("pre", { style: preStyles }, stack) : null, devInfo);
}
var defaultErrorElement = /* @__PURE__ */ import_react.createElement(DefaultErrorComponent, null);
var RenderErrorBoundary = class extends import_react.Component {
	constructor(props) {
		super(props);
		this.state = {
			location: props.location,
			revalidation: props.revalidation,
			error: props.error
		};
	}
	static getDerivedStateFromError(error) {
		return { error };
	}
	static getDerivedStateFromProps(props, state) {
		if (state.location !== props.location || state.revalidation !== "idle" && props.revalidation === "idle") return {
			error: props.error,
			location: props.location,
			revalidation: props.revalidation
		};
		return {
			error: props.error !== void 0 ? props.error : state.error,
			location: state.location,
			revalidation: props.revalidation || state.revalidation
		};
	}
	componentDidCatch(error, errorInfo) {
		if (this.props.onError) this.props.onError(error, errorInfo);
		else console.error("React Router caught the following error during render", error);
	}
	render() {
		let error = this.state.error;
		if (this.context && typeof error === "object" && error && "digest" in error && typeof error.digest === "string") {
			const decoded = decodeRouteErrorResponseDigest(error.digest);
			if (decoded) error = decoded;
		}
		let result = error !== void 0 ? /* @__PURE__ */ import_react.createElement(RouteContext.Provider, { value: this.props.routeContext }, /* @__PURE__ */ import_react.createElement(RouteErrorContext.Provider, {
			value: error,
			children: this.props.component
		})) : this.props.children;
		if (this.context) return /* @__PURE__ */ import_react.createElement(RSCErrorHandler, { error }, result);
		return result;
	}
};
RenderErrorBoundary.contextType = RSCRouterContext;
var errorRedirectHandledMap = /* @__PURE__ */ new WeakMap();
function RSCErrorHandler({ children, error }) {
	let { basename } = import_react.useContext(NavigationContext);
	if (typeof error === "object" && error && "digest" in error && typeof error.digest === "string") {
		let redirect2 = decodeRedirectErrorDigest(error.digest);
		if (redirect2) {
			let existingRedirect = errorRedirectHandledMap.get(error);
			if (existingRedirect) throw existingRedirect;
			let parsed = parseToInfo(redirect2.location, basename);
			if (isBrowser$1 && !errorRedirectHandledMap.get(error)) if (parsed.isExternal || redirect2.reloadDocument) window.location.href = parsed.absoluteURL || parsed.to;
			else {
				const redirectPromise = Promise.resolve().then(() => window.__reactRouterDataRouter.navigate(parsed.to, { replace: redirect2.replace }));
				errorRedirectHandledMap.set(error, redirectPromise);
				throw redirectPromise;
			}
			return /* @__PURE__ */ import_react.createElement("meta", {
				httpEquiv: "refresh",
				content: `0;url=${parsed.absoluteURL || parsed.to}`
			});
		}
	}
	return children;
}
function RenderedRoute({ routeContext, match, children }) {
	let dataRouterContext = import_react.useContext(DataRouterContext);
	if (dataRouterContext && dataRouterContext.static && dataRouterContext.staticContext && (match.route.errorElement || match.route.ErrorBoundary)) dataRouterContext.staticContext._deepestRenderedBoundaryId = match.route.id;
	return /* @__PURE__ */ import_react.createElement(RouteContext.Provider, { value: routeContext }, children);
}
function _renderMatches(matches, parentMatches = [], dataRouterOpts) {
	let dataRouterState = dataRouterOpts?.state;
	if (matches == null) {
		if (!dataRouterState) return null;
		if (dataRouterState.errors) matches = dataRouterState.matches;
		else if (parentMatches.length === 0 && !dataRouterState.initialized && dataRouterState.matches.length > 0) matches = dataRouterState.matches;
		else return null;
	}
	let renderedMatches = matches;
	let errors = dataRouterState?.errors;
	if (errors != null) {
		let errorIndex = renderedMatches.findIndex((m) => m.route.id && errors?.[m.route.id] !== void 0);
		invariant(errorIndex >= 0, `Could not find a matching route for errors on route IDs: ${Object.keys(errors).join(",")}`);
		renderedMatches = renderedMatches.slice(0, Math.min(renderedMatches.length, errorIndex + 1));
	}
	let renderFallback = false;
	let fallbackIndex = -1;
	if (dataRouterOpts && dataRouterState) {
		renderFallback = dataRouterState.renderFallback;
		for (let i = 0; i < renderedMatches.length; i++) {
			let match = renderedMatches[i];
			if (match.route.HydrateFallback || match.route.hydrateFallbackElement) fallbackIndex = i;
			if (match.route.id) {
				let { loaderData, errors: errors2 } = dataRouterState;
				let needsToRunLoader = match.route.loader && !loaderData.hasOwnProperty(match.route.id) && (!errors2 || errors2[match.route.id] === void 0);
				if (match.route.lazy || needsToRunLoader) {
					if (dataRouterOpts.isStatic) renderFallback = true;
					if (fallbackIndex >= 0) renderedMatches = renderedMatches.slice(0, fallbackIndex + 1);
					else renderedMatches = [renderedMatches[0]];
					break;
				}
			}
		}
	}
	let onErrorHandler = dataRouterOpts?.onError;
	let onError = dataRouterState && onErrorHandler ? (error, errorInfo) => {
		onErrorHandler(error, {
			location: dataRouterState.location,
			params: dataRouterState.matches?.[0]?.params ?? {},
			unstable_pattern: getRoutePattern(dataRouterState.matches),
			errorInfo
		});
	} : void 0;
	return renderedMatches.reduceRight((outlet, match, index) => {
		let error;
		let shouldRenderHydrateFallback = false;
		let errorElement = null;
		let hydrateFallbackElement = null;
		if (dataRouterState) {
			error = errors && match.route.id ? errors[match.route.id] : void 0;
			errorElement = match.route.errorElement || defaultErrorElement;
			if (renderFallback) {
				if (fallbackIndex < 0 && index === 0) {
					warningOnce("route-fallback", false, "No `HydrateFallback` element provided to render during initial hydration");
					shouldRenderHydrateFallback = true;
					hydrateFallbackElement = null;
				} else if (fallbackIndex === index) {
					shouldRenderHydrateFallback = true;
					hydrateFallbackElement = match.route.hydrateFallbackElement || null;
				}
			}
		}
		let matches2 = parentMatches.concat(renderedMatches.slice(0, index + 1));
		let getChildren = () => {
			let children;
			if (error) children = errorElement;
			else if (shouldRenderHydrateFallback) children = hydrateFallbackElement;
			else if (match.route.Component) children = /* @__PURE__ */ import_react.createElement(match.route.Component, null);
			else if (match.route.element) children = match.route.element;
			else children = outlet;
			return /* @__PURE__ */ import_react.createElement(RenderedRoute, {
				match,
				routeContext: {
					outlet,
					matches: matches2,
					isDataRoute: dataRouterState != null
				},
				children
			});
		};
		return dataRouterState && (match.route.ErrorBoundary || match.route.errorElement || index === 0) ? /* @__PURE__ */ import_react.createElement(RenderErrorBoundary, {
			location: dataRouterState.location,
			revalidation: dataRouterState.revalidation,
			component: errorElement,
			error,
			children: getChildren(),
			routeContext: {
				outlet: null,
				matches: matches2,
				isDataRoute: true
			},
			onError
		}) : getChildren();
	}, null);
}
function getDataRouterConsoleError(hookName) {
	return `${hookName} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`;
}
function useDataRouterContext(hookName) {
	let ctx = import_react.useContext(DataRouterContext);
	invariant(ctx, getDataRouterConsoleError(hookName));
	return ctx;
}
function useDataRouterState(hookName) {
	let state = import_react.useContext(DataRouterStateContext);
	invariant(state, getDataRouterConsoleError(hookName));
	return state;
}
function useRouteContext(hookName) {
	let route = import_react.useContext(RouteContext);
	invariant(route, getDataRouterConsoleError(hookName));
	return route;
}
function useCurrentRouteId(hookName) {
	let route = useRouteContext(hookName);
	let thisRoute = route.matches[route.matches.length - 1];
	invariant(thisRoute.route.id, `${hookName} can only be used on routes that contain a unique "id"`);
	return thisRoute.route.id;
}
function useRouteId() {
	return useCurrentRouteId("useRouteId");
}
function useNavigation() {
	return useDataRouterState("useNavigation").navigation;
}
function useMatches() {
	let { matches, loaderData } = useDataRouterState("useMatches");
	return import_react.useMemo(() => matches.map((m) => convertRouteMatchToUiMatch(m, loaderData)), [matches, loaderData]);
}
function useRouteError() {
	let error = import_react.useContext(RouteErrorContext);
	let state = useDataRouterState("useRouteError");
	let routeId = useCurrentRouteId("useRouteError");
	if (error !== void 0) return error;
	return state.errors?.[routeId];
}
function useNavigateStable() {
	let { router } = useDataRouterContext("useNavigate");
	let id = useCurrentRouteId("useNavigate");
	let activeRef = import_react.useRef(false);
	useIsomorphicLayoutEffect$3(() => {
		activeRef.current = true;
	});
	return import_react.useCallback(async (to, options = {}) => {
		warning(activeRef.current, navigateEffectWarning);
		if (!activeRef.current) return;
		if (typeof to === "number") await router.navigate(to);
		else await router.navigate(to, {
			fromRouteId: id,
			...options
		});
	}, [router, id]);
}
var alreadyWarned = {};
function warningOnce(key, cond, message) {
	if (!cond && !alreadyWarned[key]) {
		alreadyWarned[key] = true;
		warning(false, message);
	}
}
import_react.useOptimistic;
import_react.memo(DataRoutes);
function DataRoutes({ routes, future, state, isStatic, onError }) {
	return useRoutesImpl(routes, void 0, {
		state,
		isStatic,
		onError,
		future
	});
}
function Navigate({ to, replace: replace2, state, relative }) {
	invariant(useInRouterContext(), `<Navigate> may be used only in the context of a <Router> component.`);
	let { static: isStatic } = import_react.useContext(NavigationContext);
	warning(!isStatic, `<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);
	let { matches } = import_react.useContext(RouteContext);
	let { pathname: locationPathname } = useLocation();
	let navigate = useNavigate$1();
	let path = resolveTo(to, getResolveToMatches(matches), locationPathname, relative === "path");
	let jsonPath = JSON.stringify(path);
	import_react.useEffect(() => {
		navigate(JSON.parse(jsonPath), {
			replace: replace2,
			state,
			relative
		});
	}, [
		navigate,
		jsonPath,
		relative,
		replace2,
		state
	]);
	return null;
}
function Route(props) {
	invariant(false, `A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`);
}
function Router({ basename: basenameProp = "/", children = null, location: locationProp, navigationType = "POP", navigator, static: staticProp = false, unstable_useTransitions }) {
	invariant(!useInRouterContext(), `You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);
	let basename = basenameProp.replace(/^\/*/, "/");
	let navigationContext = import_react.useMemo(() => ({
		basename,
		navigator,
		static: staticProp,
		unstable_useTransitions,
		future: {}
	}), [
		basename,
		navigator,
		staticProp,
		unstable_useTransitions
	]);
	if (typeof locationProp === "string") locationProp = parsePath(locationProp);
	let { pathname = "/", search = "", hash = "", state = null, key = "default", unstable_mask } = locationProp;
	let locationContext = import_react.useMemo(() => {
		let trailingPathname = stripBasename(pathname, basename);
		if (trailingPathname == null) return null;
		return {
			location: {
				pathname: trailingPathname,
				search,
				hash,
				state,
				key,
				unstable_mask
			},
			navigationType
		};
	}, [
		basename,
		pathname,
		search,
		hash,
		state,
		key,
		navigationType,
		unstable_mask
	]);
	warning(locationContext != null, `<Router basename="${basename}"> is not able to match the URL "${pathname}${search}${hash}" because it does not start with the basename, so the <Router> won't render anything.`);
	if (locationContext == null) return null;
	return /* @__PURE__ */ import_react.createElement(NavigationContext.Provider, { value: navigationContext }, /* @__PURE__ */ import_react.createElement(LocationContext.Provider, {
		children,
		value: locationContext
	}));
}
function Routes({ children, location }) {
	return useRoutes(createRoutesFromChildren(children), location);
}
import_react.Component;
function createRoutesFromChildren(children, parentPath = []) {
	let routes = [];
	import_react.Children.forEach(children, (element, index) => {
		if (!import_react.isValidElement(element)) return;
		let treePath = [...parentPath, index];
		if (element.type === import_react.Fragment) {
			routes.push.apply(routes, createRoutesFromChildren(element.props.children, treePath));
			return;
		}
		invariant(element.type === Route, `[${typeof element.type === "string" ? element.type : element.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`);
		invariant(!element.props.index || !element.props.children, "An index route cannot have child routes.");
		let route = {
			id: element.props.id || treePath.join("-"),
			caseSensitive: element.props.caseSensitive,
			element: element.props.element,
			Component: element.props.Component,
			index: element.props.index,
			path: element.props.path,
			middleware: element.props.middleware,
			loader: element.props.loader,
			action: element.props.action,
			hydrateFallbackElement: element.props.hydrateFallbackElement,
			HydrateFallback: element.props.HydrateFallback,
			errorElement: element.props.errorElement,
			ErrorBoundary: element.props.ErrorBoundary,
			hasErrorBoundary: element.props.hasErrorBoundary === true || element.props.ErrorBoundary != null || element.props.errorElement != null,
			shouldRevalidate: element.props.shouldRevalidate,
			handle: element.props.handle,
			lazy: element.props.lazy
		};
		if (element.props.children) route.children = createRoutesFromChildren(element.props.children, treePath);
		routes.push(route);
	});
	return routes;
}
var defaultMethod = "get";
var defaultEncType = "application/x-www-form-urlencoded";
function isHtmlElement(object) {
	return typeof HTMLElement !== "undefined" && object instanceof HTMLElement;
}
function isButtonElement(object) {
	return isHtmlElement(object) && object.tagName.toLowerCase() === "button";
}
function isFormElement(object) {
	return isHtmlElement(object) && object.tagName.toLowerCase() === "form";
}
function isInputElement(object) {
	return isHtmlElement(object) && object.tagName.toLowerCase() === "input";
}
function isModifiedEvent(event) {
	return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
}
function shouldProcessLinkClick(event, target) {
	return event.button === 0 && (!target || target === "_self") && !isModifiedEvent(event);
}
function createSearchParams(init = "") {
	return new URLSearchParams(typeof init === "string" || Array.isArray(init) || init instanceof URLSearchParams ? init : Object.keys(init).reduce((memo2, key) => {
		let value = init[key];
		return memo2.concat(Array.isArray(value) ? value.map((v) => [key, v]) : [[key, value]]);
	}, []));
}
function getSearchParamsForLocation(locationSearch, defaultSearchParams) {
	let searchParams = createSearchParams(locationSearch);
	if (defaultSearchParams) defaultSearchParams.forEach((_, key) => {
		if (!searchParams.has(key)) defaultSearchParams.getAll(key).forEach((value) => {
			searchParams.append(key, value);
		});
	});
	return searchParams;
}
var _formDataSupportsSubmitter = null;
function isFormDataSubmitterSupported() {
	if (_formDataSupportsSubmitter === null) try {
		new FormData(document.createElement("form"), 0);
		_formDataSupportsSubmitter = false;
	} catch (e) {
		_formDataSupportsSubmitter = true;
	}
	return _formDataSupportsSubmitter;
}
var supportedFormEncTypes = /* @__PURE__ */ new Set([
	"application/x-www-form-urlencoded",
	"multipart/form-data",
	"text/plain"
]);
function getFormEncType(encType) {
	if (encType != null && !supportedFormEncTypes.has(encType)) {
		warning(false, `"${encType}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${defaultEncType}"`);
		return null;
	}
	return encType;
}
function getFormSubmissionInfo(target, basename) {
	let method;
	let action;
	let encType;
	let formData;
	let body;
	if (isFormElement(target)) {
		let attr = target.getAttribute("action");
		action = attr ? stripBasename(attr, basename) : null;
		method = target.getAttribute("method") || defaultMethod;
		encType = getFormEncType(target.getAttribute("enctype")) || defaultEncType;
		formData = new FormData(target);
	} else if (isButtonElement(target) || isInputElement(target) && (target.type === "submit" || target.type === "image")) {
		let form = target.form;
		if (form == null) throw new Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);
		let attr = target.getAttribute("formaction") || form.getAttribute("action");
		action = attr ? stripBasename(attr, basename) : null;
		method = target.getAttribute("formmethod") || form.getAttribute("method") || defaultMethod;
		encType = getFormEncType(target.getAttribute("formenctype")) || getFormEncType(form.getAttribute("enctype")) || defaultEncType;
		formData = new FormData(form, target);
		if (!isFormDataSubmitterSupported()) {
			let { name, type, value } = target;
			if (type === "image") {
				let prefix = name ? `${name}.` : "";
				formData.append(`${prefix}x`, "0");
				formData.append(`${prefix}y`, "0");
			} else if (name) formData.append(name, value);
		}
	} else if (isHtmlElement(target)) throw new Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);
	else {
		method = defaultMethod;
		action = null;
		encType = defaultEncType;
		body = target;
	}
	if (formData && encType === "text/plain") {
		body = formData;
		formData = void 0;
	}
	return {
		action,
		method: method.toLowerCase(),
		encType,
		formData,
		body
	};
}
Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
var ESCAPE_LOOKUP = {
	"&": "\\u0026",
	">": "\\u003e",
	"<": "\\u003c",
	"\u2028": "\\u2028",
	"\u2029": "\\u2029"
};
var ESCAPE_REGEX = /[&><\u2028\u2029]/g;
function escapeHtml(html) {
	return html.replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match]);
}
function invariant2(value, message) {
	if (value === false || value === null || typeof value === "undefined") throw new Error(message);
}
function singleFetchUrl(reqUrl, basename, trailingSlashAware, extension) {
	let url = typeof reqUrl === "string" ? new URL(reqUrl, typeof window === "undefined" ? "server://singlefetch/" : window.location.origin) : reqUrl;
	if (trailingSlashAware) if (url.pathname.endsWith("/")) url.pathname = `${url.pathname}_.${extension}`;
	else url.pathname = `${url.pathname}.${extension}`;
	else if (url.pathname === "/") url.pathname = `_root.${extension}`;
	else if (basename && stripBasename(url.pathname, basename) === "/") url.pathname = `${basename.replace(/\/$/, "")}/_root.${extension}`;
	else url.pathname = `${url.pathname.replace(/\/$/, "")}.${extension}`;
	return url;
}
async function loadRouteModule(route, routeModulesCache) {
	if (route.id in routeModulesCache) return routeModulesCache[route.id];
	try {
		let routeModule = await __vitePreload(() => import(
			/* @vite-ignore */
			/* webpackIgnore: true */
			route.module
), []);
		routeModulesCache[route.id] = routeModule;
		return routeModule;
	} catch (error) {
		console.error(`Error loading route module \`${route.module}\`, reloading page...`);
		console.error(error);
		if (window.__reactRouterContext && window.__reactRouterContext.isSpaMode && void 0);
		window.location.reload();
		return new Promise(() => {});
	}
}
function isPageLinkDescriptor(object) {
	return object != null && typeof object.page === "string";
}
function isHtmlLinkDescriptor(object) {
	if (object == null) return false;
	if (object.href == null) return object.rel === "preload" && typeof object.imageSrcSet === "string" && typeof object.imageSizes === "string";
	return typeof object.rel === "string" && typeof object.href === "string";
}
async function getKeyedPrefetchLinks(matches, manifest, routeModules) {
	return dedupeLinkDescriptors((await Promise.all(matches.map(async (match) => {
		let route = manifest.routes[match.route.id];
		if (route) {
			let mod = await loadRouteModule(route, routeModules);
			return mod.links ? mod.links() : [];
		}
		return [];
	}))).flat(1).filter(isHtmlLinkDescriptor).filter((link) => link.rel === "stylesheet" || link.rel === "preload").map((link) => link.rel === "stylesheet" ? {
		...link,
		rel: "prefetch",
		as: "style"
	} : {
		...link,
		rel: "prefetch"
	}));
}
function getNewMatchesForLinks(page, nextMatches, currentMatches, manifest, location, mode) {
	let isNew = (match, index) => {
		if (!currentMatches[index]) return true;
		return match.route.id !== currentMatches[index].route.id;
	};
	let matchPathChanged = (match, index) => {
		return currentMatches[index].pathname !== match.pathname || currentMatches[index].route.path?.endsWith("*") && currentMatches[index].params["*"] !== match.params["*"];
	};
	if (mode === "assets") return nextMatches.filter((match, index) => isNew(match, index) || matchPathChanged(match, index));
	if (mode === "data") return nextMatches.filter((match, index) => {
		let manifestRoute = manifest.routes[match.route.id];
		if (!manifestRoute || !manifestRoute.hasLoader) return false;
		if (isNew(match, index) || matchPathChanged(match, index)) return true;
		if (match.route.shouldRevalidate) {
			let routeChoice = match.route.shouldRevalidate({
				currentUrl: new URL(location.pathname + location.search + location.hash, window.origin),
				currentParams: currentMatches[0]?.params || {},
				nextUrl: new URL(page, window.origin),
				nextParams: match.params,
				defaultShouldRevalidate: true
			});
			if (typeof routeChoice === "boolean") return routeChoice;
		}
		return true;
	});
	return [];
}
function getModuleLinkHrefs(matches, manifest, { includeHydrateFallback } = {}) {
	return dedupeHrefs(matches.map((match) => {
		let route = manifest.routes[match.route.id];
		if (!route) return [];
		let hrefs = [route.module];
		if (route.clientActionModule) hrefs = hrefs.concat(route.clientActionModule);
		if (route.clientLoaderModule) hrefs = hrefs.concat(route.clientLoaderModule);
		if (includeHydrateFallback && route.hydrateFallbackModule) hrefs = hrefs.concat(route.hydrateFallbackModule);
		if (route.imports) hrefs = hrefs.concat(route.imports);
		return hrefs;
	}).flat(1));
}
function dedupeHrefs(hrefs) {
	return [...new Set(hrefs)];
}
function sortKeys(obj) {
	let sorted = {};
	let keys = Object.keys(obj).sort();
	for (let key of keys) sorted[key] = obj[key];
	return sorted;
}
function dedupeLinkDescriptors(descriptors, preloads) {
	let set = /* @__PURE__ */ new Set();
	let preloadsSet = new Set(preloads);
	return descriptors.reduce((deduped, descriptor) => {
		if (preloads && !isPageLinkDescriptor(descriptor) && descriptor.as === "script" && descriptor.href && preloadsSet.has(descriptor.href)) return deduped;
		let key = JSON.stringify(sortKeys(descriptor));
		if (!set.has(key)) {
			set.add(key);
			deduped.push({
				key,
				link: descriptor
			});
		}
		return deduped;
	}, []);
}
function useDataRouterContext2() {
	let context = import_react.useContext(DataRouterContext);
	invariant2(context, "You must render this element inside a <DataRouterContext.Provider> element");
	return context;
}
function useDataRouterStateContext() {
	let context = import_react.useContext(DataRouterStateContext);
	invariant2(context, "You must render this element inside a <DataRouterStateContext.Provider> element");
	return context;
}
var FrameworkContext = import_react.createContext(void 0);
FrameworkContext.displayName = "FrameworkContext";
function useFrameworkContext() {
	let context = import_react.useContext(FrameworkContext);
	invariant2(context, "You must render this element inside a <HydratedRouter> element");
	return context;
}
function usePrefetchBehavior(prefetch, theirElementProps) {
	let frameworkContext = import_react.useContext(FrameworkContext);
	let [maybePrefetch, setMaybePrefetch] = import_react.useState(false);
	let [shouldPrefetch, setShouldPrefetch] = import_react.useState(false);
	let { onFocus, onBlur, onMouseEnter, onMouseLeave, onTouchStart } = theirElementProps;
	let ref = import_react.useRef(null);
	import_react.useEffect(() => {
		if (prefetch === "render") setShouldPrefetch(true);
		if (prefetch === "viewport") {
			let callback = (entries) => {
				entries.forEach((entry) => {
					setShouldPrefetch(entry.isIntersecting);
				});
			};
			let observer = new IntersectionObserver(callback, { threshold: .5 });
			if (ref.current) observer.observe(ref.current);
			return () => {
				observer.disconnect();
			};
		}
	}, [prefetch]);
	import_react.useEffect(() => {
		if (maybePrefetch) {
			let id = setTimeout(() => {
				setShouldPrefetch(true);
			}, 100);
			return () => {
				clearTimeout(id);
			};
		}
	}, [maybePrefetch]);
	let setIntent = () => {
		setMaybePrefetch(true);
	};
	let cancelIntent = () => {
		setMaybePrefetch(false);
		setShouldPrefetch(false);
	};
	if (!frameworkContext) return [
		false,
		ref,
		{}
	];
	if (prefetch !== "intent") return [
		shouldPrefetch,
		ref,
		{}
	];
	return [
		shouldPrefetch,
		ref,
		{
			onFocus: composeEventHandlers(onFocus, setIntent),
			onBlur: composeEventHandlers(onBlur, cancelIntent),
			onMouseEnter: composeEventHandlers(onMouseEnter, setIntent),
			onMouseLeave: composeEventHandlers(onMouseLeave, cancelIntent),
			onTouchStart: composeEventHandlers(onTouchStart, setIntent)
		}
	];
}
function composeEventHandlers(theirHandler, ourHandler) {
	return (event) => {
		theirHandler && theirHandler(event);
		if (!event.defaultPrevented) ourHandler(event);
	};
}
function PrefetchPageLinks({ page, ...linkProps }) {
	let { router } = useDataRouterContext2();
	let matches = import_react.useMemo(() => matchRoutes(router.routes, page, router.basename), [
		router.routes,
		page,
		router.basename
	]);
	if (!matches) return null;
	return /* @__PURE__ */ import_react.createElement(PrefetchPageLinksImpl, {
		page,
		matches,
		...linkProps
	});
}
function useKeyedPrefetchLinks(matches) {
	let { manifest, routeModules } = useFrameworkContext();
	let [keyedPrefetchLinks, setKeyedPrefetchLinks] = import_react.useState([]);
	import_react.useEffect(() => {
		let interrupted = false;
		getKeyedPrefetchLinks(matches, manifest, routeModules).then((links) => {
			if (!interrupted) setKeyedPrefetchLinks(links);
		});
		return () => {
			interrupted = true;
		};
	}, [
		matches,
		manifest,
		routeModules
	]);
	return keyedPrefetchLinks;
}
function PrefetchPageLinksImpl({ page, matches: nextMatches, ...linkProps }) {
	let location = useLocation();
	let { future, manifest, routeModules } = useFrameworkContext();
	let { basename } = useDataRouterContext2();
	let { loaderData, matches } = useDataRouterStateContext();
	let newMatchesForData = import_react.useMemo(() => getNewMatchesForLinks(page, nextMatches, matches, manifest, location, "data"), [
		page,
		nextMatches,
		matches,
		manifest,
		location
	]);
	let newMatchesForAssets = import_react.useMemo(() => getNewMatchesForLinks(page, nextMatches, matches, manifest, location, "assets"), [
		page,
		nextMatches,
		matches,
		manifest,
		location
	]);
	let dataHrefs = import_react.useMemo(() => {
		if (page === location.pathname + location.search + location.hash) return [];
		let routesParams = /* @__PURE__ */ new Set();
		let foundOptOutRoute = false;
		nextMatches.forEach((m) => {
			let manifestRoute = manifest.routes[m.route.id];
			if (!manifestRoute || !manifestRoute.hasLoader) return;
			if (!newMatchesForData.some((m2) => m2.route.id === m.route.id) && m.route.id in loaderData && routeModules[m.route.id]?.shouldRevalidate) foundOptOutRoute = true;
			else if (manifestRoute.hasClientLoader) foundOptOutRoute = true;
			else routesParams.add(m.route.id);
		});
		if (routesParams.size === 0) return [];
		let url = singleFetchUrl(page, basename, future.unstable_trailingSlashAwareDataRequests, "data");
		if (foundOptOutRoute && routesParams.size > 0) url.searchParams.set("_routes", nextMatches.filter((m) => routesParams.has(m.route.id)).map((m) => m.route.id).join(","));
		return [url.pathname + url.search];
	}, [
		basename,
		future.unstable_trailingSlashAwareDataRequests,
		loaderData,
		location,
		manifest,
		newMatchesForData,
		nextMatches,
		page,
		routeModules
	]);
	let moduleHrefs = import_react.useMemo(() => getModuleLinkHrefs(newMatchesForAssets, manifest), [newMatchesForAssets, manifest]);
	let keyedPrefetchLinks = useKeyedPrefetchLinks(newMatchesForAssets);
	return /* @__PURE__ */ import_react.createElement(import_react.Fragment, null, dataHrefs.map((href) => /* @__PURE__ */ import_react.createElement("link", {
		key: href,
		rel: "prefetch",
		as: "fetch",
		href,
		...linkProps
	})), moduleHrefs.map((href) => /* @__PURE__ */ import_react.createElement("link", {
		key: href,
		rel: "modulepreload",
		href,
		...linkProps
	})), keyedPrefetchLinks.map(({ key, link }) => /* @__PURE__ */ import_react.createElement("link", {
		key,
		nonce: linkProps.nonce,
		...link,
		crossOrigin: link.crossOrigin ?? linkProps.crossOrigin
	})));
}
function mergeRefs(...refs) {
	return (value) => {
		refs.forEach((ref) => {
			if (typeof ref === "function") ref(value);
			else if (ref != null) ref.current = value;
		});
	};
}
import_react.Component;
var isBrowser2 = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
try {
	if (isBrowser2) window.__reactRouterVersion = "7.13.1";
} catch (e) {}
function BrowserRouter({ basename, children, unstable_useTransitions, window: window2 }) {
	let historyRef = import_react.useRef();
	if (historyRef.current == null) historyRef.current = createBrowserHistory({
		window: window2,
		v5Compat: true
	});
	let history = historyRef.current;
	let [state, setStateImpl] = import_react.useState({
		action: history.action,
		location: history.location
	});
	let setState = import_react.useCallback((newState) => {
		if (unstable_useTransitions === false) setStateImpl(newState);
		else import_react.startTransition(() => setStateImpl(newState));
	}, [unstable_useTransitions]);
	import_react.useLayoutEffect(() => history.listen(setState), [history, setState]);
	return /* @__PURE__ */ import_react.createElement(Router, {
		basename,
		children,
		location: state.location,
		navigationType: state.action,
		navigator: history,
		unstable_useTransitions
	});
}
function HistoryRouter({ basename, children, history, unstable_useTransitions }) {
	let [state, setStateImpl] = import_react.useState({
		action: history.action,
		location: history.location
	});
	let setState = import_react.useCallback((newState) => {
		if (unstable_useTransitions === false) setStateImpl(newState);
		else import_react.startTransition(() => setStateImpl(newState));
	}, [unstable_useTransitions]);
	import_react.useLayoutEffect(() => history.listen(setState), [history, setState]);
	return /* @__PURE__ */ import_react.createElement(Router, {
		basename,
		children,
		location: state.location,
		navigationType: state.action,
		navigator: history,
		unstable_useTransitions
	});
}
HistoryRouter.displayName = "unstable_HistoryRouter";
var ABSOLUTE_URL_REGEX2 = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
var Link$1 = import_react.forwardRef(function LinkWithRef({ onClick, discover = "render", prefetch = "none", relative, reloadDocument, replace: replace2, unstable_mask, state, target, to, preventScrollReset, viewTransition, unstable_defaultShouldRevalidate, ...rest }, forwardedRef) {
	let { basename, navigator, unstable_useTransitions } = import_react.useContext(NavigationContext);
	let isAbsolute = typeof to === "string" && ABSOLUTE_URL_REGEX2.test(to);
	let parsed = parseToInfo(to, basename);
	to = parsed.to;
	let href = useHref(to, { relative });
	let location = useLocation();
	let maskedHref = null;
	if (unstable_mask) {
		let resolved = resolveTo(unstable_mask, [], location.unstable_mask ? location.unstable_mask.pathname : "/", true);
		if (basename !== "/") resolved.pathname = resolved.pathname === "/" ? basename : joinPaths([basename, resolved.pathname]);
		maskedHref = navigator.createHref(resolved);
	}
	let [shouldPrefetch, prefetchRef, prefetchHandlers] = usePrefetchBehavior(prefetch, rest);
	let internalOnClick = useLinkClickHandler(to, {
		replace: replace2,
		unstable_mask,
		state,
		target,
		preventScrollReset,
		relative,
		viewTransition,
		unstable_defaultShouldRevalidate,
		unstable_useTransitions
	});
	function handleClick(event) {
		if (onClick) onClick(event);
		if (!event.defaultPrevented) internalOnClick(event);
	}
	let isSpaLink = !(parsed.isExternal || reloadDocument);
	let link = /* @__PURE__ */ import_react.createElement("a", {
		...rest,
		...prefetchHandlers,
		href: (isSpaLink ? maskedHref : void 0) || parsed.absoluteURL || href,
		onClick: isSpaLink ? handleClick : onClick,
		ref: mergeRefs(forwardedRef, prefetchRef),
		target,
		"data-discover": !isAbsolute && discover === "render" ? "true" : void 0
	});
	return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ import_react.createElement(import_react.Fragment, null, link, /* @__PURE__ */ import_react.createElement(PrefetchPageLinks, { page: href })) : link;
});
Link$1.displayName = "Link";
var NavLink = import_react.forwardRef(function NavLinkWithRef({ "aria-current": ariaCurrentProp = "page", caseSensitive = false, className: classNameProp = "", end = false, style: styleProp, to, viewTransition, children, ...rest }, ref) {
	let path = useResolvedPath(to, { relative: rest.relative });
	let location = useLocation();
	let routerState = import_react.useContext(DataRouterStateContext);
	let { navigator, basename } = import_react.useContext(NavigationContext);
	let isTransitioning = routerState != null && useViewTransitionState(path) && viewTransition === true;
	let toPathname = navigator.encodeLocation ? navigator.encodeLocation(path).pathname : path.pathname;
	let locationPathname = location.pathname;
	let nextLocationPathname = routerState && routerState.navigation && routerState.navigation.location ? routerState.navigation.location.pathname : null;
	if (!caseSensitive) {
		locationPathname = locationPathname.toLowerCase();
		nextLocationPathname = nextLocationPathname ? nextLocationPathname.toLowerCase() : null;
		toPathname = toPathname.toLowerCase();
	}
	if (nextLocationPathname && basename) nextLocationPathname = stripBasename(nextLocationPathname, basename) || nextLocationPathname;
	const endSlashPosition = toPathname !== "/" && toPathname.endsWith("/") ? toPathname.length - 1 : toPathname.length;
	let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === "/";
	let isPending = nextLocationPathname != null && (nextLocationPathname === toPathname || !end && nextLocationPathname.startsWith(toPathname) && nextLocationPathname.charAt(toPathname.length) === "/");
	let renderProps = {
		isActive,
		isPending,
		isTransitioning
	};
	let ariaCurrent = isActive ? ariaCurrentProp : void 0;
	let className;
	if (typeof classNameProp === "function") className = classNameProp(renderProps);
	else className = [
		classNameProp,
		isActive ? "active" : null,
		isPending ? "pending" : null,
		isTransitioning ? "transitioning" : null
	].filter(Boolean).join(" ");
	let style = typeof styleProp === "function" ? styleProp(renderProps) : styleProp;
	return /* @__PURE__ */ import_react.createElement(Link$1, {
		...rest,
		"aria-current": ariaCurrent,
		className,
		ref,
		style,
		to,
		viewTransition
	}, typeof children === "function" ? children(renderProps) : children);
});
NavLink.displayName = "NavLink";
var Form = import_react.forwardRef(({ discover = "render", fetcherKey, navigate, reloadDocument, replace: replace2, state, method = defaultMethod, action, onSubmit, relative, preventScrollReset, viewTransition, unstable_defaultShouldRevalidate, ...props }, forwardedRef) => {
	let { unstable_useTransitions } = import_react.useContext(NavigationContext);
	let submit = useSubmit();
	let formAction = useFormAction(action, { relative });
	let formMethod = method.toLowerCase() === "get" ? "get" : "post";
	let isAbsolute = typeof action === "string" && ABSOLUTE_URL_REGEX2.test(action);
	let submitHandler = (event) => {
		onSubmit && onSubmit(event);
		if (event.defaultPrevented) return;
		event.preventDefault();
		let submitter = event.nativeEvent.submitter;
		let submitMethod = submitter?.getAttribute("formmethod") || method;
		let doSubmit = () => submit(submitter || event.currentTarget, {
			fetcherKey,
			method: submitMethod,
			navigate,
			replace: replace2,
			state,
			relative,
			preventScrollReset,
			viewTransition,
			unstable_defaultShouldRevalidate
		});
		if (unstable_useTransitions && navigate !== false) import_react.startTransition(() => doSubmit());
		else doSubmit();
	};
	return /* @__PURE__ */ import_react.createElement("form", {
		ref: forwardedRef,
		method: formMethod,
		action: formAction,
		onSubmit: reloadDocument ? onSubmit : submitHandler,
		...props,
		"data-discover": !isAbsolute && discover === "render" ? "true" : void 0
	});
});
Form.displayName = "Form";
function ScrollRestoration({ getKey, storageKey, ...props }) {
	let remixContext = import_react.useContext(FrameworkContext);
	let { basename } = import_react.useContext(NavigationContext);
	let location = useLocation();
	let matches = useMatches();
	useScrollRestoration({
		getKey,
		storageKey
	});
	let ssrKey = import_react.useMemo(() => {
		if (!remixContext || !getKey) return null;
		let userKey = getScrollRestorationKey(location, matches, basename, getKey);
		return userKey !== location.key ? userKey : null;
	}, []);
	if (!remixContext || remixContext.isSpaMode) return null;
	let restoreScroll = ((storageKey2, restoreKey) => {
		if (!window.history.state || !window.history.state.key) {
			let key = Math.random().toString(32).slice(2);
			window.history.replaceState({ key }, "");
		}
		try {
			let storedY = JSON.parse(sessionStorage.getItem(storageKey2) || "{}")[restoreKey || window.history.state.key];
			if (typeof storedY === "number") window.scrollTo(0, storedY);
		} catch (error) {
			console.error(error);
			sessionStorage.removeItem(storageKey2);
		}
	}).toString();
	return /* @__PURE__ */ import_react.createElement("script", {
		...props,
		suppressHydrationWarning: true,
		dangerouslySetInnerHTML: { __html: `(${restoreScroll})(${escapeHtml(JSON.stringify(storageKey || SCROLL_RESTORATION_STORAGE_KEY))}, ${escapeHtml(JSON.stringify(ssrKey))})` }
	});
}
ScrollRestoration.displayName = "ScrollRestoration";
function getDataRouterConsoleError2(hookName) {
	return `${hookName} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`;
}
function useDataRouterContext3(hookName) {
	let ctx = import_react.useContext(DataRouterContext);
	invariant(ctx, getDataRouterConsoleError2(hookName));
	return ctx;
}
function useDataRouterState2(hookName) {
	let state = import_react.useContext(DataRouterStateContext);
	invariant(state, getDataRouterConsoleError2(hookName));
	return state;
}
function useLinkClickHandler(to, { target, replace: replaceProp, unstable_mask, state, preventScrollReset, relative, viewTransition, unstable_defaultShouldRevalidate, unstable_useTransitions } = {}) {
	let navigate = useNavigate$1();
	let location = useLocation();
	let path = useResolvedPath(to, { relative });
	return import_react.useCallback((event) => {
		if (shouldProcessLinkClick(event, target)) {
			event.preventDefault();
			let replace2 = replaceProp !== void 0 ? replaceProp : createPath(location) === createPath(path);
			let doNavigate = () => navigate(to, {
				replace: replace2,
				unstable_mask,
				state,
				preventScrollReset,
				relative,
				viewTransition,
				unstable_defaultShouldRevalidate
			});
			if (unstable_useTransitions) import_react.startTransition(() => doNavigate());
			else doNavigate();
		}
	}, [
		location,
		navigate,
		path,
		replaceProp,
		unstable_mask,
		state,
		target,
		to,
		preventScrollReset,
		relative,
		viewTransition,
		unstable_defaultShouldRevalidate,
		unstable_useTransitions
	]);
}
function useSearchParams(defaultInit) {
	warning(typeof URLSearchParams !== "undefined", `You cannot use the \`useSearchParams\` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.`);
	let defaultSearchParamsRef = import_react.useRef(createSearchParams(defaultInit));
	let hasSetSearchParamsRef = import_react.useRef(false);
	let location = useLocation();
	let searchParams = import_react.useMemo(() => getSearchParamsForLocation(location.search, hasSetSearchParamsRef.current ? null : defaultSearchParamsRef.current), [location.search]);
	let navigate = useNavigate$1();
	return [searchParams, import_react.useCallback((nextInit, navigateOptions) => {
		const newSearchParams = createSearchParams(typeof nextInit === "function" ? nextInit(new URLSearchParams(searchParams)) : nextInit);
		hasSetSearchParamsRef.current = true;
		navigate("?" + newSearchParams, navigateOptions);
	}, [navigate, searchParams])];
}
var fetcherId = 0;
var getUniqueFetcherId = () => `__${String(++fetcherId)}__`;
function useSubmit() {
	let { router } = useDataRouterContext3("useSubmit");
	let { basename } = import_react.useContext(NavigationContext);
	let currentRouteId = useRouteId();
	let routerFetch = router.fetch;
	let routerNavigate = router.navigate;
	return import_react.useCallback(async (target, options = {}) => {
		let { action, method, encType, formData, body } = getFormSubmissionInfo(target, basename);
		if (options.navigate === false) await routerFetch(options.fetcherKey || getUniqueFetcherId(), currentRouteId, options.action || action, {
			unstable_defaultShouldRevalidate: options.unstable_defaultShouldRevalidate,
			preventScrollReset: options.preventScrollReset,
			formData,
			body,
			formMethod: options.method || method,
			formEncType: options.encType || encType,
			flushSync: options.flushSync
		});
		else await routerNavigate(options.action || action, {
			unstable_defaultShouldRevalidate: options.unstable_defaultShouldRevalidate,
			preventScrollReset: options.preventScrollReset,
			formData,
			body,
			formMethod: options.method || method,
			formEncType: options.encType || encType,
			replace: options.replace,
			state: options.state,
			fromRouteId: currentRouteId,
			flushSync: options.flushSync,
			viewTransition: options.viewTransition
		});
	}, [
		routerFetch,
		routerNavigate,
		basename,
		currentRouteId
	]);
}
function useFormAction(action, { relative } = {}) {
	let { basename } = import_react.useContext(NavigationContext);
	let routeContext = import_react.useContext(RouteContext);
	invariant(routeContext, "useFormAction must be used inside a RouteContext");
	let [match] = routeContext.matches.slice(-1);
	let path = { ...useResolvedPath(action ? action : ".", { relative }) };
	let location = useLocation();
	if (action == null) {
		path.search = location.search;
		let params = new URLSearchParams(path.search);
		let indexValues = params.getAll("index");
		if (indexValues.some((v) => v === "")) {
			params.delete("index");
			indexValues.filter((v) => v).forEach((v) => params.append("index", v));
			let qs = params.toString();
			path.search = qs ? `?${qs}` : "";
		}
	}
	if ((!action || action === ".") && match.route.index) path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index";
	if (basename !== "/") path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
	return createPath(path);
}
var SCROLL_RESTORATION_STORAGE_KEY = "react-router-scroll-positions";
var savedScrollPositions = {};
function getScrollRestorationKey(location, matches, basename, getKey) {
	let key = null;
	if (getKey) if (basename !== "/") key = getKey({
		...location,
		pathname: stripBasename(location.pathname, basename) || location.pathname
	}, matches);
	else key = getKey(location, matches);
	if (key == null) key = location.key;
	return key;
}
function useScrollRestoration({ getKey, storageKey } = {}) {
	let { router } = useDataRouterContext3("useScrollRestoration");
	let { restoreScrollPosition, preventScrollReset } = useDataRouterState2("useScrollRestoration");
	let { basename } = import_react.useContext(NavigationContext);
	let location = useLocation();
	let matches = useMatches();
	let navigation = useNavigation();
	import_react.useEffect(() => {
		window.history.scrollRestoration = "manual";
		return () => {
			window.history.scrollRestoration = "auto";
		};
	}, []);
	usePageHide(import_react.useCallback(() => {
		if (navigation.state === "idle") {
			let key = getScrollRestorationKey(location, matches, basename, getKey);
			savedScrollPositions[key] = window.scrollY;
		}
		try {
			sessionStorage.setItem(storageKey || SCROLL_RESTORATION_STORAGE_KEY, JSON.stringify(savedScrollPositions));
		} catch (error) {
			warning(false, `Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${error}).`);
		}
		window.history.scrollRestoration = "auto";
	}, [
		navigation.state,
		getKey,
		basename,
		location,
		matches,
		storageKey
	]));
	if (typeof document !== "undefined") {
		import_react.useLayoutEffect(() => {
			try {
				let sessionPositions = sessionStorage.getItem(storageKey || SCROLL_RESTORATION_STORAGE_KEY);
				if (sessionPositions) savedScrollPositions = JSON.parse(sessionPositions);
			} catch (e) {}
		}, [storageKey]);
		import_react.useLayoutEffect(() => {
			let disableScrollRestoration = router?.enableScrollRestoration(savedScrollPositions, () => window.scrollY, getKey ? (location2, matches2) => getScrollRestorationKey(location2, matches2, basename, getKey) : void 0);
			return () => disableScrollRestoration && disableScrollRestoration();
		}, [
			router,
			basename,
			getKey
		]);
		import_react.useLayoutEffect(() => {
			if (restoreScrollPosition === false) return;
			if (typeof restoreScrollPosition === "number") {
				window.scrollTo(0, restoreScrollPosition);
				return;
			}
			try {
				if (location.hash) {
					let el = document.getElementById(decodeURIComponent(location.hash.slice(1)));
					if (el) {
						el.scrollIntoView();
						return;
					}
				}
			} catch {
				warning(false, `"${location.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`);
			}
			if (preventScrollReset === true) return;
			window.scrollTo(0, 0);
		}, [
			location,
			restoreScrollPosition,
			preventScrollReset
		]);
	}
}
function usePageHide(callback, options) {
	let { capture } = options || {};
	import_react.useEffect(() => {
		let opts = capture != null ? { capture } : void 0;
		window.addEventListener("pagehide", callback, opts);
		return () => {
			window.removeEventListener("pagehide", callback, opts);
		};
	}, [callback, capture]);
}
function useViewTransitionState(to, { relative } = {}) {
	let vtContext = import_react.useContext(ViewTransitionContext);
	invariant(vtContext != null, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");
	let { basename } = useDataRouterContext3("useViewTransitionState");
	let path = useResolvedPath(to, { relative });
	if (!vtContext.isTransitioning) return false;
	let currentPath = stripBasename(vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;
	let nextPath = stripBasename(vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;
	return matchPath(path.pathname, nextPath) != null || matchPath(path.pathname, currentPath) != null;
}
//#endregion
//#region ../component-library/src/View.tsx
var viewStyles = css({
	alignItems: "stretch",
	borderWidth: 0,
	borderStyle: "solid",
	boxSizing: "border-box",
	display: "flex",
	flexDirection: "column",
	margin: 0,
	padding: 0,
	position: "relative",
	minHeight: 0,
	minWidth: 0
});
var View = (0, import_react.forwardRef)((props, ref) => {
	const { className = "", style, nativeStyle, innerRef, ...restProps } = props;
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
		...restProps,
		ref: innerRef ?? ref,
		style: nativeStyle,
		className: cx(viewStyles, className, style && Object.keys(style).length > 0 ? css(style) : void 0)
	});
});
View.displayName = "View";
//#endregion
//#region src/budget/queries.ts
var categoryQueries = {
	all: () => ["categories"],
	lists: () => [...categoryQueries.all(), "lists"],
	list: () => queryOptions({
		queryKey: [...categoryQueries.lists()],
		queryFn: async () => {
			return translateStartingBalances(await send("get-categories"));
		},
		placeholderData: {
			grouped: [],
			list: []
		},
		staleTime: Infinity
	})
};
function translateStartingBalances(categories) {
	return {
		list: translateStartingBalancesCategories(categories.list) ?? [],
		grouped: categories.grouped.map((group) => ({
			...group,
			categories: translateStartingBalancesCategories(group.categories)
		}))
	};
}
function translateStartingBalancesCategories(categories) {
	return categories ? categories.map((cat) => translateStartingBalancesCategory(cat)) : void 0;
}
function translateStartingBalancesCategory(category) {
	return {
		...category,
		name: category.name?.toLowerCase() === "starting balances" ? instance.t("Starting Balances") : category.name
	};
}
//#endregion
//#region src/budget/mutations.ts
function invalidateQueries(queryClient, queryKey) {
	queryClient.invalidateQueries({ queryKey: queryKey ?? categoryQueries.lists() });
}
function dispatchErrorNotification(dispatch, message, error) {
	dispatch(addNotification({ notification: {
		id: v4(),
		type: "error",
		message,
		pre: error ? error.message : void 0
	} }));
}
function dispatchCategoryNameAlreadyExistsNotification(dispatch, t, name) {
	dispatch(addNotification({ notification: {
		type: "error",
		message: t("Category \"{{name}}\" already exists in group (it may be hidden)", { name })
	} }));
}
function useCreateCategoryMutation() {
	const queryClient = useQueryClient();
	const dispatch = useDispatch();
	const { t } = useTranslation();
	return useMutation({
		mutationFn: async ({ name, groupId, isIncome, isHidden }) => {
			return await send("category-create", {
				name,
				groupId,
				isIncome,
				hidden: isHidden
			});
		},
		onSuccess: () => invalidateQueries(queryClient),
		onError: (error) => {
			console.error("Error creating category:", error);
			dispatchErrorNotification(dispatch, t("There was an error creating the category. Please try again."), error);
		}
	});
}
function useUpdateCategoryMutation() {
	const queryClient = useQueryClient();
	const dispatch = useDispatch();
	const { t } = useTranslation();
	return useMutation({
		mutationFn: async ({ category }) => {
			await send("category-update", category);
		},
		onSuccess: () => invalidateQueries(queryClient),
		onError: (error) => {
			console.error("Error updating category:", error);
			dispatchErrorNotification(dispatch, t("There was an error updating the category. Please try again."), error);
		}
	});
}
function useSaveCategoryMutation() {
	const createCategory = useCreateCategoryMutation();
	const updateCategory = useUpdateCategoryMutation();
	const { t } = useTranslation();
	const dispatch = useDispatch();
	const queryClient = useQueryClient();
	return useMutation({ mutationFn: async ({ category }) => {
		const { grouped: categoryGroups = [] } = await queryClient.ensureQueryData(categoryQueries.list());
		if ((categoryGroups.find((g) => g.id === category.group)?.categories ?? []).some((c) => c.id !== category.id && c.name.toUpperCase() === category.name.toUpperCase())) {
			dispatchCategoryNameAlreadyExistsNotification(dispatch, t, category.name);
			return;
		}
		if (category.id === "new") await createCategory.mutateAsync({
			name: category.name,
			groupId: category.group,
			isIncome: !!category.is_income,
			isHidden: !!category.hidden
		});
		else await updateCategory.mutateAsync({ category });
	} });
}
function useDeleteCategoryMutation() {
	const queryClient = useQueryClient();
	const dispatch = useDispatch();
	const { t } = useTranslation();
	const deleteCategory = async ({ id, transferId }) => {
		await send("category-delete", {
			id,
			transferId
		});
	};
	return useMutation({
		mutationFn: async ({ id }) => {
			if (await send("must-category-transfer", { id })) dispatch(pushModal({ modal: {
				name: "confirm-category-delete",
				options: {
					category: id,
					onDelete: async (transferCategory) => {
						if (id !== transferCategory) await deleteCategory({
							id,
							transferId: transferCategory
						});
					}
				}
			} }));
			else await deleteCategory({ id });
		},
		onSuccess: () => invalidateQueries(queryClient),
		onError: (error) => {
			console.error("Error deleting category:", error);
			dispatchErrorNotification(dispatch, t("There was an error deleting the category. Please try again."), error);
		}
	});
}
function useMoveCategoryMutation() {
	const queryClient = useQueryClient();
	const dispatch = useDispatch();
	const { t } = useTranslation();
	return useMutation({
		mutationFn: async ({ id, groupId, targetId }) => {
			await send("category-move", {
				id,
				groupId,
				targetId
			});
		},
		onSuccess: () => invalidateQueries(queryClient),
		onError: (error) => {
			console.error("Error moving category:", error);
			dispatchErrorNotification(dispatch, t("There was an error moving the category. Please try again."), error);
		}
	});
}
function useReorderCategoryMutation() {
	const moveCategory = useMoveCategoryMutation();
	const queryClient = useQueryClient();
	const dispatch = useDispatch();
	const { t } = useTranslation();
	return useMutation({ mutationFn: async ({ id, groupId, targetId }) => {
		const { grouped: categoryGroups = [], list: categories = [] } = await queryClient.ensureQueryData(categoryQueries.list());
		const moveCandidate = categories.filter((c) => c.id === id)[0];
		if ((categoryGroups.find((g) => g.id === groupId)?.categories ?? []).some((c) => c.id !== moveCandidate.id && c.name.toUpperCase() === moveCandidate.name.toUpperCase())) {
			dispatchCategoryNameAlreadyExistsNotification(dispatch, t, moveCandidate.name);
			return;
		}
		await moveCategory.mutateAsync({
			id,
			groupId,
			targetId
		});
	} });
}
function useCreateCategoryGroupMutation() {
	const queryClient = useQueryClient();
	const dispatch = useDispatch();
	const { t } = useTranslation();
	return useMutation({
		mutationFn: async ({ name }) => {
			return await send("category-group-create", { name });
		},
		onSuccess: () => invalidateQueries(queryClient),
		onError: (error) => {
			console.error("Error creating category group:", error);
			dispatchErrorNotification(dispatch, t("There was an error creating the category group. Please try again."), error);
		}
	});
}
function useUpdateCategoryGroupMutation() {
	const queryClient = useQueryClient();
	const dispatch = useDispatch();
	const { t } = useTranslation();
	return useMutation({
		mutationFn: async ({ group }) => {
			const { grouped: categoryGroups } = await queryClient.ensureQueryData(categoryQueries.list());
			if (categoryGroups.some((g) => g.id !== group.id && g.name.toUpperCase() === group.name.toUpperCase())) {
				dispatchErrorNotification(dispatch, t("A category group with name \"{{name}}\" already exists.", { name: group.name }));
				return;
			}
			const { categories: _, ...groupNoCategories } = group;
			await send("category-group-update", groupNoCategories);
		},
		onSuccess: () => invalidateQueries(queryClient),
		onError: (error) => {
			console.error("Error updating category group:", error);
			dispatchErrorNotification(dispatch, t("There was an error updating the category group. Please try again."), error);
		}
	});
}
function useSaveCategoryGroupMutation() {
	const createCategoryGroup = useCreateCategoryGroupMutation();
	const updateCategoryGroup = useUpdateCategoryGroupMutation();
	return useMutation({ mutationFn: async ({ group }) => {
		if (group.id === "new") await createCategoryGroup.mutateAsync({ name: group.name });
		else await updateCategoryGroup.mutateAsync({ group });
	} });
}
function useDeleteCategoryGroupMutation() {
	const queryClient = useQueryClient();
	const dispatch = useDispatch();
	const { t } = useTranslation();
	return useMutation({
		mutationFn: async ({ id }) => {
			const { grouped: categoryGroups } = await queryClient.ensureQueryData(categoryQueries.list());
			const group = categoryGroups.find((g) => g.id === id);
			if (!group) return;
			const categories = group.categories ?? [];
			let mustTransfer = false;
			for (const category of categories) if (await send("must-category-transfer", { id: category.id })) {
				mustTransfer = true;
				break;
			}
			if (mustTransfer) dispatch(pushModal({ modal: {
				name: "confirm-category-delete",
				options: {
					group: id,
					onDelete: async (transferCategory) => {
						await send("category-group-delete", {
							id,
							transferId: transferCategory
						});
					}
				}
			} }));
			else await send("category-group-delete", { id });
		},
		onSuccess: () => invalidateQueries(queryClient),
		onError: (error) => {
			console.error("Error deleting category group:", error);
			dispatchErrorNotification(dispatch, t("There was an error deleting the category group. Please try again."), error);
		}
	});
}
function useMoveCategoryGroupMutation() {
	const queryClient = useQueryClient();
	const dispatch = useDispatch();
	const { t } = useTranslation();
	return useMutation({
		mutationFn: async ({ id, targetId }) => {
			await send("category-group-move", {
				id,
				targetId
			});
		},
		onSuccess: () => invalidateQueries(queryClient),
		onError: (error) => {
			console.error("Error moving category group:", error);
			dispatchErrorNotification(dispatch, t("There was an error moving the category group. Please try again."), error);
		}
	});
}
function useReorderCategoryGroupMutation() {
	const moveCategoryGroup = useMoveCategoryGroupMutation();
	return useMutation({ mutationFn: async (sortInfo) => {
		await moveCategoryGroup.mutateAsync({
			id: sortInfo.id,
			targetId: sortInfo.targetId
		});
	} });
}
function useBudgetActions() {
	const dispatch = useDispatch();
	const { t } = useTranslation();
	return useMutation({
		mutationFn: async ({ month, type, args }) => {
			switch (type) {
				case "budget-amount":
					await send("budget/budget-amount", {
						month,
						category: args.category,
						amount: args.amount
					});
					return null;
				case "copy-last":
					await send("budget/copy-previous-month", { month });
					return null;
				case "set-zero":
					await send("budget/set-zero", { month });
					return null;
				case "set-3-avg":
					await send("budget/set-3month-avg", { month });
					return null;
				case "set-6-avg":
					await send("budget/set-6month-avg", { month });
					return null;
				case "set-12-avg":
					await send("budget/set-12month-avg", { month });
					return null;
				case "check-templates": return await send("budget/check-templates");
				case "apply-goal-template": return await send("budget/apply-goal-template", { month });
				case "overwrite-goal-template": return await send("budget/overwrite-goal-template", { month });
				case "apply-single-category-template": return await send("budget/apply-single-template", {
					month,
					category: args.category
				});
				case "cleanup-goal-template": return await send("budget/cleanup-goal-template", { month });
				case "hold":
					await send("budget/hold-for-next-month", {
						month,
						amount: args.amount
					});
					return null;
				case "reset-hold":
					await send("budget/reset-hold", { month });
					return null;
				case "cover-overspending":
					await send("budget/cover-overspending", {
						month,
						to: args.to,
						from: args.from,
						amount: args.amount,
						currencyCode: args.currencyCode
					});
					return null;
				case "transfer-available":
					await send("budget/transfer-available", {
						month,
						amount: args.amount,
						category: args.category
					});
					return null;
				case "cover-overbudgeted":
					await send("budget/cover-overbudgeted", {
						month,
						category: args.category,
						amount: args.amount,
						currencyCode: args.currencyCode
					});
					return null;
				case "transfer-category":
					await send("budget/transfer-category", {
						month,
						amount: args.amount,
						from: args.from,
						to: args.to,
						currencyCode: args.currencyCode
					});
					return null;
				case "carryover":
					await send("budget/set-carryover", {
						startMonth: month,
						category: args.category,
						flag: args.flag
					});
					return null;
				case "reset-income-carryover":
					await send("budget/reset-income-carryover", { month });
					return null;
				case "apply-multiple-templates": return await send("budget/apply-multiple-templates", {
					month,
					categoryIds: args.categories
				});
				case "set-single-3-avg":
					await send("budget/set-n-month-avg", {
						month,
						N: 3,
						category: args.category
					});
					return null;
				case "set-single-6-avg":
					await send("budget/set-n-month-avg", {
						month,
						N: 6,
						category: args.category
					});
					return null;
				case "set-single-12-avg":
					await send("budget/set-n-month-avg", {
						month,
						N: 12,
						category: args.category
					});
					return null;
				case "copy-single-last":
					await send("budget/copy-single-month", {
						month,
						category: args.category
					});
					return null;
				case "copy-until-year-end":
					await send("budget/copy-until-year-end", {
						month,
						category: args.category
					});
					return null;
				default: throw new Error(`Unknown budget action type: ${String(type)}`);
			}
		},
		onSuccess: (notification) => {
			if (notification) dispatch(addNotification({ notification }));
		},
		onError: (error) => {
			console.error("Error applying budget action:", error);
			dispatchErrorNotification(dispatch, t("There was an error applying the budget action. Please try again."), error);
		}
	});
}
//#endregion
//#region src/hooks/useIsTestEnv.ts
function useIsTestEnv() {
	return isPlaywright;
}
//#endregion
//#region src/hooks/useMetadataPref.ts
function useMetadataPref(prefName) {
	const dispatch = useDispatch();
	const setLocalPref = (0, import_react.useCallback)((value) => {
		dispatch(savePrefs({ prefs: { [prefName]: value } }));
	}, [prefName, dispatch]);
	return [useSelector((state) => state.prefs.local?.[prefName]), setLocalPref];
}
//#endregion
//#region ../../node_modules/lru-cache/dist/esm/browser/index.min.js
var C$1 = { hasSubscribers: !1 }, S$1 = C$1, W$1 = C$1, D$1 = () => S$1.hasSubscribers || W$1.hasSubscribers, I = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date, U = /* @__PURE__ */ new Set(), L = typeof process == "object" && process ? process : {}, G = (u, e, t, i) => {
	typeof L.emitWarning == "function" ? L.emitWarning(u, e, t, i) : console.error(`[${t}] ${e}: ${u}`);
}, P = (u) => !U.has(u), F$1 = (u) => !!u && u === Math.floor(u) && u > 0 && isFinite(u), j = (u) => F$1(u) ? u <= Math.pow(2, 8) ? Uint8Array : u <= Math.pow(2, 16) ? Uint16Array : u <= Math.pow(2, 32) ? Uint32Array : u <= Number.MAX_SAFE_INTEGER ? O$1 : null : null, O$1 = class extends Array {
	constructor(e) {
		super(e), this.fill(0);
	}
}, R$1 = class u {
	heap;
	length;
	static #o = !1;
	static create(e) {
		let t = j(e);
		if (!t) return [];
		u.#o = !0;
		let i = new u(e, t);
		return u.#o = !1, i;
	}
	constructor(e, t) {
		if (!u.#o) throw new TypeError("instantiate Stack using Stack.create(n)");
		this.heap = new t(e), this.length = 0;
	}
	push(e) {
		this.heap[this.length++] = e;
	}
	pop() {
		return this.heap[--this.length];
	}
}, M$1 = class u {
	#o;
	#u;
	#w;
	#D;
	#S;
	#M;
	#U;
	#m;
	get perf() {
		return this.#m;
	}
	ttl;
	ttlResolution;
	ttlAutopurge;
	updateAgeOnGet;
	updateAgeOnHas;
	allowStale;
	noDisposeOnSet;
	noUpdateTTL;
	maxEntrySize;
	sizeCalculation;
	noDeleteOnFetchRejection;
	noDeleteOnStaleGet;
	allowStaleOnFetchAbort;
	allowStaleOnFetchRejection;
	ignoreFetchAbort;
	#n;
	#b;
	#s;
	#i;
	#t;
	#a;
	#c;
	#l;
	#h;
	#y;
	#r;
	#_;
	#F;
	#d;
	#g;
	#T;
	#W;
	#f;
	#j;
	static unsafeExposeInternals(e) {
		return {
			starts: e.#F,
			ttls: e.#d,
			autopurgeTimers: e.#g,
			sizes: e.#_,
			keyMap: e.#s,
			keyList: e.#i,
			valList: e.#t,
			next: e.#a,
			prev: e.#c,
			get head() {
				return e.#l;
			},
			get tail() {
				return e.#h;
			},
			free: e.#y,
			isBackgroundFetch: (t) => e.#e(t),
			backgroundFetch: (t, i, s, n) => e.#P(t, i, s, n),
			moveToTail: (t) => e.#L(t),
			indexes: (t) => e.#A(t),
			rindexes: (t) => e.#z(t),
			isStale: (t) => e.#p(t)
		};
	}
	get max() {
		return this.#o;
	}
	get maxSize() {
		return this.#u;
	}
	get calculatedSize() {
		return this.#b;
	}
	get size() {
		return this.#n;
	}
	get fetchMethod() {
		return this.#M;
	}
	get memoMethod() {
		return this.#U;
	}
	get dispose() {
		return this.#w;
	}
	get onInsert() {
		return this.#D;
	}
	get disposeAfter() {
		return this.#S;
	}
	constructor(e) {
		let { max: t = 0, ttl: i, ttlResolution: s = 1, ttlAutopurge: n, updateAgeOnGet: o, updateAgeOnHas: r, allowStale: h, dispose: l, onInsert: c, disposeAfter: f, noDisposeOnSet: g, noUpdateTTL: p, maxSize: T = 0, maxEntrySize: w = 0, sizeCalculation: y, fetchMethod: a, memoMethod: m, noDeleteOnFetchRejection: _, noDeleteOnStaleGet: b, allowStaleOnFetchRejection: d, allowStaleOnFetchAbort: A, ignoreFetchAbort: z, perf: x } = e;
		if (x !== void 0 && typeof x?.now != "function") throw new TypeError("perf option must have a now() method if specified");
		if (this.#m = x ?? I, t !== 0 && !F$1(t)) throw new TypeError("max option must be a nonnegative integer");
		let v = t ? j(t) : Array;
		if (!v) throw new Error("invalid max value: " + t);
		if (this.#o = t, this.#u = T, this.maxEntrySize = w || this.#u, this.sizeCalculation = y, this.sizeCalculation) {
			if (!this.#u && !this.maxEntrySize) throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
			if (typeof this.sizeCalculation != "function") throw new TypeError("sizeCalculation set to non-function");
		}
		if (m !== void 0 && typeof m != "function") throw new TypeError("memoMethod must be a function if defined");
		if (this.#U = m, a !== void 0 && typeof a != "function") throw new TypeError("fetchMethod must be a function if specified");
		if (this.#M = a, this.#W = !!a, this.#s = /* @__PURE__ */ new Map(), this.#i = Array.from({ length: t }).fill(void 0), this.#t = Array.from({ length: t }).fill(void 0), this.#a = new v(t), this.#c = new v(t), this.#l = 0, this.#h = 0, this.#y = R$1.create(t), this.#n = 0, this.#b = 0, typeof l == "function" && (this.#w = l), typeof c == "function" && (this.#D = c), typeof f == "function" ? (this.#S = f, this.#r = []) : (this.#S = void 0, this.#r = void 0), this.#T = !!this.#w, this.#j = !!this.#D, this.#f = !!this.#S, this.noDisposeOnSet = !!g, this.noUpdateTTL = !!p, this.noDeleteOnFetchRejection = !!_, this.allowStaleOnFetchRejection = !!d, this.allowStaleOnFetchAbort = !!A, this.ignoreFetchAbort = !!z, this.maxEntrySize !== 0) {
			if (this.#u !== 0 && !F$1(this.#u)) throw new TypeError("maxSize must be a positive integer if specified");
			if (!F$1(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified");
			this.#X();
		}
		if (this.allowStale = !!h, this.noDeleteOnStaleGet = !!b, this.updateAgeOnGet = !!o, this.updateAgeOnHas = !!r, this.ttlResolution = F$1(s) || s === 0 ? s : 1, this.ttlAutopurge = !!n, this.ttl = i || 0, this.ttl) {
			if (!F$1(this.ttl)) throw new TypeError("ttl must be a positive integer if specified");
			this.#H();
		}
		if (this.#o === 0 && this.ttl === 0 && this.#u === 0) throw new TypeError("At least one of max, maxSize, or ttl is required");
		if (!this.ttlAutopurge && !this.#o && !this.#u) {
			let E = "LRU_CACHE_UNBOUNDED";
			P(E) && (U.add(E), G("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", E, u));
		}
	}
	getRemainingTTL(e) {
		return this.#s.has(e) ? Infinity : 0;
	}
	#H() {
		let e = new O$1(this.#o), t = new O$1(this.#o);
		this.#d = e, this.#F = t;
		let i = this.ttlAutopurge ? Array.from({ length: this.#o }) : void 0;
		this.#g = i, this.#N = (r, h, l = this.#m.now()) => {
			t[r] = h !== 0 ? l : 0, e[r] = h, s(r, h);
		}, this.#x = (r) => {
			t[r] = e[r] !== 0 ? this.#m.now() : 0, s(r, e[r]);
		};
		let s = this.ttlAutopurge ? (r, h) => {
			if (i?.[r] && (clearTimeout(i[r]), i[r] = void 0), h && h !== 0 && i) {
				let l = setTimeout(() => {
					this.#p(r) && this.#v(this.#i[r], "expire");
				}, h + 1);
				l.unref && l.unref(), i[r] = l;
			}
		} : () => {};
		this.#E = (r, h) => {
			if (e[h]) {
				let l = e[h], c = t[h];
				if (!l || !c) return;
				r.ttl = l, r.start = c, r.now = n || o();
				r.remainingTTL = l - (r.now - c);
			}
		};
		let n = 0, o = () => {
			let r = this.#m.now();
			if (this.ttlResolution > 0) {
				n = r;
				let h = setTimeout(() => n = 0, this.ttlResolution);
				h.unref && h.unref();
			}
			return r;
		};
		this.getRemainingTTL = (r) => {
			let h = this.#s.get(r);
			if (h === void 0) return 0;
			let l = e[h], c = t[h];
			if (!l || !c) return Infinity;
			return l - ((n || o()) - c);
		}, this.#p = (r) => {
			let h = t[r], l = e[r];
			return !!l && !!h && (n || o()) - h > l;
		};
	}
	#x = () => {};
	#E = () => {};
	#N = () => {};
	#p = () => !1;
	#X() {
		let e = new O$1(this.#o);
		this.#b = 0, this.#_ = e, this.#R = (t) => {
			this.#b -= e[t], e[t] = 0;
		}, this.#k = (t, i, s, n) => {
			if (this.#e(i)) return 0;
			if (!F$1(s)) if (n) {
				if (typeof n != "function") throw new TypeError("sizeCalculation must be a function");
				if (s = n(i, t), !F$1(s)) throw new TypeError("sizeCalculation return invalid (expect positive integer)");
			} else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
			return s;
		}, this.#I = (t, i, s) => {
			if (e[t] = i, this.#u) {
				let n = this.#u - e[t];
				for (; this.#b > n;) this.#G(!0);
			}
			this.#b += e[t], s && (s.entrySize = i, s.totalCalculatedSize = this.#b);
		};
	}
	#R = (e) => {};
	#I = (e, t, i) => {};
	#k = (e, t, i, s) => {
		if (i || s) throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
		return 0;
	};
	*#A({ allowStale: e = this.allowStale } = {}) {
		if (this.#n) for (let t = this.#h; this.#V(t) && ((e || !this.#p(t)) && (yield t), t !== this.#l);) t = this.#c[t];
	}
	*#z({ allowStale: e = this.allowStale } = {}) {
		if (this.#n) for (let t = this.#l; this.#V(t) && ((e || !this.#p(t)) && (yield t), t !== this.#h);) t = this.#a[t];
	}
	#V(e) {
		return e !== void 0 && this.#s.get(this.#i[e]) === e;
	}
	*entries() {
		for (let e of this.#A()) this.#t[e] !== void 0 && this.#i[e] !== void 0 && !this.#e(this.#t[e]) && (yield [this.#i[e], this.#t[e]]);
	}
	*rentries() {
		for (let e of this.#z()) this.#t[e] !== void 0 && this.#i[e] !== void 0 && !this.#e(this.#t[e]) && (yield [this.#i[e], this.#t[e]]);
	}
	*keys() {
		for (let e of this.#A()) {
			let t = this.#i[e];
			t !== void 0 && !this.#e(this.#t[e]) && (yield t);
		}
	}
	*rkeys() {
		for (let e of this.#z()) {
			let t = this.#i[e];
			t !== void 0 && !this.#e(this.#t[e]) && (yield t);
		}
	}
	*values() {
		for (let e of this.#A()) this.#t[e] !== void 0 && !this.#e(this.#t[e]) && (yield this.#t[e]);
	}
	*rvalues() {
		for (let e of this.#z()) this.#t[e] !== void 0 && !this.#e(this.#t[e]) && (yield this.#t[e]);
	}
	[Symbol.iterator]() {
		return this.entries();
	}
	[Symbol.toStringTag] = "LRUCache";
	find(e, t = {}) {
		for (let i of this.#A()) {
			let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
			if (n !== void 0 && e(n, this.#i[i], this)) return this.#C(this.#i[i], t);
		}
	}
	forEach(e, t = this) {
		for (let i of this.#A()) {
			let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
			n !== void 0 && e.call(t, n, this.#i[i], this);
		}
	}
	rforEach(e, t = this) {
		for (let i of this.#z()) {
			let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
			n !== void 0 && e.call(t, n, this.#i[i], this);
		}
	}
	purgeStale() {
		let e = !1;
		for (let t of this.#z({ allowStale: !0 })) this.#p(t) && (this.#v(this.#i[t], "expire"), e = !0);
		return e;
	}
	info(e) {
		let t = this.#s.get(e);
		if (t === void 0) return;
		let i = this.#t[t], s = this.#e(i) ? i.__staleWhileFetching : i;
		if (s === void 0) return;
		let n = { value: s };
		if (this.#d && this.#F) {
			let o = this.#d[t], r = this.#F[t];
			if (o && r) n.ttl = o - (this.#m.now() - r), n.start = Date.now();
		}
		return this.#_ && (n.size = this.#_[t]), n;
	}
	dump() {
		let e = [];
		for (let t of this.#A({ allowStale: !0 })) {
			let i = this.#i[t], s = this.#t[t], n = this.#e(s) ? s.__staleWhileFetching : s;
			if (n === void 0 || i === void 0) continue;
			let o = { value: n };
			if (this.#d && this.#F) {
				o.ttl = this.#d[t];
				let r = this.#m.now() - this.#F[t];
				o.start = Math.floor(Date.now() - r);
			}
			this.#_ && (o.size = this.#_[t]), e.unshift([i, o]);
		}
		return e;
	}
	load(e) {
		this.clear();
		for (let [t, i] of e) {
			if (i.start) {
				let s = Date.now() - i.start;
				i.start = this.#m.now() - s;
			}
			this.#O(t, i.value, i);
		}
	}
	set(e, t, i = {}) {
		let { status: s = S$1.hasSubscribers ? {} : void 0 } = i;
		i.status = s, s && (s.op = "set", s.key = e, t !== void 0 && (s.value = t));
		let n = this.#O(e, t, i);
		return s && S$1.hasSubscribers && S$1.publish(s), n;
	}
	#O(e, t, i = {}) {
		let { ttl: s = this.ttl, start: n, noDisposeOnSet: o = this.noDisposeOnSet, sizeCalculation: r = this.sizeCalculation, status: h } = i;
		if (t === void 0) return h && (h.set = "deleted"), this.delete(e), this;
		let { noUpdateTTL: l = this.noUpdateTTL } = i;
		h && !this.#e(t) && (h.value = t);
		let c = this.#k(e, t, i.size || 0, r, h);
		if (this.maxEntrySize && c > this.maxEntrySize) return this.#v(e, "set"), h && (h.set = "miss", h.maxEntrySizeExceeded = !0), this;
		let f = this.#n === 0 ? void 0 : this.#s.get(e);
		if (f === void 0) f = this.#n === 0 ? this.#h : this.#y.length !== 0 ? this.#y.pop() : this.#n === this.#o ? this.#G(!1) : this.#n, this.#i[f] = e, this.#t[f] = t, this.#s.set(e, f), this.#a[this.#h] = f, this.#c[f] = this.#h, this.#h = f, this.#n++, this.#I(f, c, h), h && (h.set = "add"), l = !1, this.#j && this.#D?.(t, e, "add");
		else {
			this.#L(f);
			let g = this.#t[f];
			if (t !== g) {
				if (this.#W && this.#e(g)) {
					g.__abortController.abort(/* @__PURE__ */ new Error("replaced"));
					let { __staleWhileFetching: p } = g;
					p !== void 0 && !o && (this.#T && this.#w?.(p, e, "set"), this.#f && this.#r?.push([
						p,
						e,
						"set"
					]));
				} else o || (this.#T && this.#w?.(g, e, "set"), this.#f && this.#r?.push([
					g,
					e,
					"set"
				]));
				if (this.#R(f), this.#I(f, c, h), this.#t[f] = t, h) {
					h.set = "replace";
					let p = g && this.#e(g) ? g.__staleWhileFetching : g;
					p !== void 0 && (h.oldValue = p);
				}
			} else h && (h.set = "update");
			this.#j && this.onInsert?.(t, e, t === g ? "update" : "replace");
		}
		if (s !== 0 && !this.#d && this.#H(), this.#d && (l || this.#N(f, s, n), h && this.#E(h, f)), !o && this.#f && this.#r) {
			let g = this.#r, p;
			for (; p = g?.shift();) this.#S?.(...p);
		}
		return this;
	}
	pop() {
		try {
			for (; this.#n;) {
				let e = this.#t[this.#l];
				if (this.#G(!0), this.#e(e)) {
					if (e.__staleWhileFetching) return e.__staleWhileFetching;
				} else if (e !== void 0) return e;
			}
		} finally {
			if (this.#f && this.#r) {
				let e = this.#r, t;
				for (; t = e?.shift();) this.#S?.(...t);
			}
		}
	}
	#G(e) {
		let t = this.#l, i = this.#i[t], s = this.#t[t];
		return this.#W && this.#e(s) ? s.__abortController.abort(/* @__PURE__ */ new Error("evicted")) : (this.#T || this.#f) && (this.#T && this.#w?.(s, i, "evict"), this.#f && this.#r?.push([
			s,
			i,
			"evict"
		])), this.#R(t), this.#g?.[t] && (clearTimeout(this.#g[t]), this.#g[t] = void 0), e && (this.#i[t] = void 0, this.#t[t] = void 0, this.#y.push(t)), this.#n === 1 ? (this.#l = this.#h = 0, this.#y.length = 0) : this.#l = this.#a[t], this.#s.delete(i), this.#n--, t;
	}
	has(e, t = {}) {
		let { status: i = S$1.hasSubscribers ? {} : void 0 } = t;
		t.status = i, i && (i.op = "has", i.key = e);
		let s = this.#Y(e, t);
		return S$1.hasSubscribers && S$1.publish(i), s;
	}
	#Y(e, t = {}) {
		let { updateAgeOnHas: i = this.updateAgeOnHas, status: s } = t, n = this.#s.get(e);
		if (n !== void 0) {
			let o = this.#t[n];
			if (this.#e(o) && o.__staleWhileFetching === void 0) return !1;
			if (this.#p(n)) s && (s.has = "stale", this.#E(s, n));
			else return i && this.#x(n), s && (s.has = "hit", this.#E(s, n)), !0;
		} else s && (s.has = "miss");
		return !1;
	}
	peek(e, t = {}) {
		let { status: i = D$1() ? {} : void 0 } = t;
		i && (i.op = "peek", i.key = e), t.status = i;
		let s = this.#J(e, t);
		return S$1.hasSubscribers && S$1.publish(i), s;
	}
	#J(e, t) {
		let { status: i, allowStale: s = this.allowStale } = t, n = this.#s.get(e);
		if (n === void 0 || !s && this.#p(n)) {
			i && (i.peek = n === void 0 ? "miss" : "stale");
			return;
		}
		let o = this.#t[n], r = this.#e(o) ? o.__staleWhileFetching : o;
		return i && (r !== void 0 ? (i.peek = "hit", i.value = r) : i.peek = "miss"), r;
	}
	#P(e, t, i, s) {
		let n = t === void 0 ? void 0 : this.#t[t];
		if (this.#e(n)) return n;
		let o = new AbortController(), { signal: r } = i;
		r?.addEventListener("abort", () => o.abort(r.reason), { signal: o.signal });
		let h = {
			signal: o.signal,
			options: i,
			context: s
		}, l = (w, y = !1) => {
			let { aborted: a } = o.signal, m = i.ignoreFetchAbort && w !== void 0, _ = i.ignoreFetchAbort || !!(i.allowStaleOnFetchAbort && w !== void 0);
			if (i.status && (a && !y ? (i.status.fetchAborted = !0, i.status.fetchError = o.signal.reason, m && (i.status.fetchAbortIgnored = !0)) : i.status.fetchResolved = !0), a && !m && !y) return f(o.signal.reason, _);
			let b = p, d = this.#t[t];
			return (d === p || d === void 0 && m && y) && (w === void 0 ? b.__staleWhileFetching !== void 0 ? this.#t[t] = b.__staleWhileFetching : this.#v(e, "fetch") : (i.status && (i.status.fetchUpdated = !0), this.#O(e, w, h.options))), w;
		}, c = (w) => (i.status && (i.status.fetchRejected = !0, i.status.fetchError = w), f(w, !1)), f = (w, y) => {
			let { aborted: a } = o.signal, m = a && i.allowStaleOnFetchAbort, _ = m || i.allowStaleOnFetchRejection, b = _ || i.noDeleteOnFetchRejection, d = p;
			if (this.#t[t] === p && (!b || !y && d.__staleWhileFetching === void 0 ? this.#v(e, "fetch") : m || (this.#t[t] = d.__staleWhileFetching)), _) return i.status && d.__staleWhileFetching !== void 0 && (i.status.returnedStale = !0), d.__staleWhileFetching;
			if (d.__returned === d) throw w;
		}, g = (w, y) => {
			let a = this.#M?.(e, n, h);
			a && a instanceof Promise && a.then((m) => w(m === void 0 ? void 0 : m), y), o.signal.addEventListener("abort", () => {
				(!i.ignoreFetchAbort || i.allowStaleOnFetchAbort) && (w(void 0), i.allowStaleOnFetchAbort && (w = (m) => l(m, !0)));
			});
		};
		i.status && (i.status.fetchDispatched = !0);
		let p = new Promise(g).then(l, c), T = Object.assign(p, {
			__abortController: o,
			__staleWhileFetching: n,
			__returned: void 0
		});
		return t === void 0 ? (this.#O(e, T, {
			...h.options,
			status: void 0
		}), t = this.#s.get(e)) : this.#t[t] = T, T;
	}
	#e(e) {
		if (!this.#W) return !1;
		let t = e;
		return !!t && t instanceof Promise && t.hasOwnProperty("__staleWhileFetching") && t.__abortController instanceof AbortController;
	}
	fetch(e, t = {}) {
		let i = W$1.hasSubscribers, { status: s = D$1() ? {} : void 0 } = t;
		t.status = s, s && t.context && (s.context = t.context);
		let n = this.#B(e, t);
		return s && D$1() && i && (s.trace = !0, W$1.tracePromise(() => n, s).catch(() => {})), n;
	}
	async #B(e, t = {}) {
		let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, ttl: o = this.ttl, noDisposeOnSet: r = this.noDisposeOnSet, size: h = 0, sizeCalculation: l = this.sizeCalculation, noUpdateTTL: c = this.noUpdateTTL, noDeleteOnFetchRejection: f = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: g = this.allowStaleOnFetchRejection, ignoreFetchAbort: p = this.ignoreFetchAbort, allowStaleOnFetchAbort: T = this.allowStaleOnFetchAbort, context: w, forceRefresh: y = !1, status: a, signal: m } = t;
		if (a && (a.op = "fetch", a.key = e, y && (a.forceRefresh = !0)), !this.#W) return a && (a.fetch = "get"), this.#C(e, {
			allowStale: i,
			updateAgeOnGet: s,
			noDeleteOnStaleGet: n,
			status: a
		});
		let _ = {
			allowStale: i,
			updateAgeOnGet: s,
			noDeleteOnStaleGet: n,
			ttl: o,
			noDisposeOnSet: r,
			size: h,
			sizeCalculation: l,
			noUpdateTTL: c,
			noDeleteOnFetchRejection: f,
			allowStaleOnFetchRejection: g,
			allowStaleOnFetchAbort: T,
			ignoreFetchAbort: p,
			status: a,
			signal: m
		}, b = this.#s.get(e);
		if (b === void 0) {
			a && (a.fetch = "miss");
			let d = this.#P(e, b, _, w);
			return d.__returned = d;
		} else {
			let d = this.#t[b];
			if (this.#e(d)) {
				let E = i && d.__staleWhileFetching !== void 0;
				return a && (a.fetch = "inflight", E && (a.returnedStale = !0)), E ? d.__staleWhileFetching : d.__returned = d;
			}
			let A = this.#p(b);
			if (!y && !A) return a && (a.fetch = "hit"), this.#L(b), s && this.#x(b), a && this.#E(a, b), d;
			let z = this.#P(e, b, _, w), v = z.__staleWhileFetching !== void 0 && i;
			return a && (a.fetch = A ? "stale" : "refresh", v && A && (a.returnedStale = !0)), v ? z.__staleWhileFetching : z.__returned = z;
		}
	}
	forceFetch(e, t = {}) {
		let i = W$1.hasSubscribers, { status: s = D$1() ? {} : void 0 } = t;
		t.status = s, s && t.context && (s.context = t.context);
		let n = this.#K(e, t);
		return s && D$1() && i && (s.trace = !0, W$1.tracePromise(() => n, s).catch(() => {})), n;
	}
	async #K(e, t = {}) {
		let i = await this.#B(e, t);
		if (i === void 0) throw new Error("fetch() returned undefined");
		return i;
	}
	memo(e, t = {}) {
		let { status: i = S$1.hasSubscribers ? {} : void 0 } = t;
		t.status = i, i && (i.op = "memo", i.key = e, t.context && (i.context = t.context));
		let s = this.#Q(e, t);
		return i && (i.value = s), S$1.hasSubscribers && S$1.publish(i), s;
	}
	#Q(e, t = {}) {
		let i = this.#U;
		if (!i) throw new Error("no memoMethod provided to constructor");
		let { context: s, status: n, forceRefresh: o, ...r } = t;
		n && o && (n.forceRefresh = !0);
		let h = this.#C(e, r), l = o || h === void 0;
		if (n && (n.memo = l ? "miss" : "hit", l || (n.value = h)), !l) return h;
		let c = i(e, h, {
			options: r,
			context: s
		});
		return n && (n.value = c), this.#O(e, c, r), c;
	}
	get(e, t = {}) {
		let { status: i = S$1.hasSubscribers ? {} : void 0 } = t;
		t.status = i, i && (i.op = "get", i.key = e);
		let s = this.#C(e, t);
		return i && (s !== void 0 && (i.value = s), S$1.hasSubscribers && S$1.publish(i)), s;
	}
	#C(e, t = {}) {
		let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, status: o } = t, r = this.#s.get(e);
		if (r === void 0) {
			o && (o.get = "miss");
			return;
		}
		let h = this.#t[r], l = this.#e(h);
		return o && this.#E(o, r), this.#p(r) ? l ? (o && (o.get = "stale-fetching"), i && h.__staleWhileFetching !== void 0 ? (o && (o.returnedStale = !0), h.__staleWhileFetching) : void 0) : (n || this.#v(e, "expire"), o && (o.get = "stale"), i ? (o && (o.returnedStale = !0), h) : void 0) : (o && (o.get = l ? "fetching" : "hit"), this.#L(r), s && this.#x(r), l ? h.__staleWhileFetching : h);
	}
	#$(e, t) {
		this.#c[t] = e, this.#a[e] = t;
	}
	#L(e) {
		e !== this.#h && (e === this.#l ? this.#l = this.#a[e] : this.#$(this.#c[e], this.#a[e]), this.#$(this.#h, e), this.#h = e);
	}
	delete(e) {
		return this.#v(e, "delete");
	}
	#v(e, t) {
		S$1.hasSubscribers && S$1.publish({
			op: "delete",
			delete: t,
			key: e
		});
		let i = !1;
		if (this.#n !== 0) {
			let s = this.#s.get(e);
			if (s !== void 0) if (this.#g?.[s] && (clearTimeout(this.#g?.[s]), this.#g[s] = void 0), i = !0, this.#n === 1) this.#q(t);
			else {
				this.#R(s);
				let n = this.#t[s];
				if (this.#e(n) ? n.__abortController.abort(/* @__PURE__ */ new Error("deleted")) : (this.#T || this.#f) && (this.#T && this.#w?.(n, e, t), this.#f && this.#r?.push([
					n,
					e,
					t
				])), this.#s.delete(e), this.#i[s] = void 0, this.#t[s] = void 0, s === this.#h) this.#h = this.#c[s];
				else if (s === this.#l) this.#l = this.#a[s];
				else {
					let o = this.#c[s];
					this.#a[o] = this.#a[s];
					let r = this.#a[s];
					this.#c[r] = this.#c[s];
				}
				this.#n--, this.#y.push(s);
			}
		}
		if (this.#f && this.#r?.length) {
			let s = this.#r, n;
			for (; n = s?.shift();) this.#S?.(...n);
		}
		return i;
	}
	clear() {
		return this.#q("delete");
	}
	#q(e) {
		for (let t of this.#z({ allowStale: !0 })) {
			let i = this.#t[t];
			if (this.#e(i)) i.__abortController.abort(/* @__PURE__ */ new Error("deleted"));
			else {
				let s = this.#i[t];
				this.#T && this.#w?.(i, s, e), this.#f && this.#r?.push([
					i,
					s,
					e
				]);
			}
		}
		if (this.#s.clear(), this.#t.fill(void 0), this.#i.fill(void 0), this.#d && this.#F) {
			this.#d.fill(0), this.#F.fill(0);
			for (let t of this.#g ?? []) t !== void 0 && clearTimeout(t);
			this.#g?.fill(void 0);
		}
		if (this.#_ && this.#_.fill(0), this.#l = 0, this.#h = 0, this.#y.length = 0, this.#b = 0, this.#n = 0, this.#f && this.#r) {
			let t = this.#r, i;
			for (; i = t?.shift();) this.#S?.(...i);
		}
	}
};
//#endregion
//#region src/hooks/useSpreadsheet.tsx
var SpreadsheetContext = (0, import_react.createContext)(void 0);
function useSpreadsheet() {
	const context = (0, import_react.useContext)(SpreadsheetContext);
	if (!context) throw new Error("useSpreadsheet must be used within a SpreadsheetProvider");
	return context;
}
var GLOBAL_SHEET_NAME = "__global";
function makeSpreadsheet() {
	const cellObservers = {};
	const LRUValueCache = new M$1({ max: 1200 });
	const cellCache = {};
	let observersDisabled = false;
	class Spreadsheet {
		observeCell(name, callback) {
			if (!cellObservers[name]) cellObservers[name] = [];
			cellObservers[name].push(callback);
			return () => {
				cellObservers[name] = cellObservers[name].filter((cb) => cb !== callback);
				if (cellObservers[name].length === 0) cellCache[name] = null;
			};
		}
		disableObservers() {
			observersDisabled = true;
		}
		enableObservers() {
			observersDisabled = false;
		}
		prewarmCache(name, value) {
			LRUValueCache.set(name, value);
		}
		listen() {
			return listen("cells-changed", (event) => {
				if (!observersDisabled) event.forEach((node) => {
					const observers = cellObservers[node.name];
					if (observers) {
						observers.forEach((func) => func(node));
						cellCache[node.name] = Promise.resolve(node);
						LRUValueCache.set(node.name, node);
					}
				});
			});
		}
		bind(sheetName = GLOBAL_SHEET_NAME, binding, callback) {
			binding = typeof binding === "string" ? { name: binding } : binding;
			if (binding.query) this.createQuery(sheetName, binding.name, binding.query);
			const resolvedName = `${sheetName}!${binding.name}`;
			const cleanup = this.observeCell(resolvedName, callback);
			if (LRUValueCache.has(resolvedName)) {
				const node = LRUValueCache.get(resolvedName);
				if (node) callback(node);
			}
			if (cellCache[resolvedName] != null) cellCache[resolvedName].then(callback);
			else {
				const req = this.get(sheetName, binding.name);
				cellCache[resolvedName] = req;
				req.then((result) => {
					if (cellCache[resolvedName] === req) {
						LRUValueCache.set(resolvedName, result);
						callback(result);
					}
				});
			}
			return cleanup;
		}
		get(sheetName, name) {
			return send("get-cell", {
				sheetName,
				name
			});
		}
		getCellNames(sheetName) {
			return send("get-cell-names", { sheetName });
		}
		createQuery(sheetName, name, query) {
			return send("create-query", {
				sheetName,
				name,
				query: query.serialize()
			});
		}
	}
	return new Spreadsheet();
}
function SpreadsheetProvider(t0) {
	const $ = (0, import_compiler_runtime.c)(5);
	const { children } = t0;
	let t1;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = makeSpreadsheet();
		$[0] = t1;
	} else t1 = $[0];
	const spreadsheet = t1;
	let t2;
	let t3;
	if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = () => spreadsheet.listen();
		t3 = [spreadsheet];
		$[1] = t2;
		$[2] = t3;
	} else {
		t2 = $[1];
		t3 = $[2];
	}
	(0, import_react.useEffect)(t2, t3);
	let t4;
	if ($[3] !== children) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SpreadsheetContext.Provider, {
			value: spreadsheet,
			children
		});
		$[3] = children;
		$[4] = t4;
	} else t4 = $[4];
	return t4;
}
//#endregion
//#region src/style/styles.ts
var hiddenScrollbars = false;
function onScrollbarChange() {
	styles.horizontalScrollbar = !hiddenScrollbars && {
		"::-webkit-scrollbar": {
			backgroundColor: "inherit",
			height: 12
		},
		"::-webkit-scrollbar-thumb": {
			width: 7,
			borderRadius: 30,
			backgroundClip: "padding-box",
			border: "2px solid rgba(0, 0, 0, 0)",
			backgroundColor: "#d0d0d0"
		}
	};
	styles.lightScrollbar = !hiddenScrollbars && {
		"& ::-webkit-scrollbar": {
			width: 11,
			backgroundColor: "rgba(200, 200, 200, .2)"
		},
		"& ::-webkit-scrollbar-thumb": {
			width: 7,
			borderRadius: 30,
			backgroundClip: "padding-box",
			border: "2px solid rgba(0, 0, 0, 0)"
		},
		"& ::-webkit-scrollbar-thumb:vertical": { backgroundColor: "#d0d0d0" }
	};
	styles.darkScrollbar = !hiddenScrollbars && {
		"& ::-webkit-scrollbar": {
			width: 11,
			backgroundColor: "rgba(0, 0, 0, 0)"
		},
		"& ::-webkit-scrollbar-thumb:vertical": {
			width: 7,
			borderRadius: 30,
			backgroundClip: "padding-box",
			backgroundColor: "rgba(200, 200, 200, .5)",
			border: "2px solid rgba(0, 0, 0, 0)"
		}
	};
	styles.scrollbarWidth = hiddenScrollbars ? 0 : 13;
}
{
	function testScrollbars() {
		const el = document.createElement("div");
		el.innerHTML = "<div style=\"width:100px;height:100px;overflow:scroll;position:absolute;top:-9999px;\"/>";
		document.body.appendChild(el);
		const testNode = el.childNodes[0];
		if (testNode.offsetWidth === testNode.clientWidth) return true;
		return false;
	}
	hiddenScrollbars = testScrollbars();
	onScrollbarChange();
	window.addEventListener("focus", () => {
		hiddenScrollbars = testScrollbars();
		onScrollbarChange();
	});
}
var hasHiddenScrollbars = () => hiddenScrollbars;
//#endregion
//#region src/hooks/useNavigate.ts
function useNavigate() {
	const location = useLocation();
	const navigate = useNavigate$1();
	return (0, import_react.useCallback)((to, options = {}) => {
		if (typeof to === "number") navigate(to);
		else {
			const optionsWithPrevLocation = {
				replace: options.replace || isSamePath(to, location) ? true : void 0,
				...options,
				state: {
					...options?.state,
					previousLocation: location
				}
			};
			const { previousLocation, ...previousOriginalState } = location.state || {};
			if (previousLocation == null || !isSamePath(to, previousLocation) || JSON.stringify(options?.state || {}) !== JSON.stringify(previousOriginalState)) navigate(to, optionsWithPrevLocation);
			else navigate(-1);
		}
	}, [navigate, location]);
}
function isSamePath(to, location) {
	return to === location.pathname + location.search + location.hash;
}
//#endregion
//#region ../../node_modules/@react-spring/rafz/dist/react-spring_rafz.modern.mjs
var updateQueue = makeQueue();
var raf = (fn) => schedule(fn, updateQueue);
var writeQueue = makeQueue();
raf.write = (fn) => schedule(fn, writeQueue);
var onStartQueue = makeQueue();
raf.onStart = (fn) => schedule(fn, onStartQueue);
var onFrameQueue = makeQueue();
raf.onFrame = (fn) => schedule(fn, onFrameQueue);
var onFinishQueue = makeQueue();
raf.onFinish = (fn) => schedule(fn, onFinishQueue);
var timeouts = [];
raf.setTimeout = (handler, ms) => {
	const time = raf.now() + ms;
	const cancel = () => {
		const i = timeouts.findIndex((t) => t.cancel == cancel);
		if (~i) timeouts.splice(i, 1);
		pendingCount -= ~i ? 1 : 0;
	};
	const timeout = {
		time,
		handler,
		cancel
	};
	timeouts.splice(findTimeout(time), 0, timeout);
	pendingCount += 1;
	start();
	return timeout;
};
var findTimeout = (time) => ~(~timeouts.findIndex((t) => t.time > time) || ~timeouts.length);
raf.cancel = (fn) => {
	onStartQueue.delete(fn);
	onFrameQueue.delete(fn);
	onFinishQueue.delete(fn);
	updateQueue.delete(fn);
	writeQueue.delete(fn);
};
raf.sync = (fn) => {
	sync = true;
	raf.batchedUpdates(fn);
	sync = false;
};
raf.throttle = (fn) => {
	let lastArgs;
	function queuedFn() {
		try {
			fn(...lastArgs);
		} finally {
			lastArgs = null;
		}
	}
	function throttled(...args) {
		lastArgs = args;
		raf.onStart(queuedFn);
	}
	throttled.handler = fn;
	throttled.cancel = () => {
		onStartQueue.delete(queuedFn);
		lastArgs = null;
	};
	return throttled;
};
var nativeRaf = typeof window != "undefined" ? window.requestAnimationFrame : (() => {});
raf.use = (impl) => nativeRaf = impl;
raf.now = typeof performance != "undefined" ? () => performance.now() : Date.now;
raf.batchedUpdates = (fn) => fn();
raf.catch = console.error;
raf.frameLoop = "always";
raf.advance = () => {
	if (raf.frameLoop !== "demand") console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand");
	else update$1();
};
var ts = -1;
var pendingCount = 0;
var sync = false;
function schedule(fn, queue) {
	if (sync) {
		queue.delete(fn);
		fn(0);
	} else {
		queue.add(fn);
		start();
	}
}
function start() {
	if (ts < 0) {
		ts = 0;
		if (raf.frameLoop !== "demand") nativeRaf(loop);
	}
}
function stop() {
	ts = -1;
}
function loop() {
	if (~ts) {
		nativeRaf(loop);
		raf.batchedUpdates(update$1);
	}
}
function update$1() {
	const prevTs = ts;
	ts = raf.now();
	const count = findTimeout(ts);
	if (count) {
		eachSafely(timeouts.splice(0, count), (t) => t.handler());
		pendingCount -= count;
	}
	if (!pendingCount) {
		stop();
		return;
	}
	onStartQueue.flush();
	updateQueue.flush(prevTs ? Math.min(64, ts - prevTs) : 16.667);
	onFrameQueue.flush();
	writeQueue.flush();
	onFinishQueue.flush();
}
function makeQueue() {
	let next = /* @__PURE__ */ new Set();
	let current = next;
	return {
		add(fn) {
			pendingCount += current == next && !next.has(fn) ? 1 : 0;
			next.add(fn);
		},
		delete(fn) {
			pendingCount -= current == next && next.has(fn) ? 1 : 0;
			return next.delete(fn);
		},
		flush(arg) {
			if (current.size) {
				next = /* @__PURE__ */ new Set();
				pendingCount -= current.size;
				eachSafely(current, (fn) => fn(arg) && next.add(fn));
				pendingCount += next.size;
				current = next;
			}
		}
	};
}
function eachSafely(values, each) {
	values.forEach((value) => {
		try {
			each(value);
		} catch (e) {
			raf.catch(e);
		}
	});
}
//#endregion
//#region ../../node_modules/@react-spring/shared/dist/react-spring_shared.modern.mjs
var __defProp$1 = Object.defineProperty;
var __export = (target, all) => {
	for (var name in all) __defProp$1(target, name, {
		get: all[name],
		enumerable: true
	});
};
var globals_exports = {};
__export(globals_exports, {
	assign: () => assign$1,
	colors: () => colors,
	createStringInterpolator: () => createStringInterpolator,
	skipAnimation: () => skipAnimation,
	to: () => to$2,
	willAdvance: () => willAdvance
});
function noop$2() {}
var defineHidden = (obj, key, value) => Object.defineProperty(obj, key, {
	value,
	writable: true,
	configurable: true
});
var is$1 = {
	arr: Array.isArray,
	obj: (a) => !!a && a.constructor.name === "Object",
	fun: (a) => typeof a === "function",
	str: (a) => typeof a === "string",
	num: (a) => typeof a === "number",
	und: (a) => a === void 0
};
function isEqual(a, b) {
	if (is$1.arr(a)) {
		if (!is$1.arr(b) || a.length !== b.length) return false;
		for (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return false;
		return true;
	}
	return a === b;
}
var each = (obj, fn) => obj.forEach(fn);
function eachProp(obj, fn, ctx) {
	if (is$1.arr(obj)) {
		for (let i = 0; i < obj.length; i++) fn.call(ctx, obj[i], `${i}`);
		return;
	}
	for (const key in obj) if (obj.hasOwnProperty(key)) fn.call(ctx, obj[key], key);
}
var toArray$1 = (a) => is$1.und(a) ? [] : is$1.arr(a) ? a : [a];
function flush(queue, iterator) {
	if (queue.size) {
		const items = Array.from(queue);
		queue.clear();
		each(items, iterator);
	}
}
var flushCalls = (queue, ...args) => flush(queue, (fn) => fn(...args));
var isSSR = () => typeof window === "undefined" || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent);
var createStringInterpolator;
var to$2;
var colors = null;
var skipAnimation = false;
var willAdvance = noop$2;
var assign$1 = (globals) => {
	if (globals.to) to$2 = globals.to;
	if (globals.now) raf.now = globals.now;
	if (globals.colors !== void 0) colors = globals.colors;
	if (globals.skipAnimation != null) skipAnimation = globals.skipAnimation;
	if (globals.createStringInterpolator) createStringInterpolator = globals.createStringInterpolator;
	if (globals.requestAnimationFrame) raf.use(globals.requestAnimationFrame);
	if (globals.batchedUpdates) raf.batchedUpdates = globals.batchedUpdates;
	if (globals.willAdvance) willAdvance = globals.willAdvance;
	if (globals.frameLoop) raf.frameLoop = globals.frameLoop;
};
var startQueue = /* @__PURE__ */ new Set();
var currentFrame = [];
var prevFrame = [];
var priority = 0;
var frameLoop = {
	get idle() {
		return !startQueue.size && !currentFrame.length;
	},
	start(animation) {
		if (priority > animation.priority) {
			startQueue.add(animation);
			raf.onStart(flushStartQueue);
		} else {
			startSafely(animation);
			raf(advance);
		}
	},
	advance,
	sort(animation) {
		if (priority) raf.onFrame(() => frameLoop.sort(animation));
		else {
			const prevIndex = currentFrame.indexOf(animation);
			if (~prevIndex) {
				currentFrame.splice(prevIndex, 1);
				startUnsafely(animation);
			}
		}
	},
	clear() {
		currentFrame = [];
		startQueue.clear();
	}
};
function flushStartQueue() {
	startQueue.forEach(startSafely);
	startQueue.clear();
	raf(advance);
}
function startSafely(animation) {
	if (!currentFrame.includes(animation)) startUnsafely(animation);
}
function startUnsafely(animation) {
	currentFrame.splice(findIndex(currentFrame, (other) => other.priority > animation.priority), 0, animation);
}
function advance(dt) {
	const nextFrame = prevFrame;
	for (let i = 0; i < currentFrame.length; i++) {
		const animation = currentFrame[i];
		priority = animation.priority;
		if (!animation.idle) {
			willAdvance(animation);
			animation.advance(dt);
			if (!animation.idle) nextFrame.push(animation);
		}
	}
	priority = 0;
	prevFrame = currentFrame;
	prevFrame.length = 0;
	currentFrame = nextFrame;
	return currentFrame.length > 0;
}
function findIndex(arr, test) {
	const index = arr.findIndex(test);
	return index < 0 ? arr.length : index;
}
var clamp$1 = (min, max, v) => Math.min(Math.max(v, min), max);
var colors2 = {
	transparent: 0,
	aliceblue: 4042850303,
	antiquewhite: 4209760255,
	aqua: 16777215,
	aquamarine: 2147472639,
	azure: 4043309055,
	beige: 4126530815,
	bisque: 4293182719,
	black: 255,
	blanchedalmond: 4293643775,
	blue: 65535,
	blueviolet: 2318131967,
	brown: 2771004159,
	burlywood: 3736635391,
	burntsienna: 3934150143,
	cadetblue: 1604231423,
	chartreuse: 2147418367,
	chocolate: 3530104575,
	coral: 4286533887,
	cornflowerblue: 1687547391,
	cornsilk: 4294499583,
	crimson: 3692313855,
	cyan: 16777215,
	darkblue: 35839,
	darkcyan: 9145343,
	darkgoldenrod: 3095792639,
	darkgray: 2846468607,
	darkgreen: 6553855,
	darkgrey: 2846468607,
	darkkhaki: 3182914559,
	darkmagenta: 2332068863,
	darkolivegreen: 1433087999,
	darkorange: 4287365375,
	darkorchid: 2570243327,
	darkred: 2332033279,
	darksalmon: 3918953215,
	darkseagreen: 2411499519,
	darkslateblue: 1211993087,
	darkslategray: 793726975,
	darkslategrey: 793726975,
	darkturquoise: 13554175,
	darkviolet: 2483082239,
	deeppink: 4279538687,
	deepskyblue: 12582911,
	dimgray: 1768516095,
	dimgrey: 1768516095,
	dodgerblue: 512819199,
	firebrick: 2988581631,
	floralwhite: 4294635775,
	forestgreen: 579543807,
	fuchsia: 4278255615,
	gainsboro: 3705462015,
	ghostwhite: 4177068031,
	gold: 4292280575,
	goldenrod: 3668254975,
	gray: 2155905279,
	green: 8388863,
	greenyellow: 2919182335,
	grey: 2155905279,
	honeydew: 4043305215,
	hotpink: 4285117695,
	indianred: 3445382399,
	indigo: 1258324735,
	ivory: 4294963455,
	khaki: 4041641215,
	lavender: 3873897215,
	lavenderblush: 4293981695,
	lawngreen: 2096890111,
	lemonchiffon: 4294626815,
	lightblue: 2916673279,
	lightcoral: 4034953471,
	lightcyan: 3774873599,
	lightgoldenrodyellow: 4210742015,
	lightgray: 3553874943,
	lightgreen: 2431553791,
	lightgrey: 3553874943,
	lightpink: 4290167295,
	lightsalmon: 4288707327,
	lightseagreen: 548580095,
	lightskyblue: 2278488831,
	lightslategray: 2005441023,
	lightslategrey: 2005441023,
	lightsteelblue: 2965692159,
	lightyellow: 4294959359,
	lime: 16711935,
	limegreen: 852308735,
	linen: 4210091775,
	magenta: 4278255615,
	maroon: 2147483903,
	mediumaquamarine: 1724754687,
	mediumblue: 52735,
	mediumorchid: 3126187007,
	mediumpurple: 2473647103,
	mediumseagreen: 1018393087,
	mediumslateblue: 2070474495,
	mediumspringgreen: 16423679,
	mediumturquoise: 1221709055,
	mediumvioletred: 3340076543,
	midnightblue: 421097727,
	mintcream: 4127193855,
	mistyrose: 4293190143,
	moccasin: 4293178879,
	navajowhite: 4292783615,
	navy: 33023,
	oldlace: 4260751103,
	olive: 2155872511,
	olivedrab: 1804477439,
	orange: 4289003775,
	orangered: 4282712319,
	orchid: 3664828159,
	palegoldenrod: 4008225535,
	palegreen: 2566625535,
	paleturquoise: 2951671551,
	palevioletred: 3681588223,
	papayawhip: 4293907967,
	peachpuff: 4292524543,
	peru: 3448061951,
	pink: 4290825215,
	plum: 3718307327,
	powderblue: 2967529215,
	purple: 2147516671,
	rebeccapurple: 1714657791,
	red: 4278190335,
	rosybrown: 3163525119,
	royalblue: 1097458175,
	saddlebrown: 2336560127,
	salmon: 4202722047,
	sandybrown: 4104413439,
	seagreen: 780883967,
	seashell: 4294307583,
	sienna: 2689740287,
	silver: 3233857791,
	skyblue: 2278484991,
	slateblue: 1784335871,
	slategray: 1887473919,
	slategrey: 1887473919,
	snow: 4294638335,
	springgreen: 16744447,
	steelblue: 1182971135,
	tan: 3535047935,
	teal: 8421631,
	thistle: 3636451583,
	tomato: 4284696575,
	turquoise: 1088475391,
	violet: 4001558271,
	wheat: 4125012991,
	white: 4294967295,
	whitesmoke: 4126537215,
	yellow: 4294902015,
	yellowgreen: 2597139199
};
var NUMBER = "[-+]?\\d*\\.?\\d+";
var PERCENTAGE = NUMBER + "%";
function call$1(...parts) {
	return "\\(\\s*(" + parts.join(")\\s*,\\s*(") + ")\\s*\\)";
}
var rgb = new RegExp("rgb" + call$1(NUMBER, NUMBER, NUMBER));
var rgba = new RegExp("rgba" + call$1(NUMBER, NUMBER, NUMBER, NUMBER));
var hsl = new RegExp("hsl" + call$1(NUMBER, PERCENTAGE, PERCENTAGE));
var hsla = new RegExp("hsla" + call$1(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));
var hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
var hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
var hex6 = /^#([0-9a-fA-F]{6})$/;
var hex8 = /^#([0-9a-fA-F]{8})$/;
function normalizeColor(color) {
	let match;
	if (typeof color === "number") return color >>> 0 === color && color >= 0 && color <= 4294967295 ? color : null;
	if (match = hex6.exec(color)) return parseInt(match[1] + "ff", 16) >>> 0;
	if (colors && colors[color] !== void 0) return colors[color];
	if (match = rgb.exec(color)) return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | 255) >>> 0;
	if (match = rgba.exec(color)) return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | parse1(match[4])) >>> 0;
	if (match = hex3.exec(color)) return parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + "ff", 16) >>> 0;
	if (match = hex8.exec(color)) return parseInt(match[1], 16) >>> 0;
	if (match = hex4.exec(color)) return parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + match[4] + match[4], 16) >>> 0;
	if (match = hsl.exec(color)) return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | 255) >>> 0;
	if (match = hsla.exec(color)) return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | parse1(match[4])) >>> 0;
	return null;
}
function hue2rgb(p, q, t) {
	if (t < 0) t += 1;
	if (t > 1) t -= 1;
	if (t < 1 / 6) return p + (q - p) * 6 * t;
	if (t < 1 / 2) return q;
	if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
	return p;
}
function hslToRgb(h, s, l) {
	const q = l < .5 ? l * (1 + s) : l + s - l * s;
	const p = 2 * l - q;
	const r = hue2rgb(p, q, h + 1 / 3);
	const g = hue2rgb(p, q, h);
	const b = hue2rgb(p, q, h - 1 / 3);
	return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b * 255) << 8;
}
function parse255(str) {
	const int = parseInt(str, 10);
	if (int < 0) return 0;
	if (int > 255) return 255;
	return int;
}
function parse360(str) {
	return (parseFloat(str) % 360 + 360) % 360 / 360;
}
function parse1(str) {
	const num = parseFloat(str);
	if (num < 0) return 0;
	if (num > 1) return 255;
	return Math.round(num * 255);
}
function parsePercentage(str) {
	const int = parseFloat(str);
	if (int < 0) return 0;
	if (int > 100) return 1;
	return int / 100;
}
function colorToRgba(input) {
	let int32Color = normalizeColor(input);
	if (int32Color === null) return input;
	int32Color = int32Color || 0;
	return `rgba(${(int32Color & 4278190080) >>> 24}, ${(int32Color & 16711680) >>> 16}, ${(int32Color & 65280) >>> 8}, ${(int32Color & 255) / 255})`;
}
var createInterpolator = (range, output, extrapolate) => {
	if (is$1.fun(range)) return range;
	if (is$1.arr(range)) return createInterpolator({
		range,
		output,
		extrapolate
	});
	if (is$1.str(range.output[0])) return createStringInterpolator(range);
	const config = range;
	const outputRange = config.output;
	const inputRange = config.range || [0, 1];
	const extrapolateLeft = config.extrapolateLeft || config.extrapolate || "extend";
	const extrapolateRight = config.extrapolateRight || config.extrapolate || "extend";
	const easing = config.easing || ((t) => t);
	return (input) => {
		const range2 = findRange(input, inputRange);
		return interpolate(input, inputRange[range2], inputRange[range2 + 1], outputRange[range2], outputRange[range2 + 1], easing, extrapolateLeft, extrapolateRight, config.map);
	};
};
function interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight, map) {
	let result = map ? map(input) : input;
	if (result < inputMin) {
		if (extrapolateLeft === "identity") return result;
		else if (extrapolateLeft === "clamp") result = inputMin;
	}
	if (result > inputMax) {
		if (extrapolateRight === "identity") return result;
		else if (extrapolateRight === "clamp") result = inputMax;
	}
	if (outputMin === outputMax) return outputMin;
	if (inputMin === inputMax) return input <= inputMin ? outputMin : outputMax;
	if (inputMin === -Infinity) result = -result;
	else if (inputMax === Infinity) result = result - inputMin;
	else result = (result - inputMin) / (inputMax - inputMin);
	result = easing(result);
	if (outputMin === -Infinity) result = -result;
	else if (outputMax === Infinity) result = result + outputMin;
	else result = result * (outputMax - outputMin) + outputMin;
	return result;
}
function findRange(input, inputRange) {
	for (var i = 1; i < inputRange.length - 1; ++i) if (inputRange[i] >= input) break;
	return i - 1;
}
var steps = (steps2, direction = "end") => (progress2) => {
	progress2 = direction === "end" ? Math.min(progress2, .999) : Math.max(progress2, .001);
	const expanded = progress2 * steps2;
	return clamp$1(0, 1, (direction === "end" ? Math.floor(expanded) : Math.ceil(expanded)) / steps2);
};
var c1 = 1.70158;
var c2 = c1 * 1.525;
var c3 = c1 + 1;
var c4 = 2 * Math.PI / 3;
var c5 = 2 * Math.PI / 4.5;
var bounceOut = (x) => {
	const n1 = 7.5625;
	const d1 = 2.75;
	if (x < 1 / d1) return n1 * x * x;
	else if (x < 2 / d1) return n1 * (x -= 1.5 / d1) * x + .75;
	else if (x < 2.5 / d1) return n1 * (x -= 2.25 / d1) * x + .9375;
	else return n1 * (x -= 2.625 / d1) * x + .984375;
};
var easings = {
	linear: (x) => x,
	easeInQuad: (x) => x * x,
	easeOutQuad: (x) => 1 - (1 - x) * (1 - x),
	easeInOutQuad: (x) => x < .5 ? 2 * x * x : 1 - Math.pow(-2 * x + 2, 2) / 2,
	easeInCubic: (x) => x * x * x,
	easeOutCubic: (x) => 1 - Math.pow(1 - x, 3),
	easeInOutCubic: (x) => x < .5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2,
	easeInQuart: (x) => x * x * x * x,
	easeOutQuart: (x) => 1 - Math.pow(1 - x, 4),
	easeInOutQuart: (x) => x < .5 ? 8 * x * x * x * x : 1 - Math.pow(-2 * x + 2, 4) / 2,
	easeInQuint: (x) => x * x * x * x * x,
	easeOutQuint: (x) => 1 - Math.pow(1 - x, 5),
	easeInOutQuint: (x) => x < .5 ? 16 * x * x * x * x * x : 1 - Math.pow(-2 * x + 2, 5) / 2,
	easeInSine: (x) => 1 - Math.cos(x * Math.PI / 2),
	easeOutSine: (x) => Math.sin(x * Math.PI / 2),
	easeInOutSine: (x) => -(Math.cos(Math.PI * x) - 1) / 2,
	easeInExpo: (x) => x === 0 ? 0 : Math.pow(2, 10 * x - 10),
	easeOutExpo: (x) => x === 1 ? 1 : 1 - Math.pow(2, -10 * x),
	easeInOutExpo: (x) => x === 0 ? 0 : x === 1 ? 1 : x < .5 ? Math.pow(2, 20 * x - 10) / 2 : (2 - Math.pow(2, -20 * x + 10)) / 2,
	easeInCirc: (x) => 1 - Math.sqrt(1 - Math.pow(x, 2)),
	easeOutCirc: (x) => Math.sqrt(1 - Math.pow(x - 1, 2)),
	easeInOutCirc: (x) => x < .5 ? (1 - Math.sqrt(1 - Math.pow(2 * x, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * x + 2, 2)) + 1) / 2,
	easeInBack: (x) => c3 * x * x * x - c1 * x * x,
	easeOutBack: (x) => 1 + c3 * Math.pow(x - 1, 3) + c1 * Math.pow(x - 1, 2),
	easeInOutBack: (x) => x < .5 ? Math.pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2) / 2 : (Math.pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2,
	easeInElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : -Math.pow(2, 10 * x - 10) * Math.sin((x * 10 - 10.75) * c4),
	easeOutElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : Math.pow(2, -10 * x) * Math.sin((x * 10 - .75) * c4) + 1,
	easeInOutElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : x < .5 ? -(Math.pow(2, 20 * x - 10) * Math.sin((20 * x - 11.125) * c5)) / 2 : Math.pow(2, -20 * x + 10) * Math.sin((20 * x - 11.125) * c5) / 2 + 1,
	easeInBounce: (x) => 1 - bounceOut(1 - x),
	easeOutBounce: bounceOut,
	easeInOutBounce: (x) => x < .5 ? (1 - bounceOut(1 - 2 * x)) / 2 : (1 + bounceOut(2 * x - 1)) / 2,
	steps
};
var $get = Symbol.for("FluidValue.get");
var $observers = Symbol.for("FluidValue.observers");
var hasFluidValue = (arg) => Boolean(arg && arg[$get]);
var getFluidValue = (arg) => arg && arg[$get] ? arg[$get]() : arg;
var getFluidObservers = (target) => target[$observers] || null;
function callFluidObserver(observer2, event) {
	if (observer2.eventObserved) observer2.eventObserved(event);
	else observer2(event);
}
function callFluidObservers(target, event) {
	const observers = target[$observers];
	if (observers) observers.forEach((observer2) => {
		callFluidObserver(observer2, event);
	});
}
var FluidValue = class {
	constructor(get) {
		if (!get && !(get = this.get)) throw Error("Unknown getter");
		setFluidGetter(this, get);
	}
};
var setFluidGetter = (target, get) => setHidden(target, $get, get);
function addFluidObserver(target, observer2) {
	if (target[$get]) {
		let observers = target[$observers];
		if (!observers) setHidden(target, $observers, observers = /* @__PURE__ */ new Set());
		if (!observers.has(observer2)) {
			observers.add(observer2);
			if (target.observerAdded) target.observerAdded(observers.size, observer2);
		}
	}
	return observer2;
}
function removeFluidObserver(target, observer2) {
	const observers = target[$observers];
	if (observers && observers.has(observer2)) {
		const count = observers.size - 1;
		if (count) observers.delete(observer2);
		else target[$observers] = null;
		if (target.observerRemoved) target.observerRemoved(count, observer2);
	}
}
var setHidden = (target, key, value) => Object.defineProperty(target, key, {
	value,
	writable: true,
	configurable: true
});
var numberRegex = /[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g;
var colorRegex = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi;
var unitRegex = new RegExp(`(${numberRegex.source})(%|[a-z]+)`, "i");
var rgbaRegex = /rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi;
var cssVariableRegex = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;
var variableToRgba = (input) => {
	const [token, fallback] = parseCSSVariable(input);
	if (!token || isSSR()) return input;
	const value = window.getComputedStyle(document.documentElement).getPropertyValue(token);
	if (value) return value.trim();
	else if (fallback && fallback.startsWith("--")) {
		const value2 = window.getComputedStyle(document.documentElement).getPropertyValue(fallback);
		if (value2) return value2;
		else return input;
	} else if (fallback && cssVariableRegex.test(fallback)) return variableToRgba(fallback);
	else if (fallback) return fallback;
	return input;
};
var parseCSSVariable = (current) => {
	const match = cssVariableRegex.exec(current);
	if (!match) return [,];
	const [, token, fallback] = match;
	return [token, fallback];
};
var namedColorRegex;
var rgbaRound = (_, p1, p2, p3, p4) => `rgba(${Math.round(p1)}, ${Math.round(p2)}, ${Math.round(p3)}, ${p4})`;
var createStringInterpolator2 = (config) => {
	if (!namedColorRegex) namedColorRegex = colors ? new RegExp(`(${Object.keys(colors).join("|")})(?!\\w)`, "g") : /^\b$/;
	const output = config.output.map((value) => {
		return getFluidValue(value).replace(cssVariableRegex, variableToRgba).replace(colorRegex, colorToRgba).replace(namedColorRegex, colorToRgba);
	});
	const keyframes = output.map((value) => value.match(numberRegex).map(Number));
	const interpolators = keyframes[0].map((_, i) => keyframes.map((values) => {
		if (!(i in values)) throw Error("The arity of each \"output\" value must be equal");
		return values[i];
	})).map((output2) => createInterpolator({
		...config,
		output: output2
	}));
	return (input) => {
		const missingUnit = !unitRegex.test(output[0]) && output.find((value) => unitRegex.test(value))?.replace(numberRegex, "");
		let i = 0;
		return output[0].replace(numberRegex, () => `${interpolators[i++](input)}${missingUnit || ""}`).replace(rgbaRegex, rgbaRound);
	};
};
var prefix = "react-spring: ";
var once = (fn) => {
	const func = fn;
	let called = false;
	if (typeof func != "function") throw new TypeError(`${prefix}once requires a function parameter`);
	return (...args) => {
		if (!called) {
			func(...args);
			called = true;
		}
	};
};
var warnInterpolate = once(console.warn);
function deprecateInterpolate() {
	warnInterpolate(`${prefix}The "interpolate" function is deprecated in v9 (use "to" instead)`);
}
var warnDirectCall = once(console.warn);
function deprecateDirectCall() {
	warnDirectCall(`${prefix}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);
}
function isAnimatedString(value) {
	return is$1.str(value) && (value[0] == "#" || /\d/.test(value) || !isSSR() && cssVariableRegex.test(value) || value in (colors || {}));
}
var useIsomorphicLayoutEffect$2 = isSSR() ? import_react.useEffect : import_react.useLayoutEffect;
var useIsMounted = () => {
	const isMounted = (0, import_react.useRef)(false);
	useIsomorphicLayoutEffect$2(() => {
		isMounted.current = true;
		return () => {
			isMounted.current = false;
		};
	}, []);
	return isMounted;
};
function useForceUpdate() {
	const update = (0, import_react.useState)()[1];
	const isMounted = useIsMounted();
	return () => {
		if (isMounted.current) update(Math.random());
	};
}
var useOnce = (effect) => (0, import_react.useEffect)(effect, emptyDeps);
var emptyDeps = [];
function usePrev(value) {
	const prevRef = (0, import_react.useRef)(void 0);
	(0, import_react.useEffect)(() => {
		prevRef.current = value;
	});
	return prevRef.current;
}
//#endregion
//#region ../../node_modules/@react-spring/animated/dist/react-spring_animated.modern.mjs
var $node = Symbol.for("Animated:node");
var isAnimated = (value) => !!value && value[$node] === value;
var getAnimated = (owner) => owner && owner[$node];
var setAnimated = (owner, node) => defineHidden(owner, $node, node);
var getPayload = (owner) => owner && owner[$node] && owner[$node].getPayload();
var Animated = class {
	constructor() {
		setAnimated(this, this);
	}
	/** Get every `AnimatedValue` used by this node. */
	getPayload() {
		return this.payload || [];
	}
};
var AnimatedValue = class _AnimatedValue extends Animated {
	constructor(_value) {
		super();
		this._value = _value;
		this.done = true;
		this.durationProgress = 0;
		if (is$1.num(this._value)) this.lastPosition = this._value;
	}
	/** @internal */
	static create(value) {
		return new _AnimatedValue(value);
	}
	getPayload() {
		return [this];
	}
	getValue() {
		return this._value;
	}
	setValue(value, step) {
		if (is$1.num(value)) {
			this.lastPosition = value;
			if (step) {
				value = Math.round(value / step) * step;
				if (this.done) this.lastPosition = value;
			}
		}
		if (this._value === value) return false;
		this._value = value;
		return true;
	}
	reset() {
		const { done } = this;
		this.done = false;
		if (is$1.num(this._value)) {
			this.elapsedTime = 0;
			this.durationProgress = 0;
			this.lastPosition = this._value;
			if (done) this.lastVelocity = null;
			this.v0 = null;
		}
	}
};
var AnimatedString = class _AnimatedString extends AnimatedValue {
	constructor(value) {
		super(0);
		this._string = null;
		this._toString = createInterpolator({ output: [value, value] });
	}
	/** @internal */
	static create(value) {
		return new _AnimatedString(value);
	}
	getValue() {
		const value = this._string;
		return value == null ? this._string = this._toString(this._value) : value;
	}
	setValue(value) {
		if (is$1.str(value)) {
			if (value == this._string) return false;
			this._string = value;
			this._value = 1;
		} else if (super.setValue(value)) this._string = null;
		else return false;
		return true;
	}
	reset(goal) {
		if (goal) this._toString = createInterpolator({ output: [this.getValue(), goal] });
		this._value = 0;
		super.reset();
	}
};
var TreeContext = { dependencies: null };
var AnimatedObject = class extends Animated {
	constructor(source) {
		super();
		this.source = source;
		this.setValue(source);
	}
	getValue(animated) {
		const values = {};
		eachProp(this.source, (source, key) => {
			if (isAnimated(source)) values[key] = source.getValue(animated);
			else if (hasFluidValue(source)) values[key] = getFluidValue(source);
			else if (!animated) values[key] = source;
		});
		return values;
	}
	/** Replace the raw object data */
	setValue(source) {
		this.source = source;
		this.payload = this._makePayload(source);
	}
	reset() {
		if (this.payload) each(this.payload, (node) => node.reset());
	}
	/** Create a payload set. */
	_makePayload(source) {
		if (source) {
			const payload = /* @__PURE__ */ new Set();
			eachProp(source, this._addToPayload, payload);
			return Array.from(payload);
		}
	}
	/** Add to a payload set. */
	_addToPayload(source) {
		if (TreeContext.dependencies && hasFluidValue(source)) TreeContext.dependencies.add(source);
		const payload = getPayload(source);
		if (payload) each(payload, (node) => this.add(node));
	}
};
var AnimatedArray = class _AnimatedArray extends AnimatedObject {
	constructor(source) {
		super(source);
	}
	/** @internal */
	static create(source) {
		return new _AnimatedArray(source);
	}
	getValue() {
		return this.source.map((node) => node.getValue());
	}
	setValue(source) {
		const payload = this.getPayload();
		if (source.length == payload.length) return payload.map((node, i) => node.setValue(source[i])).some(Boolean);
		super.setValue(source.map(makeAnimated));
		return true;
	}
};
function makeAnimated(value) {
	return (isAnimatedString(value) ? AnimatedString : AnimatedValue).create(value);
}
function getAnimatedType(value) {
	const parentNode = getAnimated(value);
	return parentNode ? parentNode.constructor : is$1.arr(value) ? AnimatedArray : isAnimatedString(value) ? AnimatedString : AnimatedValue;
}
var withAnimated = (Component, host) => {
	const hasInstance = !is$1.fun(Component) || Component.prototype && Component.prototype.isReactComponent;
	return (0, import_react.forwardRef)((givenProps, givenRef) => {
		const instanceRef = (0, import_react.useRef)(null);
		const ref = hasInstance && (0, import_react.useCallback)((value) => {
			instanceRef.current = updateRef(givenRef, value);
		}, [givenRef]);
		const [props, deps] = getAnimatedState(givenProps, host);
		const forceUpdate = useForceUpdate();
		const callback = () => {
			const instance = instanceRef.current;
			if (hasInstance && !instance) return;
			if ((instance ? host.applyAnimatedValues(instance, props.getValue(true)) : false) === false) forceUpdate();
		};
		const observer = new PropsObserver(callback, deps);
		const observerRef = (0, import_react.useRef)(void 0);
		useIsomorphicLayoutEffect$2(() => {
			observerRef.current = observer;
			each(deps, (dep) => addFluidObserver(dep, observer));
			return () => {
				if (observerRef.current) {
					each(observerRef.current.deps, (dep) => removeFluidObserver(dep, observerRef.current));
					raf.cancel(observerRef.current.update);
				}
			};
		});
		(0, import_react.useEffect)(callback, []);
		useOnce(() => () => {
			const observer2 = observerRef.current;
			each(observer2.deps, (dep) => removeFluidObserver(dep, observer2));
		});
		const usedProps = host.getComponentProps(props.getValue());
		return /* @__PURE__ */ import_react.createElement(Component, {
			...usedProps,
			ref
		});
	});
};
var PropsObserver = class {
	constructor(update, deps) {
		this.update = update;
		this.deps = deps;
	}
	eventObserved(event) {
		if (event.type == "change") raf.write(this.update);
	}
};
function getAnimatedState(props, host) {
	const dependencies = /* @__PURE__ */ new Set();
	TreeContext.dependencies = dependencies;
	if (props.style) props = {
		...props,
		style: host.createAnimatedStyle(props.style)
	};
	props = new AnimatedObject(props);
	TreeContext.dependencies = null;
	return [props, dependencies];
}
function updateRef(ref, value) {
	if (ref) if (is$1.fun(ref)) ref(value);
	else ref.current = value;
	return value;
}
var cacheKey = Symbol.for("AnimatedComponent");
var createHost = (components, { applyAnimatedValues = () => false, createAnimatedStyle = (style) => new AnimatedObject(style), getComponentProps = (props) => props } = {}) => {
	const hostConfig = {
		applyAnimatedValues,
		createAnimatedStyle,
		getComponentProps
	};
	const animated = (Component) => {
		const displayName = getDisplayName(Component) || "Anonymous";
		if (is$1.str(Component)) Component = animated[Component] || (animated[Component] = withAnimated(Component, hostConfig));
		else Component = Component[cacheKey] || (Component[cacheKey] = withAnimated(Component, hostConfig));
		Component.displayName = `Animated(${displayName})`;
		return Component;
	};
	eachProp(components, (Component, key) => {
		if (is$1.arr(components)) key = getDisplayName(Component);
		animated[key] = animated(Component);
	});
	return { animated };
};
var getDisplayName = (arg) => is$1.str(arg) ? arg : arg && is$1.str(arg.displayName) ? arg.displayName : is$1.fun(arg) && arg.name || null;
//#endregion
//#region ../../node_modules/@react-spring/core/dist/react-spring_core.modern.mjs
function callProp(value, ...args) {
	return is$1.fun(value) ? value(...args) : value;
}
var matchProp = (value, key) => value === true || !!(key && value && (is$1.fun(value) ? value(key) : toArray$1(value).includes(key)));
var resolveProp = (prop, key) => is$1.obj(prop) ? key && prop[key] : prop;
var getDefaultProp = (props, key) => props.default === true ? props[key] : props.default ? props.default[key] : void 0;
var noopTransform = (value) => value;
var getDefaultProps = (props, transform = noopTransform) => {
	let keys = DEFAULT_PROPS;
	if (props.default && props.default !== true) {
		props = props.default;
		keys = Object.keys(props);
	}
	const defaults2 = {};
	for (const key of keys) {
		const value = transform(props[key], key);
		if (!is$1.und(value)) defaults2[key] = value;
	}
	return defaults2;
};
var DEFAULT_PROPS = [
	"config",
	"onProps",
	"onStart",
	"onChange",
	"onPause",
	"onResume",
	"onRest"
];
var RESERVED_PROPS = {
	config: 1,
	from: 1,
	to: 1,
	ref: 1,
	loop: 1,
	reset: 1,
	pause: 1,
	cancel: 1,
	reverse: 1,
	immediate: 1,
	default: 1,
	delay: 1,
	onProps: 1,
	onStart: 1,
	onChange: 1,
	onPause: 1,
	onResume: 1,
	onRest: 1,
	onResolve: 1,
	items: 1,
	trail: 1,
	sort: 1,
	expires: 1,
	initial: 1,
	enter: 1,
	update: 1,
	leave: 1,
	children: 1,
	onDestroyed: 1,
	keys: 1,
	callId: 1,
	parentId: 1
};
function getForwardProps(props) {
	const forward = {};
	let count = 0;
	eachProp(props, (value, prop) => {
		if (!RESERVED_PROPS[prop]) {
			forward[prop] = value;
			count++;
		}
	});
	if (count) return forward;
}
function inferTo(props) {
	const to2 = getForwardProps(props);
	if (to2) {
		const out = { to: to2 };
		eachProp(props, (val, key) => key in to2 || (out[key] = val));
		return out;
	}
	return { ...props };
}
function computeGoal(value) {
	value = getFluidValue(value);
	return is$1.arr(value) ? value.map(computeGoal) : isAnimatedString(value) ? globals_exports.createStringInterpolator({
		range: [0, 1],
		output: [value, value]
	})(1) : value;
}
function hasProps(props) {
	for (const _ in props) return true;
	return false;
}
function isAsyncTo(to2) {
	return is$1.fun(to2) || is$1.arr(to2) && is$1.obj(to2[0]);
}
function detachRefs(ctrl, ref) {
	ctrl.ref?.delete(ctrl);
	ref?.delete(ctrl);
}
function replaceRef(ctrl, ref) {
	if (ref && ctrl.ref !== ref) {
		ctrl.ref?.delete(ctrl);
		ref.add(ctrl);
		ctrl.ref = ref;
	}
}
var config = {
	default: {
		tension: 170,
		friction: 26
	},
	gentle: {
		tension: 120,
		friction: 14
	},
	wobbly: {
		tension: 180,
		friction: 12
	},
	stiff: {
		tension: 210,
		friction: 20
	},
	slow: {
		tension: 280,
		friction: 60
	},
	molasses: {
		tension: 280,
		friction: 120
	}
};
var defaults$2 = {
	...config.default,
	mass: 1,
	damping: 1,
	easing: easings.linear,
	clamp: false
};
var AnimationConfig = class {
	constructor() {
		/**
		* The initial velocity of one or more values.
		*
		* @default 0
		*/
		this.velocity = 0;
		Object.assign(this, defaults$2);
	}
};
function mergeConfig(config2, newConfig, defaultConfig) {
	if (defaultConfig) {
		defaultConfig = { ...defaultConfig };
		sanitizeConfig(defaultConfig, newConfig);
		newConfig = {
			...defaultConfig,
			...newConfig
		};
	}
	sanitizeConfig(config2, newConfig);
	Object.assign(config2, newConfig);
	for (const key in defaults$2) if (config2[key] == null) config2[key] = defaults$2[key];
	let { frequency, damping } = config2;
	const { mass } = config2;
	if (!is$1.und(frequency)) {
		if (frequency < .01) frequency = .01;
		if (damping < 0) damping = 0;
		config2.tension = Math.pow(2 * Math.PI / frequency, 2) * mass;
		config2.friction = 4 * Math.PI * damping * mass / frequency;
	}
	return config2;
}
function sanitizeConfig(config2, props) {
	if (!is$1.und(props.decay)) config2.duration = void 0;
	else {
		const isTensionConfig = !is$1.und(props.tension) || !is$1.und(props.friction);
		if (isTensionConfig || !is$1.und(props.frequency) || !is$1.und(props.damping) || !is$1.und(props.mass)) {
			config2.duration = void 0;
			config2.decay = void 0;
		}
		if (isTensionConfig) config2.frequency = void 0;
	}
}
var emptyArray = [];
var Animation = class {
	constructor() {
		this.changed = false;
		this.values = emptyArray;
		this.toValues = null;
		this.fromValues = emptyArray;
		this.config = new AnimationConfig();
		this.immediate = false;
	}
};
function scheduleProps(callId, { key, props, defaultProps, state, actions }) {
	return new Promise((resolve, reject) => {
		let delay;
		let timeout;
		let cancel = matchProp(props.cancel ?? defaultProps?.cancel, key);
		if (cancel) onStart();
		else {
			if (!is$1.und(props.pause)) state.paused = matchProp(props.pause, key);
			let pause = defaultProps?.pause;
			if (pause !== true) pause = state.paused || matchProp(pause, key);
			delay = callProp(props.delay || 0, key);
			if (pause) {
				state.resumeQueue.add(onResume);
				actions.pause();
			} else {
				actions.resume();
				onResume();
			}
		}
		function onPause() {
			state.resumeQueue.add(onResume);
			state.timeouts.delete(timeout);
			timeout.cancel();
			delay = timeout.time - raf.now();
		}
		function onResume() {
			if (delay > 0 && !globals_exports.skipAnimation) {
				state.delayed = true;
				timeout = raf.setTimeout(onStart, delay);
				state.pauseQueue.add(onPause);
				state.timeouts.add(timeout);
			} else onStart();
		}
		function onStart() {
			if (state.delayed) state.delayed = false;
			state.pauseQueue.delete(onPause);
			state.timeouts.delete(timeout);
			if (callId <= (state.cancelId || 0)) cancel = true;
			try {
				actions.start({
					...props,
					callId,
					cancel
				}, resolve);
			} catch (err) {
				reject(err);
			}
		}
	});
}
var getCombinedResult = (target, results) => results.length == 1 ? results[0] : results.some((result) => result.cancelled) ? getCancelledResult(target.get()) : results.every((result) => result.noop) ? getNoopResult(target.get()) : getFinishedResult(target.get(), results.every((result) => result.finished));
var getNoopResult = (value) => ({
	value,
	noop: true,
	finished: true,
	cancelled: false
});
var getFinishedResult = (value, finished, cancelled = false) => ({
	value,
	finished,
	cancelled
});
var getCancelledResult = (value) => ({
	value,
	cancelled: true,
	finished: false
});
function runAsync(to2, props, state, target) {
	const { callId, parentId, onRest } = props;
	const { asyncTo: prevTo, promise: prevPromise } = state;
	if (!parentId && to2 === prevTo && !props.reset) return prevPromise;
	return state.promise = (async () => {
		state.asyncId = callId;
		state.asyncTo = to2;
		const defaultProps = getDefaultProps(props, (value, key) => key === "onRest" ? void 0 : value);
		let preventBail;
		let bail;
		const bailPromise = new Promise((resolve, reject) => (preventBail = resolve, bail = reject));
		const bailIfEnded = (bailSignal) => {
			const bailResult = callId <= (state.cancelId || 0) && getCancelledResult(target) || callId !== state.asyncId && getFinishedResult(target, false);
			if (bailResult) {
				bailSignal.result = bailResult;
				bail(bailSignal);
				throw bailSignal;
			}
		};
		const animate = (arg1, arg2) => {
			const bailSignal = new BailSignal();
			const skipAnimationSignal = new SkipAnimationSignal();
			return (async () => {
				if (globals_exports.skipAnimation) {
					stopAsync(state);
					skipAnimationSignal.result = getFinishedResult(target, false);
					bail(skipAnimationSignal);
					throw skipAnimationSignal;
				}
				bailIfEnded(bailSignal);
				const props2 = is$1.obj(arg1) ? { ...arg1 } : {
					...arg2,
					to: arg1
				};
				props2.parentId = callId;
				eachProp(defaultProps, (value, key) => {
					if (is$1.und(props2[key])) props2[key] = value;
				});
				const result2 = await target.start(props2);
				bailIfEnded(bailSignal);
				if (state.paused) await new Promise((resume) => {
					state.resumeQueue.add(resume);
				});
				return result2;
			})();
		};
		let result;
		if (globals_exports.skipAnimation) {
			stopAsync(state);
			return getFinishedResult(target, false);
		}
		try {
			let animating;
			if (is$1.arr(to2)) animating = (async (queue) => {
				for (const props2 of queue) await animate(props2);
			})(to2);
			else animating = Promise.resolve(to2(animate, target.stop.bind(target)));
			await Promise.all([animating.then(preventBail), bailPromise]);
			result = getFinishedResult(target.get(), true, false);
		} catch (err) {
			if (err instanceof BailSignal) result = err.result;
			else if (err instanceof SkipAnimationSignal) result = err.result;
			else throw err;
		} finally {
			if (callId == state.asyncId) {
				state.asyncId = parentId;
				state.asyncTo = parentId ? prevTo : void 0;
				state.promise = parentId ? prevPromise : void 0;
			}
		}
		if (is$1.fun(onRest)) raf.batchedUpdates(() => {
			onRest(result, target, target.item);
		});
		return result;
	})();
}
function stopAsync(state, cancelId) {
	flush(state.timeouts, (t) => t.cancel());
	state.pauseQueue.clear();
	state.resumeQueue.clear();
	state.asyncId = state.asyncTo = state.promise = void 0;
	if (cancelId) state.cancelId = cancelId;
}
var BailSignal = class extends Error {
	constructor() {
		super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.");
	}
};
var SkipAnimationSignal = class extends Error {
	constructor() {
		super("SkipAnimationSignal");
	}
};
var isFrameValue = (value) => value instanceof FrameValue;
var nextId = 1;
var FrameValue = class extends FluidValue {
	constructor() {
		super(...arguments);
		this.id = nextId++;
		this._priority = 0;
	}
	get priority() {
		return this._priority;
	}
	set priority(priority) {
		if (this._priority != priority) {
			this._priority = priority;
			this._onPriorityChange(priority);
		}
	}
	/** Get the current value */
	get() {
		const node = getAnimated(this);
		return node && node.getValue();
	}
	/** Create a spring that maps our value to another value */
	to(...args) {
		return globals_exports.to(this, args);
	}
	/** @deprecated Use the `to` method instead. */
	interpolate(...args) {
		deprecateInterpolate();
		return globals_exports.to(this, args);
	}
	toJSON() {
		return this.get();
	}
	observerAdded(count) {
		if (count == 1) this._attach();
	}
	observerRemoved(count) {
		if (count == 0) this._detach();
	}
	/** Called when the first child is added. */
	_attach() {}
	/** Called when the last child is removed. */
	_detach() {}
	/** Tell our children about our new value */
	_onChange(value, idle = false) {
		callFluidObservers(this, {
			type: "change",
			parent: this,
			value,
			idle
		});
	}
	/** Tell our children about our new priority */
	_onPriorityChange(priority) {
		if (!this.idle) frameLoop.sort(this);
		callFluidObservers(this, {
			type: "priority",
			parent: this,
			priority
		});
	}
};
var $P = Symbol.for("SpringPhase");
var HAS_ANIMATED = 1;
var IS_ANIMATING = 2;
var IS_PAUSED = 4;
var hasAnimated = (target) => (target[$P] & HAS_ANIMATED) > 0;
var isAnimating = (target) => (target[$P] & IS_ANIMATING) > 0;
var isPaused = (target) => (target[$P] & IS_PAUSED) > 0;
var setActiveBit = (target, active) => active ? target[$P] |= IS_ANIMATING | HAS_ANIMATED : target[$P] &= ~IS_ANIMATING;
var setPausedBit = (target, paused) => paused ? target[$P] |= IS_PAUSED : target[$P] &= ~IS_PAUSED;
var SpringValue = class extends FrameValue {
	constructor(arg1, arg2) {
		super();
		/** The animation state */
		this.animation = new Animation();
		/** Some props have customizable default values */
		this.defaultProps = {};
		/** The state for `runAsync` calls */
		this._state = {
			paused: false,
			delayed: false,
			pauseQueue: /* @__PURE__ */ new Set(),
			resumeQueue: /* @__PURE__ */ new Set(),
			timeouts: /* @__PURE__ */ new Set()
		};
		/** The promise resolvers of pending `start` calls */
		this._pendingCalls = /* @__PURE__ */ new Set();
		/** The counter for tracking `scheduleProps` calls */
		this._lastCallId = 0;
		/** The last `scheduleProps` call that changed the `to` prop */
		this._lastToId = 0;
		this._memoizedDuration = 0;
		if (!is$1.und(arg1) || !is$1.und(arg2)) {
			const props = is$1.obj(arg1) ? { ...arg1 } : {
				...arg2,
				from: arg1
			};
			if (is$1.und(props.default)) props.default = true;
			this.start(props);
		}
	}
	/** Equals true when not advancing on each frame. */
	get idle() {
		return !(isAnimating(this) || this._state.asyncTo) || isPaused(this);
	}
	get goal() {
		return getFluidValue(this.animation.to);
	}
	get velocity() {
		const node = getAnimated(this);
		return node instanceof AnimatedValue ? node.lastVelocity || 0 : node.getPayload().map((node2) => node2.lastVelocity || 0);
	}
	/**
	* When true, this value has been animated at least once.
	*/
	get hasAnimated() {
		return hasAnimated(this);
	}
	/**
	* When true, this value has an unfinished animation,
	* which is either active or paused.
	*/
	get isAnimating() {
		return isAnimating(this);
	}
	/**
	* When true, all current and future animations are paused.
	*/
	get isPaused() {
		return isPaused(this);
	}
	/**
	*
	*
	*/
	get isDelayed() {
		return this._state.delayed;
	}
	/** Advance the current animation by a number of milliseconds */
	advance(dt) {
		let idle = true;
		let changed = false;
		const anim = this.animation;
		let { toValues } = anim;
		const { config: config2 } = anim;
		const payload = getPayload(anim.to);
		if (!payload && hasFluidValue(anim.to)) toValues = toArray$1(getFluidValue(anim.to));
		anim.values.forEach((node2, i) => {
			if (node2.done) return;
			const to2 = node2.constructor == AnimatedString ? 1 : payload ? payload[i].lastPosition : toValues[i];
			let finished = anim.immediate;
			let position = to2;
			if (!finished) {
				position = node2.lastPosition;
				if (config2.tension <= 0) {
					node2.done = true;
					return;
				}
				let elapsed = node2.elapsedTime += dt;
				const from = anim.fromValues[i];
				const v0 = node2.v0 != null ? node2.v0 : node2.v0 = is$1.arr(config2.velocity) ? config2.velocity[i] : config2.velocity;
				let velocity;
				const precision = config2.precision || (from == to2 ? .005 : Math.min(1, Math.abs(to2 - from) * .001));
				if (!is$1.und(config2.duration)) {
					let p = 1;
					if (config2.duration > 0) {
						if (this._memoizedDuration !== config2.duration) {
							this._memoizedDuration = config2.duration;
							if (node2.durationProgress > 0) {
								node2.elapsedTime = config2.duration * node2.durationProgress;
								elapsed = node2.elapsedTime += dt;
							}
						}
						p = (config2.progress || 0) + elapsed / this._memoizedDuration;
						p = p > 1 ? 1 : p < 0 ? 0 : p;
						node2.durationProgress = p;
					}
					position = from + config2.easing(p) * (to2 - from);
					velocity = (position - node2.lastPosition) / dt;
					finished = p == 1;
				} else if (config2.decay) {
					const decay = config2.decay === true ? .998 : config2.decay;
					const e = Math.exp(-(1 - decay) * elapsed);
					position = from + v0 / (1 - decay) * (1 - e);
					finished = Math.abs(node2.lastPosition - position) <= precision;
					velocity = v0 * e;
				} else {
					velocity = node2.lastVelocity == null ? v0 : node2.lastVelocity;
					const restVelocity = config2.restVelocity || precision / 10;
					const bounceFactor = config2.clamp ? 0 : config2.bounce;
					const canBounce = !is$1.und(bounceFactor);
					const isGrowing = from == to2 ? node2.v0 > 0 : from < to2;
					let isMoving;
					let isBouncing = false;
					const step = 1;
					const numSteps = Math.ceil(dt / step);
					for (let n = 0; n < numSteps; ++n) {
						isMoving = Math.abs(velocity) > restVelocity;
						if (!isMoving) {
							finished = Math.abs(to2 - position) <= precision;
							if (finished) break;
						}
						if (canBounce) {
							isBouncing = position == to2 || position > to2 == isGrowing;
							if (isBouncing) {
								velocity = -velocity * bounceFactor;
								position = to2;
							}
						}
						const acceleration = (-config2.tension * 1e-6 * (position - to2) + -config2.friction * .001 * velocity) / config2.mass;
						velocity = velocity + acceleration * step;
						position = position + velocity * step;
					}
				}
				node2.lastVelocity = velocity;
				if (Number.isNaN(position)) {
					console.warn(`Got NaN while animating:`, this);
					finished = true;
				}
			}
			if (payload && !payload[i].done) finished = false;
			if (finished) node2.done = true;
			else idle = false;
			if (node2.setValue(position, config2.round)) changed = true;
		});
		const node = getAnimated(this);
		const currVal = node.getValue();
		if (idle) {
			const finalVal = getFluidValue(anim.to);
			if ((currVal !== finalVal || changed) && !config2.decay) {
				node.setValue(finalVal);
				this._onChange(finalVal);
			} else if (changed && config2.decay) this._onChange(currVal);
			this._stop();
		} else if (changed) this._onChange(currVal);
	}
	/** Set the current value, while stopping the current animation */
	set(value) {
		raf.batchedUpdates(() => {
			this._stop();
			this._focus(value);
			this._set(value);
		});
		return this;
	}
	/**
	* Freeze the active animation in time, as well as any updates merged
	* before `resume` is called.
	*/
	pause() {
		this._update({ pause: true });
	}
	/** Resume the animation if paused. */
	resume() {
		this._update({ pause: false });
	}
	/** Skip to the end of the current animation. */
	finish() {
		if (isAnimating(this)) {
			const { to: to2, config: config2 } = this.animation;
			raf.batchedUpdates(() => {
				this._onStart();
				if (!config2.decay) this._set(to2, false);
				this._stop();
			});
		}
		return this;
	}
	/** Push props into the pending queue. */
	update(props) {
		(this.queue || (this.queue = [])).push(props);
		return this;
	}
	start(to2, arg2) {
		let queue;
		if (!is$1.und(to2)) queue = [is$1.obj(to2) ? to2 : {
			...arg2,
			to: to2
		}];
		else {
			queue = this.queue || [];
			this.queue = [];
		}
		return Promise.all(queue.map((props) => {
			return this._update(props);
		})).then((results) => getCombinedResult(this, results));
	}
	/**
	* Stop the current animation, and cancel any delayed updates.
	*
	* Pass `true` to call `onRest` with `cancelled: true`.
	*/
	stop(cancel) {
		const { to: to2 } = this.animation;
		this._focus(this.get());
		stopAsync(this._state, cancel && this._lastCallId);
		raf.batchedUpdates(() => this._stop(to2, cancel));
		return this;
	}
	/** Restart the animation. */
	reset() {
		this._update({ reset: true });
	}
	/** @internal */
	eventObserved(event) {
		if (event.type == "change") this._start();
		else if (event.type == "priority") this.priority = event.priority + 1;
	}
	/**
	* Parse the `to` and `from` range from the given `props` object.
	*
	* This also ensures the initial value is available to animated components
	* during the render phase.
	*/
	_prepareNode(props) {
		const key = this.key || "";
		let { to: to2, from } = props;
		to2 = is$1.obj(to2) ? to2[key] : to2;
		if (to2 == null || isAsyncTo(to2)) to2 = void 0;
		from = is$1.obj(from) ? from[key] : from;
		if (from == null) from = void 0;
		const range = {
			to: to2,
			from
		};
		if (!hasAnimated(this)) {
			if (props.reverse) [to2, from] = [from, to2];
			from = getFluidValue(from);
			if (!is$1.und(from)) this._set(from);
			else if (!getAnimated(this)) this._set(to2);
		}
		return range;
	}
	/** Every update is processed by this method before merging. */
	_update({ ...props }, isLoop) {
		const { key, defaultProps } = this;
		if (props.default) Object.assign(defaultProps, getDefaultProps(props, (value, prop) => /^on/.test(prop) ? resolveProp(value, key) : value));
		mergeActiveFn(this, props, "onProps");
		sendEvent(this, "onProps", props, this);
		const range = this._prepareNode(props);
		if (Object.isFrozen(this)) throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");
		const state = this._state;
		return scheduleProps(++this._lastCallId, {
			key,
			props,
			defaultProps,
			state,
			actions: {
				pause: () => {
					if (!isPaused(this)) {
						setPausedBit(this, true);
						flushCalls(state.pauseQueue);
						sendEvent(this, "onPause", getFinishedResult(this, checkFinished(this, this.animation.to)), this);
					}
				},
				resume: () => {
					if (isPaused(this)) {
						setPausedBit(this, false);
						if (isAnimating(this)) this._resume();
						flushCalls(state.resumeQueue);
						sendEvent(this, "onResume", getFinishedResult(this, checkFinished(this, this.animation.to)), this);
					}
				},
				start: this._merge.bind(this, range)
			}
		}).then((result) => {
			if (props.loop && result.finished && !(isLoop && result.noop)) {
				const nextProps = createLoopUpdate(props);
				if (nextProps) return this._update(nextProps, true);
			}
			return result;
		});
	}
	/** Merge props into the current animation */
	_merge(range, props, resolve) {
		if (props.cancel) {
			this.stop(true);
			return resolve(getCancelledResult(this));
		}
		const hasToProp = !is$1.und(range.to);
		const hasFromProp = !is$1.und(range.from);
		if (hasToProp || hasFromProp) if (props.callId > this._lastToId) this._lastToId = props.callId;
		else return resolve(getCancelledResult(this));
		const { key, defaultProps, animation: anim } = this;
		const { to: prevTo, from: prevFrom } = anim;
		let { to: to2 = prevTo, from = prevFrom } = range;
		if (hasFromProp && !hasToProp && (!props.default || is$1.und(to2))) to2 = from;
		if (props.reverse) [to2, from] = [from, to2];
		const hasFromChanged = !isEqual(from, prevFrom);
		if (hasFromChanged) anim.from = from;
		from = getFluidValue(from);
		const hasToChanged = !isEqual(to2, prevTo);
		if (hasToChanged) this._focus(to2);
		const hasAsyncTo = isAsyncTo(props.to);
		const { config: config2 } = anim;
		const { decay, velocity } = config2;
		if (hasToProp || hasFromProp) config2.velocity = 0;
		if (props.config && !hasAsyncTo) mergeConfig(config2, callProp(props.config, key), props.config !== defaultProps.config ? callProp(defaultProps.config, key) : void 0);
		let node = getAnimated(this);
		if (!node || is$1.und(to2)) return resolve(getFinishedResult(this, true));
		const reset = is$1.und(props.reset) ? hasFromProp && !props.default : !is$1.und(from) && matchProp(props.reset, key);
		const value = reset ? from : this.get();
		const goal = computeGoal(to2);
		const isAnimatable = is$1.num(goal) || is$1.arr(goal) || isAnimatedString(goal);
		const immediate = !hasAsyncTo && (!isAnimatable || matchProp(defaultProps.immediate || props.immediate, key));
		if (hasToChanged) {
			const nodeType = getAnimatedType(to2);
			if (nodeType !== node.constructor) if (immediate) node = this._set(goal);
			else throw Error(`Cannot animate between ${node.constructor.name} and ${nodeType.name}, as the "to" prop suggests`);
		}
		const goalType = node.constructor;
		let started = hasFluidValue(to2);
		let finished = false;
		if (!started) {
			const hasValueChanged = reset || !hasAnimated(this) && hasFromChanged;
			if (hasToChanged || hasValueChanged) {
				finished = isEqual(computeGoal(value), goal);
				started = !finished;
			}
			if (!isEqual(anim.immediate, immediate) && !immediate || !isEqual(config2.decay, decay) || !isEqual(config2.velocity, velocity)) started = true;
		}
		if (finished && isAnimating(this)) {
			if (anim.changed && !reset) started = true;
			else if (!started) this._stop(prevTo);
		}
		if (!hasAsyncTo) {
			if (started || hasFluidValue(prevTo)) {
				anim.values = node.getPayload();
				anim.toValues = hasFluidValue(to2) ? null : goalType == AnimatedString ? [1] : toArray$1(goal);
			}
			if (anim.immediate != immediate) {
				anim.immediate = immediate;
				if (!immediate && !reset) this._set(prevTo);
			}
			if (started) {
				const { onRest } = anim;
				each(ACTIVE_EVENTS, (type) => mergeActiveFn(this, props, type));
				const result = getFinishedResult(this, checkFinished(this, prevTo));
				flushCalls(this._pendingCalls, result);
				this._pendingCalls.add(resolve);
				if (anim.changed) raf.batchedUpdates(() => {
					anim.changed = !reset;
					onRest?.(result, this);
					if (reset) callProp(defaultProps.onRest, result);
					else anim.onStart?.(result, this);
				});
			}
		}
		if (reset) this._set(value);
		if (hasAsyncTo) resolve(runAsync(props.to, props, this._state, this));
		else if (started) this._start();
		else if (isAnimating(this) && !hasToChanged) this._pendingCalls.add(resolve);
		else resolve(getNoopResult(value));
	}
	/** Update the `animation.to` value, which might be a `FluidValue` */
	_focus(value) {
		const anim = this.animation;
		if (value !== anim.to) {
			if (getFluidObservers(this)) this._detach();
			anim.to = value;
			if (getFluidObservers(this)) this._attach();
		}
	}
	_attach() {
		let priority = 0;
		const { to: to2 } = this.animation;
		if (hasFluidValue(to2)) {
			addFluidObserver(to2, this);
			if (isFrameValue(to2)) priority = to2.priority + 1;
		}
		this.priority = priority;
	}
	_detach() {
		const { to: to2 } = this.animation;
		if (hasFluidValue(to2)) removeFluidObserver(to2, this);
	}
	/**
	* Update the current value from outside the frameloop,
	* and return the `Animated` node.
	*/
	_set(arg, idle = true) {
		const value = getFluidValue(arg);
		if (!is$1.und(value)) {
			const oldNode = getAnimated(this);
			if (!oldNode || !isEqual(value, oldNode.getValue())) {
				const nodeType = getAnimatedType(value);
				if (!oldNode || oldNode.constructor != nodeType) setAnimated(this, nodeType.create(value));
				else oldNode.setValue(value);
				if (oldNode) raf.batchedUpdates(() => {
					this._onChange(value, idle);
				});
			}
		}
		return getAnimated(this);
	}
	_onStart() {
		const anim = this.animation;
		if (!anim.changed) {
			anim.changed = true;
			sendEvent(this, "onStart", getFinishedResult(this, checkFinished(this, anim.to)), this);
		}
	}
	_onChange(value, idle) {
		if (!idle) {
			this._onStart();
			callProp(this.animation.onChange, value, this);
		}
		callProp(this.defaultProps.onChange, value, this);
		super._onChange(value, idle);
	}
	_start() {
		const anim = this.animation;
		getAnimated(this).reset(getFluidValue(anim.to));
		if (!anim.immediate) anim.fromValues = anim.values.map((node) => node.lastPosition);
		if (!isAnimating(this)) {
			setActiveBit(this, true);
			if (!isPaused(this)) this._resume();
		}
	}
	_resume() {
		if (globals_exports.skipAnimation) this.finish();
		else frameLoop.start(this);
	}
	/**
	* Exit the frameloop and notify `onRest` listeners.
	*
	* Always wrap `_stop` calls with `batchedUpdates`.
	*/
	_stop(goal, cancel) {
		if (isAnimating(this)) {
			setActiveBit(this, false);
			const anim = this.animation;
			each(anim.values, (node) => {
				node.done = true;
			});
			if (anim.toValues) anim.onChange = anim.onPause = anim.onResume = void 0;
			callFluidObservers(this, {
				type: "idle",
				parent: this
			});
			const result = cancel ? getCancelledResult(this.get()) : getFinishedResult(this.get(), checkFinished(this, goal ?? anim.to));
			flushCalls(this._pendingCalls, result);
			if (anim.changed) {
				anim.changed = false;
				sendEvent(this, "onRest", result, this);
			}
		}
	}
};
function checkFinished(target, to2) {
	const goal = computeGoal(to2);
	return isEqual(computeGoal(target.get()), goal);
}
function createLoopUpdate(props, loop = props.loop, to2 = props.to) {
	const loopRet = callProp(loop);
	if (loopRet) {
		const overrides = loopRet !== true && inferTo(loopRet);
		const reverse = (overrides || props).reverse;
		const reset = !overrides || overrides.reset;
		return createUpdate({
			...props,
			loop,
			default: false,
			pause: void 0,
			to: !reverse || isAsyncTo(to2) ? to2 : void 0,
			from: reset ? props.from : void 0,
			reset,
			...overrides
		});
	}
}
function createUpdate(props) {
	const { to: to2, from } = props = inferTo(props);
	const keys = /* @__PURE__ */ new Set();
	if (is$1.obj(to2)) findDefined(to2, keys);
	if (is$1.obj(from)) findDefined(from, keys);
	props.keys = keys.size ? Array.from(keys) : null;
	return props;
}
function declareUpdate(props) {
	const update2 = createUpdate(props);
	if (is$1.und(update2.default)) update2.default = getDefaultProps(update2);
	return update2;
}
function findDefined(values, keys) {
	eachProp(values, (value, key) => value != null && keys.add(key));
}
var ACTIVE_EVENTS = [
	"onStart",
	"onRest",
	"onChange",
	"onPause",
	"onResume"
];
function mergeActiveFn(target, props, type) {
	target.animation[type] = props[type] !== getDefaultProp(props, type) ? resolveProp(props[type], target.key) : void 0;
}
function sendEvent(target, type, ...args) {
	target.animation[type]?.(...args);
	target.defaultProps[type]?.(...args);
}
var BATCHED_EVENTS = [
	"onStart",
	"onChange",
	"onRest"
];
var nextId2 = 1;
var Controller$1 = class {
	constructor(props, flush3) {
		this.id = nextId2++;
		/** The animated values */
		this.springs = {};
		/** The queue of props passed to the `update` method. */
		this.queue = [];
		/** The counter for tracking `scheduleProps` calls */
		this._lastAsyncId = 0;
		/** The values currently being animated */
		this._active = /* @__PURE__ */ new Set();
		/** The values that changed recently */
		this._changed = /* @__PURE__ */ new Set();
		/** Equals false when `onStart` listeners can be called */
		this._started = false;
		/** State used by the `runAsync` function */
		this._state = {
			paused: false,
			pauseQueue: /* @__PURE__ */ new Set(),
			resumeQueue: /* @__PURE__ */ new Set(),
			timeouts: /* @__PURE__ */ new Set()
		};
		/** The event queues that are flushed once per frame maximum */
		this._events = {
			onStart: /* @__PURE__ */ new Map(),
			onChange: /* @__PURE__ */ new Map(),
			onRest: /* @__PURE__ */ new Map()
		};
		this._onFrame = this._onFrame.bind(this);
		if (flush3) this._flush = flush3;
		if (props) this.start({
			default: true,
			...props
		});
	}
	/**
	* Equals `true` when no spring values are in the frameloop, and
	* no async animation is currently active.
	*/
	get idle() {
		return !this._state.asyncTo && Object.values(this.springs).every((spring) => {
			return spring.idle && !spring.isDelayed && !spring.isPaused;
		});
	}
	get item() {
		return this._item;
	}
	set item(item) {
		this._item = item;
	}
	/** Get the current values of our springs */
	get() {
		const values = {};
		this.each((spring, key) => values[key] = spring.get());
		return values;
	}
	/** Set the current values without animating. */
	set(values) {
		for (const key in values) {
			const value = values[key];
			if (!is$1.und(value)) this.springs[key].set(value);
		}
	}
	/** Push an update onto the queue of each value. */
	update(props) {
		if (props) this.queue.push(createUpdate(props));
		return this;
	}
	/**
	* Start the queued animations for every spring, and resolve the returned
	* promise once all queued animations have finished or been cancelled.
	*
	* When you pass a queue (instead of nothing), that queue is used instead of
	* the queued animations added with the `update` method, which are left alone.
	*/
	start(props) {
		let { queue } = this;
		if (props) queue = toArray$1(props).map(createUpdate);
		else this.queue = [];
		if (this._flush) return this._flush(this, queue);
		prepareKeys(this, queue);
		return flushUpdateQueue(this, queue);
	}
	/** @internal */
	stop(arg, keys) {
		if (arg !== !!arg) keys = arg;
		if (keys) {
			const springs = this.springs;
			each(toArray$1(keys), (key) => springs[key].stop(!!arg));
		} else {
			stopAsync(this._state, this._lastAsyncId);
			this.each((spring) => spring.stop(!!arg));
		}
		return this;
	}
	/** Freeze the active animation in time */
	pause(keys) {
		if (is$1.und(keys)) this.start({ pause: true });
		else {
			const springs = this.springs;
			each(toArray$1(keys), (key) => springs[key].pause());
		}
		return this;
	}
	/** Resume the animation if paused. */
	resume(keys) {
		if (is$1.und(keys)) this.start({ pause: false });
		else {
			const springs = this.springs;
			each(toArray$1(keys), (key) => springs[key].resume());
		}
		return this;
	}
	/** Call a function once per spring value */
	each(iterator) {
		eachProp(this.springs, iterator);
	}
	/** @internal Called at the end of every animation frame */
	_onFrame() {
		const { onStart, onChange, onRest } = this._events;
		const active = this._active.size > 0;
		const changed = this._changed.size > 0;
		if (active && !this._started || changed && !this._started) {
			this._started = true;
			flush(onStart, ([onStart2, result]) => {
				result.value = this.get();
				onStart2(result, this, this._item);
			});
		}
		const idle = !active && this._started;
		const values = changed || idle && onRest.size ? this.get() : null;
		if (changed && onChange.size) flush(onChange, ([onChange2, result]) => {
			result.value = values;
			onChange2(result, this, this._item);
		});
		if (idle) {
			this._started = false;
			flush(onRest, ([onRest2, result]) => {
				result.value = values;
				onRest2(result, this, this._item);
			});
		}
	}
	/** @internal */
	eventObserved(event) {
		if (event.type == "change") {
			this._changed.add(event.parent);
			if (!event.idle) this._active.add(event.parent);
		} else if (event.type == "idle") this._active.delete(event.parent);
		else return;
		raf.onFrame(this._onFrame);
	}
};
function flushUpdateQueue(ctrl, queue) {
	return Promise.all(queue.map((props) => flushUpdate(ctrl, props))).then((results) => getCombinedResult(ctrl, results));
}
async function flushUpdate(ctrl, props, isLoop) {
	const { keys, to: to2, from, loop, onRest, onResolve } = props;
	const defaults2 = is$1.obj(props.default) && props.default;
	if (loop) props.loop = false;
	if (to2 === false) props.to = null;
	if (from === false) props.from = null;
	const asyncTo = is$1.arr(to2) || is$1.fun(to2) ? to2 : void 0;
	if (asyncTo) {
		props.to = void 0;
		props.onRest = void 0;
		if (defaults2) defaults2.onRest = void 0;
	} else each(BATCHED_EVENTS, (key) => {
		const handler = props[key];
		if (is$1.fun(handler)) {
			const queue = ctrl["_events"][key];
			props[key] = ({ finished, cancelled }) => {
				const result2 = queue.get(handler);
				if (result2) {
					if (!finished) result2.finished = false;
					if (cancelled) result2.cancelled = true;
				} else queue.set(handler, {
					value: null,
					finished: finished || false,
					cancelled: cancelled || false
				});
			};
			if (defaults2) defaults2[key] = props[key];
		}
	});
	const state = ctrl["_state"];
	if (props.pause === !state.paused) {
		state.paused = props.pause;
		flushCalls(props.pause ? state.pauseQueue : state.resumeQueue);
	} else if (state.paused) props.pause = true;
	const promises = (keys || Object.keys(ctrl.springs)).map((key) => ctrl.springs[key].start(props));
	const cancel = props.cancel === true || getDefaultProp(props, "cancel") === true;
	if (asyncTo || cancel && state.asyncId) promises.push(scheduleProps(++ctrl["_lastAsyncId"], {
		props,
		state,
		actions: {
			pause: noop$2,
			resume: noop$2,
			start(props2, resolve) {
				if (cancel) {
					stopAsync(state, ctrl["_lastAsyncId"]);
					resolve(getCancelledResult(ctrl));
				} else {
					props2.onRest = onRest;
					resolve(runAsync(asyncTo, props2, state, ctrl));
				}
			}
		}
	}));
	if (state.paused) await new Promise((resume) => {
		state.resumeQueue.add(resume);
	});
	const result = getCombinedResult(ctrl, await Promise.all(promises));
	if (loop && result.finished && !(isLoop && result.noop)) {
		const nextProps = createLoopUpdate(props, loop, to2);
		if (nextProps) {
			prepareKeys(ctrl, [nextProps]);
			return flushUpdate(ctrl, nextProps, true);
		}
	}
	if (onResolve) raf.batchedUpdates(() => onResolve(result, ctrl, ctrl.item));
	return result;
}
function getSprings(ctrl, props) {
	const springs = { ...ctrl.springs };
	if (props) each(toArray$1(props), (props2) => {
		if (is$1.und(props2.keys)) props2 = createUpdate(props2);
		if (!is$1.obj(props2.to)) props2 = {
			...props2,
			to: void 0
		};
		prepareSprings(springs, props2, (key) => {
			return createSpring(key);
		});
	});
	setSprings(ctrl, springs);
	return springs;
}
function setSprings(ctrl, springs) {
	eachProp(springs, (spring, key) => {
		if (!ctrl.springs[key]) {
			ctrl.springs[key] = spring;
			addFluidObserver(spring, ctrl);
		}
	});
}
function createSpring(key, observer) {
	const spring = new SpringValue();
	spring.key = key;
	if (observer) addFluidObserver(spring, observer);
	return spring;
}
function prepareSprings(springs, props, create) {
	if (props.keys) each(props.keys, (key) => {
		(springs[key] || (springs[key] = create(key)))["_prepareNode"](props);
	});
}
function prepareKeys(ctrl, queue) {
	each(queue, (props) => {
		prepareSprings(ctrl.springs, props, (key) => {
			return createSpring(key, ctrl);
		});
	});
}
var SpringContext = import_react.createContext({
	pause: false,
	immediate: false
});
var SpringRef = () => {
	const current = [];
	const SpringRef2 = function(props) {
		deprecateDirectCall();
		const results = [];
		each(current, (ctrl, i) => {
			if (is$1.und(props)) results.push(ctrl.start());
			else {
				const update2 = _getProps(props, ctrl, i);
				if (update2) results.push(ctrl.start(update2));
			}
		});
		return results;
	};
	SpringRef2.current = current;
	SpringRef2.add = function(ctrl) {
		if (!current.includes(ctrl)) current.push(ctrl);
	};
	SpringRef2.delete = function(ctrl) {
		const i = current.indexOf(ctrl);
		if (~i) current.splice(i, 1);
	};
	SpringRef2.pause = function() {
		each(current, (ctrl) => ctrl.pause(...arguments));
		return this;
	};
	SpringRef2.resume = function() {
		each(current, (ctrl) => ctrl.resume(...arguments));
		return this;
	};
	SpringRef2.set = function(values) {
		each(current, (ctrl, i) => {
			const update2 = is$1.fun(values) ? values(i, ctrl) : values;
			if (update2) ctrl.set(update2);
		});
	};
	SpringRef2.start = function(props) {
		const results = [];
		each(current, (ctrl, i) => {
			if (is$1.und(props)) results.push(ctrl.start());
			else {
				const update2 = this._getProps(props, ctrl, i);
				if (update2) results.push(ctrl.start(update2));
			}
		});
		return results;
	};
	SpringRef2.stop = function() {
		each(current, (ctrl) => ctrl.stop(...arguments));
		return this;
	};
	SpringRef2.update = function(props) {
		each(current, (ctrl, i) => ctrl.update(this._getProps(props, ctrl, i)));
		return this;
	};
	const _getProps = function(arg, ctrl, index) {
		return is$1.fun(arg) ? arg(index, ctrl) : arg;
	};
	SpringRef2._getProps = _getProps;
	return SpringRef2;
};
function useSprings(length, props, deps) {
	const propsFn = is$1.fun(props) && props;
	if (propsFn && !deps) deps = [];
	const ref = (0, import_react.useMemo)(() => propsFn || arguments.length == 3 ? SpringRef() : void 0, []);
	const layoutId = (0, import_react.useRef)(0);
	const forceUpdate = useForceUpdate();
	const state = (0, import_react.useMemo)(() => ({
		ctrls: [],
		queue: [],
		flush(ctrl, updates2) {
			const springs2 = getSprings(ctrl, updates2);
			return layoutId.current > 0 && !state.queue.length && !Object.keys(springs2).some((key) => !ctrl.springs[key]) ? flushUpdateQueue(ctrl, updates2) : new Promise((resolve) => {
				setSprings(ctrl, springs2);
				state.queue.push(() => {
					resolve(flushUpdateQueue(ctrl, updates2));
				});
				forceUpdate();
			});
		}
	}), []);
	const ctrls = (0, import_react.useRef)([...state.ctrls]);
	const updates = (0, import_react.useRef)([]);
	const prevLength = usePrev(length) || 0;
	(0, import_react.useMemo)(() => {
		each(ctrls.current.slice(length, prevLength), (ctrl) => {
			detachRefs(ctrl, ref);
			ctrl.stop(true);
		});
		ctrls.current.length = length;
		declareUpdates(prevLength, length);
	}, [length]);
	(0, import_react.useMemo)(() => {
		declareUpdates(0, Math.min(prevLength, length));
	}, deps);
	function declareUpdates(startIndex, endIndex) {
		for (let i = startIndex; i < endIndex; i++) {
			const ctrl = ctrls.current[i] || (ctrls.current[i] = new Controller$1(null, state.flush));
			const update2 = propsFn ? propsFn(i, ctrl) : props[i];
			if (update2) updates.current[i] = declareUpdate(update2);
		}
	}
	const springs = ctrls.current.map((ctrl, i) => getSprings(ctrl, updates.current[i]));
	const context = (0, import_react.useContext)(SpringContext);
	const hasContext = context !== usePrev(context) && hasProps(context);
	useIsomorphicLayoutEffect$2(() => {
		layoutId.current++;
		state.ctrls = ctrls.current;
		const { queue } = state;
		if (queue.length) {
			state.queue = [];
			each(queue, (cb) => cb());
		}
		each(ctrls.current, (ctrl, i) => {
			ref?.add(ctrl);
			if (hasContext) ctrl.start({ default: context });
			const update2 = updates.current[i];
			if (update2) {
				replaceRef(ctrl, update2.ref);
				if (ctrl.ref) ctrl.queue.push(update2);
				else ctrl.start(update2);
			}
		});
	});
	useOnce(() => () => {
		each(state.ctrls, (ctrl) => ctrl.stop(true));
	});
	const values = springs.map((x) => ({ ...x }));
	return ref ? [values, ref] : values;
}
function useSpring(props, deps) {
	const isFn = is$1.fun(props);
	const [[values], ref] = useSprings(1, isFn ? props : [props], isFn ? deps || [] : deps);
	return isFn || arguments.length == 2 ? [values, ref] : values;
}
function useTransition(data, props, deps) {
	const propsFn = is$1.fun(props) && props;
	const { reset, sort, trail = 0, expires = true, exitBeforeEnter = false, onDestroyed, ref: propsRef, config: propsConfig } = propsFn ? propsFn() : props;
	const ref = (0, import_react.useMemo)(() => propsFn || arguments.length == 3 ? SpringRef() : void 0, []);
	const items = toArray$1(data);
	const transitions = [];
	const usedTransitions = (0, import_react.useRef)(null);
	const prevTransitions = reset ? null : usedTransitions.current;
	useIsomorphicLayoutEffect$2(() => {
		usedTransitions.current = transitions;
	});
	useOnce(() => {
		each(transitions, (t) => {
			ref?.add(t.ctrl);
			t.ctrl.ref = ref;
		});
		return () => {
			each(usedTransitions.current, (t) => {
				if (t.expired) clearTimeout(t.expirationId);
				detachRefs(t.ctrl, ref);
				t.ctrl.stop(true);
			});
		};
	});
	const keys = getKeys(items, propsFn ? propsFn() : props, prevTransitions);
	const expired = reset && usedTransitions.current || [];
	useIsomorphicLayoutEffect$2(() => each(expired, ({ ctrl, item, key }) => {
		detachRefs(ctrl, ref);
		callProp(onDestroyed, item, key);
	}));
	const reused = [];
	if (prevTransitions) each(prevTransitions, (t, i) => {
		if (t.expired) {
			clearTimeout(t.expirationId);
			expired.push(t);
		} else {
			i = reused[i] = keys.indexOf(t.key);
			if (~i) transitions[i] = t;
		}
	});
	each(items, (item, i) => {
		if (!transitions[i]) {
			transitions[i] = {
				key: keys[i],
				item,
				phase: "mount",
				ctrl: new Controller$1()
			};
			transitions[i].ctrl.item = item;
		}
	});
	if (reused.length) {
		let i = -1;
		const { leave } = propsFn ? propsFn() : props;
		each(reused, (keyIndex, prevIndex) => {
			const t = prevTransitions[prevIndex];
			if (~keyIndex) {
				i = transitions.indexOf(t);
				transitions[i] = {
					...t,
					item: items[keyIndex]
				};
			} else if (leave) transitions.splice(++i, 0, t);
		});
	}
	if (is$1.fun(sort)) transitions.sort((a, b) => sort(a.item, b.item));
	let delay = -trail;
	const forceUpdate = useForceUpdate();
	const defaultProps = getDefaultProps(props);
	const changes = /* @__PURE__ */ new Map();
	const exitingTransitions = (0, import_react.useRef)(/* @__PURE__ */ new Map());
	const forceChange = (0, import_react.useRef)(false);
	each(transitions, (t, i) => {
		const key = t.key;
		const prevPhase = t.phase;
		const p = propsFn ? propsFn() : props;
		let to2;
		let phase;
		const propsDelay = callProp(p.delay || 0, key);
		if (prevPhase == "mount") {
			to2 = p.enter;
			phase = "enter";
		} else {
			const isLeave = keys.indexOf(key) < 0;
			if (prevPhase != "leave") if (isLeave) {
				to2 = p.leave;
				phase = "leave";
			} else if (to2 = p.update) phase = "update";
			else return;
			else if (!isLeave) {
				to2 = p.enter;
				phase = "enter";
			} else return;
		}
		to2 = callProp(to2, t.item, i);
		to2 = is$1.obj(to2) ? inferTo(to2) : { to: to2 };
		if (!to2.config) {
			const config2 = propsConfig || defaultProps.config;
			to2.config = callProp(config2, t.item, i, phase);
		}
		delay += trail;
		const payload = {
			...defaultProps,
			delay: propsDelay + delay,
			ref: propsRef,
			immediate: p.immediate,
			reset: false,
			...to2
		};
		if (phase == "enter" && is$1.und(payload.from)) {
			const p2 = propsFn ? propsFn() : props;
			payload.from = callProp(is$1.und(p2.initial) || prevTransitions ? p2.from : p2.initial, t.item, i);
		}
		const { onResolve } = payload;
		payload.onResolve = (result) => {
			callProp(onResolve, result);
			const transitions2 = usedTransitions.current;
			const t2 = transitions2.find((t3) => t3.key === key);
			if (!t2) return;
			if (result.cancelled && t2.phase != "update") return;
			if (t2.ctrl.idle) {
				const idle = transitions2.every((t3) => t3.ctrl.idle);
				if (t2.phase == "leave") {
					const expiry = callProp(expires, t2.item);
					if (expiry !== false) {
						const expiryMs = expiry === true ? 0 : expiry;
						t2.expired = true;
						if (!idle && expiryMs > 0) {
							if (expiryMs <= 2147483647) t2.expirationId = setTimeout(forceUpdate, expiryMs);
							return;
						}
					}
				}
				if (idle && transitions2.some((t3) => t3.expired)) {
					exitingTransitions.current.delete(t2);
					if (exitBeforeEnter) forceChange.current = true;
					forceUpdate();
				}
			}
		};
		const springs = getSprings(t.ctrl, payload);
		if (phase === "leave" && exitBeforeEnter) exitingTransitions.current.set(t, {
			phase,
			springs,
			payload
		});
		else changes.set(t, {
			phase,
			springs,
			payload
		});
	});
	const context = (0, import_react.useContext)(SpringContext);
	const hasContext = context !== usePrev(context) && hasProps(context);
	useIsomorphicLayoutEffect$2(() => {
		if (hasContext) each(transitions, (t) => {
			t.ctrl.start({ default: context });
		});
	}, [context]);
	each(changes, (_, t) => {
		if (exitingTransitions.current.size) {
			const ind = transitions.findIndex((state) => state.key === t.key);
			transitions.splice(ind, 1);
		}
	});
	useIsomorphicLayoutEffect$2(() => {
		each(exitingTransitions.current.size ? exitingTransitions.current : changes, ({ phase, payload }, t) => {
			const { ctrl } = t;
			t.phase = phase;
			ref?.add(ctrl);
			if (hasContext && phase == "enter") ctrl.start({ default: context });
			if (payload) {
				replaceRef(ctrl, payload.ref);
				if ((ctrl.ref || ref) && !forceChange.current) ctrl.update(payload);
				else {
					ctrl.start(payload);
					if (forceChange.current) forceChange.current = false;
				}
			}
		});
	}, reset ? void 0 : deps);
	const renderTransitions = (render) => /* @__PURE__ */ import_react.createElement(import_react.Fragment, null, transitions.map((t, i) => {
		const { springs } = changes.get(t) || t.ctrl;
		const elem = render({ ...springs }, t.item, t, i);
		const key = is$1.str(t.key) || is$1.num(t.key) ? t.key : t.ctrl.id;
		const props2 = elem?.props ?? {};
		const elemRef = props2?.ref;
		return elem && elem.type ? /* @__PURE__ */ import_react.createElement(elem.type, {
			...props2,
			key,
			ref: elemRef
		}) : elem;
	}));
	return ref ? [renderTransitions, ref] : renderTransitions;
}
var nextKey = 1;
function getKeys(items, { key, keys = key }, prevTransitions) {
	if (keys === null) {
		const reused = /* @__PURE__ */ new Set();
		return items.map((item) => {
			const t = prevTransitions && prevTransitions.find((t2) => t2.item === item && t2.phase !== "leave" && !reused.has(t2));
			if (t) {
				reused.add(t);
				return t.key;
			}
			return nextKey++;
		});
	}
	return is$1.und(keys) ? items : is$1.fun(keys) ? items.map(keys) : toArray$1(keys);
}
var Interpolation = class extends FrameValue {
	constructor(source, args) {
		super();
		this.source = source;
		/** Equals false when in the frameloop */
		this.idle = true;
		/** The inputs which are currently animating */
		this._active = /* @__PURE__ */ new Set();
		this.calc = createInterpolator(...args);
		const value = this._get();
		const nodeType = getAnimatedType(value);
		setAnimated(this, nodeType.create(value));
	}
	advance(_dt) {
		const value = this._get();
		if (!isEqual(value, this.get())) {
			getAnimated(this).setValue(value);
			this._onChange(value, this.idle);
		}
		if (!this.idle && checkIdle(this._active)) becomeIdle(this);
	}
	_get() {
		const inputs = is$1.arr(this.source) ? this.source.map(getFluidValue) : toArray$1(getFluidValue(this.source));
		return this.calc(...inputs);
	}
	_start() {
		if (this.idle && !checkIdle(this._active)) {
			this.idle = false;
			each(getPayload(this), (node) => {
				node.done = false;
			});
			if (globals_exports.skipAnimation) {
				raf.batchedUpdates(() => this.advance());
				becomeIdle(this);
			} else frameLoop.start(this);
		}
	}
	_attach() {
		let priority = 1;
		each(toArray$1(this.source), (source) => {
			if (hasFluidValue(source)) addFluidObserver(source, this);
			if (isFrameValue(source)) {
				if (!source.idle) this._active.add(source);
				priority = Math.max(priority, source.priority + 1);
			}
		});
		this.priority = priority;
		this._start();
	}
	_detach() {
		each(toArray$1(this.source), (source) => {
			if (hasFluidValue(source)) removeFluidObserver(source, this);
		});
		this._active.clear();
		becomeIdle(this);
	}
	/** @internal */
	eventObserved(event) {
		if (event.type == "change") if (event.idle) this.advance();
		else {
			this._active.add(event.parent);
			this._start();
		}
		else if (event.type == "idle") this._active.delete(event.parent);
		else if (event.type == "priority") this.priority = toArray$1(this.source).reduce((highest, parent) => Math.max(highest, (isFrameValue(parent) ? parent.priority : 0) + 1), 0);
	}
};
function isIdle(source) {
	return source.idle !== false;
}
function checkIdle(active) {
	return !active.size || Array.from(active).every(isIdle);
}
function becomeIdle(self) {
	if (!self.idle) {
		self.idle = true;
		each(getPayload(self), (node) => {
			node.done = true;
		});
		callFluidObservers(self, {
			type: "idle",
			parent: self
		});
	}
}
var to$1 = (source, ...args) => new Interpolation(source, args);
globals_exports.assign({
	createStringInterpolator: createStringInterpolator2,
	to: (source, args) => new Interpolation(source, args)
});
frameLoop.advance;
//#endregion
//#region ../../node_modules/@react-spring/web/dist/react-spring_web.modern.mjs
var isCustomPropRE = /^--/;
function dangerousStyleValue(name, value) {
	if (value == null || typeof value === "boolean" || value === "") return "";
	if (typeof value === "number" && value !== 0 && !isCustomPropRE.test(name) && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) return value + "px";
	return ("" + value).trim();
}
var attributeCache = {};
function applyAnimatedValues(instance, props) {
	if (!instance.nodeType || !instance.setAttribute) return false;
	const isFilterElement = instance.nodeName === "filter" || instance.parentNode && instance.parentNode.nodeName === "filter";
	const { className, style, children, scrollTop, scrollLeft, viewBox, ...attributes } = props;
	const values = Object.values(attributes);
	const names = Object.keys(attributes).map((name) => isFilterElement || instance.hasAttribute(name) ? name : attributeCache[name] || (attributeCache[name] = name.replace(/([A-Z])/g, (n) => "-" + n.toLowerCase())));
	if (children !== void 0) instance.textContent = children;
	for (const name in style) if (style.hasOwnProperty(name)) {
		const value = dangerousStyleValue(name, style[name]);
		if (isCustomPropRE.test(name)) instance.style.setProperty(name, value);
		else instance.style[name] = value;
	}
	names.forEach((name, i) => {
		instance.setAttribute(name, values[i]);
	});
	if (className !== void 0) instance.className = className;
	if (scrollTop !== void 0) instance.scrollTop = scrollTop;
	if (scrollLeft !== void 0) instance.scrollLeft = scrollLeft;
	if (viewBox !== void 0) instance.setAttribute("viewBox", viewBox);
}
var isUnitlessNumber = {
	animationIterationCount: true,
	borderImageOutset: true,
	borderImageSlice: true,
	borderImageWidth: true,
	boxFlex: true,
	boxFlexGroup: true,
	boxOrdinalGroup: true,
	columnCount: true,
	columns: true,
	flex: true,
	flexGrow: true,
	flexPositive: true,
	flexShrink: true,
	flexNegative: true,
	flexOrder: true,
	gridRow: true,
	gridRowEnd: true,
	gridRowSpan: true,
	gridRowStart: true,
	gridColumn: true,
	gridColumnEnd: true,
	gridColumnSpan: true,
	gridColumnStart: true,
	fontWeight: true,
	lineClamp: true,
	lineHeight: true,
	opacity: true,
	order: true,
	orphans: true,
	tabSize: true,
	widows: true,
	zIndex: true,
	zoom: true,
	fillOpacity: true,
	floodOpacity: true,
	stopOpacity: true,
	strokeDasharray: true,
	strokeDashoffset: true,
	strokeMiterlimit: true,
	strokeOpacity: true,
	strokeWidth: true
};
var prefixKey = (prefix, key) => prefix + key.charAt(0).toUpperCase() + key.substring(1);
var prefixes = [
	"Webkit",
	"Ms",
	"Moz",
	"O"
];
isUnitlessNumber = Object.keys(isUnitlessNumber).reduce((acc, prop) => {
	prefixes.forEach((prefix) => acc[prefixKey(prefix, prop)] = acc[prop]);
	return acc;
}, isUnitlessNumber);
var domTransforms = /^(matrix|translate|scale|rotate|skew)/;
var pxTransforms = /^(translate)/;
var degTransforms = /^(rotate|skew)/;
var addUnit = (value, unit) => is$1.num(value) && value !== 0 ? value + unit : value;
var isValueIdentity = (value, id) => is$1.arr(value) ? value.every((v) => isValueIdentity(v, id)) : is$1.num(value) ? value === id : parseFloat(value) === id;
var AnimatedStyle = class extends AnimatedObject {
	constructor({ x, y, z, ...style }) {
		const inputs = [];
		const transforms = [];
		if (x || y || z) {
			inputs.push([
				x || 0,
				y || 0,
				z || 0
			]);
			transforms.push((xyz) => [`translate3d(${xyz.map((v) => addUnit(v, "px")).join(",")})`, isValueIdentity(xyz, 0)]);
		}
		eachProp(style, (value, key) => {
			if (key === "transform") {
				inputs.push([value || ""]);
				transforms.push((transform) => [transform, transform === ""]);
			} else if (domTransforms.test(key)) {
				delete style[key];
				if (is$1.und(value)) return;
				const unit = pxTransforms.test(key) ? "px" : degTransforms.test(key) ? "deg" : "";
				inputs.push(toArray$1(value));
				transforms.push(key === "rotate3d" ? ([x2, y2, z2, deg]) => [`rotate3d(${x2},${y2},${z2},${addUnit(deg, unit)})`, isValueIdentity(deg, 0)] : (input) => [`${key}(${input.map((v) => addUnit(v, unit)).join(",")})`, isValueIdentity(input, key.startsWith("scale") ? 1 : 0)]);
			}
		});
		if (inputs.length) style.transform = new FluidTransform(inputs, transforms);
		super(style);
	}
};
var FluidTransform = class extends FluidValue {
	constructor(inputs, transforms) {
		super();
		this.inputs = inputs;
		this.transforms = transforms;
		this._value = null;
	}
	get() {
		return this._value || (this._value = this._get());
	}
	_get() {
		let transform = "";
		let identity = true;
		each(this.inputs, (input, i) => {
			const arg1 = getFluidValue(input[0]);
			const [t, id] = this.transforms[i](is$1.arr(arg1) ? arg1 : input.map(getFluidValue));
			transform += " " + t;
			identity = identity && id;
		});
		return identity ? "none" : transform;
	}
	observerAdded(count) {
		if (count == 1) each(this.inputs, (input) => each(input, (value) => hasFluidValue(value) && addFluidObserver(value, this)));
	}
	observerRemoved(count) {
		if (count == 0) each(this.inputs, (input) => each(input, (value) => hasFluidValue(value) && removeFluidObserver(value, this)));
	}
	eventObserved(event) {
		if (event.type == "change") this._value = null;
		callFluidObservers(this, event);
	}
};
var primitives = [
	"a",
	"abbr",
	"address",
	"area",
	"article",
	"aside",
	"audio",
	"b",
	"base",
	"bdi",
	"bdo",
	"big",
	"blockquote",
	"body",
	"br",
	"button",
	"canvas",
	"caption",
	"cite",
	"code",
	"col",
	"colgroup",
	"data",
	"datalist",
	"dd",
	"del",
	"details",
	"dfn",
	"dialog",
	"div",
	"dl",
	"dt",
	"em",
	"embed",
	"fieldset",
	"figcaption",
	"figure",
	"footer",
	"form",
	"h1",
	"h2",
	"h3",
	"h4",
	"h5",
	"h6",
	"head",
	"header",
	"hgroup",
	"hr",
	"html",
	"i",
	"iframe",
	"img",
	"input",
	"ins",
	"kbd",
	"keygen",
	"label",
	"legend",
	"li",
	"link",
	"main",
	"map",
	"mark",
	"menu",
	"menuitem",
	"meta",
	"meter",
	"nav",
	"noscript",
	"object",
	"ol",
	"optgroup",
	"option",
	"output",
	"p",
	"param",
	"picture",
	"pre",
	"progress",
	"q",
	"rp",
	"rt",
	"ruby",
	"s",
	"samp",
	"script",
	"section",
	"select",
	"small",
	"source",
	"span",
	"strong",
	"style",
	"sub",
	"summary",
	"sup",
	"table",
	"tbody",
	"td",
	"textarea",
	"tfoot",
	"th",
	"thead",
	"time",
	"title",
	"tr",
	"track",
	"u",
	"ul",
	"var",
	"video",
	"wbr",
	"circle",
	"clipPath",
	"defs",
	"ellipse",
	"foreignObject",
	"g",
	"image",
	"line",
	"linearGradient",
	"mask",
	"path",
	"pattern",
	"polygon",
	"polyline",
	"radialGradient",
	"rect",
	"stop",
	"svg",
	"text",
	"tspan"
];
globals_exports.assign({
	batchedUpdates: import_react_dom.unstable_batchedUpdates,
	createStringInterpolator: createStringInterpolator2,
	colors: colors2
});
var animated = createHost(primitives, {
	applyAnimatedValues,
	createAnimatedStyle: (style) => new AnimatedStyle(style),
	getComponentProps: ({ scrollTop, scrollLeft, ...props }) => props
}).animated;
//#endregion
//#region ../component-library/src/Block.tsx
function Block(props) {
	const { className = "", style, innerRef, ...restProps } = props;
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
		...restProps,
		ref: innerRef,
		className: cx(className, css(style))
	});
}
//#endregion
//#region ../component-library/src/icons/Loading.tsx
var SvgLoading = (props) => {
	const { color = "currentColor" } = props;
	const [gradientId] = (0, import_react.useState)("gradient-" + Math.random());
	return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
		...props,
		viewBox: "0 0 38 38",
		style: { ...props.style },
		children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("linearGradient", {
			x1: "8.042%",
			y1: "0%",
			x2: "65.682%",
			y2: "23.865%",
			id: gradientId,
			children: [
				/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", {
					stopColor: color,
					stopOpacity: 0,
					offset: "0%"
				}),
				/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", {
					stopColor: color,
					stopOpacity: .631,
					offset: "63.146%"
				}),
				/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", {
					stopColor: color,
					offset: "100%"
				})
			]
		}) }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", {
			transform: "translate(1 2)",
			fill: "none",
			fillRule: "evenodd",
			children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
				d: "M36 18c0-9.94-8.06-18-18-18",
				stroke: "url(#" + gradientId + ")",
				strokeWidth: 2,
				fill: "none"
			}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", {
				fill: color,
				cx: 36,
				cy: 18,
				r: 1
			})]
		})]
	});
};
//#endregion
//#region ../component-library/src/icons/AnimatedLoading.tsx
var rotation = keyframes({
	"0%": { transform: "rotate(-90deg)" },
	"100%": { transform: "rotate(666deg)" }
});
function AnimatedLoading(props) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
		className: css({
			animationName: rotation,
			animationDuration: "1.6s",
			animationTimingFunction: "cubic-bezier(0.17, 0.67, 0.83, 0.67)",
			animationIterationCount: "infinite",
			lineHeight: 0
		}),
		children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgLoading, { ...props })
	});
}
//#endregion
//#region ../../node_modules/react-aria-components/dist/RSPContexts.mjs
var $4e85f108e88277b8$export$b085522c77523c51 = (0, import_react.createContext)(null);
var $4e85f108e88277b8$export$ebe63fadcdce34ed = (0, import_react.createContext)(null);
var $4e85f108e88277b8$export$44644b8a16031b5b = (0, import_react.createContext)(null);
var $4e85f108e88277b8$export$717b2c0a523a0b53 = (0, import_react.createContext)(null);
var $4e85f108e88277b8$export$265015d6dc85bf21 = (0, import_react.createContext)(null);
var $4e85f108e88277b8$export$d688439359537581 = (0, import_react.createContext)({});
var $4e85f108e88277b8$export$b0d3ecf7112093a7 = (0, import_react.createContext)(null);
var $4e85f108e88277b8$export$698f465ec27e93df = (0, import_react.createContext)(null);
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/useLayoutEffect.mjs
var $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== "undefined" ? import_react.useLayoutEffect : () => {};
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/useValueEffect.mjs
function $1dbecbe27a04f9af$export$14d238f342723f25(defaultValue) {
	let [value, setValue] = (0, import_react.useState)(defaultValue);
	let currValue = (0, import_react.useRef)(value);
	let effect = (0, import_react.useRef)(null);
	let nextRef = (0, import_react.useRef)(() => {
		if (!effect.current) return;
		let newValue = effect.current.next();
		if (newValue.done) {
			effect.current = null;
			return;
		}
		if (currValue.current === newValue.value) nextRef.current();
		else setValue(newValue.value);
	});
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		currValue.current = value;
		if (effect.current) nextRef.current();
	});
	return [value, (0, import_react.useCallback)((fn) => {
		effect.current = fn(currValue.current);
		nextRef.current();
	}, [nextRef])];
}
//#endregion
//#region ../../node_modules/@react-aria/ssr/dist/SSRProvider.mjs
var $b5e257d569688ac6$var$defaultContext = {
	prefix: String(Math.round(Math.random() * 1e10)),
	current: 0
};
var $b5e257d569688ac6$var$SSRContext = /* @__PURE__ */ import_react.createContext($b5e257d569688ac6$var$defaultContext);
var $b5e257d569688ac6$var$IsSSRContext = /* @__PURE__ */ import_react.createContext(false);
Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
var $b5e257d569688ac6$var$componentIds = /* @__PURE__ */ new WeakMap();
function $b5e257d569688ac6$var$useCounter(isDisabled = false) {
	let ctx = (0, import_react.useContext)($b5e257d569688ac6$var$SSRContext);
	let ref = (0, import_react.useRef)(null);
	if (ref.current === null && !isDisabled) {
		var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
		let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = import_react.default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === void 0 ? void 0 : (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner = _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner === void 0 ? void 0 : _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner.current;
		if (currentOwner) {
			let prevComponentValue = $b5e257d569688ac6$var$componentIds.get(currentOwner);
			if (prevComponentValue == null) $b5e257d569688ac6$var$componentIds.set(currentOwner, {
				id: ctx.current,
				state: currentOwner.memoizedState
			});
			else if (currentOwner.memoizedState !== prevComponentValue.state) {
				ctx.current = prevComponentValue.id;
				$b5e257d569688ac6$var$componentIds.delete(currentOwner);
			}
		}
		ref.current = ++ctx.current;
	}
	return ref.current;
}
function $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {
	let ctx = (0, import_react.useContext)($b5e257d569688ac6$var$SSRContext);
	let counter = $b5e257d569688ac6$var$useCounter(!!defaultId);
	let prefix = `react-aria${ctx.prefix}`;
	return defaultId || `${prefix}-${counter}`;
}
function $b5e257d569688ac6$var$useModernSSRSafeId(defaultId) {
	let id = import_react.useId();
	let [didSSR] = (0, import_react.useState)($b5e257d569688ac6$export$535bd6ca7f90a273());
	let prefix = didSSR || false ? "react-aria" : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;
	return defaultId || `${prefix}-${id}`;
}
var $b5e257d569688ac6$export$619500959fc48b26 = typeof import_react.useId === "function" ? $b5e257d569688ac6$var$useModernSSRSafeId : $b5e257d569688ac6$var$useLegacySSRSafeId;
function $b5e257d569688ac6$var$getSnapshot() {
	return false;
}
function $b5e257d569688ac6$var$getServerSnapshot() {
	return true;
}
function $b5e257d569688ac6$var$subscribe(onStoreChange) {
	return () => {};
}
function $b5e257d569688ac6$export$535bd6ca7f90a273() {
	if (typeof import_react.useSyncExternalStore === "function") return import_react.useSyncExternalStore($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot);
	return (0, import_react.useContext)($b5e257d569688ac6$var$IsSSRContext);
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/useId.mjs
var $bdb11010cef70236$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
var $bdb11010cef70236$export$d41a04c74483c6ef = /* @__PURE__ */ new Map();
var $bdb11010cef70236$var$registry;
if (typeof FinalizationRegistry !== "undefined") $bdb11010cef70236$var$registry = new FinalizationRegistry((heldValue) => {
	$bdb11010cef70236$export$d41a04c74483c6ef.delete(heldValue);
});
function $bdb11010cef70236$export$f680877a34711e37(defaultId) {
	let [value, setValue] = (0, import_react.useState)(defaultId);
	let nextId = (0, import_react.useRef)(null);
	let res = $b5e257d569688ac6$export$619500959fc48b26(value);
	let cleanupRef = (0, import_react.useRef)(null);
	if ($bdb11010cef70236$var$registry) $bdb11010cef70236$var$registry.register(cleanupRef, res);
	if ($bdb11010cef70236$var$canUseDOM) {
		const cacheIdRef = $bdb11010cef70236$export$d41a04c74483c6ef.get(res);
		if (cacheIdRef && !cacheIdRef.includes(nextId)) cacheIdRef.push(nextId);
		else $bdb11010cef70236$export$d41a04c74483c6ef.set(res, [nextId]);
	}
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		let r = res;
		return () => {
			if ($bdb11010cef70236$var$registry) $bdb11010cef70236$var$registry.unregister(cleanupRef);
			$bdb11010cef70236$export$d41a04c74483c6ef.delete(r);
		};
	}, [res]);
	(0, import_react.useEffect)(() => {
		let newId = nextId.current;
		if (newId) setValue(newId);
		return () => {
			if (newId) nextId.current = null;
		};
	});
	return res;
}
function $bdb11010cef70236$export$cd8c9cb68f842629(idA, idB) {
	if (idA === idB) return idA;
	let setIdsA = $bdb11010cef70236$export$d41a04c74483c6ef.get(idA);
	if (setIdsA) {
		setIdsA.forEach((ref) => ref.current = idB);
		return idB;
	}
	let setIdsB = $bdb11010cef70236$export$d41a04c74483c6ef.get(idB);
	if (setIdsB) {
		setIdsB.forEach((ref) => ref.current = idA);
		return idA;
	}
	return idB;
}
function $bdb11010cef70236$export$b4cc09c592e8fdb8(depArray = []) {
	let id = $bdb11010cef70236$export$f680877a34711e37();
	let [resolvedId, setResolvedId] = $1dbecbe27a04f9af$export$14d238f342723f25(id);
	let updateId = (0, import_react.useCallback)(() => {
		setResolvedId(function* () {
			yield id;
			yield document.getElementById(id) ? id : void 0;
		});
	}, [id, setResolvedId]);
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(updateId, [
		id,
		updateId,
		...depArray
	]);
	return resolvedId;
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/chain.mjs
/**
* Calls all functions in the order they were chained with the same arguments.
*/ function $ff5963eb1fccf552$export$e08e3b67e392101e(...callbacks) {
	return (...args) => {
		for (let callback of callbacks) if (typeof callback === "function") callback(...args);
	};
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/domHelpers.mjs
var $431fbd86ca7dc216$export$b204af158042fbac = (el) => {
	var _el_ownerDocument;
	return (_el_ownerDocument = el === null || el === void 0 ? void 0 : el.ownerDocument) !== null && _el_ownerDocument !== void 0 ? _el_ownerDocument : document;
};
var $431fbd86ca7dc216$export$f21a1ffae260145a = (el) => {
	if (el && "window" in el && el.window === el) return el;
	return $431fbd86ca7dc216$export$b204af158042fbac(el).defaultView || window;
};
/**
* Type guard that checks if a value is a Node. Verifies the presence and type of the nodeType property.
*/ function $431fbd86ca7dc216$var$isNode(value) {
	return value !== null && typeof value === "object" && "nodeType" in value && typeof value.nodeType === "number";
}
function $431fbd86ca7dc216$export$af51f0f06c0f328a(node) {
	return $431fbd86ca7dc216$var$isNode(node) && node.nodeType === Node.DOCUMENT_FRAGMENT_NODE && "host" in node;
}
//#endregion
//#region ../../node_modules/@react-stately/flags/dist/import.mjs
var $f4e2df6bd15f8569$var$_shadowDOM = false;
function $f4e2df6bd15f8569$export$98658e8c59125e6a() {
	return $f4e2df6bd15f8569$var$_shadowDOM;
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/DOMFunctions.mjs
function $d4ee10de306f2510$export$4282f70798064fe0(node, otherNode) {
	if (!$f4e2df6bd15f8569$export$98658e8c59125e6a()) return otherNode && node ? node.contains(otherNode) : false;
	if (!node || !otherNode) return false;
	let currentNode = otherNode;
	while (currentNode !== null) {
		if (currentNode === node) return true;
		if (currentNode.tagName === "SLOT" && currentNode.assignedSlot) currentNode = currentNode.assignedSlot.parentNode;
		else if ($431fbd86ca7dc216$export$af51f0f06c0f328a(currentNode)) currentNode = currentNode.host;
		else currentNode = currentNode.parentNode;
	}
	return false;
}
var $d4ee10de306f2510$export$cd4e5573fbe2b576 = (doc = document) => {
	var _activeElement_shadowRoot;
	if (!$f4e2df6bd15f8569$export$98658e8c59125e6a()) return doc.activeElement;
	let activeElement = doc.activeElement;
	while (activeElement && "shadowRoot" in activeElement && ((_activeElement_shadowRoot = activeElement.shadowRoot) === null || _activeElement_shadowRoot === void 0 ? void 0 : _activeElement_shadowRoot.activeElement)) activeElement = activeElement.shadowRoot.activeElement;
	return activeElement;
};
function $d4ee10de306f2510$export$e58f029f0fbfdb29(event) {
	if ($f4e2df6bd15f8569$export$98658e8c59125e6a() && event.target instanceof Element && event.target.shadowRoot) {
		var _event_composedPath_, _event_nativeEvent_composedPath_;
		if ("composedPath" in event) return (_event_composedPath_ = event.composedPath()[0]) !== null && _event_composedPath_ !== void 0 ? _event_composedPath_ : null;
		else if ("composedPath" in event.nativeEvent) return (_event_nativeEvent_composedPath_ = event.nativeEvent.composedPath()[0]) !== null && _event_nativeEvent_composedPath_ !== void 0 ? _event_nativeEvent_composedPath_ : null;
	}
	return event.target;
}
function $d4ee10de306f2510$export$b4f377a2b6254582(node) {
	if (!node) return false;
	let root = node.getRootNode();
	let ownerWindow = $431fbd86ca7dc216$export$f21a1ffae260145a(node);
	if (!(root instanceof ownerWindow.Document || root instanceof ownerWindow.ShadowRoot)) return false;
	let activeElement = root.activeElement;
	return activeElement != null && node.contains(activeElement);
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/ShadowTreeWalker.mjs
var $dfc540311bf7f109$export$63eb3ababa9c55c4 = class {
	get currentNode() {
		return this._currentNode;
	}
	set currentNode(node) {
		if (!$d4ee10de306f2510$export$4282f70798064fe0(this.root, node)) throw new Error("Cannot set currentNode to a node that is not contained by the root node.");
		const walkers = [];
		let curNode = node;
		let currentWalkerCurrentNode = node;
		this._currentNode = node;
		while (curNode && curNode !== this.root) if (curNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
			const shadowRoot = curNode;
			const walker = this._doc.createTreeWalker(shadowRoot, this.whatToShow, { acceptNode: this._acceptNode });
			walkers.push(walker);
			walker.currentNode = currentWalkerCurrentNode;
			this._currentSetFor.add(walker);
			curNode = currentWalkerCurrentNode = shadowRoot.host;
		} else curNode = curNode.parentNode;
		const walker = this._doc.createTreeWalker(this.root, this.whatToShow, { acceptNode: this._acceptNode });
		walkers.push(walker);
		walker.currentNode = currentWalkerCurrentNode;
		this._currentSetFor.add(walker);
		this._walkerStack = walkers;
	}
	get doc() {
		return this._doc;
	}
	firstChild() {
		let currentNode = this.currentNode;
		let newNode = this.nextNode();
		if (!$d4ee10de306f2510$export$4282f70798064fe0(currentNode, newNode)) {
			this.currentNode = currentNode;
			return null;
		}
		if (newNode) this.currentNode = newNode;
		return newNode;
	}
	lastChild() {
		let newNode = this._walkerStack[0].lastChild();
		if (newNode) this.currentNode = newNode;
		return newNode;
	}
	nextNode() {
		const nextNode = this._walkerStack[0].nextNode();
		if (nextNode) {
			if (nextNode.shadowRoot) {
				var _this_filter;
				let nodeResult;
				if (typeof this.filter === "function") nodeResult = this.filter(nextNode);
				else if ((_this_filter = this.filter) === null || _this_filter === void 0 ? void 0 : _this_filter.acceptNode) nodeResult = this.filter.acceptNode(nextNode);
				if (nodeResult === NodeFilter.FILTER_ACCEPT) {
					this.currentNode = nextNode;
					return nextNode;
				}
				let newNode = this.nextNode();
				if (newNode) this.currentNode = newNode;
				return newNode;
			}
			if (nextNode) this.currentNode = nextNode;
			return nextNode;
		} else if (this._walkerStack.length > 1) {
			this._walkerStack.shift();
			let newNode = this.nextNode();
			if (newNode) this.currentNode = newNode;
			return newNode;
		} else return null;
	}
	previousNode() {
		const currentWalker = this._walkerStack[0];
		if (currentWalker.currentNode === currentWalker.root) {
			if (this._currentSetFor.has(currentWalker)) {
				this._currentSetFor.delete(currentWalker);
				if (this._walkerStack.length > 1) {
					this._walkerStack.shift();
					let newNode = this.previousNode();
					if (newNode) this.currentNode = newNode;
					return newNode;
				} else return null;
			}
			return null;
		}
		const previousNode = currentWalker.previousNode();
		if (previousNode) {
			if (previousNode.shadowRoot) {
				var _this_filter;
				let nodeResult;
				if (typeof this.filter === "function") nodeResult = this.filter(previousNode);
				else if ((_this_filter = this.filter) === null || _this_filter === void 0 ? void 0 : _this_filter.acceptNode) nodeResult = this.filter.acceptNode(previousNode);
				if (nodeResult === NodeFilter.FILTER_ACCEPT) {
					if (previousNode) this.currentNode = previousNode;
					return previousNode;
				}
				let newNode = this.lastChild();
				if (newNode) this.currentNode = newNode;
				return newNode;
			}
			if (previousNode) this.currentNode = previousNode;
			return previousNode;
		} else if (this._walkerStack.length > 1) {
			this._walkerStack.shift();
			let newNode = this.previousNode();
			if (newNode) this.currentNode = newNode;
			return newNode;
		} else return null;
	}
	/**
	* @deprecated
	*/ nextSibling() {
		return null;
	}
	/**
	* @deprecated
	*/ previousSibling() {
		return null;
	}
	/**
	* @deprecated
	*/ parentNode() {
		return null;
	}
	constructor(doc, root, whatToShow, filter) {
		this._walkerStack = [];
		this._currentSetFor = /* @__PURE__ */ new Set();
		this._acceptNode = (node) => {
			if (node.nodeType === Node.ELEMENT_NODE) {
				const shadowRoot = node.shadowRoot;
				if (shadowRoot) {
					const walker = this._doc.createTreeWalker(shadowRoot, this.whatToShow, { acceptNode: this._acceptNode });
					this._walkerStack.unshift(walker);
					return NodeFilter.FILTER_ACCEPT;
				} else {
					var _this_filter;
					if (typeof this.filter === "function") return this.filter(node);
					else if ((_this_filter = this.filter) === null || _this_filter === void 0 ? void 0 : _this_filter.acceptNode) return this.filter.acceptNode(node);
					else if (this.filter === null) return NodeFilter.FILTER_ACCEPT;
				}
			}
			return NodeFilter.FILTER_SKIP;
		};
		this._doc = doc;
		this.root = root;
		this.filter = filter !== null && filter !== void 0 ? filter : null;
		this.whatToShow = whatToShow !== null && whatToShow !== void 0 ? whatToShow : NodeFilter.SHOW_ALL;
		this._currentNode = root;
		this._walkerStack.unshift(doc.createTreeWalker(root, whatToShow, this._acceptNode));
		const shadowRoot = root.shadowRoot;
		if (shadowRoot) {
			const walker = this._doc.createTreeWalker(shadowRoot, this.whatToShow, { acceptNode: this._acceptNode });
			this._walkerStack.unshift(walker);
		}
	}
};
function $dfc540311bf7f109$export$4d0f8be8b12a7ef6(doc, root, whatToShow, filter) {
	if ($f4e2df6bd15f8569$export$98658e8c59125e6a()) return new $dfc540311bf7f109$export$63eb3ababa9c55c4(doc, root, whatToShow, filter);
	return doc.createTreeWalker(root, whatToShow, filter);
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/mergeRefs.mjs
function $5dc95899b306f630$export$c9058316764c140e(...refs) {
	if (refs.length === 1 && refs[0]) return refs[0];
	return (value) => {
		let hasCleanup = false;
		const cleanups = refs.map((ref) => {
			const cleanup = $5dc95899b306f630$var$setRef(ref, value);
			hasCleanup || (hasCleanup = typeof cleanup == "function");
			return cleanup;
		});
		if (hasCleanup) return () => {
			cleanups.forEach((cleanup, i) => {
				if (typeof cleanup === "function") cleanup();
				else $5dc95899b306f630$var$setRef(refs[i], null);
			});
		};
	};
}
function $5dc95899b306f630$var$setRef(ref, value) {
	if (typeof ref === "function") return ref(value);
	else if (ref != null) ref.current = value;
}
//#endregion
//#region ../../node_modules/clsx/dist/clsx.mjs
function r$1(e) {
	var t, f, n = "";
	if ("string" == typeof e || "number" == typeof e) n += e;
	else if ("object" == typeof e) if (Array.isArray(e)) {
		var o = e.length;
		for (t = 0; t < o; t++) e[t] && (f = r$1(e[t])) && (n && (n += " "), n += f);
	} else for (f in e) e[f] && (n && (n += " "), n += f);
	return n;
}
function clsx() {
	for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r$1(e)) && (n && (n += " "), n += t);
	return n;
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/mergeProps.mjs
function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
	let result = { ...args[0] };
	for (let i = 1; i < args.length; i++) {
		let props = args[i];
		for (let key in props) {
			let a = result[key];
			let b = props[key];
			if (typeof a === "function" && typeof b === "function" && key[0] === "o" && key[1] === "n" && key.charCodeAt(2) >= 65 && key.charCodeAt(2) <= 90) result[key] = $ff5963eb1fccf552$export$e08e3b67e392101e(a, b);
			else if ((key === "className" || key === "UNSAFE_className") && typeof a === "string" && typeof b === "string") result[key] = clsx(a, b);
			else if (key === "id" && a && b) result.id = $bdb11010cef70236$export$cd8c9cb68f842629(a, b);
			else if (key === "ref" && a && b) result.ref = $5dc95899b306f630$export$c9058316764c140e(a, b);
			else result[key] = b !== void 0 ? b : a;
		}
	}
	return result;
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/filterDOMProps.mjs
var $65484d02dcb7eb3e$var$DOMPropNames = new Set(["id"]);
var $65484d02dcb7eb3e$var$labelablePropNames = new Set([
	"aria-label",
	"aria-labelledby",
	"aria-describedby",
	"aria-details"
]);
var $65484d02dcb7eb3e$var$linkPropNames = new Set([
	"href",
	"hrefLang",
	"target",
	"rel",
	"download",
	"ping",
	"referrerPolicy"
]);
var $65484d02dcb7eb3e$var$globalAttrs = new Set([
	"dir",
	"lang",
	"hidden",
	"inert",
	"translate"
]);
var $65484d02dcb7eb3e$var$globalEvents = new Set([
	"onClick",
	"onAuxClick",
	"onContextMenu",
	"onDoubleClick",
	"onMouseDown",
	"onMouseEnter",
	"onMouseLeave",
	"onMouseMove",
	"onMouseOut",
	"onMouseOver",
	"onMouseUp",
	"onTouchCancel",
	"onTouchEnd",
	"onTouchMove",
	"onTouchStart",
	"onPointerDown",
	"onPointerMove",
	"onPointerUp",
	"onPointerCancel",
	"onPointerEnter",
	"onPointerLeave",
	"onPointerOver",
	"onPointerOut",
	"onGotPointerCapture",
	"onLostPointerCapture",
	"onScroll",
	"onWheel",
	"onAnimationStart",
	"onAnimationEnd",
	"onAnimationIteration",
	"onTransitionCancel",
	"onTransitionEnd",
	"onTransitionRun",
	"onTransitionStart"
]);
var $65484d02dcb7eb3e$var$propRe = /^(data-.*)$/;
function $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, opts = {}) {
	let { labelable, isLink, global, events = global, propNames } = opts;
	let filteredProps = {};
	for (const prop in props) if (Object.prototype.hasOwnProperty.call(props, prop) && ($65484d02dcb7eb3e$var$DOMPropNames.has(prop) || labelable && $65484d02dcb7eb3e$var$labelablePropNames.has(prop) || isLink && $65484d02dcb7eb3e$var$linkPropNames.has(prop) || global && $65484d02dcb7eb3e$var$globalAttrs.has(prop) || events && ($65484d02dcb7eb3e$var$globalEvents.has(prop) || prop.endsWith("Capture") && $65484d02dcb7eb3e$var$globalEvents.has(prop.slice(0, -7))) || (propNames === null || propNames === void 0 ? void 0 : propNames.has(prop)) || $65484d02dcb7eb3e$var$propRe.test(prop))) filteredProps[prop] = props[prop];
	return filteredProps;
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/focusWithoutScrolling.mjs
function $7215afc6de606d6b$export$de79e2c695e052f3(element) {
	if ($7215afc6de606d6b$var$supportsPreventScroll()) element.focus({ preventScroll: true });
	else {
		let scrollableElements = $7215afc6de606d6b$var$getScrollableElements(element);
		element.focus();
		$7215afc6de606d6b$var$restoreScrollPosition(scrollableElements);
	}
}
var $7215afc6de606d6b$var$supportsPreventScrollCached = null;
function $7215afc6de606d6b$var$supportsPreventScroll() {
	if ($7215afc6de606d6b$var$supportsPreventScrollCached == null) {
		$7215afc6de606d6b$var$supportsPreventScrollCached = false;
		try {
			document.createElement("div").focus({ get preventScroll() {
				$7215afc6de606d6b$var$supportsPreventScrollCached = true;
				return true;
			} });
		} catch {}
	}
	return $7215afc6de606d6b$var$supportsPreventScrollCached;
}
function $7215afc6de606d6b$var$getScrollableElements(element) {
	let parent = element.parentNode;
	let scrollableElements = [];
	let rootScrollingElement = document.scrollingElement || document.documentElement;
	while (parent instanceof HTMLElement && parent !== rootScrollingElement) {
		if (parent.offsetHeight < parent.scrollHeight || parent.offsetWidth < parent.scrollWidth) scrollableElements.push({
			element: parent,
			scrollTop: parent.scrollTop,
			scrollLeft: parent.scrollLeft
		});
		parent = parent.parentNode;
	}
	if (rootScrollingElement instanceof HTMLElement) scrollableElements.push({
		element: rootScrollingElement,
		scrollTop: rootScrollingElement.scrollTop,
		scrollLeft: rootScrollingElement.scrollLeft
	});
	return scrollableElements;
}
function $7215afc6de606d6b$var$restoreScrollPosition(scrollableElements) {
	for (let { element, scrollTop, scrollLeft } of scrollableElements) {
		element.scrollTop = scrollTop;
		element.scrollLeft = scrollLeft;
	}
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/platform.mjs
function $c87311424ea30a05$var$testUserAgent(re) {
	var _window_navigator_userAgentData;
	if (typeof window === "undefined" || window.navigator == null) return false;
	let brands = (_window_navigator_userAgentData = window.navigator["userAgentData"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.brands;
	return Array.isArray(brands) && brands.some((brand) => re.test(brand.brand)) || re.test(window.navigator.userAgent);
}
function $c87311424ea30a05$var$testPlatform(re) {
	var _window_navigator_userAgentData;
	return typeof window !== "undefined" && window.navigator != null ? re.test(((_window_navigator_userAgentData = window.navigator["userAgentData"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.platform) || window.navigator.platform) : false;
}
function $c87311424ea30a05$var$cached(fn) {
	let res = null;
	return () => {
		if (res == null) res = fn();
		return res;
	};
}
var $c87311424ea30a05$export$9ac100e40613ea10 = $c87311424ea30a05$var$cached(function() {
	return $c87311424ea30a05$var$testPlatform(/^Mac/i);
});
var $c87311424ea30a05$export$186c6964ca17d99 = $c87311424ea30a05$var$cached(function() {
	return $c87311424ea30a05$var$testPlatform(/^iPhone/i);
});
var $c87311424ea30a05$export$7bef049ce92e4224 = $c87311424ea30a05$var$cached(function() {
	return $c87311424ea30a05$var$testPlatform(/^iPad/i) || $c87311424ea30a05$export$9ac100e40613ea10() && navigator.maxTouchPoints > 1;
});
var $c87311424ea30a05$export$fedb369cb70207f1 = $c87311424ea30a05$var$cached(function() {
	return $c87311424ea30a05$export$186c6964ca17d99() || $c87311424ea30a05$export$7bef049ce92e4224();
});
var $c87311424ea30a05$export$e1865c3bedcd822b = $c87311424ea30a05$var$cached(function() {
	return $c87311424ea30a05$export$9ac100e40613ea10() || $c87311424ea30a05$export$fedb369cb70207f1();
});
var $c87311424ea30a05$export$78551043582a6a98 = $c87311424ea30a05$var$cached(function() {
	return $c87311424ea30a05$var$testUserAgent(/AppleWebKit/i) && !$c87311424ea30a05$export$6446a186d09e379e();
});
var $c87311424ea30a05$export$6446a186d09e379e = $c87311424ea30a05$var$cached(function() {
	return $c87311424ea30a05$var$testUserAgent(/Chrome/i);
});
var $c87311424ea30a05$export$a11b0059900ceec8 = $c87311424ea30a05$var$cached(function() {
	return $c87311424ea30a05$var$testUserAgent(/Android/i);
});
var $c87311424ea30a05$export$b7d78993b74f766d = $c87311424ea30a05$var$cached(function() {
	return $c87311424ea30a05$var$testUserAgent(/Firefox/i);
});
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/openLink.mjs
var $ea8dcbcb9ea1b556$var$RouterContext = /* @__PURE__ */ (0, import_react.createContext)({
	isNative: true,
	open: $ea8dcbcb9ea1b556$var$openSyntheticLink,
	useHref: (href) => href
});
function $ea8dcbcb9ea1b556$export$9a302a45f65d0572() {
	return (0, import_react.useContext)($ea8dcbcb9ea1b556$var$RouterContext);
}
function $ea8dcbcb9ea1b556$export$95185d699e05d4d7(target, modifiers, setOpening = true) {
	var _window_event_type, _window_event;
	let { metaKey, ctrlKey, altKey, shiftKey } = modifiers;
	if ($c87311424ea30a05$export$b7d78993b74f766d() && ((_window_event = window.event) === null || _window_event === void 0 ? void 0 : (_window_event_type = _window_event.type) === null || _window_event_type === void 0 ? void 0 : _window_event_type.startsWith("key")) && target.target === "_blank") if ($c87311424ea30a05$export$9ac100e40613ea10()) metaKey = true;
	else ctrlKey = true;
	let event = $c87311424ea30a05$export$78551043582a6a98() && $c87311424ea30a05$export$9ac100e40613ea10() && !$c87311424ea30a05$export$7bef049ce92e4224() && true ? new KeyboardEvent("keydown", {
		keyIdentifier: "Enter",
		metaKey,
		ctrlKey,
		altKey,
		shiftKey
	}) : new MouseEvent("click", {
		metaKey,
		ctrlKey,
		altKey,
		shiftKey,
		detail: 1,
		bubbles: true,
		cancelable: true
	});
	$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening = setOpening;
	$7215afc6de606d6b$export$de79e2c695e052f3(target);
	target.dispatchEvent(event);
	$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening = false;
}
$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening = false;
function $ea8dcbcb9ea1b556$var$getSyntheticLink(target, open) {
	if (target instanceof HTMLAnchorElement) open(target);
	else if (target.hasAttribute("data-href")) {
		let link = document.createElement("a");
		link.href = target.getAttribute("data-href");
		if (target.hasAttribute("data-target")) link.target = target.getAttribute("data-target");
		if (target.hasAttribute("data-rel")) link.rel = target.getAttribute("data-rel");
		if (target.hasAttribute("data-download")) link.download = target.getAttribute("data-download");
		if (target.hasAttribute("data-ping")) link.ping = target.getAttribute("data-ping");
		if (target.hasAttribute("data-referrer-policy")) link.referrerPolicy = target.getAttribute("data-referrer-policy");
		target.appendChild(link);
		open(link);
		target.removeChild(link);
	}
}
function $ea8dcbcb9ea1b556$var$openSyntheticLink(target, modifiers) {
	$ea8dcbcb9ea1b556$var$getSyntheticLink(target, (link) => $ea8dcbcb9ea1b556$export$95185d699e05d4d7(link, modifiers));
}
function $ea8dcbcb9ea1b556$export$bdc77b0c0a3a85d6(props) {
	let router = $ea8dcbcb9ea1b556$export$9a302a45f65d0572();
	var _props_href;
	const href = router.useHref((_props_href = props.href) !== null && _props_href !== void 0 ? _props_href : "");
	return {
		"data-href": props.href ? href : void 0,
		"data-target": props.target,
		"data-rel": props.rel,
		"data-download": props.download,
		"data-ping": props.ping,
		"data-referrer-policy": props.referrerPolicy
	};
}
function $ea8dcbcb9ea1b556$export$7e924b3091a3bd18(props) {
	let router = $ea8dcbcb9ea1b556$export$9a302a45f65d0572();
	var _props_href;
	const href = router.useHref((_props_href = props === null || props === void 0 ? void 0 : props.href) !== null && _props_href !== void 0 ? _props_href : "");
	return {
		href: (props === null || props === void 0 ? void 0 : props.href) ? href : void 0,
		target: props === null || props === void 0 ? void 0 : props.target,
		rel: props === null || props === void 0 ? void 0 : props.rel,
		download: props === null || props === void 0 ? void 0 : props.download,
		ping: props === null || props === void 0 ? void 0 : props.ping,
		referrerPolicy: props === null || props === void 0 ? void 0 : props.referrerPolicy
	};
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/runAfterTransition.mjs
var $bbed8b41f857bcc0$var$transitionsByElement = /* @__PURE__ */ new Map();
var $bbed8b41f857bcc0$var$transitionCallbacks = /* @__PURE__ */ new Set();
function $bbed8b41f857bcc0$var$setupGlobalEvents() {
	if (typeof window === "undefined") return;
	function isTransitionEvent(event) {
		return "propertyName" in event;
	}
	let onTransitionStart = (e) => {
		let eventTarget = $d4ee10de306f2510$export$e58f029f0fbfdb29(e);
		if (!isTransitionEvent(e) || !eventTarget) return;
		let transitions = $bbed8b41f857bcc0$var$transitionsByElement.get(eventTarget);
		if (!transitions) {
			transitions = /* @__PURE__ */ new Set();
			$bbed8b41f857bcc0$var$transitionsByElement.set(eventTarget, transitions);
			eventTarget.addEventListener("transitioncancel", onTransitionEnd, { once: true });
		}
		transitions.add(e.propertyName);
	};
	let onTransitionEnd = (e) => {
		let eventTarget = $d4ee10de306f2510$export$e58f029f0fbfdb29(e);
		if (!isTransitionEvent(e) || !eventTarget) return;
		let properties = $bbed8b41f857bcc0$var$transitionsByElement.get(eventTarget);
		if (!properties) return;
		properties.delete(e.propertyName);
		if (properties.size === 0) {
			eventTarget.removeEventListener("transitioncancel", onTransitionEnd);
			$bbed8b41f857bcc0$var$transitionsByElement.delete(eventTarget);
		}
		if ($bbed8b41f857bcc0$var$transitionsByElement.size === 0) {
			for (let cb of $bbed8b41f857bcc0$var$transitionCallbacks) cb();
			$bbed8b41f857bcc0$var$transitionCallbacks.clear();
		}
	};
	document.body.addEventListener("transitionrun", onTransitionStart);
	document.body.addEventListener("transitionend", onTransitionEnd);
}
if (typeof document !== "undefined") if (document.readyState !== "loading") $bbed8b41f857bcc0$var$setupGlobalEvents();
else document.addEventListener("DOMContentLoaded", $bbed8b41f857bcc0$var$setupGlobalEvents);
/**
* Cleans up any elements that are no longer in the document.
* This is necessary because we can't rely on transitionend events to fire
* for elements that are removed from the document while transitioning.
*/ function $bbed8b41f857bcc0$var$cleanupDetachedElements() {
	for (const [eventTarget] of $bbed8b41f857bcc0$var$transitionsByElement) if ("isConnected" in eventTarget && !eventTarget.isConnected) $bbed8b41f857bcc0$var$transitionsByElement.delete(eventTarget);
}
function $bbed8b41f857bcc0$export$24490316f764c430(fn) {
	requestAnimationFrame(() => {
		$bbed8b41f857bcc0$var$cleanupDetachedElements();
		if ($bbed8b41f857bcc0$var$transitionsByElement.size === 0) fn();
		else $bbed8b41f857bcc0$var$transitionCallbacks.add(fn);
	});
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/useGlobalListeners.mjs
function $03deb23ff14920c4$export$4eaf04e54aa8eed6() {
	let globalListeners = (0, import_react.useRef)(/* @__PURE__ */ new Map());
	let addGlobalListener = (0, import_react.useCallback)((eventTarget, type, listener, options) => {
		let fn = (options === null || options === void 0 ? void 0 : options.once) ? (...args) => {
			globalListeners.current.delete(listener);
			listener(...args);
		} : listener;
		globalListeners.current.set(listener, {
			type,
			eventTarget,
			fn,
			options
		});
		eventTarget.addEventListener(type, fn, options);
	}, []);
	let removeGlobalListener = (0, import_react.useCallback)((eventTarget, type, listener, options) => {
		var _globalListeners_current_get;
		let fn = ((_globalListeners_current_get = globalListeners.current.get(listener)) === null || _globalListeners_current_get === void 0 ? void 0 : _globalListeners_current_get.fn) || listener;
		eventTarget.removeEventListener(type, fn, options);
		globalListeners.current.delete(listener);
	}, []);
	let removeAllGlobalListeners = (0, import_react.useCallback)(() => {
		globalListeners.current.forEach((value, key) => {
			removeGlobalListener(value.eventTarget, value.type, key, value.options);
		});
	}, [removeGlobalListener]);
	(0, import_react.useEffect)(() => {
		return removeAllGlobalListeners;
	}, [removeAllGlobalListeners]);
	return {
		addGlobalListener,
		removeGlobalListener,
		removeAllGlobalListeners
	};
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/useLabels.mjs
function $313b98861ee5dd6c$export$d6875122194c7b44(props, defaultLabel) {
	let { id, "aria-label": label, "aria-labelledby": labelledBy } = props;
	id = $bdb11010cef70236$export$f680877a34711e37(id);
	if (labelledBy && label) labelledBy = [...new Set([id, ...labelledBy.trim().split(/\s+/)])].join(" ");
	else if (labelledBy) labelledBy = labelledBy.trim().split(/\s+/).join(" ");
	if (!label && !labelledBy && defaultLabel) label = defaultLabel;
	return {
		id,
		"aria-label": label,
		"aria-labelledby": labelledBy
	};
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/useObjectRef.mjs
function $df56164dff5785e2$export$4338b53315abf666(ref) {
	const objRef = (0, import_react.useRef)(null);
	const cleanupRef = (0, import_react.useRef)(void 0);
	const refEffect = (0, import_react.useCallback)((instance) => {
		if (typeof ref === "function") {
			const refCallback = ref;
			const refCleanup = refCallback(instance);
			return () => {
				if (typeof refCleanup === "function") refCleanup();
				else refCallback(null);
			};
		} else if (ref) {
			ref.current = instance;
			return () => {
				ref.current = null;
			};
		}
	}, [ref]);
	return (0, import_react.useMemo)(() => ({
		get current() {
			return objRef.current;
		},
		set current(value) {
			objRef.current = value;
			if (cleanupRef.current) {
				cleanupRef.current();
				cleanupRef.current = void 0;
			}
			if (value != null) cleanupRef.current = refEffect(value);
		}
	}), [refEffect]);
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/useEffectEvent.mjs
var $8ae05eaa5c114e9c$var$_React_useInsertionEffect;
var $8ae05eaa5c114e9c$var$useEarlyEffect = ($8ae05eaa5c114e9c$var$_React_useInsertionEffect = import_react.useInsertionEffect) !== null && $8ae05eaa5c114e9c$var$_React_useInsertionEffect !== void 0 ? $8ae05eaa5c114e9c$var$_React_useInsertionEffect : $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c;
function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {
	const ref = (0, import_react.useRef)(null);
	$8ae05eaa5c114e9c$var$useEarlyEffect(() => {
		ref.current = fn;
	}, [fn]);
	return (0, import_react.useCallback)((...args) => {
		const f = ref.current;
		return f === null || f === void 0 ? void 0 : f(...args);
	}, []);
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/useUpdateLayoutEffect.mjs
function $ca9b37712f007381$export$72ef708ab07251f1(effect, dependencies) {
	const isInitialMount = (0, import_react.useRef)(true);
	const lastDeps = (0, import_react.useRef)(null);
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		isInitialMount.current = true;
		return () => {
			isInitialMount.current = false;
		};
	}, []);
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		if (isInitialMount.current) isInitialMount.current = false;
		else if (!lastDeps.current || dependencies.some((dep, i) => !Object.is(dep, lastDeps[i]))) effect();
		lastDeps.current = dependencies;
	}, dependencies);
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/useResizeObserver.mjs
function $9daab02d461809db$var$hasResizeObserver() {
	return typeof window.ResizeObserver !== "undefined";
}
function $9daab02d461809db$export$683480f191c0e3ea(options) {
	const { ref, box, onResize } = options;
	let onResizeEvent = $8ae05eaa5c114e9c$export$7f54fc3180508a52(onResize);
	(0, import_react.useEffect)(() => {
		let element = ref === null || ref === void 0 ? void 0 : ref.current;
		if (!element) return;
		if (!$9daab02d461809db$var$hasResizeObserver()) {
			window.addEventListener("resize", onResizeEvent, false);
			return () => {
				window.removeEventListener("resize", onResizeEvent, false);
			};
		} else {
			const resizeObserverInstance = new window.ResizeObserver((entries) => {
				if (!entries.length) return;
				onResizeEvent();
			});
			resizeObserverInstance.observe(element, { box });
			return () => {
				if (element) resizeObserverInstance.unobserve(element);
			};
		}
	}, [ref, box]);
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/useSyncRef.mjs
function $e7801be82b4b2a53$export$4debdb1a3f0fa79e(context, ref) {
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		if (context && context.ref && ref) {
			context.ref.current = ref.current;
			return () => {
				if (context.ref) context.ref.current = null;
			};
		}
	});
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/isScrollable.mjs
function $cc38e7bd3fc7b213$export$2bb74740c4e19def(node, checkForOverflow) {
	if (!node) return false;
	let style = window.getComputedStyle(node);
	let root = document.scrollingElement || document.documentElement;
	let isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);
	if (node === root && style.overflow !== "hidden") isScrollable = true;
	if (isScrollable && checkForOverflow) isScrollable = node.scrollHeight !== node.clientHeight || node.scrollWidth !== node.clientWidth;
	return isScrollable;
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/getScrollParent.mjs
function $62d8ded9296f3872$export$cfa2225e87938781(node, checkForOverflow) {
	let scrollableNode = node;
	if ($cc38e7bd3fc7b213$export$2bb74740c4e19def(scrollableNode, checkForOverflow)) scrollableNode = scrollableNode.parentElement;
	while (scrollableNode && !$cc38e7bd3fc7b213$export$2bb74740c4e19def(scrollableNode, checkForOverflow)) scrollableNode = scrollableNode.parentElement;
	return scrollableNode || document.scrollingElement || document.documentElement;
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/getScrollParents.mjs
function $a40c673dc9f6d9c7$export$94ed1c92c7beeb22(node, checkForOverflow) {
	let parentElements = [];
	let root = document.scrollingElement || document.documentElement;
	do {
		if ($cc38e7bd3fc7b213$export$2bb74740c4e19def(node, checkForOverflow)) parentElements.push(node);
		node = node.parentElement;
	} while (node && node !== root);
	return parentElements;
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/keyboard.mjs
function $21f1aa98acb08317$export$16792effe837dba3(e) {
	if ($c87311424ea30a05$export$9ac100e40613ea10()) return e.metaKey;
	return e.ctrlKey;
}
var $21f1aa98acb08317$var$nonTextInputTypes = new Set([
	"checkbox",
	"radio",
	"range",
	"color",
	"file",
	"image",
	"button",
	"submit",
	"reset"
]);
function $21f1aa98acb08317$export$c57958e35f31ed73(target) {
	return target instanceof HTMLInputElement && !$21f1aa98acb08317$var$nonTextInputTypes.has(target.type) || target instanceof HTMLTextAreaElement || target instanceof HTMLElement && target.isContentEditable;
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/useViewportSize.mjs
var $5df64b3807dc15ee$var$visualViewport = typeof document !== "undefined" && window.visualViewport;
function $5df64b3807dc15ee$export$d699905dd57c73ca() {
	let isSSR = $b5e257d569688ac6$export$535bd6ca7f90a273();
	let [size, setSize] = (0, import_react.useState)(() => isSSR ? {
		width: 0,
		height: 0
	} : $5df64b3807dc15ee$var$getViewportSize());
	(0, import_react.useEffect)(() => {
		let updateSize = (newSize) => {
			setSize((size) => {
				if (newSize.width === size.width && newSize.height === size.height) return size;
				return newSize;
			});
		};
		let onResize = () => {
			if ($5df64b3807dc15ee$var$visualViewport && $5df64b3807dc15ee$var$visualViewport.scale > 1) return;
			updateSize($5df64b3807dc15ee$var$getViewportSize());
		};
		let frame;
		let onBlur = (e) => {
			if ($5df64b3807dc15ee$var$visualViewport && $5df64b3807dc15ee$var$visualViewport.scale > 1) return;
			if ($21f1aa98acb08317$export$c57958e35f31ed73($d4ee10de306f2510$export$e58f029f0fbfdb29(e))) frame = requestAnimationFrame(() => {
				let activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576();
				if (!activeElement || !$21f1aa98acb08317$export$c57958e35f31ed73(activeElement)) updateSize({
					width: document.documentElement.clientWidth,
					height: document.documentElement.clientHeight
				});
			});
		};
		updateSize($5df64b3807dc15ee$var$getViewportSize());
		if ($c87311424ea30a05$export$fedb369cb70207f1()) window.addEventListener("blur", onBlur, true);
		if (!$5df64b3807dc15ee$var$visualViewport) window.addEventListener("resize", onResize);
		else $5df64b3807dc15ee$var$visualViewport.addEventListener("resize", onResize);
		return () => {
			cancelAnimationFrame(frame);
			if ($c87311424ea30a05$export$fedb369cb70207f1()) window.removeEventListener("blur", onBlur, true);
			if (!$5df64b3807dc15ee$var$visualViewport) window.removeEventListener("resize", onResize);
			else $5df64b3807dc15ee$var$visualViewport.removeEventListener("resize", onResize);
		};
	}, []);
	return size;
}
function $5df64b3807dc15ee$var$getViewportSize() {
	return {
		width: $5df64b3807dc15ee$var$visualViewport ? $5df64b3807dc15ee$var$visualViewport.width * $5df64b3807dc15ee$var$visualViewport.scale : document.documentElement.clientWidth,
		height: $5df64b3807dc15ee$var$visualViewport ? $5df64b3807dc15ee$var$visualViewport.height * $5df64b3807dc15ee$var$visualViewport.scale : document.documentElement.clientHeight
	};
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/useDescription.mjs
var $ef06256079686ba0$var$descriptionId = 0;
var $ef06256079686ba0$var$descriptionNodes = /* @__PURE__ */ new Map();
function $ef06256079686ba0$export$f8aeda7b10753fa1(description) {
	let [id, setId] = (0, import_react.useState)();
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		if (!description) return;
		let desc = $ef06256079686ba0$var$descriptionNodes.get(description);
		if (!desc) {
			let id = `react-aria-description-${$ef06256079686ba0$var$descriptionId++}`;
			setId(id);
			let node = document.createElement("div");
			node.id = id;
			node.style.display = "none";
			node.textContent = description;
			document.body.appendChild(node);
			desc = {
				refCount: 0,
				element: node
			};
			$ef06256079686ba0$var$descriptionNodes.set(description, desc);
		} else setId(desc.element.id);
		desc.refCount++;
		return () => {
			if (desc && --desc.refCount === 0) {
				desc.element.remove();
				$ef06256079686ba0$var$descriptionNodes.delete(description);
			}
		};
	}, [description]);
	return { "aria-describedby": description ? id : void 0 };
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/useEvent.mjs
function $e9faafb641e167db$export$90fc3a17d93f704c(ref, event, handler, options) {
	let handleEvent = $8ae05eaa5c114e9c$export$7f54fc3180508a52(handler);
	let isDisabled = handler == null;
	(0, import_react.useEffect)(() => {
		if (isDisabled || !ref.current) return;
		let element = ref.current;
		element.addEventListener(event, handleEvent, options);
		return () => {
			element.removeEventListener(event, handleEvent, options);
		};
	}, [
		ref,
		event,
		options,
		isDisabled
	]);
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/scrollIntoView.mjs
function $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollView, element, opts = {}) {
	let { block = "nearest", inline = "nearest" } = opts;
	if (scrollView === element) return;
	let y = scrollView.scrollTop;
	let x = scrollView.scrollLeft;
	let target = element.getBoundingClientRect();
	let view = scrollView.getBoundingClientRect();
	let itemStyle = window.getComputedStyle(element);
	let viewStyle = window.getComputedStyle(scrollView);
	let root = document.scrollingElement || document.documentElement;
	let viewTop = scrollView === root ? 0 : view.top;
	let viewBottom = scrollView === root ? scrollView.clientHeight : view.bottom;
	let viewLeft = scrollView === root ? 0 : view.left;
	let viewRight = scrollView === root ? scrollView.clientWidth : view.right;
	let scrollMarginTop = parseInt(itemStyle.scrollMarginTop, 10) || 0;
	let scrollMarginBottom = parseInt(itemStyle.scrollMarginBottom, 10) || 0;
	let scrollMarginLeft = parseInt(itemStyle.scrollMarginLeft, 10) || 0;
	let scrollMarginRight = parseInt(itemStyle.scrollMarginRight, 10) || 0;
	let scrollPaddingTop = parseInt(viewStyle.scrollPaddingTop, 10) || 0;
	let scrollPaddingBottom = parseInt(viewStyle.scrollPaddingBottom, 10) || 0;
	let scrollPaddingLeft = parseInt(viewStyle.scrollPaddingLeft, 10) || 0;
	let scrollPaddingRight = parseInt(viewStyle.scrollPaddingRight, 10) || 0;
	let borderTopWidth = parseInt(viewStyle.borderTopWidth, 10) || 0;
	let borderBottomWidth = parseInt(viewStyle.borderBottomWidth, 10) || 0;
	let borderLeftWidth = parseInt(viewStyle.borderLeftWidth, 10) || 0;
	let borderRightWidth = parseInt(viewStyle.borderRightWidth, 10) || 0;
	let scrollAreaTop = target.top - scrollMarginTop;
	let scrollAreaBottom = target.bottom + scrollMarginBottom;
	let scrollAreaLeft = target.left - scrollMarginLeft;
	let scrollAreaRight = target.right + scrollMarginRight;
	let scrollBarOffsetX = scrollView === root ? 0 : borderLeftWidth + borderRightWidth;
	let scrollBarOffsetY = scrollView === root ? 0 : borderTopWidth + borderBottomWidth;
	let scrollBarWidth = scrollView.offsetWidth - scrollView.clientWidth - scrollBarOffsetX;
	let scrollBarHeight = scrollView.offsetHeight - scrollView.clientHeight - scrollBarOffsetY;
	let scrollPortTop = viewTop + borderTopWidth + scrollPaddingTop;
	let scrollPortBottom = viewBottom - borderBottomWidth - scrollPaddingBottom - scrollBarHeight;
	let scrollPortLeft = viewLeft + borderLeftWidth + scrollPaddingLeft;
	let scrollPortRight = viewRight - borderRightWidth - scrollPaddingRight;
	if (viewStyle.direction === "rtl" && !$c87311424ea30a05$export$fedb369cb70207f1()) scrollPortLeft += scrollBarWidth;
	else scrollPortRight -= scrollBarWidth;
	let shouldScrollBlock = scrollAreaTop < scrollPortTop || scrollAreaBottom > scrollPortBottom;
	let shouldScrollInline = scrollAreaLeft < scrollPortLeft || scrollAreaRight > scrollPortRight;
	if (shouldScrollBlock && block === "start") y += scrollAreaTop - scrollPortTop;
	else if (shouldScrollBlock && block === "center") y += (scrollAreaTop + scrollAreaBottom) / 2 - (scrollPortTop + scrollPortBottom) / 2;
	else if (shouldScrollBlock && block === "end") y += scrollAreaBottom - scrollPortBottom;
	else if (shouldScrollBlock && block === "nearest") {
		let start = scrollAreaTop - scrollPortTop;
		let end = scrollAreaBottom - scrollPortBottom;
		y += Math.abs(start) <= Math.abs(end) ? start : end;
	}
	if (shouldScrollInline && inline === "start") x += scrollAreaLeft - scrollPortLeft;
	else if (shouldScrollInline && inline === "center") x += (scrollAreaLeft + scrollAreaRight) / 2 - (scrollPortLeft + scrollPortRight) / 2;
	else if (shouldScrollInline && inline === "end") x += scrollAreaRight - scrollPortRight;
	else if (shouldScrollInline && inline === "nearest") {
		let start = scrollAreaLeft - scrollPortLeft;
		let end = scrollAreaRight - scrollPortRight;
		x += Math.abs(start) <= Math.abs(end) ? start : end;
	}
	scrollView.scrollTo({
		left: x,
		top: y
	});
}
function $2f04cbc44ee30ce0$export$c826860796309d1b(targetElement, opts = {}) {
	let { containingElement } = opts;
	if (targetElement && targetElement.isConnected) {
		let root = document.scrollingElement || document.documentElement;
		if (!(window.getComputedStyle(root).overflow === "hidden") && !$c87311424ea30a05$export$6446a186d09e379e()) {
			var _targetElement_scrollIntoView;
			let { left: originalLeft, top: originalTop } = targetElement.getBoundingClientRect();
			targetElement === null || targetElement === void 0 || (_targetElement_scrollIntoView = targetElement.scrollIntoView) == null || _targetElement_scrollIntoView.call(targetElement, { block: "nearest" });
			let { left: newLeft, top: newTop } = targetElement.getBoundingClientRect();
			if (Math.abs(originalLeft - newLeft) > 1 || Math.abs(originalTop - newTop) > 1) {
				var _containingElement_scrollIntoView, _targetElement_scrollIntoView1;
				containingElement === null || containingElement === void 0 || (_containingElement_scrollIntoView = containingElement.scrollIntoView) == null || _containingElement_scrollIntoView.call(containingElement, {
					block: "center",
					inline: "center"
				});
				(_targetElement_scrollIntoView1 = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView1 === void 0 || _targetElement_scrollIntoView1.call(targetElement, { block: "nearest" });
			}
		} else {
			let { left: originalLeft, top: originalTop } = targetElement.getBoundingClientRect();
			let scrollParents = $a40c673dc9f6d9c7$export$94ed1c92c7beeb22(targetElement, true);
			for (let scrollParent of scrollParents) $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollParent, targetElement);
			let { left: newLeft, top: newTop } = targetElement.getBoundingClientRect();
			if (Math.abs(originalLeft - newLeft) > 1 || Math.abs(originalTop - newTop) > 1) {
				scrollParents = containingElement ? $a40c673dc9f6d9c7$export$94ed1c92c7beeb22(containingElement, true) : [];
				for (let scrollParent of scrollParents) $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollParent, containingElement, {
					block: "center",
					inline: "center"
				});
			}
		}
	}
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/isVirtualEvent.mjs
function $6a7db85432448f7f$export$60278871457622de(event) {
	if (event.pointerType === "" && event.isTrusted) return true;
	if ($c87311424ea30a05$export$a11b0059900ceec8() && event.pointerType) return event.type === "click" && event.buttons === 1;
	return event.detail === 0 && !event.pointerType;
}
function $6a7db85432448f7f$export$29bf1b5f2c56cf63(event) {
	return !$c87311424ea30a05$export$a11b0059900ceec8() && event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "mouse";
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/useLoadMoreSentinel.mjs
function $a5fa973c1850dd36$export$ccaea96c28e8b9e7(props, ref) {
	let { collection, onLoadMore, scrollOffset = 1 } = props;
	let sentinelObserver = (0, import_react.useRef)(null);
	let triggerLoadMore = $8ae05eaa5c114e9c$export$7f54fc3180508a52((entries) => {
		for (let entry of entries) if (entry.isIntersecting && onLoadMore) onLoadMore();
	});
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		if (ref.current) {
			sentinelObserver.current = new IntersectionObserver(triggerLoadMore, {
				root: $62d8ded9296f3872$export$cfa2225e87938781(ref === null || ref === void 0 ? void 0 : ref.current),
				rootMargin: `0px ${100 * scrollOffset}% ${100 * scrollOffset}% ${100 * scrollOffset}%`
			});
			sentinelObserver.current.observe(ref.current);
		}
		return () => {
			if (sentinelObserver.current) sentinelObserver.current.disconnect();
		};
	}, [
		collection,
		ref,
		scrollOffset
	]);
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/inertValue.mjs
function $cdc5a6778b766db2$export$a9d04c5684123369(value) {
	const pieces = import_react.version.split(".");
	if (parseInt(pieces[0], 10) >= 19) return value;
	return value ? "true" : void 0;
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/constants.mjs
var $5671b20cf9b562b2$export$447a38995de2c711 = "react-aria-clear-focus";
var $5671b20cf9b562b2$export$831c820ad60f9d12 = "react-aria-focus";
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/animation.mjs
function $d3f049242431219c$export$6d3443f2c48bfc20(ref, isReady = true) {
	let [isEntering, setEntering] = (0, import_react.useState)(true);
	let isAnimationReady = isEntering && isReady;
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		if (isAnimationReady && ref.current && "getAnimations" in ref.current) {
			for (let animation of ref.current.getAnimations()) if (animation instanceof CSSTransition) animation.cancel();
		}
	}, [ref, isAnimationReady]);
	$d3f049242431219c$var$useAnimation(ref, isAnimationReady, (0, import_react.useCallback)(() => setEntering(false), []));
	return isAnimationReady;
}
function $d3f049242431219c$export$45fda7c47f93fd48(ref, isOpen) {
	let [exitState, setExitState] = (0, import_react.useState)(isOpen ? "open" : "closed");
	switch (exitState) {
		case "open":
			if (!isOpen) setExitState("exiting");
			break;
		case "closed":
		case "exiting":
			if (isOpen) setExitState("open");
			break;
	}
	let isExiting = exitState === "exiting";
	$d3f049242431219c$var$useAnimation(ref, isExiting, (0, import_react.useCallback)(() => {
		setExitState((state) => state === "exiting" ? "closed" : state);
	}, []));
	return isExiting;
}
function $d3f049242431219c$var$useAnimation(ref, isActive, onEnd) {
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		if (isActive && ref.current) {
			if (!("getAnimations" in ref.current)) {
				onEnd();
				return;
			}
			let animations = ref.current.getAnimations();
			if (animations.length === 0) {
				onEnd();
				return;
			}
			let canceled = false;
			Promise.all(animations.map((a) => a.finished)).then(() => {
				if (!canceled) (0, import_react_dom.flushSync)(() => {
					onEnd();
				});
			}).catch(() => {});
			return () => {
				canceled = true;
			};
		}
	}, [
		ref,
		isActive,
		onEnd
	]);
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/isElementVisible.mjs
var $7d2416ea0959daaa$var$supportsCheckVisibility = typeof Element !== "undefined" && "checkVisibility" in Element.prototype;
function $7d2416ea0959daaa$var$isStyleVisible(element) {
	const windowObject = $431fbd86ca7dc216$export$f21a1ffae260145a(element);
	if (!(element instanceof windowObject.HTMLElement) && !(element instanceof windowObject.SVGElement)) return false;
	let { display, visibility } = element.style;
	let isVisible = display !== "none" && visibility !== "hidden" && visibility !== "collapse";
	if (isVisible) {
		const { getComputedStyle } = element.ownerDocument.defaultView;
		let { display: computedDisplay, visibility: computedVisibility } = getComputedStyle(element);
		isVisible = computedDisplay !== "none" && computedVisibility !== "hidden" && computedVisibility !== "collapse";
	}
	return isVisible;
}
function $7d2416ea0959daaa$var$isAttributeVisible(element, childElement) {
	return !element.hasAttribute("hidden") && !element.hasAttribute("data-react-aria-prevent-focus") && (element.nodeName === "DETAILS" && childElement && childElement.nodeName !== "SUMMARY" ? element.hasAttribute("open") : true);
}
function $7d2416ea0959daaa$export$e989c0fffaa6b27a(element, childElement) {
	if ($7d2416ea0959daaa$var$supportsCheckVisibility) return element.checkVisibility({ visibilityProperty: true }) && !element.closest("[data-react-aria-prevent-focus]");
	return element.nodeName !== "#comment" && $7d2416ea0959daaa$var$isStyleVisible(element) && $7d2416ea0959daaa$var$isAttributeVisible(element, childElement) && (!element.parentElement || $7d2416ea0959daaa$export$e989c0fffaa6b27a(element.parentElement, element));
}
//#endregion
//#region ../../node_modules/@react-aria/utils/dist/isFocusable.mjs
var $b4b717babfbb907b$var$focusableElements = [
	"input:not([disabled]):not([type=hidden])",
	"select:not([disabled])",
	"textarea:not([disabled])",
	"button:not([disabled])",
	"a[href]",
	"area[href]",
	"summary",
	"iframe",
	"object",
	"embed",
	"audio[controls]",
	"video[controls]",
	"[contenteditable]:not([contenteditable^=\"false\"])",
	"permission"
];
var $b4b717babfbb907b$var$FOCUSABLE_ELEMENT_SELECTOR = $b4b717babfbb907b$var$focusableElements.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
$b4b717babfbb907b$var$focusableElements.push("[tabindex]:not([tabindex=\"-1\"]):not([disabled])");
var $b4b717babfbb907b$var$TABBABLE_ELEMENT_SELECTOR = $b4b717babfbb907b$var$focusableElements.join(":not([hidden]):not([tabindex=\"-1\"]),");
function $b4b717babfbb907b$export$4c063cf1350e6fed(element) {
	return element.matches($b4b717babfbb907b$var$FOCUSABLE_ELEMENT_SELECTOR) && $7d2416ea0959daaa$export$e989c0fffaa6b27a(element) && !$b4b717babfbb907b$var$isInert(element);
}
function $b4b717babfbb907b$export$bebd5a1431fec25d(element) {
	return element.matches($b4b717babfbb907b$var$TABBABLE_ELEMENT_SELECTOR) && $7d2416ea0959daaa$export$e989c0fffaa6b27a(element) && !$b4b717babfbb907b$var$isInert(element);
}
function $b4b717babfbb907b$var$isInert(element) {
	let node = element;
	while (node != null) {
		if (node instanceof node.ownerDocument.defaultView.HTMLElement && node.inert) return true;
		node = node.parentElement;
	}
	return false;
}
//#endregion
//#region ../../node_modules/@react-stately/utils/dist/useControlledState.mjs
var $458b0a5536c1a7cf$var$_React_useInsertionEffect;
var $458b0a5536c1a7cf$var$useEarlyEffect = typeof document !== "undefined" ? ($458b0a5536c1a7cf$var$_React_useInsertionEffect = import_react.useInsertionEffect) !== null && $458b0a5536c1a7cf$var$_React_useInsertionEffect !== void 0 ? $458b0a5536c1a7cf$var$_React_useInsertionEffect : import_react.useLayoutEffect : () => {};
function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange) {
	let [stateValue, setStateValue] = (0, import_react.useState)(value || defaultValue);
	let valueRef = (0, import_react.useRef)(stateValue);
	let isControlledRef = (0, import_react.useRef)(value !== void 0);
	let isControlled = value !== void 0;
	(0, import_react.useEffect)(() => {
		isControlledRef.current;
		isControlledRef.current = isControlled;
	}, [isControlled]);
	let currentValue = isControlled ? value : stateValue;
	$458b0a5536c1a7cf$var$useEarlyEffect(() => {
		valueRef.current = currentValue;
	});
	let [, forceUpdate] = (0, import_react.useReducer)(() => ({}), {});
	return [currentValue, (0, import_react.useCallback)((value, ...args) => {
		let newValue = typeof value === "function" ? value(valueRef.current) : value;
		if (!Object.is(valueRef.current, newValue)) {
			valueRef.current = newValue;
			setStateValue(newValue);
			forceUpdate();
			onChange === null || onChange === void 0 || onChange(newValue, ...args);
		}
	}, [onChange])];
}
//#endregion
//#region ../../node_modules/@react-stately/utils/dist/number.mjs
/**
* Takes a value and forces it to the closest min/max if it's outside. Also forces it to the closest valid step.
*/ function $9446cca9a3875146$export$7d15b64cf5a3a4c4(value, min = -Infinity, max = Infinity) {
	return Math.min(Math.max(value, min), max);
}
function $9446cca9a3875146$export$e1a7b8e69ef6c52f(value, step) {
	let roundedValue = value;
	let precision = 0;
	let stepString = step.toString();
	let eIndex = stepString.toLowerCase().indexOf("e-");
	if (eIndex > 0) precision = Math.abs(Math.floor(Math.log10(Math.abs(step)))) + eIndex;
	else {
		let pointIndex = stepString.indexOf(".");
		if (pointIndex >= 0) precision = stepString.length - pointIndex;
	}
	if (precision > 0) {
		let pow = Math.pow(10, precision);
		roundedValue = Math.round(roundedValue * pow) / pow;
	}
	return roundedValue;
}
function $9446cca9a3875146$export$cb6e0bb50bc19463(value, min, max, step) {
	min = Number(min);
	max = Number(max);
	let remainder = (value - (isNaN(min) ? 0 : min)) % step;
	let snappedValue = $9446cca9a3875146$export$e1a7b8e69ef6c52f(Math.abs(remainder) * 2 >= step ? value + Math.sign(remainder) * (step - Math.abs(remainder)) : value - remainder, step);
	if (!isNaN(min)) {
		if (snappedValue < min) snappedValue = min;
		else if (!isNaN(max) && snappedValue > max) snappedValue = min + Math.floor($9446cca9a3875146$export$e1a7b8e69ef6c52f((max - min) / step, step)) * step;
	} else if (!isNaN(max) && snappedValue > max) snappedValue = Math.floor($9446cca9a3875146$export$e1a7b8e69ef6c52f(max / step, step)) * step;
	snappedValue = $9446cca9a3875146$export$e1a7b8e69ef6c52f(snappedValue, step);
	return snappedValue;
}
function $9446cca9a3875146$export$b6268554fba451f(value, digits, base = 10) {
	const pow = Math.pow(base, digits);
	return Math.round(value * pow) / pow;
}
//#endregion
//#region ../../node_modules/react-aria-components/dist/utils.mjs
var $64fa3d84918910a7$export$c62b8e45d58ddad9 = Symbol("default");
function $64fa3d84918910a7$export$2881499e37b75b9a({ values, children }) {
	for (let [Context, value] of values) children = /* @__PURE__ */ import_react.createElement(Context.Provider, { value }, children);
	return children;
}
function $64fa3d84918910a7$export$4d86445c2cf5e3(props) {
	let { className, style, children, defaultClassName, defaultChildren, defaultStyle, values, render } = props;
	return (0, import_react.useMemo)(() => {
		let computedClassName;
		let computedStyle;
		let computedChildren;
		if (typeof className === "function") computedClassName = className({
			...values,
			defaultClassName
		});
		else computedClassName = className;
		if (typeof style === "function") computedStyle = style({
			...values,
			defaultStyle: defaultStyle || {}
		});
		else computedStyle = style;
		if (typeof children === "function") computedChildren = children({
			...values,
			defaultChildren
		});
		else if (children == null) computedChildren = defaultChildren;
		else computedChildren = children;
		return {
			className: computedClassName !== null && computedClassName !== void 0 ? computedClassName : defaultClassName,
			style: computedStyle || defaultStyle ? {
				...defaultStyle,
				...computedStyle
			} : void 0,
			children: computedChildren !== null && computedChildren !== void 0 ? computedChildren : defaultChildren,
			"data-rac": "",
			render: render ? (props) => render(props, values) : void 0
		};
	}, [
		className,
		style,
		children,
		defaultClassName,
		defaultChildren,
		defaultStyle,
		values,
		render
	]);
}
function $64fa3d84918910a7$export$c245e6201fed2f75(value, wrap) {
	return (renderProps) => wrap(typeof value === "function" ? value(renderProps) : value, renderProps);
}
function $64fa3d84918910a7$export$fabf2dc03a41866e(context, slot) {
	let ctx = (0, import_react.useContext)(context);
	if (slot === null) return null;
	if (ctx && typeof ctx === "object" && "slots" in ctx && ctx.slots) {
		let slotKey = slot || $64fa3d84918910a7$export$c62b8e45d58ddad9;
		if (!ctx.slots[slotKey]) {
			let availableSlots = new Intl.ListFormat().format(Object.keys(ctx.slots).map((p) => `"${p}"`));
			let errorMessage = slot ? `Invalid slot "${slot}".` : "A slot prop is required.";
			throw new Error(`${errorMessage} Valid slot names are ${availableSlots}.`);
		}
		return ctx.slots[slotKey];
	}
	return ctx;
}
function $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, context) {
	let { ref: contextRef, ...contextProps } = $64fa3d84918910a7$export$fabf2dc03a41866e(context, props.slot) || {};
	let mergedRef = $df56164dff5785e2$export$4338b53315abf666((0, import_react.useMemo)(() => $5dc95899b306f630$export$c9058316764c140e(ref, contextRef), [ref, contextRef]));
	let mergedProps = $3ef42575df84b30b$export$9d1611c77c2fe928(contextProps, props);
	if ("style" in contextProps && contextProps.style && "style" in props && props.style) if (typeof contextProps.style === "function" || typeof props.style === "function") mergedProps.style = (renderProps) => {
		let contextStyle = typeof contextProps.style === "function" ? contextProps.style(renderProps) : contextProps.style;
		let defaultStyle = {
			...renderProps.defaultStyle,
			...contextStyle
		};
		let style = typeof props.style === "function" ? props.style({
			...renderProps,
			defaultStyle
		}) : props.style;
		return {
			...defaultStyle,
			...style
		};
	};
	else mergedProps.style = {
		...contextProps.style,
		...props.style
	};
	return [mergedProps, mergedRef];
}
function $64fa3d84918910a7$export$9d4c57ee4c6ffdd8(initialState = true) {
	let [hasSlot, setHasSlot] = (0, import_react.useState)(initialState);
	let hasRun = (0, import_react.useRef)(false);
	let ref = (0, import_react.useCallback)((el) => {
		hasRun.current = true;
		setHasSlot(!!el);
	}, []);
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		if (!hasRun.current) setHasSlot(false);
	}, []);
	return [ref, hasSlot];
}
function $64fa3d84918910a7$export$ef03459518577ad4(props) {
	const prefix = /^(data-.*)$/;
	let filteredProps = {};
	for (const prop in props) if (!prefix.test(prop)) filteredProps[prop] = props[prop];
	return filteredProps;
}
function $64fa3d84918910a7$var$DOMElement(ElementType, props, forwardedRef) {
	let { render, ...otherProps } = props;
	let elementRef = (0, import_react.useRef)(null);
	let ref = (0, import_react.useMemo)(() => $5dc95899b306f630$export$c9058316764c140e(forwardedRef, elementRef), [forwardedRef, elementRef]);
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {}, [ElementType, render]);
	let domProps = {
		...otherProps,
		ref
	};
	if (render) return render(domProps, void 0);
	return /* @__PURE__ */ import_react.createElement(ElementType, domProps);
}
var $64fa3d84918910a7$var$domComponentCache = {};
var $64fa3d84918910a7$export$df3a06d6289f983e = new Proxy({}, { get(target, elementType) {
	if (typeof elementType !== "string") return void 0;
	let res = $64fa3d84918910a7$var$domComponentCache[elementType];
	if (!res) {
		res = /* @__PURE__ */ (0, import_react.forwardRef)($64fa3d84918910a7$var$DOMElement.bind(null, elementType));
		$64fa3d84918910a7$var$domComponentCache[elementType] = res;
	}
	return res;
} });
//#endregion
//#region ../../node_modules/@react-aria/live-announcer/dist/LiveAnnouncer.mjs
var $319e236875307eab$var$LIVEREGION_TIMEOUT_DELAY = 7e3;
var $319e236875307eab$var$liveAnnouncer = null;
function $319e236875307eab$export$a9b970dcc4ae71a9(message, assertiveness = "assertive", timeout = $319e236875307eab$var$LIVEREGION_TIMEOUT_DELAY) {
	if (!$319e236875307eab$var$liveAnnouncer) {
		$319e236875307eab$var$liveAnnouncer = new $319e236875307eab$var$LiveAnnouncer();
		if (!(typeof IS_REACT_ACT_ENVIRONMENT === "boolean" ? IS_REACT_ACT_ENVIRONMENT : typeof jest !== "undefined")) setTimeout(() => {
			if ($319e236875307eab$var$liveAnnouncer === null || $319e236875307eab$var$liveAnnouncer === void 0 ? void 0 : $319e236875307eab$var$liveAnnouncer.isAttached()) $319e236875307eab$var$liveAnnouncer === null || $319e236875307eab$var$liveAnnouncer === void 0 || $319e236875307eab$var$liveAnnouncer.announce(message, assertiveness, timeout);
		}, 100);
		else $319e236875307eab$var$liveAnnouncer.announce(message, assertiveness, timeout);
	} else $319e236875307eab$var$liveAnnouncer.announce(message, assertiveness, timeout);
}
function $319e236875307eab$export$d10ae4f68404609a(assertiveness) {
	if ($319e236875307eab$var$liveAnnouncer) $319e236875307eab$var$liveAnnouncer.clear(assertiveness);
}
var $319e236875307eab$var$LiveAnnouncer = class {
	isAttached() {
		var _this_node;
		return (_this_node = this.node) === null || _this_node === void 0 ? void 0 : _this_node.isConnected;
	}
	createLog(ariaLive) {
		let node = document.createElement("div");
		node.setAttribute("role", "log");
		node.setAttribute("aria-live", ariaLive);
		node.setAttribute("aria-relevant", "additions");
		return node;
	}
	destroy() {
		if (!this.node) return;
		document.body.removeChild(this.node);
		this.node = null;
	}
	announce(message, assertiveness = "assertive", timeout = $319e236875307eab$var$LIVEREGION_TIMEOUT_DELAY) {
		var _this_assertiveLog, _this_politeLog;
		if (!this.node) return;
		let node = document.createElement("div");
		if (typeof message === "object") {
			node.setAttribute("role", "img");
			node.setAttribute("aria-labelledby", message["aria-labelledby"]);
		} else node.textContent = message;
		if (assertiveness === "assertive") (_this_assertiveLog = this.assertiveLog) === null || _this_assertiveLog === void 0 || _this_assertiveLog.appendChild(node);
		else (_this_politeLog = this.politeLog) === null || _this_politeLog === void 0 || _this_politeLog.appendChild(node);
		if (message !== "") setTimeout(() => {
			node.remove();
		}, timeout);
	}
	clear(assertiveness) {
		if (!this.node) return;
		if ((!assertiveness || assertiveness === "assertive") && this.assertiveLog) this.assertiveLog.innerHTML = "";
		if ((!assertiveness || assertiveness === "polite") && this.politeLog) this.politeLog.innerHTML = "";
	}
	constructor() {
		this.node = null;
		this.assertiveLog = null;
		this.politeLog = null;
		if (typeof document !== "undefined") {
			this.node = document.createElement("div");
			this.node.dataset.liveAnnouncer = "true";
			Object.assign(this.node.style, {
				border: 0,
				clip: "rect(0 0 0 0)",
				clipPath: "inset(50%)",
				height: "1px",
				margin: "-1px",
				overflow: "hidden",
				padding: 0,
				position: "absolute",
				width: "1px",
				whiteSpace: "nowrap"
			});
			this.assertiveLog = this.createLog("assertive");
			this.node.appendChild(this.assertiveLog);
			this.politeLog = this.createLog("polite");
			this.node.appendChild(this.politeLog);
			document.body.prepend(this.node);
		}
	}
};
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/calculatePosition.mjs
var $edcf132a9284368a$var$AXIS = {
	top: "top",
	bottom: "top",
	left: "left",
	right: "left"
};
var $edcf132a9284368a$var$FLIPPED_DIRECTION = {
	top: "bottom",
	bottom: "top",
	left: "right",
	right: "left"
};
var $edcf132a9284368a$var$CROSS_AXIS = {
	top: "left",
	left: "top"
};
var $edcf132a9284368a$var$AXIS_SIZE = {
	top: "height",
	left: "width"
};
var $edcf132a9284368a$var$TOTAL_SIZE = {
	width: "totalWidth",
	height: "totalHeight"
};
var $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE = {};
var $edcf132a9284368a$var$getVisualViewport = () => typeof document !== "undefined" ? window.visualViewport : null;
function $edcf132a9284368a$var$getContainerDimensions(containerNode, visualViewport) {
	let width = 0, height = 0, totalWidth = 0, totalHeight = 0, top = 0, left = 0;
	let scroll = {};
	var _visualViewport_scale;
	let isPinchZoomedIn = ((_visualViewport_scale = visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.scale) !== null && _visualViewport_scale !== void 0 ? _visualViewport_scale : 1) > 1;
	if (containerNode.tagName === "BODY" || containerNode.tagName === "HTML") {
		let documentElement = document.documentElement;
		totalWidth = documentElement.clientWidth;
		totalHeight = documentElement.clientHeight;
		var _visualViewport_width;
		width = (_visualViewport_width = visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.width) !== null && _visualViewport_width !== void 0 ? _visualViewport_width : totalWidth;
		var _visualViewport_height;
		height = (_visualViewport_height = visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.height) !== null && _visualViewport_height !== void 0 ? _visualViewport_height : totalHeight;
		scroll.top = documentElement.scrollTop || containerNode.scrollTop;
		scroll.left = documentElement.scrollLeft || containerNode.scrollLeft;
		if (visualViewport) {
			top = visualViewport.offsetTop;
			left = visualViewport.offsetLeft;
		}
	} else {
		({width: width, height: height, top: top, left: left} = $edcf132a9284368a$var$getOffset(containerNode, false));
		scroll.top = containerNode.scrollTop;
		scroll.left = containerNode.scrollLeft;
		totalWidth = width;
		totalHeight = height;
	}
	if ($c87311424ea30a05$export$78551043582a6a98() && (containerNode.tagName === "BODY" || containerNode.tagName === "HTML") && isPinchZoomedIn) {
		scroll.top = 0;
		scroll.left = 0;
		var _visualViewport_pageTop;
		top = (_visualViewport_pageTop = visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.pageTop) !== null && _visualViewport_pageTop !== void 0 ? _visualViewport_pageTop : 0;
		var _visualViewport_pageLeft;
		left = (_visualViewport_pageLeft = visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.pageLeft) !== null && _visualViewport_pageLeft !== void 0 ? _visualViewport_pageLeft : 0;
	}
	return {
		width,
		height,
		totalWidth,
		totalHeight,
		scroll,
		top,
		left
	};
}
function $edcf132a9284368a$var$getScroll(node) {
	return {
		top: node.scrollTop,
		left: node.scrollLeft,
		width: node.scrollWidth,
		height: node.scrollHeight
	};
}
function $edcf132a9284368a$var$getDelta(axis, offset, size, boundaryDimensions, containerDimensions, padding, containerOffsetWithBoundary) {
	var _containerDimensions_scroll_axis;
	let containerScroll = (_containerDimensions_scroll_axis = containerDimensions.scroll[axis]) !== null && _containerDimensions_scroll_axis !== void 0 ? _containerDimensions_scroll_axis : 0;
	let boundarySize = boundaryDimensions[$edcf132a9284368a$var$AXIS_SIZE[axis]];
	let boundaryStartEdge = containerOffsetWithBoundary[axis] + boundaryDimensions.scroll[$edcf132a9284368a$var$AXIS[axis]] + padding;
	let boundaryEndEdge = containerOffsetWithBoundary[axis] + boundaryDimensions.scroll[$edcf132a9284368a$var$AXIS[axis]] + boundarySize - padding;
	let startEdgeOffset = offset - containerScroll + boundaryDimensions.scroll[$edcf132a9284368a$var$AXIS[axis]] + containerOffsetWithBoundary[axis] - boundaryDimensions[$edcf132a9284368a$var$AXIS[axis]];
	let endEdgeOffset = offset - containerScroll + size + boundaryDimensions.scroll[$edcf132a9284368a$var$AXIS[axis]] + containerOffsetWithBoundary[axis] - boundaryDimensions[$edcf132a9284368a$var$AXIS[axis]];
	if (startEdgeOffset < boundaryStartEdge) return boundaryStartEdge - startEdgeOffset;
	else if (endEdgeOffset > boundaryEndEdge) return Math.max(boundaryEndEdge - endEdgeOffset, boundaryStartEdge - startEdgeOffset);
	else return 0;
}
function $edcf132a9284368a$var$getMargins(node) {
	let style = window.getComputedStyle(node);
	return {
		top: parseInt(style.marginTop, 10) || 0,
		bottom: parseInt(style.marginBottom, 10) || 0,
		left: parseInt(style.marginLeft, 10) || 0,
		right: parseInt(style.marginRight, 10) || 0
	};
}
function $edcf132a9284368a$var$parsePlacement(input) {
	if ($edcf132a9284368a$var$PARSED_PLACEMENT_CACHE[input]) return $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE[input];
	let [placement, crossPlacement] = input.split(" ");
	let axis = $edcf132a9284368a$var$AXIS[placement] || "right";
	let crossAxis = $edcf132a9284368a$var$CROSS_AXIS[axis];
	if (!$edcf132a9284368a$var$AXIS[crossPlacement]) crossPlacement = "center";
	let size = $edcf132a9284368a$var$AXIS_SIZE[axis];
	let crossSize = $edcf132a9284368a$var$AXIS_SIZE[crossAxis];
	$edcf132a9284368a$var$PARSED_PLACEMENT_CACHE[input] = {
		placement,
		crossPlacement,
		axis,
		crossAxis,
		size,
		crossSize
	};
	return $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE[input];
}
function $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset, containerDimensions) {
	let { placement, crossPlacement, axis, crossAxis, size, crossSize } = placementInfo;
	let position = {};
	var _childOffset_crossAxis;
	position[crossAxis] = (_childOffset_crossAxis = childOffset[crossAxis]) !== null && _childOffset_crossAxis !== void 0 ? _childOffset_crossAxis : 0;
	var _childOffset_crossSize, _overlaySize_crossSize, _childOffset_crossSize1, _overlaySize_crossSize1;
	if (crossPlacement === "center") position[crossAxis] += (((_childOffset_crossSize = childOffset[crossSize]) !== null && _childOffset_crossSize !== void 0 ? _childOffset_crossSize : 0) - ((_overlaySize_crossSize = overlaySize[crossSize]) !== null && _overlaySize_crossSize !== void 0 ? _overlaySize_crossSize : 0)) / 2;
	else if (crossPlacement !== crossAxis) position[crossAxis] += ((_childOffset_crossSize1 = childOffset[crossSize]) !== null && _childOffset_crossSize1 !== void 0 ? _childOffset_crossSize1 : 0) - ((_overlaySize_crossSize1 = overlaySize[crossSize]) !== null && _overlaySize_crossSize1 !== void 0 ? _overlaySize_crossSize1 : 0);
	position[crossAxis] += crossOffset;
	const minPosition = childOffset[crossAxis] - overlaySize[crossSize] + arrowSize + arrowBoundaryOffset;
	const maxPosition = childOffset[crossAxis] + childOffset[crossSize] - arrowSize - arrowBoundaryOffset;
	position[crossAxis] = $9446cca9a3875146$export$7d15b64cf5a3a4c4(position[crossAxis], minPosition, maxPosition);
	if (placement === axis) {
		let containerHeight = isContainerPositioned ? containerDimensions[size] : containerDimensions[$edcf132a9284368a$var$TOTAL_SIZE[size]];
		position[$edcf132a9284368a$var$FLIPPED_DIRECTION[axis]] = Math.floor(containerHeight - childOffset[axis] + offset);
	} else position[axis] = Math.floor(childOffset[axis] + childOffset[size] + offset);
	return position;
}
function $edcf132a9284368a$var$getMaxHeight(position, boundaryDimensions, containerOffsetWithBoundary, isContainerPositioned, margins, padding, overlayHeight, heightGrowthDirection, containerDimensions, isContainerDescendentOfBoundary, visualViewport) {
	var _position_bottom, _containerDimensions_scroll_top;
	let overlayTop = (position.top != null ? position.top : containerDimensions[$edcf132a9284368a$var$TOTAL_SIZE.height] - ((_position_bottom = position.bottom) !== null && _position_bottom !== void 0 ? _position_bottom : 0) - overlayHeight) - ((_containerDimensions_scroll_top = containerDimensions.scroll.top) !== null && _containerDimensions_scroll_top !== void 0 ? _containerDimensions_scroll_top : 0);
	let boundaryToContainerTransformOffset = isContainerDescendentOfBoundary ? containerOffsetWithBoundary.top : 0;
	var _visualViewport_offsetTop, _visualViewport_offsetTop1, _visualViewport_height;
	let boundingRect = {
		top: Math.max(boundaryDimensions.top + boundaryToContainerTransformOffset, ((_visualViewport_offsetTop = visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.offsetTop) !== null && _visualViewport_offsetTop !== void 0 ? _visualViewport_offsetTop : boundaryDimensions.top) + boundaryToContainerTransformOffset),
		bottom: Math.min(boundaryDimensions.top + boundaryDimensions.height + boundaryToContainerTransformOffset, ((_visualViewport_offsetTop1 = visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.offsetTop) !== null && _visualViewport_offsetTop1 !== void 0 ? _visualViewport_offsetTop1 : 0) + ((_visualViewport_height = visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.height) !== null && _visualViewport_height !== void 0 ? _visualViewport_height : 0))
	};
	var _margins_top, _margins_bottom, _margins_top1, _margins_bottom1;
	return heightGrowthDirection !== "top" ? Math.max(0, boundingRect.bottom - overlayTop - (((_margins_top = margins.top) !== null && _margins_top !== void 0 ? _margins_top : 0) + ((_margins_bottom = margins.bottom) !== null && _margins_bottom !== void 0 ? _margins_bottom : 0) + padding)) : Math.max(0, overlayTop + overlayHeight - boundingRect.top - (((_margins_top1 = margins.top) !== null && _margins_top1 !== void 0 ? _margins_top1 : 0) + ((_margins_bottom1 = margins.bottom) !== null && _margins_bottom1 !== void 0 ? _margins_bottom1 : 0) + padding));
}
function $edcf132a9284368a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding, placementInfo, containerDimensions, isContainerDescendentOfBoundary) {
	let { placement, axis, size } = placementInfo;
	var _containerDimensions_scroll_axis, _margins_axis;
	if (placement === axis) return Math.max(0, childOffset[axis] - ((_containerDimensions_scroll_axis = containerDimensions.scroll[axis]) !== null && _containerDimensions_scroll_axis !== void 0 ? _containerDimensions_scroll_axis : 0) - (boundaryDimensions[axis] + (isContainerDescendentOfBoundary ? containerOffsetWithBoundary[axis] : 0)) - ((_margins_axis = margins[axis]) !== null && _margins_axis !== void 0 ? _margins_axis : 0) - margins[$edcf132a9284368a$var$FLIPPED_DIRECTION[axis]] - padding);
	var _containerDimensions_scroll_axis1, _margins_axis1;
	return Math.max(0, boundaryDimensions[size] + boundaryDimensions[axis] + (isContainerDescendentOfBoundary ? containerOffsetWithBoundary[axis] : 0) - childOffset[axis] - childOffset[size] + ((_containerDimensions_scroll_axis1 = containerDimensions.scroll[axis]) !== null && _containerDimensions_scroll_axis1 !== void 0 ? _containerDimensions_scroll_axis1 : 0) - ((_margins_axis1 = margins[axis]) !== null && _margins_axis1 !== void 0 ? _margins_axis1 : 0) - margins[$edcf132a9284368a$var$FLIPPED_DIRECTION[axis]] - padding);
}
function $edcf132a9284368a$export$6839422d1f33cee9(placementInput, childOffset, overlaySize, scrollSize, margins, padding, flip, boundaryDimensions, containerDimensions, containerOffsetWithBoundary, offset, crossOffset, isContainerPositioned, userSetMaxHeight, arrowSize, arrowBoundaryOffset, isContainerDescendentOfBoundary, visualViewport) {
	let placementInfo = $edcf132a9284368a$var$parsePlacement(placementInput);
	let { size, crossAxis, crossSize, placement, crossPlacement } = placementInfo;
	let position = $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset, containerDimensions);
	let normalizedOffset = offset;
	let space = $edcf132a9284368a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding + offset, placementInfo, containerDimensions, isContainerDescendentOfBoundary);
	if (flip && overlaySize[size] > space) {
		let flippedPlacementInfo = $edcf132a9284368a$var$parsePlacement(`${$edcf132a9284368a$var$FLIPPED_DIRECTION[placement]} ${crossPlacement}`);
		let flippedPosition = $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, flippedPlacementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset, containerDimensions);
		if ($edcf132a9284368a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding + offset, flippedPlacementInfo, containerDimensions, isContainerDescendentOfBoundary) > space) {
			placementInfo = flippedPlacementInfo;
			position = flippedPosition;
			normalizedOffset = offset;
		}
	}
	let heightGrowthDirection = "bottom";
	if (placementInfo.axis === "top") {
		if (placementInfo.placement === "top") heightGrowthDirection = "top";
		else if (placementInfo.placement === "bottom") heightGrowthDirection = "bottom";
	} else if (placementInfo.crossAxis === "top") {
		if (placementInfo.crossPlacement === "top") heightGrowthDirection = "bottom";
		else if (placementInfo.crossPlacement === "bottom") heightGrowthDirection = "top";
	}
	let delta = $edcf132a9284368a$var$getDelta(crossAxis, position[crossAxis], overlaySize[crossSize], boundaryDimensions, containerDimensions, padding, containerOffsetWithBoundary);
	position[crossAxis] += delta;
	let maxHeight = $edcf132a9284368a$var$getMaxHeight(position, boundaryDimensions, containerOffsetWithBoundary, isContainerPositioned, margins, padding, overlaySize.height, heightGrowthDirection, containerDimensions, isContainerDescendentOfBoundary, visualViewport);
	if (userSetMaxHeight && userSetMaxHeight < maxHeight) maxHeight = userSetMaxHeight;
	overlaySize.height = Math.min(overlaySize.height, maxHeight);
	position = $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, normalizedOffset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset, containerDimensions);
	delta = $edcf132a9284368a$var$getDelta(crossAxis, position[crossAxis], overlaySize[crossSize], boundaryDimensions, containerDimensions, padding, containerOffsetWithBoundary);
	position[crossAxis] += delta;
	let arrowPosition = {};
	let origin = childOffset[crossAxis] - position[crossAxis] - margins[$edcf132a9284368a$var$AXIS[crossAxis]];
	let preferredArrowPosition = origin + .5 * childOffset[crossSize];
	const arrowMinPosition = arrowSize / 2 + arrowBoundaryOffset;
	var _margins_left, _margins_right, _margins_top, _margins_bottom;
	const overlayMargin = $edcf132a9284368a$var$AXIS[crossAxis] === "left" ? ((_margins_left = margins.left) !== null && _margins_left !== void 0 ? _margins_left : 0) + ((_margins_right = margins.right) !== null && _margins_right !== void 0 ? _margins_right : 0) : ((_margins_top = margins.top) !== null && _margins_top !== void 0 ? _margins_top : 0) + ((_margins_bottom = margins.bottom) !== null && _margins_bottom !== void 0 ? _margins_bottom : 0);
	const arrowMaxPosition = overlaySize[crossSize] - overlayMargin - arrowSize / 2 - arrowBoundaryOffset;
	arrowPosition[crossAxis] = $9446cca9a3875146$export$7d15b64cf5a3a4c4($9446cca9a3875146$export$7d15b64cf5a3a4c4(preferredArrowPosition, childOffset[crossAxis] + arrowSize / 2 - (position[crossAxis] + margins[$edcf132a9284368a$var$AXIS[crossAxis]]), childOffset[crossAxis] + childOffset[crossSize] - arrowSize / 2 - (position[crossAxis] + margins[$edcf132a9284368a$var$AXIS[crossAxis]])), arrowMinPosition, arrowMaxPosition);
	({placement: placement, crossPlacement: crossPlacement} = placementInfo);
	if (arrowSize) origin = arrowPosition[crossAxis];
	else if (crossPlacement === "right") origin += childOffset[crossSize];
	else if (crossPlacement === "center") origin += childOffset[crossSize] / 2;
	let crossOrigin = placement === "left" || placement === "top" ? overlaySize[size] : 0;
	let triggerAnchorPoint = {
		x: placement === "top" || placement === "bottom" ? origin : crossOrigin,
		y: placement === "left" || placement === "right" ? origin : crossOrigin
	};
	return {
		position,
		maxHeight,
		arrowOffsetLeft: arrowPosition.left,
		arrowOffsetTop: arrowPosition.top,
		placement,
		triggerAnchorPoint
	};
}
function $edcf132a9284368a$export$b3ceb0cbf1056d98(opts) {
	let { placement, targetNode, overlayNode, scrollNode, padding, shouldFlip, boundaryElement, offset, crossOffset, maxHeight, arrowSize = 0, arrowBoundaryOffset = 0 } = opts;
	let visualViewport = $edcf132a9284368a$var$getVisualViewport();
	let container = overlayNode instanceof HTMLElement ? $edcf132a9284368a$var$getContainingBlock(overlayNode) : document.documentElement;
	let isViewportContainer = container === document.documentElement;
	const containerPositionStyle = window.getComputedStyle(container).position;
	let isContainerPositioned = !!containerPositionStyle && containerPositionStyle !== "static";
	let childOffset = isViewportContainer ? $edcf132a9284368a$var$getOffset(targetNode, false) : $edcf132a9284368a$var$getPosition(targetNode, container, false);
	if (!isViewportContainer) {
		let { marginTop, marginLeft } = window.getComputedStyle(targetNode);
		childOffset.top += parseInt(marginTop, 10) || 0;
		childOffset.left += parseInt(marginLeft, 10) || 0;
	}
	let overlaySize = $edcf132a9284368a$var$getOffset(overlayNode, true);
	let margins = $edcf132a9284368a$var$getMargins(overlayNode);
	var _margins_left, _margins_right;
	overlaySize.width += ((_margins_left = margins.left) !== null && _margins_left !== void 0 ? _margins_left : 0) + ((_margins_right = margins.right) !== null && _margins_right !== void 0 ? _margins_right : 0);
	var _margins_top, _margins_bottom;
	overlaySize.height += ((_margins_top = margins.top) !== null && _margins_top !== void 0 ? _margins_top : 0) + ((_margins_bottom = margins.bottom) !== null && _margins_bottom !== void 0 ? _margins_bottom : 0);
	let scrollSize = $edcf132a9284368a$var$getScroll(scrollNode);
	let boundaryDimensions = $edcf132a9284368a$var$getContainerDimensions(boundaryElement, visualViewport);
	let containerDimensions = $edcf132a9284368a$var$getContainerDimensions(container, visualViewport);
	let containerOffsetWithBoundary;
	if ((boundaryElement.tagName === "BODY" || boundaryElement.tagName === "HTML") && !isViewportContainer) {
		let containerRect = $edcf132a9284368a$export$4b834cebd9e5cebe(container, false);
		containerOffsetWithBoundary = {
			top: -(containerRect.top - boundaryDimensions.top),
			left: -(containerRect.left - boundaryDimensions.left),
			width: 0,
			height: 0
		};
	} else if ((boundaryElement.tagName === "BODY" || boundaryElement.tagName === "HTML") && isViewportContainer) containerOffsetWithBoundary = {
		top: 0,
		left: 0,
		width: 0,
		height: 0
	};
	else containerOffsetWithBoundary = $edcf132a9284368a$var$getPosition(boundaryElement, container, false);
	let isContainerDescendentOfBoundary = $d4ee10de306f2510$export$4282f70798064fe0(boundaryElement, container);
	return $edcf132a9284368a$export$6839422d1f33cee9(placement, childOffset, overlaySize, scrollSize, margins, padding, shouldFlip, boundaryDimensions, containerDimensions, containerOffsetWithBoundary, offset, crossOffset, isContainerPositioned, maxHeight, arrowSize, arrowBoundaryOffset, isContainerDescendentOfBoundary, visualViewport);
}
function $edcf132a9284368a$export$4b834cebd9e5cebe(node, ignoreScale) {
	let { top, left, width, height } = node.getBoundingClientRect();
	if (ignoreScale && node instanceof node.ownerDocument.defaultView.HTMLElement) {
		width = node.offsetWidth;
		height = node.offsetHeight;
	}
	return {
		top,
		left,
		width,
		height
	};
}
function $edcf132a9284368a$var$getOffset(node, ignoreScale) {
	let { top, left, width, height } = $edcf132a9284368a$export$4b834cebd9e5cebe(node, ignoreScale);
	let { scrollTop, scrollLeft, clientTop, clientLeft } = document.documentElement;
	return {
		top: top + scrollTop - clientTop,
		left: left + scrollLeft - clientLeft,
		width,
		height
	};
}
function $edcf132a9284368a$var$getPosition(node, parent, ignoreScale) {
	let style = window.getComputedStyle(node);
	let offset;
	if (style.position === "fixed") offset = $edcf132a9284368a$export$4b834cebd9e5cebe(node, ignoreScale);
	else {
		offset = $edcf132a9284368a$var$getOffset(node, ignoreScale);
		let parentOffset = $edcf132a9284368a$var$getOffset(parent, ignoreScale);
		let parentStyle = window.getComputedStyle(parent);
		parentOffset.top += (parseInt(parentStyle.borderTopWidth, 10) || 0) - parent.scrollTop;
		parentOffset.left += (parseInt(parentStyle.borderLeftWidth, 10) || 0) - parent.scrollLeft;
		offset.top -= parentOffset.top;
		offset.left -= parentOffset.left;
	}
	offset.top -= parseInt(style.marginTop, 10) || 0;
	offset.left -= parseInt(style.marginLeft, 10) || 0;
	return offset;
}
function $edcf132a9284368a$var$getContainingBlock(node) {
	let offsetParent = node.offsetParent;
	if (offsetParent && offsetParent === document.body && window.getComputedStyle(offsetParent).position === "static" && !$edcf132a9284368a$var$isContainingBlock(offsetParent)) offsetParent = document.documentElement;
	if (offsetParent == null) {
		offsetParent = node.parentElement;
		while (offsetParent && !$edcf132a9284368a$var$isContainingBlock(offsetParent)) offsetParent = offsetParent.parentElement;
	}
	return offsetParent || document.documentElement;
}
function $edcf132a9284368a$var$isContainingBlock(node) {
	let style = window.getComputedStyle(node);
	return style.transform !== "none" || /transform|perspective/.test(style.willChange) || style.filter !== "none" || style.contain === "paint" || "backdropFilter" in style && style.backdropFilter !== "none" || "WebkitBackdropFilter" in style && style.WebkitBackdropFilter !== "none";
}
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/useCloseOnScroll.mjs
var $dd149f63282afbbf$export$f6211563215e3b37 = /* @__PURE__ */ new WeakMap();
function $dd149f63282afbbf$export$18fc8428861184da(opts) {
	let { triggerRef, isOpen, onClose } = opts;
	(0, import_react.useEffect)(() => {
		if (!isOpen || onClose === null) return;
		let onScroll = (e) => {
			let target = $d4ee10de306f2510$export$e58f029f0fbfdb29(e);
			if (!triggerRef.current || target instanceof Node && !$d4ee10de306f2510$export$4282f70798064fe0(target, triggerRef.current)) return;
			if (target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement) return;
			let onCloseHandler = onClose || $dd149f63282afbbf$export$f6211563215e3b37.get(triggerRef.current);
			if (onCloseHandler) onCloseHandler();
		};
		window.addEventListener("scroll", onScroll, true);
		return () => {
			window.removeEventListener("scroll", onScroll, true);
		};
	}, [
		isOpen,
		onClose,
		triggerRef
	]);
}
//#endregion
//#region ../../node_modules/@react-aria/i18n/dist/utils.mjs
var $148a7a147e38ea7f$var$RTL_SCRIPTS = new Set([
	"Arab",
	"Syrc",
	"Samr",
	"Mand",
	"Thaa",
	"Mend",
	"Nkoo",
	"Adlm",
	"Rohg",
	"Hebr"
]);
var $148a7a147e38ea7f$var$RTL_LANGS = new Set([
	"ae",
	"ar",
	"arc",
	"bcc",
	"bqi",
	"ckb",
	"dv",
	"fa",
	"glk",
	"he",
	"ku",
	"mzn",
	"nqo",
	"pnb",
	"ps",
	"sd",
	"ug",
	"ur",
	"yi"
]);
function $148a7a147e38ea7f$export$702d680b21cbd764(localeString) {
	if (Intl.Locale) {
		let locale = new Intl.Locale(localeString).maximize();
		let textInfo = typeof locale.getTextInfo === "function" ? locale.getTextInfo() : locale.textInfo;
		if (textInfo) return textInfo.direction === "rtl";
		if (locale.script) return $148a7a147e38ea7f$var$RTL_SCRIPTS.has(locale.script);
	}
	let lang = localeString.split("-")[0];
	return $148a7a147e38ea7f$var$RTL_LANGS.has(lang);
}
//#endregion
//#region ../../node_modules/@react-aria/i18n/dist/useDefaultLocale.mjs
var $1e5a04cdaf7d1af8$var$localeSymbol = Symbol.for("react-aria.i18n.locale");
function $1e5a04cdaf7d1af8$export$f09106e7c6677ec5() {
	let locale = typeof window !== "undefined" && window[$1e5a04cdaf7d1af8$var$localeSymbol] || typeof navigator !== "undefined" && (navigator.language || navigator.userLanguage) || "en-US";
	try {
		Intl.DateTimeFormat.supportedLocalesOf([locale]);
	} catch {
		locale = "en-US";
	}
	return {
		locale,
		direction: $148a7a147e38ea7f$export$702d680b21cbd764(locale) ? "rtl" : "ltr"
	};
}
var $1e5a04cdaf7d1af8$var$currentLocale = $1e5a04cdaf7d1af8$export$f09106e7c6677ec5();
var $1e5a04cdaf7d1af8$var$listeners = /* @__PURE__ */ new Set();
function $1e5a04cdaf7d1af8$var$updateLocale() {
	$1e5a04cdaf7d1af8$var$currentLocale = $1e5a04cdaf7d1af8$export$f09106e7c6677ec5();
	for (let listener of $1e5a04cdaf7d1af8$var$listeners) listener($1e5a04cdaf7d1af8$var$currentLocale);
}
function $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a() {
	let isSSR = $b5e257d569688ac6$export$535bd6ca7f90a273();
	let [defaultLocale, setDefaultLocale] = (0, import_react.useState)($1e5a04cdaf7d1af8$var$currentLocale);
	(0, import_react.useEffect)(() => {
		if ($1e5a04cdaf7d1af8$var$listeners.size === 0) window.addEventListener("languagechange", $1e5a04cdaf7d1af8$var$updateLocale);
		$1e5a04cdaf7d1af8$var$listeners.add(setDefaultLocale);
		return () => {
			$1e5a04cdaf7d1af8$var$listeners.delete(setDefaultLocale);
			if ($1e5a04cdaf7d1af8$var$listeners.size === 0) window.removeEventListener("languagechange", $1e5a04cdaf7d1af8$var$updateLocale);
		};
	}, []);
	if (isSSR) return {
		locale: typeof window !== "undefined" && window[$1e5a04cdaf7d1af8$var$localeSymbol] || "en-US",
		direction: "ltr"
	};
	return defaultLocale;
}
//#endregion
//#region ../../node_modules/@react-aria/i18n/dist/context.mjs
var $18f2051aff69b9bf$var$I18nContext = /* @__PURE__ */ import_react.createContext(null);
function $18f2051aff69b9bf$export$43bb16f9c6d9e3f7() {
	let defaultLocale = $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a();
	return (0, import_react.useContext)($18f2051aff69b9bf$var$I18nContext) || defaultLocale;
}
//#endregion
//#region ../../node_modules/@internationalized/string/dist/LocalizedStringDictionary.mjs
var $5b160d28a433310d$var$localeSymbol = Symbol.for("react-aria.i18n.locale");
var $5b160d28a433310d$var$stringsSymbol = Symbol.for("react-aria.i18n.strings");
var $5b160d28a433310d$var$cachedGlobalStrings = void 0;
var $5b160d28a433310d$export$c17fa47878dc55b6 = class $5b160d28a433310d$export$c17fa47878dc55b6 {
	/** Returns a localized string for the given key and locale. */ getStringForLocale(key, locale) {
		let string = this.getStringsForLocale(locale)[key];
		if (!string) throw new Error(`Could not find intl message ${key} in ${locale} locale`);
		return string;
	}
	/** Returns all localized strings for the given locale. */ getStringsForLocale(locale) {
		let strings = this.strings[locale];
		if (!strings) {
			strings = $5b160d28a433310d$var$getStringsForLocale(locale, this.strings, this.defaultLocale);
			this.strings[locale] = strings;
		}
		return strings;
	}
	static getGlobalDictionaryForPackage(packageName) {
		if (typeof window === "undefined") return null;
		let locale = window[$5b160d28a433310d$var$localeSymbol];
		if ($5b160d28a433310d$var$cachedGlobalStrings === void 0) {
			let globalStrings = window[$5b160d28a433310d$var$stringsSymbol];
			if (!globalStrings) return null;
			$5b160d28a433310d$var$cachedGlobalStrings = {};
			for (let pkg in globalStrings) $5b160d28a433310d$var$cachedGlobalStrings[pkg] = new $5b160d28a433310d$export$c17fa47878dc55b6({ [locale]: globalStrings[pkg] }, locale);
		}
		let dictionary = $5b160d28a433310d$var$cachedGlobalStrings === null || $5b160d28a433310d$var$cachedGlobalStrings === void 0 ? void 0 : $5b160d28a433310d$var$cachedGlobalStrings[packageName];
		if (!dictionary) throw new Error(`Strings for package "${packageName}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);
		return dictionary;
	}
	constructor(messages, defaultLocale = "en-US") {
		this.strings = Object.fromEntries(Object.entries(messages).filter(([, v]) => v));
		this.defaultLocale = defaultLocale;
	}
};
function $5b160d28a433310d$var$getStringsForLocale(locale, strings, defaultLocale = "en-US") {
	if (strings[locale]) return strings[locale];
	let language = $5b160d28a433310d$var$getLanguage(locale);
	if (strings[language]) return strings[language];
	for (let key in strings) if (key.startsWith(language + "-")) return strings[key];
	return strings[defaultLocale];
}
function $5b160d28a433310d$var$getLanguage(locale) {
	if (Intl.Locale) return new Intl.Locale(locale).language;
	return locale.split("-")[0];
}
//#endregion
//#region ../../node_modules/@internationalized/string/dist/LocalizedStringFormatter.mjs
var $6db58dc88e78b024$var$pluralRulesCache = /* @__PURE__ */ new Map();
var $6db58dc88e78b024$var$numberFormatCache = /* @__PURE__ */ new Map();
var $6db58dc88e78b024$export$2f817fcdc4b89ae0 = class {
	/** Formats a localized string for the given key with the provided variables. */ format(key, variables) {
		let message = this.strings.getStringForLocale(key, this.locale);
		return typeof message === "function" ? message(variables, this) : message;
	}
	plural(count, options, type = "cardinal") {
		let opt = options["=" + count];
		if (opt) return typeof opt === "function" ? opt() : opt;
		let key = this.locale + ":" + type;
		let pluralRules = $6db58dc88e78b024$var$pluralRulesCache.get(key);
		if (!pluralRules) {
			pluralRules = new Intl.PluralRules(this.locale, { type });
			$6db58dc88e78b024$var$pluralRulesCache.set(key, pluralRules);
		}
		opt = options[pluralRules.select(count)] || options.other;
		return typeof opt === "function" ? opt() : opt;
	}
	number(value) {
		let numberFormat = $6db58dc88e78b024$var$numberFormatCache.get(this.locale);
		if (!numberFormat) {
			numberFormat = new Intl.NumberFormat(this.locale);
			$6db58dc88e78b024$var$numberFormatCache.set(this.locale, numberFormat);
		}
		return numberFormat.format(value);
	}
	select(options, value) {
		let opt = options[value] || options.other;
		return typeof opt === "function" ? opt() : opt;
	}
	constructor(locale, strings) {
		this.locale = locale;
		this.strings = strings;
	}
};
//#endregion
//#region ../../node_modules/@react-aria/i18n/dist/useLocalizedStringFormatter.mjs
var $fca6afa0e843324b$var$cache = /* @__PURE__ */ new WeakMap();
function $fca6afa0e843324b$var$getCachedDictionary(strings) {
	let dictionary = $fca6afa0e843324b$var$cache.get(strings);
	if (!dictionary) {
		dictionary = new $5b160d28a433310d$export$c17fa47878dc55b6(strings);
		$fca6afa0e843324b$var$cache.set(strings, dictionary);
	}
	return dictionary;
}
function $fca6afa0e843324b$export$87b761675e8eaa10(strings, packageName) {
	return packageName && $5b160d28a433310d$export$c17fa47878dc55b6.getGlobalDictionaryForPackage(packageName) || $fca6afa0e843324b$var$getCachedDictionary(strings);
}
function $fca6afa0e843324b$export$f12b703ca79dfbb1(strings, packageName) {
	let { locale } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
	let dictionary = $fca6afa0e843324b$export$87b761675e8eaa10(strings, packageName);
	return (0, import_react.useMemo)(() => new $6db58dc88e78b024$export$2f817fcdc4b89ae0(locale, dictionary), [locale, dictionary]);
}
//#endregion
//#region ../../node_modules/@swc/helpers/esm/_check_private_redeclaration.js
function _check_private_redeclaration(obj, privateCollection) {
	if (privateCollection.has(obj)) throw new TypeError("Cannot initialize the same private elements twice on an object");
}
//#endregion
//#region ../../node_modules/@swc/helpers/esm/_class_private_field_init.js
function _class_private_field_init(obj, privateMap, value) {
	_check_private_redeclaration(obj, privateMap);
	privateMap.set(obj, value);
}
//#endregion
//#region ../../node_modules/@react-aria/i18n/dist/useCollator.mjs
var $325a3faab7a68acd$var$cache = /* @__PURE__ */ new Map();
function $325a3faab7a68acd$export$a16aca283550c30d(options) {
	let { locale } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
	let cacheKey = locale + (options ? Object.entries(options).sort((a, b) => a[0] < b[0] ? -1 : 1).join() : "");
	if ($325a3faab7a68acd$var$cache.has(cacheKey)) return $325a3faab7a68acd$var$cache.get(cacheKey);
	let formatter = new Intl.Collator(locale, options);
	$325a3faab7a68acd$var$cache.set(cacheKey, formatter);
	return formatter;
}
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/useOverlayPosition.mjs
var $2a41e45df1593e64$var$visualViewport = typeof document !== "undefined" ? window.visualViewport : null;
function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
	let { direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
	let { arrowSize, targetRef, overlayRef, arrowRef, scrollRef = overlayRef, placement = "bottom", containerPadding = 12, shouldFlip = true, boundaryElement = typeof document !== "undefined" ? document.body : null, offset = 0, crossOffset = 0, shouldUpdatePosition = true, isOpen = true, onClose, maxHeight, arrowBoundaryOffset = 0 } = props;
	let [position, setPosition] = (0, import_react.useState)(null);
	let deps = [
		shouldUpdatePosition,
		placement,
		overlayRef.current,
		targetRef.current,
		arrowRef === null || arrowRef === void 0 ? void 0 : arrowRef.current,
		scrollRef.current,
		containerPadding,
		shouldFlip,
		boundaryElement,
		offset,
		crossOffset,
		isOpen,
		direction,
		maxHeight,
		arrowBoundaryOffset,
		arrowSize
	];
	let lastScale = (0, import_react.useRef)($2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.scale);
	(0, import_react.useEffect)(() => {
		if (isOpen) lastScale.current = $2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.scale;
	}, [isOpen]);
	let updatePosition = (0, import_react.useCallback)(() => {
		if (shouldUpdatePosition === false || !isOpen || !overlayRef.current || !targetRef.current || !boundaryElement) return;
		if (($2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.scale) !== lastScale.current) return;
		let anchor = null;
		if (scrollRef.current && $d4ee10de306f2510$export$b4f377a2b6254582(scrollRef.current)) {
			var _getActiveElement;
			let anchorRect = (_getActiveElement = $d4ee10de306f2510$export$cd4e5573fbe2b576()) === null || _getActiveElement === void 0 ? void 0 : _getActiveElement.getBoundingClientRect();
			let scrollRect = scrollRef.current.getBoundingClientRect();
			var _anchorRect_top;
			anchor = {
				type: "top",
				offset: ((_anchorRect_top = anchorRect === null || anchorRect === void 0 ? void 0 : anchorRect.top) !== null && _anchorRect_top !== void 0 ? _anchorRect_top : 0) - scrollRect.top
			};
			if (anchor.offset > scrollRect.height / 2) {
				anchor.type = "bottom";
				var _anchorRect_bottom;
				anchor.offset = ((_anchorRect_bottom = anchorRect === null || anchorRect === void 0 ? void 0 : anchorRect.bottom) !== null && _anchorRect_bottom !== void 0 ? _anchorRect_bottom : 0) - scrollRect.bottom;
			}
		}
		let overlay = overlayRef.current;
		if (!maxHeight && overlayRef.current) {
			var _window_visualViewport;
			overlay.style.top = "0px";
			overlay.style.bottom = "";
			var _window_visualViewport_height;
			overlay.style.maxHeight = ((_window_visualViewport_height = (_window_visualViewport = window.visualViewport) === null || _window_visualViewport === void 0 ? void 0 : _window_visualViewport.height) !== null && _window_visualViewport_height !== void 0 ? _window_visualViewport_height : window.innerHeight) + "px";
		}
		let position = $edcf132a9284368a$export$b3ceb0cbf1056d98({
			placement: $2a41e45df1593e64$var$translateRTL(placement, direction),
			overlayNode: overlayRef.current,
			targetNode: targetRef.current,
			scrollNode: scrollRef.current || overlayRef.current,
			padding: containerPadding,
			shouldFlip,
			boundaryElement,
			offset,
			crossOffset,
			maxHeight,
			arrowSize: arrowSize !== null && arrowSize !== void 0 ? arrowSize : (arrowRef === null || arrowRef === void 0 ? void 0 : arrowRef.current) ? $edcf132a9284368a$export$4b834cebd9e5cebe(arrowRef.current, true).width : 0,
			arrowBoundaryOffset
		});
		if (!position.position) return;
		overlay.style.top = "";
		overlay.style.bottom = "";
		overlay.style.left = "";
		overlay.style.right = "";
		Object.keys(position.position).forEach((key) => overlay.style[key] = position.position[key] + "px");
		overlay.style.maxHeight = position.maxHeight != null ? position.maxHeight + "px" : "";
		let activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576();
		if (anchor && activeElement && scrollRef.current) {
			let anchorRect = activeElement.getBoundingClientRect();
			let scrollRect = scrollRef.current.getBoundingClientRect();
			let newOffset = anchorRect[anchor.type] - scrollRect[anchor.type];
			scrollRef.current.scrollTop += newOffset - anchor.offset;
		}
		setPosition(position);
	}, deps);
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(updatePosition, deps);
	$2a41e45df1593e64$var$useResize(updatePosition);
	$9daab02d461809db$export$683480f191c0e3ea({
		ref: overlayRef,
		onResize: updatePosition
	});
	$9daab02d461809db$export$683480f191c0e3ea({
		ref: targetRef,
		onResize: updatePosition
	});
	let isResizing = (0, import_react.useRef)(false);
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		let timeout;
		let onResize = () => {
			isResizing.current = true;
			clearTimeout(timeout);
			timeout = setTimeout(() => {
				isResizing.current = false;
			}, 500);
			updatePosition();
		};
		let onScroll = () => {
			if (isResizing.current) onResize();
		};
		$2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 || $2a41e45df1593e64$var$visualViewport.addEventListener("resize", onResize);
		$2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 || $2a41e45df1593e64$var$visualViewport.addEventListener("scroll", onScroll);
		return () => {
			$2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 || $2a41e45df1593e64$var$visualViewport.removeEventListener("resize", onResize);
			$2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 || $2a41e45df1593e64$var$visualViewport.removeEventListener("scroll", onScroll);
		};
	}, [updatePosition]);
	let close = (0, import_react.useCallback)(() => {
		if (!isResizing.current) onClose === null || onClose === void 0 || onClose();
	}, [onClose, isResizing]);
	$dd149f63282afbbf$export$18fc8428861184da({
		triggerRef: targetRef,
		isOpen,
		onClose: onClose && close
	});
	var _position_maxHeight, _position_placement, _position_triggerAnchorPoint;
	return {
		overlayProps: { style: {
			position: position ? "absolute" : "fixed",
			top: !position ? 0 : void 0,
			left: !position ? 0 : void 0,
			zIndex: 1e5,
			...position === null || position === void 0 ? void 0 : position.position,
			maxHeight: (_position_maxHeight = position === null || position === void 0 ? void 0 : position.maxHeight) !== null && _position_maxHeight !== void 0 ? _position_maxHeight : "100vh"
		} },
		placement: (_position_placement = position === null || position === void 0 ? void 0 : position.placement) !== null && _position_placement !== void 0 ? _position_placement : null,
		triggerAnchorPoint: (_position_triggerAnchorPoint = position === null || position === void 0 ? void 0 : position.triggerAnchorPoint) !== null && _position_triggerAnchorPoint !== void 0 ? _position_triggerAnchorPoint : null,
		arrowProps: {
			"aria-hidden": "true",
			role: "presentation",
			style: {
				left: position === null || position === void 0 ? void 0 : position.arrowOffsetLeft,
				top: position === null || position === void 0 ? void 0 : position.arrowOffsetTop
			}
		},
		updatePosition
	};
}
function $2a41e45df1593e64$var$useResize(onResize) {
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		window.addEventListener("resize", onResize, false);
		return () => {
			window.removeEventListener("resize", onResize, false);
		};
	}, [onResize]);
}
function $2a41e45df1593e64$var$translateRTL(position, direction) {
	if (direction === "rtl") return position.replace("start", "right").replace("end", "left");
	return position.replace("start", "left").replace("end", "right");
}
//#endregion
//#region ../../node_modules/@react-aria/interactions/dist/utils.mjs
function $8a9cb279dc87e130$export$525bc4921d56d4a(nativeEvent) {
	let event = nativeEvent;
	event.nativeEvent = nativeEvent;
	event.isDefaultPrevented = () => event.defaultPrevented;
	event.isPropagationStopped = () => event.cancelBubble;
	event.persist = () => {};
	return event;
}
function $8a9cb279dc87e130$export$c2b7abe5d61ec696(event, target) {
	Object.defineProperty(event, "target", { value: target });
	Object.defineProperty(event, "currentTarget", { value: target });
}
function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
	let stateRef = (0, import_react.useRef)({
		isFocused: false,
		observer: null
	});
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		const state = stateRef.current;
		return () => {
			if (state.observer) {
				state.observer.disconnect();
				state.observer = null;
			}
		};
	}, []);
	return (0, import_react.useCallback)((e) => {
		let eventTarget = $d4ee10de306f2510$export$e58f029f0fbfdb29(e);
		if (eventTarget instanceof HTMLButtonElement || eventTarget instanceof HTMLInputElement || eventTarget instanceof HTMLTextAreaElement || eventTarget instanceof HTMLSelectElement) {
			stateRef.current.isFocused = true;
			let target = eventTarget;
			let onBlurHandler = (e) => {
				stateRef.current.isFocused = false;
				if (target.disabled) {
					let event = $8a9cb279dc87e130$export$525bc4921d56d4a(e);
					onBlur === null || onBlur === void 0 || onBlur(event);
				}
				if (stateRef.current.observer) {
					stateRef.current.observer.disconnect();
					stateRef.current.observer = null;
				}
			};
			target.addEventListener("focusout", onBlurHandler, { once: true });
			stateRef.current.observer = new MutationObserver(() => {
				if (stateRef.current.isFocused && target.disabled) {
					var _stateRef_current_observer;
					(_stateRef_current_observer = stateRef.current.observer) === null || _stateRef_current_observer === void 0 || _stateRef_current_observer.disconnect();
					let relatedTargetEl = target === $d4ee10de306f2510$export$cd4e5573fbe2b576() ? null : $d4ee10de306f2510$export$cd4e5573fbe2b576();
					target.dispatchEvent(new FocusEvent("blur", { relatedTarget: relatedTargetEl }));
					target.dispatchEvent(new FocusEvent("focusout", {
						bubbles: true,
						relatedTarget: relatedTargetEl
					}));
				}
			});
			stateRef.current.observer.observe(target, {
				attributes: true,
				attributeFilter: ["disabled"]
			});
		}
	}, [onBlur]);
}
var $8a9cb279dc87e130$export$fda7da73ab5d4c48 = false;
function $8a9cb279dc87e130$export$cabe61c495ee3649(target) {
	while (target && !$b4b717babfbb907b$export$4c063cf1350e6fed(target)) target = target.parentElement;
	let window = $431fbd86ca7dc216$export$f21a1ffae260145a(target);
	let activeElement = window.document.activeElement;
	if (!activeElement || activeElement === target) return;
	$8a9cb279dc87e130$export$fda7da73ab5d4c48 = true;
	let isRefocusing = false;
	let onBlur = (e) => {
		if ($d4ee10de306f2510$export$e58f029f0fbfdb29(e) === activeElement || isRefocusing) e.stopImmediatePropagation();
	};
	let onFocusOut = (e) => {
		if ($d4ee10de306f2510$export$e58f029f0fbfdb29(e) === activeElement || isRefocusing) {
			e.stopImmediatePropagation();
			if (!target && !isRefocusing) {
				isRefocusing = true;
				$7215afc6de606d6b$export$de79e2c695e052f3(activeElement);
				cleanup();
			}
		}
	};
	let onFocus = (e) => {
		if ($d4ee10de306f2510$export$e58f029f0fbfdb29(e) === target || isRefocusing) e.stopImmediatePropagation();
	};
	let onFocusIn = (e) => {
		if ($d4ee10de306f2510$export$e58f029f0fbfdb29(e) === target || isRefocusing) {
			e.stopImmediatePropagation();
			if (!isRefocusing) {
				isRefocusing = true;
				$7215afc6de606d6b$export$de79e2c695e052f3(activeElement);
				cleanup();
			}
		}
	};
	window.addEventListener("blur", onBlur, true);
	window.addEventListener("focusout", onFocusOut, true);
	window.addEventListener("focusin", onFocusIn, true);
	window.addEventListener("focus", onFocus, true);
	let cleanup = () => {
		cancelAnimationFrame(raf);
		window.removeEventListener("blur", onBlur, true);
		window.removeEventListener("focusout", onFocusOut, true);
		window.removeEventListener("focusin", onFocusIn, true);
		window.removeEventListener("focus", onFocus, true);
		$8a9cb279dc87e130$export$fda7da73ab5d4c48 = false;
		isRefocusing = false;
	};
	let raf = requestAnimationFrame(cleanup);
	return cleanup;
}
//#endregion
//#region ../../node_modules/@react-aria/interactions/dist/textSelection.mjs
var $14c0b72509d70225$var$state = "default";
var $14c0b72509d70225$var$savedUserSelect = "";
var $14c0b72509d70225$var$modifiedElementMap = /* @__PURE__ */ new WeakMap();
function $14c0b72509d70225$export$16a4697467175487(target) {
	if ($c87311424ea30a05$export$fedb369cb70207f1()) {
		if ($14c0b72509d70225$var$state === "default") {
			const documentObject = $431fbd86ca7dc216$export$b204af158042fbac(target);
			$14c0b72509d70225$var$savedUserSelect = documentObject.documentElement.style.webkitUserSelect;
			documentObject.documentElement.style.webkitUserSelect = "none";
		}
		$14c0b72509d70225$var$state = "disabled";
	} else if (target instanceof HTMLElement || target instanceof SVGElement) {
		let property = "userSelect" in target.style ? "userSelect" : "webkitUserSelect";
		$14c0b72509d70225$var$modifiedElementMap.set(target, target.style[property]);
		target.style[property] = "none";
	}
}
function $14c0b72509d70225$export$b0d6fa1ab32e3295(target) {
	if ($c87311424ea30a05$export$fedb369cb70207f1()) {
		if ($14c0b72509d70225$var$state !== "disabled") return;
		$14c0b72509d70225$var$state = "restoring";
		setTimeout(() => {
			$bbed8b41f857bcc0$export$24490316f764c430(() => {
				if ($14c0b72509d70225$var$state === "restoring") {
					const documentObject = $431fbd86ca7dc216$export$b204af158042fbac(target);
					if (documentObject.documentElement.style.webkitUserSelect === "none") documentObject.documentElement.style.webkitUserSelect = $14c0b72509d70225$var$savedUserSelect || "";
					$14c0b72509d70225$var$savedUserSelect = "";
					$14c0b72509d70225$var$state = "default";
				}
			});
		}, 300);
	} else if (target instanceof HTMLElement || target instanceof SVGElement) {
		if (target && $14c0b72509d70225$var$modifiedElementMap.has(target)) {
			let targetOldUserSelect = $14c0b72509d70225$var$modifiedElementMap.get(target);
			let property = "userSelect" in target.style ? "userSelect" : "webkitUserSelect";
			if (target.style[property] === "none") target.style[property] = targetOldUserSelect;
			if (target.getAttribute("style") === "") target.removeAttribute("style");
			$14c0b72509d70225$var$modifiedElementMap.delete(target);
		}
	}
}
//#endregion
//#region ../../node_modules/@react-aria/interactions/dist/context.mjs
var $ae1eeba8b9eafd08$export$5165eccb35aaadb5 = import_react.createContext({ register: () => {} });
$ae1eeba8b9eafd08$export$5165eccb35aaadb5.displayName = "PressResponderContext";
//#endregion
//#region ../../node_modules/@swc/helpers/esm/_class_apply_descriptor_get.js
function _class_apply_descriptor_get(receiver, descriptor) {
	if (descriptor.get) return descriptor.get.call(receiver);
	return descriptor.value;
}
//#endregion
//#region ../../node_modules/@swc/helpers/esm/_class_extract_field_descriptor.js
function _class_extract_field_descriptor(receiver, privateMap, action) {
	if (!privateMap.has(receiver)) throw new TypeError("attempted to " + action + " private field on non-instance");
	return privateMap.get(receiver);
}
//#endregion
//#region ../../node_modules/@swc/helpers/esm/_class_private_field_get.js
function _class_private_field_get(receiver, privateMap) {
	return _class_apply_descriptor_get(receiver, _class_extract_field_descriptor(receiver, privateMap, "get"));
}
//#endregion
//#region ../../node_modules/@swc/helpers/esm/_class_apply_descriptor_set.js
function _class_apply_descriptor_set(receiver, descriptor, value) {
	if (descriptor.set) descriptor.set.call(receiver, value);
	else {
		if (!descriptor.writable) throw new TypeError("attempted to set read only private field");
		descriptor.value = value;
	}
}
//#endregion
//#region ../../node_modules/@swc/helpers/esm/_class_private_field_set.js
function _class_private_field_set(receiver, privateMap, value) {
	_class_apply_descriptor_set(receiver, _class_extract_field_descriptor(receiver, privateMap, "set"), value);
	return value;
}
//#endregion
//#region ../../node_modules/@react-aria/interactions/dist/usePress.mjs
function $f6c31cce2adf654f$var$usePressResponderContext(props) {
	let context = (0, import_react.useContext)($ae1eeba8b9eafd08$export$5165eccb35aaadb5);
	if (context) {
		let { register, ref, ...contextProps } = context;
		props = $3ef42575df84b30b$export$9d1611c77c2fe928(contextProps, props);
		register();
	}
	$e7801be82b4b2a53$export$4debdb1a3f0fa79e(context, props.ref);
	return props;
}
var $f6c31cce2adf654f$var$_shouldStopPropagation = /* @__PURE__ */ new WeakMap();
var $f6c31cce2adf654f$var$PressEvent = class {
	continuePropagation() {
		_class_private_field_set(this, $f6c31cce2adf654f$var$_shouldStopPropagation, false);
	}
	get shouldStopPropagation() {
		return _class_private_field_get(this, $f6c31cce2adf654f$var$_shouldStopPropagation);
	}
	constructor(type, pointerType, originalEvent, state) {
		_class_private_field_init(this, $f6c31cce2adf654f$var$_shouldStopPropagation, {
			writable: true,
			value: void 0
		});
		_class_private_field_set(this, $f6c31cce2adf654f$var$_shouldStopPropagation, true);
		var _state_target;
		let currentTarget = (_state_target = state === null || state === void 0 ? void 0 : state.target) !== null && _state_target !== void 0 ? _state_target : originalEvent.currentTarget;
		const rect = currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.getBoundingClientRect();
		let x, y = 0;
		let clientX, clientY = null;
		if (originalEvent.clientX != null && originalEvent.clientY != null) {
			clientX = originalEvent.clientX;
			clientY = originalEvent.clientY;
		}
		if (rect) if (clientX != null && clientY != null) {
			x = clientX - rect.left;
			y = clientY - rect.top;
		} else {
			x = rect.width / 2;
			y = rect.height / 2;
		}
		this.type = type;
		this.pointerType = pointerType;
		this.target = originalEvent.currentTarget;
		this.shiftKey = originalEvent.shiftKey;
		this.metaKey = originalEvent.metaKey;
		this.ctrlKey = originalEvent.ctrlKey;
		this.altKey = originalEvent.altKey;
		this.x = x;
		this.y = y;
		this.key = originalEvent.key;
	}
};
var $f6c31cce2adf654f$var$LINK_CLICKED = Symbol("linkClicked");
var $f6c31cce2adf654f$var$STYLE_ID = "react-aria-pressable-style";
var $f6c31cce2adf654f$var$PRESSABLE_ATTRIBUTE = "data-react-aria-pressable";
function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
	let { onPress, onPressChange, onPressStart, onPressEnd, onPressUp, onClick, isDisabled, isPressed: isPressedProp, preventFocusOnPress, shouldCancelOnPointerExit, allowTextSelectionOnPress, ref: domRef, ...domProps } = $f6c31cce2adf654f$var$usePressResponderContext(props);
	let [isPressed, setPressed] = (0, import_react.useState)(false);
	let ref = (0, import_react.useRef)({
		isPressed: false,
		ignoreEmulatedMouseEvents: false,
		didFirePressStart: false,
		isTriggeringEvent: false,
		activePointerId: null,
		target: null,
		isOverTarget: false,
		pointerType: null,
		disposables: []
	});
	let { addGlobalListener, removeAllGlobalListeners, removeGlobalListener } = $03deb23ff14920c4$export$4eaf04e54aa8eed6();
	let triggerPressStart = (0, import_react.useCallback)((originalEvent, pointerType) => {
		let state = ref.current;
		if (isDisabled || state.didFirePressStart) return false;
		let shouldStopPropagation = true;
		state.isTriggeringEvent = true;
		if (onPressStart) {
			let event = new $f6c31cce2adf654f$var$PressEvent("pressstart", pointerType, originalEvent);
			onPressStart(event);
			shouldStopPropagation = event.shouldStopPropagation;
		}
		if (onPressChange) onPressChange(true);
		state.isTriggeringEvent = false;
		state.didFirePressStart = true;
		setPressed(true);
		return shouldStopPropagation;
	}, [
		isDisabled,
		onPressStart,
		onPressChange
	]);
	let triggerPressEnd = (0, import_react.useCallback)((originalEvent, pointerType, wasPressed = true) => {
		let state = ref.current;
		if (!state.didFirePressStart) return false;
		state.didFirePressStart = false;
		state.isTriggeringEvent = true;
		let shouldStopPropagation = true;
		if (onPressEnd) {
			let event = new $f6c31cce2adf654f$var$PressEvent("pressend", pointerType, originalEvent);
			onPressEnd(event);
			shouldStopPropagation = event.shouldStopPropagation;
		}
		if (onPressChange) onPressChange(false);
		setPressed(false);
		if (onPress && wasPressed && !isDisabled) {
			let event = new $f6c31cce2adf654f$var$PressEvent("press", pointerType, originalEvent);
			onPress(event);
			shouldStopPropagation && (shouldStopPropagation = event.shouldStopPropagation);
		}
		state.isTriggeringEvent = false;
		return shouldStopPropagation;
	}, [
		isDisabled,
		onPressEnd,
		onPressChange,
		onPress
	]);
	let triggerPressEndEvent = $8ae05eaa5c114e9c$export$7f54fc3180508a52(triggerPressEnd);
	let triggerPressUp = (0, import_react.useCallback)((originalEvent, pointerType) => {
		let state = ref.current;
		if (isDisabled) return false;
		if (onPressUp) {
			state.isTriggeringEvent = true;
			let event = new $f6c31cce2adf654f$var$PressEvent("pressup", pointerType, originalEvent);
			onPressUp(event);
			state.isTriggeringEvent = false;
			return event.shouldStopPropagation;
		}
		return true;
	}, [isDisabled, onPressUp]);
	let triggerPressUpEvent = $8ae05eaa5c114e9c$export$7f54fc3180508a52(triggerPressUp);
	let cancel = (0, import_react.useCallback)((e) => {
		let state = ref.current;
		if (state.isPressed && state.target) {
			if (state.didFirePressStart && state.pointerType != null) triggerPressEnd($f6c31cce2adf654f$var$createEvent(state.target, e), state.pointerType, false);
			state.isPressed = false;
			setIsPointerPressed(null);
			state.isOverTarget = false;
			state.activePointerId = null;
			state.pointerType = null;
			removeAllGlobalListeners();
			if (!allowTextSelectionOnPress) $14c0b72509d70225$export$b0d6fa1ab32e3295(state.target);
			for (let dispose of state.disposables) dispose();
			state.disposables = [];
		}
	}, [
		allowTextSelectionOnPress,
		removeAllGlobalListeners,
		triggerPressEnd
	]);
	let cancelEvent = $8ae05eaa5c114e9c$export$7f54fc3180508a52(cancel);
	let cancelOnPointerExit = (0, import_react.useCallback)((e) => {
		if (shouldCancelOnPointerExit) cancel(e);
	}, [shouldCancelOnPointerExit, cancel]);
	let triggerClick = (0, import_react.useCallback)((e) => {
		if (isDisabled) return;
		onClick === null || onClick === void 0 || onClick(e);
	}, [isDisabled, onClick]);
	let triggerSyntheticClick = (0, import_react.useCallback)((e, target) => {
		if (isDisabled) return;
		if (onClick) {
			let event = new MouseEvent("click", e);
			$8a9cb279dc87e130$export$c2b7abe5d61ec696(event, target);
			onClick($8a9cb279dc87e130$export$525bc4921d56d4a(event));
		}
	}, [isDisabled, onClick]);
	let triggerSyntheticClickEvent = $8ae05eaa5c114e9c$export$7f54fc3180508a52(triggerSyntheticClick);
	let [isElemKeyPressed, setIsElemKeyPressed] = (0, import_react.useState)(false);
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		let state = ref.current;
		if (isElemKeyPressed) {
			let onKeyUp = (e) => {
				var _state_metaKeyEvents;
				if (state.isPressed && state.target && $f6c31cce2adf654f$var$isValidKeyboardEvent(e, state.target)) {
					var _state_metaKeyEvents1;
					if ($f6c31cce2adf654f$var$shouldPreventDefaultKeyboard($d4ee10de306f2510$export$e58f029f0fbfdb29(e), e.key)) e.preventDefault();
					let target = $d4ee10de306f2510$export$e58f029f0fbfdb29(e);
					let wasPressed = $d4ee10de306f2510$export$4282f70798064fe0(state.target, target);
					triggerPressEndEvent($f6c31cce2adf654f$var$createEvent(state.target, e), "keyboard", wasPressed);
					if (wasPressed) triggerSyntheticClickEvent(e, state.target);
					removeAllGlobalListeners();
					if (e.key !== "Enter" && $f6c31cce2adf654f$var$isHTMLAnchorLink(state.target) && $d4ee10de306f2510$export$4282f70798064fe0(state.target, target) && !e[$f6c31cce2adf654f$var$LINK_CLICKED]) {
						e[$f6c31cce2adf654f$var$LINK_CLICKED] = true;
						$ea8dcbcb9ea1b556$export$95185d699e05d4d7(state.target, e, false);
					}
					state.isPressed = false;
					setIsElemKeyPressed(false);
					(_state_metaKeyEvents1 = state.metaKeyEvents) === null || _state_metaKeyEvents1 === void 0 || _state_metaKeyEvents1.delete(e.key);
				} else if (e.key === "Meta" && ((_state_metaKeyEvents = state.metaKeyEvents) === null || _state_metaKeyEvents === void 0 ? void 0 : _state_metaKeyEvents.size)) {
					var _state_target;
					let events = state.metaKeyEvents;
					state.metaKeyEvents = void 0;
					for (let event of events.values()) (_state_target = state.target) === null || _state_target === void 0 || _state_target.dispatchEvent(new KeyboardEvent("keyup", event));
				}
			};
			let originalTarget = state.target;
			let pressUp = (e) => {
				if (originalTarget && $f6c31cce2adf654f$var$isValidKeyboardEvent(e, originalTarget) && !e.repeat && $d4ee10de306f2510$export$4282f70798064fe0(originalTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e)) && state.target) triggerPressUpEvent($f6c31cce2adf654f$var$createEvent(state.target, e), "keyboard");
			};
			let listener = $ff5963eb1fccf552$export$e08e3b67e392101e(pressUp, onKeyUp);
			addGlobalListener($431fbd86ca7dc216$export$b204af158042fbac(state.target), "keyup", listener, true);
			return () => {
				removeGlobalListener($431fbd86ca7dc216$export$b204af158042fbac(state.target), "keyup", listener, true);
			};
		}
	}, [
		isElemKeyPressed,
		addGlobalListener,
		removeAllGlobalListeners,
		removeGlobalListener
	]);
	let [isPointerPressed, setIsPointerPressed] = (0, import_react.useState)(null);
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		let state = ref.current;
		if (isPointerPressed === "pointer") {
			let onPointerUp = (e) => {
				if (e.pointerId === state.activePointerId && state.isPressed && e.button === 0 && state.target) {
					if ($d4ee10de306f2510$export$4282f70798064fe0(state.target, $d4ee10de306f2510$export$e58f029f0fbfdb29(e)) && state.pointerType != null) {
						let clicked = false;
						let timeout = setTimeout(() => {
							if (state.isPressed && state.target instanceof HTMLElement) if (clicked) cancelEvent(e);
							else {
								$7215afc6de606d6b$export$de79e2c695e052f3(state.target);
								state.target.click();
							}
						}, 80);
						if (e.currentTarget) addGlobalListener(e.currentTarget, "click", () => clicked = true, true);
						state.disposables.push(() => clearTimeout(timeout));
					} else cancelEvent(e);
					state.isOverTarget = false;
				}
			};
			let onPointerCancel = (e) => {
				cancelEvent(e);
			};
			addGlobalListener($431fbd86ca7dc216$export$b204af158042fbac(state.target), "pointerup", onPointerUp, false);
			addGlobalListener($431fbd86ca7dc216$export$b204af158042fbac(state.target), "pointercancel", onPointerCancel, false);
			return () => {
				removeGlobalListener($431fbd86ca7dc216$export$b204af158042fbac(state.target), "pointerup", onPointerUp, false);
				removeGlobalListener($431fbd86ca7dc216$export$b204af158042fbac(state.target), "pointercancel", onPointerCancel, false);
			};
		}
	}, [
		isPointerPressed,
		addGlobalListener,
		removeGlobalListener
	]);
	let pressProps = (0, import_react.useMemo)(() => {
		let state = ref.current;
		let pressProps = {
			onKeyDown(e) {
				if ($f6c31cce2adf654f$var$isValidKeyboardEvent(e.nativeEvent, e.currentTarget) && $d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e))) {
					var _state_metaKeyEvents;
					if ($f6c31cce2adf654f$var$shouldPreventDefaultKeyboard($d4ee10de306f2510$export$e58f029f0fbfdb29(e), e.key)) e.preventDefault();
					let shouldStopPropagation = true;
					if (!state.isPressed && !e.repeat) {
						state.target = e.currentTarget;
						state.isPressed = true;
						setIsElemKeyPressed(true);
						state.pointerType = "keyboard";
						shouldStopPropagation = triggerPressStart(e, "keyboard");
					}
					if (shouldStopPropagation) e.stopPropagation();
					if (e.metaKey && $c87311424ea30a05$export$9ac100e40613ea10()) (_state_metaKeyEvents = state.metaKeyEvents) === null || _state_metaKeyEvents === void 0 || _state_metaKeyEvents.set(e.key, e.nativeEvent);
				} else if (e.key === "Meta") state.metaKeyEvents = /* @__PURE__ */ new Map();
			},
			onClick(e) {
				if (e && !$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e))) return;
				if (e && e.button === 0 && !state.isTriggeringEvent && !$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening) {
					let shouldStopPropagation = true;
					if (isDisabled) e.preventDefault();
					if (!state.ignoreEmulatedMouseEvents && !state.isPressed && (state.pointerType === "virtual" || $6a7db85432448f7f$export$60278871457622de(e.nativeEvent))) {
						let stopPressStart = triggerPressStart(e, "virtual");
						let stopPressUp = triggerPressUp(e, "virtual");
						let stopPressEnd = triggerPressEnd(e, "virtual");
						triggerClick(e);
						shouldStopPropagation = stopPressStart && stopPressUp && stopPressEnd;
					} else if (state.isPressed && state.pointerType !== "keyboard") {
						let pointerType = state.pointerType || e.nativeEvent.pointerType || "virtual";
						let stopPressUp = triggerPressUp($f6c31cce2adf654f$var$createEvent(e.currentTarget, e), pointerType);
						let stopPressEnd = triggerPressEnd($f6c31cce2adf654f$var$createEvent(e.currentTarget, e), pointerType, true);
						shouldStopPropagation = stopPressUp && stopPressEnd;
						state.isOverTarget = false;
						triggerClick(e);
						cancel(e);
					}
					state.ignoreEmulatedMouseEvents = false;
					if (shouldStopPropagation) e.stopPropagation();
				}
			}
		};
		if (typeof PointerEvent !== "undefined") {
			pressProps.onPointerDown = (e) => {
				if (e.button !== 0 || !$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e))) return;
				if ($6a7db85432448f7f$export$29bf1b5f2c56cf63(e.nativeEvent)) {
					state.pointerType = "virtual";
					return;
				}
				state.pointerType = e.pointerType;
				let shouldStopPropagation = true;
				if (!state.isPressed) {
					state.isPressed = true;
					setIsPointerPressed("pointer");
					state.isOverTarget = true;
					state.activePointerId = e.pointerId;
					state.target = e.currentTarget;
					if (!allowTextSelectionOnPress) $14c0b72509d70225$export$16a4697467175487(state.target);
					shouldStopPropagation = triggerPressStart(e, state.pointerType);
					let target = $d4ee10de306f2510$export$e58f029f0fbfdb29(e);
					if ("releasePointerCapture" in target) if ("hasPointerCapture" in target) {
						if (target.hasPointerCapture(e.pointerId)) target.releasePointerCapture(e.pointerId);
					} else target.releasePointerCapture(e.pointerId);
				}
				if (shouldStopPropagation) e.stopPropagation();
			};
			pressProps.onMouseDown = (e) => {
				if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e))) return;
				if (e.button === 0) {
					if (preventFocusOnPress) {
						let dispose = $8a9cb279dc87e130$export$cabe61c495ee3649(e.target);
						if (dispose) state.disposables.push(dispose);
					}
					e.stopPropagation();
				}
			};
			pressProps.onPointerUp = (e) => {
				if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e)) || state.pointerType === "virtual") return;
				if (e.button === 0 && !state.isPressed) triggerPressUp(e, state.pointerType || e.pointerType);
			};
			pressProps.onPointerEnter = (e) => {
				if (e.pointerId === state.activePointerId && state.target && !state.isOverTarget && state.pointerType != null) {
					state.isOverTarget = true;
					triggerPressStart($f6c31cce2adf654f$var$createEvent(state.target, e), state.pointerType);
				}
			};
			pressProps.onPointerLeave = (e) => {
				if (e.pointerId === state.activePointerId && state.target && state.isOverTarget && state.pointerType != null) {
					state.isOverTarget = false;
					triggerPressEnd($f6c31cce2adf654f$var$createEvent(state.target, e), state.pointerType, false);
					cancelOnPointerExit(e);
				}
			};
			pressProps.onDragStart = (e) => {
				if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e))) return;
				cancel(e);
			};
		}
		return pressProps;
	}, [
		isDisabled,
		preventFocusOnPress,
		removeAllGlobalListeners,
		allowTextSelectionOnPress,
		cancel,
		cancelOnPointerExit,
		triggerPressEnd,
		triggerPressStart,
		triggerPressUp,
		triggerClick,
		triggerSyntheticClick
	]);
	(0, import_react.useEffect)(() => {
		if (!domRef || false) return;
		const ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(domRef.current);
		if (!ownerDocument || !ownerDocument.head || ownerDocument.getElementById($f6c31cce2adf654f$var$STYLE_ID)) return;
		const style = ownerDocument.createElement("style");
		style.id = $f6c31cce2adf654f$var$STYLE_ID;
		style.textContent = `
@layer {
  [${$f6c31cce2adf654f$var$PRESSABLE_ATTRIBUTE}] {
    touch-action: pan-x pan-y pinch-zoom;
  }
}
    `.trim();
		ownerDocument.head.prepend(style);
	}, [domRef]);
	(0, import_react.useEffect)(() => {
		let state = ref.current;
		return () => {
			var _state_target;
			if (!allowTextSelectionOnPress) $14c0b72509d70225$export$b0d6fa1ab32e3295((_state_target = state.target) !== null && _state_target !== void 0 ? _state_target : void 0);
			for (let dispose of state.disposables) dispose();
			state.disposables = [];
		};
	}, [allowTextSelectionOnPress]);
	return {
		isPressed: isPressedProp || isPressed,
		pressProps: $3ef42575df84b30b$export$9d1611c77c2fe928(domProps, pressProps, { [$f6c31cce2adf654f$var$PRESSABLE_ATTRIBUTE]: true })
	};
}
function $f6c31cce2adf654f$var$isHTMLAnchorLink(target) {
	return target.tagName === "A" && target.hasAttribute("href");
}
function $f6c31cce2adf654f$var$isValidKeyboardEvent(event, currentTarget) {
	const { key, code } = event;
	const element = currentTarget;
	const role = element.getAttribute("role");
	return (key === "Enter" || key === " " || key === "Spacebar" || code === "Space") && !(element instanceof $431fbd86ca7dc216$export$f21a1ffae260145a(element).HTMLInputElement && !$f6c31cce2adf654f$var$isValidInputKey(element, key) || element instanceof $431fbd86ca7dc216$export$f21a1ffae260145a(element).HTMLTextAreaElement || element.isContentEditable) && !((role === "link" || !role && $f6c31cce2adf654f$var$isHTMLAnchorLink(element)) && key !== "Enter");
}
function $f6c31cce2adf654f$var$createEvent(target, e) {
	let clientX = e.clientX;
	let clientY = e.clientY;
	return {
		currentTarget: target,
		shiftKey: e.shiftKey,
		ctrlKey: e.ctrlKey,
		metaKey: e.metaKey,
		altKey: e.altKey,
		clientX,
		clientY,
		key: e.key
	};
}
function $f6c31cce2adf654f$var$shouldPreventDefaultUp(target) {
	if (target instanceof HTMLInputElement) return false;
	if (target instanceof HTMLButtonElement) return target.type !== "submit" && target.type !== "reset";
	if ($f6c31cce2adf654f$var$isHTMLAnchorLink(target)) return false;
	return true;
}
function $f6c31cce2adf654f$var$shouldPreventDefaultKeyboard(target, key) {
	if (target instanceof HTMLInputElement) return !$f6c31cce2adf654f$var$isValidInputKey(target, key);
	return $f6c31cce2adf654f$var$shouldPreventDefaultUp(target);
}
var $f6c31cce2adf654f$var$nonTextInputTypes = new Set([
	"checkbox",
	"radio",
	"range",
	"color",
	"file",
	"image",
	"button",
	"submit",
	"reset"
]);
function $f6c31cce2adf654f$var$isValidInputKey(target, key) {
	return target.type === "checkbox" || target.type === "radio" ? key === " " : $f6c31cce2adf654f$var$nonTextInputTypes.has(target.type);
}
//#endregion
//#region ../../node_modules/@react-aria/interactions/dist/useFocusVisible.mjs
var $507fabe10e71c6fb$var$currentModality = null;
var $507fabe10e71c6fb$export$901e90a13c50a14e = /* @__PURE__ */ new Set();
var $507fabe10e71c6fb$export$d90243b58daecda7 = /* @__PURE__ */ new Map();
var $507fabe10e71c6fb$var$hasEventBeforeFocus = false;
var $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;
var $507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS = {
	Tab: true,
	Escape: true
};
function $507fabe10e71c6fb$var$triggerChangeHandlers(modality, e) {
	for (let handler of $507fabe10e71c6fb$export$901e90a13c50a14e) handler(modality, e);
}
/**
* Helper function to determine if a KeyboardEvent is unmodified and could make keyboard focus styles visible.
*/ function $507fabe10e71c6fb$var$isValidKey(e) {
	return !(e.metaKey || !$c87311424ea30a05$export$9ac100e40613ea10() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
}
function $507fabe10e71c6fb$var$handleKeyboardEvent(e) {
	$507fabe10e71c6fb$var$hasEventBeforeFocus = true;
	if (!$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening && $507fabe10e71c6fb$var$isValidKey(e)) {
		$507fabe10e71c6fb$var$currentModality = "keyboard";
		$507fabe10e71c6fb$var$triggerChangeHandlers("keyboard", e);
	}
}
function $507fabe10e71c6fb$var$handlePointerEvent(e) {
	$507fabe10e71c6fb$var$currentModality = "pointer";
	"pointerType" in e && e.pointerType;
	if (e.type === "mousedown" || e.type === "pointerdown") {
		$507fabe10e71c6fb$var$hasEventBeforeFocus = true;
		$507fabe10e71c6fb$var$triggerChangeHandlers("pointer", e);
	}
}
function $507fabe10e71c6fb$var$handleClickEvent(e) {
	if (!$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening && $6a7db85432448f7f$export$60278871457622de(e)) {
		$507fabe10e71c6fb$var$hasEventBeforeFocus = true;
		$507fabe10e71c6fb$var$currentModality = "virtual";
	}
}
function $507fabe10e71c6fb$var$handleFocusEvent(e) {
	if ($d4ee10de306f2510$export$e58f029f0fbfdb29(e) === window || $d4ee10de306f2510$export$e58f029f0fbfdb29(e) === document || $8a9cb279dc87e130$export$fda7da73ab5d4c48 || !e.isTrusted) return;
	if (!$507fabe10e71c6fb$var$hasEventBeforeFocus && !$507fabe10e71c6fb$var$hasBlurredWindowRecently) {
		$507fabe10e71c6fb$var$currentModality = "virtual";
		$507fabe10e71c6fb$var$triggerChangeHandlers("virtual", e);
	}
	$507fabe10e71c6fb$var$hasEventBeforeFocus = false;
	$507fabe10e71c6fb$var$hasBlurredWindowRecently = false;
}
function $507fabe10e71c6fb$var$handleWindowBlur() {
	if ($8a9cb279dc87e130$export$fda7da73ab5d4c48) return;
	$507fabe10e71c6fb$var$hasEventBeforeFocus = false;
	$507fabe10e71c6fb$var$hasBlurredWindowRecently = true;
}
/**
* Setup global event listeners to control when keyboard focus style should be visible.
*/ function $507fabe10e71c6fb$var$setupGlobalFocusEvents(element) {
	if (typeof window === "undefined" || typeof document === "undefined" || $507fabe10e71c6fb$export$d90243b58daecda7.get($431fbd86ca7dc216$export$f21a1ffae260145a(element))) return;
	const windowObject = $431fbd86ca7dc216$export$f21a1ffae260145a(element);
	const documentObject = $431fbd86ca7dc216$export$b204af158042fbac(element);
	let focus = windowObject.HTMLElement.prototype.focus;
	windowObject.HTMLElement.prototype.focus = function() {
		$507fabe10e71c6fb$var$hasEventBeforeFocus = true;
		focus.apply(this, arguments);
	};
	documentObject.addEventListener("keydown", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
	documentObject.addEventListener("keyup", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
	documentObject.addEventListener("click", $507fabe10e71c6fb$var$handleClickEvent, true);
	windowObject.addEventListener("focus", $507fabe10e71c6fb$var$handleFocusEvent, true);
	windowObject.addEventListener("blur", $507fabe10e71c6fb$var$handleWindowBlur, false);
	if (typeof PointerEvent !== "undefined") {
		documentObject.addEventListener("pointerdown", $507fabe10e71c6fb$var$handlePointerEvent, true);
		documentObject.addEventListener("pointermove", $507fabe10e71c6fb$var$handlePointerEvent, true);
		documentObject.addEventListener("pointerup", $507fabe10e71c6fb$var$handlePointerEvent, true);
	}
	windowObject.addEventListener("beforeunload", () => {
		$507fabe10e71c6fb$var$tearDownWindowFocusTracking(element);
	}, { once: true });
	$507fabe10e71c6fb$export$d90243b58daecda7.set(windowObject, { focus });
}
var $507fabe10e71c6fb$var$tearDownWindowFocusTracking = (element, loadListener) => {
	const windowObject = $431fbd86ca7dc216$export$f21a1ffae260145a(element);
	const documentObject = $431fbd86ca7dc216$export$b204af158042fbac(element);
	if (loadListener) documentObject.removeEventListener("DOMContentLoaded", loadListener);
	if (!$507fabe10e71c6fb$export$d90243b58daecda7.has(windowObject)) return;
	windowObject.HTMLElement.prototype.focus = $507fabe10e71c6fb$export$d90243b58daecda7.get(windowObject).focus;
	documentObject.removeEventListener("keydown", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
	documentObject.removeEventListener("keyup", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
	documentObject.removeEventListener("click", $507fabe10e71c6fb$var$handleClickEvent, true);
	windowObject.removeEventListener("focus", $507fabe10e71c6fb$var$handleFocusEvent, true);
	windowObject.removeEventListener("blur", $507fabe10e71c6fb$var$handleWindowBlur, false);
	if (typeof PointerEvent !== "undefined") {
		documentObject.removeEventListener("pointerdown", $507fabe10e71c6fb$var$handlePointerEvent, true);
		documentObject.removeEventListener("pointermove", $507fabe10e71c6fb$var$handlePointerEvent, true);
		documentObject.removeEventListener("pointerup", $507fabe10e71c6fb$var$handlePointerEvent, true);
	}
	$507fabe10e71c6fb$export$d90243b58daecda7.delete(windowObject);
};
function $507fabe10e71c6fb$export$2f1888112f558a7d(element) {
	const documentObject = $431fbd86ca7dc216$export$b204af158042fbac(element);
	let loadListener;
	if (documentObject.readyState !== "loading") $507fabe10e71c6fb$var$setupGlobalFocusEvents(element);
	else {
		loadListener = () => {
			$507fabe10e71c6fb$var$setupGlobalFocusEvents(element);
		};
		documentObject.addEventListener("DOMContentLoaded", loadListener);
	}
	return () => $507fabe10e71c6fb$var$tearDownWindowFocusTracking(element, loadListener);
}
if (typeof document !== "undefined") $507fabe10e71c6fb$export$2f1888112f558a7d();
function $507fabe10e71c6fb$export$b9b3dfddab17db27() {
	return $507fabe10e71c6fb$var$currentModality !== "pointer";
}
function $507fabe10e71c6fb$export$630ff653c5ada6a9() {
	return $507fabe10e71c6fb$var$currentModality;
}
function $507fabe10e71c6fb$export$8397ddfc504fdb9a(modality) {
	$507fabe10e71c6fb$var$currentModality = modality;
	$507fabe10e71c6fb$var$triggerChangeHandlers(modality, null);
}
function $507fabe10e71c6fb$export$98e20ec92f614cfe() {
	$507fabe10e71c6fb$var$setupGlobalFocusEvents();
	let [modality, setModality] = (0, import_react.useState)($507fabe10e71c6fb$var$currentModality);
	(0, import_react.useEffect)(() => {
		let handler = () => {
			setModality($507fabe10e71c6fb$var$currentModality);
		};
		$507fabe10e71c6fb$export$901e90a13c50a14e.add(handler);
		return () => {
			$507fabe10e71c6fb$export$901e90a13c50a14e.delete(handler);
		};
	}, []);
	return $b5e257d569688ac6$export$535bd6ca7f90a273() ? null : modality;
}
var $507fabe10e71c6fb$var$nonTextInputTypes = new Set([
	"checkbox",
	"radio",
	"range",
	"color",
	"file",
	"image",
	"button",
	"submit",
	"reset"
]);
/**
* If this is attached to text input component, return if the event is a focus event (Tab/Escape keys pressed) so that
* focus visible style can be properly set.
*/ function $507fabe10e71c6fb$var$isKeyboardFocusEvent(isTextInput, modality, e) {
	let document1 = $431fbd86ca7dc216$export$b204af158042fbac(e ? $d4ee10de306f2510$export$e58f029f0fbfdb29(e) : void 0);
	let eventTarget = e ? $d4ee10de306f2510$export$e58f029f0fbfdb29(e) : void 0;
	const IHTMLInputElement = typeof window !== "undefined" ? $431fbd86ca7dc216$export$f21a1ffae260145a(eventTarget).HTMLInputElement : HTMLInputElement;
	const IHTMLTextAreaElement = typeof window !== "undefined" ? $431fbd86ca7dc216$export$f21a1ffae260145a(eventTarget).HTMLTextAreaElement : HTMLTextAreaElement;
	const IHTMLElement = typeof window !== "undefined" ? $431fbd86ca7dc216$export$f21a1ffae260145a(eventTarget).HTMLElement : HTMLElement;
	const IKeyboardEvent = typeof window !== "undefined" ? $431fbd86ca7dc216$export$f21a1ffae260145a(eventTarget).KeyboardEvent : KeyboardEvent;
	let activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576(document1);
	isTextInput = isTextInput || activeElement instanceof IHTMLInputElement && !$507fabe10e71c6fb$var$nonTextInputTypes.has(activeElement.type) || activeElement instanceof IHTMLTextAreaElement || activeElement instanceof IHTMLElement && activeElement.isContentEditable;
	return !(isTextInput && modality === "keyboard" && e instanceof IKeyboardEvent && !$507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS[e.key]);
}
function $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn, deps, opts) {
	$507fabe10e71c6fb$var$setupGlobalFocusEvents();
	(0, import_react.useEffect)(() => {
		if ((opts === null || opts === void 0 ? void 0 : opts.enabled) === false) return;
		let handler = (modality, e) => {
			if (!$507fabe10e71c6fb$var$isKeyboardFocusEvent(!!(opts === null || opts === void 0 ? void 0 : opts.isTextInput), modality, e)) return;
			fn($507fabe10e71c6fb$export$b9b3dfddab17db27());
		};
		$507fabe10e71c6fb$export$901e90a13c50a14e.add(handler);
		return () => {
			$507fabe10e71c6fb$export$901e90a13c50a14e.delete(handler);
		};
	}, deps);
}
//#endregion
//#region ../../node_modules/@react-aria/interactions/dist/focusSafely.mjs
function $3ad3f6e1647bc98d$export$80f3e147d781571c(element) {
	if (!element.isConnected) return;
	const ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(element);
	if ($507fabe10e71c6fb$export$630ff653c5ada6a9() === "virtual") {
		let lastFocusedElement = $d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument);
		$bbed8b41f857bcc0$export$24490316f764c430(() => {
			const activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument);
			if ((activeElement === lastFocusedElement || activeElement === ownerDocument.body) && element.isConnected) $7215afc6de606d6b$export$de79e2c695e052f3(element);
		});
	} else $7215afc6de606d6b$export$de79e2c695e052f3(element);
}
//#endregion
//#region ../../node_modules/@react-aria/interactions/dist/useFocus.mjs
function $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {
	let { isDisabled, onFocus: onFocusProp, onBlur: onBlurProp, onFocusChange } = props;
	const onBlur = (0, import_react.useCallback)((e) => {
		if ($d4ee10de306f2510$export$e58f029f0fbfdb29(e) === e.currentTarget) {
			if (onBlurProp) onBlurProp(e);
			if (onFocusChange) onFocusChange(false);
			return true;
		}
	}, [onBlurProp, onFocusChange]);
	const onSyntheticFocus = $8a9cb279dc87e130$export$715c682d09d639cc(onBlur);
	const onFocus = (0, import_react.useCallback)((e) => {
		let eventTarget = $d4ee10de306f2510$export$e58f029f0fbfdb29(e);
		const ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(eventTarget);
		const activeElement = ownerDocument ? $d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument) : $d4ee10de306f2510$export$cd4e5573fbe2b576();
		if (eventTarget === e.currentTarget && eventTarget === activeElement) {
			if (onFocusProp) onFocusProp(e);
			if (onFocusChange) onFocusChange(true);
			onSyntheticFocus(e);
		}
	}, [
		onFocusChange,
		onFocusProp,
		onSyntheticFocus
	]);
	return { focusProps: {
		onFocus: !isDisabled && (onFocusProp || onFocusChange || onBlurProp) ? onFocus : void 0,
		onBlur: !isDisabled && (onBlurProp || onFocusChange) ? onBlur : void 0
	} };
}
//#endregion
//#region ../../node_modules/@react-aria/interactions/dist/createEventHandler.mjs
function $93925083ecbb358c$export$48d1ea6320830260(handler) {
	if (!handler) return void 0;
	let shouldStopPropagation = true;
	return (e) => {
		handler({
			...e,
			preventDefault() {
				e.preventDefault();
			},
			isDefaultPrevented() {
				return e.isDefaultPrevented();
			},
			stopPropagation() {
				shouldStopPropagation = true;
			},
			continuePropagation() {
				shouldStopPropagation = false;
			},
			isPropagationStopped() {
				return shouldStopPropagation;
			}
		});
		if (shouldStopPropagation) e.stopPropagation();
	};
}
//#endregion
//#region ../../node_modules/@react-aria/interactions/dist/useKeyboard.mjs
function $46d819fcbaf35654$export$8f71654801c2f7cd(props) {
	return { keyboardProps: props.isDisabled ? {} : {
		onKeyDown: $93925083ecbb358c$export$48d1ea6320830260(props.onKeyDown),
		onKeyUp: $93925083ecbb358c$export$48d1ea6320830260(props.onKeyUp)
	} };
}
//#endregion
//#region ../../node_modules/@react-aria/interactions/dist/useFocusable.mjs
var $f645667febf57a63$export$f9762fab77588ecb = /* @__PURE__ */ import_react.createContext(null);
function $f645667febf57a63$var$useFocusableContext(ref) {
	let context = (0, import_react.useContext)($f645667febf57a63$export$f9762fab77588ecb) || {};
	$e7801be82b4b2a53$export$4debdb1a3f0fa79e(context, ref);
	let { ref: _, ...otherProps } = context;
	return otherProps;
}
var $f645667febf57a63$export$13f3202a3e5ddd5 = /* @__PURE__ */ import_react.forwardRef(function FocusableProvider(props, ref) {
	let { children, ...otherProps } = props;
	let objRef = $df56164dff5785e2$export$4338b53315abf666(ref);
	let context = {
		...otherProps,
		ref: objRef
	};
	return /* @__PURE__ */ import_react.createElement($f645667febf57a63$export$f9762fab77588ecb.Provider, { value: context }, children);
});
function $f645667febf57a63$export$4c014de7c8940b4c(props, domRef) {
	let { focusProps } = $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props);
	let { keyboardProps } = $46d819fcbaf35654$export$8f71654801c2f7cd(props);
	let interactions = $3ef42575df84b30b$export$9d1611c77c2fe928(focusProps, keyboardProps);
	let domProps = $f645667febf57a63$var$useFocusableContext(domRef);
	let interactionProps = props.isDisabled ? {} : domProps;
	let autoFocusRef = (0, import_react.useRef)(props.autoFocus);
	(0, import_react.useEffect)(() => {
		if (autoFocusRef.current && domRef.current) $3ad3f6e1647bc98d$export$80f3e147d781571c(domRef.current);
		autoFocusRef.current = false;
	}, [domRef]);
	let tabIndex = props.excludeFromTabOrder ? -1 : 0;
	if (props.isDisabled) tabIndex = void 0;
	return { focusableProps: $3ef42575df84b30b$export$9d1611c77c2fe928({
		...interactions,
		tabIndex
	}, interactionProps) };
}
//#endregion
//#region ../../node_modules/@react-aria/interactions/dist/PressResponder.mjs
var $f1ab8c75478c6f73$export$3351871ee4b288b8 = /* @__PURE__ */ import_react.forwardRef(({ children, ...props }, ref) => {
	let isRegistered = (0, import_react.useRef)(false);
	let prevContext = (0, import_react.useContext)($ae1eeba8b9eafd08$export$5165eccb35aaadb5);
	let context = $3ef42575df84b30b$export$9d1611c77c2fe928(prevContext || {}, {
		...props,
		register() {
			isRegistered.current = true;
			if (prevContext) prevContext.register();
		}
	});
	context.ref = $df56164dff5785e2$export$4338b53315abf666(ref || (prevContext === null || prevContext === void 0 ? void 0 : prevContext.ref));
	$e7801be82b4b2a53$export$4debdb1a3f0fa79e(prevContext, context.ref);
	(0, import_react.useEffect)(() => {
		if (!isRegistered.current) isRegistered.current = true;
	}, []);
	return /* @__PURE__ */ import_react.createElement($ae1eeba8b9eafd08$export$5165eccb35aaadb5.Provider, { value: context }, children);
});
function $f1ab8c75478c6f73$export$cf75428e0b9ed1ea({ children }) {
	let context = (0, import_react.useMemo)(() => ({ register: () => {} }), []);
	return /* @__PURE__ */ import_react.createElement($ae1eeba8b9eafd08$export$5165eccb35aaadb5.Provider, { value: context }, children);
}
//#endregion
//#region ../../node_modules/@react-aria/interactions/dist/useFocusWithin.mjs
function $9ab94262bd0047c7$export$420e68273165f4ec(props) {
	let { isDisabled, onBlurWithin, onFocusWithin, onFocusWithinChange } = props;
	let state = (0, import_react.useRef)({ isFocusWithin: false });
	let { addGlobalListener, removeAllGlobalListeners } = $03deb23ff14920c4$export$4eaf04e54aa8eed6();
	let onBlur = (0, import_react.useCallback)((e) => {
		if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e))) return;
		if (state.current.isFocusWithin && !$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, e.relatedTarget)) {
			state.current.isFocusWithin = false;
			removeAllGlobalListeners();
			if (onBlurWithin) onBlurWithin(e);
			if (onFocusWithinChange) onFocusWithinChange(false);
		}
	}, [
		onBlurWithin,
		onFocusWithinChange,
		state,
		removeAllGlobalListeners
	]);
	let onSyntheticFocus = $8a9cb279dc87e130$export$715c682d09d639cc(onBlur);
	let onFocus = (0, import_react.useCallback)((e) => {
		if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e))) return;
		let eventTarget = $d4ee10de306f2510$export$e58f029f0fbfdb29(e);
		const ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(eventTarget);
		const activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument);
		if (!state.current.isFocusWithin && activeElement === eventTarget) {
			if (onFocusWithin) onFocusWithin(e);
			if (onFocusWithinChange) onFocusWithinChange(true);
			state.current.isFocusWithin = true;
			onSyntheticFocus(e);
			let currentTarget = e.currentTarget;
			addGlobalListener(ownerDocument, "focus", (e) => {
				let eventTarget = $d4ee10de306f2510$export$e58f029f0fbfdb29(e);
				if (state.current.isFocusWithin && !$d4ee10de306f2510$export$4282f70798064fe0(currentTarget, eventTarget)) {
					let nativeEvent = new ownerDocument.defaultView.FocusEvent("blur", { relatedTarget: eventTarget });
					$8a9cb279dc87e130$export$c2b7abe5d61ec696(nativeEvent, currentTarget);
					onBlur($8a9cb279dc87e130$export$525bc4921d56d4a(nativeEvent));
				}
			}, { capture: true });
		}
	}, [
		onFocusWithin,
		onFocusWithinChange,
		onSyntheticFocus,
		addGlobalListener,
		onBlur
	]);
	if (isDisabled) return { focusWithinProps: {
		onFocus: void 0,
		onBlur: void 0
	} };
	return { focusWithinProps: {
		onFocus,
		onBlur
	} };
}
//#endregion
//#region ../../node_modules/@react-aria/interactions/dist/useHover.mjs
var $6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents = false;
var $6179b936705e76d3$var$hoverCount = 0;
function $6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents() {
	$6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents = true;
	setTimeout(() => {
		$6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents = false;
	}, 50);
}
function $6179b936705e76d3$var$handleGlobalPointerEvent(e) {
	if (e.pointerType === "touch") $6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents();
}
function $6179b936705e76d3$var$setupGlobalTouchEvents() {
	if (typeof document === "undefined") return;
	if ($6179b936705e76d3$var$hoverCount === 0) {
		if (typeof PointerEvent !== "undefined") document.addEventListener("pointerup", $6179b936705e76d3$var$handleGlobalPointerEvent);
	}
	$6179b936705e76d3$var$hoverCount++;
	return () => {
		$6179b936705e76d3$var$hoverCount--;
		if ($6179b936705e76d3$var$hoverCount > 0) return;
		if (typeof PointerEvent !== "undefined") document.removeEventListener("pointerup", $6179b936705e76d3$var$handleGlobalPointerEvent);
	};
}
function $6179b936705e76d3$export$ae780daf29e6d456(props) {
	let { onHoverStart, onHoverChange, onHoverEnd, isDisabled } = props;
	let [isHovered, setHovered] = (0, import_react.useState)(false);
	let state = (0, import_react.useRef)({
		isHovered: false,
		ignoreEmulatedMouseEvents: false,
		pointerType: "",
		target: null
	}).current;
	(0, import_react.useEffect)($6179b936705e76d3$var$setupGlobalTouchEvents, []);
	let { addGlobalListener, removeAllGlobalListeners } = $03deb23ff14920c4$export$4eaf04e54aa8eed6();
	let { hoverProps, triggerHoverEnd } = (0, import_react.useMemo)(() => {
		let triggerHoverStart = (event, pointerType) => {
			state.pointerType = pointerType;
			if (isDisabled || pointerType === "touch" || state.isHovered || !$d4ee10de306f2510$export$4282f70798064fe0(event.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(event))) return;
			state.isHovered = true;
			let target = event.currentTarget;
			state.target = target;
			addGlobalListener($431fbd86ca7dc216$export$b204af158042fbac($d4ee10de306f2510$export$e58f029f0fbfdb29(event)), "pointerover", (e) => {
				if (state.isHovered && state.target && !$d4ee10de306f2510$export$4282f70798064fe0(state.target, $d4ee10de306f2510$export$e58f029f0fbfdb29(e))) triggerHoverEnd(e, e.pointerType);
			}, { capture: true });
			if (onHoverStart) onHoverStart({
				type: "hoverstart",
				target,
				pointerType
			});
			if (onHoverChange) onHoverChange(true);
			setHovered(true);
		};
		let triggerHoverEnd = (event, pointerType) => {
			let target = state.target;
			state.pointerType = "";
			state.target = null;
			if (pointerType === "touch" || !state.isHovered || !target) return;
			state.isHovered = false;
			removeAllGlobalListeners();
			if (onHoverEnd) onHoverEnd({
				type: "hoverend",
				target,
				pointerType
			});
			if (onHoverChange) onHoverChange(false);
			setHovered(false);
		};
		let hoverProps = {};
		if (typeof PointerEvent !== "undefined") {
			hoverProps.onPointerEnter = (e) => {
				if ($6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents && e.pointerType === "mouse") return;
				triggerHoverStart(e, e.pointerType);
			};
			hoverProps.onPointerLeave = (e) => {
				if (!isDisabled && $d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e))) triggerHoverEnd(e, e.pointerType);
			};
		}
		return {
			hoverProps,
			triggerHoverEnd
		};
	}, [
		onHoverStart,
		onHoverChange,
		onHoverEnd,
		isDisabled,
		state,
		addGlobalListener,
		removeAllGlobalListeners
	]);
	(0, import_react.useEffect)(() => {
		if (isDisabled) triggerHoverEnd({ currentTarget: state.target }, state.pointerType);
	}, [isDisabled]);
	return {
		hoverProps,
		isHovered
	};
}
//#endregion
//#region ../../node_modules/@react-aria/interactions/dist/useInteractOutside.mjs
function $e0b6e0b68ec7f50f$export$872b660ac5a1ff98(props) {
	let { ref, onInteractOutside, isDisabled, onInteractOutsideStart } = props;
	let stateRef = (0, import_react.useRef)({
		isPointerDown: false,
		ignoreEmulatedMouseEvents: false
	});
	let onPointerDown = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
		if (onInteractOutside && $e0b6e0b68ec7f50f$var$isValidEvent(e, ref)) {
			if (onInteractOutsideStart) onInteractOutsideStart(e);
			stateRef.current.isPointerDown = true;
		}
	});
	let triggerInteractOutside = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
		if (onInteractOutside) onInteractOutside(e);
	});
	(0, import_react.useEffect)(() => {
		let state = stateRef.current;
		if (isDisabled) return;
		const element = ref.current;
		const documentObject = $431fbd86ca7dc216$export$b204af158042fbac(element);
		if (typeof PointerEvent !== "undefined") {
			let onClick = (e) => {
				if (state.isPointerDown && $e0b6e0b68ec7f50f$var$isValidEvent(e, ref)) triggerInteractOutside(e);
				state.isPointerDown = false;
			};
			documentObject.addEventListener("pointerdown", onPointerDown, true);
			documentObject.addEventListener("click", onClick, true);
			return () => {
				documentObject.removeEventListener("pointerdown", onPointerDown, true);
				documentObject.removeEventListener("click", onClick, true);
			};
		}
	}, [ref, isDisabled]);
}
function $e0b6e0b68ec7f50f$var$isValidEvent(event, ref) {
	if (event.button > 0) return false;
	let target = $d4ee10de306f2510$export$e58f029f0fbfdb29(event);
	if (target) {
		const ownerDocument = target.ownerDocument;
		if (!ownerDocument || !$d4ee10de306f2510$export$4282f70798064fe0(ownerDocument.documentElement, target)) return false;
		if (target.closest("[data-react-aria-top-layer]")) return false;
	}
	if (!ref.current) return false;
	return !event.composedPath().includes(ref.current);
}
//#endregion
//#region ../../node_modules/@react-aria/interactions/dist/useLongPress.mjs
var $8a26561d2877236e$var$DEFAULT_THRESHOLD = 500;
function $8a26561d2877236e$export$c24ed0104d07eab9(props) {
	let { isDisabled, onLongPressStart, onLongPressEnd, onLongPress, threshold = $8a26561d2877236e$var$DEFAULT_THRESHOLD, accessibilityDescription } = props;
	const timeRef = (0, import_react.useRef)(void 0);
	let { addGlobalListener, removeGlobalListener } = $03deb23ff14920c4$export$4eaf04e54aa8eed6();
	let { pressProps } = $f6c31cce2adf654f$export$45712eceda6fad21({
		isDisabled,
		onPressStart(e) {
			e.continuePropagation();
			if (e.pointerType === "mouse" || e.pointerType === "touch") {
				if (onLongPressStart) onLongPressStart({
					...e,
					type: "longpressstart"
				});
				timeRef.current = setTimeout(() => {
					e.target.dispatchEvent(new PointerEvent("pointercancel", { bubbles: true }));
					if ($431fbd86ca7dc216$export$b204af158042fbac(e.target).activeElement !== e.target) $7215afc6de606d6b$export$de79e2c695e052f3(e.target);
					if (onLongPress) onLongPress({
						...e,
						type: "longpress"
					});
					timeRef.current = void 0;
				}, threshold);
				if (e.pointerType === "touch") {
					let onContextMenu = (e) => {
						e.preventDefault();
					};
					addGlobalListener(e.target, "contextmenu", onContextMenu, { once: true });
					addGlobalListener(window, "pointerup", () => {
						setTimeout(() => {
							removeGlobalListener(e.target, "contextmenu", onContextMenu);
						}, 30);
					}, { once: true });
				}
			}
		},
		onPressEnd(e) {
			if (timeRef.current) clearTimeout(timeRef.current);
			if (onLongPressEnd && (e.pointerType === "mouse" || e.pointerType === "touch")) onLongPressEnd({
				...e,
				type: "longpressend"
			});
		}
	});
	return { longPressProps: $3ef42575df84b30b$export$9d1611c77c2fe928(pressProps, $ef06256079686ba0$export$f8aeda7b10753fa1(onLongPress && !isDisabled ? accessibilityDescription : void 0)) };
}
//#endregion
//#region ../../node_modules/@react-aria/focus/dist/FocusScope.mjs
var $9bf71ea28793e738$var$FocusContext = /* @__PURE__ */ import_react.createContext(null);
var $9bf71ea28793e738$var$RESTORE_FOCUS_EVENT = "react-aria-focus-scope-restore";
var $9bf71ea28793e738$var$activeScope = null;
function $9bf71ea28793e738$export$20e40289641fbbb6(props) {
	let { children, contain, restoreFocus, autoFocus } = props;
	let startRef = (0, import_react.useRef)(null);
	let endRef = (0, import_react.useRef)(null);
	let scopeRef = (0, import_react.useRef)([]);
	let { parentNode } = (0, import_react.useContext)($9bf71ea28793e738$var$FocusContext) || {};
	let node = (0, import_react.useMemo)(() => new $9bf71ea28793e738$var$TreeNode({ scopeRef }), [scopeRef]);
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		let parent = parentNode || $9bf71ea28793e738$export$d06fae2ee68b101e.root;
		if ($9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(parent.scopeRef) && $9bf71ea28793e738$var$activeScope && !$9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope, parent.scopeRef)) {
			let activeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);
			if (activeNode) parent = activeNode;
		}
		parent.addChild(node);
		$9bf71ea28793e738$export$d06fae2ee68b101e.addNode(node);
	}, [node, parentNode]);
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		let node = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);
		if (node) node.contain = !!contain;
	}, [contain]);
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		var _startRef_current;
		let node = (_startRef_current = startRef.current) === null || _startRef_current === void 0 ? void 0 : _startRef_current.nextSibling;
		let nodes = [];
		let stopPropagation = (e) => e.stopPropagation();
		while (node && node !== endRef.current) {
			nodes.push(node);
			node.addEventListener($9bf71ea28793e738$var$RESTORE_FOCUS_EVENT, stopPropagation);
			node = node.nextSibling;
		}
		scopeRef.current = nodes;
		return () => {
			for (let node of nodes) node.removeEventListener($9bf71ea28793e738$var$RESTORE_FOCUS_EVENT, stopPropagation);
		};
	}, [children]);
	$9bf71ea28793e738$var$useActiveScopeTracker(scopeRef, restoreFocus, contain);
	$9bf71ea28793e738$var$useFocusContainment(scopeRef, contain);
	$9bf71ea28793e738$var$useRestoreFocus(scopeRef, restoreFocus, contain);
	$9bf71ea28793e738$var$useAutoFocus(scopeRef, autoFocus);
	(0, import_react.useEffect)(() => {
		const activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576($431fbd86ca7dc216$export$b204af158042fbac(scopeRef.current ? scopeRef.current[0] : void 0));
		let scope = null;
		if ($9bf71ea28793e738$var$isElementInScope(activeElement, scopeRef.current)) {
			for (let node of $9bf71ea28793e738$export$d06fae2ee68b101e.traverse()) if (node.scopeRef && $9bf71ea28793e738$var$isElementInScope(activeElement, node.scopeRef.current)) scope = node;
			if (scope === $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef)) $9bf71ea28793e738$var$activeScope = scope.scopeRef;
		}
	}, [scopeRef]);
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		return () => {
			var _focusScopeTree_getTreeNode_parent, _focusScopeTree_getTreeNode;
			var _focusScopeTree_getTreeNode_parent_scopeRef;
			let parentScope = (_focusScopeTree_getTreeNode_parent_scopeRef = (_focusScopeTree_getTreeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef)) === null || _focusScopeTree_getTreeNode === void 0 ? void 0 : (_focusScopeTree_getTreeNode_parent = _focusScopeTree_getTreeNode.parent) === null || _focusScopeTree_getTreeNode_parent === void 0 ? void 0 : _focusScopeTree_getTreeNode_parent.scopeRef) !== null && _focusScopeTree_getTreeNode_parent_scopeRef !== void 0 ? _focusScopeTree_getTreeNode_parent_scopeRef : null;
			if ((scopeRef === $9bf71ea28793e738$var$activeScope || $9bf71ea28793e738$var$isAncestorScope(scopeRef, $9bf71ea28793e738$var$activeScope)) && (!parentScope || $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(parentScope))) $9bf71ea28793e738$var$activeScope = parentScope;
			$9bf71ea28793e738$export$d06fae2ee68b101e.removeTreeNode(scopeRef);
		};
	}, [scopeRef]);
	let focusManager = (0, import_react.useMemo)(() => $9bf71ea28793e738$var$createFocusManagerForScope(scopeRef), []);
	let value = (0, import_react.useMemo)(() => ({
		focusManager,
		parentNode: node
	}), [node, focusManager]);
	return /* @__PURE__ */ import_react.createElement($9bf71ea28793e738$var$FocusContext.Provider, { value }, /* @__PURE__ */ import_react.createElement("span", {
		"data-focus-scope-start": true,
		hidden: true,
		ref: startRef
	}), children, /* @__PURE__ */ import_react.createElement("span", {
		"data-focus-scope-end": true,
		hidden: true,
		ref: endRef
	}));
}
function $9bf71ea28793e738$var$createFocusManagerForScope(scopeRef) {
	return {
		focusNext(opts = {}) {
			let scope = scopeRef.current;
			let { from, tabbable, wrap, accept } = opts;
			var _scope_;
			let node = from || $d4ee10de306f2510$export$cd4e5573fbe2b576($431fbd86ca7dc216$export$b204af158042fbac((_scope_ = scope[0]) !== null && _scope_ !== void 0 ? _scope_ : void 0));
			let sentinel = scope[0].previousElementSibling;
			let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa($9bf71ea28793e738$var$getScopeRoot(scope), {
				tabbable,
				accept
			}, scope);
			walker.currentNode = $9bf71ea28793e738$var$isElementInScope(node, scope) ? node : sentinel;
			let nextNode = walker.nextNode();
			if (!nextNode && wrap) {
				walker.currentNode = sentinel;
				nextNode = walker.nextNode();
			}
			if (nextNode) $9bf71ea28793e738$var$focusElement(nextNode, true);
			return nextNode;
		},
		focusPrevious(opts = {}) {
			let scope = scopeRef.current;
			let { from, tabbable, wrap, accept } = opts;
			var _scope_;
			let node = from || $d4ee10de306f2510$export$cd4e5573fbe2b576($431fbd86ca7dc216$export$b204af158042fbac((_scope_ = scope[0]) !== null && _scope_ !== void 0 ? _scope_ : void 0));
			let sentinel = scope[scope.length - 1].nextElementSibling;
			let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa($9bf71ea28793e738$var$getScopeRoot(scope), {
				tabbable,
				accept
			}, scope);
			walker.currentNode = $9bf71ea28793e738$var$isElementInScope(node, scope) ? node : sentinel;
			let previousNode = walker.previousNode();
			if (!previousNode && wrap) {
				walker.currentNode = sentinel;
				previousNode = walker.previousNode();
			}
			if (previousNode) $9bf71ea28793e738$var$focusElement(previousNode, true);
			return previousNode;
		},
		focusFirst(opts = {}) {
			let scope = scopeRef.current;
			let { tabbable, accept } = opts;
			let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa($9bf71ea28793e738$var$getScopeRoot(scope), {
				tabbable,
				accept
			}, scope);
			walker.currentNode = scope[0].previousElementSibling;
			let nextNode = walker.nextNode();
			if (nextNode) $9bf71ea28793e738$var$focusElement(nextNode, true);
			return nextNode;
		},
		focusLast(opts = {}) {
			let scope = scopeRef.current;
			let { tabbable, accept } = opts;
			let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa($9bf71ea28793e738$var$getScopeRoot(scope), {
				tabbable,
				accept
			}, scope);
			walker.currentNode = scope[scope.length - 1].nextElementSibling;
			let previousNode = walker.previousNode();
			if (previousNode) $9bf71ea28793e738$var$focusElement(previousNode, true);
			return previousNode;
		}
	};
}
function $9bf71ea28793e738$var$getScopeRoot(scope) {
	return scope[0].parentElement;
}
function $9bf71ea28793e738$var$shouldContainFocus(scopeRef) {
	let scope = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);
	while (scope && scope.scopeRef !== scopeRef) {
		if (scope.contain) return false;
		scope = scope.parent;
	}
	return true;
}
function $9bf71ea28793e738$var$getRadiosInGroup(element) {
	if (!element.form) return Array.from($431fbd86ca7dc216$export$b204af158042fbac(element).querySelectorAll(`input[type="radio"][name="${CSS.escape(element.name)}"]`)).filter((radio) => !radio.form);
	const radioList = element.form.elements.namedItem(element.name);
	let ownerWindow = $431fbd86ca7dc216$export$f21a1ffae260145a(element);
	if (radioList instanceof ownerWindow.RadioNodeList) return Array.from(radioList).filter((el) => el instanceof ownerWindow.HTMLInputElement);
	if (radioList instanceof ownerWindow.HTMLInputElement) return [radioList];
	return [];
}
function $9bf71ea28793e738$var$isTabbableRadio(element) {
	if (element.checked) return true;
	const radios = $9bf71ea28793e738$var$getRadiosInGroup(element);
	return radios.length > 0 && !radios.some((radio) => radio.checked);
}
function $9bf71ea28793e738$var$useFocusContainment(scopeRef, contain) {
	let focusedNode = (0, import_react.useRef)(void 0);
	let raf = (0, import_react.useRef)(void 0);
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		let scope = scopeRef.current;
		if (!contain) {
			if (raf.current) {
				cancelAnimationFrame(raf.current);
				raf.current = void 0;
			}
			return;
		}
		const ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(scope ? scope[0] : void 0);
		let onKeyDown = (e) => {
			if (e.key !== "Tab" || e.altKey || e.ctrlKey || e.metaKey || !$9bf71ea28793e738$var$shouldContainFocus(scopeRef) || e.isComposing) return;
			let focusedElement = $d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument);
			let scope = scopeRef.current;
			if (!scope || !$9bf71ea28793e738$var$isElementInScope(focusedElement, scope)) return;
			let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa($9bf71ea28793e738$var$getScopeRoot(scope), { tabbable: true }, scope);
			if (!focusedElement) return;
			walker.currentNode = focusedElement;
			let nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();
			if (!nextElement) {
				walker.currentNode = e.shiftKey ? scope[scope.length - 1].nextElementSibling : scope[0].previousElementSibling;
				nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();
			}
			e.preventDefault();
			if (nextElement) $9bf71ea28793e738$var$focusElement(nextElement, true);
		};
		let onFocus = (e) => {
			if ((!$9bf71ea28793e738$var$activeScope || $9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope, scopeRef)) && $9bf71ea28793e738$var$isElementInScope($d4ee10de306f2510$export$e58f029f0fbfdb29(e), scopeRef.current)) {
				$9bf71ea28793e738$var$activeScope = scopeRef;
				focusedNode.current = $d4ee10de306f2510$export$e58f029f0fbfdb29(e);
			} else if ($9bf71ea28793e738$var$shouldContainFocus(scopeRef) && !$9bf71ea28793e738$var$isElementInChildScope($d4ee10de306f2510$export$e58f029f0fbfdb29(e), scopeRef)) {
				if (focusedNode.current) focusedNode.current.focus();
				else if ($9bf71ea28793e738$var$activeScope && $9bf71ea28793e738$var$activeScope.current) $9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current);
			} else if ($9bf71ea28793e738$var$shouldContainFocus(scopeRef)) focusedNode.current = $d4ee10de306f2510$export$e58f029f0fbfdb29(e);
		};
		let onBlur = (e) => {
			if (raf.current) cancelAnimationFrame(raf.current);
			raf.current = requestAnimationFrame(() => {
				let modality = $507fabe10e71c6fb$export$630ff653c5ada6a9();
				let shouldSkipFocusRestore = (modality === "virtual" || modality === null) && $c87311424ea30a05$export$a11b0059900ceec8() && $c87311424ea30a05$export$6446a186d09e379e();
				let activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument);
				if (!shouldSkipFocusRestore && activeElement && $9bf71ea28793e738$var$shouldContainFocus(scopeRef) && !$9bf71ea28793e738$var$isElementInChildScope(activeElement, scopeRef)) {
					$9bf71ea28793e738$var$activeScope = scopeRef;
					let target = $d4ee10de306f2510$export$e58f029f0fbfdb29(e);
					if (target && target.isConnected) {
						var _focusedNode_current;
						focusedNode.current = target;
						(_focusedNode_current = focusedNode.current) === null || _focusedNode_current === void 0 || _focusedNode_current.focus();
					} else if ($9bf71ea28793e738$var$activeScope.current) $9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current);
				}
			});
		};
		ownerDocument.addEventListener("keydown", onKeyDown, false);
		ownerDocument.addEventListener("focusin", onFocus, false);
		scope === null || scope === void 0 || scope.forEach((element) => element.addEventListener("focusin", onFocus, false));
		scope === null || scope === void 0 || scope.forEach((element) => element.addEventListener("focusout", onBlur, false));
		return () => {
			ownerDocument.removeEventListener("keydown", onKeyDown, false);
			ownerDocument.removeEventListener("focusin", onFocus, false);
			scope === null || scope === void 0 || scope.forEach((element) => element.removeEventListener("focusin", onFocus, false));
			scope === null || scope === void 0 || scope.forEach((element) => element.removeEventListener("focusout", onBlur, false));
		};
	}, [scopeRef, contain]);
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		return () => {
			if (raf.current) cancelAnimationFrame(raf.current);
		};
	}, [raf]);
}
function $9bf71ea28793e738$var$isElementInAnyScope(element) {
	return $9bf71ea28793e738$var$isElementInChildScope(element);
}
function $9bf71ea28793e738$var$isElementInScope(element, scope) {
	if (!element) return false;
	if (!scope) return false;
	return scope.some((node) => $d4ee10de306f2510$export$4282f70798064fe0(node, element));
}
function $9bf71ea28793e738$var$isElementInChildScope(element, scope = null) {
	if (element instanceof Element && element.closest("[data-react-aria-top-layer]")) return true;
	for (let { scopeRef: s } of $9bf71ea28793e738$export$d06fae2ee68b101e.traverse($9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scope))) if (s && $9bf71ea28793e738$var$isElementInScope(element, s.current)) return true;
	return false;
}
function $9bf71ea28793e738$export$1258395f99bf9cbf(element) {
	return $9bf71ea28793e738$var$isElementInChildScope(element, $9bf71ea28793e738$var$activeScope);
}
function $9bf71ea28793e738$var$isAncestorScope(ancestor, scope) {
	var _focusScopeTree_getTreeNode;
	let parent = (_focusScopeTree_getTreeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scope)) === null || _focusScopeTree_getTreeNode === void 0 ? void 0 : _focusScopeTree_getTreeNode.parent;
	while (parent) {
		if (parent.scopeRef === ancestor) return true;
		parent = parent.parent;
	}
	return false;
}
function $9bf71ea28793e738$var$focusElement(element, scroll = false) {
	if (element != null && !scroll) try {
		$3ad3f6e1647bc98d$export$80f3e147d781571c(element);
	} catch {}
	else if (element != null) try {
		element.focus();
	} catch {}
}
function $9bf71ea28793e738$var$getFirstInScope(scope, tabbable = true) {
	let sentinel = scope[0].previousElementSibling;
	let scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope);
	let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, { tabbable }, scope);
	walker.currentNode = sentinel;
	let nextNode = walker.nextNode();
	if (tabbable && !nextNode) {
		scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope);
		walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, { tabbable: false }, scope);
		walker.currentNode = sentinel;
		nextNode = walker.nextNode();
	}
	return nextNode;
}
function $9bf71ea28793e738$var$focusFirstInScope(scope, tabbable = true) {
	$9bf71ea28793e738$var$focusElement($9bf71ea28793e738$var$getFirstInScope(scope, tabbable));
}
function $9bf71ea28793e738$var$useAutoFocus(scopeRef, autoFocus) {
	const autoFocusRef = import_react.useRef(autoFocus);
	(0, import_react.useEffect)(() => {
		if (autoFocusRef.current) {
			$9bf71ea28793e738$var$activeScope = scopeRef;
			if (!$9bf71ea28793e738$var$isElementInScope($d4ee10de306f2510$export$cd4e5573fbe2b576($431fbd86ca7dc216$export$b204af158042fbac(scopeRef.current ? scopeRef.current[0] : void 0)), $9bf71ea28793e738$var$activeScope.current) && scopeRef.current) $9bf71ea28793e738$var$focusFirstInScope(scopeRef.current);
		}
		autoFocusRef.current = false;
	}, [scopeRef]);
}
function $9bf71ea28793e738$var$useActiveScopeTracker(scopeRef, restore, contain) {
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		if (restore || contain) return;
		let scope = scopeRef.current;
		const ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(scope ? scope[0] : void 0);
		let onFocus = (e) => {
			let target = $d4ee10de306f2510$export$e58f029f0fbfdb29(e);
			if ($9bf71ea28793e738$var$isElementInScope(target, scopeRef.current)) $9bf71ea28793e738$var$activeScope = scopeRef;
			else if (!$9bf71ea28793e738$var$isElementInAnyScope(target)) $9bf71ea28793e738$var$activeScope = null;
		};
		ownerDocument.addEventListener("focusin", onFocus, false);
		scope === null || scope === void 0 || scope.forEach((element) => element.addEventListener("focusin", onFocus, false));
		return () => {
			ownerDocument.removeEventListener("focusin", onFocus, false);
			scope === null || scope === void 0 || scope.forEach((element) => element.removeEventListener("focusin", onFocus, false));
		};
	}, [
		scopeRef,
		restore,
		contain
	]);
}
function $9bf71ea28793e738$var$shouldRestoreFocus(scopeRef) {
	let scope = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);
	while (scope && scope.scopeRef !== scopeRef) {
		if (scope.nodeToRestore) return false;
		scope = scope.parent;
	}
	return (scope === null || scope === void 0 ? void 0 : scope.scopeRef) === scopeRef;
}
function $9bf71ea28793e738$var$useRestoreFocus(scopeRef, restoreFocus, contain) {
	const nodeToRestoreRef = (0, import_react.useRef)(typeof document !== "undefined" ? $d4ee10de306f2510$export$cd4e5573fbe2b576($431fbd86ca7dc216$export$b204af158042fbac(scopeRef.current ? scopeRef.current[0] : void 0)) : null);
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		let scope = scopeRef.current;
		const ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(scope ? scope[0] : void 0);
		if (!restoreFocus || contain) return;
		let onFocus = () => {
			if ((!$9bf71ea28793e738$var$activeScope || $9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope, scopeRef)) && $9bf71ea28793e738$var$isElementInScope($d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument), scopeRef.current)) $9bf71ea28793e738$var$activeScope = scopeRef;
		};
		ownerDocument.addEventListener("focusin", onFocus, false);
		scope === null || scope === void 0 || scope.forEach((element) => element.addEventListener("focusin", onFocus, false));
		return () => {
			ownerDocument.removeEventListener("focusin", onFocus, false);
			scope === null || scope === void 0 || scope.forEach((element) => element.removeEventListener("focusin", onFocus, false));
		};
	}, [scopeRef, contain]);
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		const ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(scopeRef.current ? scopeRef.current[0] : void 0);
		if (!restoreFocus) return;
		let onKeyDown = (e) => {
			if (e.key !== "Tab" || e.altKey || e.ctrlKey || e.metaKey || !$9bf71ea28793e738$var$shouldContainFocus(scopeRef) || e.isComposing) return;
			let focusedElement = ownerDocument.activeElement;
			if (!$9bf71ea28793e738$var$isElementInChildScope(focusedElement, scopeRef) || !$9bf71ea28793e738$var$shouldRestoreFocus(scopeRef)) return;
			let treeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);
			if (!treeNode) return;
			let nodeToRestore = treeNode.nodeToRestore;
			let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(ownerDocument.body, { tabbable: true });
			walker.currentNode = focusedElement;
			let nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();
			if (!nodeToRestore || !nodeToRestore.isConnected || nodeToRestore === ownerDocument.body) {
				nodeToRestore = void 0;
				treeNode.nodeToRestore = void 0;
			}
			if ((!nextElement || !$9bf71ea28793e738$var$isElementInChildScope(nextElement, scopeRef)) && nodeToRestore) {
				walker.currentNode = nodeToRestore;
				do
					nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();
				while ($9bf71ea28793e738$var$isElementInChildScope(nextElement, scopeRef));
				e.preventDefault();
				e.stopPropagation();
				if (nextElement) $9bf71ea28793e738$var$focusElement(nextElement, true);
				else if (!$9bf71ea28793e738$var$isElementInAnyScope(nodeToRestore)) focusedElement.blur();
				else $9bf71ea28793e738$var$focusElement(nodeToRestore, true);
			}
		};
		if (!contain) ownerDocument.addEventListener("keydown", onKeyDown, true);
		return () => {
			if (!contain) ownerDocument.removeEventListener("keydown", onKeyDown, true);
		};
	}, [
		scopeRef,
		restoreFocus,
		contain
	]);
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		const ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(scopeRef.current ? scopeRef.current[0] : void 0);
		if (!restoreFocus) return;
		let treeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);
		if (!treeNode) return;
		var _nodeToRestoreRef_current;
		treeNode.nodeToRestore = (_nodeToRestoreRef_current = nodeToRestoreRef.current) !== null && _nodeToRestoreRef_current !== void 0 ? _nodeToRestoreRef_current : void 0;
		return () => {
			let treeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);
			if (!treeNode) return;
			let nodeToRestore = treeNode.nodeToRestore;
			let activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument);
			if (restoreFocus && nodeToRestore && (activeElement && $9bf71ea28793e738$var$isElementInChildScope(activeElement, scopeRef) || activeElement === ownerDocument.body && $9bf71ea28793e738$var$shouldRestoreFocus(scopeRef))) {
				let clonedTree = $9bf71ea28793e738$export$d06fae2ee68b101e.clone();
				requestAnimationFrame(() => {
					if (ownerDocument.activeElement === ownerDocument.body) {
						let treeNode = clonedTree.getTreeNode(scopeRef);
						while (treeNode) {
							if (treeNode.nodeToRestore && treeNode.nodeToRestore.isConnected) {
								$9bf71ea28793e738$var$restoreFocusToElement(treeNode.nodeToRestore);
								return;
							}
							treeNode = treeNode.parent;
						}
						treeNode = clonedTree.getTreeNode(scopeRef);
						while (treeNode) {
							if (treeNode.scopeRef && treeNode.scopeRef.current && $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(treeNode.scopeRef)) {
								$9bf71ea28793e738$var$restoreFocusToElement($9bf71ea28793e738$var$getFirstInScope(treeNode.scopeRef.current, true));
								return;
							}
							treeNode = treeNode.parent;
						}
					}
				});
			}
		};
	}, [scopeRef, restoreFocus]);
}
function $9bf71ea28793e738$var$restoreFocusToElement(node) {
	if (node.dispatchEvent(new CustomEvent($9bf71ea28793e738$var$RESTORE_FOCUS_EVENT, {
		bubbles: true,
		cancelable: true
	}))) $9bf71ea28793e738$var$focusElement(node);
}
function $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, opts, scope) {
	let filter = (opts === null || opts === void 0 ? void 0 : opts.tabbable) ? $b4b717babfbb907b$export$bebd5a1431fec25d : $b4b717babfbb907b$export$4c063cf1350e6fed;
	let doc = $431fbd86ca7dc216$export$b204af158042fbac((root === null || root === void 0 ? void 0 : root.nodeType) === Node.ELEMENT_NODE ? root : null);
	let walker = $dfc540311bf7f109$export$4d0f8be8b12a7ef6(doc, root || doc, NodeFilter.SHOW_ELEMENT, { acceptNode(node) {
		if ($d4ee10de306f2510$export$4282f70798064fe0(opts === null || opts === void 0 ? void 0 : opts.from, node)) return NodeFilter.FILTER_REJECT;
		if ((opts === null || opts === void 0 ? void 0 : opts.tabbable) && node.tagName === "INPUT" && node.getAttribute("type") === "radio") {
			if (!$9bf71ea28793e738$var$isTabbableRadio(node)) return NodeFilter.FILTER_REJECT;
			if (walker.currentNode.tagName === "INPUT" && walker.currentNode.type === "radio" && walker.currentNode.name === node.name) return NodeFilter.FILTER_REJECT;
		}
		if (filter(node) && (!scope || $9bf71ea28793e738$var$isElementInScope(node, scope)) && (!(opts === null || opts === void 0 ? void 0 : opts.accept) || opts.accept(node))) return NodeFilter.FILTER_ACCEPT;
		return NodeFilter.FILTER_SKIP;
	} });
	if (opts === null || opts === void 0 ? void 0 : opts.from) walker.currentNode = opts.from;
	return walker;
}
var $9bf71ea28793e738$var$Tree = class $9bf71ea28793e738$var$Tree {
	get size() {
		return this.fastMap.size;
	}
	getTreeNode(data) {
		return this.fastMap.get(data);
	}
	addTreeNode(scopeRef, parent, nodeToRestore) {
		let parentNode = this.fastMap.get(parent !== null && parent !== void 0 ? parent : null);
		if (!parentNode) return;
		let node = new $9bf71ea28793e738$var$TreeNode({ scopeRef });
		parentNode.addChild(node);
		node.parent = parentNode;
		this.fastMap.set(scopeRef, node);
		if (nodeToRestore) node.nodeToRestore = nodeToRestore;
	}
	addNode(node) {
		this.fastMap.set(node.scopeRef, node);
	}
	removeTreeNode(scopeRef) {
		if (scopeRef === null) return;
		let node = this.fastMap.get(scopeRef);
		if (!node) return;
		let parentNode = node.parent;
		for (let current of this.traverse()) if (current !== node && node.nodeToRestore && current.nodeToRestore && node.scopeRef && node.scopeRef.current && $9bf71ea28793e738$var$isElementInScope(current.nodeToRestore, node.scopeRef.current)) current.nodeToRestore = node.nodeToRestore;
		let children = node.children;
		if (parentNode) {
			parentNode.removeChild(node);
			if (children.size > 0) children.forEach((child) => parentNode && parentNode.addChild(child));
		}
		this.fastMap.delete(node.scopeRef);
	}
	*traverse(node = this.root) {
		if (node.scopeRef != null) yield node;
		if (node.children.size > 0) for (let child of node.children) yield* this.traverse(child);
	}
	clone() {
		var _node_parent;
		let newTree = new $9bf71ea28793e738$var$Tree();
		var _node_parent_scopeRef;
		for (let node of this.traverse()) newTree.addTreeNode(node.scopeRef, (_node_parent_scopeRef = (_node_parent = node.parent) === null || _node_parent === void 0 ? void 0 : _node_parent.scopeRef) !== null && _node_parent_scopeRef !== void 0 ? _node_parent_scopeRef : null, node.nodeToRestore);
		return newTree;
	}
	constructor() {
		this.fastMap = /* @__PURE__ */ new Map();
		this.root = new $9bf71ea28793e738$var$TreeNode({ scopeRef: null });
		this.fastMap.set(null, this.root);
	}
};
var $9bf71ea28793e738$var$TreeNode = class {
	addChild(node) {
		this.children.add(node);
		node.parent = this;
	}
	removeChild(node) {
		this.children.delete(node);
		node.parent = void 0;
	}
	constructor(props) {
		this.children = /* @__PURE__ */ new Set();
		this.contain = false;
		this.scopeRef = props.scopeRef;
	}
};
var $9bf71ea28793e738$export$d06fae2ee68b101e = new $9bf71ea28793e738$var$Tree();
//#endregion
//#region ../../node_modules/@react-aria/focus/dist/useFocusRing.mjs
function $f7dceffc5ad7768b$export$4e328f61c538687f(props = {}) {
	let { autoFocus = false, isTextInput, within } = props;
	let state = (0, import_react.useRef)({
		isFocused: false,
		isFocusVisible: autoFocus || $507fabe10e71c6fb$export$b9b3dfddab17db27()
	});
	let [isFocused, setFocused] = (0, import_react.useState)(false);
	let [isFocusVisibleState, setFocusVisible] = (0, import_react.useState)(() => state.current.isFocused && state.current.isFocusVisible);
	let updateState = (0, import_react.useCallback)(() => setFocusVisible(state.current.isFocused && state.current.isFocusVisible), []);
	let onFocusChange = (0, import_react.useCallback)((isFocused) => {
		state.current.isFocused = isFocused;
		state.current.isFocusVisible = $507fabe10e71c6fb$export$b9b3dfddab17db27();
		setFocused(isFocused);
		updateState();
	}, [updateState]);
	$507fabe10e71c6fb$export$ec71b4b83ac08ec3((isFocusVisible) => {
		state.current.isFocusVisible = isFocusVisible;
		updateState();
	}, [isTextInput, isFocused], {
		enabled: isFocused,
		isTextInput
	});
	let { focusProps } = $a1ea59d68270f0dd$export$f8168d8dd8fd66e6({
		isDisabled: within,
		onFocusChange
	});
	let { focusWithinProps } = $9ab94262bd0047c7$export$420e68273165f4ec({
		isDisabled: !within,
		onFocusWithinChange: onFocusChange
	});
	return {
		isFocused,
		isFocusVisible: isFocusVisibleState,
		focusProps: within ? focusWithinProps : focusProps
	};
}
//#endregion
//#region ../../node_modules/@react-aria/focus/dist/virtualFocus.mjs
function $55f9b1ae81f22853$export$76e4e37e5339496d(to) {
	let from = $55f9b1ae81f22853$export$759df0d867455a91($431fbd86ca7dc216$export$b204af158042fbac(to));
	if (from !== to) {
		if (from) $55f9b1ae81f22853$export$6c5dc7e81d2cc29a(from, to);
		if (to) $55f9b1ae81f22853$export$2b35b76d2e30e129(to, from);
	}
}
function $55f9b1ae81f22853$export$6c5dc7e81d2cc29a(from, to) {
	from.dispatchEvent(new FocusEvent("blur", { relatedTarget: to }));
	from.dispatchEvent(new FocusEvent("focusout", {
		bubbles: true,
		relatedTarget: to
	}));
}
function $55f9b1ae81f22853$export$2b35b76d2e30e129(to, from) {
	to.dispatchEvent(new FocusEvent("focus", { relatedTarget: from }));
	to.dispatchEvent(new FocusEvent("focusin", {
		bubbles: true,
		relatedTarget: from
	}));
}
function $55f9b1ae81f22853$export$759df0d867455a91(document) {
	let activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576(document);
	let activeDescendant = activeElement === null || activeElement === void 0 ? void 0 : activeElement.getAttribute("aria-activedescendant");
	if (activeDescendant) return document.getElementById(activeDescendant) || activeElement;
	return activeElement;
}
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/useOverlay.mjs
var $a11501f3d1d39e6c$var$visibleOverlays = [];
function $a11501f3d1d39e6c$export$ea8f71083e90600f(props, ref) {
	let { onClose, shouldCloseOnBlur, isOpen, isDismissable = false, isKeyboardDismissDisabled = false, shouldCloseOnInteractOutside } = props;
	let lastVisibleOverlay = (0, import_react.useRef)(void 0);
	(0, import_react.useEffect)(() => {
		if (isOpen && !$a11501f3d1d39e6c$var$visibleOverlays.includes(ref)) {
			$a11501f3d1d39e6c$var$visibleOverlays.push(ref);
			return () => {
				let index = $a11501f3d1d39e6c$var$visibleOverlays.indexOf(ref);
				if (index >= 0) $a11501f3d1d39e6c$var$visibleOverlays.splice(index, 1);
			};
		}
	}, [isOpen, ref]);
	let onHide = () => {
		if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref && onClose) onClose();
	};
	let onInteractOutsideStart = (e) => {
		const topMostOverlay = $a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1];
		lastVisibleOverlay.current = topMostOverlay;
		if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside($d4ee10de306f2510$export$e58f029f0fbfdb29(e))) {
			if (topMostOverlay === ref) {
				e.stopPropagation();
				e.preventDefault();
			}
		}
	};
	let onInteractOutside = (e) => {
		if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside($d4ee10de306f2510$export$e58f029f0fbfdb29(e))) {
			if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref) {
				e.stopPropagation();
				e.preventDefault();
			}
			if (lastVisibleOverlay.current === ref) onHide();
		}
		lastVisibleOverlay.current = void 0;
	};
	let onKeyDown = (e) => {
		if (e.key === "Escape" && !isKeyboardDismissDisabled && !e.nativeEvent.isComposing) {
			e.stopPropagation();
			e.preventDefault();
			onHide();
		}
	};
	$e0b6e0b68ec7f50f$export$872b660ac5a1ff98({
		ref,
		onInteractOutside: isDismissable && isOpen ? onInteractOutside : void 0,
		onInteractOutsideStart
	});
	let { focusWithinProps } = $9ab94262bd0047c7$export$420e68273165f4ec({
		isDisabled: !shouldCloseOnBlur,
		onBlurWithin: (e) => {
			if (!e.relatedTarget || $9bf71ea28793e738$export$1258395f99bf9cbf(e.relatedTarget)) return;
			if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.relatedTarget)) onClose === null || onClose === void 0 || onClose();
		}
	});
	let onPointerDownUnderlay = (e) => {
		if ($d4ee10de306f2510$export$e58f029f0fbfdb29(e) === e.currentTarget) e.preventDefault();
	};
	return {
		overlayProps: {
			onKeyDown,
			...focusWithinProps
		},
		underlayProps: { onPointerDown: onPointerDownUnderlay }
	};
}
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/useOverlayTrigger.mjs
function $628037886ba31236$export$f9d5c8beee7d008d(props, state, ref) {
	let { type } = props;
	let { isOpen } = state;
	(0, import_react.useEffect)(() => {
		if (ref && ref.current) $dd149f63282afbbf$export$f6211563215e3b37.set(ref.current, state.close);
	});
	let ariaHasPopup = void 0;
	if (type === "menu") ariaHasPopup = true;
	else if (type === "listbox") ariaHasPopup = "listbox";
	let overlayId = $bdb11010cef70236$export$f680877a34711e37();
	return {
		triggerProps: {
			"aria-haspopup": ariaHasPopup,
			"aria-expanded": isOpen,
			"aria-controls": isOpen ? overlayId : void 0,
			onPress: state.toggle
		},
		overlayProps: { id: overlayId }
	};
}
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/usePreventScroll.mjs
var $49c51c25361d4cd2$var$visualViewport = typeof document !== "undefined" && window.visualViewport;
var $49c51c25361d4cd2$var$preventScrollCount = 0;
var $49c51c25361d4cd2$var$restore;
function $49c51c25361d4cd2$export$ee0f7cc6afcd1c18(options = {}) {
	let { isDisabled } = options;
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		if (isDisabled) return;
		$49c51c25361d4cd2$var$preventScrollCount++;
		if ($49c51c25361d4cd2$var$preventScrollCount === 1) if ($c87311424ea30a05$export$fedb369cb70207f1()) $49c51c25361d4cd2$var$restore = $49c51c25361d4cd2$var$preventScrollMobileSafari();
		else $49c51c25361d4cd2$var$restore = $49c51c25361d4cd2$var$preventScrollStandard();
		return () => {
			$49c51c25361d4cd2$var$preventScrollCount--;
			if ($49c51c25361d4cd2$var$preventScrollCount === 0) $49c51c25361d4cd2$var$restore();
		};
	}, [isDisabled]);
}
function $49c51c25361d4cd2$var$preventScrollStandard() {
	let scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
	return $ff5963eb1fccf552$export$e08e3b67e392101e(scrollbarWidth > 0 && ("scrollbarGutter" in document.documentElement.style ? $49c51c25361d4cd2$var$setStyle(document.documentElement, "scrollbarGutter", "stable") : $49c51c25361d4cd2$var$setStyle(document.documentElement, "paddingRight", `${scrollbarWidth}px`)), $49c51c25361d4cd2$var$setStyle(document.documentElement, "overflow", "hidden"));
}
function $49c51c25361d4cd2$var$preventScrollMobileSafari() {
	let restoreOverflow = $49c51c25361d4cd2$var$setStyle(document.documentElement, "overflow", "hidden");
	let scrollable;
	let allowTouchMove = false;
	let onTouchStart = (e) => {
		let target = $d4ee10de306f2510$export$e58f029f0fbfdb29(e);
		scrollable = $cc38e7bd3fc7b213$export$2bb74740c4e19def(target) ? target : $62d8ded9296f3872$export$cfa2225e87938781(target, true);
		allowTouchMove = false;
		let selection = target.ownerDocument.defaultView.getSelection();
		if (selection && !selection.isCollapsed && selection.containsNode(target, true)) allowTouchMove = true;
		if (e.composedPath().some((el) => el instanceof HTMLInputElement && el.type === "range")) allowTouchMove = true;
		if ("selectionStart" in target && "selectionEnd" in target && target.selectionStart < target.selectionEnd && target.ownerDocument.activeElement === target) allowTouchMove = true;
	};
	let style = document.createElement("style");
	style.textContent = `
@layer {
  * {
    overscroll-behavior: contain;
  }
}`.trim();
	document.head.prepend(style);
	let onTouchMove = (e) => {
		if (e.touches.length === 2 || allowTouchMove) return;
		if (!scrollable || scrollable === document.documentElement || scrollable === document.body) {
			e.preventDefault();
			return;
		}
		if (scrollable.scrollHeight === scrollable.clientHeight && scrollable.scrollWidth === scrollable.clientWidth) e.preventDefault();
	};
	let onBlur = (e) => {
		let target = $d4ee10de306f2510$export$e58f029f0fbfdb29(e);
		let relatedTarget = e.relatedTarget;
		if (relatedTarget && $21f1aa98acb08317$export$c57958e35f31ed73(relatedTarget)) {
			relatedTarget.focus({ preventScroll: true });
			$49c51c25361d4cd2$var$scrollIntoViewWhenReady(relatedTarget, $21f1aa98acb08317$export$c57958e35f31ed73(target));
		} else if (!relatedTarget) {
			var _target_parentElement;
			let focusable = (_target_parentElement = target.parentElement) === null || _target_parentElement === void 0 ? void 0 : _target_parentElement.closest("[tabindex]");
			focusable === null || focusable === void 0 || focusable.focus({ preventScroll: true });
		}
	};
	let focus = HTMLElement.prototype.focus;
	HTMLElement.prototype.focus = function(opts) {
		let activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576();
		let wasKeyboardVisible = activeElement != null && $21f1aa98acb08317$export$c57958e35f31ed73(activeElement);
		focus.call(this, {
			...opts,
			preventScroll: true
		});
		if (!opts || !opts.preventScroll) $49c51c25361d4cd2$var$scrollIntoViewWhenReady(this, wasKeyboardVisible);
	};
	let removeEvents = $ff5963eb1fccf552$export$e08e3b67e392101e($49c51c25361d4cd2$var$addEvent(document, "touchstart", onTouchStart, {
		passive: false,
		capture: true
	}), $49c51c25361d4cd2$var$addEvent(document, "touchmove", onTouchMove, {
		passive: false,
		capture: true
	}), $49c51c25361d4cd2$var$addEvent(document, "blur", onBlur, true));
	return () => {
		restoreOverflow();
		removeEvents();
		style.remove();
		HTMLElement.prototype.focus = focus;
	};
}
function $49c51c25361d4cd2$var$setStyle(element, style, value) {
	let cur = element.style[style];
	element.style[style] = value;
	return () => {
		element.style[style] = cur;
	};
}
function $49c51c25361d4cd2$var$addEvent(target, event, handler, options) {
	target.addEventListener(event, handler, options);
	return () => {
		target.removeEventListener(event, handler, options);
	};
}
function $49c51c25361d4cd2$var$scrollIntoViewWhenReady(target, wasKeyboardVisible) {
	if (wasKeyboardVisible || !$49c51c25361d4cd2$var$visualViewport) $49c51c25361d4cd2$var$scrollIntoView(target);
	else $49c51c25361d4cd2$var$visualViewport.addEventListener("resize", () => $49c51c25361d4cd2$var$scrollIntoView(target), { once: true });
}
function $49c51c25361d4cd2$var$scrollIntoView(target) {
	let root = document.scrollingElement || document.documentElement;
	let nextTarget = target;
	while (nextTarget && nextTarget !== root) {
		let scrollable = $62d8ded9296f3872$export$cfa2225e87938781(nextTarget);
		if (scrollable !== document.documentElement && scrollable !== document.body && scrollable !== nextTarget) {
			let scrollableRect = scrollable.getBoundingClientRect();
			let targetRect = nextTarget.getBoundingClientRect();
			if (targetRect.top < scrollableRect.top || targetRect.bottom > scrollableRect.top + nextTarget.clientHeight) {
				let bottom = scrollableRect.bottom;
				if ($49c51c25361d4cd2$var$visualViewport) bottom = Math.min(bottom, $49c51c25361d4cd2$var$visualViewport.offsetTop + $49c51c25361d4cd2$var$visualViewport.height);
				let adjustment = targetRect.top - scrollableRect.top - ((bottom - scrollableRect.top) / 2 - targetRect.height / 2);
				scrollable.scrollTo({
					top: Math.max(0, Math.min(scrollable.scrollHeight - scrollable.clientHeight, scrollable.scrollTop + adjustment)),
					behavior: "smooth"
				});
			}
		}
		nextTarget = scrollable.parentElement;
	}
}
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/PortalProvider.mjs
var $96b38030c423d352$export$60d741e20e0aa309 = /* @__PURE__ */ (0, import_react.createContext)({});
function $96b38030c423d352$export$9fc1347d4195ccb3() {
	var _useContext;
	return (_useContext = (0, import_react.useContext)($96b38030c423d352$export$60d741e20e0aa309)) !== null && _useContext !== void 0 ? _useContext : {};
}
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/useModal.mjs
var $f57aed4a881a3485$var$Context = /* @__PURE__ */ import_react.createContext(null);
function $f57aed4a881a3485$export$178405afcd8c5eb(props) {
	let { children } = props;
	let parent = (0, import_react.useContext)($f57aed4a881a3485$var$Context);
	let [modalCount, setModalCount] = (0, import_react.useState)(0);
	let context = (0, import_react.useMemo)(() => ({
		parent,
		modalCount,
		addModal() {
			setModalCount((count) => count + 1);
			if (parent) parent.addModal();
		},
		removeModal() {
			setModalCount((count) => count - 1);
			if (parent) parent.removeModal();
		}
	}), [parent, modalCount]);
	return /* @__PURE__ */ import_react.createElement($f57aed4a881a3485$var$Context.Provider, { value: context }, children);
}
function $f57aed4a881a3485$export$d9aaed4c3ece1bc0() {
	let context = (0, import_react.useContext)($f57aed4a881a3485$var$Context);
	return { modalProviderProps: { "aria-hidden": context && context.modalCount > 0 ? true : void 0 } };
}
/**
* Creates a root node that will be aria-hidden if there are other modals open.
*/ function $f57aed4a881a3485$var$OverlayContainerDOM(props) {
	let { modalProviderProps } = $f57aed4a881a3485$export$d9aaed4c3ece1bc0();
	return /* @__PURE__ */ import_react.createElement("div", {
		"data-overlay-container": true,
		...props,
		...modalProviderProps
	});
}
function $f57aed4a881a3485$export$bf688221f59024e5(props) {
	return /* @__PURE__ */ import_react.createElement($f57aed4a881a3485$export$178405afcd8c5eb, null, /* @__PURE__ */ import_react.createElement($f57aed4a881a3485$var$OverlayContainerDOM, props));
}
function $f57aed4a881a3485$export$b47c3594eab58386(props) {
	let isSSR = $b5e257d569688ac6$export$535bd6ca7f90a273();
	let { portalContainer = isSSR ? null : document.body, ...rest } = props;
	let { getContainer } = $96b38030c423d352$export$9fc1347d4195ccb3();
	if (!props.portalContainer && getContainer) portalContainer = getContainer();
	import_react.useEffect(() => {
		if (portalContainer === null || portalContainer === void 0 ? void 0 : portalContainer.closest("[data-overlay-container]")) throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.");
	}, [portalContainer]);
	if (!portalContainer) return null;
	let contents = /* @__PURE__ */ import_react.createElement($f57aed4a881a3485$export$bf688221f59024e5, rest);
	return /* @__PURE__ */ import_react_dom.createPortal(contents, portalContainer);
}
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/ar-AE.mjs
var $773d5888b972f1cf$exports = {};
$773d5888b972f1cf$exports = { "dismiss": `\u{62A}\u{62C}\u{627}\u{647}\u{644}` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/bg-BG.mjs
var $d11f19852b941573$exports = {};
$d11f19852b941573$exports = { "dismiss": `\u{41E}\u{442}\u{445}\u{432}\u{44A}\u{440}\u{43B}\u{44F}\u{43D}\u{435}` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/cs-CZ.mjs
var $b983974c2ee1efb3$exports = {};
$b983974c2ee1efb3$exports = { "dismiss": `Odstranit` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/da-DK.mjs
var $5809cc9d4e92de73$exports = {};
$5809cc9d4e92de73$exports = { "dismiss": `Luk` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/de-DE.mjs
var $c68c2e4fc74398d1$exports = {};
$c68c2e4fc74398d1$exports = { "dismiss": `Schlie\xdfen` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/el-GR.mjs
var $0898b4c153db2b77$exports = {};
$0898b4c153db2b77$exports = { "dismiss": `\u{391}\u{3C0}\u{3CC}\u{3C1}\u{3C1}\u{3B9}\u{3C8}\u{3B7}` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/en-US.mjs
var $6d74810286a15183$exports = {};
$6d74810286a15183$exports = { "dismiss": `Dismiss` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/es-ES.mjs
var $309d73dc65f78055$exports = {};
$309d73dc65f78055$exports = { "dismiss": `Descartar` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/et-EE.mjs
var $44ad94f7205cf593$exports = {};
$44ad94f7205cf593$exports = { "dismiss": `L\xf5peta` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/fi-FI.mjs
var $7c28f5687f0779a9$exports = {};
$7c28f5687f0779a9$exports = { "dismiss": `Hylk\xe4\xe4` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/fr-FR.mjs
var $e6d75df4b68bd73a$exports = {};
$e6d75df4b68bd73a$exports = { "dismiss": `Rejeter` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/he-IL.mjs
var $87505c9dab186d0f$exports = {};
$87505c9dab186d0f$exports = { "dismiss": `\u{5D4}\u{5EA}\u{5E2}\u{5DC}\u{5DD}` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/hr-HR.mjs
var $553439c3ffb3e492$exports = {};
$553439c3ffb3e492$exports = { "dismiss": `Odbaci` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/hu-HU.mjs
var $74cf411061b983a2$exports = {};
$74cf411061b983a2$exports = { "dismiss": `Elutas\xedt\xe1s` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/it-IT.mjs
var $e933f298574dc435$exports = {};
$e933f298574dc435$exports = { "dismiss": `Ignora` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/ja-JP.mjs
var $ac91fc9fe02f71f6$exports = {};
$ac91fc9fe02f71f6$exports = { "dismiss": `\u{9589}\u{3058}\u{308B}` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/ko-KR.mjs
var $52b96f86422025af$exports = {};
$52b96f86422025af$exports = { "dismiss": `\u{BB34}\u{C2DC}` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/lt-LT.mjs
var $c0d724c3e51dafa6$exports = {};
$c0d724c3e51dafa6$exports = { "dismiss": `Atmesti` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/lv-LV.mjs
var $c92899672a3fe72e$exports = {};
$c92899672a3fe72e$exports = { "dismiss": `Ner\u{101}d\u{12B}t` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/nb-NO.mjs
var $9f576b39d8e7a9d6$exports = {};
$9f576b39d8e7a9d6$exports = { "dismiss": `Lukk` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/nl-NL.mjs
var $9d025808aeec81a7$exports = {};
$9d025808aeec81a7$exports = { "dismiss": `Negeren` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/pl-PL.mjs
var $fce709921e2c0fa6$exports = {};
$fce709921e2c0fa6$exports = { "dismiss": `Zignoruj` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/pt-BR.mjs
var $2599cf0c4ab37f59$exports = {};
$2599cf0c4ab37f59$exports = { "dismiss": `Descartar` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/pt-PT.mjs
var $3c220ae7ef8a35fd$exports = {};
$3c220ae7ef8a35fd$exports = { "dismiss": `Dispensar` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/ro-RO.mjs
var $93562b5094072f54$exports = {};
$93562b5094072f54$exports = { "dismiss": `Revocare` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/ru-RU.mjs
var $cd9e2abd0d06c7b4$exports = {};
$cd9e2abd0d06c7b4$exports = { "dismiss": `\u{41F}\u{440}\u{43E}\u{43F}\u{443}\u{441}\u{442}\u{438}\u{442}\u{44C}` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/sk-SK.mjs
var $45375701f409adf1$exports = {};
$45375701f409adf1$exports = { "dismiss": `Zru\u{161}i\u{165}` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/sl-SI.mjs
var $27fab53a576de9dd$exports = {};
$27fab53a576de9dd$exports = { "dismiss": `Opusti` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/sr-SP.mjs
var $4438748d9952e7c7$exports = {};
$4438748d9952e7c7$exports = { "dismiss": `Odbaci` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/sv-SE.mjs
var $0936d7347ef4da4c$exports = {};
$0936d7347ef4da4c$exports = { "dismiss": `Avvisa` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/tr-TR.mjs
var $29700c92185d38f8$exports = {};
$29700c92185d38f8$exports = { "dismiss": `Kapat` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/uk-UA.mjs
var $662ccaf2be4c25b3$exports = {};
$662ccaf2be4c25b3$exports = { "dismiss": `\u{421}\u{43A}\u{430}\u{441}\u{443}\u{432}\u{430}\u{442}\u{438}` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/zh-CN.mjs
var $d80a27deda7cdb3c$exports = {};
$d80a27deda7cdb3c$exports = { "dismiss": `\u{53D6}\u{6D88}` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/zh-TW.mjs
var $2b2734393847c884$exports = {};
$2b2734393847c884$exports = { "dismiss": `\u{95DC}\u{9589}` };
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/intlStrings.mjs
var $a2f21f5f14f60553$exports = {};
$a2f21f5f14f60553$exports = {
	"ar-AE": $773d5888b972f1cf$exports,
	"bg-BG": $d11f19852b941573$exports,
	"cs-CZ": $b983974c2ee1efb3$exports,
	"da-DK": $5809cc9d4e92de73$exports,
	"de-DE": $c68c2e4fc74398d1$exports,
	"el-GR": $0898b4c153db2b77$exports,
	"en-US": $6d74810286a15183$exports,
	"es-ES": $309d73dc65f78055$exports,
	"et-EE": $44ad94f7205cf593$exports,
	"fi-FI": $7c28f5687f0779a9$exports,
	"fr-FR": $e6d75df4b68bd73a$exports,
	"he-IL": $87505c9dab186d0f$exports,
	"hr-HR": $553439c3ffb3e492$exports,
	"hu-HU": $74cf411061b983a2$exports,
	"it-IT": $e933f298574dc435$exports,
	"ja-JP": $ac91fc9fe02f71f6$exports,
	"ko-KR": $52b96f86422025af$exports,
	"lt-LT": $c0d724c3e51dafa6$exports,
	"lv-LV": $c92899672a3fe72e$exports,
	"nb-NO": $9f576b39d8e7a9d6$exports,
	"nl-NL": $9d025808aeec81a7$exports,
	"pl-PL": $fce709921e2c0fa6$exports,
	"pt-BR": $2599cf0c4ab37f59$exports,
	"pt-PT": $3c220ae7ef8a35fd$exports,
	"ro-RO": $93562b5094072f54$exports,
	"ru-RU": $cd9e2abd0d06c7b4$exports,
	"sk-SK": $45375701f409adf1$exports,
	"sl-SI": $27fab53a576de9dd$exports,
	"sr-SP": $4438748d9952e7c7$exports,
	"sv-SE": $0936d7347ef4da4c$exports,
	"tr-TR": $29700c92185d38f8$exports,
	"uk-UA": $662ccaf2be4c25b3$exports,
	"zh-CN": $d80a27deda7cdb3c$exports,
	"zh-TW": $2b2734393847c884$exports
};
//#endregion
//#region ../../node_modules/@react-aria/visually-hidden/dist/VisuallyHidden.mjs
var $5c3e21d68f1c4674$var$styles = {
	border: 0,
	clip: "rect(0 0 0 0)",
	clipPath: "inset(50%)",
	height: "1px",
	margin: "-1px",
	overflow: "hidden",
	padding: 0,
	position: "absolute",
	width: "1px",
	whiteSpace: "nowrap"
};
function $5c3e21d68f1c4674$export$a966af930f325cab(props = {}) {
	let { style, isFocusable } = props;
	let [isFocused, setFocused] = (0, import_react.useState)(false);
	let { focusWithinProps } = $9ab94262bd0047c7$export$420e68273165f4ec({
		isDisabled: !isFocusable,
		onFocusWithinChange: (val) => setFocused(val)
	});
	let combinedStyles = (0, import_react.useMemo)(() => {
		if (isFocused) return style;
		else if (style) return {
			...$5c3e21d68f1c4674$var$styles,
			...style
		};
		else return $5c3e21d68f1c4674$var$styles;
	}, [isFocused]);
	return { visuallyHiddenProps: {
		...focusWithinProps,
		style: combinedStyles
	} };
}
function $5c3e21d68f1c4674$export$439d29a4e110a164(props) {
	let { children, elementType: Element = "div", isFocusable, style, ...otherProps } = props;
	let { visuallyHiddenProps } = $5c3e21d68f1c4674$export$a966af930f325cab(props);
	return /* @__PURE__ */ import_react.createElement(Element, $3ef42575df84b30b$export$9d1611c77c2fe928(otherProps, visuallyHiddenProps), children);
}
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/DismissButton.mjs
function $parcel$interopDefault$2(a) {
	return a && a.__esModule ? a.default : a;
}
function $86ea4cb521eb2e37$export$2317d149ed6f78c4(props) {
	let { onDismiss, ...otherProps } = props;
	let labels = $313b98861ee5dd6c$export$d6875122194c7b44(otherProps, $fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault$2($a2f21f5f14f60553$exports), "@react-aria/overlays").format("dismiss"));
	let onClick = () => {
		if (onDismiss) onDismiss();
	};
	return /* @__PURE__ */ import_react.createElement($5c3e21d68f1c4674$export$439d29a4e110a164, null, /* @__PURE__ */ import_react.createElement("button", {
		...labels,
		tabIndex: -1,
		onClick,
		style: {
			width: 1,
			height: 1
		}
	}));
}
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/ariaHideOutside.mjs
var $5e3802645cc19319$var$supportsInert = typeof HTMLElement !== "undefined" && "inert" in HTMLElement.prototype;
var $5e3802645cc19319$var$refCountMap = /* @__PURE__ */ new WeakMap();
var $5e3802645cc19319$var$observerStack = [];
function $5e3802645cc19319$export$1c3ebcada18427bf(targets, options) {
	let windowObj = $431fbd86ca7dc216$export$f21a1ffae260145a(targets === null || targets === void 0 ? void 0 : targets[0]);
	let opts = options instanceof windowObj.Element ? { root: options } : options;
	var _opts_root;
	let root = (_opts_root = opts === null || opts === void 0 ? void 0 : opts.root) !== null && _opts_root !== void 0 ? _opts_root : document.body;
	let shouldUseInert = (opts === null || opts === void 0 ? void 0 : opts.shouldUseInert) && $5e3802645cc19319$var$supportsInert;
	let visibleNodes = new Set(targets);
	let hiddenNodes = /* @__PURE__ */ new Set();
	let getHidden = (element) => {
		return shouldUseInert && element instanceof windowObj.HTMLElement ? element.inert : element.getAttribute("aria-hidden") === "true";
	};
	let setHidden = (element, hidden) => {
		if (shouldUseInert && element instanceof windowObj.HTMLElement) element.inert = hidden;
		else if (hidden) element.setAttribute("aria-hidden", "true");
		else {
			element.removeAttribute("aria-hidden");
			if (element instanceof windowObj.HTMLElement) element.inert = false;
		}
	};
	let shadowRootsToWatch = /* @__PURE__ */ new Set();
	if ($f4e2df6bd15f8569$export$98658e8c59125e6a()) for (let target of targets) {
		let node = target;
		while (node && node !== root) {
			let root = node.getRootNode();
			if ("shadowRoot" in root) shadowRootsToWatch.add(root.shadowRoot);
			node = root.parentNode;
		}
	}
	let walk = (root) => {
		for (let element of root.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]")) visibleNodes.add(element);
		let acceptNode = (node) => {
			if (hiddenNodes.has(node) || visibleNodes.has(node) || node.parentElement && hiddenNodes.has(node.parentElement) && node.parentElement.getAttribute("role") !== "row") return NodeFilter.FILTER_REJECT;
			for (let target of visibleNodes) if ($d4ee10de306f2510$export$4282f70798064fe0(node, target)) return NodeFilter.FILTER_SKIP;
			return NodeFilter.FILTER_ACCEPT;
		};
		let walker = $dfc540311bf7f109$export$4d0f8be8b12a7ef6($431fbd86ca7dc216$export$b204af158042fbac(root), root, NodeFilter.SHOW_ELEMENT, { acceptNode });
		let acceptRoot = acceptNode(root);
		if (acceptRoot === NodeFilter.FILTER_ACCEPT) hide(root);
		if (acceptRoot !== NodeFilter.FILTER_REJECT) {
			let node = walker.nextNode();
			while (node != null) {
				hide(node);
				node = walker.nextNode();
			}
		}
	};
	let hide = (node) => {
		var _refCountMap_get;
		let refCount = (_refCountMap_get = $5e3802645cc19319$var$refCountMap.get(node)) !== null && _refCountMap_get !== void 0 ? _refCountMap_get : 0;
		if (getHidden(node) && refCount === 0) return;
		if (refCount === 0) setHidden(node, true);
		hiddenNodes.add(node);
		$5e3802645cc19319$var$refCountMap.set(node, refCount + 1);
	};
	if ($5e3802645cc19319$var$observerStack.length) $5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length - 1].disconnect();
	walk(root);
	let observer = new MutationObserver((changes) => {
		for (let change of changes) {
			if (change.type !== "childList") continue;
			if (change.target.isConnected && ![...visibleNodes, ...hiddenNodes].some((node) => $d4ee10de306f2510$export$4282f70798064fe0(node, change.target))) {
				for (let node of change.addedNodes) if ((node instanceof HTMLElement || node instanceof SVGElement) && (node.dataset.liveAnnouncer === "true" || node.dataset.reactAriaTopLayer === "true")) visibleNodes.add(node);
				else if (node instanceof Element) walk(node);
			}
			if ($f4e2df6bd15f8569$export$98658e8c59125e6a()) {
				for (let shadowRoot of shadowRootsToWatch) if (!shadowRoot.isConnected) {
					observer.disconnect();
					break;
				}
			}
		}
	});
	observer.observe(root, {
		childList: true,
		subtree: true
	});
	let shadowObservers = /* @__PURE__ */ new Set();
	if ($f4e2df6bd15f8569$export$98658e8c59125e6a()) for (let shadowRoot of shadowRootsToWatch) {
		let shadowObserver = new MutationObserver((changes) => {
			for (let change of changes) {
				if (change.type !== "childList") continue;
				if (change.target.isConnected && ![...visibleNodes, ...hiddenNodes].some((node) => $d4ee10de306f2510$export$4282f70798064fe0(node, change.target))) {
					for (let node of change.addedNodes) if ((node instanceof HTMLElement || node instanceof SVGElement) && (node.dataset.liveAnnouncer === "true" || node.dataset.reactAriaTopLayer === "true")) visibleNodes.add(node);
					else if (node instanceof Element) walk(node);
				}
				if ($f4e2df6bd15f8569$export$98658e8c59125e6a()) {
					for (let shadowRoot of shadowRootsToWatch) if (!shadowRoot.isConnected) {
						observer.disconnect();
						break;
					}
				}
			}
		});
		shadowObserver.observe(shadowRoot, {
			childList: true,
			subtree: true
		});
		shadowObservers.add(shadowObserver);
	}
	let observerWrapper = {
		visibleNodes,
		hiddenNodes,
		observe() {
			observer.observe(root, {
				childList: true,
				subtree: true
			});
		},
		disconnect() {
			observer.disconnect();
		}
	};
	$5e3802645cc19319$var$observerStack.push(observerWrapper);
	return () => {
		observer.disconnect();
		if ($f4e2df6bd15f8569$export$98658e8c59125e6a()) for (let shadowObserver of shadowObservers) shadowObserver.disconnect();
		for (let node of hiddenNodes) {
			let count = $5e3802645cc19319$var$refCountMap.get(node);
			if (count == null) continue;
			if (count === 1) {
				setHidden(node, false);
				$5e3802645cc19319$var$refCountMap.delete(node);
			} else $5e3802645cc19319$var$refCountMap.set(node, count - 1);
		}
		if (observerWrapper === $5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length - 1]) {
			$5e3802645cc19319$var$observerStack.pop();
			if ($5e3802645cc19319$var$observerStack.length) $5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length - 1].observe();
		} else $5e3802645cc19319$var$observerStack.splice($5e3802645cc19319$var$observerStack.indexOf(observerWrapper), 1);
	};
}
function $5e3802645cc19319$export$1020fa7f77e17884(element) {
	let observer = $5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length - 1];
	if (observer && !observer.visibleNodes.has(element)) {
		observer.visibleNodes.add(element);
		return () => {
			observer.visibleNodes.delete(element);
		};
	}
}
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/usePopover.mjs
function $f2f8a6077418541e$export$542a6fd13ac93354(props, state) {
	let { triggerRef, popoverRef, groupRef, isNonModal, isKeyboardDismissDisabled, shouldCloseOnInteractOutside, ...otherProps } = props;
	let isSubmenu = otherProps["trigger"] === "SubmenuTrigger";
	let { overlayProps, underlayProps } = $a11501f3d1d39e6c$export$ea8f71083e90600f({
		isOpen: state.isOpen,
		onClose: state.close,
		shouldCloseOnBlur: true,
		isDismissable: !isNonModal || isSubmenu,
		isKeyboardDismissDisabled,
		shouldCloseOnInteractOutside
	}, groupRef !== null && groupRef !== void 0 ? groupRef : popoverRef);
	let { overlayProps: positionProps, arrowProps, placement, triggerAnchorPoint: origin } = $2a41e45df1593e64$export$d39e1813b3bdd0e1({
		...otherProps,
		targetRef: triggerRef,
		overlayRef: popoverRef,
		isOpen: state.isOpen,
		onClose: isNonModal && !isSubmenu ? state.close : null
	});
	$49c51c25361d4cd2$export$ee0f7cc6afcd1c18({ isDisabled: isNonModal || !state.isOpen });
	(0, import_react.useEffect)(() => {
		if (state.isOpen && popoverRef.current) {
			var _groupRef_current, _groupRef_current1;
			if (isNonModal) return $5e3802645cc19319$export$1020fa7f77e17884((_groupRef_current = groupRef === null || groupRef === void 0 ? void 0 : groupRef.current) !== null && _groupRef_current !== void 0 ? _groupRef_current : popoverRef.current);
			else return $5e3802645cc19319$export$1c3ebcada18427bf([(_groupRef_current1 = groupRef === null || groupRef === void 0 ? void 0 : groupRef.current) !== null && _groupRef_current1 !== void 0 ? _groupRef_current1 : popoverRef.current], { shouldUseInert: true });
		}
	}, [
		isNonModal,
		state.isOpen,
		popoverRef,
		groupRef
	]);
	return {
		popoverProps: $3ef42575df84b30b$export$9d1611c77c2fe928(overlayProps, positionProps),
		arrowProps,
		underlayProps,
		placement,
		triggerAnchorPoint: origin
	};
}
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/Overlay.mjs
var $337b884510726a0d$export$a2200b96afd16271 = /* @__PURE__ */ import_react.createContext(null);
function $337b884510726a0d$export$c6fdb837b070b4ff(props) {
	let isSSR = $b5e257d569688ac6$export$535bd6ca7f90a273();
	let { portalContainer = isSSR ? null : document.body, isExiting } = props;
	let [contain, setContain] = (0, import_react.useState)(false);
	let contextValue = (0, import_react.useMemo)(() => ({
		contain,
		setContain
	}), [contain, setContain]);
	let { getContainer } = $96b38030c423d352$export$9fc1347d4195ccb3();
	if (!props.portalContainer && getContainer) portalContainer = getContainer();
	if (!portalContainer) return null;
	let contents = props.children;
	if (!props.disableFocusManagement) contents = /* @__PURE__ */ import_react.createElement($9bf71ea28793e738$export$20e40289641fbbb6, {
		restoreFocus: true,
		contain: (props.shouldContainFocus || contain) && !isExiting
	}, contents);
	contents = /* @__PURE__ */ import_react.createElement($337b884510726a0d$export$a2200b96afd16271.Provider, { value: contextValue }, /* @__PURE__ */ import_react.createElement($f1ab8c75478c6f73$export$cf75428e0b9ed1ea, null, contents));
	return /* @__PURE__ */ import_react_dom.createPortal(contents, portalContainer);
}
function $337b884510726a0d$export$14c98a7594375490() {
	let ctx = (0, import_react.useContext)($337b884510726a0d$export$a2200b96afd16271);
	let setContain = ctx === null || ctx === void 0 ? void 0 : ctx.setContain;
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		setContain === null || setContain === void 0 || setContain(true);
	}, [setContain]);
}
//#endregion
//#region ../../node_modules/@react-aria/overlays/dist/useModalOverlay.mjs
function $8ac8429251c45e4b$export$dbc0f175b25fb0fb(props, state, ref) {
	let { overlayProps, underlayProps } = $a11501f3d1d39e6c$export$ea8f71083e90600f({
		...props,
		isOpen: state.isOpen,
		onClose: state.close
	}, ref);
	$49c51c25361d4cd2$export$ee0f7cc6afcd1c18({ isDisabled: !state.isOpen });
	$337b884510726a0d$export$14c98a7594375490();
	(0, import_react.useEffect)(() => {
		if (state.isOpen && ref.current) return $5e3802645cc19319$export$1c3ebcada18427bf([ref.current], { shouldUseInert: true });
	}, [state.isOpen, ref]);
	return {
		modalProps: $3ef42575df84b30b$export$9d1611c77c2fe928(overlayProps),
		underlayProps
	};
}
//#endregion
//#region ../../node_modules/@react-aria/listbox/dist/utils.mjs
var $b1f0cad8af73213b$export$3585ede4d035bf14 = /* @__PURE__ */ new WeakMap();
function $b1f0cad8af73213b$var$normalizeKey(key) {
	if (typeof key === "string") return key.replace(/\s*/g, "");
	return "" + key;
}
function $b1f0cad8af73213b$export$9145995848b05025(state, itemKey) {
	let data = $b1f0cad8af73213b$export$3585ede4d035bf14.get(state);
	if (!data) throw new Error("Unknown list");
	return `${data.id}-option-${$b1f0cad8af73213b$var$normalizeKey(itemKey)}`;
}
//#endregion
//#region ../../node_modules/@react-aria/label/dist/useLabel.mjs
function $d191a55c9702f145$export$8467354a121f1b9f(props) {
	let { id, label, "aria-labelledby": ariaLabelledby, "aria-label": ariaLabel, labelElementType = "label" } = props;
	id = $bdb11010cef70236$export$f680877a34711e37(id);
	let labelId = $bdb11010cef70236$export$f680877a34711e37();
	let labelProps = {};
	if (label) {
		ariaLabelledby = ariaLabelledby ? `${labelId} ${ariaLabelledby}` : labelId;
		labelProps = {
			id: labelId,
			htmlFor: labelElementType === "label" ? id : void 0
		};
	}
	let fieldProps = $313b98861ee5dd6c$export$d6875122194c7b44({
		id,
		"aria-label": ariaLabel,
		"aria-labelledby": ariaLabelledby
	});
	return {
		labelProps,
		fieldProps
	};
}
//#endregion
//#region ../../node_modules/@react-aria/selection/dist/utils.mjs
function $feb5ffebff200149$export$d3e3bd3e26688c04(e) {
	return $c87311424ea30a05$export$e1865c3bedcd822b() ? e.altKey : e.ctrlKey;
}
function $feb5ffebff200149$export$c3d8340acf92597f(collectionRef, key) {
	var _collectionRef_current, _collectionRef_current1;
	let selector = `[data-key="${CSS.escape(String(key))}"]`;
	let collection = (_collectionRef_current = collectionRef.current) === null || _collectionRef_current === void 0 ? void 0 : _collectionRef_current.dataset.collection;
	if (collection) selector = `[data-collection="${CSS.escape(collection)}"]${selector}`;
	return (_collectionRef_current1 = collectionRef.current) === null || _collectionRef_current1 === void 0 ? void 0 : _collectionRef_current1.querySelector(selector);
}
var $feb5ffebff200149$var$collectionMap = /* @__PURE__ */ new WeakMap();
function $feb5ffebff200149$export$881eb0d9f3605d9d(collection) {
	let id = $bdb11010cef70236$export$f680877a34711e37();
	$feb5ffebff200149$var$collectionMap.set(collection, id);
	return id;
}
function $feb5ffebff200149$export$6aeb1680a0ae8741(collection) {
	return $feb5ffebff200149$var$collectionMap.get(collection);
}
//#endregion
//#region ../../node_modules/@react-aria/selection/dist/useTypeSelect.mjs
/**
* Controls how long to wait before clearing the typeahead buffer.
*/ var $fb3050f43d946246$var$TYPEAHEAD_DEBOUNCE_WAIT_MS = 1e3;
function $fb3050f43d946246$export$e32c88dfddc6e1d8(options) {
	let { keyboardDelegate, selectionManager, onTypeSelect } = options;
	let state = (0, import_react.useRef)({
		search: "",
		timeout: void 0
	}).current;
	let onKeyDown = (e) => {
		let character = $fb3050f43d946246$var$getStringForKey(e.key);
		if (!character || e.ctrlKey || e.metaKey || !$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e)) || state.search.length === 0 && character === " ") return;
		if (character === " " && state.search.trim().length > 0) {
			e.preventDefault();
			if (!("continuePropagation" in e)) e.stopPropagation();
		}
		state.search += character;
		if (keyboardDelegate.getKeyForSearch != null) {
			let key = keyboardDelegate.getKeyForSearch(state.search, selectionManager.focusedKey);
			if (key == null) key = keyboardDelegate.getKeyForSearch(state.search);
			if (key != null) {
				selectionManager.setFocusedKey(key);
				if (onTypeSelect) onTypeSelect(key);
			}
		}
		clearTimeout(state.timeout);
		state.timeout = setTimeout(() => {
			state.search = "";
		}, $fb3050f43d946246$var$TYPEAHEAD_DEBOUNCE_WAIT_MS);
	};
	return { typeSelectProps: { onKeyDownCapture: keyboardDelegate.getKeyForSearch ? onKeyDown : void 0 } };
}
function $fb3050f43d946246$var$getStringForKey(key) {
	if (key.length === 1 || !/^[A-Z]/i.test(key)) return key;
	return "";
}
//#endregion
//#region ../../node_modules/@react-aria/selection/dist/useSelectableCollection.mjs
function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
	let { selectionManager: manager, keyboardDelegate: delegate, ref, autoFocus = false, shouldFocusWrap = false, disallowEmptySelection = false, disallowSelectAll = false, escapeKeyBehavior = "clearSelection", selectOnFocus = manager.selectionBehavior === "replace", disallowTypeAhead = false, shouldUseVirtualFocus, allowsTabNavigation = false, scrollRef = ref, linkBehavior = "action" } = options;
	let { direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
	let router = $ea8dcbcb9ea1b556$export$9a302a45f65d0572();
	let onKeyDown = (e) => {
		if (e.altKey && e.key === "Tab") e.preventDefault();
		if (!ref.current || !$d4ee10de306f2510$export$4282f70798064fe0(ref.current, $d4ee10de306f2510$export$e58f029f0fbfdb29(e))) return;
		const navigateToKey = (key, childFocus) => {
			if (key != null) {
				if (manager.isLink(key) && linkBehavior === "selection" && selectOnFocus && !$feb5ffebff200149$export$d3e3bd3e26688c04(e)) {
					(0, import_react_dom.flushSync)(() => {
						manager.setFocusedKey(key, childFocus);
					});
					let item = $feb5ffebff200149$export$c3d8340acf92597f(ref, key);
					let itemProps = manager.getItemProps(key);
					if (item) router.open(item, e, itemProps.href, itemProps.routerOptions);
					return;
				}
				manager.setFocusedKey(key, childFocus);
				if (manager.isLink(key) && linkBehavior === "override") return;
				if (e.shiftKey && manager.selectionMode === "multiple") manager.extendSelection(key);
				else if (selectOnFocus && !$feb5ffebff200149$export$d3e3bd3e26688c04(e)) manager.replaceSelection(key);
			}
		};
		switch (e.key) {
			case "ArrowDown":
				if (delegate.getKeyBelow) {
					var _delegate_getKeyBelow, _delegate_getFirstKey, _delegate_getFirstKey1;
					let nextKey = manager.focusedKey != null ? (_delegate_getKeyBelow = delegate.getKeyBelow) === null || _delegate_getKeyBelow === void 0 ? void 0 : _delegate_getKeyBelow.call(delegate, manager.focusedKey) : (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate);
					if (nextKey == null && shouldFocusWrap) nextKey = (_delegate_getFirstKey1 = delegate.getFirstKey) === null || _delegate_getFirstKey1 === void 0 ? void 0 : _delegate_getFirstKey1.call(delegate, manager.focusedKey);
					if (nextKey != null) {
						e.preventDefault();
						navigateToKey(nextKey);
					}
				}
				break;
			case "ArrowUp":
				if (delegate.getKeyAbove) {
					var _delegate_getKeyAbove, _delegate_getLastKey, _delegate_getLastKey1;
					let nextKey = manager.focusedKey != null ? (_delegate_getKeyAbove = delegate.getKeyAbove) === null || _delegate_getKeyAbove === void 0 ? void 0 : _delegate_getKeyAbove.call(delegate, manager.focusedKey) : (_delegate_getLastKey = delegate.getLastKey) === null || _delegate_getLastKey === void 0 ? void 0 : _delegate_getLastKey.call(delegate);
					if (nextKey == null && shouldFocusWrap) nextKey = (_delegate_getLastKey1 = delegate.getLastKey) === null || _delegate_getLastKey1 === void 0 ? void 0 : _delegate_getLastKey1.call(delegate, manager.focusedKey);
					if (nextKey != null) {
						e.preventDefault();
						navigateToKey(nextKey);
					}
				}
				break;
			case "ArrowLeft":
				if (delegate.getKeyLeftOf) {
					var _delegate_getKeyLeftOf, _delegate_getFirstKey2, _delegate_getLastKey2;
					let nextKey = manager.focusedKey != null ? (_delegate_getKeyLeftOf = delegate.getKeyLeftOf) === null || _delegate_getKeyLeftOf === void 0 ? void 0 : _delegate_getKeyLeftOf.call(delegate, manager.focusedKey) : null;
					if (nextKey == null && shouldFocusWrap) nextKey = direction === "rtl" ? (_delegate_getFirstKey2 = delegate.getFirstKey) === null || _delegate_getFirstKey2 === void 0 ? void 0 : _delegate_getFirstKey2.call(delegate, manager.focusedKey) : (_delegate_getLastKey2 = delegate.getLastKey) === null || _delegate_getLastKey2 === void 0 ? void 0 : _delegate_getLastKey2.call(delegate, manager.focusedKey);
					if (nextKey != null) {
						e.preventDefault();
						navigateToKey(nextKey, direction === "rtl" ? "first" : "last");
					}
				}
				break;
			case "ArrowRight":
				if (delegate.getKeyRightOf) {
					var _delegate_getKeyRightOf, _delegate_getLastKey3, _delegate_getFirstKey3;
					let nextKey = manager.focusedKey != null ? (_delegate_getKeyRightOf = delegate.getKeyRightOf) === null || _delegate_getKeyRightOf === void 0 ? void 0 : _delegate_getKeyRightOf.call(delegate, manager.focusedKey) : null;
					if (nextKey == null && shouldFocusWrap) nextKey = direction === "rtl" ? (_delegate_getLastKey3 = delegate.getLastKey) === null || _delegate_getLastKey3 === void 0 ? void 0 : _delegate_getLastKey3.call(delegate, manager.focusedKey) : (_delegate_getFirstKey3 = delegate.getFirstKey) === null || _delegate_getFirstKey3 === void 0 ? void 0 : _delegate_getFirstKey3.call(delegate, manager.focusedKey);
					if (nextKey != null) {
						e.preventDefault();
						navigateToKey(nextKey, direction === "rtl" ? "last" : "first");
					}
				}
				break;
			case "Home":
				if (delegate.getFirstKey) {
					if (manager.focusedKey === null && e.shiftKey) return;
					e.preventDefault();
					let firstKey = delegate.getFirstKey(manager.focusedKey, $21f1aa98acb08317$export$16792effe837dba3(e));
					manager.setFocusedKey(firstKey);
					if (firstKey != null) {
						if ($21f1aa98acb08317$export$16792effe837dba3(e) && e.shiftKey && manager.selectionMode === "multiple") manager.extendSelection(firstKey);
						else if (selectOnFocus) manager.replaceSelection(firstKey);
					}
				}
				break;
			case "End":
				if (delegate.getLastKey) {
					if (manager.focusedKey === null && e.shiftKey) return;
					e.preventDefault();
					let lastKey = delegate.getLastKey(manager.focusedKey, $21f1aa98acb08317$export$16792effe837dba3(e));
					manager.setFocusedKey(lastKey);
					if (lastKey != null) {
						if ($21f1aa98acb08317$export$16792effe837dba3(e) && e.shiftKey && manager.selectionMode === "multiple") manager.extendSelection(lastKey);
						else if (selectOnFocus) manager.replaceSelection(lastKey);
					}
				}
				break;
			case "PageDown":
				if (delegate.getKeyPageBelow && manager.focusedKey != null) {
					let nextKey = delegate.getKeyPageBelow(manager.focusedKey);
					if (nextKey != null) {
						e.preventDefault();
						navigateToKey(nextKey);
					}
				}
				break;
			case "PageUp":
				if (delegate.getKeyPageAbove && manager.focusedKey != null) {
					let nextKey = delegate.getKeyPageAbove(manager.focusedKey);
					if (nextKey != null) {
						e.preventDefault();
						navigateToKey(nextKey);
					}
				}
				break;
			case "a":
				if ($21f1aa98acb08317$export$16792effe837dba3(e) && manager.selectionMode === "multiple" && disallowSelectAll !== true) {
					e.preventDefault();
					manager.selectAll();
				}
				break;
			case "Escape":
				if (escapeKeyBehavior === "clearSelection" && !disallowEmptySelection && manager.selectedKeys.size !== 0) {
					e.stopPropagation();
					e.preventDefault();
					manager.clearSelection();
				}
				break;
			case "Tab": if (!allowsTabNavigation) {
				if (e.shiftKey) ref.current.focus();
				else {
					let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(ref.current, { tabbable: true });
					let next = void 0;
					let last;
					do {
						last = walker.lastChild();
						if (last) next = last;
					} while (last);
					let activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576();
					if (next && (!$d4ee10de306f2510$export$b4f377a2b6254582(next) || activeElement && !$b4b717babfbb907b$export$bebd5a1431fec25d(activeElement))) $7215afc6de606d6b$export$de79e2c695e052f3(next);
				}
				break;
			}
		}
	};
	let scrollPos = (0, import_react.useRef)({
		top: 0,
		left: 0
	});
	$e9faafb641e167db$export$90fc3a17d93f704c(scrollRef, "scroll", () => {
		var _scrollRef_current, _scrollRef_current1;
		var _scrollRef_current_scrollTop, _scrollRef_current_scrollLeft;
		scrollPos.current = {
			top: (_scrollRef_current_scrollTop = (_scrollRef_current = scrollRef.current) === null || _scrollRef_current === void 0 ? void 0 : _scrollRef_current.scrollTop) !== null && _scrollRef_current_scrollTop !== void 0 ? _scrollRef_current_scrollTop : 0,
			left: (_scrollRef_current_scrollLeft = (_scrollRef_current1 = scrollRef.current) === null || _scrollRef_current1 === void 0 ? void 0 : _scrollRef_current1.scrollLeft) !== null && _scrollRef_current_scrollLeft !== void 0 ? _scrollRef_current_scrollLeft : 0
		};
	});
	let onFocus = (e) => {
		if (manager.isFocused) {
			if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e))) manager.setFocused(false);
			return;
		}
		if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e))) return;
		manager.setFocused(true);
		if (manager.focusedKey == null) {
			var _delegate_getLastKey, _delegate_getFirstKey;
			let navigateToKey = (key) => {
				if (key != null) {
					manager.setFocusedKey(key);
					if (selectOnFocus && !manager.isSelected(key)) manager.replaceSelection(key);
				}
			};
			let relatedTarget = e.relatedTarget;
			var _manager_lastSelectedKey, _manager_firstSelectedKey;
			if (relatedTarget && e.currentTarget.compareDocumentPosition(relatedTarget) & Node.DOCUMENT_POSITION_FOLLOWING) navigateToKey((_manager_lastSelectedKey = manager.lastSelectedKey) !== null && _manager_lastSelectedKey !== void 0 ? _manager_lastSelectedKey : (_delegate_getLastKey = delegate.getLastKey) === null || _delegate_getLastKey === void 0 ? void 0 : _delegate_getLastKey.call(delegate));
			else navigateToKey((_manager_firstSelectedKey = manager.firstSelectedKey) !== null && _manager_firstSelectedKey !== void 0 ? _manager_firstSelectedKey : (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate));
		} else if (scrollRef.current) {
			scrollRef.current.scrollTop = scrollPos.current.top;
			scrollRef.current.scrollLeft = scrollPos.current.left;
		}
		if (manager.focusedKey != null && scrollRef.current) {
			let element = $feb5ffebff200149$export$c3d8340acf92597f(ref, manager.focusedKey);
			if (element instanceof HTMLElement) {
				if (!$d4ee10de306f2510$export$b4f377a2b6254582(element) && !shouldUseVirtualFocus) $7215afc6de606d6b$export$de79e2c695e052f3(element);
				if ($507fabe10e71c6fb$export$630ff653c5ada6a9() === "keyboard") $2f04cbc44ee30ce0$export$c826860796309d1b(element, { containingElement: ref.current });
			}
		}
	};
	let onBlur = (e) => {
		if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, e.relatedTarget)) manager.setFocused(false);
	};
	let shouldVirtualFocusFirst = (0, import_react.useRef)(false);
	$e9faafb641e167db$export$90fc3a17d93f704c(ref, $5671b20cf9b562b2$export$831c820ad60f9d12, !shouldUseVirtualFocus ? void 0 : (e) => {
		let { detail } = e;
		e.stopPropagation();
		manager.setFocused(true);
		if ((detail === null || detail === void 0 ? void 0 : detail.focusStrategy) === "first") shouldVirtualFocusFirst.current = true;
	});
	$ca9b37712f007381$export$72ef708ab07251f1(() => {
		if (shouldVirtualFocusFirst.current) {
			var _delegate_getFirstKey;
			var _delegate_getFirstKey1;
			let keyToFocus = (_delegate_getFirstKey1 = (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate)) !== null && _delegate_getFirstKey1 !== void 0 ? _delegate_getFirstKey1 : null;
			if (keyToFocus == null) {
				let previousActiveElement = $d4ee10de306f2510$export$cd4e5573fbe2b576();
				$55f9b1ae81f22853$export$76e4e37e5339496d(ref.current);
				$55f9b1ae81f22853$export$2b35b76d2e30e129(previousActiveElement, null);
				if (manager.collection.size > 0) shouldVirtualFocusFirst.current = false;
			} else {
				manager.setFocusedKey(keyToFocus);
				shouldVirtualFocusFirst.current = false;
			}
		}
	}, [manager.collection]);
	$ca9b37712f007381$export$72ef708ab07251f1(() => {
		if (manager.collection.size > 0) shouldVirtualFocusFirst.current = false;
	}, [manager.focusedKey]);
	$e9faafb641e167db$export$90fc3a17d93f704c(ref, $5671b20cf9b562b2$export$447a38995de2c711, !shouldUseVirtualFocus ? void 0 : (e) => {
		var _e_detail;
		e.stopPropagation();
		manager.setFocused(false);
		if ((_e_detail = e.detail) === null || _e_detail === void 0 ? void 0 : _e_detail.clearFocusKey) manager.setFocusedKey(null);
	});
	const autoFocusRef = (0, import_react.useRef)(autoFocus);
	const didAutoFocusRef = (0, import_react.useRef)(false);
	(0, import_react.useEffect)(() => {
		if (autoFocusRef.current) {
			var _delegate_getFirstKey, _delegate_getLastKey;
			let focusedKey = null;
			var _delegate_getFirstKey1;
			if (autoFocus === "first") focusedKey = (_delegate_getFirstKey1 = (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate)) !== null && _delegate_getFirstKey1 !== void 0 ? _delegate_getFirstKey1 : null;
			var _delegate_getLastKey1;
			if (autoFocus === "last") focusedKey = (_delegate_getLastKey1 = (_delegate_getLastKey = delegate.getLastKey) === null || _delegate_getLastKey === void 0 ? void 0 : _delegate_getLastKey.call(delegate)) !== null && _delegate_getLastKey1 !== void 0 ? _delegate_getLastKey1 : null;
			let selectedKeys = manager.selectedKeys;
			if (selectedKeys.size) {
				for (let key of selectedKeys) if (manager.canSelectItem(key)) {
					focusedKey = key;
					break;
				}
			}
			manager.setFocused(true);
			manager.setFocusedKey(focusedKey);
			if (focusedKey == null && !shouldUseVirtualFocus && ref.current) $3ad3f6e1647bc98d$export$80f3e147d781571c(ref.current);
			if (manager.collection.size > 0) {
				autoFocusRef.current = false;
				didAutoFocusRef.current = true;
			}
		}
	});
	let lastFocusedKey = (0, import_react.useRef)(manager.focusedKey);
	let raf = (0, import_react.useRef)(null);
	(0, import_react.useEffect)(() => {
		if (manager.isFocused && manager.focusedKey != null && (manager.focusedKey !== lastFocusedKey.current || didAutoFocusRef.current) && scrollRef.current && ref.current) {
			let modality = $507fabe10e71c6fb$export$630ff653c5ada6a9();
			let element = $feb5ffebff200149$export$c3d8340acf92597f(ref, manager.focusedKey);
			if (!(element instanceof HTMLElement)) return;
			if (modality === "keyboard" || didAutoFocusRef.current) {
				if (raf.current) cancelAnimationFrame(raf.current);
				raf.current = requestAnimationFrame(() => {
					if (scrollRef.current) {
						$2f04cbc44ee30ce0$export$53a0910f038337bd(scrollRef.current, element);
						if (modality !== "virtual") $2f04cbc44ee30ce0$export$c826860796309d1b(element, { containingElement: ref.current });
					}
				});
			}
		}
		if (!shouldUseVirtualFocus && manager.isFocused && manager.focusedKey == null && lastFocusedKey.current != null && ref.current) $3ad3f6e1647bc98d$export$80f3e147d781571c(ref.current);
		lastFocusedKey.current = manager.focusedKey;
		didAutoFocusRef.current = false;
	});
	(0, import_react.useEffect)(() => {
		return () => {
			if (raf.current) cancelAnimationFrame(raf.current);
		};
	}, []);
	$e9faafb641e167db$export$90fc3a17d93f704c(ref, "react-aria-focus-scope-restore", (e) => {
		e.preventDefault();
		manager.setFocused(true);
	});
	let handlers = {
		onKeyDown,
		onFocus,
		onBlur,
		onMouseDown(e) {
			if (scrollRef.current === $d4ee10de306f2510$export$e58f029f0fbfdb29(e)) e.preventDefault();
		}
	};
	let { typeSelectProps } = $fb3050f43d946246$export$e32c88dfddc6e1d8({
		keyboardDelegate: delegate,
		selectionManager: manager
	});
	if (!disallowTypeAhead) handlers = $3ef42575df84b30b$export$9d1611c77c2fe928(typeSelectProps, handlers);
	let tabIndex = void 0;
	if (!shouldUseVirtualFocus) tabIndex = manager.focusedKey == null ? 0 : -1;
	let collectionId = $feb5ffebff200149$export$881eb0d9f3605d9d(manager.collection);
	return { collectionProps: $3ef42575df84b30b$export$9d1611c77c2fe928(handlers, {
		tabIndex,
		"data-collection": collectionId
	}) };
}
//#endregion
//#region ../../node_modules/@react-aria/selection/dist/useSelectableItem.mjs
function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
	let { id, selectionManager: manager, key, ref, shouldSelectOnPressUp, shouldUseVirtualFocus, focus, isDisabled, onAction, allowsDifferentPressOrigin, linkBehavior = "action" } = options;
	let router = $ea8dcbcb9ea1b556$export$9a302a45f65d0572();
	id = $bdb11010cef70236$export$f680877a34711e37(id);
	let onSelect = (e) => {
		if (e.pointerType === "keyboard" && $feb5ffebff200149$export$d3e3bd3e26688c04(e)) manager.toggleSelection(key);
		else {
			if (manager.selectionMode === "none") return;
			if (manager.isLink(key)) {
				if (linkBehavior === "selection" && ref.current) {
					let itemProps = manager.getItemProps(key);
					router.open(ref.current, e, itemProps.href, itemProps.routerOptions);
					manager.setSelectedKeys(manager.selectedKeys);
					return;
				} else if (linkBehavior === "override" || linkBehavior === "none") return;
			}
			if (manager.selectionMode === "single") if (manager.isSelected(key) && !manager.disallowEmptySelection) manager.toggleSelection(key);
			else manager.replaceSelection(key);
			else if (e && e.shiftKey) manager.extendSelection(key);
			else if (manager.selectionBehavior === "toggle" || e && ($21f1aa98acb08317$export$16792effe837dba3(e) || e.pointerType === "touch" || e.pointerType === "virtual")) manager.toggleSelection(key);
			else manager.replaceSelection(key);
		}
	};
	(0, import_react.useEffect)(() => {
		if (key === manager.focusedKey && manager.isFocused) if (!shouldUseVirtualFocus) {
			if (focus) focus();
			else if ($d4ee10de306f2510$export$cd4e5573fbe2b576() !== ref.current && ref.current) $3ad3f6e1647bc98d$export$80f3e147d781571c(ref.current);
		} else $55f9b1ae81f22853$export$76e4e37e5339496d(ref.current);
	}, [
		ref,
		key,
		manager.focusedKey,
		manager.childFocusStrategy,
		manager.isFocused,
		shouldUseVirtualFocus
	]);
	isDisabled = isDisabled || manager.isDisabled(key);
	let itemProps = {};
	if (!shouldUseVirtualFocus && !isDisabled) itemProps = {
		tabIndex: key === manager.focusedKey ? 0 : -1,
		onFocus(e) {
			if ($d4ee10de306f2510$export$e58f029f0fbfdb29(e) === ref.current) manager.setFocusedKey(key);
		}
	};
	else if (isDisabled) itemProps.onMouseDown = (e) => {
		e.preventDefault();
	};
	(0, import_react.useEffect)(() => {
		if (isDisabled && manager.focusedKey === key) manager.setFocusedKey(null);
	}, [
		manager,
		isDisabled,
		key
	]);
	let isLinkOverride = manager.isLink(key) && linkBehavior === "override";
	let isActionOverride = onAction && options["UNSTABLE_itemBehavior"] === "action";
	let hasLinkAction = manager.isLink(key) && linkBehavior !== "selection" && linkBehavior !== "none";
	let allowsSelection = !isDisabled && manager.canSelectItem(key) && !isLinkOverride && !isActionOverride;
	let allowsActions = (onAction || hasLinkAction) && !isDisabled;
	let hasPrimaryAction = allowsActions && (manager.selectionBehavior === "replace" ? !allowsSelection : !allowsSelection || manager.isEmpty);
	let hasSecondaryAction = allowsActions && allowsSelection && manager.selectionBehavior === "replace";
	let hasAction = hasPrimaryAction || hasSecondaryAction;
	let modality = (0, import_react.useRef)(null);
	let longPressEnabled = hasAction && allowsSelection;
	let longPressEnabledOnPressStart = (0, import_react.useRef)(false);
	let hadPrimaryActionOnPressStart = (0, import_react.useRef)(false);
	let collectionItemProps = manager.getItemProps(key);
	let performAction = (e) => {
		if (onAction) {
			var _ref_current;
			onAction();
			(_ref_current = ref.current) === null || _ref_current === void 0 || _ref_current.dispatchEvent(new CustomEvent("react-aria-item-action", { bubbles: true }));
		}
		if (hasLinkAction && ref.current) router.open(ref.current, e, collectionItemProps.href, collectionItemProps.routerOptions);
	};
	let itemPressProps = { ref };
	if (shouldSelectOnPressUp) {
		itemPressProps.onPressStart = (e) => {
			modality.current = e.pointerType;
			longPressEnabledOnPressStart.current = longPressEnabled;
			if (e.pointerType === "keyboard" && (!hasAction || $880e95eb8b93ba9a$var$isSelectionKey(e.key))) onSelect(e);
		};
		if (!allowsDifferentPressOrigin) itemPressProps.onPress = (e) => {
			if (hasPrimaryAction || hasSecondaryAction && e.pointerType !== "mouse") {
				if (e.pointerType === "keyboard" && !$880e95eb8b93ba9a$var$isActionKey(e.key)) return;
				performAction(e);
			} else if (e.pointerType !== "keyboard" && allowsSelection) onSelect(e);
		};
		else {
			itemPressProps.onPressUp = hasPrimaryAction ? void 0 : (e) => {
				if (e.pointerType === "mouse" && allowsSelection) onSelect(e);
			};
			itemPressProps.onPress = hasPrimaryAction ? performAction : (e) => {
				if (e.pointerType !== "keyboard" && e.pointerType !== "mouse" && allowsSelection) onSelect(e);
			};
		}
	} else {
		itemPressProps.onPressStart = (e) => {
			modality.current = e.pointerType;
			longPressEnabledOnPressStart.current = longPressEnabled;
			hadPrimaryActionOnPressStart.current = hasPrimaryAction;
			if (allowsSelection && (e.pointerType === "mouse" && !hasPrimaryAction || e.pointerType === "keyboard" && (!allowsActions || $880e95eb8b93ba9a$var$isSelectionKey(e.key)))) onSelect(e);
		};
		itemPressProps.onPress = (e) => {
			if (e.pointerType === "touch" || e.pointerType === "pen" || e.pointerType === "virtual" || e.pointerType === "keyboard" && hasAction && $880e95eb8b93ba9a$var$isActionKey(e.key) || e.pointerType === "mouse" && hadPrimaryActionOnPressStart.current) {
				if (hasAction) performAction(e);
				else if (allowsSelection) onSelect(e);
			}
		};
	}
	itemProps["data-collection"] = $feb5ffebff200149$export$6aeb1680a0ae8741(manager.collection);
	itemProps["data-key"] = key;
	itemPressProps.preventFocusOnPress = shouldUseVirtualFocus;
	if (shouldUseVirtualFocus) itemPressProps = $3ef42575df84b30b$export$9d1611c77c2fe928(itemPressProps, {
		onPressStart(e) {
			if (e.pointerType !== "touch") {
				manager.setFocused(true);
				manager.setFocusedKey(key);
			}
		},
		onPress(e) {
			if (e.pointerType === "touch") {
				manager.setFocused(true);
				manager.setFocusedKey(key);
			}
		}
	});
	if (collectionItemProps) {
		for (let key of [
			"onPressStart",
			"onPressEnd",
			"onPressChange",
			"onPress",
			"onPressUp",
			"onClick"
		]) if (collectionItemProps[key]) itemPressProps[key] = $ff5963eb1fccf552$export$e08e3b67e392101e(itemPressProps[key], collectionItemProps[key]);
	}
	let { pressProps, isPressed } = $f6c31cce2adf654f$export$45712eceda6fad21(itemPressProps);
	let onDoubleClick = hasSecondaryAction ? (e) => {
		if (modality.current === "mouse") {
			e.stopPropagation();
			e.preventDefault();
			performAction(e);
		}
	} : void 0;
	let { longPressProps } = $8a26561d2877236e$export$c24ed0104d07eab9({
		isDisabled: !longPressEnabled,
		onLongPress(e) {
			if (e.pointerType === "touch") {
				onSelect(e);
				manager.setSelectionBehavior("toggle");
			}
		}
	});
	let onDragStartCapture = (e) => {
		if (modality.current === "touch" && longPressEnabledOnPressStart.current) e.preventDefault();
	};
	let onClick = linkBehavior !== "none" && manager.isLink(key) ? (e) => {
		if (!$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening) e.preventDefault();
	} : void 0;
	return {
		itemProps: $3ef42575df84b30b$export$9d1611c77c2fe928(itemProps, allowsSelection || hasPrimaryAction || shouldUseVirtualFocus && !isDisabled ? pressProps : {}, longPressEnabled ? longPressProps : {}, {
			onDoubleClick,
			onDragStartCapture,
			onClick,
			id
		}, shouldUseVirtualFocus ? { onMouseDown: (e) => e.preventDefault() } : void 0),
		isPressed,
		isSelected: manager.isSelected(key),
		isFocused: manager.isFocused && manager.focusedKey === key,
		isDisabled,
		allowsSelection,
		hasAction
	};
}
function $880e95eb8b93ba9a$var$isActionKey(key) {
	return key === "Enter";
}
function $880e95eb8b93ba9a$var$isSelectionKey(key) {
	return key === " ";
}
//#endregion
//#region ../../node_modules/@react-aria/selection/dist/DOMLayoutDelegate.mjs
var $657e4dc4a6e88df0$export$8f5ed9ff9f511381 = class {
	getItemRect(key) {
		let container = this.ref.current;
		if (!container) return null;
		let item = key != null ? $feb5ffebff200149$export$c3d8340acf92597f(this.ref, key) : null;
		if (!item) return null;
		let containerRect = container.getBoundingClientRect();
		let itemRect = item.getBoundingClientRect();
		return {
			x: itemRect.left - containerRect.left - container.clientLeft + container.scrollLeft,
			y: itemRect.top - containerRect.top - container.clientTop + container.scrollTop,
			width: itemRect.width,
			height: itemRect.height
		};
	}
	getContentSize() {
		let container = this.ref.current;
		var _container_scrollWidth, _container_scrollHeight;
		return {
			width: (_container_scrollWidth = container === null || container === void 0 ? void 0 : container.scrollWidth) !== null && _container_scrollWidth !== void 0 ? _container_scrollWidth : 0,
			height: (_container_scrollHeight = container === null || container === void 0 ? void 0 : container.scrollHeight) !== null && _container_scrollHeight !== void 0 ? _container_scrollHeight : 0
		};
	}
	getVisibleRect() {
		let container = this.ref.current;
		var _container_scrollLeft, _container_scrollTop, _container_clientWidth, _container_clientHeight;
		return {
			x: (_container_scrollLeft = container === null || container === void 0 ? void 0 : container.scrollLeft) !== null && _container_scrollLeft !== void 0 ? _container_scrollLeft : 0,
			y: (_container_scrollTop = container === null || container === void 0 ? void 0 : container.scrollTop) !== null && _container_scrollTop !== void 0 ? _container_scrollTop : 0,
			width: (_container_clientWidth = container === null || container === void 0 ? void 0 : container.clientWidth) !== null && _container_clientWidth !== void 0 ? _container_clientWidth : 0,
			height: (_container_clientHeight = container === null || container === void 0 ? void 0 : container.clientHeight) !== null && _container_clientHeight !== void 0 ? _container_clientHeight : 0
		};
	}
	constructor(ref) {
		this.ref = ref;
	}
};
//#endregion
//#region ../../node_modules/@react-aria/selection/dist/ListKeyboardDelegate.mjs
var $2a25aae57d74318e$export$a05409b8bb224a5a = class {
	isDisabled(item) {
		var _item_props;
		return this.disabledBehavior === "all" && (((_item_props = item.props) === null || _item_props === void 0 ? void 0 : _item_props.isDisabled) || this.disabledKeys.has(item.key));
	}
	findNextNonDisabled(key, getNext) {
		let nextKey = key;
		while (nextKey != null) {
			let item = this.collection.getItem(nextKey);
			if ((item === null || item === void 0 ? void 0 : item.type) === "item" && !this.isDisabled(item)) return nextKey;
			nextKey = getNext(nextKey);
		}
		return null;
	}
	getNextKey(key) {
		let nextKey = key;
		nextKey = this.collection.getKeyAfter(nextKey);
		return this.findNextNonDisabled(nextKey, (key) => this.collection.getKeyAfter(key));
	}
	getPreviousKey(key) {
		let nextKey = key;
		nextKey = this.collection.getKeyBefore(nextKey);
		return this.findNextNonDisabled(nextKey, (key) => this.collection.getKeyBefore(key));
	}
	findKey(key, nextKey, shouldSkip) {
		let tempKey = key;
		let itemRect = this.layoutDelegate.getItemRect(tempKey);
		if (!itemRect || tempKey == null) return null;
		let prevRect = itemRect;
		do {
			tempKey = nextKey(tempKey);
			if (tempKey == null) break;
			itemRect = this.layoutDelegate.getItemRect(tempKey);
		} while (itemRect && shouldSkip(prevRect, itemRect) && tempKey != null);
		return tempKey;
	}
	isSameRow(prevRect, itemRect) {
		return prevRect.y === itemRect.y || prevRect.x !== itemRect.x;
	}
	isSameColumn(prevRect, itemRect) {
		return prevRect.x === itemRect.x || prevRect.y !== itemRect.y;
	}
	getKeyBelow(key) {
		if (this.layout === "grid" && this.orientation === "vertical") return this.findKey(key, (key) => this.getNextKey(key), this.isSameRow);
		else return this.getNextKey(key);
	}
	getKeyAbove(key) {
		if (this.layout === "grid" && this.orientation === "vertical") return this.findKey(key, (key) => this.getPreviousKey(key), this.isSameRow);
		else return this.getPreviousKey(key);
	}
	getNextColumn(key, right) {
		return right ? this.getPreviousKey(key) : this.getNextKey(key);
	}
	getKeyRightOf(key) {
		let layoutDelegateMethod = this.direction === "ltr" ? "getKeyRightOf" : "getKeyLeftOf";
		if (this.layoutDelegate[layoutDelegateMethod]) {
			key = this.layoutDelegate[layoutDelegateMethod](key);
			return this.findNextNonDisabled(key, (key) => this.layoutDelegate[layoutDelegateMethod](key));
		}
		if (this.layout === "grid") if (this.orientation === "vertical") return this.getNextColumn(key, this.direction === "rtl");
		else return this.findKey(key, (key) => this.getNextColumn(key, this.direction === "rtl"), this.isSameColumn);
		else if (this.orientation === "horizontal") return this.getNextColumn(key, this.direction === "rtl");
		return null;
	}
	getKeyLeftOf(key) {
		let layoutDelegateMethod = this.direction === "ltr" ? "getKeyLeftOf" : "getKeyRightOf";
		if (this.layoutDelegate[layoutDelegateMethod]) {
			key = this.layoutDelegate[layoutDelegateMethod](key);
			return this.findNextNonDisabled(key, (key) => this.layoutDelegate[layoutDelegateMethod](key));
		}
		if (this.layout === "grid") if (this.orientation === "vertical") return this.getNextColumn(key, this.direction === "ltr");
		else return this.findKey(key, (key) => this.getNextColumn(key, this.direction === "ltr"), this.isSameColumn);
		else if (this.orientation === "horizontal") return this.getNextColumn(key, this.direction === "ltr");
		return null;
	}
	getFirstKey() {
		let key = this.collection.getFirstKey();
		return this.findNextNonDisabled(key, (key) => this.collection.getKeyAfter(key));
	}
	getLastKey() {
		let key = this.collection.getLastKey();
		return this.findNextNonDisabled(key, (key) => this.collection.getKeyBefore(key));
	}
	getKeyPageAbove(key) {
		let menu = this.ref.current;
		let itemRect = this.layoutDelegate.getItemRect(key);
		if (!itemRect) return null;
		if (menu && !$cc38e7bd3fc7b213$export$2bb74740c4e19def(menu)) return this.getFirstKey();
		let nextKey = key;
		if (this.orientation === "horizontal") {
			let pageX = Math.max(0, itemRect.x + itemRect.width - this.layoutDelegate.getVisibleRect().width);
			while (itemRect && itemRect.x > pageX && nextKey != null) {
				nextKey = this.getKeyAbove(nextKey);
				itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
			}
		} else {
			let pageY = Math.max(0, itemRect.y + itemRect.height - this.layoutDelegate.getVisibleRect().height);
			while (itemRect && itemRect.y > pageY && nextKey != null) {
				nextKey = this.getKeyAbove(nextKey);
				itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
			}
		}
		return nextKey !== null && nextKey !== void 0 ? nextKey : this.getFirstKey();
	}
	getKeyPageBelow(key) {
		let menu = this.ref.current;
		let itemRect = this.layoutDelegate.getItemRect(key);
		if (!itemRect) return null;
		if (menu && !$cc38e7bd3fc7b213$export$2bb74740c4e19def(menu)) return this.getLastKey();
		let nextKey = key;
		if (this.orientation === "horizontal") {
			let pageX = Math.min(this.layoutDelegate.getContentSize().width, itemRect.y - itemRect.width + this.layoutDelegate.getVisibleRect().width);
			while (itemRect && itemRect.x < pageX && nextKey != null) {
				nextKey = this.getKeyBelow(nextKey);
				itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
			}
		} else {
			let pageY = Math.min(this.layoutDelegate.getContentSize().height, itemRect.y - itemRect.height + this.layoutDelegate.getVisibleRect().height);
			while (itemRect && itemRect.y < pageY && nextKey != null) {
				nextKey = this.getKeyBelow(nextKey);
				itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
			}
		}
		return nextKey !== null && nextKey !== void 0 ? nextKey : this.getLastKey();
	}
	getKeyForSearch(search, fromKey) {
		if (!this.collator) return null;
		let collection = this.collection;
		let key = fromKey || this.getFirstKey();
		while (key != null) {
			let item = collection.getItem(key);
			if (!item) return null;
			let substring = item.textValue.slice(0, search.length);
			if (item.textValue && this.collator.compare(substring, search) === 0) return key;
			key = this.getNextKey(key);
		}
		return null;
	}
	constructor(...args) {
		if (args.length === 1) {
			let opts = args[0];
			this.collection = opts.collection;
			this.ref = opts.ref;
			this.collator = opts.collator;
			this.disabledKeys = opts.disabledKeys || /* @__PURE__ */ new Set();
			this.disabledBehavior = opts.disabledBehavior || "all";
			this.orientation = opts.orientation || "vertical";
			this.direction = opts.direction;
			this.layout = opts.layout || "stack";
			this.layoutDelegate = opts.layoutDelegate || new $657e4dc4a6e88df0$export$8f5ed9ff9f511381(opts.ref);
		} else {
			this.collection = args[0];
			this.disabledKeys = args[1];
			this.ref = args[2];
			this.collator = args[3];
			this.layout = "stack";
			this.orientation = "vertical";
			this.disabledBehavior = "all";
			this.layoutDelegate = new $657e4dc4a6e88df0$export$8f5ed9ff9f511381(this.ref);
		}
		if (this.layout === "stack" && this.orientation === "vertical") {
			this.getKeyLeftOf = void 0;
			this.getKeyRightOf = void 0;
		}
	}
};
//#endregion
//#region ../../node_modules/@react-aria/selection/dist/useSelectableList.mjs
function $982254629710d113$export$b95089534ab7c1fd(props) {
	let { selectionManager, collection, disabledKeys, ref, keyboardDelegate, layoutDelegate } = props;
	let collator = $325a3faab7a68acd$export$a16aca283550c30d({
		usage: "search",
		sensitivity: "base"
	});
	let disabledBehavior = selectionManager.disabledBehavior;
	let delegate = (0, import_react.useMemo)(() => keyboardDelegate || new $2a25aae57d74318e$export$a05409b8bb224a5a({
		collection,
		disabledKeys,
		disabledBehavior,
		ref,
		collator,
		layoutDelegate
	}), [
		keyboardDelegate,
		layoutDelegate,
		collection,
		disabledKeys,
		ref,
		collator,
		disabledBehavior
	]);
	let { collectionProps } = $ae20dd8cbca75726$export$d6daf82dcd84e87c({
		...props,
		ref,
		selectionManager,
		keyboardDelegate: delegate
	});
	return { listProps: collectionProps };
}
//#endregion
//#region ../../node_modules/@react-aria/listbox/dist/useListBox.mjs
function $c132121280ec012d$export$50eacbbf140a3141(props, state, ref) {
	let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, { labelable: true });
	let selectionBehavior = props.selectionBehavior || "toggle";
	let linkBehavior = props.linkBehavior || (selectionBehavior === "replace" ? "action" : "override");
	if (selectionBehavior === "toggle" && linkBehavior === "action") linkBehavior = "override";
	let { listProps } = $982254629710d113$export$b95089534ab7c1fd({
		...props,
		ref,
		selectionManager: state.selectionManager,
		collection: state.collection,
		disabledKeys: state.disabledKeys,
		linkBehavior
	});
	let { focusWithinProps } = $9ab94262bd0047c7$export$420e68273165f4ec({
		onFocusWithin: props.onFocus,
		onBlurWithin: props.onBlur,
		onFocusWithinChange: props.onFocusChange
	});
	let id = $bdb11010cef70236$export$f680877a34711e37(props.id);
	$b1f0cad8af73213b$export$3585ede4d035bf14.set(state, {
		id,
		shouldUseVirtualFocus: props.shouldUseVirtualFocus,
		shouldSelectOnPressUp: props.shouldSelectOnPressUp,
		shouldFocusOnHover: props.shouldFocusOnHover,
		isVirtualized: props.isVirtualized,
		onAction: props.onAction,
		linkBehavior,
		UNSTABLE_itemBehavior: props["UNSTABLE_itemBehavior"]
	});
	let { labelProps, fieldProps } = $d191a55c9702f145$export$8467354a121f1b9f({
		...props,
		id,
		labelElementType: "span"
	});
	return {
		labelProps,
		listBoxProps: $3ef42575df84b30b$export$9d1611c77c2fe928(domProps, focusWithinProps, state.selectionManager.selectionMode === "multiple" ? { "aria-multiselectable": "true" } : {}, {
			role: "listbox",
			...$3ef42575df84b30b$export$9d1611c77c2fe928(fieldProps, listProps)
		})
	};
}
//#endregion
//#region ../../node_modules/@react-stately/collections/dist/CollectionBuilder.mjs
var $eb2240fc39a57fa5$export$bf788dd355e3a401 = class {
	build(props, context) {
		this.context = context;
		return $eb2240fc39a57fa5$var$iterable(() => this.iterateCollection(props));
	}
	*iterateCollection(props) {
		let { children, items } = props;
		if (import_react.isValidElement(children) && children.type === import_react.Fragment) yield* this.iterateCollection({
			children: children.props.children,
			items
		});
		else if (typeof children === "function") {
			if (!items) throw new Error("props.children was a function but props.items is missing");
			let index = 0;
			for (let item of items) {
				yield* this.getFullNode({
					value: item,
					index
				}, { renderer: children });
				index++;
			}
		} else {
			let items = [];
			import_react.Children.forEach(children, (child) => {
				if (child) items.push(child);
			});
			let index = 0;
			for (let item of items) {
				let nodes = this.getFullNode({
					element: item,
					index
				}, {});
				for (let node of nodes) {
					index++;
					yield node;
				}
			}
		}
	}
	getKey(item, partialNode, state, parentKey) {
		if (item.key != null) return item.key;
		if (partialNode.type === "cell" && partialNode.key != null) return `${parentKey}${partialNode.key}`;
		let v = partialNode.value;
		if (v != null) {
			var _v_key;
			let key = (_v_key = v.key) !== null && _v_key !== void 0 ? _v_key : v.id;
			if (key == null) throw new Error("No key found for item");
			return key;
		}
		return parentKey ? `${parentKey}.${partialNode.index}` : `$.${partialNode.index}`;
	}
	getChildState(state, partialNode) {
		return { renderer: partialNode.renderer || state.renderer };
	}
	*getFullNode(partialNode, state, parentKey, parentNode) {
		if (import_react.isValidElement(partialNode.element) && partialNode.element.type === import_react.Fragment) {
			let children = [];
			import_react.Children.forEach(partialNode.element.props.children, (child) => {
				children.push(child);
			});
			var _partialNode_index;
			let index = (_partialNode_index = partialNode.index) !== null && _partialNode_index !== void 0 ? _partialNode_index : 0;
			for (const child of children) yield* this.getFullNode({
				element: child,
				index: index++
			}, state, parentKey, parentNode);
			return;
		}
		let element = partialNode.element;
		if (!element && partialNode.value && state && state.renderer) {
			let cached = this.cache.get(partialNode.value);
			if (cached && (!cached.shouldInvalidate || !cached.shouldInvalidate(this.context))) {
				cached.index = partialNode.index;
				cached.parentKey = parentNode ? parentNode.key : null;
				yield cached;
				return;
			}
			element = state.renderer(partialNode.value);
		}
		if (import_react.isValidElement(element)) {
			let type = element.type;
			if (typeof type !== "function" && typeof type.getCollectionNode !== "function") {
				let name = element.type;
				throw new Error(`Unknown element <${name}> in collection.`);
			}
			let childNodes = type.getCollectionNode(element.props, this.context);
			var _partialNode_index1;
			let index = (_partialNode_index1 = partialNode.index) !== null && _partialNode_index1 !== void 0 ? _partialNode_index1 : 0;
			let result = childNodes.next();
			while (!result.done && result.value) {
				let childNode = result.value;
				partialNode.index = index;
				var _childNode_key;
				let nodeKey = (_childNode_key = childNode.key) !== null && _childNode_key !== void 0 ? _childNode_key : null;
				if (nodeKey == null) nodeKey = childNode.element ? null : this.getKey(element, partialNode, state, parentKey);
				let children = [...this.getFullNode({
					...childNode,
					key: nodeKey,
					index,
					wrapper: $eb2240fc39a57fa5$var$compose(partialNode.wrapper, childNode.wrapper)
				}, this.getChildState(state, childNode), parentKey ? `${parentKey}${element.key}` : element.key, parentNode)];
				for (let node of children) {
					var _childNode_value, _ref;
					node.value = (_ref = (_childNode_value = childNode.value) !== null && _childNode_value !== void 0 ? _childNode_value : partialNode.value) !== null && _ref !== void 0 ? _ref : null;
					if (node.value) this.cache.set(node.value, node);
					var _parentNode_type;
					if (partialNode.type && node.type !== partialNode.type) throw new Error(`Unsupported type <${$eb2240fc39a57fa5$var$capitalize(node.type)}> in <${$eb2240fc39a57fa5$var$capitalize((_parentNode_type = parentNode === null || parentNode === void 0 ? void 0 : parentNode.type) !== null && _parentNode_type !== void 0 ? _parentNode_type : "unknown parent type")}>. Only <${$eb2240fc39a57fa5$var$capitalize(partialNode.type)}> is supported.`);
					index++;
					yield node;
				}
				result = childNodes.next(children);
			}
			return;
		}
		if (partialNode.key == null || partialNode.type == null) return;
		let builder = this;
		var _partialNode_value, _partialNode_textValue;
		let node = {
			type: partialNode.type,
			props: partialNode.props,
			key: partialNode.key,
			parentKey: parentNode ? parentNode.key : null,
			value: (_partialNode_value = partialNode.value) !== null && _partialNode_value !== void 0 ? _partialNode_value : null,
			level: parentNode ? parentNode.level + 1 : 0,
			index: partialNode.index,
			rendered: partialNode.rendered,
			textValue: (_partialNode_textValue = partialNode.textValue) !== null && _partialNode_textValue !== void 0 ? _partialNode_textValue : "",
			"aria-label": partialNode["aria-label"],
			wrapper: partialNode.wrapper,
			shouldInvalidate: partialNode.shouldInvalidate,
			hasChildNodes: partialNode.hasChildNodes || false,
			childNodes: $eb2240fc39a57fa5$var$iterable(function* () {
				if (!partialNode.hasChildNodes || !partialNode.childNodes) return;
				let index = 0;
				for (let child of partialNode.childNodes()) {
					if (child.key != null) child.key = `${node.key}${child.key}`;
					let nodes = builder.getFullNode({
						...child,
						index
					}, builder.getChildState(state, child), node.key, node);
					for (let node of nodes) {
						index++;
						yield node;
					}
				}
			})
		};
		yield node;
	}
	constructor() {
		this.cache = /* @__PURE__ */ new WeakMap();
	}
};
function $eb2240fc39a57fa5$var$iterable(iterator) {
	let cache = [];
	let iterable = null;
	return { *[Symbol.iterator]() {
		for (let item of cache) yield item;
		if (!iterable) iterable = iterator();
		for (let item of iterable) {
			cache.push(item);
			yield item;
		}
	} };
}
function $eb2240fc39a57fa5$var$compose(outer, inner) {
	if (outer && inner) return (element) => outer(inner(element));
	if (outer) return outer;
	if (inner) return inner;
}
function $eb2240fc39a57fa5$var$capitalize(str) {
	return str[0].toUpperCase() + str.slice(1);
}
//#endregion
//#region ../../node_modules/@react-stately/collections/dist/useCollection.mjs
function $7613b1592d41b092$export$6cd28814d92fa9c9(props, factory, context) {
	let builder = (0, import_react.useMemo)(() => new $eb2240fc39a57fa5$export$bf788dd355e3a401(), []);
	let { children, items, collection } = props;
	return (0, import_react.useMemo)(() => {
		if (collection) return collection;
		return factory(builder.build({
			children,
			items
		}, context));
	}, [
		builder,
		children,
		items,
		collection,
		context,
		factory
	]);
}
//#endregion
//#region ../../node_modules/@react-stately/collections/dist/getChildNodes.mjs
function $c5a24bc478652b5f$export$1005530eda016c13(node, collection) {
	if (typeof collection.getChildren === "function") return collection.getChildren(node.key);
	return node.childNodes;
}
function $c5a24bc478652b5f$export$fbdeaa6a76694f71(iterable) {
	return $c5a24bc478652b5f$export$5f3398f8733f90e2(iterable, 0);
}
function $c5a24bc478652b5f$export$5f3398f8733f90e2(iterable, index) {
	if (index < 0) return void 0;
	let i = 0;
	for (let item of iterable) {
		if (i === index) return item;
		i++;
	}
}
function $c5a24bc478652b5f$export$8c434b3a7a4dad6(collection, a, b) {
	if (a.parentKey === b.parentKey) return a.index - b.index;
	let aAncestors = [...$c5a24bc478652b5f$var$getAncestors(collection, a), a];
	let bAncestors = [...$c5a24bc478652b5f$var$getAncestors(collection, b), b];
	let firstNonMatchingAncestor = aAncestors.slice(0, bAncestors.length).findIndex((a, i) => a !== bAncestors[i]);
	if (firstNonMatchingAncestor !== -1) {
		a = aAncestors[firstNonMatchingAncestor];
		b = bAncestors[firstNonMatchingAncestor];
		return a.index - b.index;
	}
	if (aAncestors.findIndex((node) => node === b) >= 0) return 1;
	else if (bAncestors.findIndex((node) => node === a) >= 0) return -1;
	return -1;
}
function $c5a24bc478652b5f$var$getAncestors(collection, node) {
	let parents = [];
	let currNode = node;
	while ((currNode === null || currNode === void 0 ? void 0 : currNode.parentKey) != null) {
		currNode = collection.getItem(currNode.parentKey);
		if (currNode) parents.unshift(currNode);
	}
	return parents;
}
//#endregion
//#region ../../node_modules/@react-stately/collections/dist/getItemCount.mjs
var $453cc9f0df89c0a5$var$cache = /* @__PURE__ */ new WeakMap();
function $453cc9f0df89c0a5$export$77d5aafae4e095b2(collection) {
	let count = $453cc9f0df89c0a5$var$cache.get(collection);
	if (count != null) return count;
	let counter = 0;
	let countItems = (items) => {
		for (let item of items) if (item.type === "section") countItems($c5a24bc478652b5f$export$1005530eda016c13(item, collection));
		else if (item.type === "item") counter++;
	};
	countItems(collection);
	$453cc9f0df89c0a5$var$cache.set(collection, counter);
	return counter;
}
//#endregion
//#region ../../node_modules/@react-aria/listbox/dist/useOption.mjs
function $293f70390ea03370$export$497855f14858aa34(props, state, ref) {
	var _item_props, _item_props1;
	let { key } = props;
	let data = $b1f0cad8af73213b$export$3585ede4d035bf14.get(state);
	var _props_isDisabled;
	let isDisabled = (_props_isDisabled = props.isDisabled) !== null && _props_isDisabled !== void 0 ? _props_isDisabled : state.selectionManager.isDisabled(key);
	var _props_isSelected;
	let isSelected = (_props_isSelected = props.isSelected) !== null && _props_isSelected !== void 0 ? _props_isSelected : state.selectionManager.isSelected(key);
	var _props_shouldSelectOnPressUp;
	let shouldSelectOnPressUp = (_props_shouldSelectOnPressUp = props.shouldSelectOnPressUp) !== null && _props_shouldSelectOnPressUp !== void 0 ? _props_shouldSelectOnPressUp : data === null || data === void 0 ? void 0 : data.shouldSelectOnPressUp;
	var _props_shouldFocusOnHover;
	let shouldFocusOnHover = (_props_shouldFocusOnHover = props.shouldFocusOnHover) !== null && _props_shouldFocusOnHover !== void 0 ? _props_shouldFocusOnHover : data === null || data === void 0 ? void 0 : data.shouldFocusOnHover;
	var _props_shouldUseVirtualFocus;
	let shouldUseVirtualFocus = (_props_shouldUseVirtualFocus = props.shouldUseVirtualFocus) !== null && _props_shouldUseVirtualFocus !== void 0 ? _props_shouldUseVirtualFocus : data === null || data === void 0 ? void 0 : data.shouldUseVirtualFocus;
	var _props_isVirtualized;
	let isVirtualized = (_props_isVirtualized = props.isVirtualized) !== null && _props_isVirtualized !== void 0 ? _props_isVirtualized : data === null || data === void 0 ? void 0 : data.isVirtualized;
	let labelId = $bdb11010cef70236$export$b4cc09c592e8fdb8();
	let descriptionId = $bdb11010cef70236$export$b4cc09c592e8fdb8();
	let optionProps = {
		role: "option",
		"aria-disabled": isDisabled || void 0,
		"aria-selected": state.selectionManager.selectionMode !== "none" ? isSelected : void 0
	};
	if (!($c87311424ea30a05$export$9ac100e40613ea10() && $c87311424ea30a05$export$78551043582a6a98())) {
		optionProps["aria-label"] = props["aria-label"];
		optionProps["aria-labelledby"] = labelId;
		optionProps["aria-describedby"] = descriptionId;
	}
	let item = state.collection.getItem(key);
	if (isVirtualized) {
		let index = Number(item === null || item === void 0 ? void 0 : item.index);
		optionProps["aria-posinset"] = Number.isNaN(index) ? void 0 : index + 1;
		optionProps["aria-setsize"] = $453cc9f0df89c0a5$export$77d5aafae4e095b2(state.collection);
	}
	let onAction = (data === null || data === void 0 ? void 0 : data.onAction) ? () => {
		var _data_onAction;
		return data === null || data === void 0 ? void 0 : (_data_onAction = data.onAction) === null || _data_onAction === void 0 ? void 0 : _data_onAction.call(data, key);
	} : void 0;
	let id = $b1f0cad8af73213b$export$9145995848b05025(state, key);
	let { itemProps, isPressed, isFocused, hasAction, allowsSelection } = $880e95eb8b93ba9a$export$ecf600387e221c37({
		selectionManager: state.selectionManager,
		key,
		ref,
		shouldSelectOnPressUp,
		allowsDifferentPressOrigin: shouldSelectOnPressUp && shouldFocusOnHover,
		isVirtualized,
		shouldUseVirtualFocus,
		isDisabled,
		onAction: onAction || (item === null || item === void 0 ? void 0 : (_item_props = item.props) === null || _item_props === void 0 ? void 0 : _item_props.onAction) ? $ff5963eb1fccf552$export$e08e3b67e392101e(item === null || item === void 0 ? void 0 : (_item_props1 = item.props) === null || _item_props1 === void 0 ? void 0 : _item_props1.onAction, onAction) : void 0,
		linkBehavior: data === null || data === void 0 ? void 0 : data.linkBehavior,
		UNSTABLE_itemBehavior: data === null || data === void 0 ? void 0 : data["UNSTABLE_itemBehavior"],
		id
	});
	let { hoverProps } = $6179b936705e76d3$export$ae780daf29e6d456({
		isDisabled: isDisabled || !shouldFocusOnHover,
		onHoverStart() {
			if (!$507fabe10e71c6fb$export$b9b3dfddab17db27()) {
				state.selectionManager.setFocused(true);
				state.selectionManager.setFocusedKey(key);
			}
		}
	});
	let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(item === null || item === void 0 ? void 0 : item.props);
	delete domProps.id;
	let linkProps = $ea8dcbcb9ea1b556$export$7e924b3091a3bd18(item === null || item === void 0 ? void 0 : item.props);
	return {
		optionProps: {
			...optionProps,
			...$3ef42575df84b30b$export$9d1611c77c2fe928(domProps, itemProps, hoverProps, linkProps),
			id
		},
		labelProps: { id: labelId },
		descriptionProps: { id: descriptionId },
		isFocused,
		isFocusVisible: isFocused && state.selectionManager.isFocused && $507fabe10e71c6fb$export$b9b3dfddab17db27(),
		isSelected,
		isDisabled,
		isPressed,
		allowsSelection,
		hasAction
	};
}
//#endregion
//#region ../../node_modules/@react-aria/listbox/dist/useListBoxSection.mjs
function $af383d3bef1cfdc9$export$c3f9f39876e4bc7(props) {
	let { heading, "aria-label": ariaLabel } = props;
	let headingId = $bdb11010cef70236$export$f680877a34711e37();
	return {
		itemProps: { role: "presentation" },
		headingProps: heading ? {
			id: headingId,
			role: "presentation",
			onMouseDown: (e) => {
				e.preventDefault();
			}
		} : {},
		groupProps: {
			role: "group",
			"aria-label": ariaLabel,
			"aria-labelledby": heading ? headingId : void 0
		}
	};
}
//#endregion
//#region ../../node_modules/@react-stately/form/dist/useFormValidationState.mjs
var $e5be200c675c3b3a$export$aca958c65c314e6c = {
	badInput: false,
	customError: false,
	patternMismatch: false,
	rangeOverflow: false,
	rangeUnderflow: false,
	stepMismatch: false,
	tooLong: false,
	tooShort: false,
	typeMismatch: false,
	valueMissing: false,
	valid: true
};
var $e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE = {
	...$e5be200c675c3b3a$export$aca958c65c314e6c,
	customError: true,
	valid: false
};
var $e5be200c675c3b3a$export$dad6ae84456c676a = {
	isInvalid: false,
	validationDetails: $e5be200c675c3b3a$export$aca958c65c314e6c,
	validationErrors: []
};
var $e5be200c675c3b3a$export$571b5131b7e65c11 = (0, import_react.createContext)({});
var $e5be200c675c3b3a$export$a763b9476acd3eb = "__formValidationState" + Date.now();
function $e5be200c675c3b3a$export$fc1a364ae1f3ff10(props) {
	if (props[$e5be200c675c3b3a$export$a763b9476acd3eb]) {
		let { realtimeValidation, displayValidation, updateValidation, resetValidation, commitValidation } = props[$e5be200c675c3b3a$export$a763b9476acd3eb];
		return {
			realtimeValidation,
			displayValidation,
			updateValidation,
			resetValidation,
			commitValidation
		};
	}
	return $e5be200c675c3b3a$var$useFormValidationStateImpl(props);
}
function $e5be200c675c3b3a$var$useFormValidationStateImpl(props) {
	let { isInvalid, validationState, name, value, builtinValidation, validate, validationBehavior = "aria" } = props;
	if (validationState) isInvalid || (isInvalid = validationState === "invalid");
	let controlledError = isInvalid !== void 0 ? {
		isInvalid,
		validationErrors: [],
		validationDetails: $e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE
	} : null;
	let clientError = (0, import_react.useMemo)(() => {
		if (!validate || value == null) return null;
		return $e5be200c675c3b3a$var$getValidationResult($e5be200c675c3b3a$var$runValidate(validate, value));
	}, [validate, value]);
	if (builtinValidation === null || builtinValidation === void 0 ? void 0 : builtinValidation.validationDetails.valid) builtinValidation = void 0;
	let serverErrors = (0, import_react.useContext)($e5be200c675c3b3a$export$571b5131b7e65c11);
	let serverErrorMessages = (0, import_react.useMemo)(() => {
		if (name) return Array.isArray(name) ? name.flatMap((name) => $e5be200c675c3b3a$var$asArray(serverErrors[name])) : $e5be200c675c3b3a$var$asArray(serverErrors[name]);
		return [];
	}, [serverErrors, name]);
	let [lastServerErrors, setLastServerErrors] = (0, import_react.useState)(serverErrors);
	let [isServerErrorCleared, setServerErrorCleared] = (0, import_react.useState)(false);
	if (serverErrors !== lastServerErrors) {
		setLastServerErrors(serverErrors);
		setServerErrorCleared(false);
	}
	let serverError = (0, import_react.useMemo)(() => $e5be200c675c3b3a$var$getValidationResult(isServerErrorCleared ? [] : serverErrorMessages), [isServerErrorCleared, serverErrorMessages]);
	let nextValidation = (0, import_react.useRef)($e5be200c675c3b3a$export$dad6ae84456c676a);
	let [currentValidity, setCurrentValidity] = (0, import_react.useState)($e5be200c675c3b3a$export$dad6ae84456c676a);
	let lastError = (0, import_react.useRef)($e5be200c675c3b3a$export$dad6ae84456c676a);
	let commitValidation = () => {
		if (!commitQueued) return;
		setCommitQueued(false);
		let error = clientError || builtinValidation || nextValidation.current;
		if (!$e5be200c675c3b3a$var$isEqualValidation(error, lastError.current)) {
			lastError.current = error;
			setCurrentValidity(error);
		}
	};
	let [commitQueued, setCommitQueued] = (0, import_react.useState)(false);
	(0, import_react.useEffect)(commitValidation);
	return {
		realtimeValidation: controlledError || serverError || clientError || builtinValidation || $e5be200c675c3b3a$export$dad6ae84456c676a,
		displayValidation: validationBehavior === "native" ? controlledError || serverError || currentValidity : controlledError || serverError || clientError || builtinValidation || currentValidity,
		updateValidation(value) {
			if (validationBehavior === "aria" && !$e5be200c675c3b3a$var$isEqualValidation(currentValidity, value)) setCurrentValidity(value);
			else nextValidation.current = value;
		},
		resetValidation() {
			let error = $e5be200c675c3b3a$export$dad6ae84456c676a;
			if (!$e5be200c675c3b3a$var$isEqualValidation(error, lastError.current)) {
				lastError.current = error;
				setCurrentValidity(error);
			}
			if (validationBehavior === "native") setCommitQueued(false);
			setServerErrorCleared(true);
		},
		commitValidation() {
			if (validationBehavior === "native") setCommitQueued(true);
			setServerErrorCleared(true);
		}
	};
}
function $e5be200c675c3b3a$var$asArray(v) {
	if (!v) return [];
	return Array.isArray(v) ? v : [v];
}
function $e5be200c675c3b3a$var$runValidate(validate, value) {
	if (typeof validate === "function") {
		let e = validate(value);
		if (e && typeof e !== "boolean") return $e5be200c675c3b3a$var$asArray(e);
	}
	return [];
}
function $e5be200c675c3b3a$var$getValidationResult(errors) {
	return errors.length ? {
		isInvalid: true,
		validationErrors: errors,
		validationDetails: $e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE
	} : null;
}
function $e5be200c675c3b3a$var$isEqualValidation(a, b) {
	if (a === b) return true;
	return !!a && !!b && a.isInvalid === b.isInvalid && a.validationErrors.length === b.validationErrors.length && a.validationErrors.every((a, i) => a === b.validationErrors[i]) && Object.entries(a.validationDetails).every(([k, v]) => b.validationDetails[k] === v);
}
//#endregion
//#region ../../node_modules/@react-aria/collections/dist/BaseCollection.mjs
var $23b9f4fcf0fe224b$export$d68d59712b04d9d1 = class {
	get childNodes() {
		throw new Error("childNodes is not supported");
	}
	clone() {
		let node = new this.constructor(this.key);
		node.value = this.value;
		node.level = this.level;
		node.hasChildNodes = this.hasChildNodes;
		node.rendered = this.rendered;
		node.textValue = this.textValue;
		node["aria-label"] = this["aria-label"];
		node.index = this.index;
		node.parentKey = this.parentKey;
		node.prevKey = this.prevKey;
		node.nextKey = this.nextKey;
		node.firstChildKey = this.firstChildKey;
		node.lastChildKey = this.lastChildKey;
		node.props = this.props;
		node.render = this.render;
		node.colSpan = this.colSpan;
		node.colIndex = this.colIndex;
		return node;
	}
	filter(collection, newCollection, filterFn) {
		let clone = this.clone();
		newCollection.addDescendants(clone, collection);
		return clone;
	}
	constructor(key) {
		this.value = null;
		this.level = 0;
		this.hasChildNodes = false;
		this.rendered = null;
		this.textValue = "";
		this["aria-label"] = void 0;
		this.index = 0;
		this.parentKey = null;
		this.prevKey = null;
		this.nextKey = null;
		this.firstChildKey = null;
		this.lastChildKey = null;
		this.props = {};
		this.colSpan = null;
		this.colIndex = null;
		this.type = this.constructor.type;
		this.key = key;
	}
};
var $23b9f4fcf0fe224b$export$b1918e978f1ee46f = class extends $23b9f4fcf0fe224b$export$d68d59712b04d9d1 {
	filter(collection, newCollection, filterFn) {
		let [firstKey, lastKey] = $23b9f4fcf0fe224b$var$filterChildren(collection, newCollection, this.firstChildKey, filterFn);
		let newNode = this.clone();
		newNode.firstChildKey = firstKey;
		newNode.lastChildKey = lastKey;
		return newNode;
	}
};
var $23b9f4fcf0fe224b$export$5ae2504e948afce5 = class extends $23b9f4fcf0fe224b$export$d68d59712b04d9d1 {};
$23b9f4fcf0fe224b$export$5ae2504e948afce5.type = "header";
var $23b9f4fcf0fe224b$export$8258a0665a675899 = class extends $23b9f4fcf0fe224b$export$d68d59712b04d9d1 {};
$23b9f4fcf0fe224b$export$8258a0665a675899.type = "loader";
var $23b9f4fcf0fe224b$export$fd11f34e1d07f134 = class extends $23b9f4fcf0fe224b$export$b1918e978f1ee46f {
	filter(collection, newCollection, filterFn) {
		if (filterFn(this.textValue, this)) {
			let clone = this.clone();
			newCollection.addDescendants(clone, collection);
			return clone;
		}
		return null;
	}
};
$23b9f4fcf0fe224b$export$fd11f34e1d07f134.type = "item";
var $23b9f4fcf0fe224b$export$437f11dc9b403b78 = class extends $23b9f4fcf0fe224b$export$b1918e978f1ee46f {
	filter(collection, newCollection, filterFn) {
		let filteredSection = super.filter(collection, newCollection, filterFn);
		if (filteredSection) {
			if (filteredSection.lastChildKey !== null) {
				let lastChild = collection.getItem(filteredSection.lastChildKey);
				if (lastChild && lastChild.type !== "header") return filteredSection;
			}
		}
		return null;
	}
};
$23b9f4fcf0fe224b$export$437f11dc9b403b78.type = "section";
var $23b9f4fcf0fe224b$export$408d25a4e12db025 = class {
	get size() {
		return this.itemCount;
	}
	getKeys() {
		return this.keyMap.keys();
	}
	*[Symbol.iterator]() {
		let node = this.firstKey != null ? this.keyMap.get(this.firstKey) : void 0;
		while (node) {
			yield node;
			node = node.nextKey != null ? this.keyMap.get(node.nextKey) : void 0;
		}
	}
	getChildren(key) {
		let keyMap = this.keyMap;
		return { *[Symbol.iterator]() {
			let parent = keyMap.get(key);
			let node = (parent === null || parent === void 0 ? void 0 : parent.firstChildKey) != null ? keyMap.get(parent.firstChildKey) : null;
			while (node) {
				yield node;
				node = node.nextKey != null ? keyMap.get(node.nextKey) : void 0;
			}
		} };
	}
	getKeyBefore(key) {
		let node = this.keyMap.get(key);
		if (!node) return null;
		if (node.prevKey != null) {
			node = this.keyMap.get(node.prevKey);
			while (node && node.type !== "item" && node.lastChildKey != null) node = this.keyMap.get(node.lastChildKey);
			var _node_key;
			return (_node_key = node === null || node === void 0 ? void 0 : node.key) !== null && _node_key !== void 0 ? _node_key : null;
		}
		return node.parentKey;
	}
	getKeyAfter(key) {
		let node = this.keyMap.get(key);
		if (!node) return null;
		if (node.type !== "item" && node.firstChildKey != null) return node.firstChildKey;
		while (node) {
			if (node.nextKey != null) return node.nextKey;
			if (node.parentKey != null) node = this.keyMap.get(node.parentKey);
			else return null;
		}
		return null;
	}
	getFirstKey() {
		return this.firstKey;
	}
	getLastKey() {
		let node = this.lastKey != null ? this.keyMap.get(this.lastKey) : null;
		while ((node === null || node === void 0 ? void 0 : node.lastChildKey) != null) node = this.keyMap.get(node.lastChildKey);
		var _node_key;
		return (_node_key = node === null || node === void 0 ? void 0 : node.key) !== null && _node_key !== void 0 ? _node_key : null;
	}
	getItem(key) {
		var _this_keyMap_get;
		return (_this_keyMap_get = this.keyMap.get(key)) !== null && _this_keyMap_get !== void 0 ? _this_keyMap_get : null;
	}
	at() {
		throw new Error("Not implemented");
	}
	clone() {
		let Constructor = this.constructor;
		let collection = new Constructor();
		collection.keyMap = new Map(this.keyMap);
		collection.firstKey = this.firstKey;
		collection.lastKey = this.lastKey;
		collection.itemCount = this.itemCount;
		return collection;
	}
	addNode(node) {
		if (this.frozen) throw new Error("Cannot add a node to a frozen collection");
		if (node.type === "item" && this.keyMap.get(node.key) == null) this.itemCount++;
		this.keyMap.set(node.key, node);
	}
	addDescendants(node, oldCollection) {
		this.addNode(node);
		let children = oldCollection.getChildren(node.key);
		for (let child of children) this.addDescendants(child, oldCollection);
	}
	removeNode(key) {
		if (this.frozen) throw new Error("Cannot remove a node to a frozen collection");
		let node = this.keyMap.get(key);
		if (node != null && node.type === "item") this.itemCount--;
		this.keyMap.delete(key);
	}
	commit(firstKey, lastKey, isSSR = false) {
		if (this.frozen) throw new Error("Cannot commit a frozen collection");
		this.firstKey = firstKey;
		this.lastKey = lastKey;
		this.frozen = !isSSR;
	}
	filter(filterFn) {
		let newCollection = new this.constructor();
		let [firstKey, lastKey] = $23b9f4fcf0fe224b$var$filterChildren(this, newCollection, this.firstKey, filterFn);
		newCollection === null || newCollection === void 0 || newCollection.commit(firstKey, lastKey);
		return newCollection;
	}
	constructor() {
		this.keyMap = /* @__PURE__ */ new Map();
		this.firstKey = null;
		this.lastKey = null;
		this.frozen = false;
		this.itemCount = 0;
	}
};
function $23b9f4fcf0fe224b$var$filterChildren(collection, newCollection, firstChildKey, filterFn) {
	if (firstChildKey == null) return [null, null];
	let firstNode = null;
	let lastNode = null;
	let currentNode = collection.getItem(firstChildKey);
	while (currentNode != null) {
		let newNode = currentNode.filter(collection, newCollection, filterFn);
		if (newNode != null) {
			newNode.nextKey = null;
			if (lastNode) {
				newNode.prevKey = lastNode.key;
				lastNode.nextKey = newNode.key;
			}
			if (firstNode == null) firstNode = newNode;
			newCollection.addNode(newNode);
			lastNode = newNode;
		}
		currentNode = currentNode.nextKey ? collection.getItem(currentNode.nextKey) : null;
	}
	if (lastNode && lastNode.type === "separator") {
		let prevKey = lastNode.prevKey;
		newCollection.removeNode(lastNode.key);
		if (prevKey) {
			lastNode = newCollection.getItem(prevKey);
			lastNode.nextKey = null;
		} else lastNode = null;
	}
	var _firstNode_key, _lastNode_key;
	return [(_firstNode_key = firstNode === null || firstNode === void 0 ? void 0 : firstNode.key) !== null && _firstNode_key !== void 0 ? _firstNode_key : null, (_lastNode_key = lastNode === null || lastNode === void 0 ? void 0 : lastNode.key) !== null && _lastNode_key !== void 0 ? _lastNode_key : null];
}
//#endregion
//#region ../../node_modules/@react-aria/collections/dist/Document.mjs
var $681cc3c98f569e39$export$410b0c854570d131 = class {
	*[Symbol.iterator]() {
		let node = this.firstChild;
		while (node) {
			yield node;
			node = node.nextSibling;
		}
	}
	get firstChild() {
		return this._firstChild;
	}
	set firstChild(firstChild) {
		this._firstChild = firstChild;
		this.ownerDocument.markDirty(this);
	}
	get lastChild() {
		return this._lastChild;
	}
	set lastChild(lastChild) {
		this._lastChild = lastChild;
		this.ownerDocument.markDirty(this);
	}
	get previousSibling() {
		return this._previousSibling;
	}
	set previousSibling(previousSibling) {
		this._previousSibling = previousSibling;
		this.ownerDocument.markDirty(this);
	}
	get nextSibling() {
		return this._nextSibling;
	}
	set nextSibling(nextSibling) {
		this._nextSibling = nextSibling;
		this.ownerDocument.markDirty(this);
	}
	get parentNode() {
		return this._parentNode;
	}
	set parentNode(parentNode) {
		this._parentNode = parentNode;
		this.ownerDocument.markDirty(this);
	}
	get isConnected() {
		var _this_parentNode;
		return ((_this_parentNode = this.parentNode) === null || _this_parentNode === void 0 ? void 0 : _this_parentNode.isConnected) || false;
	}
	invalidateChildIndices(child) {
		if (this._minInvalidChildIndex == null || !this._minInvalidChildIndex.isConnected || child.index < this._minInvalidChildIndex.index) {
			this._minInvalidChildIndex = child;
			this.ownerDocument.markDirty(this);
		}
	}
	updateChildIndices() {
		let node = this._minInvalidChildIndex;
		while (node) {
			node.index = node.previousSibling ? node.previousSibling.index + 1 : 0;
			node = node.nextSibling;
		}
		this._minInvalidChildIndex = null;
	}
	appendChild(child) {
		if (child.parentNode) child.parentNode.removeChild(child);
		if (this.firstChild == null) this.firstChild = child;
		if (this.lastChild) {
			this.lastChild.nextSibling = child;
			child.index = this.lastChild.index + 1;
			child.previousSibling = this.lastChild;
		} else {
			child.previousSibling = null;
			child.index = 0;
		}
		child.parentNode = this;
		child.nextSibling = null;
		this.lastChild = child;
		this.ownerDocument.markDirty(this);
		if (this.isConnected) this.ownerDocument.queueUpdate();
	}
	insertBefore(newNode, referenceNode) {
		if (referenceNode == null) return this.appendChild(newNode);
		if (newNode.parentNode) newNode.parentNode.removeChild(newNode);
		newNode.nextSibling = referenceNode;
		newNode.previousSibling = referenceNode.previousSibling;
		newNode.index = referenceNode.index - 1;
		if (this.firstChild === referenceNode) this.firstChild = newNode;
		else if (referenceNode.previousSibling) referenceNode.previousSibling.nextSibling = newNode;
		referenceNode.previousSibling = newNode;
		newNode.parentNode = referenceNode.parentNode;
		this.invalidateChildIndices(newNode);
		if (this.isConnected) this.ownerDocument.queueUpdate();
	}
	removeChild(child) {
		if (child.parentNode !== this) return;
		if (this._minInvalidChildIndex === child) this._minInvalidChildIndex = null;
		if (child.nextSibling) {
			this.invalidateChildIndices(child.nextSibling);
			child.nextSibling.previousSibling = child.previousSibling;
		}
		if (child.previousSibling) child.previousSibling.nextSibling = child.nextSibling;
		if (this.firstChild === child) this.firstChild = child.nextSibling;
		if (this.lastChild === child) this.lastChild = child.previousSibling;
		child.parentNode = null;
		child.nextSibling = null;
		child.previousSibling = null;
		child.index = 0;
		this.ownerDocument.markDirty(child);
		if (this.isConnected) this.ownerDocument.queueUpdate();
	}
	addEventListener() {}
	removeEventListener() {}
	get previousVisibleSibling() {
		let node = this.previousSibling;
		while (node && node.isHidden) node = node.previousSibling;
		return node;
	}
	get nextVisibleSibling() {
		let node = this.nextSibling;
		while (node && node.isHidden) node = node.nextSibling;
		return node;
	}
	get firstVisibleChild() {
		let node = this.firstChild;
		while (node && node.isHidden) node = node.nextSibling;
		return node;
	}
	get lastVisibleChild() {
		let node = this.lastChild;
		while (node && node.isHidden) node = node.previousSibling;
		return node;
	}
	constructor(ownerDocument) {
		this._firstChild = null;
		this._lastChild = null;
		this._previousSibling = null;
		this._nextSibling = null;
		this._parentNode = null;
		this._minInvalidChildIndex = null;
		this.ownerDocument = ownerDocument;
	}
};
var $681cc3c98f569e39$export$dc064fe9e59310fd = class $681cc3c98f569e39$export$dc064fe9e59310fd extends $681cc3c98f569e39$export$410b0c854570d131 {
	get index() {
		return this._index;
	}
	set index(index) {
		this._index = index;
		this.ownerDocument.markDirty(this);
	}
	get level() {
		var _this_parentNode_node;
		if (this.parentNode instanceof $681cc3c98f569e39$export$dc064fe9e59310fd) return this.parentNode.level + (((_this_parentNode_node = this.parentNode.node) === null || _this_parentNode_node === void 0 ? void 0 : _this_parentNode_node.type) === "item" ? 1 : 0);
		return 0;
	}
	/**
	* Lazily gets a mutable instance of a Node. If the node has already
	* been cloned during this update cycle, it just returns the existing one.
	*/ getMutableNode() {
		if (this.node == null) return null;
		if (!this.isMutated) {
			this.node = this.node.clone();
			this.isMutated = true;
		}
		this.ownerDocument.markDirty(this);
		return this.node;
	}
	updateNode() {
		var _this_parentNode_node, _this_previousVisibleSibling_node, _this_previousVisibleSibling, _nextSibling_node, _this_firstVisibleChild_node, _this_firstVisibleChild, _this_lastVisibleChild_node, _this_lastVisibleChild;
		let nextSibling = this.nextVisibleSibling;
		let node = this.getMutableNode();
		if (node == null) return;
		node.index = this.index;
		node.level = this.level;
		var _this_parentNode_node_key;
		node.parentKey = this.parentNode instanceof $681cc3c98f569e39$export$dc064fe9e59310fd ? (_this_parentNode_node_key = (_this_parentNode_node = this.parentNode.node) === null || _this_parentNode_node === void 0 ? void 0 : _this_parentNode_node.key) !== null && _this_parentNode_node_key !== void 0 ? _this_parentNode_node_key : null : null;
		var _this_previousVisibleSibling_node_key;
		node.prevKey = (_this_previousVisibleSibling_node_key = (_this_previousVisibleSibling = this.previousVisibleSibling) === null || _this_previousVisibleSibling === void 0 ? void 0 : (_this_previousVisibleSibling_node = _this_previousVisibleSibling.node) === null || _this_previousVisibleSibling_node === void 0 ? void 0 : _this_previousVisibleSibling_node.key) !== null && _this_previousVisibleSibling_node_key !== void 0 ? _this_previousVisibleSibling_node_key : null;
		var _nextSibling_node_key;
		node.nextKey = (_nextSibling_node_key = nextSibling === null || nextSibling === void 0 ? void 0 : (_nextSibling_node = nextSibling.node) === null || _nextSibling_node === void 0 ? void 0 : _nextSibling_node.key) !== null && _nextSibling_node_key !== void 0 ? _nextSibling_node_key : null;
		node.hasChildNodes = !!this.firstChild;
		var _this_firstVisibleChild_node_key;
		node.firstChildKey = (_this_firstVisibleChild_node_key = (_this_firstVisibleChild = this.firstVisibleChild) === null || _this_firstVisibleChild === void 0 ? void 0 : (_this_firstVisibleChild_node = _this_firstVisibleChild.node) === null || _this_firstVisibleChild_node === void 0 ? void 0 : _this_firstVisibleChild_node.key) !== null && _this_firstVisibleChild_node_key !== void 0 ? _this_firstVisibleChild_node_key : null;
		var _this_lastVisibleChild_node_key;
		node.lastChildKey = (_this_lastVisibleChild_node_key = (_this_lastVisibleChild = this.lastVisibleChild) === null || _this_lastVisibleChild === void 0 ? void 0 : (_this_lastVisibleChild_node = _this_lastVisibleChild.node) === null || _this_lastVisibleChild_node === void 0 ? void 0 : _this_lastVisibleChild_node.key) !== null && _this_lastVisibleChild_node_key !== void 0 ? _this_lastVisibleChild_node_key : null;
		if ((node.colSpan != null || node.colIndex != null) && nextSibling) {
			var _node_colIndex, _node_colSpan;
			let nextColIndex = ((_node_colIndex = node.colIndex) !== null && _node_colIndex !== void 0 ? _node_colIndex : node.index) + ((_node_colSpan = node.colSpan) !== null && _node_colSpan !== void 0 ? _node_colSpan : 1);
			if (nextSibling.node != null && nextColIndex !== nextSibling.node.colIndex) {
				let siblingNode = nextSibling.getMutableNode();
				siblingNode.colIndex = nextColIndex;
			}
		}
	}
	setProps(obj, ref, CollectionNodeClass, rendered, render) {
		let node;
		let { value: value1, textValue, id, ...props } = obj;
		if (this.node == null) {
			node = new CollectionNodeClass(id !== null && id !== void 0 ? id : `react-aria-${++this.ownerDocument.nodeId}`);
			this.node = node;
		} else node = this.getMutableNode();
		props.ref = ref;
		node.props = props;
		node.rendered = rendered;
		node.render = render;
		node.value = value1;
		if (obj["aria-label"]) node["aria-label"] = obj["aria-label"];
		node.textValue = textValue || (typeof props.children === "string" ? props.children : "") || obj["aria-label"] || "";
		if (id != null && id !== node.key) throw new Error("Cannot change the id of an item");
		if (props.colSpan != null) node.colSpan = props.colSpan;
		if (this.isConnected) this.ownerDocument.queueUpdate();
	}
	get style() {
		let element = this;
		return {
			get display() {
				return element.isHidden ? "none" : "";
			},
			set display(value) {
				let isHidden = value === "none";
				if (element.isHidden !== isHidden) {
					var _element_parentNode, _element_parentNode1;
					if (((_element_parentNode = element.parentNode) === null || _element_parentNode === void 0 ? void 0 : _element_parentNode.firstVisibleChild) === element || ((_element_parentNode1 = element.parentNode) === null || _element_parentNode1 === void 0 ? void 0 : _element_parentNode1.lastVisibleChild) === element) element.ownerDocument.markDirty(element.parentNode);
					let prev = element.previousVisibleSibling;
					let next = element.nextVisibleSibling;
					if (prev) element.ownerDocument.markDirty(prev);
					if (next) element.ownerDocument.markDirty(next);
					element.isHidden = isHidden;
					element.ownerDocument.markDirty(element);
				}
			}
		};
	}
	hasAttribute() {}
	setAttribute() {}
	setAttributeNS() {}
	removeAttribute() {}
	constructor(type, ownerDocument) {
		super(ownerDocument), this.nodeType = 8, this.isMutated = true, this._index = 0, this.isHidden = false;
		this.node = null;
	}
};
var $681cc3c98f569e39$export$b34a105447964f9f = class extends $681cc3c98f569e39$export$410b0c854570d131 {
	get isConnected() {
		return true;
	}
	createElement(type) {
		return new $681cc3c98f569e39$export$dc064fe9e59310fd(type, this);
	}
	getMutableCollection() {
		if (!this.nextCollection) this.nextCollection = this.collection.clone();
		return this.nextCollection;
	}
	markDirty(node) {
		this.dirtyNodes.add(node);
	}
	addNode(element) {
		if (element.isHidden || element.node == null) return;
		let collection = this.getMutableCollection();
		if (!collection.getItem(element.node.key)) for (let child of element) this.addNode(child);
		collection.addNode(element.node);
	}
	removeNode(node) {
		for (let child of node) this.removeNode(child);
		if (node.node) this.getMutableCollection().removeNode(node.node.key);
	}
	/** Finalizes the collection update, updating all nodes and freezing the collection. */ getCollection() {
		if (this.inSubscription) return this.collection;
		this.queuedRender = false;
		this.updateCollection();
		return this.collection;
	}
	updateCollection() {
		for (let element of this.dirtyNodes) if (element instanceof $681cc3c98f569e39$export$dc064fe9e59310fd && (!element.isConnected || element.isHidden)) this.removeNode(element);
		else element.updateChildIndices();
		for (let element of this.dirtyNodes) if (element instanceof $681cc3c98f569e39$export$dc064fe9e59310fd) {
			if (element.isConnected && !element.isHidden) {
				element.updateNode();
				this.addNode(element);
			}
			if (element.node) this.dirtyNodes.delete(element);
			element.isMutated = false;
		} else this.dirtyNodes.delete(element);
		if (this.nextCollection) {
			var _this_firstVisibleChild_node, _this_firstVisibleChild, _this_lastVisibleChild_node, _this_lastVisibleChild;
			var _this_firstVisibleChild_node_key, _this_lastVisibleChild_node_key;
			this.nextCollection.commit((_this_firstVisibleChild_node_key = (_this_firstVisibleChild = this.firstVisibleChild) === null || _this_firstVisibleChild === void 0 ? void 0 : (_this_firstVisibleChild_node = _this_firstVisibleChild.node) === null || _this_firstVisibleChild_node === void 0 ? void 0 : _this_firstVisibleChild_node.key) !== null && _this_firstVisibleChild_node_key !== void 0 ? _this_firstVisibleChild_node_key : null, (_this_lastVisibleChild_node_key = (_this_lastVisibleChild = this.lastVisibleChild) === null || _this_lastVisibleChild === void 0 ? void 0 : (_this_lastVisibleChild_node = _this_lastVisibleChild.node) === null || _this_lastVisibleChild_node === void 0 ? void 0 : _this_lastVisibleChild_node.key) !== null && _this_lastVisibleChild_node_key !== void 0 ? _this_lastVisibleChild_node_key : null, this.isSSR);
			if (!this.isSSR) {
				this.collection = this.nextCollection;
				this.nextCollection = null;
			}
		}
	}
	queueUpdate() {
		if (this.dirtyNodes.size === 0 || this.queuedRender) return;
		this.queuedRender = true;
		this.inSubscription = true;
		if (!this.isSSR) this.collection = this.collection.clone();
		for (let fn of this.subscriptions) fn();
		this.inSubscription = false;
	}
	subscribe(fn) {
		this.subscriptions.add(fn);
		return () => this.subscriptions.delete(fn);
	}
	resetAfterSSR() {
		if (this.isSSR) {
			this.isSSR = false;
			this.firstChild = null;
			this.lastChild = null;
			this.nodeId = 0;
		}
	}
	constructor(collection) {
		super(null), this.nodeType = 11, this.ownerDocument = this, this.dirtyNodes = /* @__PURE__ */ new Set(), this.isSSR = false, this.nodeId = 0, this.nodesByProps = /* @__PURE__ */ new WeakMap(), this.nextCollection = null, this.subscriptions = /* @__PURE__ */ new Set(), this.queuedRender = false, this.inSubscription = false;
		this.collection = collection;
		this.nextCollection = collection;
	}
};
//#endregion
//#region ../../node_modules/@react-aria/collections/dist/useCachedChildren.mjs
function $e948873055cbafe4$export$727c8fc270210f13(props) {
	let { children, items, idScope, addIdAndValue, dependencies = [] } = props;
	let cache = (0, import_react.useMemo)(() => /* @__PURE__ */ new WeakMap(), dependencies);
	return (0, import_react.useMemo)(() => {
		if (items && typeof children === "function") {
			let res = [];
			for (let item of items) {
				let rendered = cache.get(item);
				if (!rendered) {
					rendered = children(item);
					var _rendered_props_id, _ref;
					let key = (_ref = (_rendered_props_id = rendered.props.id) !== null && _rendered_props_id !== void 0 ? _rendered_props_id : item.key) !== null && _ref !== void 0 ? _ref : item.id;
					if (key == null) throw new Error("Could not determine key for item");
					if (idScope != null) key = idScope + ":" + key;
					rendered = (0, import_react.cloneElement)(rendered, addIdAndValue ? {
						key,
						id: key,
						value: item
					} : { key });
					cache.set(item, rendered);
				}
				res.push(rendered);
			}
			return res;
		} else if (typeof children !== "function") return children;
	}, [
		children,
		items,
		cache,
		idScope,
		addIdAndValue
	]);
}
//#endregion
//#region ../../node_modules/@react-aria/collections/dist/Hidden.mjs
if (typeof HTMLTemplateElement !== "undefined") {
	Object.defineProperty(HTMLTemplateElement.prototype, "firstChild", {
		configurable: true,
		enumerable: true,
		get: function() {
			return this.content.firstChild;
		}
	});
	Object.defineProperty(HTMLTemplateElement.prototype, "appendChild", {
		configurable: true,
		enumerable: true,
		value: function(node) {
			return this.content.appendChild(node);
		}
	});
	Object.defineProperty(HTMLTemplateElement.prototype, "removeChild", {
		configurable: true,
		enumerable: true,
		value: function(node) {
			return this.content.removeChild(node);
		}
	});
	Object.defineProperty(HTMLTemplateElement.prototype, "insertBefore", {
		configurable: true,
		enumerable: true,
		value: function(node, child) {
			return this.content.insertBefore(node, child);
		}
	});
}
var $f39a9eba43920ace$export$94b6d0abf7d33e8c = /* @__PURE__ */ (0, import_react.createContext)(false);
function $f39a9eba43920ace$export$8dc98ba7eadeaa56(props) {
	if ((0, import_react.useContext)($f39a9eba43920ace$export$94b6d0abf7d33e8c)) return /* @__PURE__ */ import_react.createElement(import_react.Fragment, null, props.children);
	let children = /* @__PURE__ */ import_react.createElement($f39a9eba43920ace$export$94b6d0abf7d33e8c.Provider, { value: true }, props.children);
	return /* @__PURE__ */ import_react.createElement("template", null, children);
}
function $f39a9eba43920ace$export$86427a43e3e48ebb(fn) {
	let Wrapper = (props, ref) => {
		if ((0, import_react.useContext)($f39a9eba43920ace$export$94b6d0abf7d33e8c)) return null;
		return fn(props, ref);
	};
	Wrapper.displayName = fn.displayName || fn.name;
	return (0, import_react.forwardRef)(Wrapper);
}
function $f39a9eba43920ace$export$b5d7cc18bb8d2b59() {
	return (0, import_react.useContext)($f39a9eba43920ace$export$94b6d0abf7d33e8c);
}
//#endregion
//#region ../../node_modules/@react-aria/collections/dist/CollectionBuilder.mjs
var $e1995378a142960e$var$ShallowRenderContext = /* @__PURE__ */ (0, import_react.createContext)(false);
var $e1995378a142960e$var$CollectionDocumentContext = /* @__PURE__ */ (0, import_react.createContext)(null);
function $e1995378a142960e$export$bf788dd355e3a401(props) {
	if ((0, import_react.useContext)($e1995378a142960e$var$CollectionDocumentContext)) return props.content;
	let { collection, document } = $e1995378a142960e$var$useCollectionDocument(props.createCollection);
	return /* @__PURE__ */ import_react.createElement(import_react.Fragment, null, /* @__PURE__ */ import_react.createElement($f39a9eba43920ace$export$8dc98ba7eadeaa56, null, /* @__PURE__ */ import_react.createElement($e1995378a142960e$var$CollectionDocumentContext.Provider, { value: document }, props.content)), /* @__PURE__ */ import_react.createElement($e1995378a142960e$var$CollectionInner, {
		render: props.children,
		collection
	}));
}
function $e1995378a142960e$var$CollectionInner({ collection, render }) {
	return render(collection);
}
function $e1995378a142960e$var$useSyncExternalStoreFallback(subscribe, getSnapshot, getServerSnapshot) {
	let isSSR = $b5e257d569688ac6$export$535bd6ca7f90a273();
	let isSSRRef = (0, import_react.useRef)(isSSR);
	isSSRRef.current = isSSR;
	return (0, import_shim.useSyncExternalStore)(subscribe, (0, import_react.useCallback)(() => {
		return isSSRRef.current ? getServerSnapshot() : getSnapshot();
	}, [getSnapshot, getServerSnapshot]));
}
var $e1995378a142960e$var$useSyncExternalStore = typeof import_react.useSyncExternalStore === "function" ? import_react.useSyncExternalStore : $e1995378a142960e$var$useSyncExternalStoreFallback;
function $e1995378a142960e$var$useCollectionDocument(createCollection) {
	let [document] = (0, import_react.useState)(() => new $681cc3c98f569e39$export$b34a105447964f9f((createCollection === null || createCollection === void 0 ? void 0 : createCollection()) || new $23b9f4fcf0fe224b$export$408d25a4e12db025()));
	return {
		collection: $e1995378a142960e$var$useSyncExternalStore((0, import_react.useCallback)((fn) => document.subscribe(fn), [document]), (0, import_react.useCallback)(() => {
			let collection = document.getCollection();
			if (document.isSSR) document.resetAfterSSR();
			return collection;
		}, [document]), (0, import_react.useCallback)(() => {
			document.isSSR = true;
			return document.getCollection();
		}, [document])),
		document
	};
}
var $e1995378a142960e$var$SSRContext = /* @__PURE__ */ (0, import_react.createContext)(null);
function $e1995378a142960e$var$createCollectionNodeClass(type) {
	var _class;
	return _class = class extends $23b9f4fcf0fe224b$export$d68d59712b04d9d1 {}, _class.type = type, _class;
}
function $e1995378a142960e$var$useSSRCollectionNode(CollectionNodeClass, props, ref, rendered, children, render) {
	if (typeof CollectionNodeClass === "string") CollectionNodeClass = $e1995378a142960e$var$createCollectionNodeClass(CollectionNodeClass);
	let itemRef = (0, import_react.useCallback)((element) => {
		element === null || element === void 0 || element.setProps(props, ref, CollectionNodeClass, rendered, render);
	}, [
		props,
		ref,
		rendered,
		render,
		CollectionNodeClass
	]);
	let parentNode = (0, import_react.useContext)($e1995378a142960e$var$SSRContext);
	if (parentNode) {
		let element = parentNode.ownerDocument.nodesByProps.get(props);
		if (!element) {
			element = parentNode.ownerDocument.createElement(CollectionNodeClass.type);
			element.setProps(props, ref, CollectionNodeClass, rendered, render);
			parentNode.appendChild(element);
			parentNode.ownerDocument.updateCollection();
			parentNode.ownerDocument.nodesByProps.set(props, element);
		}
		return children ? /* @__PURE__ */ import_react.createElement($e1995378a142960e$var$SSRContext.Provider, { value: element }, children) : null;
	}
	return /* @__PURE__ */ import_react.createElement(CollectionNodeClass.type, { ref: itemRef }, children);
}
function $e1995378a142960e$export$18af5c7a9e9b3664(CollectionNodeClass, render) {
	let Component = ({ node }) => render(node.props, node.props.ref, node);
	let Result = (0, import_react.forwardRef)((props, ref) => {
		let focusableProps = (0, import_react.useContext)($f645667febf57a63$export$f9762fab77588ecb);
		if (!(0, import_react.useContext)($e1995378a142960e$var$ShallowRenderContext)) {
			if (render.length >= 3) throw new Error(render.name + " cannot be rendered outside a collection.");
			return render(props, ref);
		}
		return $e1995378a142960e$var$useSSRCollectionNode(CollectionNodeClass, props, ref, "children" in props ? props.children : null, null, (node) => /* @__PURE__ */ import_react.createElement($f645667febf57a63$export$f9762fab77588ecb.Provider, { value: focusableProps }, /* @__PURE__ */ import_react.createElement(Component, { node })));
	});
	Result.displayName = render.name;
	return Result;
}
function $e1995378a142960e$export$e953bb1cd0f19726(CollectionNodeClass, render, useChildren = $e1995378a142960e$var$useCollectionChildren) {
	let Component = ({ node }) => render(node.props, node.props.ref, node);
	let Result = (0, import_react.forwardRef)((props, ref) => {
		let children = useChildren(props);
		var _useSSRCollectionNode;
		return (_useSSRCollectionNode = $e1995378a142960e$var$useSSRCollectionNode(CollectionNodeClass, props, ref, null, children, (node) => /* @__PURE__ */ import_react.createElement(Component, { node }))) !== null && _useSSRCollectionNode !== void 0 ? _useSSRCollectionNode : /* @__PURE__ */ import_react.createElement(import_react.Fragment, null);
	});
	Result.displayName = render.name;
	return Result;
}
function $e1995378a142960e$var$useCollectionChildren(options) {
	return $e948873055cbafe4$export$727c8fc270210f13({
		...options,
		addIdAndValue: true
	});
}
var $e1995378a142960e$var$CollectionContext = /* @__PURE__ */ (0, import_react.createContext)(null);
function $e1995378a142960e$export$fb8073518f34e6ec(props) {
	let ctx = (0, import_react.useContext)($e1995378a142960e$var$CollectionContext);
	let dependencies = ((ctx === null || ctx === void 0 ? void 0 : ctx.dependencies) || []).concat(props.dependencies);
	var _props_idScope;
	let idScope = (_props_idScope = props.idScope) !== null && _props_idScope !== void 0 ? _props_idScope : ctx === null || ctx === void 0 ? void 0 : ctx.idScope;
	let children = $e1995378a142960e$var$useCollectionChildren({
		...props,
		idScope,
		dependencies
	});
	if ((0, import_react.useContext)($e1995378a142960e$var$CollectionDocumentContext)) children = /* @__PURE__ */ import_react.createElement($e1995378a142960e$var$CollectionRoot, null, children);
	ctx = (0, import_react.useMemo)(() => ({
		dependencies,
		idScope
	}), [idScope, ...dependencies]);
	return /* @__PURE__ */ import_react.createElement($e1995378a142960e$var$CollectionContext.Provider, { value: ctx }, children);
}
function $e1995378a142960e$var$CollectionRoot({ children }) {
	let doc = (0, import_react.useContext)($e1995378a142960e$var$CollectionDocumentContext);
	let wrappedChildren = (0, import_react.useMemo)(() => /* @__PURE__ */ import_react.createElement($e1995378a142960e$var$CollectionDocumentContext.Provider, { value: null }, /* @__PURE__ */ import_react.createElement($e1995378a142960e$var$ShallowRenderContext.Provider, { value: true }, children)), [children]);
	return $b5e257d569688ac6$export$535bd6ca7f90a273() ? /* @__PURE__ */ import_react.createElement($e1995378a142960e$var$SSRContext.Provider, { value: doc }, wrappedChildren) : /* @__PURE__ */ (0, import_react_dom.createPortal)(wrappedChildren, doc);
}
//#endregion
//#region ../../node_modules/react-aria-components/dist/Collection.mjs
var $7135fc7d473fd974$export$d40e14dec8b060a8 = /* @__PURE__ */ (0, import_react.createContext)(null);
var $7135fc7d473fd974$export$a164736487e3f0ae = {
	CollectionRoot({ collection, renderDropIndicator }) {
		return $7135fc7d473fd974$var$useCollectionRender(collection, null, renderDropIndicator);
	},
	CollectionBranch({ collection, parent, renderDropIndicator }) {
		return $7135fc7d473fd974$var$useCollectionRender(collection, parent, renderDropIndicator);
	}
};
function $7135fc7d473fd974$var$useCollectionRender(collection, parent, renderDropIndicator) {
	return $e948873055cbafe4$export$727c8fc270210f13({
		items: parent ? collection.getChildren(parent.key) : collection,
		dependencies: [renderDropIndicator],
		children(node) {
			if (node.type === "content") return /* @__PURE__ */ import_react.createElement(import_react.Fragment, null);
			let rendered = node.render(node);
			if (!renderDropIndicator || node.type !== "item") return rendered;
			return /* @__PURE__ */ import_react.createElement(import_react.Fragment, null, renderDropIndicator({
				type: "item",
				key: node.key,
				dropPosition: "before"
			}), rendered, $7135fc7d473fd974$export$2dbbd341daed716d(collection, node, renderDropIndicator));
		}
	});
}
function $7135fc7d473fd974$export$2dbbd341daed716d(collection, node, renderDropIndicator) {
	let key = node.key;
	let keyAfter = collection.getKeyAfter(key);
	let nextItemInFlattenedCollection = keyAfter != null ? collection.getItem(keyAfter) : null;
	while (nextItemInFlattenedCollection != null && nextItemInFlattenedCollection.type !== "item") {
		keyAfter = collection.getKeyAfter(nextItemInFlattenedCollection.key);
		nextItemInFlattenedCollection = keyAfter != null ? collection.getItem(keyAfter) : null;
	}
	let nextItemInSameLevel = node.nextKey != null ? collection.getItem(node.nextKey) : null;
	while (nextItemInSameLevel != null && nextItemInSameLevel.type !== "item") nextItemInSameLevel = nextItemInSameLevel.nextKey != null ? collection.getItem(nextItemInSameLevel.nextKey) : null;
	let afterIndicators = [];
	if (nextItemInSameLevel == null) {
		let current = node;
		while ((current === null || current === void 0 ? void 0 : current.type) === "item" && (!nextItemInFlattenedCollection || current.parentKey !== nextItemInFlattenedCollection.parentKey && nextItemInFlattenedCollection.level < current.level)) {
			let indicator = renderDropIndicator({
				type: "item",
				key: current.key,
				dropPosition: "after"
			});
			if (/* @__PURE__ */ (0, import_react.isValidElement)(indicator)) afterIndicators.push(/* @__PURE__ */ (0, import_react.cloneElement)(indicator, { key: `${current.key}-after` }));
			current = current.parentKey != null ? collection.getItem(current.parentKey) : null;
		}
	}
	return afterIndicators;
}
var $7135fc7d473fd974$export$4feb769f8ddf26c5 = /* @__PURE__ */ (0, import_react.createContext)($7135fc7d473fd974$export$a164736487e3f0ae);
//#endregion
//#region ../../node_modules/@react-aria/button/dist/useButton.mjs
function $701a24aa0da5b062$export$ea18c227d4417cc3(props, ref) {
	let { elementType = "button", isDisabled, onPress, onPressStart, onPressEnd, onPressUp, onPressChange, preventFocusOnPress, allowFocusWhenDisabled, onClick, href, target, rel, type = "button" } = props;
	let additionalProps;
	if (elementType === "button") additionalProps = {
		type,
		disabled: isDisabled,
		form: props.form,
		formAction: props.formAction,
		formEncType: props.formEncType,
		formMethod: props.formMethod,
		formNoValidate: props.formNoValidate,
		formTarget: props.formTarget,
		name: props.name,
		value: props.value
	};
	else additionalProps = {
		role: "button",
		href: elementType === "a" && !isDisabled ? href : void 0,
		target: elementType === "a" ? target : void 0,
		type: elementType === "input" ? type : void 0,
		disabled: elementType === "input" ? isDisabled : void 0,
		"aria-disabled": !isDisabled || elementType === "input" ? void 0 : isDisabled,
		rel: elementType === "a" ? rel : void 0
	};
	let { pressProps, isPressed } = $f6c31cce2adf654f$export$45712eceda6fad21({
		onPressStart,
		onPressEnd,
		onPressChange,
		onPress,
		onPressUp,
		onClick,
		isDisabled,
		preventFocusOnPress,
		ref
	});
	let { focusableProps } = $f645667febf57a63$export$4c014de7c8940b4c(props, ref);
	if (allowFocusWhenDisabled) focusableProps.tabIndex = isDisabled ? -1 : focusableProps.tabIndex;
	let buttonProps = $3ef42575df84b30b$export$9d1611c77c2fe928(focusableProps, pressProps, $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, { labelable: true }));
	return {
		isPressed,
		buttonProps: $3ef42575df84b30b$export$9d1611c77c2fe928(additionalProps, buttonProps, {
			"aria-haspopup": props["aria-haspopup"],
			"aria-expanded": props["aria-expanded"],
			"aria-controls": props["aria-controls"],
			"aria-pressed": props["aria-pressed"],
			"aria-current": props["aria-current"],
			"aria-disabled": props["aria-disabled"]
		})
	};
}
//#endregion
//#region ../../node_modules/@react-aria/dialog/dist/useDialog.mjs
function $40df3f8667284809$export$d55e7ee900f34e93(props, ref) {
	let { role = "dialog" } = props;
	let titleId = $bdb11010cef70236$export$b4cc09c592e8fdb8();
	titleId = props["aria-label"] ? void 0 : titleId;
	let isRefocusing = (0, import_react.useRef)(false);
	(0, import_react.useEffect)(() => {
		if (ref.current && !$d4ee10de306f2510$export$b4f377a2b6254582(ref.current)) {
			$3ad3f6e1647bc98d$export$80f3e147d781571c(ref.current);
			let timeout = setTimeout(() => {
				if ($d4ee10de306f2510$export$cd4e5573fbe2b576() === ref.current || $d4ee10de306f2510$export$cd4e5573fbe2b576() === document.body) {
					isRefocusing.current = true;
					if (ref.current) {
						ref.current.blur();
						$3ad3f6e1647bc98d$export$80f3e147d781571c(ref.current);
					}
					isRefocusing.current = false;
				}
			}, 500);
			return () => {
				clearTimeout(timeout);
			};
		}
	}, [ref]);
	$337b884510726a0d$export$14c98a7594375490();
	return {
		dialogProps: {
			...$65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, { labelable: true }),
			role,
			tabIndex: -1,
			"aria-labelledby": props["aria-labelledby"] || titleId,
			onBlur: (e) => {
				if (isRefocusing.current) e.stopPropagation();
			}
		},
		titleProps: { id: titleId }
	};
}
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/constants.mjs
var $103790afe9474d1c$export$60b7b4bcf3903d8e = /* @__PURE__ */ function(DROP_OPERATION) {
	DROP_OPERATION[DROP_OPERATION["none"] = 0] = "none";
	DROP_OPERATION[DROP_OPERATION["cancel"] = 0] = "cancel";
	DROP_OPERATION[DROP_OPERATION["move"] = 1] = "move";
	DROP_OPERATION[DROP_OPERATION["copy"] = 2] = "copy";
	DROP_OPERATION[DROP_OPERATION["link"] = 4] = "link";
	DROP_OPERATION[DROP_OPERATION["all"] = 7] = "all";
	return DROP_OPERATION;
}({});
var $103790afe9474d1c$export$9bbdfc78cf083e16 = {
	...$103790afe9474d1c$export$60b7b4bcf3903d8e,
	copyMove: 3,
	copyLink: 6,
	linkMove: 5,
	all: 7,
	uninitialized: 7
};
var $103790afe9474d1c$export$dd0165308d8bff45 = $103790afe9474d1c$var$invert($103790afe9474d1c$export$9bbdfc78cf083e16);
$103790afe9474d1c$export$dd0165308d8bff45[7] = "all";
var $103790afe9474d1c$export$608ecc6f1b23c35d = {
	none: "cancel",
	link: "link",
	copy: "copy",
	move: "move"
};
var $103790afe9474d1c$export$5eacb0769d26d3b2 = $103790afe9474d1c$var$invert($103790afe9474d1c$export$608ecc6f1b23c35d);
function $103790afe9474d1c$var$invert(object) {
	let res = {};
	for (let key in object) res[object[key]] = key;
	return res;
}
var $103790afe9474d1c$export$4a7729b856e9a690 = new Set([
	"text/plain",
	"text/uri-list",
	"text/html"
]);
var $103790afe9474d1c$export$fd9f9fc120c5402d = "application/vnd.react-aria.items+json";
var $103790afe9474d1c$export$f8fc6581787339b3 = "application/octet-stream";
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/utils.mjs
var $7252cd45fc48c07c$export$dfdf5deeaf27473f = /* @__PURE__ */ new WeakMap();
var $7252cd45fc48c07c$export$990fced5dfac2637 = Symbol();
function $7252cd45fc48c07c$export$3093291712f09a77(state) {
	let { id } = $7252cd45fc48c07c$export$dfdf5deeaf27473f.get(state) || {};
	if (!id) throw new Error("Droppable item outside a droppable collection");
	return id;
}
function $7252cd45fc48c07c$export$7e397efd01d3db27(state) {
	let { ref } = $7252cd45fc48c07c$export$dfdf5deeaf27473f.get(state) || {};
	if (!ref) throw new Error("Droppable item outside a droppable collection");
	return ref;
}
function $7252cd45fc48c07c$export$e1d41611756c6326(items) {
	let types = /* @__PURE__ */ new Set();
	for (let item of items) for (let type of Object.keys(item)) types.add(type);
	return types;
}
function $7252cd45fc48c07c$var$mapModality(modality) {
	if (!modality) modality = "virtual";
	if (modality === "pointer") modality = "virtual";
	if (modality === "virtual" && typeof window !== "undefined" && "ontouchstart" in window) modality = "touch";
	return modality;
}
function $7252cd45fc48c07c$export$49bac5d6d4b352ea() {
	return $7252cd45fc48c07c$var$mapModality($507fabe10e71c6fb$export$98e20ec92f614cfe());
}
function $7252cd45fc48c07c$export$1fb2158d224b542c() {
	return $7252cd45fc48c07c$var$mapModality($507fabe10e71c6fb$export$630ff653c5ada6a9());
}
function $7252cd45fc48c07c$export$f9c1490890ddd063(dataTransfer, items) {
	let groupedByType = /* @__PURE__ */ new Map();
	let needsCustomData = false;
	let customData = [];
	for (let item of items) {
		let types = Object.keys(item);
		if (types.length > 1) needsCustomData = true;
		let dataByType = {};
		for (let type of types) {
			let typeItems = groupedByType.get(type);
			if (!typeItems) {
				typeItems = [];
				groupedByType.set(type, typeItems);
			} else needsCustomData = true;
			let data = item[type];
			dataByType[type] = data;
			typeItems.push(data);
		}
		customData.push(dataByType);
	}
	for (let [type, items] of groupedByType) if ($103790afe9474d1c$export$4a7729b856e9a690.has(type)) {
		let data = items.join("\n");
		dataTransfer.items.add(data, type);
	} else dataTransfer.items.add(items[0], type);
	if (needsCustomData) {
		let data = JSON.stringify(customData);
		dataTransfer.items.add(data, $103790afe9474d1c$export$fd9f9fc120c5402d);
	}
}
var $7252cd45fc48c07c$export$7f04ce188c91447c = class {
	has(type) {
		if (this.includesUnknownTypes || type === $7252cd45fc48c07c$export$990fced5dfac2637 && this.types.has("application/octet-stream")) return true;
		return typeof type === "string" && this.types.has(type);
	}
	constructor(dataTransfer) {
		this.types = /* @__PURE__ */ new Set();
		let hasFiles = false;
		for (let item of dataTransfer.items) if (item.type !== "application/vnd.react-aria.items+json") {
			if (item.kind === "file") hasFiles = true;
			if (item.type) this.types.add(item.type);
			else this.types.add($103790afe9474d1c$export$f8fc6581787339b3);
		}
		this.includesUnknownTypes = !hasFiles && dataTransfer.types.includes("Files");
	}
};
function $7252cd45fc48c07c$export$d9e760437831f8b3(dataTransfer) {
	let items = [];
	if (!dataTransfer) return items;
	let hasCustomType = false;
	if (dataTransfer.types.includes("application/vnd.react-aria.items+json")) try {
		let data = dataTransfer.getData($103790afe9474d1c$export$fd9f9fc120c5402d);
		let parsed = JSON.parse(data);
		for (let item of parsed) items.push({
			kind: "text",
			types: new Set(Object.keys(item)),
			getText: (type) => Promise.resolve(item[type])
		});
		hasCustomType = true;
	} catch {}
	if (!hasCustomType) {
		let stringItems = /* @__PURE__ */ new Map();
		for (let item of dataTransfer.items) if (item.kind === "string") stringItems.set(item.type || "application/octet-stream", dataTransfer.getData(item.type));
		else if (item.kind === "file") if (typeof item.webkitGetAsEntry === "function") {
			let entry = item.webkitGetAsEntry();
			if (!entry) continue;
			if (entry.isFile) items.push($7252cd45fc48c07c$var$createFileItem(item.getAsFile()));
			else if (entry.isDirectory) items.push($7252cd45fc48c07c$var$createDirectoryItem(entry));
		} else items.push($7252cd45fc48c07c$var$createFileItem(item.getAsFile()));
		if (stringItems.size > 0) items.push({
			kind: "text",
			types: new Set(stringItems.keys()),
			getText: (type) => Promise.resolve(stringItems.get(type))
		});
	}
	return items;
}
function $7252cd45fc48c07c$var$blobToString(blob) {
	if (typeof blob.text === "function") return blob.text();
	return new Promise((resolve, reject) => {
		let reader = new FileReader();
		reader.onload = () => {
			resolve(reader.result);
		};
		reader.onerror = reject;
		reader.readAsText(blob);
	});
}
function $7252cd45fc48c07c$var$createFileItem(file) {
	if (!file) throw new Error("No file provided");
	return {
		kind: "file",
		type: file.type || "application/octet-stream",
		name: file.name,
		getText: () => $7252cd45fc48c07c$var$blobToString(file),
		getFile: () => Promise.resolve(file)
	};
}
function $7252cd45fc48c07c$var$createDirectoryItem(entry) {
	return {
		kind: "directory",
		name: entry.name,
		getEntries: () => $7252cd45fc48c07c$var$getEntries(entry)
	};
}
async function* $7252cd45fc48c07c$var$getEntries(item) {
	let reader = item.createReader();
	let entries;
	do {
		entries = await new Promise((resolve, reject) => {
			reader.readEntries(resolve, reject);
		});
		for (let entry of entries) if (entry.isFile) yield $7252cd45fc48c07c$var$createFileItem(await $7252cd45fc48c07c$var$getEntryFile(entry));
		else if (entry.isDirectory) yield $7252cd45fc48c07c$var$createDirectoryItem(entry);
	} while (entries.length > 0);
}
function $7252cd45fc48c07c$var$getEntryFile(entry) {
	return new Promise((resolve, reject) => entry.file(resolve, reject));
}
var $7252cd45fc48c07c$export$6ca6700462636d0b = { draggingKeys: /* @__PURE__ */ new Set() };
function $7252cd45fc48c07c$export$f2be18a910c0caa6(ref) {
	$7252cd45fc48c07c$export$6ca6700462636d0b.draggingCollectionRef = ref;
}
function $7252cd45fc48c07c$export$72cb63bdda528276(keys) {
	$7252cd45fc48c07c$export$6ca6700462636d0b.draggingKeys = keys;
}
function $7252cd45fc48c07c$export$dac8db29d42db9a1(ref) {
	$7252cd45fc48c07c$export$6ca6700462636d0b.dropCollectionRef = ref;
}
function $7252cd45fc48c07c$export$70936501603e6c57() {
	$7252cd45fc48c07c$export$6ca6700462636d0b = { draggingKeys: /* @__PURE__ */ new Set() };
}
function $7252cd45fc48c07c$export$6c10d32b362bfa5f(state) {
	$7252cd45fc48c07c$export$6ca6700462636d0b = state;
}
function $7252cd45fc48c07c$export$78bf638634500fa5(ref) {
	let { draggingCollectionRef, dropCollectionRef } = $7252cd45fc48c07c$export$6ca6700462636d0b;
	return (draggingCollectionRef === null || draggingCollectionRef === void 0 ? void 0 : draggingCollectionRef.current) != null && draggingCollectionRef.current === ((ref === null || ref === void 0 ? void 0 : ref.current) || (dropCollectionRef === null || dropCollectionRef === void 0 ? void 0 : dropCollectionRef.current));
}
var $7252cd45fc48c07c$export$8e6636520ac15722;
function $7252cd45fc48c07c$export$64f52ed7349ddb84(dropEffect) {
	$7252cd45fc48c07c$export$8e6636520ac15722 = dropEffect;
}
var $7252cd45fc48c07c$export$f0130eb70b6347b8 = $103790afe9474d1c$export$60b7b4bcf3903d8e.none;
function $7252cd45fc48c07c$export$6539bc8c3a0a2d67(o) {
	$7252cd45fc48c07c$export$f0130eb70b6347b8 = o;
}
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/DragManager.mjs
var $67560de7c78cb232$var$dropTargets = /* @__PURE__ */ new Map();
var $67560de7c78cb232$var$dropItems = /* @__PURE__ */ new Map();
var $67560de7c78cb232$var$dragSession = null;
var $67560de7c78cb232$var$subscriptions = /* @__PURE__ */ new Set();
function $67560de7c78cb232$export$c28d9fb4a54e471a(target) {
	$67560de7c78cb232$var$dropTargets.set(target.element, target);
	$67560de7c78cb232$var$dragSession === null || $67560de7c78cb232$var$dragSession === void 0 || $67560de7c78cb232$var$dragSession.updateValidDropTargets();
	return () => {
		$67560de7c78cb232$var$dropTargets.delete(target.element);
		$67560de7c78cb232$var$dragSession === null || $67560de7c78cb232$var$dragSession === void 0 || $67560de7c78cb232$var$dragSession.updateValidDropTargets();
	};
}
function $67560de7c78cb232$export$aef80212ac99c003(item) {
	$67560de7c78cb232$var$dropItems.set(item.element, item);
	return () => {
		$67560de7c78cb232$var$dropItems.delete(item.element);
	};
}
function $67560de7c78cb232$export$549dbcf8649bf3b2(target, stringFormatter) {
	if ($67560de7c78cb232$var$dragSession) throw new Error("Cannot begin dragging while already dragging");
	$67560de7c78cb232$var$dragSession = new $67560de7c78cb232$var$DragSession(target, stringFormatter);
	requestAnimationFrame(() => {
		if ($67560de7c78cb232$var$dragSession) {
			$67560de7c78cb232$var$dragSession.setup();
			if ($7252cd45fc48c07c$export$1fb2158d224b542c() === "keyboard") $67560de7c78cb232$var$dragSession.next();
		}
	});
	for (let cb of $67560de7c78cb232$var$subscriptions) cb();
}
function $67560de7c78cb232$export$418e185dd3f1b968() {
	let [session, setSession] = (0, import_react.useState)($67560de7c78cb232$var$dragSession);
	(0, import_react.useEffect)(() => {
		let cb = () => setSession($67560de7c78cb232$var$dragSession);
		$67560de7c78cb232$var$subscriptions.add(cb);
		return () => {
			$67560de7c78cb232$var$subscriptions.delete(cb);
		};
	}, []);
	return session;
}
function $67560de7c78cb232$export$403bc76cbf68cf60() {
	return !!$67560de7c78cb232$var$dragSession;
}
function $67560de7c78cb232$var$endDragging() {
	$67560de7c78cb232$var$dragSession = null;
	for (let cb of $67560de7c78cb232$var$subscriptions) cb();
}
var $67560de7c78cb232$var$CANCELED_EVENTS = [
	"pointerdown",
	"pointermove",
	"pointerenter",
	"pointerleave",
	"pointerover",
	"pointerout",
	"pointerup",
	"mousedown",
	"mousemove",
	"mouseenter",
	"mouseleave",
	"mouseover",
	"mouseout",
	"mouseup",
	"touchstart",
	"touchmove",
	"touchend",
	"focusin",
	"focusout"
];
var $67560de7c78cb232$var$CLICK_EVENTS = [
	"pointerup",
	"mouseup",
	"touchend"
];
var $67560de7c78cb232$var$MESSAGES = {
	keyboard: "dragStartedKeyboard",
	touch: "dragStartedTouch",
	virtual: "dragStartedVirtual"
};
var $67560de7c78cb232$var$DragSession = class {
	setup() {
		document.addEventListener("keydown", this.onKeyDown, true);
		document.addEventListener("keyup", this.onKeyUp, true);
		window.addEventListener("focus", this.onFocus, true);
		window.addEventListener("blur", this.onBlur, true);
		document.addEventListener("click", this.onClick, true);
		document.addEventListener("pointerdown", this.onPointerDown, true);
		for (let event of $67560de7c78cb232$var$CANCELED_EVENTS) document.addEventListener(event, this.cancelEvent, true);
		this.mutationObserver = new MutationObserver(() => this.updateValidDropTargets());
		this.updateValidDropTargets();
		$319e236875307eab$export$a9b970dcc4ae71a9(this.stringFormatter.format($67560de7c78cb232$var$MESSAGES[$7252cd45fc48c07c$export$1fb2158d224b542c()]));
	}
	teardown() {
		var _this_mutationObserver, _this_restoreAriaHidden, _this;
		document.removeEventListener("keydown", this.onKeyDown, true);
		document.removeEventListener("keyup", this.onKeyUp, true);
		window.removeEventListener("focus", this.onFocus, true);
		window.removeEventListener("blur", this.onBlur, true);
		document.removeEventListener("click", this.onClick, true);
		document.removeEventListener("pointerdown", this.onPointerDown, true);
		for (let event of $67560de7c78cb232$var$CANCELED_EVENTS) document.removeEventListener(event, this.cancelEvent, true);
		(_this_mutationObserver = this.mutationObserver) === null || _this_mutationObserver === void 0 || _this_mutationObserver.disconnect();
		(_this_restoreAriaHidden = (_this = this).restoreAriaHidden) === null || _this_restoreAriaHidden === void 0 || _this_restoreAriaHidden.call(_this);
	}
	onKeyDown(e) {
		var _this_currentDropTarget;
		this.cancelEvent(e);
		if (e.key === "Escape") {
			this.cancel();
			return;
		}
		if (e.key === "Tab" && !(e.metaKey || e.altKey || e.ctrlKey)) if (e.shiftKey) this.previous();
		else this.next();
		if (typeof ((_this_currentDropTarget = this.currentDropTarget) === null || _this_currentDropTarget === void 0 ? void 0 : _this_currentDropTarget.onKeyDown) === "function") this.currentDropTarget.onKeyDown(e, this.dragTarget);
	}
	onKeyUp(e) {
		this.cancelEvent(e);
		if (e.key === "Enter") if (e.altKey || $d4ee10de306f2510$export$4282f70798064fe0(this.getCurrentActivateButton(), $d4ee10de306f2510$export$e58f029f0fbfdb29(e))) this.activate(this.currentDropTarget, this.currentDropItem);
		else this.drop();
	}
	getCurrentActivateButton() {
		var _this_currentDropItem_activateButtonRef, _this_currentDropItem, _this_currentDropTarget_activateButtonRef, _this_currentDropTarget;
		var _this_currentDropItem_activateButtonRef_current, _ref;
		return (_ref = (_this_currentDropItem_activateButtonRef_current = (_this_currentDropItem = this.currentDropItem) === null || _this_currentDropItem === void 0 ? void 0 : (_this_currentDropItem_activateButtonRef = _this_currentDropItem.activateButtonRef) === null || _this_currentDropItem_activateButtonRef === void 0 ? void 0 : _this_currentDropItem_activateButtonRef.current) !== null && _this_currentDropItem_activateButtonRef_current !== void 0 ? _this_currentDropItem_activateButtonRef_current : (_this_currentDropTarget = this.currentDropTarget) === null || _this_currentDropTarget === void 0 ? void 0 : (_this_currentDropTarget_activateButtonRef = _this_currentDropTarget.activateButtonRef) === null || _this_currentDropTarget_activateButtonRef === void 0 ? void 0 : _this_currentDropTarget_activateButtonRef.current) !== null && _ref !== void 0 ? _ref : null;
	}
	onFocus(e) {
		let activateButton = this.getCurrentActivateButton();
		let eventTarget = $d4ee10de306f2510$export$e58f029f0fbfdb29(e);
		if (eventTarget === activateButton) {
			this.cancelEvent(e);
			return;
		}
		if (eventTarget !== this.dragTarget.element) this.cancelEvent(e);
		if (!(eventTarget instanceof HTMLElement) || eventTarget === this.dragTarget.element) return;
		let dropTarget = this.validDropTargets.find((target) => target.element === eventTarget) || this.validDropTargets.find((target) => $d4ee10de306f2510$export$4282f70798064fe0(target.element, eventTarget));
		if (!dropTarget) {
			if (this.currentDropTarget) this.currentDropTarget.element.focus();
			else this.dragTarget.element.focus();
			return;
		}
		let item = $67560de7c78cb232$var$dropItems.get(eventTarget);
		if (dropTarget) this.setCurrentDropTarget(dropTarget, item);
	}
	onBlur(e) {
		let activateButton = this.getCurrentActivateButton();
		if (e.relatedTarget === activateButton) {
			this.cancelEvent(e);
			return;
		}
		if ($d4ee10de306f2510$export$e58f029f0fbfdb29(e) !== this.dragTarget.element) this.cancelEvent(e);
		if (!e.relatedTarget || !(e.relatedTarget instanceof HTMLElement)) if (this.currentDropTarget) this.currentDropTarget.element.focus();
		else this.dragTarget.element.focus();
	}
	onClick(e) {
		this.cancelEvent(e);
		if ($6a7db85432448f7f$export$60278871457622de(e) || this.isVirtualClick) {
			var _item_activateButtonRef, _dropTarget_activateButtonRef;
			let dropElements = $67560de7c78cb232$var$dropItems.values();
			let eventTarget = $d4ee10de306f2510$export$e58f029f0fbfdb29(e);
			let item = [...dropElements].find((item) => {
				var _item_activateButtonRef;
				return item.element === eventTarget || $d4ee10de306f2510$export$4282f70798064fe0((_item_activateButtonRef = item.activateButtonRef) === null || _item_activateButtonRef === void 0 ? void 0 : _item_activateButtonRef.current, eventTarget);
			});
			let dropTarget = this.validDropTargets.find((target) => $d4ee10de306f2510$export$4282f70798064fe0(target.element, eventTarget));
			var _item_activateButtonRef_current;
			if ($d4ee10de306f2510$export$4282f70798064fe0((_item_activateButtonRef_current = item === null || item === void 0 ? void 0 : (_item_activateButtonRef = item.activateButtonRef) === null || _item_activateButtonRef === void 0 ? void 0 : _item_activateButtonRef.current) !== null && _item_activateButtonRef_current !== void 0 ? _item_activateButtonRef_current : dropTarget === null || dropTarget === void 0 ? void 0 : (_dropTarget_activateButtonRef = dropTarget.activateButtonRef) === null || _dropTarget_activateButtonRef === void 0 ? void 0 : _dropTarget_activateButtonRef.current, eventTarget) && dropTarget) {
				this.activate(dropTarget, item);
				return;
			}
			if ($d4ee10de306f2510$export$e58f029f0fbfdb29(e) === this.dragTarget.element) {
				this.cancel();
				return;
			}
			if (dropTarget) {
				this.setCurrentDropTarget(dropTarget, item);
				this.drop(item);
			}
		}
	}
	onPointerDown(e) {
		this.cancelEvent(e);
		this.isVirtualClick = $6a7db85432448f7f$export$29bf1b5f2c56cf63(e);
	}
	cancelEvent(e) {
		var _this_dragTarget;
		let eventTarget = $d4ee10de306f2510$export$e58f029f0fbfdb29(e);
		if ((e.type === "focusin" || e.type === "focusout") && (eventTarget === ((_this_dragTarget = this.dragTarget) === null || _this_dragTarget === void 0 ? void 0 : _this_dragTarget.element) || eventTarget === this.getCurrentActivateButton())) return;
		if (!$67560de7c78cb232$var$CLICK_EVENTS.includes(e.type)) e.preventDefault();
		e.stopPropagation();
		e.stopImmediatePropagation();
	}
	updateValidDropTargets() {
		if (!this.mutationObserver) return;
		this.mutationObserver.disconnect();
		if (this.restoreAriaHidden) this.restoreAriaHidden();
		this.validDropTargets = $67560de7c78cb232$var$findValidDropTargets(this.dragTarget);
		if (this.validDropTargets.length > 0) {
			let nearestIndex = this.findNearestDropTarget();
			this.validDropTargets = [...this.validDropTargets.slice(nearestIndex), ...this.validDropTargets.slice(0, nearestIndex)];
		}
		if (this.currentDropTarget && !this.validDropTargets.includes(this.currentDropTarget)) this.setCurrentDropTarget(this.validDropTargets[0]);
		let types = $7252cd45fc48c07c$export$e1d41611756c6326(this.dragTarget.items);
		let validDropItems = [...$67560de7c78cb232$var$dropItems.values()].filter((item) => {
			if (typeof item.getDropOperation === "function") return item.getDropOperation(types, this.dragTarget.allowedDropOperations) !== "cancel";
			return true;
		});
		let visibleDropTargets = this.validDropTargets.filter((target) => !validDropItems.some((item) => $d4ee10de306f2510$export$4282f70798064fe0(target.element, item.element)));
		this.restoreAriaHidden = $5e3802645cc19319$export$1c3ebcada18427bf([
			this.dragTarget.element,
			...validDropItems.flatMap((item) => {
				var _item_activateButtonRef, _item_activateButtonRef1;
				return ((_item_activateButtonRef = item.activateButtonRef) === null || _item_activateButtonRef === void 0 ? void 0 : _item_activateButtonRef.current) ? [item.element, (_item_activateButtonRef1 = item.activateButtonRef) === null || _item_activateButtonRef1 === void 0 ? void 0 : _item_activateButtonRef1.current] : [item.element];
			}),
			...visibleDropTargets.flatMap((target) => {
				var _target_activateButtonRef, _target_activateButtonRef1;
				return ((_target_activateButtonRef = target.activateButtonRef) === null || _target_activateButtonRef === void 0 ? void 0 : _target_activateButtonRef.current) ? [target.element, (_target_activateButtonRef1 = target.activateButtonRef) === null || _target_activateButtonRef1 === void 0 ? void 0 : _target_activateButtonRef1.current] : [target.element];
			})
		], { shouldUseInert: true });
		this.mutationObserver.observe(document.body, {
			subtree: true,
			attributes: true,
			attributeFilter: ["aria-hidden", "inert"]
		});
	}
	next() {
		if (!this.currentDropTarget) {
			this.setCurrentDropTarget(this.validDropTargets[0]);
			return;
		}
		let index = this.validDropTargets.indexOf(this.currentDropTarget);
		if (index < 0) {
			this.setCurrentDropTarget(this.validDropTargets[0]);
			return;
		}
		if (index === this.validDropTargets.length - 1) if (!this.dragTarget.element.closest("[aria-hidden=\"true\"], [inert]")) {
			this.setCurrentDropTarget(null);
			this.dragTarget.element.focus();
		} else this.setCurrentDropTarget(this.validDropTargets[0]);
		else this.setCurrentDropTarget(this.validDropTargets[index + 1]);
	}
	previous() {
		if (!this.currentDropTarget) {
			this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);
			return;
		}
		let index = this.validDropTargets.indexOf(this.currentDropTarget);
		if (index < 0) {
			this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);
			return;
		}
		if (index === 0) if (!this.dragTarget.element.closest("[aria-hidden=\"true\"], [inert]")) {
			this.setCurrentDropTarget(null);
			this.dragTarget.element.focus();
		} else this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);
		else this.setCurrentDropTarget(this.validDropTargets[index - 1]);
	}
	findNearestDropTarget() {
		let dragTargetRect = this.dragTarget.element.getBoundingClientRect();
		let minDistance = Infinity;
		let nearest = -1;
		for (let i = 0; i < this.validDropTargets.length; i++) {
			let rect = this.validDropTargets[i].element.getBoundingClientRect();
			let dx = rect.left - dragTargetRect.left;
			let dy = rect.top - dragTargetRect.top;
			let dist = dx * dx + dy * dy;
			if (dist < minDistance) {
				minDistance = dist;
				nearest = i;
			}
		}
		return nearest;
	}
	setCurrentDropTarget(dropTarget, item) {
		if (dropTarget !== this.currentDropTarget) {
			if (this.currentDropTarget && typeof this.currentDropTarget.onDropExit === "function") {
				let rect = this.currentDropTarget.element.getBoundingClientRect();
				this.currentDropTarget.onDropExit({
					type: "dropexit",
					x: rect.left + rect.width / 2,
					y: rect.top + rect.height / 2
				});
			}
			this.currentDropTarget = dropTarget;
			if (dropTarget) {
				if (typeof dropTarget.onDropEnter === "function") {
					let rect = dropTarget.element.getBoundingClientRect();
					dropTarget.onDropEnter({
						type: "dropenter",
						x: rect.left + rect.width / 2,
						y: rect.top + rect.height / 2
					}, this.dragTarget);
				}
				if (!item) dropTarget === null || dropTarget === void 0 || dropTarget.element.focus();
			}
		}
		if (item != null && item !== this.currentDropItem) {
			if (this.currentDropTarget && typeof this.currentDropTarget.onDropTargetEnter === "function") this.currentDropTarget.onDropTargetEnter(item.target);
			item.element.focus();
			this.currentDropItem = item;
			if (!this.initialFocused) {
				let label = item === null || item === void 0 ? void 0 : item.element.getAttribute("aria-label");
				if (label) $319e236875307eab$export$a9b970dcc4ae71a9(label, "polite");
				this.initialFocused = true;
			}
		}
	}
	end() {
		var _getActiveElement;
		this.teardown();
		$67560de7c78cb232$var$endDragging();
		if (typeof this.dragTarget.onDragEnd === "function") {
			let rect = (this.currentDropTarget && this.dropOperation !== "cancel" ? this.currentDropTarget : this.dragTarget).element.getBoundingClientRect();
			this.dragTarget.onDragEnd({
				type: "dragend",
				x: rect.x + rect.width / 2,
				y: rect.y + rect.height / 2,
				dropOperation: this.dropOperation || "cancel"
			});
		}
		if (this.currentDropTarget && !this.currentDropTarget.preventFocusOnDrop) (_getActiveElement = $d4ee10de306f2510$export$cd4e5573fbe2b576()) === null || _getActiveElement === void 0 || _getActiveElement.dispatchEvent(new FocusEvent("focusin", { bubbles: true }));
		this.setCurrentDropTarget(null);
	}
	cancel() {
		var _getActiveElement;
		this.setCurrentDropTarget(null);
		this.end();
		if (!this.dragTarget.element.closest("[aria-hidden=\"true\"], [inert]")) this.dragTarget.element.focus();
		(_getActiveElement = $d4ee10de306f2510$export$cd4e5573fbe2b576()) === null || _getActiveElement === void 0 || _getActiveElement.dispatchEvent(new FocusEvent("focusin", { bubbles: true }));
		$319e236875307eab$export$a9b970dcc4ae71a9(this.stringFormatter.format("dropCanceled"));
	}
	drop(item) {
		if (!this.currentDropTarget) {
			this.cancel();
			return;
		}
		if (typeof (item === null || item === void 0 ? void 0 : item.getDropOperation) === "function") {
			let types = $7252cd45fc48c07c$export$e1d41611756c6326(this.dragTarget.items);
			this.dropOperation = item.getDropOperation(types, this.dragTarget.allowedDropOperations);
		} else if (typeof this.currentDropTarget.getDropOperation === "function") {
			let types = $7252cd45fc48c07c$export$e1d41611756c6326(this.dragTarget.items);
			this.dropOperation = this.currentDropTarget.getDropOperation(types, this.dragTarget.allowedDropOperations);
		} else this.dropOperation = this.dragTarget.allowedDropOperations[0];
		if (typeof this.currentDropTarget.onDrop === "function") {
			let items = this.dragTarget.items.map((item) => ({
				kind: "text",
				types: new Set(Object.keys(item)),
				getText: (type) => Promise.resolve(item[type])
			}));
			let rect = this.currentDropTarget.element.getBoundingClientRect();
			var _item_target;
			this.currentDropTarget.onDrop({
				type: "drop",
				x: rect.left + rect.width / 2,
				y: rect.top + rect.height / 2,
				items,
				dropOperation: this.dropOperation
			}, (_item_target = item === null || item === void 0 ? void 0 : item.target) !== null && _item_target !== void 0 ? _item_target : null);
		}
		this.end();
		$319e236875307eab$export$a9b970dcc4ae71a9(this.stringFormatter.format("dropComplete"));
	}
	activate(dropTarget, dropItem) {
		if (dropTarget && typeof dropTarget.onDropActivate === "function") {
			var _dropItem_target;
			let target = (_dropItem_target = dropItem === null || dropItem === void 0 ? void 0 : dropItem.target) !== null && _dropItem_target !== void 0 ? _dropItem_target : null;
			let rect = dropTarget.element.getBoundingClientRect();
			dropTarget.onDropActivate({
				type: "dropactivate",
				x: rect.left + rect.width / 2,
				y: rect.top + rect.height / 2
			}, target);
		}
	}
	constructor(target, stringFormatter) {
		this.validDropTargets = [];
		this.currentDropTarget = null;
		this.currentDropItem = null;
		this.dropOperation = null;
		this.mutationObserver = null;
		this.restoreAriaHidden = null;
		this.isVirtualClick = false;
		this.dragTarget = target;
		this.stringFormatter = stringFormatter;
		this.onKeyDown = this.onKeyDown.bind(this);
		this.onKeyUp = this.onKeyUp.bind(this);
		this.onFocus = this.onFocus.bind(this);
		this.onBlur = this.onBlur.bind(this);
		this.onClick = this.onClick.bind(this);
		this.onPointerDown = this.onPointerDown.bind(this);
		this.cancelEvent = this.cancelEvent.bind(this);
		this.initialFocused = false;
	}
};
function $67560de7c78cb232$var$findValidDropTargets(options) {
	let types = $7252cd45fc48c07c$export$e1d41611756c6326(options.items);
	return [...$67560de7c78cb232$var$dropTargets.values()].filter((target) => {
		if (target.element.closest("[aria-hidden=\"true\"], [inert]")) return false;
		if (typeof target.getDropOperation === "function") return target.getDropOperation(types, options.allowedDropOperations) !== "cancel";
		return true;
	});
}
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/ar-AE.mjs
var $7dfcac1a0c98c789$exports = {};
$7dfcac1a0c98c789$exports = {
	"dragDescriptionKeyboard": `\u{627}\u{636}\u{63A}\u{637} Enter \u{644}\u{628}\u{62F}\u{621} \u{627}\u{644}\u{633}\u{62D}\u{628}.`,
	"dragDescriptionKeyboardAlt": `\u{627}\u{636}\u{63A}\u{637} \u{639}\u{644}\u{649} Alt + Enter \u{644}\u{628}\u{62F}\u{621} \u{627}\u{644}\u{633}\u{62D}\u{628}.`,
	"dragDescriptionLongPress": `\u{627}\u{636}\u{63A}\u{637} \u{628}\u{627}\u{633}\u{62A}\u{645}\u{631}\u{627}\u{631} \u{644}\u{628}\u{62F}\u{621} \u{627}\u{644}\u{633}\u{62D}\u{628}.`,
	"dragDescriptionTouch": `\u{627}\u{636}\u{63A}\u{637} \u{645}\u{631}\u{62A}\u{64A}\u{646} \u{644}\u{628}\u{62F}\u{621} \u{627}\u{644}\u{633}\u{62D}\u{628}.`,
	"dragDescriptionVirtual": `\u{627}\u{646}\u{642}\u{631} \u{644}\u{628}\u{62F}\u{621} \u{627}\u{644}\u{633}\u{62D}\u{628}.`,
	"dragItem": (args) => `\u{627}\u{633}\u{62D}\u{628} ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `\u{627}\u{633}\u{62D}\u{628} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{639}\u{646}\u{635}\u{631} \u{645}\u{62D}\u{62F}\u{62F}`,
		other: () => `${formatter.number(args.count)} \u{639}\u{646}\u{627}\u{635}\u{631} \u{645}\u{62D}\u{62F}\u{62F}\u{629}`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `\u{627}\u{636}\u{63A}\u{637} \u{639}\u{644}\u{649} Enter \u{644}\u{644}\u{633}\u{62D}\u{628} ${formatter.plural(args.count, {
		one: `\u{639}\u{62F}\u{62F} \u{627}\u{644}\u{639}\u{646}\u{627}\u{635}\u{631} \u{627}\u{644}\u{645}\u{62E}\u{62A}\u{627}\u{631}\u{629}`,
		other: `\u{639}\u{62F}\u{62F} \u{627}\u{644}\u{639}\u{646}\u{627}\u{635}\u{631} \u{627}\u{644}\u{645}\u{62E}\u{62A}\u{627}\u{631}\u{629}`
	})}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `\u{627}\u{636}\u{63A}\u{637} \u{639}\u{644}\u{649} \u{645}\u{641}\u{62A}\u{627}\u{62D}\u{64A} Alt + Enter \u{644}\u{644}\u{633}\u{62D}\u{628} ${formatter.plural(args.count, {
		one: `\u{639}\u{62F}\u{62F} \u{627}\u{644}\u{639}\u{646}\u{627}\u{635}\u{631} \u{627}\u{644}\u{645}\u{62E}\u{62A}\u{627}\u{631}\u{629}`,
		other: `\u{639}\u{62F}\u{62F} \u{627}\u{644}\u{639}\u{646}\u{627}\u{635}\u{631} \u{627}\u{644}\u{645}\u{62E}\u{62A}\u{627}\u{631}\u{629}`
	})}.`,
	"dragSelectedLongPress": (args, formatter) => `\u{627}\u{636}\u{63A}\u{637} \u{628}\u{627}\u{633}\u{62A}\u{645}\u{631}\u{627}\u{631} \u{644}\u{644}\u{633}\u{62D}\u{628} ${formatter.plural(args.count, {
		one: `\u{639}\u{62F}\u{62F} \u{627}\u{644}\u{639}\u{646}\u{627}\u{635}\u{631} \u{627}\u{644}\u{645}\u{62E}\u{62A}\u{627}\u{631}\u{629}`,
		other: `\u{639}\u{62F}\u{62F} \u{627}\u{644}\u{639}\u{646}\u{627}\u{635}\u{631} \u{627}\u{644}\u{645}\u{62E}\u{62A}\u{627}\u{631}\u{629}`
	})}.`,
	"dragStartedKeyboard": `\u{628}\u{62F}\u{623} \u{627}\u{644}\u{633}\u{62D}\u{628}. \u{627}\u{636}\u{63A}\u{637} Tab \u{644}\u{644}\u{627}\u{646}\u{62A}\u{642}\u{627}\u{644} \u{625}\u{644}\u{649} \u{645}\u{648}\u{636}\u{639} \u{627}\u{644}\u{625}\u{641}\u{644}\u{627}\u{62A}\u{60C} \u{62B}\u{645} \u{627}\u{636}\u{63A}\u{637} Enter \u{644}\u{644}\u{625}\u{641}\u{644}\u{627}\u{62A}\u{60C} \u{623}\u{648} \u{627}\u{636}\u{63A}\u{637} Escape \u{644}\u{644}\u{625}\u{644}\u{63A}\u{627}\u{621}.`,
	"dragStartedTouch": `\u{628}\u{62F}\u{623} \u{627}\u{644}\u{633}\u{62D}\u{628}. \u{627}\u{646}\u{62A}\u{642}\u{644} \u{625}\u{644}\u{649} \u{645}\u{648}\u{636}\u{639} \u{627}\u{644}\u{625}\u{641}\u{644}\u{627}\u{62A}\u{60C} \u{62B}\u{645} \u{627}\u{636}\u{63A}\u{637} \u{645}\u{631}\u{62A}\u{64A}\u{646} \u{644}\u{644}\u{625}\u{641}\u{644}\u{627}\u{62A}.`,
	"dragStartedVirtual": `\u{628}\u{62F}\u{623} \u{627}\u{644}\u{633}\u{62D}\u{628}. \u{627}\u{646}\u{62A}\u{642}\u{644} \u{625}\u{644}\u{649} \u{645}\u{643}\u{627}\u{646} \u{627}\u{644}\u{625}\u{641}\u{644}\u{627}\u{62A}\u{60C} \u{62B}\u{645} \u{627}\u{646}\u{642}\u{631} \u{623}\u{648} \u{627}\u{636}\u{63A}\u{637} Enter \u{644}\u{644}\u{625}\u{641}\u{644}\u{627}\u{62A}.`,
	"dropCanceled": `\u{62A}\u{645} \u{625}\u{644}\u{63A}\u{627}\u{621} \u{627}\u{644}\u{625}\u{641}\u{644}\u{627}\u{62A}.`,
	"dropComplete": `\u{627}\u{643}\u{62A}\u{645}\u{644} \u{627}\u{644}\u{625}\u{641}\u{644}\u{627}\u{62A}.`,
	"dropDescriptionKeyboard": `\u{627}\u{636}\u{63A}\u{637} Enter \u{644}\u{644}\u{625}\u{641}\u{644}\u{627}\u{62A}. \u{627}\u{636}\u{63A}\u{637} Escape \u{644}\u{625}\u{644}\u{63A}\u{627}\u{621} \u{627}\u{644}\u{633}\u{62D}\u{628}.`,
	"dropDescriptionTouch": `\u{627}\u{636}\u{63A}\u{637} \u{645}\u{631}\u{62A}\u{64A}\u{646} \u{644}\u{644}\u{625}\u{641}\u{644}\u{627}\u{62A}.`,
	"dropDescriptionVirtual": `\u{627}\u{646}\u{642}\u{631} \u{644}\u{644}\u{625}\u{641}\u{644}\u{627}\u{62A}.`,
	"dropIndicator": `\u{645}\u{624}\u{634}\u{631} \u{627}\u{644}\u{625}\u{641}\u{644}\u{627}\u{62A}`,
	"dropOnItem": (args) => `\u{625}\u{641}\u{644}\u{627}\u{62A} ${args.itemText}`,
	"dropOnRoot": `\u{627}\u{644}\u{625}\u{641}\u{644}\u{627}\u{62A}`,
	"endDragKeyboard": `\u{627}\u{644}\u{633}\u{62D}\u{628}. \u{627}\u{636}\u{63A}\u{637} Enter \u{644}\u{625}\u{644}\u{63A}\u{627}\u{621} \u{627}\u{644}\u{633}\u{62D}\u{628}.`,
	"endDragTouch": `\u{627}\u{644}\u{633}\u{62D}\u{628}. \u{627}\u{636}\u{63A}\u{637} \u{645}\u{631}\u{62A}\u{64A}\u{646} \u{644}\u{625}\u{644}\u{63A}\u{627}\u{621} \u{627}\u{644}\u{633}\u{62D}\u{628}.`,
	"endDragVirtual": `\u{627}\u{644}\u{633}\u{62D}\u{628}. \u{627}\u{646}\u{642}\u{631} \u{644}\u{625}\u{644}\u{63A}\u{627}\u{621} \u{627}\u{644}\u{633}\u{62D}\u{628}.`,
	"insertAfter": (args) => `\u{623}\u{62F}\u{62E}\u{644} \u{628}\u{639}\u{62F} ${args.itemText}`,
	"insertBefore": (args) => `\u{623}\u{62F}\u{62E}\u{644} \u{642}\u{628}\u{644} ${args.itemText}`,
	"insertBetween": (args) => `\u{623}\u{62F}\u{62E}\u{644} \u{628}\u{64A}\u{646} ${args.beforeItemText} \u{648} ${args.afterItemText}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/bg-BG.mjs
var $f311c26671219eca$exports = {};
$f311c26671219eca$exports = {
	"dragDescriptionKeyboard": `\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435} \u{201E}Enter\u{201C}, \u{437}\u{430} \u{434}\u{430} \u{437}\u{430}\u{43F}\u{43E}\u{447}\u{43D}\u{435}\u{442}\u{435} \u{434}\u{430} \u{43F}\u{43B}\u{44A}\u{437}\u{433}\u{430}\u{442}\u{435}.`,
	"dragDescriptionKeyboardAlt": `\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435} Alt + Enter, \u{437}\u{430} \u{434}\u{430} \u{437}\u{430}\u{43F}\u{43E}\u{447}\u{43D}\u{435}\u{442}\u{435} \u{434}\u{430} \u{43F}\u{43B}\u{44A}\u{437}\u{433}\u{430}\u{442}\u{435}.`,
	"dragDescriptionLongPress": `\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435} \u{43F}\u{440}\u{43E}\u{434}\u{44A}\u{43B}\u{436}\u{438}\u{442}\u{435}\u{43B}\u{43D}\u{43E}, \u{437}\u{430} \u{434}\u{430} \u{437}\u{430}\u{43F}\u{43E}\u{447}\u{43D}\u{435}\u{442}\u{435} \u{434}\u{430} \u{43F}\u{43B}\u{44A}\u{437}\u{433}\u{430}\u{442}\u{435}.`,
	"dragDescriptionTouch": `\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435} \u{434}\u{432}\u{443}\u{43A}\u{440}\u{430}\u{442}\u{43D}\u{43E}, \u{437}\u{430} \u{434}\u{430} \u{437}\u{430}\u{43F}\u{43E}\u{447}\u{43D}\u{435}\u{442}\u{435} \u{434}\u{430} \u{43F}\u{43B}\u{44A}\u{437}\u{433}\u{430}\u{442}\u{435}.`,
	"dragDescriptionVirtual": `\u{429}\u{440}\u{430}\u{43A}\u{43D}\u{435}\u{442}\u{435}, \u{437}\u{430} \u{434}\u{430} \u{437}\u{430}\u{43F}\u{43E}\u{447}\u{43D}\u{435}\u{442}\u{435} \u{434}\u{430} \u{43F}\u{43B}\u{44A}\u{437}\u{433}\u{430}\u{442}\u{435}.`,
	"dragItem": (args) => `\u{41F}\u{43B}\u{44A}\u{437}\u{43D}\u{438} ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `\u{41F}\u{43B}\u{44A}\u{437}\u{43D}\u{438} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}`,
		other: () => `${formatter.number(args.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{430}`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435} Enter, \u{437}\u{430} \u{434}\u{430} \u{43F}\u{43B}\u{44A}\u{437}\u{43D}\u{435}\u{442}\u{435} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}`,
		other: () => `${formatter.number(args.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{438}`
	})}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435} Alt \u{438} Enter, \u{437}\u{430} \u{434}\u{430} \u{43F}\u{43B}\u{44A}\u{437}\u{43D}\u{435}\u{442}\u{435} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}`,
		other: () => `${formatter.number(args.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{438}`
	})}.`,
	"dragSelectedLongPress": (args, formatter) => `\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435} \u{43F}\u{440}\u{43E}\u{434}\u{44A}\u{43B}\u{436}\u{438}\u{442}\u{435}\u{43B}\u{43D}\u{43E}, \u{437}\u{430} \u{434}\u{430} \u{43F}\u{43B}\u{44A}\u{437}\u{43D}\u{435}\u{442}\u{435} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}`,
		other: () => `${formatter.number(args.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{438}`
	})}.`,
	"dragStartedKeyboard": `\u{417}\u{430}\u{43F}\u{43E}\u{447}\u{43D}\u{430} \u{43F}\u{43B}\u{44A}\u{437}\u{433}\u{430}\u{43D}\u{435}. \u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435} \u{201E}Tab\u{201C}, \u{437}\u{430} \u{434}\u{430} \u{441}\u{435} \u{43F}\u{440}\u{438}\u{434}\u{432}\u{438}\u{436}\u{438}\u{442}\u{435} \u{434}\u{43E} \u{446}\u{435}\u{43B}\u{442}\u{430}, \u{441}\u{43B}\u{435}\u{434} \u{43A}\u{43E}\u{435}\u{442}\u{43E} \u{43D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435} \u{201E}Enter\u{201C} \u{437}\u{430} \u{43F}\u{443}\u{441}\u{43A}\u{430}\u{43D}\u{435} \u{438}\u{43B}\u{438} \u{43D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435} \u{201E}Escape\u{201C} \u{437}\u{430} \u{43E}\u{442}\u{43C}\u{44F}\u{43D}\u{430}.`,
	"dragStartedTouch": `\u{417}\u{430}\u{43F}\u{43E}\u{447}\u{43D}\u{430} \u{43F}\u{43B}\u{44A}\u{437}\u{433}\u{430}\u{43D}\u{435}. \u{41F}\u{440}\u{438}\u{434}\u{432}\u{438}\u{436}\u{435}\u{442}\u{435} \u{441}\u{435} \u{434}\u{43E} \u{446}\u{435}\u{43B}\u{442}\u{430}, \u{441}\u{43B}\u{435}\u{434} \u{43A}\u{43E}\u{435}\u{442}\u{43E} \u{43D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435} \u{434}\u{432}\u{443}\u{43A}\u{440}\u{430}\u{442}\u{43D}\u{43E}, \u{437}\u{430} \u{434}\u{430} \u{43F}\u{443}\u{441}\u{43D}\u{435}\u{442}\u{435}.`,
	"dragStartedVirtual": `\u{417}\u{430}\u{43F}\u{43E}\u{447}\u{43D}\u{430} \u{43F}\u{43B}\u{44A}\u{437}\u{433}\u{430}\u{43D}\u{435}. \u{41F}\u{440}\u{438}\u{434}\u{432}\u{438}\u{436}\u{435}\u{442}\u{435} \u{441}\u{435} \u{434}\u{43E} \u{446}\u{435}\u{43B}\u{442}\u{430}, \u{441}\u{43B}\u{435}\u{434} \u{43A}\u{43E}\u{435}\u{442}\u{43E} \u{449}\u{440}\u{430}\u{43A}\u{43D}\u{435}\u{442}\u{435} \u{438}\u{43B}\u{438} \u{43D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435} \u{201E}Enter\u{201C} \u{437}\u{430} \u{43F}\u{443}\u{441}\u{43A}\u{430}\u{43D}\u{435}.`,
	"dropCanceled": `\u{41F}\u{443}\u{441}\u{43A}\u{430}\u{43D}\u{435}\u{442}\u{43E} \u{435} \u{43E}\u{442}\u{43C}\u{435}\u{43D}\u{435}\u{43D}\u{43E}.`,
	"dropComplete": `\u{41F}\u{443}\u{441}\u{43A}\u{430}\u{43D}\u{435}\u{442}\u{43E} \u{435} \u{437}\u{430}\u{432}\u{44A}\u{440}\u{448}\u{435}\u{43D}\u{43E}.`,
	"dropDescriptionKeyboard": `\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435} \u{201E}Enter\u{201C} \u{437}\u{430} \u{43F}\u{443}\u{441}\u{43A}\u{430}\u{43D}\u{435}. \u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435} \u{201E}Escape\u{201C} \u{437}\u{430} \u{43E}\u{442}\u{43C}\u{44F}\u{43D}\u{430} \u{43D}\u{430} \u{43F}\u{43B}\u{44A}\u{437}\u{433}\u{430}\u{43D}\u{435}\u{442}\u{43E}.`,
	"dropDescriptionTouch": `\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435} \u{434}\u{432}\u{443}\u{43A}\u{440}\u{430}\u{442}\u{43D}\u{43E} \u{437}\u{430} \u{43F}\u{443}\u{441}\u{43A}\u{430}\u{43D}\u{435}.`,
	"dropDescriptionVirtual": `\u{429}\u{440}\u{430}\u{43A}\u{43D}\u{435}\u{442}\u{435} \u{437}\u{430} \u{43F}\u{443}\u{441}\u{43A}\u{430}\u{43D}\u{435}.`,
	"dropIndicator": `\u{438}\u{43D}\u{434}\u{438}\u{43A}\u{430}\u{442}\u{43E}\u{440} \u{437}\u{430} \u{43F}\u{443}\u{441}\u{43A}\u{430}\u{43D}\u{435}`,
	"dropOnItem": (args) => `\u{41F}\u{443}\u{441}\u{43D}\u{438} \u{432}\u{44A}\u{440}\u{445}\u{443} ${args.itemText}`,
	"dropOnRoot": `\u{41F}\u{443}\u{441}\u{43D}\u{438} \u{432}\u{44A}\u{440}\u{445}\u{443}`,
	"endDragKeyboard": `\u{41F}\u{43B}\u{44A}\u{437}\u{433}\u{430}\u{43D}\u{435}. \u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435} \u{201E}Enter\u{201C} \u{437}\u{430} \u{43E}\u{442}\u{43C}\u{44F}\u{43D}\u{430} \u{43D}\u{430} \u{43F}\u{43B}\u{44A}\u{437}\u{433}\u{430}\u{43D}\u{435}\u{442}\u{43E}.`,
	"endDragTouch": `\u{41F}\u{43B}\u{44A}\u{437}\u{433}\u{430}\u{43D}\u{435}. \u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435} \u{434}\u{432}\u{443}\u{43A}\u{440}\u{430}\u{442}\u{43D}\u{43E} \u{437}\u{430} \u{43E}\u{442}\u{43C}\u{44F}\u{43D}\u{430} \u{43D}\u{430} \u{43F}\u{43B}\u{44A}\u{437}\u{433}\u{430}\u{43D}\u{435}\u{442}\u{43E}.`,
	"endDragVirtual": `\u{41F}\u{43B}\u{44A}\u{437}\u{433}\u{430}\u{43D}\u{435}. \u{429}\u{440}\u{430}\u{43A}\u{43D}\u{435}\u{442}\u{435} \u{437}\u{430} \u{43E}\u{442}\u{43C}\u{44F}\u{43D}\u{430}.`,
	"insertAfter": (args) => `\u{412}\u{43C}\u{44A}\u{43A}\u{43D}\u{438} \u{441}\u{43B}\u{435}\u{434} ${args.itemText}`,
	"insertBefore": (args) => `\u{412}\u{43C}\u{44A}\u{43A}\u{43D}\u{438} \u{43F}\u{440}\u{435}\u{434}\u{438} ${args.itemText}`,
	"insertBetween": (args) => `\u{412}\u{43C}\u{44A}\u{43A}\u{43D}\u{438} \u{43C}\u{435}\u{436}\u{434}\u{443} ${args.beforeItemText} \u{438} ${args.afterItemText}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/cs-CZ.mjs
var $1aa4ade186550f72$exports = {};
$1aa4ade186550f72$exports = {
	"dragDescriptionKeyboard": `Stisknut\xedm kl\xe1vesy Enter za\u{10D}nete s p\u{159}etahov\xe1n\xedm.`,
	"dragDescriptionKeyboardAlt": `Stisknut\xedm Alt + Enter zah\xe1j\xedte p\u{159}etahov\xe1n\xed.`,
	"dragDescriptionLongPress": `Dlouh\xfdm stisknut\xedm zah\xe1j\xedte p\u{159}etahov\xe1n\xed.`,
	"dragDescriptionTouch": `Poklep\xe1n\xedm za\u{10D}nete s p\u{159}etahov\xe1n\xedm.`,
	"dragDescriptionVirtual": `Kliknut\xedm za\u{10D}nete s p\u{159}etahov\xe1n\xedm.`,
	"dragItem": (args) => `P\u{159}et\xe1hnout ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `P\u{159}et\xe1hnout ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} vybranou polo\u{17E}ku`,
		few: () => `${formatter.number(args.count)} vybran\xe9 polo\u{17E}ky`,
		other: () => `${formatter.number(args.count)} vybran\xfdch polo\u{17E}ek`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `Stisknut\xedm kl\xe1vesy Enter p\u{159}et\xe1hn\u{11B}te ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} vybranou polo\u{17E}ku`,
		other: () => `${formatter.number(args.count)} vybran\xe9 polo\u{17E}ky`
	})}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `Stisknut\xedm Alt + Enter p\u{159}et\xe1hn\u{11B}te ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} vybranou polo\u{17E}ku`,
		other: () => `${formatter.number(args.count)} vybran\xe9 polo\u{17E}ky`
	})}.`,
	"dragSelectedLongPress": (args, formatter) => `Dlouh\xfdm stisknut\xedm p\u{159}et\xe1hnete ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} vybranou polo\u{17E}ku`,
		other: () => `${formatter.number(args.count)} vybran\xe9 polo\u{17E}ky`
	})}.`,
	"dragStartedKeyboard": `Za\u{10D}n\u{11B}te s p\u{159}etahov\xe1n\xedm. Po stisknut\xed kl\xe1vesy Tab najd\u{11B}te po\u{17E}adovan\xfd c\xedl a stisknut\xedm kl\xe1vesy Enter p\u{159}eta\u{17E}en\xed dokon\u{10D}ete nebo stisknut\xedm kl\xe1vesy Esc akci zru\u{161}te.`,
	"dragStartedTouch": `Za\u{10D}n\u{11B}te s p\u{159}etahov\xe1n\xedm. Najd\u{11B}te po\u{17E}adovan\xfd c\xedl a poklep\xe1n\xedm p\u{159}eta\u{17E}en\xed dokon\u{10D}ete.`,
	"dragStartedVirtual": `Za\u{10D}n\u{11B}te s p\u{159}etahov\xe1n\xedm. Najd\u{11B}te po\u{17E}adovan\xfd c\xedl a kliknut\xedm nebo stisknut\xedm kl\xe1vesy Enter p\u{159}eta\u{17E}en\xed dokon\u{10D}ete.`,
	"dropCanceled": `P\u{159}eta\u{17E}en\xed bylo zru\u{161}eno.`,
	"dropComplete": `P\u{159}eta\u{17E}en\xed bylo dokon\u{10D}eno.`,
	"dropDescriptionKeyboard": `Stisknut\xedm kl\xe1vesy Enter p\u{159}eta\u{17E}en\xed dokon\u{10D}ete nebo stisknut\xedm kl\xe1vesy Esc akci zru\u{161}te.`,
	"dropDescriptionTouch": `Poklep\xe1n\xedm p\u{159}eta\u{17E}en\xed dokon\u{10D}ete.`,
	"dropDescriptionVirtual": `Kliknut\xedm objekt p\u{159}et\xe1hn\u{11B}te.`,
	"dropIndicator": `indik\xe1tor p\u{159}eta\u{17E}en\xed`,
	"dropOnItem": (args) => `P\u{159}et\xe1hnout na ${args.itemText}`,
	"dropOnRoot": `P\u{159}et\xe1hnout na`,
	"endDragKeyboard": `Prob\xedh\xe1 p\u{159}etahov\xe1n\xed. Stisknut\xedm kl\xe1vesy Enter p\u{159}eta\u{17E}en\xed zru\u{161}\xedte.`,
	"endDragTouch": `Prob\xedh\xe1 p\u{159}etahov\xe1n\xed. Poklep\xe1n\xedm p\u{159}eta\u{17E}en\xed zru\u{161}\xedte.`,
	"endDragVirtual": `Prob\xedh\xe1 p\u{159}etahov\xe1n\xed. Kliknut\xedm p\u{159}eta\u{17E}en\xed zru\u{161}\xedte.`,
	"insertAfter": (args) => `Vlo\u{17E}it za ${args.itemText}`,
	"insertBefore": (args) => `Vlo\u{17E}it p\u{159}ed ${args.itemText}`,
	"insertBetween": (args) => `Vlo\u{17E}it mezi ${args.beforeItemText} a ${args.afterItemText}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/da-DK.mjs
var $b6b0ea1b94a7633c$exports = {};
$b6b0ea1b94a7633c$exports = {
	"dragDescriptionKeyboard": `Tryk p\xe5 Enter for at starte med at tr\xe6kke.`,
	"dragDescriptionKeyboardAlt": `Tryk p\xe5 Alt + Enter for at starte med at tr\xe6kke.`,
	"dragDescriptionLongPress": `Tryk l\xe6nge for at starte med at tr\xe6kke.`,
	"dragDescriptionTouch": `Dobbelttryk for at starte med at tr\xe6kke.`,
	"dragDescriptionVirtual": `Klik for at starte med at tr\xe6kke.`,
	"dragItem": (args) => `Tr\xe6k ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `Tr\xe6k ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} valgt element`,
		other: () => `${formatter.number(args.count)} valgte elementer`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `Tryk p\xe5 Enter for at tr\xe6kke ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} valgte element`,
		other: () => `${formatter.number(args.count)} valgte elementer`
	})}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `Tryk p\xe5 Alt + Enter for at tr\xe6kke ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} valgte element`,
		other: () => `${formatter.number(args.count)} valgte elementer`
	})}.`,
	"dragSelectedLongPress": (args, formatter) => `Tryk l\xe6nge for at tr\xe6kke ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} valgte element`,
		other: () => `${formatter.number(args.count)} valgte elementer`
	})}.`,
	"dragStartedKeyboard": `Startet med at tr\xe6kke. Tryk p\xe5 Tab for at g\xe5 til et slip-m\xe5l, tryk derefter p\xe5 Enter for at slippe, eller tryk p\xe5 Escape for at annullere.`,
	"dragStartedTouch": `Startet med at tr\xe6kke. G\xe5 til et slip-m\xe5l, og dobbelttryk derefter for at slippe.`,
	"dragStartedVirtual": `Startet med at tr\xe6kke. G\xe5 til et slip-m\xe5l, og klik eller tryk derefter p\xe5 enter for at slippe.`,
	"dropCanceled": `Slip annulleret.`,
	"dropComplete": `Slip fuldf\xf8rt.`,
	"dropDescriptionKeyboard": `Tryk p\xe5 Enter for at slippe. Tryk p\xe5 Escape for at annullere tr\xe6kning.`,
	"dropDescriptionTouch": `Dobbelttryk for at slippe.`,
	"dropDescriptionVirtual": `Klik for at slippe.`,
	"dropIndicator": `slip-indikator`,
	"dropOnItem": (args) => `Slip p\xe5 ${args.itemText}`,
	"dropOnRoot": `Slip p\xe5`,
	"endDragKeyboard": `Tr\xe6kning. Tryk p\xe5 enter for at annullere tr\xe6k.`,
	"endDragTouch": `Tr\xe6kning. Dobbelttryk for at annullere tr\xe6k.`,
	"endDragVirtual": `Tr\xe6kning. Klik for at annullere tr\xe6kning.`,
	"insertAfter": (args) => `Inds\xe6t efter ${args.itemText}`,
	"insertBefore": (args) => `Inds\xe6t f\xf8r ${args.itemText}`,
	"insertBetween": (args) => `Inds\xe6t mellem ${args.beforeItemText} og ${args.afterItemText}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/de-DE.mjs
var $d10e4f47c744ad52$exports = {};
$d10e4f47c744ad52$exports = {
	"dragDescriptionKeyboard": `Dr\xfccken Sie die Eingabetaste, um den Ziehvorgang zu starten.`,
	"dragDescriptionKeyboardAlt": `Alt + Eingabe dr\xfccken, um den Ziehvorgang zu starten.`,
	"dragDescriptionLongPress": `Lang dr\xfccken, um mit dem Ziehen zu beginnen.`,
	"dragDescriptionTouch": `Tippen Sie doppelt, um den Ziehvorgang zu starten.`,
	"dragDescriptionVirtual": `Zum Starten des Ziehvorgangs klicken.`,
	"dragItem": (args) => `${args.itemText} ziehen`,
	"dragSelectedItems": (args, formatter) => `${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} ausgew\xe4hltes Objekt`,
		other: () => `${formatter.number(args.count)} ausgew\xe4hlte Objekte`
	})} ziehen`,
	"dragSelectedKeyboard": (args, formatter) => `Eingabetaste dr\xfccken, um ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} ausgew\xe4hltes Element`,
		other: () => `${formatter.number(args.count)} ausgew\xe4hlte Elemente`
	})} zu ziehen.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `Alt + Eingabetaste dr\xfccken, um ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} ausgew\xe4hltes Element`,
		other: () => `${formatter.number(args.count)} ausgew\xe4hlte Elemente`
	})} zu ziehen.`,
	"dragSelectedLongPress": (args, formatter) => `Lang dr\xfccken, um ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} ausgew\xe4hltes Element`,
		other: () => `${formatter.number(args.count)} ausgew\xe4hlte Elemente`
	})} zu ziehen.`,
	"dragStartedKeyboard": `Ziehvorgang gestartet. Dr\xfccken Sie die Tabulatortaste, um zu einem Ablegeziel zu navigieren und dr\xfccken Sie dann die Eingabetaste, um das Objekt abzulegen, oder Escape, um den Vorgang abzubrechen.`,
	"dragStartedTouch": `Ziehvorgang gestartet. Navigieren Sie zu einem Ablegeziel und tippen Sie doppelt, um das Objekt abzulegen.`,
	"dragStartedVirtual": `Ziehvorgang gestartet. Navigieren Sie zu einem Ablegeziel und klicken Sie oder dr\xfccken Sie die Eingabetaste, um das Objekt abzulegen.`,
	"dropCanceled": `Ablegen abgebrochen.`,
	"dropComplete": `Ablegen abgeschlossen.`,
	"dropDescriptionKeyboard": `Dr\xfccken Sie die Eingabetaste, um das Objekt abzulegen. Dr\xfccken Sie Escape, um den Vorgang abzubrechen.`,
	"dropDescriptionTouch": `Tippen Sie doppelt, um das Objekt abzulegen.`,
	"dropDescriptionVirtual": `Zum Ablegen klicken.`,
	"dropIndicator": `Ablegeanzeiger`,
	"dropOnItem": (args) => `Auf ${args.itemText} ablegen`,
	"dropOnRoot": `Ablegen auf`,
	"endDragKeyboard": `Ziehvorgang l\xe4uft. Dr\xfccken Sie die Eingabetaste, um den Vorgang abzubrechen.`,
	"endDragTouch": `Ziehvorgang l\xe4uft. Tippen Sie doppelt, um den Vorgang abzubrechen.`,
	"endDragVirtual": `Ziehvorgang l\xe4uft. Klicken Sie, um den Vorgang abzubrechen.`,
	"insertAfter": (args) => `Nach ${args.itemText} einf\xfcgen`,
	"insertBefore": (args) => `Vor ${args.itemText} einf\xfcgen`,
	"insertBetween": (args) => `Zwischen ${args.beforeItemText} und ${args.afterItemText} einf\xfcgen`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/el-GR.mjs
var $b3d2bb9abce688ab$exports = {};
$b3d2bb9abce688ab$exports = {
	"dragDescriptionKeyboard": `\u{3A0}\u{3B1}\u{3C4}\u{3AE}\u{3C3}\u{3C4}\u{3B5} Enter \u{3B3}\u{3B9}\u{3B1} \u{3AD}\u{3BD}\u{3B1}\u{3C1}\u{3BE}\u{3B7} \u{3C4}\u{3B7}\u{3C2} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3C6}\u{3BF}\u{3C1}\u{3AC}\u{3C2}.`,
	"dragDescriptionKeyboardAlt": `\u{3A0}\u{3B1}\u{3C4}\u{3AE}\u{3C3}\u{3C4}\u{3B5} Alt + Enter \u{3B3}\u{3B9}\u{3B1} \u{3AD}\u{3BD}\u{3B1}\u{3C1}\u{3BE}\u{3B7} \u{3C4}\u{3B7}\u{3C2} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3C6}\u{3BF}\u{3C1}\u{3AC}\u{3C2}.`,
	"dragDescriptionLongPress": `\u{3A0}\u{3B1}\u{3C4}\u{3AE}\u{3C3}\u{3C4}\u{3B5} \u{3C0}\u{3B1}\u{3C1}\u{3B1}\u{3C4}\u{3B5}\u{3C4}\u{3B1}\u{3BC}\u{3AD}\u{3BD}\u{3B1} \u{3B3}\u{3B9}\u{3B1} \u{3BD}\u{3B1} \u{3BE}\u{3B5}\u{3BA}\u{3B9}\u{3BD}\u{3AE}\u{3C3}\u{3B5}\u{3C4}\u{3B5} \u{3C4}\u{3B7} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3C6}\u{3BF}\u{3C1}\u{3AC}.`,
	"dragDescriptionTouch": `\u{3A0}\u{3B1}\u{3C4}\u{3AE}\u{3C3}\u{3C4}\u{3B5} \u{3B4}\u{3CD}\u{3BF} \u{3C6}\u{3BF}\u{3C1}\u{3AD}\u{3C2} \u{3B3}\u{3B9}\u{3B1} \u{3AD}\u{3BD}\u{3B1}\u{3C1}\u{3BE}\u{3B7} \u{3C4}\u{3B7}\u{3C2} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3C6}\u{3BF}\u{3C1}\u{3AC}\u{3C2}.`,
	"dragDescriptionVirtual": `\u{39A}\u{3AC}\u{3BD}\u{3C4}\u{3B5} \u{3BA}\u{3BB}\u{3B9}\u{3BA} \u{3B3}\u{3B9}\u{3B1} \u{3BD}\u{3B1} \u{3BE}\u{3B5}\u{3BA}\u{3B9}\u{3BD}\u{3AE}\u{3C3}\u{3B5}\u{3C4}\u{3B5} \u{3C4}\u{3B7} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3C6}\u{3BF}\u{3C1}\u{3AC}.`,
	"dragItem": (args) => `\u{39C}\u{3B5}\u{3C4}\u{3B1}\u{3C6}\u{3BF}\u{3C1}\u{3AC} ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `\u{39C}\u{3B5}\u{3C4}\u{3B1}\u{3C6}\u{3BF}\u{3C1}\u{3AC} \u{3C3}\u{3B5} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF}`,
		other: () => `${formatter.number(args.count)} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B1} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3B1}`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `\u{3A0}\u{3B1}\u{3C4}\u{3AE}\u{3C3}\u{3C4}\u{3B5} Enter \u{3B3}\u{3B9}\u{3B1} \u{3BD}\u{3B1} \u{3C3}\u{3CD}\u{3C1}\u{3B5}\u{3C4}\u{3B5} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF}`,
		other: () => `${formatter.number(args.count)} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B1} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3B1}`
	})}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `\u{3A0}\u{3B1}\u{3C4}\u{3AE}\u{3C3}\u{3C4}\u{3B5} Alt + Enter \u{3B3}\u{3B9}\u{3B1} \u{3BD}\u{3B1} \u{3C3}\u{3CD}\u{3C1}\u{3B5}\u{3C4}\u{3B5} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF}`,
		other: () => `${formatter.number(args.count)} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B1} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3B1}`
	})}.`,
	"dragSelectedLongPress": (args, formatter) => `\u{3A0}\u{3B1}\u{3C4}\u{3AE}\u{3C3}\u{3C4}\u{3B5} \u{3C0}\u{3B1}\u{3C1}\u{3B1}\u{3C4}\u{3B5}\u{3C4}\u{3B1}\u{3BC}\u{3AD}\u{3BD}\u{3B1} \u{3B3}\u{3B9}\u{3B1} \u{3BD}\u{3B1} \u{3C3}\u{3CD}\u{3C1}\u{3B5}\u{3C4}\u{3B5} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF}`,
		other: () => `${formatter.number(args.count)} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B1} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3B1}`
	})}.`,
	"dragStartedKeyboard": `\u{397} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3C6}\u{3BF}\u{3C1}\u{3AC} \u{3BE}\u{3B5}\u{3BA}\u{3AF}\u{3BD}\u{3B7}\u{3C3}\u{3B5}. \u{3A0}\u{3B1}\u{3C4}\u{3AE}\u{3C3}\u{3C4}\u{3B5} \u{3C4}\u{3BF} \u{3C0}\u{3BB}\u{3AE}\u{3BA}\u{3C4}\u{3C1}\u{3BF} Tab \u{3B3}\u{3B9}\u{3B1} \u{3BD}\u{3B1} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3B2}\u{3B5}\u{3AF}\u{3C4}\u{3B5} \u{3C3}\u{3B5} \u{3AD}\u{3BD}\u{3B1}\u{3BD} \u{3C0}\u{3C1}\u{3BF}\u{3BF}\u{3C1}\u{3B9}\u{3C3}\u{3BC}\u{3CC} \u{3B1}\u{3C0}\u{3CC}\u{3B8}\u{3B5}\u{3C3}\u{3B7}\u{3C2} \u{3BA}\u{3B1}\u{3B9}, \u{3C3}\u{3C4}\u{3B7} \u{3C3}\u{3C5}\u{3BD}\u{3AD}\u{3C7}\u{3B5}\u{3B9}\u{3B1}, \u{3C0}\u{3B1}\u{3C4}\u{3AE}\u{3C3}\u{3C4}\u{3B5} Enter \u{3B3}\u{3B9}\u{3B1} \u{3B1}\u{3C0}\u{3CC}\u{3B8}\u{3B5}\u{3C3}\u{3B7} \u{3AE} \u{3C0}\u{3B1}\u{3C4}\u{3AE}\u{3C3}\u{3C4}\u{3B5} Escape \u{3B3}\u{3B9}\u{3B1} \u{3B1}\u{3BA}\u{3CD}\u{3C1}\u{3C9}\u{3C3}\u{3B7}.`,
	"dragStartedTouch": `\u{397} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3C6}\u{3BF}\u{3C1}\u{3AC} \u{3BE}\u{3B5}\u{3BA}\u{3AF}\u{3BD}\u{3B7}\u{3C3}\u{3B5}. \u{39C}\u{3B5}\u{3C4}\u{3B1}\u{3B2}\u{3B5}\u{3AF}\u{3C4}\u{3B5} \u{3C3}\u{3B5} \u{3AD}\u{3BD}\u{3B1}\u{3BD} \u{3C0}\u{3C1}\u{3BF}\u{3BF}\u{3C1}\u{3B9}\u{3C3}\u{3BC}\u{3CC} \u{3B1}\u{3C0}\u{3CC}\u{3B8}\u{3B5}\u{3C3}\u{3B7}\u{3C2} \u{3BA}\u{3B1}\u{3B9}, \u{3C3}\u{3C4}\u{3B7} \u{3C3}\u{3C5}\u{3BD}\u{3AD}\u{3C7}\u{3B5}\u{3B9}\u{3B1}, \u{3C0}\u{3B1}\u{3C4}\u{3AE}\u{3C3}\u{3C4}\u{3B5} \u{3B4}\u{3CD}\u{3BF} \u{3C6}\u{3BF}\u{3C1}\u{3AD}\u{3C2} \u{3B3}\u{3B9}\u{3B1} \u{3B1}\u{3C0}\u{3CC}\u{3B8}\u{3B5}\u{3C3}\u{3B7}.`,
	"dragStartedVirtual": `\u{397} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3C6}\u{3BF}\u{3C1}\u{3AC} \u{3BE}\u{3B5}\u{3BA}\u{3AF}\u{3BD}\u{3B7}\u{3C3}\u{3B5}. \u{39C}\u{3B5}\u{3C4}\u{3B1}\u{3B2}\u{3B5}\u{3AF}\u{3C4}\u{3B5} \u{3C3}\u{3B5} \u{3AD}\u{3BD}\u{3B1}\u{3BD} \u{3C0}\u{3C1}\u{3BF}\u{3BF}\u{3C1}\u{3B9}\u{3C3}\u{3BC}\u{3CC} \u{3B1}\u{3C0}\u{3CC}\u{3B8}\u{3B5}\u{3C3}\u{3B7}\u{3C2} \u{3BA}\u{3B1}\u{3B9}, \u{3C3}\u{3C4}\u{3B7} \u{3C3}\u{3C5}\u{3BD}\u{3AD}\u{3C7}\u{3B5}\u{3B9}\u{3B1}, \u{3BA}\u{3AC}\u{3BD}\u{3C4}\u{3B5} \u{3BA}\u{3BB}\u{3B9}\u{3BA} \u{3AE} \u{3C0}\u{3B1}\u{3C4}\u{3AE}\u{3C3}\u{3C4}\u{3B5} Enter \u{3B3}\u{3B9}\u{3B1} \u{3B1}\u{3C0}\u{3CC}\u{3B8}\u{3B5}\u{3C3}\u{3B7}.`,
	"dropCanceled": `\u{397} \u{3B1}\u{3C0}\u{3CC}\u{3B8}\u{3B5}\u{3C3}\u{3B7} \u{3B1}\u{3BA}\u{3C5}\u{3C1}\u{3CE}\u{3B8}\u{3B7}\u{3BA}\u{3B5}.`,
	"dropComplete": `\u{397} \u{3B1}\u{3C0}\u{3CC}\u{3B8}\u{3B5}\u{3C3}\u{3B7} \u{3BF}\u{3BB}\u{3BF}\u{3BA}\u{3BB}\u{3B7}\u{3C1}\u{3CE}\u{3B8}\u{3B7}\u{3BA}\u{3B5}.`,
	"dropDescriptionKeyboard": `\u{3A0}\u{3B1}\u{3C4}\u{3AE}\u{3C3}\u{3C4}\u{3B5} Enter \u{3B3}\u{3B9}\u{3B1} \u{3B1}\u{3C0}\u{3CC}\u{3B8}\u{3B5}\u{3C3}\u{3B7}. \u{3A0}\u{3B1}\u{3C4}\u{3AE}\u{3C3}\u{3C4}\u{3B5} Escape \u{3B3}\u{3B9}\u{3B1} \u{3B1}\u{3BA}\u{3CD}\u{3C1}\u{3C9}\u{3C3}\u{3B7} \u{3C4}\u{3B7}\u{3C2} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3C6}\u{3BF}\u{3C1}\u{3AC}\u{3C2}.`,
	"dropDescriptionTouch": `\u{3A0}\u{3B1}\u{3C4}\u{3AE}\u{3C3}\u{3C4}\u{3B5} \u{3B4}\u{3CD}\u{3BF} \u{3C6}\u{3BF}\u{3C1}\u{3AD}\u{3C2} \u{3B3}\u{3B9}\u{3B1} \u{3B1}\u{3C0}\u{3CC}\u{3B8}\u{3B5}\u{3C3}\u{3B7}.`,
	"dropDescriptionVirtual": `\u{39A}\u{3AC}\u{3BD}\u{3C4}\u{3B5} \u{3BA}\u{3BB}\u{3B9}\u{3BA} \u{3B3}\u{3B9}\u{3B1} \u{3B1}\u{3C0}\u{3CC}\u{3B8}\u{3B5}\u{3C3}\u{3B7}.`,
	"dropIndicator": `\u{3B4}\u{3B5}\u{3AF}\u{3BA}\u{3C4}\u{3B7}\u{3C2} \u{3B1}\u{3C0}\u{3CC}\u{3B8}\u{3B5}\u{3C3}\u{3B7}\u{3C2}`,
	"dropOnItem": (args) => `\u{391}\u{3C0}\u{3CC}\u{3B8}\u{3B5}\u{3C3}\u{3B7} \u{3C3}\u{3B5} ${args.itemText}`,
	"dropOnRoot": `\u{391}\u{3C0}\u{3CC}\u{3B8}\u{3B5}\u{3C3}\u{3B7} \u{3C3}\u{3B5}`,
	"endDragKeyboard": `\u{39C}\u{3B5}\u{3C4}\u{3B1}\u{3C6}\u{3BF}\u{3C1}\u{3AC} \u{3C3}\u{3B5} \u{3B5}\u{3BE}\u{3AD}\u{3BB}\u{3B9}\u{3BE}\u{3B7}. \u{3A0}\u{3B1}\u{3C4}\u{3AE}\u{3C3}\u{3C4}\u{3B5} Enter \u{3B3}\u{3B9}\u{3B1} \u{3B1}\u{3BA}\u{3CD}\u{3C1}\u{3C9}\u{3C3}\u{3B7} \u{3C4}\u{3B7}\u{3C2} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3C6}\u{3BF}\u{3C1}\u{3AC}\u{3C2}.`,
	"endDragTouch": `\u{39C}\u{3B5}\u{3C4}\u{3B1}\u{3C6}\u{3BF}\u{3C1}\u{3AC} \u{3C3}\u{3B5} \u{3B5}\u{3BE}\u{3AD}\u{3BB}\u{3B9}\u{3BE}\u{3B7}. \u{3A0}\u{3B1}\u{3C4}\u{3AE}\u{3C3}\u{3C4}\u{3B5} \u{3B4}\u{3CD}\u{3BF} \u{3C6}\u{3BF}\u{3C1}\u{3AD}\u{3C2} \u{3B3}\u{3B9}\u{3B1} \u{3B1}\u{3BA}\u{3CD}\u{3C1}\u{3C9}\u{3C3}\u{3B7} \u{3C4}\u{3B7}\u{3C2} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3C6}\u{3BF}\u{3C1}\u{3AC}\u{3C2}.`,
	"endDragVirtual": `\u{39C}\u{3B5}\u{3C4}\u{3B1}\u{3C6}\u{3BF}\u{3C1}\u{3AC} \u{3C3}\u{3B5} \u{3B5}\u{3BE}\u{3AD}\u{3BB}\u{3B9}\u{3BE}\u{3B7}. \u{39A}\u{3AC}\u{3BD}\u{3C4}\u{3B5} \u{3BA}\u{3BB}\u{3B9}\u{3BA} \u{3B3}\u{3B9}\u{3B1} \u{3B1}\u{3BA}\u{3CD}\u{3C1}\u{3C9}\u{3C3}\u{3B7} \u{3C4}\u{3B7}\u{3C2} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3C6}\u{3BF}\u{3C1}\u{3AC}\u{3C2}.`,
	"insertAfter": (args) => `\u{395}\u{3B9}\u{3C3}\u{3B1}\u{3B3}\u{3C9}\u{3B3}\u{3AE} \u{3BC}\u{3B5}\u{3C4}\u{3AC} \u{3B1}\u{3C0}\u{3CC} ${args.itemText}`,
	"insertBefore": (args) => `\u{395}\u{3B9}\u{3C3}\u{3B1}\u{3B3}\u{3C9}\u{3B3}\u{3AE} \u{3C0}\u{3C1}\u{3B9}\u{3BD} \u{3B1}\u{3C0}\u{3CC} ${args.itemText}`,
	"insertBetween": (args) => `\u{395}\u{3B9}\u{3C3}\u{3B1}\u{3B3}\u{3C9}\u{3B3}\u{3AE} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3BE}\u{3CD} ${args.beforeItemText} \u{3BA}\u{3B1}\u{3B9} ${args.afterItemText}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/en-US.mjs
var $f9b46437e610cca1$exports = {};
$f9b46437e610cca1$exports = {
	"dragItem": (args) => `Drag ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `Drag ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} selected item`,
		other: () => `${formatter.number(args.count)} selected items`
	})}`,
	"dragDescriptionKeyboard": `Press Enter to start dragging.`,
	"dragDescriptionKeyboardAlt": `Press Alt + Enter to start dragging.`,
	"dragDescriptionTouch": `Double tap to start dragging.`,
	"dragDescriptionVirtual": `Click to start dragging.`,
	"dragDescriptionLongPress": `Long press to start dragging.`,
	"dragSelectedKeyboard": (args, formatter) => `Press Enter to drag ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} selected item`,
		other: () => `${formatter.number(args.count)} selected items`
	})}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `Press Alt + Enter to drag ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} selected item`,
		other: () => `${formatter.number(args.count)} selected items`
	})}.`,
	"dragSelectedLongPress": (args, formatter) => `Long press to drag ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} selected item`,
		other: () => `${formatter.number(args.count)} selected items`
	})}.`,
	"dragStartedKeyboard": `Started dragging. Press Tab to navigate to a drop target, then press Enter to drop, or press Escape to cancel.`,
	"dragStartedTouch": `Started dragging. Navigate to a drop target, then double tap to drop.`,
	"dragStartedVirtual": `Started dragging. Navigate to a drop target, then click or press Enter to drop.`,
	"endDragKeyboard": `Dragging. Press Enter to cancel drag.`,
	"endDragTouch": `Dragging. Double tap to cancel drag.`,
	"endDragVirtual": `Dragging. Click to cancel drag.`,
	"dropDescriptionKeyboard": `Press Enter to drop. Press Escape to cancel drag.`,
	"dropDescriptionTouch": `Double tap to drop.`,
	"dropDescriptionVirtual": `Click to drop.`,
	"dropCanceled": `Drop canceled.`,
	"dropComplete": `Drop complete.`,
	"dropIndicator": `drop indicator`,
	"dropOnRoot": `Drop on`,
	"dropOnItem": (args) => `Drop on ${args.itemText}`,
	"insertBefore": (args) => `Insert before ${args.itemText}`,
	"insertBetween": (args) => `Insert between ${args.beforeItemText} and ${args.afterItemText}`,
	"insertAfter": (args) => `Insert after ${args.itemText}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/es-ES.mjs
var $204b5c01bd3acf26$exports = {};
$204b5c01bd3acf26$exports = {
	"dragDescriptionKeyboard": `Pulse Intro para empezar a arrastrar.`,
	"dragDescriptionKeyboardAlt": `Pulse Intro para empezar a arrastrar.`,
	"dragDescriptionLongPress": `Mantenga pulsado para comenzar a arrastrar.`,
	"dragDescriptionTouch": `Pulse dos veces para iniciar el arrastre.`,
	"dragDescriptionVirtual": `Haga clic para iniciar el arrastre.`,
	"dragItem": (args) => `Arrastrar ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `Arrastrar ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} elemento seleccionado`,
		other: () => `${formatter.number(args.count)} elementos seleccionados`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `Pulse Intro para arrastrar ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} elemento seleccionado`,
		other: () => `${formatter.number(args.count)} elementos seleccionados`
	})}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `Pulse Alt + Intro para arrastrar ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} elemento seleccionado`,
		other: () => `${formatter.number(args.count)} elementos seleccionados`
	})}.`,
	"dragSelectedLongPress": (args, formatter) => `Mantenga pulsado para arrastrar ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} elemento seleccionado`,
		other: () => `${formatter.number(args.count)} elementos seleccionados`
	})}.`,
	"dragStartedKeyboard": `Se ha empezado a arrastrar. Pulse el tabulador para ir al destino donde se vaya a colocar y, a continuaci\xf3n, pulse Intro para soltar, o pulse Escape para cancelar.`,
	"dragStartedTouch": `Se ha empezado a arrastrar. Vaya al destino donde se vaya a colocar y, a continuaci\xf3n, pulse dos veces para soltar.`,
	"dragStartedVirtual": `Se ha empezado a arrastrar. Vaya al destino donde se vaya a colocar y, a continuaci\xf3n, haga clic o pulse Intro para soltar.`,
	"dropCanceled": `Se ha cancelado la colocaci\xf3n.`,
	"dropComplete": `Colocaci\xf3n finalizada.`,
	"dropDescriptionKeyboard": `Pulse Intro para soltar. Pulse Escape para cancelar el arrastre.`,
	"dropDescriptionTouch": `Pulse dos veces para soltar.`,
	"dropDescriptionVirtual": `Haga clic para soltar.`,
	"dropIndicator": `indicador de colocaci\xf3n`,
	"dropOnItem": (args) => `Soltar en ${args.itemText}`,
	"dropOnRoot": `Soltar en`,
	"endDragKeyboard": `Arrastrando. Pulse Intro para cancelar el arrastre.`,
	"endDragTouch": `Arrastrando. Pulse dos veces para cancelar el arrastre.`,
	"endDragVirtual": `Arrastrando. Haga clic para cancelar el arrastre.`,
	"insertAfter": (args) => `Insertar despu\xe9s de ${args.itemText}`,
	"insertBefore": (args) => `Insertar antes de ${args.itemText}`,
	"insertBetween": (args) => `Insertar entre ${args.beforeItemText} y ${args.afterItemText}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/et-EE.mjs
var $110bdd83348ecbc0$exports = {};
$110bdd83348ecbc0$exports = {
	"dragDescriptionKeyboard": `Lohistamise alustamiseks vajutage klahvi Enter.`,
	"dragDescriptionKeyboardAlt": `Lohistamise alustamiseks vajutage klahvikombinatsiooni Alt + Enter.`,
	"dragDescriptionLongPress": `Vajutage pikalt lohistamise alustamiseks.`,
	"dragDescriptionTouch": `Topeltpuudutage lohistamise alustamiseks.`,
	"dragDescriptionVirtual": `Kl\xf5psake lohistamise alustamiseks.`,
	"dragItem": (args) => `Lohista ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `Lohista ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} valitud \xfcksust`,
		other: () => `${formatter.number(args.count)} valitud \xfcksust`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} valitud \xfcksuse`,
		other: () => `${formatter.number(args.count)} valitud \xfcksuse`
	})} lohistamiseks vajutage sisestusklahvi Enter.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `Lohistamiseks vajutage klahvikombinatsiooni Alt + Enter ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} valitud \xfcksuse`,
		other: () => `${formatter.number(args.count)} valitud \xfcksuse`
	})} jaoks.`,
	"dragSelectedLongPress": (args, formatter) => `Pikk vajutus ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} valitud \xfcksuse`,
		other: () => `${formatter.number(args.count)} valitud \xfcksuse`
	})} lohistamiseks.`,
	"dragStartedKeyboard": `Alustati lohistamist. Kukutamise sihtm\xe4rgi juurde navigeerimiseks vajutage klahvi Tab, seej\xe4rel vajutage kukutamiseks klahvi Enter v\xf5i loobumiseks klahvi Escape.`,
	"dragStartedTouch": `Alustati lohistamist. Navigeerige kukutamise sihtm\xe4rgi juurde ja topeltpuudutage kukutamiseks.`,
	"dragStartedVirtual": `Alustati lohistamist. Navigeerige kukutamise sihtm\xe4rgi juurde ja kukutamiseks kl\xf5psake v\xf5i vajutage klahvi Enter.`,
	"dropCanceled": `Lohistamisest loobuti.`,
	"dropComplete": `Lohistamine on tehtud.`,
	"dropDescriptionKeyboard": `Kukutamiseks vajutage klahvi Enter. Lohistamisest loobumiseks vajutage klahvi Escape.`,
	"dropDescriptionTouch": `Kukutamiseks topeltpuudutage.`,
	"dropDescriptionVirtual": `Kukutamiseks kl\xf5psake.`,
	"dropIndicator": `lohistamise indikaator`,
	"dropOnItem": (args) => `Kukuta asukohta ${args.itemText}`,
	"dropOnRoot": `Kukuta asukohta`,
	"endDragKeyboard": `Lohistamine. Lohistamisest loobumiseks vajutage klahvi Enter.`,
	"endDragTouch": `Lohistamine. Lohistamisest loobumiseks topeltpuudutage.`,
	"endDragVirtual": `Lohistamine. Lohistamisest loobumiseks kl\xf5psake.`,
	"insertAfter": (args) => `Sisesta ${args.itemText} j\xe4rele`,
	"insertBefore": (args) => `Sisesta ${args.itemText} ette`,
	"insertBetween": (args) => `Sisesta ${args.beforeItemText} ja ${args.afterItemText} vahele`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/fi-FI.mjs
var $87d3ccd5e347c7cc$exports = {};
$87d3ccd5e347c7cc$exports = {
	"dragDescriptionKeyboard": `Aloita vet\xe4minen painamalla Enter-n\xe4pp\xe4int\xe4.`,
	"dragDescriptionKeyboardAlt": `Aloita vet\xe4minen painamalla Alt + Enter -n\xe4pp\xe4inyhdistelm\xe4\xe4.`,
	"dragDescriptionLongPress": `Aloita vet\xe4minen pit\xe4m\xe4ll\xe4 painettuna.`,
	"dragDescriptionTouch": `Aloita vet\xe4minen kaksoisnapauttamalla.`,
	"dragDescriptionVirtual": `Aloita vet\xe4minen napsauttamalla.`,
	"dragItem": (args) => `Ved\xe4 kohdetta ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `Ved\xe4 ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} valittua kohdetta`,
		other: () => `${formatter.number(args.count)} valittua kohdetta`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `Ved\xe4 painamalla Enter ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} valittu kohde`,
		other: () => `${formatter.number(args.count)} valittua kohdetta`
	})}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `Ved\xe4 painamalla Alt + Enter ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} valittu kohde`,
		other: () => `${formatter.number(args.count)} valittua kohdetta`
	})}.`,
	"dragSelectedLongPress": (args, formatter) => `Ved\xe4 pit\xe4m\xe4ll\xe4 painettuna ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} valittu kohde`,
		other: () => `${formatter.number(args.count)} valittua kohdetta`
	})}.`,
	"dragStartedKeyboard": `Vet\xe4minen aloitettu. Siirry pudotuskohteeseen painamalla sarkainn\xe4pp\xe4int\xe4 ja sitten pudota painamalla Enter-n\xe4pp\xe4int\xe4 tai peruuta painamalla Escape-n\xe4pp\xe4int\xe4.`,
	"dragStartedTouch": `Vet\xe4minen aloitettu. Siirry pudotuskohteeseen ja pudota kaksoisnapauttamalla.`,
	"dragStartedVirtual": `Vet\xe4minen aloitettu. Siirry pudotuskohteeseen ja pudota napsauttamalla tai painamalla Enter-n\xe4pp\xe4int\xe4.`,
	"dropCanceled": `Pudotus peruutettu.`,
	"dropComplete": `Pudotus suoritettu.`,
	"dropDescriptionKeyboard": `Pudota painamalla Enter-n\xe4pp\xe4int\xe4. Peruuta vet\xe4minen painamalla Escape-n\xe4pp\xe4int\xe4.`,
	"dropDescriptionTouch": `Pudota kaksoisnapauttamalla.`,
	"dropDescriptionVirtual": `Pudota napsauttamalla.`,
	"dropIndicator": `pudotuksen ilmaisin`,
	"dropOnItem": (args) => `Pudota kohteeseen ${args.itemText}`,
	"dropOnRoot": `Pudota kohteeseen`,
	"endDragKeyboard": `Vedet\xe4\xe4n. Peruuta vet\xe4minen painamalla Enter-n\xe4pp\xe4int\xe4.`,
	"endDragTouch": `Vedet\xe4\xe4n. Peruuta vet\xe4minen kaksoisnapauttamalla.`,
	"endDragVirtual": `Vedet\xe4\xe4n. Peruuta vet\xe4minen napsauttamalla.`,
	"insertAfter": (args) => `Lis\xe4\xe4 kohteen ${args.itemText} j\xe4lkeen`,
	"insertBefore": (args) => `Lis\xe4\xe4 ennen kohdetta ${args.itemText}`,
	"insertBetween": (args) => `Lis\xe4\xe4 kohteiden ${args.beforeItemText} ja ${args.afterItemText} v\xe4liin`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/fr-FR.mjs
var $a5de891427686596$exports = {};
$a5de891427686596$exports = {
	"dragDescriptionKeyboard": `Appuyez sur Entr\xe9e pour commencer le d\xe9placement.`,
	"dragDescriptionKeyboardAlt": `Appuyez sur Alt\xa0+\xa0Entr\xe9e pour commencer \xe0 faire glisser.`,
	"dragDescriptionLongPress": `Appuyez de mani\xe8re prolong\xe9e pour commencer \xe0 faire glisser.`,
	"dragDescriptionTouch": `Touchez deux fois pour commencer le d\xe9placement.`,
	"dragDescriptionVirtual": `Cliquez pour commencer le d\xe9placement.`,
	"dragItem": (args) => `D\xe9placer ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `D\xe9placer ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \xe9l\xe9ment s\xe9lectionn\xe9`,
		other: () => `${formatter.number(args.count)} \xe9l\xe9ments s\xe9lectionn\xe9s`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `Appuyez sur Entr\xe9e pour faire glisser ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \xe9l\xe9ment s\xe9lectionn\xe9`,
		other: () => `${formatter.number(args.count)} \xe9l\xe9ments s\xe9lectionn\xe9s`
	})}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `Appuyez sur Alt\xa0+\xa0Entr\xe9e pour faire glisser ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \xe9l\xe9ment s\xe9lectionn\xe9`,
		other: () => `${formatter.number(args.count)} \xe9l\xe9ments s\xe9lectionn\xe9s`
	})}.`,
	"dragSelectedLongPress": (args, formatter) => `Appuyez de mani\xe8re prolong\xe9e pour faire glisser ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \xe9l\xe9ment s\xe9lectionn\xe9`,
		other: () => `${formatter.number(args.count)} \xe9l\xe9ments s\xe9lectionn\xe9s`
	})}.`,
	"dragStartedKeyboard": `D\xe9placement commenc\xe9. Appuyez sur Tabulation pour acc\xe9der \xe0 une cible de d\xe9p\xf4t, puis appuyez sur Entr\xe9e pour d\xe9poser, ou appuyez sur \xc9chap pour annuler.`,
	"dragStartedTouch": `D\xe9placement commenc\xe9. Acc\xe9dez \xe0 une cible de d\xe9p\xf4t, puis touchez deux fois pour d\xe9poser.`,
	"dragStartedVirtual": `D\xe9placement commenc\xe9. Acc\xe9dez \xe0 une cible de d\xe9p\xf4t, puis cliquez ou appuyez sur Entr\xe9e pour d\xe9poser.`,
	"dropCanceled": `D\xe9p\xf4t annul\xe9.`,
	"dropComplete": `D\xe9p\xf4t termin\xe9.`,
	"dropDescriptionKeyboard": `Appuyez sur Entr\xe9e pour d\xe9poser. Appuyez sur \xc9chap pour annuler le d\xe9placement.`,
	"dropDescriptionTouch": `Touchez deux fois pour d\xe9poser.`,
	"dropDescriptionVirtual": `Cliquez pour d\xe9poser.`,
	"dropIndicator": `indicateur de d\xe9p\xf4t`,
	"dropOnItem": (args) => `D\xe9poser sur ${args.itemText}`,
	"dropOnRoot": `D\xe9poser sur`,
	"endDragKeyboard": `D\xe9placement. Appuyez sur Entr\xe9e pour annuler le d\xe9placement.`,
	"endDragTouch": `D\xe9placement. Touchez deux fois pour annuler le d\xe9placement.`,
	"endDragVirtual": `D\xe9placement. Cliquez pour annuler le d\xe9placement.`,
	"insertAfter": (args) => `Ins\xe9rer apr\xe8s ${args.itemText}`,
	"insertBefore": (args) => `Ins\xe9rer avant ${args.itemText}`,
	"insertBetween": (args) => `Ins\xe9rer entre ${args.beforeItemText} et ${args.afterItemText}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/he-IL.mjs
var $ad7f4c66d85b4494$exports = {};
$ad7f4c66d85b4494$exports = {
	"dragDescriptionKeyboard": `\u{5D4}\u{5E7}\u{5E9} \u{5E2}\u{5DC} Enter \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5D4}\u{5EA}\u{5D7}\u{5D9}\u{5DC} \u{5DC}\u{5D2}\u{5E8}\u{5D5}\u{5E8}.`,
	"dragDescriptionKeyboardAlt": `\u{5D4}\u{5E7}\u{5E9} Alt + Enter \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5D4}\u{5EA}\u{5D7}\u{5D9}\u{5DC} \u{5DC}\u{5D2}\u{5E8}\u{5D5}\u{5E8}.`,
	"dragDescriptionLongPress": `\u{5DC}\u{5D7}\u{5E5} \u{5DC}\u{5D7}\u{5D9}\u{5E6}\u{5D4} \u{5D0}\u{5E8}\u{5D5}\u{5DB}\u{5D4} \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5D4}\u{5EA}\u{5D7}\u{5D9}\u{5DC} \u{5DC}\u{5D2}\u{5E8}\u{5D5}\u{5E8}.`,
	"dragDescriptionTouch": `\u{5D4}\u{5E7}\u{5E9} \u{5E4}\u{5E2}\u{5DE}\u{5D9}\u{5D9}\u{5DD} \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5D4}\u{5EA}\u{5D7}\u{5D9}\u{5DC} \u{5D1}\u{5D2}\u{5E8}\u{5D9}\u{5E8}\u{5D4}.`,
	"dragDescriptionVirtual": `\u{5DC}\u{5D7}\u{5E5} \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5D4}\u{5EA}\u{5D7}\u{5D9}\u{5DC} \u{5DC}\u{5D2}\u{5E8}\u{5D5}\u{5E8}.`,
	"dragItem": (args) => `\u{5D2}\u{5E8}\u{5D5}\u{5E8} \u{5D0}\u{5EA} ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `\u{5D2}\u{5E8}\u{5D5}\u{5E8} ${formatter.plural(args.count, {
		one: () => `\u{5E4}\u{5E8}\u{5D9}\u{5D8} \u{5E0}\u{5D1}\u{5D7}\u{5E8} ${formatter.number(args.count)}`,
		other: () => `${formatter.number(args.count)} \u{5E4}\u{5E8}\u{5D9}\u{5D8}\u{5D9}\u{5DD} \u{5E9}\u{5E0}\u{5D1}\u{5D7}\u{5E8}\u{5D5}`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `\u{5D4}\u{5E7}\u{5E9} \u{5E2}\u{5DC} Enter \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5D2}\u{5E8}\u{5D5}\u{5E8} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{5E4}\u{5E8}\u{5D9}\u{5D8} \u{5E9}\u{5E0}\u{5D1}\u{5D7}\u{5E8}`,
		other: () => `${formatter.number(args.count)} \u{5E4}\u{5E8}\u{5D9}\u{5D8}\u{5D9}\u{5DD} \u{5E9}\u{5E0}\u{5D1}\u{5D7}\u{5E8}\u{5D5}`
	})}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `\u{5D4}\u{5E7}\u{5E9} Alt + Enter \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5D2}\u{5E8}\u{5D5}\u{5E8} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{5E4}\u{5E8}\u{5D9}\u{5D8} \u{5E9}\u{5E0}\u{5D1}\u{5D7}\u{5E8}`,
		other: () => `${formatter.number(args.count)} \u{5E4}\u{5E8}\u{5D9}\u{5D8}\u{5D9}\u{5DD} \u{5E9}\u{5E0}\u{5D1}\u{5D7}\u{5E8}\u{5D5}`
	})}.`,
	"dragSelectedLongPress": (args, formatter) => `\u{5DC}\u{5D7}\u{5E5} \u{5DC}\u{5D7}\u{5D9}\u{5E6}\u{5D4} \u{5D0}\u{5E8}\u{5D5}\u{5DB}\u{5D4} \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5D2}\u{5E8}\u{5D5}\u{5E8} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{5E4}\u{5E8}\u{5D9}\u{5D8} \u{5E9}\u{5E0}\u{5D1}\u{5D7}\u{5E8}`,
		other: () => `${formatter.number(args.count)} \u{5E4}\u{5E8}\u{5D9}\u{5D8}\u{5D9}\u{5DD} \u{5E9}\u{5E0}\u{5D1}\u{5D7}\u{5E8}\u{5D5}`
	})}.`,
	"dragStartedKeyboard": `\u{5D4}\u{5EA}\u{5D7}\u{5DC}\u{5EA} \u{5DC}\u{5D2}\u{5E8}\u{5D5}\u{5E8}. \u{5D4}\u{5E7}\u{5E9} \u{5E2}\u{5DC} Tab \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5E0}\u{5D5}\u{5D5}\u{5D8} \u{5DC}\u{5E0}\u{5E7}\u{5D5}\u{5D3}\u{5EA} \u{5D4}\u{5D2}\u{5E8}\u{5D9}\u{5E8}\u{5D4} \u{5D5}\u{5DC}\u{5D0}\u{5D7}\u{5E8} \u{5DE}\u{5DB}\u{5DF} \u{5D4}\u{5E7}\u{5E9} \u{5E2}\u{5DC} Enter \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5E9}\u{5D7}\u{5E8}\u{5E8} \u{5D0}\u{5D5} \u{5E2}\u{5DC} Escape \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5D1}\u{5D8}\u{5DC}.`,
	"dragStartedTouch": `\u{5D4}\u{5EA}\u{5D7}\u{5DC}\u{5EA} \u{5DC}\u{5D2}\u{5E8}\u{5D5}\u{5E8}. \u{5E0}\u{5D5}\u{5D5}\u{5D8} \u{5DC}\u{5E0}\u{5E7}\u{5D5}\u{5D3}\u{5EA} \u{5D4}\u{5E9}\u{5D7}\u{5E8}\u{5D5}\u{5E8} \u{5D5}\u{5DC}\u{5D0}\u{5D7}\u{5E8} \u{5DE}\u{5DB}\u{5DF} \u{5D4}\u{5E7}\u{5E9} \u{5E4}\u{5E2}\u{5DE}\u{5D9}\u{5D9}\u{5DD} \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5E9}\u{5D7}\u{5E8}\u{5E8}.`,
	"dragStartedVirtual": `\u{5D4}\u{5EA}\u{5D7}\u{5DC}\u{5EA} \u{5DC}\u{5D2}\u{5E8}\u{5D5}\u{5E8}. \u{5E0}\u{5D5}\u{5D5}\u{5D8} \u{5DC}\u{5E0}\u{5E7}\u{5D5}\u{5D3}\u{5EA} \u{5D4}\u{5E9}\u{5D7}\u{5E8}\u{5D5}\u{5E8} \u{5D5}\u{5DC}\u{5D0}\u{5D7}\u{5E8} \u{5DE}\u{5DB}\u{5DF} \u{5DC}\u{5D7}\u{5E5} \u{5D0}\u{5D5} \u{5D4}\u{5E7}\u{5E9} \u{5E2}\u{5DC} Enter \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5E9}\u{5D7}\u{5E8}\u{5E8}.`,
	"dropCanceled": `\u{5D4}\u{5E9}\u{5D7}\u{5E8}\u{5D5}\u{5E8} \u{5D1}\u{5D5}\u{5D8}\u{5DC}.`,
	"dropComplete": `\u{5D4}\u{5E9}\u{5D7}\u{5E8}\u{5D5}\u{5E8} \u{5D4}\u{5D5}\u{5E9}\u{5DC}\u{5DD}.`,
	"dropDescriptionKeyboard": `\u{5D4}\u{5E7}\u{5E9} \u{5E2}\u{5DC} Enter \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5E9}\u{5D7}\u{5E8}\u{5E8}. \u{5D4}\u{5E7}\u{5E9} \u{5E2}\u{5DC} Escape \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5D1}\u{5D8}\u{5DC} \u{5D0}\u{5EA} \u{5D4}\u{5D2}\u{5E8}\u{5D9}\u{5E8}\u{5D4}.`,
	"dropDescriptionTouch": `\u{5D4}\u{5E7}\u{5E9} \u{5E4}\u{5E2}\u{5DE}\u{5D9}\u{5D9}\u{5DD} \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5E9}\u{5D7}\u{5E8}\u{5E8}.`,
	"dropDescriptionVirtual": `\u{5DC}\u{5D7}\u{5E5} \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5E9}\u{5D7}\u{5E8}\u{5E8}.`,
	"dropIndicator": `\u{5DE}\u{5D7}\u{5D5}\u{5D5}\u{5DF} \u{5E9}\u{5D7}\u{5E8}\u{5D5}\u{5E8}`,
	"dropOnItem": (args) => `\u{5E9}\u{5D7}\u{5E8}\u{5E8} \u{5E2}\u{5DC} ${args.itemText}`,
	"dropOnRoot": `\u{5E9}\u{5D7}\u{5E8}\u{5E8} \u{5E2}\u{5DC}`,
	"endDragKeyboard": `\u{5D2}\u{5D5}\u{5E8}\u{5E8}. \u{5D4}\u{5E7}\u{5E9} \u{5E2}\u{5DC} Enter \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5D1}\u{5D8}\u{5DC} \u{5D0}\u{5EA} \u{5D4}\u{5D2}\u{5E8}\u{5D9}\u{5E8}\u{5D4}.`,
	"endDragTouch": `\u{5D2}\u{5D5}\u{5E8}\u{5E8}. \u{5D4}\u{5E7}\u{5E9} \u{5E4}\u{5E2}\u{5DE}\u{5D9}\u{5D9}\u{5DD} \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5D1}\u{5D8}\u{5DC} \u{5D0}\u{5EA} \u{5D4}\u{5D2}\u{5E8}\u{5D9}\u{5E8}\u{5D4}.`,
	"endDragVirtual": `\u{5D2}\u{5D5}\u{5E8}\u{5E8}. \u{5DC}\u{5D7}\u{5E5} \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5D1}\u{5D8}\u{5DC} \u{5D0}\u{5EA} \u{5D4}\u{5D2}\u{5E8}\u{5D9}\u{5E8}\u{5D4}.`,
	"insertAfter": (args) => `\u{5D4}\u{5D5}\u{5E1}\u{5E3} \u{5D0}\u{5D7}\u{5E8}\u{5D9} ${args.itemText}`,
	"insertBefore": (args) => `\u{5D4}\u{5D5}\u{5E1}\u{5E3} \u{5DC}\u{5E4}\u{5E0}\u{5D9} ${args.itemText}`,
	"insertBetween": (args) => `\u{5D4}\u{5D5}\u{5E1}\u{5E3} \u{5D1}\u{5D9}\u{5DF} ${args.beforeItemText} \u{5DC}\u{5D1}\u{5D9}\u{5DF} ${args.afterItemText}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/hr-HR.mjs
var $4aa59f3c6a796cae$exports = {};
$4aa59f3c6a796cae$exports = {
	"dragDescriptionKeyboard": `Pritisnite Enter da biste po\u{10D}eli povla\u{10D}iti.`,
	"dragDescriptionKeyboardAlt": `Pritisnite Alt + Enter za po\u{10D}etak povla\u{10D}enja.`,
	"dragDescriptionLongPress": `Dugo pritisnite za po\u{10D}etak povla\u{10D}enja.`,
	"dragDescriptionTouch": `Dvaput dodirnite da biste po\u{10D}eli povla\u{10D}iti.`,
	"dragDescriptionVirtual": `Kliknite da biste po\u{10D}eli povla\u{10D}iti.`,
	"dragItem": (args) => `Povucite stavku ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `Povucite ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} odabranu stavku`,
		other: () => `ovoliko odabranih stavki: ${formatter.number(args.count)}`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `Pritisnite Enter za povla\u{10D}enje ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} odabrana stavka`,
		other: () => `${formatter.number(args.count)} odabrane stavke`
	})}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `Pritisnite Alt + Enter za povla\u{10D}enje ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} odabrana stavka`,
		other: () => `${formatter.number(args.count)} odabrane stavke`
	})}.`,
	"dragSelectedLongPress": (args, formatter) => `Dugo pritisnite za povla\u{10D}enje ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} odabrana stavka`,
		other: () => `${formatter.number(args.count)} odabrane stavke`
	})}.`,
	"dragStartedKeyboard": `Po\u{10D}eli ste povla\u{10D}iti. Pritisnite tipku tabulatora da biste do\u{161}li do cilja ispu\u{161}tanja, a zatim Enter da biste ispustili stavku ili Escape da biste prekinuli povla\u{10D}enje.`,
	"dragStartedTouch": `Po\u{10D}eli ste povla\u{10D}iti. Do\u{111}ite do cilja ispu\u{161}tanja, a zatim dvaput dodirnite da biste ispustili stavku.`,
	"dragStartedVirtual": `Po\u{10D}eli ste povla\u{10D}iti. Do\u{111}ite do cilja ispu\u{161}tanja, a zatim kliknite ili pritisnite Enter da biste ispustili stavku.`,
	"dropCanceled": `Povla\u{10D}enje je prekinuto.`,
	"dropComplete": `Ispu\u{161}tanje je dovr\u{161}eno.`,
	"dropDescriptionKeyboard": `Pritisnite Enter da biste ispustili stavku. Pritisnite Escape da biste prekinuli povla\u{10D}enje.`,
	"dropDescriptionTouch": `Dvaput dodirnite da biste ispustili stavku.`,
	"dropDescriptionVirtual": `Kliknite da biste ispustili stavku.`,
	"dropIndicator": `pokazatelj ispu\u{161}tanja`,
	"dropOnItem": (args) => `Ispustite na stavku ${args.itemText}`,
	"dropOnRoot": `Ispustite na`,
	"endDragKeyboard": `Povla\u{10D}enje. Pritisnite Enter da biste prekinuli povla\u{10D}enje.`,
	"endDragTouch": `Povla\u{10D}enje. Dvaput dodirnite da biste prekinuli povla\u{10D}enje.`,
	"endDragVirtual": `Povla\u{10D}enje. Kliknite da biste prekinuli povla\u{10D}enje.`,
	"insertAfter": (args) => `Umetnite iza stavke ${args.itemText}`,
	"insertBefore": (args) => `Ispustite ispred stavke ${args.itemText}`,
	"insertBetween": (args) => `Umetnite izme\u{111}u stavki ${args.beforeItemText} i ${args.afterItemText}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/hu-HU.mjs
var $d8d3646556c40586$exports = {};
$d8d3646556c40586$exports = {
	"dragDescriptionKeyboard": `Nyomja le az Enter billenty\u{171}t a h\xfaz\xe1s megkezd\xe9s\xe9hez.`,
	"dragDescriptionKeyboardAlt": `Nyomja le az Alt + Enter billenty\u{171}ket a h\xfaz\xe1s megkezd\xe9s\xe9hez.`,
	"dragDescriptionLongPress": `Hosszan nyomja meg a h\xfaz\xe1s elind\xedt\xe1s\xe1hoz.`,
	"dragDescriptionTouch": `Koppintson dupl\xe1n a h\xfaz\xe1s megkezd\xe9s\xe9hez.`,
	"dragDescriptionVirtual": `Kattintson a h\xfaz\xe1s megkezd\xe9s\xe9hez.`,
	"dragItem": (args) => `${args.itemText} h\xfaz\xe1sa`,
	"dragSelectedItems": (args, formatter) => `${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} kijel\xf6lt elem`,
		other: () => `${formatter.number(args.count)} kijel\xf6lt elem`
	})} h\xfaz\xe1sa`,
	"dragSelectedKeyboard": (args, formatter) => `Nyomja meg az Entert ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} kijel\xf6lt elem`,
		other: () => `${formatter.number(args.count)} kijel\xf6lt elem`
	})} h\xfaz\xe1s\xe1hoz.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `Nyomja meg az Alt + Enter billenty\u{171}ket ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} kijel\xf6lt elem`,
		other: () => `${formatter.number(args.count)} kijel\xf6lt elem`
	})} h\xfaz\xe1s\xe1hoz.`,
	"dragSelectedLongPress": (args, formatter) => `Tartsa lenyomva hosszan ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} kijel\xf6lt elem`,
		other: () => `${formatter.number(args.count)} kijel\xf6lt elem`
	})} h\xfaz\xe1s\xe1hoz.`,
	"dragStartedKeyboard": `H\xfaz\xe1s megkezdve. Nyomja le a Tab billenty\u{171}t az elenged\xe9si c\xe9lhoz navig\xe1l\xe1s\xe1hoz, majd nyomja le az Enter billenty\u{171}t az elenged\xe9shez, vagy nyomja le az Escape billenty\u{171}t a megszak\xedt\xe1shoz.`,
	"dragStartedTouch": `H\xfaz\xe1s megkezdve. Navig\xe1ljon egy elenged\xe9si c\xe9lhoz, majd koppintson dupl\xe1n az elenged\xe9shez.`,
	"dragStartedVirtual": `H\xfaz\xe1s megkezdve. Navig\xe1ljon egy elenged\xe9si c\xe9lhoz, majd kattintson vagy nyomja le az Enter billenty\u{171}t az elenged\xe9shez.`,
	"dropCanceled": `Elenged\xe9s megszak\xedtva.`,
	"dropComplete": `Elenged\xe9s teljes\xedtve.`,
	"dropDescriptionKeyboard": `Nyomja le az Enter billenty\u{171}t az elenged\xe9shez. Nyomja le az Escape billenty\u{171}t a h\xfaz\xe1s megszak\xedt\xe1s\xe1hoz.`,
	"dropDescriptionTouch": `Koppintson dupl\xe1n az elenged\xe9shez.`,
	"dropDescriptionVirtual": `Kattintson az elenged\xe9shez.`,
	"dropIndicator": `elenged\xe9sjelz\u{151}`,
	"dropOnItem": (args) => `Elenged\xe9s erre: ${args.itemText}`,
	"dropOnRoot": `Elenged\xe9s erre:`,
	"endDragKeyboard": `H\xfaz\xe1s folyamatban. Nyomja le az Enter billenty\u{171}t a h\xfaz\xe1s megszak\xedt\xe1s\xe1hoz.`,
	"endDragTouch": `H\xfaz\xe1s folyamatban. Koppintson dupl\xe1n a h\xfaz\xe1s megszak\xedt\xe1s\xe1hoz.`,
	"endDragVirtual": `H\xfaz\xe1s folyamatban. Kattintson a h\xfaz\xe1s megszak\xedt\xe1s\xe1hoz.`,
	"insertAfter": (args) => `Besz\xfar\xe1s ${args.itemText} ut\xe1n`,
	"insertBefore": (args) => `Besz\xfar\xe1s ${args.itemText} el\xe9`,
	"insertBetween": (args) => `Besz\xfar\xe1s ${args.beforeItemText} \xe9s ${args.afterItemText} k\xf6z\xe9`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/it-IT.mjs
var $982d558b45395246$exports = {};
$982d558b45395246$exports = {
	"dragDescriptionKeyboard": `Premi Invio per iniziare a trascinare.`,
	"dragDescriptionKeyboardAlt": `Premi Alt + Invio per iniziare a trascinare.`,
	"dragDescriptionLongPress": `Premi a lungo per iniziare a trascinare.`,
	"dragDescriptionTouch": `Tocca due volte per iniziare a trascinare.`,
	"dragDescriptionVirtual": `Fai clic per iniziare a trascinare.`,
	"dragItem": (args) => `Trascina ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `Trascina ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} altro elemento selezionato`,
		other: () => `${formatter.number(args.count)} altri elementi selezionati`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `Premi Invio per trascinare ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} elemento selezionato`,
		other: () => `${formatter.number(args.count)} elementi selezionati`
	})}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `Premi Alt + Invio per trascinare ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} elemento selezionato`,
		other: () => `${formatter.number(args.count)} elementi selezionati`
	})}.`,
	"dragSelectedLongPress": (args, formatter) => `Premi a lungo per trascinare ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} elemento selezionato`,
		other: () => `${formatter.number(args.count)} elementi selezionati`
	})}.`,
	"dragStartedKeyboard": `Hai iniziato a trascinare. Premi Tab per arrivare sull\u{2019}area di destinazione, quindi premi Invio per rilasciare o Esc per annullare.`,
	"dragStartedTouch": `Hai iniziato a trascinare. Arriva sull\u{2019}area di destinazione, quindi tocca due volte per rilasciare.`,
	"dragStartedVirtual": `Hai iniziato a trascinare. Arriva sull\u{2019}area di destinazione, quindi fai clic o premi Invio per rilasciare.`,
	"dropCanceled": `Rilascio annullato.`,
	"dropComplete": `Rilascio completato.`,
	"dropDescriptionKeyboard": `Premi Invio per rilasciare. Premi Esc per annullare.`,
	"dropDescriptionTouch": `Tocca due volte per rilasciare.`,
	"dropDescriptionVirtual": `Fai clic per rilasciare.`,
	"dropIndicator": `indicatore di rilascio`,
	"dropOnItem": (args) => `Rilascia su ${args.itemText}`,
	"dropOnRoot": `Rilascia su`,
	"endDragKeyboard": `Trascinamento. Premi Invio per annullare.`,
	"endDragTouch": `Trascinamento. Tocca due volte per annullare.`,
	"endDragVirtual": `Trascinamento. Fai clic per annullare.`,
	"insertAfter": (args) => `Inserisci dopo ${args.itemText}`,
	"insertBefore": (args) => `Inserisci prima di ${args.itemText}`,
	"insertBetween": (args) => `Inserisci tra ${args.beforeItemText} e ${args.afterItemText}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/ja-JP.mjs
var $6a0cf387b9de036c$exports = {};
$6a0cf387b9de036c$exports = {
	"dragDescriptionKeyboard": `Enter \u{30AD}\u{30FC}\u{3092}\u{62BC}\u{3057}\u{3066}\u{30C9}\u{30E9}\u{30C3}\u{30B0}\u{3092}\u{958B}\u{59CB}\u{3057}\u{3066}\u{304F}\u{3060}\u{3055}\u{3044}\u{3002}`,
	"dragDescriptionKeyboardAlt": `Alt+Enter \u{30AD}\u{30FC}\u{3092}\u{62BC}\u{3057}\u{3066}\u{30C9}\u{30E9}\u{30C3}\u{30B0}\u{3092}\u{958B}\u{59CB}\u{3057}\u{307E}\u{3059}\u{3002}`,
	"dragDescriptionLongPress": `\u{9577}\u{62BC}\u{3057}\u{3057}\u{3066}\u{30C9}\u{30E9}\u{30C3}\u{30B0}\u{3092}\u{958B}\u{59CB}\u{3057}\u{307E}\u{3059}\u{3002}`,
	"dragDescriptionTouch": `\u{30C0}\u{30D6}\u{30EB}\u{30BF}\u{30C3}\u{30D7}\u{3057}\u{3066}\u{30C9}\u{30E9}\u{30C3}\u{30B0}\u{3092}\u{958B}\u{59CB}\u{3057}\u{307E}\u{3059}\u{3002}`,
	"dragDescriptionVirtual": `\u{30AF}\u{30EA}\u{30C3}\u{30AF}\u{3057}\u{3066}\u{30C9}\u{30E9}\u{30C3}\u{30B0}\u{3092}\u{958B}\u{59CB}\u{3057}\u{307E}\u{3059}\u{3002}`,
	"dragItem": (args) => `${args.itemText} \u{3092}\u{30C9}\u{30E9}\u{30C3}\u{30B0}`,
	"dragSelectedItems": (args, formatter) => `${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{500B}\u{306E}\u{9078}\u{629E}\u{9805}\u{76EE}`,
		other: () => `${formatter.number(args.count)} \u{500B}\u{306E}\u{9078}\u{629E}\u{9805}\u{76EE}`
	})} \u{3092}\u{30C9}\u{30E9}\u{30C3}\u{30B0}`,
	"dragSelectedKeyboard": (args, formatter) => `Enter \u{30AD}\u{30FC}\u{3092}\u{62BC}\u{3057}\u{3066}\u{3001}${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{9078}\u{629E}\u{3057}\u{305F}\u{9805}\u{76EE}`,
		other: () => `${formatter.number(args.count)} \u{9078}\u{629E}\u{3057}\u{305F}\u{9805}\u{76EE}`
	})}\u{3092}\u{30C9}\u{30E9}\u{30C3}\u{30B0}\u{3057}\u{307E}\u{3059}\u{3002}`,
	"dragSelectedKeyboardAlt": (args, formatter) => `Alt+Enter \u{30AD}\u{30FC}\u{3092}\u{62BC}\u{3057}\u{3066}\u{3001}${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{9078}\u{629E}\u{3057}\u{305F}\u{9805}\u{76EE}`,
		other: () => `${formatter.number(args.count)} \u{9078}\u{629E}\u{3057}\u{305F}\u{9805}\u{76EE}`
	})}\u{3092}\u{30C9}\u{30E9}\u{30C3}\u{30B0}\u{3057}\u{307E}\u{3059}\u{3002}`,
	"dragSelectedLongPress": (args, formatter) => `\u{9577}\u{62BC}\u{3057}\u{3057}\u{3066}\u{3001}${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{9078}\u{629E}\u{3057}\u{305F}\u{9805}\u{76EE}`,
		other: () => `${formatter.number(args.count)} \u{9078}\u{629E}\u{3057}\u{305F}\u{9805}\u{76EE}`
	})}\u{3092}\u{30C9}\u{30E9}\u{30C3}\u{30B0}\u{3057}\u{307E}\u{3059}\u{3002}`,
	"dragStartedKeyboard": `\u{30C9}\u{30E9}\u{30C3}\u{30B0}\u{3092}\u{958B}\u{59CB}\u{3057}\u{307E}\u{3059}\u{3002}Tab \u{30AD}\u{30FC}\u{3092}\u{62BC}\u{3057}\u{3066}\u{30C9}\u{30ED}\u{30C3}\u{30D7}\u{30BF}\u{30FC}\u{30B2}\u{30C3}\u{30C8}\u{306B}\u{3044}\u{3069}\u{3046}\u{3057}\u{3001}Enter \u{30AD}\u{30FC}\u{3092}\u{62BC}\u{3057}\u{3066}\u{30C9}\u{30ED}\u{30C3}\u{30D7}\u{3059}\u{308B}\u{304B}\u{3001}Esc \u{30AD}\u{30FC}\u{3092}\u{62BC}\u{3057}\u{3066}\u{30AD}\u{30E3}\u{30F3}\u{30BB}\u{30EB}\u{3057}\u{307E}\u{3059}\u{3002}`,
	"dragStartedTouch": `\u{30C9}\u{30E9}\u{30C3}\u{30B0}\u{3092}\u{958B}\u{59CB}\u{3057}\u{307E}\u{3057}\u{305F}\u{3002}\u{30C9}\u{30ED}\u{30C3}\u{30D7}\u{306E}\u{30BF}\u{30FC}\u{30B2}\u{30C3}\u{30C8}\u{306B}\u{79FB}\u{52D5}\u{3057}\u{3001}\u{30C0}\u{30D6}\u{30EB}\u{30BF}\u{30C3}\u{30D7}\u{3057}\u{3066}\u{30C9}\u{30ED}\u{30C3}\u{30D7}\u{3057}\u{307E}\u{3059}\u{3002}`,
	"dragStartedVirtual": `\u{30C9}\u{30E9}\u{30C3}\u{30B0}\u{3092}\u{958B}\u{59CB}\u{3057}\u{307E}\u{3057}\u{305F}\u{3002}\u{30C9}\u{30ED}\u{30C3}\u{30D7}\u{306E}\u{30BF}\u{30FC}\u{30B2}\u{30C3}\u{30C8}\u{306B}\u{79FB}\u{52D5}\u{3057}\u{3001}\u{30AF}\u{30EA}\u{30C3}\u{30AF}\u{307E}\u{305F}\u{306F} Enter \u{30AD}\u{30FC}\u{3092}\u{62BC}\u{3057}\u{3066}\u{30C9}\u{30ED}\u{30C3}\u{30D7}\u{3057}\u{307E}\u{3059}\u{3002}`,
	"dropCanceled": `\u{30C9}\u{30ED}\u{30C3}\u{30D7}\u{304C}\u{30AD}\u{30E3}\u{30F3}\u{30BB}\u{30EB}\u{3055}\u{308C}\u{307E}\u{3057}\u{305F}\u{3002}`,
	"dropComplete": `\u{30C9}\u{30ED}\u{30C3}\u{30D7}\u{304C}\u{5B8C}\u{4E86}\u{3057}\u{307E}\u{3057}\u{305F}\u{3002}`,
	"dropDescriptionKeyboard": `Enter \u{30AD}\u{30FC}\u{3092}\u{62BC}\u{3057}\u{3066}\u{30C9}\u{30ED}\u{30C3}\u{30D7}\u{3057}\u{307E}\u{3059}\u{3002}Esc \u{30AD}\u{30FC}\u{3092}\u{62BC}\u{3057}\u{3066}\u{30C9}\u{30E9}\u{30C3}\u{30B0}\u{3092}\u{30AD}\u{30E3}\u{30F3}\u{30BB}\u{30EB}\u{3057}\u{307E}\u{3059}\u{3002}`,
	"dropDescriptionTouch": `\u{30C0}\u{30D6}\u{30EB}\u{30BF}\u{30C3}\u{30D7}\u{3057}\u{3066}\u{30C9}\u{30ED}\u{30C3}\u{30D7}\u{3057}\u{307E}\u{3059}\u{3002}`,
	"dropDescriptionVirtual": `\u{30AF}\u{30EA}\u{30C3}\u{30AF}\u{3057}\u{3066}\u{30C9}\u{30ED}\u{30C3}\u{30D7}\u{3057}\u{307E}\u{3059}\u{3002}`,
	"dropIndicator": `\u{30C9}\u{30ED}\u{30C3}\u{30D7}\u{30A4}\u{30F3}\u{30B8}\u{30B1}\u{30FC}\u{30BF}\u{30FC}`,
	"dropOnItem": (args) => `${args.itemText} \u{306B}\u{30C9}\u{30ED}\u{30C3}\u{30D7}`,
	"dropOnRoot": `\u{30C9}\u{30ED}\u{30C3}\u{30D7}\u{5834}\u{6240}`,
	"endDragKeyboard": `\u{30C9}\u{30E9}\u{30C3}\u{30B0}\u{3057}\u{3066}\u{3044}\u{307E}\u{3059}\u{3002}Enter \u{30AD}\u{30FC}\u{3092}\u{62BC}\u{3057}\u{3066}\u{30C9}\u{30E9}\u{30C3}\u{30B0}\u{3092}\u{30AD}\u{30E3}\u{30F3}\u{30BB}\u{30EB}\u{3057}\u{307E}\u{3059}\u{3002}`,
	"endDragTouch": `\u{30C9}\u{30E9}\u{30C3}\u{30B0}\u{3057}\u{3066}\u{3044}\u{307E}\u{3059}\u{3002}\u{30C0}\u{30D6}\u{30EB}\u{30BF}\u{30C3}\u{30D7}\u{3057}\u{3066}\u{30C9}\u{30E9}\u{30C3}\u{30B0}\u{3092}\u{30AD}\u{30E3}\u{30F3}\u{30BB}\u{30EB}\u{3057}\u{307E}\u{3059}\u{3002}`,
	"endDragVirtual": `\u{30C9}\u{30E9}\u{30C3}\u{30B0}\u{3057}\u{3066}\u{3044}\u{307E}\u{3059}\u{3002}\u{30AF}\u{30EA}\u{30C3}\u{30AF}\u{3057}\u{3066}\u{30C9}\u{30E9}\u{30C3}\u{30B0}\u{3092}\u{30AD}\u{30E3}\u{30F3}\u{30BB}\u{30EB}\u{3057}\u{307E}\u{3059}\u{3002}`,
	"insertAfter": (args) => `${args.itemText} \u{306E}\u{5F8C}\u{306B}\u{633F}\u{5165}`,
	"insertBefore": (args) => `${args.itemText} \u{306E}\u{524D}\u{306B}\u{633F}\u{5165}`,
	"insertBetween": (args) => `${args.beforeItemText} \u{3068} ${args.afterItemText} \u{306E}\u{9593}\u{306B}\u{633F}\u{5165}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/ko-KR.mjs
var $a97fefa2956f4bcb$exports = {};
$a97fefa2956f4bcb$exports = {
	"dragDescriptionKeyboard": `\u{B4DC}\u{B798}\u{ADF8}\u{B97C} \u{C2DC}\u{C791}\u{D558}\u{B824}\u{BA74} Enter\u{B97C} \u{B204}\u{B974}\u{C138}\u{C694}.`,
	"dragDescriptionKeyboardAlt": `\u{B4DC}\u{B798}\u{ADF8}\u{B97C} \u{C2DC}\u{C791}\u{D558}\u{B824}\u{BA74} Alt + Enter\u{B97C} \u{B204}\u{B974}\u{C2ED}\u{C2DC}\u{C624}.`,
	"dragDescriptionLongPress": `\u{B4DC}\u{B798}\u{ADF8}\u{B97C} \u{C2DC}\u{C791}\u{D558}\u{B824}\u{BA74} \u{AE38}\u{AC8C} \u{B204}\u{B974}\u{C2ED}\u{C2DC}\u{C624}.`,
	"dragDescriptionTouch": `\u{B4DC}\u{B798}\u{ADF8}\u{B97C} \u{C2DC}\u{C791}\u{D558}\u{B824}\u{BA74} \u{B354}\u{BE14} \u{D0ED}\u{D558}\u{C138}\u{C694}.`,
	"dragDescriptionVirtual": `\u{B4DC}\u{B798}\u{ADF8}\u{B97C} \u{C2DC}\u{C791}\u{D558}\u{B824}\u{BA74} \u{D074}\u{B9AD}\u{D558}\u{C138}\u{C694}.`,
	"dragItem": (args) => `${args.itemText} \u{B4DC}\u{B798}\u{ADF8}`,
	"dragSelectedItems": (args, formatter) => `${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)}\u{AC1C} \u{C120}\u{D0DD} \u{D56D}\u{BAA9}`,
		other: () => `${formatter.number(args.count)}\u{AC1C} \u{C120}\u{D0DD} \u{D56D}\u{BAA9}`
	})} \u{B4DC}\u{B798}\u{ADF8}`,
	"dragSelectedKeyboard": (args, formatter) => `${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)}\u{AC1C} \u{C120}\u{D0DD} \u{D56D}\u{BAA9}`,
		other: () => `${formatter.number(args.count)}\u{AC1C} \u{C120}\u{D0DD} \u{D56D}\u{BAA9}`
	})}\u{C744} \u{B4DC}\u{B798}\u{ADF8}\u{D558}\u{B824}\u{BA74} Enter\u{B97C} \u{B204}\u{B974}\u{C2ED}\u{C2DC}\u{C624}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)}\u{AC1C} \u{C120}\u{D0DD} \u{D56D}\u{BAA9}`,
		other: () => `${formatter.number(args.count)}\u{AC1C} \u{C120}\u{D0DD} \u{D56D}\u{BAA9}`
	})}\u{C744} \u{B4DC}\u{B798}\u{ADF8}\u{D558}\u{B824}\u{BA74} Alt + Enter\u{B97C} \u{B204}\u{B974}\u{C2ED}\u{C2DC}\u{C624}.`,
	"dragSelectedLongPress": (args, formatter) => `${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)}\u{AC1C} \u{C120}\u{D0DD} \u{D56D}\u{BAA9}`,
		other: () => `${formatter.number(args.count)}\u{AC1C} \u{C120}\u{D0DD} \u{D56D}\u{BAA9}`
	})}\u{C744} \u{B4DC}\u{B798}\u{ADF8}\u{D558}\u{B824}\u{BA74} \u{AE38}\u{AC8C} \u{B204}\u{B974}\u{C2ED}\u{C2DC}\u{C624}.`,
	"dragStartedKeyboard": `\u{B4DC}\u{B798}\u{ADF8}\u{AC00} \u{C2DC}\u{C791}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}. Tab\u{C744} \u{B20C}\u{B7EC} \u{B4DC}\u{B86D} \u{B300}\u{C0C1}\u{C73C}\u{B85C} \u{C774}\u{B3D9}\u{D55C} \u{B2E4}\u{C74C} Enter\u{B97C} \u{B20C}\u{B7EC} \u{B4DC}\u{B86D}\u{D558}\u{AC70}\u{B098} Esc\u{B97C} \u{B20C}\u{B7EC} \u{CDE8}\u{C18C}\u{D558}\u{C138}\u{C694}.`,
	"dragStartedTouch": `\u{B4DC}\u{B798}\u{ADF8}\u{AC00} \u{C2DC}\u{C791}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}. \u{B4DC}\u{B86D} \u{B300}\u{C0C1}\u{C73C}\u{B85C} \u{C774}\u{B3D9}\u{D55C} \u{B2E4}\u{C74C} \u{B354}\u{BE14} \u{D0ED}\u{D558}\u{C5EC} \u{B4DC}\u{B86D}\u{D558}\u{C138}\u{C694}.`,
	"dragStartedVirtual": `\u{B4DC}\u{B798}\u{ADF8}\u{AC00} \u{C2DC}\u{C791}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}. \u{B4DC}\u{B86D} \u{B300}\u{C0C1}\u{C73C}\u{B85C} \u{C774}\u{B3D9}\u{D55C} \u{B2E4}\u{C74C} \u{D074}\u{B9AD}\u{D558}\u{AC70}\u{B098} Enter\u{B97C} \u{B20C}\u{B7EC} \u{B4DC}\u{B86D}\u{D558}\u{C138}\u{C694}.`,
	"dropCanceled": `\u{B4DC}\u{B86D}\u{C774} \u{CDE8}\u{C18C}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}.`,
	"dropComplete": `\u{B4DC}\u{B86D}\u{C774} \u{C644}\u{B8CC}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}.`,
	"dropDescriptionKeyboard": `\u{B4DC}\u{B86D}\u{D558}\u{B824}\u{BA74} Enter\u{B97C} \u{B204}\u{B974}\u{C138}\u{C694}. \u{B4DC}\u{B798}\u{ADF8}\u{B97C} \u{CDE8}\u{C18C}\u{D558}\u{B824}\u{BA74} Esc\u{B97C} \u{B204}\u{B974}\u{C138}\u{C694}.`,
	"dropDescriptionTouch": `\u{B354}\u{BE14} \u{D0ED}\u{D558}\u{C5EC} \u{B4DC}\u{B86D}\u{D558}\u{C138}\u{C694}.`,
	"dropDescriptionVirtual": `\u{B4DC}\u{B86D}\u{D558}\u{B824}\u{BA74} \u{D074}\u{B9AD}\u{D558}\u{C138}\u{C694}.`,
	"dropIndicator": `\u{B4DC}\u{B86D} \u{D45C}\u{C2DC}\u{AE30}`,
	"dropOnItem": (args) => `${args.itemText}\u{C5D0} \u{B4DC}\u{B86D}`,
	"dropOnRoot": `\u{B4DC}\u{B86D} \u{B300}\u{C0C1}`,
	"endDragKeyboard": `\u{B4DC}\u{B798}\u{ADF8} \u{C911}\u{C785}\u{B2C8}\u{B2E4}. \u{B4DC}\u{B798}\u{ADF8}\u{B97C} \u{CDE8}\u{C18C}\u{D558}\u{B824}\u{BA74} Enter\u{B97C} \u{B204}\u{B974}\u{C138}\u{C694}.`,
	"endDragTouch": `\u{B4DC}\u{B798}\u{ADF8} \u{C911}\u{C785}\u{B2C8}\u{B2E4}. \u{B4DC}\u{B798}\u{ADF8}\u{B97C} \u{CDE8}\u{C18C}\u{D558}\u{B824}\u{BA74} \u{B354}\u{BE14} \u{D0ED}\u{D558}\u{C138}\u{C694}.`,
	"endDragVirtual": `\u{B4DC}\u{B798}\u{ADF8} \u{C911}\u{C785}\u{B2C8}\u{B2E4}. \u{B4DC}\u{B798}\u{ADF8}\u{B97C} \u{CDE8}\u{C18C}\u{D558}\u{B824}\u{BA74} \u{D074}\u{B9AD}\u{D558}\u{C138}\u{C694}.`,
	"insertAfter": (args) => `${args.itemText} \u{C774}\u{D6C4}\u{C5D0} \u{C0BD}\u{C785}`,
	"insertBefore": (args) => `${args.itemText} \u{C774}\u{C804}\u{C5D0} \u{C0BD}\u{C785}`,
	"insertBetween": (args) => `${args.beforeItemText} \u{BC0F} ${args.afterItemText} \u{C0AC}\u{C774}\u{C5D0} \u{C0BD}\u{C785}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/lt-LT.mjs
var $5fb5837f94e1c150$exports = {};
$5fb5837f94e1c150$exports = {
	"dragDescriptionKeyboard": `Paspauskite \u{201E}Enter\u{201C}, kad prad\u{117}tum\u{117}te vilkti.`,
	"dragDescriptionKeyboardAlt": `Paspauskite \u{201E}Alt + Enter\u{201C}, kad prad\u{117}tum\u{117}te vilkti.`,
	"dragDescriptionLongPress": `Palaikykite nuspaud\u{119}, kad prad\u{117}tum\u{117}te vilkti.`,
	"dragDescriptionTouch": `Palieskite dukart, kad prad\u{117}tum\u{117}te vilkti.`,
	"dragDescriptionVirtual": `Spustel\u{117}kite, kad prad\u{117}tum\u{117}te vilkti.`,
	"dragItem": (args) => `Vilkti ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `Vilkti ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} pasirinkt\u{105} element\u{105}`,
		other: () => `${formatter.number(args.count)} pasirinktus elementus`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `Paspauskite \u{201E}Enter\u{201C}, jei norite nuvilkti ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} pasirinkt\u{105} element\u{105}`,
		other: () => `${formatter.number(args.count)} pasirinktus elementus`
	})}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `Paspauskite \u{201E}Alt + Enter\u{201C}, kad nuvilktum\u{117}te ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} pasirinkt\u{105} element\u{105}`,
		other: () => `${formatter.number(args.count)} pasirinktus elementus`
	})}.`,
	"dragSelectedLongPress": (args, formatter) => `Nuspaud\u{119} palaikykite, kad nuvilktum\u{117}te ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} pasirinkt\u{105} element\u{105}`,
		other: () => `${formatter.number(args.count)} pasirinktus elementus`
	})}.`,
	"dragStartedKeyboard": `Prad\u{117}ta vilkti. Paspauskite \u{201E}Tab\u{201C}, kad pereitum\u{117}te \u{12F} tiesiogin\u{119} paskirties viet\u{105}, tada paspauskite \u{201E}Enter\u{201C}, kad numestum\u{117}te, arba \u{201E}Escape\u{201C}, kad at\u{161}auktum\u{117}te.`,
	"dragStartedTouch": `Prad\u{117}ta vilkti. Eikite \u{12F} tiesiogin\u{119} paskirties viet\u{105}, tada palieskite dukart, kad numestum\u{117}te.`,
	"dragStartedVirtual": `Prad\u{117}ta vilkti. Eikite \u{12F} tiesiogin\u{119} paskirties viet\u{105} ir spustel\u{117}kite arba paspauskite \u{201E}Enter\u{201C}, kad numestum\u{117}te.`,
	"dropCanceled": `Numetimas at\u{161}auktas.`,
	"dropComplete": `Numesta.`,
	"dropDescriptionKeyboard": `Paspauskite \u{201E}Enter\u{201C}, kad numestum\u{117}te. Paspauskite \u{201E}Escape\u{201C}, kad at\u{161}auktum\u{117}te vilkim\u{105}.`,
	"dropDescriptionTouch": `Palieskite dukart, kad numestum\u{117}te.`,
	"dropDescriptionVirtual": `Spustel\u{117}kite, kad numestum\u{117}te.`,
	"dropIndicator": `numetimo indikatorius`,
	"dropOnItem": (args) => `Numesti ant ${args.itemText}`,
	"dropOnRoot": `Numesti ant`,
	"endDragKeyboard": `Velkama. Paspauskite \u{201E}Enter\u{201C}, kad at\u{161}auktum\u{117}te vilkim\u{105}.`,
	"endDragTouch": `Velkama. Spustel\u{117}kite dukart, kad at\u{161}auktum\u{117}te vilkim\u{105}.`,
	"endDragVirtual": `Velkama. Spustel\u{117}kite, kad at\u{161}auktum\u{117}te vilkim\u{105}.`,
	"insertAfter": (args) => `\u{12E}terpti po ${args.itemText}`,
	"insertBefore": (args) => `\u{12E}terpti prie\u{161} ${args.itemText}`,
	"insertBetween": (args) => `\u{12E}terpti tarp ${args.beforeItemText} ir ${args.afterItemText}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/lv-LV.mjs
var $5b2e5709864cc922$exports = {};
$5b2e5709864cc922$exports = {
	"dragDescriptionKeyboard": `Nospiediet Enter, lai s\u{101}ktu vilk\u{161}anu.`,
	"dragDescriptionKeyboardAlt": `Nospiediet tausti\u{146}u kombin\u{101}ciju Alt+Enter, lai s\u{101}ktu vilk\u{161}anu.`,
	"dragDescriptionLongPress": `Turiet nospiestu, lai s\u{101}ktu vilk\u{161}anu.`,
	"dragDescriptionTouch": `Veiciet dubultsk\u{101}rienu, lai s\u{101}ktu vilk\u{161}anu.`,
	"dragDescriptionVirtual": `Noklik\u{161}\u{137}iniet, lai s\u{101}ktu vilk\u{161}anu.`,
	"dragItem": (args) => `Velciet ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `Velciet ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} atlas\u{12B}to vienumu`,
		other: () => `${formatter.number(args.count)} atlas\u{12B}tos vienumus`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `Nospiediet tausti\u{146}u Enter, lai vilktu ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} atlas\u{12B}to vienumu`,
		other: () => `${formatter.number(args.count)} atlas\u{12B}tos vienumus`
	})}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `Nospiediet tausti\u{146}u kombin\u{101}ciju Alt+Enter, lai vilktu ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} atlas\u{12B}to vienumu`,
		other: () => `${formatter.number(args.count)} atlas\u{12B}tos vienumus`
	})}.`,
	"dragSelectedLongPress": (args, formatter) => `Turiet nospiestu, lai vilktu ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} atlas\u{12B}to vienumu`,
		other: () => `${formatter.number(args.count)} atlas\u{12B}tos vienumus`
	})}.`,
	"dragStartedKeyboard": `Uzs\u{101}kta vilk\u{161}ana. Nospiediet tausti\u{146}u Tab, lai p\u{101}rietu uz nome\u{161}anas m\u{113}r\u{137}i, p\u{113}c tam nospiediet Enter, lai nomestu, vai nospiediet Escape, lai atceltu.`,
	"dragStartedTouch": `Uzs\u{101}kta vilk\u{161}ana. P\u{101}rejiet uz nome\u{161}anas m\u{113}r\u{137}i, p\u{113}c tam veiciet dubultsk\u{101}rienu, lai nomestu.`,
	"dragStartedVirtual": `Uzs\u{101}kta vilk\u{161}ana. P\u{101}rejiet uz nome\u{161}anas m\u{113}r\u{137}i, p\u{113}c tam nospiediet Enter, lai nomestu.`,
	"dropCanceled": `Nome\u{161}ana atcelta.`,
	"dropComplete": `Nome\u{161}ana pabeigta.`,
	"dropDescriptionKeyboard": `Nospiediet Enter, lai nomestu. Nospiediet Escape, lai atceltu vilk\u{161}anu.`,
	"dropDescriptionTouch": `Veiciet dubultsk\u{101}rienu, lai nomestu.`,
	"dropDescriptionVirtual": `Noklik\u{161}\u{137}iniet, lai nomestu.`,
	"dropIndicator": `nome\u{161}anas indikators`,
	"dropOnItem": (args) => `Nometiet uz ${args.itemText}`,
	"dropOnRoot": `Nometiet uz`,
	"endDragKeyboard": `Notiek vilk\u{161}ana. Nospiediet Enter, lai atceltu vilk\u{161}anu.`,
	"endDragTouch": `Notiek vilk\u{161}ana. Veiciet dubultsk\u{101}rienu, lai atceltu vilk\u{161}anu.`,
	"endDragVirtual": `Notiek vilk\u{161}ana. Noklik\u{161}\u{137}iniet, lai atceltu vilk\u{161}anu.`,
	"insertAfter": (args) => `Ievietojiet p\u{113}c ${args.itemText}`,
	"insertBefore": (args) => `Ievietojiet pirms ${args.itemText}`,
	"insertBetween": (args) => `Ievietojiet starp ${args.beforeItemText} un ${args.afterItemText}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/nb-NO.mjs
var $ee15bb8efb18cc69$exports = {};
$ee15bb8efb18cc69$exports = {
	"dragDescriptionKeyboard": `Trykk p\xe5 Enter for \xe5 begynne \xe5 dra.`,
	"dragDescriptionKeyboardAlt": `Trykk p\xe5 Alt + Enter for \xe5 begynne \xe5 dra.`,
	"dragDescriptionLongPress": `Trykk lenge for \xe5 begynne \xe5 dra.`,
	"dragDescriptionTouch": `Dobbelttrykk for \xe5 begynne \xe5 dra.`,
	"dragDescriptionVirtual": `Klikk for \xe5 begynne \xe5 dra.`,
	"dragItem": (args) => `Dra ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `Dra ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} merket element`,
		other: () => `${formatter.number(args.count)} merkede elementer`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `Trykk Enter for \xe5 dra ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} valgt element`,
		other: () => `${formatter.number(args.count)} valgte elementer`
	})}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `Trykk p\xe5 Alt + Enter for \xe5 dra ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} valgt element`,
		other: () => `${formatter.number(args.count)} valgte elementer`
	})}.`,
	"dragSelectedLongPress": (args, formatter) => `Trykk lenge for \xe5 dra ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} valgt element`,
		other: () => `${formatter.number(args.count)} valgte elementer`
	})}.`,
	"dragStartedKeyboard": `Begynte \xe5 dra. Trykk p\xe5 Tab for \xe5 navigere til et m\xe5l, og trykk deretter p\xe5 Enter for \xe5 slippe eller p\xe5 Esc for \xe5 avbryte.`,
	"dragStartedTouch": `Begynte \xe5 dra. Naviger til et m\xe5l, og dobbelttrykk for \xe5 slippe.`,
	"dragStartedVirtual": `Begynte \xe5 dra. Naviger til et m\xe5l, og klikk eller trykk p\xe5 Enter for \xe5 slippe.`,
	"dropCanceled": `Avbr\xf8t slipping.`,
	"dropComplete": `Slippingen er fullf\xf8rt.`,
	"dropDescriptionKeyboard": `Trykk p\xe5 Enter for \xe5 slippe. Trykk p\xe5 Esc hvis du vil avbryte draingen.`,
	"dropDescriptionTouch": `Dobbelttrykk for \xe5 slippe.`,
	"dropDescriptionVirtual": `Klikk for \xe5 slippe.`,
	"dropIndicator": `slippeindikator`,
	"dropOnItem": (args) => `Slipp p\xe5 ${args.itemText}`,
	"dropOnRoot": `Slipp p\xe5`,
	"endDragKeyboard": `Drar. Trykk p\xe5 Enter hvis du vil avbryte.`,
	"endDragTouch": `Drar. Dobbelttrykk hvis du vil avbryte.`,
	"endDragVirtual": `Drar. Klikk hvis du vil avbryte.`,
	"insertAfter": (args) => `Sett inn etter ${args.itemText}`,
	"insertBefore": (args) => `Sett inn f\xf8r ${args.itemText}`,
	"insertBetween": (args) => `Sett inn mellom ${args.beforeItemText} og ${args.afterItemText}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/nl-NL.mjs
var $1daf2d4602e26ac4$exports = {};
$1daf2d4602e26ac4$exports = {
	"dragDescriptionKeyboard": `Druk op Enter om te slepen.`,
	"dragDescriptionKeyboardAlt": `Druk op Alt + Enter om te slepen.`,
	"dragDescriptionLongPress": `Houd lang ingedrukt om te slepen.`,
	"dragDescriptionTouch": `Dubbeltik om te slepen.`,
	"dragDescriptionVirtual": `Klik om met slepen te starten.`,
	"dragItem": (args) => `${args.itemText} slepen`,
	"dragSelectedItems": (args, formatter) => `${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} geselecteerd item`,
		other: () => `${formatter.number(args.count)} geselecteerde items`
	})} slepen`,
	"dragSelectedKeyboard": (args, formatter) => `Druk op Enter om ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} geselecteerd item`,
		other: () => `${formatter.number(args.count)} geselecteerde items`
	})} te slepen.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `Druk op Alt + Enter om ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} geselecteerd item`,
		other: () => `${formatter.number(args.count)} geselecteerde items`
	})} te slepen.`,
	"dragSelectedLongPress": (args, formatter) => `Houd lang ingedrukt om ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} geselecteerd item`,
		other: () => `${formatter.number(args.count)} geselecteerde items`
	})} te slepen.`,
	"dragStartedKeyboard": `Begonnen met slepen. Druk op Tab om naar een locatie te gaan. Druk dan op Enter om neer te zetten, of op Esc om te annuleren.`,
	"dragStartedTouch": `Begonnen met slepen. Ga naar de gewenste locatie en dubbeltik om neer te zetten.`,
	"dragStartedVirtual": `Begonnen met slepen. Ga naar de gewenste locatie en klik of druk op Enter om neer te zetten.`,
	"dropCanceled": `Neerzetten geannuleerd.`,
	"dropComplete": `Neerzetten voltooid.`,
	"dropDescriptionKeyboard": `Druk op Enter om neer te zetten. Druk op Esc om het slepen te annuleren.`,
	"dropDescriptionTouch": `Dubbeltik om neer te zetten.`,
	"dropDescriptionVirtual": `Klik om neer te zetten.`,
	"dropIndicator": `aanwijzer voor neerzetten`,
	"dropOnItem": (args) => `Neerzetten op ${args.itemText}`,
	"dropOnRoot": `Neerzetten op`,
	"endDragKeyboard": `Bezig met slepen. Druk op Enter om te annuleren.`,
	"endDragTouch": `Bezig met slepen. Dubbeltik om te annuleren.`,
	"endDragVirtual": `Bezig met slepen. Klik om te annuleren.`,
	"insertAfter": (args) => `Plaatsen na ${args.itemText}`,
	"insertBefore": (args) => `Plaatsen v\xf3\xf3r ${args.itemText}`,
	"insertBetween": (args) => `Plaatsen tussen ${args.beforeItemText} en ${args.afterItemText}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/pl-PL.mjs
var $7115429b0f60511f$exports = {};
$7115429b0f60511f$exports = {
	"dragDescriptionKeyboard": `Naci\u{15B}nij Enter, aby rozpocz\u{105}\u{107} przeci\u{105}ganie.`,
	"dragDescriptionKeyboardAlt": `Naci\u{15B}nij Alt + Enter, aby rozpocz\u{105}\u{107} przeci\u{105}ganie.`,
	"dragDescriptionLongPress": `Naci\u{15B}nij i przytrzymaj, aby rozpocz\u{105}\u{107} przeci\u{105}ganie.`,
	"dragDescriptionTouch": `Dotknij dwukrotnie, aby rozpocz\u{105}\u{107} przeci\u{105}ganie.`,
	"dragDescriptionVirtual": `Kliknij, aby rozpocz\u{105}\u{107} przeci\u{105}ganie.`,
	"dragItem": (args) => `Przeci\u{105}gnij ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `Przeci\u{105}gnij ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} wybrany element`,
		other: () => `${formatter.number(args.count)} wybranych element\xf3w`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `Naci\u{15B}nij Enter, aby przeci\u{105}gn\u{105}\u{107} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} wybrany element`,
		other: () => `${formatter.number(args.count)} wybrane(-ych) elementy(-\xf3w)`
	})}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `Naci\u{15B}nij Alt + Enter, aby przeci\u{105}gn\u{105}\u{107} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} wybrany element`,
		other: () => `${formatter.number(args.count)} wybrane(-ych) elementy(-\xf3w)`
	})}.`,
	"dragSelectedLongPress": (args, formatter) => `Naci\u{15B}nij i przytrzymaj, aby przeci\u{105}gn\u{105}\u{107} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} wybrany element`,
		other: () => `${formatter.number(args.count)} wybrane(-ych) elementy(-\xf3w)`
	})}.`,
	"dragStartedKeyboard": `Rozpocz\u{119}to przeci\u{105}ganie. Naci\u{15B}nij Tab, aby wybra\u{107} miejsce docelowe, a nast\u{119}pnie naci\u{15B}nij Enter, aby upu\u{15B}ci\u{107}, lub Escape, aby anulowa\u{107}.`,
	"dragStartedTouch": `Rozpocz\u{119}to przeci\u{105}ganie. Wybierz miejsce, w kt\xf3rym chcesz upu\u{15B}ci\u{107} element, a nast\u{119}pnie dotknij dwukrotnie, aby upu\u{15B}ci\u{107}.F`,
	"dragStartedVirtual": `Rozpocz\u{119}to przeci\u{105}ganie. Wybierz miejsce, w kt\xf3rym chcesz upu\u{15B}ci\u{107} element, a nast\u{119}pnie kliknij lub naci\u{15B}nij Enter, aby upu\u{15B}ci\u{107}.`,
	"dropCanceled": `Anulowano upuszczenie.`,
	"dropComplete": `Zako\u{144}czono upuszczanie.`,
	"dropDescriptionKeyboard": `Naci\u{15B}nij Enter, aby upu\u{15B}ci\u{107}. Naci\u{15B}nij Escape, aby anulowa\u{107} przeci\u{105}gni\u{119}cie.`,
	"dropDescriptionTouch": `Dotknij dwukrotnie, aby upu\u{15B}ci\u{107}.`,
	"dropDescriptionVirtual": `Kliknij, aby upu\u{15B}ci\u{107}.`,
	"dropIndicator": `wska\u{17A}nik upuszczenia`,
	"dropOnItem": (args) => `Upu\u{15B}\u{107} na ${args.itemText}`,
	"dropOnRoot": `Upu\u{15B}\u{107}`,
	"endDragKeyboard": `Przeci\u{105}ganie. Naci\u{15B}nij Enter, aby anulowa\u{107} przeci\u{105}gni\u{119}cie.`,
	"endDragTouch": `Przeci\u{105}ganie. Kliknij dwukrotnie, aby anulowa\u{107} przeci\u{105}gni\u{119}cie.`,
	"endDragVirtual": `Przeci\u{105}ganie. Kliknij, aby anulowa\u{107} przeci\u{105}ganie.`,
	"insertAfter": (args) => `Umie\u{15B}\u{107} za ${args.itemText}`,
	"insertBefore": (args) => `Umie\u{15B}\u{107} przed ${args.itemText}`,
	"insertBetween": (args) => `Umie\u{15B}\u{107} mi\u{119}dzy ${args.beforeItemText} i ${args.afterItemText}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/pt-BR.mjs
var $5edd453ae5d4a8bc$exports = {};
$5edd453ae5d4a8bc$exports = {
	"dragDescriptionKeyboard": `Pressione Enter para come\xe7ar a arrastar.`,
	"dragDescriptionKeyboardAlt": `Pressione Alt + Enter para come\xe7ar a arrastar.`,
	"dragDescriptionLongPress": `Pressione e segure para come\xe7ar a arrastar.`,
	"dragDescriptionTouch": `Toque duas vezes para come\xe7ar a arrastar.`,
	"dragDescriptionVirtual": `Clique para come\xe7ar a arrastar.`,
	"dragItem": (args) => `Arrastar ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `Arrastar ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} item selecionado`,
		other: () => `${formatter.number(args.count)} itens selecionados`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `Pressione Enter para arrastar ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} o item selecionado`,
		other: () => `${formatter.number(args.count)} os itens selecionados`
	})}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `Pressione Alt + Enter para arrastar ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} o item selecionado`,
		other: () => `${formatter.number(args.count)} os itens selecionados`
	})}.`,
	"dragSelectedLongPress": (args, formatter) => `Pressione e segure para arrastar ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} o item selecionado`,
		other: () => `${formatter.number(args.count)} os itens selecionados`
	})}.`,
	"dragStartedKeyboard": `Comece a arrastar. Pressione Tab para navegar at\xe9 um alvo e, em seguida, pressione Enter para soltar ou pressione Escape para cancelar.`,
	"dragStartedTouch": `Comece a arrastar. Navegue at\xe9 um alvo e toque duas vezes para soltar.`,
	"dragStartedVirtual": `Comece a arrastar. Navegue at\xe9 um alvo e clique ou pressione Enter para soltar.`,
	"dropCanceled": `Libera\xe7\xe3o cancelada.`,
	"dropComplete": `Libera\xe7\xe3o conclu\xedda.`,
	"dropDescriptionKeyboard": `Pressione Enter para soltar. Pressione Escape para cancelar.`,
	"dropDescriptionTouch": `Toque duas vezes para soltar.`,
	"dropDescriptionVirtual": `Clique para soltar.`,
	"dropIndicator": `indicador de libera\xe7\xe3o`,
	"dropOnItem": (args) => `Soltar em ${args.itemText}`,
	"dropOnRoot": `Soltar`,
	"endDragKeyboard": `Arrastando. Pressione Enter para cancelar.`,
	"endDragTouch": `Arrastando. Toque duas vezes para cancelar.`,
	"endDragVirtual": `Arrastando. Clique para cancelar.`,
	"insertAfter": (args) => `Inserir ap\xf3s ${args.itemText}`,
	"insertBefore": (args) => `Inserir antes de ${args.itemText}`,
	"insertBetween": (args) => `Inserir entre ${args.beforeItemText} e ${args.afterItemText}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/pt-PT.mjs
var $5f431994f708535e$exports = {};
$5f431994f708535e$exports = {
	"dragDescriptionKeyboard": `Prima Enter para iniciar o arrasto.`,
	"dragDescriptionKeyboardAlt": `Prima Alt + Enter para iniciar o arrasto.`,
	"dragDescriptionLongPress": `Prima longamente para come\xe7ar a arrastar.`,
	"dragDescriptionTouch": `Fa\xe7a duplo toque para come\xe7ar a arrastar.`,
	"dragDescriptionVirtual": `Clique para iniciar o arrasto.`,
	"dragItem": (args) => `Arrastar ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `Arrastar ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} item selecionado`,
		other: () => `${formatter.number(args.count)} itens selecionados`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `Prima Enter para arrastar ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} o item selecionado`,
		other: () => `${formatter.number(args.count)} os itens selecionados`
	})}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `Prima Alt + Enter para arrastar ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} o item selecionado`,
		other: () => `${formatter.number(args.count)} os itens selecionados`
	})}.`,
	"dragSelectedLongPress": (args, formatter) => `Prima longamente para arrastar ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} o item selecionado`,
		other: () => `${formatter.number(args.count)} os itens selecionados`
	})}.`,
	"dragStartedKeyboard": `Arrasto iniciado. Prima a tecla de tabula\xe7\xe3o para navegar para um destino para largar, e em seguida prima Enter para largar ou prima Escape para cancelar.`,
	"dragStartedTouch": `Arrasto iniciado. Navegue para um destino para largar, e em seguida fa\xe7a duplo toque para largar.`,
	"dragStartedVirtual": `Arrasto iniciado. Navegue para um destino para largar, e em seguida clique ou prima Enter para largar.`,
	"dropCanceled": `Largar cancelado.`,
	"dropComplete": `Largar completo.`,
	"dropDescriptionKeyboard": `Prima Enter para largar. Prima Escape para cancelar o arrasto.`,
	"dropDescriptionTouch": `Fa\xe7a duplo toque para largar.`,
	"dropDescriptionVirtual": `Clique para largar.`,
	"dropIndicator": `Indicador de largar`,
	"dropOnItem": (args) => `Largar em ${args.itemText}`,
	"dropOnRoot": `Largar em`,
	"endDragKeyboard": `A arrastar. Prima Enter para cancelar o arrasto.`,
	"endDragTouch": `A arrastar. Fa\xe7a duplo toque para cancelar o arrasto.`,
	"endDragVirtual": `A arrastar. Clique para cancelar o arrasto.`,
	"insertAfter": (args) => `Inserir depois de ${args.itemText}`,
	"insertBefore": (args) => `Inserir antes de ${args.itemText}`,
	"insertBetween": (args) => `Inserir entre ${args.beforeItemText} e ${args.afterItemText}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/ro-RO.mjs
var $107b5e2e45e971f1$exports = {};
$107b5e2e45e971f1$exports = {
	"dragDescriptionKeyboard": `Ap\u{103}sa\u{21B}i pe Enter pentru a \xeencepe glisarea.`,
	"dragDescriptionKeyboardAlt": `Ap\u{103}sa\u{21B}i pe Alt + Enter pentru a \xeencepe glisarea.`,
	"dragDescriptionLongPress": `Ap\u{103}sa\u{21B}i lung pentru a \xeencepe glisarea.`,
	"dragDescriptionTouch": `Atinge\u{21B}i de dou\u{103} ori pentru a \xeencepe s\u{103} glisa\u{21B}i.`,
	"dragDescriptionVirtual": `Face\u{21B}i clic pentru a \xeencepe glisarea.`,
	"dragItem": (args) => `Glisa\u{21B}i ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `Glisa\u{21B}i ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} element selectat`,
		other: () => `${formatter.number(args.count)} elemente selectate`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `Ap\u{103}sa\u{21B}i pe Enter pentru a glisa ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} element selectat`,
		other: () => `${formatter.number(args.count)} elemente selectate`
	})}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `Ap\u{103}sa\u{21B}i pe Alt + Enter pentru a glisa ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} element selectat`,
		other: () => `${formatter.number(args.count)} elemente selectate`
	})}.`,
	"dragSelectedLongPress": (args, formatter) => `Ap\u{103}sa\u{21B}i lung pentru a glisa ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} element selectat`,
		other: () => `${formatter.number(args.count)} elemente selectate`
	})}.`,
	"dragStartedKeyboard": `A \xeenceput glisarea. Ap\u{103}sa\u{21B}i pe Tab pentru a naviga la o \u{21B}int\u{103} de fixare, apoi ap\u{103}sa\u{21B}i pe Enter pentru a fixa sau ap\u{103}sa\u{21B}i pe Escape pentru a anula glisarea.`,
	"dragStartedTouch": `A \xeenceput glisarea. Naviga\u{21B}i la o \u{21B}int\u{103} de fixare, apoi atinge\u{21B}i de dou\u{103} ori pentru a fixa.`,
	"dragStartedVirtual": `A \xeenceput glisarea. Naviga\u{21B}i la o \u{21B}int\u{103} de fixare, apoi face\u{21B}i clic sau ap\u{103}sa\u{21B}i pe Enter pentru a fixa.`,
	"dropCanceled": `Fixare anulat\u{103}.`,
	"dropComplete": `Fixare finalizat\u{103}.`,
	"dropDescriptionKeyboard": `Ap\u{103}sa\u{21B}i pe Enter pentru a fixa. Ap\u{103}sa\u{21B}i pe Escape pentru a anula glisarea.`,
	"dropDescriptionTouch": `Atinge\u{21B}i de dou\u{103} ori pentru a fixa.`,
	"dropDescriptionVirtual": `Face\u{21B}i clic pentru a fixa.`,
	"dropIndicator": `indicator de fixare`,
	"dropOnItem": (args) => `Fixa\u{21B}i pe ${args.itemText}`,
	"dropOnRoot": `Fixare pe`,
	"endDragKeyboard": `Se gliseaz\u{103}. Ap\u{103}sa\u{21B}i pe Enter pentru a anula glisarea.`,
	"endDragTouch": `Se gliseaz\u{103}. Atinge\u{21B}i de dou\u{103} ori pentru a anula glisarea.`,
	"endDragVirtual": `Se gliseaz\u{103}. Face\u{21B}i clic pentru a anula glisarea.`,
	"insertAfter": (args) => `Insera\u{21B}i dup\u{103} ${args.itemText}`,
	"insertBefore": (args) => `Insera\u{21B}i \xeenainte de ${args.itemText}`,
	"insertBetween": (args) => `Insera\u{21B}i \xeentre ${args.beforeItemText} \u{219}i ${args.afterItemText}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/ru-RU.mjs
var $d4b9c2f01c1892f7$exports = {};
$d4b9c2f01c1892f7$exports = {
	"dragDescriptionKeyboard": `\u{41D}\u{430}\u{436}\u{43C}\u{438}\u{442}\u{435} \u{43A}\u{43B}\u{430}\u{432}\u{438}\u{448}\u{443} Enter \u{434}\u{43B}\u{44F} \u{43D}\u{430}\u{447}\u{430}\u{43B}\u{430} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{43D}\u{438}\u{44F}.`,
	"dragDescriptionKeyboardAlt": `\u{41D}\u{430}\u{436}\u{43C}\u{438}\u{442}\u{435} Alt + Enter, \u{447}\u{442}\u{43E}\u{431}\u{44B} \u{43D}\u{430}\u{447}\u{430}\u{442}\u{44C} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{442}\u{44C}.`,
	"dragDescriptionLongPress": `\u{41D}\u{430}\u{436}\u{43C}\u{438}\u{442}\u{435} \u{438} \u{443}\u{434}\u{435}\u{440}\u{436}\u{438}\u{432}\u{430}\u{439}\u{442}\u{435}, \u{447}\u{442}\u{43E}\u{431}\u{44B} \u{43D}\u{430}\u{447}\u{430}\u{442}\u{44C} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{442}\u{44C}.`,
	"dragDescriptionTouch": `\u{414}\u{432}\u{430}\u{436}\u{434}\u{44B} \u{43D}\u{430}\u{436}\u{43C}\u{438}\u{442}\u{435} \u{434}\u{43B}\u{44F} \u{43D}\u{430}\u{447}\u{430}\u{43B}\u{430} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{43D}\u{438}\u{44F}.`,
	"dragDescriptionVirtual": `\u{429}\u{435}\u{43B}\u{43A}\u{43D}\u{438}\u{442}\u{435} \u{434}\u{43B}\u{44F} \u{43D}\u{430}\u{447}\u{430}\u{43B}\u{430} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{43D}\u{438}\u{44F}.`,
	"dragItem": (args) => `\u{41F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{449}\u{438}\u{442}\u{44C} ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `\u{41F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{449}\u{438}\u{442}\u{44C} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}`,
		other: () => `${formatter.number(args.count)} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{445} \u{44D}\u{43B}\u{435}\u{43C}`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `\u{41D}\u{430}\u{436}\u{43C}\u{438}\u{442}\u{435} Enter \u{434}\u{43B}\u{44F} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{43D}\u{438}\u{44F} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{43E}\u{433}\u{43E} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{430}`,
		other: () => `${formatter.number(args.count)} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{445} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{43E}\u{432}`
	})}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `\u{41D}\u{430}\u{436}\u{43C}\u{438}\u{442}\u{435} Alt + Enter \u{434}\u{43B}\u{44F} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{43D}\u{438}\u{44F} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{43E}\u{433}\u{43E} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{430}`,
		other: () => `${formatter.number(args.count)} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{445} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{43E}\u{432}`
	})}.`,
	"dragSelectedLongPress": (args, formatter) => `\u{41D}\u{430}\u{436}\u{43C}\u{438}\u{442}\u{435} \u{438} \u{443}\u{434}\u{435}\u{440}\u{436}\u{438}\u{432}\u{430}\u{439}\u{442}\u{435} \u{434}\u{43B}\u{44F} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{43D}\u{438}\u{44F} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{43E}\u{433}\u{43E} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{430}`,
		other: () => `${formatter.number(args.count)} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{445} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{43E}\u{432}`
	})}.`,
	"dragStartedKeyboard": `\u{41D}\u{430}\u{447}\u{430}\u{442}\u{43E} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{43D}\u{438}\u{435}. \u{41D}\u{430}\u{436}\u{43C}\u{438}\u{442}\u{435} \u{43A}\u{43B}\u{430}\u{432}\u{438}\u{448}\u{443} Tab \u{434}\u{43B}\u{44F} \u{432}\u{44B}\u{431}\u{43E}\u{440}\u{430} \u{446}\u{435}\u{43B}\u{438}, \u{437}\u{430}\u{442}\u{435}\u{43C} \u{43D}\u{430}\u{436}\u{43C}\u{438}\u{442}\u{435} \u{43A}\u{43B}\u{430}\u{432}\u{438}\u{448}\u{443} Enter, \u{447}\u{442}\u{43E}\u{431}\u{44B} \u{43F}\u{440}\u{438}\u{43C}\u{435}\u{43D}\u{438}\u{442}\u{44C} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{43D}\u{438}\u{435}, \u{438}\u{43B}\u{438} \u{43A}\u{43B}\u{430}\u{432}\u{438}\u{448}\u{443} Escape \u{434}\u{43B}\u{44F} \u{43E}\u{442}\u{43C}\u{435}\u{43D}\u{44B} \u{434}\u{435}\u{439}\u{441}\u{442}\u{432}\u{438}\u{44F}.`,
	"dragStartedTouch": `\u{41D}\u{430}\u{447}\u{430}\u{442}\u{43E} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{43D}\u{438}\u{435}. \u{412}\u{44B}\u{431}\u{435}\u{440}\u{438}\u{442}\u{435} \u{446}\u{435}\u{43B}\u{44C}, \u{437}\u{430}\u{442}\u{435}\u{43C} \u{434}\u{432}\u{430}\u{436}\u{434}\u{44B} \u{43D}\u{430}\u{436}\u{43C}\u{438}\u{442}\u{435}, \u{447}\u{442}\u{43E}\u{431}\u{44B} \u{43F}\u{440}\u{438}\u{43C}\u{435}\u{43D}\u{438}\u{442}\u{44C} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{43D}\u{438}\u{435}.`,
	"dragStartedVirtual": `\u{41D}\u{430}\u{447}\u{430}\u{442}\u{43E} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{43D}\u{438}\u{435}. \u{41D}\u{430}\u{436}\u{43C}\u{438}\u{442}\u{435} \u{43A}\u{43B}\u{430}\u{432}\u{438}\u{448}\u{443} Tab \u{434}\u{43B}\u{44F} \u{432}\u{44B}\u{431}\u{43E}\u{440}\u{430} \u{446}\u{435}\u{43B}\u{438}, \u{437}\u{430}\u{442}\u{435}\u{43C} \u{43D}\u{430}\u{436}\u{43C}\u{438}\u{442}\u{435} \u{43A}\u{43B}\u{430}\u{432}\u{438}\u{448}\u{443} Enter, \u{447}\u{442}\u{43E}\u{431}\u{44B} \u{43F}\u{440}\u{438}\u{43C}\u{435}\u{43D}\u{438}\u{442}\u{44C} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{43D}\u{438}\u{435}.`,
	"dropCanceled": `\u{41F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{43D}\u{438}\u{435} \u{43E}\u{442}\u{43C}\u{435}\u{43D}\u{435}\u{43D}\u{43E}.`,
	"dropComplete": `\u{41F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{43D}\u{438}\u{435} \u{437}\u{430}\u{432}\u{435}\u{440}\u{448}\u{435}\u{43D}\u{43E}.`,
	"dropDescriptionKeyboard": `\u{41D}\u{430}\u{436}\u{43C}\u{438}\u{442}\u{435} \u{43A}\u{43B}\u{430}\u{432}\u{438}\u{448}\u{443} Enter, \u{447}\u{442}\u{43E}\u{431}\u{44B} \u{43F}\u{440}\u{438}\u{43C}\u{435}\u{43D}\u{438}\u{442}\u{44C} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{43D}\u{438}\u{435}. \u{41D}\u{430}\u{436}\u{43C}\u{438}\u{442}\u{435} \u{43A}\u{43B}\u{430}\u{432}\u{438}\u{448}\u{443} Escape \u{434}\u{43B}\u{44F} \u{43E}\u{442}\u{43C}\u{435}\u{43D}\u{44B}.`,
	"dropDescriptionTouch": `\u{414}\u{432}\u{430}\u{436}\u{434}\u{44B} \u{43D}\u{430}\u{436}\u{43C}\u{438}\u{442}\u{435}, \u{447}\u{442}\u{43E}\u{431}\u{44B} \u{43F}\u{440}\u{438}\u{43C}\u{435}\u{43D}\u{438}\u{442}\u{44C} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{43D}\u{438}\u{435}.`,
	"dropDescriptionVirtual": `\u{429}\u{435}\u{43B}\u{43A}\u{43D}\u{438}\u{442}\u{435}, \u{447}\u{442}\u{43E}\u{431}\u{44B} \u{43F}\u{440}\u{438}\u{43C}\u{435}\u{43D}\u{438}\u{442}\u{44C} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{43D}\u{438}\u{435}.`,
	"dropIndicator": `\u{438}\u{43D}\u{434}\u{438}\u{43A}\u{430}\u{442}\u{43E}\u{440} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{43D}\u{438}\u{44F}`,
	"dropOnItem": (args) => `\u{41F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{449}\u{438}\u{442}\u{44C} \u{43D}\u{430} ${args.itemText}`,
	"dropOnRoot": `\u{41F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{449}\u{438}\u{442}\u{44C} \u{43D}\u{430}`,
	"endDragKeyboard": `\u{41F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{43D}\u{438}\u{435}. \u{41D}\u{430}\u{436}\u{43C}\u{438}\u{442}\u{435} \u{43A}\u{43B}\u{430}\u{432}\u{438}\u{448}\u{443} Enter \u{434}\u{43B}\u{44F} \u{43E}\u{442}\u{43C}\u{435}\u{43D}\u{44B}.`,
	"endDragTouch": `\u{41F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{43D}\u{438}\u{435}. \u{414}\u{432}\u{430}\u{436}\u{434}\u{44B} \u{43D}\u{430}\u{436}\u{43C}\u{438}\u{442}\u{435} \u{434}\u{43B}\u{44F} \u{43E}\u{442}\u{43C}\u{435}\u{43D}\u{44B}.`,
	"endDragVirtual": `\u{41F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{43D}\u{438}\u{435}. \u{429}\u{435}\u{43B}\u{43A}\u{43D}\u{438}\u{442}\u{435} \u{434}\u{43B}\u{44F} \u{43E}\u{442}\u{43C}\u{435}\u{43D}\u{44B}.`,
	"insertAfter": (args) => `\u{412}\u{441}\u{442}\u{430}\u{432}\u{438}\u{442}\u{44C} \u{43F}\u{43E}\u{441}\u{43B}\u{435} ${args.itemText}`,
	"insertBefore": (args) => `\u{412}\u{441}\u{442}\u{430}\u{432}\u{438}\u{442}\u{44C} \u{43F}\u{435}\u{440}\u{435}\u{434} ${args.itemText}`,
	"insertBetween": (args) => `\u{412}\u{441}\u{442}\u{430}\u{432}\u{438}\u{442}\u{44C} \u{43C}\u{435}\u{436}\u{434}\u{443} ${args.beforeItemText} \u{438} ${args.afterItemText}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/sk-SK.mjs
var $dbdc1942894e83e4$exports = {};
$dbdc1942894e83e4$exports = {
	"dragDescriptionKeyboard": `Stla\u{10D}en\xedm kl\xe1vesu Enter za\u{10D}nete pres\xfavanie.`,
	"dragDescriptionKeyboardAlt": `Stla\u{10D}en\xedm kl\xe1vesov Alt + Enter za\u{10D}nete pres\xfavanie.`,
	"dragDescriptionLongPress": `Dlh\xfdm stla\u{10D}en\xedm za\u{10D}nete pres\xfavanie.`,
	"dragDescriptionTouch": `Dvojit\xfdm kliknut\xedm za\u{10D}nete pres\xfavanie.`,
	"dragDescriptionVirtual": `Kliknut\xedm za\u{10D}nete pres\xfavanie.`,
	"dragItem": (args) => `Presun\xfa\u{165} polo\u{17E}ku ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `Presun\xfa\u{165} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} vybrat\xfa polo\u{17E}ku`,
		other: () => `${formatter.number(args.count)} vybrat\xe9 polo\u{17E}ky`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `Stla\u{10D}en\xedm kl\xe1vesu Enter presuniete ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} vybrat\xfa polo\u{17E}ku`,
		other: () => `${formatter.number(args.count)} vybrat\xfdch polo\u{17E}iek`
	})}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `Stla\u{10D}en\xedm kl\xe1vesov Alt + Enter presuniete ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} vybrat\xfa polo\u{17E}ku`,
		other: () => `${formatter.number(args.count)} vybrat\xfdch polo\u{17E}iek`
	})}.`,
	"dragSelectedLongPress": (args, formatter) => `Dlh\xfdm stla\u{10D}en\xedm presuniete ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} vybrat\xfa polo\u{17E}ku`,
		other: () => `${formatter.number(args.count)} vybrat\xfdch polo\u{17E}iek`
	})}.`,
	"dragStartedKeyboard": `Pres\xfavanie sa za\u{10D}alo. Do cie\u{13E}ov\xe9ho umiestnenia prejdete stla\u{10D}en\xedm kl\xe1vesu Tab. Ak chcete polo\u{17E}ku umiestni\u{165}, stla\u{10D}te kl\xe1ves Enter alebo stla\u{10D}te kl\xe1ves Esc, ak chcete pres\xfavanie zru\u{161}i\u{165}.`,
	"dragStartedTouch": `Pres\xfavanie sa za\u{10D}alo. Prejdite na cie\u{13E}ov\xe9 umiestnenie a dvojit\xfdm kliknut\xedm umiestnite polo\u{17E}ku.`,
	"dragStartedVirtual": `Pres\xfavanie sa za\u{10D}alo. Prejdite na cie\u{13E}ov\xe9 umiestnenie a kliknut\xedm alebo stla\u{10D}en\xedm kl\xe1vesu Enter umiestnite polo\u{17E}ku.`,
	"dropCanceled": `Umiestnenie zru\u{161}en\xe9.`,
	"dropComplete": `Umiestnenie dokon\u{10D}en\xe9.`,
	"dropDescriptionKeyboard": `Stla\u{10D}en\xedm kl\xe1vesu Enter umiestnite polo\u{17E}ku. Stla\u{10D}en\xedm kl\xe1vesu Esc zru\u{161}\xedte pres\xfavanie.`,
	"dropDescriptionTouch": `Dvojit\xfdm kliknut\xedm umiestnite polo\u{17E}ku.`,
	"dropDescriptionVirtual": `Kliknut\xedm umiestnite polo\u{17E}ku.`,
	"dropIndicator": `indik\xe1tor umiestnenia`,
	"dropOnItem": (args) => `Umiestni\u{165} na polo\u{17E}ku ${args.itemText}`,
	"dropOnRoot": `Umiestni\u{165} na`,
	"endDragKeyboard": `Prebieha pres\xfavanie. Ak ho chcete zru\u{161}i\u{165}, stla\u{10D}te kl\xe1ves Enter.`,
	"endDragTouch": `Prebieha pres\xfavanie. Dvojit\xfdm kliknut\xedm ho m\xf4\u{17E}ete zru\u{161}i\u{165}.`,
	"endDragVirtual": `Prebieha pres\xfavanie.`,
	"insertAfter": (args) => `Vlo\u{17E}i\u{165} za polo\u{17E}ku ${args.itemText}`,
	"insertBefore": (args) => `Vlo\u{17E}i\u{165} pred polo\u{17E}ku ${args.itemText}`,
	"insertBetween": (args) => `Vlo\u{17E}i\u{165} medzi polo\u{17E}ky ${args.beforeItemText} a ${args.afterItemText}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/sl-SI.mjs
var $fbaaaaebd547d998$exports = {};
$fbaaaaebd547d998$exports = {
	"dragDescriptionKeyboard": `Pritisnite tipko Enter za za\u{10D}etek vle\u{10D}enja.`,
	"dragDescriptionKeyboardAlt": `Pritisnite tipki Alt + Enter za za\u{10D}etek vle\u{10D}enja.`,
	"dragDescriptionLongPress": `Pritisnite in zadr\u{17E}ite za za\u{10D}etek vle\u{10D}enja.`,
	"dragDescriptionTouch": `Dvotapnite za za\u{10D}etek vle\u{10D}enja.`,
	"dragDescriptionVirtual": `Kliknite za za\u{10D}etek vle\u{10D}enja.`,
	"dragItem": (args) => `Povleci ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `Povlecite ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} izbran element`,
		other: () => `izbrane elemente (${formatter.number(args.count)})`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `Pritisnite tipko Enter, da povle\u{10D}ete ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} izbrani element`,
		other: () => `${formatter.number(args.count)} izbranih elementov`
	})}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `Pritisnite tipki Alt + Enter, da povle\u{10D}ete ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} izbrani element`,
		other: () => `${formatter.number(args.count)} izbranih elementov`
	})}.`,
	"dragSelectedLongPress": (args, formatter) => `Pritisnite in zadr\u{17E}ite, da povle\u{10D}ete ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} izbrani element`,
		other: () => `${formatter.number(args.count)} izbranih elementov`
	})}.`,
	"dragStartedKeyboard": `Vle\u{10D}enje se je za\u{10D}elo. Pritisnite tipko Tab za pomik na mesto, kamor \u{17E}elite spustiti elemente, in pritisnite tipko Enter, da jih spustite, ali tipko Escape, da prekli\u{10D}ete postopek.`,
	"dragStartedTouch": `Vle\u{10D}enje se je za\u{10D}elo. Pomaknite se na mesto, kamor \u{17E}elite spustiti elemente, in dvotapnite, da jih spustite.`,
	"dragStartedVirtual": `Vle\u{10D}enje se je za\u{10D}elo. Pomaknite se na mesto, kamor \u{17E}elite spustiti elemente, in kliknite ali pritisnite tipko Enter, da jih spustite.`,
	"dropCanceled": `Spust je preklican.`,
	"dropComplete": `Spust je kon\u{10D}an.`,
	"dropDescriptionKeyboard": `Pritisnite tipko Enter, da spustite. Pritisnite tipko Escape, da prekli\u{10D}ete vle\u{10D}enje.`,
	"dropDescriptionTouch": `Dvotapnite, da spustite.`,
	"dropDescriptionVirtual": `Kliknite, da spustite.`,
	"dropIndicator": `indikator spusta`,
	"dropOnItem": (args) => `Spusti na mesto ${args.itemText}`,
	"dropOnRoot": `Spusti na mesto`,
	"endDragKeyboard": `Vle\u{10D}enje. Pritisnite tipko Enter za preklic vle\u{10D}enja.`,
	"endDragTouch": `Vle\u{10D}enje. Dvotapnite za preklic vle\u{10D}enja.`,
	"endDragVirtual": `Vle\u{10D}enje. Kliknite, da prekli\u{10D}ete vle\u{10D}enje.`,
	"insertAfter": (args) => `Vstavi za ${args.itemText}`,
	"insertBefore": (args) => `Vstavi pred ${args.itemText}`,
	"insertBetween": (args) => `Vstavi med ${args.beforeItemText} in ${args.afterItemText}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/sr-SP.mjs
var $a0caa33f1e264489$exports = {};
$a0caa33f1e264489$exports = {
	"dragDescriptionKeyboard": `Pritisnite Enter da biste zapo\u{10D}eli prevla\u{10D}enje.`,
	"dragDescriptionKeyboardAlt": `Pritisnite Alt + Enter da biste zapo\u{10D}eli prevla\u{10D}enje.`,
	"dragDescriptionLongPress": `Pritisnite dugo da biste zapo\u{10D}eli prevla\u{10D}enje.`,
	"dragDescriptionTouch": `Dvaput dodirnite da biste zapo\u{10D}eli prevla\u{10D}enje.`,
	"dragDescriptionVirtual": `Kliknite da biste zapo\u{10D}eli prevla\u{10D}enje.`,
	"dragItem": (args) => `Prevucite ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `Prevucite ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} izabranu stavku`,
		other: () => `${formatter.number(args.count)} izabrane stavke`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `Pritisnite Enter da biste prevukli ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} izabranu stavku`,
		other: () => `${formatter.number(args.count)} izabranih stavki`
	})}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `Pritisnite Alt + Enter da biste prevukli ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} izabranu stavku`,
		other: () => `${formatter.number(args.count)} izabranih stavki`
	})}.`,
	"dragSelectedLongPress": (args, formatter) => `Pritisnite dugo da biste prevukli ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} izabranu stavku`,
		other: () => `${formatter.number(args.count)} izabranih stavki`
	})}.`,
	"dragStartedKeyboard": `Prevla\u{10D}enje je zapo\u{10D}eto. Pritisnite Tab da biste oti\u{161}li do cilja za otpu\u{161}tanje, zatim pritisnite Enter za ispu\u{161}tanje ili pritisnite Escape za otkazivanje.`,
	"dragStartedTouch": `Prevla\u{10D}enje je zapo\u{10D}eto. Idite do cilja za otpu\u{161}tanje, a zatim dvaput dodirnite za otpu\u{161}tanje.`,
	"dragStartedVirtual": `Prevla\u{10D}enje je zapo\u{10D}eto. Idite do cilja za otpu\u{161}tanje, a zatim kliknite ili pritinite Enter za otpu\u{161}tanje.`,
	"dropCanceled": `Otpu\u{161}tanje je otkazano.`,
	"dropComplete": `Prevla\u{10D}enje je zavr\u{161}eno.`,
	"dropDescriptionKeyboard": `Pritisnite Enter da biste otpustili. Pritisnite Escape da biste otkazali prevla\u{10D}enje.`,
	"dropDescriptionTouch": `Dvaput dodirnite za otpu\u{161}tanje.`,
	"dropDescriptionVirtual": `Kliknite za otpu\u{161}tanje.`,
	"dropIndicator": `Indikator otpu\u{161}tanja`,
	"dropOnItem": (args) => `Otpusti na ${args.itemText}`,
	"dropOnRoot": `Otpusti na`,
	"endDragKeyboard": `Prevla\u{10D}enje u toku. Pritisnite Enter da biste otkazali prevla\u{10D}enje.`,
	"endDragTouch": `Prevla\u{10D}enje u toku. Dvaput dodirnite da biste otkazali prevla\u{10D}enje.`,
	"endDragVirtual": `Prevla\u{10D}enje u toku. Kliknite da biste otkazali prevla\u{10D}enje.`,
	"insertAfter": (args) => `Umetnite posle ${args.itemText}`,
	"insertBefore": (args) => `Umetnite ispred ${args.itemText}`,
	"insertBetween": (args) => `Umetnite izme\u{111}u ${args.beforeItemText} i ${args.afterItemText}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/sv-SE.mjs
var $d576b66176f5c0ff$exports = {};
$d576b66176f5c0ff$exports = {
	"dragDescriptionKeyboard": `Tryck p\xe5 enter f\xf6r att b\xf6rja dra.`,
	"dragDescriptionKeyboardAlt": `Tryck p\xe5 Alt + Retur f\xf6r att b\xf6rja dra.`,
	"dragDescriptionLongPress": `Tryck l\xe4nge f\xf6r att b\xf6rja dra.`,
	"dragDescriptionTouch": `Dubbeltryck f\xf6r att b\xf6rja dra.`,
	"dragDescriptionVirtual": `Klicka f\xf6r att b\xf6rja dra.`,
	"dragItem": (args) => `Dra ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `Dra ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} valt objekt`,
		other: () => `${formatter.number(args.count)} valda objekt`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `Tryck p\xe5 Retur f\xf6r att dra ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} markerat objekt`,
		other: () => `${formatter.number(args.count)} markerade objekt`
	})}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `Tryck p\xe5 Alt + Retur f\xf6r att dra ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} markerat objekt`,
		other: () => `${formatter.number(args.count)} markerade objekt`
	})}.`,
	"dragSelectedLongPress": (args, formatter) => `Tryck l\xe4nge f\xf6r att dra ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} markerat objekt`,
		other: () => `${formatter.number(args.count)} markerade objekt`
	})}.`,
	"dragStartedKeyboard": `B\xf6rja dra. Tryck p\xe5 tabb f\xf6r att navigera till m\xe5let, tryck p\xe5 enter f\xf6r att sl\xe4ppa eller p\xe5 escape f\xf6r att avbryta.`,
	"dragStartedTouch": `B\xf6rja dra. Navigera till ett m\xe5l och dubbeltryck f\xf6r att sl\xe4ppa.`,
	"dragStartedVirtual": `B\xf6rja dra. Navigera till ett m\xe5l och klicka eller tryck p\xe5 enter f\xf6r att sl\xe4ppa.`,
	"dropCanceled": `Sl\xe4pp\xe5tg\xe4rd avbr\xf6ts.`,
	"dropComplete": `Sl\xe4pp\xe5tg\xe4rd klar.`,
	"dropDescriptionKeyboard": `Tryck p\xe5 enter f\xf6r att sl\xe4ppa. Tryck p\xe5 escape f\xf6r att avbryta drag\xe5tg\xe4rd.`,
	"dropDescriptionTouch": `Dubbeltryck f\xf6r att sl\xe4ppa.`,
	"dropDescriptionVirtual": `Klicka f\xf6r att sl\xe4ppa.`,
	"dropIndicator": `sl\xe4ppindikator`,
	"dropOnItem": (args) => `Sl\xe4pp p\xe5 ${args.itemText}`,
	"dropOnRoot": `Sl\xe4pp p\xe5`,
	"endDragKeyboard": `Drar. Tryck p\xe5 enter f\xf6r att avbryta drag\xe5tg\xe4rd.`,
	"endDragTouch": `Drar. Dubbeltryck f\xf6r att avbryta drag\xe5tg\xe4rd.`,
	"endDragVirtual": `Drar. Klicka f\xf6r att avbryta drag\xe5tg\xe4rd.`,
	"insertAfter": (args) => `Infoga efter ${args.itemText}`,
	"insertBefore": (args) => `Infoga f\xf6re ${args.itemText}`,
	"insertBetween": (args) => `Infoga mellan ${args.beforeItemText} och ${args.afterItemText}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/tr-TR.mjs
var $0681f168c13d8f2a$exports = {};
$0681f168c13d8f2a$exports = {
	"dragDescriptionKeyboard": `S\xfcr\xfcklemeyi ba\u{15F}latmak i\xe7in Enter'a bas\u{131}n.`,
	"dragDescriptionKeyboardAlt": `S\xfcr\xfcklemeyi ba\u{15F}latmak i\xe7in Alt + Enter'a bas\u{131}n.`,
	"dragDescriptionLongPress": `S\xfcr\xfcklemeye ba\u{15F}lamak i\xe7in uzun bas\u{131}n.`,
	"dragDescriptionTouch": `S\xfcr\xfcklemeyi ba\u{15F}latmak i\xe7in \xe7ift t\u{131}klay\u{131}n.`,
	"dragDescriptionVirtual": `S\xfcr\xfcklemeyi ba\u{15F}latmak i\xe7in t\u{131}klay\u{131}n.`,
	"dragItem": (args) => `${args.itemText}\u{2019}i s\xfcr\xfckle`,
	"dragSelectedItems": (args, formatter) => `S\xfcr\xfckle ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} se\xe7ili \xf6ge`,
		other: () => `${formatter.number(args.count)} se\xe7ili \xf6ge`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} se\xe7ilmi\u{15F} \xf6\u{11F}e`,
		other: () => `${formatter.number(args.count)} se\xe7ilmi\u{15F} \xf6\u{11F}e`
	})} \xf6\u{11F}esini s\xfcr\xfcklemek i\xe7in Enter'a bas\u{131}n.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} se\xe7ilmi\u{15F} \xf6\u{11F}e`,
		other: () => `${formatter.number(args.count)} se\xe7ilmi\u{15F} \xf6\u{11F}e`
	})} \xf6\u{11F}esini s\xfcr\xfcklemek i\xe7in Alt + Enter tu\u{15F}una bas\u{131}n.`,
	"dragSelectedLongPress": (args, formatter) => `${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} se\xe7ilmi\u{15F} \xf6\u{11F}e`,
		other: () => `${formatter.number(args.count)} se\xe7ilmi\u{15F} \xf6\u{11F}e`
	})} \xf6\u{11F}esini s\xfcr\xfcklemek i\xe7in uzun bas\u{131}n.`,
	"dragStartedKeyboard": `S\xfcr\xfckleme ba\u{15F}lat\u{131}ld\u{131}. Bir b\u{131}rakma hedefine gitmek i\xe7in Tab\u{2019}a bas\u{131}n, ard\u{131}ndan b\u{131}rakmak i\xe7in Enter\u{2019}a bas\u{131}n veya iptal etmek i\xe7in Escape\u{2019}e bas\u{131}n.`,
	"dragStartedTouch": `S\xfcr\xfckleme ba\u{15F}lat\u{131}ld\u{131}. Bir b\u{131}rakma hedefine gidin, ard\u{131}ndan b\u{131}rakmak i\xe7in \xe7ift t\u{131}klay\u{131}n.`,
	"dragStartedVirtual": `S\xfcr\xfckleme ba\u{15F}lat\u{131}ld\u{131}. Bir b\u{131}rakma hedefine gidin, ard\u{131}ndan b\u{131}rakmak i\xe7in Enter\u{2019}a t\u{131}klay\u{131}n veya bas\u{131}n.`,
	"dropCanceled": `B\u{131}rakma iptal edildi.`,
	"dropComplete": `B\u{131}rakma tamamland\u{131}.`,
	"dropDescriptionKeyboard": `B\u{131}rakmak i\xe7in Enter'a bas\u{131}n. S\xfcr\xfcklemeyi iptal etmek i\xe7in Escape'e bas\u{131}n.`,
	"dropDescriptionTouch": `B\u{131}rakmak i\xe7in \xe7ift t\u{131}klay\u{131}n.`,
	"dropDescriptionVirtual": `B\u{131}rakmak i\xe7in t\u{131}klay\u{131}n.`,
	"dropIndicator": `b\u{131}rakma g\xf6stergesi`,
	"dropOnItem": (args) => `${args.itemText} \xfczerine b\u{131}rak`,
	"dropOnRoot": `B\u{131}rak\u{131}n`,
	"endDragKeyboard": `S\xfcr\xfckleme. S\xfcr\xfcklemeyi iptal etmek i\xe7in Enter'a bas\u{131}n.`,
	"endDragTouch": `S\xfcr\xfckleme. S\xfcr\xfcklemeyi iptal etmek i\xe7in \xe7ift t\u{131}klay\u{131}n.`,
	"endDragVirtual": `S\xfcr\xfckleme. S\xfcr\xfcklemeyi iptal etmek i\xe7in t\u{131}klay\u{131}n.`,
	"insertAfter": (args) => `${args.itemText}\u{2019}den sonra gir`,
	"insertBefore": (args) => `${args.itemText}\u{2019}den \xf6nce gir`,
	"insertBetween": (args) => `${args.beforeItemText} ve ${args.afterItemText} aras\u{131}na gir`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/uk-UA.mjs
var $2bfbc1f42c1cf5a7$exports = {};
$2bfbc1f42c1cf5a7$exports = {
	"dragDescriptionKeyboard": `\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C} Enter, \u{449}\u{43E}\u{431} \u{43F}\u{43E}\u{447}\u{430}\u{442}\u{438} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{443}\u{432}\u{430}\u{43D}\u{43D}\u{44F}.`,
	"dragDescriptionKeyboardAlt": `\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C} Alt + Enter, \u{449}\u{43E}\u{431} \u{43F}\u{43E}\u{447}\u{430}\u{442}\u{438} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{443}\u{432}\u{430}\u{43D}\u{43D}\u{44F}.`,
	"dragDescriptionLongPress": `\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C} \u{456} \u{443}\u{442}\u{440}\u{438}\u{43C}\u{443}\u{439}\u{442}\u{435}, \u{449}\u{43E}\u{431} \u{43F}\u{43E}\u{447}\u{430}\u{442}\u{438} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{443}\u{432}\u{430}\u{43D}\u{43D}\u{44F}.`,
	"dragDescriptionTouch": `\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C} \u{434}\u{432}\u{456}\u{447}\u{456}, \u{449}\u{43E}\u{431} \u{43F}\u{43E}\u{447}\u{430}\u{442}\u{438} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{443}\u{432}\u{430}\u{43D}\u{43D}\u{44F}.`,
	"dragDescriptionVirtual": `\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C}, \u{449}\u{43E}\u{431} \u{43F}\u{43E}\u{447}\u{430}\u{442}\u{438} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{443}\u{432}\u{430}\u{43D}\u{43D}\u{44F}.`,
	"dragItem": (args) => `\u{41F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{43D}\u{443}\u{442}\u{438} ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `\u{41F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{43D}\u{456}\u{442}\u{44C} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}`,
		other: () => `${formatter.number(args.count)} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{445} \u{435}\u{43B}\u{435}\u{43C}`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C} Enter, \u{449}\u{43E}\u{431} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{43D}\u{443}\u{442}\u{438} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}`,
		other: () => `${formatter.number(args.count)} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{445} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{438}(-\u{456}\u{432})`
	})}.`,
	"dragSelectedKeyboardAlt": (args, formatter) => `\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C} Alt + Enter, \u{449}\u{43E}\u{431} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{43D}\u{443}\u{442}\u{438} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}`,
		other: () => `${formatter.number(args.count)} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{445} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{438}(-\u{456}\u{432})`
	})}.`,
	"dragSelectedLongPress": (args, formatter) => `\u{423}\u{442}\u{440}\u{438}\u{43C}\u{443}\u{439}\u{442}\u{435}, \u{449}\u{43E}\u{431} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{43D}\u{443}\u{442}\u{438} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}`,
		other: () => `${formatter.number(args.count)} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{445} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{438}(-\u{456}\u{432})`
	})}.`,
	"dragStartedKeyboard": `\u{41F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{443}\u{432}\u{430}\u{43D}\u{43D}\u{44F} \u{43F}\u{43E}\u{447}\u{430}\u{43B}\u{43E}\u{441}\u{44F}. \u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C} Tab, \u{449}\u{43E}\u{431} \u{43F}\u{435}\u{440}\u{435}\u{439}\u{442}\u{438} \u{434}\u{43E} \u{446}\u{456}\u{43B}\u{456} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{443}\u{432}\u{430}\u{43D}\u{43D}\u{44F}, \u{43F}\u{43E}\u{442}\u{456}\u{43C} \u{43D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C} Enter, \u{449}\u{43E}\u{431} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{43D}\u{443}\u{442}\u{438}, \u{430}\u{431}\u{43E} Escape, \u{449}\u{43E}\u{431} \u{441}\u{43A}\u{430}\u{441}\u{443}\u{432}\u{430}\u{442}\u{438}.`,
	"dragStartedTouch": `\u{41F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{443}\u{432}\u{430}\u{43D}\u{43D}\u{44F} \u{43F}\u{43E}\u{447}\u{430}\u{43B}\u{43E}\u{441}\u{44F}. \u{41F}\u{435}\u{440}\u{435}\u{439}\u{434}\u{456}\u{442}\u{44C} \u{434}\u{43E} \u{446}\u{456}\u{43B}\u{456} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{443}\u{432}\u{430}\u{43D}\u{43D}\u{44F}, \u{43F}\u{43E}\u{442}\u{456}\u{43C} \u{43D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C} \u{434}\u{432}\u{456}\u{447}\u{456}, \u{449}\u{43E}\u{431} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{43D}\u{443}\u{442}\u{438}.`,
	"dragStartedVirtual": `\u{41F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{443}\u{432}\u{430}\u{43D}\u{43D}\u{44F} \u{43F}\u{43E}\u{447}\u{430}\u{43B}\u{43E}\u{441}\u{44F}. \u{41F}\u{435}\u{440}\u{435}\u{439}\u{434}\u{456}\u{442}\u{44C} \u{434}\u{43E} \u{446}\u{456}\u{43B}\u{456} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{443}\u{432}\u{430}\u{43D}\u{43D}\u{44F}, \u{43F}\u{43E}\u{442}\u{456}\u{43C} \u{43D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C} Enter, \u{449}\u{43E}\u{431} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{43D}\u{443}\u{442}\u{438}.`,
	"dropCanceled": `\u{41F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{443}\u{432}\u{430}\u{43D}\u{43D}\u{44F} \u{441}\u{43A}\u{430}\u{441}\u{43E}\u{432}\u{430}\u{43D}\u{43E}.`,
	"dropComplete": `\u{41F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{443}\u{432}\u{430}\u{43D}\u{43D}\u{44F} \u{437}\u{430}\u{432}\u{435}\u{440}\u{448}\u{435}\u{43D}\u{43E}.`,
	"dropDescriptionKeyboard": `\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C} Enter, \u{449}\u{43E}\u{431} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{43D}\u{443}\u{442}\u{438}. \u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C} Escape, \u{449}\u{43E}\u{431} \u{441}\u{43A}\u{430}\u{441}\u{443}\u{432}\u{430}\u{442}\u{438} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{443}\u{432}\u{430}\u{43D}\u{43D}\u{44F}.`,
	"dropDescriptionTouch": `\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C} \u{434}\u{432}\u{456}\u{447}\u{456}, \u{449}\u{43E}\u{431} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{43D}\u{443}\u{442}\u{438}.`,
	"dropDescriptionVirtual": `\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C}, \u{449}\u{43E}\u{431} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{43D}\u{443}\u{442}\u{438}.`,
	"dropIndicator": `\u{456}\u{43D}\u{434}\u{438}\u{43A}\u{430}\u{442}\u{43E}\u{440} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{443}\u{432}\u{430}\u{43D}\u{43D}\u{44F}`,
	"dropOnItem": (args) => `\u{41F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{43D}\u{443}\u{442}\u{438} \u{43D}\u{430} ${args.itemText}`,
	"dropOnRoot": `\u{41F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{43D}\u{443}\u{442}\u{438} \u{43D}\u{430}`,
	"endDragKeyboard": `\u{422}\u{440}\u{438}\u{432}\u{430}\u{454} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{443}\u{432}\u{430}\u{43D}\u{43D}\u{44F}. \u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C} Enter, \u{449}\u{43E}\u{431} \u{441}\u{43A}\u{430}\u{441}\u{443}\u{432}\u{430}\u{442}\u{438} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{443}\u{432}\u{430}\u{43D}\u{43D}\u{44F}.`,
	"endDragTouch": `\u{422}\u{440}\u{438}\u{432}\u{430}\u{454} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{443}\u{432}\u{430}\u{43D}\u{43D}\u{44F}. \u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C} \u{434}\u{432}\u{456}\u{447}\u{456}, \u{449}\u{43E}\u{431} \u{441}\u{43A}\u{430}\u{441}\u{443}\u{432}\u{430}\u{442}\u{438} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{443}\u{432}\u{430}\u{43D}\u{43D}\u{44F}.`,
	"endDragVirtual": `\u{422}\u{440}\u{438}\u{432}\u{430}\u{454} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{443}\u{432}\u{430}\u{43D}\u{43D}\u{44F}. \u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C}, \u{449}\u{43E}\u{431} \u{441}\u{43A}\u{430}\u{441}\u{443}\u{432}\u{430}\u{442}\u{438} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{443}\u{432}\u{430}\u{43D}\u{43D}\u{44F}.`,
	"insertAfter": (args) => `\u{412}\u{441}\u{442}\u{430}\u{432}\u{438}\u{442}\u{438} \u{43F}\u{456}\u{441}\u{43B}\u{44F} ${args.itemText}`,
	"insertBefore": (args) => `\u{412}\u{441}\u{442}\u{430}\u{432}\u{438}\u{442}\u{438} \u{43F}\u{435}\u{440}\u{435}\u{434} ${args.itemText}`,
	"insertBetween": (args) => `\u{412}\u{441}\u{442}\u{430}\u{432}\u{438}\u{442}\u{438} \u{43C}\u{456}\u{436} ${args.beforeItemText} \u{456} ${args.afterItemText}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/zh-CN.mjs
var $d0f488d433b55b8a$exports = {};
$d0f488d433b55b8a$exports = {
	"dragDescriptionKeyboard": `\u{6309} Enter \u{5F00}\u{59CB}\u{62D6}\u{52A8}\u{3002}`,
	"dragDescriptionKeyboardAlt": `\u{6309} Alt + Enter \u{5F00}\u{59CB}\u{62D6}\u{52A8}\u{3002}`,
	"dragDescriptionLongPress": `\u{957F}\u{6309}\u{4EE5}\u{5F00}\u{59CB}\u{62D6}\u{52A8}\u{3002}`,
	"dragDescriptionTouch": `\u{53CC}\u{51FB}\u{5F00}\u{59CB}\u{62D6}\u{52A8}\u{3002}`,
	"dragDescriptionVirtual": `\u{5355}\u{51FB}\u{5F00}\u{59CB}\u{62D6}\u{52A8}\u{3002}`,
	"dragItem": (args) => `\u{62D6}\u{52A8} ${args.itemText}`,
	"dragSelectedItems": (args, formatter) => `\u{62D6}\u{52A8} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{9009}\u{4E2D}\u{9879}\u{76EE}`,
		other: () => `${formatter.number(args.count)} \u{9009}\u{4E2D}\u{9879}\u{76EE}`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `\u{6309} Enter \u{4EE5}\u{62D6}\u{52A8} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{4E2A}\u{9009}\u{5B9A}\u{9879}`,
		other: () => `${formatter.number(args.count)} \u{4E2A}\u{9009}\u{5B9A}\u{9879}`
	})}\u{3002}`,
	"dragSelectedKeyboardAlt": (args, formatter) => `\u{6309} Alt + Enter \u{4EE5}\u{62D6}\u{52A8} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{4E2A}\u{9009}\u{5B9A}\u{9879}`,
		other: () => `${formatter.number(args.count)} \u{4E2A}\u{9009}\u{5B9A}\u{9879}`
	})}\u{3002}`,
	"dragSelectedLongPress": (args, formatter) => `\u{957F}\u{6309}\u{4EE5}\u{62D6}\u{52A8} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{4E2A}\u{9009}\u{5B9A}\u{9879}`,
		other: () => `${formatter.number(args.count)} \u{4E2A}\u{9009}\u{5B9A}\u{9879}`
	})}\u{3002}`,
	"dragStartedKeyboard": `\u{5DF2}\u{5F00}\u{59CB}\u{62D6}\u{52A8}\u{3002}\u{6309} Tab \u{5BFC}\u{822A}\u{5230}\u{653E}\u{7F6E}\u{76EE}\u{6807}\u{FF0C}\u{7136}\u{540E}\u{6309} Enter \u{653E}\u{7F6E}\u{6216}\u{6309} Escape \u{53D6}\u{6D88}\u{3002}`,
	"dragStartedTouch": `\u{5DF2}\u{5F00}\u{59CB}\u{62D6}\u{52A8}\u{3002}\u{5BFC}\u{822A}\u{5230}\u{653E}\u{7F6E}\u{76EE}\u{6807}\u{FF0C}\u{7136}\u{540E}\u{53CC}\u{51FB}\u{653E}\u{7F6E}\u{3002}`,
	"dragStartedVirtual": `\u{5DF2}\u{5F00}\u{59CB}\u{62D6}\u{52A8}\u{3002}\u{5BFC}\u{822A}\u{5230}\u{653E}\u{7F6E}\u{76EE}\u{6807}\u{FF0C}\u{7136}\u{540E}\u{5355}\u{51FB}\u{6216}\u{6309} Enter \u{653E}\u{7F6E}\u{3002}`,
	"dropCanceled": `\u{653E}\u{7F6E}\u{5DF2}\u{53D6}\u{6D88}\u{3002}`,
	"dropComplete": `\u{653E}\u{7F6E}\u{5DF2}\u{5B8C}\u{6210}\u{3002}`,
	"dropDescriptionKeyboard": `\u{6309} Enter \u{653E}\u{7F6E}\u{3002}\u{6309} Escape \u{53D6}\u{6D88}\u{62D6}\u{52A8}\u{3002}`,
	"dropDescriptionTouch": `\u{53CC}\u{51FB}\u{653E}\u{7F6E}\u{3002}`,
	"dropDescriptionVirtual": `\u{5355}\u{51FB}\u{653E}\u{7F6E}\u{3002}`,
	"dropIndicator": `\u{653E}\u{7F6E}\u{6807}\u{8BB0}`,
	"dropOnItem": (args) => `\u{653E}\u{7F6E}\u{4E8E} ${args.itemText}`,
	"dropOnRoot": `\u{653E}\u{7F6E}\u{4E8E}`,
	"endDragKeyboard": `\u{6B63}\u{5728}\u{62D6}\u{52A8}\u{3002}\u{6309} Enter \u{53D6}\u{6D88}\u{62D6}\u{52A8}\u{3002}`,
	"endDragTouch": `\u{6B63}\u{5728}\u{62D6}\u{52A8}\u{3002}\u{53CC}\u{51FB}\u{53D6}\u{6D88}\u{62D6}\u{52A8}\u{3002}`,
	"endDragVirtual": `\u{6B63}\u{5728}\u{62D6}\u{52A8}\u{3002}\u{5355}\u{51FB}\u{53D6}\u{6D88}\u{62D6}\u{52A8}\u{3002}`,
	"insertAfter": (args) => `\u{63D2}\u{5165}\u{5230} ${args.itemText} \u{4E4B}\u{540E}`,
	"insertBefore": (args) => `\u{63D2}\u{5165}\u{5230} ${args.itemText} \u{4E4B}\u{524D}`,
	"insertBetween": (args) => `\u{63D2}\u{5165}\u{5230} ${args.beforeItemText} \u{548C} ${args.afterItemText} \u{4E4B}\u{95F4}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/zh-TW.mjs
var $46168b0dce85301e$exports = {};
$46168b0dce85301e$exports = {
	"dragDescriptionKeyboard": `\u{6309} Enter \u{9375}\u{4EE5}\u{958B}\u{59CB}\u{62D6}\u{66F3}\u{3002}`,
	"dragDescriptionKeyboardAlt": `\u{6309} Alt+Enter \u{9375}\u{4EE5}\u{958B}\u{59CB}\u{62D6}\u{66F3}\u{3002}`,
	"dragDescriptionLongPress": `\u{9577}\u{6309}\u{4EE5}\u{958B}\u{59CB}\u{62D6}\u{66F3}\u{3002}`,
	"dragDescriptionTouch": `\u{8F15}\u{9EDE}\u{5169}\u{4E0B}\u{4EE5}\u{958B}\u{59CB}\u{62D6}\u{66F3}\u{3002}`,
	"dragDescriptionVirtual": `\u{6309}\u{4E00}\u{4E0B}\u{6ED1}\u{9F20}\u{4EE5}\u{958B}\u{59CB}\u{62D6}\u{66F3}\u{3002}`,
	"dragItem": (args) => `\u{62D6}\u{66F3}\u{300C}${args.itemText}\u{300D}`,
	"dragSelectedItems": (args, formatter) => `\u{62D6}\u{66F3} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{500B}\u{9078}\u{5B9A}\u{9805}\u{76EE}`,
		other: () => `${formatter.number(args.count)} \u{500B}\u{9078}\u{5B9A}\u{9805}\u{76EE}`
	})}`,
	"dragSelectedKeyboard": (args, formatter) => `\u{6309} Enter \u{9375}\u{4EE5}\u{62D6}\u{66F3} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{500B}\u{9078}\u{5B9A}\u{9805}\u{76EE}`,
		other: () => `${formatter.number(args.count)} \u{500B}\u{9078}\u{5B9A}\u{9805}\u{76EE}`
	})}\u{3002}`,
	"dragSelectedKeyboardAlt": (args, formatter) => `\u{6309} Alt+Enter \u{9375}\u{4EE5}\u{62D6}\u{66F3} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{500B}\u{9078}\u{5B9A}\u{9805}\u{76EE}`,
		other: () => `${formatter.number(args.count)} \u{500B}\u{9078}\u{5B9A}\u{9805}\u{76EE}`
	})}\u{3002}`,
	"dragSelectedLongPress": (args, formatter) => `\u{9577}\u{6309}\u{4EE5}\u{62D6}\u{66F3} ${formatter.plural(args.count, {
		one: () => `${formatter.number(args.count)} \u{500B}\u{9078}\u{5B9A}\u{9805}\u{76EE}`,
		other: () => `${formatter.number(args.count)} \u{500B}\u{9078}\u{5B9A}\u{9805}\u{76EE}`
	})}\u{3002}`,
	"dragStartedKeyboard": `\u{5DF2}\u{958B}\u{59CB}\u{62D6}\u{66F3}\u{3002}\u{6309} Tab \u{9375}\u{4EE5}\u{700F}\u{89BD}\u{81F3}\u{653E}\u{7F6E}\u{76EE}\u{6A19}\u{FF0C}\u{7136}\u{5F8C}\u{6309} Enter \u{9375}\u{4EE5}\u{653E}\u{7F6E}\u{FF0C}\u{6216}\u{6309} Escape \u{9375}\u{4EE5}\u{53D6}\u{6D88}\u{3002}`,
	"dragStartedTouch": `\u{5DF2}\u{958B}\u{59CB}\u{62D6}\u{66F3}\u{3002}\u{700F}\u{89BD}\u{81F3}\u{653E}\u{7F6E}\u{76EE}\u{6A19}\u{FF0C}\u{7136}\u{5F8C}\u{8F15}\u{9EDE}\u{5169}\u{4E0B}\u{4EE5}\u{653E}\u{7F6E}\u{3002}`,
	"dragStartedVirtual": `\u{5DF2}\u{958B}\u{59CB}\u{62D6}\u{66F3}\u{3002}\u{700F}\u{89BD}\u{81F3}\u{653E}\u{7F6E}\u{76EE}\u{6A19}\u{FF0C}\u{7136}\u{5F8C}\u{6309}\u{4E00}\u{4E0B}\u{6ED1}\u{9F20}\u{6216}\u{6309} Enter \u{9375}\u{4EE5}\u{653E}\u{7F6E}\u{3002}`,
	"dropCanceled": `\u{653E}\u{7F6E}\u{5DF2}\u{53D6}\u{6D88}\u{3002}`,
	"dropComplete": `\u{653E}\u{7F6E}\u{5DF2}\u{5B8C}\u{6210}\u{3002}`,
	"dropDescriptionKeyboard": `\u{6309} Enter \u{9375}\u{4EE5}\u{653E}\u{7F6E}\u{3002}\u{6309} Escape \u{9375}\u{4EE5}\u{53D6}\u{6D88}\u{62D6}\u{66F3}\u{3002}`,
	"dropDescriptionTouch": `\u{8F15}\u{9EDE}\u{5169}\u{4E0B}\u{4EE5}\u{653E}\u{7F6E}\u{3002}`,
	"dropDescriptionVirtual": `\u{6309}\u{4E00}\u{4E0B}\u{6ED1}\u{9F20}\u{4EE5}\u{653E}\u{7F6E}\u{3002}`,
	"dropIndicator": `\u{653E}\u{7F6E}\u{6307}\u{793A}\u{5668}`,
	"dropOnItem": (args) => `\u{653E}\u{7F6E}\u{5728}\u{300C}${args.itemText}\u{300D}\u{4E0A}`,
	"dropOnRoot": `\u{653E}\u{7F6E}\u{5728}`,
	"endDragKeyboard": `\u{62D6}\u{66F3}\u{4E2D}\u{3002}\u{6309} Enter \u{9375}\u{4EE5}\u{53D6}\u{6D88}\u{62D6}\u{66F3}\u{3002}`,
	"endDragTouch": `\u{62D6}\u{66F3}\u{4E2D}\u{3002}\u{8F15}\u{9EDE}\u{5169}\u{4E0B}\u{4EE5}\u{53D6}\u{6D88}\u{62D6}\u{66F3}\u{3002}`,
	"endDragVirtual": `\u{62D6}\u{66F3}\u{4E2D}\u{3002}\u{6309}\u{4E00}\u{4E0B}\u{6ED1}\u{9F20}\u{4EE5}\u{53D6}\u{6D88}\u{62D6}\u{66F3}\u{3002}`,
	"insertAfter": (args) => `\u{63D2}\u{5165}\u{81F3}\u{300C}${args.itemText}\u{300D}\u{4E4B}\u{5F8C}`,
	"insertBefore": (args) => `\u{63D2}\u{5165}\u{81F3}\u{300C}${args.itemText}\u{300D}\u{4E4B}\u{524D}`,
	"insertBetween": (args) => `\u{63D2}\u{5165}\u{81F3}\u{300C}${args.beforeItemText}\u{300D}\u{548C}\u{300C}${args.afterItemText}\u{300D}\u{4E4B}\u{9593}`
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/intlStrings.mjs
var $865c2eb7c00a83f1$exports = {};
$865c2eb7c00a83f1$exports = {
	"ar-AE": $7dfcac1a0c98c789$exports,
	"bg-BG": $f311c26671219eca$exports,
	"cs-CZ": $1aa4ade186550f72$exports,
	"da-DK": $b6b0ea1b94a7633c$exports,
	"de-DE": $d10e4f47c744ad52$exports,
	"el-GR": $b3d2bb9abce688ab$exports,
	"en-US": $f9b46437e610cca1$exports,
	"es-ES": $204b5c01bd3acf26$exports,
	"et-EE": $110bdd83348ecbc0$exports,
	"fi-FI": $87d3ccd5e347c7cc$exports,
	"fr-FR": $a5de891427686596$exports,
	"he-IL": $ad7f4c66d85b4494$exports,
	"hr-HR": $4aa59f3c6a796cae$exports,
	"hu-HU": $d8d3646556c40586$exports,
	"it-IT": $982d558b45395246$exports,
	"ja-JP": $6a0cf387b9de036c$exports,
	"ko-KR": $a97fefa2956f4bcb$exports,
	"lt-LT": $5fb5837f94e1c150$exports,
	"lv-LV": $5b2e5709864cc922$exports,
	"nb-NO": $ee15bb8efb18cc69$exports,
	"nl-NL": $1daf2d4602e26ac4$exports,
	"pl-PL": $7115429b0f60511f$exports,
	"pt-BR": $5edd453ae5d4a8bc$exports,
	"pt-PT": $5f431994f708535e$exports,
	"ro-RO": $107b5e2e45e971f1$exports,
	"ru-RU": $d4b9c2f01c1892f7$exports,
	"sk-SK": $dbdc1942894e83e4$exports,
	"sl-SI": $fbaaaaebd547d998$exports,
	"sr-SP": $a0caa33f1e264489$exports,
	"sv-SE": $d576b66176f5c0ff$exports,
	"tr-TR": $0681f168c13d8f2a$exports,
	"uk-UA": $2bfbc1f42c1cf5a7$exports,
	"zh-CN": $d0f488d433b55b8a$exports,
	"zh-TW": $46168b0dce85301e$exports
};
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/useDrag.mjs
function $parcel$interopDefault$1(a) {
	return a && a.__esModule ? a.default : a;
}
var $8253ed7ece74b463$var$MESSAGES = {
	keyboard: {
		start: "dragDescriptionKeyboard",
		end: "endDragKeyboard"
	},
	touch: {
		start: "dragDescriptionTouch",
		end: "endDragTouch"
	},
	virtual: {
		start: "dragDescriptionVirtual",
		end: "endDragVirtual"
	}
};
function $8253ed7ece74b463$export$7941f8aafa4b6021(options) {
	let { hasDragButton, isDisabled } = options;
	let stringFormatter = $fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault$1($865c2eb7c00a83f1$exports), "@react-aria/dnd");
	let state = (0, import_react.useRef)({
		options,
		x: 0,
		y: 0
	}).current;
	state.options = options;
	let isDraggingRef = (0, import_react.useRef)(null);
	let [isDragging, setDraggingState] = (0, import_react.useState)(false);
	let setDragging = (element) => {
		isDraggingRef.current = element;
		setDraggingState(!!element);
	};
	let { addGlobalListener, removeAllGlobalListeners } = $03deb23ff14920c4$export$4eaf04e54aa8eed6();
	let modalityOnPointerDown = (0, import_react.useRef)(null);
	let onDragStart = (e) => {
		var _e_dataTransfer_clearData, _e_dataTransfer, _options_preview;
		if (e.defaultPrevented) return;
		e.stopPropagation();
		if (modalityOnPointerDown.current === "virtual") {
			e.preventDefault();
			startDragging($d4ee10de306f2510$export$e58f029f0fbfdb29(e));
			modalityOnPointerDown.current = null;
			return;
		}
		if (typeof options.onDragStart === "function") options.onDragStart({
			type: "dragstart",
			x: e.clientX,
			y: e.clientY
		});
		let items = options.getItems();
		(_e_dataTransfer_clearData = (_e_dataTransfer = e.dataTransfer).clearData) === null || _e_dataTransfer_clearData === void 0 || _e_dataTransfer_clearData.call(_e_dataTransfer);
		$7252cd45fc48c07c$export$f9c1490890ddd063(e.dataTransfer, items);
		let allowed = $103790afe9474d1c$export$60b7b4bcf3903d8e.all;
		if (typeof options.getAllowedDropOperations === "function") {
			let allowedOperations = options.getAllowedDropOperations();
			allowed = $103790afe9474d1c$export$60b7b4bcf3903d8e.none;
			for (let operation of allowedOperations) allowed |= $103790afe9474d1c$export$60b7b4bcf3903d8e[operation] || $103790afe9474d1c$export$60b7b4bcf3903d8e.none;
		}
		$7252cd45fc48c07c$export$6539bc8c3a0a2d67(allowed);
		let effectAllowed = $103790afe9474d1c$export$dd0165308d8bff45[allowed] || "none";
		e.dataTransfer.effectAllowed = effectAllowed === "cancel" ? "none" : effectAllowed;
		if (typeof ((_options_preview = options.preview) === null || _options_preview === void 0 ? void 0 : _options_preview.current) === "function") options.preview.current(items, (node, userX, userY) => {
			if (!node) return;
			let size = node.getBoundingClientRect();
			let rect = e.currentTarget.getBoundingClientRect();
			let defaultX = e.clientX - rect.x;
			let defaultY = e.clientY - rect.y;
			if (defaultX > size.width || defaultY > size.height) {
				defaultX = size.width / 2;
				defaultY = size.height / 2;
			}
			let offsetX = defaultX;
			let offsetY = defaultY;
			if (typeof userX === "number" && typeof userY === "number") {
				offsetX = userX;
				offsetY = userY;
			}
			offsetX = Math.max(0, Math.min(offsetX, size.width));
			offsetY = Math.max(0, Math.min(offsetY, size.height));
			let height = 2 * Math.round(size.height / 2);
			node.style.height = `${height}px`;
			e.dataTransfer.setDragImage(node, offsetX, offsetY);
		});
		addGlobalListener(window, "drop", (e) => {
			e.preventDefault();
			e.stopPropagation();
			console.warn("Drags initiated from the React Aria useDrag hook may only be dropped on a target created with useDrop. This ensures that a keyboard and screen reader accessible alternative is available.");
		}, { once: true });
		state.x = e.clientX;
		state.y = e.clientY;
		let target = $d4ee10de306f2510$export$e58f029f0fbfdb29(e);
		requestAnimationFrame(() => {
			setDragging(target);
		});
	};
	let onDrag = (e) => {
		e.stopPropagation();
		if (e.clientX === state.x && e.clientY === state.y) return;
		if (typeof options.onDragMove === "function") options.onDragMove({
			type: "dragmove",
			x: e.clientX,
			y: e.clientY
		});
		state.x = e.clientX;
		state.y = e.clientY;
	};
	let onDragEnd = (e) => {
		e.stopPropagation();
		if (typeof options.onDragEnd === "function") {
			let event = {
				type: "dragend",
				x: e.clientX,
				y: e.clientY,
				dropOperation: $103790afe9474d1c$export$608ecc6f1b23c35d[e.dataTransfer.dropEffect]
			};
			if ($7252cd45fc48c07c$export$8e6636520ac15722) event.dropOperation = $103790afe9474d1c$export$608ecc6f1b23c35d[$7252cd45fc48c07c$export$8e6636520ac15722];
			options.onDragEnd(event);
		}
		setDragging(null);
		removeAllGlobalListeners();
		$7252cd45fc48c07c$export$6539bc8c3a0a2d67($103790afe9474d1c$export$60b7b4bcf3903d8e.none);
		$7252cd45fc48c07c$export$64f52ed7349ddb84(void 0);
	};
	(0, import_react.useEffect)(() => {
		return () => {
			if (isDraggingRef.current && (!isDraggingRef.current.isConnected || parseInt(import_react.version, 10) < 17)) {
				if (typeof state.options.onDragEnd === "function") {
					let event = {
						type: "dragend",
						x: 0,
						y: 0,
						dropOperation: $103790afe9474d1c$export$608ecc6f1b23c35d[$7252cd45fc48c07c$export$8e6636520ac15722 || "none"]
					};
					state.options.onDragEnd(event);
				}
				setDragging(null);
				$7252cd45fc48c07c$export$6539bc8c3a0a2d67($103790afe9474d1c$export$60b7b4bcf3903d8e.none);
				$7252cd45fc48c07c$export$64f52ed7349ddb84(void 0);
			}
		};
	}, [state]);
	let onPress = (e) => {
		if (e.pointerType !== "keyboard" && e.pointerType !== "virtual") return;
		startDragging(e.target);
	};
	let startDragging = (target) => {
		if (typeof state.options.onDragStart === "function") {
			let rect = target.getBoundingClientRect();
			state.options.onDragStart({
				type: "dragstart",
				x: rect.x + rect.width / 2,
				y: rect.y + rect.height / 2
			});
		}
		$67560de7c78cb232$export$549dbcf8649bf3b2({
			element: target,
			items: state.options.getItems(),
			allowedDropOperations: typeof state.options.getAllowedDropOperations === "function" ? state.options.getAllowedDropOperations() : [
				"move",
				"copy",
				"link"
			],
			onDragEnd(e) {
				setDragging(null);
				if (typeof state.options.onDragEnd === "function") state.options.onDragEnd(e);
			}
		}, stringFormatter);
		setDragging(target);
	};
	let modality = $7252cd45fc48c07c$export$49bac5d6d4b352ea();
	let message = !isDragging ? $8253ed7ece74b463$var$MESSAGES[modality].start : $8253ed7ece74b463$var$MESSAGES[modality].end;
	let descriptionProps = $ef06256079686ba0$export$f8aeda7b10753fa1(stringFormatter.format(message));
	let interactions = {};
	if (!hasDragButton) interactions = {
		...descriptionProps,
		onPointerDown(e) {
			modalityOnPointerDown.current = $6a7db85432448f7f$export$29bf1b5f2c56cf63(e.nativeEvent) ? "virtual" : e.pointerType;
			if (e.width < 1 && e.height < 1) modalityOnPointerDown.current = "virtual";
			else {
				let rect = e.currentTarget.getBoundingClientRect();
				let offsetX = e.clientX - rect.x;
				let offsetY = e.clientY - rect.y;
				let centerX = rect.width / 2;
				let centerY = rect.height / 2;
				if (Math.abs(offsetX - centerX) <= .5 && Math.abs(offsetY - centerY) <= .5) modalityOnPointerDown.current = "virtual";
				else modalityOnPointerDown.current = e.pointerType;
			}
		},
		onKeyDownCapture(e) {
			if ($d4ee10de306f2510$export$e58f029f0fbfdb29(e) === e.currentTarget && e.key === "Enter") {
				e.preventDefault();
				e.stopPropagation();
			}
		},
		onKeyUpCapture(e) {
			if ($d4ee10de306f2510$export$e58f029f0fbfdb29(e) === e.currentTarget && e.key === "Enter") {
				e.preventDefault();
				e.stopPropagation();
				startDragging($d4ee10de306f2510$export$e58f029f0fbfdb29(e));
			}
		},
		onClick(e) {
			if ($6a7db85432448f7f$export$60278871457622de(e.nativeEvent) || modalityOnPointerDown.current === "virtual") {
				e.preventDefault();
				e.stopPropagation();
				startDragging($d4ee10de306f2510$export$e58f029f0fbfdb29(e));
			}
		}
	};
	if (isDisabled) return {
		dragProps: { draggable: "false" },
		dragButtonProps: {},
		isDragging: false
	};
	return {
		dragProps: {
			...interactions,
			draggable: "true",
			onDragStart,
			onDrag,
			onDragEnd
		},
		dragButtonProps: {
			...descriptionProps,
			onPress
		},
		isDragging
	};
}
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/useVirtualDrop.mjs
function $parcel$interopDefault(a) {
	return a && a.__esModule ? a.default : a;
}
var $224594fe3e57ff1e$var$MESSAGES = {
	keyboard: "dropDescriptionKeyboard",
	touch: "dropDescriptionTouch",
	virtual: "dropDescriptionVirtual"
};
function $224594fe3e57ff1e$export$62447ad3d2ec7da6() {
	let stringFormatter = $fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault($865c2eb7c00a83f1$exports), "@react-aria/dnd");
	let modality = $7252cd45fc48c07c$export$49bac5d6d4b352ea();
	return { dropProps: {
		...$ef06256079686ba0$export$f8aeda7b10753fa1($67560de7c78cb232$export$418e185dd3f1b968() ? stringFormatter.format($224594fe3e57ff1e$var$MESSAGES[modality]) : ""),
		onClick: () => {}
	} };
}
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/useDrop.mjs
var $5c06e4929e123553$var$DROP_ACTIVATE_TIMEOUT = 800;
function $5c06e4929e123553$export$ccdee5eaf73cf661(options) {
	let { hasDropButton, isDisabled } = options;
	let [isDropTarget, setDropTarget] = (0, import_react.useState)(false);
	let state = (0, import_react.useRef)({
		x: 0,
		y: 0,
		dragOverElements: /* @__PURE__ */ new Set(),
		dropEffect: "none",
		allowedOperations: $103790afe9474d1c$export$60b7b4bcf3903d8e.all,
		dropActivateTimer: void 0
	}).current;
	let fireDropEnter = (e) => {
		setDropTarget(true);
		if (typeof options.onDropEnter === "function") {
			let rect = e.currentTarget.getBoundingClientRect();
			options.onDropEnter({
				type: "dropenter",
				x: e.clientX - rect.x,
				y: e.clientY - rect.y
			});
		}
	};
	let fireDropExit = (e) => {
		setDropTarget(false);
		if (typeof options.onDropExit === "function") {
			let rect = e.currentTarget.getBoundingClientRect();
			options.onDropExit({
				type: "dropexit",
				x: e.clientX - rect.x,
				y: e.clientY - rect.y
			});
		}
	};
	let onDragOver = (e) => {
		e.preventDefault();
		e.stopPropagation();
		let allowedOperations = $5c06e4929e123553$var$getAllowedOperations(e);
		if (e.clientX === state.x && e.clientY === state.y && allowedOperations === state.allowedOperations) {
			e.dataTransfer.dropEffect = state.dropEffect;
			return;
		}
		state.x = e.clientX;
		state.y = e.clientY;
		let prevDropEffect = state.dropEffect;
		if (allowedOperations !== state.allowedOperations) {
			let allowedOps = $5c06e4929e123553$var$allowedOperationsToArray(allowedOperations);
			let dropOperation = allowedOps[0];
			if (typeof options.getDropOperation === "function") {
				let types = new $7252cd45fc48c07c$export$7f04ce188c91447c(e.dataTransfer);
				dropOperation = $5c06e4929e123553$var$getDropOperation(allowedOperations, options.getDropOperation(types, allowedOps));
			}
			state.dropEffect = $103790afe9474d1c$export$5eacb0769d26d3b2[dropOperation] || "none";
		}
		if (typeof options.getDropOperationForPoint === "function") {
			let types = new $7252cd45fc48c07c$export$7f04ce188c91447c(e.dataTransfer);
			let rect = e.currentTarget.getBoundingClientRect();
			state.dropEffect = $103790afe9474d1c$export$5eacb0769d26d3b2[$5c06e4929e123553$var$getDropOperation(allowedOperations, options.getDropOperationForPoint(types, $5c06e4929e123553$var$allowedOperationsToArray(allowedOperations), state.x - rect.x, state.y - rect.y))] || "none";
		}
		state.allowedOperations = allowedOperations;
		e.dataTransfer.dropEffect = state.dropEffect;
		if (state.dropEffect === "none" && prevDropEffect !== "none") fireDropExit(e);
		else if (state.dropEffect !== "none" && prevDropEffect === "none") fireDropEnter(e);
		if (typeof options.onDropMove === "function" && state.dropEffect !== "none") {
			let rect = e.currentTarget.getBoundingClientRect();
			options.onDropMove({
				type: "dropmove",
				x: state.x - rect.x,
				y: state.y - rect.y
			});
		}
		clearTimeout(state.dropActivateTimer);
		if (options.onDropActivate && typeof options.onDropActivate === "function" && state.dropEffect !== "none") {
			let onDropActivateOptions = options.onDropActivate;
			let rect = e.currentTarget.getBoundingClientRect();
			state.dropActivateTimer = setTimeout(() => {
				onDropActivateOptions({
					type: "dropactivate",
					x: state.x - rect.x,
					y: state.y - rect.y
				});
			}, $5c06e4929e123553$var$DROP_ACTIVATE_TIMEOUT);
		}
	};
	let onDragEnter = (e) => {
		e.preventDefault();
		e.stopPropagation();
		state.dragOverElements.add($d4ee10de306f2510$export$e58f029f0fbfdb29(e));
		if (state.dragOverElements.size > 1) return;
		let allowedOperationsBits = $5c06e4929e123553$var$getAllowedOperations(e);
		let allowedOperations = $5c06e4929e123553$var$allowedOperationsToArray(allowedOperationsBits);
		let dropOperation = allowedOperations[0];
		if (typeof options.getDropOperation === "function") {
			let types = new $7252cd45fc48c07c$export$7f04ce188c91447c(e.dataTransfer);
			dropOperation = $5c06e4929e123553$var$getDropOperation(allowedOperationsBits, options.getDropOperation(types, allowedOperations));
		}
		if (typeof options.getDropOperationForPoint === "function") {
			let types = new $7252cd45fc48c07c$export$7f04ce188c91447c(e.dataTransfer);
			let rect = e.currentTarget.getBoundingClientRect();
			dropOperation = $5c06e4929e123553$var$getDropOperation(allowedOperationsBits, options.getDropOperationForPoint(types, allowedOperations, e.clientX - rect.x, e.clientY - rect.y));
		}
		state.x = e.clientX;
		state.y = e.clientY;
		state.allowedOperations = allowedOperationsBits;
		state.dropEffect = $103790afe9474d1c$export$5eacb0769d26d3b2[dropOperation] || "none";
		e.dataTransfer.dropEffect = state.dropEffect;
		if (dropOperation !== "cancel") fireDropEnter(e);
	};
	let onDragLeave = (e) => {
		e.preventDefault();
		e.stopPropagation();
		state.dragOverElements.delete($d4ee10de306f2510$export$e58f029f0fbfdb29(e));
		for (let element of state.dragOverElements) if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, element)) state.dragOverElements.delete(element);
		if (state.dragOverElements.size > 0) return;
		if (state.dropEffect !== "none") fireDropExit(e);
		clearTimeout(state.dropActivateTimer);
	};
	let onDrop = (e) => {
		e.preventDefault();
		e.stopPropagation();
		$7252cd45fc48c07c$export$64f52ed7349ddb84(state.dropEffect);
		if (typeof options.onDrop === "function") {
			let dropOperation = $103790afe9474d1c$export$608ecc6f1b23c35d[state.dropEffect];
			let items = $7252cd45fc48c07c$export$d9e760437831f8b3(e.dataTransfer);
			let rect = e.currentTarget.getBoundingClientRect();
			let event = {
				type: "drop",
				x: e.clientX - rect.x,
				y: e.clientY - rect.y,
				items,
				dropOperation
			};
			options.onDrop(event);
		}
		let dndStateSnapshot = { ...$7252cd45fc48c07c$export$6ca6700462636d0b };
		state.dragOverElements.clear();
		fireDropExit(e);
		clearTimeout(state.dropActivateTimer);
		if (dndStateSnapshot.draggingCollectionRef == null) $7252cd45fc48c07c$export$64f52ed7349ddb84(void 0);
		else $7252cd45fc48c07c$export$6c10d32b362bfa5f(dndStateSnapshot);
	};
	let onDropEnter = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
		if (typeof options.onDropEnter === "function") options.onDropEnter(e);
	});
	let onDropExit = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
		if (typeof options.onDropExit === "function") options.onDropExit(e);
	});
	let onDropActivate = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
		if (typeof options.onDropActivate === "function") options.onDropActivate(e);
	});
	let onKeyboardDrop = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
		if (typeof options.onDrop === "function") options.onDrop(e);
	});
	let getDropOperationKeyboard = $8ae05eaa5c114e9c$export$7f54fc3180508a52((types, allowedOperations) => {
		if (options.getDropOperation) return options.getDropOperation(types, allowedOperations);
		return allowedOperations[0];
	});
	let { ref } = options;
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		if (isDisabled || !ref.current) return;
		return $67560de7c78cb232$export$c28d9fb4a54e471a({
			element: ref.current,
			getDropOperation: getDropOperationKeyboard,
			onDropEnter(e) {
				setDropTarget(true);
				onDropEnter(e);
			},
			onDropExit(e) {
				setDropTarget(false);
				onDropExit(e);
			},
			onDrop: onKeyboardDrop,
			onDropActivate
		});
	}, [isDisabled, ref]);
	let { dropProps } = $224594fe3e57ff1e$export$62447ad3d2ec7da6();
	if (isDisabled) return {
		dropProps: {},
		dropButtonProps: { isDisabled: true },
		isDropTarget: false
	};
	return {
		dropProps: {
			...!hasDropButton && dropProps,
			onDragEnter,
			onDragOver,
			onDragLeave,
			onDrop
		},
		dropButtonProps: { ...hasDropButton && dropProps },
		isDropTarget
	};
}
function $5c06e4929e123553$var$getAllowedOperations(e) {
	let allowedOperations = $103790afe9474d1c$export$9bbdfc78cf083e16[e.dataTransfer.effectAllowed];
	if ($7252cd45fc48c07c$export$f0130eb70b6347b8) allowedOperations &= $7252cd45fc48c07c$export$f0130eb70b6347b8;
	let allowedModifiers = $103790afe9474d1c$export$60b7b4bcf3903d8e.none;
	if ($c87311424ea30a05$export$9ac100e40613ea10()) {
		if (e.altKey) allowedModifiers |= $103790afe9474d1c$export$60b7b4bcf3903d8e.copy;
		if (e.ctrlKey && !$c87311424ea30a05$export$7bef049ce92e4224()) allowedModifiers |= $103790afe9474d1c$export$60b7b4bcf3903d8e.link;
		if (e.metaKey) allowedModifiers |= $103790afe9474d1c$export$60b7b4bcf3903d8e.move;
	} else {
		if (e.altKey) allowedModifiers |= $103790afe9474d1c$export$60b7b4bcf3903d8e.link;
		if (e.shiftKey) allowedModifiers |= $103790afe9474d1c$export$60b7b4bcf3903d8e.move;
		if (e.ctrlKey) allowedModifiers |= $103790afe9474d1c$export$60b7b4bcf3903d8e.copy;
	}
	if (allowedModifiers) return allowedOperations & allowedModifiers;
	return allowedOperations;
}
function $5c06e4929e123553$var$allowedOperationsToArray(allowedOperationsBits) {
	let allowedOperations = [];
	if (allowedOperationsBits & $103790afe9474d1c$export$60b7b4bcf3903d8e.move) allowedOperations.push("move");
	if (allowedOperationsBits & $103790afe9474d1c$export$60b7b4bcf3903d8e.copy) allowedOperations.push("copy");
	if (allowedOperationsBits & $103790afe9474d1c$export$60b7b4bcf3903d8e.link) allowedOperations.push("link");
	return allowedOperations;
}
function $5c06e4929e123553$var$getDropOperation(allowedOperations, operation) {
	return allowedOperations & $103790afe9474d1c$export$60b7b4bcf3903d8e[operation] ? operation : "cancel";
}
//#endregion
//#region ../../node_modules/@react-aria/dnd/dist/DragPreview.mjs
var $ad0e3f3d9c50e4ba$export$905ab40ac2179daa = /* @__PURE__ */ import_react.forwardRef(function DragPreview(props, ref) {
	let render = props.children;
	let [children, setChildren] = (0, import_react.useState)(null);
	let domRef = (0, import_react.useRef)(null);
	let raf = (0, import_react.useRef)(void 0);
	(0, import_react.useImperativeHandle)(ref, () => (items, callback) => {
		let result = render(items);
		let element;
		let offsetX;
		let offsetY;
		if (result && typeof result === "object" && "element" in result) {
			element = result.element;
			offsetX = result.x;
			offsetY = result.y;
		} else element = result;
		(0, import_react_dom.flushSync)(() => {
			setChildren(element);
		});
		callback(domRef.current, offsetX, offsetY);
		raf.current = requestAnimationFrame(() => {
			setChildren(null);
		});
	}, [render]);
	(0, import_react.useEffect)(() => {
		return () => {
			if (raf.current) cancelAnimationFrame(raf.current);
		};
	}, []);
	if (!children) return null;
	return /* @__PURE__ */ import_react.createElement("div", {
		style: {
			zIndex: -100,
			position: "fixed",
			top: 0,
			left: -1e5
		},
		ref: domRef
	}, children);
});
//#endregion
//#region ../../node_modules/@react-aria/tooltip/dist/useTooltip.mjs
function $326e436e94273fe1$export$1c4b08e0eca38426(props, state) {
	let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, { labelable: true });
	let { hoverProps } = $6179b936705e76d3$export$ae780daf29e6d456({
		onHoverStart: () => state === null || state === void 0 ? void 0 : state.open(true),
		onHoverEnd: () => state === null || state === void 0 ? void 0 : state.close()
	});
	return { tooltipProps: $3ef42575df84b30b$export$9d1611c77c2fe928(domProps, hoverProps, { role: "tooltip" }) };
}
//#endregion
//#region ../../node_modules/@react-aria/tooltip/dist/useTooltipTrigger.mjs
function $4e1b34546679e357$export$a6da6c504e4bba8b(props, state, ref) {
	let { isDisabled, trigger, shouldCloseOnPress = true } = props;
	let tooltipId = $bdb11010cef70236$export$f680877a34711e37();
	let isHovered = (0, import_react.useRef)(false);
	let isFocused = (0, import_react.useRef)(false);
	let handleShow = () => {
		if (isHovered.current || isFocused.current) state.open(isFocused.current);
	};
	let handleHide = (immediate) => {
		if (!isHovered.current && !isFocused.current) state.close(immediate);
	};
	(0, import_react.useEffect)(() => {
		let onKeyDown = (e) => {
			if (ref && ref.current) {
				if (e.key === "Escape") {
					e.stopPropagation();
					state.close(true);
				}
			}
		};
		if (state.isOpen) {
			document.addEventListener("keydown", onKeyDown, true);
			return () => {
				document.removeEventListener("keydown", onKeyDown, true);
			};
		}
	}, [ref, state]);
	let onHoverStart = () => {
		if (trigger === "focus") return;
		if ($507fabe10e71c6fb$export$630ff653c5ada6a9() === "pointer") isHovered.current = true;
		else isHovered.current = false;
		handleShow();
	};
	let onHoverEnd = () => {
		if (trigger === "focus") return;
		isFocused.current = false;
		isHovered.current = false;
		handleHide();
	};
	let onPressStart = () => {
		if (!shouldCloseOnPress) return;
		isFocused.current = false;
		isHovered.current = false;
		handleHide(true);
	};
	let onFocus = () => {
		if ($507fabe10e71c6fb$export$b9b3dfddab17db27()) {
			isFocused.current = true;
			handleShow();
		}
	};
	let onBlur = () => {
		isFocused.current = false;
		isHovered.current = false;
		handleHide(true);
	};
	let { hoverProps } = $6179b936705e76d3$export$ae780daf29e6d456({
		isDisabled,
		onHoverStart,
		onHoverEnd
	});
	let { focusableProps } = $f645667febf57a63$export$4c014de7c8940b4c({
		isDisabled,
		onFocus,
		onBlur
	}, ref);
	return {
		triggerProps: {
			"aria-describedby": state.isOpen ? tooltipId : void 0,
			...$3ef42575df84b30b$export$9d1611c77c2fe928(focusableProps, hoverProps, {
				onPointerDown: onPressStart,
				onKeyDown: onPressStart
			}),
			tabIndex: void 0
		},
		tooltipProps: { id: tooltipId }
	};
}
//#endregion
//#region ../../node_modules/react-aria-components/dist/Label.mjs
var $01b77f81d0f07f68$export$75b6ee27786ba447 = /* @__PURE__ */ (0, import_react.createContext)({});
//#endregion
//#region ../../node_modules/react-aria-components/dist/ProgressBar.mjs
var $0393f8ab869a0f1a$export$e9f3bf65a26ce129 = /* @__PURE__ */ (0, import_react.createContext)(null);
//#endregion
//#region ../../node_modules/react-aria-components/dist/Button.mjs
var $d2b4bc8c273e7be6$export$24d547caef80ccd1 = /* @__PURE__ */ (0, import_react.createContext)({});
var $d2b4bc8c273e7be6$export$353f5b6fc5456de1 = /* @__PURE__ */ $f39a9eba43920ace$export$86427a43e3e48ebb(function Button(props, ref) {
	[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $d2b4bc8c273e7be6$export$24d547caef80ccd1);
	let ctx = props;
	let { isPending } = ctx;
	let { buttonProps, isPressed } = $701a24aa0da5b062$export$ea18c227d4417cc3(props, ref);
	buttonProps = $d2b4bc8c273e7be6$var$useDisableInteractions(buttonProps, isPending);
	let { focusProps, isFocused, isFocusVisible } = $f7dceffc5ad7768b$export$4e328f61c538687f(props);
	let { hoverProps, isHovered } = $6179b936705e76d3$export$ae780daf29e6d456({
		...props,
		isDisabled: props.isDisabled || isPending
	});
	let renderValues = {
		isHovered,
		isPressed: (ctx.isPressed || isPressed) && !isPending,
		isFocused,
		isFocusVisible,
		isDisabled: props.isDisabled || false,
		isPending: isPending !== null && isPending !== void 0 ? isPending : false
	};
	let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
		...props,
		values: renderValues,
		defaultClassName: "react-aria-Button"
	});
	let buttonId = $bdb11010cef70236$export$f680877a34711e37(buttonProps.id);
	let progressId = $bdb11010cef70236$export$f680877a34711e37();
	let ariaLabelledby = buttonProps["aria-labelledby"];
	if (isPending) {
		if (ariaLabelledby) ariaLabelledby = `${ariaLabelledby} ${progressId}`;
		else if (buttonProps["aria-label"]) ariaLabelledby = `${buttonId} ${progressId}`;
	}
	let wasPending = (0, import_react.useRef)(isPending);
	(0, import_react.useEffect)(() => {
		let message = { "aria-labelledby": ariaLabelledby || buttonId };
		if (!wasPending.current && isFocused && isPending) $319e236875307eab$export$a9b970dcc4ae71a9(message, "assertive");
		else if (wasPending.current && isFocused && !isPending) $319e236875307eab$export$a9b970dcc4ae71a9(message, "assertive");
		wasPending.current = isPending;
	}, [
		isPending,
		isFocused,
		ariaLabelledby,
		buttonId
	]);
	let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, { global: true });
	delete DOMProps.onClick;
	return /* @__PURE__ */ import_react.createElement($64fa3d84918910a7$export$df3a06d6289f983e.button, {
		...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, buttonProps, focusProps, hoverProps),
		type: buttonProps.type === "submit" && isPending ? "button" : buttonProps.type,
		id: buttonId,
		ref,
		"aria-labelledby": ariaLabelledby,
		slot: props.slot || void 0,
		"aria-disabled": isPending ? "true" : buttonProps["aria-disabled"],
		"data-disabled": props.isDisabled || void 0,
		"data-pressed": renderValues.isPressed || void 0,
		"data-hovered": isHovered || void 0,
		"data-focused": isFocused || void 0,
		"data-pending": isPending || void 0,
		"data-focus-visible": isFocusVisible || void 0
	}, /* @__PURE__ */ import_react.createElement($0393f8ab869a0f1a$export$e9f3bf65a26ce129.Provider, { value: { id: progressId } }, renderProps.children));
});
var $d2b4bc8c273e7be6$var$PRESERVED_EVENT_PATTERN = /Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;
function $d2b4bc8c273e7be6$var$useDisableInteractions(props, isPending) {
	if (isPending) {
		for (const key in props) if (key.startsWith("on") && !$d2b4bc8c273e7be6$var$PRESERVED_EVENT_PATTERN.test(key)) props[key] = void 0;
		props.href = void 0;
		props.target = void 0;
	}
	return props;
}
//#endregion
//#region ../../node_modules/react-aria-components/dist/Text.mjs
var $514c0188e459b4c0$export$9afb8bc826b033ea = /* @__PURE__ */ (0, import_react.createContext)({});
//#endregion
//#region ../../node_modules/@react-stately/list/dist/ListCollection.mjs
var $a02d57049d202695$export$d085fb9e920b5ca7 = class {
	*[Symbol.iterator]() {
		yield* this.iterable;
	}
	get size() {
		return this._size;
	}
	getKeys() {
		return this.keyMap.keys();
	}
	getKeyBefore(key) {
		let node = this.keyMap.get(key);
		var _node_prevKey;
		return node ? (_node_prevKey = node.prevKey) !== null && _node_prevKey !== void 0 ? _node_prevKey : null : null;
	}
	getKeyAfter(key) {
		let node = this.keyMap.get(key);
		var _node_nextKey;
		return node ? (_node_nextKey = node.nextKey) !== null && _node_nextKey !== void 0 ? _node_nextKey : null : null;
	}
	getFirstKey() {
		return this.firstKey;
	}
	getLastKey() {
		return this.lastKey;
	}
	getItem(key) {
		var _this_keyMap_get;
		return (_this_keyMap_get = this.keyMap.get(key)) !== null && _this_keyMap_get !== void 0 ? _this_keyMap_get : null;
	}
	at(idx) {
		const keys = [...this.getKeys()];
		return this.getItem(keys[idx]);
	}
	getChildren(key) {
		let node = this.keyMap.get(key);
		return (node === null || node === void 0 ? void 0 : node.childNodes) || [];
	}
	constructor(nodes) {
		this.keyMap = /* @__PURE__ */ new Map();
		this.firstKey = null;
		this.lastKey = null;
		this.iterable = nodes;
		let visit = (node) => {
			this.keyMap.set(node.key, node);
			if (node.childNodes && node.type === "section") for (let child of node.childNodes) visit(child);
		};
		for (let node of nodes) visit(node);
		let last = null;
		let index = 0;
		let size = 0;
		for (let [key, node] of this.keyMap) {
			if (last) {
				last.nextKey = key;
				node.prevKey = last.key;
			} else {
				this.firstKey = key;
				node.prevKey = void 0;
			}
			if (node.type === "item") node.index = index++;
			if (node.type === "section" || node.type === "item") size++;
			last = node;
			last.nextKey = void 0;
		}
		this._size = size;
		var _last_key;
		this.lastKey = (_last_key = last === null || last === void 0 ? void 0 : last.key) !== null && _last_key !== void 0 ? _last_key : null;
	}
};
//#endregion
//#region ../../node_modules/@react-stately/selection/dist/Selection.mjs
var $e40ea825a81a3709$export$52baac22726c72bf = class $e40ea825a81a3709$export$52baac22726c72bf extends Set {
	constructor(keys, anchorKey, currentKey) {
		super(keys);
		if (keys instanceof $e40ea825a81a3709$export$52baac22726c72bf) {
			this.anchorKey = anchorKey !== null && anchorKey !== void 0 ? anchorKey : keys.anchorKey;
			this.currentKey = currentKey !== null && currentKey !== void 0 ? currentKey : keys.currentKey;
		} else {
			this.anchorKey = anchorKey !== null && anchorKey !== void 0 ? anchorKey : null;
			this.currentKey = currentKey !== null && currentKey !== void 0 ? currentKey : null;
		}
	}
};
//#endregion
//#region ../../node_modules/@react-stately/selection/dist/useMultipleSelectionState.mjs
function $7af3f5b51489e0b5$var$equalSets(setA, setB) {
	if (setA.size !== setB.size) return false;
	for (let item of setA) if (!setB.has(item)) return false;
	return true;
}
function $7af3f5b51489e0b5$export$253fe78d46329472(props) {
	let { selectionMode = "none", disallowEmptySelection = false, allowDuplicateSelectionEvents, selectionBehavior: selectionBehaviorProp = "toggle", disabledBehavior = "all" } = props;
	let isFocusedRef = (0, import_react.useRef)(false);
	let [, setFocused] = (0, import_react.useState)(false);
	let focusedKeyRef = (0, import_react.useRef)(null);
	let childFocusStrategyRef = (0, import_react.useRef)(null);
	let [, setFocusedKey] = (0, import_react.useState)(null);
	let [selectedKeys, setSelectedKeys] = $458b0a5536c1a7cf$export$40bfa8c7b0832715((0, import_react.useMemo)(() => $7af3f5b51489e0b5$var$convertSelection(props.selectedKeys), [props.selectedKeys]), (0, import_react.useMemo)(() => $7af3f5b51489e0b5$var$convertSelection(props.defaultSelectedKeys, new $e40ea825a81a3709$export$52baac22726c72bf()), [props.defaultSelectedKeys]), props.onSelectionChange);
	let disabledKeysProp = (0, import_react.useMemo)(() => props.disabledKeys ? new Set(props.disabledKeys) : /* @__PURE__ */ new Set(), [props.disabledKeys]);
	let [selectionBehavior, setSelectionBehavior] = (0, import_react.useState)(selectionBehaviorProp);
	if (selectionBehaviorProp === "replace" && selectionBehavior === "toggle" && typeof selectedKeys === "object" && selectedKeys.size === 0) setSelectionBehavior("replace");
	let lastSelectionBehavior = (0, import_react.useRef)(selectionBehaviorProp);
	(0, import_react.useEffect)(() => {
		if (selectionBehaviorProp !== lastSelectionBehavior.current) {
			setSelectionBehavior(selectionBehaviorProp);
			lastSelectionBehavior.current = selectionBehaviorProp;
		}
	}, [selectionBehaviorProp]);
	return {
		selectionMode,
		disallowEmptySelection,
		selectionBehavior,
		setSelectionBehavior,
		get isFocused() {
			return isFocusedRef.current;
		},
		setFocused(f) {
			isFocusedRef.current = f;
			setFocused(f);
		},
		get focusedKey() {
			return focusedKeyRef.current;
		},
		get childFocusStrategy() {
			return childFocusStrategyRef.current;
		},
		setFocusedKey(k, childFocusStrategy = "first") {
			focusedKeyRef.current = k;
			childFocusStrategyRef.current = childFocusStrategy;
			setFocusedKey(k);
		},
		selectedKeys,
		setSelectedKeys(keys) {
			if (allowDuplicateSelectionEvents || !$7af3f5b51489e0b5$var$equalSets(keys, selectedKeys)) setSelectedKeys(keys);
		},
		disabledKeys: disabledKeysProp,
		disabledBehavior
	};
}
function $7af3f5b51489e0b5$var$convertSelection(selection, defaultValue) {
	if (!selection) return defaultValue;
	return selection === "all" ? "all" : new $e40ea825a81a3709$export$52baac22726c72bf(selection);
}
//#endregion
//#region ../../node_modules/@react-stately/selection/dist/SelectionManager.mjs
var $d496c0a20b6e58ec$export$6c8a5aaad13c9852 = class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
	/**
	* The type of selection that is allowed in the collection.
	*/ get selectionMode() {
		return this.state.selectionMode;
	}
	/**
	* Whether the collection allows empty selection.
	*/ get disallowEmptySelection() {
		return this.state.disallowEmptySelection;
	}
	/**
	* The selection behavior for the collection.
	*/ get selectionBehavior() {
		return this.state.selectionBehavior;
	}
	/**
	* Sets the selection behavior for the collection.
	*/ setSelectionBehavior(selectionBehavior) {
		this.state.setSelectionBehavior(selectionBehavior);
	}
	/**
	* Whether the collection is currently focused.
	*/ get isFocused() {
		return this.state.isFocused;
	}
	/**
	* Sets whether the collection is focused.
	*/ setFocused(isFocused) {
		this.state.setFocused(isFocused);
	}
	/**
	* The current focused key in the collection.
	*/ get focusedKey() {
		return this.state.focusedKey;
	}
	/** Whether the first or last child of the focused key should receive focus. */ get childFocusStrategy() {
		return this.state.childFocusStrategy;
	}
	/**
	* Sets the focused key.
	*/ setFocusedKey(key, childFocusStrategy) {
		if (key == null || this.collection.getItem(key)) this.state.setFocusedKey(key, childFocusStrategy);
	}
	/**
	* The currently selected keys in the collection.
	*/ get selectedKeys() {
		return this.state.selectedKeys === "all" ? new Set(this.getSelectAllKeys()) : this.state.selectedKeys;
	}
	/**
	* The raw selection value for the collection.
	* Either 'all' for select all, or a set of keys.
	*/ get rawSelection() {
		return this.state.selectedKeys;
	}
	/**
	* Returns whether a key is selected.
	*/ isSelected(key) {
		if (this.state.selectionMode === "none") return false;
		let mappedKey = this.getKey(key);
		if (mappedKey == null) return false;
		return this.state.selectedKeys === "all" ? this.canSelectItem(mappedKey) : this.state.selectedKeys.has(mappedKey);
	}
	/**
	* Whether the selection is empty.
	*/ get isEmpty() {
		return this.state.selectedKeys !== "all" && this.state.selectedKeys.size === 0;
	}
	/**
	* Whether all items in the collection are selected.
	*/ get isSelectAll() {
		if (this.isEmpty) return false;
		if (this.state.selectedKeys === "all") return true;
		if (this._isSelectAll != null) return this._isSelectAll;
		let allKeys = this.getSelectAllKeys();
		let selectedKeys = this.state.selectedKeys;
		this._isSelectAll = allKeys.every((k) => selectedKeys.has(k));
		return this._isSelectAll;
	}
	get firstSelectedKey() {
		let first = null;
		for (let key of this.state.selectedKeys) {
			let item = this.collection.getItem(key);
			if (!first || item && $c5a24bc478652b5f$export$8c434b3a7a4dad6(this.collection, item, first) < 0) first = item;
		}
		var _first_key;
		return (_first_key = first === null || first === void 0 ? void 0 : first.key) !== null && _first_key !== void 0 ? _first_key : null;
	}
	get lastSelectedKey() {
		let last = null;
		for (let key of this.state.selectedKeys) {
			let item = this.collection.getItem(key);
			if (!last || item && $c5a24bc478652b5f$export$8c434b3a7a4dad6(this.collection, item, last) > 0) last = item;
		}
		var _last_key;
		return (_last_key = last === null || last === void 0 ? void 0 : last.key) !== null && _last_key !== void 0 ? _last_key : null;
	}
	get disabledKeys() {
		return this.state.disabledKeys;
	}
	get disabledBehavior() {
		return this.state.disabledBehavior;
	}
	/**
	* Extends the selection to the given key.
	*/ extendSelection(toKey) {
		if (this.selectionMode === "none") return;
		if (this.selectionMode === "single") {
			this.replaceSelection(toKey);
			return;
		}
		let mappedToKey = this.getKey(toKey);
		if (mappedToKey == null) return;
		let selection;
		if (this.state.selectedKeys === "all") selection = new $e40ea825a81a3709$export$52baac22726c72bf([mappedToKey], mappedToKey, mappedToKey);
		else {
			let selectedKeys = this.state.selectedKeys;
			var _selectedKeys_anchorKey;
			let anchorKey = (_selectedKeys_anchorKey = selectedKeys.anchorKey) !== null && _selectedKeys_anchorKey !== void 0 ? _selectedKeys_anchorKey : mappedToKey;
			selection = new $e40ea825a81a3709$export$52baac22726c72bf(selectedKeys, anchorKey, mappedToKey);
			var _selectedKeys_currentKey;
			for (let key of this.getKeyRange(anchorKey, (_selectedKeys_currentKey = selectedKeys.currentKey) !== null && _selectedKeys_currentKey !== void 0 ? _selectedKeys_currentKey : mappedToKey)) selection.delete(key);
			for (let key of this.getKeyRange(mappedToKey, anchorKey)) if (this.canSelectItem(key)) selection.add(key);
		}
		this.state.setSelectedKeys(selection);
	}
	getKeyRange(from, to) {
		let fromItem = this.collection.getItem(from);
		let toItem = this.collection.getItem(to);
		if (fromItem && toItem) {
			if ($c5a24bc478652b5f$export$8c434b3a7a4dad6(this.collection, fromItem, toItem) <= 0) return this.getKeyRangeInternal(from, to);
			return this.getKeyRangeInternal(to, from);
		}
		return [];
	}
	getKeyRangeInternal(from, to) {
		var _this_layoutDelegate;
		if ((_this_layoutDelegate = this.layoutDelegate) === null || _this_layoutDelegate === void 0 ? void 0 : _this_layoutDelegate.getKeyRange) return this.layoutDelegate.getKeyRange(from, to);
		let keys = [];
		let key = from;
		while (key != null) {
			let item = this.collection.getItem(key);
			if (item && (item.type === "item" || item.type === "cell" && this.allowsCellSelection)) keys.push(key);
			if (key === to) return keys;
			key = this.collection.getKeyAfter(key);
		}
		return [];
	}
	getKey(key) {
		let item = this.collection.getItem(key);
		if (!item) return key;
		if (item.type === "cell" && this.allowsCellSelection) return key;
		while (item && item.type !== "item" && item.parentKey != null) item = this.collection.getItem(item.parentKey);
		if (!item || item.type !== "item") return null;
		return item.key;
	}
	/**
	* Toggles whether the given key is selected.
	*/ toggleSelection(key) {
		if (this.selectionMode === "none") return;
		if (this.selectionMode === "single" && !this.isSelected(key)) {
			this.replaceSelection(key);
			return;
		}
		let mappedKey = this.getKey(key);
		if (mappedKey == null) return;
		let keys = new $e40ea825a81a3709$export$52baac22726c72bf(this.state.selectedKeys === "all" ? this.getSelectAllKeys() : this.state.selectedKeys);
		if (keys.has(mappedKey)) keys.delete(mappedKey);
		else if (this.canSelectItem(mappedKey)) {
			keys.add(mappedKey);
			keys.anchorKey = mappedKey;
			keys.currentKey = mappedKey;
		}
		if (this.disallowEmptySelection && keys.size === 0) return;
		this.state.setSelectedKeys(keys);
	}
	/**
	* Replaces the selection with only the given key.
	*/ replaceSelection(key) {
		if (this.selectionMode === "none") return;
		let mappedKey = this.getKey(key);
		if (mappedKey == null) return;
		let selection = this.canSelectItem(mappedKey) ? new $e40ea825a81a3709$export$52baac22726c72bf([mappedKey], mappedKey, mappedKey) : new $e40ea825a81a3709$export$52baac22726c72bf();
		this.state.setSelectedKeys(selection);
	}
	/**
	* Replaces the selection with the given keys.
	*/ setSelectedKeys(keys) {
		if (this.selectionMode === "none") return;
		let selection = new $e40ea825a81a3709$export$52baac22726c72bf();
		for (let key of keys) {
			let mappedKey = this.getKey(key);
			if (mappedKey != null) {
				selection.add(mappedKey);
				if (this.selectionMode === "single") break;
			}
		}
		this.state.setSelectedKeys(selection);
	}
	getSelectAllKeys() {
		let keys = [];
		let addKeys = (key) => {
			while (key != null) {
				if (this.canSelectItem(key)) {
					var _getFirstItem;
					let item = this.collection.getItem(key);
					if ((item === null || item === void 0 ? void 0 : item.type) === "item") keys.push(key);
					var _getFirstItem_key;
					if ((item === null || item === void 0 ? void 0 : item.hasChildNodes) && (this.allowsCellSelection || item.type !== "item")) addKeys((_getFirstItem_key = (_getFirstItem = $c5a24bc478652b5f$export$fbdeaa6a76694f71($c5a24bc478652b5f$export$1005530eda016c13(item, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key) !== null && _getFirstItem_key !== void 0 ? _getFirstItem_key : null);
				}
				key = this.collection.getKeyAfter(key);
			}
		};
		addKeys(this.collection.getFirstKey());
		return keys;
	}
	/**
	* Selects all items in the collection.
	*/ selectAll() {
		if (!this.isSelectAll && this.selectionMode === "multiple") this.state.setSelectedKeys("all");
	}
	/**
	* Removes all keys from the selection.
	*/ clearSelection() {
		if (!this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0)) this.state.setSelectedKeys(new $e40ea825a81a3709$export$52baac22726c72bf());
	}
	/**
	* Toggles between select all and an empty selection.
	*/ toggleSelectAll() {
		if (this.isSelectAll) this.clearSelection();
		else this.selectAll();
	}
	select(key, e) {
		if (this.selectionMode === "none") return;
		if (this.selectionMode === "single") if (this.isSelected(key) && !this.disallowEmptySelection) this.toggleSelection(key);
		else this.replaceSelection(key);
		else if (this.selectionBehavior === "toggle" || e && (e.pointerType === "touch" || e.pointerType === "virtual")) this.toggleSelection(key);
		else this.replaceSelection(key);
	}
	/**
	* Returns whether the current selection is equal to the given selection.
	*/ isSelectionEqual(selection) {
		if (selection === this.state.selectedKeys) return true;
		let selectedKeys = this.selectedKeys;
		if (selection.size !== selectedKeys.size) return false;
		for (let key of selection) if (!selectedKeys.has(key)) return false;
		for (let key of selectedKeys) if (!selection.has(key)) return false;
		return true;
	}
	canSelectItem(key) {
		var _item_props;
		if (this.state.selectionMode === "none" || this.state.disabledKeys.has(key)) return false;
		let item = this.collection.getItem(key);
		if (!item || (item === null || item === void 0 ? void 0 : (_item_props = item.props) === null || _item_props === void 0 ? void 0 : _item_props.isDisabled) || item.type === "cell" && !this.allowsCellSelection) return false;
		return true;
	}
	isDisabled(key) {
		var _this_collection_getItem_props, _this_collection_getItem;
		return this.state.disabledBehavior === "all" && (this.state.disabledKeys.has(key) || !!((_this_collection_getItem = this.collection.getItem(key)) === null || _this_collection_getItem === void 0 ? void 0 : (_this_collection_getItem_props = _this_collection_getItem.props) === null || _this_collection_getItem_props === void 0 ? void 0 : _this_collection_getItem_props.isDisabled));
	}
	isLink(key) {
		var _this_collection_getItem_props, _this_collection_getItem;
		return !!((_this_collection_getItem = this.collection.getItem(key)) === null || _this_collection_getItem === void 0 ? void 0 : (_this_collection_getItem_props = _this_collection_getItem.props) === null || _this_collection_getItem_props === void 0 ? void 0 : _this_collection_getItem_props.href);
	}
	getItemProps(key) {
		var _this_collection_getItem;
		return (_this_collection_getItem = this.collection.getItem(key)) === null || _this_collection_getItem === void 0 ? void 0 : _this_collection_getItem.props;
	}
	withCollection(collection) {
		return new $d496c0a20b6e58ec$export$6c8a5aaad13c9852(collection, this.state, {
			allowsCellSelection: this.allowsCellSelection,
			layoutDelegate: this.layoutDelegate || void 0
		});
	}
	constructor(collection, state, options) {
		this.collection = collection;
		this.state = state;
		var _options_allowsCellSelection;
		this.allowsCellSelection = (_options_allowsCellSelection = options === null || options === void 0 ? void 0 : options.allowsCellSelection) !== null && _options_allowsCellSelection !== void 0 ? _options_allowsCellSelection : false;
		this._isSelectAll = null;
		this.layoutDelegate = (options === null || options === void 0 ? void 0 : options.layoutDelegate) || null;
	}
};
//#endregion
//#region ../../node_modules/@react-stately/list/dist/useListState.mjs
function $e72dd72e1c76a225$export$2f645645f7bca764(props) {
	let { filter, layoutDelegate } = props;
	let selectionState = $7af3f5b51489e0b5$export$253fe78d46329472(props);
	let disabledKeys = (0, import_react.useMemo)(() => props.disabledKeys ? new Set(props.disabledKeys) : /* @__PURE__ */ new Set(), [props.disabledKeys]);
	let collection = $7613b1592d41b092$export$6cd28814d92fa9c9(props, (0, import_react.useCallback)((nodes) => filter ? new $a02d57049d202695$export$d085fb9e920b5ca7(filter(nodes)) : new $a02d57049d202695$export$d085fb9e920b5ca7(nodes), [filter]), (0, import_react.useMemo)(() => ({ suppressTextValueWarning: props.suppressTextValueWarning }), [props.suppressTextValueWarning]));
	let selectionManager = (0, import_react.useMemo)(() => new $d496c0a20b6e58ec$export$6c8a5aaad13c9852(collection, selectionState, { layoutDelegate }), [
		collection,
		selectionState,
		layoutDelegate
	]);
	$e72dd72e1c76a225$var$useFocusedKeyReset(collection, selectionManager);
	return {
		collection,
		disabledKeys,
		selectionManager
	};
}
function $e72dd72e1c76a225$export$ba9d38c0f1bf2b36(state, filterFn) {
	let collection = (0, import_react.useMemo)(() => filterFn ? state.collection.filter(filterFn) : state.collection, [state.collection, filterFn]);
	let selectionManager = state.selectionManager.withCollection(collection);
	$e72dd72e1c76a225$var$useFocusedKeyReset(collection, selectionManager);
	return {
		collection,
		selectionManager,
		disabledKeys: state.disabledKeys
	};
}
function $e72dd72e1c76a225$var$useFocusedKeyReset(collection, selectionManager) {
	const cachedCollection = (0, import_react.useRef)(null);
	(0, import_react.useEffect)(() => {
		if (selectionManager.focusedKey != null && !collection.getItem(selectionManager.focusedKey) && cachedCollection.current) {
			const startItem = cachedCollection.current.getItem(selectionManager.focusedKey);
			const cachedItemNodes = [...cachedCollection.current.getKeys()].map((key) => {
				const itemNode = cachedCollection.current.getItem(key);
				return (itemNode === null || itemNode === void 0 ? void 0 : itemNode.type) === "item" ? itemNode : null;
			}).filter((node) => node !== null);
			const itemNodes = [...collection.getKeys()].map((key) => {
				const itemNode = collection.getItem(key);
				return (itemNode === null || itemNode === void 0 ? void 0 : itemNode.type) === "item" ? itemNode : null;
			}).filter((node) => node !== null);
			var _cachedItemNodes_length, _itemNodes_length;
			const diff = ((_cachedItemNodes_length = cachedItemNodes === null || cachedItemNodes === void 0 ? void 0 : cachedItemNodes.length) !== null && _cachedItemNodes_length !== void 0 ? _cachedItemNodes_length : 0) - ((_itemNodes_length = itemNodes === null || itemNodes === void 0 ? void 0 : itemNodes.length) !== null && _itemNodes_length !== void 0 ? _itemNodes_length : 0);
			var _startItem_index, _startItem_index1, _itemNodes_length1;
			let index = Math.min(diff > 1 ? Math.max(((_startItem_index = startItem === null || startItem === void 0 ? void 0 : startItem.index) !== null && _startItem_index !== void 0 ? _startItem_index : 0) - diff + 1, 0) : (_startItem_index1 = startItem === null || startItem === void 0 ? void 0 : startItem.index) !== null && _startItem_index1 !== void 0 ? _startItem_index1 : 0, ((_itemNodes_length1 = itemNodes === null || itemNodes === void 0 ? void 0 : itemNodes.length) !== null && _itemNodes_length1 !== void 0 ? _itemNodes_length1 : 0) - 1);
			let newNode = null;
			let isReverseSearching = false;
			while (index >= 0) {
				if (!selectionManager.isDisabled(itemNodes[index].key)) {
					newNode = itemNodes[index];
					break;
				}
				if (index < itemNodes.length - 1 && !isReverseSearching) index++;
				else {
					isReverseSearching = true;
					var _startItem_index2, _startItem_index3;
					if (index > ((_startItem_index2 = startItem === null || startItem === void 0 ? void 0 : startItem.index) !== null && _startItem_index2 !== void 0 ? _startItem_index2 : 0)) index = (_startItem_index3 = startItem === null || startItem === void 0 ? void 0 : startItem.index) !== null && _startItem_index3 !== void 0 ? _startItem_index3 : 0;
					index--;
				}
			}
			selectionManager.setFocusedKey(newNode ? newNode.key : null);
		}
		cachedCollection.current = collection;
	}, [collection, selectionManager]);
}
//#endregion
//#region ../../node_modules/@react-stately/overlays/dist/useOverlayTriggerState.mjs
function $fc909762b330b746$export$61c6a8c84e605fb6(props) {
	let [isOpen, setOpen] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(props.isOpen, props.defaultOpen || false, props.onOpenChange);
	return {
		isOpen,
		setOpen,
		open: (0, import_react.useCallback)(() => {
			setOpen(true);
		}, [setOpen]),
		close: (0, import_react.useCallback)(() => {
			setOpen(false);
		}, [setOpen]),
		toggle: (0, import_react.useCallback)(() => {
			setOpen(!isOpen);
		}, [setOpen, isOpen])
	};
}
//#endregion
//#region ../../node_modules/@react-stately/menu/dist/useMenuTriggerState.mjs
function $a28c903ee9ad8dc5$export$79fefeb1c2091ac3(props) {
	let overlayTriggerState = $fc909762b330b746$export$61c6a8c84e605fb6(props);
	let [focusStrategy, setFocusStrategy] = (0, import_react.useState)(null);
	let [expandedKeysStack, setExpandedKeysStack] = (0, import_react.useState)([]);
	let closeAll = () => {
		setExpandedKeysStack([]);
		overlayTriggerState.close();
	};
	let openSubmenu = (triggerKey, level) => {
		setExpandedKeysStack((oldStack) => {
			if (level > oldStack.length) return oldStack;
			return [...oldStack.slice(0, level), triggerKey];
		});
	};
	let closeSubmenu = (triggerKey, level) => {
		setExpandedKeysStack((oldStack) => {
			if (oldStack[level] === triggerKey) return oldStack.slice(0, level);
			else return oldStack;
		});
	};
	return {
		focusStrategy,
		...overlayTriggerState,
		open(focusStrategy = null) {
			setFocusStrategy(focusStrategy);
			overlayTriggerState.open();
		},
		toggle(focusStrategy = null) {
			setFocusStrategy(focusStrategy);
			overlayTriggerState.toggle();
		},
		close() {
			closeAll();
		},
		expandedKeysStack,
		openSubmenu,
		closeSubmenu
	};
}
//#endregion
//#region ../../node_modules/@react-stately/tooltip/dist/useTooltipTriggerState.mjs
var $8796f90736e175cb$var$TOOLTIP_DELAY = 1500;
var $8796f90736e175cb$var$TOOLTIP_COOLDOWN = 500;
var $8796f90736e175cb$var$tooltips = {};
var $8796f90736e175cb$var$tooltipId = 0;
var $8796f90736e175cb$var$globalWarmedUp = false;
var $8796f90736e175cb$var$globalWarmUpTimeout = null;
var $8796f90736e175cb$var$globalCooldownTimeout = null;
function $8796f90736e175cb$export$4d40659c25ecb50b(props = {}) {
	let { delay = $8796f90736e175cb$var$TOOLTIP_DELAY, closeDelay = $8796f90736e175cb$var$TOOLTIP_COOLDOWN } = props;
	let { isOpen, open, close } = $fc909762b330b746$export$61c6a8c84e605fb6(props);
	let id = (0, import_react.useMemo)(() => `${++$8796f90736e175cb$var$tooltipId}`, []);
	let closeTimeout = (0, import_react.useRef)(null);
	let closeCallback = (0, import_react.useRef)(close);
	let ensureTooltipEntry = () => {
		$8796f90736e175cb$var$tooltips[id] = hideTooltip;
	};
	let closeOpenTooltips = () => {
		for (let hideTooltipId in $8796f90736e175cb$var$tooltips) if (hideTooltipId !== id) {
			$8796f90736e175cb$var$tooltips[hideTooltipId](true);
			delete $8796f90736e175cb$var$tooltips[hideTooltipId];
		}
	};
	let showTooltip = () => {
		if (closeTimeout.current) clearTimeout(closeTimeout.current);
		closeTimeout.current = null;
		closeOpenTooltips();
		ensureTooltipEntry();
		$8796f90736e175cb$var$globalWarmedUp = true;
		open();
		if ($8796f90736e175cb$var$globalWarmUpTimeout) {
			clearTimeout($8796f90736e175cb$var$globalWarmUpTimeout);
			$8796f90736e175cb$var$globalWarmUpTimeout = null;
		}
		if ($8796f90736e175cb$var$globalCooldownTimeout) {
			clearTimeout($8796f90736e175cb$var$globalCooldownTimeout);
			$8796f90736e175cb$var$globalCooldownTimeout = null;
		}
	};
	let hideTooltip = (immediate) => {
		if (immediate || closeDelay <= 0) {
			if (closeTimeout.current) clearTimeout(closeTimeout.current);
			closeTimeout.current = null;
			closeCallback.current();
		} else if (!closeTimeout.current) closeTimeout.current = setTimeout(() => {
			closeTimeout.current = null;
			closeCallback.current();
		}, closeDelay);
		if ($8796f90736e175cb$var$globalWarmUpTimeout) {
			clearTimeout($8796f90736e175cb$var$globalWarmUpTimeout);
			$8796f90736e175cb$var$globalWarmUpTimeout = null;
		}
		if ($8796f90736e175cb$var$globalWarmedUp) {
			if ($8796f90736e175cb$var$globalCooldownTimeout) clearTimeout($8796f90736e175cb$var$globalCooldownTimeout);
			$8796f90736e175cb$var$globalCooldownTimeout = setTimeout(() => {
				delete $8796f90736e175cb$var$tooltips[id];
				$8796f90736e175cb$var$globalCooldownTimeout = null;
				$8796f90736e175cb$var$globalWarmedUp = false;
			}, Math.max($8796f90736e175cb$var$TOOLTIP_COOLDOWN, closeDelay));
		}
	};
	let warmupTooltip = () => {
		closeOpenTooltips();
		ensureTooltipEntry();
		if (!isOpen && !$8796f90736e175cb$var$globalWarmedUp) {
			if ($8796f90736e175cb$var$globalWarmUpTimeout) clearTimeout($8796f90736e175cb$var$globalWarmUpTimeout);
			$8796f90736e175cb$var$globalWarmUpTimeout = setTimeout(() => {
				$8796f90736e175cb$var$globalWarmUpTimeout = null;
				$8796f90736e175cb$var$globalWarmedUp = true;
				showTooltip();
			}, delay);
		} else if (!isOpen) showTooltip();
	};
	(0, import_react.useEffect)(() => {
		closeCallback.current = close;
	}, [close]);
	(0, import_react.useEffect)(() => {
		return () => {
			if (closeTimeout.current) clearTimeout(closeTimeout.current);
			if ($8796f90736e175cb$var$tooltips[id]) delete $8796f90736e175cb$var$tooltips[id];
		};
	}, [id]);
	return {
		isOpen,
		open: (immediate) => {
			if (!immediate && delay > 0 && !closeTimeout.current) warmupTooltip();
			else showTooltip();
		},
		close: hideTooltip
	};
}
//#endregion
//#region ../../node_modules/react-aria-components/dist/Form.mjs
var $d3e0e05bdfcf66bd$export$c24727297075ec6a = /* @__PURE__ */ (0, import_react.createContext)(null);
var $d3e0e05bdfcf66bd$export$a7fed597f4b8afd8 = /* @__PURE__ */ (0, import_react.forwardRef)(function Form(props, ref) {
	[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $d3e0e05bdfcf66bd$export$c24727297075ec6a);
	let { validationErrors, validationBehavior = "native", children, className, ...domProps } = props;
	return /* @__PURE__ */ import_react.createElement($64fa3d84918910a7$export$df3a06d6289f983e.form, {
		noValidate: validationBehavior !== "native",
		...domProps,
		ref,
		className: className || "react-aria-Form"
	}, /* @__PURE__ */ import_react.createElement($d3e0e05bdfcf66bd$export$c24727297075ec6a.Provider, { value: {
		...props,
		validationBehavior
	} }, /* @__PURE__ */ import_react.createElement($e5be200c675c3b3a$export$571b5131b7e65c11.Provider, { value: validationErrors !== null && validationErrors !== void 0 ? validationErrors : {} }, children)));
});
//#endregion
//#region ../../node_modules/react-aria-components/dist/Input.mjs
var $3985021b0ad6602f$export$37fb8590cf2c088c = /* @__PURE__ */ (0, import_react.createContext)({});
var $3985021b0ad6602f$var$filterHoverProps = (props) => {
	let { onHoverStart, onHoverChange, onHoverEnd, ...otherProps } = props;
	return otherProps;
};
var $3985021b0ad6602f$export$f5b8910cec6cf069 = /* @__PURE__ */ $f39a9eba43920ace$export$86427a43e3e48ebb(function Input(props, ref) {
	[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $3985021b0ad6602f$export$37fb8590cf2c088c);
	let { hoverProps, isHovered } = $6179b936705e76d3$export$ae780daf29e6d456({
		...props,
		isDisabled: props.disabled
	});
	let { isFocused, isFocusVisible, focusProps } = $f7dceffc5ad7768b$export$4e328f61c538687f({
		isTextInput: true,
		autoFocus: props.autoFocus
	});
	let isInvalid = !!props["aria-invalid"] && props["aria-invalid"] !== "false";
	let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
		...props,
		values: {
			isHovered,
			isFocused,
			isFocusVisible,
			isDisabled: props.disabled || false,
			isInvalid
		},
		defaultClassName: "react-aria-Input"
	});
	return /* @__PURE__ */ import_react.createElement($64fa3d84918910a7$export$df3a06d6289f983e.input, {
		...$3ef42575df84b30b$export$9d1611c77c2fe928($3985021b0ad6602f$var$filterHoverProps(props), focusProps, hoverProps),
		...renderProps,
		ref,
		"data-focused": isFocused || void 0,
		"data-disabled": props.disabled || void 0,
		"data-hovered": isHovered || void 0,
		"data-focus-visible": isFocusVisible || void 0,
		"data-invalid": isInvalid || void 0
	});
});
//#endregion
//#region ../../node_modules/react-aria-components/dist/DragAndDrop.mjs
var $612b8eb6cb90e02d$export$d188a835a7bc5783 = /* @__PURE__ */ (0, import_react.createContext)({});
var $612b8eb6cb90e02d$export$f55761759794cf55 = /* @__PURE__ */ (0, import_react.createContext)(null);
var $612b8eb6cb90e02d$export$62ed72bc21f6b8a6 = /* @__PURE__ */ (0, import_react.forwardRef)(function DropIndicator(props, ref) {
	let { render } = (0, import_react.useContext)($612b8eb6cb90e02d$export$f55761759794cf55);
	return /* @__PURE__ */ import_react.createElement(import_react.Fragment, null, render(props, ref));
});
function $612b8eb6cb90e02d$export$971707d8a129a1f7(dragAndDropHooks, dropState) {
	var _dragAndDropHooks_isVirtualDragging;
	let renderDropIndicator = dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.renderDropIndicator;
	let isVirtualDragging = dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : (_dragAndDropHooks_isVirtualDragging = dragAndDropHooks.isVirtualDragging) === null || _dragAndDropHooks_isVirtualDragging === void 0 ? void 0 : _dragAndDropHooks_isVirtualDragging.call(dragAndDropHooks);
	let fn = (0, import_react.useCallback)((target) => {
		if (isVirtualDragging || (dropState === null || dropState === void 0 ? void 0 : dropState.isDropTarget(target))) return renderDropIndicator ? renderDropIndicator(target) : /* @__PURE__ */ import_react.createElement($612b8eb6cb90e02d$export$62ed72bc21f6b8a6, { target });
	}, [
		dropState === null || dropState === void 0 ? void 0 : dropState.target,
		isVirtualDragging,
		renderDropIndicator
	]);
	return (dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDropIndicator) ? fn : void 0;
}
function $612b8eb6cb90e02d$export$d1e8e3fbb7461f6(selectionManager, dragAndDropHooks, dropState) {
	var _dragAndDropHooks_isVirtualDragging, _dropState_target;
	let focusedKey = selectionManager.focusedKey;
	let dropTargetKey = null;
	if ((dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : (_dragAndDropHooks_isVirtualDragging = dragAndDropHooks.isVirtualDragging) === null || _dragAndDropHooks_isVirtualDragging === void 0 ? void 0 : _dragAndDropHooks_isVirtualDragging.call(dragAndDropHooks)) && (dropState === null || dropState === void 0 ? void 0 : (_dropState_target = dropState.target) === null || _dropState_target === void 0 ? void 0 : _dropState_target.type) === "item") {
		dropTargetKey = dropState.target.key;
		if (dropState.target.dropPosition === "after") {
			let nextKey = dropState.collection.getKeyAfter(dropTargetKey);
			let lastDescendantKey = null;
			if (nextKey != null) {
				var _dropState_collection_getItem;
				var _dropState_collection_getItem_level;
				let targetLevel = (_dropState_collection_getItem_level = (_dropState_collection_getItem = dropState.collection.getItem(dropTargetKey)) === null || _dropState_collection_getItem === void 0 ? void 0 : _dropState_collection_getItem.level) !== null && _dropState_collection_getItem_level !== void 0 ? _dropState_collection_getItem_level : 0;
				while (nextKey) {
					let node = dropState.collection.getItem(nextKey);
					if (!node) break;
					if (node.type !== "item") {
						nextKey = dropState.collection.getKeyAfter(nextKey);
						continue;
					}
					var _node_level;
					if (((_node_level = node.level) !== null && _node_level !== void 0 ? _node_level : 0) <= targetLevel) break;
					lastDescendantKey = nextKey;
					nextKey = dropState.collection.getKeyAfter(nextKey);
				}
			}
			var _ref;
			dropTargetKey = (_ref = nextKey !== null && nextKey !== void 0 ? nextKey : lastDescendantKey) !== null && _ref !== void 0 ? _ref : dropTargetKey;
		}
	}
	return (0, import_react.useMemo)(() => {
		return new Set([focusedKey, dropTargetKey].filter((k) => k != null));
	}, [focusedKey, dropTargetKey]);
}
//#endregion
//#region ../../node_modules/react-aria-components/dist/Header.mjs
var $72a5793c14baf454$export$e0e4026c12a8bdbb = /* @__PURE__ */ (0, import_react.createContext)({});
var $72a5793c14baf454$export$8b251419efc915eb = /* @__PURE__ */ $e1995378a142960e$export$18af5c7a9e9b3664($23b9f4fcf0fe224b$export$5ae2504e948afce5, function Header(props, ref) {
	[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $72a5793c14baf454$export$e0e4026c12a8bdbb);
	return /* @__PURE__ */ import_react.createElement($64fa3d84918910a7$export$df3a06d6289f983e.header, {
		className: "react-aria-Header",
		...props,
		ref
	}, props.children);
});
//#endregion
//#region ../../node_modules/react-aria-components/dist/SharedElementTransition.mjs
var $c8a5a149f625efcf$var$SharedElementContext = /* @__PURE__ */ (0, import_react.createContext)(null);
function $c8a5a149f625efcf$export$758399f318e6385a(props) {
	let ref = (0, import_react.useRef)({});
	return /* @__PURE__ */ import_react.createElement($c8a5a149f625efcf$var$SharedElementContext.Provider, { value: ref }, props.children);
}
//#endregion
//#region ../../node_modules/react-aria-components/dist/SelectionIndicator.mjs
var $1d5b8b8664671ef2$export$c9549807523555e0 = /* @__PURE__ */ (0, import_react.createContext)({ isSelected: false });
//#endregion
//#region ../../node_modules/react-aria-components/dist/Separator.mjs
var $431f98aba6844401$export$6615d83f6de245ce = /* @__PURE__ */ (0, import_react.createContext)({});
var $431f98aba6844401$export$7750289ca694c0b5 = class extends $23b9f4fcf0fe224b$export$d68d59712b04d9d1 {
	filter(collection, newCollection) {
		let prevItem = newCollection.getItem(this.prevKey);
		if (prevItem && prevItem.type !== "separator") {
			let clone = this.clone();
			newCollection.addDescendants(clone, collection);
			return clone;
		}
		return null;
	}
};
$431f98aba6844401$export$7750289ca694c0b5.type = "separator";
//#endregion
//#region ../../node_modules/react-aria-components/dist/ListBox.mjs
var $eed445e0843c11d0$export$7ff8f37d2d81a48d = /* @__PURE__ */ (0, import_react.createContext)(null);
var $eed445e0843c11d0$export$7c5906fe4f1f2af2 = /* @__PURE__ */ (0, import_react.createContext)(null);
var $eed445e0843c11d0$export$41f133550aa26f48 = /* @__PURE__ */ (0, import_react.forwardRef)(function ListBox(props, ref) {
	[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $eed445e0843c11d0$export$7ff8f37d2d81a48d);
	let state = (0, import_react.useContext)($eed445e0843c11d0$export$7c5906fe4f1f2af2);
	if (state) return /* @__PURE__ */ import_react.createElement($eed445e0843c11d0$var$ListBoxInner, {
		state,
		props,
		listBoxRef: ref
	});
	return /* @__PURE__ */ import_react.createElement($e1995378a142960e$export$bf788dd355e3a401, { content: /* @__PURE__ */ import_react.createElement($e1995378a142960e$export$fb8073518f34e6ec, props) }, (collection) => /* @__PURE__ */ import_react.createElement($eed445e0843c11d0$var$StandaloneListBox, {
		props,
		listBoxRef: ref,
		collection
	}));
});
function $eed445e0843c11d0$var$StandaloneListBox({ props, listBoxRef, collection }) {
	props = {
		...props,
		collection,
		children: null,
		items: null
	};
	let { layoutDelegate } = (0, import_react.useContext)($7135fc7d473fd974$export$4feb769f8ddf26c5);
	let state = $e72dd72e1c76a225$export$2f645645f7bca764({
		...props,
		layoutDelegate
	});
	return /* @__PURE__ */ import_react.createElement($eed445e0843c11d0$var$ListBoxInner, {
		state,
		props,
		listBoxRef
	});
}
function $eed445e0843c11d0$var$ListBoxInner({ state: inputState, props, listBoxRef }) {
	[props, listBoxRef] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, listBoxRef, $4e85f108e88277b8$export$b0d3ecf7112093a7);
	let { dragAndDropHooks, layout = "stack", orientation = "vertical", filter } = props;
	let state = $e72dd72e1c76a225$export$ba9d38c0f1bf2b36(inputState, filter);
	let { collection, selectionManager } = state;
	let isListDraggable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDraggableCollectionState);
	let isListDroppable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDroppableCollectionState);
	let { direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
	let { disabledBehavior, disabledKeys } = selectionManager;
	let collator = $325a3faab7a68acd$export$a16aca283550c30d({
		usage: "search",
		sensitivity: "base"
	});
	let { isVirtualized, layoutDelegate, dropTargetDelegate: ctxDropTargetDelegate, CollectionRoot } = (0, import_react.useContext)($7135fc7d473fd974$export$4feb769f8ddf26c5);
	let keyboardDelegate = (0, import_react.useMemo)(() => props.keyboardDelegate || new $2a25aae57d74318e$export$a05409b8bb224a5a({
		collection,
		collator,
		ref: listBoxRef,
		disabledKeys,
		disabledBehavior,
		layout,
		orientation,
		direction,
		layoutDelegate
	}), [
		collection,
		collator,
		listBoxRef,
		disabledBehavior,
		disabledKeys,
		orientation,
		direction,
		props.keyboardDelegate,
		layout,
		layoutDelegate
	]);
	let { listBoxProps } = $c132121280ec012d$export$50eacbbf140a3141({
		...props,
		shouldSelectOnPressUp: isListDraggable || props.shouldSelectOnPressUp,
		keyboardDelegate,
		isVirtualized
	}, state, listBoxRef);
	(0, import_react.useRef)(isListDraggable);
	(0, import_react.useRef)(isListDroppable);
	(0, import_react.useEffect)(() => {}, [isListDraggable, isListDroppable]);
	let dragState = void 0;
	let dropState = void 0;
	let droppableCollection = void 0;
	let isRootDropTarget = false;
	let dragPreview = null;
	let preview = (0, import_react.useRef)(null);
	if (isListDraggable && dragAndDropHooks) {
		dragState = dragAndDropHooks.useDraggableCollectionState({
			collection,
			selectionManager,
			preview: dragAndDropHooks.renderDragPreview ? preview : void 0
		});
		dragAndDropHooks.useDraggableCollection({}, dragState, listBoxRef);
		let DragPreview = dragAndDropHooks.DragPreview;
		dragPreview = dragAndDropHooks.renderDragPreview ? /* @__PURE__ */ import_react.createElement(DragPreview, { ref: preview }, dragAndDropHooks.renderDragPreview) : null;
	}
	if (isListDroppable && dragAndDropHooks) {
		dropState = dragAndDropHooks.useDroppableCollectionState({
			collection,
			selectionManager
		});
		let dropTargetDelegate = dragAndDropHooks.dropTargetDelegate || ctxDropTargetDelegate || new dragAndDropHooks.ListDropTargetDelegate(collection, listBoxRef, {
			orientation,
			layout,
			direction
		});
		droppableCollection = dragAndDropHooks.useDroppableCollection({
			keyboardDelegate,
			dropTargetDelegate
		}, dropState, listBoxRef);
		isRootDropTarget = dropState.isDropTarget({ type: "root" });
	}
	let { focusProps, isFocused, isFocusVisible } = $f7dceffc5ad7768b$export$4e328f61c538687f();
	let isEmpty = state.collection.size === 0;
	let renderValues = {
		isDropTarget: isRootDropTarget,
		isEmpty,
		isFocused,
		isFocusVisible,
		layout: props.layout || "stack",
		state
	};
	let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
		...props,
		children: void 0,
		defaultClassName: "react-aria-ListBox",
		values: renderValues
	});
	let emptyState = null;
	if (isEmpty && props.renderEmptyState) emptyState = /* @__PURE__ */ import_react.createElement("div", {
		role: "option",
		style: { display: "contents" }
	}, props.renderEmptyState(renderValues));
	let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, { global: true });
	return /* @__PURE__ */ import_react.createElement($9bf71ea28793e738$export$20e40289641fbbb6, null, /* @__PURE__ */ import_react.createElement($64fa3d84918910a7$export$df3a06d6289f983e.div, {
		...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, listBoxProps, focusProps, droppableCollection === null || droppableCollection === void 0 ? void 0 : droppableCollection.collectionProps),
		ref: listBoxRef,
		slot: props.slot || void 0,
		onScroll: props.onScroll,
		"data-drop-target": isRootDropTarget || void 0,
		"data-empty": isEmpty || void 0,
		"data-focused": isFocused || void 0,
		"data-focus-visible": isFocusVisible || void 0,
		"data-layout": props.layout || "stack",
		"data-orientation": props.orientation || "vertical"
	}, /* @__PURE__ */ import_react.createElement($64fa3d84918910a7$export$2881499e37b75b9a, { values: [
		[$eed445e0843c11d0$export$7ff8f37d2d81a48d, props],
		[$eed445e0843c11d0$export$7c5906fe4f1f2af2, state],
		[$612b8eb6cb90e02d$export$d188a835a7bc5783, {
			dragAndDropHooks,
			dragState,
			dropState
		}],
		[$431f98aba6844401$export$6615d83f6de245ce, { elementType: "div" }],
		[$612b8eb6cb90e02d$export$f55761759794cf55, { render: $eed445e0843c11d0$var$ListBoxDropIndicatorWrapper }],
		[$7135fc7d473fd974$export$d40e14dec8b060a8, {
			name: "ListBoxSection",
			render: $eed445e0843c11d0$var$ListBoxSectionInner
		}]
	] }, /* @__PURE__ */ import_react.createElement($c8a5a149f625efcf$export$758399f318e6385a, null, /* @__PURE__ */ import_react.createElement(CollectionRoot, {
		collection,
		scrollRef: listBoxRef,
		persistedKeys: $612b8eb6cb90e02d$export$d1e8e3fbb7461f6(selectionManager, dragAndDropHooks, dropState),
		renderDropIndicator: $612b8eb6cb90e02d$export$971707d8a129a1f7(dragAndDropHooks, dropState)
	}))), emptyState, dragPreview));
}
function $eed445e0843c11d0$var$ListBoxSectionInner(props, ref, section, className = "react-aria-ListBoxSection") {
	let state = (0, import_react.useContext)($eed445e0843c11d0$export$7c5906fe4f1f2af2);
	let { dragAndDropHooks, dropState } = (0, import_react.useContext)($612b8eb6cb90e02d$export$d188a835a7bc5783);
	let { CollectionBranch } = (0, import_react.useContext)($7135fc7d473fd974$export$4feb769f8ddf26c5);
	let [headingRef, heading] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8();
	var _props_arialabel;
	let { headingProps, groupProps } = $af383d3bef1cfdc9$export$c3f9f39876e4bc7({
		heading,
		"aria-label": (_props_arialabel = props["aria-label"]) !== null && _props_arialabel !== void 0 ? _props_arialabel : void 0
	});
	let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
		...props,
		id: void 0,
		children: void 0,
		defaultClassName: className,
		values: void 0
	});
	let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, { global: true });
	delete DOMProps.id;
	return /* @__PURE__ */ import_react.createElement($64fa3d84918910a7$export$df3a06d6289f983e.section, {
		...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, groupProps),
		ref
	}, /* @__PURE__ */ import_react.createElement($72a5793c14baf454$export$e0e4026c12a8bdbb.Provider, { value: {
		...headingProps,
		ref: headingRef
	} }, /* @__PURE__ */ import_react.createElement(CollectionBranch, {
		collection: state.collection,
		parent: section,
		renderDropIndicator: $612b8eb6cb90e02d$export$971707d8a129a1f7(dragAndDropHooks, dropState)
	})));
}
var $eed445e0843c11d0$export$dca12b0bb56e4fc = /* @__PURE__ */ $e1995378a142960e$export$e953bb1cd0f19726($23b9f4fcf0fe224b$export$437f11dc9b403b78, $eed445e0843c11d0$var$ListBoxSectionInner);
var $eed445e0843c11d0$export$a11e76429ed99b4 = /* @__PURE__ */ $e1995378a142960e$export$18af5c7a9e9b3664($23b9f4fcf0fe224b$export$fd11f34e1d07f134, function ListBoxItem(props, forwardedRef, item) {
	let ref = $df56164dff5785e2$export$4338b53315abf666(forwardedRef);
	let state = (0, import_react.useContext)($eed445e0843c11d0$export$7c5906fe4f1f2af2);
	let { dragAndDropHooks, dragState, dropState } = (0, import_react.useContext)($612b8eb6cb90e02d$export$d188a835a7bc5783);
	let { optionProps, labelProps, descriptionProps, ...states } = $293f70390ea03370$export$497855f14858aa34({
		key: item.key,
		"aria-label": props === null || props === void 0 ? void 0 : props["aria-label"]
	}, state, ref);
	let { hoverProps, isHovered } = $6179b936705e76d3$export$ae780daf29e6d456({
		isDisabled: !states.allowsSelection && !states.hasAction,
		onHoverStart: item.props.onHoverStart,
		onHoverChange: item.props.onHoverChange,
		onHoverEnd: item.props.onHoverEnd
	});
	let { keyboardProps } = $46d819fcbaf35654$export$8f71654801c2f7cd(props);
	let { focusProps } = $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props);
	let draggableItem = null;
	if (dragState && dragAndDropHooks) draggableItem = dragAndDropHooks.useDraggableItem({
		key: item.key,
		hasAction: states.hasAction
	}, dragState);
	let droppableItem = null;
	if (dropState && dragAndDropHooks) droppableItem = dragAndDropHooks.useDroppableItem({ target: {
		type: "item",
		key: item.key,
		dropPosition: "on"
	} }, dropState, ref);
	let isDragging = dragState && dragState.isDragging(item.key);
	let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
		...props,
		id: void 0,
		children: props.children,
		defaultClassName: "react-aria-ListBoxItem",
		values: {
			...states,
			isHovered,
			selectionMode: state.selectionManager.selectionMode,
			selectionBehavior: state.selectionManager.selectionBehavior,
			allowsDragging: !!dragState,
			isDragging,
			isDropTarget: droppableItem === null || droppableItem === void 0 ? void 0 : droppableItem.isDropTarget
		}
	});
	(0, import_react.useEffect)(() => {
		if (!item.textValue && false);
	}, [item.textValue]);
	let ElementType = props.href ? $64fa3d84918910a7$export$df3a06d6289f983e.a : $64fa3d84918910a7$export$df3a06d6289f983e.div;
	let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, { global: true });
	delete DOMProps.id;
	delete DOMProps.onClick;
	if (props.href && optionProps.tabIndex == null) optionProps.tabIndex = -1;
	return /* @__PURE__ */ import_react.createElement(ElementType, {
		...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, optionProps, hoverProps, keyboardProps, focusProps, draggableItem === null || draggableItem === void 0 ? void 0 : draggableItem.dragProps, droppableItem === null || droppableItem === void 0 ? void 0 : droppableItem.dropProps),
		ref,
		"data-allows-dragging": !!dragState || void 0,
		"data-selected": states.isSelected || void 0,
		"data-disabled": states.isDisabled || void 0,
		"data-hovered": isHovered || void 0,
		"data-focused": states.isFocused || void 0,
		"data-focus-visible": states.isFocusVisible || void 0,
		"data-pressed": states.isPressed || void 0,
		"data-dragging": isDragging || void 0,
		"data-drop-target": (droppableItem === null || droppableItem === void 0 ? void 0 : droppableItem.isDropTarget) || void 0,
		"data-selection-mode": state.selectionManager.selectionMode === "none" ? void 0 : state.selectionManager.selectionMode
	}, /* @__PURE__ */ import_react.createElement($64fa3d84918910a7$export$2881499e37b75b9a, { values: [[$514c0188e459b4c0$export$9afb8bc826b033ea, { slots: {
		[$64fa3d84918910a7$export$c62b8e45d58ddad9]: labelProps,
		label: labelProps,
		description: descriptionProps
	} }], [$1d5b8b8664671ef2$export$c9549807523555e0, { isSelected: states.isSelected }]] }, renderProps.children));
});
function $eed445e0843c11d0$var$ListBoxDropIndicatorWrapper(props, ref) {
	ref = $df56164dff5785e2$export$4338b53315abf666(ref);
	let { dragAndDropHooks, dropState } = (0, import_react.useContext)($612b8eb6cb90e02d$export$d188a835a7bc5783);
	let { dropIndicatorProps, isHidden, isDropTarget } = dragAndDropHooks.useDropIndicator(props, dropState, ref);
	if (isHidden) return null;
	return /* @__PURE__ */ import_react.createElement($eed445e0843c11d0$var$ListBoxDropIndicatorForwardRef, {
		...props,
		dropIndicatorProps,
		isDropTarget,
		ref
	});
}
function $eed445e0843c11d0$var$ListBoxDropIndicator(props, ref) {
	let { dropIndicatorProps, isDropTarget, ...otherProps } = props;
	let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
		...otherProps,
		defaultClassName: "react-aria-DropIndicator",
		values: { isDropTarget }
	});
	return /* @__PURE__ */ import_react.createElement($64fa3d84918910a7$export$df3a06d6289f983e.div, {
		...dropIndicatorProps,
		...renderProps,
		role: "option",
		ref,
		"data-drop-target": isDropTarget || void 0
	});
}
var $eed445e0843c11d0$var$ListBoxDropIndicatorForwardRef = /* @__PURE__ */ (0, import_react.forwardRef)($eed445e0843c11d0$var$ListBoxDropIndicator);
$e1995378a142960e$export$18af5c7a9e9b3664($23b9f4fcf0fe224b$export$8258a0665a675899, function ListBoxLoadingIndicator(props, ref, item) {
	let state = (0, import_react.useContext)($eed445e0843c11d0$export$7c5906fe4f1f2af2);
	let { isLoading, onLoadMore, scrollOffset, ...otherProps } = props;
	let sentinelRef = (0, import_react.useRef)(null);
	$a5fa973c1850dd36$export$ccaea96c28e8b9e7((0, import_react.useMemo)(() => ({
		onLoadMore,
		collection: state === null || state === void 0 ? void 0 : state.collection,
		sentinelRef,
		scrollOffset
	}), [
		onLoadMore,
		scrollOffset,
		state === null || state === void 0 ? void 0 : state.collection
	]), sentinelRef);
	let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
		...otherProps,
		id: void 0,
		children: item.rendered,
		defaultClassName: "react-aria-ListBoxLoadingIndicator",
		values: void 0
	});
	return /* @__PURE__ */ import_react.createElement(import_react.Fragment, null, /* @__PURE__ */ import_react.createElement("div", {
		style: {
			position: "relative",
			width: 0,
			height: 0
		},
		inert: $cdc5a6778b766db2$export$a9d04c5684123369(true)
	}, /* @__PURE__ */ import_react.createElement("div", {
		"data-testid": "loadMoreSentinel",
		ref: sentinelRef,
		style: {
			position: "absolute",
			height: 1,
			width: 1
		}
	})), isLoading && renderProps.children && /* @__PURE__ */ import_react.createElement($64fa3d84918910a7$export$df3a06d6289f983e.div, {
		...$3ef42575df84b30b$export$9d1611c77c2fe928($65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, { global: true }), { tabIndex: -1 }),
		...renderProps,
		role: "option",
		ref
	}, renderProps.children));
});
//#endregion
//#region ../../node_modules/react-aria-components/dist/OverlayArrow.mjs
var $44f671af83e7d9e0$export$2de4954e8ae13b9f = /* @__PURE__ */ (0, import_react.createContext)({ placement: "bottom" });
//#endregion
//#region ../../node_modules/react-aria-components/dist/Popover.mjs
var $07b14b47974efb58$export$9b9a0cd73afb7ca4 = /* @__PURE__ */ (0, import_react.createContext)(null);
var $07b14b47974efb58$var$PopoverGroupContext = /* @__PURE__ */ (0, import_react.createContext)(null);
var $07b14b47974efb58$export$5b6b19405a83ff9d = /* @__PURE__ */ (0, import_react.forwardRef)(function Popover(props, ref) {
	[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $07b14b47974efb58$export$9b9a0cd73afb7ca4);
	let contextState = (0, import_react.useContext)($de32f1b87079253c$export$d2f961adcb0afbe);
	let localState = $fc909762b330b746$export$61c6a8c84e605fb6(props);
	let state = props.isOpen != null || props.defaultOpen != null || !contextState ? localState : contextState;
	let isExiting = $d3f049242431219c$export$45fda7c47f93fd48(ref, state.isOpen) || props.isExiting || false;
	let isHidden = $f39a9eba43920ace$export$b5d7cc18bb8d2b59();
	let { direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
	if (isHidden) {
		let children = props.children;
		if (typeof children === "function") children = children({
			trigger: props.trigger || null,
			placement: "bottom",
			isEntering: false,
			isExiting: false,
			defaultChildren: null
		});
		return /* @__PURE__ */ import_react.createElement(import_react.Fragment, null, children);
	}
	if (state && !state.isOpen && !isExiting) return null;
	return /* @__PURE__ */ import_react.createElement($07b14b47974efb58$var$PopoverInner, {
		...props,
		triggerRef: props.triggerRef,
		state,
		popoverRef: ref,
		isExiting,
		dir: direction
	});
});
function $07b14b47974efb58$var$PopoverInner({ state, isExiting, UNSTABLE_portalContainer, clearContexts, ...props }) {
	let arrowRef = (0, import_react.useRef)(null);
	let containerRef = (0, import_react.useRef)(null);
	let groupCtx = (0, import_react.useContext)($07b14b47974efb58$var$PopoverGroupContext);
	let isSubPopover = groupCtx && props.trigger === "SubmenuTrigger";
	var _props_offset;
	let { popoverProps, underlayProps, arrowProps, placement, triggerAnchorPoint } = $f2f8a6077418541e$export$542a6fd13ac93354({
		...props,
		offset: (_props_offset = props.offset) !== null && _props_offset !== void 0 ? _props_offset : 8,
		arrowRef,
		groupRef: isSubPopover ? groupCtx : containerRef
	}, state);
	let ref = props.popoverRef;
	let isEntering = $d3f049242431219c$export$6d3443f2c48bfc20(ref, !!placement) || props.isEntering || false;
	let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
		...props,
		defaultClassName: "react-aria-Popover",
		values: {
			trigger: props.trigger || null,
			placement,
			isEntering,
			isExiting
		}
	});
	let shouldBeDialog = !props.isNonModal || props.trigger === "SubmenuTrigger";
	let [isDialog, setDialog] = (0, import_react.useState)(false);
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		if (ref.current) setDialog(shouldBeDialog && !ref.current.querySelector("[role=dialog]"));
	}, [ref, shouldBeDialog]);
	(0, import_react.useEffect)(() => {
		if (isDialog && (props.trigger !== "SubmenuTrigger" || $507fabe10e71c6fb$export$630ff653c5ada6a9() !== "pointer") && ref.current && !$d4ee10de306f2510$export$b4f377a2b6254582(ref.current)) $3ad3f6e1647bc98d$export$80f3e147d781571c(ref.current);
	}, [
		isDialog,
		ref,
		props.trigger
	]);
	let children = (0, import_react.useMemo)(() => {
		let children = renderProps.children;
		if (clearContexts) for (let Context of clearContexts) children = /* @__PURE__ */ import_react.createElement(Context.Provider, { value: null }, children);
		return children;
	}, [renderProps.children, clearContexts]);
	let style = {
		...popoverProps.style,
		"--trigger-anchor-point": triggerAnchorPoint ? `${triggerAnchorPoint.x}px ${triggerAnchorPoint.y}px` : void 0,
		...renderProps.style
	};
	let overlay = /* @__PURE__ */ import_react.createElement($64fa3d84918910a7$export$df3a06d6289f983e.div, {
		...$3ef42575df84b30b$export$9d1611c77c2fe928($65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, { global: true }), popoverProps),
		...renderProps,
		role: isDialog ? "dialog" : void 0,
		tabIndex: isDialog ? -1 : void 0,
		"aria-label": props["aria-label"],
		"aria-labelledby": props["aria-labelledby"],
		ref,
		slot: props.slot || void 0,
		style,
		dir: props.dir,
		"data-trigger": props.trigger,
		"data-placement": placement,
		"data-entering": isEntering || void 0,
		"data-exiting": isExiting || void 0
	}, !props.isNonModal && /* @__PURE__ */ import_react.createElement($86ea4cb521eb2e37$export$2317d149ed6f78c4, { onDismiss: state.close }), /* @__PURE__ */ import_react.createElement($44f671af83e7d9e0$export$2de4954e8ae13b9f.Provider, { value: {
		...arrowProps,
		placement,
		ref: arrowRef
	} }, children), /* @__PURE__ */ import_react.createElement($86ea4cb521eb2e37$export$2317d149ed6f78c4, { onDismiss: state.close }));
	if (!isSubPopover) return /* @__PURE__ */ import_react.createElement($337b884510726a0d$export$c6fdb837b070b4ff, {
		...props,
		shouldContainFocus: isDialog,
		isExiting,
		portalContainer: UNSTABLE_portalContainer
	}, !props.isNonModal && state.isOpen && /* @__PURE__ */ import_react.createElement("div", {
		"data-testid": "underlay",
		...underlayProps,
		style: {
			position: "fixed",
			inset: 0
		}
	}), /* @__PURE__ */ import_react.createElement("div", {
		ref: containerRef,
		style: { display: "contents" }
	}, /* @__PURE__ */ import_react.createElement($07b14b47974efb58$var$PopoverGroupContext.Provider, { value: containerRef }, overlay)));
	var _ref;
	return /* @__PURE__ */ import_react.createElement($337b884510726a0d$export$c6fdb837b070b4ff, {
		...props,
		shouldContainFocus: isDialog,
		isExiting,
		portalContainer: (_ref = UNSTABLE_portalContainer !== null && UNSTABLE_portalContainer !== void 0 ? UNSTABLE_portalContainer : groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.current) !== null && _ref !== void 0 ? _ref : void 0
	}, overlay);
}
//#endregion
//#region ../../node_modules/react-aria-components/dist/Menu.mjs
var $3674c52c6b3c5bce$export$795aec4671cbae19 = /* @__PURE__ */ (0, import_react.createContext)(null);
var $3674c52c6b3c5bce$var$SubmenuTriggerNode = class extends $23b9f4fcf0fe224b$export$d68d59712b04d9d1 {
	filter(collection, newCollection, filterFn) {
		let triggerNode = collection.getItem(this.firstChildKey);
		if (triggerNode && filterFn(triggerNode.textValue, this)) {
			let clone = this.clone();
			newCollection.addDescendants(clone, collection);
			return clone;
		}
		return null;
	}
};
$3674c52c6b3c5bce$var$SubmenuTriggerNode.type = "submenutrigger";
//#endregion
//#region ../../node_modules/react-aria-components/dist/Dialog.mjs
var $de32f1b87079253c$export$8b93a07348a7730c = /* @__PURE__ */ (0, import_react.createContext)(null);
var $de32f1b87079253c$export$d2f961adcb0afbe = /* @__PURE__ */ (0, import_react.createContext)(null);
function $de32f1b87079253c$export$2e1e1122cf0cba88(props) {
	let state = $a28c903ee9ad8dc5$export$79fefeb1c2091ac3(props);
	let buttonRef = (0, import_react.useRef)(null);
	let { triggerProps, overlayProps } = $628037886ba31236$export$f9d5c8beee7d008d({ type: "dialog" }, state, buttonRef);
	let [buttonWidth, setButtonWidth] = (0, import_react.useState)(null);
	$9daab02d461809db$export$683480f191c0e3ea({
		ref: buttonRef,
		onResize: (0, import_react.useCallback)(() => {
			if (buttonRef.current) setButtonWidth(buttonRef.current.offsetWidth + "px");
		}, [buttonRef])
	});
	triggerProps.id = $bdb11010cef70236$export$f680877a34711e37();
	overlayProps["aria-labelledby"] = triggerProps.id;
	return /* @__PURE__ */ import_react.createElement($64fa3d84918910a7$export$2881499e37b75b9a, { values: [
		[$de32f1b87079253c$export$d2f961adcb0afbe, state],
		[$3674c52c6b3c5bce$export$795aec4671cbae19, state],
		[$de32f1b87079253c$export$8b93a07348a7730c, overlayProps],
		[$07b14b47974efb58$export$9b9a0cd73afb7ca4, {
			trigger: "DialogTrigger",
			triggerRef: buttonRef,
			"aria-labelledby": overlayProps["aria-labelledby"],
			style: { "--trigger-width": buttonWidth }
		}]
	] }, /* @__PURE__ */ import_react.createElement($f1ab8c75478c6f73$export$3351871ee4b288b8, {
		...triggerProps,
		ref: buttonRef,
		isPressed: state.isOpen
	}, props.children));
}
var $de32f1b87079253c$export$3ddf2d174ce01153 = /* @__PURE__ */ (0, import_react.forwardRef)(function Dialog(props, ref) {
	let originalAriaLabelledby = props["aria-labelledby"];
	[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $de32f1b87079253c$export$8b93a07348a7730c);
	let { dialogProps, titleProps } = $40df3f8667284809$export$d55e7ee900f34e93({
		...props,
		"aria-labelledby": originalAriaLabelledby
	}, ref);
	let state = (0, import_react.useContext)($de32f1b87079253c$export$d2f961adcb0afbe);
	if (!dialogProps["aria-label"] && !dialogProps["aria-labelledby"]) {
		if (props["aria-labelledby"]) dialogProps["aria-labelledby"] = props["aria-labelledby"];
	}
	let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
		defaultClassName: "react-aria-Dialog",
		className: props.className,
		style: props.style,
		children: props.children,
		values: { close: (state === null || state === void 0 ? void 0 : state.close) || (() => {}) }
	});
	let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, { global: true });
	return /* @__PURE__ */ import_react.createElement($64fa3d84918910a7$export$df3a06d6289f983e.section, {
		...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, dialogProps),
		render: props.render,
		ref,
		slot: props.slot || void 0
	}, /* @__PURE__ */ import_react.createElement($64fa3d84918910a7$export$2881499e37b75b9a, { values: [[$4e85f108e88277b8$export$d688439359537581, { slots: {
		[$64fa3d84918910a7$export$c62b8e45d58ddad9]: {},
		title: {
			...titleProps,
			level: 2
		}
	} }], [$d2b4bc8c273e7be6$export$24d547caef80ccd1, { slots: {
		[$64fa3d84918910a7$export$c62b8e45d58ddad9]: {},
		close: { onPress: () => state === null || state === void 0 ? void 0 : state.close() }
	} }]] }, renderProps.children));
});
//#endregion
//#region ../../node_modules/react-aria-components/dist/Modal.mjs
var $f3f84453ead64de5$export$ab57792b9b6974a6 = /* @__PURE__ */ (0, import_react.createContext)(null);
var $f3f84453ead64de5$var$InternalModalContext = /* @__PURE__ */ (0, import_react.createContext)(null);
var $f3f84453ead64de5$export$2b77a92f1a5ad772 = /* @__PURE__ */ (0, import_react.forwardRef)(function Modal(props, ref) {
	if ((0, import_react.useContext)($f3f84453ead64de5$var$InternalModalContext)) return /* @__PURE__ */ import_react.createElement($f3f84453ead64de5$var$ModalContent, {
		...props,
		modalRef: ref
	}, props.children);
	let { isDismissable, isKeyboardDismissDisabled, isOpen, defaultOpen, onOpenChange, children, isEntering, isExiting, UNSTABLE_portalContainer, shouldCloseOnInteractOutside, ...otherProps } = props;
	return /* @__PURE__ */ import_react.createElement($f3f84453ead64de5$export$8948f78d83984c69, {
		isDismissable,
		isKeyboardDismissDisabled,
		isOpen,
		defaultOpen,
		onOpenChange,
		isEntering,
		isExiting,
		UNSTABLE_portalContainer,
		shouldCloseOnInteractOutside
	}, /* @__PURE__ */ import_react.createElement($f3f84453ead64de5$var$ModalContent, {
		...otherProps,
		modalRef: ref
	}, children));
});
function $f3f84453ead64de5$var$ModalOverlayWithForwardRef(props, ref) {
	[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $f3f84453ead64de5$export$ab57792b9b6974a6);
	let contextState = (0, import_react.useContext)($de32f1b87079253c$export$d2f961adcb0afbe);
	let localState = $fc909762b330b746$export$61c6a8c84e605fb6(props);
	let state = props.isOpen != null || props.defaultOpen != null || !contextState ? localState : contextState;
	if (state === contextState) {}
	let objectRef = $df56164dff5785e2$export$4338b53315abf666(ref);
	let modalRef = (0, import_react.useRef)(null);
	let isOverlayExiting = $d3f049242431219c$export$45fda7c47f93fd48(objectRef, state.isOpen);
	let isModalExiting = $d3f049242431219c$export$45fda7c47f93fd48(modalRef, state.isOpen);
	let isExiting = isOverlayExiting || isModalExiting || props.isExiting || false;
	let isSSR = $b5e257d569688ac6$export$535bd6ca7f90a273();
	if (!state.isOpen && !isExiting || isSSR) return null;
	return /* @__PURE__ */ import_react.createElement($f3f84453ead64de5$var$ModalOverlayInner, {
		...props,
		state,
		isExiting,
		overlayRef: objectRef,
		modalRef
	});
}
var $f3f84453ead64de5$export$8948f78d83984c69 = /* @__PURE__ */ (0, import_react.forwardRef)($f3f84453ead64de5$var$ModalOverlayWithForwardRef);
function $f3f84453ead64de5$var$ModalOverlayInner({ UNSTABLE_portalContainer, ...props }) {
	let modalRef = props.modalRef;
	let { state } = props;
	let { modalProps, underlayProps } = $8ac8429251c45e4b$export$dbc0f175b25fb0fb(props, state, modalRef);
	let entering = $d3f049242431219c$export$6d3443f2c48bfc20(props.overlayRef) || props.isEntering || false;
	let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
		...props,
		defaultClassName: "react-aria-ModalOverlay",
		values: {
			isEntering: entering,
			isExiting: props.isExiting,
			state
		}
	});
	let viewport = $5df64b3807dc15ee$export$d699905dd57c73ca();
	let pageHeight = void 0;
	if (typeof document !== "undefined") {
		let scrollingElement = $cc38e7bd3fc7b213$export$2bb74740c4e19def(document.body) ? document.body : document.scrollingElement || document.documentElement;
		let fractionalHeightDifference = scrollingElement.getBoundingClientRect().height % 1;
		pageHeight = scrollingElement.scrollHeight - fractionalHeightDifference;
	}
	let style = {
		...renderProps.style,
		"--visual-viewport-height": viewport.height + "px",
		"--page-height": pageHeight !== void 0 ? pageHeight + "px" : void 0
	};
	return /* @__PURE__ */ import_react.createElement($337b884510726a0d$export$c6fdb837b070b4ff, {
		isExiting: props.isExiting,
		portalContainer: UNSTABLE_portalContainer
	}, /* @__PURE__ */ import_react.createElement($64fa3d84918910a7$export$df3a06d6289f983e.div, {
		...$3ef42575df84b30b$export$9d1611c77c2fe928($65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, { global: true }), underlayProps),
		...renderProps,
		style,
		ref: props.overlayRef,
		"data-entering": entering || void 0,
		"data-exiting": props.isExiting || void 0
	}, /* @__PURE__ */ import_react.createElement($64fa3d84918910a7$export$2881499e37b75b9a, { values: [[$f3f84453ead64de5$var$InternalModalContext, {
		modalProps,
		modalRef,
		isExiting: props.isExiting,
		isDismissable: props.isDismissable
	}], [$de32f1b87079253c$export$d2f961adcb0afbe, state]] }, renderProps.children)));
}
function $f3f84453ead64de5$var$ModalContent(props) {
	let { modalProps, modalRef, isExiting, isDismissable } = (0, import_react.useContext)($f3f84453ead64de5$var$InternalModalContext);
	let state = (0, import_react.useContext)($de32f1b87079253c$export$d2f961adcb0afbe);
	let ref = $df56164dff5785e2$export$4338b53315abf666((0, import_react.useMemo)(() => $5dc95899b306f630$export$c9058316764c140e(props.modalRef, modalRef), [props.modalRef, modalRef]));
	let entering = $d3f049242431219c$export$6d3443f2c48bfc20(ref);
	let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
		...props,
		defaultClassName: "react-aria-Modal",
		values: {
			isEntering: entering,
			isExiting,
			state
		}
	});
	return /* @__PURE__ */ import_react.createElement($64fa3d84918910a7$export$df3a06d6289f983e.div, {
		...$3ef42575df84b30b$export$9d1611c77c2fe928($65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, { global: true }), modalProps),
		...renderProps,
		ref,
		"data-entering": entering || void 0,
		"data-exiting": isExiting || void 0
	}, isDismissable && /* @__PURE__ */ import_react.createElement($86ea4cb521eb2e37$export$2317d149ed6f78c4, { onDismiss: state.close }), renderProps.children);
}
//#endregion
//#region ../../node_modules/react-aria-components/dist/Tooltip.mjs
var $4e3b923658d69c60$export$7a7623236eec67fa = /* @__PURE__ */ (0, import_react.createContext)(null);
var $4e3b923658d69c60$export$39ae08fa83328b12 = /* @__PURE__ */ (0, import_react.createContext)(null);
function $4e3b923658d69c60$export$8c610744efcf8a1d(props) {
	let state = $8796f90736e175cb$export$4d40659c25ecb50b(props);
	let ref = (0, import_react.useRef)(null);
	let { triggerProps, tooltipProps } = $4e1b34546679e357$export$a6da6c504e4bba8b(props, state, ref);
	return /* @__PURE__ */ import_react.createElement($64fa3d84918910a7$export$2881499e37b75b9a, { values: [[$4e3b923658d69c60$export$7a7623236eec67fa, state], [$4e3b923658d69c60$export$39ae08fa83328b12, {
		...tooltipProps,
		triggerRef: ref
	}]] }, /* @__PURE__ */ import_react.createElement($f645667febf57a63$export$13f3202a3e5ddd5, {
		...triggerProps,
		ref
	}, props.children));
}
var $4e3b923658d69c60$export$28c660c63b792dea = /* @__PURE__ */ (0, import_react.forwardRef)(function Tooltip({ UNSTABLE_portalContainer, ...props }, ref) {
	[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $4e3b923658d69c60$export$39ae08fa83328b12);
	let contextState = (0, import_react.useContext)($4e3b923658d69c60$export$7a7623236eec67fa);
	let localState = $8796f90736e175cb$export$4d40659c25ecb50b(props);
	let state = props.isOpen != null || props.defaultOpen != null || !contextState ? localState : contextState;
	let isExiting = $d3f049242431219c$export$45fda7c47f93fd48(ref, state.isOpen) || props.isExiting || false;
	if (!state.isOpen && !isExiting) return null;
	return /* @__PURE__ */ import_react.createElement($f57aed4a881a3485$export$b47c3594eab58386, { portalContainer: UNSTABLE_portalContainer }, /* @__PURE__ */ import_react.createElement($4e3b923658d69c60$var$TooltipInner, {
		...props,
		tooltipRef: ref,
		isExiting
	}));
});
function $4e3b923658d69c60$var$TooltipInner(props) {
	let state = (0, import_react.useContext)($4e3b923658d69c60$export$7a7623236eec67fa);
	let arrowRef = (0, import_react.useRef)(null);
	let { overlayProps, arrowProps, placement, triggerAnchorPoint } = $2a41e45df1593e64$export$d39e1813b3bdd0e1({
		placement: props.placement || "top",
		targetRef: props.triggerRef,
		overlayRef: props.tooltipRef,
		arrowRef,
		offset: props.offset,
		crossOffset: props.crossOffset,
		isOpen: state.isOpen,
		arrowBoundaryOffset: props.arrowBoundaryOffset,
		shouldFlip: props.shouldFlip,
		containerPadding: props.containerPadding,
		onClose: () => state.close(true)
	});
	let isEntering = $d3f049242431219c$export$6d3443f2c48bfc20(props.tooltipRef, !!placement) || props.isEntering || false;
	let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
		...props,
		defaultClassName: "react-aria-Tooltip",
		values: {
			placement,
			isEntering,
			isExiting: props.isExiting,
			state
		}
	});
	props = $3ef42575df84b30b$export$9d1611c77c2fe928(props, overlayProps);
	let { tooltipProps } = $326e436e94273fe1$export$1c4b08e0eca38426(props, state);
	let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, { global: true });
	return /* @__PURE__ */ import_react.createElement($64fa3d84918910a7$export$df3a06d6289f983e.div, {
		...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, tooltipProps),
		ref: props.tooltipRef,
		style: {
			...overlayProps.style,
			"--trigger-anchor-point": triggerAnchorPoint ? `${triggerAnchorPoint.x}px ${triggerAnchorPoint.y}px` : void 0,
			...renderProps.style
		},
		"data-placement": placement !== null && placement !== void 0 ? placement : void 0,
		"data-entering": isEntering || void 0,
		"data-exiting": props.isExiting || void 0
	}, /* @__PURE__ */ import_react.createElement($44f671af83e7d9e0$export$2de4954e8ae13b9f.Provider, { value: {
		...arrowProps,
		placement,
		ref: arrowRef
	} }, renderProps.children));
}
//#endregion
//#region ../component-library/src/Button.tsx
var backgroundColor = {
	normal: theme.buttonNormalBackground,
	normalDisabled: theme.buttonNormalDisabledBackground,
	primary: theme.buttonPrimaryBackground,
	primaryDisabled: theme.buttonPrimaryDisabledBackground,
	bare: theme.buttonBareBackground,
	bareDisabled: theme.buttonBareDisabledBackground,
	menu: theme.buttonMenuBackground,
	menuSelected: theme.buttonMenuSelectedBackground
};
var backgroundColorHover = {
	normal: theme.buttonNormalBackgroundHover,
	primary: theme.buttonPrimaryBackgroundHover,
	bare: theme.buttonBareBackgroundHover,
	menu: theme.buttonMenuBackgroundHover,
	menuSelected: theme.buttonMenuSelectedBackgroundHover,
	normalDisabled: "transparent",
	primaryDisabled: "transparent",
	bareDisabled: "transparent",
	menuDisabled: "transparent",
	menuSelectedDisabled: "transparent"
};
var borderColor = {
	normal: theme.buttonNormalBorder,
	normalDisabled: theme.buttonNormalDisabledBorder,
	primary: theme.buttonPrimaryBorder,
	primaryDisabled: theme.buttonPrimaryDisabledBorder,
	menu: theme.buttonMenuBorder,
	menuSelected: theme.buttonMenuSelectedBorder
};
var textColor = {
	normal: theme.buttonNormalText,
	normalDisabled: theme.buttonNormalDisabledText,
	primary: theme.buttonPrimaryText,
	primaryDisabled: theme.buttonPrimaryDisabledText,
	bare: theme.buttonBareText,
	bareDisabled: theme.buttonBareDisabledText,
	menu: theme.buttonMenuText,
	menuSelected: theme.buttonMenuSelectedText
};
var textColorHover = {
	normal: theme.buttonNormalTextHover,
	primary: theme.buttonPrimaryTextHover,
	bare: theme.buttonBareTextHover,
	menu: theme.buttonMenuTextHover,
	menuSelected: theme.buttonMenuSelectedTextHover
};
var _getBorder = (variant, variantWithDisabled) => {
	switch (variant) {
		case "bare": return "none";
		default: return "1px solid " + borderColor[variantWithDisabled];
	}
};
var _getPadding = (variant) => {
	switch (variant) {
		case "bare": return "5px";
		default: return "5px 10px";
	}
};
var _getHoveredStyles = (variant) => ({
	...variant !== "bare" && styles.shadow,
	backgroundColor: backgroundColorHover[variant],
	color: textColorHover[variant],
	cursor: "pointer"
});
var _getActiveStyles = (variant, bounce) => {
	switch (variant) {
		case "bare": return { backgroundColor: theme.buttonBareBackgroundActive };
		default: return {
			transform: bounce ? "translateY(1px)" : void 0,
			boxShadow: `0 1px 4px 0 ${variant === "primary" ? theme.buttonPrimaryShadow : theme.buttonNormalShadow}`,
			transition: "none"
		};
	}
};
var Button = (0, import_react.forwardRef)((props, ref) => {
	const { children, variant = "normal", bounce = true, ...restProps } = props;
	const variantWithDisabled = props.isDisabled ? `${variant}Disabled` : variant;
	const defaultButtonClassName = (0, import_react.useMemo)(() => css({
		alignItems: "center",
		justifyContent: "center",
		flexShrink: 0,
		padding: _getPadding(variant),
		margin: 0,
		overflow: "hidden",
		display: "flex",
		borderRadius: 4,
		backgroundColor: backgroundColor[variantWithDisabled],
		border: _getBorder(variant, variantWithDisabled),
		color: textColor[variantWithDisabled],
		transition: "box-shadow .25s",
		WebkitAppRegion: "no-drag",
		...styles.smallText,
		"&[data-hovered]": _getHoveredStyles(variant),
		"&[data-pressed]": _getActiveStyles(variant, bounce)
	}), [
		bounce,
		variant,
		variantWithDisabled
	]);
	const className = restProps.className;
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)($d2b4bc8c273e7be6$export$353f5b6fc5456de1, {
		ref,
		...restProps,
		className: typeof className === "function" ? (renderProps) => cx(defaultButtonClassName, className(renderProps)) : cx(defaultButtonClassName, className),
		children
	});
});
Button.displayName = "Button";
var ButtonWithLoading = (0, import_react.forwardRef)((props, ref) => {
	const { isLoading, children, style, ...buttonProps } = props;
	return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button, {
		...buttonProps,
		ref,
		style: (buttonRenderProps) => ({
			position: "relative",
			...typeof style === "function" ? style(buttonRenderProps) : style
		}),
		children: [isLoading && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: {
				position: "absolute",
				top: 0,
				left: 0,
				right: 0,
				bottom: 0,
				alignItems: "center",
				justifyContent: "center"
			},
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AnimatedLoading, { style: {
				width: 20,
				height: 20
			} })
		}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: {
				opacity: isLoading ? 0 : 1,
				flexDirection: "row",
				alignItems: "center"
			},
			children
		})]
	});
});
ButtonWithLoading.displayName = "ButtonWithLoading";
//#endregion
//#region ../component-library/src/Text.tsx
var Text = (0, import_react.forwardRef)((props, ref) => {
	const { className = "", style, innerRef, ...restProps } = props;
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
		...restProps,
		ref: innerRef ?? ref,
		className: cx(className, css(style))
	});
});
Text.displayName = "Text";
//#endregion
//#region src/components/common/Link.tsx
var externalLinkColors = {
	purple: theme.pageTextPositive,
	blue: theme.pageTextLink,
	muted: "inherit"
};
var ExternalLink = (t0) => {
	const $ = (0, import_compiler_runtime.c)(7);
	const { children, to, linkColor: t1, onClick } = t0;
	const linkColor = t1 === void 0 ? "blue" : t1;
	const t2 = to ?? "";
	const t3 = externalLinkColors[linkColor];
	let t4;
	if ($[0] !== t3) {
		t4 = { color: t3 };
		$[0] = t3;
		$[1] = t4;
	} else t4 = $[1];
	let t5;
	if ($[2] !== children || $[3] !== onClick || $[4] !== t2 || $[5] !== t4) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
			href: t2,
			target: "_blank",
			rel: "noopener noreferrer",
			style: t4,
			onClick,
			children
		});
		$[2] = children;
		$[3] = onClick;
		$[4] = t2;
		$[5] = t4;
		$[6] = t5;
	} else t5 = $[6];
	return t5;
};
var TextLink = (t0) => {
	const $ = (0, import_compiler_runtime.c)(13);
	let children;
	let onClick;
	let props;
	let style;
	if ($[0] !== t0) {
		({style, onClick, children, ...props} = t0);
		$[0] = t0;
		$[1] = children;
		$[2] = onClick;
		$[3] = props;
		$[4] = style;
	} else {
		children = $[1];
		onClick = $[2];
		props = $[3];
		style = $[4];
	}
	let t1;
	if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = { boxShadow: "none" };
		$[5] = t1;
	} else t1 = $[5];
	let t2;
	if ($[6] !== style) {
		t2 = {
			backgroundColor: "transparent",
			display: "inline",
			border: 0,
			cursor: "pointer",
			textDecoration: "underline",
			":hover": t1,
			...style
		};
		$[6] = style;
		$[7] = t2;
	} else t2 = $[7];
	let t3;
	if ($[8] !== children || $[9] !== onClick || $[10] !== props || $[11] !== t2) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
			style: t2,
			...props,
			onClick,
			children
		});
		$[8] = children;
		$[9] = onClick;
		$[10] = props;
		$[11] = t2;
		$[12] = t3;
	} else t3 = $[12];
	return t3;
};
var ButtonLink = (t0) => {
	const $ = (0, import_compiler_runtime.c)(19);
	let activeStyle;
	let props;
	let style;
	let to;
	if ($[0] !== t0) {
		({to, style, activeStyle, ...props} = t0);
		$[0] = t0;
		$[1] = activeStyle;
		$[2] = props;
		$[3] = style;
		$[4] = to;
	} else {
		activeStyle = $[1];
		props = $[2];
		style = $[3];
		to = $[4];
	}
	const navigate = useNavigate();
	const path = to ?? "";
	let t1;
	if ($[5] !== path) {
		t1 = {
			path,
			end: false
		};
		$[5] = path;
		$[6] = t1;
	} else t1 = $[6];
	const match = useMatch(t1);
	let t2;
	if ($[7] !== activeStyle || $[8] !== match || $[9] !== style) {
		t2 = () => String(css({
			...style,
			"&[data-pressed]": activeStyle,
			...match ? activeStyle : {}
		}));
		$[7] = activeStyle;
		$[8] = match;
		$[9] = style;
		$[10] = t2;
	} else t2 = $[10];
	let t3;
	if ($[11] !== navigate || $[12] !== path || $[13] !== props) {
		t3 = (e) => {
			props.onPress?.(e);
			navigate(path);
		};
		$[11] = navigate;
		$[12] = path;
		$[13] = props;
		$[14] = t3;
	} else t3 = $[14];
	let t4;
	if ($[15] !== props || $[16] !== t2 || $[17] !== t3) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
			className: t2,
			...props,
			variant: props.buttonVariant,
			onPress: t3
		});
		$[15] = props;
		$[16] = t2;
		$[17] = t3;
		$[18] = t4;
	} else t4 = $[18];
	return t4;
};
var InternalLink = (t0) => {
	const $ = (0, import_compiler_runtime.c)(13);
	const { to, style, activeStyle, children, isDisabled, isExactPathMatch: t1 } = t0;
	const isExactPathMatch = t1 === void 0 ? false : t1;
	const path = to ?? "";
	let t2;
	if ($[0] !== isExactPathMatch || $[1] !== path) {
		t2 = {
			path,
			end: isExactPathMatch
		};
		$[0] = isExactPathMatch;
		$[1] = path;
		$[2] = t2;
	} else t2 = $[2];
	const t3 = useMatch(t2) ? activeStyle : null;
	let t4;
	if ($[3] !== style || $[4] !== t3) {
		t4 = css([
			styles.smallText,
			style,
			t3
		]);
		$[3] = style;
		$[4] = t3;
		$[5] = t4;
	} else t4 = $[5];
	let t5;
	if ($[6] !== isDisabled) {
		t5 = (e) => {
			if (isDisabled) e.preventDefault();
		};
		$[6] = isDisabled;
		$[7] = t5;
	} else t5 = $[7];
	let t6;
	if ($[8] !== children || $[9] !== path || $[10] !== t4 || $[11] !== t5) {
		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NavLink, {
			to: path,
			className: t4,
			onClick: t5,
			children
		});
		$[8] = children;
		$[9] = path;
		$[10] = t4;
		$[11] = t5;
		$[12] = t6;
	} else t6 = $[12];
	return t6;
};
function Link(props) {
	const $ = (0, import_compiler_runtime.c)(16);
	switch (props.variant) {
		case "internal": {
			let internalProps;
			if ($[0] !== props) {
				const { variant: __2, ...t0 } = props;
				internalProps = t0;
				$[0] = props;
				$[1] = internalProps;
			} else internalProps = $[1];
			let t0;
			if ($[2] !== internalProps) {
				t0 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InternalLink, { ...internalProps });
				$[2] = internalProps;
				$[3] = t0;
			} else t0 = $[3];
			return t0;
		}
		case "external": {
			let externalProps;
			if ($[4] !== props) {
				const { variant: __1, ...t0 } = props;
				externalProps = t0;
				$[4] = props;
				$[5] = externalProps;
			} else externalProps = $[5];
			let t0;
			if ($[6] !== externalProps) {
				t0 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ExternalLink, { ...externalProps });
				$[6] = externalProps;
				$[7] = t0;
			} else t0 = $[7];
			return t0;
		}
		case "button": {
			let buttonProps;
			if ($[8] !== props) {
				const { variant: __0, ...t0 } = props;
				buttonProps = t0;
				$[8] = props;
				$[9] = buttonProps;
			} else buttonProps = $[9];
			let t0;
			if ($[10] !== buttonProps) {
				t0 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ButtonLink, { ...buttonProps });
				$[10] = buttonProps;
				$[11] = t0;
			} else t0 = $[11];
			return t0;
		}
		case "text": {
			let textProps;
			if ($[12] !== props) {
				const { variant: _, ...t0 } = props;
				textProps = t0;
				$[12] = props;
				$[13] = textProps;
			} else textProps = $[13];
			let t0;
			if ($[14] !== textProps) {
				t0 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextLink, { ...textProps });
				$[14] = textProps;
				$[15] = t0;
			} else t0 = $[15];
			return t0;
		}
		default: throw new Error("Unrecognised Link variant.");
	}
}
//#endregion
//#region ../component-library/src/SpaceBetween.tsx
var SpaceBetween = ({ direction = "horizontal", gap = 15, wrap = true, align = "center", style, children, ...props }) => {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
		style: {
			flexWrap: wrap ? "wrap" : "nowrap",
			flexDirection: direction === "horizontal" ? "row" : "column",
			alignItems: align,
			gap,
			...style
		},
		...props,
		children
	});
};
//#endregion
//#region src/hooks/useModalState.ts
function useModalState() {
	const modalStack = useSelector((state) => state.modals.modalStack);
	const isHidden = useSelector((state) => state.modals.isHidden);
	const dispatch = useDispatch();
	const popModalCallback = (0, import_react.useCallback)(() => {
		dispatch(popModal());
	}, [dispatch]);
	const lastModal = modalStack[modalStack.length - 1];
	const isActive = (0, import_react.useCallback)((name) => {
		if (!lastModal || name === lastModal.name) return true;
		return false;
	}, [lastModal]);
	return {
		onClose: popModalCallback,
		modalStack,
		activeModal: lastModal?.name,
		isActive,
		isHidden
	};
}
//#endregion
//#region ../../node_modules/usehooks-ts/dist/index.js
var import_lodash_debounce = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
	/**
	* lodash (Custom Build) <https://lodash.com/>
	* Build: `lodash modularize exports="npm" -o ./`
	* Copyright jQuery Foundation and other contributors <https://jquery.org/>
	* Released under MIT license <https://lodash.com/license>
	* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
	* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
	*/
	/** Used as the `TypeError` message for "Functions" methods. */
	var FUNC_ERROR_TEXT = "Expected a function";
	/** Used as references for various `Number` constants. */
	var NAN = NaN;
	/** `Object#toString` result references. */
	var symbolTag = "[object Symbol]";
	/** Used to match leading and trailing whitespace. */
	var reTrim = /^\s+|\s+$/g;
	/** Used to detect bad signed hexadecimal string values. */
	var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
	/** Used to detect binary string values. */
	var reIsBinary = /^0b[01]+$/i;
	/** Used to detect octal string values. */
	var reIsOctal = /^0o[0-7]+$/i;
	/** Built-in method references without a dependency on `root`. */
	var freeParseInt = parseInt;
	/** Detect free variable `global` from Node.js. */
	var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
	/** Detect free variable `self`. */
	var freeSelf = typeof self == "object" && self && self.Object === Object && self;
	/** Used as a reference to the global object. */
	var root = freeGlobal || freeSelf || Function("return this")();
	/**
	* Used to resolve the
	* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
	* of values.
	*/
	var objectToString = Object.prototype.toString;
	var nativeMax = Math.max, nativeMin = Math.min;
	/**
	* Gets the timestamp of the number of milliseconds that have elapsed since
	* the Unix epoch (1 January 1970 00:00:00 UTC).
	*
	* @static
	* @memberOf _
	* @since 2.4.0
	* @category Date
	* @returns {number} Returns the timestamp.
	* @example
	*
	* _.defer(function(stamp) {
	*   console.log(_.now() - stamp);
	* }, _.now());
	* // => Logs the number of milliseconds it took for the deferred invocation.
	*/
	var now = function() {
		return root.Date.now();
	};
	/**
	* Creates a debounced function that delays invoking `func` until after `wait`
	* milliseconds have elapsed since the last time the debounced function was
	* invoked. The debounced function comes with a `cancel` method to cancel
	* delayed `func` invocations and a `flush` method to immediately invoke them.
	* Provide `options` to indicate whether `func` should be invoked on the
	* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
	* with the last arguments provided to the debounced function. Subsequent
	* calls to the debounced function return the result of the last `func`
	* invocation.
	*
	* **Note:** If `leading` and `trailing` options are `true`, `func` is
	* invoked on the trailing edge of the timeout only if the debounced function
	* is invoked more than once during the `wait` timeout.
	*
	* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
	* until to the next tick, similar to `setTimeout` with a timeout of `0`.
	*
	* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
	* for details over the differences between `_.debounce` and `_.throttle`.
	*
	* @static
	* @memberOf _
	* @since 0.1.0
	* @category Function
	* @param {Function} func The function to debounce.
	* @param {number} [wait=0] The number of milliseconds to delay.
	* @param {Object} [options={}] The options object.
	* @param {boolean} [options.leading=false]
	*  Specify invoking on the leading edge of the timeout.
	* @param {number} [options.maxWait]
	*  The maximum time `func` is allowed to be delayed before it's invoked.
	* @param {boolean} [options.trailing=true]
	*  Specify invoking on the trailing edge of the timeout.
	* @returns {Function} Returns the new debounced function.
	* @example
	*
	* // Avoid costly calculations while the window size is in flux.
	* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
	*
	* // Invoke `sendMail` when clicked, debouncing subsequent calls.
	* jQuery(element).on('click', _.debounce(sendMail, 300, {
	*   'leading': true,
	*   'trailing': false
	* }));
	*
	* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
	* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
	* var source = new EventSource('/stream');
	* jQuery(source).on('message', debounced);
	*
	* // Cancel the trailing debounced invocation.
	* jQuery(window).on('popstate', debounced.cancel);
	*/
	function debounce(func, wait, options) {
		var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
		if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT);
		wait = toNumber(wait) || 0;
		if (isObject(options)) {
			leading = !!options.leading;
			maxing = "maxWait" in options;
			maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
			trailing = "trailing" in options ? !!options.trailing : trailing;
		}
		function invokeFunc(time) {
			var args = lastArgs, thisArg = lastThis;
			lastArgs = lastThis = void 0;
			lastInvokeTime = time;
			result = func.apply(thisArg, args);
			return result;
		}
		function leadingEdge(time) {
			lastInvokeTime = time;
			timerId = setTimeout(timerExpired, wait);
			return leading ? invokeFunc(time) : result;
		}
		function remainingWait(time) {
			var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, result = wait - timeSinceLastCall;
			return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
		}
		function shouldInvoke(time) {
			var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
			return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
		}
		function timerExpired() {
			var time = now();
			if (shouldInvoke(time)) return trailingEdge(time);
			timerId = setTimeout(timerExpired, remainingWait(time));
		}
		function trailingEdge(time) {
			timerId = void 0;
			if (trailing && lastArgs) return invokeFunc(time);
			lastArgs = lastThis = void 0;
			return result;
		}
		function cancel() {
			if (timerId !== void 0) clearTimeout(timerId);
			lastInvokeTime = 0;
			lastArgs = lastCallTime = lastThis = timerId = void 0;
		}
		function flush() {
			return timerId === void 0 ? result : trailingEdge(now());
		}
		function debounced() {
			var time = now(), isInvoking = shouldInvoke(time);
			lastArgs = arguments;
			lastThis = this;
			lastCallTime = time;
			if (isInvoking) {
				if (timerId === void 0) return leadingEdge(lastCallTime);
				if (maxing) {
					timerId = setTimeout(timerExpired, wait);
					return invokeFunc(lastCallTime);
				}
			}
			if (timerId === void 0) timerId = setTimeout(timerExpired, wait);
			return result;
		}
		debounced.cancel = cancel;
		debounced.flush = flush;
		return debounced;
	}
	/**
	* Checks if `value` is the
	* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
	* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
	*
	* @static
	* @memberOf _
	* @since 0.1.0
	* @category Lang
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is an object, else `false`.
	* @example
	*
	* _.isObject({});
	* // => true
	*
	* _.isObject([1, 2, 3]);
	* // => true
	*
	* _.isObject(_.noop);
	* // => true
	*
	* _.isObject(null);
	* // => false
	*/
	function isObject(value) {
		var type = typeof value;
		return !!value && (type == "object" || type == "function");
	}
	/**
	* Checks if `value` is object-like. A value is object-like if it's not `null`
	* and has a `typeof` result of "object".
	*
	* @static
	* @memberOf _
	* @since 4.0.0
	* @category Lang
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
	* @example
	*
	* _.isObjectLike({});
	* // => true
	*
	* _.isObjectLike([1, 2, 3]);
	* // => true
	*
	* _.isObjectLike(_.noop);
	* // => false
	*
	* _.isObjectLike(null);
	* // => false
	*/
	function isObjectLike(value) {
		return !!value && typeof value == "object";
	}
	/**
	* Checks if `value` is classified as a `Symbol` primitive or object.
	*
	* @static
	* @memberOf _
	* @since 4.0.0
	* @category Lang
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
	* @example
	*
	* _.isSymbol(Symbol.iterator);
	* // => true
	*
	* _.isSymbol('abc');
	* // => false
	*/
	function isSymbol(value) {
		return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
	}
	/**
	* Converts `value` to a number.
	*
	* @static
	* @memberOf _
	* @since 4.0.0
	* @category Lang
	* @param {*} value The value to process.
	* @returns {number} Returns the number.
	* @example
	*
	* _.toNumber(3.2);
	* // => 3.2
	*
	* _.toNumber(Number.MIN_VALUE);
	* // => 5e-324
	*
	* _.toNumber(Infinity);
	* // => Infinity
	*
	* _.toNumber('3.2');
	* // => 3.2
	*/
	function toNumber(value) {
		if (typeof value == "number") return value;
		if (isSymbol(value)) return NAN;
		if (isObject(value)) {
			var other = typeof value.valueOf == "function" ? value.valueOf() : value;
			value = isObject(other) ? other + "" : other;
		}
		if (typeof value != "string") return value === 0 ? value : +value;
		value = value.replace(reTrim, "");
		var isBinary = reIsBinary.test(value);
		return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
	}
	module.exports = debounce;
})))(), 1);
var useIsomorphicLayoutEffect$1 = typeof window !== "undefined" ? import_react.useLayoutEffect : import_react.useEffect;
function useEventListener(eventName, handler, element, options) {
	const savedHandler = (0, import_react.useRef)(handler);
	useIsomorphicLayoutEffect$1(() => {
		savedHandler.current = handler;
	}, [handler]);
	(0, import_react.useEffect)(() => {
		const targetElement = (element == null ? void 0 : element.current) ?? window;
		if (!(targetElement && targetElement.addEventListener)) return;
		const listener = (event) => {
			savedHandler.current(event);
		};
		targetElement.addEventListener(eventName, listener, options);
		return () => {
			targetElement.removeEventListener(eventName, listener, options);
		};
	}, [
		eventName,
		element,
		options
	]);
}
function useEventCallback(fn) {
	const ref = (0, import_react.useRef)(() => {
		throw new Error("Cannot call an event handler while rendering.");
	});
	useIsomorphicLayoutEffect$1(() => {
		ref.current = fn;
	}, [fn]);
	return (0, import_react.useCallback)((...args) => {
		var _a;
		return (_a = ref.current) == null ? void 0 : _a.call(ref, ...args);
	}, [ref]);
}
var IS_SERVER = typeof window === "undefined";
function useLocalStorage(key, initialValue, options = {}) {
	const { initializeWithValue = true } = options;
	const serializer = (0, import_react.useCallback)((value) => {
		if (options.serializer) return options.serializer(value);
		return JSON.stringify(value);
	}, [options]);
	const deserializer = (0, import_react.useCallback)((value) => {
		if (options.deserializer) return options.deserializer(value);
		if (value === "undefined") return;
		const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;
		let parsed;
		try {
			parsed = JSON.parse(value);
		} catch (error) {
			console.error("Error parsing JSON:", error);
			return defaultValue;
		}
		return parsed;
	}, [options, initialValue]);
	const readValue = (0, import_react.useCallback)(() => {
		const initialValueToUse = initialValue instanceof Function ? initialValue() : initialValue;
		if (IS_SERVER) return initialValueToUse;
		try {
			const raw = window.localStorage.getItem(key);
			return raw ? deserializer(raw) : initialValueToUse;
		} catch (error) {
			console.warn(`Error reading localStorage key \u201C${key}\u201D:`, error);
			return initialValueToUse;
		}
	}, [
		initialValue,
		key,
		deserializer
	]);
	const [storedValue, setStoredValue] = (0, import_react.useState)(() => {
		if (initializeWithValue) return readValue();
		return initialValue instanceof Function ? initialValue() : initialValue;
	});
	const setValue = useEventCallback((value) => {
		if (IS_SERVER) console.warn(`Tried setting localStorage key \u201C${key}\u201D even though environment is not a client`);
		try {
			const newValue = value instanceof Function ? value(readValue()) : value;
			window.localStorage.setItem(key, serializer(newValue));
			setStoredValue(newValue);
			window.dispatchEvent(new StorageEvent("local-storage", { key }));
		} catch (error) {
			console.warn(`Error setting localStorage key \u201C${key}\u201D:`, error);
		}
	});
	const removeValue = useEventCallback(() => {
		if (IS_SERVER) console.warn(`Tried removing localStorage key \u201C${key}\u201D even though environment is not a client`);
		const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;
		window.localStorage.removeItem(key);
		setStoredValue(defaultValue);
		window.dispatchEvent(new StorageEvent("local-storage", { key }));
	});
	(0, import_react.useEffect)(() => {
		setStoredValue(readValue());
	}, [key]);
	const handleStorageChange = (0, import_react.useCallback)((event) => {
		if (event.key && event.key !== key) return;
		setStoredValue(readValue());
	}, [key, readValue]);
	useEventListener("storage", handleStorageChange);
	useEventListener("local-storage", handleStorageChange);
	return [
		storedValue,
		setValue,
		removeValue
	];
}
function useUnmount(func) {
	const funcRef = (0, import_react.useRef)(func);
	funcRef.current = func;
	(0, import_react.useEffect)(() => () => {
		funcRef.current();
	}, []);
}
function useDebounceCallback(func, delay = 500, options) {
	const debouncedFunc = (0, import_react.useRef)();
	useUnmount(() => {
		if (debouncedFunc.current) debouncedFunc.current.cancel();
	});
	const debounced = (0, import_react.useMemo)(() => {
		const debouncedFuncInstance = (0, import_lodash_debounce.default)(func, delay, options);
		const wrappedFunc = (...args) => {
			return debouncedFuncInstance(...args);
		};
		wrappedFunc.cancel = () => {
			debouncedFuncInstance.cancel();
		};
		wrappedFunc.isPending = () => {
			return !!debouncedFunc.current;
		};
		wrappedFunc.flush = () => {
			return debouncedFuncInstance.flush();
		};
		return wrappedFunc;
	}, [
		func,
		delay,
		options
	]);
	(0, import_react.useEffect)(() => {
		debouncedFunc.current = (0, import_lodash_debounce.default)(func, delay, options);
	}, [
		func,
		delay,
		options
	]);
	return debounced;
}
function useHover(elementRef) {
	const [value, setValue] = (0, import_react.useState)(false);
	const handleMouseEnter = () => {
		setValue(true);
	};
	const handleMouseLeave = () => {
		setValue(false);
	};
	useEventListener("mouseenter", handleMouseEnter, elementRef);
	useEventListener("mouseleave", handleMouseLeave, elementRef);
	return value;
}
function useToggle(defaultValue) {
	const [value, setValue] = (0, import_react.useState)(!!defaultValue);
	return [
		value,
		(0, import_react.useCallback)(() => {
			setValue((x) => !x);
		}, []),
		setValue
	];
}
var IS_SERVER7 = typeof window === "undefined";
function useWindowSize(options = {}) {
	let { initializeWithValue = true } = options;
	if (IS_SERVER7) initializeWithValue = false;
	const [windowSize, setWindowSize] = (0, import_react.useState)(() => {
		if (initializeWithValue) return {
			width: window.innerWidth,
			height: window.innerHeight
		};
		return {
			width: void 0,
			height: void 0
		};
	});
	const debouncedSetWindowSize = useDebounceCallback(setWindowSize, options.debounceDelay);
	function handleSize() {
		(options.debounceDelay ? debouncedSetWindowSize : setWindowSize)({
			width: window.innerWidth,
			height: window.innerHeight
		});
	}
	useEventListener("resize", handleSize);
	useIsomorphicLayoutEffect$1(() => {
		handleSize();
	}, []);
	return windowSize;
}
//#endregion
//#region ../component-library/src/hooks/useResponsive.ts
function useResponsive() {
	const { height, width } = useWindowSize({ debounceDelay: 250 });
	return {
		atLeastMediumWidth: width >= breakpoints.medium,
		isNarrowWidth: width < breakpoints.small,
		isSmallWidth: width >= breakpoints.small && width < breakpoints.medium,
		isMediumWidth: width >= breakpoints.medium && width < breakpoints.wide,
		isWideWidth: width >= breakpoints.wide,
		height,
		width
	};
}
//#endregion
//#region ../component-library/src/icons/logo/Logo.tsx
var SvgLogo = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	fill: "none",
	viewBox: "0 0 30 32",
	style: {
		color: "inherit",
		...props.style
	},
	children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		fill: "currentColor",
		d: "m1.138 30.423 13.8-29.309a.32.32 0 0 1 .289-.184h.605a.32.32 0 0 1 .287.18l8.903 18.29 2.791-1.074a.32.32 0 0 1 .414.184l.742 1.932a.32.32 0 0 1-.183.413l-2.574.99 3.175 6.524a.32.32 0 0 1-.147.428l-1.861.905a.32.32 0 0 1-.428-.147l-3.277-6.733-21.98 8.453a.32.32 0 0 1-.415-.189l-.152-.418a.32.32 0 0 1 .01-.245M15.56 6.152 5.85 26.774l16.634-6.398z"
	}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		fill: "currentColor",
		d: "m21.777 14.568.932 2.544-21.203 7.775a.32.32 0 0 1-.41-.19l-.713-1.944a.32.32 0 0 1 .19-.41z"
	})]
});
//#endregion
//#region ../component-library/src/icons/v0/Add.tsx
var SvgAdd$1 = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M23 11.5a1.5 1.5 0 0 1-1.5 1.5h-20a1.5 1.5 0 0 1 0-3h20a1.5 1.5 0 0 1 1.5 1.5",
		fill: "currentColor"
	}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M11.5 23a1.5 1.5 0 0 1-1.5-1.5v-20a1.5 1.5 0 0 1 3 0v20a1.5 1.5 0 0 1-1.5 1.5",
		fill: "currentColor"
	})]
});
//#endregion
//#region ../component-library/src/icons/v0/Delete.tsx
var SvgDelete = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		fill: "none",
		stroke: "currentColor",
		d: "m2 2 20 20M22 2 2 22",
		strokeLinecap: "round",
		strokeMiterlimit: 10,
		strokeWidth: 4
	})
});
//#endregion
//#region ../component-library/src/icons/v0/ExpandArrow.tsx
var SvgExpandArrow = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 25 15",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		fill: "currentColor",
		d: "M24.483.576q-.463-.49-1.097-.49H1.56q-.633 0-1.096.49A1.64 1.64 0 0 0 0 1.737q0 .671.463 1.161l10.913 11.558q.465.49 1.097.49.633 0 1.096-.49L24.483 2.898q.462-.49.463-1.16 0-.672-.463-1.162"
	})
});
//#endregion
//#region ../component-library/src/icons/v0/LeftArrow2.tsx
var SvgLeftArrow2 = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 91 51",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		fill: "currentColor",
		d: "M30.256 48.614a3.14 3.14 0 0 0-.989-2.153L10.803 29.063h76.915a3 3 0 0 0 .315 0c1.584-.084 2.95-1.64 2.867-3.266-.082-1.625-1.598-3.028-3.182-2.943H10.803L29.267 5.49c1.284-1.099 1.456-3.057.385-4.373a2.972 2.972 0 0 0-4.48-.187L.971 23.695a3.163 3.163 0 0 0 0 4.56l24.2 22.766a2.98 2.98 0 0 0 2.205.84c1.669-.08 2.958-1.534 2.88-3.247"
	})
});
//#endregion
//#region ../component-library/src/icons/v0/RightArrow2.tsx
var SvgRightArrow2 = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 91 51",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		fill: "currentColor",
		d: "M63.004.003a3 3 0 0 0-1.875 5.219L79.44 22.034H3.16a3 3 0 0 0-.313 0c-1.57.082-2.925 1.585-2.843 3.156s1.585 2.926 3.156 2.844H79.44L61.129 44.815a3 3 0 1 0 4.062 4.407l24-22a3 3 0 0 0 0-4.407l-24-22a3 3 0 0 0-2.187-.812"
	})
});
//#endregion
//#region ../component-library/src/icons/v0/Subtract.tsx
var SvgSubtract$2 = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M23 11.5a1.5 1.5 0 0 1-1.5 1.5h-20a1.5 1.5 0 0 1 0-3h20a1.5 1.5 0 0 1 1.5 1.5",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v0/Merge.tsx
var SvgMerge = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	fill: "none",
	viewBox: "0 0 32 32",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		fill: "none",
		stroke: "currentColor",
		strokeLinecap: "round",
		strokeMiterlimit: 10,
		strokeWidth: 3.5,
		d: "M24 29h5.333M8 29H2.667M16 21l-8 8M16 21l8 8M16 2.667v18.666M16 2.667 8 9.333M16 2.667l8 6.666"
	})
});
//#endregion
//#region ../component-library/src/icons/v0/Split.tsx
var SvgSplit = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	fill: "none",
	viewBox: "0 0 32 32",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		fill: "none",
		stroke: "currentColor",
		strokeLinecap: "round",
		strokeMiterlimit: 10,
		strokeWidth: 3.5,
		d: "m30 9-4-4M30 9l-4 4M6 5 2 9M2 9l4 4M10 9H3M22 9h7M16 15l6-6M16 15l-6-6M16 28V15"
	})
});
//#endregion
//#region ../component-library/src/Input.tsx
var baseInputStyle = {
	outline: 0,
	backgroundColor: theme.tableBackground,
	color: theme.formInputText,
	margin: 0,
	padding: 5,
	borderRadius: 4,
	border: "1px solid " + theme.formInputBorder
};
var defaultInputClassName = css({
	...baseInputStyle,
	color: theme.formInputText,
	whiteSpace: "nowrap",
	overflow: "hidden",
	flexShrink: 0,
	"&[data-focused]": {
		border: "1px solid " + theme.formInputBorderSelected,
		boxShadow: "0 1px 1px " + theme.formInputShadowSelected
	},
	"&[data-disabled]": { color: theme.formInputTextPlaceholder },
	"::placeholder": { color: theme.formInputTextPlaceholder },
	...styles.smallText
});
function Input({ ref, onEnter, onEscape, onChangeValue, onUpdate, className, ...props }) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)($3985021b0ad6602f$export$f5b8910cec6cf069, {
		ref,
		className: typeof className === "function" ? (renderProps) => cx(defaultInputClassName, className(renderProps)) : cx(defaultInputClassName, className),
		...props,
		onKeyUp: (e) => {
			props.onKeyUp?.(e);
			if (e.key === "Enter" && onEnter) onEnter(e.currentTarget.value, e);
			if (e.key === "Escape" && onEscape) onEscape(e.currentTarget.value, e);
		},
		onBlur: (e) => {
			onUpdate?.(e.currentTarget.value, e);
			props.onBlur?.(e);
		},
		onChange: (e) => {
			onChangeValue?.(e.currentTarget.value, e);
			props.onChange?.(e);
		}
	});
}
var defaultBigInputClassName = css({
	padding: 10,
	fontSize: 15,
	border: "none",
	...styles.shadow,
	"&[data-focused]": {
		border: "none",
		...styles.shadow
	}
});
function BigInput({ className, ...props }) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
		...props,
		className: typeof className === "function" ? (renderProps) => cx(defaultBigInputClassName, className(renderProps)) : cx(defaultBigInputClassName, className)
	});
}
function ResponsiveInput(props) {
	const { isNarrowWidth } = useResponsive();
	return isNarrowWidth ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BigInput, { ...props }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, { ...props });
}
//#endregion
//#region ../component-library/src/TextOneLine.tsx
function TextOneLine({ children, ...props }) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
		...props,
		style: {
			...props.style,
			overflow: "hidden",
			textOverflow: "ellipsis",
			whiteSpace: "nowrap",
			display: "block"
		},
		children
	});
}
//#endregion
//#region ../../node_modules/auto-text-size/dist/index.mjs
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
	enumerable: true,
	configurable: true,
	writable: true,
	value
}) : obj[key] = value;
var __spreadValues = (a, b) => {
	for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);
	if (__getOwnPropSymbols) {
		for (var prop of __getOwnPropSymbols(b)) if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);
	}
	return a;
};
var __objRest = (source, exclude) => {
	var target = {};
	for (var prop in source) if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
	if (source != null && __getOwnPropSymbols) {
		for (var prop of __getOwnPropSymbols(source)) if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) target[prop] = source[prop];
	}
	return target;
};
function throttleAnimationFrame(func) {
	let wait = false;
	return () => {
		if (!wait) {
			wait = true;
			requestAnimationFrame(() => {
				func();
				wait = false;
			});
		}
	};
}
var antiOverflowAlgo = ({ fontSizePx, minFontSizePx, fontSizePrecisionPx, updateFontSizePx, breakPredicate: breakPred }) => {
	const maxIterCount = Math.ceil(1 / fontSizePrecisionPx);
	let iterCount = 0;
	while (fontSizePx > minFontSizePx && iterCount < maxIterCount) {
		if (breakPred()) break;
		fontSizePx = updateFontSizePx(fontSizePx - fontSizePrecisionPx);
		iterCount++;
	}
};
var getContentWidth = (element) => {
	const computedStyle = getComputedStyle(element);
	return element.clientWidth - parseFloat(computedStyle.paddingLeft) - parseFloat(computedStyle.paddingRight);
};
var getContentHeight = (element) => {
	const computedStyle = getComputedStyle(element);
	return element.clientHeight - parseFloat(computedStyle.paddingTop) - parseFloat(computedStyle.paddingBottom);
};
var multilineAlgo = (opts) => {
	opts.innerEl.style.whiteSpace = "nowrap";
	onelineAlgo(opts);
	if (opts.innerEl.scrollWidth > getContentWidth(opts.containerEl)) opts.innerEl.style.whiteSpace = "normal";
};
var onelineAlgo = ({ innerEl, containerEl, fontSizePx, minFontSizePx, maxFontSizePx, fontSizePrecisionPx, updateFontSizePx }) => {
	const maxIterCount = 10;
	let iterCount = 0;
	let prevOverflowFactor = 1;
	while (iterCount < maxIterCount) {
		const w0 = innerEl.scrollWidth;
		const w1 = getContentWidth(containerEl);
		const canGrow = fontSizePx < maxFontSizePx && w0 < w1;
		const canShrink = fontSizePx > minFontSizePx && w0 > w1;
		const overflowFactor = w0 / w1;
		if (prevOverflowFactor === overflowFactor) break;
		if (!(canGrow || canShrink)) break;
		const updatePx = fontSizePx / overflowFactor - fontSizePx;
		const prevFontSizePx = fontSizePx;
		fontSizePx = updateFontSizePx(fontSizePx + updatePx);
		if (Math.abs(fontSizePx - prevFontSizePx) <= fontSizePrecisionPx) break;
		prevOverflowFactor = overflowFactor;
		iterCount++;
	}
	antiOverflowAlgo({
		fontSizePx,
		minFontSizePx,
		updateFontSizePx,
		fontSizePrecisionPx,
		breakPredicate: () => innerEl.scrollWidth <= getContentWidth(containerEl)
	});
};
var boxAlgo = ({ innerEl, containerEl, fontSizePx, minFontSizePx, maxFontSizePx, fontSizePrecisionPx, updateFontSizePx }) => {
	const maxIterCount = 100;
	fontSizePx = updateFontSizePx((maxFontSizePx - minFontSizePx) * .5);
	let updatePx = (maxFontSizePx - minFontSizePx) * .25;
	let iterCount = 0;
	while (updatePx > fontSizePrecisionPx && iterCount < maxIterCount) {
		const w0 = innerEl.scrollWidth;
		const w1 = getContentWidth(containerEl);
		const h0 = innerEl.scrollHeight;
		const h1 = getContentHeight(containerEl);
		if (w0 === w1 && h0 === h1) break;
		if (fontSizePx < maxFontSizePx && w0 <= w1 && h0 <= h1) fontSizePx = updateFontSizePx(fontSizePx + updatePx);
		else if (fontSizePx > minFontSizePx && (w0 > w1 || h0 > h1)) fontSizePx = updateFontSizePx(fontSizePx - updatePx);
		updatePx *= .5;
		iterCount++;
	}
	antiOverflowAlgo({
		fontSizePx,
		minFontSizePx,
		updateFontSizePx,
		fontSizePrecisionPx,
		breakPredicate: () => innerEl.scrollWidth <= getContentWidth(containerEl) && innerEl.scrollHeight <= getContentHeight(containerEl)
	});
};
function updateTextSize({ innerEl, containerEl, mode = "multiline", minFontSizePx = 8, maxFontSizePx = 160, fontSizePrecisionPx = .1 }) {
	performance.now();
	if (!isFinite(minFontSizePx)) throw new Error(`Invalid minFontSizePx (${minFontSizePx})`);
	if (!isFinite(minFontSizePx)) throw new Error(`Invalid maxFontSizePx (${maxFontSizePx})`);
	if (!isFinite(fontSizePrecisionPx) || fontSizePrecisionPx === 0) throw new Error(`Invalid fontSizePrecisionPx (${fontSizePrecisionPx})`);
	if (containerEl.children.length > 1) console.warn(`AutoTextSize has ${containerEl.children.length - 1} siblings. This may interfere with the algorithm.`);
	const containerStyles = {
		display: "flex",
		alignItems: "start"
	};
	const innerStyles = { display: "block" };
	if (mode === "oneline") innerStyles.whiteSpace = "nowrap";
	else if (mode === "multiline") innerStyles.wordBreak = "break-word";
	else if (mode === "box") {
		innerStyles.whiteSpace = "pre-wrap";
		innerStyles.wordBreak = "break-word";
	} else if (mode === "boxoneline") innerStyles.whiteSpace = "nowrap";
	Object.assign(containerEl.style, containerStyles);
	Object.assign(innerEl.style, innerStyles);
	const fontSizeStr = window.getComputedStyle(innerEl, null).getPropertyValue("font-size");
	let fontSizePx = parseFloat(fontSizeStr);
	let iterations = 0;
	const updateFontSizePx = (px) => {
		px = Math.min(Math.max(px, minFontSizePx), maxFontSizePx);
		fontSizePx = px;
		innerEl.style.fontSize = `${fontSizePx}px`;
		iterations++;
		return fontSizePx;
	};
	if (fontSizePx > maxFontSizePx || fontSizePx < minFontSizePx) updateFontSizePx(fontSizePx);
	const algoOpts = {
		innerEl,
		containerEl,
		fontSizePx,
		minFontSizePx,
		maxFontSizePx,
		fontSizePrecisionPx,
		updateFontSizePx
	};
	if (mode === "oneline") onelineAlgo(algoOpts);
	else if (mode === "multiline") multilineAlgo(algoOpts);
	else if (mode === "box") boxAlgo(algoOpts);
	else if (mode === "boxoneline") boxAlgo(algoOpts);
}
function autoTextSize({ innerEl, containerEl, mode, minFontSizePx, maxFontSizePx, fontSizePrecisionPx }) {
	let containerDimensions = void 0;
	const throttledUpdateTextSize = throttleAnimationFrame(() => {
		updateTextSize({
			innerEl,
			containerEl,
			mode,
			maxFontSizePx,
			minFontSizePx,
			fontSizePrecisionPx
		});
		containerDimensions = [getContentWidth(containerEl), getContentHeight(containerEl)];
	});
	const resizeObserver = new ResizeObserver(() => {
		const prevContainerDimensions = containerDimensions;
		containerDimensions = [getContentWidth(containerEl), getContentHeight(containerEl)];
		if ((prevContainerDimensions == null ? void 0 : prevContainerDimensions[0]) !== containerDimensions[0] || (prevContainerDimensions == null ? void 0 : prevContainerDimensions[1]) !== containerDimensions[1]) throttledUpdateTextSize();
	});
	resizeObserver.observe(containerEl);
	throttledUpdateTextSize.disconnect = () => resizeObserver.disconnect();
	return throttledUpdateTextSize;
}
function AutoTextSize(_a) {
	var _b = _a, { mode, minFontSizePx, maxFontSizePx, fontSizePrecisionPx, as: Comp = "div", children } = _b, rest = __objRest(_b, [
		"mode",
		"minFontSizePx",
		"maxFontSizePx",
		"fontSizePrecisionPx",
		"as",
		"children"
	]);
	const updateTextSizeRef = (0, import_react.useRef)();
	(0, import_react.useEffect)(() => {
		var _a2;
		return (_a2 = updateTextSizeRef.current) == null ? void 0 : _a2.call(updateTextSizeRef);
	}, [children]);
	const refCallback = (0, import_react.useCallback)((innerEl) => {
		var _a2;
		(_a2 = updateTextSizeRef.current) == null || _a2.disconnect();
		const containerEl = innerEl == null ? void 0 : innerEl.parentElement;
		if (!innerEl || !containerEl) return;
		updateTextSizeRef.current = autoTextSize({
			innerEl,
			containerEl,
			mode,
			minFontSizePx,
			maxFontSizePx,
			fontSizePrecisionPx
		});
	}, [
		mode,
		minFontSizePx,
		maxFontSizePx,
		fontSizePrecisionPx
	]);
	return /* @__PURE__ */ import_react.createElement(Comp, __spreadValues({ ref: refCallback }, rest), children);
}
//#endregion
//#region src/components/FeatureErrorFallback.tsx
function FeatureErrorFallback(t0) {
	const $ = (0, import_compiler_runtime.c)(14);
	const { error, resetErrorBoundary } = t0;
	let t1;
	let t2;
	if ($[0] !== error) {
		t1 = () => {
			console.error(error);
		};
		t2 = [error];
		$[0] = error;
		$[1] = t1;
		$[2] = t2;
	} else {
		t1 = $[1];
		t2 = $[2];
	}
	(0, import_react.useEffect)(t1, t2);
	const message = error instanceof Error ? error.message : void 0;
	let t3;
	if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
		t3 = {
			flex: 1,
			justifyContent: "center",
			alignItems: "center",
			padding: 20
		};
		$[3] = t3;
	} else t3 = $[3];
	let t4;
	if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
			style: {
				...styles.mediumText,
				color: theme.errorText
			},
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Something went wrong loading this section." })
		});
		$[4] = t4;
	} else t4 = $[4];
	let t5;
	if ($[5] !== message) {
		t5 = message && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
			style: {
				...styles.smallText,
				fontFamily: "monospace",
				color: theme.errorText,
				marginTop: 10,
				maxWidth: 600,
				textAlign: "center",
				userSelect: "text"
			},
			children: message
		});
		$[5] = message;
		$[6] = t5;
	} else t5 = $[6];
	let t6;
	let t7;
	if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
		t6 = { marginTop: 15 };
		t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Try again" });
		$[7] = t6;
		$[8] = t7;
	} else {
		t6 = $[7];
		t7 = $[8];
	}
	let t8;
	if ($[9] !== resetErrorBoundary) {
		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
			onPress: resetErrorBoundary,
			style: t6,
			children: t7
		});
		$[9] = resetErrorBoundary;
		$[10] = t8;
	} else t8 = $[10];
	let t9;
	if ($[11] !== t5 || $[12] !== t8) {
		t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t3,
			children: [
				t4,
				t5,
				t8
			]
		});
		$[11] = t5;
		$[12] = t8;
		$[13] = t9;
	} else t9 = $[13];
	return t9;
}
//#endregion
//#region src/components/common/Modal.tsx
var MODAL_Z_INDEX = 3e3;
var Modal = ({ name, isLoading = false, noAnimation = false, style, children, onClose, containerProps, ...props }) => {
	const { t } = useTranslation();
	const { isNarrowWidth } = useResponsive();
	const { enableScope, disableScope } = se$1();
	(0, import_react.useEffect)(() => {
		enableScope(name);
		return () => disableScope(name);
	}, [
		enableScope,
		disableScope,
		name
	]);
	const { isHidden, isActive, onClose: closeModal } = useModalState();
	const handleOnClose = () => {
		closeModal();
		onClose?.();
	};
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(m$1, {
		FallbackComponent: FeatureErrorFallback,
		children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)($f3f84453ead64de5$export$8948f78d83984c69, {
			"data-testid": `${name}-modal`,
			isDismissable: true,
			defaultOpen: true,
			onOpenChange: (isOpen) => !isOpen && handleOnClose?.(),
			style: {
				position: "fixed",
				inset: 0,
				zIndex: MODAL_Z_INDEX,
				fontSize: 14,
				...isNarrowWidth ? { backgroundColor: "rgba(0, 0, 0, 0.4)" } : { backdropFilter: "blur(1px) brightness(0.9)" },
				...style
			},
			...props,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
				style: {
					display: "flex",
					alignItems: "center",
					justifyContent: "center",
					height: "var(--visual-viewport-height)",
					overflowY: "auto"
				},
				children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)($f3f84453ead64de5$export$2b77a92f1a5ad772, { children: (modalProps) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)($de32f1b87079253c$export$3ddf2d174ce01153, {
					"aria-label": t("Modal dialog"),
					className: css(styles.lightScrollbar),
					style: { outline: "none" },
					children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ModalContentContainer, {
						noAnimation,
						isActive: isActive(name),
						...containerProps,
						style: {
							flex: 1,
							padding: 10,
							willChange: "opacity, transform",
							maxWidth: "90vw",
							minWidth: "90vw",
							maxHeight: "calc(var(--visual-viewport-height) * 0.9)",
							minHeight: 0,
							borderRadius: 6,
							color: theme.pageText,
							backgroundColor: theme.modalBackground,
							opacity: isHidden ? 0 : 1,
							[`@media (min-width: ${tokens$1.breakpoint_small})`]: { minWidth: tokens$1.breakpoint_small },
							overflowY: "auto",
							...styles.shadowLarge,
							...containerProps?.style
						},
						children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
							style: {
								paddingTop: 0,
								flex: 1,
								flexShrink: 0
							},
							children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(m$1, {
								FallbackComponent: FeatureErrorFallback,
								children: typeof children === "function" ? children(modalProps) : children
							})
						}), isLoading && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
							style: {
								position: "absolute",
								top: 0,
								left: 0,
								right: 0,
								bottom: 0,
								backgroundColor: theme.pageBackground,
								alignItems: "center",
								justifyContent: "center",
								zIndex: 1e3
							},
							children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AnimatedLoading, {
								style: {
									width: 20,
									height: 20
								},
								color: theme.pageText
							})
						})]
					})
				}) })
			})
		})
	});
};
var ModalContentContainer = (t0) => {
	const $ = (0, import_compiler_runtime.c)(13);
	const { style, noAnimation, isActive, children } = t0;
	const contentRef = (0, import_react.useRef)(null);
	const mounted = (0, import_react.useRef)(false);
	const rotateFactor = (0, import_react.useRef)(Math.random() * 10 - 5);
	let t1;
	let t2;
	if ($[0] !== isActive || $[1] !== noAnimation) {
		t1 = () => {
			if (!contentRef.current) return;
			const setProps = function setProps() {
				if (!contentRef.current) return;
				if (isActive) {
					contentRef.current.style.transform = "none";
					contentRef.current.style.willChange = "auto";
					contentRef.current.style.pointerEvents = "auto";
				} else {
					contentRef.current.style.transform = `translateY(-40px) scale(.95) rotate(${rotateFactor.current}deg)`;
					contentRef.current.style.pointerEvents = "none";
				}
			};
			if (!mounted.current) if (noAnimation) {
				contentRef.current.style.opacity = "1";
				contentRef.current.style.transform = "translateY(0px) scale(1)";
				setTimeout(() => {
					if (contentRef.current) contentRef.current.style.transition = "opacity .1s, transform .1s cubic-bezier(.42, 0, .58, 1)";
				}, 0);
			} else {
				contentRef.current.style.opacity = "0";
				contentRef.current.style.transform = "translateY(10px) scale(1)";
				setTimeout(() => {
					if (contentRef.current) {
						mounted.current = true;
						contentRef.current.style.transition = "opacity .1s, transform .1s cubic-bezier(.42, 0, .58, 1)";
						contentRef.current.style.opacity = "1";
						setProps();
					}
				}, 0);
			}
			else setProps();
		};
		t2 = [noAnimation, isActive];
		$[0] = isActive;
		$[1] = noAnimation;
		$[2] = t1;
		$[3] = t2;
	} else {
		t1 = $[2];
		t2 = $[3];
	}
	(0, import_react.useLayoutEffect)(t1, t2);
	let t3;
	if ($[4] !== isActive || $[5] !== noAnimation) {
		t3 = noAnimation && !isActive && { display: "none" };
		$[4] = isActive;
		$[5] = noAnimation;
		$[6] = t3;
	} else t3 = $[6];
	let t4;
	if ($[7] !== style || $[8] !== t3) {
		t4 = {
			...style,
			...t3
		};
		$[7] = style;
		$[8] = t3;
		$[9] = t4;
	} else t4 = $[9];
	let t5;
	if ($[10] !== children || $[11] !== t4) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			innerRef: contentRef,
			style: t4,
			children
		});
		$[10] = children;
		$[11] = t4;
		$[12] = t5;
	} else t5 = $[12];
	return t5;
};
var ModalButtons = (t0) => {
	const $ = (0, import_compiler_runtime.c)(10);
	const { style, leftContent, focusButton: t1, children } = t0;
	const focusButton = t1 === void 0 ? false : t1;
	const containerRef = (0, import_react.useRef)(null);
	let t2;
	let t3;
	if ($[0] !== focusButton) {
		t2 = () => {
			if (focusButton && containerRef.current) {
				const button = containerRef.current.querySelector("button:not([data-hidden])");
				if (button) button.focus();
			}
		};
		t3 = [focusButton];
		$[0] = focusButton;
		$[1] = t2;
		$[2] = t3;
	} else {
		t2 = $[1];
		t3 = $[2];
	}
	(0, import_react.useEffect)(t2, t3);
	let t4;
	if ($[3] !== style) {
		t4 = {
			flexDirection: "row",
			marginTop: 30,
			...style
		};
		$[3] = style;
		$[4] = t4;
	} else t4 = $[4];
	let t5;
	if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, { style: { flex: 1 } });
		$[5] = t5;
	} else t5 = $[5];
	let t6;
	if ($[6] !== children || $[7] !== leftContent || $[8] !== t4) {
		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			innerRef: containerRef,
			style: t4,
			children: [
				leftContent,
				t5,
				children
			]
		});
		$[6] = children;
		$[7] = leftContent;
		$[8] = t4;
		$[9] = t6;
	} else t6 = $[9];
	return t6;
};
function ModalHeader(t0) {
	const $ = (0, import_compiler_runtime.c)(14);
	const { leftContent, showLogo, title, rightContent } = t0;
	const { t } = useTranslation();
	let t1;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = {
			justifyContent: "center",
			alignItems: "center",
			position: "relative",
			height: 60,
			flex: "none",
			display: "flex",
			margin: 0,
			padding: 0
		};
		$[0] = t1;
	} else t1 = $[0];
	let t2;
	if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = {
			position: "absolute",
			left: 0
		};
		$[1] = t2;
	} else t2 = $[1];
	let t3;
	if ($[2] !== leftContent) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t2,
			children: leftContent
		});
		$[2] = leftContent;
		$[3] = t3;
	} else t3 = $[3];
	let t4;
	if ($[4] !== showLogo || $[5] !== t || $[6] !== title) {
		t4 = (title || showLogo) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: {
				textAlign: "center",
				width: "calc(100% - 60px)"
			},
			children: [showLogo && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgLogo, {
				"aria-label": t("Modal logo"),
				width: 30,
				height: 30,
				style: {
					justifyContent: "center",
					alignSelf: "center"
				}
			}), title && (typeof title === "string" || typeof title === "number" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ModalTitle, { title: `${title}` }) : title)]
		});
		$[4] = showLogo;
		$[5] = t;
		$[6] = title;
		$[7] = t4;
	} else t4 = $[7];
	let t5;
	if ($[8] !== rightContent) {
		t5 = rightContent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: {
				position: "absolute",
				right: 0
			},
			children: rightContent
		});
		$[8] = rightContent;
		$[9] = t5;
	} else t5 = $[9];
	let t6;
	if ($[10] !== t3 || $[11] !== t4 || $[12] !== t5) {
		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("h1", {
			style: t1,
			children: [
				t3,
				t4,
				t5
			]
		});
		$[10] = t3;
		$[11] = t4;
		$[12] = t5;
		$[13] = t6;
	} else t6 = $[13];
	return t6;
}
function ModalTitle(t0) {
	const $ = (0, import_compiler_runtime.c)(19);
	const { title, isEditable, getStyle, onTitleUpdate, shrinkOnOverflow: t1 } = t0;
	const shrinkOnOverflow = t1 === void 0 ? false : t1;
	const [isEditing, setIsEditing] = (0, import_react.useState)(false);
	let t2;
	if ($[0] !== isEditable) {
		t2 = () => {
			if (isEditable) setIsEditing(true);
		};
		$[0] = isEditable;
		$[1] = t2;
	} else t2 = $[1];
	const onTitleClick = t2;
	let t3;
	if ($[2] !== onTitleUpdate || $[3] !== title) {
		t3 = (newTitle) => {
			if (newTitle !== title) onTitleUpdate?.(newTitle);
			setIsEditing(false);
		};
		$[2] = onTitleUpdate;
		$[3] = title;
		$[4] = t3;
	} else t3 = $[4];
	const _onTitleUpdate = t3;
	const inputRef = (0, import_react.useRef)(null);
	let t4;
	let t5;
	if ($[5] !== isEditing) {
		t4 = () => {
			if (isEditing) {
				if (inputRef.current) inputRef.current.scrollLeft = 0;
			}
		};
		t5 = [isEditing];
		$[5] = isEditing;
		$[6] = t4;
		$[7] = t5;
	} else {
		t4 = $[6];
		t5 = $[7];
	}
	(0, import_react.useEffect)(t4, t5);
	let t6;
	if ($[8] !== getStyle || $[9] !== isEditing) {
		t6 = getStyle?.(isEditing);
		$[8] = getStyle;
		$[9] = isEditing;
		$[10] = t6;
	} else t6 = $[10];
	const style = t6;
	let t7;
	if ($[11] !== _onTitleUpdate || $[12] !== isEditable || $[13] !== isEditing || $[14] !== onTitleClick || $[15] !== shrinkOnOverflow || $[16] !== style || $[17] !== title) {
		t7 = isEditing ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
			ref: inputRef,
			style: {
				fontSize: 25,
				fontWeight: 700,
				textAlign: "center",
				...style
			},
			defaultValue: title,
			onUpdate: _onTitleUpdate,
			onEnter: (value, e) => {
				e.preventDefault();
				_onTitleUpdate?.(value);
			}
		}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: {
				flexDirection: "row",
				justifyContent: "center",
				alignItems: "center"
			},
			children: shrinkOnOverflow ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AutoTextSize, {
				as: Text,
				minFontSizePx: 15,
				maxFontSizePx: 25,
				onClick: onTitleClick,
				style: {
					fontSize: 25,
					fontWeight: 700,
					textAlign: "center",
					...isEditable && styles.underlinedText,
					...style
				},
				children: title
			}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextOneLine, {
				onClick: onTitleClick,
				style: {
					fontSize: 25,
					fontWeight: 700,
					textAlign: "center",
					...isEditable && styles.underlinedText,
					...style
				},
				children: title
			})
		});
		$[11] = _onTitleUpdate;
		$[12] = isEditable;
		$[13] = isEditing;
		$[14] = onTitleClick;
		$[15] = shrinkOnOverflow;
		$[16] = style;
		$[17] = title;
		$[18] = t7;
	} else t7 = $[18];
	return t7;
}
function ModalCloseButton(t0) {
	const $ = (0, import_compiler_runtime.c)(9);
	const { onPress, style } = t0;
	const { t } = useTranslation();
	let t1;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = { padding: "10px 10px" };
		$[0] = t1;
	} else t1 = $[0];
	let t2;
	if ($[1] !== t) {
		t2 = t("Close");
		$[1] = t;
		$[2] = t2;
	} else t2 = $[2];
	let t3;
	if ($[3] !== style) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgDelete, {
			width: 10,
			style
		});
		$[3] = style;
		$[4] = t3;
	} else t3 = $[4];
	let t4;
	if ($[5] !== onPress || $[6] !== t2 || $[7] !== t3) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
			variant: "bare",
			onPress,
			style: t1,
			"aria-label": t2,
			children: t3
		});
		$[5] = onPress;
		$[6] = t2;
		$[7] = t3;
		$[8] = t4;
	} else t4 = $[8];
	return t4;
}
//#endregion
//#region src/components/forms/index.tsx
var SectionLabel = (t0) => {
	const $ = (0, import_compiler_runtime.c)(5);
	const { title, style } = t0;
	let t1;
	if ($[0] !== style) {
		t1 = {
			fontWeight: 500,
			textTransform: "uppercase",
			color: theme.formLabelText,
			marginBottom: 5,
			lineHeight: "1em",
			...style
		};
		$[0] = style;
		$[1] = t1;
	} else t1 = $[1];
	let t2;
	if ($[2] !== t1 || $[3] !== title) {
		t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t1,
			children: title
		});
		$[2] = t1;
		$[3] = title;
		$[4] = t2;
	} else t2 = $[4];
	return t2;
};
var defaultLabelStyle = {
	fontSize: 13,
	marginBottom: 3,
	color: theme.tableText
};
var FormLabel = (t0) => {
	const $ = (0, import_compiler_runtime.c)(9);
	const { style, title, id, htmlFor } = t0;
	let t1;
	if ($[0] !== style) {
		t1 = {
			...defaultLabelStyle,
			...style
		};
		$[0] = style;
		$[1] = t1;
	} else t1 = $[1];
	let t2;
	if ($[2] !== htmlFor || $[3] !== id || $[4] !== title) {
		t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", {
			htmlFor,
			id,
			children: title
		});
		$[2] = htmlFor;
		$[3] = id;
		$[4] = title;
		$[5] = t2;
	} else t2 = $[5];
	let t3;
	if ($[6] !== t1 || $[7] !== t2) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
			style: t1,
			children: t2
		});
		$[6] = t1;
		$[7] = t2;
		$[8] = t3;
	} else t3 = $[8];
	return t3;
};
var FormField = (t0) => {
	const $ = (0, import_compiler_runtime.c)(3);
	const { style, children } = t0;
	let t1;
	if ($[0] !== children || $[1] !== style) {
		t1 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style,
			children
		});
		$[0] = children;
		$[1] = style;
		$[2] = t1;
	} else t1 = $[2];
	return t1;
};
var Checkbox = (props) => {
	const $ = (0, import_compiler_runtime.c)(5);
	let t0;
	if ($[0] !== props.style) {
		t0 = css([{
			position: "relative",
			margin: 0,
			flexShrink: 0,
			marginRight: 6,
			width: 15,
			height: 15,
			appearance: "none",
			outline: 0,
			border: "1px solid " + theme.formInputBorder,
			borderRadius: 4,
			display: "flex",
			alignItems: "center",
			justifyContent: "center",
			color: theme.checkboxText,
			backgroundColor: theme.tableBackground,
			":checked": {
				border: "1px solid " + theme.checkboxBorderSelected,
				backgroundColor: theme.checkboxBackgroundSelected,
				"::after": {
					display: "block",
					background: theme.checkboxBackgroundSelected + " url('data:image/svg+xml; utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\"><path fill=\"white\" d=\"M0 11l2-2 5 5L18 3l2 2L7 18z\"/></svg>') 9px 9px",
					width: 9,
					height: 9,
					content: "\" \""
				}
			},
			":disabled": {
				border: "1px solid " + theme.buttonNormalDisabledBorder,
				backgroundColor: theme.buttonNormalDisabledBorder
			},
			":checked:disabled": {
				border: "1px solid " + theme.buttonNormalDisabledBorder,
				backgroundColor: theme.buttonNormalDisabledBorder,
				"::after": { backgroundColor: theme.buttonNormalDisabledBorder }
			},
			"&:focus-visible": { "::before": {
				position: "absolute",
				top: -5,
				bottom: -5,
				left: -5,
				right: -5,
				border: "2px solid " + theme.checkboxBorderSelected,
				borderRadius: 6,
				content: "\" \""
			} }
		}, props.style]);
		$[0] = props.style;
		$[1] = t0;
	} else t0 = $[1];
	let t1;
	if ($[2] !== props || $[3] !== t0) {
		t1 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
			type: "checkbox",
			...props,
			className: t0
		});
		$[2] = props;
		$[3] = t0;
		$[4] = t1;
	} else t1 = $[4];
	return t1;
};
//#endregion
//#region src/hooks/useLocalPref.ts
/**
* Local preferences are scoped to a specific budget file.
*/
function useLocalPref(prefName) {
	const [budgetId] = useMetadataPref("id");
	return useLocalStorage(`${budgetId}-${prefName}`, void 0, {
		deserializer: JSON.parse,
		serializer: JSON.stringify
	});
}
//#endregion
//#region ../../node_modules/lodash/isObject.js
var require_isObject = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	/**
	* Checks if `value` is the
	* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
	* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
	*
	* @static
	* @memberOf _
	* @since 0.1.0
	* @category Lang
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is an object, else `false`.
	* @example
	*
	* _.isObject({});
	* // => true
	*
	* _.isObject([1, 2, 3]);
	* // => true
	*
	* _.isObject(_.noop);
	* // => true
	*
	* _.isObject(null);
	* // => false
	*/
	function isObject(value) {
		var type = typeof value;
		return value != null && (type == "object" || type == "function");
	}
	module.exports = isObject;
}));
//#endregion
//#region ../../node_modules/lodash/_freeGlobal.js
var require__freeGlobal = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	init_build_shims();
	module.exports = typeof global == "object" && global && global.Object === Object && global;
}));
//#endregion
//#region ../../node_modules/lodash/_root.js
var require__root = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	var freeGlobal = require__freeGlobal();
	/** Detect free variable `self`. */
	var freeSelf = typeof self == "object" && self && self.Object === Object && self;
	module.exports = freeGlobal || freeSelf || Function("return this")();
}));
//#endregion
//#region ../../node_modules/lodash/now.js
var require_now = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	var root = require__root();
	/**
	* Gets the timestamp of the number of milliseconds that have elapsed since
	* the Unix epoch (1 January 1970 00:00:00 UTC).
	*
	* @static
	* @memberOf _
	* @since 2.4.0
	* @category Date
	* @returns {number} Returns the timestamp.
	* @example
	*
	* _.defer(function(stamp) {
	*   console.log(_.now() - stamp);
	* }, _.now());
	* // => Logs the number of milliseconds it took for the deferred invocation.
	*/
	var now = function() {
		return root.Date.now();
	};
	module.exports = now;
}));
//#endregion
//#region ../../node_modules/lodash/_trimmedEndIndex.js
var require__trimmedEndIndex = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	/** Used to match a single whitespace character. */
	var reWhitespace = /\s/;
	/**
	* Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
	* character of `string`.
	*
	* @private
	* @param {string} string The string to inspect.
	* @returns {number} Returns the index of the last non-whitespace character.
	*/
	function trimmedEndIndex(string) {
		var index = string.length;
		while (index-- && reWhitespace.test(string.charAt(index)));
		return index;
	}
	module.exports = trimmedEndIndex;
}));
//#endregion
//#region ../../node_modules/lodash/_baseTrim.js
var require__baseTrim = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	var trimmedEndIndex = require__trimmedEndIndex();
	/** Used to match leading whitespace. */
	var reTrimStart = /^\s+/;
	/**
	* The base implementation of `_.trim`.
	*
	* @private
	* @param {string} string The string to trim.
	* @returns {string} Returns the trimmed string.
	*/
	function baseTrim(string) {
		return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
	}
	module.exports = baseTrim;
}));
//#endregion
//#region ../../node_modules/lodash/_Symbol.js
var require__Symbol = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	module.exports = require__root().Symbol;
}));
//#endregion
//#region ../../node_modules/lodash/_getRawTag.js
var require__getRawTag = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	var Symbol = require__Symbol();
	/** Used for built-in method references. */
	var objectProto = Object.prototype;
	/** Used to check objects for own properties. */
	var hasOwnProperty = objectProto.hasOwnProperty;
	/**
	* Used to resolve the
	* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
	* of values.
	*/
	var nativeObjectToString = objectProto.toString;
	/** Built-in value references. */
	var symToStringTag = Symbol ? Symbol.toStringTag : void 0;
	/**
	* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
	*
	* @private
	* @param {*} value The value to query.
	* @returns {string} Returns the raw `toStringTag`.
	*/
	function getRawTag(value) {
		var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
		try {
			value[symToStringTag] = void 0;
			var unmasked = true;
		} catch (e) {}
		var result = nativeObjectToString.call(value);
		if (unmasked) if (isOwn) value[symToStringTag] = tag;
		else delete value[symToStringTag];
		return result;
	}
	module.exports = getRawTag;
}));
//#endregion
//#region ../../node_modules/lodash/_objectToString.js
var require__objectToString = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	/**
	* Used to resolve the
	* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
	* of values.
	*/
	var nativeObjectToString = Object.prototype.toString;
	/**
	* Converts `value` to a string using `Object.prototype.toString`.
	*
	* @private
	* @param {*} value The value to convert.
	* @returns {string} Returns the converted string.
	*/
	function objectToString(value) {
		return nativeObjectToString.call(value);
	}
	module.exports = objectToString;
}));
//#endregion
//#region ../../node_modules/lodash/_baseGetTag.js
var require__baseGetTag = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	var Symbol = require__Symbol(), getRawTag = require__getRawTag(), objectToString = require__objectToString();
	/** `Object#toString` result references. */
	var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
	/** Built-in value references. */
	var symToStringTag = Symbol ? Symbol.toStringTag : void 0;
	/**
	* The base implementation of `getTag` without fallbacks for buggy environments.
	*
	* @private
	* @param {*} value The value to query.
	* @returns {string} Returns the `toStringTag`.
	*/
	function baseGetTag(value) {
		if (value == null) return value === void 0 ? undefinedTag : nullTag;
		return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
	}
	module.exports = baseGetTag;
}));
//#endregion
//#region ../../node_modules/lodash/isObjectLike.js
var require_isObjectLike = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	/**
	* Checks if `value` is object-like. A value is object-like if it's not `null`
	* and has a `typeof` result of "object".
	*
	* @static
	* @memberOf _
	* @since 4.0.0
	* @category Lang
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
	* @example
	*
	* _.isObjectLike({});
	* // => true
	*
	* _.isObjectLike([1, 2, 3]);
	* // => true
	*
	* _.isObjectLike(_.noop);
	* // => false
	*
	* _.isObjectLike(null);
	* // => false
	*/
	function isObjectLike(value) {
		return value != null && typeof value == "object";
	}
	module.exports = isObjectLike;
}));
//#endregion
//#region ../../node_modules/lodash/isSymbol.js
var require_isSymbol = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	var baseGetTag = require__baseGetTag(), isObjectLike = require_isObjectLike();
	/** `Object#toString` result references. */
	var symbolTag = "[object Symbol]";
	/**
	* Checks if `value` is classified as a `Symbol` primitive or object.
	*
	* @static
	* @memberOf _
	* @since 4.0.0
	* @category Lang
	* @param {*} value The value to check.
	* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
	* @example
	*
	* _.isSymbol(Symbol.iterator);
	* // => true
	*
	* _.isSymbol('abc');
	* // => false
	*/
	function isSymbol(value) {
		return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
	}
	module.exports = isSymbol;
}));
//#endregion
//#region ../../node_modules/lodash/toNumber.js
var require_toNumber = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	var baseTrim = require__baseTrim(), isObject = require_isObject(), isSymbol = require_isSymbol();
	/** Used as references for various `Number` constants. */
	var NAN = NaN;
	/** Used to detect bad signed hexadecimal string values. */
	var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
	/** Used to detect binary string values. */
	var reIsBinary = /^0b[01]+$/i;
	/** Used to detect octal string values. */
	var reIsOctal = /^0o[0-7]+$/i;
	/** Built-in method references without a dependency on `root`. */
	var freeParseInt = parseInt;
	/**
	* Converts `value` to a number.
	*
	* @static
	* @memberOf _
	* @since 4.0.0
	* @category Lang
	* @param {*} value The value to process.
	* @returns {number} Returns the number.
	* @example
	*
	* _.toNumber(3.2);
	* // => 3.2
	*
	* _.toNumber(Number.MIN_VALUE);
	* // => 5e-324
	*
	* _.toNumber(Infinity);
	* // => Infinity
	*
	* _.toNumber('3.2');
	* // => 3.2
	*/
	function toNumber(value) {
		if (typeof value == "number") return value;
		if (isSymbol(value)) return NAN;
		if (isObject(value)) {
			var other = typeof value.valueOf == "function" ? value.valueOf() : value;
			value = isObject(other) ? other + "" : other;
		}
		if (typeof value != "string") return value === 0 ? value : +value;
		value = baseTrim(value);
		var isBinary = reIsBinary.test(value);
		return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
	}
	module.exports = toNumber;
}));
//#endregion
//#region ../../node_modules/lodash/debounce.js
var require_debounce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	var isObject = require_isObject(), now = require_now(), toNumber = require_toNumber();
	/** Error message constants. */
	var FUNC_ERROR_TEXT = "Expected a function";
	var nativeMax = Math.max, nativeMin = Math.min;
	/**
	* Creates a debounced function that delays invoking `func` until after `wait`
	* milliseconds have elapsed since the last time the debounced function was
	* invoked. The debounced function comes with a `cancel` method to cancel
	* delayed `func` invocations and a `flush` method to immediately invoke them.
	* Provide `options` to indicate whether `func` should be invoked on the
	* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
	* with the last arguments provided to the debounced function. Subsequent
	* calls to the debounced function return the result of the last `func`
	* invocation.
	*
	* **Note:** If `leading` and `trailing` options are `true`, `func` is
	* invoked on the trailing edge of the timeout only if the debounced function
	* is invoked more than once during the `wait` timeout.
	*
	* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
	* until to the next tick, similar to `setTimeout` with a timeout of `0`.
	*
	* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
	* for details over the differences between `_.debounce` and `_.throttle`.
	*
	* @static
	* @memberOf _
	* @since 0.1.0
	* @category Function
	* @param {Function} func The function to debounce.
	* @param {number} [wait=0] The number of milliseconds to delay.
	* @param {Object} [options={}] The options object.
	* @param {boolean} [options.leading=false]
	*  Specify invoking on the leading edge of the timeout.
	* @param {number} [options.maxWait]
	*  The maximum time `func` is allowed to be delayed before it's invoked.
	* @param {boolean} [options.trailing=true]
	*  Specify invoking on the trailing edge of the timeout.
	* @returns {Function} Returns the new debounced function.
	* @example
	*
	* // Avoid costly calculations while the window size is in flux.
	* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
	*
	* // Invoke `sendMail` when clicked, debouncing subsequent calls.
	* jQuery(element).on('click', _.debounce(sendMail, 300, {
	*   'leading': true,
	*   'trailing': false
	* }));
	*
	* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
	* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
	* var source = new EventSource('/stream');
	* jQuery(source).on('message', debounced);
	*
	* // Cancel the trailing debounced invocation.
	* jQuery(window).on('popstate', debounced.cancel);
	*/
	function debounce(func, wait, options) {
		var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
		if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT);
		wait = toNumber(wait) || 0;
		if (isObject(options)) {
			leading = !!options.leading;
			maxing = "maxWait" in options;
			maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
			trailing = "trailing" in options ? !!options.trailing : trailing;
		}
		function invokeFunc(time) {
			var args = lastArgs, thisArg = lastThis;
			lastArgs = lastThis = void 0;
			lastInvokeTime = time;
			result = func.apply(thisArg, args);
			return result;
		}
		function leadingEdge(time) {
			lastInvokeTime = time;
			timerId = setTimeout(timerExpired, wait);
			return leading ? invokeFunc(time) : result;
		}
		function remainingWait(time) {
			var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
			return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
		}
		function shouldInvoke(time) {
			var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
			return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
		}
		function timerExpired() {
			var time = now();
			if (shouldInvoke(time)) return trailingEdge(time);
			timerId = setTimeout(timerExpired, remainingWait(time));
		}
		function trailingEdge(time) {
			timerId = void 0;
			if (trailing && lastArgs) return invokeFunc(time);
			lastArgs = lastThis = void 0;
			return result;
		}
		function cancel() {
			if (timerId !== void 0) clearTimeout(timerId);
			lastInvokeTime = 0;
			lastArgs = lastCallTime = lastThis = timerId = void 0;
		}
		function flush() {
			return timerId === void 0 ? result : trailingEdge(now());
		}
		function debounced() {
			var time = now(), isInvoking = shouldInvoke(time);
			lastArgs = arguments;
			lastThis = this;
			lastCallTime = time;
			if (isInvoking) {
				if (timerId === void 0) return leadingEdge(lastCallTime);
				if (maxing) {
					clearTimeout(timerId);
					timerId = setTimeout(timerExpired, wait);
					return invokeFunc(lastCallTime);
				}
			}
			if (timerId === void 0) timerId = setTimeout(timerExpired, wait);
			return result;
		}
		debounced.cancel = cancel;
		debounced.flush = flush;
		return debounced;
	}
	module.exports = debounce;
}));
//#endregion
//#region src/hooks/useScrollListener.tsx
var import_debounce = /* @__PURE__ */ __toESM(require_debounce());
var ScrollContext = (0, import_react.createContext)(void 0);
function ScrollProvider({ scrollableRef, isDisabled, delayMs = 100, children }) {
	const previousScrollX = (0, import_react.useRef)(void 0);
	const scrollX = (0, import_react.useRef)(void 0);
	const previousScrollY = (0, import_react.useRef)(void 0);
	const scrollY = (0, import_react.useRef)(void 0);
	const scrollWidth = (0, import_react.useRef)(void 0);
	const scrollHeight = (0, import_react.useRef)(void 0);
	const clientWidth = (0, import_react.useRef)(void 0);
	const clientHeight = (0, import_react.useRef)(void 0);
	const listeners = (0, import_react.useRef)([]);
	const hasScrolledToEnd = (0, import_react.useCallback)((direction, tolerance = 1) => {
		const isAtStart = (currentCoordinate) => currentCoordinate !== void 0 && currentCoordinate <= tolerance;
		const isAtEnd = (totalSize, currentCoordinate_0, viewportSize) => totalSize !== void 0 && currentCoordinate_0 !== void 0 && viewportSize !== void 0 && totalSize - currentCoordinate_0 <= viewportSize + tolerance;
		switch (direction) {
			case "up": return isAtStart(scrollY.current);
			case "down": return isAtEnd(scrollHeight.current, scrollY.current, clientHeight.current);
			case "left": return isAtStart(scrollX.current);
			case "right": return isAtEnd(scrollWidth.current, scrollX.current, clientWidth.current);
			default: return false;
		}
	}, []);
	const isScrolling = (0, import_react.useCallback)((direction_0) => {
		switch (direction_0) {
			case "up": return previousScrollY.current !== void 0 && scrollY.current !== void 0 && previousScrollY.current > scrollY.current;
			case "down": return previousScrollY.current !== void 0 && scrollY.current !== void 0 && previousScrollY.current < scrollY.current;
			case "left": return previousScrollX.current !== void 0 && scrollX.current !== void 0 && previousScrollX.current > scrollX.current;
			case "right": return previousScrollX.current !== void 0 && scrollX.current !== void 0 && previousScrollX.current < scrollX.current;
			default: return false;
		}
	}, []);
	const listenToScroll = (0, import_react.useMemo)(() => (0, import_debounce.default)((e) => {
		const target = e.target;
		if (target instanceof Element) {
			previousScrollX.current = scrollX.current;
			scrollX.current = target.scrollLeft;
			scrollWidth.current = target.scrollWidth;
			clientWidth.current = target.clientWidth;
			previousScrollY.current = scrollY.current;
			scrollY.current = target.scrollTop;
			scrollHeight.current = target.scrollHeight;
			clientHeight.current = target.clientHeight;
			const currentScrollX = scrollX.current;
			const currentScrollY = scrollY.current;
			if (currentScrollX !== void 0 && currentScrollY !== void 0) listeners.current.forEach((listener) => listener({
				scrollX: currentScrollX,
				scrollY: currentScrollY,
				isScrolling,
				hasScrolledToEnd
			}));
		}
	}, delayMs), [
		delayMs,
		hasScrolledToEnd,
		isScrolling
	]);
	(0, import_react.useEffect)(() => {
		const toCancel = listenToScroll;
		return () => toCancel.cancel();
	}, [listenToScroll]);
	(0, import_react.useEffect)(() => {
		if (isDisabled) return;
		const ref = scrollableRef.current;
		ref?.addEventListener("scroll", listenToScroll, {
			capture: true,
			passive: true
		});
		return () => ref?.removeEventListener("scroll", listenToScroll, { capture: true });
	}, [
		isDisabled,
		listenToScroll,
		scrollableRef
	]);
	const registerScrollListener = (0, import_react.useCallback)((listener_0) => {
		listeners.current.push(listener_0);
		return () => {
			listeners.current = listeners.current.filter((l) => l !== listener_0);
		};
	}, []);
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScrollContext.Provider, {
		value: { registerScrollListener },
		children
	});
}
/**
* A hook to register a listener when the user scrolls within a ScrollProvider.
*
* @param listener The scroll listener to register. It is important to wrap this function
* in useCallback to avoid unnecessary unregistering and reregistering on each render.
*/
function useScrollListener(listener) {
	const $ = (0, import_compiler_runtime.c)(4);
	const context = (0, import_react.useContext)(ScrollContext);
	if (!context) throw new Error("useScrollListener must be used within a ScrollProvider");
	const { registerScrollListener } = context;
	let t0;
	let t1;
	if ($[0] !== listener || $[1] !== registerScrollListener) {
		t0 = () => registerScrollListener(listener);
		t1 = [listener, registerScrollListener];
		$[0] = listener;
		$[1] = registerScrollListener;
		$[2] = t0;
		$[3] = t1;
	} else {
		t0 = $[2];
		t1 = $[3];
	}
	(0, import_react.useEffect)(t0, t1);
}
//#endregion
//#region src/components/Page.tsx
var HEADER_HEIGHT = 50;
function PageHeader(t0) {
	const $ = (0, import_compiler_runtime.c)(10);
	const { title, style } = t0;
	let t1;
	if ($[0] !== style) {
		t1 = {
			flexDirection: "row",
			justifyContent: "flex-start",
			alignItems: "center",
			marginLeft: 20,
			...style
		};
		$[0] = style;
		$[1] = t1;
	} else t1 = $[1];
	let t2;
	if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = {
			flexDirection: "row",
			fontSize: 25,
			fontWeight: 500
		};
		$[2] = t2;
	} else t2 = $[2];
	let t3;
	if ($[3] !== title) {
		t3 = typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: title }) : title;
		$[3] = title;
		$[4] = t3;
	} else t3 = $[4];
	let t4;
	if ($[5] !== t3) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t2,
			children: t3
		});
		$[5] = t3;
		$[6] = t4;
	} else t4 = $[6];
	let t5;
	if ($[7] !== t1 || $[8] !== t4) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t1,
			children: t4
		});
		$[7] = t1;
		$[8] = t4;
		$[9] = t5;
	} else t5 = $[9];
	return t5;
}
function MobilePageHeader(t0) {
	const $ = (0, import_compiler_runtime.c)(18);
	const { title, style, leftContent, rightContent } = t0;
	let t1;
	let t2;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = { color: theme.mobileHeaderText };
		t2 = { backgroundColor: theme.mobileHeaderTextHover };
		$[0] = t1;
		$[1] = t2;
	} else {
		t1 = $[0];
		t2 = $[1];
	}
	let t3;
	if ($[2] !== style) {
		t3 = {
			alignItems: "center",
			flexDirection: "row",
			flexShrink: 0,
			height: HEADER_HEIGHT,
			backgroundColor: theme.mobileHeaderBackground,
			"& *": t1,
			"& button[data-pressed]": t2,
			...style
		};
		$[2] = style;
		$[3] = t3;
	} else t3 = $[3];
	let t4;
	if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
		t4 = {
			flexBasis: "25%",
			justifyContent: "flex-start",
			flexDirection: "row"
		};
		$[4] = t4;
	} else t4 = $[4];
	let t5;
	if ($[5] !== leftContent) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t4,
			children: leftContent
		});
		$[5] = leftContent;
		$[6] = t5;
	} else t5 = $[6];
	let t6;
	if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
		t6 = {
			textAlign: "center",
			alignItems: "center",
			justifyContent: "center",
			flexDirection: "row",
			flexBasis: "50%",
			fontSize: 17,
			fontWeight: 500,
			overflowY: "auto",
			display: "flex",
			margin: 0,
			padding: 0
		};
		$[7] = t6;
	} else t6 = $[7];
	let t7;
	if ($[8] !== title) {
		t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
			style: t6,
			children: title
		});
		$[8] = title;
		$[9] = t7;
	} else t7 = $[9];
	let t8;
	if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
		t8 = {
			flexBasis: "25%",
			justifyContent: "flex-end",
			flexDirection: "row"
		};
		$[10] = t8;
	} else t8 = $[10];
	let t9;
	if ($[11] !== rightContent) {
		t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t8,
			children: rightContent
		});
		$[11] = rightContent;
		$[12] = t9;
	} else t9 = $[12];
	let t10;
	if ($[13] !== t3 || $[14] !== t5 || $[15] !== t7 || $[16] !== t9) {
		t10 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t3,
			children: [
				t5,
				t7,
				t9
			]
		});
		$[13] = t3;
		$[14] = t5;
		$[15] = t7;
		$[16] = t9;
		$[17] = t10;
	} else t10 = $[17];
	return t10;
}
var MobilePageHeaderSlotContext = (0, import_react.createContext)(null);
var MobilePageHeaderSlotRefContext = (0, import_react.createContext)(null);
function MobilePageHeaderProvider(t0) {
	const $ = (0, import_compiler_runtime.c)(3);
	const { children } = t0;
	const [slot, setSlot] = (0, import_react.useState)(null);
	let t1;
	if ($[0] !== children || $[1] !== slot) {
		t1 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MobilePageHeaderSlotRefContext.Provider, {
			value: setSlot,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MobilePageHeaderSlotContext.Provider, {
				value: slot,
				children
			})
		});
		$[0] = children;
		$[1] = slot;
		$[2] = t1;
	} else t1 = $[2];
	return t1;
}
function MobilePageHeaderSlot(t0) {
	const $ = (0, import_compiler_runtime.c)(5);
	const { style } = t0;
	const t1 = (0, import_react.useContext)(MobilePageHeaderSlotRefContext) ?? void 0;
	let t2;
	if ($[0] !== style) {
		t2 = {
			flexShrink: 0,
			minHeight: HEADER_HEIGHT,
			backgroundColor: theme.mobileHeaderBackground,
			...style
		};
		$[0] = style;
		$[1] = t2;
	} else t2 = $[1];
	let t3;
	if ($[2] !== t1 || $[3] !== t2) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			ref: t1,
			style: t2
		});
		$[2] = t1;
		$[3] = t2;
		$[4] = t3;
	} else t3 = $[4];
	return t3;
}
function Page(t0) {
	const $ = (0, import_compiler_runtime.c)(26);
	const { header, style, padding, children, footer } = t0;
	const { isNarrowWidth } = useResponsive();
	const mobileHeaderSlot = (0, import_react.useContext)(MobilePageHeaderSlotContext);
	const childrenPadding = padding != null ? padding : isNarrowWidth ? 10 : 20;
	let t1;
	if ($[0] !== header || $[1] !== isNarrowWidth) {
		t1 = typeof header === "string" ? isNarrowWidth ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MobilePageHeader, { title: header }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageHeader, { title: header }) : header;
		$[0] = header;
		$[1] = isNarrowWidth;
		$[2] = t1;
	} else t1 = $[2];
	const headerToRender = t1;
	const t2 = isNarrowWidth ? "auto" : void 0;
	const t3 = `0 ${childrenPadding}px`;
	let t4;
	if ($[3] !== t2 || $[4] !== t3) {
		t4 = {
			flex: 1,
			overflowY: t2,
			padding: t3
		};
		$[3] = t2;
		$[4] = t3;
		$[5] = t4;
	} else t4 = $[5];
	let t5;
	if ($[6] !== children || $[7] !== t4) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			role: "main",
			style: t4,
			children
		});
		$[6] = children;
		$[7] = t4;
		$[8] = t5;
	} else t5 = $[8];
	const main = t5;
	if (isNarrowWidth) {
		let t6;
		if ($[9] !== style) {
			t6 = {
				flex: 1,
				backgroundColor: theme.mobilePageBackground,
				...style
			};
			$[9] = style;
			$[10] = t6;
		} else t6 = $[10];
		let t7;
		if ($[11] !== headerToRender || $[12] !== mobileHeaderSlot) {
			t7 = mobileHeaderSlot ? (0, import_react_dom.createPortal)(headerToRender, mobileHeaderSlot) : headerToRender;
			$[11] = headerToRender;
			$[12] = mobileHeaderSlot;
			$[13] = t7;
		} else t7 = $[13];
		let t8;
		if ($[14] !== footer || $[15] !== main || $[16] !== t6 || $[17] !== t7) {
			t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
				style: t6,
				children: [
					t7,
					main,
					footer
				]
			});
			$[14] = footer;
			$[15] = main;
			$[16] = t6;
			$[17] = t7;
			$[18] = t8;
		} else t8 = $[18];
		return t8;
	}
	let t6;
	if ($[19] !== style) {
		t6 = {
			...styles.page,
			flex: 1,
			backgroundColor: theme.pageBackground,
			...style
		};
		$[19] = style;
		$[20] = t6;
	} else t6 = $[20];
	let t7;
	if ($[21] !== footer || $[22] !== headerToRender || $[23] !== main || $[24] !== t6) {
		t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t6,
			children: [
				headerToRender,
				main,
				footer
			]
		});
		$[21] = footer;
		$[22] = headerToRender;
		$[23] = main;
		$[24] = t6;
		$[25] = t7;
	} else t7 = $[25];
	return t7;
}
//#endregion
//#region ../component-library/src/icons/v1/Add.tsx
var SvgAdd = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		fill: "currentColor",
		d: "M23 11.5a1.5 1.5 0 0 1-1.5 1.5h-20a1.5 1.5 0 0 1 0-3h20a1.5 1.5 0 0 1 1.5 1.5",
		className: "path"
	}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		fill: "currentColor",
		d: "M11.5 23a1.5 1.5 0 0 1-1.5-1.5v-20a1.5 1.5 0 0 1 3 0v20a1.5 1.5 0 0 1-1.5 1.5",
		className: "path"
	})]
});
//#endregion
//#region ../component-library/src/icons/v1/ArrowDown.tsx
var SvgArrowDown = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "m9 16.172-6.071-6.071-1.414 1.414L10 20l.707-.707 7.778-7.778-1.414-1.414L11 16.172V0H9z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/ArrowLeft.tsx
var SvgArrowLeft = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "m3.828 9 6.071-6.071-1.414-1.414L0 10l.707.707 7.778 7.778 1.414-1.414L3.828 11H20V9z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/ArrowThickDown.tsx
var SvgArrowThickDown = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M7 10V2h6v8h5l-8 8-8-8z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/ArrowThickRight.tsx
var SvgArrowThickRight = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M10 7H2v6h8v5l8-8-8-8z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/ArrowThickUp.tsx
var SvgArrowThickUp = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M7 10v8h6v-8h5l-8-8-8 8z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/ArrowThinLeft.tsx
var SvgArrowThinLeft = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "m3.828 9 6.071-6.071-1.414-1.414L0 10l.707.707 7.778 7.778 1.414-1.414L3.828 11H20V9z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/ArrowThinRight.tsx
var SvgArrowThinRight = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "m16.172 9-6.071-6.071 1.414-1.414L20 10l-.707.707-7.778 7.778-1.414-1.414L16.172 11H0V9z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/ArrowUp.tsx
var SvgArrowUp = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M9 3.828 2.929 9.899 1.515 8.485 10 0l.707.707 7.778 7.778-1.414 1.414L11 3.828V20H9z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Bookmark.tsx
var SvgBookmark = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M2 2c0-1.1.9-2 2-2h12a2 2 0 0 1 2 2v18l-8-4-8 4z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Calculator.tsx
var SvgCalculator = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M2 2c0-1.1.9-2 2-2h12a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2zm3 1v2h10V3zm0 4v2h2V7zm4 0v2h2V7zm4 0v2h2V7zm-8 4v2h2v-2zm4 0v2h2v-2zm4 0v6h2v-6zm-8 4v2h2v-2zm4 0v2h2v-2z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Calendar.tsx
var SvgCalendar$1 = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M1 4c0-1.1.9-2 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2zm2 2v12h14V6zm2-6h2v2H5zm8 0h2v2h-2zM5 9h2v2H5zm0 4h2v2H5zm4-4h2v2H9zm0 4h2v2H9zm4-4h2v2h-2zm0 4h2v2h-2z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Camera.tsx
var SvgCamera = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M0 6c0-1.1.9-2 2-2h3l2-2h6l2 2h3a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2zm10 10a5 5 0 1 0 0-10 5 5 0 0 0 0 10m0-2a3 3 0 1 1 0-6 3 3 0 0 1 0 6",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/ChartArea.tsx
var SvgChartArea = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M2.5 13c-.5.5-.5.5-.5 1v1c0 1 0 1 1 1h14c1 0 1 0 1-1V8.5c0-.5 0-.5-.5-1L16 6c-.5-.4-.5-.4-1 0l-4 4c-.5.25-.5.25-1 0L8 9c-.5-.3-.5-.3-1 0zM0 5c0-1.1.9-2 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/ChartBar.tsx
var SvgChartBar = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M1 10h3v10H1zM6 0h3v20H6zm5 8h3v12h-3zm5-4h3v16h-3z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/ChartPie.tsx
var SvgChartPie = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M19.95 11A10 10 0 1 1 9 .05V11zm-.08-2.6H11.6V.13a10 10 0 0 1 8.27 8.27",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Chart.tsx
var SvgChart = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M4.13 12H4a2 2 0 1 0 1.8 1.11L7.86 10a2 2 0 0 0 .65-.07l1.55 1.55a2 2 0 1 0 3.72-.37L15.87 8H16a2 2 0 1 0-1.8-1.11L12.14 10a2 2 0 0 0-.65.07L9.93 8.52a2 2 0 1 0-3.72.37zM0 4c0-1.1.9-2 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Checkmark.tsx
var SvgCheckmark = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "m0 11 2-2 5 5L18 3l2 2L7 18z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/CheveronDown.tsx
var SvgCheveronDown = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "m9.293 12.95.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/CheveronLeft.tsx
var SvgCheveronLeft = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M7.05 9.293 6.343 10 12 15.657l1.414-1.414L9.172 10l4.242-4.243L12 4.343z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/CheveronRight.tsx
var SvgCheveronRight = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "m12.95 10.707.707-.707L8 4.343 6.586 5.757 10.828 10l-4.242 4.243L8 15.657z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/CheveronUp.tsx
var SvgCheveronUp = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M10.707 7.05 10 6.343 4.343 12l1.414 1.414L10 9.172l4.243 4.242L15.657 12z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Close.tsx
var SvgClose = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M10 8.586 2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/CloudCheck.tsx
var SvgCloudCheck = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M24 11.113a5.765 5.765 0 0 0-5.216-5.952.25.25 0 0 1-.191-.12 7.684 7.684 0 0 0-14.1 2.294.25.25 0 0 1-.227.2A4.64 4.64 0 0 0 .624 9.774 4.47 4.47 0 0 0 0 12.223a4.3 4.3 0 0 0 1.235 3.1 4.6 4.6 0 0 0 1.78 1.062.963.963 0 0 0 1.243-.86v-.026a.985.985 0 0 0-.658-1.033 2.6 2.6 0 0 1-.96-.572A2.37 2.37 0 0 1 2 12.109a2.59 2.59 0 0 1 2.586-2.588 2.7 2.7 0 0 1 .535.054.99.99 0 0 0 .811-.184 1 1 0 0 0 .392-.779c.085-5.736 8.293-7.372 10.818-2.044a.97.97 0 0 0 .941.57 3.73 3.73 0 0 1 3 1.309 3.9 3.9 0 0 1 .9 2.812 3.43 3.43 0 0 1-1.473 2.667.97.97 0 0 0-.4.964l.01.059a.968.968 0 0 0 1.525.608A5.4 5.4 0 0 0 24 11.113",
		fill: "currentColor"
	}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M12.231 9.7a6.5 6.5 0 1 0 6.5 6.5 6.51 6.51 0 0 0-6.5-6.5m3.124 4.155a.75.75 0 0 1 .15 1.05l-2.905 3.87a1.5 1.5 0 0 1-1.1.6h-.111a1.49 1.49 0 0 1-1.055-.443l-1.5-1.5a.75.75 0 0 1 1.066-1.06l1.3 1.3a.25.25 0 0 0 .376-.026L14.305 14a.75.75 0 0 1 1.05-.149Z",
		fill: "currentColor"
	})]
});
//#endregion
//#region ../component-library/src/icons/v1/CloudDownload.tsx
var SvgCloudDownload = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M24 10.663A5.82 5.82 0 0 0 22.228 6.5a5.7 5.7 0 0 0-3.447-1.585.25.25 0 0 1-.191-.12 7.684 7.684 0 0 0-14.1 2.294.25.25 0 0 1-.227.2A4.59 4.59 0 0 0 0 11.859a4.32 4.32 0 0 0 1.236 3.21 5.53 5.53 0 0 0 3.605 1.377 1 1 0 0 0 .985-1.015 1.023 1.023 0 0 0-1.015-.985 3.3 3.3 0 0 1-2.172-.8A2.37 2.37 0 0 1 2 11.859a2.58 2.58 0 0 1 .954-2.007 2.6 2.6 0 0 1 2.167-.527 1 1 0 0 0 1.2-.919 5.686 5.686 0 0 1 10.82-2.088.96.96 0 0 0 .941.57 3.69 3.69 0 0 1 2.758 1.049A3.75 3.75 0 0 1 22 10.663a3.835 3.835 0 0 1-3.438 3.791 1 1 0 0 0 .132 1.992 1 1 0 0 0 .131-.009A5.807 5.807 0 0 0 24 10.663",
		fill: "currentColor"
	}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M15.5 17.446h-1.75a.25.25 0 0 1-.25-.25v-7.25a1.5 1.5 0 1 0-3 0V17.2a.25.25 0 0 1-.25.25H8.5a1 1 0 0 0-.707 1.707l3.5 3.5a1 1 0 0 0 1.414 0l3.5-3.5a1 1 0 0 0-.707-1.707Z",
		fill: "currentColor"
	})]
});
//#endregion
//#region ../component-library/src/icons/v1/Code.tsx
var SvgCode = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "m.7 9.3 4.8-4.8 1.4 1.42L2.84 10l4.07 4.07-1.41 1.42L0 10zm18.6 1.4.7-.7-5.49-5.49-1.4 1.42L17.16 10l-4.07 4.07 1.41 1.42 4.78-4.78z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Cog.tsx
var SvgCog = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M3.94 6.5 2.22 3.64l1.42-1.42L6.5 3.94c.52-.3 1.1-.54 1.7-.7L9 0h2l.8 3.24c.6.16 1.18.4 1.7.7l2.86-1.72 1.42 1.42-1.72 2.86c.3.52.54 1.1.7 1.7L20 9v2l-3.24.8c-.16.6-.4 1.18-.7 1.7l1.72 2.86-1.42 1.42-2.86-1.72c-.52.3-1.1.54-1.7.7L11 20H9l-.8-3.24c-.6-.16-1.18-.4-1.7-.7l-2.86 1.72-1.42-1.42 1.72-2.86c-.3-.52-.54-1.1-.7-1.7L0 11V9l3.24-.8c.16-.6.4-1.18.7-1.7M10 13a3 3 0 1 0 0-6 3 3 0 0 0 0 6",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Copy.tsx
var SvgCopy = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M6 6V2c0-1.1.9-2 2-2h10a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-4v4a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8c0-1.1.9-2 2-2zm2 0h4a2 2 0 0 1 2 2v4h4V2H8zM2 8v10h10V8z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/CreditCard.tsx
var SvgCreditCard = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M18 6V4H2v2zm0 4H2v6h16zM0 4c0-1.1.9-2 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2zm4 8h4v2H4z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/DotsHorizontalTriple.tsx
var SvgDotsHorizontalTriple = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M10 12a2 2 0 1 1 0-4 2 2 0 0 1 0 4m0-6a2 2 0 1 1 0-4 2 2 0 0 1 0 4m0 12a2 2 0 1 1 0-4 2 2 0 0 1 0 4",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Equals.tsx
var SvgEquals = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 23 11",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		fill: "currentColor",
		fillRule: "nonzero",
		d: "M23 1.5A1.5 1.5 0 0 1 21.5 3h-20a1.5 1.5 0 0 1 0-3h20A1.5 1.5 0 0 1 23 1.5m0 8a1.5 1.5 0 0 1-1.5 1.5h-20a1.5 1.5 0 0 1 0-3h20A1.5 1.5 0 0 1 23 9.5"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/ExclamationOutline.tsx
var SvgExclamationOutline = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M2.93 17.07A10 10 0 1 1 17.07 2.93 10 10 0 0 1 2.93 17.07m12.73-1.41A8 8 0 1 0 4.34 4.34a8 8 0 0 0 11.32 11.32M9 5h2v6H9zm0 8h2v2H9z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/ExclamationSolid.tsx
var SvgExclamationSolid = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M2.93 17.07A10 10 0 1 1 17.07 2.93 10 10 0 0 1 2.93 17.07M9 5v6h2V5zm0 8v2h2v-2z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/FileDouble.tsx
var SvgFileDouble = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M21.941 3.607 18.87.554A1.9 1.9 0 0 0 17.527 0H8.9A1.9 1.9 0 0 0 7 1.9V5H3.4a1.9 1.9 0 0 0-1.9 1.9v15.21A1.9 1.9 0 0 0 3.4 24h11.7a1.9 1.9 0 0 0 1.9-1.895V19h3.6a1.9 1.9 0 0 0 1.9-1.895V4.949a1.88 1.88 0 0 0-.559-1.342M14.5 22H4a.5.5 0 0 1-.5-.5v-14A.5.5 0 0 1 4 7h7.784a.5.5 0 0 1 .35.143L14.85 9.8a.5.5 0 0 1 .15.357V21.5a.5.5 0 0 1-.5.5m5.5-5h-2.75a.25.25 0 0 1-.25-.25v-6.8a1.9 1.9 0 0 0-.558-1.341L13.37 5.554A1.9 1.9 0 0 0 12.028 5H9.25A.25.25 0 0 1 9 4.75V2.5a.5.5 0 0 1 .5-.5l7.756-.026a.5.5 0 0 1 .351.143L20.35 4.8a.5.5 0 0 1 .15.357V16.5a.5.5 0 0 1-.5.5",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Filter.tsx
var SvgFilter = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "m12 12 8-8V0H0v4l8 8v8l4-4z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Flag.tsx
var SvgFlag = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M7.667 12H2v8H0V0h12l.333 2H20l-3 6 3 6H8z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/InformationOutline.tsx
var SvgInformationOutline = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M2.93 17.07A10 10 0 1 1 17.07 2.93 10 10 0 0 1 2.93 17.07m12.73-1.41A8 8 0 1 0 4.34 4.34a8 8 0 0 0 11.32 11.32M9 11V9h2v6H9zm0-6h2v2H9z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Layers.tsx
var SvgLayers = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "m10 1 10 6-10 6L0 7zm6.67 10L20 13l-10 6-10-6 3.33-2L10 15z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Library.tsx
var SvgLibrary = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "m0 6 10-6 10 6v2H0zm0 12h20v2H0zm2-2h16v2H2zm0-8h4v8H2zm6 0h4v8H8zm6 0h4v8h-4z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/LightBulb.tsx
var SvgLightBulb = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M7 13.33a7 7 0 1 1 6 0V16H7zM7 17h6v1.5c0 .83-.67 1.5-1.5 1.5h-3A1.5 1.5 0 0 1 7 18.5zm2-5.1V14h2v-2.1a5 5 0 1 0-2 0",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/ListBullet.tsx
var SvgListBullet = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M1 4h2v2H1zm4 0h14v2H5zM1 9h2v2H1zm4 0h14v2H5zm-4 5h2v2H1zm4 0h14v2H5z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/List.tsx
var SvgList = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M1 4h2v2H1zm4 0h14v2H5zM1 9h2v2H1zm4 0h14v2H5zm-4 5h2v2H1zm4 0h14v2H5z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Location.tsx
var SvgLocation = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M10 20S3 10.87 3 7a7 7 0 1 1 14 0c0 3.87-7 13-7 13m0-11a2 2 0 1 0 0-4 2 2 0 0 0 0 4",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/LockOpen.tsx
var SvgLockOpen = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M4 8V6a6 6 0 1 1 12 0h-3v2h4a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2v-8c0-1.1.9-2 2-2zm5 6.73V17h2v-2.27a2 2 0 1 0-2 0M7 6v2h6V6a3 3 0 0 0-6 0",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/MoneyBag.tsx
var SvgMoneyBag = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M9 8h6a1 1 0 0 0 0-2H9a1 1 0 0 0 0 2M9.471 4.5a.5.5 0 0 0 .5.438h4.064a.5.5 0 0 0 .5-.438 9.2 9.2 0 0 1 1.206-3.049.5.5 0 0 0-.638-.7l-1.862.8a.25.25 0 0 1-.33-.137l-.441-1.1a.5.5 0 0 0-.928 0l-.441 1.1a.25.25 0 0 1-.33.137L8.9.755a.5.5 0 0 0-.638.7A9.2 9.2 0 0 1 9.471 4.5M15.438 9.121A.6.6 0 0 0 15.081 9H8.919a.6.6 0 0 0-.357.121c-2.551 1.95-5.4 5.4-5.4 8.4C3.16 21.75 5.518 24 12 24s8.84-2.25 8.84-6.482c0-2.995-2.85-6.447-5.402-8.397M12.955 20.13a.25.25 0 0 0-.205.246v.374a.75.75 0 0 1-1.5 0v-.323a.25.25 0 0 0-.25-.25h-.588a.75.75 0 1 1 0-1.5h2.152a.671.671 0 0 0 .25-1.294l-2.185-.873a2.164 2.164 0 0 1 .416-4.14.25.25 0 0 0 .205-.246v-.374a.75.75 0 0 1 1.5 0v.323a.25.25 0 0 0 .25.25h.588a.75.75 0 1 1 0 1.5h-2.152a.671.671 0 0 0-.25 1.294l2.185.873a2.164 2.164 0 0 1-.416 4.14",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/PiggyBank.tsx
var SvgPiggyBank = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", {
		clipPath: "url(#a)",
		children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
			fill: "currentColor",
			d: "M1.857 7.612H.98a.98.98 0 0 0-.98.98v2.224c0 .449.184.857.51 1.163.612.551 1.816 1.49 3.735 2.368a.57.57 0 0 1 .306.346l.939 3.286a.484.484 0 0 0 .469.347h1.47a.48.48 0 0 0 .469-.367l.47-1.817a.26.26 0 0 1 .326-.183c.571.122 1.183.163 1.795.163.613 0 1.225-.061 1.796-.163.143-.02.286.06.327.183l.47 1.817a.5.5 0 0 0 .468.367h1.47a.484.484 0 0 0 .47-.347l1.224-4.245a.5.5 0 0 1 .122-.224c.919-.98 1.53-2.163 1.735-3.47h.49c.53 0 .959-.448.938-.979-.02-.51-.47-.918-.98-.918h-.448C18.06 4.673 14.632 2 10.489 2c-1.775 0-3.428.49-4.755 1.326-.591-.408-1.469-.734-2.693-.632-.49.04-.715.612-.388.959.408.429.796 1 .877 1.735zm3.122.98a.86.86 0 0 1-.857-.858c0-.469.388-.857.857-.857.47 0 .858.388.858.857 0 .47-.388.858-.858.858"
		})
	}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("clipPath", {
		id: "a",
		children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
			fill: "currentColor",
			d: "M0 0h20v20H0z"
		})
	}) })]
});
//#endregion
//#region ../component-library/src/icons/v1/Pin.tsx
var SvgPin = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M11 12h6v-1l-3-1V2l3-1V0H3v1l3 1v8l-3 1v1h6v7l1 1 1-1z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Question.tsx
var SvgQuestion = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M10 20a10 10 0 1 1 0-20 10 10 0 0 1 0 20m2-13c0 .28-.21.8-.42 1L10 9.58c-.57.58-1 1.6-1 2.42v1h2v-1c0-.29.21-.8.42-1L13 9.42c.57-.58 1-1.6 1-2.42a4 4 0 1 0-8 0h2a2 2 0 1 1 4 0m-3 8v2h2v-2z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Queue.tsx
var SvgQueue = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M0 2h20v4H0zm0 8h20v2H0zm0 6h20v2H0z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Refresh.tsx
var SvgRefresh = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M10 3v2a5 5 0 0 0-3.54 8.54l-1.41 1.41A7 7 0 0 1 10 3m4.95 2.05A7 7 0 0 1 10 17v-2a5 5 0 0 0 3.54-8.54zM10 20l-4-4 4-4zm0-12V0l4 4z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Reports.tsx
var SvgReports = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M19 18h-1v-8c0-.6-.4-1-1-1s-1 .4-1 1v8h-3V1c0-.6-.4-1-1-1s-1 .4-1 1v17H8V7c0-.6-.4-1-1-1s-1 .4-1 1v11H3V3c0-.6-.4-1-1-1s-1 .4-1 1v15c-.6 0-1 .4-1 1s.4 1 1 1h18c.6 0 1-.4 1-1s-.4-1-1-1",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Share.tsx
var SvgShare = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M4 10c0-1.1.9-2 2-2h8c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2H6c-1.1 0-2-.9-2-2zm2 0v8h8v-8h-2V8H8v2zm3-6.17V16h2V3.83l3.07 3.07 1.42-1.41L10 0l-.7.7-4.8 4.8 1.42 1.4L9 3.84z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/StoreFront.tsx
var SvgStoreFront = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M18 9.87V20H2V9.87a4.25 4.25 0 0 0 3-.38V14h10V9.5a4.26 4.26 0 0 0 3 .37M3 0h4l-.67 6.03A3.43 3.43 0 0 1 3 9C1.34 9 .42 7.73.95 6.15zm5 0h4l.7 6.3c.17 1.5-.91 2.7-2.42 2.7h-.56A2.38 2.38 0 0 1 7.3 6.3zm5 0h4l2.05 6.15C19.58 7.73 18.65 9 17 9a3.42 3.42 0 0 1-3.33-2.97z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Subtract.tsx
var SvgSubtract$1 = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 23 3",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		fill: "currentColor",
		fillRule: "nonzero",
		d: "M23 1.5A1.5 1.5 0 0 1 21.5 3h-20a1.5 1.5 0 0 1 0-3h20A1.5 1.5 0 0 1 23 1.5"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Tag.tsx
var SvgTag = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M0 10V2l2-2h8l10 10-10 10zm4.5-4a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Time.tsx
var SvgTime = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M10 20a10 10 0 1 1 0-20 10 10 0 0 1 0 20m0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16m-1-7.59V4h2v5.59l3.95 3.95-1.41 1.41z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Trash.tsx
var SvgTrash = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "m6 2 2-2h4l2 2h4v2H2V2zM3 6h14l-1 14H4zm5 2v10h1V8zm3 0v10h1V8z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Tuning.tsx
var SvgTuning = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M17 16v4h-2v-4h-2v-3h6v3zM1 9h6v3H1zm6-4h6v3H7zM3 0h2v8H3zm12 0h2v12h-2zM9 0h2v4H9zM3 12h2v8H3zm6-4h2v12H9z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/UserGroup.tsx
var SvgUserGroup = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M7 8a4 4 0 1 1 0-8 4 4 0 0 1 0 8m0 1c2.15 0 4.2.4 6.1 1.09L12 16h-1.25L10 20H4l-.75-4H2L.9 10.09A17.9 17.9 0 0 1 7 9m8.31.17c1.32.18 2.59.48 3.8.92L18 16h-1.25L16 20h-3.96l.37-2h1.25zM13 0a4 4 0 1 1-1.33 7.76 5.96 5.96 0 0 0 0-7.52C12.1.1 12.53 0 13 0",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/User.tsx
var SvgUser = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M5 5a5 5 0 0 1 10 0v2A5 5 0 0 1 5 7zM0 16.68A19.9 19.9 0 0 1 10 14c3.64 0 7.06.97 10 2.68V20H0z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v1/Wallet.tsx
var SvgWallet = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M0 4c0-1.1.9-2 2-2h15a1 1 0 0 1 1 1v1H2v1h17a1 1 0 0 1 1 1v10a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2zm16.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/CloseParenthesis.tsx
var SvgCloseParenthesis = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	xmlSpace: "preserve",
	x: 0,
	y: 0,
	viewBox: "0 0 17 56.7",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M1.9 2.2c1.3.2 2.4.7 3.4 1.5.8.8 1.5 1.8 2 2.9.9 2.3 3.1 8.4 3.1 21.8S8.2 47.8 7.3 50.1c-.5 1.1-1.2 2.1-2 2.9Q3.8 54.2 2 54.5h-.1c-.4.1-.6.4-.6.8.1.3.3.6.6.6 1.6.2 3.2-.1 4.7-.8 1.4-.8 2.7-1.9 3.6-3.2q2.55-3.9 3.6-8.4l.1-.3c2.5-9.7 2.5-19.8 0-29.5l-.1-.3Q12.75 8.9 10.2 5C9.3 3.5 8 2.4 6.6 1.6 5.1.9 3.5.7 1.9.9c-.4 0-.7.4-.6.7 0 .3.2.6.6.6",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/OpenParenthesis.tsx
var SvgOpenParenthesis = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	xmlSpace: "preserve",
	x: 0,
	y: 0,
	viewBox: "0 0 17 56.7",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M15.1 54.5c-1.3-.2-2.4-.7-3.4-1.5-.8-.8-1.5-1.8-2-2.9-.9-2.3-3.1-8.4-3.1-21.8S8.8 8.9 9.8 6.6c.5-1.1 1.2-2.1 2-2.9q1.5-1.2 3.3-1.5h.1c.4-.1.6-.4.6-.8-.1-.3-.3-.6-.6-.6-1.6-.2-3.2.1-4.7.8-1.5.8-2.7 1.9-3.7 3.2q-2.55 3.9-3.6 8.4l-.1.3C.6 23.2.6 33.3 3.1 43l.1.3q1.05 4.5 3.6 8.4c.9 1.3 2.2 2.4 3.6 3.2 1.5.7 3.1.9 4.7.8.4 0 .7-.4.6-.7 0-.2-.2-.5-.6-.5",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/Sum.tsx
var SvgSum = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	xmlSpace: "preserve",
	x: 0,
	y: 0,
	baseProfile: "basic",
	viewBox: "0 0 28.3 28.3",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M23.2 10.1c1.1 0 2-.9 2-2V2.2c0-1.1-.9-2-2-2h-18c-1.1 0-2 .9-2 2 0 .4.1.9.4 1.2l8.1 10.8L3.6 25c-.7.9-.5 2.1.4 2.8.3.3.8.4 1.2.4h18c1.1 0 2-.9 2-2v-5.8c0-1.1-.9-2-2-2s-2 .9-2 2v3.8h-12l6.6-8.8c.5-.7.5-1.7 0-2.4L9.2 4.2h12v3.9c0 1.1.9 2 2 2",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/System.tsx
var SvgSystem = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M4 16h16V5H4zm9 2v2h4v2H7v-2h4v-2H2.992A1 1 0 0 1 2 16.992V4.008C2 3.451 2.455 3 2.992 3h18.016c.548 0 .992.449.992 1.007v12.985c0 .557-.455 1.008-.992 1.008z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/AlertTriangle.tsx
var SvgAlertTriangle = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M23.119 20 13.772 2.15a2 2 0 0 0-3.543 0L.881 20a2 2 0 0 0 1.772 2.928h18.694A2 2 0 0 0 23.119 20M11 8.423a1 1 0 0 1 2 0v6a1 1 0 1 1-2 0Zm1.05 11.51h-.028a1.53 1.53 0 0 1-1.522-1.47 1.476 1.476 0 0 1 1.448-1.53h.028A1.527 1.527 0 0 1 13.5 18.4a1.475 1.475 0 0 1-1.45 1.533",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/ArrowButtonDown1.tsx
var SvgArrowButtonDown1 = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M12 13.584a2.64 2.64 0 0 1-1.875-.775L.584 3.268a1.768 1.768 0 0 1 2.5-2.5l8.739 8.739a.25.25 0 0 0 .354 0L20.916.768a1.768 1.768 0 0 1 2.5 2.5l-9.541 9.541a2.64 2.64 0 0 1-1.875.775",
		fill: "currentColor"
	}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M12 23.75a2.64 2.64 0 0 1-1.875-.775L.584 13.434a1.768 1.768 0 0 1 2.5-2.5l8.739 8.739a.25.25 0 0 0 .354 0l8.739-8.739a1.768 1.768 0 0 1 2.5 2.5l-9.541 9.541A2.64 2.64 0 0 1 12 23.75",
		fill: "currentColor"
	})]
});
//#endregion
//#region ../component-library/src/icons/v2/ArrowButtonLeft1.tsx
var SvgArrowButtonLeft1 = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M10.416 12a2.64 2.64 0 0 1 .775-1.875L20.732.584a1.768 1.768 0 0 1 2.5 2.5l-8.739 8.739a.25.25 0 0 0 0 .354l8.739 8.739a1.768 1.768 0 0 1-2.5 2.5l-9.541-9.541A2.64 2.64 0 0 1 10.416 12",
		fill: "currentColor"
	}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M.25 12a2.64 2.64 0 0 1 .775-1.875L10.566.584a1.768 1.768 0 0 1 2.5 2.5l-8.739 8.739a.25.25 0 0 0 0 .354l8.739 8.739a1.768 1.768 0 0 1-2.5 2.5l-9.541-9.541A2.64 2.64 0 0 1 .25 12",
		fill: "currentColor"
	})]
});
//#endregion
//#region ../component-library/src/icons/v2/ArrowButtonRight1.tsx
var SvgArrowButtonRight1 = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M13.584 12a2.64 2.64 0 0 1-.775 1.875l-9.541 9.541a1.768 1.768 0 0 1-2.5-2.5l8.739-8.739a.25.25 0 0 0 0-.354L.768 3.084a1.768 1.768 0 0 1 2.5-2.5l9.541 9.541A2.64 2.64 0 0 1 13.584 12",
		fill: "currentColor"
	}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M23.75 12a2.64 2.64 0 0 1-.775 1.875l-9.541 9.541a1.768 1.768 0 0 1-2.5-2.5l8.739-8.739a.25.25 0 0 0 0-.354l-8.739-8.739a1.768 1.768 0 0 1 2.5-2.5l9.541 9.541A2.64 2.64 0 0 1 23.75 12",
		fill: "currentColor"
	})]
});
//#endregion
//#region ../component-library/src/icons/v2/ArrowButtonSingleLeft1.tsx
var SvgArrowButtonSingleLeft1 = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M.25 12a2.64 2.64 0 0 1 .775-1.875L10.566.584a1.768 1.768 0 0 1 2.5 2.5l-8.739 8.739a.25.25 0 0 0 0 .354l8.739 8.739a1.768 1.768 0 0 1-2.5 2.5l-9.541-9.541A2.64 2.64 0 0 1 .25 12",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/ArrowButtonUp1.tsx
var SvgArrowButtonUp1 = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M12 10.416a2.64 2.64 0 0 1 1.875.775l9.541 9.541a1.768 1.768 0 0 1-2.5 2.5l-8.739-8.739a.25.25 0 0 0-.354 0l-8.739 8.739a1.768 1.768 0 0 1-2.5-2.5l9.541-9.541A2.64 2.64 0 0 1 12 10.416",
		fill: "currentColor"
	}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M12 .25a2.64 2.64 0 0 1 1.875.775l9.541 9.541a1.768 1.768 0 0 1-2.5 2.5l-8.739-8.739a.25.25 0 0 0-.354 0l-8.739 8.739a1.768 1.768 0 0 1-2.5-2.5l9.541-9.541A2.64 2.64 0 0 1 12 .25",
		fill: "currentColor"
	})]
});
//#endregion
//#region ../component-library/src/icons/v2/ArrowsExpand3.tsx
var SvgArrowsExpand3 = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	fill: "none",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		fill: "currentColor",
		d: "M19.611 2.571h-3.754a1.286 1.286 0 1 1 0-2.571h6.857A1.286 1.286 0 0 1 24 1.286v6.857a1.286 1.286 0 0 1-2.571 0V4.39L15.48 10.34a1.286 1.286 0 0 1-1.817-1.817zM1.286 14.571a1.286 1.286 0 0 1 1.285 1.286v3.754l5.949-5.946a1.286 1.286 0 0 1 1.817 1.817L4.39 21.429h3.753a1.285 1.285 0 1 1 0 2.571H1.286A1.286 1.286 0 0 1 0 22.714v-6.857a1.286 1.286 0 0 1 1.286-1.286"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/ArrowsShrink3.tsx
var SvgArrowsShrink3 = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	fill: "none",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		fill: "currentColor",
		d: "M14.143 1.714A1.286 1.286 0 0 1 15.429 3v3.753L21.806.377a1.286 1.286 0 0 1 1.817 1.817l-6.376 6.377H21a1.286 1.286 0 1 1 0 2.572h-6.857a1.286 1.286 0 0 1-1.286-1.286V3a1.286 1.286 0 0 1 1.286-1.286M9.857 22.286A1.285 1.285 0 0 1 8.571 21v-3.753l-6.377 6.376a1.286 1.286 0 0 1-1.817-1.817l6.376-6.377H3a1.286 1.286 0 0 1 0-2.572h6.857a1.286 1.286 0 0 1 1.286 1.286V21a1.286 1.286 0 0 1-1.286 1.286"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/ArrowsSynchronize.tsx
var SvgArrowsSynchronize = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", {
		fill: "#000",
		children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
			d: "m23.962 17.457-.82-3.297a1.287 1.287 0 0 0-1.56-.934l-3.294.823a1.286 1.286 0 0 0-.343 2.35L19 17.03A9.54 9.54 0 0 1 12 20.604a8.65 8.65 0 0 1-8.085-5.667 1.286 1.286 0 0 0-2.415.884A11.23 11.23 0 0 0 12 23.175a12.1 12.1 0 0 0 9.214-4.8l.839.503a1.286 1.286 0 0 0 1.91-1.415ZM2.422 10.774l3.295-.823a1.286 1.286 0 0 0 .352-2.35l-.972-.583A9.59 9.59 0 0 1 12 3.396a8.65 8.65 0 0 1 8.085 5.667A1.286 1.286 0 0 0 22.5 8.18 11.23 11.23 0 0 0 12 .825 12.24 12.24 0 0 0 2.866 5.68l-.919-.552a1.286 1.286 0 0 0-1.91 1.414l.82 3.297a1.29 1.29 0 0 0 1.246.974 1.3 1.3 0 0 0 .32-.04",
			fill: "currentColor"
		})
	})
});
//#endregion
//#region ../component-library/src/icons/v2/Calendar3.tsx
var SvgCalendar3 = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M7.5 10.5h-1a1 1 0 1 0 0 2h1a1 1 0 0 0 0-2M12.5 10.5h-1a1 1 0 0 0 0 2h1a1 1 0 0 0 0-2M17.5 10.5h-1a1 1 0 0 0 0 2h1a1 1 0 0 0 0-2M7.5 14.5h-1a1 1 0 1 0 0 2h1a1 1 0 0 0 0-2M12.5 14.5h-1a1 1 0 1 0 0 2h1a1 1 0 0 0 0-2M17.5 14.5h-1a1 1 0 1 0 0 2h1a1 1 0 0 0 0-2M7.5 18.5h-1a1 1 0 0 0 0 2h1a1 1 0 0 0 0-2M12.5 18.5h-1a1 1 0 0 0 0 2h1a1 1 0 1 0 0-2M17.5 18.5h-1a1 1 0 0 0 0 2h1a1 1 0 0 0 0-2",
		fill: "currentColor"
	}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M21.5 3h-2.75a.25.25 0 0 1-.25-.25V1a1 1 0 0 0-2 0v4.75a.75.75 0 1 1-1.5 0V3.5a.5.5 0 0 0-.5-.5H8.25A.25.25 0 0 1 8 2.751V1a1 1 0 1 0-2 0v4.75a.75.75 0 1 1-1.5 0V3.5A.5.5 0 0 0 4 3H2.5a2 2 0 0 0-2 2v17a2 2 0 0 0 2 2h19a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2m0 18.5a.5.5 0 0 1-.5.5H3a.5.5 0 0 1-.5-.5v-12A.5.5 0 0 1 3 9h18a.5.5 0 0 1 .5.5Z",
		fill: "currentColor"
	})]
});
//#endregion
//#region ../component-library/src/icons/v2/Calendar.tsx
var SvgCalendar = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M21.5 3h-2.75a.25.25 0 0 1-.25-.25V1a1 1 0 0 0-2 0v4.75a.75.75 0 0 1-.75.75.75.75 0 0 1-.75-.75V3.5a.5.5 0 0 0-.5-.5H8.25A.25.25 0 0 1 8 2.751V1a1 1 0 1 0-2 0v4.75a.75.75 0 0 1-.75.75.75.75 0 0 1-.75-.75V3.5A.5.5 0 0 0 4 3H2.5a2 2 0 0 0-2 2v17a2 2 0 0 0 2 2h19a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2M21 22H3a.5.5 0 0 1-.5-.5v-12A.5.5 0 0 1 3 9h18a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/CheckAll.tsx
var SvgCheckAll = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 26 26",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M5 0C2.255 0 0 2.255 0 5v12c0 2.745 2.255 5 5 5h12c2.745 0 5-2.255 5-5V5c0-2.745-2.255-5-5-5zm0 2h12c1.655 0 3 1.345 3 3v12c0 1.655-1.345 3-3 3H5c-1.655 0-3-1.345-3-3V5c0-1.655 1.345-3 3-3m19 3.025V21c0 1.654-1.346 3-3 3H5.025c.913 1.207 2.348 2 3.975 2h12c2.757 0 5-2.243 5-5V9c0-1.627-.793-3.062-2-3.975m-8.826.98a.5.5 0 0 0-.32.21l-4.782 7.092-2.16-2.16a.5.5 0 0 0-.707 0l-1.059 1.06a.5.5 0 0 0 0 .707l3.22 3.22a1.254 1.254 0 0 0 1.911-.173l5.633-8.326a.5.5 0 0 0-.127-.696l-1.234-.851a.5.5 0 0 0-.375-.082",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/CheckCircle1.tsx
var SvgCheckCircle1 = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M12 0a12 12 0 1 0 12 12A12.014 12.014 0 0 0 12 0m6.927 8.2-6.845 9.289a1.01 1.01 0 0 1-1.43.188l-4.888-3.908a1 1 0 1 1 1.25-1.562l4.076 3.261 6.227-8.451a1 1 0 1 1 1.61 1.183",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/CheckCircleHollow.tsx
var SvgCheckCircleHollow = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M12 0C1.308 0-4.044 12.925 3.516 20.484 11.075 28.044 24 22.692 24 12 23.992 5.376 18.624.008 12 0m.01 1.988c5.521.007 9.995 4.48 10.002 10.002 0 8.912-10.774 13.373-17.074 7.073-6.301-6.301-1.84-17.075 7.072-17.075m6.234 4.588a1 1 0 0 0-.928.442l-6.226 8.45-4.076-3.261a1 1 0 1 0-1.25 1.563l4.888 3.908a1.01 1.01 0 0 0 1.43-.19L18.928 8.2a1 1 0 0 0-.684-1.623",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/Check.tsx
var SvgCheck = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		fill: "currentColor",
		d: "M6.847 21.429a3.4 3.4 0 0 1-2.662-1.34l-3.76-4.273a1.714 1.714 0 0 1 2.572-2.263l3.522 4.01a.43.43 0 0 0 .631.014L21.036 3.105a1.715 1.715 0 1 1 2.486 2.362l-14.06 14.8a3.33 3.33 0 0 1-2.615 1.162"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/CloudUnknown.tsx
var SvgCloudUnknown = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M3.566 15.457a1 1 0 0 0-.5-.844 2.3 2.3 0 0 1-.431-.329A2.37 2.37 0 0 1 2 12.5a2.59 2.59 0 0 1 2.585-2.588 2.7 2.7 0 0 1 .536.056A1 1 0 0 0 6.324 9c.081-5.754 8.3-7.363 10.818-2.045a.97.97 0 0 0 .941.571 3.7 3.7 0 0 1 3 1.3 3.87 3.87 0 0 1 .908 2.811 3.43 3.43 0 0 1-1.1 2.375 1.32 1.32 0 0 0-.42 1.089.912.912 0 0 0 1.476.628A5.4 5.4 0 0 0 24 11.418a5.763 5.763 0 0 0-5.22-5.866.25.25 0 0 1-.19-.12 7.685 7.685 0 0 0-14.1 2.3.25.25 0 0 1-.227.2 4.64 4.64 0 0 0-3.643 2.24A4.47 4.47 0 0 0 0 12.619a4.29 4.29 0 0 0 1.235 3.09 4.2 4.2 0 0 0 .852.645 1 1 0 0 0 1.478-.9Z",
		fill: "currentColor"
	}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M18.5 15.8a6.5 6.5 0 1 0-6.5 6.5 6.51 6.51 0 0 0 6.5-6.5m-7.25 1.25v-.55a1.26 1.26 0 0 1 .986-1.221 1.125 1.125 0 1 0-1.361-1.1.75.75 0 1 1-1.5 0 2.625 2.625 0 1 1 3.538 2.461.25.25 0 0 0-.163.234v.18a.75.75 0 0 1-1.5 0ZM12 18.8a1 1 0 1 1-1 1 1 1 0 0 1 1-1",
		fill: "currentColor"
	})]
});
//#endregion
//#region ../component-library/src/icons/v2/CustomNotesPaper.tsx
var SvgCustomNotesPaper = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 19 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		fill: "currentColor",
		d: "M17 24H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h9a1 1 0 0 1 .707.293l7 7A1 1 0 0 1 19 8v14a2 2 0 0 1-2 2M2 21.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5V9a.5.5 0 0 0-.5-.5h-4a2 2 0 0 1-2-2v-4A.5.5 0 0 0 10 2H2.5a.5.5 0 0 0-.5.5z"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/DownAndRightArrow.tsx
var SvgDownAndRightArrow = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M4.092 3.658 1.267 6.484l.708.708.708.708 1.609-1.608L5.9 4.684V7.4c.001 2.838.022 3.466.132 3.96.393 1.766 1.732 2.972 3.985 3.59.238.065.53.133.65.151.119.018 1.229.055 2.466.082s2.458.06 2.712.072l.462.021-1.561 1.562-1.562 1.562.708.708.708.708 2.7-2.699 2.7-2.7v-.5l-2.7-2.7-2.7-2.7-.7.7-.7.699 1.675 1.679 1.675 1.678-.617-.019c-.339-.011-1.584-.043-2.766-.071-1.191-.028-2.232-.067-2.334-.087a7 7 0 0 1-1.283-.426c-.754-.356-1.201-.777-1.447-1.365-.167-.399-.17-.463-.17-3.649V4.684L9.55 6.3l1.617 1.616.708-.708.708-.708L9.75 3.667 6.917.833z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/DownloadThickBottom.tsx
var SvgDownloadThickBottom = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M8.616 1.741A1.455 1.455 0 0 1 10.07.287h3.392a1.455 1.455 0 0 1 1.453 1.454v8.228a.25.25 0 0 0 .25.25h2.9a1.138 1.138 0 0 1 .827 2l-6.1 6.1a1.49 1.49 0 0 1-2.056 0l-6.1-6.1a1.137 1.137 0 0 1 .827-2h2.9a.25.25 0 0 0 .25-.25Z",
		fill: "currentColor"
	}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M0 19.677a4.04 4.04 0 0 0 4.035 4.035h15.93A4.04 4.04 0 0 0 24 19.677V17.8a1.225 1.225 0 0 0-2.449 0v1.874a1.59 1.59 0 0 1-1.586 1.586H4.035a1.59 1.59 0 0 1-1.586-1.586V17.8A1.225 1.225 0 0 0 0 17.8Z",
		fill: "currentColor"
	})]
});
//#endregion
//#region ../component-library/src/icons/v2/EditSkull1.tsx
var SvgEditSkull1 = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		fill: "currentColor",
		d: "M12 0a10.286 10.286 0 0 0-6.243 18.45 1.71 1.71 0 0 1 .672 1.36v1.619A2.57 2.57 0 0 0 9 24a1.714 1.714 0 0 0 1.714-1.714V21a1.286 1.286 0 0 1 2.572 0v1.286A1.714 1.714 0 0 0 15 24a2.57 2.57 0 0 0 2.571-2.571V19.81a1.71 1.71 0 0 1 .672-1.36A10.286 10.286 0 0 0 12 0M7.714 12.429a2.143 2.143 0 1 1 2.143-2.143 2.143 2.143 0 0 1-2.143 2.143m8.572 0a2.143 2.143 0 1 1 2.143-2.143 2.143 2.143 0 0 1-2.143 2.143"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/FavoriteStar.tsx
var SvgFavoriteStar = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		fill: "currentColor",
		d: "M23.91 9.113a1.79 1.79 0 0 0-1.453-1.227l-6.132-.926-2.714-5.506a1.863 1.863 0 0 0-3.222 0l-2.78 5.552-6.066.88a1.798 1.798 0 0 0-1 3.068l4.428 4.361-1.028 6.055a1.797 1.797 0 0 0 2.607 1.895l5.488-2.865 5.429 2.858a1.797 1.797 0 0 0 2.607-1.895l-1.011-6.128 4.394-4.286a1.79 1.79 0 0 0 .454-1.836"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/Help.tsx
var SvgHelp = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	fill: "none",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		fill: "currentColor",
		d: "M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10M7.92 9.234v.102a.5.5 0 0 0 .5.5h.997a.5.5 0 0 0 .499-.499c0-1.29.998-1.979 2.34-1.979 1.308 0 2.168.689 2.168 1.67 0 .928-.482 1.359-1.686 1.91l-.344.154C11.379 11.54 11 12.21 11 13.381v.119a.5.5 0 0 0 .5.5h.997a.5.5 0 0 0 .499-.499c0-.516.138-.723.55-.912l.345-.155c1.445-.654 2.529-1.514 2.529-3.39v-.103c0-1.978-1.72-3.441-4.164-3.441-2.478 0-4.336 1.428-4.336 3.734m2.58 7.757c0 .867.659 1.509 1.491 1.509.85 0 1.509-.642 1.509-1.509s-.659-1.491-1.509-1.491c-.832 0-1.491.624-1.491 1.491"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/Hyperlink2.tsx
var SvgHyperlink2 = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: [
		/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
			d: "M12.406 14.905a1 1 0 0 0-.543 1.307 1 1 0 0 1-.217 1.09l-2.828 2.829a2 2 0 0 1-2.828 0L3.868 18.01a2 2 0 0 1 0-2.829L6.7 12.353a1.01 1.01 0 0 1 1.091-.217 1 1 0 0 0 .763-1.849 3.03 3.03 0 0 0-3.268.652l-2.832 2.828a4.006 4.006 0 0 0 0 5.657l2.122 2.121a4 4 0 0 0 5.656 0l2.829-2.828a3.01 3.01 0 0 0 .651-3.27 1 1 0 0 0-1.306-.542",
			fill: "currentColor"
		}),
		/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
			d: "M7.757 16.241a1.01 1.01 0 0 0 1.414 0l7.779-7.778a1 1 0 0 0-1.414-1.414l-7.779 7.778a1 1 0 0 0 0 1.414",
			fill: "currentColor"
		}),
		/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
			d: "m21.546 4.574-2.121-2.121a4.006 4.006 0 0 0-5.657 0l-2.829 2.828a3.01 3.01 0 0 0-.651 3.269 1 1 0 1 0 1.849-.764 1 1 0 0 1 .217-1.086l2.828-2.828a2 2 0 0 1 2.829 0l2.121 2.121a2 2 0 0 1 0 2.829L17.3 11.645a1.01 1.01 0 0 1-1.091.217 1 1 0 0 0-.765 1.849 3.03 3.03 0 0 0 3.27-.651l2.828-2.828a4.007 4.007 0 0 0 .004-5.658",
			fill: "currentColor"
		})
	]
});
//#endregion
//#region ../component-library/src/icons/v2/InformationCircle.tsx
var SvgInformationCircle = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M12 0a12 12 0 1 0 12 12A12.013 12.013 0 0 0 12 0m.25 5a1.5 1.5 0 1 1-1.5 1.5 1.5 1.5 0 0 1 1.5-1.5m2.25 13.5h-4a1 1 0 0 1 0-2h.75a.25.25 0 0 0 .25-.25v-4.5a.25.25 0 0 0-.25-.25h-.75a1 1 0 0 1 0-2h1a2 2 0 0 1 2 2v4.75a.25.25 0 0 0 .25.25h.75a1 1 0 1 1 0 2",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/Key.tsx
var SvgKey = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M23.113 5.954 21.849 4.69l.881-.88a1.914 1.914 0 1 0-2.707-2.71L9.04 12.085a6.014 6.014 0 1 0 2.707 2.707l3.739-3.737.762.762a1.75 1.75 0 1 0 2.475-2.475l-.763-.762 1.416-1.417 1.264 1.263a1.79 1.79 0 0 0 2.473 0 1.75 1.75 0 0 0 0-2.472m-16.737 8.5a3 3 0 1 1-3 3 3 3 0 0 1 3-2.998Z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/LockClosed.tsx
var SvgLockClosed = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M4 8V6a6 6 0 1 1 12 0v2h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2v-8c0-1.1.9-2 2-2zm5 6.73V17h2v-2.27a2 2 0 1 0-2 0M7 6v2h6V6a3 3 0 0 0-6 0",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/MoonStars.tsx
var SvgMoonStars = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	fill: "currentColor",
	className: "bi bi-moon-stars",
	viewBox: "0 0 16 16",
	style: {
		color: "inherit",
		...props.style
	},
	children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M6 .278a.77.77 0 0 1 .08.858 7.2 7.2 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277q.792-.001 1.533-.16a.79.79 0 0 1 .81.316.73.73 0 0 1-.031.893A8.35 8.35 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.75.75 0 0 1 6 .278M4.858 1.311A7.27 7.27 0 0 0 1.025 7.71c0 4.02 3.279 7.276 7.319 7.276a7.32 7.32 0 0 0 5.205-2.162q-.506.063-1.029.063c-4.61 0-8.343-3.714-8.343-8.29 0-1.167.242-2.278.681-3.286",
		fill: "currentColor"
	}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M10.794 3.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387a1.73 1.73 0 0 0-1.097 1.097l-.387 1.162a.217.217 0 0 1-.412 0l-.387-1.162A1.73 1.73 0 0 0 9.31 6.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387a1.73 1.73 0 0 0 1.097-1.097zM13.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.16 1.16 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.16 1.16 0 0 0-.732-.732l-.774-.258a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732z",
		fill: "currentColor"
	})]
});
//#endregion
//#region ../component-library/src/icons/v2/NavigationMenu.tsx
var SvgNavigationMenu = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: [
		/* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", {
			width: 23,
			height: 3,
			x: .5,
			y: 2.5,
			rx: 1,
			ry: 1,
			fill: "currentColor"
		}),
		/* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", {
			width: 23,
			height: 3,
			x: .5,
			y: 10.5,
			rx: 1,
			ry: 1,
			fill: "currentColor"
		}),
		/* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", {
			width: 23,
			height: 3,
			x: .5,
			y: 18.5,
			rx: 1,
			ry: 1,
			fill: "currentColor"
		})
	]
});
//#endregion
//#region ../component-library/src/icons/v2/NotesPaperText.tsx
var SvgNotesPaperText = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "m18.707 9.207 1-1a1 1 0 1 0-1.414-1.414l-1 1a1 1 0 0 1-1.415 0 3.07 3.07 0 0 0-4.242 0 1 1 0 0 1-1.414 0 3.073 3.073 0 0 0-4.243 0l-1 1a1 1 0 0 0 1.415 1.414l1-1a1.024 1.024 0 0 1 1.414 0 3 3 0 0 0 4.242 0 1.024 1.024 0 0 1 1.414 0 3 3 0 0 0 4.243 0M11.636 13.793a1 1 0 0 1-1.414 0 3.073 3.073 0 0 0-4.243 0l-1 1a1 1 0 0 0 1.415 1.414l1-1a1.024 1.024 0 0 1 1.414 0 3 3 0 0 0 4.242 0 1 1 0 0 0-1.414-1.414",
		fill: "currentColor"
	}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M24 2a2 2 0 0 0-2-2H2a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h14a1 1 0 0 0 .707-.293l7-7A1 1 0 0 0 24 16ZM2 2.5a.5.5 0 0 1 .5-.5h19a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5h-4a2 2 0 0 0-2 2v4a.5.5 0 0 1-.5.5H2.5a.5.5 0 0 1-.5-.5Z",
		fill: "currentColor"
	})]
});
//#endregion
//#region ../component-library/src/icons/v2/NotesPaper.tsx
var SvgNotesPaper = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M22 0H2a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h14a1 1 0 0 0 .707-.293l7-7A1 1 0 0 0 24 16V2a2 2 0 0 0-2-2M2 2.5a.5.5 0 0 1 .5-.5h19a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5h-4a2 2 0 0 0-2 2v4a.5.5 0 0 1-.5.5H2.5a.5.5 0 0 1-.5-.5Z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/Pencil1.tsx
var SvgPencil1 = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M15.067 3.986a.5.5 0 0 0-.354-.148.5.5 0 0 0-.354.147L3.437 14.91a.5.5 0 0 0 0 .707l4.948 4.948a.5.5 0 0 0 .707 0L20.009 9.648a.5.5 0 0 0 0-.706ZM2.43 16.8a.5.5 0 0 0-.489-.127.5.5 0 0 0-.351.364L.084 23.314a.5.5 0 0 0 .133.47.51.51 0 0 0 .47.132l6.272-1.5a.5.5 0 0 0 .237-.84ZM23.2 2.924 21.077.8a2.5 2.5 0 0 0-3.532 0l-1.418 1.417a.5.5 0 0 0 0 .707l4.95 4.949a.5.5 0 0 0 .707 0L23.2 6.454a2.5 2.5 0 0 0 0-3.53",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/PencilWriteAlternate.tsx
var SvgPencilWriteAlternate = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M20 11.491a1 1 0 0 0-1 1v8.5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-17a1 1 0 0 1 1-1h10a1 1 0 0 0 0-2H3a3 3 0 0 0-3 3v17a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3v-8.5a1 1 0 0 0-1-1",
		fill: "currentColor"
	}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M18.818 3.051a.516.516 0 0 0-.707 0L10.3 10.865a.5.5 0 0 0-.111.168l-1.416 3.535a.5.5 0 0 0 .111.539.52.52 0 0 0 .539.11l3.535-1.417a.5.5 0 0 0 .168-.111L20.94 5.88a.5.5 0 0 0 0-.707ZM23.415.577a2.047 2.047 0 0 0-2.828 0l-1.061 1.06a.5.5 0 0 0 0 .707l2.12 2.121a.5.5 0 0 0 .707 0l1.061-1.06a2 2 0 0 0 0-2.828Z",
		fill: "currentColor"
	})]
});
//#endregion
//#region ../component-library/src/icons/v2/RefreshArrow.tsx
var SvgRefreshArrow = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M10.664 20.073a1.249 1.249 0 1 0-.507 2.447A10.739 10.739 0 1 0 2.4 16.1a.25.25 0 0 1-.084.3l-1 .726a1 1 0 0 0 .377 1.787l3.946.849a1 1 0 0 0 .21.022 1 1 0 0 0 .978-.79l.945-4.4a1 1 0 0 0-1.565-1.02l-1.361.989a.25.25 0 0 1-.386-.128 8.255 8.255 0 1 1 6.205 5.643Z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/Remove.tsx
var SvgRemove = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M.439 21.44a1.5 1.5 0 0 0 2.122 2.121l9.262-9.261a.25.25 0 0 1 .354 0l9.262 9.263a1.5 1.5 0 1 0 2.122-2.121L14.3 12.177a.25.25 0 0 1 0-.354l9.263-9.262A1.5 1.5 0 0 0 21.439.44L12.177 9.7a.25.25 0 0 1-.354 0L2.561.44A1.5 1.5 0 0 0 .439 2.561L9.7 11.823a.25.25 0 0 1 0 .354Z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/SearchAlternate.tsx
var SvgSearchAlternate = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "m23.384 21.619-6.529-6.529a9.284 9.284 0 1 0-1.768 1.768l6.529 6.529a1.266 1.266 0 0 0 1.768 0 1.25 1.25 0 0 0 0-1.768M2.75 9.5a6.75 6.75 0 1 1 6.75 6.75A6.76 6.76 0 0 1 2.75 9.5",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/Subtract.tsx
var SvgSubtract = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M1.5 13.5h21a1.5 1.5 0 0 0 0-3h-21a1.5 1.5 0 0 0 0 3",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/Sun.tsx
var SvgSun = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	fill: "currentColor",
	className: "bi bi-sun",
	viewBox: "0 0 16 16",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M8 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6m0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8M8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0m0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13m8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5M3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8m10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0m-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0m9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707M4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/UncheckAll.tsx
var SvgUncheckAll = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 26 26",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M5 0C2.255 0 0 2.255 0 5v12c0 2.745 2.255 5 5 5h12c2.745 0 5-2.255 5-5V5c0-2.745-2.255-5-5-5zm0 2h12c1.655 0 3 1.345 3 3v12c0 1.655-1.345 3-3 3H5c-1.655 0-3-1.345-3-3V5c0-1.655 1.345-3 3-3m19 3.025V21c0 1.654-1.346 3-3 3H5.025c.913 1.207 2.348 2 3.975 2h12c2.757 0 5-2.243 5-5V9c0-1.627-.793-3.062-2-3.975",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/ValidationCheck.tsx
var SvgValidationCheck = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 24 24",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		fill: "currentColor",
		d: "M7.176 22.5a4.11 4.11 0 0 1-3.17-1.486l-3.62-4.6a1.8 1.8 0 1 1 2.828-2.228l3.6 4.56a.38.38 0 0 0 .379.152.52.52 0 0 0 .408-.197L20.794 2.177a1.8 1.8 0 1 1 2.812 2.246L10.39 20.964A4.12 4.12 0 0 1 7.2 22.5Z"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/ViewHide.tsx
var SvgViewHide = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "m12.81 4.36-1.77 1.78a4 4 0 0 0-4.9 4.9l-2.76 2.75C2.06 12.79.96 11.49.2 10a11 11 0 0 1 12.6-5.64zm3.8 1.85c1.33 1 2.43 2.3 3.2 3.79a11 11 0 0 1-12.62 5.64l1.77-1.78a4 4 0 0 0 4.9-4.9l2.76-2.75zm-.25-3.99 1.42 1.42L3.64 17.78l-1.42-1.42z",
		fill: "currentColor"
	})
});
//#endregion
//#region ../component-library/src/icons/v2/ViewShow.tsx
var SvgViewShow = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
	...props,
	xmlns: "http://www.w3.org/2000/svg",
	viewBox: "0 0 20 20",
	style: {
		color: "inherit",
		...props.style
	},
	children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
		d: "M.2 10a11 11 0 0 1 19.6 0A11 11 0 0 1 .2 10m9.8 4a4 4 0 1 0 0-8 4 4 0 0 0 0 8m0-2a2 2 0 1 1 0-4 2 2 0 0 1 0 4",
		fill: "currentColor"
	})
});
//#endregion
//#region ../../node_modules/react-virtualized-auto-sizer/dist/react-virtualized-auto-sizer.js
init_build_shims();
var m;
typeof window < "u" ? m = window : typeof self < "u" ? m = self : m = global;
var R = null, E = null;
var N = 20, y = m.clearTimeout, S = m.setTimeout, F = m.cancelAnimationFrame || m.mozCancelAnimationFrame || m.webkitCancelAnimationFrame, W = m.requestAnimationFrame || m.mozRequestAnimationFrame || m.webkitRequestAnimationFrame;
F == null || W == null ? (R = y, E = function(l) {
	return S(l, N);
}) : (R = function([l, _]) {
	F(l), y(_);
}, E = function(l) {
	const _ = W(function() {
		y(f), l();
	}), f = S(function() {
		F(_), l();
	}, N);
	return [_, f];
});
function D(z) {
	let l, _, f, u, T, r, a;
	const c = typeof document < "u" && document.attachEvent;
	if (!c) {
		r = function(t) {
			const i = t.__resizeTriggers__, h = i.firstElementChild, b = i.lastElementChild, L = h.firstElementChild;
			b.scrollLeft = b.scrollWidth, b.scrollTop = b.scrollHeight, L.style.width = h.offsetWidth + 1 + "px", L.style.height = h.offsetHeight + 1 + "px", h.scrollLeft = h.scrollWidth, h.scrollTop = h.scrollHeight;
		}, T = function(t) {
			return t.offsetWidth !== t.__resizeLast__.width || t.offsetHeight !== t.__resizeLast__.height;
		}, a = function(t) {
			if (t.target.className && typeof t.target.className.indexOf == "function" && t.target.className.indexOf("contract-trigger") < 0 && t.target.className.indexOf("expand-trigger") < 0) return;
			const i = this;
			r(this), this.__resizeRAF__ && R(this.__resizeRAF__), this.__resizeRAF__ = E(function() {
				T(i) && (i.__resizeLast__.width = i.offsetWidth, i.__resizeLast__.height = i.offsetHeight, i.__resizeListeners__.forEach(function(L) {
					L.call(i, t);
				}));
			});
		};
		let e = !1, s = "";
		f = "animationstart";
		const d = "Webkit Moz O ms".split(" ");
		let o = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), p = "";
		{
			const t = document.createElement("fakeelement");
			if (t.style.animationName !== void 0 && (e = !0), e === !1) {
				for (let i = 0; i < d.length; i++) if (t.style[d[i] + "AnimationName"] !== void 0) {
					p = d[i], s = "-" + p.toLowerCase() + "-", f = o[i], e = !0;
					break;
				}
			}
		}
		_ = "resizeanim", l = "@" + s + "keyframes " + _ + " { from { opacity: 0; } to { opacity: 0; } } ", u = s + "animation: 1ms " + _ + "; ";
	}
	const n = function(e) {
		if (!e.getElementById("detectElementResize")) {
			const s = (l || "") + ".resize-triggers { " + (u || "") + "visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: \" \"; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }", d = e.head || e.getElementsByTagName("head")[0], o = e.createElement("style");
			o.id = "detectElementResize", o.type = "text/css", z != null && o.setAttribute("nonce", z), o.styleSheet ? o.styleSheet.cssText = s : o.appendChild(e.createTextNode(s)), d.appendChild(o);
		}
	};
	return {
		addResizeListener: function(e, s) {
			if (c) e.attachEvent("onresize", s);
			else {
				if (!e.__resizeTriggers__) {
					const d = e.ownerDocument, o = m.getComputedStyle(e);
					o && o.position === "static" && (e.style.position = "relative"), n(d), e.__resizeLast__ = {}, e.__resizeListeners__ = [], (e.__resizeTriggers__ = d.createElement("div")).className = "resize-triggers";
					const p = d.createElement("div");
					p.className = "expand-trigger", p.appendChild(d.createElement("div"));
					const t = d.createElement("div");
					t.className = "contract-trigger", e.__resizeTriggers__.appendChild(p), e.__resizeTriggers__.appendChild(t), e.appendChild(e.__resizeTriggers__), r(e), e.addEventListener("scroll", a, !0), f && (e.__resizeTriggers__.__animationListener__ = function(h) {
						h.animationName === _ && r(e);
					}, e.__resizeTriggers__.addEventListener(f, e.__resizeTriggers__.__animationListener__));
				}
				e.__resizeListeners__.push(s);
			}
		},
		removeResizeListener: function(e, s) {
			if (c) e.detachEvent("onresize", s);
			else if (e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(s), 1), !e.__resizeListeners__.length) {
				e.removeEventListener("scroll", a, !0), e.__resizeTriggers__.__animationListener__ && (e.__resizeTriggers__.removeEventListener(f, e.__resizeTriggers__.__animationListener__), e.__resizeTriggers__.__animationListener__ = null);
				try {
					e.__resizeTriggers__ = !e.removeChild(e.__resizeTriggers__);
				} catch {}
			}
		}
	};
}
function B({ box: z, nonce: l, onResize: _, rootElement: f }) {
	const u = (0, import_react.useRef)({
		onResize: _,
		parentNode: null,
		prevSize: {
			height: void 0,
			width: void 0
		}
	});
	(0, import_react.useLayoutEffect)(() => {
		u.current.onResize = _;
	});
	const T = (0, import_react.useRef)(() => {
		const { onResize: r, parentNode: a, prevSize: c } = u.current;
		if (a === null) return;
		let n, g;
		switch (z) {
			case "border-box": {
				const v = a.getBoundingClientRect();
				n = v.height, g = v.width;
				break;
			}
			case "content-box": {
				const v = a.getBoundingClientRect(), e = window.getComputedStyle(a) || {}, s = parseFloat(e.borderBottomWidth || "0"), d = parseFloat(e.borderLeftWidth || "0"), o = parseFloat(e.borderRightWidth || "0"), p = parseFloat(e.borderTopWidth || "0"), t = parseFloat(e.paddingLeft || "0"), i = parseFloat(e.paddingRight || "0"), h = parseFloat(e.paddingTop || "0"), b = parseFloat(e.paddingBottom || "0");
				n = v.height - h - b - p - s, g = v.width - t - i - d - o;
				break;
			}
			case "device-pixel-content-box":
				n = a.offsetHeight, g = a.offsetWidth;
				break;
		}
		(c.height !== n || c.width !== g) && (u.current.prevSize = {
			height: n,
			width: g
		}, r({
			height: n,
			width: g
		}));
	});
	(0, import_react.useLayoutEffect)(() => {
		if (f === null) return;
		const r = f.parentNode;
		if (r === null || r.ownerDocument === null || r.ownerDocument.defaultView === null || !(r instanceof r.ownerDocument.defaultView.HTMLElement)) return;
		u.current.parentNode = r;
		const a = T.current, c = r.ownerDocument.defaultView.ResizeObserver;
		if (c != null) {
			let n;
			const g = new c(() => {
				n = setTimeout(a, 0);
			});
			return g.observe(r), () => {
				n && clearTimeout(n), g.disconnect();
			};
		} else {
			const n = D(l);
			return n.addResizeListener(r, a), () => {
				n.removeResizeListener(r, a);
			};
		}
	}, [l, f]);
}
function q({ box: z = "content-box", className: l, "data-testid": _, id: f, nonce: u, onResize: T, style: r, tagName: a = "div", ...c }) {
	let n, g;
	"Child" in c ? n = c.Child : "ChildComponent" in c ? n = c.ChildComponent : "renderProp" in c && (g = c.renderProp);
	const [v, e] = (0, import_react.useState)(null), [s, d] = (0, import_react.useState)(), [o, p] = (0, import_react.useState)();
	B({
		box: z,
		nonce: u,
		onResize: (i) => {
			d(i.height), p(i.width), typeof T < "u" && T(i);
		},
		rootElement: v
	});
	const t = (0, import_react.useMemo)(() => n ? (0, import_react.memo)(n) : void 0, [n]);
	return (0, import_react.createElement)(a, {
		className: l,
		"data-auto-sizer": "",
		"data-testid": _,
		id: f,
		ref: e,
		style: r
	}, t ? (0, import_react.createElement)(t, {
		height: s,
		width: o
	}) : void 0, g ? g({
		height: s,
		width: o
	}) : void 0);
}
//#endregion
//#region ../component-library/src/Toggle.tsx
var Toggle = ({ id, isOn, isDisabled = false, onToggle, className, style }) => {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
		style,
		className,
		children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
			id,
			checked: isOn,
			disabled: isDisabled,
			onChange: (e) => onToggle?.(e.target.checked),
			className: css({
				height: 0,
				width: 0,
				visibility: "hidden"
			}),
			type: "checkbox"
		}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", {
			"data-toggle-container": true,
			"data-on": isOn,
			className: String(css({
				display: "flex",
				alignItems: "center",
				justifyContent: "space-between",
				cursor: "pointer",
				width: "32px",
				height: "16px",
				borderRadius: "100px",
				position: "relative",
				transition: "background-color .2s",
				backgroundColor: isOn ? theme.checkboxToggleBackgroundSelected : theme.checkboxToggleBackground
			})),
			htmlFor: id,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
				"data-toggle": true,
				"data-on": isOn,
				className: css({
					content: "\" \"",
					position: "absolute",
					top: "2px",
					left: "2px",
					width: "12px",
					height: "12px",
					borderRadius: "100px",
					transition: "0.2s",
					boxShadow: "0 0 2px 0 rgba(10, 10, 10, 0.29)",
					backgroundColor: isDisabled ? theme.checkboxToggleDisabled : "#fff"
				}, isOn && {
					left: "calc(100% - 2px)",
					transform: "translateX(-100%)"
				})
			})
		})]
	});
};
//#endregion
//#region ../component-library/src/Menu.tsx
var MenuLine = Symbol("menu-line");
var MenuLabel = Symbol("menu-label");
Menu.line = MenuLine;
Menu.label = MenuLabel;
function Keybinding({ keyName }) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
		style: {
			fontSize: 10,
			color: theme.menuKeybindingText
		},
		children: keyName
	});
}
function isLabel(item) {
	return item.type === Menu.label;
}
function Menu({ header, footer, items: allItems, onMenuSelect, style, className, getItemStyle, slot }) {
	const elRef = (0, import_react.useRef)(null);
	const items = allItems.filter((x) => x);
	const filteredItems = items.filter((item) => item && item !== Menu.line && item.type !== Menu.label);
	const [hoveredIndex, setHoveredIndex] = (0, import_react.useState)(null);
	const currentIndex = filteredItems.indexOf(items[hoveredIndex || 0]);
	const transformIndex = (idx) => items.indexOf(filteredItems[idx]);
	function hoverPrevious() {
		setHoveredIndex(hoveredIndex === null ? 0 : transformIndex(Math.max(currentIndex - 1, 0)));
	}
	function hoverNext() {
		setHoveredIndex(hoveredIndex === null ? 0 : transformIndex(Math.min(currentIndex + 1, filteredItems.length - 1)));
	}
	function selectItem() {
		const item = items[hoveredIndex || 0];
		if (hoveredIndex !== null && item !== Menu.line && !isLabel(item) && !item.disabled) onMenuSelect?.(item.name);
	}
	function onKeyDown(e) {
		switch (e.key) {
			case "ArrowUp":
				e.preventDefault();
				hoverPrevious();
				break;
			case "ArrowDown":
				e.preventDefault();
				hoverNext();
				break;
			case "Enter":
				e.preventDefault();
				selectItem();
				break;
			default:
		}
	}
	(0, import_react.useEffect)(() => {
		const activeElement = document.activeElement;
		if (activeElement && ([
			"input",
			"select",
			"textarea"
		].includes(activeElement.tagName.toLowerCase()) || activeElement.hasAttribute("contenteditable") || activeElement.getAttribute("role") === "textbox")) return;
		elRef.current?.focus();
	}, []);
	return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
		className,
		style: {
			outline: "none",
			borderRadius: 4,
			overflow: "hidden",
			...style
		},
		tabIndex: 0,
		onKeyDown,
		innerRef: elRef,
		children: [
			header,
			items.map((item, idx) => {
				if (item === Menu.line) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
					style: { margin: "3px 0px" },
					children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, { style: { borderTop: "1px solid " + theme.menuBorder } })
				}, idx);
				else if (isLabel(item)) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
					style: {
						color: theme.menuItemTextHeader,
						fontSize: 11,
						lineHeight: "1em",
						textTransform: "uppercase",
						margin: "3px 9px",
						marginTop: 5
					},
					children: item.name
				}, idx);
				const Icon = item.icon;
				return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button, {
					excludeFromTabOrder: true,
					variant: "bare",
					slot,
					style: {
						cursor: "default",
						padding: 10,
						flexDirection: "row",
						justifyContent: "center",
						alignItems: "center",
						color: theme.menuItemText,
						...item.disabled && { color: theme.buttonBareDisabledText },
						...!item.disabled && hoveredIndex === idx && {
							backgroundColor: theme.menuItemBackgroundHover,
							color: theme.menuItemTextHover
						},
						...!isLabel(item) && getItemStyle?.(item)
					},
					onHoverStart: () => setHoveredIndex(idx),
					onHoverEnd: () => setHoveredIndex(null),
					onPress: () => {
						if (!item.disabled && item.toggle === void 0 && !isLabel(item)) onMenuSelect?.(item.name);
					},
					children: [item.toggle === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
						Icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
							width: item.iconSize || 10,
							height: item.iconSize || 10,
							style: {
								marginRight: 7,
								width: item.iconSize || 10
							}
						}),
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
							title: item.tooltip,
							children: item.text
						}),
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, { style: { flex: 1 } })
					] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
						style: {
							flexDirection: "row",
							flex: 1,
							justifyContent: "space-between",
							alignItems: "center"
						},
						children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", {
							htmlFor: String(item.name),
							title: item.tooltip,
							children: item.text
						}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Toggle, {
							id: String(item.name),
							isOn: item.toggle,
							style: { marginLeft: 5 },
							onToggle: () => !item.disabled && !isLabel(item) && item.toggle !== void 0 && onMenuSelect?.(item.name)
						})]
					}), item.key && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Keybinding, { keyName: item.key })]
				}, String(item.name));
			}),
			footer
		]
	});
}
//#endregion
//#region ../component-library/src/Popover.tsx
var Popover = ({ style = {}, shouldCloseOnInteractOutside, ...props }) => {
	const ref = (0, import_react.useRef)(null);
	const handleFocus = (0, import_react.useCallback)((e) => {
		if (!ref.current?.contains(e.relatedTarget)) props.onOpenChange?.(false);
	}, [props]);
	(0, import_react.useEffect)(() => {
		if (!props.isNonModal) return;
		if (props.isOpen) ref.current?.addEventListener("focusout", handleFocus);
		else ref.current?.removeEventListener("focusout", handleFocus);
	}, [
		handleFocus,
		props.isNonModal,
		props.isOpen
	]);
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)($07b14b47974efb58$export$5b6b19405a83ff9d, {
		"data-popover": true,
		ref,
		placement: "bottom end",
		offset: 1,
		className: css({
			...styles.tooltip,
			...styles.lightScrollbar,
			padding: 0,
			userSelect: "none",
			...style
		}),
		shouldCloseOnInteractOutside: (element) => {
			if (shouldCloseOnInteractOutside) return shouldCloseOnInteractOutside(element);
			return true;
		},
		...props
	});
};
//#endregion
//#region ../loot-core/src/shared/arithmetic.ts
function fail(state, msg) {
	throw new Error(msg + ": " + JSON.stringify(state.str.slice(state.index, 10)));
}
function char(state) {
	return state.str[state.index];
}
function next(state) {
	if (state.index >= state.str.length) return null;
	const ch = char(state);
	state.index++;
	return ch ?? null;
}
function nextOperator(state, op) {
	if (char(state) === op) {
		next(state);
		return true;
	}
	return false;
}
function parsePrimary(state) {
	const isNegative = char(state) === "-";
	if (isNegative) next(state);
	let numberStr = "";
	let currentChar = char(state);
	while (currentChar && currentChar.match(/[0-9,.'\u2019\u00A0\u202F ]|\p{Sc}/u)) {
		const ch = next(state);
		if (ch !== null) numberStr += ch;
		currentChar = char(state);
	}
	if (numberStr === "") fail(state, "Unexpected character");
	const number = currencyToAmount(numberStr);
	if (number === null) fail(state, "Invalid number format");
	return isNegative ? -number : number;
}
function parseParens(state) {
	if (char(state) === "(") {
		next(state);
		const expr = parseOperator(state);
		if (char(state) !== ")") fail(state, "Unbalanced parentheses");
		next(state);
		return expr;
	}
	return parsePrimary(state);
}
function parseExponent(state) {
	let node = parseParens(state);
	if (nextOperator(state, "^")) node = {
		op: "^",
		left: node,
		right: parseExponent(state)
	};
	return node;
}
function parseMultiplicative(state) {
	let node = parseExponent(state);
	while (char(state) === "*" || char(state) === "/") node = {
		op: next(state),
		left: node,
		right: parseExponent(state)
	};
	return node;
}
function parseAdditive(state) {
	let node = parseMultiplicative(state);
	while (char(state) === "+" || char(state) === "-") node = {
		op: next(state),
		left: node,
		right: parseMultiplicative(state)
	};
	return node;
}
var parseOperator = parseAdditive;
function parse$4(expression) {
	return parseOperator({
		str: expression.replace(/\s/g, ""),
		index: 0
	});
}
function evaluate(ast) {
	if (typeof ast === "number") return ast;
	const { left, right, op } = ast;
	switch (op) {
		case "+": return evaluate(left) + evaluate(right);
		case "-": return evaluate(left) - evaluate(right);
		case "*": return evaluate(left) * evaluate(right);
		case "/": return evaluate(left) / evaluate(right);
		case "^": return Math.pow(evaluate(left), evaluate(right));
		default: throw new Error("Unknown operator: " + op);
	}
}
function evalArithmetic(expression, defaultValue = null) {
	if (expression === "") return defaultValue;
	let result;
	try {
		result = evaluate(parse$4(expression));
	} catch {
		return defaultValue;
	}
	return isNaN(result) ? defaultValue : result;
}
//#endregion
//#region ../loot-core/src/shared/currencies.ts
var currencies = [
	{
		code: "",
		name: "None",
		symbol: "",
		decimalPlaces: 2,
		numberFormat: "comma-dot",
		symbolFirst: true
	},
	{
		code: "AED",
		name: "UAE Dirham",
		symbol: "د.إ",
		decimalPlaces: 2,
		numberFormat: "comma-dot",
		symbolFirst: false
	},
	{
		code: "ARS",
		name: "Argentinian Peso",
		symbol: "Arg$",
		decimalPlaces: 2,
		numberFormat: "dot-comma",
		symbolFirst: true
	},
	{
		code: "AUD",
		name: "Australian Dollar",
		symbol: "A$",
		decimalPlaces: 2,
		numberFormat: "comma-dot",
		symbolFirst: true
	},
	{
		code: "BRL",
		name: "Brazilian Real",
		symbol: "R$",
		decimalPlaces: 2,
		numberFormat: "dot-comma",
		symbolFirst: true
	},
	{
		code: "BYN",
		name: "Belarusian Ruble",
		symbol: "Br",
		decimalPlaces: 2,
		numberFormat: "space-comma",
		symbolFirst: false
	},
	{
		code: "CAD",
		name: "Canadian Dollar",
		symbol: "CA$",
		decimalPlaces: 2,
		numberFormat: "comma-dot",
		symbolFirst: true
	},
	{
		code: "CHF",
		name: "Swiss Franc",
		symbol: "Fr.",
		decimalPlaces: 2,
		numberFormat: "apostrophe-dot",
		symbolFirst: true
	},
	{
		code: "CLP",
		name: "Chilean Peso",
		symbol: "CLP$",
		decimalPlaces: 2,
		numberFormat: "dot-comma",
		symbolFirst: true
	},
	{
		code: "CNY",
		name: "Yuan Renminbi",
		symbol: "¥",
		decimalPlaces: 2,
		numberFormat: "comma-dot",
		symbolFirst: true
	},
	{
		code: "COP",
		name: "Colombian Peso",
		symbol: "Col$",
		decimalPlaces: 2,
		numberFormat: "dot-comma",
		symbolFirst: true
	},
	{
		code: "CRC",
		name: "Costa Rican Colón",
		symbol: "₡",
		decimalPlaces: 2,
		numberFormat: "space-comma",
		symbolFirst: true
	},
	{
		code: "CZK",
		name: "Czech Koruna",
		symbol: "Kč",
		decimalPlaces: 2,
		numberFormat: "space-comma",
		symbolFirst: false
	},
	{
		code: "DKK",
		name: "Danish Krone",
		symbol: "kr",
		decimalPlaces: 2,
		numberFormat: "dot-comma",
		symbolFirst: false
	},
	{
		code: "DOP",
		name: "Dominican Peso",
		symbol: "RD$",
		decimalPlaces: 2,
		numberFormat: "comma-dot",
		symbolFirst: true
	},
	{
		code: "EGP",
		name: "Egyptian Pound",
		symbol: "ج.م",
		decimalPlaces: 2,
		numberFormat: "comma-dot",
		symbolFirst: false
	},
	{
		code: "EUR",
		name: "Euro",
		symbol: "€",
		decimalPlaces: 2,
		numberFormat: "dot-comma",
		symbolFirst: false
	},
	{
		code: "GBP",
		name: "Pound Sterling",
		symbol: "£",
		decimalPlaces: 2,
		numberFormat: "comma-dot",
		symbolFirst: true
	},
	{
		code: "GTQ",
		name: "Guatemalan Quetzal",
		symbol: "Q",
		decimalPlaces: 2,
		numberFormat: "comma-dot",
		symbolFirst: true
	},
	{
		code: "HKD",
		name: "Hong Kong Dollar",
		symbol: "HK$",
		decimalPlaces: 2,
		numberFormat: "comma-dot",
		symbolFirst: true
	},
	{
		code: "HUF",
		name: "Hungarian Forint",
		symbol: "Ft",
		decimalPlaces: 2,
		numberFormat: "space-comma",
		symbolFirst: false
	},
	{
		code: "IDR",
		name: "Indonesian Rupiah",
		symbol: "Rp",
		decimalPlaces: 2,
		numberFormat: "dot-comma",
		symbolFirst: true
	},
	{
		code: "INR",
		name: "Indian Rupee",
		symbol: "₹",
		decimalPlaces: 2,
		numberFormat: "comma-dot-in",
		symbolFirst: true
	},
	{
		code: "JMD",
		name: "Jamaican Dollar",
		symbol: "J$",
		decimalPlaces: 2,
		numberFormat: "comma-dot",
		symbolFirst: true
	},
	{
		code: "JPY",
		name: "Japanese Yen",
		symbol: "¥",
		decimalPlaces: 0,
		numberFormat: "comma-dot",
		symbolFirst: true
	},
	{
		code: "KRW",
		name: "South Korean Won",
		symbol: "₩",
		decimalPlaces: 0,
		numberFormat: "comma-dot",
		symbolFirst: true
	},
	{
		code: "LKR",
		name: "Sri Lankan Rupee",
		symbol: "Rs.",
		decimalPlaces: 2,
		numberFormat: "comma-dot",
		symbolFirst: true
	},
	{
		code: "MDL",
		name: "Moldovan Leu",
		symbol: "L",
		decimalPlaces: 2,
		numberFormat: "dot-comma",
		symbolFirst: false
	},
	{
		code: "MYR",
		name: "Malaysian Ringgit",
		symbol: "RM",
		decimalPlaces: 2,
		numberFormat: "comma-dot",
		symbolFirst: true
	},
	{
		code: "PHP",
		name: "Philippine Peso",
		symbol: "₱",
		decimalPlaces: 2,
		numberFormat: "comma-dot",
		symbolFirst: true
	},
	{
		code: "PLN",
		name: "Polish Złoty",
		symbol: "zł",
		decimalPlaces: 2,
		numberFormat: "space-comma",
		symbolFirst: false
	},
	{
		code: "QAR",
		name: "Qatari Riyal",
		symbol: "ر.ق",
		decimalPlaces: 2,
		numberFormat: "comma-dot",
		symbolFirst: false
	},
	{
		code: "RON",
		name: "Romanian Leu",
		symbol: "lei",
		decimalPlaces: 2,
		numberFormat: "dot-comma",
		symbolFirst: false
	},
	{
		code: "RSD",
		name: "Serbian Dinar",
		symbol: "дин",
		decimalPlaces: 2,
		numberFormat: "dot-comma",
		symbolFirst: false
	},
	{
		code: "RUB",
		name: "Russian Ruble",
		symbol: "₽",
		decimalPlaces: 2,
		numberFormat: "space-comma",
		symbolFirst: false
	},
	{
		code: "SAR",
		name: "Saudi Riyal",
		symbol: "ر.س",
		decimalPlaces: 2,
		numberFormat: "comma-dot",
		symbolFirst: false
	},
	{
		code: "SEK",
		name: "Swedish Krona",
		symbol: "kr",
		decimalPlaces: 2,
		numberFormat: "space-comma",
		symbolFirst: false
	},
	{
		code: "SGD",
		name: "Singapore Dollar",
		symbol: "S$",
		decimalPlaces: 2,
		numberFormat: "comma-dot",
		symbolFirst: true
	},
	{
		code: "THB",
		name: "Thai Baht",
		symbol: "฿",
		decimalPlaces: 2,
		numberFormat: "comma-dot",
		symbolFirst: true
	},
	{
		code: "TRY",
		name: "Turkish Lira",
		symbol: "₺",
		decimalPlaces: 2,
		numberFormat: "dot-comma",
		symbolFirst: true
	},
	{
		code: "TWD",
		name: "New Taiwan Dollar",
		symbol: "NT$",
		decimalPlaces: 2,
		numberFormat: "comma-dot",
		symbolFirst: true
	},
	{
		code: "UAH",
		name: "Ukrainian Hryvnia",
		symbol: "₴",
		decimalPlaces: 2,
		numberFormat: "space-comma",
		symbolFirst: false
	},
	{
		code: "USD",
		name: "US Dollar",
		symbol: "$",
		decimalPlaces: 2,
		numberFormat: "comma-dot",
		symbolFirst: true
	},
	{
		code: "UZS",
		name: "Uzbek Soum",
		symbol: "UZS",
		decimalPlaces: 2,
		numberFormat: "space-comma",
		symbolFirst: false
	}
];
function getCurrency(code) {
	return currencies.find((c) => c.code === code) || currencies[0];
}
//#endregion
//#region src/hooks/useSyncedPref.ts
function useSyncedPref(prefName) {
	const dispatch = useDispatch();
	const setPref = (0, import_react.useCallback)((value) => {
		dispatch(saveSyncedPrefs({ prefs: { [prefName]: value } }));
	}, [prefName, dispatch]);
	return [useSelector((state) => state.prefs.synced[prefName]), setPref];
}
//#endregion
//#region src/hooks/useFormat.ts
function format$3(value, type, formatter, decimalPlaces) {
	switch (type) {
		case "string": {
			const val = JSON.stringify(value);
			if (val.charAt(0) === "\"" && val.charAt(val.length - 1) === "\"") return { formattedString: val.slice(1, -1) };
			return { formattedString: val };
		}
		case "number":
			if (typeof value !== "number") throw new Error("Value is not a number (" + typeof value + "): " + value);
			return {
				numericValue: value,
				formattedString: formatter.format(value)
			};
		case "percentage": return { formattedString: value + "%" };
		case "financial-with-sign":
		case "financial-no-decimals":
		case "financial": {
			let localValue = value;
			if (localValue == null || localValue === "") localValue = 0;
			else if (typeof localValue === "string") {
				const integerString = localValue.replace(/[^\d-]/g, "");
				const parsed = parseInt(integerString, 10);
				if (isNaN(parsed)) throw new Error(`Invalid numeric value: ${localValue}`);
				localValue = parsed;
			}
			if (typeof localValue !== "number") throw new Error("Value is not a number (" + typeof localValue + "): " + localValue);
			return {
				numericValue: localValue,
				formattedString: integerToCurrency(localValue, formatter, decimalPlaces)
			};
		}
		default: throw new Error("Unknown format type: " + type);
	}
}
function useFormat() {
	const [numberFormatPref] = useSyncedPref("numberFormat");
	const [hideFractionPref] = useSyncedPref("hideFraction");
	const [defaultCurrencyCodePref] = useSyncedPref("defaultCurrencyCode");
	const [symbolPositionPref] = useSyncedPref("currencySymbolPosition");
	const [spaceEnabledPref] = useSyncedPref("currencySpaceBetweenAmountAndSymbol");
	const activeCurrency = (0, import_react.useMemo)(() => {
		return getCurrency(defaultCurrencyCodePref || "");
	}, [defaultCurrencyCodePref]);
	const numberFormatConfig = (0, import_react.useMemo)(() => parseNumberFormat({
		format: numberFormatPref,
		hideFraction: hideFractionPref === "true"
	}), [numberFormatPref, hideFractionPref]);
	(0, import_react.useEffect)(() => {
		setNumberFormat(numberFormatConfig);
	}, [numberFormatConfig]);
	const applyCurrencyStyling = (0, import_react.useCallback)((formattedNumericValue, currencySymbol) => {
		if (!currencySymbol) return formattedNumericValue;
		let sign = "";
		let valueWithoutSign = formattedNumericValue;
		if (formattedNumericValue.startsWith("-")) {
			sign = "-";
			valueWithoutSign = formattedNumericValue.slice(1);
		}
		const space = spaceEnabledPref === "true" ? " " : "";
		const styledAmount = (symbolPositionPref || "before") === "after" ? `${valueWithoutSign}${space}${currencySymbol}` : `\u202A${currencySymbol}\u202C${space}${valueWithoutSign}`;
		return sign + styledAmount;
	}, [symbolPositionPref, spaceEnabledPref]);
	const formatDisplay = (0, import_react.useCallback)((value, type = "string") => {
		const isFinancialType = type === "financial" || type === "financial-with-sign" || type === "financial-no-decimals";
		let displayDecimalPlaces;
		if (isFinancialType) if (type === "financial-no-decimals" || hideFractionPref === "true") displayDecimalPlaces = 0;
		else displayDecimalPlaces = activeCurrency.decimalPlaces;
		const intlFormatter = getNumberFormat({
			format: numberFormatConfig.format,
			decimalPlaces: displayDecimalPlaces
		}).formatter;
		const { numericValue, formattedString } = format$3(value, type, intlFormatter, activeCurrency.decimalPlaces);
		let styledValue = formattedString;
		if (isFinancialType && activeCurrency && activeCurrency.code !== "") styledValue = applyCurrencyStyling(formattedString, activeCurrency.symbol);
		if (type === "financial-with-sign" && numericValue != null && numericValue >= 0) return "+" + styledValue;
		return styledValue;
	}, [
		activeCurrency,
		numberFormatConfig,
		applyCurrencyStyling,
		hideFractionPref
	]);
	const toAmount = (0, import_react.useCallback)((value) => integerToAmount(value, activeCurrency.decimalPlaces), [activeCurrency.decimalPlaces]);
	const fromAmount = (0, import_react.useCallback)((value) => amountToInteger(value, activeCurrency.decimalPlaces), [activeCurrency.decimalPlaces]);
	const forEdit = (0, import_react.useCallback)((value) => {
		const amount = toAmount(value);
		const decimalPlaces = hideFractionPref === "true" ? 0 : activeCurrency.decimalPlaces;
		return getNumberFormat({
			format: numberFormatConfig.format,
			decimalPlaces
		}).formatter.format(amount);
	}, [
		toAmount,
		hideFractionPref,
		activeCurrency.decimalPlaces,
		numberFormatConfig.format
	]);
	const fromEdit = (0, import_react.useCallback)((value, defaultValue = null) => {
		if (value == null) return defaultValue;
		const trimmed = value.trim();
		if (trimmed === "") return defaultValue;
		const normalized = trimmed.replace(/[\u200E\u200F\u202A-\u202E\u2066-\u2069]/g, "").replace(/\p{L}+/gu, "");
		let numericValue = evalArithmetic(normalized, null);
		if (numericValue === null || isNaN(numericValue)) numericValue = currencyToAmount(normalized);
		if (numericValue !== null && !isNaN(numericValue)) return fromAmount(numericValue);
		return defaultValue;
	}, [fromAmount]);
	return Object.assign(formatDisplay, {
		forEdit,
		fromEdit,
		currency: activeCurrency
	});
}
//#endregion
//#region src/hooks/useProperFocus.tsx
function getFocusedKey(el) {
	let node = el;
	for (let i = 0; i < 10 && node; i++) {
		const key = "dataset" in node ? node.dataset?.focusKey : void 0;
		if (key) return key;
		node = node.parentNode;
	}
	return null;
}
function focusElement(el, refocusContext) {
	if (refocusContext) {
		const key = getFocusedKey(el);
		el.focus({ preventScroll: key && key === refocusContext.keyRef.current });
		refocusContext.onKeyChange(key);
	} else el.focus();
	if (el instanceof HTMLInputElement) el.setSelectionRange(0, 1e4);
}
var AvoidRefocusScrollContext = (0, import_react.createContext)(null);
function AvoidRefocusScrollProvider(t0) {
	const $ = (0, import_compiler_runtime.c)(3);
	const { children } = t0;
	const keyRef = (0, import_react.useRef)(null);
	let t1;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = {
			keyRef,
			onKeyChange: (key) => {
				keyRef.current = key;
			}
		};
		$[0] = t1;
	} else t1 = $[0];
	const value = t1;
	let t2;
	if ($[1] !== children) {
		t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AvoidRefocusScrollContext.Provider, {
			value,
			children
		});
		$[1] = children;
		$[2] = t2;
	} else t2 = $[2];
	return t2;
}
function useProperFocus(ref, t0) {
	const $ = (0, import_compiler_runtime.c)(5);
	const shouldFocus = t0 === void 0 ? false : t0;
	const context = (0, import_react.useContext)(AvoidRefocusScrollContext);
	const prevShouldFocus = (0, import_react.useRef)(null);
	let t1;
	let t2;
	if ($[0] !== context || $[1] !== ref || $[2] !== shouldFocus) {
		t1 = () => {
			const prev = prevShouldFocus.current;
			const view = ref.current;
			if (view && shouldFocus && (prev === null || prev === false)) {
				const focusEl = view.matches("input,button,div[tabindex]") ? view : view.querySelector("input,button,div[tabindex]");
				if (shouldFocus && focusEl) focusElement(focusEl, context);
			}
			prevShouldFocus.current = shouldFocus;
		};
		t2 = [
			context,
			ref,
			shouldFocus
		];
		$[0] = context;
		$[1] = ref;
		$[2] = shouldFocus;
		$[3] = t1;
		$[4] = t2;
	} else {
		t1 = $[3];
		t2 = $[4];
	}
	(0, import_react.useLayoutEffect)(t1, t2);
}
//#endregion
//#region src/hooks/useSelected.tsx
function iterateRange(range, func) {
	const from = Math.min(range.start, range.end);
	const to = Math.max(range.start, range.end);
	for (let i = from; i <= to; i++) func(i);
}
function useSelected(name, items, initialSelectedIds, selectAllFilter) {
	const $ = (0, import_compiler_runtime.c)(18);
	let t0;
	if ($[0] !== items || $[1] !== selectAllFilter) {
		t0 = (state, action) => {
			switch (action.type) {
				case "select": {
					const { selectedRange } = state;
					const selectedItems_0 = new Set(state.selectedItems);
					const { id: id_0, isRangeSelect } = action;
					if (isRangeSelect && selectedRange) {
						const idx = items.findIndex((p) => p.id === id_0);
						const startIdx = items.findIndex((p_0) => p_0.id === selectedRange.start);
						const endIdx = items.findIndex((p_1) => p_1.id === selectedRange.end);
						let range;
						let deleteUntil;
						if (endIdx === -1) range = {
							start: startIdx,
							end: idx
						};
						else if (endIdx < startIdx) if (idx <= startIdx) {
							range = {
								start: startIdx,
								end: idx
							};
							if (idx > endIdx) deleteUntil = {
								start: idx - 1,
								end: endIdx
							};
						} else range = {
							start: endIdx,
							end: idx
						};
						else if (idx >= startIdx) {
							range = {
								start: startIdx,
								end: idx
							};
							if (idx < endIdx) deleteUntil = {
								start: idx + 1,
								end: endIdx
							};
						} else range = {
							start: endIdx,
							end: idx
						};
						iterateRange(range, (i) => selectedItems_0.add(items[i].id));
						if (deleteUntil) iterateRange(deleteUntil, (i_0) => selectedItems_0.delete(items[i_0].id));
						return {
							...state,
							selectedItems: selectedItems_0,
							selectedRange: {
								start: items[range.start].id,
								end: items[range.end].id
							}
						};
					} else {
						let range_0 = null;
						if (!selectedItems_0.delete(id_0)) {
							selectedItems_0.add(id_0);
							range_0 = {
								start: id_0,
								end: null
							};
						}
						return {
							...state,
							selectedItems: selectedItems_0,
							selectedRange: range_0
						};
					}
				}
				case "select-none": return {
					...state,
					selectedItems: /* @__PURE__ */ new Set()
				};
				case "select-all": {
					let selectedItems;
					if (action.ids && items && selectAllFilter) {
						const idsToInclude = new Set(items.filter(selectAllFilter).map(_temp$17));
						selectedItems = action.ids.filter((id) => idsToInclude.has(id));
					} else if (items && selectAllFilter) selectedItems = items.filter(selectAllFilter).map(_temp2$11);
					else selectedItems = action.ids || items.map(_temp3$5);
					return {
						...state,
						selectedItems: new Set(selectedItems),
						selectedRange: action.ids && action.ids.length === 1 ? {
							start: action.ids[0],
							end: null
						} : null
					};
				}
				default: throw new Error("Unexpected action: " + JSON.stringify(action));
			}
		};
		$[0] = items;
		$[1] = selectAllFilter;
		$[2] = t0;
	} else t0 = $[2];
	let t1;
	if ($[3] !== initialSelectedIds) {
		t1 = () => ({
			selectedItems: new Set(initialSelectedIds || []),
			selectedRange: initialSelectedIds && initialSelectedIds.length === 1 ? {
				start: initialSelectedIds[0],
				end: null
			} : null
		});
		$[3] = initialSelectedIds;
		$[4] = t1;
	} else t1 = $[4];
	const [state_0, dispatch] = (0, import_react.useReducer)(t0, null, t1);
	const prevItems = (0, import_react.useRef)(items);
	let t2;
	let t3;
	if ($[5] !== items || $[6] !== state_0.selectedItems) {
		t2 = () => {
			if (state_0.selectedItems.size > 0) {
				const ids = new Set(items.map(_temp4$4));
				if (!(prevItems.current.length === items.length && prevItems.current.every((item_3) => ids.has(item_3.id)))) {
					const selected = [...state_0.selectedItems];
					const filtered = selected.filter((id_1) => ids.has(id_1));
					if (selected.length !== filtered.length) dispatch({
						type: "select-all",
						ids: filtered
					});
				}
			}
			prevItems.current = items;
		};
		t3 = [items, state_0.selectedItems];
		$[5] = items;
		$[6] = state_0.selectedItems;
		$[7] = t2;
		$[8] = t3;
	} else {
		t2 = $[7];
		t3 = $[8];
	}
	(0, import_react.useEffect)(t2, t3);
	let t4;
	let t5;
	if ($[9] !== name || $[10] !== state_0.selectedItems) {
		t4 = () => {
			const prevState = getUndoState("selectedItems");
			setUndoState("selectedItems", {
				name,
				items: state_0.selectedItems
			});
			return () => setUndoState("selectedItems", prevState);
		};
		t5 = [name, state_0.selectedItems];
		$[9] = name;
		$[10] = state_0.selectedItems;
		$[11] = t4;
		$[12] = t5;
	} else {
		t4 = $[11];
		t5 = $[12];
	}
	(0, import_react.useEffect)(t4, t5);
	let t6;
	let t7;
	if ($[13] !== name) {
		t6 = () => {
			const onUndo = function onUndo(t8) {
				const { messages, undoTag } = t8;
				const tagged = getTaggedState(undoTag);
				const deletedIds = new Set(messages.filter(_temp5$3).map(_temp6$2));
				if (tagged?.selectedItems?.name === name) dispatch({
					type: "select-all",
					ids: [...tagged.selectedItems.items].filter((id_2) => !deletedIds.has(id_2))
				});
			};
			const lastUndoEvent = getUndoState("undoEvent");
			if (lastUndoEvent) onUndo(lastUndoEvent);
			return listen("undo-event", onUndo);
		};
		t7 = [name];
		$[13] = name;
		$[14] = t6;
		$[15] = t7;
	} else {
		t6 = $[14];
		t7 = $[15];
	}
	(0, import_react.useEffect)(t6, t7);
	let t8;
	if ($[16] !== state_0.selectedItems) {
		t8 = {
			items: state_0.selectedItems,
			dispatch
		};
		$[16] = state_0.selectedItems;
		$[17] = t8;
	} else t8 = $[17];
	return t8;
}
function _temp6$2(msg_0) {
	return msg_0.row;
}
function _temp5$3(msg) {
	return msg.column === "tombstone" && msg.value === 1;
}
function _temp4$4(item_2) {
	return item_2.id;
}
function _temp3$5(item_1) {
	return item_1.id;
}
function _temp2$11(item_0) {
	return item_0.id;
}
function _temp$17(item) {
	return item.id;
}
var SelectedDispatch = (0, import_react.createContext)(null);
var SelectedItems = (0, import_react.createContext)(null);
function useSelectedDispatch() {
	return (0, import_react.useContext)(SelectedDispatch);
}
function useSelectedItems() {
	return (0, import_react.useContext)(SelectedItems);
}
function SelectedProvider({ instance, fetchAllIds, children }) {
	const { items: instanceItems, dispatch: instanceDispatch } = instance;
	const latestItems = (0, import_react.useRef)(instanceItems);
	latestItems.current = instanceItems;
	const dispatch = (0, import_react.useCallback)(async (action) => {
		if (action.type === "select-all") if (latestItems.current && latestItems.current.size > 0) return instanceDispatch({
			type: "select-none",
			isRangeSelect: action.isRangeSelect
		});
		else {
			if (fetchAllIds) return instanceDispatch({
				type: "select-all",
				ids: await fetchAllIds(),
				isRangeSelect: action.isRangeSelect
			});
			return instanceDispatch({
				type: "select-all",
				isRangeSelect: action.isRangeSelect
			});
		}
		return instanceDispatch(action);
	}, [instanceDispatch, fetchAllIds]);
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectedItems.Provider, {
		value: instance.items,
		children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectedDispatch.Provider, {
			value: dispatch,
			children
		})
	});
}
function SelectedProviderWithItems(t0) {
	const $ = (0, import_compiler_runtime.c)(10);
	const { name, items, initialSelectedIds: t1, fetchAllIds, registerDispatch, selectAllFilter, children } = t0;
	let t2;
	if ($[0] !== t1) {
		t2 = t1 === void 0 ? [] : t1;
		$[0] = t1;
		$[1] = t2;
	} else t2 = $[1];
	const selected = useSelected(name, items, t2, selectAllFilter);
	let t3;
	let t4;
	if ($[2] !== registerDispatch || $[3] !== selected.dispatch) {
		t3 = () => {
			registerDispatch?.(selected.dispatch);
		};
		t4 = [registerDispatch, selected.dispatch];
		$[2] = registerDispatch;
		$[3] = selected.dispatch;
		$[4] = t3;
		$[5] = t4;
	} else {
		t3 = $[4];
		t4 = $[5];
	}
	(0, import_react.useEffect)(t3, t4);
	let t5;
	if ($[6] !== children || $[7] !== fetchAllIds || $[8] !== selected) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectedProvider, {
			instance: selected,
			fetchAllIds,
			children
		});
		$[6] = children;
		$[7] = fetchAllIds;
		$[8] = selected;
		$[9] = t5;
	} else t5 = $[9];
	return t5;
}
//#endregion
//#region src/hooks/useSheetName.tsx
init_build_shims();
function unresolveName(name) {
	const idx = name.indexOf("!");
	if (idx !== -1) return {
		sheet: name.slice(0, idx),
		name: name.slice(idx + 1)
	};
	return {
		sheet: null,
		name
	};
}
var SheetNameContext = (0, import_react.createContext)(void 0);
function SheetNameProvider(t0) {
	const $ = (0, import_compiler_runtime.c)(3);
	const { children, name } = t0;
	let t1;
	if ($[0] !== children || $[1] !== name) {
		t1 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetNameContext.Provider, {
			value: name,
			children
		});
		$[0] = children;
		$[1] = name;
		$[2] = t1;
	} else t1 = $[2];
	return t1;
}
function useSheetName(binding) {
	const $ = (0, import_compiler_runtime.c)(8);
	if (!binding) throw new Error("Sheet binding is required");
	const isStringBinding = typeof binding === "string";
	let bindingName = isStringBinding ? binding : binding.name;
	if (global.IS_TESTING && !isStringBinding && !bindingName) {
		let t0;
		if ($[0] !== binding.value) {
			t0 = binding.value.toString();
			$[0] = binding.value;
			$[1] = t0;
		} else t0 = $[1];
		bindingName = t0;
	}
	if (bindingName == null) throw new Error("Binding name is now required");
	let sheetName = (0, import_react.useContext)(SheetNameContext) || "__global";
	let t0;
	if ($[2] !== bindingName) {
		t0 = unresolveName(bindingName);
		$[2] = bindingName;
		$[3] = t0;
	} else t0 = $[3];
	const unresolved = t0;
	if (unresolved.sheet) {
		sheetName = unresolved.sheet;
		bindingName = unresolved.name;
	}
	const t1 = `${sheetName}!${bindingName}`;
	let t2;
	if ($[4] !== bindingName || $[5] !== sheetName || $[6] !== t1) {
		t2 = {
			sheetName,
			bindingName,
			fullSheetName: t1
		};
		$[4] = bindingName;
		$[5] = sheetName;
		$[6] = t1;
		$[7] = t2;
	} else t2 = $[7];
	return t2;
}
//#endregion
//#region src/hooks/useSheetValue.ts
function useSheetValue(binding, onChange) {
	const { sheetName, fullSheetName } = useSheetName(binding);
	const memoizedBinding = useMemoizedBinding(() => typeof binding === "string" ? {
		name: binding,
		value: void 0,
		query: void 0
	} : binding, binding);
	const spreadsheet = useSpreadsheet();
	const [result, setResult] = (0, import_react.useState)({
		name: fullSheetName,
		value: memoizedBinding.value ? memoizedBinding.value : null
	});
	const latestOnChange = (0, import_react.useRef)(onChange);
	latestOnChange.current = onChange;
	const latestValue = (0, import_react.useRef)(result.value);
	latestValue.current = result.value;
	(0, import_react.useLayoutEffect)(() => {
		let isMounted = true;
		const unbind = spreadsheet.bind(sheetName, memoizedBinding, (newResult) => {
			if (!isMounted) return;
			const newCastedResult = {
				name: newResult.name,
				value: newResult.value
			};
			if (latestOnChange.current) latestOnChange.current(newCastedResult);
			if (newResult.value !== latestValue.current) setResult(newCastedResult);
		});
		return () => {
			isMounted = false;
			unbind();
		};
	}, [
		spreadsheet,
		sheetName,
		memoizedBinding
	]);
	return result.value;
}
function useMemoizedBinding(memoBinding, key) {
	const ref = (0, import_react.useRef)(null);
	const bindingName = typeof key === "string" ? key : key.name;
	const bindingValue = typeof key === "string" ? void 0 : key.value;
	const serializedBindingQuery = typeof key === "string" ? void 0 : key.query?.serializeAsString();
	if (!ref.current || bindingName !== ref.current.key.name || bindingValue !== ref.current.key.value || serializedBindingQuery !== ref.current.key.serializedQuery) ref.current = {
		key: {
			name: bindingName,
			value: bindingValue,
			serializedQuery: serializedBindingQuery
		},
		value: memoBinding()
	};
	return ref.current.value;
}
//#endregion
//#region src/components/FixedSizeList.tsx
var IS_SCROLLING_DEBOUNCE_INTERVAL = 150;
var defaultItemKey = (index) => index;
var FixedSizeList = class extends import_react.PureComponent {
	_outerRef;
	_resetIsScrollingTimeoutId = null;
	lastPositions;
	needsAnimationRerender;
	animationEnabled;
	requestScrollUpdateHandled;
	anchored = null;
	rerenderTimeout;
	static defaultProps = {
		direction: "ltr",
		renderRow: void 0,
		layout: "vertical",
		overscanCount: 2,
		useIsScrolling: false,
		headerHeight: 0
	};
	constructor(props) {
		super(props);
		this.lastPositions = (0, import_react.createRef)();
		this.lastPositions.current = /* @__PURE__ */ new Map();
		this.needsAnimationRerender = (0, import_react.createRef)();
		this.needsAnimationRerender.current = false;
		this.animationEnabled = false;
		this.state = {
			isScrolling: false,
			scrollDirection: "forward",
			scrollOffset: typeof this.props.initialScrollOffset === "number" ? this.props.initialScrollOffset : 0,
			scrollUpdateWasRequested: false
		};
	}
	scrollTo(scrollOffset) {
		scrollOffset = Math.max(0, scrollOffset);
		this.setState((prevState) => {
			if (prevState.scrollOffset === scrollOffset) return null;
			this.requestScrollUpdateHandled = false;
			return {
				scrollDirection: prevState.scrollOffset < scrollOffset ? "forward" : "backward",
				scrollOffset,
				scrollUpdateWasRequested: true
			};
		}, this._resetIsScrollingDebounced);
	}
	scrollToItem(index, align = "auto") {
		const { itemCount } = this.props;
		const { scrollOffset } = this.state;
		index = Math.max(0, Math.min(index, itemCount - 1));
		this.scrollTo(this.getOffsetForIndexAndAlignment(index, align, scrollOffset));
	}
	componentDidMount() {
		const { initialScrollOffset } = this.props;
		if (typeof initialScrollOffset === "number" && this._outerRef != null) {
			const outerRef = this._outerRef;
			outerRef.scrollTop = initialScrollOffset;
		}
		this._callPropsCallbacks();
	}
	getAnchoredScrollPos() {
		if (this.anchored && this.props.indexForKey && this._outerRef != null) {
			const index = this.props.indexForKey(this.anchored.key);
			return this.getOffsetForIndexAndAlignment(index, "start") + this.anchored.offset;
		}
		return null;
	}
	componentDidUpdate() {
		const { scrollOffset, scrollUpdateWasRequested } = this.state;
		const anchoredPos = this.getAnchoredScrollPos();
		if (anchoredPos != null) {
			const outerRef = this._outerRef;
			outerRef.scrollTop = anchoredPos;
		} else if (scrollUpdateWasRequested && !this.requestScrollUpdateHandled && this._outerRef != null) {
			this.requestScrollUpdateHandled = true;
			const outerRef = this._outerRef;
			outerRef.scrollTop = scrollOffset;
		}
		if (this.needsAnimationRerender.current) {
			this.needsAnimationRerender.current = false;
			this.rerenderTimeout = setTimeout(() => {
				this.forceUpdate();
			}, 10);
		}
		this._callPropsCallbacks();
	}
	componentWillUnmount() {
		if (this._resetIsScrollingTimeoutId !== null) clearTimeout(this._resetIsScrollingTimeoutId);
	}
	render() {
		const { className, height, header, innerRef, itemCount, renderRow, itemKey = defaultItemKey, useIsScrolling, width } = this.props;
		const { isScrolling } = this.state;
		const [startIndex, stopIndex] = this._getRangeToRender();
		const positions = /* @__PURE__ */ new Map();
		const items = [];
		if (itemCount > 0) for (let index = startIndex; index <= stopIndex; index++) {
			const key = itemKey(index);
			let style = this._getItemStyle(index);
			const lastPosition = this.lastPositions.current.get(key);
			let animating = false;
			positions.set(key, style.top);
			if (this.animationEnabled && lastPosition != null && lastPosition !== style.top) {
				style = {
					...style,
					top: lastPosition
				};
				this.needsAnimationRerender.current = true;
				animating = true;
			}
			items.push(renderRow({
				index,
				key,
				style,
				isScrolling: useIsScrolling ? isScrolling : void 0,
				isAnimating: animating
			}));
		}
		this.lastPositions.current = positions;
		const estimatedTotalSize = this.getEstimatedTotalSize();
		return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
			className,
			onScroll: this._onScrollVertical,
			ref: this._outerRefSetter,
			style: {
				height,
				width,
				overflow: "hidden auto"
			},
			children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, { children: header }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
				ref: innerRef,
				style: {
					position: "relative",
					height: estimatedTotalSize,
					width: "100%",
					pointerEvents: isScrolling ? "none" : void 0
				},
				children: items
			})]
		});
	}
	setRowAnimation = (flag) => {
		this.animationEnabled = flag;
		const outerRef = this._outerRef;
		if (outerRef) if (this.animationEnabled) outerRef.classList.add("animated");
		else outerRef.classList.remove("animated");
	};
	anchor() {
		const itemKey = this.props.itemKey || defaultItemKey;
		const outerRef = this._outerRef;
		const scrollOffset = outerRef ? outerRef.scrollTop : 0;
		const index = this.getStartIndexForOffset(scrollOffset);
		this.anchored = {
			key: itemKey(index),
			offset: scrollOffset - this.getItemOffset(index)
		};
	}
	unanchor() {
		this.anchored = null;
	}
	isAnchored() {
		return this.anchored != null;
	}
	getItemOffset = (index) => index * this.props.itemSize;
	getItemSize = () => this.props.itemSize;
	getEstimatedTotalSize = () => this.props.itemSize * this.props.itemCount;
	getOffsetForIndexAndAlignment = (index, align, scrollOffset) => {
		const size = this.props.height;
		const lastItemOffset = Math.max(0, this.props.itemCount * this.props.itemSize - size);
		const maxOffset = Math.min(lastItemOffset, index * this.props.itemSize);
		const minOffset = Math.max(0, index * this.props.itemSize - size + this.props.itemSize);
		if (align === "smart") if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) align = "auto";
		else align = "center";
		switch (align) {
			case "start": return maxOffset;
			case "end": return minOffset;
			case "center": {
				const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);
				if (middleOffset < Math.ceil(size / 2)) return 0;
				else if (middleOffset > lastItemOffset + Math.floor(size / 2)) return lastItemOffset;
				else return middleOffset;
			}
			default: if (scrollOffset >= minOffset && scrollOffset <= maxOffset) return scrollOffset;
			else if (scrollOffset < minOffset) return minOffset;
			else return maxOffset;
		}
	};
	getStartIndexForOffset = (offset) => Math.max(0, Math.min(this.props.itemCount - 1, Math.floor(offset / this.props.itemSize)));
	getStopIndexForStartIndex = (startIndex, scrollOffset) => {
		const offset = startIndex * this.props.itemSize;
		const size = this.props.height;
		const numVisibleItems = Math.ceil((size + scrollOffset - offset) / this.props.itemSize);
		return Math.max(0, Math.min(this.props.itemCount - 1, startIndex + numVisibleItems - 1));
	};
	_callOnItemsRendered = memoizeOne((overscanStartIndex, overscanStopIndex, visibleStartIndex, visibleStopIndex) => this.props.onItemsRendered({
		overscanStartIndex,
		overscanStopIndex,
		visibleStartIndex,
		visibleStopIndex
	}));
	_callOnScroll = memoizeOne((scrollDirection, scrollOffset, scrollUpdateWasRequested) => this.props.onScroll({
		scrollDirection,
		scrollOffset,
		scrollUpdateWasRequested
	}));
	_callPropsCallbacks() {
		if (typeof this.props.onItemsRendered === "function") {
			const { itemCount } = this.props;
			if (itemCount > 0) {
				const [overscanStartIndex, overscanStopIndex, visibleStartIndex, visibleStopIndex] = this._getRangeToRender();
				this._callOnItemsRendered(overscanStartIndex, overscanStopIndex, visibleStartIndex, visibleStopIndex);
			}
		}
		if (typeof this.props.onScroll === "function") {
			const { scrollDirection, scrollOffset, scrollUpdateWasRequested } = this.state;
			this._callOnScroll(scrollDirection, scrollOffset, scrollUpdateWasRequested);
		}
	}
	_getItemStyle = (index) => {
		const { direction, itemSize, layout } = this.props;
		const itemStyleCache = this._getItemStyleCache(itemSize, layout, direction);
		let style;
		if (itemStyleCache.hasOwnProperty(index)) style = itemStyleCache[index];
		else itemStyleCache[index] = style = {
			position: "absolute",
			left: 0,
			top: this.getItemOffset(index),
			height: this.getItemSize(),
			width: "100%"
		};
		return style;
	};
	_getItemStyleCache = memoizeOne((_, __, ___) => ({}));
	_getRangeToRender() {
		const { itemCount, overscanCount } = this.props;
		const { isScrolling, scrollDirection, scrollOffset: originalScrollOffset } = this.state;
		const anchoredPos = this.getAnchoredScrollPos();
		let scrollOffset = originalScrollOffset;
		if (anchoredPos != null) scrollOffset = anchoredPos;
		if (itemCount === 0) return [
			0,
			0,
			0,
			0
		];
		const startIndex = this.getStartIndexForOffset(scrollOffset);
		const stopIndex = this.getStopIndexForStartIndex(startIndex, scrollOffset);
		const overscanBackward = !isScrolling || scrollDirection === "backward" ? Math.max(1, overscanCount) : 1;
		const overscanForward = !isScrolling || scrollDirection === "forward" ? Math.max(1, overscanCount) : 1;
		return [
			Math.max(0, startIndex - overscanBackward),
			Math.max(0, Math.min(itemCount - 1, stopIndex + overscanForward)),
			startIndex,
			stopIndex
		];
	}
	_onScrollVertical = (event) => {
		const { scrollTop } = event.currentTarget;
		this.setState((prevState) => {
			if (prevState.scrollOffset === scrollTop) return null;
			const scrollOffset = scrollTop;
			return {
				isScrolling: true,
				scrollDirection: prevState.scrollOffset < scrollOffset ? "forward" : "backward",
				scrollOffset,
				scrollUpdateWasRequested: false
			};
		}, this._resetIsScrollingDebounced);
	};
	_outerRefSetter = (ref) => {
		const { outerRef } = this.props;
		this._outerRef = ref;
		if (outerRef != null && typeof outerRef === "object" && outerRef.hasOwnProperty("current")) outerRef.current = ref;
	};
	_resetIsScrollingDebounced = () => {
		if (this._resetIsScrollingTimeoutId !== null) clearTimeout(this._resetIsScrollingTimeoutId);
		this._resetIsScrollingTimeoutId = setTimeout(this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL);
	};
	_resetIsScrolling = () => {
		this._resetIsScrollingTimeoutId = null;
		this.setState({ isScrolling: false }, () => {
			this._getItemStyleCache(-1, null);
		});
	};
};
//#endregion
//#region src/hooks/usePrivacyMode.ts
function usePrivacyMode() {
	const [isPrivacyEnabled] = useSyncedPref("isPrivacyEnabled");
	return String(isPrivacyEnabled) === "true";
}
//#endregion
//#region src/components/PrivacyFilter.tsx
function ConditionalPrivacyFilter(t0) {
	const $ = (0, import_compiler_runtime.c)(4);
	const { children, privacyFilter, defaultPrivacyFilterProps } = t0;
	const renderPrivacyFilter = _temp$16;
	let t1;
	if ($[0] !== children || $[1] !== defaultPrivacyFilterProps || $[2] !== privacyFilter) {
		t1 = privacyFilter ? typeof privacyFilter === "boolean" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PrivacyFilter, {
			...defaultPrivacyFilterProps,
			children
		}) : renderPrivacyFilter(children, mergeConditionalPrivacyFilterProps(defaultPrivacyFilterProps, privacyFilter)) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: import_react.Children.toArray(children) });
		$[0] = children;
		$[1] = defaultPrivacyFilterProps;
		$[2] = privacyFilter;
		$[3] = t1;
	} else t1 = $[3];
	return t1;
}
function _temp$16(children_0, mergedProps) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PrivacyFilter, {
		...mergedProps,
		children: children_0
	});
}
function PrivacyFilter(t0) {
	const $ = (0, import_compiler_runtime.c)(12);
	let activationFilters;
	let children;
	let props;
	if ($[0] !== t0) {
		({activationFilters, children, ...props} = t0);
		$[0] = t0;
		$[1] = activationFilters;
		$[2] = children;
		$[3] = props;
	} else {
		activationFilters = $[1];
		children = $[2];
		props = $[3];
	}
	const privacyMode = usePrivacyMode();
	const { isNarrowWidth } = useResponsive();
	let t1;
	if ($[4] !== activationFilters || $[5] !== isNarrowWidth || $[6] !== privacyMode) {
		t1 = privacyMode && !isNarrowWidth && (!activationFilters || activationFilters.every(_temp2$10));
		$[4] = activationFilters;
		$[5] = isNarrowWidth;
		$[6] = privacyMode;
		$[7] = t1;
	} else t1 = $[7];
	const activate = t1;
	let t2;
	if ($[8] !== activate || $[9] !== children || $[10] !== props) {
		t2 = !activate ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: import_react.Children.toArray(children) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PrivacyOverlay, {
			...props,
			children
		});
		$[8] = activate;
		$[9] = children;
		$[10] = props;
		$[11] = t2;
	} else t2 = $[11];
	return t2;
}
function _temp2$10(value) {
	return typeof value === "boolean" ? value : value();
}
function RedactedContent(t0) {
	const $ = (0, import_compiler_runtime.c)(5);
	const { children } = t0;
	const containerRef = (0, import_react.useRef)(null);
	let t1;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = () => {
			if (containerRef.current) {
				const walker = document.createTreeWalker(containerRef.current, NodeFilter.SHOW_TEXT, null);
				let node;
				while (node = walker.nextNode()) if (node.textContent) node.textContent = node.textContent.replace(/[^a-zA-Z0-9]/g, "*");
			}
		};
		$[0] = t1;
	} else t1 = $[0];
	let t2;
	if ($[1] !== children) {
		t2 = [children];
		$[1] = children;
		$[2] = t2;
	} else t2 = $[2];
	(0, import_react.useLayoutEffect)(t1, t2);
	let t3;
	if ($[3] !== children) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
			ref: containerRef,
			children
		});
		$[3] = children;
		$[4] = t3;
	} else t3 = $[4];
	return t3;
}
function PrivacyOverlay(t0) {
	const $ = (0, import_compiler_runtime.c)(17);
	let T0;
	let children;
	let restProps;
	let t1;
	if ($[0] !== t0) {
		const { children: t2, ...props } = t0;
		children = t2;
		const { style, ...t3 } = props;
		restProps = t3;
		T0 = View;
		t1 = css([{
			display: "inline-flex",
			flexGrow: 1,
			position: "relative",
			" > div:first-child": { opacity: 0 },
			" > div:nth-child(2)": { display: "flex" },
			"&:hover": {
				" > div:first-child": { opacity: 1 },
				" > div:nth-child(2)": { display: "none" }
			}
		}], style);
		$[0] = t0;
		$[1] = T0;
		$[2] = children;
		$[3] = restProps;
		$[4] = t1;
	} else {
		T0 = $[1];
		children = $[2];
		restProps = $[3];
		t1 = $[4];
	}
	let t2;
	if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = css([{
			display: "flex",
			flexGrow: 1
		}]);
		$[5] = t2;
	} else t2 = $[5];
	let t3;
	if ($[6] !== children) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
			className: t2,
			children
		});
		$[6] = children;
		$[7] = t3;
	} else t3 = $[7];
	let t4;
	if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
		t4 = css({
			flexDirection: "column",
			fontFamily: "Redacted Script",
			height: "100%",
			inset: 0,
			justifyContent: "center",
			pointerEvents: "none",
			position: "absolute",
			width: "100%"
		});
		$[8] = t4;
	} else t4 = $[8];
	let t5;
	if ($[9] !== children) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
			"aria-hidden": "true",
			className: t4,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RedactedContent, { children })
		});
		$[9] = children;
		$[10] = t5;
	} else t5 = $[10];
	let t6;
	if ($[11] !== T0 || $[12] !== restProps || $[13] !== t1 || $[14] !== t3 || $[15] !== t5) {
		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(T0, {
			className: t1,
			...restProps,
			children: [t3, t5]
		});
		$[11] = T0;
		$[12] = restProps;
		$[13] = t1;
		$[14] = t3;
		$[15] = t5;
		$[16] = t6;
	} else t6 = $[16];
	return t6;
}
function mergeConditionalPrivacyFilterProps(defaultPrivacyFilterProps = {}, privacyFilter) {
	if (privacyFilter == null || privacyFilter === false) return privacyFilter;
	if (privacyFilter === true) return defaultPrivacyFilterProps;
	return merge$2(defaultPrivacyFilterProps, privacyFilter);
}
function merge$2(initialValue, ...objects) {
	return objects.reduce((prev, current) => {
		Object.keys(current).forEach((key) => {
			const pValue = prev[key];
			const cValue = current[key];
			if (Array.isArray(pValue) && Array.isArray(cValue)) prev[key] = pValue.concat(...cValue);
			else if (isObject$2(pValue) && isObject$2(cValue)) prev[key] = merge$2(pValue, cValue);
			else prev[key] = cValue;
		});
		return prev;
	}, initialValue);
}
function isObject$2(obj) {
	return obj && typeof obj === "object";
}
//#endregion
//#region src/components/table.tsx
init_build_shims();
function fireBlur(onBlur, e) {
	if (document.hasFocus()) onBlur?.(e);
	else e.stopPropagation();
}
var Field = (0, import_react.forwardRef)(function Field(t0, ref) {
	const $ = (0, import_compiler_runtime.c)(27);
	let children;
	let contentStyle;
	let name;
	let props;
	let style;
	let t1;
	let width;
	if ($[0] !== t0) {
		({width, name, truncate: t1, children, style, contentStyle, ...props} = t0);
		$[0] = t0;
		$[1] = children;
		$[2] = contentStyle;
		$[3] = name;
		$[4] = props;
		$[5] = style;
		$[6] = t1;
		$[7] = width;
	} else {
		children = $[1];
		contentStyle = $[2];
		name = $[3];
		props = $[4];
		style = $[5];
		t1 = $[6];
		width = $[7];
	}
	const truncate = t1 === void 0 ? true : t1;
	let t2;
	if ($[8] !== width) {
		t2 = width === "flex" ? {
			flex: 1,
			flexBasis: 0
		} : { width };
		$[8] = width;
		$[9] = t2;
	} else t2 = $[9];
	let t3;
	if ($[10] !== style || $[11] !== t2) {
		t3 = {
			...t2,
			borderTopWidth: 1,
			borderBottomWidth: 1,
			borderColor: theme.tableBorder,
			...styles.smallText,
			...style
		};
		$[10] = style;
		$[11] = t2;
		$[12] = t3;
	} else t3 = $[12];
	let t4;
	if ($[13] !== contentStyle) {
		t4 = {
			flex: 1,
			padding: "0 5px",
			justifyContent: "center",
			...contentStyle
		};
		$[13] = contentStyle;
		$[14] = t4;
	} else t4 = $[14];
	let t5;
	if ($[15] !== children || $[16] !== truncate) {
		t5 = truncate ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
			style: {
				whiteSpace: "nowrap",
				overflow: "hidden",
				textOverflow: "ellipsis"
			},
			children
		}) : children;
		$[15] = children;
		$[16] = truncate;
		$[17] = t5;
	} else t5 = $[17];
	let t6;
	if ($[18] !== t4 || $[19] !== t5) {
		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t4,
			children: t5
		});
		$[18] = t4;
		$[19] = t5;
		$[20] = t6;
	} else t6 = $[20];
	let t7;
	if ($[21] !== name || $[22] !== props || $[23] !== ref || $[24] !== t3 || $[25] !== t6) {
		t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			innerRef: ref,
			...props,
			style: t3,
			"data-testid": name,
			children: t6
		});
		$[21] = name;
		$[22] = props;
		$[23] = ref;
		$[24] = t3;
		$[25] = t6;
		$[26] = t7;
	} else t7 = $[26];
	return t7;
});
function UnexposedCellContent(t0) {
	const $ = (0, import_compiler_runtime.c)(14);
	let formatter;
	let props;
	let style;
	let value;
	if ($[0] !== t0) {
		({value, formatter, style, ...props} = t0);
		$[0] = t0;
		$[1] = formatter;
		$[2] = props;
		$[3] = style;
		$[4] = value;
	} else {
		formatter = $[1];
		props = $[2];
		style = $[3];
		value = $[4];
	}
	let t1;
	if ($[5] !== props || $[6] !== style) {
		t1 = {
			flexGrow: 1,
			whiteSpace: "nowrap",
			overflow: "hidden",
			textOverflow: "ellipsis",
			...style,
			...props
		};
		$[5] = props;
		$[6] = style;
		$[7] = t1;
	} else t1 = $[7];
	let t2;
	if ($[8] !== formatter || $[9] !== value) {
		t2 = formatter ? formatter(value) : value;
		$[8] = formatter;
		$[9] = value;
		$[10] = t2;
	} else t2 = $[10];
	let t3;
	if ($[11] !== t1 || $[12] !== t2) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
			style: t1,
			children: t2
		});
		$[11] = t1;
		$[12] = t2;
		$[13] = t3;
	} else t3 = $[13];
	return t3;
}
function Cell(t0) {
	const $ = (0, import_compiler_runtime.c)(48);
	let alignItems;
	let children;
	let exposed;
	let focused;
	let formatter;
	let name;
	let onExpose;
	let plain;
	let privacyFilter;
	let style;
	let textAlign;
	let unexposedContent;
	let value;
	let valueStyle;
	let viewProps;
	let width;
	if ($[0] !== t0) {
		({width, name, exposed, focused, value, formatter, textAlign, alignItems, onExpose, children, plain, style, valueStyle, unexposedContent, privacyFilter, ...viewProps} = t0);
		$[0] = t0;
		$[1] = alignItems;
		$[2] = children;
		$[3] = exposed;
		$[4] = focused;
		$[5] = formatter;
		$[6] = name;
		$[7] = onExpose;
		$[8] = plain;
		$[9] = privacyFilter;
		$[10] = style;
		$[11] = textAlign;
		$[12] = unexposedContent;
		$[13] = value;
		$[14] = valueStyle;
		$[15] = viewProps;
		$[16] = width;
	} else {
		alignItems = $[1];
		children = $[2];
		exposed = $[3];
		focused = $[4];
		formatter = $[5];
		name = $[6];
		onExpose = $[7];
		plain = $[8];
		privacyFilter = $[9];
		style = $[10];
		textAlign = $[11];
		unexposedContent = $[12];
		value = $[13];
		valueStyle = $[14];
		viewProps = $[15];
		width = $[16];
	}
	const mouseCoords = (0, import_react.useRef)(null);
	const viewRef = (0, import_react.useRef)(null);
	useProperFocus(viewRef, focused !== void 0 ? focused : exposed);
	let t1;
	if ($[17] !== width) {
		t1 = width === "flex" ? {
			flex: 1,
			flexBasis: 0
		} : { width };
		$[17] = width;
		$[18] = t1;
	} else t1 = $[18];
	const widthStyle = t1;
	const t2 = textAlign || "left";
	let t3;
	if ($[19] !== alignItems || $[20] !== t2) {
		t3 = {
			position: "relative",
			textAlign: t2,
			justifyContent: "center",
			borderTopWidth: 1,
			borderBottomWidth: 1,
			borderColor: theme.tableBorder,
			alignItems
		};
		$[19] = alignItems;
		$[20] = t2;
		$[21] = t3;
	} else t3 = $[21];
	const cellStyle = t3;
	const t4 = !focused;
	const t5 = !exposed;
	let t6;
	if ($[22] !== privacyFilter || $[23] !== t4 || $[24] !== t5) {
		t6 = mergeConditionalPrivacyFilterProps({ activationFilters: [t4, t5] }, privacyFilter);
		$[22] = privacyFilter;
		$[23] = t4;
		$[24] = t5;
		$[25] = t6;
	} else t6 = $[25];
	let t7;
	if ($[26] !== children || $[27] !== exposed || $[28] !== formatter || $[29] !== name || $[30] !== onExpose || $[31] !== plain || $[32] !== unexposedContent || $[33] !== value || $[34] !== valueStyle) {
		t7 = plain ? children : exposed ? children() : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: {
				flexDirection: "row",
				flex: 1,
				padding: "0 5px",
				alignItems: "center",
				...styles.smallText,
				...valueStyle
			},
			onMouseDown: (e) => mouseCoords.current = [e.clientX, e.clientY],
			onClick: global.IS_TESTING ? () => onExpose?.(name) : (e_0) => {
				if (mouseCoords.current && Math.abs(e_0.clientX - mouseCoords.current[0]) < 5 && Math.abs(e_0.clientY - mouseCoords.current[1]) < 5) onExpose?.(name);
			},
			children: unexposedContent ? unexposedContent({
				value,
				formatter
			}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UnexposedCellContent, {
				value,
				formatter
			})
		});
		$[26] = children;
		$[27] = exposed;
		$[28] = formatter;
		$[29] = name;
		$[30] = onExpose;
		$[31] = plain;
		$[32] = unexposedContent;
		$[33] = value;
		$[34] = valueStyle;
		$[35] = t7;
	} else t7 = $[35];
	let t8;
	if ($[36] !== t6 || $[37] !== t7) {
		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ConditionalPrivacyFilter, {
			privacyFilter: t6,
			children: t7
		});
		$[36] = t6;
		$[37] = t7;
		$[38] = t8;
	} else t8 = $[38];
	const conditionalPrivacyFilter = t8;
	let t9;
	if ($[39] !== cellStyle || $[40] !== style || $[41] !== widthStyle) {
		t9 = {
			...widthStyle,
			...cellStyle,
			...style
		};
		$[39] = cellStyle;
		$[40] = style;
		$[41] = widthStyle;
		$[42] = t9;
	} else t9 = $[42];
	let t10;
	if ($[43] !== conditionalPrivacyFilter || $[44] !== name || $[45] !== t9 || $[46] !== viewProps) {
		t10 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			innerRef: viewRef,
			style: t9,
			...viewProps,
			"data-testid": name,
			children: conditionalPrivacyFilter
		});
		$[43] = conditionalPrivacyFilter;
		$[44] = name;
		$[45] = t9;
		$[46] = viewProps;
		$[47] = t10;
	} else t10 = $[47];
	return t10;
}
var Row = (0, import_react.forwardRef)(function Row(t0, ref) {
	const $ = (0, import_compiler_runtime.c)(25);
	let children;
	let collapsed;
	let height;
	let nativeProps;
	let style;
	let t1;
	if ($[0] !== t0) {
		({inset: t1, collapsed, children, height, style, ...nativeProps} = t0);
		$[0] = t0;
		$[1] = children;
		$[2] = collapsed;
		$[3] = height;
		$[4] = nativeProps;
		$[5] = style;
		$[6] = t1;
	} else {
		children = $[1];
		collapsed = $[2];
		height = $[3];
		nativeProps = $[4];
		style = $[5];
		t1 = $[6];
	}
	const inset = t1 === void 0 ? 0 : t1;
	const t2 = height || 32;
	const t3 = "0 0 " + (height || 32) + "px";
	let t4;
	if ($[7] !== collapsed) {
		t4 = collapsed && { marginTop: -1 };
		$[7] = collapsed;
		$[8] = t4;
	} else t4 = $[8];
	let t5;
	if ($[9] !== style || $[10] !== t2 || $[11] !== t3 || $[12] !== t4) {
		t5 = {
			flexDirection: "row",
			height: t2,
			flex: t3,
			userSelect: "text",
			...t4,
			...style
		};
		$[9] = style;
		$[10] = t2;
		$[11] = t3;
		$[12] = t4;
		$[13] = t5;
	} else t5 = $[13];
	let t6;
	if ($[14] !== inset) {
		t6 = inset !== 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Field, { width: inset });
		$[14] = inset;
		$[15] = t6;
	} else t6 = $[15];
	let t7;
	if ($[16] !== inset) {
		t7 = inset !== 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Field, { width: inset });
		$[16] = inset;
		$[17] = t7;
	} else t7 = $[17];
	let t8;
	if ($[18] !== children || $[19] !== nativeProps || $[20] !== ref || $[21] !== t5 || $[22] !== t6 || $[23] !== t7) {
		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			ref,
			style: t5,
			"data-testid": "row",
			...nativeProps,
			children: [
				t6,
				children,
				t7
			]
		});
		$[18] = children;
		$[19] = nativeProps;
		$[20] = ref;
		$[21] = t5;
		$[22] = t6;
		$[23] = t7;
		$[24] = t8;
	} else t8 = $[24];
	return t8;
});
var inputCellStyle = {
	padding: "5px 3px",
	margin: "0 1px"
};
var readonlyInputStyle = {
	backgroundColor: "transparent",
	"::selection": { backgroundColor: theme.formInputTextReadOnlySelection }
};
function InputValue(t0) {
	const $ = (0, import_compiler_runtime.c)(28);
	let defaultValue;
	let onBlur;
	let onUpdate;
	let props;
	if ($[0] !== t0) {
		({value: defaultValue, onUpdate, onBlur, ...props} = t0);
		$[0] = t0;
		$[1] = defaultValue;
		$[2] = onBlur;
		$[3] = onUpdate;
		$[4] = props;
	} else {
		defaultValue = $[1];
		onBlur = $[2];
		onUpdate = $[3];
		props = $[4];
	}
	const [value, setValue] = (0, import_react.useState)(defaultValue);
	const [prevDefaultValue, setPrevDefaultValue] = (0, import_react.useState)(defaultValue);
	if (prevDefaultValue !== defaultValue) {
		setValue(defaultValue);
		setPrevDefaultValue(defaultValue);
	}
	let t1;
	if ($[5] !== onBlur) {
		t1 = function onBlur_(e) {
			if (onBlur) fireBlur(onBlur, e);
		};
		$[5] = onBlur;
		$[6] = t1;
	} else t1 = $[6];
	const onBlur_ = t1;
	let t2;
	if ($[7] !== onUpdate || $[8] !== value) {
		t2 = function onKeyDown(e_0) {
			if (e_0.key !== "Enter" && e_0.key !== "Tab") e_0.stopPropagation();
			if (shouldSaveFromKey(e_0)) onUpdate?.(value);
		};
		$[7] = onUpdate;
		$[8] = value;
		$[9] = t2;
	} else t2 = $[9];
	const onKeyDown = t2;
	let t3;
	if ($[10] !== defaultValue || $[11] !== value) {
		t3 = function onEscape() {
			if (value !== defaultValue) setValue(defaultValue);
		};
		$[10] = defaultValue;
		$[11] = value;
		$[12] = t3;
	} else t3 = $[12];
	const onEscape = t3;
	let t4;
	if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
		const ops = [
			"+",
			"-",
			"*",
			"/",
			"^"
		];
		t4 = function valueIsASingleOperator(text) {
			return text?.length === 1 && ops.includes(text.charAt(0));
		};
		$[13] = t4;
	} else t4 = $[13];
	const valueIsASingleOperator = t4;
	let t5;
	if ($[14] !== defaultValue) {
		t5 = function setValue_(text_0) {
			if (valueIsASingleOperator(text_0)) setValue(defaultValue + text_0);
			else setValue(text_0);
		};
		$[14] = defaultValue;
		$[15] = t5;
	} else t5 = $[15];
	const setValue_ = t5;
	const t6 = props.readOnly ? readonlyInputStyle : null;
	let t7;
	if ($[16] !== props.style || $[17] !== t6) {
		t7 = {
			...inputCellStyle,
			...t6,
			...props.style
		};
		$[16] = props.style;
		$[17] = t6;
		$[18] = t7;
	} else t7 = $[18];
	let t8;
	if ($[19] !== onBlur_ || $[20] !== onEscape || $[21] !== onKeyDown || $[22] !== onUpdate || $[23] !== props || $[24] !== setValue_ || $[25] !== t7 || $[26] !== value) {
		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
			...props,
			value,
			onChangeValue: setValue_,
			onBlur: onBlur_,
			onUpdate,
			onKeyDown,
			onEscape,
			style: t7
		});
		$[19] = onBlur_;
		$[20] = onEscape;
		$[21] = onKeyDown;
		$[22] = onUpdate;
		$[23] = props;
		$[24] = setValue_;
		$[25] = t7;
		$[26] = value;
		$[27] = t8;
	} else t8 = $[27];
	return t8;
}
function InputCell(t0) {
	const $ = (0, import_compiler_runtime.c)(16);
	let inputProps;
	let onBlur;
	let onUpdate;
	let props;
	let textAlign;
	if ($[0] !== t0) {
		({inputProps, onUpdate, onBlur, textAlign, ...props} = t0);
		$[0] = t0;
		$[1] = inputProps;
		$[2] = onBlur;
		$[3] = onUpdate;
		$[4] = props;
		$[5] = textAlign;
	} else {
		inputProps = $[1];
		onBlur = $[2];
		onUpdate = $[3];
		props = $[4];
		textAlign = $[5];
	}
	let t1;
	if ($[6] !== inputProps || $[7] !== onBlur || $[8] !== onUpdate || $[9] !== props.value || $[10] !== textAlign) {
		t1 = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputValue, {
			value: props.value,
			onUpdate,
			onBlur,
			style: {
				textAlign,
				...inputProps && inputProps.style
			},
			...inputProps
		});
		$[6] = inputProps;
		$[7] = onBlur;
		$[8] = onUpdate;
		$[9] = props.value;
		$[10] = textAlign;
		$[11] = t1;
	} else t1 = $[11];
	let t2;
	if ($[12] !== props || $[13] !== t1 || $[14] !== textAlign) {
		t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Cell, {
			textAlign,
			...props,
			children: t1
		});
		$[12] = props;
		$[13] = t1;
		$[14] = textAlign;
		$[15] = t2;
	} else t2 = $[15];
	return t2;
}
function shouldSaveFromKey(e) {
	switch (e.key) {
		case "Tab":
		case "Enter":
			e.preventDefault();
			return true;
		default:
	}
}
function CustomCell(t0) {
	const $ = (0, import_compiler_runtime.c)(22);
	let children;
	let defaultValue;
	let onBlur;
	let onUpdate;
	let props;
	if ($[0] !== t0) {
		({value: defaultValue, children, onUpdate, onBlur, ...props} = t0);
		$[0] = t0;
		$[1] = children;
		$[2] = defaultValue;
		$[3] = onBlur;
		$[4] = onUpdate;
		$[5] = props;
	} else {
		children = $[1];
		defaultValue = $[2];
		onBlur = $[3];
		onUpdate = $[4];
		props = $[5];
	}
	const [value, setValue] = (0, import_react.useState)(defaultValue);
	const [prevDefaultValue, setPrevDefaultValue] = (0, import_react.useState)(defaultValue);
	if (prevDefaultValue !== defaultValue) {
		setValue(defaultValue);
		setPrevDefaultValue(defaultValue);
	}
	let t1;
	if ($[6] !== onBlur || $[7] !== onUpdate || $[8] !== value) {
		t1 = function onBlur_(e) {
			if (document.hasFocus()) {
				onUpdate?.(value);
				fireBlur(onBlur, e);
			}
		};
		$[6] = onBlur;
		$[7] = onUpdate;
		$[8] = value;
		$[9] = t1;
	} else t1 = $[9];
	const onBlur_ = t1;
	let t2;
	if ($[10] !== onUpdate || $[11] !== value) {
		t2 = function onKeyDown(e_0) {
			if (shouldSaveFromKey(e_0)) onUpdate?.(value);
		};
		$[10] = onUpdate;
		$[11] = value;
		$[12] = t2;
	} else t2 = $[12];
	const onKeyDown = t2;
	let t3;
	if ($[13] !== children || $[14] !== onBlur_ || $[15] !== onKeyDown || $[16] !== onUpdate) {
		t3 = () => children?.({
			onBlur: onBlur_,
			onKeyDown,
			onUpdate: (val) => setValue(val),
			onSave: (val_0) => {
				setValue(val_0);
				onUpdate?.(val_0);
			},
			shouldSaveFromKey,
			inputStyle: inputCellStyle
		});
		$[13] = children;
		$[14] = onBlur_;
		$[15] = onKeyDown;
		$[16] = onUpdate;
		$[17] = t3;
	} else t3 = $[17];
	let t4;
	if ($[18] !== defaultValue || $[19] !== props || $[20] !== t3) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Cell, {
			...props,
			value: defaultValue,
			children: t3
		});
		$[18] = defaultValue;
		$[19] = props;
		$[20] = t3;
		$[21] = t4;
	} else t4 = $[21];
	return t4;
}
function DeleteCell(t0) {
	const $ = (0, import_compiler_runtime.c)(12);
	let onDelete;
	let props;
	let style;
	if ($[0] !== t0) {
		({onDelete, style, ...props} = t0);
		$[0] = t0;
		$[1] = onDelete;
		$[2] = props;
		$[3] = style;
	} else {
		onDelete = $[1];
		props = $[2];
		style = $[3];
	}
	let t1;
	if ($[4] !== style) {
		t1 = {
			alignItems: "center",
			userSelect: "none",
			...style
		};
		$[4] = style;
		$[5] = t1;
	} else t1 = $[5];
	let t2;
	if ($[6] !== onDelete) {
		t2 = (e) => {
			e.stopPropagation();
			onDelete?.();
		};
		$[6] = onDelete;
		$[7] = t2;
	} else t2 = $[7];
	let t3;
	if ($[8] !== props || $[9] !== t1 || $[10] !== t2) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Cell, {
			...props,
			name: "delete",
			width: 20,
			style: t1,
			onClick: t2,
			children: _temp$15
		});
		$[8] = props;
		$[9] = t1;
		$[10] = t2;
		$[11] = t3;
	} else t3 = $[11];
	return t3;
}
function _temp$15() {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgDelete, {
		width: 7,
		height: 7
	});
}
var CellButton = (0, import_react.forwardRef)((t0, ref) => {
	const $ = (0, import_compiler_runtime.c)(26);
	const { children, style, primary, bare, disabled, clickBehavior, onSelect, onEdit, className } = t0;
	let t1;
	if ($[0] !== disabled || $[1] !== onSelect) {
		t1 = (e) => {
			if (e.key === "x" || e.key === " ") {
				e.preventDefault();
				if (!disabled) onSelect?.(e);
			}
		};
		$[0] = disabled;
		$[1] = onSelect;
		$[2] = t1;
	} else t1 = $[2];
	const t2 = bare ? "transparent" : disabled ? theme.buttonNormalDisabledBackground : primary ? theme.buttonPrimaryBackground : theme.buttonNormalBackground;
	const t3 = bare ? "none" : "1px solid " + (disabled ? theme.buttonNormalDisabledBorder : primary ? theme.buttonPrimaryBorder : theme.buttonNormalBorder);
	const t4 = bare ? "inherit" : disabled ? theme.buttonNormalDisabledText : primary ? theme.buttonPrimaryText : theme.buttonNormalText;
	let t5;
	if ($[3] !== bare) {
		t5 = bare ? null : {
			outline: 0,
			boxShadow: `1px 1px 2px ${theme.buttonNormalShadow}`
		};
		$[3] = bare;
		$[4] = t5;
	} else t5 = $[4];
	let t6;
	if ($[5] !== style || $[6] !== t2 || $[7] !== t3 || $[8] !== t4 || $[9] !== t5) {
		t6 = {
			flexDirection: "row",
			alignItems: "center",
			cursor: "default",
			transition: "box-shadow .15s",
			backgroundColor: t2,
			border: t3,
			color: t4,
			":focus": t5,
			...style
		};
		$[5] = style;
		$[6] = t2;
		$[7] = t3;
		$[8] = t4;
		$[9] = t5;
		$[10] = t6;
	} else t6 = $[10];
	let t7;
	if ($[11] !== onEdit) {
		t7 = () => onEdit && onEdit();
		$[11] = onEdit;
		$[12] = t7;
	} else t7 = $[12];
	let t8;
	if ($[13] !== clickBehavior || $[14] !== disabled || $[15] !== onEdit || $[16] !== onSelect) {
		t8 = clickBehavior === "none" ? null : (e_0) => {
			if (!disabled) {
				onSelect?.(e_0);
				onEdit?.();
			}
		};
		$[13] = clickBehavior;
		$[14] = disabled;
		$[15] = onEdit;
		$[16] = onSelect;
		$[17] = t8;
	} else t8 = $[17];
	let t9;
	if ($[18] !== children || $[19] !== className || $[20] !== ref || $[21] !== t1 || $[22] !== t6 || $[23] !== t7 || $[24] !== t8) {
		t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			innerRef: ref,
			className,
			tabIndex: 0,
			onKeyDown: t1,
			style: t6,
			onFocus: t7,
			"data-testid": "cell-button",
			onClick: t8,
			children
		});
		$[18] = children;
		$[19] = className;
		$[20] = ref;
		$[21] = t1;
		$[22] = t6;
		$[23] = t7;
		$[24] = t8;
		$[25] = t9;
	} else t9 = $[25];
	return t9;
});
CellButton.displayName = "CellButton";
function SelectCell({ focused, selected, style, onSelect, onEdit, icon = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgCheckmark, {
	width: 6,
	height: 6
}), buttonProps = {}, ...props }) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Cell, {
		...props,
		focused,
		name: "select",
		width: 20,
		style: {
			alignItems: "center",
			userSelect: "none",
			...style
		},
		onClick: (e) => {
			e.stopPropagation();
			onSelect?.(e);
			onEdit?.();
		},
		children: () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CellButton, {
			style: {
				width: 12,
				height: 12,
				justifyContent: "center",
				alignItems: "center",
				borderRadius: 3,
				border: selected ? "1px solid " + theme.checkboxBorderSelected : "1px solid " + theme.formInputBorder,
				color: theme.checkboxText,
				backgroundColor: selected ? theme.checkboxBackgroundSelected : theme.tableBackground,
				":focus": {
					border: "1px solid " + theme.checkboxBorderSelected,
					boxShadow: "0 1px 2px " + theme.checkboxShadowSelected
				}
			},
			onEdit,
			onSelect,
			clickBehavior: "none",
			...buttonProps,
			children: selected && icon
		})
	});
}
function SheetCell(t0) {
	const $ = (0, import_compiler_runtime.c)(34);
	let inputProps;
	let onSave;
	let props;
	let textAlign;
	let valueProps;
	let valueStyle;
	if ($[0] !== t0) {
		({valueProps, valueStyle, inputProps, textAlign, onSave, ...props} = t0);
		$[0] = t0;
		$[1] = inputProps;
		$[2] = onSave;
		$[3] = props;
		$[4] = textAlign;
		$[5] = valueProps;
		$[6] = valueStyle;
	} else {
		inputProps = $[1];
		onSave = $[2];
		props = $[3];
		textAlign = $[4];
		valueProps = $[5];
		valueStyle = $[6];
	}
	const { binding, type, getValueStyle, formatExpr, unformatExpr, privacyFilter } = valueProps;
	let t1;
	if ($[7] !== inputProps || $[8] !== props.exposed) {
		t1 = () => {
			if (props.exposed && inputProps && inputProps.onBlur) inputProps.onBlur();
		};
		$[7] = inputProps;
		$[8] = props.exposed;
		$[9] = t1;
	} else t1 = $[9];
	const sheetValue = useSheetValue(binding, t1);
	const format = useFormat();
	let t2;
	if ($[10] !== getValueStyle || $[11] !== sheetValue || $[12] !== valueStyle) {
		t2 = getValueStyle ? {
			...valueStyle,
			...getValueStyle(sheetValue)
		} : valueStyle;
		$[10] = getValueStyle;
		$[11] = sheetValue;
		$[12] = valueStyle;
		$[13] = t2;
	} else t2 = $[13];
	const t3 = String(sheetValue ?? "");
	let t4;
	if ($[14] !== format || $[15] !== props || $[16] !== type) {
		t4 = (value) => props.formatter ? props.formatter(value, type) : format(value, type);
		$[14] = format;
		$[15] = props;
		$[16] = type;
		$[17] = t4;
	} else t4 = $[17];
	const t5 = privacyFilter != null ? privacyFilter : type === "financial" ? true : void 0;
	let t6;
	if ($[18] !== formatExpr || $[19] !== inputProps || $[20] !== onSave || $[21] !== sheetValue || $[22] !== textAlign || $[23] !== unformatExpr) {
		t6 = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputValue, {
			value: formatExpr ? formatExpr(sheetValue) : sheetValue.toString(),
			onUpdate: (value_0) => {
				onSave(unformatExpr ? unformatExpr(value_0) : value_0);
			},
			...inputProps,
			style: {
				textAlign,
				...inputProps?.style || {}
			}
		});
		$[18] = formatExpr;
		$[19] = inputProps;
		$[20] = onSave;
		$[21] = sheetValue;
		$[22] = textAlign;
		$[23] = unformatExpr;
		$[24] = t6;
	} else t6 = $[24];
	let t7;
	if ($[25] !== props || $[26] !== sheetValue || $[27] !== t2 || $[28] !== t3 || $[29] !== t4 || $[30] !== t5 || $[31] !== t6 || $[32] !== textAlign) {
		t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Cell, {
			valueStyle: t2,
			textAlign,
			...props,
			value: t3,
			formatter: t4,
			privacyFilter: t5,
			"data-cellname": sheetValue,
			children: t6
		});
		$[25] = props;
		$[26] = sheetValue;
		$[27] = t2;
		$[28] = t3;
		$[29] = t4;
		$[30] = t5;
		$[31] = t6;
		$[32] = textAlign;
		$[33] = t7;
	} else t7 = $[33];
	return t7;
}
function TableHeader(t0) {
	const $ = (0, import_compiler_runtime.c)(14);
	let children;
	let headers;
	let rowProps;
	if ($[0] !== t0) {
		({headers, children, ...rowProps} = t0);
		$[0] = t0;
		$[1] = children;
		$[2] = headers;
		$[3] = rowProps;
	} else {
		children = $[1];
		headers = $[2];
		rowProps = $[3];
	}
	let t1;
	if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = {
			overflow: "hidden",
			flexShrink: 0
		};
		$[4] = t1;
	} else t1 = $[4];
	let t2;
	if ($[5] !== rowProps.style) {
		t2 = {
			color: theme.tableHeaderText,
			backgroundColor: theme.tableHeaderBackground,
			zIndex: 200,
			fontWeight: 500,
			...rowProps.style
		};
		$[5] = rowProps.style;
		$[6] = t2;
	} else t2 = $[6];
	let t3;
	if ($[7] !== children || $[8] !== headers) {
		t3 = headers ? headers.map(_temp2$9) : children;
		$[7] = children;
		$[8] = headers;
		$[9] = t3;
	} else t3 = $[9];
	let t4;
	if ($[10] !== rowProps || $[11] !== t2 || $[12] !== t3) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t1,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Row, {
				collapsed: true,
				...rowProps,
				style: t2,
				children: t3
			})
		});
		$[10] = rowProps;
		$[11] = t2;
		$[12] = t3;
		$[13] = t4;
	} else t4 = $[13];
	return t4;
}
function _temp2$9(header) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Cell, {
		value: header.name,
		width: header.width,
		style: header.style,
		valueStyle: header.valueStyle
	}, header.name);
}
function SelectedItemsButton(t0) {
	const $ = (0, import_compiler_runtime.c)(25);
	const { id, name, items, onSelect } = t0;
	const selectedItems = useSelectedItems();
	const [menuOpen, setMenuOpen] = (0, import_react.useState)(false);
	const triggerRef = (0, import_react.useRef)(null);
	if (selectedItems.size === 0) return null;
	let t1;
	if ($[0] !== name || $[1] !== selectedItems.size) {
		t1 = typeof name === "function" ? name(selectedItems.size) : name;
		$[0] = name;
		$[1] = selectedItems.size;
		$[2] = t1;
	} else t1 = $[2];
	const buttonLabel = t1;
	let t2;
	if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = { flexShrink: 0 };
		$[3] = t2;
	} else t2 = $[3];
	let t3;
	let t4;
	if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
		t3 = { color: theme.pageTextPositive };
		t4 = () => setMenuOpen(true);
		$[4] = t3;
		$[5] = t4;
	} else {
		t3 = $[4];
		t4 = $[5];
	}
	const t5 = id + "-select-button";
	let t6;
	if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgExpandArrow, {
			width: 8,
			height: 8,
			style: {
				marginRight: 5,
				color: theme.pageText
			}
		});
		$[6] = t6;
	} else t6 = $[6];
	let t7;
	if ($[7] !== buttonLabel || $[8] !== t5) {
		t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button, {
			ref: triggerRef,
			variant: "bare",
			style: t3,
			onPress: t4,
			"data-testid": t5,
			children: [t6, buttonLabel]
		});
		$[7] = buttonLabel;
		$[8] = t5;
		$[9] = t7;
	} else t7 = $[9];
	let t8;
	if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
		t8 = {
			width: 200,
			padding: 0,
			backgroundColor: theme.menuBackground
		};
		$[10] = t8;
	} else t8 = $[10];
	let t9;
	if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
		t9 = () => setMenuOpen(false);
		$[11] = t9;
	} else t9 = $[11];
	const t10 = id + "-select-tooltip";
	let t11;
	if ($[12] !== onSelect || $[13] !== selectedItems) {
		t11 = (name_0) => {
			onSelect(name_0, [...selectedItems]);
			setMenuOpen(false);
		};
		$[12] = onSelect;
		$[13] = selectedItems;
		$[14] = t11;
	} else t11 = $[14];
	let t12;
	if ($[15] !== items || $[16] !== t11) {
		t12 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Menu, {
			onMenuSelect: t11,
			items
		});
		$[15] = items;
		$[16] = t11;
		$[17] = t12;
	} else t12 = $[17];
	let t13;
	if ($[18] !== menuOpen || $[19] !== t10 || $[20] !== t12) {
		t13 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Popover, {
			triggerRef,
			style: t8,
			isOpen: menuOpen,
			onOpenChange: t9,
			"data-testid": t10,
			children: t12
		});
		$[18] = menuOpen;
		$[19] = t10;
		$[20] = t12;
		$[21] = t13;
	} else t13 = $[21];
	let t14;
	if ($[22] !== t13 || $[23] !== t7) {
		t14 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t2,
			children: [t7, t13]
		});
		$[22] = t13;
		$[23] = t7;
		$[24] = t14;
	} else t14 = $[24];
	return t14;
}
var rowStyle = {
	position: "absolute",
	willChange: "transform",
	width: "100%"
};
function TableWithNavigator(t0) {
	const $ = (0, import_compiler_runtime.c)(6);
	let fields;
	let props;
	if ($[0] !== t0) {
		({fields, ...props} = t0);
		$[0] = t0;
		$[1] = fields;
		$[2] = props;
	} else {
		fields = $[1];
		props = $[2];
	}
	const navigator = useTableNavigator(props.items, fields);
	let t1;
	if ($[3] !== navigator || $[4] !== props) {
		t1 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Table, {
			...props,
			navigator
		});
		$[3] = navigator;
		$[4] = props;
		$[5] = t1;
	} else t1 = $[5];
	return t1;
}
var Table = (0, import_react.forwardRef)(({ items, count, headers, contentHeader, loading, rowHeight = 32, backgroundColor = theme.tableBackground, renderItem, renderEmpty, getItemKey, loadMore, style, navigator, onScroll, isSelected, saveScrollWidth, listContainerRef, ...props }, ref) => {
	if (!navigator) navigator = {
		onEdit: () => {},
		editingId: null,
		focusedField: null,
		getNavigatorProps: (props_0) => props_0
	};
	const { onEdit, editingId, focusedField, getNavigatorProps } = navigator;
	const list = (0, import_react.useRef)(null);
	const listContainerInnerRef = (0, import_react.useRef)(null);
	const listContainer = listContainerRef || listContainerInnerRef;
	const scrollContainer = (0, import_react.useRef)(null);
	const initialScrollTo = (0, import_react.useRef)(null);
	const listInitialized = (0, import_react.useRef)(false);
	(0, import_react.useImperativeHandle)(ref, () => ({
		scrollTo: (id, alignment = "smart") => {
			const index = items.findIndex((item) => item.id === id);
			if (index !== -1) if (!list.current) initialScrollTo.current = index;
			else list.current.scrollToItem(index, alignment);
		},
		scrollToTop: () => {
			list.current?.scrollTo(0);
		},
		getScrolledItem: () => {
			if (scrollContainer.current) {
				const offset = scrollContainer.current.scrollTop;
				return items[list.current.getStartIndexForOffset(offset)].id;
			}
			return 0;
		},
		setRowAnimation: (flag) => {
			list.current?.setRowAnimation(flag);
		},
		edit(id_0, field, shouldScroll) {
			onEdit(id_0, field);
			if (id_0 && shouldScroll) ref.scrollTo(id_0);
		},
		anchor() {
			list.current?.anchor();
		},
		unanchor() {
			list.current?.unanchor();
		},
		isAnchored() {
			return list.current && list.current.isAnchored();
		}
	}));
	(0, import_react.useLayoutEffect)(() => {
		if (!listInitialized.current && listContainer.current) {
			list.current?.setRowAnimation(true);
			listInitialized.current = true;
		}
		if (scrollContainer.current && saveScrollWidth) setTimeout(saveScrollDelayed, 200);
	});
	function saveScrollDelayed() {
		saveScrollWidth(scrollContainer.current?.offsetParent ? scrollContainer.current?.offsetParent.clientWidth : 0, scrollContainer.current ? scrollContainer.current.clientWidth : 0);
	}
	function renderRow({ index: index_1, style: style_0, key }) {
		const item_0 = items[index_1];
		const editing = editingId === item_0.id;
		const selected = isSelected && isSelected(item_0.id);
		const row = renderItem({
			item: item_0,
			editing,
			focusedField: editing && focusedField,
			onEdit,
			index: index_1,
			position: style_0.top
		});
		return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: {
				...rowStyle,
				zIndex: editing || selected ? 101 : "auto",
				transform: "translateY(var(--pos))",
				backgroundColor
			},
			nativeStyle: { "--pos": `${style_0.top - 1}px` },
			"data-focus-key": item_0.id,
			children: row
		}, key);
	}
	function getScrollOffset(height, index_2) {
		return index_2 * (rowHeight - 1) + (rowHeight - 1) / 2 - height / 2 + (rowHeight - 1) * 2;
	}
	function onItemsRendered({ overscanStopIndex }) {
		if (loadMore && overscanStopIndex > items.length - 100) loadMore();
	}
	function getEmptyContent(empty) {
		if (empty == null) return null;
		else if (typeof empty === "function") return empty();
		return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: {
				justifyContent: "center",
				alignItems: "center",
				fontStyle: "italic",
				color: theme.tableText,
				flex: 1
			},
			children: empty
		});
	}
	if (loading) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
		style: {
			flex: 1,
			justifyContent: "center",
			alignItems: "center",
			backgroundColor
		},
		children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AnimatedLoading, {
			width: 25,
			color: theme.tableText
		})
	});
	const isEmpty = (count || items.length) === 0;
	return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
		style: {
			flex: 1,
			outline: "none",
			overflow: "hidden",
			...style
		},
		tabIndex: 0,
		...getNavigatorProps(props),
		"data-testid": "table",
		children: [headers && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableHeader, {
			height: rowHeight,
			...Array.isArray(headers) ? { headers } : { children: headers }
		}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: {
				flex: `1 1 ${rowHeight * Math.max(2, items.length)}px`,
				backgroundColor
			},
			children: isEmpty ? getEmptyContent(renderEmpty) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(q, { renderProp: ({ width = 0, height: height_0 = 0 }) => {
				if (width === 0 || height_0 === 0) return null;
				return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AvoidRefocusScrollProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FixedSizeList, {
					ref: list,
					header: contentHeader,
					innerRef: listContainer,
					outerRef: scrollContainer,
					width,
					height: height_0,
					renderRow,
					itemCount: count || items.length,
					itemSize: rowHeight - 1,
					itemKey: getItemKey || ((index_3) => items[index_3].id),
					indexForKey: (key_0) => items.findIndex((item_1) => item_1.id === key_0),
					initialScrollOffset: initialScrollTo.current ? getScrollOffset(height_0, initialScrollTo.current) : 0,
					overscanCount: 5,
					onItemsRendered,
					onScroll
				}) });
			} })
		})]
	});
});
Table.displayName = "Table";
function useTableNavigator(data, fields) {
	const $ = (0, import_compiler_runtime.c)(39);
	let t0;
	if ($[0] !== fields) {
		t0 = typeof fields !== "function" ? () => fields : fields;
		$[0] = fields;
		$[1] = t0;
	} else t0 = $[1];
	const getFields = t0;
	const [editingId, setEditingId] = (0, import_react.useState)(null);
	const [focusedField, setFocusedField] = (0, import_react.useState)(null);
	const containerRef = (0, import_react.useRef)(null);
	const modalState = useModalState();
	const modalStackLength = (0, import_react.useRef)(modalState.modalStack.length);
	let t1;
	if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = (id, field) => {
			setEditingId(id);
			setFocusedField(id ? field : null);
		};
		$[2] = t1;
	} else t1 = $[2];
	const onEdit = t1;
	let t2;
	if ($[3] !== editingId || $[4] !== focusedField) {
		t2 = function flashInput() {
			containerRef.current.focus();
			onEdit(null);
			setTimeout(() => {
				onEdit(editingId, focusedField);
			}, 100);
		};
		$[3] = editingId;
		$[4] = focusedField;
		$[5] = t2;
	} else t2 = $[5];
	const flashInput = t2;
	let t3;
	if ($[6] !== data || $[7] !== editingId || $[8] !== flashInput || $[9] !== getFields) {
		t3 = function onFocusPrevious() {
			const idx = data.findIndex((item) => item.id === editingId);
			if (idx > 0) {
				const item_0 = data[idx - 1];
				const fields_0 = getFields(item_0);
				onEdit(item_0.id, fields_0[fields_0.length - 1]);
			} else flashInput();
		};
		$[6] = data;
		$[7] = editingId;
		$[8] = flashInput;
		$[9] = getFields;
		$[10] = t3;
	} else t3 = $[10];
	const onFocusPrevious = t3;
	let t4;
	if ($[11] !== data || $[12] !== editingId || $[13] !== flashInput || $[14] !== getFields) {
		t4 = function onFocusNext() {
			const idx_0 = data.findIndex((item_1) => item_1.id === editingId);
			if (idx_0 < data.length - 1) {
				const item_2 = data[idx_0 + 1];
				const fields_1 = getFields(item_2);
				onEdit(item_2.id, fields_1[0]);
			} else flashInput();
		};
		$[11] = data;
		$[12] = editingId;
		$[13] = flashInput;
		$[14] = getFields;
		$[15] = t4;
	} else t4 = $[15];
	const onFocusNext = t4;
	let t5;
	if ($[16] !== data || $[17] !== editingId || $[18] !== focusedField || $[19] !== getFields || $[20] !== onFocusNext || $[21] !== onFocusPrevious) {
		t5 = function moveHorizontally(dir) {
			if (editingId) {
				const fields_2 = getFields(data.find((item_3) => item_3.id === editingId));
				const idx_1 = fields_2.indexOf(focusedField) + dir;
				if (idx_1 < 0) onFocusPrevious();
				else if (idx_1 >= fields_2.length) onFocusNext();
				else setFocusedField(fields_2[idx_1]);
			}
		};
		$[16] = data;
		$[17] = editingId;
		$[18] = focusedField;
		$[19] = getFields;
		$[20] = onFocusNext;
		$[21] = onFocusPrevious;
		$[22] = t5;
	} else t5 = $[22];
	const moveHorizontally = t5;
	let t6;
	if ($[23] !== data || $[24] !== editingId || $[25] !== flashInput || $[26] !== focusedField || $[27] !== getFields) {
		t6 = function moveVertically(dir_0) {
			if (editingId) {
				let nextIdx = data.findIndex((item_4) => item_4.id === editingId);
				while (true) {
					nextIdx = nextIdx + dir_0;
					if (nextIdx >= 0 && nextIdx < data.length) {
						const next = data[nextIdx];
						if (getFields(next).includes(focusedField)) {
							onEdit(next.id, focusedField);
							break;
						}
					} else {
						flashInput();
						break;
					}
				}
			}
		};
		$[23] = data;
		$[24] = editingId;
		$[25] = flashInput;
		$[26] = focusedField;
		$[27] = getFields;
		$[28] = t6;
	} else t6 = $[28];
	const moveVertically = t6;
	let t7;
	if ($[29] !== moveHorizontally || $[30] !== moveVertically) {
		t7 = function onMove(dir_1) {
			bb57: switch (dir_1) {
				case "left":
					moveHorizontally(-1);
					break bb57;
				case "right":
					moveHorizontally(1);
					break bb57;
				case "up":
					moveVertically(-1);
					break bb57;
				case "down":
					moveVertically(1);
					break bb57;
				default: throw new Error("Unknown direction: " + dir_1);
			}
		};
		$[29] = moveHorizontally;
		$[30] = moveVertically;
		$[31] = t7;
	} else t7 = $[31];
	const onMove = t7;
	let t8;
	if ($[32] !== modalState.modalStack.length || $[33] !== onMove) {
		t8 = function getNavigatorProps(userProps) {
			return {
				...userProps,
				innerRef: containerRef,
				onKeyDown: (e) => {
					userProps?.onKeyDown?.(e);
					if (e.isPropagationStopped()) return;
					bb80: switch (e.key) {
						case "ArrowUp":
						case "k":
							if (e.target.tagName !== "INPUT") {
								e.preventDefault();
								onMove("up");
							}
							break bb80;
						case "ArrowDown":
						case "j":
							if (e.target.tagName !== "INPUT") {
								e.preventDefault();
								onMove("down");
							}
							break bb80;
						case "Enter":
						case "Tab":
							e.preventDefault();
							e.stopPropagation();
							onMove(e.key === "Enter" ? e.shiftKey ? "up" : "down" : e.shiftKey ? "left" : "right");
							break bb80;
						default:
					}
				},
				onBlur: (e_0) => {
					const prevNumModals = modalStackLength.current;
					const numModals = modalState.modalStack.length;
					if (document.hasFocus() && (e_0.relatedTarget == null || !containerRef.current.contains(e_0.relatedTarget) || containerRef.current === e_0.relatedTarget) && prevNumModals === numModals) onEdit(null);
				}
			};
		};
		$[32] = modalState.modalStack.length;
		$[33] = onMove;
		$[34] = t8;
	} else t8 = $[34];
	const getNavigatorProps = t8;
	let t9;
	if ($[35] !== editingId || $[36] !== focusedField || $[37] !== getNavigatorProps) {
		t9 = {
			onEdit,
			editingId,
			focusedField,
			getNavigatorProps
		};
		$[35] = editingId;
		$[36] = focusedField;
		$[37] = getNavigatorProps;
		$[38] = t9;
	} else t9 = $[38];
	return t9;
}
//#endregion
//#region src/queries/aqlQuery.ts
async function aqlQuery(query) {
	return send("query", query.serialize());
}
//#endregion
//#region src/reports/queries.ts
var reportQueries = {
	all: () => ["reports"],
	lists: () => [...reportQueries.all(), "lists"],
	list: () => queryOptions({
		queryKey: [...reportQueries.lists()],
		queryFn: async () => {
			return await send("report/get");
		}
	})
};
var dashboardQueries = {
	all: () => ["dashboards"],
	lists: () => [...dashboardQueries.all(), "lists"],
	listDashboardWidgets: () => queryOptions({
		queryKey: [...dashboardQueries.lists(), "widgets"],
		queryFn: async () => {
			const { data } = await aqlQuery(q$1("dashboard").select("*"));
			return data;
		}
	}),
	listDashboardPageWidgets: (dashboardPageId) => queryOptions({
		...dashboardQueries.listDashboardWidgets(),
		select: (widgets) => widgets.filter((w) => w.dashboard_page_id === dashboardPageId),
		enabled: !!dashboardPageId
	}),
	listDashboardPages: () => queryOptions({
		queryKey: [...dashboardQueries.lists(), "pages"],
		queryFn: async () => {
			const { data } = await aqlQuery(q$1("dashboard_pages").select("*"));
			return data.map((page) => ({
				...page,
				name: page.name ?? ""
			}));
		}
	})
};
//#endregion
//#region src/hooks/useReports.ts
function useReports() {
	return useQuery$1(reportQueries.list());
}
//#endregion
//#region ../loot-core/src/shared/months.ts
var months_exports = /* @__PURE__ */ __exportAll({
	_dayRange: () => _dayRange,
	_parse: () => _parse,
	_range: () => _range,
	_weekRange: () => _weekRange,
	_yearRange: () => _yearRange,
	addDays: () => addDays,
	addMonths: () => addMonths,
	addWeeks: () => addWeeks,
	addYears: () => addYears,
	bounds: () => bounds,
	currentDate: () => currentDate,
	currentDay: () => currentDay,
	currentMonth: () => currentMonth,
	currentWeek: () => currentWeek,
	currentYear: () => currentYear,
	dayFromDate: () => dayFromDate,
	dayRange: () => dayRange,
	dayRangeInclusive: () => dayRangeInclusive,
	differenceInCalendarDays: () => differenceInCalendarDays,
	differenceInCalendarMonths: () => differenceInCalendarMonths,
	firstDayOfMonth: () => firstDayOfMonth,
	format: () => format$2,
	formatDistance: () => formatDistance$85,
	getDateFormatRegex: () => getDateFormatRegex,
	getDay: () => getDay,
	getDayMonthFormat: () => getDayMonthFormat,
	getDayMonthRegex: () => getDayMonthRegex,
	getMonth: () => getMonth,
	getMonthEnd: () => getMonthEnd,
	getMonthFromIndex: () => getMonthFromIndex,
	getMonthIndex: () => getMonthIndex,
	getMonthYearFormat: () => getMonthYearFormat,
	getMonthYearRegex: () => getMonthYearRegex,
	getShortYearFormat: () => getShortYearFormat,
	getShortYearRegex: () => getShortYearRegex,
	getWeekEnd: () => getWeekEnd,
	getYear: () => getYear,
	getYearEnd: () => getYearEnd,
	getYearStart: () => getYearStart,
	isAfter: () => isAfter$1,
	isBefore: () => isBefore$1,
	isCurrentDay: () => isCurrentDay,
	isCurrentMonth: () => isCurrentMonth,
	isValidYearMonth: () => isValidYearMonth,
	lastDayOfMonth: () => lastDayOfMonth,
	monthFromDate: () => monthFromDate,
	nameForMonth: () => nameForMonth,
	nextMonth: () => nextMonth,
	parseDate: () => parseDate,
	prevMonth: () => prevMonth,
	prevYear: () => prevYear,
	range: () => range,
	rangeInclusive: () => rangeInclusive,
	sheetForMonth: () => sheetForMonth,
	subDays: () => subDays,
	subMonths: () => subMonths,
	subWeeks: () => subWeeks,
	subYears: () => subYears,
	weekFromDate: () => weekFromDate,
	weekRangeInclusive: () => weekRangeInclusive,
	yearFromDate: () => yearFromDate,
	yearRangeInclusive: () => yearRangeInclusive
});
init_build_shims();
function _parse(value) {
	if (typeof value === "string") {
		const [year, month, day] = value.split("-");
		if (day != null) return new Date(parseInt(year), parseInt(month) - 1, parseInt(day), 12);
		else if (month != null) return new Date(parseInt(year), parseInt(month) - 1, 1, 12);
		else return new Date(parseInt(year), 0, 1, 12);
	}
	if (typeof value === "number") return new Date(value);
	return value;
}
var parseDate = _parse;
function yearFromDate(date) {
	return format$4(_parse(date), "yyyy");
}
function monthFromDate(date) {
	return format$4(_parse(date), "yyyy-MM");
}
function isValidYearMonth(value) {
	const match = /^(\d{4})-(\d{2})$/.exec(value);
	if (!match) return false;
	const month = Number(match[2]);
	return month >= 1 && month <= 12;
}
function weekFromDate(date, firstDayOfWeekIdx) {
	const converted = parseInt(firstDayOfWeekIdx || "0");
	return format$4(_parse(startOfWeek(_parse(date), { weekStartsOn: converted })), "yyyy-MM-dd");
}
function firstDayOfMonth(date) {
	return dayFromDate(startOfMonth(_parse(date)));
}
function lastDayOfMonth(date) {
	return dayFromDate(endOfMonth(_parse(date)));
}
function dayFromDate(date) {
	return format$4(_parse(date), "yyyy-MM-dd");
}
function currentMonth() {
	if (global.IS_TESTING || isPlaywright) return global.currentMonth || "2017-01";
	else return format$4(/* @__PURE__ */ new Date(), "yyyy-MM");
}
function currentWeek(firstDayOfWeekIdx) {
	if (global.IS_TESTING || isPlaywright) return global.currentWeek || "2017-01-01";
	else return format$4(_parse(startOfWeek(/* @__PURE__ */ new Date(), { weekStartsOn: parseInt(firstDayOfWeekIdx || "0") })), "yyyy-MM-dd");
}
function currentYear() {
	if (global.IS_TESTING || isPlaywright) return global.currentMonth || "2017";
	else return format$4(/* @__PURE__ */ new Date(), "yyyy");
}
function currentDate() {
	if (global.IS_TESTING || isPlaywright) return parse$5(currentDay(), "yyyy-MM-dd", /* @__PURE__ */ new Date());
	return /* @__PURE__ */ new Date();
}
function currentDay() {
	if (global.IS_TESTING || isPlaywright) return "2017-01-01";
	else return format$4(/* @__PURE__ */ new Date(), "yyyy-MM-dd");
}
function nextMonth(month) {
	return format$4(addMonths$1(_parse(month), 1), "yyyy-MM");
}
function prevYear(month, format = "yyyy-MM") {
	return format$4(subMonths$1(_parse(month), 12), format);
}
function prevMonth(month) {
	return format$4(subMonths$1(_parse(month), 1), "yyyy-MM");
}
function addYears(year, n) {
	return format$4(addYears$1(_parse(year), n), "yyyy");
}
function addMonths(month, n) {
	return format$4(addMonths$1(_parse(month), n), "yyyy-MM");
}
function addWeeks(date, n) {
	return format$4(addWeeks$1(_parse(date), n), "yyyy-MM-dd");
}
function differenceInCalendarMonths(month1, month2) {
	return differenceInCalendarMonths$1(_parse(month1), _parse(month2));
}
function differenceInCalendarDays(month1, month2) {
	return differenceInCalendarDays$1(_parse(month1), _parse(month2));
}
function subMonths(month, n) {
	return format$4(subMonths$1(_parse(month), n), "yyyy-MM");
}
function subWeeks(date, n) {
	return format$4(subWeeks$1(_parse(date), n), "yyyy-MM-dd");
}
function subYears(year, n) {
	return format$4(subYears$1(_parse(year), n), "yyyy");
}
function addDays(day, n) {
	return format$4(addDays$1(_parse(day), n), "yyyy-MM-dd");
}
function subDays(day, n) {
	return format$4(subDays$1(_parse(day), n), "yyyy-MM-dd");
}
function isBefore$1(month1, month2) {
	return isBefore$2(_parse(month1), _parse(month2));
}
function isAfter$1(month1, month2) {
	return isAfter$2(_parse(month1), _parse(month2));
}
function isCurrentMonth(month) {
	return month === currentMonth();
}
function isCurrentDay(day) {
	return day === currentDay();
}
function bounds(month) {
	return {
		start: parseInt(format$4(startOfMonth(_parse(month)), "yyyyMMdd")),
		end: parseInt(format$4(endOfMonth(_parse(month)), "yyyyMMdd"))
	};
}
function _yearRange(start, end, inclusive = false) {
	const years = [];
	let year = yearFromDate(start);
	const endYear = yearFromDate(end);
	while (isBefore$2(_parse(year), _parse(endYear))) {
		years.push(year);
		year = addYears(year, 1);
	}
	if (inclusive) years.push(year);
	return years;
}
function yearRangeInclusive(start, end) {
	return _yearRange(start, end, true);
}
function _weekRange(start, end, inclusive = false, firstDayOfWeekIdx) {
	const weeks = [];
	let week = weekFromDate(start, firstDayOfWeekIdx);
	const endWeek = weekFromDate(end, firstDayOfWeekIdx);
	while (isBefore$2(_parse(week), _parse(endWeek))) {
		weeks.push(week);
		week = addWeeks(week, 1);
	}
	if (inclusive) weeks.push(week);
	return weeks;
}
function weekRangeInclusive(start, end, firstDayOfWeekIdx) {
	return _weekRange(start, end, true, firstDayOfWeekIdx);
}
function _range(start, end, inclusive = false) {
	const months = [];
	let month = monthFromDate(start);
	const endMonth = monthFromDate(end);
	while (isBefore$2(_parse(month), _parse(endMonth))) {
		months.push(month);
		month = addMonths(month, 1);
	}
	if (inclusive) months.push(month);
	return months;
}
function range(start, end) {
	return _range(start, end);
}
function rangeInclusive(start, end) {
	return _range(start, end, true);
}
function _dayRange(start, end, inclusive = false) {
	const days = [];
	let day = start;
	while (isBefore$2(_parse(day), _parse(end))) {
		days.push(dayFromDate(day));
		day = addDays(day, 1);
	}
	if (inclusive) days.push(dayFromDate(day));
	return days;
}
function dayRange(start, end) {
	return _dayRange(start, end);
}
function dayRangeInclusive(start, end) {
	return _dayRange(start, end, true);
}
function getMonthFromIndex(year, monthIndex) {
	return `${year}-${`${monthIndex + 1}`.padStart(2, "0")}`;
}
function getMonthIndex(month) {
	return parseInt(month.slice(5, 7)) - 1;
}
function getYear(month) {
	return month.slice(0, 4);
}
function getMonth(day) {
	return day.slice(0, 7);
}
function getDay(day) {
	return Number(format$4(_parse(day), "dd"));
}
function getMonthEnd(day) {
	return subDays(nextMonth(day.slice(0, 7)) + "-01", 1);
}
function getWeekEnd(date, firstDayOfWeekIdx) {
	const converted = parseInt(firstDayOfWeekIdx || "0");
	return format$4(_parse(endOfWeek(_parse(date), { weekStartsOn: converted })), "yyyy-MM-dd");
}
function getYearStart(month) {
	return getYear(month) + "-01";
}
function getYearEnd(month) {
	return getYear(month) + "-12";
}
function sheetForMonth(month) {
	return "budget" + month.replace("-", "");
}
function nameForMonth(month, locale) {
	return format$4(_parse(month), "MMMM ''yy", { locale });
}
function format$2(month, format, locale) {
	return format$4(_parse(month), format, { locale });
}
function formatDistance$85(date1, date2, locale, options) {
	return formatDistance$86(_parse(date1), _parse(date2), {
		locale,
		...options
	});
}
var getDateFormatRegex = memoizeOne((format) => {
	return new RegExp(format.replace(/d+/g, "\\d{1,2}").replace(/M+/g, "\\d{1,2}").replace(/y+/g, "\\d{4}"));
});
var getDayMonthFormat = memoizeOne((format) => {
	return format.replace(/y+/g, "").replace(/[^\w]$/, "").replace(/^[^\w]/, "");
});
var getDayMonthRegex = memoizeOne((format) => {
	const regex = format.replace(/y+/g, "").replace(/[^\w]$/, "").replace(/^[^\w]/, "").replace(/d+/g, "\\d{1,2}").replace(/M+/g, "\\d{1,2}");
	return new RegExp("^" + regex + "$");
});
var getMonthYearFormat = memoizeOne((format) => {
	return format.replace(/d+/g, "").replace(/[^\w]$/, "").replace(/^[^\w]/, "").replace(/\/\//, "/").replace(/\.\./, ".").replace(/--/, "-");
});
var getMonthYearRegex = memoizeOne((format) => {
	const regex = format.replace(/d+/g, "").replace(/[^\w]$/, "").replace(/^[^\w]/, "").replace(/\/\//, "/").replace(/M+/g, "\\d{1,2}").replace(/y+/g, "\\d{2,4}");
	return new RegExp("^" + regex + "$");
});
var getShortYearFormat = memoizeOne((format) => {
	return format.replace(/y+/g, "yy");
});
var getShortYearRegex = memoizeOne((format) => {
	const regex = format.replace(/[^\w]$/, "").replace(/^[^\w]/, "").replace(/d+/g, "\\d{1,2}").replace(/M+/g, "\\d{1,2}").replace(/y+/g, "\\d{2}");
	return new RegExp("^" + regex + "$");
});
//#endregion
//#region src/queries/index.ts
function accountFilter(accountId, field = "account") {
	if (accountId) if (accountId === "onbudget") return { $and: [{ [`${field}.offbudget`]: false }, { [`${field}.closed`]: false }] };
	else if (accountId === "offbudget") return { $and: [{ [`${field}.offbudget`]: true }, { [`${field}.closed`]: false }] };
	else if (accountId === "closed") return { [`${field}.closed`]: true };
	else if (accountId === "uncategorized") return {
		[`${field}.offbudget`]: false,
		category: null,
		is_parent: false,
		$or: [{
			"payee.transfer_acct.offbudget": true,
			"payee.transfer_acct": null
		}]
	};
	else return { [field]: accountId };
	return null;
}
function transactions(accountId) {
	let query = q$1("transactions").options({ splits: "grouped" });
	const filter = accountFilter(accountId);
	if (filter) query = query.filter(filter);
	return query;
}
function transactionsSearch(currentQuery, search, dateFormat) {
	const amount = currencyToAmount(search);
	const escapedSearch = search.replace(/[\\%?]/g, "\\$&");
	let parsedDate;
	if (getDayMonthRegex(dateFormat).test(search)) parsedDate = parse$5(search, getDayMonthFormat(dateFormat), /* @__PURE__ */ new Date());
	else if (getShortYearRegex(dateFormat).test(search)) parsedDate = parse$5(search, getShortYearFormat(dateFormat), /* @__PURE__ */ new Date());
	else parsedDate = parse$5(search, dateFormat, /* @__PURE__ */ new Date());
	return currentQuery.filter({ $or: {
		"payee.name": { $like: `%${escapedSearch}%` },
		"payee.transfer_acct.name": { $like: `%${escapedSearch}%` },
		notes: { $like: `%${escapedSearch}%` },
		"category.name": { $like: `%${escapedSearch}%` },
		"account.name": { $like: `%${escapedSearch}%` },
		$or: [
			isValid$3(parsedDate) && { date: dayFromDate(parsedDate) },
			amount != null && { amount: {
				$transform: "$abs",
				$eq: amountToInteger(amount)
			} },
			amount != null && Number.isInteger(amount) && { amount: {
				$transform: { $abs: { $idiv: ["$", 100] } },
				$eq: amount
			} }
		].filter(Boolean)
	} });
}
function uncategorizedTransactions() {
	return q$1("transactions").filter({
		"account.offbudget": false,
		category: null,
		$or: [{
			"payee.transfer_acct.offbudget": true,
			"payee.transfer_acct": null
		}]
	});
}
//#endregion
//#region src/spreadsheet/index.ts
var parametrizedField = () => (field) => (id) => `${field}-${id}`;
//#endregion
//#region src/spreadsheet/bindings.ts
var accountParametrizedField = parametrizedField();
var categoryParametrizedField = parametrizedField();
var envelopeParametrizedField = parametrizedField();
var trackingParametrizedField = parametrizedField();
function accountBalance(accountId) {
	return {
		name: accountParametrizedField("balance")(accountId),
		query: q$1("transactions").filter({ account: accountId }).options({ splits: "none" }).calculate({ $sum: "$amount" })
	};
}
function accountBalanceCleared(accountId) {
	return {
		name: accountParametrizedField("balanceCleared")(accountId),
		query: q$1("transactions").filter({
			account: accountId,
			cleared: true
		}).options({ splits: "none" }).calculate({ $sum: "$amount" })
	};
}
function accountBalanceUncleared(accountId) {
	return {
		name: accountParametrizedField("balanceUncleared")(accountId),
		query: q$1("transactions").filter({
			account: accountId,
			cleared: false
		}).options({ splits: "none" }).calculate({ $sum: "$amount" })
	};
}
function allAccountBalance() {
	return {
		query: q$1("transactions").filter({ "account.closed": false }).calculate({ $sum: "$amount" }),
		name: "accounts-balance"
	};
}
function onBudgetAccountBalance() {
	return {
		name: `onbudget-accounts-balance`,
		query: q$1("transactions").filter({
			"account.offbudget": false,
			"account.closed": false
		}).calculate({ $sum: "$amount" })
	};
}
function offBudgetAccountBalance() {
	return {
		name: `offbudget-accounts-balance`,
		query: q$1("transactions").filter({
			"account.offbudget": true,
			"account.closed": false
		}).calculate({ $sum: "$amount" })
	};
}
function closedAccountBalance() {
	return {
		name: `closed-accounts-balance`,
		query: q$1("transactions").filter({ "account.closed": true }).calculate({ $sum: "$amount" })
	};
}
function categoryBalance(categoryId, month) {
	return {
		name: categoryParametrizedField("balance")(categoryId),
		query: q$1("transactions").filter({
			category: categoryId,
			date: {
				$transform: "$month",
				$eq: month
			}
		}).options({ splits: "inline" }).calculate({ $sum: "$amount" })
	};
}
function categoryBalanceCleared(categoryId, month) {
	return {
		name: categoryParametrizedField("balanceCleared")(categoryId),
		query: q$1("transactions").filter({
			category: categoryId,
			date: {
				$transform: "$month",
				$eq: month
			},
			cleared: true
		}).options({ splits: "inline" }).calculate({ $sum: "$amount" })
	};
}
function categoryBalanceUncleared(categoryId, month) {
	return {
		name: categoryParametrizedField("balanceUncleared")(categoryId),
		query: q$1("transactions").filter({
			category: categoryId,
			date: {
				$transform: "$month",
				$eq: month
			},
			cleared: false
		}).options({ splits: "inline" }).calculate({ $sum: "$amount" })
	};
}
function uncategorizedBalance() {
	return {
		name: "uncategorized-balance",
		query: uncategorizedTransactions().calculate({ $sum: "$amount" })
	};
}
function uncategorizedCount() {
	return {
		name: "uncategorized-amount",
		query: uncategorizedTransactions().calculate({ $count: "$id" })
	};
}
var envelopeBudget = {
	incomeAvailable: "available-funds",
	lastMonthOverspent: "last-month-overspent",
	forNextMonth: "buffered-selected",
	totalBudgeted: "total-budgeted",
	toBudget: "to-budget",
	fromLastMonth: "from-last-month",
	manualBuffered: "buffered",
	autoBuffered: "buffered-auto",
	totalIncome: "total-income",
	totalSpent: "total-spent",
	totalBalance: "total-leftover",
	groupSumAmount: envelopeParametrizedField("group-sum-amount"),
	groupIncomeReceived: "total-income",
	groupBudgeted: envelopeParametrizedField("group-budget"),
	groupBalance: envelopeParametrizedField("group-leftover"),
	catBudgeted: envelopeParametrizedField("budget"),
	catSumAmount: envelopeParametrizedField("sum-amount"),
	catBalance: envelopeParametrizedField("leftover"),
	catCarryover: envelopeParametrizedField("carryover"),
	catGoal: envelopeParametrizedField("goal"),
	catLongGoal: envelopeParametrizedField("long-goal")
};
var trackingBudget = {
	totalBudgetedExpense: "total-budgeted",
	totalBudgetedIncome: "total-budget-income",
	totalBudgetedSaved: "total-saved",
	totalIncome: "total-income",
	totalSpent: "total-spent",
	totalSaved: "real-saved",
	totalLeftover: "total-leftover",
	groupSumAmount: trackingParametrizedField("group-sum-amount"),
	groupIncomeReceived: "total-income",
	groupBudgeted: trackingParametrizedField("group-budget"),
	groupBalance: trackingParametrizedField("group-leftover"),
	catBudgeted: trackingParametrizedField("budget"),
	catSumAmount: trackingParametrizedField("sum-amount"),
	catBalance: trackingParametrizedField("leftover"),
	catCarryover: trackingParametrizedField("carryover"),
	catGoal: trackingParametrizedField("goal"),
	catLongGoal: trackingParametrizedField("long-goal")
};
//#endregion
//#region src/components/FinancialText.tsx
function FinancialText(t0) {
	const $ = (0, import_compiler_runtime.c)(10);
	let as;
	let props;
	let style;
	if ($[0] !== t0) {
		({as, style, ...props} = t0);
		$[0] = t0;
		$[1] = as;
		$[2] = props;
		$[3] = style;
	} else {
		as = $[1];
		props = $[2];
		style = $[3];
	}
	const Component = as ?? Text;
	let t1;
	if ($[4] !== style) {
		t1 = {
			...style,
			...styles.tnum
		};
		$[4] = style;
		$[5] = t1;
	} else t1 = $[5];
	let t2;
	if ($[6] !== Component || $[7] !== props || $[8] !== t1) {
		t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {
			...props,
			style: t1
		});
		$[6] = Component;
		$[7] = props;
		$[8] = t1;
		$[9] = t2;
	} else t2 = $[9];
	return t2;
}
//#endregion
//#region src/components/spreadsheet/CellValue.tsx
function CellValue(t0) {
	const $ = (0, import_compiler_runtime.c)(11);
	let binding;
	let children;
	let props;
	let type;
	if ($[0] !== t0) {
		({type, binding, children, ...props} = t0);
		$[0] = t0;
		$[1] = binding;
		$[2] = children;
		$[3] = props;
		$[4] = type;
	} else {
		binding = $[1];
		children = $[2];
		props = $[3];
		type = $[4];
	}
	const { fullSheetName } = useSheetName(binding);
	const sheetValue = useSheetValue(binding);
	let t1;
	if ($[5] !== children || $[6] !== fullSheetName || $[7] !== props || $[8] !== sheetValue || $[9] !== type) {
		t1 = typeof children === "function" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: children({
			type,
			name: fullSheetName,
			value: sheetValue
		}) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CellValueText, {
			type,
			name: fullSheetName,
			value: sheetValue,
			...props
		});
		$[5] = children;
		$[6] = fullSheetName;
		$[7] = props;
		$[8] = sheetValue;
		$[9] = type;
		$[10] = t1;
	} else t1 = $[10];
	return t1;
}
var PRIVACY_FILTER_TYPES = ["financial", "financial-with-sign"];
function CellValueText(t0) {
	const $ = (0, import_compiler_runtime.c)(44);
	let formatter;
	let name;
	let props;
	let style;
	let type;
	let value;
	if ($[0] !== t0) {
		({type, name, value, formatter, style, ...props} = t0);
		$[0] = t0;
		$[1] = formatter;
		$[2] = name;
		$[3] = props;
		$[4] = style;
		$[5] = type;
		$[6] = value;
	} else {
		formatter = $[1];
		name = $[2];
		props = $[3];
		style = $[4];
		type = $[5];
		value = $[6];
	}
	const format = useFormat();
	const isFinancial = type === "financial" || type === "financial-with-sign" || type === "financial-no-decimals";
	let t1;
	if ($[7] !== name || $[8] !== props || $[9] !== style) {
		t1 = {
			style,
			"data-testid": name,
			"data-cellname": name,
			...props
		};
		$[7] = name;
		$[8] = props;
		$[9] = style;
		$[10] = t1;
	} else t1 = $[10];
	const sharedProps = t1;
	if (isFinancial) {
		let t2;
		if ($[11] !== style) {
			t2 = {
				whiteSpace: "nowrap",
				...style
			};
			$[11] = style;
			$[12] = t2;
		} else t2 = $[12];
		let t3;
		if ($[13] !== type) {
			t3 = PRIVACY_FILTER_TYPES.includes(type);
			$[13] = type;
			$[14] = t3;
		} else t3 = $[14];
		let t4;
		if ($[15] !== t3) {
			t4 = [t3];
			$[15] = t3;
			$[16] = t4;
		} else t4 = $[16];
		let t5;
		if ($[17] !== format || $[18] !== formatter || $[19] !== type || $[20] !== value) {
			t5 = formatter ? formatter(value, type) : format(value, type);
			$[17] = format;
			$[18] = formatter;
			$[19] = type;
			$[20] = value;
			$[21] = t5;
		} else t5 = $[21];
		let t6;
		if ($[22] !== t4 || $[23] !== t5) {
			t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PrivacyFilter, {
				activationFilters: t4,
				children: t5
			});
			$[22] = t4;
			$[23] = t5;
			$[24] = t6;
		} else t6 = $[24];
		let t7;
		if ($[25] !== sharedProps || $[26] !== t2 || $[27] !== t6) {
			t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FinancialText, {
				...sharedProps,
				style: t2,
				children: t6
			});
			$[25] = sharedProps;
			$[26] = t2;
			$[27] = t6;
			$[28] = t7;
		} else t7 = $[28];
		return t7;
	}
	let t2;
	if ($[29] !== type) {
		t2 = PRIVACY_FILTER_TYPES.includes(type);
		$[29] = type;
		$[30] = t2;
	} else t2 = $[30];
	let t3;
	if ($[31] !== t2) {
		t3 = [t2];
		$[31] = t2;
		$[32] = t3;
	} else t3 = $[32];
	let t4;
	if ($[33] !== format || $[34] !== formatter || $[35] !== type || $[36] !== value) {
		t4 = formatter ? formatter(value, type) : format(value, type);
		$[33] = format;
		$[34] = formatter;
		$[35] = type;
		$[36] = value;
		$[37] = t4;
	} else t4 = $[37];
	let t5;
	if ($[38] !== t3 || $[39] !== t4) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PrivacyFilter, {
			activationFilters: t3,
			children: t4
		});
		$[38] = t3;
		$[39] = t4;
		$[40] = t5;
	} else t5 = $[40];
	let t6;
	if ($[41] !== sharedProps || $[42] !== t5) {
		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
			...sharedProps,
			children: t5
		});
		$[41] = sharedProps;
		$[42] = t5;
		$[43] = t6;
	} else t6 = $[43];
	return t6;
}
//#endregion
//#region ../component-library/src/Tooltip.tsx
var Tooltip = ({ children, content, triggerProps = {}, disablePointerEvents = false, ...props }) => {
	const triggerRef = (0, import_react.useRef)(null);
	const [isHovered, setIsHover] = (0, import_react.useState)(false);
	const hoverTimeoutRef = (0, import_react.useRef)(null);
	const closeTimeoutRef = (0, import_react.useRef)(null);
	const handlePointerEnter = (0, import_react.useCallback)(() => {
		if (closeTimeoutRef.current) clearTimeout(closeTimeoutRef.current);
		hoverTimeoutRef.current = setTimeout(() => {
			setIsHover(true);
		}, triggerProps.delay ?? 300);
	}, [triggerProps.delay]);
	const handlePointerLeave = (0, import_react.useCallback)(() => {
		if (hoverTimeoutRef.current) clearTimeout(hoverTimeoutRef.current);
		closeTimeoutRef.current = setTimeout(() => {
			setIsHover(false);
		}, triggerProps.closeDelay ?? 0);
	}, [triggerProps.closeDelay]);
	(0, import_react.useEffect)(() => {
		setIsHover(false);
	}, [triggerProps.isDisabled]);
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
		style: {
			minHeight: "auto",
			flexShrink: 0,
			maxWidth: "100%"
		},
		ref: triggerRef,
		onMouseEnter: handlePointerEnter,
		onMouseLeave: handlePointerLeave,
		children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)($4e3b923658d69c60$export$8c610744efcf8a1d, {
			isOpen: isHovered && !triggerProps.isDisabled,
			...triggerProps,
			children: [children, /* @__PURE__ */ (0, import_jsx_runtime.jsx)($4e3b923658d69c60$export$28c660c63b792dea, {
				triggerRef,
				style: {
					...styles.tooltip,
					...disablePointerEvents && { pointerEvents: "none" }
				},
				...props,
				children: content
			})]
		})
	});
};
//#endregion
//#region src/components/mobile/MobileForms.tsx
function FieldLabel(t0) {
	const $ = (0, import_compiler_runtime.c)(6);
	const { title, flush, style } = t0;
	const t1 = flush ? 0 : 25;
	let t2;
	if ($[0] !== style || $[1] !== t1) {
		t2 = {
			marginBottom: 5,
			marginTop: t1,
			fontSize: 14,
			color: theme.tableRowHeaderText,
			padding: `0 ${styles.mobileEditingPadding}px`,
			userSelect: "none",
			...style
		};
		$[0] = style;
		$[1] = t1;
		$[2] = t2;
	} else t2 = $[2];
	let t3;
	if ($[3] !== t2 || $[4] !== title) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
			style: t2,
			children: title
		});
		$[3] = t2;
		$[4] = title;
		$[5] = t3;
	} else t3 = $[5];
	return t3;
}
var valueStyle = {
	borderWidth: 1,
	borderColor: theme.formInputBorder,
	marginLeft: 8,
	marginRight: 8,
	height: styles.mobileMinHeight
};
var hideNativeDateIconClassName = css({ "&::-webkit-calendar-picker-indicator": { display: "none" } });
function InputField(t0) {
	const $ = (0, import_compiler_runtime.c)(40);
	let className;
	let disabled;
	let icon;
	let onUpdate;
	let props;
	let ref;
	let style;
	if ($[0] !== t0) {
		({disabled, style, onUpdate, icon, className, ref, ...props} = t0);
		$[0] = t0;
		$[1] = className;
		$[2] = disabled;
		$[3] = icon;
		$[4] = onUpdate;
		$[5] = props;
		$[6] = ref;
		$[7] = style;
	} else {
		className = $[1];
		disabled = $[2];
		icon = $[3];
		onUpdate = $[4];
		props = $[5];
		ref = $[6];
		style = $[7];
	}
	if (icon) {
		const t1 = disabled ? theme.formInputTextReadOnlySelection : theme.tableBackground;
		let t2;
		if ($[8] !== t1) {
			t2 = {
				...valueStyle,
				flexDirection: "row",
				alignItems: "center",
				paddingLeft: 8,
				gap: 8,
				backgroundColor: t1
			};
			$[8] = t1;
			$[9] = t2;
		} else t2 = $[9];
		let t3;
		if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
			t3 = {
				color: theme.pageTextSubdued,
				flexShrink: 0
			};
			$[10] = t3;
		} else t3 = $[10];
		let t4;
		if ($[11] !== icon) {
			t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
				style: t3,
				children: icon
			});
			$[11] = icon;
			$[12] = t4;
		} else t4 = $[12];
		const t5 = disabled ? theme.tableTextInactive : theme.tableText;
		let t6;
		if ($[13] !== style || $[14] !== t5) {
			t6 = {
				flex: 1,
				border: "none",
				backgroundColor: "transparent",
				height: "100%",
				padding: 0,
				color: t5,
				...style
			};
			$[13] = style;
			$[14] = t5;
			$[15] = t6;
		} else t6 = $[15];
		let t7;
		if ($[16] !== className) {
			t7 = (renderProps) => cx(hideNativeDateIconClassName, typeof className === "function" ? className(renderProps) : className);
			$[16] = className;
			$[17] = t7;
		} else t7 = $[17];
		let t8;
		if ($[18] !== disabled || $[19] !== onUpdate || $[20] !== props || $[21] !== ref || $[22] !== t6 || $[23] !== t7) {
			t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
				ref,
				autoCorrect: "false",
				autoCapitalize: "none",
				disabled,
				onUpdate,
				style: t6,
				...props,
				className: t7
			});
			$[18] = disabled;
			$[19] = onUpdate;
			$[20] = props;
			$[21] = ref;
			$[22] = t6;
			$[23] = t7;
			$[24] = t8;
		} else t8 = $[24];
		let t9;
		if ($[25] !== t2 || $[26] !== t4 || $[27] !== t8) {
			t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
				style: t2,
				children: [t4, t8]
			});
			$[25] = t2;
			$[26] = t4;
			$[27] = t8;
			$[28] = t9;
		} else t9 = $[28];
		return t9;
	}
	const t1 = disabled ? theme.tableTextInactive : theme.tableText;
	const t2 = disabled ? theme.formInputTextReadOnlySelection : theme.tableBackground;
	let t3;
	if ($[29] !== style || $[30] !== t1 || $[31] !== t2) {
		t3 = {
			...valueStyle,
			...style,
			color: t1,
			backgroundColor: t2
		};
		$[29] = style;
		$[30] = t1;
		$[31] = t2;
		$[32] = t3;
	} else t3 = $[32];
	let t4;
	if ($[33] !== className || $[34] !== disabled || $[35] !== onUpdate || $[36] !== props || $[37] !== ref || $[38] !== t3) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
			ref,
			autoCorrect: "false",
			autoCapitalize: "none",
			disabled,
			onUpdate,
			className,
			style: t3,
			...props
		});
		$[33] = className;
		$[34] = disabled;
		$[35] = onUpdate;
		$[36] = props;
		$[37] = ref;
		$[38] = t3;
		$[39] = t4;
	} else t4 = $[39];
	return t4;
}
InputField.displayName = "InputField";
var defaultTapFieldClassName = () => css({
	...valueStyle,
	flexDirection: "row",
	alignItems: "center",
	backgroundColor: theme.tableBackground,
	"&[data-disabled]": { backgroundColor: theme.formInputTextReadOnlySelection },
	"&[data-pressed]": {
		opacity: .5,
		boxShadow: "none"
	},
	"&[data-hovered]": { boxShadow: "none" }
});
function TapField(t0) {
	const $ = (0, import_compiler_runtime.c)(26);
	let alwaysShowRightContent;
	let children;
	let className;
	let icon;
	let placeholder;
	let props;
	let ref;
	let rightContent;
	let textStyle;
	let value;
	if ($[0] !== t0) {
		({value, children, className, icon, placeholder, rightContent, alwaysShowRightContent, textStyle, ref, ...props} = t0);
		$[0] = t0;
		$[1] = alwaysShowRightContent;
		$[2] = children;
		$[3] = className;
		$[4] = icon;
		$[5] = placeholder;
		$[6] = props;
		$[7] = ref;
		$[8] = rightContent;
		$[9] = textStyle;
		$[10] = value;
	} else {
		alwaysShowRightContent = $[1];
		children = $[2];
		className = $[3];
		icon = $[4];
		placeholder = $[5];
		props = $[6];
		ref = $[7];
		rightContent = $[8];
		textStyle = $[9];
		value = $[10];
	}
	const showPlaceholder = !value && !!placeholder;
	let t1;
	if ($[11] !== className) {
		t1 = (renderProps) => cx(defaultTapFieldClassName(), typeof className === "function" ? className(renderProps) : className);
		$[11] = className;
		$[12] = t1;
	} else t1 = $[12];
	let t2;
	if ($[13] !== children || $[14] !== icon || $[15] !== placeholder || $[16] !== showPlaceholder || $[17] !== textStyle || $[18] !== value) {
		t2 = children ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: {
				color: theme.pageTextSubdued,
				marginRight: 8,
				flexShrink: 0
			},
			children: icon
		}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
			style: {
				flex: 1,
				userSelect: "none",
				textAlign: "left",
				color: showPlaceholder ? theme.formInputTextPlaceholder : void 0,
				...textStyle
			},
			children: showPlaceholder ? placeholder : value
		})] });
		$[13] = children;
		$[14] = icon;
		$[15] = placeholder;
		$[16] = showPlaceholder;
		$[17] = textStyle;
		$[18] = value;
		$[19] = t2;
	} else t2 = $[19];
	const t3 = (!props.isDisabled || alwaysShowRightContent) && rightContent;
	let t4;
	if ($[20] !== props || $[21] !== ref || $[22] !== t1 || $[23] !== t2 || $[24] !== t3) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button, {
			ref,
			bounce: false,
			className: t1,
			...props,
			children: [t2, t3]
		});
		$[20] = props;
		$[21] = ref;
		$[22] = t1;
		$[23] = t2;
		$[24] = t3;
		$[25] = t4;
	} else t4 = $[25];
	return t4;
}
TapField.displayName = "TapField";
function ToggleField(t0) {
	const $ = (0, import_compiler_runtime.c)(9);
	const { id, isOn, onToggle, style, className, isDisabled: t1 } = t0;
	const isDisabled = t1 === void 0 ? false : t1;
	let t2;
	if ($[0] !== className) {
		t2 = css([{
			"& [data-toggle-container]": {
				width: 50,
				height: 24
			},
			"& [data-toggle]": {
				width: 20,
				height: 20
			}
		}, className]);
		$[0] = className;
		$[1] = t2;
	} else t2 = $[1];
	const t3 = String(t2);
	let t4;
	if ($[2] !== id || $[3] !== isDisabled || $[4] !== isOn || $[5] !== onToggle || $[6] !== style || $[7] !== t3) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Toggle, {
			id,
			isOn,
			isDisabled,
			onToggle,
			style,
			className: t3
		});
		$[2] = id;
		$[3] = isDisabled;
		$[4] = isOn;
		$[5] = onToggle;
		$[6] = style;
		$[7] = t3;
		$[8] = t4;
	} else t4 = $[8];
	return t4;
}
//#endregion
//#region ../component-library/src/Select.tsx
function isValueOption(option) {
	return option !== Menu.line;
}
/**
* @param {Array<[string, string]>} options - An array of options value-label pairs.
* @param {string} value - The currently selected option value.
* @param {string} [defaultLabel] - The label to display when the selected value is not in the options.
* @param {function} [onChange] - A callback function invoked when the selected value changes.
* @param {CSSProperties} [style] - Custom styles to apply to the selected button.
* @param {string[]} [disabledKeys] - An array of option values to disable.
*
* @example
* // Usage:
* // <Select options={[['1', 'Option 1'], ['2', 'Option 2']]} value="1" onChange={handleOnChange} />
* // <Select options={[['1', 'Option 1'], ['2', 'Option 2']]} value="3" defaultLabel="Select an option"  onChange={handleOnChange} />
*/
function Select({ id, bare, options, value, defaultLabel = "", onChange, disabled = false, disabledKeys = [], style = {}, popoverStyle = {}, className }) {
	const targetOption = options.filter(isValueOption).find((option) => option[0] === value);
	const triggerRef = (0, import_react.useRef)(null);
	const [isOpen, setIsOpen] = (0, import_react.useState)(false);
	return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
		ref: triggerRef,
		id,
		variant: bare ? "bare" : "normal",
		isDisabled: disabled,
		onPress: () => {
			setIsOpen(true);
		},
		style,
		className,
		children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: {
				flexDirection: "row",
				alignItems: "center",
				justifyContent: "space-between",
				gap: 5,
				width: "100%"
			},
			children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
				style: {
					textAlign: "left",
					overflow: "hidden",
					textOverflow: "ellipsis",
					whiteSpace: "nowrap",
					width: "calc(100% - 7px)"
				},
				children: targetOption ? targetOption[1] : defaultLabel
			}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgExpandArrow, { style: {
				width: 7,
				height: 7,
				color: "inherit"
			} })]
		})
	}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Popover, {
		triggerRef,
		placement: "bottom start",
		isOpen,
		onOpenChange: () => setIsOpen(false),
		style: popoverStyle,
		children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Menu, {
			onMenuSelect: (item) => {
				onChange?.(item);
				setIsOpen(false);
			},
			items: options.map((item) => item === Menu.line ? Menu.line : {
				name: item[0],
				text: item[1],
				disabled: disabledKeys.includes(item[0])
			}),
			getItemStyle: (option) => {
				if (targetOption && targetOption[0] === option.name) return { fontWeight: "bold" };
				return {};
			}
		})
	})] });
}
//#endregion
//#region src/transactions/queries.ts
var transactionQueries = {
	all: () => ["transactions"],
	aql: ({ query, pageSize = 50 }) => infiniteQueryOptions({
		queryKey: [
			...transactionQueries.all(),
			"aql",
			query,
			pageSize
		],
		queryFn: async ({ pageParam }) => {
			if (!query) throw new Error("No query provided.");
			const { data } = await aqlQuery(query.offset(pageParam * pageSize).limit(pageSize));
			return data;
		},
		placeholderData: keepPreviousData,
		initialPageParam: 0,
		getNextPageParam: (lastPage, pages) => {
			return lastPage.length < pageSize ? void 0 : pages.length;
		},
		enabled: !!query
	})
};
//#endregion
//#region src/hooks/useTransactions.ts
function useTransactions({ query, options }) {
	const { pageSize = 50, calculateRunningBalances = false, startingBalance, refetchOnSync = true } = options ?? {};
	const [runningBalances, setRunningBalances] = (0, import_react.useState)(/* @__PURE__ */ new Map());
	const queryResult = useInfiniteQuery(transactionQueries.aql({
		query,
		pageSize
	}));
	const onSyncEvent = (0, import_react.useEffectEvent)((event) => {
		if (event.type === "applied") {
			const tables = event.tables;
			if (tables.includes("transactions") || tables.includes("category_mapping") || tables.includes("payee_mapping")) queryResult.refetch();
		}
	});
	(0, import_react.useEffect)(() => {
		if (!refetchOnSync) return;
		return listen("sync-event", onSyncEvent);
	}, [refetchOnSync]);
	const calculateRunningBalancesOptionFn = getCalculateRunningBalancesFn(calculateRunningBalances);
	const splitsOption = query?.state.tableOptions?.splits;
	(0, import_react.useEffect)(() => {
		if (calculateRunningBalancesOptionFn) {
			if (queryResult.isSuccess) setRunningBalances(calculateRunningBalancesOptionFn(flattenPages(queryResult.data), splitsOption, startingBalance));
		} else setRunningBalances(/* @__PURE__ */ new Map());
	}, [
		queryResult.data,
		queryResult.isSuccess,
		calculateRunningBalancesOptionFn,
		startingBalance,
		splitsOption
	]);
	return {
		...queryResult,
		transactions: flattenPages(queryResult.data),
		runningBalances
	};
}
function getCalculateRunningBalancesFn(calculateRunningBalances = false) {
	return calculateRunningBalances === true ? calculateRunningBalancesBottomUp : typeof calculateRunningBalances === "function" ? calculateRunningBalances : void 0;
}
function calculateRunningBalancesBottomUp(transactions, splits, startingBalance = 0) {
	return transactions.filter((t) => {
		switch (splits) {
			case "all": return !t.parent_id;
			default: return true;
		}
	}).reduceRight((acc, transaction, index, arr) => {
		const previousTransactionIndex = index + 1;
		if (previousTransactionIndex >= arr.length) {
			acc.set(transaction.id, startingBalance + transaction.amount);
			return acc;
		}
		const previousTransaction = arr[previousTransactionIndex];
		const currentRunningBalance = (acc.get(previousTransaction.id) ?? 0) + transaction.amount;
		acc.set(transaction.id, currentRunningBalance);
		return acc;
	}, /* @__PURE__ */ new Map());
}
function calculateRunningBalancesTopDown(transactions, splits, startingBalance = 0) {
	return transactions.filter((t) => {
		switch (splits) {
			case "all": return !t.parent_id;
			default: return true;
		}
	}).reduce((acc, transaction, index, arr) => {
		if (index === 0) {
			acc.set(transaction.id, startingBalance);
			return acc;
		}
		if (index === arr.length - 1) {
			acc.set(transaction.id, transaction.amount);
			return acc;
		}
		const previousTransaction = arr[index - 1];
		const currentRunningBalance = (acc.get(previousTransaction.id) ?? 0) - (previousTransaction.amount ?? 0);
		acc.set(transaction.id, currentRunningBalance);
		return acc;
	}, /* @__PURE__ */ new Map());
}
function flattenPages(data) {
	return data ? data.pages.flat() : [];
}
//#endregion
//#region src/hooks/useAccount.ts
function useAccount(id) {
	return useQuery$1({
		...accountQueries.list(),
		select: (data) => data.find((c) => c.id === id)
	}).data;
}
//#endregion
//#region ../../node_modules/@use-gesture/core/dist/maths-0ab39ae9.esm.js
function clamp(v, min, max) {
	return Math.max(min, Math.min(v, max));
}
var V = {
	toVector(v, fallback) {
		if (v === void 0) v = fallback;
		return Array.isArray(v) ? v : [v, v];
	},
	add(v1, v2) {
		return [v1[0] + v2[0], v1[1] + v2[1]];
	},
	sub(v1, v2) {
		return [v1[0] - v2[0], v1[1] - v2[1]];
	},
	addTo(v1, v2) {
		v1[0] += v2[0];
		v1[1] += v2[1];
	},
	subTo(v1, v2) {
		v1[0] -= v2[0];
		v1[1] -= v2[1];
	}
};
function rubberband(distance, dimension, constant) {
	if (dimension === 0 || Math.abs(dimension) === Infinity) return Math.pow(distance, constant * 5);
	return distance * dimension * constant / (dimension + constant * distance);
}
function rubberbandIfOutOfBounds(position, min, max, constant = .15) {
	if (constant === 0) return clamp(position, min, max);
	if (position < min) return -rubberband(min - position, max - min, constant) + min;
	if (position > max) return +rubberband(position - max, max - min, constant) + max;
	return position;
}
function computeRubberband(bounds, [Vx, Vy], [Rx, Ry]) {
	const [[X0, X1], [Y0, Y1]] = bounds;
	return [rubberbandIfOutOfBounds(Vx, X0, X1, Rx), rubberbandIfOutOfBounds(Vy, Y0, Y1, Ry)];
}
//#endregion
//#region ../../node_modules/@use-gesture/core/dist/actions-fe213e88.esm.js
function _toPrimitive(input, hint) {
	if (typeof input !== "object" || input === null) return input;
	var prim = input[Symbol.toPrimitive];
	if (prim !== void 0) {
		var res = prim.call(input, hint || "default");
		if (typeof res !== "object") return res;
		throw new TypeError("@@toPrimitive must return a primitive value.");
	}
	return (hint === "string" ? String : Number)(input);
}
function _toPropertyKey(arg) {
	var key = _toPrimitive(arg, "string");
	return typeof key === "symbol" ? key : String(key);
}
function _defineProperty(obj, key, value) {
	key = _toPropertyKey(key);
	if (key in obj) Object.defineProperty(obj, key, {
		value,
		enumerable: true,
		configurable: true,
		writable: true
	});
	else obj[key] = value;
	return obj;
}
function ownKeys(e, r) {
	var t = Object.keys(e);
	if (Object.getOwnPropertySymbols) {
		var o = Object.getOwnPropertySymbols(e);
		r && (o = o.filter(function(r) {
			return Object.getOwnPropertyDescriptor(e, r).enumerable;
		})), t.push.apply(t, o);
	}
	return t;
}
function _objectSpread2(e) {
	for (var r = 1; r < arguments.length; r++) {
		var t = null != arguments[r] ? arguments[r] : {};
		r % 2 ? ownKeys(Object(t), !0).forEach(function(r) {
			_defineProperty(e, r, t[r]);
		}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
			Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
		});
	}
	return e;
}
var EVENT_TYPE_MAP = {
	pointer: {
		start: "down",
		change: "move",
		end: "up"
	},
	mouse: {
		start: "down",
		change: "move",
		end: "up"
	},
	touch: {
		start: "start",
		change: "move",
		end: "end"
	},
	gesture: {
		start: "start",
		change: "change",
		end: "end"
	}
};
function capitalize(string) {
	if (!string) return "";
	return string[0].toUpperCase() + string.slice(1);
}
var actionsWithoutCaptureSupported = ["enter", "leave"];
function hasCapture(capture = false, actionKey) {
	return capture && !actionsWithoutCaptureSupported.includes(actionKey);
}
function toHandlerProp(device, action = "", capture = false) {
	const deviceProps = EVENT_TYPE_MAP[device];
	const actionKey = deviceProps ? deviceProps[action] || action : action;
	return "on" + capitalize(device) + capitalize(actionKey) + (hasCapture(capture, actionKey) ? "Capture" : "");
}
var pointerCaptureEvents = ["gotpointercapture", "lostpointercapture"];
function parseProp(prop) {
	let eventKey = prop.substring(2).toLowerCase();
	const passive = !!~eventKey.indexOf("passive");
	if (passive) eventKey = eventKey.replace("passive", "");
	const captureKey = pointerCaptureEvents.includes(eventKey) ? "capturecapture" : "capture";
	const capture = !!~eventKey.indexOf(captureKey);
	if (capture) eventKey = eventKey.replace("capture", "");
	return {
		device: eventKey,
		capture,
		passive
	};
}
function toDomEventType(device, action = "") {
	const deviceProps = EVENT_TYPE_MAP[device];
	return device + (deviceProps ? deviceProps[action] || action : action);
}
function isTouch(event) {
	return "touches" in event;
}
function getPointerType(event) {
	if (isTouch(event)) return "touch";
	if ("pointerType" in event) return event.pointerType;
	return "mouse";
}
function getCurrentTargetTouchList(event) {
	return Array.from(event.touches).filter((e) => {
		var _event$currentTarget, _event$currentTarget$;
		return e.target === event.currentTarget || ((_event$currentTarget = event.currentTarget) === null || _event$currentTarget === void 0 || (_event$currentTarget$ = _event$currentTarget.contains) === null || _event$currentTarget$ === void 0 ? void 0 : _event$currentTarget$.call(_event$currentTarget, e.target));
	});
}
function getTouchList(event) {
	return event.type === "touchend" || event.type === "touchcancel" ? event.changedTouches : event.targetTouches;
}
function getValueEvent(event) {
	return isTouch(event) ? getTouchList(event)[0] : event;
}
function touchIds(event) {
	return getCurrentTargetTouchList(event).map((touch) => touch.identifier);
}
function pointerId(event) {
	const valueEvent = getValueEvent(event);
	return isTouch(event) ? valueEvent.identifier : valueEvent.pointerId;
}
function pointerValues(event) {
	const valueEvent = getValueEvent(event);
	return [valueEvent.clientX, valueEvent.clientY];
}
function getEventDetails(event) {
	const payload = {};
	if ("buttons" in event) payload.buttons = event.buttons;
	if ("shiftKey" in event) {
		const { shiftKey, altKey, metaKey, ctrlKey } = event;
		Object.assign(payload, {
			shiftKey,
			altKey,
			metaKey,
			ctrlKey
		});
	}
	return payload;
}
function call(v, ...args) {
	if (typeof v === "function") return v(...args);
	else return v;
}
function noop$1() {}
function chain(...fns) {
	if (fns.length === 0) return noop$1;
	if (fns.length === 1) return fns[0];
	return function() {
		let result;
		for (const fn of fns) result = fn.apply(this, arguments) || result;
		return result;
	};
}
function assignDefault(value, fallback) {
	return Object.assign({}, fallback, value || {});
}
var BEFORE_LAST_KINEMATICS_DELAY = 32;
var Engine = class {
	constructor(ctrl, args, key) {
		this.ctrl = ctrl;
		this.args = args;
		this.key = key;
		if (!this.state) {
			this.state = {};
			this.computeValues([0, 0]);
			this.computeInitial();
			if (this.init) this.init();
			this.reset();
		}
	}
	get state() {
		return this.ctrl.state[this.key];
	}
	set state(state) {
		this.ctrl.state[this.key] = state;
	}
	get shared() {
		return this.ctrl.state.shared;
	}
	get eventStore() {
		return this.ctrl.gestureEventStores[this.key];
	}
	get timeoutStore() {
		return this.ctrl.gestureTimeoutStores[this.key];
	}
	get config() {
		return this.ctrl.config[this.key];
	}
	get sharedConfig() {
		return this.ctrl.config.shared;
	}
	get handler() {
		return this.ctrl.handlers[this.key];
	}
	reset() {
		const { state, shared, ingKey, args } = this;
		shared[ingKey] = state._active = state.active = state._blocked = state._force = false;
		state._step = [false, false];
		state.intentional = false;
		state._movement = [0, 0];
		state._distance = [0, 0];
		state._direction = [0, 0];
		state._delta = [0, 0];
		state._bounds = [[-Infinity, Infinity], [-Infinity, Infinity]];
		state.args = args;
		state.axis = void 0;
		state.memo = void 0;
		state.elapsedTime = state.timeDelta = 0;
		state.direction = [0, 0];
		state.distance = [0, 0];
		state.overflow = [0, 0];
		state._movementBound = [false, false];
		state.velocity = [0, 0];
		state.movement = [0, 0];
		state.delta = [0, 0];
		state.timeStamp = 0;
	}
	start(event) {
		const state = this.state;
		const config = this.config;
		if (!state._active) {
			this.reset();
			this.computeInitial();
			state._active = true;
			state.target = event.target;
			state.currentTarget = event.currentTarget;
			state.lastOffset = config.from ? call(config.from, state) : state.offset;
			state.offset = state.lastOffset;
			state.startTime = state.timeStamp = event.timeStamp;
		}
	}
	computeValues(values) {
		const state = this.state;
		state._values = values;
		state.values = this.config.transform(values);
	}
	computeInitial() {
		const state = this.state;
		state._initial = state._values;
		state.initial = state.values;
	}
	compute(event) {
		const { state, config, shared } = this;
		state.args = this.args;
		let dt = 0;
		if (event) {
			state.event = event;
			if (config.preventDefault && event.cancelable) state.event.preventDefault();
			state.type = event.type;
			shared.touches = this.ctrl.pointerIds.size || this.ctrl.touchIds.size;
			shared.locked = !!document.pointerLockElement;
			Object.assign(shared, getEventDetails(event));
			shared.down = shared.pressed = shared.buttons % 2 === 1 || shared.touches > 0;
			dt = event.timeStamp - state.timeStamp;
			state.timeStamp = event.timeStamp;
			state.elapsedTime = state.timeStamp - state.startTime;
		}
		if (state._active) {
			const _absoluteDelta = state._delta.map(Math.abs);
			V.addTo(state._distance, _absoluteDelta);
		}
		if (this.axisIntent) this.axisIntent(event);
		const [_m0, _m1] = state._movement;
		const [t0, t1] = config.threshold;
		const { _step, values } = state;
		if (config.hasCustomTransform) {
			if (_step[0] === false) _step[0] = Math.abs(_m0) >= t0 && values[0];
			if (_step[1] === false) _step[1] = Math.abs(_m1) >= t1 && values[1];
		} else {
			if (_step[0] === false) _step[0] = Math.abs(_m0) >= t0 && Math.sign(_m0) * t0;
			if (_step[1] === false) _step[1] = Math.abs(_m1) >= t1 && Math.sign(_m1) * t1;
		}
		state.intentional = _step[0] !== false || _step[1] !== false;
		if (!state.intentional) return;
		const movement = [0, 0];
		if (config.hasCustomTransform) {
			const [v0, v1] = values;
			movement[0] = _step[0] !== false ? v0 - _step[0] : 0;
			movement[1] = _step[1] !== false ? v1 - _step[1] : 0;
		} else {
			movement[0] = _step[0] !== false ? _m0 - _step[0] : 0;
			movement[1] = _step[1] !== false ? _m1 - _step[1] : 0;
		}
		if (this.restrictToAxis && !state._blocked) this.restrictToAxis(movement);
		const previousOffset = state.offset;
		const gestureIsActive = state._active && !state._blocked || state.active;
		if (gestureIsActive) {
			state.first = state._active && !state.active;
			state.last = !state._active && state.active;
			state.active = shared[this.ingKey] = state._active;
			if (event) {
				if (state.first) {
					if ("bounds" in config) state._bounds = call(config.bounds, state);
					if (this.setup) this.setup();
				}
				state.movement = movement;
				this.computeOffset();
			}
		}
		const [ox, oy] = state.offset;
		const [[x0, x1], [y0, y1]] = state._bounds;
		state.overflow = [ox < x0 ? -1 : ox > x1 ? 1 : 0, oy < y0 ? -1 : oy > y1 ? 1 : 0];
		state._movementBound[0] = state.overflow[0] ? state._movementBound[0] === false ? state._movement[0] : state._movementBound[0] : false;
		state._movementBound[1] = state.overflow[1] ? state._movementBound[1] === false ? state._movement[1] : state._movementBound[1] : false;
		const rubberband = state._active ? config.rubberband || [0, 0] : [0, 0];
		state.offset = computeRubberband(state._bounds, state.offset, rubberband);
		state.delta = V.sub(state.offset, previousOffset);
		this.computeMovement();
		if (gestureIsActive && (!state.last || dt > BEFORE_LAST_KINEMATICS_DELAY)) {
			state.delta = V.sub(state.offset, previousOffset);
			const absoluteDelta = state.delta.map(Math.abs);
			V.addTo(state.distance, absoluteDelta);
			state.direction = state.delta.map(Math.sign);
			state._direction = state._delta.map(Math.sign);
			if (!state.first && dt > 0) {
				state.velocity = [absoluteDelta[0] / dt, absoluteDelta[1] / dt];
				state.timeDelta = dt;
			}
		}
	}
	emit() {
		const state = this.state;
		const shared = this.shared;
		const config = this.config;
		if (!state._active) this.clean();
		if ((state._blocked || !state.intentional) && !state._force && !config.triggerAllEvents) return;
		const memo = this.handler(_objectSpread2(_objectSpread2(_objectSpread2({}, shared), state), {}, { [this.aliasKey]: state.values }));
		if (memo !== void 0) state.memo = memo;
	}
	clean() {
		this.eventStore.clean();
		this.timeoutStore.clean();
	}
};
function selectAxis([dx, dy], threshold) {
	const absDx = Math.abs(dx);
	const absDy = Math.abs(dy);
	if (absDx > absDy && absDx > threshold) return "x";
	if (absDy > absDx && absDy > threshold) return "y";
}
var CoordinatesEngine = class extends Engine {
	constructor(...args) {
		super(...args);
		_defineProperty(this, "aliasKey", "xy");
	}
	reset() {
		super.reset();
		this.state.axis = void 0;
	}
	init() {
		this.state.offset = [0, 0];
		this.state.lastOffset = [0, 0];
	}
	computeOffset() {
		this.state.offset = V.add(this.state.lastOffset, this.state.movement);
	}
	computeMovement() {
		this.state.movement = V.sub(this.state.offset, this.state.lastOffset);
	}
	axisIntent(event) {
		const state = this.state;
		const config = this.config;
		if (!state.axis && event) {
			const threshold = typeof config.axisThreshold === "object" ? config.axisThreshold[getPointerType(event)] : config.axisThreshold;
			state.axis = selectAxis(state._movement, threshold);
		}
		state._blocked = (config.lockDirection || !!config.axis) && !state.axis || !!config.axis && config.axis !== state.axis;
	}
	restrictToAxis(v) {
		if (this.config.axis || this.config.lockDirection) switch (this.state.axis) {
			case "x":
				v[1] = 0;
				break;
			case "y":
				v[0] = 0;
				break;
		}
	}
};
var identity = (v) => v;
var DEFAULT_RUBBERBAND = .15;
var commonConfigResolver = {
	enabled(value = true) {
		return value;
	},
	eventOptions(value, _k, config) {
		return _objectSpread2(_objectSpread2({}, config.shared.eventOptions), value);
	},
	preventDefault(value = false) {
		return value;
	},
	triggerAllEvents(value = false) {
		return value;
	},
	rubberband(value = 0) {
		switch (value) {
			case true: return [DEFAULT_RUBBERBAND, DEFAULT_RUBBERBAND];
			case false: return [0, 0];
			default: return V.toVector(value);
		}
	},
	from(value) {
		if (typeof value === "function") return value;
		if (value != null) return V.toVector(value);
	},
	transform(value, _k, config) {
		const transform = value || config.shared.transform;
		this.hasCustomTransform = !!transform;
		return transform || identity;
	},
	threshold(value) {
		return V.toVector(value, 0);
	}
};
var DEFAULT_AXIS_THRESHOLD = 0;
var coordinatesConfigResolver = _objectSpread2(_objectSpread2({}, commonConfigResolver), {}, {
	axis(_v, _k, { axis }) {
		this.lockDirection = axis === "lock";
		if (!this.lockDirection) return axis;
	},
	axisThreshold(value = DEFAULT_AXIS_THRESHOLD) {
		return value;
	},
	bounds(value = {}) {
		if (typeof value === "function") return (state) => coordinatesConfigResolver.bounds(value(state));
		if ("current" in value) return () => value.current;
		if (typeof HTMLElement === "function" && value instanceof HTMLElement) return value;
		const { left = -Infinity, right = Infinity, top = -Infinity, bottom = Infinity } = value;
		return [[left, right], [top, bottom]];
	}
});
var KEYS_DELTA_MAP = {
	ArrowRight: (displacement, factor = 1) => [displacement * factor, 0],
	ArrowLeft: (displacement, factor = 1) => [-1 * displacement * factor, 0],
	ArrowUp: (displacement, factor = 1) => [0, -1 * displacement * factor],
	ArrowDown: (displacement, factor = 1) => [0, displacement * factor]
};
var DragEngine = class extends CoordinatesEngine {
	constructor(...args) {
		super(...args);
		_defineProperty(this, "ingKey", "dragging");
	}
	reset() {
		super.reset();
		const state = this.state;
		state._pointerId = void 0;
		state._pointerActive = false;
		state._keyboardActive = false;
		state._preventScroll = false;
		state._delayed = false;
		state.swipe = [0, 0];
		state.tap = false;
		state.canceled = false;
		state.cancel = this.cancel.bind(this);
	}
	setup() {
		const state = this.state;
		if (state._bounds instanceof HTMLElement) {
			const boundRect = state._bounds.getBoundingClientRect();
			const targetRect = state.currentTarget.getBoundingClientRect();
			const _bounds = {
				left: boundRect.left - targetRect.left + state.offset[0],
				right: boundRect.right - targetRect.right + state.offset[0],
				top: boundRect.top - targetRect.top + state.offset[1],
				bottom: boundRect.bottom - targetRect.bottom + state.offset[1]
			};
			state._bounds = coordinatesConfigResolver.bounds(_bounds);
		}
	}
	cancel() {
		const state = this.state;
		if (state.canceled) return;
		state.canceled = true;
		state._active = false;
		setTimeout(() => {
			this.compute();
			this.emit();
		}, 0);
	}
	setActive() {
		this.state._active = this.state._pointerActive || this.state._keyboardActive;
	}
	clean() {
		this.pointerClean();
		this.state._pointerActive = false;
		this.state._keyboardActive = false;
		super.clean();
	}
	pointerDown(event) {
		const config = this.config;
		const state = this.state;
		if (event.buttons != null && (Array.isArray(config.pointerButtons) ? !config.pointerButtons.includes(event.buttons) : config.pointerButtons !== -1 && config.pointerButtons !== event.buttons)) return;
		const ctrlIds = this.ctrl.setEventIds(event);
		if (config.pointerCapture) event.target.setPointerCapture(event.pointerId);
		if (ctrlIds && ctrlIds.size > 1 && state._pointerActive) return;
		this.start(event);
		this.setupPointer(event);
		state._pointerId = pointerId(event);
		state._pointerActive = true;
		this.computeValues(pointerValues(event));
		this.computeInitial();
		if (config.preventScrollAxis && getPointerType(event) !== "mouse") {
			state._active = false;
			this.setupScrollPrevention(event);
		} else if (config.delay > 0) {
			this.setupDelayTrigger(event);
			if (config.triggerAllEvents) {
				this.compute(event);
				this.emit();
			}
		} else this.startPointerDrag(event);
	}
	startPointerDrag(event) {
		const state = this.state;
		state._active = true;
		state._preventScroll = true;
		state._delayed = false;
		this.compute(event);
		this.emit();
	}
	pointerMove(event) {
		const state = this.state;
		const config = this.config;
		if (!state._pointerActive) return;
		const id = pointerId(event);
		if (state._pointerId !== void 0 && id !== state._pointerId) return;
		const _values = pointerValues(event);
		if (document.pointerLockElement === event.target) state._delta = [event.movementX, event.movementY];
		else {
			state._delta = V.sub(_values, state._values);
			this.computeValues(_values);
		}
		V.addTo(state._movement, state._delta);
		this.compute(event);
		if (state._delayed && state.intentional) {
			this.timeoutStore.remove("dragDelay");
			state.active = false;
			this.startPointerDrag(event);
			return;
		}
		if (config.preventScrollAxis && !state._preventScroll) if (state.axis) if (state.axis === config.preventScrollAxis || config.preventScrollAxis === "xy") {
			state._active = false;
			this.clean();
			return;
		} else {
			this.timeoutStore.remove("startPointerDrag");
			this.startPointerDrag(event);
			return;
		}
		else return;
		this.emit();
	}
	pointerUp(event) {
		this.ctrl.setEventIds(event);
		try {
			if (this.config.pointerCapture && event.target.hasPointerCapture(event.pointerId)) event.target.releasePointerCapture(event.pointerId);
		} catch (_unused) {}
		const state = this.state;
		const config = this.config;
		if (!state._active || !state._pointerActive) return;
		const id = pointerId(event);
		if (state._pointerId !== void 0 && id !== state._pointerId) return;
		this.state._pointerActive = false;
		this.setActive();
		this.compute(event);
		const [dx, dy] = state._distance;
		state.tap = dx <= config.tapsThreshold && dy <= config.tapsThreshold;
		if (state.tap && config.filterTaps) state._force = true;
		else {
			const [_dx, _dy] = state._delta;
			const [_mx, _my] = state._movement;
			const [svx, svy] = config.swipe.velocity;
			const [sx, sy] = config.swipe.distance;
			const sdt = config.swipe.duration;
			if (state.elapsedTime < sdt) {
				const _vx = Math.abs(_dx / state.timeDelta);
				const _vy = Math.abs(_dy / state.timeDelta);
				if (_vx > svx && Math.abs(_mx) > sx) state.swipe[0] = Math.sign(_dx);
				if (_vy > svy && Math.abs(_my) > sy) state.swipe[1] = Math.sign(_dy);
			}
		}
		this.emit();
	}
	pointerClick(event) {
		if (!this.state.tap && event.detail > 0) {
			event.preventDefault();
			event.stopPropagation();
		}
	}
	setupPointer(event) {
		const config = this.config;
		const device = config.device;
		if (config.pointerLock) event.currentTarget.requestPointerLock();
		if (!config.pointerCapture) {
			this.eventStore.add(this.sharedConfig.window, device, "change", this.pointerMove.bind(this));
			this.eventStore.add(this.sharedConfig.window, device, "end", this.pointerUp.bind(this));
			this.eventStore.add(this.sharedConfig.window, device, "cancel", this.pointerUp.bind(this));
		}
	}
	pointerClean() {
		if (this.config.pointerLock && document.pointerLockElement === this.state.currentTarget) document.exitPointerLock();
	}
	preventScroll(event) {
		if (this.state._preventScroll && event.cancelable) event.preventDefault();
	}
	setupScrollPrevention(event) {
		this.state._preventScroll = false;
		persistEvent(event);
		const remove = this.eventStore.add(this.sharedConfig.window, "touch", "change", this.preventScroll.bind(this), { passive: false });
		this.eventStore.add(this.sharedConfig.window, "touch", "end", remove);
		this.eventStore.add(this.sharedConfig.window, "touch", "cancel", remove);
		this.timeoutStore.add("startPointerDrag", this.startPointerDrag.bind(this), this.config.preventScrollDelay, event);
	}
	setupDelayTrigger(event) {
		this.state._delayed = true;
		this.timeoutStore.add("dragDelay", () => {
			this.state._step = [0, 0];
			this.startPointerDrag(event);
		}, this.config.delay);
	}
	keyDown(event) {
		const deltaFn = KEYS_DELTA_MAP[event.key];
		if (deltaFn) {
			const state = this.state;
			const factor = event.shiftKey ? 10 : event.altKey ? .1 : 1;
			this.start(event);
			state._delta = deltaFn(this.config.keyboardDisplacement, factor);
			state._keyboardActive = true;
			V.addTo(state._movement, state._delta);
			this.compute(event);
			this.emit();
		}
	}
	keyUp(event) {
		if (!(event.key in KEYS_DELTA_MAP)) return;
		this.state._keyboardActive = false;
		this.setActive();
		this.compute(event);
		this.emit();
	}
	bind(bindFunction) {
		const device = this.config.device;
		bindFunction(device, "start", this.pointerDown.bind(this));
		if (this.config.pointerCapture) {
			bindFunction(device, "change", this.pointerMove.bind(this));
			bindFunction(device, "end", this.pointerUp.bind(this));
			bindFunction(device, "cancel", this.pointerUp.bind(this));
			bindFunction("lostPointerCapture", "", this.pointerUp.bind(this));
		}
		if (this.config.keys) {
			bindFunction("key", "down", this.keyDown.bind(this));
			bindFunction("key", "up", this.keyUp.bind(this));
		}
		if (this.config.filterTaps) bindFunction("click", "", this.pointerClick.bind(this), {
			capture: true,
			passive: false
		});
	}
};
function persistEvent(event) {
	"persist" in event && typeof event.persist === "function" && event.persist();
}
var isBrowser = typeof window !== "undefined" && window.document && window.document.createElement;
function supportsTouchEvents() {
	return isBrowser && "ontouchstart" in window;
}
function isTouchScreen() {
	return supportsTouchEvents() || isBrowser && window.navigator.maxTouchPoints > 1;
}
function supportsPointerEvents() {
	return isBrowser && "onpointerdown" in window;
}
function supportsPointerLock() {
	return isBrowser && "exitPointerLock" in window.document;
}
function supportsGestureEvents() {
	try {
		return "constructor" in GestureEvent;
	} catch (e) {
		return false;
	}
}
var SUPPORT = {
	isBrowser,
	gesture: supportsGestureEvents(),
	touch: supportsTouchEvents(),
	touchscreen: isTouchScreen(),
	pointer: supportsPointerEvents(),
	pointerLock: supportsPointerLock()
};
var DEFAULT_PREVENT_SCROLL_DELAY = 250;
var DEFAULT_DRAG_DELAY = 180;
var DEFAULT_SWIPE_VELOCITY = .5;
var DEFAULT_SWIPE_DISTANCE = 50;
var DEFAULT_SWIPE_DURATION = 250;
var DEFAULT_KEYBOARD_DISPLACEMENT = 10;
var DEFAULT_DRAG_AXIS_THRESHOLD = {
	mouse: 0,
	touch: 0,
	pen: 8
};
var dragConfigResolver = _objectSpread2(_objectSpread2({}, coordinatesConfigResolver), {}, {
	device(_v, _k, { pointer: { touch = false, lock = false, mouse = false } = {} }) {
		this.pointerLock = lock && SUPPORT.pointerLock;
		if (SUPPORT.touch && touch) return "touch";
		if (this.pointerLock) return "mouse";
		if (SUPPORT.pointer && !mouse) return "pointer";
		if (SUPPORT.touch) return "touch";
		return "mouse";
	},
	preventScrollAxis(value, _k, { preventScroll }) {
		this.preventScrollDelay = typeof preventScroll === "number" ? preventScroll : preventScroll || preventScroll === void 0 && value ? DEFAULT_PREVENT_SCROLL_DELAY : void 0;
		if (!SUPPORT.touchscreen || preventScroll === false) return void 0;
		return value ? value : preventScroll !== void 0 ? "y" : void 0;
	},
	pointerCapture(_v, _k, { pointer: { capture = true, buttons = 1, keys = true } = {} }) {
		this.pointerButtons = buttons;
		this.keys = keys;
		return !this.pointerLock && this.device === "pointer" && capture;
	},
	threshold(value, _k, { filterTaps = false, tapsThreshold = 3, axis = void 0 }) {
		const threshold = V.toVector(value, filterTaps ? tapsThreshold : axis ? 1 : 0);
		this.filterTaps = filterTaps;
		this.tapsThreshold = tapsThreshold;
		return threshold;
	},
	swipe({ velocity = DEFAULT_SWIPE_VELOCITY, distance = DEFAULT_SWIPE_DISTANCE, duration = DEFAULT_SWIPE_DURATION } = {}) {
		return {
			velocity: this.transform(V.toVector(velocity)),
			distance: this.transform(V.toVector(distance)),
			duration
		};
	},
	delay(value = 0) {
		switch (value) {
			case true: return DEFAULT_DRAG_DELAY;
			case false: return 0;
			default: return value;
		}
	},
	axisThreshold(value) {
		if (!value) return DEFAULT_DRAG_AXIS_THRESHOLD;
		return _objectSpread2(_objectSpread2({}, DEFAULT_DRAG_AXIS_THRESHOLD), value);
	},
	keyboardDisplacement(value = DEFAULT_KEYBOARD_DISPLACEMENT) {
		return value;
	}
});
_objectSpread2(_objectSpread2({}, commonConfigResolver), {}, {
	device(_v, _k, { shared, pointer: { touch = false } = {} }) {
		if (shared.target && !SUPPORT.touch && SUPPORT.gesture) return "gesture";
		if (SUPPORT.touch && touch) return "touch";
		if (SUPPORT.touchscreen) {
			if (SUPPORT.pointer) return "pointer";
			if (SUPPORT.touch) return "touch";
		}
	},
	bounds(_v, _k, { scaleBounds = {}, angleBounds = {} }) {
		const _scaleBounds = (state) => {
			const D = assignDefault(call(scaleBounds, state), {
				min: -Infinity,
				max: Infinity
			});
			return [D.min, D.max];
		};
		const _angleBounds = (state) => {
			const A = assignDefault(call(angleBounds, state), {
				min: -Infinity,
				max: Infinity
			});
			return [A.min, A.max];
		};
		if (typeof scaleBounds !== "function" && typeof angleBounds !== "function") return [_scaleBounds(), _angleBounds()];
		return (state) => [_scaleBounds(state), _angleBounds(state)];
	},
	threshold(value, _k, config) {
		this.lockDirection = config.axis === "lock";
		return V.toVector(value, this.lockDirection ? [.1, 3] : 0);
	},
	modifierKey(value) {
		if (value === void 0) return "ctrlKey";
		return value;
	},
	pinchOnWheel(value = true) {
		return value;
	}
});
_objectSpread2(_objectSpread2({}, coordinatesConfigResolver), {}, { mouseOnly: (value = true) => value });
_objectSpread2(_objectSpread2({}, coordinatesConfigResolver), {}, { mouseOnly: (value = true) => value });
var EngineMap = /* @__PURE__ */ new Map();
var ConfigResolverMap = /* @__PURE__ */ new Map();
function registerAction(action) {
	EngineMap.set(action.key, action.engine);
	ConfigResolverMap.set(action.key, action.resolver);
}
var dragAction = {
	key: "drag",
	engine: DragEngine,
	resolver: dragConfigResolver
};
//#endregion
//#region ../../node_modules/@use-gesture/core/dist/use-gesture-core.esm.js
function _objectWithoutPropertiesLoose(source, excluded) {
	if (source == null) return {};
	var target = {};
	var sourceKeys = Object.keys(source);
	var key, i;
	for (i = 0; i < sourceKeys.length; i++) {
		key = sourceKeys[i];
		if (excluded.indexOf(key) >= 0) continue;
		target[key] = source[key];
	}
	return target;
}
function _objectWithoutProperties(source, excluded) {
	if (source == null) return {};
	var target = _objectWithoutPropertiesLoose(source, excluded);
	var key, i;
	if (Object.getOwnPropertySymbols) {
		var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
		for (i = 0; i < sourceSymbolKeys.length; i++) {
			key = sourceSymbolKeys[i];
			if (excluded.indexOf(key) >= 0) continue;
			if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
			target[key] = source[key];
		}
	}
	return target;
}
var sharedConfigResolver = {
	target(value) {
		if (value) return () => "current" in value ? value.current : value;
	},
	enabled(value = true) {
		return value;
	},
	window(value = SUPPORT.isBrowser ? window : void 0) {
		return value;
	},
	eventOptions({ passive = true, capture = false } = {}) {
		return {
			passive,
			capture
		};
	},
	transform(value) {
		return value;
	}
};
var _excluded$5 = [
	"target",
	"eventOptions",
	"window",
	"enabled",
	"transform"
];
function resolveWith(config = {}, resolvers) {
	const result = {};
	for (const [key, resolver] of Object.entries(resolvers)) switch (typeof resolver) {
		case "function":
			result[key] = resolver.call(result, config[key], key, config);
			break;
		case "object":
			result[key] = resolveWith(config[key], resolver);
			break;
		case "boolean":
			if (resolver) result[key] = config[key];
			break;
	}
	return result;
}
function parse$3(newConfig, gestureKey, _config = {}) {
	const _ref = newConfig, { target, eventOptions, window, enabled, transform } = _ref, rest = _objectWithoutProperties(_ref, _excluded$5);
	_config.shared = resolveWith({
		target,
		eventOptions,
		window,
		enabled,
		transform
	}, sharedConfigResolver);
	if (gestureKey) {
		const resolver = ConfigResolverMap.get(gestureKey);
		_config[gestureKey] = resolveWith(_objectSpread2({ shared: _config.shared }, rest), resolver);
	} else for (const key in rest) {
		const resolver = ConfigResolverMap.get(key);
		if (resolver) _config[key] = resolveWith(_objectSpread2({ shared: _config.shared }, rest[key]), resolver);
	}
	return _config;
}
var EventStore = class {
	constructor(ctrl, gestureKey) {
		_defineProperty(this, "_listeners", /* @__PURE__ */ new Set());
		this._ctrl = ctrl;
		this._gestureKey = gestureKey;
	}
	add(element, device, action, handler, options) {
		const listeners = this._listeners;
		const type = toDomEventType(device, action);
		const eventOptions = _objectSpread2(_objectSpread2({}, this._gestureKey ? this._ctrl.config[this._gestureKey].eventOptions : {}), options);
		element.addEventListener(type, handler, eventOptions);
		const remove = () => {
			element.removeEventListener(type, handler, eventOptions);
			listeners.delete(remove);
		};
		listeners.add(remove);
		return remove;
	}
	clean() {
		this._listeners.forEach((remove) => remove());
		this._listeners.clear();
	}
};
var TimeoutStore = class {
	constructor() {
		_defineProperty(this, "_timeouts", /* @__PURE__ */ new Map());
	}
	add(key, callback, ms = 140, ...args) {
		this.remove(key);
		this._timeouts.set(key, window.setTimeout(callback, ms, ...args));
	}
	remove(key) {
		const timeout = this._timeouts.get(key);
		if (timeout) window.clearTimeout(timeout);
	}
	clean() {
		this._timeouts.forEach((timeout) => void window.clearTimeout(timeout));
		this._timeouts.clear();
	}
};
var Controller = class {
	constructor(handlers) {
		_defineProperty(this, "gestures", /* @__PURE__ */ new Set());
		_defineProperty(this, "_targetEventStore", new EventStore(this));
		_defineProperty(this, "gestureEventStores", {});
		_defineProperty(this, "gestureTimeoutStores", {});
		_defineProperty(this, "handlers", {});
		_defineProperty(this, "config", {});
		_defineProperty(this, "pointerIds", /* @__PURE__ */ new Set());
		_defineProperty(this, "touchIds", /* @__PURE__ */ new Set());
		_defineProperty(this, "state", { shared: {
			shiftKey: false,
			metaKey: false,
			ctrlKey: false,
			altKey: false
		} });
		resolveGestures(this, handlers);
	}
	setEventIds(event) {
		if (isTouch(event)) {
			this.touchIds = new Set(touchIds(event));
			return this.touchIds;
		} else if ("pointerId" in event) {
			if (event.type === "pointerup" || event.type === "pointercancel") this.pointerIds.delete(event.pointerId);
			else if (event.type === "pointerdown") this.pointerIds.add(event.pointerId);
			return this.pointerIds;
		}
	}
	applyHandlers(handlers, nativeHandlers) {
		this.handlers = handlers;
		this.nativeHandlers = nativeHandlers;
	}
	applyConfig(config, gestureKey) {
		this.config = parse$3(config, gestureKey, this.config);
	}
	clean() {
		this._targetEventStore.clean();
		for (const key of this.gestures) {
			this.gestureEventStores[key].clean();
			this.gestureTimeoutStores[key].clean();
		}
	}
	effect() {
		if (this.config.shared.target) this.bind();
		return () => this._targetEventStore.clean();
	}
	bind(...args) {
		const sharedConfig = this.config.shared;
		const props = {};
		let target;
		if (sharedConfig.target) {
			target = sharedConfig.target();
			if (!target) return;
		}
		if (sharedConfig.enabled) {
			for (const gestureKey of this.gestures) {
				const gestureConfig = this.config[gestureKey];
				const bindFunction = bindToProps(props, gestureConfig.eventOptions, !!target);
				if (gestureConfig.enabled) new (EngineMap.get(gestureKey))(this, args, gestureKey).bind(bindFunction);
			}
			const nativeBindFunction = bindToProps(props, sharedConfig.eventOptions, !!target);
			for (const eventKey in this.nativeHandlers) nativeBindFunction(eventKey, "", (event) => this.nativeHandlers[eventKey](_objectSpread2(_objectSpread2({}, this.state.shared), {}, {
				event,
				args
			})), void 0, true);
		}
		for (const handlerProp in props) props[handlerProp] = chain(...props[handlerProp]);
		if (!target) return props;
		for (const handlerProp in props) {
			const { device, capture, passive } = parseProp(handlerProp);
			this._targetEventStore.add(target, device, "", props[handlerProp], {
				capture,
				passive
			});
		}
	}
};
function setupGesture(ctrl, gestureKey) {
	ctrl.gestures.add(gestureKey);
	ctrl.gestureEventStores[gestureKey] = new EventStore(ctrl, gestureKey);
	ctrl.gestureTimeoutStores[gestureKey] = new TimeoutStore();
}
function resolveGestures(ctrl, internalHandlers) {
	if (internalHandlers.drag) setupGesture(ctrl, "drag");
	if (internalHandlers.wheel) setupGesture(ctrl, "wheel");
	if (internalHandlers.scroll) setupGesture(ctrl, "scroll");
	if (internalHandlers.move) setupGesture(ctrl, "move");
	if (internalHandlers.pinch) setupGesture(ctrl, "pinch");
	if (internalHandlers.hover) setupGesture(ctrl, "hover");
}
var bindToProps = (props, eventOptions, withPassiveOption) => (device, action, handler, options = {}, isNative = false) => {
	var _options$capture, _options$passive;
	const capture = (_options$capture = options.capture) !== null && _options$capture !== void 0 ? _options$capture : eventOptions.capture;
	const passive = (_options$passive = options.passive) !== null && _options$passive !== void 0 ? _options$passive : eventOptions.passive;
	let handlerProp = isNative ? device : toHandlerProp(device, action, capture);
	if (withPassiveOption && passive) handlerProp += "Passive";
	props[handlerProp] = props[handlerProp] || [];
	props[handlerProp].push(handler);
};
//#endregion
//#region ../../node_modules/@use-gesture/react/dist/use-gesture-react.esm.js
function useRecognizers(handlers, config = {}, gestureKey, nativeHandlers) {
	const ctrl = import_react.useMemo(() => new Controller(handlers), []);
	ctrl.applyHandlers(handlers, nativeHandlers);
	ctrl.applyConfig(config, gestureKey);
	import_react.useEffect(ctrl.effect.bind(ctrl));
	import_react.useEffect(() => {
		return ctrl.clean.bind(ctrl);
	}, []);
	if (config.target === void 0) return ctrl.bind.bind(ctrl);
}
function useDrag$1(handler, config) {
	registerAction(dragAction);
	return useRecognizers({ drag: handler }, config || {}, "drag");
}
//#endregion
//#region src/hooks/useSyncServerStatus.ts
function useSyncServerStatus() {
	const serverUrl = useServerURL();
	const userData = useSelector((state) => state.user.data);
	if (!serverUrl) return "no-server";
	return !userData || userData?.offline ? "offline" : "online";
}
//#endregion
//#region src/components/mobile/MobileNavTabs.tsx
var COLUMN_COUNT = 3;
var PILL_HEIGHT = 15;
var ROW_HEIGHT = 70;
var TOTAL_HEIGHT = ROW_HEIGHT * COLUMN_COUNT;
var OPEN_FULL_Y = 1;
var OPEN_DEFAULT_Y = TOTAL_HEIGHT - ROW_HEIGHT;
var HIDDEN_Y = TOTAL_HEIGHT;
var MOBILE_NAV_HEIGHT = ROW_HEIGHT + PILL_HEIGHT;
function MobileNavTabs() {
	const $ = (0, import_compiler_runtime.c)(90);
	const { t } = useTranslation();
	const { isNarrowWidth } = useResponsive();
	const syncServerStatus = useSyncServerStatus();
	const isTestEnv = useIsTestEnv();
	const isUsingServer = syncServerStatus !== "no-server" || isTestEnv;
	const [navbarState, setNavbarState] = (0, import_react.useState)("default");
	let t0;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t0 = {
			flex: `1 1 ${100 / COLUMN_COUNT}%`,
			height: ROW_HEIGHT,
			padding: 10,
			maxWidth: `${100 / COLUMN_COUNT}%`
		};
		$[0] = t0;
	} else t0 = $[0];
	const navTabStyle = t0;
	let t1;
	if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = [];
		$[1] = t1;
	} else t1 = $[1];
	const [t2, api] = useSpring(_temp$14, t1);
	const { y } = t2;
	let t3;
	if ($[2] !== api || $[3] !== isTestEnv) {
		t3 = (t4) => {
			const { canceled } = t4;
			setNavbarState("open");
			api.start({
				to: { y: OPEN_FULL_Y },
				immediate: isTestEnv,
				config: canceled ? config.wobbly : config.stiff
			});
		};
		$[2] = api;
		$[3] = isTestEnv;
		$[4] = t3;
	} else t3 = $[4];
	const openFull = t3;
	let t4;
	if ($[5] !== api || $[6] !== isTestEnv) {
		t4 = (t5) => {
			const velocity = t5 === void 0 ? 0 : t5;
			setNavbarState("default");
			api.start({
				to: { y: OPEN_DEFAULT_Y },
				immediate: isTestEnv,
				config: {
					...config.stiff,
					velocity
				}
			});
		};
		$[5] = api;
		$[6] = isTestEnv;
		$[7] = t4;
	} else t4 = $[7];
	const openDefault = t4;
	let t5;
	if ($[8] !== api || $[9] !== isTestEnv) {
		t5 = (t6) => {
			const velocity_0 = t6 === void 0 ? 0 : t6;
			setNavbarState("hidden");
			api.start({
				to: { y: HIDDEN_Y },
				immediate: isTestEnv,
				config: {
					...config.stiff,
					velocity: velocity_0
				}
			});
		};
		$[8] = api;
		$[9] = isTestEnv;
		$[10] = t5;
	} else t5 = $[10];
	const hide = t5;
	let t6;
	if ($[11] !== t) {
		t6 = t("Budget");
		$[11] = t;
		$[12] = t6;
	} else t6 = $[12];
	let t7;
	if ($[13] !== t6) {
		t7 = {
			name: t6,
			path: "/budget",
			style: navTabStyle,
			Icon: SvgWallet
		};
		$[13] = t6;
		$[14] = t7;
	} else t7 = $[14];
	let t8;
	if ($[15] !== t) {
		t8 = t("Transaction");
		$[15] = t;
		$[16] = t8;
	} else t8 = $[16];
	let t9;
	if ($[17] !== t8) {
		t9 = {
			name: t8,
			path: "/transactions/new",
			style: navTabStyle,
			Icon: SvgAdd
		};
		$[17] = t8;
		$[18] = t9;
	} else t9 = $[18];
	let t10;
	if ($[19] !== t) {
		t10 = t("Accounts");
		$[19] = t;
		$[20] = t10;
	} else t10 = $[20];
	let t11;
	if ($[21] !== t10) {
		t11 = {
			name: t10,
			path: "/accounts",
			style: navTabStyle,
			Icon: SvgPiggyBank
		};
		$[21] = t10;
		$[22] = t11;
	} else t11 = $[22];
	let t12;
	if ($[23] !== t) {
		t12 = t("Reports");
		$[23] = t;
		$[24] = t12;
	} else t12 = $[24];
	let t13;
	if ($[25] !== t12) {
		t13 = {
			name: t12,
			path: "/reports",
			style: navTabStyle,
			Icon: SvgReports
		};
		$[25] = t12;
		$[26] = t13;
	} else t13 = $[26];
	let t14;
	if ($[27] !== t) {
		t14 = t("Schedules");
		$[27] = t;
		$[28] = t14;
	} else t14 = $[28];
	let t15;
	if ($[29] !== t14) {
		t15 = {
			name: t14,
			path: "/schedules",
			style: navTabStyle,
			Icon: SvgCalendar3
		};
		$[29] = t14;
		$[30] = t15;
	} else t15 = $[30];
	let t16;
	if ($[31] !== t) {
		t16 = t("Payees");
		$[31] = t;
		$[32] = t16;
	} else t16 = $[32];
	let t17;
	if ($[33] !== t16) {
		t17 = {
			name: t16,
			path: "/payees",
			style: navTabStyle,
			Icon: SvgStoreFront
		};
		$[33] = t16;
		$[34] = t17;
	} else t17 = $[34];
	let t18;
	if ($[35] !== t) {
		t18 = t("Rules");
		$[35] = t;
		$[36] = t18;
	} else t18 = $[36];
	let t19;
	if ($[37] !== t18) {
		t19 = {
			name: t18,
			path: "/rules",
			style: navTabStyle,
			Icon: SvgTuning
		};
		$[37] = t18;
		$[38] = t19;
	} else t19 = $[38];
	let t20;
	if ($[39] !== isUsingServer || $[40] !== t) {
		t20 = isUsingServer ? [{
			name: t("Bank Sync"),
			path: "/bank-sync",
			style: navTabStyle,
			Icon: SvgCreditCard
		}] : [];
		$[39] = isUsingServer;
		$[40] = t;
		$[41] = t20;
	} else t20 = $[41];
	let t21;
	if ($[42] !== t) {
		t21 = t("Settings");
		$[42] = t;
		$[43] = t21;
	} else t21 = $[43];
	let t22;
	if ($[44] !== t21) {
		t22 = {
			name: t21,
			path: "/settings",
			style: navTabStyle,
			Icon: SvgCog
		};
		$[44] = t21;
		$[45] = t22;
	} else t22 = $[45];
	let t23;
	if ($[46] !== t11 || $[47] !== t13 || $[48] !== t15 || $[49] !== t17 || $[50] !== t19 || $[51] !== t20 || $[52] !== t22 || $[53] !== t7 || $[54] !== t9) {
		t23 = [
			t7,
			t9,
			t11,
			t13,
			t15,
			t17,
			t19,
			...t20,
			t22
		];
		$[46] = t11;
		$[47] = t13;
		$[48] = t15;
		$[49] = t17;
		$[50] = t19;
		$[51] = t20;
		$[52] = t22;
		$[53] = t7;
		$[54] = t9;
		$[55] = t23;
	} else t23 = $[55];
	let t24;
	if ($[56] !== openDefault || $[57] !== t23) {
		t24 = t23.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NavTab, {
			onClick: () => openDefault(),
			...tab
		}, tab.path));
		$[56] = openDefault;
		$[57] = t23;
		$[58] = t24;
	} else t24 = $[58];
	const navTabs = t24;
	const bufferTabsCount = COLUMN_COUNT - navTabs.length % COLUMN_COUNT;
	let t25;
	if ($[59] !== bufferTabsCount) {
		t25 = Array.from({ length: bufferTabsCount }).map((_, idx) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: navTabStyle }, idx));
		$[59] = bufferTabsCount;
		$[60] = t25;
	} else t25 = $[60];
	const bufferTabs = t25;
	let t26;
	if ($[61] !== hide || $[62] !== openDefault) {
		t26 = (t27) => {
			const { isScrolling, hasScrolledToEnd } = t27;
			if (isScrolling("down") && !hasScrolledToEnd("up")) hide();
			else if (isScrolling("up") && !hasScrolledToEnd("down")) openDefault();
		};
		$[61] = hide;
		$[62] = openDefault;
		$[63] = t26;
	} else t26 = $[63];
	useScrollListener(t26);
	let t27;
	if ($[64] !== api || $[65] !== openDefault || $[66] !== openFull) {
		t27 = (t28) => {
			const { last, velocity: t29, direction: t30, offset: t31, cancel, canceled: canceled_0 } = t28;
			const [, vy] = t29;
			const [, dy] = t30;
			const [, oy] = t31;
			if (oy < 0) cancel();
			if (last) if (oy > ROW_HEIGHT * .5 || vy > .5 && dy > 0) openDefault(vy);
			else openFull({ canceled: canceled_0 });
			else api.start({
				to: { y: oy },
				immediate: true
			});
		};
		$[64] = api;
		$[65] = openDefault;
		$[66] = openFull;
		$[67] = t27;
	} else t27 = $[67];
	let t28;
	if ($[68] !== y) {
		t28 = () => [0, y.get()];
		$[68] = y;
		$[69] = t28;
	} else t28 = $[69];
	let t29;
	if ($[70] === Symbol.for("react.memo_cache_sentinel")) {
		t29 = {
			top: -TOTAL_HEIGHT,
			bottom: TOTAL_HEIGHT - ROW_HEIGHT
		};
		$[70] = t29;
	} else t29 = $[70];
	let t30;
	if ($[71] !== t28) {
		t30 = {
			from: t28,
			filterTaps: true,
			bounds: t29,
			axis: "y",
			rubberband: true
		};
		$[71] = t28;
		$[72] = t30;
	} else t30 = $[72];
	const bind = useDrag$1(t27, t30);
	let t31;
	if ($[73] !== bind) {
		t31 = bind();
		$[73] = bind;
		$[74] = t31;
	} else t31 = $[74];
	let t32;
	if ($[75] !== isNarrowWidth) {
		t32 = !isNarrowWidth && { display: "none" };
		$[75] = isNarrowWidth;
		$[76] = t32;
	} else t32 = $[76];
	let t33;
	if ($[77] !== t32 || $[78] !== y) {
		t33 = {
			y,
			touchAction: "pan-x",
			backgroundColor: theme.mobileNavBackground,
			borderTop: `1px solid ${theme.menuBorder}`,
			...styles.shadow,
			height: TOTAL_HEIGHT + PILL_HEIGHT,
			width: "100%",
			position: "fixed",
			zIndex: 100,
			bottom: 0,
			...t32
		};
		$[77] = t32;
		$[78] = y;
		$[79] = t33;
	} else t33 = $[79];
	let t34;
	if ($[80] === Symbol.for("react.memo_cache_sentinel")) {
		t34 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: {
			backgroundColor: theme.pillBorder,
			borderRadius: 10,
			width: 30,
			marginTop: 5,
			marginBottom: 5,
			padding: 2,
			alignSelf: "center"
		} });
		$[80] = t34;
	} else t34 = $[80];
	let t35;
	if ($[81] === Symbol.for("react.memo_cache_sentinel")) {
		t35 = {
			flexDirection: "row",
			flexWrap: "wrap",
			height: TOTAL_HEIGHT,
			width: "100%"
		};
		$[81] = t35;
	} else t35 = $[81];
	let t36;
	if ($[82] !== bufferTabs || $[83] !== navTabs) {
		t36 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, { children: [t34, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t35,
			children: [navTabs, bufferTabs]
		})] });
		$[82] = bufferTabs;
		$[83] = navTabs;
		$[84] = t36;
	} else t36 = $[84];
	let t37;
	if ($[85] !== navbarState || $[86] !== t31 || $[87] !== t33 || $[88] !== t36) {
		t37 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(animated.div, {
			role: "navigation",
			...t31,
			style: t33,
			"data-navbar-state": navbarState,
			children: t36
		});
		$[85] = navbarState;
		$[86] = t31;
		$[87] = t33;
		$[88] = t36;
		$[89] = t37;
	} else t37 = $[89];
	return t37;
}
function _temp$14() {
	return { from: { y: OPEN_DEFAULT_Y } };
}
function NavTab(t0) {
	const $ = (0, import_compiler_runtime.c)(11);
	const { Icon: TabIcon, name, path, style, onClick } = t0;
	let t1;
	if ($[0] !== style) {
		t1 = (t2) => {
			const { isActive } = t2;
			return {
				...styles.noTapHighlight,
				alignItems: "center",
				color: isActive ? theme.mobileNavItemSelected : theme.mobileNavItem,
				display: "flex",
				flexDirection: "column",
				textDecoration: "none",
				textAlign: "center",
				textWrap: "balance",
				userSelect: "none",
				...style
			};
		};
		$[0] = style;
		$[1] = t1;
	} else t1 = $[1];
	let t2;
	if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = { minHeight: "22px" };
		$[2] = t2;
	} else t2 = $[2];
	let t3;
	if ($[3] !== TabIcon) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabIcon, {
			width: 22,
			height: 22,
			style: t2
		});
		$[3] = TabIcon;
		$[4] = t3;
	} else t3 = $[4];
	let t4;
	if ($[5] !== name || $[6] !== onClick || $[7] !== path || $[8] !== t1 || $[9] !== t3) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(NavLink, {
			to: path,
			style: t1,
			onClick,
			children: [t3, name]
		});
		$[5] = name;
		$[6] = onClick;
		$[7] = path;
		$[8] = t1;
		$[9] = t3;
		$[10] = t4;
	} else t4 = $[10];
	return t4;
}
//#endregion
//#region ../loot-core/src/shared/location-utils.ts
/**
* Pure utility functions for location calculations and formatting.
* These functions have no side effects and can be easily tested.
*/
var metersToFeet = 3.28084;
/**
* Calculate the distance between two geographic coordinates using the Haversine formula
* @param pos1 First position coordinates
* @param pos2 Second position coordinates
* @returns Distance in meters
*/
function calculateDistance(pos1, pos2) {
	const R = 6371e3;
	const phi1 = pos1.latitude * Math.PI / 180;
	const phi2 = pos2.latitude * Math.PI / 180;
	const deltaPhi = (pos2.latitude - pos1.latitude) * Math.PI / 180;
	const deltaLambda = (pos2.longitude - pos1.longitude) * Math.PI / 180;
	const a = Math.sin(deltaPhi / 2) * Math.sin(deltaPhi / 2) + Math.cos(phi1) * Math.cos(phi2) * Math.sin(deltaLambda / 2) * Math.sin(deltaLambda / 2);
	return R * (2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)));
}
/**
* Format a distance in meters to a human-readable string
* @param meters Distance in meters
* @returns Formatted distance string
*/
function formatDistance$84(meters) {
	return `${`${Math.round(meters * metersToFeet)}ft`} | ${`${Math.round(meters)}m`}`;
}
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/utils.js
var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
	exports.__esModule = true;
	exports.extend = extend;
	exports.indexOf = indexOf;
	exports.escapeExpression = escapeExpression;
	exports.isEmpty = isEmpty;
	exports.createFrame = createFrame;
	exports.blockParams = blockParams;
	exports.appendContextPath = appendContextPath;
	var escape = {
		"&": "&amp;",
		"<": "&lt;",
		">": "&gt;",
		"\"": "&quot;",
		"'": "&#x27;",
		"`": "&#x60;",
		"=": "&#x3D;"
	};
	var badChars = /[&<>"'`=]/g, possible = /[&<>"'`=]/;
	function escapeChar(chr) {
		return escape[chr];
	}
	function extend(obj) {
		for (var i = 1; i < arguments.length; i++) for (var key in arguments[i]) if (Object.prototype.hasOwnProperty.call(arguments[i], key)) obj[key] = arguments[i][key];
		return obj;
	}
	var toString = Object.prototype.toString;
	exports.toString = toString;
	var isFunction = function isFunction(value) {
		return typeof value === "function";
	};
	/* istanbul ignore next */
	if (isFunction(/x/)) exports.isFunction = isFunction = function(value) {
		return typeof value === "function" && toString.call(value) === "[object Function]";
	};
	exports.isFunction = isFunction;
	/* istanbul ignore next */
	var isArray = Array.isArray || function(value) {
		return value && typeof value === "object" ? toString.call(value) === "[object Array]" : false;
	};
	exports.isArray = isArray;
	function indexOf(array, value) {
		for (var i = 0, len = array.length; i < len; i++) if (array[i] === value) return i;
		return -1;
	}
	function escapeExpression(string) {
		if (typeof string !== "string") {
			if (string && string.toHTML) return string.toHTML();
			else if (string == null) return "";
			else if (!string) return string + "";
			string = "" + string;
		}
		if (!possible.test(string)) return string;
		return string.replace(badChars, escapeChar);
	}
	function isEmpty(value) {
		if (!value && value !== 0) return true;
		else if (isArray(value) && value.length === 0) return true;
		else return false;
	}
	function createFrame(object) {
		var frame = extend({}, object);
		frame._parent = object;
		return frame;
	}
	function blockParams(params, ids) {
		params.path = ids;
		return params;
	}
	function appendContextPath(contextPath, id) {
		return (contextPath ? contextPath + "." : "") + id;
	}
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/exception.js
var require_exception = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	exports.__esModule = true;
	var errorProps = [
		"description",
		"fileName",
		"lineNumber",
		"endLineNumber",
		"message",
		"name",
		"number",
		"stack"
	];
	function Exception(message, node) {
		var loc = node && node.loc, line = void 0, endLineNumber = void 0, column = void 0, endColumn = void 0;
		if (loc) {
			line = loc.start.line;
			endLineNumber = loc.end.line;
			column = loc.start.column;
			endColumn = loc.end.column;
			message += " - " + line + ":" + column;
		}
		var tmp = Error.prototype.constructor.call(this, message);
		for (var idx = 0; idx < errorProps.length; idx++) this[errorProps[idx]] = tmp[errorProps[idx]];
		/* istanbul ignore else */
		if (Error.captureStackTrace) Error.captureStackTrace(this, Exception);
		try {
			if (loc) {
				this.lineNumber = line;
				this.endLineNumber = endLineNumber;
				/* istanbul ignore next */
				if (Object.defineProperty) {
					Object.defineProperty(this, "column", {
						value: column,
						enumerable: true
					});
					Object.defineProperty(this, "endColumn", {
						value: endColumn,
						enumerable: true
					});
				} else {
					this.column = column;
					this.endColumn = endColumn;
				}
			}
		} catch (nop) {}
	}
	Exception.prototype = /* @__PURE__ */ new Error();
	exports["default"] = Exception;
	module.exports = exports["default"];
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js
var require_block_helper_missing = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	exports.__esModule = true;
	var _utils = require_utils();
	exports["default"] = function(instance) {
		instance.registerHelper("blockHelperMissing", function(context, options) {
			var inverse = options.inverse, fn = options.fn;
			if (context === true) return fn(this);
			else if (context === false || context == null) return inverse(this);
			else if (_utils.isArray(context)) if (context.length > 0) {
				if (options.ids) options.ids = [options.name];
				return instance.helpers.each(context, options);
			} else return inverse(this);
			else {
				if (options.data && options.ids) {
					var data = _utils.createFrame(options.data);
					data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name);
					options = { data };
				}
				return fn(context, options);
			}
		});
	};
	module.exports = exports["default"];
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/helpers/each.js
var require_each = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	exports.__esModule = true;
	// istanbul ignore next
	function _interopRequireDefault(obj) {
		return obj && obj.__esModule ? obj : { "default": obj };
	}
	var _utils = require_utils();
	var _exception2 = _interopRequireDefault(require_exception());
	exports["default"] = function(instance) {
		instance.registerHelper("each", function(context, options) {
			if (!options) throw new _exception2["default"]("Must pass iterator to #each");
			var fn = options.fn, inverse = options.inverse, i = 0, ret = "", data = void 0, contextPath = void 0;
			if (options.data && options.ids) contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + ".";
			if (_utils.isFunction(context)) context = context.call(this);
			if (options.data) data = _utils.createFrame(options.data);
			function execIteration(field, index, last) {
				if (data) {
					data.key = field;
					data.index = index;
					data.first = index === 0;
					data.last = !!last;
					if (contextPath) data.contextPath = contextPath + field;
				}
				ret = ret + fn(context[field], {
					data,
					blockParams: _utils.blockParams([context[field], field], [contextPath + field, null])
				});
			}
			if (context && typeof context === "object") if (_utils.isArray(context)) {
				for (var j = context.length; i < j; i++) if (i in context) execIteration(i, i, i === context.length - 1);
			} else if (typeof Symbol === "function" && context[Symbol.iterator]) {
				var newContext = [];
				var iterator = context[Symbol.iterator]();
				for (var it = iterator.next(); !it.done; it = iterator.next()) newContext.push(it.value);
				context = newContext;
				for (var j = context.length; i < j; i++) execIteration(i, i, i === context.length - 1);
			} else (function() {
				var priorKey = void 0;
				Object.keys(context).forEach(function(key) {
					if (priorKey !== void 0) execIteration(priorKey, i - 1);
					priorKey = key;
					i++;
				});
				if (priorKey !== void 0) execIteration(priorKey, i - 1, true);
			})();
			if (i === 0) ret = inverse(this);
			return ret;
		});
	};
	module.exports = exports["default"];
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js
var require_helper_missing = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	exports.__esModule = true;
	// istanbul ignore next
	function _interopRequireDefault(obj) {
		return obj && obj.__esModule ? obj : { "default": obj };
	}
	var _exception2 = _interopRequireDefault(require_exception());
	exports["default"] = function(instance) {
		instance.registerHelper("helperMissing", function() {
			if (arguments.length === 1) return;
			else throw new _exception2["default"]("Missing helper: \"" + arguments[arguments.length - 1].name + "\"");
		});
	};
	module.exports = exports["default"];
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/helpers/if.js
var require_if = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	exports.__esModule = true;
	// istanbul ignore next
	function _interopRequireDefault(obj) {
		return obj && obj.__esModule ? obj : { "default": obj };
	}
	var _utils = require_utils();
	var _exception2 = _interopRequireDefault(require_exception());
	exports["default"] = function(instance) {
		instance.registerHelper("if", function(conditional, options) {
			if (arguments.length != 2) throw new _exception2["default"]("#if requires exactly one argument");
			if (_utils.isFunction(conditional)) conditional = conditional.call(this);
			if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) return options.inverse(this);
			else return options.fn(this);
		});
		instance.registerHelper("unless", function(conditional, options) {
			if (arguments.length != 2) throw new _exception2["default"]("#unless requires exactly one argument");
			return instance.helpers["if"].call(this, conditional, {
				fn: options.inverse,
				inverse: options.fn,
				hash: options.hash
			});
		});
	};
	module.exports = exports["default"];
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/helpers/log.js
var require_log = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	exports.__esModule = true;
	exports["default"] = function(instance) {
		instance.registerHelper("log", function() {
			var args = [void 0], options = arguments[arguments.length - 1];
			for (var i = 0; i < arguments.length - 1; i++) args.push(arguments[i]);
			var level = 1;
			if (options.hash.level != null) level = options.hash.level;
			else if (options.data && options.data.level != null) level = options.data.level;
			args[0] = level;
			instance.log.apply(instance, args);
		});
	};
	module.exports = exports["default"];
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/helpers/lookup.js
var require_lookup = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	exports.__esModule = true;
	exports["default"] = function(instance) {
		instance.registerHelper("lookup", function(obj, field, options) {
			if (!obj) return obj;
			return options.lookupProperty(obj, field);
		});
	};
	module.exports = exports["default"];
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/helpers/with.js
var require_with = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	exports.__esModule = true;
	// istanbul ignore next
	function _interopRequireDefault(obj) {
		return obj && obj.__esModule ? obj : { "default": obj };
	}
	var _utils = require_utils();
	var _exception2 = _interopRequireDefault(require_exception());
	exports["default"] = function(instance) {
		instance.registerHelper("with", function(context, options) {
			if (arguments.length != 2) throw new _exception2["default"]("#with requires exactly one argument");
			if (_utils.isFunction(context)) context = context.call(this);
			var fn = options.fn;
			if (!_utils.isEmpty(context)) {
				var data = options.data;
				if (options.data && options.ids) {
					data = _utils.createFrame(options.data);
					data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]);
				}
				return fn(context, {
					data,
					blockParams: _utils.blockParams([context], [data && data.contextPath])
				});
			} else return options.inverse(this);
		});
	};
	module.exports = exports["default"];
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/helpers.js
var require_helpers$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
	exports.__esModule = true;
	exports.registerDefaultHelpers = registerDefaultHelpers;
	exports.moveHelperToHooks = moveHelperToHooks;
	// istanbul ignore next
	function _interopRequireDefault(obj) {
		return obj && obj.__esModule ? obj : { "default": obj };
	}
	var _helpersBlockHelperMissing2 = _interopRequireDefault(require_block_helper_missing());
	var _helpersEach2 = _interopRequireDefault(require_each());
	var _helpersHelperMissing2 = _interopRequireDefault(require_helper_missing());
	var _helpersIf2 = _interopRequireDefault(require_if());
	var _helpersLog2 = _interopRequireDefault(require_log());
	var _helpersLookup2 = _interopRequireDefault(require_lookup());
	var _helpersWith2 = _interopRequireDefault(require_with());
	function registerDefaultHelpers(instance) {
		_helpersBlockHelperMissing2["default"](instance);
		_helpersEach2["default"](instance);
		_helpersHelperMissing2["default"](instance);
		_helpersIf2["default"](instance);
		_helpersLog2["default"](instance);
		_helpersLookup2["default"](instance);
		_helpersWith2["default"](instance);
	}
	function moveHelperToHooks(instance, helperName, keepHelper) {
		if (instance.helpers[helperName]) {
			instance.hooks[helperName] = instance.helpers[helperName];
			if (!keepHelper) instance.helpers[helperName] = void 0;
		}
	}
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js
var require_inline = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	exports.__esModule = true;
	var _utils = require_utils();
	exports["default"] = function(instance) {
		instance.registerDecorator("inline", function(fn, props, container, options) {
			var ret = fn;
			if (!props.partials) {
				props.partials = {};
				ret = function(context, options) {
					var original = container.partials;
					container.partials = _utils.extend({}, original, props.partials);
					var ret = fn(context, options);
					container.partials = original;
					return ret;
				};
			}
			props.partials[options.args[0]] = options.fn;
			return ret;
		});
	};
	module.exports = exports["default"];
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/decorators.js
var require_decorators = /* @__PURE__ */ __commonJSMin(((exports) => {
	exports.__esModule = true;
	exports.registerDefaultDecorators = registerDefaultDecorators;
	// istanbul ignore next
	function _interopRequireDefault(obj) {
		return obj && obj.__esModule ? obj : { "default": obj };
	}
	var _decoratorsInline2 = _interopRequireDefault(require_inline());
	function registerDefaultDecorators(instance) {
		_decoratorsInline2["default"](instance);
	}
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/logger.js
var require_logger = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	exports.__esModule = true;
	var _utils = require_utils();
	var logger = {
		methodMap: [
			"debug",
			"info",
			"warn",
			"error"
		],
		level: "info",
		lookupLevel: function lookupLevel(level) {
			if (typeof level === "string") {
				var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase());
				if (levelMap >= 0) level = levelMap;
				else level = parseInt(level, 10);
			}
			return level;
		},
		log: function log(level) {
			level = logger.lookupLevel(level);
			if (typeof console !== "undefined" && logger.lookupLevel(logger.level) <= level) {
				var method = logger.methodMap[level];
				if (!console[method]) method = "log";
				for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) message[_key - 1] = arguments[_key];
				console[method].apply(console, message);
			}
		}
	};
	exports["default"] = logger;
	module.exports = exports["default"];
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js
var require_proto_access = /* @__PURE__ */ __commonJSMin(((exports) => {
	exports.__esModule = true;
	exports.createProtoAccessControl = createProtoAccessControl;
	exports.resultIsAllowed = resultIsAllowed;
	exports.resetLoggedProperties = resetLoggedProperties;
	// istanbul ignore next
	function _interopRequireDefault(obj) {
		return obj && obj.__esModule ? obj : { "default": obj };
	}
	var _utils = require_utils();
	var _logger2 = _interopRequireDefault(require_logger());
	var loggedProperties = Object.create(null);
	function createProtoAccessControl(runtimeOptions) {
		var propertyWhiteList = Object.create(null);
		propertyWhiteList["__proto__"] = false;
		_utils.extend(propertyWhiteList, runtimeOptions.allowedProtoProperties);
		var methodWhiteList = Object.create(null);
		methodWhiteList["constructor"] = false;
		methodWhiteList["__defineGetter__"] = false;
		methodWhiteList["__defineSetter__"] = false;
		methodWhiteList["__lookupGetter__"] = false;
		methodWhiteList["__lookupSetter__"] = false;
		_utils.extend(methodWhiteList, runtimeOptions.allowedProtoMethods);
		return {
			properties: {
				whitelist: propertyWhiteList,
				defaultValue: runtimeOptions.allowProtoPropertiesByDefault
			},
			methods: {
				whitelist: methodWhiteList,
				defaultValue: runtimeOptions.allowProtoMethodsByDefault
			}
		};
	}
	function resultIsAllowed(result, protoAccessControl, propertyName) {
		if (typeof result === "function") return checkWhiteList(protoAccessControl.methods, propertyName);
		else return checkWhiteList(protoAccessControl.properties, propertyName);
	}
	function checkWhiteList(protoAccessControlForType, propertyName) {
		if (protoAccessControlForType.whitelist[propertyName] !== void 0) return protoAccessControlForType.whitelist[propertyName] === true;
		if (protoAccessControlForType.defaultValue !== void 0) return protoAccessControlForType.defaultValue;
		logUnexpecedPropertyAccessOnce(propertyName);
		return false;
	}
	function logUnexpecedPropertyAccessOnce(propertyName) {
		if (loggedProperties[propertyName] !== true) {
			loggedProperties[propertyName] = true;
			_logger2["default"].log("error", "Handlebars: Access has been denied to resolve the property \"" + propertyName + "\" because it is not an \"own property\" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details");
		}
	}
	function resetLoggedProperties() {
		Object.keys(loggedProperties).forEach(function(propertyName) {
			delete loggedProperties[propertyName];
		});
	}
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/base.js
var require_base$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
	exports.__esModule = true;
	exports.HandlebarsEnvironment = HandlebarsEnvironment;
	// istanbul ignore next
	function _interopRequireDefault(obj) {
		return obj && obj.__esModule ? obj : { "default": obj };
	}
	var _utils = require_utils();
	var _exception2 = _interopRequireDefault(require_exception());
	var _helpers = require_helpers$1();
	var _decorators = require_decorators();
	var _logger2 = _interopRequireDefault(require_logger());
	var _internalProtoAccess = require_proto_access();
	exports.VERSION = "4.7.9";
	exports.COMPILER_REVISION = 8;
	exports.LAST_COMPATIBLE_COMPILER_REVISION = 7;
	exports.REVISION_CHANGES = {
		1: "<= 1.0.rc.2",
		2: "== 1.0.0-rc.3",
		3: "== 1.0.0-rc.4",
		4: "== 1.x.x",
		5: "== 2.0.0-alpha.x",
		6: ">= 2.0.0-beta.1",
		7: ">= 4.0.0 <4.3.0",
		8: ">= 4.3.0"
	};
	var objectType = "[object Object]";
	function HandlebarsEnvironment(helpers, partials, decorators) {
		this.helpers = helpers || {};
		this.partials = partials || {};
		this.decorators = decorators || {};
		_helpers.registerDefaultHelpers(this);
		_decorators.registerDefaultDecorators(this);
	}
	HandlebarsEnvironment.prototype = {
		constructor: HandlebarsEnvironment,
		logger: _logger2["default"],
		log: _logger2["default"].log,
		registerHelper: function registerHelper(name, fn) {
			if (_utils.toString.call(name) === objectType) {
				if (fn) throw new _exception2["default"]("Arg not supported with multiple helpers");
				_utils.extend(this.helpers, name);
			} else this.helpers[name] = fn;
		},
		unregisterHelper: function unregisterHelper(name) {
			delete this.helpers[name];
		},
		registerPartial: function registerPartial(name, partial) {
			if (_utils.toString.call(name) === objectType) _utils.extend(this.partials, name);
			else {
				if (typeof partial === "undefined") throw new _exception2["default"]("Attempting to register a partial called \"" + name + "\" as undefined");
				this.partials[name] = partial;
			}
		},
		unregisterPartial: function unregisterPartial(name) {
			delete this.partials[name];
		},
		registerDecorator: function registerDecorator(name, fn) {
			if (_utils.toString.call(name) === objectType) {
				if (fn) throw new _exception2["default"]("Arg not supported with multiple decorators");
				_utils.extend(this.decorators, name);
			} else this.decorators[name] = fn;
		},
		unregisterDecorator: function unregisterDecorator(name) {
			delete this.decorators[name];
		},
		resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() {
			_internalProtoAccess.resetLoggedProperties();
		}
	};
	exports.log = _logger2["default"].log;
	exports.createFrame = _utils.createFrame;
	exports.logger = _logger2["default"];
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/safe-string.js
var require_safe_string = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	exports.__esModule = true;
	function SafeString(string) {
		this.string = string;
	}
	SafeString.prototype.toString = SafeString.prototype.toHTML = function() {
		return "" + this.string;
	};
	exports["default"] = SafeString;
	module.exports = exports["default"];
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js
var require_wrapHelper = /* @__PURE__ */ __commonJSMin(((exports) => {
	exports.__esModule = true;
	exports.wrapHelper = wrapHelper;
	function wrapHelper(helper, transformOptionsFn) {
		if (typeof helper !== "function") return helper;
		return function wrapper() {
			var options = arguments[arguments.length - 1];
			arguments[arguments.length - 1] = transformOptionsFn(options);
			return helper.apply(this, arguments);
		};
	}
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/runtime.js
var require_runtime = /* @__PURE__ */ __commonJSMin(((exports) => {
	exports.__esModule = true;
	exports.checkRevision = checkRevision;
	exports.template = template;
	exports.wrapProgram = wrapProgram;
	exports.resolvePartial = resolvePartial;
	exports.invokePartial = invokePartial;
	exports.noop = noop;
	// istanbul ignore next
	function _interopRequireDefault(obj) {
		return obj && obj.__esModule ? obj : { "default": obj };
	}
	// istanbul ignore next
	function _interopRequireWildcard(obj) {
		if (obj && obj.__esModule) return obj;
		else {
			var newObj = {};
			if (obj != null) {
				for (var key in obj) if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
			}
			newObj["default"] = obj;
			return newObj;
		}
	}
	var Utils = _interopRequireWildcard(require_utils());
	var _exception2 = _interopRequireDefault(require_exception());
	var _base = require_base$1();
	var _helpers = require_helpers$1();
	var _internalWrapHelper = require_wrapHelper();
	var _internalProtoAccess = require_proto_access();
	function checkRevision(compilerInfo) {
		var compilerRevision = compilerInfo && compilerInfo[0] || 1, currentRevision = _base.COMPILER_REVISION;
		if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) return;
		if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) {
			var runtimeVersions = _base.REVISION_CHANGES[currentRevision], compilerVersions = _base.REVISION_CHANGES[compilerRevision];
			throw new _exception2["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (" + runtimeVersions + ") or downgrade your runtime to an older version (" + compilerVersions + ").");
		} else throw new _exception2["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version (" + compilerInfo[1] + ").");
	}
	function template(templateSpec, env) {
		/* istanbul ignore next */
		if (!env) throw new _exception2["default"]("No environment passed to template");
		if (!templateSpec || !templateSpec.main) throw new _exception2["default"]("Unknown template object: " + typeof templateSpec);
		templateSpec.main.decorator = templateSpec.main_d;
		env.VM.checkRevision(templateSpec.compiler);
		var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7;
		function invokePartialWrapper(partial, context, options) {
			if (options.hash) {
				context = Utils.extend({}, context, options.hash);
				if (options.ids) options.ids[0] = true;
			}
			partial = env.VM.resolvePartial.call(this, partial, context, options);
			options.hooks = this.hooks;
			options.protoAccessControl = this.protoAccessControl;
			var result = env.VM.invokePartial.call(this, partial, context, options);
			if (result == null && env.compile) {
				options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);
				result = options.partials[options.name](context, options);
			}
			if (result != null) {
				if (options.indent) {
					var lines = result.split("\n");
					for (var i = 0, l = lines.length; i < l; i++) {
						if (!lines[i] && i + 1 === l) break;
						lines[i] = options.indent + lines[i];
					}
					result = lines.join("\n");
				}
				return result;
			} else throw new _exception2["default"]("The partial " + options.name + " could not be compiled when running in runtime-only mode");
		}
		var container = {
			strict: function strict(obj, name, loc) {
				if (!obj || !(name in obj)) throw new _exception2["default"]("\"" + name + "\" not defined in " + obj, { loc });
				return container.lookupProperty(obj, name);
			},
			lookupProperty: function lookupProperty(parent, propertyName) {
				var result = parent[propertyName];
				if (result == null) return result;
				if (Object.prototype.hasOwnProperty.call(parent, propertyName)) return result;
				if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) return result;
			},
			lookup: function lookup(depths, name) {
				var len = depths.length;
				for (var i = 0; i < len; i++) {
					var result = depths[i] && container.lookupProperty(depths[i], name);
					if (result != null) return result;
				}
			},
			lambda: function lambda(current, context) {
				return typeof current === "function" ? current.call(context) : current;
			},
			escapeExpression: Utils.escapeExpression,
			invokePartial: invokePartialWrapper,
			fn: function fn(i) {
				var ret = templateSpec[i];
				ret.decorator = templateSpec[i + "_d"];
				return ret;
			},
			programs: [],
			program: function program(i, data, declaredBlockParams, blockParams, depths) {
				var programWrapper = this.programs[i], fn = this.fn(i);
				if (data || depths || blockParams || declaredBlockParams) programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths);
				else if (!programWrapper) programWrapper = this.programs[i] = wrapProgram(this, i, fn);
				return programWrapper;
			},
			data: function data(value, depth) {
				while (value && depth--) value = value._parent;
				return value;
			},
			mergeIfNeeded: function mergeIfNeeded(param, common) {
				var obj = param || common;
				if (param && common && param !== common) obj = Utils.extend({}, common, param);
				return obj;
			},
			nullContext: Object.seal({}),
			noop: env.VM.noop,
			compilerInfo: templateSpec.compiler
		};
		function ret(context) {
			var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1];
			var data = options.data;
			ret._setup(options);
			if (!options.partial && templateSpec.useData) data = initData(context, data);
			var depths = void 0, blockParams = templateSpec.useBlockParams ? [] : void 0;
			if (templateSpec.useDepths) if (options.depths) depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths;
			else depths = [context];
			function main(context) {
				return "" + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths);
			}
			main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams);
			return main(context, options);
		}
		ret.isTop = true;
		ret._setup = function(options) {
			if (!options.partial) {
				var mergedHelpers = {};
				addHelpers(mergedHelpers, env.helpers, container);
				addHelpers(mergedHelpers, options.helpers, container);
				container.helpers = mergedHelpers;
				if (templateSpec.usePartial) container.partials = container.mergeIfNeeded(options.partials, env.partials);
				if (templateSpec.usePartial || templateSpec.useDecorators) container.decorators = Utils.extend({}, env.decorators, options.decorators);
				container.hooks = {};
				container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options);
				var keepHelperInHelpers = options.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7;
				_helpers.moveHelperToHooks(container, "helperMissing", keepHelperInHelpers);
				_helpers.moveHelperToHooks(container, "blockHelperMissing", keepHelperInHelpers);
			} else {
				container.protoAccessControl = options.protoAccessControl;
				container.helpers = options.helpers;
				container.partials = options.partials;
				container.decorators = options.decorators;
				container.hooks = options.hooks;
			}
		};
		ret._child = function(i, data, blockParams, depths) {
			if (templateSpec.useBlockParams && !blockParams) throw new _exception2["default"]("must pass block params");
			if (templateSpec.useDepths && !depths) throw new _exception2["default"]("must pass parent depths");
			return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);
		};
		return ret;
	}
	function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {
		function prog(context) {
			var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1];
			var currentDepths = depths;
			if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) currentDepths = [context].concat(depths);
			return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths);
		}
		prog = executeDecorators(fn, prog, container, depths, data, blockParams);
		prog.program = i;
		prog.depth = depths ? depths.length : 0;
		prog.blockParams = declaredBlockParams || 0;
		return prog;
	}
	/**
	* This is currently part of the official API, therefore implementation details should not be changed.
	*/
	function resolvePartial(partial, context, options) {
		if (!partial) if (options.name === "@partial-block") partial = lookupOwnProperty(options.data, "partial-block");
		else partial = lookupOwnProperty(options.partials, options.name);
		else if (!partial.call && !options.name) {
			options.name = partial;
			partial = lookupOwnProperty(options.partials, partial);
		}
		return partial;
	}
	function invokePartial(partial, context, options) {
		var currentPartialBlock = lookupOwnProperty(options.data, "partial-block");
		options.partial = true;
		if (options.ids) options.data.contextPath = options.ids[0] || options.data.contextPath;
		var partialBlock = void 0;
		if (options.fn && options.fn !== noop) (function() {
			options.data = _base.createFrame(options.data);
			var fn = options.fn;
			partialBlock = options.data["partial-block"] = function partialBlockWrapper(context) {
				var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1];
				options.data = _base.createFrame(options.data);
				options.data["partial-block"] = currentPartialBlock;
				return fn(context, options);
			};
			if (fn.partials) options.partials = Utils.extend({}, options.partials, fn.partials);
		})();
		if (partial === void 0 && partialBlock) partial = partialBlock;
		if (partial === void 0) throw new _exception2["default"]("The partial " + options.name + " could not be found");
		else if (partial instanceof Function) return partial(context, options);
	}
	function noop() {
		return "";
	}
	function lookupOwnProperty(obj, name) {
		if (obj && Object.prototype.hasOwnProperty.call(obj, name)) return obj[name];
	}
	function initData(context, data) {
		if (!data || !("root" in data)) {
			data = data ? _base.createFrame(data) : {};
			data.root = context;
		}
		return data;
	}
	function executeDecorators(fn, prog, container, depths, data, blockParams) {
		if (fn.decorator) {
			var props = {};
			prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths);
			Utils.extend(prog, props);
		}
		return prog;
	}
	function addHelpers(mergedHelpers, helpers, container) {
		if (!helpers) return;
		Object.keys(helpers).forEach(function(helperName) {
			var helper = helpers[helperName];
			mergedHelpers[helperName] = passLookupPropertyOption(helper, container);
		});
	}
	function passLookupPropertyOption(helper, container) {
		var lookupProperty = container.lookupProperty;
		return _internalWrapHelper.wrapHelper(helper, function(options) {
			options.lookupProperty = lookupProperty;
			return options;
		});
	}
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/no-conflict.js
var require_no_conflict = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	exports.__esModule = true;
	exports["default"] = function(Handlebars) {
		/* istanbul ignore next */
		(function() {
			if (typeof globalThis === "object") return;
			Object.prototype.__defineGetter__("__magic__", function() {
				return this;
			});
			__magic__.globalThis = __magic__;
			delete Object.prototype.__magic__;
		})();
		var $Handlebars = globalThis.Handlebars;
		/* istanbul ignore next */
		Handlebars.noConflict = function() {
			if (globalThis.Handlebars === Handlebars) globalThis.Handlebars = $Handlebars;
			return Handlebars;
		};
	};
	module.exports = exports["default"];
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars.runtime.js
var require_handlebars_runtime = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	exports.__esModule = true;
	// istanbul ignore next
	function _interopRequireDefault(obj) {
		return obj && obj.__esModule ? obj : { "default": obj };
	}
	// istanbul ignore next
	function _interopRequireWildcard(obj) {
		if (obj && obj.__esModule) return obj;
		else {
			var newObj = {};
			if (obj != null) {
				for (var key in obj) if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
			}
			newObj["default"] = obj;
			return newObj;
		}
	}
	var base = _interopRequireWildcard(require_base$1());
	var _handlebarsSafeString2 = _interopRequireDefault(require_safe_string());
	var _handlebarsException2 = _interopRequireDefault(require_exception());
	var Utils = _interopRequireWildcard(require_utils());
	var runtime = _interopRequireWildcard(require_runtime());
	var _handlebarsNoConflict2 = _interopRequireDefault(require_no_conflict());
	function create() {
		var hb = new base.HandlebarsEnvironment();
		Utils.extend(hb, base);
		hb.SafeString = _handlebarsSafeString2["default"];
		hb.Exception = _handlebarsException2["default"];
		hb.Utils = Utils;
		hb.escapeExpression = Utils.escapeExpression;
		hb.VM = runtime;
		hb.template = function(spec) {
			return runtime.template(spec, hb);
		};
		return hb;
	}
	var inst = create();
	inst.create = create;
	_handlebarsNoConflict2["default"](inst);
	inst["default"] = inst;
	exports["default"] = inst;
	module.exports = exports["default"];
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/compiler/ast.js
var require_ast = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	exports.__esModule = true;
	var AST = { helpers: {
		helperExpression: function helperExpression(node) {
			return node.type === "SubExpression" || (node.type === "MustacheStatement" || node.type === "BlockStatement") && !!(node.params && node.params.length || node.hash);
		},
		scopedId: function scopedId(path) {
			return /^\.|this\b/.test(path.original);
		},
		simpleId: function simpleId(path) {
			return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth;
		}
	} };
	exports["default"] = AST;
	module.exports = exports["default"];
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js
var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	exports.__esModule = true;
	exports["default"] = (function() {
		var parser = {
			trace: function trace() {},
			yy: {},
			symbols_: {
				"error": 2,
				"root": 3,
				"program": 4,
				"EOF": 5,
				"program_repetition0": 6,
				"statement": 7,
				"mustache": 8,
				"block": 9,
				"rawBlock": 10,
				"partial": 11,
				"partialBlock": 12,
				"content": 13,
				"COMMENT": 14,
				"CONTENT": 15,
				"openRawBlock": 16,
				"rawBlock_repetition0": 17,
				"END_RAW_BLOCK": 18,
				"OPEN_RAW_BLOCK": 19,
				"helperName": 20,
				"openRawBlock_repetition0": 21,
				"openRawBlock_option0": 22,
				"CLOSE_RAW_BLOCK": 23,
				"openBlock": 24,
				"block_option0": 25,
				"closeBlock": 26,
				"openInverse": 27,
				"block_option1": 28,
				"OPEN_BLOCK": 29,
				"openBlock_repetition0": 30,
				"openBlock_option0": 31,
				"openBlock_option1": 32,
				"CLOSE": 33,
				"OPEN_INVERSE": 34,
				"openInverse_repetition0": 35,
				"openInverse_option0": 36,
				"openInverse_option1": 37,
				"openInverseChain": 38,
				"OPEN_INVERSE_CHAIN": 39,
				"openInverseChain_repetition0": 40,
				"openInverseChain_option0": 41,
				"openInverseChain_option1": 42,
				"inverseAndProgram": 43,
				"INVERSE": 44,
				"inverseChain": 45,
				"inverseChain_option0": 46,
				"OPEN_ENDBLOCK": 47,
				"OPEN": 48,
				"mustache_repetition0": 49,
				"mustache_option0": 50,
				"OPEN_UNESCAPED": 51,
				"mustache_repetition1": 52,
				"mustache_option1": 53,
				"CLOSE_UNESCAPED": 54,
				"OPEN_PARTIAL": 55,
				"partialName": 56,
				"partial_repetition0": 57,
				"partial_option0": 58,
				"openPartialBlock": 59,
				"OPEN_PARTIAL_BLOCK": 60,
				"openPartialBlock_repetition0": 61,
				"openPartialBlock_option0": 62,
				"param": 63,
				"sexpr": 64,
				"OPEN_SEXPR": 65,
				"sexpr_repetition0": 66,
				"sexpr_option0": 67,
				"CLOSE_SEXPR": 68,
				"hash": 69,
				"hash_repetition_plus0": 70,
				"hashSegment": 71,
				"ID": 72,
				"EQUALS": 73,
				"blockParams": 74,
				"OPEN_BLOCK_PARAMS": 75,
				"blockParams_repetition_plus0": 76,
				"CLOSE_BLOCK_PARAMS": 77,
				"path": 78,
				"dataName": 79,
				"STRING": 80,
				"NUMBER": 81,
				"BOOLEAN": 82,
				"UNDEFINED": 83,
				"NULL": 84,
				"DATA": 85,
				"pathSegments": 86,
				"SEP": 87,
				"$accept": 0,
				"$end": 1
			},
			terminals_: {
				2: "error",
				5: "EOF",
				14: "COMMENT",
				15: "CONTENT",
				18: "END_RAW_BLOCK",
				19: "OPEN_RAW_BLOCK",
				23: "CLOSE_RAW_BLOCK",
				29: "OPEN_BLOCK",
				33: "CLOSE",
				34: "OPEN_INVERSE",
				39: "OPEN_INVERSE_CHAIN",
				44: "INVERSE",
				47: "OPEN_ENDBLOCK",
				48: "OPEN",
				51: "OPEN_UNESCAPED",
				54: "CLOSE_UNESCAPED",
				55: "OPEN_PARTIAL",
				60: "OPEN_PARTIAL_BLOCK",
				65: "OPEN_SEXPR",
				68: "CLOSE_SEXPR",
				72: "ID",
				73: "EQUALS",
				75: "OPEN_BLOCK_PARAMS",
				77: "CLOSE_BLOCK_PARAMS",
				80: "STRING",
				81: "NUMBER",
				82: "BOOLEAN",
				83: "UNDEFINED",
				84: "NULL",
				85: "DATA",
				87: "SEP"
			},
			productions_: [
				0,
				[3, 2],
				[4, 1],
				[7, 1],
				[7, 1],
				[7, 1],
				[7, 1],
				[7, 1],
				[7, 1],
				[7, 1],
				[13, 1],
				[10, 3],
				[16, 5],
				[9, 4],
				[9, 4],
				[24, 6],
				[27, 6],
				[38, 6],
				[43, 2],
				[45, 3],
				[45, 1],
				[26, 3],
				[8, 5],
				[8, 5],
				[11, 5],
				[12, 3],
				[59, 5],
				[63, 1],
				[63, 1],
				[64, 5],
				[69, 1],
				[71, 3],
				[74, 3],
				[20, 1],
				[20, 1],
				[20, 1],
				[20, 1],
				[20, 1],
				[20, 1],
				[20, 1],
				[56, 1],
				[56, 1],
				[79, 2],
				[78, 1],
				[86, 3],
				[86, 1],
				[6, 0],
				[6, 2],
				[17, 0],
				[17, 2],
				[21, 0],
				[21, 2],
				[22, 0],
				[22, 1],
				[25, 0],
				[25, 1],
				[28, 0],
				[28, 1],
				[30, 0],
				[30, 2],
				[31, 0],
				[31, 1],
				[32, 0],
				[32, 1],
				[35, 0],
				[35, 2],
				[36, 0],
				[36, 1],
				[37, 0],
				[37, 1],
				[40, 0],
				[40, 2],
				[41, 0],
				[41, 1],
				[42, 0],
				[42, 1],
				[46, 0],
				[46, 1],
				[49, 0],
				[49, 2],
				[50, 0],
				[50, 1],
				[52, 0],
				[52, 2],
				[53, 0],
				[53, 1],
				[57, 0],
				[57, 2],
				[58, 0],
				[58, 1],
				[61, 0],
				[61, 2],
				[62, 0],
				[62, 1],
				[66, 0],
				[66, 2],
				[67, 0],
				[67, 1],
				[70, 1],
				[70, 2],
				[76, 1],
				[76, 2]
			],
			performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
				var $0 = $$.length - 1;
				switch (yystate) {
					case 1: return $$[$0 - 1];
					case 2:
						this.$ = yy.prepareProgram($$[$0]);
						break;
					case 3:
						this.$ = $$[$0];
						break;
					case 4:
						this.$ = $$[$0];
						break;
					case 5:
						this.$ = $$[$0];
						break;
					case 6:
						this.$ = $$[$0];
						break;
					case 7:
						this.$ = $$[$0];
						break;
					case 8:
						this.$ = $$[$0];
						break;
					case 9:
						this.$ = {
							type: "CommentStatement",
							value: yy.stripComment($$[$0]),
							strip: yy.stripFlags($$[$0], $$[$0]),
							loc: yy.locInfo(this._$)
						};
						break;
					case 10:
						this.$ = {
							type: "ContentStatement",
							original: $$[$0],
							value: $$[$0],
							loc: yy.locInfo(this._$)
						};
						break;
					case 11:
						this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
						break;
					case 12:
						this.$ = {
							path: $$[$0 - 3],
							params: $$[$0 - 2],
							hash: $$[$0 - 1]
						};
						break;
					case 13:
						this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$);
						break;
					case 14:
						this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$);
						break;
					case 15:
						this.$ = {
							open: $$[$0 - 5],
							path: $$[$0 - 4],
							params: $$[$0 - 3],
							hash: $$[$0 - 2],
							blockParams: $$[$0 - 1],
							strip: yy.stripFlags($$[$0 - 5], $$[$0])
						};
						break;
					case 16:
						this.$ = {
							path: $$[$0 - 4],
							params: $$[$0 - 3],
							hash: $$[$0 - 2],
							blockParams: $$[$0 - 1],
							strip: yy.stripFlags($$[$0 - 5], $$[$0])
						};
						break;
					case 17:
						this.$ = {
							path: $$[$0 - 4],
							params: $$[$0 - 3],
							hash: $$[$0 - 2],
							blockParams: $$[$0 - 1],
							strip: yy.stripFlags($$[$0 - 5], $$[$0])
						};
						break;
					case 18:
						this.$ = {
							strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]),
							program: $$[$0]
						};
						break;
					case 19:
						var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$), program = yy.prepareProgram([inverse], $$[$0 - 1].loc);
						program.chained = true;
						this.$ = {
							strip: $$[$0 - 2].strip,
							program,
							chain: true
						};
						break;
					case 20:
						this.$ = $$[$0];
						break;
					case 21:
						this.$ = {
							path: $$[$0 - 1],
							strip: yy.stripFlags($$[$0 - 2], $$[$0])
						};
						break;
					case 22:
						this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
						break;
					case 23:
						this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
						break;
					case 24:
						this.$ = {
							type: "PartialStatement",
							name: $$[$0 - 3],
							params: $$[$0 - 2],
							hash: $$[$0 - 1],
							indent: "",
							strip: yy.stripFlags($$[$0 - 4], $$[$0]),
							loc: yy.locInfo(this._$)
						};
						break;
					case 25:
						this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
						break;
					case 26:
						this.$ = {
							path: $$[$0 - 3],
							params: $$[$0 - 2],
							hash: $$[$0 - 1],
							strip: yy.stripFlags($$[$0 - 4], $$[$0])
						};
						break;
					case 27:
						this.$ = $$[$0];
						break;
					case 28:
						this.$ = $$[$0];
						break;
					case 29:
						this.$ = {
							type: "SubExpression",
							path: $$[$0 - 3],
							params: $$[$0 - 2],
							hash: $$[$0 - 1],
							loc: yy.locInfo(this._$)
						};
						break;
					case 30:
						this.$ = {
							type: "Hash",
							pairs: $$[$0],
							loc: yy.locInfo(this._$)
						};
						break;
					case 31:
						this.$ = {
							type: "HashPair",
							key: yy.id($$[$0 - 2]),
							value: $$[$0],
							loc: yy.locInfo(this._$)
						};
						break;
					case 32:
						this.$ = yy.id($$[$0 - 1]);
						break;
					case 33:
						this.$ = $$[$0];
						break;
					case 34:
						this.$ = $$[$0];
						break;
					case 35:
						this.$ = {
							type: "StringLiteral",
							value: $$[$0],
							original: $$[$0],
							loc: yy.locInfo(this._$)
						};
						break;
					case 36:
						this.$ = {
							type: "NumberLiteral",
							value: Number($$[$0]),
							original: Number($$[$0]),
							loc: yy.locInfo(this._$)
						};
						break;
					case 37:
						this.$ = {
							type: "BooleanLiteral",
							value: $$[$0] === "true",
							original: $$[$0] === "true",
							loc: yy.locInfo(this._$)
						};
						break;
					case 38:
						this.$ = {
							type: "UndefinedLiteral",
							original: void 0,
							value: void 0,
							loc: yy.locInfo(this._$)
						};
						break;
					case 39:
						this.$ = {
							type: "NullLiteral",
							original: null,
							value: null,
							loc: yy.locInfo(this._$)
						};
						break;
					case 40:
						this.$ = $$[$0];
						break;
					case 41:
						this.$ = $$[$0];
						break;
					case 42:
						this.$ = yy.preparePath(true, $$[$0], this._$);
						break;
					case 43:
						this.$ = yy.preparePath(false, $$[$0], this._$);
						break;
					case 44:
						$$[$0 - 2].push({
							part: yy.id($$[$0]),
							original: $$[$0],
							separator: $$[$0 - 1]
						});
						this.$ = $$[$0 - 2];
						break;
					case 45:
						this.$ = [{
							part: yy.id($$[$0]),
							original: $$[$0]
						}];
						break;
					case 46:
						this.$ = [];
						break;
					case 47:
						$$[$0 - 1].push($$[$0]);
						break;
					case 48:
						this.$ = [];
						break;
					case 49:
						$$[$0 - 1].push($$[$0]);
						break;
					case 50:
						this.$ = [];
						break;
					case 51:
						$$[$0 - 1].push($$[$0]);
						break;
					case 58:
						this.$ = [];
						break;
					case 59:
						$$[$0 - 1].push($$[$0]);
						break;
					case 64:
						this.$ = [];
						break;
					case 65:
						$$[$0 - 1].push($$[$0]);
						break;
					case 70:
						this.$ = [];
						break;
					case 71:
						$$[$0 - 1].push($$[$0]);
						break;
					case 78:
						this.$ = [];
						break;
					case 79:
						$$[$0 - 1].push($$[$0]);
						break;
					case 82:
						this.$ = [];
						break;
					case 83:
						$$[$0 - 1].push($$[$0]);
						break;
					case 86:
						this.$ = [];
						break;
					case 87:
						$$[$0 - 1].push($$[$0]);
						break;
					case 90:
						this.$ = [];
						break;
					case 91:
						$$[$0 - 1].push($$[$0]);
						break;
					case 94:
						this.$ = [];
						break;
					case 95:
						$$[$0 - 1].push($$[$0]);
						break;
					case 98:
						this.$ = [$$[$0]];
						break;
					case 99:
						$$[$0 - 1].push($$[$0]);
						break;
					case 100:
						this.$ = [$$[$0]];
						break;
					case 101:
						$$[$0 - 1].push($$[$0]);
						break;
				}
			},
			table: [
				{
					3: 1,
					4: 2,
					5: [2, 46],
					6: 3,
					14: [2, 46],
					15: [2, 46],
					19: [2, 46],
					29: [2, 46],
					34: [2, 46],
					48: [2, 46],
					51: [2, 46],
					55: [2, 46],
					60: [2, 46]
				},
				{ 1: [3] },
				{ 5: [1, 4] },
				{
					5: [2, 2],
					7: 5,
					8: 6,
					9: 7,
					10: 8,
					11: 9,
					12: 10,
					13: 11,
					14: [1, 12],
					15: [1, 20],
					16: 17,
					19: [1, 23],
					24: 15,
					27: 16,
					29: [1, 21],
					34: [1, 22],
					39: [2, 2],
					44: [2, 2],
					47: [2, 2],
					48: [1, 13],
					51: [1, 14],
					55: [1, 18],
					59: 19,
					60: [1, 24]
				},
				{ 1: [2, 1] },
				{
					5: [2, 47],
					14: [2, 47],
					15: [2, 47],
					19: [2, 47],
					29: [2, 47],
					34: [2, 47],
					39: [2, 47],
					44: [2, 47],
					47: [2, 47],
					48: [2, 47],
					51: [2, 47],
					55: [2, 47],
					60: [2, 47]
				},
				{
					5: [2, 3],
					14: [2, 3],
					15: [2, 3],
					19: [2, 3],
					29: [2, 3],
					34: [2, 3],
					39: [2, 3],
					44: [2, 3],
					47: [2, 3],
					48: [2, 3],
					51: [2, 3],
					55: [2, 3],
					60: [2, 3]
				},
				{
					5: [2, 4],
					14: [2, 4],
					15: [2, 4],
					19: [2, 4],
					29: [2, 4],
					34: [2, 4],
					39: [2, 4],
					44: [2, 4],
					47: [2, 4],
					48: [2, 4],
					51: [2, 4],
					55: [2, 4],
					60: [2, 4]
				},
				{
					5: [2, 5],
					14: [2, 5],
					15: [2, 5],
					19: [2, 5],
					29: [2, 5],
					34: [2, 5],
					39: [2, 5],
					44: [2, 5],
					47: [2, 5],
					48: [2, 5],
					51: [2, 5],
					55: [2, 5],
					60: [2, 5]
				},
				{
					5: [2, 6],
					14: [2, 6],
					15: [2, 6],
					19: [2, 6],
					29: [2, 6],
					34: [2, 6],
					39: [2, 6],
					44: [2, 6],
					47: [2, 6],
					48: [2, 6],
					51: [2, 6],
					55: [2, 6],
					60: [2, 6]
				},
				{
					5: [2, 7],
					14: [2, 7],
					15: [2, 7],
					19: [2, 7],
					29: [2, 7],
					34: [2, 7],
					39: [2, 7],
					44: [2, 7],
					47: [2, 7],
					48: [2, 7],
					51: [2, 7],
					55: [2, 7],
					60: [2, 7]
				},
				{
					5: [2, 8],
					14: [2, 8],
					15: [2, 8],
					19: [2, 8],
					29: [2, 8],
					34: [2, 8],
					39: [2, 8],
					44: [2, 8],
					47: [2, 8],
					48: [2, 8],
					51: [2, 8],
					55: [2, 8],
					60: [2, 8]
				},
				{
					5: [2, 9],
					14: [2, 9],
					15: [2, 9],
					19: [2, 9],
					29: [2, 9],
					34: [2, 9],
					39: [2, 9],
					44: [2, 9],
					47: [2, 9],
					48: [2, 9],
					51: [2, 9],
					55: [2, 9],
					60: [2, 9]
				},
				{
					20: 25,
					72: [1, 35],
					78: 26,
					79: 27,
					80: [1, 28],
					81: [1, 29],
					82: [1, 30],
					83: [1, 31],
					84: [1, 32],
					85: [1, 34],
					86: 33
				},
				{
					20: 36,
					72: [1, 35],
					78: 26,
					79: 27,
					80: [1, 28],
					81: [1, 29],
					82: [1, 30],
					83: [1, 31],
					84: [1, 32],
					85: [1, 34],
					86: 33
				},
				{
					4: 37,
					6: 3,
					14: [2, 46],
					15: [2, 46],
					19: [2, 46],
					29: [2, 46],
					34: [2, 46],
					39: [2, 46],
					44: [2, 46],
					47: [2, 46],
					48: [2, 46],
					51: [2, 46],
					55: [2, 46],
					60: [2, 46]
				},
				{
					4: 38,
					6: 3,
					14: [2, 46],
					15: [2, 46],
					19: [2, 46],
					29: [2, 46],
					34: [2, 46],
					44: [2, 46],
					47: [2, 46],
					48: [2, 46],
					51: [2, 46],
					55: [2, 46],
					60: [2, 46]
				},
				{
					15: [2, 48],
					17: 39,
					18: [2, 48]
				},
				{
					20: 41,
					56: 40,
					64: 42,
					65: [1, 43],
					72: [1, 35],
					78: 26,
					79: 27,
					80: [1, 28],
					81: [1, 29],
					82: [1, 30],
					83: [1, 31],
					84: [1, 32],
					85: [1, 34],
					86: 33
				},
				{
					4: 44,
					6: 3,
					14: [2, 46],
					15: [2, 46],
					19: [2, 46],
					29: [2, 46],
					34: [2, 46],
					47: [2, 46],
					48: [2, 46],
					51: [2, 46],
					55: [2, 46],
					60: [2, 46]
				},
				{
					5: [2, 10],
					14: [2, 10],
					15: [2, 10],
					18: [2, 10],
					19: [2, 10],
					29: [2, 10],
					34: [2, 10],
					39: [2, 10],
					44: [2, 10],
					47: [2, 10],
					48: [2, 10],
					51: [2, 10],
					55: [2, 10],
					60: [2, 10]
				},
				{
					20: 45,
					72: [1, 35],
					78: 26,
					79: 27,
					80: [1, 28],
					81: [1, 29],
					82: [1, 30],
					83: [1, 31],
					84: [1, 32],
					85: [1, 34],
					86: 33
				},
				{
					20: 46,
					72: [1, 35],
					78: 26,
					79: 27,
					80: [1, 28],
					81: [1, 29],
					82: [1, 30],
					83: [1, 31],
					84: [1, 32],
					85: [1, 34],
					86: 33
				},
				{
					20: 47,
					72: [1, 35],
					78: 26,
					79: 27,
					80: [1, 28],
					81: [1, 29],
					82: [1, 30],
					83: [1, 31],
					84: [1, 32],
					85: [1, 34],
					86: 33
				},
				{
					20: 41,
					56: 48,
					64: 42,
					65: [1, 43],
					72: [1, 35],
					78: 26,
					79: 27,
					80: [1, 28],
					81: [1, 29],
					82: [1, 30],
					83: [1, 31],
					84: [1, 32],
					85: [1, 34],
					86: 33
				},
				{
					33: [2, 78],
					49: 49,
					65: [2, 78],
					72: [2, 78],
					80: [2, 78],
					81: [2, 78],
					82: [2, 78],
					83: [2, 78],
					84: [2, 78],
					85: [2, 78]
				},
				{
					23: [2, 33],
					33: [2, 33],
					54: [2, 33],
					65: [2, 33],
					68: [2, 33],
					72: [2, 33],
					75: [2, 33],
					80: [2, 33],
					81: [2, 33],
					82: [2, 33],
					83: [2, 33],
					84: [2, 33],
					85: [2, 33]
				},
				{
					23: [2, 34],
					33: [2, 34],
					54: [2, 34],
					65: [2, 34],
					68: [2, 34],
					72: [2, 34],
					75: [2, 34],
					80: [2, 34],
					81: [2, 34],
					82: [2, 34],
					83: [2, 34],
					84: [2, 34],
					85: [2, 34]
				},
				{
					23: [2, 35],
					33: [2, 35],
					54: [2, 35],
					65: [2, 35],
					68: [2, 35],
					72: [2, 35],
					75: [2, 35],
					80: [2, 35],
					81: [2, 35],
					82: [2, 35],
					83: [2, 35],
					84: [2, 35],
					85: [2, 35]
				},
				{
					23: [2, 36],
					33: [2, 36],
					54: [2, 36],
					65: [2, 36],
					68: [2, 36],
					72: [2, 36],
					75: [2, 36],
					80: [2, 36],
					81: [2, 36],
					82: [2, 36],
					83: [2, 36],
					84: [2, 36],
					85: [2, 36]
				},
				{
					23: [2, 37],
					33: [2, 37],
					54: [2, 37],
					65: [2, 37],
					68: [2, 37],
					72: [2, 37],
					75: [2, 37],
					80: [2, 37],
					81: [2, 37],
					82: [2, 37],
					83: [2, 37],
					84: [2, 37],
					85: [2, 37]
				},
				{
					23: [2, 38],
					33: [2, 38],
					54: [2, 38],
					65: [2, 38],
					68: [2, 38],
					72: [2, 38],
					75: [2, 38],
					80: [2, 38],
					81: [2, 38],
					82: [2, 38],
					83: [2, 38],
					84: [2, 38],
					85: [2, 38]
				},
				{
					23: [2, 39],
					33: [2, 39],
					54: [2, 39],
					65: [2, 39],
					68: [2, 39],
					72: [2, 39],
					75: [2, 39],
					80: [2, 39],
					81: [2, 39],
					82: [2, 39],
					83: [2, 39],
					84: [2, 39],
					85: [2, 39]
				},
				{
					23: [2, 43],
					33: [2, 43],
					54: [2, 43],
					65: [2, 43],
					68: [2, 43],
					72: [2, 43],
					75: [2, 43],
					80: [2, 43],
					81: [2, 43],
					82: [2, 43],
					83: [2, 43],
					84: [2, 43],
					85: [2, 43],
					87: [1, 50]
				},
				{
					72: [1, 35],
					86: 51
				},
				{
					23: [2, 45],
					33: [2, 45],
					54: [2, 45],
					65: [2, 45],
					68: [2, 45],
					72: [2, 45],
					75: [2, 45],
					80: [2, 45],
					81: [2, 45],
					82: [2, 45],
					83: [2, 45],
					84: [2, 45],
					85: [2, 45],
					87: [2, 45]
				},
				{
					52: 52,
					54: [2, 82],
					65: [2, 82],
					72: [2, 82],
					80: [2, 82],
					81: [2, 82],
					82: [2, 82],
					83: [2, 82],
					84: [2, 82],
					85: [2, 82]
				},
				{
					25: 53,
					38: 55,
					39: [1, 57],
					43: 56,
					44: [1, 58],
					45: 54,
					47: [2, 54]
				},
				{
					28: 59,
					43: 60,
					44: [1, 58],
					47: [2, 56]
				},
				{
					13: 62,
					15: [1, 20],
					18: [1, 61]
				},
				{
					33: [2, 86],
					57: 63,
					65: [2, 86],
					72: [2, 86],
					80: [2, 86],
					81: [2, 86],
					82: [2, 86],
					83: [2, 86],
					84: [2, 86],
					85: [2, 86]
				},
				{
					33: [2, 40],
					65: [2, 40],
					72: [2, 40],
					80: [2, 40],
					81: [2, 40],
					82: [2, 40],
					83: [2, 40],
					84: [2, 40],
					85: [2, 40]
				},
				{
					33: [2, 41],
					65: [2, 41],
					72: [2, 41],
					80: [2, 41],
					81: [2, 41],
					82: [2, 41],
					83: [2, 41],
					84: [2, 41],
					85: [2, 41]
				},
				{
					20: 64,
					72: [1, 35],
					78: 26,
					79: 27,
					80: [1, 28],
					81: [1, 29],
					82: [1, 30],
					83: [1, 31],
					84: [1, 32],
					85: [1, 34],
					86: 33
				},
				{
					26: 65,
					47: [1, 66]
				},
				{
					30: 67,
					33: [2, 58],
					65: [2, 58],
					72: [2, 58],
					75: [2, 58],
					80: [2, 58],
					81: [2, 58],
					82: [2, 58],
					83: [2, 58],
					84: [2, 58],
					85: [2, 58]
				},
				{
					33: [2, 64],
					35: 68,
					65: [2, 64],
					72: [2, 64],
					75: [2, 64],
					80: [2, 64],
					81: [2, 64],
					82: [2, 64],
					83: [2, 64],
					84: [2, 64],
					85: [2, 64]
				},
				{
					21: 69,
					23: [2, 50],
					65: [2, 50],
					72: [2, 50],
					80: [2, 50],
					81: [2, 50],
					82: [2, 50],
					83: [2, 50],
					84: [2, 50],
					85: [2, 50]
				},
				{
					33: [2, 90],
					61: 70,
					65: [2, 90],
					72: [2, 90],
					80: [2, 90],
					81: [2, 90],
					82: [2, 90],
					83: [2, 90],
					84: [2, 90],
					85: [2, 90]
				},
				{
					20: 74,
					33: [2, 80],
					50: 71,
					63: 72,
					64: 75,
					65: [1, 43],
					69: 73,
					70: 76,
					71: 77,
					72: [1, 78],
					78: 26,
					79: 27,
					80: [1, 28],
					81: [1, 29],
					82: [1, 30],
					83: [1, 31],
					84: [1, 32],
					85: [1, 34],
					86: 33
				},
				{ 72: [1, 79] },
				{
					23: [2, 42],
					33: [2, 42],
					54: [2, 42],
					65: [2, 42],
					68: [2, 42],
					72: [2, 42],
					75: [2, 42],
					80: [2, 42],
					81: [2, 42],
					82: [2, 42],
					83: [2, 42],
					84: [2, 42],
					85: [2, 42],
					87: [1, 50]
				},
				{
					20: 74,
					53: 80,
					54: [2, 84],
					63: 81,
					64: 75,
					65: [1, 43],
					69: 82,
					70: 76,
					71: 77,
					72: [1, 78],
					78: 26,
					79: 27,
					80: [1, 28],
					81: [1, 29],
					82: [1, 30],
					83: [1, 31],
					84: [1, 32],
					85: [1, 34],
					86: 33
				},
				{
					26: 83,
					47: [1, 66]
				},
				{ 47: [2, 55] },
				{
					4: 84,
					6: 3,
					14: [2, 46],
					15: [2, 46],
					19: [2, 46],
					29: [2, 46],
					34: [2, 46],
					39: [2, 46],
					44: [2, 46],
					47: [2, 46],
					48: [2, 46],
					51: [2, 46],
					55: [2, 46],
					60: [2, 46]
				},
				{ 47: [2, 20] },
				{
					20: 85,
					72: [1, 35],
					78: 26,
					79: 27,
					80: [1, 28],
					81: [1, 29],
					82: [1, 30],
					83: [1, 31],
					84: [1, 32],
					85: [1, 34],
					86: 33
				},
				{
					4: 86,
					6: 3,
					14: [2, 46],
					15: [2, 46],
					19: [2, 46],
					29: [2, 46],
					34: [2, 46],
					47: [2, 46],
					48: [2, 46],
					51: [2, 46],
					55: [2, 46],
					60: [2, 46]
				},
				{
					26: 87,
					47: [1, 66]
				},
				{ 47: [2, 57] },
				{
					5: [2, 11],
					14: [2, 11],
					15: [2, 11],
					19: [2, 11],
					29: [2, 11],
					34: [2, 11],
					39: [2, 11],
					44: [2, 11],
					47: [2, 11],
					48: [2, 11],
					51: [2, 11],
					55: [2, 11],
					60: [2, 11]
				},
				{
					15: [2, 49],
					18: [2, 49]
				},
				{
					20: 74,
					33: [2, 88],
					58: 88,
					63: 89,
					64: 75,
					65: [1, 43],
					69: 90,
					70: 76,
					71: 77,
					72: [1, 78],
					78: 26,
					79: 27,
					80: [1, 28],
					81: [1, 29],
					82: [1, 30],
					83: [1, 31],
					84: [1, 32],
					85: [1, 34],
					86: 33
				},
				{
					65: [2, 94],
					66: 91,
					68: [2, 94],
					72: [2, 94],
					80: [2, 94],
					81: [2, 94],
					82: [2, 94],
					83: [2, 94],
					84: [2, 94],
					85: [2, 94]
				},
				{
					5: [2, 25],
					14: [2, 25],
					15: [2, 25],
					19: [2, 25],
					29: [2, 25],
					34: [2, 25],
					39: [2, 25],
					44: [2, 25],
					47: [2, 25],
					48: [2, 25],
					51: [2, 25],
					55: [2, 25],
					60: [2, 25]
				},
				{
					20: 92,
					72: [1, 35],
					78: 26,
					79: 27,
					80: [1, 28],
					81: [1, 29],
					82: [1, 30],
					83: [1, 31],
					84: [1, 32],
					85: [1, 34],
					86: 33
				},
				{
					20: 74,
					31: 93,
					33: [2, 60],
					63: 94,
					64: 75,
					65: [1, 43],
					69: 95,
					70: 76,
					71: 77,
					72: [1, 78],
					75: [2, 60],
					78: 26,
					79: 27,
					80: [1, 28],
					81: [1, 29],
					82: [1, 30],
					83: [1, 31],
					84: [1, 32],
					85: [1, 34],
					86: 33
				},
				{
					20: 74,
					33: [2, 66],
					36: 96,
					63: 97,
					64: 75,
					65: [1, 43],
					69: 98,
					70: 76,
					71: 77,
					72: [1, 78],
					75: [2, 66],
					78: 26,
					79: 27,
					80: [1, 28],
					81: [1, 29],
					82: [1, 30],
					83: [1, 31],
					84: [1, 32],
					85: [1, 34],
					86: 33
				},
				{
					20: 74,
					22: 99,
					23: [2, 52],
					63: 100,
					64: 75,
					65: [1, 43],
					69: 101,
					70: 76,
					71: 77,
					72: [1, 78],
					78: 26,
					79: 27,
					80: [1, 28],
					81: [1, 29],
					82: [1, 30],
					83: [1, 31],
					84: [1, 32],
					85: [1, 34],
					86: 33
				},
				{
					20: 74,
					33: [2, 92],
					62: 102,
					63: 103,
					64: 75,
					65: [1, 43],
					69: 104,
					70: 76,
					71: 77,
					72: [1, 78],
					78: 26,
					79: 27,
					80: [1, 28],
					81: [1, 29],
					82: [1, 30],
					83: [1, 31],
					84: [1, 32],
					85: [1, 34],
					86: 33
				},
				{ 33: [1, 105] },
				{
					33: [2, 79],
					65: [2, 79],
					72: [2, 79],
					80: [2, 79],
					81: [2, 79],
					82: [2, 79],
					83: [2, 79],
					84: [2, 79],
					85: [2, 79]
				},
				{ 33: [2, 81] },
				{
					23: [2, 27],
					33: [2, 27],
					54: [2, 27],
					65: [2, 27],
					68: [2, 27],
					72: [2, 27],
					75: [2, 27],
					80: [2, 27],
					81: [2, 27],
					82: [2, 27],
					83: [2, 27],
					84: [2, 27],
					85: [2, 27]
				},
				{
					23: [2, 28],
					33: [2, 28],
					54: [2, 28],
					65: [2, 28],
					68: [2, 28],
					72: [2, 28],
					75: [2, 28],
					80: [2, 28],
					81: [2, 28],
					82: [2, 28],
					83: [2, 28],
					84: [2, 28],
					85: [2, 28]
				},
				{
					23: [2, 30],
					33: [2, 30],
					54: [2, 30],
					68: [2, 30],
					71: 106,
					72: [1, 107],
					75: [2, 30]
				},
				{
					23: [2, 98],
					33: [2, 98],
					54: [2, 98],
					68: [2, 98],
					72: [2, 98],
					75: [2, 98]
				},
				{
					23: [2, 45],
					33: [2, 45],
					54: [2, 45],
					65: [2, 45],
					68: [2, 45],
					72: [2, 45],
					73: [1, 108],
					75: [2, 45],
					80: [2, 45],
					81: [2, 45],
					82: [2, 45],
					83: [2, 45],
					84: [2, 45],
					85: [2, 45],
					87: [2, 45]
				},
				{
					23: [2, 44],
					33: [2, 44],
					54: [2, 44],
					65: [2, 44],
					68: [2, 44],
					72: [2, 44],
					75: [2, 44],
					80: [2, 44],
					81: [2, 44],
					82: [2, 44],
					83: [2, 44],
					84: [2, 44],
					85: [2, 44],
					87: [2, 44]
				},
				{ 54: [1, 109] },
				{
					54: [2, 83],
					65: [2, 83],
					72: [2, 83],
					80: [2, 83],
					81: [2, 83],
					82: [2, 83],
					83: [2, 83],
					84: [2, 83],
					85: [2, 83]
				},
				{ 54: [2, 85] },
				{
					5: [2, 13],
					14: [2, 13],
					15: [2, 13],
					19: [2, 13],
					29: [2, 13],
					34: [2, 13],
					39: [2, 13],
					44: [2, 13],
					47: [2, 13],
					48: [2, 13],
					51: [2, 13],
					55: [2, 13],
					60: [2, 13]
				},
				{
					38: 55,
					39: [1, 57],
					43: 56,
					44: [1, 58],
					45: 111,
					46: 110,
					47: [2, 76]
				},
				{
					33: [2, 70],
					40: 112,
					65: [2, 70],
					72: [2, 70],
					75: [2, 70],
					80: [2, 70],
					81: [2, 70],
					82: [2, 70],
					83: [2, 70],
					84: [2, 70],
					85: [2, 70]
				},
				{ 47: [2, 18] },
				{
					5: [2, 14],
					14: [2, 14],
					15: [2, 14],
					19: [2, 14],
					29: [2, 14],
					34: [2, 14],
					39: [2, 14],
					44: [2, 14],
					47: [2, 14],
					48: [2, 14],
					51: [2, 14],
					55: [2, 14],
					60: [2, 14]
				},
				{ 33: [1, 113] },
				{
					33: [2, 87],
					65: [2, 87],
					72: [2, 87],
					80: [2, 87],
					81: [2, 87],
					82: [2, 87],
					83: [2, 87],
					84: [2, 87],
					85: [2, 87]
				},
				{ 33: [2, 89] },
				{
					20: 74,
					63: 115,
					64: 75,
					65: [1, 43],
					67: 114,
					68: [2, 96],
					69: 116,
					70: 76,
					71: 77,
					72: [1, 78],
					78: 26,
					79: 27,
					80: [1, 28],
					81: [1, 29],
					82: [1, 30],
					83: [1, 31],
					84: [1, 32],
					85: [1, 34],
					86: 33
				},
				{ 33: [1, 117] },
				{
					32: 118,
					33: [2, 62],
					74: 119,
					75: [1, 120]
				},
				{
					33: [2, 59],
					65: [2, 59],
					72: [2, 59],
					75: [2, 59],
					80: [2, 59],
					81: [2, 59],
					82: [2, 59],
					83: [2, 59],
					84: [2, 59],
					85: [2, 59]
				},
				{
					33: [2, 61],
					75: [2, 61]
				},
				{
					33: [2, 68],
					37: 121,
					74: 122,
					75: [1, 120]
				},
				{
					33: [2, 65],
					65: [2, 65],
					72: [2, 65],
					75: [2, 65],
					80: [2, 65],
					81: [2, 65],
					82: [2, 65],
					83: [2, 65],
					84: [2, 65],
					85: [2, 65]
				},
				{
					33: [2, 67],
					75: [2, 67]
				},
				{ 23: [1, 123] },
				{
					23: [2, 51],
					65: [2, 51],
					72: [2, 51],
					80: [2, 51],
					81: [2, 51],
					82: [2, 51],
					83: [2, 51],
					84: [2, 51],
					85: [2, 51]
				},
				{ 23: [2, 53] },
				{ 33: [1, 124] },
				{
					33: [2, 91],
					65: [2, 91],
					72: [2, 91],
					80: [2, 91],
					81: [2, 91],
					82: [2, 91],
					83: [2, 91],
					84: [2, 91],
					85: [2, 91]
				},
				{ 33: [2, 93] },
				{
					5: [2, 22],
					14: [2, 22],
					15: [2, 22],
					19: [2, 22],
					29: [2, 22],
					34: [2, 22],
					39: [2, 22],
					44: [2, 22],
					47: [2, 22],
					48: [2, 22],
					51: [2, 22],
					55: [2, 22],
					60: [2, 22]
				},
				{
					23: [2, 99],
					33: [2, 99],
					54: [2, 99],
					68: [2, 99],
					72: [2, 99],
					75: [2, 99]
				},
				{ 73: [1, 108] },
				{
					20: 74,
					63: 125,
					64: 75,
					65: [1, 43],
					72: [1, 35],
					78: 26,
					79: 27,
					80: [1, 28],
					81: [1, 29],
					82: [1, 30],
					83: [1, 31],
					84: [1, 32],
					85: [1, 34],
					86: 33
				},
				{
					5: [2, 23],
					14: [2, 23],
					15: [2, 23],
					19: [2, 23],
					29: [2, 23],
					34: [2, 23],
					39: [2, 23],
					44: [2, 23],
					47: [2, 23],
					48: [2, 23],
					51: [2, 23],
					55: [2, 23],
					60: [2, 23]
				},
				{ 47: [2, 19] },
				{ 47: [2, 77] },
				{
					20: 74,
					33: [2, 72],
					41: 126,
					63: 127,
					64: 75,
					65: [1, 43],
					69: 128,
					70: 76,
					71: 77,
					72: [1, 78],
					75: [2, 72],
					78: 26,
					79: 27,
					80: [1, 28],
					81: [1, 29],
					82: [1, 30],
					83: [1, 31],
					84: [1, 32],
					85: [1, 34],
					86: 33
				},
				{
					5: [2, 24],
					14: [2, 24],
					15: [2, 24],
					19: [2, 24],
					29: [2, 24],
					34: [2, 24],
					39: [2, 24],
					44: [2, 24],
					47: [2, 24],
					48: [2, 24],
					51: [2, 24],
					55: [2, 24],
					60: [2, 24]
				},
				{ 68: [1, 129] },
				{
					65: [2, 95],
					68: [2, 95],
					72: [2, 95],
					80: [2, 95],
					81: [2, 95],
					82: [2, 95],
					83: [2, 95],
					84: [2, 95],
					85: [2, 95]
				},
				{ 68: [2, 97] },
				{
					5: [2, 21],
					14: [2, 21],
					15: [2, 21],
					19: [2, 21],
					29: [2, 21],
					34: [2, 21],
					39: [2, 21],
					44: [2, 21],
					47: [2, 21],
					48: [2, 21],
					51: [2, 21],
					55: [2, 21],
					60: [2, 21]
				},
				{ 33: [1, 130] },
				{ 33: [2, 63] },
				{
					72: [1, 132],
					76: 131
				},
				{ 33: [1, 133] },
				{ 33: [2, 69] },
				{
					15: [2, 12],
					18: [2, 12]
				},
				{
					14: [2, 26],
					15: [2, 26],
					19: [2, 26],
					29: [2, 26],
					34: [2, 26],
					47: [2, 26],
					48: [2, 26],
					51: [2, 26],
					55: [2, 26],
					60: [2, 26]
				},
				{
					23: [2, 31],
					33: [2, 31],
					54: [2, 31],
					68: [2, 31],
					72: [2, 31],
					75: [2, 31]
				},
				{
					33: [2, 74],
					42: 134,
					74: 135,
					75: [1, 120]
				},
				{
					33: [2, 71],
					65: [2, 71],
					72: [2, 71],
					75: [2, 71],
					80: [2, 71],
					81: [2, 71],
					82: [2, 71],
					83: [2, 71],
					84: [2, 71],
					85: [2, 71]
				},
				{
					33: [2, 73],
					75: [2, 73]
				},
				{
					23: [2, 29],
					33: [2, 29],
					54: [2, 29],
					65: [2, 29],
					68: [2, 29],
					72: [2, 29],
					75: [2, 29],
					80: [2, 29],
					81: [2, 29],
					82: [2, 29],
					83: [2, 29],
					84: [2, 29],
					85: [2, 29]
				},
				{
					14: [2, 15],
					15: [2, 15],
					19: [2, 15],
					29: [2, 15],
					34: [2, 15],
					39: [2, 15],
					44: [2, 15],
					47: [2, 15],
					48: [2, 15],
					51: [2, 15],
					55: [2, 15],
					60: [2, 15]
				},
				{
					72: [1, 137],
					77: [1, 136]
				},
				{
					72: [2, 100],
					77: [2, 100]
				},
				{
					14: [2, 16],
					15: [2, 16],
					19: [2, 16],
					29: [2, 16],
					34: [2, 16],
					44: [2, 16],
					47: [2, 16],
					48: [2, 16],
					51: [2, 16],
					55: [2, 16],
					60: [2, 16]
				},
				{ 33: [1, 138] },
				{ 33: [2, 75] },
				{ 33: [2, 32] },
				{
					72: [2, 101],
					77: [2, 101]
				},
				{
					14: [2, 17],
					15: [2, 17],
					19: [2, 17],
					29: [2, 17],
					34: [2, 17],
					39: [2, 17],
					44: [2, 17],
					47: [2, 17],
					48: [2, 17],
					51: [2, 17],
					55: [2, 17],
					60: [2, 17]
				}
			],
			defaultActions: {
				4: [2, 1],
				54: [2, 55],
				56: [2, 20],
				60: [2, 57],
				73: [2, 81],
				82: [2, 85],
				86: [2, 18],
				90: [2, 89],
				101: [2, 53],
				104: [2, 93],
				110: [2, 19],
				111: [2, 77],
				116: [2, 97],
				119: [2, 63],
				122: [2, 69],
				135: [2, 75],
				136: [2, 32]
			},
			parseError: function parseError(str, hash) {
				throw new Error(str);
			},
			parse: function parse(input) {
				var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0;
				this.lexer.setInput(input);
				this.lexer.yy = this.yy;
				this.yy.lexer = this.lexer;
				this.yy.parser = this;
				if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {};
				var yyloc = this.lexer.yylloc;
				lstack.push(yyloc);
				var ranges = this.lexer.options && this.lexer.options.ranges;
				if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError;
				function lex() {
					var token = self.lexer.lex() || 1;
					if (typeof token !== "number") token = self.symbols_[token] || token;
					return token;
				}
				var symbol, preErrorSymbol, state, action, r, yyval = {}, p, len, newState, expected;
				while (true) {
					state = stack[stack.length - 1];
					if (this.defaultActions[state]) action = this.defaultActions[state];
					else {
						if (symbol === null || typeof symbol == "undefined") symbol = lex();
						action = table[state] && table[state][symbol];
					}
					if (typeof action === "undefined" || !action.length || !action[0]) {
						var errStr = "";
						if (!recovering) {
							expected = [];
							for (p in table[state]) if (this.terminals_[p] && p > 2) expected.push("'" + this.terminals_[p] + "'");
							if (this.lexer.showPosition) errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
							else errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
							this.parseError(errStr, {
								text: this.lexer.match,
								token: this.terminals_[symbol] || symbol,
								line: this.lexer.yylineno,
								loc: yyloc,
								expected
							});
						}
					}
					if (action[0] instanceof Array && action.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
					switch (action[0]) {
						case 1:
							stack.push(symbol);
							vstack.push(this.lexer.yytext);
							lstack.push(this.lexer.yylloc);
							stack.push(action[1]);
							symbol = null;
							if (!preErrorSymbol) {
								yyleng = this.lexer.yyleng;
								yytext = this.lexer.yytext;
								yylineno = this.lexer.yylineno;
								yyloc = this.lexer.yylloc;
								if (recovering > 0) recovering--;
							} else {
								symbol = preErrorSymbol;
								preErrorSymbol = null;
							}
							break;
						case 2:
							len = this.productions_[action[1]][1];
							yyval.$ = vstack[vstack.length - len];
							yyval._$ = {
								first_line: lstack[lstack.length - (len || 1)].first_line,
								last_line: lstack[lstack.length - 1].last_line,
								first_column: lstack[lstack.length - (len || 1)].first_column,
								last_column: lstack[lstack.length - 1].last_column
							};
							if (ranges) yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
							r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
							if (typeof r !== "undefined") return r;
							if (len) {
								stack = stack.slice(0, -1 * len * 2);
								vstack = vstack.slice(0, -1 * len);
								lstack = lstack.slice(0, -1 * len);
							}
							stack.push(this.productions_[action[1]][0]);
							vstack.push(yyval.$);
							lstack.push(yyval._$);
							newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
							stack.push(newState);
							break;
						case 3: return true;
					}
				}
				return true;
			}
		};
		parser.lexer = (function() {
			var lexer = {
				EOF: 1,
				parseError: function parseError(str, hash) {
					if (this.yy.parser) this.yy.parser.parseError(str, hash);
					else throw new Error(str);
				},
				setInput: function setInput(input) {
					this._input = input;
					this._more = this._less = this.done = false;
					this.yylineno = this.yyleng = 0;
					this.yytext = this.matched = this.match = "";
					this.conditionStack = ["INITIAL"];
					this.yylloc = {
						first_line: 1,
						first_column: 0,
						last_line: 1,
						last_column: 0
					};
					if (this.options.ranges) this.yylloc.range = [0, 0];
					this.offset = 0;
					return this;
				},
				input: function input() {
					var ch = this._input[0];
					this.yytext += ch;
					this.yyleng++;
					this.offset++;
					this.match += ch;
					this.matched += ch;
					if (ch.match(/(?:\r\n?|\n).*/g)) {
						this.yylineno++;
						this.yylloc.last_line++;
					} else this.yylloc.last_column++;
					if (this.options.ranges) this.yylloc.range[1]++;
					this._input = this._input.slice(1);
					return ch;
				},
				unput: function unput(ch) {
					var len = ch.length;
					var lines = ch.split(/(?:\r\n?|\n)/g);
					this._input = ch + this._input;
					this.yytext = this.yytext.substr(0, this.yytext.length - len - 1);
					this.offset -= len;
					var oldLines = this.match.split(/(?:\r\n?|\n)/g);
					this.match = this.match.substr(0, this.match.length - 1);
					this.matched = this.matched.substr(0, this.matched.length - 1);
					if (lines.length - 1) this.yylineno -= lines.length - 1;
					var r = this.yylloc.range;
					this.yylloc = {
						first_line: this.yylloc.first_line,
						last_line: this.yylineno + 1,
						first_column: this.yylloc.first_column,
						last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
					};
					if (this.options.ranges) this.yylloc.range = [r[0], r[0] + this.yyleng - len];
					return this;
				},
				more: function more() {
					this._more = true;
					return this;
				},
				less: function less(n) {
					this.unput(this.match.slice(n));
				},
				pastInput: function pastInput() {
					var past = this.matched.substr(0, this.matched.length - this.match.length);
					return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
				},
				upcomingInput: function upcomingInput() {
					var next = this.match;
					if (next.length < 20) next += this._input.substr(0, 20 - next.length);
					return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
				},
				showPosition: function showPosition() {
					var pre = this.pastInput();
					var c = new Array(pre.length + 1).join("-");
					return pre + this.upcomingInput() + "\n" + c + "^";
				},
				next: function next() {
					if (this.done) return this.EOF;
					if (!this._input) this.done = true;
					var token, match, tempMatch, index, lines;
					if (!this._more) {
						this.yytext = "";
						this.match = "";
					}
					var rules = this._currentRules();
					for (var i = 0; i < rules.length; i++) {
						tempMatch = this._input.match(this.rules[rules[i]]);
						if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
							match = tempMatch;
							index = i;
							if (!this.options.flex) break;
						}
					}
					if (match) {
						lines = match[0].match(/(?:\r\n?|\n).*/g);
						if (lines) this.yylineno += lines.length;
						this.yylloc = {
							first_line: this.yylloc.last_line,
							last_line: this.yylineno + 1,
							first_column: this.yylloc.last_column,
							last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
						};
						this.yytext += match[0];
						this.match += match[0];
						this.matches = match;
						this.yyleng = this.yytext.length;
						if (this.options.ranges) this.yylloc.range = [this.offset, this.offset += this.yyleng];
						this._more = false;
						this._input = this._input.slice(match[0].length);
						this.matched += match[0];
						token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]);
						if (this.done && this._input) this.done = false;
						if (token) return token;
						else return;
					}
					if (this._input === "") return this.EOF;
					else return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
						text: "",
						token: null,
						line: this.yylineno
					});
				},
				lex: function lex() {
					var r = this.next();
					if (typeof r !== "undefined") return r;
					else return this.lex();
				},
				begin: function begin(condition) {
					this.conditionStack.push(condition);
				},
				popState: function popState() {
					return this.conditionStack.pop();
				},
				_currentRules: function _currentRules() {
					return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
				},
				topState: function topState() {
					return this.conditionStack[this.conditionStack.length - 2];
				},
				pushState: function begin(condition) {
					this.begin(condition);
				}
			};
			lexer.options = {};
			lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
				function strip(start, end) {
					return yy_.yytext = yy_.yytext.substring(start, yy_.yyleng - end + start);
				}
				switch ($avoiding_name_collisions) {
					case 0:
						if (yy_.yytext.slice(-2) === "\\\\") {
							strip(0, 1);
							this.begin("mu");
						} else if (yy_.yytext.slice(-1) === "\\") {
							strip(0, 1);
							this.begin("emu");
						} else this.begin("mu");
						if (yy_.yytext) return 15;
						break;
					case 1: return 15;
					case 2:
						this.popState();
						return 15;
					case 3:
						this.begin("raw");
						return 15;
					case 4:
						this.popState();
						if (this.conditionStack[this.conditionStack.length - 1] === "raw") return 15;
						else {
							strip(5, 9);
							return "END_RAW_BLOCK";
						}
						break;
					case 5: return 15;
					case 6:
						this.popState();
						return 14;
					case 7: return 65;
					case 8: return 68;
					case 9: return 19;
					case 10:
						this.popState();
						this.begin("raw");
						return 23;
					case 11: return 55;
					case 12: return 60;
					case 13: return 29;
					case 14: return 47;
					case 15:
						this.popState();
						return 44;
					case 16:
						this.popState();
						return 44;
					case 17: return 34;
					case 18: return 39;
					case 19: return 51;
					case 20: return 48;
					case 21:
						this.unput(yy_.yytext);
						this.popState();
						this.begin("com");
						break;
					case 22:
						this.popState();
						return 14;
					case 23: return 48;
					case 24: return 73;
					case 25: return 72;
					case 26: return 72;
					case 27: return 87;
					case 28: break;
					case 29:
						this.popState();
						return 54;
					case 30:
						this.popState();
						return 33;
					case 31:
						yy_.yytext = strip(1, 2).replace(/\\"/g, "\"");
						return 80;
					case 32:
						yy_.yytext = strip(1, 2).replace(/\\'/g, "'");
						return 80;
					case 33: return 85;
					case 34: return 82;
					case 35: return 82;
					case 36: return 83;
					case 37: return 84;
					case 38: return 81;
					case 39: return 75;
					case 40: return 77;
					case 41: return 72;
					case 42:
						yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, "$1");
						return 72;
					case 43: return "INVALID";
					case 44: return 5;
				}
			};
			lexer.rules = [
				/^(?:[^\x00]*?(?=(\{\{)))/,
				/^(?:[^\x00]+)/,
				/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,
				/^(?:\{\{\{\{(?=[^\/]))/,
				/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,
				/^(?:[^\x00]+?(?=(\{\{\{\{)))/,
				/^(?:[\s\S]*?--(~)?\}\})/,
				/^(?:\()/,
				/^(?:\))/,
				/^(?:\{\{\{\{)/,
				/^(?:\}\}\}\})/,
				/^(?:\{\{(~)?>)/,
				/^(?:\{\{(~)?#>)/,
				/^(?:\{\{(~)?#\*?)/,
				/^(?:\{\{(~)?\/)/,
				/^(?:\{\{(~)?\^\s*(~)?\}\})/,
				/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,
				/^(?:\{\{(~)?\^)/,
				/^(?:\{\{(~)?\s*else\b)/,
				/^(?:\{\{(~)?\{)/,
				/^(?:\{\{(~)?&)/,
				/^(?:\{\{(~)?!--)/,
				/^(?:\{\{(~)?![\s\S]*?\}\})/,
				/^(?:\{\{(~)?\*?)/,
				/^(?:=)/,
				/^(?:\.\.)/,
				/^(?:\.(?=([=~}\s\/.)|])))/,
				/^(?:[\/.])/,
				/^(?:\s+)/,
				/^(?:\}(~)?\}\})/,
				/^(?:(~)?\}\})/,
				/^(?:"(\\["]|[^"])*")/,
				/^(?:'(\\[']|[^'])*')/,
				/^(?:@)/,
				/^(?:true(?=([~}\s)])))/,
				/^(?:false(?=([~}\s)])))/,
				/^(?:undefined(?=([~}\s)])))/,
				/^(?:null(?=([~}\s)])))/,
				/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,
				/^(?:as\s+\|)/,
				/^(?:\|)/,
				/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,
				/^(?:\[(\\\]|[^\]])*\])/,
				/^(?:.)/,
				/^(?:$)/
			];
			lexer.conditions = {
				"mu": {
					"rules": [
						7,
						8,
						9,
						10,
						11,
						12,
						13,
						14,
						15,
						16,
						17,
						18,
						19,
						20,
						21,
						22,
						23,
						24,
						25,
						26,
						27,
						28,
						29,
						30,
						31,
						32,
						33,
						34,
						35,
						36,
						37,
						38,
						39,
						40,
						41,
						42,
						43,
						44
					],
					"inclusive": false
				},
				"emu": {
					"rules": [2],
					"inclusive": false
				},
				"com": {
					"rules": [6],
					"inclusive": false
				},
				"raw": {
					"rules": [
						3,
						4,
						5
					],
					"inclusive": false
				},
				"INITIAL": {
					"rules": [
						0,
						1,
						44
					],
					"inclusive": true
				}
			};
			return lexer;
		})();
		function Parser() {
			this.yy = {};
		}
		Parser.prototype = parser;
		parser.Parser = Parser;
		return new Parser();
	})();
	module.exports = exports["default"];
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js
var require_visitor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	exports.__esModule = true;
	// istanbul ignore next
	function _interopRequireDefault(obj) {
		return obj && obj.__esModule ? obj : { "default": obj };
	}
	var _exception2 = _interopRequireDefault(require_exception());
	function Visitor() {
		this.parents = [];
	}
	Visitor.prototype = {
		constructor: Visitor,
		mutating: false,
		acceptKey: function acceptKey(node, name) {
			var value = this.accept(node[name]);
			if (this.mutating) {
				if (value && !Visitor.prototype[value.type]) throw new _exception2["default"]("Unexpected node type \"" + value.type + "\" found when accepting " + name + " on " + node.type);
				node[name] = value;
			}
		},
		acceptRequired: function acceptRequired(node, name) {
			this.acceptKey(node, name);
			if (!node[name]) throw new _exception2["default"](node.type + " requires " + name);
		},
		acceptArray: function acceptArray(array) {
			for (var i = 0, l = array.length; i < l; i++) {
				this.acceptKey(array, i);
				if (!array[i]) {
					array.splice(i, 1);
					i--;
					l--;
				}
			}
		},
		accept: function accept(object) {
			if (!object) return;
			/* istanbul ignore next: Sanity code */
			if (!this[object.type]) throw new _exception2["default"]("Unknown type: " + object.type, object);
			if (this.current) this.parents.unshift(this.current);
			this.current = object;
			var ret = this[object.type](object);
			this.current = this.parents.shift();
			if (!this.mutating || ret) return ret;
			else if (ret !== false) return object;
		},
		Program: function Program(program) {
			this.acceptArray(program.body);
		},
		MustacheStatement: visitSubExpression,
		Decorator: visitSubExpression,
		BlockStatement: visitBlock,
		DecoratorBlock: visitBlock,
		PartialStatement: visitPartial,
		PartialBlockStatement: function PartialBlockStatement(partial) {
			visitPartial.call(this, partial);
			this.acceptKey(partial, "program");
		},
		ContentStatement: function ContentStatement() {},
		CommentStatement: function CommentStatement() {},
		SubExpression: visitSubExpression,
		PathExpression: function PathExpression() {},
		StringLiteral: function StringLiteral() {},
		NumberLiteral: function NumberLiteral() {},
		BooleanLiteral: function BooleanLiteral() {},
		UndefinedLiteral: function UndefinedLiteral() {},
		NullLiteral: function NullLiteral() {},
		Hash: function Hash(hash) {
			this.acceptArray(hash.pairs);
		},
		HashPair: function HashPair(pair) {
			this.acceptRequired(pair, "value");
		}
	};
	function visitSubExpression(mustache) {
		this.acceptRequired(mustache, "path");
		this.acceptArray(mustache.params);
		this.acceptKey(mustache, "hash");
	}
	function visitBlock(block) {
		visitSubExpression.call(this, block);
		this.acceptKey(block, "program");
		this.acceptKey(block, "inverse");
	}
	function visitPartial(partial) {
		this.acceptRequired(partial, "name");
		this.acceptArray(partial.params);
		this.acceptKey(partial, "hash");
	}
	exports["default"] = Visitor;
	module.exports = exports["default"];
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js
var require_whitespace_control = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	exports.__esModule = true;
	// istanbul ignore next
	function _interopRequireDefault(obj) {
		return obj && obj.__esModule ? obj : { "default": obj };
	}
	var _visitor2 = _interopRequireDefault(require_visitor());
	function WhitespaceControl() {
		this.options = arguments.length <= 0 || arguments[0] === void 0 ? {} : arguments[0];
	}
	WhitespaceControl.prototype = new _visitor2["default"]();
	WhitespaceControl.prototype.Program = function(program) {
		var doStandalone = !this.options.ignoreStandalone;
		var isRoot = !this.isRootSeen;
		this.isRootSeen = true;
		var body = program.body;
		for (var i = 0, l = body.length; i < l; i++) {
			var current = body[i], strip = this.accept(current);
			if (!strip) continue;
			var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot), _isNextWhitespace = isNextWhitespace(body, i, isRoot), openStandalone = strip.openStandalone && _isPrevWhitespace, closeStandalone = strip.closeStandalone && _isNextWhitespace, inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace;
			if (strip.close) omitRight(body, i, true);
			if (strip.open) omitLeft(body, i, true);
			if (doStandalone && inlineStandalone) {
				omitRight(body, i);
				if (omitLeft(body, i)) {
					if (current.type === "PartialStatement") current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1];
				}
			}
			if (doStandalone && openStandalone) {
				omitRight((current.program || current.inverse).body);
				omitLeft(body, i);
			}
			if (doStandalone && closeStandalone) {
				omitRight(body, i);
				omitLeft((current.inverse || current.program).body);
			}
		}
		return program;
	};
	WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function(block) {
		this.accept(block.program);
		this.accept(block.inverse);
		var program = block.program || block.inverse, inverse = block.program && block.inverse, firstInverse = inverse, lastInverse = inverse;
		if (inverse && inverse.chained) {
			firstInverse = inverse.body[0].program;
			while (lastInverse.chained) lastInverse = lastInverse.body[lastInverse.body.length - 1].program;
		}
		var strip = {
			open: block.openStrip.open,
			close: block.closeStrip.close,
			openStandalone: isNextWhitespace(program.body),
			closeStandalone: isPrevWhitespace((firstInverse || program).body)
		};
		if (block.openStrip.close) omitRight(program.body, null, true);
		if (inverse) {
			var inverseStrip = block.inverseStrip;
			if (inverseStrip.open) omitLeft(program.body, null, true);
			if (inverseStrip.close) omitRight(firstInverse.body, null, true);
			if (block.closeStrip.open) omitLeft(lastInverse.body, null, true);
			if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) {
				omitLeft(program.body);
				omitRight(firstInverse.body);
			}
		} else if (block.closeStrip.open) omitLeft(program.body, null, true);
		return strip;
	};
	WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function(mustache) {
		return mustache.strip;
	};
	WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function(node) {
		/* istanbul ignore next */
		var strip = node.strip || {};
		return {
			inlineStandalone: true,
			open: strip.open,
			close: strip.close
		};
	};
	function isPrevWhitespace(body, i, isRoot) {
		if (i === void 0) i = body.length;
		var prev = body[i - 1], sibling = body[i - 2];
		if (!prev) return isRoot;
		if (prev.type === "ContentStatement") return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original);
	}
	function isNextWhitespace(body, i, isRoot) {
		if (i === void 0) i = -1;
		var next = body[i + 1], sibling = body[i + 2];
		if (!next) return isRoot;
		if (next.type === "ContentStatement") return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original);
	}
	function omitRight(body, i, multiple) {
		var current = body[i == null ? 0 : i + 1];
		if (!current || current.type !== "ContentStatement" || !multiple && current.rightStripped) return;
		var original = current.value;
		current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, "");
		current.rightStripped = current.value !== original;
	}
	function omitLeft(body, i, multiple) {
		var current = body[i == null ? body.length - 1 : i - 1];
		if (!current || current.type !== "ContentStatement" || !multiple && current.leftStripped) return;
		var original = current.value;
		current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, "");
		current.leftStripped = current.value !== original;
		return current.leftStripped;
	}
	exports["default"] = WhitespaceControl;
	module.exports = exports["default"];
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/compiler/helpers.js
var require_helpers = /* @__PURE__ */ __commonJSMin(((exports) => {
	exports.__esModule = true;
	exports.SourceLocation = SourceLocation;
	exports.id = id;
	exports.stripFlags = stripFlags;
	exports.stripComment = stripComment;
	exports.preparePath = preparePath;
	exports.prepareMustache = prepareMustache;
	exports.prepareRawBlock = prepareRawBlock;
	exports.prepareBlock = prepareBlock;
	exports.prepareProgram = prepareProgram;
	exports.preparePartialBlock = preparePartialBlock;
	// istanbul ignore next
	function _interopRequireDefault(obj) {
		return obj && obj.__esModule ? obj : { "default": obj };
	}
	var _exception2 = _interopRequireDefault(require_exception());
	function validateClose(open, close) {
		close = close.path ? close.path.original : close;
		if (open.path.original !== close) {
			var errorNode = { loc: open.path.loc };
			throw new _exception2["default"](open.path.original + " doesn't match " + close, errorNode);
		}
	}
	function SourceLocation(source, locInfo) {
		this.source = source;
		this.start = {
			line: locInfo.first_line,
			column: locInfo.first_column
		};
		this.end = {
			line: locInfo.last_line,
			column: locInfo.last_column
		};
	}
	function id(token) {
		if (/^\[.*\]$/.test(token)) return token.substring(1, token.length - 1);
		else return token;
	}
	function stripFlags(open, close) {
		return {
			open: open.charAt(2) === "~",
			close: close.charAt(close.length - 3) === "~"
		};
	}
	function stripComment(comment) {
		return comment.replace(/^\{\{~?!-?-?/, "").replace(/-?-?~?\}\}$/, "");
	}
	function preparePath(data, parts, loc) {
		loc = this.locInfo(loc);
		var original = data ? "@" : "", dig = [], depth = 0;
		for (var i = 0, l = parts.length; i < l; i++) {
			var part = parts[i].part, isLiteral = parts[i].original !== part;
			original += (parts[i].separator || "") + part;
			if (!isLiteral && (part === ".." || part === "." || part === "this")) {
				if (dig.length > 0) throw new _exception2["default"]("Invalid path: " + original, { loc });
				else if (part === "..") depth++;
			} else dig.push(part);
		}
		return {
			type: "PathExpression",
			data,
			depth,
			parts: dig,
			original,
			loc
		};
	}
	function prepareMustache(path, params, hash, open, strip, locInfo) {
		var escapeFlag = open.charAt(3) || open.charAt(2), escaped = escapeFlag !== "{" && escapeFlag !== "&";
		return {
			type: /\*/.test(open) ? "Decorator" : "MustacheStatement",
			path,
			params,
			hash,
			escaped,
			strip,
			loc: this.locInfo(locInfo)
		};
	}
	function prepareRawBlock(openRawBlock, contents, close, locInfo) {
		validateClose(openRawBlock, close);
		locInfo = this.locInfo(locInfo);
		var program = {
			type: "Program",
			body: contents,
			strip: {},
			loc: locInfo
		};
		return {
			type: "BlockStatement",
			path: openRawBlock.path,
			params: openRawBlock.params,
			hash: openRawBlock.hash,
			program,
			openStrip: {},
			inverseStrip: {},
			closeStrip: {},
			loc: locInfo
		};
	}
	function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) {
		if (close && close.path) validateClose(openBlock, close);
		var decorator = /\*/.test(openBlock.open);
		program.blockParams = openBlock.blockParams;
		var inverse = void 0, inverseStrip = void 0;
		if (inverseAndProgram) {
			if (decorator) throw new _exception2["default"]("Unexpected inverse block on decorator", inverseAndProgram);
			if (inverseAndProgram.chain) inverseAndProgram.program.body[0].closeStrip = close.strip;
			inverseStrip = inverseAndProgram.strip;
			inverse = inverseAndProgram.program;
		}
		if (inverted) {
			inverted = inverse;
			inverse = program;
			program = inverted;
		}
		return {
			type: decorator ? "DecoratorBlock" : "BlockStatement",
			path: openBlock.path,
			params: openBlock.params,
			hash: openBlock.hash,
			program,
			inverse,
			openStrip: openBlock.strip,
			inverseStrip,
			closeStrip: close && close.strip,
			loc: this.locInfo(locInfo)
		};
	}
	function prepareProgram(statements, loc) {
		if (!loc && statements.length) {
			var firstLoc = statements[0].loc, lastLoc = statements[statements.length - 1].loc;
			/* istanbul ignore else */
			if (firstLoc && lastLoc) loc = {
				source: firstLoc.source,
				start: {
					line: firstLoc.start.line,
					column: firstLoc.start.column
				},
				end: {
					line: lastLoc.end.line,
					column: lastLoc.end.column
				}
			};
		}
		return {
			type: "Program",
			body: statements,
			strip: {},
			loc
		};
	}
	function preparePartialBlock(open, program, close, locInfo) {
		validateClose(open, close);
		return {
			type: "PartialBlockStatement",
			name: open.path,
			params: open.params,
			hash: open.hash,
			program,
			openStrip: open.strip,
			closeStrip: close && close.strip,
			loc: this.locInfo(locInfo)
		};
	}
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/compiler/base.js
var require_base = /* @__PURE__ */ __commonJSMin(((exports) => {
	exports.__esModule = true;
	exports.parseWithoutProcessing = parseWithoutProcessing;
	exports.parse = parse;
	// istanbul ignore next
	function _interopRequireWildcard(obj) {
		if (obj && obj.__esModule) return obj;
		else {
			var newObj = {};
			if (obj != null) {
				for (var key in obj) if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
			}
			newObj["default"] = obj;
			return newObj;
		}
	}
	// istanbul ignore next
	function _interopRequireDefault(obj) {
		return obj && obj.__esModule ? obj : { "default": obj };
	}
	var _parser2 = _interopRequireDefault(require_parser());
	var _whitespaceControl2 = _interopRequireDefault(require_whitespace_control());
	var Helpers = _interopRequireWildcard(require_helpers());
	var _exception2 = _interopRequireDefault(require_exception());
	var _utils = require_utils();
	exports.parser = _parser2["default"];
	var yy = {};
	_utils.extend(yy, Helpers);
	function parseWithoutProcessing(input, options) {
		if (input.type === "Program") {
			validateInputAst(input);
			return input;
		}
		_parser2["default"].yy = yy;
		yy.locInfo = function(locInfo) {
			return new yy.SourceLocation(options && options.srcName, locInfo);
		};
		return _parser2["default"].parse(input);
	}
	function parse(input, options) {
		var ast = parseWithoutProcessing(input, options);
		return new _whitespaceControl2["default"](options).accept(ast);
	}
	function validateInputAst(ast) {
		validateAstNode(ast);
	}
	function validateAstNode(node) {
		if (node == null) return;
		if (Array.isArray(node)) {
			node.forEach(validateAstNode);
			return;
		}
		if (typeof node !== "object") return;
		if (node.type === "PathExpression") {
			if (!isValidDepth(node.depth)) throw new _exception2["default"]("Invalid AST: PathExpression.depth must be an integer");
			if (!Array.isArray(node.parts)) throw new _exception2["default"]("Invalid AST: PathExpression.parts must be an array");
			for (var i = 0; i < node.parts.length; i++) if (typeof node.parts[i] !== "string") throw new _exception2["default"]("Invalid AST: PathExpression.parts must only contain strings");
		} else if (node.type === "NumberLiteral") {
			if (typeof node.value !== "number" || !isFinite(node.value)) throw new _exception2["default"]("Invalid AST: NumberLiteral.value must be a number");
		} else if (node.type === "BooleanLiteral") {
			if (typeof node.value !== "boolean") throw new _exception2["default"]("Invalid AST: BooleanLiteral.value must be a boolean");
		}
		Object.keys(node).forEach(function(propertyName) {
			if (propertyName === "loc") return;
			validateAstNode(node[propertyName]);
		});
	}
	function isValidDepth(depth) {
		return typeof depth === "number" && isFinite(depth) && Math.floor(depth) === depth && depth >= 0;
	}
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js
var require_compiler = /* @__PURE__ */ __commonJSMin(((exports) => {
	exports.__esModule = true;
	exports.Compiler = Compiler;
	exports.precompile = precompile;
	exports.compile = compile;
	// istanbul ignore next
	function _interopRequireDefault(obj) {
		return obj && obj.__esModule ? obj : { "default": obj };
	}
	var _exception2 = _interopRequireDefault(require_exception());
	var _utils = require_utils();
	var _ast2 = _interopRequireDefault(require_ast());
	var slice = [].slice;
	function Compiler() {}
	Compiler.prototype = {
		compiler: Compiler,
		equals: function equals(other) {
			var len = this.opcodes.length;
			if (other.opcodes.length !== len) return false;
			for (var i = 0; i < len; i++) {
				var opcode = this.opcodes[i], otherOpcode = other.opcodes[i];
				if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) return false;
			}
			len = this.children.length;
			for (var i = 0; i < len; i++) if (!this.children[i].equals(other.children[i])) return false;
			return true;
		},
		guid: 0,
		compile: function compile(program, options) {
			this.sourceNode = [];
			this.opcodes = [];
			this.children = [];
			this.options = options;
			this.stringParams = options.stringParams;
			this.trackIds = options.trackIds;
			options.blockParams = options.blockParams || [];
			options.knownHelpers = _utils.extend(Object.create(null), {
				helperMissing: true,
				blockHelperMissing: true,
				each: true,
				"if": true,
				unless: true,
				"with": true,
				log: true,
				lookup: true
			}, options.knownHelpers);
			return this.accept(program);
		},
		compileProgram: function compileProgram(program) {
			var result = new this.compiler().compile(program, this.options), guid = this.guid++;
			this.usePartial = this.usePartial || result.usePartial;
			this.children[guid] = result;
			this.useDepths = this.useDepths || result.useDepths;
			return guid;
		},
		accept: function accept(node) {
			/* istanbul ignore next: Sanity code */
			if (!this[node.type]) throw new _exception2["default"]("Unknown type: " + node.type, node);
			this.sourceNode.unshift(node);
			var ret = this[node.type](node);
			this.sourceNode.shift();
			return ret;
		},
		Program: function Program(program) {
			this.options.blockParams.unshift(program.blockParams);
			var body = program.body, bodyLength = body.length;
			for (var i = 0; i < bodyLength; i++) this.accept(body[i]);
			this.options.blockParams.shift();
			this.isSimple = bodyLength === 1;
			this.blockParams = program.blockParams ? program.blockParams.length : 0;
			return this;
		},
		BlockStatement: function BlockStatement(block) {
			transformLiteralToPath(block);
			var program = block.program, inverse = block.inverse;
			program = program && this.compileProgram(program);
			inverse = inverse && this.compileProgram(inverse);
			var type = this.classifySexpr(block);
			if (type === "helper") this.helperSexpr(block, program, inverse);
			else if (type === "simple") {
				this.simpleSexpr(block);
				this.opcode("pushProgram", program);
				this.opcode("pushProgram", inverse);
				this.opcode("emptyHash");
				this.opcode("blockValue", block.path.original);
			} else {
				this.ambiguousSexpr(block, program, inverse);
				this.opcode("pushProgram", program);
				this.opcode("pushProgram", inverse);
				this.opcode("emptyHash");
				this.opcode("ambiguousBlockValue");
			}
			this.opcode("append");
		},
		DecoratorBlock: function DecoratorBlock(decorator) {
			var program = decorator.program && this.compileProgram(decorator.program);
			var params = this.setupFullMustacheParams(decorator, program, void 0), path = decorator.path;
			this.useDecorators = true;
			this.opcode("registerDecorator", params.length, path.original);
		},
		PartialStatement: function PartialStatement(partial) {
			this.usePartial = true;
			var program = partial.program;
			if (program) program = this.compileProgram(partial.program);
			var params = partial.params;
			if (params.length > 1) throw new _exception2["default"]("Unsupported number of partial arguments: " + params.length, partial);
			else if (!params.length) if (this.options.explicitPartialContext) this.opcode("pushLiteral", "undefined");
			else params.push({
				type: "PathExpression",
				parts: [],
				depth: 0
			});
			var partialName = partial.name.original, isDynamic = partial.name.type === "SubExpression";
			if (isDynamic) this.accept(partial.name);
			this.setupFullMustacheParams(partial, program, void 0, true);
			var indent = partial.indent || "";
			if (this.options.preventIndent && indent) {
				this.opcode("appendContent", indent);
				indent = "";
			}
			this.opcode("invokePartial", isDynamic, partialName, indent);
			this.opcode("append");
		},
		PartialBlockStatement: function PartialBlockStatement(partialBlock) {
			this.PartialStatement(partialBlock);
		},
		MustacheStatement: function MustacheStatement(mustache) {
			this.SubExpression(mustache);
			if (mustache.escaped && !this.options.noEscape) this.opcode("appendEscaped");
			else this.opcode("append");
		},
		Decorator: function Decorator(decorator) {
			this.DecoratorBlock(decorator);
		},
		ContentStatement: function ContentStatement(content) {
			if (content.value) this.opcode("appendContent", content.value);
		},
		CommentStatement: function CommentStatement() {},
		SubExpression: function SubExpression(sexpr) {
			transformLiteralToPath(sexpr);
			var type = this.classifySexpr(sexpr);
			if (type === "simple") this.simpleSexpr(sexpr);
			else if (type === "helper") this.helperSexpr(sexpr);
			else this.ambiguousSexpr(sexpr);
		},
		ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) {
			var path = sexpr.path, name = path.parts[0], isBlock = program != null || inverse != null;
			this.opcode("getContext", path.depth);
			this.opcode("pushProgram", program);
			this.opcode("pushProgram", inverse);
			path.strict = true;
			this.accept(path);
			this.opcode("invokeAmbiguous", name, isBlock);
		},
		simpleSexpr: function simpleSexpr(sexpr) {
			var path = sexpr.path;
			path.strict = true;
			this.accept(path);
			this.opcode("resolvePossibleLambda");
		},
		helperSexpr: function helperSexpr(sexpr, program, inverse) {
			var params = this.setupFullMustacheParams(sexpr, program, inverse), path = sexpr.path, name = path.parts[0];
			if (this.options.knownHelpers[name]) this.opcode("invokeKnownHelper", params.length, name);
			else if (this.options.knownHelpersOnly) throw new _exception2["default"]("You specified knownHelpersOnly, but used the unknown helper " + name, sexpr);
			else {
				path.strict = true;
				path.falsy = true;
				this.accept(path);
				this.opcode("invokeHelper", params.length, path.original, _ast2["default"].helpers.simpleId(path));
			}
		},
		PathExpression: function PathExpression(path) {
			this.addDepth(path.depth);
			this.opcode("getContext", path.depth);
			var name = path.parts[0], scoped = _ast2["default"].helpers.scopedId(path), blockParamId = !path.depth && !scoped && this.blockParamIndex(name);
			if (blockParamId) this.opcode("lookupBlockParam", blockParamId, path.parts);
			else if (!name) this.opcode("pushContext");
			else if (path.data) {
				this.options.data = true;
				this.opcode("lookupData", path.depth, path.parts, path.strict);
			} else this.opcode("lookupOnContext", path.parts, path.falsy, path.strict, scoped);
		},
		StringLiteral: function StringLiteral(string) {
			this.opcode("pushString", string.value);
		},
		NumberLiteral: function NumberLiteral(number) {
			this.opcode("pushLiteral", number.value);
		},
		BooleanLiteral: function BooleanLiteral(bool) {
			this.opcode("pushLiteral", bool.value);
		},
		UndefinedLiteral: function UndefinedLiteral() {
			this.opcode("pushLiteral", "undefined");
		},
		NullLiteral: function NullLiteral() {
			this.opcode("pushLiteral", "null");
		},
		Hash: function Hash(hash) {
			var pairs = hash.pairs, i = 0, l = pairs.length;
			this.opcode("pushHash");
			for (; i < l; i++) this.pushParam(pairs[i].value);
			while (i--) this.opcode("assignToHash", pairs[i].key);
			this.opcode("popHash");
		},
		opcode: function opcode(name) {
			this.opcodes.push({
				opcode: name,
				args: slice.call(arguments, 1),
				loc: this.sourceNode[0].loc
			});
		},
		addDepth: function addDepth(depth) {
			if (!depth) return;
			this.useDepths = true;
		},
		classifySexpr: function classifySexpr(sexpr) {
			var isSimple = _ast2["default"].helpers.simpleId(sexpr.path);
			var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]);
			var isHelper = !isBlockParam && _ast2["default"].helpers.helperExpression(sexpr);
			var isEligible = !isBlockParam && (isHelper || isSimple);
			if (isEligible && !isHelper) {
				var _name = sexpr.path.parts[0], options = this.options;
				if (options.knownHelpers[_name]) isHelper = true;
				else if (options.knownHelpersOnly) isEligible = false;
			}
			if (isHelper) return "helper";
			else if (isEligible) return "ambiguous";
			else return "simple";
		},
		pushParams: function pushParams(params) {
			for (var i = 0, l = params.length; i < l; i++) this.pushParam(params[i]);
		},
		pushParam: function pushParam(val) {
			var value = val.value != null ? val.value : val.original || "";
			if (this.stringParams) {
				if (value.replace) value = value.replace(/^(\.?\.\/)*/g, "").replace(/\//g, ".");
				if (val.depth) this.addDepth(val.depth);
				this.opcode("getContext", val.depth || 0);
				this.opcode("pushStringParam", value, val.type);
				if (val.type === "SubExpression") this.accept(val);
			} else {
				if (this.trackIds) {
					var blockParamIndex = void 0;
					if (val.parts && !_ast2["default"].helpers.scopedId(val) && !val.depth) blockParamIndex = this.blockParamIndex(val.parts[0]);
					if (blockParamIndex) {
						var blockParamChild = val.parts.slice(1).join(".");
						this.opcode("pushId", "BlockParam", blockParamIndex, blockParamChild);
					} else {
						value = val.original || value;
						if (value.replace) value = value.replace(/^this(?:\.|$)/, "").replace(/^\.\//, "").replace(/^\.$/, "");
						this.opcode("pushId", val.type, value);
					}
				}
				this.accept(val);
			}
		},
		setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) {
			var params = sexpr.params;
			this.pushParams(params);
			this.opcode("pushProgram", program);
			this.opcode("pushProgram", inverse);
			if (sexpr.hash) this.accept(sexpr.hash);
			else this.opcode("emptyHash", omitEmpty);
			return params;
		},
		blockParamIndex: function blockParamIndex(name) {
			for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) {
				var blockParams = this.options.blockParams[depth], param = blockParams && _utils.indexOf(blockParams, name);
				if (blockParams && param >= 0) return [depth, param];
			}
		}
	};
	function precompile(input, options, env) {
		if (input == null || typeof input !== "string" && input.type !== "Program") throw new _exception2["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed " + input);
		options = options || {};
		if (!("data" in options)) options.data = true;
		if (options.compat) options.useDepths = true;
		var ast = env.parse(input, options), environment = new env.Compiler().compile(ast, options);
		return new env.JavaScriptCompiler().compile(environment, options);
	}
	function compile(input, options, env) {
		if (options === void 0) options = {};
		if (input == null || typeof input !== "string" && input.type !== "Program") throw new _exception2["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed " + input);
		options = _utils.extend({}, options);
		if (!("data" in options)) options.data = true;
		if (options.compat) options.useDepths = true;
		var compiled = void 0;
		function compileInput() {
			var ast = env.parse(input, options), environment = new env.Compiler().compile(ast, options), templateSpec = new env.JavaScriptCompiler().compile(environment, options, void 0, true);
			return env.template(templateSpec);
		}
		function ret(context, execOptions) {
			if (!compiled) compiled = compileInput();
			return compiled.call(this, context, execOptions);
		}
		ret._setup = function(setupOptions) {
			if (!compiled) compiled = compileInput();
			return compiled._setup(setupOptions);
		};
		ret._child = function(i, data, blockParams, depths) {
			if (!compiled) compiled = compileInput();
			return compiled._child(i, data, blockParams, depths);
		};
		return ret;
	}
	function argEquals(a, b) {
		if (a === b) return true;
		if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) {
			for (var i = 0; i < a.length; i++) if (!argEquals(a[i], b[i])) return false;
			return true;
		}
	}
	function transformLiteralToPath(sexpr) {
		if (!sexpr.path.parts) {
			var literal = sexpr.path;
			sexpr.path = {
				type: "PathExpression",
				data: false,
				depth: 0,
				parts: [literal.original + ""],
				original: literal.original + "",
				loc: literal.loc
			};
		}
	}
}));
//#endregion
//#region ../../node_modules/source-map/lib/base64.js
var require_base64 = /* @__PURE__ */ __commonJSMin(((exports) => {
	var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
	/**
	* Encode an integer in the range of 0 to 63 to a single base 64 digit.
	*/
	exports.encode = function(number) {
		if (0 <= number && number < intToCharMap.length) return intToCharMap[number];
		throw new TypeError("Must be between 0 and 63: " + number);
	};
	/**
	* Decode a single base 64 character code digit to an integer. Returns -1 on
	* failure.
	*/
	exports.decode = function(charCode) {
		var bigA = 65;
		var bigZ = 90;
		var littleA = 97;
		var littleZ = 122;
		var zero = 48;
		var nine = 57;
		var plus = 43;
		var slash = 47;
		var littleOffset = 26;
		var numberOffset = 52;
		if (bigA <= charCode && charCode <= bigZ) return charCode - bigA;
		if (littleA <= charCode && charCode <= littleZ) return charCode - littleA + littleOffset;
		if (zero <= charCode && charCode <= nine) return charCode - zero + numberOffset;
		if (charCode == plus) return 62;
		if (charCode == slash) return 63;
		return -1;
	};
}));
//#endregion
//#region ../../node_modules/source-map/lib/base64-vlq.js
var require_base64_vlq = /* @__PURE__ */ __commonJSMin(((exports) => {
	var base64 = require_base64();
	var VLQ_BASE_SHIFT = 5;
	var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
	var VLQ_BASE_MASK = VLQ_BASE - 1;
	var VLQ_CONTINUATION_BIT = VLQ_BASE;
	/**
	* Converts from a two-complement value to a value where the sign bit is
	* placed in the least significant bit.  For example, as decimals:
	*   1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
	*   2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
	*/
	function toVLQSigned(aValue) {
		return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
	}
	/**
	* Converts to a two-complement value from a value where the sign bit is
	* placed in the least significant bit.  For example, as decimals:
	*   2 (10 binary) becomes 1, 3 (11 binary) becomes -1
	*   4 (100 binary) becomes 2, 5 (101 binary) becomes -2
	*/
	function fromVLQSigned(aValue) {
		var isNegative = (aValue & 1) === 1;
		var shifted = aValue >> 1;
		return isNegative ? -shifted : shifted;
	}
	/**
	* Returns the base 64 VLQ encoded value.
	*/
	exports.encode = function base64VLQ_encode(aValue) {
		var encoded = "";
		var digit;
		var vlq = toVLQSigned(aValue);
		do {
			digit = vlq & VLQ_BASE_MASK;
			vlq >>>= VLQ_BASE_SHIFT;
			if (vlq > 0) digit |= VLQ_CONTINUATION_BIT;
			encoded += base64.encode(digit);
		} while (vlq > 0);
		return encoded;
	};
	/**
	* Decodes the next base 64 VLQ value from the given string and returns the
	* value and the rest of the string via the out parameter.
	*/
	exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
		var strLen = aStr.length;
		var result = 0;
		var shift = 0;
		var continuation, digit;
		do {
			if (aIndex >= strLen) throw new Error("Expected more digits in base 64 VLQ value.");
			digit = base64.decode(aStr.charCodeAt(aIndex++));
			if (digit === -1) throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
			continuation = !!(digit & VLQ_CONTINUATION_BIT);
			digit &= VLQ_BASE_MASK;
			result = result + (digit << shift);
			shift += VLQ_BASE_SHIFT;
		} while (continuation);
		aOutParam.value = fromVLQSigned(result);
		aOutParam.rest = aIndex;
	};
}));
//#endregion
//#region ../../node_modules/source-map/lib/util.js
var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
	/**
	* This is a helper function for getting values from parameter/options
	* objects.
	*
	* @param args The object we are extracting values from
	* @param name The name of the property we are getting.
	* @param defaultValue An optional value to return if the property is missing
	* from the object. If this is not specified and the property is missing, an
	* error will be thrown.
	*/
	function getArg(aArgs, aName, aDefaultValue) {
		if (aName in aArgs) return aArgs[aName];
		else if (arguments.length === 3) return aDefaultValue;
		else throw new Error("\"" + aName + "\" is a required argument.");
	}
	exports.getArg = getArg;
	var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
	var dataUrlRegexp = /^data:.+\,.+$/;
	function urlParse(aUrl) {
		var match = aUrl.match(urlRegexp);
		if (!match) return null;
		return {
			scheme: match[1],
			auth: match[2],
			host: match[3],
			port: match[4],
			path: match[5]
		};
	}
	exports.urlParse = urlParse;
	function urlGenerate(aParsedUrl) {
		var url = "";
		if (aParsedUrl.scheme) url += aParsedUrl.scheme + ":";
		url += "//";
		if (aParsedUrl.auth) url += aParsedUrl.auth + "@";
		if (aParsedUrl.host) url += aParsedUrl.host;
		if (aParsedUrl.port) url += ":" + aParsedUrl.port;
		if (aParsedUrl.path) url += aParsedUrl.path;
		return url;
	}
	exports.urlGenerate = urlGenerate;
	/**
	* Normalizes a path, or the path portion of a URL:
	*
	* - Replaces consecutive slashes with one slash.
	* - Removes unnecessary '.' parts.
	* - Removes unnecessary '<dir>/..' parts.
	*
	* Based on code in the Node.js 'path' core module.
	*
	* @param aPath The path or url to normalize.
	*/
	function normalize(aPath) {
		var path = aPath;
		var url = urlParse(aPath);
		if (url) {
			if (!url.path) return aPath;
			path = url.path;
		}
		var isAbsolute = exports.isAbsolute(path);
		var parts = path.split(/\/+/);
		for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
			part = parts[i];
			if (part === ".") parts.splice(i, 1);
			else if (part === "..") up++;
			else if (up > 0) if (part === "") {
				parts.splice(i + 1, up);
				up = 0;
			} else {
				parts.splice(i, 2);
				up--;
			}
		}
		path = parts.join("/");
		if (path === "") path = isAbsolute ? "/" : ".";
		if (url) {
			url.path = path;
			return urlGenerate(url);
		}
		return path;
	}
	exports.normalize = normalize;
	/**
	* Joins two paths/URLs.
	*
	* @param aRoot The root path or URL.
	* @param aPath The path or URL to be joined with the root.
	*
	* - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
	*   scheme-relative URL: Then the scheme of aRoot, if any, is prepended
	*   first.
	* - Otherwise aPath is a path. If aRoot is a URL, then its path portion
	*   is updated with the result and aRoot is returned. Otherwise the result
	*   is returned.
	*   - If aPath is absolute, the result is aPath.
	*   - Otherwise the two paths are joined with a slash.
	* - Joining for example 'http://' and 'www.example.com' is also supported.
	*/
	function join(aRoot, aPath) {
		if (aRoot === "") aRoot = ".";
		if (aPath === "") aPath = ".";
		var aPathUrl = urlParse(aPath);
		var aRootUrl = urlParse(aRoot);
		if (aRootUrl) aRoot = aRootUrl.path || "/";
		if (aPathUrl && !aPathUrl.scheme) {
			if (aRootUrl) aPathUrl.scheme = aRootUrl.scheme;
			return urlGenerate(aPathUrl);
		}
		if (aPathUrl || aPath.match(dataUrlRegexp)) return aPath;
		if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
			aRootUrl.host = aPath;
			return urlGenerate(aRootUrl);
		}
		var joined = aPath.charAt(0) === "/" ? aPath : normalize(aRoot.replace(/\/+$/, "") + "/" + aPath);
		if (aRootUrl) {
			aRootUrl.path = joined;
			return urlGenerate(aRootUrl);
		}
		return joined;
	}
	exports.join = join;
	exports.isAbsolute = function(aPath) {
		return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
	};
	/**
	* Make a path relative to a URL or another path.
	*
	* @param aRoot The root path or URL.
	* @param aPath The path or URL to be made relative to aRoot.
	*/
	function relative(aRoot, aPath) {
		if (aRoot === "") aRoot = ".";
		aRoot = aRoot.replace(/\/$/, "");
		var level = 0;
		while (aPath.indexOf(aRoot + "/") !== 0) {
			var index = aRoot.lastIndexOf("/");
			if (index < 0) return aPath;
			aRoot = aRoot.slice(0, index);
			if (aRoot.match(/^([^\/]+:\/)?\/*$/)) return aPath;
			++level;
		}
		return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
	}
	exports.relative = relative;
	var supportsNullProto = function() {
		return !("__proto__" in Object.create(null));
	}();
	function identity(s) {
		return s;
	}
	/**
	* Because behavior goes wacky when you set `__proto__` on objects, we
	* have to prefix all the strings in our set with an arbitrary character.
	*
	* See https://github.com/mozilla/source-map/pull/31 and
	* https://github.com/mozilla/source-map/issues/30
	*
	* @param String aStr
	*/
	function toSetString(aStr) {
		if (isProtoString(aStr)) return "$" + aStr;
		return aStr;
	}
	exports.toSetString = supportsNullProto ? identity : toSetString;
	function fromSetString(aStr) {
		if (isProtoString(aStr)) return aStr.slice(1);
		return aStr;
	}
	exports.fromSetString = supportsNullProto ? identity : fromSetString;
	function isProtoString(s) {
		if (!s) return false;
		var length = s.length;
		if (length < 9) return false;
		if (s.charCodeAt(length - 1) !== 95 || s.charCodeAt(length - 2) !== 95 || s.charCodeAt(length - 3) !== 111 || s.charCodeAt(length - 4) !== 116 || s.charCodeAt(length - 5) !== 111 || s.charCodeAt(length - 6) !== 114 || s.charCodeAt(length - 7) !== 112 || s.charCodeAt(length - 8) !== 95 || s.charCodeAt(length - 9) !== 95) return false;
		for (var i = length - 10; i >= 0; i--) if (s.charCodeAt(i) !== 36) return false;
		return true;
	}
	/**
	* Comparator between two mappings where the original positions are compared.
	*
	* Optionally pass in `true` as `onlyCompareGenerated` to consider two
	* mappings with the same original source/line/column, but different generated
	* line and column the same. Useful when searching for a mapping with a
	* stubbed out mapping.
	*/
	function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
		var cmp = strcmp(mappingA.source, mappingB.source);
		if (cmp !== 0) return cmp;
		cmp = mappingA.originalLine - mappingB.originalLine;
		if (cmp !== 0) return cmp;
		cmp = mappingA.originalColumn - mappingB.originalColumn;
		if (cmp !== 0 || onlyCompareOriginal) return cmp;
		cmp = mappingA.generatedColumn - mappingB.generatedColumn;
		if (cmp !== 0) return cmp;
		cmp = mappingA.generatedLine - mappingB.generatedLine;
		if (cmp !== 0) return cmp;
		return strcmp(mappingA.name, mappingB.name);
	}
	exports.compareByOriginalPositions = compareByOriginalPositions;
	/**
	* Comparator between two mappings with deflated source and name indices where
	* the generated positions are compared.
	*
	* Optionally pass in `true` as `onlyCompareGenerated` to consider two
	* mappings with the same generated line and column, but different
	* source/name/original line and column the same. Useful when searching for a
	* mapping with a stubbed out mapping.
	*/
	function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
		var cmp = mappingA.generatedLine - mappingB.generatedLine;
		if (cmp !== 0) return cmp;
		cmp = mappingA.generatedColumn - mappingB.generatedColumn;
		if (cmp !== 0 || onlyCompareGenerated) return cmp;
		cmp = strcmp(mappingA.source, mappingB.source);
		if (cmp !== 0) return cmp;
		cmp = mappingA.originalLine - mappingB.originalLine;
		if (cmp !== 0) return cmp;
		cmp = mappingA.originalColumn - mappingB.originalColumn;
		if (cmp !== 0) return cmp;
		return strcmp(mappingA.name, mappingB.name);
	}
	exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
	function strcmp(aStr1, aStr2) {
		if (aStr1 === aStr2) return 0;
		if (aStr1 === null) return 1;
		if (aStr2 === null) return -1;
		if (aStr1 > aStr2) return 1;
		return -1;
	}
	/**
	* Comparator between two mappings with inflated source and name strings where
	* the generated positions are compared.
	*/
	function compareByGeneratedPositionsInflated(mappingA, mappingB) {
		var cmp = mappingA.generatedLine - mappingB.generatedLine;
		if (cmp !== 0) return cmp;
		cmp = mappingA.generatedColumn - mappingB.generatedColumn;
		if (cmp !== 0) return cmp;
		cmp = strcmp(mappingA.source, mappingB.source);
		if (cmp !== 0) return cmp;
		cmp = mappingA.originalLine - mappingB.originalLine;
		if (cmp !== 0) return cmp;
		cmp = mappingA.originalColumn - mappingB.originalColumn;
		if (cmp !== 0) return cmp;
		return strcmp(mappingA.name, mappingB.name);
	}
	exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
	/**
	* Strip any JSON XSSI avoidance prefix from the string (as documented
	* in the source maps specification), and then parse the string as
	* JSON.
	*/
	function parseSourceMapInput(str) {
		return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ""));
	}
	exports.parseSourceMapInput = parseSourceMapInput;
	/**
	* Compute the URL of a source given the the source root, the source's
	* URL, and the source map's URL.
	*/
	function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
		sourceURL = sourceURL || "";
		if (sourceRoot) {
			if (sourceRoot[sourceRoot.length - 1] !== "/" && sourceURL[0] !== "/") sourceRoot += "/";
			sourceURL = sourceRoot + sourceURL;
		}
		if (sourceMapURL) {
			var parsed = urlParse(sourceMapURL);
			if (!parsed) throw new Error("sourceMapURL could not be parsed");
			if (parsed.path) {
				var index = parsed.path.lastIndexOf("/");
				if (index >= 0) parsed.path = parsed.path.substring(0, index + 1);
			}
			sourceURL = join(urlGenerate(parsed), sourceURL);
		}
		return normalize(sourceURL);
	}
	exports.computeSourceURL = computeSourceURL;
}));
//#endregion
//#region ../../node_modules/source-map/lib/array-set.js
var require_array_set = /* @__PURE__ */ __commonJSMin(((exports) => {
	var util = require_util();
	var has = Object.prototype.hasOwnProperty;
	var hasNativeMap = typeof Map !== "undefined";
	/**
	* A data structure which is a combination of an array and a set. Adding a new
	* member is O(1), testing for membership is O(1), and finding the index of an
	* element is O(1). Removing elements from the set is not supported. Only
	* strings are supported for membership.
	*/
	function ArraySet() {
		this._array = [];
		this._set = hasNativeMap ? /* @__PURE__ */ new Map() : Object.create(null);
	}
	/**
	* Static method for creating ArraySet instances from an existing array.
	*/
	ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
		var set = new ArraySet();
		for (var i = 0, len = aArray.length; i < len; i++) set.add(aArray[i], aAllowDuplicates);
		return set;
	};
	/**
	* Return how many unique items are in this ArraySet. If duplicates have been
	* added, than those do not count towards the size.
	*
	* @returns Number
	*/
	ArraySet.prototype.size = function ArraySet_size() {
		return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
	};
	/**
	* Add the given string to this set.
	*
	* @param String aStr
	*/
	ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
		var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
		var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
		var idx = this._array.length;
		if (!isDuplicate || aAllowDuplicates) this._array.push(aStr);
		if (!isDuplicate) if (hasNativeMap) this._set.set(aStr, idx);
		else this._set[sStr] = idx;
	};
	/**
	* Is the given string a member of this set?
	*
	* @param String aStr
	*/
	ArraySet.prototype.has = function ArraySet_has(aStr) {
		if (hasNativeMap) return this._set.has(aStr);
		else {
			var sStr = util.toSetString(aStr);
			return has.call(this._set, sStr);
		}
	};
	/**
	* What is the index of the given string in the array?
	*
	* @param String aStr
	*/
	ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
		if (hasNativeMap) {
			var idx = this._set.get(aStr);
			if (idx >= 0) return idx;
		} else {
			var sStr = util.toSetString(aStr);
			if (has.call(this._set, sStr)) return this._set[sStr];
		}
		throw new Error("\"" + aStr + "\" is not in the set.");
	};
	/**
	* What is the element at the given index?
	*
	* @param Number aIdx
	*/
	ArraySet.prototype.at = function ArraySet_at(aIdx) {
		if (aIdx >= 0 && aIdx < this._array.length) return this._array[aIdx];
		throw new Error("No element indexed by " + aIdx);
	};
	/**
	* Returns the array representation of this set (which has the proper indices
	* indicated by indexOf). Note that this is a copy of the internal array used
	* for storing the members so that no one can mess with internal state.
	*/
	ArraySet.prototype.toArray = function ArraySet_toArray() {
		return this._array.slice();
	};
	exports.ArraySet = ArraySet;
}));
//#endregion
//#region ../../node_modules/source-map/lib/mapping-list.js
var require_mapping_list = /* @__PURE__ */ __commonJSMin(((exports) => {
	var util = require_util();
	/**
	* Determine whether mappingB is after mappingA with respect to generated
	* position.
	*/
	function generatedPositionAfter(mappingA, mappingB) {
		var lineA = mappingA.generatedLine;
		var lineB = mappingB.generatedLine;
		var columnA = mappingA.generatedColumn;
		var columnB = mappingB.generatedColumn;
		return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
	}
	/**
	* A data structure to provide a sorted view of accumulated mappings in a
	* performance conscious manner. It trades a neglibable overhead in general
	* case for a large speedup in case of mappings being added in order.
	*/
	function MappingList() {
		this._array = [];
		this._sorted = true;
		this._last = {
			generatedLine: -1,
			generatedColumn: 0
		};
	}
	/**
	* Iterate through internal items. This method takes the same arguments that
	* `Array.prototype.forEach` takes.
	*
	* NOTE: The order of the mappings is NOT guaranteed.
	*/
	MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {
		this._array.forEach(aCallback, aThisArg);
	};
	/**
	* Add the given source mapping.
	*
	* @param Object aMapping
	*/
	MappingList.prototype.add = function MappingList_add(aMapping) {
		if (generatedPositionAfter(this._last, aMapping)) {
			this._last = aMapping;
			this._array.push(aMapping);
		} else {
			this._sorted = false;
			this._array.push(aMapping);
		}
	};
	/**
	* Returns the flat, sorted array of mappings. The mappings are sorted by
	* generated position.
	*
	* WARNING: This method returns internal data without copying, for
	* performance. The return value must NOT be mutated, and should be treated as
	* an immutable borrow. If you want to take ownership, you must make your own
	* copy.
	*/
	MappingList.prototype.toArray = function MappingList_toArray() {
		if (!this._sorted) {
			this._array.sort(util.compareByGeneratedPositionsInflated);
			this._sorted = true;
		}
		return this._array;
	};
	exports.MappingList = MappingList;
}));
//#endregion
//#region ../../node_modules/source-map/lib/source-map-generator.js
var require_source_map_generator = /* @__PURE__ */ __commonJSMin(((exports) => {
	var base64VLQ = require_base64_vlq();
	var util = require_util();
	var ArraySet = require_array_set().ArraySet;
	var MappingList = require_mapping_list().MappingList;
	/**
	* An instance of the SourceMapGenerator represents a source map which is
	* being built incrementally. You may pass an object with the following
	* properties:
	*
	*   - file: The filename of the generated source.
	*   - sourceRoot: A root for all relative URLs in this source map.
	*/
	function SourceMapGenerator(aArgs) {
		if (!aArgs) aArgs = {};
		this._file = util.getArg(aArgs, "file", null);
		this._sourceRoot = util.getArg(aArgs, "sourceRoot", null);
		this._skipValidation = util.getArg(aArgs, "skipValidation", false);
		this._sources = new ArraySet();
		this._names = new ArraySet();
		this._mappings = new MappingList();
		this._sourcesContents = null;
	}
	SourceMapGenerator.prototype._version = 3;
	/**
	* Creates a new SourceMapGenerator based on a SourceMapConsumer
	*
	* @param aSourceMapConsumer The SourceMap.
	*/
	SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
		var sourceRoot = aSourceMapConsumer.sourceRoot;
		var generator = new SourceMapGenerator({
			file: aSourceMapConsumer.file,
			sourceRoot
		});
		aSourceMapConsumer.eachMapping(function(mapping) {
			var newMapping = { generated: {
				line: mapping.generatedLine,
				column: mapping.generatedColumn
			} };
			if (mapping.source != null) {
				newMapping.source = mapping.source;
				if (sourceRoot != null) newMapping.source = util.relative(sourceRoot, newMapping.source);
				newMapping.original = {
					line: mapping.originalLine,
					column: mapping.originalColumn
				};
				if (mapping.name != null) newMapping.name = mapping.name;
			}
			generator.addMapping(newMapping);
		});
		aSourceMapConsumer.sources.forEach(function(sourceFile) {
			var sourceRelative = sourceFile;
			if (sourceRoot !== null) sourceRelative = util.relative(sourceRoot, sourceFile);
			if (!generator._sources.has(sourceRelative)) generator._sources.add(sourceRelative);
			var content = aSourceMapConsumer.sourceContentFor(sourceFile);
			if (content != null) generator.setSourceContent(sourceFile, content);
		});
		return generator;
	};
	/**
	* Add a single mapping from original source line and column to the generated
	* source's line and column for this source map being created. The mapping
	* object should have the following properties:
	*
	*   - generated: An object with the generated line and column positions.
	*   - original: An object with the original line and column positions.
	*   - source: The original source file (relative to the sourceRoot).
	*   - name: An optional original token name for this mapping.
	*/
	SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
		var generated = util.getArg(aArgs, "generated");
		var original = util.getArg(aArgs, "original", null);
		var source = util.getArg(aArgs, "source", null);
		var name = util.getArg(aArgs, "name", null);
		if (!this._skipValidation) this._validateMapping(generated, original, source, name);
		if (source != null) {
			source = String(source);
			if (!this._sources.has(source)) this._sources.add(source);
		}
		if (name != null) {
			name = String(name);
			if (!this._names.has(name)) this._names.add(name);
		}
		this._mappings.add({
			generatedLine: generated.line,
			generatedColumn: generated.column,
			originalLine: original != null && original.line,
			originalColumn: original != null && original.column,
			source,
			name
		});
	};
	/**
	* Set the source content for a source file.
	*/
	SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
		var source = aSourceFile;
		if (this._sourceRoot != null) source = util.relative(this._sourceRoot, source);
		if (aSourceContent != null) {
			if (!this._sourcesContents) this._sourcesContents = Object.create(null);
			this._sourcesContents[util.toSetString(source)] = aSourceContent;
		} else if (this._sourcesContents) {
			delete this._sourcesContents[util.toSetString(source)];
			if (Object.keys(this._sourcesContents).length === 0) this._sourcesContents = null;
		}
	};
	/**
	* Applies the mappings of a sub-source-map for a specific source file to the
	* source map being generated. Each mapping to the supplied source file is
	* rewritten using the supplied source map. Note: The resolution for the
	* resulting mappings is the minimium of this map and the supplied map.
	*
	* @param aSourceMapConsumer The source map to be applied.
	* @param aSourceFile Optional. The filename of the source file.
	*        If omitted, SourceMapConsumer's file property will be used.
	* @param aSourceMapPath Optional. The dirname of the path to the source map
	*        to be applied. If relative, it is relative to the SourceMapConsumer.
	*        This parameter is needed when the two source maps aren't in the same
	*        directory, and the source map to be applied contains relative source
	*        paths. If so, those relative source paths need to be rewritten
	*        relative to the SourceMapGenerator.
	*/
	SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
		var sourceFile = aSourceFile;
		if (aSourceFile == null) {
			if (aSourceMapConsumer.file == null) throw new Error("SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's \"file\" property. Both were omitted.");
			sourceFile = aSourceMapConsumer.file;
		}
		var sourceRoot = this._sourceRoot;
		if (sourceRoot != null) sourceFile = util.relative(sourceRoot, sourceFile);
		var newSources = new ArraySet();
		var newNames = new ArraySet();
		this._mappings.unsortedForEach(function(mapping) {
			if (mapping.source === sourceFile && mapping.originalLine != null) {
				var original = aSourceMapConsumer.originalPositionFor({
					line: mapping.originalLine,
					column: mapping.originalColumn
				});
				if (original.source != null) {
					mapping.source = original.source;
					if (aSourceMapPath != null) mapping.source = util.join(aSourceMapPath, mapping.source);
					if (sourceRoot != null) mapping.source = util.relative(sourceRoot, mapping.source);
					mapping.originalLine = original.line;
					mapping.originalColumn = original.column;
					if (original.name != null) mapping.name = original.name;
				}
			}
			var source = mapping.source;
			if (source != null && !newSources.has(source)) newSources.add(source);
			var name = mapping.name;
			if (name != null && !newNames.has(name)) newNames.add(name);
		}, this);
		this._sources = newSources;
		this._names = newNames;
		aSourceMapConsumer.sources.forEach(function(sourceFile) {
			var content = aSourceMapConsumer.sourceContentFor(sourceFile);
			if (content != null) {
				if (aSourceMapPath != null) sourceFile = util.join(aSourceMapPath, sourceFile);
				if (sourceRoot != null) sourceFile = util.relative(sourceRoot, sourceFile);
				this.setSourceContent(sourceFile, content);
			}
		}, this);
	};
	/**
	* A mapping can have one of the three levels of data:
	*
	*   1. Just the generated position.
	*   2. The Generated position, original position, and original source.
	*   3. Generated and original position, original source, as well as a name
	*      token.
	*
	* To maintain consistency, we validate that any new mapping being added falls
	* in to one of these categories.
	*/
	SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
		if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");
		if (aGenerated && "line" in aGenerated && "column" in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) return;
		else if (aGenerated && "line" in aGenerated && "column" in aGenerated && aOriginal && "line" in aOriginal && "column" in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) return;
		else throw new Error("Invalid mapping: " + JSON.stringify({
			generated: aGenerated,
			source: aSource,
			original: aOriginal,
			name: aName
		}));
	};
	/**
	* Serialize the accumulated mappings in to the stream of base 64 VLQs
	* specified by the source map format.
	*/
	SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
		var previousGeneratedColumn = 0;
		var previousGeneratedLine = 1;
		var previousOriginalColumn = 0;
		var previousOriginalLine = 0;
		var previousName = 0;
		var previousSource = 0;
		var result = "";
		var next;
		var mapping;
		var nameIdx;
		var sourceIdx;
		var mappings = this._mappings.toArray();
		for (var i = 0, len = mappings.length; i < len; i++) {
			mapping = mappings[i];
			next = "";
			if (mapping.generatedLine !== previousGeneratedLine) {
				previousGeneratedColumn = 0;
				while (mapping.generatedLine !== previousGeneratedLine) {
					next += ";";
					previousGeneratedLine++;
				}
			} else if (i > 0) {
				if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) continue;
				next += ",";
			}
			next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn);
			previousGeneratedColumn = mapping.generatedColumn;
			if (mapping.source != null) {
				sourceIdx = this._sources.indexOf(mapping.source);
				next += base64VLQ.encode(sourceIdx - previousSource);
				previousSource = sourceIdx;
				next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine);
				previousOriginalLine = mapping.originalLine - 1;
				next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn);
				previousOriginalColumn = mapping.originalColumn;
				if (mapping.name != null) {
					nameIdx = this._names.indexOf(mapping.name);
					next += base64VLQ.encode(nameIdx - previousName);
					previousName = nameIdx;
				}
			}
			result += next;
		}
		return result;
	};
	SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
		return aSources.map(function(source) {
			if (!this._sourcesContents) return null;
			if (aSourceRoot != null) source = util.relative(aSourceRoot, source);
			var key = util.toSetString(source);
			return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
		}, this);
	};
	/**
	* Externalize the source map.
	*/
	SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() {
		var map = {
			version: this._version,
			sources: this._sources.toArray(),
			names: this._names.toArray(),
			mappings: this._serializeMappings()
		};
		if (this._file != null) map.file = this._file;
		if (this._sourceRoot != null) map.sourceRoot = this._sourceRoot;
		if (this._sourcesContents) map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
		return map;
	};
	/**
	* Render the source map being generated to a string.
	*/
	SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
		return JSON.stringify(this.toJSON());
	};
	exports.SourceMapGenerator = SourceMapGenerator;
}));
//#endregion
//#region ../../node_modules/source-map/lib/binary-search.js
var require_binary_search = /* @__PURE__ */ __commonJSMin(((exports) => {
	exports.GREATEST_LOWER_BOUND = 1;
	exports.LEAST_UPPER_BOUND = 2;
	/**
	* Recursive implementation of binary search.
	*
	* @param aLow Indices here and lower do not contain the needle.
	* @param aHigh Indices here and higher do not contain the needle.
	* @param aNeedle The element being searched for.
	* @param aHaystack The non-empty array being searched.
	* @param aCompare Function which takes two elements and returns -1, 0, or 1.
	* @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
	*     'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
	*     closest element that is smaller than or greater than the one we are
	*     searching for, respectively, if the exact element cannot be found.
	*/
	function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
		var mid = Math.floor((aHigh - aLow) / 2) + aLow;
		var cmp = aCompare(aNeedle, aHaystack[mid], true);
		if (cmp === 0) return mid;
		else if (cmp > 0) {
			if (aHigh - mid > 1) return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
			if (aBias == exports.LEAST_UPPER_BOUND) return aHigh < aHaystack.length ? aHigh : -1;
			else return mid;
		} else {
			if (mid - aLow > 1) return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
			if (aBias == exports.LEAST_UPPER_BOUND) return mid;
			else return aLow < 0 ? -1 : aLow;
		}
	}
	/**
	* This is an implementation of binary search which will always try and return
	* the index of the closest element if there is no exact hit. This is because
	* mappings between original and generated line/col pairs are single points,
	* and there is an implicit region between each of them, so a miss just means
	* that you aren't on the very start of a region.
	*
	* @param aNeedle The element you are looking for.
	* @param aHaystack The array that is being searched.
	* @param aCompare A function which takes the needle and an element in the
	*     array and returns -1, 0, or 1 depending on whether the needle is less
	*     than, equal to, or greater than the element, respectively.
	* @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
	*     'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
	*     closest element that is smaller than or greater than the one we are
	*     searching for, respectively, if the exact element cannot be found.
	*     Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
	*/
	exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
		if (aHaystack.length === 0) return -1;
		var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias || exports.GREATEST_LOWER_BOUND);
		if (index < 0) return -1;
		while (index - 1 >= 0) {
			if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) break;
			--index;
		}
		return index;
	};
}));
//#endregion
//#region ../../node_modules/source-map/lib/quick-sort.js
var require_quick_sort = /* @__PURE__ */ __commonJSMin(((exports) => {
	/**
	* Swap the elements indexed by `x` and `y` in the array `ary`.
	*
	* @param {Array} ary
	*        The array.
	* @param {Number} x
	*        The index of the first item.
	* @param {Number} y
	*        The index of the second item.
	*/
	function swap(ary, x, y) {
		var temp = ary[x];
		ary[x] = ary[y];
		ary[y] = temp;
	}
	/**
	* Returns a random integer within the range `low .. high` inclusive.
	*
	* @param {Number} low
	*        The lower bound on the range.
	* @param {Number} high
	*        The upper bound on the range.
	*/
	function randomIntInRange(low, high) {
		return Math.round(low + Math.random() * (high - low));
	}
	/**
	* The Quick Sort algorithm.
	*
	* @param {Array} ary
	*        An array to sort.
	* @param {function} comparator
	*        Function to use to compare two items.
	* @param {Number} p
	*        Start index of the array
	* @param {Number} r
	*        End index of the array
	*/
	function doQuickSort(ary, comparator, p, r) {
		if (p < r) {
			var pivotIndex = randomIntInRange(p, r);
			var i = p - 1;
			swap(ary, pivotIndex, r);
			var pivot = ary[r];
			for (var j = p; j < r; j++) if (comparator(ary[j], pivot) <= 0) {
				i += 1;
				swap(ary, i, j);
			}
			swap(ary, i + 1, j);
			var q = i + 1;
			doQuickSort(ary, comparator, p, q - 1);
			doQuickSort(ary, comparator, q + 1, r);
		}
	}
	/**
	* Sort the given array in-place with the given comparator function.
	*
	* @param {Array} ary
	*        An array to sort.
	* @param {function} comparator
	*        Function to use to compare two items.
	*/
	exports.quickSort = function(ary, comparator) {
		doQuickSort(ary, comparator, 0, ary.length - 1);
	};
}));
//#endregion
//#region ../../node_modules/source-map/lib/source-map-consumer.js
var require_source_map_consumer = /* @__PURE__ */ __commonJSMin(((exports) => {
	var util = require_util();
	var binarySearch = require_binary_search();
	var ArraySet = require_array_set().ArraySet;
	var base64VLQ = require_base64_vlq();
	var quickSort = require_quick_sort().quickSort;
	function SourceMapConsumer(aSourceMap, aSourceMapURL) {
		var sourceMap = aSourceMap;
		if (typeof aSourceMap === "string") sourceMap = util.parseSourceMapInput(aSourceMap);
		return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);
	}
	SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {
		return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);
	};
	/**
	* The version of the source mapping spec that we are consuming.
	*/
	SourceMapConsumer.prototype._version = 3;
	SourceMapConsumer.prototype.__generatedMappings = null;
	Object.defineProperty(SourceMapConsumer.prototype, "_generatedMappings", {
		configurable: true,
		enumerable: true,
		get: function() {
			if (!this.__generatedMappings) this._parseMappings(this._mappings, this.sourceRoot);
			return this.__generatedMappings;
		}
	});
	SourceMapConsumer.prototype.__originalMappings = null;
	Object.defineProperty(SourceMapConsumer.prototype, "_originalMappings", {
		configurable: true,
		enumerable: true,
		get: function() {
			if (!this.__originalMappings) this._parseMappings(this._mappings, this.sourceRoot);
			return this.__originalMappings;
		}
	});
	SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
		var c = aStr.charAt(index);
		return c === ";" || c === ",";
	};
	/**
	* Parse the mappings in a string in to a data structure which we can easily
	* query (the ordered arrays in the `this.__generatedMappings` and
	* `this.__originalMappings` properties).
	*/
	SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
		throw new Error("Subclasses must implement _parseMappings");
	};
	SourceMapConsumer.GENERATED_ORDER = 1;
	SourceMapConsumer.ORIGINAL_ORDER = 2;
	SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
	SourceMapConsumer.LEAST_UPPER_BOUND = 2;
	/**
	* Iterate over each mapping between an original source/line/column and a
	* generated line/column in this source map.
	*
	* @param Function aCallback
	*        The function that is called with each mapping.
	* @param Object aContext
	*        Optional. If specified, this object will be the value of `this` every
	*        time that `aCallback` is called.
	* @param aOrder
	*        Either `SourceMapConsumer.GENERATED_ORDER` or
	*        `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to
	*        iterate over the mappings sorted by the generated file's line/column
	*        order or the original's source/line/column order, respectively. Defaults to
	*        `SourceMapConsumer.GENERATED_ORDER`.
	*/
	SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
		var context = aContext || null;
		var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
		var mappings;
		switch (order) {
			case SourceMapConsumer.GENERATED_ORDER:
				mappings = this._generatedMappings;
				break;
			case SourceMapConsumer.ORIGINAL_ORDER:
				mappings = this._originalMappings;
				break;
			default: throw new Error("Unknown order of iteration.");
		}
		var sourceRoot = this.sourceRoot;
		mappings.map(function(mapping) {
			var source = mapping.source === null ? null : this._sources.at(mapping.source);
			source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);
			return {
				source,
				generatedLine: mapping.generatedLine,
				generatedColumn: mapping.generatedColumn,
				originalLine: mapping.originalLine,
				originalColumn: mapping.originalColumn,
				name: mapping.name === null ? null : this._names.at(mapping.name)
			};
		}, this).forEach(aCallback, context);
	};
	/**
	* Returns all generated line and column information for the original source,
	* line, and column provided. If no column is provided, returns all mappings
	* corresponding to a either the line we are searching for or the next
	* closest line that has any mappings. Otherwise, returns all mappings
	* corresponding to the given line and either the column we are searching for
	* or the next closest column that has any offsets.
	*
	* The only argument is an object with the following properties:
	*
	*   - source: The filename of the original source.
	*   - line: The line number in the original source.  The line number is 1-based.
	*   - column: Optional. the column number in the original source.
	*    The column number is 0-based.
	*
	* and an array of objects is returned, each with the following properties:
	*
	*   - line: The line number in the generated source, or null.  The
	*    line number is 1-based.
	*   - column: The column number in the generated source, or null.
	*    The column number is 0-based.
	*/
	SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
		var line = util.getArg(aArgs, "line");
		var needle = {
			source: util.getArg(aArgs, "source"),
			originalLine: line,
			originalColumn: util.getArg(aArgs, "column", 0)
		};
		needle.source = this._findSourceIndex(needle.source);
		if (needle.source < 0) return [];
		var mappings = [];
		var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, binarySearch.LEAST_UPPER_BOUND);
		if (index >= 0) {
			var mapping = this._originalMappings[index];
			if (aArgs.column === void 0) {
				var originalLine = mapping.originalLine;
				while (mapping && mapping.originalLine === originalLine) {
					mappings.push({
						line: util.getArg(mapping, "generatedLine", null),
						column: util.getArg(mapping, "generatedColumn", null),
						lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
					});
					mapping = this._originalMappings[++index];
				}
			} else {
				var originalColumn = mapping.originalColumn;
				while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) {
					mappings.push({
						line: util.getArg(mapping, "generatedLine", null),
						column: util.getArg(mapping, "generatedColumn", null),
						lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
					});
					mapping = this._originalMappings[++index];
				}
			}
		}
		return mappings;
	};
	exports.SourceMapConsumer = SourceMapConsumer;
	/**
	* A BasicSourceMapConsumer instance represents a parsed source map which we can
	* query for information about the original file positions by giving it a file
	* position in the generated source.
	*
	* The first parameter is the raw source map (either as a JSON string, or
	* already parsed to an object). According to the spec, source maps have the
	* following attributes:
	*
	*   - version: Which version of the source map spec this map is following.
	*   - sources: An array of URLs to the original source files.
	*   - names: An array of identifiers which can be referrenced by individual mappings.
	*   - sourceRoot: Optional. The URL root from which all sources are relative.
	*   - sourcesContent: Optional. An array of contents of the original source files.
	*   - mappings: A string of base64 VLQs which contain the actual mappings.
	*   - file: Optional. The generated file this source map is associated with.
	*
	* Here is an example source map, taken from the source map spec[0]:
	*
	*     {
	*       version : 3,
	*       file: "out.js",
	*       sourceRoot : "",
	*       sources: ["foo.js", "bar.js"],
	*       names: ["src", "maps", "are", "fun"],
	*       mappings: "AA,AB;;ABCDE;"
	*     }
	*
	* The second parameter, if given, is a string whose value is the URL
	* at which the source map was found.  This URL is used to compute the
	* sources array.
	*
	* [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#
	*/
	function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {
		var sourceMap = aSourceMap;
		if (typeof aSourceMap === "string") sourceMap = util.parseSourceMapInput(aSourceMap);
		var version = util.getArg(sourceMap, "version");
		var sources = util.getArg(sourceMap, "sources");
		var names = util.getArg(sourceMap, "names", []);
		var sourceRoot = util.getArg(sourceMap, "sourceRoot", null);
		var sourcesContent = util.getArg(sourceMap, "sourcesContent", null);
		var mappings = util.getArg(sourceMap, "mappings");
		var file = util.getArg(sourceMap, "file", null);
		if (version != this._version) throw new Error("Unsupported version: " + version);
		if (sourceRoot) sourceRoot = util.normalize(sourceRoot);
		sources = sources.map(String).map(util.normalize).map(function(source) {
			return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) ? util.relative(sourceRoot, source) : source;
		});
		this._names = ArraySet.fromArray(names.map(String), true);
		this._sources = ArraySet.fromArray(sources, true);
		this._absoluteSources = this._sources.toArray().map(function(s) {
			return util.computeSourceURL(sourceRoot, s, aSourceMapURL);
		});
		this.sourceRoot = sourceRoot;
		this.sourcesContent = sourcesContent;
		this._mappings = mappings;
		this._sourceMapURL = aSourceMapURL;
		this.file = file;
	}
	BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
	BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
	/**
	* Utility function to find the index of a source.  Returns -1 if not
	* found.
	*/
	BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {
		var relativeSource = aSource;
		if (this.sourceRoot != null) relativeSource = util.relative(this.sourceRoot, relativeSource);
		if (this._sources.has(relativeSource)) return this._sources.indexOf(relativeSource);
		var i;
		for (i = 0; i < this._absoluteSources.length; ++i) if (this._absoluteSources[i] == aSource) return i;
		return -1;
	};
	/**
	* Create a BasicSourceMapConsumer from a SourceMapGenerator.
	*
	* @param SourceMapGenerator aSourceMap
	*        The source map that will be consumed.
	* @param String aSourceMapURL
	*        The URL at which the source map can be found (optional)
	* @returns BasicSourceMapConsumer
	*/
	BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {
		var smc = Object.create(BasicSourceMapConsumer.prototype);
		var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
		var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
		smc.sourceRoot = aSourceMap._sourceRoot;
		smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot);
		smc.file = aSourceMap._file;
		smc._sourceMapURL = aSourceMapURL;
		smc._absoluteSources = smc._sources.toArray().map(function(s) {
			return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);
		});
		var generatedMappings = aSourceMap._mappings.toArray().slice();
		var destGeneratedMappings = smc.__generatedMappings = [];
		var destOriginalMappings = smc.__originalMappings = [];
		for (var i = 0, length = generatedMappings.length; i < length; i++) {
			var srcMapping = generatedMappings[i];
			var destMapping = new Mapping();
			destMapping.generatedLine = srcMapping.generatedLine;
			destMapping.generatedColumn = srcMapping.generatedColumn;
			if (srcMapping.source) {
				destMapping.source = sources.indexOf(srcMapping.source);
				destMapping.originalLine = srcMapping.originalLine;
				destMapping.originalColumn = srcMapping.originalColumn;
				if (srcMapping.name) destMapping.name = names.indexOf(srcMapping.name);
				destOriginalMappings.push(destMapping);
			}
			destGeneratedMappings.push(destMapping);
		}
		quickSort(smc.__originalMappings, util.compareByOriginalPositions);
		return smc;
	};
	/**
	* The version of the source mapping spec that we are consuming.
	*/
	BasicSourceMapConsumer.prototype._version = 3;
	/**
	* The list of original sources.
	*/
	Object.defineProperty(BasicSourceMapConsumer.prototype, "sources", { get: function() {
		return this._absoluteSources.slice();
	} });
	/**
	* Provide the JIT with a nice shape / hidden class.
	*/
	function Mapping() {
		this.generatedLine = 0;
		this.generatedColumn = 0;
		this.source = null;
		this.originalLine = null;
		this.originalColumn = null;
		this.name = null;
	}
	/**
	* Parse the mappings in a string in to a data structure which we can easily
	* query (the ordered arrays in the `this.__generatedMappings` and
	* `this.__originalMappings` properties).
	*/
	BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
		var generatedLine = 1;
		var previousGeneratedColumn = 0;
		var previousOriginalLine = 0;
		var previousOriginalColumn = 0;
		var previousSource = 0;
		var previousName = 0;
		var length = aStr.length;
		var index = 0;
		var cachedSegments = {};
		var temp = {};
		var originalMappings = [];
		var generatedMappings = [];
		var mapping, str, segment, end, value;
		while (index < length) if (aStr.charAt(index) === ";") {
			generatedLine++;
			index++;
			previousGeneratedColumn = 0;
		} else if (aStr.charAt(index) === ",") index++;
		else {
			mapping = new Mapping();
			mapping.generatedLine = generatedLine;
			for (end = index; end < length; end++) if (this._charIsMappingSeparator(aStr, end)) break;
			str = aStr.slice(index, end);
			segment = cachedSegments[str];
			if (segment) index += str.length;
			else {
				segment = [];
				while (index < end) {
					base64VLQ.decode(aStr, index, temp);
					value = temp.value;
					index = temp.rest;
					segment.push(value);
				}
				if (segment.length === 2) throw new Error("Found a source, but no line and column");
				if (segment.length === 3) throw new Error("Found a source and line, but no column");
				cachedSegments[str] = segment;
			}
			mapping.generatedColumn = previousGeneratedColumn + segment[0];
			previousGeneratedColumn = mapping.generatedColumn;
			if (segment.length > 1) {
				mapping.source = previousSource + segment[1];
				previousSource += segment[1];
				mapping.originalLine = previousOriginalLine + segment[2];
				previousOriginalLine = mapping.originalLine;
				mapping.originalLine += 1;
				mapping.originalColumn = previousOriginalColumn + segment[3];
				previousOriginalColumn = mapping.originalColumn;
				if (segment.length > 4) {
					mapping.name = previousName + segment[4];
					previousName += segment[4];
				}
			}
			generatedMappings.push(mapping);
			if (typeof mapping.originalLine === "number") originalMappings.push(mapping);
		}
		quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
		this.__generatedMappings = generatedMappings;
		quickSort(originalMappings, util.compareByOriginalPositions);
		this.__originalMappings = originalMappings;
	};
	/**
	* Find the mapping that best matches the hypothetical "needle" mapping that
	* we are searching for in the given "haystack" of mappings.
	*/
	BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) {
		if (aNeedle[aLineName] <= 0) throw new TypeError("Line must be greater than or equal to 1, got " + aNeedle[aLineName]);
		if (aNeedle[aColumnName] < 0) throw new TypeError("Column must be greater than or equal to 0, got " + aNeedle[aColumnName]);
		return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
	};
	/**
	* Compute the last column for each generated mapping. The last column is
	* inclusive.
	*/
	BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() {
		for (var index = 0; index < this._generatedMappings.length; ++index) {
			var mapping = this._generatedMappings[index];
			if (index + 1 < this._generatedMappings.length) {
				var nextMapping = this._generatedMappings[index + 1];
				if (mapping.generatedLine === nextMapping.generatedLine) {
					mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
					continue;
				}
			}
			mapping.lastGeneratedColumn = Infinity;
		}
	};
	/**
	* Returns the original source, line, and column information for the generated
	* source's line and column positions provided. The only argument is an object
	* with the following properties:
	*
	*   - line: The line number in the generated source.  The line number
	*     is 1-based.
	*   - column: The column number in the generated source.  The column
	*     number is 0-based.
	*   - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
	*     'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
	*     closest element that is smaller than or greater than the one we are
	*     searching for, respectively, if the exact element cannot be found.
	*     Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
	*
	* and an object is returned with the following properties:
	*
	*   - source: The original source file, or null.
	*   - line: The line number in the original source, or null.  The
	*     line number is 1-based.
	*   - column: The column number in the original source, or null.  The
	*     column number is 0-based.
	*   - name: The original identifier, or null.
	*/
	BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
		var needle = {
			generatedLine: util.getArg(aArgs, "line"),
			generatedColumn: util.getArg(aArgs, "column")
		};
		var index = this._findMapping(needle, this._generatedMappings, "generatedLine", "generatedColumn", util.compareByGeneratedPositionsDeflated, util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND));
		if (index >= 0) {
			var mapping = this._generatedMappings[index];
			if (mapping.generatedLine === needle.generatedLine) {
				var source = util.getArg(mapping, "source", null);
				if (source !== null) {
					source = this._sources.at(source);
					source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);
				}
				var name = util.getArg(mapping, "name", null);
				if (name !== null) name = this._names.at(name);
				return {
					source,
					line: util.getArg(mapping, "originalLine", null),
					column: util.getArg(mapping, "originalColumn", null),
					name
				};
			}
		}
		return {
			source: null,
			line: null,
			column: null,
			name: null
		};
	};
	/**
	* Return true if we have the source content for every source in the source
	* map, false otherwise.
	*/
	BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() {
		if (!this.sourcesContent) return false;
		return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function(sc) {
			return sc == null;
		});
	};
	/**
	* Returns the original source content. The only argument is the url of the
	* original source file. Returns null if no original source content is
	* available.
	*/
	BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
		if (!this.sourcesContent) return null;
		var index = this._findSourceIndex(aSource);
		if (index >= 0) return this.sourcesContent[index];
		var relativeSource = aSource;
		if (this.sourceRoot != null) relativeSource = util.relative(this.sourceRoot, relativeSource);
		var url;
		if (this.sourceRoot != null && (url = util.urlParse(this.sourceRoot))) {
			var fileUriAbsPath = relativeSource.replace(/^file:\/\//, "");
			if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
			if ((!url.path || url.path == "/") && this._sources.has("/" + relativeSource)) return this.sourcesContent[this._sources.indexOf("/" + relativeSource)];
		}
		if (nullOnMissing) return null;
		else throw new Error("\"" + relativeSource + "\" is not in the SourceMap.");
	};
	/**
	* Returns the generated line and column information for the original source,
	* line, and column positions provided. The only argument is an object with
	* the following properties:
	*
	*   - source: The filename of the original source.
	*   - line: The line number in the original source.  The line number
	*     is 1-based.
	*   - column: The column number in the original source.  The column
	*     number is 0-based.
	*   - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
	*     'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
	*     closest element that is smaller than or greater than the one we are
	*     searching for, respectively, if the exact element cannot be found.
	*     Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
	*
	* and an object is returned with the following properties:
	*
	*   - line: The line number in the generated source, or null.  The
	*     line number is 1-based.
	*   - column: The column number in the generated source, or null.
	*     The column number is 0-based.
	*/
	BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {
		var source = util.getArg(aArgs, "source");
		source = this._findSourceIndex(source);
		if (source < 0) return {
			line: null,
			column: null,
			lastColumn: null
		};
		var needle = {
			source,
			originalLine: util.getArg(aArgs, "line"),
			originalColumn: util.getArg(aArgs, "column")
		};
		var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND));
		if (index >= 0) {
			var mapping = this._originalMappings[index];
			if (mapping.source === needle.source) return {
				line: util.getArg(mapping, "generatedLine", null),
				column: util.getArg(mapping, "generatedColumn", null),
				lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
			};
		}
		return {
			line: null,
			column: null,
			lastColumn: null
		};
	};
	exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
	/**
	* An IndexedSourceMapConsumer instance represents a parsed source map which
	* we can query for information. It differs from BasicSourceMapConsumer in
	* that it takes "indexed" source maps (i.e. ones with a "sections" field) as
	* input.
	*
	* The first parameter is a raw source map (either as a JSON string, or already
	* parsed to an object). According to the spec for indexed source maps, they
	* have the following attributes:
	*
	*   - version: Which version of the source map spec this map is following.
	*   - file: Optional. The generated file this source map is associated with.
	*   - sections: A list of section definitions.
	*
	* Each value under the "sections" field has two fields:
	*   - offset: The offset into the original specified at which this section
	*       begins to apply, defined as an object with a "line" and "column"
	*       field.
	*   - map: A source map definition. This source map could also be indexed,
	*       but doesn't have to be.
	*
	* Instead of the "map" field, it's also possible to have a "url" field
	* specifying a URL to retrieve a source map from, but that's currently
	* unsupported.
	*
	* Here's an example source map, taken from the source map spec[0], but
	* modified to omit a section which uses the "url" field.
	*
	*  {
	*    version : 3,
	*    file: "app.js",
	*    sections: [{
	*      offset: {line:100, column:10},
	*      map: {
	*        version : 3,
	*        file: "section.js",
	*        sources: ["foo.js", "bar.js"],
	*        names: ["src", "maps", "are", "fun"],
	*        mappings: "AAAA,E;;ABCDE;"
	*      }
	*    }],
	*  }
	*
	* The second parameter, if given, is a string whose value is the URL
	* at which the source map was found.  This URL is used to compute the
	* sources array.
	*
	* [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt
	*/
	function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {
		var sourceMap = aSourceMap;
		if (typeof aSourceMap === "string") sourceMap = util.parseSourceMapInput(aSourceMap);
		var version = util.getArg(sourceMap, "version");
		var sections = util.getArg(sourceMap, "sections");
		if (version != this._version) throw new Error("Unsupported version: " + version);
		this._sources = new ArraySet();
		this._names = new ArraySet();
		var lastOffset = {
			line: -1,
			column: 0
		};
		this._sections = sections.map(function(s) {
			if (s.url) throw new Error("Support for url field in sections not implemented.");
			var offset = util.getArg(s, "offset");
			var offsetLine = util.getArg(offset, "line");
			var offsetColumn = util.getArg(offset, "column");
			if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) throw new Error("Section offsets must be ordered and non-overlapping.");
			lastOffset = offset;
			return {
				generatedOffset: {
					generatedLine: offsetLine + 1,
					generatedColumn: offsetColumn + 1
				},
				consumer: new SourceMapConsumer(util.getArg(s, "map"), aSourceMapURL)
			};
		});
	}
	IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
	IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
	/**
	* The version of the source mapping spec that we are consuming.
	*/
	IndexedSourceMapConsumer.prototype._version = 3;
	/**
	* The list of original sources.
	*/
	Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", { get: function() {
		var sources = [];
		for (var i = 0; i < this._sections.length; i++) for (var j = 0; j < this._sections[i].consumer.sources.length; j++) sources.push(this._sections[i].consumer.sources[j]);
		return sources;
	} });
	/**
	* Returns the original source, line, and column information for the generated
	* source's line and column positions provided. The only argument is an object
	* with the following properties:
	*
	*   - line: The line number in the generated source.  The line number
	*     is 1-based.
	*   - column: The column number in the generated source.  The column
	*     number is 0-based.
	*
	* and an object is returned with the following properties:
	*
	*   - source: The original source file, or null.
	*   - line: The line number in the original source, or null.  The
	*     line number is 1-based.
	*   - column: The column number in the original source, or null.  The
	*     column number is 0-based.
	*   - name: The original identifier, or null.
	*/
	IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
		var needle = {
			generatedLine: util.getArg(aArgs, "line"),
			generatedColumn: util.getArg(aArgs, "column")
		};
		var sectionIndex = binarySearch.search(needle, this._sections, function(needle, section) {
			var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
			if (cmp) return cmp;
			return needle.generatedColumn - section.generatedOffset.generatedColumn;
		});
		var section = this._sections[sectionIndex];
		if (!section) return {
			source: null,
			line: null,
			column: null,
			name: null
		};
		return section.consumer.originalPositionFor({
			line: needle.generatedLine - (section.generatedOffset.generatedLine - 1),
			column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
			bias: aArgs.bias
		});
	};
	/**
	* Return true if we have the source content for every source in the source
	* map, false otherwise.
	*/
	IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() {
		return this._sections.every(function(s) {
			return s.consumer.hasContentsOfAllSources();
		});
	};
	/**
	* Returns the original source content. The only argument is the url of the
	* original source file. Returns null if no original source content is
	* available.
	*/
	IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
		for (var i = 0; i < this._sections.length; i++) {
			var content = this._sections[i].consumer.sourceContentFor(aSource, true);
			if (content) return content;
		}
		if (nullOnMissing) return null;
		else throw new Error("\"" + aSource + "\" is not in the SourceMap.");
	};
	/**
	* Returns the generated line and column information for the original source,
	* line, and column positions provided. The only argument is an object with
	* the following properties:
	*
	*   - source: The filename of the original source.
	*   - line: The line number in the original source.  The line number
	*     is 1-based.
	*   - column: The column number in the original source.  The column
	*     number is 0-based.
	*
	* and an object is returned with the following properties:
	*
	*   - line: The line number in the generated source, or null.  The
	*     line number is 1-based. 
	*   - column: The column number in the generated source, or null.
	*     The column number is 0-based.
	*/
	IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
		for (var i = 0; i < this._sections.length; i++) {
			var section = this._sections[i];
			if (section.consumer._findSourceIndex(util.getArg(aArgs, "source")) === -1) continue;
			var generatedPosition = section.consumer.generatedPositionFor(aArgs);
			if (generatedPosition) return {
				line: generatedPosition.line + (section.generatedOffset.generatedLine - 1),
				column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0)
			};
		}
		return {
			line: null,
			column: null
		};
	};
	/**
	* Parse the mappings in a string in to a data structure which we can easily
	* query (the ordered arrays in the `this.__generatedMappings` and
	* `this.__originalMappings` properties).
	*/
	IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
		this.__generatedMappings = [];
		this.__originalMappings = [];
		for (var i = 0; i < this._sections.length; i++) {
			var section = this._sections[i];
			var sectionMappings = section.consumer._generatedMappings;
			for (var j = 0; j < sectionMappings.length; j++) {
				var mapping = sectionMappings[j];
				var source = section.consumer._sources.at(mapping.source);
				source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);
				this._sources.add(source);
				source = this._sources.indexOf(source);
				var name = null;
				if (mapping.name) {
					name = section.consumer._names.at(mapping.name);
					this._names.add(name);
					name = this._names.indexOf(name);
				}
				var adjustedMapping = {
					source,
					generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1),
					generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
					originalLine: mapping.originalLine,
					originalColumn: mapping.originalColumn,
					name
				};
				this.__generatedMappings.push(adjustedMapping);
				if (typeof adjustedMapping.originalLine === "number") this.__originalMappings.push(adjustedMapping);
			}
		}
		quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
		quickSort(this.__originalMappings, util.compareByOriginalPositions);
	};
	exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
}));
//#endregion
//#region ../../node_modules/source-map/lib/source-node.js
var require_source_node = /* @__PURE__ */ __commonJSMin(((exports) => {
	var SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
	var util = require_util();
	var REGEX_NEWLINE = /(\r?\n)/;
	var NEWLINE_CODE = 10;
	var isSourceNode = "$$$isSourceNode$$$";
	/**
	* SourceNodes provide a way to abstract over interpolating/concatenating
	* snippets of generated JavaScript source code while maintaining the line and
	* column information associated with the original source code.
	*
	* @param aLine The original line number.
	* @param aColumn The original column number.
	* @param aSource The original source's filename.
	* @param aChunks Optional. An array of strings which are snippets of
	*        generated JS, or other SourceNodes.
	* @param aName The original identifier.
	*/
	function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
		this.children = [];
		this.sourceContents = {};
		this.line = aLine == null ? null : aLine;
		this.column = aColumn == null ? null : aColumn;
		this.source = aSource == null ? null : aSource;
		this.name = aName == null ? null : aName;
		this[isSourceNode] = true;
		if (aChunks != null) this.add(aChunks);
	}
	/**
	* Creates a SourceNode from generated code and a SourceMapConsumer.
	*
	* @param aGeneratedCode The generated code
	* @param aSourceMapConsumer The SourceMap for the generated code
	* @param aRelativePath Optional. The path that relative sources in the
	*        SourceMapConsumer should be relative to.
	*/
	SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
		var node = new SourceNode();
		var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
		var remainingLinesIndex = 0;
		var shiftNextLine = function() {
			return getNextLine() + (getNextLine() || "");
			function getNextLine() {
				return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : void 0;
			}
		};
		var lastGeneratedLine = 1, lastGeneratedColumn = 0;
		var lastMapping = null;
		aSourceMapConsumer.eachMapping(function(mapping) {
			if (lastMapping !== null) if (lastGeneratedLine < mapping.generatedLine) {
				addMappingWithCode(lastMapping, shiftNextLine());
				lastGeneratedLine++;
				lastGeneratedColumn = 0;
			} else {
				var nextLine = remainingLines[remainingLinesIndex] || "";
				var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);
				remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);
				lastGeneratedColumn = mapping.generatedColumn;
				addMappingWithCode(lastMapping, code);
				lastMapping = mapping;
				return;
			}
			while (lastGeneratedLine < mapping.generatedLine) {
				node.add(shiftNextLine());
				lastGeneratedLine++;
			}
			if (lastGeneratedColumn < mapping.generatedColumn) {
				var nextLine = remainingLines[remainingLinesIndex] || "";
				node.add(nextLine.substr(0, mapping.generatedColumn));
				remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
				lastGeneratedColumn = mapping.generatedColumn;
			}
			lastMapping = mapping;
		}, this);
		if (remainingLinesIndex < remainingLines.length) {
			if (lastMapping) addMappingWithCode(lastMapping, shiftNextLine());
			node.add(remainingLines.splice(remainingLinesIndex).join(""));
		}
		aSourceMapConsumer.sources.forEach(function(sourceFile) {
			var content = aSourceMapConsumer.sourceContentFor(sourceFile);
			if (content != null) {
				if (aRelativePath != null) sourceFile = util.join(aRelativePath, sourceFile);
				node.setSourceContent(sourceFile, content);
			}
		});
		return node;
		function addMappingWithCode(mapping, code) {
			if (mapping === null || mapping.source === void 0) node.add(code);
			else {
				var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source;
				node.add(new SourceNode(mapping.originalLine, mapping.originalColumn, source, code, mapping.name));
			}
		}
	};
	/**
	* Add a chunk of generated JS to this source node.
	*
	* @param aChunk A string snippet of generated JS code, another instance of
	*        SourceNode, or an array where each member is one of those things.
	*/
	SourceNode.prototype.add = function SourceNode_add(aChunk) {
		if (Array.isArray(aChunk)) aChunk.forEach(function(chunk) {
			this.add(chunk);
		}, this);
		else if (aChunk[isSourceNode] || typeof aChunk === "string") {
			if (aChunk) this.children.push(aChunk);
		} else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
		return this;
	};
	/**
	* Add a chunk of generated JS to the beginning of this source node.
	*
	* @param aChunk A string snippet of generated JS code, another instance of
	*        SourceNode, or an array where each member is one of those things.
	*/
	SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
		if (Array.isArray(aChunk)) for (var i = aChunk.length - 1; i >= 0; i--) this.prepend(aChunk[i]);
		else if (aChunk[isSourceNode] || typeof aChunk === "string") this.children.unshift(aChunk);
		else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
		return this;
	};
	/**
	* Walk over the tree of JS snippets in this node and its children. The
	* walking function is called once for each snippet of JS and is passed that
	* snippet and the its original associated source's line/column location.
	*
	* @param aFn The traversal function.
	*/
	SourceNode.prototype.walk = function SourceNode_walk(aFn) {
		var chunk;
		for (var i = 0, len = this.children.length; i < len; i++) {
			chunk = this.children[i];
			if (chunk[isSourceNode]) chunk.walk(aFn);
			else if (chunk !== "") aFn(chunk, {
				source: this.source,
				line: this.line,
				column: this.column,
				name: this.name
			});
		}
	};
	/**
	* Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between
	* each of `this.children`.
	*
	* @param aSep The separator.
	*/
	SourceNode.prototype.join = function SourceNode_join(aSep) {
		var newChildren;
		var i;
		var len = this.children.length;
		if (len > 0) {
			newChildren = [];
			for (i = 0; i < len - 1; i++) {
				newChildren.push(this.children[i]);
				newChildren.push(aSep);
			}
			newChildren.push(this.children[i]);
			this.children = newChildren;
		}
		return this;
	};
	/**
	* Call String.prototype.replace on the very right-most source snippet. Useful
	* for trimming whitespace from the end of a source node, etc.
	*
	* @param aPattern The pattern to replace.
	* @param aReplacement The thing to replace the pattern with.
	*/
	SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
		var lastChild = this.children[this.children.length - 1];
		if (lastChild[isSourceNode]) lastChild.replaceRight(aPattern, aReplacement);
		else if (typeof lastChild === "string") this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
		else this.children.push("".replace(aPattern, aReplacement));
		return this;
	};
	/**
	* Set the source content for a source file. This will be added to the SourceMapGenerator
	* in the sourcesContent field.
	*
	* @param aSourceFile The filename of the source file
	* @param aSourceContent The content of the source file
	*/
	SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
		this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
	};
	/**
	* Walk over the tree of SourceNodes. The walking function is called for each
	* source file content and is passed the filename and source content.
	*
	* @param aFn The traversal function.
	*/
	SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) {
		for (var i = 0, len = this.children.length; i < len; i++) if (this.children[i][isSourceNode]) this.children[i].walkSourceContents(aFn);
		var sources = Object.keys(this.sourceContents);
		for (var i = 0, len = sources.length; i < len; i++) aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
	};
	/**
	* Return the string representation of this source node. Walks over the tree
	* and concatenates all the various snippets together to one string.
	*/
	SourceNode.prototype.toString = function SourceNode_toString() {
		var str = "";
		this.walk(function(chunk) {
			str += chunk;
		});
		return str;
	};
	/**
	* Returns the string representation of this source node along with a source
	* map.
	*/
	SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
		var generated = {
			code: "",
			line: 1,
			column: 0
		};
		var map = new SourceMapGenerator(aArgs);
		var sourceMappingActive = false;
		var lastOriginalSource = null;
		var lastOriginalLine = null;
		var lastOriginalColumn = null;
		var lastOriginalName = null;
		this.walk(function(chunk, original) {
			generated.code += chunk;
			if (original.source !== null && original.line !== null && original.column !== null) {
				if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) map.addMapping({
					source: original.source,
					original: {
						line: original.line,
						column: original.column
					},
					generated: {
						line: generated.line,
						column: generated.column
					},
					name: original.name
				});
				lastOriginalSource = original.source;
				lastOriginalLine = original.line;
				lastOriginalColumn = original.column;
				lastOriginalName = original.name;
				sourceMappingActive = true;
			} else if (sourceMappingActive) {
				map.addMapping({ generated: {
					line: generated.line,
					column: generated.column
				} });
				lastOriginalSource = null;
				sourceMappingActive = false;
			}
			for (var idx = 0, length = chunk.length; idx < length; idx++) if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
				generated.line++;
				generated.column = 0;
				if (idx + 1 === length) {
					lastOriginalSource = null;
					sourceMappingActive = false;
				} else if (sourceMappingActive) map.addMapping({
					source: original.source,
					original: {
						line: original.line,
						column: original.column
					},
					generated: {
						line: generated.line,
						column: generated.column
					},
					name: original.name
				});
			} else generated.column++;
		});
		this.walkSourceContents(function(sourceFile, sourceContent) {
			map.setSourceContent(sourceFile, sourceContent);
		});
		return {
			code: generated.code,
			map
		};
	};
	exports.SourceNode = SourceNode;
}));
//#endregion
//#region ../../node_modules/source-map/source-map.js
var require_source_map = /* @__PURE__ */ __commonJSMin(((exports) => {
	exports.SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
	exports.SourceMapConsumer = require_source_map_consumer().SourceMapConsumer;
	exports.SourceNode = require_source_node().SourceNode;
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js
var require_code_gen = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	exports.__esModule = true;
	var _utils = require_utils();
	var SourceNode = void 0;
	try {
		/* istanbul ignore next */
		if (typeof define !== "function" || !define.amd) SourceNode = require_source_map().SourceNode;
	} catch (err) {}
	/* istanbul ignore if: tested but not covered in istanbul due to dist build  */
	if (!SourceNode) {
		SourceNode = function(line, column, srcFile, chunks) {
			this.src = "";
			if (chunks) this.add(chunks);
		};
		/* istanbul ignore next */
		SourceNode.prototype = {
			add: function add(chunks) {
				if (_utils.isArray(chunks)) chunks = chunks.join("");
				this.src += chunks;
			},
			prepend: function prepend(chunks) {
				if (_utils.isArray(chunks)) chunks = chunks.join("");
				this.src = chunks + this.src;
			},
			toStringWithSourceMap: function toStringWithSourceMap() {
				return { code: this.toString() };
			},
			toString: function toString() {
				return this.src;
			}
		};
	}
	function castChunk(chunk, codeGen, loc) {
		if (_utils.isArray(chunk)) {
			var ret = [];
			for (var i = 0, len = chunk.length; i < len; i++) ret.push(codeGen.wrap(chunk[i], loc));
			return ret;
		} else if (typeof chunk === "boolean" || typeof chunk === "number") return chunk + "";
		return chunk;
	}
	function CodeGen(srcFile) {
		this.srcFile = srcFile;
		this.source = [];
	}
	CodeGen.prototype = {
		isEmpty: function isEmpty() {
			return !this.source.length;
		},
		prepend: function prepend(source, loc) {
			this.source.unshift(this.wrap(source, loc));
		},
		push: function push(source, loc) {
			this.source.push(this.wrap(source, loc));
		},
		merge: function merge() {
			var source = this.empty();
			this.each(function(line) {
				source.add([
					"  ",
					line,
					"\n"
				]);
			});
			return source;
		},
		each: function each(iter) {
			for (var i = 0, len = this.source.length; i < len; i++) iter(this.source[i]);
		},
		empty: function empty() {
			var loc = this.currentLocation || { start: {} };
			return new SourceNode(loc.start.line, loc.start.column, this.srcFile);
		},
		wrap: function wrap(chunk) {
			var loc = arguments.length <= 1 || arguments[1] === void 0 ? this.currentLocation || { start: {} } : arguments[1];
			if (chunk instanceof SourceNode) return chunk;
			chunk = castChunk(chunk, this, loc);
			return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk);
		},
		functionCall: function functionCall(fn, type, params) {
			params = this.generateList(params);
			return this.wrap([
				fn,
				type ? "." + type + "(" : "(",
				params,
				")"
			]);
		},
		quotedString: function quotedString(str) {
			return "\"" + (str + "").replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029") + "\"";
		},
		objectLiteral: function objectLiteral(obj) {
			// istanbul ignore next
			var _this = this;
			var pairs = [];
			Object.keys(obj).forEach(function(key) {
				var value = castChunk(obj[key], _this);
				if (value !== "undefined") pairs.push([
					_this.quotedString(key),
					":",
					value
				]);
			});
			var ret = this.generateList(pairs);
			ret.prepend("{");
			ret.add("}");
			return ret;
		},
		generateList: function generateList(entries) {
			var ret = this.empty();
			for (var i = 0, len = entries.length; i < len; i++) {
				if (i) ret.add(",");
				ret.add(castChunk(entries[i], this));
			}
			return ret;
		},
		generateArray: function generateArray(entries) {
			var ret = this.generateList(entries);
			ret.prepend("[");
			ret.add("]");
			return ret;
		}
	};
	exports["default"] = CodeGen;
	module.exports = exports["default"];
}));
//#endregion
//#region ../../node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js
var require_javascript_compiler = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	exports.__esModule = true;
	// istanbul ignore next
	function _interopRequireDefault(obj) {
		return obj && obj.__esModule ? obj : { "default": obj };
	}
	var _base = require_base$1();
	var _exception2 = _interopRequireDefault(require_exception());
	var _utils = require_utils();
	var _codeGen2 = _interopRequireDefault(require_code_gen());
	function Literal(value) {
		this.value = value;
	}
	function JavaScriptCompiler() {}
	JavaScriptCompiler.prototype = {
		nameLookup: function nameLookup(parent, name) {
			return this.internalNameLookup(parent, name);
		},
		depthedLookup: function depthedLookup(name) {
			return [
				this.aliasable("container.lookup"),
				"(depths, ",
				JSON.stringify(name),
				")"
			];
		},
		compilerInfo: function compilerInfo() {
			var revision = _base.COMPILER_REVISION;
			return [revision, _base.REVISION_CHANGES[revision]];
		},
		appendToBuffer: function appendToBuffer(source, location, explicit) {
			if (!_utils.isArray(source)) source = [source];
			source = this.source.wrap(source, location);
			if (this.environment.isSimple) return [
				"return ",
				source,
				";"
			];
			else if (explicit) return [
				"buffer += ",
				source,
				";"
			];
			else {
				source.appendToBuffer = true;
				return source;
			}
		},
		initializeBuffer: function initializeBuffer() {
			return this.quotedString("");
		},
		internalNameLookup: function internalNameLookup(parent, name) {
			this.lookupPropertyFunctionIsUsed = true;
			return [
				"lookupProperty(",
				parent,
				",",
				JSON.stringify(name),
				")"
			];
		},
		lookupPropertyFunctionIsUsed: false,
		compile: function compile(environment, options, context, asObject) {
			this.environment = environment;
			this.options = options;
			this.stringParams = this.options.stringParams;
			this.trackIds = this.options.trackIds;
			this.precompile = !asObject;
			this.name = this.environment.name;
			this.isChild = !!context;
			this.context = context || {
				decorators: [],
				programs: [],
				environments: []
			};
			this.preamble();
			this.stackSlot = 0;
			this.stackVars = [];
			this.aliases = {};
			this.registers = { list: [] };
			this.hashes = [];
			this.compileStack = [];
			this.inlineStack = [];
			this.blockParams = [];
			this.compileChildren(environment, options);
			this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat;
			this.useBlockParams = this.useBlockParams || environment.useBlockParams;
			var opcodes = environment.opcodes, opcode = void 0, firstLoc = void 0, i = void 0, l = void 0;
			for (i = 0, l = opcodes.length; i < l; i++) {
				opcode = opcodes[i];
				this.source.currentLocation = opcode.loc;
				firstLoc = firstLoc || opcode.loc;
				this[opcode.opcode].apply(this, opcode.args);
			}
			this.source.currentLocation = firstLoc;
			this.pushSource("");
			/* istanbul ignore next */
			if (this.stackSlot || this.inlineStack.length || this.compileStack.length) throw new _exception2["default"]("Compile completed with content left on stack");
			if (!this.decorators.isEmpty()) {
				this.useDecorators = true;
				this.decorators.prepend([
					"var decorators = container.decorators, ",
					this.lookupPropertyFunctionVarDeclaration(),
					";\n"
				]);
				this.decorators.push("return fn;");
				if (asObject) this.decorators = Function.apply(this, [
					"fn",
					"props",
					"container",
					"depth0",
					"data",
					"blockParams",
					"depths",
					this.decorators.merge()
				]);
				else {
					this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n");
					this.decorators.push("}\n");
					this.decorators = this.decorators.merge();
				}
			} else this.decorators = void 0;
			var fn = this.createFunctionContext(asObject);
			if (!this.isChild) {
				var ret = {
					compiler: this.compilerInfo(),
					main: fn
				};
				if (this.decorators) {
					ret.main_d = this.decorators;
					ret.useDecorators = true;
				}
				var _context = this.context;
				var programs = _context.programs;
				var decorators = _context.decorators;
				for (i = 0, l = programs.length; i < l; i++) {
					ret[i] = programs[i];
					if (decorators[i]) {
						ret[i + "_d"] = decorators[i];
						ret.useDecorators = true;
					}
				}
				if (this.environment.usePartial) ret.usePartial = true;
				if (this.options.data) ret.useData = true;
				if (this.useDepths) ret.useDepths = true;
				if (this.useBlockParams) ret.useBlockParams = true;
				if (this.options.compat) ret.compat = true;
				if (!asObject) {
					ret.compiler = JSON.stringify(ret.compiler);
					this.source.currentLocation = { start: {
						line: 1,
						column: 0
					} };
					ret = this.objectLiteral(ret);
					if (options.srcName) {
						ret = ret.toStringWithSourceMap({ file: options.destName });
						ret.map = ret.map && ret.map.toString();
					} else ret = ret.toString();
				} else ret.compilerOptions = this.options;
				return ret;
			} else return fn;
		},
		preamble: function preamble() {
			this.lastContext = 0;
			this.source = new _codeGen2["default"](this.options.srcName);
			this.decorators = new _codeGen2["default"](this.options.srcName);
		},
		createFunctionContext: function createFunctionContext(asObject) {
			// istanbul ignore next
			var _this = this;
			var varDeclarations = "";
			var locals = this.stackVars.concat(this.registers.list);
			if (locals.length > 0) varDeclarations += ", " + locals.join(", ");
			var aliasCount = 0;
			Object.keys(this.aliases).forEach(function(alias) {
				var node = _this.aliases[alias];
				if (node.children && node.referenceCount > 1) {
					varDeclarations += ", alias" + ++aliasCount + "=" + alias;
					node.children[0] = "alias" + aliasCount;
				}
			});
			if (this.lookupPropertyFunctionIsUsed) varDeclarations += ", " + this.lookupPropertyFunctionVarDeclaration();
			var params = [
				"container",
				"depth0",
				"helpers",
				"partials",
				"data"
			];
			if (this.useBlockParams || this.useDepths) params.push("blockParams");
			if (this.useDepths) params.push("depths");
			var source = this.mergeSource(varDeclarations);
			if (asObject) {
				params.push(source);
				return Function.apply(this, params);
			} else return this.source.wrap([
				"function(",
				params.join(","),
				") {\n  ",
				source,
				"}"
			]);
		},
		mergeSource: function mergeSource(varDeclarations) {
			var isSimple = this.environment.isSimple, appendOnly = !this.forceBuffer, appendFirst = void 0, sourceSeen = void 0, bufferStart = void 0, bufferEnd = void 0;
			this.source.each(function(line) {
				if (line.appendToBuffer) {
					if (bufferStart) line.prepend("  + ");
					else bufferStart = line;
					bufferEnd = line;
				} else {
					if (bufferStart) {
						if (!sourceSeen) appendFirst = true;
						else bufferStart.prepend("buffer += ");
						bufferEnd.add(";");
						bufferStart = bufferEnd = void 0;
					}
					sourceSeen = true;
					if (!isSimple) appendOnly = false;
				}
			});
			if (appendOnly) {
				if (bufferStart) {
					bufferStart.prepend("return ");
					bufferEnd.add(";");
				} else if (!sourceSeen) this.source.push("return \"\";");
			} else {
				varDeclarations += ", buffer = " + (appendFirst ? "" : this.initializeBuffer());
				if (bufferStart) {
					bufferStart.prepend("return buffer + ");
					bufferEnd.add(";");
				} else this.source.push("return buffer;");
			}
			if (varDeclarations) this.source.prepend("var " + varDeclarations.substring(2) + (appendFirst ? "" : ";\n"));
			return this.source.merge();
		},
		lookupPropertyFunctionVarDeclaration: function lookupPropertyFunctionVarDeclaration() {
			return "\n      lookupProperty = container.lookupProperty || function(parent, propertyName) {\n        if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n          return parent[propertyName];\n        }\n        return undefined\n    }\n    ".trim();
		},
		blockValue: function blockValue(name) {
			var blockHelperMissing = this.aliasable("container.hooks.blockHelperMissing"), params = [this.contextName(0)];
			this.setupHelperArgs(name, 0, params);
			var blockName = this.popStack();
			params.splice(1, 0, blockName);
			this.push(this.source.functionCall(blockHelperMissing, "call", params));
		},
		ambiguousBlockValue: function ambiguousBlockValue() {
			var blockHelperMissing = this.aliasable("container.hooks.blockHelperMissing"), params = [this.contextName(0)];
			this.setupHelperArgs("", 0, params, true);
			this.flushInline();
			var current = this.topStack();
			params.splice(1, 0, current);
			this.pushSource([
				"if (!",
				this.lastHelper,
				") { ",
				current,
				" = ",
				this.source.functionCall(blockHelperMissing, "call", params),
				"}"
			]);
		},
		appendContent: function appendContent(content) {
			if (this.pendingContent) content = this.pendingContent + content;
			else this.pendingLocation = this.source.currentLocation;
			this.pendingContent = content;
		},
		append: function append() {
			if (this.isInline()) {
				this.replaceStack(function(current) {
					return [
						" != null ? ",
						current,
						" : \"\""
					];
				});
				this.pushSource(this.appendToBuffer(this.popStack()));
			} else {
				var local = this.popStack();
				this.pushSource([
					"if (",
					local,
					" != null) { ",
					this.appendToBuffer(local, void 0, true),
					" }"
				]);
				if (this.environment.isSimple) this.pushSource([
					"else { ",
					this.appendToBuffer("''", void 0, true),
					" }"
				]);
			}
		},
		appendEscaped: function appendEscaped() {
			this.pushSource(this.appendToBuffer([
				this.aliasable("container.escapeExpression"),
				"(",
				this.popStack(),
				")"
			]));
		},
		getContext: function getContext(depth) {
			this.lastContext = depth;
		},
		pushContext: function pushContext() {
			this.pushStackLiteral(this.contextName(this.lastContext));
		},
		lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) {
			var i = 0;
			if (!scoped && this.options.compat && !this.lastContext) this.push(this.depthedLookup(parts[i++]));
			else this.pushContext();
			this.resolvePath("context", parts, i, falsy, strict);
		},
		lookupBlockParam: function lookupBlockParam(blockParamId, parts) {
			this.useBlockParams = true;
			this.push([
				"blockParams[",
				blockParamId[0],
				"][",
				blockParamId[1],
				"]"
			]);
			this.resolvePath("context", parts, 1);
		},
		lookupData: function lookupData(depth, parts, strict) {
			if (!depth) this.pushStackLiteral("data");
			else this.pushStackLiteral("container.data(data, " + depth + ")");
			this.resolvePath("data", parts, 0, true, strict);
		},
		resolvePath: function resolvePath(type, parts, startPartIndex, falsy, strict) {
			// istanbul ignore next
			var _this2 = this;
			if (this.options.strict || this.options.assumeObjects) {
				this.push(strictLookup(this.options.strict && strict, this, parts, startPartIndex, type));
				return;
			}
			var len = parts.length;
			var _loop = function(i) {
				_this2.replaceStack(function(current) {
					var lookup = _this2.nameLookup(current, parts[i], type);
					if (!falsy) return [
						" != null ? ",
						lookup,
						" : ",
						current
					];
					else return [" && ", lookup];
				});
			};
			for (var i = startPartIndex; i < len; i++) _loop(i);
		},
		resolvePossibleLambda: function resolvePossibleLambda() {
			this.push([
				this.aliasable("container.lambda"),
				"(",
				this.popStack(),
				", ",
				this.contextName(0),
				")"
			]);
		},
		pushStringParam: function pushStringParam(string, type) {
			this.pushContext();
			this.pushString(type);
			if (type !== "SubExpression") if (typeof string === "string") this.pushString(string);
			else this.pushStackLiteral(string);
		},
		emptyHash: function emptyHash(omitEmpty) {
			if (this.trackIds) this.push("{}");
			if (this.stringParams) {
				this.push("{}");
				this.push("{}");
			}
			this.pushStackLiteral(omitEmpty ? "undefined" : "{}");
		},
		pushHash: function pushHash() {
			if (this.hash) this.hashes.push(this.hash);
			this.hash = {
				values: {},
				types: [],
				contexts: [],
				ids: []
			};
		},
		popHash: function popHash() {
			var hash = this.hash;
			this.hash = this.hashes.pop();
			if (this.trackIds) this.push(this.objectLiteral(hash.ids));
			if (this.stringParams) {
				this.push(this.objectLiteral(hash.contexts));
				this.push(this.objectLiteral(hash.types));
			}
			this.push(this.objectLiteral(hash.values));
		},
		pushString: function pushString(string) {
			this.pushStackLiteral(this.quotedString(string));
		},
		pushLiteral: function pushLiteral(value) {
			this.pushStackLiteral(value);
		},
		pushProgram: function pushProgram(guid) {
			if (guid != null) this.pushStackLiteral(this.programExpression(guid));
			else this.pushStackLiteral(null);
		},
		registerDecorator: function registerDecorator(paramSize, name) {
			var foundDecorator = this.nameLookup("decorators", name, "decorator"), options = this.setupHelperArgs(name, paramSize);
			this.decorators.push([
				"var decorator = ",
				foundDecorator,
				";"
			]);
			this.decorators.push([
				"if (typeof decorator !== \"function\") { throw new Error(",
				this.quotedString("Missing decorator: \"" + name + "\""),
				"); }"
			]);
			this.decorators.push([
				"fn = ",
				this.decorators.functionCall("decorator", "", [
					"fn",
					"props",
					"container",
					options
				]),
				" || fn;"
			]);
		},
		invokeHelper: function invokeHelper(paramSize, name, isSimple) {
			var nonHelper = this.popStack(), helper = this.setupHelper(paramSize, name);
			var possibleFunctionCalls = [];
			if (isSimple) possibleFunctionCalls.push(helper.name);
			possibleFunctionCalls.push(nonHelper);
			if (!this.options.strict) possibleFunctionCalls.push(this.aliasable("container.hooks.helperMissing"));
			var functionLookupCode = [
				"(",
				this.itemsSeparatedBy(possibleFunctionCalls, "||"),
				")"
			];
			var functionCall = this.source.functionCall(functionLookupCode, "call", helper.callParams);
			this.push(functionCall);
		},
		itemsSeparatedBy: function itemsSeparatedBy(items, separator) {
			var result = [];
			result.push(items[0]);
			for (var i = 1; i < items.length; i++) result.push(separator, items[i]);
			return result;
		},
		invokeKnownHelper: function invokeKnownHelper(paramSize, name) {
			var helper = this.setupHelper(paramSize, name);
			this.push(this.source.functionCall(helper.name, "call", helper.callParams));
		},
		invokeAmbiguous: function invokeAmbiguous(name, helperCall) {
			this.useRegister("helper");
			var nonHelper = this.popStack();
			this.emptyHash();
			var helper = this.setupHelper(0, name, helperCall);
			var lookup = [
				"(",
				"(helper = ",
				this.lastHelper = this.nameLookup("helpers", name, "helper"),
				" || ",
				nonHelper,
				")"
			];
			if (!this.options.strict) {
				lookup[0] = "(helper = ";
				lookup.push(" != null ? helper : ", this.aliasable("container.hooks.helperMissing"));
			}
			this.push([
				"(",
				lookup,
				helper.paramsInit ? ["),(", helper.paramsInit] : [],
				"),",
				"(typeof helper === ",
				this.aliasable("\"function\""),
				" ? ",
				this.source.functionCall("helper", "call", helper.callParams),
				" : helper))"
			]);
		},
		invokePartial: function invokePartial(isDynamic, name, indent) {
			var params = [], options = this.setupParams(name, 1, params);
			if (isDynamic) {
				name = this.popStack();
				delete options.name;
			}
			if (indent) options.indent = JSON.stringify(indent);
			options.helpers = "helpers";
			options.partials = "partials";
			options.decorators = "container.decorators";
			if (!isDynamic) params.unshift(this.nameLookup("partials", name, "partial"));
			else params.unshift(name);
			if (this.options.compat) options.depths = "depths";
			options = this.objectLiteral(options);
			params.push(options);
			this.push(this.source.functionCall("container.invokePartial", "", params));
		},
		assignToHash: function assignToHash(key) {
			var value = this.popStack(), context = void 0, type = void 0, id = void 0;
			if (this.trackIds) id = this.popStack();
			if (this.stringParams) {
				type = this.popStack();
				context = this.popStack();
			}
			var hash = this.hash;
			if (context) hash.contexts[key] = context;
			if (type) hash.types[key] = type;
			if (id) hash.ids[key] = id;
			hash.values[key] = value;
		},
		pushId: function pushId(type, name, child) {
			if (type === "BlockParam") this.pushStackLiteral("blockParams[" + name[0] + "].path[" + name[1] + "]" + (child ? " + " + JSON.stringify("." + child) : ""));
			else if (type === "PathExpression") this.pushString(name);
			else if (type === "SubExpression") this.pushStackLiteral("true");
			else this.pushStackLiteral("null");
		},
		compiler: JavaScriptCompiler,
		compileChildren: function compileChildren(environment, options) {
			var children = environment.children, child = void 0, compiler = void 0;
			for (var i = 0, l = children.length; i < l; i++) {
				child = children[i];
				compiler = new this.compiler();
				var existing = this.matchExistingProgram(child);
				if (existing == null) {
					var index = this.context.programs.push("") - 1;
					child.index = index;
					child.name = "program" + index;
					this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile);
					this.context.decorators[index] = compiler.decorators;
					this.context.environments[index] = child;
					this.useDepths = this.useDepths || compiler.useDepths;
					this.useBlockParams = this.useBlockParams || compiler.useBlockParams;
					child.useDepths = this.useDepths;
					child.useBlockParams = this.useBlockParams;
				} else {
					child.index = existing.index;
					child.name = "program" + existing.index;
					this.useDepths = this.useDepths || existing.useDepths;
					this.useBlockParams = this.useBlockParams || existing.useBlockParams;
				}
			}
		},
		matchExistingProgram: function matchExistingProgram(child) {
			for (var i = 0, len = this.context.environments.length; i < len; i++) {
				var environment = this.context.environments[i];
				if (environment && environment.equals(child)) return environment;
			}
		},
		programExpression: function programExpression(guid) {
			var child = this.environment.children[guid], programParams = [
				child.index,
				"data",
				child.blockParams
			];
			if (this.useBlockParams || this.useDepths) programParams.push("blockParams");
			if (this.useDepths) programParams.push("depths");
			return "container.program(" + programParams.join(", ") + ")";
		},
		useRegister: function useRegister(name) {
			if (!this.registers[name]) {
				this.registers[name] = true;
				this.registers.list.push(name);
			}
		},
		push: function push(expr) {
			if (!(expr instanceof Literal)) expr = this.source.wrap(expr);
			this.inlineStack.push(expr);
			return expr;
		},
		pushStackLiteral: function pushStackLiteral(item) {
			this.push(new Literal(item));
		},
		pushSource: function pushSource(source) {
			if (this.pendingContent) {
				this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation));
				this.pendingContent = void 0;
			}
			if (source) this.source.push(source);
		},
		replaceStack: function replaceStack(callback) {
			var prefix = ["("], stack = void 0, createdStack = void 0, usedLiteral = void 0;
			/* istanbul ignore next */
			if (!this.isInline()) throw new _exception2["default"]("replaceStack on non-inline");
			var top = this.popStack(true);
			if (top instanceof Literal) {
				stack = [top.value];
				prefix = ["(", stack];
				usedLiteral = true;
			} else {
				createdStack = true;
				var _name = this.incrStack();
				prefix = [
					"((",
					this.push(_name),
					" = ",
					top,
					")"
				];
				stack = this.topStack();
			}
			var item = callback.call(this, stack);
			if (!usedLiteral) this.popStack();
			if (createdStack) this.stackSlot--;
			this.push(prefix.concat(item, ")"));
		},
		incrStack: function incrStack() {
			this.stackSlot++;
			if (this.stackSlot > this.stackVars.length) this.stackVars.push("stack" + this.stackSlot);
			return this.topStackName();
		},
		topStackName: function topStackName() {
			return "stack" + this.stackSlot;
		},
		flushInline: function flushInline() {
			var inlineStack = this.inlineStack;
			this.inlineStack = [];
			for (var i = 0, len = inlineStack.length; i < len; i++) {
				var entry = inlineStack[i];
				/* istanbul ignore if */
				if (entry instanceof Literal) this.compileStack.push(entry);
				else {
					var stack = this.incrStack();
					this.pushSource([
						stack,
						" = ",
						entry,
						";"
					]);
					this.compileStack.push(stack);
				}
			}
		},
		isInline: function isInline() {
			return this.inlineStack.length;
		},
		popStack: function popStack(wrapped) {
			var inline = this.isInline(), item = (inline ? this.inlineStack : this.compileStack).pop();
			if (!wrapped && item instanceof Literal) return item.value;
			else {
				if (!inline) {
					/* istanbul ignore next */
					if (!this.stackSlot) throw new _exception2["default"]("Invalid stack pop");
					this.stackSlot--;
				}
				return item;
			}
		},
		topStack: function topStack() {
			var stack = this.isInline() ? this.inlineStack : this.compileStack, item = stack[stack.length - 1];
			/* istanbul ignore if */
			if (item instanceof Literal) return item.value;
			else return item;
		},
		contextName: function contextName(context) {
			if (this.useDepths && context) return "depths[" + context + "]";
			else return "depth" + context;
		},
		quotedString: function quotedString(str) {
			return this.source.quotedString(str);
		},
		objectLiteral: function objectLiteral(obj) {
			return this.source.objectLiteral(obj);
		},
		aliasable: function aliasable(name) {
			var ret = this.aliases[name];
			if (ret) {
				ret.referenceCount++;
				return ret;
			}
			ret = this.aliases[name] = this.source.wrap(name);
			ret.aliasable = true;
			ret.referenceCount = 1;
			return ret;
		},
		setupHelper: function setupHelper(paramSize, name, blockHelper) {
			var params = [];
			return {
				params,
				paramsInit: this.setupHelperArgs(name, paramSize, params, blockHelper),
				name: this.nameLookup("helpers", name, "helper"),
				callParams: [this.aliasable(this.contextName(0) + " != null ? " + this.contextName(0) + " : (container.nullContext || {})")].concat(params)
			};
		},
		setupParams: function setupParams(helper, paramSize, params) {
			var options = {}, contexts = [], types = [], ids = [], objectArgs = !params, param = void 0;
			if (objectArgs) params = [];
			options.name = this.quotedString(helper);
			options.hash = this.popStack();
			if (this.trackIds) options.hashIds = this.popStack();
			if (this.stringParams) {
				options.hashTypes = this.popStack();
				options.hashContexts = this.popStack();
			}
			var inverse = this.popStack(), program = this.popStack();
			if (program || inverse) {
				options.fn = program || "container.noop";
				options.inverse = inverse || "container.noop";
			}
			var i = paramSize;
			while (i--) {
				param = this.popStack();
				params[i] = param;
				if (this.trackIds) ids[i] = this.popStack();
				if (this.stringParams) {
					types[i] = this.popStack();
					contexts[i] = this.popStack();
				}
			}
			if (objectArgs) options.args = this.source.generateArray(params);
			if (this.trackIds) options.ids = this.source.generateArray(ids);
			if (this.stringParams) {
				options.types = this.source.generateArray(types);
				options.contexts = this.source.generateArray(contexts);
			}
			if (this.options.data) options.data = "data";
			if (this.useBlockParams) options.blockParams = "blockParams";
			return options;
		},
		setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) {
			var options = this.setupParams(helper, paramSize, params);
			options.loc = JSON.stringify(this.source.currentLocation);
			options = this.objectLiteral(options);
			if (useRegister) {
				this.useRegister("options");
				params.push("options");
				return ["options=", options];
			} else if (params) {
				params.push(options);
				return "";
			} else return options;
		}
	};
	(function() {
		var reservedWords = "break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" ");
		var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};
		for (var i = 0, l = reservedWords.length; i < l; i++) compilerWords[reservedWords[i]] = true;
	})();
	/**
	* @deprecated May be removed in the next major version
	*/
	JavaScriptCompiler.isValidJavaScriptVariableName = function(name) {
		return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name);
	};
	function strictLookup(requireTerminal, compiler, parts, startPartIndex, type) {
		var stack = compiler.popStack(), len = parts.length;
		if (requireTerminal) len--;
		for (var i = startPartIndex; i < len; i++) stack = compiler.nameLookup(stack, parts[i], type);
		if (requireTerminal) return [
			compiler.aliasable("container.strict"),
			"(",
			stack,
			", ",
			compiler.quotedString(parts[len]),
			", ",
			JSON.stringify(compiler.source.currentLocation),
			" )"
		];
		else return stack;
	}
	exports["default"] = JavaScriptCompiler;
	module.exports = exports["default"];
}));
//#endregion
//#region ../../node_modules/hyperformula/es/parser/ColumnAddress.mjs
var import_handlebars = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
	exports.__esModule = true;
	// istanbul ignore next
	function _interopRequireDefault(obj) {
		return obj && obj.__esModule ? obj : { "default": obj };
	}
	var _handlebarsRuntime2 = _interopRequireDefault(require_handlebars_runtime());
	var _handlebarsCompilerAst2 = _interopRequireDefault(require_ast());
	var _handlebarsCompilerBase = require_base();
	var _handlebarsCompilerCompiler = require_compiler();
	var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(require_javascript_compiler());
	var _handlebarsCompilerVisitor2 = _interopRequireDefault(require_visitor());
	var _handlebarsNoConflict2 = _interopRequireDefault(require_no_conflict());
	var _create = _handlebarsRuntime2["default"].create;
	function create() {
		var hb = _create();
		hb.compile = function(input, options) {
			return _handlebarsCompilerCompiler.compile(input, options, hb);
		};
		hb.precompile = function(input, options) {
			return _handlebarsCompilerCompiler.precompile(input, options, hb);
		};
		hb.AST = _handlebarsCompilerAst2["default"];
		hb.Compiler = _handlebarsCompilerCompiler.Compiler;
		hb.JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2["default"];
		hb.Parser = _handlebarsCompilerBase.parser;
		hb.parse = _handlebarsCompilerBase.parse;
		hb.parseWithoutProcessing = _handlebarsCompilerBase.parseWithoutProcessing;
		return hb;
	}
	var inst = create();
	inst.create = create;
	_handlebarsNoConflict2["default"](inst);
	inst.Visitor = _handlebarsCompilerVisitor2["default"];
	inst["default"] = inst;
	exports["default"] = inst;
	module.exports = exports["default"];
})))());
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var ReferenceType;
(function(ReferenceType) {
	ReferenceType["RELATIVE"] = "RELATIVE";
	ReferenceType["ABSOLUTE"] = "ABSOLUTE";
})(ReferenceType || (ReferenceType = {}));
var ColumnAddress = class ColumnAddress {
	constructor(type, col, sheet) {
		this.type = type;
		this.col = col;
		this.sheet = sheet;
	}
	static absolute(column, sheet) {
		return new ColumnAddress(ReferenceType.ABSOLUTE, column, sheet);
	}
	static relative(column, sheet) {
		return new ColumnAddress(ReferenceType.RELATIVE, column, sheet);
	}
	static compareByAbsoluteAddress(baseAddress) {
		return (colA, colB) => colA.toSimpleColumnAddress(baseAddress).col - colB.toSimpleColumnAddress(baseAddress).col;
	}
	isColumnAbsolute() {
		return this.type === ReferenceType.ABSOLUTE;
	}
	isColumnRelative() {
		return this.type === ReferenceType.RELATIVE;
	}
	isAbsolute() {
		return this.type === ReferenceType.ABSOLUTE && this.sheet !== void 0;
	}
	moved(toSheet, toRight, _toBottom) {
		const newSheet = this.sheet === void 0 ? void 0 : toSheet;
		return new ColumnAddress(this.type, this.col + toRight, newSheet);
	}
	shiftedByColumns(numberOfColumns) {
		return new ColumnAddress(this.type, this.col + numberOfColumns, this.sheet);
	}
	toSimpleColumnAddress(baseAddress) {
		const sheet = absoluteSheetReference(this, baseAddress);
		let column = this.col;
		if (this.isColumnRelative()) column = baseAddress.col + this.col;
		return simpleColumnAddress(sheet, column);
	}
	shiftRelativeDimensions(toRight, _toBottom) {
		const col = this.isColumnRelative() ? this.col + toRight : this.col;
		return new ColumnAddress(this.type, col, this.sheet);
	}
	shiftAbsoluteDimensions(toRight, _toBottom) {
		const col = this.isColumnAbsolute() ? this.col + toRight : this.col;
		return new ColumnAddress(this.type, col, this.sheet);
	}
	withSheet(sheet) {
		return new ColumnAddress(this.type, this.col, sheet);
	}
	isInvalid(baseAddress) {
		return this.toSimpleColumnAddress(baseAddress).col < 0;
	}
	hash(withSheet) {
		const sheetPart = withSheet && this.sheet !== void 0 ? `#${this.sheet}` : "";
		switch (this.type) {
			case ReferenceType.RELATIVE: return `${sheetPart}#COLR${this.col}`;
			case ReferenceType.ABSOLUTE: return `${sheetPart}#COLA${this.col}`;
		}
	}
	unparse(baseAddress) {
		const simpleAddress = this.toSimpleColumnAddress(baseAddress);
		if (invalidSimpleColumnAddress(simpleAddress)) return;
		const column = columnIndexToLabel(simpleAddress.col);
		return `${this.type === ReferenceType.ABSOLUTE ? "$" : ""}${column}`;
	}
	exceedsSheetSizeLimits(maxColumns) {
		return this.col >= maxColumns;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/parser/RowAddress.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var RowAddress = class RowAddress {
	constructor(type, row, sheet) {
		this.type = type;
		this.row = row;
		this.sheet = sheet;
	}
	static absolute(row, sheet) {
		return new RowAddress(ReferenceType.ABSOLUTE, row, sheet);
	}
	static relative(row, sheet) {
		return new RowAddress(ReferenceType.RELATIVE, row, sheet);
	}
	static compareByAbsoluteAddress(baseAddress) {
		return (rowA, rowB) => rowA.toSimpleRowAddress(baseAddress).row - rowB.toSimpleRowAddress(baseAddress).row;
	}
	isRowAbsolute() {
		return this.type === ReferenceType.ABSOLUTE;
	}
	isRowRelative() {
		return this.type === ReferenceType.RELATIVE;
	}
	isAbsolute() {
		return this.type === ReferenceType.ABSOLUTE && this.sheet !== void 0;
	}
	moved(toSheet, toRight, toBottom) {
		const newSheet = this.sheet === void 0 ? void 0 : toSheet;
		return new RowAddress(this.type, this.row + toBottom, newSheet);
	}
	shiftedByRows(numberOfColumns) {
		return new RowAddress(this.type, this.row + numberOfColumns, this.sheet);
	}
	toSimpleRowAddress(baseAddress) {
		const sheet = absoluteSheetReference(this, baseAddress);
		let row = this.row;
		if (this.isRowRelative()) row = baseAddress.row + this.row;
		return simpleRowAddress(sheet, row);
	}
	shiftRelativeDimensions(toRight, toBottom) {
		const row = this.isRowRelative() ? this.row + toBottom : this.row;
		return new RowAddress(this.type, row, this.sheet);
	}
	shiftAbsoluteDimensions(toRight, toBottom) {
		const row = this.isRowAbsolute() ? this.row + toBottom : this.row;
		return new RowAddress(this.type, row, this.sheet);
	}
	withSheet(sheet) {
		return new RowAddress(this.type, this.row, sheet);
	}
	isInvalid(baseAddress) {
		return this.toSimpleRowAddress(baseAddress).row < 0;
	}
	hash(withSheet) {
		const sheetPart = withSheet && this.sheet !== void 0 ? `#${this.sheet}` : "";
		switch (this.type) {
			case ReferenceType.RELATIVE: return `${sheetPart}#ROWR${this.row}`;
			case ReferenceType.ABSOLUTE: return `${sheetPart}#ROWA${this.row}`;
		}
	}
	unparse(baseAddress) {
		const simpleAddress = this.toSimpleRowAddress(baseAddress);
		if (invalidSimpleRowAddress(simpleAddress)) return;
		return `${this.type === ReferenceType.ABSOLUTE ? "$" : ""}${simpleAddress.row + 1}`;
	}
	exceedsSheetSizeLimits(maxRows) {
		return this.row >= maxRows;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/parser/CellAddress.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/** Possible kinds of cell references */
var CellReferenceType;
(function(CellReferenceType) {
	/** Cell reference with both row and column relative. */
	CellReferenceType["CELL_REFERENCE_RELATIVE"] = "CELL_REFERENCE";
	/** Cell reference with both row and column absolute. */
	CellReferenceType["CELL_REFERENCE_ABSOLUTE"] = "CELL_REFERENCE_ABSOLUTE";
	/** Cell reference with absolute column and relative row. */
	CellReferenceType["CELL_REFERENCE_ABSOLUTE_COL"] = "CELL_REFERENCE_ABSOLUTE_COL";
	/** Cell reference with relative column and absolute row. */
	CellReferenceType["CELL_REFERENCE_ABSOLUTE_ROW"] = "CELL_REFERENCE_ABSOLUTE_ROW";
})(CellReferenceType || (CellReferenceType = {}));
var CellAddress = class CellAddress {
	constructor(col, row, type, sheet) {
		this.col = col;
		this.row = row;
		this.type = type;
		this.sheet = sheet;
	}
	static fromColAndRow(col, row, sheet) {
		return (col.isColumnAbsolute() && row.isRowAbsolute() ? CellAddress.absolute.bind(this) : col.isColumnAbsolute() ? CellAddress.absoluteCol.bind(this) : row.isRowAbsolute() ? CellAddress.absoluteRow.bind(this) : CellAddress.relative.bind(this))(col.col, row.row, sheet);
	}
	static relative(col, row, sheet) {
		return new CellAddress(col, row, CellReferenceType.CELL_REFERENCE_RELATIVE, sheet);
	}
	static absolute(col, row, sheet) {
		return new CellAddress(col, row, CellReferenceType.CELL_REFERENCE_ABSOLUTE, sheet);
	}
	static absoluteCol(col, row, sheet) {
		return new CellAddress(col, row, CellReferenceType.CELL_REFERENCE_ABSOLUTE_COL, sheet);
	}
	static absoluteRow(col, row, sheet) {
		return new CellAddress(col, row, CellReferenceType.CELL_REFERENCE_ABSOLUTE_ROW, sheet);
	}
	/**
	* Converts R0C0 representation of cell address to simple object representation.
	*
	* @param baseAddress - base address for R0C0 shifts
	*/
	toSimpleCellAddress(baseAddress) {
		const sheet = absoluteSheetReference(this, baseAddress);
		if (this.type === CellReferenceType.CELL_REFERENCE_ABSOLUTE) return simpleCellAddress(sheet, this.col, this.row);
		else if (this.type === CellReferenceType.CELL_REFERENCE_ABSOLUTE_ROW) return simpleCellAddress(sheet, baseAddress.col + this.col, this.row);
		else if (this.type === CellReferenceType.CELL_REFERENCE_ABSOLUTE_COL) return simpleCellAddress(sheet, this.col, baseAddress.row + this.row);
		else return simpleCellAddress(sheet, baseAddress.col + this.col, baseAddress.row + this.row);
	}
	toColumnAddress() {
		return new ColumnAddress(this.isColumnRelative() ? ReferenceType.RELATIVE : ReferenceType.ABSOLUTE, this.col, this.sheet);
	}
	toRowAddress() {
		return new RowAddress(this.isRowRelative() ? ReferenceType.RELATIVE : ReferenceType.ABSOLUTE, this.row, this.sheet);
	}
	toSimpleColumnAddress(baseAddress) {
		const sheet = absoluteSheetReference(this, baseAddress);
		let column = this.col;
		if (this.isColumnRelative()) column += baseAddress.col;
		return simpleColumnAddress(sheet, column);
	}
	toSimpleRowAddress(baseAddress) {
		const sheet = absoluteSheetReference(this, baseAddress);
		let row = this.row;
		if (this.isRowRelative()) row += baseAddress.row;
		return simpleRowAddress(sheet, row);
	}
	isRowAbsolute() {
		return this.type === CellReferenceType.CELL_REFERENCE_ABSOLUTE || this.type === CellReferenceType.CELL_REFERENCE_ABSOLUTE_ROW;
	}
	isColumnAbsolute() {
		return this.type === CellReferenceType.CELL_REFERENCE_ABSOLUTE || this.type === CellReferenceType.CELL_REFERENCE_ABSOLUTE_COL;
	}
	isColumnRelative() {
		return this.type === CellReferenceType.CELL_REFERENCE_RELATIVE || this.type === CellReferenceType.CELL_REFERENCE_ABSOLUTE_ROW;
	}
	isRowRelative() {
		return this.type === CellReferenceType.CELL_REFERENCE_RELATIVE || this.type === CellReferenceType.CELL_REFERENCE_ABSOLUTE_COL;
	}
	isAbsolute() {
		return this.type === CellReferenceType.CELL_REFERENCE_ABSOLUTE && this.sheet !== void 0;
	}
	shiftedByRows(numberOfRows) {
		return new CellAddress(this.col, this.row + numberOfRows, this.type, this.sheet);
	}
	shiftedByColumns(numberOfColumns) {
		return new CellAddress(this.col + numberOfColumns, this.row, this.type, this.sheet);
	}
	moved(toSheet, toRight, toBottom) {
		const newSheet = this.sheet === void 0 ? void 0 : toSheet;
		return new CellAddress(this.col + toRight, this.row + toBottom, this.type, newSheet);
	}
	withSheet(sheet) {
		return new CellAddress(this.col, this.row, this.type, sheet);
	}
	isInvalid(baseAddress) {
		return isColOrRowInvalid(this.toSimpleCellAddress(baseAddress));
	}
	shiftRelativeDimensions(toRight, toBottom) {
		return new CellAddress(this.isColumnAbsolute() ? this.col : this.col + toRight, this.isRowAbsolute() ? this.row : this.row + toBottom, this.type, this.sheet);
	}
	shiftAbsoluteDimensions(toRight, toBottom) {
		return new CellAddress(this.isColumnRelative() ? this.col : this.col + toRight, this.isRowRelative() ? this.row : this.row + toBottom, this.type, this.sheet);
	}
	hash(withSheet) {
		const sheetPart = withSheet && this.sheet !== void 0 ? `#${this.sheet}` : "";
		switch (this.type) {
			case CellReferenceType.CELL_REFERENCE_RELATIVE: return `${sheetPart}#${this.row}R${this.col}`;
			case CellReferenceType.CELL_REFERENCE_ABSOLUTE: return `${sheetPart}#${this.row}A${this.col}`;
			case CellReferenceType.CELL_REFERENCE_ABSOLUTE_COL: return `${sheetPart}#${this.row}AC${this.col}`;
			case CellReferenceType.CELL_REFERENCE_ABSOLUTE_ROW: return `${sheetPart}#${this.row}AR${this.col}`;
		}
	}
	unparse(baseAddress) {
		const simpleAddress = this.toSimpleCellAddress(baseAddress);
		if (isColOrRowInvalid(simpleAddress)) return;
		const column = columnIndexToLabel(simpleAddress.col);
		const rowDollar = this.type === CellReferenceType.CELL_REFERENCE_ABSOLUTE || this.type === CellReferenceType.CELL_REFERENCE_ABSOLUTE_ROW ? "$" : "";
		return `${this.type === CellReferenceType.CELL_REFERENCE_ABSOLUTE || this.type === CellReferenceType.CELL_REFERENCE_ABSOLUTE_COL ? "$" : ""}${column}${rowDollar}${simpleAddress.row + 1}`;
	}
	exceedsSheetSizeLimits(maxColumns, maxRows) {
		return this.row >= maxRows || this.col >= maxColumns;
	}
};
var ODFF_WHITESPACE_PATTERN = "[ \\t\\n\\r]+";
var UNICODE_LETTER_PATTERN = "A-Za-zÀ-ʯ";
var NON_RESERVED_CHARACTER_PATTERN = `${UNICODE_LETTER_PATTERN}0-9_.`;
var UNQUOTED_SHEET_NAME_PATTERN = `[${UNICODE_LETTER_PATTERN}0-9_]+`;
var SHEET_NAME_PATTERN = `(${UNQUOTED_SHEET_NAME_PATTERN}|'(((?!').|'')*)')!`;
var CELL_REFERENCE_PATTERN = `(${SHEET_NAME_PATTERN})?\\\$?[A-Za-z]+\\\$?[0-9]+`;
var COLUMN_REFERENCE_PATTERN = `(${SHEET_NAME_PATTERN})?\\\$?[A-Za-z]+`;
var ROW_REFERENCE_PATTERN = `(${SHEET_NAME_PATTERN})?\\\$?[0-9]+`;
var R1C1_CELL_REFERENCE_PATTERN = "[rR][0-9]*[cC][0-9]*";
var CELL_REFERENCE_WITH_NEXT_CHARACTER_PATTERN = `(${CELL_REFERENCE_PATTERN})[^${NON_RESERVED_CHARACTER_PATTERN}]`;
var NAMED_EXPRESSION_PATTERN = `[${UNICODE_LETTER_PATTERN}_][${NON_RESERVED_CHARACTER_PATTERN}]*`;
var ALL_DIGITS_ARRAY = [
	"0",
	"1",
	"2",
	"3",
	"4",
	"5",
	"6",
	"7",
	"8",
	"9"
];
var ALL_UNICODE_LETTERS_ARRAY = [
	...Array.from(Array(26)).map((_, i) => i + "A".charCodeAt(0)),
	...Array.from(Array(26)).map((_, i) => i + "a".charCodeAt(0)),
	...Array.from(Array(496)).map((_, i) => i + 192)
].map((code) => String.fromCharCode(code));
//#endregion
//#region ../../node_modules/hyperformula/es/parser/addressRepresentationConverters.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var addressRegex = new RegExp(`^(${SHEET_NAME_PATTERN})?(\\\$?)([A-Za-z]+)(\\\$?)([0-9]+)$`);
var columnRegex = new RegExp(`^(${SHEET_NAME_PATTERN})?(\\\$?)([A-Za-z]+)$`);
var rowRegex = new RegExp(`^(${SHEET_NAME_PATTERN})?(\\\$?)([0-9]+)$`);
var simpleSheetNameRegex = new RegExp(`^${UNQUOTED_SHEET_NAME_PATTERN}$`);
/**
* Computes R0C0 representation of cell address based on it's string representation and base address.
*
* @param {string} stringAddress - string representation of cell address, e.g., 'C64'
* @param {SimpleCellAddress} baseAddress - base address for R0C0 conversion
* @param {ResolveSheetReferenceFn} resolveSheetReference - mapping function needed to change name of a sheet to index
* @returns {Maybe<CellAddress>} object representation of address or `undefined` if the sheet cannot be resolved
*/
var cellAddressFromString = (stringAddress, baseAddress, resolveSheetReference) => {
	const result = addressRegex.exec(stringAddress);
	if (!result) return;
	const col = columnLabelToIndex(result[6]);
	const row = Number(result[8]) - 1;
	const sheet = sheetNameToId(extractSheetName(result), resolveSheetReference);
	if (sheet === null) return;
	if (result[5] === "$" && result[7] === "$") return CellAddress.absolute(col, row, sheet);
	else if (result[5] === "$") return CellAddress.absoluteCol(col, row - baseAddress.row, sheet);
	else if (result[7] === "$") return CellAddress.absoluteRow(col - baseAddress.col, row, sheet);
	else return CellAddress.relative(col - baseAddress.col, row - baseAddress.row, sheet);
};
var columnAddressFromString = (stringAddress, baseAddress, resolveSheetReference) => {
	const result = columnRegex.exec(stringAddress);
	if (!result) return;
	const col = columnLabelToIndex(result[6]);
	const sheet = sheetNameToId(extractSheetName(result), resolveSheetReference);
	if (sheet === null) return;
	if (result[5] === "$") return ColumnAddress.absolute(col, sheet);
	else return ColumnAddress.relative(col - baseAddress.col, sheet);
};
var rowAddressFromString = (stringAddress, baseAddress, resolveSheetReference) => {
	const result = rowRegex.exec(stringAddress);
	if (!result) return;
	const row = Number(result[6]) - 1;
	const sheet = sheetNameToId(extractSheetName(result), resolveSheetReference);
	if (sheet === null) return;
	if (result[5] === "$") return RowAddress.absolute(row, sheet);
	else return RowAddress.relative(row - baseAddress.row, sheet);
};
/**
* Computes simple (absolute) address of a cell address based on its string representation.
* - If sheet name is present in the string representation but is not present in sheet mapping, returns `undefined`.
* - If sheet name is not present in the string representation, returns {@param contextSheetId} as sheet number.
*
* @param {ResolveSheetReferenceFn} resolveSheetReference - mapping function needed to change name of a sheet to index
* @param {string} stringAddress - string representation of cell address, e.g., 'C64'
* @param {number} contextSheetId - sheet in context of which we should parse the address
* @returns {Maybe<SimpleCellAddress>} absolute representation of address, e.g., { sheet: 0, col: 1, row: 1 }
*/
var simpleCellAddressFromString = (resolveSheetReference, stringAddress, contextSheetId) => {
	const regExpExecArray = addressRegex.exec(stringAddress);
	if (!regExpExecArray) return;
	const col = columnLabelToIndex(regExpExecArray[6]);
	const row = Number(regExpExecArray[8]) - 1;
	const sheet = sheetNameToId(extractSheetName(regExpExecArray), resolveSheetReference);
	if (sheet === null) return;
	return simpleCellAddress(sheet === void 0 ? contextSheetId : sheet, col, row);
};
var simpleCellRangeFromString = (resolveSheetReference, stringAddress, contextSheetId) => {
	const split = stringAddress.split(":");
	if (split.length !== 2) return;
	const [startString, endString] = split;
	const start = simpleCellAddressFromString(resolveSheetReference, startString, contextSheetId);
	if (start === void 0) return;
	const end = simpleCellAddressFromString(resolveSheetReference, endString, start.sheet);
	if (end === void 0) return;
	if (start.sheet !== end.sheet) return;
	return simpleCellRange(start, end);
};
/**
* Returns string representation of absolute address
* If sheet index is not present in sheet mapping, returns undefined
*/
var simpleCellAddressToString = (sheetIndexMapping, address, sheetIndex) => {
	const column = columnIndexToLabel(address.col);
	const sheetName = sheetIndexToString(address.sheet, sheetIndexMapping);
	if (sheetName === void 0) return;
	if (sheetIndex !== address.sheet) return `${sheetName}!${column}${address.row + 1}`;
	else return `${column}${address.row + 1}`;
};
var simpleCellRangeToString = (sheetIndexMapping, address, sheetIndex) => {
	const startString = simpleCellAddressToString(sheetIndexMapping, address.start, sheetIndex);
	const endString = simpleCellAddressToString(sheetIndexMapping, address.end, address.start.sheet);
	if (startString === void 0 || endString === void 0) return;
	else return `${startString}:${endString}`;
};
/**
* Convert column label to index
*
* @param columnStringRepresentation - column label (e.g., 'AAB')
* @returns column index
*/
function columnLabelToIndex(columnStringRepresentation) {
	if (columnStringRepresentation.length === 1) return columnStringRepresentation.toUpperCase().charCodeAt(0) - 65;
	else return columnStringRepresentation.split("").reduce((currentColumn, nextLetter) => {
		return currentColumn * 26 + (nextLetter.toUpperCase().charCodeAt(0) - 64);
	}, 0) - 1;
}
/**
* Converts column index to label
*
* @param column - address to convert
* @returns string representation, e.g., 'AAB'
*/
function columnIndexToLabel(column) {
	let result = "";
	while (column >= 0) {
		result = String.fromCharCode(column % 26 + 97) + result;
		column = Math.floor(column / 26) - 1;
	}
	return result.toUpperCase();
}
function sheetIndexToString(sheetId, sheetMappingFn) {
	let sheetName = sheetMappingFn(sheetId);
	if (sheetName === void 0) return;
	if (simpleSheetNameRegex.test(sheetName)) return sheetName;
	else {
		sheetName = sheetName.replace(/'/g, "''");
		return `'${sheetName}'`;
	}
}
function extractSheetName(regexResult) {
	var _a;
	const maybeSheetName = (_a = regexResult[3]) !== null && _a !== void 0 ? _a : regexResult[2];
	return maybeSheetName ? maybeSheetName.replace(/''/g, "'") : null;
}
/**
* Resolves sheet name to sheet id.
*
* @param sheetName - extracted sheet name or null when not provided.
* @param resolveSheetReference - mapping function resolving sheet name to id.
* @returns sheet id, undefined when sheet name absent, null when resolution fails.
*/
function sheetNameToId(sheetName, resolveSheetReference) {
	if (!sheetName) return;
	const sheetId = resolveSheetReference(sheetName);
	return sheetId === void 0 ? null : sheetId;
}
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/utils/utils.js
function isEmpty(arr) {
	return arr && arr.length === 0;
}
function keys$2(obj) {
	if (obj === void 0 || obj === null) return [];
	return Object.keys(obj);
}
function values(obj) {
	var vals = [];
	var keys = Object.keys(obj);
	for (var i = 0; i < keys.length; i++) vals.push(obj[keys[i]]);
	return vals;
}
function mapValues(obj, callback) {
	var result = [];
	var objKeys = keys$2(obj);
	for (var idx = 0; idx < objKeys.length; idx++) {
		var currKey = objKeys[idx];
		result.push(callback.call(null, obj[currKey], currKey));
	}
	return result;
}
function map$3(arr, callback) {
	var result = [];
	for (var idx = 0; idx < arr.length; idx++) result.push(callback.call(null, arr[idx], idx));
	return result;
}
function flatten(arr) {
	var result = [];
	for (var idx = 0; idx < arr.length; idx++) {
		var currItem = arr[idx];
		if (Array.isArray(currItem)) result = result.concat(flatten(currItem));
		else result.push(currItem);
	}
	return result;
}
function first$1(arr) {
	return isEmpty(arr) ? void 0 : arr[0];
}
function last(arr) {
	var len = arr && arr.length;
	return len ? arr[len - 1] : void 0;
}
function forEach(collection, iteratorCallback) {
	/* istanbul ignore else */
	if (Array.isArray(collection)) for (var i = 0; i < collection.length; i++) iteratorCallback.call(null, collection[i], i);
	else if (isObject$1(collection)) {
		var colKeys = keys$2(collection);
		for (var i = 0; i < colKeys.length; i++) {
			var key = colKeys[i];
			var value = collection[key];
			iteratorCallback.call(null, value, key);
		}
	} else throw Error("non exhaustive match");
}
function isString$1(item) {
	return typeof item === "string";
}
function isUndefined$1(item) {
	return item === void 0;
}
function isFunction$1(item) {
	return item instanceof Function;
}
function drop(arr, howMuch) {
	if (howMuch === void 0) howMuch = 1;
	return arr.slice(howMuch, arr.length);
}
function dropRight(arr, howMuch) {
	if (howMuch === void 0) howMuch = 1;
	return arr.slice(0, arr.length - howMuch);
}
function filter(arr, predicate) {
	var result = [];
	if (Array.isArray(arr)) for (var i = 0; i < arr.length; i++) {
		var item = arr[i];
		if (predicate.call(null, item)) result.push(item);
	}
	return result;
}
function reject(arr, predicate) {
	return filter(arr, function(item) {
		return !predicate(item);
	});
}
function pick(obj, predicate) {
	var keys = Object.keys(obj);
	var result = {};
	for (var i = 0; i < keys.length; i++) {
		var currKey = keys[i];
		var currItem = obj[currKey];
		if (predicate(currItem)) result[currKey] = currItem;
	}
	return result;
}
function has(obj, prop) {
	if (isObject$1(obj)) return obj.hasOwnProperty(prop);
	return false;
}
function contains(arr, item) {
	return find$1(arr, function(currItem) {
		return currItem === item;
	}) !== void 0 ? true : false;
}
/**
* shallow clone
*/
function cloneArr(arr) {
	var newArr = [];
	for (var i = 0; i < arr.length; i++) newArr.push(arr[i]);
	return newArr;
}
/**
* shallow clone
*/
function cloneObj(obj) {
	var clonedObj = {};
	for (var key in obj)
 /* istanbul ignore else */
	if (Object.prototype.hasOwnProperty.call(obj, key)) clonedObj[key] = obj[key];
	return clonedObj;
}
function find$1(arr, predicate) {
	for (var i = 0; i < arr.length; i++) {
		var item = arr[i];
		if (predicate.call(null, item)) return item;
	}
}
function findAll(arr, predicate) {
	var found = [];
	for (var i = 0; i < arr.length; i++) {
		var item = arr[i];
		if (predicate.call(null, item)) found.push(item);
	}
	return found;
}
function reduce(arrOrObj, iterator, initial) {
	var isArr = Array.isArray(arrOrObj);
	var vals = isArr ? arrOrObj : values(arrOrObj);
	var objKeys = isArr ? [] : keys$2(arrOrObj);
	var accumulator = initial;
	for (var i = 0; i < vals.length; i++) accumulator = iterator.call(null, accumulator, vals[i], isArr ? i : objKeys[i]);
	return accumulator;
}
function compact(arr) {
	return reject(arr, function(item) {
		return item === null || item === void 0;
	});
}
function uniq(arr, identity) {
	if (identity === void 0) identity = function(item) {
		return item;
	};
	var identities = [];
	return reduce(arr, function(result, currItem) {
		var currIdentity = identity(currItem);
		if (contains(identities, currIdentity)) return result;
		else {
			identities.push(currIdentity);
			return result.concat(currItem);
		}
	}, []);
}
function isArray$1(obj) {
	return Array.isArray(obj);
}
function isRegExp(obj) {
	return obj instanceof RegExp;
}
function isObject$1(obj) {
	return obj instanceof Object;
}
function every(arr, predicate) {
	for (var i = 0; i < arr.length; i++) if (!predicate(arr[i], i)) return false;
	return true;
}
function difference(arr, values) {
	return reject(arr, function(item) {
		return contains(values, item);
	});
}
function some$1(arr, predicate) {
	for (var i = 0; i < arr.length; i++) if (predicate(arr[i])) return true;
	return false;
}
function indexOf$1(arr, value) {
	for (var i = 0; i < arr.length; i++) if (arr[i] === value) return i;
	return -1;
}
/**
* mutates! (and returns) target
*/
function assign(target) {
	var sources = [];
	for (var _i = 1; _i < arguments.length; _i++) sources[_i - 1] = arguments[_i];
	for (var i = 0; i < sources.length; i++) {
		var curSource = sources[i];
		var currSourceKeys = keys$2(curSource);
		for (var j = 0; j < currSourceKeys.length; j++) {
			var currKey = currSourceKeys[j];
			target[currKey] = curSource[currKey];
		}
	}
	return target;
}
/**
* mutates! (and returns) target
*/
function assignNoOverwrite(target) {
	var sources = [];
	for (var _i = 1; _i < arguments.length; _i++) sources[_i - 1] = arguments[_i];
	for (var i = 0; i < sources.length; i++) {
		var curSource = sources[i];
		if (isUndefined$1(curSource)) continue;
		var currSourceKeys = keys$2(curSource);
		for (var j = 0; j < currSourceKeys.length; j++) {
			var currKey = currSourceKeys[j];
			if (!has(target, currKey)) target[currKey] = curSource[currKey];
		}
	}
	return target;
}
function defaults$1() {
	var sources = [];
	for (var _i = 0; _i < arguments.length; _i++) sources[_i] = arguments[_i];
	return assignNoOverwrite.apply(null, [{}].concat(sources));
}
function groupBy(arr, groupKeyFunc) {
	var result = {};
	forEach(arr, function(item) {
		var currGroupKey = groupKeyFunc(item);
		var currGroupArr = result[currGroupKey];
		if (currGroupArr) currGroupArr.push(item);
		else result[currGroupKey] = [item];
	});
	return result;
}
/**
* Merge obj2 into obj1.
* Will overwrite existing properties with the same name
*/
function merge$1(obj1, obj2) {
	var result = cloneObj(obj1);
	var keys2 = keys$2(obj2);
	for (var i = 0; i < keys2.length; i++) {
		var key = keys2[i];
		result[key] = obj2[key];
	}
	return result;
}
function NOOP() {}
function IDENTITY(item) {
	return item;
}
/**
* Will return a new packed array with same values.
*/
function packArray(holeyArr) {
	var result = [];
	for (var i = 0; i < holeyArr.length; i++) {
		var orgValue = holeyArr[i];
		result.push(orgValue !== void 0 ? orgValue : void 0);
	}
	return result;
}
function PRINT_ERROR(msg) {
	/* istanbul ignore else - can't override global.console in node.js */
	if (console && console.error) console.error("Error: " + msg);
}
function PRINT_WARNING(msg) {
	/* istanbul ignore else - can't override global.console in node.js*/
	if (console && console.warn) console.warn("Warning: " + msg);
}
function isES2015MapSupported() {
	return typeof Map === "function";
}
function applyMixins(derivedCtor, baseCtors) {
	baseCtors.forEach(function(baseCtor) {
		var baseProto = baseCtor.prototype;
		Object.getOwnPropertyNames(baseProto).forEach(function(propName) {
			if (propName === "constructor") return;
			var basePropDescriptor = Object.getOwnPropertyDescriptor(baseProto, propName);
			if (basePropDescriptor && (basePropDescriptor.get || basePropDescriptor.set)) Object.defineProperty(derivedCtor.prototype, propName, basePropDescriptor);
			else derivedCtor.prototype[propName] = baseCtor.prototype[propName];
		});
	});
}
function toFastProperties(toBecomeFast) {
	function FakeConstructor() {}
	FakeConstructor.prototype = toBecomeFast;
	var fakeInstance = new FakeConstructor();
	function fakeAccess() {
		return typeof fakeInstance.bar;
	}
	fakeAccess();
	fakeAccess();
	return toBecomeFast;
}
function peek(arr) {
	return arr[arr.length - 1];
}
/* istanbul ignore next - for performance tracing*/
function timer(func) {
	var start = (/* @__PURE__ */ new Date()).getTime();
	var val = func();
	return {
		time: (/* @__PURE__ */ new Date()).getTime() - start,
		value: val
	};
}
var init_utils = __esmMin((() => {}));
//#endregion
//#region ../../node_modules/regexp-to-ast/lib/regexp-to-ast.js
var require_regexp_to_ast = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	(function(root, factory) {
		// istanbul ignore next
		if (typeof define === "function" && define.amd)
 // istanbul ignore next
		define([], factory);
		else if (typeof module === "object" && module.exports) module.exports = factory();
		else
 // istanbul ignore next
		root.regexpToAst = factory();
	})(typeof self !== "undefined" ? self : exports, function() {
		function RegExpParser() {}
		RegExpParser.prototype.saveState = function() {
			return {
				idx: this.idx,
				input: this.input,
				groupIdx: this.groupIdx
			};
		};
		RegExpParser.prototype.restoreState = function(newState) {
			this.idx = newState.idx;
			this.input = newState.input;
			this.groupIdx = newState.groupIdx;
		};
		RegExpParser.prototype.pattern = function(input) {
			this.idx = 0;
			this.input = input;
			this.groupIdx = 0;
			this.consumeChar("/");
			var value = this.disjunction();
			this.consumeChar("/");
			var flags = {
				type: "Flags",
				global: false,
				ignoreCase: false,
				multiLine: false,
				unicode: false,
				sticky: false
			};
			while (this.isRegExpFlag()) switch (this.popChar()) {
				case "g":
					addFlag(flags, "global");
					break;
				case "i":
					addFlag(flags, "ignoreCase");
					break;
				case "m":
					addFlag(flags, "multiLine");
					break;
				case "u":
					addFlag(flags, "unicode");
					break;
				case "y":
					addFlag(flags, "sticky");
					break;
			}
			if (this.idx !== this.input.length) throw Error("Redundant input: " + this.input.substring(this.idx));
			return {
				type: "Pattern",
				flags,
				value
			};
		};
		RegExpParser.prototype.disjunction = function() {
			var alts = [];
			alts.push(this.alternative());
			while (this.peekChar() === "|") {
				this.consumeChar("|");
				alts.push(this.alternative());
			}
			return {
				type: "Disjunction",
				value: alts
			};
		};
		RegExpParser.prototype.alternative = function() {
			var terms = [];
			while (this.isTerm()) terms.push(this.term());
			return {
				type: "Alternative",
				value: terms
			};
		};
		RegExpParser.prototype.term = function() {
			if (this.isAssertion()) return this.assertion();
			else return this.atom();
		};
		RegExpParser.prototype.assertion = function() {
			switch (this.popChar()) {
				case "^": return { type: "StartAnchor" };
				case "$": return { type: "EndAnchor" };
				case "\\":
					switch (this.popChar()) {
						case "b": return { type: "WordBoundary" };
						case "B": return { type: "NonWordBoundary" };
					}
					// istanbul ignore next
					throw Error("Invalid Assertion Escape");
				case "(":
					this.consumeChar("?");
					var type;
					switch (this.popChar()) {
						case "=":
							type = "Lookahead";
							break;
						case "!":
							type = "NegativeLookahead";
							break;
					}
					ASSERT_EXISTS(type);
					var disjunction = this.disjunction();
					this.consumeChar(")");
					return {
						type,
						value: disjunction
					};
			}
			// istanbul ignore next
			ASSERT_NEVER_REACH_HERE();
		};
		RegExpParser.prototype.quantifier = function(isBacktracking) {
			var range;
			switch (this.popChar()) {
				case "*":
					range = {
						atLeast: 0,
						atMost: Infinity
					};
					break;
				case "+":
					range = {
						atLeast: 1,
						atMost: Infinity
					};
					break;
				case "?":
					range = {
						atLeast: 0,
						atMost: 1
					};
					break;
				case "{":
					var atLeast = this.integerIncludingZero();
					switch (this.popChar()) {
						case "}":
							range = {
								atLeast,
								atMost: atLeast
							};
							break;
						case ",":
							var atMost;
							if (this.isDigit()) {
								atMost = this.integerIncludingZero();
								range = {
									atLeast,
									atMost
								};
							} else range = {
								atLeast,
								atMost: Infinity
							};
							this.consumeChar("}");
							break;
					}
					if (isBacktracking === true && range === void 0) return;
					ASSERT_EXISTS(range);
					break;
			}
			if (isBacktracking === true && range === void 0) return;
			ASSERT_EXISTS(range);
			if (this.peekChar(0) === "?") {
				this.consumeChar("?");
				range.greedy = false;
			} else range.greedy = true;
			range.type = "Quantifier";
			return range;
		};
		RegExpParser.prototype.atom = function() {
			var atom;
			switch (this.peekChar()) {
				case ".":
					atom = this.dotAll();
					break;
				case "\\":
					atom = this.atomEscape();
					break;
				case "[":
					atom = this.characterClass();
					break;
				case "(":
					atom = this.group();
					break;
			}
			if (atom === void 0 && this.isPatternCharacter()) atom = this.patternCharacter();
			ASSERT_EXISTS(atom);
			if (this.isQuantifier()) atom.quantifier = this.quantifier();
			return atom;
		};
		RegExpParser.prototype.dotAll = function() {
			this.consumeChar(".");
			return {
				type: "Set",
				complement: true,
				value: [
					cc("\n"),
					cc("\r"),
					cc("\u2028"),
					cc("\u2029")
				]
			};
		};
		RegExpParser.prototype.atomEscape = function() {
			this.consumeChar("\\");
			switch (this.peekChar()) {
				case "1":
				case "2":
				case "3":
				case "4":
				case "5":
				case "6":
				case "7":
				case "8":
				case "9": return this.decimalEscapeAtom();
				case "d":
				case "D":
				case "s":
				case "S":
				case "w":
				case "W": return this.characterClassEscape();
				case "f":
				case "n":
				case "r":
				case "t":
				case "v": return this.controlEscapeAtom();
				case "c": return this.controlLetterEscapeAtom();
				case "0": return this.nulCharacterAtom();
				case "x": return this.hexEscapeSequenceAtom();
				case "u": return this.regExpUnicodeEscapeSequenceAtom();
				default: return this.identityEscapeAtom();
			}
		};
		RegExpParser.prototype.decimalEscapeAtom = function() {
			return {
				type: "GroupBackReference",
				value: this.positiveInteger()
			};
		};
		RegExpParser.prototype.characterClassEscape = function() {
			var set;
			var complement = false;
			switch (this.popChar()) {
				case "d":
					set = digitsCharCodes;
					break;
				case "D":
					set = digitsCharCodes;
					complement = true;
					break;
				case "s":
					set = whitespaceCodes;
					break;
				case "S":
					set = whitespaceCodes;
					complement = true;
					break;
				case "w":
					set = wordCharCodes;
					break;
				case "W":
					set = wordCharCodes;
					complement = true;
					break;
			}
			ASSERT_EXISTS(set);
			return {
				type: "Set",
				value: set,
				complement
			};
		};
		RegExpParser.prototype.controlEscapeAtom = function() {
			var escapeCode;
			switch (this.popChar()) {
				case "f":
					escapeCode = cc("\f");
					break;
				case "n":
					escapeCode = cc("\n");
					break;
				case "r":
					escapeCode = cc("\r");
					break;
				case "t":
					escapeCode = cc("	");
					break;
				case "v":
					escapeCode = cc("\v");
					break;
			}
			ASSERT_EXISTS(escapeCode);
			return {
				type: "Character",
				value: escapeCode
			};
		};
		RegExpParser.prototype.controlLetterEscapeAtom = function() {
			this.consumeChar("c");
			var letter = this.popChar();
			if (/[a-zA-Z]/.test(letter) === false) throw Error("Invalid ");
			return {
				type: "Character",
				value: letter.toUpperCase().charCodeAt(0) - 64
			};
		};
		RegExpParser.prototype.nulCharacterAtom = function() {
			this.consumeChar("0");
			return {
				type: "Character",
				value: cc("\0")
			};
		};
		RegExpParser.prototype.hexEscapeSequenceAtom = function() {
			this.consumeChar("x");
			return this.parseHexDigits(2);
		};
		RegExpParser.prototype.regExpUnicodeEscapeSequenceAtom = function() {
			this.consumeChar("u");
			return this.parseHexDigits(4);
		};
		RegExpParser.prototype.identityEscapeAtom = function() {
			return {
				type: "Character",
				value: cc(this.popChar())
			};
		};
		RegExpParser.prototype.classPatternCharacterAtom = function() {
			switch (this.peekChar()) {
				// istanbul ignore next
				case "\n":
				// istanbul ignore next
				case "\r":
				// istanbul ignore next
				case "\u2028":
				// istanbul ignore next
				case "\u2029":
				// istanbul ignore next
				case "\\":
				// istanbul ignore next
				case "]": throw Error("TBD");
				default: return {
					type: "Character",
					value: cc(this.popChar())
				};
			}
		};
		RegExpParser.prototype.characterClass = function() {
			var set = [];
			var complement = false;
			this.consumeChar("[");
			if (this.peekChar(0) === "^") {
				this.consumeChar("^");
				complement = true;
			}
			while (this.isClassAtom()) {
				var from = this.classAtom();
				if (from.type === "Character" && this.isRangeDash()) {
					this.consumeChar("-");
					var to = this.classAtom();
					if (to.type === "Character") {
						if (to.value < from.value) throw Error("Range out of order in character class");
						set.push({
							from: from.value,
							to: to.value
						});
					} else {
						insertToSet(from.value, set);
						set.push(cc("-"));
						insertToSet(to.value, set);
					}
				} else insertToSet(from.value, set);
			}
			this.consumeChar("]");
			return {
				type: "Set",
				complement,
				value: set
			};
		};
		RegExpParser.prototype.classAtom = function() {
			switch (this.peekChar()) {
				// istanbul ignore next
				case "]":
				// istanbul ignore next
				case "\n":
				// istanbul ignore next
				case "\r":
				// istanbul ignore next
				case "\u2028":
				// istanbul ignore next
				case "\u2029": throw Error("TBD");
				case "\\": return this.classEscape();
				default: return this.classPatternCharacterAtom();
			}
		};
		RegExpParser.prototype.classEscape = function() {
			this.consumeChar("\\");
			switch (this.peekChar()) {
				case "b":
					this.consumeChar("b");
					return {
						type: "Character",
						value: cc("\b")
					};
				case "d":
				case "D":
				case "s":
				case "S":
				case "w":
				case "W": return this.characterClassEscape();
				case "f":
				case "n":
				case "r":
				case "t":
				case "v": return this.controlEscapeAtom();
				case "c": return this.controlLetterEscapeAtom();
				case "0": return this.nulCharacterAtom();
				case "x": return this.hexEscapeSequenceAtom();
				case "u": return this.regExpUnicodeEscapeSequenceAtom();
				default: return this.identityEscapeAtom();
			}
		};
		RegExpParser.prototype.group = function() {
			var capturing = true;
			this.consumeChar("(");
			switch (this.peekChar(0)) {
				case "?":
					this.consumeChar("?");
					this.consumeChar(":");
					capturing = false;
					break;
				default:
					this.groupIdx++;
					break;
			}
			var value = this.disjunction();
			this.consumeChar(")");
			var groupAst = {
				type: "Group",
				capturing,
				value
			};
			if (capturing) groupAst.idx = this.groupIdx;
			return groupAst;
		};
		RegExpParser.prototype.positiveInteger = function() {
			var number = this.popChar();
			// istanbul ignore next - can't ever get here due to previous lookahead checks
			if (decimalPatternNoZero.test(number) === false) throw Error("Expecting a positive integer");
			while (decimalPattern.test(this.peekChar(0))) number += this.popChar();
			return parseInt(number, 10);
		};
		RegExpParser.prototype.integerIncludingZero = function() {
			var number = this.popChar();
			if (decimalPattern.test(number) === false) throw Error("Expecting an integer");
			while (decimalPattern.test(this.peekChar(0))) number += this.popChar();
			return parseInt(number, 10);
		};
		RegExpParser.prototype.patternCharacter = function() {
			var nextChar = this.popChar();
			switch (nextChar) {
				// istanbul ignore next
				case "\n":
				// istanbul ignore next
				case "\r":
				// istanbul ignore next
				case "\u2028":
				// istanbul ignore next
				case "\u2029":
				// istanbul ignore next
				case "^":
				// istanbul ignore next
				case "$":
				// istanbul ignore next
				case "\\":
				// istanbul ignore next
				case ".":
				// istanbul ignore next
				case "*":
				// istanbul ignore next
				case "+":
				// istanbul ignore next
				case "?":
				// istanbul ignore next
				case "(":
				// istanbul ignore next
				case ")":
				// istanbul ignore next
				case "[":
				// istanbul ignore next
				case "|":
 // istanbul ignore next
				throw Error("TBD");
				default: return {
					type: "Character",
					value: cc(nextChar)
				};
			}
		};
		RegExpParser.prototype.isRegExpFlag = function() {
			switch (this.peekChar(0)) {
				case "g":
				case "i":
				case "m":
				case "u":
				case "y": return true;
				default: return false;
			}
		};
		RegExpParser.prototype.isRangeDash = function() {
			return this.peekChar() === "-" && this.isClassAtom(1);
		};
		RegExpParser.prototype.isDigit = function() {
			return decimalPattern.test(this.peekChar(0));
		};
		RegExpParser.prototype.isClassAtom = function(howMuch) {
			if (howMuch === void 0) howMuch = 0;
			switch (this.peekChar(howMuch)) {
				case "]":
				case "\n":
				case "\r":
				case "\u2028":
				case "\u2029": return false;
				default: return true;
			}
		};
		RegExpParser.prototype.isTerm = function() {
			return this.isAtom() || this.isAssertion();
		};
		RegExpParser.prototype.isAtom = function() {
			if (this.isPatternCharacter()) return true;
			switch (this.peekChar(0)) {
				case ".":
				case "\\":
				case "[":
				case "(": return true;
				default: return false;
			}
		};
		RegExpParser.prototype.isAssertion = function() {
			switch (this.peekChar(0)) {
				case "^":
				case "$": return true;
				case "\\": switch (this.peekChar(1)) {
					case "b":
					case "B": return true;
					default: return false;
				}
				case "(": return this.peekChar(1) === "?" && (this.peekChar(2) === "=" || this.peekChar(2) === "!");
				default: return false;
			}
		};
		RegExpParser.prototype.isQuantifier = function() {
			var prevState = this.saveState();
			try {
				return this.quantifier(true) !== void 0;
			} catch (e) {
				return false;
			} finally {
				this.restoreState(prevState);
			}
		};
		RegExpParser.prototype.isPatternCharacter = function() {
			switch (this.peekChar()) {
				case "^":
				case "$":
				case "\\":
				case ".":
				case "*":
				case "+":
				case "?":
				case "(":
				case ")":
				case "[":
				case "|":
				case "/":
				case "\n":
				case "\r":
				case "\u2028":
				case "\u2029": return false;
				default: return true;
			}
		};
		RegExpParser.prototype.parseHexDigits = function(howMany) {
			var hexString = "";
			for (var i = 0; i < howMany; i++) {
				var hexChar = this.popChar();
				if (hexDigitPattern.test(hexChar) === false) throw Error("Expecting a HexDecimal digits");
				hexString += hexChar;
			}
			return {
				type: "Character",
				value: parseInt(hexString, 16)
			};
		};
		RegExpParser.prototype.peekChar = function(howMuch) {
			if (howMuch === void 0) howMuch = 0;
			return this.input[this.idx + howMuch];
		};
		RegExpParser.prototype.popChar = function() {
			var nextChar = this.peekChar(0);
			this.consumeChar();
			return nextChar;
		};
		RegExpParser.prototype.consumeChar = function(char) {
			if (char !== void 0 && this.input[this.idx] !== char) throw Error("Expected: '" + char + "' but found: '" + this.input[this.idx] + "' at offset: " + this.idx);
			if (this.idx >= this.input.length) throw Error("Unexpected end of input");
			this.idx++;
		};
		var hexDigitPattern = /[0-9a-fA-F]/;
		var decimalPattern = /[0-9]/;
		var decimalPatternNoZero = /[1-9]/;
		function cc(char) {
			return char.charCodeAt(0);
		}
		function insertToSet(item, set) {
			if (item.length !== void 0) item.forEach(function(subItem) {
				set.push(subItem);
			});
			else set.push(item);
		}
		function addFlag(flagObj, flagKey) {
			if (flagObj[flagKey] === true) throw "duplicate flag " + flagKey;
			flagObj[flagKey] = true;
		}
		function ASSERT_EXISTS(obj) {
			// istanbul ignore next
			if (obj === void 0) throw Error("Internal Error - Should never get here!");
		}
		// istanbul ignore next
		function ASSERT_NEVER_REACH_HERE() {
			throw Error("Internal Error - Should never get here!");
		}
		var i;
		var digitsCharCodes = [];
		for (i = cc("0"); i <= cc("9"); i++) digitsCharCodes.push(i);
		var wordCharCodes = [cc("_")].concat(digitsCharCodes);
		for (i = cc("a"); i <= cc("z"); i++) wordCharCodes.push(i);
		for (i = cc("A"); i <= cc("Z"); i++) wordCharCodes.push(i);
		var whitespaceCodes = [
			cc(" "),
			cc("\f"),
			cc("\n"),
			cc("\r"),
			cc("	"),
			cc("\v"),
			cc("	"),
			cc("\xA0"),
			cc(" "),
			cc(" "),
			cc(" "),
			cc(" "),
			cc(" "),
			cc(" "),
			cc(" "),
			cc(" "),
			cc(" "),
			cc(" "),
			cc(" "),
			cc(" "),
			cc("\u2028"),
			cc("\u2029"),
			cc(" "),
			cc(" "),
			cc("　"),
			cc("﻿")
		];
		function BaseRegExpVisitor() {}
		BaseRegExpVisitor.prototype.visitChildren = function(node) {
			for (var key in node) {
				var child = node[key];
				/* istanbul ignore else */
				if (node.hasOwnProperty(key)) {
					if (child.type !== void 0) this.visit(child);
					else if (Array.isArray(child)) child.forEach(function(subChild) {
						this.visit(subChild);
					}, this);
				}
			}
		};
		BaseRegExpVisitor.prototype.visit = function(node) {
			switch (node.type) {
				case "Pattern":
					this.visitPattern(node);
					break;
				case "Flags":
					this.visitFlags(node);
					break;
				case "Disjunction":
					this.visitDisjunction(node);
					break;
				case "Alternative":
					this.visitAlternative(node);
					break;
				case "StartAnchor":
					this.visitStartAnchor(node);
					break;
				case "EndAnchor":
					this.visitEndAnchor(node);
					break;
				case "WordBoundary":
					this.visitWordBoundary(node);
					break;
				case "NonWordBoundary":
					this.visitNonWordBoundary(node);
					break;
				case "Lookahead":
					this.visitLookahead(node);
					break;
				case "NegativeLookahead":
					this.visitNegativeLookahead(node);
					break;
				case "Character":
					this.visitCharacter(node);
					break;
				case "Set":
					this.visitSet(node);
					break;
				case "Group":
					this.visitGroup(node);
					break;
				case "GroupBackReference":
					this.visitGroupBackReference(node);
					break;
				case "Quantifier":
					this.visitQuantifier(node);
					break;
			}
			this.visitChildren(node);
		};
		BaseRegExpVisitor.prototype.visitPattern = function(node) {};
		BaseRegExpVisitor.prototype.visitFlags = function(node) {};
		BaseRegExpVisitor.prototype.visitDisjunction = function(node) {};
		BaseRegExpVisitor.prototype.visitAlternative = function(node) {};
		BaseRegExpVisitor.prototype.visitStartAnchor = function(node) {};
		BaseRegExpVisitor.prototype.visitEndAnchor = function(node) {};
		BaseRegExpVisitor.prototype.visitWordBoundary = function(node) {};
		BaseRegExpVisitor.prototype.visitNonWordBoundary = function(node) {};
		BaseRegExpVisitor.prototype.visitLookahead = function(node) {};
		BaseRegExpVisitor.prototype.visitNegativeLookahead = function(node) {};
		BaseRegExpVisitor.prototype.visitCharacter = function(node) {};
		BaseRegExpVisitor.prototype.visitSet = function(node) {};
		BaseRegExpVisitor.prototype.visitGroup = function(node) {};
		BaseRegExpVisitor.prototype.visitGroupBackReference = function(node) {};
		BaseRegExpVisitor.prototype.visitQuantifier = function(node) {};
		return {
			RegExpParser,
			BaseRegExpVisitor,
			VERSION: "0.4.0"
		};
	});
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/scan/reg_exp_parser.js
function getRegExpAst(regExp) {
	var regExpStr = regExp.toString();
	if (regExpAstCache.hasOwnProperty(regExpStr)) return regExpAstCache[regExpStr];
	else {
		var regExpAst = regExpParser.pattern(regExpStr);
		regExpAstCache[regExpStr] = regExpAst;
		return regExpAst;
	}
}
function clearRegExpParserCache() {
	regExpAstCache = {};
}
var import_regexp_to_ast$2, regExpAstCache, regExpParser;
var init_reg_exp_parser = __esmMin((() => {
	import_regexp_to_ast$2 = require_regexp_to_ast();
	regExpAstCache = {};
	regExpParser = new import_regexp_to_ast$2.RegExpParser();
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/scan/reg_exp.js
function getOptimizedStartCodesIndices(regExp, ensureOptimizations) {
	if (ensureOptimizations === void 0) ensureOptimizations = false;
	try {
		var ast = getRegExpAst(regExp);
		return firstCharOptimizedIndices(ast.value, {}, ast.flags.ignoreCase);
	} catch (e) {
		/* istanbul ignore next */
		if (e.message === complementErrorMessage) {
			if (ensureOptimizations) PRINT_WARNING("" + failedOptimizationPrefixMsg + ("	Unable to optimize: < " + regExp.toString() + " >\n") + "	Complement Sets cannot be automatically optimized.\n	This will disable the lexer's first char optimizations.\n	See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.");
		} else {
			var msgSuffix = "";
			if (ensureOptimizations) msgSuffix = "\n	This will disable the lexer's first char optimizations.\n	See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.";
			PRINT_ERROR(failedOptimizationPrefixMsg + "\n" + ("	Failed parsing: < " + regExp.toString() + " >\n") + ("	Using the regexp-to-ast library version: " + import_regexp_to_ast$1.VERSION + "\n") + "	Please open an issue at: https://github.com/bd82/regexp-to-ast/issues" + msgSuffix);
		}
	}
	return [];
}
function firstCharOptimizedIndices(ast, result, ignoreCase) {
	switch (ast.type) {
		case "Disjunction":
			for (var i = 0; i < ast.value.length; i++) firstCharOptimizedIndices(ast.value[i], result, ignoreCase);
			break;
		case "Alternative":
			var terms = ast.value;
			for (var i = 0; i < terms.length; i++) {
				var term = terms[i];
				switch (term.type) {
					case "EndAnchor":
					case "GroupBackReference":
					case "Lookahead":
					case "NegativeLookahead":
					case "StartAnchor":
					case "WordBoundary":
					case "NonWordBoundary": continue;
				}
				var atom = term;
				switch (atom.type) {
					case "Character":
						addOptimizedIdxToResult(atom.value, result, ignoreCase);
						break;
					case "Set":
						if (atom.complement === true) throw Error(complementErrorMessage);
						forEach(atom.value, function(code) {
							if (typeof code === "number") addOptimizedIdxToResult(code, result, ignoreCase);
							else {
								var range = code;
								if (ignoreCase === true) for (var rangeCode = range.from; rangeCode <= range.to; rangeCode++) addOptimizedIdxToResult(rangeCode, result, ignoreCase);
								else {
									for (var rangeCode = range.from; rangeCode <= range.to && rangeCode < 256; rangeCode++) addOptimizedIdxToResult(rangeCode, result, ignoreCase);
									if (range.to >= 256) {
										var minUnOptVal = range.from >= 256 ? range.from : 256;
										var maxUnOptVal = range.to;
										var minOptIdx = charCodeToOptimizedIndex(minUnOptVal);
										var maxOptIdx = charCodeToOptimizedIndex(maxUnOptVal);
										for (var currOptIdx = minOptIdx; currOptIdx <= maxOptIdx; currOptIdx++) result[currOptIdx] = currOptIdx;
									}
								}
							}
						});
						break;
					case "Group":
						firstCharOptimizedIndices(atom.value, result, ignoreCase);
						break;
					/* istanbul ignore next */
					default: throw Error("Non Exhaustive Match");
				}
				var isOptionalQuantifier = atom.quantifier !== void 0 && atom.quantifier.atLeast === 0;
				if (atom.type === "Group" && isWholeOptional(atom) === false || atom.type !== "Group" && isOptionalQuantifier === false) break;
			}
			break;
		/* istanbul ignore next */
		default: throw Error("non exhaustive match!");
	}
	return values(result);
}
function addOptimizedIdxToResult(code, result, ignoreCase) {
	var optimizedCharIdx = charCodeToOptimizedIndex(code);
	result[optimizedCharIdx] = optimizedCharIdx;
	if (ignoreCase === true) handleIgnoreCase(code, result);
}
function handleIgnoreCase(code, result) {
	var char = String.fromCharCode(code);
	var upperChar = char.toUpperCase();
	/* istanbul ignore else */
	if (upperChar !== char) {
		var optimizedCharIdx = charCodeToOptimizedIndex(upperChar.charCodeAt(0));
		result[optimizedCharIdx] = optimizedCharIdx;
	} else {
		var lowerChar = char.toLowerCase();
		if (lowerChar !== char) {
			var optimizedCharIdx = charCodeToOptimizedIndex(lowerChar.charCodeAt(0));
			result[optimizedCharIdx] = optimizedCharIdx;
		}
	}
}
function findCode(setNode, targetCharCodes) {
	return find$1(setNode.value, function(codeOrRange) {
		if (typeof codeOrRange === "number") return contains(targetCharCodes, codeOrRange);
		else {
			var range_1 = codeOrRange;
			return find$1(targetCharCodes, function(targetCode) {
				return range_1.from <= targetCode && targetCode <= range_1.to;
			}) !== void 0;
		}
	});
}
function isWholeOptional(ast) {
	if (ast.quantifier && ast.quantifier.atLeast === 0) return true;
	if (!ast.value) return false;
	return isArray$1(ast.value) ? every(ast.value, isWholeOptional) : isWholeOptional(ast.value);
}
function canMatchCharCode(charCodes, pattern) {
	if (pattern instanceof RegExp) {
		var ast = getRegExpAst(pattern);
		var charCodeFinder = new CharCodeFinder(charCodes);
		charCodeFinder.visit(ast);
		return charCodeFinder.found;
	} else return find$1(pattern, function(char) {
		return contains(charCodes, char.charCodeAt(0));
	}) !== void 0;
}
var import_regexp_to_ast$1, __extends$10, complementErrorMessage, failedOptimizationPrefixMsg, CharCodeFinder;
var init_reg_exp = __esmMin((() => {
	import_regexp_to_ast$1 = require_regexp_to_ast();
	init_utils();
	init_reg_exp_parser();
	init_lexer();
	__extends$10 = (function() {
		var extendStatics = function(d, b) {
			extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
				d.__proto__ = b;
			} || function(d, b) {
				for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
			};
			return extendStatics(d, b);
		};
		return function(d, b) {
			extendStatics(d, b);
			function __() {
				this.constructor = d;
			}
			d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
		};
	})();
	complementErrorMessage = "Complement Sets are not supported for first char optimization";
	failedOptimizationPrefixMsg = "Unable to use \"first char\" lexer optimizations:\n";
	CharCodeFinder = function(_super) {
		__extends$10(CharCodeFinder, _super);
		function CharCodeFinder(targetCharCodes) {
			var _this = _super.call(this) || this;
			_this.targetCharCodes = targetCharCodes;
			_this.found = false;
			return _this;
		}
		CharCodeFinder.prototype.visitChildren = function(node) {
			if (this.found === true) return;
			switch (node.type) {
				case "Lookahead":
					this.visitLookahead(node);
					return;
				case "NegativeLookahead":
					this.visitNegativeLookahead(node);
					return;
			}
			_super.prototype.visitChildren.call(this, node);
		};
		CharCodeFinder.prototype.visitCharacter = function(node) {
			if (contains(this.targetCharCodes, node.value)) this.found = true;
		};
		CharCodeFinder.prototype.visitSet = function(node) {
			if (node.complement) {
				if (findCode(node, this.targetCharCodes) === void 0) this.found = true;
			} else if (findCode(node, this.targetCharCodes) !== void 0) this.found = true;
		};
		return CharCodeFinder;
	}(import_regexp_to_ast$1.BaseRegExpVisitor);
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/scan/lexer.js
function analyzeTokenTypes(tokenTypes, options) {
	options = defaults$1(options, {
		useSticky: SUPPORT_STICKY,
		debug: false,
		safeMode: false,
		positionTracking: "full",
		lineTerminatorCharacters: ["\r", "\n"],
		tracer: function(msg, action) {
			return action();
		}
	});
	var tracer = options.tracer;
	tracer("initCharCodeToOptimizedIndexMap", function() {
		initCharCodeToOptimizedIndexMap();
	});
	var onlyRelevantTypes;
	tracer("Reject Lexer.NA", function() {
		onlyRelevantTypes = reject(tokenTypes, function(currType) {
			return currType[PATTERN] === Lexer.NA;
		});
	});
	var hasCustom = false;
	var allTransformedPatterns;
	tracer("Transform Patterns", function() {
		hasCustom = false;
		allTransformedPatterns = map$3(onlyRelevantTypes, function(currType) {
			var currPattern = currType[PATTERN];
			/* istanbul ignore else */
			if (isRegExp(currPattern)) {
				var regExpSource = currPattern.source;
				if (regExpSource.length === 1 && regExpSource !== "^" && regExpSource !== "$" && regExpSource !== ".") return regExpSource;
				else if (regExpSource.length === 2 && regExpSource[0] === "\\" && !contains([
					"d",
					"D",
					"s",
					"S",
					"t",
					"r",
					"n",
					"t",
					"0",
					"c",
					"b",
					"B",
					"f",
					"v",
					"w",
					"W"
				], regExpSource[1])) return regExpSource[1];
				else return options.useSticky ? addStickyFlag(currPattern) : addStartOfInput(currPattern);
			} else if (isFunction$1(currPattern)) {
				hasCustom = true;
				return { exec: currPattern };
			} else if (has(currPattern, "exec")) {
				hasCustom = true;
				return currPattern;
			} else if (typeof currPattern === "string") if (currPattern.length === 1) return currPattern;
			else {
				var escapedRegExpString = currPattern.replace(/[\\^$.*+?()[\]{}|]/g, "\\$&");
				var wrappedRegExp = new RegExp(escapedRegExpString);
				return options.useSticky ? addStickyFlag(wrappedRegExp) : addStartOfInput(wrappedRegExp);
			}
			else throw Error("non exhaustive match");
		});
	});
	var patternIdxToType;
	var patternIdxToGroup;
	var patternIdxToLongerAltIdx;
	var patternIdxToPushMode;
	var patternIdxToPopMode;
	tracer("misc mapping", function() {
		patternIdxToType = map$3(onlyRelevantTypes, function(currType) {
			return currType.tokenTypeIdx;
		});
		patternIdxToGroup = map$3(onlyRelevantTypes, function(clazz) {
			var groupName = clazz.GROUP;
			/* istanbul ignore next */
			if (groupName === Lexer.SKIPPED) return;
			else if (isString$1(groupName)) return groupName;
			else if (isUndefined$1(groupName)) return false;
			else throw Error("non exhaustive match");
		});
		patternIdxToLongerAltIdx = map$3(onlyRelevantTypes, function(clazz) {
			var longerAltType = clazz.LONGER_ALT;
			if (longerAltType) return indexOf$1(onlyRelevantTypes, longerAltType);
		});
		patternIdxToPushMode = map$3(onlyRelevantTypes, function(clazz) {
			return clazz.PUSH_MODE;
		});
		patternIdxToPopMode = map$3(onlyRelevantTypes, function(clazz) {
			return has(clazz, "POP_MODE");
		});
	});
	var patternIdxToCanLineTerminator;
	tracer("Line Terminator Handling", function() {
		var lineTerminatorCharCodes = getCharCodes(options.lineTerminatorCharacters);
		patternIdxToCanLineTerminator = map$3(onlyRelevantTypes, function(tokType) {
			return false;
		});
		if (options.positionTracking !== "onlyOffset") patternIdxToCanLineTerminator = map$3(onlyRelevantTypes, function(tokType) {
			if (has(tokType, "LINE_BREAKS")) return tokType.LINE_BREAKS;
			else if (checkLineBreaksIssues(tokType, lineTerminatorCharCodes) === false) return canMatchCharCode(lineTerminatorCharCodes, tokType.PATTERN);
		});
	});
	var patternIdxToIsCustom;
	var patternIdxToShort;
	var emptyGroups;
	var patternIdxToConfig;
	tracer("Misc Mapping #2", function() {
		patternIdxToIsCustom = map$3(onlyRelevantTypes, isCustomPattern);
		patternIdxToShort = map$3(allTransformedPatterns, isShortPattern);
		emptyGroups = reduce(onlyRelevantTypes, function(acc, clazz) {
			var groupName = clazz.GROUP;
			if (isString$1(groupName) && !(groupName === Lexer.SKIPPED)) acc[groupName] = [];
			return acc;
		}, {});
		patternIdxToConfig = map$3(allTransformedPatterns, function(x, idx) {
			return {
				pattern: allTransformedPatterns[idx],
				longerAlt: patternIdxToLongerAltIdx[idx],
				canLineTerminator: patternIdxToCanLineTerminator[idx],
				isCustom: patternIdxToIsCustom[idx],
				short: patternIdxToShort[idx],
				group: patternIdxToGroup[idx],
				push: patternIdxToPushMode[idx],
				pop: patternIdxToPopMode[idx],
				tokenTypeIdx: patternIdxToType[idx],
				tokenType: onlyRelevantTypes[idx]
			};
		});
	});
	var canBeOptimized = true;
	var charCodeToPatternIdxToConfig = [];
	if (!options.safeMode) tracer("First Char Optimization", function() {
		charCodeToPatternIdxToConfig = reduce(onlyRelevantTypes, function(result, currTokType, idx) {
			if (typeof currTokType.PATTERN === "string") addToMapOfArrays(result, charCodeToOptimizedIndex(currTokType.PATTERN.charCodeAt(0)), patternIdxToConfig[idx]);
			else if (isArray$1(currTokType.START_CHARS_HINT)) {
				var lastOptimizedIdx_1;
				forEach(currTokType.START_CHARS_HINT, function(charOrInt) {
					var currOptimizedIdx = charCodeToOptimizedIndex(typeof charOrInt === "string" ? charOrInt.charCodeAt(0) : charOrInt);
					if (lastOptimizedIdx_1 !== currOptimizedIdx) {
						lastOptimizedIdx_1 = currOptimizedIdx;
						addToMapOfArrays(result, currOptimizedIdx, patternIdxToConfig[idx]);
					}
				});
			} else if (isRegExp(currTokType.PATTERN)) if (currTokType.PATTERN.unicode) {
				canBeOptimized = false;
				if (options.ensureOptimizations) PRINT_ERROR("" + failedOptimizationPrefixMsg + ("	Unable to analyze < " + currTokType.PATTERN.toString() + " > pattern.\n") + "	The regexp unicode flag is not currently supported by the regexp-to-ast library.\n	This will disable the lexer's first char optimizations.\n	For details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE");
			} else {
				var optimizedCodes = getOptimizedStartCodesIndices(currTokType.PATTERN, options.ensureOptimizations);
				/* istanbul ignore if */
				if (isEmpty(optimizedCodes)) canBeOptimized = false;
				forEach(optimizedCodes, function(code) {
					addToMapOfArrays(result, code, patternIdxToConfig[idx]);
				});
			}
			else {
				if (options.ensureOptimizations) PRINT_ERROR("" + failedOptimizationPrefixMsg + ("	TokenType: <" + currTokType.name + "> is using a custom token pattern without providing <start_chars_hint> parameter.\n") + "	This will disable the lexer's first char optimizations.\n	For details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE");
				canBeOptimized = false;
			}
			return result;
		}, []);
	});
	tracer("ArrayPacking", function() {
		charCodeToPatternIdxToConfig = packArray(charCodeToPatternIdxToConfig);
	});
	return {
		emptyGroups,
		patternIdxToConfig,
		charCodeToPatternIdxToConfig,
		hasCustom,
		canBeOptimized
	};
}
function validatePatterns(tokenTypes, validModesNames) {
	var errors = [];
	var missingResult = findMissingPatterns(tokenTypes);
	errors = errors.concat(missingResult.errors);
	var invalidResult = findInvalidPatterns(missingResult.valid);
	var validTokenTypes = invalidResult.valid;
	errors = errors.concat(invalidResult.errors);
	errors = errors.concat(validateRegExpPattern(validTokenTypes));
	errors = errors.concat(findInvalidGroupType(validTokenTypes));
	errors = errors.concat(findModesThatDoNotExist(validTokenTypes, validModesNames));
	errors = errors.concat(findUnreachablePatterns(validTokenTypes));
	return errors;
}
function validateRegExpPattern(tokenTypes) {
	var errors = [];
	var withRegExpPatterns = filter(tokenTypes, function(currTokType) {
		return isRegExp(currTokType[PATTERN]);
	});
	errors = errors.concat(findEndOfInputAnchor(withRegExpPatterns));
	errors = errors.concat(findStartOfInputAnchor(withRegExpPatterns));
	errors = errors.concat(findUnsupportedFlags(withRegExpPatterns));
	errors = errors.concat(findDuplicatePatterns(withRegExpPatterns));
	errors = errors.concat(findEmptyMatchRegExps(withRegExpPatterns));
	return errors;
}
function findMissingPatterns(tokenTypes) {
	var tokenTypesWithMissingPattern = filter(tokenTypes, function(currType) {
		return !has(currType, PATTERN);
	});
	return {
		errors: map$3(tokenTypesWithMissingPattern, function(currType) {
			return {
				message: "Token Type: ->" + currType.name + "<- missing static 'PATTERN' property",
				type: LexerDefinitionErrorType.MISSING_PATTERN,
				tokenTypes: [currType]
			};
		}),
		valid: difference(tokenTypes, tokenTypesWithMissingPattern)
	};
}
function findInvalidPatterns(tokenTypes) {
	var tokenTypesWithInvalidPattern = filter(tokenTypes, function(currType) {
		var pattern = currType[PATTERN];
		return !isRegExp(pattern) && !isFunction$1(pattern) && !has(pattern, "exec") && !isString$1(pattern);
	});
	return {
		errors: map$3(tokenTypesWithInvalidPattern, function(currType) {
			return {
				message: "Token Type: ->" + currType.name + "<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",
				type: LexerDefinitionErrorType.INVALID_PATTERN,
				tokenTypes: [currType]
			};
		}),
		valid: difference(tokenTypes, tokenTypesWithInvalidPattern)
	};
}
function findEndOfInputAnchor(tokenTypes) {
	var EndAnchorFinder = function(_super) {
		__extends$9(EndAnchorFinder, _super);
		function EndAnchorFinder() {
			var _this = _super !== null && _super.apply(this, arguments) || this;
			_this.found = false;
			return _this;
		}
		EndAnchorFinder.prototype.visitEndAnchor = function(node) {
			this.found = true;
		};
		return EndAnchorFinder;
	}(import_regexp_to_ast.BaseRegExpVisitor);
	return map$3(filter(tokenTypes, function(currType) {
		var pattern = currType[PATTERN];
		try {
			var regexpAst = getRegExpAst(pattern);
			var endAnchorVisitor = new EndAnchorFinder();
			endAnchorVisitor.visit(regexpAst);
			return endAnchorVisitor.found;
		} catch (e) {
			/* istanbul ignore next - cannot ensure an error in regexp-to-ast*/
			return end_of_input.test(pattern.source);
		}
	}), function(currType) {
		return {
			message: "Unexpected RegExp Anchor Error:\n	Token Type: ->" + currType.name + "<- static 'PATTERN' cannot contain end of input anchor '$'\n	See sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS	for details.",
			type: LexerDefinitionErrorType.EOI_ANCHOR_FOUND,
			tokenTypes: [currType]
		};
	});
}
function findEmptyMatchRegExps(tokenTypes) {
	return map$3(filter(tokenTypes, function(currType) {
		return currType[PATTERN].test("");
	}), function(currType) {
		return {
			message: "Token Type: ->" + currType.name + "<- static 'PATTERN' must not match an empty string",
			type: LexerDefinitionErrorType.EMPTY_MATCH_PATTERN,
			tokenTypes: [currType]
		};
	});
}
function findStartOfInputAnchor(tokenTypes) {
	var StartAnchorFinder = function(_super) {
		__extends$9(StartAnchorFinder, _super);
		function StartAnchorFinder() {
			var _this = _super !== null && _super.apply(this, arguments) || this;
			_this.found = false;
			return _this;
		}
		StartAnchorFinder.prototype.visitStartAnchor = function(node) {
			this.found = true;
		};
		return StartAnchorFinder;
	}(import_regexp_to_ast.BaseRegExpVisitor);
	return map$3(filter(tokenTypes, function(currType) {
		var pattern = currType[PATTERN];
		try {
			var regexpAst = getRegExpAst(pattern);
			var startAnchorVisitor = new StartAnchorFinder();
			startAnchorVisitor.visit(regexpAst);
			return startAnchorVisitor.found;
		} catch (e) {
			/* istanbul ignore next - cannot ensure an error in regexp-to-ast*/
			return start_of_input.test(pattern.source);
		}
	}), function(currType) {
		return {
			message: "Unexpected RegExp Anchor Error:\n	Token Type: ->" + currType.name + "<- static 'PATTERN' cannot contain start of input anchor '^'\n	See https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS	for details.",
			type: LexerDefinitionErrorType.SOI_ANCHOR_FOUND,
			tokenTypes: [currType]
		};
	});
}
function findUnsupportedFlags(tokenTypes) {
	return map$3(filter(tokenTypes, function(currType) {
		var pattern = currType[PATTERN];
		return pattern instanceof RegExp && (pattern.multiline || pattern.global);
	}), function(currType) {
		return {
			message: "Token Type: ->" + currType.name + "<- static 'PATTERN' may NOT contain global('g') or multiline('m')",
			type: LexerDefinitionErrorType.UNSUPPORTED_FLAGS_FOUND,
			tokenTypes: [currType]
		};
	});
}
function findDuplicatePatterns(tokenTypes) {
	var found = [];
	var identicalPatterns = map$3(tokenTypes, function(outerType) {
		return reduce(tokenTypes, function(result, innerType) {
			if (outerType.PATTERN.source === innerType.PATTERN.source && !contains(found, innerType) && innerType.PATTERN !== Lexer.NA) {
				found.push(innerType);
				result.push(innerType);
				return result;
			}
			return result;
		}, []);
	});
	identicalPatterns = compact(identicalPatterns);
	return map$3(filter(identicalPatterns, function(currIdenticalSet) {
		return currIdenticalSet.length > 1;
	}), function(setOfIdentical) {
		var tokenTypeNames = map$3(setOfIdentical, function(currType) {
			return currType.name;
		});
		return {
			message: "The same RegExp pattern ->" + first$1(setOfIdentical).PATTERN + "<-" + ("has been used in all of the following Token Types: " + tokenTypeNames.join(", ") + " <-"),
			type: LexerDefinitionErrorType.DUPLICATE_PATTERNS_FOUND,
			tokenTypes: setOfIdentical
		};
	});
}
function findInvalidGroupType(tokenTypes) {
	return map$3(filter(tokenTypes, function(clazz) {
		if (!has(clazz, "GROUP")) return false;
		var group = clazz.GROUP;
		return group !== Lexer.SKIPPED && group !== Lexer.NA && !isString$1(group);
	}), function(currType) {
		return {
			message: "Token Type: ->" + currType.name + "<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",
			type: LexerDefinitionErrorType.INVALID_GROUP_TYPE_FOUND,
			tokenTypes: [currType]
		};
	});
}
function findModesThatDoNotExist(tokenTypes, validModes) {
	return map$3(filter(tokenTypes, function(clazz) {
		return clazz.PUSH_MODE !== void 0 && !contains(validModes, clazz.PUSH_MODE);
	}), function(tokType) {
		return {
			message: "Token Type: ->" + tokType.name + "<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->" + tokType.PUSH_MODE + "<-which does not exist",
			type: LexerDefinitionErrorType.PUSH_MODE_DOES_NOT_EXIST,
			tokenTypes: [tokType]
		};
	});
}
function findUnreachablePatterns(tokenTypes) {
	var errors = [];
	var canBeTested = reduce(tokenTypes, function(result, tokType, idx) {
		var pattern = tokType.PATTERN;
		if (pattern === Lexer.NA) return result;
		if (isString$1(pattern)) result.push({
			str: pattern,
			idx,
			tokenType: tokType
		});
		else if (isRegExp(pattern) && noMetaChar(pattern)) result.push({
			str: pattern.source,
			idx,
			tokenType: tokType
		});
		return result;
	}, []);
	forEach(tokenTypes, function(tokType, testIdx) {
		forEach(canBeTested, function(_a) {
			var str = _a.str, idx = _a.idx, tokenType = _a.tokenType;
			if (testIdx < idx && testTokenType(str, tokType.PATTERN)) {
				var msg = "Token: ->" + tokenType.name + "<- can never be matched.\n" + ("Because it appears AFTER the Token Type ->" + tokType.name + "<-") + "in the lexer's definition.\nSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNREACHABLE";
				errors.push({
					message: msg,
					type: LexerDefinitionErrorType.UNREACHABLE_PATTERN,
					tokenTypes: [tokType, tokenType]
				});
			}
		});
	});
	return errors;
}
function testTokenType(str, pattern) {
	/* istanbul ignore else */
	if (isRegExp(pattern)) {
		var regExpArray = pattern.exec(str);
		return regExpArray !== null && regExpArray.index === 0;
	} else if (isFunction$1(pattern)) return pattern(str, 0, [], {});
	else if (has(pattern, "exec")) return pattern.exec(str, 0, [], {});
	else if (typeof pattern === "string") return pattern === str;
	else throw Error("non exhaustive match");
}
function noMetaChar(regExp) {
	return find$1([
		".",
		"\\",
		"[",
		"]",
		"|",
		"^",
		"$",
		"(",
		")",
		"?",
		"*",
		"+",
		"{"
	], function(char) {
		return regExp.source.indexOf(char) !== -1;
	}) === void 0;
}
function addStartOfInput(pattern) {
	var flags = pattern.ignoreCase ? "i" : "";
	return new RegExp("^(?:" + pattern.source + ")", flags);
}
function addStickyFlag(pattern) {
	var flags = pattern.ignoreCase ? "iy" : "y";
	return new RegExp("" + pattern.source, flags);
}
function performRuntimeChecks(lexerDefinition, trackLines, lineTerminatorCharacters) {
	var errors = [];
	if (!has(lexerDefinition, "defaultMode")) errors.push({
		message: "A MultiMode Lexer cannot be initialized without a <" + DEFAULT_MODE + "> property in its definition\n",
		type: LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE
	});
	if (!has(lexerDefinition, "modes")) errors.push({
		message: "A MultiMode Lexer cannot be initialized without a <" + MODES + "> property in its definition\n",
		type: LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY
	});
	if (has(lexerDefinition, "modes") && has(lexerDefinition, "defaultMode") && !has(lexerDefinition.modes, lexerDefinition.defaultMode)) errors.push({
		message: "A MultiMode Lexer cannot be initialized with a " + DEFAULT_MODE + ": <" + lexerDefinition.defaultMode + ">which does not exist\n",
		type: LexerDefinitionErrorType.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST
	});
	if (has(lexerDefinition, "modes")) forEach(lexerDefinition.modes, function(currModeValue, currModeName) {
		forEach(currModeValue, function(currTokType, currIdx) {
			if (isUndefined$1(currTokType)) errors.push({
				message: "A Lexer cannot be initialized using an undefined Token Type. Mode:" + ("<" + currModeName + "> at index: <" + currIdx + ">\n"),
				type: LexerDefinitionErrorType.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED
			});
		});
	});
	return errors;
}
function performWarningRuntimeChecks(lexerDefinition, trackLines, lineTerminatorCharacters) {
	var warnings = [];
	var hasAnyLineBreak = false;
	var concreteTokenTypes = reject(compact(flatten(mapValues(lexerDefinition.modes, function(tokTypes) {
		return tokTypes;
	}))), function(currType) {
		return currType[PATTERN] === Lexer.NA;
	});
	var terminatorCharCodes = getCharCodes(lineTerminatorCharacters);
	if (trackLines) forEach(concreteTokenTypes, function(tokType) {
		var currIssue = checkLineBreaksIssues(tokType, terminatorCharCodes);
		if (currIssue !== false) {
			var warningDescriptor = {
				message: buildLineBreakIssueMessage(tokType, currIssue),
				type: currIssue.issue,
				tokenType: tokType
			};
			warnings.push(warningDescriptor);
		} else if (has(tokType, "LINE_BREAKS")) {
			if (tokType.LINE_BREAKS === true) hasAnyLineBreak = true;
		} else if (canMatchCharCode(terminatorCharCodes, tokType.PATTERN)) hasAnyLineBreak = true;
	});
	if (trackLines && !hasAnyLineBreak) warnings.push({
		message: "Warning: No LINE_BREAKS Found.\n	This Lexer has been defined to track line and column information,\n	But none of the Token Types can be identified as matching a line terminator.\n	See https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n	for details.",
		type: LexerDefinitionErrorType.NO_LINE_BREAKS_FLAGS
	});
	return warnings;
}
function cloneEmptyGroups(emptyGroups) {
	var clonedResult = {};
	forEach(keys$2(emptyGroups), function(currKey) {
		var currGroupValue = emptyGroups[currKey];
		/* istanbul ignore else */
		if (isArray$1(currGroupValue)) clonedResult[currKey] = [];
		else throw Error("non exhaustive match");
	});
	return clonedResult;
}
function isCustomPattern(tokenType) {
	var pattern = tokenType.PATTERN;
	/* istanbul ignore else */
	if (isRegExp(pattern)) return false;
	else if (isFunction$1(pattern)) return true;
	else if (has(pattern, "exec")) return true;
	else if (isString$1(pattern)) return false;
	else throw Error("non exhaustive match");
}
function isShortPattern(pattern) {
	if (isString$1(pattern) && pattern.length === 1) return pattern.charCodeAt(0);
	else return false;
}
function checkLineBreaksIssues(tokType, lineTerminatorCharCodes) {
	if (has(tokType, "LINE_BREAKS")) return false;
	else if (isRegExp(tokType.PATTERN)) {
		try {
			canMatchCharCode(lineTerminatorCharCodes, tokType.PATTERN);
		} catch (e) {
			/* istanbul ignore next - to test this we would have to mock <canMatchCharCode> to throw an error */
			return {
				issue: LexerDefinitionErrorType.IDENTIFY_TERMINATOR,
				errMsg: e.message
			};
		}
		return false;
	} else if (isString$1(tokType.PATTERN)) return false;
	else if (isCustomPattern(tokType)) return { issue: LexerDefinitionErrorType.CUSTOM_LINE_BREAK };
	else throw Error("non exhaustive match");
}
function buildLineBreakIssueMessage(tokType, details) {
	/* istanbul ignore else */
	if (details.issue === LexerDefinitionErrorType.IDENTIFY_TERMINATOR) return "Warning: unable to identify line terminator usage in pattern.\n" + ("	The problem is in the <" + tokType.name + "> Token Type\n") + ("	 Root cause: " + details.errMsg + ".\n") + "	For details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";
	else if (details.issue === LexerDefinitionErrorType.CUSTOM_LINE_BREAK) return "Warning: A Custom Token Pattern should specify the <line_breaks> option.\n" + ("	The problem is in the <" + tokType.name + "> Token Type\n") + "	For details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";
	else throw Error("non exhaustive match");
}
function getCharCodes(charsOrCodes) {
	return map$3(charsOrCodes, function(numOrString) {
		if (isString$1(numOrString) && numOrString.length > 0) return numOrString.charCodeAt(0);
		else return numOrString;
	});
}
function addToMapOfArrays(map, key, value) {
	if (map[key] === void 0) map[key] = [value];
	else map[key].push(value);
}
/**
* We ae mapping charCode above ASCI (256) into buckets each in the size of 256.
* This is because ASCI are the most common start chars so each one of those will get its own
* possible token configs vector.
*
* Tokens starting with charCodes "above" ASCI are uncommon, so we can "afford"
* to place these into buckets of possible token configs, What we gain from
* this is avoiding the case of creating an optimization 'charCodeToPatternIdxToConfig'
* which would contain 10,000+ arrays of small size (e.g unicode Identifiers scenario).
* Our 'charCodeToPatternIdxToConfig' max size will now be:
* 256 + (2^16 / 2^8) - 1 === 511
*
* note the hack for fast division integer part extraction
* See: https://stackoverflow.com/a/4228528
*/
function charCodeToOptimizedIndex(charCode) {
	return charCode < 256 ? charCode : charCodeToOptimizedIdxMap[charCode];
}
function initCharCodeToOptimizedIndexMap() {
	if (isEmpty(charCodeToOptimizedIdxMap)) {
		charCodeToOptimizedIdxMap = new Array(65536);
		for (var i = 0; i < 65536; i++) charCodeToOptimizedIdxMap[i] = i > 255 ? 255 + ~~(i / 255) : i;
	}
}
var import_regexp_to_ast, __extends$9, PATTERN, DEFAULT_MODE, MODES, SUPPORT_STICKY, end_of_input, start_of_input, LineTerminatorOptimizedTester, charCodeToOptimizedIdxMap;
var init_lexer = __esmMin((() => {
	import_regexp_to_ast = require_regexp_to_ast();
	init_lexer_public();
	init_utils();
	init_reg_exp();
	init_reg_exp_parser();
	__extends$9 = (function() {
		var extendStatics = function(d, b) {
			extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
				d.__proto__ = b;
			} || function(d, b) {
				for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
			};
			return extendStatics(d, b);
		};
		return function(d, b) {
			extendStatics(d, b);
			function __() {
				this.constructor = d;
			}
			d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
		};
	})();
	PATTERN = "PATTERN";
	DEFAULT_MODE = "defaultMode";
	MODES = "modes";
	SUPPORT_STICKY = typeof (/* @__PURE__ */ new RegExp("(?:)")).sticky === "boolean";
	end_of_input = /[^\\][\$]/;
	start_of_input = /[^\\[][\^]|^\^/;
	LineTerminatorOptimizedTester = {
		test: function(text) {
			var len = text.length;
			for (var i = this.lastIndex; i < len; i++) {
				var c = text.charCodeAt(i);
				if (c === 10) {
					this.lastIndex = i + 1;
					return true;
				} else if (c === 13) {
					if (text.charCodeAt(i + 1) === 10) this.lastIndex = i + 2;
					else this.lastIndex = i + 1;
					return true;
				}
			}
			return false;
		},
		lastIndex: 0
	};
	charCodeToOptimizedIdxMap = [];
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/scan/tokens.js
function tokenStructuredMatcher(tokInstance, tokConstructor) {
	var instanceType = tokInstance.tokenTypeIdx;
	if (instanceType === tokConstructor.tokenTypeIdx) return true;
	else return tokConstructor.isParent === true && tokConstructor.categoryMatchesMap[instanceType] === true;
}
function tokenStructuredMatcherNoCategories(token, tokType) {
	return token.tokenTypeIdx === tokType.tokenTypeIdx;
}
function augmentTokenTypes(tokenTypes) {
	var tokenTypesAndParents = expandCategories(tokenTypes);
	assignTokenDefaultProps(tokenTypesAndParents);
	assignCategoriesMapProp(tokenTypesAndParents);
	assignCategoriesTokensProp(tokenTypesAndParents);
	forEach(tokenTypesAndParents, function(tokType) {
		tokType.isParent = tokType.categoryMatches.length > 0;
	});
}
function expandCategories(tokenTypes) {
	var result = cloneArr(tokenTypes);
	var categories = tokenTypes;
	var searching = true;
	while (searching) {
		categories = compact(flatten(map$3(categories, function(currTokType) {
			return currTokType.CATEGORIES;
		})));
		var newCategories = difference(categories, result);
		result = result.concat(newCategories);
		if (isEmpty(newCategories)) searching = false;
		else categories = newCategories;
	}
	return result;
}
function assignTokenDefaultProps(tokenTypes) {
	forEach(tokenTypes, function(currTokType) {
		if (!hasShortKeyProperty(currTokType)) {
			tokenIdxToClass[tokenShortNameIdx] = currTokType;
			currTokType.tokenTypeIdx = tokenShortNameIdx++;
		}
		if (hasCategoriesProperty(currTokType) && !isArray$1(currTokType.CATEGORIES)) currTokType.CATEGORIES = [currTokType.CATEGORIES];
		if (!hasCategoriesProperty(currTokType)) currTokType.CATEGORIES = [];
		if (!hasExtendingTokensTypesProperty(currTokType)) currTokType.categoryMatches = [];
		if (!hasExtendingTokensTypesMapProperty(currTokType)) currTokType.categoryMatchesMap = {};
	});
}
function assignCategoriesTokensProp(tokenTypes) {
	forEach(tokenTypes, function(currTokType) {
		currTokType.categoryMatches = [];
		forEach(currTokType.categoryMatchesMap, function(val, key) {
			currTokType.categoryMatches.push(tokenIdxToClass[key].tokenTypeIdx);
		});
	});
}
function assignCategoriesMapProp(tokenTypes) {
	forEach(tokenTypes, function(currTokType) {
		singleAssignCategoriesToksMap([], currTokType);
	});
}
function singleAssignCategoriesToksMap(path, nextNode) {
	forEach(path, function(pathNode) {
		nextNode.categoryMatchesMap[pathNode.tokenTypeIdx] = true;
	});
	forEach(nextNode.CATEGORIES, function(nextCategory) {
		var newPath = path.concat(nextNode);
		if (!contains(newPath, nextCategory)) singleAssignCategoriesToksMap(newPath, nextCategory);
	});
}
function hasShortKeyProperty(tokType) {
	return has(tokType, "tokenTypeIdx");
}
function hasCategoriesProperty(tokType) {
	return has(tokType, "CATEGORIES");
}
function hasExtendingTokensTypesProperty(tokType) {
	return has(tokType, "categoryMatches");
}
function hasExtendingTokensTypesMapProperty(tokType) {
	return has(tokType, "categoryMatchesMap");
}
function isTokenType(tokType) {
	return has(tokType, "tokenTypeIdx");
}
var tokenShortNameIdx, tokenIdxToClass;
var init_tokens = __esmMin((() => {
	init_utils();
	tokenShortNameIdx = 1;
	tokenIdxToClass = {};
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/scan/lexer_errors_public.js
var defaultLexerErrorProvider;
var init_lexer_errors_public = __esmMin((() => {
	defaultLexerErrorProvider = {
		buildUnableToPopLexerModeMessage: function(token) {
			return "Unable to pop Lexer Mode after encountering Token ->" + token.image + "<- The Mode Stack is empty";
		},
		buildUnexpectedCharactersMessage: function(fullText, startOffset, length, line, column) {
			return "unexpected character: ->" + fullText.charAt(startOffset) + "<- at offset: " + startOffset + "," + (" skipped " + length + " characters.");
		}
	};
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/scan/lexer_public.js
var LexerDefinitionErrorType, DEFAULT_LEXER_CONFIG, Lexer;
var init_lexer_public = __esmMin((() => {
	init_lexer();
	init_utils();
	init_tokens();
	init_lexer_errors_public();
	init_reg_exp_parser();
	(function(LexerDefinitionErrorType) {
		LexerDefinitionErrorType[LexerDefinitionErrorType["MISSING_PATTERN"] = 0] = "MISSING_PATTERN";
		LexerDefinitionErrorType[LexerDefinitionErrorType["INVALID_PATTERN"] = 1] = "INVALID_PATTERN";
		LexerDefinitionErrorType[LexerDefinitionErrorType["EOI_ANCHOR_FOUND"] = 2] = "EOI_ANCHOR_FOUND";
		LexerDefinitionErrorType[LexerDefinitionErrorType["UNSUPPORTED_FLAGS_FOUND"] = 3] = "UNSUPPORTED_FLAGS_FOUND";
		LexerDefinitionErrorType[LexerDefinitionErrorType["DUPLICATE_PATTERNS_FOUND"] = 4] = "DUPLICATE_PATTERNS_FOUND";
		LexerDefinitionErrorType[LexerDefinitionErrorType["INVALID_GROUP_TYPE_FOUND"] = 5] = "INVALID_GROUP_TYPE_FOUND";
		LexerDefinitionErrorType[LexerDefinitionErrorType["PUSH_MODE_DOES_NOT_EXIST"] = 6] = "PUSH_MODE_DOES_NOT_EXIST";
		LexerDefinitionErrorType[LexerDefinitionErrorType["MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE"] = 7] = "MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE";
		LexerDefinitionErrorType[LexerDefinitionErrorType["MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY"] = 8] = "MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY";
		LexerDefinitionErrorType[LexerDefinitionErrorType["MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST"] = 9] = "MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST";
		LexerDefinitionErrorType[LexerDefinitionErrorType["LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED"] = 10] = "LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED";
		LexerDefinitionErrorType[LexerDefinitionErrorType["SOI_ANCHOR_FOUND"] = 11] = "SOI_ANCHOR_FOUND";
		LexerDefinitionErrorType[LexerDefinitionErrorType["EMPTY_MATCH_PATTERN"] = 12] = "EMPTY_MATCH_PATTERN";
		LexerDefinitionErrorType[LexerDefinitionErrorType["NO_LINE_BREAKS_FLAGS"] = 13] = "NO_LINE_BREAKS_FLAGS";
		LexerDefinitionErrorType[LexerDefinitionErrorType["UNREACHABLE_PATTERN"] = 14] = "UNREACHABLE_PATTERN";
		LexerDefinitionErrorType[LexerDefinitionErrorType["IDENTIFY_TERMINATOR"] = 15] = "IDENTIFY_TERMINATOR";
		LexerDefinitionErrorType[LexerDefinitionErrorType["CUSTOM_LINE_BREAK"] = 16] = "CUSTOM_LINE_BREAK";
	})(LexerDefinitionErrorType || (LexerDefinitionErrorType = {}));
	DEFAULT_LEXER_CONFIG = {
		deferDefinitionErrorsHandling: false,
		positionTracking: "full",
		lineTerminatorsPattern: /\n|\r\n?/g,
		lineTerminatorCharacters: ["\n", "\r"],
		ensureOptimizations: false,
		safeMode: false,
		errorMessageProvider: defaultLexerErrorProvider,
		traceInitPerf: false,
		skipValidations: false
	};
	Object.freeze(DEFAULT_LEXER_CONFIG);
	Lexer = function() {
		function Lexer(lexerDefinition, config) {
			var _this = this;
			if (config === void 0) config = DEFAULT_LEXER_CONFIG;
			this.lexerDefinition = lexerDefinition;
			this.lexerDefinitionErrors = [];
			this.lexerDefinitionWarning = [];
			this.patternIdxToConfig = {};
			this.charCodeToPatternIdxToConfig = {};
			this.modes = [];
			this.emptyGroups = {};
			this.config = void 0;
			this.trackStartLines = true;
			this.trackEndLines = true;
			this.hasCustom = false;
			this.canModeBeOptimized = {};
			if (typeof config === "boolean") throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");
			this.config = merge$1(DEFAULT_LEXER_CONFIG, config);
			var traceInitVal = this.config.traceInitPerf;
			if (traceInitVal === true) {
				this.traceInitMaxIdent = Infinity;
				this.traceInitPerf = true;
			} else if (typeof traceInitVal === "number") {
				this.traceInitMaxIdent = traceInitVal;
				this.traceInitPerf = true;
			}
			this.traceInitIndent = -1;
			this.TRACE_INIT("Lexer Constructor", function() {
				var actualDefinition;
				var hasOnlySingleMode = true;
				_this.TRACE_INIT("Lexer Config handling", function() {
					if (_this.config.lineTerminatorsPattern === DEFAULT_LEXER_CONFIG.lineTerminatorsPattern) _this.config.lineTerminatorsPattern = LineTerminatorOptimizedTester;
					else if (_this.config.lineTerminatorCharacters === DEFAULT_LEXER_CONFIG.lineTerminatorCharacters) throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n	For details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");
					if (config.safeMode && config.ensureOptimizations) throw Error("\"safeMode\" and \"ensureOptimizations\" flags are mutually exclusive.");
					_this.trackStartLines = /full|onlyStart/i.test(_this.config.positionTracking);
					_this.trackEndLines = /full/i.test(_this.config.positionTracking);
					if (isArray$1(lexerDefinition)) {
						actualDefinition = { modes: {} };
						actualDefinition.modes[DEFAULT_MODE] = cloneArr(lexerDefinition);
						actualDefinition[DEFAULT_MODE] = DEFAULT_MODE;
					} else {
						hasOnlySingleMode = false;
						actualDefinition = cloneObj(lexerDefinition);
					}
				});
				if (_this.config.skipValidations === false) {
					_this.TRACE_INIT("performRuntimeChecks", function() {
						_this.lexerDefinitionErrors = _this.lexerDefinitionErrors.concat(performRuntimeChecks(actualDefinition, _this.trackStartLines, _this.config.lineTerminatorCharacters));
					});
					_this.TRACE_INIT("performWarningRuntimeChecks", function() {
						_this.lexerDefinitionWarning = _this.lexerDefinitionWarning.concat(performWarningRuntimeChecks(actualDefinition, _this.trackStartLines, _this.config.lineTerminatorCharacters));
					});
				}
				actualDefinition.modes = actualDefinition.modes ? actualDefinition.modes : {};
				forEach(actualDefinition.modes, function(currModeValue, currModeName) {
					actualDefinition.modes[currModeName] = reject(currModeValue, function(currTokType) {
						return isUndefined$1(currTokType);
					});
				});
				var allModeNames = keys$2(actualDefinition.modes);
				forEach(actualDefinition.modes, function(currModDef, currModName) {
					_this.TRACE_INIT("Mode: <" + currModName + "> processing", function() {
						_this.modes.push(currModName);
						if (_this.config.skipValidations === false) _this.TRACE_INIT("validatePatterns", function() {
							_this.lexerDefinitionErrors = _this.lexerDefinitionErrors.concat(validatePatterns(currModDef, allModeNames));
						});
						if (isEmpty(_this.lexerDefinitionErrors)) {
							augmentTokenTypes(currModDef);
							var currAnalyzeResult_1;
							_this.TRACE_INIT("analyzeTokenTypes", function() {
								currAnalyzeResult_1 = analyzeTokenTypes(currModDef, {
									lineTerminatorCharacters: _this.config.lineTerminatorCharacters,
									positionTracking: config.positionTracking,
									ensureOptimizations: config.ensureOptimizations,
									safeMode: config.safeMode,
									tracer: _this.TRACE_INIT.bind(_this)
								});
							});
							_this.patternIdxToConfig[currModName] = currAnalyzeResult_1.patternIdxToConfig;
							_this.charCodeToPatternIdxToConfig[currModName] = currAnalyzeResult_1.charCodeToPatternIdxToConfig;
							_this.emptyGroups = merge$1(_this.emptyGroups, currAnalyzeResult_1.emptyGroups);
							_this.hasCustom = currAnalyzeResult_1.hasCustom || _this.hasCustom;
							_this.canModeBeOptimized[currModName] = currAnalyzeResult_1.canBeOptimized;
						}
					});
				});
				_this.defaultMode = actualDefinition.defaultMode;
				if (!isEmpty(_this.lexerDefinitionErrors) && !_this.config.deferDefinitionErrorsHandling) {
					var allErrMessagesString = map$3(_this.lexerDefinitionErrors, function(error) {
						return error.message;
					}).join("-----------------------\n");
					throw new Error("Errors detected in definition of Lexer:\n" + allErrMessagesString);
				}
				forEach(_this.lexerDefinitionWarning, function(warningDescriptor) {
					PRINT_WARNING(warningDescriptor.message);
				});
				_this.TRACE_INIT("Choosing sub-methods implementations", function() {
					if (SUPPORT_STICKY) {
						_this.chopInput = IDENTITY;
						_this.match = _this.matchWithTest;
					} else {
						_this.updateLastIndex = NOOP;
						_this.match = _this.matchWithExec;
					}
					if (hasOnlySingleMode) _this.handleModes = NOOP;
					if (_this.trackStartLines === false) _this.computeNewColumn = IDENTITY;
					if (_this.trackEndLines === false) _this.updateTokenEndLineColumnLocation = NOOP;
					if (/full/i.test(_this.config.positionTracking)) _this.createTokenInstance = _this.createFullToken;
					else if (/onlyStart/i.test(_this.config.positionTracking)) _this.createTokenInstance = _this.createStartOnlyToken;
					else if (/onlyOffset/i.test(_this.config.positionTracking)) _this.createTokenInstance = _this.createOffsetOnlyToken;
					else throw Error("Invalid <positionTracking> config option: \"" + _this.config.positionTracking + "\"");
					if (_this.hasCustom) {
						_this.addToken = _this.addTokenUsingPush;
						_this.handlePayload = _this.handlePayloadWithCustom;
					} else {
						_this.addToken = _this.addTokenUsingMemberAccess;
						_this.handlePayload = _this.handlePayloadNoCustom;
					}
				});
				_this.TRACE_INIT("Failed Optimization Warnings", function() {
					var unOptimizedModes = reduce(_this.canModeBeOptimized, function(cannotBeOptimized, canBeOptimized, modeName) {
						if (canBeOptimized === false) cannotBeOptimized.push(modeName);
						return cannotBeOptimized;
					}, []);
					if (config.ensureOptimizations && !isEmpty(unOptimizedModes)) throw Error("Lexer Modes: < " + unOptimizedModes.join(", ") + " > cannot be optimized.\n	 Disable the \"ensureOptimizations\" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n	 Or inspect the console log for details on how to resolve these issues.");
				});
				_this.TRACE_INIT("clearRegExpParserCache", function() {
					clearRegExpParserCache();
				});
				_this.TRACE_INIT("toFastProperties", function() {
					toFastProperties(_this);
				});
			});
		}
		Lexer.prototype.tokenize = function(text, initialMode) {
			if (initialMode === void 0) initialMode = this.defaultMode;
			if (!isEmpty(this.lexerDefinitionErrors)) {
				var allErrMessagesString = map$3(this.lexerDefinitionErrors, function(error) {
					return error.message;
				}).join("-----------------------\n");
				throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n" + allErrMessagesString);
			}
			return this.tokenizeInternal(text, initialMode);
		};
		Lexer.prototype.tokenizeInternal = function(text, initialMode) {
			var _this = this, i, j, matchAltImage, longerAltIdx, matchedImage, payload, altPayload, imageLength, group, tokType, newToken, errLength, msg, match;
			var orgText = text;
			var orgLength = orgText.length;
			var offset = 0;
			var matchedTokensIndex = 0;
			var guessedNumberOfTokens = this.hasCustom ? 0 : Math.floor(text.length / 10);
			var matchedTokens = new Array(guessedNumberOfTokens);
			var errors = [];
			var line = this.trackStartLines ? 1 : void 0;
			var column = this.trackStartLines ? 1 : void 0;
			var groups = cloneEmptyGroups(this.emptyGroups);
			var trackLines = this.trackStartLines;
			var lineTerminatorPattern = this.config.lineTerminatorsPattern;
			var currModePatternsLength = 0;
			var patternIdxToConfig = [];
			var currCharCodeToPatternIdxToConfig = [];
			var modeStack = [];
			var emptyArray = [];
			Object.freeze(emptyArray);
			var getPossiblePatterns = void 0;
			function getPossiblePatternsSlow() {
				return patternIdxToConfig;
			}
			function getPossiblePatternsOptimized(charCode) {
				var optimizedCharIdx = charCodeToOptimizedIndex(charCode);
				var possiblePatterns = currCharCodeToPatternIdxToConfig[optimizedCharIdx];
				if (possiblePatterns === void 0) return emptyArray;
				else return possiblePatterns;
			}
			var pop_mode = function(popToken) {
				if (modeStack.length === 1 && popToken.tokenType.PUSH_MODE === void 0) {
					var msg_1 = _this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(popToken);
					errors.push({
						offset: popToken.startOffset,
						line: popToken.startLine !== void 0 ? popToken.startLine : void 0,
						column: popToken.startColumn !== void 0 ? popToken.startColumn : void 0,
						length: popToken.image.length,
						message: msg_1
					});
				} else {
					modeStack.pop();
					var newMode = last(modeStack);
					patternIdxToConfig = _this.patternIdxToConfig[newMode];
					currCharCodeToPatternIdxToConfig = _this.charCodeToPatternIdxToConfig[newMode];
					currModePatternsLength = patternIdxToConfig.length;
					var modeCanBeOptimized = _this.canModeBeOptimized[newMode] && _this.config.safeMode === false;
					if (currCharCodeToPatternIdxToConfig && modeCanBeOptimized) getPossiblePatterns = getPossiblePatternsOptimized;
					else getPossiblePatterns = getPossiblePatternsSlow;
				}
			};
			function push_mode(newMode) {
				modeStack.push(newMode);
				currCharCodeToPatternIdxToConfig = this.charCodeToPatternIdxToConfig[newMode];
				patternIdxToConfig = this.patternIdxToConfig[newMode];
				currModePatternsLength = patternIdxToConfig.length;
				currModePatternsLength = patternIdxToConfig.length;
				var modeCanBeOptimized = this.canModeBeOptimized[newMode] && this.config.safeMode === false;
				if (currCharCodeToPatternIdxToConfig && modeCanBeOptimized) getPossiblePatterns = getPossiblePatternsOptimized;
				else getPossiblePatterns = getPossiblePatternsSlow;
			}
			push_mode.call(this, initialMode);
			var currConfig;
			while (offset < orgLength) {
				matchedImage = null;
				var nextCharCode = orgText.charCodeAt(offset);
				var chosenPatternIdxToConfig = getPossiblePatterns(nextCharCode);
				var chosenPatternsLength = chosenPatternIdxToConfig.length;
				for (i = 0; i < chosenPatternsLength; i++) {
					currConfig = chosenPatternIdxToConfig[i];
					var currPattern = currConfig.pattern;
					payload = null;
					var singleCharCode = currConfig.short;
					if (singleCharCode !== false) {
						if (nextCharCode === singleCharCode) matchedImage = currPattern;
					} else if (currConfig.isCustom === true) {
						match = currPattern.exec(orgText, offset, matchedTokens, groups);
						if (match !== null) {
							matchedImage = match[0];
							if (match.payload !== void 0) payload = match.payload;
						} else matchedImage = null;
					} else {
						this.updateLastIndex(currPattern, offset);
						matchedImage = this.match(currPattern, text, offset);
					}
					if (matchedImage !== null) {
						longerAltIdx = currConfig.longerAlt;
						if (longerAltIdx !== void 0) {
							var longerAltConfig = patternIdxToConfig[longerAltIdx];
							var longerAltPattern = longerAltConfig.pattern;
							altPayload = null;
							if (longerAltConfig.isCustom === true) {
								match = longerAltPattern.exec(orgText, offset, matchedTokens, groups);
								if (match !== null) {
									matchAltImage = match[0];
									if (match.payload !== void 0) altPayload = match.payload;
								} else matchAltImage = null;
							} else {
								this.updateLastIndex(longerAltPattern, offset);
								matchAltImage = this.match(longerAltPattern, text, offset);
							}
							if (matchAltImage && matchAltImage.length > matchedImage.length) {
								matchedImage = matchAltImage;
								payload = altPayload;
								currConfig = longerAltConfig;
							}
						}
						break;
					}
				}
				if (matchedImage !== null) {
					imageLength = matchedImage.length;
					group = currConfig.group;
					if (group !== void 0) {
						tokType = currConfig.tokenTypeIdx;
						newToken = this.createTokenInstance(matchedImage, offset, tokType, currConfig.tokenType, line, column, imageLength);
						this.handlePayload(newToken, payload);
						if (group === false) matchedTokensIndex = this.addToken(matchedTokens, matchedTokensIndex, newToken);
						else groups[group].push(newToken);
					}
					text = this.chopInput(text, imageLength);
					offset = offset + imageLength;
					column = this.computeNewColumn(column, imageLength);
					if (trackLines === true && currConfig.canLineTerminator === true) {
						var numOfLTsInMatch = 0;
						var foundTerminator = void 0;
						var lastLTEndOffset = void 0;
						lineTerminatorPattern.lastIndex = 0;
						do {
							foundTerminator = lineTerminatorPattern.test(matchedImage);
							if (foundTerminator === true) {
								lastLTEndOffset = lineTerminatorPattern.lastIndex - 1;
								numOfLTsInMatch++;
							}
						} while (foundTerminator === true);
						if (numOfLTsInMatch !== 0) {
							line = line + numOfLTsInMatch;
							column = imageLength - lastLTEndOffset;
							this.updateTokenEndLineColumnLocation(newToken, group, lastLTEndOffset, numOfLTsInMatch, line, column, imageLength);
						}
					}
					this.handleModes(currConfig, pop_mode, push_mode, newToken);
				} else {
					var errorStartOffset = offset;
					var errorLine = line;
					var errorColumn = column;
					var foundResyncPoint = false;
					while (!foundResyncPoint && offset < orgLength) {
						orgText.charCodeAt(offset);
						text = this.chopInput(text, 1);
						offset++;
						for (j = 0; j < currModePatternsLength; j++) {
							var currConfig_1 = patternIdxToConfig[j];
							var currPattern = currConfig_1.pattern;
							var singleCharCode = currConfig_1.short;
							if (singleCharCode !== false) {
								if (orgText.charCodeAt(offset) === singleCharCode) foundResyncPoint = true;
							} else if (currConfig_1.isCustom === true) foundResyncPoint = currPattern.exec(orgText, offset, matchedTokens, groups) !== null;
							else {
								this.updateLastIndex(currPattern, offset);
								foundResyncPoint = currPattern.exec(text) !== null;
							}
							if (foundResyncPoint === true) break;
						}
					}
					errLength = offset - errorStartOffset;
					msg = this.config.errorMessageProvider.buildUnexpectedCharactersMessage(orgText, errorStartOffset, errLength, errorLine, errorColumn);
					errors.push({
						offset: errorStartOffset,
						line: errorLine,
						column: errorColumn,
						length: errLength,
						message: msg
					});
				}
			}
			if (!this.hasCustom) matchedTokens.length = matchedTokensIndex;
			return {
				tokens: matchedTokens,
				groups,
				errors
			};
		};
		Lexer.prototype.handleModes = function(config, pop_mode, push_mode, newToken) {
			if (config.pop === true) {
				var pushMode = config.push;
				pop_mode(newToken);
				if (pushMode !== void 0) push_mode.call(this, pushMode);
			} else if (config.push !== void 0) push_mode.call(this, config.push);
		};
		Lexer.prototype.chopInput = function(text, length) {
			return text.substring(length);
		};
		Lexer.prototype.updateLastIndex = function(regExp, newLastIndex) {
			regExp.lastIndex = newLastIndex;
		};
		Lexer.prototype.updateTokenEndLineColumnLocation = function(newToken, group, lastLTIdx, numOfLTsInMatch, line, column, imageLength) {
			var lastCharIsLT, fixForEndingInLT;
			if (group !== void 0) {
				lastCharIsLT = lastLTIdx === imageLength - 1;
				fixForEndingInLT = lastCharIsLT ? -1 : 0;
				if (!(numOfLTsInMatch === 1 && lastCharIsLT === true)) {
					newToken.endLine = line + fixForEndingInLT;
					newToken.endColumn = column - 1 + -fixForEndingInLT;
				}
			}
		};
		Lexer.prototype.computeNewColumn = function(oldColumn, imageLength) {
			return oldColumn + imageLength;
		};
		/* istanbul ignore next - place holder */
		Lexer.prototype.createTokenInstance = function() {
			var args = [];
			for (var _i = 0; _i < arguments.length; _i++) args[_i] = arguments[_i];
			return null;
		};
		Lexer.prototype.createOffsetOnlyToken = function(image, startOffset, tokenTypeIdx, tokenType) {
			return {
				image,
				startOffset,
				tokenTypeIdx,
				tokenType
			};
		};
		Lexer.prototype.createStartOnlyToken = function(image, startOffset, tokenTypeIdx, tokenType, startLine, startColumn) {
			return {
				image,
				startOffset,
				startLine,
				startColumn,
				tokenTypeIdx,
				tokenType
			};
		};
		Lexer.prototype.createFullToken = function(image, startOffset, tokenTypeIdx, tokenType, startLine, startColumn, imageLength) {
			return {
				image,
				startOffset,
				endOffset: startOffset + imageLength - 1,
				startLine,
				endLine: startLine,
				startColumn,
				endColumn: startColumn + imageLength - 1,
				tokenTypeIdx,
				tokenType
			};
		};
		/* istanbul ignore next - place holder */
		Lexer.prototype.addToken = function(tokenVector, index, tokenToAdd) {
			return 666;
		};
		Lexer.prototype.addTokenUsingPush = function(tokenVector, index, tokenToAdd) {
			tokenVector.push(tokenToAdd);
			return index;
		};
		Lexer.prototype.addTokenUsingMemberAccess = function(tokenVector, index, tokenToAdd) {
			tokenVector[index] = tokenToAdd;
			index++;
			return index;
		};
		/* istanbul ignore next - place holder */
		Lexer.prototype.handlePayload = function(token, payload) {};
		Lexer.prototype.handlePayloadNoCustom = function(token, payload) {};
		Lexer.prototype.handlePayloadWithCustom = function(token, payload) {
			if (payload !== null) token.payload = payload;
		};
		/* istanbul ignore next - place holder to be replaced with chosen alternative at runtime */
		Lexer.prototype.match = function(pattern, text, offset) {
			return null;
		};
		Lexer.prototype.matchWithTest = function(pattern, text, offset) {
			if (pattern.test(text) === true) return text.substring(offset, pattern.lastIndex);
			return null;
		};
		Lexer.prototype.matchWithExec = function(pattern, text) {
			var regExpArray = pattern.exec(text);
			return regExpArray !== null ? regExpArray[0] : regExpArray;
		};
		Lexer.prototype.TRACE_INIT = function(phaseDesc, phaseImpl) {
			if (this.traceInitPerf === true) {
				this.traceInitIndent++;
				var indent = new Array(this.traceInitIndent + 1).join("	");
				if (this.traceInitIndent < this.traceInitMaxIdent) console.log(indent + "--> <" + phaseDesc + ">");
				var _a = timer(phaseImpl), time = _a.time, value = _a.value;
				/* istanbul ignore next - Difficult to reproduce specific performance behavior (>10ms) in tests */
				var traceMethod = time > 10 ? console.warn : console.log;
				if (this.traceInitIndent < this.traceInitMaxIdent) traceMethod(indent + "<-- <" + phaseDesc + "> time: " + time + "ms");
				this.traceInitIndent--;
				return value;
			} else return phaseImpl();
		};
		Lexer.SKIPPED = "This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.";
		Lexer.NA = /NOT_APPLICABLE/;
		return Lexer;
	}();
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/scan/tokens_public.js
function tokenLabel(tokType) {
	if (hasTokenLabel(tokType)) return tokType.LABEL;
	else return tokType.name;
}
function hasTokenLabel(obj) {
	return isString$1(obj.LABEL) && obj.LABEL !== "";
}
function createToken(config) {
	return createTokenInternal(config);
}
function createTokenInternal(config) {
	var pattern = config.pattern;
	var tokenType = {};
	tokenType.name = config.name;
	if (!isUndefined$1(pattern)) tokenType.PATTERN = pattern;
	if (has(config, PARENT)) throw "The parent property is no longer supported.\nSee: https://github.com/SAP/chevrotain/issues/564#issuecomment-349062346 for details.";
	if (has(config, CATEGORIES)) tokenType.CATEGORIES = config[CATEGORIES];
	augmentTokenTypes([tokenType]);
	if (has(config, LABEL)) tokenType.LABEL = config[LABEL];
	if (has(config, GROUP)) tokenType.GROUP = config[GROUP];
	if (has(config, POP_MODE)) tokenType.POP_MODE = config[POP_MODE];
	if (has(config, PUSH_MODE)) tokenType.PUSH_MODE = config[PUSH_MODE];
	if (has(config, LONGER_ALT)) tokenType.LONGER_ALT = config[LONGER_ALT];
	if (has(config, LINE_BREAKS)) tokenType.LINE_BREAKS = config[LINE_BREAKS];
	if (has(config, START_CHARS_HINT)) tokenType.START_CHARS_HINT = config[START_CHARS_HINT];
	return tokenType;
}
function createTokenInstance(tokType, image, startOffset, endOffset, startLine, endLine, startColumn, endColumn) {
	return {
		image,
		startOffset,
		endOffset,
		startLine,
		endLine,
		startColumn,
		endColumn,
		tokenTypeIdx: tokType.tokenTypeIdx,
		tokenType: tokType
	};
}
function tokenMatcher(token, tokType) {
	return tokenStructuredMatcher(token, tokType);
}
var PARENT, CATEGORIES, LABEL, GROUP, PUSH_MODE, POP_MODE, LONGER_ALT, LINE_BREAKS, START_CHARS_HINT, EOF;
var init_tokens_public = __esmMin((() => {
	init_utils();
	init_lexer_public();
	init_tokens();
	PARENT = "parent";
	CATEGORIES = "categories";
	LABEL = "label";
	GROUP = "group";
	PUSH_MODE = "push_mode";
	POP_MODE = "pop_mode";
	LONGER_ALT = "longer_alt";
	LINE_BREAKS = "line_breaks";
	START_CHARS_HINT = "start_chars_hint";
	EOF = createToken({
		name: "EOF",
		pattern: Lexer.NA
	});
	augmentTokenTypes([EOF]);
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_public.js
function serializeGrammar(topRules) {
	return map$3(topRules, serializeProduction);
}
function serializeProduction(node) {
	function convertDefinition(definition) {
		return map$3(definition, serializeProduction);
	}
	/* istanbul ignore else */
	if (node instanceof NonTerminal) return {
		type: "NonTerminal",
		name: node.nonTerminalName,
		idx: node.idx
	};
	else if (node instanceof Flat) return {
		type: "Flat",
		definition: convertDefinition(node.definition)
	};
	else if (node instanceof Option) return {
		type: "Option",
		idx: node.idx,
		definition: convertDefinition(node.definition)
	};
	else if (node instanceof RepetitionMandatory) return {
		type: "RepetitionMandatory",
		name: node.name,
		idx: node.idx,
		definition: convertDefinition(node.definition)
	};
	else if (node instanceof RepetitionMandatoryWithSeparator) return {
		type: "RepetitionMandatoryWithSeparator",
		name: node.name,
		idx: node.idx,
		separator: serializeProduction(new Terminal({ terminalType: node.separator })),
		definition: convertDefinition(node.definition)
	};
	else if (node instanceof RepetitionWithSeparator) return {
		type: "RepetitionWithSeparator",
		name: node.name,
		idx: node.idx,
		separator: serializeProduction(new Terminal({ terminalType: node.separator })),
		definition: convertDefinition(node.definition)
	};
	else if (node instanceof Repetition) return {
		type: "Repetition",
		name: node.name,
		idx: node.idx,
		definition: convertDefinition(node.definition)
	};
	else if (node instanceof Alternation) return {
		type: "Alternation",
		name: node.name,
		idx: node.idx,
		definition: convertDefinition(node.definition)
	};
	else if (node instanceof Terminal) {
		var serializedTerminal = {
			type: "Terminal",
			name: node.terminalType.name,
			label: tokenLabel(node.terminalType),
			idx: node.idx
		};
		var pattern = node.terminalType.PATTERN;
		if (node.terminalType.PATTERN) serializedTerminal.pattern = isRegExp(pattern) ? pattern.source : pattern;
		return serializedTerminal;
	} else if (node instanceof Rule$1) return {
		type: "Rule",
		name: node.name,
		orgText: node.orgText,
		definition: convertDefinition(node.definition)
	};
	else throw Error("non exhaustive match");
}
var __extends$8, AbstractProduction, NonTerminal, Rule$1, Flat, Option, RepetitionMandatory, RepetitionMandatoryWithSeparator, Repetition, RepetitionWithSeparator, Alternation, Terminal;
var init_gast_public = __esmMin((() => {
	init_utils();
	init_tokens_public();
	__extends$8 = (function() {
		var extendStatics = function(d, b) {
			extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
				d.__proto__ = b;
			} || function(d, b) {
				for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
			};
			return extendStatics(d, b);
		};
		return function(d, b) {
			extendStatics(d, b);
			function __() {
				this.constructor = d;
			}
			d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
		};
	})();
	AbstractProduction = function() {
		function AbstractProduction(definition) {
			this.definition = definition;
		}
		AbstractProduction.prototype.accept = function(visitor) {
			visitor.visit(this);
			forEach(this.definition, function(prod) {
				prod.accept(visitor);
			});
		};
		return AbstractProduction;
	}();
	NonTerminal = function(_super) {
		__extends$8(NonTerminal, _super);
		function NonTerminal(options) {
			var _this = _super.call(this, []) || this;
			_this.idx = 1;
			assign(_this, pick(options, function(v) {
				return v !== void 0;
			}));
			return _this;
		}
		Object.defineProperty(NonTerminal.prototype, "definition", {
			get: function() {
				if (this.referencedRule !== void 0) return this.referencedRule.definition;
				return [];
			},
			set: function(definition) {},
			enumerable: true,
			configurable: true
		});
		NonTerminal.prototype.accept = function(visitor) {
			visitor.visit(this);
		};
		return NonTerminal;
	}(AbstractProduction);
	Rule$1 = function(_super) {
		__extends$8(Rule, _super);
		function Rule(options) {
			var _this = _super.call(this, options.definition) || this;
			_this.orgText = "";
			assign(_this, pick(options, function(v) {
				return v !== void 0;
			}));
			return _this;
		}
		return Rule;
	}(AbstractProduction);
	Flat = function(_super) {
		__extends$8(Flat, _super);
		function Flat(options) {
			var _this = _super.call(this, options.definition) || this;
			_this.ignoreAmbiguities = false;
			assign(_this, pick(options, function(v) {
				return v !== void 0;
			}));
			return _this;
		}
		return Flat;
	}(AbstractProduction);
	Option = function(_super) {
		__extends$8(Option, _super);
		function Option(options) {
			var _this = _super.call(this, options.definition) || this;
			_this.idx = 1;
			assign(_this, pick(options, function(v) {
				return v !== void 0;
			}));
			return _this;
		}
		return Option;
	}(AbstractProduction);
	RepetitionMandatory = function(_super) {
		__extends$8(RepetitionMandatory, _super);
		function RepetitionMandatory(options) {
			var _this = _super.call(this, options.definition) || this;
			_this.idx = 1;
			assign(_this, pick(options, function(v) {
				return v !== void 0;
			}));
			return _this;
		}
		return RepetitionMandatory;
	}(AbstractProduction);
	RepetitionMandatoryWithSeparator = function(_super) {
		__extends$8(RepetitionMandatoryWithSeparator, _super);
		function RepetitionMandatoryWithSeparator(options) {
			var _this = _super.call(this, options.definition) || this;
			_this.idx = 1;
			assign(_this, pick(options, function(v) {
				return v !== void 0;
			}));
			return _this;
		}
		return RepetitionMandatoryWithSeparator;
	}(AbstractProduction);
	Repetition = function(_super) {
		__extends$8(Repetition, _super);
		function Repetition(options) {
			var _this = _super.call(this, options.definition) || this;
			_this.idx = 1;
			assign(_this, pick(options, function(v) {
				return v !== void 0;
			}));
			return _this;
		}
		return Repetition;
	}(AbstractProduction);
	RepetitionWithSeparator = function(_super) {
		__extends$8(RepetitionWithSeparator, _super);
		function RepetitionWithSeparator(options) {
			var _this = _super.call(this, options.definition) || this;
			_this.idx = 1;
			assign(_this, pick(options, function(v) {
				return v !== void 0;
			}));
			return _this;
		}
		return RepetitionWithSeparator;
	}(AbstractProduction);
	Alternation = function(_super) {
		__extends$8(Alternation, _super);
		function Alternation(options) {
			var _this = _super.call(this, options.definition) || this;
			_this.idx = 1;
			_this.ignoreAmbiguities = false;
			_this.hasPredicates = false;
			assign(_this, pick(options, function(v) {
				return v !== void 0;
			}));
			return _this;
		}
		return Alternation;
	}(AbstractProduction);
	Terminal = function() {
		function Terminal(options) {
			this.idx = 1;
			assign(this, pick(options, function(v) {
				return v !== void 0;
			}));
		}
		Terminal.prototype.accept = function(visitor) {
			visitor.visit(this);
		};
		return Terminal;
	}();
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/grammar/rest.js
function restForRepetitionWithSeparator(repSepProd, currRest, prevRest) {
	return [new Option({ definition: [new Terminal({ terminalType: repSepProd.separator })].concat(repSepProd.definition) })].concat(currRest, prevRest);
}
var RestWalker;
var init_rest = __esmMin((() => {
	init_utils();
	init_gast_public();
	RestWalker = function() {
		function RestWalker() {}
		RestWalker.prototype.walk = function(prod, prevRest) {
			var _this = this;
			if (prevRest === void 0) prevRest = [];
			forEach(prod.definition, function(subProd, index) {
				var currRest = drop(prod.definition, index + 1);
				/* istanbul ignore else */
				if (subProd instanceof NonTerminal) _this.walkProdRef(subProd, currRest, prevRest);
				else if (subProd instanceof Terminal) _this.walkTerminal(subProd, currRest, prevRest);
				else if (subProd instanceof Flat) _this.walkFlat(subProd, currRest, prevRest);
				else if (subProd instanceof Option) _this.walkOption(subProd, currRest, prevRest);
				else if (subProd instanceof RepetitionMandatory) _this.walkAtLeastOne(subProd, currRest, prevRest);
				else if (subProd instanceof RepetitionMandatoryWithSeparator) _this.walkAtLeastOneSep(subProd, currRest, prevRest);
				else if (subProd instanceof RepetitionWithSeparator) _this.walkManySep(subProd, currRest, prevRest);
				else if (subProd instanceof Repetition) _this.walkMany(subProd, currRest, prevRest);
				else if (subProd instanceof Alternation) _this.walkOr(subProd, currRest, prevRest);
				else throw Error("non exhaustive match");
			});
		};
		RestWalker.prototype.walkTerminal = function(terminal, currRest, prevRest) {};
		RestWalker.prototype.walkProdRef = function(refProd, currRest, prevRest) {};
		RestWalker.prototype.walkFlat = function(flatProd, currRest, prevRest) {
			var fullOrRest = currRest.concat(prevRest);
			this.walk(flatProd, fullOrRest);
		};
		RestWalker.prototype.walkOption = function(optionProd, currRest, prevRest) {
			var fullOrRest = currRest.concat(prevRest);
			this.walk(optionProd, fullOrRest);
		};
		RestWalker.prototype.walkAtLeastOne = function(atLeastOneProd, currRest, prevRest) {
			var fullAtLeastOneRest = [new Option({ definition: atLeastOneProd.definition })].concat(currRest, prevRest);
			this.walk(atLeastOneProd, fullAtLeastOneRest);
		};
		RestWalker.prototype.walkAtLeastOneSep = function(atLeastOneSepProd, currRest, prevRest) {
			var fullAtLeastOneSepRest = restForRepetitionWithSeparator(atLeastOneSepProd, currRest, prevRest);
			this.walk(atLeastOneSepProd, fullAtLeastOneSepRest);
		};
		RestWalker.prototype.walkMany = function(manyProd, currRest, prevRest) {
			var fullManyRest = [new Option({ definition: manyProd.definition })].concat(currRest, prevRest);
			this.walk(manyProd, fullManyRest);
		};
		RestWalker.prototype.walkManySep = function(manySepProd, currRest, prevRest) {
			var fullManySepRest = restForRepetitionWithSeparator(manySepProd, currRest, prevRest);
			this.walk(manySepProd, fullManySepRest);
		};
		RestWalker.prototype.walkOr = function(orProd, currRest, prevRest) {
			var _this = this;
			var fullOrRest = currRest.concat(prevRest);
			forEach(orProd.definition, function(alt) {
				var prodWrapper = new Flat({ definition: [alt] });
				_this.walk(prodWrapper, fullOrRest);
			});
		};
		return RestWalker;
	}();
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_visitor_public.js
var GAstVisitor;
var init_gast_visitor_public = __esmMin((() => {
	init_gast_public();
	GAstVisitor = function() {
		function GAstVisitor() {}
		GAstVisitor.prototype.visit = function(node) {
			var nodeAny = node;
			switch (nodeAny.constructor) {
				case NonTerminal: return this.visitNonTerminal(nodeAny);
				case Flat: return this.visitFlat(nodeAny);
				case Option: return this.visitOption(nodeAny);
				case RepetitionMandatory: return this.visitRepetitionMandatory(nodeAny);
				case RepetitionMandatoryWithSeparator: return this.visitRepetitionMandatoryWithSeparator(nodeAny);
				case RepetitionWithSeparator: return this.visitRepetitionWithSeparator(nodeAny);
				case Repetition: return this.visitRepetition(nodeAny);
				case Alternation: return this.visitAlternation(nodeAny);
				case Terminal: return this.visitTerminal(nodeAny);
				case Rule$1: return this.visitRule(nodeAny);
				/* istanbul ignore next */
				default: throw Error("non exhaustive match");
			}
		};
		GAstVisitor.prototype.visitNonTerminal = function(node) {};
		GAstVisitor.prototype.visitFlat = function(node) {};
		GAstVisitor.prototype.visitOption = function(node) {};
		GAstVisitor.prototype.visitRepetition = function(node) {};
		GAstVisitor.prototype.visitRepetitionMandatory = function(node) {};
		GAstVisitor.prototype.visitRepetitionMandatoryWithSeparator = function(node) {};
		GAstVisitor.prototype.visitRepetitionWithSeparator = function(node) {};
		GAstVisitor.prototype.visitAlternation = function(node) {};
		GAstVisitor.prototype.visitTerminal = function(node) {};
		GAstVisitor.prototype.visitRule = function(node) {};
		return GAstVisitor;
	}();
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast.js
function isSequenceProd(prod) {
	return prod instanceof Flat || prod instanceof Option || prod instanceof Repetition || prod instanceof RepetitionMandatory || prod instanceof RepetitionMandatoryWithSeparator || prod instanceof RepetitionWithSeparator || prod instanceof Terminal || prod instanceof Rule$1;
}
function isOptionalProd(prod, alreadyVisited) {
	if (alreadyVisited === void 0) alreadyVisited = [];
	if (prod instanceof Option || prod instanceof Repetition || prod instanceof RepetitionWithSeparator) return true;
	if (prod instanceof Alternation) return some$1(prod.definition, function(subProd) {
		return isOptionalProd(subProd, alreadyVisited);
	});
	else if (prod instanceof NonTerminal && contains(alreadyVisited, prod)) return false;
	else if (prod instanceof AbstractProduction) {
		if (prod instanceof NonTerminal) alreadyVisited.push(prod);
		return every(prod.definition, function(subProd) {
			return isOptionalProd(subProd, alreadyVisited);
		});
	} else return false;
}
function isBranchingProd(prod) {
	return prod instanceof Alternation;
}
function getProductionDslName(prod) {
	/* istanbul ignore else */
	if (prod instanceof NonTerminal) return "SUBRULE";
	else if (prod instanceof Option) return "OPTION";
	else if (prod instanceof Alternation) return "OR";
	else if (prod instanceof RepetitionMandatory) return "AT_LEAST_ONE";
	else if (prod instanceof RepetitionMandatoryWithSeparator) return "AT_LEAST_ONE_SEP";
	else if (prod instanceof RepetitionWithSeparator) return "MANY_SEP";
	else if (prod instanceof Repetition) return "MANY";
	else if (prod instanceof Terminal) return "CONSUME";
	else throw Error("non exhaustive match");
}
function collectMethods(rule) {
	collectorVisitor.reset();
	rule.accept(collectorVisitor);
	var dslMethods = collectorVisitor.dslMethods;
	collectorVisitor.reset();
	return dslMethods;
}
var __extends$7, DslMethodsCollectorVisitor, collectorVisitor;
var init_gast = __esmMin((() => {
	init_utils();
	init_gast_public();
	init_gast_visitor_public();
	__extends$7 = (function() {
		var extendStatics = function(d, b) {
			extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
				d.__proto__ = b;
			} || function(d, b) {
				for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
			};
			return extendStatics(d, b);
		};
		return function(d, b) {
			extendStatics(d, b);
			function __() {
				this.constructor = d;
			}
			d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
		};
	})();
	DslMethodsCollectorVisitor = function(_super) {
		__extends$7(DslMethodsCollectorVisitor, _super);
		function DslMethodsCollectorVisitor() {
			var _this = _super !== null && _super.apply(this, arguments) || this;
			_this.separator = "-";
			_this.dslMethods = {
				option: [],
				alternation: [],
				repetition: [],
				repetitionWithSeparator: [],
				repetitionMandatory: [],
				repetitionMandatoryWithSeparator: []
			};
			return _this;
		}
		DslMethodsCollectorVisitor.prototype.reset = function() {
			this.dslMethods = {
				option: [],
				alternation: [],
				repetition: [],
				repetitionWithSeparator: [],
				repetitionMandatory: [],
				repetitionMandatoryWithSeparator: []
			};
		};
		DslMethodsCollectorVisitor.prototype.visitTerminal = function(terminal) {
			var key = terminal.terminalType.name + this.separator + "Terminal";
			if (!has(this.dslMethods, key)) this.dslMethods[key] = [];
			this.dslMethods[key].push(terminal);
		};
		DslMethodsCollectorVisitor.prototype.visitNonTerminal = function(subrule) {
			var key = subrule.nonTerminalName + this.separator + "Terminal";
			if (!has(this.dslMethods, key)) this.dslMethods[key] = [];
			this.dslMethods[key].push(subrule);
		};
		DslMethodsCollectorVisitor.prototype.visitOption = function(option) {
			this.dslMethods.option.push(option);
		};
		DslMethodsCollectorVisitor.prototype.visitRepetitionWithSeparator = function(manySep) {
			this.dslMethods.repetitionWithSeparator.push(manySep);
		};
		DslMethodsCollectorVisitor.prototype.visitRepetitionMandatory = function(atLeastOne) {
			this.dslMethods.repetitionMandatory.push(atLeastOne);
		};
		DslMethodsCollectorVisitor.prototype.visitRepetitionMandatoryWithSeparator = function(atLeastOneSep) {
			this.dslMethods.repetitionMandatoryWithSeparator.push(atLeastOneSep);
		};
		DslMethodsCollectorVisitor.prototype.visitRepetition = function(many) {
			this.dslMethods.repetition.push(many);
		};
		DslMethodsCollectorVisitor.prototype.visitAlternation = function(or) {
			this.dslMethods.alternation.push(or);
		};
		return DslMethodsCollectorVisitor;
	}(GAstVisitor);
	collectorVisitor = new DslMethodsCollectorVisitor();
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/grammar/first.js
function first(prod) {
	/* istanbul ignore else */
	if (prod instanceof NonTerminal) return first(prod.referencedRule);
	else if (prod instanceof Terminal) return firstForTerminal(prod);
	else if (isSequenceProd(prod)) return firstForSequence(prod);
	else if (isBranchingProd(prod)) return firstForBranching(prod);
	else throw Error("non exhaustive match");
}
function firstForSequence(prod) {
	var firstSet = [];
	var seq = prod.definition;
	var nextSubProdIdx = 0;
	var hasInnerProdsRemaining = seq.length > nextSubProdIdx;
	var currSubProd;
	var isLastInnerProdOptional = true;
	while (hasInnerProdsRemaining && isLastInnerProdOptional) {
		currSubProd = seq[nextSubProdIdx];
		isLastInnerProdOptional = isOptionalProd(currSubProd);
		firstSet = firstSet.concat(first(currSubProd));
		nextSubProdIdx = nextSubProdIdx + 1;
		hasInnerProdsRemaining = seq.length > nextSubProdIdx;
	}
	return uniq(firstSet);
}
function firstForBranching(prod) {
	return uniq(flatten(map$3(prod.definition, function(innerProd) {
		return first(innerProd);
	})));
}
function firstForTerminal(terminal) {
	return [terminal.terminalType];
}
var init_first = __esmMin((() => {
	init_utils();
	init_gast_public();
	init_gast();
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/constants.js
var IN;
var init_constants = __esmMin((() => {
	IN = "_~IN~_";
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/grammar/follow.js
function computeAllProdsFollows(topProductions) {
	var reSyncFollows = {};
	forEach(topProductions, function(topProd) {
		assign(reSyncFollows, new ResyncFollowsWalker(topProd).startWalking());
	});
	return reSyncFollows;
}
function buildBetweenProdsFollowPrefix(inner, occurenceInParent) {
	return inner.name + occurenceInParent + IN;
}
var __extends$6, ResyncFollowsWalker;
var init_follow = __esmMin((() => {
	init_rest();
	init_first();
	init_utils();
	init_constants();
	init_gast_public();
	__extends$6 = (function() {
		var extendStatics = function(d, b) {
			extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
				d.__proto__ = b;
			} || function(d, b) {
				for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
			};
			return extendStatics(d, b);
		};
		return function(d, b) {
			extendStatics(d, b);
			function __() {
				this.constructor = d;
			}
			d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
		};
	})();
	ResyncFollowsWalker = function(_super) {
		__extends$6(ResyncFollowsWalker, _super);
		function ResyncFollowsWalker(topProd) {
			var _this = _super.call(this) || this;
			_this.topProd = topProd;
			_this.follows = {};
			return _this;
		}
		ResyncFollowsWalker.prototype.startWalking = function() {
			this.walk(this.topProd);
			return this.follows;
		};
		ResyncFollowsWalker.prototype.walkTerminal = function(terminal, currRest, prevRest) {};
		ResyncFollowsWalker.prototype.walkProdRef = function(refProd, currRest, prevRest) {
			var followName = buildBetweenProdsFollowPrefix(refProd.referencedRule, refProd.idx) + this.topProd.name;
			var t_in_topProd_follows = first(new Flat({ definition: currRest.concat(prevRest) }));
			this.follows[followName] = t_in_topProd_follows;
		};
		return ResyncFollowsWalker;
	}(RestWalker);
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/grammar/keys.js
function getKeyForAutomaticLookahead(ruleIdx, dslMethodIdx, occurrence) {
	return occurrence | dslMethodIdx | ruleIdx;
}
function getKeyForAltIndex(ruleIdx, dslMethodIdx, occurrence, altIdx) {
	var altIdxBitMap = altIdx + 1 << BITS_START_FOR_ALT_IDX;
	return getKeyForAutomaticLookahead(ruleIdx, dslMethodIdx, occurrence) | altIdxBitMap;
}
var AT_LEAST_ONE_IDX, MANY_SEP_IDX, AT_LEAST_ONE_SEP_IDX, BITS_START_FOR_ALT_IDX;
var init_keys = __esmMin((() => {
	AT_LEAST_ONE_IDX = 1024;
	MANY_SEP_IDX = 1280;
	AT_LEAST_ONE_SEP_IDX = 1536;
	BITS_START_FOR_ALT_IDX = 24;
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/cst/cst.js
/**
* This nodeLocation tracking is not efficient and should only be used
* when error recovery is enabled or the Token Vector contains virtual Tokens
* (e.g, Python Indent/Outdent)
* As it executes the calculation for every single terminal/nonTerminal
* and does not rely on the fact the token vector is **sorted**
*/
function setNodeLocationOnlyOffset(currNodeLocation, newLocationInfo) {
	if (isNaN(currNodeLocation.startOffset) === true) {
		currNodeLocation.startOffset = newLocationInfo.startOffset;
		currNodeLocation.endOffset = newLocationInfo.endOffset;
	} else if (currNodeLocation.endOffset < newLocationInfo.endOffset === true) currNodeLocation.endOffset = newLocationInfo.endOffset;
}
/**
* This nodeLocation tracking is not efficient and should only be used
* when error recovery is enabled or the Token Vector contains virtual Tokens
* (e.g, Python Indent/Outdent)
* As it executes the calculation for every single terminal/nonTerminal
* and does not rely on the fact the token vector is **sorted**
*/
function setNodeLocationFull(currNodeLocation, newLocationInfo) {
	if (isNaN(currNodeLocation.startOffset) === true) {
		currNodeLocation.startOffset = newLocationInfo.startOffset;
		currNodeLocation.startColumn = newLocationInfo.startColumn;
		currNodeLocation.startLine = newLocationInfo.startLine;
		currNodeLocation.endOffset = newLocationInfo.endOffset;
		currNodeLocation.endColumn = newLocationInfo.endColumn;
		currNodeLocation.endLine = newLocationInfo.endLine;
	} else if (currNodeLocation.endOffset < newLocationInfo.endOffset === true) {
		currNodeLocation.endOffset = newLocationInfo.endOffset;
		currNodeLocation.endColumn = newLocationInfo.endColumn;
		currNodeLocation.endLine = newLocationInfo.endLine;
	}
}
function addTerminalToCst(node, token, tokenTypeName) {
	if (node.children[tokenTypeName] === void 0) node.children[tokenTypeName] = [token];
	else node.children[tokenTypeName].push(token);
}
function addNoneTerminalToCst(node, ruleName, ruleResult) {
	if (node.children[ruleName] === void 0) node.children[ruleName] = [ruleResult];
	else node.children[ruleName].push(ruleResult);
}
function expandAllNestedRuleNames(topRules, fullToShortName) {
	var result = { allRuleNames: [] };
	forEach(topRules, function(currTopRule) {
		var currTopRuleShortName = fullToShortName[currTopRule.name];
		result.allRuleNames.push(currTopRule.name);
		var namedCollectorVisitor = new NamedDSLMethodsCollectorVisitor(currTopRuleShortName);
		currTopRule.accept(namedCollectorVisitor);
		forEach(namedCollectorVisitor.result, function(_a) {
			_a.def;
			_a.key;
			var name = _a.name;
			result.allRuleNames.push(currTopRule.name + name);
		});
	});
	return result;
}
var __extends$5, NamedDSLMethodsCollectorVisitor;
var init_cst = __esmMin((() => {
	init_utils();
	init_keys();
	init_gast_public();
	init_gast_visitor_public();
	__extends$5 = (function() {
		var extendStatics = function(d, b) {
			extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
				d.__proto__ = b;
			} || function(d, b) {
				for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
			};
			return extendStatics(d, b);
		};
		return function(d, b) {
			extendStatics(d, b);
			function __() {
				this.constructor = d;
			}
			d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
		};
	})();
	NamedDSLMethodsCollectorVisitor = function(_super) {
		__extends$5(NamedDSLMethodsCollectorVisitor, _super);
		function NamedDSLMethodsCollectorVisitor(ruleIdx) {
			var _this = _super.call(this) || this;
			_this.result = [];
			_this.ruleIdx = ruleIdx;
			return _this;
		}
		NamedDSLMethodsCollectorVisitor.prototype.collectNamedDSLMethod = function(node, newNodeConstructor, methodIdx) {
			if (!isUndefined$1(node.name)) {
				var nameLessNode = void 0;
				/* istanbul ignore else */
				if (node instanceof Option || node instanceof Repetition || node instanceof RepetitionMandatory || node instanceof Alternation) nameLessNode = new newNodeConstructor({
					definition: node.definition,
					idx: node.idx
				});
				else if (node instanceof RepetitionMandatoryWithSeparator || node instanceof RepetitionWithSeparator) nameLessNode = new newNodeConstructor({
					definition: node.definition,
					idx: node.idx,
					separator: node.separator
				});
				else throw Error("non exhaustive match");
				var def = [nameLessNode];
				var key = getKeyForAutomaticLookahead(this.ruleIdx, methodIdx, node.idx);
				this.result.push({
					def,
					key,
					name: node.name,
					orgProd: node
				});
			}
		};
		NamedDSLMethodsCollectorVisitor.prototype.visitOption = function(node) {
			this.collectNamedDSLMethod(node, Option, 512);
		};
		NamedDSLMethodsCollectorVisitor.prototype.visitRepetition = function(node) {
			this.collectNamedDSLMethod(node, Repetition, 768);
		};
		NamedDSLMethodsCollectorVisitor.prototype.visitRepetitionMandatory = function(node) {
			this.collectNamedDSLMethod(node, RepetitionMandatory, AT_LEAST_ONE_IDX);
		};
		NamedDSLMethodsCollectorVisitor.prototype.visitRepetitionMandatoryWithSeparator = function(node) {
			this.collectNamedDSLMethod(node, RepetitionMandatoryWithSeparator, AT_LEAST_ONE_SEP_IDX);
		};
		NamedDSLMethodsCollectorVisitor.prototype.visitRepetitionWithSeparator = function(node) {
			this.collectNamedDSLMethod(node, RepetitionWithSeparator, MANY_SEP_IDX);
		};
		NamedDSLMethodsCollectorVisitor.prototype.visitAlternation = function(node) {
			var _this = this;
			this.collectNamedDSLMethod(node, Alternation, 256);
			var hasMoreThanOneAlternative = node.definition.length > 1;
			forEach(node.definition, function(currFlatAlt, altIdx) {
				if (!isUndefined$1(currFlatAlt.name)) {
					var def = currFlatAlt.definition;
					if (hasMoreThanOneAlternative) def = [new Option({ definition: currFlatAlt.definition })];
					else def = currFlatAlt.definition;
					var key = getKeyForAltIndex(_this.ruleIdx, 256, node.idx, altIdx);
					_this.result.push({
						def,
						key,
						name: currFlatAlt.name,
						orgProd: currFlatAlt
					});
				}
			});
		};
		return NamedDSLMethodsCollectorVisitor;
	}(GAstVisitor);
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/grammar/interpreter.js
function possiblePathsFrom(targetDef, maxLength, currPath) {
	if (currPath === void 0) currPath = [];
	currPath = cloneArr(currPath);
	var result = [];
	var i = 0;
	function remainingPathWith(nextDef) {
		return nextDef.concat(drop(targetDef, i + 1));
	}
	function getAlternativesForProd(definition) {
		var alternatives = possiblePathsFrom(remainingPathWith(definition), maxLength, currPath);
		return result.concat(alternatives);
	}
	/**
	* Mandatory productions will halt the loop as the paths computed from their recursive calls will already contain the
	* following (rest) of the targetDef.
	*
	* For optional productions (Option/Repetition/...) the loop will continue to represent the paths that do not include the
	* the optional production.
	*/
	while (currPath.length < maxLength && i < targetDef.length) {
		var prod = targetDef[i];
		/* istanbul ignore else */
		if (prod instanceof Flat) return getAlternativesForProd(prod.definition);
		else if (prod instanceof NonTerminal) return getAlternativesForProd(prod.definition);
		else if (prod instanceof Option) result = getAlternativesForProd(prod.definition);
		else if (prod instanceof RepetitionMandatory) {
			var newDef = prod.definition.concat([new Repetition({ definition: prod.definition })]);
			return getAlternativesForProd(newDef);
		} else if (prod instanceof RepetitionMandatoryWithSeparator) {
			var newDef = [new Flat({ definition: prod.definition }), new Repetition({ definition: [new Terminal({ terminalType: prod.separator })].concat(prod.definition) })];
			return getAlternativesForProd(newDef);
		} else if (prod instanceof RepetitionWithSeparator) {
			var newDef = prod.definition.concat([new Repetition({ definition: [new Terminal({ terminalType: prod.separator })].concat(prod.definition) })]);
			result = getAlternativesForProd(newDef);
		} else if (prod instanceof Repetition) {
			var newDef = prod.definition.concat([new Repetition({ definition: prod.definition })]);
			result = getAlternativesForProd(newDef);
		} else if (prod instanceof Alternation) {
			forEach(prod.definition, function(currAlt) {
				result = getAlternativesForProd(currAlt.definition);
			});
			return result;
		} else if (prod instanceof Terminal) currPath.push(prod.terminalType);
		else throw Error("non exhaustive match");
		i++;
	}
	result.push({
		partialPath: currPath,
		suffixDef: drop(targetDef, i)
	});
	return result;
}
function nextPossibleTokensAfter(initialDef, tokenVector, tokMatcher, maxLookAhead) {
	var EXIT_NON_TERMINAL = "EXIT_NONE_TERMINAL";
	var EXIT_NON_TERMINAL_ARR = [EXIT_NON_TERMINAL];
	var EXIT_ALTERNATIVE = "EXIT_ALTERNATIVE";
	var foundCompletePath = false;
	var tokenVectorLength = tokenVector.length;
	var minimalAlternativesIndex = tokenVectorLength - maxLookAhead - 1;
	var result = [];
	var possiblePaths = [];
	possiblePaths.push({
		idx: -1,
		def: initialDef,
		ruleStack: [],
		occurrenceStack: []
	});
	while (!isEmpty(possiblePaths)) {
		var currPath = possiblePaths.pop();
		if (currPath === EXIT_ALTERNATIVE) {
			if (foundCompletePath && last(possiblePaths).idx <= minimalAlternativesIndex) possiblePaths.pop();
			continue;
		}
		var currDef = currPath.def;
		var currIdx = currPath.idx;
		var currRuleStack = currPath.ruleStack;
		var currOccurrenceStack = currPath.occurrenceStack;
		if (isEmpty(currDef)) continue;
		var prod = currDef[0];
		/* istanbul ignore else */
		if (prod === EXIT_NON_TERMINAL) {
			var nextPath = {
				idx: currIdx,
				def: drop(currDef),
				ruleStack: dropRight(currRuleStack),
				occurrenceStack: dropRight(currOccurrenceStack)
			};
			possiblePaths.push(nextPath);
		} else if (prod instanceof Terminal)
 /* istanbul ignore else */
		if (currIdx < tokenVectorLength - 1) {
			var nextIdx = currIdx + 1;
			var actualToken = tokenVector[nextIdx];
			if (tokMatcher(actualToken, prod.terminalType)) {
				var nextPath = {
					idx: nextIdx,
					def: drop(currDef),
					ruleStack: currRuleStack,
					occurrenceStack: currOccurrenceStack
				};
				possiblePaths.push(nextPath);
			}
		} else if (currIdx === tokenVectorLength - 1) {
			result.push({
				nextTokenType: prod.terminalType,
				nextTokenOccurrence: prod.idx,
				ruleStack: currRuleStack,
				occurrenceStack: currOccurrenceStack
			});
			foundCompletePath = true;
		} else throw Error("non exhaustive match");
		else if (prod instanceof NonTerminal) {
			var newRuleStack = cloneArr(currRuleStack);
			newRuleStack.push(prod.nonTerminalName);
			var newOccurrenceStack = cloneArr(currOccurrenceStack);
			newOccurrenceStack.push(prod.idx);
			var nextPath = {
				idx: currIdx,
				def: prod.definition.concat(EXIT_NON_TERMINAL_ARR, drop(currDef)),
				ruleStack: newRuleStack,
				occurrenceStack: newOccurrenceStack
			};
			possiblePaths.push(nextPath);
		} else if (prod instanceof Option) {
			var nextPathWithout = {
				idx: currIdx,
				def: drop(currDef),
				ruleStack: currRuleStack,
				occurrenceStack: currOccurrenceStack
			};
			possiblePaths.push(nextPathWithout);
			possiblePaths.push(EXIT_ALTERNATIVE);
			var nextPathWith = {
				idx: currIdx,
				def: prod.definition.concat(drop(currDef)),
				ruleStack: currRuleStack,
				occurrenceStack: currOccurrenceStack
			};
			possiblePaths.push(nextPathWith);
		} else if (prod instanceof RepetitionMandatory) {
			var secondIteration = new Repetition({
				definition: prod.definition,
				idx: prod.idx
			});
			var nextDef = prod.definition.concat([secondIteration], drop(currDef));
			var nextPath = {
				idx: currIdx,
				def: nextDef,
				ruleStack: currRuleStack,
				occurrenceStack: currOccurrenceStack
			};
			possiblePaths.push(nextPath);
		} else if (prod instanceof RepetitionMandatoryWithSeparator) {
			var separatorGast = new Terminal({ terminalType: prod.separator });
			var secondIteration = new Repetition({
				definition: [separatorGast].concat(prod.definition),
				idx: prod.idx
			});
			var nextDef = prod.definition.concat([secondIteration], drop(currDef));
			var nextPath = {
				idx: currIdx,
				def: nextDef,
				ruleStack: currRuleStack,
				occurrenceStack: currOccurrenceStack
			};
			possiblePaths.push(nextPath);
		} else if (prod instanceof RepetitionWithSeparator) {
			var nextPathWithout = {
				idx: currIdx,
				def: drop(currDef),
				ruleStack: currRuleStack,
				occurrenceStack: currOccurrenceStack
			};
			possiblePaths.push(nextPathWithout);
			possiblePaths.push(EXIT_ALTERNATIVE);
			var separatorGast = new Terminal({ terminalType: prod.separator });
			var nthRepetition = new Repetition({
				definition: [separatorGast].concat(prod.definition),
				idx: prod.idx
			});
			var nextDef = prod.definition.concat([nthRepetition], drop(currDef));
			var nextPathWith = {
				idx: currIdx,
				def: nextDef,
				ruleStack: currRuleStack,
				occurrenceStack: currOccurrenceStack
			};
			possiblePaths.push(nextPathWith);
		} else if (prod instanceof Repetition) {
			var nextPathWithout = {
				idx: currIdx,
				def: drop(currDef),
				ruleStack: currRuleStack,
				occurrenceStack: currOccurrenceStack
			};
			possiblePaths.push(nextPathWithout);
			possiblePaths.push(EXIT_ALTERNATIVE);
			var nthRepetition = new Repetition({
				definition: prod.definition,
				idx: prod.idx
			});
			var nextDef = prod.definition.concat([nthRepetition], drop(currDef));
			var nextPathWith = {
				idx: currIdx,
				def: nextDef,
				ruleStack: currRuleStack,
				occurrenceStack: currOccurrenceStack
			};
			possiblePaths.push(nextPathWith);
		} else if (prod instanceof Alternation) for (var i = prod.definition.length - 1; i >= 0; i--) {
			var currAltPath = {
				idx: currIdx,
				def: prod.definition[i].definition.concat(drop(currDef)),
				ruleStack: currRuleStack,
				occurrenceStack: currOccurrenceStack
			};
			possiblePaths.push(currAltPath);
			possiblePaths.push(EXIT_ALTERNATIVE);
		}
		else if (prod instanceof Flat) possiblePaths.push({
			idx: currIdx,
			def: prod.definition.concat(drop(currDef)),
			ruleStack: currRuleStack,
			occurrenceStack: currOccurrenceStack
		});
		else if (prod instanceof Rule$1) possiblePaths.push(expandTopLevelRule(prod, currIdx, currRuleStack, currOccurrenceStack));
		else throw Error("non exhaustive match");
	}
	return result;
}
function expandTopLevelRule(topRule, currIdx, currRuleStack, currOccurrenceStack) {
	var newRuleStack = cloneArr(currRuleStack);
	newRuleStack.push(topRule.name);
	var newCurrOccurrenceStack = cloneArr(currOccurrenceStack);
	newCurrOccurrenceStack.push(1);
	return {
		idx: currIdx,
		def: topRule.definition,
		ruleStack: newRuleStack,
		occurrenceStack: newCurrOccurrenceStack
	};
}
var __extends$4, AbstractNextPossibleTokensWalker, NextAfterTokenWalker, AbstractNextTerminalAfterProductionWalker, NextTerminalAfterManyWalker, NextTerminalAfterManySepWalker, NextTerminalAfterAtLeastOneWalker, NextTerminalAfterAtLeastOneSepWalker;
var init_interpreter = __esmMin((() => {
	init_rest();
	init_utils();
	init_first();
	init_gast_public();
	__extends$4 = (function() {
		var extendStatics = function(d, b) {
			extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
				d.__proto__ = b;
			} || function(d, b) {
				for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
			};
			return extendStatics(d, b);
		};
		return function(d, b) {
			extendStatics(d, b);
			function __() {
				this.constructor = d;
			}
			d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
		};
	})();
	AbstractNextPossibleTokensWalker = function(_super) {
		__extends$4(AbstractNextPossibleTokensWalker, _super);
		function AbstractNextPossibleTokensWalker(topProd, path) {
			var _this = _super.call(this) || this;
			_this.topProd = topProd;
			_this.path = path;
			_this.possibleTokTypes = [];
			_this.nextProductionName = "";
			_this.nextProductionOccurrence = 0;
			_this.found = false;
			_this.isAtEndOfPath = false;
			return _this;
		}
		AbstractNextPossibleTokensWalker.prototype.startWalking = function() {
			this.found = false;
			if (this.path.ruleStack[0] !== this.topProd.name) throw Error("The path does not start with the walker's top Rule!");
			this.ruleStack = cloneArr(this.path.ruleStack).reverse();
			this.occurrenceStack = cloneArr(this.path.occurrenceStack).reverse();
			this.ruleStack.pop();
			this.occurrenceStack.pop();
			this.updateExpectedNext();
			this.walk(this.topProd);
			return this.possibleTokTypes;
		};
		AbstractNextPossibleTokensWalker.prototype.walk = function(prod, prevRest) {
			if (prevRest === void 0) prevRest = [];
			if (!this.found) _super.prototype.walk.call(this, prod, prevRest);
		};
		AbstractNextPossibleTokensWalker.prototype.walkProdRef = function(refProd, currRest, prevRest) {
			if (refProd.referencedRule.name === this.nextProductionName && refProd.idx === this.nextProductionOccurrence) {
				var fullRest = currRest.concat(prevRest);
				this.updateExpectedNext();
				this.walk(refProd.referencedRule, fullRest);
			}
		};
		AbstractNextPossibleTokensWalker.prototype.updateExpectedNext = function() {
			if (isEmpty(this.ruleStack)) {
				this.nextProductionName = "";
				this.nextProductionOccurrence = 0;
				this.isAtEndOfPath = true;
			} else {
				this.nextProductionName = this.ruleStack.pop();
				this.nextProductionOccurrence = this.occurrenceStack.pop();
			}
		};
		return AbstractNextPossibleTokensWalker;
	}(RestWalker);
	NextAfterTokenWalker = function(_super) {
		__extends$4(NextAfterTokenWalker, _super);
		function NextAfterTokenWalker(topProd, path) {
			var _this = _super.call(this, topProd, path) || this;
			_this.path = path;
			_this.nextTerminalName = "";
			_this.nextTerminalOccurrence = 0;
			_this.nextTerminalName = _this.path.lastTok.name;
			_this.nextTerminalOccurrence = _this.path.lastTokOccurrence;
			return _this;
		}
		NextAfterTokenWalker.prototype.walkTerminal = function(terminal, currRest, prevRest) {
			if (this.isAtEndOfPath && terminal.terminalType.name === this.nextTerminalName && terminal.idx === this.nextTerminalOccurrence && !this.found) {
				this.possibleTokTypes = first(new Flat({ definition: currRest.concat(prevRest) }));
				this.found = true;
			}
		};
		return NextAfterTokenWalker;
	}(AbstractNextPossibleTokensWalker);
	AbstractNextTerminalAfterProductionWalker = function(_super) {
		__extends$4(AbstractNextTerminalAfterProductionWalker, _super);
		function AbstractNextTerminalAfterProductionWalker(topRule, occurrence) {
			var _this = _super.call(this) || this;
			_this.topRule = topRule;
			_this.occurrence = occurrence;
			_this.result = {
				token: void 0,
				occurrence: void 0,
				isEndOfRule: void 0
			};
			return _this;
		}
		AbstractNextTerminalAfterProductionWalker.prototype.startWalking = function() {
			this.walk(this.topRule);
			return this.result;
		};
		return AbstractNextTerminalAfterProductionWalker;
	}(RestWalker);
	NextTerminalAfterManyWalker = function(_super) {
		__extends$4(NextTerminalAfterManyWalker, _super);
		function NextTerminalAfterManyWalker() {
			return _super !== null && _super.apply(this, arguments) || this;
		}
		NextTerminalAfterManyWalker.prototype.walkMany = function(manyProd, currRest, prevRest) {
			if (manyProd.idx === this.occurrence) {
				var firstAfterMany = first$1(currRest.concat(prevRest));
				this.result.isEndOfRule = firstAfterMany === void 0;
				if (firstAfterMany instanceof Terminal) {
					this.result.token = firstAfterMany.terminalType;
					this.result.occurrence = firstAfterMany.idx;
				}
			} else _super.prototype.walkMany.call(this, manyProd, currRest, prevRest);
		};
		return NextTerminalAfterManyWalker;
	}(AbstractNextTerminalAfterProductionWalker);
	NextTerminalAfterManySepWalker = function(_super) {
		__extends$4(NextTerminalAfterManySepWalker, _super);
		function NextTerminalAfterManySepWalker() {
			return _super !== null && _super.apply(this, arguments) || this;
		}
		NextTerminalAfterManySepWalker.prototype.walkManySep = function(manySepProd, currRest, prevRest) {
			if (manySepProd.idx === this.occurrence) {
				var firstAfterManySep = first$1(currRest.concat(prevRest));
				this.result.isEndOfRule = firstAfterManySep === void 0;
				if (firstAfterManySep instanceof Terminal) {
					this.result.token = firstAfterManySep.terminalType;
					this.result.occurrence = firstAfterManySep.idx;
				}
			} else _super.prototype.walkManySep.call(this, manySepProd, currRest, prevRest);
		};
		return NextTerminalAfterManySepWalker;
	}(AbstractNextTerminalAfterProductionWalker);
	NextTerminalAfterAtLeastOneWalker = function(_super) {
		__extends$4(NextTerminalAfterAtLeastOneWalker, _super);
		function NextTerminalAfterAtLeastOneWalker() {
			return _super !== null && _super.apply(this, arguments) || this;
		}
		NextTerminalAfterAtLeastOneWalker.prototype.walkAtLeastOne = function(atLeastOneProd, currRest, prevRest) {
			if (atLeastOneProd.idx === this.occurrence) {
				var firstAfterAtLeastOne = first$1(currRest.concat(prevRest));
				this.result.isEndOfRule = firstAfterAtLeastOne === void 0;
				if (firstAfterAtLeastOne instanceof Terminal) {
					this.result.token = firstAfterAtLeastOne.terminalType;
					this.result.occurrence = firstAfterAtLeastOne.idx;
				}
			} else _super.prototype.walkAtLeastOne.call(this, atLeastOneProd, currRest, prevRest);
		};
		return NextTerminalAfterAtLeastOneWalker;
	}(AbstractNextTerminalAfterProductionWalker);
	NextTerminalAfterAtLeastOneSepWalker = function(_super) {
		__extends$4(NextTerminalAfterAtLeastOneSepWalker, _super);
		function NextTerminalAfterAtLeastOneSepWalker() {
			return _super !== null && _super.apply(this, arguments) || this;
		}
		NextTerminalAfterAtLeastOneSepWalker.prototype.walkAtLeastOneSep = function(atleastOneSepProd, currRest, prevRest) {
			if (atleastOneSepProd.idx === this.occurrence) {
				var firstAfterfirstAfterAtLeastOneSep = first$1(currRest.concat(prevRest));
				this.result.isEndOfRule = firstAfterfirstAfterAtLeastOneSep === void 0;
				if (firstAfterfirstAfterAtLeastOneSep instanceof Terminal) {
					this.result.token = firstAfterfirstAfterAtLeastOneSep.terminalType;
					this.result.occurrence = firstAfterfirstAfterAtLeastOneSep.idx;
				}
			} else _super.prototype.walkAtLeastOneSep.call(this, atleastOneSepProd, currRest, prevRest);
		};
		return NextTerminalAfterAtLeastOneSepWalker;
	}(AbstractNextTerminalAfterProductionWalker);
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/grammar/lookahead.js
function getProdType(prod) {
	/* istanbul ignore else */
	if (prod instanceof Option) return PROD_TYPE.OPTION;
	else if (prod instanceof Repetition) return PROD_TYPE.REPETITION;
	else if (prod instanceof RepetitionMandatory) return PROD_TYPE.REPETITION_MANDATORY;
	else if (prod instanceof RepetitionMandatoryWithSeparator) return PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR;
	else if (prod instanceof RepetitionWithSeparator) return PROD_TYPE.REPETITION_WITH_SEPARATOR;
	else if (prod instanceof Alternation) return PROD_TYPE.ALTERNATION;
	else throw Error("non exhaustive match");
}
function buildLookaheadFuncForOr(occurrence, ruleGrammar, maxLookahead, hasPredicates, dynamicTokensEnabled, laFuncBuilder) {
	var lookAheadPaths = getLookaheadPathsForOr(occurrence, ruleGrammar, maxLookahead);
	return laFuncBuilder(lookAheadPaths, hasPredicates, areTokenCategoriesNotUsed(lookAheadPaths) ? tokenStructuredMatcherNoCategories : tokenStructuredMatcher, dynamicTokensEnabled);
}
/**
*  When dealing with an Optional production (OPTION/MANY/2nd iteration of AT_LEAST_ONE/...) we need to compare
*  the lookahead "inside" the production and the lookahead immediately "after" it in the same top level rule (context free).
*
*  Example: given a production:
*  ABC(DE)?DF
*
*  The optional '(DE)?' should only be entered if we see 'DE'. a single Token 'D' is not sufficient to distinguish between the two
*  alternatives.
*
*  @returns A Lookahead function which will return true IFF the parser should parse the Optional production.
*/
function buildLookaheadFuncForOptionalProd(occurrence, ruleGrammar, k, dynamicTokensEnabled, prodType, lookaheadBuilder) {
	var lookAheadPaths = getLookaheadPathsForOptionalProd(occurrence, ruleGrammar, prodType, k);
	var tokenMatcher = areTokenCategoriesNotUsed(lookAheadPaths) ? tokenStructuredMatcherNoCategories : tokenStructuredMatcher;
	return lookaheadBuilder(lookAheadPaths[0], tokenMatcher, dynamicTokensEnabled);
}
function buildAlternativesLookAheadFunc(alts, hasPredicates, tokenMatcher, dynamicTokensEnabled) {
	var numOfAlts = alts.length;
	var areAllOneTokenLookahead = every(alts, function(currAlt) {
		return every(currAlt, function(currPath) {
			return currPath.length === 1;
		});
	});
	if (hasPredicates)
 /**
	* @returns {number} - The chosen alternative index
	*/
	return function(orAlts) {
		var predicates = map$3(orAlts, function(currAlt) {
			return currAlt.GATE;
		});
		for (var t = 0; t < numOfAlts; t++) {
			var currAlt = alts[t];
			var currNumOfPaths = currAlt.length;
			var currPredicate = predicates[t];
			if (currPredicate !== void 0 && currPredicate.call(this) === false) continue;
			nextPath: for (var j = 0; j < currNumOfPaths; j++) {
				var currPath = currAlt[j];
				var currPathLength = currPath.length;
				for (var i = 0; i < currPathLength; i++) if (tokenMatcher(this.LA(i + 1), currPath[i]) === false) continue nextPath;
				return t;
			}
		}
	};
	else if (areAllOneTokenLookahead && !dynamicTokensEnabled) {
		var choiceToAlt_1 = reduce(map$3(alts, function(currAlt) {
			return flatten(currAlt);
		}), function(result, currAlt, idx) {
			forEach(currAlt, function(currTokType) {
				if (!has(result, currTokType.tokenTypeIdx)) result[currTokType.tokenTypeIdx] = idx;
				forEach(currTokType.categoryMatches, function(currExtendingType) {
					if (!has(result, currExtendingType)) result[currExtendingType] = idx;
				});
			});
			return result;
		}, []);
		/**
		* @returns {number} - The chosen alternative index
		*/
		return function() {
			return choiceToAlt_1[this.LA(1).tokenTypeIdx];
		};
	} else
 /**
	* @returns {number} - The chosen alternative index
	*/
	return function() {
		for (var t = 0; t < numOfAlts; t++) {
			var currAlt = alts[t];
			var currNumOfPaths = currAlt.length;
			nextPath: for (var j = 0; j < currNumOfPaths; j++) {
				var currPath = currAlt[j];
				var currPathLength = currPath.length;
				for (var i = 0; i < currPathLength; i++) if (tokenMatcher(this.LA(i + 1), currPath[i]) === false) continue nextPath;
				return t;
			}
		}
	};
}
function buildSingleAlternativeLookaheadFunction(alt, tokenMatcher, dynamicTokensEnabled) {
	var areAllOneTokenLookahead = every(alt, function(currPath) {
		return currPath.length === 1;
	});
	var numOfPaths = alt.length;
	if (areAllOneTokenLookahead && !dynamicTokensEnabled) {
		var singleTokensTypes = flatten(alt);
		if (singleTokensTypes.length === 1 && isEmpty(singleTokensTypes[0].categoryMatches)) {
			var expectedTokenUniqueKey_1 = singleTokensTypes[0].tokenTypeIdx;
			return function() {
				return this.LA(1).tokenTypeIdx === expectedTokenUniqueKey_1;
			};
		} else {
			var choiceToAlt_2 = reduce(singleTokensTypes, function(result, currTokType, idx) {
				result[currTokType.tokenTypeIdx] = true;
				forEach(currTokType.categoryMatches, function(currExtendingType) {
					result[currExtendingType] = true;
				});
				return result;
			}, []);
			return function() {
				return choiceToAlt_2[this.LA(1).tokenTypeIdx] === true;
			};
		}
	} else return function() {
		nextPath: for (var j = 0; j < numOfPaths; j++) {
			var currPath = alt[j];
			var currPathLength = currPath.length;
			for (var i = 0; i < currPathLength; i++) if (tokenMatcher(this.LA(i + 1), currPath[i]) === false) continue nextPath;
			return true;
		}
		return false;
	};
}
function initializeArrayOfArrays(size) {
	var result = new Array(size);
	for (var i = 0; i < size; i++) result[i] = [];
	return result;
}
/**
* A sort of hash function between a Path in the grammar and a string.
* Note that this returns multiple "hashes" to support the scenario of token categories.
* -  A single path with categories may match multiple **actual** paths.
*/
function pathToHashKeys(path) {
	var keys = [""];
	for (var i = 0; i < path.length; i++) {
		var tokType = path[i];
		var longerKeys = [];
		for (var j = 0; j < keys.length; j++) {
			var currShorterKey = keys[j];
			longerKeys.push(currShorterKey + "_" + tokType.tokenTypeIdx);
			for (var t = 0; t < tokType.categoryMatches.length; t++) {
				var categoriesKeySuffix = "_" + tokType.categoryMatches[t];
				longerKeys.push(currShorterKey + categoriesKeySuffix);
			}
		}
		keys = longerKeys;
	}
	return keys;
}
/**
* Imperative style due to being called from a hot spot
*/
function isUniquePrefixHash(altKnownPathsKeys, searchPathKeys, idx) {
	for (var currAltIdx = 0; currAltIdx < altKnownPathsKeys.length; currAltIdx++) {
		if (currAltIdx === idx) continue;
		var otherAltKnownPathsKeys = altKnownPathsKeys[currAltIdx];
		for (var searchIdx = 0; searchIdx < searchPathKeys.length; searchIdx++) if (otherAltKnownPathsKeys[searchPathKeys[searchIdx]] === true) return false;
	}
	return true;
}
function lookAheadSequenceFromAlternatives(altsDefs, k) {
	var partialAlts = map$3(altsDefs, function(currAlt) {
		return possiblePathsFrom([currAlt], 1);
	});
	var finalResult = initializeArrayOfArrays(partialAlts.length);
	var altsHashes = map$3(partialAlts, function(currAltPaths) {
		var dict = {};
		forEach(currAltPaths, function(item) {
			forEach(pathToHashKeys(item.partialPath), function(currKey) {
				dict[currKey] = true;
			});
		});
		return dict;
	});
	var newData = partialAlts;
	for (var pathLength = 1; pathLength <= k; pathLength++) {
		var currDataset = newData;
		newData = initializeArrayOfArrays(currDataset.length);
		var _loop_1 = function(altIdx) {
			var currAltPathsAndSuffixes = currDataset[altIdx];
			for (var currPathIdx = 0; currPathIdx < currAltPathsAndSuffixes.length; currPathIdx++) {
				var currPathPrefix = currAltPathsAndSuffixes[currPathIdx].partialPath;
				var suffixDef = currAltPathsAndSuffixes[currPathIdx].suffixDef;
				var prefixKeys = pathToHashKeys(currPathPrefix);
				if (isUniquePrefixHash(altsHashes, prefixKeys, altIdx) || isEmpty(suffixDef) || currPathPrefix.length === k) {
					var currAltResult = finalResult[altIdx];
					if (containsPath(currAltResult, currPathPrefix) === false) {
						currAltResult.push(currPathPrefix);
						for (var j = 0; j < prefixKeys.length; j++) {
							var currKey = prefixKeys[j];
							altsHashes[altIdx][currKey] = true;
						}
					}
				} else {
					var newPartialPathsAndSuffixes = possiblePathsFrom(suffixDef, pathLength + 1, currPathPrefix);
					newData[altIdx] = newData[altIdx].concat(newPartialPathsAndSuffixes);
					forEach(newPartialPathsAndSuffixes, function(item) {
						forEach(pathToHashKeys(item.partialPath), function(key) {
							altsHashes[altIdx][key] = true;
						});
					});
				}
			}
		};
		for (var altIdx = 0; altIdx < currDataset.length; altIdx++) _loop_1(altIdx);
	}
	return finalResult;
}
function getLookaheadPathsForOr(occurrence, ruleGrammar, k, orProd) {
	var visitor = new InsideDefinitionFinderVisitor(occurrence, PROD_TYPE.ALTERNATION, orProd);
	ruleGrammar.accept(visitor);
	return lookAheadSequenceFromAlternatives(visitor.result, k);
}
function getLookaheadPathsForOptionalProd(occurrence, ruleGrammar, prodType, k) {
	var insideDefVisitor = new InsideDefinitionFinderVisitor(occurrence, prodType);
	ruleGrammar.accept(insideDefVisitor);
	var insideDef = insideDefVisitor.result;
	var afterDef = new RestDefinitionFinderWalker(ruleGrammar, occurrence, prodType).startWalking();
	return lookAheadSequenceFromAlternatives([new Flat({ definition: insideDef }), new Flat({ definition: afterDef })], k);
}
function containsPath(alternative, searchPath) {
	compareOtherPath: for (var i = 0; i < alternative.length; i++) {
		var otherPath = alternative[i];
		if (otherPath.length !== searchPath.length) continue;
		for (var j = 0; j < otherPath.length; j++) {
			var searchTok = searchPath[j];
			var otherTok = otherPath[j];
			if ((searchTok === otherTok || otherTok.categoryMatchesMap[searchTok.tokenTypeIdx] !== void 0) === false) continue compareOtherPath;
		}
		return true;
	}
	return false;
}
function isStrictPrefixOfPath(prefix, other) {
	return prefix.length < other.length && every(prefix, function(tokType, idx) {
		var otherTokType = other[idx];
		return tokType === otherTokType || otherTokType.categoryMatchesMap[tokType.tokenTypeIdx];
	});
}
function areTokenCategoriesNotUsed(lookAheadPaths) {
	return every(lookAheadPaths, function(singleAltPaths) {
		return every(singleAltPaths, function(singlePath) {
			return every(singlePath, function(token) {
				return isEmpty(token.categoryMatches);
			});
		});
	});
}
var __extends$3, PROD_TYPE, RestDefinitionFinderWalker, InsideDefinitionFinderVisitor;
var init_lookahead = __esmMin((() => {
	init_utils();
	init_interpreter();
	init_rest();
	init_tokens();
	init_gast_public();
	init_gast_visitor_public();
	__extends$3 = (function() {
		var extendStatics = function(d, b) {
			extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
				d.__proto__ = b;
			} || function(d, b) {
				for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
			};
			return extendStatics(d, b);
		};
		return function(d, b) {
			extendStatics(d, b);
			function __() {
				this.constructor = d;
			}
			d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
		};
	})();
	(function(PROD_TYPE) {
		PROD_TYPE[PROD_TYPE["OPTION"] = 0] = "OPTION";
		PROD_TYPE[PROD_TYPE["REPETITION"] = 1] = "REPETITION";
		PROD_TYPE[PROD_TYPE["REPETITION_MANDATORY"] = 2] = "REPETITION_MANDATORY";
		PROD_TYPE[PROD_TYPE["REPETITION_MANDATORY_WITH_SEPARATOR"] = 3] = "REPETITION_MANDATORY_WITH_SEPARATOR";
		PROD_TYPE[PROD_TYPE["REPETITION_WITH_SEPARATOR"] = 4] = "REPETITION_WITH_SEPARATOR";
		PROD_TYPE[PROD_TYPE["ALTERNATION"] = 5] = "ALTERNATION";
	})(PROD_TYPE || (PROD_TYPE = {}));
	RestDefinitionFinderWalker = function(_super) {
		__extends$3(RestDefinitionFinderWalker, _super);
		function RestDefinitionFinderWalker(topProd, targetOccurrence, targetProdType) {
			var _this = _super.call(this) || this;
			_this.topProd = topProd;
			_this.targetOccurrence = targetOccurrence;
			_this.targetProdType = targetProdType;
			return _this;
		}
		RestDefinitionFinderWalker.prototype.startWalking = function() {
			this.walk(this.topProd);
			return this.restDef;
		};
		RestDefinitionFinderWalker.prototype.checkIsTarget = function(node, expectedProdType, currRest, prevRest) {
			if (node.idx === this.targetOccurrence && this.targetProdType === expectedProdType) {
				this.restDef = currRest.concat(prevRest);
				return true;
			}
			return false;
		};
		RestDefinitionFinderWalker.prototype.walkOption = function(optionProd, currRest, prevRest) {
			if (!this.checkIsTarget(optionProd, PROD_TYPE.OPTION, currRest, prevRest)) _super.prototype.walkOption.call(this, optionProd, currRest, prevRest);
		};
		RestDefinitionFinderWalker.prototype.walkAtLeastOne = function(atLeastOneProd, currRest, prevRest) {
			if (!this.checkIsTarget(atLeastOneProd, PROD_TYPE.REPETITION_MANDATORY, currRest, prevRest)) _super.prototype.walkOption.call(this, atLeastOneProd, currRest, prevRest);
		};
		RestDefinitionFinderWalker.prototype.walkAtLeastOneSep = function(atLeastOneSepProd, currRest, prevRest) {
			if (!this.checkIsTarget(atLeastOneSepProd, PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR, currRest, prevRest)) _super.prototype.walkOption.call(this, atLeastOneSepProd, currRest, prevRest);
		};
		RestDefinitionFinderWalker.prototype.walkMany = function(manyProd, currRest, prevRest) {
			if (!this.checkIsTarget(manyProd, PROD_TYPE.REPETITION, currRest, prevRest)) _super.prototype.walkOption.call(this, manyProd, currRest, prevRest);
		};
		RestDefinitionFinderWalker.prototype.walkManySep = function(manySepProd, currRest, prevRest) {
			if (!this.checkIsTarget(manySepProd, PROD_TYPE.REPETITION_WITH_SEPARATOR, currRest, prevRest)) _super.prototype.walkOption.call(this, manySepProd, currRest, prevRest);
		};
		return RestDefinitionFinderWalker;
	}(RestWalker);
	InsideDefinitionFinderVisitor = function(_super) {
		__extends$3(InsideDefinitionFinderVisitor, _super);
		function InsideDefinitionFinderVisitor(targetOccurrence, targetProdType, targetRef) {
			var _this = _super.call(this) || this;
			_this.targetOccurrence = targetOccurrence;
			_this.targetProdType = targetProdType;
			_this.targetRef = targetRef;
			_this.result = [];
			return _this;
		}
		InsideDefinitionFinderVisitor.prototype.checkIsTarget = function(node, expectedProdName) {
			if (node.idx === this.targetOccurrence && this.targetProdType === expectedProdName && (this.targetRef === void 0 || node === this.targetRef)) this.result = node.definition;
		};
		InsideDefinitionFinderVisitor.prototype.visitOption = function(node) {
			this.checkIsTarget(node, PROD_TYPE.OPTION);
		};
		InsideDefinitionFinderVisitor.prototype.visitRepetition = function(node) {
			this.checkIsTarget(node, PROD_TYPE.REPETITION);
		};
		InsideDefinitionFinderVisitor.prototype.visitRepetitionMandatory = function(node) {
			this.checkIsTarget(node, PROD_TYPE.REPETITION_MANDATORY);
		};
		InsideDefinitionFinderVisitor.prototype.visitRepetitionMandatoryWithSeparator = function(node) {
			this.checkIsTarget(node, PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR);
		};
		InsideDefinitionFinderVisitor.prototype.visitRepetitionWithSeparator = function(node) {
			this.checkIsTarget(node, PROD_TYPE.REPETITION_WITH_SEPARATOR);
		};
		InsideDefinitionFinderVisitor.prototype.visitAlternation = function(node) {
			this.checkIsTarget(node, PROD_TYPE.ALTERNATION);
		};
		return InsideDefinitionFinderVisitor;
	}(GAstVisitor);
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/grammar/checks.js
function validateGrammar$1(topLevels, globalMaxLookahead, tokenTypes, ignoredIssues, errMsgProvider, grammarName) {
	var duplicateErrors = map$3(topLevels, function(currTopLevel) {
		return validateDuplicateProductions(currTopLevel, errMsgProvider);
	});
	var leftRecursionErrors = map$3(topLevels, function(currTopRule) {
		return validateNoLeftRecursion(currTopRule, currTopRule, errMsgProvider);
	});
	var emptyAltErrors = [];
	var ambiguousAltsErrors = [];
	var emptyRepetitionErrors = [];
	if (every(leftRecursionErrors, isEmpty)) {
		emptyAltErrors = map$3(topLevels, function(currTopRule) {
			return validateEmptyOrAlternative(currTopRule, errMsgProvider);
		});
		ambiguousAltsErrors = map$3(topLevels, function(currTopRule) {
			return validateAmbiguousAlternationAlternatives(currTopRule, globalMaxLookahead, ignoredIssues, errMsgProvider);
		});
		emptyRepetitionErrors = validateSomeNonEmptyLookaheadPath(topLevels, globalMaxLookahead, errMsgProvider);
	}
	var termsNamespaceConflictErrors = checkTerminalAndNoneTerminalsNameSpace(topLevels, tokenTypes, errMsgProvider);
	var tokenNameErrors = map$3(tokenTypes, function(currTokType) {
		return validateTokenName(currTokType, errMsgProvider);
	});
	var nestedRulesNameErrors = validateNestedRulesNames(topLevels, errMsgProvider);
	var nestedRulesDuplicateErrors = validateDuplicateNestedRules(topLevels, errMsgProvider);
	var tooManyAltsErrors = map$3(topLevels, function(curRule) {
		return validateTooManyAlts(curRule, errMsgProvider);
	});
	var ruleNameErrors = map$3(topLevels, function(curRule) {
		return validateRuleName(curRule, errMsgProvider);
	});
	var duplicateRulesError = map$3(topLevels, function(curRule) {
		return validateRuleDoesNotAlreadyExist(curRule, topLevels, grammarName, errMsgProvider);
	});
	return flatten(duplicateErrors.concat(tokenNameErrors, nestedRulesNameErrors, nestedRulesDuplicateErrors, emptyRepetitionErrors, leftRecursionErrors, emptyAltErrors, ambiguousAltsErrors, termsNamespaceConflictErrors, tooManyAltsErrors, ruleNameErrors, duplicateRulesError));
}
function validateNestedRulesNames(topLevels, errMsgProvider) {
	var result = [];
	forEach(topLevels, function(curTopLevel) {
		var namedCollectorVisitor = new NamedDSLMethodsCollectorVisitor("");
		curTopLevel.accept(namedCollectorVisitor);
		var nestedProds = map$3(namedCollectorVisitor.result, function(currItem) {
			return currItem.orgProd;
		});
		result.push(map$3(nestedProds, function(currNestedProd) {
			return validateNestedRuleName(curTopLevel, currNestedProd, errMsgProvider);
		}));
	});
	return flatten(result);
}
function validateDuplicateProductions(topLevelRule, errMsgProvider) {
	var collectorVisitor = new OccurrenceValidationCollector();
	topLevelRule.accept(collectorVisitor);
	var allRuleProductions = collectorVisitor.allProductions;
	return map$3(values(pick(groupBy(allRuleProductions, identifyProductionForDuplicates), function(currGroup) {
		return currGroup.length > 1;
	})), function(currDuplicates) {
		var firstProd = first$1(currDuplicates);
		var msg = errMsgProvider.buildDuplicateFoundError(topLevelRule, currDuplicates);
		var dslName = getProductionDslName(firstProd);
		var defError = {
			message: msg,
			type: ParserDefinitionErrorType.DUPLICATE_PRODUCTIONS,
			ruleName: topLevelRule.name,
			dslName,
			occurrence: firstProd.idx
		};
		var param = getExtraProductionArgument(firstProd);
		if (param) defError.parameter = param;
		return defError;
	});
}
function identifyProductionForDuplicates(prod) {
	return getProductionDslName(prod) + "_#_" + prod.idx + "_#_" + getExtraProductionArgument(prod);
}
function getExtraProductionArgument(prod) {
	if (prod instanceof Terminal) return prod.terminalType.name;
	else if (prod instanceof NonTerminal) return prod.nonTerminalName;
	else return "";
}
function validateRuleName(rule, errMsgProvider) {
	var errors = [];
	var ruleName = rule.name;
	if (!ruleName.match(validTermsPattern)) errors.push({
		message: errMsgProvider.buildInvalidRuleNameError({
			topLevelRule: rule,
			expectedPattern: validTermsPattern
		}),
		type: ParserDefinitionErrorType.INVALID_RULE_NAME,
		ruleName
	});
	return errors;
}
function validateNestedRuleName(topLevel, nestedProd, errMsgProvider) {
	var errors = [];
	var errMsg;
	if (!nestedProd.name.match(validNestedRuleName)) {
		errMsg = errMsgProvider.buildInvalidNestedRuleNameError(topLevel, nestedProd);
		errors.push({
			message: errMsg,
			type: ParserDefinitionErrorType.INVALID_NESTED_RULE_NAME,
			ruleName: topLevel.name
		});
	}
	return errors;
}
function validateTokenName(tokenType, errMsgProvider) {
	var errors = [];
	if (!tokenType.name.match(validTermsPattern)) errors.push({
		message: errMsgProvider.buildTokenNameError({
			tokenType,
			expectedPattern: validTermsPattern
		}),
		type: ParserDefinitionErrorType.INVALID_TOKEN_NAME
	});
	return errors;
}
function validateRuleDoesNotAlreadyExist(rule, allRules, className, errMsgProvider) {
	var errors = [];
	if (reduce(allRules, function(result, curRule) {
		if (curRule.name === rule.name) return result + 1;
		return result;
	}, 0) > 1) {
		var errMsg = errMsgProvider.buildDuplicateRuleNameError({
			topLevelRule: rule,
			grammarName: className
		});
		errors.push({
			message: errMsg,
			type: ParserDefinitionErrorType.DUPLICATE_RULE_NAME,
			ruleName: rule.name
		});
	}
	return errors;
}
function validateRuleIsOverridden(ruleName, definedRulesNames, className) {
	var errors = [];
	var errMsg;
	if (!contains(definedRulesNames, ruleName)) {
		errMsg = "Invalid rule override, rule: ->" + ruleName + "<- cannot be overridden in the grammar: ->" + className + "<-as it is not defined in any of the super grammars ";
		errors.push({
			message: errMsg,
			type: ParserDefinitionErrorType.INVALID_RULE_OVERRIDE,
			ruleName
		});
	}
	return errors;
}
function validateNoLeftRecursion(topRule, currRule, errMsgProvider, path) {
	if (path === void 0) path = [];
	var errors = [];
	var nextNonTerminals = getFirstNoneTerminal(currRule.definition);
	if (isEmpty(nextNonTerminals)) return [];
	else {
		var ruleName = topRule.name;
		if (contains(nextNonTerminals, topRule)) errors.push({
			message: errMsgProvider.buildLeftRecursionError({
				topLevelRule: topRule,
				leftRecursionPath: path
			}),
			type: ParserDefinitionErrorType.LEFT_RECURSION,
			ruleName
		});
		var errorsFromNextSteps = map$3(difference(nextNonTerminals, path.concat([topRule])), function(currRefRule) {
			var newPath = cloneArr(path);
			newPath.push(currRefRule);
			return validateNoLeftRecursion(topRule, currRefRule, errMsgProvider, newPath);
		});
		return errors.concat(flatten(errorsFromNextSteps));
	}
}
function getFirstNoneTerminal(definition) {
	var result = [];
	if (isEmpty(definition)) return result;
	var firstProd = first$1(definition);
	/* istanbul ignore else */
	if (firstProd instanceof NonTerminal) result.push(firstProd.referencedRule);
	else if (firstProd instanceof Flat || firstProd instanceof Option || firstProd instanceof RepetitionMandatory || firstProd instanceof RepetitionMandatoryWithSeparator || firstProd instanceof RepetitionWithSeparator || firstProd instanceof Repetition) result = result.concat(getFirstNoneTerminal(firstProd.definition));
	else if (firstProd instanceof Alternation) result = flatten(map$3(firstProd.definition, function(currSubDef) {
		return getFirstNoneTerminal(currSubDef.definition);
	}));
	else if (firstProd instanceof Terminal) {} else throw Error("non exhaustive match");
	var isFirstOptional = isOptionalProd(firstProd);
	var hasMore = definition.length > 1;
	if (isFirstOptional && hasMore) {
		var rest = drop(definition);
		return result.concat(getFirstNoneTerminal(rest));
	} else return result;
}
function validateEmptyOrAlternative(topLevelRule, errMsgProvider) {
	var orCollector = new OrCollector();
	topLevelRule.accept(orCollector);
	var ors = orCollector.alternations;
	return reduce(ors, function(errors, currOr) {
		var currErrors = map$3(dropRight(currOr.definition), function(currAlternative, currAltIdx) {
			if (isEmpty(nextPossibleTokensAfter([currAlternative], [], null, 1))) return {
				message: errMsgProvider.buildEmptyAlternationError({
					topLevelRule,
					alternation: currOr,
					emptyChoiceIdx: currAltIdx
				}),
				type: ParserDefinitionErrorType.NONE_LAST_EMPTY_ALT,
				ruleName: topLevelRule.name,
				occurrence: currOr.idx,
				alternative: currAltIdx + 1
			};
			else return null;
		});
		return errors.concat(compact(currErrors));
	}, []);
}
function validateAmbiguousAlternationAlternatives(topLevelRule, globalMaxLookahead, ignoredIssues, errMsgProvider) {
	var orCollector = new OrCollector();
	topLevelRule.accept(orCollector);
	var ors = orCollector.alternations;
	var ignoredIssuesForCurrentRule = ignoredIssues[topLevelRule.name];
	if (ignoredIssuesForCurrentRule) ors = reject(ors, function(currOr) {
		return ignoredIssuesForCurrentRule[getProductionDslName(currOr) + (currOr.idx === 0 ? "" : currOr.idx)];
	});
	ors = reject(ors, function(currOr) {
		return currOr.ignoreAmbiguities === true;
	});
	return reduce(ors, function(result, currOr) {
		var currOccurrence = currOr.idx;
		var alternatives = getLookaheadPathsForOr(currOccurrence, topLevelRule, currOr.maxLookahead || globalMaxLookahead, currOr);
		var altsAmbiguityErrors = checkAlternativesAmbiguities(alternatives, currOr, topLevelRule, errMsgProvider);
		var altsPrefixAmbiguityErrors = checkPrefixAlternativesAmbiguities(alternatives, currOr, topLevelRule, errMsgProvider);
		return result.concat(altsAmbiguityErrors, altsPrefixAmbiguityErrors);
	}, []);
}
function validateTooManyAlts(topLevelRule, errMsgProvider) {
	var orCollector = new OrCollector();
	topLevelRule.accept(orCollector);
	var ors = orCollector.alternations;
	return reduce(ors, function(errors, currOr) {
		if (currOr.definition.length > 255) errors.push({
			message: errMsgProvider.buildTooManyAlternativesError({
				topLevelRule,
				alternation: currOr
			}),
			type: ParserDefinitionErrorType.TOO_MANY_ALTS,
			ruleName: topLevelRule.name,
			occurrence: currOr.idx
		});
		return errors;
	}, []);
}
function validateSomeNonEmptyLookaheadPath(topLevelRules, maxLookahead, errMsgProvider) {
	var errors = [];
	forEach(topLevelRules, function(currTopRule) {
		var collectorVisitor = new RepetionCollector();
		currTopRule.accept(collectorVisitor);
		var allRuleProductions = collectorVisitor.allProductions;
		forEach(allRuleProductions, function(currProd) {
			var prodType = getProdType(currProd);
			var actualMaxLookahead = currProd.maxLookahead || maxLookahead;
			var currOccurrence = currProd.idx;
			var pathsInsideProduction = getLookaheadPathsForOptionalProd(currOccurrence, currTopRule, prodType, actualMaxLookahead)[0];
			if (isEmpty(flatten(pathsInsideProduction))) {
				var errMsg = errMsgProvider.buildEmptyRepetitionError({
					topLevelRule: currTopRule,
					repetition: currProd
				});
				errors.push({
					message: errMsg,
					type: ParserDefinitionErrorType.NO_NON_EMPTY_LOOKAHEAD,
					ruleName: currTopRule.name
				});
			}
		});
	});
	return errors;
}
function checkAlternativesAmbiguities(alternatives, alternation, rule, errMsgProvider) {
	var foundAmbiguousPaths = [];
	return map$3(reduce(alternatives, function(result, currAlt, currAltIdx) {
		if (alternation.definition[currAltIdx].ignoreAmbiguities === true) return result;
		forEach(currAlt, function(currPath) {
			var altsCurrPathAppearsIn = [currAltIdx];
			forEach(alternatives, function(currOtherAlt, currOtherAltIdx) {
				if (currAltIdx !== currOtherAltIdx && containsPath(currOtherAlt, currPath) && alternation.definition[currOtherAltIdx].ignoreAmbiguities !== true) altsCurrPathAppearsIn.push(currOtherAltIdx);
			});
			if (altsCurrPathAppearsIn.length > 1 && !containsPath(foundAmbiguousPaths, currPath)) {
				foundAmbiguousPaths.push(currPath);
				result.push({
					alts: altsCurrPathAppearsIn,
					path: currPath
				});
			}
		});
		return result;
	}, []), function(currAmbDescriptor) {
		var ambgIndices = map$3(currAmbDescriptor.alts, function(currAltIdx) {
			return currAltIdx + 1;
		});
		return {
			message: errMsgProvider.buildAlternationAmbiguityError({
				topLevelRule: rule,
				alternation,
				ambiguityIndices: ambgIndices,
				prefixPath: currAmbDescriptor.path
			}),
			type: ParserDefinitionErrorType.AMBIGUOUS_ALTS,
			ruleName: rule.name,
			occurrence: alternation.idx,
			alternatives: [currAmbDescriptor.alts]
		};
	});
}
function checkPrefixAlternativesAmbiguities(alternatives, alternation, rule, errMsgProvider) {
	var errors = [];
	var pathsAndIndices = reduce(alternatives, function(result, currAlt, idx) {
		var currPathsAndIdx = map$3(currAlt, function(currPath) {
			return {
				idx,
				path: currPath
			};
		});
		return result.concat(currPathsAndIdx);
	}, []);
	forEach(pathsAndIndices, function(currPathAndIdx) {
		if (alternation.definition[currPathAndIdx.idx].ignoreAmbiguities === true) return;
		var targetIdx = currPathAndIdx.idx;
		var targetPath = currPathAndIdx.path;
		var currPathPrefixErrors = map$3(findAll(pathsAndIndices, function(searchPathAndIdx) {
			return alternation.definition[searchPathAndIdx.idx].ignoreAmbiguities !== true && searchPathAndIdx.idx < targetIdx && isStrictPrefixOfPath(searchPathAndIdx.path, targetPath);
		}), function(currAmbPathAndIdx) {
			var ambgIndices = [currAmbPathAndIdx.idx + 1, targetIdx + 1];
			var occurrence = alternation.idx === 0 ? "" : alternation.idx;
			return {
				message: errMsgProvider.buildAlternationPrefixAmbiguityError({
					topLevelRule: rule,
					alternation,
					ambiguityIndices: ambgIndices,
					prefixPath: currAmbPathAndIdx.path
				}),
				type: ParserDefinitionErrorType.AMBIGUOUS_PREFIX_ALTS,
				ruleName: rule.name,
				occurrence,
				alternatives: ambgIndices
			};
		});
		errors = errors.concat(currPathPrefixErrors);
	});
	return errors;
}
function checkTerminalAndNoneTerminalsNameSpace(topLevels, tokenTypes, errMsgProvider) {
	var errors = [];
	var tokenNames = map$3(tokenTypes, function(currToken) {
		return currToken.name;
	});
	forEach(topLevels, function(currRule) {
		var currRuleName = currRule.name;
		if (contains(tokenNames, currRuleName)) {
			var errMsg = errMsgProvider.buildNamespaceConflictError(currRule);
			errors.push({
				message: errMsg,
				type: ParserDefinitionErrorType.CONFLICT_TOKENS_RULES_NAMESPACE,
				ruleName: currRuleName
			});
		}
	});
	return errors;
}
function validateDuplicateNestedRules(topLevelRules, errMsgProvider) {
	var errors = [];
	forEach(topLevelRules, function(currTopRule) {
		var namedCollectorVisitor = new NamedDSLMethodsCollectorVisitor("");
		currTopRule.accept(namedCollectorVisitor);
		forEach(values(pick(groupBy(namedCollectorVisitor.result, function(item) {
			return item.name;
		}), function(currGroup) {
			return currGroup.length > 1;
		})), function(currDupGroup) {
			var currDupProds = map$3(currDupGroup, function(dupGroup) {
				return dupGroup.orgProd;
			});
			var errMsg = errMsgProvider.buildDuplicateNestedRuleNameError(currTopRule, currDupProds);
			errors.push({
				message: errMsg,
				type: ParserDefinitionErrorType.DUPLICATE_NESTED_NAME,
				ruleName: currTopRule.name
			});
		});
	});
	return errors;
}
var __extends$2, OccurrenceValidationCollector, validTermsPattern, validNestedRuleName, OrCollector, RepetionCollector;
var init_checks = __esmMin((() => {
	init_utils();
	init_parser();
	init_gast();
	init_lookahead();
	init_cst();
	init_interpreter();
	init_gast_public();
	init_gast_visitor_public();
	__extends$2 = (function() {
		var extendStatics = function(d, b) {
			extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
				d.__proto__ = b;
			} || function(d, b) {
				for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
			};
			return extendStatics(d, b);
		};
		return function(d, b) {
			extendStatics(d, b);
			function __() {
				this.constructor = d;
			}
			d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
		};
	})();
	OccurrenceValidationCollector = function(_super) {
		__extends$2(OccurrenceValidationCollector, _super);
		function OccurrenceValidationCollector() {
			var _this = _super !== null && _super.apply(this, arguments) || this;
			_this.allProductions = [];
			return _this;
		}
		OccurrenceValidationCollector.prototype.visitNonTerminal = function(subrule) {
			this.allProductions.push(subrule);
		};
		OccurrenceValidationCollector.prototype.visitOption = function(option) {
			this.allProductions.push(option);
		};
		OccurrenceValidationCollector.prototype.visitRepetitionWithSeparator = function(manySep) {
			this.allProductions.push(manySep);
		};
		OccurrenceValidationCollector.prototype.visitRepetitionMandatory = function(atLeastOne) {
			this.allProductions.push(atLeastOne);
		};
		OccurrenceValidationCollector.prototype.visitRepetitionMandatoryWithSeparator = function(atLeastOneSep) {
			this.allProductions.push(atLeastOneSep);
		};
		OccurrenceValidationCollector.prototype.visitRepetition = function(many) {
			this.allProductions.push(many);
		};
		OccurrenceValidationCollector.prototype.visitAlternation = function(or) {
			this.allProductions.push(or);
		};
		OccurrenceValidationCollector.prototype.visitTerminal = function(terminal) {
			this.allProductions.push(terminal);
		};
		return OccurrenceValidationCollector;
	}(GAstVisitor);
	validTermsPattern = /^[a-zA-Z_]\w*$/;
	validNestedRuleName = new RegExp(validTermsPattern.source.replace("^", "^\\$"));
	OrCollector = function(_super) {
		__extends$2(OrCollector, _super);
		function OrCollector() {
			var _this = _super !== null && _super.apply(this, arguments) || this;
			_this.alternations = [];
			return _this;
		}
		OrCollector.prototype.visitAlternation = function(node) {
			this.alternations.push(node);
		};
		return OrCollector;
	}(GAstVisitor);
	RepetionCollector = function(_super) {
		__extends$2(RepetionCollector, _super);
		function RepetionCollector() {
			var _this = _super !== null && _super.apply(this, arguments) || this;
			_this.allProductions = [];
			return _this;
		}
		RepetionCollector.prototype.visitRepetitionWithSeparator = function(manySep) {
			this.allProductions.push(manySep);
		};
		RepetionCollector.prototype.visitRepetitionMandatory = function(atLeastOne) {
			this.allProductions.push(atLeastOne);
		};
		RepetionCollector.prototype.visitRepetitionMandatoryWithSeparator = function(atLeastOneSep) {
			this.allProductions.push(atLeastOneSep);
		};
		RepetionCollector.prototype.visitRepetition = function(many) {
			this.allProductions.push(many);
		};
		return RepetionCollector;
	}(GAstVisitor);
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/errors_public.js
var defaultParserErrorProvider, defaultGrammarResolverErrorProvider, defaultGrammarValidatorErrorProvider;
var init_errors_public = __esmMin((() => {
	init_tokens_public();
	init_utils();
	init_gast_public();
	init_gast();
	init_checks();
	defaultParserErrorProvider = {
		buildMismatchTokenMessage: function(_a) {
			var expected = _a.expected, actual = _a.actual;
			_a.previous;
			_a.ruleName;
			return "Expecting " + (hasTokenLabel(expected) ? "--> " + tokenLabel(expected) + " <--" : "token of type --> " + expected.name + " <--") + " but found --> '" + actual.image + "' <--";
		},
		buildNotAllInputParsedMessage: function(_a) {
			var firstRedundant = _a.firstRedundant;
			_a.ruleName;
			return "Redundant input, expecting EOF but found: " + firstRedundant.image;
		},
		buildNoViableAltMessage: function(_a) {
			var expectedPathsPerAlt = _a.expectedPathsPerAlt, actual = _a.actual;
			_a.previous;
			var customUserDescription = _a.customUserDescription;
			_a.ruleName;
			var errPrefix = "Expecting: ";
			var errSuffix = "\nbut found: '" + first$1(actual).image + "'";
			if (customUserDescription) return errPrefix + customUserDescription + errSuffix;
			else return errPrefix + ("one of these possible Token sequences:\n" + map$3(map$3(reduce(expectedPathsPerAlt, function(result, currAltPaths) {
				return result.concat(currAltPaths);
			}, []), function(currPath) {
				return "[" + map$3(currPath, function(currTokenType) {
					return tokenLabel(currTokenType);
				}).join(", ") + "]";
			}), function(itemMsg, idx) {
				return "  " + (idx + 1) + ". " + itemMsg;
			}).join("\n")) + errSuffix;
		},
		buildEarlyExitMessage: function(_a) {
			var expectedIterationPaths = _a.expectedIterationPaths, actual = _a.actual, customUserDescription = _a.customUserDescription;
			_a.ruleName;
			var errPrefix = "Expecting: ";
			var errSuffix = "\nbut found: '" + first$1(actual).image + "'";
			if (customUserDescription) return errPrefix + customUserDescription + errSuffix;
			else return errPrefix + ("expecting at least one iteration which starts with one of these possible Token sequences::\n  " + ("<" + map$3(expectedIterationPaths, function(currPath) {
				return "[" + map$3(currPath, function(currTokenType) {
					return tokenLabel(currTokenType);
				}).join(",") + "]";
			}).join(" ,") + ">")) + errSuffix;
		}
	};
	Object.freeze(defaultParserErrorProvider);
	defaultGrammarResolverErrorProvider = { buildRuleNotFoundError: function(topLevelRule, undefinedRule) {
		return "Invalid grammar, reference to a rule which is not defined: ->" + undefinedRule.nonTerminalName + "<-\ninside top level rule: ->" + topLevelRule.name + "<-";
	} };
	defaultGrammarValidatorErrorProvider = {
		buildDuplicateFoundError: function(topLevelRule, duplicateProds) {
			function getExtraProductionArgument(prod) {
				if (prod instanceof Terminal) return prod.terminalType.name;
				else if (prod instanceof NonTerminal) return prod.nonTerminalName;
				else return "";
			}
			var topLevelName = topLevelRule.name;
			var duplicateProd = first$1(duplicateProds);
			var index = duplicateProd.idx;
			var dslName = getProductionDslName(duplicateProd);
			var extraArgument = getExtraProductionArgument(duplicateProd);
			var hasExplicitIndex = index > 0;
			var msg = "->" + dslName + (hasExplicitIndex ? index : "") + "<- " + (extraArgument ? "with argument: ->" + extraArgument + "<-" : "") + "\n                  appears more than once (" + duplicateProds.length + " times) in the top level rule: ->" + topLevelName + "<-.                  \n                  For further details see: https://sap.github.io/chevrotain/docs/FAQ.html#NUMERICAL_SUFFIXES \n                  ";
			msg = msg.replace(/[ \t]+/g, " ");
			msg = msg.replace(/\s\s+/g, "\n");
			return msg;
		},
		buildInvalidNestedRuleNameError: function(topLevelRule, nestedProd) {
			return "Invalid nested rule name: ->" + nestedProd.name + "<- inside rule: ->" + topLevelRule.name + "<-\n" + ("it must match the pattern: ->" + validNestedRuleName.toString() + "<-.\n") + "Note that this means a nested rule name must start with the '$'(dollar) sign.";
		},
		buildDuplicateNestedRuleNameError: function(topLevelRule, nestedProd) {
			return "Duplicate nested rule name: ->" + first$1(nestedProd).name + "<- inside rule: ->" + topLevelRule.name + "<-\nA nested name must be unique in the scope of a top level grammar rule.";
		},
		buildNamespaceConflictError: function(rule) {
			return "Namespace conflict found in grammar.\n" + ("The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <" + rule.name + ">.\n") + "To resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.";
		},
		buildAlternationPrefixAmbiguityError: function(options) {
			var pathMsg = map$3(options.prefixPath, function(currTok) {
				return tokenLabel(currTok);
			}).join(", ");
			var occurrence = options.alternation.idx === 0 ? "" : options.alternation.idx;
			return "Ambiguous alternatives: <" + options.ambiguityIndices.join(" ,") + "> due to common lookahead prefix\n" + ("in <OR" + occurrence + "> inside <" + options.topLevelRule.name + "> Rule,\n") + ("<" + pathMsg + "> may appears as a prefix path in all these alternatives.\n") + "See: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.";
		},
		buildAlternationAmbiguityError: function(options) {
			var pathMsg = map$3(options.prefixPath, function(currtok) {
				return tokenLabel(currtok);
			}).join(", ");
			var occurrence = options.alternation.idx === 0 ? "" : options.alternation.idx;
			var currMessage = "Ambiguous Alternatives Detected: <" + options.ambiguityIndices.join(" ,") + "> in <OR" + occurrence + ">" + (" inside <" + options.topLevelRule.name + "> Rule,\n") + ("<" + pathMsg + "> may appears as a prefix path in all these alternatives.\n");
			currMessage = currMessage + "See: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.";
			return currMessage;
		},
		buildEmptyRepetitionError: function(options) {
			var dslName = getProductionDslName(options.repetition);
			if (options.repetition.idx !== 0) dslName += options.repetition.idx;
			return "The repetition <" + dslName + "> within Rule <" + options.topLevelRule.name + "> can never consume any tokens.\nThis could lead to an infinite loop.";
		},
		buildTokenNameError: function(options) {
			return "Invalid Grammar Token name: ->" + options.tokenType.name + "<- it must match the pattern: ->" + options.expectedPattern.toString() + "<-";
		},
		buildEmptyAlternationError: function(options) {
			return "Ambiguous empty alternative: <" + (options.emptyChoiceIdx + 1) + ">" + (" in <OR" + options.alternation.idx + "> inside <" + options.topLevelRule.name + "> Rule.\n") + "Only the last alternative may be an empty alternative.";
		},
		buildTooManyAlternativesError: function(options) {
			return "An Alternation cannot have more than 256 alternatives:\n" + ("<OR" + options.alternation.idx + "> inside <" + options.topLevelRule.name + "> Rule.\n has " + (options.alternation.definition.length + 1) + " alternatives.");
		},
		buildLeftRecursionError: function(options) {
			var ruleName = options.topLevelRule.name;
			var pathNames = map$3(options.leftRecursionPath, function(currRule) {
				return currRule.name;
			});
			var leftRecursivePath = ruleName + " --> " + pathNames.concat([ruleName]).join(" --> ");
			return "Left Recursion found in grammar.\n" + ("rule: <" + ruleName + "> can be invoked from itself (directly or indirectly)\n") + ("without consuming any Tokens. The grammar path that causes this is: \n " + leftRecursivePath + "\n") + " To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.";
		},
		buildInvalidRuleNameError: function(options) {
			var ruleName = options.topLevelRule.name;
			var expectedPatternString = options.expectedPattern.toString();
			return "Invalid grammar rule name: ->" + ruleName + "<- it must match the pattern: ->" + expectedPatternString + "<-";
		},
		buildDuplicateRuleNameError: function(options) {
			var ruleName;
			if (options.topLevelRule instanceof Rule$1) ruleName = options.topLevelRule.name;
			else ruleName = options.topLevelRule;
			return "Duplicate definition, rule: ->" + ruleName + "<- is already defined in the grammar: ->" + options.grammarName + "<-";
		}
	};
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/grammar/resolver.js
function resolveGrammar$1(topLevels, errMsgProvider) {
	var refResolver = new GastRefResolverVisitor(topLevels, errMsgProvider);
	refResolver.resolveRefs();
	return refResolver.errors;
}
var __extends$1, GastRefResolverVisitor;
var init_resolver = __esmMin((() => {
	init_parser();
	init_utils();
	init_gast_visitor_public();
	__extends$1 = (function() {
		var extendStatics = function(d, b) {
			extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
				d.__proto__ = b;
			} || function(d, b) {
				for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
			};
			return extendStatics(d, b);
		};
		return function(d, b) {
			extendStatics(d, b);
			function __() {
				this.constructor = d;
			}
			d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
		};
	})();
	GastRefResolverVisitor = function(_super) {
		__extends$1(GastRefResolverVisitor, _super);
		function GastRefResolverVisitor(nameToTopRule, errMsgProvider) {
			var _this = _super.call(this) || this;
			_this.nameToTopRule = nameToTopRule;
			_this.errMsgProvider = errMsgProvider;
			_this.errors = [];
			return _this;
		}
		GastRefResolverVisitor.prototype.resolveRefs = function() {
			var _this = this;
			forEach(values(this.nameToTopRule), function(prod) {
				_this.currTopLevel = prod;
				prod.accept(_this);
			});
		};
		GastRefResolverVisitor.prototype.visitNonTerminal = function(node) {
			var ref = this.nameToTopRule[node.nonTerminalName];
			if (!ref) {
				var msg = this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel, node);
				this.errors.push({
					message: msg,
					type: ParserDefinitionErrorType.UNRESOLVED_SUBRULE_REF,
					ruleName: this.currTopLevel.name,
					unresolvedRefName: node.nonTerminalName
				});
			} else node.referencedRule = ref;
		};
		return GastRefResolverVisitor;
	}(GAstVisitor);
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_resolver_public.js
function resolveGrammar(options) {
	options = defaults$1(options, { errMsgProvider: defaultGrammarResolverErrorProvider });
	var topRulesTable = {};
	forEach(options.rules, function(rule) {
		topRulesTable[rule.name] = rule;
	});
	return resolveGrammar$1(topRulesTable, options.errMsgProvider);
}
function validateGrammar(options) {
	options = defaults$1(options, {
		errMsgProvider: defaultGrammarValidatorErrorProvider,
		ignoredIssues: {}
	});
	return validateGrammar$1(options.rules, options.maxLookahead, options.tokenTypes, options.ignoredIssues, options.errMsgProvider, options.grammarName);
}
var init_gast_resolver_public = __esmMin((() => {
	init_utils();
	init_resolver();
	init_checks();
	init_errors_public();
	init_gast();
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/exceptions_public.js
function isRecognitionException(error) {
	return contains(RECOGNITION_EXCEPTION_NAMES, error.name);
}
function MismatchedTokenException(message, token, previousToken) {
	this.name = MISMATCHED_TOKEN_EXCEPTION;
	this.message = message;
	this.token = token;
	this.previousToken = previousToken;
	this.resyncedTokens = [];
}
function NoViableAltException(message, token, previousToken) {
	this.name = NO_VIABLE_ALT_EXCEPTION;
	this.message = message;
	this.token = token;
	this.previousToken = previousToken;
	this.resyncedTokens = [];
}
function NotAllInputParsedException(message, token) {
	this.name = NOT_ALL_INPUT_PARSED_EXCEPTION;
	this.message = message;
	this.token = token;
	this.resyncedTokens = [];
}
function EarlyExitException(message, token, previousToken) {
	this.name = EARLY_EXIT_EXCEPTION;
	this.message = message;
	this.token = token;
	this.previousToken = previousToken;
	this.resyncedTokens = [];
}
var MISMATCHED_TOKEN_EXCEPTION, NO_VIABLE_ALT_EXCEPTION, EARLY_EXIT_EXCEPTION, NOT_ALL_INPUT_PARSED_EXCEPTION, RECOGNITION_EXCEPTION_NAMES;
var init_exceptions_public = __esmMin((() => {
	init_utils();
	MISMATCHED_TOKEN_EXCEPTION = "MismatchedTokenException";
	NO_VIABLE_ALT_EXCEPTION = "NoViableAltException";
	EARLY_EXIT_EXCEPTION = "EarlyExitException";
	NOT_ALL_INPUT_PARSED_EXCEPTION = "NotAllInputParsedException";
	RECOGNITION_EXCEPTION_NAMES = [
		MISMATCHED_TOKEN_EXCEPTION,
		NO_VIABLE_ALT_EXCEPTION,
		EARLY_EXIT_EXCEPTION,
		NOT_ALL_INPUT_PARSED_EXCEPTION
	];
	Object.freeze(RECOGNITION_EXCEPTION_NAMES);
	MismatchedTokenException.prototype = Error.prototype;
	NoViableAltException.prototype = Error.prototype;
	NotAllInputParsedException.prototype = Error.prototype;
	EarlyExitException.prototype = Error.prototype;
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/parser/traits/recoverable.js
function InRuleRecoveryException(message) {
	this.name = IN_RULE_RECOVERY_EXCEPTION;
	this.message = message;
}
function attemptInRepetitionRecovery(prodFunc, args, lookaheadFunc, dslMethodIdx, prodOccurrence, nextToksWalker, notStuck) {
	var key = this.getKeyForAutomaticLookahead(dslMethodIdx, prodOccurrence);
	var firstAfterRepInfo = this.firstAfterRepMap[key];
	if (firstAfterRepInfo === void 0) {
		var currRuleName = this.getCurrRuleFullName();
		var ruleGrammar = this.getGAstProductions()[currRuleName];
		firstAfterRepInfo = new nextToksWalker(ruleGrammar, prodOccurrence).startWalking();
		this.firstAfterRepMap[key] = firstAfterRepInfo;
	}
	var expectTokAfterLastMatch = firstAfterRepInfo.token;
	var nextTokIdx = firstAfterRepInfo.occurrence;
	var isEndOfRule = firstAfterRepInfo.isEndOfRule;
	if (this.RULE_STACK.length === 1 && isEndOfRule && expectTokAfterLastMatch === void 0) {
		expectTokAfterLastMatch = EOF;
		nextTokIdx = 1;
	}
	if (this.shouldInRepetitionRecoveryBeTried(expectTokAfterLastMatch, nextTokIdx, notStuck)) this.tryInRepetitionRecovery(prodFunc, args, lookaheadFunc, expectTokAfterLastMatch);
}
var EOF_FOLLOW_KEY, IN_RULE_RECOVERY_EXCEPTION, Recoverable;
var init_recoverable = __esmMin((() => {
	init_tokens_public();
	init_utils();
	init_exceptions_public();
	init_constants();
	init_parser();
	EOF_FOLLOW_KEY = {};
	IN_RULE_RECOVERY_EXCEPTION = "InRuleRecoveryException";
	InRuleRecoveryException.prototype = Error.prototype;
	Recoverable = function() {
		function Recoverable() {}
		Recoverable.prototype.initRecoverable = function(config) {
			this.firstAfterRepMap = {};
			this.resyncFollows = {};
			this.recoveryEnabled = has(config, "recoveryEnabled") ? config.recoveryEnabled : DEFAULT_PARSER_CONFIG.recoveryEnabled;
			if (this.recoveryEnabled) this.attemptInRepetitionRecovery = attemptInRepetitionRecovery;
		};
		Recoverable.prototype.getTokenToInsert = function(tokType) {
			var tokToInsert = createTokenInstance(tokType, "", NaN, NaN, NaN, NaN, NaN, NaN);
			tokToInsert.isInsertedInRecovery = true;
			return tokToInsert;
		};
		Recoverable.prototype.canTokenTypeBeInsertedInRecovery = function(tokType) {
			return true;
		};
		Recoverable.prototype.tryInRepetitionRecovery = function(grammarRule, grammarRuleArgs, lookAheadFunc, expectedTokType) {
			var _this = this;
			var reSyncTokType = this.findReSyncTokenType();
			var savedLexerState = this.exportLexerState();
			var resyncedTokens = [];
			var passedResyncPoint = false;
			var nextTokenWithoutResync = this.LA(1);
			var currToken = this.LA(1);
			var generateErrorMessage = function() {
				var previousToken = _this.LA(0);
				var error = new MismatchedTokenException(_this.errorMessageProvider.buildMismatchTokenMessage({
					expected: expectedTokType,
					actual: nextTokenWithoutResync,
					previous: previousToken,
					ruleName: _this.getCurrRuleFullName()
				}), nextTokenWithoutResync, _this.LA(0));
				error.resyncedTokens = dropRight(resyncedTokens);
				_this.SAVE_ERROR(error);
			};
			while (!passedResyncPoint) if (this.tokenMatcher(currToken, expectedTokType)) {
				generateErrorMessage();
				return;
			} else if (lookAheadFunc.call(this)) {
				generateErrorMessage();
				grammarRule.apply(this, grammarRuleArgs);
				return;
			} else if (this.tokenMatcher(currToken, reSyncTokType)) passedResyncPoint = true;
			else {
				currToken = this.SKIP_TOKEN();
				this.addToResyncTokens(currToken, resyncedTokens);
			}
			this.importLexerState(savedLexerState);
		};
		Recoverable.prototype.shouldInRepetitionRecoveryBeTried = function(expectTokAfterLastMatch, nextTokIdx, notStuck) {
			if (notStuck === false) return false;
			if (expectTokAfterLastMatch === void 0 || nextTokIdx === void 0) return false;
			if (this.tokenMatcher(this.LA(1), expectTokAfterLastMatch)) return false;
			if (this.isBackTracking()) return false;
			if (this.canPerformInRuleRecovery(expectTokAfterLastMatch, this.getFollowsForInRuleRecovery(expectTokAfterLastMatch, nextTokIdx))) return false;
			return true;
		};
		Recoverable.prototype.getFollowsForInRuleRecovery = function(tokType, tokIdxInRule) {
			var grammarPath = this.getCurrentGrammarPath(tokType, tokIdxInRule);
			return this.getNextPossibleTokenTypes(grammarPath);
		};
		Recoverable.prototype.tryInRuleRecovery = function(expectedTokType, follows) {
			if (this.canRecoverWithSingleTokenInsertion(expectedTokType, follows)) return this.getTokenToInsert(expectedTokType);
			if (this.canRecoverWithSingleTokenDeletion(expectedTokType)) {
				var nextTok = this.SKIP_TOKEN();
				this.consumeToken();
				return nextTok;
			}
			throw new InRuleRecoveryException("sad sad panda");
		};
		Recoverable.prototype.canPerformInRuleRecovery = function(expectedToken, follows) {
			return this.canRecoverWithSingleTokenInsertion(expectedToken, follows) || this.canRecoverWithSingleTokenDeletion(expectedToken);
		};
		Recoverable.prototype.canRecoverWithSingleTokenInsertion = function(expectedTokType, follows) {
			var _this = this;
			if (!this.canTokenTypeBeInsertedInRecovery(expectedTokType)) return false;
			if (isEmpty(follows)) return false;
			var mismatchedTok = this.LA(1);
			return find$1(follows, function(possibleFollowsTokType) {
				return _this.tokenMatcher(mismatchedTok, possibleFollowsTokType);
			}) !== void 0;
		};
		Recoverable.prototype.canRecoverWithSingleTokenDeletion = function(expectedTokType) {
			return this.tokenMatcher(this.LA(2), expectedTokType);
		};
		Recoverable.prototype.isInCurrentRuleReSyncSet = function(tokenTypeIdx) {
			var followKey = this.getCurrFollowKey();
			return contains(this.getFollowSetFromFollowKey(followKey), tokenTypeIdx);
		};
		Recoverable.prototype.findReSyncTokenType = function() {
			var allPossibleReSyncTokTypes = this.flattenFollowSet();
			var nextToken = this.LA(1);
			var k = 2;
			while (true) {
				var nextTokenType = nextToken.tokenType;
				if (contains(allPossibleReSyncTokTypes, nextTokenType)) return nextTokenType;
				nextToken = this.LA(k);
				k++;
			}
		};
		Recoverable.prototype.getCurrFollowKey = function() {
			if (this.RULE_STACK.length === 1) return EOF_FOLLOW_KEY;
			var currRuleShortName = this.getLastExplicitRuleShortName();
			var currRuleIdx = this.getLastExplicitRuleOccurrenceIndex();
			var prevRuleShortName = this.getPreviousExplicitRuleShortName();
			return {
				ruleName: this.shortRuleNameToFullName(currRuleShortName),
				idxInCallingRule: currRuleIdx,
				inRule: this.shortRuleNameToFullName(prevRuleShortName)
			};
		};
		Recoverable.prototype.buildFullFollowKeyStack = function() {
			var _this = this;
			var explicitRuleStack = this.RULE_STACK;
			var explicitOccurrenceStack = this.RULE_OCCURRENCE_STACK;
			if (!isEmpty(this.LAST_EXPLICIT_RULE_STACK)) {
				explicitRuleStack = map$3(this.LAST_EXPLICIT_RULE_STACK, function(idx) {
					return _this.RULE_STACK[idx];
				});
				explicitOccurrenceStack = map$3(this.LAST_EXPLICIT_RULE_STACK, function(idx) {
					return _this.RULE_OCCURRENCE_STACK[idx];
				});
			}
			return map$3(explicitRuleStack, function(ruleName, idx) {
				if (idx === 0) return EOF_FOLLOW_KEY;
				return {
					ruleName: _this.shortRuleNameToFullName(ruleName),
					idxInCallingRule: explicitOccurrenceStack[idx],
					inRule: _this.shortRuleNameToFullName(explicitRuleStack[idx - 1])
				};
			});
		};
		Recoverable.prototype.flattenFollowSet = function() {
			var _this = this;
			return flatten(map$3(this.buildFullFollowKeyStack(), function(currKey) {
				return _this.getFollowSetFromFollowKey(currKey);
			}));
		};
		Recoverable.prototype.getFollowSetFromFollowKey = function(followKey) {
			if (followKey === EOF_FOLLOW_KEY) return [EOF];
			var followName = followKey.ruleName + followKey.idxInCallingRule + IN + followKey.inRule;
			return this.resyncFollows[followName];
		};
		Recoverable.prototype.addToResyncTokens = function(token, resyncTokens) {
			if (!this.tokenMatcher(token, EOF)) resyncTokens.push(token);
			return resyncTokens;
		};
		Recoverable.prototype.reSyncTo = function(tokType) {
			var resyncedTokens = [];
			var nextTok = this.LA(1);
			while (this.tokenMatcher(nextTok, tokType) === false) {
				nextTok = this.SKIP_TOKEN();
				this.addToResyncTokens(nextTok, resyncedTokens);
			}
			return dropRight(resyncedTokens);
		};
		Recoverable.prototype.attemptInRepetitionRecovery = function(prodFunc, args, lookaheadFunc, dslMethodIdx, prodOccurrence, nextToksWalker, notStuck) {};
		Recoverable.prototype.getCurrentGrammarPath = function(tokType, tokIdxInRule) {
			return {
				ruleStack: this.getHumanReadableRuleStack(),
				occurrenceStack: cloneArr(this.RULE_OCCURRENCE_STACK),
				lastTok: tokType,
				lastTokOccurrence: tokIdxInRule
			};
		};
		Recoverable.prototype.getHumanReadableRuleStack = function() {
			var _this = this;
			if (!isEmpty(this.LAST_EXPLICIT_RULE_STACK)) return map$3(this.LAST_EXPLICIT_RULE_STACK, function(currIdx) {
				return _this.shortRuleNameToFullName(_this.RULE_STACK[currIdx]);
			});
			else return map$3(this.RULE_STACK, function(currShortName) {
				return _this.shortRuleNameToFullName(currShortName);
			});
		};
		return Recoverable;
	}();
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/parser/traits/looksahead.js
var LooksAhead;
var init_looksahead = __esmMin((() => {
	init_lookahead();
	init_utils();
	init_parser();
	init_keys();
	init_gast();
	LooksAhead = function() {
		function LooksAhead() {}
		LooksAhead.prototype.initLooksAhead = function(config) {
			this.dynamicTokensEnabled = has(config, "dynamicTokensEnabled") ? config.dynamicTokensEnabled : DEFAULT_PARSER_CONFIG.dynamicTokensEnabled;
			this.maxLookahead = has(config, "maxLookahead") ? config.maxLookahead : DEFAULT_PARSER_CONFIG.maxLookahead;
			/* istanbul ignore next - Using plain array as dictionary will be tested on older node.js versions and IE11 */
			this.lookAheadFuncsCache = isES2015MapSupported() ? /* @__PURE__ */ new Map() : [];
			/* istanbul ignore else - The else branch will be tested on older node.js versions and IE11 */
			if (isES2015MapSupported()) {
				this.getLaFuncFromCache = this.getLaFuncFromMap;
				this.setLaFuncCache = this.setLaFuncCacheUsingMap;
			} else {
				this.getLaFuncFromCache = this.getLaFuncFromObj;
				this.setLaFuncCache = this.setLaFuncUsingObj;
			}
		};
		LooksAhead.prototype.preComputeLookaheadFunctions = function(rules) {
			var _this = this;
			forEach(rules, function(currRule) {
				_this.TRACE_INIT(currRule.name + " Rule Lookahead", function() {
					var _a = collectMethods(currRule), alternation = _a.alternation, repetition = _a.repetition, option = _a.option, repetitionMandatory = _a.repetitionMandatory, repetitionMandatoryWithSeparator = _a.repetitionMandatoryWithSeparator, repetitionWithSeparator = _a.repetitionWithSeparator;
					forEach(alternation, function(currProd) {
						var prodIdx = currProd.idx === 0 ? "" : currProd.idx;
						_this.TRACE_INIT("" + getProductionDslName(currProd) + prodIdx, function() {
							var laFunc = buildLookaheadFuncForOr(currProd.idx, currRule, currProd.maxLookahead || _this.maxLookahead, currProd.hasPredicates, _this.dynamicTokensEnabled, _this.lookAheadBuilderForAlternatives);
							var key = getKeyForAutomaticLookahead(_this.fullRuleNameToShort[currRule.name], 256, currProd.idx);
							_this.setLaFuncCache(key, laFunc);
						});
					});
					forEach(repetition, function(currProd) {
						_this.computeLookaheadFunc(currRule, currProd.idx, 768, PROD_TYPE.REPETITION, currProd.maxLookahead, getProductionDslName(currProd));
					});
					forEach(option, function(currProd) {
						_this.computeLookaheadFunc(currRule, currProd.idx, 512, PROD_TYPE.OPTION, currProd.maxLookahead, getProductionDslName(currProd));
					});
					forEach(repetitionMandatory, function(currProd) {
						_this.computeLookaheadFunc(currRule, currProd.idx, AT_LEAST_ONE_IDX, PROD_TYPE.REPETITION_MANDATORY, currProd.maxLookahead, getProductionDslName(currProd));
					});
					forEach(repetitionMandatoryWithSeparator, function(currProd) {
						_this.computeLookaheadFunc(currRule, currProd.idx, AT_LEAST_ONE_SEP_IDX, PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR, currProd.maxLookahead, getProductionDslName(currProd));
					});
					forEach(repetitionWithSeparator, function(currProd) {
						_this.computeLookaheadFunc(currRule, currProd.idx, MANY_SEP_IDX, PROD_TYPE.REPETITION_WITH_SEPARATOR, currProd.maxLookahead, getProductionDslName(currProd));
					});
				});
			});
		};
		LooksAhead.prototype.computeLookaheadFunc = function(rule, prodOccurrence, prodKey, prodType, prodMaxLookahead, dslMethodName) {
			var _this = this;
			this.TRACE_INIT("" + dslMethodName + (prodOccurrence === 0 ? "" : prodOccurrence), function() {
				var laFunc = buildLookaheadFuncForOptionalProd(prodOccurrence, rule, prodMaxLookahead || _this.maxLookahead, _this.dynamicTokensEnabled, prodType, _this.lookAheadBuilderForOptional);
				var key = getKeyForAutomaticLookahead(_this.fullRuleNameToShort[rule.name], prodKey, prodOccurrence);
				_this.setLaFuncCache(key, laFunc);
			});
		};
		LooksAhead.prototype.lookAheadBuilderForOptional = function(alt, tokenMatcher, dynamicTokensEnabled) {
			return buildSingleAlternativeLookaheadFunction(alt, tokenMatcher, dynamicTokensEnabled);
		};
		LooksAhead.prototype.lookAheadBuilderForAlternatives = function(alts, hasPredicates, tokenMatcher, dynamicTokensEnabled) {
			return buildAlternativesLookAheadFunc(alts, hasPredicates, tokenMatcher, dynamicTokensEnabled);
		};
		LooksAhead.prototype.getKeyForAutomaticLookahead = function(dslMethodIdx, occurrence) {
			return getKeyForAutomaticLookahead(this.getLastExplicitRuleShortName(), dslMethodIdx, occurrence);
		};
		/* istanbul ignore next */
		LooksAhead.prototype.getLaFuncFromCache = function(key) {};
		LooksAhead.prototype.getLaFuncFromMap = function(key) {
			return this.lookAheadFuncsCache.get(key);
		};
		/* istanbul ignore next - Using plain array as dictionary will be tested on older node.js versions and IE11 */
		LooksAhead.prototype.getLaFuncFromObj = function(key) {
			return this.lookAheadFuncsCache[key];
		};
		/* istanbul ignore next */
		LooksAhead.prototype.setLaFuncCache = function(key, value) {};
		LooksAhead.prototype.setLaFuncCacheUsingMap = function(key, value) {
			this.lookAheadFuncsCache.set(key, value);
		};
		/* istanbul ignore next - Using plain array as dictionary will be tested on older node.js versions and IE11 */
		LooksAhead.prototype.setLaFuncUsingObj = function(key, value) {
			this.lookAheadFuncsCache[key] = value;
		};
		return LooksAhead;
	}();
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/lang/lang_extensions.js
function classNameFromInstance(instance) {
	return functionName(instance.constructor);
}
/* istanbul ignore next too many hacks for IE/old versions of node.js here*/
function functionName(func) {
	var existingNameProp = func.name;
	if (existingNameProp) return existingNameProp;
	return func.toString().match(FUNC_NAME_REGEXP)[1];
}
/**
* @returns {boolean} - has the property been successfully defined
*/
function defineNameProp(obj, nameValue) {
	var namePropDescriptor = Object.getOwnPropertyDescriptor(obj, NAME);
	/* istanbul ignore else -> will only run in old versions of node.js */
	if (isUndefined$1(namePropDescriptor) || namePropDescriptor.configurable) {
		Object.defineProperty(obj, NAME, {
			enumerable: false,
			configurable: true,
			writable: false,
			value: nameValue
		});
		return true;
	}
	/* istanbul ignore next -> will only run in old versions of node.js */
	return false;
}
var FUNC_NAME_REGEXP, NAME;
var init_lang_extensions = __esmMin((() => {
	init_utils();
	FUNC_NAME_REGEXP = /^\s*function\s*(\S*)\s*\(/;
	NAME = "name";
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/cst/cst_visitor.js
function defaultVisit(ctx, param) {
	var childrenNames = keys$2(ctx);
	var childrenNamesLength = childrenNames.length;
	for (var i = 0; i < childrenNamesLength; i++) {
		var currChildArray = ctx[childrenNames[i]];
		var currChildArrayLength = currChildArray.length;
		for (var j = 0; j < currChildArrayLength; j++) {
			var currChild = currChildArray[j];
			if (currChild.tokenTypeIdx === void 0) if (currChild.fullName !== void 0) this[currChild.fullName](currChild.children, param);
			else this[currChild.name](currChild.children, param);
		}
	}
}
function createBaseSemanticVisitorConstructor(grammarName, ruleNames) {
	var derivedConstructor = function() {};
	defineNameProp(derivedConstructor, grammarName + "BaseSemantics");
	derivedConstructor.prototype = {
		visit: function(cstNode, param) {
			if (isArray$1(cstNode)) cstNode = cstNode[0];
			if (isUndefined$1(cstNode)) return;
			if (cstNode.fullName !== void 0) return this[cstNode.fullName](cstNode.children, param);
			else return this[cstNode.name](cstNode.children, param);
		},
		validateVisitor: function() {
			var semanticDefinitionErrors = validateVisitor(this, ruleNames);
			if (!isEmpty(semanticDefinitionErrors)) {
				var errorMessages = map$3(semanticDefinitionErrors, function(currDefError) {
					return currDefError.msg;
				});
				throw Error("Errors Detected in CST Visitor <" + functionName(this.constructor) + ">:\n	" + ("" + errorMessages.join("\n\n").replace(/\n/g, "\n	")));
			}
		}
	};
	derivedConstructor.prototype.constructor = derivedConstructor;
	derivedConstructor._RULE_NAMES = ruleNames;
	return derivedConstructor;
}
function createBaseVisitorConstructorWithDefaults(grammarName, ruleNames, baseConstructor) {
	var derivedConstructor = function() {};
	defineNameProp(derivedConstructor, grammarName + "BaseSemanticsWithDefaults");
	var withDefaultsProto = Object.create(baseConstructor.prototype);
	forEach(ruleNames, function(ruleName) {
		withDefaultsProto[ruleName] = defaultVisit;
	});
	derivedConstructor.prototype = withDefaultsProto;
	derivedConstructor.prototype.constructor = derivedConstructor;
	return derivedConstructor;
}
function validateVisitor(visitorInstance, ruleNames) {
	var missingErrors = validateMissingCstMethods(visitorInstance, ruleNames);
	var redundantErrors = validateRedundantMethods(visitorInstance, ruleNames);
	return missingErrors.concat(redundantErrors);
}
function validateMissingCstMethods(visitorInstance, ruleNames) {
	return compact(map$3(ruleNames, function(currRuleName) {
		if (!isFunction$1(visitorInstance[currRuleName])) return {
			msg: "Missing visitor method: <" + currRuleName + "> on " + functionName(visitorInstance.constructor) + " CST Visitor.",
			type: CstVisitorDefinitionError.MISSING_METHOD,
			methodName: currRuleName
		};
	}));
}
function validateRedundantMethods(visitorInstance, ruleNames) {
	var errors = [];
	for (var prop in visitorInstance) if (validTermsPattern.test(prop) && isFunction$1(visitorInstance[prop]) && !contains(VALID_PROP_NAMES, prop) && !contains(ruleNames, prop)) errors.push({
		msg: "Redundant visitor method: <" + prop + "> on " + functionName(visitorInstance.constructor) + " CST Visitor\nThere is no Grammar Rule corresponding to this method's name.\n" + ("For utility methods on visitor classes use methods names that do not match /" + validTermsPattern.source + "/."),
		type: CstVisitorDefinitionError.REDUNDANT_METHOD,
		methodName: prop
	});
	return errors;
}
var CstVisitorDefinitionError, VALID_PROP_NAMES;
var init_cst_visitor = __esmMin((() => {
	init_utils();
	init_lang_extensions();
	init_checks();
	(function(CstVisitorDefinitionError) {
		CstVisitorDefinitionError[CstVisitorDefinitionError["REDUNDANT_METHOD"] = 0] = "REDUNDANT_METHOD";
		CstVisitorDefinitionError[CstVisitorDefinitionError["MISSING_METHOD"] = 1] = "MISSING_METHOD";
	})(CstVisitorDefinitionError || (CstVisitorDefinitionError = {}));
	VALID_PROP_NAMES = [
		"constructor",
		"visit",
		"validateVisitor"
	];
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/parser/traits/tree_builder.js
var TreeBuilder;
var init_tree_builder = __esmMin((() => {
	init_cst();
	init_utils();
	init_cst_visitor();
	init_keys();
	init_parser();
	TreeBuilder = function() {
		function TreeBuilder() {}
		TreeBuilder.prototype.initTreeBuilder = function(config) {
			this.LAST_EXPLICIT_RULE_STACK = [];
			this.CST_STACK = [];
			this.outputCst = has(config, "outputCst") ? config.outputCst : DEFAULT_PARSER_CONFIG.outputCst;
			this.nodeLocationTracking = has(config, "nodeLocationTracking") ? config.nodeLocationTracking : DEFAULT_PARSER_CONFIG.nodeLocationTracking;
			if (!this.outputCst) {
				this.cstInvocationStateUpdate = NOOP;
				this.cstFinallyStateUpdate = NOOP;
				this.cstPostTerminal = NOOP;
				this.cstPostNonTerminal = NOOP;
				this.cstPostRule = NOOP;
				this.getLastExplicitRuleShortName = this.getLastExplicitRuleShortNameNoCst;
				this.getPreviousExplicitRuleShortName = this.getPreviousExplicitRuleShortNameNoCst;
				this.getLastExplicitRuleOccurrenceIndex = this.getLastExplicitRuleOccurrenceIndexNoCst;
				this.manyInternal = this.manyInternalNoCst;
				this.orInternal = this.orInternalNoCst;
				this.optionInternal = this.optionInternalNoCst;
				this.atLeastOneInternal = this.atLeastOneInternalNoCst;
				this.manySepFirstInternal = this.manySepFirstInternalNoCst;
				this.atLeastOneSepFirstInternal = this.atLeastOneSepFirstInternalNoCst;
			} else if (/full/i.test(this.nodeLocationTracking)) if (this.recoveryEnabled) {
				this.setNodeLocationFromToken = setNodeLocationFull;
				this.setNodeLocationFromNode = setNodeLocationFull;
				this.cstPostRule = NOOP;
				this.setInitialNodeLocation = this.setInitialNodeLocationFullRecovery;
			} else {
				this.setNodeLocationFromToken = NOOP;
				this.setNodeLocationFromNode = NOOP;
				this.cstPostRule = this.cstPostRuleFull;
				this.setInitialNodeLocation = this.setInitialNodeLocationFullRegular;
			}
			else if (/onlyOffset/i.test(this.nodeLocationTracking)) if (this.recoveryEnabled) {
				this.setNodeLocationFromToken = setNodeLocationOnlyOffset;
				this.setNodeLocationFromNode = setNodeLocationOnlyOffset;
				this.cstPostRule = NOOP;
				this.setInitialNodeLocation = this.setInitialNodeLocationOnlyOffsetRecovery;
			} else {
				this.setNodeLocationFromToken = NOOP;
				this.setNodeLocationFromNode = NOOP;
				this.cstPostRule = this.cstPostRuleOnlyOffset;
				this.setInitialNodeLocation = this.setInitialNodeLocationOnlyOffsetRegular;
			}
			else if (/none/i.test(this.nodeLocationTracking)) {
				this.setNodeLocationFromToken = NOOP;
				this.setNodeLocationFromNode = NOOP;
				this.cstPostRule = NOOP;
				this.setInitialNodeLocation = NOOP;
			} else throw Error("Invalid <nodeLocationTracking> config option: \"" + config.nodeLocationTracking + "\"");
		};
		TreeBuilder.prototype.setInitialNodeLocationOnlyOffsetRecovery = function(cstNode) {
			cstNode.location = {
				startOffset: NaN,
				endOffset: NaN
			};
		};
		TreeBuilder.prototype.setInitialNodeLocationOnlyOffsetRegular = function(cstNode) {
			cstNode.location = {
				startOffset: this.LA(1).startOffset,
				endOffset: NaN
			};
		};
		TreeBuilder.prototype.setInitialNodeLocationFullRecovery = function(cstNode) {
			cstNode.location = {
				startOffset: NaN,
				startLine: NaN,
				startColumn: NaN,
				endOffset: NaN,
				endLine: NaN,
				endColumn: NaN
			};
		};
		/**
		*  @see setInitialNodeLocationOnlyOffsetRegular for explanation why this work
		
		* @param cstNode
		*/
		TreeBuilder.prototype.setInitialNodeLocationFullRegular = function(cstNode) {
			var nextToken = this.LA(1);
			cstNode.location = {
				startOffset: nextToken.startOffset,
				startLine: nextToken.startLine,
				startColumn: nextToken.startColumn,
				endOffset: NaN,
				endLine: NaN,
				endColumn: NaN
			};
		};
		TreeBuilder.prototype.cstNestedInvocationStateUpdate = function(nestedName, shortName) {
			var cstNode = {
				name: nestedName,
				fullName: this.shortRuleNameToFull[this.getLastExplicitRuleShortName()] + nestedName,
				children: {}
			};
			this.setInitialNodeLocation(cstNode);
			this.CST_STACK.push(cstNode);
		};
		TreeBuilder.prototype.cstInvocationStateUpdate = function(fullRuleName, shortName) {
			this.LAST_EXPLICIT_RULE_STACK.push(this.RULE_STACK.length - 1);
			var cstNode = {
				name: fullRuleName,
				children: {}
			};
			this.setInitialNodeLocation(cstNode);
			this.CST_STACK.push(cstNode);
		};
		TreeBuilder.prototype.cstFinallyStateUpdate = function() {
			this.LAST_EXPLICIT_RULE_STACK.pop();
			this.CST_STACK.pop();
		};
		TreeBuilder.prototype.cstNestedFinallyStateUpdate = function() {
			var lastCstNode = this.CST_STACK.pop();
			this.cstPostRule(lastCstNode);
		};
		TreeBuilder.prototype.cstPostRuleFull = function(ruleCstNode) {
			var prevToken = this.LA(0);
			var loc = ruleCstNode.location;
			if (loc.startOffset <= prevToken.startOffset === true) {
				loc.endOffset = prevToken.endOffset;
				loc.endLine = prevToken.endLine;
				loc.endColumn = prevToken.endColumn;
			} else {
				loc.startOffset = NaN;
				loc.startLine = NaN;
				loc.startColumn = NaN;
			}
		};
		TreeBuilder.prototype.cstPostRuleOnlyOffset = function(ruleCstNode) {
			var prevToken = this.LA(0);
			var loc = ruleCstNode.location;
			if (loc.startOffset <= prevToken.startOffset === true) loc.endOffset = prevToken.endOffset;
			else loc.startOffset = NaN;
		};
		TreeBuilder.prototype.cstPostTerminal = function(key, consumedToken) {
			var rootCst = this.CST_STACK[this.CST_STACK.length - 1];
			addTerminalToCst(rootCst, consumedToken, key);
			this.setNodeLocationFromToken(rootCst.location, consumedToken);
		};
		TreeBuilder.prototype.cstPostNonTerminal = function(ruleCstResult, ruleName) {
			if (this.isBackTracking() !== true) {
				var preCstNode = this.CST_STACK[this.CST_STACK.length - 1];
				addNoneTerminalToCst(preCstNode, ruleName, ruleCstResult);
				this.setNodeLocationFromNode(preCstNode.location, ruleCstResult.location);
			}
		};
		TreeBuilder.prototype.getBaseCstVisitorConstructor = function() {
			if (isUndefined$1(this.baseCstVisitorConstructor)) {
				var newBaseCstVisitorConstructor = createBaseSemanticVisitorConstructor(this.className, this.allRuleNames);
				this.baseCstVisitorConstructor = newBaseCstVisitorConstructor;
				return newBaseCstVisitorConstructor;
			}
			return this.baseCstVisitorConstructor;
		};
		TreeBuilder.prototype.getBaseCstVisitorConstructorWithDefaults = function() {
			if (isUndefined$1(this.baseCstVisitorWithDefaultsConstructor)) {
				var newConstructor = createBaseVisitorConstructorWithDefaults(this.className, this.allRuleNames, this.getBaseCstVisitorConstructor());
				this.baseCstVisitorWithDefaultsConstructor = newConstructor;
				return newConstructor;
			}
			return this.baseCstVisitorWithDefaultsConstructor;
		};
		TreeBuilder.prototype.nestedRuleBeforeClause = function(methodOpts, laKey) {
			var nestedName;
			if (methodOpts.NAME !== void 0) {
				nestedName = methodOpts.NAME;
				this.nestedRuleInvocationStateUpdate(nestedName, laKey);
				return nestedName;
			} else return;
		};
		TreeBuilder.prototype.nestedAltBeforeClause = function(methodOpts, occurrence, methodKeyIdx, altIdx) {
			var shortName = getKeyForAltIndex(this.getLastExplicitRuleShortName(), methodKeyIdx, occurrence, altIdx);
			var nestedName;
			if (methodOpts.NAME !== void 0) {
				nestedName = methodOpts.NAME;
				this.nestedRuleInvocationStateUpdate(nestedName, shortName);
				return {
					shortName,
					nestedName
				};
			} else return;
		};
		TreeBuilder.prototype.nestedRuleFinallyClause = function(laKey, nestedName) {
			var cstStack = this.CST_STACK;
			var nestedRuleCst = cstStack[cstStack.length - 1];
			this.nestedRuleFinallyStateUpdate();
			var parentCstNode = cstStack[cstStack.length - 1];
			addNoneTerminalToCst(parentCstNode, nestedName, nestedRuleCst);
			this.setNodeLocationFromNode(parentCstNode.location, nestedRuleCst.location);
		};
		TreeBuilder.prototype.getLastExplicitRuleShortName = function() {
			var lastExplictIndex = this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length - 1];
			return this.RULE_STACK[lastExplictIndex];
		};
		TreeBuilder.prototype.getLastExplicitRuleShortNameNoCst = function() {
			var ruleStack = this.RULE_STACK;
			return ruleStack[ruleStack.length - 1];
		};
		TreeBuilder.prototype.getPreviousExplicitRuleShortName = function() {
			var lastExplicitIndex = this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length - 2];
			return this.RULE_STACK[lastExplicitIndex];
		};
		TreeBuilder.prototype.getPreviousExplicitRuleShortNameNoCst = function() {
			var ruleStack = this.RULE_STACK;
			return ruleStack[ruleStack.length - 2];
		};
		TreeBuilder.prototype.getLastExplicitRuleOccurrenceIndex = function() {
			var lastExplicitIndex = this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length - 1];
			return this.RULE_OCCURRENCE_STACK[lastExplicitIndex];
		};
		TreeBuilder.prototype.getLastExplicitRuleOccurrenceIndexNoCst = function() {
			var occurrenceStack = this.RULE_OCCURRENCE_STACK;
			return occurrenceStack[occurrenceStack.length - 1];
		};
		TreeBuilder.prototype.nestedRuleInvocationStateUpdate = function(nestedRuleName, shortNameKey) {
			this.RULE_OCCURRENCE_STACK.push(1);
			this.RULE_STACK.push(shortNameKey);
			this.cstNestedInvocationStateUpdate(nestedRuleName, shortNameKey);
		};
		TreeBuilder.prototype.nestedRuleFinallyStateUpdate = function() {
			this.RULE_STACK.pop();
			this.RULE_OCCURRENCE_STACK.pop();
			this.cstNestedFinallyStateUpdate();
		};
		return TreeBuilder;
	}();
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/parser/traits/lexer_adapter.js
var LexerAdapter;
var init_lexer_adapter = __esmMin((() => {
	init_parser();
	LexerAdapter = function() {
		function LexerAdapter() {}
		LexerAdapter.prototype.initLexerAdapter = function() {
			this.tokVector = [];
			this.tokVectorLength = 0;
			this.currIdx = -1;
		};
		Object.defineProperty(LexerAdapter.prototype, "input", {
			get: function() {
				return this.tokVector;
			},
			set: function(newInput) {
				if (this.selfAnalysisDone !== true) throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");
				this.reset();
				this.tokVector = newInput;
				this.tokVectorLength = newInput.length;
			},
			enumerable: true,
			configurable: true
		});
		LexerAdapter.prototype.SKIP_TOKEN = function() {
			if (this.currIdx <= this.tokVector.length - 2) {
				this.consumeToken();
				return this.LA(1);
			} else return END_OF_FILE;
		};
		LexerAdapter.prototype.LA = function(howMuch) {
			var soughtIdx = this.currIdx + howMuch;
			if (soughtIdx < 0 || this.tokVectorLength <= soughtIdx) return END_OF_FILE;
			else return this.tokVector[soughtIdx];
		};
		LexerAdapter.prototype.consumeToken = function() {
			this.currIdx++;
		};
		LexerAdapter.prototype.exportLexerState = function() {
			return this.currIdx;
		};
		LexerAdapter.prototype.importLexerState = function(newState) {
			this.currIdx = newState;
		};
		LexerAdapter.prototype.resetLexerState = function() {
			this.currIdx = -1;
		};
		LexerAdapter.prototype.moveToTerminatedState = function() {
			this.currIdx = this.tokVector.length - 1;
		};
		LexerAdapter.prototype.getLexerPosition = function() {
			return this.exportLexerState();
		};
		return LexerAdapter;
	}();
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/parser/traits/recognizer_api.js
var RecognizerApi;
var init_recognizer_api = __esmMin((() => {
	init_utils();
	init_exceptions_public();
	init_parser();
	init_errors_public();
	init_checks();
	init_gast_public();
	RecognizerApi = function() {
		function RecognizerApi() {}
		RecognizerApi.prototype.ACTION = function(impl) {
			return impl.call(this);
		};
		RecognizerApi.prototype.consume = function(idx, tokType, options) {
			return this.consumeInternal(tokType, idx, options);
		};
		RecognizerApi.prototype.subrule = function(idx, ruleToCall, options) {
			return this.subruleInternal(ruleToCall, idx, options);
		};
		RecognizerApi.prototype.option = function(idx, actionORMethodDef) {
			return this.optionInternal(actionORMethodDef, idx);
		};
		RecognizerApi.prototype.or = function(idx, altsOrOpts) {
			return this.orInternal(altsOrOpts, idx);
		};
		RecognizerApi.prototype.many = function(idx, actionORMethodDef) {
			return this.manyInternal(idx, actionORMethodDef);
		};
		RecognizerApi.prototype.atLeastOne = function(idx, actionORMethodDef) {
			return this.atLeastOneInternal(idx, actionORMethodDef);
		};
		RecognizerApi.prototype.CONSUME = function(tokType, options) {
			return this.consumeInternal(tokType, 0, options);
		};
		RecognizerApi.prototype.CONSUME1 = function(tokType, options) {
			return this.consumeInternal(tokType, 1, options);
		};
		RecognizerApi.prototype.CONSUME2 = function(tokType, options) {
			return this.consumeInternal(tokType, 2, options);
		};
		RecognizerApi.prototype.CONSUME3 = function(tokType, options) {
			return this.consumeInternal(tokType, 3, options);
		};
		RecognizerApi.prototype.CONSUME4 = function(tokType, options) {
			return this.consumeInternal(tokType, 4, options);
		};
		RecognizerApi.prototype.CONSUME5 = function(tokType, options) {
			return this.consumeInternal(tokType, 5, options);
		};
		RecognizerApi.prototype.CONSUME6 = function(tokType, options) {
			return this.consumeInternal(tokType, 6, options);
		};
		RecognizerApi.prototype.CONSUME7 = function(tokType, options) {
			return this.consumeInternal(tokType, 7, options);
		};
		RecognizerApi.prototype.CONSUME8 = function(tokType, options) {
			return this.consumeInternal(tokType, 8, options);
		};
		RecognizerApi.prototype.CONSUME9 = function(tokType, options) {
			return this.consumeInternal(tokType, 9, options);
		};
		RecognizerApi.prototype.SUBRULE = function(ruleToCall, options) {
			return this.subruleInternal(ruleToCall, 0, options);
		};
		RecognizerApi.prototype.SUBRULE1 = function(ruleToCall, options) {
			return this.subruleInternal(ruleToCall, 1, options);
		};
		RecognizerApi.prototype.SUBRULE2 = function(ruleToCall, options) {
			return this.subruleInternal(ruleToCall, 2, options);
		};
		RecognizerApi.prototype.SUBRULE3 = function(ruleToCall, options) {
			return this.subruleInternal(ruleToCall, 3, options);
		};
		RecognizerApi.prototype.SUBRULE4 = function(ruleToCall, options) {
			return this.subruleInternal(ruleToCall, 4, options);
		};
		RecognizerApi.prototype.SUBRULE5 = function(ruleToCall, options) {
			return this.subruleInternal(ruleToCall, 5, options);
		};
		RecognizerApi.prototype.SUBRULE6 = function(ruleToCall, options) {
			return this.subruleInternal(ruleToCall, 6, options);
		};
		RecognizerApi.prototype.SUBRULE7 = function(ruleToCall, options) {
			return this.subruleInternal(ruleToCall, 7, options);
		};
		RecognizerApi.prototype.SUBRULE8 = function(ruleToCall, options) {
			return this.subruleInternal(ruleToCall, 8, options);
		};
		RecognizerApi.prototype.SUBRULE9 = function(ruleToCall, options) {
			return this.subruleInternal(ruleToCall, 9, options);
		};
		RecognizerApi.prototype.OPTION = function(actionORMethodDef) {
			return this.optionInternal(actionORMethodDef, 0);
		};
		RecognizerApi.prototype.OPTION1 = function(actionORMethodDef) {
			return this.optionInternal(actionORMethodDef, 1);
		};
		RecognizerApi.prototype.OPTION2 = function(actionORMethodDef) {
			return this.optionInternal(actionORMethodDef, 2);
		};
		RecognizerApi.prototype.OPTION3 = function(actionORMethodDef) {
			return this.optionInternal(actionORMethodDef, 3);
		};
		RecognizerApi.prototype.OPTION4 = function(actionORMethodDef) {
			return this.optionInternal(actionORMethodDef, 4);
		};
		RecognizerApi.prototype.OPTION5 = function(actionORMethodDef) {
			return this.optionInternal(actionORMethodDef, 5);
		};
		RecognizerApi.prototype.OPTION6 = function(actionORMethodDef) {
			return this.optionInternal(actionORMethodDef, 6);
		};
		RecognizerApi.prototype.OPTION7 = function(actionORMethodDef) {
			return this.optionInternal(actionORMethodDef, 7);
		};
		RecognizerApi.prototype.OPTION8 = function(actionORMethodDef) {
			return this.optionInternal(actionORMethodDef, 8);
		};
		RecognizerApi.prototype.OPTION9 = function(actionORMethodDef) {
			return this.optionInternal(actionORMethodDef, 9);
		};
		RecognizerApi.prototype.OR = function(altsOrOpts) {
			return this.orInternal(altsOrOpts, 0);
		};
		RecognizerApi.prototype.OR1 = function(altsOrOpts) {
			return this.orInternal(altsOrOpts, 1);
		};
		RecognizerApi.prototype.OR2 = function(altsOrOpts) {
			return this.orInternal(altsOrOpts, 2);
		};
		RecognizerApi.prototype.OR3 = function(altsOrOpts) {
			return this.orInternal(altsOrOpts, 3);
		};
		RecognizerApi.prototype.OR4 = function(altsOrOpts) {
			return this.orInternal(altsOrOpts, 4);
		};
		RecognizerApi.prototype.OR5 = function(altsOrOpts) {
			return this.orInternal(altsOrOpts, 5);
		};
		RecognizerApi.prototype.OR6 = function(altsOrOpts) {
			return this.orInternal(altsOrOpts, 6);
		};
		RecognizerApi.prototype.OR7 = function(altsOrOpts) {
			return this.orInternal(altsOrOpts, 7);
		};
		RecognizerApi.prototype.OR8 = function(altsOrOpts) {
			return this.orInternal(altsOrOpts, 8);
		};
		RecognizerApi.prototype.OR9 = function(altsOrOpts) {
			return this.orInternal(altsOrOpts, 9);
		};
		RecognizerApi.prototype.MANY = function(actionORMethodDef) {
			this.manyInternal(0, actionORMethodDef);
		};
		RecognizerApi.prototype.MANY1 = function(actionORMethodDef) {
			this.manyInternal(1, actionORMethodDef);
		};
		RecognizerApi.prototype.MANY2 = function(actionORMethodDef) {
			this.manyInternal(2, actionORMethodDef);
		};
		RecognizerApi.prototype.MANY3 = function(actionORMethodDef) {
			this.manyInternal(3, actionORMethodDef);
		};
		RecognizerApi.prototype.MANY4 = function(actionORMethodDef) {
			this.manyInternal(4, actionORMethodDef);
		};
		RecognizerApi.prototype.MANY5 = function(actionORMethodDef) {
			this.manyInternal(5, actionORMethodDef);
		};
		RecognizerApi.prototype.MANY6 = function(actionORMethodDef) {
			this.manyInternal(6, actionORMethodDef);
		};
		RecognizerApi.prototype.MANY7 = function(actionORMethodDef) {
			this.manyInternal(7, actionORMethodDef);
		};
		RecognizerApi.prototype.MANY8 = function(actionORMethodDef) {
			this.manyInternal(8, actionORMethodDef);
		};
		RecognizerApi.prototype.MANY9 = function(actionORMethodDef) {
			this.manyInternal(9, actionORMethodDef);
		};
		RecognizerApi.prototype.MANY_SEP = function(options) {
			this.manySepFirstInternal(0, options);
		};
		RecognizerApi.prototype.MANY_SEP1 = function(options) {
			this.manySepFirstInternal(1, options);
		};
		RecognizerApi.prototype.MANY_SEP2 = function(options) {
			this.manySepFirstInternal(2, options);
		};
		RecognizerApi.prototype.MANY_SEP3 = function(options) {
			this.manySepFirstInternal(3, options);
		};
		RecognizerApi.prototype.MANY_SEP4 = function(options) {
			this.manySepFirstInternal(4, options);
		};
		RecognizerApi.prototype.MANY_SEP5 = function(options) {
			this.manySepFirstInternal(5, options);
		};
		RecognizerApi.prototype.MANY_SEP6 = function(options) {
			this.manySepFirstInternal(6, options);
		};
		RecognizerApi.prototype.MANY_SEP7 = function(options) {
			this.manySepFirstInternal(7, options);
		};
		RecognizerApi.prototype.MANY_SEP8 = function(options) {
			this.manySepFirstInternal(8, options);
		};
		RecognizerApi.prototype.MANY_SEP9 = function(options) {
			this.manySepFirstInternal(9, options);
		};
		RecognizerApi.prototype.AT_LEAST_ONE = function(actionORMethodDef) {
			this.atLeastOneInternal(0, actionORMethodDef);
		};
		RecognizerApi.prototype.AT_LEAST_ONE1 = function(actionORMethodDef) {
			return this.atLeastOneInternal(1, actionORMethodDef);
		};
		RecognizerApi.prototype.AT_LEAST_ONE2 = function(actionORMethodDef) {
			this.atLeastOneInternal(2, actionORMethodDef);
		};
		RecognizerApi.prototype.AT_LEAST_ONE3 = function(actionORMethodDef) {
			this.atLeastOneInternal(3, actionORMethodDef);
		};
		RecognizerApi.prototype.AT_LEAST_ONE4 = function(actionORMethodDef) {
			this.atLeastOneInternal(4, actionORMethodDef);
		};
		RecognizerApi.prototype.AT_LEAST_ONE5 = function(actionORMethodDef) {
			this.atLeastOneInternal(5, actionORMethodDef);
		};
		RecognizerApi.prototype.AT_LEAST_ONE6 = function(actionORMethodDef) {
			this.atLeastOneInternal(6, actionORMethodDef);
		};
		RecognizerApi.prototype.AT_LEAST_ONE7 = function(actionORMethodDef) {
			this.atLeastOneInternal(7, actionORMethodDef);
		};
		RecognizerApi.prototype.AT_LEAST_ONE8 = function(actionORMethodDef) {
			this.atLeastOneInternal(8, actionORMethodDef);
		};
		RecognizerApi.prototype.AT_LEAST_ONE9 = function(actionORMethodDef) {
			this.atLeastOneInternal(9, actionORMethodDef);
		};
		RecognizerApi.prototype.AT_LEAST_ONE_SEP = function(options) {
			this.atLeastOneSepFirstInternal(0, options);
		};
		RecognizerApi.prototype.AT_LEAST_ONE_SEP1 = function(options) {
			this.atLeastOneSepFirstInternal(1, options);
		};
		RecognizerApi.prototype.AT_LEAST_ONE_SEP2 = function(options) {
			this.atLeastOneSepFirstInternal(2, options);
		};
		RecognizerApi.prototype.AT_LEAST_ONE_SEP3 = function(options) {
			this.atLeastOneSepFirstInternal(3, options);
		};
		RecognizerApi.prototype.AT_LEAST_ONE_SEP4 = function(options) {
			this.atLeastOneSepFirstInternal(4, options);
		};
		RecognizerApi.prototype.AT_LEAST_ONE_SEP5 = function(options) {
			this.atLeastOneSepFirstInternal(5, options);
		};
		RecognizerApi.prototype.AT_LEAST_ONE_SEP6 = function(options) {
			this.atLeastOneSepFirstInternal(6, options);
		};
		RecognizerApi.prototype.AT_LEAST_ONE_SEP7 = function(options) {
			this.atLeastOneSepFirstInternal(7, options);
		};
		RecognizerApi.prototype.AT_LEAST_ONE_SEP8 = function(options) {
			this.atLeastOneSepFirstInternal(8, options);
		};
		RecognizerApi.prototype.AT_LEAST_ONE_SEP9 = function(options) {
			this.atLeastOneSepFirstInternal(9, options);
		};
		RecognizerApi.prototype.RULE = function(name, implementation, config) {
			if (config === void 0) config = DEFAULT_RULE_CONFIG;
			if (contains(this.definedRulesNames, name)) {
				var error = {
					message: defaultGrammarValidatorErrorProvider.buildDuplicateRuleNameError({
						topLevelRule: name,
						grammarName: this.className
					}),
					type: ParserDefinitionErrorType.DUPLICATE_RULE_NAME,
					ruleName: name
				};
				this.definitionErrors.push(error);
			}
			this.definedRulesNames.push(name);
			var ruleImplementation = this.defineRule(name, implementation, config);
			this[name] = ruleImplementation;
			return ruleImplementation;
		};
		RecognizerApi.prototype.OVERRIDE_RULE = function(name, impl, config) {
			if (config === void 0) config = DEFAULT_RULE_CONFIG;
			var ruleErrors = [];
			ruleErrors = ruleErrors.concat(validateRuleIsOverridden(name, this.definedRulesNames, this.className));
			this.definitionErrors.push.apply(this.definitionErrors, ruleErrors);
			var ruleImplementation = this.defineRule(name, impl, config);
			this[name] = ruleImplementation;
			return ruleImplementation;
		};
		RecognizerApi.prototype.BACKTRACK = function(grammarRule, args) {
			return function() {
				this.isBackTrackingStack.push(1);
				var orgState = this.saveRecogState();
				try {
					grammarRule.apply(this, args);
					return true;
				} catch (e) {
					if (isRecognitionException(e)) return false;
					else throw e;
				} finally {
					this.reloadRecogState(orgState);
					this.isBackTrackingStack.pop();
				}
			};
		};
		RecognizerApi.prototype.getGAstProductions = function() {
			return this.gastProductionsCache;
		};
		RecognizerApi.prototype.getSerializedGastProductions = function() {
			return serializeGrammar(values(this.gastProductionsCache));
		};
		return RecognizerApi;
	}();
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/parser/traits/recognizer_engine.js
var RecognizerEngine;
var init_recognizer_engine = __esmMin((() => {
	init_utils();
	init_keys();
	init_exceptions_public();
	init_lookahead();
	init_interpreter();
	init_parser();
	init_recoverable();
	init_tokens_public();
	init_tokens();
	init_lang_extensions();
	RecognizerEngine = function() {
		function RecognizerEngine() {}
		RecognizerEngine.prototype.initRecognizerEngine = function(tokenVocabulary, config) {
			this.className = classNameFromInstance(this);
			this.shortRuleNameToFull = {};
			this.fullRuleNameToShort = {};
			this.ruleShortNameIdx = 256;
			this.tokenMatcher = tokenStructuredMatcherNoCategories;
			this.definedRulesNames = [];
			this.tokensMap = {};
			this.allRuleNames = [];
			this.isBackTrackingStack = [];
			this.RULE_STACK = [];
			this.RULE_OCCURRENCE_STACK = [];
			this.gastProductionsCache = {};
			if (has(config, "serializedGrammar")) throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n	See: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_6-0-0\n	For Further details.");
			if (isArray$1(tokenVocabulary)) {
				if (isEmpty(tokenVocabulary)) throw Error("A Token Vocabulary cannot be empty.\n	Note that the first argument for the parser constructor\n	is no longer a Token vector (since v4.0).");
				if (typeof tokenVocabulary[0].startOffset === "number") throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n	See: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_4-0-0\n	For Further details.");
			}
			if (isArray$1(tokenVocabulary)) this.tokensMap = reduce(tokenVocabulary, function(acc, tokType) {
				acc[tokType.name] = tokType;
				return acc;
			}, {});
			else if (has(tokenVocabulary, "modes") && every(flatten(values(tokenVocabulary.modes)), isTokenType)) this.tokensMap = reduce(uniq(flatten(values(tokenVocabulary.modes))), function(acc, tokType) {
				acc[tokType.name] = tokType;
				return acc;
			}, {});
			else if (isObject$1(tokenVocabulary)) this.tokensMap = cloneObj(tokenVocabulary);
			else throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");
			this.tokensMap["EOF"] = EOF;
			this.tokenMatcher = every(values(tokenVocabulary), function(tokenConstructor) {
				return isEmpty(tokenConstructor.categoryMatches);
			}) ? tokenStructuredMatcherNoCategories : tokenStructuredMatcher;
			augmentTokenTypes(values(this.tokensMap));
		};
		RecognizerEngine.prototype.defineRule = function(ruleName, impl, config) {
			if (this.selfAnalysisDone) throw Error("Grammar rule <" + ruleName + "> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.");
			var resyncEnabled = has(config, "resyncEnabled") ? config.resyncEnabled : DEFAULT_RULE_CONFIG.resyncEnabled;
			var recoveryValueFunc = has(config, "recoveryValueFunc") ? config.recoveryValueFunc : DEFAULT_RULE_CONFIG.recoveryValueFunc;
			var shortName = this.ruleShortNameIdx << 12;
			this.ruleShortNameIdx++;
			this.shortRuleNameToFull[shortName] = ruleName;
			this.fullRuleNameToShort[ruleName] = shortName;
			function invokeRuleWithTry(args) {
				try {
					if (this.outputCst === true) {
						impl.apply(this, args);
						var cst = this.CST_STACK[this.CST_STACK.length - 1];
						this.cstPostRule(cst);
						return cst;
					} else return impl.apply(this, args);
				} catch (e) {
					return this.invokeRuleCatch(e, resyncEnabled, recoveryValueFunc);
				} finally {
					this.ruleFinallyStateUpdate();
				}
			}
			var wrappedGrammarRule = function(idxInCallingRule, args) {
				if (idxInCallingRule === void 0) idxInCallingRule = 0;
				this.ruleInvocationStateUpdate(shortName, ruleName, idxInCallingRule);
				return invokeRuleWithTry.call(this, args);
			};
			var ruleNamePropName = "ruleName";
			wrappedGrammarRule[ruleNamePropName] = ruleName;
			wrappedGrammarRule["originalGrammarAction"] = impl;
			return wrappedGrammarRule;
		};
		RecognizerEngine.prototype.invokeRuleCatch = function(e, resyncEnabledConfig, recoveryValueFunc) {
			var isFirstInvokedRule = this.RULE_STACK.length === 1;
			var reSyncEnabled = resyncEnabledConfig && !this.isBackTracking() && this.recoveryEnabled;
			if (isRecognitionException(e)) {
				var recogError = e;
				if (reSyncEnabled) {
					var reSyncTokType = this.findReSyncTokenType();
					if (this.isInCurrentRuleReSyncSet(reSyncTokType)) {
						recogError.resyncedTokens = this.reSyncTo(reSyncTokType);
						if (this.outputCst) {
							var partialCstResult = this.CST_STACK[this.CST_STACK.length - 1];
							partialCstResult.recoveredNode = true;
							return partialCstResult;
						} else return recoveryValueFunc();
					} else {
						if (this.outputCst) {
							var partialCstResult = this.CST_STACK[this.CST_STACK.length - 1];
							partialCstResult.recoveredNode = true;
							recogError.partialCstResult = partialCstResult;
						}
						throw recogError;
					}
				} else if (isFirstInvokedRule) {
					this.moveToTerminatedState();
					return recoveryValueFunc();
				} else throw recogError;
			} else throw e;
		};
		RecognizerEngine.prototype.optionInternal = function(actionORMethodDef, occurrence) {
			var key = this.getKeyForAutomaticLookahead(512, occurrence);
			var nestedName = this.nestedRuleBeforeClause(actionORMethodDef, key);
			try {
				return this.optionInternalLogic(actionORMethodDef, occurrence, key);
			} finally {
				if (nestedName !== void 0) this.nestedRuleFinallyClause(key, nestedName);
			}
		};
		RecognizerEngine.prototype.optionInternalNoCst = function(actionORMethodDef, occurrence) {
			var key = this.getKeyForAutomaticLookahead(512, occurrence);
			return this.optionInternalLogic(actionORMethodDef, occurrence, key);
		};
		RecognizerEngine.prototype.optionInternalLogic = function(actionORMethodDef, occurrence, key) {
			var _this = this;
			var lookAheadFunc = this.getLaFuncFromCache(key);
			var action;
			var predicate;
			if (actionORMethodDef.DEF !== void 0) {
				action = actionORMethodDef.DEF;
				predicate = actionORMethodDef.GATE;
				if (predicate !== void 0) {
					var orgLookaheadFunction_1 = lookAheadFunc;
					lookAheadFunc = function() {
						return predicate.call(_this) && orgLookaheadFunction_1.call(_this);
					};
				}
			} else action = actionORMethodDef;
			if (lookAheadFunc.call(this) === true) return action.call(this);
		};
		RecognizerEngine.prototype.atLeastOneInternal = function(prodOccurrence, actionORMethodDef) {
			var laKey = this.getKeyForAutomaticLookahead(AT_LEAST_ONE_IDX, prodOccurrence);
			var nestedName = this.nestedRuleBeforeClause(actionORMethodDef, laKey);
			try {
				return this.atLeastOneInternalLogic(prodOccurrence, actionORMethodDef, laKey);
			} finally {
				if (nestedName !== void 0) this.nestedRuleFinallyClause(laKey, nestedName);
			}
		};
		RecognizerEngine.prototype.atLeastOneInternalNoCst = function(prodOccurrence, actionORMethodDef) {
			var key = this.getKeyForAutomaticLookahead(AT_LEAST_ONE_IDX, prodOccurrence);
			this.atLeastOneInternalLogic(prodOccurrence, actionORMethodDef, key);
		};
		RecognizerEngine.prototype.atLeastOneInternalLogic = function(prodOccurrence, actionORMethodDef, key) {
			var _this = this;
			var lookAheadFunc = this.getLaFuncFromCache(key);
			var action;
			var predicate;
			if (actionORMethodDef.DEF !== void 0) {
				action = actionORMethodDef.DEF;
				predicate = actionORMethodDef.GATE;
				if (predicate !== void 0) {
					var orgLookaheadFunction_2 = lookAheadFunc;
					lookAheadFunc = function() {
						return predicate.call(_this) && orgLookaheadFunction_2.call(_this);
					};
				}
			} else action = actionORMethodDef;
			if (lookAheadFunc.call(this) === true) {
				var notStuck = this.doSingleRepetition(action);
				while (lookAheadFunc.call(this) === true && notStuck === true) notStuck = this.doSingleRepetition(action);
			} else throw this.raiseEarlyExitException(prodOccurrence, PROD_TYPE.REPETITION_MANDATORY, actionORMethodDef.ERR_MSG);
			this.attemptInRepetitionRecovery(this.atLeastOneInternal, [prodOccurrence, actionORMethodDef], lookAheadFunc, AT_LEAST_ONE_IDX, prodOccurrence, NextTerminalAfterAtLeastOneWalker);
		};
		RecognizerEngine.prototype.atLeastOneSepFirstInternal = function(prodOccurrence, options) {
			var laKey = this.getKeyForAutomaticLookahead(AT_LEAST_ONE_SEP_IDX, prodOccurrence);
			var nestedName = this.nestedRuleBeforeClause(options, laKey);
			try {
				this.atLeastOneSepFirstInternalLogic(prodOccurrence, options, laKey);
			} finally {
				if (nestedName !== void 0) this.nestedRuleFinallyClause(laKey, nestedName);
			}
		};
		RecognizerEngine.prototype.atLeastOneSepFirstInternalNoCst = function(prodOccurrence, options) {
			var laKey = this.getKeyForAutomaticLookahead(AT_LEAST_ONE_SEP_IDX, prodOccurrence);
			this.atLeastOneSepFirstInternalLogic(prodOccurrence, options, laKey);
		};
		RecognizerEngine.prototype.atLeastOneSepFirstInternalLogic = function(prodOccurrence, options, key) {
			var _this = this;
			var action = options.DEF;
			var separator = options.SEP;
			if (this.getLaFuncFromCache(key).call(this) === true) {
				action.call(this);
				var separatorLookAheadFunc = function() {
					return _this.tokenMatcher(_this.LA(1), separator);
				};
				while (this.tokenMatcher(this.LA(1), separator) === true) {
					this.CONSUME(separator);
					action.call(this);
				}
				this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal, [
					prodOccurrence,
					separator,
					separatorLookAheadFunc,
					action,
					NextTerminalAfterAtLeastOneSepWalker
				], separatorLookAheadFunc, AT_LEAST_ONE_SEP_IDX, prodOccurrence, NextTerminalAfterAtLeastOneSepWalker);
			} else throw this.raiseEarlyExitException(prodOccurrence, PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR, options.ERR_MSG);
		};
		RecognizerEngine.prototype.manyInternal = function(prodOccurrence, actionORMethodDef) {
			var laKey = this.getKeyForAutomaticLookahead(768, prodOccurrence);
			var nestedName = this.nestedRuleBeforeClause(actionORMethodDef, laKey);
			try {
				return this.manyInternalLogic(prodOccurrence, actionORMethodDef, laKey);
			} finally {
				if (nestedName !== void 0) this.nestedRuleFinallyClause(laKey, nestedName);
			}
		};
		RecognizerEngine.prototype.manyInternalNoCst = function(prodOccurrence, actionORMethodDef) {
			var laKey = this.getKeyForAutomaticLookahead(768, prodOccurrence);
			return this.manyInternalLogic(prodOccurrence, actionORMethodDef, laKey);
		};
		RecognizerEngine.prototype.manyInternalLogic = function(prodOccurrence, actionORMethodDef, key) {
			var _this = this;
			var lookaheadFunction = this.getLaFuncFromCache(key);
			var action;
			var predicate;
			if (actionORMethodDef.DEF !== void 0) {
				action = actionORMethodDef.DEF;
				predicate = actionORMethodDef.GATE;
				if (predicate !== void 0) {
					var orgLookaheadFunction_3 = lookaheadFunction;
					lookaheadFunction = function() {
						return predicate.call(_this) && orgLookaheadFunction_3.call(_this);
					};
				}
			} else action = actionORMethodDef;
			var notStuck = true;
			while (lookaheadFunction.call(this) === true && notStuck === true) notStuck = this.doSingleRepetition(action);
			this.attemptInRepetitionRecovery(this.manyInternal, [prodOccurrence, actionORMethodDef], lookaheadFunction, 768, prodOccurrence, NextTerminalAfterManyWalker, notStuck);
		};
		RecognizerEngine.prototype.manySepFirstInternal = function(prodOccurrence, options) {
			var laKey = this.getKeyForAutomaticLookahead(MANY_SEP_IDX, prodOccurrence);
			var nestedName = this.nestedRuleBeforeClause(options, laKey);
			try {
				this.manySepFirstInternalLogic(prodOccurrence, options, laKey);
			} finally {
				if (nestedName !== void 0) this.nestedRuleFinallyClause(laKey, nestedName);
			}
		};
		RecognizerEngine.prototype.manySepFirstInternalNoCst = function(prodOccurrence, options) {
			var laKey = this.getKeyForAutomaticLookahead(MANY_SEP_IDX, prodOccurrence);
			this.manySepFirstInternalLogic(prodOccurrence, options, laKey);
		};
		RecognizerEngine.prototype.manySepFirstInternalLogic = function(prodOccurrence, options, key) {
			var _this = this;
			var action = options.DEF;
			var separator = options.SEP;
			if (this.getLaFuncFromCache(key).call(this) === true) {
				action.call(this);
				var separatorLookAheadFunc = function() {
					return _this.tokenMatcher(_this.LA(1), separator);
				};
				while (this.tokenMatcher(this.LA(1), separator) === true) {
					this.CONSUME(separator);
					action.call(this);
				}
				this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal, [
					prodOccurrence,
					separator,
					separatorLookAheadFunc,
					action,
					NextTerminalAfterManySepWalker
				], separatorLookAheadFunc, MANY_SEP_IDX, prodOccurrence, NextTerminalAfterManySepWalker);
			}
		};
		RecognizerEngine.prototype.repetitionSepSecondInternal = function(prodOccurrence, separator, separatorLookAheadFunc, action, nextTerminalAfterWalker) {
			while (separatorLookAheadFunc()) {
				this.CONSUME(separator);
				action.call(this);
			}
			/* istanbul ignore else */
			this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal, [
				prodOccurrence,
				separator,
				separatorLookAheadFunc,
				action,
				nextTerminalAfterWalker
			], separatorLookAheadFunc, AT_LEAST_ONE_SEP_IDX, prodOccurrence, nextTerminalAfterWalker);
		};
		RecognizerEngine.prototype.doSingleRepetition = function(action) {
			var beforeIteration = this.getLexerPosition();
			action.call(this);
			return this.getLexerPosition() > beforeIteration;
		};
		RecognizerEngine.prototype.orInternalNoCst = function(altsOrOpts, occurrence) {
			var alts = isArray$1(altsOrOpts) ? altsOrOpts : altsOrOpts.DEF;
			var laKey = this.getKeyForAutomaticLookahead(256, occurrence);
			var altIdxToTake = this.getLaFuncFromCache(laKey).call(this, alts);
			if (altIdxToTake !== void 0) return alts[altIdxToTake].ALT.call(this);
			this.raiseNoAltException(occurrence, altsOrOpts.ERR_MSG);
		};
		RecognizerEngine.prototype.orInternal = function(altsOrOpts, occurrence) {
			var laKey = this.getKeyForAutomaticLookahead(256, occurrence);
			var nestedName = this.nestedRuleBeforeClause(altsOrOpts, laKey);
			try {
				var alts = isArray$1(altsOrOpts) ? altsOrOpts : altsOrOpts.DEF;
				var altIdxToTake = this.getLaFuncFromCache(laKey).call(this, alts);
				if (altIdxToTake !== void 0) {
					var chosenAlternative = alts[altIdxToTake];
					var nestedAltBeforeClauseResult = this.nestedAltBeforeClause(chosenAlternative, occurrence, 256, altIdxToTake);
					try {
						return chosenAlternative.ALT.call(this);
					} finally {
						if (nestedAltBeforeClauseResult !== void 0) this.nestedRuleFinallyClause(nestedAltBeforeClauseResult.shortName, nestedAltBeforeClauseResult.nestedName);
					}
				}
				this.raiseNoAltException(occurrence, altsOrOpts.ERR_MSG);
			} finally {
				if (nestedName !== void 0) this.nestedRuleFinallyClause(laKey, nestedName);
			}
		};
		RecognizerEngine.prototype.ruleFinallyStateUpdate = function() {
			this.RULE_STACK.pop();
			this.RULE_OCCURRENCE_STACK.pop();
			this.cstFinallyStateUpdate();
			if (this.RULE_STACK.length === 0 && this.isAtEndOfInput() === false) {
				var firstRedundantTok = this.LA(1);
				var errMsg = this.errorMessageProvider.buildNotAllInputParsedMessage({
					firstRedundant: firstRedundantTok,
					ruleName: this.getCurrRuleFullName()
				});
				this.SAVE_ERROR(new NotAllInputParsedException(errMsg, firstRedundantTok));
			}
		};
		RecognizerEngine.prototype.subruleInternal = function(ruleToCall, idx, options) {
			var ruleResult;
			try {
				var args = options !== void 0 ? options.ARGS : void 0;
				ruleResult = ruleToCall.call(this, idx, args);
				this.cstPostNonTerminal(ruleResult, options !== void 0 && options.LABEL !== void 0 ? options.LABEL : ruleToCall.ruleName);
				return ruleResult;
			} catch (e) {
				this.subruleInternalError(e, options, ruleToCall.ruleName);
			}
		};
		RecognizerEngine.prototype.subruleInternalError = function(e, options, ruleName) {
			if (isRecognitionException(e) && e.partialCstResult !== void 0) {
				this.cstPostNonTerminal(e.partialCstResult, options !== void 0 && options.LABEL !== void 0 ? options.LABEL : ruleName);
				delete e.partialCstResult;
			}
			throw e;
		};
		RecognizerEngine.prototype.consumeInternal = function(tokType, idx, options) {
			var consumedToken;
			try {
				var nextToken = this.LA(1);
				if (this.tokenMatcher(nextToken, tokType) === true) {
					this.consumeToken();
					consumedToken = nextToken;
				} else this.consumeInternalError(tokType, nextToken, options);
			} catch (eFromConsumption) {
				consumedToken = this.consumeInternalRecovery(tokType, idx, eFromConsumption);
			}
			this.cstPostTerminal(options !== void 0 && options.LABEL !== void 0 ? options.LABEL : tokType.name, consumedToken);
			return consumedToken;
		};
		RecognizerEngine.prototype.consumeInternalError = function(tokType, nextToken, options) {
			var msg;
			var previousToken = this.LA(0);
			if (options !== void 0 && options.ERR_MSG) msg = options.ERR_MSG;
			else msg = this.errorMessageProvider.buildMismatchTokenMessage({
				expected: tokType,
				actual: nextToken,
				previous: previousToken,
				ruleName: this.getCurrRuleFullName()
			});
			throw this.SAVE_ERROR(new MismatchedTokenException(msg, nextToken, previousToken));
		};
		RecognizerEngine.prototype.consumeInternalRecovery = function(tokType, idx, eFromConsumption) {
			if (this.recoveryEnabled && eFromConsumption.name === "MismatchedTokenException" && !this.isBackTracking()) {
				var follows = this.getFollowsForInRuleRecovery(tokType, idx);
				try {
					return this.tryInRuleRecovery(tokType, follows);
				} catch (eFromInRuleRecovery) {
					if (eFromInRuleRecovery.name === "InRuleRecoveryException") throw eFromConsumption;
					else throw eFromInRuleRecovery;
				}
			} else throw eFromConsumption;
		};
		RecognizerEngine.prototype.saveRecogState = function() {
			var savedErrors = this.errors;
			var savedRuleStack = cloneArr(this.RULE_STACK);
			return {
				errors: savedErrors,
				lexerState: this.exportLexerState(),
				RULE_STACK: savedRuleStack,
				CST_STACK: this.CST_STACK,
				LAST_EXPLICIT_RULE_STACK: this.LAST_EXPLICIT_RULE_STACK
			};
		};
		RecognizerEngine.prototype.reloadRecogState = function(newState) {
			this.errors = newState.errors;
			this.importLexerState(newState.lexerState);
			this.RULE_STACK = newState.RULE_STACK;
		};
		RecognizerEngine.prototype.ruleInvocationStateUpdate = function(shortName, fullName, idxInCallingRule) {
			this.RULE_OCCURRENCE_STACK.push(idxInCallingRule);
			this.RULE_STACK.push(shortName);
			this.cstInvocationStateUpdate(fullName, shortName);
		};
		RecognizerEngine.prototype.isBackTracking = function() {
			return this.isBackTrackingStack.length !== 0;
		};
		RecognizerEngine.prototype.getCurrRuleFullName = function() {
			var shortName = this.getLastExplicitRuleShortName();
			return this.shortRuleNameToFull[shortName];
		};
		RecognizerEngine.prototype.shortRuleNameToFullName = function(shortName) {
			return this.shortRuleNameToFull[shortName];
		};
		RecognizerEngine.prototype.isAtEndOfInput = function() {
			return this.tokenMatcher(this.LA(1), EOF);
		};
		RecognizerEngine.prototype.reset = function() {
			this.resetLexerState();
			this.isBackTrackingStack = [];
			this.errors = [];
			this.RULE_STACK = [];
			this.LAST_EXPLICIT_RULE_STACK = [];
			this.CST_STACK = [];
			this.RULE_OCCURRENCE_STACK = [];
		};
		return RecognizerEngine;
	}();
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/parser/traits/error_handler.js
var ErrorHandler;
var init_error_handler = __esmMin((() => {
	init_exceptions_public();
	init_utils();
	init_lookahead();
	init_parser();
	ErrorHandler = function() {
		function ErrorHandler() {}
		ErrorHandler.prototype.initErrorHandler = function(config) {
			this._errors = [];
			this.errorMessageProvider = defaults$1(config.errorMessageProvider, DEFAULT_PARSER_CONFIG.errorMessageProvider);
		};
		ErrorHandler.prototype.SAVE_ERROR = function(error) {
			if (isRecognitionException(error)) {
				error.context = {
					ruleStack: this.getHumanReadableRuleStack(),
					ruleOccurrenceStack: cloneArr(this.RULE_OCCURRENCE_STACK)
				};
				this._errors.push(error);
				return error;
			} else throw Error("Trying to save an Error which is not a RecognitionException");
		};
		Object.defineProperty(ErrorHandler.prototype, "errors", {
			get: function() {
				return cloneArr(this._errors);
			},
			set: function(newErrors) {
				this._errors = newErrors;
			},
			enumerable: true,
			configurable: true
		});
		ErrorHandler.prototype.raiseEarlyExitException = function(occurrence, prodType, userDefinedErrMsg) {
			var ruleName = this.getCurrRuleFullName();
			var ruleGrammar = this.getGAstProductions()[ruleName];
			var insideProdPaths = getLookaheadPathsForOptionalProd(occurrence, ruleGrammar, prodType, this.maxLookahead)[0];
			var actualTokens = [];
			for (var i = 1; i <= this.maxLookahead; i++) actualTokens.push(this.LA(i));
			var msg = this.errorMessageProvider.buildEarlyExitMessage({
				expectedIterationPaths: insideProdPaths,
				actual: actualTokens,
				previous: this.LA(0),
				customUserDescription: userDefinedErrMsg,
				ruleName
			});
			throw this.SAVE_ERROR(new EarlyExitException(msg, this.LA(1), this.LA(0)));
		};
		ErrorHandler.prototype.raiseNoAltException = function(occurrence, errMsgTypes) {
			var ruleName = this.getCurrRuleFullName();
			var ruleGrammar = this.getGAstProductions()[ruleName];
			var lookAheadPathsPerAlternative = getLookaheadPathsForOr(occurrence, ruleGrammar, this.maxLookahead);
			var actualTokens = [];
			for (var i = 1; i <= this.maxLookahead; i++) actualTokens.push(this.LA(i));
			var previousToken = this.LA(0);
			var errMsg = this.errorMessageProvider.buildNoViableAltMessage({
				expectedPathsPerAlt: lookAheadPathsPerAlternative,
				actual: actualTokens,
				previous: previousToken,
				customUserDescription: errMsgTypes,
				ruleName: this.getCurrRuleFullName()
			});
			throw this.SAVE_ERROR(new NoViableAltException(errMsg, this.LA(1), previousToken));
		};
		return ErrorHandler;
	}();
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/parser/traits/context_assist.js
var ContentAssist;
var init_context_assist = __esmMin((() => {
	init_interpreter();
	init_utils();
	ContentAssist = function() {
		function ContentAssist() {}
		ContentAssist.prototype.initContentAssist = function() {};
		ContentAssist.prototype.computeContentAssist = function(startRuleName, precedingInput) {
			var startRuleGast = this.gastProductionsCache[startRuleName];
			if (isUndefined$1(startRuleGast)) throw Error("Rule ->" + startRuleName + "<- does not exist in this grammar.");
			return nextPossibleTokensAfter([startRuleGast], precedingInput, this.tokenMatcher, this.maxLookahead);
		};
		ContentAssist.prototype.getNextPossibleTokenTypes = function(grammarPath) {
			var topRuleName = first$1(grammarPath.ruleStack);
			var topProduction = this.getGAstProductions()[topRuleName];
			return new NextAfterTokenWalker(topProduction, grammarPath).startWalking();
		};
		return ContentAssist;
	}();
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/parser/traits/gast_recorder.js
function recordProd(prodConstructor, mainProdArg, occurrence, handleSep) {
	if (handleSep === void 0) handleSep = false;
	assertMethodIdxIsValid(occurrence);
	var prevProd = peek(this.recordingProdStack);
	var grammarAction = isFunction$1(mainProdArg) ? mainProdArg : mainProdArg.DEF;
	var newProd = new prodConstructor({
		definition: [],
		idx: occurrence
	});
	if (has(mainProdArg, "NAME")) newProd.name = mainProdArg.NAME;
	if (handleSep) newProd.separator = mainProdArg.SEP;
	if (has(mainProdArg, "MAX_LOOKAHEAD")) newProd.maxLookahead = mainProdArg.MAX_LOOKAHEAD;
	this.recordingProdStack.push(newProd);
	grammarAction.call(this);
	prevProd.definition.push(newProd);
	this.recordingProdStack.pop();
	return RECORDING_NULL_OBJECT;
}
function recordOrProd(mainProdArg, occurrence) {
	var _this = this;
	assertMethodIdxIsValid(occurrence);
	var prevProd = peek(this.recordingProdStack);
	var hasOptions = isArray$1(mainProdArg) === false;
	var alts = hasOptions === false ? mainProdArg : mainProdArg.DEF;
	var newOrProd = new Alternation({
		definition: [],
		idx: occurrence,
		ignoreAmbiguities: hasOptions && mainProdArg.IGNORE_AMBIGUITIES === true
	});
	if (has(mainProdArg, "NAME")) newOrProd.name = mainProdArg.NAME;
	if (has(mainProdArg, "MAX_LOOKAHEAD")) newOrProd.maxLookahead = mainProdArg.MAX_LOOKAHEAD;
	newOrProd.hasPredicates = some$1(alts, function(currAlt) {
		return isFunction$1(currAlt.GATE);
	});
	prevProd.definition.push(newOrProd);
	forEach(alts, function(currAlt) {
		var currAltFlat = new Flat({ definition: [] });
		newOrProd.definition.push(currAltFlat);
		if (has(currAlt, "NAME")) currAltFlat.name = currAlt.NAME;
		if (has(currAlt, "IGNORE_AMBIGUITIES")) currAltFlat.ignoreAmbiguities = currAlt.IGNORE_AMBIGUITIES;
		else if (has(currAlt, "GATE")) currAltFlat.ignoreAmbiguities = true;
		_this.recordingProdStack.push(currAltFlat);
		currAlt.ALT.call(_this);
		_this.recordingProdStack.pop();
	});
	return RECORDING_NULL_OBJECT;
}
function getIdxSuffix(idx) {
	return idx === 0 ? "" : "" + idx;
}
function assertMethodIdxIsValid(idx) {
	if (idx < 0 || idx > MAX_METHOD_IDX) {
		var error = /* @__PURE__ */ new Error("Invalid DSL Method idx value: <" + idx + ">\n	" + ("Idx value must be a none negative value smaller than " + (MAX_METHOD_IDX + 1)));
		error.KNOWN_RECORDER_ERROR = true;
		throw error;
	}
}
var RECORDING_NULL_OBJECT, HANDLE_SEPARATOR, MAX_METHOD_IDX, RFT, RECORDING_PHASE_TOKEN, RECORDING_PHASE_CSTNODE, GastRecorder;
var init_gast_recorder = __esmMin((() => {
	init_utils();
	init_gast_public();
	init_lexer_public();
	init_tokens();
	init_tokens_public();
	init_parser();
	init_keys();
	RECORDING_NULL_OBJECT = { description: "This Object indicates the Parser is during Recording Phase" };
	Object.freeze(RECORDING_NULL_OBJECT);
	HANDLE_SEPARATOR = true;
	MAX_METHOD_IDX = Math.pow(2, 8) - 1;
	RFT = createToken({
		name: "RECORDING_PHASE_TOKEN",
		pattern: Lexer.NA
	});
	augmentTokenTypes([RFT]);
	RECORDING_PHASE_TOKEN = createTokenInstance(RFT, "This IToken indicates the Parser is in Recording Phase\n	See: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details", -1, -1, -1, -1, -1, -1);
	Object.freeze(RECORDING_PHASE_TOKEN);
	RECORDING_PHASE_CSTNODE = {
		name: "This CSTNode indicates the Parser is in Recording Phase\n	See: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",
		children: {}
	};
	GastRecorder = function() {
		function GastRecorder() {}
		GastRecorder.prototype.initGastRecorder = function(config) {
			this.recordingProdStack = [];
			this.RECORDING_PHASE = false;
		};
		GastRecorder.prototype.enableRecording = function() {
			var _this = this;
			this.RECORDING_PHASE = true;
			this.TRACE_INIT("Enable Recording", function() {
				var _loop_1 = function(i) {
					var idx = i > 0 ? i : "";
					_this["CONSUME" + idx] = function(arg1, arg2) {
						return this.consumeInternalRecord(arg1, i, arg2);
					};
					_this["SUBRULE" + idx] = function(arg1, arg2) {
						return this.subruleInternalRecord(arg1, i, arg2);
					};
					_this["OPTION" + idx] = function(arg1) {
						return this.optionInternalRecord(arg1, i);
					};
					_this["OR" + idx] = function(arg1) {
						return this.orInternalRecord(arg1, i);
					};
					_this["MANY" + idx] = function(arg1) {
						this.manyInternalRecord(i, arg1);
					};
					_this["MANY_SEP" + idx] = function(arg1) {
						this.manySepFirstInternalRecord(i, arg1);
					};
					_this["AT_LEAST_ONE" + idx] = function(arg1) {
						this.atLeastOneInternalRecord(i, arg1);
					};
					_this["AT_LEAST_ONE_SEP" + idx] = function(arg1) {
						this.atLeastOneSepFirstInternalRecord(i, arg1);
					};
				};
				/**
				* Warning Dark Voodoo Magic upcoming!
				* We are "replacing" the public parsing DSL methods API
				* With **new** alternative implementations on the Parser **instance**
				*
				* So far this is the only way I've found to avoid performance regressions during parsing time.
				* - Approx 30% performance regression was measured on Chrome 75 Canary when attempting to replace the "internal"
				*   implementations directly instead.
				*/
				for (var i = 0; i < 10; i++) _loop_1(i);
				_this["consume"] = function(idx, arg1, arg2) {
					return this.consumeInternalRecord(arg1, idx, arg2);
				};
				_this["subrule"] = function(idx, arg1, arg2) {
					return this.subruleInternalRecord(arg1, idx, arg2);
				};
				_this["option"] = function(idx, arg1) {
					return this.optionInternalRecord(arg1, idx);
				};
				_this["or"] = function(idx, arg1) {
					return this.orInternalRecord(arg1, idx);
				};
				_this["many"] = function(idx, arg1) {
					this.manyInternalRecord(idx, arg1);
				};
				_this["atLeastOne"] = function(idx, arg1) {
					this.atLeastOneInternalRecord(idx, arg1);
				};
				_this.ACTION = _this.ACTION_RECORD;
				_this.BACKTRACK = _this.BACKTRACK_RECORD;
				_this.LA = _this.LA_RECORD;
			});
		};
		GastRecorder.prototype.disableRecording = function() {
			var _this = this;
			this.RECORDING_PHASE = false;
			this.TRACE_INIT("Deleting Recording methods", function() {
				for (var i = 0; i < 10; i++) {
					var idx = i > 0 ? i : "";
					delete _this["CONSUME" + idx];
					delete _this["SUBRULE" + idx];
					delete _this["OPTION" + idx];
					delete _this["OR" + idx];
					delete _this["MANY" + idx];
					delete _this["MANY_SEP" + idx];
					delete _this["AT_LEAST_ONE" + idx];
					delete _this["AT_LEAST_ONE_SEP" + idx];
				}
				delete _this["consume"];
				delete _this["subrule"];
				delete _this["option"];
				delete _this["or"];
				delete _this["many"];
				delete _this["atLeastOne"];
				delete _this.ACTION;
				delete _this.BACKTRACK;
				delete _this.LA;
			});
		};
		GastRecorder.prototype.ACTION_RECORD = function(impl) {};
		GastRecorder.prototype.BACKTRACK_RECORD = function(grammarRule, args) {
			return function() {
				return true;
			};
		};
		GastRecorder.prototype.LA_RECORD = function(howMuch) {
			return END_OF_FILE;
		};
		GastRecorder.prototype.topLevelRuleRecord = function(name, def) {
			try {
				var newTopLevelRule = new Rule$1({
					definition: [],
					name
				});
				newTopLevelRule.name = name;
				this.recordingProdStack.push(newTopLevelRule);
				def.call(this);
				this.recordingProdStack.pop();
				return newTopLevelRule;
			} catch (originalError) {
				if (originalError.KNOWN_RECORDER_ERROR !== true) try {
					originalError.message = originalError.message + "\n	 This error was thrown during the \"grammar recording phase\" For more info see:\n	https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording";
				} catch (mutabilityError) {
					throw originalError;
				}
				throw originalError;
			}
		};
		GastRecorder.prototype.optionInternalRecord = function(actionORMethodDef, occurrence) {
			return recordProd.call(this, Option, actionORMethodDef, occurrence);
		};
		GastRecorder.prototype.atLeastOneInternalRecord = function(occurrence, actionORMethodDef) {
			recordProd.call(this, RepetitionMandatory, actionORMethodDef, occurrence);
		};
		GastRecorder.prototype.atLeastOneSepFirstInternalRecord = function(occurrence, options) {
			recordProd.call(this, RepetitionMandatoryWithSeparator, options, occurrence, HANDLE_SEPARATOR);
		};
		GastRecorder.prototype.manyInternalRecord = function(occurrence, actionORMethodDef) {
			recordProd.call(this, Repetition, actionORMethodDef, occurrence);
		};
		GastRecorder.prototype.manySepFirstInternalRecord = function(occurrence, options) {
			recordProd.call(this, RepetitionWithSeparator, options, occurrence, HANDLE_SEPARATOR);
		};
		GastRecorder.prototype.orInternalRecord = function(altsOrOpts, occurrence) {
			return recordOrProd.call(this, altsOrOpts, occurrence);
		};
		GastRecorder.prototype.subruleInternalRecord = function(ruleToCall, occurrence, options) {
			assertMethodIdxIsValid(occurrence);
			if (!ruleToCall || has(ruleToCall, "ruleName") === false) {
				var error = /* @__PURE__ */ new Error("<SUBRULE" + getIdxSuffix(occurrence) + "> argument is invalid" + (" expecting a Parser method reference but got: <" + JSON.stringify(ruleToCall) + ">") + ("\n inside top level rule: <" + this.recordingProdStack[0].name + ">"));
				error.KNOWN_RECORDER_ERROR = true;
				throw error;
			}
			var prevProd = peek(this.recordingProdStack);
			var ruleName = ruleToCall["ruleName"];
			var newNoneTerminal = new NonTerminal({
				idx: occurrence,
				nonTerminalName: ruleName,
				referencedRule: void 0
			});
			prevProd.definition.push(newNoneTerminal);
			return this.outputCst ? RECORDING_PHASE_CSTNODE : RECORDING_NULL_OBJECT;
		};
		GastRecorder.prototype.consumeInternalRecord = function(tokType, occurrence, options) {
			assertMethodIdxIsValid(occurrence);
			if (!hasShortKeyProperty(tokType)) {
				var error = /* @__PURE__ */ new Error("<CONSUME" + getIdxSuffix(occurrence) + "> argument is invalid" + (" expecting a TokenType reference but got: <" + JSON.stringify(tokType) + ">") + ("\n inside top level rule: <" + this.recordingProdStack[0].name + ">"));
				error.KNOWN_RECORDER_ERROR = true;
				throw error;
			}
			var prevProd = peek(this.recordingProdStack);
			var newNoneTerminal = new Terminal({
				idx: occurrence,
				terminalType: tokType
			});
			prevProd.definition.push(newNoneTerminal);
			return RECORDING_PHASE_TOKEN;
		};
		return GastRecorder;
	}();
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/parser/traits/perf_tracer.js
var PerformanceTracer;
var init_perf_tracer = __esmMin((() => {
	init_utils();
	init_parser();
	PerformanceTracer = function() {
		function PerformanceTracer() {}
		PerformanceTracer.prototype.initPerformanceTracer = function(config) {
			if (has(config, "traceInitPerf")) {
				var userTraceInitPerf = config.traceInitPerf;
				var traceIsNumber = typeof userTraceInitPerf === "number";
				this.traceInitMaxIdent = traceIsNumber ? userTraceInitPerf : Infinity;
				this.traceInitPerf = traceIsNumber ? userTraceInitPerf > 0 : userTraceInitPerf;
			} else {
				this.traceInitMaxIdent = 0;
				this.traceInitPerf = DEFAULT_PARSER_CONFIG.traceInitPerf;
			}
			this.traceInitIndent = -1;
		};
		PerformanceTracer.prototype.TRACE_INIT = function(phaseDesc, phaseImpl) {
			if (this.traceInitPerf === true) {
				this.traceInitIndent++;
				var indent = new Array(this.traceInitIndent + 1).join("	");
				if (this.traceInitIndent < this.traceInitMaxIdent) console.log(indent + "--> <" + phaseDesc + ">");
				var _a = timer(phaseImpl), time = _a.time, value = _a.value;
				/* istanbul ignore next - Difficult to reproduce specific performance behavior (>10ms) in tests */
				var traceMethod = time > 10 ? console.warn : console.log;
				if (this.traceInitIndent < this.traceInitMaxIdent) traceMethod(indent + "<-- <" + phaseDesc + "> time: " + time + "ms");
				this.traceInitIndent--;
				return value;
			} else return phaseImpl();
		};
		return PerformanceTracer;
	}();
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/parse/parser/parser.js
function EMPTY_ALT(value) {
	if (value === void 0) value = void 0;
	return function() {
		return value;
	};
}
var __extends, END_OF_FILE, DEFAULT_PARSER_CONFIG, DEFAULT_RULE_CONFIG, ParserDefinitionErrorType, Parser, EmbeddedActionsParser;
var init_parser = __esmMin((() => {
	init_utils();
	init_follow();
	init_tokens_public();
	init_cst();
	init_errors_public();
	init_gast_resolver_public();
	init_recoverable();
	init_looksahead();
	init_tree_builder();
	init_lexer_adapter();
	init_recognizer_api();
	init_recognizer_engine();
	init_error_handler();
	init_context_assist();
	init_gast_recorder();
	init_perf_tracer();
	__extends = (function() {
		var extendStatics = function(d, b) {
			extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
				d.__proto__ = b;
			} || function(d, b) {
				for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
			};
			return extendStatics(d, b);
		};
		return function(d, b) {
			extendStatics(d, b);
			function __() {
				this.constructor = d;
			}
			d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
		};
	})();
	END_OF_FILE = createTokenInstance(EOF, "", NaN, NaN, NaN, NaN, NaN, NaN);
	Object.freeze(END_OF_FILE);
	DEFAULT_PARSER_CONFIG = Object.freeze({
		recoveryEnabled: false,
		maxLookahead: 4,
		ignoredIssues: {},
		dynamicTokensEnabled: false,
		outputCst: true,
		errorMessageProvider: defaultParserErrorProvider,
		nodeLocationTracking: "none",
		traceInitPerf: false,
		skipValidations: false
	});
	DEFAULT_RULE_CONFIG = Object.freeze({
		recoveryValueFunc: function() {},
		resyncEnabled: true
	});
	(function(ParserDefinitionErrorType) {
		ParserDefinitionErrorType[ParserDefinitionErrorType["INVALID_RULE_NAME"] = 0] = "INVALID_RULE_NAME";
		ParserDefinitionErrorType[ParserDefinitionErrorType["DUPLICATE_RULE_NAME"] = 1] = "DUPLICATE_RULE_NAME";
		ParserDefinitionErrorType[ParserDefinitionErrorType["INVALID_RULE_OVERRIDE"] = 2] = "INVALID_RULE_OVERRIDE";
		ParserDefinitionErrorType[ParserDefinitionErrorType["DUPLICATE_PRODUCTIONS"] = 3] = "DUPLICATE_PRODUCTIONS";
		ParserDefinitionErrorType[ParserDefinitionErrorType["UNRESOLVED_SUBRULE_REF"] = 4] = "UNRESOLVED_SUBRULE_REF";
		ParserDefinitionErrorType[ParserDefinitionErrorType["LEFT_RECURSION"] = 5] = "LEFT_RECURSION";
		ParserDefinitionErrorType[ParserDefinitionErrorType["NONE_LAST_EMPTY_ALT"] = 6] = "NONE_LAST_EMPTY_ALT";
		ParserDefinitionErrorType[ParserDefinitionErrorType["AMBIGUOUS_ALTS"] = 7] = "AMBIGUOUS_ALTS";
		ParserDefinitionErrorType[ParserDefinitionErrorType["CONFLICT_TOKENS_RULES_NAMESPACE"] = 8] = "CONFLICT_TOKENS_RULES_NAMESPACE";
		ParserDefinitionErrorType[ParserDefinitionErrorType["INVALID_TOKEN_NAME"] = 9] = "INVALID_TOKEN_NAME";
		ParserDefinitionErrorType[ParserDefinitionErrorType["INVALID_NESTED_RULE_NAME"] = 10] = "INVALID_NESTED_RULE_NAME";
		ParserDefinitionErrorType[ParserDefinitionErrorType["DUPLICATE_NESTED_NAME"] = 11] = "DUPLICATE_NESTED_NAME";
		ParserDefinitionErrorType[ParserDefinitionErrorType["NO_NON_EMPTY_LOOKAHEAD"] = 12] = "NO_NON_EMPTY_LOOKAHEAD";
		ParserDefinitionErrorType[ParserDefinitionErrorType["AMBIGUOUS_PREFIX_ALTS"] = 13] = "AMBIGUOUS_PREFIX_ALTS";
		ParserDefinitionErrorType[ParserDefinitionErrorType["TOO_MANY_ALTS"] = 14] = "TOO_MANY_ALTS";
	})(ParserDefinitionErrorType || (ParserDefinitionErrorType = {}));
	Parser = function() {
		function Parser(tokenVocabulary, config) {
			if (config === void 0) config = DEFAULT_PARSER_CONFIG;
			this.ignoredIssues = DEFAULT_PARSER_CONFIG.ignoredIssues;
			this.definitionErrors = [];
			this.selfAnalysisDone = false;
			var that = this;
			that.initErrorHandler(config);
			that.initLexerAdapter();
			that.initLooksAhead(config);
			that.initRecognizerEngine(tokenVocabulary, config);
			that.initRecoverable(config);
			that.initTreeBuilder(config);
			that.initContentAssist();
			that.initGastRecorder(config);
			that.initPerformanceTracer(config);
			/* istanbul ignore if - complete over-kill to test this, we should only add a test when we actually hard deprecate it and throw an error... */
			if (has(config, "ignoredIssues") && config.ignoredIssues !== DEFAULT_PARSER_CONFIG.ignoredIssues) PRINT_WARNING("The <ignoredIssues> IParserConfig property is soft-deprecated and will be removed in future versions.\n	Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.");
			this.ignoredIssues = has(config, "ignoredIssues") ? config.ignoredIssues : DEFAULT_PARSER_CONFIG.ignoredIssues;
			this.skipValidations = has(config, "skipValidations") ? config.skipValidations : DEFAULT_PARSER_CONFIG.skipValidations;
		}
		/**
		*  @deprecated use the **instance** method with the same name instead
		*/
		Parser.performSelfAnalysis = function(parserInstance) {
			parserInstance.performSelfAnalysis();
		};
		Parser.prototype.performSelfAnalysis = function() {
			var _this = this;
			this.TRACE_INIT("performSelfAnalysis", function() {
				var defErrorsMsgs;
				_this.selfAnalysisDone = true;
				var className = _this.className;
				_this.TRACE_INIT("toFastProps", function() {
					toFastProperties(_this);
				});
				_this.TRACE_INIT("Grammar Recording", function() {
					try {
						_this.enableRecording();
						forEach(_this.definedRulesNames, function(currRuleName) {
							var originalGrammarAction = _this[currRuleName]["originalGrammarAction"];
							var recordedRuleGast = void 0;
							_this.TRACE_INIT(currRuleName + " Rule", function() {
								recordedRuleGast = _this.topLevelRuleRecord(currRuleName, originalGrammarAction);
							});
							_this.gastProductionsCache[currRuleName] = recordedRuleGast;
						});
					} finally {
						_this.disableRecording();
					}
				});
				var resolverErrors = [];
				_this.TRACE_INIT("Grammar Resolving", function() {
					resolverErrors = resolveGrammar({ rules: values(_this.gastProductionsCache) });
					_this.definitionErrors.push.apply(_this.definitionErrors, resolverErrors);
				});
				_this.TRACE_INIT("Grammar Validations", function() {
					if (isEmpty(resolverErrors) && _this.skipValidations === false) {
						var validationErrors = validateGrammar({
							rules: values(_this.gastProductionsCache),
							maxLookahead: _this.maxLookahead,
							tokenTypes: values(_this.tokensMap),
							ignoredIssues: _this.ignoredIssues,
							errMsgProvider: defaultGrammarValidatorErrorProvider,
							grammarName: className
						});
						_this.definitionErrors.push.apply(_this.definitionErrors, validationErrors);
					}
				});
				if (isEmpty(_this.definitionErrors)) {
					if (_this.recoveryEnabled) _this.TRACE_INIT("computeAllProdsFollows", function() {
						_this.resyncFollows = computeAllProdsFollows(values(_this.gastProductionsCache));
					});
					_this.TRACE_INIT("ComputeLookaheadFunctions", function() {
						_this.preComputeLookaheadFunctions(values(_this.gastProductionsCache));
					});
				}
				_this.TRACE_INIT("expandAllNestedRuleNames", function() {
					_this.allRuleNames = expandAllNestedRuleNames(values(_this.gastProductionsCache), _this.fullRuleNameToShort).allRuleNames;
				});
				if (!Parser.DEFER_DEFINITION_ERRORS_HANDLING && !isEmpty(_this.definitionErrors)) {
					defErrorsMsgs = map$3(_this.definitionErrors, function(defError) {
						return defError.message;
					});
					throw new Error("Parser Definition Errors detected:\n " + defErrorsMsgs.join("\n-------------------------------\n"));
				}
			});
		};
		Parser.DEFER_DEFINITION_ERRORS_HANDLING = false;
		return Parser;
	}();
	applyMixins(Parser, [
		Recoverable,
		LooksAhead,
		TreeBuilder,
		LexerAdapter,
		RecognizerEngine,
		RecognizerApi,
		ErrorHandler,
		ContentAssist,
		GastRecorder,
		PerformanceTracer
	]);
	(function(_super) {
		__extends(CstParser, _super);
		function CstParser(tokenVocabulary, config) {
			if (config === void 0) config = DEFAULT_PARSER_CONFIG;
			var _this = this;
			var configClone = cloneObj(config);
			configClone.outputCst = true;
			_this = _super.call(this, tokenVocabulary, configClone) || this;
			return _this;
		}
		return CstParser;
	})(Parser);
	EmbeddedActionsParser = function(_super) {
		__extends(EmbeddedActionsParser, _super);
		function EmbeddedActionsParser(tokenVocabulary, config) {
			if (config === void 0) config = DEFAULT_PARSER_CONFIG;
			var _this = this;
			var configClone = cloneObj(config);
			configClone.outputCst = false;
			_this = _super.call(this, tokenVocabulary, configClone) || this;
			return _this;
		}
		return EmbeddedActionsParser;
	}(Parser);
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/generate/generate.js
var init_generate = __esmMin((() => {
	init_gast_public();
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/generate/generate_public.js
var init_generate_public = __esmMin((() => {
	init_generate();
}));
//#endregion
//#region ../../node_modules/chevrotain/lib_esm/src/api.js
var init_api = __esmMin((() => {
	init_parser();
	init_lexer_public();
	init_tokens_public();
	init_errors_public();
	init_exceptions_public();
	init_lexer_errors_public();
	init_gast_public();
	init_gast_visitor_public();
	init_gast_resolver_public();
	init_generate_public();
}));
//#endregion
//#region ../../node_modules/hyperformula/es/parser/Ast.mjs
init_api();
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var parsingError = (type, message) => ({
	type,
	message
});
/**
* Represents types of parsing errors.
*/
var ParsingErrorType;
(function(ParsingErrorType) {
	ParsingErrorType["LexingError"] = "LexingError";
	ParsingErrorType["ParserError"] = "ParsingError";
	ParsingErrorType["StaticOffsetError"] = "StaticOffsetError";
	ParsingErrorType["StaticOffsetOutOfRangeError"] = "StaticOffsetOutOfRangeError";
	ParsingErrorType["RangeOffsetNotAllowed"] = "RangeOffsetNotAllowed";
	ParsingErrorType["InvalidRangeSize"] = "InvalidRangeSize";
})(ParsingErrorType || (ParsingErrorType = {}));
var AstNodeType;
(function(AstNodeType) {
	AstNodeType["EMPTY"] = "EMPTY";
	AstNodeType["NUMBER"] = "NUMBER";
	AstNodeType["STRING"] = "STRING";
	AstNodeType["MINUS_UNARY_OP"] = "MINUS_UNARY_OP";
	AstNodeType["PLUS_UNARY_OP"] = "PLUS_UNARY_OP";
	AstNodeType["PERCENT_OP"] = "PERCENT_OP";
	AstNodeType["CONCATENATE_OP"] = "CONCATENATE_OP";
	AstNodeType["EQUALS_OP"] = "EQUALS_OP";
	AstNodeType["NOT_EQUAL_OP"] = "NOT_EQUAL_OP";
	AstNodeType["GREATER_THAN_OP"] = "GREATER_THAN_OP";
	AstNodeType["LESS_THAN_OP"] = "LESS_THAN_OP";
	AstNodeType["GREATER_THAN_OR_EQUAL_OP"] = "GREATER_THAN_OR_EQUAL_OP";
	AstNodeType["LESS_THAN_OR_EQUAL_OP"] = "LESS_THAN_OR_EQUAL_OP";
	AstNodeType["PLUS_OP"] = "PLUS_OP";
	AstNodeType["MINUS_OP"] = "MINUS_OP";
	AstNodeType["TIMES_OP"] = "TIMES_OP";
	AstNodeType["DIV_OP"] = "DIV_OP";
	AstNodeType["POWER_OP"] = "POWER_OP";
	AstNodeType["FUNCTION_CALL"] = "FUNCTION_CALL";
	AstNodeType["NAMED_EXPRESSION"] = "NAMED_EXPRESSION";
	AstNodeType["PARENTHESIS"] = "PARENTHESES";
	AstNodeType["CELL_REFERENCE"] = "CELL_REFERENCE";
	AstNodeType["CELL_RANGE"] = "CELL_RANGE";
	AstNodeType["COLUMN_RANGE"] = "COLUMN_RANGE";
	AstNodeType["ROW_RANGE"] = "ROW_RANGE";
	AstNodeType["ERROR"] = "ERROR";
	AstNodeType["ERROR_WITH_RAW_INPUT"] = "ERROR_WITH_RAW_INPUT";
	AstNodeType["ARRAY"] = "ARRAY";
})(AstNodeType || (AstNodeType = {}));
var RangeSheetReferenceType;
(function(RangeSheetReferenceType) {
	RangeSheetReferenceType[RangeSheetReferenceType["RELATIVE"] = 0] = "RELATIVE";
	RangeSheetReferenceType[RangeSheetReferenceType["START_ABSOLUTE"] = 1] = "START_ABSOLUTE";
	RangeSheetReferenceType[RangeSheetReferenceType["BOTH_ABSOLUTE"] = 2] = "BOTH_ABSOLUTE";
})(RangeSheetReferenceType || (RangeSheetReferenceType = {}));
var buildEmptyArgAst = (leadingWhitespace) => ({
	type: AstNodeType.EMPTY,
	leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image
});
var buildNumberAst = (value, leadingWhitespace) => ({
	type: AstNodeType.NUMBER,
	value,
	leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image
});
var buildStringAst = (token) => {
	var _a;
	return {
		type: AstNodeType.STRING,
		value: token.image.slice(1, -1),
		leadingWhitespace: (_a = token.leadingWhitespace) === null || _a === void 0 ? void 0 : _a.image
	};
};
var buildCellReferenceAst = (reference, leadingWhitespace) => ({
	type: AstNodeType.CELL_REFERENCE,
	reference,
	leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image
});
var buildCellRangeAst = (start, end, sheetReferenceType, leadingWhitespace) => {
	assertRangeConsistency(start, end, sheetReferenceType);
	return {
		type: AstNodeType.CELL_RANGE,
		start,
		end,
		sheetReferenceType,
		leadingWhitespace
	};
};
var buildColumnRangeAst = (start, end, sheetReferenceType, leadingWhitespace) => {
	assertRangeConsistency(start, end, sheetReferenceType);
	return {
		type: AstNodeType.COLUMN_RANGE,
		start,
		end,
		sheetReferenceType,
		leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image
	};
};
var buildRowRangeAst = (start, end, sheetReferenceType, leadingWhitespace) => {
	assertRangeConsistency(start, end, sheetReferenceType);
	return {
		type: AstNodeType.ROW_RANGE,
		start,
		end,
		sheetReferenceType,
		leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image
	};
};
var buildConcatenateOpAst = (left, right, leadingWhitespace) => ({
	type: AstNodeType.CONCATENATE_OP,
	left,
	right,
	leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image
});
var buildEqualsOpAst = (left, right, leadingWhitespace) => ({
	type: AstNodeType.EQUALS_OP,
	left,
	right,
	leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image
});
var buildNotEqualOpAst = (left, right, leadingWhitespace) => ({
	type: AstNodeType.NOT_EQUAL_OP,
	left,
	right,
	leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image
});
var buildGreaterThanOpAst = (left, right, leadingWhitespace) => ({
	type: AstNodeType.GREATER_THAN_OP,
	left,
	right,
	leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image
});
var buildLessThanOpAst = (left, right, leadingWhitespace) => ({
	type: AstNodeType.LESS_THAN_OP,
	left,
	right,
	leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image
});
var buildGreaterThanOrEqualOpAst = (left, right, leadingWhitespace) => ({
	type: AstNodeType.GREATER_THAN_OR_EQUAL_OP,
	left,
	right,
	leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image
});
var buildLessThanOrEqualOpAst = (left, right, leadingWhitespace) => ({
	type: AstNodeType.LESS_THAN_OR_EQUAL_OP,
	left,
	right,
	leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image
});
var buildPlusOpAst = (left, right, leadingWhitespace) => ({
	type: AstNodeType.PLUS_OP,
	left,
	right,
	leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image
});
var buildMinusOpAst = (left, right, leadingWhitespace) => ({
	type: AstNodeType.MINUS_OP,
	left,
	right,
	leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image
});
var buildTimesOpAst = (left, right, leadingWhitespace) => ({
	type: AstNodeType.TIMES_OP,
	left,
	right,
	leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image
});
var buildDivOpAst = (left, right, leadingWhitespace) => ({
	type: AstNodeType.DIV_OP,
	left,
	right,
	leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image
});
var buildPowerOpAst = (left, right, leadingWhitespace) => ({
	type: AstNodeType.POWER_OP,
	left,
	right,
	leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image
});
var buildMinusUnaryOpAst = (value, leadingWhitespace) => ({
	type: AstNodeType.MINUS_UNARY_OP,
	value,
	leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image
});
var buildPlusUnaryOpAst = (value, leadingWhitespace) => ({
	type: AstNodeType.PLUS_UNARY_OP,
	value,
	leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image
});
var buildPercentOpAst = (value, leadingWhitespace) => ({
	type: AstNodeType.PERCENT_OP,
	value,
	leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image
});
var buildProcedureAst = (procedureName, args, leadingWhitespace, internalWhitespace, hyperlink) => ({
	type: AstNodeType.FUNCTION_CALL,
	procedureName,
	args,
	leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image,
	internalWhitespace: internalWhitespace === null || internalWhitespace === void 0 ? void 0 : internalWhitespace.image,
	hyperlink
});
var buildArrayAst = (args, leadingWhitespace, internalWhitespace) => ({
	type: AstNodeType.ARRAY,
	args,
	leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image,
	internalWhitespace: internalWhitespace === null || internalWhitespace === void 0 ? void 0 : internalWhitespace.image
});
var buildNamedExpressionAst = (expressionName, leadingWhitespace) => ({
	type: AstNodeType.NAMED_EXPRESSION,
	expressionName,
	leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image
});
var buildParenthesisAst = (expression, leadingWhitespace, internalWhitespace) => ({
	type: AstNodeType.PARENTHESIS,
	expression,
	leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image,
	internalWhitespace: internalWhitespace === null || internalWhitespace === void 0 ? void 0 : internalWhitespace.image
});
var buildCellErrorAst = (error, leadingWhitespace) => ({
	type: AstNodeType.ERROR,
	error,
	leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image
});
var buildErrorWithRawInputAst = (rawInput, error, leadingWhitespace) => ({
	type: AstNodeType.ERROR_WITH_RAW_INPUT,
	error,
	rawInput,
	leadingWhitespace: leadingWhitespace === null || leadingWhitespace === void 0 ? void 0 : leadingWhitespace.image
});
var buildParsingErrorAst = () => ({
	type: AstNodeType.ERROR,
	error: CellError.parsingError()
});
function assertRangeConsistency(start, end, sheetReferenceType) {
	if (start.sheet !== void 0 && end.sheet === void 0 || start.sheet === void 0 && end.sheet !== void 0) throw new Error("Start address inconsistent with end address");
	if (start.sheet === void 0 && sheetReferenceType !== RangeSheetReferenceType.RELATIVE || start.sheet !== void 0 && sheetReferenceType === RangeSheetReferenceType.RELATIVE) throw new Error("Sheet address inconsistent with sheet reference type");
}
function imageWithWhitespace(image, leadingWhitespace) {
	return (leadingWhitespace !== null && leadingWhitespace !== void 0 ? leadingWhitespace : "") + image;
}
//#endregion
//#region ../../node_modules/hyperformula/es/parser/binaryOpTokenMap.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var binaryOpTokenMap = {
	[AstNodeType.PLUS_OP]: "+",
	[AstNodeType.MINUS_OP]: "-",
	[AstNodeType.TIMES_OP]: "*",
	[AstNodeType.DIV_OP]: "/",
	[AstNodeType.CONCATENATE_OP]: "&",
	[AstNodeType.POWER_OP]: "^",
	[AstNodeType.EQUALS_OP]: "=",
	[AstNodeType.NOT_EQUAL_OP]: "<>",
	[AstNodeType.GREATER_THAN_OP]: ">",
	[AstNodeType.GREATER_THAN_OR_EQUAL_OP]: ">=",
	[AstNodeType.LESS_THAN_OP]: "<",
	[AstNodeType.LESS_THAN_OR_EQUAL_OP]: "<="
};
//#endregion
//#region ../../node_modules/hyperformula/es/parser/Cache.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var buildCacheEntry = (ast, relativeDependencies, hasVolatileFunction, hasStructuralChangeFunction) => ({
	ast,
	relativeDependencies,
	hasVolatileFunction,
	hasStructuralChangeFunction
});
var Cache = class {
	constructor(functionRegistry) {
		this.functionRegistry = functionRegistry;
		this.cache = /* @__PURE__ */ new Map();
	}
	set(hash, ast) {
		const cacheEntry = buildCacheEntry(ast, collectDependencies(ast, this.functionRegistry), doesContainFunctions(ast, this.functionRegistry.isFunctionVolatile), doesContainFunctions(ast, this.functionRegistry.isFunctionDependentOnSheetStructureChange));
		this.cache.set(hash, cacheEntry);
		return cacheEntry;
	}
	get(hash) {
		return this.cache.get(hash);
	}
	maybeSetAndThenGet(hash, ast) {
		const entryFromCache = this.cache.get(hash);
		if (entryFromCache !== void 0) return entryFromCache.ast;
		else {
			this.set(hash, ast);
			return ast;
		}
	}
};
var doesContainFunctions = (ast, functionCriterion) => {
	switch (ast.type) {
		case AstNodeType.EMPTY:
		case AstNodeType.NUMBER:
		case AstNodeType.STRING:
		case AstNodeType.ERROR:
		case AstNodeType.ERROR_WITH_RAW_INPUT:
		case AstNodeType.CELL_REFERENCE:
		case AstNodeType.CELL_RANGE:
		case AstNodeType.COLUMN_RANGE:
		case AstNodeType.ROW_RANGE:
		case AstNodeType.NAMED_EXPRESSION: return false;
		case AstNodeType.PERCENT_OP:
		case AstNodeType.PLUS_UNARY_OP:
		case AstNodeType.MINUS_UNARY_OP: return doesContainFunctions(ast.value, functionCriterion);
		case AstNodeType.CONCATENATE_OP:
		case AstNodeType.EQUALS_OP:
		case AstNodeType.NOT_EQUAL_OP:
		case AstNodeType.LESS_THAN_OP:
		case AstNodeType.GREATER_THAN_OP:
		case AstNodeType.LESS_THAN_OR_EQUAL_OP:
		case AstNodeType.GREATER_THAN_OR_EQUAL_OP:
		case AstNodeType.MINUS_OP:
		case AstNodeType.PLUS_OP:
		case AstNodeType.TIMES_OP:
		case AstNodeType.DIV_OP:
		case AstNodeType.POWER_OP: return doesContainFunctions(ast.left, functionCriterion) || doesContainFunctions(ast.right, functionCriterion);
		case AstNodeType.PARENTHESIS: return doesContainFunctions(ast.expression, functionCriterion);
		case AstNodeType.FUNCTION_CALL:
			if (functionCriterion(ast.procedureName)) return true;
			return ast.args.some((arg) => doesContainFunctions(arg, functionCriterion));
		case AstNodeType.ARRAY: return ast.args.some((row) => row.some((arg) => doesContainFunctions(arg, functionCriterion)));
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/error-message.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* This is a class for detailed error messages across HyperFormula.
*/
var ErrorMessage = class {};
ErrorMessage.DistinctSigns = "Distinct signs.";
ErrorMessage.WrongArgNumber = "Wrong number of arguments.";
ErrorMessage.EmptyArg = "Empty function argument.";
ErrorMessage.EmptyArray = "Empty array not allowed.";
ErrorMessage.ArrayDimensions = "Array dimensions are not compatible.";
ErrorMessage.NoSpaceForArrayResult = "No space for array result.";
ErrorMessage.ValueSmall = "Value too small.";
ErrorMessage.ValueLarge = "Value too large.";
ErrorMessage.BadCriterion = "Incorrect criterion.";
ErrorMessage.RangeManySheets = "Range spans more than one sheet.";
ErrorMessage.CellRangeExpected = "Cell range expected.";
ErrorMessage.WrongDimension = "Wrong range dimension.";
ErrorMessage.ScalarExpected = "Cell range not allowed.";
ErrorMessage.NumberCoercion = "Value cannot be coerced to number.";
ErrorMessage.NumberExpected = "Number argument expected.";
ErrorMessage.IntegerExpected = "Value needs to be an integer.";
ErrorMessage.BadMode = "Mode not recognized.";
ErrorMessage.DateBounds = "Date outside of bounds.";
ErrorMessage.OutOfSheet = "Resulting reference is out of the sheet.";
ErrorMessage.WrongType = "Wrong type of argument.";
ErrorMessage.NaN = "NaN or infinite value encountered.";
ErrorMessage.EqualLength = "Ranges need to be of equal length.";
ErrorMessage.Negative = "Value cannot be negative.";
ErrorMessage.NotBinary = "String does not represent a binary number.";
ErrorMessage.NotOctal = "String does not represent an octal number.";
ErrorMessage.NotHex = "String does not represent a hexadecimal number.";
ErrorMessage.EndStartPeriod = "End period needs to be at least start period.";
ErrorMessage.CellRefExpected = "Cell reference expected.";
ErrorMessage.EmptyRange = "Empty range not allowed.";
ErrorMessage.BadRef = "Address is not correct.";
ErrorMessage.NumberRange = "Number-only range expected.";
ErrorMessage.ValueNotFound = "Value not found.";
ErrorMessage.ValueBaseLarge = "Value in base too large.";
ErrorMessage.ValueBaseSmall = "Value in base too small.";
ErrorMessage.ValueBaseLong = "Value in base too long.";
ErrorMessage.NegativeLength = "Length cannot be negative.";
ErrorMessage.PatternNotFound = "Pattern not found.";
ErrorMessage.OneValue = "Needs at least one value.";
ErrorMessage.TwoValues = "Range needs to contain at least two elements.";
ErrorMessage.ThreeValues = "Range needs to contain at least three elements.";
ErrorMessage.IndexBounds = "Index out of bounds.";
ErrorMessage.IndexLarge = "Index too large.";
ErrorMessage.Formula = "Expected formula.";
ErrorMessage.NegativeCount = "Count cannot be negative.";
ErrorMessage.ParseError = "Parsing error.";
ErrorMessage.SheetRef = "Sheet does not exist.";
ErrorMessage.PeriodLong = "Period number cannot exceed life length.";
ErrorMessage.InvalidDate = "Invalid date.";
ErrorMessage.BitshiftLong = "Result of bitshift is too long.";
ErrorMessage.EmptyString = "Empty-string argument not allowed.";
ErrorMessage.LengthBounds = "Length out of bounds.";
ErrorMessage.NegativeTime = "Time cannot be negative.";
ErrorMessage.NoDefault = "No default option.";
ErrorMessage.NoConditionMet = "None of the conditions were met.";
ErrorMessage.Selector = "Selector cannot exceed the number of arguments.";
ErrorMessage.StartEndDate = "Start date needs to be earlier than end date.";
ErrorMessage.IncorrectDateTime = "String does not represent correct DateTime.";
ErrorMessage.CharacterCodeBounds = "Character code out of bounds.";
ErrorMessage.NonZero = "Argument cannot be 0.";
ErrorMessage.LessThanOne = "Argument cannot be less than 1.";
ErrorMessage.WeekendString = "Incorrect weekend bitmask string.";
ErrorMessage.InvalidRoman = "Invalid roman numeral.";
ErrorMessage.WrongOrder = "Wrong order of values.";
ErrorMessage.ComplexNumberExpected = "Complex number expected.";
ErrorMessage.ShouldBeIorJ = "Should be 'i' or 'j'.";
ErrorMessage.SizeMismatch = "Array dimensions mismatched.";
ErrorMessage.FunctionName = (arg) => `Function name ${arg} not recognized.`;
ErrorMessage.NamedExpressionName = (arg) => `Named expression ${arg} not recognized.`;
ErrorMessage.LicenseKey = (arg) => `License key is ${arg}.`;
//#endregion
//#region ../../node_modules/hyperformula/es/parser/CellReferenceMatcher.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Helper class for recognizing CellReference token in text
*/
var CellReferenceMatcher = class {
	constructor() {
		this.POSSIBLE_START_CHARACTERS = [
			...ALL_UNICODE_LETTERS_ARRAY,
			...ALL_DIGITS_ARRAY,
			"$",
			"'",
			"_"
		];
		this.cellReferenceRegexp = new RegExp(CELL_REFERENCE_WITH_NEXT_CHARACTER_PATTERN, "y");
	}
	/**
	* Method used by the lexer to recognize CellReference token in text
	*
	* Note: using 'y' sticky flag for a named expression which is not supported on IE11...
	* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky
	*/
	match(text, startOffset) {
		this.cellReferenceRegexp.lastIndex = startOffset;
		const execResult = this.cellReferenceRegexp.exec(text + "@");
		if (execResult == null || execResult[1] == null) return null;
		execResult[0] = execResult[1];
		return execResult;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/parser/NamedExpressionMatcher.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Helper class for recognizing NamedExpression token in text
*/
var NamedExpressionMatcher = class {
	constructor() {
		this.POSSIBLE_START_CHARACTERS = [...ALL_UNICODE_LETTERS_ARRAY, "_"];
		this.namedExpressionRegexp = new RegExp(NAMED_EXPRESSION_PATTERN, "y");
		this.r1c1CellRefRegexp = new RegExp(`^${R1C1_CELL_REFERENCE_PATTERN}$`);
	}
	/**
	* Method used by the lexer to recognize NamedExpression token in text
	*
	* Note: using 'y' sticky flag for a named expression which is not supported on IE11...
	* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky
	*/
	match(text, startOffset) {
		this.namedExpressionRegexp.lastIndex = startOffset;
		const execResult = this.namedExpressionRegexp.exec(text);
		if (execResult == null || execResult[0] == null) return null;
		if (this.r1c1CellRefRegexp.test(execResult[0])) return null;
		return execResult;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/parser/LexerConfig.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var AdditionOp = createToken({
	name: "AdditionOp",
	pattern: Lexer.NA
});
var PlusOp = createToken({
	name: "PlusOp",
	pattern: /\+/,
	categories: AdditionOp
});
var MinusOp = createToken({
	name: "MinusOp",
	pattern: /-/,
	categories: AdditionOp
});
var MultiplicationOp = createToken({
	name: "MultiplicationOp",
	pattern: Lexer.NA
});
var TimesOp = createToken({
	name: "TimesOp",
	pattern: /\*/,
	categories: MultiplicationOp
});
var DivOp = createToken({
	name: "DivOp",
	pattern: /\//,
	categories: MultiplicationOp
});
var PowerOp = createToken({
	name: "PowerOp",
	pattern: /\^/
});
var PercentOp = createToken({
	name: "PercentOp",
	pattern: /%/
});
var BooleanOp = createToken({
	name: "BooleanOp",
	pattern: Lexer.NA
});
var EqualsOp = createToken({
	name: "EqualsOp",
	pattern: /=/,
	categories: BooleanOp
});
var NotEqualOp = createToken({
	name: "NotEqualOp",
	pattern: /<>/,
	categories: BooleanOp
});
var GreaterThanOp = createToken({
	name: "GreaterThanOp",
	pattern: />/,
	categories: BooleanOp
});
var LessThanOp = createToken({
	name: "LessThanOp",
	pattern: /</,
	categories: BooleanOp
});
var GreaterThanOrEqualOp = createToken({
	name: "GreaterThanOrEqualOp",
	pattern: />=/,
	categories: BooleanOp
});
var LessThanOrEqualOp = createToken({
	name: "LessThanOrEqualOp",
	pattern: /<=/,
	categories: BooleanOp
});
var ConcatenateOp = createToken({
	name: "ConcatenateOp",
	pattern: /&/
});
var LParen = createToken({
	name: "LParen",
	pattern: /\(/
});
var RParen = createToken({
	name: "RParen",
	pattern: /\)/
});
var ArrayLParen = createToken({
	name: "ArrayLParen",
	pattern: /{/
});
var ArrayRParen = createToken({
	name: "ArrayRParen",
	pattern: /}/
});
var StringLiteral = createToken({
	name: "StringLiteral",
	pattern: /"([^"\\]*(\\.[^"\\]*)*)"/
});
var ErrorLiteral = createToken({
	name: "ErrorLiteral",
	pattern: /#[A-Za-z0-9\/]+[?!]?/
});
var RangeSeparator = createToken({
	name: "RangeSeparator",
	pattern: /* @__PURE__ */ new RegExp(":")
});
var ColumnRange = createToken({
	name: "ColumnRange",
	pattern: new RegExp(`${COLUMN_REFERENCE_PATTERN}:${COLUMN_REFERENCE_PATTERN}`)
});
var RowRange = createToken({
	name: "RowRange",
	pattern: new RegExp(`${ROW_REFERENCE_PATTERN}:${ROW_REFERENCE_PATTERN}`)
});
var ProcedureName = createToken({
	name: "ProcedureName",
	pattern: new RegExp(`([${UNICODE_LETTER_PATTERN}][${NON_RESERVED_CHARACTER_PATTERN}]*)\\(`)
});
var cellReferenceMatcher = new CellReferenceMatcher();
var CellReference = createToken({
	name: "CellReference",
	pattern: cellReferenceMatcher.match.bind(cellReferenceMatcher),
	start_chars_hint: cellReferenceMatcher.POSSIBLE_START_CHARACTERS,
	line_breaks: false
});
var namedExpressionMatcher = new NamedExpressionMatcher();
var NamedExpression = createToken({
	name: "NamedExpression",
	pattern: namedExpressionMatcher.match.bind(namedExpressionMatcher),
	start_chars_hint: namedExpressionMatcher.POSSIBLE_START_CHARACTERS,
	line_breaks: false
});
/**
* Builds the configuration object for the lexer
*/
var buildLexerConfig = (config) => {
	const offsetProcedureNameLiteral = config.translationPackage.getFunctionTranslation("OFFSET");
	const errorMapping = config.errorMapping;
	const functionMapping = config.translationPackage.buildFunctionMapping();
	const WhiteSpace = createToken({
		name: "WhiteSpace",
		pattern: new RegExp(config.ignoreWhiteSpace === "standard" ? ODFF_WHITESPACE_PATTERN : "\\s+")
	});
	const ArrayRowSeparator = createToken({
		name: "ArrayRowSep",
		pattern: config.arrayRowSeparator
	});
	const ArrayColSeparator = createToken({
		name: "ArrayColSep",
		pattern: config.arrayColumnSeparator
	});
	const NumberLiteral = createToken({
		name: "NumberLiteral",
		pattern: new RegExp(`(([${config.decimalSeparator}]\\d+)|(\\d+([${config.decimalSeparator}]\\d*)?))(e[+-]?\\d+)?`)
	});
	const OffsetProcedureName = createToken({
		name: "OffsetProcedureName",
		pattern: new RegExp(offsetProcedureNameLiteral, "i")
	});
	let ArgSeparator;
	let inject;
	if (config.functionArgSeparator === config.arrayColumnSeparator) {
		ArgSeparator = ArrayColSeparator;
		inject = [];
	} else if (config.functionArgSeparator === config.arrayRowSeparator) {
		ArgSeparator = ArrayRowSeparator;
		inject = [];
	} else {
		ArgSeparator = createToken({
			name: "ArgSeparator",
			pattern: config.functionArgSeparator
		});
		inject = [ArgSeparator];
	}
	const allTokens = [
		WhiteSpace,
		PlusOp,
		MinusOp,
		TimesOp,
		DivOp,
		PowerOp,
		EqualsOp,
		NotEqualOp,
		PercentOp,
		GreaterThanOrEqualOp,
		LessThanOrEqualOp,
		GreaterThanOp,
		LessThanOp,
		LParen,
		RParen,
		ArrayLParen,
		ArrayRParen,
		OffsetProcedureName,
		ProcedureName,
		RangeSeparator,
		...inject,
		ColumnRange,
		RowRange,
		NumberLiteral,
		StringLiteral,
		ErrorLiteral,
		ConcatenateOp,
		BooleanOp,
		AdditionOp,
		MultiplicationOp,
		CellReference,
		NamedExpression,
		ArrayRowSeparator,
		ArrayColSeparator
	];
	return {
		ArgSeparator,
		NumberLiteral,
		OffsetProcedureName,
		ArrayRowSeparator,
		ArrayColSeparator,
		WhiteSpace,
		allTokens,
		errorMapping,
		functionMapping,
		decimalSeparator: config.decimalSeparator,
		maxColumns: config.maxColumns,
		maxRows: config.maxRows
	};
};
//#endregion
//#region ../../node_modules/hyperformula/es/parser/FormulaParser.mjs
init_api();
/**
* LL(k) formula parser described using Chevrotain DSL
*
* It is equivalent to the grammar below:
*
* F -> '=' E <br/>
* B -> K < B | K >= B ... | K <br/>
* K -> E & K | E <br/>
* E -> M + E | M - E | M <br/>
* M -> W * M | W / M | W <br/>
* W -> C * W | C <br/>
* C -> N | R | O | A | P | num <br/>
* N -> '(' E ')' <br/>
* R -> A:OFFSET(..) | A:A <br/>
* O -> OFFSET(..) | OFFSET(..):A | OFFSET(..):OFFSET(..) <br/>
* A -> A1 | $A1 | A$1 | $A$1 <br/>
* P -> SUM(..) <br/>
*/
var FormulaParser = class FormulaParser extends EmbeddedActionsParser {
	constructor(lexerConfig, resolveSheetReference) {
		super(lexerConfig.allTokens, {
			outputCst: false,
			maxLookahead: 7
		});
		this.resolveSheetReference = resolveSheetReference;
		this.booleanExpressionOrEmpty = this.RULE("booleanExpressionOrEmpty", () => {
			return this.OR([{ ALT: () => this.SUBRULE(this.booleanExpression) }, { ALT: EMPTY_ALT(buildEmptyArgAst()) }]);
		});
		/**
		* Rule for procedure expressions: SUM(1,A1)
		*/
		this.procedureExpression = this.RULE("procedureExpression", () => {
			var _a;
			const procedureNameToken = this.CONSUME(ProcedureName);
			const procedureName = procedureNameToken.image.toUpperCase().slice(0, -1);
			const canonicalProcedureName = (_a = this.lexerConfig.functionMapping[procedureName]) !== null && _a !== void 0 ? _a : procedureName;
			const args = [];
			let argument = this.SUBRULE(this.booleanExpressionOrEmpty);
			this.MANY(() => {
				var _a;
				const separator = this.CONSUME(this.lexerConfig.ArgSeparator);
				if (argument.type === AstNodeType.EMPTY) argument.leadingWhitespace = (_a = separator.leadingWhitespace) === null || _a === void 0 ? void 0 : _a.image;
				args.push(argument);
				argument = this.SUBRULE2(this.booleanExpressionOrEmpty);
			});
			args.push(argument);
			if (args.length === 1 && args[0].type === AstNodeType.EMPTY) args.length = 0;
			const rParenToken = this.CONSUME(RParen);
			return buildProcedureAst(canonicalProcedureName, args, procedureNameToken.leadingWhitespace, rParenToken.leadingWhitespace);
		});
		this.namedExpressionExpression = this.RULE("namedExpressionExpression", () => {
			const name = this.CONSUME(NamedExpression);
			return buildNamedExpressionAst(name.image, name.leadingWhitespace);
		});
		/**
		* Rule for OFFSET() function expression
		*/
		this.offsetProcedureExpression = this.RULE("offsetProcedureExpression", () => {
			const args = [];
			this.CONSUME(this.lexerConfig.OffsetProcedureName);
			this.CONSUME(LParen);
			this.MANY_SEP({
				SEP: this.lexerConfig.ArgSeparator,
				DEF: () => {
					args.push(this.SUBRULE(this.booleanExpression));
				}
			});
			this.CONSUME(RParen);
			return this.handleOffsetHeuristic(args);
		});
		/**
		* Rule for column range, e.g., A:B, Sheet1!A:B, Sheet1!A:Sheet1!B
		*/
		this.columnRangeExpression = this.RULE("columnRangeExpression", () => {
			const range = this.CONSUME(ColumnRange);
			const [startImage, endImage] = range.image.split(":");
			const firstAddress = this.ACTION(() => columnAddressFromString(startImage, this.formulaAddress, this.resolveSheetReference));
			const secondAddress = this.ACTION(() => columnAddressFromString(endImage, this.formulaAddress, this.resolveSheetReference));
			if (firstAddress === void 0 || secondAddress === void 0) return buildCellErrorAst(new CellError(ErrorType.REF));
			if (firstAddress.exceedsSheetSizeLimits(this.lexerConfig.maxColumns) || secondAddress.exceedsSheetSizeLimits(this.lexerConfig.maxColumns)) return buildErrorWithRawInputAst(range.image, new CellError(ErrorType.NAME), range.leadingWhitespace);
			if (firstAddress.sheet === void 0 && secondAddress.sheet !== void 0) return this.parsingError(ParsingErrorType.ParserError, "Malformed range expression");
			const { firstEnd, secondEnd, sheetRefType } = FormulaParser.fixSheetIdsForRangeEnds(firstAddress, secondAddress);
			return buildColumnRangeAst(firstEnd, secondEnd, sheetRefType, range.leadingWhitespace);
		});
		/**
		* Rule for row range, e.g., 1:2, Sheet1!1:2, Sheet1!1:Sheet1!2
		*/
		this.rowRangeExpression = this.RULE("rowRangeExpression", () => {
			const range = this.CONSUME(RowRange);
			const [startImage, endImage] = range.image.split(":");
			const firstAddress = this.ACTION(() => rowAddressFromString(startImage, this.formulaAddress, this.resolveSheetReference));
			const secondAddress = this.ACTION(() => rowAddressFromString(endImage, this.formulaAddress, this.resolveSheetReference));
			if (firstAddress === void 0 || secondAddress === void 0) return buildCellErrorAst(new CellError(ErrorType.REF));
			if (firstAddress.exceedsSheetSizeLimits(this.lexerConfig.maxRows) || secondAddress.exceedsSheetSizeLimits(this.lexerConfig.maxRows)) return buildErrorWithRawInputAst(range.image, new CellError(ErrorType.NAME), range.leadingWhitespace);
			if (firstAddress.sheet === void 0 && secondAddress.sheet !== void 0) return this.parsingError(ParsingErrorType.ParserError, "Malformed range expression");
			const { firstEnd, secondEnd, sheetRefType } = FormulaParser.fixSheetIdsForRangeEnds(firstAddress, secondAddress);
			return buildRowRangeAst(firstEnd, secondEnd, sheetRefType, range.leadingWhitespace);
		});
		/**
		* Rule for cell reference expression (e.g., A1, $A1, A$1, $A$1, $Sheet42!A$17)
		*/
		this.cellReference = this.RULE("cellReference", () => {
			const cell = this.CONSUME(CellReference);
			const address = this.ACTION(() => {
				return cellAddressFromString(cell.image, this.formulaAddress, this.resolveSheetReference);
			});
			if (address === void 0) return buildErrorWithRawInputAst(cell.image, new CellError(ErrorType.REF), cell.leadingWhitespace);
			else if (address.exceedsSheetSizeLimits(this.lexerConfig.maxColumns, this.lexerConfig.maxRows)) return buildErrorWithRawInputAst(cell.image, new CellError(ErrorType.NAME), cell.leadingWhitespace);
			else return buildCellReferenceAst(address, cell.leadingWhitespace);
		});
		/**
		* Rule for end range reference expression with additional checks considering range start
		*/
		this.endRangeReference = this.RULE("endRangeReference", (start) => {
			var _a;
			const end = this.CONSUME(CellReference);
			const startAddress = this.ACTION(() => {
				return cellAddressFromString(start.image, this.formulaAddress, this.resolveSheetReference);
			});
			const endAddress = this.ACTION(() => {
				return cellAddressFromString(end.image, this.formulaAddress, this.resolveSheetReference);
			});
			if (startAddress === void 0 || endAddress === void 0) return this.ACTION(() => {
				return buildErrorWithRawInputAst(`${start.image}:${end.image}`, new CellError(ErrorType.REF), start.leadingWhitespace);
			});
			else if (startAddress.exceedsSheetSizeLimits(this.lexerConfig.maxColumns, this.lexerConfig.maxRows) || endAddress.exceedsSheetSizeLimits(this.lexerConfig.maxColumns, this.lexerConfig.maxRows)) return this.ACTION(() => {
				return buildErrorWithRawInputAst(`${start.image}:${end.image}`, new CellError(ErrorType.NAME), start.leadingWhitespace);
			});
			return this.buildCellRange(startAddress, endAddress, (_a = start.leadingWhitespace) === null || _a === void 0 ? void 0 : _a.image);
		});
		/**
		* Rule for end of range expression
		*
		* End of range may be a cell reference or OFFSET() function call
		*/
		this.endOfRangeExpression = this.RULE("endOfRangeExpression", (start) => {
			return this.OR([{ ALT: () => {
				return this.SUBRULE(this.endRangeReference, { ARGS: [start] });
			} }, { ALT: () => {
				var _a;
				const offsetProcedure = this.SUBRULE(this.offsetProcedureExpression);
				const startAddress = this.ACTION(() => {
					return cellAddressFromString(start.image, this.formulaAddress, this.resolveSheetReference);
				});
				if (startAddress === void 0) return buildCellErrorAst(new CellError(ErrorType.REF));
				if (offsetProcedure.type === AstNodeType.CELL_REFERENCE) return this.buildCellRange(startAddress, offsetProcedure.reference, (_a = start.leadingWhitespace) === null || _a === void 0 ? void 0 : _a.image);
				else return this.parsingError(ParsingErrorType.RangeOffsetNotAllowed, "Range offset not allowed here");
			} }]);
		});
		/**
		* Rule for cell ranges (e.g., A1:B$3, A1:OFFSET())
		*/
		this.cellRangeExpression = this.RULE("cellRangeExpression", () => {
			const start = this.CONSUME(CellReference);
			this.CONSUME2(RangeSeparator);
			return this.SUBRULE(this.endOfRangeExpression, { ARGS: [start] });
		});
		/**
		* Rule for end range reference expression starting with offset procedure with additional checks considering range start
		*/
		this.endRangeWithOffsetStartReference = this.RULE("endRangeWithOffsetStartReference", (start) => {
			const end = this.CONSUME(CellReference);
			const endAddress = this.ACTION(() => {
				return cellAddressFromString(end.image, this.formulaAddress, this.resolveSheetReference);
			});
			if (endAddress === void 0) return this.ACTION(() => {
				return buildCellErrorAst(new CellError(ErrorType.REF));
			});
			return this.buildCellRange(start.reference, endAddress, start.leadingWhitespace);
		});
		/**
		* Rule for end of range expression
		*
		* End of range may be a cell reference or OFFSET() function call
		*/
		this.endOfRangeWithOffsetStartExpression = this.RULE("endOfRangeWithOffsetStartExpression", (start) => {
			return this.OR([{ ALT: () => {
				return this.SUBRULE(this.endRangeWithOffsetStartReference, { ARGS: [start] });
			} }, { ALT: () => {
				const offsetProcedure = this.SUBRULE(this.offsetProcedureExpression);
				if (offsetProcedure.type === AstNodeType.CELL_REFERENCE) return this.buildCellRange(start.reference, offsetProcedure.reference, start.leadingWhitespace);
				else return this.parsingError(ParsingErrorType.RangeOffsetNotAllowed, "Range offset not allowed here");
			} }]);
		});
		/**
		* Rule for expressions that start with the OFFSET function.
		*
		* The OFFSET function can occur as a cell reference, or as a part of a cell range.
		* To preserve LL(k) properties, expressions that start with the OFFSET function need a separate rule.
		*
		* Depending on the presence of the {@link RangeSeparator}, a proper {@link Ast} node type is built.
		*/
		this.offsetExpression = this.RULE("offsetExpression", () => {
			const offsetProcedure = this.SUBRULE(this.offsetProcedureExpression);
			let end;
			this.OPTION(() => {
				this.CONSUME(RangeSeparator);
				if (offsetProcedure.type === AstNodeType.CELL_RANGE) end = this.parsingError(ParsingErrorType.RangeOffsetNotAllowed, "Range offset not allowed here");
				else end = this.SUBRULE(this.endOfRangeWithOffsetStartExpression, { ARGS: [offsetProcedure] });
			});
			if (end !== void 0) return end;
			return offsetProcedure;
		});
		this.insideArrayExpression = this.RULE("insideArrayExpression", () => {
			const ret = [[]];
			ret[ret.length - 1].push(this.SUBRULE(this.booleanExpression));
			this.MANY(() => {
				this.OR([{ ALT: () => {
					this.CONSUME(this.lexerConfig.ArrayColSeparator);
					ret[ret.length - 1].push(this.SUBRULE2(this.booleanExpression));
				} }, { ALT: () => {
					this.CONSUME(this.lexerConfig.ArrayRowSeparator);
					ret.push([]);
					ret[ret.length - 1].push(this.SUBRULE3(this.booleanExpression));
				} }]);
			});
			return buildArrayAst(ret);
		});
		/**
		* Rule for parenthesis expression
		*/
		this.parenthesisExpression = this.RULE("parenthesisExpression", () => {
			const lParenToken = this.CONSUME(LParen);
			const expression = this.SUBRULE(this.booleanExpression);
			const rParenToken = this.CONSUME(RParen);
			return buildParenthesisAst(expression, lParenToken.leadingWhitespace, rParenToken.leadingWhitespace);
		});
		this.arrayExpression = this.RULE("arrayExpression", () => {
			return this.OR([{ ALT: () => {
				const ltoken = this.CONSUME(ArrayLParen);
				const ret = this.SUBRULE(this.insideArrayExpression);
				const rtoken = this.CONSUME(ArrayRParen);
				return buildArrayAst(ret.args, ltoken.leadingWhitespace, rtoken.leadingWhitespace);
			} }, { ALT: () => this.SUBRULE(this.parenthesisExpression) }]);
		});
		this.numericStringToNumber = (input) => {
			const normalized = input.replace(this.lexerConfig.decimalSeparator, ".");
			return Number(normalized);
		};
		/**
		* Rule for positive atomic expressions
		*/
		this.positiveAtomicExpression = this.RULE("positiveAtomicExpression", () => {
			var _a;
			return this.OR((_a = this.atomicExpCache) !== null && _a !== void 0 ? _a : this.atomicExpCache = [
				{ ALT: () => this.SUBRULE(this.arrayExpression) },
				{ ALT: () => this.SUBRULE(this.cellRangeExpression) },
				{ ALT: () => this.SUBRULE(this.columnRangeExpression) },
				{ ALT: () => this.SUBRULE(this.rowRangeExpression) },
				{ ALT: () => this.SUBRULE(this.offsetExpression) },
				{ ALT: () => this.SUBRULE(this.cellReference) },
				{ ALT: () => this.SUBRULE(this.procedureExpression) },
				{ ALT: () => this.SUBRULE(this.namedExpressionExpression) },
				{ ALT: () => {
					const number = this.CONSUME(this.lexerConfig.NumberLiteral);
					return buildNumberAst(this.numericStringToNumber(number.image), number.leadingWhitespace);
				} },
				{ ALT: () => {
					return buildStringAst(this.CONSUME(StringLiteral));
				} },
				{ ALT: () => {
					const token = this.CONSUME(ErrorLiteral);
					const errString = token.image.toUpperCase();
					const errorType = this.lexerConfig.errorMapping[errString];
					if (errorType) return buildCellErrorAst(new CellError(errorType), token.leadingWhitespace);
					else return this.parsingError(ParsingErrorType.ParserError, "Unknown error literal");
				} }
			]);
		});
		this.rightUnaryOpAtomicExpression = this.RULE("rightUnaryOpAtomicExpression", () => {
			const positiveAtomicExpression = this.SUBRULE(this.positiveAtomicExpression);
			const percentage = this.OPTION(() => {
				return this.CONSUME(PercentOp);
			});
			if (percentage) return buildPercentOpAst(positiveAtomicExpression, percentage.leadingWhitespace);
			return positiveAtomicExpression;
		});
		/**
		* Rule for atomic expressions, which is positive atomic expression or negation of it
		*/
		this.atomicExpression = this.RULE("atomicExpression", () => {
			return this.OR([{ ALT: () => {
				const op = this.CONSUME(AdditionOp);
				const value = this.SUBRULE(this.atomicExpression);
				if (tokenMatcher(op, PlusOp)) return buildPlusUnaryOpAst(value, op.leadingWhitespace);
				else if (tokenMatcher(op, MinusOp)) return buildMinusUnaryOpAst(value, op.leadingWhitespace);
				else {
					this.customParsingError = parsingError(ParsingErrorType.ParserError, "Mismatched token type");
					return this.customParsingError;
				}
			} }, { ALT: () => this.SUBRULE2(this.rightUnaryOpAtomicExpression) }]);
		});
		/**
		* Rule for power expression
		*/
		this.powerExpression = this.RULE("powerExpression", () => {
			let lhs = this.SUBRULE(this.atomicExpression);
			this.MANY(() => {
				const op = this.CONSUME(PowerOp);
				const rhs = this.SUBRULE2(this.atomicExpression);
				if (tokenMatcher(op, PowerOp)) lhs = buildPowerOpAst(lhs, rhs, op.leadingWhitespace);
				else this.ACTION(() => {
					throw Error("Operator not supported");
				});
			});
			return lhs;
		});
		/**
		* Rule for multiplication category operators (e.g., 1 * A1, 1 / A1)
		*/
		this.multiplicationExpression = this.RULE("multiplicationExpression", () => {
			let lhs = this.SUBRULE(this.powerExpression);
			this.MANY(() => {
				const op = this.CONSUME(MultiplicationOp);
				const rhs = this.SUBRULE2(this.powerExpression);
				if (tokenMatcher(op, TimesOp)) lhs = buildTimesOpAst(lhs, rhs, op.leadingWhitespace);
				else if (tokenMatcher(op, DivOp)) lhs = buildDivOpAst(lhs, rhs, op.leadingWhitespace);
				else this.ACTION(() => {
					throw Error("Operator not supported");
				});
			});
			return lhs;
		});
		/**
		* Rule for addition category operators (e.g., 1 + A1, 1 - A1)
		*/
		this.additionExpression = this.RULE("additionExpression", () => {
			let lhs = this.SUBRULE(this.multiplicationExpression);
			this.MANY(() => {
				const op = this.CONSUME(AdditionOp);
				const rhs = this.SUBRULE2(this.multiplicationExpression);
				if (tokenMatcher(op, PlusOp)) lhs = buildPlusOpAst(lhs, rhs, op.leadingWhitespace);
				else if (tokenMatcher(op, MinusOp)) lhs = buildMinusOpAst(lhs, rhs, op.leadingWhitespace);
				else this.ACTION(() => {
					throw Error("Operator not supported");
				});
			});
			return lhs;
		});
		/**
		* Rule for concatenation operator expression (e.g., "=" & A1)
		*/
		this.concatenateExpression = this.RULE("concatenateExpression", () => {
			let lhs = this.SUBRULE(this.additionExpression);
			this.MANY(() => {
				const op = this.CONSUME(ConcatenateOp);
				const rhs = this.SUBRULE2(this.additionExpression);
				lhs = buildConcatenateOpAst(lhs, rhs, op.leadingWhitespace);
			});
			return lhs;
		});
		/**
		* Rule for boolean expression (e.g., 1 <= A1)
		*/
		this.booleanExpression = this.RULE("booleanExpression", () => {
			let lhs = this.SUBRULE(this.concatenateExpression);
			this.MANY(() => {
				const op = this.CONSUME(BooleanOp);
				const rhs = this.SUBRULE2(this.concatenateExpression);
				if (tokenMatcher(op, EqualsOp)) lhs = buildEqualsOpAst(lhs, rhs, op.leadingWhitespace);
				else if (tokenMatcher(op, NotEqualOp)) lhs = buildNotEqualOpAst(lhs, rhs, op.leadingWhitespace);
				else if (tokenMatcher(op, GreaterThanOp)) lhs = buildGreaterThanOpAst(lhs, rhs, op.leadingWhitespace);
				else if (tokenMatcher(op, LessThanOp)) lhs = buildLessThanOpAst(lhs, rhs, op.leadingWhitespace);
				else if (tokenMatcher(op, GreaterThanOrEqualOp)) lhs = buildGreaterThanOrEqualOpAst(lhs, rhs, op.leadingWhitespace);
				else if (tokenMatcher(op, LessThanOrEqualOp)) lhs = buildLessThanOrEqualOpAst(lhs, rhs, op.leadingWhitespace);
				else this.ACTION(() => {
					throw Error("Operator not supported");
				});
			});
			return lhs;
		});
		/**
		* Entry rule
		*/
		this.formula = this.RULE("formula", () => {
			this.CONSUME(EqualsOp);
			return this.SUBRULE(this.booleanExpression);
		});
		this.lexerConfig = lexerConfig;
		this.formulaAddress = simpleCellAddress(0, 0, 0);
		this.performSelfAnalysis();
	}
	/**
	* Parses tokenized formula and builds abstract syntax tree
	*
	* @param {ExtendedToken[]} tokens - tokenized formula
	* @param {SimpleCellAddress} formulaAddress - address of the cell in which formula is located
	*/
	parseFromTokens(tokens, formulaAddress) {
		this.input = tokens;
		let ast = this.formulaWithContext(formulaAddress);
		let errors = [];
		if (this.customParsingError) errors.push(this.customParsingError);
		errors = errors.concat(this.errors.map((e) => ({
			type: ParsingErrorType.ParserError,
			message: e.message
		})));
		if (errors.length > 0) ast = buildParsingErrorAst();
		return {
			ast,
			errors
		};
	}
	reset() {
		super.reset();
		this.customParsingError = void 0;
	}
	/**
	* Entry rule wrapper that sets formula address
	*
	* @param {SimpleCellAddress} address - address of the cell in which formula is located
	*/
	formulaWithContext(address) {
		this.formulaAddress = address;
		return this.formula();
	}
	buildCellRange(firstAddress, secondAddress, leadingWhitespace) {
		if (firstAddress.sheet === void 0 && secondAddress.sheet !== void 0) return this.parsingError(ParsingErrorType.ParserError, "Malformed range expression");
		const { firstEnd, secondEnd, sheetRefType } = FormulaParser.fixSheetIdsForRangeEnds(firstAddress, secondAddress);
		return buildCellRangeAst(firstEnd, secondEnd, sheetRefType, leadingWhitespace);
	}
	static fixSheetIdsForRangeEnds(firstEnd, secondEnd) {
		const sheetRefType = FormulaParser.rangeSheetReferenceType(firstEnd.sheet, secondEnd.sheet);
		return {
			firstEnd,
			secondEnd: firstEnd.sheet !== void 0 && secondEnd.sheet === void 0 ? secondEnd.withSheet(firstEnd.sheet) : secondEnd,
			sheetRefType
		};
	}
	/**
	* Returns {@link CellReferenceAst} or {@link CellRangeAst} based on OFFSET function arguments
	*
	* @param {Ast[]} args - OFFSET function arguments
	*/
	handleOffsetHeuristic(args) {
		var _a;
		const cellArg = args[0];
		if (cellArg.type !== AstNodeType.CELL_REFERENCE) return this.parsingError(ParsingErrorType.StaticOffsetError, "First argument to OFFSET is not a reference");
		const rowsArg = args[1];
		let rowShift;
		if (rowsArg.type === AstNodeType.NUMBER && Number.isInteger(rowsArg.value)) rowShift = rowsArg.value;
		else if (rowsArg.type === AstNodeType.PLUS_UNARY_OP && rowsArg.value.type === AstNodeType.NUMBER && Number.isInteger(rowsArg.value.value)) rowShift = rowsArg.value.value;
		else if (rowsArg.type === AstNodeType.MINUS_UNARY_OP && rowsArg.value.type === AstNodeType.NUMBER && Number.isInteger(rowsArg.value.value)) rowShift = -rowsArg.value.value;
		else return this.parsingError(ParsingErrorType.StaticOffsetError, "Second argument to OFFSET is not a static number");
		const columnsArg = args[2];
		let colShift;
		if (columnsArg.type === AstNodeType.NUMBER && Number.isInteger(columnsArg.value)) colShift = columnsArg.value;
		else if (columnsArg.type === AstNodeType.PLUS_UNARY_OP && columnsArg.value.type === AstNodeType.NUMBER && Number.isInteger(columnsArg.value.value)) colShift = columnsArg.value.value;
		else if (columnsArg.type === AstNodeType.MINUS_UNARY_OP && columnsArg.value.type === AstNodeType.NUMBER && Number.isInteger(columnsArg.value.value)) colShift = -columnsArg.value.value;
		else return this.parsingError(ParsingErrorType.StaticOffsetError, "Third argument to OFFSET is not a static number");
		const heightArg = args[3];
		let height;
		if (heightArg === void 0) height = 1;
		else if (heightArg.type === AstNodeType.NUMBER) {
			height = heightArg.value;
			if (height < 1) return this.parsingError(ParsingErrorType.StaticOffsetError, "Fourth argument to OFFSET is too small number");
			else if (!Number.isInteger(height)) return this.parsingError(ParsingErrorType.StaticOffsetError, "Fourth argument to OFFSET is not integer");
		} else return this.parsingError(ParsingErrorType.StaticOffsetError, "Fourth argument to OFFSET is not a static number");
		const widthArg = args[4];
		let width;
		if (widthArg === void 0) width = 1;
		else if (widthArg.type === AstNodeType.NUMBER) {
			width = widthArg.value;
			if (width < 1) return this.parsingError(ParsingErrorType.StaticOffsetError, "Fifth argument to OFFSET is too small number");
			else if (!Number.isInteger(width)) return this.parsingError(ParsingErrorType.StaticOffsetError, "Fifth argument to OFFSET is not integer");
		} else return this.parsingError(ParsingErrorType.StaticOffsetError, "Fifth argument to OFFSET is not a static number");
		const topLeftCorner = new CellAddress(cellArg.reference.col + colShift, cellArg.reference.row + rowShift, cellArg.reference.type, (_a = cellArg.reference.sheet) !== null && _a !== void 0 ? _a : void 0);
		let absoluteCol = topLeftCorner.col;
		let absoluteRow = topLeftCorner.row;
		if (cellArg.reference.type === CellReferenceType.CELL_REFERENCE_RELATIVE || cellArg.reference.type === CellReferenceType.CELL_REFERENCE_ABSOLUTE_COL) absoluteRow = absoluteRow + this.formulaAddress.row;
		if (cellArg.reference.type === CellReferenceType.CELL_REFERENCE_RELATIVE || cellArg.reference.type === CellReferenceType.CELL_REFERENCE_ABSOLUTE_ROW) absoluteCol = absoluteCol + this.formulaAddress.col;
		if (absoluteCol < 0 || absoluteRow < 0) return buildCellErrorAst(new CellError(ErrorType.REF, ErrorMessage.OutOfSheet));
		if (width === 1 && height === 1) return buildCellReferenceAst(topLeftCorner);
		else return buildCellRangeAst(topLeftCorner, new CellAddress(topLeftCorner.col + width - 1, topLeftCorner.row + height - 1, topLeftCorner.type, topLeftCorner.sheet), cellArg.reference.sheet == null ? RangeSheetReferenceType.RELATIVE : RangeSheetReferenceType.BOTH_ABSOLUTE);
	}
	parsingError(type, message) {
		this.customParsingError = parsingError(type, message);
		return buildParsingErrorAst();
	}
	static rangeSheetReferenceType(start, end) {
		if (start === void 0) return RangeSheetReferenceType.RELATIVE;
		else if (end === void 0) return RangeSheetReferenceType.START_ABSOLUTE;
		else return RangeSheetReferenceType.BOTH_ABSOLUTE;
	}
};
var FormulaLexer = class FormulaLexer {
	constructor(lexerConfig) {
		this.lexerConfig = lexerConfig;
		this.lexer = new Lexer(lexerConfig.allTokens, { ensureOptimizations: true });
	}
	/**
	* Returns Lexer tokens from formula string
	*
	* @param {string} text - string representation of a formula
	*/
	tokenizeFormula(text) {
		const lexingResult = this.lexer.tokenize(text);
		let tokens = lexingResult.tokens;
		tokens = this.trimTrailingWhitespaces(tokens);
		tokens = this.skipWhitespacesInsideRanges(tokens);
		tokens = this.skipWhitespacesBeforeArgSeparators(tokens);
		lexingResult.tokens = tokens;
		return lexingResult;
	}
	skipWhitespacesInsideRanges(tokens) {
		return FormulaLexer.filterTokensByNeighbors(tokens, (previous, current, next) => {
			return (tokenMatcher(previous, CellReference) || tokenMatcher(previous, RangeSeparator)) && tokenMatcher(current, this.lexerConfig.WhiteSpace) && (tokenMatcher(next, CellReference) || tokenMatcher(next, RangeSeparator));
		});
	}
	skipWhitespacesBeforeArgSeparators(tokens) {
		return FormulaLexer.filterTokensByNeighbors(tokens, (previous, current, next) => {
			return !tokenMatcher(previous, this.lexerConfig.ArgSeparator) && tokenMatcher(current, this.lexerConfig.WhiteSpace) && tokenMatcher(next, this.lexerConfig.ArgSeparator);
		});
	}
	static filterTokensByNeighbors(tokens, shouldBeSkipped) {
		if (tokens.length < 3) return tokens;
		let i = 0;
		const filteredTokens = [tokens[i++]];
		while (i < tokens.length - 1) {
			if (!shouldBeSkipped(tokens[i - 1], tokens[i], tokens[i + 1])) filteredTokens.push(tokens[i]);
			++i;
		}
		filteredTokens.push(tokens[i]);
		return filteredTokens;
	}
	trimTrailingWhitespaces(tokens) {
		if (tokens.length > 0 && tokenMatcher(tokens[tokens.length - 1], this.lexerConfig.WhiteSpace)) tokens.pop();
		return tokens;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/parser/Unparser.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var Unparser = class {
	constructor(config, sheetMapping, namedExpressions) {
		this.config = config;
		this.sheetMapping = sheetMapping;
		this.namedExpressions = namedExpressions;
	}
	unparse(ast, address) {
		return "=" + this.unparseAst(ast, address);
	}
	unparseAst(ast, address) {
		var _a, _b;
		switch (ast.type) {
			case AstNodeType.EMPTY: return imageWithWhitespace("", ast.leadingWhitespace);
			case AstNodeType.NUMBER: return imageWithWhitespace(formatNumber(ast.value, this.config.decimalSeparator), ast.leadingWhitespace);
			case AstNodeType.STRING: return imageWithWhitespace("\"" + ast.value + "\"", ast.leadingWhitespace);
			case AstNodeType.FUNCTION_CALL: {
				const args = ast.args.map((arg) => arg !== void 0 ? this.unparseAst(arg, address) : "").join(this.config.functionArgSeparator);
				return imageWithWhitespace((this.config.translationPackage.isFunctionTranslated(ast.procedureName) ? this.config.translationPackage.getFunctionTranslation(ast.procedureName) : ast.procedureName) + "(" + args + imageWithWhitespace(")", ast.internalWhitespace), ast.leadingWhitespace);
			}
			case AstNodeType.NAMED_EXPRESSION: return imageWithWhitespace(((_a = this.namedExpressions.nearestNamedExpression(ast.expressionName, address.sheet)) === null || _a === void 0 ? void 0 : _a.displayName) || ast.expressionName, ast.leadingWhitespace);
			case AstNodeType.CELL_REFERENCE: {
				let image;
				if (ast.reference.sheet !== void 0) image = this.unparseSheetName(ast.reference.sheet) + "!";
				else image = "";
				image += (_b = ast.reference.unparse(address)) !== null && _b !== void 0 ? _b : this.config.translationPackage.getErrorTranslation(ErrorType.REF);
				return imageWithWhitespace(image, ast.leadingWhitespace);
			}
			case AstNodeType.COLUMN_RANGE:
			case AstNodeType.ROW_RANGE:
			case AstNodeType.CELL_RANGE: return imageWithWhitespace(this.formatRange(ast, address), ast.leadingWhitespace);
			case AstNodeType.PLUS_UNARY_OP: {
				const unparsedExpr = this.unparseAst(ast.value, address);
				return imageWithWhitespace("+", ast.leadingWhitespace) + unparsedExpr;
			}
			case AstNodeType.MINUS_UNARY_OP: {
				const unparsedExpr = this.unparseAst(ast.value, address);
				return imageWithWhitespace("-", ast.leadingWhitespace) + unparsedExpr;
			}
			case AstNodeType.PERCENT_OP: return this.unparseAst(ast.value, address) + imageWithWhitespace("%", ast.leadingWhitespace);
			case AstNodeType.ERROR: return imageWithWhitespace(this.config.translationPackage.getErrorTranslation(ast.error ? ast.error.type : ErrorType.ERROR), ast.leadingWhitespace);
			case AstNodeType.ERROR_WITH_RAW_INPUT: return imageWithWhitespace(ast.rawInput, ast.leadingWhitespace);
			case AstNodeType.PARENTHESIS: return imageWithWhitespace("(" + this.unparseAst(ast.expression, address) + imageWithWhitespace(")", ast.internalWhitespace), ast.leadingWhitespace);
			case AstNodeType.ARRAY: return imageWithWhitespace("{" + ast.args.map((row) => row.map((val) => this.unparseAst(val, address)).join(this.config.arrayColumnSeparator)).join(this.config.arrayRowSeparator) + imageWithWhitespace("}", ast.internalWhitespace), ast.leadingWhitespace);
			default: {
				const left = this.unparseAst(ast.left, address);
				const right = this.unparseAst(ast.right, address);
				return left + imageWithWhitespace(binaryOpTokenMap[ast.type], ast.leadingWhitespace) + right;
			}
		}
	}
	/**
	* Unparses a sheet name.
	* @param {number} sheetId - the ID of the sheet
	* @returns {string} the unparsed sheet name
	*/
	unparseSheetName(sheetId) {
		const sheetName = sheetIndexToString(sheetId, (id) => this.sheetMapping.getSheetNameOrThrowError(id, { includePlaceholders: true }));
		if (sheetName === void 0) throw new NoSheetWithIdError(sheetId);
		return sheetName;
	}
	formatRange(ast, baseAddress) {
		let startSheeet = "";
		let endSheet = "";
		if (ast.start.sheet !== void 0 && ast.sheetReferenceType !== RangeSheetReferenceType.RELATIVE) startSheeet = this.unparseSheetName(ast.start.sheet) + "!";
		if (ast.end.sheet !== void 0 && ast.sheetReferenceType === RangeSheetReferenceType.BOTH_ABSOLUTE) endSheet = this.unparseSheetName(ast.end.sheet) + "!";
		const unparsedStart = ast.start.unparse(baseAddress);
		const unparsedEnd = ast.end.unparse(baseAddress);
		if (unparsedStart === void 0 || unparsedEnd === void 0) return this.config.translationPackage.getErrorTranslation(ErrorType.REF);
		return `${startSheeet}${unparsedStart}:${endSheet}${unparsedEnd}`;
	}
};
function formatNumber(number, decimalSeparator) {
	return number.toString().replace(".", decimalSeparator);
}
//#endregion
//#region ../../node_modules/hyperformula/es/parser/ParserWithCaching.mjs
init_api();
/**
* Parses formula using caching if feasible.
*/
var ParserWithCaching = class ParserWithCaching {
	constructor(config, functionRegistry, resolveSheetReference) {
		this.config = config;
		this.functionRegistry = functionRegistry;
		this.resolveSheetReference = resolveSheetReference;
		this.statsCacheUsed = 0;
		this.lexerConfig = buildLexerConfig(config);
		this.lexer = new FormulaLexer(this.lexerConfig);
		this.formulaParser = new FormulaParser(this.lexerConfig, this.resolveSheetReference);
		this.cache = new Cache(this.functionRegistry);
	}
	/**
	* Parses a formula.
	*
	* @param text - formula to parse
	* @param formulaAddress - address with regard to which formula should be parsed. Impacts computed addresses in R0C0 format.
	*/
	parse(text, formulaAddress) {
		this.formulaAddress = formulaAddress;
		const lexerResult = this.tokenizeFormula(text);
		if (lexerResult.errors.length > 0) {
			const errors = lexerResult.errors.map((e) => ({
				type: ParsingErrorType.LexingError,
				message: e.message
			}));
			return {
				ast: buildParsingErrorAst(),
				errors,
				hasVolatileFunction: false,
				hasStructuralChangeFunction: false,
				dependencies: []
			};
		}
		const hash = this.computeHashFromTokens(lexerResult.tokens, formulaAddress);
		let cacheResult = this.cache.get(hash);
		if (cacheResult !== void 0) ++this.statsCacheUsed;
		else {
			const processedTokens = this.bindWhitespacesToTokens(lexerResult.tokens);
			const parsingResult = this.formulaParser.parseFromTokens(processedTokens, formulaAddress);
			if (parsingResult.errors.length > 0) return Object.assign(Object.assign({}, parsingResult), {
				hasVolatileFunction: false,
				hasStructuralChangeFunction: false,
				dependencies: []
			});
			else cacheResult = this.cache.set(hash, parsingResult.ast);
		}
		const { ast, hasVolatileFunction, hasStructuralChangeFunction } = cacheResult;
		const astWithNoReversedRanges = this.convertReversedRangesToRegularRanges(ast);
		return {
			ast: astWithNoReversedRanges,
			errors: [],
			hasVolatileFunction,
			hasStructuralChangeFunction,
			dependencies: collectDependencies(astWithNoReversedRanges, this.functionRegistry)
		};
	}
	convertReversedRangesToRegularRanges(ast) {
		switch (ast.type) {
			case AstNodeType.EMPTY:
			case AstNodeType.NUMBER:
			case AstNodeType.STRING:
			case AstNodeType.ERROR:
			case AstNodeType.ERROR_WITH_RAW_INPUT:
			case AstNodeType.CELL_REFERENCE:
			case AstNodeType.NAMED_EXPRESSION: return ast;
			case AstNodeType.CELL_RANGE: {
				const { start, end } = ast;
				const orderedEnds = this.orderCellRangeEnds(start, end);
				return Object.assign(Object.assign({}, ast), {
					start: orderedEnds.start,
					end: orderedEnds.end
				});
			}
			case AstNodeType.COLUMN_RANGE: {
				const { start, end } = ast;
				const orderedEnds = this.orderColumnRangeEnds(start, end);
				return Object.assign(Object.assign({}, ast), {
					start: orderedEnds.start,
					end: orderedEnds.end
				});
			}
			case AstNodeType.ROW_RANGE: {
				const { start, end } = ast;
				const orderedEnds = this.orderRowRangeEnds(start, end);
				return Object.assign(Object.assign({}, ast), {
					start: orderedEnds.start,
					end: orderedEnds.end
				});
			}
			case AstNodeType.PERCENT_OP:
			case AstNodeType.PLUS_UNARY_OP:
			case AstNodeType.MINUS_UNARY_OP: {
				const valueFixed = this.convertReversedRangesToRegularRanges(ast.value);
				return Object.assign(Object.assign({}, ast), { value: valueFixed });
			}
			case AstNodeType.CONCATENATE_OP:
			case AstNodeType.EQUALS_OP:
			case AstNodeType.NOT_EQUAL_OP:
			case AstNodeType.LESS_THAN_OP:
			case AstNodeType.GREATER_THAN_OP:
			case AstNodeType.LESS_THAN_OR_EQUAL_OP:
			case AstNodeType.GREATER_THAN_OR_EQUAL_OP:
			case AstNodeType.MINUS_OP:
			case AstNodeType.PLUS_OP:
			case AstNodeType.TIMES_OP:
			case AstNodeType.DIV_OP:
			case AstNodeType.POWER_OP: {
				const leftFixed = this.convertReversedRangesToRegularRanges(ast.left);
				const rightFixed = this.convertReversedRangesToRegularRanges(ast.right);
				return Object.assign(Object.assign({}, ast), {
					left: leftFixed,
					right: rightFixed
				});
			}
			case AstNodeType.PARENTHESIS: {
				const exprFixed = this.convertReversedRangesToRegularRanges(ast.expression);
				return Object.assign(Object.assign({}, ast), { expression: exprFixed });
			}
			case AstNodeType.FUNCTION_CALL: {
				const argsFixed = ast.args.map((arg) => this.convertReversedRangesToRegularRanges(arg));
				return Object.assign(Object.assign({}, ast), { args: argsFixed });
			}
			case AstNodeType.ARRAY: {
				const argsFixed = ast.args.map((argsRow) => argsRow.map((arg) => this.convertReversedRangesToRegularRanges(arg)));
				return Object.assign(Object.assign({}, ast), { args: argsFixed });
			}
		}
	}
	orderCellRangeEnds(endA, endB) {
		const ends = [endA, endB];
		const [startCol, endCol] = ends.map((e) => e.toColumnAddress()).sort(ColumnAddress.compareByAbsoluteAddress(this.formulaAddress));
		const [startRow, endRow] = ends.map((e) => e.toRowAddress()).sort(RowAddress.compareByAbsoluteAddress(this.formulaAddress));
		const [startSheet, endSheet] = ends.map((e) => e.sheet).sort(ParserWithCaching.compareSheetIds.bind(this));
		return {
			start: CellAddress.fromColAndRow(startCol, startRow, startSheet),
			end: CellAddress.fromColAndRow(endCol, endRow, endSheet)
		};
	}
	orderColumnRangeEnds(endA, endB) {
		const ends = [endA, endB];
		const [startCol, endCol] = ends.sort(ColumnAddress.compareByAbsoluteAddress(this.formulaAddress));
		const [startSheet, endSheet] = ends.map((e) => e.sheet).sort(ParserWithCaching.compareSheetIds.bind(this));
		return {
			start: new ColumnAddress(startCol.type, startCol.col, startSheet),
			end: new ColumnAddress(endCol.type, endCol.col, endSheet)
		};
	}
	orderRowRangeEnds(endA, endB) {
		const ends = [endA, endB];
		const [startRow, endRow] = ends.sort(RowAddress.compareByAbsoluteAddress(this.formulaAddress));
		const [startSheet, endSheet] = ends.map((e) => e.sheet).sort(ParserWithCaching.compareSheetIds.bind(this));
		return {
			start: new RowAddress(startRow.type, startRow.row, startSheet),
			end: new RowAddress(endRow.type, endRow.row, endSheet)
		};
	}
	static compareSheetIds(sheetA, sheetB) {
		sheetA = sheetA != null ? sheetA : Infinity;
		sheetB = sheetB != null ? sheetB : Infinity;
		return sheetA - sheetB;
	}
	fetchCachedResultForAst(ast) {
		const hash = this.computeHashFromAst(ast);
		return this.fetchCachedResult(hash);
	}
	fetchCachedResult(hash) {
		const cacheResult = this.cache.get(hash);
		if (cacheResult === void 0) throw new Error("There is no AST with such key in the cache");
		else {
			const { ast, hasVolatileFunction, hasStructuralChangeFunction, relativeDependencies } = cacheResult;
			return {
				ast,
				errors: [],
				hasVolatileFunction,
				hasStructuralChangeFunction,
				dependencies: relativeDependencies
			};
		}
	}
	computeHashFromTokens(tokens, baseAddress) {
		var _a;
		let hash = "";
		let idx = 0;
		while (idx < tokens.length) {
			const token = tokens[idx];
			if (tokenMatcher(token, CellReference)) {
				const cellAddress = cellAddressFromString(token.image, baseAddress, this.resolveSheetReference);
				if (cellAddress === void 0) hash = hash.concat(token.image);
				else hash = hash.concat(cellAddress.hash(true));
			} else if (tokenMatcher(token, ProcedureName)) {
				const procedureName = token.image.toUpperCase().slice(0, -1);
				const canonicalProcedureName = (_a = this.lexerConfig.functionMapping[procedureName]) !== null && _a !== void 0 ? _a : procedureName;
				hash = hash.concat(canonicalProcedureName, "(");
			} else if (tokenMatcher(token, ColumnRange)) {
				const [start, end] = token.image.split(":");
				const startAddress = columnAddressFromString(start, baseAddress, this.resolveSheetReference);
				const endAddress = columnAddressFromString(end, baseAddress, this.resolveSheetReference);
				if (startAddress === void 0 || endAddress === void 0) hash = hash.concat("!REF");
				else hash = hash.concat(startAddress.hash(true), ":", endAddress.hash(true));
			} else if (tokenMatcher(token, RowRange)) {
				const [start, end] = token.image.split(":");
				const startAddress = rowAddressFromString(start, baseAddress, this.resolveSheetReference);
				const endAddress = rowAddressFromString(end, baseAddress, this.resolveSheetReference);
				if (startAddress === void 0 || endAddress === void 0) hash = hash.concat("!REF");
				else hash = hash.concat(startAddress.hash(true), ":", endAddress.hash(true));
			} else hash = hash.concat(token.image);
			idx++;
		}
		return hash;
	}
	rememberNewAst(ast) {
		const hash = this.computeHashFromAst(ast);
		return this.cache.maybeSetAndThenGet(hash, ast);
	}
	computeHashFromAst(ast) {
		return "=" + this.computeHashOfAstNode(ast);
	}
	computeHashOfAstNode(ast) {
		switch (ast.type) {
			case AstNodeType.EMPTY: return ast.leadingWhitespace || "";
			case AstNodeType.NUMBER: return imageWithWhitespace(formatNumber(ast.value, this.config.decimalSeparator), ast.leadingWhitespace);
			case AstNodeType.STRING: return imageWithWhitespace("\"" + ast.value + "\"", ast.leadingWhitespace);
			case AstNodeType.NAMED_EXPRESSION: return imageWithWhitespace(ast.expressionName, ast.leadingWhitespace);
			case AstNodeType.FUNCTION_CALL: {
				const args = ast.args.map((arg) => this.computeHashOfAstNode(arg)).join(this.config.functionArgSeparator);
				return imageWithWhitespace(ast.procedureName + "(" + args + imageWithWhitespace(")", ast.internalWhitespace), ast.leadingWhitespace);
			}
			case AstNodeType.CELL_REFERENCE: return imageWithWhitespace(ast.reference.hash(true), ast.leadingWhitespace);
			case AstNodeType.COLUMN_RANGE:
			case AstNodeType.ROW_RANGE:
			case AstNodeType.CELL_RANGE: {
				const start = ast.start.hash(ast.sheetReferenceType !== RangeSheetReferenceType.RELATIVE);
				const end = ast.end.hash(ast.sheetReferenceType === RangeSheetReferenceType.BOTH_ABSOLUTE);
				return imageWithWhitespace(start + ":" + end, ast.leadingWhitespace);
			}
			case AstNodeType.MINUS_UNARY_OP: return imageWithWhitespace("-" + this.computeHashOfAstNode(ast.value), ast.leadingWhitespace);
			case AstNodeType.PLUS_UNARY_OP: return imageWithWhitespace("+" + this.computeHashOfAstNode(ast.value), ast.leadingWhitespace);
			case AstNodeType.PERCENT_OP: return this.computeHashOfAstNode(ast.value) + imageWithWhitespace("%", ast.leadingWhitespace);
			case AstNodeType.ERROR: return imageWithWhitespace(this.config.translationPackage.getErrorTranslation(ast.error ? ast.error.type : ErrorType.ERROR), ast.leadingWhitespace);
			case AstNodeType.ERROR_WITH_RAW_INPUT: return imageWithWhitespace(ast.rawInput, ast.leadingWhitespace);
			case AstNodeType.ARRAY: return imageWithWhitespace("{" + ast.args.map((row) => row.map((val) => this.computeHashOfAstNode(val)).join(",")).join(";") + imageWithWhitespace("}", ast.internalWhitespace), ast.leadingWhitespace);
			case AstNodeType.PARENTHESIS: return imageWithWhitespace("(" + this.computeHashOfAstNode(ast.expression) + imageWithWhitespace(")", ast.internalWhitespace), ast.leadingWhitespace);
			default: return this.computeHashOfAstNode(ast.left) + imageWithWhitespace(binaryOpTokenMap[ast.type], ast.leadingWhitespace) + this.computeHashOfAstNode(ast.right);
		}
	}
	bindWhitespacesToTokens(tokens) {
		const processedTokens = [];
		const first = tokens[0];
		if (!tokenMatcher(first, this.lexerConfig.WhiteSpace)) processedTokens.push(first);
		for (let i = 1; i < tokens.length; ++i) {
			const current = tokens[i];
			if (tokenMatcher(current, this.lexerConfig.WhiteSpace)) continue;
			const previous = tokens[i - 1];
			if (tokenMatcher(previous, this.lexerConfig.WhiteSpace)) current.leadingWhitespace = previous;
			processedTokens.push(current);
		}
		return processedTokens;
	}
	tokenizeFormula(text) {
		return this.lexer.tokenizeFormula(text);
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/parser/collectDependencies.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var collectDependenciesFn = (ast, functionRegistry, dependenciesSet, needArgument) => {
	switch (ast.type) {
		case AstNodeType.EMPTY:
		case AstNodeType.NUMBER:
		case AstNodeType.STRING:
		case AstNodeType.ERROR: return;
		case AstNodeType.NAMED_EXPRESSION:
			if (needArgument) dependenciesSet.push(new NamedExpressionDependency(ast.expressionName));
			return;
		case AstNodeType.CELL_REFERENCE:
			if (needArgument) dependenciesSet.push(new AddressDependency(ast.reference));
			return;
		case AstNodeType.CELL_RANGE:
			if (needArgument && ast.start.sheet === ast.end.sheet) dependenciesSet.push(new CellRangeDependency(ast.start, ast.end));
			return;
		case AstNodeType.COLUMN_RANGE:
			if (needArgument && ast.start.sheet === ast.end.sheet) dependenciesSet.push(new ColumnRangeDependency(ast.start, ast.end));
			return;
		case AstNodeType.ROW_RANGE:
			if (needArgument && ast.start.sheet === ast.end.sheet) dependenciesSet.push(new RowRangeDependency(ast.start, ast.end));
			return;
		case AstNodeType.PERCENT_OP:
		case AstNodeType.PLUS_UNARY_OP:
		case AstNodeType.MINUS_UNARY_OP:
			collectDependenciesFn(ast.value, functionRegistry, dependenciesSet, true);
			return;
		case AstNodeType.CONCATENATE_OP:
		case AstNodeType.EQUALS_OP:
		case AstNodeType.NOT_EQUAL_OP:
		case AstNodeType.LESS_THAN_OP:
		case AstNodeType.GREATER_THAN_OP:
		case AstNodeType.LESS_THAN_OR_EQUAL_OP:
		case AstNodeType.GREATER_THAN_OR_EQUAL_OP:
		case AstNodeType.MINUS_OP:
		case AstNodeType.PLUS_OP:
		case AstNodeType.TIMES_OP:
		case AstNodeType.DIV_OP:
		case AstNodeType.POWER_OP:
			collectDependenciesFn(ast.left, functionRegistry, dependenciesSet, true);
			collectDependenciesFn(ast.right, functionRegistry, dependenciesSet, true);
			return;
		case AstNodeType.PARENTHESIS:
			collectDependenciesFn(ast.expression, functionRegistry, dependenciesSet, needArgument);
			return;
		case AstNodeType.FUNCTION_CALL: {
			const functionNeedArgument = !functionRegistry.doesFunctionNeedArgumentToBeComputed(ast.procedureName);
			ast.args.forEach((argAst) => collectDependenciesFn(argAst, functionRegistry, dependenciesSet, functionNeedArgument));
			return;
		}
	}
};
var collectDependencies = (ast, functionRegistry) => {
	const result = new Array();
	collectDependenciesFn(ast, functionRegistry, result, true);
	return result;
};
//#endregion
//#region ../../node_modules/hyperformula/es/parser/RelativeDependency.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var AddressDependency = class {
	constructor(dependency) {
		this.dependency = dependency;
	}
	absolutize(baseAddress) {
		return this.dependency.toSimpleCellAddress(baseAddress);
	}
};
var CellRangeDependency = class {
	constructor(start, end) {
		this.start = start;
		this.end = end;
	}
	absolutize(baseAddress) {
		return new AbsoluteCellRange(this.start.toSimpleCellAddress(baseAddress), this.end.toSimpleCellAddress(baseAddress));
	}
};
var ColumnRangeDependency = class {
	constructor(start, end) {
		this.start = start;
		this.end = end;
	}
	absolutize(baseAddress) {
		const start = this.start.toSimpleColumnAddress(baseAddress);
		const end = this.end.toSimpleColumnAddress(baseAddress);
		return new AbsoluteColumnRange(start.sheet, start.col, end.col);
	}
};
var RowRangeDependency = class {
	constructor(start, end) {
		this.start = start;
		this.end = end;
	}
	absolutize(baseAddress) {
		const start = this.start.toSimpleRowAddress(baseAddress);
		const end = this.end.toSimpleRowAddress(baseAddress);
		return new AbsoluteRowRange(start.sheet, start.row, end.row);
	}
};
var NamedExpressionDependency = class {
	constructor(name) {
		this.name = name;
	}
	absolutize(_baseAddress) {
		return this;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/absolutizeDependencies.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Converts dependencies from maybe relative addressing to absolute addressing.
*
* @param deps - list of addresses in R0C0 format
* @param baseAddress - base address with regard to which make a convertion
*/
var absolutizeDependencies = (deps, baseAddress) => {
	return deps.map((dep) => dep.absolutize(baseAddress));
};
var filterDependenciesOutOfScope = (deps) => {
	return deps.filter((dep) => {
		if (dep instanceof NamedExpressionDependency) return true;
		if (dep instanceof AbsoluteCellRange) return !(isColOrRowInvalid(dep.start) || isColOrRowInvalid(dep.end));
		else return !isColOrRowInvalid(dep);
	});
};
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/InterpreterValue.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* A symbol representing an empty cell value.
*/
var EmptyValue = Symbol("Empty value");
function getRawValue(num) {
	if (num instanceof RichNumber) return num.val;
	else return num;
}
var RichNumber = class {
	constructor(val, format) {
		this.val = val;
		this.format = format;
	}
	fromNumber(val) {
		return new this.constructor(val);
	}
};
function cloneNumber(val, newVal) {
	if (typeof val === "number") return newVal;
	else {
		const ret = val.fromNumber(newVal);
		ret.format = val.format;
		return ret;
	}
}
var DateNumber = class extends RichNumber {
	getDetailedType() {
		return NumberType.NUMBER_DATE;
	}
};
var CurrencyNumber = class extends RichNumber {
	getDetailedType() {
		return NumberType.NUMBER_CURRENCY;
	}
};
var TimeNumber = class extends RichNumber {
	getDetailedType() {
		return NumberType.NUMBER_TIME;
	}
};
var DateTimeNumber = class extends RichNumber {
	getDetailedType() {
		return NumberType.NUMBER_DATETIME;
	}
};
var PercentNumber = class extends RichNumber {
	getDetailedType() {
		return NumberType.NUMBER_PERCENT;
	}
};
function isExtendedNumber(val) {
	return typeof val === "number" || val instanceof RichNumber;
}
var NumberType;
(function(NumberType) {
	NumberType["NUMBER_RAW"] = "NUMBER_RAW";
	NumberType["NUMBER_DATE"] = "NUMBER_DATE";
	NumberType["NUMBER_TIME"] = "NUMBER_TIME";
	NumberType["NUMBER_DATETIME"] = "NUMBER_DATETIME";
	NumberType["NUMBER_CURRENCY"] = "NUMBER_CURRENCY";
	NumberType["NUMBER_PERCENT"] = "NUMBER_PERCENT";
})(NumberType || (NumberType = {}));
function getTypeOfExtendedNumber(num) {
	if (num instanceof RichNumber) return num.getDetailedType();
	else return NumberType.NUMBER_RAW;
}
function getFormatOfExtendedNumber(num) {
	if (num instanceof RichNumber) return num.format;
	else return;
}
function getTypeFormatOfExtendedNumber(num) {
	if (num instanceof RichNumber) return {
		type: num.getDetailedType(),
		format: num.format
	};
	else return { type: NumberType.NUMBER_RAW };
}
//#endregion
//#region ../../node_modules/hyperformula/es/SimpleRangeValue.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* A class that represents a range of data.
*/
var SimpleRangeValue = class SimpleRangeValue {
	/**
	* In most cases, it's more convenient to create a `SimpleRangeValue` object
	* by calling one of the [static factory methods](#fromrange).
	*/
	constructor(_data, range, dependencyGraph, _hasOnlyNumbers) {
		this._data = _data;
		this.range = range;
		this.dependencyGraph = dependencyGraph;
		this._hasOnlyNumbers = _hasOnlyNumbers;
		this.size = _data === void 0 ? new ArraySize(range.effectiveWidth(dependencyGraph), range.effectiveHeight(dependencyGraph)) : new ArraySize(_data[0].length, _data.length);
	}
	/**
	* Returns the range data as a 2D array.
	*/
	get data() {
		this.ensureThatComputed();
		return this._data;
	}
	/**
	* A factory method. Returns a `SimpleRangeValue` object with the provided range address and the provided data.
	*/
	static fromRange(data, range, dependencyGraph) {
		return new SimpleRangeValue(data, range, dependencyGraph, true);
	}
	/**
	* A factory method. Returns a `SimpleRangeValue` object with the provided numeric data.
	*/
	static onlyNumbers(data) {
		return new SimpleRangeValue(data, void 0, void 0, true);
	}
	/**
	* A factory method. Returns a `SimpleRangeValue` object with the provided data.
	*/
	static onlyValues(data) {
		return new SimpleRangeValue(data, void 0, void 0, void 0);
	}
	/**
	* A factory method. Returns a `SimpleRangeValue` object with the provided range address.
	*/
	static onlyRange(range, dependencyGraph) {
		return new SimpleRangeValue(void 0, range, dependencyGraph, void 0);
	}
	/**
	* A factory method. Returns a `SimpleRangeValue` object that contains a single value.
	*/
	static fromScalar(scalar) {
		return new SimpleRangeValue([[scalar]], void 0, void 0, void 0);
	}
	/**
	* Returns `true` if and only if the `SimpleRangeValue` has no address set.
	*/
	isAdHoc() {
		return this.range === void 0;
	}
	/**
	* Returns the number of columns contained in the range.
	*/
	width() {
		return this.size.width;
	}
	/**
	* Returns the number of rows contained in the range.
	*/
	height() {
		return this.size.height;
	}
	/**
	* Returns the range data as a 1D array.
	*/
	valuesFromTopLeftCorner() {
		this.ensureThatComputed();
		const ret = [];
		for (let i = 0; i < this._data.length; i++) for (let j = 0; j < this._data[0].length; j++) ret.push(this._data[i][j]);
		return ret;
	}
	/**
	* Generates the addresses of the cells contained in the range assuming the provided address is the left corner of the range.
	*/
	*effectiveAddressesFromData(leftCorner) {
		for (let row = 0; row < this.data.length; ++row) {
			const rowData = this.data[row];
			for (let col = 0; col < rowData.length; ++col) yield simpleCellAddress(leftCorner.sheet, leftCorner.col + col, leftCorner.row + row);
		}
	}
	/**
	* Generates values and addresses of the cells contained in the range assuming the provided address is the left corner of the range.
	*
	* This method combines the functionalities of [`iterateValuesFromTopLeftCorner()`](#iteratevaluesfromtopleftcorner) and [`effectiveAddressesFromData()`](#effectiveaddressesfromdata).
	*/
	*entriesFromTopLeftCorner(leftCorner) {
		this.ensureThatComputed();
		for (let row = 0; row < this.size.height; ++row) for (let col = 0; col < this.size.width; ++col) yield [this._data[row][col], simpleCellAddress(leftCorner.sheet, leftCorner.col + col, leftCorner.row + row)];
	}
	/**
	* Generates the values of the cells contained in the range assuming the provided address is the left corner of the range.
	*/
	*iterateValuesFromTopLeftCorner() {
		yield* this.valuesFromTopLeftCorner();
	}
	/**
	* Returns the number of cells contained in the range.
	*/
	numberOfElements() {
		return this.size.width * this.size.height;
	}
	/**
	* Returns `true` if and only if the range contains only numeric values.
	*/
	hasOnlyNumbers() {
		if (this._hasOnlyNumbers === void 0) {
			this._hasOnlyNumbers = true;
			for (const row of this.data) for (const v of row) if (typeof v !== "number") {
				this._hasOnlyNumbers = false;
				return false;
			}
		}
		return this._hasOnlyNumbers;
	}
	/**
	* Returns the range data as a 2D array of numbers.
	*
	* Internal use only.
	*/
	rawNumbers() {
		return this._data;
	}
	/**
	* Returns the range data as a 2D array.
	*
	* Internal use only.
	*/
	rawData() {
		var _a;
		this.ensureThatComputed();
		return (_a = this._data) !== null && _a !== void 0 ? _a : [];
	}
	/**
	* Returns `true` if and only if the range has the same width and height as the `other` range object.
	*/
	sameDimensionsAs(other) {
		return this.width() === other.width() && this.height() === other.height();
	}
	/**
	* Computes the range data if it is not computed yet.
	*/
	ensureThatComputed() {
		if (this._data !== void 0) return;
		this._hasOnlyNumbers = true;
		this._data = this.range.addressesArrayMap(this.dependencyGraph, (cellFromRange) => {
			const value = this.dependencyGraph.getCellValue(cellFromRange);
			if (value instanceof SimpleRangeValue) {
				this._hasOnlyNumbers = false;
				return new CellError(ErrorType.VALUE, ErrorMessage.ScalarExpected);
			} else if (isExtendedNumber(value)) return value;
			else {
				this._hasOnlyNumbers = false;
				return value;
			}
		});
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/ContentChanges.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var ContentChanges = class ContentChanges {
	constructor() {
		this.changes = /* @__PURE__ */ new Map();
	}
	static empty() {
		return new ContentChanges();
	}
	addAll(other) {
		for (const change of other.changes.values()) this.add(change.address, change);
		return this;
	}
	addChange(newValue, address, oldValue) {
		this.addInterpreterValue(newValue, address, oldValue);
	}
	exportChanges(exporter) {
		let ret = [];
		this.changes.forEach((e) => {
			const change = exporter.exportChange(e);
			if (Array.isArray(change)) ret = ret.concat(change);
			else ret.push(change);
		});
		return ret;
	}
	getChanges() {
		return Array.from(this.changes.values());
	}
	isEmpty() {
		return this.changes.size === 0;
	}
	add(address, change) {
		const value = change.value;
		if (value instanceof SimpleRangeValue) for (const cellAddress of value.effectiveAddressesFromData(address)) this.changes.delete(addressKey(cellAddress));
		this.changes.set(addressKey(address), change);
	}
	addInterpreterValue(value, address, oldValue) {
		this.add(address, {
			address,
			value,
			oldValue
		});
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/NamedExpressions.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var InternalNamedExpression = class InternalNamedExpression {
	constructor(displayName, address, added, options) {
		this.displayName = displayName;
		this.address = address;
		this.added = added;
		this.options = options;
	}
	normalizeExpressionName() {
		return this.displayName.toLowerCase();
	}
	copy() {
		return new InternalNamedExpression(this.displayName, this.address, this.added, this.options);
	}
};
var WorkbookStore = class {
	constructor() {
		this.mapping = /* @__PURE__ */ new Map();
	}
	has(expressionName) {
		return this.mapping.has(this.normalizeExpressionName(expressionName));
	}
	isNameAvailable(expressionName) {
		const normalizedExpressionName = this.normalizeExpressionName(expressionName);
		const namedExpression = this.mapping.get(normalizedExpressionName);
		return !(namedExpression && namedExpression.added);
	}
	add(namedExpression) {
		this.mapping.set(namedExpression.normalizeExpressionName(), namedExpression);
	}
	get(expressionName) {
		return this.mapping.get(this.normalizeExpressionName(expressionName));
	}
	getExisting(expressionName) {
		const namedExpression = this.mapping.get(this.normalizeExpressionName(expressionName));
		if (namedExpression && namedExpression.added) return namedExpression;
		else return;
	}
	remove(expressionName) {
		const normalizedExpressionName = this.normalizeExpressionName(expressionName);
		const namedExpression = this.mapping.get(normalizedExpressionName);
		if (namedExpression) namedExpression.added = false;
	}
	getAllNamedExpressions() {
		return Array.from(this.mapping.values()).filter((ne) => ne.added);
	}
	normalizeExpressionName(expressionName) {
		return expressionName.toLowerCase();
	}
};
var WorksheetStore = class {
	constructor() {
		this.mapping = /* @__PURE__ */ new Map();
	}
	add(namedExpression) {
		this.mapping.set(this.normalizeExpressionName(namedExpression.displayName), namedExpression);
	}
	get(expressionName) {
		return this.mapping.get(this.normalizeExpressionName(expressionName));
	}
	has(expressionName) {
		return this.mapping.has(this.normalizeExpressionName(expressionName));
	}
	getAllNamedExpressions() {
		return Array.from(this.mapping.values()).filter((ne) => ne.added);
	}
	isNameAvailable(expressionName) {
		const normalizedExpressionName = this.normalizeExpressionName(expressionName);
		return !this.mapping.has(normalizedExpressionName);
	}
	remove(expressionName) {
		const normalizedExpressionName = this.normalizeExpressionName(expressionName);
		if (this.mapping.get(normalizedExpressionName)) this.mapping.delete(normalizedExpressionName);
	}
	normalizeExpressionName(expressionName) {
		return expressionName.toLowerCase();
	}
};
var NamedExpressions = class NamedExpressions {
	constructor() {
		this.nextNamedExpressionRow = 0;
		this.workbookStore = new WorkbookStore();
		this.worksheetStores = /* @__PURE__ */ new Map();
		this.addressCache = /* @__PURE__ */ new Map();
	}
	isNameAvailable(expressionName, sheetId) {
		var _a, _b;
		if (sheetId === void 0) return this.workbookStore.isNameAvailable(expressionName);
		else return (_b = (_a = this.worksheetStore(sheetId)) === null || _a === void 0 ? void 0 : _a.isNameAvailable(expressionName)) !== null && _b !== void 0 ? _b : true;
	}
	namedExpressionInAddress(row) {
		const namedExpression = this.addressCache.get(row);
		if (namedExpression && namedExpression.added) return namedExpression;
		else return;
	}
	namedExpressionForScope(expressionName, sheetId) {
		var _a;
		if (sheetId === void 0) return this.workbookStore.getExisting(expressionName);
		else return (_a = this.worksheetStore(sheetId)) === null || _a === void 0 ? void 0 : _a.get(expressionName);
	}
	nearestNamedExpression(expressionName, sheetId) {
		var _a, _b;
		return (_b = (_a = this.worksheetStore(sheetId)) === null || _a === void 0 ? void 0 : _a.get(expressionName)) !== null && _b !== void 0 ? _b : this.workbookStore.getExisting(expressionName);
	}
	isExpressionInScope(expressionName, sheetId) {
		var _a, _b;
		return (_b = (_a = this.worksheetStore(sheetId)) === null || _a === void 0 ? void 0 : _a.has(expressionName)) !== null && _b !== void 0 ? _b : false;
	}
	/**
	* Checks the validity of a named-expression's name.
	*
	* The name:
	* - Must start with a Unicode letter or with an underscore (`_`).
	* - Can contain only Unicode letters, numbers, underscores, and periods (`.`).
	* - Can't be the same as any possible reference in the A1 notation (`[A-Za-z]+[0-9]+`).
	* - Can't be the same as any possible reference in the R1C1 notation (`[rR][0-9]*[cC][0-9]*`).
	*
	* The naming rules follow the [OpenDocument](https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part4-formula/OpenDocument-v1.3-os-part4-formula.html#__RefHeading__1017964_715980110) standard.
	*/
	isNameValid(expressionName) {
		const a1CellRefRegexp = new RegExp(`^${CELL_REFERENCE_PATTERN}$`);
		const r1c1CellRefRegexp = new RegExp(`^${R1C1_CELL_REFERENCE_PATTERN}$`);
		const namedExpRegexp = new RegExp(`^${NAMED_EXPRESSION_PATTERN}$`);
		if (a1CellRefRegexp.test(expressionName) || r1c1CellRefRegexp.test(expressionName)) return false;
		return namedExpRegexp.test(expressionName);
	}
	addNamedExpression(expressionName, sheetId, options) {
		const store = sheetId === void 0 ? this.workbookStore : this.worksheetStoreOrCreate(sheetId);
		let namedExpression = store.get(expressionName);
		if (namedExpression !== void 0) {
			namedExpression.added = true;
			namedExpression.displayName = expressionName;
			namedExpression.options = options;
		} else {
			namedExpression = new InternalNamedExpression(expressionName, this.nextAddress(), true, options);
			store.add(namedExpression);
		}
		this.addressCache.set(namedExpression.address.row, namedExpression);
		return namedExpression;
	}
	restoreNamedExpression(namedExpression, sheetId) {
		const store = sheetId === void 0 ? this.workbookStore : this.worksheetStoreOrCreate(sheetId);
		namedExpression.added = true;
		store.add(namedExpression);
		this.addressCache.set(namedExpression.address.row, namedExpression);
		return namedExpression;
	}
	namedExpressionOrPlaceholder(expressionName, sheetId) {
		var _a;
		return (_a = this.worksheetStoreOrCreate(sheetId).get(expressionName)) !== null && _a !== void 0 ? _a : this.workbookNamedExpressionOrPlaceholder(expressionName);
	}
	workbookNamedExpressionOrPlaceholder(expressionName) {
		let namedExpression = this.workbookStore.get(expressionName);
		if (namedExpression === void 0) {
			namedExpression = new InternalNamedExpression(expressionName, this.nextAddress(), false);
			this.workbookStore.add(namedExpression);
		}
		return namedExpression;
	}
	remove(expressionName, sheetId) {
		let store;
		if (sheetId === void 0) store = this.workbookStore;
		else store = this.worksheetStore(sheetId);
		const namedExpression = store === null || store === void 0 ? void 0 : store.get(expressionName);
		if (store === void 0 || namedExpression === void 0 || !namedExpression.added) throw Error("Named expression does not exist");
		store.remove(expressionName);
		if (store instanceof WorksheetStore && store.mapping.size === 0) this.worksheetStores.delete(sheetId);
		this.addressCache.delete(namedExpression.address.row);
	}
	getAllNamedExpressionsNamesInScope(sheetId) {
		return this.getAllNamedExpressions().filter(({ scope }) => scope === sheetId).map((ne) => ne.expression.displayName);
	}
	getAllNamedExpressionsNames() {
		return this.getAllNamedExpressions().map((ne) => ne.expression.displayName);
	}
	getAllNamedExpressions() {
		const storedNamedExpressions = [];
		this.workbookStore.getAllNamedExpressions().forEach((expr) => {
			storedNamedExpressions.push({
				expression: expr,
				scope: void 0
			});
		});
		this.worksheetStores.forEach((store, sheetNum) => {
			store.getAllNamedExpressions().forEach((expr) => {
				storedNamedExpressions.push({
					expression: expr,
					scope: sheetNum
				});
			});
		});
		return storedNamedExpressions;
	}
	getAllNamedExpressionsForScope(scope) {
		var _a, _b;
		if (scope === void 0) return this.workbookStore.getAllNamedExpressions();
		else return (_b = (_a = this.worksheetStores.get(scope)) === null || _a === void 0 ? void 0 : _a.getAllNamedExpressions()) !== null && _b !== void 0 ? _b : [];
	}
	worksheetStoreOrCreate(sheetId) {
		let store = this.worksheetStores.get(sheetId);
		if (!store) {
			store = new WorksheetStore();
			this.worksheetStores.set(sheetId, store);
		}
		return store;
	}
	worksheetStore(sheetId) {
		return this.worksheetStores.get(sheetId);
	}
	nextAddress() {
		return simpleCellAddress(NamedExpressions.SHEET_FOR_WORKBOOK_EXPRESSIONS, 0, this.nextNamedExpressionRow++);
	}
};
NamedExpressions.SHEET_FOR_WORKBOOK_EXPRESSIONS = -1;
var doesContainRelativeReferences = (ast) => {
	switch (ast.type) {
		case AstNodeType.EMPTY:
		case AstNodeType.NUMBER:
		case AstNodeType.STRING:
		case AstNodeType.ERROR:
		case AstNodeType.ERROR_WITH_RAW_INPUT: return false;
		case AstNodeType.CELL_REFERENCE: return !ast.reference.isAbsolute();
		case AstNodeType.CELL_RANGE:
		case AstNodeType.COLUMN_RANGE:
		case AstNodeType.ROW_RANGE: return !ast.start.isAbsolute();
		case AstNodeType.NAMED_EXPRESSION: return false;
		case AstNodeType.PERCENT_OP:
		case AstNodeType.PLUS_UNARY_OP:
		case AstNodeType.MINUS_UNARY_OP: return doesContainRelativeReferences(ast.value);
		case AstNodeType.CONCATENATE_OP:
		case AstNodeType.EQUALS_OP:
		case AstNodeType.NOT_EQUAL_OP:
		case AstNodeType.LESS_THAN_OP:
		case AstNodeType.GREATER_THAN_OP:
		case AstNodeType.LESS_THAN_OR_EQUAL_OP:
		case AstNodeType.GREATER_THAN_OR_EQUAL_OP:
		case AstNodeType.MINUS_OP:
		case AstNodeType.PLUS_OP:
		case AstNodeType.TIMES_OP:
		case AstNodeType.DIV_OP:
		case AstNodeType.POWER_OP: return doesContainRelativeReferences(ast.left) || doesContainRelativeReferences(ast.right);
		case AstNodeType.PARENTHESIS: return doesContainRelativeReferences(ast.expression);
		case AstNodeType.FUNCTION_CALL: return ast.args.some((arg) => doesContainRelativeReferences(arg));
		case AstNodeType.ARRAY: return ast.args.some((row) => row.some((arg) => doesContainRelativeReferences(arg)));
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/Span.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var RowsSpan = class RowsSpan {
	constructor(sheet, rowStart, rowEnd) {
		this.sheet = sheet;
		this.rowStart = rowStart;
		this.rowEnd = rowEnd;
		if (rowStart < 0) throw Error("Starting row cant be less than 0");
		if (rowEnd < rowStart) throw Error("Row span cant end before start");
	}
	get numberOfRows() {
		return this.rowEnd - this.rowStart + 1;
	}
	get start() {
		return this.rowStart;
	}
	get end() {
		return this.rowEnd;
	}
	static fromNumberOfRows(sheet, rowStart, numberOfRows) {
		return new RowsSpan(sheet, rowStart, rowStart + numberOfRows - 1);
	}
	static fromRowStartAndEnd(sheet, rowStart, rowEnd) {
		return new RowsSpan(sheet, rowStart, rowEnd);
	}
	*rows() {
		for (let col = this.rowStart; col <= this.rowEnd; ++col) yield col;
	}
	intersect(otherSpan) {
		if (this.sheet !== otherSpan.sheet) throw Error("Can't intersect spans from different sheets");
		const start = Math.max(this.rowStart, otherSpan.rowStart);
		const end = Math.min(this.rowEnd, otherSpan.rowEnd);
		if (start > end) return null;
		return new RowsSpan(this.sheet, start, end);
	}
	firstRow() {
		return new RowsSpan(this.sheet, this.rowStart, this.rowStart);
	}
};
var ColumnsSpan = class ColumnsSpan {
	constructor(sheet, columnStart, columnEnd) {
		this.sheet = sheet;
		this.columnStart = columnStart;
		this.columnEnd = columnEnd;
		if (columnStart < 0) throw Error("Starting column cant be less than 0");
		if (columnEnd < columnStart) throw Error("Column span cant end before start");
	}
	get numberOfColumns() {
		return this.columnEnd - this.columnStart + 1;
	}
	get start() {
		return this.columnStart;
	}
	get end() {
		return this.columnEnd;
	}
	static fromNumberOfColumns(sheet, columnStart, numberOfColumns) {
		return new ColumnsSpan(sheet, columnStart, columnStart + numberOfColumns - 1);
	}
	static fromColumnStartAndEnd(sheet, columnStart, columnEnd) {
		return new ColumnsSpan(sheet, columnStart, columnEnd);
	}
	*columns() {
		for (let col = this.columnStart; col <= this.columnEnd; ++col) yield col;
	}
	intersect(otherSpan) {
		if (this.sheet !== otherSpan.sheet) throw Error("Can't intersect spans from different sheets");
		const start = Math.max(this.columnStart, otherSpan.columnStart);
		const end = Math.min(this.columnEnd, otherSpan.columnEnd);
		if (start > end) return null;
		return new ColumnsSpan(this.sheet, start, end);
	}
	firstColumn() {
		return new ColumnsSpan(this.sheet, this.columnStart, this.columnStart);
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/statistics/StatType.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var StatType;
(function(StatType) {
	StatType["BUILD_ENGINE_TOTAL"] = "BUILD_ENGINE_TOTAL";
	StatType["PARSER"] = "PARSER";
	StatType["GRAPH_BUILD"] = "GRAPH_BUILD";
	StatType["COLLECT_DEPENDENCIES"] = "COLLECT_DEPENDENCIES";
	StatType["PROCESS_DEPENDENCIES"] = "PROCESS_DEPENDENCIES";
	StatType["TOP_SORT"] = "TOP_SORT";
	StatType["BUILD_COLUMN_INDEX"] = "BUILD_COLUMN_INDEX";
	StatType["EVALUATION"] = "EVALUATION";
	StatType["VLOOKUP"] = "VLOOKUP";
	StatType["TRANSFORM_ASTS"] = "TRANSFORM_ASTS";
	StatType["TRANSFORM_ASTS_POSTPONED"] = "TRANSFORM_ASTS_POSTPONED";
	StatType["ADJUSTING_ADDRESS_MAPPING"] = "ADJUSTING_ADDRESS_MAPPING";
	StatType["ADJUSTING_ARRAY_MAPPING"] = "ADJUSTING_ARRAY_MAPPING";
	StatType["ADJUSTING_RANGES"] = "ADJUSTING_RANGES";
	StatType["ADJUSTING_GRAPH"] = "ADJUSTING_GRAPH";
	StatType["CRITERION_FUNCTION_FULL_CACHE_USED"] = "CRITERION_FUNCTION_FULL_CACHE_USED";
	StatType["CRITERION_FUNCTION_PARTIAL_CACHE_USED"] = "CRITERION_FUNCTION_PARTIAL_CACHE_USED";
})(StatType || (StatType = {}));
//#endregion
//#region ../../node_modules/hyperformula/es/statistics/Statistics.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Provides tracking performance statistics to the engine
*/
var Statistics = class {
	constructor() {
		this.stats = new Map([[StatType.CRITERION_FUNCTION_FULL_CACHE_USED, 0], [StatType.CRITERION_FUNCTION_PARTIAL_CACHE_USED, 0]]);
		this.startTimes = /* @__PURE__ */ new Map();
	}
	incrementCriterionFunctionFullCacheUsed() {
		var _a;
		const newValue = ((_a = this.stats.get(StatType.CRITERION_FUNCTION_FULL_CACHE_USED)) !== null && _a !== void 0 ? _a : 0) + 1;
		this.stats.set(StatType.CRITERION_FUNCTION_FULL_CACHE_USED, newValue);
	}
	incrementCriterionFunctionPartialCacheUsed() {
		var _a;
		const newValue = ((_a = this.stats.get(StatType.CRITERION_FUNCTION_PARTIAL_CACHE_USED)) !== null && _a !== void 0 ? _a : 0) + 1;
		this.stats.set(StatType.CRITERION_FUNCTION_PARTIAL_CACHE_USED, newValue);
	}
	/**
	* Resets statistics
	*/
	reset() {
		this.stats.clear();
		this.startTimes.clear();
		this.stats.set(StatType.CRITERION_FUNCTION_FULL_CACHE_USED, 0);
		this.stats.set(StatType.CRITERION_FUNCTION_PARTIAL_CACHE_USED, 0);
	}
	/**
	* Starts tracking particular statistic.
	*
	* @param name - statistic to start tracking
	*/
	start(name) {
		if (this.startTimes.get(name)) throw Error(`Statistics ${name} already started`);
		else this.startTimes.set(name, Date.now());
	}
	/**
	* Stops tracking particular statistic.
	* Raise error if tracking statistic wasn't started.
	*
	* @param name - statistic to stop tracking
	*/
	end(name) {
		var _a;
		const now = Date.now();
		const startTime = this.startTimes.get(name);
		if (startTime) {
			let values = (_a = this.stats.get(name)) !== null && _a !== void 0 ? _a : 0;
			values += now - startTime;
			this.stats.set(name, values);
			this.startTimes.delete(name);
		} else throw Error(`Statistics ${name} not started`);
	}
	/**
	* Measure given statistic as execution of given function.
	*
	* @param name - statistic to track
	* @param func - function to call
	* @returns result of the function call
	*/
	measure(name, func) {
		this.start(name);
		const result = func();
		this.end(name);
		return result;
	}
	/**
	* Returns the snapshot of current results
	*/
	snapshot() {
		return new Map(this.stats);
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/statistics/EmptyStatistics.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/** Do not store stats in the memory. Stats are not needed on daily basis */
var EmptyStatistics = class extends Statistics {
	/** @inheritDoc */
	incrementCriterionFunctionFullCacheUsed() {}
	/** @inheritDoc */
	incrementCriterionFunctionPartialCacheUsed() {}
	/** @inheritDoc */
	start(_name) {}
	/** @inheritDoc */
	end(_name) {}
};
//#endregion
//#region ../../node_modules/hyperformula/es/errors.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Error thrown when the sheet of a given ID does not exist.
*/
var NoSheetWithIdError = class extends Error {
	constructor(sheetId) {
		super(`There's no sheet with id = ${sheetId}`);
	}
};
/**
* Error thrown when the sheet of a given name does not exist.
*/
var NoSheetWithNameError = class extends Error {
	constructor(sheetName) {
		super(`There's no sheet with name '${sheetName}'`);
	}
};
/**
* Error thrown when the sheet of a given name already exists.
*/
var SheetNameAlreadyTakenError = class extends Error {
	constructor(sheetName) {
		super(`Sheet with name ${sheetName} already exists`);
	}
};
/**
* Error thrown when loaded sheet size exceeds configured limits.
*/
var SheetSizeLimitExceededError = class extends Error {
	constructor() {
		super("Sheet size limit exceeded");
	}
};
/**
* Error thrown when the the provided string is not a valid formula, i.e does not start with "="
*/
var NotAFormulaError = class extends Error {
	constructor() {
		super("This is not a formula");
	}
};
/**
* Error thrown when the given address is invalid.
*/
var InvalidAddressError = class extends Error {
	constructor(address) {
		super(`Address (row = ${address.row}, col = ${address.col}) is invalid`);
	}
};
/**
* Error thrown when the given arguments are invalid
*/
var InvalidArgumentsError = class extends Error {
	constructor(expectedArguments) {
		super(`Invalid arguments, expected ${expectedArguments}`);
	}
};
/**
* Error thrown when the given sheets are not equal.
*/
var SheetsNotEqual = class extends Error {
	constructor(sheet1, sheet2) {
		super(`Sheets ${sheet1} and ${sheet2} are not equal.`);
	}
};
/**
* Error thrown when the given named expression already exists in the workbook and therefore it cannot be added.
*/
var NamedExpressionNameIsAlreadyTakenError = class extends Error {
	constructor(expressionName) {
		super(`Name of Named Expression '${expressionName}' is already present`);
	}
};
/**
* Error thrown when the name given for the named expression is invalid.
*/
var NamedExpressionNameIsInvalidError = class extends Error {
	constructor(expressionName) {
		super(`Name of Named Expression '${expressionName}' is invalid`);
	}
};
/**
* Error thrown when the given named expression does not exist.
*/
var NamedExpressionDoesNotExistError = class extends Error {
	constructor(expressionName) {
		super(`Named Expression '${expressionName}' does not exist`);
	}
};
/**
* Error thrown when there are no operations to be undone by the [[undo]] method.
*/
var NoOperationToUndoError = class extends Error {
	constructor() {
		super("There is no operation to undo");
	}
};
/**
* Error thrown when there are no operations to redo by the [[redo]] method.
*/
var NoOperationToRedoError = class extends Error {
	constructor() {
		super("There is no operation to redo");
	}
};
/**
* Error thrown when there is nothing to paste by the [[paste]] method.
*/
var NothingToPasteError = class extends Error {
	constructor() {
		super("There is nothing to paste");
	}
};
function replacer(key, val) {
	switch (typeof val) {
		case "function":
		case "symbol": return val.toString();
		case "bigint": return "BigInt(" + val.toString() + ")";
		default: if (val instanceof RegExp) return "RegExp(" + val.toString() + ")";
		else return val;
	}
}
/**
* Error thrown when the given value cannot be parsed.
*
* Checks against the validity in:
*
* @see [[buildFromArray]]
* @see [[buildFromSheets]]
* @see [[setCellsContents]]
*/
var UnableToParseError = class extends Error {
	constructor(value) {
		super(`Unable to parse value: ${JSON.stringify(value, replacer, 4)}`);
	}
};
/**
* Error thrown when the expected value type differs from the given value type.
* It also displays the expected type.
* This error might be thrown while setting or updating the [[ConfigParams]].
* The following methods accept [[ConfigParams]] as a parameter:
*
* @see [[buildEmpty]]
* @see [[buildFromArray]]
* @see [[buildFromSheets]]
* @see [[updateConfig]]
*/
var ExpectedValueOfTypeError = class extends Error {
	constructor(expectedType, paramName) {
		super(`Expected value of type: ${expectedType} for config parameter: ${paramName}`);
	}
};
/**
* Error thrown when supplied config parameter value is an empty string.
* This error might be thrown while setting or updating the [[ConfigParams]].
* The following methods accept [[ConfigParams]] as a parameter:
*
* @see [[buildEmpty]]
* @see [[buildFromArray]]
* @see [[buildFromSheets]]
* @see [[updateConfig]]
*/
var ConfigValueEmpty = class extends Error {
	constructor(paramName) {
		super(`Config parameter ${paramName} cannot be empty.`);
	}
};
/**
* Error thrown when supplied config parameter value is too small.
* This error might be thrown while setting or updating the [[ConfigParams]].
* The following methods accept [[ConfigParams]] as a parameter:
*
* @see [[buildEmpty]]
* @see [[buildFromArray]]
* @see [[buildFromSheets]]
* @see [[updateConfig]]
*/
var ConfigValueTooSmallError = class extends Error {
	constructor(paramName, minimum) {
		super(`Config parameter ${paramName} should be at least ${minimum}`);
	}
};
/**
* Error thrown when supplied config parameter value is too big.
* This error might be thrown while setting or updating the [[ConfigParams]].
* The following methods accept [[ConfigParams]] as a parameter:
*
* @see [[buildEmpty]]
* @see [[buildFromArray]]
* @see [[buildFromSheets]]
* @see [[updateConfig]]
*/
var ConfigValueTooBigError = class extends Error {
	constructor(paramName, maximum) {
		super(`Config parameter ${paramName} should be at most ${maximum}`);
	}
};
/**
* Error thrown when the value was expected to be set for a config parameter.
* It also displays the expected value.
* This error might be thrown while setting or updating the [[ConfigParams]].
* The following methods accept [[ConfigParams]] as a parameter:
*
* @see [[buildEmpty]]
* @see [[buildFromArray]]
* @see [[buildFromSheets]]
* @see [[updateConfig]]
*/
var ExpectedOneOfValuesError = class extends Error {
	constructor(values, paramName) {
		super(`Expected one of ${values} for config parameter: ${paramName}`);
	}
};
/**
* Error thrown when computations become suspended.
* To perform any other action wait for the batch to complete or resume the evaluation.
* Relates to:
*
* @see [[batch]]
* @see [[suspendEvaluation]]
* @see [[resumeEvaluation]]
*/
var EvaluationSuspendedError = class extends Error {
	constructor() {
		super("Computations are suspended");
	}
};
/**
* Error thrown when translation is missing in translation package.
*/
var MissingTranslationError = class extends Error {
	constructor(key) {
		super(`Translation for ${key} is missing in the translation package you're using.`);
	}
};
/**
* Error thrown when trying to override protected translation.
*
* @see [[registerLanguage]]
* @see [[registerFunction]]
* @see [[registerFunctionPlugin]]
*/
var ProtectedFunctionTranslationError = class extends Error {
	constructor(key) {
		super(`Cannot register translation for function with id: ${key}`);
	}
};
/**
* Error thrown when trying to retrieve not registered language
*
* @see [[getLanguage]]
* @see [[unregisterLanguage]]
*/
var LanguageNotRegisteredError = class extends Error {
	constructor() {
		super("Language not registered.");
	}
};
/**
* Error thrown when trying to register already registered language
*
* @see [[registerLanguage]]
*/
var LanguageAlreadyRegisteredError = class extends Error {
	constructor() {
		super("Language already registered.");
	}
};
/**
* Error thrown when function plugin is invalid.
*
* @see [[registerFunction]]
* @see [[registerFunctionPlugin]]
* @see [[buildFromArray]]
* @see [[buildFromSheets]]
*/
var FunctionPluginValidationError = class FunctionPluginValidationError extends Error {
	static functionNotDeclaredInPlugin(functionId, pluginName) {
		return new FunctionPluginValidationError(`Function with id ${functionId} not declared in plugin ${pluginName}`);
	}
	static functionMethodNotFound(functionName, pluginName) {
		return new FunctionPluginValidationError(`Function method ${functionName} not found in plugin ${pluginName}`);
	}
};
/**
* Error thrown when trying to register, override or remove function with reserved id.
*
* @see [[registerFunctionPlugin]]
* @see [[registerFunction]]
* @see [[unregisterFunction]]
*/
var ProtectedFunctionError = class ProtectedFunctionError extends Error {
	static cannotRegisterFunctionWithId(functionId) {
		return new ProtectedFunctionError(`Cannot register function with id ${functionId}`);
	}
	static cannotUnregisterFunctionWithId(functionId) {
		return new ProtectedFunctionError(`Cannot unregister function with id ${functionId}`);
	}
	static cannotUnregisterProtectedPlugin() {
		return new ProtectedFunctionError("Cannot unregister protected plugin");
	}
};
/**
* Error thrown when selected source location has an array.
*/
var SourceLocationHasArrayError = class extends Error {
	constructor() {
		super("Cannot perform this operation, source location has an array inside.");
	}
};
/**
* Error thrown when selected target location has an array.
*
* @see [[addRows]]
* @see [[addColumns]]
* @see [[moveCells]]
* @see [[moveRows]]
* @see [[moveColumns]]
* @see [[paste]]
*/
var TargetLocationHasArrayError = class extends Error {
	constructor() {
		super("Cannot perform this operation, target location has an array inside.");
	}
};
/**
* Error thrown when named expression contains relative addresses.
*
* @see [[addNamedExpression]]
* @see [[changeNamedExpression]]
*/
var NoRelativeAddressesAllowedError = class extends Error {
	constructor() {
		super("Relative addresses not allowed in named expressions.");
	}
};
/**
* Error thrown when alias to a function is already defined.
*
* @see [[registerFunctionPlugin]]
* @see [[registerFunction]]
*/
var AliasAlreadyExisting = class extends Error {
	constructor(name, pluginName) {
		super(`Alias id ${name} in plugin ${pluginName} already defined as a function or alias.`);
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/DependencyGraph/AddressMapping/AddressMapping.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Manages cell vertices and provides access to vertex by SimpleCellAddress.
* For each sheet it stores vertices according to AddressMappingStrategy: DenseStrategy or SparseStrategy.
*
* Pleceholder sheets:
* - for placeholders sheets (sheets that are used in formulas but not yet added), it stores placeholder strategy entries (DenseStrategy(0, 0))
* - placeholder strategy entries may contain EmptyCellVertex-es but never ValueCellVertex or FormulaVertex as they content is empty
* - vertices in placeholder strategy entries are used only for dependency tracking
*/
var AddressMapping = class {
	constructor(policy) {
		this.policy = policy;
		this.mapping = /* @__PURE__ */ new Map();
	}
	/**
	* Gets the cell vertex at the specified address.
	*/
	getCell(address, options = {}) {
		const sheetMapping = this.mapping.get(address.sheet);
		if (!sheetMapping) {
			if (options.throwIfSheetNotExists) throw new NoSheetWithIdError(address.sheet);
			return;
		}
		const cell = sheetMapping.getCell(address);
		if (!cell && options.throwIfCellNotExists) throw Error("Vertex for address missing in AddressMapping");
		return cell;
	}
	/**
	* Gets the cell vertex at the specified address or throws if it doesn't exist.
	* @throws {NoSheetWithIdError} if sheet doesn't exist
	* @throws {Error} if cell doesn't exist
	*/
	getCellOrThrow(address) {
		const sheetMapping = this.mapping.get(address.sheet);
		if (!sheetMapping) throw new NoSheetWithIdError(address.sheet);
		const cell = sheetMapping.getCell(address);
		if (!cell) throw Error("Vertex for address missing in AddressMapping");
		return cell;
	}
	/**
	* Gets the address mapping strategy for the specified sheet.
	* @throws {NoSheetWithIdError} if sheet doesn't exist
	*/
	getStrategyForSheetOrThrow(sheetId) {
		const strategy = this.mapping.get(sheetId);
		if (strategy === void 0) throw new NoSheetWithIdError(sheetId);
		return strategy;
	}
	/**
	* Adds a new sheet with the specified strategy.
	* @throws {Error} if sheet is already added and throwIfSheetAlreadyExists is true
	*/
	addSheetWithStrategy(sheetId, strategy, options = { throwIfSheetAlreadyExists: true }) {
		const strategyFound = this.mapping.get(sheetId);
		if (strategyFound) {
			if (options.throwIfSheetAlreadyExists) throw Error("Sheet already added");
			return strategyFound;
		}
		this.mapping.set(sheetId, strategy);
		return strategy;
	}
	/**
	* Adds a sheet or changes the strategy for an existing sheet.
	* Designed for the purpose of exchanging the placeholder strategy for a real strategy.
	*/
	addSheetOrChangeStrategy(sheetId, sheetBoundaries) {
		const newStrategy = this.createStrategyBasedOnBoundaries(sheetBoundaries);
		const strategyPlaceholder = this.mapping.get(sheetId);
		if (!strategyPlaceholder) {
			this.mapping.set(sheetId, newStrategy);
			return newStrategy;
		}
		if (newStrategy instanceof DenseStrategy) return strategyPlaceholder;
		this.moveStrategyContent(strategyPlaceholder, newStrategy, sheetId);
		this.mapping.set(sheetId, newStrategy);
		return newStrategy;
	}
	/**
	* Moves the content of the source strategy to the target strategy.
	*/
	moveStrategyContent(sourceStrategy, targetStrategy, sheetContext) {
		const sourceVertices = sourceStrategy.getEntries(sheetContext);
		for (const [address, vertex] of sourceVertices) targetStrategy.setCell(address, vertex);
	}
	/**
	* Adds a sheet and sets the strategy based on the sheet boundaries.
	* @throws {Error} if sheet already exists and throwIfSheetAlreadyExists is true
	*/
	addSheetAndSetStrategyBasedOnBoundaries(sheetId, sheetBoundaries, options = { throwIfSheetAlreadyExists: true }) {
		this.addSheetWithStrategy(sheetId, this.createStrategyBasedOnBoundaries(sheetBoundaries), options);
	}
	/**
	* Creates a strategy based on the sheet boundaries.
	*/
	createStrategyBasedOnBoundaries(sheetBoundaries) {
		const { height, width, fill } = sheetBoundaries;
		return new (this.policy.call(fill))(width, height);
	}
	/**
	* Adds a placeholder strategy (DenseStrategy) for a sheet. If the sheet already exists, does nothing.
	*/
	addSheetStrategyPlaceholderIfNotExists(sheetId) {
		if (this.mapping.has(sheetId)) return;
		this.mapping.set(sheetId, new DenseStrategy(0, 0));
	}
	/**
	* Removes a sheet from the address mapping.
	* If sheet does not exist, does nothing.
	* @returns {boolean} true if sheet was removed, false if it did not exist.
	*/
	removeSheetIfExists(sheetId) {
		return this.mapping.delete(sheetId);
	}
	/**
	* Gets the interpreter value of a cell at the specified address.
	* @returns {InterpreterValue} The interpreter value (returns EmptyValue if cell doesn't exist)
	*/
	getCellValue(address) {
		const vertex = this.getCell(address);
		if (vertex === void 0) return EmptyValue;
		else if (vertex instanceof ArrayFormulaVertex) return vertex.getArrayCellValue(address);
		else return vertex.getCellValue();
	}
	/**
	* Gets the raw cell content at the specified address.
	* @returns {RawCellContent} The raw cell content or null if cell doesn't exist or is not a value cell
	*/
	getRawValue(address) {
		const vertex = this.getCell(address);
		if (vertex instanceof ValueCellVertex) return vertex.getValues().rawValue;
		else if (vertex instanceof ArrayFormulaVertex) return vertex.getArrayCellRawValue(address);
		else return null;
	}
	/**
	* Sets a cell vertex at the specified address.
	* @throws {Error} if sheet not initialized
	*/
	setCell(address, newVertex) {
		const sheetMapping = this.mapping.get(address.sheet);
		if (!sheetMapping) throw Error("Sheet not initialized");
		sheetMapping.setCell(address, newVertex);
	}
	/**
	* Moves a cell from source address to destination address.
	* Supports cross-sheet moves (used for placeholder sheet merging).
	* @throws {Error} if source sheet not initialized
	* @throws {Error} if destination occupied
	* @throws {Error} if source cell doesn't exist
	*/
	moveCell(source, destination) {
		const sheetMapping = this.mapping.get(source.sheet);
		if (!sheetMapping) throw Error("Sheet not initialized.");
		if (this.has(destination)) throw new Error("Cannot move cell. Destination already occupied.");
		const vertex = sheetMapping.getCell(source);
		if (vertex === void 0) throw new Error("Cannot move cell. No cell with such address.");
		this.setCell(destination, vertex);
		this.removeCell(source);
	}
	/**
	* Removes a cell at the specified address.
	* @throws Error if sheet not initialized
	*/
	removeCell(address) {
		const sheetMapping = this.mapping.get(address.sheet);
		if (!sheetMapping) throw Error("Sheet not initialized");
		sheetMapping.removeCell(address);
	}
	/**
	* Checks if a cell exists at the specified address.
	*/
	has(address) {
		const sheetMapping = this.mapping.get(address.sheet);
		if (sheetMapping === void 0) return false;
		return sheetMapping.has(address);
	}
	/**
	* Gets the height of the specified sheet.
	*/
	getSheetHeight(sheetId) {
		return this.getStrategyForSheetOrThrow(sheetId).getHeight();
	}
	/**
	* Gets the width of the specified sheet.
	*/
	getSheetWidth(sheetId) {
		return this.getStrategyForSheetOrThrow(sheetId).getWidth();
	}
	/**
	* Adds rows to a sheet.
	*/
	addRows(sheetId, row, numberOfRows) {
		this.getStrategyForSheetOrThrow(sheetId).addRows(row, numberOfRows);
	}
	/**
	* Removes rows from a sheet.
	*/
	removeRows(removedRows) {
		this.getStrategyForSheetOrThrow(removedRows.sheet).removeRows(removedRows);
	}
	/**
	* Adds columns to a sheet starting at the specified column index.
	*/
	addColumns(sheetId, column, numberOfColumns) {
		this.getStrategyForSheetOrThrow(sheetId).addColumns(column, numberOfColumns);
	}
	/**
	* Removes columns from a sheet.
	*/
	removeColumns(removedColumns) {
		this.getStrategyForSheetOrThrow(removedColumns.sheet).removeColumns(removedColumns);
	}
	/**
	* Returns an iterator of cell vertices within the specified rows span.
	*/
	*verticesFromRowsSpan(rowsSpan) {
		yield* this.mapping.get(rowsSpan.sheet).verticesFromRowsSpan(rowsSpan);
	}
	/**
	* Returns an iterator of cell vertices within the specified columns span.
	*/
	*verticesFromColumnsSpan(columnsSpan) {
		yield* this.mapping.get(columnsSpan.sheet).verticesFromColumnsSpan(columnsSpan);
	}
	/**
	* Returns an iterator of address-vertex pairs within the specified rows span.
	*/
	*entriesFromRowsSpan(rowsSpan) {
		yield* this.getStrategyForSheetOrThrow(rowsSpan.sheet).entriesFromRowsSpan(rowsSpan);
	}
	/**
	* Returns an iterator of address-vertex pairs within the specified columns span.
	*/
	*entriesFromColumnsSpan(columnsSpan) {
		yield* this.getStrategyForSheetOrThrow(columnsSpan.sheet).entriesFromColumnsSpan(columnsSpan);
	}
	/**
	* Returns an iterator of all address-vertex pairs across all sheets.
	* @returns {IterableIterator<[SimpleCellAddress, Maybe<CellVertex>]>} Iterator of [address, vertex] tuples
	*/
	*entries() {
		for (const [sheet, mapping] of this.mapping.entries()) yield* mapping.getEntries(sheet);
	}
	/**
	* Returns an iterator of address-vertex pairs for a specific sheet.
	* @returns {IterableIterator<[SimpleCellAddress, CellVertex]>} Iterator of [address, vertex] tuples
	* @throws {NoSheetWithIdError} if sheet doesn't exist
	*/
	*sheetEntries(sheetId) {
		yield* this.getStrategyForSheetOrThrow(sheetId).getEntries(sheetId);
	}
	/**
	* Checks if a sheet has any entries.
	* @throws {NoSheetWithIdError} if sheet doesn't exist
	*/
	hasAnyEntries(sheetId) {
		return !this.sheetEntries(sheetId).next().done;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/DependencyGraph/ArrayMapping.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Maps top-left corner addresses to their ArrayFormulaVertex instances.
* An ArrayFormulaVertex is created for formulas that output multiple values (e.g., MMULT, TRANSPOSE, array literals).
* The same ArrayFormulaVertex is referenced in AddressMapping for all cells within its spill range.
* ArrayFormulaVertex lifecycle:
* - Prediction (ArraySizePredictor.checkArraySize) → determines if formula will produce array
* - Creation → new ArrayFormulaVertex(...) added via addArrayFormulaVertex()
* - Address registration → setAddressMappingForArrayFormulaVertex() sets the vertex for all cells in range
* - Evaluation → computes actual values, stores in ArrayFormulaVertex.array
* - Shrinking → if content placed in array area, array shrinks via shrinkArrayToCorner()
*/
var ArrayMapping = class {
	constructor() {
		this.arrayMapping = /* @__PURE__ */ new Map();
	}
	getArray(range) {
		const array = this.getArrayByCorner(range.start);
		if (array === null || array === void 0 ? void 0 : array.getRange().sameAs(range)) return array;
	}
	getArrayByCorner(address) {
		return this.arrayMapping.get(addressKey(address));
	}
	setArray(range, vertex) {
		this.arrayMapping.set(addressKey(range.start), vertex);
	}
	removeArray(range) {
		if (typeof range === "string") this.arrayMapping.delete(range);
		else this.arrayMapping.delete(addressKey(range.start));
	}
	count() {
		return this.arrayMapping.size;
	}
	*arraysInRows(rowsSpan) {
		for (const [mtxKey, mtx] of this.arrayMapping.entries()) if (mtx.spansThroughSheetRows(rowsSpan.sheet, rowsSpan.rowStart, rowsSpan.rowEnd)) yield [mtxKey, mtx];
	}
	*arraysInCols(col) {
		for (const [mtxKey, mtx] of this.arrayMapping.entries()) if (mtx.spansThroughSheetColumn(col.sheet, col.columnStart, col.columnEnd)) yield [mtxKey, mtx];
	}
	isFormulaArrayInRow(sheet, row) {
		for (const mtx of this.arrayMapping.values()) if (mtx.spansThroughSheetRows(sheet, row)) return true;
		return false;
	}
	isFormulaArrayInAllRows(span) {
		let result = true;
		for (const row of span.rows()) if (!this.isFormulaArrayInRow(span.sheet, row)) result = false;
		return result;
	}
	isFormulaArrayInColumn(sheet, column) {
		for (const mtx of this.arrayMapping.values()) if (mtx.spansThroughSheetColumn(sheet, column)) return true;
		return false;
	}
	isFormulaArrayInAllColumns(span) {
		let result = true;
		for (const col of span.columns()) if (!this.isFormulaArrayInColumn(span.sheet, col)) result = false;
		return result;
	}
	isFormulaArrayInRange(range) {
		for (const mtx of this.arrayMapping.values()) if (mtx.getRange().doesOverlap(range)) return true;
		return false;
	}
	isFormulaArrayAtAddress(address) {
		for (const mtx of this.arrayMapping.values()) if (mtx.getRange().addressInRange(address)) return true;
		return false;
	}
	moveArrayVerticesAfterRowByRows(sheet, row, numberOfRows) {
		this.updateArrayVerticesInSheet(sheet, (key, vertex) => {
			const range = vertex.getRange();
			return row <= range.start.row ? [range.shifted(0, numberOfRows), vertex] : void 0;
		});
	}
	moveArrayVerticesAfterColumnByColumns(sheet, column, numberOfColumns) {
		this.updateArrayVerticesInSheet(sheet, (key, vertex) => {
			const range = vertex.getRange();
			return column <= range.start.col ? [range.shifted(numberOfColumns, 0), vertex] : void 0;
		});
	}
	updateArrayVerticesInSheet(sheet, fn) {
		const updated = Array();
		for (const [key, vertex] of this.arrayMapping.entries()) {
			if (vertex.sheet !== sheet) continue;
			const result = fn(key, vertex);
			if (result !== void 0) {
				this.removeArray(key);
				updated.push(result);
			}
		}
		updated.forEach(([range, array]) => {
			this.setArray(range, array);
		});
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/ArrayValue.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var NotComputedArray = class {
	constructor(size) {
		this.size = size;
	}
	width() {
		return this.size.width;
	}
	height() {
		return this.size.height;
	}
	get(col, row) {
		throw Error("Array not computed yet.");
	}
	simpleRangeValue() {
		throw Error("Array not computed yet.");
	}
};
var ArrayValue = class ArrayValue {
	constructor(array) {
		this.size = new ArraySize(array.length > 0 ? array[0].length : 0, array.length);
		this.array = array;
		if (this.size.width <= 0 || this.size.height <= 0) throw Error("Incorrect array size");
	}
	static fromInterpreterValue(value) {
		if (value instanceof SimpleRangeValue) return new ArrayValue(value.data);
		else return new ArrayValue([[value]]);
	}
	simpleRangeValue() {
		return SimpleRangeValue.onlyValues(this.array);
	}
	addRows(aboveRow, numberOfRows) {
		this.array.splice(aboveRow, 0, ...this.nullArrays(numberOfRows, this.width()));
		this.size.height += numberOfRows;
	}
	addColumns(aboveColumn, numberOfColumns) {
		for (let i = 0; i < this.height(); i++) this.array[i].splice(aboveColumn, 0, ...new Array(numberOfColumns).fill(EmptyValue));
		this.size.width += numberOfColumns;
	}
	removeRows(startRow, endRow) {
		if (this.outOfBound(0, startRow) || this.outOfBound(0, endRow)) throw Error("Array index out of bound");
		const numberOfRows = endRow - startRow + 1;
		this.array.splice(startRow, numberOfRows);
		this.size.height -= numberOfRows;
	}
	removeColumns(leftmostColumn, rightmostColumn) {
		if (this.outOfBound(leftmostColumn, 0) || this.outOfBound(rightmostColumn, 0)) throw Error("Array index out of bound");
		const numberOfColumns = rightmostColumn - leftmostColumn + 1;
		for (const row of this.array) row.splice(leftmostColumn, numberOfColumns);
		this.size.width -= numberOfColumns;
	}
	nullArrays(count, size) {
		const result = [];
		for (let i = 0; i < count; ++i) result.push(new Array(size).fill(EmptyValue));
		return result;
	}
	get(col, row) {
		if (this.outOfBound(col, row)) throw Error("Array index out of bound");
		return this.array[row][col];
	}
	set(col, row, value) {
		if (this.outOfBound(col, row)) throw Error("Array index out of bound");
		this.array[row][col] = value;
	}
	width() {
		return this.size.width;
	}
	height() {
		return this.size.height;
	}
	raw() {
		return this.array;
	}
	resize(newSize) {
		if (this.height() < newSize.height && isFinite(newSize.height)) this.addRows(this.height(), newSize.height - this.height());
		if (this.height() > newSize.height) throw Error("Resizing to smaller array");
		if (this.width() < newSize.width && isFinite(newSize.width)) this.addColumns(this.width(), newSize.width - this.width());
		if (this.width() > newSize.width) throw Error("Resizing to smaller array");
	}
	outOfBound(col, row) {
		return col < 0 || row < 0 || row > this.size.height - 1 || col > this.size.width - 1;
	}
};
var ErroredArray = class {
	constructor(error, size) {
		this.error = error;
		this.size = size;
	}
	get(col, row) {
		return this.error;
	}
	width() {
		return this.size.width;
	}
	height() {
		return this.size.height;
	}
	simpleRangeValue() {
		return this.error;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/DependencyGraph/Vertex.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Base class for all types of vertices in the dependency graph
*/
var Vertex = class {};
//#endregion
//#region ../../node_modules/hyperformula/es/DependencyGraph/CellVertex.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Represents vertex which keeps values of one or more cells
*/
var CellVertex = class extends Vertex {
	constructor() {
		super();
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/DependencyGraph/FormulaVertex.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Abstract base class for vertices that contain formulas in the dependency graph.
*
* Stores formula AST, cell address, and version for lazy transformation support.
* Has two concrete implementations: {@link ScalarFormulaVertex} for single-cell formulas
* and {@link ArrayFormulaVertex} for array formulas that span multiple cells.
*/
var FormulaVertex = class extends CellVertex {
	constructor(formula, cellAddress, version) {
		super();
		this.formula = formula;
		this.cellAddress = cellAddress;
		this.version = version;
	}
	get width() {
		return 1;
	}
	get height() {
		return 1;
	}
	static fromAst(formula, address, size, version) {
		if (size.isScalar()) return new ScalarFormulaVertex(formula, address, version);
		else return new ArrayFormulaVertex(formula, address, size, version);
	}
	/**
	* Returns formula stored in this vertex
	*/
	getFormula(updatingService) {
		this.ensureRecentData(updatingService);
		return this.formula;
	}
	ensureRecentData(updatingService) {
		if (this.version != updatingService.version()) {
			const [newAst, newAddress, newVersion] = updatingService.applyTransformations(this.formula, this.cellAddress, this.version);
			this.formula = newAst;
			this.cellAddress = newAddress;
			this.version = newVersion;
		}
	}
	/**
	* Returns address of the cell associated with vertex
	*/
	getAddress(updatingService) {
		this.ensureRecentData(updatingService);
		return this.cellAddress;
	}
};
/**
* Represents a formula vertex that produces an array result spanning multiple cells.
*
* Array formulas are transformed eagerly (unlike scalar formulas) and store their
* computed values in a {@link CellArray} structure.
*/
var ArrayFormulaVertex = class extends FormulaVertex {
	constructor(formula, cellAddress, size, version = 0) {
		super(formula, cellAddress, version);
		if (size.isRef) this.array = new ErroredArray(new CellError(ErrorType.REF, ErrorMessage.NoSpaceForArrayResult), ArraySize.error());
		else this.array = new NotComputedArray(size);
	}
	get width() {
		return this.array.width();
	}
	get height() {
		return this.array.height();
	}
	get sheet() {
		return this.cellAddress.sheet;
	}
	get leftCorner() {
		return this.cellAddress;
	}
	setCellValue(value) {
		if (value instanceof CellError) {
			this.setErrorValue(value);
			return value;
		}
		const array = ArrayValue.fromInterpreterValue(value);
		array.resize(this.array.size);
		this.array = array;
		return value;
	}
	getCellValue() {
		if (this.array instanceof NotComputedArray) throw Error("Array not computed yet.");
		return this.array.simpleRangeValue();
	}
	valueOrUndef() {
		if (this.array instanceof NotComputedArray) return;
		return this.array.simpleRangeValue();
	}
	getArrayCellValue(address) {
		const col = address.col - this.cellAddress.col;
		const row = address.row - this.cellAddress.row;
		try {
			return this.array.get(col, row);
		} catch (e) {
			return new CellError(ErrorType.REF);
		}
	}
	getArrayCellRawValue(address) {
		const val = this.getArrayCellValue(address);
		if (val instanceof CellError || val === EmptyValue) return;
		else return getRawValue(val);
	}
	setArrayCellValue(address, value) {
		const col = address.col - this.cellAddress.col;
		const row = address.row - this.cellAddress.row;
		if (this.array instanceof ArrayValue) this.array.set(col, row, value);
	}
	setNoSpace() {
		this.array = new ErroredArray(new CellError(ErrorType.SPILL, ErrorMessage.NoSpaceForArrayResult), ArraySize.error());
		return this.getCellValue();
	}
	getRange() {
		return AbsoluteCellRange.spanFrom(this.cellAddress, this.width, this.height);
	}
	getRangeOrUndef() {
		return AbsoluteCellRange.spanFromOrUndef(this.cellAddress, this.width, this.height);
	}
	setAddress(address) {
		this.cellAddress = address;
	}
	setFormula(newFormula) {
		this.formula = newFormula;
	}
	spansThroughSheetRows(sheet, startRow, endRow = startRow) {
		return this.cellAddress.sheet === sheet && this.cellAddress.row <= endRow && startRow < this.cellAddress.row + this.height;
	}
	spansThroughSheetColumn(sheet, col, columnEnd = col) {
		return this.cellAddress.sheet === sheet && this.cellAddress.col <= columnEnd && col < this.cellAddress.col + this.width;
	}
	isComputed() {
		return !(this.array instanceof NotComputedArray);
	}
	columnsFromArray() {
		return ColumnsSpan.fromNumberOfColumns(this.cellAddress.sheet, this.cellAddress.col, this.width);
	}
	rowsFromArray() {
		return RowsSpan.fromNumberOfRows(this.cellAddress.sheet, this.cellAddress.row, this.height);
	}
	/**
	* No-op as array vertices are transformed eagerly.
	*/
	ensureRecentData(_updatingService) {}
	isLeftCorner(address) {
		return equalSimpleCellAddress(this.cellAddress, address);
	}
	setErrorValue(error) {
		this.array = new ErroredArray(error, this.array.size);
	}
};
/**
* Represents a formula vertex that produces a single scalar value.
*
* Unlike {@link ArrayFormulaVertex}, scalar formulas are transformed lazily
* and cache their computed value for retrieval.
*/
var ScalarFormulaVertex = class extends FormulaVertex {
	constructor(formula, address, version) {
		super(formula, address, version);
	}
	valueOrUndef() {
		return this.cachedCellValue;
	}
	/**
	* Sets computed cell value stored in this vertex
	*/
	setCellValue(cellValue) {
		this.cachedCellValue = cellValue;
		return this.cachedCellValue;
	}
	/**
	* Returns cell value stored in vertex
	*/
	getCellValue() {
		if (this.cachedCellValue !== void 0) return this.cachedCellValue;
		else throw Error("Value of the formula cell is not computed.");
	}
	isComputed() {
		return this.cachedCellValue !== void 0;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/DependencyGraph/RangeVertex.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Represents vertex bound to range
*/
var RangeVertex = class extends Vertex {
	constructor(range) {
		super();
		this.range = range;
		this.functionCache = /* @__PURE__ */ new Map();
		this.criterionFunctionCache = /* @__PURE__ */ new Map();
		this.dependentCacheRanges = /* @__PURE__ */ new Set();
		this.bruteForce = false;
	}
	get start() {
		return this.range.start;
	}
	get end() {
		return this.range.end;
	}
	get sheet() {
		return this.range.start.sheet;
	}
	/**
	* Returns cached value stored for given function
	*
	* @param functionName - name of the function
	*/
	getFunctionValue(functionName) {
		return this.functionCache.get(functionName);
	}
	/**
	* Stores cached value for given function
	*
	* @param functionName - name of the function
	* @param value - cached value
	*/
	setFunctionValue(functionName, value) {
		this.functionCache.set(functionName, value);
	}
	/**
	* Returns cached value for given cache key and criterion text representation
	*
	* @param cacheKey - key to retrieve from the cache
	* @param criterionString - criterion text (ex. '<=5')
	*/
	getCriterionFunctionValue(cacheKey, criterionString) {
		var _a;
		return (_a = this.getCriterionFunctionValues(cacheKey).get(criterionString)) === null || _a === void 0 ? void 0 : _a[0];
	}
	/**
	* Returns all cached values stored for given criterion function
	*
	* @param cacheKey - key to retrieve from the cache
	*/
	getCriterionFunctionValues(cacheKey) {
		var _a;
		return (_a = this.criterionFunctionCache.get(cacheKey)) !== null && _a !== void 0 ? _a : /* @__PURE__ */ new Map();
	}
	/**
	* Stores all values for given criterion function
	*
	* @param cacheKey - key to store in the cache
	* @param values - map with values
	*/
	setCriterionFunctionValues(cacheKey, values) {
		this.criterionFunctionCache.set(cacheKey, values);
	}
	addDependentCacheRange(dependentRange) {
		if (dependentRange !== this) this.dependentCacheRanges.add(dependentRange);
	}
	/**
	* Clears function cache
	*/
	clearCache() {
		this.functionCache.clear();
		this.criterionFunctionCache.clear();
		this.dependentCacheRanges.forEach((range) => range.criterionFunctionCache.clear());
		this.dependentCacheRanges.clear();
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/DependencyGraph/collectAddressesDependentToRange.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var collectAddressesDependentToRange = (functionRegistry, vertex, range, lazilyTransformingAstService, dependencyGraph) => {
	if (vertex instanceof RangeVertex) {
		const intersection = vertex.range.intersectionWith(range);
		if (intersection !== void 0) return Array.from(intersection.addresses(dependencyGraph));
		else return [];
	}
	let formula;
	let address;
	if (vertex instanceof FormulaVertex) {
		formula = vertex.getFormula(lazilyTransformingAstService);
		address = vertex.getAddress(lazilyTransformingAstService);
	} else return [];
	return collectDependencies(formula, functionRegistry).filter((d) => d instanceof AddressDependency).map((d) => d.dependency.toSimpleCellAddress(address)).filter((d) => range.addressInRange(d));
};
//#endregion
//#region ../../node_modules/hyperformula/es/DependencyGraph/TopSort.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var NodeVisitStatus;
(function(NodeVisitStatus) {
	NodeVisitStatus[NodeVisitStatus["ON_STACK"] = 0] = "ON_STACK";
	NodeVisitStatus[NodeVisitStatus["PROCESSED"] = 1] = "PROCESSED";
	NodeVisitStatus[NodeVisitStatus["POPPED"] = 2] = "POPPED";
})(NodeVisitStatus || (NodeVisitStatus = {}));
/**
* An algorithm class. Provides an iterative implementation of Tarjan's algorithm for finding strongly connected components
*/
var TopSort = class {
	constructor(nodesSparseArray = [], edgesSparseArray = []) {
		this.nodesSparseArray = nodesSparseArray;
		this.edgesSparseArray = edgesSparseArray;
		this.entranceTime = [];
		this.low = [];
		this.parent = [];
		this.inSCC = [];
		this.nodeStatus = [];
		this.order = [];
		this.sccNonSingletons = [];
		this.timeCounter = 0;
	}
	/**
	* An iterative implementation of Tarjan's algorithm for finding strongly connected components.
	* Returns vertices in order of topological sort, but vertices that are on cycles are kept separate.
	*
	* @param modifiedNodes - seed for computation. During engine init run, all of the vertices of grap. In recomputation run, changed vertices.
	* @param operatingFunction - recomputes value of a node, and returns whether a change occurred
	* @param onCycle - action to be performed when node is on cycle
	*/
	getTopSortedWithSccSubgraphFrom(modifiedNodeIds, operatingFunction, onCycle) {
		const modifiedNodeIdsReversed = modifiedNodeIds.reverse();
		modifiedNodeIdsReversed.forEach((id) => this.runDFS(id));
		return this.postprocess(modifiedNodeIdsReversed, onCycle, operatingFunction);
	}
	/**
	* Returns adjacent nodes of a given node.
	*/
	getAdjacentNodeIds(id) {
		return this.edgesSparseArray[id].filter((adjacentId) => adjacentId !== void 0 && this.nodesSparseArray[adjacentId]);
	}
	/**
	* Runs DFS starting from a given node.
	*/
	runDFS(v) {
		if (this.nodeStatus[v] !== void 0) return;
		this.nodeStatus[v] = NodeVisitStatus.ON_STACK;
		const DFSstack = [v];
		const SCCstack = [];
		while (DFSstack.length > 0) {
			const u = DFSstack[DFSstack.length - 1];
			switch (this.nodeStatus[u]) {
				case NodeVisitStatus.ON_STACK:
					this.handleOnStack(u, SCCstack, DFSstack);
					break;
				case NodeVisitStatus.PROCESSED:
					this.handleProcessed(u, SCCstack, DFSstack);
					break;
				case NodeVisitStatus.POPPED:
					DFSstack.pop();
					break;
			}
		}
	}
	/**
	* Handles a node that is on stack.
	*/
	handleOnStack(u, SCCstack, DFSstack) {
		this.entranceTime[u] = this.timeCounter;
		this.low[u] = this.timeCounter;
		this.timeCounter++;
		SCCstack.push(u);
		this.getAdjacentNodeIds(u).forEach((t) => {
			if (this.entranceTime[t] === void 0) {
				DFSstack.push(t);
				this.parent[t] = u;
				this.nodeStatus[t] = NodeVisitStatus.ON_STACK;
			}
		});
		this.nodeStatus[u] = NodeVisitStatus.PROCESSED;
	}
	/**
	* Handles a node that is already processed.
	*/
	handleProcessed(u, SCCstack, DFSstack) {
		let uLow = this.entranceTime[u];
		this.getAdjacentNodeIds(u).forEach((t) => {
			if (this.inSCC[t]) return;
			uLow = this.parent[t] === u ? Math.min(uLow, this.low[t]) : Math.min(uLow, this.entranceTime[t]);
		});
		this.low[u] = uLow;
		if (uLow === this.entranceTime[u]) {
			const currentSCC = [];
			do {
				currentSCC.push(SCCstack[SCCstack.length - 1]);
				SCCstack.pop();
			} while (currentSCC[currentSCC.length - 1] !== u);
			currentSCC.forEach((t) => {
				this.inSCC[t] = true;
			});
			this.order.push(...currentSCC);
			if (currentSCC.length > 1) currentSCC.forEach((t) => {
				this.sccNonSingletons[t] = true;
			});
		}
		DFSstack.pop();
		this.nodeStatus[u] = NodeVisitStatus.POPPED;
	}
	/**
	* Postprocesses the result of Tarjan's algorithm.
	*/
	postprocess(modifiedNodeIds, onCycle, operatingFunction) {
		const shouldBeUpdatedMapping = [];
		modifiedNodeIds.forEach((t) => {
			shouldBeUpdatedMapping[t] = true;
		});
		const sorted = [];
		const cycled = [];
		this.order.reverse();
		this.order.forEach((t) => {
			const adjacentNodes = this.getAdjacentNodeIds(t);
			if (this.sccNonSingletons[t] || adjacentNodes.includes(t)) {
				cycled.push(this.nodesSparseArray[t]);
				onCycle(this.nodesSparseArray[t]);
				adjacentNodes.forEach((s) => shouldBeUpdatedMapping[s] = true);
			} else {
				sorted.push(this.nodesSparseArray[t]);
				if (shouldBeUpdatedMapping[t] && operatingFunction(this.nodesSparseArray[t])) adjacentNodes.forEach((s) => shouldBeUpdatedMapping[s] = true);
			}
		});
		return {
			sorted,
			cycled
		};
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/DependencyGraph/ProcessableValue.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var ProcessableValue = class {
	constructor(rawValue, processFn) {
		this.rawValue = rawValue;
		this.processFn = processFn;
		this.processedValue = null;
	}
	getProcessedValue() {
		if (this.processedValue === null) this.processedValue = this.processFn(this.rawValue);
		return this.processedValue;
	}
	markAsModified() {
		this.processedValue = null;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/DependencyGraph/Graph.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Provides directed graph structure.
*
* Idea for performance improvement:
* - use Set<Node>[] instead of NodeId[][] for edgesSparseArray
*/
var Graph = class {
	constructor(dependencyQuery) {
		this.dependencyQuery = dependencyQuery;
		/**
		* A sparse array. The value nodesSparseArray[n] exists if and only if node n is in the graph.
		* @private
		*/
		this.nodesSparseArray = [];
		/**
		* A sparse array. The value edgesSparseArray[n] exists if and only if node n is in the graph.
		* The edgesSparseArray[n] is also a sparse array. It may contain removed nodes. To make sure check nodesSparseArray.
		* @private
		*/
		this.edgesSparseArray = [];
		/**
		* A ProcessableValue object.
		* @private
		*/
		this.dirtyAndVolatileNodeIds = new ProcessableValue({
			dirty: [],
			volatile: []
		}, (r) => this.processDirtyAndVolatileNodeIds(r));
		/**
		* A set of node ids. The value infiniteRangeIds.get(nodeId) exists if and only if node is in the graph.
		* @private
		*/
		this.infiniteRangeIds = /* @__PURE__ */ new Set();
		/**
		* A dense array. It may contain duplicates and removed nodes.
		* @private
		*/
		this.changingWithStructureNodeIds = [];
		this.nextId = 0;
	}
	/**
	* Iterate over all nodes the in graph
	*/
	getNodes() {
		return this.nodesSparseArray.filter((node) => node !== void 0);
	}
	/**
	* Checks whether a node is present in graph
	*
	* @param {Node} node - node to check
	*/
	hasNode(node) {
		return node.idInGraph != null;
	}
	/**
	* Checks whether exists edge between nodes. If one or both of nodes are not present in graph, returns false.
	*
	* @param {Node} fromNode - node from which edge is outcoming
	* @param {Node} toNode - node to which edge is incoming
	*/
	existsEdge(fromNode, toNode) {
		const fromId = fromNode.idInGraph;
		const toId = toNode.idInGraph;
		if (fromId === void 0 || toId === void 0) return false;
		return this.edgesSparseArray[fromId].includes(toId);
	}
	/**
	* Returns nodes adjacent to given node. May contain removed nodes.
	*
	* @param {Node} node - node to which adjacent nodes we want to retrieve
	*
	* Idea for performance improvement:
	* - return an array instead of set
	*/
	adjacentNodes(node) {
		const nodeId = node.idInGraph;
		if (nodeId === void 0) throw this.missingNodeError(node);
		return new Set(this.edgesSparseArray[nodeId].filter((id) => id !== void 0).map((id) => this.nodesSparseArray[id]).filter((node) => node !== void 0));
	}
	/**
	* Returns number of nodes adjacent to given node. Contrary to adjacentNodes(), this method returns only nodes that are present in graph.
	*
	* @param {Node} node - node to which adjacent nodes we want to retrieve
	*/
	adjacentNodesCount(node) {
		const id = node.idInGraph;
		if (id === void 0) throw this.missingNodeError(node);
		return this.fixEdgesArrayForNode(id).length;
	}
	/**
	* Adds node to a graph if it does not exist yet.
	*
	* @param {Node} node - a node to be added
	* @returns {NodeId} - the id of the added node
	*/
	addNodeIfNotExists(node) {
		const idOfExistingNode = node.idInGraph;
		if (idOfExistingNode !== void 0) return idOfExistingNode;
		const newId = this.nextId;
		this.nextId++;
		this.nodesSparseArray[newId] = node;
		this.edgesSparseArray[newId] = [];
		node.idInGraph = newId;
		return newId;
	}
	/**
	* Adds edge between nodes.
	*
	* The nodes had to be added to the graph before, or the error will be raised
	*
	* @param {Node | NodeId} fromNode - node from which edge is outcoming
	* @param {Node | NodeId} toNode - node to which edge is incoming
	*/
	addEdge(fromNode, toNode) {
		const fromId = this.getNodeIdIfNotNumber(fromNode);
		const toId = this.getNodeIdIfNotNumber(toNode);
		if (fromId === void 0) throw this.missingNodeError(fromNode);
		if (toId === void 0) throw this.missingNodeError(toNode);
		if (this.edgesSparseArray[fromId].includes(toId)) return;
		this.edgesSparseArray[fromId].push(toId);
	}
	/**
	* Removes node from graph
	*/
	removeNode(node) {
		const id = node.idInGraph;
		if (id === void 0) throw this.missingNodeError(node);
		if (this.edgesSparseArray[id].length > 0) {
			this.edgesSparseArray[id].forEach((adjacentId) => this.dirtyAndVolatileNodeIds.rawValue.dirty.push(adjacentId));
			this.dirtyAndVolatileNodeIds.markAsModified();
		}
		const dependencies = this.removeDependencies(node);
		delete this.nodesSparseArray[id];
		delete this.edgesSparseArray[id];
		this.infiniteRangeIds.delete(id);
		node.idInGraph = void 0;
		return dependencies;
	}
	/**
	* Removes edge between nodes.
	*/
	removeEdge(fromNode, toNode) {
		const fromId = this.getNodeIdIfNotNumber(fromNode);
		const toId = this.getNodeIdIfNotNumber(toNode);
		if (fromId === void 0) throw this.missingNodeError(fromNode);
		if (toId === void 0) throw this.missingNodeError(toNode);
		const indexOfToId = this.edgesSparseArray[fromId].indexOf(toId);
		if (indexOfToId === -1) throw new Error("Edge does not exist");
		delete this.edgesSparseArray[fromId][indexOfToId];
	}
	/**
	* Removes edge between nodes if it exists.
	*/
	removeEdgeIfExists(fromNode, toNode) {
		const fromId = this.getNodeIdIfNotNumber(fromNode);
		const toId = this.getNodeIdIfNotNumber(toNode);
		if (fromId === void 0) return;
		if (toId === void 0) return;
		const indexOfToId = this.edgesSparseArray[fromId].indexOf(toId);
		if (indexOfToId === -1) return;
		delete this.edgesSparseArray[fromId][indexOfToId];
	}
	/**
	* Sorts the whole graph topologically. Nodes that are on cycles are kept separate.
	*/
	topSortWithScc() {
		return this.getTopSortedWithSccSubgraphFrom(this.getNodes(), () => true, () => {});
	}
	/**
	* Sorts the graph topologically. Nodes that are on cycles are kept separate.
	*
	* @param {Node[]} modifiedNodes - seed for computation. The algorithm assumes that only these nodes have changed since the last run.
	* @param {(node: Node) => boolean} operatingFunction - recomputes value of a node, and returns whether a change occurred
	* @param {(node: Node) => void} onCycle - action to be performed when node is on cycle
	*/
	getTopSortedWithSccSubgraphFrom(modifiedNodes, operatingFunction, onCycle) {
		const topSortAlgorithm = new TopSort(this.nodesSparseArray, this.edgesSparseArray);
		const modifiedNodesIds = modifiedNodes.map((node) => node.idInGraph).filter((id) => id !== void 0);
		return topSortAlgorithm.getTopSortedWithSccSubgraphFrom(modifiedNodesIds, operatingFunction, onCycle);
	}
	/**
	* Marks node as volatile.
	*/
	markNodeAsVolatile(node) {
		const id = node.idInGraph;
		if (id === void 0) return;
		this.dirtyAndVolatileNodeIds.rawValue.volatile.push(id);
		this.dirtyAndVolatileNodeIds.markAsModified();
	}
	/**
	* Marks node as dirty.
	*/
	markNodeAsDirty(node) {
		const id = node.idInGraph;
		if (id === void 0) return;
		this.dirtyAndVolatileNodeIds.rawValue.dirty.push(id);
		this.dirtyAndVolatileNodeIds.markAsModified();
	}
	/**
	* Returns an array of nodes that are marked as dirty and/or volatile.
	*/
	getDirtyAndVolatileNodes() {
		return this.dirtyAndVolatileNodeIds.getProcessedValue();
	}
	/**
	* Clears dirty nodes.
	*/
	clearDirtyNodes() {
		this.dirtyAndVolatileNodeIds.rawValue.dirty = [];
		this.dirtyAndVolatileNodeIds.markAsModified();
	}
	/**
	* Marks node as changingWithStructure.
	*/
	markNodeAsChangingWithStructure(node) {
		const id = node.idInGraph;
		if (id === void 0) return;
		this.changingWithStructureNodeIds.push(id);
	}
	/**
	* Marks all nodes marked as changingWithStructure as dirty.
	*/
	markChangingWithStructureNodesAsDirty() {
		if (this.changingWithStructureNodeIds.length <= 0) return;
		this.dirtyAndVolatileNodeIds.rawValue.dirty = [...this.dirtyAndVolatileNodeIds.rawValue.dirty, ...this.changingWithStructureNodeIds];
		this.dirtyAndVolatileNodeIds.markAsModified();
	}
	/**
	* Marks node as infinite range.
	*/
	markNodeAsInfiniteRange(node) {
		const id = this.getNodeIdIfNotNumber(node);
		if (id === void 0) return;
		this.infiniteRangeIds.add(id);
	}
	/**
	* Returns an array of nodes marked as infinite ranges
	*/
	getInfiniteRanges() {
		return [...this.infiniteRangeIds].map((id) => this.nodesSparseArray[id]);
	}
	/**
	*
	*/
	getNodeIdIfNotNumber(node) {
		return typeof node === "number" ? node : node.idInGraph;
	}
	/**
	* Removes invalid neighbors of a given node from the edges array and returns adjacent nodes for the input node.
	*/
	fixEdgesArrayForNode(id) {
		const adjacentNodeIds = this.edgesSparseArray[id];
		this.edgesSparseArray[id] = adjacentNodeIds.filter((adjacentId) => adjacentId !== void 0 && this.nodesSparseArray[adjacentId]);
		return this.edgesSparseArray[id];
	}
	/**
	* Removes edges from the given node to its dependencies based on the dependencyQuery function.
	*/
	removeDependencies(node) {
		const dependencies = this.dependencyQuery(node);
		dependencies.forEach(([_, dependency]) => {
			this.removeEdgeIfExists(dependency, node);
		});
		return dependencies;
	}
	/**
	* processFn for dirtyAndVolatileNodeIds ProcessableValue instance
	* @private
	*/
	processDirtyAndVolatileNodeIds({ dirty, volatile }) {
		return [...new Set([...dirty, ...volatile])].map((id) => this.nodesSparseArray[id]).filter((node) => node !== void 0);
	}
	/**
	* Returns error for missing node.
	*/
	missingNodeError(node) {
		return /* @__PURE__ */ new Error(`Unknown node ${JSON.stringify(node)}`);
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/DependencyGraph/RangeMapping.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Maintains a per-sheet map from serialized start/end coordinates to `RangeVertex`.
* - Every range vertex in dependency graph should be stored in this mapping.
* - Guarantees uniqueness: one vertex per distinct rectangle, enabling cache reuse.
* - Implements "smaller prefix + tail row" optimization: if A1:A4 exists, A1:A5 depends on it + only A5.
* - RangeVertex stores cached results for associative aggregates (SUM, COUNT) and criterion functions.
*/
var RangeMapping = class RangeMapping {
	constructor() {
		/**
		* Map sheetId -> address of start and end (as string) -> vertex
		*/
		this.rangeMapping = /* @__PURE__ */ new Map();
	}
	/**
	* Returns number of ranges in the sheet or 0 if the sheet does not exist
	*/
	getNumberOfRangesInSheet(sheet) {
		var _a, _b;
		return (_b = (_a = this.rangeMapping.get(sheet)) === null || _a === void 0 ? void 0 : _a.size) !== null && _b !== void 0 ? _b : 0;
	}
	/**
	* Adds or updates vertex in the mapping
	*/
	addOrUpdateVertex(vertex) {
		let sheetMap = this.rangeMapping.get(vertex.sheet);
		if (sheetMap === void 0) {
			sheetMap = /* @__PURE__ */ new Map();
			this.rangeMapping.set(vertex.sheet, sheetMap);
		}
		const key = RangeMapping.calculateRangeKey(vertex.start, vertex.end);
		sheetMap.set(key, vertex);
	}
	/**
	* Removes vertex from the mapping if it exists
	*/
	removeVertexIfExists(vertex) {
		const sheet = vertex.sheet;
		const sheetMap = this.rangeMapping.get(sheet);
		if (sheetMap === void 0) return;
		const key = RangeMapping.calculateRangeKey(vertex.start, vertex.end);
		sheetMap.delete(key);
		if (sheetMap.size === 0) this.rangeMapping.delete(sheet);
	}
	/**
	* Returns associated vertex for given range
	*/
	getRangeVertex(start, end) {
		const sheetMap = this.rangeMapping.get(start.sheet);
		const key = RangeMapping.calculateRangeKey(start, end);
		return sheetMap === null || sheetMap === void 0 ? void 0 : sheetMap.get(key);
	}
	/**
	* Returns associated vertex for given range or throws an error if not found
	*/
	getVertexOrThrow(start, end) {
		const maybeRange = this.getRangeVertex(start, end);
		if (!maybeRange) throw Error("Range does not exist");
		return maybeRange;
	}
	truncateRanges(span, coordinate) {
		const verticesToRemove = Array();
		const updated = Array();
		const verticesWithChangedSize = Array();
		const sheet = span.sheet;
		for (const [key, vertex] of this.entriesFromSheet(span.sheet)) {
			const range = vertex.range;
			if (span.start <= coordinate(vertex.range.end)) {
				range.removeSpan(span);
				if (range.shouldBeRemoved()) {
					this.removeByKey(sheet, key);
					verticesToRemove.push(vertex);
				} else updated.push([key, vertex]);
				verticesWithChangedSize.push(vertex);
			}
		}
		const verticesToMerge = [];
		updated.sort((left, right) => RangeMapping.compareBy(left[1], right[1], coordinate));
		for (const [oldKey, vertex] of updated) {
			const newKey = RangeMapping.calculateRangeKey(vertex.range.start, vertex.range.end);
			if (newKey === oldKey) continue;
			const existingVertex = this.getByKey(sheet, newKey);
			this.removeByKey(sheet, oldKey);
			if (existingVertex !== void 0 && vertex != existingVertex) verticesToMerge.push([existingVertex, vertex]);
			else this.addOrUpdateVertex(vertex);
		}
		return {
			verticesToRemove,
			verticesToMerge,
			verticesWithChangedSize
		};
	}
	moveAllRangesInSheetAfterAddingRows(sheet, row, numberOfRows) {
		return this.updateVerticesFromSheet(sheet, (key, vertex) => {
			if (row <= vertex.start.row) {
				vertex.range.shiftByRows(numberOfRows);
				return {
					changedSize: false,
					vertex
				};
			} else if (row > vertex.start.row && row <= vertex.end.row) {
				vertex.range.expandByRows(numberOfRows);
				return {
					changedSize: true,
					vertex
				};
			} else return;
		});
	}
	moveAllRangesInSheetAfterAddingColumns(sheet, column, numberOfColumns) {
		return this.updateVerticesFromSheet(sheet, (key, vertex) => {
			if (column <= vertex.start.col) {
				vertex.range.shiftByColumns(numberOfColumns);
				return {
					changedSize: false,
					vertex
				};
			} else if (column > vertex.start.col && column <= vertex.end.col) {
				vertex.range.expandByColumns(numberOfColumns);
				return {
					changedSize: true,
					vertex
				};
			} else return;
		});
	}
	moveRangesInsideSourceRange(sourceRange, toRight, toBottom, toSheet) {
		this.updateVerticesFromSheet(sourceRange.sheet, (key, vertex) => {
			if (sourceRange.containsRange(vertex.range)) {
				vertex.range.shiftByColumns(toRight);
				vertex.range.shiftByRows(toBottom);
				vertex.range.moveToSheet(toSheet);
				return {
					changedSize: false,
					vertex
				};
			} else return;
		});
	}
	*rangesInSheet(sheet) {
		const sheetMap = this.rangeMapping.get(sheet);
		if (!sheetMap) return;
		yield* sheetMap.values();
	}
	*rangeVerticesContainedInRange(sourceRange) {
		for (const rangeVertex of this.rangesInSheet(sourceRange.sheet)) if (sourceRange.containsRange(rangeVertex.range)) yield rangeVertex;
	}
	/**
	* Finds smaller range if exists.
	*/
	findSmallerRange(range) {
		if (range.height() > 1 && Number.isFinite(range.height())) {
			const valuesRangeEndRowLess = simpleCellAddress(range.end.sheet, range.end.col, range.end.row - 1);
			const rowLessVertex = this.getRangeVertex(range.start, valuesRangeEndRowLess);
			if (rowLessVertex !== void 0) return {
				smallerRangeVertex: rowLessVertex,
				restRange: AbsoluteCellRange.fromSimpleCellAddresses(simpleCellAddress(range.start.sheet, range.start.col, range.end.row), range.end)
			};
		}
		return { restRange: range };
	}
	/**
	* Calculates a string key from start and end addresses
	*/
	static calculateRangeKey(start, end) {
		return `${start.col},${start.row},${end.col},${end.row}`;
	}
	/**
	* Compares two range vertices by their start and end addresses using the provided coordinate function
	*/
	static compareBy(left, right, coordinate) {
		const leftStart = coordinate(left.range.start);
		const rightStart = coordinate(right.range.start);
		if (leftStart === rightStart) return coordinate(left.range.end) - coordinate(right.range.end);
		else return leftStart - rightStart;
	}
	*entriesFromSheet(sheet) {
		const sheetMap = this.rangeMapping.get(sheet);
		if (!sheetMap) return;
		yield* sheetMap.entries();
	}
	removeByKey(sheet, key) {
		const sheetMap = this.rangeMapping.get(sheet);
		if (!sheetMap) throw new Error(`Sheet ${sheet} not found`);
		sheetMap.delete(key);
	}
	getByKey(sheet, key) {
		var _a;
		return (_a = this.rangeMapping.get(sheet)) === null || _a === void 0 ? void 0 : _a.get(key);
	}
	updateVerticesFromSheet(sheet, fn) {
		const updated = Array();
		for (const [key, vertex] of this.entriesFromSheet(sheet)) {
			const result = fn(key, vertex);
			if (result !== void 0) {
				this.removeByKey(sheet, key);
				updated.push(result);
			}
		}
		updated.forEach((entry) => {
			this.addOrUpdateVertex(entry.vertex);
		});
		return { verticesWithChangedSize: updated.filter((entry) => entry.changedSize).map((entry) => entry.vertex) };
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/i18n/TranslationPackage.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var TranslationPackage = class {
	constructor(functions, errors, ui) {
		this.functions = functions;
		this.errors = errors;
		this.ui = ui;
		this._protectedTranslations = { "VERSION": "VERSION" };
		this.checkUI();
		this.checkErrors();
		this.checkFunctionTranslations(this.functions);
		Object.assign(this.functions, this._protectedTranslations);
	}
	extendFunctions(additionalFunctionTranslations) {
		this.checkFunctionTranslations(additionalFunctionTranslations);
		Object.assign(this.functions, additionalFunctionTranslations);
	}
	buildFunctionMapping() {
		return Object.keys(this.functions).reduce((ret, key) => {
			ret[this.functions[key]] = key;
			return ret;
		}, {});
	}
	buildErrorMapping() {
		return Object.keys(this.errors).reduce((ret, key) => {
			ret[this.errors[key]] = key;
			return ret;
		}, {});
	}
	isFunctionTranslated(key) {
		return this.functions[key] !== void 0;
	}
	getFunctionTranslations(functionIds) {
		const translations = [];
		for (const functionId of functionIds) if (this.isFunctionTranslated(functionId)) translations.push(this.functions[functionId]);
		return translations;
	}
	getFunctionTranslation(key) {
		const val = this.functions[key];
		if (val === void 0) throw new MissingTranslationError(`functions.${key}`);
		else return val;
	}
	getMaybeFunctionTranslation(key) {
		return this.functions[key];
	}
	getErrorTranslation(key) {
		if (key === ErrorType.LIC) return `#${ErrorType.LIC}!`;
		const val = this.errors[key];
		if (val === void 0) throw new MissingTranslationError(`errors.${key}`);
		else return val;
	}
	getUITranslation(key) {
		const val = this.ui[key];
		if (val === void 0) throw new MissingTranslationError(`ui.${key}`);
		else return val;
	}
	checkUI() {
		for (const key of Object.values(UIElement)) if (!(key in this.ui)) throw new MissingTranslationError(`ui.${key}`);
	}
	checkErrors() {
		for (const key of Object.values(ErrorType)) if (!(key in this.errors) && key !== ErrorType.LIC) throw new MissingTranslationError(`errors.${key}`);
	}
	checkFunctionTranslations(functions) {
		const functionNames = new Set(Object.getOwnPropertyNames(functions));
		for (const protectedTranslation of Object.getOwnPropertyNames(this._protectedTranslations)) if (functionNames.has(protectedTranslation)) throw new ProtectedFunctionTranslationError(protectedTranslation);
	}
};
function buildTranslationPackage(rawTranslationPackage) {
	return new TranslationPackage(Object.assign({}, rawTranslationPackage.functions), Object.assign({}, rawTranslationPackage.errors), Object.assign({}, rawTranslationPackage.ui));
}
//#endregion
//#region ../../node_modules/hyperformula/es/i18n/index.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var UIElement;
(function(UIElement) {
	UIElement["NEW_SHEET_PREFIX"] = "NEW_SHEET_PREFIX";
})(UIElement || (UIElement = {}));
//#endregion
//#region ../../node_modules/hyperformula/es/DependencyGraph/SheetMapping.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Representation of a sheet internal to SheetMapping. Not exported outside of this file.
*/
var Sheet = class {
	constructor(id, displayName, isPlaceholder = false) {
		this.id = id;
		this.displayName = displayName;
		this.isPlaceholder = isPlaceholder;
	}
	/**
	* Returns the canonical (normalized) name of the sheet.
	*/
	get canonicalName() {
		return SheetMapping.canonicalizeSheetName(this.displayName);
	}
};
/**
* Manages the sheets in the instance.
* - Can convert between sheet names and ids and vice versa.
* - Also stores placeholders for sheets that are used in formulas but not yet added. They are marked as isPlaceholder=true.
* - Sheetnames thet differ only in case are considered the same. (See: canonicalizeSheetName)
*/
var SheetMapping = class SheetMapping {
	constructor(languages) {
		/**
		* Last used sheet ID. Used to generate new sheet IDs.
		*/
		this.lastSheetId = -1;
		/**
		* Mapping from canonical sheet name to sheet ID.
		*/
		this.mappingFromCanonicalNameToId = /* @__PURE__ */ new Map();
		/**
		* Mapping from sheet ID to sheet.
		*/
		this.allSheets = /* @__PURE__ */ new Map();
		this.sheetNamePrefix = languages.getUITranslation(UIElement.NEW_SHEET_PREFIX);
	}
	/**
	* Converts sheet name to canonical/normalized form.
	* @static
	*/
	static canonicalizeSheetName(sheetDisplayName) {
		return sheetDisplayName.toLowerCase();
	}
	/**
	* Returns sheet ID for the given name. By default excludes placeholders.
	*/
	getSheetId(sheetName, options = {}) {
		var _a;
		return (_a = this._getSheetByName(sheetName, options)) === null || _a === void 0 ? void 0 : _a.id;
	}
	/**
	* Returns sheet ID for the given name. Excludes placeholders.
	*
	* @throws {NoSheetWithNameError} if the sheet with the given name does not exist.
	*/
	getSheetIdOrThrowError(sheetName) {
		const sheet = this._getSheetByName(sheetName, {});
		if (sheet === void 0) throw new NoSheetWithNameError(sheetName);
		return sheet.id;
	}
	/**
	* Returns display name for the given sheet ID. Excludes placeholders.
	*
	* @returns {Maybe<string>} the display name, or undefined if the sheet with the given ID does not exist.
	*/
	getSheetName(sheetId) {
		var _a;
		return (_a = this._getSheet(sheetId, {})) === null || _a === void 0 ? void 0 : _a.displayName;
	}
	/**
	* Returns display name for the given sheet ID. Excludes placeholders.
	*
	* @throws {NoSheetWithIdError} if the sheet with the given ID does not exist.
	*/
	getSheetNameOrThrowError(sheetId, options = {}) {
		return this._getSheetOrThrowError(sheetId, options).displayName;
	}
	/**
	* Iterates over all sheet display names. By default excludes placeholders.
	*/
	*iterateSheetNames(options = {}) {
		for (const sheet of this.allSheets.values()) if (options.includePlaceholders || !sheet.isPlaceholder) yield sheet.displayName;
	}
	/**
	* Returns array of all sheet display names. By default excludes placeholders.
	*/
	getSheetNames(options = {}) {
		return Array.from(this.iterateSheetNames(options));
	}
	/**
	* Returns total count of sheets. By default excludes placeholders.
	*/
	numberOfSheets(options = {}) {
		return this.getSheetNames(options).length;
	}
	/**
	* Checks if sheet with given ID exists. By default excludes placeholders.
	*/
	hasSheetWithId(sheetId, options = {}) {
		return this._getSheet(sheetId, options) !== void 0;
	}
	/**
	* Checks if sheet with given name exists (case-insensitive). Excludes placeholders.
	*/
	hasSheetWithName(sheetName) {
		return this._getSheetByName(sheetName, {}) !== void 0;
	}
	/**
	* Adds new sheet with optional name and returns its ID.
	* If called with a name of an existing placeholder sheet, converts the placeholder sheet to a real sheet.
	*
	* @throws {SheetNameAlreadyTakenError} if the sheet with the given name already exists.
	*/
	addSheet(newSheetDisplayName = `${this.sheetNamePrefix}${this.lastSheetId + 2}`) {
		const sheetWithConflictingName = this._getSheetByName(newSheetDisplayName, { includePlaceholders: true });
		if (sheetWithConflictingName) {
			if (!sheetWithConflictingName.isPlaceholder) throw new SheetNameAlreadyTakenError(newSheetDisplayName);
			sheetWithConflictingName.isPlaceholder = false;
			return sheetWithConflictingName.id;
		}
		this.lastSheetId++;
		const sheet = new Sheet(this.lastSheetId, newSheetDisplayName);
		this._storeSheetInMappings(sheet);
		return sheet.id;
	}
	/**
	* Adds a sheet with a specific ID and name. Used for redo operations.
	* If called with a name of an existing placeholder sheet, converts the placeholder sheet to a real sheet.
	*
	* @throws {SheetNameAlreadyTakenError} if the sheet with the given name already exists.
	*/
	addSheetWithId(sheetId, sheetDisplayName) {
		const sheetWithConflictingName = this._getSheetByName(sheetDisplayName, { includePlaceholders: true });
		if (sheetWithConflictingName) {
			if (sheetWithConflictingName.id !== sheetId) throw new SheetNameAlreadyTakenError(sheetDisplayName);
			if (!sheetWithConflictingName.isPlaceholder) throw new SheetNameAlreadyTakenError(sheetDisplayName);
			sheetWithConflictingName.isPlaceholder = false;
			return;
		}
		if (sheetId > this.lastSheetId) this.lastSheetId = sheetId;
		const sheet = new Sheet(sheetId, sheetDisplayName);
		this._storeSheetInMappings(sheet);
	}
	/**
	* Adds a placeholder sheet with the given name if it does not exist yet
	*/
	addPlaceholderIfNotExists(sheetName) {
		const sheetWithConflictingName = this._getSheetByName(sheetName, { includePlaceholders: true });
		if (sheetWithConflictingName) return sheetWithConflictingName.id;
		this.lastSheetId++;
		const sheet = new Sheet(this.lastSheetId, sheetName, true);
		this._storeSheetInMappings(sheet);
		return sheet.id;
	}
	/**
	* Adds a placeholder sheet with a specific ID and name.
	* Used for undo operations to restore previously merged placeholder sheets.
	*
	* @throws {SheetNameAlreadyTakenError} if the sheet with the given name already exists.
	*/
	addPlaceholderWithId(sheetId, sheetDisplayName) {
		if (this._getSheetByName(sheetDisplayName, { includePlaceholders: true })) throw new SheetNameAlreadyTakenError(sheetDisplayName);
		if (this.hasSheetWithId(sheetId, { includePlaceholders: true })) throw new Error(`Sheet with id ${sheetId} already exists`);
		if (sheetId > this.lastSheetId) this.lastSheetId = sheetId;
		const sheet = new Sheet(sheetId, sheetDisplayName, true);
		this._storeSheetInMappings(sheet);
	}
	/**
	*
	* Removes sheet with given ID.
	* If sheet does not exist, does nothing.
	* @returns {boolean} true if sheet was removed, false if it did not exist.
	*/
	removeSheetIfExists(sheetId, options = {}) {
		const sheet = this._getSheet(sheetId, options);
		if (!sheet) return false;
		this.allSheets.delete(sheetId);
		this.mappingFromCanonicalNameToId.delete(sheet.canonicalName);
		if (sheetId === this.lastSheetId) this.lastSheetId--;
		return true;
	}
	/**
	* Marks sheet with given ID as a placeholder.
	* @throws {NoSheetWithIdError} if the sheet with the given ID does not exist
	*/
	markSheetAsPlaceholder(sheetId) {
		const sheet = this._getSheetOrThrowError(sheetId, {});
		sheet.isPlaceholder = true;
	}
	/**
	* Renames sheet.
	* - If called with sheetId of a placeholder sheet, throws {NoSheetWithIdError}.
	* - If newDisplayName is conflicting with an existing sheet, throws {SheetNameAlreadyTakenError}.
	* - If newDisplayName is conflicting with a placeholder sheet name, deletes the placeholder sheet and returns its id as mergedWithPlaceholderSheet.
	*
	* @throws {SheetNameAlreadyTakenError} if the sheet with the given name already exists.
	* @throws {NoSheetWithIdError} if the sheet with the given ID does not exist.
	*/
	renameSheet(sheetId, newDisplayName) {
		const sheet = this._getSheetOrThrowError(sheetId, {});
		const currentDisplayName = sheet.displayName;
		if (currentDisplayName === newDisplayName) return { previousDisplayName: void 0 };
		const sheetWithConflictingName = this._getSheetByName(newDisplayName, { includePlaceholders: true });
		let mergedWithPlaceholderSheet = void 0;
		if (sheetWithConflictingName !== void 0 && sheetWithConflictingName.id !== sheet.id) if (!sheetWithConflictingName.isPlaceholder) throw new SheetNameAlreadyTakenError(newDisplayName);
		else {
			this.mappingFromCanonicalNameToId.delete(sheetWithConflictingName.canonicalName);
			this.allSheets.delete(sheetWithConflictingName.id);
			if (sheetWithConflictingName.id === this.lastSheetId) this.lastSheetId--;
			mergedWithPlaceholderSheet = sheetWithConflictingName.id;
		}
		const currentCanonicalName = sheet.canonicalName;
		this.mappingFromCanonicalNameToId.delete(currentCanonicalName);
		sheet.displayName = newDisplayName;
		this._storeSheetInMappings(sheet);
		return {
			previousDisplayName: currentDisplayName,
			mergedWithPlaceholderSheet
		};
	}
	/**
	* Stores sheet in both internal mappings.
	* - If ID exists, it is updated. If not, it is added.
	* - If canonical name exists, it is updated. If not, it is added.
	*
	* @internal
	*/
	_storeSheetInMappings(sheet) {
		this.allSheets.set(sheet.id, sheet);
		this.mappingFromCanonicalNameToId.set(sheet.canonicalName, sheet.id);
	}
	/**
	* Returns sheet by ID
	*
	* @returns {Maybe<Sheet>} the sheet, or undefined if not found.
	* @internal
	*/
	_getSheet(sheetId, options) {
		const retrievedSheet = this.allSheets.get(sheetId);
		if (retrievedSheet === void 0) return;
		return options.includePlaceholders || !retrievedSheet.isPlaceholder ? retrievedSheet : void 0;
	}
	/**
	* Returns sheet by name
	*
	* @returns {Maybe<Sheet>} the sheet, or undefined if not found.
	* @internal
	*/
	_getSheetByName(sheetName, options) {
		const sheetId = this.mappingFromCanonicalNameToId.get(SheetMapping.canonicalizeSheetName(sheetName));
		if (sheetId === void 0) return;
		return this._getSheet(sheetId, options);
	}
	/**
	* Returns sheet by ID
	*
	* @throws {NoSheetWithIdError} if the sheet with the given ID does not exist.
	* @internal
	*/
	_getSheetOrThrowError(sheetId, options) {
		const sheet = this._getSheet(sheetId, options);
		if (sheet === void 0) throw new NoSheetWithIdError(sheetId);
		return sheet;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/DependencyGraph/SheetReferenceRegistrar.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Converts sheet names to ids and adds placeholder sheets if they don't exist.
*/
var SheetReferenceRegistrar = class {
	constructor(sheetMapping, addressMapping) {
		this.sheetMapping = sheetMapping;
		this.addressMapping = addressMapping;
	}
	/**
	* Adds placeholder sheet if it doesn't exist and adds placeholder strategy to address mapping.
	* @returns {number} sheet id
	*/
	ensureSheetRegistered(sheetName) {
		const sheetId = this.sheetMapping.addPlaceholderIfNotExists(sheetName);
		this.addressMapping.addSheetStrategyPlaceholderIfNotExists(sheetId);
		return sheetId;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/Sheet.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
function validateAsSheet(sheet) {
	if (!Array.isArray(sheet)) throw new InvalidArgumentsError("an array of arrays.");
	for (let i = 0; i < sheet.length; i++) if (!Array.isArray(sheet[i])) throw new InvalidArgumentsError("an array of arrays.");
}
/**
* Returns actual width, height and fill ratio of a sheet
*
* @param sheet - two-dimmensional array sheet representation
*/
function findBoundaries(sheet) {
	let width = 0;
	let height = 0;
	let cellsCount = 0;
	for (let currentRow = 0; currentRow < sheet.length; currentRow++) {
		let currentRowWidth = 0;
		for (let currentCol = 0; currentCol < sheet[currentRow].length; currentCol++) {
			const currentValue = sheet[currentRow][currentCol];
			if (currentValue === void 0 || currentValue === null) continue;
			currentRowWidth = currentCol + 1;
			++cellsCount;
		}
		width = Math.max(width, currentRowWidth);
		if (currentRowWidth > 0) height = currentRow + 1;
	}
	const sheetSize = width * height;
	return {
		height,
		width,
		fill: sheetSize === 0 ? 0 : cellsCount / sheetSize
	};
}
//#endregion
//#region ../../node_modules/hyperformula/es/DependencyGraph/DependencyGraph.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var DependencyGraph = class DependencyGraph {
	constructor(addressMapping, rangeMapping, sheetMapping, arrayMapping, stats, lazilyTransformingAstService, functionRegistry, namedExpressions) {
		this.addressMapping = addressMapping;
		this.rangeMapping = rangeMapping;
		this.sheetMapping = sheetMapping;
		this.arrayMapping = arrayMapping;
		this.stats = stats;
		this.lazilyTransformingAstService = lazilyTransformingAstService;
		this.functionRegistry = functionRegistry;
		this.namedExpressions = namedExpressions;
		this.changes = ContentChanges.empty();
		this.dependencyQueryAddresses = (vertex) => {
			if (vertex instanceof RangeVertex) return this.rangeDependencyQuery(vertex).map(([address, _]) => address);
			else {
				const dependenciesResult = this.formulaDependencyQuery(vertex);
				if (dependenciesResult !== void 0) {
					const [address, dependencies] = dependenciesResult;
					return dependencies.map((dependency) => {
						if (dependency instanceof NamedExpressionDependency) return this.namedExpressions.namedExpressionOrPlaceholder(dependency.name, address.sheet).address;
						else if (isSimpleCellAddress(dependency)) return dependency;
						else return simpleCellRange(dependency.start, dependency.end);
					});
				} else return [];
			}
		};
		this.dependencyQueryVertices = (vertex) => {
			if (vertex instanceof RangeVertex) return this.rangeDependencyQuery(vertex);
			else {
				const dependenciesResult = this.formulaDependencyQuery(vertex);
				if (dependenciesResult !== void 0) {
					const [address, dependencies] = dependenciesResult;
					return dependencies.map((dependency) => {
						if (dependency instanceof AbsoluteCellRange) return [dependency.start, this.rangeMapping.getVertexOrThrow(dependency.start, dependency.end)];
						else if (dependency instanceof NamedExpressionDependency) {
							const namedExpression = this.namedExpressions.namedExpressionOrPlaceholder(dependency.name, address.sheet);
							return [namedExpression.address, this.addressMapping.getCellOrThrow(namedExpression.address)];
						} else return [dependency, this.addressMapping.getCellOrThrow(dependency)];
					});
				} else return [];
			}
		};
		this.rangeDependencyQuery = (vertex) => {
			const allDeps = [];
			const { smallerRangeVertex, restRange } = this.rangeMapping.findSmallerRange(vertex.range);
			let range;
			if (smallerRangeVertex !== void 0 && this.graph.adjacentNodes(smallerRangeVertex).has(vertex)) {
				range = restRange;
				allDeps.push([new AbsoluteCellRange(smallerRangeVertex.start, smallerRangeVertex.end), smallerRangeVertex]);
			} else range = vertex.range;
			for (const address of range.addresses(this)) {
				const cell = this.addressMapping.getCell(address);
				if (cell !== void 0) allDeps.push([address, cell]);
			}
			return allDeps;
		};
		this.formulaDependencyQuery = (vertex) => {
			let formula;
			let address;
			if (vertex instanceof FormulaVertex) {
				address = vertex.getAddress(this.lazilyTransformingAstService);
				formula = vertex.getFormula(this.lazilyTransformingAstService);
			} else return;
			const deps = collectDependencies(formula, this.functionRegistry);
			return [address, absolutizeDependencies(deps, address)];
		};
		this.graph = new Graph(this.dependencyQueryVertices);
		this.sheetReferenceRegistrar = new SheetReferenceRegistrar(sheetMapping, addressMapping);
	}
	/**
	* Invariants:
	* - empty cell has associated EmptyCellVertex if and only if it is a dependency (possibly indirect, through range) to some formula
	*/
	static buildEmpty(lazilyTransformingAstService, config, functionRegistry, namedExpressions, stats) {
		return new DependencyGraph(new AddressMapping(config.chooseAddressMappingPolicy), new RangeMapping(), new SheetMapping(config.translationPackage), new ArrayMapping(), stats, lazilyTransformingAstService, functionRegistry, namedExpressions);
	}
	setFormulaToCell(address, ast, dependencies, size, hasVolatileFunction, hasStructuralChangeFunction) {
		const newVertex = FormulaVertex.fromAst(ast, address, size, this.lazilyTransformingAstService.version());
		this.exchangeOrAddFormulaVertex(newVertex);
		this.processCellDependencies(dependencies, newVertex);
		this.graph.markNodeAsDirty(newVertex);
		if (hasVolatileFunction) this.markAsVolatile(newVertex);
		if (hasStructuralChangeFunction) this.markAsDependentOnStructureChange(newVertex);
		this.correctInfiniteRangesDependency(address);
		return this.getAndClearContentChanges();
	}
	setParsingErrorToCell(address, errorVertex) {
		const vertex = this.shrinkPossibleArrayAndGetCell(address);
		this.exchangeOrAddGraphNode(vertex, errorVertex);
		this.addressMapping.setCell(address, errorVertex);
		this.graph.markNodeAsDirty(errorVertex);
		this.correctInfiniteRangesDependency(address);
		return this.getAndClearContentChanges();
	}
	setValueToCell(address, value) {
		const vertex = this.shrinkPossibleArrayAndGetCell(address);
		if (vertex instanceof ArrayFormulaVertex) this.arrayMapping.removeArray(vertex.getRange());
		if (vertex instanceof ValueCellVertex) {
			if (vertex.getValues().rawValue !== value.rawValue) {
				vertex.setValues(value);
				this.graph.markNodeAsDirty(vertex);
			}
		} else {
			const newVertex = new ValueCellVertex(value.parsedValue, value.rawValue);
			this.exchangeOrAddGraphNode(vertex, newVertex);
			this.addressMapping.setCell(address, newVertex);
			this.graph.markNodeAsDirty(newVertex);
		}
		this.correctInfiniteRangesDependency(address);
		return this.getAndClearContentChanges();
	}
	/**
	* Sets a cell empty.
	* - if vertex has no dependents, removes it from graph, address mapping and range mapping and cleans up its dependencies
	* - if vertex has dependents, exchanges it for an EmptyCellVertex and marks it as dirty
	*/
	setCellEmpty(address) {
		const vertex = this.shrinkPossibleArrayAndGetCell(address);
		if (vertex === void 0) return ContentChanges.empty();
		if (this.graph.adjacentNodes(vertex).size > 0) {
			const emptyVertex = new EmptyCellVertex();
			this.exchangeGraphNode(vertex, emptyVertex);
			if (this.graph.adjacentNodesCount(emptyVertex) === 0) {
				this.removeVertex(emptyVertex);
				this.addressMapping.removeCell(address);
			} else {
				this.graph.markNodeAsDirty(emptyVertex);
				this.addressMapping.setCell(address, emptyVertex);
			}
		} else {
			this.removeVertex(vertex);
			this.addressMapping.removeCell(address);
		}
		return this.getAndClearContentChanges();
	}
	clearDirtyVertices() {
		this.graph.clearDirtyNodes();
	}
	verticesToRecompute() {
		return this.graph.getDirtyAndVolatileNodes();
	}
	processCellDependencies(cellDependencies, endVertex) {
		const endVertexId = endVertex.idInGraph;
		if (endVertexId === void 0) throw new Error("End vertex not found");
		cellDependencies.forEach((dep) => {
			if (dep instanceof AbsoluteCellRange) {
				const range = dep;
				let rangeVertex = this.getRange(range.start, range.end);
				if (rangeVertex === void 0) {
					rangeVertex = new RangeVertex(range);
					this.rangeMapping.addOrUpdateVertex(rangeVertex);
				}
				this.graph.addNodeIfNotExists(rangeVertex);
				const rangeVertexId = rangeVertex.idInGraph;
				if (rangeVertexId === void 0) throw new Error("Range vertex not found");
				if (!range.isFinite()) this.graph.markNodeAsInfiniteRange(rangeVertexId);
				const { smallerRangeVertex, restRange } = this.rangeMapping.findSmallerRange(range);
				if (smallerRangeVertex !== void 0) {
					this.graph.addEdge(smallerRangeVertex, rangeVertexId);
					if (rangeVertex.bruteForce) {
						rangeVertex.bruteForce = false;
						for (const cellFromRange of range.addresses(this)) this.graph.removeEdge(this.fetchCell(cellFromRange), rangeVertexId);
					}
				} else rangeVertex.bruteForce = true;
				const array = this.arrayMapping.getArray(restRange);
				if (array !== void 0) this.graph.addEdge(array, rangeVertexId);
				else for (const cellFromRange of restRange.addresses(this)) {
					const { vertex, id } = this.fetchCellOrCreateEmpty(cellFromRange);
					this.graph.addEdge(id !== null && id !== void 0 ? id : vertex, rangeVertexId);
				}
				this.graph.addEdge(rangeVertexId, endVertexId);
				if (range.isFinite()) this.correctInfiniteRangesDependenciesByRangeVertex(rangeVertex);
			} else if (dep instanceof NamedExpressionDependency) {
				const sheetOfVertex = endVertex.getAddress(this.lazilyTransformingAstService).sheet;
				const { vertex, id } = this.fetchNamedExpressionVertex(dep.name, sheetOfVertex);
				this.graph.addEdge(id !== null && id !== void 0 ? id : vertex, endVertexId);
			} else {
				const { vertex, id } = this.fetchCellOrCreateEmpty(dep);
				this.graph.addEdge(id !== null && id !== void 0 ? id : vertex, endVertexId);
			}
		});
	}
	fetchNamedExpressionVertex(expressionName, sheetId) {
		const namedExpression = this.namedExpressions.namedExpressionOrPlaceholder(expressionName, sheetId);
		return this.fetchCellOrCreateEmpty(namedExpression.address);
	}
	exchangeNode(addressFrom, addressTo) {
		const vertexFrom = this.fetchCellOrCreateEmpty(addressFrom).vertex;
		const vertexTo = this.fetchCellOrCreateEmpty(addressTo).vertex;
		this.addressMapping.removeCell(addressFrom);
		this.exchangeGraphNode(vertexFrom, vertexTo);
	}
	fetchCellOrCreateEmpty(address) {
		const existingVertex = this.addressMapping.getCell(address);
		if (existingVertex !== void 0) return {
			vertex: existingVertex,
			id: void 0
		};
		const newVertex = new EmptyCellVertex();
		const newVertexId = this.graph.addNodeIfNotExists(newVertex);
		this.addressMapping.setCell(address, newVertex);
		return {
			vertex: newVertex,
			id: newVertexId
		};
	}
	removeRows(removedRows) {
		this.stats.measure(StatType.ADJUSTING_GRAPH, () => {
			for (const [address, vertex] of this.addressMapping.entriesFromRowsSpan(removedRows)) {
				for (const adjacentNode of this.graph.adjacentNodes(vertex)) this.graph.markNodeAsDirty(adjacentNode);
				if (vertex instanceof ArrayFormulaVertex) if (vertex.isLeftCorner(address)) {
					this.shrinkArrayToCorner(vertex);
					this.arrayMapping.removeArray(vertex.getRange());
				} else continue;
				this.removeVertex(vertex);
			}
		});
		this.stats.measure(StatType.ADJUSTING_ADDRESS_MAPPING, () => {
			this.addressMapping.removeRows(removedRows);
		});
		const affectedArrays = this.stats.measure(StatType.ADJUSTING_RANGES, () => {
			const affectedRanges = this.truncateRanges(removedRows, (address) => address.row);
			return this.getArrayVerticesRelatedToRanges(affectedRanges);
		});
		this.stats.measure(StatType.ADJUSTING_ARRAY_MAPPING, () => {
			this.fixArraysAfterRemovingRows(removedRows.sheet, removedRows.rowStart, removedRows.numberOfRows);
		});
		this.addStructuralNodesToChangeSet();
		return {
			affectedArrays,
			contentChanges: this.getAndClearContentChanges()
		};
	}
	/**
	* Adds a new sheet to the graph.
	* If the sheetId was a placeholder sheet, marks its vertices as dirty.
	*/
	addSheet(sheetId) {
		this.addressMapping.addSheetOrChangeStrategy(sheetId, findBoundaries([]));
		this.stats.measure(StatType.ADJUSTING_ADDRESS_MAPPING, () => {
			this.markAllCellsAsDirtyInSheet(sheetId);
		});
		this.stats.measure(StatType.ADJUSTING_RANGES, () => {
			this.markAllRangesAsDirtyInSheet(sheetId);
		});
	}
	/**
	* Removes all vertices without dependents in other sheets from address mapping, range mapping and array mapping.
	* - If nothing is left, removes the sheet from sheet mapping and address mapping.
	* - Otherwise, marks it as placeholder.
	*/
	removeSheet(sheetId) {
		this.clearSheet(sheetId);
		const addressMappingCleared = !this.addressMapping.hasAnyEntries(sheetId);
		const rangeMappingCleared = this.rangeMapping.getNumberOfRangesInSheet(sheetId) === 0;
		if (addressMappingCleared && rangeMappingCleared) {
			this.sheetMapping.removeSheetIfExists(sheetId);
			this.addressMapping.removeSheetIfExists(sheetId);
		} else this.sheetMapping.markSheetAsPlaceholder(sheetId);
	}
	/**
	* Removes placeholderSheetToDelete and reroutes edges to the corresponding vertices in sheetToKeep
	*
	* Assumptions about placeholderSheetToDelete:
	* - is empty (contains only empty cell vertices and range vertices),
	* - empty cell vertices have no dependencies,
	* - range vertices have dependencies only in placeholderSheetToDelete,
	* - vertices may have dependents in placeholderSheetToDelete and other sheets,
	*/
	mergeSheets(sheetToKeep, placeholderSheetToDelete) {
		if (!this.isPlaceholder(placeholderSheetToDelete)) throw new Error(`Cannot merge sheets: sheet ${placeholderSheetToDelete} is not a placeholder`);
		this.mergeRangeVertices(sheetToKeep, placeholderSheetToDelete);
		this.mergeCellVertices(sheetToKeep, placeholderSheetToDelete);
		this.addressMapping.removeSheetIfExists(placeholderSheetToDelete);
		this.addStructuralNodesToChangeSet();
	}
	/**
	* Clears the sheet content.
	* - removes all cell vertices without dependents
	* - removes all array vertices
	* - for vertices with dependents, exchanges them for EmptyCellVertex and marks them as dirty
	*/
	clearSheet(sheetId) {
		const arrays = /* @__PURE__ */ new Set();
		for (const [address, vertex] of this.addressMapping.sheetEntries(sheetId)) if (vertex instanceof ArrayFormulaVertex) arrays.add(vertex);
		else this.setCellEmpty(address);
		for (const array of arrays.values()) this.setArrayEmpty(array);
		this.addStructuralNodesToChangeSet();
	}
	removeColumns(removedColumns) {
		this.stats.measure(StatType.ADJUSTING_GRAPH, () => {
			for (const [address, vertex] of this.addressMapping.entriesFromColumnsSpan(removedColumns)) {
				for (const adjacentNode of this.graph.adjacentNodes(vertex)) this.graph.markNodeAsDirty(adjacentNode);
				if (vertex instanceof ArrayFormulaVertex) if (vertex.isLeftCorner(address)) {
					this.shrinkArrayToCorner(vertex);
					this.arrayMapping.removeArray(vertex.getRange());
				} else continue;
				this.removeVertex(vertex);
			}
		});
		this.stats.measure(StatType.ADJUSTING_ADDRESS_MAPPING, () => {
			this.addressMapping.removeColumns(removedColumns);
		});
		const affectedArrays = this.stats.measure(StatType.ADJUSTING_RANGES, () => {
			const affectedRanges = this.truncateRanges(removedColumns, (address) => address.col);
			return this.getArrayVerticesRelatedToRanges(affectedRanges);
		});
		this.stats.measure(StatType.ADJUSTING_ARRAY_MAPPING, () => {
			return this.fixArraysAfterRemovingColumns(removedColumns.sheet, removedColumns.columnStart, removedColumns.numberOfColumns);
		});
		this.addStructuralNodesToChangeSet();
		return {
			affectedArrays,
			contentChanges: this.getAndClearContentChanges()
		};
	}
	addRows(addedRows) {
		this.stats.measure(StatType.ADJUSTING_ADDRESS_MAPPING, () => {
			this.addressMapping.addRows(addedRows.sheet, addedRows.rowStart, addedRows.numberOfRows);
		});
		const affectedArrays = this.stats.measure(StatType.ADJUSTING_RANGES, () => {
			const result = this.rangeMapping.moveAllRangesInSheetAfterAddingRows(addedRows.sheet, addedRows.rowStart, addedRows.numberOfRows);
			this.fixRangesWhenAddingRows(addedRows.sheet, addedRows.rowStart, addedRows.numberOfRows);
			return this.getArrayVerticesRelatedToRanges(result.verticesWithChangedSize);
		});
		this.stats.measure(StatType.ADJUSTING_ARRAY_MAPPING, () => {
			this.fixArraysAfterAddingRow(addedRows.sheet, addedRows.rowStart, addedRows.numberOfRows);
		});
		for (const vertex of this.addressMapping.verticesFromRowsSpan(addedRows)) this.graph.markNodeAsDirty(vertex);
		this.addStructuralNodesToChangeSet();
		return { affectedArrays };
	}
	addColumns(addedColumns) {
		this.stats.measure(StatType.ADJUSTING_ADDRESS_MAPPING, () => {
			this.addressMapping.addColumns(addedColumns.sheet, addedColumns.columnStart, addedColumns.numberOfColumns);
		});
		const affectedArrays = this.stats.measure(StatType.ADJUSTING_RANGES, () => {
			const result = this.rangeMapping.moveAllRangesInSheetAfterAddingColumns(addedColumns.sheet, addedColumns.columnStart, addedColumns.numberOfColumns);
			this.fixRangesWhenAddingColumns(addedColumns.sheet, addedColumns.columnStart, addedColumns.numberOfColumns);
			return this.getArrayVerticesRelatedToRanges(result.verticesWithChangedSize);
		});
		this.stats.measure(StatType.ADJUSTING_ARRAY_MAPPING, () => {
			return this.fixArraysAfterAddingColumn(addedColumns.sheet, addedColumns.columnStart, addedColumns.numberOfColumns);
		});
		for (const vertex of this.addressMapping.verticesFromColumnsSpan(addedColumns)) this.graph.markNodeAsDirty(vertex);
		this.addStructuralNodesToChangeSet();
		return {
			affectedArrays,
			contentChanges: this.getAndClearContentChanges()
		};
	}
	isThereSpaceForArray(arrayVertex) {
		const range = arrayVertex.getRangeOrUndef();
		if (range === void 0) return false;
		for (const address of range.addresses(this)) {
			const vertexUnderAddress = this.addressMapping.getCell(address);
			if (vertexUnderAddress !== void 0 && !(vertexUnderAddress instanceof EmptyCellVertex) && vertexUnderAddress !== arrayVertex) return false;
		}
		return true;
	}
	moveCells(sourceRange, toRight, toBottom, toSheet) {
		for (const sourceAddress of sourceRange.addressesWithDirection(toRight, toBottom, this)) {
			const targetAddress = simpleCellAddress(toSheet, sourceAddress.col + toRight, sourceAddress.row + toBottom);
			let sourceVertex = this.addressMapping.getCell(sourceAddress);
			const targetVertex = this.addressMapping.getCell(targetAddress);
			this.addressMapping.removeCell(sourceAddress);
			if (sourceVertex !== void 0) {
				this.graph.markNodeAsDirty(sourceVertex);
				this.addressMapping.setCell(targetAddress, sourceVertex);
				let emptyVertex = void 0;
				for (const adjacentNode of this.graph.adjacentNodes(sourceVertex)) if (adjacentNode instanceof RangeVertex && !sourceRange.containsRange(adjacentNode.range)) {
					emptyVertex = emptyVertex !== null && emptyVertex !== void 0 ? emptyVertex : this.fetchCellOrCreateEmpty(sourceAddress).vertex;
					this.graph.addEdge(emptyVertex, adjacentNode);
					this.graph.removeEdge(sourceVertex, adjacentNode);
				}
				if (emptyVertex) {
					this.graph.markNodeAsDirty(emptyVertex);
					this.addressMapping.setCell(sourceAddress, emptyVertex);
				}
			}
			if (targetVertex !== void 0) {
				if (sourceVertex === void 0) this.addressMapping.removeCell(targetAddress);
				for (const adjacentNode of this.graph.adjacentNodes(targetVertex)) {
					sourceVertex = sourceVertex !== null && sourceVertex !== void 0 ? sourceVertex : this.fetchCellOrCreateEmpty(targetAddress).vertex;
					this.graph.addEdge(sourceVertex, adjacentNode);
					this.graph.markNodeAsDirty(sourceVertex);
				}
				this.removeVertex(targetVertex);
			}
		}
		for (const rangeVertex of this.rangeMapping.rangeVerticesContainedInRange(sourceRange)) for (const adjacentNode of this.graph.adjacentNodes(rangeVertex)) if (adjacentNode instanceof RangeVertex && !sourceRange.containsRange(adjacentNode.range)) {
			this.graph.removeEdge(rangeVertex, adjacentNode);
			for (const address of rangeVertex.range.addresses(this)) {
				const { vertex, id } = this.fetchCellOrCreateEmpty(address);
				this.graph.addEdge(id !== null && id !== void 0 ? id : vertex, adjacentNode);
				this.addressMapping.setCell(address, vertex);
				this.graph.markNodeAsDirty(vertex);
			}
		}
		this.rangeMapping.moveRangesInsideSourceRange(sourceRange, toRight, toBottom, toSheet);
	}
	/**
	* Sets an array empty.
	* - removes all corresponding entries from address mapping
	* - reroutes the edges
	* - removes vertex from graph and cleans up its dependencies
	* - removes vertex from range mapping and array mapping
	*/
	setArrayEmpty(arrayVertex) {
		const arrayRange = AbsoluteCellRange.spanFrom(arrayVertex.getAddress(this.lazilyTransformingAstService), arrayVertex.width, arrayVertex.height);
		const dependentVertices = this.graph.adjacentNodes(arrayVertex);
		for (const address of arrayRange.addresses(this)) this.addressMapping.removeCell(address);
		for (const adjacentNode of dependentVertices.values()) {
			const nodeDependencies = collectAddressesDependentToRange(this.functionRegistry, adjacentNode, arrayVertex.getRange(), this.lazilyTransformingAstService, this);
			for (const address of nodeDependencies) {
				const { vertex, id } = this.fetchCellOrCreateEmpty(address);
				this.graph.addEdge(id !== null && id !== void 0 ? id : vertex, adjacentNode);
			}
			if (nodeDependencies.length > 0) this.graph.markNodeAsDirty(adjacentNode);
		}
		this.removeVertex(arrayVertex);
		this.arrayMapping.removeArray(arrayVertex.getRange());
	}
	addVertex(address, vertex) {
		this.graph.addNodeIfNotExists(vertex);
		this.addressMapping.setCell(address, vertex);
	}
	addArrayVertex(address, vertex) {
		this.graph.addNodeIfNotExists(vertex);
		this.setAddressMappingForArrayVertex(vertex, address);
	}
	/**
	* Iterator over all array formula nodes in the graph.
	*/
	*arrayFormulaNodes() {
		for (const vertex of this.graph.getNodes()) if (vertex instanceof ArrayFormulaVertex) yield vertex;
	}
	*entriesFromRowsSpan(rowsSpan) {
		yield* this.addressMapping.entriesFromRowsSpan(rowsSpan);
	}
	*entriesFromColumnsSpan(columnsSpan) {
		yield* this.addressMapping.entriesFromColumnsSpan(columnsSpan);
	}
	fetchCell(address) {
		return this.addressMapping.getCellOrThrow(address);
	}
	/**
	* Gets the cell vertex at the specified address.
	* @throws {NoSheetWithIdError} if sheet doesn't exist
	*/
	getCell(address) {
		return this.addressMapping.getCell(address, { throwIfSheetNotExists: true });
	}
	getCellValue(address) {
		if (this.isPlaceholder(address.sheet)) return new CellError(ErrorType.REF, ErrorMessage.SheetRef);
		return this.addressMapping.getCellValue(address);
	}
	getRawValue(address) {
		if (this.isPlaceholder(address.sheet)) return null;
		return this.addressMapping.getRawValue(address);
	}
	getScalarValue(address) {
		if (this.isPlaceholder(address.sheet)) return new CellError(ErrorType.REF, ErrorMessage.SheetRef);
		const value = this.addressMapping.getCellValue(address);
		if (value instanceof SimpleRangeValue) return new CellError(ErrorType.VALUE, ErrorMessage.ScalarExpected);
		return value;
	}
	existsEdge(fromNode, toNode) {
		return this.graph.existsEdge(fromNode, toNode);
	}
	getSheetId(sheetName) {
		return this.sheetMapping.getSheetIdOrThrowError(sheetName);
	}
	getSheetHeight(sheet) {
		return this.addressMapping.getSheetHeight(sheet);
	}
	getSheetWidth(sheet) {
		return this.addressMapping.getSheetWidth(sheet);
	}
	getArray(range) {
		return this.arrayMapping.getArray(range);
	}
	getRange(start, end) {
		return this.rangeMapping.getRangeVertex(start, end);
	}
	topSortWithScc() {
		return this.graph.topSortWithScc();
	}
	markAsVolatile(vertex) {
		this.graph.markNodeAsVolatile(vertex);
	}
	markAsDependentOnStructureChange(vertex) {
		this.graph.markNodeAsChangingWithStructure(vertex);
	}
	forceApplyPostponedTransformations() {
		for (const vertex of this.graph.getNodes()) if (vertex instanceof ScalarFormulaVertex) vertex.ensureRecentData(this.lazilyTransformingAstService);
	}
	*rawValuesFromRange(range) {
		for (const address of range.addresses(this)) {
			const value = this.getScalarValue(address);
			if (value !== EmptyValue) yield [getRawValue(value), address];
		}
	}
	computeListOfValuesInRange(range) {
		const values = [];
		for (const cellFromRange of range.addresses(this)) {
			const value = this.getScalarValue(cellFromRange);
			values.push(value);
		}
		return values;
	}
	shrinkArrayToCorner(array) {
		this.cleanAddressMappingUnderArray(array);
		for (const adjacentVertex of this.adjacentArrayVertices(array)) {
			let relevantDependencies;
			if (adjacentVertex instanceof FormulaVertex) relevantDependencies = this.formulaDirectDependenciesToArray(adjacentVertex, array);
			else relevantDependencies = this.rangeDirectDependenciesToArray(adjacentVertex, array);
			let dependentToCorner = false;
			for (const [address, vertex] of relevantDependencies) {
				if (array.isLeftCorner(address)) dependentToCorner = true;
				this.graph.addEdge(vertex, adjacentVertex);
				this.graph.markNodeAsDirty(vertex);
			}
			if (!dependentToCorner) this.graph.removeEdge(array, adjacentVertex);
		}
		this.graph.markNodeAsDirty(array);
	}
	isArrayInternalCell(address) {
		const vertex = this.getCell(address);
		return vertex instanceof ArrayFormulaVertex && !vertex.isLeftCorner(address);
	}
	getAndClearContentChanges() {
		const changes = this.changes;
		this.changes = ContentChanges.empty();
		return changes;
	}
	getAdjacentNodesAddresses(inputVertex) {
		const deps = this.graph.adjacentNodes(inputVertex);
		const ret = [];
		deps.forEach((vertex) => {
			if (vertex instanceof RangeVertex) ret.push(simpleCellRange(vertex.start, vertex.end));
			else if (vertex instanceof FormulaVertex) ret.push(vertex.getAddress(this.lazilyTransformingAstService));
		});
		return ret;
	}
	/**
	* Marks all cell vertices in the sheet as dirty.
	*/
	markAllCellsAsDirtyInSheet(sheetId) {
		const sheetCells = this.addressMapping.sheetEntries(sheetId);
		for (const [, vertex] of sheetCells) this.graph.markNodeAsDirty(vertex);
	}
	/**
	* Marks all range vertices in the sheet as dirty.
	*/
	markAllRangesAsDirtyInSheet(sheetId) {
		const sheetRanges = this.rangeMapping.rangesInSheet(sheetId);
		for (const vertex of sheetRanges) this.graph.markNodeAsDirty(vertex);
	}
	/**
	* For each range vertex in placeholderSheetToDelete:
	* - reroutes dependencies and dependents of range vertex to the corresponding vertex in sheetToKeep
	* - removes range vertex from graph and range mapping
	* - cleans up dependencies of the removed vertex
	*/
	mergeRangeVertices(sheetToKeep, placeholderSheetToDelete) {
		const rangeVertices = Array.from(this.rangeMapping.rangesInSheet(placeholderSheetToDelete));
		for (const vertexToDelete of rangeVertices) {
			if (!this.graph.hasNode(vertexToDelete)) continue;
			const start = vertexToDelete.start;
			const end = vertexToDelete.end;
			if (start.sheet !== placeholderSheetToDelete && end.sheet !== placeholderSheetToDelete) continue;
			const targetStart = simpleCellAddress(sheetToKeep, start.col, start.row);
			const targetEnd = simpleCellAddress(sheetToKeep, end.col, end.row);
			const vertexToKeep = this.rangeMapping.getRangeVertex(targetStart, targetEnd);
			if (vertexToKeep) {
				this.rerouteDependents(vertexToDelete, vertexToKeep);
				this.removeVertexAndRerouteDependencies(vertexToDelete, vertexToKeep);
				this.rangeMapping.removeVertexIfExists(vertexToDelete);
				this.graph.markNodeAsDirty(vertexToKeep);
			} else {
				this.rangeMapping.removeVertexIfExists(vertexToDelete);
				vertexToDelete.range.moveToSheet(sheetToKeep);
				this.rangeMapping.addOrUpdateVertex(vertexToDelete);
				this.graph.markNodeAsDirty(vertexToDelete);
			}
		}
	}
	/**
	* For each cell vertex in placeholderSheetToDelete:
	* - reroutes dependents of cell vertex to the corresponding vertex in sheetToKeep
	* - removes cell vertex from graph and address mapping
	* - cleans up dependencies of the removed vertex
	*/
	mergeCellVertices(sheetToKeep, placeholderSheetToDelete) {
		const cellVertices = Array.from(this.addressMapping.sheetEntries(placeholderSheetToDelete));
		for (const [addressToDelete, vertexToDelete] of cellVertices) {
			const addressToKeep = simpleCellAddress(sheetToKeep, addressToDelete.col, addressToDelete.row);
			const vertexToKeep = this.getCell(addressToKeep);
			if (vertexToKeep) {
				this.rerouteDependents(vertexToDelete, vertexToKeep);
				this.removeVertexAndCleanupDependencies(vertexToDelete);
				this.addressMapping.removeCell(addressToDelete);
				this.graph.markNodeAsDirty(vertexToKeep);
			} else {
				this.addressMapping.moveCell(addressToDelete, addressToKeep);
				this.graph.markNodeAsDirty(vertexToDelete);
			}
		}
	}
	/**
	* Checks if the given sheet ID refers to a placeholder sheet (doesn't exist but is referenced by other sheets)
	*/
	isPlaceholder(sheetId) {
		return sheetId !== NamedExpressions.SHEET_FOR_WORKBOOK_EXPRESSIONS && !this.sheetMapping.hasSheetWithId(sheetId, { includePlaceholders: false });
	}
	exchangeGraphNode(oldNode, newNode) {
		this.graph.addNodeIfNotExists(newNode);
		const adjNodesStored = this.graph.adjacentNodes(oldNode);
		this.removeVertex(oldNode);
		adjNodesStored.forEach((adjacentNode) => {
			if (this.graph.hasNode(adjacentNode)) this.graph.addEdge(newNode, adjacentNode);
		});
	}
	setArray(range, vertex) {
		this.arrayMapping.setArray(range, vertex);
	}
	correctInfiniteRangesDependency(address) {
		const relevantInfiniteRanges = this.graph.getInfiniteRanges().filter((node) => node.range.addressInRange(address));
		if (relevantInfiniteRanges.length <= 0) return;
		const { vertex, id: maybeVertexId } = this.fetchCellOrCreateEmpty(address);
		const vertexId = maybeVertexId !== null && maybeVertexId !== void 0 ? maybeVertexId : vertex.idInGraph;
		if (vertexId === void 0) throw new Error("Vertex not found");
		relevantInfiniteRanges.forEach((node) => {
			this.graph.addEdge(vertexId, node);
		});
	}
	exchangeOrAddGraphNode(oldNode, newNode) {
		if (oldNode) this.exchangeGraphNode(oldNode, newNode);
		else this.graph.addNodeIfNotExists(newNode);
	}
	getArrayVerticesRelatedToRanges(ranges) {
		const arrayVertices = /* @__PURE__ */ new Set();
		ranges.forEach((range) => {
			if (!this.graph.hasNode(range)) return;
			this.graph.adjacentNodes(range).forEach((adjacentVertex) => {
				if (adjacentVertex instanceof ArrayFormulaVertex) arrayVertices.add(adjacentVertex);
			});
		});
		return arrayVertices;
	}
	correctInfiniteRangesDependenciesByRangeVertex(vertex) {
		this.graph.getInfiniteRanges().forEach((infiniteRangeVertex) => {
			const intersection = vertex.range.intersectionWith(infiniteRangeVertex.range);
			if (intersection === void 0) return;
			intersection.addresses(this).forEach((address) => {
				const { vertex, id } = this.fetchCellOrCreateEmpty(address);
				this.graph.addEdge(id !== null && id !== void 0 ? id : vertex, infiniteRangeVertex);
			});
		});
	}
	cleanAddressMappingUnderArray(vertex) {
		const arrayRange = vertex.getRange();
		for (const address of arrayRange.addresses(this)) {
			const oldValue = vertex.getArrayCellValue(address);
			if (this.getCell(address) === vertex) if (vertex.isLeftCorner(address)) this.changes.addChange(new CellError(ErrorType.REF), address, oldValue);
			else {
				this.addressMapping.removeCell(address);
				this.changes.addChange(EmptyValue, address, oldValue);
			}
			else this.changes.addChange(EmptyValue, address, oldValue);
		}
	}
	*formulaDirectDependenciesToArray(vertex, array) {
		var _a;
		const [, formulaDependencies] = (_a = this.formulaDependencyQuery(vertex)) !== null && _a !== void 0 ? _a : [];
		if (formulaDependencies === void 0) return;
		for (const dependency of formulaDependencies) {
			if (dependency instanceof NamedExpressionDependency || dependency instanceof AbsoluteCellRange) continue;
			if (array.getRange().addressInRange(dependency)) yield [dependency, this.fetchCellOrCreateEmpty(dependency).vertex];
		}
	}
	*rangeDirectDependenciesToArray(vertex, array) {
		const { restRange: range } = this.rangeMapping.findSmallerRange(vertex.range);
		for (const address of range.addresses(this)) if (array.getRange().addressInRange(address)) yield [address, this.fetchCellOrCreateEmpty(address).vertex];
	}
	*adjacentArrayVertices(vertex) {
		const adjacentNodes = this.graph.adjacentNodes(vertex);
		for (const item of adjacentNodes) if (item instanceof FormulaVertex || item instanceof RangeVertex) yield item;
	}
	addStructuralNodesToChangeSet() {
		this.graph.markChangingWithStructureNodesAsDirty();
	}
	fixRangesWhenAddingRows(sheet, row, numberOfRows) {
		const originalValues = Array.from(this.rangeMapping.rangesInSheet(sheet));
		for (const rangeVertex of originalValues) if (rangeVertex.range.includesRow(row + numberOfRows)) if (rangeVertex.bruteForce) {
			const addedSubrangeInThatRange = rangeVertex.range.rangeWithSameWidth(row, numberOfRows);
			for (const address of addedSubrangeInThatRange.addresses(this)) {
				const { vertex, id } = this.fetchCellOrCreateEmpty(address);
				this.graph.addEdge(id !== null && id !== void 0 ? id : vertex, rangeVertex);
			}
		} else {
			let currentRangeVertex = rangeVertex;
			let find = this.rangeMapping.findSmallerRange(currentRangeVertex.range);
			if (find.smallerRangeVertex !== void 0) continue;
			while (find.smallerRangeVertex === void 0) {
				const newRangeVertex = new RangeVertex(AbsoluteCellRange.spanFrom(currentRangeVertex.range.start, currentRangeVertex.range.width(), currentRangeVertex.range.height() - 1));
				this.rangeMapping.addOrUpdateVertex(newRangeVertex);
				this.graph.addNodeIfNotExists(newRangeVertex);
				const restRange = new AbsoluteCellRange(simpleCellAddress(currentRangeVertex.range.start.sheet, currentRangeVertex.range.start.col, currentRangeVertex.range.end.row), currentRangeVertex.range.end);
				this.addAllFromRange(restRange, currentRangeVertex);
				this.graph.addEdge(newRangeVertex, currentRangeVertex);
				currentRangeVertex = newRangeVertex;
				find = this.rangeMapping.findSmallerRange(currentRangeVertex.range);
			}
			this.graph.addEdge(find.smallerRangeVertex, currentRangeVertex);
			this.addAllFromRange(find.restRange, currentRangeVertex);
			this.graph.removeEdge(find.smallerRangeVertex, rangeVertex);
		}
	}
	addAllFromRange(range, rangeVertex) {
		for (const address of range.addresses(this)) {
			const { vertex, id } = this.fetchCellOrCreateEmpty(address);
			this.graph.addEdge(id !== null && id !== void 0 ? id : vertex, rangeVertex);
		}
	}
	fixRangesWhenAddingColumns(sheet, column, numberOfColumns) {
		for (const rangeVertex of this.rangeMapping.rangesInSheet(sheet)) if (rangeVertex.range.includesColumn(column + numberOfColumns)) {
			let subrange;
			if (rangeVertex.bruteForce) subrange = rangeVertex.range.rangeWithSameHeight(column, numberOfColumns);
			else subrange = AbsoluteCellRange.spanFrom(simpleCellAddress(sheet, column, rangeVertex.range.end.row), numberOfColumns, 1);
			for (const address of subrange.addresses(this)) {
				const { vertex, id } = this.fetchCellOrCreateEmpty(address);
				this.graph.addEdge(id !== null && id !== void 0 ? id : vertex, rangeVertex);
			}
		}
	}
	exchangeOrAddFormulaVertex(vertex) {
		const address = vertex.getAddress(this.lazilyTransformingAstService);
		const range = AbsoluteCellRange.spanFrom(address, vertex.width, vertex.height);
		const oldNode = this.shrinkPossibleArrayAndGetCell(address);
		if (vertex instanceof ArrayFormulaVertex) this.setArray(range, vertex);
		this.exchangeOrAddGraphNode(oldNode, vertex);
		this.addressMapping.setCell(address, vertex);
		if (vertex instanceof ArrayFormulaVertex) {
			if (!this.isThereSpaceForArray(vertex)) return;
			for (const cellAddress of range.addresses(this)) {
				if (vertex.isLeftCorner(cellAddress)) continue;
				const old = this.getCell(cellAddress);
				this.exchangeOrAddGraphNode(old, vertex);
			}
		}
		for (const cellAddress of range.addresses(this)) this.addressMapping.setCell(cellAddress, vertex);
	}
	setAddressMappingForArrayVertex(vertex, formulaAddress) {
		this.addressMapping.setCell(formulaAddress, vertex);
		if (!(vertex instanceof ArrayFormulaVertex)) return;
		const range = AbsoluteCellRange.spanFromOrUndef(formulaAddress, vertex.width, vertex.height);
		if (range === void 0) return;
		this.setArray(range, vertex);
		if (!this.isThereSpaceForArray(vertex)) return;
		for (const address of range.addresses(this)) this.addressMapping.setCell(address, vertex);
	}
	truncateRanges(span, coordinate) {
		const { verticesToRemove, verticesToMerge, verticesWithChangedSize } = this.rangeMapping.truncateRanges(span, coordinate);
		for (const [existingVertex, mergedVertex] of verticesToMerge) {
			this.rerouteDependents(mergedVertex, existingVertex);
			this.removeVertexAndCleanupDependencies(mergedVertex);
		}
		for (const rangeVertex of verticesToRemove) this.removeVertexAndCleanupDependencies(rangeVertex);
		return verticesWithChangedSize;
	}
	fixArraysAfterAddingRow(sheet, rowStart, numberOfRows) {
		this.arrayMapping.moveArrayVerticesAfterRowByRows(sheet, rowStart, numberOfRows);
		if (rowStart <= 0) return;
		for (const [, array] of this.arrayMapping.arraysInRows(RowsSpan.fromRowStartAndEnd(sheet, rowStart - 1, rowStart - 1))) {
			const arrayRange = array.getRange();
			for (let col = arrayRange.start.col; col <= arrayRange.end.col; ++col) for (let row = rowStart; row <= arrayRange.end.row; ++row) {
				const destination = simpleCellAddress(sheet, col, row);
				const source = simpleCellAddress(sheet, col, row + numberOfRows);
				const value = array.getArrayCellValue(destination);
				this.addressMapping.moveCell(source, destination);
				this.changes.addChange(EmptyValue, source, value);
			}
		}
	}
	fixArraysAfterRemovingRows(sheet, rowStart, numberOfRows) {
		this.arrayMapping.moveArrayVerticesAfterRowByRows(sheet, rowStart, -numberOfRows);
		if (rowStart <= 0) return;
		for (const [, array] of this.arrayMapping.arraysInRows(RowsSpan.fromRowStartAndEnd(sheet, rowStart - 1, rowStart - 1))) if (this.isThereSpaceForArray(array)) for (const address of array.getRange().addresses(this)) this.addressMapping.setCell(address, array);
		else this.setNoSpaceIfArray(array);
	}
	fixArraysAfterAddingColumn(sheet, columnStart, numberOfColumns) {
		this.arrayMapping.moveArrayVerticesAfterColumnByColumns(sheet, columnStart, numberOfColumns);
		if (columnStart <= 0) return;
		for (const [, array] of this.arrayMapping.arraysInCols(ColumnsSpan.fromColumnStartAndEnd(sheet, columnStart - 1, columnStart - 1))) {
			const arrayRange = array.getRange();
			for (let row = arrayRange.start.row; row <= arrayRange.end.row; ++row) for (let col = columnStart; col <= arrayRange.end.col; ++col) {
				const destination = simpleCellAddress(sheet, col, row);
				const source = simpleCellAddress(sheet, col + numberOfColumns, row);
				const value = array.getArrayCellValue(destination);
				this.addressMapping.moveCell(source, destination);
				this.changes.addChange(EmptyValue, source, value);
			}
		}
	}
	fixArraysAfterRemovingColumns(sheet, columnStart, numberOfColumns) {
		this.arrayMapping.moveArrayVerticesAfterColumnByColumns(sheet, columnStart, -numberOfColumns);
		if (columnStart <= 0) return;
		for (const [, array] of this.arrayMapping.arraysInCols(ColumnsSpan.fromColumnStartAndEnd(sheet, columnStart - 1, columnStart - 1))) if (this.isThereSpaceForArray(array)) for (const address of array.getRange().addresses(this)) this.addressMapping.setCell(address, array);
		else this.setNoSpaceIfArray(array);
	}
	shrinkPossibleArrayAndGetCell(address) {
		const vertex = this.getCell(address);
		if (!(vertex instanceof ArrayFormulaVertex)) return vertex;
		this.setNoSpaceIfArray(vertex);
		return this.getCell(address);
	}
	setNoSpaceIfArray(vertex) {
		if (vertex instanceof ArrayFormulaVertex) {
			this.shrinkArrayToCorner(vertex);
			vertex.setNoSpace();
		}
	}
	/**
	* Removes a vertex from the graph and range mapping and cleans up its dependencies.
	*/
	removeVertex(vertex) {
		this.removeVertexAndCleanupDependencies(vertex);
		if (vertex instanceof RangeVertex) this.rangeMapping.removeVertexIfExists(vertex);
	}
	/**
	* Reroutes dependent vertices of source to target. Also removes the edge target -> source if it exists.
	*/
	rerouteDependents(source, target) {
		const dependents = this.graph.adjacentNodes(source);
		this.graph.removeEdgeIfExists(target, source);
		dependents.forEach((adjacentNode) => {
			if (this.graph.hasNode(adjacentNode)) this.graph.addEdge(target, adjacentNode);
		});
	}
	/**
	* Removes a vertex from graph and reroutes its dependencies to other vertex. Also removes the edge vertexToKeep -> vertexToDelete if it exists.
	*/
	removeVertexAndRerouteDependencies(vertexToDelete, vertexToKeep) {
		const dependencies = this.graph.removeNode(vertexToDelete);
		this.graph.removeEdgeIfExists(vertexToKeep, vertexToDelete);
		dependencies.forEach(([_, dependency]) => {
			if (this.graph.hasNode(dependency)) this.graph.addEdge(dependency, vertexToKeep);
		});
	}
	/**
	* Removes a vertex from graph and cleans up its dependencies.
	* Dependency clean up = remove all RangeVertex and EmptyCellVertex dependencies if no other vertex depends on them.
	* Also cleans up placeholder sheets that have no remaining vertices (not needed anymore)
	*/
	removeVertexAndCleanupDependencies(inputVertex) {
		const dependencies = new Set(this.graph.removeNode(inputVertex));
		const affectedSheets = /* @__PURE__ */ new Set();
		while (dependencies.size > 0) {
			const dependency = dependencies.values().next().value;
			dependencies.delete(dependency);
			const [address, vertex] = dependency;
			if (this.graph.hasNode(vertex) && this.graph.adjacentNodesCount(vertex) === 0) {
				if (vertex instanceof RangeVertex || vertex instanceof EmptyCellVertex) this.graph.removeNode(vertex).forEach((candidate) => dependencies.add(candidate));
				if (vertex instanceof RangeVertex) {
					this.rangeMapping.removeVertexIfExists(vertex);
					affectedSheets.add(vertex.sheet);
				} else if (vertex instanceof EmptyCellVertex && isSimpleCellAddress(address)) {
					this.addressMapping.removeCell(address);
					affectedSheets.add(address.sheet);
				}
			}
		}
		this.cleanupPlaceholderSheets(affectedSheets);
	}
	/**
	* Removes placeholder sheets that have no remaining vertices.
	*/
	cleanupPlaceholderSheets(sheetIds) {
		for (const sheetId of sheetIds) if (this.isPlaceholder(sheetId) && !this.addressMapping.hasAnyEntries(sheetId) && this.rangeMapping.getNumberOfRangesInSheet(sheetId) === 0) {
			this.sheetMapping.removeSheetIfExists(sheetId, { includePlaceholders: true });
			this.addressMapping.removeSheetIfExists(sheetId);
		}
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/DependencyGraph/EmptyCellVertex.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Represents singleton vertex bound to all empty cells
*/
var EmptyCellVertex = class extends CellVertex {
	constructor() {
		super();
	}
	/**
	* Retrieves cell value bound to that singleton
	*/
	getCellValue() {
		return EmptyValue;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/DependencyGraph/ValueCellVertex.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Represents vertex which keeps static cell value
*/
var ValueCellVertex = class extends CellVertex {
	/** Static cell value. */
	constructor(parsedValue, rawValue) {
		super();
		this.parsedValue = parsedValue;
		this.rawValue = rawValue;
	}
	getValues() {
		return {
			parsedValue: this.parsedValue,
			rawValue: this.rawValue
		};
	}
	setValues(values) {
		this.parsedValue = values.parsedValue;
		this.rawValue = values.rawValue;
	}
	/**
	* Returns cell value stored in vertex
	*/
	getCellValue() {
		return this.parsedValue;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/DependencyGraph/ParsingErrorVertex.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Represents a cell that contains a parsing error.
*/
var ParsingErrorVertex = class extends CellVertex {
	/**
	* Constructor
	*/
	constructor(errors, rawInput) {
		super();
		this.errors = errors;
		this.rawInput = rawInput;
	}
	/**
	* Returns the value of the cell.
	*/
	getCellValue() {
		const firstNonemptyMessage = this.errors.map((error) => error.message).find((msg) => msg);
		return CellError.parsingError(firstNonemptyMessage);
	}
	/**
	* Returns the formula of the cell.
	*/
	getFormula() {
		return this.rawInput;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/DependencyGraph/AddressMapping/SparseStrategy.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Mapping from cell addresses to vertices
*
* Uses Map to store addresses, having minimal memory usage for sparse sheets but not necessarily constant set/lookup.
*/
var SparseStrategy = class {
	constructor(width, height) {
		this.width = width;
		this.height = height;
		/**
		* Map of Maps in which actual data is stored.
		*
		* Key of map in first level is column number.
		* Key of map in second level is row number.
		*/
		this.mapping = /* @__PURE__ */ new Map();
	}
	/** @inheritDoc */
	getCell(address) {
		var _a;
		return (_a = this.mapping.get(address.col)) === null || _a === void 0 ? void 0 : _a.get(address.row);
	}
	/** @inheritDoc */
	setCell(address, newVertex) {
		this.width = Math.max(this.width, address.col + 1);
		this.height = Math.max(this.height, address.row + 1);
		let colMapping = this.mapping.get(address.col);
		if (!colMapping) {
			colMapping = /* @__PURE__ */ new Map();
			this.mapping.set(address.col, colMapping);
		}
		colMapping.set(address.row, newVertex);
	}
	/** @inheritDoc */
	has(address) {
		var _a;
		return !!((_a = this.mapping.get(address.col)) === null || _a === void 0 ? void 0 : _a.get(address.row));
	}
	/** @inheritDoc */
	getHeight() {
		return this.height;
	}
	/** @inheritDoc */
	getWidth() {
		return this.width;
	}
	removeCell(address) {
		var _a;
		(_a = this.mapping.get(address.col)) === null || _a === void 0 || _a.delete(address.row);
	}
	addRows(row, numberOfRows) {
		this.mapping.forEach((rowMapping) => {
			const tmpMapping = /* @__PURE__ */ new Map();
			rowMapping.forEach((vertex, rowNumber) => {
				if (rowNumber >= row) {
					tmpMapping.set(rowNumber + numberOfRows, vertex);
					rowMapping.delete(rowNumber);
				}
			});
			tmpMapping.forEach((vertex, rowNumber) => {
				rowMapping.set(rowNumber, vertex);
			});
		});
		this.height += numberOfRows;
	}
	addColumns(column, numberOfColumns) {
		const tmpMapping = /* @__PURE__ */ new Map();
		this.mapping.forEach((rowMapping, colNumber) => {
			if (colNumber >= column) {
				tmpMapping.set(colNumber + numberOfColumns, rowMapping);
				this.mapping.delete(colNumber);
			}
		});
		tmpMapping.forEach((rowMapping, colNumber) => {
			this.mapping.set(colNumber, rowMapping);
		});
		this.width += numberOfColumns;
	}
	removeRows(removedRows) {
		this.mapping.forEach((rowMapping) => {
			const tmpMapping = /* @__PURE__ */ new Map();
			rowMapping.forEach((vertex, rowNumber) => {
				if (rowNumber >= removedRows.rowStart) {
					rowMapping.delete(rowNumber);
					if (rowNumber > removedRows.rowEnd) tmpMapping.set(rowNumber - removedRows.numberOfRows, vertex);
				}
			});
			tmpMapping.forEach((vertex, rowNumber) => {
				rowMapping.set(rowNumber, vertex);
			});
		});
		const rightmostRowRemoved = Math.min(this.height - 1, removedRows.rowEnd);
		const numberOfRowsRemoved = Math.max(0, rightmostRowRemoved - removedRows.rowStart + 1);
		this.height = Math.max(0, this.height - numberOfRowsRemoved);
	}
	removeColumns(removedColumns) {
		const tmpMapping = /* @__PURE__ */ new Map();
		this.mapping.forEach((rowMapping, colNumber) => {
			if (colNumber >= removedColumns.columnStart) {
				this.mapping.delete(colNumber);
				if (colNumber > removedColumns.columnEnd) tmpMapping.set(colNumber - removedColumns.numberOfColumns, rowMapping);
			}
		});
		tmpMapping.forEach((rowMapping, colNumber) => {
			this.mapping.set(colNumber, rowMapping);
		});
		const rightmostColumnRemoved = Math.min(this.width - 1, removedColumns.columnEnd);
		const numberOfColumnsRemoved = Math.max(0, rightmostColumnRemoved - removedColumns.columnStart + 1);
		this.width = Math.max(0, this.width - numberOfColumnsRemoved);
	}
	*getEntries(sheet) {
		for (const [colNumber, col] of this.mapping) for (const [rowNumber, value] of col) yield [simpleCellAddress(sheet, colNumber, rowNumber), value];
	}
	*verticesFromColumn(column) {
		const colMapping = this.mapping.get(column);
		if (colMapping === void 0) return;
		for (const [_, vertex] of colMapping) yield vertex;
	}
	*verticesFromRow(row) {
		for (const colMapping of this.mapping.values()) {
			const rowVertex = colMapping.get(row);
			if (rowVertex !== void 0) yield rowVertex;
		}
	}
	*verticesFromColumnsSpan(columnsSpan) {
		for (const column of columnsSpan.columns()) {
			const colMapping = this.mapping.get(column);
			if (colMapping === void 0) continue;
			for (const [_, vertex] of colMapping) yield vertex;
		}
	}
	*verticesFromRowsSpan(rowsSpan) {
		for (const colMapping of this.mapping.values()) for (const row of rowsSpan.rows()) {
			const rowVertex = colMapping.get(row);
			if (rowVertex !== void 0) yield rowVertex;
		}
	}
	*entriesFromRowsSpan(rowsSpan) {
		for (const [col, colMapping] of this.mapping.entries()) for (const row of rowsSpan.rows()) {
			const rowVertex = colMapping.get(row);
			if (rowVertex !== void 0) yield [simpleCellAddress(rowsSpan.sheet, col, row), rowVertex];
		}
	}
	*entriesFromColumnsSpan(columnsSpan) {
		for (const col of columnsSpan.columns()) {
			const colMapping = this.mapping.get(col);
			if (colMapping !== void 0) for (const [row, vertex] of colMapping.entries()) yield [simpleCellAddress(columnsSpan.sheet, col, row), vertex];
		}
	}
	*vertices() {
		for (const [_, col] of this.mapping) for (const [_, value] of col) if (value !== void 0) yield value;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/DependencyGraph/AddressMapping/DenseStrategy.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Mapping from cell addresses to vertices
*
* Uses Array to store addresses, having minimal memory usage for dense sheets and constant set/lookup.
*/
var DenseStrategy = class {
	/**
	* @param width - width of the stored sheet
	* @param height - height of the stored sheet
	*/
	constructor(width, height) {
		this.width = width;
		this.height = height;
		this.mapping = new Array(height);
		for (let i = 0; i < height; i++) this.mapping[i] = new Array(width);
	}
	/** @inheritDoc */
	getCell(address) {
		return this.getCellVertex(address.col, address.row);
	}
	/** @inheritDoc */
	setCell(address, newVertex) {
		this.width = Math.max(this.width, address.col + 1);
		this.height = Math.max(this.height, address.row + 1);
		if (!this.mapping[address.row]) this.mapping[address.row] = new Array(this.width);
		this.mapping[address.row][address.col] = newVertex;
	}
	/** @inheritDoc */
	has(address) {
		const row = this.mapping[address.row];
		if (!row) return false;
		return !!row[address.col];
	}
	/** @inheritDoc */
	getHeight() {
		return this.height;
	}
	/** @inheritDoc */
	getWidth() {
		return this.width;
	}
	removeCell(address) {
		if (this.mapping[address.row] !== void 0) delete this.mapping[address.row][address.col];
	}
	addRows(row, numberOfRows) {
		const newRows = [];
		for (let i = 0; i < numberOfRows; i++) newRows.push(new Array(this.width));
		this.mapping.splice(row, 0, ...newRows);
		this.height += numberOfRows;
	}
	addColumns(column, numberOfColumns) {
		for (let i = 0; i < this.height; i++) if (this.mapping[i] !== void 0) this.mapping[i].splice(column, 0, ...new Array(numberOfColumns));
		this.width += numberOfColumns;
	}
	removeRows(removedRows) {
		this.mapping.splice(removedRows.rowStart, removedRows.numberOfRows);
		const rightmostRowRemoved = Math.min(this.height - 1, removedRows.rowEnd);
		const numberOfRowsRemoved = Math.max(0, rightmostRowRemoved - removedRows.rowStart + 1);
		this.height = Math.max(0, this.height - numberOfRowsRemoved);
	}
	removeColumns(removedColumns) {
		for (let i = 0; i < this.height; i++) if (this.mapping[i] !== void 0) this.mapping[i].splice(removedColumns.columnStart, removedColumns.numberOfColumns);
		const rightmostColumnRemoved = Math.min(this.width - 1, removedColumns.columnEnd);
		const numberOfColumnsRemoved = Math.max(0, rightmostColumnRemoved - removedColumns.columnStart + 1);
		this.width = Math.max(0, this.width - numberOfColumnsRemoved);
	}
	*getEntries(sheet) {
		for (let y = 0; y < this.height; ++y) for (let x = 0; x < this.width; ++x) {
			const vertex = this.getCellVertex(x, y);
			if (vertex) yield [simpleCellAddress(sheet, x, y), vertex];
		}
	}
	*verticesFromColumn(column) {
		for (let y = 0; y < this.height; ++y) {
			const vertex = this.getCellVertex(column, y);
			if (vertex) yield vertex;
		}
	}
	*verticesFromRow(row) {
		for (let x = 0; x < this.width; ++x) {
			const vertex = this.getCellVertex(x, row);
			if (vertex) yield vertex;
		}
	}
	*verticesFromColumnsSpan(columnsSpan) {
		for (let x = columnsSpan.columnStart; x <= columnsSpan.columnEnd; ++x) for (let y = 0; y < this.height; ++y) {
			const vertex = this.getCellVertex(x, y);
			if (vertex) yield vertex;
		}
	}
	*verticesFromRowsSpan(rowsSpan) {
		for (let x = 0; x < this.width; ++x) for (let y = rowsSpan.rowStart; y <= rowsSpan.rowEnd; ++y) {
			const vertex = this.getCellVertex(x, y);
			if (vertex) yield vertex;
		}
	}
	*entriesFromRowsSpan(rowsSpan) {
		for (let x = 0; x < this.width; ++x) for (let y = rowsSpan.rowStart; y <= rowsSpan.rowEnd; ++y) {
			const vertex = this.getCellVertex(x, y);
			if (vertex) yield [simpleCellAddress(rowsSpan.sheet, x, y), vertex];
		}
	}
	*entriesFromColumnsSpan(columnsSpan) {
		for (let x = columnsSpan.columnStart; x <= columnsSpan.columnEnd; ++x) for (let y = 0; y < this.height; ++y) {
			const vertex = this.getCellVertex(x, y);
			if (vertex) yield [simpleCellAddress(columnsSpan.sheet, x, y), vertex];
		}
	}
	*vertices() {
		for (let y = 0; y < this.height; ++y) for (let x = 0; x < this.width; ++x) {
			const vertex = this.getCellVertex(x, y);
			if (vertex) yield vertex;
		}
	}
	getCellVertex(x, y) {
		var _a;
		return (_a = this.mapping[y]) === null || _a === void 0 ? void 0 : _a[x];
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/Cell.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Possible errors returned by our interpreter.
*/
var ErrorType;
(function(ErrorType) {
	/** Division by zero. */
	ErrorType["DIV_BY_ZERO"] = "DIV_BY_ZERO";
	/** Unknown function name. */
	ErrorType["NAME"] = "NAME";
	ErrorType["VALUE"] = "VALUE";
	ErrorType["NUM"] = "NUM";
	ErrorType["NA"] = "NA";
	/** Cyclic dependency. */
	ErrorType["CYCLE"] = "CYCLE";
	/** Wrong address reference. */
	ErrorType["REF"] = "REF";
	/** Array spill error. */
	ErrorType["SPILL"] = "SPILL";
	/** Invalid/missing licence error. */
	ErrorType["LIC"] = "LIC";
	/** Generic error */
	ErrorType["ERROR"] = "ERROR";
})(ErrorType || (ErrorType = {}));
var CellType;
(function(CellType) {
	CellType["FORMULA"] = "FORMULA";
	CellType["VALUE"] = "VALUE";
	CellType["ARRAY"] = "ARRAY";
	CellType["EMPTY"] = "EMPTY";
	CellType["ARRAYFORMULA"] = "ARRAYFORMULA";
})(CellType || (CellType = {}));
var getCellType = (vertex, address) => {
	if (vertex instanceof ArrayFormulaVertex) if (vertex.isLeftCorner(address)) return CellType.ARRAYFORMULA;
	else return CellType.ARRAY;
	if (vertex instanceof ScalarFormulaVertex || vertex instanceof ParsingErrorVertex) return CellType.FORMULA;
	if (vertex instanceof ValueCellVertex) return CellType.VALUE;
	return CellType.EMPTY;
};
var CellValueNoNumber;
(function(CellValueNoNumber) {
	CellValueNoNumber["EMPTY"] = "EMPTY";
	CellValueNoNumber["NUMBER"] = "NUMBER";
	CellValueNoNumber["STRING"] = "STRING";
	CellValueNoNumber["BOOLEAN"] = "BOOLEAN";
	CellValueNoNumber["ERROR"] = "ERROR";
})(CellValueNoNumber || (CellValueNoNumber = {}));
var CellValueJustNumber;
(function(CellValueJustNumber) {
	CellValueJustNumber["NUMBER"] = "NUMBER";
})(CellValueJustNumber || (CellValueJustNumber = {}));
var CellValueType = Object.assign(Object.assign({}, CellValueNoNumber), CellValueJustNumber);
var CellValueDetailedType = Object.assign(Object.assign({}, CellValueNoNumber), NumberType);
var CellValueTypeOrd = (arg) => {
	switch (arg) {
		case CellValueType.EMPTY: return 0;
		case CellValueType.NUMBER: return 1;
		case CellValueType.STRING: return 2;
		case CellValueType.BOOLEAN: return 3;
		case CellValueType.ERROR: return 4;
	}
	throw new Error("Cell value not computed");
};
var getCellValueType = (cellValue) => {
	if (cellValue === EmptyValue) return CellValueType.EMPTY;
	if (cellValue instanceof CellError || cellValue instanceof SimpleRangeValue) return CellValueType.ERROR;
	if (typeof cellValue === "string") return CellValueType.STRING;
	else if (isExtendedNumber(cellValue)) return CellValueType.NUMBER;
	else if (typeof cellValue === "boolean") return CellValueType.BOOLEAN;
	throw new Error("Cell value not computed");
};
var getCellValueDetailedType = (cellValue) => {
	if (isExtendedNumber(cellValue)) return getTypeOfExtendedNumber(cellValue);
	else return getCellValueType(cellValue);
};
var getCellValueFormat = (cellValue) => {
	if (isExtendedNumber(cellValue)) return getFormatOfExtendedNumber(cellValue);
	else return;
};
var CellError = class CellError {
	constructor(type, message, root) {
		this.type = type;
		this.message = message;
		this.root = root;
	}
	/**
	* Returns a CellError with a given message.
	* @param {string} detailedMessage - message to be displayed
	*/
	static parsingError(detailedMessage) {
		return new CellError(ErrorType.ERROR, `${ErrorMessage.ParseError}${detailedMessage ? " " + detailedMessage : ""}`);
	}
	attachRootVertex(vertex) {
		if (this.root === void 0) return new CellError(this.type, this.message, vertex);
		else return this;
	}
};
var simpleRowAddress = (sheet, row) => ({
	sheet,
	row
});
var invalidSimpleRowAddress = (address) => address.row < 0;
var simpleColumnAddress = (sheet, col) => ({
	sheet,
	col
});
var invalidSimpleColumnAddress = (address) => address.col < 0;
var simpleCellAddress = (sheet, col, row) => ({
	sheet,
	col,
	row
});
/**
* Checks if the column or row id is negative.
*/
var isColOrRowInvalid = (address) => address.col < 0 || address.row < 0;
var movedSimpleCellAddress = (address, toSheet, toRight, toBottom) => {
	return simpleCellAddress(toSheet, address.col + toRight, address.row + toBottom);
};
var addressKey = (address) => `${address.sheet},${address.row},${address.col}`;
/**
* Checks if the object is a simple cell address.
*/
function isSimpleCellAddress(obj) {
	var _a, _b, _c;
	return obj && (typeof obj === "object" || typeof obj === "function") && typeof ((_a = obj) === null || _a === void 0 ? void 0 : _a.sheet) === "number" && typeof ((_b = obj) === null || _b === void 0 ? void 0 : _b.col) === "number" && typeof ((_c = obj) === null || _c === void 0 ? void 0 : _c.row) === "number";
}
var absoluteSheetReference = (address, baseAddress) => {
	var _a;
	return (_a = address.sheet) !== null && _a !== void 0 ? _a : baseAddress.sheet;
};
var equalSimpleCellAddress = (left, right) => {
	return left.sheet === right.sheet && left.col === right.col && left.row === right.row;
};
//#endregion
//#region ../../node_modules/hyperformula/es/AbsoluteCellRange.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var WRONG_RANGE_SIZE = "AbsoluteCellRange: Wrong range size";
/**
* Type guard that checks if an object is a valid SimpleCellRange.
* @param {unknown} val - Value to check
* @returns {boolean} True if and only if the object is a valid SimpleCellRange
*/
function isSimpleCellRange(val) {
	if (val && (typeof val === "object" || typeof val === "function")) {
		const obj = val;
		return "start" in obj && isSimpleCellAddress(obj.start) && "end" in obj && isSimpleCellAddress(obj.end);
	} else return false;
}
var simpleCellRange = (start, end) => ({
	start,
	end
});
var AbsoluteCellRange = class AbsoluteCellRange {
	constructor(start, end) {
		if (start.sheet !== end.sheet) throw new SheetsNotEqual(start.sheet, end.sheet);
		this.start = simpleCellAddress(start.sheet, start.col, start.row);
		this.end = simpleCellAddress(end.sheet, end.col, end.row);
	}
	get sheet() {
		return this.start.sheet;
	}
	static fromSimpleCellAddresses(start, end) {
		if (start.sheet !== end.sheet) throw new SheetsNotEqual(start.sheet, end.sheet);
		const width = end.col - start.col;
		const height = end.row - start.row;
		if (Number.isFinite(height) && Number.isFinite(width)) return new AbsoluteCellRange(start, end);
		if (Number.isFinite(height)) return new AbsoluteRowRange(start.sheet, start.row, end.row);
		return new AbsoluteColumnRange(start.sheet, start.col, end.col);
	}
	static fromAst(ast, baseAddress) {
		if (ast.type === AstNodeType.CELL_RANGE) return AbsoluteCellRange.fromCellRange(ast, baseAddress);
		else if (ast.type === AstNodeType.COLUMN_RANGE) return AbsoluteColumnRange.fromColumnRange(ast, baseAddress);
		else return AbsoluteRowRange.fromRowRangeAst(ast, baseAddress);
	}
	static fromAstOrUndef(ast, baseAddress) {
		try {
			return AbsoluteCellRange.fromAst(ast, baseAddress);
		} catch (_e) {
			return;
		}
	}
	static fromCellRange(x, baseAddress) {
		return new AbsoluteCellRange(x.start.toSimpleCellAddress(baseAddress), x.end.toSimpleCellAddress(baseAddress));
	}
	static spanFrom(topLeftCorner, width, height) {
		const ret = AbsoluteCellRange.spanFromOrUndef(topLeftCorner, width, height);
		if (ret === void 0) throw new Error(WRONG_RANGE_SIZE);
		return ret;
	}
	static spanFromOrUndef(topLeftCorner, width, height) {
		if (!Number.isFinite(width) && Number.isFinite(height)) {
			if (topLeftCorner.col !== 0) return;
			return new AbsoluteRowRange(topLeftCorner.sheet, topLeftCorner.row, topLeftCorner.row + height - 1);
		} else if (!Number.isFinite(height) && Number.isFinite(width)) {
			if (topLeftCorner.row !== 0) return;
			return new AbsoluteColumnRange(topLeftCorner.sheet, topLeftCorner.col, topLeftCorner.col + width - 1);
		} else if (Number.isFinite(height) && Number.isFinite(width)) return new AbsoluteCellRange(topLeftCorner, simpleCellAddress(topLeftCorner.sheet, topLeftCorner.col + width - 1, topLeftCorner.row + height - 1));
	}
	static fromCoordinates(sheet, x1, y1, x2, y2) {
		return new AbsoluteCellRange(simpleCellAddress(sheet, x1, y1), simpleCellAddress(sheet, x2, y2));
	}
	isFinite() {
		return Number.isFinite(this.size());
	}
	doesOverlap(other) {
		if (this.start.sheet != other.start.sheet) return false;
		if (this.end.row < other.start.row || this.start.row > other.end.row) return false;
		if (this.end.col < other.start.col || this.start.col > other.end.col) return false;
		return true;
	}
	addressInRange(address) {
		if (this.sheet !== address.sheet) return false;
		return this.start.row <= address.row && this.end.row >= address.row && this.start.col <= address.col && this.end.col >= address.col;
	}
	columnInRange(address) {
		if (this.sheet !== address.sheet) return false;
		return this.start.col <= address.col && this.end.col >= address.col;
	}
	rowInRange(address) {
		if (this.sheet !== address.sheet) return false;
		return this.start.row <= address.row && this.end.row >= address.row;
	}
	containsRange(range) {
		return this.addressInRange(range.start) && this.addressInRange(range.end);
	}
	intersectionWith(other) {
		if (this.sheet !== other.start.sheet) return;
		const startRow = Math.max(this.start.row, other.start.row);
		const endRow = Math.min(this.end.row, other.end.row);
		const startCol = Math.max(this.start.col, other.start.col);
		const endCol = Math.min(this.end.col, other.end.col);
		if (startRow > endRow || startCol > endCol) return;
		return new AbsoluteCellRange(simpleCellAddress(this.sheet, startCol, startRow), simpleCellAddress(this.sheet, endCol, endRow));
	}
	includesRow(row) {
		return this.start.row < row && this.end.row >= row;
	}
	includesColumn(column) {
		return this.start.col < column && this.end.col >= column;
	}
	shiftByRows(numberOfRows) {
		this.start.row += numberOfRows;
		this.end.row += numberOfRows;
	}
	expandByRows(numberOfRows) {
		this.end.row += numberOfRows;
	}
	shiftByColumns(numberOfColumns) {
		this.start.col += numberOfColumns;
		this.end.col += numberOfColumns;
	}
	shifted(byCols, byRows) {
		return AbsoluteCellRange.spanFrom(simpleCellAddress(this.sheet, this.start.col + byCols, this.start.row + byRows), this.width(), this.height());
	}
	expandByColumns(numberOfColumns) {
		this.end.col += numberOfColumns;
	}
	moveToSheet(toSheet) {
		this.start.sheet = toSheet;
		this.end.sheet = toSheet;
	}
	removeSpan(span) {
		if (span instanceof RowsSpan) this.removeRows(span.start, span.end);
		else this.removeColumns(span.start, span.end);
	}
	shouldBeRemoved() {
		return this.width() <= 0 || this.height() <= 0;
	}
	rangeWithSameWidth(startRow, numberOfRows) {
		return AbsoluteCellRange.spanFrom(simpleCellAddress(this.sheet, this.start.col, startRow), this.width(), numberOfRows);
	}
	rangeWithSameHeight(startColumn, numberOfColumns) {
		return AbsoluteCellRange.spanFrom(simpleCellAddress(this.sheet, startColumn, this.start.row), numberOfColumns, this.height());
	}
	toString() {
		return `${this.start.sheet},${this.start.col},${this.start.row},${this.end.col},${this.end.row}`;
	}
	width() {
		return this.end.col - this.start.col + 1;
	}
	height() {
		return this.end.row - this.start.row + 1;
	}
	size() {
		return this.height() * this.width();
	}
	arrayOfAddressesInRange() {
		const result = [];
		for (let y = 0; y < this.height(); ++y) {
			result[y] = [];
			for (let x = 0; x < this.width(); ++x) {
				const value = simpleCellAddress(this.sheet, this.start.col + x, this.start.row + y);
				result[y].push(value);
			}
		}
		return result;
	}
	withStart(newStart) {
		return new AbsoluteCellRange(newStart, this.end);
	}
	sameDimensionsAs(other) {
		return this.width() === other.width() && this.height() === other.height();
	}
	sameAs(other) {
		return equalSimpleCellAddress(this.start, other.start) && equalSimpleCellAddress(this.end, other.end);
	}
	addressesArrayMap(dependencyGraph, op) {
		const ret = [];
		let currentRow = this.start.row;
		while (currentRow <= this.effectiveEndRow(dependencyGraph)) {
			let currentColumn = this.start.col;
			const tmp = [];
			while (currentColumn <= this.effectiveEndColumn(dependencyGraph)) {
				tmp.push(op(simpleCellAddress(this.start.sheet, currentColumn, currentRow)));
				currentColumn++;
			}
			ret.push(tmp);
			currentRow++;
		}
		return ret;
	}
	addresses(dependencyGraph) {
		const ret = [];
		let currentRow = this.start.row;
		const limitRow = this.effectiveEndRow(dependencyGraph);
		const limitColumn = this.effectiveEndColumn(dependencyGraph);
		while (currentRow <= limitRow) {
			let currentColumn = this.start.col;
			while (currentColumn <= limitColumn) {
				ret.push(simpleCellAddress(this.start.sheet, currentColumn, currentRow));
				currentColumn++;
			}
			currentRow++;
		}
		return ret;
	}
	*addressesWithDirection(right, bottom, dependencyGraph) {
		if (right > 0) if (bottom > 0) {
			let currentRow = this.effectiveEndRow(dependencyGraph);
			while (currentRow >= this.start.row) {
				let currentColumn = this.effectiveEndColumn(dependencyGraph);
				while (currentColumn >= this.start.col) {
					yield simpleCellAddress(this.start.sheet, currentColumn, currentRow);
					currentColumn -= 1;
				}
				currentRow -= 1;
			}
		} else {
			let currentRow = this.start.row;
			while (currentRow <= this.effectiveEndRow(dependencyGraph)) {
				let currentColumn = this.effectiveEndColumn(dependencyGraph);
				while (currentColumn >= this.start.col) {
					yield simpleCellAddress(this.start.sheet, currentColumn, currentRow);
					currentColumn -= 1;
				}
				currentRow += 1;
			}
		}
		else if (bottom > 0) {
			let currentRow = this.effectiveEndRow(dependencyGraph);
			while (currentRow >= this.start.row) {
				let currentColumn = this.start.col;
				while (currentColumn <= this.effectiveEndColumn(dependencyGraph)) {
					yield simpleCellAddress(this.start.sheet, currentColumn, currentRow);
					currentColumn += 1;
				}
				currentRow -= 1;
			}
		} else {
			let currentRow = this.start.row;
			while (currentRow <= this.effectiveEndRow(dependencyGraph)) {
				let currentColumn = this.start.col;
				while (currentColumn <= this.effectiveEndColumn(dependencyGraph)) {
					yield simpleCellAddress(this.start.sheet, currentColumn, currentRow);
					currentColumn += 1;
				}
				currentRow += 1;
			}
		}
	}
	getAddress(col, row) {
		if (col < 0 || row < 0 || row > this.height() - 1 || col > this.width() - 1) throw Error("Index out of bound");
		return simpleCellAddress(this.start.sheet, this.start.col + col, this.start.row + row);
	}
	exceedsSheetSizeLimits(maxColumns, maxRows) {
		return this.end.col >= maxColumns || this.end.row >= maxRows;
	}
	effectiveEndColumn(_dependencyGraph) {
		return this.end.col;
	}
	effectiveEndRow(_dependencyGraph) {
		return this.end.row;
	}
	effectiveWidth(_dependencyGraph) {
		return this.width();
	}
	effectiveHeight(_dependencyGraph) {
		return this.height();
	}
	removeRows(rowStart, rowEnd) {
		if (rowStart > this.end.row) return;
		if (rowEnd < this.start.row) {
			const numberOfRows = rowEnd - rowStart + 1;
			return this.shiftByRows(-numberOfRows);
		}
		if (rowStart <= this.start.row) this.start.row = rowStart;
		this.end.row -= Math.min(rowEnd, this.end.row) - rowStart + 1;
	}
	removeColumns(columnStart, columnEnd) {
		if (columnStart > this.end.col) return;
		if (columnEnd < this.start.col) {
			const numberOfColumns = columnEnd - columnStart + 1;
			return this.shiftByColumns(-numberOfColumns);
		}
		if (columnStart <= this.start.col) this.start.col = columnStart;
		this.end.col -= Math.min(columnEnd, this.end.col) - columnStart + 1;
	}
};
var AbsoluteColumnRange = class AbsoluteColumnRange extends AbsoluteCellRange {
	constructor(sheet, columnStart, columnEnd) {
		super(simpleCellAddress(sheet, columnStart, 0), simpleCellAddress(sheet, columnEnd, Number.POSITIVE_INFINITY));
	}
	static fromColumnRange(x, baseAddress) {
		const start = x.start.toSimpleColumnAddress(baseAddress);
		const end = x.end.toSimpleColumnAddress(baseAddress);
		if (start.sheet !== end.sheet) throw new SheetsNotEqual(start.sheet, end.sheet);
		return new AbsoluteColumnRange(start.sheet, start.col, end.col);
	}
	shouldBeRemoved() {
		return this.width() <= 0;
	}
	shiftByRows(_numberOfRows) {}
	expandByRows(_numberOfRows) {}
	shifted(byCols, _byRows) {
		return new AbsoluteColumnRange(this.sheet, this.start.col + byCols, this.end.col + byCols);
	}
	rangeWithSameHeight(startColumn, numberOfColumns) {
		return new AbsoluteColumnRange(this.sheet, startColumn, startColumn + numberOfColumns - 1);
	}
	exceedsSheetSizeLimits(maxColumns, _maxRows) {
		return this.end.col >= maxColumns;
	}
	effectiveEndRow(dependencyGraph) {
		return this.effectiveHeight(dependencyGraph) - 1;
	}
	effectiveHeight(dependencyGraph) {
		return dependencyGraph.getSheetHeight(this.sheet);
	}
	removeRows(_rowStart, _rowEnd) {}
};
var AbsoluteRowRange = class AbsoluteRowRange extends AbsoluteCellRange {
	constructor(sheet, rowStart, rowEnd) {
		super(simpleCellAddress(sheet, 0, rowStart), simpleCellAddress(sheet, Number.POSITIVE_INFINITY, rowEnd));
	}
	static fromRowRangeAst(x, baseAddress) {
		const start = x.start.toSimpleRowAddress(baseAddress);
		const end = x.end.toSimpleRowAddress(baseAddress);
		if (start.sheet !== end.sheet) throw new SheetsNotEqual(start.sheet, end.sheet);
		return new AbsoluteRowRange(start.sheet, start.row, end.row);
	}
	shouldBeRemoved() {
		return this.height() <= 0;
	}
	shiftByColumns(_numberOfColumns) {}
	expandByColumns(_numberOfColumns) {}
	shifted(byCols, byRows) {
		return new AbsoluteRowRange(this.sheet, this.start.row + byRows, this.end.row + byRows);
	}
	rangeWithSameWidth(startRow, numberOfRows) {
		return new AbsoluteRowRange(this.sheet, startRow, startRow + numberOfRows - 1);
	}
	exceedsSheetSizeLimits(_maxColumns, maxRows) {
		return this.end.row >= maxRows;
	}
	effectiveEndColumn(dependencyGraph) {
		return this.effectiveWidth(dependencyGraph) - 1;
	}
	effectiveWidth(dependencyGraph) {
		return dependencyGraph.getSheetWidth(this.sheet);
	}
	removeColumns(_columnStart, _columnEnd) {}
};
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/InterpreterState.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var InterpreterState = class {
	constructor(formulaAddress, arraysFlag, formulaVertex) {
		this.formulaAddress = formulaAddress;
		this.arraysFlag = arraysFlag;
		this.formulaVertex = formulaVertex;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/StringHelper.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
function collatorFromConfig(config) {
	const sensitivity = config.caseSensitive ? config.accentSensitive ? "variant" : "case" : config.accentSensitive ? "accent" : "base";
	const caseFirst = config.caseFirst;
	const ignorePunctuation = config.ignorePunctuation;
	return new Intl.Collator(config.localeLang, {
		sensitivity,
		caseFirst,
		ignorePunctuation
	});
}
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/ArithmeticHelper.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var COMPLEX_NUMBER_SYMBOL = "i";
var complexParsingRegexp = /^\s*([+-]?)\s*(([\d\.,]+(e[+-]?\d+)?)\s*([ij]?)|([ij]))\s*(([+-])\s*([+-]?)\s*(([\d\.,]+(e[+-]?\d+)?)\s*([ij]?)|([ij])))?$/;
var ArithmeticHelper = class {
	constructor(config, dateTimeHelper, numberLiteralsHelper) {
		this.config = config;
		this.dateTimeHelper = dateTimeHelper;
		this.numberLiteralsHelper = numberLiteralsHelper;
		this.lt = (left, right) => {
			return this.compare(left, right) < 0;
		};
		this.leq = (left, right) => {
			return this.compare(left, right) <= 0;
		};
		this.gt = (left, right) => {
			return this.compare(left, right) > 0;
		};
		this.geq = (left, right) => {
			return this.compare(left, right) >= 0;
		};
		this.eq = (left, right) => {
			return this.compare(left, right) === 0;
		};
		this.neq = (left, right) => {
			return this.compare(left, right) !== 0;
		};
		this.pow = (left, right) => {
			return Math.pow(getRawValue(left), getRawValue(right));
		};
		this.addWithEpsilonRaw = (left, right) => {
			const ret = left + right;
			if (Math.abs(ret) < this.actualEps * Math.abs(left)) return 0;
			else return ret;
		};
		this.addWithEpsilon = (left, right) => {
			const typeOfResult = inferExtendedNumberTypeAdditive(left, right);
			return this.ExtendedNumberFactory(this.addWithEpsilonRaw(getRawValue(left), getRawValue(right)), typeOfResult);
		};
		this.unaryMinus = (arg) => {
			return cloneNumber(arg, -getRawValue(arg));
		};
		this.unaryPlus = (arg) => arg;
		this.unaryPercent = (arg) => {
			return new PercentNumber(getRawValue(arg) / 100);
		};
		this.concat = (left, right) => {
			return left.concat(right);
		};
		this.nonstrictadd = (left, right) => {
			if (left instanceof CellError) return left;
			else if (right instanceof CellError) return right;
			else if (typeof left === "number") if (typeof right === "number") return this.addWithEpsilonRaw(left, right);
			else return left;
			else if (typeof right === "number") return right;
			else return 0;
		};
		/**
		* Subtracts two numbers
		*
		* Implementation of subtracting which is used in interpreter.
		*
		* @param left - left operand of subtraction
		* @param right - right operand of subtraction
		* @param eps - precision of comparison
		*/
		this.subtract = (leftArg, rightArg) => {
			const typeOfResult = inferExtendedNumberTypeAdditive(leftArg, rightArg);
			const left = getRawValue(leftArg);
			let ret = left - getRawValue(rightArg);
			if (Math.abs(ret) < this.actualEps * Math.abs(left)) ret = 0;
			return this.ExtendedNumberFactory(ret, typeOfResult);
		};
		this.divide = (leftArg, rightArg) => {
			const left = getRawValue(leftArg);
			const right = getRawValue(rightArg);
			if (right === 0) return new CellError(ErrorType.DIV_BY_ZERO);
			else {
				const typeOfResult = inferExtendedNumberTypeMultiplicative(leftArg, rightArg);
				return this.ExtendedNumberFactory(left / right, typeOfResult);
			}
		};
		this.multiply = (left, right) => {
			const typeOfResult = inferExtendedNumberTypeMultiplicative(left, right);
			return this.ExtendedNumberFactory(getRawValue(left) * getRawValue(right), typeOfResult);
		};
		this.manyToExactComplex = (args) => {
			const ret = [];
			for (const arg of args) if (arg instanceof CellError) return arg;
			else if (isExtendedNumber(arg) || typeof arg === "string") {
				const coerced = this.coerceScalarToComplex(arg);
				if (!(coerced instanceof CellError)) ret.push(coerced);
			}
			return ret;
		};
		this.coerceNumbersExactRanges = (args) => this.manyToNumbers(args, this.manyToExactNumbers);
		this.coerceNumbersCoerceRangesDropNulls = (args) => this.manyToNumbers(args, this.manyToCoercedNumbersDropNulls);
		this.manyToExactNumbers = (args) => {
			const ret = [];
			for (const arg of args) if (arg instanceof CellError) return arg;
			else if (isExtendedNumber(arg)) ret.push(getRawValue(arg));
			return ret;
		};
		this.manyToOnlyNumbersDropNulls = (args) => {
			const ret = [];
			for (const arg of args) if (arg instanceof CellError) return arg;
			else if (isExtendedNumber(arg)) ret.push(getRawValue(arg));
			else if (arg !== EmptyValue) return new CellError(ErrorType.VALUE, ErrorMessage.NumberExpected);
			return ret;
		};
		this.manyToCoercedNumbersDropNulls = (args) => {
			const ret = [];
			for (const arg of args) {
				if (arg instanceof CellError) return arg;
				if (arg === EmptyValue) continue;
				const coerced = this.coerceScalarToNumberOrError(arg);
				if (isExtendedNumber(coerced)) ret.push(getRawValue(coerced));
			}
			return ret;
		};
		this.collator = collatorFromConfig(config);
		this.actualEps = config.smartRounding ? config.precisionEpsilon : 0;
	}
	eqMatcherFunction(pattern) {
		const regexp = this.buildRegex(pattern);
		return (cellValue) => typeof cellValue === "string" && regexp.test(this.normalizeString(cellValue));
	}
	neqMatcherFunction(pattern) {
		const regexp = this.buildRegex(pattern);
		return (cellValue) => {
			return !(typeof cellValue === "string") || !regexp.test(this.normalizeString(cellValue));
		};
	}
	searchString(pattern, text) {
		var _a;
		const result = this.buildRegex(pattern, false).exec(text);
		return (_a = result === null || result === void 0 ? void 0 : result.index) !== null && _a !== void 0 ? _a : -1;
	}
	requiresRegex(pattern) {
		if (!this.config.useRegularExpressions && !this.config.useWildcards) return !this.config.matchWholeCell;
		for (let i = 0; i < pattern.length; i++) {
			const c = pattern.charAt(i);
			if (isWildcard(c) || this.config.useRegularExpressions && needsEscape(c)) return true;
		}
		return false;
	}
	floatCmp(leftArg, rightArg) {
		const left = getRawValue(leftArg);
		const right = getRawValue(rightArg);
		const mod = 1 + this.actualEps;
		if (right >= 0 && left * mod >= right && left <= right * mod) return 0;
		else if (right <= 0 && left * mod <= right && left >= right * mod) return 0;
		else if (left > right) return 1;
		else return -1;
	}
	coerceScalarToNumberOrError(arg) {
		var _a;
		if (arg instanceof CellError) return arg;
		return (_a = this.coerceToMaybeNumber(arg)) !== null && _a !== void 0 ? _a : new CellError(ErrorType.VALUE, ErrorMessage.NumberCoercion);
	}
	coerceToMaybeNumber(arg) {
		var _a;
		return (_a = this.coerceNonDateScalarToMaybeNumber(arg)) !== null && _a !== void 0 ? _a : typeof arg === "string" ? this.dateTimeHelper.dateStringToDateNumber(arg) : void 0;
	}
	coerceNonDateScalarToMaybeNumber(arg) {
		if (arg === EmptyValue) return 0;
		else if (typeof arg === "string") {
			if (arg === "") return 0;
			const maybePercentNumber = this.coerceStringToMaybePercentNumber(arg);
			if (maybePercentNumber !== void 0) return maybePercentNumber;
			const maybeCurrencyNumber = this.coerceStringToMaybeCurrencyNumber(arg);
			if (maybeCurrencyNumber !== void 0) return maybeCurrencyNumber;
			return this.numberLiteralsHelper.numericStringToMaybeNumber(arg.trim());
		} else if (isExtendedNumber(arg)) return arg;
		else if (typeof arg === "boolean") return Number(arg);
		else return;
	}
	coerceStringToMaybePercentNumber(input) {
		const trimmedInput = input.trim();
		if (trimmedInput.endsWith("%")) {
			const numOfPercents = trimmedInput.slice(0, trimmedInput.length - 1).trim();
			const parsedNumOfPercents = this.numberLiteralsHelper.numericStringToMaybeNumber(numOfPercents);
			if (parsedNumOfPercents !== void 0) return new PercentNumber(parsedNumOfPercents / 100);
		}
	}
	coerceStringToMaybeCurrencyNumber(input) {
		const matchedCurrency = this.currencyMatcher(input.trim());
		if (matchedCurrency !== void 0) {
			const [currencySymbol, currencyValue] = matchedCurrency;
			const parsedCurrencyValue = this.numberLiteralsHelper.numericStringToMaybeNumber(currencyValue);
			if (parsedCurrencyValue !== void 0) return new CurrencyNumber(parsedCurrencyValue, currencySymbol);
		}
	}
	currencyMatcher(token) {
		for (const currency of this.config.currencySymbol) {
			if (token.startsWith(currency)) return [currency, token.slice(currency.length).trim()];
			if (token.endsWith(currency)) return [currency, token.slice(0, token.length - currency.length).trim()];
		}
	}
	coerceComplexExactRanges(args) {
		const vals = [];
		for (const arg of args) if (arg instanceof SimpleRangeValue) vals.push(arg);
		else if (arg !== EmptyValue) {
			const coerced = this.coerceScalarToComplex(arg);
			if (coerced instanceof CellError) return coerced;
			else vals.push(coerced);
		}
		const expandedVals = [];
		for (const val of vals) if (val instanceof SimpleRangeValue) {
			const arr = this.manyToExactComplex(val.valuesFromTopLeftCorner());
			if (arr instanceof CellError) return arr;
			else expandedVals.push(...arr);
		} else expandedVals.push(val);
		return expandedVals;
	}
	coerceScalarToComplex(arg) {
		if (arg instanceof CellError) return arg;
		else if (arg === EmptyValue) return [0, 0];
		else if (isExtendedNumber(arg)) return [getRawValue(arg), 0];
		else if (typeof arg === "string") return this.coerceStringToComplex(arg);
		else return new CellError(ErrorType.NUM, ErrorMessage.ComplexNumberExpected);
	}
	ExtendedNumberFactory(value, typeFormat) {
		const { type, format } = typeFormat;
		switch (type) {
			case NumberType.NUMBER_RAW: return value;
			case NumberType.NUMBER_CURRENCY: return new CurrencyNumber(value, format !== null && format !== void 0 ? format : this.config.currencySymbol[0]);
			case NumberType.NUMBER_DATE: return new DateNumber(value, format);
			case NumberType.NUMBER_DATETIME: return new DateTimeNumber(value, format);
			case NumberType.NUMBER_TIME: return new TimeNumber(value, format);
			case NumberType.NUMBER_PERCENT: return new PercentNumber(value, format);
		}
	}
	buildRegex(pattern, matchWholeCell = true) {
		pattern = this.normalizeString(pattern);
		let regexpStr;
		let useWildcards = this.config.useWildcards;
		let useRegularExpressions = this.config.useRegularExpressions;
		if (useRegularExpressions) try {
			RegExp(pattern);
		} catch (e) {
			useRegularExpressions = false;
			useWildcards = false;
		}
		if (useRegularExpressions) regexpStr = escapeNoCharacters(pattern, this.config.caseSensitive);
		else if (useWildcards) regexpStr = escapeNonWildcards(pattern, this.config.caseSensitive);
		else regexpStr = escapeAllCharacters(pattern, this.config.caseSensitive);
		if (this.config.matchWholeCell && matchWholeCell) return RegExp("^(" + regexpStr + ")$");
		else return RegExp(regexpStr);
	}
	normalizeString(str) {
		if (!this.config.caseSensitive) str = str.toLowerCase();
		if (!this.config.accentSensitive) str = normalizeString$1(str, "nfd").replace(/[\u0300-\u036f]/g, "");
		return str;
	}
	compare(left, right) {
		if (typeof left === "string" || typeof right === "string") {
			const leftTmp = typeof left === "string" ? this.dateTimeHelper.dateStringToDateNumber(left) : left;
			const rightTmp = typeof right === "string" ? this.dateTimeHelper.dateStringToDateNumber(right) : right;
			if (isExtendedNumber(leftTmp) && isExtendedNumber(rightTmp)) return this.floatCmp(leftTmp, rightTmp);
		}
		if (left === EmptyValue) left = coerceEmptyToValue(right);
		else if (right === EmptyValue) right = coerceEmptyToValue(left);
		if (typeof left === "string" && typeof right === "string") return this.stringCmp(left, right);
		else if (typeof left === "boolean" && typeof right === "boolean") return numberCmp(coerceBooleanToNumber(left), coerceBooleanToNumber(right));
		else if (isExtendedNumber(left) && isExtendedNumber(right)) return this.floatCmp(left, right);
		else if (left === EmptyValue && right === EmptyValue) return 0;
		else return numberCmp(CellValueTypeOrd(getCellValueType(left)), CellValueTypeOrd(getCellValueType(right)));
	}
	stringCmp(left, right) {
		return this.collator.compare(left, right);
	}
	manyToNumbers(args, rangeFn) {
		const vals = [];
		for (const arg of args) if (arg instanceof SimpleRangeValue) vals.push(arg);
		else {
			const coerced = getRawValue(this.coerceScalarToNumberOrError(arg));
			if (coerced instanceof CellError) return coerced;
			else vals.push(coerced);
		}
		const expandedVals = [];
		for (const val of vals) if (val instanceof SimpleRangeValue) {
			const arr = rangeFn(val.valuesFromTopLeftCorner());
			if (arr instanceof CellError) return arr;
			else expandedVals.push(...arr);
		} else expandedVals.push(val);
		return expandedVals;
	}
	coerceStringToComplex(arg) {
		const match = complexParsingRegexp.exec(arg);
		if (match === null) return new CellError(ErrorType.NUM, ErrorMessage.ComplexNumberExpected);
		let val1;
		if (match[6] !== void 0) val1 = match[1] === "-" ? [0, -1] : [0, 1];
		else val1 = this.parseComplexToken(match[1] + match[3], match[5]);
		if (val1 instanceof CellError) return val1;
		if (match[8] === void 0) return val1;
		let val2;
		if (match[14] !== void 0) val2 = match[9] === "-" ? [0, -1] : [0, 1];
		else val2 = this.parseComplexToken(match[9] + match[11], match[13]);
		if (val2 instanceof CellError) return val2;
		if (match[5] !== "" || match[13] === "") return new CellError(ErrorType.NUM, ErrorMessage.ComplexNumberExpected);
		if (match[8] === "+") return [val1[0] + val2[0], val1[1] + val2[1]];
		else return [val1[0] - val2[0], val1[1] - val2[1]];
	}
	parseComplexToken(arg, mod) {
		const val = getRawValue(this.coerceNonDateScalarToMaybeNumber(arg));
		if (val === void 0) return new CellError(ErrorType.NUM, ErrorMessage.ComplexNumberExpected);
		if (mod === "") return [val, 0];
		else return [0, val];
	}
};
function coerceComplexToString([re, im], symb) {
	if (!isFinite(re) || !isFinite(im)) return new CellError(ErrorType.NUM, ErrorMessage.NaN);
	symb = symb !== null && symb !== void 0 ? symb : COMPLEX_NUMBER_SYMBOL;
	if (im === 0) return `${re}`;
	const imStr = `${im === -1 || im === 1 ? "" : Math.abs(im)}${symb}`;
	if (re === 0) return `${im < 0 ? "-" : ""}${imStr}`;
	return `${re}${im < 0 ? "-" : "+"}${imStr}`;
}
function coerceToRange(arg) {
	if (arg instanceof SimpleRangeValue) return arg;
	else return SimpleRangeValue.fromScalar(arg);
}
function coerceBooleanToNumber(arg) {
	return Number(arg);
}
function coerceEmptyToValue(arg) {
	if (typeof arg === "string") return "";
	else if (isExtendedNumber(arg)) return 0;
	else if (typeof arg === "boolean") return false;
	else return EmptyValue;
}
/**
* Coerce scalar value to boolean if possible, or error if value is an error
*
* @param arg
*/
function coerceScalarToBoolean(arg) {
	if (arg instanceof CellError || typeof arg === "boolean") return arg;
	else if (arg === EmptyValue) return false;
	else if (isExtendedNumber(arg)) return getRawValue(arg) !== 0;
	else {
		const argUppered = arg.toUpperCase();
		if (argUppered === "TRUE") return true;
		else if (argUppered === "FALSE") return false;
		else if (argUppered === "") return false;
		else return;
	}
}
function coerceScalarToString(arg) {
	if (arg instanceof CellError || typeof arg === "string") return arg;
	else if (arg === EmptyValue) return "";
	else if (isExtendedNumber(arg)) return getRawValue(arg).toString();
	else return arg ? "TRUE" : "FALSE";
}
function zeroIfEmpty(arg) {
	return arg === EmptyValue ? 0 : arg;
}
function numberCmp(leftArg, rightArg) {
	const left = getRawValue(leftArg);
	const right = getRawValue(rightArg);
	if (left > right) return 1;
	else if (left < right) return -1;
	else return 0;
}
function isNumberOverflow(arg) {
	return isNaN(arg) || arg === Infinity || arg === -Infinity;
}
function fixNegativeZero(arg) {
	if (arg === 0) return 0;
	else return arg;
}
function isWildcard(c) {
	return ["*", "?"].includes(c);
}
var escapedCharacters = [
	"{",
	"}",
	"[",
	"]",
	"(",
	")",
	"<",
	">",
	"=",
	".",
	"+",
	"-",
	",",
	"\\",
	"$",
	"^",
	"!"
];
function needsEscape(c) {
	return escapedCharacters.includes(c);
}
function escapeNonWildcards(pattern, caseSensitive) {
	let str = "";
	for (let i = 0; i < pattern.length; i++) {
		const c = pattern.charAt(i);
		if (c === "~") {
			if (i == pattern.length - 1) {
				str += "~";
				continue;
			}
			const d = pattern.charAt(i + 1);
			if (isWildcard(d) || needsEscape(d)) {
				str += "\\" + d;
				i++;
			} else {
				str += d;
				i++;
			}
		} else if (isWildcard(c)) str += "." + c;
		else if (needsEscape(c)) str += "\\" + c;
		else if (caseSensitive) str += c;
		else str += c.toLowerCase();
	}
	return str;
}
function escapeAllCharacters(pattern, caseSensitive) {
	let str = "";
	for (let i = 0; i < pattern.length; i++) {
		const c = pattern.charAt(i);
		if (isWildcard(c) || needsEscape(c)) str += "\\" + c;
		else if (caseSensitive) str += c;
		else str += c.toLowerCase();
	}
	return str;
}
function escapeNoCharacters(pattern, caseSensitive) {
	let str = "";
	for (let i = 0; i < pattern.length; i++) {
		const c = pattern.charAt(i);
		if (isWildcard(c) || needsEscape(c)) str += c;
		else if (caseSensitive) str += c;
		else str += c.toLowerCase();
	}
	return str;
}
function inferExtendedNumberTypeAdditive(leftArg, rightArg) {
	const { type: leftType, format: leftFormat } = getTypeFormatOfExtendedNumber(leftArg);
	const { type: rightType, format: rightFormat } = getTypeFormatOfExtendedNumber(rightArg);
	if (leftType === NumberType.NUMBER_RAW) return {
		type: rightType,
		format: rightFormat
	};
	if (rightType === NumberType.NUMBER_RAW) return {
		type: leftType,
		format: leftFormat
	};
	if ((leftType === NumberType.NUMBER_DATETIME || leftType === NumberType.NUMBER_DATE) && (rightType === NumberType.NUMBER_DATETIME || rightType === NumberType.NUMBER_DATE)) return { type: NumberType.NUMBER_RAW };
	if (leftType === NumberType.NUMBER_TIME) {
		if (rightType === NumberType.NUMBER_DATE) return {
			type: NumberType.NUMBER_DATETIME,
			format: `${rightFormat} ${leftFormat}`
		};
		if (rightType === NumberType.NUMBER_DATETIME) return {
			type: NumberType.NUMBER_DATETIME,
			format: rightFormat
		};
	}
	if (rightType === NumberType.NUMBER_TIME) {
		if (leftType === NumberType.NUMBER_DATE) return {
			type: NumberType.NUMBER_DATETIME,
			format: `${leftFormat} ${rightFormat}`
		};
		if (leftType === NumberType.NUMBER_DATETIME) return {
			type: NumberType.NUMBER_DATETIME,
			format: leftFormat
		};
	}
	return {
		type: leftType,
		format: leftFormat
	};
}
function inferExtendedNumberTypeMultiplicative(leftArg, rightArg) {
	let { type: leftType, format: leftFormat } = getTypeFormatOfExtendedNumber(leftArg);
	let { type: rightType, format: rightFormat } = getTypeFormatOfExtendedNumber(rightArg);
	if (leftType === NumberType.NUMBER_PERCENT) {
		leftType = NumberType.NUMBER_RAW;
		leftFormat = void 0;
	}
	if (rightType === NumberType.NUMBER_PERCENT) {
		rightType = NumberType.NUMBER_RAW;
		rightFormat = void 0;
	}
	if (leftType === NumberType.NUMBER_RAW) return {
		type: rightType,
		format: rightFormat
	};
	if (rightType === NumberType.NUMBER_RAW) return {
		type: leftType,
		format: leftFormat
	};
	return { type: NumberType.NUMBER_RAW };
}
function forceNormalizeString(str) {
	return normalizeString$1(str.toLowerCase(), "nfd").replace(/[\u0300-\u036f]/g, "");
}
function coerceRangeToScalar(arg, state) {
	var _a;
	if (arg.isAdHoc()) return (_a = arg.data[0]) === null || _a === void 0 ? void 0 : _a[0];
	const range = arg.range;
	if (state.formulaAddress.sheet === range.sheet) {
		if (range.width() === 1) {
			const offset = state.formulaAddress.row - range.start.row;
			if (offset >= 0 && offset < range.height()) return arg.data[offset][0];
		} else if (range.height() === 1) {
			const offset = state.formulaAddress.col - range.start.col;
			if (offset >= 0 && offset < range.width()) return arg.data[0][offset];
		}
	}
}
function normalizeString$1(str, form) {
	return str.normalize(form.toUpperCase());
}
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/FunctionPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var FunctionArgumentType;
(function(FunctionArgumentType) {
	/**
	* String type.
	*/
	FunctionArgumentType["STRING"] = "STRING";
	/**
	* Floating point type.
	*/
	FunctionArgumentType["NUMBER"] = "NUMBER";
	/**
	* Boolean type.
	*/
	FunctionArgumentType["BOOLEAN"] = "BOOLEAN";
	/**
	* Any non-range value.
	*/
	FunctionArgumentType["SCALAR"] = "SCALAR";
	/**
	* Any non-range, no-error type.
	*/
	FunctionArgumentType["NOERROR"] = "NOERROR";
	/**
	* Range type.
	*/
	FunctionArgumentType["RANGE"] = "RANGE";
	/**
	* Integer type.
	*/
	FunctionArgumentType["INTEGER"] = "INTEGER";
	/**
	* String representing complex number.
	*/
	FunctionArgumentType["COMPLEX"] = "COMPLEX";
	/**
	* Range or scalar.
	*/
	FunctionArgumentType["ANY"] = "ANY";
})(FunctionArgumentType || (FunctionArgumentType = {}));
/**
* Abstract class representing interpreter function plugin.
* Plugin may contain multiple functions. Each function should be of type {@link PluginFunctionType} and needs to be
* included in {@link implementedFunctions}
*/
var FunctionPlugin = class {
	constructor(interpreter) {
		this.coerceScalarToNumberOrError = (arg) => this.arithmeticHelper.coerceScalarToNumberOrError(arg);
		/**
		* A method that should wrap the logic of every built-in function and custom function. It:
		* - Evaluates the function's arguments.
		* - Validates the number of arguments against the [`parameters` array](#function-options).
		* - Coerces the argument values to types set in the [`parameters` array](#argument-validation-options).
		* - Handles optional arguments and default values according to options set in the [`parameters` array](#argument-validation-options).
		* - Validates the function's arguments against the [argument validation options](#argument-validation-options).
		* - Duplicates the arguments according to the [`repeatLastArgs` option](#function-options).
		* - Handles the [array arithmetic mode](arrays.md#array-arithmetic-mode).
		* - Performs [function vectorization](arrays.md#passing-arrays-to-scalar-functions-vectorization).
		* - Performs [argument broadcasting](arrays.md#broadcasting).
		*/
		this.runFunction = (args, state, metadata, functionImplementation) => {
			const evaluatedArguments = this.evaluateArguments(args, state, metadata);
			const argumentValues = evaluatedArguments.map(([value, _]) => value);
			const argumentIgnorableFlags = evaluatedArguments.map(([_, ignorable]) => ignorable);
			const argumentMetadata = this.buildMetadataForEachArgumentValue(argumentValues.length, metadata);
			const isVectorizationOn = state.arraysFlag && !metadata.vectorizationForbidden;
			if (!this.isNumberOfArgumentValuesValid(argumentMetadata, argumentValues.length)) return new CellError(ErrorType.NA, ErrorMessage.WrongArgNumber);
			const [resultArrayHeight, resultArrayWidth] = isVectorizationOn ? this.calculateSizeOfVectorizedResultArray(argumentValues, argumentMetadata) : [1, 1];
			if (resultArrayHeight === 1 && resultArrayWidth === 1) {
				const vectorizedArguments = this.vectorizeAndBroadcastArgumentsIfNecessary(isVectorizationOn, argumentValues, argumentMetadata, 0, 0);
				return this.calculateSingleCellOfResultArray(state, vectorizedArguments, argumentMetadata, argumentIgnorableFlags, functionImplementation, metadata.returnNumberType);
			}
			const resultArray = [...Array(resultArrayHeight).keys()].map((row) => [...Array(resultArrayWidth).keys()].map((col) => {
				const vectorizedArguments = this.vectorizeAndBroadcastArgumentsIfNecessary(isVectorizationOn, argumentValues, argumentMetadata, row, col);
				const result = this.calculateSingleCellOfResultArray(state, vectorizedArguments, argumentMetadata, argumentIgnorableFlags, functionImplementation, metadata.returnNumberType);
				if (result instanceof SimpleRangeValue) throw new Error("Function returning array cannot be vectorized.");
				return result;
			}));
			return SimpleRangeValue.onlyValues(resultArray);
		};
		this.runFunctionWithReferenceArgument = (args, state, metadata, noArgCallback, referenceCallback, nonReferenceCallback = () => new CellError(ErrorType.NA, ErrorMessage.CellRefExpected)) => {
			if (args.length === 0) return this.returnNumberWrapper(noArgCallback(), metadata.returnNumberType);
			else if (args.length > 1) return new CellError(ErrorType.NA, ErrorMessage.WrongArgNumber);
			let arg = args[0];
			while (arg.type === AstNodeType.PARENTHESIS) arg = arg.expression;
			let cellReference;
			if (arg.type === AstNodeType.CELL_REFERENCE) cellReference = arg.reference.toSimpleCellAddress(state.formulaAddress);
			else if (arg.type === AstNodeType.CELL_RANGE || arg.type === AstNodeType.COLUMN_RANGE || arg.type === AstNodeType.ROW_RANGE) try {
				cellReference = AbsoluteCellRange.fromAst(arg, state.formulaAddress).start;
			} catch (e) {
				return new CellError(ErrorType.REF, ErrorMessage.CellRefExpected);
			}
			if (cellReference !== void 0) return this.returnNumberWrapper(referenceCallback(cellReference), metadata.returnNumberType);
			return this.runFunction(args, state, metadata, nonReferenceCallback);
		};
		this.interpreter = interpreter;
		this.dependencyGraph = interpreter.dependencyGraph;
		this.columnSearch = interpreter.columnSearch;
		this.config = interpreter.config;
		this.serialization = interpreter.serialization;
		this.arraySizePredictor = interpreter.arraySizePredictor;
		this.dateTimeHelper = interpreter.dateTimeHelper;
		this.arithmeticHelper = interpreter.arithmeticHelper;
	}
	evaluateAst(ast, state) {
		return this.interpreter.evaluateAst(ast, state);
	}
	arraySizeForAst(ast, state) {
		return this.arraySizePredictor.checkArraySizeForAst(ast, state);
	}
	listOfScalarValues(asts, state) {
		const ret = [];
		for (const argAst of asts) {
			const value = this.evaluateAst(argAst, state);
			if (value instanceof SimpleRangeValue) for (const scalarValue of value.valuesFromTopLeftCorner()) ret.push([scalarValue, true]);
			else ret.push([value, false]);
		}
		return ret;
	}
	coerceToType(arg, coercedType, state) {
		let ret;
		if (arg instanceof SimpleRangeValue) switch (coercedType.argumentType) {
			case FunctionArgumentType.RANGE:
			case FunctionArgumentType.ANY:
				ret = arg;
				break;
			default: {
				const coerce = coerceRangeToScalar(arg, state);
				if (coerce === void 0) return;
				arg = coerce;
			}
		}
		if (!(arg instanceof SimpleRangeValue)) switch (coercedType.argumentType) {
			case FunctionArgumentType.INTEGER:
			case FunctionArgumentType.NUMBER:
				const coerced = this.coerceScalarToNumberOrError(arg);
				if (!isExtendedNumber(coerced)) {
					ret = coerced;
					break;
				}
				const value = getRawValue(coerced);
				if (coercedType.maxValue !== void 0 && value > coercedType.maxValue) return new CellError(ErrorType.NUM, ErrorMessage.ValueLarge);
				if (coercedType.minValue !== void 0 && value < coercedType.minValue) return new CellError(ErrorType.NUM, ErrorMessage.ValueSmall);
				if (coercedType.lessThan !== void 0 && value >= coercedType.lessThan) return new CellError(ErrorType.NUM, ErrorMessage.ValueLarge);
				if (coercedType.greaterThan !== void 0 && value <= coercedType.greaterThan) return new CellError(ErrorType.NUM, ErrorMessage.ValueSmall);
				if (coercedType.argumentType === FunctionArgumentType.INTEGER && !Number.isInteger(value)) return new CellError(ErrorType.NUM, ErrorMessage.IntegerExpected);
				ret = coerced;
				break;
			case FunctionArgumentType.STRING:
				ret = coerceScalarToString(arg);
				break;
			case FunctionArgumentType.BOOLEAN:
				ret = coerceScalarToBoolean(arg);
				break;
			case FunctionArgumentType.SCALAR:
			case FunctionArgumentType.NOERROR:
			case FunctionArgumentType.ANY:
				ret = arg;
				break;
			case FunctionArgumentType.RANGE:
				if (arg instanceof CellError) return arg;
				ret = coerceToRange(arg);
				break;
			case FunctionArgumentType.COMPLEX: return this.arithmeticHelper.coerceScalarToComplex(getRawValue(arg));
		}
		if (coercedType.passSubtype || ret === void 0) return ret;
		else return getRawValue(ret);
	}
	calculateSingleCellOfResultArray(state, vectorizedArguments, argumentsMetadata, argumentIgnorableFlags, functionImplementation, returnNumberType) {
		const coercedArguments = this.coerceArgumentsToRequiredTypes(state, vectorizedArguments, argumentsMetadata, argumentIgnorableFlags);
		if (coercedArguments instanceof CellError) return coercedArguments;
		const functionCalculationResult = functionImplementation(...coercedArguments);
		return this.returnNumberWrapper(functionCalculationResult, returnNumberType);
	}
	coerceArgumentsToRequiredTypes(state, vectorizedArguments, argumentsMetadata, argumentIgnorableFlags) {
		const coercedArguments = [];
		for (let i = 0; i < argumentsMetadata.length; i++) {
			const argumentMetadata = argumentsMetadata[i];
			const argumentValue = vectorizedArguments[i] !== void 0 ? vectorizedArguments[i] : argumentMetadata === null || argumentMetadata === void 0 ? void 0 : argumentMetadata.defaultValue;
			if (argumentValue === void 0) {
				coercedArguments.push(void 0);
				continue;
			}
			const coercedValue = this.coerceToType(argumentValue, argumentMetadata, state);
			if (coercedValue === void 0 && !argumentIgnorableFlags[i]) return new CellError(ErrorType.VALUE, ErrorMessage.WrongType);
			if (coercedValue instanceof CellError && argumentMetadata.argumentType !== FunctionArgumentType.SCALAR) return coercedValue;
			coercedArguments.push(coercedValue);
		}
		return coercedArguments;
	}
	vectorizeAndBroadcastArgumentsIfNecessary(isVectorizationOn, argumentValues, argumentMetadata, row, col) {
		return argumentValues.map((value, i) => isVectorizationOn && this.isRangePassedAsAScalarArgument(value, argumentMetadata[i]) ? this.vectorizeAndBroadcastRangeArgument(value, row, col) : value);
	}
	vectorizeAndBroadcastRangeArgument(argumentValue, rowNum, colNum) {
		var _a;
		const targetRowNum = argumentValue.height() === 1 ? 0 : rowNum;
		const targetColNum = argumentValue.width() === 1 ? 0 : colNum;
		return (_a = argumentValue.data[targetRowNum]) === null || _a === void 0 ? void 0 : _a[targetColNum];
	}
	evaluateArguments(args, state, metadata) {
		return metadata.expandRanges ? this.listOfScalarValues(args, state) : args.map((ast) => [this.evaluateAst(ast, state), false]);
	}
	buildMetadataForEachArgumentValue(numberOfArgumentValuesPassed, metadata) {
		const argumentsMetadata = metadata.parameters ? [...metadata.parameters] : [];
		if (metadata.repeatLastArgs !== void 0 && Number.isInteger(metadata.repeatLastArgs) && metadata.repeatLastArgs > 0) while (numberOfArgumentValuesPassed > argumentsMetadata.length) argumentsMetadata.push(...argumentsMetadata.slice(argumentsMetadata.length - metadata.repeatLastArgs));
		return argumentsMetadata;
	}
	isNumberOfArgumentValuesValid(argumentsMetadata, numberOfArgumentValuesPassed) {
		if (numberOfArgumentValuesPassed > argumentsMetadata.length) return false;
		if (numberOfArgumentValuesPassed < argumentsMetadata.length) return argumentsMetadata.slice(numberOfArgumentValuesPassed).every((argMetadata) => (argMetadata === null || argMetadata === void 0 ? void 0 : argMetadata.optionalArg) || (argMetadata === null || argMetadata === void 0 ? void 0 : argMetadata.defaultValue) !== void 0);
		return true;
	}
	calculateSizeOfVectorizedResultArray(argumentValues, argumentMetadata) {
		const argumentsThatRequireVectorization = argumentValues.filter((value, i) => this.isRangePassedAsAScalarArgument(value, argumentMetadata[i]));
		return [Math.max(1, ...argumentsThatRequireVectorization.map((val) => val.height())), Math.max(1, ...argumentsThatRequireVectorization.map((val) => val.width()))];
	}
	isRangePassedAsAScalarArgument(argumentValue, argumentMetadata) {
		if (argumentValue == null || argumentMetadata == null) return false;
		return argumentValue instanceof SimpleRangeValue && ![FunctionArgumentType.RANGE, FunctionArgumentType.ANY].includes(argumentMetadata.argumentType);
	}
	metadata(name) {
		const params = this.constructor.implementedFunctions[name];
		if (params !== void 0) return params;
		throw new Error(`No metadata for function ${name}.`);
	}
	returnNumberWrapper(val, type, format) {
		if (type !== void 0 && isExtendedNumber(val)) return this.arithmeticHelper.ExtendedNumberFactory(getRawValue(val), {
			type,
			format
		});
		else return val;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/index.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
//#endregion
//#region ../../node_modules/hyperformula/es/ArraySize.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var ArraySize = class ArraySize {
	constructor(width, height, isRef = false) {
		this.width = width;
		this.height = height;
		this.isRef = isRef;
	}
	static error() {
		return new ArraySize(1, 1, true);
	}
	static scalar() {
		return new ArraySize(1, 1, false);
	}
	isScalar() {
		return this.width === 1 && this.height === 1 || this.isRef;
	}
};
function arraySizeForBinaryOp(leftArraySize, rightArraySize) {
	return new ArraySize(Math.max(leftArraySize.width, rightArraySize.width), Math.max(leftArraySize.height, rightArraySize.height));
}
function arraySizeForUnaryOp(arraySize) {
	return new ArraySize(arraySize.width, arraySize.height);
}
var ArraySizePredictor = class {
	constructor(config, functionRegistry) {
		this.config = config;
		this.functionRegistry = functionRegistry;
	}
	checkArraySize(ast, formulaAddress) {
		return this.checkArraySizeForAst(ast, {
			formulaAddress,
			arraysFlag: this.config.useArrayArithmetic
		});
	}
	checkArraySizeForAst(ast, state) {
		switch (ast.type) {
			case AstNodeType.FUNCTION_CALL: return this.checkArraySizeForFunction(ast, state);
			case AstNodeType.COLUMN_RANGE:
			case AstNodeType.ROW_RANGE:
			case AstNodeType.CELL_RANGE: {
				const range = AbsoluteCellRange.fromAstOrUndef(ast, state.formulaAddress);
				if (range === void 0) return ArraySize.error();
				else return new ArraySize(range.width(), range.height(), true);
			}
			case AstNodeType.ARRAY: {
				const heights = [];
				const widths = [];
				for (const row of ast.args) {
					const sizes = row.map((ast) => this.checkArraySizeForAst(ast, state));
					const h = Math.min(...sizes.map((size) => size.height));
					const w = sizes.reduce((total, size) => total + size.width, 0);
					heights.push(h);
					widths.push(w);
				}
				const height = heights.reduce((total, h) => total + h, 0);
				return new ArraySize(Math.min(...widths), height);
			}
			case AstNodeType.STRING:
			case AstNodeType.NUMBER: return ArraySize.scalar();
			case AstNodeType.CELL_REFERENCE: return new ArraySize(1, 1, true);
			case AstNodeType.DIV_OP:
			case AstNodeType.CONCATENATE_OP:
			case AstNodeType.EQUALS_OP:
			case AstNodeType.GREATER_THAN_OP:
			case AstNodeType.GREATER_THAN_OR_EQUAL_OP:
			case AstNodeType.LESS_THAN_OP:
			case AstNodeType.LESS_THAN_OR_EQUAL_OP:
			case AstNodeType.MINUS_OP:
			case AstNodeType.NOT_EQUAL_OP:
			case AstNodeType.PLUS_OP:
			case AstNodeType.POWER_OP:
			case AstNodeType.TIMES_OP: {
				const left = this.checkArraySizeForAst(ast.left, state);
				const right = this.checkArraySizeForAst(ast.right, state);
				if (!state.arraysFlag && (left.height > 1 || left.width > 1 || right.height > 1 || right.width > 1)) return ArraySize.error();
				return arraySizeForBinaryOp(left, right);
			}
			case AstNodeType.MINUS_UNARY_OP:
			case AstNodeType.PLUS_UNARY_OP:
			case AstNodeType.PERCENT_OP: {
				const val = this.checkArraySizeForAst(ast.value, state);
				if (!state.arraysFlag && (val.height > 1 || val.width > 1)) return ArraySize.error();
				return arraySizeForUnaryOp(val);
			}
			case AstNodeType.PARENTHESIS: return this.checkArraySizeForAst(ast.expression, state);
			case AstNodeType.EMPTY: return ArraySize.error();
			default: return ArraySize.error();
		}
	}
	checkArraySizeForFunction(ast, state) {
		const pluginArraySizeFunction = this.functionRegistry.getArraySizeFunction(ast.procedureName);
		if (pluginArraySizeFunction !== void 0) return pluginArraySizeFunction(ast, state);
		const metadata = this.functionRegistry.getMetadata(ast.procedureName);
		if (metadata === void 0 || metadata.expandRanges || !state.arraysFlag || metadata.vectorizationForbidden || metadata.parameters === void 0) return new ArraySize(1, 1);
		const subChecks = ast.args.map((arg) => {
			var _a;
			return this.checkArraySizeForAst(arg, new InterpreterState(state.formulaAddress, state.arraysFlag || ((_a = metadata === null || metadata === void 0 ? void 0 : metadata.enableArrayArithmeticForArguments) !== null && _a !== void 0 ? _a : false)));
		});
		const argumentDefinitions = [...metadata.parameters];
		if (metadata.repeatLastArgs !== void 0 && argumentDefinitions.length < subChecks.length && (subChecks.length - argumentDefinitions.length) % metadata.repeatLastArgs !== 0) return ArraySize.error();
		while (argumentDefinitions.length < subChecks.length) {
			if (metadata.repeatLastArgs === void 0) return ArraySize.error();
			argumentDefinitions.push(...argumentDefinitions.slice(argumentDefinitions.length - metadata.repeatLastArgs));
		}
		let maxWidth = 1;
		let maxHeight = 1;
		for (let i = 0; i < subChecks.length; i++) if (argumentDefinitions[i].argumentType !== FunctionArgumentType.RANGE && argumentDefinitions[i].argumentType !== FunctionArgumentType.ANY) {
			maxHeight = Math.max(maxHeight, subChecks[i].height);
			maxWidth = Math.max(maxWidth, subChecks[i].width);
		}
		return new ArraySize(maxWidth, maxHeight);
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/CellValue.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var DetailedCellError = class {
	constructor(error, value, address) {
		var _a;
		this.value = value;
		this.address = address;
		this.type = error.type;
		this.message = (_a = error.message) !== null && _a !== void 0 ? _a : "";
	}
	toString() {
		return this.value;
	}
	valueOf() {
		return this.value;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/ArgumentSanitization.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
function configValueFromParam(inputValue, expectedType, paramName) {
	if (typeof inputValue === "undefined") return Config.defaultConfig[paramName];
	else if (typeof expectedType === "string") if (typeof inputValue === expectedType) return inputValue;
	else throw new ExpectedValueOfTypeError(expectedType, paramName);
	else if (expectedType.includes(inputValue)) return inputValue;
	else throw new ExpectedOneOfValuesError(expectedType.map((val) => `'${val}'`).join(" "), paramName);
}
function validateNumberToBeAtLeast(value, paramName, minimum) {
	if (value < minimum) throw new ConfigValueTooSmallError(paramName, minimum);
}
function validateNumberToBeAtMost(value, paramName, maximum) {
	if (value > maximum) throw new ConfigValueTooBigError(paramName, maximum);
}
function configValueFromParamCheck(inputValue, typeCheck, expectedType, paramName) {
	if (typeCheck(inputValue)) return inputValue;
	else if (typeof inputValue === "undefined") return Config.defaultConfig[paramName];
	else throw new ExpectedValueOfTypeError(expectedType, paramName);
}
function configCheckIfParametersNotInConflict(...params) {
	const valuesMap = /* @__PURE__ */ new Map();
	params.forEach((param) => {
		const names = valuesMap.get(param.value) || [];
		names.push(param.name);
		valuesMap.set(param.value, names);
	});
	const duplicates = [];
	for (const entry of valuesMap.values()) if (entry.length > 1) duplicates.push(entry);
	if (duplicates.length > 0) {
		duplicates.forEach((entry) => entry.sort());
		const paramNames = duplicates.map((entry) => `[${entry}]`).join("; ");
		throw new Error(`Config initialization failed. Parameters in conflict: ${paramNames}`);
	}
}
function validateArgToType(inputValue, expectedType, paramName) {
	if (typeof inputValue !== expectedType) throw new ExpectedValueOfTypeError(expectedType, paramName);
}
//#endregion
//#region ../../node_modules/hyperformula/es/DateTimeDefault.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var TIME_FORMAT_SECONDS_ITEM_REGEXP = /* @__PURE__ */ new RegExp("^ss(\\.(s+|0+))?$");
var QUICK_CHECK_REGEXP = /* @__PURE__ */ new RegExp("^[0-9/.\\-: ]+[ap]?m?$");
var WHITESPACE_REGEXP = /* @__PURE__ */ new RegExp("\\s+");
var DATE_SEPARATOR_REGEXP = /* @__PURE__ */ new RegExp("[ /.-]");
var TIME_SEPARATOR = ":";
var SECONDS_PRECISION = 1e3;
var memoizedParseTimeFormat = memoize(parseTimeFormat);
var memoizedParseDateFormat = memoize(parseDateFormat);
/**
* Parses a DateTime value from a string if the string matches the given date format and time format.
*
* Idea for more readable implementation:
*   - divide string into parts by a regexp [date_regexp]? [time_regexp]? [ampm_regexp]?
*   - start by finding the time part, because it is unambiguous '([0-9]+:[0-9:.]+ ?[ap]?m?)$', before it is the date part
*   - OR split by spaces - last segment is ampm token, second to last is time (with or without ampm), rest is date
* If applied:
*   - date parsing might work differently after these changes but still according to the docs
*   - make sure to test edge cases like timeFormats: ['hh', 'ss.ss'] etc, string: '01-01-2019 AM', 'PM'
*/
function defaultParseToDateTime(text, dateFormat, timeFormat) {
	if (dateFormat === void 0 && timeFormat === void 0) return;
	let dateTimeString = text.replace(WHITESPACE_REGEXP, " ").trim().toLowerCase();
	if (!doesItLookLikeADateTimeQuickCheck(dateTimeString)) return;
	let ampmToken = dateTimeString.substring(dateTimeString.length - 2);
	if (ampmToken === "am" || ampmToken === "pm") dateTimeString = dateTimeString.substring(0, dateTimeString.length - 2).trim();
	else {
		ampmToken = dateTimeString.substring(dateTimeString.length - 1);
		if (ampmToken === "a" || ampmToken === "p") dateTimeString = dateTimeString.substring(0, dateTimeString.length - 1).trim();
		else ampmToken = void 0;
	}
	const dateItems = dateTimeString.split(DATE_SEPARATOR_REGEXP);
	if (dateItems.length >= 2 && dateItems[dateItems.length - 2].includes(TIME_SEPARATOR)) {
		dateItems[dateItems.length - 2] = dateItems[dateItems.length - 2] + "." + dateItems[dateItems.length - 1];
		dateItems.pop();
	}
	const timeItems = dateItems[dateItems.length - 1].split(TIME_SEPARATOR);
	if (ampmToken !== void 0) timeItems.push(ampmToken);
	if (dateItems.length === 1) return defaultParseToTime(timeItems, timeFormat);
	if (timeItems.length === 1) return defaultParseToDate(dateItems, dateFormat);
	const parsedDate = defaultParseToDate(dateItems.slice(0, dateItems.length - 1), dateFormat);
	const parsedTime = defaultParseToTime(timeItems, timeFormat);
	if (parsedDate === void 0) return;
	else if (parsedTime === void 0) return;
	else return Object.assign(Object.assign({}, parsedDate), parsedTime);
}
/**
* Parses a time value from a string if the string matches the given time format.
*/
function defaultParseToTime(timeItems, timeFormat) {
	var _a, _b, _c;
	if (timeFormat === void 0) return;
	const { itemsCount, hourItem, minuteItem, secondItem } = memoizedParseTimeFormat(timeFormat);
	let ampm = void 0;
	if (timeItems[timeItems.length - 1] === "am" || timeItems[timeItems.length - 1] === "a") {
		ampm = false;
		timeItems.pop();
	} else if (timeItems[timeItems.length - 1] === "pm" || timeItems[timeItems.length - 1] === "p") {
		ampm = true;
		timeItems.pop();
	}
	if (timeItems.length !== itemsCount) return;
	const secondsParsed = Number((_a = timeItems[secondItem]) !== null && _a !== void 0 ? _a : "0");
	if (!Number.isFinite(secondsParsed)) return;
	const seconds = Math.round(secondsParsed * SECONDS_PRECISION) / SECONDS_PRECISION;
	const minutes = Number((_b = timeItems[minuteItem]) !== null && _b !== void 0 ? _b : "0");
	if (!(Number.isFinite(minutes) && Number.isInteger(minutes))) return;
	const hoursParsed = Number((_c = timeItems[hourItem]) !== null && _c !== void 0 ? _c : "0");
	if (!(Number.isFinite(hoursParsed) && Number.isInteger(hoursParsed))) return;
	if (ampm !== void 0 && (hoursParsed < 0 || hoursParsed > 12)) return;
	return {
		hours: ampm !== void 0 ? hoursParsed % 12 + (ampm ? 12 : 0) : hoursParsed,
		minutes,
		seconds
	};
}
/**
* Parses a date value from a string if the string matches the given date format.
*/
function defaultParseToDate(dateItems, dateFormat) {
	var _a;
	if (dateFormat === void 0) return;
	const { itemsCount, dayItem, monthItem, shortYearItem, longYearItem } = memoizedParseDateFormat(dateFormat);
	if (dateItems.length !== itemsCount) return;
	const day = Number(dateItems[dayItem]);
	if (!(Number.isFinite(day) && Number.isInteger(day))) return;
	const month = Number(dateItems[monthItem]);
	if (!(Number.isFinite(month) && Number.isInteger(month))) return;
	if (dateItems[longYearItem] && dateItems[shortYearItem]) return;
	const year = Number((_a = dateItems[longYearItem]) !== null && _a !== void 0 ? _a : dateItems[shortYearItem]);
	if (!(Number.isFinite(year) && Number.isInteger(year))) return;
	if (dateItems[longYearItem] && (year < 1e3 || year > 9999)) return;
	if (dateItems[shortYearItem] && (year < 0 || year > 99)) return;
	return {
		year,
		month,
		day
	};
}
/**
* Parses a time format string into a format object.
*/
function parseTimeFormat(timeFormat) {
	const formatLowercase = timeFormat.toLowerCase().trim();
	const items = (formatLowercase.endsWith("am/pm") ? formatLowercase.substring(0, formatLowercase.length - 5) : formatLowercase.endsWith("a/p") ? formatLowercase.substring(0, timeFormat.length - 3) : formatLowercase).trim().split(TIME_SEPARATOR);
	return {
		itemsCount: items.length,
		hourItem: items.indexOf("hh"),
		minuteItem: items.indexOf("mm"),
		secondItem: items.findIndex((item) => TIME_FORMAT_SECONDS_ITEM_REGEXP.test(item))
	};
}
/**
* Parses a date format string into a format object.
*/
function parseDateFormat(dateFormat) {
	const items = dateFormat.toLowerCase().trim().split(DATE_SEPARATOR_REGEXP);
	return {
		itemsCount: items.length,
		dayItem: items.indexOf("dd"),
		monthItem: items.indexOf("mm"),
		shortYearItem: items.indexOf("yy"),
		longYearItem: items.indexOf("yyyy")
	};
}
/**
* If this function returns false, the string is not parsable as a date time. Otherwise, it might be.
* This is a quick check that is used to avoid running the more expensive parsing operations.
*/
function doesItLookLikeADateTimeQuickCheck(text) {
	return QUICK_CHECK_REGEXP.test(text);
}
/**
* Function memoization for improved performance.
*/
function memoize(fn) {
	const memoizedResults = {};
	return (arg) => {
		const memoizedResult = memoizedResults[arg];
		if (memoizedResult !== void 0) return memoizedResult;
		const result = fn(arg);
		memoizedResults[arg] = result;
		return result;
	};
}
//#endregion
//#region ../../node_modules/hyperformula/es/DateTimeHelper.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var numDays = [
	31,
	28,
	31,
	30,
	31,
	30,
	31,
	31,
	30,
	31,
	30,
	31
];
var prefSumDays = [
	0,
	31,
	59,
	90,
	120,
	151,
	181,
	212,
	243,
	273,
	304,
	334
];
var SECONDS_PER_MINUTE = 60;
var MINUTES_PER_HOUR = 60;
var HOURS_PER_DAY = 24;
function instanceOfSimpleDate(obj) {
	if (obj && (typeof obj === "object" || typeof obj === "function")) return "year" in obj && typeof obj.year === "number" && "month" in obj && typeof obj.month === "number" && "day" in obj && typeof obj.day === "number";
	else return false;
}
function instanceOfSimpleTime(obj) {
	if (obj && (typeof obj === "object" || typeof obj === "function")) return "hours" in obj && typeof obj.hours === "number" && "minutes" in obj && typeof obj.minutes === "number" && "seconds" in obj && typeof obj.seconds === "number";
	else return false;
}
var maxDate = {
	year: 9999,
	month: 12,
	day: 31
};
var DateTimeHelper = class {
	constructor(config) {
		this.config = config;
		this.minDateAbsoluteValue = this.dateToNumberFromZero(config.nullDate);
		this.maxDateValue = this.dateToNumber(maxDate);
		this.leapYear1900 = config.leapYear1900;
		if (!this.leapYear1900 && 0 <= this.dateToNumber({
			year: 1900,
			month: 2,
			day: 28
		})) this.epochYearZero = this.numberToSimpleDate(2).year;
		else this.epochYearZero = this.numberToSimpleDate(1).year;
		this.parseDateTime = config.parseDateTime;
	}
	getWithinBounds(dayNumber) {
		return dayNumber <= this.maxDateValue && dayNumber >= 0 ? dayNumber : void 0;
	}
	dateStringToDateNumber(dateTimeString) {
		const { dateTime, dateFormat = "", timeFormat = "" } = this.parseDateTimeFromConfigFormats(dateTimeString);
		if (dateTime === void 0) return;
		if (instanceOfSimpleTime(dateTime)) if (instanceOfSimpleDate(dateTime)) return new DateTimeNumber(timeToNumber(dateTime) + this.dateToNumber(dateTime), dateFormat + " " + timeFormat);
		else return new TimeNumber(timeToNumber(dateTime), timeFormat);
		else if (instanceOfSimpleDate(dateTime)) return new DateNumber(this.dateToNumber(dateTime), dateFormat);
		else return 0;
	}
	parseDateTimeFromConfigFormats(dateTimeString) {
		return this.parseDateTimeFromFormats(dateTimeString, this.config.dateFormats, this.config.timeFormats);
	}
	getNullYear() {
		return this.config.nullYear;
	}
	getEpochYearZero() {
		return this.epochYearZero;
	}
	isValidDate(date) {
		if (isNaN(date.year) || isNaN(date.month) || isNaN(date.day)) return false;
		else if (date.day !== Math.round(date.day) || date.month !== Math.round(date.month) || date.year !== Math.round(date.year)) return false;
		else if (date.year < 1582) return false;
		else if (date.month < 1 || date.month > 12) return false;
		else if (date.day < 1) return false;
		else if (this.isLeapYear(date.year) && date.month === 2) return date.day <= 29;
		else return date.day <= numDays[date.month - 1];
	}
	dateToNumber(date) {
		return this.dateToNumberFromZero(date) - this.minDateAbsoluteValue;
	}
	relativeNumberToAbsoluteNumber(arg) {
		return arg + this.minDateAbsoluteValue - (this.leapYear1900 ? 1 : 0);
	}
	numberToSimpleDate(arg) {
		const dateNumber = Math.floor(arg) + this.minDateAbsoluteValue;
		let year = Math.floor(dateNumber / 365.2425);
		if (this.dateToNumberFromZero({
			year: year + 1,
			month: 1,
			day: 1
		}) <= dateNumber) year++;
		else if (this.dateToNumberFromZero({
			year: year - 1,
			month: 1,
			day: 1
		}) > dateNumber) year--;
		const dayOfYear = dateNumber - this.dateToNumberFromZero({
			year,
			month: 1,
			day: 1
		});
		const month = dayToMonth(dayOfYear - (this.isLeapYear(year) && dayOfYear >= 59 ? 1 : 0));
		const day = dayOfYear - prefSumDays[month] - (this.isLeapYear(year) && month > 1 ? 1 : 0);
		return {
			year,
			month: month + 1,
			day: day + 1
		};
	}
	numberToSimpleDateTime(arg) {
		const time = numberToSimpleTime(arg % 1);
		const carryDays = Math.floor(time.hours / HOURS_PER_DAY);
		time.hours = time.hours % HOURS_PER_DAY;
		const date = this.numberToSimpleDate(Math.floor(arg) + carryDays);
		return Object.assign(Object.assign({}, date), time);
	}
	leapYearsCount(year) {
		return Math.floor(year / 4) - Math.floor(year / 100) + Math.floor(year / 400) + (this.config.leapYear1900 && year >= 1900 ? 1 : 0);
	}
	daysInMonth(year, month) {
		if (this.isLeapYear(year) && month === 2) return 29;
		else return numDays[month - 1];
	}
	endOfMonth(date) {
		return {
			year: date.year,
			month: date.month,
			day: this.daysInMonth(date.year, date.month)
		};
	}
	toBasisUS(start, end) {
		if (start.day === 31) start.day = 30;
		if (start.day === 30 && end.day === 31) end.day = 30;
		if (start.month === 2 && start.day === this.daysInMonth(start.year, start.month)) {
			start.day = 30;
			if (end.month === 2 && end.day === this.daysInMonth(end.year, end.month)) end.day = 30;
		}
		return [start, end];
	}
	yearLengthForBasis(start, end) {
		if (start.year !== end.year) {
			if (start.year + 1 !== end.year || start.month < end.month || start.month === end.month && start.day < end.day) return (this.leapYearsCount(end.year) - this.leapYearsCount(start.year - 1)) / (end.year - start.year + 1) + 365;
			if (this.countLeapDays(end) !== this.countLeapDays({
				year: start.year,
				month: start.month,
				day: start.day - 1
			})) return 366;
			else return 365;
		}
		if (this.isLeapYear(start.year)) return 366;
		else return 365;
	}
	parseSingleFormat(dateString, dateFormat, timeFormat) {
		const dateTime = this.parseDateTime(dateString, dateFormat, timeFormat);
		if (instanceOfSimpleDate(dateTime)) {
			if (dateTime.year >= 0 && dateTime.year < 100) if (dateTime.year < this.getNullYear()) dateTime.year += 2e3;
			else dateTime.year += 1900;
			if (!this.isValidDate(dateTime)) return;
		}
		return dateTime;
	}
	parseDateTimeFromFormats(dateTimeString, dateFormats, timeFormats) {
		const dateFormatsArray = dateFormats.length === 0 ? [void 0] : dateFormats;
		const timeFormatsArray = timeFormats.length === 0 ? [void 0] : timeFormats;
		for (const dateFormat of dateFormatsArray) for (const timeFormat of timeFormatsArray) {
			const dateTime = this.parseSingleFormat(dateTimeString, dateFormat, timeFormat);
			if (dateTime !== void 0) return {
				dateTime,
				timeFormat,
				dateFormat
			};
		}
		return {};
	}
	countLeapDays(date) {
		if (date.month > 2 || date.month === 2 && date.day >= 29) return this.leapYearsCount(date.year);
		else return this.leapYearsCount(date.year - 1);
	}
	dateToNumberFromZero(date) {
		return 365 * date.year + prefSumDays[date.month - 1] + date.day - 1 + (date.month <= 2 ? this.leapYearsCount(date.year - 1) : this.leapYearsCount(date.year));
	}
	isLeapYear(year) {
		if (year % 4) return false;
		else if (year % 100) return true;
		else if (year % 400) return year === 1900 && this.config.leapYear1900;
		else return true;
	}
};
function dayToMonth(dayOfYear) {
	let month = 0;
	if (prefSumDays[month + 6] <= dayOfYear) month += 6;
	if (prefSumDays[month + 3] <= dayOfYear) month += 3;
	if (prefSumDays[month + 2] <= dayOfYear) month += 2;
	else if (prefSumDays[month + 1] <= dayOfYear) month += 1;
	return month;
}
function offsetMonth(date, offset) {
	const totalM = 12 * date.year + date.month - 1 + offset;
	return {
		year: Math.floor(totalM / 12),
		month: totalM % 12 + 1,
		day: date.day
	};
}
function truncateDayInMonth(date) {
	return {
		year: date.year,
		month: date.month,
		day: Math.min(date.day, numDays[date.month - 1])
	};
}
function roundToNearestSecond(arg) {
	return Math.round(arg * 3600 * 24) / (3600 * 24);
}
function roundToEpsilon(arg, epsilon = 1) {
	return Math.round(arg * epsilon) / epsilon;
}
function numberToSimpleTime(arg) {
	const argAsSeconds = arg * HOURS_PER_DAY * MINUTES_PER_HOUR * SECONDS_PER_MINUTE;
	const seconds = roundToEpsilon(argAsSeconds % SECONDS_PER_MINUTE, 1e5) % SECONDS_PER_MINUTE;
	const argAsMinutes = (argAsSeconds - seconds) / SECONDS_PER_MINUTE;
	const minutes = Math.round(argAsMinutes % MINUTES_PER_HOUR) % MINUTES_PER_HOUR;
	const argAsHours = (argAsMinutes - minutes) / MINUTES_PER_HOUR;
	return {
		hours: Math.round(argAsHours),
		minutes,
		seconds
	};
}
function timeToNumber(time) {
	return ((time.seconds / 60 + time.minutes) / 60 + time.hours) / 24;
}
function toBasisEU(date) {
	return {
		year: date.year,
		month: date.month,
		day: Math.min(30, date.day)
	};
}
//#endregion
//#region ../../node_modules/hyperformula/es/DependencyGraph/AddressMapping/ChooseAddressMappingPolicy.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var AlwaysDense = class {
	call() {
		return DenseStrategy;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/format/parser.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var dateFormatRegex = /(\\.|dd|DD|d|D|mm|MM|m|M|YYYY|YY|yyyy|yy|HH|hh|H|h|ss(\.(0+|s+))?|s|AM\/PM|am\/pm|A\/P|a\/p|\[mm]|\[MM]|\[hh]|\[HH])/g;
var numberFormatRegex = /(\\.|[#0]+(\.[#0]*)?)/g;
var TokenType;
(function(TokenType) {
	TokenType["FORMAT"] = "FORMAT";
	TokenType["FREE_TEXT"] = "FREE_TEXT";
})(TokenType || (TokenType = {}));
function formatToken(type, value) {
	return {
		type,
		value
	};
}
var FormatExpressionType;
(function(FormatExpressionType) {
	FormatExpressionType["DATE"] = "DATE";
	FormatExpressionType["NUMBER"] = "NUMBER";
	FormatExpressionType["STRING"] = "STRING";
})(FormatExpressionType || (FormatExpressionType = {}));
function matchDateFormat(str) {
	dateFormatRegex.lastIndex = 0;
	const tokens = [];
	let m;
	do {
		m = dateFormatRegex.exec(str);
		if (m !== null) tokens.push(m);
	} while (m);
	return tokens;
}
function matchNumberFormat(str) {
	numberFormatRegex.lastIndex = 0;
	const numberFormatToken = numberFormatRegex.exec(str);
	if (numberFormatToken !== null) return [numberFormatToken];
	else return [];
}
function createTokens(regexTokens, str) {
	const tokens = [];
	let start = 0;
	for (let i = 0; i < regexTokens.length; ++i) {
		const token = regexTokens[i];
		if (token.index !== start) {
			const beforeToken = str.substr(start, token.index - start);
			tokens.push(formatToken(TokenType.FREE_TEXT, beforeToken));
		}
		if (token[0].startsWith("\\")) tokens.push(formatToken(TokenType.FREE_TEXT, token[0]));
		else tokens.push(formatToken(TokenType.FORMAT, token[0]));
		start = token.index + token[0].length;
	}
	const lastToken = regexTokens[regexTokens.length - 1];
	if (lastToken.index + lastToken[0].length < str.length) {
		const afterLastToken = str.substr(lastToken.index + lastToken[0].length, str.length);
		tokens.push(formatToken(TokenType.FREE_TEXT, afterLastToken));
	}
	return tokens;
}
function parseForDateTimeFormat(str) {
	const dateFormatTokens = matchDateFormat(str);
	if (dateFormatTokens.every((elem) => isEscapeToken(elem))) return;
	else return {
		type: FormatExpressionType.DATE,
		tokens: createTokens(dateFormatTokens, str)
	};
}
function parseForNumberFormat(str) {
	const numberFormatTokens = matchNumberFormat(str);
	if (numberFormatTokens.every((elem) => isEscapeToken(elem))) return;
	else return {
		type: FormatExpressionType.NUMBER,
		tokens: createTokens(numberFormatTokens, str)
	};
}
function isEscapeToken(token) {
	return token[0].startsWith("\\");
}
//#endregion
//#region ../../node_modules/hyperformula/es/format/format.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
function format$1(value, formatArg, config, dateHelper) {
	const tryDateTime = config.stringifyDateTime(dateHelper.numberToSimpleDateTime(value), formatArg);
	if (tryDateTime !== void 0) return tryDateTime;
	const tryDuration = config.stringifyDuration(numberToSimpleTime(value), formatArg);
	if (tryDuration !== void 0) return tryDuration;
	const expression = parseForNumberFormat(formatArg);
	if (expression !== void 0) return numberFormat(expression.tokens, value);
	return formatArg;
}
function padLeft(number, size) {
	let result = `${number}`;
	while (result.length < size) result = "0" + result;
	return result;
}
function padRight(number, size) {
	let result = `${number}`;
	while (result.length < size) result = result + "0";
	return result;
}
function countChars(text, char) {
	return text.split(char).length - 1;
}
function numberFormat(tokens, value) {
	let result = "";
	for (let i = 0; i < tokens.length; ++i) {
		const token = tokens[i];
		if (token.type === TokenType.FREE_TEXT) {
			result += token.value;
			continue;
		}
		const tokenParts = token.value.split(".");
		const integerFormat = tokenParts[0];
		const decimalFormat = tokenParts[1] || "";
		const separator = tokenParts[1] ? "." : "";
		const valueParts = Number(value.toFixed(decimalFormat.length)).toString().split(".");
		let integerPart = valueParts[0] || "";
		let decimalPart = valueParts[1] || "";
		if (integerFormat.length > integerPart.length) {
			const padSizeInteger = countChars(integerFormat.substr(0, integerFormat.length - integerPart.length), "0");
			integerPart = padLeft(integerPart, padSizeInteger + integerPart.length);
		}
		const padSizeDecimal = countChars(decimalFormat.substr(decimalPart.length, decimalFormat.length - decimalPart.length), "0");
		decimalPart = padRight(decimalPart, padSizeDecimal + decimalPart.length);
		result += integerPart + separator + decimalPart;
	}
	return result;
}
function defaultStringifyDuration(time, formatArg) {
	const expression = parseForDateTimeFormat(formatArg);
	if (expression === void 0) return;
	const tokens = expression.tokens;
	let result = "";
	for (const token of tokens) {
		if (token.type === TokenType.FREE_TEXT) {
			result += token.value;
			continue;
		}
		switch (token.value.toLowerCase()) {
			case "h":
			case "hh":
				result += padLeft(time.hours, token.value.length);
				time.hours = 0;
				break;
			case "[hh]":
				result += padLeft(time.hours, token.value.length - 2);
				time.hours = 0;
				break;
			case "m":
			case "mm":
				result += padLeft(time.minutes, token.value.length);
				time.minutes = 0;
				break;
			case "[mm]":
				result += padLeft(time.minutes + 60 * time.hours, token.value.length - 2);
				time.minutes = 0;
				time.hours = 0;
				break;
			case "s":
			case "ss":
				result += padLeft(Math.floor(time.seconds), token.value.length);
				break;
			default:
				if (TIME_FORMAT_SECONDS_ITEM_REGEXP.test(token.value)) {
					const fractionOfSecondPrecision = Math.max(token.value.length - 3, 0);
					result += `${time.seconds < 10 ? "0" : ""}${Math.floor(time.seconds * Math.pow(10, fractionOfSecondPrecision)) / Math.pow(10, fractionOfSecondPrecision)}`;
					continue;
				}
				return;
		}
	}
	return result;
}
function defaultStringifyDateTime(dateTime, formatArg) {
	const expression = parseForDateTimeFormat(formatArg);
	if (expression === void 0) return;
	const tokens = expression.tokens;
	let result = "";
	let minutes = false;
	const ampm = tokens.some((token) => token.type === TokenType.FORMAT && (token.value === "a/p" || token.value === "A/P" || token.value === "am/pm" || token.value === "AM/PM"));
	for (let i = 0; i < tokens.length; i++) {
		const token = tokens[i];
		if (token.type === TokenType.FREE_TEXT) {
			result += token.value;
			continue;
		}
		switch (token.value.toLowerCase()) {
			case "h":
			case "hh":
				minutes = true;
				result += padLeft(ampm ? (dateTime.hours + 11) % 12 + 1 : dateTime.hours, token.value.length);
				break;
			case "d":
			case "dd":
				result += padLeft(dateTime.day, token.value.length);
				break;
			case "s":
			case "ss":
				result += padLeft(Math.floor(dateTime.seconds), token.value.length);
				break;
			case "m":
			case "mm":
				if (i + 1 < tokens.length && tokens[i + 1].value.startsWith(":")) minutes = true;
				if (minutes) result += padLeft(dateTime.minutes, token.value.length);
				else result += padLeft(dateTime.month, token.value.length);
				minutes = true;
				break;
			case "yy":
				result += padLeft(dateTime.year % 100, token.value.length);
				break;
			case "yyyy":
				result += dateTime.year;
				break;
			case "am/pm":
			case "a/p": {
				const [am, pm] = token.value.split("/");
				result += dateTime.hours < 12 ? am : pm;
				break;
			}
			default:
				if (TIME_FORMAT_SECONDS_ITEM_REGEXP.test(token.value)) {
					const fractionOfSecondPrecision = token.value.length - 3;
					result += `${dateTime.seconds < 10 ? "0" : ""}${Math.floor(dateTime.seconds * Math.pow(10, fractionOfSecondPrecision)) / Math.pow(10, fractionOfSecondPrecision)}`;
					continue;
				}
				return;
		}
	}
	return result;
}
//#endregion
//#region ../../node_modules/hyperformula/es/helpers/licenseKeyHelper.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var _rl = "length";
var _hd = (v) => parseInt(v, 16);
var _pi = (v) => parseInt(v, 10);
var _nm = (v) => (v + "").replace(/\-/g, "");
var _ss = (v, s, l) => v["substr"](s, l);
var _cp = (v) => v["codePointAt"](0) - 65;
function extractTime(v) {
	return _nm(v)[_rl] === 25 ? _hd(_ss(_nm(v), _hd("12"), _cp("F"))) / (_hd(_ss(_nm(v), _cp("C"), _cp("Y") >> 4)) || (~~![][_rl] << 3) + 1) : 0;
}
function checkKeySchema(v) {
	v = (v + "").replace(/\-/g, "");
	if (v[_rl] !== _cp("Z")) return false;
	let sp = 0;
	return [
		[0, _cp("G") + 1],
		[_cp("H"), _cp("H") - 1],
		[_cp("G") + _cp("H"), _cp("G")]
	].reduce((e, [a, b], c) => {
		e |= (_pi(`${_pi(_hd(_ss(v, ...[sp + a - (c === 0 ? 0 : 2), b + (!c ? 0 : 2)])) + (_hd(_ss(v, ...[sp + a + b, 2])) + []).padStart(2, "0"))}`) % 97 || 2) >> 1;
		sp += 2;
		return e;
	}, _cp("A")) === 0;
}
//#endregion
//#region ../../node_modules/hyperformula/es/helpers/licenseKeyValidator.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* List of all not valid messages which may occur.
*/
var consoleMessages = {
	invalid: () => "The license key for HyperFormula is invalid.",
	expired: ({ keyValidityDate }) => `The license key for HyperFormula expired on ${keyValidityDate}, and is not valid for the installed version.`,
	missing: () => "The license key for HyperFormula is missing."
};
var _notified = false;
/**
* Checks if the provided license key is grammatically valid or not expired.
*
* @param {string} licenseKey The license key to check.
* @returns {LicenseKeyValidityState} Returns the checking state.
*/
function checkLicenseKeyValidity(licenseKey) {
	const messageDescriptor = {
		template: "missing",
		vars: {}
	};
	if (licenseKey === "gpl-v3" || licenseKey === "internal-use-in-handsontable") messageDescriptor.template = "valid";
	else if (typeof licenseKey === "string" && checkKeySchema(licenseKey)) {
		const [day, month, year] = "19/02/2026".split("/");
		const releaseDays = Math.floor((/* @__PURE__ */ new Date(`${month}/${day}/${year}`)).getTime() / 864e5);
		const keyValidityDays = extractTime(licenseKey);
		messageDescriptor.vars.keyValidityDate = formatDate(/* @__PURE__ */ new Date((keyValidityDays + 1) * 864e5));
		if (releaseDays > keyValidityDays) messageDescriptor.template = "expired";
		else messageDescriptor.template = "valid";
	} else if (licenseKey !== "") messageDescriptor.template = "invalid";
	if (!_notified && messageDescriptor.template !== "valid") {
		console.warn(consoleMessages[messageDescriptor.template](messageDescriptor.vars));
		_notified = true;
	}
	return messageDescriptor.template;
}
/**
* Formats a Date instance to hard-coded format MMMM DD, YYYY.
*
* @param {Date} date The date to format.
* @returns {string}
*/
function formatDate(date) {
	return `${[
		"January",
		"February",
		"March",
		"April",
		"May",
		"June",
		"July",
		"August",
		"September",
		"October",
		"November",
		"December"
	][date.getMonth()]} ${date.getDate()}, ${date.getFullYear()}`;
}
//#endregion
//#region ../../node_modules/hyperformula/es/CellContentParser.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var CellContent;
(function(CellContent) {
	class Number {
		constructor(value) {
			this.value = value;
			this.value = cloneNumber(this.value, fixNegativeZero(getRawValue(this.value)));
		}
	}
	CellContent.Number = Number;
	class String {
		constructor(value) {
			this.value = value;
		}
	}
	CellContent.String = String;
	class Boolean {
		constructor(value) {
			this.value = value;
		}
	}
	CellContent.Boolean = Boolean;
	class Empty {
		static getSingletonInstance() {
			if (!Empty.instance) Empty.instance = new Empty();
			return Empty.instance;
		}
	}
	CellContent.Empty = Empty;
	class Formula {
		constructor(formula) {
			this.formula = formula;
		}
	}
	CellContent.Formula = Formula;
	class Error {
		constructor(errorType, message) {
			this.value = new CellError(errorType, message);
		}
	}
	CellContent.Error = Error;
})(CellContent || (CellContent = {}));
/**
* Checks whether string looks like formula or not.
*
* @param text - formula
*/
function isFormula(text) {
	return text.startsWith("=");
}
function isBoolean(text) {
	const tl = text.toLowerCase();
	return tl === "true" || tl === "false";
}
function isError(text, errorMapping) {
	const upperCased = text.toUpperCase();
	return /#[A-Za-z0-9\/]+[?!]?/.test(upperCased) && Object.prototype.hasOwnProperty.call(errorMapping, upperCased);
}
var CellContentParser = class {
	constructor(config, dateHelper, numberLiteralsHelper) {
		this.config = config;
		this.dateHelper = dateHelper;
		this.numberLiteralsHelper = numberLiteralsHelper;
	}
	parse(content) {
		if (content === void 0 || content === null) return CellContent.Empty.getSingletonInstance();
		else if (typeof content === "number") if (isNumberOverflow(content)) return new CellContent.Error(ErrorType.NUM, ErrorMessage.ValueLarge);
		else return new CellContent.Number(content);
		else if (typeof content === "boolean") return new CellContent.Boolean(content);
		else if (content instanceof Date) {
			const val = this.dateHelper.dateToNumber({
				day: content.getDate(),
				month: content.getMonth() + 1,
				year: content.getFullYear()
			}) + timeToNumber({
				hours: content.getHours(),
				minutes: content.getMinutes(),
				seconds: content.getSeconds() + content.getMilliseconds() / 1e3
			});
			if (val < 0) return new CellContent.Error(ErrorType.NUM, ErrorMessage.DateBounds);
			if (val % 1 === 0) return new CellContent.Number(new DateNumber(val, "Date()"));
			else if (val < 1) return new CellContent.Number(new TimeNumber(val, "Date()"));
			else return new CellContent.Number(new DateTimeNumber(val, "Date()"));
		} else if (typeof content === "string") if (isBoolean(content)) return new CellContent.Boolean(content.toLowerCase() === "true");
		else if (isFormula(content)) return new CellContent.Formula(content);
		else if (isError(content, this.config.errorMapping)) return new CellContent.Error(this.config.errorMapping[content.toUpperCase()]);
		else {
			let trimmedContent = content.trim();
			let mode = 0;
			let currency;
			if (trimmedContent.endsWith("%")) {
				mode = 1;
				trimmedContent = trimmedContent.slice(0, trimmedContent.length - 1);
			} else {
				const res = this.currencyMatcher(trimmedContent);
				if (res !== void 0) {
					mode = 2;
					[currency, trimmedContent] = res;
				}
			}
			const val = this.numberLiteralsHelper.numericStringToMaybeNumber(trimmedContent);
			if (val !== void 0) {
				let parseAsNum;
				if (mode === 1) parseAsNum = new PercentNumber(val / 100);
				else if (mode === 2) parseAsNum = new CurrencyNumber(val, currency);
				else parseAsNum = val;
				return new CellContent.Number(parseAsNum);
			}
			const parsedDateNumber = this.dateHelper.dateStringToDateNumber(trimmedContent);
			if (parsedDateNumber !== void 0) return new CellContent.Number(parsedDateNumber);
			else return new CellContent.String(content.startsWith("'") ? content.slice(1) : content);
		}
		else throw new UnableToParseError(content);
	}
	currencyMatcher(token) {
		for (const currency of this.config.currencySymbol) {
			if (token.startsWith(currency)) return [currency, token.slice(currency.length)];
			if (token.endsWith(currency)) return [currency, token.slice(0, token.length - currency.length)];
		}
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/ClipboardOperations.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var ClipboardOperationType;
(function(ClipboardOperationType) {
	ClipboardOperationType[ClipboardOperationType["COPY"] = 0] = "COPY";
	ClipboardOperationType[ClipboardOperationType["CUT"] = 1] = "CUT";
})(ClipboardOperationType || (ClipboardOperationType = {}));
var ClipboardCellType;
(function(ClipboardCellType) {
	ClipboardCellType[ClipboardCellType["VALUE"] = 0] = "VALUE";
	ClipboardCellType[ClipboardCellType["EMPTY"] = 1] = "EMPTY";
	ClipboardCellType[ClipboardCellType["FORMULA"] = 2] = "FORMULA";
	ClipboardCellType[ClipboardCellType["PARSING_ERROR"] = 3] = "PARSING_ERROR";
})(ClipboardCellType || (ClipboardCellType = {}));
var Clipboard = class {
	constructor(sourceLeftCorner, width, height, type, content) {
		this.sourceLeftCorner = sourceLeftCorner;
		this.width = width;
		this.height = height;
		this.type = type;
		this.content = content;
	}
	*getContent(leftCorner) {
		if (this.content === void 0) return;
		else for (let y = 0; y < this.height; ++y) for (let x = 0; x < this.width; ++x) yield [simpleCellAddress(leftCorner.sheet, leftCorner.col + x, leftCorner.row + y), this.content[y][x]];
	}
};
var ClipboardOperations = class {
	constructor(config, dependencyGraph, operations) {
		this.dependencyGraph = dependencyGraph;
		this.operations = operations;
		this.maxRows = config.maxRows;
		this.maxColumns = config.maxColumns;
	}
	cut(leftCorner, width, height) {
		this.clipboard = new Clipboard(leftCorner, width, height, ClipboardOperationType.CUT);
	}
	copy(leftCorner, width, height) {
		const content = [];
		for (let y = 0; y < height; ++y) {
			content[y] = [];
			for (let x = 0; x < width; ++x) {
				const clipboardCell = this.operations.getClipboardCell(simpleCellAddress(leftCorner.sheet, leftCorner.col + x, leftCorner.row + y));
				content[y].push(clipboardCell);
			}
		}
		this.clipboard = new Clipboard(leftCorner, width, height, ClipboardOperationType.COPY, content);
	}
	abortCut() {
		if (this.clipboard && this.clipboard.type === ClipboardOperationType.CUT) this.clear();
	}
	clear() {
		this.clipboard = void 0;
	}
	ensureItIsPossibleToCopyPaste(destinationLeftCorner) {
		if (this.clipboard === void 0) return;
		if (isColOrRowInvalid(destinationLeftCorner) || !this.dependencyGraph.sheetMapping.hasSheetWithId(destinationLeftCorner.sheet)) throw new InvalidArgumentsError("a valid target address.");
		const targetRange = AbsoluteCellRange.spanFrom(destinationLeftCorner, this.clipboard.width, this.clipboard.height);
		if (targetRange.exceedsSheetSizeLimits(this.maxColumns, this.maxRows)) throw new SheetSizeLimitExceededError();
		if (this.dependencyGraph.arrayMapping.isFormulaArrayInRange(targetRange)) throw new Error("It is not possible to paste onto an array");
	}
	isCutClipboard() {
		return this.clipboard !== void 0 && this.clipboard.type === ClipboardOperationType.CUT;
	}
	isCopyClipboard() {
		return this.clipboard !== void 0 && this.clipboard.type === ClipboardOperationType.COPY;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/dependencyTransformers/Transformer.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var Transformer = class {
	performEagerTransformations(graph, parser) {
		for (const node of graph.arrayFormulaNodes()) {
			const [newAst, newAddress] = this.transformSingleAst(node.getFormula(graph.lazilyTransformingAstService), node.getAddress(graph.lazilyTransformingAstService));
			const cachedAst = parser.rememberNewAst(newAst);
			node.setFormula(cachedAst);
			node.setAddress(newAddress);
		}
	}
	transformSingleAst(ast, address) {
		return [this.transformAst(ast, address), this.fixNodeAddress(address)];
	}
	transformAst(ast, address) {
		switch (ast.type) {
			case AstNodeType.CELL_REFERENCE: return this.transformCellReferenceAst(ast, address);
			case AstNodeType.CELL_RANGE: return this.transformCellRangeAst(ast, address);
			case AstNodeType.COLUMN_RANGE: return this.transformColumnRangeAst(ast, address);
			case AstNodeType.ROW_RANGE: return this.transformRowRangeAst(ast, address);
			case AstNodeType.EMPTY:
			case AstNodeType.ERROR:
			case AstNodeType.NUMBER:
			case AstNodeType.NAMED_EXPRESSION:
			case AstNodeType.ERROR_WITH_RAW_INPUT:
			case AstNodeType.STRING: return ast;
			case AstNodeType.PERCENT_OP:
			case AstNodeType.MINUS_UNARY_OP:
			case AstNodeType.PLUS_UNARY_OP: return Object.assign(Object.assign({}, ast), { value: this.transformAst(ast.value, address) });
			case AstNodeType.FUNCTION_CALL: return Object.assign(Object.assign({}, ast), {
				procedureName: ast.procedureName,
				args: ast.args.map((arg) => this.transformAst(arg, address))
			});
			case AstNodeType.PARENTHESIS: return Object.assign(Object.assign({}, ast), { expression: this.transformAst(ast.expression, address) });
			case AstNodeType.ARRAY: return Object.assign(Object.assign({}, ast), { args: ast.args.map((row) => row.map((val) => this.transformAst(val, address))) });
			default: return Object.assign(Object.assign({}, ast), {
				left: this.transformAst(ast.left, address),
				right: this.transformAst(ast.right, address)
			});
		}
	}
	transformCellReferenceAst(ast, formulaAddress) {
		const newCellAddress = this.transformCellAddress(ast.reference, formulaAddress);
		if (newCellAddress instanceof CellAddress) return Object.assign(Object.assign({}, ast), { reference: newCellAddress });
		else if (newCellAddress === ErrorType.REF) return buildCellErrorAst(new CellError(ErrorType.REF));
		else return ast;
	}
	transformCellRangeAst(ast, formulaAddress) {
		const newRange = this.transformCellRange(ast.start, ast.end, formulaAddress);
		if (Array.isArray(newRange)) return Object.assign(Object.assign({}, ast), {
			start: newRange[0],
			end: newRange[1]
		});
		else if (newRange === ErrorType.REF) return buildCellErrorAst(new CellError(ErrorType.REF));
		else return ast;
	}
	transformColumnRangeAst(ast, formulaAddress) {
		const newRange = this.transformColumnRange(ast.start, ast.end, formulaAddress);
		if (Array.isArray(newRange)) return Object.assign(Object.assign({}, ast), {
			start: newRange[0],
			end: newRange[1]
		});
		else if (newRange === ErrorType.REF) return buildCellErrorAst(new CellError(ErrorType.REF));
		else return ast;
	}
	transformRowRangeAst(ast, formulaAddress) {
		const newRange = this.transformRowRange(ast.start, ast.end, formulaAddress);
		if (Array.isArray(newRange)) return Object.assign(Object.assign({}, ast), {
			start: newRange[0],
			end: newRange[1]
		});
		else if (newRange === ErrorType.REF) return buildCellErrorAst(new CellError(ErrorType.REF));
		else return ast;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/dependencyTransformers/AddColumnsTransformer.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var AddColumnsTransformer = class extends Transformer {
	constructor(columnsSpan) {
		super();
		this.columnsSpan = columnsSpan;
	}
	get sheet() {
		return this.columnsSpan.sheet;
	}
	isIrreversible() {
		return false;
	}
	transformRowRangeAst(ast, _formulaAddress) {
		return ast;
	}
	transformCellRange(start, end, formulaAddress) {
		return this.transformRange(start, end, formulaAddress);
	}
	transformRowRange(_start, _end, _formulaAddress) {
		throw Error("Not implemented");
	}
	transformColumnRange(start, end, formulaAddress) {
		return this.transformRange(start, end, formulaAddress);
	}
	transformCellAddress(dependencyAddress, formulaAddress) {
		const absoluteDependencySheet = absoluteSheetReference(dependencyAddress, formulaAddress);
		if (absoluteDependencySheet !== this.columnsSpan.sheet && formulaAddress.sheet !== this.columnsSpan.sheet) return false;
		const absolutizedDependencyAddress = dependencyAddress.toSimpleColumnAddress(formulaAddress);
		if (absoluteDependencySheet === this.columnsSpan.sheet && formulaAddress.sheet !== this.columnsSpan.sheet) if (this.columnsSpan.columnStart <= absolutizedDependencyAddress.col) return dependencyAddress.shiftedByColumns(this.columnsSpan.numberOfColumns);
		else return false;
		if (formulaAddress.sheet === this.columnsSpan.sheet && absoluteDependencySheet !== this.columnsSpan.sheet) {
			if (dependencyAddress.isColumnAbsolute()) return false;
			if (formulaAddress.col < this.columnsSpan.columnStart) return false;
			return dependencyAddress.shiftedByColumns(-this.columnsSpan.numberOfColumns);
		}
		if (dependencyAddress.isColumnAbsolute()) if (dependencyAddress.col < this.columnsSpan.columnStart) return false;
		else return dependencyAddress.shiftedByColumns(this.columnsSpan.numberOfColumns);
		else if (dependencyAddress.toSimpleColumnAddress(formulaAddress).col < this.columnsSpan.columnStart) if (formulaAddress.col < this.columnsSpan.columnStart) return false;
		else return dependencyAddress.shiftedByColumns(-this.columnsSpan.numberOfColumns);
		else if (formulaAddress.col < this.columnsSpan.columnStart) return dependencyAddress.shiftedByColumns(this.columnsSpan.numberOfColumns);
		else return false;
	}
	fixNodeAddress(address) {
		if (this.columnsSpan.sheet === address.sheet && this.columnsSpan.columnStart <= address.col) return Object.assign(Object.assign({}, address), { col: address.col + this.columnsSpan.numberOfColumns });
		else return address;
	}
	transformRange(start, end, formulaAddress) {
		const newStart = this.transformCellAddress(start, formulaAddress);
		const newEnd = this.transformCellAddress(end, formulaAddress);
		if (newStart === ErrorType.REF || newEnd === ErrorType.REF) return ErrorType.REF;
		else if (newStart || newEnd) return [newStart || start, newEnd || end];
		else return false;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/dependencyTransformers/AddRowsTransformer.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var AddRowsTransformer = class extends Transformer {
	constructor(rowsSpan) {
		super();
		this.rowsSpan = rowsSpan;
	}
	get sheet() {
		return this.rowsSpan.sheet;
	}
	isIrreversible() {
		return false;
	}
	transformColumnRangeAst(ast, _formulaAddress) {
		return ast;
	}
	transformCellRange(start, end, formulaAddress) {
		return this.transformRange(start, end, formulaAddress);
	}
	transformRowRange(start, end, formulaAddress) {
		return this.transformRange(start, end, formulaAddress);
	}
	transformColumnRange(_start, _end, _formulaAddress) {
		throw Error("Not implemented");
	}
	transformCellAddress(dependencyAddress, formulaAddress) {
		const absoluteDependencySheet = absoluteSheetReference(dependencyAddress, formulaAddress);
		if (absoluteDependencySheet !== this.rowsSpan.sheet && formulaAddress.sheet !== this.rowsSpan.sheet) return false;
		const absolutizedDependencyAddress = dependencyAddress.toSimpleRowAddress(formulaAddress);
		if (absoluteDependencySheet === this.rowsSpan.sheet && formulaAddress.sheet !== this.rowsSpan.sheet) if (this.rowsSpan.rowStart <= absolutizedDependencyAddress.row) return dependencyAddress.shiftedByRows(this.rowsSpan.numberOfRows);
		else return false;
		if (formulaAddress.sheet === this.rowsSpan.sheet && absoluteDependencySheet !== this.rowsSpan.sheet) {
			if (dependencyAddress.isRowAbsolute()) return false;
			if (formulaAddress.row < this.rowsSpan.rowStart) return false;
			return dependencyAddress.shiftedByRows(-this.rowsSpan.numberOfRows);
		}
		if (dependencyAddress.isRowAbsolute()) if (dependencyAddress.row < this.rowsSpan.rowStart) return false;
		else return dependencyAddress.shiftedByRows(this.rowsSpan.numberOfRows);
		else if (absolutizedDependencyAddress.row < this.rowsSpan.rowStart) if (formulaAddress.row < this.rowsSpan.rowStart) return false;
		else return dependencyAddress.shiftedByRows(-this.rowsSpan.numberOfRows);
		else if (formulaAddress.row < this.rowsSpan.rowStart) return dependencyAddress.shiftedByRows(this.rowsSpan.numberOfRows);
		else return false;
	}
	fixNodeAddress(address) {
		if (this.rowsSpan.sheet === address.sheet && this.rowsSpan.rowStart <= address.row) return Object.assign(Object.assign({}, address), { row: address.row + this.rowsSpan.numberOfRows });
		else return address;
	}
	transformRange(start, end, formulaAddress) {
		const newStart = this.transformCellAddress(start, formulaAddress);
		const newEnd = this.transformCellAddress(end, formulaAddress);
		if (newStart === ErrorType.REF || newEnd === ErrorType.REF) return ErrorType.REF;
		else if (newStart || newEnd) return [newStart || start, newEnd || end];
		else return false;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/dependencyTransformers/CleanOutOfScopeDependenciesTransformer.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var CleanOutOfScopeDependenciesTransformer = class extends Transformer {
	constructor(sheet) {
		super();
		this.sheet = sheet;
	}
	isIrreversible() {
		return true;
	}
	fixNodeAddress(address) {
		return address;
	}
	transformCellAddress(dependencyAddress, formulaAddress) {
		return dependencyAddress.isInvalid(formulaAddress) ? ErrorType.REF : false;
	}
	transformCellRange(start, end, formulaAddress) {
		return start.isInvalid(formulaAddress) || end.isInvalid(formulaAddress) ? ErrorType.REF : false;
	}
	transformColumnRange(start, end, formulaAddress) {
		return start.isInvalid(formulaAddress) || end.isInvalid(formulaAddress) ? ErrorType.REF : false;
	}
	transformRowRange(start, end, formulaAddress) {
		return start.isInvalid(formulaAddress) || end.isInvalid(formulaAddress) ? ErrorType.REF : false;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/dependencyTransformers/MoveCellsTransformer.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var MoveCellsTransformer = class extends Transformer {
	constructor(sourceRange, toRight, toBottom, toSheet) {
		super();
		this.sourceRange = sourceRange;
		this.toRight = toRight;
		this.toBottom = toBottom;
		this.toSheet = toSheet;
		this.dependentFormulaTransformer = new DependentFormulaTransformer(sourceRange, toRight, toBottom, toSheet);
	}
	get sheet() {
		return this.sourceRange.sheet;
	}
	isIrreversible() {
		return true;
	}
	transformSingleAst(ast, address) {
		if (this.sourceRange.addressInRange(address)) return [this.transformAst(ast, address), this.fixNodeAddress(address)];
		else return this.dependentFormulaTransformer.transformSingleAst(ast, address);
	}
	fixNodeAddress(address) {
		return simpleCellAddress(this.toSheet, address.col + this.toRight, address.row + this.toBottom);
	}
	transformCellAddress(dependencyAddress, formulaAddress) {
		return this.transformAddress(dependencyAddress, formulaAddress);
	}
	transformCellRange(start, end, formulaAddress) {
		return this.transformRange(start, end, formulaAddress);
	}
	transformColumnRange(start, end, formulaAddress) {
		return this.transformRange(start, end, formulaAddress);
	}
	transformRowRange(start, end, formulaAddress) {
		return this.transformRange(start, end, formulaAddress);
	}
	transformAddress(dependencyAddress, formulaAddress) {
		const sourceRange = this.sourceRange;
		if (dependencyAddress instanceof CellAddress) {
			const absoluteDependencyAddress = dependencyAddress.toSimpleCellAddress(formulaAddress);
			if (sourceRange.addressInRange(absoluteDependencyAddress)) return dependencyAddress.shiftAbsoluteDimensions(this.toRight, this.toBottom);
		}
		return dependencyAddress.shiftRelativeDimensions(-this.toRight, -this.toBottom);
	}
	transformRange(start, end, formulaAddress) {
		const sourceRange = this.sourceRange;
		if (start instanceof CellAddress && end instanceof CellAddress) {
			const absoluteStart = start.toSimpleCellAddress(formulaAddress);
			const absoluteEnd = end.toSimpleCellAddress(formulaAddress);
			if (sourceRange.addressInRange(absoluteStart) && sourceRange.addressInRange(absoluteEnd)) return [start.shiftAbsoluteDimensions(this.toRight, this.toBottom), end.shiftAbsoluteDimensions(this.toRight, this.toBottom)];
		}
		return [start.shiftRelativeDimensions(-this.toRight, -this.toBottom), end.shiftRelativeDimensions(-this.toRight, -this.toBottom)];
	}
};
var DependentFormulaTransformer = class extends Transformer {
	constructor(sourceRange, toRight, toBottom, toSheet) {
		super();
		this.sourceRange = sourceRange;
		this.toRight = toRight;
		this.toBottom = toBottom;
		this.toSheet = toSheet;
	}
	get sheet() {
		return this.sourceRange.sheet;
	}
	isIrreversible() {
		return true;
	}
	fixNodeAddress(address) {
		return address;
	}
	transformCellAddress(dependencyAddress, formulaAddress) {
		if (this.shouldMove(dependencyAddress, formulaAddress)) return dependencyAddress.moved(this.toSheet, this.toRight, this.toBottom);
		return false;
	}
	transformCellRange(start, end, formulaAddress) {
		return this.transformRange(start, end, formulaAddress);
	}
	transformColumnRange(start, end, formulaAddress) {
		return this.transformRange(start, end, formulaAddress);
	}
	transformRowRange(start, end, formulaAddress) {
		return this.transformRange(start, end, formulaAddress);
	}
	shouldMove(dependencyAddress, formulaAddress) {
		if (dependencyAddress instanceof CellAddress) return this.sourceRange.addressInRange(dependencyAddress.toSimpleCellAddress(formulaAddress));
		else if (dependencyAddress instanceof RowAddress) return this.sourceRange.rowInRange(dependencyAddress.toSimpleRowAddress(formulaAddress)) && !this.sourceRange.isFinite();
		else return this.sourceRange.columnInRange(dependencyAddress.toSimpleColumnAddress(formulaAddress)) && !this.sourceRange.isFinite();
	}
	transformRange(start, end, formulaAddress) {
		const newStart = this.transformCellAddress(start, formulaAddress);
		const newEnd = this.transformCellAddress(end, formulaAddress);
		if (newStart && newEnd) return [newStart, newEnd];
		return false;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/dependencyTransformers/RemoveColumnsTransformer.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var RemoveColumnsTransformer = class extends Transformer {
	constructor(columnsSpan) {
		super();
		this.columnsSpan = columnsSpan;
	}
	get sheet() {
		return this.columnsSpan.sheet;
	}
	isIrreversible() {
		return true;
	}
	transformRowRangeAst(ast, _formulaAddress) {
		return ast;
	}
	transformCellRange(start, end, formulaAddress) {
		return this.transformRange(start, end, formulaAddress);
	}
	transformRowRange(_start, _end, _formulaAddress) {
		throw Error("Not implemented");
	}
	transformColumnRange(start, end, formulaAddress) {
		return this.transformRange(start, end, formulaAddress);
	}
	transformCellAddress(dependencyAddress, formulaAddress) {
		const absoluteDependencySheet = absoluteSheetReference(dependencyAddress, formulaAddress);
		if (this.columnsSpan.sheet !== formulaAddress.sheet && this.columnsSpan.sheet !== absoluteDependencySheet) return false;
		if (this.columnsSpan.sheet !== formulaAddress.sheet && this.columnsSpan.sheet === absoluteDependencySheet) {
			const absoluteDependencyAddress = dependencyAddress.toSimpleColumnAddress(formulaAddress);
			if (absoluteDependencyAddress.col < this.columnsSpan.columnStart) return false;
			else if (absoluteDependencyAddress.col > this.columnsSpan.columnEnd) return dependencyAddress.shiftedByColumns(-this.columnsSpan.numberOfColumns);
		}
		if (this.columnsSpan.sheet === formulaAddress.sheet && this.columnsSpan.sheet !== absoluteDependencySheet) {
			if (dependencyAddress.isColumnAbsolute()) return false;
			else if (formulaAddress.col < this.columnsSpan.columnStart) return false;
			else if (formulaAddress.col > this.columnsSpan.columnEnd) return dependencyAddress.shiftedByColumns(this.columnsSpan.numberOfColumns);
		}
		if (this.columnsSpan.sheet === formulaAddress.sheet && this.columnsSpan.sheet === absoluteDependencySheet) if (dependencyAddress.isColumnAbsolute()) {
			if (dependencyAddress.col < this.columnsSpan.columnStart) return false;
			else if (dependencyAddress.col > this.columnsSpan.columnEnd) return dependencyAddress.shiftedByColumns(-this.columnsSpan.numberOfColumns);
		} else {
			const absoluteDependencyAddress = dependencyAddress.toSimpleColumnAddress(formulaAddress);
			if (absoluteDependencyAddress.col < this.columnsSpan.columnStart) {
				if (formulaAddress.col < this.columnsSpan.columnStart) return false;
				else if (formulaAddress.col > this.columnsSpan.columnEnd) return dependencyAddress.shiftedByColumns(this.columnsSpan.numberOfColumns);
			} else if (absoluteDependencyAddress.col > this.columnsSpan.columnEnd) {
				if (formulaAddress.col < this.columnsSpan.columnStart) return dependencyAddress.shiftedByColumns(-this.columnsSpan.numberOfColumns);
				else if (formulaAddress.col > this.columnsSpan.columnEnd) return false;
			}
		}
		return ErrorType.REF;
	}
	fixNodeAddress(address) {
		if (this.columnsSpan.sheet === address.sheet && this.columnsSpan.columnStart <= address.col) return Object.assign(Object.assign({}, address), { col: address.col - this.columnsSpan.numberOfColumns });
		else return address;
	}
	transformRange(start, end, formulaAddress) {
		const startSheet = absoluteSheetReference(start, formulaAddress);
		let actualStart = start;
		let actualEnd = end;
		if (this.columnsSpan.sheet === startSheet) {
			const startSCA = start.toSimpleColumnAddress(formulaAddress);
			const endSCA = end.toSimpleColumnAddress(formulaAddress);
			if (this.columnsSpan.columnStart <= startSCA.col && this.columnsSpan.columnEnd >= endSCA.col) return ErrorType.REF;
			if (startSCA.col >= this.columnsSpan.columnStart && startSCA.col <= this.columnsSpan.columnEnd) actualStart = start.shiftedByColumns(this.columnsSpan.columnEnd - startSCA.col + 1);
			if (endSCA.col >= this.columnsSpan.columnStart && endSCA.col <= this.columnsSpan.columnEnd) actualEnd = end.shiftedByColumns(-(endSCA.col - this.columnsSpan.columnStart + 1));
		}
		const newStart = this.transformCellAddress(actualStart, formulaAddress);
		const newEnd = this.transformCellAddress(actualEnd, formulaAddress);
		if (newStart === false && newEnd === false) return [actualStart, actualEnd];
		else if (newStart === ErrorType.REF || newEnd === ErrorType.REF) throw Error("Cannot happen");
		else return [newStart || actualStart, newEnd || actualEnd];
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/dependencyTransformers/RemoveRowsTransformer.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var RemoveRowsTransformer = class extends Transformer {
	constructor(rowsSpan) {
		super();
		this.rowsSpan = rowsSpan;
	}
	get sheet() {
		return this.rowsSpan.sheet;
	}
	isIrreversible() {
		return true;
	}
	transformColumnRangeAst(ast, _formulaAddress) {
		return ast;
	}
	transformCellAddress(dependencyAddress, formulaAddress) {
		const absoluteDependencySheet = absoluteSheetReference(dependencyAddress, formulaAddress);
		if (this.rowsSpan.sheet !== formulaAddress.sheet && this.rowsSpan.sheet !== absoluteDependencySheet) return false;
		if (this.rowsSpan.sheet !== formulaAddress.sheet && this.rowsSpan.sheet === absoluteDependencySheet) {
			const absoluteDependencyAddress = dependencyAddress.toSimpleRowAddress(formulaAddress);
			if (absoluteDependencyAddress.row < this.rowsSpan.rowStart) return false;
			else if (absoluteDependencyAddress.row > this.rowsSpan.rowEnd) return dependencyAddress.shiftedByRows(-this.rowsSpan.numberOfRows);
		}
		if (this.rowsSpan.sheet === formulaAddress.sheet && this.rowsSpan.sheet !== absoluteDependencySheet) {
			if (dependencyAddress.isRowAbsolute()) return false;
			else if (formulaAddress.row < this.rowsSpan.rowStart) return false;
			else if (formulaAddress.row > this.rowsSpan.rowEnd) return dependencyAddress.shiftedByRows(this.rowsSpan.numberOfRows);
		}
		if (this.rowsSpan.sheet === formulaAddress.sheet && this.rowsSpan.sheet === absoluteDependencySheet) if (dependencyAddress.isRowAbsolute()) {
			if (dependencyAddress.row < this.rowsSpan.rowStart) return false;
			else if (dependencyAddress.row > this.rowsSpan.rowEnd) return dependencyAddress.shiftedByRows(-this.rowsSpan.numberOfRows);
		} else {
			const absoluteDependencyAddress = dependencyAddress.toSimpleRowAddress(formulaAddress);
			if (absoluteDependencyAddress.row < this.rowsSpan.rowStart) {
				if (formulaAddress.row < this.rowsSpan.rowStart) return false;
				else if (formulaAddress.row > this.rowsSpan.rowEnd) return dependencyAddress.shiftedByRows(this.rowsSpan.numberOfRows);
			} else if (absoluteDependencyAddress.row > this.rowsSpan.rowEnd) {
				if (formulaAddress.row < this.rowsSpan.rowStart) return dependencyAddress.shiftedByRows(-this.rowsSpan.numberOfRows);
				else if (formulaAddress.row > this.rowsSpan.rowEnd) return false;
			}
		}
		return ErrorType.REF;
	}
	transformCellRange(start, end, formulaAddress) {
		return this.transformRange(start, end, formulaAddress);
	}
	transformRowRange(start, end, formulaAddress) {
		return this.transformRange(start, end, formulaAddress);
	}
	transformColumnRange(_start, _end, _formulaAddress) {
		throw Error("Not implemented");
	}
	fixNodeAddress(address) {
		if (this.rowsSpan.sheet === address.sheet && this.rowsSpan.rowStart <= address.row) return Object.assign(Object.assign({}, address), { row: address.row - this.rowsSpan.numberOfRows });
		else return address;
	}
	transformRange(start, end, formulaAddress) {
		const startSheet = absoluteSheetReference(start, formulaAddress);
		let actualStart = start;
		let actualEnd = end;
		if (this.rowsSpan.sheet === startSheet) {
			const startSCA = start.toSimpleRowAddress(formulaAddress);
			const endSCA = end.toSimpleRowAddress(formulaAddress);
			if (this.rowsSpan.rowStart <= startSCA.row && this.rowsSpan.rowEnd >= endSCA.row) return ErrorType.REF;
			if (startSCA.row >= this.rowsSpan.rowStart && startSCA.row <= this.rowsSpan.rowEnd) actualStart = start.shiftedByRows(this.rowsSpan.rowEnd - startSCA.row + 1);
			if (endSCA.row >= this.rowsSpan.rowStart && endSCA.row <= this.rowsSpan.rowEnd) actualEnd = end.shiftedByRows(-(endSCA.row - this.rowsSpan.rowStart + 1));
		}
		const newStart = this.transformCellAddress(actualStart, formulaAddress);
		const newEnd = this.transformCellAddress(actualEnd, formulaAddress);
		if (newStart === false && newEnd === false) return [actualStart, actualEnd];
		else if (newStart === ErrorType.REF || newEnd === ErrorType.REF) return ErrorType.REF;
		else return [newStart || actualStart, newEnd || actualEnd];
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/dependencyTransformers/RenameSheetTransformer.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Transformer that reassigns references from a merged sheet into the surviving sheet.
*/
var RenameSheetTransformer = class extends Transformer {
	constructor(sheetIdToKeep, sheetBeingMerged) {
		super();
		this.sheetIdToKeep = sheetIdToKeep;
		this.sheetBeingMerged = sheetBeingMerged;
	}
	/**
	* Returns id of sheet that survives merge operation.
	*
	* @returns {number} sheet identifier.
	*/
	get sheet() {
		return this.sheetIdToKeep;
	}
	/**
	* Sheet merge cannot be undone because original sheet id is lost.
	*
	* @returns {boolean} always true to indicate transformation irreversibility.
	*/
	isIrreversible() {
		return true;
	}
	/**
	* Updates cell address sheet when it points to merged sheet.
	*
	* @param {T} dependencyAddress - dependency address needing sheet update.
	* @param {SimpleCellAddress} _formulaAddress - location of formula (unused but required by base class).
	* @returns {T | false} updated address or false when nothing changes.
	*/
	transformCellAddress(dependencyAddress, _formulaAddress) {
		return this.updateSheetInAddress(dependencyAddress);
	}
	/**
	* Updates sheet for both ends of cell range.
	*
	* @param {CellAddress} start - start address of range.
	* @param {CellAddress} end - end address of range.
	* @param {SimpleCellAddress} _formulaAddress - formula location (unused).
	* @returns {[CellAddress, CellAddress] | false} updated range tuple or false when unchanged.
	*/
	transformCellRange(start, end, _formulaAddress) {
		return this.transformRange(start, end);
	}
	/**
	* Updates sheet for both ends of column range.
	*
	* @param {ColumnAddress} start - beginning column of range.
	* @param {ColumnAddress} end - ending column of range.
	* @param {SimpleCellAddress} _formulaAddress - formula location (unused).
	* @returns {[ColumnAddress, ColumnAddress] | false} updated column range or false.
	*/
	transformColumnRange(start, end, _formulaAddress) {
		return this.transformRange(start, end);
	}
	/**
	* Updates sheet for both ends of row range.
	*
	* @param {RowAddress} start - beginning row address.
	* @param {RowAddress} end - ending row address.
	* @param {SimpleCellAddress} _formulaAddress - formula location (unused).
	* @returns {[RowAddress, RowAddress] | false} updated row range or false.
	*/
	transformRowRange(start, end, _formulaAddress) {
		return this.transformRange(start, end);
	}
	/**
	* Node addresses are already absolute, so no change is needed.
	*
	* @param {SimpleCellAddress} address - node address to inspect.
	* @returns {SimpleCellAddress} original address unchanged.
	*/
	fixNodeAddress(address) {
		return address;
	}
	/**
	* Updates sheet identifier for both range ends if needed.
	*
	* @param {T} start - range start address.
	* @param {T} end - range end address.
	* @returns {[T, T] | false} tuple with updated addresses or false when no updates happen.
	*/
	transformRange(start, end) {
		const newStart = this.updateSheetInAddress(start);
		const newEnd = this.updateSheetInAddress(end);
		if (newStart || newEnd) return [newStart || start, newEnd || end];
		return false;
	}
	/**
	* Replaces sheet id in address when it points to merged sheet.
	*
	* @param {T} address - address to update.
	* @returns {T | false} address with new sheet id or false when no change occurs.
	*/
	updateSheetInAddress(address) {
		if (address.sheet === this.sheetBeingMerged) return address.withSheet(this.sheetIdToKeep);
		return false;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/Operations.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var RemoveRowsCommand = class {
	constructor(sheet, indexes) {
		this.sheet = sheet;
		this.indexes = indexes;
	}
	normalizedIndexes() {
		return normalizeRemovedIndexes(this.indexes);
	}
	rowsSpans() {
		return this.normalizedIndexes().map((normalizedIndex) => RowsSpan.fromNumberOfRows(this.sheet, normalizedIndex[0], normalizedIndex[1]));
	}
};
var AddRowsCommand = class {
	constructor(sheet, indexes) {
		this.sheet = sheet;
		this.indexes = indexes;
	}
	normalizedIndexes() {
		return normalizeAddedIndexes(this.indexes);
	}
	rowsSpans() {
		return this.normalizedIndexes().map((normalizedIndex) => RowsSpan.fromNumberOfRows(this.sheet, normalizedIndex[0], normalizedIndex[1]));
	}
};
var AddColumnsCommand = class {
	constructor(sheet, indexes) {
		this.sheet = sheet;
		this.indexes = indexes;
	}
	normalizedIndexes() {
		return normalizeAddedIndexes(this.indexes);
	}
	columnsSpans() {
		return this.normalizedIndexes().map((normalizedIndex) => ColumnsSpan.fromNumberOfColumns(this.sheet, normalizedIndex[0], normalizedIndex[1]));
	}
};
var RemoveColumnsCommand = class {
	constructor(sheet, indexes) {
		this.sheet = sheet;
		this.indexes = indexes;
	}
	normalizedIndexes() {
		return normalizeRemovedIndexes(this.indexes);
	}
	columnsSpans() {
		return this.normalizedIndexes().map((normalizedIndex) => ColumnsSpan.fromNumberOfColumns(this.sheet, normalizedIndex[0], normalizedIndex[1]));
	}
};
var Operations = class {
	constructor(config, dependencyGraph, columnSearch, cellContentParser, parser, stats, lazilyTransformingAstService, namedExpressions, arraySizePredictor) {
		this.dependencyGraph = dependencyGraph;
		this.columnSearch = columnSearch;
		this.cellContentParser = cellContentParser;
		this.parser = parser;
		this.stats = stats;
		this.lazilyTransformingAstService = lazilyTransformingAstService;
		this.namedExpressions = namedExpressions;
		this.arraySizePredictor = arraySizePredictor;
		this.changes = ContentChanges.empty();
		this.allocateNamedExpressionAddressSpace();
		this.maxColumns = config.maxColumns;
		this.maxRows = config.maxRows;
	}
	get sheetMapping() {
		return this.dependencyGraph.sheetMapping;
	}
	get addressMapping() {
		return this.dependencyGraph.addressMapping;
	}
	removeRows(cmd) {
		const rowsRemovals = [];
		for (const rowsToRemove of cmd.rowsSpans()) {
			const rowsRemoval = this.doRemoveRows(rowsToRemove);
			if (rowsRemoval) rowsRemovals.push(rowsRemoval);
		}
		return rowsRemovals;
	}
	addRows(cmd) {
		for (const addedRows of cmd.rowsSpans()) this.doAddRows(addedRows);
	}
	addColumns(cmd) {
		for (const addedColumns of cmd.columnsSpans()) this.doAddColumns(addedColumns);
	}
	removeColumns(cmd) {
		const columnsRemovals = [];
		for (const columnsToRemove of cmd.columnsSpans()) {
			const columnsRemoval = this.doRemoveColumns(columnsToRemove);
			if (columnsRemoval) columnsRemovals.push(columnsRemoval);
		}
		return columnsRemovals;
	}
	/**
	* Clears the sheet content.
	*/
	clearSheet(sheetId) {
		this.dependencyGraph.clearSheet(sheetId);
		this.columnSearch.removeSheet(sheetId);
	}
	/**
	* Adds a new sheet to the workbook.
	*/
	addSheet(name) {
		const sheetId = this.sheetMapping.addSheet(name);
		this.dependencyGraph.addSheet(sheetId);
		return {
			sheetName: this.sheetMapping.getSheetNameOrThrowError(sheetId),
			sheetId
		};
	}
	/**
	* Adds a sheet with a specific ID for redo operations.
	*/
	addSheetWithId(sheetId, name) {
		this.sheetMapping.addSheetWithId(sheetId, name);
		this.dependencyGraph.addSheet(sheetId);
	}
	/**
	* Adds a placeholder sheet with a specific ID for undo operations.
	* Used to restore previously merged placeholder sheets.
	*
	* Note: Unlike `addSheetWithId`, this does NOT call `dependencyGraph.addSheet()`
	* because placeholders don't need dirty marking or strategy changes - they only
	* need to exist in the mappings so formulas can reference them again.
	*/
	addPlaceholderSheetWithId(sheetId, name) {
		this.sheetMapping.addPlaceholderWithId(sheetId, name);
		this.addressMapping.addSheetStrategyPlaceholderIfNotExists(sheetId);
	}
	/**
	* Removes a sheet from the workbook.
	*/
	removeSheet(sheetId) {
		this.dependencyGraph.removeSheet(sheetId);
		this.columnSearch.removeSheet(sheetId);
		return this.namedExpressions.getAllNamedExpressionsForScope(sheetId).map((namedExpression) => this.removeNamedExpression(namedExpression.normalizeExpressionName(), sheetId));
	}
	/**
	* Removes a sheet from the workbook by name.
	*/
	removeSheetByName(sheetName) {
		const sheetId = this.sheetMapping.getSheetIdOrThrowError(sheetName);
		return this.removeSheet(sheetId);
	}
	/**
	* Renames a sheet in the workbook.
	*/
	renameSheet(sheetId, newName) {
		const { previousDisplayName, mergedWithPlaceholderSheet } = this.sheetMapping.renameSheet(sheetId, newName);
		let version;
		if (mergedWithPlaceholderSheet !== void 0) {
			this.dependencyGraph.mergeSheets(sheetId, mergedWithPlaceholderSheet);
			this.stats.measure(StatType.TRANSFORM_ASTS, () => {
				const transformation = new RenameSheetTransformer(sheetId, mergedWithPlaceholderSheet);
				transformation.performEagerTransformations(this.dependencyGraph, this.parser);
				version = this.lazilyTransformingAstService.addTransformation(transformation);
			});
		}
		return {
			previousDisplayName,
			version,
			mergedPlaceholderSheetId: mergedWithPlaceholderSheet
		};
	}
	moveRows(sheet, startRow, numberOfRows, targetRow) {
		const rowsToAdd = RowsSpan.fromNumberOfRows(sheet, targetRow, numberOfRows);
		this.lazilyTransformingAstService.beginCombinedMode(sheet);
		this.doAddRows(rowsToAdd);
		if (targetRow < startRow) startRow += numberOfRows;
		const startAddress = simpleCellAddress(sheet, 0, startRow);
		const targetAddress = simpleCellAddress(sheet, 0, targetRow);
		this.moveCells(startAddress, Number.POSITIVE_INFINITY, numberOfRows, targetAddress);
		const rowsToRemove = RowsSpan.fromNumberOfRows(sheet, startRow, numberOfRows);
		this.doRemoveRows(rowsToRemove);
		return this.lazilyTransformingAstService.commitCombinedMode();
	}
	moveColumns(sheet, startColumn, numberOfColumns, targetColumn) {
		const columnsToAdd = ColumnsSpan.fromNumberOfColumns(sheet, targetColumn, numberOfColumns);
		this.lazilyTransformingAstService.beginCombinedMode(sheet);
		this.doAddColumns(columnsToAdd);
		if (targetColumn < startColumn) startColumn += numberOfColumns;
		const startAddress = simpleCellAddress(sheet, startColumn, 0);
		const targetAddress = simpleCellAddress(sheet, targetColumn, 0);
		this.moveCells(startAddress, numberOfColumns, Number.POSITIVE_INFINITY, targetAddress);
		const columnsToRemove = ColumnsSpan.fromNumberOfColumns(sheet, startColumn, numberOfColumns);
		this.doRemoveColumns(columnsToRemove);
		return this.lazilyTransformingAstService.commitCombinedMode();
	}
	moveCells(sourceLeftCorner, width, height, destinationLeftCorner) {
		this.ensureItIsPossibleToMoveCells(sourceLeftCorner, width, height, destinationLeftCorner);
		const sourceRange = AbsoluteCellRange.spanFrom(sourceLeftCorner, width, height);
		const targetRange = AbsoluteCellRange.spanFrom(destinationLeftCorner, width, height);
		const toRight = destinationLeftCorner.col - sourceLeftCorner.col;
		const toBottom = destinationLeftCorner.row - sourceLeftCorner.row;
		const toSheet = destinationLeftCorner.sheet;
		const currentDataAtTarget = this.getRangeClipboardCells(targetRange);
		const valuesToRemove = this.dependencyGraph.rawValuesFromRange(targetRange);
		this.columnSearch.removeValues(valuesToRemove);
		const valuesToMove = this.dependencyGraph.rawValuesFromRange(sourceRange);
		this.columnSearch.moveValues(valuesToMove, toRight, toBottom, toSheet);
		let version = 0;
		this.stats.measure(StatType.TRANSFORM_ASTS, () => {
			const transformation = new MoveCellsTransformer(sourceRange, toRight, toBottom, toSheet);
			transformation.performEagerTransformations(this.dependencyGraph, this.parser);
			version = this.lazilyTransformingAstService.addTransformation(transformation);
		});
		this.dependencyGraph.moveCells(sourceRange, toRight, toBottom, toSheet);
		const addedGlobalNamedExpressions = this.updateNamedExpressionsForMovedCells(sourceLeftCorner, width, height, destinationLeftCorner);
		return {
			version,
			overwrittenCellsData: currentDataAtTarget,
			addedGlobalNamedExpressions
		};
	}
	setRowOrder(sheetId, rowMapping) {
		const buffer = [];
		let oldContent = [];
		for (const [source, target] of rowMapping) if (source !== target) {
			const rowRange = AbsoluteCellRange.spanFrom({
				sheet: sheetId,
				col: 0,
				row: source
			}, Infinity, 1);
			const row = this.getRangeClipboardCells(rowRange);
			oldContent = oldContent.concat(row);
			buffer.push(row.map(([{ sheet, col }, cell]) => [{
				sheet,
				col,
				row: target
			}, cell]));
		}
		buffer.forEach((row) => this.restoreClipboardCells(sheetId, row.values()));
		return oldContent;
	}
	setColumnOrder(sheetId, columnMapping) {
		const buffer = [];
		let oldContent = [];
		for (const [source, target] of columnMapping) if (source !== target) {
			const rowRange = AbsoluteCellRange.spanFrom({
				sheet: sheetId,
				col: source,
				row: 0
			}, 1, Infinity);
			const column = this.getRangeClipboardCells(rowRange);
			oldContent = oldContent.concat(column);
			buffer.push(column.map(([{ sheet, col: _col, row }, cell]) => [{
				sheet,
				col: target,
				row
			}, cell]));
		}
		buffer.forEach((column) => this.restoreClipboardCells(sheetId, column.values()));
		return oldContent;
	}
	addNamedExpression(expressionName, expression, sheetId, options) {
		const namedExpression = this.namedExpressions.addNamedExpression(expressionName, sheetId, options);
		this.storeNamedExpressionInCell(namedExpression.address, expression);
		this.adjustNamedExpressionEdges(namedExpression, expressionName, sheetId);
	}
	restoreNamedExpression(namedExpression, content, sheetId) {
		const expressionName = namedExpression.displayName;
		this.restoreCell(namedExpression.address, content);
		const restoredNamedExpression = this.namedExpressions.restoreNamedExpression(namedExpression, sheetId);
		this.adjustNamedExpressionEdges(restoredNamedExpression, expressionName, sheetId);
	}
	changeNamedExpressionExpression(expressionName, newExpression, sheetId, options) {
		const namedExpression = this.namedExpressions.namedExpressionForScope(expressionName, sheetId);
		if (!namedExpression) throw new NamedExpressionDoesNotExistError(expressionName);
		const oldNamedExpression = namedExpression.copy();
		namedExpression.options = options;
		const content = this.getClipboardCell(namedExpression.address);
		this.storeNamedExpressionInCell(namedExpression.address, newExpression);
		return [oldNamedExpression, content];
	}
	removeNamedExpression(expressionName, sheetId) {
		const namedExpression = this.namedExpressions.namedExpressionForScope(expressionName, sheetId);
		if (!namedExpression) throw new NamedExpressionDoesNotExistError(expressionName);
		this.namedExpressions.remove(namedExpression.displayName, sheetId);
		const content = this.getClipboardCell(namedExpression.address);
		if (sheetId !== void 0) {
			const globalNamedExpression = this.namedExpressions.workbookNamedExpressionOrPlaceholder(expressionName);
			this.dependencyGraph.exchangeNode(namedExpression.address, globalNamedExpression.address);
		} else this.dependencyGraph.setCellEmpty(namedExpression.address);
		return [namedExpression, content];
	}
	ensureItIsPossibleToMoveCells(sourceLeftCorner, width, height, destinationLeftCorner) {
		if (isColOrRowInvalid(sourceLeftCorner) || !(isPositiveInteger$1(width) && isPositiveInteger$1(height) || isRowOrColumnRange(sourceLeftCorner, width, height)) || isColOrRowInvalid(destinationLeftCorner) || !this.sheetMapping.hasSheetWithId(sourceLeftCorner.sheet) || !this.sheetMapping.hasSheetWithId(destinationLeftCorner.sheet)) throw new InvalidArgumentsError("a valid range of cells to move.");
		const sourceRange = AbsoluteCellRange.spanFrom(sourceLeftCorner, width, height);
		const targetRange = AbsoluteCellRange.spanFrom(destinationLeftCorner, width, height);
		if (targetRange.exceedsSheetSizeLimits(this.maxColumns, this.maxRows)) throw new SheetSizeLimitExceededError();
		if (this.dependencyGraph.arrayMapping.isFormulaArrayInRange(sourceRange)) throw new SourceLocationHasArrayError();
		if (this.dependencyGraph.arrayMapping.isFormulaArrayInRange(targetRange)) throw new TargetLocationHasArrayError();
	}
	restoreClipboardCells(sourceSheetId, cells) {
		const addedNamedExpressions = [];
		for (const [address, clipboardCell] of cells) {
			this.restoreCell(address, clipboardCell);
			if (clipboardCell.type === ClipboardCellType.FORMULA) {
				const { dependencies } = this.parser.fetchCachedResult(clipboardCell.hash);
				addedNamedExpressions.push(...this.updateNamedExpressionsForTargetAddress(sourceSheetId, address, dependencies));
			}
		}
		return addedNamedExpressions;
	}
	/**
	* Restores a single cell.
	*/
	restoreCell(address, clipboardCell) {
		switch (clipboardCell.type) {
			case ClipboardCellType.VALUE:
				this.setValueToCell(clipboardCell, address);
				break;
			case ClipboardCellType.FORMULA:
				this.setFormulaToCellFromCache(clipboardCell.hash, address);
				break;
			case ClipboardCellType.EMPTY:
				this.setCellEmpty(address);
				break;
			case ClipboardCellType.PARSING_ERROR:
				this.setParsingErrorToCell(clipboardCell.rawInput, clipboardCell.errors, address);
				break;
		}
	}
	getOldContent(address) {
		const vertex = this.dependencyGraph.getCell(address);
		if (vertex === void 0 || vertex instanceof EmptyCellVertex) return [address, { type: ClipboardCellType.EMPTY }];
		else if (vertex instanceof ValueCellVertex) return [address, Object.assign({ type: ClipboardCellType.VALUE }, vertex.getValues())];
		else if (vertex instanceof FormulaVertex) return [vertex.getAddress(this.lazilyTransformingAstService), {
			type: ClipboardCellType.FORMULA,
			hash: this.parser.computeHashFromAst(vertex.getFormula(this.lazilyTransformingAstService))
		}];
		else if (vertex instanceof ParsingErrorVertex) return [address, {
			type: ClipboardCellType.PARSING_ERROR,
			rawInput: vertex.rawInput,
			errors: vertex.errors
		}];
		throw Error("Trying to copy unsupported type");
	}
	getClipboardCell(address) {
		const vertex = this.dependencyGraph.getCell(address);
		if (vertex === void 0 || vertex instanceof EmptyCellVertex) return { type: ClipboardCellType.EMPTY };
		else if (vertex instanceof ValueCellVertex) return Object.assign({ type: ClipboardCellType.VALUE }, vertex.getValues());
		else if (vertex instanceof ArrayFormulaVertex) {
			const val = vertex.getArrayCellValue(address);
			if (val === EmptyValue) return { type: ClipboardCellType.EMPTY };
			return {
				type: ClipboardCellType.VALUE,
				parsedValue: val,
				rawValue: vertex.getArrayCellRawValue(address)
			};
		} else if (vertex instanceof ScalarFormulaVertex) return {
			type: ClipboardCellType.FORMULA,
			hash: this.parser.computeHashFromAst(vertex.getFormula(this.lazilyTransformingAstService))
		};
		else if (vertex instanceof ParsingErrorVertex) return {
			type: ClipboardCellType.PARSING_ERROR,
			rawInput: vertex.rawInput,
			errors: vertex.errors
		};
		throw Error("Trying to copy unsupported type");
	}
	getSheetClipboardCells(sheet) {
		const sheetHeight = this.dependencyGraph.getSheetHeight(sheet);
		const sheetWidth = this.dependencyGraph.getSheetWidth(sheet);
		const arr = new Array(sheetHeight);
		for (let i = 0; i < sheetHeight; i++) {
			arr[i] = new Array(sheetWidth);
			for (let j = 0; j < sheetWidth; j++) {
				const address = simpleCellAddress(sheet, j, i);
				arr[i][j] = this.getClipboardCell(address);
			}
		}
		return arr;
	}
	getRangeClipboardCells(range) {
		const result = [];
		for (const address of range.addresses(this.dependencyGraph)) result.push([address, this.getClipboardCell(address)]);
		return result;
	}
	setCellContent(address, newCellContent) {
		const parsedCellContent = this.cellContentParser.parse(newCellContent);
		const oldContent = this.getOldContent(address);
		if (parsedCellContent instanceof CellContent.Formula) {
			const parserResult = this.parser.parse(parsedCellContent.formula, address);
			const { ast, errors } = parserResult;
			if (errors.length > 0) this.setParsingErrorToCell(parsedCellContent.formula, errors, address);
			else try {
				const size = this.arraySizePredictor.checkArraySize(ast, address);
				if (size.width <= 0 || size.height <= 0) throw Error("Incorrect array size");
				this.setFormulaToCell(address, size, parserResult);
			} catch (error) {
				if (!error.message) throw error;
				const parsingError = {
					type: ParsingErrorType.InvalidRangeSize,
					message: "Invalid range size."
				};
				this.setParsingErrorToCell(parsedCellContent.formula, [parsingError], address);
			}
		} else if (parsedCellContent instanceof CellContent.Empty) this.setCellEmpty(address);
		else this.setValueToCell({
			parsedValue: parsedCellContent.value,
			rawValue: newCellContent
		}, address);
		return oldContent;
	}
	setSheetContent(sheetId, newSheetContent) {
		this.clearSheet(sheetId);
		for (let i = 0; i < newSheetContent.length; i++) for (let j = 0; j < newSheetContent[i].length; j++) {
			const address = simpleCellAddress(sheetId, j, i);
			this.setCellContent(address, newSheetContent[i][j]);
		}
	}
	/**
	* Sets cell content to an instance of parsing error.
	* Creates a ParsingErrorVertex and updates the dependency graph and column search index.
	*/
	setParsingErrorToCell(rawInput, errors, address) {
		this.removeCellValueFromColumnSearch(address);
		const vertex = new ParsingErrorVertex(errors, rawInput);
		const arrayChanges = this.dependencyGraph.setParsingErrorToCell(address, vertex);
		this.columnSearch.applyChanges(arrayChanges.getChanges());
		this.changes.addAll(arrayChanges);
		this.changes.addChange(vertex.getCellValue(), address);
	}
	/**
	* Sets cell content to a formula.
	* Creates a ScalarFormulaVertex and updates the dependency graph and column search index.
	*/
	setFormulaToCell(address, size, { ast, hasVolatileFunction, hasStructuralChangeFunction, dependencies }) {
		this.removeCellValueFromColumnSearch(address);
		const arrayChanges = this.dependencyGraph.setFormulaToCell(address, ast, absolutizeDependencies(dependencies, address), size, hasVolatileFunction, hasStructuralChangeFunction);
		this.columnSearch.applyChanges(arrayChanges.getChanges());
		this.changes.addAll(arrayChanges);
	}
	/**
	* Sets cell content to a value.
	* Creates a ValueCellVertex and updates the dependency graph and column search index.
	*/
	setValueToCell(value, address) {
		this.changeCellValueInColumnSearch(address, value.parsedValue);
		const arrayChanges = this.dependencyGraph.setValueToCell(address, value);
		this.columnSearch.applyChanges(arrayChanges.getChanges().filter((change) => !equalSimpleCellAddress(change.address, address)));
		this.changes.addAll(arrayChanges);
		this.changes.addChange(value.parsedValue, address);
	}
	/**
	* Sets cell content to an empty value.
	* Creates an EmptyCellVertex and updates the dependency graph and column search index.
	*/
	setCellEmpty(address) {
		if (this.dependencyGraph.isArrayInternalCell(address)) return;
		this.removeCellValueFromColumnSearch(address);
		const arrayChanges = this.dependencyGraph.setCellEmpty(address);
		this.columnSearch.applyChanges(arrayChanges.getChanges());
		this.changes.addAll(arrayChanges);
		this.changes.addChange(EmptyValue, address);
	}
	setFormulaToCellFromCache(formulaHash, address) {
		const { ast, hasVolatileFunction, hasStructuralChangeFunction, dependencies } = this.parser.fetchCachedResult(formulaHash);
		const absoluteDependencies = absolutizeDependencies(dependencies, address);
		const [cleanedAst] = new CleanOutOfScopeDependenciesTransformer(address.sheet).transformSingleAst(ast, address);
		this.parser.rememberNewAst(cleanedAst);
		const cleanedDependencies = filterDependenciesOutOfScope(absoluteDependencies);
		const size = this.arraySizePredictor.checkArraySize(ast, address);
		this.dependencyGraph.setFormulaToCell(address, cleanedAst, cleanedDependencies, size, hasVolatileFunction, hasStructuralChangeFunction);
	}
	/**
	* Returns true if row number is outside of given sheet.
	* @param {number} row - row number
	* @param {number} sheet - sheet ID number
	*/
	rowEffectivelyNotInSheet(row, sheet) {
		return row >= this.dependencyGraph.addressMapping.getSheetHeight(sheet);
	}
	getAndClearContentChanges() {
		const changes = this.changes;
		this.changes = ContentChanges.empty();
		return changes;
	}
	forceApplyPostponedTransformations() {
		this.dependencyGraph.forceApplyPostponedTransformations();
	}
	/**
	* Removes multiple rows from sheet. </br>
	* Does nothing if rows are outside of effective sheet size.
	* @param {RowsSpan} rowsToRemove - rows to remove
	*/
	doRemoveRows(rowsToRemove) {
		if (this.rowEffectivelyNotInSheet(rowsToRemove.rowStart, rowsToRemove.sheet)) return;
		const removedCells = [];
		for (const [address] of this.dependencyGraph.entriesFromRowsSpan(rowsToRemove)) removedCells.push({
			address,
			cellType: this.getClipboardCell(address)
		});
		const { affectedArrays, contentChanges } = this.dependencyGraph.removeRows(rowsToRemove);
		this.columnSearch.applyChanges(contentChanges.getChanges());
		let version = 0;
		this.stats.measure(StatType.TRANSFORM_ASTS, () => {
			const transformation = new RemoveRowsTransformer(rowsToRemove);
			transformation.performEagerTransformations(this.dependencyGraph, this.parser);
			version = this.lazilyTransformingAstService.addTransformation(transformation);
		});
		this.rewriteAffectedArrays(affectedArrays);
		return {
			version,
			removedCells,
			rowFrom: rowsToRemove.rowStart,
			rowCount: rowsToRemove.numberOfRows
		};
	}
	/**
	* Removes multiple columns from sheet. </br>
	* Does nothing if columns are outside of effective sheet size.
	* @param {ColumnsSpan} columnsToRemove - columns to remove
	*/
	doRemoveColumns(columnsToRemove) {
		if (this.columnEffectivelyNotInSheet(columnsToRemove.columnStart, columnsToRemove.sheet)) return;
		const removedCells = [];
		for (const [address] of this.dependencyGraph.entriesFromColumnsSpan(columnsToRemove)) removedCells.push({
			address,
			cellType: this.getClipboardCell(address)
		});
		const { affectedArrays, contentChanges } = this.dependencyGraph.removeColumns(columnsToRemove);
		this.columnSearch.applyChanges(contentChanges.getChanges());
		this.columnSearch.removeColumns(columnsToRemove);
		let version = 0;
		this.stats.measure(StatType.TRANSFORM_ASTS, () => {
			const transformation = new RemoveColumnsTransformer(columnsToRemove);
			transformation.performEagerTransformations(this.dependencyGraph, this.parser);
			version = this.lazilyTransformingAstService.addTransformation(transformation);
		});
		this.rewriteAffectedArrays(affectedArrays);
		return {
			version,
			removedCells,
			columnFrom: columnsToRemove.columnStart,
			columnCount: columnsToRemove.numberOfColumns
		};
	}
	/**
	* Add multiple rows to sheet. </br>
	* Does nothing if rows are outside of effective sheet size.
	* @param {RowsSpan} addedRows - rows to add
	*/
	doAddRows(addedRows) {
		if (this.rowEffectivelyNotInSheet(addedRows.rowStart, addedRows.sheet)) return;
		const { affectedArrays } = this.dependencyGraph.addRows(addedRows);
		this.stats.measure(StatType.TRANSFORM_ASTS, () => {
			const transformation = new AddRowsTransformer(addedRows);
			transformation.performEagerTransformations(this.dependencyGraph, this.parser);
			this.lazilyTransformingAstService.addTransformation(transformation);
		});
		this.rewriteAffectedArrays(affectedArrays);
	}
	rewriteAffectedArrays(affectedArrays) {
		for (const arrayVertex of affectedArrays.values()) {
			if (arrayVertex.array.size.isRef) continue;
			const ast = arrayVertex.getFormula(this.lazilyTransformingAstService);
			const address = arrayVertex.getAddress(this.lazilyTransformingAstService);
			const hash = this.parser.computeHashFromAst(ast);
			this.setFormulaToCellFromCache(hash, address);
		}
	}
	/**
	* Add multiple columns to sheet </br>
	* Does nothing if columns are outside of effective sheet size
	* @param {ColumnsSpan} addedColumns - object containing information about columns to add
	*/
	doAddColumns(addedColumns) {
		if (this.columnEffectivelyNotInSheet(addedColumns.columnStart, addedColumns.sheet)) return;
		const { affectedArrays, contentChanges } = this.dependencyGraph.addColumns(addedColumns);
		this.columnSearch.addColumns(addedColumns);
		this.columnSearch.applyChanges(contentChanges.getChanges());
		this.stats.measure(StatType.TRANSFORM_ASTS, () => {
			const transformation = new AddColumnsTransformer(addedColumns);
			transformation.performEagerTransformations(this.dependencyGraph, this.parser);
			this.lazilyTransformingAstService.addTransformation(transformation);
		});
		this.rewriteAffectedArrays(affectedArrays);
	}
	/**
	* Returns true if row number is outside of given sheet.
	* @param {number} column - row number
	* @param {number} sheet - sheet ID number
	*/
	columnEffectivelyNotInSheet(column, sheet) {
		return column >= this.dependencyGraph.addressMapping.getSheetWidth(sheet);
	}
	adjustNamedExpressionEdges(namedExpression, expressionName, sheetId) {
		if (sheetId === void 0) return;
		const { vertex: localVertex, id: maybeLocalVertexId } = this.dependencyGraph.fetchCellOrCreateEmpty(namedExpression.address);
		const localVertexId = maybeLocalVertexId !== null && maybeLocalVertexId !== void 0 ? maybeLocalVertexId : localVertex.idInGraph;
		const globalNamedExpression = this.namedExpressions.workbookNamedExpressionOrPlaceholder(expressionName);
		const { vertex: globalVertex, id: maybeGlobalVertexId } = this.dependencyGraph.fetchCellOrCreateEmpty(globalNamedExpression.address);
		const globalVertexId = maybeGlobalVertexId !== null && maybeGlobalVertexId !== void 0 ? maybeGlobalVertexId : globalVertex.idInGraph;
		for (const adjacentNode of this.dependencyGraph.graph.adjacentNodes(globalVertex)) if (adjacentNode instanceof ScalarFormulaVertex && adjacentNode.getAddress(this.lazilyTransformingAstService).sheet === sheetId) {
			const ast = adjacentNode.getFormula(this.lazilyTransformingAstService);
			const formulaAddress = adjacentNode.getAddress(this.lazilyTransformingAstService);
			const { dependencies } = this.parser.fetchCachedResultForAst(ast);
			for (const dependency of absolutizeDependencies(dependencies, formulaAddress)) if (dependency instanceof NamedExpressionDependency && dependency.name.toLowerCase() === namedExpression.displayName.toLowerCase()) {
				this.dependencyGraph.graph.removeEdgeIfExists(globalVertexId, adjacentNode);
				this.dependencyGraph.graph.addEdge(localVertexId, adjacentNode);
			}
		}
	}
	storeNamedExpressionInCell(address, expression) {
		const parsedCellContent = this.cellContentParser.parse(expression);
		if (parsedCellContent instanceof CellContent.Formula) {
			const parsingResult = this.parser.parse(parsedCellContent.formula, simpleCellAddress(-1, 0, 0));
			if (doesContainRelativeReferences(parsingResult.ast)) throw new NoRelativeAddressesAllowedError();
			const { ast, hasVolatileFunction, hasStructuralChangeFunction, dependencies } = parsingResult;
			this.dependencyGraph.setFormulaToCell(address, ast, absolutizeDependencies(dependencies, address), ArraySize.scalar(), hasVolatileFunction, hasStructuralChangeFunction);
		} else if (parsedCellContent instanceof CellContent.Empty) this.setCellEmpty(address);
		else this.setValueToCell({
			parsedValue: parsedCellContent.value,
			rawValue: expression
		}, address);
	}
	updateNamedExpressionsForMovedCells(sourceLeftCorner, width, height, destinationLeftCorner) {
		if (sourceLeftCorner.sheet === destinationLeftCorner.sheet) return [];
		const addedGlobalNamedExpressions = [];
		const targetRange = AbsoluteCellRange.spanFrom(destinationLeftCorner, width, height);
		for (const formulaAddress of targetRange.addresses(this.dependencyGraph)) {
			const vertex = this.addressMapping.getCell(formulaAddress, { throwIfCellNotExists: true });
			if (vertex instanceof ScalarFormulaVertex && formulaAddress.sheet !== sourceLeftCorner.sheet) {
				const ast = vertex.getFormula(this.lazilyTransformingAstService);
				const { dependencies } = this.parser.fetchCachedResultForAst(ast);
				addedGlobalNamedExpressions.push(...this.updateNamedExpressionsForTargetAddress(sourceLeftCorner.sheet, formulaAddress, dependencies));
			}
		}
		return addedGlobalNamedExpressions;
	}
	updateNamedExpressionsForTargetAddress(sourceSheet, targetAddress, dependencies) {
		if (sourceSheet === targetAddress.sheet) return [];
		const addedGlobalNamedExpressions = [];
		const vertex = this.addressMapping.getCellOrThrow(targetAddress);
		for (const namedExpressionDependency of absolutizeDependencies(dependencies, targetAddress)) {
			if (!(namedExpressionDependency instanceof NamedExpressionDependency)) continue;
			const expressionName = namedExpressionDependency.name;
			const sourceVertex = this.dependencyGraph.fetchNamedExpressionVertex(expressionName, sourceSheet).vertex;
			const targetScopeExpressionVertex = this.namedExpressions.isExpressionInScope(expressionName, targetAddress.sheet) ? this.dependencyGraph.fetchNamedExpressionVertex(expressionName, targetAddress.sheet).vertex : this.copyOrFetchGlobalNamedExpressionVertex(expressionName, sourceVertex, addedGlobalNamedExpressions);
			if (targetScopeExpressionVertex !== sourceVertex) {
				this.dependencyGraph.graph.removeEdgeIfExists(sourceVertex, vertex);
				this.dependencyGraph.graph.addEdge(targetScopeExpressionVertex, vertex);
			}
		}
		return addedGlobalNamedExpressions;
	}
	allocateNamedExpressionAddressSpace() {
		this.dependencyGraph.addressMapping.addSheetWithStrategy(NamedExpressions.SHEET_FOR_WORKBOOK_EXPRESSIONS, new SparseStrategy(0, 0));
	}
	copyOrFetchGlobalNamedExpressionVertex(expressionName, sourceVertex, addedNamedExpressions) {
		let expression = this.namedExpressions.namedExpressionForScope(expressionName);
		if (expression === void 0) {
			expression = this.namedExpressions.addNamedExpression(expressionName);
			addedNamedExpressions.push(expression.normalizeExpressionName());
			if (sourceVertex instanceof ScalarFormulaVertex) {
				const { ast, hasVolatileFunction, hasStructuralChangeFunction, dependencies } = this.parser.fetchCachedResultForAst(sourceVertex.getFormula(this.lazilyTransformingAstService));
				this.dependencyGraph.setFormulaToCell(expression.address, ast, absolutizeDependencies(dependencies, expression.address), ArraySize.scalar(), hasVolatileFunction, hasStructuralChangeFunction);
			} else if (sourceVertex instanceof EmptyCellVertex) this.setCellEmpty(expression.address);
			else if (sourceVertex instanceof ValueCellVertex) this.setValueToCell(sourceVertex.getValues(), expression.address);
		}
		return this.dependencyGraph.fetchCellOrCreateEmpty(expression.address).vertex;
	}
	/**
	* Removes a cell value from the columnSearch index.
	* Ignores the non-computed formula vertices.
	*/
	removeCellValueFromColumnSearch(address) {
		if (this.isNotComputed(address)) return;
		const oldValue = this.dependencyGraph.getCellValue(address);
		this.columnSearch.remove(getRawValue(oldValue), address);
	}
	/**
	* Changes a cell value in the columnSearch index.
	* Ignores the non-computed formula vertices.
	*/
	changeCellValueInColumnSearch(address, newValue) {
		if (this.isNotComputed(address)) return;
		const oldValue = this.dependencyGraph.getCellValue(address);
		this.columnSearch.change(getRawValue(oldValue), getRawValue(newValue), address);
	}
	/**
	* Checks if the ScalarFormulaVertex or ArrayFormulaVertex at the given address is not computed.
	*/
	isNotComputed(address) {
		const vertex = this.dependencyGraph.getCell(address);
		if (!vertex) return false;
		return vertex instanceof FormulaVertex && !vertex.isComputed();
	}
};
function normalizeRemovedIndexes(indexes) {
	if (indexes.length <= 1) return indexes;
	const sorted = [...indexes].sort(([a], [b]) => a - b);
	const merged = sorted.reduce((acc, [startIndex, amount]) => {
		const previous = acc[acc.length - 1];
		const lastIndex = previous[0] + previous[1];
		if (startIndex <= lastIndex) previous[1] += Math.max(0, amount - (lastIndex - startIndex));
		else acc.push([startIndex, amount]);
		return acc;
	}, [sorted[0]]);
	let shift = 0;
	for (let i = 0; i < merged.length; ++i) {
		merged[i][0] -= shift;
		shift += merged[i][1];
	}
	return merged;
}
function normalizeAddedIndexes(indexes) {
	if (indexes.length <= 1) return indexes;
	const sorted = [...indexes].sort(([a], [b]) => a - b);
	const merged = sorted.reduce((acc, [startIndex, amount]) => {
		const previous = acc[acc.length - 1];
		if (startIndex === previous[0]) previous[1] = Math.max(previous[1], amount);
		else acc.push([startIndex, amount]);
		return acc;
	}, [sorted[0]]);
	let shift = 0;
	for (let i = 0; i < merged.length; ++i) {
		merged[i][0] += shift;
		shift += merged[i][1];
	}
	return merged;
}
function isPositiveInteger$1(n) {
	return Number.isInteger(n) && n > 0;
}
function isRowOrColumnRange(leftCorner, width, height) {
	return leftCorner.row === 0 && isPositiveInteger$1(width) && height === Number.POSITIVE_INFINITY || leftCorner.col === 0 && isPositiveInteger$1(height) && width === Number.POSITIVE_INFINITY;
}
//#endregion
//#region ../../node_modules/hyperformula/es/UndoRedo.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var BaseUndoEntry = class {};
var RemoveRowsUndoEntry = class extends BaseUndoEntry {
	constructor(command, rowsRemovals) {
		super();
		this.command = command;
		this.rowsRemovals = rowsRemovals;
	}
	doUndo(undoRedo) {
		undoRedo.undoRemoveRows(this);
	}
	doRedo(undoRedo) {
		undoRedo.redoRemoveRows(this);
	}
};
var MoveCellsUndoEntry = class extends BaseUndoEntry {
	constructor(sourceLeftCorner, width, height, destinationLeftCorner, overwrittenCellsData, addedGlobalNamedExpressions, version) {
		super();
		this.sourceLeftCorner = sourceLeftCorner;
		this.width = width;
		this.height = height;
		this.destinationLeftCorner = destinationLeftCorner;
		this.overwrittenCellsData = overwrittenCellsData;
		this.addedGlobalNamedExpressions = addedGlobalNamedExpressions;
		this.version = version;
	}
	doUndo(undoRedo) {
		undoRedo.undoMoveCells(this);
	}
	doRedo(undoRedo) {
		undoRedo.redoMoveCells(this);
	}
};
var AddRowsUndoEntry = class extends BaseUndoEntry {
	constructor(command) {
		super();
		this.command = command;
	}
	doUndo(undoRedo) {
		undoRedo.undoAddRows(this);
	}
	doRedo(undoRedo) {
		undoRedo.redoAddRows(this);
	}
};
var SetRowOrderUndoEntry = class extends BaseUndoEntry {
	constructor(sheetId, rowMapping, oldContent) {
		super();
		this.sheetId = sheetId;
		this.rowMapping = rowMapping;
		this.oldContent = oldContent;
	}
	doUndo(undoRedo) {
		undoRedo.undoSetRowOrder(this);
	}
	doRedo(undoRedo) {
		undoRedo.redoSetRowOrder(this);
	}
};
var SetColumnOrderUndoEntry = class extends BaseUndoEntry {
	constructor(sheetId, columnMapping, oldContent) {
		super();
		this.sheetId = sheetId;
		this.columnMapping = columnMapping;
		this.oldContent = oldContent;
	}
	doUndo(undoRedo) {
		undoRedo.undoSetColumnOrder(this);
	}
	doRedo(undoRedo) {
		undoRedo.redoSetColumnOrder(this);
	}
};
var SetSheetContentUndoEntry = class extends BaseUndoEntry {
	constructor(sheetId, oldSheetContent, newSheetContent) {
		super();
		this.sheetId = sheetId;
		this.oldSheetContent = oldSheetContent;
		this.newSheetContent = newSheetContent;
	}
	doUndo(undoRedo) {
		undoRedo.undoSetSheetContent(this);
	}
	doRedo(undoRedo) {
		undoRedo.redoSetSheetContent(this);
	}
};
var MoveRowsUndoEntry = class extends BaseUndoEntry {
	constructor(sheet, startRow, numberOfRows, targetRow, version) {
		super();
		this.sheet = sheet;
		this.startRow = startRow;
		this.numberOfRows = numberOfRows;
		this.targetRow = targetRow;
		this.version = version;
		this.undoStart = this.startRow < this.targetRow ? this.targetRow - this.numberOfRows : this.targetRow;
		this.undoEnd = this.startRow > this.targetRow ? this.startRow + this.numberOfRows : this.startRow;
	}
	doUndo(undoRedo) {
		undoRedo.undoMoveRows(this);
	}
	doRedo(undoRedo) {
		undoRedo.redoMoveRows(this);
	}
};
var MoveColumnsUndoEntry = class extends BaseUndoEntry {
	constructor(sheet, startColumn, numberOfColumns, targetColumn, version) {
		super();
		this.sheet = sheet;
		this.startColumn = startColumn;
		this.numberOfColumns = numberOfColumns;
		this.targetColumn = targetColumn;
		this.version = version;
		this.undoStart = this.startColumn < this.targetColumn ? this.targetColumn - this.numberOfColumns : this.targetColumn;
		this.undoEnd = this.startColumn > this.targetColumn ? this.startColumn + this.numberOfColumns : this.startColumn;
	}
	doUndo(undoRedo) {
		undoRedo.undoMoveColumns(this);
	}
	doRedo(undoRedo) {
		undoRedo.redoMoveColumns(this);
	}
};
var AddColumnsUndoEntry = class extends BaseUndoEntry {
	constructor(command) {
		super();
		this.command = command;
	}
	doUndo(undoRedo) {
		undoRedo.undoAddColumns(this);
	}
	doRedo(undoRedo) {
		undoRedo.redoAddColumns(this);
	}
};
var RemoveColumnsUndoEntry = class extends BaseUndoEntry {
	constructor(command, columnsRemovals) {
		super();
		this.command = command;
		this.columnsRemovals = columnsRemovals;
	}
	doUndo(undoRedo) {
		undoRedo.undoRemoveColumns(this);
	}
	doRedo(undoRedo) {
		undoRedo.redoRemoveColumns(this);
	}
};
var AddSheetUndoEntry = class extends BaseUndoEntry {
	constructor(sheetName, sheetId) {
		super();
		this.sheetName = sheetName;
		this.sheetId = sheetId;
	}
	doUndo(undoRedo) {
		undoRedo.undoAddSheet(this);
	}
	doRedo(undoRedo) {
		undoRedo.redoAddSheet(this);
	}
};
var RemoveSheetUndoEntry = class extends BaseUndoEntry {
	constructor(sheetName, sheetId, oldSheetContent, scopedNamedExpressions) {
		super();
		this.sheetName = sheetName;
		this.sheetId = sheetId;
		this.oldSheetContent = oldSheetContent;
		this.scopedNamedExpressions = scopedNamedExpressions;
	}
	doUndo(undoRedo) {
		undoRedo.undoRemoveSheet(this);
	}
	doRedo(undoRedo) {
		undoRedo.redoRemoveSheet(this);
	}
};
/**
* Undo entry for renaming a sheet.
*
* When renaming a sheet to a name that was previously referenced (but didn't exist),
* a placeholder sheet gets merged into the renamed sheet. In this case:
* - `version` contains the transformation version for restoring formulas during undo
* - `mergedPlaceholderSheetId` contains the ID of the placeholder sheet that was merged
*
* When renaming to a name not previously referenced, both optional params are undefined.
*/
var RenameSheetUndoEntry = class extends BaseUndoEntry {
	constructor(sheetId, oldName, newName, version, mergedPlaceholderSheetId) {
		super();
		this.sheetId = sheetId;
		this.oldName = oldName;
		this.newName = newName;
		this.version = version;
		this.mergedPlaceholderSheetId = mergedPlaceholderSheetId;
	}
	doUndo(undoRedo) {
		undoRedo.undoRenameSheet(this);
	}
	doRedo(undoRedo) {
		undoRedo.redoRenameSheet(this);
	}
};
var ClearSheetUndoEntry = class extends BaseUndoEntry {
	constructor(sheetId, oldSheetContent) {
		super();
		this.sheetId = sheetId;
		this.oldSheetContent = oldSheetContent;
	}
	doUndo(undoRedo) {
		undoRedo.undoClearSheet(this);
	}
	doRedo(undoRedo) {
		undoRedo.redoClearSheet(this);
	}
};
var SetCellContentsUndoEntry = class extends BaseUndoEntry {
	constructor(cellContents) {
		super();
		this.cellContents = cellContents;
	}
	doUndo(undoRedo) {
		undoRedo.undoSetCellContents(this);
	}
	doRedo(undoRedo) {
		undoRedo.redoSetCellContents(this);
	}
};
var PasteUndoEntry = class extends BaseUndoEntry {
	constructor(targetLeftCorner, oldContent, newContent, addedGlobalNamedExpressions) {
		super();
		this.targetLeftCorner = targetLeftCorner;
		this.oldContent = oldContent;
		this.newContent = newContent;
		this.addedGlobalNamedExpressions = addedGlobalNamedExpressions;
	}
	doUndo(undoRedo) {
		undoRedo.undoPaste(this);
	}
	doRedo(undoRedo) {
		undoRedo.redoPaste(this);
	}
};
var AddNamedExpressionUndoEntry = class extends BaseUndoEntry {
	constructor(name, newContent, scope, options) {
		super();
		this.name = name;
		this.newContent = newContent;
		this.scope = scope;
		this.options = options;
	}
	doUndo(undoRedo) {
		undoRedo.undoAddNamedExpression(this);
	}
	doRedo(undoRedo) {
		undoRedo.redoAddNamedExpression(this);
	}
};
var RemoveNamedExpressionUndoEntry = class extends BaseUndoEntry {
	constructor(namedExpression, content, scope) {
		super();
		this.namedExpression = namedExpression;
		this.content = content;
		this.scope = scope;
	}
	doUndo(undoRedo) {
		undoRedo.undoRemoveNamedExpression(this);
	}
	doRedo(undoRedo) {
		undoRedo.redoRemoveNamedExpression(this);
	}
};
var ChangeNamedExpressionUndoEntry = class extends BaseUndoEntry {
	constructor(namedExpression, newContent, oldContent, scope, options) {
		super();
		this.namedExpression = namedExpression;
		this.newContent = newContent;
		this.oldContent = oldContent;
		this.scope = scope;
		this.options = options;
	}
	doUndo(undoRedo) {
		undoRedo.undoChangeNamedExpression(this);
	}
	doRedo(undoRedo) {
		undoRedo.redoChangeNamedExpression(this);
	}
};
var BatchUndoEntry = class extends BaseUndoEntry {
	constructor() {
		super(...arguments);
		this.operations = [];
	}
	add(operation) {
		this.operations.push(operation);
	}
	*reversedOperations() {
		for (let i = this.operations.length - 1; i >= 0; i--) yield this.operations[i];
	}
	doUndo(undoRedo) {
		undoRedo.undoBatch(this);
	}
	doRedo(undoRedo) {
		undoRedo.redoBatch(this);
	}
};
var UndoRedo = class {
	constructor(config, operations) {
		this.operations = operations;
		this.oldData = /* @__PURE__ */ new Map();
		this.undoStack = [];
		this.redoStack = [];
		this.undoLimit = config.undoLimit;
	}
	saveOperation(operation) {
		if (this.batchUndoEntry !== void 0) this.batchUndoEntry.add(operation);
		else this.addUndoEntry(operation);
	}
	beginBatchMode() {
		this.batchUndoEntry = new BatchUndoEntry();
	}
	commitBatchMode() {
		if (this.batchUndoEntry === void 0) throw Error("Batch mode wasn't started");
		this.addUndoEntry(this.batchUndoEntry);
		this.batchUndoEntry = void 0;
	}
	storeDataForVersion(version, address, astHash) {
		if (!this.oldData.has(version)) this.oldData.set(version, []);
		this.oldData.get(version).push([address, astHash]);
	}
	clearRedoStack() {
		this.redoStack = [];
	}
	clearUndoStack() {
		this.undoStack = [];
	}
	isUndoStackEmpty() {
		return this.undoStack.length === 0;
	}
	isRedoStackEmpty() {
		return this.redoStack.length === 0;
	}
	undo() {
		const operation = this.undoStack.pop();
		if (!operation) throw Error("Attempted to undo without operation on stack");
		this.undoEntry(operation);
		this.redoStack.push(operation);
	}
	undoBatch(batchOperation) {
		for (const operation of batchOperation.reversedOperations()) this.undoEntry(operation);
	}
	undoRemoveRows(operation) {
		this.operations.forceApplyPostponedTransformations();
		const { command: { sheet }, rowsRemovals } = operation;
		for (let i = rowsRemovals.length - 1; i >= 0; --i) {
			const rowsRemoval = rowsRemovals[i];
			this.operations.addRows(new AddRowsCommand(sheet, [[rowsRemoval.rowFrom, rowsRemoval.rowCount]]));
			for (const { address, cellType } of rowsRemoval.removedCells) this.operations.restoreCell(address, cellType);
			this.restoreOldDataFromVersion(rowsRemoval.version - 1);
		}
	}
	undoRemoveColumns(operation) {
		this.operations.forceApplyPostponedTransformations();
		const { command: { sheet }, columnsRemovals } = operation;
		for (let i = columnsRemovals.length - 1; i >= 0; --i) {
			const columnsRemoval = columnsRemovals[i];
			this.operations.addColumns(new AddColumnsCommand(sheet, [[columnsRemoval.columnFrom, columnsRemoval.columnCount]]));
			for (const { address, cellType } of columnsRemoval.removedCells) this.operations.restoreCell(address, cellType);
			this.restoreOldDataFromVersion(columnsRemoval.version - 1);
		}
	}
	undoAddRows(operation) {
		const addedRowsSpans = operation.command.rowsSpans();
		for (let i = addedRowsSpans.length - 1; i >= 0; --i) {
			const addedRows = addedRowsSpans[i];
			this.operations.removeRows(new RemoveRowsCommand(operation.command.sheet, [[addedRows.rowStart, addedRows.numberOfRows]]));
		}
	}
	undoAddColumns(operation) {
		const addedColumnsSpans = operation.command.columnsSpans();
		for (let i = addedColumnsSpans.length - 1; i >= 0; --i) {
			const addedColumns = addedColumnsSpans[i];
			this.operations.removeColumns(new RemoveColumnsCommand(operation.command.sheet, [[addedColumns.columnStart, addedColumns.numberOfColumns]]));
		}
	}
	undoSetCellContents(operation) {
		for (const cellContentData of operation.cellContents) {
			const address = cellContentData.address;
			const [oldContentAddress, oldContent] = cellContentData.oldContent;
			if (!equalSimpleCellAddress(address, oldContentAddress)) this.operations.setCellEmpty(address);
			this.operations.restoreCell(oldContentAddress, oldContent);
		}
	}
	undoPaste(operation) {
		this.restoreOperationOldContent(operation.oldContent);
		for (const namedExpression of operation.addedGlobalNamedExpressions) this.operations.removeNamedExpression(namedExpression);
	}
	undoMoveRows(operation) {
		const { sheet } = operation;
		this.operations.moveRows(sheet, operation.undoStart, operation.numberOfRows, operation.undoEnd);
		this.restoreOldDataFromVersion(operation.version - 1);
	}
	undoMoveColumns(operation) {
		const { sheet } = operation;
		this.operations.moveColumns(sheet, operation.undoStart, operation.numberOfColumns, operation.undoEnd);
		this.restoreOldDataFromVersion(operation.version - 1);
	}
	undoMoveCells(operation) {
		this.operations.forceApplyPostponedTransformations();
		this.operations.moveCells(operation.destinationLeftCorner, operation.width, operation.height, operation.sourceLeftCorner);
		this.restoreOperationOldContent(operation.overwrittenCellsData);
		this.restoreOldDataFromVersion(operation.version - 1);
		for (const namedExpression of operation.addedGlobalNamedExpressions) this.operations.removeNamedExpression(namedExpression);
	}
	undoAddSheet(operation) {
		const { sheetName } = operation;
		this.operations.removeSheetByName(sheetName);
	}
	undoRemoveSheet(operation) {
		this.operations.forceApplyPostponedTransformations();
		const { oldSheetContent, sheetId, scopedNamedExpressions, sheetName } = operation;
		this.operations.addSheetWithId(sheetId, sheetName);
		for (let rowIndex = 0; rowIndex < oldSheetContent.length; rowIndex++) {
			const row = oldSheetContent[rowIndex];
			for (let col = 0; col < row.length; col++) {
				const cellType = row[col];
				const address = simpleCellAddress(sheetId, col, rowIndex);
				this.operations.restoreCell(address, cellType);
			}
		}
		for (const [namedexpression, content] of scopedNamedExpressions) this.operations.restoreNamedExpression(namedexpression, content, sheetId);
	}
	undoRenameSheet(operation) {
		this.operations.forceApplyPostponedTransformations();
		this.operations.renameSheet(operation.sheetId, operation.oldName);
		if (operation.mergedPlaceholderSheetId !== void 0 && operation.version !== void 0) {
			this.operations.addPlaceholderSheetWithId(operation.mergedPlaceholderSheetId, operation.newName);
			this.restoreOldDataFromVersion(operation.version - 1);
		}
	}
	undoClearSheet(operation) {
		const { oldSheetContent, sheetId } = operation;
		for (let rowIndex = 0; rowIndex < oldSheetContent.length; rowIndex++) {
			const row = oldSheetContent[rowIndex];
			for (let col = 0; col < row.length; col++) {
				const cellType = row[col];
				const address = simpleCellAddress(sheetId, col, rowIndex);
				this.operations.restoreCell(address, cellType);
			}
		}
	}
	undoSetSheetContent(operation) {
		const { oldSheetContent, sheetId } = operation;
		this.operations.clearSheet(sheetId);
		for (let rowIndex = 0; rowIndex < oldSheetContent.length; rowIndex++) {
			const row = oldSheetContent[rowIndex];
			for (let col = 0; col < row.length; col++) {
				const cellType = row[col];
				const address = simpleCellAddress(sheetId, col, rowIndex);
				this.operations.restoreCell(address, cellType);
			}
		}
	}
	undoAddNamedExpression(operation) {
		this.operations.removeNamedExpression(operation.name, operation.scope);
	}
	undoRemoveNamedExpression(operation) {
		this.operations.restoreNamedExpression(operation.namedExpression, operation.content, operation.scope);
	}
	undoChangeNamedExpression(operation) {
		this.operations.restoreNamedExpression(operation.namedExpression, operation.oldContent, operation.scope);
	}
	undoSetRowOrder(operation) {
		this.restoreOperationOldContent(operation.oldContent);
	}
	undoSetColumnOrder(operation) {
		this.restoreOperationOldContent(operation.oldContent);
	}
	redo() {
		const operation = this.redoStack.pop();
		if (!operation) throw Error("Attempted to redo without operation on stack");
		this.redoEntry(operation);
		this.undoStack.push(operation);
	}
	redoBatch(batchOperation) {
		for (const operation of batchOperation.operations) this.redoEntry(operation);
	}
	redoRemoveRows(operation) {
		this.operations.removeRows(operation.command);
	}
	redoMoveCells(operation) {
		this.operations.moveCells(operation.sourceLeftCorner, operation.width, operation.height, operation.destinationLeftCorner);
	}
	redoRemoveColumns(operation) {
		this.operations.removeColumns(operation.command);
	}
	redoPaste(operation) {
		const { targetLeftCorner, newContent } = operation;
		const height = newContent.length;
		const width = newContent[0].length;
		for (let y = 0; y < height; ++y) for (let x = 0; x < width; ++x) {
			const address = simpleCellAddress(targetLeftCorner.sheet, targetLeftCorner.col + x, targetLeftCorner.row + y);
			this.operations.restoreCell(address, newContent[y][x]);
		}
	}
	redoSetCellContents(operation) {
		for (const cellContentData of operation.cellContents) this.operations.setCellContent(cellContentData.address, cellContentData.newContent);
	}
	redoAddRows(operation) {
		this.operations.addRows(operation.command);
	}
	redoAddColumns(operation) {
		this.operations.addColumns(operation.command);
	}
	redoRemoveSheet(operation) {
		this.operations.removeSheetByName(operation.sheetName);
	}
	redoAddSheet(operation) {
		this.operations.addSheetWithId(operation.sheetId, operation.sheetName);
	}
	redoRenameSheet(operation) {
		this.operations.renameSheet(operation.sheetId, operation.newName);
	}
	redoMoveRows(operation) {
		this.operations.moveRows(operation.sheet, operation.startRow, operation.numberOfRows, operation.targetRow);
	}
	redoMoveColumns(operation) {
		this.operations.moveColumns(operation.sheet, operation.startColumn, operation.numberOfColumns, operation.targetColumn);
	}
	redoClearSheet(operation) {
		this.operations.clearSheet(operation.sheetId);
	}
	redoSetSheetContent(operation) {
		const { sheetId, newSheetContent } = operation;
		this.operations.setSheetContent(sheetId, newSheetContent);
	}
	redoAddNamedExpression(operation) {
		this.operations.addNamedExpression(operation.name, operation.newContent, operation.scope, operation.options);
	}
	redoRemoveNamedExpression(operation) {
		this.operations.removeNamedExpression(operation.namedExpression.displayName, operation.scope);
	}
	redoChangeNamedExpression(operation) {
		this.operations.changeNamedExpressionExpression(operation.namedExpression.displayName, operation.newContent, operation.scope, operation.options);
	}
	redoSetRowOrder(operation) {
		this.operations.setRowOrder(operation.sheetId, operation.rowMapping);
	}
	redoSetColumnOrder(operation) {
		this.operations.setColumnOrder(operation.sheetId, operation.columnMapping);
	}
	addUndoEntry(operation) {
		this.undoStack.push(operation);
		this.undoStack.splice(0, Math.max(0, this.undoStack.length - this.undoLimit));
	}
	undoEntry(operation) {
		operation.doUndo(this);
	}
	restoreOperationOldContent(oldContent) {
		for (const [address, clipboardCell] of oldContent) this.operations.restoreCell(address, clipboardCell);
	}
	redoEntry(operation) {
		operation.doRedo(this);
	}
	restoreOldDataFromVersion(version) {
		const oldDataToRestore = this.oldData.get(version) || [];
		for (const entryToRestore of oldDataToRestore) {
			const [address, hash] = entryToRestore;
			this.operations.setFormulaToCellFromCache(hash, address);
		}
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/CrudOperations.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var CrudOperations = class {
	constructor(config, operations, undoRedo, clipboardOperations, dependencyGraph, columnSearch, parser, cellContentParser, lazilyTransformingAstService, namedExpressions) {
		this.operations = operations;
		this.undoRedo = undoRedo;
		this.clipboardOperations = clipboardOperations;
		this.dependencyGraph = dependencyGraph;
		this.columnSearch = columnSearch;
		this.parser = parser;
		this.cellContentParser = cellContentParser;
		this.lazilyTransformingAstService = lazilyTransformingAstService;
		this.namedExpressions = namedExpressions;
		this.maxRows = config.maxRows;
		this.maxColumns = config.maxColumns;
	}
	get sheetMapping() {
		return this.dependencyGraph.sheetMapping;
	}
	addRows(sheet, ...indexes) {
		const addRowsCommand = new AddRowsCommand(sheet, indexes);
		this.ensureItIsPossibleToAddRows(sheet, ...indexes);
		this.undoRedo.clearRedoStack();
		this.clipboardOperations.abortCut();
		this.operations.addRows(addRowsCommand);
		this.undoRedo.saveOperation(new AddRowsUndoEntry(addRowsCommand));
	}
	removeRows(sheet, ...indexes) {
		const removeRowsCommand = new RemoveRowsCommand(sheet, indexes);
		this.ensureItIsPossibleToRemoveRows(sheet, ...indexes);
		this.undoRedo.clearRedoStack();
		this.clipboardOperations.abortCut();
		const rowsRemovals = this.operations.removeRows(removeRowsCommand);
		this.undoRedo.saveOperation(new RemoveRowsUndoEntry(removeRowsCommand, rowsRemovals));
	}
	addColumns(sheet, ...indexes) {
		const addColumnsCommand = new AddColumnsCommand(sheet, indexes);
		this.ensureItIsPossibleToAddColumns(sheet, ...indexes);
		this.undoRedo.clearRedoStack();
		this.clipboardOperations.abortCut();
		this.operations.addColumns(addColumnsCommand);
		this.undoRedo.saveOperation(new AddColumnsUndoEntry(addColumnsCommand));
	}
	removeColumns(sheet, ...indexes) {
		const removeColumnsCommand = new RemoveColumnsCommand(sheet, indexes);
		this.ensureItIsPossibleToRemoveColumns(sheet, ...indexes);
		this.undoRedo.clearRedoStack();
		this.clipboardOperations.abortCut();
		const columnsRemovals = this.operations.removeColumns(removeColumnsCommand);
		this.undoRedo.saveOperation(new RemoveColumnsUndoEntry(removeColumnsCommand, columnsRemovals));
	}
	moveCells(sourceLeftCorner, width, height, destinationLeftCorner) {
		this.undoRedo.clearRedoStack();
		this.clipboardOperations.abortCut();
		const { version, overwrittenCellsData, addedGlobalNamedExpressions } = this.operations.moveCells(sourceLeftCorner, width, height, destinationLeftCorner);
		this.undoRedo.saveOperation(new MoveCellsUndoEntry(sourceLeftCorner, width, height, destinationLeftCorner, overwrittenCellsData, addedGlobalNamedExpressions, version));
	}
	moveRows(sheet, startRow, numberOfRows, targetRow) {
		this.ensureItIsPossibleToMoveRows(sheet, startRow, numberOfRows, targetRow);
		this.undoRedo.clearRedoStack();
		this.clipboardOperations.abortCut();
		const version = this.operations.moveRows(sheet, startRow, numberOfRows, targetRow);
		this.undoRedo.saveOperation(new MoveRowsUndoEntry(sheet, startRow, numberOfRows, targetRow, version));
	}
	moveColumns(sheet, startColumn, numberOfColumns, targetColumn) {
		this.ensureItIsPossibleToMoveColumns(sheet, startColumn, numberOfColumns, targetColumn);
		this.undoRedo.clearRedoStack();
		const version = this.operations.moveColumns(sheet, startColumn, numberOfColumns, targetColumn);
		this.undoRedo.saveOperation(new MoveColumnsUndoEntry(sheet, startColumn, numberOfColumns, targetColumn, version));
	}
	cut(sourceLeftCorner, width, height) {
		this.clipboardOperations.cut(sourceLeftCorner, width, height);
	}
	ensureItIsPossibleToCopy(sourceLeftCorner, width, height) {
		if (!isPositiveInteger(width)) throw new InvalidArgumentsError("width to be positive integer.");
		if (!isPositiveInteger(height)) throw new InvalidArgumentsError("height to be positive integer.");
	}
	copy(sourceLeftCorner, width, height) {
		this.ensureItIsPossibleToCopy(sourceLeftCorner, width, height);
		this.clipboardOperations.copy(sourceLeftCorner, width, height);
	}
	paste(targetLeftCorner) {
		const clipboard = this.clipboardOperations.clipboard;
		if (clipboard === void 0) throw new NothingToPasteError();
		else if (this.clipboardOperations.isCutClipboard()) this.moveCells(clipboard.sourceLeftCorner, clipboard.width, clipboard.height, targetLeftCorner);
		else if (this.clipboardOperations.isCopyClipboard()) {
			this.clipboardOperations.ensureItIsPossibleToCopyPaste(targetLeftCorner);
			const targetRange = AbsoluteCellRange.spanFrom(targetLeftCorner, clipboard.width, clipboard.height);
			const oldContent = this.operations.getRangeClipboardCells(targetRange);
			this.undoRedo.clearRedoStack();
			const addedGlobalNamedExpressions = this.operations.restoreClipboardCells(clipboard.sourceLeftCorner.sheet, clipboard.getContent(targetLeftCorner));
			this.undoRedo.saveOperation(new PasteUndoEntry(targetLeftCorner, oldContent, clipboard.content, addedGlobalNamedExpressions));
		}
	}
	beginUndoRedoBatchMode() {
		this.undoRedo.beginBatchMode();
	}
	commitUndoRedoBatchMode() {
		this.undoRedo.commitBatchMode();
	}
	isClipboardEmpty() {
		return this.clipboardOperations.clipboard === void 0;
	}
	clearClipboard() {
		this.clipboardOperations.clear();
	}
	addSheet(name) {
		if (name !== void 0) this.ensureItIsPossibleToAddSheet(name);
		this.undoRedo.clearRedoStack();
		const { sheetName, sheetId } = this.operations.addSheet(name);
		this.undoRedo.saveOperation(new AddSheetUndoEntry(sheetName, sheetId));
		return sheetName;
	}
	removeSheet(sheetId) {
		this.ensureScopeIdIsValid(sheetId);
		this.undoRedo.clearRedoStack();
		this.clipboardOperations.abortCut();
		const originalName = this.sheetMapping.getSheetNameOrThrowError(sheetId);
		const oldSheetContent = this.operations.getSheetClipboardCells(sheetId);
		const scopedNamedExpressions = this.operations.removeSheet(sheetId);
		this.undoRedo.saveOperation(new RemoveSheetUndoEntry(originalName, sheetId, oldSheetContent, scopedNamedExpressions));
	}
	renameSheet(sheetId, newName) {
		this.ensureItIsPossibleToRenameSheet(sheetId, newName);
		const { previousDisplayName, version, mergedPlaceholderSheetId } = this.operations.renameSheet(sheetId, newName);
		if (previousDisplayName !== void 0) {
			this.undoRedo.clearRedoStack();
			this.undoRedo.saveOperation(new RenameSheetUndoEntry(sheetId, previousDisplayName, newName, version, mergedPlaceholderSheetId));
		}
		return previousDisplayName;
	}
	clearSheet(sheetId) {
		this.ensureScopeIdIsValid(sheetId);
		this.undoRedo.clearRedoStack();
		this.clipboardOperations.abortCut();
		const oldSheetContent = this.operations.getSheetClipboardCells(sheetId);
		this.operations.clearSheet(sheetId);
		this.undoRedo.saveOperation(new ClearSheetUndoEntry(sheetId, oldSheetContent));
	}
	setCellContents(topLeftCornerAddress, cellContents) {
		if (!(cellContents instanceof Array)) cellContents = [[cellContents]];
		else for (let i = 0; i < cellContents.length; i++) if (!(cellContents[i] instanceof Array)) throw new InvalidArgumentsError("an array of arrays or a raw cell value.");
		this.ensureItIsPossibleToChangeCellContents(topLeftCornerAddress, cellContents);
		this.undoRedo.clearRedoStack();
		const oldContents = [];
		for (let i = 0; i < cellContents.length; i++) for (let j = 0; j < cellContents[i].length; j++) {
			const address = {
				sheet: topLeftCornerAddress.sheet,
				row: topLeftCornerAddress.row + i,
				col: topLeftCornerAddress.col + j
			};
			const newContent = cellContents[i][j];
			this.clipboardOperations.abortCut();
			const oldContent = this.operations.setCellContent(address, newContent);
			oldContents.push({
				address,
				newContent,
				oldContent
			});
		}
		this.undoRedo.saveOperation(new SetCellContentsUndoEntry(oldContents));
	}
	setSheetContent(sheetId, values) {
		this.ensureScopeIdIsValid(sheetId);
		this.ensureItIsPossibleToChangeSheetContents(sheetId, values);
		validateAsSheet(values);
		this.undoRedo.clearRedoStack();
		this.clipboardOperations.abortCut();
		const oldSheetContent = this.operations.getSheetClipboardCells(sheetId);
		this.operations.setSheetContent(sheetId, values);
		this.undoRedo.saveOperation(new SetSheetContentUndoEntry(sheetId, oldSheetContent, values));
	}
	setRowOrder(sheetId, rowMapping) {
		this.validateSwapRowIndexes(sheetId, rowMapping);
		this.testRowOrderForArrays(sheetId, rowMapping);
		this.undoRedo.clearRedoStack();
		this.clipboardOperations.abortCut();
		const oldContent = this.operations.setRowOrder(sheetId, rowMapping);
		this.undoRedo.saveOperation(new SetRowOrderUndoEntry(sheetId, rowMapping, oldContent));
	}
	validateSwapRowIndexes(sheetId, rowMapping) {
		if (!this.sheetMapping.hasSheetWithId(sheetId)) throw new NoSheetWithIdError(sheetId);
		this.validateRowOrColumnMapping(sheetId, rowMapping, "row");
	}
	testColumnOrderForArrays(sheetId, columnMapping) {
		for (const [source, target] of columnMapping) if (source !== target) {
			const rowRange = AbsoluteCellRange.spanFrom({
				sheet: sheetId,
				col: source,
				row: 0
			}, 1, Infinity);
			if (this.dependencyGraph.arrayMapping.isFormulaArrayInRange(rowRange)) throw new SourceLocationHasArrayError();
		}
	}
	setColumnOrder(sheetId, columnMapping) {
		this.validateSwapColumnIndexes(sheetId, columnMapping);
		this.testColumnOrderForArrays(sheetId, columnMapping);
		this.undoRedo.clearRedoStack();
		this.clipboardOperations.abortCut();
		const oldContent = this.operations.setColumnOrder(sheetId, columnMapping);
		this.undoRedo.saveOperation(new SetColumnOrderUndoEntry(sheetId, columnMapping, oldContent));
	}
	validateSwapColumnIndexes(sheetId, columnMapping) {
		if (!this.sheetMapping.hasSheetWithId(sheetId)) throw new NoSheetWithIdError(sheetId);
		this.validateRowOrColumnMapping(sheetId, columnMapping, "column");
	}
	testRowOrderForArrays(sheetId, rowMapping) {
		for (const [source, target] of rowMapping) if (source !== target) {
			const rowRange = AbsoluteCellRange.spanFrom({
				sheet: sheetId,
				col: 0,
				row: source
			}, Infinity, 1);
			if (this.dependencyGraph.arrayMapping.isFormulaArrayInRange(rowRange)) throw new SourceLocationHasArrayError();
		}
	}
	mappingFromOrder(sheetId, newOrder, rowOrColumn) {
		if (!this.sheetMapping.hasSheetWithId(sheetId)) throw new NoSheetWithIdError(sheetId);
		const limit = rowOrColumn === "row" ? this.dependencyGraph.getSheetHeight(sheetId) : this.dependencyGraph.getSheetWidth(sheetId);
		if (newOrder.length !== limit) throw new InvalidArgumentsError(`number of ${rowOrColumn}s provided to be sheet ${rowOrColumn === "row" ? "height" : "width"}.`);
		const ret = [];
		for (let i = 0; i < limit; i++) if (newOrder[i] !== i) ret.push([i, newOrder[i]]);
		return ret;
	}
	undo() {
		if (this.undoRedo.isUndoStackEmpty()) throw new NoOperationToUndoError();
		this.clipboardOperations.abortCut();
		this.undoRedo.undo();
	}
	redo() {
		if (this.undoRedo.isRedoStackEmpty()) throw new NoOperationToRedoError();
		this.clipboardOperations.abortCut();
		this.undoRedo.redo();
	}
	addNamedExpression(expressionName, expression, sheetId, options) {
		this.ensureItIsPossibleToAddNamedExpression(expressionName, expression, sheetId);
		this.operations.addNamedExpression(expressionName, expression, sheetId, options);
		this.undoRedo.clearRedoStack();
		this.clipboardOperations.abortCut();
		this.undoRedo.saveOperation(new AddNamedExpressionUndoEntry(expressionName, expression, sheetId, options));
	}
	changeNamedExpressionExpression(expressionName, sheetId, newExpression, options) {
		this.ensureItIsPossibleToChangeNamedExpression(expressionName, newExpression, sheetId);
		const [oldNamedExpression, content] = this.operations.changeNamedExpressionExpression(expressionName, newExpression, sheetId, options);
		this.undoRedo.clearRedoStack();
		this.clipboardOperations.abortCut();
		this.undoRedo.saveOperation(new ChangeNamedExpressionUndoEntry(oldNamedExpression, newExpression, content, sheetId, options));
	}
	removeNamedExpression(expressionName, sheetId) {
		this.ensureScopeIdIsValid(sheetId);
		const [namedExpression, content] = this.operations.removeNamedExpression(expressionName, sheetId);
		this.undoRedo.clearRedoStack();
		this.clipboardOperations.abortCut();
		this.undoRedo.saveOperation(new RemoveNamedExpressionUndoEntry(namedExpression, content, sheetId));
		return namedExpression;
	}
	ensureItIsPossibleToAddNamedExpression(expressionName, expression, sheetId) {
		this.ensureScopeIdIsValid(sheetId);
		this.ensureNamedExpressionNameIsValid(expressionName, sheetId);
		this.ensureNamedExpressionIsValid(expression);
	}
	ensureItIsPossibleToChangeNamedExpression(expressionName, expression, sheetId) {
		this.ensureScopeIdIsValid(sheetId);
		if (this.namedExpressions.namedExpressionForScope(expressionName, sheetId) === void 0) throw new NamedExpressionDoesNotExistError(expressionName);
		this.ensureNamedExpressionIsValid(expression);
	}
	isItPossibleToRemoveNamedExpression(expressionName, sheetId) {
		this.ensureScopeIdIsValid(sheetId);
		if (this.namedExpressions.namedExpressionForScope(expressionName, sheetId) === void 0) throw new NamedExpressionDoesNotExistError(expressionName);
	}
	ensureItIsPossibleToAddRows(sheet, ...indexes) {
		if (!this.sheetMapping.hasSheetWithId(sheet)) throw new NoSheetWithIdError(sheet);
		if (this.dependencyGraph.getSheetHeight(sheet) + indexes.map((index) => index[1]).reduce((a, b) => a + b, 0) > this.maxRows) throw new SheetSizeLimitExceededError();
		for (const [row, numberOfRowsToAdd] of indexes) if (!isNonnegativeInteger(row) || !isPositiveInteger(numberOfRowsToAdd)) throw new InvalidArgumentsError("row number to be nonnegative and number of rows to add to be positive.");
	}
	ensureItIsPossibleToRemoveRows(sheet, ...indexes) {
		for (const [rowStart, numberOfRows] of indexes) {
			const rowEnd = rowStart + numberOfRows - 1;
			if (!isNonnegativeInteger(rowStart) || !isNonnegativeInteger(rowEnd)) throw new InvalidArgumentsError("starting and ending row to be nonnegative.");
			if (rowEnd < rowStart) throw new InvalidArgumentsError("starting row to be smaller than the ending row.");
			if (!this.sheetMapping.hasSheetWithId(sheet)) throw new NoSheetWithIdError(sheet);
		}
	}
	ensureItIsPossibleToAddColumns(sheet, ...indexes) {
		if (!this.sheetMapping.hasSheetWithId(sheet)) throw new NoSheetWithIdError(sheet);
		if (this.dependencyGraph.getSheetWidth(sheet) + indexes.map((index) => index[1]).reduce((a, b) => a + b, 0) > this.maxColumns) throw new SheetSizeLimitExceededError();
		for (const [column, numberOfColumnsToAdd] of indexes) if (!isNonnegativeInteger(column) || !isPositiveInteger(numberOfColumnsToAdd)) throw new InvalidArgumentsError("column number to be nonnegative and number of columns to add to be positive.");
	}
	ensureItIsPossibleToRemoveColumns(sheet, ...indexes) {
		for (const [columnStart, numberOfColumns] of indexes) {
			const columnEnd = columnStart + numberOfColumns - 1;
			if (!isNonnegativeInteger(columnStart) || !isNonnegativeInteger(columnEnd)) throw new InvalidArgumentsError("starting and ending column to be nonnegative.");
			if (columnEnd < columnStart) throw new InvalidArgumentsError("starting column to be smaller than the ending column.");
			if (!this.sheetMapping.hasSheetWithId(sheet)) throw new NoSheetWithIdError(sheet);
		}
	}
	ensureItIsPossibleToMoveRows(sheet, startRow, numberOfRows, targetRow) {
		this.ensureItIsPossibleToAddRows(sheet, [targetRow, numberOfRows]);
		const sourceStart = simpleCellAddress(sheet, 0, startRow);
		const targetStart = simpleCellAddress(sheet, 0, targetRow);
		if (!this.sheetMapping.hasSheetWithId(sheet) || isColOrRowInvalid(sourceStart) || isColOrRowInvalid(targetStart) || !isPositiveInteger(numberOfRows) || targetRow <= startRow + numberOfRows && targetRow >= startRow) throw new InvalidArgumentsError("a valid range of rows to move.");
		const width = this.dependencyGraph.getSheetWidth(sheet);
		const sourceRange = AbsoluteCellRange.spanFrom(sourceStart, width, numberOfRows);
		if (this.dependencyGraph.arrayMapping.isFormulaArrayInRange(sourceRange)) throw new SourceLocationHasArrayError();
		if (targetRow > 0 && this.dependencyGraph.arrayMapping.isFormulaArrayInAllRows(RowsSpan.fromNumberOfRows(sheet, targetRow - 1, 2))) throw new TargetLocationHasArrayError();
	}
	ensureItIsPossibleToMoveColumns(sheet, startColumn, numberOfColumns, targetColumn) {
		this.ensureItIsPossibleToAddColumns(sheet, [targetColumn, numberOfColumns]);
		const sourceStart = simpleCellAddress(sheet, startColumn, 0);
		const targetStart = simpleCellAddress(sheet, targetColumn, 0);
		if (!this.sheetMapping.hasSheetWithId(sheet) || isColOrRowInvalid(sourceStart) || isColOrRowInvalid(targetStart) || !isPositiveInteger(numberOfColumns) || targetColumn <= startColumn + numberOfColumns && targetColumn >= startColumn) throw new InvalidArgumentsError("a valid range of columns to move.");
		const sheetHeight = this.dependencyGraph.getSheetHeight(sheet);
		const sourceRange = AbsoluteCellRange.spanFrom(sourceStart, numberOfColumns, sheetHeight);
		if (this.dependencyGraph.arrayMapping.isFormulaArrayInRange(sourceRange)) throw new SourceLocationHasArrayError();
		if (targetColumn > 0 && this.dependencyGraph.arrayMapping.isFormulaArrayInAllColumns(ColumnsSpan.fromNumberOfColumns(sheet, targetColumn - 1, 2))) throw new TargetLocationHasArrayError();
	}
	ensureItIsPossibleToAddSheet(name) {
		if (this.sheetMapping.hasSheetWithName(name)) throw new SheetNameAlreadyTakenError(name);
	}
	ensureItIsPossibleToRenameSheet(sheetId, name) {
		if (!this.sheetMapping.hasSheetWithId(sheetId)) throw new NoSheetWithIdError(sheetId);
		const existingSheetId = this.sheetMapping.getSheetId(name);
		if (existingSheetId !== void 0 && existingSheetId !== sheetId) throw new SheetNameAlreadyTakenError(name);
	}
	ensureItIsPossibleToChangeContent(address) {
		if (isColOrRowInvalid(address)) throw new InvalidAddressError(address);
		if (!this.sheetMapping.hasSheetWithId(address.sheet)) throw new NoSheetWithIdError(address.sheet);
	}
	ensureItIsPossibleToChangeCellContents(inputAddress, content) {
		const boundaries = findBoundaries(content);
		const targetRange = AbsoluteCellRange.spanFrom(inputAddress, boundaries.width, boundaries.height);
		this.ensureRangeInSizeLimits(targetRange);
		for (const address of targetRange.addresses(this.dependencyGraph)) this.ensureItIsPossibleToChangeContent(address);
	}
	ensureItIsPossibleToChangeSheetContents(sheetId, content) {
		const boundaries = findBoundaries(content);
		const targetRange = AbsoluteCellRange.spanFrom(simpleCellAddress(sheetId, 0, 0), boundaries.width, boundaries.height);
		this.ensureRangeInSizeLimits(targetRange);
	}
	ensureRangeInSizeLimits(range) {
		if (range.exceedsSheetSizeLimits(this.maxColumns, this.maxRows)) throw new SheetSizeLimitExceededError();
	}
	isThereSomethingToUndo() {
		return !this.undoRedo.isUndoStackEmpty();
	}
	isThereSomethingToRedo() {
		return !this.undoRedo.isRedoStackEmpty();
	}
	getAndClearContentChanges() {
		return this.operations.getAndClearContentChanges();
	}
	ensureScopeIdIsValid(scopeId) {
		if (scopeId !== void 0 && !this.sheetMapping.hasSheetWithId(scopeId)) throw new NoSheetWithIdError(scopeId);
	}
	validateRowOrColumnMapping(sheetId, rowMapping, rowOrColumn) {
		const limit = rowOrColumn === "row" ? this.dependencyGraph.getSheetHeight(sheetId) : this.dependencyGraph.getSheetWidth(sheetId);
		const sources = rowMapping.map(([a, _]) => a).sort((a, b) => a - b);
		const targets = rowMapping.map(([_, b]) => b).sort((a, b) => a - b);
		for (let i = 0; i < sources.length; i++) {
			if (!isNonnegativeInteger(sources[i]) || sources[i] >= limit) throw new InvalidArgumentsError(`${rowOrColumn} numbers to be nonnegative integers and less than sheet ${rowOrColumn === "row" ? "height" : "width"}.`);
			if (sources[i] === sources[i + 1]) throw new InvalidArgumentsError(`source ${rowOrColumn} numbers to be unique.`);
			if (sources[i] !== targets[i]) throw new InvalidArgumentsError(`target ${rowOrColumn} numbers to be permutation of source ${rowOrColumn} numbers.`);
		}
	}
	ensureNamedExpressionNameIsValid(expressionName, sheetId) {
		if (!this.namedExpressions.isNameValid(expressionName)) throw new NamedExpressionNameIsInvalidError(expressionName);
		if (!this.namedExpressions.isNameAvailable(expressionName, sheetId)) throw new NamedExpressionNameIsAlreadyTakenError(expressionName);
	}
	ensureNamedExpressionIsValid(expression) {
		const parsedExpression = this.cellContentParser.parse(expression);
		if (parsedExpression instanceof CellContent.Formula) {
			if (doesContainRelativeReferences(this.parser.parse(parsedExpression.formula, simpleCellAddress(-1, 0, 0)).ast)) throw new NoRelativeAddressesAllowedError();
		}
	}
};
function isPositiveInteger(x) {
	return Number.isInteger(x) && x > 0;
}
function isNonnegativeInteger(x) {
	return Number.isInteger(x) && x >= 0;
}
//#endregion
//#region ../../node_modules/hyperformula/es/Evaluator.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var Evaluator = class {
	constructor(config, stats, interpreter, lazilyTransformingAstService, dependencyGraph, columnSearch) {
		this.config = config;
		this.stats = stats;
		this.interpreter = interpreter;
		this.lazilyTransformingAstService = lazilyTransformingAstService;
		this.dependencyGraph = dependencyGraph;
		this.columnSearch = columnSearch;
	}
	run() {
		this.stats.start(StatType.TOP_SORT);
		const { sorted, cycled } = this.dependencyGraph.topSortWithScc();
		this.stats.end(StatType.TOP_SORT);
		this.stats.measure(StatType.EVALUATION, () => {
			this.recomputeFormulas(cycled, sorted);
		});
	}
	partialRun(vertices) {
		const changes = ContentChanges.empty();
		this.stats.measure(StatType.EVALUATION, () => {
			this.dependencyGraph.graph.getTopSortedWithSccSubgraphFrom(vertices, (vertex) => this.recomputeVertex(vertex, changes), (vertex) => this.processVertexOnCycle(vertex, changes));
		});
		return changes;
	}
	runAndForget(ast, address, dependencies) {
		const tmpRanges = [];
		for (const dep of absolutizeDependencies(dependencies, address)) if (dep instanceof AbsoluteCellRange) {
			const range = dep;
			if (this.dependencyGraph.getRange(range.start, range.end) === void 0) {
				const rangeVertex = new RangeVertex(range);
				this.dependencyGraph.rangeMapping.addOrUpdateVertex(rangeVertex);
				tmpRanges.push(rangeVertex);
			}
		}
		const ret = this.evaluateAstToCellValue(ast, new InterpreterState(address, this.config.useArrayArithmetic));
		tmpRanges.forEach((rangeVertex) => {
			this.dependencyGraph.rangeMapping.removeVertexIfExists(rangeVertex);
		});
		return ret;
	}
	/**
	* Recalculates the value of a single vertex assuming its dependencies have already been recalculated
	*/
	recomputeVertex(vertex, changes) {
		if (vertex instanceof FormulaVertex) {
			const currentValue = vertex.isComputed() ? vertex.getCellValue() : void 0;
			const newCellValue = this.recomputeFormulaVertexValue(vertex);
			if (newCellValue !== currentValue) {
				const address = vertex.getAddress(this.lazilyTransformingAstService);
				changes.addChange(newCellValue, address);
				this.columnSearch.change(getRawValue(currentValue), getRawValue(newCellValue), address);
				return true;
			}
			return false;
		} else if (vertex instanceof RangeVertex) {
			vertex.clearCache();
			return true;
		} else return true;
	}
	/**
	* Processes a vertex that is part of a cycle in dependency graph
	*/
	processVertexOnCycle(vertex, changes) {
		if (vertex instanceof RangeVertex) vertex.clearCache();
		else if (vertex instanceof FormulaVertex) {
			const address = vertex.getAddress(this.lazilyTransformingAstService);
			this.columnSearch.remove(getRawValue(vertex.valueOrUndef()), address);
			const error = new CellError(ErrorType.CYCLE, void 0, vertex);
			vertex.setCellValue(error);
			changes.addChange(error, address);
		}
	}
	/**
	* Recalculates formulas in the topological sort order
	*/
	recomputeFormulas(cycled, sorted) {
		cycled.forEach((vertex) => {
			if (vertex instanceof FormulaVertex) vertex.setCellValue(new CellError(ErrorType.CYCLE, void 0, vertex));
		});
		sorted.forEach((vertex) => {
			if (vertex instanceof FormulaVertex) {
				const newCellValue = this.recomputeFormulaVertexValue(vertex);
				const address = vertex.getAddress(this.lazilyTransformingAstService);
				this.columnSearch.add(getRawValue(newCellValue), address);
			} else if (vertex instanceof RangeVertex) vertex.clearCache();
		});
	}
	recomputeFormulaVertexValue(vertex) {
		const address = vertex.getAddress(this.lazilyTransformingAstService);
		if (vertex instanceof ArrayFormulaVertex && (vertex.array.size.isRef || !this.dependencyGraph.isThereSpaceForArray(vertex))) return vertex.setNoSpace();
		else {
			const formula = vertex.getFormula(this.lazilyTransformingAstService);
			const newCellValue = this.evaluateAstToCellValue(formula, new InterpreterState(address, this.config.useArrayArithmetic, vertex));
			return vertex.setCellValue(newCellValue);
		}
	}
	evaluateAstToCellValue(ast, state) {
		const interpreterValue = this.interpreter.evaluateAst(ast, state);
		if (interpreterValue instanceof SimpleRangeValue) return interpreterValue;
		else if (interpreterValue === EmptyValue && this.config.evaluateNullToZero) return 0;
		else return interpreterValue;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/Exporter.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* A list of cells which values changed after the operation, their absolute addresses and new values.
*/
var ExportedCellChange = class {
	constructor(address, newValue) {
		this.address = address;
		this.newValue = newValue;
	}
	get col() {
		return this.address.col;
	}
	get row() {
		return this.address.row;
	}
	get sheet() {
		return this.address.sheet;
	}
	get value() {
		return this.newValue;
	}
};
var ExportedNamedExpressionChange = class {
	constructor(name, newValue) {
		this.name = name;
		this.newValue = newValue;
	}
};
var Exporter = class {
	constructor(config, namedExpressions, sheetMapping, lazilyTransformingService) {
		this.config = config;
		this.namedExpressions = namedExpressions;
		this.sheetMapping = sheetMapping;
		this.lazilyTransformingService = lazilyTransformingService;
	}
	exportChange(change) {
		const value = change.value;
		const address = change.address;
		if (address.sheet === NamedExpressions.SHEET_FOR_WORKBOOK_EXPRESSIONS) {
			const namedExpression = this.namedExpressions.namedExpressionInAddress(address.row);
			if (!namedExpression) throw new Error("Missing named expression");
			return new ExportedNamedExpressionChange(namedExpression.displayName, this.exportScalarOrRange(value));
		} else if (value instanceof SimpleRangeValue) {
			const result = [];
			for (const [cellValue, cellAddress] of value.entriesFromTopLeftCorner(address)) result.push(new ExportedCellChange(cellAddress, this.exportValue(cellValue)));
			return result;
		} else return new ExportedCellChange(address, this.exportValue(value));
	}
	exportValue(value) {
		if (value instanceof SimpleRangeValue) return this.detailedError(new CellError(ErrorType.VALUE, ErrorMessage.ScalarExpected));
		else if (this.config.smartRounding && isExtendedNumber(value)) return this.cellValueRounding(getRawValue(value));
		else if (value instanceof CellError) return this.detailedError(value);
		else if (value === EmptyValue) return null;
		else return getRawValue(value);
	}
	exportScalarOrRange(value) {
		if (value instanceof SimpleRangeValue) return value.rawData().map((row) => row.map((v) => this.exportValue(v)));
		else return this.exportValue(value);
	}
	detailedError(error) {
		var _a, _b;
		let address = void 0;
		const originAddress = (_a = error.root) === null || _a === void 0 ? void 0 : _a.getAddress(this.lazilyTransformingService);
		if (originAddress !== void 0) if (originAddress.sheet === NamedExpressions.SHEET_FOR_WORKBOOK_EXPRESSIONS) address = (_b = this.namedExpressions.namedExpressionInAddress(originAddress.row)) === null || _b === void 0 ? void 0 : _b.displayName;
		else address = simpleCellAddressToString(this.sheetMapping.getSheetNameOrThrowError.bind(this.sheetMapping), originAddress, -1);
		return new DetailedCellError(error, this.config.translationPackage.getErrorTranslation(error.type), address);
	}
	cellValueRounding(value) {
		if (value === 0) return value;
		const magnitudeMultiplierExponent = Math.floor(Math.log10(Math.abs(value)));
		const placesMultiplier = Math.pow(10, this.config.precisionRounding - magnitudeMultiplierExponent);
		if (value < 0) return -Math.round(-value * placesMultiplier) / placesMultiplier;
		else return Math.round(value * placesMultiplier) / placesMultiplier;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/GraphBuilder.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Service building the graph and mappings.
*/
var GraphBuilder = class {
	/**
	* Configures the building service.
	*/
	constructor(dependencyGraph, columnSearch, parser, cellContentParser, stats, arraySizePredictor) {
		this.dependencyGraph = dependencyGraph;
		this.columnSearch = columnSearch;
		this.parser = parser;
		this.cellContentParser = cellContentParser;
		this.stats = stats;
		this.arraySizePredictor = arraySizePredictor;
		this.buildStrategy = new SimpleStrategy(dependencyGraph, columnSearch, parser, stats, cellContentParser, arraySizePredictor);
	}
	/**
	* Builds graph.
	*/
	buildGraph(sheets, stats) {
		const dependencies = stats.measure(StatType.COLLECT_DEPENDENCIES, () => this.buildStrategy.run(sheets));
		this.dependencyGraph.getAndClearContentChanges();
		stats.measure(StatType.PROCESS_DEPENDENCIES, () => this.processDependencies(dependencies));
	}
	processDependencies(dependencies) {
		dependencies.forEach((cellDependencies, endVertex) => {
			this.dependencyGraph.processCellDependencies(cellDependencies, endVertex);
		});
	}
};
var SimpleStrategy = class {
	constructor(dependencyGraph, columnIndex, parser, stats, cellContentParser, arraySizePredictor) {
		this.dependencyGraph = dependencyGraph;
		this.columnIndex = columnIndex;
		this.parser = parser;
		this.stats = stats;
		this.cellContentParser = cellContentParser;
		this.arraySizePredictor = arraySizePredictor;
	}
	run(sheets) {
		const dependencies = /* @__PURE__ */ new Map();
		for (const sheetName in sheets) {
			const sheetId = this.dependencyGraph.getSheetId(sheetName);
			const sheet = sheets[sheetName];
			for (let i = 0; i < sheet.length; ++i) {
				const row = sheet[i];
				for (let j = 0; j < row.length; ++j) {
					const cellContent = row[j];
					const address = simpleCellAddress(sheetId, j, i);
					const parsedCellContent = this.cellContentParser.parse(cellContent);
					if (parsedCellContent instanceof CellContent.Formula) {
						const parseResult = this.stats.measure(StatType.PARSER, () => this.parser.parse(parsedCellContent.formula, address));
						if (parseResult.errors.length > 0) {
							this.shrinkArrayIfNeeded(address);
							const vertex = new ParsingErrorVertex(parseResult.errors, parsedCellContent.formula);
							this.dependencyGraph.addVertex(address, vertex);
						} else {
							this.shrinkArrayIfNeeded(address);
							const size = this.arraySizePredictor.checkArraySize(parseResult.ast, address);
							if (size.isScalar()) {
								const vertex = new ScalarFormulaVertex(parseResult.ast, address, 0);
								dependencies.set(vertex, absolutizeDependencies(parseResult.dependencies, address));
								this.dependencyGraph.addVertex(address, vertex);
								if (parseResult.hasVolatileFunction) this.dependencyGraph.markAsVolatile(vertex);
								if (parseResult.hasStructuralChangeFunction) this.dependencyGraph.markAsDependentOnStructureChange(vertex);
							} else {
								const vertex = new ArrayFormulaVertex(parseResult.ast, address, new ArraySize(size.width, size.height));
								dependencies.set(vertex, absolutizeDependencies(parseResult.dependencies, address));
								this.dependencyGraph.addArrayVertex(address, vertex);
							}
						}
					} else if (parsedCellContent instanceof CellContent.Empty) {} else {
						this.shrinkArrayIfNeeded(address);
						const vertex = new ValueCellVertex(parsedCellContent.value, cellContent);
						this.columnIndex.add(getRawValue(parsedCellContent.value), address);
						this.dependencyGraph.addVertex(address, vertex);
					}
				}
			}
		}
		return dependencies;
	}
	shrinkArrayIfNeeded(address) {
		const vertex = this.dependencyGraph.getCell(address);
		if (vertex instanceof ArrayFormulaVertex) this.dependencyGraph.shrinkArrayToCorner(vertex);
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/VersionPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var LICENSE_STATUS_MAP = new Map([
	["gpl-v3", 1],
	["missing", 2],
	["invalid", 3],
	["expired", 4]
]);
var VersionPlugin = class extends FunctionPlugin {
	version(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("VERSION"), () => {
			const { licenseKeyValidityState: validityState, licenseKey } = this.config;
			let status;
			if (LICENSE_STATUS_MAP.has(licenseKey)) status = LICENSE_STATUS_MAP.get(licenseKey);
			else if (LICENSE_STATUS_MAP.has(validityState)) status = LICENSE_STATUS_MAP.get(validityState);
			else if (validityState === "valid") status = licenseKey.slice(-5);
			return `HyperFormula v${HyperFormula.version}, ${status}`;
		});
	}
};
VersionPlugin.implementedFunctions = { "VERSION": {
	method: "version",
	parameters: []
} };
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/FunctionRegistry.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
function validateAndReturnMetadataFromName(functionId, plugin) {
	var _a;
	let entry = plugin.implementedFunctions[functionId];
	const key = (_a = plugin.aliases) === null || _a === void 0 ? void 0 : _a[functionId];
	if (key !== void 0) {
		if (entry !== void 0) throw new AliasAlreadyExisting(functionId, plugin.name);
		entry = plugin.implementedFunctions[key];
	}
	if (entry === void 0) throw FunctionPluginValidationError.functionNotDeclaredInPlugin(functionId, plugin.name);
	return entry;
}
var FunctionRegistry = class FunctionRegistry {
	constructor(config) {
		this.config = config;
		this.functions = /* @__PURE__ */ new Map();
		this.arraySizeFunctions = /* @__PURE__ */ new Map();
		this.volatileFunctions = /* @__PURE__ */ new Set();
		this.arrayFunctions = /* @__PURE__ */ new Set();
		this.structuralChangeFunctions = /* @__PURE__ */ new Set();
		this.functionsWhichDoesNotNeedArgumentsToBeComputed = /* @__PURE__ */ new Set();
		this.functionsMetadata = /* @__PURE__ */ new Map();
		this.doesFunctionNeedArgumentToBeComputed = (functionId) => this.functionsWhichDoesNotNeedArgumentsToBeComputed.has(functionId);
		this.isFunctionVolatile = (functionId) => this.volatileFunctions.has(functionId);
		this.isArrayFunction = (functionId) => this.arrayFunctions.has(functionId);
		this.isFunctionDependentOnSheetStructureChange = (functionId) => this.structuralChangeFunctions.has(functionId);
		if (config.functionPlugins.length > 0) {
			this.instancePlugins = /* @__PURE__ */ new Map();
			for (const plugin of config.functionPlugins) FunctionRegistry.loadPluginFunctions(plugin, this.instancePlugins);
		} else this.instancePlugins = new Map(FunctionRegistry.plugins);
		for (const [functionId, plugin] of FunctionRegistry.protectedFunctions()) FunctionRegistry.loadFunctionUnprotected(plugin, functionId, this.instancePlugins);
		for (const [functionId, plugin] of this.instancePlugins.entries()) this.categorizeFunction(functionId, validateAndReturnMetadataFromName(functionId, plugin));
	}
	static registerFunctionPlugin(plugin, translations) {
		this.loadPluginFunctions(plugin, this.plugins);
		if (translations !== void 0) this.loadTranslations(translations);
	}
	static registerFunction(functionId, plugin, translations) {
		this.loadPluginFunction(plugin, functionId, this.plugins);
		if (translations !== void 0) this.loadTranslations(translations);
	}
	static unregisterFunction(functionId) {
		if (this.functionIsProtected(functionId)) throw ProtectedFunctionError.cannotUnregisterFunctionWithId(functionId);
		this.plugins.delete(functionId);
	}
	static unregisterFunctionPlugin(plugin) {
		for (const protectedPlugin of this.protectedPlugins()) if (protectedPlugin === plugin) throw ProtectedFunctionError.cannotUnregisterProtectedPlugin();
		for (const [functionId, registeredPlugin] of this.plugins.entries()) if (registeredPlugin === plugin) this.plugins.delete(functionId);
	}
	static unregisterAll() {
		this.plugins.clear();
	}
	static getRegisteredFunctionIds() {
		return [...Array.from(this.plugins.keys()), ...Array.from(this._protectedPlugins.keys())];
	}
	static getPlugins() {
		return Array.from(new Set(this.plugins.values()).values());
	}
	static getFunctionPlugin(functionId) {
		if (this.functionIsProtected(functionId)) return;
		else return this.plugins.get(functionId);
	}
	static functionIsProtected(functionId) {
		return this._protectedPlugins.has(functionId);
	}
	static loadTranslations(translations) {
		const registeredLanguages = new Set(HyperFormula.getRegisteredLanguagesCodes());
		Object.keys(translations).forEach((code) => {
			if (registeredLanguages.has(code)) HyperFormula.getLanguage(code).extendFunctions(translations[code]);
		});
	}
	static loadPluginFunctions(plugin, registry) {
		Object.keys(plugin.implementedFunctions).forEach((functionName) => {
			this.loadPluginFunction(plugin, functionName, registry);
		});
		if (plugin.aliases !== void 0) Object.keys(plugin.aliases).forEach((functionName) => {
			this.loadPluginFunction(plugin, functionName, registry);
		});
	}
	static loadPluginFunction(plugin, functionId, registry) {
		if (this.functionIsProtected(functionId)) throw ProtectedFunctionError.cannotRegisterFunctionWithId(functionId);
		else this.loadFunctionUnprotected(plugin, functionId, registry);
	}
	/**
	* Handles deprecated metadata properties.
	*/
	static handleDeprecatedMetadata(functionId, metadata) {
		if (metadata && metadata.arrayFunction !== void 0) {
			console.warn(`${functionId}: 'arrayFunction' parameter is deprecated since 3.1.0; Use 'enableArrayArithmeticForArguments' instead.`);
			metadata.enableArrayArithmeticForArguments = metadata.arrayFunction;
		}
		if (metadata && metadata.arraySizeMethod !== void 0) {
			console.warn(`${functionId}: 'arraySizeMethod' parameter is deprecated since 3.1.0; Use 'sizeOfResultArrayMethod' instead.`);
			metadata.sizeOfResultArrayMethod = metadata.arraySizeMethod;
		}
	}
	/**
	* Loads a function into the registry.
	*/
	static loadFunctionUnprotected(plugin, functionId, registry) {
		const metadata = validateAndReturnMetadataFromName(functionId, plugin);
		const methodName = metadata.method;
		this.handleDeprecatedMetadata(functionId, metadata);
		if (Object.prototype.hasOwnProperty.call(plugin.prototype, methodName)) registry.set(functionId, plugin);
		else throw FunctionPluginValidationError.functionMethodNotFound(methodName, plugin.name);
	}
	static *protectedFunctions() {
		for (const [functionId, plugin] of this._protectedPlugins) if (plugin !== void 0) yield [functionId, plugin];
	}
	static *protectedPlugins() {
		for (const [, plugin] of this._protectedPlugins) if (plugin !== void 0) yield plugin;
	}
	initializePlugins(interpreter) {
		const instances = [];
		for (const [functionId, plugin] of this.instancePlugins.entries()) {
			let foundPluginInstance = instances.find((pluginInstance) => pluginInstance instanceof plugin);
			if (foundPluginInstance === void 0) {
				foundPluginInstance = new plugin(interpreter);
				instances.push(foundPluginInstance);
			}
			const metadata = validateAndReturnMetadataFromName(functionId, plugin);
			const methodName = metadata.method;
			this.functions.set(functionId, [methodName, foundPluginInstance]);
			const arraySizeMethodName = metadata.sizeOfResultArrayMethod;
			if (arraySizeMethodName !== void 0) this.arraySizeFunctions.set(functionId, [arraySizeMethodName, foundPluginInstance]);
		}
	}
	getFunctionPlugin(functionId) {
		if (FunctionRegistry.functionIsProtected(functionId)) return;
		return this.instancePlugins.get(functionId);
	}
	getFunction(functionId) {
		const pluginEntry = this.functions.get(functionId);
		if (pluginEntry !== void 0 && this.config.translationPackage.isFunctionTranslated(functionId)) {
			const [pluginFunction, pluginInstance] = pluginEntry;
			return (ast, state) => pluginInstance[pluginFunction](ast, state);
		} else return;
	}
	getArraySizeFunction(functionId) {
		const pluginEntry = this.arraySizeFunctions.get(functionId);
		if (pluginEntry !== void 0 && this.config.translationPackage.isFunctionTranslated(functionId)) {
			const [pluginArraySizeFunction, pluginInstance] = pluginEntry;
			return (ast, state) => pluginInstance[pluginArraySizeFunction](ast, state);
		} else return;
	}
	getMetadata(functionId) {
		return this.functionsMetadata.get(functionId);
	}
	getPlugins() {
		const plugins = /* @__PURE__ */ new Set();
		for (const [functionId, plugin] of this.instancePlugins) if (!FunctionRegistry.functionIsProtected(functionId)) plugins.add(plugin);
		return Array.from(plugins);
	}
	getRegisteredFunctionIds() {
		return Array.from(this.functions.keys());
	}
	categorizeFunction(functionId, functionMetadata) {
		if (functionMetadata.isVolatile) this.volatileFunctions.add(functionId);
		if (functionMetadata.enableArrayArithmeticForArguments) this.arrayFunctions.add(functionId);
		if (functionMetadata.doesNotNeedArgumentsToBeComputed) this.functionsWhichDoesNotNeedArgumentsToBeComputed.add(functionId);
		if (functionMetadata.isDependentOnSheetStructureChange) this.structuralChangeFunctions.add(functionId);
		this.functionsMetadata.set(functionId, functionMetadata);
	}
};
FunctionRegistry.plugins = /* @__PURE__ */ new Map();
FunctionRegistry._protectedPlugins = new Map([["VERSION", VersionPlugin], ["OFFSET", void 0]]);
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/Criterion.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var CriterionType;
(function(CriterionType) {
	CriterionType["GREATER_THAN"] = "GREATER_THAN";
	CriterionType["GREATER_THAN_OR_EQUAL"] = "GREATER_THAN_OR_EQUAL";
	CriterionType["LESS_THAN"] = "LESS_THAN";
	CriterionType["LESS_THAN_OR_EQUAL"] = "LESS_THAN_OR_EQUAL";
	CriterionType["NOT_EQUAL"] = "NOT_EQUAL";
	CriterionType["EQUAL"] = "EQUAL";
})(CriterionType || (CriterionType = {}));
var buildCriterion = (operator, value) => ({
	operator,
	value
});
var CriterionBuilder = class {
	constructor(config) {
		var _a, _b, _c, _d;
		this.trueString = (_b = (_a = config.translationPackage.getMaybeFunctionTranslation("TRUE")) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== null && _b !== void 0 ? _b : "true";
		this.falseString = (_d = (_c = config.translationPackage.getMaybeFunctionTranslation("FALSE")) === null || _c === void 0 ? void 0 : _c.toLowerCase()) !== null && _d !== void 0 ? _d : "false";
	}
	fromCellValue(raw, arithmeticHelper) {
		if (typeof raw !== "string" && typeof raw !== "boolean" && typeof raw !== "number") return;
		const criterion = this.parseCriterion(raw, arithmeticHelper);
		if (criterion === void 0) return;
		return {
			raw,
			lambda: buildCriterionLambda(criterion, arithmeticHelper)
		};
	}
	parseCriterion(criterion, arithmeticHelper) {
		if (typeof criterion === "number" || typeof criterion === "boolean") return buildCriterion(CriterionType.EQUAL, criterion);
		else if (typeof criterion === "string") {
			const regexResult = ANY_CRITERION_REGEX.exec(criterion);
			let criterionValue;
			let criterionType;
			if (regexResult) {
				criterionType = StrToCriterionType(regexResult[1]);
				criterionValue = regexResult[2];
			} else {
				criterionType = CriterionType.EQUAL;
				criterionValue = criterion;
			}
			const value = arithmeticHelper.coerceToMaybeNumber(criterionValue);
			const boolvalue = criterionValue.toLowerCase() === this.trueString ? true : criterionValue.toLowerCase() === this.falseString ? false : void 0;
			if (criterionType === void 0) return;
			if (criterionValue === "") return buildCriterion(criterionType, null);
			else if (value === void 0) {
				if (criterionType === CriterionType.EQUAL || criterionType === CriterionType.NOT_EQUAL) return buildCriterion(criterionType, boolvalue !== null && boolvalue !== void 0 ? boolvalue : criterionValue);
			} else return buildCriterion(criterionType, getRawValue(value));
		}
	}
};
var ANY_CRITERION_REGEX = /([<>=]+)(.*)/;
function StrToCriterionType(str) {
	switch (str) {
		case ">": return CriterionType.GREATER_THAN;
		case ">=": return CriterionType.GREATER_THAN_OR_EQUAL;
		case "<": return CriterionType.LESS_THAN;
		case "<=": return CriterionType.LESS_THAN_OR_EQUAL;
		case "<>": return CriterionType.NOT_EQUAL;
		case "=": return CriterionType.EQUAL;
		default: return;
	}
}
var buildCriterionLambda = (criterion, arithmeticHelper) => {
	switch (criterion.operator) {
		case CriterionType.GREATER_THAN: if (typeof criterion.value === "number") return (cellValue) => typeof cellValue === "number" && arithmeticHelper.floatCmp(cellValue, criterion.value) > 0;
		else return (_cellValue) => false;
		case CriterionType.GREATER_THAN_OR_EQUAL: if (typeof criterion.value === "number") return (cellValue) => typeof cellValue === "number" && arithmeticHelper.floatCmp(cellValue, criterion.value) >= 0;
		else return (_cellValue) => false;
		case CriterionType.LESS_THAN: if (typeof criterion.value === "number") return (cellValue) => typeof cellValue === "number" && arithmeticHelper.floatCmp(cellValue, criterion.value) < 0;
		else return (_cellValue) => false;
		case CriterionType.LESS_THAN_OR_EQUAL: if (typeof criterion.value === "number") return (cellValue) => typeof cellValue === "number" && arithmeticHelper.floatCmp(cellValue, criterion.value) <= 0;
		else return (_cellValue) => false;
		case CriterionType.EQUAL: if (typeof criterion.value === "number") return (cellValue) => {
			if (typeof cellValue === "number") return arithmeticHelper.floatCmp(cellValue, criterion.value) === 0;
			else if (typeof cellValue === "string") {
				if (cellValue === "") return false;
				const val = arithmeticHelper.coerceToMaybeNumber(cellValue);
				if (val === void 0) return false;
				return arithmeticHelper.floatCmp(val, criterion.value) === 0;
			} else return false;
		};
		else if (typeof criterion.value === "string") return arithmeticHelper.eqMatcherFunction(criterion.value);
		else if (typeof criterion.value === "boolean") return (cellValue) => typeof cellValue === "boolean" && cellValue === criterion.value;
		else return (cellValue) => cellValue === EmptyValue;
		case CriterionType.NOT_EQUAL: if (typeof criterion.value === "number") return (cellValue) => {
			if (typeof cellValue === "number") return arithmeticHelper.floatCmp(cellValue, criterion.value) !== 0;
			else if (typeof cellValue === "string") {
				if (cellValue === "") return true;
				const val = arithmeticHelper.coerceToMaybeNumber(cellValue);
				if (val === void 0) return true;
				return arithmeticHelper.floatCmp(val, criterion.value) !== 0;
			} else return true;
		};
		else if (typeof criterion.value === "string") return arithmeticHelper.neqMatcherFunction(criterion.value);
		else if (typeof criterion.value === "boolean") return (cellValue) => typeof cellValue !== "boolean" || cellValue !== criterion.value;
		else return (cellValue) => cellValue !== EmptyValue;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/Interpreter.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var Interpreter = class {
	constructor(config, dependencyGraph, columnSearch, stats, arithmeticHelper, functionRegistry, namedExpressions, serialization, arraySizePredictor, dateTimeHelper) {
		this.config = config;
		this.dependencyGraph = dependencyGraph;
		this.columnSearch = columnSearch;
		this.stats = stats;
		this.arithmeticHelper = arithmeticHelper;
		this.functionRegistry = functionRegistry;
		this.namedExpressions = namedExpressions;
		this.serialization = serialization;
		this.arraySizePredictor = arraySizePredictor;
		this.dateTimeHelper = dateTimeHelper;
		this.equalOp = (arg1, arg2) => binaryErrorWrapper(this.arithmeticHelper.eq, arg1, arg2);
		this.notEqualOp = (arg1, arg2) => binaryErrorWrapper(this.arithmeticHelper.neq, arg1, arg2);
		this.greaterThanOp = (arg1, arg2) => binaryErrorWrapper(this.arithmeticHelper.gt, arg1, arg2);
		this.lessThanOp = (arg1, arg2) => binaryErrorWrapper(this.arithmeticHelper.lt, arg1, arg2);
		this.greaterThanOrEqualOp = (arg1, arg2) => binaryErrorWrapper(this.arithmeticHelper.geq, arg1, arg2);
		this.lessThanOrEqualOp = (arg1, arg2) => binaryErrorWrapper(this.arithmeticHelper.leq, arg1, arg2);
		this.concatOp = (arg1, arg2) => binaryErrorWrapper(this.arithmeticHelper.concat, coerceScalarToString(arg1), coerceScalarToString(arg2));
		this.plusOp = (arg1, arg2) => binaryErrorWrapper(this.arithmeticHelper.addWithEpsilon, this.arithmeticHelper.coerceScalarToNumberOrError(arg1), this.arithmeticHelper.coerceScalarToNumberOrError(arg2));
		this.minusOp = (arg1, arg2) => binaryErrorWrapper(this.arithmeticHelper.subtract, this.arithmeticHelper.coerceScalarToNumberOrError(arg1), this.arithmeticHelper.coerceScalarToNumberOrError(arg2));
		this.timesOp = (arg1, arg2) => binaryErrorWrapper(this.arithmeticHelper.multiply, this.arithmeticHelper.coerceScalarToNumberOrError(arg1), this.arithmeticHelper.coerceScalarToNumberOrError(arg2));
		this.powerOp = (arg1, arg2) => binaryErrorWrapper(this.arithmeticHelper.pow, this.arithmeticHelper.coerceScalarToNumberOrError(arg1), this.arithmeticHelper.coerceScalarToNumberOrError(arg2));
		this.divOp = (arg1, arg2) => binaryErrorWrapper(this.arithmeticHelper.divide, this.arithmeticHelper.coerceScalarToNumberOrError(arg1), this.arithmeticHelper.coerceScalarToNumberOrError(arg2));
		this.unaryMinusOp = (arg) => unaryErrorWrapper(this.arithmeticHelper.unaryMinus, this.arithmeticHelper.coerceScalarToNumberOrError(arg));
		this.percentOp = (arg) => unaryErrorWrapper(this.arithmeticHelper.unaryPercent, this.arithmeticHelper.coerceScalarToNumberOrError(arg));
		this.unaryPlusOp = (arg) => this.arithmeticHelper.unaryPlus(arg);
		this.functionRegistry.initializePlugins(this);
		this.criterionBuilder = new CriterionBuilder(config);
	}
	evaluateAst(ast, state) {
		let val = this.evaluateAstWithoutPostprocessing(ast, state);
		if (isExtendedNumber(val)) if (isNumberOverflow(getRawValue(val))) return new CellError(ErrorType.NUM, ErrorMessage.NaN);
		else val = cloneNumber(val, fixNegativeZero(getRawValue(val)));
		if (val instanceof SimpleRangeValue && val.height() === 1 && val.width() === 1) [[val]] = val.data;
		return wrapperForRootVertex(val, state.formulaVertex);
	}
	/**
	* Calculates cell value from formula abstract syntax tree
	*
	* @param {Ast} ast - abstract syntax tree of formula
	* @param {InterpreterState} state - interpreter state
	*/
	evaluateAstWithoutPostprocessing(ast, state) {
		switch (ast.type) {
			case AstNodeType.EMPTY: return EmptyValue;
			case AstNodeType.CELL_REFERENCE: {
				const address = ast.reference.toSimpleCellAddress(state.formulaAddress);
				if (isColOrRowInvalid(address)) return new CellError(ErrorType.REF, ErrorMessage.BadRef);
				if (!this.isSheetValid(ast.reference)) return new CellError(ErrorType.REF, ErrorMessage.SheetRef);
				return this.dependencyGraph.getCellValue(address);
			}
			case AstNodeType.NUMBER:
			case AstNodeType.STRING: return ast.value;
			case AstNodeType.CONCATENATE_OP: {
				const leftResult = this.evaluateAst(ast.left, state);
				const rightResult = this.evaluateAst(ast.right, state);
				return this.binaryRangeWrapper(this.concatOp, leftResult, rightResult, state);
			}
			case AstNodeType.EQUALS_OP: {
				const leftResult = this.evaluateAst(ast.left, state);
				const rightResult = this.evaluateAst(ast.right, state);
				return this.binaryRangeWrapper(this.equalOp, leftResult, rightResult, state);
			}
			case AstNodeType.NOT_EQUAL_OP: {
				const leftResult = this.evaluateAst(ast.left, state);
				const rightResult = this.evaluateAst(ast.right, state);
				return this.binaryRangeWrapper(this.notEqualOp, leftResult, rightResult, state);
			}
			case AstNodeType.GREATER_THAN_OP: {
				const leftResult = this.evaluateAst(ast.left, state);
				const rightResult = this.evaluateAst(ast.right, state);
				return this.binaryRangeWrapper(this.greaterThanOp, leftResult, rightResult, state);
			}
			case AstNodeType.LESS_THAN_OP: {
				const leftResult = this.evaluateAst(ast.left, state);
				const rightResult = this.evaluateAst(ast.right, state);
				return this.binaryRangeWrapper(this.lessThanOp, leftResult, rightResult, state);
			}
			case AstNodeType.GREATER_THAN_OR_EQUAL_OP: {
				const leftResult = this.evaluateAst(ast.left, state);
				const rightResult = this.evaluateAst(ast.right, state);
				return this.binaryRangeWrapper(this.greaterThanOrEqualOp, leftResult, rightResult, state);
			}
			case AstNodeType.LESS_THAN_OR_EQUAL_OP: {
				const leftResult = this.evaluateAst(ast.left, state);
				const rightResult = this.evaluateAst(ast.right, state);
				return this.binaryRangeWrapper(this.lessThanOrEqualOp, leftResult, rightResult, state);
			}
			case AstNodeType.PLUS_OP: {
				const leftResult = this.evaluateAst(ast.left, state);
				const rightResult = this.evaluateAst(ast.right, state);
				return this.binaryRangeWrapper(this.plusOp, leftResult, rightResult, state);
			}
			case AstNodeType.MINUS_OP: {
				const leftResult = this.evaluateAst(ast.left, state);
				const rightResult = this.evaluateAst(ast.right, state);
				return this.binaryRangeWrapper(this.minusOp, leftResult, rightResult, state);
			}
			case AstNodeType.TIMES_OP: {
				const leftResult = this.evaluateAst(ast.left, state);
				const rightResult = this.evaluateAst(ast.right, state);
				return this.binaryRangeWrapper(this.timesOp, leftResult, rightResult, state);
			}
			case AstNodeType.POWER_OP: {
				const leftResult = this.evaluateAst(ast.left, state);
				const rightResult = this.evaluateAst(ast.right, state);
				return this.binaryRangeWrapper(this.powerOp, leftResult, rightResult, state);
			}
			case AstNodeType.DIV_OP: {
				const leftResult = this.evaluateAst(ast.left, state);
				const rightResult = this.evaluateAst(ast.right, state);
				return this.binaryRangeWrapper(this.divOp, leftResult, rightResult, state);
			}
			case AstNodeType.PLUS_UNARY_OP: {
				const result = this.evaluateAst(ast.value, state);
				return this.unaryRangeWrapper(this.unaryPlusOp, result, state);
			}
			case AstNodeType.MINUS_UNARY_OP: {
				const result = this.evaluateAst(ast.value, state);
				return this.unaryRangeWrapper(this.unaryMinusOp, result, state);
			}
			case AstNodeType.PERCENT_OP: {
				const result = this.evaluateAst(ast.value, state);
				return this.unaryRangeWrapper(this.percentOp, result, state);
			}
			case AstNodeType.FUNCTION_CALL: {
				if (this.config.licenseKeyValidityState !== "valid" && !FunctionRegistry.functionIsProtected(ast.procedureName)) return new CellError(ErrorType.LIC, ErrorMessage.LicenseKey(this.config.licenseKeyValidityState));
				const pluginFunction = this.functionRegistry.getFunction(ast.procedureName);
				if (pluginFunction !== void 0) return pluginFunction(ast, new InterpreterState(state.formulaAddress, state.arraysFlag || this.functionRegistry.isArrayFunction(ast.procedureName), state.formulaVertex));
				else return new CellError(ErrorType.NAME, ErrorMessage.FunctionName(ast.procedureName));
			}
			case AstNodeType.NAMED_EXPRESSION: {
				const namedExpression = this.namedExpressions.nearestNamedExpression(ast.expressionName, state.formulaAddress.sheet);
				if (namedExpression) return this.dependencyGraph.getCellValue(namedExpression.address);
				else return new CellError(ErrorType.NAME, ErrorMessage.NamedExpressionName(ast.expressionName));
			}
			case AstNodeType.CELL_RANGE: {
				if (!this.isSheetValid(ast.start) || !this.isSheetValid(ast.end)) return new CellError(ErrorType.REF, ErrorMessage.SheetRef);
				if (!this.rangeSpansOneSheet(ast)) return new CellError(ErrorType.REF, ErrorMessage.RangeManySheets);
				const range = AbsoluteCellRange.fromCellRange(ast, state.formulaAddress);
				const arrayVertex = this.dependencyGraph.getArray(range);
				if (arrayVertex) {
					const array = arrayVertex.array;
					if (array instanceof NotComputedArray) throw new Error("Array should be already computed");
					else if (array instanceof CellError) return array;
					else if (array instanceof ArrayValue) return SimpleRangeValue.fromRange(array.raw(), range, this.dependencyGraph);
					else throw new Error("Unknown array");
				}
				return SimpleRangeValue.onlyRange(range, this.dependencyGraph);
			}
			case AstNodeType.COLUMN_RANGE: {
				if (!this.isSheetValid(ast.start) || !this.isSheetValid(ast.end)) return new CellError(ErrorType.REF, ErrorMessage.SheetRef);
				if (!this.rangeSpansOneSheet(ast)) return new CellError(ErrorType.REF, ErrorMessage.RangeManySheets);
				const range = AbsoluteColumnRange.fromColumnRange(ast, state.formulaAddress);
				return SimpleRangeValue.onlyRange(range, this.dependencyGraph);
			}
			case AstNodeType.ROW_RANGE: {
				if (!this.isSheetValid(ast.start) || !this.isSheetValid(ast.end)) return new CellError(ErrorType.REF, ErrorMessage.SheetRef);
				if (!this.rangeSpansOneSheet(ast)) return new CellError(ErrorType.REF, ErrorMessage.RangeManySheets);
				const range = AbsoluteRowRange.fromRowRangeAst(ast, state.formulaAddress);
				return SimpleRangeValue.onlyRange(range, this.dependencyGraph);
			}
			case AstNodeType.PARENTHESIS: return this.evaluateAst(ast.expression, state);
			case AstNodeType.ARRAY: {
				let totalWidth = void 0;
				const ret = [];
				for (const astRow of ast.args) {
					let rowHeight = void 0;
					const rowRet = [];
					for (const astIt of astRow) {
						const arr = coerceToRange(this.evaluateAst(astIt, state));
						const height = arr.height();
						if (rowHeight === void 0) {
							rowHeight = height;
							rowRet.push(...arr.data);
						} else if (rowHeight === height) for (let i = 0; i < height; i++) rowRet[i].push(...arr.data[i]);
						else return new CellError(ErrorType.REF, ErrorMessage.SizeMismatch);
					}
					const width = rowRet[0].length;
					if (totalWidth === void 0) {
						totalWidth = width;
						ret.push(...rowRet);
					} else if (totalWidth === width) ret.push(...rowRet);
					else return new CellError(ErrorType.REF, ErrorMessage.SizeMismatch);
				}
				return SimpleRangeValue.onlyValues(ret);
			}
			case AstNodeType.ERROR_WITH_RAW_INPUT:
			case AstNodeType.ERROR: return ast.error;
		}
	}
	/**
	* Sheet is valid if:
	* - sheet is undefined OR
	* - sheet is a named expressions store OR
	* - sheet exists in sheet mapping
	* - sheet is not a placeholder
	*/
	isSheetValid(address) {
		return address.sheet === void 0 || address.sheet === NamedExpressions.SHEET_FOR_WORKBOOK_EXPRESSIONS || this.dependencyGraph.sheetMapping.hasSheetWithId(address.sheet, { includePlaceholders: false });
	}
	rangeSpansOneSheet(ast) {
		return ast.start.sheet === ast.end.sheet;
	}
	unaryRangeWrapper(op, arg, state) {
		var _a;
		if (arg instanceof SimpleRangeValue && !state.arraysFlag) arg = (_a = coerceRangeToScalar(arg, state)) !== null && _a !== void 0 ? _a : new CellError(ErrorType.VALUE, ErrorMessage.ScalarExpected);
		if (arg instanceof CellError) return arg;
		if (arg instanceof SimpleRangeValue) {
			const newRaw = arg.data.map((row) => row.map(op));
			return SimpleRangeValue.onlyValues(newRaw);
		}
		return op(arg);
	}
	binaryRangeWrapper(op, arg1, arg2, state) {
		var _a, _b;
		if (arg1 instanceof SimpleRangeValue && !state.arraysFlag) arg1 = (_a = coerceRangeToScalar(arg1, state)) !== null && _a !== void 0 ? _a : new CellError(ErrorType.VALUE, ErrorMessage.ScalarExpected);
		if (arg1 instanceof CellError) return arg1;
		if (arg2 instanceof SimpleRangeValue && !state.arraysFlag) arg2 = (_b = coerceRangeToScalar(arg2, state)) !== null && _b !== void 0 ? _b : new CellError(ErrorType.VALUE, ErrorMessage.ScalarExpected);
		if (arg2 instanceof CellError) return arg2;
		if (arg1 instanceof SimpleRangeValue || arg2 instanceof SimpleRangeValue) {
			if (!(arg1 instanceof SimpleRangeValue)) if (arg2.isAdHoc()) {
				const raw2 = arg2.data;
				for (let i = 0; i < raw2.length; i++) for (let j = 0; j < raw2[0].length; j++) raw2[i][j] = op(arg1, raw2[i][j]);
				return SimpleRangeValue.onlyValues(raw2);
			} else arg1 = SimpleRangeValue.fromScalar(arg1);
			if (!(arg2 instanceof SimpleRangeValue)) if (arg1.isAdHoc()) {
				const raw1 = arg1.data;
				for (let i = 0; i < raw1.length; i++) for (let j = 0; j < raw1[0].length; j++) raw1[i][j] = op(raw1[i][j], arg2);
				return SimpleRangeValue.onlyValues(raw1);
			} else arg2 = SimpleRangeValue.fromScalar(arg2);
			if (arg1.width() === arg2.width() && arg1.height() === arg2.height()) {
				if (arg1.isAdHoc()) {
					const raw1 = arg1.data;
					const raw2 = arg2.data;
					for (let i = 0; i < raw1.length; i++) for (let j = 0; j < raw1[0].length; j++) raw1[i][j] = op(raw1[i][j], raw2[i][j]);
					return SimpleRangeValue.onlyValues(raw1);
				}
				if (arg2.isAdHoc()) {
					const raw1 = arg1.data;
					const raw2 = arg2.data;
					for (let i = 0; i < raw1.length; i++) for (let j = 0; j < raw1[0].length; j++) raw2[i][j] = op(raw1[i][j], raw2[i][j]);
					return SimpleRangeValue.onlyValues(raw2);
				}
			}
			const width = Math.max(arg1.width(), arg2.width());
			const height = Math.max(arg1.height(), arg2.height());
			const ret = Array(height);
			for (let i = 0; i < height; i++) ret[i] = Array(width);
			for (let i = 0; i < height; i++) {
				const i1 = arg1.height() !== 1 ? i : 0;
				const i2 = arg2.height() !== 1 ? i : 0;
				for (let j = 0; j < width; j++) {
					const j1 = arg1.width() !== 1 ? j : 0;
					const j2 = arg2.width() !== 1 ? j : 0;
					if (i1 < arg1.height() && i2 < arg2.height() && j1 < arg1.width() && j2 < arg2.width()) ret[i][j] = op(arg1.data[i1][j1], arg2.data[i2][j2]);
					else ret[i][j] = new CellError(ErrorType.NA);
				}
			}
			return SimpleRangeValue.onlyValues(ret);
		}
		return op(arg1, arg2);
	}
};
function unaryErrorWrapper(op, arg) {
	if (arg instanceof CellError) return arg;
	else return op(arg);
}
function binaryErrorWrapper(op, arg1, arg2) {
	if (arg1 instanceof CellError) return arg1;
	else if (arg2 instanceof CellError) return arg2;
	else return op(arg1, arg2);
}
function wrapperForRootVertex(val, vertex) {
	if (val instanceof CellError && vertex !== void 0) return val.attachRootVertex(vertex);
	return val;
}
//#endregion
//#region ../../node_modules/hyperformula/es/dependencyTransformers/CombinedTransformer.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var CombinedTransformer = class {
	constructor(sheet) {
		this.sheet = sheet;
		this.transformations = [];
	}
	add(transformation) {
		this.transformations.push(transformation);
	}
	performEagerTransformations(graph, parser) {
		this.transformations.forEach((transformation) => transformation.performEagerTransformations(graph, parser));
	}
	transformSingleAst(ast, address) {
		let [transformedAst, transformedAddress] = [ast, address];
		this.transformations.forEach((transformation) => {
			[transformedAst, transformedAddress] = transformation.transformSingleAst(transformedAst, transformedAddress);
		});
		return [transformedAst, transformedAddress];
	}
	isIrreversible() {
		return true;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/LazilyTransformingAstService.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var LazilyTransformingAstService = class {
	constructor(stats) {
		this.stats = stats;
		this.transformations = [];
	}
	version() {
		return this.transformations.length;
	}
	addTransformation(transformation) {
		if (this.combinedTransformer !== void 0) this.combinedTransformer.add(transformation);
		else this.transformations.push(transformation);
		return this.version();
	}
	beginCombinedMode(sheet) {
		this.combinedTransformer = new CombinedTransformer(sheet);
	}
	commitCombinedMode() {
		if (this.combinedTransformer === void 0) throw Error("Combined mode wasn't started");
		this.transformations.push(this.combinedTransformer);
		this.combinedTransformer = void 0;
		return this.version();
	}
	applyTransformations(ast, address, version) {
		this.stats.start(StatType.TRANSFORM_ASTS_POSTPONED);
		for (let v = version; v < this.transformations.length; v++) {
			const transformation = this.transformations[v];
			if (transformation.isIrreversible()) {
				this.undoRedo.storeDataForVersion(v, address, this.parser.computeHashFromAst(ast));
				this.parser.rememberNewAst(ast);
			}
			const [newAst, newAddress] = transformation.transformSingleAst(ast, address);
			ast = newAst;
			address = newAddress;
		}
		const cachedAst = this.parser.rememberNewAst(ast);
		this.stats.end(StatType.TRANSFORM_ASTS_POSTPONED);
		return [
			cachedAst,
			address,
			this.transformations.length
		];
	}
	*getTransformationsFrom(version, filter) {
		for (let v = version; v < this.transformations.length; v++) {
			const transformation = this.transformations[v];
			if (!filter || filter(transformation)) yield transformation;
		}
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/binarySearch.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var NOT_FOUND$1 = -1;
function findLastOccurrenceInOrderedRange(searchKey, range, { searchCoordinate, orderingDirection, ifNoMatch }, dependencyGraph) {
	const start = range.start[searchCoordinate];
	const end = searchCoordinate === "col" ? range.effectiveEndColumn(dependencyGraph) : range.effectiveEndRow(dependencyGraph);
	const getValueFromIndexFn = searchCoordinate === "col" ? (index) => getRawValue(dependencyGraph.getCellValue(simpleCellAddress(range.sheet, index, range.start.row))) : (index) => getRawValue(dependencyGraph.getCellValue(simpleCellAddress(range.sheet, range.start.col, index)));
	const compareFn = orderingDirection === "asc" ? (left, right) => compare(left, right) : (left, right) => -compare(left, right);
	const foundIndex = findLastMatchingIndex((index) => compareFn(searchKey, getValueFromIndexFn(index)) >= 0, start, end);
	const foundValue = getValueFromIndexFn(foundIndex);
	if (foundValue === searchKey) return foundIndex - start;
	if (ifNoMatch === "returnLowerBound") {
		if (foundIndex === NOT_FOUND$1) return orderingDirection === "asc" ? NOT_FOUND$1 : 0;
		if (typeof foundValue !== typeof searchKey) return NOT_FOUND$1;
		if (orderingDirection === "asc") return foundIndex - start;
		const nextIndex = foundIndex + 1;
		return nextIndex <= end ? nextIndex - start : NOT_FOUND$1;
	}
	if (ifNoMatch === "returnUpperBound") {
		if (foundIndex === NOT_FOUND$1) return orderingDirection === "asc" ? 0 : NOT_FOUND$1;
		if (typeof foundValue !== typeof searchKey) return NOT_FOUND$1;
		if (orderingDirection === "desc") return foundIndex - start;
		const nextIndex = foundIndex + 1;
		return nextIndex <= end ? nextIndex - start : NOT_FOUND$1;
	}
	return NOT_FOUND$1;
}
function findLastMatchingIndex(predicate, startRange, endRange) {
	let start = startRange;
	let end = endRange;
	while (start < end) {
		const pivot = Math.ceil((start + end) / 2);
		if (predicate(pivot)) start = pivot;
		else end = pivot - 1;
	}
	if (start === end && predicate(start)) return start;
	return NOT_FOUND$1;
}
function compare(left, right) {
	if (typeof left === typeof right) {
		if (left === EmptyValue) return 0;
		return left < right ? -1 : left > right ? 1 : 0;
	}
	if (left === EmptyValue) return -1;
	if (right === EmptyValue) return 1;
	if (right instanceof CellError) return -1;
	if (typeof left === "number" && typeof right === "string") return -1;
	if (typeof left === "number" && typeof right === "boolean") return -1;
	if (typeof left === "string" && typeof right === "number") return 1;
	if (typeof left === "string" && typeof right === "boolean") return -1;
	return 1;
}
//#endregion
//#region ../../node_modules/hyperformula/es/Lookup/AdvancedFind.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var NOT_FOUND = -1;
var AdvancedFind = class {
	constructor(dependencyGraph) {
		this.dependencyGraph = dependencyGraph;
	}
	advancedFind(keyMatcher, rangeValue, { returnOccurrence } = { returnOccurrence: "first" }) {
		const range = rangeValue.range;
		const values = range === void 0 ? rangeValue.valuesFromTopLeftCorner() : this.dependencyGraph.computeListOfValuesInRange(range);
		const initialIterationIndex = returnOccurrence === "first" ? 0 : values.length - 1;
		const iterationCondition = returnOccurrence === "first" ? (i) => i < values.length : (i) => i >= 0;
		const incrementIndex = returnOccurrence === "first" ? (i) => i + 1 : (i) => i - 1;
		for (let i = initialIterationIndex; iterationCondition(i); i = incrementIndex(i)) if (keyMatcher(getRawValue(values[i]))) return i;
		return NOT_FOUND;
	}
	basicFind(searchKey, rangeValue, searchCoordinate, { ordering, ifNoMatch, returnOccurrence }) {
		const normalizedSearchKey = typeof searchKey === "string" ? forceNormalizeString(searchKey) : searchKey;
		const range = rangeValue.range;
		if (range === void 0) return this.findNormalizedValue(normalizedSearchKey, rangeValue.valuesFromTopLeftCorner(), ifNoMatch, returnOccurrence);
		if (ordering === "none") return this.findNormalizedValue(normalizedSearchKey, this.dependencyGraph.computeListOfValuesInRange(range), ifNoMatch, returnOccurrence);
		return findLastOccurrenceInOrderedRange(normalizedSearchKey, range, {
			searchCoordinate,
			orderingDirection: ordering,
			ifNoMatch
		}, this.dependencyGraph);
	}
	findNormalizedValue(searchKey, searchArray, ifNoMatch = "returnNotFound", returnOccurrence = "first") {
		const normalizedArray = searchArray.map(getRawValue).map((val) => typeof val === "string" ? forceNormalizeString(val) : val);
		if (ifNoMatch === "returnNotFound") return returnOccurrence === "first" ? normalizedArray.indexOf(searchKey) : normalizedArray.lastIndexOf(searchKey);
		const compareFn = ifNoMatch === "returnLowerBound" ? (left, right) => compare(left, right) : (left, right) => -compare(left, right);
		let bestValue = ifNoMatch === "returnLowerBound" ? -Infinity : Infinity;
		let bestIndex = NOT_FOUND;
		const initialIterationIndex = returnOccurrence === "first" ? 0 : normalizedArray.length - 1;
		const iterationCondition = returnOccurrence === "first" ? (i) => i < normalizedArray.length : (i) => i >= 0;
		const incrementIndex = returnOccurrence === "first" ? (i) => i + 1 : (i) => i - 1;
		for (let i = initialIterationIndex; iterationCondition(i); i = incrementIndex(i)) {
			const value = normalizedArray[i];
			if (value === searchKey) return i;
			if (compareFn(value, searchKey) > 0) continue;
			if (compareFn(bestValue, value) < 0) {
				bestValue = value;
				bestIndex = i;
			}
		}
		return bestIndex;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/Lookup/ColumnBinarySearch.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var ColumnBinarySearch = class extends AdvancedFind {
	constructor(dependencyGraph) {
		super(dependencyGraph);
		this.dependencyGraph = dependencyGraph;
	}
	add(value, address) {}
	remove(value, address) {}
	change(oldValue, newValue, address) {}
	applyChanges(contentChanges) {}
	addColumns(columnsSpan) {}
	removeColumns(columnsSpan) {}
	removeSheet(sheetId) {}
	moveValues(sourceRange, toRight, toBottom, toSheet) {}
	removeValues(range) {}
	find(searchKey, rangeValue, searchOptions) {
		return this.basicFind(searchKey, rangeValue, "row", searchOptions);
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/Lookup/ColumnIndex.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var ColumnIndex = class ColumnIndex {
	constructor(dependencyGraph, config, stats) {
		this.dependencyGraph = dependencyGraph;
		this.config = config;
		this.stats = stats;
		this.index = /* @__PURE__ */ new Map();
		this.transformingService = this.dependencyGraph.lazilyTransformingAstService;
		this.binarySearchStrategy = new ColumnBinarySearch(dependencyGraph);
	}
	add(value, address) {
		if (value === EmptyValue || value instanceof CellError) return;
		else if (value instanceof SimpleRangeValue) for (const [arrayValue, cellAddress] of value.entriesFromTopLeftCorner(address)) this.addSingleCellValue(getRawValue(arrayValue), cellAddress);
		else this.addSingleCellValue(value, address);
	}
	remove(value, address) {
		if (value === void 0) return;
		if (value instanceof SimpleRangeValue) for (const [arrayValue, cellAddress] of value.entriesFromTopLeftCorner(address)) this.removeSingleValue(getRawValue(arrayValue), cellAddress);
		else this.removeSingleValue(value, address);
	}
	change(oldValue, newValue, address) {
		if (oldValue === newValue) return;
		this.remove(oldValue, address);
		this.add(newValue, address);
	}
	applyChanges(contentChanges) {
		for (const change of contentChanges) if (change.oldValue !== void 0) this.change(getRawValue(change.oldValue), getRawValue(change.value), change.address);
	}
	moveValues(sourceRange, toRight, toBottom, toSheet) {
		for (const [value, address] of sourceRange) {
			const targetAddress = movedSimpleCellAddress(address, toSheet, toRight, toBottom);
			this.remove(value, address);
			this.add(value, targetAddress);
		}
	}
	removeValues(range) {
		for (const [value, address] of range) this.remove(value, address);
	}
	find(searchKey, rangeValue, { ordering, ifNoMatch, returnOccurrence }) {
		if (returnOccurrence == null) returnOccurrence = ordering === "none" ? "first" : "last";
		const resultUsingColumnIndex = this.findUsingColumnIndex(searchKey, rangeValue, returnOccurrence);
		return resultUsingColumnIndex !== void 0 ? resultUsingColumnIndex : this.binarySearchStrategy.find(searchKey, rangeValue, {
			ordering,
			ifNoMatch,
			returnOccurrence
		});
	}
	findUsingColumnIndex(key, rangeValue, returnOccurrence) {
		const range = rangeValue.range;
		if (range === void 0) return;
		this.ensureRecentData(range.sheet, range.start.col, key);
		const columnMap = this.getColumnMap(range.sheet, range.start.col);
		if (!columnMap) return -1;
		const normalizedKey = typeof key === "string" ? forceNormalizeString(key) : key;
		const valueIndexForTheKey = columnMap.get(normalizedKey);
		if (!valueIndexForTheKey || !valueIndexForTheKey.index || valueIndexForTheKey.index.length === 0) return;
		const rowNumber = ColumnIndex.findRowBelongingToRange(valueIndexForTheKey, range, returnOccurrence);
		return rowNumber !== void 0 ? rowNumber - range.start.row : void 0;
	}
	static findRowBelongingToRange(valueIndex, range, returnOccurrence) {
		const start = range.start.row;
		const end = range.end.row;
		const positionInIndex = returnOccurrence === "first" ? findInOrderedArray(start, valueIndex.index, "upperBound") : findInOrderedArray(end, valueIndex.index, "lowerBound");
		if (positionInIndex === -1) return;
		const rowNumber = valueIndex.index[positionInIndex];
		return rowNumber >= start && rowNumber <= end ? rowNumber : void 0;
	}
	advancedFind(keyMatcher, range, options = { returnOccurrence: "first" }) {
		return this.binarySearchStrategy.advancedFind(keyMatcher, range, options);
	}
	addColumns(columnsSpan) {
		const sheetIndex = this.index.get(columnsSpan.sheet);
		if (!sheetIndex) return;
		sheetIndex.splice(columnsSpan.columnStart, 0, ...Array(columnsSpan.numberOfColumns));
	}
	removeColumns(columnsSpan) {
		const sheetIndex = this.index.get(columnsSpan.sheet);
		if (!sheetIndex) return;
		sheetIndex.splice(columnsSpan.columnStart, columnsSpan.numberOfColumns);
	}
	removeSheet(sheetId) {
		this.index.delete(sheetId);
	}
	getColumnMap(sheet, col) {
		if (!this.index.has(sheet)) this.index.set(sheet, []);
		const sheetMap = this.index.get(sheet);
		let columnMap = sheetMap[col];
		if (!columnMap) {
			columnMap = /* @__PURE__ */ new Map();
			sheetMap[col] = columnMap;
		}
		return columnMap;
	}
	getValueIndex(sheet, col, value) {
		const columnMap = this.getColumnMap(sheet, col);
		let index = this.getColumnMap(sheet, col).get(value);
		if (!index) {
			index = {
				version: this.transformingService.version(),
				index: []
			};
			columnMap.set(value, index);
		}
		return index;
	}
	ensureRecentData(sheet, col, value) {
		const valueIndex = this.getValueIndex(sheet, col, value);
		const actualVersion = this.transformingService.version();
		if (valueIndex.version === actualVersion) return;
		const relevantTransformations = this.transformingService.getTransformationsFrom(valueIndex.version, (transformation) => {
			return transformation.sheet === sheet && (transformation instanceof AddRowsTransformer || transformation instanceof RemoveRowsTransformer);
		});
		for (const transformation of relevantTransformations) if (transformation instanceof AddRowsTransformer) this.addRows(col, transformation.rowsSpan, value);
		else if (transformation instanceof RemoveRowsTransformer) this.removeRows(col, transformation.rowsSpan, value);
		valueIndex.version = actualVersion;
	}
	addSingleCellValue(value, address) {
		this.stats.measure(StatType.BUILD_COLUMN_INDEX, () => {
			this.ensureRecentData(address.sheet, address.col, value);
			if (typeof value === "string") value = forceNormalizeString(value);
			const valueIndex = this.getValueIndex(address.sheet, address.col, value);
			ColumnIndex.addValue(valueIndex, address.row);
		});
	}
	removeSingleValue(value, address) {
		this.stats.measure(StatType.BUILD_COLUMN_INDEX, () => {
			this.ensureRecentData(address.sheet, address.col, value);
			const columnMap = this.getColumnMap(address.sheet, address.col);
			if (typeof value === "string") value = forceNormalizeString(value);
			const valueIndex = columnMap.get(value);
			if (!valueIndex) return;
			const positionInIndex = findInOrderedArray(address.row, valueIndex.index);
			if (positionInIndex > -1) valueIndex.index.splice(positionInIndex, 1);
			if (valueIndex.index.length === 0) columnMap.delete(value);
			if (columnMap.size === 0) delete this.index.get(address.sheet)[address.col];
		});
	}
	addRows(col, rowsSpan, value) {
		const valueIndex = this.getValueIndex(rowsSpan.sheet, col, value);
		ColumnIndex.shiftRows(valueIndex, rowsSpan.rowStart, rowsSpan.numberOfRows);
	}
	removeRows(col, rowsSpan, value) {
		const valueIndex = this.getValueIndex(rowsSpan.sheet, col, value);
		ColumnIndex.removeRowsFromValues(valueIndex, rowsSpan);
		ColumnIndex.shiftRows(valueIndex, rowsSpan.rowEnd + 1, -rowsSpan.numberOfRows);
	}
	static addValue(valueIndex, rowNumber) {
		const rowIndex = findInOrderedArray(rowNumber, valueIndex.index, "lowerBound");
		if (!(valueIndex.index[rowIndex] === rowNumber)) valueIndex.index.splice(rowIndex + 1, 0, rowNumber);
	}
	static removeRowsFromValues(valueIndex, rowsSpan) {
		const start = findInOrderedArray(rowsSpan.rowStart, valueIndex.index, "upperBound");
		const end = findInOrderedArray(rowsSpan.rowEnd, valueIndex.index, "lowerBound");
		if (start > -1 && end > -1 && start <= end && valueIndex.index[start] <= rowsSpan.rowEnd) valueIndex.index.splice(start, end - start + 1);
	}
	static shiftRows(valueIndex, afterRow, numberOfRows) {
		const positionInIndex = findInOrderedArray(afterRow, valueIndex.index, "upperBound");
		if (positionInIndex === -1) return;
		for (let i = positionInIndex; i < valueIndex.index.length; ++i) valueIndex.index[i] += numberOfRows;
	}
};
function findInOrderedArray(key, values, handlingMisses = "upperBound") {
	let start = 0;
	let end = values.length - 1;
	while (start <= end) {
		const center = Math.floor((start + end) / 2);
		if (key > values[center]) start = center + 1;
		else if (key < values[center]) end = center - 1;
		else return center;
	}
	const foundIndex = handlingMisses === "lowerBound" ? end : start;
	return foundIndex >= 0 && foundIndex <= values.length ? foundIndex : -1;
}
//#endregion
//#region ../../node_modules/hyperformula/es/Lookup/SearchStrategy.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
function buildColumnSearchStrategy(dependencyGraph, config, statistics) {
	if (config.useColumnIndex) return new ColumnIndex(dependencyGraph, config, statistics);
	else return new ColumnBinarySearch(dependencyGraph);
}
//#endregion
//#region ../../node_modules/hyperformula/es/NumberLiteralHelper.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var NumberLiteralHelper = class {
	constructor(config) {
		this.config = config;
		const thousandSeparator = this.config.thousandSeparator === "." ? `\\${this.config.thousandSeparator}` : this.config.thousandSeparator;
		const decimalSeparator = this.config.decimalSeparator === "." ? `\\${this.config.decimalSeparator}` : this.config.decimalSeparator;
		this.numberPattern = new RegExp(`^([+-]?((${decimalSeparator}\\d+)|(\\d+(${thousandSeparator}\\d{3,})*(${decimalSeparator}\\d*)?)))([eE][+-]?\\d+)?$`);
		this.allThousandSeparatorsRegex = new RegExp(`${thousandSeparator}`, "g");
	}
	numericStringToMaybeNumber(input) {
		if (this.numberPattern.test(input)) {
			const num = this.numericStringToNumber(input);
			if (isNaN(num)) return;
			return num;
		}
	}
	numericStringToNumber(input) {
		const normalized = input.replace(this.allThousandSeparatorsRegex, "").replace(this.config.decimalSeparator, ".");
		return Number(normalized);
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/Serialization.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var Serialization = class Serialization {
	constructor(dependencyGraph, unparser, exporter) {
		this.dependencyGraph = dependencyGraph;
		this.unparser = unparser;
		this.exporter = exporter;
	}
	getCellHyperlink(address) {
		const formulaVertex = this.dependencyGraph.getCell(address);
		if (formulaVertex instanceof ScalarFormulaVertex) {
			const formula = formulaVertex.getFormula(this.dependencyGraph.lazilyTransformingAstService);
			if ("HYPERLINK" === formula.procedureName) return formula.hyperlink;
		}
	}
	getCellFormula(address, targetAddress) {
		const formulaVertex = this.dependencyGraph.getCell(address);
		if (formulaVertex instanceof ScalarFormulaVertex) {
			const formula = formulaVertex.getFormula(this.dependencyGraph.lazilyTransformingAstService);
			targetAddress = targetAddress !== null && targetAddress !== void 0 ? targetAddress : address;
			return this.unparser.unparse(formula, targetAddress);
		} else if (formulaVertex instanceof ArrayFormulaVertex) {
			const arrayVertexAddress = formulaVertex.getAddress(this.dependencyGraph.lazilyTransformingAstService);
			if (arrayVertexAddress.row !== address.row || arrayVertexAddress.col !== address.col || arrayVertexAddress.sheet !== address.sheet) return;
			targetAddress = targetAddress !== null && targetAddress !== void 0 ? targetAddress : address;
			const formula = formulaVertex.getFormula(this.dependencyGraph.lazilyTransformingAstService);
			if (formula !== void 0) return this.unparser.unparse(formula, targetAddress);
		} else if (formulaVertex instanceof ParsingErrorVertex) return formulaVertex.getFormula();
	}
	getCellSerialized(address, targetAddress) {
		var _a;
		return (_a = this.getCellFormula(address, targetAddress)) !== null && _a !== void 0 ? _a : this.getRawValue(address);
	}
	getCellValue(address) {
		return this.exporter.exportValue(this.dependencyGraph.getScalarValue(address));
	}
	getRawValue(address) {
		return this.dependencyGraph.getRawValue(address);
	}
	getSheetValues(sheet) {
		return this.genericSheetGetter(sheet, (arg) => this.getCellValue(arg));
	}
	getSheetFormulas(sheet) {
		return this.genericSheetGetter(sheet, (arg) => this.getCellFormula(arg));
	}
	genericSheetGetter(sheet, getter) {
		const sheetHeight = this.dependencyGraph.getSheetHeight(sheet);
		const sheetWidth = this.dependencyGraph.getSheetWidth(sheet);
		const arr = new Array(sheetHeight);
		for (let i = 0; i < sheetHeight; i++) {
			arr[i] = new Array(sheetWidth);
			for (let j = 0; j < sheetWidth; j++) {
				const address = simpleCellAddress(sheet, j, i);
				arr[i][j] = getter(address);
			}
			for (let j = sheetWidth - 1; j >= 0; j--) if (arr[i][j] === null || arr[i][j] === void 0) arr[i].pop();
			else break;
		}
		for (let i = sheetHeight - 1; i >= 0; i--) if (arr[i].length === 0) arr.pop();
		else break;
		return arr;
	}
	genericAllSheetsGetter(sheetGetter) {
		const result = {};
		for (const sheetName of this.dependencyGraph.sheetMapping.iterateSheetNames()) result[sheetName] = sheetGetter(this.dependencyGraph.sheetMapping.getSheetIdOrThrowError(sheetName));
		return result;
	}
	getSheetSerialized(sheet) {
		return this.genericSheetGetter(sheet, (arg) => this.getCellSerialized(arg));
	}
	getAllSheetsValues() {
		return this.genericAllSheetsGetter((arg) => this.getSheetValues(arg));
	}
	getAllSheetsFormulas() {
		return this.genericAllSheetsGetter((arg) => this.getSheetFormulas(arg));
	}
	getAllSheetsSerialized() {
		return this.genericAllSheetsGetter((arg) => this.getSheetSerialized(arg));
	}
	getAllNamedExpressionsSerialized() {
		const idMap = [];
		let id = 0;
		for (const sheetName of this.dependencyGraph.sheetMapping.iterateSheetNames()) {
			const sheetId = this.dependencyGraph.sheetMapping.getSheetIdOrThrowError(sheetName);
			idMap[sheetId] = id;
			id++;
		}
		return this.dependencyGraph.namedExpressions.getAllNamedExpressions().map((entry) => {
			return {
				name: entry.expression.displayName,
				expression: this.getCellSerialized(entry.expression.address),
				scope: entry.scope !== void 0 ? idMap[entry.scope] : void 0,
				options: entry.expression.options
			};
		});
	}
	withNewConfig(newConfig, namedExpressions) {
		const newUnparser = new Unparser(newConfig, this.dependencyGraph.sheetMapping, namedExpressions);
		return new Serialization(this.dependencyGraph, newUnparser, this.exporter);
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/BuildEngineFactory.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var BuildEngineFactory = class {
	static buildFromSheets(sheets, configInput = {}, namedExpressions = []) {
		const config = new Config(configInput);
		return this.buildEngine(config, sheets, namedExpressions);
	}
	static buildFromSheet(sheet, configInput = {}, namedExpressions = []) {
		const config = new Config(configInput);
		const newsheetprefix = config.translationPackage.getUITranslation(UIElement.NEW_SHEET_PREFIX) + "1";
		return this.buildEngine(config, { [newsheetprefix]: sheet }, namedExpressions);
	}
	static buildEmpty(configInput = {}, namedExpressions = []) {
		return this.buildEngine(new Config(configInput), {}, namedExpressions);
	}
	static rebuildWithConfig(config, sheets, namedExpressions, stats) {
		return this.buildEngine(config, sheets, namedExpressions, stats);
	}
	static buildEngine(config, sheets = {}, inputNamedExpressions = [], stats = config.useStats ? new Statistics() : new EmptyStatistics()) {
		stats.start(StatType.BUILD_ENGINE_TOTAL);
		const namedExpressions = new NamedExpressions();
		const functionRegistry = new FunctionRegistry(config);
		const lazilyTransformingAstService = new LazilyTransformingAstService(stats);
		const dependencyGraph = DependencyGraph.buildEmpty(lazilyTransformingAstService, config, functionRegistry, namedExpressions, stats);
		const columnSearch = buildColumnSearchStrategy(dependencyGraph, config, stats);
		const sheetMapping = dependencyGraph.sheetMapping;
		const addressMapping = dependencyGraph.addressMapping;
		for (const sheetName in sheets) if (Object.prototype.hasOwnProperty.call(sheets, sheetName)) {
			const sheet = sheets[sheetName];
			validateAsSheet(sheet);
			const boundaries = findBoundaries(sheet);
			if (boundaries.height > config.maxRows || boundaries.width > config.maxColumns) throw new SheetSizeLimitExceededError();
			const sheetId = sheetMapping.addSheet(sheetName);
			addressMapping.addSheetAndSetStrategyBasedOnBoundaries(sheetId, boundaries, { throwIfSheetAlreadyExists: true });
		}
		const parser = new ParserWithCaching(config, functionRegistry, dependencyGraph.sheetReferenceRegistrar.ensureSheetRegistered.bind(dependencyGraph.sheetReferenceRegistrar));
		lazilyTransformingAstService.parser = parser;
		const unparser = new Unparser(config, sheetMapping, namedExpressions);
		const dateTimeHelper = new DateTimeHelper(config);
		const numberLiteralHelper = new NumberLiteralHelper(config);
		const arithmeticHelper = new ArithmeticHelper(config, dateTimeHelper, numberLiteralHelper);
		const cellContentParser = new CellContentParser(config, dateTimeHelper, numberLiteralHelper);
		const arraySizePredictor = new ArraySizePredictor(config, functionRegistry);
		const operations = new Operations(config, dependencyGraph, columnSearch, cellContentParser, parser, stats, lazilyTransformingAstService, namedExpressions, arraySizePredictor);
		const undoRedo = new UndoRedo(config, operations);
		lazilyTransformingAstService.undoRedo = undoRedo;
		const crudOperations = new CrudOperations(config, operations, undoRedo, new ClipboardOperations(config, dependencyGraph, operations), dependencyGraph, columnSearch, parser, cellContentParser, lazilyTransformingAstService, namedExpressions);
		const exporter = new Exporter(config, namedExpressions, sheetMapping, lazilyTransformingAstService);
		const serialization = new Serialization(dependencyGraph, unparser, exporter);
		const interpreter = new Interpreter(config, dependencyGraph, columnSearch, stats, arithmeticHelper, functionRegistry, namedExpressions, serialization, arraySizePredictor, dateTimeHelper);
		stats.measure(StatType.GRAPH_BUILD, () => {
			new GraphBuilder(dependencyGraph, columnSearch, parser, cellContentParser, stats, arraySizePredictor).buildGraph(sheets, stats);
		});
		inputNamedExpressions.forEach((entry) => {
			crudOperations.ensureItIsPossibleToAddNamedExpression(entry.name, entry.expression, entry.scope);
			crudOperations.operations.addNamedExpression(entry.name, entry.expression, entry.scope, entry.options);
		});
		const evaluator = new Evaluator(config, stats, interpreter, lazilyTransformingAstService, dependencyGraph, columnSearch);
		evaluator.run();
		stats.end(StatType.BUILD_ENGINE_TOTAL);
		return {
			config,
			stats,
			dependencyGraph,
			columnSearch,
			parser,
			unparser,
			cellContentParser,
			evaluator,
			lazilyTransformingAstService,
			crudOperations,
			exporter,
			namedExpressions,
			serialization,
			functionRegistry
		};
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/Destroy.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
function objectDestroy(object) {
	for (const [key, value] of Object.entries(object)) if (value instanceof Function) object[key] = postMortem(value);
	else delete object[key];
}
function postMortem(method) {
	return () => {
		throw new Error(`The "${method}" method cannot be called because this HyperFormula instance has been destroyed`);
	};
}
//#endregion
//#region ../../node_modules/hyperformula/es/Emitter.mjs
var import_tiny_emitter = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
	function E() {}
	E.prototype = {
		on: function(name, callback, ctx) {
			var e = this.e || (this.e = {});
			(e[name] || (e[name] = [])).push({
				fn: callback,
				ctx
			});
			return this;
		},
		once: function(name, callback, ctx) {
			var self = this;
			function listener() {
				self.off(name, listener);
				callback.apply(ctx, arguments);
			}
			listener._ = callback;
			return this.on(name, listener, ctx);
		},
		emit: function(name) {
			var data = [].slice.call(arguments, 1);
			var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
			var i = 0;
			var len = evtArr.length;
			for (; i < len; i++) evtArr[i].fn.apply(evtArr[i].ctx, data);
			return this;
		},
		off: function(name, callback) {
			var e = this.e || (this.e = {});
			var evts = e[name];
			var liveEvents = [];
			if (evts && callback) {
				for (var i = 0, len = evts.length; i < len; i++) if (evts[i].fn !== callback && evts[i].fn._ !== callback) liveEvents.push(evts[i]);
			}
			liveEvents.length ? e[name] = liveEvents : delete e[name];
			return this;
		}
	};
	module.exports = E;
	module.exports.TinyEmitter = E;
})))();
var Events;
(function(Events) {
	Events["SheetAdded"] = "sheetAdded";
	Events["SheetRemoved"] = "sheetRemoved";
	Events["SheetRenamed"] = "sheetRenamed";
	Events["NamedExpressionAdded"] = "namedExpressionAdded";
	Events["NamedExpressionRemoved"] = "namedExpressionRemoved";
	Events["ValuesUpdated"] = "valuesUpdated";
	Events["EvaluationSuspended"] = "evaluationSuspended";
	Events["EvaluationResumed"] = "evaluationResumed";
})(Events || (Events = {}));
var Emitter = class extends import_tiny_emitter.TinyEmitter {
	emit(event, ...args) {
		super.emit(event, ...args);
		return this;
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/HyperFormula.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* This is a class for creating HyperFormula instance, all the following public methods
* are related to this class.
*
* The instance can be created only by calling one of the static methods
* `buildFromArray`, `buildFromSheets` or `buildEmpty` and should be disposed of with the
* `destroy` method when it's no longer needed to free the resources.
*
* The instance can be seen as a workbook where worksheets can be created and
* manipulated. They are organized within a widely known structure of columns and rows
* which can be manipulated as well. The smallest possible data unit are the cells, which
* may contain simple values or formulas to be calculated.
*
* All CRUD methods are called directly on HyperFormula instance and will trigger
* corresponding lifecycle events. The events are marked accordingly, as well as thrown
* errors, so they can be correctly handled.
*/
var HyperFormula = class HyperFormula {
	/**
	* Constructor
	*
	* @internal
	*/
	constructor(_config, _stats, _dependencyGraph, _columnSearch, _parser, _unparser, _cellContentParser, _evaluator, _lazilyTransformingAstService, _crudOperations, _exporter, _namedExpressions, _serialization, _functionRegistry) {
		this._config = _config;
		this._stats = _stats;
		this._dependencyGraph = _dependencyGraph;
		this._columnSearch = _columnSearch;
		this._parser = _parser;
		this._unparser = _unparser;
		this._cellContentParser = _cellContentParser;
		this._evaluator = _evaluator;
		this._lazilyTransformingAstService = _lazilyTransformingAstService;
		this._crudOperations = _crudOperations;
		this._exporter = _exporter;
		this._namedExpressions = _namedExpressions;
		this._serialization = _serialization;
		this._functionRegistry = _functionRegistry;
		this._emitter = new Emitter();
		this._evaluationSuspended = false;
	}
	/**
	* Returns all of HyperFormula's default [configuration options](/guide/configuration-options.md).
	*
	* @example
	* ```js
	* // returns all default configuration options
	* const defaultConfig = HyperFormula.defaultConfig;
	* ```
	*
	* @category Static Accessors
	*/
	static get defaultConfig() {
		return getDefaultConfig();
	}
	/**
	* Calls the `graph` method on the dependency graph.
	* Allows for executing `graph` directly, without a need to refer to `dependencyGraph`.
	*
	* @internal
	*/
	get graph() {
		return this.dependencyGraph.graph;
	}
	/**
	* Calls the `rangeMapping` method on the dependency graph.
	* Allows for executing `rangeMapping` directly, without a need to refer to `dependencyGraph`.
	*
	* @internal
	*/
	get rangeMapping() {
		return this.dependencyGraph.rangeMapping;
	}
	/**
	* Calls the `arrayMapping` method on the dependency graph.
	* Allows for executing `arrayMapping` directly, without a need to refer to `dependencyGraph`.
	*
	* @internal
	*/
	get arrayMapping() {
		return this.dependencyGraph.arrayMapping;
	}
	/**
	* Calls the `sheetMapping` method on the dependency graph.
	* Allows for executing `sheetMapping` directly, without a need to refer to `dependencyGraph`.
	*
	* @internal
	*/
	get sheetMapping() {
		return this.dependencyGraph.sheetMapping;
	}
	/**
	* Calls the `addressMapping` method on the dependency graph.
	* Allows for executing `addressMapping` directly, without a need to refer to `dependencyGraph`.
	*
	* @internal
	*/
	get addressMapping() {
		return this.dependencyGraph.addressMapping;
	}
	/** @internal */
	get dependencyGraph() {
		return this._dependencyGraph;
	}
	/** @internal */
	get evaluator() {
		return this._evaluator;
	}
	/** @internal */
	get columnSearch() {
		return this._columnSearch;
	}
	/** @internal */
	get lazilyTransformingAstService() {
		return this._lazilyTransformingAstService;
	}
	/**
	* Returns state of the validity of the license key.
	*
	* @internal
	*/
	get licenseKeyValidityState() {
		return this._config.licenseKeyValidityState;
	}
	/**
	* Builds the engine for a sheet from a two-dimensional array representation.
	* The engine is created with a single sheet.
	* Can be configured with the optional second parameter that represents a [[ConfigParams]].
	* If not specified, the engine will be built with the default configuration.
	*
	* @param {Sheet} sheet - two-dimensional array representation of sheet
	* @param {Partial<ConfigParams>} configInput - engine configuration
	* @param {SerializedNamedExpression[]} namedExpressions - starting named expressions
	*
	* @throws [[SheetSizeLimitExceededError]] when sheet size exceeds the limits
	* @throws [[InvalidArgumentsError]] when sheet is not an array of arrays
	* @throws [[FunctionPluginValidationError]] when plugin class definition is not consistent with metadata
	*
	* @example
	* ```js
	* // data represented as an array
	* const sheetData = [
	*  ['0', '=SUM(1, 2, 3)', '52'],
	*  ['=SUM(A1:C1)', '', '=A1'],
	*  ['2', '=SUM(A1:C1)', '=theUltimateQuestionOfLife'],
	* ];
	*
	* const namedExpressions = [
	*  {
	*    name: 'theUltimateQuestionOfLife',
	*    expression: '=42',
	*  },
	* ];
	*
	* // method with optional config parameter maxColumns
	* const hfInstance = HyperFormula.buildFromArray(sheetData, { maxColumns: 1000 }, namedExpressions);
	* ```
	*
	* @category Factories
	*/
	static buildFromArray(sheet, configInput = {}, namedExpressions = []) {
		return this.buildFromEngineState(BuildEngineFactory.buildFromSheet(sheet, configInput, namedExpressions));
	}
	/**
	* Builds the engine from an object containing multiple sheets with names.
	* The engine is created with one or more sheets.
	* Can be configured with the optional second parameter that represents a [[ConfigParams]].
	* If not specified the engine will be built with the default configuration.
	*
	* @param {Sheet} sheets - object with sheets definition
	* @param {Partial<ConfigParams>} configInput - engine configuration
	* @param {SerializedNamedExpression[]} namedExpressions - starting named expressions
	*
	* @throws [[SheetSizeLimitExceededError]] when sheet size exceeds the limits
	* @throws [[InvalidArgumentsError]] when any sheet is not an array of arrays
	* @throws [[FunctionPluginValidationError]] when plugin class definition is not consistent with metadata
	*
	* @example
	* ```js
	* // data represented as an object with sheets: Sheet1 and Sheet2
	* const sheetData = {
	*  'Sheet1': [
	*    ['1', '', '=Sheet2!$A1'],
	*    ['', '2', '=SUM(1, 2, 3)'],
	*    ['=Sheet2!$A2', '2', ''],
	*   ],
	*  'Sheet2': [
	*    ['', '4', '=Sheet1!$B1'],
	*    ['', '8', '=SUM(9, 3, 3)'],
	*    ['=Sheet1!$B1', '2', '=theUltimateQuestionOfLife'],
	*   ],
	* };
	*
	* const namedExpressions = [
	*  {
	*    name: 'theUltimateQuestionOfLife',
	*    expression: '=42',
	*  },
	* ];
	*
	* // method with optional config parameter useColumnIndex
	* const hfInstance = HyperFormula.buildFromSheets(sheetData, { useColumnIndex: true }, namedExpressions);
	* ```
	*
	* @category Factories
	*/
	static buildFromSheets(sheets, configInput = {}, namedExpressions = []) {
		return this.buildFromEngineState(BuildEngineFactory.buildFromSheets(sheets, configInput, namedExpressions));
	}
	/**
	* Builds an empty engine instance.
	* Can be configured with the optional parameter that represents a [[ConfigParams]].
	* If not specified the engine will be built with the default configuration.
	*
	* @param {Partial<ConfigParams>} configInput - engine configuration
	* @param {SerializedNamedExpression[]} namedExpressions - starting named expressions
	*
	* @example
	* ```js
	* const namedExpressions = [
	*  {
	*    name: 'theUltimateQuestionOfLife',
	*    expression: '=42',
	*  },
	* ];
	*
	* // build with no initial data and with optional config parameter maxColumns
	* const hfInstance = HyperFormula.buildEmpty({ maxColumns: 1000 }, namedExpressions);
	* ```
	*
	* @category Factories
	*/
	static buildEmpty(configInput = {}, namedExpressions = []) {
		return this.buildFromEngineState(BuildEngineFactory.buildEmpty(configInput, namedExpressions));
	}
	/**
	* Returns registered language from its code string.
	*
	* For more information, see the [Localizing functions guide](/guide/localizing-functions.md).
	*
	* @param {string} languageCode - code string of the translation package
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[LanguageNotRegisteredError]] when trying to retrieve not registered language
	*
	* @example
	* ```js
	* // return registered language
	* const language = HyperFormula.getLanguage('enGB');
	* ```
	*
	* @category Static Methods
	*/
	static getLanguage(languageCode) {
		validateArgToType(languageCode, "string", "languageCode");
		const val = this.registeredLanguages.get(languageCode);
		if (val === void 0) throw new LanguageNotRegisteredError();
		else return val;
	}
	/**
	* Registers language under given code string.
	*
	* For more information, see the [Localizing functions guide](/guide/localizing-functions.md).
	*
	* @param {string} languageCode - code string of the translation package
	* @param {RawTranslationPackage} languagePackage - translation package to be registered
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[ProtectedFunctionTranslationError]] when trying to register translation for protected function
	* @throws [[LanguageAlreadyRegisteredError]] when given language is already registered
	*
	* @example
	* ```js
	* // return registered language
	* HyperFormula.registerLanguage('enUS', enUS);
	* const engine = HyperFormula.buildEmpty({language: 'enUS'});
	* ```
	*
	* @category Static Methods
	*/
	static registerLanguage(languageCode, languagePackage) {
		validateArgToType(languageCode, "string", "languageCode");
		if (this.registeredLanguages.has(languageCode)) throw new LanguageAlreadyRegisteredError();
		else this.registeredLanguages.set(languageCode, buildTranslationPackage(languagePackage));
	}
	/**
	* Unregisters language that is registered under given code string.
	*
	* For more information, see the [Localizing functions guide](/guide/localizing-functions.md).
	*
	* @param {string} languageCode - code string of the translation package
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[LanguageNotRegisteredError]] when given language is not registered
	*
	* @example
	* ```js
	* // register the language for the instance
	* HyperFormula.registerLanguage('plPL', plPL);
	*
	* // unregister plPL
	* HyperFormula.unregisterLanguage('plPL');
	* ```
	*
	* @category Static Methods
	*/
	static unregisterLanguage(languageCode) {
		validateArgToType(languageCode, "string", "languageCode");
		if (this.registeredLanguages.has(languageCode)) this.registeredLanguages.delete(languageCode);
		else throw new LanguageNotRegisteredError();
	}
	/**
	* Returns all registered languages codes.
	*
	* @example
	* ```js
	* // should return all registered language codes: ['enGB', 'plPL']
	* const registeredLanguages = HyperFormula.getRegisteredLanguagesCodes();
	* ```
	*
	* @category Static Methods
	*/
	static getRegisteredLanguagesCodes() {
		return Array.from(this.registeredLanguages.keys());
	}
	/**
	* Registers all functions in a given plugin with optional translations.
	*
	* For more information, see the [Custom functions guide](/guide/custom-functions.md).
	*
	* Note: FunctionPlugins must be registered prior to the creation of HyperFormula instances in which they are used.
	* HyperFormula instances created prior to the registration of a FunctionPlugin are unable to access the FunctionPlugin.
	* Registering a FunctionPlugin with [[custom-functions]] requires the translations parameter.
	*
	* @param {FunctionPluginDefinition} plugin - plugin class
	* @param {FunctionTranslationsPackage} translations - optional package of function names translations
	*
	* @throws [[FunctionPluginValidationError]] when plugin class definition is not consistent with metadata
	* @throws [[ProtectedFunctionTranslationError]] when trying to register translation for protected function
	*
	* @example
	* ```js
	* // import your own plugin
	* import { MyExamplePlugin } from './file_with_your_plugin';
	*
	* // register the plugin
	* HyperFormula.registerFunctionPlugin(MyExamplePlugin);
	* ```
	*
	* @category Static Methods
	*/
	static registerFunctionPlugin(plugin, translations) {
		FunctionRegistry.registerFunctionPlugin(plugin, translations);
	}
	/**
	* Unregisters all functions defined in given plugin.
	*
	* For more information, see the [Custom functions guide](/guide/custom-functions.md).
	*
	* Note: This method does not affect the existing HyperFormula instances.
	*
	* @param {FunctionPluginDefinition} plugin - plugin class
	*
	* @example
	* ```js
	* // get the class of a plugin
	* const registeredPluginClass = HyperFormula.getFunctionPlugin('EXAMPLE');
	*
	* // unregister all functions defined in a plugin of ID 'EXAMPLE'
	* HyperFormula.unregisterFunctionPlugin(registeredPluginClass);
	* ```
	*
	* @category Static Methods
	*/
	static unregisterFunctionPlugin(plugin) {
		FunctionRegistry.unregisterFunctionPlugin(plugin);
	}
	/**
	* Registers a function with a given id if such exists in a plugin.
	*
	* For more information, see the [Custom functions guide](/guide/custom-functions.md).
	*
	* Note: This method does not affect the existing HyperFormula instances.
	*
	* @param {string} functionId - function id, e.g., 'SUMIF'
	* @param {FunctionPluginDefinition} plugin - plugin class
	* @param {FunctionTranslationsPackage} translations - translations for the function name
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[FunctionPluginValidationError]] when function with a given id does not exist in plugin or plugin class definition is not consistent with metadata
	* @throws [[ProtectedFunctionTranslationError]] when trying to register translation for protected function
	*
	* @example
	* ```js
	* // import your own plugin
	* import { MyExamplePlugin } from './file_with_your_plugin';
	*
	* // register a function
	* HyperFormula.registerFunction('EXAMPLE', MyExamplePlugin);
	* ```
	*
	* @category Static Methods
	*/
	static registerFunction(functionId, plugin, translations) {
		validateArgToType(functionId, "string", "functionId");
		FunctionRegistry.registerFunction(functionId, plugin, translations);
	}
	/**
	* Unregisters a function with a given id.
	*
	* For more information, see the [Custom functions guide](/guide/custom-functions.md).
	*
	* Note: This method does not affect the existing HyperFormula instances.
	*
	* @param {string} functionId - function id, e.g., 'SUMIF'
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* // import your own plugin
	* import { MyExamplePlugin } from './file_with_your_plugin';
	*
	* // register a function
	* HyperFormula.registerFunction('EXAMPLE', MyExamplePlugin);
	*
	* // unregister a function
	* HyperFormula.unregisterFunction('EXAMPLE');
	* ```
	*
	* @category Static Methods
	*/
	static unregisterFunction(functionId) {
		validateArgToType(functionId, "string", "functionId");
		FunctionRegistry.unregisterFunction(functionId);
	}
	/**
	* Clears function registry.
	*
	* Note: This method does not affect the existing HyperFormula instances.
	*
	* @example
	* ```js
	* HyperFormula.unregisterAllFunctions();
	* ```
	*
	* @category Static Methods
	*/
	static unregisterAllFunctions() {
		FunctionRegistry.unregisterAll();
	}
	/**
	* Returns translated names of all registered functions for a given language
	*
	* @param {string} code - language code
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* // return a list of function names registered for enGB
	* const allNames = HyperFormula.getRegisteredFunctionNames('enGB');
	* ```
	*
	* @category Static Methods
	*/
	static getRegisteredFunctionNames(code) {
		validateArgToType(code, "string", "code");
		const functionIds = FunctionRegistry.getRegisteredFunctionIds();
		return this.getLanguage(code).getFunctionTranslations(functionIds);
	}
	/**
	* Returns class of a plugin used by function with given id
	*
	* For more information, see the [Custom functions guide](/guide/custom-functions.md).
	*
	* @param {string} functionId - id of a function, e.g., 'SUMIF'
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* // import your own plugin
	* import { MyExamplePlugin } from './file_with_your_plugin';
	*
	* // register a plugin
	* HyperFormula.registerFunctionPlugin(MyExamplePlugin);
	*
	* // return the class of a given plugin
	* const myFunctionClass = HyperFormula.getFunctionPlugin('EXAMPLE');
	* ```
	*
	* @category Static Methods
	*/
	static getFunctionPlugin(functionId) {
		validateArgToType(functionId, "string", "functionId");
		return FunctionRegistry.getFunctionPlugin(functionId);
	}
	/**
	* Returns classes of all plugins registered in HyperFormula.
	*
	* @example
	* ```js
	* // return classes of all plugins
	* const allClasses = HyperFormula.getAllFunctionPlugins();
	* ```
	*
	* @category Static Methods
	*/
	static getAllFunctionPlugins() {
		return FunctionRegistry.getPlugins();
	}
	/**
	* @internal
	*/
	static buildFromEngineState(engine) {
		return new HyperFormula(engine.config, engine.stats, engine.dependencyGraph, engine.columnSearch, engine.parser, engine.unparser, engine.cellContentParser, engine.evaluator, engine.lazilyTransformingAstService, engine.crudOperations, engine.exporter, engine.namedExpressions, engine.serialization, engine.functionRegistry);
	}
	/**
	* Returns the cell value of a given address.
	* Applies rounding and post-processing.
	*
	* @param {SimpleCellAddress} cellAddress - cell coordinates
	*
	* @throws [[ExpectedValueOfTypeError]] when cellAddress is of incorrect type
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[EvaluationSuspendedError]] when the evaluation is suspended
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['=SUM(1, 2, 3)', '2'],
	* ]);
	*
	* // get value of A1 cell, should be '6'
	* const A1Value = hfInstance.getCellValue({ sheet: 0, col: 0, row: 0 });
	*
	* // get value of B1 cell, should be '2'
	* const B1Value = hfInstance.getCellValue({ sheet: 0, col: 1, row: 0 });
	* ```
	*
	* @category Cells
	*/
	getCellValue(cellAddress) {
		if (!isSimpleCellAddress(cellAddress)) throw new ExpectedValueOfTypeError("SimpleCellAddress", "cellAddress");
		this.ensureEvaluationIsNotSuspended();
		return this._serialization.getCellValue(cellAddress);
	}
	/**
	* Returns a normalized formula string from the cell of a given address or `undefined` for an address that does not exist and empty values.
	*
	* @param {SimpleCellAddress} cellAddress - cell coordinates
	*
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[ExpectedValueOfTypeError]] when cellAddress is of incorrect type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['=SUM(1, 2, 3)', '0'],
	* ]);
	*
	* // should return a normalized A1 cell formula: '=SUM(1, 2, 3)'
	* const A1Formula = hfInstance.getCellFormula({ sheet: 0, col: 0, row: 0 });
	*
	* // should return a normalized B1 cell formula: 'undefined'
	* const B1Formula = hfInstance.getCellFormula({ sheet: 0, col: 1, row: 0 });
	* ```
	*
	* @category Cells
	*/
	getCellFormula(cellAddress) {
		if (!isSimpleCellAddress(cellAddress)) throw new ExpectedValueOfTypeError("SimpleCellAddress", "cellAddress");
		return this._serialization.getCellFormula(cellAddress);
	}
	/**
	* Returns the `HYPERLINK` url for a cell of a given address or `undefined` for an address that does not exist or a cell that is not `HYPERLINK`
	*
	* @param {SimpleCellAddress} cellAddress - cell coordinates
	*
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[ExpectedValueOfTypeError]] when cellAddress is of incorrect type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['=HYPERLINK("https://hyperformula.handsontable.com/", "HyperFormula")', '0'],
	* ]);
	*
	* // should return url of 'HYPERLINK': https://hyperformula.handsontable.com/
	* const A1Hyperlink = hfInstance.getCellHyperlink({ sheet: 0, col: 0, row: 0 });
	*
	* // should return 'undefined' for a cell that is not 'HYPERLINK'
	* const B1Hyperlink = hfInstance.getCellHyperlink({ sheet: 0, col: 1, row: 0 });
	* ```
	*
	* @category Cells
	*/
	getCellHyperlink(cellAddress) {
		if (!isSimpleCellAddress(cellAddress)) throw new ExpectedValueOfTypeError("SimpleCellAddress", "cellAddress");
		this.ensureEvaluationIsNotSuspended();
		return this._serialization.getCellHyperlink(cellAddress);
	}
	/**
	* Returns [[RawCellContent]] with a serialized content of the cell of a given address: either a cell formula, an explicit value, or an error.
	*
	* @param {SimpleCellAddress} cellAddress - cell coordinates
	*
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[EvaluationSuspendedError]] when the evaluation is suspended
	* @throws [[ExpectedValueOfTypeError]] when cellAddress is of incorrect type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['=SUM(1, 2, 3)', '0'],
	* ]);
	*
	* // should return serialized content of A1 cell: '=SUM(1, 2, 3)'
	* const cellA1Serialized = hfInstance.getCellSerialized({ sheet: 0, col: 0, row: 0 });
	*
	* // should return serialized content of B1 cell: '0'
	* const cellB1Serialized = hfInstance.getCellSerialized({ sheet: 0, col: 1, row: 0 });
	* ```
	*
	* @category Cells
	*/
	getCellSerialized(cellAddress) {
		if (!isSimpleCellAddress(cellAddress)) throw new ExpectedValueOfTypeError("SimpleCellAddress", "cellAddress");
		this.ensureEvaluationIsNotSuspended();
		return this._serialization.getCellSerialized(cellAddress);
	}
	/**
	* Returns an array of arrays of [[CellValue]] with values of all cells from [[Sheet]].
	* Applies rounding and post-processing.
	*
	* @param {number} sheetId - sheet ID number
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[EvaluationSuspendedError]] when the evaluation is suspended
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['0', '=SUM(1, 2, 3)', '=A1'],
	*  ['1', '=TEXT(A2, "0.0%")', '=C1'],
	*  ['2', '=SUM(A1:C1)', '=C1'],
	* ]);
	*
	* // should return all values of a sheet: [[0, 6, 0], [1, '1.0%', 0], [2, 6, 0]]
	* const sheetValues = hfInstance.getSheetValues(0);
	* ```
	*
	* @category Sheets
	*/
	getSheetValues(sheetId) {
		validateArgToType(sheetId, "number", "sheetId");
		this.ensureEvaluationIsNotSuspended();
		return this._serialization.getSheetValues(sheetId);
	}
	/**
	* Returns an array with normalized formula strings from [[Sheet]] or `undefined` for a cells that have no value.
	*
	* @param {SimpleCellAddress} sheetId - sheet ID number
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['0', '=SUM(1, 2, 3)', '=A1'],
	*  ['1', '=TEXT(A2, "0.0%")', '=C1'],
	*  ['2', '=SUM(A1:C1)', '=C1'],
	* ]);
	*
	* // should return all formulas of a sheet:
	* // [
	* //  [undefined, '=SUM(1, 2, 3)', '=A1'],
	* //  [undefined, '=TEXT(A2, "0.0%")', '=C1'],
	* //  [undefined, '=SUM(A1:C1)', '=C1'],
	* // ];
	* const sheetFormulas = hfInstance.getSheetFormulas(0);
	* ```
	*
	* @category Sheets
	*/
	getSheetFormulas(sheetId) {
		validateArgToType(sheetId, "number", "sheetId");
		return this._serialization.getSheetFormulas(sheetId);
	}
	/**
	* Returns an array of arrays of [[RawCellContent]] with serialized content of cells from [[Sheet]], either a cell formula or an explicit value.
	*
	* @param {SimpleCellAddress} sheetId - sheet ID number
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[EvaluationSuspendedError]] when the evaluation is suspended
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['0', '=SUM(1, 2, 3)', '=A1'],
	*  ['1', '=TEXT(A2, "0.0%")', '=C1'],
	*  ['2', '=SUM(A1:C1)', '=C1'],
	* ]);
	*
	* // should return:
	* // [
	* //  ['0', '=SUM(1, 2, 3)', '=A1'],
	* //  ['1', '=TEXT(A2, "0.0%")', '=C1'],
	* //  ['2', '=SUM(A1:C1)', '=C1'],
	* // ];
	* const serializedContent = hfInstance.getSheetSerialized(0);
	* ```
	*
	* @category Sheets
	*/
	getSheetSerialized(sheetId) {
		validateArgToType(sheetId, "number", "sheetId");
		this.ensureEvaluationIsNotSuspended();
		return this._serialization.getSheetSerialized(sheetId);
	}
	/**
	* Returns a map containing dimensions of all sheets for the engine instance represented as a key-value pairs where keys are sheet IDs and dimensions are returned as numbers, width and height respectively.
	*
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromSheets({
	*   Sheet1: [
	*    ['1', '2', '=Sheet2!$A1'],
	*   ],
	*   Sheet2: [
	*    ['3'],
	*    ['4'],
	*   ],
	* });
	*
	* // should return the dimensions of all sheets:
	* // { Sheet1: { width: 3, height: 1 }, Sheet2: { width: 1, height: 2 } }
	* const allSheetsDimensions = hfInstance.getAllSheetsDimensions();
	* ```
	*
	* @category Sheets
	*/
	getAllSheetsDimensions() {
		return this._serialization.genericAllSheetsGetter((arg) => this.getSheetDimensions(arg));
	}
	/**
	* Returns dimensions of a specified sheet.
	* The sheet dimensions is represented with numbers: width and height.
	*
	* Note: Due to the memory optimizations, some of the empty bottom rows and rightmost columns are not counted to the dimensions.
	*
	* @param {number} sheetId - sheet ID number
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*    ['1', '2', '=Sheet2!$A1'],
	* ]);
	*
	* // should return provided sheet's dimensions: { width: 3, height: 1 }
	* const sheetDimensions = hfInstance.getSheetDimensions(0);
	* ```
	*
	* @category Sheets
	*/
	getSheetDimensions(sheetId) {
		validateArgToType(sheetId, "number", "sheetId");
		return {
			width: this.dependencyGraph.getSheetWidth(sheetId),
			height: this.dependencyGraph.getSheetHeight(sheetId)
		};
	}
	/**
	* Returns values of all sheets in a form of an object which property keys are strings and values are 2D arrays of [[CellValue]].
	*
	* @throws [[EvaluationSuspendedError]] when the evaluation is suspended
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['1', '=A1+10', '3'],
	* ]);
	*
	* // should return all sheets values: { Sheet1: [ [ 1, 11, 3 ] ] }
	* const allSheetsValues = hfInstance.getAllSheetsValues();
	* ```
	*
	* @category Sheets
	*/
	getAllSheetsValues() {
		this.ensureEvaluationIsNotSuspended();
		return this._serialization.getAllSheetsValues();
	}
	/**
	* Returns formulas of all sheets in a form of an object which property keys are strings and values are 2D arrays of strings or possibly `undefined` when the call does not contain a formula.
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['1', '2', '=A1+10'],
	* ]);
	*
	* // should return only formulas: { Sheet1: [ [ undefined, undefined, '=A1+10' ] ] }
	* const allSheetsFormulas = hfInstance.getAllSheetsFormulas();
	* ```
	* @category Sheets
	*/
	getAllSheetsFormulas() {
		return this._serialization.getAllSheetsFormulas();
	}
	/**
	* Returns formulas or values of all sheets in a form of an object which property keys are strings and values are 2D arrays of [[RawCellContent]].
	*
	* @throws [[EvaluationSuspendedError]] when the evaluation is suspended
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['1', '2', '=A1+10'],
	* ]);
	*
	* // should return all sheets serialized content: { Sheet1: [ [ 1, 2, '=A1+10' ] ] }
	* const allSheetsSerialized = hfInstance.getAllSheetsSerialized();
	* ```
	*
	* @category Sheets
	*/
	getAllSheetsSerialized() {
		this.ensureEvaluationIsNotSuspended();
		return this._serialization.getAllSheetsSerialized();
	}
	/**
	* Updates the config with given new metadata. It is an expensive operation, as it might trigger rebuilding the engine and recalculation of all formulas.
	*
	* For more information, see the [Configuration options guide](/guide/configuration-options.md).
	*
	* @param {Partial<ConfigParams>} newParams configuration options to be updated or added
	*
	* @throws [[ExpectedValueOfTypeError]] when some parameters of config are of wrong type (e.g., currencySymbol)
	* @throws [[ConfigValueEmpty]] when some parameters of config are of invalid value (e.g., currencySymbol)
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['1', '2'],
	* ]);
	*
	* // add a config param, for example maxColumns,
	* // you can check the configuration with getConfig method
	* hfInstance.updateConfig({ maxColumns: 1000 });
	* ```
	*
	* @category Instance
	*/
	updateConfig(newParams) {
		if (Object.entries(newParams).every(([key, value]) => this._config[key] === value)) return;
		this.rebuildWithConfig(newParams);
	}
	/**
	* Returns current configuration of the engine instance.
	*
	* For more information, see the [Configuration options guide](/guide/configuration-options.md).
	*
	* @example
	* ```js
	* // should return all config metadata including default and those which were added
	* const hfConfig = hfInstance.getConfig();
	* ```
	*
	* @category Instance
	*/
	getConfig() {
		return this._config.getConfig();
	}
	/**
	* Rebuilds the HyperFormula instance preserving the current sheets data.
	*
	* @example
	* ```js
	* hfInstance.rebuildAndRecalculate();
	* ```
	*
	* @category Instance
	*/
	rebuildAndRecalculate() {
		this.rebuildWithConfig({});
	}
	/**
	* Returns a snapshot of computation time statistics.
	* It returns a map with key-value pairs where keys are enums for stat type and time (number).
	*
	* @internal
	*
	* @category Instance
	*/
	getStats() {
		return this._stats.snapshot();
	}
	/**
	* Undo the previous operation.
	*
	* For more information, see the [Undo-Redo guide](/guide/undo-redo.md).
	*
	* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
	*
	* Note that this method may trigger dependency graph recalculation.
	*
	* @fires [[valuesUpdated]] if recalculation was triggered by this change
	*
	* @throws [[NoOperationToUndoError]] when there is no operation running that can be undone
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['1', '2'],
	*  ['3', ''],
	* ]);
	*
	* // perform CRUD operation, for example remove the second row
	* hfInstance.removeRows(0, [1, 1]);
	*
	* // undo the operation, it should return the changes
	* const changes = hfInstance.undo();
	* ```
	*
	* @category Undo and Redo
	*/
	undo() {
		this._crudOperations.undo();
		return this.recomputeIfDependencyGraphNeedsIt();
	}
	/**
	* Re-do recently undone operation.
	*
	* For more information, see the [Undo-Redo guide](/guide/undo-redo.md).
	*
	* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
	*
	* Note that this method may trigger dependency graph recalculation.
	*
	* @fires [[valuesUpdated]] if recalculation was triggered by this change
	*
	* @throws [[NoOperationToRedoError]] when there is no operation running that can be re-done
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['1'],
	*  ['2'],
	*  ['3'],
	* ]);
	*
	* // perform CRUD operation, for example remove the second row
	* hfInstance.removeRows(0, [1, 1]);
	*
	* // undo the operation, it should return previous values: [['1'], ['2'], ['3']]
	* hfInstance.undo();
	*
	* // do a redo, it should return the values after removing the second row: [['1'], ['3']]
	* const changes = hfInstance.redo();
	* ```
	*
	* @category Undo and Redo
	*/
	redo() {
		this._crudOperations.redo();
		return this.recomputeIfDependencyGraphNeedsIt();
	}
	/**
	* Checks if there is at least one operation that can be undone.
	*
	* For more information, see the [Undo-Redo guide](/guide/undo-redo.md).
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['1'],
	*  ['2'],
	*  ['3'],
	* ]);
	*
	* // perform CRUD operation, for example remove the second row
	* hfInstance.removeRows(0, [1, 1]);
	*
	* // should return 'true', it is possible to undo last operation
	* // which is removing rows in this example
	* const isSomethingToUndo = hfInstance.isThereSomethingToUndo();
	* ```
	*
	* @category Undo and Redo
	*/
	isThereSomethingToUndo() {
		return this._crudOperations.isThereSomethingToUndo();
	}
	/**
	* Checks if there is at least one operation that can be re-done.
	*
	* For more information, see the [Undo-Redo guide](/guide/undo-redo.md).
	*
	* @example
	* ```js
	* hfInstance.undo();
	*
	* // when there is an action to redo, this returns 'true'
	* const isSomethingToRedo = hfInstance.isThereSomethingToRedo();
	* ```
	*
	* @category Undo and Redo
	*/
	isThereSomethingToRedo() {
		return this._crudOperations.isThereSomethingToRedo();
	}
	/**
	* Returns information whether it is possible to change the content in a rectangular area bounded by the box.
	* If returns `true`, doing [[setCellContents]] operation won't throw any errors.
	* Returns `false` if the address is invalid or the sheet does not exist.
	*
	* @param {SimpleCellAddress | SimpleCellRange} address - single cell or block of cells to check
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[SheetsNotEqual]] if range provided has distinct sheet numbers for start and end
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['1', '2'],
	* ]);
	*
	* // top left corner
	* const address1 = { col: 0, row: 0, sheet: 0 };
	* // bottom right corner
	* const address2 = { col: 1, row: 0, sheet: 0 };
	*
	* // should return 'true' for this example, it is possible to set content of
	* // width 2, height 1 in the first row and column of sheet 0
	* const isSettable = hfInstance.isItPossibleToSetCellContents({ start: address1, end: address2 });
	* ```
	*
	* @category Cells
	*/
	isItPossibleToSetCellContents(address) {
		let range;
		if (isSimpleCellAddress(address)) range = new AbsoluteCellRange(address, address);
		else if (isSimpleCellRange(address)) range = new AbsoluteCellRange(address.start, address.end);
		else throw new ExpectedValueOfTypeError("SimpleCellAddress | SimpleCellRange", "address");
		try {
			this._crudOperations.ensureRangeInSizeLimits(range);
			for (const it of range.addresses(this._dependencyGraph)) this._crudOperations.ensureItIsPossibleToChangeContent(it);
		} catch (e) {
			return false;
		}
		return true;
	}
	/**
	* Sets the content for a block of cells of a given coordinates.
	*
	* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
	*
	* Note that this method may trigger dependency graph recalculation.
	*
	* @param {SimpleCellAddress} topLeftCornerAddress - top left corner of block of cells
	* @param {(RawCellContent[][]|RawCellContent)} cellContents - array with content
	*
	* @fires [[valuesUpdated]] if recalculation was triggered by this change
	*
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[InvalidArgumentsError]] when the value is not an array of arrays or a raw cell value
	* @throws [[SheetSizeLimitExceededError]] when performing this operation would result in sheet size limits exceeding
	* @throws [[ExpectedValueOfTypeError]] if topLeftCornerAddress argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['1', '2', '=A1'],
	* ]);
	*
	* // should set the content, returns:
	* // [{
	* //   address: { sheet: 0, col: 3, row: 0 },
	* //   newValue: 2,
	* // }]
	* const changes = hfInstance.setCellContents({ col: 3, row: 0, sheet: 0 }, [['=B1']]);
	* ```
	*
	* @category Cells
	*/
	setCellContents(topLeftCornerAddress, cellContents) {
		this._crudOperations.setCellContents(topLeftCornerAddress, cellContents);
		return this.recomputeIfDependencyGraphNeedsIt();
	}
	/**
	* Reorders rows of a sheet according to a source-target mapping.
	*
	* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
	*
	* Note that this method may trigger dependency graph recalculation.
	*
	* @param {number} sheetId - ID of a sheet to operate on
	* @param {[number, number][]} rowMapping - array mapping original positions to final positions of rows
	*
	* @fires [[valuesUpdated]] if recalculation was triggered by this change
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[InvalidArgumentsError]] when rowMapping does not define correct row permutation for some subset of rows of the given sheet
	* @throws [[SourceLocationHasArrayError]] when the selected position has array inside
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  [1],
	*  [2],
	*  [4, 5],
	* ]);
	*
	* // should set swap rows 0 and 2 in place, returns:
	* // [{
	* //   address: { sheet: 0, col: 0, row: 2 },
	* //   newValue: 1,
	* // },
	* // {
	* //   address: { sheet: 0, col: 1, row: 2 },
	* //   newValue: null,
	* // },
	* // {
	* //   address: { sheet: 0, col: 0, row: 0 },
	* //   newValue: 4,
	* // },
	* // {
	* //   address: { sheet: 0, col: 1, row: 0 },
	* //   newValue: 5,
	* // }]
	* const changes = hfInstance.swapRowIndexes(0, [[0, 2], [2, 0]]);
	* ```
	*
	* @category Rows
	*/
	swapRowIndexes(sheetId, rowMapping) {
		validateArgToType(sheetId, "number", "sheetId");
		this._crudOperations.setRowOrder(sheetId, rowMapping);
		return this.recomputeIfDependencyGraphNeedsIt();
	}
	/**
	* Checks if it is possible to reorder rows of a sheet according to a source-target mapping.
	*
	* @param {number} sheetId - ID of a sheet to operate on
	* @param {[number, number][]} rowMapping - array mapping original positions to final positions of rows
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  [1],
	*  [2],
	*  [4, 5],
	* ]);
	*
	* // returns true
	* const isSwappable = hfInstance.isItPossibleToSwapRowIndexes(0, [[0, 2], [2, 0]]);
	*
	* // returns false
	* const isSwappable = hfInstance.isItPossibleToSwapRowIndexes(0, [[0, 1]]);
	* ```
	*
	* @category Rows
	*/
	isItPossibleToSwapRowIndexes(sheetId, rowMapping) {
		validateArgToType(sheetId, "number", "sheetId");
		try {
			this._crudOperations.validateSwapRowIndexes(sheetId, rowMapping);
			this._crudOperations.testRowOrderForArrays(sheetId, rowMapping);
			return true;
		} catch (e) {
			return false;
		}
	}
	/**
	* Reorders rows of a sheet according to a permutation of 0-based indexes.
	* Parameter `newRowOrder` should have a form `[ newPositionForRow0, newPositionForRow1, newPositionForRow2, ... ]`.
	* This method might be used to [sort the rows of a sheet](../../guide/sorting-data.md).
	*
	* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
	*
	* Note: This method may trigger dependency graph recalculation.
	*
	* @param {number} sheetId - ID of a sheet to operate on
	* @param {number[]} newRowOrder - permutation of rows; array length must match the number of rows returned by [getSheetDimensions()](#getsheetdimensions)
	*
	* @fires [[valuesUpdated]] if recalculation was triggered by this change
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[InvalidArgumentsError]] when rowMapping does not define correct row permutation for some subset of rows of the given sheet
	* @throws [[SourceLocationHasArrayError]] when the selected position has array inside
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['A'],
	*  ['B'],
	*  ['C'],
	*  ['D']
	* ]);
	*
	* const newRowOrder = [0, 3, 2, 1]; // [ newPosForA, newPosForB, newPosForC, newPosForD ]
	*
	* const changes = hfInstance.setRowOrder(0, newRowOrder);
	*
	* // Sheet after this operation: [['A'], ['D'], ['C'], ['B']]
	* ```
	*
	* @category Rows
	*/
	setRowOrder(sheetId, newRowOrder) {
		validateArgToType(sheetId, "number", "sheetId");
		const mapping = this._crudOperations.mappingFromOrder(sheetId, newRowOrder, "row");
		return this.swapRowIndexes(sheetId, mapping);
	}
	/**
	* Checks if it is possible to reorder rows of a sheet according to a permutation.
	*
	* @param {number} sheetId - ID of a sheet to operate on
	* @param {number[]} newRowOrder - permutation of rows
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  [1],
	*  [2],
	*  [4, 5],
	* ]);
	*
	* // returns true
	* hfInstance.isItPossibleToSetRowOrder(0, [2, 1, 0]);
	*
	* // returns false
	* hfInstance.isItPossibleToSetRowOrder(0, [2]);
	* ```
	*
	* @category Rows
	*/
	isItPossibleToSetRowOrder(sheetId, newRowOrder) {
		validateArgToType(sheetId, "number", "sheetId");
		try {
			const rowMapping = this._crudOperations.mappingFromOrder(sheetId, newRowOrder, "row");
			this._crudOperations.validateSwapRowIndexes(sheetId, rowMapping);
			this._crudOperations.testRowOrderForArrays(sheetId, rowMapping);
			return true;
		} catch (e) {
			return false;
		}
	}
	/**
	* Reorders columns of a sheet according to a source-target mapping.
	*
	* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
	*
	* Note that this method may trigger dependency graph recalculation.
	*
	* @param {number} sheetId - ID of a sheet to operate on
	* @param {[number, number][]} columnMapping - array mapping original positions to final positions of columns
	*
	* @fires [[valuesUpdated]] if recalculation was triggered by this change
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[InvalidArgumentsError]] when columnMapping does not define correct column permutation for some subset of columns of the given sheet
	* @throws [[SourceLocationHasArrayError]] when the selected position has array inside
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  [1, 2, 4],
	*  [5]
	* ]);
	*
	* // should set swap columns 0 and 2 in place, returns:
	* // [{
	* //   address: { sheet: 0, col: 2, row: 0 },
	* //   newValue: 1,
	* // },
	* // {
	* //   address: { sheet: 0, col: 2, row: 1 },
	* //   newValue: 5,
	* // },
	* // {
	* //   address: { sheet: 0, col: 0, row: 0 },
	* //   newValue: 4,
	* // },
	* // {
	* //   address: { sheet: 0, col: 0, row: 1 },
	* //   newValue: null,
	* // }]
	* const changes = hfInstance.swapColumnIndexes(0, [[0, 2], [2, 0]]);
	* ```
	*
	* @category Columns
	*/
	swapColumnIndexes(sheetId, columnMapping) {
		validateArgToType(sheetId, "number", "sheetId");
		this._crudOperations.setColumnOrder(sheetId, columnMapping);
		return this.recomputeIfDependencyGraphNeedsIt();
	}
	/**
	* Checks if it is possible to reorder columns of a sheet according to a source-target mapping.
	*
	* @fires [[valuesUpdated]] if recalculation was triggered by this change
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  [1, 2, 4],
	*  [5]
	* ]);
	*
	* // returns true
	* hfInstance.isItPossibleToSwapColumnIndexes(0, [[0, 2], [2, 0]]);
	*
	* // returns false
	* hfInstance.isItPossibleToSwapColumnIndexes(0, [[0, 1]]);
	* ```
	*
	* @category Columns
	*/
	isItPossibleToSwapColumnIndexes(sheetId, columnMapping) {
		validateArgToType(sheetId, "number", "sheetId");
		try {
			this._crudOperations.validateSwapColumnIndexes(sheetId, columnMapping);
			this._crudOperations.testColumnOrderForArrays(sheetId, columnMapping);
			return true;
		} catch (e) {
			return false;
		}
	}
	/**
	* Reorders columns of a sheet according to a permutation of 0-based indexes.
	* Parameter `newColumnOrder` should have a form `[ newPositionForColumn0, newPositionForColumn1, newPositionForColumn2, ... ]`.
	* This method might be used to [sort the columns of a sheet](../../guide/sorting-data.md).
	*
	* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
	*
	* Note: This method may trigger dependency graph recalculation.
	*
	* @param {number} sheetId - ID of a sheet to operate on
	* @param {number[]} newColumnOrder - permutation of columns; array length must match the number of columns returned by [getSheetDimensions()](#getsheetdimensions)
	*
	* @fires [[valuesUpdated]] if recalculation was triggered by this change
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[InvalidArgumentsError]] when columnMapping does not define correct column permutation for some subset of columns of the given sheet
	* @throws [[SourceLocationHasArrayError]] when the selected position has array inside
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*   ['A', 'B', 'C', 'D']
	* ]);
	*
	* const newColumnOrder = [0, 3, 2, 1]; // [ newPosForA, newPosForB, newPosForC, newPosForD ]
	*
	* const changes = hfInstance.setColumnOrder(0, newColumnOrder);
	*
	* // Sheet after this operation: [['A', 'D', 'C', 'B']]
	* ```
	*
	* @category Columns
	*/
	setColumnOrder(sheetId, newColumnOrder) {
		validateArgToType(sheetId, "number", "sheetId");
		const mapping = this._crudOperations.mappingFromOrder(sheetId, newColumnOrder, "column");
		return this.swapColumnIndexes(sheetId, mapping);
	}
	/**
	* Checks if it is possible to reorder columns of a sheet according to a permutation.
	*
	* @param {number} sheetId - ID of a sheet to operate on
	* @param {number[]} newColumnOrder - permutation of columns
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  [1, 2, 4],
	*  [5]
	* ]);
	*
	* // returns true
	* hfInstance.isItPossibleToSetColumnOrder(0, [2, 1, 0]);
	*
	* // returns false
	* hfInstance.isItPossibleToSetColumnOrder(0, [1]);
	* ```
	*
	* @category Columns
	*/
	isItPossibleToSetColumnOrder(sheetId, newColumnOrder) {
		validateArgToType(sheetId, "number", "sheetId");
		try {
			const columnMapping = this._crudOperations.mappingFromOrder(sheetId, newColumnOrder, "column");
			this._crudOperations.validateSwapColumnIndexes(sheetId, columnMapping);
			this._crudOperations.testColumnOrderForArrays(sheetId, columnMapping);
			return true;
		} catch (e) {
			return false;
		}
	}
	/**
	* Returns information whether it is possible to add rows into a specified position in a given sheet.
	* Checks against particular rules to ascertain that addRows can be called.
	* If returns `true`, doing [[addRows]] operation won't throw any errors.
	* Returns `false` if adding rows would exceed the sheet size limit or given arguments are invalid.
	*
	* @param {number} sheetId - sheet ID in which rows will be added
	* @param {ColumnRowIndex[]} indexes - non-contiguous indexes with format [row, amount], where row is a row number above which the rows will be added
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['1', '2', '3'],
	* ]);
	*
	* // should return 'true' for this example,
	* // it is possible to add one row in the second row of sheet 0
	* const isAddable = hfInstance.isItPossibleToAddRows(0, [1, 1]);
	* ```
	*
	* @category Rows
	*/
	isItPossibleToAddRows(sheetId, ...indexes) {
		validateArgToType(sheetId, "number", "sheetId");
		const normalizedIndexes = normalizeAddedIndexes(indexes);
		try {
			this._crudOperations.ensureItIsPossibleToAddRows(sheetId, ...normalizedIndexes);
			return true;
		} catch (e) {
			return false;
		}
	}
	/**
	* Adds multiple rows into a specified position in a given sheet.
	* Does nothing if rows are outside effective sheet size.
	*
	* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
	*
	* Note that this method may trigger dependency graph recalculation.
	*
	* @param {number} sheetId - sheet ID in which rows will be added
	* @param {ColumnRowIndex[]} indexes - non-contiguous indexes with format [row, amount], where row is a row number above which the rows will be added
	*
	* @fires [[valuesUpdated]] if recalculation was triggered by this change
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[SheetSizeLimitExceededError]] when performing this operation would result in sheet size limits exceeding
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['1'],
	*  ['2'],
	* ]);
	*
	* // should return a list of cells which values changed after the operation,
	* // their absolute addresses and new values
	* const changes = hfInstance.addRows(0, [0, 1]);
	* ```
	*
	* @category Rows
	*/
	addRows(sheetId, ...indexes) {
		validateArgToType(sheetId, "number", "sheetId");
		this._crudOperations.addRows(sheetId, ...indexes);
		return this.recomputeIfDependencyGraphNeedsIt();
	}
	/**
	* Returns information whether it is possible to remove rows from a specified position in a given sheet.
	* Checks against particular rules to ascertain that removeRows can be called.
	* If returns `true`, doing [[removeRows]] operation won't throw any errors.
	* Returns `false` if given arguments are invalid.
	*
	* @param {number} sheetId - sheet ID from which rows will be removed
	* @param {ColumnRowIndex[]} indexes - non-contiguous indexes with format: [row, amount]
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['1'],
	*  ['2'],
	* ]);
	*
	* // should return 'true' for this example
	* // it is possible to remove one row from row 1 of sheet 0
	* const isRemovable = hfInstance.isItPossibleToRemoveRows(0, [1, 1]);
	* ```
	*
	* @category Rows
	*/
	isItPossibleToRemoveRows(sheetId, ...indexes) {
		validateArgToType(sheetId, "number", "sheetId");
		const normalizedIndexes = normalizeRemovedIndexes(indexes);
		try {
			this._crudOperations.ensureItIsPossibleToRemoveRows(sheetId, ...normalizedIndexes);
			return true;
		} catch (e) {
			return false;
		}
	}
	/**
	* Removes multiple rows from a specified position in a given sheet.
	* Does nothing if rows are outside the effective sheet size.
	*
	* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
	*
	* Note that this method may trigger dependency graph recalculation.
	*
	* @param {number} sheetId - sheet ID from which rows will be removed
	* @param {ColumnRowIndex[]} indexes - non-contiguous indexes with format: [row, amount]
	*
	* @fires [[valuesUpdated]] if recalculation was triggered by this change
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[InvalidArgumentsError]] when the given arguments are invalid
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['1'],
	*  ['2'],
	* ]);
	*
	* // should return: [{ sheet: 0, col: 1, row: 2, value: null }] for this example
	* const changes = hfInstance.removeRows(0, [1, 1]);
	* ```
	*
	* @category Rows
	*/
	removeRows(sheetId, ...indexes) {
		validateArgToType(sheetId, "number", "sheetId");
		this._crudOperations.removeRows(sheetId, ...indexes);
		return this.recomputeIfDependencyGraphNeedsIt();
	}
	/**
	* Returns information whether it is possible to add columns into a specified position in a given sheet.
	* Checks against particular rules to ascertain that addColumns can be called.
	* If returns `true`, doing [[addColumns]] operation won't throw any errors.
	* Returns `false` if adding columns would exceed the sheet size limit or given arguments are invalid.
	*
	* @param {number} sheetId - sheet ID in which columns will be added
	* @param {ColumnRowIndex[]} indexes - non-contiguous indexes with format: [column, amount], where column is a column number from which new columns will be added
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['1', '2'],
	* ]);
	*
	* // should return 'true' for this example,
	* // it is possible to add 1 column in sheet 0, at column 1
	* const isAddable = hfInstance.isItPossibleToAddColumns(0, [1, 1]);
	* ```
	*
	* @category Columns
	*/
	isItPossibleToAddColumns(sheetId, ...indexes) {
		validateArgToType(sheetId, "number", "sheetId");
		const normalizedIndexes = normalizeAddedIndexes(indexes);
		try {
			this._crudOperations.ensureItIsPossibleToAddColumns(sheetId, ...normalizedIndexes);
			return true;
		} catch (e) {
			return false;
		}
	}
	/**
	* Adds multiple columns into a specified position in a given sheet.
	* Does nothing if the columns are outside the effective sheet size.
	*
	* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
	*
	* Note that this method may trigger dependency graph recalculation.
	*
	* @param {number} sheetId - sheet ID in which columns will be added
	* @param {ColumnRowIndex[]} indexes - non-contiguous indexes with format: [column, amount], where column is a column number from which new columns will be added
	*
	* @fires [[valuesUpdated]] if recalculation was triggered by this change
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[InvalidArgumentsError]] when the given arguments are invalid
	* @throws [[SheetSizeLimitExceededError]] when performing this operation would result in sheet size limits exceeding
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['=RAND()', '42'],
	* ]);
	*
	* // should return a list of cells which values changed after the operation,
	* // their absolute addresses and new values, for this example:
	* // [{
	* //   address: { sheet: 0, col: 1, row: 0 },
	* //   newValue: 0.92754862796338,
	* // }]
	* const changes = hfInstance.addColumns(0, [0, 1]);
	* ```
	*
	* @category Columns
	*/
	addColumns(sheetId, ...indexes) {
		validateArgToType(sheetId, "number", "sheetId");
		this._crudOperations.addColumns(sheetId, ...indexes);
		return this.recomputeIfDependencyGraphNeedsIt();
	}
	/**
	* Returns information whether it is possible to remove columns from a specified position in a given sheet.
	* Checks against particular rules to ascertain that removeColumns can be called.
	* If returns `true`, doing [[removeColumns]] operation won't throw any errors.
	* Returns `false` if given arguments are invalid.
	*
	* @param {number} sheetId - sheet ID from which columns will be removed
	* @param {ColumnRowIndex[]} indexes - non-contiguous indexes with format [column, amount]
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['1', '2'],
	* ]);
	*
	* // should return 'true' for this example
	* // it is possible to remove one column, in place of the second column of sheet 0
	* const isRemovable = hfInstance.isItPossibleToRemoveColumns(0, [1, 1]);
	* ```
	*
	* @category Columns
	*/
	isItPossibleToRemoveColumns(sheetId, ...indexes) {
		validateArgToType(sheetId, "number", "sheetId");
		const normalizedIndexes = normalizeRemovedIndexes(indexes);
		try {
			this._crudOperations.ensureItIsPossibleToRemoveColumns(sheetId, ...normalizedIndexes);
			return true;
		} catch (e) {
			return false;
		}
	}
	/**
	* Removes multiple columns from a specified position in a given sheet.
	* Does nothing if columns are outside the effective sheet size.
	*
	* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
	*
	* Note that this method may trigger dependency graph recalculation.
	*
	* @param {number} sheetId - sheet ID from which columns will be removed
	* @param {ColumnRowIndex[]} indexes - non-contiguous indexes with format: [column, amount]
	*
	* @fires [[valuesUpdated]] if recalculation was triggered by this change
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[InvalidArgumentsError]] when the given arguments are invalid
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['0', '=SUM(1, 2, 3)', '=A1'],
	* ]);
	*
	* // should return a list of cells which values changed after the operation,
	* // their absolute addresses and new values, in this example it will return:
	* // [{
	* //   address: { sheet: 0, col: 1, row: 0 },
	* //   newValue: { error: [CellError], value: '#REF!' },
	* // }]
	* const changes = hfInstance.removeColumns(0, [0, 1]);
	* ```
	*
	* @category Columns
	*/
	removeColumns(sheetId, ...indexes) {
		validateArgToType(sheetId, "number", "sheetId");
		this._crudOperations.removeColumns(sheetId, ...indexes);
		return this.recomputeIfDependencyGraphNeedsIt();
	}
	/**
	* Returns information whether it is possible to move cells to a specified position in a given sheet.
	* Checks against particular rules to ascertain that moveCells can be called.
	* If returns `true`, doing [[moveCells]] operation won't throw any errors.
	* Returns `false` if the operation might be disrupted and causes side effects by the fact that there is an array inside the selected columns, the target location includes an array or the provided address is invalid.
	*
	* @param {SimpleCellRange} source - range for a moved block
	* @param {SimpleCellAddress} destinationLeftCorner - upper left address of the target cell block
	*
	* @throws [[ExpectedValueOfTypeError]] if destinationLeftCorner, source, or any of basic type arguments are of wrong type
	* @throws [[SheetsNotEqual]] if range provided has distinct sheet numbers for start and end
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['1', '2'],
	* ]);
	*
	* // choose the coordinates and assign them to variables
	* const source = { sheet: 0, col: 1, row: 0 };
	* const destination = { sheet: 0, col: 3, row: 0 };
	*
	* // should return 'true' for this example
	* // it is possible to move a block of width 1 and height 1
	* // from the corner: column 1 and row 0 of sheet 0
	* // into destination corner: column 3, row 0 of sheet 0
	* const isMovable = hfInstance.isItPossibleToMoveCells({ start: source, end: source }, destination);
	* ```
	* @category Cells
	*/
	isItPossibleToMoveCells(source, destinationLeftCorner) {
		if (!isSimpleCellAddress(destinationLeftCorner)) throw new ExpectedValueOfTypeError("SimpleCellAddress", "destinationLeftCorner");
		if (!isSimpleCellRange(source)) throw new ExpectedValueOfTypeError("SimpleCellRange", "source");
		try {
			const range = new AbsoluteCellRange(source.start, source.end);
			this._crudOperations.operations.ensureItIsPossibleToMoveCells(range.start, range.width(), range.height(), destinationLeftCorner);
			return true;
		} catch (e) {
			return false;
		}
	}
	/**
	* Moves the content of a cell block from source to the target location.
	*
	* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
	*
	* Note that this method may trigger dependency graph recalculation.
	*
	* @param {SimpleCellRange} source - range for a moved block
	* @param {SimpleCellAddress} destinationLeftCorner - upper left address of the target cell block
	*
	* @fires [[valuesUpdated]] if recalculation was triggered by this change
	*
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[ExpectedValueOfTypeError]] if destinationLeftCorner or source are of wrong type
	* @throws [[InvalidArgumentsError]] when the given arguments are invalid
	* @throws [[SheetSizeLimitExceededError]] when performing this operation would result in sheet size limits exceeding
	* @throws [[SourceLocationHasArrayError]] when the source location has array inside - array cannot be moved
	* @throws [[TargetLocationHasArrayError]] when the target location has array inside - cells cannot be replaced by the array
	* @throws [[SheetsNotEqual]] if range provided has distinct sheet numbers for start and end
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['=RAND()', '42'],
	* ]);
	*
	* // choose the coordinates and assign them to variables
	* const source = { sheet: 0, col: 1, row: 0 };
	* const destination = { sheet: 0, col: 3, row: 0 };
	*
	* // should return a list of cells which values changed after the operation,
	* // their absolute addresses and new values, for this example:
	* // [{
	* //   address: { sheet: 0, col: 0, row: 0 },
	* //   newValue: 0.93524248002062,
	* // }]
	* const changes = hfInstance.moveCells({ start: source, end: source }, destination);
	* ```
	*
	* @category Cells
	*/
	moveCells(source, destinationLeftCorner) {
		if (!isSimpleCellAddress(destinationLeftCorner)) throw new ExpectedValueOfTypeError("SimpleCellAddress", "destinationLeftCorner");
		if (!isSimpleCellRange(source)) throw new ExpectedValueOfTypeError("SimpleCellRange", "source");
		const range = new AbsoluteCellRange(source.start, source.end);
		this._crudOperations.moveCells(range.start, range.width(), range.height(), destinationLeftCorner);
		return this.recomputeIfDependencyGraphNeedsIt();
	}
	/**
	* Returns information whether it is possible to move a particular number of rows to a specified position in a given sheet.
	* Checks against particular rules to ascertain that moveRows can be called.
	* If returns `true`, doing [[moveRows]] operation won't throw any errors.
	* Returns `false` if the operation might be disrupted and causes side effects by the fact that there is an array inside the selected rows, the target location includes an array or the provided address is invalid.
	*
	* @param {number} sheetId - a sheet number in which the operation will be performed
	* @param {number} startRow - number of the first row to move
	* @param {number} numberOfRows - number of rows to move
	* @param {number} targetRow - row number before which rows will be moved
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['1'],
	*  ['2'],
	* ]);
	*
	* // should return 'true' for this example
	* // it is possible to move one row from row 0 into row 2
	* const isMovable = hfInstance.isItPossibleToMoveRows(0, 0, 1, 2);
	* ```
	*
	* @category Rows
	*/
	isItPossibleToMoveRows(sheetId, startRow, numberOfRows, targetRow) {
		validateArgToType(sheetId, "number", "sheetId");
		validateArgToType(startRow, "number", "startRow");
		validateArgToType(numberOfRows, "number", "numberOfRows");
		validateArgToType(targetRow, "number", "targetRow");
		try {
			this._crudOperations.ensureItIsPossibleToMoveRows(sheetId, startRow, numberOfRows, targetRow);
			return true;
		} catch (e) {
			return false;
		}
	}
	/**
	* Moves a particular number of rows to a specified position in a given sheet.
	*
	* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
	*
	* Note that this method may trigger dependency graph recalculation.
	*
	* @param {number} sheetId - a sheet number in which the operation will be performed
	* @param {number} startRow - number of the first row to move
	* @param {number} numberOfRows - number of rows to move
	* @param {number} targetRow - row number before which rows will be moved
	*
	* @fires [[valuesUpdated]] if recalculation was triggered by this change
	*
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[InvalidArgumentsError]] when the given arguments are invalid
	* @throws [[SourceLocationHasArrayError]] when the source location has array inside - array cannot be moved
	* @throws [[TargetLocationHasArrayError]] when the target location has array inside - cells cannot be replaced by the array
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['1'],
	*  ['2'],
	* ]);
	*
	* // should return a list of cells which values changed after the operation,
	* // their absolute addresses and new values
	* const changes = hfInstance.moveRows(0, 0, 1, 2);
	* ```
	*
	* @category Rows
	*/
	moveRows(sheetId, startRow, numberOfRows, targetRow) {
		validateArgToType(sheetId, "number", "sheetId");
		validateArgToType(startRow, "number", "startRow");
		validateArgToType(numberOfRows, "number", "numberOfRows");
		validateArgToType(targetRow, "number", "targetRow");
		this._crudOperations.moveRows(sheetId, startRow, numberOfRows, targetRow);
		return this.recomputeIfDependencyGraphNeedsIt();
	}
	/**
	* Returns information whether it is possible to move a particular number of columns to a specified position in a given sheet.
	* Checks against particular rules to ascertain that moveColumns can be called.
	* If returns `true`, doing [[moveColumns]] operation won't throw any errors.
	* Returns `false` if the operation might be disrupted and causes side effects by the fact that there is an array inside the selected columns, the target location includes an array or the provided address is invalid.
	*
	* @param {number} sheetId - a sheet number in which the operation will be performed
	* @param {number} startColumn - number of the first column to move
	* @param {number} numberOfColumns - number of columns to move
	* @param {number} targetColumn - column number before which columns will be moved
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['1', '2'],
	* ]);
	*
	* // should return 'true' for this example
	* // it is possible to move one column from column 1 into column 2 of sheet 0
	* const isMovable = hfInstance.isItPossibleToMoveColumns(0, 1, 1, 2);
	* ```
	*
	* @category Columns
	*/
	isItPossibleToMoveColumns(sheetId, startColumn, numberOfColumns, targetColumn) {
		validateArgToType(sheetId, "number", "sheetId");
		validateArgToType(startColumn, "number", "startColumn");
		validateArgToType(numberOfColumns, "number", "numberOfColumns");
		validateArgToType(targetColumn, "number", "targetColumn");
		try {
			this._crudOperations.ensureItIsPossibleToMoveColumns(sheetId, startColumn, numberOfColumns, targetColumn);
			return true;
		} catch (e) {
			return false;
		}
	}
	/**
	* Moves a particular number of columns to a specified position in a given sheet.
	*
	* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
	*
	* Note that this method may trigger dependency graph recalculation.
	*
	* @param {number} sheetId - a sheet number in which the operation will be performed
	* @param {number} startColumn - number of the first column to move
	* @param {number} numberOfColumns - number of columns to move
	* @param {number} targetColumn - column number before which columns will be moved
	*
	* @fires [[valuesUpdated]] if recalculation was triggered by this change
	*
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[InvalidArgumentsError]] when the given arguments are invalid
	* @throws [[SourceLocationHasArrayError]] when the source location has array inside - array cannot be moved
	* @throws [[TargetLocationHasArrayError]] when the target location has array inside - cells cannot be replaced by the array
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['1', '2', '3', '=RAND()', '=SUM(A1:C1)'],
	* ]);
	*
	* // should return a list of cells which values changed after the operation,
	* // their absolute addresses and new values, for this example:
	* // [{
	* //   address: { sheet: 0, col: 1, row: 0 },
	* //   newValue: 0.16210054671639,
	* //  }, {
	* //   address: { sheet: 0, col: 4, row: 0 },
	* //   newValue: 6.16210054671639,
	* // }]
	* const changes = hfInstance.moveColumns(0, 1, 1, 2);
	* ```
	*
	* @category Columns
	*/
	moveColumns(sheetId, startColumn, numberOfColumns, targetColumn) {
		validateArgToType(sheetId, "number", "sheetId");
		validateArgToType(startColumn, "number", "startColumn");
		validateArgToType(numberOfColumns, "number", "numberOfColumns");
		validateArgToType(targetColumn, "number", "targetColumn");
		this._crudOperations.moveColumns(sheetId, startColumn, numberOfColumns, targetColumn);
		return this.recomputeIfDependencyGraphNeedsIt();
	}
	/**
	* Stores a copy of the cell block in internal clipboard for the further paste.
	* Returns the copied values for use in external clipboard.
	*
	* For more information, see the [Clipboard Operations guide](/guide/clipboard-operations.md).
	*
	* @param {SimpleCellRange} source - rectangle range to copy
	*
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[ExpectedValueOfTypeError]] if source is of wrong type
	* @throws [[SheetsNotEqual]] if range provided has distinct sheet numbers for start and end
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*   ['1', '2'],
	* ]);
	*
	* // it copies [ [ 2 ] ]
	* const clipboardContent = hfInstance.copy({
	*   start: { sheet: 0, col: 1, row: 0 },
	*   end: { sheet: 0, col: 1, row: 0 },
	* });
	* ```
	*
	* The usage of the internal clipboard is described thoroughly in the [Clipboard Operations guide](../../guide/clipboard-operations.md).
	*
	* @category Clipboard
	*/
	copy(source) {
		if (!isSimpleCellRange(source)) throw new ExpectedValueOfTypeError("SimpleCellRange", "source");
		const range = new AbsoluteCellRange(source.start, source.end);
		this._crudOperations.copy(range.start, range.width(), range.height());
		return this.getRangeValues(source);
	}
	/**
	* Stores information of the cell block in internal clipboard for further paste.
	* Calling [[paste]] right after this method is equivalent to call [[moveCells]].
	* Almost any CRUD operation called after this method will abort the cut operation.
	* Returns the cut values for use in external clipboard.
	*
	* For more information, see the [Clipboard Operations guide](/guide/clipboard-operations.md).
	*
	* @param {SimpleCellRange} source - rectangle range to cut
	*
	* @throws [[ExpectedValueOfTypeError]] if source is of wrong type
	* @throws [[SheetsNotEqual]] if range provided has distinct sheet numbers for start and end
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*   ['1', '2'],
	* ]);
	*
	* // returns the values that were cut: [ [ 1 ] ]
	* const clipboardContent = hfInstance.cut({
	*   start: { sheet: 0, col: 0, row: 0 },
	*   end: { sheet: 0, col: 0, row: 0 },
	* });
	* ```
	*
	* The usage of the internal clipboard is described thoroughly in the [Clipboard Operations guide](../../guide/clipboard-operations.md).
	*
	* @category Clipboard
	*/
	cut(source) {
		if (!isSimpleCellRange(source)) throw new ExpectedValueOfTypeError("SimpleCellRange", "source");
		const range = new AbsoluteCellRange(source.start, source.end);
		this._crudOperations.cut(range.start, range.width(), range.height());
		return this.getRangeValues(source);
	}
	/**
	* When called after [[copy]] it pastes copied values and formulas into a cell block.
	* When called after [[cut]] it performs [[moveCells]] operation into the cell block.
	* Does nothing if the clipboard is empty.
	*
	* For more information, see the [Clipboard Operations guide](/guide/clipboard-operations.md).
	*
	* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
	*
	* Note that this method may trigger dependency graph recalculation.
	*
	* @param {SimpleCellAddress} targetLeftCorner - upper left address of the target cell block
	*
	* @fires [[valuesUpdated]] if recalculation was triggered by this change
	*
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[EvaluationSuspendedError]] when the evaluation is suspended
	* @throws [[SheetSizeLimitExceededError]] when performing this operation would result in sheet size limits exceeding
	* @throws [[NothingToPasteError]] when clipboard is empty
	* @throws [[TargetLocationHasArrayError]] when the selected target area has array inside
	* @throws [[ExpectedValueOfTypeError]] if targetLeftCorner is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*   ['1', '2'],
	* ]);
	*
	* // [ [ 2 ] ] was copied
	* const clipboardContent = hfInstance.copy({
	*   start: { sheet: 0, col: 1, row: 0 },
	*   end: { sheet: 0, col: 1, row: 0 },
	* });
	*
	* // returns a list of modified cells: their absolute addresses and new values
	* const changes = hfInstance.paste({ sheet: 0, col: 1, row: 0 });
	* ```
	*
	* The usage of the internal clipboard is described thoroughly in the [Clipboard Operations guide](../../guide/clipboard-operations.md).
	*
	* @category Clipboard
	*/
	paste(targetLeftCorner) {
		if (!isSimpleCellAddress(targetLeftCorner)) throw new ExpectedValueOfTypeError("SimpleCellAddress", "targetLeftCorner");
		this.ensureEvaluationIsNotSuspended();
		this._crudOperations.paste(targetLeftCorner);
		return this.recomputeIfDependencyGraphNeedsIt();
	}
	/**
	* Returns information whether there is something in the clipboard.
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['1', '2'],
	* ]);
	*
	* // copy desired content
	* const clipboardContent = hfInstance.copy({
	*   start: { sheet: 0, col: 1, row: 0 },
	*   end: { sheet: 0, col: 1, row: 0 },
	* });
	*
	* // returns 'false', there is content in the clipboard
	* const isClipboardEmpty = hfInstance.isClipboardEmpty();
	* ```
	*
	* The usage of the internal clipboard is described thoroughly in the [Clipboard Operations guide](../../guide/clipboard-operations.md).
	*
	* @category Clipboard
	*/
	isClipboardEmpty() {
		return this._crudOperations.isClipboardEmpty();
	}
	/**
	* Clears the clipboard content.
	*
	* @example
	* ```js
	* // clears the clipboard, isClipboardEmpty() should return true if called afterwards
	* hfInstance.clearClipboard();
	* ```
	*
	* The usage of the internal clipboard is described thoroughly in the [Clipboard Operations guide](../../guide/clipboard-operations.md).
	*
	* @category Clipboard
	*/
	clearClipboard() {
		this._crudOperations.clearClipboard();
	}
	/**
	* Clears the redo stack in undoRedo history.
	*
	* For more information, see the [Undo-Redo guide](/guide/undo-redo.md).
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*   ['1', '2', '3'],
	* ]);
	*
	* // do an operation, for example remove columns
	* hfInstance.removeColumns(0, [0, 1]);
	*
	* // undo the operation
	* hfInstance.undo();
	*
	* // redo the operation
	* hfInstance.redo();
	*
	* // clear the redo stack
	* hfInstance.clearRedoStack();
	* ```
	*
	* @category Undo and Redo
	*/
	clearRedoStack() {
		this._crudOperations.undoRedo.clearRedoStack();
	}
	/**
	* Clears the undo stack in undoRedo history.
	*
	* For more information, see the [Undo-Redo guide](/guide/undo-redo.md).
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*   ['1', '2', '3'],
	* ]);
	*
	* // do an operation, for example remove columns
	* hfInstance.removeColumns(0, [0, 1]);
	*
	* // undo the operation
	* hfInstance.undo();
	*
	* // clear the undo stack
	* hfInstance.clearUndoStack();
	* ```
	*
	* @category Undo and Redo
	*/
	clearUndoStack() {
		this._crudOperations.undoRedo.clearUndoStack();
	}
	/**
	* Returns the cell content of a given range in a [[CellValue]][][] format.
	*
	* @param {SimpleCellRange} source - rectangular range
	*
	* @throws [[ExpectedValueOfTypeError]] if source is of wrong type
	* @throws [[SheetsNotEqual]] if range provided has distinct sheet numbers for start and end
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['=SUM(1, 2)', '2', '10'],
	*  ['5', '6', '7'],
	*  ['40', '30', '20'],
	* ]);
	*
	*
	* // returns calculated cells content: [ [ 3, 2 ], [ 5, 6 ] ]
	* const rangeValues = hfInstance.getRangeValues({ start: { sheet: 0, col: 0, row: 0 }, end: { sheet: 0, col: 1, row: 1 } });
	* ```
	*
	* @category Ranges
	*/
	getRangeValues(source) {
		if (!isSimpleCellRange(source)) throw new ExpectedValueOfTypeError("SimpleCellRange", "source");
		return new AbsoluteCellRange(source.start, source.end).arrayOfAddressesInRange().map((subarray) => subarray.map((address) => this.getCellValue(address)));
	}
	/**
	* Returns cell formulas in given range.
	*
	* @param {SimpleCellRange} source - rectangular range
	*
	* @throws [[ExpectedValueOfTypeError]] if source is of wrong type
	* @throws [[SheetsNotEqual]] if range provided has distinct sheet numbers for start and end
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['=SUM(1, 2)', '2', '10'],
	*  ['5', '6', '7'],
	*  ['40', '30', '20'],
	* ]);
	*
	* // returns cell formulas of a given range only:
	* // [ [ '=SUM(1, 2)', undefined ], [ undefined, undefined ] ]
	* const rangeFormulas = hfInstance.getRangeFormulas({ start: { sheet: 0, col: 0, row: 0 }, end: { sheet: 0, col: 1, row: 1 } });
	* ```
	*
	* @category Ranges
	*/
	getRangeFormulas(source) {
		if (!isSimpleCellRange(source)) throw new ExpectedValueOfTypeError("SimpleCellRange", "source");
		return new AbsoluteCellRange(source.start, source.end).arrayOfAddressesInRange().map((subarray) => subarray.map((address) => this.getCellFormula(address)));
	}
	/**
	* Returns serialized cells in given range.
	*
	* @param {SimpleCellRange} source - rectangular range
	*
	* @throws [[ExpectedValueOfTypeError]] if source is of wrong type
	* @throws [[SheetsNotEqual]] if range provided has distinct sheet numbers for start and end
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['=SUM(1, 2)', '2', '10'],
	*  ['5', '6', '7'],
	*  ['40', '30', '20'],
	* ]);
	*
	* // should return serialized cell content for the given range:
	* // [ [ '=SUM(1, 2)', 2 ], [ 5, 6 ] ]
	* const rangeSerialized = hfInstance.getRangeSerialized({ start: { sheet: 0, col: 0, row: 0 }, end: { sheet: 0, col: 1, row: 1 } });
	* ```
	*
	* @category Ranges
	*/
	getRangeSerialized(source) {
		if (!isSimpleCellRange(source)) throw new ExpectedValueOfTypeError("SimpleCellRange", "source");
		return new AbsoluteCellRange(source.start, source.end).arrayOfAddressesInRange().map((subarray) => subarray.map((address) => this.getCellSerialized(address)));
	}
	/**
	* Returns values to fill target range using source range, with properly extending the range using wrap-around heuristic.
	*
	* @param {SimpleCellRange} source of data
	* @param {SimpleCellRange} target range where data is intended to be put
	* @param {boolean} offsetsFromTarget if true, offsets are computed from target corner, otherwise from source corner
	*
	* @throws [[EvaluationSuspendedError]] when the evaluation is suspended
	* @throws [[ExpectedValueOfTypeError]] if source or target are of wrong type
	* @throws [[SheetsNotEqual]] if range provided has distinct sheet numbers for start and end
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([[1, '=A1'], ['=$A$1', '2']]);
	*
	* // should return [['2', '=$A$1', '2'], ['=A3', 1, '=C3'], ['2', '=$A$1', '2']]
	* hfInstance.getFillRangeData( {start: {sheet: 0, row: 0, col: 0}, end: {sheet: 0, row: 1, col: 1}},
	* {start: {sheet: 0, row: 1, col: 1}, end: {sheet: 0, row: 3, col: 3}});
	* ```
	*
	* @category Ranges
	*/
	getFillRangeData(source, target, offsetsFromTarget = false) {
		if (!isSimpleCellRange(source)) throw new ExpectedValueOfTypeError("SimpleCellRange", "source");
		if (!isSimpleCellRange(target)) throw new ExpectedValueOfTypeError("SimpleCellRange", "target");
		const sourceRange = new AbsoluteCellRange(source.start, source.end);
		const targetRange = new AbsoluteCellRange(target.start, target.end);
		this.ensureEvaluationIsNotSuspended();
		return targetRange.arrayOfAddressesInRange().map((subarray) => subarray.map((address) => {
			const row = ((address.row - (offsetsFromTarget ? target : source).start.row) % sourceRange.height() + sourceRange.height()) % sourceRange.height() + source.start.row;
			const col = ((address.col - (offsetsFromTarget ? target : source).start.col) % sourceRange.width() + sourceRange.width()) % sourceRange.width() + source.start.col;
			return this._serialization.getCellSerialized({
				row,
				col,
				sheet: sourceRange.sheet
			}, address);
		}));
	}
	/**
	* Returns information whether it is possible to add a sheet to the engine.
	* Checks against particular rules to ascertain that addSheet can be called.
	* If returns `true`, doing [[addSheet]] operation won't throw any errors, and it is possible to add sheet with provided name.
	* Returns `false` if the chosen name is already used.
	*
	* @param {string} sheetName - sheet name, case-insensitive
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromSheets({
	*   MySheet1: [ ['1'] ],
	*   MySheet2: [ ['10'] ],
	* });
	*
	* // should return 'false' because 'MySheet2' already exists
	* const isAddable = hfInstance.isItPossibleToAddSheet('MySheet2');
	* ```
	*
	* @category Sheets
	*/
	isItPossibleToAddSheet(sheetName) {
		validateArgToType(sheetName, "string", "sheetName");
		try {
			this._crudOperations.ensureItIsPossibleToAddSheet(sheetName);
			return true;
		} catch (e) {
			return false;
		}
	}
	/**
	* Adds a new sheet to the HyperFormula instance. Returns given or autogenerated name of a new sheet.
	*
	* Note that this method may trigger dependency graph recalculation.
	*
	* @param {string} [sheetName] - if not specified, name is autogenerated
	*
	* @fires [[sheetAdded]] after the sheet was added
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[SheetNameAlreadyTakenError]] when sheet with a given name already exists
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromSheets({
	*  MySheet1: [ ['1'] ],
	*  MySheet2: [ ['10'] ],
	* });
	*
	* // should return 'MySheet3'
	* const nameProvided = hfInstance.addSheet('MySheet3');
	*
	* // should return autogenerated 'Sheet4'
	* // because no name was provided and 3 other ones already exist
	* const generatedName = hfInstance.addSheet();
	* ```
	*
	* @category Sheets
	*/
	addSheet(sheetName) {
		if (sheetName !== void 0) validateArgToType(sheetName, "string", "sheetName");
		const addedSheetName = this._crudOperations.addSheet(sheetName);
		this.recomputeIfDependencyGraphNeedsIt();
		this._emitter.emit(Events.SheetAdded, addedSheetName);
		return addedSheetName;
	}
	/**
	* Returns information whether it is possible to remove sheet for the engine.
	* Returns `true` if the provided sheet exists, and therefore it can be removed, doing [[removeSheet]] operation won't throw any errors.
	* Returns `false` otherwise
	*
	* @param {number} sheetId - sheet ID.
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromSheets({
	*  MySheet1: [ ['1'] ],
	*  MySheet2: [ ['10'] ],
	* });
	*
	* // should return 'true' because sheet with ID 1 exists and is removable
	* const isRemovable = hfInstance.isItPossibleToRemoveSheet(1);
	* ```
	*
	* @category Sheets
	*/
	isItPossibleToRemoveSheet(sheetId) {
		validateArgToType(sheetId, "number", "sheetId");
		try {
			this._crudOperations.ensureScopeIdIsValid(sheetId);
			return true;
		} catch (e) {
			return false;
		}
	}
	/**
	* Removes a sheet
	*
	* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
	*
	* Note that this method may trigger dependency graph recalculation.
	*
	* @param {number} sheetId - sheet ID.
	*
	* @fires [[sheetRemoved]] after the sheet was removed
	* @fires [[valuesUpdated]] if recalculation was triggered by this change
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromSheets({
	*  MySheet1: [ ['=SUM(MySheet2!A1:A2)'] ],
	*  MySheet2: [ ['10'] ],
	* });
	*
	* // should return a list of cells which values changed after the operation,
	* // their absolute addresses and new values, in this example it will return:
	* // [{
	* //   address: { sheet: 0, col: 0, row: 0 },
	* //   newValue: { error: [CellError], value: '#REF!' },
	* // }]
	* const changes = hfInstance.removeSheet(1);
	* ```
	*
	* @category Sheets
	*/
	removeSheet(sheetId) {
		validateArgToType(sheetId, "number", "sheetId");
		const displayName = this.sheetMapping.getSheetName(sheetId);
		this._crudOperations.removeSheet(sheetId);
		const changes = this.recomputeIfDependencyGraphNeedsIt();
		this._emitter.emit(Events.SheetRemoved, displayName, changes);
		return changes;
	}
	/**
	* Returns information whether it is possible to clear a specified sheet.
	* If returns `true`, doing [[clearSheet]] operation won't throw any errors, provided sheet exists and its content can be cleared.
	* Returns `false` otherwise
	*
	* @param {number} sheetId - sheet ID.
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromSheets({
	*  MySheet1: [ ['1'] ],
	*  MySheet2: [ ['10'] ],
	* });
	*
	* // should return 'true' because 'MySheet2' exists and can be cleared
	* const isClearable = hfInstance.isItPossibleToClearSheet(1);
	* ```
	*
	* @category Sheets
	*/
	isItPossibleToClearSheet(sheetId) {
		validateArgToType(sheetId, "number", "sheetId");
		try {
			this._crudOperations.ensureScopeIdIsValid(sheetId);
			return true;
		} catch (e) {
			return false;
		}
	}
	/**
	* Clears the sheet content. Double-checks if the sheet exists.
	*
	* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
	*
	* Note that this method may trigger dependency graph recalculation.
	*
	* @param {number} sheetId - sheet ID.
	*
	* @fires [[valuesUpdated]] if recalculation was triggered by this change
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromSheets({
	*  MySheet1: [ ['=SUM(MySheet2!A1:A2)'] ],
	*  MySheet2: [ ['10'] ],
	* });
	*
	* // should return a list of cells which values changed after the operation,
	* // their absolute addresses and new values, in this example it will return:
	* // [{
	* //   address: { sheet: 0, col: 0, row: 0 },
	* //   newValue: 0,
	* // }]
	* const changes = hfInstance.clearSheet(0);
	* ```
	*
	* @category Sheets
	*/
	clearSheet(sheetId) {
		validateArgToType(sheetId, "number", "sheetId");
		this._crudOperations.clearSheet(sheetId);
		return this.recomputeIfDependencyGraphNeedsIt();
	}
	/**
	* Returns information whether it is possible to replace the sheet content.
	* If returns `true`, doing [[setSheetContent]] operation won't throw any errors, the provided sheet exists and then its content can be replaced.
	* Returns `false` otherwise
	*
	* @param {number} sheetId - sheet ID.
	* @param {RawCellContent[][]} values - array of new values
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromSheets({
	*  MySheet1: [ ['1'] ],
	*  MySheet2: [ ['10'] ],
	* });
	*
	* // should return 'true' because sheet of ID 0 exists
	* // and the provided content can be placed in this sheet
	* const isReplaceable = hfInstance.isItPossibleToReplaceSheetContent(0, [['50'], ['60']]);
	* ```
	*
	* @category Sheets
	*/
	isItPossibleToReplaceSheetContent(sheetId, values) {
		validateArgToType(sheetId, "number", "sheetId");
		try {
			this._crudOperations.ensureScopeIdIsValid(sheetId);
			this._crudOperations.ensureItIsPossibleToChangeSheetContents(sheetId, values);
			return true;
		} catch (e) {
			return false;
		}
	}
	/**
	* Replaces the sheet content with new values.
	*
	* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
	*
	* @param {number} sheetId - sheet ID.
	* @param {RawCellContent[][]} values - array of new values
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[InvalidArgumentsError]] when values argument is not an array of arrays
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromSheets({
	*  MySheet1: [ ['1'] ],
	*  MySheet2: [ ['10'] ],
	* });
	*
	* // should return a list of cells which values changed after the operation,
	* // their absolute addresses and new values
	* const changes = hfInstance.setSheetContent(0, [['50'], ['60']]);
	* ```
	*
	* @category Sheets
	*/
	setSheetContent(sheetId, values) {
		validateArgToType(sheetId, "number", "sheetId");
		this._crudOperations.setSheetContent(sheetId, values);
		return this.recomputeIfDependencyGraphNeedsIt();
	}
	/**
	* Computes the simple (absolute) address of a cell address, based on its string representation.
	* - If a sheet name is present in the string representation but is not present in the engine, returns `undefined`.
	* - If no sheet name is present in the string representation, uses `contextSheetId` as a sheet id in the returned address.
	*
	* For more information, see the [Cell references guide](/guide/cell-references.md).
	*
	* @param {string} cellAddress - string representation of cell address in A1 notation
	* @param {number} contextSheetId - sheet id used to construct the simple address in case of missing sheet name in `cellAddress` argument
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildEmpty();
	* hfInstance.addSheet('Sheet0'); //sheetId = 0
	*
	* // returns { sheet: 42, col: 0, row: 0 }
	* const simpleCellAddress = hfInstance.simpleCellAddressFromString('A1', 42);
	*
	* // returns { sheet: 0, col: 0, row: 5 }
	* const simpleCellAddress = hfInstance.simpleCellAddressFromString('Sheet0!A6', 42);
	*
	* // returns { sheet: 0, col: 0, row: 5 }
	* const simpleCellAddress = hfInstance.simpleCellAddressFromString('Sheet0!$A$6', 42);
	*
	* // returns 'undefined', as there's no 'Sheet 2' in the HyperFormula instance
	* const simpleCellAddress = hfInstance.simpleCellAddressFromString('Sheet2!A6', 42);
	* ```
	*
	* @category Helpers
	*/
	simpleCellAddressFromString(cellAddress, contextSheetId) {
		validateArgToType(cellAddress, "string", "cellAddress");
		validateArgToType(contextSheetId, "number", "sheetId");
		return simpleCellAddressFromString(this.sheetMapping.getSheetId.bind(this.sheetMapping), cellAddress, contextSheetId);
	}
	/**
	* Computes simple (absolute) address of a cell range based on its string representation.
	* If sheet name is present in string representation but not present in the engine, returns `undefined`.
	*
	* For more information, see the [Cell references guide](/guide/cell-references.md).
	*
	* @param {string} cellRange - string representation of cell range in A1 notation
	* @param {number} contextSheetId - sheet id used to construct the simple address in case of missing sheet name in `cellRange` argument
	*
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildEmpty();
	* hfInstance.addSheet('Sheet0'); //sheetId = 0
	*
	* // should return { start: { sheet: 0, col: 0, row: 0 }, end: { sheet: 0, col: 1, row: 0 } }
	* const simpleCellAddress = hfInstance.simpleCellRangeFromString('A1:A2', 0);
	* ```
	*
	* @category Helpers
	*/
	simpleCellRangeFromString(cellRange, contextSheetId) {
		validateArgToType(cellRange, "string", "cellRange");
		validateArgToType(contextSheetId, "number", "sheetId");
		return simpleCellRangeFromString(this.sheetMapping.getSheetId.bind(this.sheetMapping), cellRange, contextSheetId);
	}
	/**
	* Computes string representation of an absolute address in A1 notation. If `cellAddress.sheet` is not present in the engine, returns `undefined`.
	*
	* For more information, see the [Cell references guide](/guide/cell-references.md).
	*
	* @param {SimpleCellAddress} cellAddress - object representation of an absolute address
	* @param {object | number} optionsOrContextSheetId - options object or number used as context sheet id to construct the string address (see examples)
	*
	* @throws [[ExpectedValueOfTypeError]] if its arguments are of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildEmpty();
	* hfInstance.addSheet('Sheet0'); //sheetId = 0
	* const addr = { sheet: 0, col: 1, row: 1 };
	*
	* // should return 'B2'
	* const A1Notation = hfInstance.simpleCellAddressToString(addr);
	*
	* // should return 'B2'
	* const A1Notation = hfInstance.simpleCellAddressToString(addr, { includeSheetName: false });
	*
	* // should return 'Sheet0!B2'
	* const A1Notation = hfInstance.simpleCellAddressToString(addr, { includeSheetName: true });
	*
	* // should return 'B2' as context sheet id is the same as addr.sheet
	* const A1Notation = hfInstance.simpleCellAddressToString(addr, 0);
	*
	* // should return 'Sheet0!B2' as context sheet id is different from addr.sheet
	* const A1Notation = hfInstance.simpleCellAddressToString(addr, 42);
	* ```
	*
	* @category Helpers
	*/
	simpleCellAddressToString(cellAddress, optionsOrContextSheetId = {}) {
		if (!isSimpleCellAddress(cellAddress)) throw new ExpectedValueOfTypeError("SimpleCellAddress", "cellAddress");
		const contextSheetId = typeof optionsOrContextSheetId === "number" ? optionsOrContextSheetId : optionsOrContextSheetId.includeSheetName ? cellAddress.sheet + 1 : cellAddress.sheet;
		return simpleCellAddressToString(this.sheetMapping.getSheetNameOrThrowError.bind(this.sheetMapping), cellAddress, contextSheetId);
	}
	/**
	* Computes string representation of an absolute range in A1 notation.
	* Returns `undefined` if:
	* - `cellRange` is not a valid range,
	* - `cellRange.start.sheet` and `cellRange.start.end` are different,
	* - `cellRange.start.sheet` is not present in the engine,
	* - `cellRange.start.end` is not present in the engine.
	*
	* Note: This method is useful only for cell ranges; does not work with column ranges and row ranges.
	*
	* For more information, see the [Cell references guide](/guide/cell-references.md).
	*
	* @param {SimpleCellRange} cellRange - object representation of an absolute range
	* @param {object | number} optionsOrContextSheetId - options object or number used as context sheet id to construct the string address (see examples)
	*
	* @throws [[ExpectedValueOfTypeError]] if its arguments are of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildEmpty();
	* hfInstance.addSheet('Sheet0'); //sheetId = 0
	* const range = { start: { sheet: 0, col: 1, row: 1 }, end: { sheet: 0, col: 2, row: 1 } };
	*
	* // should return 'B2:C2'
	* const A1Notation = hfInstance.simpleCellRangeToString(range);
	*
	* // should return 'B2:C2'
	* const A1Notation = hfInstance.simpleCellRangeToString(range, { includeSheetName: false });
	*
	* // should return 'Sheet0!B2:C2'
	* const A1Notation = hfInstance.simpleCellRangeToString(range, { includeSheetName: true });
	*
	* // should return 'B2:C2' as context sheet id is the same as range.start.sheet and range.end.sheet
	* const A1Notation = hfInstance.simpleCellRangeToString(range, 0);
	*
	* // should return 'Sheet0!B2:C2' as context sheet id is different from range.start.sheet and range.end.sheet
	* const A1Notation = hfInstance.simpleCellRangeToString(range, 42);
	* ```
	*
	* @category Helpers
	*/
	simpleCellRangeToString(cellRange, optionsOrContextSheetId = {}) {
		if (!isSimpleCellRange(cellRange)) throw new ExpectedValueOfTypeError("SimpleCellRange", "cellRange");
		const contextSheetId = typeof optionsOrContextSheetId === "number" ? optionsOrContextSheetId : optionsOrContextSheetId.includeSheetName ? cellRange.start.sheet + cellRange.end.sheet + 1 : cellRange.start.sheet;
		return simpleCellRangeToString(this.sheetMapping.getSheetNameOrThrowError.bind(this.sheetMapping), cellRange, contextSheetId);
	}
	/**
	* Returns all the out-neighbors in the [dependency graph](../../guide/dependency-graph.md) for a given cell address or range. Including:
	* - All cells with formulas that contain the given cell address or range
	* - Some of the ranges that contain the given cell address or range
	*
	* The exact result depends on the optimizations applied by the HyperFormula to the dependency graph, some of which are described in the section ["Optimizations for large ranges"](../../guide/dependency-graph.md#optimizations-for-large-ranges).
	*
	* The returned array includes also named expression dependents. They are represented as cell references with sheet ID `-1`.
	*
	* @param {SimpleCellAddress | SimpleCellRange} address - object representation of an absolute address or range of addresses
	*
	* @throws [[ExpectedValueOfTypeError]] if address is not [[SimpleCellAddress]] or [[SimpleCellRange]]
	* @throws [[SheetsNotEqual]] if range provided has distinct sheet numbers for start and end
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray( [ ['1', '=A1', '=A1+B1'] ] );
	*
	* hfInstance.getCellDependents({ sheet: 0, col: 0, row: 0});
	* // returns [{ sheet: 0, col: 1, row: 0}, { sheet: 0, col: 2, row: 0}]
	* ```
	*
	* @category Helpers
	*/
	getCellDependents(address) {
		let vertex;
		if (isSimpleCellAddress(address)) vertex = this._dependencyGraph.addressMapping.getCell(address);
		else if (isSimpleCellRange(address)) vertex = this._dependencyGraph.rangeMapping.getRangeVertex(address.start, address.end);
		else throw new ExpectedValueOfTypeError("SimpleCellAddress | SimpleCellRange", address);
		if (vertex === void 0) return [];
		return this._dependencyGraph.getAdjacentNodesAddresses(vertex);
	}
	/**
	* Returns all the in-neighbors in the [dependency graph](../../guide/dependency-graph.md) for a given cell address or range. In particular:
	* - If the argument is a single cell, `getCellPrecedents()` returns all cells and ranges contained in that cell's formula.
	* - If the argument is a range of cells, `getCellPrecedents()` returns some of the cell addresses and smaller ranges contained in that range (but not all of them). The exact result depends on the optimizations applied by the HyperFormula to the dependency graph, some of which are described in the section ["Optimizations for large ranges"](../../guide/dependency-graph.md#optimizations-for-large-ranges).
	*
	* The returned array includes also named expression precedents. They are represented as cell references with sheet ID `-1`.
	*
	* @param {SimpleCellAddress | SimpleCellRange} address - object representation of an absolute address or range of addresses
	*
	* @throws [[ExpectedValueOfTypeError]] if address is of wrong type
	*
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray( [ ['1', '=A1', '=A1+B1'] ] );
	*
	* hfInstance.getCellPrecedents({ sheet: 0, col: 2, row: 0});
	* // returns [{ sheet: 0, col: 0, row: 0}, { sheet: 0, col: 1, row: 0}]
	* ```
	*
	* @category Helpers
	*/
	getCellPrecedents(address) {
		let vertex;
		if (isSimpleCellAddress(address)) vertex = this._dependencyGraph.addressMapping.getCell(address);
		else if (isSimpleCellRange(address)) vertex = this._dependencyGraph.rangeMapping.getRangeVertex(address.start, address.end);
		else throw new ExpectedValueOfTypeError("SimpleCellAddress | SimpleCellRange", address);
		if (vertex === void 0) return [];
		return this._dependencyGraph.dependencyQueryAddresses(vertex);
	}
	/**
	* Returns a unique sheet name assigned to the sheet of a given ID or `undefined` if the there is no sheet with a given ID.
	*
	* @param {number} sheetId - ID of the sheet, for which we want to retrieve name
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromSheets({
	*  MySheet1: [ ['1'] ],
	*  MySheet2: [ ['10'] ],
	* });
	*
	* // should return 'MySheet2' as this sheet is the second one
	* const sheetName = hfInstance.getSheetName(1);
	* ```
	*
	* @category Sheets
	*/
	getSheetName(sheetId) {
		validateArgToType(sheetId, "number", "sheetId");
		return this.sheetMapping.getSheetName(sheetId);
	}
	/**
	* List all sheet names.
	* Returns an array of sheet names as strings.
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromSheets({
	*  MySheet1: [ ['1'] ],
	*  MySheet2: [ ['10'] ],
	* });
	*
	* // should return all sheets names: ['MySheet1', 'MySheet2']
	* const sheetNames = hfInstance.getSheetNames();
	* ```
	*
	* @category Sheets
	*/
	getSheetNames() {
		return this.sheetMapping.getSheetNames();
	}
	/**
	* Returns a unique sheet ID assigned to the sheet with a given name or `undefined` if the sheet does not exist.
	*
	* @param {string} sheetName - name of the sheet, for which we want to retrieve ID, case-insensitive.
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromSheets({
	*   MySheet1: [ ['1'] ],
	*   MySheet2: [ ['10'] ],
	* });
	*
	* // should return '0' because 'MySheet1' is of ID '0'
	* const sheetID = hfInstance.getSheetId('MySheet1');
	* ```
	*
	* @category Sheets
	*/
	getSheetId(sheetName) {
		validateArgToType(sheetName, "string", "sheetName");
		return this.sheetMapping.getSheetId(sheetName);
	}
	/**
	* Returns `true` whether sheet with a given name exists. The method accepts sheet name to be checked.
	*
	* @param {string} sheetName - name of the sheet, case-insensitive.
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromSheets({
	*   MySheet1: [ ['1'] ],
	*   MySheet2: [ ['10'] ],
	* });
	*
	* // should return 'true' since 'MySheet1' exists
	* const sheetExist = hfInstance.doesSheetExist('MySheet1');
	* ```
	*
	* @category Sheets
	*/
	doesSheetExist(sheetName) {
		validateArgToType(sheetName, "string", "sheetName");
		return this.sheetMapping.hasSheetWithName(sheetName);
	}
	/**
	* Returns the type of a cell at a given address.
	* The method accepts cell coordinates as object with column, row and sheet numbers.
	*
	* @param {SimpleCellAddress} cellAddress - cell coordinates
	*
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[ExpectedValueOfTypeError]] if cellAddress is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['=SUM(A2:A3)', '2'],
	* ]);
	*
	* // should return 'FORMULA', the cell of given coordinates is of this type
	* const cellA1Type = hfInstance.getCellType({ sheet: 0, col: 0, row: 0 });
	*
	* // should return 'VALUE', the cell of given coordinates is of this type
	* const cellB1Type = hfInstance.getCellType({ sheet: 0, col: 1, row: 0 });
	* ```
	*
	* @category Cells
	*/
	getCellType(cellAddress) {
		if (!isSimpleCellAddress(cellAddress)) throw new ExpectedValueOfTypeError("SimpleCellAddress", "cellAddress");
		return getCellType(this.dependencyGraph.getCell(cellAddress), cellAddress);
	}
	/**
	* Returns `true` if the specified cell contains a simple value.
	* The method accepts cell coordinates as object with column, row and sheet numbers.
	*
	* @param {SimpleCellAddress} cellAddress - cell coordinates
	*
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[ExpectedValueOfTypeError]] if cellAddress is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['=SUM(A2:A3)', '2'],
	* ]);
	*
	* // should return 'true' since the selected cell contains a simple value
	* const isA1Simple = hfInstance.doesCellHaveSimpleValue({ sheet: 0, col: 0, row: 0 });
	*
	* // should return 'false' since the selected cell does not contain a simple value
	* const isB1Simple = hfInstance.doesCellHaveSimpleValue({ sheet: 0, col: 1, row: 0 });
	* ```
	*
	* @category Cells
	*/
	doesCellHaveSimpleValue(cellAddress) {
		if (!isSimpleCellAddress(cellAddress)) throw new ExpectedValueOfTypeError("SimpleCellAddress", "cellAddress");
		return this.getCellType(cellAddress) === CellType.VALUE;
	}
	/**
	* Returns `true` if the specified cell contains a formula.
	* The method accepts cell coordinates as object with column, row and sheet numbers.
	*
	* @param {SimpleCellAddress} cellAddress - cell coordinates
	*
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[ExpectedValueOfTypeError]] if cellAddress is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['=SUM(A2:A3)', '2'],
	* ]);
	*
	* // should return 'true' since the A1 cell contains a formula
	* const A1Formula = hfInstance.doesCellHaveFormula({ sheet: 0, col: 0, row: 0 });
	*
	* // should return 'false' since the B1 cell does not contain a formula
	* const B1NoFormula = hfInstance.doesCellHaveFormula({ sheet: 0, col: 1, row: 0 });
	* ```
	*
	* @category Cells
	*/
	doesCellHaveFormula(cellAddress) {
		if (!isSimpleCellAddress(cellAddress)) throw new ExpectedValueOfTypeError("SimpleCellAddress", "cellAddress");
		const cellType = this.getCellType(cellAddress);
		return cellType === CellType.FORMULA || cellType === CellType.ARRAYFORMULA;
	}
	/**
	* Returns`true` if the specified cell is empty.
	* The method accepts cell coordinates as object with column, row and sheet numbers.
	*
	* @param {SimpleCellAddress} cellAddress - cell coordinates
	*
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[ExpectedValueOfTypeError]] if cellAddress is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*   [null, '1'],
	* ]);
	*
	* // should return 'true', cell of provided coordinates is empty
	* const isEmpty = hfInstance.isCellEmpty({ sheet: 0, col: 0, row: 0 });
	*
	* // should return 'false', cell of provided coordinates is not empty
	* const isNotEmpty = hfInstance.isCellEmpty({ sheet: 0, col: 1, row: 0 });
	* ```
	*
	* @category Cells
	*/
	isCellEmpty(cellAddress) {
		if (!isSimpleCellAddress(cellAddress)) throw new ExpectedValueOfTypeError("SimpleCellAddress", "cellAddress");
		return this.getCellType(cellAddress) === CellType.EMPTY;
	}
	/**
	* Returns `true` if a given cell is a part of an array.
	* The method accepts cell coordinates as object with column, row and sheet numbers.
	*
	* @param {SimpleCellAddress} cellAddress - cell coordinates
	*
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[ExpectedValueOfTypeError]] if cellAddress is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*    ['{=TRANSPOSE(B1:B1)}'],
	* ]);
	*
	* // should return 'true', cell of provided coordinates is a part of an array
	* const isPartOfArray = hfInstance.isCellPartOfArray({ sheet: 0, col: 0, row: 0 });
	* ```
	*
	* @category Cells
	*/
	isCellPartOfArray(cellAddress) {
		if (!isSimpleCellAddress(cellAddress)) throw new ExpectedValueOfTypeError("SimpleCellAddress", "cellAddress");
		const cellType = this.getCellType(cellAddress);
		return cellType === CellType.ARRAY || cellType === CellType.ARRAYFORMULA;
	}
	/**
	* Returns type of the cell value of a given address.
	* The method accepts cell coordinates as object with column, row and sheet numbers.
	*
	* For more information, see the [Types of values guide](/guide/types-of-values.md).
	*
	* @param {SimpleCellAddress} cellAddress - cell coordinates
	*
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[EvaluationSuspendedError]] when the evaluation is suspended
	* @throws [[ExpectedValueOfTypeError]] if cellAddress is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['=SUM(1, 2, 3)', '2'],
	* ]);
	*
	* // should return 'NUMBER', cell value type of provided coordinates is a number
	* const cellValue = hfInstance.getCellValueType({ sheet: 0, col: 1, row: 0 });
	*
	* // should return 'NUMBER', cell value type of provided coordinates is a number
	* const cellValue = hfInstance.getCellValueType({ sheet: 0, col: 0, row: 0 });
	* ```
	*
	* @category Cells
	*/
	getCellValueType(cellAddress) {
		if (!isSimpleCellAddress(cellAddress)) throw new ExpectedValueOfTypeError("SimpleCellAddress", "cellAddress");
		this.ensureEvaluationIsNotSuspended();
		return getCellValueType(this.dependencyGraph.getCellValue(cellAddress));
	}
	/**
	* Returns detailed type of the cell value of a given address.
	* The method accepts cell coordinates as object with column, row and sheet numbers.
	*
	* For more information, see the [Types of values guide](/guide/types-of-values.md).
	*
	* @param {SimpleCellAddress} cellAddress - cell coordinates
	*
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[EvaluationSuspendedError]] when the evaluation is suspended
	* @throws [[ExpectedValueOfTypeError]] if cellAddress is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['1%', '1$'],
	* ]);
	*
	* // should return 'NUMBER_PERCENT', cell value type of provided coordinates is a number with a format inference percent.
	* const cellType = hfInstance.getCellValueDetailedType({ sheet: 0, col: 0, row: 0 });
	*
	* // should return 'NUMBER_CURRENCY', cell value type of provided coordinates is a number with a format inference currency.
	* const cellType = hfInstance.getCellValueDetailedType({ sheet: 0, col: 1, row: 0 });
	* ```
	*
	* @category Cells
	*/
	getCellValueDetailedType(cellAddress) {
		if (!isSimpleCellAddress(cellAddress)) throw new ExpectedValueOfTypeError("SimpleCellAddress", "cellAddress");
		this.ensureEvaluationIsNotSuspended();
		return getCellValueDetailedType(this.dependencyGraph.getCellValue(cellAddress));
	}
	/**
	* Returns auxiliary format information of the cell value of a given address.
	* The method accepts cell coordinates as object with column, row and sheet numbers.
	*
	* @param {SimpleCellAddress} cellAddress - cell coordinates
	*
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[EvaluationSuspendedError]] when the evaluation is suspended
	* @throws [[ExpectedValueOfTypeError]] if cellAddress is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['1$', '1'],
	* ]);
	*
	* // should return '$', cell value type of provided coordinates is a number with a format inference currency, parsed as using '$' as currency.
	* const cellFormat = hfInstance.getCellValueFormat({ sheet: 0, col: 0, row: 0 });
	*
	* // should return undefined, cell value type of provided coordinates is a number with no format information.
	* const cellFormat = hfInstance.getCellValueFormat({ sheet: 0, col: 1, row: 0 });
	* ```
	*
	* @category Cells
	*/
	getCellValueFormat(cellAddress) {
		if (!isSimpleCellAddress(cellAddress)) throw new ExpectedValueOfTypeError("SimpleCellAddress", "cellAddress");
		this.ensureEvaluationIsNotSuspended();
		return getCellValueFormat(this.dependencyGraph.getCellValue(cellAddress));
	}
	/**
	* Returns the number of existing sheets.
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['1', '2'],
	* ]);
	*
	* // should return the number of sheets which is '1'
	* const sheetsCount = hfInstance.countSheets();
	* ```
	*
	* @category Sheets
	*/
	countSheets() {
		return this.sheetMapping.numberOfSheets();
	}
	/**
	* Returns information whether it is possible to rename sheet.
	* Returns `true` if the sheet with provided id exists and new name is available
	* Returns `false` if sheet cannot be renamed
	*
	* @param {number} sheetId - a sheet number
	* @param {string} newName - a name of the sheet to be given
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromSheets({
	*   MySheet1: [ ['1'] ],
	*   MySheet2: [ ['10'] ],
	* });
	*
	* // returns true
	* hfInstance.isItPossibleToRenameSheet(0, 'MySheet0');
	* ```
	*
	* @category Sheets
	*/
	isItPossibleToRenameSheet(sheetId, newName) {
		validateArgToType(sheetId, "number", "sheetId");
		validateArgToType(newName, "string", "newName");
		try {
			this._crudOperations.ensureItIsPossibleToRenameSheet(sheetId, newName);
			return true;
		} catch (e) {
			return false;
		}
	}
	/**
	* Renames a specified sheet.
	*
	* Note that this method may trigger dependency graph recalculation.
	*
	* @param {number} sheetId - a sheet ID
	* @param {string} newName - a name of the sheet to be given, if is the same as the old one the method does nothing
	*
	* @fires [[sheetRenamed]] after the sheet was renamed
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[NoSheetWithIdError]] when the given sheet ID does not exist
	* @throws [[SheetNameAlreadyTakenError]] when the provided sheet name already exists
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromSheets({
	*   MySheet1: [ ['1'] ],
	*   MySheet2: [ ['10'] ],
	* });
	*
	* // renames the sheet 'MySheet1'
	* hfInstance.renameSheet(0, 'MySheet0');
	* ```
	*
	* @category Sheets
	*/
	renameSheet(sheetId, newName) {
		validateArgToType(sheetId, "number", "sheetId");
		validateArgToType(newName, "string", "newName");
		const oldName = this._crudOperations.renameSheet(sheetId, newName);
		this.recomputeIfDependencyGraphNeedsIt();
		if (oldName !== void 0) this._emitter.emit(Events.SheetRenamed, oldName, newName);
	}
	/**
	* Runs the provided callback as a single [batch operation](../../guide/batch-operations.md) and returns the changed cells.
	*
	* Returns [an array of cells whose values changed as a result of all batched operations](/guide/basic-operations.md#changes-array).
	*
	* Note that this method may trigger dependency graph recalculation.
	*
	* @param {() => void} batchOperations - a function with operations to be performed
	*
	* @fires [[valuesUpdated]] if recalculation was triggered by this change
	* @fires [[evaluationSuspended]] always
	* @fires [[evaluationResumed]] after the recomputation of necessary values
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromSheets({
	*  MySheet1: [ ['1'] ],
	*  MySheet2: [ ['10'] ],
	* });
	*
	* // multiple operations in a single callback will trigger evaluation only once
	* // and only one set of changes is returned as a combined result of all
	* // the operations that were triggered within the callback
	* const changes = hfInstance.batch(() => {
	*  hfInstance.setCellContents({ col: 3, row: 0, sheet: 0 }, [['=B1']]);
	*  hfInstance.setCellContents({ col: 4, row: 0, sheet: 0 }, [['=A1']]);
	* });
	* ```
	*
	* @category Batch
	*/
	batch(batchOperations) {
		this.suspendEvaluation();
		this._crudOperations.beginUndoRedoBatchMode();
		try {
			batchOperations();
		} catch (e) {
			this._crudOperations.commitUndoRedoBatchMode();
			this.resumeEvaluation();
			throw e;
		}
		this._crudOperations.commitUndoRedoBatchMode();
		return this.resumeEvaluation();
	}
	/**
	* Suspends the dependency graph recalculation to start a [batch operation](../../guide/batch-operations.md).
	* It allows optimizing the performance.
	* With this method, multiple CRUD operations can be done without triggering recalculation after every operation.
	* Suspending evaluation should result in an overall faster calculation compared to recalculating after each operation separately.
	* To resume the evaluation use [[resumeEvaluation]].
	*
	* @fires [[evaluationSuspended]] always
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromSheets({
	*  MySheet1: [ ['1'] ],
	*  MySheet2: [ ['10'] ],
	* });
	*
	* // similar to batch() but operations are not within a callback,
	* // one method suspends the recalculation
	* // the second will resume calculations and return the changes
	*
	* // suspend the evaluation with this method
	* hfInstance.suspendEvaluation();
	*
	* // perform operations
	* hfInstance.setCellContents({ col: 3, row: 0, sheet: 0 }, [['=B1']]);
	* hfInstance.setSheetContent(1, [['50'], ['60']]);
	*
	* // use resumeEvaluation to resume
	* const changes = hfInstance.resumeEvaluation();
	* ```
	*
	* @category Batch
	*/
	suspendEvaluation() {
		this._evaluationSuspended = true;
		this._emitter.emit(Events.EvaluationSuspended);
	}
	/**
	* Resumes the dependency graph recalculation that was [suspended](../../guide/batch-operations.md) with [[suspendEvaluation]].
	* It also triggers the recalculation and returns [an array of cells whose values changed as a result of all batched operations](/guide/basic-operations.md#changes-array).
	*
	* @fires [[valuesUpdated]] if recalculation was triggered by this change
	* @fires [[evaluationResumed]] after the recomputation of necessary values
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromSheets({
	*  MySheet1: [ ['1'] ],
	*  MySheet2: [ ['10'] ],
	* });
	*
	* // similar to batch() but operations are not within a callback,
	* // one method suspends the recalculation
	* // the second will resume calculations and return the changes
	*
	* // first, suspend the evaluation
	* hfInstance.suspendEvaluation();
	*
	* // perform operations
	* hfInstance.setCellContents({ col: 3, row: 0, sheet: 0 }, [['=B1']]);
	* hfInstance.setSheetContent(1, [['50'], ['60']]);
	*
	* // resume the evaluation
	* const changes = hfInstance.resumeEvaluation();
	* ```
	*
	* @category Batch
	*/
	resumeEvaluation() {
		this._evaluationSuspended = false;
		const changes = this.recomputeIfDependencyGraphNeedsIt();
		this._emitter.emit(Events.EvaluationResumed, changes);
		return changes;
	}
	/**
	* Checks if the dependency graph recalculation process is [suspended](../../guide/batch-operations.md) or not.
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildEmpty();
	*
	* // suspend the evaluation
	* hfInstance.suspendEvaluation();
	*
	* // between suspendEvaluation() and resumeEvaluation()
	* // or inside batch() callback it will return 'true', otherwise 'false'
	* const isEvaluationSuspended = hfInstance.isEvaluationSuspended();
	*
	* const changes = hfInstance.resumeEvaluation();
	* ```
	*
	* @category Batch
	*/
	isEvaluationSuspended() {
		return this._evaluationSuspended;
	}
	/**
	* Returns information whether it is possible to add named expression into a specific scope.
	* Checks against particular rules to ascertain that addNamedExpression can be called.
	* If returns `true`, doing [[addNamedExpression]] operation won't throw any errors.
	* Returns `false` if the operation might be disrupted.
	*
	* @param {string} expressionName - a name of the expression to be added
	* @param {RawCellContent} expression - the expression
	* @param {number?} scope - scope definition, `sheetId` for local scope or `undefined` for global scope
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['42'],
	* ]);
	*
	* // should return 'true' for this example,
	* // it is possible to add named expression to global scope
	* const isAddable = hfInstance.isItPossibleToAddNamedExpression('prettyName', '=Sheet1!$A$1+100');
	* ```
	*
	* @category Named Expressions
	*/
	isItPossibleToAddNamedExpression(expressionName, expression, scope) {
		validateArgToType(expressionName, "string", "expressionName");
		if (scope !== void 0) validateArgToType(scope, "number", "scope");
		try {
			this._crudOperations.ensureItIsPossibleToAddNamedExpression(expressionName, expression, scope);
			return true;
		} catch (e) {
			return false;
		}
	}
	/**
	* Adds a specified named expression.
	*
	* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
	*
	* Note that this method may trigger dependency graph recalculation.
	*
	* @param {string} expressionName - a name of the expression to be added
	* @param {RawCellContent} expression - the expression
	* @param {number?} scope - scope definition, `sheetId` for local scope or `undefined` for global scope
	* @param {NamedExpressionOptions?} options - additional metadata related to named expression
	*
	* @fires [[namedExpressionAdded]] always, unless [[batch]] mode is used
	* @fires [[valuesUpdated]] if recalculation was triggered by this change
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[NamedExpressionNameIsAlreadyTakenError]] when the named-expression name is not available.
	* @throws [[NamedExpressionNameIsInvalidError]] when the named-expression name is not valid
	* @throws [[NoRelativeAddressesAllowedError]] when the named-expression formula contains relative references
	* @throws [[NoSheetWithIdError]] if no sheet with given sheetId exists
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['42'],
	* ]);
	*
	* // add own expression, scope limited to 'Sheet1' (sheetId=0), the method should return a list of cells which values
	* // changed after the operation, their absolute addresses and new values
	* // for this example:
	* // [{
	* //   name: 'prettyName',
	* //   newValue: 142,
	* // }]
	* const changes = hfInstance.addNamedExpression('prettyName', '=Sheet1!$A$1+100', 0);
	* ```
	*
	* @category Named Expressions
	*/
	addNamedExpression(expressionName, expression, scope, options) {
		validateArgToType(expressionName, "string", "expressionName");
		if (scope !== void 0) validateArgToType(scope, "number", "scope");
		this._crudOperations.addNamedExpression(expressionName, expression, scope, options);
		const changes = this.recomputeIfDependencyGraphNeedsIt();
		this._emitter.emit(Events.NamedExpressionAdded, expressionName, changes);
		return changes;
	}
	/**
	* Gets specified named expression value.
	* Returns a [[CellValue]] or undefined if the given named expression does not exist.
	*
	* For more information, see the [Named expressions guide](/guide/named-expressions.md).
	*
	* @param {string} expressionName - expression name, case-insensitive.
	* @param {number?} scope - scope definition, `sheetId` for local scope or `undefined` for global scope
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[NoSheetWithIdError]] if no sheet with given sheetId exists
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['42'],
	* ]);
	*
	* // add a named expression, only 'Sheet1' (sheetId=0) considered as it is the scope
	* hfInstance.addNamedExpression('prettyName', '=Sheet1!$A$1+100', 'Sheet1');
	*
	* // returns the calculated value of a passed named expression, '142' for this example
	* const myFormula = hfInstance.getNamedExpressionValue('prettyName', 'Sheet1');
	* ```
	*
	* @category Named Expressions
	*/
	getNamedExpressionValue(expressionName, scope) {
		validateArgToType(expressionName, "string", "expressionName");
		if (scope !== void 0) validateArgToType(scope, "number", "scope");
		this.ensureEvaluationIsNotSuspended();
		this._crudOperations.ensureScopeIdIsValid(scope);
		const namedExpression = this._namedExpressions.namedExpressionForScope(expressionName, scope);
		if (namedExpression) return this._serialization.getCellValue(namedExpression.address);
		else return;
	}
	/**
	* Returns a normalized formula string for given named expression, or `undefined` for a named expression that does not exist or does not hold a formula.
	*
	* For more information, see the [Named expressions guide](/guide/named-expressions.md).
	*
	* @param {string} expressionName - expression name, case-insensitive.
	* @param {number?} scope - scope definition, `sheetId` for local scope or `undefined` for global scope
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[NoSheetWithIdError]] if no sheet with given sheetId exists
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['42'],
	* ]);
	*
	* // add a named expression in 'Sheet1' (sheetId=0)
	* hfInstance.addNamedExpression('prettyName', '=Sheet1!$A$1+100', 0);
	*
	* // returns a normalized formula string corresponding to the passed name from 'Sheet1' (sheetId=0),
	* // '=Sheet1!A1+100' for this example
	* const myFormula = hfInstance.getNamedExpressionFormula('prettyName', 0);
	* ```
	*
	* @category Named Expressions
	*/
	getNamedExpressionFormula(expressionName, scope) {
		validateArgToType(expressionName, "string", "expressionName");
		if (scope !== void 0) validateArgToType(scope, "number", "scope");
		this._crudOperations.ensureScopeIdIsValid(scope);
		const namedExpression = this._namedExpressions.namedExpressionForScope(expressionName, scope);
		if (namedExpression === void 0) return;
		else return this._serialization.getCellFormula(namedExpression.address);
	}
	/**
	* Returns a named expression, or `undefined` for a named expression that does not exist or does not hold a formula.
	*
	* For more information, see the [Named expressions guide](/guide/named-expressions.md).
	*
	* @param {string} expressionName - expression name, case-insensitive.
	* @param {number?} scope - scope definition, `sheetId` for local scope or `undefined` for global scope
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[NoSheetWithIdError]] if no sheet with given sheetId exists
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['42'],
	* ]);
	*
	* // add a named expression in 'Sheet1' (sheetId=0)
	* hfInstance.addNamedExpression('prettyName', '=Sheet1!$A$1+100', 0);
	*
	* // returns a named expression that corresponds to the passed name from 'Sheet1' (sheetId=0)
	* // for this example, returns:
	* // {name: 'prettyName', expression: '=Sheet1!$A$1+100', options: undefined, scope: 0}
	* const myFormula = hfInstance.getNamedExpression('prettyName', 0);
	*
	* // for a named expression that doesn't exist, returns 'undefined':
	* const myFormulaTwo = hfInstance.getNamedExpression('uglyName', 0);
	* ```
	*
	* @category Named Expressions
	*/
	getNamedExpression(expressionName, scope) {
		validateArgToType(expressionName, "string", "expressionName");
		if (scope !== void 0) validateArgToType(scope, "number", "scope");
		const namedExpression = this._namedExpressions.namedExpressionForScope(expressionName, scope);
		if (namedExpression === void 0) return;
		return {
			name: expressionName,
			scope,
			expression: this._serialization.getCellFormula(namedExpression.address),
			options: namedExpression.options
		};
	}
	/**
	* Returns information whether it is possible to change named expression in a specific scope.
	* Checks against particular rules to ascertain that changeNamedExpression can be called.
	* If returns `true`, doing [[changeNamedExpression]] operation won't throw any errors.
	* Returns `false` if the operation might be disrupted.
	*
	* @param {string} expressionName - an expression name, case-insensitive.
	* @param {RawCellContent} newExpression - a new expression
	* @param {number?} scope - scope definition, `sheetId` for local scope or `undefined` for global scope
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['42'],
	* ]);
	*
	* // add a named expression
	* hfInstance.addNamedExpression('prettyName', '=Sheet1!$A$1+100');
	*
	* // should return 'true' for this example,
	* // it is possible to change named expression
	* const isAddable = hfInstance.isItPossibleToChangeNamedExpression('prettyName', '=Sheet1!$A$1+100');
	* ```
	*
	* @category Named Expressions
	*/
	isItPossibleToChangeNamedExpression(expressionName, newExpression, scope) {
		validateArgToType(expressionName, "string", "expressionName");
		if (scope !== void 0) validateArgToType(scope, "number", "scope");
		try {
			this._crudOperations.ensureItIsPossibleToChangeNamedExpression(expressionName, newExpression, scope);
			return true;
		} catch (e) {
			return false;
		}
	}
	/**
	* Changes a given named expression to a specified formula.
	*
	* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
	*
	* Note that this method may trigger dependency graph recalculation.
	*
	* @param {string} expressionName - an expression name, case-insensitive.
	* @param {RawCellContent} newExpression - a new expression
	* @param {number?} scope - scope definition, `sheetId` for local scope or `undefined` for global scope
	* @param {NamedExpressionOptions?} options - additional metadata related to named expression
	*
	* @fires [[valuesUpdated]] if recalculation was triggered by this change
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[NamedExpressionDoesNotExistError]] when the given expression does not exist.
	* @throws [[NoSheetWithIdError]] if no sheet with given sheetId exists
	* @throws [[ArrayFormulasNotSupportedError]] when the named expression formula is an array formula
	* @throws [[NoRelativeAddressesAllowedError]] when the named expression formula contains relative references
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['42'],
	* ]);
	*
	* // add a named expression, scope limited to 'Sheet1' (sheetId=0)
	* hfInstance.addNamedExpression('prettyName', '=Sheet1!$A$1+100', 0);
	*
	* // change the named expression
	* const changes = hfInstance.changeNamedExpression('prettyName', '=Sheet1!$A$1+200');
	* ```
	*
	* @category Named Expressions
	*/
	changeNamedExpression(expressionName, newExpression, scope, options) {
		validateArgToType(expressionName, "string", "expressionName");
		if (scope !== void 0) validateArgToType(scope, "number", "scope");
		this._crudOperations.changeNamedExpressionExpression(expressionName, scope, newExpression, options);
		return this.recomputeIfDependencyGraphNeedsIt();
	}
	/**
	* Returns information whether it is possible to remove named expression from a specific scope.
	* Checks against particular rules to ascertain that removeNamedExpression can be called.
	* If returns `true`, doing [[removeNamedExpression]] operation won't throw any errors.
	* Returns `false` if the operation might be disrupted.
	*
	* @param {string} expressionName - an expression name, case-insensitive.
	* @param {number?} scope - scope definition, `sheetId` for local scope or `undefined` for global scope
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['42'],
	* ]);
	*
	* // add a named expression
	* hfInstance.addNamedExpression('prettyName', '=Sheet1!$A$1+100');
	*
	* // should return 'true' for this example,
	* // it is possible to change named expression
	* const isAddable = hfInstance.isItPossibleToRemoveNamedExpression('prettyName');
	* ```
	*
	* @category Named Expressions
	*/
	isItPossibleToRemoveNamedExpression(expressionName, scope) {
		validateArgToType(expressionName, "string", "expressionName");
		if (scope !== void 0) validateArgToType(scope, "number", "scope");
		try {
			this._crudOperations.isItPossibleToRemoveNamedExpression(expressionName, scope);
			return true;
		} catch (e) {
			return false;
		}
	}
	/**
	* Removes a named expression.
	*
	* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
	*
	* Note that this method may trigger dependency graph recalculation.
	*
	* @param {string} expressionName - expression name, case-insensitive.
	* @param {number?} scope - scope definition, `sheetId` for local scope or `undefined` for global scope
	*
	* @fires [[namedExpressionRemoved]] after the expression was removed
	* @fires [[valuesUpdated]] if recalculation was triggered by this change
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[NamedExpressionDoesNotExistError]] when the given expression does not exist.
	* @throws [[NoSheetWithIdError]] if no sheet with given sheetId exists
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['42'],
	* ]);
	*
	* // add a named expression
	* hfInstance.addNamedExpression('prettyName', '=Sheet1!$A$1+100', 0);
	*
	* // remove the named expression
	* const changes = hfInstance.removeNamedExpression('prettyName', 0);
	* ```
	*
	* @category Named Expressions
	*/
	removeNamedExpression(expressionName, scope) {
		validateArgToType(expressionName, "string", "expressionName");
		if (scope !== void 0) validateArgToType(scope, "number", "scope");
		const removedNamedExpression = this._crudOperations.removeNamedExpression(expressionName, scope);
		if (removedNamedExpression) {
			const changes = this.recomputeIfDependencyGraphNeedsIt();
			this._emitter.emit(Events.NamedExpressionRemoved, removedNamedExpression.displayName, changes);
			return changes;
		} else return [];
	}
	/**
	* Lists named expressions.
	* - If scope parameter is provided, returns an array of expression names defined for this scope.
	* - If scope parameter is undefined, returns an array of global expression names.
	*
	* For more information, see the [Named expressions guide](/guide/named-expressions.md).
	*
	* @param {number?} scope - scope of the named expressions, `sheetId` for local scope or `undefined` for global scope
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[NoSheetWithIdError]] if no sheet with given sheetId exists
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['42'],
	*  ['50'],
	*  ['60'],
	* ]);
	*
	* // add two named expressions and one scoped
	* hfInstance.addNamedExpression('prettyName', '=Sheet1!$A$1+100');
	* hfInstance.addNamedExpression('anotherPrettyName', '=Sheet1!$A$2+100');
	* hfInstance.addNamedExpression('alsoPrettyName', '=Sheet1!$A$3+100', 0);
	*
	* // list the expressions, should return: ['prettyName', 'anotherPrettyName'] for this example
	* const listOfExpressions = hfInstance.listNamedExpressions();
	*
	*  // list the expressions, should return: ['alsoPrettyName'] for this example
	* const listOfExpressions = hfInstance.listNamedExpressions(0);
	* ```
	*
	* @category Named Expressions
	*/
	listNamedExpressions(scope) {
		if (scope !== void 0) validateArgToType(scope, "number", "scope");
		this._crudOperations.ensureScopeIdIsValid(scope);
		return this._namedExpressions.getAllNamedExpressionsNamesInScope(scope);
	}
	/**
	* Returns all named expressions serialized.
	*
	* For more information, see the [Named expressions guide](/guide/named-expressions.md).
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['42'],
	*  ['50'],
	*  ['60'],
	* ]);
	*
	* // add two named expressions and one scoped
	* hfInstance.addNamedExpression('prettyName', '=Sheet1!$A$1+100');
	* hfInstance.addNamedExpression('anotherPrettyName', '=Sheet1!$A$2+100');
	* hfInstance.addNamedExpression('prettyName3', '=Sheet1!$A$3+100', 0);
	*
	* // get all expressions serialized
	* // should return:
	* // [
	* // {name: 'prettyName', expression: '=Sheet1!$A$1+100', options: undefined, scope: undefined},
	* // {name: 'anotherPrettyName', expression: '=Sheet1!$A$2+100', options: undefined, scope: undefined},
	* // {name: 'alsoPrettyName', expression: '=Sheet1!$A$3+100', options: undefined, scope: 0}
	* // ]
	* const allExpressions = hfInstance.getAllNamedExpressionsSerialized();
	* ```
	*
	* @category Named Expressions
	*/
	getAllNamedExpressionsSerialized() {
		return this._serialization.getAllNamedExpressionsSerialized();
	}
	/**
	* Parses and then unparses a formula.
	* Returns a normalized formula (e.g., restores the original capitalization of sheet names, function names, cell addresses, and named expressions).
	*
	* @param {string} formulaString - a formula in a proper format - it must start with "="
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	* @throws [[NotAFormulaError]] when the provided string is not a valid formula, i.e., does not start with "="
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromArray([
	*  ['42'],
	*  ['50'],
	* ]);
	*
	* // returns '=Sheet1!$A$1+10'
	* const normalizedFormula = hfInstance.normalizeFormula('=SHEET1!$A$1+10');
	*
	* // returns '=3*$A$1'
	* const normalizedFormula = hfInstance.normalizeFormula('=3*$a$1');
	* ```
	*
	* @category Helpers
	*/
	normalizeFormula(formulaString) {
		validateArgToType(formulaString, "string", "formulaString");
		const { ast, address } = this.extractTemporaryFormula(formulaString);
		if (ast === void 0) throw new NotAFormulaError();
		return this._unparser.unparse(ast, address);
	}
	/**
	* Calculates fire-and-forget formula, returns the calculated value.
	*
	* @param {string} formulaString - A formula in a proper format, starting with `=`.
	* @param {number} sheetId - The ID of a sheet in context of which the formula gets evaluated.
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type arguments is of wrong type.
	* @throws [[NotAFormulaError]] when the provided string is not a valid formula (i.e., doesn't start with `=`).
	* @throws [[NoSheetWithIdError]] when the provided `sheetID` doesn't exist.
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildFromSheets({
	*  Sheet1: [['58']],
	*  Sheet2: [['1', '2', '3'], ['4', '5', '6']]
	* });
	*
	* // returns the calculated formula's value
	* // for this example, returns `68`
	* const calculatedFormula = hfInstance.calculateFormula('=A1+10', 0);
	*
	* // for this example, returns [['11', '12', '13'], ['14', '15', '16']]
	* const calculatedFormula = hfInstance.calculateFormula('=A1:B3+10', 1);
	* ```
	*
	* @category Helpers
	*/
	calculateFormula(formulaString, sheetId) {
		validateArgToType(formulaString, "string", "formulaString");
		validateArgToType(sheetId, "number", "sheetId");
		this._crudOperations.ensureScopeIdIsValid(sheetId);
		const { ast, address, dependencies } = this.extractTemporaryFormula(formulaString, sheetId);
		if (ast === void 0) throw new NotAFormulaError();
		const internalCellValue = this.evaluator.runAndForget(ast, address, dependencies);
		return this._exporter.exportScalarOrRange(internalCellValue);
	}
	/**
	* Return a list of named expressions used by a formula.
	*
	* @param {string} formulaString - A formula in a proper format, starting with `=`.
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type arguments is of wrong type.
	* @throws [[NotAFormulaError]] when the provided string is not a valid formula (i.e., doesn't start with `=`).
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildEmpty();
	*
	* // returns a list of named expressions used by a formula
	* // for this example, returns ['foo', 'bar']
	* const namedExpressions = hfInstance.getNamedExpressionsFromFormula('=foo+bar*2');
	* ```
	*
	* @category Helpers
	*/
	getNamedExpressionsFromFormula(formulaString) {
		validateArgToType(formulaString, "string", "formulaString");
		const { ast, dependencies } = this.extractTemporaryFormula(formulaString);
		if (ast === void 0) throw new NotAFormulaError();
		const namedExpressionDependencies = dependencies.filter((dep) => dep instanceof NamedExpressionDependency).map((namedExpr) => namedExpr.name);
		return [...new Set(namedExpressionDependencies)];
	}
	/**
	* Validates the formula.
	* If the provided string starts with "=" and is a parsable formula, the method returns `true`.
	* The validation is purely grammatical: the method doesn't verify if the formula can be calculated or not.
	*
	* @param {string} formulaString -  a formula in a proper format - it must start with "="
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* // checks if the given string is a valid formula, should return 'true' for this example
	* const isFormula = hfInstance.validateFormula('=SUM(1, 2)');
	* ```
	*
	* @category Helpers
	*/
	validateFormula(formulaString) {
		validateArgToType(formulaString, "string", "formulaString");
		const { ast } = this.extractTemporaryFormula(formulaString);
		return ast !== void 0;
	}
	/**
	* Returns translated names of all functions registered in this instance of HyperFormula
	* according to the language set in the configuration
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildEmpty();
	*
	* // return translated names of all functions, assign to a variable
	* const allNames = hfInstance.getRegisteredFunctionNames();
	* ```
	*
	* @category Custom Functions
	*/
	getRegisteredFunctionNames() {
		return HyperFormula.getLanguage(this._config.language).getFunctionTranslations(this._functionRegistry.getRegisteredFunctionIds());
	}
	/**
	* Returns class of a plugin used by function with given id
	*
	* For more information, see the [Custom functions guide](/guide/custom-functions.md).
	*
	* @param {string} functionId - id of a function, e.g., 'SUMIF'
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* // import your own plugin
	* import { MyExamplePlugin } from './file_with_your_plugin';
	*
	* const hfInstance = HyperFormula.buildEmpty();
	*
	* // register a plugin
	* HyperFormula.registerFunctionPlugin(MyExamplePlugin);
	*
	* // get the plugin
	* const myPlugin = hfInstance.getFunctionPlugin('EXAMPLE');
	* ```
	*
	* @category Custom Functions
	*/
	getFunctionPlugin(functionId) {
		validateArgToType(functionId, "string", "functionId");
		return this._functionRegistry.getFunctionPlugin(functionId);
	}
	/**
	* Returns classes of all plugins registered in this instance of HyperFormula
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildEmpty();
	*
	* // return classes of all plugins registered, assign to a variable
	* const allNames = hfInstance.getAllFunctionPlugins();
	* ```
	*
	* @category Custom Functions
	*/
	getAllFunctionPlugins() {
		return this._functionRegistry.getPlugins();
	}
	/**
	* Interprets number as a date + time.
	*
	* For more information, see the [Date and time handling guide](/guide/date-and-time-handling.md).
	*
	* @param {number} inputNumber - number of days since nullDate, should be non-negative, fractions are interpreted as hours/minutes/seconds.
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildEmpty();
	*
	* // pass the number of days since nullDate
	* // the method should return formatted date and time, for this example:
	* // {year: 2020, month: 1, day: 15, hours: 2, minutes: 24, seconds: 0}
	* const dateTimeFromNumber = hfInstance.numberToDateTime(43845.1);
	*
	* ```
	*
	* @category Helpers
	*/
	numberToDateTime(inputNumber) {
		validateArgToType(inputNumber, "number", "val");
		return this._evaluator.interpreter.dateTimeHelper.numberToSimpleDateTime(inputNumber);
	}
	/**
	* Interprets number as a date.
	*
	* For more information, see the [Date and time handling guide](/guide/date-and-time-handling.md).
	*
	* @param {number} inputNumber - number of days since nullDate, should be non-negative, fractions are ignored.
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildEmpty();
	*
	* // pass the number of days since nullDate
	* // the method should return formatted date, for this example:
	* // {year: 2020, month: 1, day: 15}
	* const dateFromNumber = hfInstance.numberToDate(43845);
	* ```
	*
	* @category Helpers
	*/
	numberToDate(inputNumber) {
		validateArgToType(inputNumber, "number", "val");
		return this._evaluator.interpreter.dateTimeHelper.numberToSimpleDate(inputNumber);
	}
	/**
	* Interprets number as a time (hours/minutes/seconds).
	*
	* For more information, see the [Date and time handling guide](/guide/date-and-time-handling.md).
	*
	* @param {number} inputNumber - time in 24h units.
	*
	* @throws [[ExpectedValueOfTypeError]] if any of its basic type argument is of wrong type
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildEmpty();
	*
	* // pass a number to be interpreted as a time
	* // should return {hours: 26, minutes: 24} for this example
	* const timeFromNumber = hfInstance.numberToTime(1.1);
	* ```
	*
	* @category Helpers
	*/
	numberToTime(inputNumber) {
		validateArgToType(inputNumber, "number", "val");
		return numberToSimpleTime(inputNumber);
	}
	/**
	* Subscribes to an event.
	* For the list of all available events, see [[Listeners]].
	*
	* @param {Event} event the name of the event to subscribe to
	* @param {Listener} listener to be called when event is emitted
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildEmpty();
	*
	* // subscribe to a 'sheetAdded', pass a simple handler
	* hfInstance.on('sheetAdded', ( ) => { console.log('foo') });
	*
	* // add a sheet to trigger an event,
	* // console should print 'foo' after each time sheet is added in this example
	* hfInstance.addSheet('FooBar');
	* ```
	*
	* @category Events
	*/
	on(event, listener) {
		this._emitter.on(event, listener);
	}
	/**
	* Subscribes to an event once.
	* For the list of all available events, see [[Listeners]].
	*
	* @param {Event} event the name of the event to subscribe to
	* @param {Listener} listener to be called when event is emitted
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildEmpty();
	*
	* // subscribe to a 'sheetAdded', pass a simple handler
	* hfInstance.once('sheetAdded', ( ) => { console.log('foo') });
	*
	* // call addSheet twice,
	* // console should print 'foo' only once when the sheet is added in this example
	* hfInstance.addSheet('FooBar');
	* hfInstance.addSheet('FooBaz');
	* ```
	*
	* @category Events
	*/
	once(event, listener) {
		this._emitter.once(event, listener);
	}
	/**
	* Unsubscribes from an event or from all events.
	* For the list of all available events, see [[Listeners]].
	*
	* @param {Event} event the name of the event to subscribe to
	* @param {Listener} listener to be called when event is emitted
	*
	* @example
	* ```js
	* const hfInstance = HyperFormula.buildEmpty();
	*
	* // define a simple function to be called upon emitting an event
	* const handler = ( ) => { console.log('baz') }
	*
	* // subscribe to a 'sheetAdded', pass the handler
	* hfInstance.on('sheetAdded', handler);
	*
	* // add a sheet to trigger an event,
	* // console should print 'baz' each time a sheet is added
	* hfInstance.addSheet('FooBar');
	*
	* // unsubscribe from a 'sheetAdded'
	* hfInstance.off('sheetAdded', handler);
	*
	* // add a sheet, the console should not print anything
	* hfInstance.addSheet('FooBaz');
	* ```
	*
	* @category Events
	*/
	off(event, listener) {
		this._emitter.off(event, listener);
	}
	/**
	* Destroys instance of HyperFormula.
	*
	* @example
	* ```js
	* // destroys the instance
	* hfInstance.destroy();
	* ```
	*
	* @category Instance
	*/
	destroy() {
		objectDestroy(this);
	}
	/**
	* Throws an error if evaluation is suspended.
	*
	* @internal
	*/
	ensureEvaluationIsNotSuspended() {
		if (this._evaluationSuspended) throw new EvaluationSuspendedError();
	}
	/**
	* Parses a formula string and extracts its AST and dependencies.
	*
	* @internal
	*/
	extractTemporaryFormula(formulaString, sheetId = 1) {
		const parsedCellContent = this._cellContentParser.parse(formulaString);
		const address = {
			sheet: sheetId,
			col: 0,
			row: 0
		};
		if (!(parsedCellContent instanceof CellContent.Formula)) return {
			address,
			dependencies: []
		};
		const { ast, errors, dependencies } = this._parser.parse(parsedCellContent.formula, address);
		if (errors.length > 0) return {
			address,
			dependencies: []
		};
		return {
			ast,
			address,
			dependencies
		};
	}
	/**
	* Rebuilds the engine with new configuration.
	*/
	rebuildWithConfig(newParams) {
		const newConfig = this._config.mergeConfig(newParams);
		const configNewLanguage = this._config.mergeConfig({ language: newParams.language });
		const serializedSheets = this._serialization.withNewConfig(configNewLanguage, this._namedExpressions).getAllSheetsSerialized();
		const serializedNamedExpressions = this._serialization.getAllNamedExpressionsSerialized();
		const newEngine = BuildEngineFactory.rebuildWithConfig(newConfig, serializedSheets, serializedNamedExpressions, this._stats);
		this._config = newEngine.config;
		this._stats = newEngine.stats;
		this._dependencyGraph = newEngine.dependencyGraph;
		this._columnSearch = newEngine.columnSearch;
		this._parser = newEngine.parser;
		this._unparser = newEngine.unparser;
		this._cellContentParser = newEngine.cellContentParser;
		this._evaluator = newEngine.evaluator;
		this._lazilyTransformingAstService = newEngine.lazilyTransformingAstService;
		this._crudOperations = newEngine.crudOperations;
		this._exporter = newEngine.exporter;
		this._namedExpressions = newEngine.namedExpressions;
		this._serialization = newEngine.serialization;
		this._functionRegistry = newEngine.functionRegistry;
	}
	/**
	* Runs a recomputation starting from recently changed vertices.
	*
	* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
	*
	* Note that this method may trigger dependency graph recalculation.
	*
	* @fires [[valuesUpdated]] if recalculation was triggered by this change
	*/
	recomputeIfDependencyGraphNeedsIt() {
		if (!this._evaluationSuspended) {
			const changes = this._crudOperations.getAndClearContentChanges();
			const verticesToRecomputeFrom = this.dependencyGraph.verticesToRecompute();
			this.dependencyGraph.clearDirtyVertices();
			if (verticesToRecomputeFrom.length > 0) changes.addAll(this.evaluator.partialRun(verticesToRecomputeFrom));
			const exportedChanges = changes.exportChanges(this._exporter);
			if (!changes.isEmpty()) this._emitter.emit(Events.ValuesUpdated, exportedChanges);
			return exportedChanges;
		} else return [];
	}
};
/**
* Version of the HyperFormula.
*
* @category Static Properties
*/
HyperFormula.version = "3.2.0";
/**
* Latest build date.
*
* @category Static Properties
*/
HyperFormula.buildDate = "19/02/2026 12:14:46";
/**
* A release date.
*
* @category Static Properties
*/
HyperFormula.releaseDate = "19/02/2026";
/**
* When using the UMD build, this property contains all available languages to use with the [registerLanguage](#registerlanguage) method.
*
* For more information, see the [Localizing functions](/guide/localizing-functions.md) guide.
*
* @category Static Properties
*/
HyperFormula.languages = {};
HyperFormula.registeredLanguages = /* @__PURE__ */ new Map();
//#endregion
//#region ../../node_modules/hyperformula/es/Config.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var privatePool = /* @__PURE__ */ new WeakMap();
var Config = class Config {
	constructor(options = {}, showDeprecatedWarns = true) {
		const { accentSensitive, caseSensitive, caseFirst, chooseAddressMappingPolicy, context, currencySymbol, dateFormats, decimalSeparator, evaluateNullToZero, functionArgSeparator, functionPlugins, ignorePunctuation, leapYear1900, localeLang, language, ignoreWhiteSpace, licenseKey, matchWholeCell, arrayColumnSeparator, arrayRowSeparator, maxRows, maxColumns, nullYear, nullDate, parseDateTime, precisionEpsilon, precisionRounding, stringifyDateTime, stringifyDuration, smartRounding, timeFormats, thousandSeparator, useArrayArithmetic, useStats, undoLimit, useColumnIndex, useRegularExpressions, useWildcards } = options;
		if (showDeprecatedWarns) Config.warnDeprecatedOptions(options);
		this.useArrayArithmetic = configValueFromParam(useArrayArithmetic, "boolean", "useArrayArithmetic");
		this.accentSensitive = configValueFromParam(accentSensitive, "boolean", "accentSensitive");
		this.caseSensitive = configValueFromParam(caseSensitive, "boolean", "caseSensitive");
		this.caseFirst = configValueFromParam(caseFirst, [
			"upper",
			"lower",
			"false"
		], "caseFirst");
		this.ignorePunctuation = configValueFromParam(ignorePunctuation, "boolean", "ignorePunctuation");
		this.chooseAddressMappingPolicy = chooseAddressMappingPolicy !== null && chooseAddressMappingPolicy !== void 0 ? chooseAddressMappingPolicy : Config.defaultConfig.chooseAddressMappingPolicy;
		this.dateFormats = [...configValueFromParamCheck(dateFormats, Array.isArray, "array", "dateFormats")];
		this.timeFormats = [...configValueFromParamCheck(timeFormats, Array.isArray, "array", "timeFormats")];
		this.functionArgSeparator = configValueFromParam(functionArgSeparator, "string", "functionArgSeparator");
		this.decimalSeparator = configValueFromParam(decimalSeparator, [".", ","], "decimalSeparator");
		this.language = configValueFromParam(language, "string", "language");
		this.ignoreWhiteSpace = configValueFromParam(ignoreWhiteSpace, ["standard", "any"], "ignoreWhiteSpace");
		this.licenseKey = configValueFromParam(licenseKey, "string", "licenseKey");
		this.thousandSeparator = configValueFromParam(thousandSeparator, [
			"",
			",",
			" ",
			"."
		], "thousandSeparator");
		this.arrayColumnSeparator = configValueFromParam(arrayColumnSeparator, [",", ";"], "arrayColumnSeparator");
		this.arrayRowSeparator = configValueFromParam(arrayRowSeparator, [";", "|"], "arrayRowSeparator");
		this.localeLang = configValueFromParam(localeLang, "string", "localeLang");
		this.functionPlugins = [...functionPlugins !== null && functionPlugins !== void 0 ? functionPlugins : Config.defaultConfig.functionPlugins];
		this.smartRounding = configValueFromParam(smartRounding, "boolean", "smartRounding");
		this.evaluateNullToZero = configValueFromParam(evaluateNullToZero, "boolean", "evaluateNullToZero");
		this.nullYear = configValueFromParam(nullYear, "number", "nullYear");
		validateNumberToBeAtLeast(this.nullYear, "nullYear", 0);
		validateNumberToBeAtMost(this.nullYear, "nullYear", 100);
		this.precisionRounding = configValueFromParam(precisionRounding, "number", "precisionRounding");
		validateNumberToBeAtLeast(this.precisionRounding, "precisionRounding", 0);
		this.precisionEpsilon = configValueFromParam(precisionEpsilon, "number", "precisionEpsilon");
		validateNumberToBeAtLeast(this.precisionEpsilon, "precisionEpsilon", 0);
		this.useColumnIndex = configValueFromParam(useColumnIndex, "boolean", "useColumnIndex");
		this.useStats = configValueFromParam(useStats, "boolean", "useStats");
		this.parseDateTime = configValueFromParam(parseDateTime, "function", "parseDateTime");
		this.stringifyDateTime = configValueFromParam(stringifyDateTime, "function", "stringifyDateTime");
		this.stringifyDuration = configValueFromParam(stringifyDuration, "function", "stringifyDuration");
		this.translationPackage = HyperFormula.getLanguage(this.language);
		this.errorMapping = this.translationPackage.buildErrorMapping();
		this.nullDate = configValueFromParamCheck(nullDate, instanceOfSimpleDate, "IDate", "nullDate");
		this.leapYear1900 = configValueFromParam(leapYear1900, "boolean", "leapYear1900");
		this.undoLimit = configValueFromParam(undoLimit, "number", "undoLimit");
		this.useRegularExpressions = configValueFromParam(useRegularExpressions, "boolean", "useRegularExpressions");
		this.useWildcards = configValueFromParam(useWildcards, "boolean", "useWildcards");
		this.matchWholeCell = configValueFromParam(matchWholeCell, "boolean", "matchWholeCell");
		validateNumberToBeAtLeast(this.undoLimit, "undoLimit", 0);
		this.maxRows = configValueFromParam(maxRows, "number", "maxRows");
		validateNumberToBeAtLeast(this.maxRows, "maxRows", 1);
		this.maxColumns = configValueFromParam(maxColumns, "number", "maxColumns");
		this.currencySymbol = this.setupCurrencySymbol(currencySymbol);
		validateNumberToBeAtLeast(this.maxColumns, "maxColumns", 1);
		this.context = context;
		privatePool.set(this, { licenseKeyValidityState: checkLicenseKeyValidity(this.licenseKey) });
		configCheckIfParametersNotInConflict({
			value: this.decimalSeparator,
			name: "decimalSeparator"
		}, {
			value: this.functionArgSeparator,
			name: "functionArgSeparator"
		}, {
			value: this.thousandSeparator,
			name: "thousandSeparator"
		});
		configCheckIfParametersNotInConflict({
			value: this.arrayRowSeparator,
			name: "arrayRowSeparator"
		}, {
			value: this.arrayColumnSeparator,
			name: "arrayColumnSeparator"
		});
	}
	setupCurrencySymbol(currencySymbol) {
		const valueAfterCheck = [...configValueFromParamCheck(currencySymbol, Array.isArray, "array", "currencySymbol")];
		valueAfterCheck.forEach((val) => {
			if (typeof val !== "string") throw new ExpectedValueOfTypeError("string[]", "currencySymbol");
			if (val === "") throw new ConfigValueEmpty("currencySymbol");
		});
		return valueAfterCheck;
	}
	/**
	* Proxied property to its private counterpart. This makes the property
	* as accessible as the other Config options but without ability to change the value.
	*
	* @internal
	*/
	get licenseKeyValidityState() {
		return privatePool.get(this).licenseKeyValidityState;
	}
	getConfig() {
		return getFullConfigFromPartial(this);
	}
	mergeConfig(init) {
		const mergedConfig = Object.assign({}, this.getConfig(), init);
		Config.warnDeprecatedOptions(init);
		return new Config(mergedConfig, false);
	}
	static warnDeprecatedOptions(options) {}
	static warnDeprecatedIfUsed(inputValue, paramName, fromVersion, replacementName) {
		if (inputValue !== void 0) if (replacementName === void 0) console.warn(`${paramName} option is deprecated since ${fromVersion}`);
		else console.warn(`${paramName} option is deprecated since ${fromVersion}, please use ${replacementName}`);
	}
};
Config.defaultConfig = {
	accentSensitive: false,
	currencySymbol: ["$"],
	caseSensitive: false,
	caseFirst: "lower",
	context: void 0,
	chooseAddressMappingPolicy: new AlwaysDense(),
	dateFormats: ["DD/MM/YYYY", "DD/MM/YY"],
	decimalSeparator: ".",
	evaluateNullToZero: false,
	functionArgSeparator: ",",
	functionPlugins: [],
	ignorePunctuation: false,
	language: "enGB",
	ignoreWhiteSpace: "standard",
	licenseKey: "",
	leapYear1900: false,
	localeLang: "en",
	matchWholeCell: true,
	arrayColumnSeparator: ",",
	arrayRowSeparator: ";",
	maxRows: 4e4,
	maxColumns: 18278,
	nullYear: 30,
	nullDate: {
		year: 1899,
		month: 12,
		day: 30
	},
	parseDateTime: defaultParseToDateTime,
	precisionEpsilon: 1e-13,
	precisionRounding: 10,
	smartRounding: true,
	stringifyDateTime: defaultStringifyDateTime,
	stringifyDuration: defaultStringifyDuration,
	timeFormats: ["hh:mm", "hh:mm:ss.sss"],
	thousandSeparator: "",
	undoLimit: 20,
	useRegularExpressions: false,
	useWildcards: true,
	useColumnIndex: false,
	useStats: false,
	useArrayArithmetic: false
};
function getFullConfigFromPartial(partialConfig) {
	var _a;
	const ret = {};
	for (const key in Config.defaultConfig) {
		const val = (_a = partialConfig[key]) !== null && _a !== void 0 ? _a : Config.defaultConfig[key];
		if (Array.isArray(val)) ret[key] = [...val];
		else ret[key] = val;
	}
	return ret;
}
function getDefaultConfig() {
	return getFullConfigFromPartial({});
}
//#endregion
//#region ../../node_modules/hyperformula/es/i18n/languages/enGB.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var dictionary$1 = {
	errors: {
		CYCLE: "#CYCLE!",
		DIV_BY_ZERO: "#DIV/0!",
		ERROR: "#ERROR!",
		NA: "#N/A",
		NAME: "#NAME?",
		NUM: "#NUM!",
		REF: "#REF!",
		SPILL: "#SPILL!",
		VALUE: "#VALUE!"
	},
	functions: {
		FILTER: "FILTER",
		ADDRESS: "ADDRESS",
		"ARRAY_CONSTRAIN": "ARRAY_CONSTRAIN",
		ARRAYFORMULA: "ARRAYFORMULA",
		ABS: "ABS",
		ACOS: "ACOS",
		ACOSH: "ACOSH",
		ACOT: "ACOT",
		ACOTH: "ACOTH",
		AND: "AND",
		ARABIC: "ARABIC",
		ASIN: "ASIN",
		ASINH: "ASINH",
		ATAN2: "ATAN2",
		ATAN: "ATAN",
		ATANH: "ATANH",
		AVERAGE: "AVERAGE",
		AVERAGEA: "AVERAGEA",
		AVERAGEIF: "AVERAGEIF",
		BASE: "BASE",
		BIN2DEC: "BIN2DEC",
		BIN2HEX: "BIN2HEX",
		BIN2OCT: "BIN2OCT",
		BITAND: "BITAND",
		BITLSHIFT: "BITLSHIFT",
		BITOR: "BITOR",
		BITRSHIFT: "BITRSHIFT",
		BITXOR: "BITXOR",
		CEILING: "CEILING",
		CHAR: "CHAR",
		CHOOSE: "CHOOSE",
		CLEAN: "CLEAN",
		CODE: "CODE",
		COLUMN: "COLUMN",
		COLUMNS: "COLUMNS",
		CONCATENATE: "CONCATENATE",
		CORREL: "CORREL",
		COS: "COS",
		COSH: "COSH",
		COT: "COT",
		COTH: "COTH",
		COUNT: "COUNT",
		COUNTA: "COUNTA",
		COUNTBLANK: "COUNTBLANK",
		COUNTIF: "COUNTIF",
		COUNTIFS: "COUNTIFS",
		COUNTUNIQUE: "COUNTUNIQUE",
		CSC: "CSC",
		CSCH: "CSCH",
		CUMIPMT: "CUMIPMT",
		CUMPRINC: "CUMPRINC",
		DATE: "DATE",
		DATEDIF: "DATEDIF",
		DATEVALUE: "DATEVALUE",
		DAY: "DAY",
		DAYS360: "DAYS360",
		DAYS: "DAYS",
		DB: "DB",
		DDB: "DDB",
		DEC2BIN: "DEC2BIN",
		DEC2HEX: "DEC2HEX",
		DEC2OCT: "DEC2OCT",
		DECIMAL: "DECIMAL",
		DEGREES: "DEGREES",
		DELTA: "DELTA",
		DOLLARDE: "DOLLARDE",
		DOLLARFR: "DOLLARFR",
		EDATE: "EDATE",
		EFFECT: "EFFECT",
		EOMONTH: "EOMONTH",
		ERF: "ERF",
		ERFC: "ERFC",
		EVEN: "EVEN",
		EXACT: "EXACT",
		EXP: "EXP",
		FALSE: "FALSE",
		FIND: "FIND",
		FORMULATEXT: "FORMULATEXT",
		FV: "FV",
		FVSCHEDULE: "FVSCHEDULE",
		HEX2BIN: "HEX2BIN",
		HEX2DEC: "HEX2DEC",
		HEX2OCT: "HEX2OCT",
		HLOOKUP: "HLOOKUP",
		HOUR: "HOUR",
		HYPERLINK: "HYPERLINK",
		IF: "IF",
		IFERROR: "IFERROR",
		IFNA: "IFNA",
		IFS: "IFS",
		INDEX: "INDEX",
		INT: "INT",
		INTERVAL: "INTERVAL",
		IPMT: "IPMT",
		IRR: "IRR",
		ISBINARY: "ISBINARY",
		ISBLANK: "ISBLANK",
		ISERR: "ISERR",
		ISERROR: "ISERROR",
		ISEVEN: "ISEVEN",
		ISFORMULA: "ISFORMULA",
		ISLOGICAL: "ISLOGICAL",
		ISNA: "ISNA",
		ISNONTEXT: "ISNONTEXT",
		ISNUMBER: "ISNUMBER",
		ISODD: "ISODD",
		ISOWEEKNUM: "ISOWEEKNUM",
		ISPMT: "ISPMT",
		ISREF: "ISREF",
		ISTEXT: "ISTEXT",
		LEFT: "LEFT",
		LEN: "LEN",
		LN: "LN",
		LOG10: "LOG10",
		LOG: "LOG",
		LOWER: "LOWER",
		MATCH: "MATCH",
		MAX: "MAX",
		MAXA: "MAXA",
		MAXIFS: "MAXIFS",
		MAXPOOL: "MAXPOOL",
		MEDIAN: "MEDIAN",
		MEDIANPOOL: "MEDIANPOOL",
		MID: "MID",
		MIN: "MIN",
		MINA: "MINA",
		MINIFS: "MINIFS",
		MINUTE: "MINUTE",
		MIRR: "MIRR",
		MMULT: "MMULT",
		MOD: "MOD",
		MONTH: "MONTH",
		N: "N",
		NA: "NA",
		NETWORKDAYS: "NETWORKDAYS",
		"NETWORKDAYS.INTL": "NETWORKDAYS.INTL",
		NOMINAL: "NOMINAL",
		NOT: "NOT",
		NOW: "NOW",
		NPER: "NPER",
		NPV: "NPV",
		OCT2BIN: "OCT2BIN",
		OCT2DEC: "OCT2DEC",
		OCT2HEX: "OCT2HEX",
		ODD: "ODD",
		OFFSET: "OFFSET",
		OR: "OR",
		PI: "PI",
		PMT: "PMT",
		PDURATION: "PDURATION",
		PRODUCT: "PRODUCT",
		POWER: "POWER",
		PPMT: "PPMT",
		PROPER: "PROPER",
		PV: "PV",
		RADIANS: "RADIANS",
		RAND: "RAND",
		RATE: "RATE",
		REPLACE: "REPLACE",
		REPT: "REPT",
		RIGHT: "RIGHT",
		ROMAN: "ROMAN",
		ROUND: "ROUND",
		ROUNDDOWN: "ROUNDDOWN",
		ROUNDUP: "ROUNDUP",
		ROW: "ROW",
		ROWS: "ROWS",
		RRI: "RRI",
		SEARCH: "SEARCH",
		SEC: "SEC",
		SECH: "SECH",
		SECOND: "SECOND",
		SHEET: "SHEET",
		SHEETS: "SHEETS",
		SIN: "SIN",
		SINH: "SINH",
		SLN: "SLN",
		SPLIT: "SPLIT",
		SQRT: "SQRT",
		STDEVA: "STDEVA",
		"STDEV.P": "STDEV.P",
		STDEVPA: "STDEVPA",
		"STDEV.S": "STDEV.S",
		SUBSTITUTE: "SUBSTITUTE",
		SUBTOTAL: "SUBTOTAL",
		SUM: "SUM",
		SUMIF: "SUMIF",
		SUMIFS: "SUMIFS",
		SUMPRODUCT: "SUMPRODUCT",
		SUMSQ: "SUMSQ",
		SWITCH: "SWITCH",
		SYD: "SYD",
		T: "T",
		TAN: "TAN",
		TANH: "TANH",
		TBILLEQ: "TBILLEQ",
		TBILLPRICE: "TBILLPRICE",
		TBILLYIELD: "TBILLYIELD",
		TEXT: "TEXT",
		TIME: "TIME",
		TIMEVALUE: "TIMEVALUE",
		TODAY: "TODAY",
		TRANSPOSE: "TRANSPOSE",
		TRIM: "TRIM",
		TRUE: "TRUE",
		TRUNC: "TRUNC",
		UNICHAR: "UNICHAR",
		UNICODE: "UNICODE",
		UPPER: "UPPER",
		VALUE: "VALUE",
		VARA: "VARA",
		"VAR.P": "VAR.P",
		VARPA: "VARPA",
		"VAR.S": "VAR.S",
		VLOOKUP: "VLOOKUP",
		WEEKDAY: "WEEKDAY",
		WEEKNUM: "WEEKNUM",
		WORKDAY: "WORKDAY",
		"WORKDAY.INTL": "WORKDAY.INTL",
		XNPV: "XNPV",
		XOR: "XOR",
		XLOOKUP: "XLOOKUP",
		YEAR: "YEAR",
		YEARFRAC: "YEARFRAC",
		"HF.ADD": "HF.ADD",
		"HF.CONCAT": "HF.CONCAT",
		"HF.DIVIDE": "HF.DIVIDE",
		"HF.EQ": "HF.EQ",
		"HF.GT": "HF.GT",
		"HF.GTE": "HF.GTE",
		"HF.LT": "HF.LT",
		"HF.LTE": "HF.LTE",
		"HF.MINUS": "HF.MINUS",
		"HF.MULTIPLY": "HF.MULTIPLY",
		"HF.NE": "HF.NE",
		"HF.POW": "HF.POW",
		"HF.UMINUS": "HF.UMINUS",
		"HF.UNARY_PERCENT": "HF.UNARY_PERCENT",
		"HF.UPLUS": "HF.UPLUS",
		VARP: "VARP",
		VAR: "VAR",
		STDEVP: "STDEVP",
		STDEV: "STDEV",
		"EXPON.DIST": "EXPON.DIST",
		FISHER: "FISHER",
		FISHERINV: "FISHERINV",
		GAMMA: "GAMMA",
		"GAMMA.DIST": "GAMMA.DIST",
		GAMMALN: "GAMMALN",
		"GAMMALN.PRECISE": "GAMMALN.PRECISE",
		"GAMMA.INV": "GAMMA.INV",
		GAUSS: "GAUSS",
		FACT: "FACT",
		FACTDOUBLE: "FACTDOUBLE",
		COMBIN: "COMBIN",
		COMBINA: "COMBINA",
		GCD: "GCD",
		LCM: "LCM",
		MROUND: "MROUND",
		MULTINOMIAL: "MULTINOMIAL",
		QUOTIENT: "QUOTIENT",
		RANDBETWEEN: "RANDBETWEEN",
		SERIESSUM: "SERIESSUM",
		SIGN: "SIGN",
		SQRTPI: "SQRTPI",
		SUMX2MY2: "SUMX2MY2",
		SUMX2PY2: "SUMX2PY2",
		SUMXMY2: "SUMXMY2",
		"EXPONDIST": "EXPONDIST",
		GAMMADIST: "GAMMADIST",
		GAMMAINV: "GAMMAINV",
		"BETA.DIST": "BETA.DIST",
		BETADIST: "BETADIST",
		"BETA.INV": "BETA.INV",
		BETAINV: "BETAINV",
		"BINOM.DIST": "BINOM.DIST",
		BINOMDIST: "BINOMDIST",
		"BINOM.INV": "BINOM.INV",
		BESSELI: "BESSELI",
		BESSELJ: "BESSELJ",
		BESSELK: "BESSELK",
		BESSELY: "BESSELY",
		"CHISQ.DIST": "CHISQ.DIST",
		"CHISQ.DIST.RT": "CHISQ.DIST.RT",
		"CHISQ.INV": "CHISQ.INV",
		"CHISQ.INV.RT": "CHISQ.INV.RT",
		CHIDIST: "CHIDIST",
		CHIINV: "CHIINV",
		"F.DIST": "F.DIST",
		"F.DIST.RT": "F.DIST.RT",
		"F.INV": "F.INV",
		"F.INV.RT": "F.INV.RT",
		FDIST: "FDIST",
		FINV: "FINV",
		WEIBULL: "WEIBULL",
		"WEIBULL.DIST": "WEIBULL.DIST",
		POISSON: "POISSON",
		"POISSON.DIST": "POISSON.DIST",
		"HYPGEOM.DIST": "HYPGEOM.DIST",
		HYPGEOMDIST: "HYPGEOMDIST",
		"T.DIST": "T.DIST",
		"T.DIST.2T": "T.DIST.2T",
		"T.DIST.RT": "T.DIST.RT",
		"T.INV": "T.INV",
		"T.INV.2T": "T.INV.2T",
		TDIST: "TDIST",
		TINV: "TINV",
		LOGINV: "LOGINV",
		"LOGNORM.DIST": "LOGNORM.DIST",
		"LOGNORM.INV": "LOGNORM.INV",
		LOGNORMDIST: "LOGNORMDIST",
		"NORM.DIST": "NORM.DIST",
		"NORM.INV": "NORM.INV",
		"NORM.S.DIST": "NORM.S.DIST",
		"NORM.S.INV": "NORM.S.INV",
		NORMDIST: "NORMDIST",
		NORMINV: "NORMINV",
		NORMSDIST: "NORMSDIST",
		NORMSINV: "NORMSINV",
		PHI: "PHI",
		"NEGBINOM.DIST": "NEGBINOM.DIST",
		"NEGBINOMDIST": "NEGBINOMDIST",
		COMPLEX: "COMPLEX",
		IMABS: "IMABS",
		IMAGINARY: "IMAGINARY",
		IMARGUMENT: "IMARGUMENT",
		IMCONJUGATE: "IMCONJUGATE",
		IMCOS: "IMCOS",
		IMCOSH: "IMCOSH",
		IMCOT: "IMCOT",
		IMCSC: "IMCSC",
		IMCSCH: "IMCSCH",
		IMDIV: "IMDIV",
		IMEXP: "IMEXP",
		IMLN: "IMLN",
		IMLOG10: "IMLOG10",
		IMLOG2: "IMLOG2",
		IMPOWER: "IMPOWER",
		IMPRODUCT: "IMPRODUCT",
		IMREAL: "IMREAL",
		IMSEC: "IMSEC",
		IMSECH: "IMSECH",
		IMSIN: "IMSIN",
		IMSINH: "IMSINH",
		IMSQRT: "IMSQRT",
		IMSUB: "IMSUB",
		IMSUM: "IMSUM",
		IMTAN: "IMTAN",
		LARGE: "LARGE",
		SMALL: "SMALL",
		AVEDEV: "AVEDEV",
		CONFIDENCE: "CONFIDENCE",
		"CONFIDENCE.NORM": "CONFIDENCE.NORM",
		"CONFIDENCE.T": "CONFIDENCE.T",
		DEVSQ: "DEVSQ",
		GEOMEAN: "GEOMEAN",
		HARMEAN: "HARMEAN",
		CRITBINOM: "CRITBINOM",
		"COVARIANCE.P": "COVARIANCE.P",
		"COVARIANCE.S": "COVARIANCE.S",
		"COVAR": "COVAR",
		PEARSON: "PEARSON",
		RSQ: "RSQ",
		STANDARDIZE: "STANDARDIZE",
		"Z.TEST": "Z.TEST",
		ZTEST: "ZTEST",
		"F.TEST": "F.TEST",
		FTEST: "FTEST",
		STEYX: "STEYX",
		SLOPE: "SLOPE",
		"CHISQ.TEST": "CHISQ.TEST",
		CHITEST: "CHITEST",
		"T.TEST": "T.TEST",
		TTEST: "TTEST",
		SKEW: "SKEW",
		"SKEW.P": "SKEW.P",
		WEIBULLDIST: "WEIBULLDIST",
		VARS: "VARS",
		TINV2T: "TINV2T",
		TDISTRT: "TDISTRT",
		TDIST2T: "TDIST2T",
		STDEVS: "STDEVS",
		FINVRT: "FINVRT",
		FDISTRT: "FDISTRT",
		CHIDISTRT: "CHIDISTRT",
		CHIINVRT: "CHIINVRT",
		COVARIANCEP: "COVARIANCEP",
		COVARIANCES: "COVARIANCES",
		LOGNORMINV: "LOGNORMINV",
		POISSONDIST: "POISSONDIST",
		SKEWP: "SKEWP",
		"CEILING.MATH": "CEILING.MATH",
		FLOOR: "FLOOR",
		"FLOOR.MATH": "FLOOR.MATH",
		"CEILING.PRECISE": "CEILING.PRECISE",
		"FLOOR.PRECISE": "FLOOR.PRECISE",
		"ISO.CEILING": "ISO.CEILING"
	},
	langCode: "enGB",
	ui: { NEW_SHEET_PREFIX: "Sheet" }
};
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/AddressPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var AbsStyle;
(function(AbsStyle) {
	AbsStyle[AbsStyle["FullyAbsolute"] = 1] = "FullyAbsolute";
	AbsStyle[AbsStyle["RowAbsoluteColRelative"] = 2] = "RowAbsoluteColRelative";
	AbsStyle[AbsStyle["RowRelativeColAbsolute"] = 3] = "RowRelativeColAbsolute";
	AbsStyle[AbsStyle["FullyRelative"] = 4] = "FullyRelative";
})(AbsStyle || (AbsStyle = {}));
var AddressPlugin = class extends FunctionPlugin {
	verifyAddressArguments(row, col, abs, useA1Style) {
		if (useA1Style) {
			if (row < 1 || col < 1) return new CellError(ErrorType.VALUE, ErrorMessage.LessThanOne);
		} else if (AbsStyle.FullyAbsolute == abs) {
			if (row < 1 || col < 1) return new CellError(ErrorType.VALUE, ErrorMessage.LessThanOne);
		} else if (AbsStyle.RowAbsoluteColRelative == abs) {
			if (row < 1) return new CellError(ErrorType.VALUE, ErrorMessage.LessThanOne);
		} else if (AbsStyle.RowRelativeColAbsolute == abs) {
			if (col < 1) return new CellError(ErrorType.VALUE, ErrorMessage.LessThanOne);
		}
	}
	address(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ADDRESS"), (row, col, abs, useA1Style, sheetName) => {
			const argumentError = this.verifyAddressArguments(row, col, abs, useA1Style);
			if (argumentError !== void 0) return argumentError;
			const colLetter = columnIndexToLabel(col - 1);
			let sheetPrefix = "";
			if (sheetName !== void 0 && sheetName !== null) sheetPrefix = `${sheetName}!`;
			const r1c1ColSegment = col == 0 ? "C" : `C[${col}]`;
			const r1c1RowSegment = row == 0 ? "R" : `R[${row}]`;
			if (AbsStyle.FullyRelative == abs) return useA1Style ? `${sheetPrefix}${colLetter}${row}` : `${sheetPrefix}${r1c1RowSegment}${r1c1ColSegment}`;
			else if (AbsStyle.RowRelativeColAbsolute == abs) return useA1Style ? `${sheetPrefix}$${colLetter}${row}` : `${sheetPrefix}${r1c1RowSegment}C${col}`;
			else if (AbsStyle.RowAbsoluteColRelative == abs) return useA1Style ? `${sheetPrefix}${colLetter}$${row}` : `${sheetPrefix}R${row}${r1c1ColSegment}`;
			return useA1Style ? `${sheetPrefix}$${colLetter}$${row}` : `${sheetPrefix}R${row}C${col}`;
		});
	}
};
AddressPlugin.implementedFunctions = { "ADDRESS": {
	method: "address",
	parameters: [
		{ argumentType: FunctionArgumentType.NUMBER },
		{ argumentType: FunctionArgumentType.NUMBER },
		{
			argumentType: FunctionArgumentType.NUMBER,
			optionalArg: true,
			defaultValue: 1,
			minValue: 1,
			maxValue: 4
		},
		{
			argumentType: FunctionArgumentType.BOOLEAN,
			optionalArg: true,
			defaultValue: true
		},
		{
			argumentType: FunctionArgumentType.STRING,
			optionalArg: true
		}
	]
} };
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/ArrayPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var ArrayPlugin = class extends FunctionPlugin {
	arrayformula(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ARRAYFORMULA"), (value) => value);
	}
	arrayformulaArraySize(ast, state) {
		if (ast.args.length !== 1) return ArraySize.error();
		const metadata = this.metadata("ARRAYFORMULA");
		return ast.args.map((arg) => {
			var _a;
			return this.arraySizeForAst(arg, new InterpreterState(state.formulaAddress, state.arraysFlag || ((_a = metadata === null || metadata === void 0 ? void 0 : metadata.enableArrayArithmeticForArguments) !== null && _a !== void 0 ? _a : false)));
		})[0];
	}
	arrayconstrain(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ARRAY_CONSTRAIN"), (range, numRows, numCols) => {
			numRows = Math.min(numRows, range.height());
			numCols = Math.min(numCols, range.width());
			const data = range.data;
			const ret = [];
			for (let i = 0; i < numRows; i++) ret.push(data[i].slice(0, numCols));
			return SimpleRangeValue.onlyValues(ret);
		});
	}
	arrayconstrainArraySize(ast, state) {
		if (ast.args.length !== 3) return ArraySize.error();
		const metadata = this.metadata("ARRAY_CONSTRAIN");
		let { height, width } = ast.args.map((arg) => {
			var _a;
			return this.arraySizeForAst(arg, new InterpreterState(state.formulaAddress, state.arraysFlag || ((_a = metadata === null || metadata === void 0 ? void 0 : metadata.enableArrayArithmeticForArguments) !== null && _a !== void 0 ? _a : false)));
		})[0];
		if (ast.args[1].type === AstNodeType.NUMBER) height = Math.min(height, ast.args[1].value);
		if (ast.args[2].type === AstNodeType.NUMBER) width = Math.min(width, ast.args[2].value);
		if (height < 1 || width < 1 || !Number.isInteger(height) || !Number.isInteger(width)) return ArraySize.error();
		return new ArraySize(width, height);
	}
	filter(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("FILTER"), (rangeVals, ...rangeFilters) => {
			for (const filter of rangeFilters) if (rangeVals.width() !== filter.width() || rangeVals.height() !== filter.height()) return new CellError(ErrorType.NA, ErrorMessage.EqualLength);
			if (rangeVals.width() > 1 && rangeVals.height() > 1) return new CellError(ErrorType.NA, ErrorMessage.WrongDimension);
			const vals = rangeVals.data;
			const ret = [];
			for (let i = 0; i < rangeVals.height(); i++) {
				const row = [];
				for (let j = 0; j < rangeVals.width(); j++) {
					let ok = true;
					for (const filter of rangeFilters) if (coerceScalarToBoolean(filter.data[i][j]) !== true) {
						ok = false;
						break;
					}
					if (ok) row.push(vals[i][j]);
				}
				if (row.length > 0) ret.push(row);
			}
			if (ret.length > 0) return SimpleRangeValue.onlyValues(ret);
			else return new CellError(ErrorType.NA, ErrorMessage.EmptyRange);
		});
	}
	filterArraySize(ast, state) {
		if (ast.args.length <= 1) return ArraySize.error();
		const metadata = this.metadata("FILTER");
		const subChecks = ast.args.map((arg) => {
			var _a;
			return this.arraySizeForAst(arg, new InterpreterState(state.formulaAddress, state.arraysFlag || ((_a = metadata === null || metadata === void 0 ? void 0 : metadata.enableArrayArithmeticForArguments) !== null && _a !== void 0 ? _a : false)));
		});
		return new ArraySize(Math.max(...subChecks.map((val) => val.width)), Math.max(...subChecks.map((val) => val.height)));
	}
};
ArrayPlugin.implementedFunctions = {
	"ARRAYFORMULA": {
		method: "arrayformula",
		sizeOfResultArrayMethod: "arrayformulaArraySize",
		enableArrayArithmeticForArguments: true,
		parameters: [{ argumentType: FunctionArgumentType.ANY }]
	},
	"ARRAY_CONSTRAIN": {
		method: "arrayconstrain",
		sizeOfResultArrayMethod: "arrayconstrainArraySize",
		parameters: [
			{ argumentType: FunctionArgumentType.RANGE },
			{
				argumentType: FunctionArgumentType.INTEGER,
				minValue: 1
			},
			{
				argumentType: FunctionArgumentType.INTEGER,
				minValue: 1
			}
		],
		vectorizationForbidden: true
	},
	"FILTER": {
		method: "filter",
		sizeOfResultArrayMethod: "filterArraySize",
		enableArrayArithmeticForArguments: true,
		parameters: [{ argumentType: FunctionArgumentType.RANGE }, { argumentType: FunctionArgumentType.RANGE }],
		repeatLastArgs: 1
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/AbsPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var AbsPlugin = class extends FunctionPlugin {
	abs(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ABS"), Math.abs);
	}
};
AbsPlugin.implementedFunctions = { "ABS": {
	method: "abs",
	parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
} };
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/BitShiftPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var MAX_48BIT_INTEGER = 0xffffffffffff;
var SHIFT_MIN_POSITIONS = -53;
var SHIFT_MAX_POSITIONS = 53;
var BitShiftPlugin = class extends FunctionPlugin {
	bitlshift(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("BITLSHIFT"), shiftLeft);
	}
	bitrshift(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("BITRSHIFT"), shiftRight);
	}
};
BitShiftPlugin.implementedFunctions = {
	"BITLSHIFT": {
		method: "bitlshift",
		parameters: [{
			argumentType: FunctionArgumentType.INTEGER,
			minValue: 0
		}, {
			argumentType: FunctionArgumentType.INTEGER,
			minValue: SHIFT_MIN_POSITIONS,
			maxValue: SHIFT_MAX_POSITIONS
		}]
	},
	"BITRSHIFT": {
		method: "bitrshift",
		parameters: [{
			argumentType: FunctionArgumentType.INTEGER,
			minValue: 0
		}, {
			argumentType: FunctionArgumentType.INTEGER,
			minValue: SHIFT_MIN_POSITIONS,
			maxValue: SHIFT_MAX_POSITIONS
		}]
	}
};
function shiftLeft(value, positions) {
	if (positions < 0) return shiftRight(value, -positions);
	else return validate(value * Math.pow(2, positions));
}
function shiftRight(value, positions) {
	if (positions < 0) return shiftLeft(value, -positions);
	else return validate(Math.floor(value / Math.pow(2, positions)));
}
function validate(result) {
	if (result > MAX_48BIT_INTEGER) return new CellError(ErrorType.NUM, ErrorMessage.BitshiftLong);
	else return result;
}
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/BitwiseLogicOperationsPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var BitwiseLogicOperationsPlugin = class extends FunctionPlugin {
	bitand(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("BITAND"), (left, right) => left & right);
	}
	bitor(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("BITOR"), (left, right) => left | right);
	}
	bitxor(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("BITXOR"), (left, right) => left ^ right);
	}
};
BitwiseLogicOperationsPlugin.implementedFunctions = {
	"BITAND": {
		method: "bitand",
		parameters: [{
			argumentType: FunctionArgumentType.INTEGER,
			minValue: 0
		}, {
			argumentType: FunctionArgumentType.INTEGER,
			minValue: 0
		}]
	},
	"BITOR": {
		method: "bitor",
		parameters: [{
			argumentType: FunctionArgumentType.INTEGER,
			minValue: 0
		}, {
			argumentType: FunctionArgumentType.INTEGER,
			minValue: 0
		}]
	},
	"BITXOR": {
		method: "bitxor",
		parameters: [{
			argumentType: FunctionArgumentType.INTEGER,
			minValue: 0
		}, {
			argumentType: FunctionArgumentType.INTEGER,
			minValue: 0
		}]
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/BooleanPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Interpreter plugin containing boolean functions
*/
var BooleanPlugin = class extends FunctionPlugin {
	/**
	* Corresponds to TRUE()
	*
	* Returns the logical true
	*
	* @param ast
	* @param state
	*/
	literalTrue(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("TRUE"), () => true);
	}
	/**
	* Corresponds to FALSE()
	*
	* Returns the logical false
	*
	* @param ast
	* @param state
	*/
	literalFalse(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("FALSE"), () => false);
	}
	/**
	* Corresponds to IF(expression, value_if_true, value_if_false)
	*
	* Returns value specified as second argument if expression is true and third argument if expression is false
	*
	* @param ast
	* @param state
	*/
	conditionalIf(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IF"), (condition, arg2, arg3) => {
			return condition ? arg2 : arg3;
		});
	}
	/**
	* Implementation for the IFS function. Returns the value that corresponds to the first true condition.
	*
	* @param ast
	* @param state
	*/
	ifs(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IFS"), (...args) => {
			for (let idx = 0; idx < args.length; idx += 2) if (args[idx]) return args[idx + 1];
			return new CellError(ErrorType.NA, ErrorMessage.NoConditionMet);
		});
	}
	/**
	* Corresponds to AND(expression1, [expression2, ...])
	*
	* Returns true if all of the provided arguments are logically true, and false if any of it is logically false
	*
	* @param ast
	* @param state
	*/
	and(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("AND"), (...args) => args.filter((arg) => arg !== void 0).every((arg) => !!arg));
	}
	/**
	* Corresponds to OR(expression1, [expression2, ...])
	*
	* Returns true if any of the provided arguments are logically true, and false otherwise
	*
	* @param ast
	* @param state
	*/
	or(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("OR"), (...args) => args.filter((arg) => arg !== void 0).some((arg) => arg));
	}
	not(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("NOT"), (arg) => !arg);
	}
	xor(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("XOR"), (...args) => {
			let cnt = 0;
			args.filter((arg) => arg !== void 0).forEach((arg) => {
				if (arg) cnt++;
			});
			return cnt % 2 === 1;
		});
	}
	switch(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("SWITCH"), (selector, ...args) => {
			const n = args.length;
			let i = 0;
			for (; i + 1 < n; i += 2) {
				if (args[i] instanceof CellError) continue;
				if (this.arithmeticHelper.eq(selector, args[i])) return args[i + 1];
			}
			if (i < n) return args[i];
			else return new CellError(ErrorType.NA, ErrorMessage.NoDefault);
		});
	}
	iferror(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IFERROR"), (arg1, arg2) => {
			if (arg1 instanceof CellError) return arg2;
			else return arg1;
		});
	}
	ifna(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IFNA"), (arg1, arg2) => {
			if (arg1 instanceof CellError && arg1.type === ErrorType.NA) return arg2;
			else return arg1;
		});
	}
	choose(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("CHOOSE"), (selector, ...args) => {
			if (selector > args.length) return new CellError(ErrorType.NUM, ErrorMessage.Selector);
			return args[selector - 1];
		});
	}
};
BooleanPlugin.implementedFunctions = {
	"TRUE": {
		method: "literalTrue",
		parameters: []
	},
	"FALSE": {
		method: "literalFalse",
		parameters: []
	},
	"IF": {
		method: "conditionalIf",
		parameters: [
			{ argumentType: FunctionArgumentType.BOOLEAN },
			{
				argumentType: FunctionArgumentType.SCALAR,
				passSubtype: true
			},
			{
				argumentType: FunctionArgumentType.SCALAR,
				defaultValue: false,
				passSubtype: true
			}
		]
	},
	"IFS": {
		method: "ifs",
		parameters: [{ argumentType: FunctionArgumentType.BOOLEAN }, {
			argumentType: FunctionArgumentType.SCALAR,
			passSubtype: true
		}],
		repeatLastArgs: 2
	},
	"AND": {
		method: "and",
		parameters: [{ argumentType: FunctionArgumentType.BOOLEAN }],
		repeatLastArgs: 1,
		expandRanges: true
	},
	"OR": {
		method: "or",
		parameters: [{ argumentType: FunctionArgumentType.BOOLEAN }],
		repeatLastArgs: 1,
		expandRanges: true
	},
	"XOR": {
		method: "xor",
		parameters: [{ argumentType: FunctionArgumentType.BOOLEAN }],
		repeatLastArgs: 1,
		expandRanges: true
	},
	"NOT": {
		method: "not",
		parameters: [{ argumentType: FunctionArgumentType.BOOLEAN }]
	},
	"SWITCH": {
		method: "switch",
		parameters: [
			{ argumentType: FunctionArgumentType.NOERROR },
			{
				argumentType: FunctionArgumentType.SCALAR,
				passSubtype: true
			},
			{
				argumentType: FunctionArgumentType.SCALAR,
				passSubtype: true
			}
		],
		repeatLastArgs: 1
	},
	"IFERROR": {
		method: "iferror",
		parameters: [{
			argumentType: FunctionArgumentType.SCALAR,
			passSubtype: true
		}, {
			argumentType: FunctionArgumentType.SCALAR,
			passSubtype: true
		}]
	},
	"IFNA": {
		method: "ifna",
		parameters: [{
			argumentType: FunctionArgumentType.SCALAR,
			passSubtype: true
		}, {
			argumentType: FunctionArgumentType.SCALAR,
			passSubtype: true
		}]
	},
	"CHOOSE": {
		method: "choose",
		parameters: [{
			argumentType: FunctionArgumentType.INTEGER,
			minValue: 1
		}, {
			argumentType: FunctionArgumentType.SCALAR,
			passSubtype: true
		}],
		repeatLastArgs: 1
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/CharPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var CharPlugin = class extends FunctionPlugin {
	char(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("CHAR"), (value) => {
			if (value < 1 || value >= 256) return new CellError(ErrorType.VALUE, ErrorMessage.CharacterCodeBounds);
			return String.fromCharCode(Math.trunc(value));
		});
	}
	unichar(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("CHAR"), (value) => {
			if (value < 1 || value >= 1114112) return new CellError(ErrorType.VALUE, ErrorMessage.CharacterCodeBounds);
			return String.fromCodePoint(Math.trunc(value));
		});
	}
};
CharPlugin.implementedFunctions = {
	"CHAR": {
		method: "char",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"UNICHAR": {
		method: "unichar",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/CodePlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var CodePlugin = class extends FunctionPlugin {
	code(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("CODE"), (value) => {
			if (value.length === 0) return new CellError(ErrorType.VALUE, ErrorMessage.EmptyString);
			return value.charCodeAt(0);
		});
	}
	unicode(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("UNICODE"), (value) => {
			var _a;
			return (_a = value.codePointAt(0)) !== null && _a !== void 0 ? _a : new CellError(ErrorType.VALUE, ErrorMessage.EmptyString);
		});
	}
};
CodePlugin.implementedFunctions = {
	"CODE": {
		method: "code",
		parameters: [{ argumentType: FunctionArgumentType.STRING }]
	},
	"UNICODE": {
		method: "unicode",
		parameters: [{ argumentType: FunctionArgumentType.STRING }]
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/CountBlankPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Interpreter plugin containing MEDIAN function
*/
var CountBlankPlugin = class extends FunctionPlugin {
	countblank(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("COUNTBLANK"), (...args) => {
			let counter = 0;
			args.forEach((arg) => {
				if (arg === EmptyValue) counter++;
			});
			return counter;
		});
	}
};
CountBlankPlugin.implementedFunctions = { "COUNTBLANK": {
	method: "countblank",
	parameters: [{ argumentType: FunctionArgumentType.SCALAR }],
	repeatLastArgs: 1,
	expandRanges: true
} };
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/CountUniquePlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Interpreter plugin containing COUNTUNIQUE function
*/
var CountUniquePlugin = class extends FunctionPlugin {
	/**
	* Corresponds to COUNTUNIQUE(Number1, Number2, ...).
	*
	* Returns number of unique numbers from arguments
	*
	* @param ast
	* @param state
	*/
	countunique(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("COUNTUNIQUE"), (...args) => {
			const valuesSet = /* @__PURE__ */ new Set();
			const errorsSet = /* @__PURE__ */ new Set();
			for (const scalarValue of args) if (scalarValue instanceof CellError) errorsSet.add(scalarValue.type);
			else if (scalarValue !== "") valuesSet.add(scalarValue);
			return valuesSet.size + errorsSet.size;
		});
	}
};
CountUniquePlugin.implementedFunctions = { "COUNTUNIQUE": {
	method: "countunique",
	parameters: [{ argumentType: FunctionArgumentType.SCALAR }],
	repeatLastArgs: 1,
	expandRanges: true
} };
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/DateTimePlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Interpreter plugin containing date-specific functions
*/
var DateTimePlugin = class extends FunctionPlugin {
	constructor() {
		super(...arguments);
		this.isoweeknumCore = (day) => {
			const absoluteDay = Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(day));
			const date = this.dateTimeHelper.numberToSimpleDate(day);
			const yearStart = this.dateTimeHelper.dateToNumber({
				year: date.year,
				month: 1,
				day: 1
			});
			const yearStartAbsolute = this.dateTimeHelper.relativeNumberToAbsoluteNumber(yearStart);
			const firstThursdayAbs = yearStartAbsolute + ((4 - yearStartAbsolute) % 7 + 7) % 7;
			const ret = Math.floor((absoluteDay - 1) / 7) - Math.floor((firstThursdayAbs - 1) / 7) + 1;
			if (ret === 0) return this.isoweeknumCore(day - 7) + 1;
			return ret;
		};
		this.days360Core = (startDate, endDate, mode) => {
			const start = this.dateTimeHelper.numberToSimpleDate(startDate);
			const end = this.dateTimeHelper.numberToSimpleDate(endDate);
			let nStart, nEnd;
			if (mode) {
				nStart = toBasisEU(start);
				nEnd = toBasisEU(end);
			} else [nStart, nEnd] = this.dateTimeHelper.toBasisUS(start, end);
			return 360 * (nEnd.year - nStart.year) + 30 * (nEnd.month - nStart.month) + nEnd.day - nStart.day;
		};
	}
	/**
	* Corresponds to DATE(year, month, day)
	*
	* Converts a provided year, month and day into date
	*
	* @param ast
	* @param state
	*/
	date(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("DATE"), (year, month, day) => {
			const d = Math.trunc(day);
			let m = Math.trunc(month);
			let y = Math.trunc(year);
			if (y < this.dateTimeHelper.getEpochYearZero()) y += this.dateTimeHelper.getEpochYearZero();
			const delta = Math.floor((m - 1) / 12);
			y += delta;
			m -= delta * 12;
			const date = {
				year: y,
				month: m,
				day: 1
			};
			if (this.dateTimeHelper.isValidDate(date)) {
				let ret = this.dateTimeHelper.dateToNumber(date) + (d - 1);
				ret = this.dateTimeHelper.getWithinBounds(ret);
				if (ret === void 0) return new CellError(ErrorType.NUM, ErrorMessage.DateBounds);
				return ret;
			}
			return new CellError(ErrorType.VALUE, ErrorMessage.InvalidDate);
		});
	}
	time(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("TIME"), (h, m, s) => {
			const ret = timeToNumber({
				hours: Math.trunc(h),
				minutes: Math.trunc(m),
				seconds: Math.trunc(s)
			});
			if (ret < 0) return new CellError(ErrorType.NUM, ErrorMessage.NegativeTime);
			return ret % 1;
		});
	}
	/**
	* Implementation for the EOMONTH function
	*/
	eomonth(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("EOMONTH"), (dateNumber, numberOfMonthsToShift) => {
			const date = this.dateTimeHelper.numberToSimpleDate(dateNumber);
			let ret = this.dateTimeHelper.dateToNumber(this.dateTimeHelper.endOfMonth(offsetMonth(date, numberOfMonthsToShift)));
			ret = this.dateTimeHelper.getWithinBounds(ret);
			if (ret === void 0) return new CellError(ErrorType.NUM, ErrorMessage.DateBounds);
			return ret;
		});
	}
	day(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("DAY"), (dateNumber) => this.dateTimeHelper.numberToSimpleDate(dateNumber).day);
	}
	days(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("DAYS"), (endDate, startDate) => Math.trunc(endDate) - Math.trunc(startDate));
	}
	/**
	* Corresponds to MONTH(date)
	*
	* Returns the month of the year specified by a given date
	*
	* @param ast
	* @param state
	*/
	month(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("MONTH"), (dateNumber) => this.dateTimeHelper.numberToSimpleDate(dateNumber).month);
	}
	/**
	* Corresponds to YEAR(date)
	*
	* Returns the year specified by a given date
	*
	* @param ast
	* @param state
	*/
	year(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("YEAR"), (dateNumber) => this.dateTimeHelper.numberToSimpleDate(dateNumber).year);
	}
	hour(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("HOUR"), (timeNumber) => numberToSimpleTime(roundToNearestSecond(timeNumber) % 1).hours);
	}
	minute(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("MINUTE"), (timeNumber) => numberToSimpleTime(roundToNearestSecond(timeNumber) % 1).minutes);
	}
	second(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("SECOND"), (timeNumber) => numberToSimpleTime(roundToNearestSecond(timeNumber) % 1).seconds);
	}
	/**
	* Corresponds to TEXT(number, format)
	*
	* Tries to convert number to specified date format.
	*
	* @param ast
	* @param state
	*/
	text(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("TEXT"), (numberRepresentation, formatArg) => format$1(numberRepresentation, formatArg, this.config, this.dateTimeHelper));
	}
	weekday(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("WEEKDAY"), (day, type) => {
			const absoluteDay = Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(day));
			if (type === 3) return (absoluteDay - 1) % 7;
			const offset = weekdayOffsets.get(type);
			if (offset === void 0) return new CellError(ErrorType.NUM, ErrorMessage.BadMode);
			return (absoluteDay - offset) % 7 + 1;
		});
	}
	weeknum(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("WEEKNUM"), (day, type) => {
			const absoluteDay = Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(day));
			const date = this.dateTimeHelper.numberToSimpleDate(day);
			const yearStart = this.dateTimeHelper.dateToNumber({
				year: date.year,
				month: 1,
				day: 1
			});
			const yearStartAbsolute = this.dateTimeHelper.relativeNumberToAbsoluteNumber(yearStart);
			if (type === 21) return this.isoweeknumCore(day);
			const offset = weekdayOffsets.get(type);
			if (offset === void 0) return new CellError(ErrorType.NUM, ErrorMessage.BadMode);
			return Math.floor((absoluteDay - offset) / 7) - Math.floor((yearStartAbsolute - offset) / 7) + 1;
		});
	}
	isoweeknum(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ISOWEEKNUM"), this.isoweeknumCore);
	}
	datevalue(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("DATEVALUE"), (date) => {
			const { dateTime } = this.dateTimeHelper.parseDateTimeFromConfigFormats(date);
			if (dateTime === void 0) return new CellError(ErrorType.VALUE, ErrorMessage.IncorrectDateTime);
			if (!instanceOfSimpleDate(dateTime)) return 0;
			return (instanceOfSimpleTime(dateTime) ? Math.trunc(timeToNumber(dateTime)) : 0) + this.dateTimeHelper.dateToNumber(dateTime);
		});
	}
	timevalue(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("TIMEVALUE"), (date) => {
			const dateNumber = this.dateTimeHelper.dateStringToDateNumber(date);
			if (dateNumber === void 0) return new CellError(ErrorType.VALUE, ErrorMessage.IncorrectDateTime);
			return getRawValue(dateNumber) % 1;
		});
	}
	now(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("NOW"), () => {
			const now = new Date(Date.now());
			return timeToNumber({
				hours: now.getHours(),
				minutes: now.getMinutes(),
				seconds: now.getSeconds()
			}) + this.dateTimeHelper.dateToNumber({
				year: now.getFullYear(),
				month: now.getMonth() + 1,
				day: now.getDate()
			});
		});
	}
	today(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("TODAY"), () => {
			const now = new Date(Date.now());
			return this.dateTimeHelper.dateToNumber({
				year: now.getFullYear(),
				month: now.getMonth() + 1,
				day: now.getDate()
			});
		});
	}
	edate(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("EDATE"), (dateNumber, delta) => {
			const newDate = truncateDayInMonth(offsetMonth(this.dateTimeHelper.numberToSimpleDate(dateNumber), delta));
			let ret = this.dateTimeHelper.dateToNumber(newDate);
			ret = this.dateTimeHelper.getWithinBounds(ret);
			if (ret === void 0) return new CellError(ErrorType.NUM, ErrorMessage.DateBounds);
			return ret;
		});
	}
	datedif(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("DATEDIF"), (startDate, endDate, unit) => {
			if (startDate > endDate) return new CellError(ErrorType.NUM, ErrorMessage.StartEndDate);
			if (unit === "D") return Math.floor(endDate) - Math.floor(startDate);
			const start = this.dateTimeHelper.numberToSimpleDate(startDate);
			const end = this.dateTimeHelper.numberToSimpleDate(endDate);
			switch (unit) {
				case "M": return (end.year - start.year) * 12 + (end.month - start.month) - (end.day < start.day ? 1 : 0);
				case "YM": return (12 + (end.month - start.month) - (end.day < start.day ? 1 : 0)) % 12;
				case "Y": if (end.month > start.month || end.month === start.month && end.day >= start.day) return end.year - start.year;
				else return end.year - start.year - 1;
				case "MD": if (end.day >= start.day) return end.day - start.day;
				else {
					const m = end.month === 1 ? 12 : end.month - 1;
					const y = end.month === 1 ? end.year - 1 : end.year;
					return this.dateTimeHelper.daysInMonth(y, m) + end.day - start.day;
				}
				case "YD": if (end.month > start.month || end.month === start.month && end.day >= start.day) return Math.floor(endDate) - this.dateTimeHelper.dateToNumber({
					year: end.year,
					month: start.month,
					day: start.day
				});
				else return Math.floor(endDate) - Math.floor(startDate) - 365 * (end.year - start.year - 1) - this.dateTimeHelper.leapYearsCount(end.year - 1) + this.dateTimeHelper.leapYearsCount(start.year);
				default: return new CellError(ErrorType.NUM, ErrorMessage.BadMode);
			}
		});
	}
	days360(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("DAYS360"), this.days360Core);
	}
	yearfrac(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("YEARFRAC"), (startDate, endDate, mode) => {
			startDate = Math.trunc(startDate);
			endDate = Math.trunc(endDate);
			if (startDate > endDate) [startDate, endDate] = [endDate, startDate];
			switch (mode) {
				case 0: return this.days360Core(startDate, endDate, false) / 360;
				case 1: return (endDate - startDate) / this.dateTimeHelper.yearLengthForBasis(this.dateTimeHelper.numberToSimpleDate(startDate), this.dateTimeHelper.numberToSimpleDate(endDate));
				case 2: return (endDate - startDate) / 360;
				case 3: return (endDate - startDate) / 365;
				case 4: return this.days360Core(startDate, endDate, true) / 360;
			}
			throw new Error("Should not be reachable.");
		});
	}
	interval(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("INTERVAL"), (arg) => {
			arg = Math.trunc(arg);
			const second = arg % 60;
			arg = Math.trunc(arg / 60);
			const minute = arg % 60;
			arg = Math.trunc(arg / 60);
			const hour = arg % 24;
			arg = Math.trunc(arg / 24);
			const day = arg % 30;
			arg = Math.trunc(arg / 30);
			const month = arg % 12;
			const year = Math.trunc(arg / 12);
			return "P" + (year > 0 ? `${year}Y` : "") + (month > 0 ? `${month}M` : "") + (day > 0 ? `${day}D` : "") + "T" + (hour > 0 ? `${hour}H` : "") + (minute > 0 ? `${minute}M` : "") + (second > 0 ? `${second}S` : "");
		});
	}
	networkdays(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("NETWORKDAYS"), (start, end, holidays) => this.networkdayscore(start, end, 1, holidays));
	}
	networkdaysintl(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("NETWORKDAYS.INTL"), (start, end, weekend, holidays) => this.networkdayscore(start, end, weekend, holidays));
	}
	workday(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("WORKDAY"), (start, end, holidays) => this.workdaycore(start, end, 1, holidays));
	}
	workdayintl(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("WORKDAY.INTL"), (start, end, weekend, holidays) => this.workdaycore(start, end, weekend, holidays));
	}
	networkdayscore(start, end, weekend, holidays) {
		start = Math.trunc(start);
		end = Math.trunc(end);
		let multiplier = 1;
		if (start > end) {
			[start, end] = [end, start];
			multiplier = -1;
		}
		const weekendPattern = computeWeekendPattern(weekend);
		if (weekendPattern instanceof CellError) return weekendPattern;
		const filteredHolidays = this.simpleRangeToFilteredHolidays(weekendPattern, holidays);
		if (filteredHolidays instanceof CellError) return filteredHolidays;
		return multiplier * this.countWorkdays(start, end, weekendPattern, filteredHolidays);
	}
	workdaycore(start, delta, weekend, holidays) {
		start = Math.trunc(start);
		delta = Math.trunc(delta);
		const weekendPattern = computeWeekendPattern(weekend);
		if (weekendPattern instanceof CellError) return weekendPattern;
		const filteredHolidays = this.simpleRangeToFilteredHolidays(weekendPattern, holidays);
		if (filteredHolidays instanceof CellError) return filteredHolidays;
		if (delta > 0) {
			let upper = 1;
			while (this.countWorkdays(start + 1, start + upper, weekendPattern, filteredHolidays) < delta) upper *= 2;
			let lower = 1;
			while (lower + 1 < upper) {
				const mid = Math.trunc((lower + upper) / 2);
				if (this.countWorkdays(start + 1, start + mid, weekendPattern, filteredHolidays) < delta) lower = mid;
				else upper = mid;
			}
			return start + upper;
		} else if (delta < 0) {
			delta *= -1;
			let upper = 1;
			while (this.countWorkdays(start - upper, start - 1, weekendPattern, filteredHolidays) < delta) upper *= 2;
			let lower = 1;
			while (lower + 1 < upper) {
				const mid = Math.trunc((lower + upper) / 2);
				if (this.countWorkdays(start - mid, start - 1, weekendPattern, filteredHolidays) < delta) lower = mid;
				else upper = mid;
			}
			return start - upper;
		} else return start;
	}
	countWorkdays(start, end, weekendPattern, sortedHolidays) {
		const absoluteEnd = Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(end));
		const absoluteStart = Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(start));
		let ans = 0;
		for (let i = 0; i < 7; i++) if (weekendPattern.charAt(i) === "0") {
			ans += Math.floor((absoluteEnd + 6 - i) / 7);
			ans -= Math.floor((absoluteStart - 1 + 6 - i) / 7);
		}
		ans -= lowerBound(end + 1, sortedHolidays) - lowerBound(start, sortedHolidays);
		return ans;
	}
	simpleRangeToFilteredHolidays(weekendPattern, holidays) {
		var _a;
		const holidaysArr = (_a = holidays === null || holidays === void 0 ? void 0 : holidays.valuesFromTopLeftCorner()) !== null && _a !== void 0 ? _a : [];
		for (const val of holidaysArr) if (val instanceof CellError) return val;
		const processedHolidays = [];
		for (const val of holidaysArr) {
			if (val === EmptyValue) continue;
			if (isExtendedNumber(val)) processedHolidays.push(Math.trunc(getRawValue(val)));
			else return new CellError(ErrorType.VALUE, ErrorMessage.WrongType);
		}
		return [...new Set(processedHolidays)].sort((a, b) => a - b).filter((arg) => {
			const i = (this.dateTimeHelper.relativeNumberToAbsoluteNumber(arg) - 1) % 7;
			return weekendPattern.charAt(i) === "0";
		});
	}
};
DateTimePlugin.implementedFunctions = {
	"DATE": {
		method: "date",
		parameters: [
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER }
		],
		returnNumberType: NumberType.NUMBER_DATE
	},
	"TIME": {
		method: "time",
		parameters: [
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER }
		],
		returnNumberType: NumberType.NUMBER_TIME
	},
	"MONTH": {
		method: "month",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}]
	},
	"YEAR": {
		method: "year",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}]
	},
	"HOUR": {
		method: "hour",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}]
	},
	"MINUTE": {
		method: "minute",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}]
	},
	"SECOND": {
		method: "second",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}]
	},
	"TEXT": {
		method: "text",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, { argumentType: FunctionArgumentType.STRING }]
	},
	"EOMONTH": {
		method: "eomonth",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}, { argumentType: FunctionArgumentType.NUMBER }],
		returnNumberType: NumberType.NUMBER_DATE
	},
	"DAY": {
		method: "day",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}]
	},
	"DAYS": {
		method: "days",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}, {
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}]
	},
	"WEEKDAY": {
		method: "weekday",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}, {
			argumentType: FunctionArgumentType.NUMBER,
			defaultValue: 1
		}]
	},
	"WEEKNUM": {
		method: "weeknum",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}, {
			argumentType: FunctionArgumentType.NUMBER,
			defaultValue: 1
		}]
	},
	"ISOWEEKNUM": {
		method: "isoweeknum",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}]
	},
	"DATEVALUE": {
		method: "datevalue",
		parameters: [{ argumentType: FunctionArgumentType.STRING }],
		returnNumberType: NumberType.NUMBER_DATE
	},
	"TIMEVALUE": {
		method: "timevalue",
		parameters: [{ argumentType: FunctionArgumentType.STRING }],
		returnNumberType: NumberType.NUMBER_TIME
	},
	"NOW": {
		method: "now",
		parameters: [],
		isVolatile: true,
		returnNumberType: NumberType.NUMBER_DATETIME
	},
	"TODAY": {
		method: "today",
		parameters: [],
		isVolatile: true,
		returnNumberType: NumberType.NUMBER_DATE
	},
	"EDATE": {
		method: "edate",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}, { argumentType: FunctionArgumentType.NUMBER }],
		returnNumberType: NumberType.NUMBER_DATE
	},
	"DAYS360": {
		method: "days360",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.BOOLEAN,
				defaultValue: false
			}
		]
	},
	"DATEDIF": {
		method: "datedif",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{ argumentType: FunctionArgumentType.STRING }
		]
	},
	"YEARFRAC": {
		method: "yearfrac",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.INTEGER,
				defaultValue: 0,
				minValue: 0,
				maxValue: 4
			}
		]
	},
	"INTERVAL": {
		method: "interval",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}]
	},
	"NETWORKDAYS": {
		method: "networkdays",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.RANGE,
				optionalArg: true
			}
		]
	},
	"NETWORKDAYS.INTL": {
		method: "networkdaysintl",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NOERROR,
				defaultValue: 1
			},
			{
				argumentType: FunctionArgumentType.RANGE,
				optionalArg: true
			}
		]
	},
	"WORKDAY": {
		method: "workday",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.RANGE,
				optionalArg: true
			}
		]
	},
	"WORKDAY.INTL": {
		method: "workdayintl",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.NOERROR,
				defaultValue: 1
			},
			{
				argumentType: FunctionArgumentType.RANGE,
				optionalArg: true
			}
		]
	}
};
/**
* Returns i such that:
* sortedArray[i-1] < val <= sortedArray[i]
*
*/
function lowerBound(val, sortedArray) {
	if (sortedArray.length === 0) return 0;
	if (val <= sortedArray[0]) return 0;
	if (sortedArray[sortedArray.length - 1] < val) return sortedArray.length;
	let lower = 0;
	let upper = sortedArray.length - 1;
	while (lower + 1 < upper) {
		const mid = Math.floor((upper + lower) / 2);
		if (sortedArray[mid] >= val) upper = mid;
		else lower = mid;
	}
	return upper;
}
function computeWeekendPattern(weekend) {
	var _a;
	if (typeof weekend !== "number" && typeof weekend !== "string") return new CellError(ErrorType.VALUE, ErrorMessage.WrongType);
	if (typeof weekend === "string") if (weekend.length !== 7 || !/^(0|1)*$/.test(weekend) || weekend === "1111111") return new CellError(ErrorType.NUM, ErrorMessage.WeekendString);
	else return weekend;
	else return (_a = workdayPatterns.get(weekend)) !== null && _a !== void 0 ? _a : new CellError(ErrorType.NUM, ErrorMessage.BadMode);
}
var weekdayOffsets = new Map([
	[1, 0],
	[2, 1],
	[11, 1],
	[12, 2],
	[13, 3],
	[14, 4],
	[15, 5],
	[16, 6],
	[17, 0]
]);
var workdayPatterns = new Map([
	[1, "0000011"],
	[2, "1000001"],
	[3, "1100000"],
	[4, "0110000"],
	[5, "0011000"],
	[6, "0001100"],
	[7, "0000110"],
	[11, "0000001"],
	[12, "1000000"],
	[13, "0100000"],
	[14, "0010000"],
	[15, "0001000"],
	[16, "0000100"],
	[17, "0000010"]
]);
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/DegreesPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var DegreesPlugin = class extends FunctionPlugin {
	degrees(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("DEGREES"), (arg) => arg * (180 / Math.PI));
	}
};
DegreesPlugin.implementedFunctions = { "DEGREES": {
	method: "degrees",
	parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
} };
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/DeltaPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var DeltaPlugin = class extends FunctionPlugin {
	delta(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("DELTA"), (left, right) => left === right ? 1 : 0);
	}
};
DeltaPlugin.implementedFunctions = { "DELTA": {
	method: "delta",
	parameters: [{ argumentType: FunctionArgumentType.NUMBER }, {
		argumentType: FunctionArgumentType.NUMBER,
		defaultValue: 0
	}]
} };
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/ExpPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var ExpPlugin = class extends FunctionPlugin {
	/**
	* Corresponds to EXP(value)
	*
	* Calculates the exponent for basis e
	*
	* @param ast
	* @param state
	*/
	exp(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("EXP"), Math.exp);
	}
};
ExpPlugin.implementedFunctions = { "EXP": {
	method: "exp",
	parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
} };
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/FinancialPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var FinancialPlugin = class extends FunctionPlugin {
	pmt(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("PMT"), pmtCore);
	}
	ipmt(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IPMT"), ipmtCore);
	}
	ppmt(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("PPMT"), ppmtCore);
	}
	fv(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("FV"), fvCore);
	}
	cumipmt(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("CUMIPMT"), (rate, periods, value, start, end, type) => {
			if (start > end) return new CellError(ErrorType.NUM, ErrorMessage.EndStartPeriod);
			let acc = 0;
			for (let i = start; i <= end; i++) acc += ipmtCore(rate, i, periods, value, 0, type);
			return acc;
		});
	}
	cumprinc(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("CUMPRINC"), (rate, periods, value, start, end, type) => {
			if (start > end) return new CellError(ErrorType.NUM, ErrorMessage.EndStartPeriod);
			let acc = 0;
			for (let i = start; i <= end; i++) acc += ppmtCore(rate, i, periods, value, 0, type);
			return acc;
		});
	}
	db(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("DB"), (cost, salvage, life, period, month) => {
			if (month === 12 && period > life || period > life + 1) return new CellError(ErrorType.NUM, ErrorMessage.PeriodLong);
			if (salvage >= cost) return 0;
			const rate = Math.round((1 - Math.pow(salvage / cost, 1 / life)) * 1e3) / 1e3;
			const initial = cost * rate * month / 12;
			if (period === 1) return initial;
			let total = initial;
			for (let i = 0; i < period - 2; i++) total += (cost - total) * rate;
			if (period === life + 1) return (cost - total) * rate * (12 - month) / 12;
			return (cost - total) * rate;
		});
	}
	ddb(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("DDB"), (cost, salvage, life, period, factor) => {
			if (period > life) return new CellError(ErrorType.NUM);
			let rate = factor / life;
			let oldValue;
			if (rate >= 1) {
				rate = 1;
				if (period === 1) oldValue = cost;
				else oldValue = 0;
			} else oldValue = cost * Math.pow(1 - rate, period - 1);
			const newValue = cost * Math.pow(1 - rate, period);
			return Math.max(oldValue - Math.max(salvage, newValue), 0);
		});
	}
	dollarde(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("DOLLARDE"), (dollar, fraction) => {
			if (fraction < 1) return new CellError(ErrorType.DIV_BY_ZERO);
			fraction = Math.trunc(fraction);
			while (fraction > 10) fraction /= 10;
			return Math.trunc(dollar) + (dollar - Math.trunc(dollar)) * 10 / fraction;
		});
	}
	dollarfr(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("DOLLARFR"), (dollar, fraction) => {
			if (fraction < 1) return new CellError(ErrorType.DIV_BY_ZERO);
			fraction = Math.trunc(fraction);
			while (fraction > 10) fraction /= 10;
			return Math.trunc(dollar) + (dollar - Math.trunc(dollar)) * fraction / 10;
		});
	}
	effect(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("EFFECT"), (rate, periods) => {
			periods = Math.trunc(periods);
			return Math.pow(1 + rate / periods, periods) - 1;
		});
	}
	ispmt(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ISPMT"), (rate, period, periods, value) => {
			if (periods === 0) return new CellError(ErrorType.DIV_BY_ZERO);
			return value * rate * (period / periods - 1);
		});
	}
	nominal(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("NOMINAL"), (rate, periods) => {
			periods = Math.trunc(periods);
			return (Math.pow(rate + 1, 1 / periods) - 1) * periods;
		});
	}
	nper(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("NPER"), (rate, payment, present, future, type) => {
			if (rate === 0) {
				if (payment === 0) return new CellError(ErrorType.DIV_BY_ZERO);
				return (-present - future) / payment;
			}
			if (type) payment *= 1 + rate;
			return Math.log((payment - future * rate) / (present * rate + payment)) / Math.log(1 + rate);
		});
	}
	rate(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("RATE"), (periods, payment, present, future, type, guess) => {
			if (guess <= -1) return new CellError(ErrorType.VALUE);
			const epsMax = 1e-7;
			const iterMax = 50;
			let rate = guess;
			type = type ? 1 : 0;
			for (let i = 0; i < iterMax; i++) {
				if (rate <= -1) return new CellError(ErrorType.NUM);
				let y;
				if (Math.abs(rate) < epsMax) y = present * (1 + periods * rate) + payment * (1 + rate * type) * periods + future;
				else {
					const f = Math.pow(1 + rate, periods);
					y = present * f + payment * (1 / rate + type) * (f - 1) + future;
				}
				if (Math.abs(y) < epsMax) return rate;
				let dy;
				if (Math.abs(rate) < epsMax) dy = present * periods + payment * type * periods;
				else {
					const f = Math.pow(1 + rate, periods);
					const df = periods * Math.pow(1 + rate, periods - 1);
					dy = present * df + payment * (1 / rate + type) * df + payment * (-1 / (rate * rate)) * (f - 1);
				}
				rate -= y / dy;
			}
			return new CellError(ErrorType.NUM);
		});
	}
	pv(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("PV"), (rate, periods, payment, future, type) => {
			type = type ? 1 : 0;
			if (rate === -1) if (periods === 0) return new CellError(ErrorType.NUM);
			else return new CellError(ErrorType.DIV_BY_ZERO);
			if (rate === 0) return -payment * periods - future;
			else return ((1 - Math.pow(1 + rate, periods)) * payment * (1 + rate * type) / rate - future) / Math.pow(1 + rate, periods);
		});
	}
	rri(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("RRI"), (periods, present, future) => {
			if (present === 0 || future < 0 && present > 0 || future > 0 && present < 0) return new CellError(ErrorType.NUM);
			return Math.pow(future / present, 1 / periods) - 1;
		});
	}
	sln(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("SLN"), (cost, salvage, life) => {
			if (life === 0) return new CellError(ErrorType.DIV_BY_ZERO);
			return (cost - salvage) / life;
		});
	}
	syd(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("SYD"), (cost, salvage, life, period) => {
			if (period > life) return new CellError(ErrorType.NUM);
			return (cost - salvage) * (life - period + 1) * 2 / (life * (life + 1));
		});
	}
	tbilleq(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("TBILLEQ"), (settlement, maturity, discount) => {
			settlement = Math.round(settlement);
			maturity = Math.round(maturity);
			if (settlement >= maturity) return new CellError(ErrorType.NUM);
			const startDate = this.dateTimeHelper.numberToSimpleDate(settlement);
			const endDate = this.dateTimeHelper.numberToSimpleDate(maturity);
			if (endDate.year > startDate.year + 1 || endDate.year === startDate.year + 1 && (endDate.month > startDate.month || endDate.month === startDate.month && endDate.day > startDate.day)) return new CellError(ErrorType.NUM);
			const denom = 360 - discount * (maturity - settlement);
			if (denom === 0) return 0;
			if (denom < 0) return new CellError(ErrorType.NUM);
			return 365 * discount / denom;
		});
	}
	tbillprice(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("TBILLPRICE"), (settlement, maturity, discount) => {
			settlement = Math.round(settlement);
			maturity = Math.round(maturity);
			if (settlement >= maturity) return new CellError(ErrorType.NUM);
			const startDate = this.dateTimeHelper.numberToSimpleDate(settlement);
			const endDate = this.dateTimeHelper.numberToSimpleDate(maturity);
			if (endDate.year > startDate.year + 1 || endDate.year === startDate.year + 1 && (endDate.month > startDate.month || endDate.month === startDate.month && endDate.day > startDate.day)) return new CellError(ErrorType.NUM);
			const denom = 360 - discount * (maturity - settlement);
			if (denom === 0) return 0;
			if (denom < 0) return new CellError(ErrorType.NUM);
			return 100 * (1 - discount * (maturity - settlement) / 360);
		});
	}
	tbillyield(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("TBILLYIELD"), (settlement, maturity, price) => {
			settlement = Math.round(settlement);
			maturity = Math.round(maturity);
			if (settlement >= maturity) return new CellError(ErrorType.NUM);
			const startDate = this.dateTimeHelper.numberToSimpleDate(settlement);
			const endDate = this.dateTimeHelper.numberToSimpleDate(maturity);
			if (endDate.year > startDate.year + 1 || endDate.year === startDate.year + 1 && (endDate.month > startDate.month || endDate.month === startDate.month && endDate.day > startDate.day)) return new CellError(ErrorType.NUM);
			return (100 - price) * 360 / (price * (maturity - settlement));
		});
	}
	fvschedule(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("FVSCHEDULE"), (value, ratios) => {
			const vals = ratios.valuesFromTopLeftCorner();
			for (const val of vals) if (val instanceof CellError) return val;
			for (const val of vals) if (isExtendedNumber(val)) value *= 1 + getRawValue(val);
			else if (val !== EmptyValue) return new CellError(ErrorType.VALUE, ErrorMessage.NumberExpected);
			return value;
		});
	}
	npv(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("NPV"), (rate, ...args) => {
			const coerced = this.arithmeticHelper.coerceNumbersExactRanges(args);
			if (coerced instanceof CellError) return coerced;
			return npvCore(rate, coerced);
		});
	}
	mirr(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("MIRR"), (range, frate, rrate) => {
			const vals = this.arithmeticHelper.manyToExactNumbers(range.valuesFromTopLeftCorner());
			if (vals instanceof CellError) return vals;
			let posFlag = false;
			let negFlag = false;
			const posValues = [];
			const negValues = [];
			for (const val of vals) if (val > 0) {
				posFlag = true;
				posValues.push(val);
				negValues.push(0);
			} else if (val < 0) {
				negFlag = true;
				negValues.push(val);
				posValues.push(0);
			} else {
				negValues.push(0);
				posValues.push(0);
			}
			if (!posFlag || !negFlag) return new CellError(ErrorType.DIV_BY_ZERO);
			const n = vals.length;
			const nom = npvCore(rrate, posValues);
			if (nom instanceof CellError) return nom;
			const denom = npvCore(frate, negValues);
			if (denom instanceof CellError) return denom;
			return Math.pow(-nom * Math.pow(1 + rrate, n) / denom / (1 + frate), 1 / (n - 1)) - 1;
		});
	}
	pduration(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("PDURATION"), (rate, pv, fv) => (Math.log(fv) - Math.log(pv)) / Math.log(1 + rate));
	}
	xnpv(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("XNPV"), (rate, values, dates) => {
			const valArr = values.valuesFromTopLeftCorner();
			for (const val of valArr) if (typeof val !== "number") return new CellError(ErrorType.VALUE, ErrorMessage.NumberExpected);
			const valArrNum = valArr;
			const dateArr = dates.valuesFromTopLeftCorner();
			for (const date of dateArr) if (typeof date !== "number") return new CellError(ErrorType.VALUE, ErrorMessage.NumberExpected);
			const dateArrNum = dateArr;
			if (dateArrNum.length !== valArrNum.length) return new CellError(ErrorType.NUM, ErrorMessage.EqualLength);
			const n = dateArrNum.length;
			let ret = 0;
			if (dateArrNum[0] < 0) return new CellError(ErrorType.NUM, ErrorMessage.ValueSmall);
			for (let i = 0; i < n; i++) {
				dateArrNum[i] = Math.floor(dateArrNum[i]);
				if (dateArrNum[i] < dateArrNum[0]) return new CellError(ErrorType.NUM, ErrorMessage.ValueSmall);
				ret += valArrNum[i] / Math.pow(1 + rate, (dateArrNum[i] - dateArrNum[0]) / 365);
			}
			return ret;
		});
	}
	/**
	* Calculates the internal rate of return for a series of cash flows.
	* @param {ProcedureAst} ast - The AST node representing the function call.
	* @param {InterpreterState} state - The interpreter state.
	* @returns {InterpreterValue} The internal rate of return.
	*/
	irr(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IRR"), (range, guess) => {
			if (guess <= -1) return new CellError(ErrorType.VALUE);
			const vals = this.arithmeticHelper.manyToExactNumbers(range.valuesFromTopLeftCorner());
			if (vals instanceof CellError) return vals;
			const hasPositive = vals.some((val) => val > 0);
			const hasNegative = vals.some((val) => val < 0);
			if (!hasPositive || !hasNegative) return new CellError(ErrorType.NUM);
			return irrCore(vals, guess);
		});
	}
};
FinancialPlugin.implementedFunctions = {
	"PMT": {
		method: "pmt",
		parameters: [
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 0
			}
		],
		returnNumberType: NumberType.NUMBER_CURRENCY
	},
	"IPMT": {
		method: "ipmt",
		parameters: [
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 0
			}
		],
		returnNumberType: NumberType.NUMBER_CURRENCY
	},
	"PPMT": {
		method: "ppmt",
		parameters: [
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 0
			}
		],
		returnNumberType: NumberType.NUMBER_CURRENCY
	},
	"FV": {
		method: "fv",
		parameters: [
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 0
			}
		],
		returnNumberType: NumberType.NUMBER_CURRENCY
	},
	"CUMIPMT": {
		method: "cumipmt",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{
				argumentType: FunctionArgumentType.INTEGER,
				minValue: 1
			},
			{
				argumentType: FunctionArgumentType.INTEGER,
				minValue: 1
			},
			{
				argumentType: FunctionArgumentType.INTEGER,
				minValue: 0,
				maxValue: 1
			}
		],
		returnNumberType: NumberType.NUMBER_CURRENCY
	},
	"CUMPRINC": {
		method: "cumprinc",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{
				argumentType: FunctionArgumentType.INTEGER,
				minValue: 1
			},
			{
				argumentType: FunctionArgumentType.INTEGER,
				minValue: 1
			},
			{
				argumentType: FunctionArgumentType.INTEGER,
				minValue: 0,
				maxValue: 1
			}
		],
		returnNumberType: NumberType.NUMBER_CURRENCY
	},
	"DB": {
		method: "db",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.INTEGER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.INTEGER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.INTEGER,
				minValue: 1,
				maxValue: 12,
				defaultValue: 12
			}
		],
		returnNumberType: NumberType.NUMBER_CURRENCY
	},
	"DDB": {
		method: "ddb",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.INTEGER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0,
				defaultValue: 2
			}
		],
		returnNumberType: NumberType.NUMBER_CURRENCY
	},
	"DOLLARDE": {
		method: "dollarde",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, {
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}]
	},
	"DOLLARFR": {
		method: "dollarfr",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, {
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}]
	},
	"EFFECT": {
		method: "effect",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}, {
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 1
		}],
		returnNumberType: NumberType.NUMBER_PERCENT
	},
	"ISPMT": {
		method: "ispmt",
		parameters: [
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER }
		]
	},
	"NOMINAL": {
		method: "nominal",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}, {
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 1
		}],
		returnNumberType: NumberType.NUMBER_PERCENT
	},
	"NPER": {
		method: "nper",
		parameters: [
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 0
			}
		]
	},
	"PV": {
		method: "pv",
		parameters: [
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 0
			}
		],
		returnNumberType: NumberType.NUMBER_CURRENCY
	},
	"RATE": {
		method: "rate",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: .1
			}
		],
		returnNumberType: NumberType.NUMBER_PERCENT
	},
	"RRI": {
		method: "rri",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER }
		],
		returnNumberType: NumberType.NUMBER_PERCENT
	},
	"SLN": {
		method: "sln",
		parameters: [
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER }
		],
		returnNumberType: NumberType.NUMBER_CURRENCY
	},
	"SYD": {
		method: "syd",
		parameters: [
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			}
		],
		returnNumberType: NumberType.NUMBER_CURRENCY
	},
	"TBILLEQ": {
		method: "tbilleq",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			}
		],
		returnNumberType: NumberType.NUMBER_PERCENT
	},
	"TBILLPRICE": {
		method: "tbillprice",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			}
		],
		returnNumberType: NumberType.NUMBER_CURRENCY
	},
	"TBILLYIELD": {
		method: "tbillyield",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			}
		],
		returnNumberType: NumberType.NUMBER_PERCENT
	},
	"FVSCHEDULE": {
		method: "fvschedule",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, { argumentType: FunctionArgumentType.RANGE }],
		returnNumberType: NumberType.NUMBER_CURRENCY
	},
	"NPV": {
		method: "npv",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, { argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1,
		returnNumberType: NumberType.NUMBER_CURRENCY
	},
	"MIRR": {
		method: "mirr",
		parameters: [
			{ argumentType: FunctionArgumentType.RANGE },
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER }
		],
		returnNumberType: NumberType.NUMBER_PERCENT
	},
	"PDURATION": {
		method: "pduration",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			}
		]
	},
	"XNPV": {
		method: "xnpv",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: -1
			},
			{ argumentType: FunctionArgumentType.RANGE },
			{ argumentType: FunctionArgumentType.RANGE }
		]
	},
	"IRR": {
		method: "irr",
		parameters: [{ argumentType: FunctionArgumentType.RANGE }, {
			argumentType: FunctionArgumentType.NUMBER,
			defaultValue: .1
		}],
		returnNumberType: NumberType.NUMBER_PERCENT
	}
};
function pmtCore(rate, periods, present, future, type) {
	if (rate === 0) return (-present - future) / periods;
	else {
		const term = Math.pow(1 + rate, periods);
		return (future * rate + present * rate * term) * (type ? 1 / (1 + rate) : 1) / (1 - term);
	}
}
function ipmtCore(rate, period, periods, present, future, type) {
	const payment = pmtCore(rate, periods, present, future, type);
	if (period === 1) return rate * (type ? 0 : -present);
	else return rate * (type ? fvCore(rate, period - 2, payment, present, type) - payment : fvCore(rate, period - 1, payment, present, type));
}
function fvCore(rate, periods, payment, value, type) {
	if (rate === 0) return -value - payment * periods;
	else {
		const term = Math.pow(1 + rate, periods);
		return payment * (type ? 1 + rate : 1) * (1 - term) / rate - value * term;
	}
}
function ppmtCore(rate, period, periods, present, future, type) {
	return pmtCore(rate, periods, present, future, type) - ipmtCore(rate, period, periods, present, future, type);
}
function npvCore(rate, args) {
	let acc = 0;
	for (let i = args.length - 1; i >= 0; i--) {
		acc += args[i];
		if (rate === -1) if (acc === 0) continue;
		else return new CellError(ErrorType.DIV_BY_ZERO);
		acc /= 1 + rate;
	}
	return acc;
}
/**
* Calculates IRR using Newton-Raphson method.
* IRR is the rate r where: CF0 + CF1/(1+r) + CF2/(1+r)^2 + ... + CFn/(1+r)^n = 0
*/
function irrCore(values, guess) {
	const epsMax = 1e-10;
	const iterMax = 50;
	let rate = guess;
	for (let iter = 0; iter < iterMax; iter++) {
		let npv = 0;
		let dnpv = 0;
		for (let i = 0; i < values.length; i++) {
			const factor = Math.pow(1 + rate, i);
			if (!isFinite(factor) || factor === 0) return new CellError(ErrorType.NUM);
			npv += values[i] / factor;
			if (i > 0) dnpv -= i * values[i] / (factor * (1 + rate));
		}
		if (Math.abs(npv) < epsMax) return rate;
		if (Math.abs(dnpv) < epsMax) return new CellError(ErrorType.NUM);
		const newRate = rate - npv / dnpv;
		if (Math.abs(newRate - rate) < epsMax) return newRate;
		rate = newRate;
		if (!isFinite(rate) || rate <= -1) return new CellError(ErrorType.NUM);
	}
	return new CellError(ErrorType.NUM);
}
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/FormulaTextPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var FormulaTextPlugin = class extends FunctionPlugin {
	/**
	* Corresponds to FORMULATEXT(value)
	*
	* Returns a formula in a given cell as a string.
	*
	* @param ast
	* @param state
	*/
	formulatext(ast, state) {
		return this.runFunctionWithReferenceArgument(ast.args, state, this.metadata("FORMULATEXT"), () => new CellError(ErrorType.NA, ErrorMessage.WrongArgNumber), (cellReference) => {
			var _a;
			return (_a = this.serialization.getCellFormula(cellReference)) !== null && _a !== void 0 ? _a : new CellError(ErrorType.NA, ErrorMessage.Formula);
		});
	}
};
FormulaTextPlugin.implementedFunctions = { "FORMULATEXT": {
	method: "formulatext",
	parameters: [{ argumentType: FunctionArgumentType.NOERROR }],
	doesNotNeedArgumentsToBeComputed: true,
	isDependentOnSheetStructureChange: true,
	vectorizationForbidden: true
} };
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/HyperlinkPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var HyperlinkPlugin = class extends FunctionPlugin {
	hyperlink(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("HYPERLINK"), (url, linkLabel) => {
			ast.hyperlink = url;
			return linkLabel !== null && linkLabel !== void 0 ? linkLabel : url;
		});
	}
};
HyperlinkPlugin.implementedFunctions = { "HYPERLINK": {
	method: "hyperlink",
	parameters: [{ argumentType: FunctionArgumentType.STRING }, {
		argumentType: FunctionArgumentType.STRING,
		optionalArg: true
	}]
} };
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/InformationPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Interpreter plugin containing information functions
*/
var InformationPlugin = class extends FunctionPlugin {
	/**
	* Corresponds to ISBINARY(value)
	*
	* Returns true if provided value is a valid binary number
	*
	* @param ast
	* @param state
	*/
	isbinary(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ISBINARY"), (arg) => /^[01]{1,10}$/.test(arg));
	}
	/**
	* Corresponds to ISERR(value)
	*
	* Returns true if provided value is an error except #N/A!
	*
	* @param ast
	* @param state
	*/
	iserr(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ISERR"), (arg) => arg instanceof CellError && arg.type !== ErrorType.NA);
	}
	/**
	* Corresponds to ISERROR(value)
	*
	* Checks whether provided value is an error
	*
	* @param ast
	* @param state
	*/
	iserror(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ISERROR"), (arg) => arg instanceof CellError);
	}
	/**
	* Corresponds to ISFORMULA(value)
	*
	* Checks whether referenced cell is a formula
	*
	* @param ast
	* @param state
	*/
	isformula(ast, state) {
		return this.runFunctionWithReferenceArgument(ast.args, state, this.metadata("ISFORMULA"), () => new CellError(ErrorType.NA, ErrorMessage.WrongArgNumber), (reference) => {
			return this.dependencyGraph.addressMapping.getCell(reference) instanceof FormulaVertex;
		});
	}
	/**
	* Corresponds to ISBLANK(value)
	*
	* Checks whether provided cell reference is empty
	*
	* @param ast
	* @param state
	*/
	isblank(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ISBLANK"), (arg) => arg === EmptyValue);
	}
	/**
	* Corresponds to ISNA(value)
	*
	* Returns true if provided value is #N/A! error
	*
	* @param ast
	* @param state
	*/
	isna(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ISNA"), (arg) => arg instanceof CellError && arg.type == ErrorType.NA);
	}
	/**
	* Corresponds to ISNUMBER(value)
	*
	* Checks whether provided cell reference is a number
	*
	* @param ast
	* @param state
	*/
	isnumber(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ISNUMBER"), isExtendedNumber);
	}
	/**
	* Corresponds to ISLOGICAL(value)
	*
	* Checks whether provided cell reference is of logical type
	*
	* @param ast
	* @param state
	*/
	islogical(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ISLOGICAL"), (arg) => typeof arg === "boolean");
	}
	/**
	* Corresponds to ISREF(value)
	*
	* Returns true if provided value is #REF! error
	*
	* @param ast
	* @param state
	*/
	isref(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ISREF"), (arg) => arg instanceof CellError && (arg.type == ErrorType.REF || arg.type == ErrorType.CYCLE));
	}
	/**
	* Corresponds to ISTEXT(value)
	*
	* Checks whether provided cell reference is of logical type
	*
	* @param ast
	* @param state
	*/
	istext(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ISTEXT"), (arg) => typeof arg === "string");
	}
	/**
	* Corresponds to ISNONTEXT(value)
	*
	* Checks whether provided cell reference is of logical type
	*
	* @param ast
	* @param state
	*/
	isnontext(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ISNONTEXT"), (arg) => !(typeof arg === "string"));
	}
	/**
	* Corresponds to COLUMN(reference)
	*
	* Returns column number of a reference or a formula cell if reference not provided
	*
	* @param ast
	* @param state
	*/
	column(ast, state) {
		return this.runFunctionWithReferenceArgument(ast.args, state, this.metadata("COLUMN"), () => state.formulaAddress.col + 1, (reference) => reference.col + 1);
	}
	/**
	* Corresponds to COLUMNS(range)
	*
	* Returns number of columns in provided range of cells
	*
	* @param ast
	* @param state
	*/
	columns(ast, state) {
		if (ast.args.length !== 1) return new CellError(ErrorType.NA, ErrorMessage.WrongArgNumber);
		if (ast.args.some((astIt) => astIt.type === AstNodeType.EMPTY)) return new CellError(ErrorType.NUM, ErrorMessage.EmptyArg);
		let argAst = ast.args[0];
		while (argAst.type === AstNodeType.PARENTHESIS) argAst = argAst.expression;
		if (argAst.type === AstNodeType.CELL_RANGE || argAst.type === AstNodeType.COLUMN_RANGE) return argAst.end.col - argAst.start.col + 1;
		else if (argAst.type === AstNodeType.CELL_REFERENCE) return 1;
		else if (argAst.type === AstNodeType.ROW_RANGE) return this.config.maxColumns;
		else {
			const val = this.evaluateAst(argAst, state);
			if (val instanceof SimpleRangeValue) return val.width();
			else if (val instanceof CellError) return val;
			else return 1;
		}
	}
	/**
	* Corresponds to ROW(reference)
	*
	* Returns row number of a reference or a formula cell if reference not provided
	*
	* @param ast
	* @param state
	*/
	row(ast, state) {
		return this.runFunctionWithReferenceArgument(ast.args, state, this.metadata("ROW"), () => state.formulaAddress.row + 1, (reference) => reference.row + 1);
	}
	/**
	* Corresponds to ROWS(range)
	*
	* Returns number of rows in provided range of cells
	*
	* @param ast
	* @param state
	*/
	rows(ast, state) {
		if (ast.args.length !== 1) return new CellError(ErrorType.NA, ErrorMessage.WrongArgNumber);
		if (ast.args.some((astIt) => astIt.type === AstNodeType.EMPTY)) return new CellError(ErrorType.NUM, ErrorMessage.EmptyArg);
		let argAst = ast.args[0];
		while (argAst.type === AstNodeType.PARENTHESIS) argAst = argAst.expression;
		if (argAst.type === AstNodeType.CELL_RANGE || argAst.type === AstNodeType.ROW_RANGE) return argAst.end.row - argAst.start.row + 1;
		else if (argAst.type === AstNodeType.CELL_REFERENCE) return 1;
		else if (argAst.type === AstNodeType.COLUMN_RANGE) return this.config.maxRows;
		else {
			const val = this.evaluateAst(argAst, state);
			if (val instanceof SimpleRangeValue) return val.height();
			else if (val instanceof CellError) return val;
			else return 1;
		}
	}
	/**
	* Corresponds to INDEX
	*
	* Returns specific position in 2d array.
	*
	* @param ast
	* @param state
	*/
	index(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("INDEX"), (rangeValue, row, col) => {
			var _a, _b, _c, _d, _e, _f;
			if (col < 1 || row < 1) return new CellError(ErrorType.VALUE, ErrorMessage.LessThanOne);
			if (col > rangeValue.width() || row > rangeValue.height()) return new CellError(ErrorType.NUM, ErrorMessage.ValueLarge);
			return (_f = (_c = (_b = (_a = rangeValue === null || rangeValue === void 0 ? void 0 : rangeValue.data) === null || _a === void 0 ? void 0 : _a[row - 1]) === null || _b === void 0 ? void 0 : _b[col - 1]) !== null && _c !== void 0 ? _c : (_e = (_d = rangeValue === null || rangeValue === void 0 ? void 0 : rangeValue.data) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e[0]) !== null && _f !== void 0 ? _f : new CellError(ErrorType.VALUE, ErrorMessage.CellRangeExpected);
		});
	}
	/**
	* Corresponds to NA()
	*
	* Returns #N/A!
	*
	* @param _ast
	* @param _state
	*/
	na(_ast, _state) {
		return new CellError(ErrorType.NA);
	}
	/**
	* Corresponds to SHEET(value)
	*
	* Returns sheet number of a given value or a formula sheet number if no argument is provided
	*
	* @param ast
	* @param state
	*/
	sheet(ast, state) {
		return this.runFunctionWithReferenceArgument(ast.args, state, this.metadata("SHEET"), () => state.formulaAddress.sheet + 1, (reference) => reference.sheet + 1, (value) => {
			const sheetNumber = this.dependencyGraph.sheetMapping.getSheetId(value);
			if (sheetNumber !== void 0) return sheetNumber + 1;
			else return new CellError(ErrorType.NA, ErrorMessage.SheetRef);
		});
	}
	/**
	* Corresponds to SHEETS(value)
	*
	* Returns number of sheet of a given reference or number of all sheets in workbook when no argument is provided.
	* It returns always 1 for a valid reference as 3D references are not supported.
	*
	* @param ast
	* @param state
	*/
	sheets(ast, state) {
		return this.runFunctionWithReferenceArgument(ast.args, state, this.metadata("SHEETS"), () => this.dependencyGraph.sheetMapping.numberOfSheets(), () => 1, () => new CellError(ErrorType.VALUE, ErrorMessage.CellRefExpected));
	}
};
InformationPlugin.implementedFunctions = {
	"COLUMN": {
		method: "column",
		parameters: [{
			argumentType: FunctionArgumentType.NOERROR,
			optionalArg: true
		}],
		isDependentOnSheetStructureChange: true,
		doesNotNeedArgumentsToBeComputed: true,
		vectorizationForbidden: true
	},
	"COLUMNS": {
		method: "columns",
		parameters: [{ argumentType: FunctionArgumentType.RANGE }],
		isDependentOnSheetStructureChange: true,
		doesNotNeedArgumentsToBeComputed: true,
		vectorizationForbidden: true
	},
	"ISBINARY": {
		method: "isbinary",
		parameters: [{ argumentType: FunctionArgumentType.STRING }]
	},
	"ISERR": {
		method: "iserr",
		parameters: [{ argumentType: FunctionArgumentType.SCALAR }]
	},
	"ISFORMULA": {
		method: "isformula",
		parameters: [{ argumentType: FunctionArgumentType.NOERROR }],
		doesNotNeedArgumentsToBeComputed: true,
		vectorizationForbidden: true
	},
	"ISNA": {
		method: "isna",
		parameters: [{ argumentType: FunctionArgumentType.SCALAR }]
	},
	"ISREF": {
		method: "isref",
		parameters: [{ argumentType: FunctionArgumentType.SCALAR }],
		vectorizationForbidden: true
	},
	"ISERROR": {
		method: "iserror",
		parameters: [{ argumentType: FunctionArgumentType.SCALAR }]
	},
	"ISBLANK": {
		method: "isblank",
		parameters: [{ argumentType: FunctionArgumentType.SCALAR }]
	},
	"ISNUMBER": {
		method: "isnumber",
		parameters: [{ argumentType: FunctionArgumentType.SCALAR }]
	},
	"ISLOGICAL": {
		method: "islogical",
		parameters: [{ argumentType: FunctionArgumentType.SCALAR }]
	},
	"ISTEXT": {
		method: "istext",
		parameters: [{ argumentType: FunctionArgumentType.SCALAR }]
	},
	"ISNONTEXT": {
		method: "isnontext",
		parameters: [{ argumentType: FunctionArgumentType.SCALAR }]
	},
	"INDEX": {
		method: "index",
		parameters: [
			{ argumentType: FunctionArgumentType.RANGE },
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 1
			}
		]
	},
	"NA": {
		method: "na",
		parameters: []
	},
	"ROW": {
		method: "row",
		parameters: [{
			argumentType: FunctionArgumentType.NOERROR,
			optionalArg: true
		}],
		isDependentOnSheetStructureChange: true,
		doesNotNeedArgumentsToBeComputed: true,
		vectorizationForbidden: true
	},
	"ROWS": {
		method: "rows",
		parameters: [{ argumentType: FunctionArgumentType.RANGE }],
		isDependentOnSheetStructureChange: true,
		doesNotNeedArgumentsToBeComputed: true,
		vectorizationForbidden: true
	},
	"SHEET": {
		method: "sheet",
		parameters: [{ argumentType: FunctionArgumentType.STRING }],
		doesNotNeedArgumentsToBeComputed: true,
		vectorizationForbidden: true
	},
	"SHEETS": {
		method: "sheets",
		parameters: [{ argumentType: FunctionArgumentType.STRING }],
		doesNotNeedArgumentsToBeComputed: true,
		vectorizationForbidden: true
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/IsEvenPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var IsEvenPlugin = class extends FunctionPlugin {
	iseven(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ISEVEN"), (val) => val % 2 === 0);
	}
};
IsEvenPlugin.implementedFunctions = { "ISEVEN": {
	method: "iseven",
	parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
} };
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/IsOddPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var IsOddPlugin = class extends FunctionPlugin {
	isodd(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ISODD"), (val) => val % 2 === 1);
	}
};
IsOddPlugin.implementedFunctions = { "ISODD": {
	method: "isodd",
	parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
} };
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/LogarithmPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var LogarithmPlugin = class extends FunctionPlugin {
	log10(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("LOG10"), Math.log10);
	}
	log(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("LOG"), (arg, base) => Math.log(arg) / Math.log(base));
	}
	ln(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("LN"), Math.log);
	}
};
LogarithmPlugin.implementedFunctions = {
	"LOG10": {
		method: "log10",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"LOG": {
		method: "log",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			greaterThan: 0
		}, {
			argumentType: FunctionArgumentType.NUMBER,
			defaultValue: 10,
			greaterThan: 0
		}]
	},
	"LN": {
		method: "ln",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/MathConstantsPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var PI = parseFloat(Math.PI.toFixed(14));
var MathConstantsPlugin = class extends FunctionPlugin {
	pi(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("PI"), () => PI);
	}
	sqrtpi(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("SQRTPI"), (arg) => Math.sqrt(PI * arg));
	}
};
MathConstantsPlugin.implementedFunctions = {
	"PI": {
		method: "pi",
		parameters: []
	},
	"SQRTPI": {
		method: "sqrtpi",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}]
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/MatrixPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
function arraySizeForMultiplication(leftArraySize, rightArraySize) {
	return new ArraySize(rightArraySize.width, leftArraySize.height);
}
function arraySizeForPoolFunction(inputArray, windowSize, stride) {
	return new ArraySize(1 + (inputArray.width - windowSize) / stride, 1 + (inputArray.height - windowSize) / stride);
}
var MatrixPlugin = class extends FunctionPlugin {
	mmult(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("MMULT"), (leftMatrix, rightMatrix) => {
			if (!leftMatrix.hasOnlyNumbers() || !rightMatrix.hasOnlyNumbers()) return new CellError(ErrorType.VALUE, ErrorMessage.NumberRange);
			if (rightMatrix.height() !== leftMatrix.width()) return new CellError(ErrorType.VALUE, ErrorMessage.ArrayDimensions);
			const outputSize = arraySizeForMultiplication(leftMatrix.size, rightMatrix.size);
			const result = this.createKernel(function(a, b, width) {
				let sum = 0;
				for (let i = 0; i < width; ++i) sum += a[this.thread.y][i] * b[i][this.thread.x];
				return sum;
			}, outputSize)(leftMatrix.rawNumbers(), rightMatrix.rawNumbers(), leftMatrix.width());
			return SimpleRangeValue.onlyNumbers(result);
		});
	}
	mmultArraySize(ast, state) {
		if (ast.args.length !== 2) return ArraySize.error();
		const metadata = this.metadata("MMULT");
		const [left, right] = ast.args.map((arg) => {
			var _a;
			return this.arraySizeForAst(arg, new InterpreterState(state.formulaAddress, state.arraysFlag || ((_a = metadata === null || metadata === void 0 ? void 0 : metadata.enableArrayArithmeticForArguments) !== null && _a !== void 0 ? _a : false)));
		});
		return arraySizeForMultiplication(left, right);
	}
	maxpool(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("MAXPOOL"), (matrix, windowSize, stride = windowSize) => {
			if (!matrix.hasOnlyNumbers()) return new CellError(ErrorType.VALUE, ErrorMessage.NumberRange);
			const outputSize = arraySizeForPoolFunction(matrix.size, windowSize, stride);
			const result = this.createKernel(function(a, windowSize, stride) {
				const leftCornerX = this.thread.x * stride;
				const leftCornerY = this.thread.y * stride;
				let currentMax = a[leftCornerY][leftCornerX];
				for (let i = 0; i < windowSize; i++) for (let j = 0; j < windowSize; j++) currentMax = Math.max(currentMax, a[leftCornerY + i][leftCornerX + j]);
				return currentMax;
			}, outputSize)(matrix.rawNumbers(), windowSize, stride);
			return SimpleRangeValue.onlyNumbers(result);
		});
	}
	medianpool(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("MEDIANPOOL"), (matrix, windowSize, stride = windowSize) => {
			if (!matrix.hasOnlyNumbers()) return new CellError(ErrorType.VALUE, ErrorMessage.NumberRange);
			const outputSize = arraySizeForPoolFunction(matrix.size, windowSize, stride);
			const result = this.createKernel(function(a, windowSize, stride) {
				const leftCornerX = this.thread.x * stride;
				const leftCornerY = this.thread.y * stride;
				let currentMax = a[leftCornerY][leftCornerX];
				for (let i = 0; i < windowSize; i++) for (let j = 0; j < windowSize; j++) currentMax = Math.max(currentMax, a[leftCornerY + i][leftCornerX + j]);
				let currentMin = a[leftCornerY][leftCornerX];
				for (let i2 = 0; i2 < windowSize; i2++) for (let j2 = 0; j2 < windowSize; j2++) currentMin = Math.min(currentMin, a[leftCornerY + i2][leftCornerX + j2]);
				const numberOfElements = windowSize * windowSize;
				let leftEnd = currentMin;
				let rightEnd = currentMax;
				let result = 42;
				for (let iter = 0; iter < 32; iter++) {
					const medianGuess = (leftEnd + rightEnd) / 2;
					let medianGuessCount = 0;
					for (let i3 = 0; i3 < windowSize; i3++) for (let j3 = 0; j3 < windowSize; j3++) if (a[leftCornerY + i3][leftCornerX + j3] > medianGuess) medianGuessCount++;
					if (windowSize % 2 === 0) if (medianGuessCount === numberOfElements / 2) {
						result = medianGuess;
						break;
					} else if (medianGuessCount > numberOfElements / 2) leftEnd = medianGuess;
					else rightEnd = medianGuess;
					else if (medianGuessCount === (numberOfElements - 1) / 2) {
						result = medianGuess;
						break;
					} else if (medianGuessCount > (numberOfElements - 1) / 2) leftEnd = medianGuess;
					else rightEnd = medianGuess;
				}
				return result;
			}, outputSize)(matrix.rawNumbers(), windowSize, stride);
			return SimpleRangeValue.onlyNumbers(result);
		});
	}
	maxpoolArraySize(ast, state) {
		if (ast.args.length < 2 || ast.args.length > 3) return ArraySize.error();
		const metadata = this.metadata("MAXPOOL");
		const array = ast.args.map((arg) => {
			var _a;
			return this.arraySizeForAst(arg, new InterpreterState(state.formulaAddress, state.arraysFlag || ((_a = metadata === null || metadata === void 0 ? void 0 : metadata.enableArrayArithmeticForArguments) !== null && _a !== void 0 ? _a : false)));
		})[0];
		const windowArg = ast.args[1];
		let window;
		if (windowArg.type === AstNodeType.NUMBER) window = windowArg.value;
		else window = 1;
		let stride = window;
		if (ast.args.length === 3) {
			const strideArg = ast.args[2];
			if (strideArg.type === AstNodeType.NUMBER) stride = strideArg.value;
			else stride = 1;
		}
		if (window > array.width || window > array.height || stride > window || (array.width - window) % stride !== 0 || (array.height - window) % stride !== 0) return ArraySize.error();
		return arraySizeForPoolFunction(array, window, stride);
	}
	medianpoolArraySize(ast, state) {
		return this.maxpoolArraySize(ast, state);
	}
	transpose(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("TRANSPOSE"), (matrix) => {
			const input = matrix.rawData();
			const inputSize = matrix.size;
			const result = [];
			for (let i = 0; i < inputSize.width; ++i) {
				result[i] = [];
				for (let j = 0; j < inputSize.height; ++j) result[i][j] = input[j][i];
			}
			return SimpleRangeValue.onlyValues(result);
		});
	}
	transposeArraySize(ast, state) {
		if (ast.args.length !== 1) return ArraySize.error();
		const metadata = this.metadata("TRANSPOSE");
		const [size] = ast.args.map((arg) => {
			var _a;
			return this.arraySizeForAst(arg, new InterpreterState(state.formulaAddress, state.arraysFlag || ((_a = metadata === null || metadata === void 0 ? void 0 : metadata.enableArrayArithmeticForArguments) !== null && _a !== void 0 ? _a : false)));
		});
		return new ArraySize(size.height, size.width);
	}
	createKernel(kernel, outputSize) {
		return function(...args) {
			const result = [];
			for (let y = 0; y < outputSize.height; ++y) {
				result.push([]);
				for (let x = 0; x < outputSize.width; ++x) result[y][x] = kernel.apply({ thread: {
					x,
					y
				} }, args);
			}
			return result;
		};
	}
};
MatrixPlugin.implementedFunctions = {
	"MMULT": {
		method: "mmult",
		sizeOfResultArrayMethod: "mmultArraySize",
		parameters: [{ argumentType: FunctionArgumentType.RANGE }, { argumentType: FunctionArgumentType.RANGE }],
		vectorizationForbidden: true
	},
	"TRANSPOSE": {
		method: "transpose",
		sizeOfResultArrayMethod: "transposeArraySize",
		parameters: [{ argumentType: FunctionArgumentType.RANGE }],
		vectorizationForbidden: true
	},
	"MAXPOOL": {
		method: "maxpool",
		sizeOfResultArrayMethod: "maxpoolArraySize",
		parameters: [
			{ argumentType: FunctionArgumentType.RANGE },
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.NUMBER,
				optionalArg: true
			}
		],
		vectorizationForbidden: true
	},
	"MEDIANPOOL": {
		method: "medianpool",
		sizeOfResultArrayMethod: "medianpoolArraySize",
		parameters: [
			{ argumentType: FunctionArgumentType.RANGE },
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.NUMBER,
				optionalArg: true
			}
		],
		vectorizationForbidden: true
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/MedianPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Interpreter plugin containing MEDIAN function
*/
var MedianPlugin = class extends FunctionPlugin {
	/**
	* Corresponds to MEDIAN(Number1, Number2, ...).
	*
	* Returns a median of given numbers.
	*
	* @param ast
	* @param state
	*/
	median(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("MEDIAN"), (...args) => {
			const values = this.arithmeticHelper.coerceNumbersExactRanges(args);
			if (values instanceof CellError) return values;
			if (values.length === 0) return new CellError(ErrorType.NUM, ErrorMessage.OneValue);
			values.sort((a, b) => a - b);
			if (values.length % 2 === 0) return (values[values.length / 2 - 1] + values[values.length / 2]) / 2;
			else return values[Math.floor(values.length / 2)];
		});
	}
	large(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("LARGE"), (range, n) => {
			const vals = this.arithmeticHelper.manyToExactNumbers(range.valuesFromTopLeftCorner());
			if (vals instanceof CellError) return vals;
			vals.sort((a, b) => a - b);
			n = Math.trunc(n);
			if (n > vals.length) return new CellError(ErrorType.NUM, ErrorMessage.ValueLarge);
			return vals[vals.length - n];
		});
	}
	small(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("SMALL"), (range, n) => {
			const vals = this.arithmeticHelper.manyToExactNumbers(range.valuesFromTopLeftCorner());
			if (vals instanceof CellError) return vals;
			vals.sort((a, b) => a - b);
			n = Math.trunc(n);
			if (n > vals.length) return new CellError(ErrorType.NUM, ErrorMessage.ValueLarge);
			return vals[n - 1];
		});
	}
};
MedianPlugin.implementedFunctions = {
	"MEDIAN": {
		method: "median",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"LARGE": {
		method: "large",
		parameters: [{ argumentType: FunctionArgumentType.RANGE }, {
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 1
		}]
	},
	"SMALL": {
		method: "small",
		parameters: [{ argumentType: FunctionArgumentType.RANGE }, {
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 1
		}]
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/ModuloPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var ModuloPlugin = class extends FunctionPlugin {
	mod(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("MOD"), (dividend, divisor) => {
			if (divisor === 0) return new CellError(ErrorType.DIV_BY_ZERO);
			else return dividend % divisor;
		});
	}
};
ModuloPlugin.implementedFunctions = { "MOD": {
	method: "mod",
	parameters: [{ argumentType: FunctionArgumentType.NUMBER }, { argumentType: FunctionArgumentType.NUMBER }]
} };
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/NumericAggregationPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
function zeroForInfinite$1(value) {
	if (isExtendedNumber(value) && !Number.isFinite(getRawValue(value))) return 0;
	else return value;
}
var MomentsAggregate = class MomentsAggregate {
	constructor(sumsq, sum, count) {
		this.sumsq = sumsq;
		this.sum = sum;
		this.count = count;
	}
	static single(arg) {
		return new MomentsAggregate(arg * arg, arg, 1);
	}
	compose(other) {
		return new MomentsAggregate(this.sumsq + other.sumsq, this.sum + other.sum, this.count + other.count);
	}
	averageValue() {
		if (this.count > 0) return this.sum / this.count;
		else return;
	}
	varSValue() {
		if (this.count > 1) return (this.sumsq - this.sum * this.sum / this.count) / (this.count - 1);
		else return;
	}
	varPValue() {
		if (this.count > 0) return (this.sumsq - this.sum * this.sum / this.count) / this.count;
		else return;
	}
};
MomentsAggregate.empty = new MomentsAggregate(0, 0, 0);
var NumericAggregationPlugin = class extends FunctionPlugin {
	constructor() {
		super(...arguments);
		this.addWithEpsilonRaw = (left, right) => this.arithmeticHelper.addWithEpsilonRaw(left, right);
	}
	/**
	* Corresponds to SUM(Number1, Number2, ...).
	*
	* Returns a sum of given numbers.
	*
	* @param ast
	* @param state
	*/
	sum(ast, state) {
		return this.doSum(ast.args, state);
	}
	sumsq(ast, state) {
		return this.reduce(ast.args, state, 0, "SUMSQ", this.addWithEpsilonRaw, (arg) => Math.pow(getRawValue(arg), 2), strictlyNumbers);
	}
	/**
	* Corresponds to MAX(Number1, Number2, ...).
	*
	* Returns a max of given numbers.
	*
	* @param ast
	* @param state
	*/
	max(ast, state) {
		return this.doMax(ast.args, state);
	}
	maxa(ast, state) {
		return zeroForInfinite$1(this.reduce(ast.args, state, Number.NEGATIVE_INFINITY, "MAXA", (left, right) => Math.max(left, right), getRawValue, numbersBooleans));
	}
	/**
	* Corresponds to MIN(Number1, Number2, ...).
	*
	* Returns a min of given numbers.
	*
	* @param ast
	* @param state
	*/
	min(ast, state) {
		return this.doMin(ast.args, state);
	}
	mina(ast, state) {
		return zeroForInfinite$1(this.reduce(ast.args, state, Number.POSITIVE_INFINITY, "MINA", (left, right) => Math.min(left, right), getRawValue, numbersBooleans));
	}
	count(ast, state) {
		return this.doCount(ast.args, state);
	}
	counta(ast, state) {
		return this.doCounta(ast.args, state);
	}
	average(ast, state) {
		return this.doAverage(ast.args, state);
	}
	averagea(ast, state) {
		var _a;
		const result = this.reduce(ast.args, state, MomentsAggregate.empty, "_AGGREGATE_A", (left, right) => left.compose(right), (arg) => MomentsAggregate.single(getRawValue(arg)), numbersBooleans);
		if (result instanceof CellError) return result;
		else return (_a = result.averageValue()) !== null && _a !== void 0 ? _a : new CellError(ErrorType.DIV_BY_ZERO);
	}
	vars(ast, state) {
		return this.doVarS(ast.args, state);
	}
	varp(ast, state) {
		return this.doVarP(ast.args, state);
	}
	vara(ast, state) {
		var _a;
		const result = this.reduceAggregateA(ast.args, state);
		if (result instanceof CellError) return result;
		else return (_a = result.varSValue()) !== null && _a !== void 0 ? _a : new CellError(ErrorType.DIV_BY_ZERO);
	}
	varpa(ast, state) {
		var _a;
		const result = this.reduceAggregateA(ast.args, state);
		if (result instanceof CellError) return result;
		else return (_a = result.varPValue()) !== null && _a !== void 0 ? _a : new CellError(ErrorType.DIV_BY_ZERO);
	}
	stdevs(ast, state) {
		return this.doStdevS(ast.args, state);
	}
	stdevp(ast, state) {
		return this.doStdevP(ast.args, state);
	}
	stdeva(ast, state) {
		const result = this.reduceAggregateA(ast.args, state);
		if (result instanceof CellError) return result;
		else {
			const val = result.varSValue();
			return val === void 0 ? new CellError(ErrorType.DIV_BY_ZERO) : Math.sqrt(val);
		}
	}
	stdevpa(ast, state) {
		const result = this.reduceAggregateA(ast.args, state);
		if (result instanceof CellError) return result;
		else {
			const val = result.varPValue();
			return val === void 0 ? new CellError(ErrorType.DIV_BY_ZERO) : Math.sqrt(val);
		}
	}
	product(ast, state) {
		return this.doProduct(ast.args, state);
	}
	subtotal(ast, state) {
		if (ast.args.length < 2) return new CellError(ErrorType.NA, ErrorMessage.WrongArgNumber);
		const functionType = this.coerceToType(this.evaluateAst(ast.args[0], state), { argumentType: FunctionArgumentType.NUMBER }, state);
		const args = ast.args.slice(1);
		switch (functionType) {
			case 1:
			case 101: return this.doAverage(args, state);
			case 2:
			case 102: return this.doCount(args, state);
			case 3:
			case 103: return this.doCounta(args, state);
			case 4:
			case 104: return this.doMax(args, state);
			case 5:
			case 105: return this.doMin(args, state);
			case 6:
			case 106: return this.doProduct(args, state);
			case 7:
			case 107: return this.doStdevS(args, state);
			case 8:
			case 108: return this.doStdevP(args, state);
			case 9:
			case 109: return this.doSum(args, state);
			case 10:
			case 110: return this.doVarS(args, state);
			case 11:
			case 111: return this.doVarP(args, state);
			default: return new CellError(ErrorType.VALUE, ErrorMessage.BadMode);
		}
	}
	reduceAggregate(args, state) {
		return this.reduce(args, state, MomentsAggregate.empty, "_AGGREGATE", (left, right) => {
			return left.compose(right);
		}, (arg) => {
			return MomentsAggregate.single(getRawValue(arg));
		}, strictlyNumbers);
	}
	reduceAggregateA(args, state) {
		return this.reduce(args, state, MomentsAggregate.empty, "_AGGREGATE_A", (left, right) => {
			return left.compose(right);
		}, (arg) => {
			return MomentsAggregate.single(getRawValue(arg));
		}, numbersBooleans);
	}
	doAverage(args, state) {
		var _a;
		const result = this.reduceAggregate(args, state);
		if (result instanceof CellError) return result;
		else return (_a = result.averageValue()) !== null && _a !== void 0 ? _a : new CellError(ErrorType.DIV_BY_ZERO);
	}
	doVarS(args, state) {
		var _a;
		const result = this.reduceAggregate(args, state);
		if (result instanceof CellError) return result;
		else return (_a = result.varSValue()) !== null && _a !== void 0 ? _a : new CellError(ErrorType.DIV_BY_ZERO);
	}
	doVarP(args, state) {
		var _a;
		const result = this.reduceAggregate(args, state);
		if (result instanceof CellError) return result;
		else return (_a = result.varPValue()) !== null && _a !== void 0 ? _a : new CellError(ErrorType.DIV_BY_ZERO);
	}
	doStdevS(args, state) {
		const result = this.reduceAggregate(args, state);
		if (result instanceof CellError) return result;
		else {
			const val = result.varSValue();
			return val === void 0 ? new CellError(ErrorType.DIV_BY_ZERO) : Math.sqrt(val);
		}
	}
	doStdevP(args, state) {
		const result = this.reduceAggregate(args, state);
		if (result instanceof CellError) return result;
		else {
			const val = result.varPValue();
			return val === void 0 ? new CellError(ErrorType.DIV_BY_ZERO) : Math.sqrt(val);
		}
	}
	doCount(args, state) {
		return this.reduce(args, state, 0, "COUNT", (left, right) => left + right, getRawValue, (arg) => isExtendedNumber(arg) ? 1 : 0);
	}
	doCounta(args, state) {
		return this.reduce(args, state, 0, "COUNTA", (left, right) => left + right, getRawValue, (arg) => arg === EmptyValue ? 0 : 1);
	}
	doMax(args, state) {
		return zeroForInfinite$1(this.reduce(args, state, Number.NEGATIVE_INFINITY, "MAX", (left, right) => Math.max(left, right), getRawValue, strictlyNumbers));
	}
	doMin(args, state) {
		return zeroForInfinite$1(this.reduce(args, state, Number.POSITIVE_INFINITY, "MIN", (left, right) => Math.min(left, right), getRawValue, strictlyNumbers));
	}
	doSum(args, state) {
		return this.reduce(args, state, 0, "SUM", this.addWithEpsilonRaw, getRawValue, strictlyNumbers);
	}
	doProduct(args, state) {
		return this.reduce(args, state, 1, "PRODUCT", (left, right) => left * right, getRawValue, strictlyNumbers);
	}
	/**
	* Reduces procedure arguments with given reducing function
	*
	* @param args
	* @param state
	* @param initialAccValue - "neutral" value (equivalent of 0)
	* @param functionName - function name to use as cache key
	* @param reducingFunction - reducing function
	* @param mapFunction
	* @param coercionFunction
	*/
	reduce(args, state, initialAccValue, functionName, reducingFunction, mapFunction, coercionFunction) {
		if (args.length < 1) return new CellError(ErrorType.NA, ErrorMessage.WrongArgNumber);
		return args.reduce((acc, arg) => {
			if (acc instanceof CellError) return acc;
			if (arg.type === AstNodeType.CELL_RANGE || arg.type === AstNodeType.COLUMN_RANGE || arg.type === AstNodeType.ROW_RANGE) {
				const val = this.evaluateRange(arg, state, initialAccValue, functionName, reducingFunction, mapFunction, coercionFunction);
				if (val instanceof CellError) return val;
				return reducingFunction(val, acc);
			}
			let value;
			value = this.evaluateAst(arg, state);
			if (value instanceof SimpleRangeValue) return Array.from(value.valuesFromTopLeftCorner()).map(coercionFunction).filter((arg) => arg !== void 0).map((arg) => {
				if (arg instanceof CellError) return arg;
				else return mapFunction(arg);
			}).reduce((left, right) => {
				if (left instanceof CellError) return left;
				else if (right instanceof CellError) return right;
				else return reducingFunction(left, right);
			}, acc);
			else if (arg.type === AstNodeType.CELL_REFERENCE) {
				value = coercionFunction(value);
				if (value === void 0) return acc;
			} else {
				value = this.coerceScalarToNumberOrError(value);
				value = coercionFunction(value);
				if (value === void 0) return acc;
			}
			if (value instanceof CellError) return value;
			return reducingFunction(acc, mapFunction(value));
		}, initialAccValue);
	}
	/**
	* Performs range operation on given range
	*
	* @param {CellRangeAst | ColumnRangeAst | RowRangeAst} ast - cell range ast
	* @param {InterpreterState} state - interpreter state
	* @param {T} initialAccValue - initial accumulator value for reducing function
	* @param {string} functionName - function name to use as cache key
	* @param {BinaryOperation<T>} reducingFunction - reducing function
	* @param {MapOperation<T>} mapFunction - mapper transforming coerced scalar
	* @param {coercionOperation} coercionFunction - scalar-to-number coercer
	*/
	evaluateRange(ast, state, initialAccValue, functionName, reducingFunction, mapFunction, coercionFunction) {
		let range;
		try {
			range = AbsoluteCellRange.fromAst(ast, state.formulaAddress);
		} catch (err) {
			if (err instanceof SheetsNotEqual) return new CellError(ErrorType.REF, ErrorMessage.RangeManySheets);
			else throw err;
		}
		if (!this.isSheetValid(range)) return new CellError(ErrorType.REF, ErrorMessage.SheetRef);
		const rangeVertex = this.dependencyGraph.getRange(range.start, range.end);
		if (rangeVertex === void 0) throw new Error("Range does not exists in graph");
		let value = rangeVertex.getFunctionValue(functionName);
		if (value === void 0) {
			value = this.getRangeValues(functionName, range, rangeVertex, mapFunction, coercionFunction).reduce((arg1, arg2) => {
				if (arg1 instanceof CellError) return arg1;
				else if (arg2 instanceof CellError) return arg2;
				else return reducingFunction(arg1, arg2);
			}, initialAccValue);
			rangeVertex.setFunctionValue(functionName, value);
		}
		return value;
	}
	/**
	* Checks whether both ends of a range point to existing sheets (placeholders excluded).
	*/
	isSheetValid(range) {
		return this.dependencyGraph.sheetMapping.hasSheetWithId(range.start.sheet, { includePlaceholders: false }) && this.dependencyGraph.sheetMapping.hasSheetWithId(range.end.sheet, { includePlaceholders: false });
	}
	/**
	* Returns list of values for given range and function name
	*
	* If range is dependent on smaller range, list will contain value of smaller range for this function
	* and values of cells that are not present in smaller range
	*
	* @param functionName - function name (e.g., SUM)
	* @param range - cell range
	* @param rangeVertex
	* @param mapFunction
	* @param coercionFunction
	*/
	getRangeValues(functionName, range, rangeVertex, mapFunction, coercionFunction) {
		const rangeResult = [];
		const { smallerRangeVertex, restRange } = this.dependencyGraph.rangeMapping.findSmallerRange(range);
		let actualRange;
		if (smallerRangeVertex !== void 0 && this.dependencyGraph.existsEdge(smallerRangeVertex, rangeVertex)) {
			const cachedValue = smallerRangeVertex.getFunctionValue(functionName);
			if (cachedValue !== void 0) rangeResult.push(cachedValue);
			else for (const cellFromRange of smallerRangeVertex.range.addresses(this.dependencyGraph)) {
				const val = coercionFunction(this.dependencyGraph.getScalarValue(cellFromRange));
				if (val instanceof CellError) rangeResult.push(val);
				else if (val !== void 0) rangeResult.push(mapFunction(val));
			}
			actualRange = restRange;
		} else actualRange = range;
		for (const cellFromRange of actualRange.addresses(this.dependencyGraph)) {
			const val = coercionFunction(this.dependencyGraph.getScalarValue(cellFromRange));
			if (val instanceof CellError) rangeResult.push(val);
			else if (val !== void 0) rangeResult.push(mapFunction(val));
		}
		return rangeResult;
	}
};
NumericAggregationPlugin.implementedFunctions = {
	"SUM": {
		method: "sum",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"SUMSQ": {
		method: "sumsq",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"MAX": {
		method: "max",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"MIN": {
		method: "min",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"MAXA": {
		method: "maxa",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"MINA": {
		method: "mina",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"COUNT": {
		method: "count",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"COUNTA": {
		method: "counta",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"AVERAGE": {
		method: "average",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"AVERAGEA": {
		method: "averagea",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"PRODUCT": {
		method: "product",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"VAR.S": {
		method: "vars",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"VAR.P": {
		method: "varp",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"VARA": {
		method: "vara",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"VARPA": {
		method: "varpa",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"STDEV.S": {
		method: "stdevs",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"STDEV.P": {
		method: "stdevp",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"STDEVA": {
		method: "stdeva",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"STDEVPA": {
		method: "stdevpa",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"SUBTOTAL": {
		method: "subtotal",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, { argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	}
};
NumericAggregationPlugin.aliases = {
	VAR: "VAR.S",
	VARP: "VAR.P",
	STDEV: "STDEV.S",
	STDEVP: "STDEV.P",
	VARS: "VAR.S",
	STDEVS: "STDEV.S"
};
function strictlyNumbers(arg) {
	if (isExtendedNumber(arg) || arg instanceof CellError) return arg;
	else return;
}
function numbersBooleans(arg) {
	if (typeof arg === "boolean") return coerceBooleanToNumber(arg);
	else if (isExtendedNumber(arg) || arg instanceof CellError) return arg;
	else if (typeof arg === "string") return 0;
	else return;
}
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/PowerPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var PowerPlugin = class extends FunctionPlugin {
	power(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("POWER"), Math.pow);
	}
};
PowerPlugin.implementedFunctions = { "POWER": {
	method: "power",
	parameters: [{ argumentType: FunctionArgumentType.NUMBER }, { argumentType: FunctionArgumentType.NUMBER }]
} };
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/RadiansPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var RadiansPlugin = class extends FunctionPlugin {
	radians(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("RADIANS"), (arg) => arg * (Math.PI / 180));
	}
};
RadiansPlugin.implementedFunctions = { "RADIANS": {
	method: "radians",
	parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
} };
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/RadixConversionPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var MAX_LENGTH = 10;
var DECIMAL_NUMBER_OF_BITS = 255;
var MIN_BASE = 2;
var MAX_BASE = 36;
var ALPHABET = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
var RadixConversionPlugin = class extends FunctionPlugin {
	dec2bin(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("DEC2BIN"), (value, places) => decimalToBaseWithExactPadding(value, 2, places));
	}
	dec2oct(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("DEC2OCT"), (value, places) => decimalToBaseWithExactPadding(value, 8, places));
	}
	dec2hex(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("DEC2HEX"), (value, places) => decimalToBaseWithExactPadding(value, 16, places));
	}
	bin2dec(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("BIN2DEC"), (binary) => {
			const binaryWithSign = coerceStringToBase(binary, 2, MAX_LENGTH);
			if (binaryWithSign === void 0) return new CellError(ErrorType.NUM, ErrorMessage.NotBinary);
			return twoComplementToDecimal(binaryWithSign, 2);
		});
	}
	bin2oct(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("BIN2OCT"), (binary, places) => {
			const binaryWithSign = coerceStringToBase(binary, 2, MAX_LENGTH);
			if (binaryWithSign === void 0) return new CellError(ErrorType.NUM, ErrorMessage.NotBinary);
			return decimalToBaseWithExactPadding(twoComplementToDecimal(binaryWithSign, 2), 8, places);
		});
	}
	bin2hex(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("BIN2HEX"), (binary, places) => {
			const binaryWithSign = coerceStringToBase(binary, 2, MAX_LENGTH);
			if (binaryWithSign === void 0) return new CellError(ErrorType.NUM, ErrorMessage.NotBinary);
			return decimalToBaseWithExactPadding(twoComplementToDecimal(binaryWithSign, 2), 16, places);
		});
	}
	oct2dec(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("OCT2DEC"), (octal) => {
			const octalWithSign = coerceStringToBase(octal, 8, MAX_LENGTH);
			if (octalWithSign === void 0) return new CellError(ErrorType.NUM, ErrorMessage.NotOctal);
			return twoComplementToDecimal(octalWithSign, 8);
		});
	}
	oct2bin(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("OCT2BIN"), (octal, places) => {
			const octalWithSign = coerceStringToBase(octal, 8, MAX_LENGTH);
			if (octalWithSign === void 0) return new CellError(ErrorType.NUM, ErrorMessage.NotOctal);
			return decimalToBaseWithExactPadding(twoComplementToDecimal(octalWithSign, 8), 2, places);
		});
	}
	oct2hex(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("OCT2HEX"), (octal, places) => {
			const octalWithSign = coerceStringToBase(octal, 8, MAX_LENGTH);
			if (octalWithSign === void 0) return new CellError(ErrorType.NUM, ErrorMessage.NotOctal);
			return decimalToBaseWithExactPadding(twoComplementToDecimal(octalWithSign, 8), 16, places);
		});
	}
	hex2dec(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("HEX2DEC"), (hexadecimal) => {
			const hexadecimalWithSign = coerceStringToBase(hexadecimal, 16, MAX_LENGTH);
			if (hexadecimalWithSign === void 0) return new CellError(ErrorType.NUM, ErrorMessage.NotHex);
			return twoComplementToDecimal(hexadecimalWithSign, 16);
		});
	}
	hex2bin(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("HEX2BIN"), (hexadecimal, places) => {
			const hexadecimalWithSign = coerceStringToBase(hexadecimal, 16, MAX_LENGTH);
			if (hexadecimalWithSign === void 0) return new CellError(ErrorType.NUM, ErrorMessage.NotHex);
			return decimalToBaseWithExactPadding(twoComplementToDecimal(hexadecimalWithSign, 16), 2, places);
		});
	}
	hex2oct(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("HEX2OCT"), (hexadecimal, places) => {
			const hexadecimalWithSign = coerceStringToBase(hexadecimal, 16, MAX_LENGTH);
			if (hexadecimalWithSign === void 0) return new CellError(ErrorType.NUM, ErrorMessage.NotHex);
			return decimalToBaseWithExactPadding(twoComplementToDecimal(hexadecimalWithSign, 16), 8, places);
		});
	}
	base(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("BASE"), decimalToBaseWithMinimumPadding);
	}
	decimal(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("DECIMAL"), (arg, base) => {
			const input = coerceStringToBase(arg, base, DECIMAL_NUMBER_OF_BITS);
			if (input === void 0) return new CellError(ErrorType.NUM, ErrorMessage.NotHex);
			return parseInt(input, base);
		});
	}
};
RadixConversionPlugin.implementedFunctions = {
	"DEC2BIN": {
		method: "dec2bin",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, {
			argumentType: FunctionArgumentType.NUMBER,
			optionalArg: true,
			minValue: 1,
			maxValue: 10
		}]
	},
	"DEC2OCT": {
		method: "dec2oct",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, {
			argumentType: FunctionArgumentType.NUMBER,
			optionalArg: true,
			minValue: 1,
			maxValue: 10
		}]
	},
	"DEC2HEX": {
		method: "dec2hex",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, {
			argumentType: FunctionArgumentType.NUMBER,
			optionalArg: true,
			minValue: 1,
			maxValue: 10
		}]
	},
	"BIN2DEC": {
		method: "bin2dec",
		parameters: [{ argumentType: FunctionArgumentType.STRING }]
	},
	"BIN2OCT": {
		method: "bin2oct",
		parameters: [{ argumentType: FunctionArgumentType.STRING }, {
			argumentType: FunctionArgumentType.NUMBER,
			optionalArg: true,
			minValue: 0,
			maxValue: MAX_LENGTH
		}]
	},
	"BIN2HEX": {
		method: "bin2hex",
		parameters: [{ argumentType: FunctionArgumentType.STRING }, {
			argumentType: FunctionArgumentType.NUMBER,
			optionalArg: true,
			minValue: 0,
			maxValue: MAX_LENGTH
		}]
	},
	"OCT2DEC": {
		method: "oct2dec",
		parameters: [{ argumentType: FunctionArgumentType.STRING }]
	},
	"OCT2BIN": {
		method: "oct2bin",
		parameters: [{ argumentType: FunctionArgumentType.STRING }, {
			argumentType: FunctionArgumentType.NUMBER,
			optionalArg: true,
			minValue: 0,
			maxValue: MAX_LENGTH
		}]
	},
	"OCT2HEX": {
		method: "oct2hex",
		parameters: [{ argumentType: FunctionArgumentType.STRING }, {
			argumentType: FunctionArgumentType.NUMBER,
			optionalArg: true,
			minValue: 0,
			maxValue: MAX_LENGTH
		}]
	},
	"HEX2DEC": {
		method: "hex2dec",
		parameters: [{ argumentType: FunctionArgumentType.STRING }]
	},
	"HEX2BIN": {
		method: "hex2bin",
		parameters: [{ argumentType: FunctionArgumentType.STRING }, {
			argumentType: FunctionArgumentType.NUMBER,
			optionalArg: true,
			minValue: 0,
			maxValue: MAX_LENGTH
		}]
	},
	"HEX2OCT": {
		method: "hex2oct",
		parameters: [{ argumentType: FunctionArgumentType.STRING }, {
			argumentType: FunctionArgumentType.NUMBER,
			optionalArg: true,
			minValue: 0,
			maxValue: MAX_LENGTH
		}]
	},
	"DECIMAL": {
		method: "decimal",
		parameters: [{ argumentType: FunctionArgumentType.STRING }, {
			argumentType: FunctionArgumentType.NUMBER,
			minValue: MIN_BASE,
			maxValue: MAX_BASE
		}]
	},
	"BASE": {
		method: "base",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: MIN_BASE,
				maxValue: MAX_BASE
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				optionalArg: true,
				minValue: 0,
				maxValue: DECIMAL_NUMBER_OF_BITS
			}
		]
	}
};
function coerceStringToBase(value, base, maxLength) {
	const baseAlphabet = ALPHABET.substr(0, base);
	const regex = new RegExp(`^[${baseAlphabet}]+$`);
	if (value.length > maxLength || !regex.test(value)) return;
	return value;
}
function decimalToBaseWithExactPadding(value, base, places) {
	if (value > maxValFromBase(base)) return new CellError(ErrorType.NUM, ErrorMessage.ValueBaseLarge);
	if (value < minValFromBase(base)) return new CellError(ErrorType.NUM, ErrorMessage.ValueBaseSmall);
	const result = decimalToRadixComplement(value, base);
	if (places === void 0 || value < 0) return result;
	else if (result.length > places) return new CellError(ErrorType.NUM, ErrorMessage.ValueBaseLong);
	else return padLeft(result, places);
}
function minValFromBase(base) {
	return -Math.pow(base, MAX_LENGTH) / 2;
}
function maxValFromBase(base) {
	return -minValFromBase(base) - 1;
}
function decimalToBaseWithMinimumPadding(value, base, places) {
	const result = decimalToRadixComplement(value, base);
	if (places !== void 0 && places > result.length) return padLeft(result, places);
	else return result;
}
function decimalToRadixComplement(value, base) {
	return (value + (value < 0 ? Math.pow(base, MAX_LENGTH) : 0)).toString(base).toUpperCase();
}
function twoComplementToDecimal(value, base) {
	const parsed = parseInt(value, base);
	const offset = Math.pow(base, MAX_LENGTH);
	return parsed >= offset / 2 ? parsed - offset : parsed;
}
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/RandomPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var RandomPlugin = class extends FunctionPlugin {
	/**
	* Corresponds to RAND()
	*
	* Returns a pseudo-random floating-point random number
	* in the range [0,1).
	*
	* @param ast
	* @param state
	*/
	rand(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("RAND"), Math.random);
	}
	randbetween(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("RANDBETWEEN"), (lower, upper) => {
			if (upper < lower) return new CellError(ErrorType.NUM, ErrorMessage.WrongOrder);
			lower = Math.ceil(lower);
			upper = Math.floor(upper) + 1;
			if (lower === upper) upper += 1;
			return lower + Math.floor(Math.random() * (upper - lower));
		});
	}
};
RandomPlugin.implementedFunctions = {
	"RAND": {
		method: "rand",
		parameters: [],
		isVolatile: true
	},
	"RANDBETWEEN": {
		method: "randbetween",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, { argumentType: FunctionArgumentType.NUMBER }],
		isVolatile: true
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/RoundingPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
function findNextOddNumber(arg) {
	const ceiled = Math.ceil(arg);
	return ceiled % 2 === 1 ? ceiled : ceiled + 1;
}
function findNextEvenNumber(arg) {
	const ceiled = Math.ceil(arg);
	return ceiled % 2 === 0 ? ceiled : ceiled + 1;
}
var RoundingPlugin = class extends FunctionPlugin {
	roundup(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ROUNDDOWN"), (numberToRound, places) => {
			const placesMultiplier = Math.pow(10, places);
			if (numberToRound < 0) return -Math.ceil(-numberToRound * placesMultiplier) / placesMultiplier;
			else return Math.ceil(numberToRound * placesMultiplier) / placesMultiplier;
		});
	}
	rounddown(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ROUNDDOWN"), (numberToRound, places) => {
			const placesMultiplier = Math.pow(10, places);
			if (numberToRound < 0) return -Math.floor(-numberToRound * placesMultiplier) / placesMultiplier;
			else return Math.floor(numberToRound * placesMultiplier) / placesMultiplier;
		});
	}
	round(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ROUND"), (numberToRound, places) => {
			const placesMultiplier = Math.pow(10, places);
			if (numberToRound < 0) return -Math.round(-numberToRound * placesMultiplier) / placesMultiplier;
			else return Math.round(numberToRound * placesMultiplier) / placesMultiplier;
		});
	}
	intFunc(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("INT"), (coercedNumberToRound) => {
			if (coercedNumberToRound < 0) return -Math.floor(-coercedNumberToRound);
			else return Math.floor(coercedNumberToRound);
		});
	}
	even(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("EVEN"), (coercedNumberToRound) => {
			if (coercedNumberToRound < 0) return -findNextEvenNumber(-coercedNumberToRound);
			else return findNextEvenNumber(coercedNumberToRound);
		});
	}
	odd(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ODD"), (coercedNumberToRound) => {
			if (coercedNumberToRound < 0) return -findNextOddNumber(-coercedNumberToRound);
			else return findNextOddNumber(coercedNumberToRound);
		});
	}
	ceilingmath(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("CEILING.MATH"), (value, significance, mode) => {
			if (significance === 0 || value === 0) return 0;
			significance = Math.abs(significance);
			if (mode === 1 && value < 0) significance = -significance;
			return Math.ceil(value / significance) * significance;
		});
	}
	ceiling(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("CEILING"), (value, significance) => {
			if (value === 0) return 0;
			if (significance === 0) return new CellError(ErrorType.DIV_BY_ZERO);
			if (value > 0 && significance < 0) return new CellError(ErrorType.NUM, ErrorMessage.DistinctSigns);
			return Math.ceil(value / significance) * significance;
		});
	}
	ceilingprecise(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("CEILING.PRECISE"), (value, significance) => {
			if (significance === 0 || value === 0) return 0;
			significance = Math.abs(significance);
			return Math.ceil(value / significance) * significance;
		});
	}
	floormath(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("FLOOR.MATH"), (value, significance, mode) => {
			if (significance === 0 || value === 0) return 0;
			significance = Math.abs(significance);
			if (mode === 1 && value < 0) significance *= -1;
			return Math.floor(value / significance) * significance;
		});
	}
	floor(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("FLOOR"), (value, significance) => {
			if (value === 0) return 0;
			if (significance === 0) return new CellError(ErrorType.DIV_BY_ZERO);
			if (value > 0 && significance < 0) return new CellError(ErrorType.NUM, ErrorMessage.DistinctSigns);
			return Math.floor(value / significance) * significance;
		});
	}
	floorprecise(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("FLOOR.PRECISE"), (value, significance) => {
			if (significance === 0 || value === 0) return 0;
			significance = Math.abs(significance);
			return Math.floor(value / significance) * significance;
		});
	}
};
RoundingPlugin.implementedFunctions = {
	"ROUNDUP": {
		method: "roundup",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, {
			argumentType: FunctionArgumentType.NUMBER,
			defaultValue: 0
		}]
	},
	"ROUNDDOWN": {
		method: "rounddown",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, {
			argumentType: FunctionArgumentType.NUMBER,
			defaultValue: 0
		}]
	},
	"ROUND": {
		method: "round",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, {
			argumentType: FunctionArgumentType.NUMBER,
			defaultValue: 0
		}]
	},
	"INT": {
		method: "intFunc",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"EVEN": {
		method: "even",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"ODD": {
		method: "odd",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"CEILING.MATH": {
		method: "ceilingmath",
		parameters: [
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 1
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 0
			}
		]
	},
	"CEILING": {
		method: "ceiling",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, { argumentType: FunctionArgumentType.NUMBER }]
	},
	"CEILING.PRECISE": {
		method: "ceilingprecise",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, {
			argumentType: FunctionArgumentType.NUMBER,
			defaultValue: 1
		}]
	},
	"FLOOR.MATH": {
		method: "floormath",
		parameters: [
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 1
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 0
			}
		]
	},
	"FLOOR": {
		method: "floor",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, { argumentType: FunctionArgumentType.NUMBER }]
	},
	"FLOOR.PRECISE": {
		method: "floorprecise",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, {
			argumentType: FunctionArgumentType.NUMBER,
			defaultValue: 1
		}]
	}
};
RoundingPlugin.aliases = {
	"ISO.CEILING": "CEILING.PRECISE",
	"TRUNC": "ROUNDDOWN"
};
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/SqrtPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var SqrtPlugin = class extends FunctionPlugin {
	sqrt(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("SQRT"), Math.sqrt);
	}
};
SqrtPlugin.implementedFunctions = { "SQRT": {
	method: "sqrt",
	parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
} };
//#endregion
//#region ../../node_modules/hyperformula/es/generatorUtils.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
function* empty$2() {}
function split(iterable) {
	const iterator = iterable[Symbol.iterator]();
	const { done, value } = iterator.next();
	if (done) return { rest: /* @__PURE__ */ empty$2() };
	else return {
		value,
		rest: iterator
	};
}
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/CriterionFunctionCompute.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var findSmallerRangeForMany = (dependencyGraph, conditionRanges, valuesRange) => {
	if (valuesRange.end.row > valuesRange.start.row) {
		const valuesRangeEndRowLess = simpleCellAddress(valuesRange.end.sheet, valuesRange.end.col, valuesRange.end.row - 1);
		const rowLessVertex = dependencyGraph.getRange(valuesRange.start, valuesRangeEndRowLess);
		if (rowLessVertex !== void 0) return {
			smallerRangeVertex: rowLessVertex,
			restValuesRange: valuesRange.withStart(simpleCellAddress(valuesRange.start.sheet, valuesRange.start.col, valuesRange.end.row)),
			restConditionRanges: conditionRanges.map((conditionRange) => conditionRange.withStart(simpleCellAddress(conditionRange.start.sheet, conditionRange.start.col, conditionRange.end.row)))
		};
	}
	return {
		restValuesRange: valuesRange,
		restConditionRanges: conditionRanges
	};
};
var CriterionFunctionCompute = class {
	constructor(interpreter, cacheKey, reduceInitialValue, composeFunction, mapFunction) {
		this.interpreter = interpreter;
		this.cacheKey = cacheKey;
		this.reduceInitialValue = reduceInitialValue;
		this.composeFunction = composeFunction;
		this.mapFunction = mapFunction;
		this.dependencyGraph = this.interpreter.dependencyGraph;
	}
	compute(simpleValuesRange, conditions) {
		for (const condition of conditions) if (!condition.conditionRange.sameDimensionsAs(simpleValuesRange)) return new CellError(ErrorType.VALUE, ErrorMessage.EqualLength);
		const valuesRangeVertex = this.tryToGetRangeVertexForRangeValue(simpleValuesRange);
		const conditionsVertices = conditions.map((c) => this.tryToGetRangeVertexForRangeValue(c.conditionRange));
		if (valuesRangeVertex && conditionsVertices.every((e) => e !== void 0)) {
			const fullCriterionString = conditions.map((c) => c.criterionPackage.raw).join(",");
			const cachedResult = this.findAlreadyComputedValueInCache(valuesRangeVertex, this.cacheKey(conditions), fullCriterionString);
			if (cachedResult !== void 0) {
				this.interpreter.stats.incrementCriterionFunctionFullCacheUsed();
				return cachedResult;
			}
			const cache = this.buildNewCriterionCache(this.cacheKey(conditions), conditions.map((c) => c.conditionRange.range), simpleValuesRange.range);
			if (!cache.has(fullCriterionString)) cache.set(fullCriterionString, [this.evaluateRangeValue(simpleValuesRange, conditions), conditions.map((condition) => condition.criterionPackage.lambda)]);
			valuesRangeVertex.setCriterionFunctionValues(this.cacheKey(conditions), cache);
			conditionsVertices.forEach((range) => {
				if (range !== void 0) range.addDependentCacheRange(valuesRangeVertex);
			});
			return cache.get(fullCriterionString)[0];
		} else return this.evaluateRangeValue(simpleValuesRange, conditions);
	}
	tryToGetRangeVertexForRangeValue(rangeValue) {
		const maybeRange = rangeValue.range;
		if (maybeRange === void 0) return;
		else return this.dependencyGraph.getRange(maybeRange.start, maybeRange.end);
	}
	reduceFunction(iterable) {
		let acc = this.reduceInitialValue;
		for (const val of iterable) acc = this.composeFunction(acc, val);
		return acc;
	}
	findAlreadyComputedValueInCache(rangeVertex, cacheKey, criterionString) {
		return rangeVertex.getCriterionFunctionValue(cacheKey, criterionString);
	}
	evaluateRangeValue(simpleValuesRange, conditions) {
		const criterionLambdas = conditions.map((condition) => condition.criterionPackage.lambda);
		const values = Array.from(simpleValuesRange.valuesFromTopLeftCorner()).map(this.mapFunction)[Symbol.iterator]();
		const filteredValues = ifFilter(criterionLambdas, conditions.map((condition) => condition.conditionRange.iterateValuesFromTopLeftCorner()), values);
		return this.reduceFunction(filteredValues);
	}
	buildNewCriterionCache(cacheKey, simpleConditionRanges, simpleValuesRange) {
		const currentRangeVertex = this.dependencyGraph.getRange(simpleValuesRange.start, simpleValuesRange.end);
		const { smallerRangeVertex, restConditionRanges, restValuesRange } = findSmallerRangeForMany(this.dependencyGraph, simpleConditionRanges, simpleValuesRange);
		let smallerCache;
		if (smallerRangeVertex !== void 0 && this.dependencyGraph.existsEdge(smallerRangeVertex, currentRangeVertex)) smallerCache = smallerRangeVertex.getCriterionFunctionValues(cacheKey);
		else smallerCache = /* @__PURE__ */ new Map();
		const newCache = /* @__PURE__ */ new Map();
		smallerCache.forEach(([value, criterionLambdas], key) => {
			const filteredValues = ifFilter(criterionLambdas, restConditionRanges.map((rcr) => getRangeValues(this.dependencyGraph, rcr)), Array.from(getRangeValues(this.dependencyGraph, restValuesRange)).map(this.mapFunction)[Symbol.iterator]());
			const newCacheValue = this.composeFunction(value, this.reduceFunction(filteredValues));
			this.interpreter.stats.incrementCriterionFunctionPartialCacheUsed();
			newCache.set(key, [newCacheValue, criterionLambdas]);
		});
		return newCache;
	}
};
var Condition$1 = class {
	constructor(conditionRange, criterionPackage) {
		this.conditionRange = conditionRange;
		this.criterionPackage = criterionPackage;
	}
};
function* getRangeValues(dependencyGraph, cellRange) {
	for (const cellFromRange of cellRange.addresses(dependencyGraph)) yield getRawValue(dependencyGraph.getScalarValue(cellFromRange));
}
function* ifFilter(criterionLambdas, conditionalIterables, computableIterable) {
	for (const computable of computableIterable) {
		const conditionalSplits = conditionalIterables.map((conditionalIterable) => split(conditionalIterable));
		if (!conditionalSplits.every((cs) => Object.prototype.hasOwnProperty.call(cs, "value"))) return;
		if (zip(conditionalSplits.map((cs) => getRawValue(cs.value)), criterionLambdas).every(([conditionalFirst, criterionLambda]) => criterionLambda(conditionalFirst))) yield computable;
		conditionalIterables = conditionalSplits.map((cs) => cs.rest);
	}
}
function zip(arr1, arr2) {
	const result = [];
	for (let i = 0; i < Math.min(arr1.length, arr2.length); i++) result.push([arr1[i], arr2[i]]);
	return result;
}
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/ConditionalAggregationPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var AverageResult = class AverageResult {
	constructor(sum, count) {
		this.sum = sum;
		this.count = count;
	}
	static single(arg) {
		return new AverageResult(arg, 1);
	}
	compose(other) {
		return new AverageResult(this.sum + other.sum, this.count + other.count);
	}
	averageValue() {
		if (this.count > 0) return this.sum / this.count;
		else return;
	}
};
AverageResult.empty = new AverageResult(0, 0);
/** Computes key for criterion function cache */
function conditionalAggregationFunctionCacheKey(functionName) {
	return (conditions) => {
		return [functionName, ...conditions.map((c) => `${c.conditionRange.range.sheet},${c.conditionRange.range.start.col},${c.conditionRange.range.start.row}`)].join(",");
	};
}
function zeroForInfinite(value) {
	if (isExtendedNumber(value) && !Number.isFinite(getRawValue(value))) return 0;
	else return value;
}
function mapToRawScalarValue(arg) {
	if (arg instanceof CellError) return arg;
	if (isExtendedNumber(arg)) return getRawValue(arg);
}
var ConditionalAggregationPlugin = class extends FunctionPlugin {
	/**
	* Corresponds to SUMIF(Range, Criterion, SumRange)
	*
	* Range is the range to which criterion is to be applied.
	* Criterion is the criteria used to choose which cells will be included in sum.
	* SumRange is the range on which adding will be performed.
	*
	* @param ast
	* @param state
	*/
	sumif(ast, state) {
		const functionName = "SUMIF";
		const computeFn = (conditionRange, criterion, values) => this.computeConditionalAggregationFunction(values !== null && values !== void 0 ? values : conditionRange, [conditionRange, criterion], functionName, 0, (left, right) => this.arithmeticHelper.nonstrictadd(left, right), mapToRawScalarValue);
		return this.runFunction(ast.args, state, this.metadata(functionName), computeFn);
	}
	sumifs(ast, state) {
		const functionName = "SUMIFS";
		const computeFn = (values, ...args) => this.computeConditionalAggregationFunction(values, args, functionName, 0, (left, right) => this.arithmeticHelper.nonstrictadd(left, right), mapToRawScalarValue);
		return this.runFunction(ast.args, state, this.metadata(functionName), computeFn);
	}
	averageif(ast, state) {
		const functionName = "AVERAGEIF";
		const computeFn = (conditionRange, criterion, values) => {
			const averageResult = this.computeConditionalAggregationFunction(values !== null && values !== void 0 ? values : conditionRange, [conditionRange, criterion], functionName, AverageResult.empty, (left, right) => left.compose(right), (arg) => isExtendedNumber(arg) ? AverageResult.single(getRawValue(arg)) : AverageResult.empty);
			if (averageResult instanceof CellError) return averageResult;
			else return averageResult.averageValue() || new CellError(ErrorType.DIV_BY_ZERO);
		};
		return this.runFunction(ast.args, state, this.metadata(functionName), computeFn);
	}
	/**
	* Corresponds to COUNTIF(Range, Criterion)
	*
	* Range is the range to which criterion is to be applied.
	* Criterion is the criteria used to choose which cells will be included in sum.
	*
	* Returns number of cells on which criteria evaluate to true.
	*
	* @param ast
	* @param state
	*/
	countif(ast, state) {
		const functionName = "COUNTIF";
		const computeFn = (conditionRange, criterion) => this.computeConditionalAggregationFunction(conditionRange, [conditionRange, criterion], functionName, 0, (left, right) => left + right, () => 1);
		return this.runFunction(ast.args, state, this.metadata(functionName), computeFn);
	}
	countifs(ast, state) {
		const functionName = "COUNTIFS";
		const computeFn = (...args) => this.computeConditionalAggregationFunction(args[0], args, functionName, 0, (left, right) => left + right, () => 1);
		return this.runFunction(ast.args, state, this.metadata(functionName), computeFn);
	}
	minifs(ast, state) {
		const functionName = "MINIFS";
		const composeFunction = (left, right) => {
			if (right === void 0 || left === void 0) return right === void 0 ? left : right;
			return Math.min(left, right);
		};
		const computeFn = (values, ...args) => {
			return zeroForInfinite(this.computeConditionalAggregationFunction(values, args, functionName, Number.POSITIVE_INFINITY, composeFunction, mapToRawScalarValue));
		};
		return this.runFunction(ast.args, state, this.metadata(functionName), computeFn);
	}
	maxifs(ast, state) {
		const functionName = "MAXIFS";
		const composeFunction = (left, right) => {
			if (right === void 0 || left === void 0) return right === void 0 ? left : right;
			return Math.max(left, right);
		};
		const computeFn = (values, ...args) => {
			return zeroForInfinite(this.computeConditionalAggregationFunction(values, args, functionName, Number.NEGATIVE_INFINITY, composeFunction, mapToRawScalarValue));
		};
		return this.runFunction(ast.args, state, this.metadata(functionName), computeFn);
	}
	computeConditionalAggregationFunction(valuesRange, conditionArgs, functionName, reduceInitialValue, composeFunction, mapFunction) {
		const conditions = [];
		for (let i = 0; i < conditionArgs.length; i += 2) {
			const conditionArg = conditionArgs[i];
			const criterionPackage = this.interpreter.criterionBuilder.fromCellValue(conditionArgs[i + 1], this.arithmeticHelper);
			if (criterionPackage === void 0) return new CellError(ErrorType.VALUE, ErrorMessage.BadCriterion);
			conditions.push(new Condition$1(conditionArg, criterionPackage));
		}
		return new CriterionFunctionCompute(this.interpreter, conditionalAggregationFunctionCacheKey(functionName), reduceInitialValue, composeFunction, mapFunction).compute(valuesRange, conditions);
	}
};
ConditionalAggregationPlugin.implementedFunctions = {
	SUMIF: {
		method: "sumif",
		parameters: [
			{ argumentType: FunctionArgumentType.RANGE },
			{ argumentType: FunctionArgumentType.NOERROR },
			{
				argumentType: FunctionArgumentType.RANGE,
				optionalArg: true
			}
		]
	},
	COUNTIF: {
		method: "countif",
		parameters: [{ argumentType: FunctionArgumentType.RANGE }, { argumentType: FunctionArgumentType.NOERROR }]
	},
	AVERAGEIF: {
		method: "averageif",
		parameters: [
			{ argumentType: FunctionArgumentType.RANGE },
			{ argumentType: FunctionArgumentType.NOERROR },
			{
				argumentType: FunctionArgumentType.RANGE,
				optionalArg: true
			}
		]
	},
	SUMIFS: {
		method: "sumifs",
		parameters: [
			{ argumentType: FunctionArgumentType.RANGE },
			{ argumentType: FunctionArgumentType.RANGE },
			{ argumentType: FunctionArgumentType.NOERROR }
		],
		repeatLastArgs: 2
	},
	COUNTIFS: {
		method: "countifs",
		parameters: [{ argumentType: FunctionArgumentType.RANGE }, { argumentType: FunctionArgumentType.NOERROR }],
		repeatLastArgs: 2
	},
	MINIFS: {
		method: "minifs",
		parameters: [
			{ argumentType: FunctionArgumentType.RANGE },
			{ argumentType: FunctionArgumentType.RANGE },
			{ argumentType: FunctionArgumentType.NOERROR }
		],
		repeatLastArgs: 2
	},
	MAXIFS: {
		method: "maxifs",
		parameters: [
			{ argumentType: FunctionArgumentType.RANGE },
			{ argumentType: FunctionArgumentType.RANGE },
			{ argumentType: FunctionArgumentType.NOERROR }
		],
		repeatLastArgs: 2
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/SumprodPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var SumprodPlugin = class extends FunctionPlugin {
	sumproduct(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("SUMPRODUCT"), (...args) => {
			const width = args[0].width();
			const height = args[0].height();
			for (const arg of args) if (arg.width() !== width || arg.height() !== height) return new CellError(ErrorType.VALUE, ErrorMessage.EqualLength);
			let ret = 0;
			const iterators = args.map((arg) => arg.iterateValuesFromTopLeftCorner());
			for (let i = 0; i < width * height; i++) {
				let acc = 1;
				for (const it of iterators) {
					const val = it.next().value;
					if (val instanceof CellError) return val;
					const coercedVal = this.coerceScalarToNumberOrError(val);
					if (isExtendedNumber(coercedVal)) acc *= getRawValue(coercedVal);
					else acc = 0;
				}
				ret += acc;
			}
			return ret;
		});
	}
};
SumprodPlugin.implementedFunctions = { "SUMPRODUCT": {
	method: "sumproduct",
	parameters: [{ argumentType: FunctionArgumentType.RANGE }],
	repeatLastArgs: 1
} };
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/TextPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Interpreter plugin containing text-specific functions
*/
var TextPlugin = class extends FunctionPlugin {
	/**
	* Corresponds to CONCATENATE(value1, [value2, ...])
	*
	* Concatenates provided arguments to one string.
	*
	* @param {ProcedureAst} ast - The procedure AST node
	* @param {InterpreterState} state - The interpreter state
	*/
	concatenate(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("CONCATENATE"), (...args) => {
			return "".concat(...args);
		});
	}
	/**
	* Corresponds to SPLIT(string, index)
	*
	* Splits provided string using space separator and returns chunk at zero-based position specified by second argument
	*
	* @param {ProcedureAst} ast - The procedure AST node
	* @param {InterpreterState} state - The interpreter state
	*/
	split(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("SPLIT"), (stringToSplit, indexToUse) => {
			const splittedString = stringToSplit.split(" ");
			if (indexToUse >= splittedString.length || indexToUse < 0) return new CellError(ErrorType.VALUE, ErrorMessage.IndexBounds);
			return splittedString[indexToUse];
		});
	}
	len(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("LEN"), (arg) => {
			return arg.length;
		});
	}
	lower(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("LOWER"), (arg) => {
			return arg.toLowerCase();
		});
	}
	trim(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("TRIM"), (arg) => {
			return arg.replace(/^ +/g, "").replace(/ +$/g, "").replace(/ +/g, " ");
		});
	}
	proper(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("PROPER"), (arg) => {
			return arg.replace(/\p{L}+/gu, (word) => word.charAt(0).toUpperCase() + word.substring(1).toLowerCase());
		});
	}
	clean(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("CLEAN"), (arg) => {
			return arg.replace(/[\u0000-\u001F]/g, "");
		});
	}
	exact(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("EXACT"), (left, right) => {
			return left === right;
		});
	}
	rept(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("REPT"), (text, count) => {
			if (count < 0) return new CellError(ErrorType.VALUE, ErrorMessage.NegativeCount);
			return text.repeat(count);
		});
	}
	right(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("RIGHT"), (text, length) => {
			if (length < 0) return new CellError(ErrorType.VALUE, ErrorMessage.NegativeLength);
			else if (length === 0) return "";
			return text.slice(-length);
		});
	}
	left(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("LEFT"), (text, length) => {
			if (length < 0) return new CellError(ErrorType.VALUE, ErrorMessage.NegativeLength);
			return text.slice(0, length);
		});
	}
	mid(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("MID"), (text, startPosition, numberOfChars) => {
			if (startPosition < 1) return new CellError(ErrorType.VALUE, ErrorMessage.LessThanOne);
			if (numberOfChars < 0) return new CellError(ErrorType.VALUE, ErrorMessage.NegativeLength);
			return text.substring(startPosition - 1, startPosition + numberOfChars - 1);
		});
	}
	replace(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("REPLACE"), (text, startPosition, numberOfChars, newText) => {
			if (startPosition < 1) return new CellError(ErrorType.VALUE, ErrorMessage.LessThanOne);
			if (numberOfChars < 0) return new CellError(ErrorType.VALUE, ErrorMessage.NegativeLength);
			return text.substring(0, startPosition - 1) + newText + text.substring(startPosition + numberOfChars - 1);
		});
	}
	search(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("SEARCH"), (pattern, text, startIndex) => {
			if (startIndex < 1 || startIndex > text.length) return new CellError(ErrorType.VALUE, ErrorMessage.LengthBounds);
			const normalizedPattern = pattern.toLowerCase();
			const normalizedText = text.substring(startIndex - 1).toLowerCase();
			const index = this.arithmeticHelper.requiresRegex(normalizedPattern) ? this.arithmeticHelper.searchString(normalizedPattern, normalizedText) : normalizedText.indexOf(normalizedPattern);
			return index > -1 ? index + startIndex : new CellError(ErrorType.VALUE, ErrorMessage.PatternNotFound);
		});
	}
	substitute(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("SUBSTITUTE"), (text, searchString, replacementString, occurrenceNum) => {
			const escapedSearchString = this.escapeRegExpSpecialCharacters(searchString);
			const searchRegExp = new RegExp(escapedSearchString, "g");
			if (occurrenceNum === void 0) return text.replace(searchRegExp, replacementString);
			if (occurrenceNum < 1) return new CellError(ErrorType.VALUE, ErrorMessage.LessThanOne);
			let match;
			let i = 0;
			while ((match = searchRegExp.exec(text)) !== null) if (occurrenceNum === ++i) return text.substring(0, match.index) + replacementString + text.substring(searchRegExp.lastIndex);
			return text;
		});
	}
	find(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("FIND"), (pattern, text, startIndex) => {
			if (startIndex < 1 || startIndex > text.length) return new CellError(ErrorType.VALUE, ErrorMessage.IndexBounds);
			const index = text.substring(startIndex - 1).indexOf(pattern) + startIndex;
			return index > 0 ? index : new CellError(ErrorType.VALUE, ErrorMessage.PatternNotFound);
		});
	}
	t(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("T"), (arg) => {
			if (arg instanceof CellError) return arg;
			return typeof arg === "string" ? arg : "";
		});
	}
	/**
	* Corresponds to N(value)
	*
	* Converts a value to a number according to Excel specification:
	* - Numbers return themselves
	* - Dates return their serial number (stored as numbers internally)
	* - TRUE returns 1, FALSE returns 0
	* - Error values propagate
	* - Anything else (text, empty) returns 0
	* - For ranges, uses the first cell value
	*/
	n(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("N"), (arg) => {
			var _a;
			const value = arg instanceof SimpleRangeValue ? (_a = arg.data[0]) === null || _a === void 0 ? void 0 : _a[0] : arg;
			if (value instanceof CellError) return value;
			if (typeof value === "number") return value;
			if (typeof value === "boolean") return value ? 1 : 0;
			return 0;
		});
	}
	upper(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("UPPER"), (arg) => {
			return arg.toUpperCase();
		});
	}
	/**
	* Corresponds to VALUE(text)
	*
	* Converts a text string that represents a number to a number.
	*
	* @param {ProcedureAst} ast - The procedure AST node
	* @param {InterpreterState} state - The interpreter state
	*/
	value(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("VALUE"), (arg) => {
			if (arg instanceof CellError) return arg;
			if (isExtendedNumber(arg)) return arg;
			if (typeof arg !== "string") return new CellError(ErrorType.VALUE, ErrorMessage.NumberCoercion);
			const trimmedArg = arg.trim();
			const parenthesesMatch = /^\(([^()]+)\)$/.exec(trimmedArg);
			if (parenthesesMatch) {
				const innerValue = this.parseStringToNumber(parenthesesMatch[1]);
				if (innerValue !== void 0) return -innerValue;
			}
			const parsedValue = this.parseStringToNumber(trimmedArg);
			if (parsedValue !== void 0) return parsedValue;
			return new CellError(ErrorType.VALUE, ErrorMessage.NumberCoercion);
		});
	}
	/**
	* Parses a string to a numeric value, handling whitespace trimming and empty string validation.
	*
	* @param {string} input - The string to parse
	* @returns {Maybe<ExtendedNumber>} The parsed number or undefined if parsing fails or input is empty
	*/
	parseStringToNumber(input) {
		const trimmedInput = input.trim();
		if (trimmedInput === "") return;
		return this.arithmeticHelper.coerceToMaybeNumber(trimmedInput);
	}
	escapeRegExpSpecialCharacters(text) {
		return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
	}
};
TextPlugin.implementedFunctions = {
	"CONCATENATE": {
		method: "concatenate",
		parameters: [{ argumentType: FunctionArgumentType.STRING }],
		repeatLastArgs: 1,
		expandRanges: true
	},
	"EXACT": {
		method: "exact",
		parameters: [{ argumentType: FunctionArgumentType.STRING }, { argumentType: FunctionArgumentType.STRING }]
	},
	"SPLIT": {
		method: "split",
		parameters: [{ argumentType: FunctionArgumentType.STRING }, { argumentType: FunctionArgumentType.NUMBER }]
	},
	"LEN": {
		method: "len",
		parameters: [{ argumentType: FunctionArgumentType.STRING }]
	},
	"LOWER": {
		method: "lower",
		parameters: [{ argumentType: FunctionArgumentType.STRING }]
	},
	"MID": {
		method: "mid",
		parameters: [
			{ argumentType: FunctionArgumentType.STRING },
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER }
		]
	},
	"TRIM": {
		method: "trim",
		parameters: [{ argumentType: FunctionArgumentType.STRING }]
	},
	"T": {
		method: "t",
		parameters: [{ argumentType: FunctionArgumentType.SCALAR }]
	},
	"N": {
		method: "n",
		parameters: [{ argumentType: FunctionArgumentType.ANY }]
	},
	"PROPER": {
		method: "proper",
		parameters: [{ argumentType: FunctionArgumentType.STRING }]
	},
	"CLEAN": {
		method: "clean",
		parameters: [{ argumentType: FunctionArgumentType.STRING }]
	},
	"REPT": {
		method: "rept",
		parameters: [{ argumentType: FunctionArgumentType.STRING }, { argumentType: FunctionArgumentType.NUMBER }]
	},
	"RIGHT": {
		method: "right",
		parameters: [{ argumentType: FunctionArgumentType.STRING }, {
			argumentType: FunctionArgumentType.NUMBER,
			defaultValue: 1
		}]
	},
	"LEFT": {
		method: "left",
		parameters: [{ argumentType: FunctionArgumentType.STRING }, {
			argumentType: FunctionArgumentType.NUMBER,
			defaultValue: 1
		}]
	},
	"REPLACE": {
		method: "replace",
		parameters: [
			{ argumentType: FunctionArgumentType.STRING },
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.STRING }
		]
	},
	"SEARCH": {
		method: "search",
		parameters: [
			{ argumentType: FunctionArgumentType.STRING },
			{ argumentType: FunctionArgumentType.STRING },
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 1
			}
		]
	},
	"SUBSTITUTE": {
		method: "substitute",
		parameters: [
			{ argumentType: FunctionArgumentType.STRING },
			{ argumentType: FunctionArgumentType.STRING },
			{ argumentType: FunctionArgumentType.STRING },
			{
				argumentType: FunctionArgumentType.NUMBER,
				optionalArg: true
			}
		]
	},
	"FIND": {
		method: "find",
		parameters: [
			{ argumentType: FunctionArgumentType.STRING },
			{ argumentType: FunctionArgumentType.STRING },
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 1
			}
		]
	},
	"UPPER": {
		method: "upper",
		parameters: [{ argumentType: FunctionArgumentType.STRING }]
	},
	"VALUE": {
		method: "value",
		parameters: [{ argumentType: FunctionArgumentType.SCALAR }]
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/TrigonometryPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Interpreter plugin containing trigonometric functions
*/
var TrigonometryPlugin = class extends FunctionPlugin {
	/**
	* Corresponds to ACOS(value)
	*
	* Returns the arc cosine (or inverse cosine) of a number.
	*
	* @param ast
	* @param state
	*/
	acos(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ACOS"), Math.acos);
	}
	asin(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ASIN"), Math.asin);
	}
	cos(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("COS"), Math.cos);
	}
	sin(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("SIN"), Math.sin);
	}
	tan(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("TAN"), Math.tan);
	}
	atan(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ATAN"), Math.atan);
	}
	atan2(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ATAN2"), (x, y) => {
			if (x === 0 && y === 0) return new CellError(ErrorType.DIV_BY_ZERO);
			return Math.atan2(y, x);
		});
	}
	cot(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("COT"), (arg) => arg === 0 ? new CellError(ErrorType.DIV_BY_ZERO) : 1 / Math.tan(arg));
	}
	acot(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ACOT"), (arg) => arg === 0 ? PI / 2 : Math.atan(1 / arg));
	}
	sec(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("SEC"), (arg) => 1 / Math.cos(arg));
	}
	csc(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("CSC"), (arg) => arg === 0 ? new CellError(ErrorType.DIV_BY_ZERO) : 1 / Math.sin(arg));
	}
	sinh(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("SINH"), Math.sinh);
	}
	asinh(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ASINH"), Math.asinh);
	}
	cosh(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("COSH"), Math.cosh);
	}
	acosh(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ACOSH"), Math.acosh);
	}
	tanh(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("TANH"), Math.tanh);
	}
	atanh(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ATANH"), Math.atanh);
	}
	coth(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("COTH"), (arg) => arg === 0 ? new CellError(ErrorType.DIV_BY_ZERO) : 1 / Math.tanh(arg));
	}
	acoth(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ACOTH"), (arg) => arg === 0 ? new CellError(ErrorType.NUM, ErrorMessage.NonZero) : Math.atanh(1 / arg));
	}
	sech(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("SECH"), (arg) => 1 / Math.cosh(arg));
	}
	csch(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("CSCH"), (arg) => arg === 0 ? new CellError(ErrorType.DIV_BY_ZERO) : 1 / Math.sinh(arg));
	}
};
TrigonometryPlugin.implementedFunctions = {
	"ACOS": {
		method: "acos",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"ASIN": {
		method: "asin",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"COS": {
		method: "cos",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"SIN": {
		method: "sin",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"TAN": {
		method: "tan",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"ATAN": {
		method: "atan",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"ATAN2": {
		method: "atan2",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, { argumentType: FunctionArgumentType.NUMBER }]
	},
	"COT": {
		method: "cot",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"SEC": {
		method: "sec",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"CSC": {
		method: "csc",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"SINH": {
		method: "sinh",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"COSH": {
		method: "cosh",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"TANH": {
		method: "tanh",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"COTH": {
		method: "coth",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"SECH": {
		method: "sech",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"CSCH": {
		method: "csch",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"ACOT": {
		method: "acot",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"ASINH": {
		method: "asinh",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"ACOSH": {
		method: "acosh",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"ATANH": {
		method: "atanh",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"ACOTH": {
		method: "acoth",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/Lookup/RowSearchStrategy.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var RowSearchStrategy = class extends AdvancedFind {
	constructor(dependencyGraph) {
		super(dependencyGraph);
		this.dependencyGraph = dependencyGraph;
	}
	find(searchKey, rangeValue, searchOptions) {
		return this.basicFind(searchKey, rangeValue, "col", searchOptions);
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/LookupPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var LookupPlugin = class extends FunctionPlugin {
	constructor() {
		super(...arguments);
		this.rowSearch = new RowSearchStrategy(this.dependencyGraph);
	}
	/**
	* Corresponds to VLOOKUP(key, range, index, [sorted])
	*
	* @param ast
	* @param state
	*/
	vlookup(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("VLOOKUP"), (key, rangeValue, index, sorted) => {
			const range = rangeValue.range;
			if (range === void 0) return new CellError(ErrorType.VALUE, ErrorMessage.WrongType);
			if (index < 1) return new CellError(ErrorType.VALUE, ErrorMessage.LessThanOne);
			if (index > range.width()) return new CellError(ErrorType.REF, ErrorMessage.IndexLarge);
			const searchOptions = {
				ordering: sorted ? "asc" : "none",
				ifNoMatch: sorted ? "returnLowerBound" : "returnNotFound"
			};
			return this.doVlookup(zeroIfEmpty(key), rangeValue, index - 1, searchOptions);
		});
	}
	/**
	* Corresponds to HLOOKUP(key, range, index, [sorted])
	*
	* @param ast
	* @param state
	*/
	hlookup(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("HLOOKUP"), (key, rangeValue, index, sorted) => {
			const range = rangeValue.range;
			if (range === void 0) return new CellError(ErrorType.VALUE, ErrorMessage.WrongType);
			if (index < 1) return new CellError(ErrorType.VALUE, ErrorMessage.LessThanOne);
			if (index > range.height()) return new CellError(ErrorType.REF, ErrorMessage.IndexLarge);
			const searchOptions = {
				ordering: sorted ? "asc" : "none",
				ifNoMatch: sorted ? "returnLowerBound" : "returnNotFound"
			};
			return this.doHlookup(zeroIfEmpty(key), rangeValue, index - 1, searchOptions);
		});
	}
	/**
	* Corresponds to XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])
	*
	* @param ast
	* @param state
	*/
	xlookup(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("XLOOKUP"), (key, lookupRangeValue, returnRangeValue, notFoundFlag, matchMode, searchMode) => {
			if (![
				0,
				-1,
				1,
				2
			].includes(matchMode)) return new CellError(ErrorType.VALUE, ErrorMessage.BadMode);
			if (![
				1,
				-1,
				2,
				-2
			].includes(searchMode)) return new CellError(ErrorType.VALUE, ErrorMessage.BadMode);
			const lookupRange = lookupRangeValue instanceof SimpleRangeValue ? lookupRangeValue : SimpleRangeValue.fromScalar(lookupRangeValue);
			const returnRange = returnRangeValue instanceof SimpleRangeValue ? returnRangeValue : SimpleRangeValue.fromScalar(returnRangeValue);
			const isWildcardMatchMode = matchMode === 2;
			const searchOptions = {
				ordering: searchMode === 2 ? "asc" : searchMode === -2 ? "desc" : "none",
				returnOccurrence: searchMode === -1 ? "last" : "first",
				ifNoMatch: matchMode === -1 ? "returnLowerBound" : matchMode === 1 ? "returnUpperBound" : "returnNotFound"
			};
			return this.doXlookup(zeroIfEmpty(key), lookupRange, returnRange, notFoundFlag, isWildcardMatchMode, searchOptions);
		});
	}
	xlookupArraySize(ast) {
		var _a, _b;
		const lookupRange = (_a = ast === null || ast === void 0 ? void 0 : ast.args) === null || _a === void 0 ? void 0 : _a[1];
		const returnRange = (_b = ast === null || ast === void 0 ? void 0 : ast.args) === null || _b === void 0 ? void 0 : _b[2];
		if ((lookupRange === null || lookupRange === void 0 ? void 0 : lookupRange.start) == null || (lookupRange === null || lookupRange === void 0 ? void 0 : lookupRange.end) == null || (returnRange === null || returnRange === void 0 ? void 0 : returnRange.start) == null || (returnRange === null || returnRange === void 0 ? void 0 : returnRange.end) == null) return ArraySize.error();
		const lookupRangeHeight = lookupRange.end.row - lookupRange.start.row + 1;
		const lookupRangeWidth = lookupRange.end.col - lookupRange.start.col + 1;
		const returnRangeHeight = returnRange.end.row - returnRange.start.row + 1;
		const returnRangeWidth = returnRange.end.col - returnRange.start.col + 1;
		const isVerticalSearch = lookupRangeWidth === 1 && returnRangeHeight === lookupRangeHeight;
		if (!isVerticalSearch && !(lookupRangeHeight === 1 && returnRangeWidth === lookupRangeWidth)) return ArraySize.error();
		if (isVerticalSearch) return new ArraySize(returnRangeWidth, 1);
		return new ArraySize(1, returnRangeHeight);
	}
	match(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("MATCH"), (key, rangeValue, type) => {
			return this.doMatch(zeroIfEmpty(key), rangeValue, type);
		});
	}
	searchInRange(key, range, isWildcardMatchMode, searchOptions, searchStrategy) {
		if (isWildcardMatchMode && typeof key === "string" && this.arithmeticHelper.requiresRegex(key)) return searchStrategy.advancedFind(this.arithmeticHelper.eqMatcherFunction(key), range, { returnOccurrence: searchOptions.returnOccurrence });
		return searchStrategy.find(key, range, searchOptions);
	}
	doVlookup(key, rangeValue, index, searchOptions) {
		this.dependencyGraph.stats.start(StatType.VLOOKUP);
		const range = rangeValue.range;
		let searchedRange;
		if (range === void 0) searchedRange = SimpleRangeValue.onlyValues(rangeValue.data.map((arg) => [arg[0]]));
		else searchedRange = SimpleRangeValue.onlyRange(AbsoluteCellRange.spanFrom(range.start, 1, range.height()), this.dependencyGraph);
		const rowIndex = this.searchInRange(key, searchedRange, searchOptions.ordering === "none", searchOptions, this.columnSearch);
		this.dependencyGraph.stats.end(StatType.VLOOKUP);
		if (rowIndex === -1) return new CellError(ErrorType.NA, ErrorMessage.ValueNotFound);
		let value;
		if (range === void 0) value = rangeValue.data[rowIndex][index];
		else {
			const address = simpleCellAddress(range.sheet, range.start.col + index, range.start.row + rowIndex);
			value = this.dependencyGraph.getCellValue(address);
		}
		if (value instanceof SimpleRangeValue) return new CellError(ErrorType.VALUE, ErrorMessage.WrongType);
		return value;
	}
	doHlookup(key, rangeValue, index, searchOptions) {
		const range = rangeValue.range;
		let searchedRange;
		if (range === void 0) searchedRange = SimpleRangeValue.onlyValues([rangeValue.data[0]]);
		else searchedRange = SimpleRangeValue.onlyRange(AbsoluteCellRange.spanFrom(range.start, range.width(), 1), this.dependencyGraph);
		const colIndex = this.searchInRange(key, searchedRange, searchOptions.ordering === "none", searchOptions, this.rowSearch);
		if (colIndex === -1) return new CellError(ErrorType.NA, ErrorMessage.ValueNotFound);
		let value;
		if (range === void 0) value = rangeValue.data[index][colIndex];
		else {
			const address = simpleCellAddress(range.sheet, range.start.col + colIndex, range.start.row + index);
			value = this.dependencyGraph.getCellValue(address);
		}
		if (value instanceof SimpleRangeValue) return new CellError(ErrorType.VALUE, ErrorMessage.WrongType);
		return value;
	}
	doXlookup(key, lookupRange, returnRange, notFoundFlag, isWildcardMatchMode, searchOptions) {
		const isVerticalSearch = lookupRange.width() === 1 && returnRange.height() === lookupRange.height();
		const isHorizontalSearch = lookupRange.height() === 1 && returnRange.width() === lookupRange.width();
		if (!isVerticalSearch && !isHorizontalSearch) return new CellError(ErrorType.VALUE, ErrorMessage.WrongDimension);
		const searchStrategy = isVerticalSearch ? this.columnSearch : this.rowSearch;
		const indexFound = this.searchInRange(key, lookupRange, isWildcardMatchMode, searchOptions, searchStrategy);
		if (indexFound === -1) return notFoundFlag == ErrorType.NA ? new CellError(ErrorType.NA, ErrorMessage.ValueNotFound) : notFoundFlag;
		const returnValues = isVerticalSearch ? [returnRange.data[indexFound]] : returnRange.data.map((row) => [row[indexFound]]);
		return SimpleRangeValue.onlyValues(returnValues);
	}
	doMatch(key, rangeValue, type) {
		if (![
			-1,
			0,
			1
		].includes(type)) return new CellError(ErrorType.VALUE, ErrorMessage.BadMode);
		if (rangeValue.width() > 1 && rangeValue.height() > 1) return new CellError(ErrorType.NA);
		const searchStrategy = rangeValue.width() === 1 ? this.columnSearch : this.rowSearch;
		const searchOptions = type === 0 ? {
			ordering: "none",
			ifNoMatch: "returnNotFound"
		} : {
			ordering: type === -1 ? "desc" : "asc",
			ifNoMatch: type === -1 ? "returnUpperBound" : "returnLowerBound"
		};
		const index = searchStrategy.find(key, rangeValue, searchOptions);
		if (index === -1) return new CellError(ErrorType.NA, ErrorMessage.ValueNotFound);
		return index + 1;
	}
};
LookupPlugin.implementedFunctions = {
	"VLOOKUP": {
		method: "vlookup",
		parameters: [
			{ argumentType: FunctionArgumentType.NOERROR },
			{ argumentType: FunctionArgumentType.RANGE },
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.BOOLEAN,
				defaultValue: true
			}
		]
	},
	"HLOOKUP": {
		method: "hlookup",
		parameters: [
			{ argumentType: FunctionArgumentType.NOERROR },
			{ argumentType: FunctionArgumentType.RANGE },
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.BOOLEAN,
				defaultValue: true
			}
		]
	},
	"XLOOKUP": {
		method: "xlookup",
		sizeOfResultArrayMethod: "xlookupArraySize",
		parameters: [
			{ argumentType: FunctionArgumentType.NOERROR },
			{ argumentType: FunctionArgumentType.RANGE },
			{ argumentType: FunctionArgumentType.RANGE },
			{
				argumentType: FunctionArgumentType.SCALAR,
				optionalArg: true,
				defaultValue: ErrorType.NA
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				optionalArg: true,
				defaultValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				optionalArg: true,
				defaultValue: 1
			}
		]
	},
	"MATCH": {
		method: "match",
		parameters: [
			{ argumentType: FunctionArgumentType.NOERROR },
			{ argumentType: FunctionArgumentType.RANGE },
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 1
			}
		]
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/RomanPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var RomanPlugin = class extends FunctionPlugin {
	roman(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ROMAN"), (val, mode) => {
			val = Math.trunc(val);
			if (mode === false) mode = 4;
			else if (mode === true) mode = 0;
			mode = getRawValue(this.coerceScalarToNumberOrError(mode));
			if (mode instanceof CellError) return mode;
			mode = Math.trunc(mode);
			if (mode < 0) return new CellError(ErrorType.VALUE, ErrorMessage.ValueSmall);
			if (mode > 4) return new CellError(ErrorType.VALUE, ErrorMessage.ValueLarge);
			return romanMode(val, mode);
		});
	}
	arabic(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ARABIC"), (inputString) => {
			inputString = inputString.trim().toUpperCase();
			let minusSign = false;
			if (inputString.startsWith("-")) {
				inputString = inputString.slice(1);
				minusSign = true;
				if (inputString === "") return new CellError(ErrorType.VALUE, ErrorMessage.InvalidRoman);
			}
			const work = {
				input: inputString,
				acc: 0
			};
			eatToken(work, {
				token: "MMM",
				val: 3e3
			}, {
				token: "MM",
				val: 2e3
			}, {
				token: "M",
				val: 1e3
			});
			eatToken(work, {
				token: "IM",
				val: 999
			}, {
				token: "VM",
				val: 995
			}, {
				token: "XM",
				val: 990
			}, {
				token: "LM",
				val: 950
			}, {
				token: "CM",
				val: 900
			});
			eatToken(work, {
				token: "D",
				val: 500
			}, {
				token: "ID",
				val: 499
			}, {
				token: "VD",
				val: 495
			}, {
				token: "XD",
				val: 490
			}, {
				token: "LD",
				val: 450
			}, {
				token: "CD",
				val: 400
			});
			eatToken(work, {
				token: "CCC",
				val: 300
			}, {
				token: "CC",
				val: 200
			}, {
				token: "C",
				val: 100
			});
			eatToken(work, {
				token: "IC",
				val: 99
			}, {
				token: "VC",
				val: 95
			}, {
				token: "XC",
				val: 90
			});
			eatToken(work, {
				token: "L",
				val: 50
			}, {
				token: "IL",
				val: 49
			}, {
				token: "VL",
				val: 45
			}, {
				token: "XL",
				val: 40
			});
			eatToken(work, {
				token: "XXX",
				val: 30
			}, {
				token: "XX",
				val: 20
			}, {
				token: "X",
				val: 10
			});
			eatToken(work, {
				token: "IX",
				val: 9
			});
			eatToken(work, {
				token: "V",
				val: 5
			}, {
				token: "IV",
				val: 4
			});
			eatToken(work, {
				token: "III",
				val: 3
			}, {
				token: "II",
				val: 2
			}, {
				token: "I",
				val: 1
			});
			if (work.input !== "") return new CellError(ErrorType.VALUE, ErrorMessage.InvalidRoman);
			else return minusSign ? -work.acc : work.acc;
		});
	}
};
RomanPlugin.implementedFunctions = {
	"ROMAN": {
		method: "roman",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 1,
			lessThan: 4e3
		}, {
			argumentType: FunctionArgumentType.NOERROR,
			optionalArg: true,
			defaultValue: 0
		}]
	},
	"ARABIC": {
		method: "arabic",
		parameters: [{ argumentType: FunctionArgumentType.STRING }]
	}
};
function eatToken(inputAcc, ...tokens) {
	for (const token of tokens) if (inputAcc.input.startsWith(token.token)) {
		inputAcc.input = inputAcc.input.slice(token.token.length);
		inputAcc.acc += token.val;
		break;
	}
}
function romanMode(input, mode) {
	const work = {
		val: input % 1e3,
		acc: "M".repeat(Math.floor(input / 1e3))
	};
	if (mode === 4) {
		absorb(work, "IM", 999, 1e3);
		absorb(work, "ID", 499, 500);
	}
	if (mode >= 3) {
		absorb(work, "VM", 995, 1e3);
		absorb(work, "VD", 495, 500);
	}
	if (mode >= 2) {
		absorb(work, "XM", 990, 1e3);
		absorb(work, "XD", 490, 500);
	}
	if (mode >= 1) {
		absorb(work, "LM", 950, 1e3);
		absorb(work, "LD", 450, 500);
	}
	absorb(work, "CM", 900, 1e3);
	absorb(work, "CD", 400, 500);
	absorb(work, "D", 500, 900);
	work.acc += "C".repeat(Math.floor(work.val / 100));
	work.val %= 100;
	if (mode >= 2) {
		absorb(work, "IC", 99, 100);
		absorb(work, "IL", 49, 50);
	}
	if (mode >= 1) {
		absorb(work, "VC", 95, 100);
		absorb(work, "VL", 45, 50);
	}
	absorb(work, "XC", 90, 100);
	absorb(work, "XL", 40, 50);
	absorb(work, "L", 50, 90);
	work.acc += "X".repeat(Math.floor(work.val / 10));
	work.val %= 10;
	absorb(work, "IX", 9, 10);
	absorb(work, "IV", 4, 5);
	absorb(work, "V", 5, 9);
	work.acc += "I".repeat(work.val);
	return work.acc;
}
function absorb(valAcc, token, lower, upper) {
	if (valAcc.val >= lower && valAcc.val < upper) {
		valAcc.val -= lower;
		valAcc.acc += token;
	}
}
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/SimpleArithmertic.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var SimpleArithmerticPlugin = class extends FunctionPlugin {
	add(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("HF.ADD"), this.arithmeticHelper.addWithEpsilon);
	}
	concat(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("HF.CONCAT"), this.arithmeticHelper.concat);
	}
	divide(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("HF.DIVIDE"), this.arithmeticHelper.divide);
	}
	eq(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("HF.EQ"), this.arithmeticHelper.eq);
	}
	gt(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("HF.GT"), this.arithmeticHelper.gt);
	}
	gte(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("HF.GTE"), this.arithmeticHelper.geq);
	}
	lt(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("HF.LT"), this.arithmeticHelper.lt);
	}
	lte(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("HF.LTE"), this.arithmeticHelper.leq);
	}
	minus(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("HF.MINUS"), this.arithmeticHelper.subtract);
	}
	multiply(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("HF.MULTIPLY"), this.arithmeticHelper.multiply);
	}
	ne(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("HF.NE"), this.arithmeticHelper.neq);
	}
	pow(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("HF.POW"), this.arithmeticHelper.pow);
	}
	uminus(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("HF.UMINUS"), this.arithmeticHelper.unaryMinus);
	}
	upercent(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("HF.UNARY_PERCENT"), this.arithmeticHelper.unaryPercent);
	}
	uplus(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("HF.UPLUS"), this.arithmeticHelper.unaryPlus);
	}
};
SimpleArithmerticPlugin.implementedFunctions = {
	"HF.ADD": {
		method: "add",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			passSubtype: true
		}, {
			argumentType: FunctionArgumentType.NUMBER,
			passSubtype: true
		}]
	},
	"HF.CONCAT": {
		method: "concat",
		parameters: [{
			argumentType: FunctionArgumentType.STRING,
			passSubtype: true
		}, {
			argumentType: FunctionArgumentType.STRING,
			passSubtype: true
		}]
	},
	"HF.DIVIDE": {
		method: "divide",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			passSubtype: true
		}, {
			argumentType: FunctionArgumentType.NUMBER,
			passSubtype: true
		}]
	},
	"HF.EQ": {
		method: "eq",
		parameters: [{
			argumentType: FunctionArgumentType.NOERROR,
			passSubtype: true
		}, {
			argumentType: FunctionArgumentType.NOERROR,
			passSubtype: true
		}]
	},
	"HF.GT": {
		method: "gt",
		parameters: [{
			argumentType: FunctionArgumentType.NOERROR,
			passSubtype: true
		}, {
			argumentType: FunctionArgumentType.NOERROR,
			passSubtype: true
		}]
	},
	"HF.GTE": {
		method: "gte",
		parameters: [{
			argumentType: FunctionArgumentType.NOERROR,
			passSubtype: true
		}, {
			argumentType: FunctionArgumentType.NOERROR,
			passSubtype: true
		}]
	},
	"HF.LT": {
		method: "lt",
		parameters: [{
			argumentType: FunctionArgumentType.NOERROR,
			passSubtype: true
		}, {
			argumentType: FunctionArgumentType.NOERROR,
			passSubtype: true
		}]
	},
	"HF.LTE": {
		method: "lte",
		parameters: [{
			argumentType: FunctionArgumentType.NOERROR,
			passSubtype: true
		}, {
			argumentType: FunctionArgumentType.NOERROR,
			passSubtype: true
		}]
	},
	"HF.MINUS": {
		method: "minus",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			passSubtype: true
		}, {
			argumentType: FunctionArgumentType.NUMBER,
			passSubtype: true
		}]
	},
	"HF.MULTIPLY": {
		method: "multiply",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			passSubtype: true
		}, {
			argumentType: FunctionArgumentType.NUMBER,
			passSubtype: true
		}]
	},
	"HF.NE": {
		method: "ne",
		parameters: [{
			argumentType: FunctionArgumentType.NOERROR,
			passSubtype: true
		}, {
			argumentType: FunctionArgumentType.NOERROR,
			passSubtype: true
		}]
	},
	"HF.POW": {
		method: "pow",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			passSubtype: true
		}, {
			argumentType: FunctionArgumentType.NUMBER,
			passSubtype: true
		}]
	},
	"HF.UMINUS": {
		method: "uminus",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			passSubtype: true
		}]
	},
	"HF.UNARY_PERCENT": {
		method: "upercent",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			passSubtype: true
		}]
	},
	"HF.UPLUS": {
		method: "uplus",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			passSubtype: true
		}]
	}
};
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/3rdparty/bessel/bessel.mjs
/**
* @license
bessel.js (C) 2013-present SheetJS -- http://sheetjs.com

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!)  The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright (C) 2013-present   SheetJS LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

*/
var M = Math;
function _horner(arr, v) {
	for (var i = 0, z = 0; i < arr.length; ++i) z = v * z + arr[i];
	return z;
}
function _bessel_iter(x, n, f0, f1, sign) {
	if (n === 0) return f0;
	if (n === 1) return f1;
	var tdx = 2 / x, f2 = f1;
	for (var o = 1; o < n; ++o) {
		f2 = f1 * o * tdx + sign * f0;
		f0 = f1;
		f1 = f2;
	}
	return f2;
}
function _bessel_wrap(bessel0, bessel1, name, nonzero, sign) {
	return function bessel(x, n) {
		if (nonzero) {
			if (x === 0) return nonzero == 1 ? -Infinity : Infinity;
			else if (x < 0) return NaN;
		}
		if (n === 0) return bessel0(x);
		if (n === 1) return bessel1(x);
		if (n < 0) return NaN;
		n |= 0;
		var b0 = bessel0(x), b1 = bessel1(x);
		return _bessel_iter(x, n, b0, b1, sign);
	};
}
var besselj = function() {
	var W = .636619772;
	var b0_a1a = [
		57568490574,
		-13362590354,
		651619640.7,
		-11214424.18,
		77392.33017,
		-184.9052456
	].reverse();
	var b0_a2a = [
		57568490411,
		1029532985,
		9494680.718,
		59272.64853,
		267.8532712,
		1
	].reverse();
	var b0_a1b = [
		1,
		-.001098628627,
		2734510407e-14,
		-2073370639e-15,
		2.093887211e-7
	].reverse();
	var b0_a2b = [
		-.01562499995,
		.0001430488765,
		-6911147651e-15,
		7.621095161e-7,
		-9.34935152e-8
	].reverse();
	function bessel0(x) {
		var a = 0, a1 = 0, a2 = 0, y = x * x;
		if (x < 8) {
			a1 = _horner(b0_a1a, y);
			a2 = _horner(b0_a2a, y);
			a = a1 / a2;
		} else {
			var xx = x - .785398164;
			y = 64 / y;
			a1 = _horner(b0_a1b, y);
			a2 = _horner(b0_a2b, y);
			a = M.sqrt(W / x) * (M.cos(xx) * a1 - M.sin(xx) * a2 * 8 / x);
		}
		return a;
	}
	var b1_a1a = [
		72362614232,
		-7895059235,
		242396853.1,
		-2972611.439,
		15704.4826,
		-30.16036606
	].reverse();
	var b1_a2a = [
		144725228442,
		2300535178,
		18583304.74,
		99447.43394,
		376.9991397,
		1
	].reverse();
	var b1_a1b = [
		1,
		.00183105,
		-3516396496e-14,
		2457520174e-15,
		-2.40337019e-7
	].reverse();
	var b1_a2b = [
		.04687499995,
		-.0002002690873,
		8449199096e-15,
		-8.8228987e-7,
		1.05787412e-7
	].reverse();
	function bessel1(x) {
		var a = 0, a1 = 0, a2 = 0, y = x * x, xx = M.abs(x) - 2.356194491;
		if (Math.abs(x) < 8) {
			a1 = x * _horner(b1_a1a, y);
			a2 = _horner(b1_a2a, y);
			a = a1 / a2;
		} else {
			y = 64 / y;
			a1 = _horner(b1_a1b, y);
			a2 = _horner(b1_a2b, y);
			a = M.sqrt(W / M.abs(x)) * (M.cos(xx) * a1 - M.sin(xx) * a2 * 8 / M.abs(x));
			if (x < 0) a = -a;
		}
		return a;
	}
	return function besselj(x, n) {
		n = Math.round(n);
		if (!isFinite(x)) return isNaN(x) ? x : 0;
		if (n < 0) return (n % 2 ? -1 : 1) * besselj(x, -n);
		if (x < 0) return (n % 2 ? -1 : 1) * besselj(-x, n);
		if (n === 0) return bessel0(x);
		if (n === 1) return bessel1(x);
		if (x === 0) return 0;
		var ret = 0;
		if (x > n) ret = _bessel_iter(x, n, bessel0(x), bessel1(x), -1);
		else {
			var m = 2 * M.floor((n + M.floor(M.sqrt(40 * n))) / 2);
			var jsum = false;
			var bjp = 0, sum = 0;
			var bj = 1, bjm = 0;
			var tox = 2 / x;
			for (var j = m; j > 0; j--) {
				bjm = j * tox * bj - bjp;
				bjp = bj;
				bj = bjm;
				if (M.abs(bj) > 1e10) {
					bj *= 1e-10;
					bjp *= 1e-10;
					ret *= 1e-10;
					sum *= 1e-10;
				}
				if (jsum) sum += bj;
				jsum = !jsum;
				if (j == n) ret = bjp;
			}
			sum = 2 * sum - bj;
			ret /= sum;
		}
		return ret;
	};
}();
var bessely = function() {
	var W = .636619772;
	var b0_a1a = [
		-2957821389,
		7062834065,
		-512359803.6,
		10879881.29,
		-86327.92757,
		228.4622733
	].reverse();
	var b0_a2a = [
		40076544269,
		745249964.8,
		7189466.438,
		47447.2647,
		226.1030244,
		1
	].reverse();
	var b0_a1b = [
		1,
		-.001098628627,
		2734510407e-14,
		-2073370639e-15,
		2.093887211e-7
	].reverse();
	var b0_a2b = [
		-.01562499995,
		.0001430488765,
		-6911147651e-15,
		7.621095161e-7,
		-9.34945152e-8
	].reverse();
	function bessel0(x) {
		var a = 0, a1 = 0, a2 = 0, y = x * x, xx = x - .785398164;
		if (x < 8) {
			a1 = _horner(b0_a1a, y);
			a2 = _horner(b0_a2a, y);
			a = a1 / a2 + W * besselj(x, 0) * M.log(x);
		} else {
			y = 64 / y;
			a1 = _horner(b0_a1b, y);
			a2 = _horner(b0_a2b, y);
			a = M.sqrt(W / x) * (M.sin(xx) * a1 + M.cos(xx) * a2 * 8 / x);
		}
		return a;
	}
	var b1_a1a = [
		-4900604943e3,
		127527439e4,
		-51534381390,
		734926455.1,
		-4237922.726,
		8511.937935
	].reverse();
	var b1_a2a = [
		249958057e5,
		424441966400,
		3733650367,
		22459040.02,
		102042.605,
		354.9632885,
		1
	].reverse();
	var b1_a1b = [
		1,
		.00183105,
		-3516396496e-14,
		2457520174e-15,
		-2.40337019e-7
	].reverse();
	var b1_a2b = [
		.04687499995,
		-.0002002690873,
		8449199096e-15,
		-8.8228987e-7,
		1.05787412e-7
	].reverse();
	function bessel1(x) {
		var a = 0, a1 = 0, a2 = 0, y = x * x, xx = x - 2.356194491;
		if (x < 8) {
			a1 = x * _horner(b1_a1a, y);
			a2 = _horner(b1_a2a, y);
			a = a1 / a2 + W * (besselj(x, 1) * M.log(x) - 1 / x);
		} else {
			y = 64 / y;
			a1 = _horner(b1_a1b, y);
			a2 = _horner(b1_a2b, y);
			a = M.sqrt(W / x) * (M.sin(xx) * a1 + M.cos(xx) * a2 * 8 / x);
		}
		return a;
	}
	return _bessel_wrap(bessel0, bessel1, "BESSELY", 1, -1);
}();
var besseli = function() {
	var b0_a = [
		1,
		3.5156229,
		3.0899424,
		1.2067492,
		.2659732,
		.0360768,
		.0045813
	].reverse();
	var b0_b = [
		.39894228,
		.01328592,
		.00225319,
		-.00157565,
		.00916281,
		-.02057706,
		.02635537,
		-.01647633,
		.00392377
	].reverse();
	function bessel0(x) {
		if (x <= 3.75) return _horner(b0_a, x * x / (3.75 * 3.75));
		return M.exp(M.abs(x)) / M.sqrt(M.abs(x)) * _horner(b0_b, 3.75 / M.abs(x));
	}
	var b1_a = [
		.5,
		.87890594,
		.51498869,
		.15084934,
		.02658733,
		.00301532,
		32411e-8
	].reverse();
	var b1_b = [
		.39894228,
		-.03988024,
		-.00362018,
		.00163801,
		-.01031555,
		.02282967,
		-.02895312,
		.01787654,
		-.00420059
	].reverse();
	function bessel1(x) {
		if (x < 3.75) return x * _horner(b1_a, x * x / (3.75 * 3.75));
		return (x < 0 ? -1 : 1) * M.exp(M.abs(x)) / M.sqrt(M.abs(x)) * _horner(b1_b, 3.75 / M.abs(x));
	}
	return function besseli(x, n) {
		n = Math.round(n);
		if (n === 0) return bessel0(x);
		if (n === 1) return bessel1(x);
		if (n < 0) return NaN;
		if (M.abs(x) === 0) return 0;
		if (x == Infinity) return Infinity;
		var ret = 0, j, tox = 2 / M.abs(x), bip = 0, bi = 1, bim = 0;
		for (j = 2 * M.round((n + M.round(M.sqrt(40 * n))) / 2); j > 0; j--) {
			bim = j * tox * bi + bip;
			bip = bi;
			bi = bim;
			if (M.abs(bi) > 1e10) {
				bi *= 1e-10;
				bip *= 1e-10;
				ret *= 1e-10;
			}
			if (j == n) ret = bip;
		}
		ret *= besseli(x, 0) / bi;
		return x < 0 && n % 2 ? -ret : ret;
	};
}();
var besselk = function() {
	var b0_a = [
		-.57721566,
		.4227842,
		.23069756,
		.0348859,
		.00262698,
		1075e-7,
		74e-7
	].reverse();
	var b0_b = [
		1.25331414,
		-.07832358,
		.02189568,
		-.01062446,
		.00587872,
		-.0025154,
		53208e-8
	].reverse();
	function bessel0(x) {
		if (x <= 2) return -M.log(x / 2) * besseli(x, 0) + _horner(b0_a, x * x / 4);
		return M.exp(-x) / M.sqrt(x) * _horner(b0_b, 2 / x);
	}
	var b1_a = [
		1,
		.15443144,
		-.67278579,
		-.18156897,
		-.01919402,
		-.00110404,
		-4686e-8
	].reverse();
	var b1_b = [
		1.25331414,
		.23498619,
		-.0365562,
		.01504268,
		-.00780353,
		.00325614,
		-68245e-8
	].reverse();
	function bessel1(x) {
		if (x <= 2) return M.log(x / 2) * besseli(x, 1) + 1 / x * _horner(b1_a, x * x / 4);
		return M.exp(-x) / M.sqrt(x) * _horner(b1_b, 2 / x);
	}
	return _bessel_wrap(bessel0, bessel1, "BESSELK", 2, 1);
}();
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/3rdparty/jstat/jstat.mjs
/**
* @license
Copyright (c) 2013 jStat

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
function erf(x) {
	const cof = [
		-1.3026537197817094,
		.6419697923564902,
		.019476473204185836,
		-.00956151478680863,
		-.000946595344482036,
		.000366839497852761,
		42523324806907e-18,
		-20278578112534e-18,
		-1624290004647e-18,
		130365583558e-17,
		1.5626441722e-8,
		-8.5238095915e-8,
		6.529054439e-9,
		5.059343495e-9,
		-991364156e-18,
		-227365122e-18,
		96467911e-18,
		2394038e-18,
		-6886027e-18,
		894487e-18,
		313092e-18,
		-112708e-18,
		381e-18,
		7106e-18,
		-1523e-18,
		-94e-18,
		121e-18,
		-28e-18
	];
	let j = cof.length - 1;
	let isneg = false;
	let d = 0;
	let dd = 0;
	let t, ty, tmp, res;
	if (x === 0) return 0;
	if (x < 0) {
		x = -x;
		isneg = true;
	}
	t = 2 / (2 + x);
	ty = 4 * t - 2;
	for (; j > 0; j--) {
		tmp = d;
		d = ty * d - dd + cof[j];
		dd = tmp;
	}
	res = t * Math.exp(-x * x + .5 * (cof[0] + ty * d) - dd);
	return isneg ? res - 1 : 1 - res;
}
function erfc(x) {
	return 1 - erf(x);
}
function erfcinv(p) {
	let j = 0;
	let x, err, t, pp;
	if (p >= 2) return -100;
	if (p <= 0) return 100;
	pp = p < 1 ? p : 2 - p;
	t = Math.sqrt(-2 * Math.log(pp / 2));
	x = -.70711 * ((2.30753 + t * .27061) / (1 + t * (.99229 + t * .04481)) - t);
	for (; j < 2; j++) {
		err = erfc(x) - pp;
		x += err / (1.1283791670955126 * Math.exp(-x * x) - x * err);
	}
	return p < 1 ? x : -x;
}
var exponential = {
	pdf: (x, rate) => {
		return x < 0 ? 0 : rate * Math.exp(-rate * x);
	},
	cdf: (x, rate) => {
		return x < 0 ? 0 : 1 - Math.exp(-rate * x);
	}
};
function gammafn(x) {
	const p = [
		-1.716185138865495,
		24.76565080557592,
		-379.80425647094563,
		629.3311553128184,
		866.9662027904133,
		-31451.272968848367,
		-36144.413418691176,
		66456.14382024054
	];
	const q = [
		-30.8402300119739,
		315.35062697960416,
		-1015.1563674902192,
		-3107.771671572311,
		22538.11842098015,
		4755.846277527881,
		-134659.9598649693,
		-115132.2596755535
	];
	let fact = false;
	let n = 0;
	let xden = 0;
	let xnum = 0;
	let y = x;
	let i, z, yi, res;
	if (x > 171.6243769536076) return Infinity;
	if (y <= 0) {
		res = y % 1;
		if (res) {
			fact = (!(y & 1) ? 1 : -1) * Math.PI / Math.sin(Math.PI * res);
			y = 1 - y;
		} else return Infinity;
	}
	yi = y;
	if (y < 1) z = y++;
	else z = (y -= n = (y | 0) - 1) - 1;
	for (i = 0; i < 8; ++i) {
		xnum = (xnum + p[i]) * z;
		xden = xden * z + q[i];
	}
	res = xnum / xden + 1;
	if (yi < y) res /= yi;
	else if (yi > y) for (i = 0; i < n; ++i) {
		res *= y;
		y++;
	}
	if (fact) res = fact / res;
	return res;
}
var gamma = {
	pdf: function pdf(x, shape, scale) {
		if (x < 0) return 0;
		return x === 0 && shape === 1 ? 1 / scale : Math.exp((shape - 1) * Math.log(x) - x / scale - gammaln(shape) - shape * Math.log(scale));
	},
	cdf: function cdf(x, shape, scale) {
		if (x < 0) return 0;
		return lowRegGamma(shape, x / scale);
	},
	inv: function(p, shape, scale) {
		return gammapinv(p, shape) * scale;
	}
};
function gammaln(x) {
	let j = 0;
	const cof = [
		76.18009172947146,
		-86.50532032941678,
		24.01409824083091,
		-1.231739572450155,
		.001208650973866179,
		-5395239384953e-18
	];
	let ser = 1.000000000190015;
	let xx, y, tmp;
	tmp = (y = xx = x) + 5.5;
	tmp -= (xx + .5) * Math.log(tmp);
	for (; j < 6; j++) ser += cof[j] / ++y;
	return Math.log(2.5066282746310007 * ser / xx) - tmp;
}
function lowRegGamma(a, x) {
	const aln = gammaln(a);
	let ap = a;
	let sum = 1 / a;
	let del = sum;
	let b = x + 1 - a;
	let c = 1 / 1e-30;
	let d = 1 / b;
	let h = d;
	let i = 1;
	const ITMAX = -~(Math.log(a >= 1 ? a : 1 / a) * 8.5 + a * .4 + 17);
	let an;
	if (x < 0 || a <= 0) return NaN;
	else if (x < a + 1) {
		for (; i <= ITMAX; i++) sum += del *= x / ++ap;
		return sum * Math.exp(-x + a * Math.log(x) - aln);
	}
	for (; i <= ITMAX; i++) {
		an = -i * (i - a);
		b += 2;
		d = an * d + b;
		c = b + an / c;
		d = 1 / d;
		h *= d * c;
	}
	return 1 - h * Math.exp(-x + a * Math.log(x) - aln);
}
function gammapinv(p, a) {
	let j = 0;
	const a1 = a - 1;
	const EPS = 1e-8;
	const gln = gammaln(a);
	let x, err, t, u, pp;
	let lna1;
	let afac;
	if (p >= 1) return Math.max(100, a + 100 * Math.sqrt(a));
	if (p <= 0) return 0;
	if (a > 1) {
		lna1 = Math.log(a1);
		afac = Math.exp(a1 * (lna1 - 1) - gln);
		pp = p < .5 ? p : 1 - p;
		t = Math.sqrt(-2 * Math.log(pp));
		x = (2.30753 + t * .27061) / (1 + t * (.99229 + t * .04481)) - t;
		if (p < .5) x = -x;
		x = Math.max(.001, a * Math.pow(1 - 1 / (9 * a) - x / (3 * Math.sqrt(a)), 3));
	} else {
		t = 1 - a * (.253 + a * .12);
		if (p < t) x = Math.pow(p / t, 1 / a);
		else x = 1 - Math.log(1 - (p - t) / (1 - t));
	}
	for (; j < 12; j++) {
		if (x <= 0) return 0;
		err = lowRegGamma(a, x) - p;
		if (a > 1) t = afac * Math.exp(-(x - a1) + a1 * (Math.log(x) - lna1));
		else t = Math.exp(-x + a1 * Math.log(x) - gln);
		u = err / t;
		x -= t = u / (1 - .5 * Math.min(1, u * ((a - 1) / x - 1)));
		if (x <= 0) x = .5 * (x + t);
		if (Math.abs(t) < EPS * x) break;
	}
	return x;
}
var normal = {
	pdf: function pdf(x, mean, std) {
		return Math.exp(-.5 * Math.log(2 * Math.PI) - Math.log(std) - Math.pow(x - mean, 2) / (2 * std * std));
	},
	cdf: function cdf(x, mean, std) {
		return .5 * (1 + erf((x - mean) / Math.sqrt(2 * std * std)));
	},
	inv: function(p, mean, std) {
		return -1.4142135623730951 * std * erfcinv(2 * p) + mean;
	}
};
var beta = {
	pdf: function pdf(x, alpha, beta) {
		if (x > 1 || x < 0) return 0;
		if (alpha == 1 && beta == 1) return 1;
		if (alpha < 512 && beta < 512) return Math.pow(x, alpha - 1) * Math.pow(1 - x, beta - 1) / betafn(alpha, beta);
		else return Math.exp((alpha - 1) * Math.log(x) + (beta - 1) * Math.log(1 - x) - betaln(alpha, beta));
	},
	cdf: function cdf(x, alpha, beta) {
		return x > 1 || x < 0 ? +(x > 1) : ibeta(x, alpha, beta);
	},
	inv: function inv(x, alpha, beta) {
		return ibetainv(x, alpha, beta);
	}
};
function betafn(x, y) {
	if (x <= 0 || y <= 0) return;
	return x + y > 170 ? Math.exp(betaln(x, y)) : gammafn(x) * gammafn(y) / gammafn(x + y);
}
function betaln(x, y) {
	return gammaln(x) + gammaln(y) - gammaln(x + y);
}
function ibetainv(p, a, b) {
	var EPS = 1e-8;
	var a1 = a - 1;
	var b1 = b - 1;
	var j = 0;
	var lna, lnb, pp, t, u, err, x, al, h, w, afac;
	if (p <= 0) return 0;
	if (p >= 1) return 1;
	if (a >= 1 && b >= 1) {
		pp = p < .5 ? p : 1 - p;
		t = Math.sqrt(-2 * Math.log(pp));
		x = (2.30753 + t * .27061) / (1 + t * (.99229 + t * .04481)) - t;
		if (p < .5) x = -x;
		al = (x * x - 3) / 6;
		h = 2 / (1 / (2 * a - 1) + 1 / (2 * b - 1));
		w = x * Math.sqrt(al + h) / h - (1 / (2 * b - 1) - 1 / (2 * a - 1)) * (al + 5 / 6 - 2 / (3 * h));
		x = a / (a + b * Math.exp(2 * w));
	} else {
		lna = Math.log(a / (a + b));
		lnb = Math.log(b / (a + b));
		t = Math.exp(a * lna) / a;
		u = Math.exp(b * lnb) / b;
		w = t + u;
		if (p < t / w) x = Math.pow(a * w * p, 1 / a);
		else x = 1 - Math.pow(b * w * (1 - p), 1 / b);
	}
	afac = -gammaln(a) - gammaln(b) + gammaln(a + b);
	for (; j < 10; j++) {
		if (x === 0 || x === 1) return x;
		err = ibeta(x, a, b) - p;
		t = Math.exp(a1 * Math.log(x) + b1 * Math.log(1 - x) + afac);
		u = err / t;
		x -= t = u / (1 - .5 * Math.min(1, u * (a1 / x - b1 / (1 - x))));
		if (x <= 0) x = .5 * (x + t);
		if (x >= 1) x = .5 * (x + t + 1);
		if (Math.abs(t) < EPS * x && j > 0) break;
	}
	return x;
}
function ibeta(x, a, b) {
	var bt = x === 0 || x === 1 ? 0 : Math.exp(gammaln(a + b) - gammaln(a) - gammaln(b) + a * Math.log(x) + b * Math.log(1 - x));
	if (x < 0 || x > 1) return false;
	if (x < (a + 1) / (a + b + 2)) return bt * betacf(x, a, b) / a;
	return 1 - bt * betacf(1 - x, b, a) / b;
}
function betacf(x, a, b) {
	var fpmin = 1e-30;
	var m = 1;
	var qab = a + b;
	var qap = a + 1;
	var qam = a - 1;
	var c = 1;
	var d = 1 - qab * x / qap;
	var m2, aa, del, h;
	if (Math.abs(d) < fpmin) d = fpmin;
	d = 1 / d;
	h = d;
	for (; m <= 100; m++) {
		m2 = 2 * m;
		aa = m * (b - m) * x / ((qam + m2) * (a + m2));
		d = 1 + aa * d;
		if (Math.abs(d) < fpmin) d = fpmin;
		c = 1 + aa / c;
		if (Math.abs(c) < fpmin) c = fpmin;
		d = 1 / d;
		h *= d * c;
		aa = -(a + m) * (qab + m) * x / ((a + m2) * (qap + m2));
		d = 1 + aa * d;
		if (Math.abs(d) < fpmin) d = fpmin;
		c = 1 + aa / c;
		if (Math.abs(c) < fpmin) c = fpmin;
		d = 1 / d;
		del = d * c;
		h *= del;
		if (Math.abs(del - 1) < 3e-7) break;
	}
	return h;
}
var binomial = {
	pdf: function(k, n, p) {
		return p === 0 || p === 1 ? n * p === k ? 1 : 0 : combination(n, k) * Math.pow(p, k) * Math.pow(1 - p, n - k);
	},
	cdf: function(x, n, p) {
		var betacdf;
		var eps = 1e-10;
		if (x < 0) return 0;
		if (x >= n) return 1;
		if (p < 0 || p > 1 || n <= 0) return NaN;
		x = Math.floor(x);
		var z = p;
		var a = x + 1;
		var b = n - x;
		var s = a + b;
		var bt = Math.exp(gammaln(s) - gammaln(b) - gammaln(a) + a * Math.log(z) + b * Math.log(1 - z));
		if (z < (a + 1) / (s + 2)) betacdf = bt * betinc(z, a, b, eps);
		else betacdf = 1 - bt * betinc(1 - z, b, a, eps);
		return Math.round((1 - betacdf) * (1 / eps)) / (1 / eps);
	}
};
function betinc(x, a, b, eps) {
	var a0 = 0;
	var b0 = 1;
	var a1 = 1;
	var b1 = 1;
	var m9 = 0;
	var a2 = 0;
	var c9;
	while (Math.abs((a1 - a2) / a1) > eps) {
		a2 = a1;
		c9 = -(a + m9) * (a + b + m9) * x / (a + 2 * m9) / (a + 2 * m9 + 1);
		a0 = a1 + c9 * a0;
		b0 = b1 + c9 * b0;
		m9 = m9 + 1;
		c9 = m9 * (b - m9) * x / (a + 2 * m9 - 1) / (a + 2 * m9);
		a1 = a0 + c9 * a1;
		b1 = b0 + c9 * b1;
		a0 = a0 / b1;
		b0 = b0 / b1;
		a1 = a1 / b1;
		b1 = 1;
	}
	return a1 / a;
}
function combination(n, m) {
	return n > 170 || m > 170 ? Math.exp(combinationln(n, m)) : factorial(n) / factorial(m) / factorial(n - m);
}
function combinationln(n, m) {
	return factorialln(n) - factorialln(m) - factorialln(n - m);
}
function factorialln(n) {
	return n < 0 ? NaN : gammaln(n + 1);
}
function factorial(n) {
	return n < 0 ? NaN : gammafn(n + 1);
}
var chisquare = {
	pdf: function pdf(x, dof) {
		if (x < 0) return 0;
		return x === 0 && dof === 2 ? .5 : Math.exp((dof / 2 - 1) * Math.log(x) - x / 2 - dof / 2 * Math.log(2) - gammaln(dof / 2));
	},
	cdf: function cdf(x, dof) {
		if (x < 0) return 0;
		return lowRegGamma(dof / 2, x / 2);
	},
	inv: function(p, dof) {
		return 2 * gammapinv(p, .5 * dof);
	}
};
var centralF = {
	pdf: function pdf(x, df1, df2) {
		var p, q, f;
		if (x < 0) return 0;
		if (df1 <= 2) {
			if (x === 0 && df1 < 2) return Infinity;
			if (x === 0 && df1 === 2) return 1;
			return 1 / betafn(df1 / 2, df2 / 2) * Math.pow(df1 / df2, df1 / 2) * Math.pow(x, df1 / 2 - 1) * Math.pow(1 + df1 / df2 * x, -(df1 + df2) / 2);
		}
		p = df1 * x / (df2 + x * df1);
		q = df2 / (df2 + x * df1);
		f = df1 * q / 2;
		return f * binomial.pdf((df1 - 2) / 2, (df1 + df2 - 2) / 2, p);
	},
	cdf: function cdf(x, df1, df2) {
		if (x < 0) return 0;
		return ibeta(df1 * x / (df1 * x + df2), df1 / 2, df2 / 2);
	},
	inv: function inv(x, df1, df2) {
		return df2 / (df1 * (1 / ibetainv(x, df1 / 2, df2 / 2) - 1));
	}
};
var weibull = {
	pdf: function pdf(x, scale, shape) {
		if (x < 0 || scale < 0 || shape < 0) return 0;
		return shape / scale * Math.pow(x / scale, shape - 1) * Math.exp(-Math.pow(x / scale, shape));
	},
	cdf: function cdf(x, scale, shape) {
		return x < 0 ? 0 : 1 - Math.exp(-Math.pow(x / scale, shape));
	}
};
var poisson = {
	pdf: function pdf(k, l) {
		if (l < 0 || k % 1 !== 0 || k < 0) return 0;
		return Math.pow(l, k) * Math.exp(-l) / factorial(k);
	},
	cdf: function cdf(x, l) {
		var k = 0;
		if (x < 0) return 0;
		var sum = 0;
		for (; k <= x; k++) sum += poisson.pdf(k, l);
		return sum;
	}
};
var hypgeom = {
	pdf: function pdf(k, N, m, n) {
		if (k < 0 || k < m - (N - n)) return 0;
		else if (k > n || k > m) return 0;
		else if (m * 2 > N) if (n * 2 > N) return hypgeom.pdf(N - m - n + k, N, N - m, N - n);
		else return hypgeom.pdf(n - k, N, N - m, n);
		else if (n * 2 > N) return hypgeom.pdf(m - k, N, m, N - n);
		else if (m < n) return hypgeom.pdf(k, N, n, m);
		else {
			var scaledPDF = 1;
			var samplesDone = 0;
			for (var i = 0; i < k; i++) {
				while (scaledPDF > 1 && samplesDone < n) {
					scaledPDF *= 1 - m / (N - samplesDone);
					samplesDone++;
				}
				scaledPDF *= (n - i) * (m - i) / ((i + 1) * (N - m - n + i + 1));
			}
			for (; samplesDone < n; samplesDone++) scaledPDF *= 1 - m / (N - samplesDone);
			return Math.min(1, Math.max(0, scaledPDF));
		}
	},
	cdf: function cdf(x, N, m, n) {
		if (x < 0 || x < m - (N - n)) return 0;
		else if (x >= n || x >= m) return 1;
		else if (m * 2 > N) if (n * 2 > N) return cdf(N - m - n + x, N, N - m, N - n);
		else return 1 - hypgeom.cdf(n - x - 1, N, N - m, n);
		else if (n * 2 > N) return 1 - hypgeom.cdf(m - x - 1, N, m, N - n);
		else if (m < n) return hypgeom.cdf(x, N, n, m);
		else {
			var scaledCDF = 1;
			var scaledPDF = 1;
			var samplesDone = 0;
			for (var i = 0; i < x; i++) {
				while (scaledCDF > 1 && samplesDone < n) {
					var factor = 1 - m / (N - samplesDone);
					scaledPDF *= factor;
					scaledCDF *= factor;
					samplesDone++;
				}
				scaledPDF *= (n - i) * (m - i) / ((i + 1) * (N - m - n + i + 1));
				scaledCDF += scaledPDF;
			}
			for (; samplesDone < n; samplesDone++) scaledCDF *= 1 - m / (N - samplesDone);
			return Math.min(1, Math.max(0, scaledCDF));
		}
	}
};
var studentt = {
	pdf: function pdf(x, dof) {
		dof = dof > 1e100 ? 1e100 : dof;
		return 1 / (Math.sqrt(dof) * betafn(.5, dof / 2)) * Math.pow(1 + x * x / dof, -((dof + 1) / 2));
	},
	cdf: function cdf(x, dof) {
		var dof2 = dof / 2;
		return ibeta((x + Math.sqrt(x * x + dof)) / (2 * Math.sqrt(x * x + dof)), dof2, dof2);
	},
	inv: function(p, dof) {
		var x = ibetainv(2 * Math.min(p, 1 - p), .5 * dof, .5);
		x = Math.sqrt(dof * (1 - x) / x);
		return p > .5 ? x : -x;
	}
};
var lognormal = {
	pdf: function pdf(x, mu, sigma) {
		if (x <= 0) return 0;
		return Math.exp(-Math.log(x) - .5 * Math.log(2 * Math.PI) - Math.log(sigma) - Math.pow(Math.log(x) - mu, 2) / (2 * sigma * sigma));
	},
	cdf: function cdf(x, mu, sigma) {
		if (x < 0) return 0;
		return .5 + .5 * erf((Math.log(x) - mu) / Math.sqrt(2 * sigma * sigma));
	},
	inv: function(p, mu, sigma) {
		return Math.exp(-1.4142135623730951 * sigma * erfcinv(2 * p) + mu);
	}
};
var negbin = {
	pdf: function pdf(k, r, p) {
		if (k !== k >>> 0) return false;
		if (k < 0) return 0;
		return combination(k + r - 1, r - 1) * Math.pow(1 - p, k) * Math.pow(p, r);
	},
	cdf: function cdf(x, r, p) {
		var sum = 0, k = 0;
		if (x < 0) return 0;
		for (; k <= x; k++) sum += negbin.pdf(k, r, p);
		return sum;
	}
};
function sum(arr) {
	var sum = 0;
	var i = arr.length;
	while (--i >= 0) sum += arr[i];
	return sum;
}
function mean(arr) {
	return sum(arr) / arr.length;
}
function sumsqerr(arr) {
	var meanv = mean(arr);
	var sum = 0;
	var i = arr.length;
	var tmp;
	while (--i >= 0) {
		tmp = arr[i] - meanv;
		sum += tmp * tmp;
	}
	return sum;
}
function variance(arr, flag) {
	return sumsqerr(arr) / (arr.length - (flag ? 1 : 0));
}
function stdev(arr, flag) {
	return Math.sqrt(variance(arr, flag));
}
function normalci() {
	var args = [].slice.call(arguments), ans = new Array(2), change;
	if (args.length === 4) change = Math.abs(normal.inv(args[1] / 2, 0, 1) * args[2] / Math.sqrt(args[3]));
	else change = Math.abs(normal.inv(args[1] / 2, 0, 1) * stdev(args[2]) / Math.sqrt(args[2].length));
	ans[0] = args[0] - change;
	ans[1] = args[0] + change;
	return ans;
}
function tci() {
	var args = [].slice.call(arguments), ans = new Array(2), change;
	if (args.length === 4) change = Math.abs(studentt.inv(args[1] / 2, args[3] - 1) * args[2] / Math.sqrt(args[3]));
	else change = Math.abs(studentt.inv(args[1] / 2, args[2].length - 1) * stdev(args[2], true) / Math.sqrt(args[2].length));
	ans[0] = args[0] - change;
	ans[1] = args[0] + change;
	return ans;
}
function product(arr) {
	var prod = 1;
	var i = arr.length;
	while (--i >= 0) prod *= arr[i];
	return prod;
}
function geomean(arr) {
	return Math.pow(product(arr), 1 / arr.length);
}
function covariance(arr1, arr2) {
	var u = mean(arr1);
	var v = mean(arr2);
	var arr1Len = arr1.length;
	var sq_dev = new Array(arr1Len);
	var i;
	for (i = 0; i < arr1Len; i++) sq_dev[i] = (arr1[i] - u) * (arr2[i] - v);
	return sum(sq_dev) / (arr1Len - 1);
}
function corrcoeff(arr1, arr2) {
	return covariance(arr1, arr2) / stdev(arr1, 1) / stdev(arr2, 1);
}
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/StatisticalPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var StatisticalPlugin = class extends FunctionPlugin {
	erf(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ERF"), (lowerBound, upperBound) => {
			if (upperBound === void 0) return erf(lowerBound);
			else return erf(upperBound) - erf(lowerBound);
		});
	}
	erfc(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("ERFC"), erfc);
	}
	expondist(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("EXPON.DIST"), (x, lambda, cumulative) => {
			if (cumulative) return exponential.cdf(x, lambda);
			else return exponential.pdf(x, lambda);
		});
	}
	fisher(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("FISHER"), (x) => Math.log((1 + x) / (1 - x)) / 2);
	}
	fisherinv(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("FISHERINV"), (y) => 1 - 2 / (Math.exp(2 * y) + 1));
	}
	gamma(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("GAMMA"), gammafn);
	}
	gammadist(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("GAMMA.DIST"), (value, alphaVal, betaVal, cumulative) => {
			if (cumulative) return gamma.cdf(value, alphaVal, betaVal);
			else return gamma.pdf(value, alphaVal, betaVal);
		});
	}
	gammaln(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("GAMMALN"), gammaln);
	}
	gammainv(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("GAMMA.INV"), gamma.inv);
	}
	gauss(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("GAUSS"), (z) => normal.cdf(z, 0, 1) - .5);
	}
	betadist(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("BETA.DIST"), (x, alphaVal, betaVal, cumulative, A, B) => {
			if (x <= A) return new CellError(ErrorType.NUM, ErrorMessage.ValueSmall);
			else if (x >= B) return new CellError(ErrorType.NUM, ErrorMessage.ValueLarge);
			x = (x - A) / (B - A);
			if (cumulative) return beta.cdf(x, alphaVal, betaVal);
			else return beta.pdf(x, alphaVal, betaVal);
		});
	}
	betainv(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("BETA.INV"), (x, alphaVal, betaVal, A, B) => {
			if (A >= B) return new CellError(ErrorType.NUM, ErrorMessage.WrongOrder);
			else return beta.inv(x, alphaVal, betaVal) * (B - A) + A;
		});
	}
	binomialdist(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("BINOM.DIST"), (succ, trials, prob, cumulative) => {
			if (succ > trials) return new CellError(ErrorType.NUM, ErrorMessage.WrongOrder);
			succ = Math.trunc(succ);
			trials = Math.trunc(trials);
			if (cumulative) return binomial.cdf(succ, trials, prob);
			else return binomial.pdf(succ, trials, prob);
		});
	}
	binomialinv(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("BINOM.INV"), (trials, prob, alpha) => {
			trials = Math.trunc(trials);
			let lower = -1;
			let upper = trials;
			while (upper > lower + 1) {
				const mid = Math.trunc((lower + upper) / 2);
				if (binomial.cdf(mid, trials, prob) >= alpha) upper = mid;
				else lower = mid;
			}
			return upper;
		});
	}
	besselifn(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("BESSELI"), (x, n) => besseli(x, Math.trunc(n)));
	}
	besseljfn(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("BESSELJ"), (x, n) => besselj(x, Math.trunc(n)));
	}
	besselkfn(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("BESSELK"), (x, n) => besselk(x, Math.trunc(n)));
	}
	besselyfn(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("BESSELY"), (x, n) => bessely(x, Math.trunc(n)));
	}
	chisqdist(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("CHISQ.DIST"), (x, deg, cumulative) => {
			deg = Math.trunc(deg);
			if (cumulative) return chisquare.cdf(x, deg);
			else return chisquare.pdf(x, deg);
		});
	}
	chisqdistrt(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("CHISQ.DIST.RT"), (x, deg) => 1 - chisquare.cdf(x, Math.trunc(deg)));
	}
	chisqinv(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("CHISQ.INV"), (p, deg) => chisquare.inv(p, Math.trunc(deg)));
	}
	chisqinvrt(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("CHISQ.INV.RT"), (p, deg) => chisquare.inv(1 - p, Math.trunc(deg)));
	}
	fdist(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("F.DIST"), (x, deg1, deg2, cumulative) => {
			deg1 = Math.trunc(deg1);
			deg2 = Math.trunc(deg2);
			if (cumulative) return centralF.cdf(x, deg1, deg2);
			else return centralF.pdf(x, deg1, deg2);
		});
	}
	fdistrt(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("F.DIST.RT"), (x, deg1, deg2) => 1 - centralF.cdf(x, Math.trunc(deg1), Math.trunc(deg2)));
	}
	finv(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("F.INV"), (p, deg1, deg2) => centralF.inv(p, Math.trunc(deg1), Math.trunc(deg2)));
	}
	finvrt(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("F.INV.RT"), (p, deg1, deg2) => centralF.inv(1 - p, Math.trunc(deg1), Math.trunc(deg2)));
	}
	weibulldist(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("WEIBULL.DIST"), (x, shape, scale, cumulative) => {
			if (cumulative) return weibull.cdf(x, scale, shape);
			else return weibull.pdf(x, scale, shape);
		});
	}
	poissondist(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("POISSON.DIST"), (x, mean, cumulative) => {
			x = Math.trunc(x);
			if (cumulative) return poisson.cdf(x, mean);
			else return poisson.pdf(x, mean);
		});
	}
	hypgeomdist(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("HYPGEOM.DIST"), (s, numberS, populationS, numberPop, cumulative) => {
			if (s > numberS || s > populationS || numberS > numberPop || populationS > numberPop) return new CellError(ErrorType.NUM, ErrorMessage.ValueLarge);
			if (s + numberPop < populationS + numberS) return new CellError(ErrorType.NUM, ErrorMessage.ValueLarge);
			s = Math.trunc(s);
			numberS = Math.trunc(numberS);
			populationS = Math.trunc(populationS);
			numberPop = Math.trunc(numberPop);
			if (cumulative) return hypgeom.cdf(s, numberPop, populationS, numberS);
			else return hypgeom.pdf(s, numberPop, populationS, numberS);
		});
	}
	tdist(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("T.DIST"), (x, deg, cumulative) => {
			deg = Math.trunc(deg);
			if (cumulative) return studentt.cdf(x, deg);
			else return studentt.pdf(x, deg);
		});
	}
	tdist2t(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("T.DIST.2T"), (x, deg) => (1 - studentt.cdf(x, Math.trunc(deg))) * 2);
	}
	tdistrt(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("T.DIST.RT"), (x, deg) => 1 - studentt.cdf(x, Math.trunc(deg)));
	}
	tdistold(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("TDIST"), (x, deg, mode) => mode * (1 - studentt.cdf(x, Math.trunc(deg))));
	}
	tinv(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("T.INV"), (p, deg) => studentt.inv(p, Math.trunc(deg)));
	}
	tinv2t(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("T.INV.2T"), (p, deg) => studentt.inv(1 - p / 2, Math.trunc(deg)));
	}
	lognormdist(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("LOGNORM.DIST"), (x, mean, stddev, cumulative) => {
			if (cumulative) return lognormal.cdf(x, mean, stddev);
			else return lognormal.pdf(x, mean, stddev);
		});
	}
	lognorminv(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("LOGNORM.INV"), (p, mean, stddev) => lognormal.inv(p, mean, stddev));
	}
	normdist(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("NORM.DIST"), (x, mean, stddev, cumulative) => {
			if (cumulative) return normal.cdf(x, mean, stddev);
			else return normal.pdf(x, mean, stddev);
		});
	}
	norminv(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("NORM.INV"), (p, mean, stddev) => normal.inv(p, mean, stddev));
	}
	normsdist(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("NORM.S.DIST"), (x, cumulative) => {
			if (cumulative) return normal.cdf(x, 0, 1);
			else return normal.pdf(x, 0, 1);
		});
	}
	normsinv(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("NORM.S.INV"), (p) => normal.inv(p, 0, 1));
	}
	phi(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("PHI"), (x) => normal.pdf(x, 0, 1));
	}
	negbinomdist(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("NEGBINOM.DIST"), (nf, ns, p, cumulative) => {
			nf = Math.trunc(nf);
			ns = Math.trunc(ns);
			if (cumulative) return negbin.cdf(nf, ns, p);
			else return negbin.pdf(nf, ns, p);
		});
	}
	confidencenorm(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("CONFIDENCE.NORM"), (alpha, stddev, size) => normalci(1, alpha, stddev, Math.trunc(size))[1] - 1);
	}
	confidencet(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("CONFIDENCE.T"), (alpha, stddev, size) => {
			size = Math.trunc(size);
			if (size === 1) return new CellError(ErrorType.DIV_BY_ZERO);
			return tci(1, alpha, stddev, size)[1] - 1;
		});
	}
	standardize(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("STANDARDIZE"), (x, mean, stddev) => (x - mean) / stddev);
	}
};
StatisticalPlugin.implementedFunctions = {
	"ERF": {
		method: "erf",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, {
			argumentType: FunctionArgumentType.NUMBER,
			optionalArg: true
		}]
	},
	"ERFC": {
		method: "erfc",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"EXPON.DIST": {
		method: "expondist",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{ argumentType: FunctionArgumentType.BOOLEAN }
		]
	},
	"FISHER": {
		method: "fisher",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			greaterThan: -1,
			lessThan: 1
		}]
	},
	"FISHERINV": {
		method: "fisherinv",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"GAMMA": {
		method: "gamma",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"GAMMA.DIST": {
		method: "gammadist",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{ argumentType: FunctionArgumentType.BOOLEAN }
		]
	},
	"GAMMALN": {
		method: "gammaln",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			greaterThan: 0
		}]
	},
	"GAMMA.INV": {
		method: "gammainv",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0,
				lessThan: 1
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			}
		]
	},
	"GAUSS": {
		method: "gauss",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"BETA.DIST": {
		method: "betadist",
		parameters: [
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{ argumentType: FunctionArgumentType.BOOLEAN },
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 1
			}
		]
	},
	"BETA.INV": {
		method: "betainv",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0,
				maxValue: 1
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				defaultValue: 1
			}
		]
	},
	"BINOM.DIST": {
		method: "binomialdist",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0,
				maxValue: 1
			},
			{ argumentType: FunctionArgumentType.BOOLEAN }
		]
	},
	"BINOM.INV": {
		method: "binomialinv",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0,
				maxValue: 1
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0,
				lessThan: 1
			}
		]
	},
	"BESSELI": {
		method: "besselifn",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, {
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}]
	},
	"BESSELJ": {
		method: "besseljfn",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, {
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}]
	},
	"BESSELK": {
		method: "besselkfn",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, {
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}]
	},
	"BESSELY": {
		method: "besselyfn",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, {
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}]
	},
	"CHISQ.DIST": {
		method: "chisqdist",
		parameters: [
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 1,
				maxValue: 1e10
			},
			{ argumentType: FunctionArgumentType.BOOLEAN }
		]
	},
	"CHISQ.DIST.RT": {
		method: "chisqdistrt",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, {
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 1,
			maxValue: 1e10
		}]
	},
	"CHISQ.INV": {
		method: "chisqinv",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0,
			maxValue: 1
		}, {
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 1,
			maxValue: 1e10
		}]
	},
	"CHISQ.INV.RT": {
		method: "chisqinvrt",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0,
			maxValue: 1
		}, {
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 1
		}]
	},
	"F.DIST": {
		method: "fdist",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 1
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 1
			},
			{ argumentType: FunctionArgumentType.BOOLEAN }
		]
	},
	"F.DIST.RT": {
		method: "fdistrt",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 1
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 1
			}
		]
	},
	"F.INV": {
		method: "finv",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0,
				maxValue: 1
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 1
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 1
			}
		]
	},
	"F.INV.RT": {
		method: "finvrt",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0,
				maxValue: 1
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 1
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 1
			}
		]
	},
	"WEIBULL.DIST": {
		method: "weibulldist",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{ argumentType: FunctionArgumentType.BOOLEAN }
		]
	},
	"POISSON.DIST": {
		method: "poissondist",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{ argumentType: FunctionArgumentType.BOOLEAN }
		]
	},
	"HYPGEOM.DIST": {
		method: "hypgeomdist",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{ argumentType: FunctionArgumentType.BOOLEAN }
		]
	},
	"T.DIST": {
		method: "tdist",
		parameters: [
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 1
			},
			{ argumentType: FunctionArgumentType.BOOLEAN }
		]
	},
	"T.DIST.2T": {
		method: "tdist2t",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}, {
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 1
		}]
	},
	"T.DIST.RT": {
		method: "tdistrt",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, {
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 1
		}]
	},
	"TDIST": {
		method: "tdistold",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 1
			},
			{
				argumentType: FunctionArgumentType.INTEGER,
				minValue: 1,
				maxValue: 2
			}
		]
	},
	"T.INV": {
		method: "tinv",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			greaterThan: 0,
			lessThan: 1
		}, {
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 1
		}]
	},
	"T.INV.2T": {
		method: "tinv2t",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			greaterThan: 0,
			maxValue: 1
		}, {
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 1
		}]
	},
	"LOGNORM.DIST": {
		method: "lognormdist",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{ argumentType: FunctionArgumentType.BOOLEAN }
		]
	},
	"LOGNORM.INV": {
		method: "lognorminv",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0,
				lessThan: 1
			},
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			}
		]
	},
	"NORM.DIST": {
		method: "normdist",
		parameters: [
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{ argumentType: FunctionArgumentType.BOOLEAN }
		]
	},
	"NORM.INV": {
		method: "norminv",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0,
				lessThan: 1
			},
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			}
		]
	},
	"NORM.S.DIST": {
		method: "normsdist",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, { argumentType: FunctionArgumentType.BOOLEAN }]
	},
	"NORM.S.INV": {
		method: "normsinv",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			greaterThan: 0,
			lessThan: 1
		}]
	},
	"PHI": {
		method: "phi",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"NEGBINOM.DIST": {
		method: "negbinomdist",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 1
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 0,
				maxValue: 1
			},
			{ argumentType: FunctionArgumentType.BOOLEAN }
		]
	},
	"CONFIDENCE.NORM": {
		method: "confidencenorm",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0,
				lessThan: 1
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 1
			}
		]
	},
	"CONFIDENCE.T": {
		method: "confidencet",
		parameters: [
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0,
				lessThan: 1
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			},
			{
				argumentType: FunctionArgumentType.NUMBER,
				minValue: 1
			}
		]
	},
	"STANDARDIZE": {
		method: "standardize",
		parameters: [
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.NUMBER,
				greaterThan: 0
			}
		]
	}
};
StatisticalPlugin.aliases = {
	NEGBINOMDIST: "NEGBINOM.DIST",
	EXPONDIST: "EXPON.DIST",
	BETADIST: "BETA.DIST",
	NORMDIST: "NORM.DIST",
	NORMINV: "NORM.INV",
	NORMSDIST: "NORM.S.DIST",
	NORMSINV: "NORM.S.INV",
	LOGNORMDIST: "LOGNORM.DIST",
	LOGINV: "LOGNORM.INV",
	TINV: "T.INV.2T",
	HYPGEOMDIST: "HYPGEOM.DIST",
	POISSON: "POISSON.DIST",
	WEIBULL: "WEIBULL.DIST",
	FINV: "F.INV.RT",
	FDIST: "F.DIST.RT",
	CHIDIST: "CHISQ.DIST.RT",
	CHIINV: "CHISQ.INV.RT",
	GAMMADIST: "GAMMA.DIST",
	"GAMMALN.PRECISE": "GAMMALN",
	GAMMAINV: "GAMMA.INV",
	BETAINV: "BETA.INV",
	BINOMDIST: "BINOM.DIST",
	CONFIDENCE: "CONFIDENCE.NORM",
	CRITBINOM: "BINOM.INV",
	WEIBULLDIST: "WEIBULL.DIST",
	TINV2T: "T.INV.2T",
	TDISTRT: "T.DIST.RT",
	TDIST2T: "T.DIST.2T",
	FINVRT: "F.INV.RT",
	FDISTRT: "F.DIST.RT",
	CHIDISTRT: "CHISQ.DIST.RT",
	CHIINVRT: "CHISQ.INV.RT",
	LOGNORMINV: "LOGNORM.INV",
	POISSONDIST: "POISSON.DIST"
};
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/MathPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var MathPlugin = class extends FunctionPlugin {
	fact(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("FACT"), (arg) => {
			arg = Math.trunc(arg);
			let ret = 1;
			for (let i = 1; i <= arg; i++) ret *= i;
			return ret;
		});
	}
	factdouble(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("FACTDOUBLE"), (arg) => {
			arg = Math.trunc(arg);
			let ret = 1;
			for (let i = arg; i >= 1; i -= 2) ret *= i;
			return ret;
		});
	}
	combin(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("COMBIN"), (n, m) => {
			if (m > n) return new CellError(ErrorType.NUM, ErrorMessage.WrongOrder);
			n = Math.trunc(n);
			m = Math.trunc(m);
			return combin(n, m);
		});
	}
	combina(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("COMBINA"), (n, m) => {
			n = Math.trunc(n);
			m = Math.trunc(m);
			if (n + m - 1 >= 1030) return new CellError(ErrorType.NUM, ErrorMessage.ValueLarge);
			if (n === 0 && m === 0) return 1;
			return combin(n + m - 1, m);
		});
	}
	gcd(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("GCD"), (...args) => {
			const processedArgs = this.arithmeticHelper.coerceNumbersCoerceRangesDropNulls(args);
			if (processedArgs instanceof CellError) return processedArgs;
			let ret = 0;
			for (const val of processedArgs) {
				if (val < 0) return new CellError(ErrorType.NUM, ErrorMessage.ValueSmall);
				ret = binaryGCD(ret, Math.trunc(val));
			}
			if (ret > Number.MAX_SAFE_INTEGER) return new CellError(ErrorType.NUM, ErrorMessage.ValueLarge);
			return ret;
		});
	}
	lcm(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("LCM"), (...args) => {
			const processedArgs = this.arithmeticHelper.coerceNumbersCoerceRangesDropNulls(args);
			if (processedArgs instanceof CellError) return processedArgs;
			let ret = 1;
			for (const val of processedArgs) {
				if (val < 0) return new CellError(ErrorType.NUM, ErrorMessage.ValueSmall);
				ret = binaryLCM(ret, Math.trunc(val));
			}
			if (ret > Number.MAX_SAFE_INTEGER) return new CellError(ErrorType.NUM, ErrorMessage.ValueLarge);
			return ret;
		});
	}
	mround(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("MROUND"), (nom, denom) => {
			if (denom === 0) return 0;
			if (nom > 0 && denom < 0 || nom < 0 && denom > 0) return new CellError(ErrorType.NUM, ErrorMessage.DistinctSigns);
			return Math.round(nom / denom) * denom;
		});
	}
	multinomial(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("MULTINOMIAL"), (...args) => {
			let n = 0;
			let ans = 1;
			for (let arg of args) {
				if (arg < 0) return new CellError(ErrorType.NUM, ErrorMessage.ValueSmall);
				arg = Math.trunc(arg);
				for (let i = 1; i <= arg; i++) ans *= (n + i) / i;
				n += arg;
			}
			return Math.round(ans);
		});
	}
	quotient(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("QUOTIENT"), (nom, denom) => {
			if (denom === 0) return new CellError(ErrorType.DIV_BY_ZERO);
			return Math.trunc(nom / denom);
		});
	}
	seriessum(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("SERIESSUM"), (x, n, m, range) => {
			const coefs = this.arithmeticHelper.manyToOnlyNumbersDropNulls(range.valuesFromTopLeftCorner());
			if (coefs instanceof CellError) return coefs;
			let ret = 0;
			coefs.reverse();
			for (const coef of coefs) {
				ret *= Math.pow(x, m);
				ret += coef;
			}
			return ret * Math.pow(x, n);
		});
	}
	sign(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("SIGN"), (arg) => {
			if (arg > 0) return 1;
			else if (arg < 0) return -1;
			else return 0;
		});
	}
	sumx2my2(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("SUMX2MY2"), (rangeX, rangeY) => {
			const valsX = rangeX.valuesFromTopLeftCorner();
			const valsY = rangeY.valuesFromTopLeftCorner();
			if (valsX.length !== valsY.length) return new CellError(ErrorType.NA, ErrorMessage.EqualLength);
			const n = valsX.length;
			let ret = 0;
			for (let i = 0; i < n; i++) {
				const valX = valsX[i];
				const valY = valsY[i];
				if (valX instanceof CellError) return valX;
				if (valY instanceof CellError) return valY;
				if (typeof valX === "number" && typeof valY === "number") ret += Math.pow(valX, 2) - Math.pow(valY, 2);
			}
			return ret;
		});
	}
	sumx2py2(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("SUMX2PY2"), (rangeX, rangeY) => {
			const valsX = rangeX.valuesFromTopLeftCorner();
			const valsY = rangeY.valuesFromTopLeftCorner();
			if (valsX.length !== valsY.length) return new CellError(ErrorType.NA, ErrorMessage.EqualLength);
			const n = valsX.length;
			let ret = 0;
			for (let i = 0; i < n; i++) {
				const valX = valsX[i];
				const valY = valsY[i];
				if (valX instanceof CellError) return valX;
				if (valY instanceof CellError) return valY;
				if (typeof valX === "number" && typeof valY === "number") ret += Math.pow(valX, 2) + Math.pow(valY, 2);
			}
			return ret;
		});
	}
	sumxmy2(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("SUMXMY2"), (rangeX, rangeY) => {
			const valsX = rangeX.valuesFromTopLeftCorner();
			const valsY = rangeY.valuesFromTopLeftCorner();
			if (valsX.length !== valsY.length) return new CellError(ErrorType.NA, ErrorMessage.EqualLength);
			const n = valsX.length;
			let ret = 0;
			for (let i = 0; i < n; i++) {
				const valX = valsX[i];
				const valY = valsY[i];
				if (valX instanceof CellError) return valX;
				if (valY instanceof CellError) return valY;
				if (typeof valX === "number" && typeof valY === "number") ret += Math.pow(valX - valY, 2);
			}
			return ret;
		});
	}
};
MathPlugin.implementedFunctions = {
	"FACT": {
		method: "fact",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0,
			maxValue: 170
		}]
	},
	"FACTDOUBLE": {
		method: "factdouble",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0,
			maxValue: 288
		}]
	},
	"COMBIN": {
		method: "combin",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0,
			lessThan: 1030
		}, {
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}]
	},
	"COMBINA": {
		method: "combina",
		parameters: [{
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}, {
			argumentType: FunctionArgumentType.NUMBER,
			minValue: 0
		}]
	},
	"GCD": {
		method: "gcd",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"LCM": {
		method: "lcm",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"MROUND": {
		method: "mround",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, { argumentType: FunctionArgumentType.NUMBER }]
	},
	"MULTINOMIAL": {
		method: "multinomial",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }],
		repeatLastArgs: 1,
		expandRanges: true
	},
	"QUOTIENT": {
		method: "quotient",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, { argumentType: FunctionArgumentType.NUMBER }]
	},
	"SERIESSUM": {
		method: "seriessum",
		parameters: [
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.RANGE }
		]
	},
	"SIGN": {
		method: "sign",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }]
	},
	"SUMX2MY2": {
		method: "sumx2my2",
		parameters: [{ argumentType: FunctionArgumentType.RANGE }, { argumentType: FunctionArgumentType.RANGE }]
	},
	"SUMX2PY2": {
		method: "sumx2py2",
		parameters: [{ argumentType: FunctionArgumentType.RANGE }, { argumentType: FunctionArgumentType.RANGE }]
	},
	"SUMXMY2": {
		method: "sumxmy2",
		parameters: [{ argumentType: FunctionArgumentType.RANGE }, { argumentType: FunctionArgumentType.RANGE }]
	}
};
function combin(n, m) {
	if (2 * m > n) m = n - m;
	let ret = 1;
	for (let i = 1; i <= m; i++) ret *= (n - m + i) / i;
	return Math.round(ret);
}
function binaryGCD(a, b) {
	if (a < b) [a, b] = [b, a];
	while (b > 0) [a, b] = [b, a % b];
	return a;
}
function binaryLCM(a, b) {
	if (a === 0 || b === 0) return 0;
	return a * (b / binaryGCD(a, b));
}
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/ComplexPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var ComplexPlugin = class extends FunctionPlugin {
	complex(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("COMPLEX"), (re, im, unit) => {
			if (unit !== "i" && unit !== "j") return new CellError(ErrorType.VALUE, ErrorMessage.ShouldBeIorJ);
			return coerceComplexToString([re, im], unit);
		});
	}
	imabs(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IMABS"), abs$2);
	}
	imaginary(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IMAGINARY"), ([_re, im]) => im);
	}
	imreal(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IMREAL"), ([re, _im]) => re);
	}
	imargument(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IMARGUMENT"), ([re, im]) => {
			if (re === 0 && im === 0) return new CellError(ErrorType.DIV_BY_ZERO);
			return Math.atan2(im, re);
		});
	}
	imconjugate(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IMCONJUGATE"), ([re, im]) => coerceComplexToString([re, -im]));
	}
	imcos(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IMCOS"), (arg) => coerceComplexToString(cos(arg)));
	}
	imcosh(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IMCOSH"), (arg) => coerceComplexToString(cosh(arg)));
	}
	imcot(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IMCOT"), (arg) => coerceComplexToString(div(cos(arg), sin(arg))));
	}
	imcsc(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IMCSC"), (arg) => coerceComplexToString(div([1, 0], sin(arg))));
	}
	imcsch(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IMCSCH"), (arg) => coerceComplexToString(div([1, 0], sinh(arg))));
	}
	imsec(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IMSEC"), (arg) => coerceComplexToString(div([1, 0], cos(arg))));
	}
	imsech(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IMSECH"), (arg) => coerceComplexToString(div([1, 0], cosh(arg))));
	}
	imsin(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IMSIN"), (arg) => coerceComplexToString(sin(arg)));
	}
	imsinh(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IMSINH"), (arg) => coerceComplexToString(sinh(arg)));
	}
	imtan(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IMTAN"), (arg) => coerceComplexToString(div(sin(arg), cos(arg))));
	}
	imdiv(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IMDIV"), (arg1, arg2) => coerceComplexToString(div(arg1, arg2)));
	}
	improduct(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IMPRODUCT"), (...args) => {
			const coerced = this.arithmeticHelper.coerceComplexExactRanges(args);
			if (coerced instanceof CellError) return coerced;
			let prod = [1, 0];
			for (const val of coerced) prod = mul(prod, val);
			return coerceComplexToString(prod);
		});
	}
	imsum(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IMSUM"), (...args) => {
			const coerced = this.arithmeticHelper.coerceComplexExactRanges(args);
			if (coerced instanceof CellError) return coerced;
			let sum = [0, 0];
			for (const val of coerced) sum = add$3(sum, val);
			return coerceComplexToString(sum);
		});
	}
	imsub(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IMSUB"), (arg1, arg2) => coerceComplexToString(sub(arg1, arg2)));
	}
	imexp(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IMEXP"), (arg) => coerceComplexToString(exp(arg)));
	}
	imln(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IMLN"), (arg) => coerceComplexToString(ln(arg)));
	}
	imlog10(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IMLOG10"), (arg) => {
			const [re, im] = ln(arg);
			const c = Math.log(10);
			return coerceComplexToString([re / c, im / c]);
		});
	}
	imlog2(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IMLOG2"), (arg) => {
			const [re, im] = ln(arg);
			const c = Math.log(2);
			return coerceComplexToString([re / c, im / c]);
		});
	}
	impower(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IMPOWER"), (arg, n) => coerceComplexToString(power(arg, n)));
	}
	imsqrt(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("IMSQRT"), (arg) => coerceComplexToString(power(arg, .5)));
	}
};
ComplexPlugin.implementedFunctions = {
	"COMPLEX": {
		method: "complex",
		parameters: [
			{ argumentType: FunctionArgumentType.NUMBER },
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.STRING,
				defaultValue: "i"
			}
		]
	},
	"IMABS": {
		method: "imabs",
		parameters: [{ argumentType: FunctionArgumentType.COMPLEX }]
	},
	"IMAGINARY": {
		method: "imaginary",
		parameters: [{ argumentType: FunctionArgumentType.COMPLEX }]
	},
	"IMREAL": {
		method: "imreal",
		parameters: [{ argumentType: FunctionArgumentType.COMPLEX }]
	},
	"IMARGUMENT": {
		method: "imargument",
		parameters: [{ argumentType: FunctionArgumentType.COMPLEX }]
	},
	"IMCONJUGATE": {
		method: "imconjugate",
		parameters: [{ argumentType: FunctionArgumentType.COMPLEX }]
	},
	"IMCOS": {
		method: "imcos",
		parameters: [{ argumentType: FunctionArgumentType.COMPLEX }]
	},
	"IMCOSH": {
		method: "imcosh",
		parameters: [{ argumentType: FunctionArgumentType.COMPLEX }]
	},
	"IMCOT": {
		method: "imcot",
		parameters: [{ argumentType: FunctionArgumentType.COMPLEX }]
	},
	"IMCSC": {
		method: "imcsc",
		parameters: [{ argumentType: FunctionArgumentType.COMPLEX }]
	},
	"IMCSCH": {
		method: "imcsch",
		parameters: [{ argumentType: FunctionArgumentType.COMPLEX }]
	},
	"IMSEC": {
		method: "imsec",
		parameters: [{ argumentType: FunctionArgumentType.COMPLEX }]
	},
	"IMSECH": {
		method: "imsech",
		parameters: [{ argumentType: FunctionArgumentType.COMPLEX }]
	},
	"IMSIN": {
		method: "imsin",
		parameters: [{ argumentType: FunctionArgumentType.COMPLEX }]
	},
	"IMSINH": {
		method: "imsinh",
		parameters: [{ argumentType: FunctionArgumentType.COMPLEX }]
	},
	"IMTAN": {
		method: "imtan",
		parameters: [{ argumentType: FunctionArgumentType.COMPLEX }]
	},
	"IMDIV": {
		method: "imdiv",
		parameters: [{ argumentType: FunctionArgumentType.COMPLEX }, { argumentType: FunctionArgumentType.COMPLEX }]
	},
	"IMPRODUCT": {
		method: "improduct",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"IMSUM": {
		method: "imsum",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"IMSUB": {
		method: "imsub",
		parameters: [{ argumentType: FunctionArgumentType.COMPLEX }, { argumentType: FunctionArgumentType.COMPLEX }]
	},
	"IMEXP": {
		method: "imexp",
		parameters: [{ argumentType: FunctionArgumentType.COMPLEX }]
	},
	"IMLN": {
		method: "imln",
		parameters: [{ argumentType: FunctionArgumentType.COMPLEX }]
	},
	"IMLOG10": {
		method: "imlog10",
		parameters: [{ argumentType: FunctionArgumentType.COMPLEX }]
	},
	"IMLOG2": {
		method: "imlog2",
		parameters: [{ argumentType: FunctionArgumentType.COMPLEX }]
	},
	"IMPOWER": {
		method: "impower",
		parameters: [{ argumentType: FunctionArgumentType.COMPLEX }, { argumentType: FunctionArgumentType.NUMBER }]
	},
	"IMSQRT": {
		method: "imsqrt",
		parameters: [{ argumentType: FunctionArgumentType.COMPLEX }]
	}
};
function add$3([re1, im1], [re2, im2]) {
	return [re1 + re2, im1 + im2];
}
function sub([re1, im1], [re2, im2]) {
	return [re1 - re2, im1 - im2];
}
function mul([re1, im1], [re2, im2]) {
	return [re1 * re2 - im1 * im2, re1 * im2 + re2 * im1];
}
function div([re1, im1], [re2, im2]) {
	const denom = Math.pow(re2, 2) + Math.pow(im2, 2);
	const [nomRe, nomIm] = mul([re1, im1], [re2, -im2]);
	return [nomRe / denom, nomIm / denom];
}
function cos([re, im]) {
	return [Math.cos(re) * Math.cosh(im), -Math.sin(re) * Math.sinh(im)];
}
function cosh([re, im]) {
	return [Math.cosh(re) * Math.cos(im), Math.sinh(re) * Math.sin(im)];
}
function sin([re, im]) {
	return [Math.sin(re) * Math.cosh(im), Math.cos(re) * Math.sinh(im)];
}
function sinh([re, im]) {
	return [Math.sinh(re) * Math.cos(im), Math.cosh(re) * Math.sin(im)];
}
function exp([re, im]) {
	return [Math.exp(re) * Math.cos(im), Math.exp(re) * Math.sin(im)];
}
function abs$2([re, im]) {
	return Math.sqrt(re * re + im * im);
}
function ln([re, im]) {
	return [Math.log(abs$2([re, im])), Math.atan2(im, re)];
}
function power(arg, n) {
	const [re, im] = ln(arg);
	return exp([n * re, n * im]);
}
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/StatisticalAggregationPlugin.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var StatisticalAggregationPlugin = class extends FunctionPlugin {
	avedev(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("AVEDEV"), (...args) => {
			const coerced = this.arithmeticHelper.coerceNumbersExactRanges(args);
			if (coerced instanceof CellError) return coerced;
			if (coerced.length === 0) return new CellError(ErrorType.DIV_BY_ZERO);
			const avg = mean(coerced);
			return coerced.reduce((a, b) => a + Math.abs(b - avg), 0) / coerced.length;
		});
	}
	devsq(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("DEVSQ"), (...args) => {
			const coerced = this.arithmeticHelper.coerceNumbersExactRanges(args);
			if (coerced instanceof CellError) return coerced;
			if (coerced.length === 0) return 0;
			return sumsqerr(coerced);
		});
	}
	geomean(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("GEOMEAN"), (...args) => {
			const coerced = this.arithmeticHelper.coerceNumbersExactRanges(args);
			if (coerced instanceof CellError) return coerced;
			if (coerced.length === 0) return new CellError(ErrorType.NUM, ErrorMessage.OneValue);
			for (const val of coerced) if (val <= 0) return new CellError(ErrorType.NUM, ErrorMessage.ValueSmall);
			return geomean(coerced);
		});
	}
	harmean(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("HARMEAN"), (...args) => {
			const coerced = this.arithmeticHelper.coerceNumbersExactRanges(args);
			if (coerced instanceof CellError) return coerced;
			if (coerced.length === 0) return new CellError(ErrorType.NUM, ErrorMessage.OneValue);
			for (const val of coerced) if (val <= 0) return new CellError(ErrorType.NUM, ErrorMessage.ValueSmall);
			return coerced.length / coerced.reduce((a, b) => a + 1 / b, 0);
		});
	}
	correl(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("CORREL"), (dataX, dataY) => {
			if (dataX.numberOfElements() !== dataY.numberOfElements()) return new CellError(ErrorType.NA, ErrorMessage.EqualLength);
			const ret = parseTwoArrays(dataX, dataY);
			if (ret instanceof CellError) return ret;
			if (ret[0].length <= 1) return new CellError(ErrorType.DIV_BY_ZERO, ErrorMessage.TwoValues);
			return corrcoeff(ret[0], ret[1]);
		});
	}
	rsq(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("RSQ"), (dataX, dataY) => {
			if (dataX.numberOfElements() !== dataY.numberOfElements()) return new CellError(ErrorType.NA, ErrorMessage.EqualLength);
			const ret = parseTwoArrays(dataX, dataY);
			if (ret instanceof CellError) return ret;
			if (ret[0].length <= 1) return new CellError(ErrorType.DIV_BY_ZERO, ErrorMessage.TwoValues);
			return Math.pow(corrcoeff(ret[0], ret[1]), 2);
		});
	}
	covariancep(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("COVARIANCE.P"), (dataX, dataY) => {
			if (dataX.numberOfElements() !== dataY.numberOfElements()) return new CellError(ErrorType.NA, ErrorMessage.EqualLength);
			const ret = parseTwoArrays(dataX, dataY);
			if (ret instanceof CellError) return ret;
			const n = ret[0].length;
			if (n < 1) return new CellError(ErrorType.DIV_BY_ZERO, ErrorMessage.OneValue);
			if (n === 1) return 0;
			return covariance(ret[0], ret[1]) * (n - 1) / n;
		});
	}
	covariances(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("COVARIANCE.S"), (dataX, dataY) => {
			if (dataX.numberOfElements() !== dataY.numberOfElements()) return new CellError(ErrorType.NA, ErrorMessage.EqualLength);
			const ret = parseTwoArrays(dataX, dataY);
			if (ret instanceof CellError) return ret;
			if (ret[0].length <= 1) return new CellError(ErrorType.DIV_BY_ZERO, ErrorMessage.TwoValues);
			return covariance(ret[0], ret[1]);
		});
	}
	ztest(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("Z.TEST"), (range, x, sigma) => {
			const vals = this.arithmeticHelper.manyToExactNumbers(range.valuesFromTopLeftCorner());
			if (vals instanceof CellError) return vals;
			const n = vals.length;
			if (sigma === void 0) {
				if (n < 2) return new CellError(ErrorType.DIV_BY_ZERO, ErrorMessage.TwoValues);
				sigma = stdev(vals, true);
			}
			if (n < 1) return new CellError(ErrorType.NA, ErrorMessage.OneValue);
			if (sigma === 0) return new CellError(ErrorType.DIV_BY_ZERO);
			return 1 - normal.cdf((mean(vals) - x) / (sigma / Math.sqrt(n)), 0, 1);
		});
	}
	ftest(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("F.TEST"), (dataX, dataY) => {
			const arrX = this.arithmeticHelper.manyToExactNumbers(dataX.valuesFromTopLeftCorner());
			const arrY = this.arithmeticHelper.manyToExactNumbers(dataY.valuesFromTopLeftCorner());
			if (arrX instanceof CellError) return arrX;
			if (arrY instanceof CellError) return arrY;
			if (arrX.length <= 1 || arrY.length <= 1) return new CellError(ErrorType.DIV_BY_ZERO);
			const vx = variance(arrX, true);
			const vy = variance(arrY, true);
			if (vx === 0 || vy === 0) return new CellError(ErrorType.DIV_BY_ZERO);
			const r = vx / vy;
			const v = centralF.cdf(r, arrX.length - 1, arrY.length - 1);
			return 2 * Math.min(v, 1 - v);
		});
	}
	steyx(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("STEYX"), (dataX, dataY) => {
			if (dataX.numberOfElements() !== dataY.numberOfElements()) return new CellError(ErrorType.NA, ErrorMessage.EqualLength);
			const ret = parseTwoArrays(dataX, dataY);
			if (ret instanceof CellError) return ret;
			const n = ret[0].length;
			if (n <= 2) return new CellError(ErrorType.DIV_BY_ZERO, ErrorMessage.ThreeValues);
			return Math.sqrt((sumsqerr(ret[0]) - Math.pow(covariance(ret[0], ret[1]) * (n - 1), 2) / sumsqerr(ret[1])) / (n - 2));
		});
	}
	slope(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("SLOPE"), (dataX, dataY) => {
			if (dataX.numberOfElements() !== dataY.numberOfElements()) return new CellError(ErrorType.NA, ErrorMessage.EqualLength);
			const ret = parseTwoArrays(dataX, dataY);
			if (ret instanceof CellError) return ret;
			const n = ret[0].length;
			if (n <= 1) return new CellError(ErrorType.DIV_BY_ZERO, ErrorMessage.TwoValues);
			return covariance(ret[0], ret[1]) * (n - 1) / sumsqerr(ret[1]);
		});
	}
	chisqtest(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("CHISQ.TEST"), (dataX, dataY) => {
			const r = dataX.height();
			const c = dataX.width();
			if (dataY.height() !== r || dataY.width() !== c) return new CellError(ErrorType.NA, ErrorMessage.EqualLength);
			const ret = parseTwoArrays(dataX, dataY);
			if (ret instanceof CellError) return ret;
			if (ret[0].length <= 1) return new CellError(ErrorType.DIV_BY_ZERO, ErrorMessage.TwoValues);
			let sum = 0;
			for (let i = 0; i < ret[0].length; i++) {
				if (ret[1][i] === 0) return new CellError(ErrorType.DIV_BY_ZERO);
				sum += Math.pow(ret[0][i] - ret[1][i], 2) / ret[1][i];
			}
			if (sum < 0) return new CellError(ErrorType.NUM, ErrorMessage.NaN);
			return 1 - chisquare.cdf(sum, r > 1 && c > 1 ? (r - 1) * (c - 1) : r * c - 1);
		});
	}
	ttest(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("T.TEST"), (dataX, dataY, tails, type) => {
			const arrX = this.arithmeticHelper.manyToExactNumbers(dataX.valuesFromTopLeftCorner());
			const arrY = this.arithmeticHelper.manyToExactNumbers(dataY.valuesFromTopLeftCorner());
			if (arrX instanceof CellError) return arrX;
			if (arrY instanceof CellError) return arrY;
			const n = arrX.length;
			const m = arrY.length;
			if (type === 1) {
				if (m !== n) return new CellError(ErrorType.NA, ErrorMessage.EqualLength);
				if (n <= 1) return new CellError(ErrorType.DIV_BY_ZERO, ErrorMessage.TwoValues);
				const sub = Array(n);
				for (let i = 0; i < n; i++) sub[i] = arrX[i] - arrY[i];
				const s = stdev(sub, true);
				if (s === 0) return new CellError(ErrorType.DIV_BY_ZERO);
				const t = Math.abs(Math.sqrt(n) * mean(sub) / s);
				return tails * (1 - studentt.cdf(t, n - 1));
			} else if (type === 2) {
				if (n <= 1 || m <= 1) return new CellError(ErrorType.DIV_BY_ZERO, ErrorMessage.TwoValues);
				const s = (sumsqerr(arrX) + sumsqerr(arrY)) / (n + m - 2);
				if (s === 0) return new CellError(ErrorType.DIV_BY_ZERO);
				const t = Math.abs((mean(arrX) - mean(arrY)) / Math.sqrt(s * (1 / n + 1 / m)));
				return tails * (1 - studentt.cdf(t, n + m - 2));
			} else {
				if (n <= 1 || m <= 1) return new CellError(ErrorType.DIV_BY_ZERO, ErrorMessage.TwoValues);
				const sx = variance(arrX, true);
				const sy = variance(arrY, true);
				if (sx === 0 && sy === 0) return new CellError(ErrorType.DIV_BY_ZERO);
				const t = Math.abs((mean(arrX) - mean(arrY)) / Math.sqrt(sx / n + sy / m));
				const v = Math.pow(sx / n + sy / m, 2) / (Math.pow(sx / n, 2) / (n - 1) + Math.pow(sy / m, 2) / (m - 1));
				return tails * (1 - studentt.cdf(t, v));
			}
		});
	}
	skew(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("SKEW"), (...args) => {
			const coerced = this.arithmeticHelper.coerceNumbersExactRanges(args);
			if (coerced instanceof CellError) return coerced;
			const n = coerced.length;
			if (n < 3) return new CellError(ErrorType.DIV_BY_ZERO, ErrorMessage.ThreeValues);
			const avg = mean(coerced);
			const s = stdev(coerced, true);
			if (s === 0) return new CellError(ErrorType.DIV_BY_ZERO);
			return coerced.reduce((a, b) => a + Math.pow((b - avg) / s, 3), 0) * n / (n - 1) / (n - 2);
		});
	}
	skewp(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("SKEW.P"), (...args) => {
			const coerced = this.arithmeticHelper.coerceNumbersExactRanges(args);
			if (coerced instanceof CellError) return coerced;
			const n = coerced.length;
			if (n < 3) return new CellError(ErrorType.DIV_BY_ZERO, ErrorMessage.ThreeValues);
			const avg = mean(coerced);
			const s = stdev(coerced, false);
			if (s === 0) return new CellError(ErrorType.DIV_BY_ZERO);
			return coerced.reduce((a, b) => a + Math.pow((b - avg) / s, 3), 0) / n;
		});
	}
};
StatisticalAggregationPlugin.implementedFunctions = {
	"AVEDEV": {
		method: "avedev",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"DEVSQ": {
		method: "devsq",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"GEOMEAN": {
		method: "geomean",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"HARMEAN": {
		method: "harmean",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"CORREL": {
		method: "correl",
		parameters: [{ argumentType: FunctionArgumentType.RANGE }, { argumentType: FunctionArgumentType.RANGE }]
	},
	"RSQ": {
		method: "rsq",
		parameters: [{ argumentType: FunctionArgumentType.RANGE }, { argumentType: FunctionArgumentType.RANGE }]
	},
	"COVARIANCE.P": {
		method: "covariancep",
		parameters: [{ argumentType: FunctionArgumentType.RANGE }, { argumentType: FunctionArgumentType.RANGE }]
	},
	"COVARIANCE.S": {
		method: "covariances",
		parameters: [{ argumentType: FunctionArgumentType.RANGE }, { argumentType: FunctionArgumentType.RANGE }]
	},
	"Z.TEST": {
		method: "ztest",
		parameters: [
			{ argumentType: FunctionArgumentType.RANGE },
			{ argumentType: FunctionArgumentType.NUMBER },
			{
				argumentType: FunctionArgumentType.NUMBER,
				optionalArg: true
			}
		]
	},
	"F.TEST": {
		method: "ftest",
		parameters: [{ argumentType: FunctionArgumentType.RANGE }, { argumentType: FunctionArgumentType.RANGE }]
	},
	"STEYX": {
		method: "steyx",
		parameters: [{ argumentType: FunctionArgumentType.RANGE }, { argumentType: FunctionArgumentType.RANGE }]
	},
	"SLOPE": {
		method: "slope",
		parameters: [{ argumentType: FunctionArgumentType.RANGE }, { argumentType: FunctionArgumentType.RANGE }]
	},
	"CHISQ.TEST": {
		method: "chisqtest",
		parameters: [{ argumentType: FunctionArgumentType.RANGE }, { argumentType: FunctionArgumentType.RANGE }]
	},
	"T.TEST": {
		method: "ttest",
		parameters: [
			{ argumentType: FunctionArgumentType.RANGE },
			{ argumentType: FunctionArgumentType.RANGE },
			{
				argumentType: FunctionArgumentType.INTEGER,
				minValue: 1,
				maxValue: 2
			},
			{
				argumentType: FunctionArgumentType.INTEGER,
				minValue: 1,
				maxValue: 3
			}
		]
	},
	"SKEW": {
		method: "skew",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	},
	"SKEW.P": {
		method: "skewp",
		parameters: [{ argumentType: FunctionArgumentType.ANY }],
		repeatLastArgs: 1
	}
};
StatisticalAggregationPlugin.aliases = {
	COVAR: "COVARIANCE.P",
	FTEST: "F.TEST",
	PEARSON: "CORREL",
	ZTEST: "Z.TEST",
	CHITEST: "CHISQ.TEST",
	TTEST: "T.TEST",
	COVARIANCEP: "COVARIANCE.P",
	COVARIANCES: "COVARIANCE.S",
	SKEWP: "SKEW.P"
};
function parseTwoArrays(dataX, dataY) {
	const xit = dataX.iterateValuesFromTopLeftCorner();
	const yit = dataY.iterateValuesFromTopLeftCorner();
	let x, y;
	const arrX = [];
	const arrY = [];
	while (x = xit.next(), y = yit.next(), !x.done && !y.done) {
		const xval = x.value;
		const yval = y.value;
		if (xval instanceof CellError) return xval;
		else if (yval instanceof CellError) return yval;
		else if (isExtendedNumber(xval) && isExtendedNumber(yval)) {
			arrX.push(getRawValue(xval));
			arrY.push(getRawValue(yval));
		}
	}
	return [arrX, arrY];
}
//#endregion
//#region ../../node_modules/hyperformula/es/interpreter/plugin/index.mjs
var plugin_exports = /* @__PURE__ */ __exportAll({
	AbsPlugin: () => AbsPlugin,
	AddressPlugin: () => AddressPlugin,
	ArrayPlugin: () => ArrayPlugin,
	BitShiftPlugin: () => BitShiftPlugin,
	BitwiseLogicOperationsPlugin: () => BitwiseLogicOperationsPlugin,
	BooleanPlugin: () => BooleanPlugin,
	CharPlugin: () => CharPlugin,
	CodePlugin: () => CodePlugin,
	ComplexPlugin: () => ComplexPlugin,
	ConditionalAggregationPlugin: () => ConditionalAggregationPlugin,
	CountBlankPlugin: () => CountBlankPlugin,
	CountUniquePlugin: () => CountUniquePlugin,
	DateTimePlugin: () => DateTimePlugin,
	DegreesPlugin: () => DegreesPlugin,
	DeltaPlugin: () => DeltaPlugin,
	ExpPlugin: () => ExpPlugin,
	FinancialPlugin: () => FinancialPlugin,
	FormulaTextPlugin: () => FormulaTextPlugin,
	HyperlinkPlugin: () => HyperlinkPlugin,
	InformationPlugin: () => InformationPlugin,
	IsEvenPlugin: () => IsEvenPlugin,
	IsOddPlugin: () => IsOddPlugin,
	LogarithmPlugin: () => LogarithmPlugin,
	LookupPlugin: () => LookupPlugin,
	MathConstantsPlugin: () => MathConstantsPlugin,
	MathPlugin: () => MathPlugin,
	MatrixPlugin: () => MatrixPlugin,
	MedianPlugin: () => MedianPlugin,
	ModuloPlugin: () => ModuloPlugin,
	NumericAggregationPlugin: () => NumericAggregationPlugin,
	PowerPlugin: () => PowerPlugin,
	RadiansPlugin: () => RadiansPlugin,
	RadixConversionPlugin: () => RadixConversionPlugin,
	RandomPlugin: () => RandomPlugin,
	RomanPlugin: () => RomanPlugin,
	RoundingPlugin: () => RoundingPlugin,
	SimpleArithmerticPlugin: () => SimpleArithmerticPlugin,
	SqrtPlugin: () => SqrtPlugin,
	StatisticalAggregationPlugin: () => StatisticalAggregationPlugin,
	StatisticalPlugin: () => StatisticalPlugin,
	SumprodPlugin: () => SumprodPlugin,
	TextPlugin: () => TextPlugin,
	TrigonometryPlugin: () => TrigonometryPlugin
});
//#endregion
//#region ../../node_modules/hyperformula/es/index.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Aggregate class for default export
*/
var HyperFormulaNS = class extends HyperFormula {};
HyperFormulaNS.HyperFormula = HyperFormula;
HyperFormulaNS.ErrorType = ErrorType;
HyperFormulaNS.CellError = CellError;
HyperFormulaNS.CellType = CellType;
HyperFormulaNS.CellValueType = CellValueType;
HyperFormulaNS.CellValueDetailedType = CellValueDetailedType;
HyperFormulaNS.DetailedCellError = DetailedCellError;
HyperFormulaNS.ExportedCellChange = ExportedCellChange;
HyperFormulaNS.ExportedNamedExpressionChange = ExportedNamedExpressionChange;
HyperFormulaNS.ConfigValueTooBigError = ConfigValueTooBigError;
HyperFormulaNS.ConfigValueTooSmallError = ConfigValueTooSmallError;
HyperFormulaNS.EvaluationSuspendedError = EvaluationSuspendedError;
HyperFormulaNS.ExpectedOneOfValuesError = ExpectedOneOfValuesError;
HyperFormulaNS.ExpectedValueOfTypeError = ExpectedValueOfTypeError;
HyperFormulaNS.ArraySize = ArraySize;
HyperFormulaNS.SimpleRangeValue = SimpleRangeValue;
HyperFormulaNS.EmptyValue = EmptyValue;
HyperFormulaNS.FunctionPlugin = FunctionPlugin;
HyperFormulaNS.FunctionArgumentType = FunctionArgumentType;
HyperFormulaNS.FunctionPluginValidationError = FunctionPluginValidationError;
HyperFormulaNS.InvalidAddressError = InvalidAddressError;
HyperFormulaNS.InvalidArgumentsError = InvalidArgumentsError;
HyperFormulaNS.LanguageNotRegisteredError = LanguageNotRegisteredError;
HyperFormulaNS.LanguageAlreadyRegisteredError = LanguageAlreadyRegisteredError;
HyperFormulaNS.MissingTranslationError = MissingTranslationError;
HyperFormulaNS.NamedExpressionDoesNotExistError = NamedExpressionDoesNotExistError;
HyperFormulaNS.NamedExpressionNameIsAlreadyTakenError = NamedExpressionNameIsAlreadyTakenError;
HyperFormulaNS.NamedExpressionNameIsInvalidError = NamedExpressionNameIsInvalidError;
HyperFormulaNS.NoOperationToRedoError = NoOperationToRedoError;
HyperFormulaNS.NoOperationToUndoError = NoOperationToUndoError;
HyperFormulaNS.NoRelativeAddressesAllowedError = NoRelativeAddressesAllowedError;
HyperFormulaNS.NoSheetWithIdError = NoSheetWithIdError;
HyperFormulaNS.NoSheetWithNameError = NoSheetWithNameError;
HyperFormulaNS.NotAFormulaError = NotAFormulaError;
HyperFormulaNS.NothingToPasteError = NothingToPasteError;
HyperFormulaNS.ProtectedFunctionTranslationError = ProtectedFunctionTranslationError;
HyperFormulaNS.SheetNameAlreadyTakenError = SheetNameAlreadyTakenError;
HyperFormulaNS.SheetSizeLimitExceededError = SheetSizeLimitExceededError;
HyperFormulaNS.SourceLocationHasArrayError = SourceLocationHasArrayError;
HyperFormulaNS.TargetLocationHasArrayError = TargetLocationHasArrayError;
HyperFormulaNS.UnableToParseError = UnableToParseError;
var defaultLanguage = Config.defaultConfig.language;
HyperFormula.registerLanguage(defaultLanguage, dictionary$1);
HyperFormula.languages[dictionary$1.langCode] = dictionary$1;
for (const pluginName of Object.getOwnPropertyNames(plugin_exports)) if (!pluginName.startsWith("_")) HyperFormula.registerFunctionPlugin(plugin_exports[pluginName]);
//#endregion
//#region ../../node_modules/hyperformula/es/i18n/languages/enUS.mjs
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
var dictionary = Object.assign(Object.assign({}, dictionary$1), { langCode: "enUS" });
//#endregion
//#region ../loot-core/src/shared/rules.ts
var TYPE_INFO = {
	date: {
		ops: [
			"is",
			"isapprox",
			"gt",
			"gte",
			"lt",
			"lte"
		],
		nullable: false
	},
	id: {
		ops: [
			"is",
			"contains",
			"matches",
			"oneOf",
			"isNot",
			"doesNotContain",
			"notOneOf",
			"onBudget",
			"offBudget"
		],
		nullable: true
	},
	saved: {
		ops: [],
		nullable: false
	},
	string: {
		ops: [
			"is",
			"contains",
			"matches",
			"oneOf",
			"isNot",
			"doesNotContain",
			"notOneOf",
			"hasTags"
		],
		nullable: true
	},
	number: {
		ops: [
			"is",
			"isapprox",
			"isbetween",
			"gt",
			"gte",
			"lt",
			"lte"
		],
		nullable: false
	},
	boolean: {
		ops: ["is"],
		nullable: false
	}
};
var FIELD_INFO = {
	imported_payee: {
		type: "string",
		disallowedOps: new Set(["hasTags"])
	},
	payee: {
		type: "id",
		disallowedOps: new Set(["onBudget", "offBudget"])
	},
	payee_name: { type: "string" },
	date: { type: "date" },
	notes: {
		type: "string",
		disallowedOps: new Set(["oneOf", "notOneOf"])
	},
	amount: { type: "number" },
	category: {
		type: "id",
		disallowedOps: new Set(["onBudget", "offBudget"]),
		internalOps: new Set(["and"])
	},
	category_group: {
		type: "id",
		disallowedOps: new Set(["onBudget", "offBudget"]),
		internalOps: new Set(["and"])
	},
	account: { type: "id" },
	cleared: { type: "boolean" },
	reconciled: { type: "boolean" },
	saved: { type: "saved" },
	transfer: { type: "boolean" },
	parent: { type: "boolean" }
};
var fieldInfo = FIELD_INFO;
var FIELD_TYPES = new Map(Object.entries(FIELD_INFO).map(([field, info]) => [field, info.type]));
function isValidOp(field, op) {
	const type = FIELD_TYPES.get(field);
	if (!type) return false;
	if (fieldInfo[field].disallowedOps?.has(op)) return false;
	return TYPE_INFO[type].ops.includes(op) || fieldInfo[field].internalOps?.has(op);
}
function getValidOps(field) {
	const type = FIELD_TYPES.get(field);
	if (!type) return [];
	return TYPE_INFO[type].ops.filter((op) => !fieldInfo[field].disallowedOps?.has(op));
}
function getAllocationMethods(hasFormulaMode = false) {
	return {
		"fixed-amount": t$1("a fixed amount"),
		"fixed-percent": t$1("a fixed percent of the remainder"),
		...hasFormulaMode && { formula: t$1("based on a formula") },
		remainder: t$1("an equal portion of the remainder")
	};
}
function mapField(field, opts) {
	opts = opts || {};
	switch (field) {
		case "imported_payee": return t$1("imported payee");
		case "payee_name": return t$1("payee (name)");
		case "amount":
			if (opts.inflow) return t$1("amount (inflow)");
			else if (opts.outflow) return t$1("amount (outflow)");
			return t$1("amount");
		case "amount-inflow": return t$1("amount (inflow)");
		case "amount-outflow": return t$1("amount (outflow)");
		case "account": return t$1("account");
		case "date": return t$1("date");
		case "category": return t$1("category");
		case "category_group": return t$1("category group");
		case "notes": return t$1("notes");
		case "payee": return t$1("payee");
		case "saved": return t$1("saved");
		case "cleared": return t$1("cleared");
		case "reconciled": return t$1("reconciled");
		case "transfer": return t$1("transfer");
		default: return field;
	}
}
function friendlyOp(op, type) {
	switch (op) {
		case "oneOf": return t$1("one of");
		case "notOneOf": return t$1("not one of");
		case "is": return t$1("is");
		case "isNot": return t$1("is not");
		case "isapprox": return t$1("is approx");
		case "isbetween": return t$1("is between");
		case "contains": return t$1("contains");
		case "hasTags": return t$1("has tags");
		case "matches": return t$1("matches");
		case "doesNotContain": return t$1("does not contain");
		case "gt":
			if (type === "date") return t$1("is after");
			return t$1("is greater than");
		case "gte":
			if (type === "date") return t$1("is after or equals");
			return t$1("is greater than or equals");
		case "lt":
			if (type === "date") return t$1("is before");
			return t$1("is less than");
		case "lte":
			if (type === "date") return t$1("is before or equals");
			return t$1("is less than or equals");
		case "true": return t$1("is true");
		case "false": return t$1("is false");
		case "set": return t$1("set");
		case "set-split-amount": return t$1("allocate");
		case "link-schedule": return t$1("link schedule");
		case "prepend-notes": return t$1("prepend to notes");
		case "append-notes": return t$1("append to notes");
		case "and": return t$1("and");
		case "or": return t$1("or");
		case "onBudget": return t$1("is on budget");
		case "offBudget": return t$1("is off budget");
		case "delete-transaction": return "delete transaction";
		default: return "";
	}
}
function translateRuleStage(stage) {
	switch (stage) {
		case "pre": return t$1("Pre");
		case "post": return t$1("Post");
		default: return "";
	}
}
function deserializeField(field) {
	if (field === "amount-inflow") return {
		field: "amount",
		options: { inflow: true }
	};
	else if (field === "amount-outflow") return {
		field: "amount",
		options: { outflow: true }
	};
	else return { field };
}
function getFieldError(type) {
	switch (type) {
		case "date-format": return "Invalid date format";
		case "no-null":
		case "no-empty-array":
		case "no-empty-string": return "Value cannot be empty";
		case "not-string": return "Value must be a string";
		case "not-boolean": return "Value must be a boolean";
		case "not-number": return "Value must be a number";
		case "invalid-field": return "Please choose a valid field for this type of rule";
		case "invalid-template": return "Invalid handlebars template";
		default: return "Internal error, sorry! Please get in touch https://actualbudget.org/contact/ for support";
	}
}
function sortNumbers(num1, num2) {
	if (num1 < num2) return [num1, num2];
	return [num2, num1];
}
function parse$2(item) {
	if (item.op === "set-split-amount") {
		if (item.options.method === "fixed-amount") return { ...item };
		return item;
	}
	switch (item.type) {
		case "number": return { ...item };
		case "string": {
			const parsed = item.value == null ? "" : item.value;
			return {
				...item,
				value: parsed
			};
		}
		case "boolean": {
			const parsed = item.value;
			return {
				...item,
				value: parsed
			};
		}
		default:
	}
	return {
		...item,
		error: null
	};
}
function unparse({ error: _error, inputKey: _inputKey, ...item }) {
	if (item.op === "set-split-amount") {
		if (item.options.method === "fixed-amount") return { ...item };
		if (item.options.method === "fixed-percent") return {
			...item,
			value: item.value && parseFloat(item.value)
		};
		return item;
	}
	switch (item.type) {
		case "number": return { ...item };
		case "string": {
			const unparsed = item.value == null ? "" : item.value;
			return {
				...item,
				value: unparsed
			};
		}
		case "boolean": {
			const unparsed = item.value == null ? false : item.value;
			return {
				...item,
				value: unparsed
			};
		}
		default:
	}
	return item;
}
function makeValue(value, cond) {
	if (["oneOf", "notOneOf"].includes(cond.op)) return {
		...cond,
		error: null,
		value: value || []
	};
	if (cond.type === "number" && value == null) return {
		...cond,
		error: null,
		value: 0
	};
	return {
		...cond,
		error: null,
		value
	};
}
function getApproxNumberThreshold(number) {
	return Math.round(Math.abs(number) * .075);
}
//#endregion
//#region ../loot-core/src/server/rules/customFunctions.ts
var CustomFunctionsPlugin = class extends FunctionPlugin {
	integerToAmount(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("INTEGER_TO_AMOUNT"), (integerAmount, decimalPlaces = 2) => {
			return integerToAmount(integerAmount, decimalPlaces);
		});
	}
	fixed(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("FIXED"), (number, decimals = 0) => {
			return Number(number).toFixed(decimals);
		});
	}
	balanceOf(ast, state) {
		return this.runFunction(ast.args, state, this.metadata("BALANCE_OF"), (accountKey) => {
			return this.config.context?.balanceOfPrefetch?.get(accountKey) ?? 0;
		});
	}
};
CustomFunctionsPlugin.implementedFunctions = {
	BALANCE_OF: {
		method: "balanceOf",
		parameters: [{ argumentType: FunctionArgumentType.STRING }]
	},
	FIXED: {
		method: "fixed",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, {
			argumentType: FunctionArgumentType.NUMBER,
			optionalArg: true,
			defaultValue: 0
		}]
	},
	INTEGER_TO_AMOUNT: {
		method: "integerToAmount",
		parameters: [{ argumentType: FunctionArgumentType.NUMBER }, {
			argumentType: FunctionArgumentType.NUMBER,
			optionalArg: true,
			defaultValue: 2
		}]
	}
};
var customFunctionsTranslations = { enUS: {
	BALANCE_OF: "BALANCE_OF",
	FIXED: "FIXED",
	INTEGER_TO_AMOUNT: "INTEGER_TO_AMOUNT"
} };
//#endregion
//#region ../loot-core/src/server/errors.ts
var RuleError = class extends Error {
	type;
	constructor(name, message) {
		super("RuleError: " + message);
		this.type = name;
	}
};
//#endregion
//#region ../../node_modules/@rschedule/core/es2015/main.js
var InvalidDateAdapterError$1 = class extends Error {};
var dateAdapterConfig$1;
var DateAdapterBase$1 = class {
	constructor(_date, options) {
		/**
		* The metadata property is intended to store arbitrary data
		* related to this DateAdapter. Unlike other properties, the
		* metadata property is intended to be mutable.
		*/
		this.metadata = {};
		this.duration = options && options.duration || 0;
		this.generators = options && options.generators && options.generators.slice() || [];
		if (!Number.isInteger(this.duration) || this.duration < 0) throw new InvalidDateAdapterError$1("duration must be a non-negative integer");
	}
	static set adapter(value) {
		if (dateAdapterConfig$1) throw new Error(`"${dateAdapterConfig$1.name}" has already been configured.`);
		dateAdapterConfig$1 = value;
	}
	static get adapter() {
		if (!dateAdapterConfig$1) throw new Error("No date adapter has been configured. See rSchedule docs.");
		return dateAdapterConfig$1;
	}
	static isDate(_object) {
		throw unimplementedError$1("isDate()");
	}
	static fromDate(_date, _options) {
		throw unimplementedError$1("fromDate()");
	}
	static fromJSON(_json) {
		throw unimplementedError$1("fromJSON()");
	}
	static fromDateTime(_datetime) {
		throw unimplementedError$1("fromDateTime()");
	}
	/**
	* Returns a string in simplified extended ISO format (ISO 8601).
	*
	* _Note: this method is intended for testing and its
	* implementation isn't particularly performant._
	*/
	toISOString() {
		return this.set("timezone", "UTC").toDateTime().toISOString();
	}
	toDateTime() {
		return DateTime$1.fromJSON(Object.assign(Object.assign({}, this.toJSON()), {
			generators: this.generators,
			metadata: this.metadata
		}));
	}
};
DateAdapterBase$1.hasTimezoneSupport = false;
function unimplementedError$1(name) {
	return /* @__PURE__ */ new Error(`You must implement the "${name}" method for this DateAdapter class`);
}
var DateAdapter$1;
(function(DateAdapter) {
	DateAdapter.WEEKDAYS = [
		"SU",
		"MO",
		"TU",
		"WE",
		"TH",
		"FR",
		"SA"
	];
	DateAdapter.MILLISECONDS_IN_SECOND = 1e3;
	DateAdapter.MILLISECONDS_IN_MINUTE = DateAdapter.MILLISECONDS_IN_SECOND * 60;
	DateAdapter.MILLISECONDS_IN_HOUR = DateAdapter.MILLISECONDS_IN_MINUTE * 60;
	DateAdapter.MILLISECONDS_IN_DAY = DateAdapter.MILLISECONDS_IN_HOUR * 24;
	DateAdapter.MILLISECONDS_IN_WEEK = DateAdapter.MILLISECONDS_IN_DAY * 7;
})(DateAdapter$1 || (DateAdapter$1 = {}));
var InvalidDateTimeError$1 = class extends Error {};
var DateTime$1 = class DateTime$1 {
	constructor(date, timezone, duration, generators, options = {}) {
		this.metadata = {};
		this.date = new Date(date);
		this.timezone = timezone || null;
		this.duration = duration || 0;
		this.generators = generators && generators.slice() || [];
		if (!Number.isInteger(this.duration) || this.duration < 0) throw new InvalidDateTimeError$1("duration must be a non-negative integer");
		if (options.metadata) Object.assign(this.metadata, options.metadata);
		this.assertIsValid();
	}
	static fromJSON(json) {
		return new DateTime$1(new Date(Date.UTC(json.year, json.month - 1, json.day, json.hour, json.minute, json.second, json.millisecond)), json.timezone, json.duration, json.generators, { metadata: json.metadata });
	}
	static fromDateAdapter(adapter) {
		return DateTime$1.fromJSON(Object.assign(Object.assign({}, adapter.toJSON()), {
			generators: adapter.generators,
			metadata: adapter.metadata
		}));
	}
	/**
	* Returns `undefined` if `duration` is `0`. Else returns
	* the `end` date.
	*/
	get end() {
		if (!this.duration) return;
		if (this._end) return this._end;
		this._end = this.add(this.duration, "millisecond");
		return this._end;
	}
	isEqual(object) {
		if (!object) return false;
		assertSameTimeZone$1(this, object);
		return this.valueOf() === object.valueOf();
	}
	isBefore(object) {
		assertSameTimeZone$1(this, object);
		return this.valueOf() < object.valueOf();
	}
	isBeforeOrEqual(object) {
		assertSameTimeZone$1(this, object);
		return this.valueOf() <= object.valueOf();
	}
	isAfter(object) {
		assertSameTimeZone$1(this, object);
		return this.valueOf() > object.valueOf();
	}
	isAfterOrEqual(object) {
		assertSameTimeZone$1(this, object);
		return this.valueOf() >= object.valueOf();
	}
	isOccurring(object) {
		if (!this.duration) throw new Error("DateTime#isOccurring() is only applicable to DateTimes with durations");
		assertSameTimeZone$1(this, object);
		return object.isAfterOrEqual(this) && object.isBeforeOrEqual(this.add(this.duration, "millisecond"));
	}
	add(amount, unit) {
		switch (unit) {
			case "generator": {
				const generators = this.generators.slice();
				generators.unshift(amount);
				return new DateTime$1(this.date, this.timezone, this.duration, generators);
			}
			case "year": return this.forkDateTime(addUTCYears$1(this.date, amount));
			case "month": return this.forkDateTime(addUTCMonths$1(this.date, amount));
			case "week": return this.forkDateTime(addUTCWeeks$1(this.date, amount));
			case "day": return this.forkDateTime(addUTCDays$1(this.date, amount));
			case "hour": return this.forkDateTime(addUTCHours$1(this.date, amount));
			case "minute": return this.forkDateTime(addUTCMinutes$1(this.date, amount));
			case "second": return this.forkDateTime(addUTCSeconds$1(this.date, amount));
			case "millisecond": return this.forkDateTime(addUTCMilliseconds$1(this.date, amount));
			default: throw new Error("Invalid unit provided to `DateTime#add`");
		}
	}
	subtract(amount, unit) {
		switch (unit) {
			case "year": return this.forkDateTime(subUTCYears$1(this.date, amount));
			case "month": return this.forkDateTime(subUTCMonths$1(this.date, amount));
			case "week": return this.forkDateTime(subUTCWeeks$1(this.date, amount));
			case "day": return this.forkDateTime(subUTCDays$1(this.date, amount));
			case "hour": return this.forkDateTime(subUTCHours$1(this.date, amount));
			case "minute": return this.forkDateTime(subUTCMinutes$1(this.date, amount));
			case "second": return this.forkDateTime(subUTCSeconds$1(this.date, amount));
			case "millisecond": return this.forkDateTime(subUTCMilliseconds$1(this.date, amount));
			default: throw new Error("Invalid unit provided to `DateTime#subtract`");
		}
	}
	get(unit) {
		switch (unit) {
			case "year": return this.date.getUTCFullYear();
			case "month": return this.date.getUTCMonth() + 1;
			case "yearday": return getUTCYearDay$1(this.date);
			case "weekday": return DateAdapter$1.WEEKDAYS[this.date.getUTCDay()];
			case "day": return this.date.getUTCDate();
			case "hour": return this.date.getUTCHours();
			case "minute": return this.date.getUTCMinutes();
			case "second": return this.date.getUTCSeconds();
			case "millisecond": return this.date.getUTCMilliseconds();
			default: throw new Error("Invalid unit provided to `DateTime#set`");
		}
	}
	set(unit, value) {
		if (unit === "duration") return new DateTime$1(this.date, this.timezone, value, this.generators);
		if (unit === "generators") return new DateTime$1(this.date, this.timezone, this.duration, value);
		let date = new Date(this.date);
		switch (unit) {
			case "year":
				date.setUTCFullYear(value);
				break;
			case "month": {
				const length = monthLength$1(value, date.getUTCFullYear());
				if (date.getUTCDate() > length) {
					date.setUTCDate(1);
					date.setUTCMonth(value);
					date = subUTCDays$1(date, 1);
				} else date.setUTCMonth(value - 1);
				break;
			}
			case "day":
				date.setUTCDate(value);
				break;
			case "hour":
				date.setUTCHours(value);
				break;
			case "minute":
				date.setUTCMinutes(value);
				break;
			case "second":
				date.setUTCSeconds(value);
				break;
			case "millisecond":
				date.setUTCMilliseconds(value);
				break;
			default: throw new Error("Invalid unit provided to `DateTime#set`");
		}
		return this.forkDateTime(date);
	}
	granularity(granularity, opt = {}) {
		let date = this.forkDateTime(this.date);
		switch (granularity) {
			case "year": date = date.set("month", 1);
			case "month":
				date = date.set("day", 1);
				break;
			case "week": date = setDateToStartOfWeek$1(date, opt.weekStart);
		}
		switch (granularity) {
			case "year":
			case "month":
			case "week":
			case "day": date = date.set("hour", 0);
			case "hour": date = date.set("minute", 0);
			case "minute": date = date.set("second", 0);
			case "second": date = date.set("millisecond", 0);
			case "millisecond": return date;
			default: throw new Error("Invalid granularity provided to `DateTime#granularity`: " + granularity);
		}
	}
	endGranularity(granularity, opt = {}) {
		let date = this.forkDateTime(this.date);
		switch (granularity) {
			case "year": date = date.set("month", 12);
			case "month":
				date = date.set("day", monthLength$1(date.get("month"), date.get("year")));
				break;
			case "week": date = setDateToEndOfWeek$1(date, opt.weekStart);
		}
		switch (granularity) {
			case "year":
			case "month":
			case "week":
			case "day": date = date.set("hour", 23);
			case "hour": date = date.set("minute", 59);
			case "minute": date = date.set("second", 59);
			case "second": date = date.set("millisecond", 999);
			case "millisecond": return date;
			default: throw new Error("Invalid granularity provided to `DateTime#granularity`: " + granularity);
		}
	}
	toISOString() {
		return this.date.toISOString();
	}
	toDateTime() {
		return this;
	}
	toJSON() {
		const json = {
			timezone: this.timezone,
			year: this.get("year"),
			month: this.get("month"),
			day: this.get("day"),
			hour: this.get("hour"),
			minute: this.get("minute"),
			second: this.get("second"),
			millisecond: this.get("millisecond")
		};
		if (this.duration) json.duration = this.duration;
		return json;
	}
	valueOf() {
		return this.date.valueOf();
	}
	assertIsValid() {
		if (isNaN(this.valueOf())) throw new InvalidDateTimeError$1("DateTime has invalid date.");
		return true;
	}
	forkDateTime(date) {
		return new DateTime$1(date, this.timezone, this.duration, this.generators);
	}
};
function assertSameTimeZone$1(x, y) {
	if (x.timezone !== y.timezone) throw new InvalidDateTimeError$1("Attempted to compare a datetime to another date in a different timezone: " + JSON.stringify(x) + " and " + JSON.stringify(y));
	return true;
}
function setDateToStartOfWeek$1(date, wkst) {
	const index = orderedWeekdays$1(wkst).indexOf(date.get("weekday"));
	return date.subtract(index, "day");
}
function setDateToEndOfWeek$1(date, wkst) {
	const index = orderedWeekdays$1(wkst).indexOf(date.get("weekday"));
	return date.add(6 - index, "day");
}
function dateTimeSortComparer(a, b) {
	if (a.isAfter(b)) return 1;
	if (a.isBefore(b)) return -1;
	if (a.duration && b.duration) {
		if (a.duration > b.duration) return 1;
		if (a.duration < b.duration) return -1;
	}
	return 0;
}
function uniqDateTimes(dates) {
	return Array.from(new Map(dates.map((date) => [date.toISOString(), date])).values());
}
function orderedWeekdays$1(wkst = "SU") {
	const wkdays = DateAdapter$1.WEEKDAYS.slice();
	let index = wkdays.indexOf(wkst);
	while (index !== 0) {
		shiftArray$1(wkdays);
		index--;
	}
	return wkdays;
}
function shiftArray$1(array, from = "first") {
	if (array.length === 0) return array;
	else if (from === "first") array.push(array.shift());
	else array.unshift(array.pop());
	return array;
}
function getDifferenceBetweenWeekdays(x, y) {
	if (x === y) return 0;
	const result = DateAdapter$1.WEEKDAYS.indexOf(x) - DateAdapter$1.WEEKDAYS.indexOf(y);
	return result > 0 ? 7 - result : Math.abs(result);
}
/**
* Returns the days in the given month.
*
* @param month base-1
* @param year
*/
function monthLength$1(month, year) {
	return {
		1: 31,
		2: getDaysInFebruary$1(year),
		3: 31,
		4: 30,
		5: 31,
		6: 30,
		7: 31,
		8: 31,
		9: 30,
		10: 31,
		11: 30,
		12: 31
	}[month];
}
function getDaysInFebruary$1(year) {
	return isLeapYear$2(year) ? 29 : 28;
}
function isLeapYear$2(year) {
	return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;
}
function getUTCYearDay$1(now) {
	const start = new Date(Date.UTC(now.getUTCFullYear(), 0, 1));
	const diff = now.valueOf() - start.valueOf();
	return 1 + Math.floor(diff / DateAdapter$1.MILLISECONDS_IN_DAY);
}
/**
* These functions are basically lifted from `date-fns`, but changed
* to use the UTC date methods, which `date-fns` doesn't support.
*/
function toInteger$1(input) {
	if (input === null || input === true || input === false) return NaN;
	const int = Number(input);
	if (isNaN(int)) return int;
	return int < 0 ? Math.ceil(int) : Math.floor(int);
}
function addMilliseconds$1(dirtyDate, dirtyAmount) {
	if (arguments.length < 2) throw new TypeError("2 arguments required, but only " + arguments.length + " present");
	const timestamp = dirtyDate.valueOf();
	const amount = toInteger$1(dirtyAmount);
	return new Date(timestamp + amount);
}
function addUTCYears$1(date, input) {
	return addUTCMonths$1(date, toInteger$1(input) * 12);
}
function addUTCMonths$1(date, input) {
	const amount = toInteger$1(input);
	date = new Date(date);
	const desiredMonth = date.getUTCMonth() + amount;
	const dateWithDesiredMonth = /* @__PURE__ */ new Date(0);
	dateWithDesiredMonth.setUTCFullYear(date.getUTCFullYear(), desiredMonth, 1);
	dateWithDesiredMonth.setUTCHours(0, 0, 0, 0);
	const daysInMonth = monthLength$1(dateWithDesiredMonth.getUTCMonth() + 1, dateWithDesiredMonth.getUTCFullYear());
	date.setUTCMonth(desiredMonth, Math.min(daysInMonth, date.getUTCDate()));
	return date;
}
function addUTCWeeks$1(date, input) {
	return addUTCDays$1(date, toInteger$1(input) * 7);
}
function addUTCDays$1(date, input) {
	return addUTCMilliseconds$1(date, toInteger$1(input) * DateAdapter$1.MILLISECONDS_IN_DAY);
}
function addUTCHours$1(date, input) {
	return addMilliseconds$1(date, toInteger$1(input) * DateAdapter$1.MILLISECONDS_IN_HOUR);
}
function addUTCMinutes$1(date, input) {
	return addMilliseconds$1(date, toInteger$1(input) * DateAdapter$1.MILLISECONDS_IN_MINUTE);
}
function addUTCSeconds$1(date, input) {
	return addMilliseconds$1(date, toInteger$1(input) * DateAdapter$1.MILLISECONDS_IN_SECOND);
}
function addUTCMilliseconds$1(date, input) {
	const amount = toInteger$1(input);
	const timestamp = date.getTime();
	return new Date(timestamp + amount);
}
function subUTCYears$1(date, amount) {
	return addUTCYears$1(date, -amount);
}
function subUTCMonths$1(date, amount) {
	return addUTCMonths$1(date, -amount);
}
function subUTCWeeks$1(date, amount) {
	return addUTCWeeks$1(date, -amount);
}
function subUTCDays$1(date, amount) {
	return addUTCDays$1(date, -amount);
}
function subUTCHours$1(date, amount) {
	return addUTCHours$1(date, -amount);
}
function subUTCMinutes$1(date, amount) {
	return addUTCMinutes$1(date, -amount);
}
function subUTCSeconds$1(date, amount) {
	return addUTCSeconds$1(date, -amount);
}
function subUTCMilliseconds$1(date, amount) {
	return addUTCMilliseconds$1(date, -amount);
}
var ArgumentError = class extends Error {};
var InfiniteLoopError = class extends Error {};
function numberSortComparer(a, b) {
	if (a > b) return 1;
	else if (b > a) return -1;
	else return 0;
}
function freqToGranularity(freq) {
	switch (freq) {
		case "YEARLY": return "year";
		case "MONTHLY": return "month";
		case "WEEKLY": return "week";
		case "DAILY": return "day";
		case "HOURLY": return "hour";
		case "MINUTELY": return "minute";
		case "SECONDLY": return "second";
		case "MILLISECONDLY": return "millisecond";
		default: throw new Error("unknown freq passed to freqToGranularity()");
	}
}
function cloneJSON(json) {
	return JSON.parse(JSON.stringify(json));
}
function dateInputToDateAdapter(date) {
	return date instanceof DateTime$1 ? DateAdapterBase$1.adapter.fromDateTime(date) : date instanceof DateAdapterBase$1 ? date : DateAdapterBase$1.adapter.fromDate(date);
}
function dateInputToDateTime(date, timezone) {
	if (date instanceof DateTime$1) {
		if (date.timezone !== timezone) return DateAdapterBase$1.adapter.fromDateTime(date).set("timezone", timezone).toDateTime();
		return date;
	}
	return date instanceof DateAdapterBase$1 ? date.set("timezone", timezone).toDateTime() : DateAdapterBase$1.adapter.fromDate(date).set("timezone", timezone).toDateTime();
}
function normalizeDateTimeTimezone$1(date, timezone) {
	if (date.timezone !== timezone) return DateAdapterBase$1.adapter.fromDateTime(date).set("timezone", timezone).toDateTime();
	return date;
}
var RuleOptionError = class extends Error {};
function normalizeDefaultOptions(options) {
	let start;
	if (options.start instanceof DateTime$1) start = options.start;
	else if (options.start instanceof DateAdapterBase$1) start = options.start.toDateTime();
	else if (DateAdapterBase$1.adapter.isDate(options.start)) start = DateAdapterBase$1.adapter.fromDate(options.start).toDateTime();
	else throw new RuleOptionError("\"start\" must be either a `DateAdapter` instance or an instance of the date a DateAdapter is wrapping (e.g. `StandardDateAdapter` wraps a `Date`)");
	let end;
	if (options.end) if (options.end instanceof DateTime$1) end = options.end;
	else if (options.end instanceof DateAdapterBase$1) end = options.end.toDateTime();
	else if (DateAdapterBase$1.adapter.isDate(options.end)) end = DateAdapterBase$1.adapter.fromDate(options.end).toDateTime();
	else throw new RuleOptionError("\"end\" must be either be `undefined`, a `DateAdapter` instance, or an instance of the date a DateAdapter is wrapping (e.g. `StandardDateAdapter` wraps a `Date`)");
	if (options.duration !== void 0) {
		if (!Number.isInteger(options.duration)) throw new RuleOptionError("\"duration\" expects a whole number");
		if (options.duration <= 0) throw new RuleOptionError("\"duration\" must be greater than 0");
	}
	if (options.count !== void 0) {
		if (!Number.isInteger(options.count)) throw new RuleOptionError("\"count\" must be a whole number");
		if (options.count < 0) throw new RuleOptionError("\"count\" must be greater than 0");
	}
	if (options.end !== void 0 && options.count !== void 0) throw new RuleOptionError("\"end\" and \"count\" cannot both be present");
	return {
		start,
		end,
		count: options.count,
		duration: options.duration
	};
}
function normalizeRuleOptions(recurrenceModules, options) {
	const normOptions = normalizeDefaultOptions(options);
	const startOptions = cloneJSON(options);
	recurrenceModules.forEach((mod) => {
		mod.normalizeOptions(startOptions, normOptions);
	});
	Object.keys(normOptions).forEach((key) => {
		if (normOptions[key] === void 0) delete normOptions[key];
	});
	return normOptions;
}
function cloneRuleOptions(options) {
	const obj = cloneJSON(options);
	obj.start = options.start;
	if (options.end) obj.end = options.end;
	return obj;
}
var RecurrenceRuleError = class extends Error {};
var ValidDateTime = class {
	constructor(date) {
		this.date = date;
	}
};
var InvalidDateTime = class {
	constructor(date) {
		this.date = date;
	}
};
function recurrenceRulesReducer(rules) {
	return (iterator) => rules.reduce((prev, curr) => {
		const rule = curr.get(iterator);
		if (rule) prev.push(rule);
		return prev;
	}, []);
}
var RecurrenceRulesIterator = class {
	constructor(recurrenceRules, options, args) {
		this.options = options;
		this.args = args;
		this.rules = [];
		this.iterator = this.options.count === void 0 ? this.iterate() : this.args.reverse ? this.iterateWithReverseCount() : this.iterateWithCount();
		this.options = Object.assign(Object.assign({}, cloneJSON(options)), {
			start: options.start,
			end: options.end
		});
		this.reverse = this.options.count === void 0 && args.reverse || false;
		const { start, end } = this.normalizeDateTimeArgs(args);
		if (options.count !== void 0) this.start = options.start;
		else if (start && options.start) this.start = start.isAfterOrEqual(options.start) ? start : options.start;
		else this.start = start || options.start;
		if (end && options.end) this.end = end.isBeforeOrEqual(options.end) ? end : options.end;
		else this.end = end || options.end;
		if (this.args.reverse && !(options.count !== void 0 || this.end)) throw new Error("When iterating in reverse, the rule must have an `end` or `count` property or you must provide an `end` argument.");
		this.isInfinite = !this.end && this.options.count === void 0;
		this.hasDuration = !!this.options.duration;
		this.rules = Array.isArray(recurrenceRules) ? recurrenceRules : recurrenceRules(this);
	}
	[Symbol.iterator]() {
		return this.iterator;
	}
	next(args) {
		return this.iterator.next(args);
	}
	/**
	* In the pipe controller, we have an extra level of indirection with
	* the `run()` and `iterate()` methods. The `iterate()` method is the
	* method which actually runs the logic in the pipes. If we didn't
	* need to account for the `count` property of a rule, we would *only*
	* need the iterate method... so much simpler. But we do need to account
	* for rules with a `count` property.
	*
	* Rules with a `count` property need to begin iteration at the beginning
	* because the `count` is always from the rule's start time. So if someone
	* passes in a new start time as an argument to a rule with `count`, we
	* need to secretly iterate from the beginning, tracking the number of
	* iterations, and then only start yielding dates when we reach the section
	* the user cares about (or, if we hit our `count` quota, cancel iterating).
	*
	* Additionally, we need to handle iterating in reverse. In this case, we build
	* up a cache of dates between the rule's start time and the reverse iteration
	* start date. Once we hit the reverse iteration start date, we start
	* yielding dates in the cache, in reverse order.
	*
	* In general, I imagine the count number, if used, will be small. But a large
	* count will definitely have a negative performance affect. I don't think
	* there's anything to be done about this.
	*/
	*iterateWithReverseCount() {
		const dates = Array.from(this.iterateWithCount()).reverse();
		let yieldArgs;
		const dateCache = dates.slice();
		let date = dateCache.shift();
		while (date) {
			if (yieldArgs && yieldArgs.skipToDate && date.isAfter(yieldArgs.skipToDate)) {
				date = dateCache.shift();
				continue;
			}
			yieldArgs = yield date;
			if (yieldArgs && yieldArgs.skipToDate && yieldArgs.skipToDate.isAfterOrEqual(date)) throw new Error("A provided `skipToDate` option must be greater than the last yielded date (or smaller, in the case of reverse iteration)");
			date = dateCache.shift();
		}
	}
	*iterateWithCount() {
		if (this.options.count === 0) return;
		const iterable = this.iterate();
		const start = this.args.start || this.start;
		let date = iterable.next().value;
		let index = 1;
		let yieldArgs;
		while (date && index <= this.options.count) {
			index++;
			if (date.isBefore(start)) {
				date = iterable.next().value;
				continue;
			}
			if (yieldArgs && yieldArgs.skipToDate && date.isBefore(yieldArgs.skipToDate)) {
				date = iterable.next().value;
				continue;
			}
			yieldArgs = yield date;
			if (yieldArgs && yieldArgs.skipToDate && yieldArgs.skipToDate.isBeforeOrEqual(date)) throw new Error("A provided `skipToDate` option must be greater than the last yielded date (or smaller, in the case of reverse iteration)");
			date = iterable.next().value;
		}
	}
	*iterate() {
		let startingDate = this.start;
		if (this.reverse) startingDate = this.end;
		let date = this.nextDate(startingDate);
		while (date) {
			const args = yield this.normalizeRunOutput(date);
			if (args && args.skipToDate) {
				if (this.reverse ? args.skipToDate.isAfterOrEqual(date) : args.skipToDate.isBeforeOrEqual(date)) throw new Error("A provided `skipToDate` option must be greater than the last yielded date (or smaller, in the case of reverse iteration)");
				date = this.nextDate(args.skipToDate);
			} else date = this.nextDate(this.reverse ? date.subtract(1, "millisecond") : date.add(1, "millisecond"));
		}
	}
	/**
	* Loops through the recurrence rules until a valid date is found.
	*/
	nextDate(start) {
		let result = this.runRules(start.set("generators", []));
		if (this.isDatePastEnd(result.date)) return null;
		let index = 0;
		while (result instanceof InvalidDateTime && index < 50) {
			result = this.runRules(result.date);
			if (this.isDatePastEnd(result.date)) return null;
			index++;
		}
		if (result instanceof InvalidDateTime) throw new RecurrenceRuleError(`Failed to find a matching occurrence in ${index} iterations. Last iterated date: "${result.date.toISOString()}"`);
		if (this.reverse ? start.isBefore(result.date) : start.isAfter(result.date)) throw new RecurrenceRuleError("An error occurred in a recurrence rule. If this happened using the rSchedule provided recurrence rules, you should open an issue in the rSchedule repo. The maintainer is going to want to know how to recreate the error.");
		return result.date;
	}
	/**
	* Performs one run of the recurrence rules and returns the result.
	* It's a slightly optimized reducer function.
	*/
	runRules(start) {
		let result = new ValidDateTime(start);
		for (const rule of this.rules) {
			if (result instanceof InvalidDateTime) return result;
			result = rule.run(result.date);
		}
		return result;
	}
	isDatePastEnd(date) {
		return this.reverse ? date.isBefore(this.start) : this.end && date.isAfter(this.end);
	}
	normalizeRunOutput(date) {
		return this.hasDuration ? date.set("duration", this.options.duration) : date;
	}
	normalizeDateTimeArgs(args) {
		return {
			start: args.start && normalizeDateTimeTimezone$1(args.start, this.options.start.timezone),
			end: args.end && normalizeDateTimeTimezone$1(args.end, this.options.start.timezone)
		};
	}
};
//#endregion
//#region ../../node_modules/@rschedule/core/es2015/generators.js
var OccurrenceGenerator = class {
	constructor(args = {}) {
		this.timezone = args.timezone !== void 0 ? args.timezone : null;
		this.maxDuration = args.maxDuration || 0;
	}
	/** Returns the first occurrence or, if there are no occurrences, null. */
	get firstDate() {
		if (this._firstDate !== void 0) return this._firstDate;
		const start = this._run().next().value;
		this._firstDate = start ? this.dateAdapter.fromDateTime(start) : null;
		return this._firstDate;
	}
	/** If generator is infinite, returns `null`. Otherwise returns the end date */
	get lastDate() {
		if (this._lastDate !== void 0) return this._lastDate;
		if (this.isInfinite) {
			this._lastDate = null;
			return null;
		}
		const end = this._run({ reverse: true }).next().value;
		this._lastDate = end ? this.dateAdapter.fromDateTime(end) : null;
		return this._lastDate;
	}
	pipe(...operators) {
		return operators.reduce((prev, curr) => curr({
			base: prev,
			timezone: this.timezone
		}), this);
	}
	/**
	* Processes the object's rules/dates and returns an iterable for the occurrences.
	*
	* Options object:
	* - `start` the date to begin iteration on
	* - `end` the date to end iteration on
	* - `take` the max number of dates to take before ending iteration
	* - `reverse` whether to iterate in reverse or not
	*
	* Examples:
	*
	* ```
	* const iterator = schedule.occurrences({ start: new Date(), take: 5 });
	
	* for (const date of iterator) {
	*   // do stuff
	* }
	
	* iterator.toArray() // returns Date array
	* iterator.next().value // returns next Date
	* ```
	*
	*/
	occurrences(args = {}) {
		return new OccurrenceIterator(this, this.normalizeOccurrencesArgs(args));
	}
	/**
	* Iterates over the object's occurrences and bundles them into collections
	* with a specified granularity (default is `"YEARLY"`). Make sure to
	* read about each option & combination of options below.
	*
	* Options object:
	*   - start?: DateAdapter
	*   - end?: DateAdapter
	*   - take?: number
	*   - reverse?: NOT SUPPORTED
	*   - granularity?: CollectionsGranularity
	*   - weekStart?: DateAdapter.Weekday
	*   - skipEmptyPeriods?: boolean
	*
	* Returned `Collection` object:
	*
	*   - `dates` property containing an array of DateAdapter objects.
	*   - `granularity` property containing the granularity.
	*     - `CollectionsGranularity` === `RuleOptions.Frequency`.
	*     - default is `"YEARLY"`
	*   - `periodStart` property containing a DateAdapter equal to the period's
	*     start time.
	*   - `periodEnd` property containing a DateAdapter equal to the period's
	*     end time.
	*
	* #### Details:
	*
	* `collections()` always returns full periods. This means that the `start` argument is
	* transformed to be the start of whatever period the `start` argument is in, and the
	* `end` argument is transformed to be the end of whatever period the `end` argument is
	* in.
	*
	* - Example: with granularity `"YEARLY"`, the `start` argument will be transformed to be the
	*   start of the year passed in the `start` argument, and the `end` argument will be transformed
	*   to be the end of the year passed in the `end` argument.
	*
	* By default, the `periodStart` value of `Collection` objects produced by this method increments linearly.
	* This means the returned `Collection#dates` property may have length 0. This can be changed by
	* passing the `skipEmptyPeriods: true` option, in which case the `periodStart` from one collection to the
	* next can "jump".
	*
	* - Example 1: if your object's first occurrence is 2019/2/1 (February 1st) and you call
	*   `collection({skipEmptyPeriods: true, granularity: 'DAILY', start: new Date(2019,0,1)})`
	*   (so starting on January 1st), the first Collection produced will have a `periodStart` in February.
	*
	* - Example 2: if your object's first occurrence is 2019/2/1 (February 1st) and you call
	*   `collection({granularity: 'DAILY', start: new Date(2019,0,1)})`
	*   (so starting on January 1st), the first collection produced will have a `Collection#periodStart`
	*   of January 1st and have `Collection#dates === []`. Similarly, the next 30 collections produced
	*   (Jan 2nd - 31st) will all contain an empty array for the `dates` property. Then the February 1st
	*   `Collection` will contain dates.
	*
	* When giving a `take` argument to `collections()`, you are specifying
	* the number of `Collection` objects to return (rather than occurrences).
	*
	* When choosing a granularity of `"WEEKLY"`, the `weekStart` option is required.
	*
	* When choosing a granularity of `"MONTHLY"`:
	*
	* - If the `weekStart` option *is not* present, will generate collections with
	*   the `periodStart` and `periodEnd` at the beginning and end of each month.
	*
	* - If the `weekStart` option *is* present, will generate collections with the
	*   `periodStart` equal to the start of the first week of the month, and the
	*   `periodEnd` equal to the end of the last week of the month. This behavior could be
	*   desired when rendering opportunities in a calendar view, where the calendar renders
	*   full weeks (which may result in the calendar displaying dates in the
	*   previous or next months).
	*
	*/
	collections(args = {}) {
		return new CollectionIterator(this, this.normalizeCollectionsArgs(args));
	}
	/**
	* Returns true if an occurrence starts on or between the provided start/end
	* datetimes. If the `excludeEnds` option is provided, then occurrences
	* equal to the start/end times are ignored.
	*
	* If the occurrence generator has a duration, and `excludeEnds !== true`,
	* and a `maxDuration` argument is supplied (either in the constructor or
	* here), then any occurrence that's time overlaps with the start/end times
	* return true.
	*/
	occursBetween(startInput, endInput, options = {}) {
		const start = this.normalizeDateInput(startInput);
		const end = this.normalizeDateInput(endInput);
		if (this.hasDuration && !options.excludeEnds) {
			const maxDuration = this.getMaxDuration("occursBetween", options);
			const iterator = this._run({
				start: start.subtract(maxDuration, "millisecond"),
				end,
				reverse: true
			});
			for (const day of iterator) {
				if (day.end.isBefore(start)) continue;
				return true;
			}
			return false;
		}
		for (const day of this._run({
			start,
			end
		})) {
			if (options.excludeEnds) {
				if (day.isEqual(start)) continue;
				if (day.isEqual(end)) break;
			}
			return true;
		}
		return false;
	}
	occursOn(rawArgs) {
		const args = this.normalizeOccursOnArgs(rawArgs);
		if (args.weekday) {
			if (this.isInfinite && !args.before) throw new ArgumentError("When calling `occursOn()` with a `weekday` argument and an occurrence object that has infinite occurrences, you must include a `before` argument as well.");
			const start = args.after && (args.excludeEnds ? args.after.add(1, "day") : args.after);
			const end = args.before && (args.excludeEnds ? args.before.subtract(1, "day") : args.before);
			const iterator = this._run({
				start,
				end
			});
			let date = iterator.next().value;
			if (!date) return false;
			while (date) {
				if (date.get("weekday") === args.weekday) return true;
				date = iterator.next({ skipToDate: date.add(getDifferenceBetweenWeekdays(date.get("weekday"), args.weekday), "day").granularity("day") }).value;
			}
			return false;
		}
		if (!args.date) throw new ArgumentError(`"occursOn()" must be called with either a "date" or "weekday" argument`);
		if (this.hasDuration) {
			const maxDuration = this.getMaxDuration("occursOn", args);
			const iterator = this._run({
				start: args.date.subtract(maxDuration, "millisecond"),
				end: args.date
			});
			for (const date of iterator) {
				if (date.end.isBefore(args.date)) continue;
				if (date.isAfter(args.date)) return false;
				return true;
			}
			return false;
		}
		for (const day of this._run({
			start: args.date,
			end: args.date
		})) return !!day;
		return false;
	}
	/**
	* Returns true if an occurrence starts after the provided datetime.
	* If the `excludeStart` option is provided, then occurrences
	* equal to the provided datetime are ignored.
	*
	* If the occurrence generator has a duration, and `excludeStart !== true`,
	* and a `maxDuration` argument is supplied (either in the constructor or
	* here), then any occurrence that's end time is after/equal to the provided
	* datetime return true.
	*/
	occursAfter(date, options = {}) {
		const adapter = this.normalizeDateInput(date);
		if (this.hasDuration && !options.excludeStart) {
			const maxDuration = this.getMaxDuration("occursAfter", options);
			const iterator = this._run({ start: adapter.subtract(maxDuration, "millisecond") });
			for (const date of iterator) {
				if (date.end.isBefore(adapter)) continue;
				return true;
			}
			return false;
		}
		for (const day of this._run({ start: adapter })) {
			if (options.excludeStart && day.isEqual(adapter)) continue;
			return true;
		}
		return false;
	}
	/**
	* Returns true if an occurrence starts before the provided datetime.
	* If the `excludeStart` option is provided, then occurrences
	* equal to the provided datetime are ignored.
	*
	* If the occurrence generator has a duration, and `excludeStart` is
	* also provided, then this will only return true if an occurrence
	* both starts and ends before the provided datetime.
	*/
	occursBefore(date, options = {}) {
		const adapter = this.normalizeDateInput(date);
		if (this.hasDuration && options.excludeStart) {
			for (const day of this._run({
				end: adapter,
				reverse: true
			})) {
				if (day.end.isAfterOrEqual(adapter)) continue;
				return true;
			}
			return false;
		}
		for (const day of this._run({
			end: adapter,
			reverse: true
		})) {
			if (options.excludeStart && day.isEqual(adapter)) continue;
			return true;
		}
		return false;
	}
	get dateAdapter() {
		return DateAdapterBase$1.adapter;
	}
	normalizeOccurrencesArgs(rawArgs) {
		return Object.assign(Object.assign({}, rawArgs), {
			start: this.normalizeDateInput(rawArgs.start),
			end: this.normalizeDateInput(rawArgs.end)
		});
	}
	normalizeCollectionsArgs(rawArgs) {
		if (rawArgs.reverse !== void 0) throw new ArgumentError("`collections()` does not support the `reverse` option at this time.");
		return Object.assign(Object.assign({}, rawArgs), {
			start: this.normalizeDateInput(rawArgs.start),
			end: this.normalizeDateInput(rawArgs.end)
		});
	}
	normalizeOccursOnArgs(rawArgs = {}) {
		return Object.assign(Object.assign({}, rawArgs), {
			date: this.normalizeDateInput(rawArgs.date),
			after: this.normalizeDateInput(rawArgs.after),
			before: this.normalizeDateInput(rawArgs.before),
			excludeDates: rawArgs.excludeDates && rawArgs.excludeDates.map((date) => this.normalizeDateInput(date))
		});
	}
	normalizeRunArgs(args) {
		return Object.assign(Object.assign({}, args), {
			start: this.normalizeDateInput(args.start),
			end: this.normalizeDateInput(args.end)
		});
	}
	normalizeDateInput(date) {
		return date ? dateInputToDateTime(date, this.timezone) : void 0;
	}
	normalizeDateInputToAdapter(date) {
		if (!date) return;
		return dateInputToDateAdapter(date);
	}
	normalizeRunOutput(date) {
		return normalizeDateTimeTimezone$1(date, this.timezone);
	}
	getMaxDuration(method, options) {
		const maxDuration = options.maxDuration || this.maxDuration;
		if (!Number.isInteger(maxDuration)) throw new ArgumentError(`When an occurrence generator has a duration, a 'maxDuration' argument must be supplied to ${method}().`);
		return maxDuration;
	}
};
var OccurrenceIterator = class {
	constructor(iterable, args) {
		this.iterable = iterable;
		this.args = args;
		this[Symbol.iterator] = () => this.occurrenceIterator();
		this.iterator = iterable._run(args);
		this.isInfinite = iterable.isInfinite;
	}
	next(args) {
		return this.occurrenceIterator(args).next();
	}
	toArray() {
		if (this.args.end || this.args.take || !this.isInfinite) return Array.from(this.occurrenceIterator());
		throw new InfiniteLoopError("OccurrenceIterator#toArray() can only be called if the iterator is not infinite, or you provide and `end` argument, or you provide a `take` argument.");
	}
	*occurrenceIterator(rawArgs) {
		let args = this.normalizeRunArgs(rawArgs);
		let date = this.iterator.next(args).value;
		while (date) {
			const yieldArgs = yield this.normalizeDateOutput(date);
			args = this.normalizeRunArgs(yieldArgs);
			date = this.iterator.next(args).value;
		}
	}
	normalizeRunArgs(args) {
		return { skipToDate: this.normalizeDateInput(args && args.skipToDate) };
	}
	normalizeDateInput(date) {
		return date ? dateInputToDateTime(date, this.iterable.timezone) : void 0;
	}
	normalizeDateOutput(date) {
		if (!date) return;
		return date ? DateAdapterBase$1.adapter.fromDateTime(date) : void 0;
	}
};
var Collection = class {
	constructor(dates = [], granularity, periodStart, periodEnd) {
		this.dates = dates;
		this.granularity = granularity;
		this.periodStart = periodStart;
		this.periodEnd = periodEnd;
	}
};
var CollectionIterator = class {
	constructor(iterable, args) {
		this.iterable = iterable;
		this.args = args;
		this.granularity = "year";
		this[Symbol.iterator] = () => this.iterator;
		if (args.granularity) {
			this.granularity = args.granularity;
			if (this.granularity === "week" && !args.weekStart) throw new Error("\"week\" granularity requires `weekStart` arg");
		}
		if (args.weekStart) this.weekStart = args.weekStart;
		if (args.reverse) throw new Error("`OccurrenceGenerator#collections()` does not support iterating in reverse. Though `OccurrenceGenerator#occurrences()` does support iterating in reverse.");
		this.args = Object.assign(Object.assign({}, args), {
			start: args.start || iterable._run().next().value,
			end: args.end && this.getPeriod(args.end).end
		});
		this.startDate = this.args.start && this.normalizeDateOutput(this.getPeriod(this.args.start).start) || null;
		this.iterator = this.collectionIterator();
	}
	next() {
		return this.iterator.next();
	}
	/**
	* While `next()` and `[Symbol.iterator]` both share state,
	* `toArray()` does not share state and always returns the whole
	* collections array.
	*/
	toArray() {
		if (this.args.end || this.args.take || !this.iterable.isInfinite) {
			const collections = [];
			for (const collection of this.collectionIterator()) collections.push(collection);
			return collections;
		}
		throw new InfiniteLoopError("CollectionIterator#toArray() can only be called if the iterator is not infinite, or you provide and `end` argument, or you provide a `take` argument.");
	}
	normalizeDateOutput(date) {
		if (!date) return;
		return DateAdapterBase$1.adapter.fromDateTime(date);
	}
	*collectionIterator() {
		if (!this.startDate) return;
		let iterator = this.occurrenceIterator();
		let date = iterator.next().value;
		if (!date) return;
		let period = this.getPeriod(this.args.start);
		let dates = [];
		let index = 0;
		while (date && (this.args.take === void 0 || this.args.take > index)) {
			while (date && date.isBeforeOrEqual(period.end)) {
				dates.push(date);
				date = iterator.next().value;
			}
			yield new Collection(dates.map((date) => this.normalizeDateOutput(date)), this.granularity, this.normalizeDateOutput(period.start), this.normalizeDateOutput(period.end));
			if (!date) return;
			dates = [];
			period = !this.args.skipEmptyPeriods ? this.getPeriod(this.incrementPeriod(period.period)) : this.getPeriod(date);
			if (this.granularity === "month" && this.weekStart) {
				iterator = this.iterable._run({
					start: period.start,
					end: this.args.end
				});
				date = iterator.next().value;
			}
			index++;
		}
	}
	getPeriod(date) {
		let start;
		let end;
		let period;
		if (this.granularity === "month" && this.weekStart) {
			start = date.granularity("month").granularity("week", { weekStart: this.weekStart });
			end = date.endGranularity("month").endGranularity("week", { weekStart: this.weekStart });
			period = date.granularity("month");
		} else {
			start = date.granularity(this.granularity, { weekStart: this.weekStart });
			end = date.endGranularity(this.granularity, { weekStart: this.weekStart });
			period = start;
		}
		return {
			start,
			end,
			period
		};
	}
	incrementPeriod(date) {
		return date.add(1, this.granularity);
	}
	occurrenceIterator() {
		let start = this.args.start || this.iterable._run().next().value;
		if (!start) return this.iterable._run(this.args);
		start = this.getPeriod(start).start;
		return this.iterable._run({
			start,
			end: this.args.end
		});
	}
};
var Operator = class Operator extends OccurrenceGenerator {
	constructor(streams, config) {
		super(config);
		this.streams = streams;
		this.config = config;
		this.timezone = config.timezone;
		this.streams = streams.map((stream) => stream instanceof Operator ? stream : stream.set("timezone", this.timezone));
		this.isInfinite = this.calculateIsInfinite();
		this.hasDuration = this.calculateHasDuration();
	}
	normalizeDateInput(date) {
		if (!date) return;
		return dateInputToDateTime(date, this.timezone);
	}
	normalizeRunOutput(date) {
		return normalizeDateTimeTimezone$1(date, this.timezone);
	}
};
/**
* Simple class that lets us access the `value`, `runArgs`, and `done`
* status of an OccurrenceGenerator iterator
*/
var IterableWrapper = class {
	constructor(generator, runArgs) {
		this.runArgs = runArgs;
		this.stream = generator._run(this.runArgs);
		this.next();
	}
	next(args) {
		const { done, value } = this.stream.next(args);
		this.done = typeof done === "boolean" ? done : true;
		this.value = value;
		return {
			done,
			value
		};
	}
};
function processYieldArgs(streams, options = {}, yieldArgs = {}) {
	if (!yieldArgs.skipToDate || streams.length === 0) return;
	if (options.reverse ? streams.every((s) => s.value.isBeforeOrEqual(yieldArgs.skipToDate)) : streams.every((s) => s.value.isAfterOrEqual(yieldArgs.skipToDate))) throw new Error("A provided `skipToDate` option must be greater than the last yielded date (or smaller, in the case of reverse iteration)");
	for (const stream of streams) {
		if (stream.done) continue;
		if (options.reverse ? stream.value.isBeforeOrEqual(yieldArgs.skipToDate) : stream.value.isAfterOrEqual(yieldArgs.skipToDate)) continue;
		stream.next(yieldArgs);
	}
}
/** sorts ascending with completed iterables at the end */
function streamsComparer(a, b) {
	if (a.done && b.done) return 0;
	if (a.done) return 1;
	if (b.done) return -1;
	if (a.value.isAfter(b.value)) return 1;
	return -1;
}
/** sorts descending with completed iterables at the start */
function streamsReverseComparer(a, b) {
	if (a.done && b.done) return 0;
	if (a.done) return -1;
	if (b.done) return 1;
	if (a.value.isAfter(b.value)) return -1;
	return 1;
}
function selectNextIterable(streams, options = {}, yieldArgs = {}) {
	processYieldArgs(streams, options, yieldArgs);
	return streams.sort(options.reverse ? streamsReverseComparer : streamsComparer).filter((s) => !s.done).shift();
}
/**
* An operator function which accepts a spread of occurrence generators
* and adds their occurrences to the output.
*
* @param streams a spread of occurrence generators
*/
function add$2(...streams) {
	return (options) => new AddOperator(streams, options);
}
var AddOperator = class AddOperator extends Operator {
	set(_, value) {
		return new AddOperator(this.streams.map((stream) => stream.set("timezone", value)), Object.assign(Object.assign({}, this.config), {
			base: this.config.base && this.config.base.set("timezone", value),
			timezone: value
		}));
	}
	*_run(args = {}) {
		const wrappedStreams = this.streams.map((input) => new IterableWrapper(input, args));
		if (this.config.base) wrappedStreams.push(new IterableWrapper(this.config.base, args));
		if (wrappedStreams.length === 0) return;
		let stream = selectNextIterable(wrappedStreams, args);
		while (stream && !stream.done) {
			const yieldArgs = yield this.normalizeRunOutput(stream.value);
			if (!(yieldArgs && yieldArgs.skipToDate)) stream.next();
			stream = selectNextIterable(wrappedStreams, args, yieldArgs);
		}
	}
	calculateIsInfinite() {
		return this.config.base && this.config.base.isInfinite || this.streams.some((stream) => stream.isInfinite);
	}
	calculateHasDuration() {
		const streamsDuration = this.streams.every((stream) => stream.hasDuration);
		if (!this.config.base) return streamsDuration;
		return this.config.base.hasDuration && streamsDuration;
	}
};
var Dates = class Dates extends OccurrenceGenerator {
	constructor(args = {}) {
		super(args);
		this.adapters = [];
		this.isInfinite = false;
		this.maxDuration = 0;
		this.datetimes = [];
		this.data = args.data;
		if (args.dates) {
			this.adapters = args.dates.map((date) => {
				let adapter = this.normalizeDateInputToAdapter(date);
				if (args.duration && !adapter.duration) adapter = adapter.set("duration", args.duration);
				return adapter.set("timezone", this.timezone);
			});
			this.datetimes = this.adapters.map((adapter) => adapter.toDateTime());
		}
		this.hasDuration = this.datetimes.every((date) => !!date.duration);
		if (this.hasDuration) this.maxDuration = this.adapters.reduce((prev, curr) => curr.duration > prev ? curr.duration : prev, 0);
	}
	get length() {
		return this.adapters.length;
	}
	/** Returns the first occurrence or, if there are no occurrences, null. */
	get firstDate() {
		return this.adapters[0] || null;
	}
	/** Returns the last occurrence or, if there are no occurrences, null. */
	get lastDate() {
		return this.adapters[this.length - 1] || null;
	}
	occurrences(args = {}) {
		return new OccurrenceIterator(this, this.normalizeOccurrencesArgs(args));
	}
	collections(args = {}) {
		return new CollectionIterator(this, this.normalizeCollectionsArgs(args));
	}
	add(value) {
		return new Dates({
			dates: [...this.adapters, value],
			timezone: this.timezone,
			data: this.data
		});
	}
	remove(value) {
		const dates = this.adapters.slice();
		const input = this.normalizeDateInputToAdapter(value);
		const index = dates.findIndex((date) => date.valueOf() === input.valueOf());
		if (index >= 0) dates.splice(index, 1);
		return new Dates({
			dates,
			timezone: this.timezone,
			data: this.data
		});
	}
	set(prop, value, options = {}) {
		let timezone = this.timezone;
		let dates = this.adapters.slice();
		if (prop === "timezone") {
			if (value === this.timezone) return this;
			else if (options.keepLocalTime) dates = this.adapters.map((adapter) => {
				const json = adapter.toJSON();
				json.timezone = value;
				return this.dateAdapter.fromJSON(json);
			});
			timezone = value;
		} else if (prop === "dates") dates = value;
		else if (prop === "duration") dates = dates.map((date) => date.set("duration", value || 0));
		else throw new ArgumentError(`Unexpected prop argument "${prop}". Accepted values are "timezone" or "dates"`);
		return new Dates({
			dates,
			data: this.data,
			timezone
		});
	}
	filter(fn) {
		return new Dates({
			dates: this.adapters.filter(fn),
			data: this.data,
			timezone: this.timezone
		});
	}
	*_run(args = {}) {
		let dates = this.datetimes.sort(dateTimeSortComparer);
		if (args.start) dates = dates.filter((date) => date.isAfterOrEqual(args.start));
		if (args.end) dates = dates.filter((date) => date.isBeforeOrEqual(args.end));
		if (args.reverse) dates = dates.slice().reverse();
		if (args.take) dates = dates.slice(0, args.take);
		const dateCache = dates.slice();
		let date = dateCache.shift();
		let yieldArgs;
		while (date) {
			if (yieldArgs && yieldArgs.skipToDate && (args.reverse ? yieldArgs.skipToDate.isBefore(date) : yieldArgs.skipToDate.isAfter(date))) {
				date = dateCache.shift();
				continue;
			}
			date = date.add(this, "generator");
			yieldArgs = yield this.normalizeRunOutput(date);
			if (yieldArgs && yieldArgs.skipToDate && (args.reverse ? yieldArgs.skipToDate.isAfterOrEqual(date) : yieldArgs.skipToDate.isBeforeOrEqual(date))) throw new Error("A provided `skipToDate` option must be greater than the last yielded date (or smaller, in the case of reverse iteration)");
			date = dateCache.shift();
		}
	}
};
var InvalidDateAdapterError = class extends Error {};
var dateAdapterConfig;
var DateAdapterBase = class {
	constructor(_date, options) {
		/**
		* The metadata property is intended to store arbitrary data
		* related to this DateAdapter. Unlike other properties, the
		* metadata property is intended to be mutable.
		*/
		this.metadata = {};
		this.duration = options && options.duration || 0;
		this.generators = options && options.generators && options.generators.slice() || [];
		if (!Number.isInteger(this.duration) || this.duration < 0) throw new InvalidDateAdapterError("duration must be a non-negative integer");
	}
	static set adapter(value) {
		if (dateAdapterConfig) throw new Error(`"${dateAdapterConfig.name}" has already been configured.`);
		dateAdapterConfig = value;
	}
	static get adapter() {
		if (!dateAdapterConfig) throw new Error("No date adapter has been configured. See rSchedule docs.");
		return dateAdapterConfig;
	}
	static isDate(_object) {
		throw unimplementedError("isDate()");
	}
	static fromDate(_date, _options) {
		throw unimplementedError("fromDate()");
	}
	static fromJSON(_json) {
		throw unimplementedError("fromJSON()");
	}
	static fromDateTime(_datetime) {
		throw unimplementedError("fromDateTime()");
	}
	/**
	* Returns a string in simplified extended ISO format (ISO 8601).
	*
	* _Note: this method is intended for testing and its
	* implementation isn't particularly performant._
	*/
	toISOString() {
		return this.set("timezone", "UTC").toDateTime().toISOString();
	}
	toDateTime() {
		return DateTime.fromJSON(Object.assign(Object.assign({}, this.toJSON()), {
			generators: this.generators,
			metadata: this.metadata
		}));
	}
};
DateAdapterBase.hasTimezoneSupport = false;
function unimplementedError(name) {
	return /* @__PURE__ */ new Error(`You must implement the "${name}" method for this DateAdapter class`);
}
var DateAdapter;
(function(DateAdapter) {
	DateAdapter.WEEKDAYS = [
		"SU",
		"MO",
		"TU",
		"WE",
		"TH",
		"FR",
		"SA"
	];
	DateAdapter.MILLISECONDS_IN_SECOND = 1e3;
	DateAdapter.MILLISECONDS_IN_MINUTE = DateAdapter.MILLISECONDS_IN_SECOND * 60;
	DateAdapter.MILLISECONDS_IN_HOUR = DateAdapter.MILLISECONDS_IN_MINUTE * 60;
	DateAdapter.MILLISECONDS_IN_DAY = DateAdapter.MILLISECONDS_IN_HOUR * 24;
	DateAdapter.MILLISECONDS_IN_WEEK = DateAdapter.MILLISECONDS_IN_DAY * 7;
})(DateAdapter || (DateAdapter = {}));
var InvalidDateTimeError = class extends Error {};
var DateTime = class DateTime {
	constructor(date, timezone, duration, generators, options = {}) {
		this.metadata = {};
		this.date = new Date(date);
		this.timezone = timezone || null;
		this.duration = duration || 0;
		this.generators = generators && generators.slice() || [];
		if (!Number.isInteger(this.duration) || this.duration < 0) throw new InvalidDateTimeError("duration must be a non-negative integer");
		if (options.metadata) Object.assign(this.metadata, options.metadata);
		this.assertIsValid();
	}
	static fromJSON(json) {
		return new DateTime(new Date(Date.UTC(json.year, json.month - 1, json.day, json.hour, json.minute, json.second, json.millisecond)), json.timezone, json.duration, json.generators, { metadata: json.metadata });
	}
	static fromDateAdapter(adapter) {
		return DateTime.fromJSON(Object.assign(Object.assign({}, adapter.toJSON()), {
			generators: adapter.generators,
			metadata: adapter.metadata
		}));
	}
	/**
	* Returns `undefined` if `duration` is `0`. Else returns
	* the `end` date.
	*/
	get end() {
		if (!this.duration) return;
		if (this._end) return this._end;
		this._end = this.add(this.duration, "millisecond");
		return this._end;
	}
	isEqual(object) {
		if (!object) return false;
		assertSameTimeZone(this, object);
		return this.valueOf() === object.valueOf();
	}
	isBefore(object) {
		assertSameTimeZone(this, object);
		return this.valueOf() < object.valueOf();
	}
	isBeforeOrEqual(object) {
		assertSameTimeZone(this, object);
		return this.valueOf() <= object.valueOf();
	}
	isAfter(object) {
		assertSameTimeZone(this, object);
		return this.valueOf() > object.valueOf();
	}
	isAfterOrEqual(object) {
		assertSameTimeZone(this, object);
		return this.valueOf() >= object.valueOf();
	}
	isOccurring(object) {
		if (!this.duration) throw new Error("DateTime#isOccurring() is only applicable to DateTimes with durations");
		assertSameTimeZone(this, object);
		return object.isAfterOrEqual(this) && object.isBeforeOrEqual(this.add(this.duration, "millisecond"));
	}
	add(amount, unit) {
		switch (unit) {
			case "generator": {
				const generators = this.generators.slice();
				generators.unshift(amount);
				return new DateTime(this.date, this.timezone, this.duration, generators);
			}
			case "year": return this.forkDateTime(addUTCYears(this.date, amount));
			case "month": return this.forkDateTime(addUTCMonths(this.date, amount));
			case "week": return this.forkDateTime(addUTCWeeks(this.date, amount));
			case "day": return this.forkDateTime(addUTCDays(this.date, amount));
			case "hour": return this.forkDateTime(addUTCHours(this.date, amount));
			case "minute": return this.forkDateTime(addUTCMinutes(this.date, amount));
			case "second": return this.forkDateTime(addUTCSeconds(this.date, amount));
			case "millisecond": return this.forkDateTime(addUTCMilliseconds(this.date, amount));
			default: throw new Error("Invalid unit provided to `DateTime#add`");
		}
	}
	subtract(amount, unit) {
		switch (unit) {
			case "year": return this.forkDateTime(subUTCYears(this.date, amount));
			case "month": return this.forkDateTime(subUTCMonths(this.date, amount));
			case "week": return this.forkDateTime(subUTCWeeks(this.date, amount));
			case "day": return this.forkDateTime(subUTCDays(this.date, amount));
			case "hour": return this.forkDateTime(subUTCHours(this.date, amount));
			case "minute": return this.forkDateTime(subUTCMinutes(this.date, amount));
			case "second": return this.forkDateTime(subUTCSeconds(this.date, amount));
			case "millisecond": return this.forkDateTime(subUTCMilliseconds(this.date, amount));
			default: throw new Error("Invalid unit provided to `DateTime#subtract`");
		}
	}
	get(unit) {
		switch (unit) {
			case "year": return this.date.getUTCFullYear();
			case "month": return this.date.getUTCMonth() + 1;
			case "yearday": return getUTCYearDay(this.date);
			case "weekday": return DateAdapter.WEEKDAYS[this.date.getUTCDay()];
			case "day": return this.date.getUTCDate();
			case "hour": return this.date.getUTCHours();
			case "minute": return this.date.getUTCMinutes();
			case "second": return this.date.getUTCSeconds();
			case "millisecond": return this.date.getUTCMilliseconds();
			default: throw new Error("Invalid unit provided to `DateTime#set`");
		}
	}
	set(unit, value) {
		if (unit === "duration") return new DateTime(this.date, this.timezone, value, this.generators);
		if (unit === "generators") return new DateTime(this.date, this.timezone, this.duration, value);
		let date = new Date(this.date);
		switch (unit) {
			case "year":
				date.setUTCFullYear(value);
				break;
			case "month": {
				const length = monthLength(value, date.getUTCFullYear());
				if (date.getUTCDate() > length) {
					date.setUTCDate(1);
					date.setUTCMonth(value);
					date = subUTCDays(date, 1);
				} else date.setUTCMonth(value - 1);
				break;
			}
			case "day":
				date.setUTCDate(value);
				break;
			case "hour":
				date.setUTCHours(value);
				break;
			case "minute":
				date.setUTCMinutes(value);
				break;
			case "second":
				date.setUTCSeconds(value);
				break;
			case "millisecond":
				date.setUTCMilliseconds(value);
				break;
			default: throw new Error("Invalid unit provided to `DateTime#set`");
		}
		return this.forkDateTime(date);
	}
	granularity(granularity, opt = {}) {
		let date = this.forkDateTime(this.date);
		switch (granularity) {
			case "year": date = date.set("month", 1);
			case "month":
				date = date.set("day", 1);
				break;
			case "week": date = setDateToStartOfWeek(date, opt.weekStart);
		}
		switch (granularity) {
			case "year":
			case "month":
			case "week":
			case "day": date = date.set("hour", 0);
			case "hour": date = date.set("minute", 0);
			case "minute": date = date.set("second", 0);
			case "second": date = date.set("millisecond", 0);
			case "millisecond": return date;
			default: throw new Error("Invalid granularity provided to `DateTime#granularity`: " + granularity);
		}
	}
	endGranularity(granularity, opt = {}) {
		let date = this.forkDateTime(this.date);
		switch (granularity) {
			case "year": date = date.set("month", 12);
			case "month":
				date = date.set("day", monthLength(date.get("month"), date.get("year")));
				break;
			case "week": date = setDateToEndOfWeek(date, opt.weekStart);
		}
		switch (granularity) {
			case "year":
			case "month":
			case "week":
			case "day": date = date.set("hour", 23);
			case "hour": date = date.set("minute", 59);
			case "minute": date = date.set("second", 59);
			case "second": date = date.set("millisecond", 999);
			case "millisecond": return date;
			default: throw new Error("Invalid granularity provided to `DateTime#granularity`: " + granularity);
		}
	}
	toISOString() {
		return this.date.toISOString();
	}
	toDateTime() {
		return this;
	}
	toJSON() {
		const json = {
			timezone: this.timezone,
			year: this.get("year"),
			month: this.get("month"),
			day: this.get("day"),
			hour: this.get("hour"),
			minute: this.get("minute"),
			second: this.get("second"),
			millisecond: this.get("millisecond")
		};
		if (this.duration) json.duration = this.duration;
		return json;
	}
	valueOf() {
		return this.date.valueOf();
	}
	assertIsValid() {
		if (isNaN(this.valueOf())) throw new InvalidDateTimeError("DateTime has invalid date.");
		return true;
	}
	forkDateTime(date) {
		return new DateTime(date, this.timezone, this.duration, this.generators);
	}
};
function assertSameTimeZone(x, y) {
	if (x.timezone !== y.timezone) throw new InvalidDateTimeError("Attempted to compare a datetime to another date in a different timezone: " + JSON.stringify(x) + " and " + JSON.stringify(y));
	return true;
}
function setDateToStartOfWeek(date, wkst) {
	const index = orderedWeekdays(wkst).indexOf(date.get("weekday"));
	return date.subtract(index, "day");
}
function setDateToEndOfWeek(date, wkst) {
	const index = orderedWeekdays(wkst).indexOf(date.get("weekday"));
	return date.add(6 - index, "day");
}
function orderedWeekdays(wkst = "SU") {
	const wkdays = DateAdapter.WEEKDAYS.slice();
	let index = wkdays.indexOf(wkst);
	while (index !== 0) {
		shiftArray(wkdays);
		index--;
	}
	return wkdays;
}
function shiftArray(array, from = "first") {
	if (array.length === 0) return array;
	else if (from === "first") array.push(array.shift());
	else array.unshift(array.pop());
	return array;
}
/**
* Returns the days in the given month.
*
* @param month base-1
* @param year
*/
function monthLength(month, year) {
	return {
		1: 31,
		2: getDaysInFebruary(year),
		3: 31,
		4: 30,
		5: 31,
		6: 30,
		7: 31,
		8: 31,
		9: 30,
		10: 31,
		11: 30,
		12: 31
	}[month];
}
function getDaysInFebruary(year) {
	return isLeapYear$1(year) ? 29 : 28;
}
function isLeapYear$1(year) {
	return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;
}
function getUTCYearDay(now) {
	const start = new Date(Date.UTC(now.getUTCFullYear(), 0, 1));
	const diff = now.valueOf() - start.valueOf();
	return 1 + Math.floor(diff / DateAdapter.MILLISECONDS_IN_DAY);
}
/**
* These functions are basically lifted from `date-fns`, but changed
* to use the UTC date methods, which `date-fns` doesn't support.
*/
function toInteger(input) {
	if (input === null || input === true || input === false) return NaN;
	const int = Number(input);
	if (isNaN(int)) return int;
	return int < 0 ? Math.ceil(int) : Math.floor(int);
}
function addMilliseconds(dirtyDate, dirtyAmount) {
	if (arguments.length < 2) throw new TypeError("2 arguments required, but only " + arguments.length + " present");
	const timestamp = dirtyDate.valueOf();
	const amount = toInteger(dirtyAmount);
	return new Date(timestamp + amount);
}
function addUTCYears(date, input) {
	return addUTCMonths(date, toInteger(input) * 12);
}
function addUTCMonths(date, input) {
	const amount = toInteger(input);
	date = new Date(date);
	const desiredMonth = date.getUTCMonth() + amount;
	const dateWithDesiredMonth = /* @__PURE__ */ new Date(0);
	dateWithDesiredMonth.setUTCFullYear(date.getUTCFullYear(), desiredMonth, 1);
	dateWithDesiredMonth.setUTCHours(0, 0, 0, 0);
	const daysInMonth = monthLength(dateWithDesiredMonth.getUTCMonth() + 1, dateWithDesiredMonth.getUTCFullYear());
	date.setUTCMonth(desiredMonth, Math.min(daysInMonth, date.getUTCDate()));
	return date;
}
function addUTCWeeks(date, input) {
	return addUTCDays(date, toInteger(input) * 7);
}
function addUTCDays(date, input) {
	return addUTCMilliseconds(date, toInteger(input) * DateAdapter.MILLISECONDS_IN_DAY);
}
function addUTCHours(date, input) {
	return addMilliseconds(date, toInteger(input) * DateAdapter.MILLISECONDS_IN_HOUR);
}
function addUTCMinutes(date, input) {
	return addMilliseconds(date, toInteger(input) * DateAdapter.MILLISECONDS_IN_MINUTE);
}
function addUTCSeconds(date, input) {
	return addMilliseconds(date, toInteger(input) * DateAdapter.MILLISECONDS_IN_SECOND);
}
function addUTCMilliseconds(date, input) {
	const amount = toInteger(input);
	const timestamp = date.getTime();
	return new Date(timestamp + amount);
}
function subUTCYears(date, amount) {
	return addUTCYears(date, -amount);
}
function subUTCMonths(date, amount) {
	return addUTCMonths(date, -amount);
}
function subUTCWeeks(date, amount) {
	return addUTCWeeks(date, -amount);
}
function subUTCDays(date, amount) {
	return addUTCDays(date, -amount);
}
function subUTCHours(date, amount) {
	return addUTCHours(date, -amount);
}
function subUTCMinutes(date, amount) {
	return addUTCMinutes(date, -amount);
}
function subUTCSeconds(date, amount) {
	return addUTCSeconds(date, -amount);
}
function subUTCMilliseconds(date, amount) {
	return addUTCMilliseconds(date, -amount);
}
function normalizeDateTimeTimezone(date, timezone) {
	if (date.timezone !== timezone) return DateAdapterBase.adapter.fromDateTime(date).set("timezone", timezone).toDateTime();
	return date;
}
var RuleBase = class extends OccurrenceGenerator {
	constructor(recurrenceRules, config, options = {}) {
		super(options);
		this.recurrenceRules = recurrenceRules;
		this.options = cloneRuleOptions(config);
		this.normOptions = normalizeRuleOptions(this.recurrenceRules, this.options);
		this.timezone = options.timezone !== void 0 ? options.timezone : this.normOptions.start.timezone;
		this.data = options.data;
		this.hasDuration = !!config.duration;
		if (this.hasDuration) this.duration = config.duration;
		this.isInfinite = this.normOptions.end === void 0 && this.normOptions.count === void 0;
	}
	occurrences(args = {}) {
		return new OccurrenceIterator(this, this.normalizeOccurrencesArgs(args));
	}
	collections(args = {}) {
		return new CollectionIterator(this, this.normalizeCollectionsArgs(args));
	}
	*_run(rawArgs = {}) {
		const args = this.normalizeRunArgs(rawArgs);
		const iterator = new RecurrenceRulesIterator(recurrenceRulesReducer(this.recurrenceRules), this.normOptions, args);
		let date = iterator.next().value;
		let index = 0;
		while (date && (args.take === void 0 || index < args.take)) {
			index++;
			date = date.add(this, "generator");
			const yieldArgs = yield this.normalizeRunOutput(date);
			if (yieldArgs === null || yieldArgs === void 0 ? void 0 : yieldArgs.skipToDate) date = iterator.next(Object.assign(Object.assign({}, yieldArgs), { skipToDate: normalizeDateTimeTimezone(yieldArgs.skipToDate, iterator.start.timezone) })).value;
			else date = iterator.next(yieldArgs).value;
		}
	}
};
var Rule = class Rule extends RuleBase {
	/**
	* Create a new Rule object with the specified rule config and options.
	*
	* ### Options
	*
	* - **timezone**: the timezone that yielded occurrences should be in. Note,
	*   this does not change the rule config. Occurrences are first found using
	*   the unmodified rule config, and then converted to the timezone specified
	*   here before being yielded.
	* - **data**: arbitrary data you can associate with this rule. This
	*   is the only mutable property of `Rule` objects.
	*
	* ### Rule Config
	*
	* - #### frequency
	*
	*   The frequency rule part identifies the type of recurrence rule. Valid values
	*   include `"SECONDLY"`, `"MINUTELY"`, `"HOURLY"`, `"DAILY"`, `"WEEKLY"`,
	*   `"MONTHLY"`, or `"YEARLY"`.
	*
	* - #### start
	*
	*   The start of the rule (not necessarily the first occurrence).
	*   Either a `DateAdapter` instance, date object, or `DateTime` object.
	*   The type of date object depends on the `DateAdapter` class used for this
	*   `Rule`.
	*
	* - #### end?
	*
	*   The end of the rule (not necessarily the last occurrence).
	*   Either a `DateAdapter` instance, date object, or `DateTime` object.
	*   The type of date object depends on the `DateAdapter` class used for this
	*   `Rule`.
	*
	* - #### duration?
	*
	*   A length of time expressed in milliseconds.
	*
	* - #### interval?
	*
	*   The interval rule part contains a positive integer representing at
	*   which intervals the recurrence rule repeats. The default value is
	*   `1`, meaning every second for a SECONDLY rule, every minute for a
	*   MINUTELY rule, every hour for an HOURLY rule, every day for a
	*   DAILY rule, every week for a WEEKLY rule, every month for a
	*   MONTHLY rule, and every year for a YEARLY rule. For example,
	*   within a DAILY rule, a value of `8` means every eight days.
	*
	* - #### count?
	*
	*   The count rule part defines the number of occurrences at which to
	*   range-bound the recurrence. `count` and `end` are both two different
	*   ways of specifying how a recurrence completes.
	*
	* - #### weekStart?
	*
	*   The weekStart rule part specifies the day on which the workweek starts.
	*   Valid values are `"MO"`, `"TU"`, `"WE"`, `"TH"`, `"FR"`, `"SA"`, and `"SU"`.
	*   This is significant when a WEEKLY rule has an interval greater than 1,
	*   and a `byDayOfWeek` rule part is specified. The
	*   default value is `"MO"`.
	*
	* - #### bySecondOfMinute?
	*
	*   The bySecondOfMinute rule part expects an array of seconds
	*   within a minute. Valid values are 0 to 60.
	*
	* - #### byMinuteOfHour?
	*
	*   The byMinuteOfHour rule part expects an array of minutes within an hour.
	*   Valid values are 0 to 59.
	*
	* - #### byHourOfDay?
	*
	*   The byHourOfDay rule part expects an array of hours of the day.
	*   Valid values are 0 to 23.
	*
	* - #### byDayOfWeek?
	*
	*   *note: the byDayOfWeek rule part is kinda complex. Blame the ICAL spec.*
	*
	*   The byDayOfWeek rule part expects an array. Each array entry can
	*   be a day of the week (`"SU"`, `"MO"` , `"TU"`, `"WE"`, `"TH"`,
	*   `"FR"`, `"SA"`). If the rule's `frequency` is either MONTHLY or YEARLY,
	*   Any entry can also be a tuple where the first value of the tuple is a
	*   day of the week and the second value is an positive/negative integer
	*   (e.g. `["SU", 1]`). In this case, the number indicates the nth occurrence of
	*   the specified day within the MONTHLY or YEARLY rule.
	*
	*   The behavior of byDayOfWeek changes depending on the `frequency`
	*   of the rule.
	*
	*   Within a MONTHLY rule, `["MO", 1]` represents the first Monday
	*   within the month, whereas `["MO", -1]` represents the last Monday
	*   of the month.
	*
	*   Within a YEARLY rule, the numeric value in a byDayOfWeek tuple entry
	*   corresponds to an offset within the month when the byMonthOfYear rule part is
	*   present, and corresponds to an offset within the year otherwise.
	*
	*   Regardless of rule `frequency`, if a byDayOfWeek entry is a string
	*   (rather than a tuple), it means "all of these days" within the specified
	*   frequency (e.g. within a MONTHLY rule, `"MO"` represents all Mondays within
	*   the month).
	*
	* - #### byDayOfMonth?
	*
	*   The byDayOfMonth rule part expects an array of days
	*   of the month. Valid values are 1 to 31 or -31 to -1.
	*
	*   For example, -10 represents the tenth to the last day of the month.
	*   The byDayOfMonth rule part *must not* be specified when the rule's
	*   `frequency` is set to WEEKLY.
	*
	* - #### byMonthOfYear?
	*
	*   The byMonthOfYear rule part expects an array of months
	*   of the year. Valid values are 1 to 12.
	*
	*/
	constructor(config, options = {}) {
		super(Rule.recurrenceRules, config, options);
	}
	set(prop, value, tzoptions = {}) {
		let options = cloneRuleOptions(this.options);
		let timezone = this.timezone;
		if (prop === "timezone") {
			if (value === this.timezone && !tzoptions.keepLocalTime) return this;
			else if (tzoptions.keepLocalTime) {
				const json = this.normalizeDateInput(options.start).toJSON();
				json.timezone = value;
				const adapter = this.dateAdapter.fromJSON(json);
				options.start = options.start instanceof this.dateAdapter ? adapter : options.start instanceof DateTime$1 ? adapter.toDateTime() : adapter.date;
			}
			timezone = value;
		} else if (prop === "options") options = value;
		else options[prop] = value;
		return new Rule(options, {
			data: this.data,
			maxDuration: this.maxDuration,
			timezone
		});
	}
};
Rule.recurrenceRules = [];
var ScheduleBase = class extends OccurrenceGenerator {
	/**
	* Create a new Schedule object with the specified options.
	*
	* The order of precidence for rrules, rdates, exrules, and exdates is:
	*
	* 1. rrules are included
	* 2. exrules are excluded
	* 3. rdates are included
	* 4. exdates are excluded
	*
	*/
	constructor(options) {
		super(options);
		this.data = options.data;
	}
	occurrences(args = {}) {
		return new OccurrenceIterator(this, this.normalizeOccurrencesArgs(args));
	}
	collections(args = {}) {
		return new CollectionIterator(this, this.normalizeCollectionsArgs(args));
	}
	*_run(args = {}) {
		const count = args.take;
		delete args.take;
		const iterator = this.occurrenceStream._run(args);
		let date = iterator.next().value;
		let index = 0;
		while (date && (count === void 0 || count > index)) {
			date = date.add(this, "generator");
			const yieldArgs = yield this.normalizeRunOutput(date);
			date = iterator.next(yieldArgs).value;
			index++;
		}
	}
};
/**
* An operator function which accepts a spread of occurrence generators
* and removes their occurrences from the output.
*
* @param streams a spread of occurrence generators
*/
function subtract$2(...streams) {
	return (options) => new SubtractOperator(streams, options);
}
var SubtractOperator = class SubtractOperator extends Operator {
	/** Not actually used but necessary for IRunnable interface */
	set(_, value) {
		return new SubtractOperator(this.streams.map((stream) => stream.set("timezone", value)), Object.assign(Object.assign({}, this.config), {
			base: this.config.base && this.config.base.set("timezone", value),
			timezone: value
		}));
	}
	*_run(args = {}) {
		if (!this.config.base) return;
		const inclusion = new IterableWrapper(this.config.base, args);
		const exclusion = new IterableWrapper(new AddOperator(this.streams, { timezone: this.config.timezone }), args);
		cycleStreams(inclusion, exclusion, args);
		while (!inclusion.done) {
			const yieldArgs = yield this.normalizeRunOutput(inclusion.value);
			if (!(yieldArgs && yieldArgs.skipToDate)) inclusion.next();
			cycleStreams(inclusion, exclusion, args, yieldArgs);
		}
	}
	calculateIsInfinite() {
		return !!(this.config.base && this.config.base.isInfinite);
	}
	calculateHasDuration() {
		return !!(this.config.base && this.config.base.hasDuration);
	}
};
function cycleStreams(inclusion, exclusion, options = {}, yieldArgs = {}) {
	processYieldArgs([inclusion, exclusion], options, yieldArgs);
	iterateExclusion(inclusion, exclusion, options);
	while (!inclusion.done && !exclusion.done && inclusion.value.isEqual(exclusion.value)) {
		inclusion.next();
		iterateExclusion(inclusion, exclusion, options);
	}
}
function iterateExclusion(inclusion, exclusion, options = {}) {
	if (options.reverse) {
		while (!exclusion.done && !inclusion.done && exclusion.value.isAfter(inclusion.value)) exclusion.next();
		return;
	}
	while (!exclusion.done && !inclusion.done && exclusion.value.isBefore(inclusion.value)) exclusion.next();
}
/**
* An operator function which deduplicates an occurrence stream. Occurrence
* `duration` is currently ignored.
*/
function unique() {
	return (options) => new UniqueOperator([], options);
}
var UniqueOperator = class UniqueOperator extends Operator {
	/** Not actually used but necessary for IRunnable interface */
	set(_, value) {
		return new UniqueOperator([], Object.assign(Object.assign({}, this.config), {
			base: this.config.base && this.config.base.set("timezone", value),
			timezone: value
		}));
	}
	*_run(args = {}) {
		if (!this.config.base) return;
		const stream = new IterableWrapper(this.config.base, args);
		while (!stream.done) {
			const yieldArgs = yield this.normalizeRunOutput(stream.value);
			const lastValue = stream.value;
			stream.next(yieldArgs);
			while (!(yieldArgs && yieldArgs.skipToDate) && !stream.done && stream.value.isEqual(lastValue)) stream.next();
		}
	}
	calculateIsInfinite() {
		return !!(this.config.base && this.config.base.isInfinite);
	}
	calculateHasDuration() {
		return !!(this.config.base && this.config.base.hasDuration);
	}
};
var Schedule = class Schedule extends ScheduleBase {
	/**
	* Create a new Schedule object with the specified options.
	*
	* The order of precidence for rrules, rdates, exrules, and exdates is:
	*
	* 1. rrules are included
	* 2. exrules are excluded
	* 3. rdates are included
	* 4. exdates are excluded
	*
	* ### Options
	*
	* - **timezone**: The timezone that yielded occurrences should be *displayed* in.
	*   Note, this one affects the *displayed* timezone of yielded occurrences.
	*   For rules, occurrences are first found using the unmodified rule
	*   config (including whatever timezone the `start` datetime is defined
	*   in), and then converted to the timezone specified here before being
	*   yielded. By default, the timezone is *local* time (`null`). So if you don't
	*   want your rules to be displayed in local time, you must supply a
	*   timezone argument.
	* - **data**: arbitrary data you can associate with this Schedule. This
	*   is the only mutable property of `Schedule` objects.
	* - **maxDuration**: currently unused.
	* - **rrules**: rules specifying when occurrences happen. See the "Rule Config"
	*   section below.
	* - **rdates**: individual dates that should be _included_ in the schedule.
	* - **exdates**: individual dates that should be _excluded_ from the schedule.
	* - **exrules**: rules specifying when occurrences shouldn't happen. See the
	*   "Rule Config" section below.
	*
	* ### Rule Config
	*
	* - #### frequency
	*
	*   The frequency rule part identifies the type of recurrence rule. Valid values
	*   include `"SECONDLY"`, `"MINUTELY"`, `"HOURLY"`, `"DAILY"`, `"WEEKLY"`,
	*   `"MONTHLY"`, or `"YEARLY"`.
	*
	* - #### start
	*
	*   The start of the rule (not necessarily the first occurrence).
	*   Either a `DateAdapter` instance, date object, or `DateTime` object.
	*   The type of date object depends on the `DateAdapter` class used for this
	*   `Rule`.
	*
	* - #### end?
	*
	*   The end of the rule (not necessarily the last occurrence).
	*   Either a `DateAdapter` instance, date object, or `DateTime` object.
	*   The type of date object depends on the `DateAdapter` class used for this
	*   `Rule`.
	*
	* - #### duration?
	*
	*   A length of time expressed in milliseconds.
	*
	* - #### interval?
	*
	*   The interval rule part contains a positive integer representing at
	*   which intervals the recurrence rule repeats. The default value is
	*   `1`, meaning every second for a SECONDLY rule, every minute for a
	*   MINUTELY rule, every hour for an HOURLY rule, every day for a
	*   DAILY rule, every week for a WEEKLY rule, every month for a
	*   MONTHLY rule, and every year for a YEARLY rule. For example,
	*   within a DAILY rule, a value of `8` means every eight days.
	*
	* - #### count?
	*
	*   The count rule part defines the number of occurrences at which to
	*   range-bound the recurrence. `count` and `end` are both two different
	*   ways of specifying how a recurrence completes.
	*
	* - #### weekStart?
	*
	*   The weekStart rule part specifies the day on which the workweek starts.
	*   Valid values are `"MO"`, `"TU"`, `"WE"`, `"TH"`, `"FR"`, `"SA"`, and `"SU"`.
	*   This is significant when a WEEKLY rule has an interval greater than 1,
	*   and a `byDayOfWeek` rule part is specified. The
	*   default value is `"MO"`.
	*
	* - #### bySecondOfMinute?
	*
	*   The bySecondOfMinute rule part expects an array of seconds
	*   within a minute. Valid values are 0 to 60.
	*
	* - #### byMinuteOfHour?
	*
	*   The byMinuteOfHour rule part expects an array of minutes within an hour.
	*   Valid values are 0 to 59.
	*
	* - #### byHourOfDay?
	*
	*   The byHourOfDay rule part expects an array of hours of the day.
	*   Valid values are 0 to 23.
	*
	* - #### byDayOfWeek?
	*
	*   *note: the byDayOfWeek rule part is kinda complex. Blame the ICAL spec.*
	*
	*   The byDayOfWeek rule part expects an array. Each array entry can
	*   be a day of the week (`"SU"`, `"MO"` , `"TU"`, `"WE"`, `"TH"`,
	*   `"FR"`, `"SA"`). If the rule's `frequency` is either MONTHLY or YEARLY,
	*   Any entry can also be a tuple where the first value of the tuple is a
	*   day of the week and the second value is an positive/negative integer
	*   (e.g. `["SU", 1]`). In this case, the number indicates the nth occurrence of
	*   the specified day within the MONTHLY or YEARLY rule.
	*
	*   The behavior of byDayOfWeek changes depending on the `frequency`
	*   of the rule.
	*
	*   Within a MONTHLY rule, `["MO", 1]` represents the first Monday
	*   within the month, whereas `["MO", -1]` represents the last Monday
	*   of the month.
	*
	*   Within a YEARLY rule, the numeric value in a byDayOfWeek tuple entry
	*   corresponds to an offset within the month when the byMonthOfYear rule part is
	*   present, and corresponds to an offset within the year otherwise.
	*
	*   Regardless of rule `frequency`, if a byDayOfWeek entry is a string
	*   (rather than a tuple), it means "all of these days" within the specified
	*   frequency (e.g. within a MONTHLY rule, `"MO"` represents all Mondays within
	*   the month).
	*
	* - #### byDayOfMonth?
	*
	*   The byDayOfMonth rule part expects an array of days
	*   of the month. Valid values are 1 to 31 or -31 to -1.
	*
	*   For example, -10 represents the tenth to the last day of the month.
	*   The byDayOfMonth rule part *must not* be specified when the rule's
	*   `frequency` is set to WEEKLY.
	*
	* - #### byMonthOfYear?
	*
	*   The byMonthOfYear rule part expects an array of months
	*   of the year. Valid values are 1 to 12.
	*
	*/
	constructor(options = {}) {
		super(options);
		this.rrules = [];
		this.exrules = [];
		for (const prop of ["rrules", "exrules"]) {
			const arg = options[prop];
			if (arg) this[prop] = arg.map((ruleArgs) => {
				if (ruleArgs instanceof Rule) return ruleArgs.set("timezone", this.timezone);
				else return new Rule(ruleArgs, { timezone: this.timezone });
			});
		}
		for (const prop of ["rdates", "exdates"]) {
			const arg = options[prop];
			if (arg) this[prop] = arg instanceof Dates ? arg.set("timezone", this.timezone) : new Dates({
				dates: arg,
				timezone: this.timezone
			});
			else this[prop] = new Dates({ timezone: this.timezone });
		}
		this.hasDuration = this.rrules.every((rule) => rule.hasDuration) && this.exrules.every((rule) => rule.hasDuration) && this.rdates.hasDuration && this.exdates.hasDuration;
		this.isInfinite = this.rrules.some((rule) => rule.isInfinite);
		this.occurrenceStream = [
			add$2(...this.rrules),
			subtract$2(...this.exrules),
			add$2(this.rdates),
			subtract$2(this.exdates),
			unique()
		].reduce((prev, curr) => curr({
			base: prev,
			timezone: this.timezone
		}), void 0);
	}
	add(prop, value) {
		const rrules = this.rrules.slice();
		const exrules = this.exrules.slice();
		let rdates = this.rdates;
		let exdates = this.exdates;
		switch (prop) {
			case "rrule":
				rrules.push(value);
				break;
			case "exrule":
				exrules.push(value);
				break;
			case "rdate":
				rdates = this.rdates.add(value);
				break;
			case "exdate":
				exdates = this.exdates.add(value);
				break;
		}
		return new Schedule({
			timezone: this.timezone,
			data: this.data,
			rrules,
			exrules,
			rdates,
			exdates
		});
	}
	remove(prop, value) {
		let rrules = this.rrules;
		let exrules = this.exrules;
		let rdates = this.rdates;
		let exdates = this.exdates;
		switch (prop) {
			case "rrule":
				rrules = rrules.filter((rule) => rule !== value);
				break;
			case "exrule":
				exrules = exrules.filter((rule) => rule !== value);
				break;
			case "rdate":
				rdates = this.rdates.remove(value);
				break;
			case "exdate":
				exdates = this.exdates.remove(value);
				break;
		}
		return new Schedule({
			timezone: this.timezone,
			data: this.data,
			rrules,
			exrules,
			rdates,
			exdates
		});
	}
	set(prop, value, options = {}) {
		let timezone = this.timezone;
		let rrules = this.rrules;
		let exrules = this.exrules;
		let rdates = this.rdates;
		let exdates = this.exdates;
		switch (prop) {
			case "timezone":
				if (value === this.timezone && !options.keepLocalTime) return this;
				else if (options.keepLocalTime) {
					rrules = rrules.map((rule) => rule.set("timezone", value, options));
					exrules = exrules.map((rule) => rule.set("timezone", value, options));
					rdates = rdates.set("timezone", value, options);
					exdates = exdates.set("timezone", value, options);
				}
				timezone = value;
				break;
			case "rrules":
				rrules = value;
				break;
			case "exrules":
				exrules = value;
				break;
			case "rdates":
				rdates = value;
				break;
			case "exdates":
				exdates = value;
				break;
		}
		return new Schedule({
			timezone,
			data: this.data,
			rrules,
			exrules,
			rdates,
			exdates
		});
	}
};
//#endregion
//#region ../../node_modules/@rschedule/core/es2015/rules.js
var RecurrenceRule = class {
	constructor(processor) {
		this.processor = processor;
		this.start = processor.start;
		this.end = processor.end;
		this.options = processor.options;
	}
};
var FrequencyRule = class extends RecurrenceRule {
	constructor(processor, initDate) {
		super(processor);
		this.initDate = initDate;
		this.intervalUnit = freqToGranularity(this.options.frequency);
		this.firstIntervalStartDate = this.normalizedStartDate(this.options.start);
		this.intervalStartDate = this.firstIntervalStartDate;
		this.intervalEndDate = this.normalizedEndDate(this.firstIntervalStartDate);
		this.skipToInterval(this.initDate);
	}
	run(date) {
		return this.validateDate(new ValidDateTime(date));
	}
	validateDate(arg) {
		const { date } = arg;
		if (arg instanceof ValidDateTime && this.dateIsWithinInterval(date)) return arg;
		this.skipToInterval(date);
		return new InvalidDateTime(this.dateIsWithinInterval(date) ? date : this.setToCurrentInterval());
	}
	setToCurrentInterval() {
		return this.intervalStartDate;
	}
	normalizedStartDate(date) {
		if (this.options.frequency === "WEEKLY") return date.granularity("week", { weekStart: this.options.weekStart });
		return date.granularity(this.intervalUnit);
	}
	normalizedEndDate(start) {
		switch (this.options.frequency) {
			case "YEARLY": return start.add(1, "year");
			case "MONTHLY": return start.add(1, "month");
			case "WEEKLY": return start.add(1, "week");
			case "DAILY": return start.add(1, "day");
			case "HOURLY": return start.add(1, "hour");
			case "MINUTELY": return start.add(1, "minute");
			case "SECONDLY": return start.add(1, "second");
			case "MILLISECONDLY": return start.add(1, "millisecond");
			default: throw new Error(`Unknown frequency ${this.options.frequency}`);
		}
	}
	skipToInterval(date) {
		const amount = this.intervalDifference(date);
		this.intervalStartDate = this.firstIntervalStartDate.add(amount, this.intervalUnit);
		this.intervalEndDate = this.normalizedEndDate(this.intervalStartDate);
	}
	dateIsWithinInterval(date) {
		return this.intervalStartDate.isBeforeOrEqual(date) && this.intervalEndDate.isAfter(date);
	}
	intervalDifference(date) {
		return intervalDifferenceBetweenDates({
			first: this.firstIntervalStartDate,
			second: date,
			unit: this.intervalUnit,
			interval: this.options.interval,
			weekStart: this.options.weekStart,
			direction: "after"
		});
	}
};
/**
* Given the frequency (unit) and interval, this function finds
* how many jumps forward the first date needs in order to equal
* or exceed the second date.
*
* For example:
*
* 1. Unit is daily and interval is 1. The second date is 3 days
*    after the first. This will return 3.
* 2. Unit is yearly and interval is 1. The second date is 3 days
*    after the first. This will return 0.
* 3. Unit is yearly and interval is 3. The second date is 4 years
*    after the first. This will return 6.
*/
function intervalDifferenceBetweenDates({ first, second, unit, interval, weekStart, direction }) {
	let difference = (() => {
		let intervalDuration;
		let months;
		switch (unit) {
			case "year":
				months = (second.get("year") - first.get("year")) * 12;
				months = months + second.get("month") - first.get("month");
				return Math.floor(months / 12);
			case "month":
				months = (second.get("year") - first.get("year")) * 12;
				months = months + second.get("month") - first.get("month");
				return months;
			case "week":
				first = first.granularity("week", { weekStart });
				intervalDuration = DateAdapter$1.MILLISECONDS_IN_WEEK;
				break;
			case "day":
				intervalDuration = DateAdapter$1.MILLISECONDS_IN_DAY;
				break;
			case "hour":
				intervalDuration = DateAdapter$1.MILLISECONDS_IN_HOUR;
				break;
			case "minute":
				intervalDuration = DateAdapter$1.MILLISECONDS_IN_MINUTE;
				break;
			case "second":
				intervalDuration = DateAdapter$1.MILLISECONDS_IN_SECOND;
				break;
			case "millisecond":
				intervalDuration = 1;
				break;
			default: throw new Error("Unexpected `unit` value");
		}
		const diff = second.valueOf() - first.valueOf();
		return Math.floor(diff / intervalDuration);
	})();
	difference = (direction === "after" ? Math.ceil : Math.floor)(difference / interval) * interval;
	return difference;
}
var RevFrequencyRule = class extends FrequencyRule {
	setToCurrentInterval() {
		return this.intervalEndDate.subtract(1, "millisecond");
	}
	intervalDifference(date) {
		return intervalDifferenceBetweenDates({
			first: this.firstIntervalStartDate,
			second: date,
			unit: this.intervalUnit,
			interval: this.options.interval,
			weekStart: this.options.weekStart,
			direction: "before"
		});
	}
};
var FREQUENCIES = [
	"MILLISECONDLY",
	"SECONDLY",
	"MINUTELY",
	"HOURLY",
	"DAILY",
	"WEEKLY",
	"MONTHLY",
	"YEARLY"
];
var FrequencyRuleModule = {
	name: "FrequencyRule",
	get: (processor) => {
		if (processor.options.byMillisecondOfSecond !== void 0 || processor.options.frequency !== "MILLISECONDLY") return null;
		if (processor.reverse) return new RevFrequencyRule(processor, processor.end);
		return new FrequencyRule(processor, processor.start);
	},
	normalizeOptions: (options, norm) => {
		if (!FREQUENCIES.includes(options.frequency)) throw new RuleOptionError(`"frequency" must be one of ${JSON.stringify(FREQUENCIES)}`);
		if (options.interval !== void 0) {
			if (!Number.isInteger(options.interval)) throw new RuleOptionError("\"interval\" expects a whole number");
			if (options.interval < 1) throw new RuleOptionError("\"interval\" cannot be less than 1");
		}
		if (options.weekStart !== void 0) {
			if (!DateAdapter$1.WEEKDAYS.includes(options.weekStart)) throw new RuleOptionError(`"weekStart" must be one of ${JSON.stringify(DateAdapter$1.WEEKDAYS)}`);
		}
		norm.frequency = options.frequency;
		norm.interval = options.interval || 1;
		norm.weekStart = options.weekStart || "MO";
	},
	deps: () => [FrequencyRuleModule]
};
function ruleOptionFilled(option) {
	return Array.isArray(option) && option.length > 0;
}
var freqCache = /* @__PURE__ */ new WeakMap();
var RecurrenceRuleBase = class extends RecurrenceRule {
	constructor(processor) {
		super(processor);
		if (!freqCache.has(this.processor)) freqCache.set(this.processor, new FrequencyRule(processor, processor.start));
		this.frequency = freqCache.get(this.processor);
	}
	validateDate(arg) {
		return this.frequency.validateDate(arg);
	}
};
var RevRecurrenceRuleBase = class extends RecurrenceRule {
	constructor(processor) {
		super(processor);
		if (!freqCache.has(this.processor)) freqCache.set(this.processor, new RevFrequencyRule(processor, processor.end));
		this.frequency = freqCache.get(this.processor);
	}
	validateDate(arg) {
		return this.frequency.validateDate(arg);
	}
};
/**
* Contains shared logic for ByHourOfDay, ByMinuteOfHour,
* BySecondOfMinute, and ByMillisecondOfSecond reverse rule pipes
*/
var RevByTimeOfUnitRule = class extends RevRecurrenceRuleBase {
	run(date) {
		const currentTime = date.get(this.granularity);
		for (const time of this.option) {
			if (currentTime < time) continue;
			if (currentTime === time) return this.validateDate(new ValidDateTime(date));
			return this.validateDate(new InvalidDateTime(date.endGranularity(this.baseGranularity).set(this.granularity, time)));
		}
		return this.validateDate(new InvalidDateTime(date.endGranularity(this.baseGranularity).subtract(1, this.baseGranularity).set(this.granularity, this.option[0])));
	}
};
var RevByMillisecondOfSecondRule = class extends RevByTimeOfUnitRule {
	constructor() {
		super(...arguments);
		this.baseGranularity = "second";
		this.granularity = "millisecond";
		this.option = this.options.byMillisecondOfSecond.slice().reverse();
	}
};
/**
* Contains shared logic for ByHourOfDay, ByMinuteOfHour,
* BySecondOfMinute, and ByMillisecondOfSecond rule pipes
*/
var ByTimeOfUnitRule = class extends RecurrenceRuleBase {
	run(date) {
		const currentTime = date.get(this.granularity);
		for (const time of this.option) {
			if (currentTime > time) continue;
			if (currentTime === time) return this.validateDate(new ValidDateTime(date));
			return this.validateDate(new InvalidDateTime(date.granularity(this.baseGranularity).set(this.granularity, time)));
		}
		return this.validateDate(new InvalidDateTime(date.granularity(this.baseGranularity).add(1, this.baseGranularity).set(this.granularity, this.option[0])));
	}
};
var ByMillisecondOfSecondRule = class extends ByTimeOfUnitRule {
	constructor() {
		super(...arguments);
		this.baseGranularity = "second";
		this.granularity = "millisecond";
		this.option = this.options.byMillisecondOfSecond;
	}
};
var ByMillisecondOfSecondRuleModule = {
	name: "ByMillisecondOfSecond",
	get: (processor) => {
		if (processor.options.byMillisecondOfSecond === void 0) return null;
		if (processor.reverse) return new RevByMillisecondOfSecondRule(processor);
		return new ByMillisecondOfSecondRule(processor);
	},
	normalizeOptions: (options, norm) => {
		if (options.byMillisecondOfSecond !== void 0) {
			if (!ruleOptionFilled(options.byMillisecondOfSecond)) throw new RuleOptionError("\"byMillisecondOfSecond\" expects a non-empty array");
			if (options.byMillisecondOfSecond.some((num) => num < 0 || num > 999)) throw new RuleOptionError("\"byMillisecondOfSecond\" values must be >= 0 && <= 999");
			norm.byMillisecondOfSecond = options.byMillisecondOfSecond;
			norm.byMillisecondOfSecond.sort(numberSortComparer);
		} else if (options.frequency !== "MILLISECONDLY") norm.byMillisecondOfSecond = [norm.start.get("millisecond")];
	},
	deps: () => [FrequencyRuleModule, ByMillisecondOfSecondRuleModule]
};
var RevBySecondOfMinuteRule = class extends RevByTimeOfUnitRule {
	constructor() {
		super(...arguments);
		this.baseGranularity = "minute";
		this.granularity = "second";
		this.option = this.options.bySecondOfMinute.slice().reverse();
	}
};
var BySecondOfMinuteRule = class extends ByTimeOfUnitRule {
	constructor() {
		super(...arguments);
		this.baseGranularity = "minute";
		this.granularity = "second";
		this.option = this.options.bySecondOfMinute;
	}
};
var BySecondOfMinuteRuleModule = {
	name: "BySecondOfMinute",
	get: (processor) => {
		if (processor.options.bySecondOfMinute === void 0) return null;
		if (processor.reverse) return new RevBySecondOfMinuteRule(processor);
		return new BySecondOfMinuteRule(processor);
	},
	normalizeOptions: (options, norm) => {
		if (options.bySecondOfMinute !== void 0) {
			if (!ruleOptionFilled(options.bySecondOfMinute)) throw new RuleOptionError("\"bySecondOfMinute\" expects a non-empty array");
			if (options.bySecondOfMinute.some((num) => num < 0 || num > 60)) throw new RuleOptionError("\"bySecondOfMinute\" values must be >= 0 && <= 60");
			norm.bySecondOfMinute = options.bySecondOfMinute;
			norm.bySecondOfMinute.sort(numberSortComparer);
		} else if (!["SECONDLY", "MILLISECONDLY"].includes(options.frequency)) norm.bySecondOfMinute = [norm.start.get("second")];
	},
	deps: () => [
		FrequencyRuleModule,
		BySecondOfMinuteRuleModule,
		ByMillisecondOfSecondRuleModule
	]
};
var RevByMinuteOfHourRule = class extends RevByTimeOfUnitRule {
	constructor() {
		super(...arguments);
		this.baseGranularity = "hour";
		this.granularity = "minute";
		this.option = this.options.byMinuteOfHour.slice().reverse();
	}
};
var ByMinuteOfHourRule = class extends ByTimeOfUnitRule {
	constructor() {
		super(...arguments);
		this.baseGranularity = "hour";
		this.granularity = "minute";
		this.option = this.options.byMinuteOfHour;
	}
};
var ByMinuteOfHourRuleModule = {
	name: "ByMinuteOfHour",
	get: (processor) => {
		if (processor.options.byMinuteOfHour === void 0) return null;
		if (processor.reverse) return new RevByMinuteOfHourRule(processor);
		return new ByMinuteOfHourRule(processor);
	},
	normalizeOptions: (options, norm) => {
		if (options.byMinuteOfHour !== void 0) {
			if (!ruleOptionFilled(options.byMinuteOfHour)) throw new RuleOptionError("\"byMinuteOfHour\" expects a non-empty array");
			if (options.byMinuteOfHour.some((num) => num < 0 || num > 59)) throw new RuleOptionError("\"byMinuteOfHour\" values must be >= 0 && <= 59");
			norm.byMinuteOfHour = options.byMinuteOfHour;
			norm.byMinuteOfHour.sort(numberSortComparer);
		} else if (![
			"MINUTELY",
			"SECONDLY",
			"MILLISECONDLY"
		].includes(options.frequency)) norm.byMinuteOfHour = [norm.start.get("minute")];
	},
	deps: () => [
		FrequencyRuleModule,
		ByMinuteOfHourRuleModule,
		BySecondOfMinuteRuleModule,
		ByMillisecondOfSecondRuleModule
	]
};
var RevByHourOfDayRule = class extends RevByTimeOfUnitRule {
	constructor() {
		super(...arguments);
		this.baseGranularity = "day";
		this.granularity = "hour";
		this.option = this.options.byHourOfDay.slice().reverse();
	}
};
var ByHourOfDayRule = class extends ByTimeOfUnitRule {
	constructor() {
		super(...arguments);
		this.baseGranularity = "day";
		this.granularity = "hour";
		this.option = this.options.byHourOfDay;
	}
};
var ByHourOfDayRuleModule = {
	name: "ByHourOfDay",
	get: (processor) => {
		if (processor.options.byHourOfDay === void 0) return null;
		if (processor.reverse) return new RevByHourOfDayRule(processor);
		return new ByHourOfDayRule(processor);
	},
	normalizeOptions: (options, norm) => {
		if (options.byHourOfDay !== void 0) {
			if (!ruleOptionFilled(options.byHourOfDay)) throw new RuleOptionError("\"byHourOfDay\" expects a non-empty array");
			if (options.byHourOfDay.some((num) => num < 0 || num > 23)) throw new RuleOptionError("\"byHourOfDay\" values must be >= 0 && <= 23");
			norm.byHourOfDay = options.byHourOfDay;
			norm.byHourOfDay.sort(numberSortComparer);
		} else if ([
			"YEARLY",
			"MONTHLY",
			"WEEKLY",
			"DAILY"
		].includes(options.frequency)) norm.byHourOfDay = [norm.start.get("hour")];
	},
	deps: () => [
		FrequencyRuleModule,
		ByHourOfDayRuleModule,
		ByMinuteOfHourRuleModule,
		BySecondOfMinuteRuleModule,
		ByMillisecondOfSecondRuleModule
	]
};
function getNextWeekday(date, weekday) {
	return date.add(getDifferenceBetweenWeekdays(date.get("weekday"), weekday), "day");
}
function getNthWeekdayOfMonth(date, weekday, nth) {
	let base = date.set("day", 1);
	if (nth < 0) base = base.add(1, "month");
	base = getNextWeekday(base, weekday);
	return nth < 0 ? base.add(nth, "week") : base.add(nth - 1, "week");
}
var ByDayOfMonthRule = class extends RecurrenceRuleBase {
	run(date) {
		const normalizedByDayOfMonth = normalizeByDayOfMonth(date, this.options.byDayOfMonth, this.options.byDayOfWeek);
		const currentDay = date.get("day");
		for (const day of normalizedByDayOfMonth) {
			if (currentDay > day) continue;
			if (currentDay === day) return this.validateDate(new ValidDateTime(date));
			return this.validateDate(new InvalidDateTime(date.granularity("month").set("day", day)));
		}
		let next;
		let nextMonth = date;
		let index = 0;
		while (!next && index < 30) {
			nextMonth = nextMonth.granularity("month").add(1, "month");
			next = normalizeByDayOfMonth(nextMonth, this.options.byDayOfMonth, this.options.byDayOfWeek)[0];
			index++;
		}
		if (index >= 13) throw new RecurrenceRuleError("byDayOfMonth Infinite while loop");
		return this.validateDate(new InvalidDateTime(nextMonth.set("day", next)));
	}
};
/**
* Does a few things:
*
* 1. filters out byDayOfMonth entries which are not applicable
*    to current month
* 2. negative entries to positive ones
* 3. if a byDayOfWeek option is given, removes days which are
*    not on the correct day of the week
*/
function normalizeByDayOfMonth(date, byDayOfMonth, byDayOfWeek) {
	const lengthOfMonth = date.endGranularity("month").get("day");
	let normalizedByDayOfMonth = byDayOfMonth.filter((day) => lengthOfMonth >= Math.abs(day)).map((day) => day > 0 ? day : lengthOfMonth + day + 1);
	if (byDayOfWeek) {
		const base = date.granularity("month");
		const filteredByDayOfMonth = [];
		byDayOfWeek.forEach((entry) => {
			if (typeof entry === "string") {
				filteredByDayOfMonth.push(...normalizedByDayOfMonth.filter((day) => base.set("day", day).get("weekday") === entry));
				return;
			}
			const nthWeekdayOfMonth = getNthWeekdayOfMonth(date, ...entry).get("day");
			if (normalizedByDayOfMonth.includes(nthWeekdayOfMonth)) filteredByDayOfMonth.push(nthWeekdayOfMonth);
		});
		normalizedByDayOfMonth = Array.from(new Set(filteredByDayOfMonth));
	}
	return normalizedByDayOfMonth.sort((a, b) => {
		if (a > b) return 1;
		if (a < b) return -1;
		else return 0;
	});
}
var RevByDayOfMonthRule = class extends RevRecurrenceRuleBase {
	run(date) {
		const normalizedByDayOfMonth = normalizeByDayOfMonth(date, this.options.byDayOfMonth, this.options.byDayOfWeek).reverse();
		const currentDay = date.get("day");
		for (const day of normalizedByDayOfMonth) {
			if (currentDay < day) continue;
			if (currentDay === day) return this.validateDate(new ValidDateTime(date));
			return this.validateDate(new InvalidDateTime(date.endGranularity("month").set("day", day)));
		}
		let next;
		let nextMonth = date;
		let index = 0;
		while (!next && index < 30) {
			nextMonth = nextMonth.endGranularity("month").subtract(1, "month");
			next = normalizeByDayOfMonth(nextMonth, this.options.byDayOfMonth, this.options.byDayOfWeek).pop();
			index++;
		}
		if (index >= 13) throw new RecurrenceRuleError("byDayOfMonth Infinite while loop");
		return this.validateDate(new InvalidDateTime(nextMonth.set("day", next)));
	}
};
var ByDayOfMonthRuleModule = {
	name: "ByDayOfMonth",
	get: (processor) => {
		if (processor.options.byDayOfMonth === void 0) return null;
		if (processor.reverse) return new RevByDayOfMonthRule(processor);
		return new ByDayOfMonthRule(processor);
	},
	normalizeOptions: (options, norm) => {
		if (options.byDayOfMonth !== void 0) {
			if (options.frequency === "WEEKLY") throw new RuleOptionError("when \"frequency\" is \"WEEKLY\", \"byDayOfMonth\" cannot be present");
			if (!ruleOptionFilled(options.byDayOfMonth)) throw new RuleOptionError("\"byDayOfMonth\" expects a non-empty array");
			if (options.byDayOfMonth.some((num) => num === 0 || num < -31 || num > 31)) throw new RuleOptionError("\"byDayOfMonth\" values must be `num !== 0 && num <= 31 && num >= -31`");
			norm.byDayOfMonth = options.byDayOfMonth.slice();
		} else if (!(ruleOptionFilled(options.byDayOfWeek) || ruleOptionFilled(options.byDayOfYear)) && ["YEARLY", "MONTHLY"].includes(options.frequency)) norm.byDayOfMonth = [norm.start.get("day")];
	},
	deps: () => [
		FrequencyRuleModule,
		ByDayOfMonthRuleModule,
		ByHourOfDayRuleModule,
		ByMinuteOfHourRuleModule,
		BySecondOfMinuteRuleModule,
		ByMillisecondOfSecondRuleModule
	]
};
function getNthWeekdayOfYear(date, weekday, nth) {
	let base = date.set("month", 1).set("day", 1);
	if (nth < 0) base = base.add(1, "year");
	base = getNextWeekday(base, weekday);
	return nth < 0 ? base.add(nth, "week") : base.add(nth - 1, "week");
}
function getPreviousWeekday(date, weekday) {
	const diff = getDifferenceBetweenWeekdays(date.get("weekday"), weekday);
	return date.subtract(diff === 0 ? 0 : 7 - diff, "day");
}
var RevByDayOfWeekRule = class extends RevRecurrenceRuleBase {
	run(date) {
		if (this.options.frequency === "YEARLY") return this.options.byMonthOfYear === void 0 ? this.expandYearly(date) : this.expandMonthly(date);
		else if (this.options.frequency === "MONTHLY") return this.expandMonthly(date);
		return this.expand(date);
	}
	expandYearly(date) {
		let next = getPrevWeekdaysOfYear(date, this.options.byDayOfWeek)[0];
		let index = 0;
		let base = date;
		while (!next && index < 28) {
			index++;
			base = base.granularity("year").subtract(1, "millisecond");
			next = getPrevWeekdaysOfYear(base, this.options.byDayOfWeek)[0];
		}
		if (!next) throw new RecurrenceRuleError("The byDayOfWeek rule appears to contain an impossible combination");
		return this.result(date, next);
	}
	expandMonthly(date) {
		let next = getPrevWeekdaysOfMonth(date, this.options.byDayOfWeek)[0];
		let index = 0;
		let base = date;
		while (!next && index < 50) {
			index++;
			base = base.granularity("month").subtract(1, "millisecond");
			next = getPrevWeekdaysOfMonth(base, this.options.byDayOfWeek)[0];
		}
		if (!next) throw new RecurrenceRuleError("The byDayOfWeek rule appears to contain an impossible combination");
		return this.result(date, next);
	}
	expand(date) {
		const next = this.options.byDayOfWeek.map((weekday) => getPreviousWeekday(date, weekday)).sort(dateTimeSortComparer).pop();
		return this.result(date, next);
	}
	result(date, next) {
		if (next.isEqual(date)) return this.validateDate(new ValidDateTime(date));
		return this.validateDate(new InvalidDateTime(next.endGranularity("day")));
	}
};
/** For each byDayOfWeek entry, find the previous DateTime */
function getPrevWeekdaysOfYear(date, byDayOfWeek) {
	const normalizedNthWeekdaysOfYear = byDayOfWeek.filter((entry) => Array.isArray(entry)).map((entry) => getNthWeekdayOfYear(date, ...entry));
	const normalizedNextWeekdays = byDayOfWeek.filter((entry) => typeof entry === "string").map((weekday) => getPreviousWeekday(date, weekday)).filter((entry) => entry.get("year") === date.get("year"));
	return uniqDateTimes([...normalizedNthWeekdaysOfYear, ...normalizedNextWeekdays]).filter((entry) => entry.isBeforeOrEqual(date)).sort(dateTimeSortComparer).reverse();
}
/** For each byDayOfWeek entry, find the previous DateTime */
function getPrevWeekdaysOfMonth(date, byDayOfWeek) {
	const normalizedNthWeekdaysOfMonth = byDayOfWeek.filter((entry) => Array.isArray(entry)).map((entry) => getNthWeekdayOfMonth(date, ...entry));
	const normalizedNextWeekdays = byDayOfWeek.filter((entry) => typeof entry === "string").map((weekday) => getPreviousWeekday(date, weekday)).filter((entry) => entry.get("year") === date.get("year") && entry.get("month") === date.get("month"));
	return uniqDateTimes([...normalizedNthWeekdaysOfMonth, ...normalizedNextWeekdays]).filter((entry) => entry.isBeforeOrEqual(date)).sort(dateTimeSortComparer).reverse();
}
var ByDayOfWeekRule = class extends RecurrenceRuleBase {
	run(date) {
		if (this.options.frequency === "YEARLY") return this.options.byMonthOfYear === void 0 ? this.expandYearly(date) : this.expandMonthly(date);
		else if (this.options.frequency === "MONTHLY") return this.expandMonthly(date);
		return this.expand(date);
	}
	expandYearly(date) {
		let next = getNextWeekdaysOfYear(date, this.options.byDayOfWeek)[0];
		let index = 0;
		let base = date;
		while (!next && index < 28) {
			index++;
			base = base.granularity("year").add(1, "year");
			next = getNextWeekdaysOfYear(base, this.options.byDayOfWeek)[0];
		}
		if (!next) throw new RecurrenceRuleError("The byDayOfWeek rule appears to contain an impossible combination");
		return this.result(date, next);
	}
	expandMonthly(date) {
		let next = getNextWeekdaysOfMonth(date, this.options.byDayOfWeek)[0];
		let index = 0;
		let base = date;
		while (!next && index < 50) {
			index++;
			base = base.granularity("month").add(1, "month");
			next = getNextWeekdaysOfMonth(base, this.options.byDayOfWeek)[0];
		}
		if (!next) throw new RecurrenceRuleError("The byDayOfWeek rule appears to contain an impossible combination");
		return this.result(date, next);
	}
	expand(date) {
		const next = this.options.byDayOfWeek.map((weekday) => getNextWeekday(date, weekday)).sort(dateTimeSortComparer)[0];
		return this.result(date, next);
	}
	result(date, next) {
		if (next.isEqual(date)) return this.validateDate(new ValidDateTime(date));
		return this.validateDate(new InvalidDateTime(next.granularity("day")));
	}
};
/** For each byDayOfWeek entry, find the next DateTime */
function getNextWeekdaysOfYear(date, byDayOfWeek) {
	const normalizedNthWeekdaysOfYear = byDayOfWeek.filter((entry) => Array.isArray(entry)).map((entry) => getNthWeekdayOfYear(date, ...entry));
	const normalizedNextWeekdays = byDayOfWeek.filter((entry) => typeof entry === "string").map((weekday) => getNextWeekday(date, weekday)).filter((entry) => entry.get("year") === date.get("year"));
	return uniqDateTimes([...normalizedNthWeekdaysOfYear, ...normalizedNextWeekdays]).filter((entry) => entry.isAfterOrEqual(date)).sort(dateTimeSortComparer);
}
/** For each byDayOfWeek entry, find the next DateTime */
function getNextWeekdaysOfMonth(date, byDayOfWeek) {
	const normalizedNthWeekdaysOfMonth = byDayOfWeek.filter((entry) => Array.isArray(entry)).map((entry) => getNthWeekdayOfMonth(date, ...entry));
	const normalizedNextWeekdays = byDayOfWeek.filter((entry) => typeof entry === "string").map((weekday) => getNextWeekday(date, weekday)).filter((entry) => entry.get("year") === date.get("year") && entry.get("month") === date.get("month"));
	return uniqDateTimes([...normalizedNthWeekdaysOfMonth, ...normalizedNextWeekdays]).filter((entry) => entry.isAfterOrEqual(date)).sort(dateTimeSortComparer);
}
var ByDayOfWeekRuleModule = {
	name: "ByDayOfWeek",
	get: (processor) => {
		if (processor.options.byDayOfWeek === void 0) return null;
		if (processor.reverse) return new RevByDayOfWeekRule(processor);
		return new ByDayOfWeekRule(processor);
	},
	normalizeOptions: (options, norm) => {
		if (options.byDayOfWeek !== void 0) {
			if (!ruleOptionFilled(options.byDayOfWeek)) throw new RuleOptionError("\"byDayOfWeek\" expects a non-empty array");
			const invalidWeeday = options.byDayOfWeek.find((day) => Array.isArray(day) ? !DateAdapter$1.WEEKDAYS.includes(day[0]) : !DateAdapter$1.WEEKDAYS.includes(day));
			if (invalidWeeday) throw new RuleOptionError(`"byDayOfWeek" expects weedays in the form ${JSON.stringify(DateAdapter$1.WEEKDAYS)} but "${invalidWeeday}" was provided`);
			if (!["YEARLY", "MONTHLY"].includes(options.frequency) && options.byDayOfWeek.some((weekday) => Array.isArray(weekday))) throw new RuleOptionError("\"byDayOfWeek\" can only include a numeric value (i.e. `[string, number]`) when the \"frequency\" is either \"MONTHLY\" or \"YEARLY\"");
			if (options.frequency === "MONTHLY" && options.byDayOfWeek.some((weekday) => Array.isArray(weekday) && (weekday[1] < -31 || weekday[1] === 0 || weekday[1] > 31))) throw new RuleOptionError("when \"frequency\" is \"MONTHLY\", each \"byDayOfWeek\" can optionally only have a numeric value >= -31 and <= 31 and !== 0");
			if (options.frequency === "YEARLY" && options.byDayOfWeek.some((weekday) => Array.isArray(weekday) && (weekday[1] < -366 || weekday[1] === 0 || weekday[1] > 366))) throw new RuleOptionError("when \"frequency\" is \"YEARLY\", each \"byDayOfWeek\" can optionally only have a numeric value >= -366 and <= 366 and !== 0");
			norm.byDayOfWeek = options.byDayOfWeek;
		} else if (!ruleOptionFilled(options.byDayOfMonth) && options.frequency === "WEEKLY") norm.byDayOfWeek = [norm.start.get("weekday")];
	},
	deps: () => [
		FrequencyRuleModule,
		ByDayOfWeekRuleModule,
		ByHourOfDayRuleModule,
		ByMinuteOfHourRuleModule,
		BySecondOfMinuteRuleModule,
		ByMillisecondOfSecondRuleModule
	]
};
var RevByMonthOfYearRule = class extends RevRecurrenceRuleBase {
	constructor() {
		super(...arguments);
		this.option = this.processor.options.byMonthOfYear.slice().reverse();
	}
	run(date) {
		const currentMonth = date.get("month");
		for (const month of this.option) {
			if (currentMonth < month) continue;
			if (currentMonth === month) return this.validateDate(new ValidDateTime(date));
			return this.validateDate(new InvalidDateTime(date.endGranularity("year").set("month", month)));
		}
		return this.validateDate(new InvalidDateTime(date.endGranularity("year").subtract(1, "year").set("month", this.option[0])));
	}
};
var ByMonthOfYearRule = class extends RecurrenceRuleBase {
	run(date) {
		const currentMonth = date.get("month");
		for (const month of this.options.byMonthOfYear) {
			if (currentMonth > month) continue;
			if (currentMonth === month) return this.validateDate(new ValidDateTime(date));
			return this.validateDate(new InvalidDateTime(date.granularity("year").set("month", month)));
		}
		return this.validateDate(new InvalidDateTime(date.granularity("year").add(1, "year").set("month", this.options.byMonthOfYear[0])));
	}
};
var ByMonthOfYearRuleModule = {
	name: "ByMonthOfYear",
	get: (processor) => {
		if (processor.options.byMonthOfYear === void 0) return null;
		if (processor.reverse) return new RevByMonthOfYearRule(processor);
		return new ByMonthOfYearRule(processor);
	},
	normalizeOptions: (options, norm) => {
		if (options.byMonthOfYear !== void 0) {
			if (!ruleOptionFilled(options.byMonthOfYear)) throw new RuleOptionError("\"byMonthOfYear\" expects a non-empty array");
			if (options.byMonthOfYear.some((num) => num < 1 || num > 12)) throw new RuleOptionError("\"byMonthOfYear\" values must be `num >= 1 && num >= 12`");
			norm.byMonthOfYear = options.byMonthOfYear.slice();
			norm.byMonthOfYear.sort(numberSortComparer);
		} else if (!(ruleOptionFilled(options.byDayOfMonth) || ruleOptionFilled(options.byDayOfWeek) || ruleOptionFilled(options.byDayOfYear)) && options.frequency === "YEARLY") norm.byMonthOfYear = [norm.start.get("month")];
	},
	deps: () => [
		FrequencyRuleModule,
		ByMonthOfYearRuleModule,
		ByDayOfMonthRuleModule,
		ByHourOfDayRuleModule,
		ByMinuteOfHourRuleModule,
		BySecondOfMinuteRuleModule,
		ByMillisecondOfSecondRuleModule
	]
};
var ICAL_RULES = [
	FrequencyRuleModule,
	ByMonthOfYearRuleModule,
	ByDayOfMonthRuleModule,
	ByDayOfWeekRuleModule,
	ByHourOfDayRuleModule,
	ByMinuteOfHourRuleModule,
	BySecondOfMinuteRuleModule,
	ByMillisecondOfSecondRuleModule
];
//#endregion
//#region ../../node_modules/@rschedule/standard-date-adapter/es2015/main.js
var StandardDateAdapter = class StandardDateAdapter extends DateAdapterBase$1 {
	constructor(date, options = {}) {
		super(void 0, options);
		if (![
			"UTC",
			null,
			void 0
		].includes(options.timezone)) throw new InvalidDateAdapterError$1(`StandardDateAdapter only supports "UTC" and local time zones but "${options.timezone}" was provided.`);
		this._date = new Date(date);
		this.timezone = options.timezone !== void 0 ? options.timezone : null;
		if (options.metadata) Object.assign(this.metadata, options.metadata);
		this.assertIsValid();
	}
	static isDate(object) {
		return Object.prototype.toString.call(object) === "[object Date]";
	}
	static fromDate(date, options) {
		return new StandardDateAdapter(date, options);
	}
	static fromJSON(json) {
		const args = [
			json.year,
			json.month - 1,
			json.day,
			json.hour,
			json.minute,
			json.second,
			json.millisecond
		];
		let date;
		switch (json.timezone) {
			case "UTC":
				date = new StandardDateAdapter(new Date(Date.UTC(...args)), {
					timezone: "UTC",
					duration: json.duration
				});
				break;
			case null:
				date = new StandardDateAdapter(new Date(...args), {
					timezone: null,
					duration: json.duration
				});
				break;
			default: throw new InvalidDateAdapterError$1(`The \`StandardDateAdapter\` only supports datetimes in UTC or LOCAL (null) time. You provided a JSON object with timezone "${json.timezone}".`);
		}
		if (json.metadata) Object.assign(date.metadata, json.metadata);
		return date;
	}
	static fromDateTime(datetime) {
		const date = StandardDateAdapter.fromJSON(datetime.toJSON());
		date.generators.push(...datetime.generators);
		if (datetime.metadata) Object.assign(date.metadata, datetime.metadata);
		return date;
	}
	get date() {
		return new Date(this._date);
	}
	get end() {
		if (!this.duration) return;
		if (this._end) return this._end;
		this._end = StandardDateAdapter.fromDateTime(this.toDateTime().add(this.duration, "millisecond")).date;
		return this._end;
	}
	set(prop, value) {
		if (prop === "timezone") if (this.timezone === value) return this;
		else return new StandardDateAdapter(this._date, {
			timezone: value,
			duration: this.duration,
			generators: this.generators
		});
		else if (prop === "duration") if (this.duration === value) return this;
		else return new StandardDateAdapter(this._date, {
			timezone: this.timezone,
			duration: value,
			generators: this.generators
		});
		throw new ArgumentError(`Unknown prop "${prop}" for StandardDateAdapter#set()`);
	}
	valueOf() {
		return this._date.valueOf();
	}
	toJSON() {
		let json;
		if (this.timezone === "UTC") json = {
			timezone: this.timezone,
			year: this._date.getUTCFullYear(),
			month: this._date.getUTCMonth() + 1,
			day: this._date.getUTCDate(),
			hour: this._date.getUTCHours(),
			minute: this._date.getUTCMinutes(),
			second: this._date.getUTCSeconds(),
			millisecond: this._date.getUTCMilliseconds()
		};
		else json = {
			timezone: this.timezone,
			year: this._date.getFullYear(),
			month: this._date.getMonth() + 1,
			day: this._date.getDate(),
			hour: this._date.getHours(),
			minute: this._date.getMinutes(),
			second: this._date.getSeconds(),
			millisecond: this._date.getMilliseconds()
		};
		if (this.duration) json.duration = this.duration;
		return json;
	}
	assertIsValid() {
		if (!StandardDateAdapter.isDate(this._date) || isNaN(this._date.valueOf())) throw new InvalidDateAdapterError$1("StandardDateAdapter has invalid date.");
		else if (![null, "UTC"].includes(this.timezone)) throw new InvalidDateAdapterError$1(`StandardDateAdapter only supports local (null) and UTC timezones but "${this.timezone}" was specified.`);
		else if (this.duration && this.duration <= 0) throw new InvalidDateAdapterError$1("If provided, duration must be greater than 0.");
		return true;
	}
};
StandardDateAdapter.hasTimezoneSupport = false;
//#endregion
//#region ../../node_modules/@rschedule/standard-date-adapter/es2015/setup.js
DateAdapterBase$1.adapter = StandardDateAdapter;
Rule.recurrenceRules = ICAL_RULES;
//#endregion
//#region ../loot-core/src/server/util/rschedule.ts
var RSchedule = class extends Schedule {};
//#endregion
//#region ../loot-core/src/server/rules/rule-utils.ts
function assert(test, type, msg) {
	if (!test) throw new RuleError(type, msg);
}
function parseRecurDate(desc) {
	try {
		return {
			type: "recur",
			schedule: new RSchedule({
				rrules: recurConfigToRSchedule(desc),
				data: {
					skipWeekend: desc.skipWeekend,
					weekendSolve: desc.weekendSolveMode
				}
			})
		};
	} catch (e) {
		throw new RuleError("parse-recur-date", e.message);
	}
}
function parseDateString(str) {
	if (typeof str !== "string") return null;
	else if (str.length === 10) {
		if (!isValid$3(parseISO(str))) return null;
		return {
			type: "date",
			date: str
		};
	} else if (str.length === 7) {
		if (!isValid$3(parseISO(str + "-01"))) return null;
		return {
			type: "month",
			date: str
		};
	} else if (str.length === 4) {
		if (!isValid$3(parseISO(str + "-01-01"))) return null;
		return {
			type: "year",
			date: str
		};
	}
	return null;
}
function parseBetweenAmount(between) {
	const { num1, num2 } = between;
	if (typeof num1 !== "number" || typeof num2 !== "number") return null;
	return {
		type: "between",
		num1,
		num2
	};
}
//#endregion
//#region ../loot-core/src/server/rules/action.ts
HyperFormula.registerLanguage("enUS", dictionary);
HyperFormula.registerFunctionPlugin(CustomFunctionsPlugin, customFunctionsTranslations);
//#endregion
//#region ../loot-core/src/server/rules/condition.ts
var CONDITION_TYPES = {
	date: {
		ops: [
			"is",
			"isapprox",
			"gt",
			"gte",
			"lt",
			"lte"
		],
		nullable: false,
		parse(op, value, fieldName) {
			const parsed = typeof value === "string" ? parseDateString(value) : value.frequency != null ? parseRecurDate(value) : null;
			assert(parsed, "date-format", `Invalid date format (field: ${fieldName})`);
			if (op === "isapprox") assert(parsed.type === "date" || parsed.type === "recur", "date-format", `Invalid date value for "isapprox" (field: ${fieldName})`);
			else if (op === "gt" || op === "gte" || op === "lt" || op === "lte") assert(parsed.type === "date", "date-format", `Invalid date value for "${op}" (field: ${fieldName})`);
			return parsed;
		}
	},
	id: {
		ops: [
			"is",
			"contains",
			"matches",
			"oneOf",
			"isNot",
			"doesNotContain",
			"notOneOf",
			"and",
			"onBudget",
			"offBudget"
		],
		nullable: true,
		parse(op, value, fieldName) {
			if (op === "oneOf" || op === "notOneOf" || op === "and") {
				assert(Array.isArray(value), "no-empty-array", `oneOf must have an array value (field: ${fieldName})`);
				return value;
			}
			return value;
		}
	},
	string: {
		ops: [
			"is",
			"contains",
			"matches",
			"oneOf",
			"isNot",
			"doesNotContain",
			"notOneOf",
			"hasTags"
		],
		nullable: true,
		parse(op, value, fieldName) {
			if (op === "oneOf" || op === "notOneOf") {
				assert(Array.isArray(value), "no-empty-array", `oneOf must have an array value (field: ${fieldName}): ${JSON.stringify(value)}`);
				return value.filter(Boolean).map((val) => val.toLowerCase());
			}
			assert(typeof value === "string", "not-string", `Invalid string value (field: ${fieldName})`);
			if (op === "contains" || op === "matches" || op === "doesNotContain" || op === "hasTags") assert(value.length > 0, "no-empty-string", `${op} must have non-empty string (field: ${fieldName})`);
			if (op === "hasTags") return value;
			return value.toLowerCase();
		}
	},
	number: {
		ops: [
			"is",
			"isapprox",
			"isbetween",
			"gt",
			"gte",
			"lt",
			"lte"
		],
		nullable: false,
		parse(op, value, fieldName) {
			const parsed = typeof value === "number" ? {
				type: "literal",
				value
			} : parseBetweenAmount(value);
			assert(parsed != null, "not-number", `Value must be a number or between amount: ${JSON.stringify(value)} (field: ${fieldName})`);
			if (op === "isbetween") assert(parsed.type === "between", "number-format", `Invalid between value for "${op}" (field: ${fieldName})`);
			else assert(parsed.type === "literal", "number-format", `Invalid number value for "${op}" (field: ${fieldName})`);
			return parsed;
		}
	},
	boolean: {
		ops: ["is"],
		nullable: false,
		parse(op, value, fieldName) {
			assert(typeof value === "boolean", "not-boolean", `Value must be a boolean: ${value} (field: ${fieldName})`);
			return value;
		}
	}
};
var Condition = class {
	field;
	op;
	options;
	rawValue;
	type;
	unparsedValue;
	value;
	constructor(op, field, value, options) {
		const typeName = FIELD_TYPES.get(field);
		assert(typeName, "internal", "Invalid condition field: " + field);
		const type = CONDITION_TYPES[typeName];
		assert(type, "internal", `Invalid condition type: ${typeName} (field: ${field})`);
		assert(isValidOp(field, op), "internal", `Invalid condition operator: ${op} (type: ${typeName}, field: ${field})`);
		if (type.nullable !== true) assert(value != null, "no-null", `Field cannot be empty: ${field}`);
		if (typeName === "string" && type.nullable !== true) assert(value !== "", "no-null", `Field cannot be empty: ${field}`);
		this.rawValue = value;
		this.unparsedValue = value;
		this.op = op;
		this.field = field;
		this.value = type.parse ? type.parse(op, value, field) : value;
		this.options = options;
		this.type = typeName;
	}
	eval(object) {
		let fieldValue = object[this.field];
		const type = this.type;
		if (type === "string") fieldValue ??= "";
		if (fieldValue === void 0) return false;
		if (typeof fieldValue === "string") fieldValue = fieldValue.toLowerCase();
		if (type === "number" && this.options) {
			if (this.options.outflow) {
				if (fieldValue > 0) return false;
				fieldValue = -fieldValue;
			} else if (this.options.inflow) {
				if (fieldValue < 0) return false;
			}
		}
		const extractValue = (v) => type === "number" ? v.value : v;
		switch (this.op) {
			case "isapprox":
			case "is":
				if (type === "date") {
					if (fieldValue == null) return false;
					if (this.value.type === "recur") {
						const { schedule } = this.value;
						if (this.op === "isapprox") {
							const fieldDate = parseDate(fieldValue);
							return schedule.occursBetween(subDays$1(fieldDate, 2), addDays$1(fieldDate, 2));
						} else return schedule.occursOn({ date: parseDate(fieldValue) });
					} else {
						const { date } = this.value;
						if (this.op === "isapprox") {
							const fullDate = parseDate(date);
							const high = addDays(fullDate, 2);
							const low = subDays(fullDate, 2);
							return fieldValue >= low && fieldValue <= high;
						} else switch (this.value.type) {
							case "date": return fieldValue === date;
							case "month": return monthFromDate(fieldValue) === date;
							case "year": return yearFromDate(fieldValue) === date;
							default:
						}
					}
				} else if (type === "number") {
					const number = this.value.value;
					if (this.op === "isapprox") {
						const threshold = getApproxNumberThreshold(number);
						return fieldValue >= number - threshold && fieldValue <= number + threshold;
					}
					return fieldValue === number;
				}
				return fieldValue === this.value;
			case "isNot": return fieldValue !== this.value;
			case "isbetween": {
				const [low, high] = sortNumbers(this.value.num1, this.value.num2);
				return fieldValue >= low && fieldValue <= high;
			}
			case "contains":
				if (fieldValue === null) return false;
				return String(fieldValue).indexOf(this.value) !== -1;
			case "doesNotContain":
				if (fieldValue === null) return false;
				return String(fieldValue).indexOf(this.value) === -1;
			case "oneOf":
				if (fieldValue === null) return false;
				return this.value.indexOf(fieldValue) !== -1;
			case "hasTags":
				if (fieldValue === null) return false;
				return String(fieldValue).indexOf(this.value) !== -1;
			case "notOneOf":
				if (fieldValue === null) return false;
				return this.value.indexOf(fieldValue) === -1;
			case "gt":
				if (fieldValue === null) return false;
				else if (type === "date") return isAfter$1(fieldValue, this.value.date);
				return fieldValue > extractValue(this.value);
			case "gte":
				if (fieldValue === null) return false;
				else if (type === "date") return fieldValue === this.value.date || isAfter$1(fieldValue, this.value.date);
				return fieldValue >= extractValue(this.value);
			case "lt":
				if (fieldValue === null) return false;
				else if (type === "date") return isBefore$1(fieldValue, this.value.date);
				return fieldValue < extractValue(this.value);
			case "lte":
				if (fieldValue === null) return false;
				else if (type === "date") return fieldValue === this.value.date || isBefore$1(fieldValue, this.value.date);
				return fieldValue <= extractValue(this.value);
			case "matches":
				if (fieldValue === null) return false;
				try {
					return new RegExp(this.value).test(fieldValue);
				} catch (e) {
					logger.log("invalid regexp in matches condition", e);
					return false;
				}
			case "onBudget":
				if (!object._account) return false;
				return object._account.offbudget === 0;
			case "offBudget":
				if (!object._account) return false;
				return object._account.offbudget === 1;
			default:
		}
		return false;
	}
	getValue() {
		return this.value;
	}
	serialize() {
		return {
			op: this.op,
			field: this.field,
			value: this.unparsedValue,
			type: this.type,
			...this.options ? { options: this.options } : null
		};
	}
};
//#endregion
//#region ../loot-core/src/server/rules/handlebars-helpers.ts
function registerHandlebarsHelpers() {
	const regexTest = /^\/(.*)\/([gimuy]*)$/;
	function mathHelper(fn) {
		return (a, ...b) => {
			return b.map(Number).reduce(fn, Number(a));
		};
	}
	function regexHelper(mapRegex, mapNonRegex, apply) {
		return (value, regex, replace) => {
			if (value == null) return null;
			if (typeof regex !== "string" || typeof replace !== "string") return "";
			let regexp;
			const match = regexTest.exec(regex);
			if (match) regexp = mapRegex(match[1], match[2]);
			else regexp = mapNonRegex(regex);
			return apply(String(value), regexp, replace);
		};
	}
	const helpers = {
		regex: regexHelper((regex, flags) => new RegExp(regex, flags), (value) => new RegExp(value), (value, regex, replace) => value.replace(regex, replace)),
		replace: regexHelper((regex, flags) => new RegExp(regex, flags), (value) => value, (value, regex, replace) => value.replace(regex, replace)),
		replaceAll: regexHelper((regex, flags) => new RegExp(regex, flags), (value) => value, (value, regex, replace) => value.replaceAll(regex, replace)),
		add: mathHelper((a, b) => a + b),
		sub: mathHelper((a, b) => a - b),
		div: mathHelper((a, b) => a / b),
		mul: mathHelper((a, b) => a * b),
		mod: mathHelper((a, b) => a % b),
		floor: (a) => Math.floor(Number(a)),
		ceil: (a) => Math.ceil(Number(a)),
		round: (a) => Math.round(Number(a)),
		abs: (a) => Math.abs(Number(a)),
		min: mathHelper((a, b) => Math.min(a, b)),
		max: mathHelper((a, b) => Math.max(a, b)),
		fixed: (a, digits) => Number(a).toFixed(Number(digits)),
		day: (date) => date && format$2(date, "d"),
		month: (date) => date && format$2(date, "M"),
		year: (date) => date && format$2(date, "yyyy"),
		format: (date, f) => date && f && format$2(date, f),
		addDays: (date, days) => {
			if (!date || !days) return date;
			return format$2(addDays(date, days), "yyyy-MM-dd");
		},
		subDays: (date, days) => {
			if (!date || !days) return date;
			return format$2(subDays(date, days), "yyyy-MM-dd");
		},
		addMonths: (date, months) => {
			if (!date || !months) return date;
			return format$2(addMonths$1(parseDate(date), months), "yyyy-MM-dd");
		},
		subMonths: (date, months) => {
			if (!date || !months) return date;
			return format$2(subMonths$1(parseDate(date), months), "yyyy-MM-dd");
		},
		addWeeks: (date, weeks) => {
			if (!date || !weeks) return date;
			return format$2(addWeeks$1(parseDate(date), weeks), "yyyy-MM-dd");
		},
		subWeeks: (date, weeks) => {
			if (!date || !weeks) return date;
			return format$2(subWeeks$1(parseDate(date), weeks), "yyyy-MM-dd");
		},
		addYears: (date, years) => {
			if (!date || !years) return date;
			return format$2(addYears$1(parseDate(date), years), "yyyy-MM-dd");
		},
		subYears: (date, years) => {
			if (!date || !years) return date;
			return format$2(subYears$1(parseDate(date), years), "yyyy-MM-dd");
		},
		setDay: (date, day) => {
			if (!date || day == null) return date;
			return format$2(addDays(date, day - Number(format$2(date, "d"))), "yyyy-MM-dd");
		},
		debug: (value) => {
			logger.log(value);
		},
		concat: (...args) => args.join("")
	};
	for (const [name, fn] of Object.entries(helpers)) import_handlebars.registerHelper(name, (...args) => {
		return fn(...args.slice(0, -1));
	});
}
//#endregion
//#region ../loot-core/src/shared/transactions.ts
function isTemporaryId(id) {
	return id.indexOf("temp") !== -1;
}
function isPreviewId(id) {
	return id.indexOf("preview/") !== -1;
}
function num(n) {
	return typeof n === "number" ? n : 0;
}
function SplitTransactionError(total, parent) {
	return {
		type: "SplitTransactionError",
		version: 1,
		difference: num(parent.amount) - total
	};
}
function makeChild(parent, data = {}) {
	const prefix = parent.id === "temp" ? "temp" : "";
	return {
		amount: 0,
		...data,
		category: "category" in data ? data.category : parent.category,
		payee: "payee" in data ? data.payee : parent.payee,
		id: "id" in data ? data.id : prefix + v4(),
		account: parent.account,
		date: parent.date,
		cleared: parent.cleared != null ? parent.cleared : null,
		reconciled: parent.reconciled != null ? parent.reconciled : null,
		starting_balance_flag: parent.starting_balance_flag != null ? parent.starting_balance_flag : null,
		sort_order: "sort_order" in data ? data.sort_order : parent.sort_order ?? null,
		is_child: true,
		parent_id: parent.id,
		error: null
	};
}
function makeNonChild(parent, data) {
	return {
		amount: 0,
		...data,
		cleared: parent.cleared != null ? parent.cleared : null,
		reconciled: parent.reconciled != null ? parent.reconciled : null,
		sort_order: parent.sort_order ?? null,
		starting_balance_flag: null,
		is_child: false,
		parent_id: null
	};
}
function makeTransactionWithChildCategory(parent, data) {
	return {
		...parent,
		is_parent: false,
		category: data.category || null
	};
}
function recalculateSplit(trans) {
	const total = (trans.subtransactions || []).reduce((acc, t) => acc + num(t.amount), 0);
	const { error: _error, ...rest } = trans;
	return {
		...rest,
		error: total === num(trans.amount) ? null : SplitTransactionError(total, trans)
	};
}
function findParentIndex(transactions, idx) {
	while (idx >= 0) {
		if (transactions[idx].is_parent) return idx;
		idx--;
	}
	return null;
}
function getSplit(transactions, parentIndex) {
	const split = [transactions[parentIndex]];
	let curr = parentIndex + 1;
	while (curr < transactions.length && transactions[curr].is_child) {
		split.push(transactions[curr]);
		curr++;
	}
	return split;
}
function ungroupTransactions(transactions) {
	return transactions.reduce((list, parent) => {
		const { subtransactions, ...trans } = parent;
		const _subtransactions = subtransactions || [];
		list.push(trans);
		for (let i = 0; i < _subtransactions.length; i++) list.push(_subtransactions[i]);
		return list;
	}, []);
}
function groupTransaction(split) {
	return {
		...split[0],
		subtransactions: split.slice(1)
	};
}
function ungroupTransaction(split) {
	if (split == null) return [];
	return ungroupTransactions([split]);
}
function applyTransactionDiff(groupedTrans, diff) {
	return groupTransaction(applyChanges(diff, ungroupTransaction(groupedTrans) || []));
}
function replaceTransactions(transactions, id, func) {
	const idx = transactions.findIndex((t) => t.id === id);
	const trans = transactions[idx];
	const transactionsCopy = [...transactions];
	if (idx === -1) throw new Error("Tried to edit unknown transaction id: " + id);
	if (trans.is_parent || trans.is_child) {
		const parentIndex = findParentIndex(transactions, idx);
		if (parentIndex == null) {
			logger.log("Cannot find parent index");
			return {
				data: [],
				diff: {
					added: [],
					deleted: [],
					updated: []
				},
				newTransaction: null
			};
		}
		const split = getSplit(transactions, parentIndex);
		let grouped = func(groupTransaction(split));
		const newSplit = ungroupTransaction(grouped);
		let diff;
		if (newSplit == null) {
			diff = {
				added: [],
				deleted: [{ id: split[0].id }],
				updated: []
			};
			grouped = {
				...split[0],
				_deleted: true
			};
			transactionsCopy.splice(parentIndex, split.length);
		} else {
			diff = diffItems(split, newSplit);
			transactionsCopy.splice(parentIndex, split.length, ...newSplit);
		}
		return {
			data: transactionsCopy,
			newTransaction: grouped,
			diff
		};
	} else {
		const grouped = func(trans);
		const newTrans = ungroupTransaction(grouped) || [];
		if (grouped) grouped.subtransactions = grouped.subtransactions || [];
		transactionsCopy.splice(idx, 1, ...newTrans);
		return {
			data: transactionsCopy,
			newTransaction: grouped || {
				...trans,
				_deleted: true
			},
			diff: diffItems([trans], newTrans)
		};
	}
}
function addSplitTransaction(transactions, id) {
	return replaceTransactions(transactions, id, (trans) => {
		if (!trans.is_parent) return trans;
		const prevSub = last$1(trans.subtransactions || []);
		trans.subtransactions?.push(makeChild(trans, {
			amount: 0,
			sort_order: num(prevSub && prevSub.sort_order) - 1
		}));
		return trans;
	});
}
function updateTransaction(transactions, transaction) {
	return replaceTransactions(transactions, transaction.id, (trans) => {
		if (trans.is_parent) {
			const parent = trans.id === transaction.id ? {
				...trans,
				...transaction
			} : trans;
			const sub = (parent.subtransactions ?? trans.subtransactions)?.map((t) => {
				let child = t;
				if (trans.id === transaction.id) {
					const { payee: childPayee, ...rest } = t;
					const newPayee = childPayee === trans.payee ? transaction.payee : childPayee;
					child = {
						...rest,
						...newPayee != null ? { payee: newPayee } : {}
					};
				} else if (t.id === transaction.id) child = transaction;
				return makeChild(parent, child);
			});
			return recalculateSplit({
				...parent,
				...sub && { subtransactions: sub }
			});
		} else return transaction;
	});
}
function deleteTransaction(transactions, id) {
	return replaceTransactions(transactions, id, (trans) => {
		if (trans.is_parent) if (trans.id === id) return null;
		else if (trans.subtransactions?.length === 1) {
			const { subtransactions: _subtransactions, ...rest } = trans;
			return {
				...rest,
				is_parent: false,
				error: null
			};
		} else {
			const sub = trans.subtransactions?.filter((t) => t.id !== id);
			return recalculateSplit({
				...trans,
				...sub && { subtransactions: sub }
			});
		}
		else return null;
	});
}
function splitTransaction(transactions, id, createSubtransactions) {
	return replaceTransactions(transactions, id, (trans) => {
		if (trans.is_parent || trans.is_child) return trans;
		const subtransactions = createSubtransactions?.(trans) || [makeChild(trans)];
		const { error: _error, ...rest } = trans;
		return {
			...rest,
			is_parent: true,
			error: num(trans.amount) === 0 ? null : SplitTransactionError(0, trans),
			subtransactions: subtransactions.map((t) => ({
				...t,
				sort_order: t.sort_order || -1
			}))
		};
	});
}
function realizeTempTransactions(transactions) {
	const parent = {
		...transactions.find((t) => !t.is_child),
		id: v4(),
		sort_order: Date.now()
	};
	return [parent, ...transactions.filter((t) => t.is_child).map((child) => ({
		...child,
		id: v4(),
		parent_id: parent.id
	}))];
}
function makeAsNonChildTransactions(childTransactionsToUpdate, transactions) {
	const [parentTransaction, ...childTransactions] = transactions;
	const newNonChildTransactions = childTransactionsToUpdate.map((t) => makeNonChild(parentTransaction, t));
	const remainingChildTransactions = childTransactions.filter((t) => !newNonChildTransactions.some((updatedTrans) => updatedTrans.id === t.id));
	if (childTransactions.length === 1 && childTransactionsToUpdate.length === 1 && childTransactionsToUpdate[0].id === childTransactions[0].id) return {
		updated: [makeTransactionWithChildCategory(parentTransaction, childTransactionsToUpdate[0])],
		deleted: [childTransactionsToUpdate[0]]
	};
	const nonChildTransactionsToUpdate = remainingChildTransactions.length === 1 ? [...newNonChildTransactions, makeNonChild(parentTransaction, remainingChildTransactions[0])] : newNonChildTransactions;
	const deleteParentTransaction = remainingChildTransactions.length <= 1;
	const updatedParentTransaction = {
		...parentTransaction,
		...!deleteParentTransaction ? { amount: remainingChildTransactions.map((t) => t.amount).reduce((total, amount) => total + amount, 0) } : {}
	};
	return {
		updated: [...!deleteParentTransaction ? [updatedParentTransaction] : [], ...nonChildTransactionsToUpdate],
		deleted: [...deleteParentTransaction ? [updatedParentTransaction] : []]
	};
}
//#endregion
//#region ../loot-core/src/server/rules/index.ts
registerHandlebarsHelpers();
//#endregion
//#region ../loot-core/src/shared/schedules.ts
function getStatus(nextDate, completed, hasTrans, upcomingLength = "7") {
	const upcomingDays = getUpcomingDays(upcomingLength);
	const today = currentDay();
	if (completed) return "completed";
	else if (hasTrans) return "paid";
	else if (nextDate === today) return "due";
	else if (nextDate > today && nextDate <= addDays(today, upcomingDays)) return "upcoming";
	else if (nextDate < today) return "missed";
	else return "scheduled";
}
function getStatusLabel(status) {
	switch (status) {
		case "completed": return t$1("completed");
		case "paid": return t$1("paid");
		case "due": return t$1("due");
		case "upcoming": return t$1("upcoming");
		case "missed": return t$1("missed");
		case "scheduled": return t$1("scheduled");
		default: return t$1("unknown");
	}
}
/**
* Builds a query to check if each schedule already has a matching transaction.
*
* The date lower-bound varies:
* - `dateCond.op === 'is'` (one-time): exact `next_date`, no lookback.
* - `posts_transaction` (auto-posted recurring): exact `next_date`, since
*   auto-posted dates are always precise. A lookback here would cause
*   yesterday's transaction to falsely match today's occurrence.
* - Otherwise (manual recurring): 2-day lookback to catch early payments.
*/
function getHasTransactionsQuery(schedules) {
	const filters = schedules.map((schedule) => {
		const dateCond = schedule._conditions?.find((c) => c.field === "date");
		return { $and: {
			schedule: schedule.id,
			date: { $gte: dateCond && dateCond.op === "is" ? schedule.next_date : schedule.posts_transaction ? schedule.next_date : subDays(schedule.next_date, 2) }
		} };
	});
	return q$1("transactions").options({ splits: "all" }).filter({ $or: filters }).orderBy({ date: "desc" }).select(["schedule", "date"]);
}
function makeNumberSuffix(num, locale) {
	return format$2(new Date(2020, 0, num, 12), "do", locale);
}
function prettyDayName(day) {
	return {
		SU: t$1("Sunday"),
		MO: t$1("Monday"),
		TU: t$1("Tuesday"),
		WE: t$1("Wednesday"),
		TH: t$1("Thursday"),
		FR: t$1("Friday"),
		SA: t$1("Saturday")
	}[day];
}
function getRecurringDescription(config, dateFormat, locale) {
	const interval = config.interval || 1;
	let endModeSuffix = "";
	switch (config.endMode) {
		case "after_n_occurrences":
			if (config.endOccurrences === 1) endModeSuffix = t$1("once");
			else endModeSuffix = t$1("{{endOccurrences}} times", { endOccurrences: config.endOccurrences });
			break;
		case "on_date":
			endModeSuffix = t$1("until {{dateFormatted}}", { dateFormatted: format$2(config.endDate, dateFormat) });
			break;
		default: break;
	}
	const weekendSolveModeString = config.weekendSolveMode ? config.weekendSolveMode === "after" ? t$1("(after weekend)") : t$1("(before weekend)") : "";
	const weekendSolveSuffix = config.skipWeekend ? weekendSolveModeString : "";
	const suffix = endModeSuffix ? `, ${endModeSuffix} ${weekendSolveSuffix}` : `${weekendSolveSuffix}`;
	let desc = null;
	switch (config.frequency) {
		case "daily":
			desc = interval !== 1 ? t$1(`Every {{interval}} days`, { interval }) : t$1("Every day");
			break;
		case "weekly":
			desc = interval !== 1 ? t$1(`Every {{interval}} weeks on {{dateFormatted}}`, {
				interval,
				dateFormatted: format$2(config.start, "EEEE", locale)
			}) : t$1("Every week on {{dateFormatted}}", { dateFormatted: format$2(config.start, "EEEE", locale) });
			break;
		case "monthly":
			if (config.patterns && config.patterns.length > 0) {
				let patterns = [...config.patterns].sort((p1, p2) => {
					const typeOrder = (p1.type === "day" ? 1 : 0) - (p2.type === "day" ? 1 : 0);
					const valOrder = p1.value - p2.value;
					if (typeOrder === 0) return valOrder;
					return typeOrder;
				}).filter((p) => p.value !== -1);
				patterns = patterns.concat(config.patterns.filter((p) => p.value === -1));
				const strs = [];
				const uniqueDays = new Set(patterns.map((p) => p.type));
				const isSameDay = uniqueDays.size === 1 && !uniqueDays.has("day");
				for (const pattern of patterns) if (pattern.type === "day") if (pattern.value === -1) strs.push(t$1("last day"));
				else strs.push(makeNumberSuffix(pattern.value, locale));
				else {
					const dayName = isSameDay ? "" : " " + prettyDayName(pattern.type);
					if (pattern.value === -1) strs.push(t$1("last") + dayName);
					else strs.push(makeNumberSuffix(pattern.value, locale) + dayName);
				}
				let range = "";
				if (strs.length > 2) {
					range += strs.slice(0, strs.length - 1).join(", ");
					range += `, ${t$1("and")} `;
					range += strs[strs.length - 1];
				} else range += strs.join(` ${t$1("and")} `);
				if (isSameDay) range += " " + prettyDayName(patterns[0].type);
				desc = interval !== 1 ? t$1(`Every {{interval}} months on the {{range}}`, {
					interval,
					range
				}) : t$1("Every month on the {{range}}", { range });
			} else desc = interval !== 1 ? t$1(`Every {{interval}} months on the {{dateFormatted}}`, {
				interval,
				dateFormatted: format$2(config.start, "do", locale)
			}) : t$1("Every month on the {{dateFormatted}}", { dateFormatted: format$2(config.start, "do", locale) });
			break;
		case "yearly":
			desc = interval !== 1 ? t$1(`Every {{interval}} years on {{dateFormatted}}`, {
				interval,
				dateFormatted: format$2(config.start, "LLL do", locale)
			}) : t$1("Every year on {{dateFormatted}}", { dateFormatted: format$2(config.start, "LLL do", locale) });
			break;
		default: return t$1("Recurring error");
	}
	return `${desc}${suffix}`.trim();
}
function recurConfigToRSchedule(config) {
	const base = {
		start: parseDate(config.start),
		frequency: config.frequency.toUpperCase(),
		byHourOfDay: [12]
	};
	if (config.interval) base.interval = config.interval;
	switch (config.endMode) {
		case "after_n_occurrences":
			base.count = config.endOccurrences;
			break;
		case "on_date":
			base.end = parseDate(config.endDate);
			break;
		default: break;
	}
	const abbrevDay = (name) => name.slice(0, 2).toUpperCase();
	switch (config.frequency) {
		case "daily": return [base];
		case "weekly": return [base];
		case "monthly": if (config.patterns && config.patterns.length > 0) {
			const days = config.patterns.filter((p) => p.type === "day");
			const dayNames = config.patterns.filter((p) => p.type !== "day");
			return [days.length > 0 && {
				...base,
				byDayOfMonth: days.map((p) => p.value)
			}, dayNames.length > 0 && {
				...base,
				byDayOfWeek: dayNames.map((p) => [abbrevDay(p.type), p.value])
			}].filter(Boolean);
		} else return [base];
		case "yearly": return [base];
		default: throw new Error("Invalid recurring date config");
	}
}
function extractScheduleConds(conditions) {
	return {
		payee: conditions.find((cond) => cond.op === "is" && cond.field === "payee") || conditions.find((cond) => cond.op === "is" && cond.field === "description") || null,
		account: conditions.find((cond) => cond.op === "is" && cond.field === "account") || conditions.find((cond) => cond.op === "is" && cond.field === "acct") || null,
		amount: conditions.find((cond) => (cond.op === "is" || cond.op === "isapprox" || cond.op === "isbetween") && cond.field === "amount") || null,
		date: conditions.find((cond) => (cond.op === "is" || cond.op === "isapprox") && cond.field === "date") || null
	};
}
function getNextDate(dateCond, start = new Date(currentDay()), noSkipWeekend = false) {
	start = startOfDay(start);
	const value = new Condition(dateCond.op, "date", dateCond.value, null).getValue();
	if (value.type === "date") return value.date;
	else if (value.type === "recur") {
		let dates = value.schedule.occurrences({
			start,
			take: 1
		}).toArray();
		if (dates.length === 0) dates = value.schedule.occurrences({
			reverse: true,
			take: 1
		}).toArray();
		if (dates.length > 0) {
			let date = dates[0].date;
			if (value.schedule.data.skipWeekend && !noSkipWeekend) date = getDateWithSkippedWeekend(date, value.schedule.data.weekendSolve);
			return dayFromDate(date);
		}
	}
	return null;
}
function getDateWithSkippedWeekend(date, solveMode) {
	if (isWeekend(date)) if (solveMode === "after") return nextMonday(date);
	else if (solveMode === "before") return previousFriday(date);
	else throw new Error("Unknown weekend solve mode, this should not happen!");
	return date;
}
function getScheduledAmount(amount, inverse = false) {
	if (amount == null) return 0;
	if (typeof amount === "number") return inverse ? -amount : amount;
	const avg = (amount.num1 + amount.num2) / 2;
	return inverse ? -Math.round(avg) : Math.round(avg);
}
function describeSchedule(schedule, payee) {
	if (payee) return `${payee.name} (${schedule.next_date})`;
	else return `${t$1("Next:")} ${schedule.next_date}`;
}
function getUpcomingDays(upcomingLength = "7", today = currentDay()) {
	const month = getMonth(today);
	switch (upcomingLength) {
		case "currentMonth": {
			const day = getDay(today);
			return getDay(getMonthEnd(today)) - day;
		}
		case "oneMonth": return differenceInCalendarDays(nextMonth(month), month);
		default:
			if (upcomingLength.includes("-")) {
				const [num, unit] = upcomingLength.split("-");
				const value = Math.max(1, parseInt(num, 10));
				switch (unit) {
					case "day": return value;
					case "week": return value * 7;
					case "month": return differenceInCalendarDays(addMonths(today, value), month) + 1;
					case "year": return differenceInCalendarDays(addMonths(today, value * 12), month) + 1;
					default: return 7;
				}
			}
			return parseInt(upcomingLength, 10);
	}
}
function scheduleIsRecurring(dateCond) {
	if (!dateCond) return false;
	return new Condition(dateCond.op, "date", dateCond.value, null).getValue().type === "recur";
}
function isForPreview(schedule, statuses) {
	const status = statuses.get(schedule.id);
	return !schedule.completed && [
		"due",
		"upcoming",
		"missed",
		"paid"
	].includes(status);
}
function computeSchedulePreviewTransactions(schedules, statuses, upcomingLength, filter) {
	const schedulesForPreview = schedules.filter((s) => isForPreview(s, statuses)).filter(filter ? filter : () => true);
	const today = startOfDay(parseDate(currentDay()));
	return schedulesForPreview.flatMap((schedule) => {
		const upcomingPeriodEnd = startOfDay(parseDate(addDays(today, getUpcomingDays(schedule.custom_upcoming_length ?? upcomingLength))));
		const { date: dateConditions } = extractScheduleConds(schedule._conditions);
		const status = statuses.get(schedule.id);
		const isRecurring = scheduleIsRecurring(dateConditions);
		const dates = [schedule.next_date];
		let day = startOfDay(parseDate(schedule.next_date));
		if (isRecurring) while (day <= upcomingPeriodEnd) {
			const nextDate = getNextDate(dateConditions, day);
			if (nextDate === null) break;
			if (startOfDay(parseDate(nextDate)) > upcomingPeriodEnd) break;
			if (dates.includes(nextDate)) {
				day = startOfDay(parseDate(addDays(day, 1)));
				continue;
			}
			dates.push(nextDate);
			day = startOfDay(parseDate(addDays(nextDate, 1)));
		}
		if (status === "paid") dates.shift();
		return dates.map((date) => ({
			id: "preview/" + schedule.id + `/${date}`,
			payee: schedule._payee,
			account: schedule._account,
			amount: getScheduledAmount(schedule._amount),
			date,
			schedule: schedule.id,
			forceUpcoming: (date !== schedule.next_date || status === "paid") && date >= currentDay()
		}));
	}).sort((a, b) => parseDate(b.date).getTime() - parseDate(a.date).getTime() || a.amount - b.amount);
}
//#endregion
//#region src/hooks/useDragDrop.tsx
/**
* Check if a drop at a date boundary is valid.
* A boundary drop is valid when the adjacent transaction has the same date as the dragged transaction.
*
* MIGRATION: This validation logic is specific to transaction reordering and
* should be moved into the `onReorder` callback when migrating to useDragAndDrop.
* The callback receives the dragged keys and drop target, from which you can
* access the transaction data and perform this validation before applying changes.
*
* @param dropPos - The drop position relative to the target ('before' or 'after')
* @param targetDate - The date of the transaction being dropped onto
* @param draggedDate - The date of the transaction being dragged
* @param neighborDate - The date of the adjacent transaction in the drop direction, or null if none
* @param isAscending - Whether the list is sorted in ascending order (oldest first)
* @returns True if the drop is valid at this boundary position
*/
function isValidBoundaryDrop(dropPos, targetDate, draggedDate, neighborDate, isAscending) {
	if (!neighborDate || neighborDate !== draggedDate) return false;
	if (isAscending) return dropPos === "before" && targetDate > draggedDate || dropPos === "after" && targetDate < draggedDate;
	return dropPos === "before" && targetDate < draggedDate || dropPos === "after" && targetDate > draggedDate;
}
/**
* Low-level drag hook for custom components.
*
* MIGRATION: Replace with useDragAndDrop from react-aria-components
* when the parent component uses ListBox, GridList, or Table.
*/
function useDrag(t0) {
	const $ = (0, import_compiler_runtime.c)(12);
	const { item, type, canDrag, onDragChange, preview } = t0;
	const _onDragChange = (0, import_react.useRef)(onDragChange);
	const dragRef = (0, import_react.useRef)(null);
	const dragStartTimeoutRef = (0, import_react.useRef)(null);
	let t1;
	if ($[0] !== onDragChange) {
		t1 = () => {
			_onDragChange.current = onDragChange;
		};
		$[0] = onDragChange;
		$[1] = t1;
	} else t1 = $[1];
	(0, import_react.useLayoutEffect)(t1);
	let t2;
	let t3;
	if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = () => () => {
			if (dragStartTimeoutRef.current) {
				clearTimeout(dragStartTimeoutRef.current);
				dragStartTimeoutRef.current = null;
			}
		};
		t3 = [];
		$[2] = t2;
		$[3] = t3;
	} else {
		t2 = $[2];
		t3 = $[3];
	}
	(0, import_react.useEffect)(t2, t3);
	const t4 = !canDrag;
	let t5;
	if ($[4] !== item || $[5] !== preview || $[6] !== t4 || $[7] !== type) {
		t5 = {
			isDisabled: t4,
			preview,
			getItems() {
				return [{
					[type]: JSON.stringify(item),
					"text/plain": item?.id ?? ""
				}];
			},
			onDragStart() {
				_onDragChange.current?.({
					state: "start-preview",
					type,
					item
				});
				if (dragStartTimeoutRef.current) clearTimeout(dragStartTimeoutRef.current);
				dragStartTimeoutRef.current = setTimeout(() => {
					_onDragChange.current?.({ state: "start" });
					dragStartTimeoutRef.current = null;
				}, 0);
			},
			onDragEnd() {
				if (dragStartTimeoutRef.current) {
					clearTimeout(dragStartTimeoutRef.current);
					dragStartTimeoutRef.current = null;
				}
				_onDragChange.current?.({
					state: "end",
					type,
					item
				});
			}
		};
		$[4] = item;
		$[5] = preview;
		$[6] = t4;
		$[7] = type;
		$[8] = t5;
	} else t5 = $[8];
	const { dragProps, isDragging } = $8253ed7ece74b463$export$7941f8aafa4b6021(t5);
	let t6;
	if ($[9] !== dragProps || $[10] !== isDragging) {
		t6 = {
			dragRef,
			dragProps,
			isDragging
		};
		$[9] = dragProps;
		$[10] = isDragging;
		$[11] = t6;
	} else t6 = $[11];
	return t6;
}
/**
* Low-level drop hook for custom components.
*
* MIGRATION: Replace with useDragAndDrop from react-aria-components
* when the parent component uses ListBox, GridList, or Table.
* The drop position calculation and cursor tracking will be handled
* automatically by the collection component.
*/
function useDrop(t0) {
	const $ = (0, import_compiler_runtime.c)(17);
	const { types, id, onDrop, onLongHover } = t0;
	const dropRef = (0, import_react.useRef)(null);
	const [dropPos, setDropPos] = (0, import_react.useState)(null);
	const [isCursorOver, setIsCursorOver] = (0, import_react.useState)(false);
	const lastClientY = (0, import_react.useRef)(null);
	const [isDropActive, setIsDropActive] = (0, import_react.useState)(false);
	let t1;
	let t2;
	if ($[0] !== isCursorOver) {
		t1 = () => {
			if (!isCursorOver) {
				setDropPos(null);
				lastClientY.current = null;
			}
		};
		t2 = [isCursorOver];
		$[0] = isCursorOver;
		$[1] = t1;
		$[2] = t2;
	} else {
		t1 = $[1];
		t2 = $[2];
	}
	(0, import_react.useEffect)(t1, t2);
	let t3;
	if ($[3] !== types) {
		t3 = Array.isArray(types) ? types : [types];
		$[3] = types;
		$[4] = t3;
	} else t3 = $[4];
	const acceptedTypes = t3;
	let t4;
	if ($[5] !== acceptedTypes || $[6] !== id || $[7] !== onDrop || $[8] !== onLongHover) {
		t4 = {
			ref: dropRef,
			getDropOperation(dragTypes) {
				return acceptedTypes.some((t) => dragTypes.has(t)) ? "move" : "cancel";
			},
			onDropEnter() {
				setIsDropActive(true);
			},
			onDropActivate() {
				onLongHover?.();
			},
			onDropExit() {
				setIsDropActive(false);
				setIsCursorOver(false);
			},
			async onDrop(e) {
				if (!onDrop) return;
				if (!dropRef.current) return;
				const matchingType = acceptedTypes.find((t_0) => e.items.some((item) => item.kind === "text" && item.types.has(t_0)));
				if (!matchingType) return;
				const textItem = e.items.find((item_0) => item_0.kind === "text" && item_0.types.has(matchingType));
				if (!textItem) return;
				const data = await textItem.getText(matchingType);
				if (typeof data !== "string" || !data.trim()) return;
				let parsed;
				try {
					parsed = JSON.parse(data);
				} catch {
					return;
				}
				if (!parsed || typeof parsed !== "object" || typeof parsed.id !== "string" || !parsed.id) return;
				const rect = dropRef.current.getBoundingClientRect();
				const hoverMiddleY = (rect.bottom - rect.top) / 2;
				const pos = (lastClientY.current != null ? lastClientY.current - rect.top : hoverMiddleY + 1) < hoverMiddleY ? "before" : "after";
				onDrop(parsed.id, pos, id);
			}
		};
		$[5] = acceptedTypes;
		$[6] = id;
		$[7] = onDrop;
		$[8] = onLongHover;
		$[9] = t4;
	} else t4 = $[9];
	const { dropProps, isDropTarget } = $5c06e4929e123553$export$ccdee5eaf73cf661(t4);
	let t5;
	let t6;
	if ($[10] !== isDropActive) {
		t5 = () => {
			if (!isDropActive) return;
			const handleDragOver = (e_0) => {
				if (!dropRef.current) return;
				const rect_0 = dropRef.current.getBoundingClientRect();
				const { clientX, clientY } = e_0;
				if (!(clientX >= rect_0.left && clientX <= rect_0.right && clientY >= rect_0.top && clientY <= rect_0.bottom)) {
					setIsCursorOver(false);
					return;
				}
				setIsCursorOver(true);
				lastClientY.current = clientY;
				const hoverMiddleY_0 = (rect_0.bottom - rect_0.top) / 2;
				setDropPos(clientY - rect_0.top < hoverMiddleY_0 ? "before" : "after");
			};
			const element = dropRef.current;
			element?.addEventListener("dragover", handleDragOver);
			return () => {
				element?.removeEventListener("dragover", handleDragOver);
			};
		};
		t6 = [isDropActive, dropRef];
		$[10] = isDropActive;
		$[11] = t5;
		$[12] = t6;
	} else {
		t5 = $[11];
		t6 = $[12];
	}
	(0, import_react.useEffect)(t5, t6);
	const t7 = isCursorOver ? dropPos : null;
	let t8;
	if ($[13] !== dropProps || $[14] !== isDropTarget || $[15] !== t7) {
		t8 = {
			dropRef,
			dropProps,
			dropPos: t7,
			isDropTarget
		};
		$[13] = dropProps;
		$[14] = isDropTarget;
		$[15] = t7;
		$[16] = t8;
	} else t8 = $[16];
	return t8;
}
/**
* MIGRATION: Not needed with useDragAndDrop - DropIndicator handles
* positioning automatically based on the collection structure.
*/
var DropHighlightPosContext = (0, import_react.createContext)(null);
/**
* Visual indicator showing where a dragged item will be dropped.
*
* MIGRATION: Replace with <DropIndicator> from react-aria-components
* when using useDragAndDrop. The DropIndicator component automatically
* positions itself between items based on the drop target.
*/
function DropHighlight(t0) {
	const $ = (0, import_compiler_runtime.c)(6);
	const { pos, offset } = t0;
	const itemPos = (0, import_react.useContext)(DropHighlightPosContext);
	if (pos == null || pos === "on") return null;
	const topOffset = (itemPos === "first" ? 2 : 0) + (offset?.top ?? 0);
	const bottomOffset = (itemPos === "last" ? 2 : 0) + (offset?.bottom ?? 0);
	let t1;
	if ($[0] !== bottomOffset || $[1] !== pos || $[2] !== topOffset) {
		t1 = pos === "before" ? { top: topOffset } : { bottom: bottomOffset };
		$[0] = bottomOffset;
		$[1] = pos;
		$[2] = topOffset;
		$[3] = t1;
	} else t1 = $[3];
	const posStyle = t1;
	let t2;
	if ($[4] !== posStyle) {
		t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, { style: {
			position: "absolute",
			left: 2,
			right: 2,
			borderRadius: 3,
			height: 3,
			background: theme.pageTextLink,
			zIndex: 1e4,
			pointerEvents: "none",
			...posStyle
		} });
		$[4] = posStyle;
		$[5] = t2;
	} else t2 = $[5];
	return t2;
}
//#endregion
//#region ../loot-core/src/shared/normalisation.ts
var iMap = {
	ł: "l",
	ø: "o",
	ß: "ss",
	œ: "oe"
};
var iRegex = new RegExp(Object.keys(iMap).join("|"), "g");
function getNormalisedString(value) {
	return value.toLowerCase().replace(iRegex, (m) => iMap[m]).normalize("NFD").replace(/\p{Diacritic}/gu, "");
}
//#endregion
//#region ../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
function _setPrototypeOf(t, e) {
	return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
		return t.__proto__ = e, t;
	}, _setPrototypeOf(t, e);
}
//#endregion
//#region ../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
function _inheritsLoose(t, o) {
	t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
}
//#endregion
//#region ../../node_modules/prop-types/lib/ReactPropTypesSecret.js
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var require_ReactPropTypesSecret = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	module.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
}));
//#endregion
//#region ../../node_modules/prop-types/factoryWithThrowingShims.js
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var require_factoryWithThrowingShims = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	var ReactPropTypesSecret = require_ReactPropTypesSecret();
	function emptyFunction() {}
	function emptyFunctionWithReset() {}
	emptyFunctionWithReset.resetWarningCache = emptyFunction;
	module.exports = function() {
		function shim(props, propName, componentName, location, propFullName, secret) {
			if (secret === ReactPropTypesSecret) return;
			var err = /* @__PURE__ */ new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");
			err.name = "Invariant Violation";
			throw err;
		}
		shim.isRequired = shim;
		function getShim() {
			return shim;
		}
		var ReactPropTypes = {
			array: shim,
			bigint: shim,
			bool: shim,
			func: shim,
			number: shim,
			object: shim,
			string: shim,
			symbol: shim,
			any: shim,
			arrayOf: getShim,
			element: shim,
			elementType: shim,
			instanceOf: getShim,
			node: shim,
			objectOf: getShim,
			oneOf: getShim,
			oneOfType: getShim,
			shape: getShim,
			exact: getShim,
			checkPropTypes: emptyFunctionWithReset,
			resetWarningCache: emptyFunction
		};
		ReactPropTypes.PropTypes = ReactPropTypes;
		return ReactPropTypes;
	};
}));
//#endregion
//#region ../../node_modules/prop-types/index.js
var require_prop_types = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	module.exports = require_factoryWithThrowingShims()();
}));
//#endregion
//#region ../../node_modules/downshift/node_modules/react-is/cjs/react-is.production.min.js
/**
* @license React
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var require_react_is_production_min = /* @__PURE__ */ __commonJSMin(((exports) => {}));
//#endregion
//#region ../../node_modules/downshift/node_modules/react-is/index.js
var require_react_is = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	module.exports = require_react_is_production_min();
}));
//#endregion
//#region ../../node_modules/compute-scroll-into-view/dist/index.js
var import_prop_types = /* @__PURE__ */ __toESM(require_prop_types(), 1);
require_react_is();
var t = (t) => "object" == typeof t && null != t && 1 === t.nodeType, e = (t, e) => (!e || "hidden" !== t) && "visible" !== t && "clip" !== t, n = (t, n) => {
	if (t.clientHeight < t.scrollHeight || t.clientWidth < t.scrollWidth) {
		const o = getComputedStyle(t, null);
		return e(o.overflowY, n) || e(o.overflowX, n) || ((t) => {
			const e = ((t) => {
				if (!t.ownerDocument || !t.ownerDocument.defaultView) return null;
				try {
					return t.ownerDocument.defaultView.frameElement;
				} catch (t) {
					return null;
				}
			})(t);
			return !!e && (e.clientHeight < t.scrollHeight || e.clientWidth < t.scrollWidth);
		})(t);
	}
	return !1;
}, o = (t, e, n, o, l, r, i, s) => r < t && i > e || r > t && i < e ? 0 : r <= t && s <= n || i >= e && s >= n ? r - t - o : i > e && s < n || r < t && s > n ? i - e + l : 0, l = (t) => {
	const e = t.parentElement;
	return null == e ? t.getRootNode().host || null : e;
}, r = (e, r) => {
	var i, s, d, h;
	if ("undefined" == typeof document) return [];
	const { scrollMode: c, block: f, inline: u, boundary: a, skipOverflowHiddenElements: g } = r, p = "function" == typeof a ? a : (t) => t !== a;
	if (!t(e)) throw new TypeError("Invalid target");
	const m = document.scrollingElement || document.documentElement, w = [];
	let W = e;
	for (; t(W) && p(W);) {
		if (W = l(W), W === m) {
			w.push(W);
			break;
		}
		null != W && W === document.body && n(W) && !n(document.documentElement) || null != W && n(W, g) && w.push(W);
	}
	const b = null != (s = null == (i = window.visualViewport) ? void 0 : i.width) ? s : innerWidth, H = null != (h = null == (d = window.visualViewport) ? void 0 : d.height) ? h : innerHeight, { scrollX: y, scrollY: M } = window, { height: v, width: E, top: x, right: C, bottom: I, left: R } = e.getBoundingClientRect(), { top: T, right: B, bottom: F, left: V } = ((t) => {
		const e = window.getComputedStyle(t);
		return {
			top: parseFloat(e.scrollMarginTop) || 0,
			right: parseFloat(e.scrollMarginRight) || 0,
			bottom: parseFloat(e.scrollMarginBottom) || 0,
			left: parseFloat(e.scrollMarginLeft) || 0
		};
	})(e);
	let k = "start" === f || "nearest" === f ? x - T : "end" === f ? I + F : x + v / 2 - T + F, D = "center" === u ? R + E / 2 - V + B : "end" === u ? C + B : R - V;
	const L = [];
	for (let t = 0; t < w.length; t++) {
		const e = w[t], { height: l, width: r, top: i, right: s, bottom: d, left: h } = e.getBoundingClientRect();
		if ("if-needed" === c && x >= 0 && R >= 0 && I <= H && C <= b && (e === m && !n(e) || x >= i && I <= d && R >= h && C <= s)) return L;
		const a = getComputedStyle(e), g = parseInt(a.borderLeftWidth, 10), p = parseInt(a.borderTopWidth, 10), W = parseInt(a.borderRightWidth, 10), T = parseInt(a.borderBottomWidth, 10);
		let B = 0, F = 0;
		const V = "offsetWidth" in e ? e.offsetWidth - e.clientWidth - g - W : 0, S = "offsetHeight" in e ? e.offsetHeight - e.clientHeight - p - T : 0, X = "offsetWidth" in e ? 0 === e.offsetWidth ? 0 : r / e.offsetWidth : 0, Y = "offsetHeight" in e ? 0 === e.offsetHeight ? 0 : l / e.offsetHeight : 0;
		if (m === e) B = "start" === f ? k : "end" === f ? k - H : "nearest" === f ? o(M, M + H, H, p, T, M + k, M + k + v, v) : k - H / 2, F = "start" === u ? D : "center" === u ? D - b / 2 : "end" === u ? D - b : o(y, y + b, b, g, W, y + D, y + D + E, E), B = Math.max(0, B + M), F = Math.max(0, F + y);
		else {
			B = "start" === f ? k - i - p : "end" === f ? k - d + T + S : "nearest" === f ? o(i, d, l, p, T + S, k, k + v, v) : k - (i + l / 2) + S / 2, F = "start" === u ? D - h - g : "center" === u ? D - (h + r / 2) + V / 2 : "end" === u ? D - s + W + V : o(h, s, r, g, W + V, D, D + E, E);
			const { scrollLeft: t, scrollTop: n } = e;
			B = 0 === Y ? 0 : Math.max(0, Math.min(n + B / Y, e.scrollHeight - l / Y + S)), F = 0 === X ? 0 : Math.max(0, Math.min(t + F / X, e.scrollWidth - r / X + V)), k += n - B, D += t - F;
		}
		L.push({
			el: e,
			top: B,
			left: F
		});
	}
	return L;
};
//#endregion
//#region ../../node_modules/downshift/dist/downshift.esm.mjs
var unknown = 0;
var mouseUp = 1;
var itemMouseEnter = 2;
var keyDownArrowUp = 3;
var keyDownArrowDown = 4;
var keyDownEscape = 5;
var keyDownEnter = 6;
var keyDownHome = 7;
var keyDownEnd = 8;
var clickItem = 9;
var blurInput = 10;
var changeInput = 11;
var keyDownSpaceButton = 12;
var clickButton = 13;
var blurButton = 14;
var controlledPropUpdatedSelectedItem = 15;
var touchEnd = 16;
var stateChangeTypes$4 = /* @__PURE__ */ Object.freeze({
	__proto__: null,
	blurButton,
	blurInput,
	changeInput,
	clickButton,
	clickItem,
	controlledPropUpdatedSelectedItem,
	itemMouseEnter,
	keyDownArrowDown,
	keyDownArrowUp,
	keyDownEnd,
	keyDownEnter,
	keyDownEscape,
	keyDownHome,
	keyDownSpaceButton,
	mouseUp,
	touchEnd,
	unknown
});
var idCounter = 0;
/**
* This generates a unique ID for an instance of Downshift
* @return {string} the unique ID
*/
function generateId() {
	return String(idCounter++);
}
function useLatestRef(val) {
	var ref = import_react.useRef(val);
	ref.current = val;
	return ref;
}
function handleRefs$1() {
	for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) refs[_key] = arguments[_key];
	return function(node) {
		refs.forEach(function(ref) {
			if (typeof ref === "function") ref(node);
			else if (ref) ref.current = node;
		});
	};
}
/**
* This is intended to be used to compose event handlers.
* They are executed in order until one of them sets
* `event.preventDownshiftDefault = true`.
* @param fns the event handler functions
* @return the event handler to add to an element
*/
function callAllEventHandlers$1() {
	for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) fns[_key] = arguments[_key];
	return function(event) {
		for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) args[_key2 - 1] = arguments[_key2];
		return fns.some(function(fn) {
			if (fn) fn.apply(void 0, [event].concat(args));
			return event.preventDownshiftDefault || event.hasOwnProperty("nativeEvent") && event.nativeEvent.preventDownshiftDefault;
		});
	};
}
/**
* Simple debounce implementation. Will call the given
* function once after the time given has passed since
* it was last called.
*/
function debounce$1(fn, time) {
	var timeoutId;
	function cancel() {
		if (timeoutId) clearTimeout(timeoutId);
	}
	function wrapper() {
		for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
		cancel();
		timeoutId = setTimeout(function() {
			timeoutId = null;
			fn.apply(void 0, args);
		}, time);
	}
	wrapper.cancel = cancel;
	return wrapper;
}
var cleanupStatus = debounce$1(function(document) {
	getStatusDiv(document).textContent = "";
}, 500);
/**
* Get the status node or create it if it does not already exist.
*/
function getStatusDiv(document) {
	var statusDiv = document.getElementById("a11y-status-message");
	if (statusDiv) return statusDiv;
	statusDiv = document.createElement("div");
	statusDiv.setAttribute("id", "a11y-status-message");
	statusDiv.setAttribute("role", "status");
	statusDiv.setAttribute("aria-live", "polite");
	statusDiv.setAttribute("aria-relevant", "additions text");
	Object.assign(statusDiv.style, {
		border: "0",
		clip: "rect(0 0 0 0)",
		height: "1px",
		margin: "-1px",
		overflow: "hidden",
		padding: "0",
		position: "absolute",
		width: "1px"
	});
	document.body.appendChild(statusDiv);
	return statusDiv;
}
/**
* Sets aria live status to a div element that's visually hidden.
*/
function setStatus(status, document) {
	if (!status || !document) return;
	var div = getStatusDiv(document);
	div.textContent = status;
	cleanupStatus(document);
}
/**
* Removes the status element from the DOM
*/
function cleanupStatusDiv(document) {
	var statusDiv = document == null ? void 0 : document.getElementById("a11y-status-message");
	if (statusDiv) statusDiv.remove();
}
function noop() {}
var validatePropTypes$1 = noop;
/**
* This will perform a shallow merge of the given state object
* with the state coming from props
* (for the controlled component scenario)
* This is used in state updater functions so they're referencing
* the right state regardless of where it comes from.
*
* @param state The state of the component/hook.
* @param props The props that may contain controlled values.
* @returns The merged controlled state.
*/
function getState(state, props) {
	if (!props) return state;
	return Object.keys(state).reduce(function(newState, key) {
		if (props[key] !== void 0) newState[key] = props[key];
		return newState;
	}, _extends({}, state));
}
/**
* Scroll node into view if necessary
* @param {HTMLElement} node the element that should scroll into view
* @param {HTMLElement} menuNode the menu element of the component
*/
function scrollIntoView(node, menuNode) {
	if (!node) return;
	r(node, {
		boundary: menuNode,
		block: "nearest",
		scrollMode: "if-needed"
	}).forEach(function(_ref) {
		var el = _ref.el, top = _ref.top, left = _ref.left;
		el.scrollTop = top;
		el.scrollLeft = left;
	});
}
/**
* Accepts a parameter and returns it if it's a function
* or a noop function if it's not. This allows us to
* accept a callback, but not worry about it if it's not
* passed.
* @param {Function} cb the callback
* @return {Function} a function
*/
function cbToCb(cb) {
	return typeof cb === "function" ? cb : noop;
}
/**
* @param {HTMLElement} parent the parent node
* @param {HTMLElement} child the child node
* @param {Window} environment The window context where downshift renders.
* @return {Boolean} whether the parent is the child or the child is in the parent
*/
function isOrContainsNode(parent, child, environment) {
	return parent === child || child instanceof environment.Node && parent.contains && parent.contains(child);
}
/**
* Simple debounce implementation. Will call the given
* function once after the time given has passed since
* it was last called.
* @param {Function} fn the function to call after the time
* @param {Number} time the time to wait
* @return {Function} the debounced function
*/
function debounce(fn, time) {
	var timeoutId;
	function cancel() {
		if (timeoutId) clearTimeout(timeoutId);
	}
	function wrapper() {
		for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
		cancel();
		timeoutId = setTimeout(function() {
			timeoutId = null;
			fn.apply(void 0, args);
		}, time);
	}
	wrapper.cancel = cancel;
	return wrapper;
}
/**
* This is intended to be used to compose event handlers.
* They are executed in order until one of them sets
* `event.preventDownshiftDefault = true`.
* @param {...Function} fns the event handler functions
* @return {Function} the event handler to add to an element
*/
function callAllEventHandlers() {
	for (var _len2 = arguments.length, fns = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) fns[_key2] = arguments[_key2];
	return function(event) {
		for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) args[_key3 - 1] = arguments[_key3];
		return fns.some(function(fn) {
			if (fn) fn.apply(void 0, [event].concat(args));
			return event.preventDownshiftDefault || event.hasOwnProperty("nativeEvent") && event.nativeEvent.preventDownshiftDefault;
		});
	};
}
function handleRefs() {
	for (var _len4 = arguments.length, refs = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) refs[_key4] = arguments[_key4];
	return function(node) {
		refs.forEach(function(ref) {
			if (typeof ref === "function") ref(node);
			else if (ref) ref.current = node;
		});
	};
}
/**
* Default implementation for status message. Only added when menu is open.
* Will specify if there are results in the list, and if so, how many,
* and what keys are relevant.
*
* @param {Object} param the downshift state and other relevant properties
* @return {String} the a11y status message
*/
function getA11yStatusMessage(_ref) {
	var isOpen = _ref.isOpen, resultCount = _ref.resultCount, previousResultCount = _ref.previousResultCount;
	if (!isOpen) return "";
	if (!resultCount) return "No results are available.";
	if (resultCount !== previousResultCount) return resultCount + " result" + (resultCount === 1 ? " is" : "s are") + " available, use up and down arrow keys to navigate. Press Enter key to select.";
	return "";
}
/**
* Takes an argument and if it's an array, returns the first item in the array
* otherwise returns the argument
* @param {*} arg the maybe-array
* @param {*} defaultValue the value if arg is falsey not defined
* @return {*} the arg or it's first item
*/
function unwrapArray(arg, defaultValue) {
	arg = Array.isArray(arg) ? arg[0] : arg;
	if (!arg && defaultValue) return defaultValue;
	else return arg;
}
/**
* @param {Object} element (P)react element
* @return {Boolean} whether it's a DOM element
*/
function isDOMElement(element) {
	return typeof element.type === "string";
}
/**
* @param {Object} element (P)react element
* @return {Object} the props
*/
function getElementProps(element) {
	return element.props;
}
var stateKeys = [
	"highlightedIndex",
	"inputValue",
	"isOpen",
	"selectedItem",
	"type"
];
/**
* @param {Object} state the state object
* @return {Object} state that is relevant to downshift
*/
function pickState(state) {
	if (state === void 0) state = {};
	var result = {};
	stateKeys.forEach(function(k) {
		if (state.hasOwnProperty(k)) result[k] = state[k];
	});
	return result;
}
/**
* This determines whether a prop is a "controlled prop" meaning it is
* state which is controlled by the outside of this component rather
* than within this component.
*
* @param {Object} props The props that may contain controlled values.
* @param {String} key the key to check
* @return {Boolean} whether it is a controlled controlled prop
*/
function isControlledProp(props, key) {
	return props[key] !== void 0;
}
/**
* Normalizes the 'key' property of a KeyboardEvent in IE/Edge
* @param {Object} event a keyboardEvent object
* @return {String} keyboard key
*/
function normalizeArrowKey(event) {
	var key = event.key, keyCode = event.keyCode;
	/* istanbul ignore next (ie) */
	if (keyCode >= 37 && keyCode <= 40 && key.indexOf("Arrow") !== 0) return "Arrow" + key;
	return key;
}
/**
* Returns the next non-disabled highlightedIndex value.
*
* @param {number} start The current highlightedIndex.
* @param {number} offset The offset from the current highlightedIndex to start searching.
* @param {unknown[]} items The items array.
* @param {(item: unknown, index: number) => boolean} isItemDisabled Function that tells if an item is disabled or not.
* @param {boolean?} circular If the search reaches the end, if it can search again starting from the other end.
* @returns {number} The next highlightedIndex.
*/
function getHighlightedIndex(start, offset, items, isItemDisabled, circular) {
	if (circular === void 0) circular = false;
	var count = items.length;
	if (count === 0) return -1;
	var itemsLastIndex = count - 1;
	if (typeof start !== "number" || start < 0 || start > itemsLastIndex) start = offset > 0 ? -1 : itemsLastIndex + 1;
	var current = start + offset;
	if (current < 0) current = circular ? itemsLastIndex : 0;
	else if (current > itemsLastIndex) current = circular ? 0 : itemsLastIndex;
	var highlightedIndex = getNonDisabledIndex(current, offset < 0, items, isItemDisabled, circular);
	if (highlightedIndex === -1) return start >= count ? -1 : start;
	return highlightedIndex;
}
/**
* Returns the next non-disabled highlightedIndex value.
*
* @param {number} start The current highlightedIndex.
* @param {boolean} backwards If true, it will search backwards from the start.
* @param {unknown[]} items The items array.
* @param {(item: unknown, index: number) => boolean} isItemDisabled Function that tells if an item is disabled or not.
* @param {boolean} circular If the search reaches the end, if it can search again starting from the other end.
* @returns {number} The next non-disabled index.
*/
function getNonDisabledIndex(start, backwards, items, isItemDisabled, circular) {
	if (circular === void 0) circular = false;
	var count = items.length;
	if (backwards) {
		for (var index = start; index >= 0; index--) if (!isItemDisabled(items[index], index)) return index;
	} else for (var _index = start; _index < count; _index++) if (!isItemDisabled(items[_index], _index)) return _index;
	if (circular) return getNonDisabledIndex(backwards ? count - 1 : 0, backwards, items, isItemDisabled);
	return -1;
}
/**
* Checks if event target is within the downshift elements.
*
* @param {EventTarget} target Target to check.
* @param {HTMLElement[]} downshiftElements The elements that form downshift (list, toggle button etc).
* @param {Window} environment The window context where downshift renders.
* @param {boolean} checkActiveElement Whether to also check activeElement.
*
* @returns {boolean} Whether or not the target is within downshift elements.
*/
function targetWithinDownshift(target, downshiftElements, environment, checkActiveElement) {
	if (checkActiveElement === void 0) checkActiveElement = true;
	return environment && downshiftElements.some(function(contextNode) {
		return contextNode && (isOrContainsNode(contextNode, target, environment) || checkActiveElement && isOrContainsNode(contextNode, environment.document.activeElement, environment));
	});
}
var _excluded$4 = ["refKey", "ref"], _excluded2$4 = [
	"onClick",
	"onPress",
	"onKeyDown",
	"onKeyUp",
	"onBlur"
], _excluded3$3 = [
	"onKeyDown",
	"onBlur",
	"onChange",
	"onInput",
	"onChangeText"
], _excluded4$2 = ["refKey", "ref"], _excluded5 = [
	"onMouseMove",
	"onMouseDown",
	"onClick",
	"onPress",
	"index",
	"item"
];
var Downshift = /* @__PURE__ */ function() {
	var Downshift = /* @__PURE__ */ function(_Component) {
		function Downshift(_props) {
			var _this = _Component.call(this, _props) || this;
			_this.id = _this.props.id || "downshift-" + generateId();
			_this.menuId = _this.props.menuId || _this.id + "-menu";
			_this.labelId = _this.props.labelId || _this.id + "-label";
			_this.inputId = _this.props.inputId || _this.id + "-input";
			_this.getItemId = _this.props.getItemId || function(index) {
				return _this.id + "-item-" + index;
			};
			_this.items = [];
			_this.itemCount = null;
			_this.previousResultCount = 0;
			_this.timeoutIds = [];
			/**
			* @param {Function} fn the function to call after the time
			* @param {Number} time the time to wait
			*/
			_this.internalSetTimeout = function(fn, time) {
				var id = setTimeout(function() {
					_this.timeoutIds = _this.timeoutIds.filter(function(i) {
						return i !== id;
					});
					fn();
				}, time);
				_this.timeoutIds.push(id);
			};
			_this.setItemCount = function(count) {
				_this.itemCount = count;
			};
			_this.unsetItemCount = function() {
				_this.itemCount = null;
			};
			_this.isItemDisabled = function(_item, index) {
				var currentElementNode = _this.getItemNodeFromIndex(index);
				return currentElementNode && currentElementNode.hasAttribute("disabled");
			};
			_this.setHighlightedIndex = function(highlightedIndex, otherStateToSet) {
				if (highlightedIndex === void 0) highlightedIndex = _this.props.defaultHighlightedIndex;
				if (otherStateToSet === void 0) otherStateToSet = {};
				otherStateToSet = pickState(otherStateToSet);
				_this.internalSetState(_extends({ highlightedIndex }, otherStateToSet));
			};
			_this.clearSelection = function(cb) {
				_this.internalSetState({
					selectedItem: null,
					inputValue: "",
					highlightedIndex: _this.props.defaultHighlightedIndex,
					isOpen: _this.props.defaultIsOpen
				}, cb);
			};
			_this.selectItem = function(item, otherStateToSet, cb) {
				otherStateToSet = pickState(otherStateToSet);
				_this.internalSetState(_extends({
					isOpen: _this.props.defaultIsOpen,
					highlightedIndex: _this.props.defaultHighlightedIndex,
					selectedItem: item,
					inputValue: _this.props.itemToString(item)
				}, otherStateToSet), cb);
			};
			_this.selectItemAtIndex = function(itemIndex, otherStateToSet, cb) {
				var item = _this.items[itemIndex];
				if (item == null) return;
				_this.selectItem(item, otherStateToSet, cb);
			};
			_this.selectHighlightedItem = function(otherStateToSet, cb) {
				return _this.selectItemAtIndex(_this.getState().highlightedIndex, otherStateToSet, cb);
			};
			_this.internalSetState = function(stateToSet, cb) {
				var isItemSelected, onChangeArg;
				var onStateChangeArg = {};
				var isStateToSetFunction = typeof stateToSet === "function";
				if (!isStateToSetFunction && stateToSet.hasOwnProperty("inputValue")) _this.props.onInputValueChange(stateToSet.inputValue, _extends({}, _this.getStateAndHelpers(), stateToSet));
				return _this.setState(function(state) {
					var _newStateToSet;
					state = _this.getState(state);
					var newStateToSet = isStateToSetFunction ? stateToSet(state) : stateToSet;
					newStateToSet = _this.props.stateReducer(state, newStateToSet);
					isItemSelected = newStateToSet.hasOwnProperty("selectedItem");
					var nextState = {};
					if (isItemSelected && newStateToSet.selectedItem !== state.selectedItem) onChangeArg = newStateToSet.selectedItem;
					(_newStateToSet = newStateToSet).type || (_newStateToSet.type = unknown);
					Object.keys(newStateToSet).forEach(function(key) {
						if (state[key] !== newStateToSet[key]) onStateChangeArg[key] = newStateToSet[key];
						if (key === "type") return;
						newStateToSet[key];
						if (!isControlledProp(_this.props, key)) nextState[key] = newStateToSet[key];
					});
					if (isStateToSetFunction && newStateToSet.hasOwnProperty("inputValue")) _this.props.onInputValueChange(newStateToSet.inputValue, _extends({}, _this.getStateAndHelpers(), newStateToSet));
					return nextState;
				}, function() {
					cbToCb(cb)();
					if (Object.keys(onStateChangeArg).length > 1) _this.props.onStateChange(onStateChangeArg, _this.getStateAndHelpers());
					if (isItemSelected) _this.props.onSelect(stateToSet.selectedItem, _this.getStateAndHelpers());
					if (onChangeArg !== void 0) _this.props.onChange(onChangeArg, _this.getStateAndHelpers());
					_this.props.onUserAction(onStateChangeArg, _this.getStateAndHelpers());
				});
			};
			_this.rootRef = function(node) {
				return _this._rootNode = node;
			};
			_this.getRootProps = function(_temp, _temp2) {
				var _extends2;
				var _ref = _temp === void 0 ? {} : _temp, _ref$refKey = _ref.refKey, refKey = _ref$refKey === void 0 ? "ref" : _ref$refKey, ref = _ref.ref, rest = _objectWithoutPropertiesLoose$1(_ref, _excluded$4);
				var _ref2$suppressRefErro = (_temp2 === void 0 ? {} : _temp2).suppressRefError, suppressRefError = _ref2$suppressRefErro === void 0 ? false : _ref2$suppressRefErro;
				_this.getRootProps.called = true;
				_this.getRootProps.refKey = refKey;
				_this.getRootProps.suppressRefError = suppressRefError;
				var isOpen = _this.getState().isOpen;
				return _extends((_extends2 = {}, _extends2[refKey] = handleRefs(ref, _this.rootRef), _extends2.role = "combobox", _extends2["aria-expanded"] = isOpen, _extends2["aria-haspopup"] = "listbox", _extends2["aria-owns"] = isOpen ? _this.menuId : void 0, _extends2["aria-labelledby"] = _this.labelId, _extends2), rest);
			};
			_this.keyDownHandlers = {
				ArrowDown: function ArrowDown(event) {
					var _this2 = this;
					event.preventDefault();
					if (this.getState().isOpen) {
						var amount = event.shiftKey ? 5 : 1;
						this.moveHighlightedIndex(amount, { type: keyDownArrowDown });
					} else this.internalSetState({
						isOpen: true,
						type: keyDownArrowDown
					}, function() {
						var itemCount = _this2.getItemCount();
						if (itemCount > 0) {
							var highlightedIndex = _this2.getState().highlightedIndex;
							var nextHighlightedIndex = getHighlightedIndex(highlightedIndex, 1, { length: itemCount }, _this2.isItemDisabled, true);
							_this2.setHighlightedIndex(nextHighlightedIndex, { type: keyDownArrowDown });
						}
					});
				},
				ArrowUp: function ArrowUp(event) {
					var _this3 = this;
					event.preventDefault();
					if (this.getState().isOpen) {
						var amount = event.shiftKey ? -5 : -1;
						this.moveHighlightedIndex(amount, { type: keyDownArrowUp });
					} else this.internalSetState({
						isOpen: true,
						type: keyDownArrowUp
					}, function() {
						var itemCount = _this3.getItemCount();
						if (itemCount > 0) {
							var highlightedIndex = _this3.getState().highlightedIndex;
							var nextHighlightedIndex = getHighlightedIndex(highlightedIndex, -1, { length: itemCount }, _this3.isItemDisabled, true);
							_this3.setHighlightedIndex(nextHighlightedIndex, { type: keyDownArrowUp });
						}
					});
				},
				Enter: function Enter(event) {
					if (event.which === 229) return;
					var _this$getState2 = this.getState(), isOpen = _this$getState2.isOpen, highlightedIndex = _this$getState2.highlightedIndex;
					if (isOpen && highlightedIndex != null) {
						event.preventDefault();
						var item = this.items[highlightedIndex];
						var itemNode = this.getItemNodeFromIndex(highlightedIndex);
						if (item == null || itemNode && itemNode.hasAttribute("disabled")) return;
						this.selectHighlightedItem({ type: keyDownEnter });
					}
				},
				Escape: function Escape(event) {
					event.preventDefault();
					this.reset(_extends({ type: keyDownEscape }, !this.state.isOpen && {
						selectedItem: null,
						inputValue: ""
					}));
				}
			};
			_this.buttonKeyDownHandlers = _extends({}, _this.keyDownHandlers, { " ": function _(event) {
				event.preventDefault();
				this.toggleMenu({ type: keyDownSpaceButton });
			} });
			_this.inputKeyDownHandlers = _extends({}, _this.keyDownHandlers, {
				Home: function Home(event) {
					var isOpen = this.getState().isOpen;
					if (!isOpen) return;
					event.preventDefault();
					var itemCount = this.getItemCount();
					if (itemCount <= 0 || !isOpen) return;
					var newHighlightedIndex = getNonDisabledIndex(0, false, { length: itemCount }, this.isItemDisabled);
					this.setHighlightedIndex(newHighlightedIndex, { type: keyDownHome });
				},
				End: function End(event) {
					var isOpen = this.getState().isOpen;
					if (!isOpen) return;
					event.preventDefault();
					var itemCount = this.getItemCount();
					if (itemCount <= 0 || !isOpen) return;
					var newHighlightedIndex = getNonDisabledIndex(itemCount - 1, true, { length: itemCount }, this.isItemDisabled);
					this.setHighlightedIndex(newHighlightedIndex, { type: keyDownEnd });
				}
			});
			_this.getToggleButtonProps = function(_temp3) {
				var _ref3 = _temp3 === void 0 ? {} : _temp3, onClick = _ref3.onClick;
				_ref3.onPress;
				var onKeyDown = _ref3.onKeyDown, onKeyUp = _ref3.onKeyUp, onBlur = _ref3.onBlur, rest = _objectWithoutPropertiesLoose$1(_ref3, _excluded2$4);
				var isOpen = _this.getState().isOpen;
				var enabledEventHandlers = {
					onClick: callAllEventHandlers(onClick, _this.buttonHandleClick),
					onKeyDown: callAllEventHandlers(onKeyDown, _this.buttonHandleKeyDown),
					onKeyUp: callAllEventHandlers(onKeyUp, _this.buttonHandleKeyUp),
					onBlur: callAllEventHandlers(onBlur, _this.buttonHandleBlur)
				};
				var eventHandlers = rest.disabled ? {} : enabledEventHandlers;
				return _extends({
					type: "button",
					role: "button",
					"aria-label": isOpen ? "close menu" : "open menu",
					"aria-haspopup": true,
					"data-toggle": true
				}, eventHandlers, rest);
			};
			_this.buttonHandleKeyUp = function(event) {
				event.preventDefault();
			};
			_this.buttonHandleKeyDown = function(event) {
				var key = normalizeArrowKey(event);
				if (_this.buttonKeyDownHandlers[key]) _this.buttonKeyDownHandlers[key].call(_this, event);
			};
			_this.buttonHandleClick = function(event) {
				event.preventDefault();
				/* istanbul ignore if (can't reasonably test this) */
				if (_this.props.environment) {
					var _this$props$environme = _this.props.environment.document, body = _this$props$environme.body, activeElement = _this$props$environme.activeElement;
					if (body && body === activeElement) event.target.focus();
				}
				_this.internalSetTimeout(function() {
					return _this.toggleMenu({ type: clickButton });
				});
			};
			_this.buttonHandleBlur = function(event) {
				var blurTarget = event.target;
				_this.internalSetTimeout(function() {
					if (_this.isMouseDown || !_this.props.environment) return;
					var activeElement = _this.props.environment.document.activeElement;
					if ((activeElement == null || activeElement.id !== _this.inputId) && activeElement !== blurTarget) _this.reset({ type: blurButton });
				});
			};
			_this.getLabelProps = function(props) {
				return _extends({
					htmlFor: _this.inputId,
					id: _this.labelId
				}, props);
			};
			_this.getInputProps = function(_temp4) {
				var _ref4 = _temp4 === void 0 ? {} : _temp4, onKeyDown = _ref4.onKeyDown, onBlur = _ref4.onBlur, onChange = _ref4.onChange, onInput = _ref4.onInput;
				_ref4.onChangeText;
				var rest = _objectWithoutPropertiesLoose$1(_ref4, _excluded3$3);
				var onChangeKey;
				var eventHandlers = {};
				onChangeKey = "onChange";
				var _this$getState6 = _this.getState(), inputValue = _this$getState6.inputValue, isOpen = _this$getState6.isOpen, highlightedIndex = _this$getState6.highlightedIndex;
				if (!rest.disabled) {
					var _eventHandlers;
					eventHandlers = (_eventHandlers = {}, _eventHandlers[onChangeKey] = callAllEventHandlers(onChange, onInput, _this.inputHandleChange), _eventHandlers.onKeyDown = callAllEventHandlers(onKeyDown, _this.inputHandleKeyDown), _eventHandlers.onBlur = callAllEventHandlers(onBlur, _this.inputHandleBlur), _eventHandlers);
				}
				return _extends({
					"aria-autocomplete": "list",
					"aria-activedescendant": isOpen && typeof highlightedIndex === "number" && highlightedIndex >= 0 ? _this.getItemId(highlightedIndex) : void 0,
					"aria-controls": isOpen ? _this.menuId : void 0,
					"aria-labelledby": rest && rest["aria-label"] ? void 0 : _this.labelId,
					autoComplete: "off",
					value: inputValue,
					id: _this.inputId
				}, eventHandlers, rest);
			};
			_this.inputHandleKeyDown = function(event) {
				var key = normalizeArrowKey(event);
				if (key && _this.inputKeyDownHandlers[key]) _this.inputKeyDownHandlers[key].call(_this, event);
			};
			_this.inputHandleChange = function(event) {
				_this.internalSetState({
					type: changeInput,
					isOpen: true,
					inputValue: event.target.value,
					highlightedIndex: _this.props.defaultHighlightedIndex
				});
			};
			_this.inputHandleBlur = function() {
				_this.internalSetTimeout(function() {
					var _activeElement$datase;
					if (_this.isMouseDown || !_this.props.environment) return;
					var activeElement = _this.props.environment.document.activeElement;
					if (!((activeElement == null || (_activeElement$datase = activeElement.dataset) == null ? void 0 : _activeElement$datase.toggle) && _this._rootNode && _this._rootNode.contains(activeElement))) _this.reset({ type: blurInput });
				});
			};
			_this.menuRef = function(node) {
				_this._menuNode = node;
			};
			_this.getMenuProps = function(_temp5, _temp6) {
				var _extends3;
				var _ref5 = _temp5 === void 0 ? {} : _temp5, _ref5$refKey = _ref5.refKey, refKey = _ref5$refKey === void 0 ? "ref" : _ref5$refKey, ref = _ref5.ref, props = _objectWithoutPropertiesLoose$1(_ref5, _excluded4$2);
				var _ref6$suppressRefErro = (_temp6 === void 0 ? {} : _temp6).suppressRefError, suppressRefError = _ref6$suppressRefErro === void 0 ? false : _ref6$suppressRefErro;
				_this.getMenuProps.called = true;
				_this.getMenuProps.refKey = refKey;
				_this.getMenuProps.suppressRefError = suppressRefError;
				return _extends((_extends3 = {}, _extends3[refKey] = handleRefs(ref, _this.menuRef), _extends3.role = "listbox", _extends3["aria-labelledby"] = props && props["aria-label"] ? void 0 : _this.labelId, _extends3.id = _this.menuId, _extends3), props);
			};
			_this.getItemProps = function(_temp7) {
				var _enabledEventHandlers;
				var _ref7 = _temp7 === void 0 ? {} : _temp7, onMouseMove = _ref7.onMouseMove, onMouseDown = _ref7.onMouseDown, onClick = _ref7.onClick;
				_ref7.onPress;
				var index = _ref7.index, _ref7$item = _ref7.item, item = _ref7$item === void 0 ? void 0 : _ref7$item, rest = _objectWithoutPropertiesLoose$1(_ref7, _excluded5);
				if (index === void 0) {
					_this.items.push(item);
					index = _this.items.indexOf(item);
				} else _this.items[index] = item;
				var onSelectKey = "onClick";
				var customClickHandler = onClick;
				var enabledEventHandlers = (_enabledEventHandlers = {
					onMouseMove: callAllEventHandlers(onMouseMove, function() {
						if (index === _this.getState().highlightedIndex) return;
						_this.setHighlightedIndex(index, { type: itemMouseEnter });
						_this.avoidScrolling = true;
						_this.internalSetTimeout(function() {
							return _this.avoidScrolling = false;
						}, 250);
					}),
					onMouseDown: callAllEventHandlers(onMouseDown, function(event) {
						event.preventDefault();
					})
				}, _enabledEventHandlers[onSelectKey] = callAllEventHandlers(customClickHandler, function() {
					_this.selectItemAtIndex(index, { type: clickItem });
				}), _enabledEventHandlers);
				var eventHandlers = rest.disabled ? { onMouseDown: enabledEventHandlers.onMouseDown } : enabledEventHandlers;
				return _extends({
					id: _this.getItemId(index),
					role: "option",
					"aria-selected": _this.getState().highlightedIndex === index
				}, eventHandlers, rest);
			};
			_this.clearItems = function() {
				_this.items = [];
			};
			_this.reset = function(otherStateToSet, cb) {
				if (otherStateToSet === void 0) otherStateToSet = {};
				otherStateToSet = pickState(otherStateToSet);
				_this.internalSetState(function(_ref8) {
					var selectedItem = _ref8.selectedItem;
					return _extends({
						isOpen: _this.props.defaultIsOpen,
						highlightedIndex: _this.props.defaultHighlightedIndex,
						inputValue: _this.props.itemToString(selectedItem)
					}, otherStateToSet);
				}, cb);
			};
			_this.toggleMenu = function(otherStateToSet, cb) {
				if (otherStateToSet === void 0) otherStateToSet = {};
				otherStateToSet = pickState(otherStateToSet);
				_this.internalSetState(function(_ref9) {
					var isOpen = _ref9.isOpen;
					return _extends({ isOpen: !isOpen }, isOpen && { highlightedIndex: _this.props.defaultHighlightedIndex }, otherStateToSet);
				}, function() {
					var _this$getState7 = _this.getState(), isOpen = _this$getState7.isOpen, highlightedIndex = _this$getState7.highlightedIndex;
					if (isOpen) {
						if (_this.getItemCount() > 0 && typeof highlightedIndex === "number") _this.setHighlightedIndex(highlightedIndex, otherStateToSet);
					}
					cbToCb(cb)();
				});
			};
			_this.openMenu = function(cb) {
				_this.internalSetState({ isOpen: true }, cb);
			};
			_this.closeMenu = function(cb) {
				_this.internalSetState({ isOpen: false }, cb);
			};
			_this.updateStatus = debounce(function() {
				var _this$props;
				if (!((_this$props = _this.props) != null && (_this$props = _this$props.environment) != null && _this$props.document)) return;
				var state = _this.getState();
				var item = _this.items[state.highlightedIndex];
				var resultCount = _this.getItemCount();
				var status = _this.props.getA11yStatusMessage(_extends({
					itemToString: _this.props.itemToString,
					previousResultCount: _this.previousResultCount,
					resultCount,
					highlightedItem: item
				}, state));
				_this.previousResultCount = resultCount;
				setStatus(status, _this.props.environment.document);
			}, 200);
			var _this$props2 = _this.props, defaultHighlightedIndex = _this$props2.defaultHighlightedIndex, _this$props2$initialH = _this$props2.initialHighlightedIndex, _highlightedIndex = _this$props2$initialH === void 0 ? defaultHighlightedIndex : _this$props2$initialH, defaultIsOpen = _this$props2.defaultIsOpen, _this$props2$initialI = _this$props2.initialIsOpen, _isOpen = _this$props2$initialI === void 0 ? defaultIsOpen : _this$props2$initialI, _this$props2$initialI2 = _this$props2.initialInputValue, _inputValue = _this$props2$initialI2 === void 0 ? "" : _this$props2$initialI2, _this$props2$initialS = _this$props2.initialSelectedItem, _selectedItem = _this$props2$initialS === void 0 ? null : _this$props2$initialS;
			var _state = _this.getState({
				highlightedIndex: _highlightedIndex,
				isOpen: _isOpen,
				inputValue: _inputValue,
				selectedItem: _selectedItem
			});
			if (_state.selectedItem != null && _this.props.initialInputValue === void 0) _state.inputValue = _this.props.itemToString(_state.selectedItem);
			_this.state = _state;
			return _this;
		}
		_inheritsLoose(Downshift, _Component);
		var _proto = Downshift.prototype;
		/**
		* Clear all running timeouts
		*/
		_proto.internalClearTimeouts = function internalClearTimeouts() {
			this.timeoutIds.forEach(function(id) {
				clearTimeout(id);
			});
			this.timeoutIds = [];
		};
		_proto.getState = function getState$1(stateToMerge) {
			if (stateToMerge === void 0) stateToMerge = this.state;
			return getState(stateToMerge, this.props);
		};
		_proto.getItemCount = function getItemCount() {
			var itemCount = this.items.length;
			if (this.itemCount != null) itemCount = this.itemCount;
			else if (this.props.itemCount !== void 0) itemCount = this.props.itemCount;
			return itemCount;
		};
		_proto.getItemNodeFromIndex = function getItemNodeFromIndex(index) {
			return this.props.environment ? this.props.environment.document.getElementById(this.getItemId(index)) : null;
		};
		_proto.scrollHighlightedItemIntoView = function scrollHighlightedItemIntoView() {
			var node = this.getItemNodeFromIndex(this.getState().highlightedIndex);
			this.props.scrollIntoView(node, this._menuNode);
		};
		_proto.moveHighlightedIndex = function moveHighlightedIndex(amount, otherStateToSet) {
			var itemCount = this.getItemCount();
			var highlightedIndex = this.getState().highlightedIndex;
			if (itemCount > 0) {
				var nextHighlightedIndex = getHighlightedIndex(highlightedIndex, amount, { length: itemCount }, this.isItemDisabled, true);
				this.setHighlightedIndex(nextHighlightedIndex, otherStateToSet);
			}
		};
		_proto.getStateAndHelpers = function getStateAndHelpers() {
			var _this$getState9 = this.getState(), highlightedIndex = _this$getState9.highlightedIndex, inputValue = _this$getState9.inputValue, selectedItem = _this$getState9.selectedItem, isOpen = _this$getState9.isOpen;
			var itemToString = this.props.itemToString;
			var id = this.id;
			var getRootProps = this.getRootProps, getToggleButtonProps = this.getToggleButtonProps, getLabelProps = this.getLabelProps, getMenuProps = this.getMenuProps, getInputProps = this.getInputProps, getItemProps = this.getItemProps, openMenu = this.openMenu, closeMenu = this.closeMenu, toggleMenu = this.toggleMenu, selectItem = this.selectItem, selectItemAtIndex = this.selectItemAtIndex, selectHighlightedItem = this.selectHighlightedItem, setHighlightedIndex = this.setHighlightedIndex, clearSelection = this.clearSelection, clearItems = this.clearItems;
			return {
				getRootProps,
				getToggleButtonProps,
				getLabelProps,
				getMenuProps,
				getInputProps,
				getItemProps,
				reset: this.reset,
				openMenu,
				closeMenu,
				toggleMenu,
				selectItem,
				selectItemAtIndex,
				selectHighlightedItem,
				setHighlightedIndex,
				clearSelection,
				clearItems,
				setItemCount: this.setItemCount,
				unsetItemCount: this.unsetItemCount,
				setState: this.internalSetState,
				itemToString,
				id,
				highlightedIndex,
				inputValue,
				isOpen,
				selectedItem
			};
		};
		_proto.componentDidMount = function componentDidMount() {
			var _this4 = this;
			/* istanbul ignore if (react-native or SSR) */
			if (!this.props.environment) this.cleanup = function() {
				_this4.internalClearTimeouts();
			};
			else {
				var onMouseDown = function onMouseDown() {
					_this4.isMouseDown = true;
				};
				var onMouseUp = function onMouseUp(event) {
					_this4.isMouseDown = false;
					if (!targetWithinDownshift(event.target, [_this4._rootNode, _this4._menuNode], _this4.props.environment) && _this4.getState().isOpen) _this4.reset({ type: mouseUp }, function() {
						return _this4.props.onOuterClick(_this4.getStateAndHelpers());
					});
				};
				var onTouchStart = function onTouchStart() {
					_this4.isTouchMove = false;
				};
				var onTouchMove = function onTouchMove() {
					_this4.isTouchMove = true;
				};
				var onTouchEnd = function onTouchEnd(event) {
					var contextWithinDownshift = targetWithinDownshift(event.target, [_this4._rootNode, _this4._menuNode], _this4.props.environment, false);
					if (!_this4.isTouchMove && !contextWithinDownshift && _this4.getState().isOpen) _this4.reset({ type: touchEnd }, function() {
						return _this4.props.onOuterClick(_this4.getStateAndHelpers());
					});
				};
				var environment = this.props.environment;
				environment.addEventListener("mousedown", onMouseDown);
				environment.addEventListener("mouseup", onMouseUp);
				environment.addEventListener("touchstart", onTouchStart);
				environment.addEventListener("touchmove", onTouchMove);
				environment.addEventListener("touchend", onTouchEnd);
				this.cleanup = function() {
					_this4.internalClearTimeouts();
					_this4.updateStatus.cancel();
					environment.removeEventListener("mousedown", onMouseDown);
					environment.removeEventListener("mouseup", onMouseUp);
					environment.removeEventListener("touchstart", onTouchStart);
					environment.removeEventListener("touchmove", onTouchMove);
					environment.removeEventListener("touchend", onTouchEnd);
				};
			}
		};
		_proto.shouldScroll = function shouldScroll(prevState, prevProps) {
			var currentHighlightedIndex = (this.props.highlightedIndex === void 0 ? this.getState() : this.props).highlightedIndex;
			var prevHighlightedIndex = (prevProps.highlightedIndex === void 0 ? prevState : prevProps).highlightedIndex;
			return currentHighlightedIndex && this.getState().isOpen && !prevState.isOpen || currentHighlightedIndex !== prevHighlightedIndex;
		};
		_proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {
			if (isControlledProp(this.props, "selectedItem") && this.props.selectedItemChanged(prevProps.selectedItem, this.props.selectedItem)) this.internalSetState({
				type: controlledPropUpdatedSelectedItem,
				inputValue: this.props.itemToString(this.props.selectedItem)
			});
			if (!this.avoidScrolling && this.shouldScroll(prevState, prevProps)) this.scrollHighlightedItemIntoView();
			this.updateStatus();
		};
		_proto.componentWillUnmount = function componentWillUnmount() {
			this.cleanup();
		};
		_proto.render = function render() {
			var children = unwrapArray(this.props.children, noop);
			this.clearItems();
			this.getRootProps.called = false;
			this.getRootProps.refKey = void 0;
			this.getRootProps.suppressRefError = void 0;
			this.getMenuProps.called = false;
			this.getMenuProps.refKey = void 0;
			this.getMenuProps.suppressRefError = void 0;
			this.getLabelProps.called = false;
			this.getInputProps.called = false;
			var element = unwrapArray(children(this.getStateAndHelpers()));
			if (!element) return null;
			if (this.getRootProps.called || this.props.suppressRefError) return element;
			else if (isDOMElement(element)) return /* @__PURE__ */ (0, import_react.cloneElement)(element, this.getRootProps(getElementProps(element)));
		};
		return Downshift;
	}(import_react.Component);
	Downshift.defaultProps = {
		defaultHighlightedIndex: null,
		defaultIsOpen: false,
		getA11yStatusMessage,
		itemToString: function itemToString(i) {
			if (i == null) return "";
			return String(i);
		},
		onStateChange: noop,
		onInputValueChange: noop,
		onUserAction: noop,
		onChange: noop,
		onSelect: noop,
		onOuterClick: noop,
		selectedItemChanged: function selectedItemChanged(prevItem, item) {
			return prevItem !== item;
		},
		environment: typeof window === "undefined" || false ? void 0 : window,
		stateReducer: function stateReducer(state, stateToSet) {
			return stateToSet;
		},
		suppressRefError: false,
		scrollIntoView
	};
	Downshift.stateChangeTypes = stateChangeTypes$4;
	return Downshift;
}();
function capitalizeString(string) {
	return "" + string.slice(0, 1).toUpperCase() + string.slice(1);
}
function callOnChangeProps(action, props, state, newState) {
	var type = action.type;
	var changes = {};
	var keys = Object.keys(state);
	for (var _i = 0, _keys = keys; _i < _keys.length; _i++) {
		var key = _keys[_i];
		invokeOnChangeHandler(key, action, props, state, newState);
		if (newState[key] !== state[key]) changes[key] = newState[key];
	}
	if (props.onStateChange && Object.keys(changes).length) props.onStateChange(_extends({ type }, changes));
}
function invokeOnChangeHandler(key, action, props, state, newState) {
	if (newState[key] === state[key]) return;
	var handler = props["on" + capitalizeString(key) + "Change"];
	if (typeof handler !== "function") return;
	var type = action.type;
	handler(_extends({ type }, newState));
}
/**
* Computes the controlled state using a the previous state, props,
* two reducers, one from downshift and an optional one from the user.
* Also calls the onChange handlers for state values that have changed.
*
* @param {Function} reducer Reducer function from downshift.
* @param {Object} props The hook props, also passed to createInitialState.
* @param {Function} createInitialState Function that returns the initial state.
* @param {Function} isStateEqual Function that checks if a previous state is equal to the next.
* @returns {Array} An array with the state and an action dispatcher.
*/
function useEnhancedReducer(reducer, props, createInitialState, isStateEqual) {
	var prevStateRef = import_react.useRef(null);
	var actionRef = import_react.useRef(void 0);
	var propsRef = useLatestRef(props);
	var enhancedReducer = import_react.useCallback(function(state, action) {
		actionRef.current = action;
		state = getState(state, propsRef.current);
		var changes = reducer(state, propsRef.current, action);
		var newState = propsRef.current.stateReducer(state, _extends({}, action, { changes }));
		return _extends({}, state, newState);
	}, [propsRef, reducer]);
	var _React$useReducer = import_react.useReducer(enhancedReducer, props, createInitialState), state = _React$useReducer[0], dispatch = _React$useReducer[1];
	var action = actionRef.current;
	import_react.useEffect(function() {
		var _prevStateRef$current;
		var prevState = getState((_prevStateRef$current = prevStateRef.current) != null ? _prevStateRef$current : {}, propsRef.current);
		if (action && prevStateRef.current && !isStateEqual(prevState, state)) callOnChangeProps(action, propsRef.current, prevState, state);
		prevStateRef.current = state;
	}, [
		state,
		action,
		isStateEqual,
		propsRef
	]);
	return [state, dispatch];
}
/**
* Wraps the useEnhancedReducer and applies the controlled prop values before
* returning the new state.
*
* @param {Function} reducer Reducer function from downshift.
* @param {Object} props The hook props, also passed to createInitialState.
* @param {Function} createInitialState Function that returns the initial state.
* @param {Function} isStateEqual Function that checks if a previous state is equal to the next.
* @returns {Array} An array with the state and an action dispatcher.
*/
function useControlledReducer$1(reducer, props, createInitialState, isStateEqual) {
	var _useEnhancedReducer = useEnhancedReducer(reducer, props, createInitialState, isStateEqual), state = _useEnhancedReducer[0], dispatch = _useEnhancedReducer[1];
	return [getState(state, props), dispatch];
}
/**
* Returns both the item and index when both or either is passed.
*
* @param itemProp The item which could be undefined.
* @param indexProp The index which could be undefined.
* @param items The array of items to get the item based on index.
* @param errorMessage The error to be thrown if index and item could not be returned for any reason.
* @returns An array with item and index.
*/
function getItemAndIndex(itemProp, indexProp, items, errorMessage) {
	if (itemProp !== void 0 && indexProp !== void 0) return [itemProp, indexProp];
	if (itemProp !== void 0) {
		if (items.indexOf(itemProp) < 0) throw new Error(errorMessage);
		return [itemProp, items.indexOf(itemProp)];
	}
	if (indexProp !== void 0) {
		var item = items[indexProp];
		if (item === void 0) throw new Error(errorMessage);
		return [item, indexProp];
	}
	throw new Error(errorMessage);
}
/**
* Tracks if it's the first render.
*/
function useIsInitialMount() {
	var isInitialMountRef = import_react.useRef(true);
	import_react.useEffect(function() {
		isInitialMountRef.current = false;
		return function() {
			isInitialMountRef.current = true;
		};
	}, []);
	return isInitialMountRef.current;
}
/**
* Default state reducer that returns the changes.
*
*/
function stateReducer(_s, a) {
	return a.changes;
}
var propTypes$5 = {
	environment: import_prop_types.default.shape({
		addEventListener: import_prop_types.default.func.isRequired,
		removeEventListener: import_prop_types.default.func.isRequired,
		document: import_prop_types.default.shape({
			createElement: import_prop_types.default.func.isRequired,
			getElementById: import_prop_types.default.func.isRequired,
			activeElement: import_prop_types.default.any.isRequired,
			body: import_prop_types.default.any.isRequired
		}).isRequired,
		Node: import_prop_types.default.func.isRequired
	}),
	itemToKey: import_prop_types.default.func,
	stateReducer: import_prop_types.default.func
};
function getDefaultValue$1(props, propKey, defaultStateValues) {
	var defaultValue = props["default" + capitalizeString(propKey)];
	if (defaultValue !== void 0) return defaultValue;
	return defaultStateValues[propKey];
}
function getInitialValue$1(props, propKey, defaultStateValues) {
	var value = props[propKey];
	if (value !== void 0) return value;
	var initialValue = props["initial" + capitalizeString(propKey)];
	if (initialValue !== void 0) return initialValue;
	return getDefaultValue$1(props, propKey, defaultStateValues);
}
/**
* Debounced call for updating the a11y message.
*/
var updateA11yStatus = debounce$1(function(status, document) {
	setStatus(status, document);
}, 200);
/**
* Adds an a11y aria live status message if getA11yStatusMessage is passed.
* @param getA11yStatusMessage The function that builds the status message.
* @param options The options to be passed to getA11yStatusMessage if called.
* @param dependencyArray The dependency array that triggers the status message setter via useEffect.
* @param environment The environment object containing the document.
*/
function useA11yMessageStatus(getA11yStatusMessage, options, dependencyArray, environment) {
	var document = environment == null ? void 0 : environment.document;
	var isInitialMount = useIsInitialMount();
	import_react.useEffect(function() {
		if (!getA11yStatusMessage || isInitialMount || !document) return;
		updateA11yStatus(getA11yStatusMessage(options), document);
	}, dependencyArray);
	import_react.useEffect(function() {
		return function() {
			updateA11yStatus.cancel();
			cleanupStatusDiv(document);
		};
	}, [document]);
}
var propTypes$4 = _extends({}, propTypes$5, {
	getA11yStatusMessage: import_prop_types.default.func,
	highlightedIndex: import_prop_types.default.number,
	defaultHighlightedIndex: import_prop_types.default.number,
	initialHighlightedIndex: import_prop_types.default.number,
	isOpen: import_prop_types.default.bool,
	defaultIsOpen: import_prop_types.default.bool,
	initialIsOpen: import_prop_types.default.bool,
	selectedItem: import_prop_types.default.any,
	initialSelectedItem: import_prop_types.default.any,
	defaultSelectedItem: import_prop_types.default.any,
	id: import_prop_types.default.string,
	labelId: import_prop_types.default.string,
	menuId: import_prop_types.default.string,
	getItemId: import_prop_types.default.func,
	toggleButtonId: import_prop_types.default.string,
	onSelectedItemChange: import_prop_types.default.func,
	onHighlightedIndexChange: import_prop_types.default.func,
	onStateChange: import_prop_types.default.func,
	onIsOpenChange: import_prop_types.default.func,
	scrollIntoView: import_prop_types.default.func
});
var defaultProps$3 = {
	itemToString: function itemToString(item) {
		return item ? String(item) : "";
	},
	itemToKey: function itemToKey(item) {
		return item;
	},
	stateReducer,
	scrollIntoView,
	environment: typeof window === "undefined" || false ? void 0 : window
};
var defaultStateValues$1 = {
	highlightedIndex: -1,
	isOpen: false,
	selectedItem: null,
	inputValue: ""
};
// istanbul ignore next
var useIsomorphicLayoutEffect = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined" ? import_react.useLayoutEffect : import_react.useEffect;
function isAcceptedCharacterKey(key) {
	return /^\S{1}$/.test(key);
}
function getInitialState$3(props) {
	var selectedItem = getInitialValue$1(props, "selectedItem", defaultStateValues$1);
	var isOpen = getInitialValue$1(props, "isOpen", defaultStateValues$1);
	var highlightedIndex = getInitialHighlightedIndex(props);
	var inputValue = getInitialValue$1(props, "inputValue", defaultStateValues$1);
	return {
		highlightedIndex: highlightedIndex < 0 && selectedItem && isOpen ? props.items.findIndex(function(item) {
			return props.itemToKey(item) === props.itemToKey(selectedItem);
		}) : highlightedIndex,
		isOpen,
		selectedItem,
		inputValue
	};
}
function getHighlightedIndexOnOpen(props, state, offset) {
	var items = props.items, initialHighlightedIndex = props.initialHighlightedIndex, defaultHighlightedIndex = props.defaultHighlightedIndex, isItemDisabled = props.isItemDisabled, itemToKey = props.itemToKey;
	var selectedItem = state.selectedItem, highlightedIndex = state.highlightedIndex;
	if (items.length === 0) return -1;
	if (initialHighlightedIndex !== void 0 && highlightedIndex === initialHighlightedIndex && !isItemDisabled(items[initialHighlightedIndex], initialHighlightedIndex)) return initialHighlightedIndex;
	if (defaultHighlightedIndex !== void 0 && !isItemDisabled(items[defaultHighlightedIndex], defaultHighlightedIndex)) return defaultHighlightedIndex;
	if (selectedItem) return items.findIndex(function(item) {
		return itemToKey(selectedItem) === itemToKey(item);
	});
	if (offset < 0 && !isItemDisabled(items[items.length - 1], items.length - 1)) return items.length - 1;
	if (offset > 0 && !isItemDisabled(items[0], 0)) return 0;
	return -1;
}
/**
* Tracks mouse and touch events, such as mouseDown, touchMove and touchEnd.
*
* @param {Window} environment The environment to add the event listeners to, for instance window.
* @param {() => void} handleBlur The function that is called if mouseDown or touchEnd occured outside the downshiftElements.
* @param {Array<{current: HTMLElement}>} downshiftElementsRefs The refs for the elements that should not trigger a blur action from mouseDown or touchEnd.
* @returns {{isMouseDown: boolean, isTouchMove: boolean, isTouchEnd: boolean}} The mouse and touch events information, if any of are happening.
*/
function useMouseAndTouchTracker(environment, handleBlur, downshiftRefs) {
	var mouseAndTouchTrackersRef = import_react.useRef({
		isMouseDown: false,
		isTouchMove: false,
		isTouchEnd: false
	});
	var getDownshiftElements = import_react.useCallback(function() {
		return downshiftRefs.map(function(ref) {
			return ref.current;
		});
	}, [downshiftRefs]);
	import_react.useEffect(function() {
		if (!environment) return noop;
		function onMouseDown() {
			mouseAndTouchTrackersRef.current.isTouchEnd = false;
			mouseAndTouchTrackersRef.current.isMouseDown = true;
		}
		function onMouseUp(event) {
			mouseAndTouchTrackersRef.current.isMouseDown = false;
			if (!targetWithinDownshift(event.target, getDownshiftElements(), environment)) handleBlur();
		}
		function onTouchStart() {
			mouseAndTouchTrackersRef.current.isTouchEnd = false;
			mouseAndTouchTrackersRef.current.isTouchMove = false;
		}
		function onTouchMove() {
			mouseAndTouchTrackersRef.current.isTouchMove = true;
		}
		function onTouchEnd(event) {
			mouseAndTouchTrackersRef.current.isTouchEnd = true;
			if (!mouseAndTouchTrackersRef.current.isTouchMove && !targetWithinDownshift(event.target, getDownshiftElements(), environment, false)) handleBlur();
		}
		environment.addEventListener("mousedown", onMouseDown);
		environment.addEventListener("mouseup", onMouseUp);
		environment.addEventListener("touchstart", onTouchStart);
		environment.addEventListener("touchmove", onTouchMove);
		environment.addEventListener("touchend", onTouchEnd);
		return function cleanup() {
			environment.removeEventListener("mousedown", onMouseDown);
			environment.removeEventListener("mouseup", onMouseUp);
			environment.removeEventListener("touchstart", onTouchStart);
			environment.removeEventListener("touchmove", onTouchMove);
			environment.removeEventListener("touchend", onTouchEnd);
		};
	}, [
		environment,
		getDownshiftElements,
		handleBlur
	]);
	return mouseAndTouchTrackersRef.current;
}
/* istanbul ignore next */
var useGetterPropsCalledChecker = function useGetterPropsCalledChecker() {
	return noop;
};
function useScrollIntoView(_ref) {
	var highlightedIndex = _ref.highlightedIndex, isOpen = _ref.isOpen, itemRefs = _ref.itemRefs, getItemNodeFromIndex = _ref.getItemNodeFromIndex, menuElement = _ref.menuElement, scrollIntoViewProp = _ref.scrollIntoView;
	var shouldScrollRef = import_react.useRef(true);
	useIsomorphicLayoutEffect(function() {
		if (highlightedIndex < 0 || !isOpen || !Object.keys(itemRefs.current).length) return;
		if (shouldScrollRef.current === false) shouldScrollRef.current = true;
		else scrollIntoViewProp(getItemNodeFromIndex(highlightedIndex), menuElement);
	}, [highlightedIndex]);
	return shouldScrollRef;
}
var useControlPropsValidator = noop;
/**
* Handles selection on Enter / Alt + ArrowUp. Closes the menu and resets the highlighted index, unless there is a highlighted.
* In that case, selects the item and resets to defaults for open state and highlighted idex.
* @param {Object} props The useCombobox props.
* @param {number} highlightedIndex The index from the state.
* @param {boolean} inputValue Also return the input value for state.
* @returns The changes for the state.
*/
function getChangesOnSelection(props, highlightedIndex, inputValue) {
	var _props$items;
	if (inputValue === void 0) inputValue = true;
	return _extends({
		isOpen: false,
		highlightedIndex: -1
	}, ((_props$items = props.items) == null ? void 0 : _props$items.length) && highlightedIndex >= 0 && _extends({
		selectedItem: props.items[highlightedIndex],
		isOpen: getDefaultValue$1(props, "isOpen", defaultStateValues$1),
		highlightedIndex: getDefaultValue$1(props, "highlightedIndex", defaultStateValues$1)
	}, inputValue && { inputValue: props.itemToString(props.items[highlightedIndex]) }));
}
/**
* Check if a state is equal for dropdowns, by comparing isOpen, inputValue, highlightedIndex and selected item.
* Used by useSelect and useCombobox.
*
* @param {Object} prevState
* @param {Object} newState
* @returns {boolean} Wheather the states are deeply equal.
*/
function isDropdownsStateEqual(prevState, newState) {
	return prevState.isOpen === newState.isOpen && prevState.inputValue === newState.inputValue && prevState.highlightedIndex === newState.highlightedIndex && prevState.selectedItem === newState.selectedItem;
}
/**
* Returns the new highlightedIndex based on the defaultHighlightedIndex prop, if it's not disabled.
*
* @param {Object} props Props from useCombobox or useSelect.
* @returns {number} The highlighted index.
*/
function getDefaultHighlightedIndex(props) {
	var highlightedIndex = getDefaultValue$1(props, "highlightedIndex", defaultStateValues$1);
	if (highlightedIndex > -1 && props.isItemDisabled(props.items[highlightedIndex], highlightedIndex)) return -1;
	return highlightedIndex;
}
/**
* Returns the new highlightedIndex based on the initialHighlightedIndex prop, if not disabled.
*
* @param {Object} props Props from useCombobox or useSelect.
* @returns {number} The highlighted index.
*/
function getInitialHighlightedIndex(props) {
	var highlightedIndex = getInitialValue$1(props, "highlightedIndex", defaultStateValues$1);
	if (highlightedIndex > -1 && props.isItemDisabled(props.items[highlightedIndex], highlightedIndex)) return -1;
	return highlightedIndex;
}
function downshiftCommonReducer(state, props, action, stateChangeTypes) {
	var type = action.type;
	var changes;
	switch (type) {
		case stateChangeTypes.ItemMouseMove:
			changes = { highlightedIndex: action.disabled ? -1 : action.index };
			break;
		case stateChangeTypes.MenuMouseLeave:
			changes = { highlightedIndex: -1 };
			break;
		case stateChangeTypes.ToggleButtonClick:
		case stateChangeTypes.FunctionToggleMenu:
			changes = {
				isOpen: !state.isOpen,
				highlightedIndex: state.isOpen ? -1 : getHighlightedIndexOnOpen(props, state, 0)
			};
			break;
		case stateChangeTypes.FunctionOpenMenu:
			changes = {
				isOpen: true,
				highlightedIndex: getHighlightedIndexOnOpen(props, state, 0)
			};
			break;
		case stateChangeTypes.FunctionCloseMenu:
			changes = { isOpen: false };
			break;
		case stateChangeTypes.FunctionSetHighlightedIndex:
			changes = { highlightedIndex: props.isItemDisabled(props.items[action.highlightedIndex], action.highlightedIndex) ? -1 : action.highlightedIndex };
			break;
		case stateChangeTypes.FunctionSetInputValue:
			changes = { inputValue: action.inputValue };
			break;
		case stateChangeTypes.FunctionReset:
			changes = {
				highlightedIndex: getDefaultHighlightedIndex(props),
				isOpen: getDefaultValue$1(props, "isOpen", defaultStateValues$1),
				selectedItem: getDefaultValue$1(props, "selectedItem", defaultStateValues$1),
				inputValue: getDefaultValue$1(props, "inputValue", defaultStateValues$1)
			};
			break;
		default: throw new Error("Reducer called without proper action type.");
	}
	return _extends({}, state, changes);
}
var propTypes$3 = _extends({}, propTypes$4, {
	items: import_prop_types.default.array.isRequired,
	isItemDisabled: import_prop_types.default.func
});
var defaultProps$2 = _extends({}, defaultProps$3, { isItemDisabled: function isItemDisabled() {
	return false;
} });
function getItemIndexByCharacterKey(_ref) {
	var keysSoFar = _ref.keysSoFar, highlightedIndex = _ref.highlightedIndex, items = _ref.items, itemToString = _ref.itemToString, isItemDisabled = _ref.isItemDisabled;
	var lowerCasedKeysSoFar = keysSoFar.toLowerCase();
	for (var _index = 0; _index < items.length; _index++) {
		var offsetIndex = (_index + highlightedIndex + (keysSoFar.length < 2 ? 1 : 0)) % items.length;
		var _item = items[offsetIndex];
		if (_item !== void 0 && itemToString(_item).toLowerCase().startsWith(lowerCasedKeysSoFar) && !isItemDisabled(_item, offsetIndex)) return offsetIndex;
	}
	return highlightedIndex;
}
var ToggleButtonClick$1 = 0;
var ToggleButtonKeyDownArrowDown = 1;
var ToggleButtonKeyDownArrowUp = 2;
var ToggleButtonKeyDownCharacter = 3;
var ToggleButtonKeyDownEscape = 4;
var ToggleButtonKeyDownHome = 5;
var ToggleButtonKeyDownEnd = 6;
var ToggleButtonKeyDownEnter = 7;
var ToggleButtonKeyDownSpaceButton = 8;
var ToggleButtonKeyDownPageUp = 9;
var ToggleButtonKeyDownPageDown = 10;
var ToggleButtonBlur = 11;
var MenuMouseLeave$1 = 12;
var ItemMouseMove$1 = 13;
var ItemClick$1 = 14;
var FunctionToggleMenu$1 = 15;
var FunctionOpenMenu$1 = 16;
var FunctionCloseMenu$1 = 17;
var FunctionSetHighlightedIndex$1 = 18;
var FunctionSelectItem$1 = 19;
var FunctionSetInputValue$1 = 20;
var FunctionReset$2 = 21;
var stateChangeTypes$3 = /* @__PURE__ */ Object.freeze({
	__proto__: null,
	FunctionCloseMenu: FunctionCloseMenu$1,
	FunctionOpenMenu: FunctionOpenMenu$1,
	FunctionReset: FunctionReset$2,
	FunctionSelectItem: FunctionSelectItem$1,
	FunctionSetHighlightedIndex: FunctionSetHighlightedIndex$1,
	FunctionSetInputValue: FunctionSetInputValue$1,
	FunctionToggleMenu: FunctionToggleMenu$1,
	ItemClick: ItemClick$1,
	ItemMouseMove: ItemMouseMove$1,
	MenuMouseLeave: MenuMouseLeave$1,
	ToggleButtonBlur,
	ToggleButtonClick: ToggleButtonClick$1,
	ToggleButtonKeyDownArrowDown,
	ToggleButtonKeyDownArrowUp,
	ToggleButtonKeyDownCharacter,
	ToggleButtonKeyDownEnd,
	ToggleButtonKeyDownEnter,
	ToggleButtonKeyDownEscape,
	ToggleButtonKeyDownHome,
	ToggleButtonKeyDownPageDown,
	ToggleButtonKeyDownPageUp,
	ToggleButtonKeyDownSpaceButton
});
function downshiftSelectReducer(state, props, action) {
	var _props$items;
	var type = action.type, altKey = action.altKey;
	var changes;
	switch (type) {
		case ItemClick$1:
			changes = {
				isOpen: getDefaultValue$1(props, "isOpen", defaultStateValues$1),
				highlightedIndex: getDefaultHighlightedIndex(props),
				selectedItem: props.items[action.index]
			};
			break;
		case ToggleButtonKeyDownCharacter:
			var lowercasedKey = action.key;
			var inputValue = "" + state.inputValue + lowercasedKey;
			changes = {
				inputValue,
				highlightedIndex: getItemIndexByCharacterKey({
					keysSoFar: inputValue,
					highlightedIndex: !state.isOpen && state.selectedItem ? props.items.findIndex(function(item) {
						return props.itemToKey(item) === props.itemToKey(state.selectedItem);
					}) : state.highlightedIndex,
					items: props.items,
					itemToString: props.itemToString,
					isItemDisabled: props.isItemDisabled
				}),
				isOpen: true
			};
			break;
		case ToggleButtonKeyDownArrowDown:
			changes = {
				highlightedIndex: state.isOpen ? getHighlightedIndex(state.highlightedIndex, 1, props.items, props.isItemDisabled) : altKey && state.selectedItem == null ? -1 : getHighlightedIndexOnOpen(props, state, 1),
				isOpen: true
			};
			break;
		case ToggleButtonKeyDownArrowUp:
			if (state.isOpen && altKey) changes = getChangesOnSelection(props, state.highlightedIndex, false);
			else changes = {
				highlightedIndex: state.isOpen ? getHighlightedIndex(state.highlightedIndex, -1, props.items, props.isItemDisabled) : getHighlightedIndexOnOpen(props, state, -1),
				isOpen: true
			};
			break;
		case ToggleButtonKeyDownEnter:
		case ToggleButtonKeyDownSpaceButton:
			changes = getChangesOnSelection(props, state.highlightedIndex, false);
			break;
		case ToggleButtonKeyDownHome:
			changes = {
				highlightedIndex: getNonDisabledIndex(0, false, props.items, props.isItemDisabled),
				isOpen: true
			};
			break;
		case ToggleButtonKeyDownEnd:
			changes = {
				highlightedIndex: getNonDisabledIndex(props.items.length - 1, true, props.items, props.isItemDisabled),
				isOpen: true
			};
			break;
		case ToggleButtonKeyDownPageUp:
			changes = { highlightedIndex: getHighlightedIndex(state.highlightedIndex, -10, props.items, props.isItemDisabled) };
			break;
		case ToggleButtonKeyDownPageDown:
			changes = { highlightedIndex: getHighlightedIndex(state.highlightedIndex, 10, props.items, props.isItemDisabled) };
			break;
		case ToggleButtonKeyDownEscape:
			changes = {
				isOpen: false,
				highlightedIndex: -1
			};
			break;
		case ToggleButtonBlur:
			changes = _extends({
				isOpen: false,
				highlightedIndex: -1
			}, state.highlightedIndex >= 0 && ((_props$items = props.items) == null ? void 0 : _props$items.length) && { selectedItem: props.items[state.highlightedIndex] });
			break;
		case FunctionSelectItem$1:
			changes = { selectedItem: action.selectedItem };
			break;
		default: return downshiftCommonReducer(state, props, action, stateChangeTypes$3);
	}
	return _extends({}, state, changes);
}
var reactUseId$1 = _extends({}, import_react).useId;
var useElementIds$1 = typeof reactUseId$1 === "function" ? useElementIdsR18$1 : useElementIdsLegacy$1;
function useElementIdsR18$1(_ref) {
	var id = _ref.id, labelId = _ref.labelId, menuId = _ref.menuId, getItemId = _ref.getItemId, toggleButtonId = _ref.toggleButtonId, inputId = _ref.inputId;
	var reactId = "downshift-" + reactUseId$1();
	if (!id) id = reactId;
	return import_react.useMemo(function() {
		return {
			labelId: labelId != null ? labelId : id + "-label",
			menuId: menuId != null ? menuId : id + "-menu",
			getItemId: getItemId != null ? getItemId : function(index) {
				return id + "-item-" + index;
			},
			toggleButtonId: toggleButtonId != null ? toggleButtonId : id + "-toggle-button",
			inputId: inputId != null ? inputId : id + "-input"
		};
	}, [
		getItemId,
		id,
		inputId,
		labelId,
		menuId,
		toggleButtonId
	]);
}
function useElementIdsLegacy$1(_ref2) {
	var id = _ref2.id, labelId = _ref2.labelId, menuId = _ref2.menuId, getItemId = _ref2.getItemId, toggleButtonId = _ref2.toggleButtonId, inputId = _ref2.inputId;
	var baseId = import_react.useRef(id != null ? id : "downshift-" + generateId()).current;
	return import_react.useMemo(function() {
		return {
			labelId: labelId != null ? labelId : baseId + "-label",
			menuId: menuId != null ? menuId : baseId + "-menu",
			getItemId: getItemId != null ? getItemId : function(index) {
				return baseId + "-item-" + index;
			},
			toggleButtonId: toggleButtonId != null ? toggleButtonId : baseId + "-toggle-button",
			inputId: inputId != null ? inputId : baseId + "-input"
		};
	}, [
		getItemId,
		inputId,
		labelId,
		menuId,
		toggleButtonId,
		baseId
	]);
}
var _excluded$3 = ["onClick"], _excluded2$3 = [
	"onMouseLeave",
	"refKey",
	"ref"
], _excluded3$2 = [
	"onBlur",
	"onClick",
	"onPress",
	"onKeyDown",
	"refKey",
	"ref"
], _excluded4$1 = [
	"item",
	"index",
	"onMouseMove",
	"onClick",
	"onMouseDown",
	"onPress",
	"refKey",
	"disabled",
	"ref"
];
useSelect.stateChangeTypes = stateChangeTypes$3;
function useSelect(userProps) {
	if (userProps === void 0) userProps = {};
	validatePropTypes$1(userProps, useSelect, propTypes$3);
	var props = _extends({}, defaultProps$2, userProps);
	var scrollIntoView = props.scrollIntoView, environment = props.environment, getA11yStatusMessage = props.getA11yStatusMessage;
	var _useControlledReducer = useControlledReducer$1(downshiftSelectReducer, props, getInitialState$3, isDropdownsStateEqual), state = _useControlledReducer[0], dispatch = _useControlledReducer[1];
	var isOpen = state.isOpen, highlightedIndex = state.highlightedIndex, selectedItem = state.selectedItem, inputValue = state.inputValue;
	var toggleButtonRef = (0, import_react.useRef)(null);
	var menuRef = (0, import_react.useRef)(null);
	var itemRefs = (0, import_react.useRef)({});
	var clearTimeoutRef = (0, import_react.useRef)(null);
	var elementIds = useElementIds$1(props);
	var latest = useLatestRef({
		state,
		props
	});
	var getItemNodeFromIndex = (0, import_react.useCallback)(function(index) {
		return itemRefs.current[elementIds.getItemId(index)];
	}, [elementIds]);
	useA11yMessageStatus(getA11yStatusMessage, state, [
		isOpen,
		highlightedIndex,
		selectedItem,
		inputValue
	], environment);
	var shouldScrollRef = useScrollIntoView({
		menuElement: menuRef.current,
		highlightedIndex,
		isOpen,
		itemRefs,
		scrollIntoView,
		getItemNodeFromIndex
	});
	(0, import_react.useEffect)(function() {
		clearTimeoutRef.current = debounce(function(outerDispatch) {
			outerDispatch({
				type: FunctionSetInputValue$1,
				inputValue: ""
			});
		}, 500);
		return function() {
			clearTimeoutRef.current.cancel();
		};
	}, []);
	(0, import_react.useEffect)(function() {
		if (!inputValue) return;
		clearTimeoutRef.current(dispatch);
	}, [dispatch, inputValue]);
	useControlPropsValidator({
		props,
		state
	});
	(0, import_react.useEffect)(function() {
		if (getInitialValue$1(props, "isOpen", defaultStateValues$1) && toggleButtonRef.current) toggleButtonRef.current.focus();
	}, []);
	var mouseAndTouchTrackers = useMouseAndTouchTracker(environment, (0, import_react.useCallback)(function handleBlur() {
		if (latest.current.state.isOpen) dispatch({ type: ToggleButtonBlur });
	}, [dispatch, latest]), (0, import_react.useMemo)(function() {
		return [menuRef, toggleButtonRef];
	}, []));
	var setGetterPropCallInfo = useGetterPropsCalledChecker("getMenuProps", "getToggleButtonProps");
	(0, import_react.useEffect)(function() {
		if (!isOpen) itemRefs.current = {};
	}, [isOpen]);
	var toggleButtonKeyDownHandlers = (0, import_react.useMemo)(function() {
		return {
			ArrowDown: function ArrowDown(event) {
				event.preventDefault();
				dispatch({
					type: ToggleButtonKeyDownArrowDown,
					altKey: event.altKey
				});
			},
			ArrowUp: function ArrowUp(event) {
				event.preventDefault();
				dispatch({
					type: ToggleButtonKeyDownArrowUp,
					altKey: event.altKey
				});
			},
			Home: function Home(event) {
				event.preventDefault();
				dispatch({ type: ToggleButtonKeyDownHome });
			},
			End: function End(event) {
				event.preventDefault();
				dispatch({ type: ToggleButtonKeyDownEnd });
			},
			Escape: function Escape() {
				if (latest.current.state.isOpen) dispatch({ type: ToggleButtonKeyDownEscape });
			},
			Enter: function Enter(event) {
				event.preventDefault();
				dispatch({ type: latest.current.state.isOpen ? ToggleButtonKeyDownEnter : ToggleButtonClick$1 });
			},
			PageUp: function PageUp(event) {
				if (latest.current.state.isOpen) {
					event.preventDefault();
					dispatch({ type: ToggleButtonKeyDownPageUp });
				}
			},
			PageDown: function PageDown(event) {
				if (latest.current.state.isOpen) {
					event.preventDefault();
					dispatch({ type: ToggleButtonKeyDownPageDown });
				}
			},
			" ": function _(event) {
				event.preventDefault();
				var currentState = latest.current.state;
				if (!currentState.isOpen) {
					dispatch({ type: ToggleButtonClick$1 });
					return;
				}
				if (currentState.inputValue) dispatch({
					type: ToggleButtonKeyDownCharacter,
					key: " "
				});
				else dispatch({ type: ToggleButtonKeyDownSpaceButton });
			}
		};
	}, [dispatch, latest]);
	var toggleMenu = (0, import_react.useCallback)(function() {
		dispatch({ type: FunctionToggleMenu$1 });
	}, [dispatch]);
	var closeMenu = (0, import_react.useCallback)(function() {
		dispatch({ type: FunctionCloseMenu$1 });
	}, [dispatch]);
	var openMenu = (0, import_react.useCallback)(function() {
		dispatch({ type: FunctionOpenMenu$1 });
	}, [dispatch]);
	var setHighlightedIndex = (0, import_react.useCallback)(function(newHighlightedIndex) {
		dispatch({
			type: FunctionSetHighlightedIndex$1,
			highlightedIndex: newHighlightedIndex
		});
	}, [dispatch]);
	var selectItem = (0, import_react.useCallback)(function(newSelectedItem) {
		dispatch({
			type: FunctionSelectItem$1,
			selectedItem: newSelectedItem
		});
	}, [dispatch]);
	var reset = (0, import_react.useCallback)(function() {
		dispatch({ type: FunctionReset$2 });
	}, [dispatch]);
	var setInputValue = (0, import_react.useCallback)(function(newInputValue) {
		dispatch({
			type: FunctionSetInputValue$1,
			inputValue: newInputValue
		});
	}, [dispatch]);
	var getLabelProps = (0, import_react.useCallback)(function(_temp) {
		var _ref = _temp === void 0 ? {} : _temp, onClick = _ref.onClick, labelProps = _objectWithoutPropertiesLoose$1(_ref, _excluded$3);
		return _extends({
			id: elementIds.labelId,
			htmlFor: elementIds.toggleButtonId,
			onClick: callAllEventHandlers(onClick, function labelHandleClick() {
				var _toggleButtonRef$curr;
				(_toggleButtonRef$curr = toggleButtonRef.current) == null || _toggleButtonRef$curr.focus();
			})
		}, labelProps);
	}, [elementIds]);
	var getMenuProps = (0, import_react.useCallback)(function(_temp2, _temp3) {
		var _extends2;
		var _ref2 = _temp2 === void 0 ? {} : _temp2, onMouseLeave = _ref2.onMouseLeave, _ref2$refKey = _ref2.refKey, refKey = _ref2$refKey === void 0 ? "ref" : _ref2$refKey, ref = _ref2.ref, rest = _objectWithoutPropertiesLoose$1(_ref2, _excluded2$3);
		var _ref3$suppressRefErro = (_temp3 === void 0 ? {} : _temp3).suppressRefError, suppressRefError = _ref3$suppressRefErro === void 0 ? false : _ref3$suppressRefErro;
		var menuHandleMouseLeave = function menuHandleMouseLeave() {
			dispatch({ type: MenuMouseLeave$1 });
		};
		setGetterPropCallInfo("getMenuProps", suppressRefError, refKey, menuRef);
		return _extends((_extends2 = {}, _extends2[refKey] = handleRefs(ref, function(menuNode) {
			menuRef.current = menuNode;
		}), _extends2.id = elementIds.menuId, _extends2.role = "listbox", _extends2["aria-labelledby"] = rest && rest["aria-label"] ? void 0 : "" + elementIds.labelId, _extends2.onMouseLeave = callAllEventHandlers(onMouseLeave, menuHandleMouseLeave), _extends2), rest);
	}, [
		dispatch,
		setGetterPropCallInfo,
		elementIds
	]);
	return {
		getToggleButtonProps: (0, import_react.useCallback)(function(_temp4, _temp5) {
			var _extends3;
			var _ref4 = _temp4 === void 0 ? {} : _temp4, onBlur = _ref4.onBlur, onClick = _ref4.onClick;
			_ref4.onPress;
			var onKeyDown = _ref4.onKeyDown, _ref4$refKey = _ref4.refKey, refKey = _ref4$refKey === void 0 ? "ref" : _ref4$refKey, ref = _ref4.ref, rest = _objectWithoutPropertiesLoose$1(_ref4, _excluded3$2);
			var _ref5$suppressRefErro = (_temp5 === void 0 ? {} : _temp5).suppressRefError, suppressRefError = _ref5$suppressRefErro === void 0 ? false : _ref5$suppressRefErro;
			var latestState = latest.current.state;
			var toggleButtonHandleClick = function toggleButtonHandleClick() {
				dispatch({ type: ToggleButtonClick$1 });
			};
			var toggleButtonHandleBlur = function toggleButtonHandleBlur() {
				if (latestState.isOpen && !mouseAndTouchTrackers.isMouseDown) dispatch({ type: ToggleButtonBlur });
			};
			var toggleButtonHandleKeyDown = function toggleButtonHandleKeyDown(event) {
				var key = normalizeArrowKey(event);
				if (key && toggleButtonKeyDownHandlers[key]) toggleButtonKeyDownHandlers[key](event);
				else if (isAcceptedCharacterKey(key)) dispatch({
					type: ToggleButtonKeyDownCharacter,
					key
				});
			};
			var toggleProps = _extends((_extends3 = {}, _extends3[refKey] = handleRefs(ref, function(toggleButtonNode) {
				toggleButtonRef.current = toggleButtonNode;
			}), _extends3["aria-activedescendant"] = latestState.isOpen && latestState.highlightedIndex > -1 ? elementIds.getItemId(latestState.highlightedIndex) : "", _extends3["aria-controls"] = elementIds.menuId, _extends3["aria-expanded"] = latest.current.state.isOpen, _extends3["aria-haspopup"] = "listbox", _extends3["aria-labelledby"] = rest && rest["aria-label"] ? void 0 : "" + elementIds.labelId, _extends3.id = elementIds.toggleButtonId, _extends3.role = "combobox", _extends3.tabIndex = 0, _extends3.onBlur = callAllEventHandlers(onBlur, toggleButtonHandleBlur), _extends3), rest);
			if (!rest.disabled) {
				toggleProps.onClick = callAllEventHandlers(onClick, toggleButtonHandleClick);
				toggleProps.onKeyDown = callAllEventHandlers(onKeyDown, toggleButtonHandleKeyDown);
			}
			setGetterPropCallInfo("getToggleButtonProps", suppressRefError, refKey, toggleButtonRef);
			return toggleProps;
		}, [
			dispatch,
			elementIds,
			latest,
			mouseAndTouchTrackers,
			setGetterPropCallInfo,
			toggleButtonKeyDownHandlers
		]),
		getLabelProps,
		getMenuProps,
		getItemProps: (0, import_react.useCallback)(function(_temp6) {
			var _extends4;
			var _ref6 = _temp6 === void 0 ? {} : _temp6, itemProp = _ref6.item, indexProp = _ref6.index, onMouseMove = _ref6.onMouseMove, onClick = _ref6.onClick, onMouseDown = _ref6.onMouseDown;
			_ref6.onPress;
			var _ref6$refKey = _ref6.refKey, refKey = _ref6$refKey === void 0 ? "ref" : _ref6$refKey, disabledProp = _ref6.disabled, ref = _ref6.ref, rest = _objectWithoutPropertiesLoose$1(_ref6, _excluded4$1);
			if (disabledProp !== void 0) console.warn("Passing \"disabled\" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useSelect.");
			var _latest$current = latest.current, latestState = _latest$current.state, latestProps = _latest$current.props;
			var _getItemAndIndex = getItemAndIndex(itemProp, indexProp, latestProps.items, "Pass either item or index to getItemProps!"), item = _getItemAndIndex[0], index = _getItemAndIndex[1];
			var disabled = latestProps.isItemDisabled(item, index);
			var itemHandleMouseMove = function itemHandleMouseMove() {
				if (mouseAndTouchTrackers.isTouchEnd || index === latestState.highlightedIndex) return;
				shouldScrollRef.current = false;
				dispatch({
					type: ItemMouseMove$1,
					index,
					disabled
				});
			};
			var itemHandleClick = function itemHandleClick() {
				dispatch({
					type: ItemClick$1,
					index
				});
			};
			var itemHandleMouseDown = function itemHandleMouseDown(e) {
				return e.preventDefault();
			};
			var itemProps = _extends((_extends4 = {}, _extends4[refKey] = handleRefs(ref, function(itemNode) {
				if (itemNode) itemRefs.current[elementIds.getItemId(index)] = itemNode;
			}), _extends4["aria-disabled"] = disabled, _extends4["aria-selected"] = item === latestState.selectedItem, _extends4.id = elementIds.getItemId(index), _extends4.role = "option", _extends4), rest);
			if (!disabled) itemProps.onClick = callAllEventHandlers(onClick, itemHandleClick);
			itemProps.onMouseMove = callAllEventHandlers(onMouseMove, itemHandleMouseMove);
			itemProps.onMouseDown = callAllEventHandlers(onMouseDown, itemHandleMouseDown);
			return itemProps;
		}, [
			latest,
			elementIds,
			mouseAndTouchTrackers,
			shouldScrollRef,
			dispatch
		]),
		toggleMenu,
		openMenu,
		closeMenu,
		setHighlightedIndex,
		selectItem,
		reset,
		setInputValue,
		highlightedIndex,
		isOpen,
		selectedItem,
		inputValue
	};
}
var InputKeyDownArrowDown = 0;
var InputKeyDownArrowUp = 1;
var InputKeyDownEscape = 2;
var InputKeyDownHome = 3;
var InputKeyDownEnd = 4;
var InputKeyDownPageUp = 5;
var InputKeyDownPageDown = 6;
var InputKeyDownEnter = 7;
var InputChange = 8;
var InputBlur = 9;
var InputClick = 10;
var MenuMouseLeave = 11;
var ItemMouseMove = 12;
var ItemClick = 13;
var ToggleButtonClick = 14;
var FunctionToggleMenu = 15;
var FunctionOpenMenu = 16;
var FunctionCloseMenu = 17;
var FunctionSetHighlightedIndex = 18;
var FunctionSelectItem = 19;
var FunctionSetInputValue = 20;
var FunctionReset$1 = 21;
var ControlledPropUpdatedSelectedItem = 22;
var stateChangeTypes$2 = /* @__PURE__ */ Object.freeze({
	__proto__: null,
	ControlledPropUpdatedSelectedItem,
	FunctionCloseMenu,
	FunctionOpenMenu,
	FunctionReset: FunctionReset$1,
	FunctionSelectItem,
	FunctionSetHighlightedIndex,
	FunctionSetInputValue,
	FunctionToggleMenu,
	InputBlur,
	InputChange,
	InputClick,
	InputKeyDownArrowDown,
	InputKeyDownArrowUp,
	InputKeyDownEnd,
	InputKeyDownEnter,
	InputKeyDownEscape,
	InputKeyDownHome,
	InputKeyDownPageDown,
	InputKeyDownPageUp,
	ItemClick,
	ItemMouseMove,
	MenuMouseLeave,
	ToggleButtonClick
});
function getInitialState$2(props) {
	var initialState = getInitialState$3(props);
	var selectedItem = initialState.selectedItem;
	var inputValue = initialState.inputValue;
	if (inputValue === "" && selectedItem && props.defaultInputValue === void 0 && props.initialInputValue === void 0 && props.inputValue === void 0) inputValue = props.itemToString(selectedItem);
	return _extends({}, initialState, { inputValue });
}
var propTypes$2 = _extends({}, propTypes$4, {
	items: import_prop_types.default.array.isRequired,
	isItemDisabled: import_prop_types.default.func,
	inputValue: import_prop_types.default.string,
	defaultInputValue: import_prop_types.default.string,
	initialInputValue: import_prop_types.default.string,
	inputId: import_prop_types.default.string,
	onInputValueChange: import_prop_types.default.func
});
/**
* The useCombobox version of useControlledReducer, which also
* checks if the controlled prop selectedItem changed between
* renders. If so, it will also update inputValue with its
* string equivalent. It uses the common useEnhancedReducer to
* compute the rest of the state.
*
* @param {Function} reducer Reducer function from downshift.
* @param {Object} props The hook props, also passed to createInitialState.
* @param {Function} createInitialState Function that returns the initial state.
* @param {Function} isStateEqual Function that checks if a previous state is equal to the next.
* @returns {Array} An array with the state and an action dispatcher.
*/
function useControlledReducer(reducer, props, createInitialState, isStateEqual) {
	var previousSelectedItemRef = (0, import_react.useRef)();
	var _useEnhancedReducer = useEnhancedReducer(reducer, props, createInitialState, isStateEqual), state = _useEnhancedReducer[0], dispatch = _useEnhancedReducer[1];
	var isInitialMount = useIsInitialMount();
	(0, import_react.useEffect)(function() {
		if (!isControlledProp(props, "selectedItem")) return;
		if (!isInitialMount) {
			if (props.itemToKey(props.selectedItem) !== props.itemToKey(previousSelectedItemRef.current)) dispatch({
				type: ControlledPropUpdatedSelectedItem,
				inputValue: props.itemToString(props.selectedItem)
			});
		}
		previousSelectedItemRef.current = state.selectedItem === previousSelectedItemRef.current ? props.selectedItem : state.selectedItem;
	}, [state.selectedItem, props.selectedItem]);
	return [getState(state, props), dispatch];
}
var defaultProps$1 = _extends({}, defaultProps$3, { isItemDisabled: function isItemDisabled() {
	return false;
} });
function downshiftUseComboboxReducer(state, props, action) {
	var _props$items;
	var type = action.type, altKey = action.altKey;
	var changes;
	switch (type) {
		case ItemClick:
			changes = {
				isOpen: getDefaultValue$1(props, "isOpen", defaultStateValues$1),
				highlightedIndex: getDefaultHighlightedIndex(props),
				selectedItem: props.items[action.index],
				inputValue: props.itemToString(props.items[action.index])
			};
			break;
		case InputKeyDownArrowDown:
			if (state.isOpen) changes = { highlightedIndex: getHighlightedIndex(state.highlightedIndex, 1, props.items, props.isItemDisabled, true) };
			else changes = {
				highlightedIndex: altKey && state.selectedItem == null ? -1 : getHighlightedIndexOnOpen(props, state, 1),
				isOpen: props.items.length >= 0
			};
			break;
		case InputKeyDownArrowUp:
			if (state.isOpen) if (altKey) changes = getChangesOnSelection(props, state.highlightedIndex);
			else changes = { highlightedIndex: getHighlightedIndex(state.highlightedIndex, -1, props.items, props.isItemDisabled, true) };
			else changes = {
				highlightedIndex: getHighlightedIndexOnOpen(props, state, -1),
				isOpen: props.items.length >= 0
			};
			break;
		case InputKeyDownEnter:
			changes = getChangesOnSelection(props, state.highlightedIndex);
			break;
		case InputKeyDownEscape:
			changes = _extends({
				isOpen: false,
				highlightedIndex: -1
			}, !state.isOpen && {
				selectedItem: null,
				inputValue: ""
			});
			break;
		case InputKeyDownPageUp:
			changes = { highlightedIndex: getHighlightedIndex(state.highlightedIndex, -10, props.items, props.isItemDisabled, true) };
			break;
		case InputKeyDownPageDown:
			changes = { highlightedIndex: getHighlightedIndex(state.highlightedIndex, 10, props.items, props.isItemDisabled, true) };
			break;
		case InputKeyDownHome:
			changes = { highlightedIndex: getNonDisabledIndex(0, false, props.items, props.isItemDisabled) };
			break;
		case InputKeyDownEnd:
			changes = { highlightedIndex: getNonDisabledIndex(props.items.length - 1, true, props.items, props.isItemDisabled) };
			break;
		case InputBlur:
			changes = _extends({
				isOpen: false,
				highlightedIndex: -1
			}, state.highlightedIndex >= 0 && ((_props$items = props.items) == null ? void 0 : _props$items.length) && action.selectItem && {
				selectedItem: props.items[state.highlightedIndex],
				inputValue: props.itemToString(props.items[state.highlightedIndex])
			});
			break;
		case InputChange:
			changes = {
				isOpen: true,
				highlightedIndex: getDefaultHighlightedIndex(props),
				inputValue: action.inputValue
			};
			break;
		case InputClick:
			changes = {
				isOpen: !state.isOpen,
				highlightedIndex: state.isOpen ? -1 : getHighlightedIndexOnOpen(props, state, 0)
			};
			break;
		case FunctionSelectItem:
			changes = {
				selectedItem: action.selectedItem,
				inputValue: props.itemToString(action.selectedItem)
			};
			break;
		case ControlledPropUpdatedSelectedItem:
			changes = { inputValue: action.inputValue };
			break;
		default: return downshiftCommonReducer(state, props, action, stateChangeTypes$2);
	}
	return _extends({}, state, changes);
}
var _excluded$2 = [
	"onMouseLeave",
	"refKey",
	"ref"
], _excluded2$2 = [
	"item",
	"index",
	"refKey",
	"ref",
	"onMouseMove",
	"onMouseDown",
	"onClick",
	"onPress",
	"disabled"
], _excluded3$1 = [
	"onClick",
	"onPress",
	"refKey",
	"ref"
], _excluded4 = [
	"onKeyDown",
	"onChange",
	"onInput",
	"onBlur",
	"onChangeText",
	"onClick",
	"refKey",
	"ref"
];
useCombobox.stateChangeTypes = stateChangeTypes$2;
function useCombobox(userProps) {
	if (userProps === void 0) userProps = {};
	validatePropTypes$1(userProps, useCombobox, propTypes$2);
	var props = _extends({}, defaultProps$1, userProps);
	var items = props.items, scrollIntoView = props.scrollIntoView, environment = props.environment, getA11yStatusMessage = props.getA11yStatusMessage;
	var _useControlledReducer = useControlledReducer(downshiftUseComboboxReducer, props, getInitialState$2, isDropdownsStateEqual), state = _useControlledReducer[0], dispatch = _useControlledReducer[1];
	var isOpen = state.isOpen, highlightedIndex = state.highlightedIndex, selectedItem = state.selectedItem, inputValue = state.inputValue;
	var menuRef = (0, import_react.useRef)(null);
	var itemRefs = (0, import_react.useRef)({});
	var inputRef = (0, import_react.useRef)(null);
	var toggleButtonRef = (0, import_react.useRef)(null);
	var isInitialMount = useIsInitialMount();
	var elementIds = useElementIds$1(props);
	var previousResultCountRef = (0, import_react.useRef)();
	var latest = useLatestRef({
		state,
		props
	});
	var getItemNodeFromIndex = (0, import_react.useCallback)(function(index) {
		return itemRefs.current[elementIds.getItemId(index)];
	}, [elementIds]);
	useA11yMessageStatus(getA11yStatusMessage, state, [
		isOpen,
		highlightedIndex,
		selectedItem,
		inputValue
	], environment);
	var shouldScrollRef = useScrollIntoView({
		menuElement: menuRef.current,
		highlightedIndex,
		isOpen,
		itemRefs,
		scrollIntoView,
		getItemNodeFromIndex
	});
	useControlPropsValidator({
		props,
		state
	});
	(0, import_react.useEffect)(function() {
		if (getInitialValue$1(props, "isOpen", defaultStateValues$1) && inputRef.current) inputRef.current.focus();
	}, []);
	(0, import_react.useEffect)(function() {
		if (!isInitialMount) previousResultCountRef.current = items.length;
	});
	var mouseAndTouchTrackers = useMouseAndTouchTracker(environment, (0, import_react.useCallback)(function handleBlur() {
		if (latest.current.state.isOpen) dispatch({ type: InputBlur });
	}, [dispatch, latest]), (0, import_react.useMemo)(function() {
		return [
			menuRef,
			toggleButtonRef,
			inputRef
		];
	}, []));
	var setGetterPropCallInfo = useGetterPropsCalledChecker("getInputProps", "getMenuProps");
	(0, import_react.useEffect)(function() {
		if (!isOpen) itemRefs.current = {};
	}, [isOpen]);
	(0, import_react.useEffect)(function() {
		var _inputRef$current;
		if (!isOpen || !(environment != null && environment.document) || !(inputRef != null && (_inputRef$current = inputRef.current) != null && _inputRef$current.focus)) return;
		if (environment.document.activeElement !== inputRef.current) inputRef.current.focus();
	}, [isOpen, environment]);
	var inputKeyDownHandlers = (0, import_react.useMemo)(function() {
		return {
			ArrowDown: function ArrowDown(event) {
				event.preventDefault();
				dispatch({
					type: InputKeyDownArrowDown,
					altKey: event.altKey
				});
			},
			ArrowUp: function ArrowUp(event) {
				event.preventDefault();
				dispatch({
					type: InputKeyDownArrowUp,
					altKey: event.altKey
				});
			},
			Home: function Home(event) {
				if (!latest.current.state.isOpen) return;
				event.preventDefault();
				dispatch({ type: InputKeyDownHome });
			},
			End: function End(event) {
				if (!latest.current.state.isOpen) return;
				event.preventDefault();
				dispatch({ type: InputKeyDownEnd });
			},
			Escape: function Escape(event) {
				var latestState = latest.current.state;
				if (latestState.isOpen || latestState.inputValue || latestState.selectedItem || latestState.highlightedIndex > -1) {
					event.preventDefault();
					dispatch({ type: InputKeyDownEscape });
				}
			},
			Enter: function Enter(event) {
				if (!latest.current.state.isOpen || event.which === 229) return;
				event.preventDefault();
				dispatch({ type: InputKeyDownEnter });
			},
			PageUp: function PageUp(event) {
				if (latest.current.state.isOpen) {
					event.preventDefault();
					dispatch({ type: InputKeyDownPageUp });
				}
			},
			PageDown: function PageDown(event) {
				if (latest.current.state.isOpen) {
					event.preventDefault();
					dispatch({ type: InputKeyDownPageDown });
				}
			}
		};
	}, [dispatch, latest]);
	var getLabelProps = (0, import_react.useCallback)(function(labelProps) {
		return _extends({
			id: elementIds.labelId,
			htmlFor: elementIds.inputId
		}, labelProps);
	}, [elementIds]);
	var getMenuProps = (0, import_react.useCallback)(function(_temp, _temp2) {
		var _extends2;
		var _ref = _temp === void 0 ? {} : _temp, onMouseLeave = _ref.onMouseLeave, _ref$refKey = _ref.refKey, refKey = _ref$refKey === void 0 ? "ref" : _ref$refKey, ref = _ref.ref, rest = _objectWithoutPropertiesLoose$1(_ref, _excluded$2);
		var _ref2$suppressRefErro = (_temp2 === void 0 ? {} : _temp2).suppressRefError;
		setGetterPropCallInfo("getMenuProps", _ref2$suppressRefErro === void 0 ? false : _ref2$suppressRefErro, refKey, menuRef);
		return _extends((_extends2 = {}, _extends2[refKey] = handleRefs(ref, function(menuNode) {
			menuRef.current = menuNode;
		}), _extends2.id = elementIds.menuId, _extends2.role = "listbox", _extends2["aria-labelledby"] = rest && rest["aria-label"] ? void 0 : "" + elementIds.labelId, _extends2.onMouseLeave = callAllEventHandlers(onMouseLeave, function() {
			dispatch({ type: MenuMouseLeave });
		}), _extends2), rest);
	}, [
		dispatch,
		setGetterPropCallInfo,
		elementIds
	]);
	var getItemProps = (0, import_react.useCallback)(function(_temp3) {
		var _extends3, _ref4;
		var _ref3 = _temp3 === void 0 ? {} : _temp3, itemProp = _ref3.item, indexProp = _ref3.index, _ref3$refKey = _ref3.refKey, refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey, ref = _ref3.ref, onMouseMove = _ref3.onMouseMove, onMouseDown = _ref3.onMouseDown, onClick = _ref3.onClick;
		_ref3.onPress;
		var disabledProp = _ref3.disabled, rest = _objectWithoutPropertiesLoose$1(_ref3, _excluded2$2);
		if (disabledProp !== void 0) console.warn("Passing \"disabled\" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.");
		var _latest$current = latest.current, latestProps = _latest$current.props, latestState = _latest$current.state;
		var _getItemAndIndex = getItemAndIndex(itemProp, indexProp, latestProps.items, "Pass either item or index to getItemProps!"), item = _getItemAndIndex[0], index = _getItemAndIndex[1];
		var disabled = latestProps.isItemDisabled(item, index);
		var onSelectKey = "onClick";
		var customClickHandler = onClick;
		return _extends((_extends3 = {}, _extends3[refKey] = handleRefs(ref, function(itemNode) {
			if (itemNode) itemRefs.current[elementIds.getItemId(index)] = itemNode;
		}), _extends3["aria-disabled"] = disabled, _extends3["aria-selected"] = index === latestState.highlightedIndex, _extends3.id = elementIds.getItemId(index), _extends3.role = "option", _extends3), !disabled && (_ref4 = {}, _ref4[onSelectKey] = callAllEventHandlers(customClickHandler, function itemHandleClick() {
			dispatch({
				type: ItemClick,
				index
			});
		}), _ref4), {
			onMouseMove: callAllEventHandlers(onMouseMove, function itemHandleMouseMove() {
				if (mouseAndTouchTrackers.isTouchEnd || index === latestState.highlightedIndex) return;
				shouldScrollRef.current = false;
				dispatch({
					type: ItemMouseMove,
					index,
					disabled
				});
			}),
			onMouseDown: callAllEventHandlers(onMouseDown, function itemHandleMouseDown(e) {
				return e.preventDefault();
			})
		}, rest);
	}, [
		dispatch,
		elementIds,
		latest,
		mouseAndTouchTrackers,
		shouldScrollRef
	]);
	var getToggleButtonProps = (0, import_react.useCallback)(function(_temp4) {
		var _extends4;
		var _ref5 = _temp4 === void 0 ? {} : _temp4, onClick = _ref5.onClick;
		_ref5.onPress;
		var _ref5$refKey = _ref5.refKey, refKey = _ref5$refKey === void 0 ? "ref" : _ref5$refKey, ref = _ref5.ref, rest = _objectWithoutPropertiesLoose$1(_ref5, _excluded3$1);
		var latestState = latest.current.state;
		return _extends((_extends4 = {}, _extends4[refKey] = handleRefs(ref, function(toggleButtonNode) {
			toggleButtonRef.current = toggleButtonNode;
		}), _extends4["aria-controls"] = elementIds.menuId, _extends4["aria-expanded"] = latestState.isOpen, _extends4.id = elementIds.toggleButtonId, _extends4.tabIndex = -1, _extends4), !rest.disabled && _extends({}, { onClick: callAllEventHandlers(onClick, function toggleButtonHandleClick() {
			dispatch({ type: ToggleButtonClick });
		}) }), rest);
	}, [
		dispatch,
		latest,
		elementIds
	]);
	var getInputProps = (0, import_react.useCallback)(function(_temp5, _temp6) {
		var _extends5;
		var _ref6 = _temp5 === void 0 ? {} : _temp5, onKeyDown = _ref6.onKeyDown, onChange = _ref6.onChange, onInput = _ref6.onInput, onBlur = _ref6.onBlur;
		_ref6.onChangeText;
		var onClick = _ref6.onClick, _ref6$refKey = _ref6.refKey, refKey = _ref6$refKey === void 0 ? "ref" : _ref6$refKey, ref = _ref6.ref, rest = _objectWithoutPropertiesLoose$1(_ref6, _excluded4);
		var _ref7$suppressRefErro = (_temp6 === void 0 ? {} : _temp6).suppressRefError;
		setGetterPropCallInfo("getInputProps", _ref7$suppressRefErro === void 0 ? false : _ref7$suppressRefErro, refKey, inputRef);
		var latestState = latest.current.state;
		var inputHandleKeyDown = function inputHandleKeyDown(event) {
			var key = normalizeArrowKey(event);
			if (key && inputKeyDownHandlers[key]) inputKeyDownHandlers[key](event);
		};
		var inputHandleChange = function inputHandleChange(event) {
			dispatch({
				type: InputChange,
				inputValue: event.target.value
			});
		};
		var inputHandleBlur = function inputHandleBlur(event) {
			/* istanbul ignore else */
			if (environment != null && environment.document && latestState.isOpen && !mouseAndTouchTrackers.isMouseDown) dispatch({
				type: InputBlur,
				selectItem: !(event.relatedTarget === null && environment.document.activeElement !== environment.document.body)
			});
		};
		var inputHandleClick = function inputHandleClick() {
			dispatch({ type: InputClick });
		};
		/* istanbul ignore next (preact) */
		var onChangeKey = "onChange";
		var eventHandlers = {};
		if (!rest.disabled) {
			var _eventHandlers;
			eventHandlers = (_eventHandlers = {}, _eventHandlers[onChangeKey] = callAllEventHandlers(onChange, onInput, inputHandleChange), _eventHandlers.onKeyDown = callAllEventHandlers(onKeyDown, inputHandleKeyDown), _eventHandlers.onBlur = callAllEventHandlers(onBlur, inputHandleBlur), _eventHandlers.onClick = callAllEventHandlers(onClick, inputHandleClick), _eventHandlers);
		}
		return _extends((_extends5 = {}, _extends5[refKey] = handleRefs(ref, function(inputNode) {
			inputRef.current = inputNode;
		}), _extends5["aria-activedescendant"] = latestState.isOpen && latestState.highlightedIndex > -1 ? elementIds.getItemId(latestState.highlightedIndex) : "", _extends5["aria-autocomplete"] = "list", _extends5["aria-controls"] = elementIds.menuId, _extends5["aria-expanded"] = latestState.isOpen, _extends5["aria-labelledby"] = rest && rest["aria-label"] ? void 0 : elementIds.labelId, _extends5.autoComplete = "off", _extends5.id = elementIds.inputId, _extends5.role = "combobox", _extends5.value = latestState.inputValue, _extends5), eventHandlers, rest);
	}, [
		dispatch,
		elementIds,
		environment,
		inputKeyDownHandlers,
		latest,
		mouseAndTouchTrackers,
		setGetterPropCallInfo
	]);
	var toggleMenu = (0, import_react.useCallback)(function() {
		dispatch({ type: FunctionToggleMenu });
	}, [dispatch]);
	var closeMenu = (0, import_react.useCallback)(function() {
		dispatch({ type: FunctionCloseMenu });
	}, [dispatch]);
	var openMenu = (0, import_react.useCallback)(function() {
		dispatch({ type: FunctionOpenMenu });
	}, [dispatch]);
	var setHighlightedIndex = (0, import_react.useCallback)(function(newHighlightedIndex) {
		dispatch({
			type: FunctionSetHighlightedIndex,
			highlightedIndex: newHighlightedIndex
		});
	}, [dispatch]);
	var selectItem = (0, import_react.useCallback)(function(newSelectedItem) {
		dispatch({
			type: FunctionSelectItem,
			selectedItem: newSelectedItem
		});
	}, [dispatch]);
	return {
		getItemProps,
		getLabelProps,
		getMenuProps,
		getInputProps,
		getToggleButtonProps,
		toggleMenu,
		openMenu,
		closeMenu,
		setHighlightedIndex,
		setInputValue: (0, import_react.useCallback)(function(newInputValue) {
			dispatch({
				type: FunctionSetInputValue,
				inputValue: newInputValue
			});
		}, [dispatch]),
		selectItem,
		reset: (0, import_react.useCallback)(function() {
			dispatch({ type: FunctionReset$1 });
		}, [dispatch]),
		highlightedIndex,
		isOpen,
		selectedItem,
		inputValue
	};
}
var defaultStateValues = {
	activeIndex: -1,
	selectedItems: []
};
/**
* Returns the initial value for a state key in the following order:
* 1. controlled prop, 2. initial prop, 3. default prop, 4. default
* value from Downshift.
*
* @param {Object} props Props passed to the hook.
* @param {string} propKey Props key to generate the value for.
* @returns {any} The initial value for that prop.
*/
function getInitialValue(props, propKey) {
	return getInitialValue$1(props, propKey, defaultStateValues);
}
/**
* Returns the default value for a state key in the following order:
* 1. controlled prop, 2. default prop, 3. default value from Downshift.
*
* @param {Object} props Props passed to the hook.
* @param {string} propKey Props key to generate the value for.
* @returns {any} The initial value for that prop.
*/
function getDefaultValue(props, propKey) {
	return getDefaultValue$1(props, propKey, defaultStateValues);
}
/**
* Gets the initial state based on the provided props. It uses initial, default
* and controlled props related to state in order to compute the initial value.
*
* @param {Object} props Props passed to the hook.
* @returns {Object} The initial state.
*/
function getInitialState$1(props) {
	return {
		activeIndex: getInitialValue(props, "activeIndex"),
		selectedItems: getInitialValue(props, "selectedItems")
	};
}
/**
* Returns true if dropdown keydown operation is permitted. Should not be
* allowed on keydown with modifier keys (ctrl, alt, shift, meta), on
* input element with text content that is either highlighted or selection
* cursor is not at the starting position.
*
* @param {KeyboardEvent} event The event from keydown.
* @returns {boolean} Whether the operation is allowed.
*/
function isKeyDownOperationPermitted(event) {
	if (event.shiftKey || event.metaKey || event.ctrlKey || event.altKey) return false;
	var element = event.target;
	if (element instanceof HTMLInputElement && element.value !== "" && (element.selectionStart !== 0 || element.selectionEnd !== 0)) return false;
	return true;
}
/**
* Check if a state is equal for taglist, by comparing active index and selected items.
* Used by useSelect and useCombobox.
*
* @param {Object} prevState
* @param {Object} newState
* @returns {boolean} Wheather the states are deeply equal.
*/
function isStateEqual$1(prevState, newState) {
	return prevState.selectedItems === newState.selectedItems && prevState.activeIndex === newState.activeIndex;
}
propTypes$4.stateReducer, propTypes$4.itemToKey, propTypes$4.environment, import_prop_types.default.array, import_prop_types.default.array, import_prop_types.default.array, import_prop_types.default.func, import_prop_types.default.number, import_prop_types.default.number, import_prop_types.default.number, import_prop_types.default.func, import_prop_types.default.func, import_prop_types.default.string, import_prop_types.default.string;
var defaultProps = {
	itemToKey: defaultProps$3.itemToKey,
	stateReducer: defaultProps$3.stateReducer,
	environment: defaultProps$3.environment,
	keyNavigationNext: "ArrowRight",
	keyNavigationPrevious: "ArrowLeft"
};
var validatePropTypes = noop;
var SelectedItemClick = 0;
var SelectedItemKeyDownDelete = 1;
var SelectedItemKeyDownBackspace = 2;
var SelectedItemKeyDownNavigationNext = 3;
var SelectedItemKeyDownNavigationPrevious = 4;
var DropdownKeyDownNavigationPrevious = 5;
var DropdownKeyDownBackspace = 6;
var DropdownClick = 7;
var FunctionAddSelectedItem = 8;
var FunctionRemoveSelectedItem = 9;
var FunctionSetSelectedItems = 10;
var FunctionSetActiveIndex = 11;
var FunctionReset = 12;
var stateChangeTypes$1 = /* @__PURE__ */ Object.freeze({
	__proto__: null,
	DropdownClick,
	DropdownKeyDownBackspace,
	DropdownKeyDownNavigationPrevious,
	FunctionAddSelectedItem,
	FunctionRemoveSelectedItem,
	FunctionReset,
	FunctionSetActiveIndex,
	FunctionSetSelectedItems,
	SelectedItemClick,
	SelectedItemKeyDownBackspace,
	SelectedItemKeyDownDelete,
	SelectedItemKeyDownNavigationNext,
	SelectedItemKeyDownNavigationPrevious
});
function downshiftMultipleSelectionReducer(state, props, action) {
	var type = action.type, index = action.index, selectedItem = action.selectedItem;
	var activeIndex = state.activeIndex, selectedItems = state.selectedItems;
	var changes;
	switch (type) {
		case SelectedItemClick:
			changes = { activeIndex: index };
			break;
		case SelectedItemKeyDownNavigationPrevious:
			changes = { activeIndex: activeIndex - 1 < 0 ? 0 : activeIndex - 1 };
			break;
		case SelectedItemKeyDownNavigationNext:
			changes = { activeIndex: activeIndex + 1 >= selectedItems.length ? -1 : activeIndex + 1 };
			break;
		case SelectedItemKeyDownBackspace:
		case SelectedItemKeyDownDelete:
			if (activeIndex < 0) break;
			var newActiveIndex = activeIndex;
			if (selectedItems.length === 1) newActiveIndex = -1;
			else if (activeIndex === selectedItems.length - 1) newActiveIndex = selectedItems.length - 2;
			changes = _extends({ selectedItems: [].concat(selectedItems.slice(0, activeIndex), selectedItems.slice(activeIndex + 1)) }, { activeIndex: newActiveIndex });
			break;
		case DropdownKeyDownNavigationPrevious:
			changes = { activeIndex: selectedItems.length - 1 };
			break;
		case DropdownKeyDownBackspace:
			changes = { selectedItems: selectedItems.slice(0, selectedItems.length - 1) };
			break;
		case FunctionAddSelectedItem:
			changes = { selectedItems: [].concat(selectedItems, [selectedItem]) };
			break;
		case DropdownClick:
			changes = { activeIndex: -1 };
			break;
		case FunctionRemoveSelectedItem:
			var _newActiveIndex = activeIndex;
			var selectedItemIndex = selectedItems.findIndex(function(item) {
				return props.itemToKey(item) === props.itemToKey(selectedItem);
			});
			if (selectedItemIndex < 0) break;
			if (selectedItems.length === 1) _newActiveIndex = -1;
			else if (selectedItemIndex === selectedItems.length - 1) _newActiveIndex = selectedItems.length - 2;
			changes = {
				selectedItems: [].concat(selectedItems.slice(0, selectedItemIndex), selectedItems.slice(selectedItemIndex + 1)),
				activeIndex: _newActiveIndex
			};
			break;
		case FunctionSetSelectedItems:
			changes = { selectedItems: action.selectedItems };
			break;
		case FunctionSetActiveIndex:
			changes = { activeIndex: action.activeIndex };
			break;
		case FunctionReset:
			changes = {
				activeIndex: getDefaultValue(props, "activeIndex"),
				selectedItems: getDefaultValue(props, "selectedItems")
			};
			break;
		default: throw new Error("Reducer called without proper action type.");
	}
	return _extends({}, state, changes);
}
var _excluded$1 = [
	"refKey",
	"ref",
	"onClick",
	"onKeyDown",
	"selectedItem",
	"index"
], _excluded2$1 = [
	"refKey",
	"ref",
	"onKeyDown",
	"onClick",
	"preventKeyAction"
];
useMultipleSelection.stateChangeTypes = stateChangeTypes$1;
function useMultipleSelection(userProps) {
	if (userProps === void 0) userProps = {};
	validatePropTypes(userProps, useMultipleSelection);
	var props = _extends({}, defaultProps, userProps);
	var getA11yStatusMessage = props.getA11yStatusMessage, environment = props.environment, keyNavigationNext = props.keyNavigationNext, keyNavigationPrevious = props.keyNavigationPrevious;
	var _useControlledReducer = useControlledReducer$1(downshiftMultipleSelectionReducer, props, getInitialState$1, isStateEqual$1), state = _useControlledReducer[0], dispatch = _useControlledReducer[1];
	var activeIndex = state.activeIndex, selectedItems = state.selectedItems;
	var isInitialMount = useIsInitialMount();
	var dropdownRef = (0, import_react.useRef)(null);
	var selectedItemRefs = (0, import_react.useRef)();
	selectedItemRefs.current = [];
	var latest = useLatestRef({
		state,
		props
	});
	useA11yMessageStatus(getA11yStatusMessage, state, [activeIndex, selectedItems], environment);
	(0, import_react.useEffect)(function() {
		if (isInitialMount) return;
		if (activeIndex === -1 && dropdownRef.current) dropdownRef.current.focus();
		else if (selectedItemRefs.current[activeIndex]) selectedItemRefs.current[activeIndex].focus();
	}, [activeIndex]);
	useControlPropsValidator({
		props,
		state
	});
	var setGetterPropCallInfo = useGetterPropsCalledChecker("getDropdownProps");
	var selectedItemKeyDownHandlers = (0, import_react.useMemo)(function() {
		var _ref;
		return _ref = {}, _ref[keyNavigationPrevious] = function() {
			dispatch({ type: SelectedItemKeyDownNavigationPrevious });
		}, _ref[keyNavigationNext] = function() {
			dispatch({ type: SelectedItemKeyDownNavigationNext });
		}, _ref.Delete = function Delete() {
			dispatch({ type: SelectedItemKeyDownDelete });
		}, _ref.Backspace = function Backspace() {
			dispatch({ type: SelectedItemKeyDownBackspace });
		}, _ref;
	}, [
		dispatch,
		keyNavigationNext,
		keyNavigationPrevious
	]);
	var dropdownKeyDownHandlers = (0, import_react.useMemo)(function() {
		var _ref2;
		return _ref2 = {}, _ref2[keyNavigationPrevious] = function(event) {
			if (isKeyDownOperationPermitted(event)) dispatch({ type: DropdownKeyDownNavigationPrevious });
		}, _ref2.Backspace = function Backspace(event) {
			if (isKeyDownOperationPermitted(event)) dispatch({ type: DropdownKeyDownBackspace });
		}, _ref2;
	}, [dispatch, keyNavigationPrevious]);
	return {
		getSelectedItemProps: (0, import_react.useCallback)(function(_temp) {
			var _extends2;
			var _ref3 = _temp === void 0 ? {} : _temp, _ref3$refKey = _ref3.refKey, refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey, ref = _ref3.ref, onClick = _ref3.onClick, onKeyDown = _ref3.onKeyDown, selectedItemProp = _ref3.selectedItem, indexProp = _ref3.index, rest = _objectWithoutPropertiesLoose$1(_ref3, _excluded$1);
			var latestState = latest.current.state;
			var index = getItemAndIndex(selectedItemProp, indexProp, latestState.selectedItems, "Pass either item or index to getSelectedItemProps!")[1];
			var isFocusable = index > -1 && index === latestState.activeIndex;
			return _extends((_extends2 = {}, _extends2[refKey] = handleRefs(ref, function(selectedItemNode) {
				if (selectedItemNode) selectedItemRefs.current.push(selectedItemNode);
			}), _extends2.tabIndex = isFocusable ? 0 : -1, _extends2.onClick = callAllEventHandlers(onClick, function selectedItemHandleClick() {
				dispatch({
					type: SelectedItemClick,
					index
				});
			}), _extends2.onKeyDown = callAllEventHandlers(onKeyDown, function selectedItemHandleKeyDown(event) {
				var key = normalizeArrowKey(event);
				if (key && selectedItemKeyDownHandlers[key]) selectedItemKeyDownHandlers[key](event);
			}), _extends2), rest);
		}, [
			dispatch,
			latest,
			selectedItemKeyDownHandlers
		]),
		getDropdownProps: (0, import_react.useCallback)(function(_temp2, _temp3) {
			var _extends3;
			var _ref4 = _temp2 === void 0 ? {} : _temp2, _ref4$refKey = _ref4.refKey, refKey = _ref4$refKey === void 0 ? "ref" : _ref4$refKey, ref = _ref4.ref, onKeyDown = _ref4.onKeyDown, onClick = _ref4.onClick, _ref4$preventKeyActio = _ref4.preventKeyAction, preventKeyAction = _ref4$preventKeyActio === void 0 ? false : _ref4$preventKeyActio, rest = _objectWithoutPropertiesLoose$1(_ref4, _excluded2$1);
			var _ref5$suppressRefErro = (_temp3 === void 0 ? {} : _temp3).suppressRefError;
			setGetterPropCallInfo("getDropdownProps", _ref5$suppressRefErro === void 0 ? false : _ref5$suppressRefErro, refKey, dropdownRef);
			return _extends((_extends3 = {}, _extends3[refKey] = handleRefs(ref, function(dropdownNode) {
				if (dropdownNode) dropdownRef.current = dropdownNode;
			}), _extends3), !preventKeyAction && {
				onKeyDown: callAllEventHandlers(onKeyDown, function dropdownHandleKeyDown(event) {
					var key = normalizeArrowKey(event);
					if (key && dropdownKeyDownHandlers[key]) dropdownKeyDownHandlers[key](event);
				}),
				onClick: callAllEventHandlers(onClick, function dropdownHandleClick() {
					dispatch({ type: DropdownClick });
				})
			}, rest);
		}, [
			dispatch,
			dropdownKeyDownHandlers,
			setGetterPropCallInfo
		]),
		addSelectedItem: (0, import_react.useCallback)(function(selectedItem) {
			dispatch({
				type: FunctionAddSelectedItem,
				selectedItem
			});
		}, [dispatch]),
		removeSelectedItem: (0, import_react.useCallback)(function(selectedItem) {
			dispatch({
				type: FunctionRemoveSelectedItem,
				selectedItem
			});
		}, [dispatch]),
		setSelectedItems: (0, import_react.useCallback)(function(newSelectedItems) {
			dispatch({
				type: FunctionSetSelectedItems,
				selectedItems: newSelectedItems
			});
		}, [dispatch]),
		setActiveIndex: (0, import_react.useCallback)(function(newActiveIndex) {
			dispatch({
				type: FunctionSetActiveIndex,
				activeIndex: newActiveIndex
			});
		}, [dispatch]),
		reset: (0, import_react.useCallback)(function() {
			dispatch({ type: FunctionReset });
		}, [dispatch]),
		selectedItems,
		activeIndex
	};
}
var TagClick = 0;
var TagGroupKeyDownArrowLeft = 1;
var TagGroupKeyDownArrowRight = 2;
var TagGroupKeyDownDelete = 3;
var TagGroupKeyDownBackspace = 4;
var TagRemoveClick = 5;
var FunctionAddItem = 6;
var stateChangeTypes = /* @__PURE__ */ Object.freeze({
	__proto__: null,
	FunctionAddItem,
	TagClick,
	TagGroupKeyDownArrowLeft,
	TagGroupKeyDownArrowRight,
	TagGroupKeyDownBackspace,
	TagGroupKeyDownDelete,
	TagRemoveClick
});
function useTagGroupReducer(state, _props, action) {
	var type = action.type;
	var changes;
	switch (type) {
		case TagClick:
			changes = { activeIndex: action.index };
			break;
		case TagGroupKeyDownArrowLeft:
			changes = { activeIndex: state.activeIndex === 0 ? state.items.length - 1 : state.activeIndex - 1 };
			break;
		case TagGroupKeyDownArrowRight:
			changes = { activeIndex: state.activeIndex === state.items.length - 1 ? 0 : state.activeIndex + 1 };
			break;
		case TagGroupKeyDownBackspace:
		case TagGroupKeyDownDelete:
			var newItems = [].concat(state.items.slice(0, state.activeIndex), state.items.slice(state.activeIndex + 1));
			var newActiveIndex = newItems.length === 0 ? -1 : newItems.length === state.activeIndex ? state.activeIndex - 1 : state.activeIndex;
			changes = {
				items: [].concat(state.items.slice(0, state.activeIndex), state.items.slice(state.activeIndex + 1)),
				activeIndex: newActiveIndex
			};
			break;
		case TagRemoveClick:
			var _newItems = [].concat(state.items.slice(0, action.index), state.items.slice(action.index + 1));
			changes = {
				items: _newItems,
				activeIndex: _newItems.length === 0 ? -1 : _newItems.length === action.index ? action.index - 1 : action.index
			};
			break;
		case FunctionAddItem:
			var _newItems2 = [];
			if (action.index === void 0) _newItems2 = [].concat(state.items, [action.item]);
			else _newItems2 = [].concat(state.items.slice(0, action.index), [action.item], state.items.slice(action.index));
			var _newActiveIndex2 = state.activeIndex === -1 ? _newItems2.length - 1 : state.activeIndex;
			changes = {
				items: _newItems2,
				activeIndex: _newActiveIndex2
			};
			break;
		default: throw new Error("Invalid useTagGroup reducer action.");
	}
	return _extends({}, state, changes);
}
var reactUseId = _extends({}, import_react).useId;
// istanbul ignore next
var useElementIds = typeof reactUseId === "function" ? useElementIdsR18 : useElementIdsLegacy;
function useElementIdsR18(_ref) {
	var id = _ref.id, tagGroupId = _ref.tagGroupId, getTagId = _ref.getTagId;
	var reactId = "downshift-" + reactUseId();
	if (!id) id = reactId;
	return import_react.useMemo(function() {
		return {
			tagGroupId: tagGroupId != null ? tagGroupId : id + "-tag-group",
			getTagId: getTagId != null ? getTagId : function(index) {
				return id + "-tag-" + index;
			}
		};
	}, [
		getTagId,
		id,
		tagGroupId
	]);
}
function useElementIdsLegacy(_ref2) {
	var id = _ref2.id, getTagId = _ref2.getTagId, tagGroupId = _ref2.tagGroupId;
	var baseId = import_react.useRef(id != null ? id : "downshift-" + generateId()).current;
	return import_react.useMemo(function() {
		return {
			tagGroupId: tagGroupId != null ? tagGroupId : baseId + "-tag-group",
			getTagId: getTagId != null ? getTagId : function(index) {
				return baseId + "-tag-" + index;
			}
		};
	}, [
		getTagId,
		baseId,
		tagGroupId
	]);
}
function getInitialState(props) {
	var _ref, _props$items, _ref2, _props$activeIndex;
	var items = (_ref = (_props$items = props.items) != null ? _props$items : props.initialItems) != null ? _ref : [];
	return {
		activeIndex: (_ref2 = (_props$activeIndex = props.activeIndex) != null ? _props$activeIndex : props.initialActiveIndex) != null ? _ref2 : items.length === 0 ? -1 : 0,
		items
	};
}
function isStateEqual(oldState, newState) {
	return oldState.activeIndex === newState.activeIndex && oldState.items === newState.items;
}
var A11Y_DESCRIPTION_ELEMENT_ID = "tag-group-a11y-description";
function useAccessibleDescription(document, description) {
	import_react.useEffect(function() {
		if (!document) return;
		var accessibleDescriptionElement = document.createElement("div");
		accessibleDescriptionElement.setAttribute("id", A11Y_DESCRIPTION_ELEMENT_ID);
		accessibleDescriptionElement.style.display = "none";
		accessibleDescriptionElement.textContent = description;
		document.body.appendChild(accessibleDescriptionElement);
		return function() {
			accessibleDescriptionElement.remove();
		};
	}, [description, document]);
}
function getMergedProps(userProps) {
	return _extends({
		stateReducer: function stateReducer(_s, _ref) {
			return _ref.changes;
		},
		environment: typeof window === "undefined" || false ? void 0 : window,
		removeElementDescription: "Press Delete or Backspace to remove tag."
	}, userProps);
}
/**
* Focuses the tag at activeIndex when it changes or when an item is removed.
*/
function useRovingTagFocus(activeIndex, itemsLength, getTagId) {
	var itemRefs = import_react.useRef({});
	var previousActiveIndexRef = import_react.useRef(activeIndex);
	var previousItemsLengthRef = import_react.useRef(itemsLength);
	import_react.useEffect(function() {
		if (activeIndex !== -1 && previousActiveIndexRef.current !== -1 && activeIndex !== previousActiveIndexRef.current || previousItemsLengthRef.current === itemsLength + 1) {
			var _itemRefs$current$get;
			(_itemRefs$current$get = itemRefs.current[getTagId(activeIndex)]) == null || _itemRefs$current$get.focus();
		}
		previousActiveIndexRef.current = activeIndex;
		previousItemsLengthRef.current = itemsLength;
	}, [
		activeIndex,
		getTagId,
		itemsLength
	]);
	return itemRefs;
}
var propTypes = { isItemDisabled: import_prop_types.default.func };
var _excluded = ["onKeyDown"], _excluded2 = [
	"index",
	"refKey",
	"ref",
	"onClick"
], _excluded3 = ["index", "onClick"];
var _useTagGroup = function useTagGroup(userProps) {
	var _props$environment;
	if (userProps === void 0) userProps = {};
	validatePropTypes$1(userProps, _useTagGroup, propTypes);
	var props = getMergedProps(userProps);
	var _useControlledReducer = useControlledReducer$1(useTagGroupReducer, props, getInitialState, isStateEqual), state = _useControlledReducer[0], dispatch = _useControlledReducer[1];
	var activeIndex = state.activeIndex, items = state.items;
	var latest = useLatestRef({
		state,
		props
	});
	var elementIds = useElementIds({
		getTagId: props.getTagId,
		id: props.id,
		tagGroupId: props.tagGroupId
	});
	useAccessibleDescription((_props$environment = props.environment) == null ? void 0 : _props$environment.document, props.removeElementDescription);
	var itemRefs = useRovingTagFocus(activeIndex, items.length, elementIds.getTagId);
	var getTagGroupProps = (0, import_react.useCallback)(function(options) {
		var _ref = options != null ? options : {}, onKeyDown = _ref.onKeyDown, rest = _objectWithoutPropertiesLoose$1(_ref, _excluded);
		return _extends({
			id: elementIds.tagGroupId,
			"aria-live": "polite",
			"aria-atomic": "false",
			"aria-relevant": "additions",
			role: "listbox",
			onKeyDown: callAllEventHandlers$1(onKeyDown, function handleKeyDown(e) {
				switch (e.key) {
					case "ArrowLeft":
						dispatch({ type: TagGroupKeyDownArrowLeft });
						break;
					case "ArrowRight":
						dispatch({ type: TagGroupKeyDownArrowRight });
						break;
					case "Delete":
						dispatch({ type: TagGroupKeyDownDelete });
						break;
					case "Backspace":
						dispatch({ type: TagGroupKeyDownBackspace });
						break;
				}
			})
		}, rest);
	}, [dispatch, elementIds.tagGroupId]);
	var getTagProps = (0, import_react.useCallback)(function(options) {
		var _extends2;
		var index = options.index, _options$refKey = options.refKey, refKey = _options$refKey === void 0 ? "ref" : _options$refKey, ref = options.ref, onClick = options.onClick, rest = _objectWithoutPropertiesLoose$1(options, _excluded2);
		if (!Number.isInteger(index) || index < 0) throw new Error("Pass correct item index to getTagProps!");
		var latestState = latest.current.state;
		var handleClick = function handleClick() {
			dispatch({
				type: TagClick,
				index
			});
		};
		var tagId = elementIds.getTagId(index);
		return _extends((_extends2 = { "aria-describedby": A11Y_DESCRIPTION_ELEMENT_ID }, _extends2[refKey] = handleRefs$1(ref, function(itemNode) {
			if (itemNode) itemRefs.current[tagId] = itemNode;
		}), _extends2["aria-labelledby"] = tagId, _extends2.role = "option", _extends2.id = tagId, _extends2.onClick = callAllEventHandlers$1(onClick, handleClick), _extends2.tabIndex = latestState.activeIndex === index ? 0 : -1, _extends2), rest);
	}, [
		dispatch,
		elementIds,
		latest,
		itemRefs
	]);
	var getTagRemoveProps = (0, import_react.useCallback)(function(options) {
		var index = options.index, onClick = options.onClick, rest = _objectWithoutPropertiesLoose$1(options, _excluded3);
		if (!Number.isInteger(index) || index < 0) throw new Error("Pass correct item index to getTagRemoveProps!");
		var handleClick = function handleClick(event) {
			event.stopPropagation();
			dispatch({
				type: TagRemoveClick,
				index
			});
		};
		var tagId = elementIds.getTagId(index);
		var tagRemoveId = tagId + "-remove";
		return _extends({
			id: tagRemoveId,
			tabIndex: -1,
			"aria-labelledby": tagRemoveId + " " + tagId,
			onClick: callAllEventHandlers$1(onClick, handleClick)
		}, rest);
	}, [elementIds, dispatch]);
	return {
		activeIndex,
		addItem: (0, import_react.useCallback)(function(item, index) {
			dispatch({
				type: FunctionAddItem,
				item,
				index
			});
		}, [dispatch]),
		getTagGroupProps,
		getTagProps,
		getTagRemoveProps,
		items
	};
};
_useTagGroup.stateChangeTypes = stateChangeTypes;
//#endregion
//#region src/components/autocomplete/Autocomplete.tsx
var inst = {};
function findItem(strict, suggestions, value) {
	if (strict) {
		const idx = suggestions.findIndex((item) => item.id === value);
		return idx === -1 ? null : suggestions[idx];
	}
	return value;
}
function getItemName(item) {
	if (item == null) return "";
	else if (typeof item === "string") return item;
	return item.name || "";
}
function getItemId(item) {
	if (typeof item === "string") return item;
	return item ? item.id : null;
}
function defaultFilterSuggestion(suggestion, value) {
	return getNormalisedString(getItemName(suggestion)).includes(getNormalisedString(value));
}
function defaultFilterSuggestions(suggestions, value) {
	return suggestions.filter((suggestion) => defaultFilterSuggestion(suggestion, value));
}
function fireUpdate(onUpdate, strict, suggestions, index, value) {
	let selected = null;
	if (!strict) selected = value;
	else if (index == null) {
		const sug = suggestions.find((sug) => sug.id === value);
		if (sug) selected = sug.id;
	} else if (index < suggestions.length) selected = suggestions[index].id;
	onUpdate?.(selected, value);
}
function defaultRenderInput(props) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
		"data-1p-ignore": true,
		...props
	});
}
function defaultRenderItems(items, getItemProps, highlightedIndex) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: items.map((item, index) => {
		const name = getItemName(item);
		return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
			...getItemProps({ item }),
			role: "button",
			className: css({
				padding: 5,
				cursor: "default",
				backgroundColor: highlightedIndex === index ? theme.menuAutoCompleteBackgroundHover : void 0
			}),
			children: name
		}, name);
	}) });
}
function defaultShouldSaveFromKey$1(e) {
	return e.code === "Enter";
}
function defaultItemToString(item) {
	return item ? getItemName(item) : "";
}
function SingleAutocomplete(t0) {
	const $ = (0, import_compiler_runtime.c)(125);
	const { focused, embedded: t1, containerProps, labelProps: t2, inputProps: t3, suggestions, renderInput: t4, renderItems: t5, itemToString: t6, shouldSaveFromKey: t7, filterSuggestions: t8, openOnFocus: t9, getHighlightedIndex, highlightFirst, onUpdate, strict, onSelect, clearOnBlur: t10, clearOnSelect: t11, closeOnBlur: t12, closeOnSelect: t13, updateOnValueChange: t14, onClose, value: initialValue } = t0;
	const embedded = t1 === void 0 ? false : t1;
	let t15;
	if ($[0] !== t2) {
		t15 = t2 === void 0 ? {} : t2;
		$[0] = t2;
		$[1] = t15;
	} else t15 = $[1];
	const labelProps = t15;
	let inputProps = t3 === void 0 ? {} : t3;
	const renderInput = t4 === void 0 ? defaultRenderInput : t4;
	const renderItems = t5 === void 0 ? defaultRenderItems : t5;
	const itemToString = t6 === void 0 ? defaultItemToString : t6;
	const shouldSaveFromKey = t7 === void 0 ? defaultShouldSaveFromKey$1 : t7;
	const filterSuggestions = t8 === void 0 ? defaultFilterSuggestions : t8;
	const openOnFocus = t9 === void 0 ? true : t9;
	const clearOnBlur = t10 === void 0 ? true : t10;
	const clearOnSelect = t11 === void 0 ? false : t11;
	const closeOnBlur = t12 === void 0 ? true : t12;
	const closeOnSelect = t13 === void 0 ? !clearOnSelect : t13;
	const updateOnValueChange = t14 === void 0 ? false : t14;
	let t16;
	if ($[2] !== initialValue || $[3] !== strict || $[4] !== suggestions) {
		t16 = () => findItem(strict, suggestions, initialValue);
		$[2] = initialValue;
		$[3] = strict;
		$[4] = suggestions;
		$[5] = t16;
	} else t16 = $[5];
	const [selectedItem, setSelectedItem] = (0, import_react.useState)(t16);
	let t17;
	if ($[6] !== selectedItem) {
		t17 = selectedItem ? getItemName(selectedItem) : "";
		$[6] = selectedItem;
		$[7] = t17;
	} else t17 = $[7];
	const [value, setValue] = (0, import_react.useState)(t17);
	const [isChanged, setIsChanged] = (0, import_react.useState)(false);
	const [originalItem, setOriginalItem] = (0, import_react.useState)(selectedItem);
	let t18;
	if ($[8] !== filterSuggestions || $[9] !== suggestions || $[10] !== value) {
		t18 = filterSuggestions(suggestions, value);
		$[8] = filterSuggestions;
		$[9] = suggestions;
		$[10] = value;
		$[11] = t18;
	} else t18 = $[11];
	const filteredSuggestions = t18;
	const [highlightedIndex, setHighlightedIndex] = (0, import_react.useState)(null);
	const [isOpen, setIsOpen] = (0, import_react.useState)(embedded);
	const [allowOpening, setAllowOpening] = (0, import_react.useState)(true);
	let t19;
	let t20;
	if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
		t19 = () => {
			const setAllowOpenChange = () => setTimeout(() => setAllowOpening(true));
			window.addEventListener("focus", setAllowOpenChange);
			const setDontAllowOpenChange = () => setAllowOpening(false);
			window.addEventListener("blur", setDontAllowOpenChange);
			return () => {
				window.removeEventListener("focus", setAllowOpenChange);
				window.removeEventListener("blur", setDontAllowOpenChange);
			};
		};
		t20 = [];
		$[12] = t19;
		$[13] = t20;
	} else {
		t19 = $[12];
		t20 = $[13];
	}
	(0, import_react.useEffect)(t19, t20);
	let t21;
	if ($[14] !== allowOpening || $[15] !== setIsOpen) {
		t21 = () => {
			if (allowOpening) setIsOpen(true);
		};
		$[14] = allowOpening;
		$[15] = setIsOpen;
		$[16] = t21;
	} else t21 = $[16];
	const open = t21;
	let t22;
	if ($[17] !== onClose || $[18] !== setIsOpen) {
		t22 = () => {
			if (document.hasFocus()) {
				setIsOpen(false);
				onClose?.();
			}
		};
		$[17] = onClose;
		$[18] = setIsOpen;
		$[19] = t22;
	} else t22 = $[19];
	const close = t22;
	const triggerRef = (0, import_react.useRef)(null);
	const itemsViewRef = (0, import_react.useRef)(null);
	const { isNarrowWidth } = useResponsive();
	let t23;
	if ($[20] !== embedded || $[21] !== isNarrowWidth) {
		t23 = embedded && isNarrowWidth ? { ...styles.mobileMenuItem } : {};
		$[20] = embedded;
		$[21] = isNarrowWidth;
		$[22] = t23;
	} else t23 = $[22];
	const narrowInputStyle = t23;
	inputProps = {
		...inputProps,
		style: {
			...narrowInputStyle,
			...inputProps.style
		}
	};
	let t24;
	if ($[23] !== initialValue || $[24] !== setSelectedItem || $[25] !== strict || $[26] !== suggestions) {
		t24 = () => {
			setSelectedItem(findItem(strict, suggestions, initialValue));
		};
		$[23] = initialValue;
		$[24] = setSelectedItem;
		$[25] = strict;
		$[26] = suggestions;
		$[27] = t24;
	} else t24 = $[27];
	let t25;
	if ($[28] !== initialValue || $[29] !== strict || $[30] !== suggestions) {
		t25 = [
			initialValue,
			suggestions,
			strict
		];
		$[28] = initialValue;
		$[29] = strict;
		$[30] = suggestions;
		$[31] = t25;
	} else t25 = $[31];
	(0, import_react.useEffect)(t24, t25);
	let t26;
	if ($[32] !== initialValue || $[33] !== setValue || $[34] !== strict || $[35] !== suggestions || $[36] !== updateOnValueChange) {
		t26 = () => {
			if (updateOnValueChange) {
				const item = findItem(strict, suggestions, initialValue);
				setValue(item ? getItemName(item) : "");
			}
		};
		$[32] = initialValue;
		$[33] = setValue;
		$[34] = strict;
		$[35] = suggestions;
		$[36] = updateOnValueChange;
		$[37] = t26;
	} else t26 = $[37];
	let t27;
	if ($[38] !== initialValue || $[39] !== strict || $[40] !== suggestions || $[41] !== updateOnValueChange) {
		t27 = [
			strict,
			suggestions,
			initialValue,
			updateOnValueChange
		];
		$[38] = initialValue;
		$[39] = strict;
		$[40] = suggestions;
		$[41] = updateOnValueChange;
		$[42] = t27;
	} else t27 = $[42];
	(0, import_react.useEffect)(t26, t27);
	let t28;
	if ($[43] !== embedded || $[44] !== initialValue || $[45] !== setHighlightedIndex || $[46] !== setIsChanged || $[47] !== setIsOpen || $[48] !== setOriginalItem || $[49] !== setSelectedItem || $[50] !== setValue || $[51] !== strict || $[52] !== suggestions) {
		t28 = function resetState(newValue) {
			const selectedItem_0 = findItem(strict, suggestions, newValue === void 0 ? initialValue : newValue);
			setSelectedItem(selectedItem_0);
			setValue(selectedItem_0 ? getItemName(selectedItem_0) : "");
			setOriginalItem(selectedItem_0);
			setHighlightedIndex(null);
			setIsOpen(embedded);
			setIsChanged(false);
		};
		$[43] = embedded;
		$[44] = initialValue;
		$[45] = setHighlightedIndex;
		$[46] = setIsChanged;
		$[47] = setIsOpen;
		$[48] = setOriginalItem;
		$[49] = setSelectedItem;
		$[50] = setValue;
		$[51] = strict;
		$[52] = suggestions;
		$[53] = t28;
	} else t28 = $[53];
	const resetState = t28;
	let t29;
	if ($[54] !== setHighlightedIndex || $[55] !== setIsChanged || $[56] !== setSelectedItem || $[57] !== setValue) {
		t29 = function onSelectAfter() {
			setValue("");
			setSelectedItem(null);
			setHighlightedIndex(null);
			setIsChanged(false);
		};
		$[54] = setHighlightedIndex;
		$[55] = setIsChanged;
		$[56] = setSelectedItem;
		$[57] = setValue;
		$[58] = t29;
	} else t29 = $[58];
	const onSelectAfter = t29;
	const filtered = isChanged ? filteredSuggestions || suggestions : suggestions;
	const inputRef = (0, import_react.useRef)(null);
	useProperFocus(inputRef, focused);
	let t30;
	if ($[59] !== clearOnSelect || $[60] !== close || $[61] !== closeOnSelect || $[62] !== onSelect || $[63] !== setHighlightedIndex || $[64] !== setSelectedItem || $[65] !== setValue) {
		t30 = (item_0, t31) => {
			const { inputValue } = t31;
			setSelectedItem(item_0);
			setHighlightedIndex(null);
			if (clearOnSelect) setValue("");
			if (closeOnSelect) close();
			if (onSelect) setTimeout(() => {
				onSelect(getItemId(item_0), inputValue);
			}, 0);
		};
		$[59] = clearOnSelect;
		$[60] = close;
		$[61] = closeOnSelect;
		$[62] = onSelect;
		$[63] = setHighlightedIndex;
		$[64] = setSelectedItem;
		$[65] = setValue;
		$[66] = t30;
	} else t30 = $[66];
	const t31 = selectedItem instanceof Object ? selectedItem : null;
	let t32;
	if ($[67] !== filterSuggestions || $[68] !== getHighlightedIndex || $[69] !== highlightFirst || $[70] !== onUpdate || $[71] !== open || $[72] !== setHighlightedIndex || $[73] !== setIsChanged || $[74] !== setValue || $[75] !== strict || $[76] !== suggestions) {
		t32 = (value_0, changes) => {
			if (!document.hasFocus()) return;
			if ([
				Downshift.stateChangeTypes.controlledPropUpdatedSelectedItem,
				Downshift.stateChangeTypes.touchEnd,
				Downshift.stateChangeTypes.mouseUp
			].includes(changes.type)) return;
			const filteredSuggestions_0 = filterSuggestions(suggestions, value_0);
			if (value_0 === "") {
				if (changes.type !== Downshift.stateChangeTypes.clickItem) fireUpdate(onUpdate, strict, filteredSuggestions_0, null, null);
				setHighlightedIndex(null);
			} else {
				const defaultGetHighlightedIndex = (filteredSuggestions_1) => highlightFirst && filteredSuggestions_1.length ? 0 : null;
				const highlightedIndex_0 = (getHighlightedIndex || defaultGetHighlightedIndex)(filteredSuggestions_0);
				if (changes.type !== Downshift.stateChangeTypes.clickItem) fireUpdate(onUpdate, strict, filteredSuggestions_0, highlightedIndex_0, value_0);
				setHighlightedIndex(highlightedIndex_0);
			}
			setValue(value_0);
			setIsChanged(true);
			open();
		};
		$[67] = filterSuggestions;
		$[68] = getHighlightedIndex;
		$[69] = highlightFirst;
		$[70] = onUpdate;
		$[71] = open;
		$[72] = setHighlightedIndex;
		$[73] = setIsChanged;
		$[74] = setValue;
		$[75] = strict;
		$[76] = suggestions;
		$[77] = t32;
	} else t32 = $[77];
	let t33;
	if ($[78] !== clearOnBlur || $[79] !== filteredSuggestions || $[80] !== highlightedIndex || $[81] !== isOpen || $[82] !== onUpdate || $[83] !== setHighlightedIndex || $[84] !== setSelectedItem || $[85] !== strict || $[86] !== suggestions || $[87] !== value) {
		t33 = (changes_0) => {
			if (!clearOnBlur && (changes_0.type === Downshift.stateChangeTypes.mouseUp || changes_0.type === Downshift.stateChangeTypes.touchEnd)) return;
			if ("highlightedIndex" in changes_0 && changes_0.type !== Downshift.stateChangeTypes.changeInput) setHighlightedIndex(changes_0.highlightedIndex);
			if ("selectedItem" in changes_0) setSelectedItem(changes_0.selectedItem);
			if (isOpen && (changes_0.type === Downshift.stateChangeTypes.keyDownArrowUp || changes_0.type === Downshift.stateChangeTypes.keyDownArrowDown)) fireUpdate(onUpdate, strict, filteredSuggestions || suggestions, changes_0.highlightedIndex != null ? changes_0.highlightedIndex : highlightedIndex, value);
			inst.lastChangeType = changes_0.type;
		};
		$[78] = clearOnBlur;
		$[79] = filteredSuggestions;
		$[80] = highlightedIndex;
		$[81] = isOpen;
		$[82] = onUpdate;
		$[83] = setHighlightedIndex;
		$[84] = setSelectedItem;
		$[85] = strict;
		$[86] = suggestions;
		$[87] = value;
		$[88] = t33;
	} else t33 = $[88];
	const t34 = labelProps?.id;
	let t35;
	if ($[89] !== clearOnBlur || $[90] !== close || $[91] !== closeOnBlur || $[92] !== containerProps || $[93] !== embedded || $[94] !== filtered || $[95] !== inputProps || $[96] !== onSelect || $[97] !== onSelectAfter || $[98] !== onUpdate || $[99] !== open || $[100] !== openOnFocus || $[101] !== originalItem || $[102] !== renderInput || $[103] !== renderItems || $[104] !== resetState || $[105] !== selectedItem || $[106] !== setHighlightedIndex || $[107] !== setSelectedItem || $[108] !== setValue || $[109] !== shouldSaveFromKey || $[110] !== strict || $[111] !== suggestions || $[112] !== value) {
		t35 = (t36) => {
			const { getInputProps, getItemProps, isOpen: isOpen_0, inputValue: inputValue_0, highlightedIndex: highlightedIndex_1 } = t36;
			const wrappedGetItemProps = (itemProps) => getItemProps({ ...itemProps });
			return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
				className: cx(viewStyles, css({ display: "flex" })),
				...containerProps,
				children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
					ref: triggerRef,
					style: { flexShrink: 0 },
					children: renderInput((() => {
						const { className, style, ...restInputProps } = inputProps || {};
						return {
							...getInputProps({
								ref: inputRef,
								...restInputProps,
								onFocus: (e) => {
									inputProps.onFocus?.(e);
									if (openOnFocus) open();
								},
								onBlur: (e_0) => {
									e_0.preventDownshiftDefault = true;
									inputProps.onBlur?.(e_0);
									if (!closeOnBlur) return;
									if (itemsViewRef.current?.contains(e_0.relatedTarget)) {
										e_0.stopPropagation();
										return;
									}
									if (clearOnBlur) {
										if (e_0.target.value === "") {
											onSelect?.(null, e_0.target.value);
											setSelectedItem(null);
											close();
											return;
										}
										resetState(selectedItem ? getItemId(selectedItem) : null);
									} else close();
								},
								onKeyDown: (e_1) => {
									const { onKeyDown } = inputProps || {};
									if (isOpen_0) {
										if (e_1.key === "Enter") if (highlightedIndex_1 != null) if (inst.lastChangeType === Downshift.stateChangeTypes.itemMouseEnter) e_1.preventDefault();
										else e_1.stopPropagation();
										else if (!strict) {
											e_1.stopPropagation();
											onSelect(value, e_1.target.value);
											return onSelectAfter();
										} else {
											e_1.preventDefault();
											onKeyDown?.(e_1);
										}
										else if (shouldSaveFromKey(e_1)) {
											e_1.preventDefault();
											onKeyDown?.(e_1);
										}
									}
									if (e_1.key === "Escape") {
										e_1.nativeEvent.preventDownshiftDefault = true;
										if (!embedded && isOpen_0) e_1.stopPropagation();
										fireUpdate(onUpdate, strict, suggestions, null, getItemId(originalItem));
										setValue(getItemName(originalItem));
										setSelectedItem(findItem(strict, suggestions, originalItem));
										setHighlightedIndex(null);
										if (embedded) open();
										else close();
									}
								}
							}),
							...className && { className },
							...style && { style }
						};
					})())
				}), isOpen_0 && filtered.length > 0 && (embedded ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
					ref: itemsViewRef,
					style: {
						...styles.darkScrollbar,
						marginTop: 5
					},
					"data-testid": "autocomplete",
					children: renderItems(filtered, wrappedGetItemProps, highlightedIndex_1, inputValue_0)
				}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Popover, {
					triggerRef,
					placement: "bottom start",
					offset: 2,
					isOpen: isOpen_0,
					onOpenChange: close,
					isNonModal: true,
					style: {
						...styles.darkScrollbar,
						...styles.popover,
						backgroundColor: theme.menuAutoCompleteBackground,
						color: theme.menuAutoCompleteText,
						minWidth: 200,
						width: triggerRef.current?.clientWidth
					},
					"data-testid": "autocomplete",
					children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
						ref: itemsViewRef,
						children: renderItems(filtered, wrappedGetItemProps, highlightedIndex_1, inputValue_0)
					})
				}))]
			});
		};
		$[89] = clearOnBlur;
		$[90] = close;
		$[91] = closeOnBlur;
		$[92] = containerProps;
		$[93] = embedded;
		$[94] = filtered;
		$[95] = inputProps;
		$[96] = onSelect;
		$[97] = onSelectAfter;
		$[98] = onUpdate;
		$[99] = open;
		$[100] = openOnFocus;
		$[101] = originalItem;
		$[102] = renderInput;
		$[103] = renderItems;
		$[104] = resetState;
		$[105] = selectedItem;
		$[106] = setHighlightedIndex;
		$[107] = setSelectedItem;
		$[108] = setValue;
		$[109] = shouldSaveFromKey;
		$[110] = strict;
		$[111] = suggestions;
		$[112] = value;
		$[113] = t35;
	} else t35 = $[113];
	let t36;
	if ($[114] !== highlightedIndex || $[115] !== isOpen || $[116] !== itemToString || $[117] !== t30 || $[118] !== t31 || $[119] !== t32 || $[120] !== t33 || $[121] !== t34 || $[122] !== t35 || $[123] !== value) {
		t36 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Downshift, {
			onSelect: t30,
			highlightedIndex,
			selectedItem: t31,
			itemToString,
			inputValue: value,
			isOpen,
			onInputValueChange: t32,
			onStateChange: t33,
			labelId: t34,
			children: t35
		});
		$[114] = highlightedIndex;
		$[115] = isOpen;
		$[116] = itemToString;
		$[117] = t30;
		$[118] = t31;
		$[119] = t32;
		$[120] = t33;
		$[121] = t34;
		$[122] = t35;
		$[123] = value;
		$[124] = t36;
	} else t36 = $[124];
	return t36;
}
function MultiItem(t0) {
	const $ = (0, import_compiler_runtime.c)(8);
	const { name, onRemove } = t0;
	let t1;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = {
			alignItems: "center",
			flexDirection: "row",
			backgroundColor: theme.pillBackgroundSelected,
			padding: "2px 4px",
			margin: "2px",
			borderRadius: 4
		};
		$[0] = t1;
	} else t1 = $[0];
	let t2;
	if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = { marginLeft: 1 };
		$[1] = t2;
	} else t2 = $[1];
	let t3;
	if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgRemove, { style: {
			width: 8,
			height: 8
		} });
		$[2] = t3;
	} else t3 = $[2];
	let t4;
	if ($[3] !== onRemove) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
			variant: "bare",
			style: t2,
			onPress: onRemove,
			children: t3
		});
		$[3] = onRemove;
		$[4] = t4;
	} else t4 = $[4];
	let t5;
	if ($[5] !== name || $[6] !== t4) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t1,
			children: [name, t4]
		});
		$[5] = name;
		$[6] = t4;
		$[7] = t5;
	} else t5 = $[7];
	return t5;
}
var defaultMultiAutocompleteInputClassName = css({
	flex: 1,
	minWidth: 30,
	border: 0,
	"&[data-focused]": {
		border: 0,
		boxShadow: "none"
	}
});
function MultiAutocomplete(t0) {
	const $ = (0, import_compiler_runtime.c)(23);
	let onSelect;
	let props;
	let strict;
	let suggestions;
	let t1;
	let t2;
	if ($[0] !== t0) {
		({value: t1, onSelect, suggestions, strict, clearOnBlur: t2, ...props} = t0);
		$[0] = t0;
		$[1] = onSelect;
		$[2] = props;
		$[3] = strict;
		$[4] = suggestions;
		$[5] = t1;
		$[6] = t2;
	} else {
		onSelect = $[1];
		props = $[2];
		strict = $[3];
		suggestions = $[4];
		t1 = $[5];
		t2 = $[6];
	}
	const selectedItems = t1 === void 0 ? [] : t1;
	const clearOnBlur = t2 === void 0 ? true : t2;
	const [focused, setFocused] = (0, import_react.useState)(false);
	const selectedItemIds = selectedItems.map(getItemId);
	const inputRef = (0, import_react.useRef)(null);
	useProperFocus(inputRef, focused);
	const onRemoveItem = function onRemoveItem(id) {
		const items = selectedItemIds.filter((i) => i !== id);
		onSelect(items);
	};
	const onAddItem = function onAddItem(id_0, value) {
		if (id_0) {
			id_0 = id_0.trim();
			onSelect([...selectedItemIds, id_0], value);
		}
	};
	const onKeyDown = function onKeyDown(e, prevOnKeyDown) {
		if (e.key === "Backspace" && e.currentTarget.value === "") onRemoveItem(selectedItemIds[selectedItems.length - 1]);
		prevOnKeyDown?.(e);
	};
	const T0 = Autocomplete;
	const t3 = "single";
	const t4 = null;
	const t5 = true;
	const t6 = suggestions.filter((item) => !selectedItemIds.includes(getItemId(item)));
	let t7;
	if ($[7] !== focused || $[8] !== onKeyDown || $[9] !== onRemoveItem || $[10] !== selectedItems || $[11] !== setFocused || $[12] !== strict || $[13] !== suggestions) {
		t7 = (t8) => {
			const { className: inputClassName, ...inputProps } = t8;
			return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
				style: {
					display: "flex",
					flexWrap: "wrap",
					flexDirection: "row",
					alignItems: "center",
					backgroundColor: theme.tableBackground,
					borderRadius: 4,
					border: "1px solid " + theme.formInputBorder,
					...focused && {
						border: "1px solid " + theme.formInputBorderSelected,
						boxShadow: "0 1px 1px " + theme.formInputShadowSelected
					}
				},
				children: [selectedItems.map((item_0, idx) => {
					item_0 = findItem(strict, suggestions, item_0);
					return item_0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MultiItem, {
						name: getItemName(item_0),
						onRemove: () => onRemoveItem(getItemId(item_0))
					}, getItemId(item_0) || idx);
				}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
					...inputProps,
					ref: inputRef,
					onKeyDown: (e_0) => onKeyDown(e_0, inputProps.onKeyDown),
					onFocus: (e_1) => {
						setFocused(true);
						inputProps.onFocus(e_1);
					},
					onBlur: (e_2) => {
						setFocused(false);
						inputProps.onBlur(e_2);
					},
					className: typeof inputClassName === "function" ? (renderProps) => cx(defaultMultiAutocompleteInputClassName, inputClassName(renderProps)) : cx(defaultMultiAutocompleteInputClassName, inputClassName)
				})]
			});
		};
		$[7] = focused;
		$[8] = onKeyDown;
		$[9] = onRemoveItem;
		$[10] = selectedItems;
		$[11] = setFocused;
		$[12] = strict;
		$[13] = suggestions;
		$[14] = t7;
	} else t7 = $[14];
	let t8;
	if ($[15] !== T0 || $[16] !== clearOnBlur || $[17] !== onAddItem || $[18] !== props || $[19] !== strict || $[20] !== t6 || $[21] !== t7) {
		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(T0, {
			...props,
			type: t3,
			value: t4,
			clearOnBlur,
			clearOnSelect: t5,
			suggestions: t6,
			onSelect: onAddItem,
			highlightFirst: true,
			strict,
			renderInput: t7
		});
		$[15] = T0;
		$[16] = clearOnBlur;
		$[17] = onAddItem;
		$[18] = props;
		$[19] = strict;
		$[20] = t6;
		$[21] = t7;
		$[22] = t8;
	} else t8 = $[22];
	return t8;
}
function AutocompleteFooter(t0) {
	const $ = (0, import_compiler_runtime.c)(5);
	const { show: t1, embedded, children } = t0;
	if (!(t1 === void 0 ? true : t1)) return null;
	let t2;
	if ($[0] !== embedded) {
		t2 = {
			flexShrink: 0,
			...embedded ? { paddingTop: 5 } : { padding: 5 }
		};
		$[0] = embedded;
		$[1] = t2;
	} else t2 = $[1];
	let t3;
	if ($[2] !== children || $[3] !== t2) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t2,
			children
		});
		$[2] = children;
		$[3] = t2;
		$[4] = t3;
	} else t3 = $[4];
	return t3;
}
function Autocomplete(t0) {
	const $ = (0, import_compiler_runtime.c)(6);
	let props;
	if ($[0] !== t0) {
		({...props} = t0);
		$[0] = t0;
		$[1] = props;
	} else props = $[1];
	if (props.type === "multi") {
		let t1;
		if ($[2] !== props) {
			t1 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MultiAutocomplete, { ...props });
			$[2] = props;
			$[3] = t1;
		} else t1 = $[3];
		return t1;
	}
	let t1;
	if ($[4] !== props) {
		t1 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SingleAutocomplete, { ...props });
		$[4] = props;
		$[5] = t1;
	} else t1 = $[5];
	return t1;
}
//#endregion
//#region src/components/autocomplete/ItemHeader.tsx
function ItemHeader(t0) {
	const $ = (0, import_compiler_runtime.c)(15);
	let props;
	let style;
	let title;
	let type;
	if ($[0] !== t0) {
		({title, style, type, ...props} = t0);
		$[0] = t0;
		$[1] = props;
		$[2] = style;
		$[3] = title;
		$[4] = type;
	} else {
		props = $[1];
		style = $[2];
		title = $[3];
		type = $[4];
	}
	const { isNarrowWidth } = useResponsive();
	let t1;
	if ($[5] !== isNarrowWidth) {
		t1 = isNarrowWidth ? {
			...styles.largeText,
			paddingTop: 10,
			paddingBottom: 10
		} : {};
		$[5] = isNarrowWidth;
		$[6] = t1;
	} else t1 = $[6];
	const narrowStyle = t1;
	let t2;
	if ($[7] !== narrowStyle || $[8] !== style) {
		t2 = {
			color: theme.menuAutoCompleteTextHeader,
			padding: "4px 9px",
			...narrowStyle,
			...style
		};
		$[7] = narrowStyle;
		$[8] = style;
		$[9] = t2;
	} else t2 = $[9];
	const t3 = `${title}-${type}-item-group`;
	let t4;
	if ($[10] !== props || $[11] !== t2 || $[12] !== t3 || $[13] !== title) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
			style: t2,
			"data-testid": t3,
			...props,
			children: title
		});
		$[10] = props;
		$[11] = t2;
		$[12] = t3;
		$[13] = title;
		$[14] = t4;
	} else t4 = $[14];
	return t4;
}
//#endregion
//#region src/components/autocomplete/AccountAutocomplete.tsx
function AccountList(t0) {
	const $ = (0, import_compiler_runtime.c)(59);
	const { items, getItemProps, highlightedIndex, embedded, renderAccountItemGroupHeader: t1, renderAccountItem: t2 } = t0;
	const renderAccountItemGroupHeader = t1 === void 0 ? defaultRenderAccountItemGroupHeader : t1;
	const renderAccountItem = t2 === void 0 ? defaultRenderAccountItem : t2;
	const { t } = useTranslation();
	let t3;
	if ($[0] !== items) {
		t3 = items.reduce(_temp$13, {
			onBudgetAccounts: [],
			offBudgetAccounts: [],
			closedAccounts: []
		});
		$[0] = items;
		$[1] = t3;
	} else t3 = $[1];
	const { onBudgetAccounts, offBudgetAccounts, closedAccounts } = t3;
	let t4;
	if ($[2] !== embedded) {
		t4 = !embedded && { maxHeight: 175 };
		$[2] = embedded;
		$[3] = t4;
	} else t4 = $[3];
	let t5;
	if ($[4] !== t4) {
		t5 = {
			overflow: "auto",
			padding: "5px 0",
			...t4
		};
		$[4] = t4;
		$[5] = t5;
	} else t5 = $[5];
	let t6;
	if ($[6] !== onBudgetAccounts.length || $[7] !== renderAccountItemGroupHeader || $[8] !== t) {
		t6 = onBudgetAccounts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children: renderAccountItemGroupHeader({ title: t("On budget") }) }, "On budget");
		$[6] = onBudgetAccounts.length;
		$[7] = renderAccountItemGroupHeader;
		$[8] = t;
		$[9] = t6;
	} else t6 = $[9];
	let t7;
	if ($[10] !== embedded || $[11] !== getItemProps || $[12] !== highlightedIndex || $[13] !== onBudgetAccounts || $[14] !== renderAccountItem) {
		let t8;
		if ($[16] !== embedded || $[17] !== getItemProps || $[18] !== highlightedIndex || $[19] !== renderAccountItem) {
			t8 = (item_0) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children: renderAccountItem({
				...getItemProps ? getItemProps({ item: item_0 }) : {},
				item: item_0,
				highlighted: highlightedIndex === item_0.highlightedIndex,
				embedded
			}) }, item_0.id);
			$[16] = embedded;
			$[17] = getItemProps;
			$[18] = highlightedIndex;
			$[19] = renderAccountItem;
			$[20] = t8;
		} else t8 = $[20];
		t7 = onBudgetAccounts.map(t8);
		$[10] = embedded;
		$[11] = getItemProps;
		$[12] = highlightedIndex;
		$[13] = onBudgetAccounts;
		$[14] = renderAccountItem;
		$[15] = t7;
	} else t7 = $[15];
	let t8;
	if ($[21] !== offBudgetAccounts.length || $[22] !== renderAccountItemGroupHeader || $[23] !== t) {
		t8 = offBudgetAccounts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children: renderAccountItemGroupHeader({ title: t("Off budget") }) }, "Off budget");
		$[21] = offBudgetAccounts.length;
		$[22] = renderAccountItemGroupHeader;
		$[23] = t;
		$[24] = t8;
	} else t8 = $[24];
	let t9;
	if ($[25] !== embedded || $[26] !== getItemProps || $[27] !== highlightedIndex || $[28] !== offBudgetAccounts || $[29] !== renderAccountItem) {
		let t10;
		if ($[31] !== embedded || $[32] !== getItemProps || $[33] !== highlightedIndex || $[34] !== renderAccountItem) {
			t10 = (item_1) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children: renderAccountItem({
				...getItemProps ? getItemProps({ item: item_1 }) : {},
				item: item_1,
				highlighted: highlightedIndex === item_1.highlightedIndex,
				embedded
			}) }, item_1.id);
			$[31] = embedded;
			$[32] = getItemProps;
			$[33] = highlightedIndex;
			$[34] = renderAccountItem;
			$[35] = t10;
		} else t10 = $[35];
		t9 = offBudgetAccounts.map(t10);
		$[25] = embedded;
		$[26] = getItemProps;
		$[27] = highlightedIndex;
		$[28] = offBudgetAccounts;
		$[29] = renderAccountItem;
		$[30] = t9;
	} else t9 = $[30];
	let t10;
	if ($[36] !== closedAccounts.length || $[37] !== renderAccountItemGroupHeader || $[38] !== t) {
		t10 = closedAccounts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children: renderAccountItemGroupHeader({ title: t("Closed accounts") }) }, "Closed accounts");
		$[36] = closedAccounts.length;
		$[37] = renderAccountItemGroupHeader;
		$[38] = t;
		$[39] = t10;
	} else t10 = $[39];
	let t11;
	if ($[40] !== closedAccounts || $[41] !== embedded || $[42] !== getItemProps || $[43] !== highlightedIndex || $[44] !== renderAccountItem) {
		let t12;
		if ($[46] !== embedded || $[47] !== getItemProps || $[48] !== highlightedIndex || $[49] !== renderAccountItem) {
			t12 = (item_2) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children: renderAccountItem({
				...getItemProps ? getItemProps({ item: item_2 }) : {},
				item: item_2,
				highlighted: highlightedIndex === item_2.highlightedIndex,
				embedded
			}) }, item_2.id);
			$[46] = embedded;
			$[47] = getItemProps;
			$[48] = highlightedIndex;
			$[49] = renderAccountItem;
			$[50] = t12;
		} else t12 = $[50];
		t11 = closedAccounts.map(t12);
		$[40] = closedAccounts;
		$[41] = embedded;
		$[42] = getItemProps;
		$[43] = highlightedIndex;
		$[44] = renderAccountItem;
		$[45] = t11;
	} else t11 = $[45];
	let t12;
	if ($[51] !== t10 || $[52] !== t11 || $[53] !== t5 || $[54] !== t6 || $[55] !== t7 || $[56] !== t8 || $[57] !== t9) {
		t12 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t5,
			children: [
				t6,
				t7,
				t8,
				t9,
				t10,
				t11
			]
		}) });
		$[51] = t10;
		$[52] = t11;
		$[53] = t5;
		$[54] = t6;
		$[55] = t7;
		$[56] = t8;
		$[57] = t9;
		$[58] = t12;
	} else t12 = $[58];
	return t12;
}
function _temp$13(acc, item, index) {
	if (item.closed) acc.closedAccounts.push({
		...item,
		highlightedIndex: index
	});
	else if (item.offbudget) acc.offBudgetAccounts.push({
		...item,
		highlightedIndex: index
	});
	else acc.onBudgetAccounts.push({
		...item,
		highlightedIndex: index
	});
	return acc;
}
function AccountAutocomplete(t0) {
	const $ = (0, import_compiler_runtime.c)(32);
	let closeOnBlur;
	let embedded;
	let hiddenAccounts;
	let inputProps;
	let props;
	let renderAccountItem;
	let renderAccountItemGroupHeader;
	let t1;
	if ($[0] !== t0) {
		({embedded, includeClosedAccounts: t1, renderAccountItemGroupHeader, renderAccountItem, closeOnBlur, hiddenAccounts, inputProps, ...props} = t0);
		$[0] = t0;
		$[1] = closeOnBlur;
		$[2] = embedded;
		$[3] = hiddenAccounts;
		$[4] = inputProps;
		$[5] = props;
		$[6] = renderAccountItem;
		$[7] = renderAccountItemGroupHeader;
		$[8] = t1;
	} else {
		closeOnBlur = $[1];
		embedded = $[2];
		hiddenAccounts = $[3];
		inputProps = $[4];
		props = $[5];
		renderAccountItem = $[6];
		renderAccountItemGroupHeader = $[7];
		t1 = $[8];
	}
	const includeClosedAccounts = t1 === void 0 ? true : t1;
	const { t } = useTranslation();
	const { data: t2 } = useAccounts();
	let t3;
	if ($[9] !== hiddenAccounts || $[10] !== includeClosedAccounts || $[11] !== t2) {
		const accounts = t2 === void 0 ? [] : t2;
		let t4;
		if ($[13] !== hiddenAccounts || $[14] !== includeClosedAccounts) {
			t4 = (item) => (includeClosedAccounts ? item : !item.closed) && !hiddenAccounts?.includes(item.id);
			$[13] = hiddenAccounts;
			$[14] = includeClosedAccounts;
			$[15] = t4;
		} else t4 = $[15];
		t3 = accounts.filter(t4).sort(_temp2$8);
		$[9] = hiddenAccounts;
		$[10] = includeClosedAccounts;
		$[11] = t2;
		$[12] = t3;
	} else t3 = $[12];
	const accountSuggestions = t3;
	let t4;
	if ($[16] !== t) {
		t4 = t("Account");
		$[16] = t;
		$[17] = t4;
	} else t4 = $[17];
	let t5;
	if ($[18] !== inputProps || $[19] !== t4) {
		t5 = {
			...inputProps,
			"aria-label": t4
		};
		$[18] = inputProps;
		$[19] = t4;
		$[20] = t5;
	} else t5 = $[20];
	let t6;
	if ($[21] !== embedded || $[22] !== renderAccountItem || $[23] !== renderAccountItemGroupHeader) {
		t6 = (items, getItemProps, highlightedIndex) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccountList, {
			items,
			getItemProps,
			highlightedIndex,
			embedded,
			renderAccountItemGroupHeader,
			renderAccountItem
		});
		$[21] = embedded;
		$[22] = renderAccountItem;
		$[23] = renderAccountItemGroupHeader;
		$[24] = t6;
	} else t6 = $[24];
	let t7;
	if ($[25] !== accountSuggestions || $[26] !== closeOnBlur || $[27] !== embedded || $[28] !== props || $[29] !== t5 || $[30] !== t6) {
		t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Autocomplete, {
			strict: true,
			highlightFirst: true,
			embedded,
			closeOnBlur,
			suggestions: accountSuggestions,
			inputProps: t5,
			renderItems: t6,
			...props
		});
		$[25] = accountSuggestions;
		$[26] = closeOnBlur;
		$[27] = embedded;
		$[28] = props;
		$[29] = t5;
		$[30] = t6;
		$[31] = t7;
	} else t7 = $[31];
	return t7;
}
function _temp2$8(a, b) {
	return a.closed - b.closed || a.offbudget - b.offbudget || a.sort_order - b.sort_order;
}
function defaultRenderAccountItemGroupHeader(props) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ItemHeader, {
		...props,
		type: "account"
	});
}
function AccountItem(t0) {
	const $ = (0, import_compiler_runtime.c)(21);
	let className;
	let embedded;
	let highlighted;
	let item;
	let props;
	if ($[0] !== t0) {
		({item, className, highlighted, embedded, ...props} = t0);
		$[0] = t0;
		$[1] = className;
		$[2] = embedded;
		$[3] = highlighted;
		$[4] = item;
		$[5] = props;
	} else {
		className = $[1];
		embedded = $[2];
		highlighted = $[3];
		item = $[4];
		props = $[5];
	}
	const { isNarrowWidth } = useResponsive();
	let t1;
	let t2;
	if ($[6] !== className || $[7] !== embedded || $[8] !== highlighted || $[9] !== isNarrowWidth) {
		const narrowStyle = isNarrowWidth ? {
			...styles.mobileMenuItem,
			borderRadius: 0,
			borderTop: `1px solid ${theme.pillBorder}`
		} : {};
		t1 = "button";
		t2 = cx(className, css({
			backgroundColor: highlighted ? theme.menuAutoCompleteBackgroundHover : "transparent",
			color: highlighted ? theme.menuAutoCompleteItemTextHover : theme.menuAutoCompleteItemText,
			padding: 4,
			paddingLeft: 20,
			borderRadius: embedded ? 4 : 0,
			border: "none",
			textAlign: "left",
			font: "inherit",
			...narrowStyle
		}));
		$[6] = className;
		$[7] = embedded;
		$[8] = highlighted;
		$[9] = isNarrowWidth;
		$[10] = t1;
		$[11] = t2;
	} else {
		t1 = $[10];
		t2 = $[11];
	}
	const t3 = `${item.name}-account-item`;
	const t4 = highlighted || void 0;
	let t5;
	if ($[12] !== item.name) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextOneLine, { children: item.name });
		$[12] = item.name;
		$[13] = t5;
	} else t5 = $[13];
	let t6;
	if ($[14] !== props || $[15] !== t1 || $[16] !== t2 || $[17] !== t3 || $[18] !== t4 || $[19] !== t5) {
		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
			type: t1,
			className: t2,
			"data-testid": t3,
			"data-highlighted": t4,
			...props,
			children: t5
		});
		$[14] = props;
		$[15] = t1;
		$[16] = t2;
		$[17] = t3;
		$[18] = t4;
		$[19] = t5;
		$[20] = t6;
	} else t6 = $[20];
	return t6;
}
function defaultRenderAccountItem(props) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccountItem, { ...props });
}
//#endregion
//#region ../../node_modules/fzf/dist/fzf.es.js
/** @license
* fzf v0.5.2
* Copyright (c) 2021 Ajit
* Licensed under BSD 3-Clause
*/
var normalized = {
	216: "O",
	223: "s",
	248: "o",
	273: "d",
	295: "h",
	305: "i",
	320: "l",
	322: "l",
	359: "t",
	383: "s",
	384: "b",
	385: "B",
	387: "b",
	390: "O",
	392: "c",
	393: "D",
	394: "D",
	396: "d",
	398: "E",
	400: "E",
	402: "f",
	403: "G",
	407: "I",
	409: "k",
	410: "l",
	412: "M",
	413: "N",
	414: "n",
	415: "O",
	421: "p",
	427: "t",
	429: "t",
	430: "T",
	434: "V",
	436: "y",
	438: "z",
	477: "e",
	485: "g",
	544: "N",
	545: "d",
	549: "z",
	564: "l",
	565: "n",
	566: "t",
	567: "j",
	570: "A",
	571: "C",
	572: "c",
	573: "L",
	574: "T",
	575: "s",
	576: "z",
	579: "B",
	580: "U",
	581: "V",
	582: "E",
	583: "e",
	584: "J",
	585: "j",
	586: "Q",
	587: "q",
	588: "R",
	589: "r",
	590: "Y",
	591: "y",
	592: "a",
	593: "a",
	595: "b",
	596: "o",
	597: "c",
	598: "d",
	599: "d",
	600: "e",
	603: "e",
	604: "e",
	605: "e",
	606: "e",
	607: "j",
	608: "g",
	609: "g",
	610: "G",
	613: "h",
	614: "h",
	616: "i",
	618: "I",
	619: "l",
	620: "l",
	621: "l",
	623: "m",
	624: "m",
	625: "m",
	626: "n",
	627: "n",
	628: "N",
	629: "o",
	633: "r",
	634: "r",
	635: "r",
	636: "r",
	637: "r",
	638: "r",
	639: "r",
	640: "R",
	641: "R",
	642: "s",
	647: "t",
	648: "t",
	649: "u",
	651: "v",
	652: "v",
	653: "w",
	654: "y",
	655: "Y",
	656: "z",
	657: "z",
	663: "c",
	665: "B",
	666: "e",
	667: "G",
	668: "H",
	669: "j",
	670: "k",
	671: "L",
	672: "q",
	686: "h",
	867: "a",
	868: "e",
	869: "i",
	870: "o",
	871: "u",
	872: "c",
	873: "d",
	874: "h",
	875: "m",
	876: "r",
	877: "t",
	878: "v",
	879: "x",
	7424: "A",
	7427: "B",
	7428: "C",
	7429: "D",
	7431: "E",
	7432: "e",
	7433: "i",
	7434: "J",
	7435: "K",
	7436: "L",
	7437: "M",
	7438: "N",
	7439: "O",
	7440: "O",
	7441: "o",
	7442: "o",
	7443: "o",
	7446: "o",
	7447: "o",
	7448: "P",
	7449: "R",
	7450: "R",
	7451: "T",
	7452: "U",
	7453: "u",
	7454: "u",
	7455: "m",
	7456: "V",
	7457: "W",
	7458: "Z",
	7522: "i",
	7523: "r",
	7524: "u",
	7525: "v",
	7834: "a",
	7835: "s",
	8305: "i",
	8341: "h",
	8342: "k",
	8343: "l",
	8344: "m",
	8345: "n",
	8346: "p",
	8347: "s",
	8348: "t",
	8580: "c"
};
for (let i = "̀".codePointAt(0); i <= "ͯ".codePointAt(0); ++i) {
	const diacritic = String.fromCodePoint(i);
	for (const asciiChar of "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz") {
		const withDiacriticCodePoint = (asciiChar + diacritic).normalize().codePointAt(0);
		if (withDiacriticCodePoint > 126) normalized[withDiacriticCodePoint] = asciiChar;
	}
}
var ranges = {
	a: [7844, 7863],
	e: [7870, 7879],
	o: [7888, 7907],
	u: [7912, 7921]
};
for (const lowerChar of Object.keys(ranges)) {
	const upperChar = lowerChar.toUpperCase();
	for (let i = ranges[lowerChar][0]; i <= ranges[lowerChar][1]; ++i) normalized[i] = i % 2 === 0 ? upperChar : lowerChar;
}
function normalizeRune(rune) {
	if (rune < 192 || rune > 8580) return rune;
	const normalizedChar = normalized[rune];
	if (normalizedChar !== void 0) return normalizedChar.codePointAt(0);
	return rune;
}
function toShort(number) {
	return number;
}
function toInt$1(number) {
	return number;
}
function maxInt16(num1, num2) {
	return num1 > num2 ? num1 : num2;
}
var strToRunes = (str) => str.split("").map((s) => s.codePointAt(0));
var whitespaceRunes = new Set(" \f\n\r	\v\xA0 \u2028\u2029  　﻿".split("").map((v) => v.codePointAt(0)));
for (let codePoint = " ".codePointAt(0); codePoint <= " ".codePointAt(0); codePoint++) whitespaceRunes.add(codePoint);
var MAX_ASCII = "".codePointAt(0);
var CAPITAL_A_RUNE = "A".codePointAt(0);
var CAPITAL_Z_RUNE = "Z".codePointAt(0);
var SMALL_A_RUNE = "a".codePointAt(0);
var SMALL_Z_RUNE = "z".codePointAt(0);
var NUMERAL_ZERO_RUNE = "0".codePointAt(0);
var NUMERAL_NINE_RUNE = "9".codePointAt(0);
function indexAt(index, max, forward) {
	if (forward) return index;
	return max - index - 1;
}
var SCORE_MATCH = 16, SCORE_GAP_START = -3, SCORE_GAP_EXTENTION = -1, BONUS_BOUNDARY = SCORE_MATCH / 2, BONUS_NON_WORD = SCORE_MATCH / 2, BONUS_CAMEL_123 = BONUS_BOUNDARY + SCORE_GAP_EXTENTION, BONUS_CONSECUTIVE = -(SCORE_GAP_START + SCORE_GAP_EXTENTION), BONUS_FIRST_CHAR_MULTIPLIER = 2;
function createPosSet(withPos) {
	if (withPos) return /* @__PURE__ */ new Set();
	return null;
}
function alloc16(offset, slab2, size) {
	if (slab2 !== null && slab2.i16.length > offset + size) {
		const subarray = slab2.i16.subarray(offset, offset + size);
		return [offset + size, subarray];
	}
	return [offset, new Int16Array(size)];
}
function alloc32(offset, slab2, size) {
	if (slab2 !== null && slab2.i32.length > offset + size) {
		const subarray = slab2.i32.subarray(offset, offset + size);
		return [offset + size, subarray];
	}
	return [offset, new Int32Array(size)];
}
function charClassOfAscii(rune) {
	if (rune >= SMALL_A_RUNE && rune <= SMALL_Z_RUNE) return 1;
	else if (rune >= CAPITAL_A_RUNE && rune <= CAPITAL_Z_RUNE) return 2;
	else if (rune >= NUMERAL_ZERO_RUNE && rune <= NUMERAL_NINE_RUNE) return 4;
	else return 0;
}
function charClassOfNonAscii(rune) {
	const char = String.fromCodePoint(rune);
	if (char !== char.toUpperCase()) return 1;
	else if (char !== char.toLowerCase()) return 2;
	else if (char.match(/\p{Number}/gu) !== null) return 4;
	else if (char.match(/\p{Letter}/gu) !== null) return 3;
	return 0;
}
function charClassOf(rune) {
	if (rune <= MAX_ASCII) return charClassOfAscii(rune);
	return charClassOfNonAscii(rune);
}
function bonusFor(prevClass, currClass) {
	if (prevClass === 0 && currClass !== 0) return BONUS_BOUNDARY;
	else if (prevClass === 1 && currClass === 2 || prevClass !== 4 && currClass === 4) return BONUS_CAMEL_123;
	else if (currClass === 0) return BONUS_NON_WORD;
	return 0;
}
function bonusAt(input, idx) {
	if (idx === 0) return BONUS_BOUNDARY;
	return bonusFor(charClassOf(input[idx - 1]), charClassOf(input[idx]));
}
function trySkip(input, caseSensitive, char, from) {
	let rest = input.slice(from);
	let idx = rest.indexOf(char);
	if (idx === 0) return from;
	if (!caseSensitive && char >= SMALL_A_RUNE && char <= SMALL_Z_RUNE) {
		if (idx > 0) rest = rest.slice(0, idx);
		const uidx = rest.indexOf(char - 32);
		if (uidx >= 0) idx = uidx;
	}
	if (idx < 0) return -1;
	return from + idx;
}
function isAscii(runes) {
	for (const rune of runes) if (rune >= 128) return false;
	return true;
}
function asciiFuzzyIndex(input, pattern, caseSensitive) {
	if (!isAscii(input)) return 0;
	if (!isAscii(pattern)) return -1;
	let firstIdx = 0, idx = 0;
	for (let pidx = 0; pidx < pattern.length; pidx++) {
		idx = trySkip(input, caseSensitive, pattern[pidx], idx);
		if (idx < 0) return -1;
		if (pidx === 0 && idx > 0) firstIdx = idx - 1;
		idx++;
	}
	return firstIdx;
}
var fuzzyMatchV2 = (caseSensitive, normalize, forward, input, pattern, withPos, slab2) => {
	const M = pattern.length;
	if (M === 0) return [{
		start: 0,
		end: 0,
		score: 0
	}, createPosSet(withPos)];
	const N = input.length;
	if (slab2 !== null && N * M > slab2.i16.length) return fuzzyMatchV1(caseSensitive, normalize, forward, input, pattern, withPos);
	const idx = asciiFuzzyIndex(input, pattern, caseSensitive);
	if (idx < 0) return [{
		start: -1,
		end: -1,
		score: 0
	}, null];
	let offset16 = 0, offset32 = 0, H0 = null, C0 = null, B = null, F = null;
	[offset16, H0] = alloc16(offset16, slab2, N);
	[offset16, C0] = alloc16(offset16, slab2, N);
	[offset16, B] = alloc16(offset16, slab2, N);
	[offset32, F] = alloc32(offset32, slab2, M);
	const [, T] = alloc32(offset32, slab2, N);
	for (let i = 0; i < T.length; i++) T[i] = input[i];
	let maxScore = toShort(0), maxScorePos = 0;
	let pidx = 0, lastIdx = 0;
	const pchar0 = pattern[0];
	let pchar = pattern[0], prevH0 = toShort(0), prevCharClass = 0, inGap = false;
	let Tsub = T.subarray(idx);
	let H0sub = H0.subarray(idx).subarray(0, Tsub.length), C0sub = C0.subarray(idx).subarray(0, Tsub.length), Bsub = B.subarray(idx).subarray(0, Tsub.length);
	for (let [off, char] of Tsub.entries()) {
		let charClass = null;
		if (char <= MAX_ASCII) {
			charClass = charClassOfAscii(char);
			if (!caseSensitive && charClass === 2) char += 32;
		} else {
			charClass = charClassOfNonAscii(char);
			if (!caseSensitive && charClass === 2) char = String.fromCodePoint(char).toLowerCase().codePointAt(0);
			if (normalize) char = normalizeRune(char);
		}
		Tsub[off] = char;
		const bonus = bonusFor(prevCharClass, charClass);
		Bsub[off] = bonus;
		prevCharClass = charClass;
		if (char === pchar) {
			if (pidx < M) {
				F[pidx] = toInt$1(idx + off);
				pidx++;
				pchar = pattern[Math.min(pidx, M - 1)];
			}
			lastIdx = idx + off;
		}
		if (char === pchar0) {
			const score = SCORE_MATCH + bonus * BONUS_FIRST_CHAR_MULTIPLIER;
			H0sub[off] = score;
			C0sub[off] = 1;
			if (M === 1 && (forward && score > maxScore || !forward && score >= maxScore)) {
				maxScore = score;
				maxScorePos = idx + off;
				if (forward && bonus === BONUS_BOUNDARY) break;
			}
			inGap = false;
		} else {
			if (inGap) H0sub[off] = maxInt16(prevH0 + SCORE_GAP_EXTENTION, 0);
			else H0sub[off] = maxInt16(prevH0 + SCORE_GAP_START, 0);
			C0sub[off] = 0;
			inGap = true;
		}
		prevH0 = H0sub[off];
	}
	if (pidx !== M) return [{
		start: -1,
		end: -1,
		score: 0
	}, null];
	if (M === 1) {
		const result = {
			start: maxScorePos,
			end: maxScorePos + 1,
			score: maxScore
		};
		if (!withPos) return [result, null];
		const pos2 = /* @__PURE__ */ new Set();
		pos2.add(maxScorePos);
		return [result, pos2];
	}
	const f0 = F[0];
	const width = lastIdx - f0 + 1;
	let H = null;
	[offset16, H] = alloc16(offset16, slab2, width * M);
	{
		const toCopy = H0.subarray(f0, lastIdx + 1);
		for (const [i, v] of toCopy.entries()) H[i] = v;
	}
	let [, C] = alloc16(offset16, slab2, width * M);
	{
		const toCopy = C0.subarray(f0, lastIdx + 1);
		for (const [i, v] of toCopy.entries()) C[i] = v;
	}
	const Fsub = F.subarray(1);
	const Psub = pattern.slice(1).slice(0, Fsub.length);
	for (const [off, f] of Fsub.entries()) {
		let inGap2 = false;
		const pchar2 = Psub[off], pidx2 = off + 1, row = pidx2 * width, Tsub2 = T.subarray(f, lastIdx + 1), Bsub2 = B.subarray(f).subarray(0, Tsub2.length), Csub = C.subarray(row + f - f0).subarray(0, Tsub2.length), Cdiag = C.subarray(row + f - f0 - 1 - width).subarray(0, Tsub2.length), Hsub = H.subarray(row + f - f0).subarray(0, Tsub2.length), Hdiag = H.subarray(row + f - f0 - 1 - width).subarray(0, Tsub2.length), Hleft = H.subarray(row + f - f0 - 1).subarray(0, Tsub2.length);
		Hleft[0] = 0;
		for (const [off2, char] of Tsub2.entries()) {
			const col = off2 + f;
			let s1 = 0, s2 = 0, consecutive = 0;
			if (inGap2) s2 = Hleft[off2] + SCORE_GAP_EXTENTION;
			else s2 = Hleft[off2] + SCORE_GAP_START;
			if (pchar2 === char) {
				s1 = Hdiag[off2] + SCORE_MATCH;
				let b = Bsub2[off2];
				consecutive = Cdiag[off2] + 1;
				if (b === BONUS_BOUNDARY) consecutive = 1;
				else if (consecutive > 1) b = maxInt16(b, maxInt16(BONUS_CONSECUTIVE, B[col - consecutive + 1]));
				if (s1 + b < s2) {
					s1 += Bsub2[off2];
					consecutive = 0;
				} else s1 += b;
			}
			Csub[off2] = consecutive;
			inGap2 = s1 < s2;
			const score = maxInt16(maxInt16(s1, s2), 0);
			if (pidx2 === M - 1 && (forward && score > maxScore || !forward && score >= maxScore)) {
				maxScore = score;
				maxScorePos = col;
			}
			Hsub[off2] = score;
		}
	}
	const pos = createPosSet(withPos);
	let j = f0;
	if (withPos && pos !== null) {
		let i = M - 1;
		j = maxScorePos;
		let preferMatch = true;
		while (true) {
			const I = i * width, j0 = j - f0, s = H[I + j0];
			let s1 = 0, s2 = 0;
			if (i > 0 && j >= F[i]) s1 = H[I - width + j0 - 1];
			if (j > F[i]) s2 = H[I + j0 - 1];
			if (s > s1 && (s > s2 || s === s2 && preferMatch)) {
				pos.add(j);
				if (i === 0) break;
				i--;
			}
			preferMatch = C[I + j0] > 1 || I + width + j0 + 1 < C.length && C[I + width + j0 + 1] > 0;
			j--;
		}
	}
	return [{
		start: j,
		end: maxScorePos + 1,
		score: maxScore
	}, pos];
};
function calculateScore(caseSensitive, normalize, text, pattern, sidx, eidx, withPos) {
	let pidx = 0, score = 0, inGap = false, consecutive = 0, firstBonus = toShort(0);
	const pos = createPosSet(withPos);
	let prevCharClass = 0;
	if (sidx > 0) prevCharClass = charClassOf(text[sidx - 1]);
	for (let idx = sidx; idx < eidx; idx++) {
		let rune = text[idx];
		const charClass = charClassOf(rune);
		if (!caseSensitive) {
			if (rune >= CAPITAL_A_RUNE && rune <= CAPITAL_Z_RUNE) rune += 32;
			else if (rune > MAX_ASCII) rune = String.fromCodePoint(rune).toLowerCase().codePointAt(0);
		}
		if (normalize) rune = normalizeRune(rune);
		if (rune === pattern[pidx]) {
			if (withPos && pos !== null) pos.add(idx);
			score += SCORE_MATCH;
			let bonus = bonusFor(prevCharClass, charClass);
			if (consecutive === 0) firstBonus = bonus;
			else {
				if (bonus === BONUS_BOUNDARY) firstBonus = bonus;
				bonus = maxInt16(maxInt16(bonus, firstBonus), BONUS_CONSECUTIVE);
			}
			if (pidx === 0) score += bonus * BONUS_FIRST_CHAR_MULTIPLIER;
			else score += bonus;
			inGap = false;
			consecutive++;
			pidx++;
		} else {
			if (inGap) score += SCORE_GAP_EXTENTION;
			else score += SCORE_GAP_START;
			inGap = true;
			consecutive = 0;
			firstBonus = 0;
		}
		prevCharClass = charClass;
	}
	return [score, pos];
}
var fuzzyMatchV1 = (caseSensitive, normalize, forward, text, pattern, withPos, slab2) => {
	if (pattern.length === 0) return [{
		start: 0,
		end: 0,
		score: 0
	}, null];
	if (asciiFuzzyIndex(text, pattern, caseSensitive) < 0) return [{
		start: -1,
		end: -1,
		score: 0
	}, null];
	let pidx = 0, sidx = -1, eidx = -1;
	const lenRunes = text.length;
	const lenPattern = pattern.length;
	for (let index = 0; index < lenRunes; index++) {
		let rune = text[indexAt(index, lenRunes, forward)];
		if (!caseSensitive) {
			if (rune >= CAPITAL_A_RUNE && rune <= CAPITAL_Z_RUNE) rune += 32;
			else if (rune > MAX_ASCII) rune = String.fromCodePoint(rune).toLowerCase().codePointAt(0);
		}
		if (normalize) rune = normalizeRune(rune);
		const pchar = pattern[indexAt(pidx, lenPattern, forward)];
		if (rune === pchar) {
			if (sidx < 0) sidx = index;
			pidx++;
			if (pidx === lenPattern) {
				eidx = index + 1;
				break;
			}
		}
	}
	if (sidx >= 0 && eidx >= 0) {
		pidx--;
		for (let index = eidx - 1; index >= sidx; index--) {
			let rune = text[indexAt(index, lenRunes, forward)];
			if (!caseSensitive) {
				if (rune >= CAPITAL_A_RUNE && rune <= CAPITAL_Z_RUNE) rune += 32;
				else if (rune > MAX_ASCII) rune = String.fromCodePoint(rune).toLowerCase().codePointAt(0);
			}
			const pchar = pattern[indexAt(pidx, lenPattern, forward)];
			if (rune === pchar) {
				pidx--;
				if (pidx < 0) {
					sidx = index;
					break;
				}
			}
		}
		if (!forward) {
			const sidxTemp = sidx;
			sidx = lenRunes - eidx;
			eidx = lenRunes - sidxTemp;
		}
		const [score, pos] = calculateScore(caseSensitive, normalize, text, pattern, sidx, eidx, withPos);
		return [{
			start: sidx,
			end: eidx,
			score
		}, pos];
	}
	return [{
		start: -1,
		end: -1,
		score: 0
	}, null];
};
var exactMatchNaive = (caseSensitive, normalize, forward, text, pattern, withPos, slab2) => {
	if (pattern.length === 0) return [{
		start: 0,
		end: 0,
		score: 0
	}, null];
	const lenRunes = text.length;
	const lenPattern = pattern.length;
	if (lenRunes < lenPattern) return [{
		start: -1,
		end: -1,
		score: 0
	}, null];
	if (asciiFuzzyIndex(text, pattern, caseSensitive) < 0) return [{
		start: -1,
		end: -1,
		score: 0
	}, null];
	let pidx = 0;
	let bestPos = -1, bonus = toShort(0), bestBonus = toShort(-1);
	for (let index = 0; index < lenRunes; index++) {
		const index_ = indexAt(index, lenRunes, forward);
		let rune = text[index_];
		if (!caseSensitive) {
			if (rune >= CAPITAL_A_RUNE && rune <= CAPITAL_Z_RUNE) rune += 32;
			else if (rune > MAX_ASCII) rune = String.fromCodePoint(rune).toLowerCase().codePointAt(0);
		}
		if (normalize) rune = normalizeRune(rune);
		const pidx_ = indexAt(pidx, lenPattern, forward);
		if (pattern[pidx_] === rune) {
			if (pidx_ === 0) bonus = bonusAt(text, index_);
			pidx++;
			if (pidx === lenPattern) {
				if (bonus > bestBonus) {
					bestPos = index;
					bestBonus = bonus;
				}
				if (bonus === BONUS_BOUNDARY) break;
				index -= pidx - 1;
				pidx = 0;
				bonus = 0;
			}
		} else {
			index -= pidx;
			pidx = 0;
			bonus = 0;
		}
	}
	if (bestPos >= 0) {
		let sidx = 0, eidx = 0;
		if (forward) {
			sidx = bestPos - lenPattern + 1;
			eidx = bestPos + 1;
		} else {
			sidx = lenRunes - (bestPos + 1);
			eidx = lenRunes - (bestPos - lenPattern + 1);
		}
		const [score] = calculateScore(caseSensitive, normalize, text, pattern, sidx, eidx, false);
		return [{
			start: sidx,
			end: eidx,
			score
		}, null];
	}
	return [{
		start: -1,
		end: -1,
		score: 0
	}, null];
};
var SLAB_16_SIZE = 100 * 1024;
var SLAB_32_SIZE = 2048;
function makeSlab(size16, size32) {
	return {
		i16: new Int16Array(size16),
		i32: new Int32Array(size32)
	};
}
var slab = makeSlab(SLAB_16_SIZE, SLAB_32_SIZE);
var buildPatternForBasicMatch = (query, casing, normalize) => {
	let caseSensitive = false;
	switch (casing) {
		case "smart-case":
			if (query.toLowerCase() !== query) caseSensitive = true;
			break;
		case "case-sensitive":
			caseSensitive = true;
			break;
		case "case-insensitive":
			query = query.toLowerCase();
			caseSensitive = false;
			break;
	}
	let queryRunes = strToRunes(query);
	if (normalize) queryRunes = queryRunes.map(normalizeRune);
	return {
		queryRunes,
		caseSensitive
	};
};
function getResultFromScoreMap(scoreMap, limit) {
	const scoresInDesc = Object.keys(scoreMap).map((v) => parseInt(v, 10)).sort((a, b) => b - a);
	let result = [];
	for (const score of scoresInDesc) {
		result = result.concat(scoreMap[score]);
		if (result.length >= limit) break;
	}
	return result;
}
function getBasicMatchIter(scoreMap, queryRunes, caseSensitive) {
	return (idx) => {
		const itemRunes = this.runesList[idx];
		if (queryRunes.length > itemRunes.length) return;
		let [match, positions] = this.algoFn(caseSensitive, this.opts.normalize, this.opts.forward, itemRunes, queryRunes, true, slab);
		if (match.start === -1) return;
		if (this.opts.fuzzy === false) {
			positions = /* @__PURE__ */ new Set();
			for (let position = match.start; position < match.end; ++position) positions.add(position);
		}
		const scoreKey = this.opts.sort ? match.score : 0;
		if (scoreMap[scoreKey] === void 0) scoreMap[scoreKey] = [];
		scoreMap[scoreKey].push({
			item: this.items[idx],
			...match,
			positions: positions != null ? positions : /* @__PURE__ */ new Set()
		});
	};
}
function basicMatch(query) {
	const { queryRunes, caseSensitive } = buildPatternForBasicMatch(query, this.opts.casing, this.opts.normalize);
	const scoreMap = {};
	const iter2 = getBasicMatchIter.bind(this)(scoreMap, queryRunes, caseSensitive);
	for (let i = 0, len = this.runesList.length; i < len; ++i) iter2(i);
	return getResultFromScoreMap(scoreMap, this.opts.limit);
}
var defaultOpts = {
	limit: Infinity,
	selector: (v) => v,
	casing: "smart-case",
	normalize: true,
	fuzzy: "v2",
	tiebreakers: [],
	sort: true,
	forward: true
};
var BaseFinder = class {
	constructor(list, ...optionsTuple) {
		this.opts = {
			...defaultOpts,
			...optionsTuple[0]
		};
		this.items = list;
		this.runesList = list.map((item) => strToRunes(this.opts.selector(item).normalize()));
		this.algoFn = exactMatchNaive;
		switch (this.opts.fuzzy) {
			case "v2":
				this.algoFn = fuzzyMatchV2;
				break;
			case "v1":
				this.algoFn = fuzzyMatchV1;
				break;
		}
	}
};
var syncDefaultOpts = {
	...defaultOpts,
	match: basicMatch
};
var SyncFinder = class extends BaseFinder {
	constructor(list, ...optionsTuple) {
		super(list, ...optionsTuple);
		this.opts = {
			...syncDefaultOpts,
			...optionsTuple[0]
		};
	}
	find(query) {
		if (query.length === 0 || this.items.length === 0) return this.items.slice(0, this.opts.limit).map(createResultItemWithEmptyPos);
		query = query.normalize();
		return postProcessResultItems(this.opts.match.bind(this)(query), this.opts);
	}
};
({ ...defaultOpts });
var createResultItemWithEmptyPos = (item) => ({
	item,
	start: -1,
	end: -1,
	score: 0,
	positions: /* @__PURE__ */ new Set()
});
function postProcessResultItems(result, opts) {
	if (opts.sort) {
		const { selector } = opts;
		result.sort((a, b) => {
			if (a.score === b.score) for (const tiebreaker of opts.tiebreakers) {
				const diff = tiebreaker(a, b, selector);
				if (diff !== 0) return diff;
			}
			return 0;
		});
	}
	if (Number.isFinite(opts.limit)) result.splice(opts.limit);
	return result;
}
function byLengthAsc(a, b, selector) {
	return selector(a.item).length - selector(b.item).length;
}
function byStartAsc(a, b) {
	return a.start - b.start;
}
var Fzf = class {
	constructor(list, ...optionsTuple) {
		this.finder = new SyncFinder(list, ...optionsTuple);
		this.find = this.finder.find.bind(this.finder);
	}
};
//#endregion
//#region src/hooks/useFeatureFlag.ts
var DEFAULT_FEATURE_FLAG_STATE = {
	goalTemplatesEnabled: false,
	goalTemplatesUIEnabled: false,
	actionTemplating: false,
	formulaMode: false,
	currency: false,
	ageOfMoneyReport: false,
	balanceForecastReport: false,
	customThemes: false,
	budgetAnalysisReport: false,
	payeeLocations: false,
	enableBanking: false,
	sankeyReport: false
};
function useFeatureFlag(name) {
	const [value] = useSyncedPref(`flags.${name}`);
	return value === void 0 ? DEFAULT_FEATURE_FLAG_STATE[name] || false : String(value) === "true";
}
//#endregion
//#region src/components/budget/MonthsContext.tsx
function getValidMonthBounds(bounds, startMonth, endMonth) {
	return {
		start: startMonth < bounds.start ? bounds.start : startMonth,
		end: endMonth > bounds.end ? bounds.end : endMonth
	};
}
var MonthsContext = (0, import_react.createContext)(null);
function MonthsProvider(t0) {
	const $ = (0, import_compiler_runtime.c)(10);
	const { startMonth, numMonths, monthBounds, type, children } = t0;
	let t1;
	if ($[0] !== monthBounds || $[1] !== numMonths || $[2] !== startMonth) {
		const bounds = getValidMonthBounds(monthBounds, startMonth, addMonths(startMonth, numMonths - 1));
		t1 = rangeInclusive(bounds.start, bounds.end);
		$[0] = monthBounds;
		$[1] = numMonths;
		$[2] = startMonth;
		$[3] = t1;
	} else t1 = $[3];
	const months = t1;
	let t2;
	if ($[4] !== months || $[5] !== type) {
		t2 = {
			months,
			type
		};
		$[4] = months;
		$[5] = type;
		$[6] = t2;
	} else t2 = $[6];
	let t3;
	if ($[7] !== children || $[8] !== t2) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MonthsContext.Provider, {
			value: t2,
			children
		});
		$[7] = children;
		$[8] = t2;
		$[9] = t3;
	} else t3 = $[9];
	return t3;
}
//#endregion
//#region src/components/budget/util.ts
function addToBeBudgetedGroup(groups) {
	return [{
		id: "to-budget",
		name: t$1("To Budget"),
		categories: [{
			id: "to-budget",
			name: t$1("To Budget"),
			group: "to-budget"
		}]
	}, ...groups];
}
function removeCategoriesFromGroups(categoryGroups, ...categoryIds) {
	if (categoryIds.length === 0) return categoryGroups;
	const categoryIdsSet = new Set(categoryIds);
	return categoryGroups.map((group) => ({
		...group,
		categories: group.categories?.filter((cat) => !categoryIdsSet.has(cat.id)) ?? []
	})).filter((group) => group.categories?.length);
}
function separateGroups(categoryGroups) {
	return [categoryGroups.filter((g) => !g.is_income), categoryGroups.find((g) => g.is_income)];
}
function makeAmountGrey(value) {
	return value === 0 || value === "0" || value === "" || value == null ? { color: theme.budgetNumberZero } : null;
}
function makeBalanceAmountStyle(value, goalValue, budgetedValue) {
	const normalizeIntegerValue = (val) => typeof val === "number" ? currencyToAmount(integerToCurrency(val)) : 0;
	const currencyValue = normalizeIntegerValue(value);
	if (currencyValue < 0) return { color: theme.budgetNumberNegative };
	if (goalValue == null) {
		const greyed = makeAmountGrey(currencyValue);
		if (greyed) return greyed;
		return { color: theme.budgetNumberPositive };
	} else {
		if (normalizeIntegerValue(budgetedValue) < normalizeIntegerValue(goalValue)) return { color: theme.templateNumberUnderFunded };
		return { color: theme.templateNumberFunded };
	}
}
function makeAmountFullStyle(value, colors) {
	const positiveColorToUse = colors?.positiveColor || theme.budgetNumberPositive;
	const negativeColorToUse = colors?.negativeColor || theme.budgetNumberNegative;
	const zeroColorToUse = colors?.zeroColor || theme.budgetNumberZero;
	return { color: value < 0 ? negativeColorToUse : value === 0 ? zeroColorToUse : positiveColorToUse };
}
function findSortDown(arr, pos, targetId) {
	if (pos === "top") return { targetId };
	else {
		const idx = arr.findIndex((item) => item.id === targetId);
		if (idx === -1) throw new Error("findSort: item not found: " + targetId);
		const newIdx = idx + 1;
		if (newIdx < arr.length) return { targetId: arr[newIdx].id };
		else return { targetId: null };
	}
}
function findSortUp(arr, pos, targetId) {
	if (pos === "bottom") return { targetId };
	else {
		const idx = arr.findIndex((item) => item.id === targetId);
		if (idx === -1) throw new Error("findSort: item not found: " + targetId);
		const newIdx = idx - 1;
		if (newIdx >= 0) return { targetId: arr[newIdx].id };
		else return { targetId: null };
	}
}
function getScrollbarWidth() {
	return Math.max(styles.scrollbarWidth - 2, 0);
}
async function prewarmMonth(budgetType, spreadsheet, month) {
	const values = await send(budgetType === "tracking" ? "tracking-budget-month" : "envelope-budget-month", { month });
	for (const value of values) spreadsheet.prewarmCache(value.name, value);
}
async function prewarmAllMonths(budgetType, spreadsheet, bounds, startMonth) {
	bounds = getValidMonthBounds(bounds, subMonths(startMonth, 1), addMonths(startMonth, 4));
	const months = rangeInclusive(bounds.start, bounds.end);
	await Promise.all(months.map((month) => prewarmMonth(budgetType, spreadsheet, month)));
}
//#endregion
//#region src/components/budget/BalanceWithCarryover.tsx
function CarryoverIndicator(t0) {
	const $ = (0, import_compiler_runtime.c)(9);
	const { style } = t0;
	let t1;
	if ($[0] !== style) {
		t1 = {
			marginLeft: 2,
			position: "absolute",
			right: "-4px",
			alignSelf: "center",
			justifyContent: "center",
			top: 0,
			bottom: 0,
			...style
		};
		$[0] = style;
		$[1] = t1;
	} else t1 = $[1];
	const t2 = style?.width || 7;
	const t3 = style?.height || 7;
	let t4;
	if ($[2] !== style || $[3] !== t2 || $[4] !== t3) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgArrowThinRight, {
			width: t2,
			height: t3,
			style
		});
		$[2] = style;
		$[3] = t2;
		$[4] = t3;
		$[5] = t4;
	} else t4 = $[5];
	let t5;
	if ($[6] !== t1 || $[7] !== t4) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t1,
			children: t4
		});
		$[6] = t1;
		$[7] = t4;
		$[8] = t5;
	} else t5 = $[8];
	return t5;
}
function GoalTooltipRow(t0) {
	const $ = (0, import_compiler_runtime.c)(3);
	const { children } = t0;
	let t1;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = {
			display: "flex",
			justifyContent: "space-between",
			alignItems: "center",
			gap: 10
		};
		$[0] = t1;
	} else t1 = $[0];
	let t2;
	if ($[1] !== children) {
		t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
			style: t1,
			children
		});
		$[1] = children;
		$[2] = t2;
	} else t2 = $[2];
	return t2;
}
function BalanceWithCarryover(t0) {
	const $ = (0, import_compiler_runtime.c)(47);
	let balance;
	let budgeted;
	let carryover;
	let children;
	let goal;
	let isDisabled;
	let longGoal;
	let props;
	let shouldInlineGoalStatus;
	let t1;
	let tooltipDisabled;
	if ($[0] !== t0) {
		({carryover, balance, goal, budgeted, longGoal, isDisabled, shouldInlineGoalStatus, CarryoverIndicator: t1, tooltipDisabled, children, ...props} = t0);
		$[0] = t0;
		$[1] = balance;
		$[2] = budgeted;
		$[3] = carryover;
		$[4] = children;
		$[5] = goal;
		$[6] = isDisabled;
		$[7] = longGoal;
		$[8] = props;
		$[9] = shouldInlineGoalStatus;
		$[10] = t1;
		$[11] = tooltipDisabled;
	} else {
		balance = $[1];
		budgeted = $[2];
		carryover = $[3];
		children = $[4];
		goal = $[5];
		isDisabled = $[6];
		longGoal = $[7];
		props = $[8];
		shouldInlineGoalStatus = $[9];
		t1 = $[10];
		tooltipDisabled = $[11];
	}
	const CarryoverIndicatorComponent = t1 === void 0 ? CarryoverIndicator : t1;
	const { t } = useTranslation();
	const { isNarrowWidth } = useResponsive();
	const carryoverValue = useSheetValue(carryover);
	const goalValue = useSheetValue(goal);
	const budgetedValue = useSheetValue(budgeted);
	const longGoalValue = useSheetValue(longGoal);
	const isGoalTemplatesEnabled = useFeatureFlag("goalTemplatesEnabled");
	let t2;
	if ($[12] !== budgetedValue || $[13] !== goalValue || $[14] !== isGoalTemplatesEnabled || $[15] !== longGoalValue) {
		t2 = (balanceValue) => makeBalanceAmountStyle(balanceValue, isGoalTemplatesEnabled ? goalValue : null, longGoalValue === 1 ? balanceValue : budgetedValue);
		$[12] = budgetedValue;
		$[13] = goalValue;
		$[14] = isGoalTemplatesEnabled;
		$[15] = longGoalValue;
		$[16] = t2;
	} else t2 = $[16];
	const getBalanceAmountStyle = t2;
	const format = useFormat();
	let t3;
	if ($[17] !== budgetedValue || $[18] !== goalValue || $[19] !== longGoalValue) {
		t3 = (balanceValue_0) => longGoalValue === 1 ? balanceValue_0 - goalValue : budgetedValue - goalValue;
		$[17] = budgetedValue;
		$[18] = goalValue;
		$[19] = longGoalValue;
		$[20] = t3;
	} else t3 = $[20];
	const getDifferenceToGoal = t3;
	let t4;
	if ($[21] !== getBalanceAmountStyle || $[22] !== isDisabled) {
		t4 = (balanceValue_1) => css({
			...getBalanceAmountStyle(balanceValue_1),
			overflow: "hidden",
			textOverflow: "ellipsis",
			textAlign: "right",
			...!isDisabled && { cursor: "pointer" },
			":hover": { textDecoration: "underline" }
		});
		$[21] = getBalanceAmountStyle;
		$[22] = isDisabled;
		$[23] = t4;
	} else t4 = $[23];
	const getDefaultClassName = t4;
	let t5;
	if ($[24] !== budgetedValue || $[25] !== format || $[26] !== getDifferenceToGoal || $[27] !== goalValue || $[28] !== longGoalValue || $[29] !== t) {
		t5 = (balanceValue_2, type) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
				style: { fontWeight: "bold" },
				children: getDifferenceToGoal(balanceValue_2) === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
					style: { color: theme.templateNumberFunded },
					children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Fully funded" })
				}) : getDifferenceToGoal(balanceValue_2) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
					style: { color: theme.templateNumberFunded },
					children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Trans, { children: [
						"Overfunded (",
						{ amount: format(getDifferenceToGoal(balanceValue_2), "financial") },
						")"
					] })
				}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
					style: { color: theme.templateNumberUnderFunded },
					children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Trans, { children: [
						"Underfunded (",
						{ amount: format(getDifferenceToGoal(balanceValue_2), "financial") },
						")"
					] })
				})
			}),
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GoalTooltipRow, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Trans, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "Goal Type:" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: { type: longGoalValue === 1 ? t("Goal") : t("Automation") } })] }) }),
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GoalTooltipRow, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Trans, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "Goal:" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: { amount: format(goalValue, "financial") } })] }) }),
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GoalTooltipRow, { children: longGoalValue !== 1 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Trans, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "Budgeted:" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: { amount: format(budgetedValue, "financial") } })] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Trans, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "Balance:" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: { amount: format(balanceValue_2, type) } })] }) })
		] });
		$[24] = budgetedValue;
		$[25] = format;
		$[26] = getDifferenceToGoal;
		$[27] = goalValue;
		$[28] = longGoalValue;
		$[29] = t;
		$[30] = t5;
	} else t5 = $[30];
	const GoalStatusDisplay = t5;
	let t6;
	if ($[31] !== CarryoverIndicatorComponent || $[32] !== GoalStatusDisplay || $[33] !== carryoverValue || $[34] !== children || $[35] !== getBalanceAmountStyle || $[36] !== getDefaultClassName || $[37] !== goalValue || $[38] !== isGoalTemplatesEnabled || $[39] !== isNarrowWidth || $[40] !== shouldInlineGoalStatus || $[41] !== tooltipDisabled) {
		t6 = (t7) => {
			const { type: type_0, name, value: balanceValue_3 } = t7;
			return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
				/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tooltip, {
					content: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
						style: { padding: 10 },
						children: GoalStatusDisplay(balanceValue_3, type_0)
					}),
					style: {
						...styles.tooltip,
						borderRadius: "0px 5px 5px 0px"
					},
					placement: "bottom",
					triggerProps: {
						delay: 750,
						isDisabled: !isGoalTemplatesEnabled || goalValue == null || isNarrowWidth || tooltipDisabled
					},
					children: children ? children({
						type: type_0,
						name,
						value: balanceValue_3,
						className: getDefaultClassName(balanceValue_3)
					}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CellValueText, {
						type: type_0,
						name,
						value: balanceValue_3,
						className: getDefaultClassName(balanceValue_3)
					})
				}),
				carryoverValue && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CarryoverIndicatorComponent, { style: getBalanceAmountStyle(balanceValue_3) }),
				shouldInlineGoalStatus && isGoalTemplatesEnabled && goalValue !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, { style: {
					borderTop: "1px solid " + theme.tableBorderSeparator,
					width: "160px",
					margin: "3px 0px"
				} }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, { children: GoalStatusDisplay(balanceValue_3, type_0) })] })
			] });
		};
		$[31] = CarryoverIndicatorComponent;
		$[32] = GoalStatusDisplay;
		$[33] = carryoverValue;
		$[34] = children;
		$[35] = getBalanceAmountStyle;
		$[36] = getDefaultClassName;
		$[37] = goalValue;
		$[38] = isGoalTemplatesEnabled;
		$[39] = isNarrowWidth;
		$[40] = shouldInlineGoalStatus;
		$[41] = tooltipDisabled;
		$[42] = t6;
	} else t6 = $[42];
	let t7;
	if ($[43] !== balance || $[44] !== props || $[45] !== t6) {
		t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CellValue, {
			binding: balance,
			type: "financial",
			...props,
			children: t6
		});
		$[43] = balance;
		$[44] = props;
		$[45] = t6;
		$[46] = t7;
	} else t7 = $[46];
	return t7;
}
//#endregion
//#region src/queries/liveQuery.ts
function liveQuery(query, { onData, onError, options = {} }) {
	return LiveQuery.runLiveQuery(query, onData, onError, options);
}
var LiveQuery = class LiveQuery {
	_unsubscribeSyncEvent;
	_data;
	_dependencies;
	_listeners;
	_supportedSyncTypes;
	_query;
	_onError;
	get query() {
		return this._query;
	}
	get data() {
		return this._data;
	}
	set data(data) {
		this._data = data;
	}
	get isRunning() {
		return this._unsubscribeSyncEvent != null;
	}
	_inflightRequestId;
	get inflightRequestId() {
		return this._inflightRequestId;
	}
	set inflightRequestId(id) {
		this._inflightRequestId = id;
	}
	constructor(query, onData, onError, options = {}) {
		this._query = query;
		this._data = null;
		this._dependencies = null;
		this._listeners = [];
		this._onError = onError;
		this._supportedSyncTypes = options.onlySync ? new Set(["success"]) : new Set(["applied", "success"]);
		if (onData) this.addListener(onData);
	}
	addListener = (func) => {
		this._listeners.push(func);
		return () => {
			this._listeners = this._listeners.filter((l) => l !== func);
		};
	};
	onData = (data, prevData) => {
		for (let i = 0; i < this._listeners.length; i++) this._listeners[i](data, prevData);
	};
	onError = (error) => {
		this._onError?.(error);
	};
	onUpdate = (tables) => {
		if (this._dependencies == null || tables.find((table) => this._dependencies.has(table))) this.run();
	};
	run = () => {
		this.subscribe();
		return this.fetchData(() => aqlQuery(this._query));
	};
	static runLiveQuery = (query, onData, onError, options = {}) => {
		const liveQuery = new LiveQuery(query, onData, onError, options);
		liveQuery.run();
		return liveQuery;
	};
	subscribe = () => {
		if (this._unsubscribeSyncEvent == null) this._unsubscribeSyncEvent = listen("sync-event", (event) => {
			if ((event.type === "applied" || event.type === "success") && this._supportedSyncTypes.has(event.type)) this.onUpdate(event.tables);
		});
	};
	unsubscribe = () => {
		if (this._unsubscribeSyncEvent) {
			this._unsubscribeSyncEvent();
			this._unsubscribeSyncEvent = null;
		}
	};
	_optimisticUpdate = (updateFn) => {
		const previousData = this.data;
		this.updateData(updateFn);
		this.onData(this.data, previousData);
	};
	optimisticUpdate = (dataFunc) => {
		this._optimisticUpdate(dataFunc);
	};
	updateData = (updateFn) => {
		this.data = updateFn(this.data);
	};
	fetchData = async (runQuery) => {
		const reqId = Math.random();
		this.inflightRequestId = reqId;
		try {
			const { data, dependencies } = await runQuery();
			if (this._dependencies == null) this._dependencies = new Set(dependencies);
			if (this.inflightRequestId === reqId && this._unsubscribeSyncEvent) {
				const previousData = this.data;
				if (this._query.state.calculation) this.data = [data];
				else this.data = data;
				this.onData(this.data, previousData);
				this.inflightRequestId = null;
			}
		} catch (e) {
			console.log("Error fetching data", e);
			this.onError(e);
		}
	};
};
//#endregion
//#region src/hooks/useQuery.ts
function useQuery(makeQuery, dependencies) {
	const query = (0, import_react.useMemo)(makeQuery, dependencies);
	const [data, setData] = (0, import_react.useState)(null);
	const [isLoading, setIsLoading] = (0, import_react.useState)(true);
	const [error, setError] = (0, import_react.useState)(void 0);
	(0, import_react.useEffect)(() => {
		setError(query === null ? /* @__PURE__ */ new Error("Query is null") : void 0);
		setIsLoading(!!query);
		if (!query) return;
		let isUnmounted = false;
		let live = liveQuery(query, {
			onData: (data) => {
				if (!isUnmounted) {
					setData(data);
					setIsLoading(false);
				}
			},
			onError: setError
		});
		return () => {
			isUnmounted = true;
			live?.unsubscribe();
			live = null;
		};
	}, [query]);
	return {
		data,
		isLoading,
		...error && { error }
	};
}
//#endregion
//#region src/hooks/useNotes.ts
function useNotes(id) {
	const { data } = useQuery(() => q$1("notes").filter({ id }).select("*"), [id]);
	return (0, import_react.useMemo)(() => data && data.length > 0 ? data[0].note : null, [data]);
}
//#endregion
//#region ../../node_modules/comma-separated-tokens/index.js
/**
* Serialize an array of strings or numbers to comma-separated tokens.
*
* @param {Array<string|number>} values
*   List of tokens.
* @param {Options} [options]
*   Configuration for `stringify` (optional).
* @returns {string}
*   Comma-separated tokens.
*/
function stringify$1(values, options) {
	const settings = options || {};
	return (values[values.length - 1] === "" ? [...values, ""] : values).join((settings.padRight ? " " : "") + "," + (settings.padLeft === false ? "" : " ")).trim();
}
//#endregion
//#region ../../node_modules/estree-util-is-identifier-name/lib/index.js
var nameRe = /^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u;
var nameReJsx = /^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u;
/** @type {Options} */
var emptyOptions$4 = {};
/**
* Checks if the given value is a valid identifier name.
*
* @param {string} name
*   Identifier to check.
* @param {Options | null | undefined} [options]
*   Configuration (optional).
* @returns {boolean}
*   Whether `name` can be an identifier.
*/
function name(name, options) {
	return ((options || emptyOptions$4).jsx ? nameReJsx : nameRe).test(name);
}
//#endregion
//#region ../../node_modules/hast-util-whitespace/lib/index.js
/**
* @typedef {import('hast').Nodes} Nodes
*/
var re = /[ \t\n\f\r]/g;
/**
* Check if the given value is *inter-element whitespace*.
*
* @param {Nodes | string} thing
*   Thing to check (`Node` or `string`).
* @returns {boolean}
*   Whether the `value` is inter-element whitespace (`boolean`): consisting of
*   zero or more of space, tab (`\t`), line feed (`\n`), carriage return
*   (`\r`), or form feed (`\f`); if a node is passed it must be a `Text` node,
*   whose `value` field is checked.
*/
function whitespace(thing) {
	return typeof thing === "object" ? thing.type === "text" ? empty$1(thing.value) : false : empty$1(thing);
}
/**
* @param {string} value
* @returns {boolean}
*/
function empty$1(value) {
	return value.replace(re, "") === "";
}
//#endregion
//#region ../../node_modules/property-information/lib/util/schema.js
/**
* @import {Schema as SchemaType, Space} from 'property-information'
*/
/** @type {SchemaType} */
var Schema = class {
	/**
	* @param {SchemaType['property']} property
	*   Property.
	* @param {SchemaType['normal']} normal
	*   Normal.
	* @param {Space | undefined} [space]
	*   Space.
	* @returns
	*   Schema.
	*/
	constructor(property, normal, space) {
		this.normal = normal;
		this.property = property;
		if (space) this.space = space;
	}
};
Schema.prototype.normal = {};
Schema.prototype.property = {};
Schema.prototype.space = void 0;
//#endregion
//#region ../../node_modules/property-information/lib/util/merge.js
/**
* @import {Info, Space} from 'property-information'
*/
/**
* @param {ReadonlyArray<Schema>} definitions
*   Definitions.
* @param {Space | undefined} [space]
*   Space.
* @returns {Schema}
*   Schema.
*/
function merge(definitions, space) {
	/** @type {Record<string, Info>} */
	const property = {};
	/** @type {Record<string, string>} */
	const normal = {};
	for (const definition of definitions) {
		Object.assign(property, definition.property);
		Object.assign(normal, definition.normal);
	}
	return new Schema(property, normal, space);
}
//#endregion
//#region ../../node_modules/property-information/lib/normalize.js
/**
* Get the cleaned case insensitive form of an attribute or property.
*
* @param {string} value
*   An attribute-like or property-like name.
* @returns {string}
*   Value that can be used to look up the properly cased property on a
*   `Schema`.
*/
function normalize$1(value) {
	return value.toLowerCase();
}
//#endregion
//#region ../../node_modules/property-information/lib/util/info.js
/**
* @import {Info as InfoType} from 'property-information'
*/
/** @type {InfoType} */
var Info = class {
	/**
	* @param {string} property
	*   Property.
	* @param {string} attribute
	*   Attribute.
	* @returns
	*   Info.
	*/
	constructor(property, attribute) {
		this.attribute = attribute;
		this.property = property;
	}
};
Info.prototype.attribute = "";
Info.prototype.booleanish = false;
Info.prototype.boolean = false;
Info.prototype.commaOrSpaceSeparated = false;
Info.prototype.commaSeparated = false;
Info.prototype.defined = false;
Info.prototype.mustUseProperty = false;
Info.prototype.number = false;
Info.prototype.overloadedBoolean = false;
Info.prototype.property = "";
Info.prototype.spaceSeparated = false;
Info.prototype.space = void 0;
//#endregion
//#region ../../node_modules/property-information/lib/util/types.js
var types_exports = /* @__PURE__ */ __exportAll({
	boolean: () => boolean,
	booleanish: () => booleanish,
	commaOrSpaceSeparated: () => commaOrSpaceSeparated,
	commaSeparated: () => commaSeparated,
	number: () => number,
	overloadedBoolean: () => overloadedBoolean,
	spaceSeparated: () => spaceSeparated
});
var powers = 0;
var boolean = increment();
var booleanish = increment();
var overloadedBoolean = increment();
var number = increment();
var spaceSeparated = increment();
var commaSeparated = increment();
var commaOrSpaceSeparated = increment();
function increment() {
	return 2 ** ++powers;
}
//#endregion
//#region ../../node_modules/property-information/lib/util/defined-info.js
/**
* @import {Space} from 'property-information'
*/
var checks = Object.keys(types_exports);
var DefinedInfo = class extends Info {
	/**
	* @constructor
	* @param {string} property
	*   Property.
	* @param {string} attribute
	*   Attribute.
	* @param {number | null | undefined} [mask]
	*   Mask.
	* @param {Space | undefined} [space]
	*   Space.
	* @returns
	*   Info.
	*/
	constructor(property, attribute, mask, space) {
		let index = -1;
		super(property, attribute);
		mark(this, "space", space);
		if (typeof mask === "number") while (++index < checks.length) {
			const check = checks[index];
			mark(this, checks[index], (mask & types_exports[check]) === types_exports[check]);
		}
	}
};
DefinedInfo.prototype.defined = true;
/**
* @template {keyof DefinedInfo} Key
*   Key type.
* @param {DefinedInfo} values
*   Info.
* @param {Key} key
*   Key.
* @param {DefinedInfo[Key]} value
*   Value.
* @returns {undefined}
*   Nothing.
*/
function mark(values, key, value) {
	if (value) values[key] = value;
}
//#endregion
//#region ../../node_modules/property-information/lib/util/create.js
/**
* @import {Info, Space} from 'property-information'
*/
/**
* @typedef Definition
*   Definition of a schema.
* @property {Record<string, string> | undefined} [attributes]
*   Normalzed names to special attribute case.
* @property {ReadonlyArray<string> | undefined} [mustUseProperty]
*   Normalized names that must be set as properties.
* @property {Record<string, number | null>} properties
*   Property names to their types.
* @property {Space | undefined} [space]
*   Space.
* @property {Transform} transform
*   Transform a property name.
*/
/**
* @callback Transform
*   Transform.
* @param {Record<string, string>} attributes
*   Attributes.
* @param {string} property
*   Property.
* @returns {string}
*   Attribute.
*/
/**
* @param {Definition} definition
*   Definition.
* @returns {Schema}
*   Schema.
*/
function create(definition) {
	/** @type {Record<string, Info>} */
	const properties = {};
	/** @type {Record<string, string>} */
	const normals = {};
	for (const [property, value] of Object.entries(definition.properties)) {
		const info = new DefinedInfo(property, definition.transform(definition.attributes || {}, property), value, definition.space);
		if (definition.mustUseProperty && definition.mustUseProperty.includes(property)) info.mustUseProperty = true;
		properties[property] = info;
		normals[normalize$1(property)] = property;
		normals[normalize$1(info.attribute)] = property;
	}
	return new Schema(properties, normals, definition.space);
}
//#endregion
//#region ../../node_modules/property-information/lib/aria.js
var aria = create({
	properties: {
		ariaActiveDescendant: null,
		ariaAtomic: booleanish,
		ariaAutoComplete: null,
		ariaBusy: booleanish,
		ariaChecked: booleanish,
		ariaColCount: number,
		ariaColIndex: number,
		ariaColSpan: number,
		ariaControls: spaceSeparated,
		ariaCurrent: null,
		ariaDescribedBy: spaceSeparated,
		ariaDetails: null,
		ariaDisabled: booleanish,
		ariaDropEffect: spaceSeparated,
		ariaErrorMessage: null,
		ariaExpanded: booleanish,
		ariaFlowTo: spaceSeparated,
		ariaGrabbed: booleanish,
		ariaHasPopup: null,
		ariaHidden: booleanish,
		ariaInvalid: null,
		ariaKeyShortcuts: null,
		ariaLabel: null,
		ariaLabelledBy: spaceSeparated,
		ariaLevel: number,
		ariaLive: null,
		ariaModal: booleanish,
		ariaMultiLine: booleanish,
		ariaMultiSelectable: booleanish,
		ariaOrientation: null,
		ariaOwns: spaceSeparated,
		ariaPlaceholder: null,
		ariaPosInSet: number,
		ariaPressed: booleanish,
		ariaReadOnly: booleanish,
		ariaRelevant: null,
		ariaRequired: booleanish,
		ariaRoleDescription: spaceSeparated,
		ariaRowCount: number,
		ariaRowIndex: number,
		ariaRowSpan: number,
		ariaSelected: booleanish,
		ariaSetSize: number,
		ariaSort: null,
		ariaValueMax: number,
		ariaValueMin: number,
		ariaValueNow: number,
		ariaValueText: null,
		role: null
	},
	transform(_, property) {
		return property === "role" ? property : "aria-" + property.slice(4).toLowerCase();
	}
});
//#endregion
//#region ../../node_modules/property-information/lib/util/case-sensitive-transform.js
/**
* @param {Record<string, string>} attributes
*   Attributes.
* @param {string} attribute
*   Attribute.
* @returns {string}
*   Transformed attribute.
*/
function caseSensitiveTransform(attributes, attribute) {
	return attribute in attributes ? attributes[attribute] : attribute;
}
//#endregion
//#region ../../node_modules/property-information/lib/util/case-insensitive-transform.js
/**
* @param {Record<string, string>} attributes
*   Attributes.
* @param {string} property
*   Property.
* @returns {string}
*   Transformed property.
*/
function caseInsensitiveTransform(attributes, property) {
	return caseSensitiveTransform(attributes, property.toLowerCase());
}
//#endregion
//#region ../../node_modules/property-information/lib/html.js
var html$3 = create({
	attributes: {
		acceptcharset: "accept-charset",
		classname: "class",
		htmlfor: "for",
		httpequiv: "http-equiv"
	},
	mustUseProperty: [
		"checked",
		"multiple",
		"muted",
		"selected"
	],
	properties: {
		abbr: null,
		accept: commaSeparated,
		acceptCharset: spaceSeparated,
		accessKey: spaceSeparated,
		action: null,
		allow: null,
		allowFullScreen: boolean,
		allowPaymentRequest: boolean,
		allowUserMedia: boolean,
		alt: null,
		as: null,
		async: boolean,
		autoCapitalize: null,
		autoComplete: spaceSeparated,
		autoFocus: boolean,
		autoPlay: boolean,
		blocking: spaceSeparated,
		capture: null,
		charSet: null,
		checked: boolean,
		cite: null,
		className: spaceSeparated,
		cols: number,
		colSpan: null,
		content: null,
		contentEditable: booleanish,
		controls: boolean,
		controlsList: spaceSeparated,
		coords: number | commaSeparated,
		crossOrigin: null,
		data: null,
		dateTime: null,
		decoding: null,
		default: boolean,
		defer: boolean,
		dir: null,
		dirName: null,
		disabled: boolean,
		download: overloadedBoolean,
		draggable: booleanish,
		encType: null,
		enterKeyHint: null,
		fetchPriority: null,
		form: null,
		formAction: null,
		formEncType: null,
		formMethod: null,
		formNoValidate: boolean,
		formTarget: null,
		headers: spaceSeparated,
		height: number,
		hidden: overloadedBoolean,
		high: number,
		href: null,
		hrefLang: null,
		htmlFor: spaceSeparated,
		httpEquiv: spaceSeparated,
		id: null,
		imageSizes: null,
		imageSrcSet: null,
		inert: boolean,
		inputMode: null,
		integrity: null,
		is: null,
		isMap: boolean,
		itemId: null,
		itemProp: spaceSeparated,
		itemRef: spaceSeparated,
		itemScope: boolean,
		itemType: spaceSeparated,
		kind: null,
		label: null,
		lang: null,
		language: null,
		list: null,
		loading: null,
		loop: boolean,
		low: number,
		manifest: null,
		max: null,
		maxLength: number,
		media: null,
		method: null,
		min: null,
		minLength: number,
		multiple: boolean,
		muted: boolean,
		name: null,
		nonce: null,
		noModule: boolean,
		noValidate: boolean,
		onAbort: null,
		onAfterPrint: null,
		onAuxClick: null,
		onBeforeMatch: null,
		onBeforePrint: null,
		onBeforeToggle: null,
		onBeforeUnload: null,
		onBlur: null,
		onCancel: null,
		onCanPlay: null,
		onCanPlayThrough: null,
		onChange: null,
		onClick: null,
		onClose: null,
		onContextLost: null,
		onContextMenu: null,
		onContextRestored: null,
		onCopy: null,
		onCueChange: null,
		onCut: null,
		onDblClick: null,
		onDrag: null,
		onDragEnd: null,
		onDragEnter: null,
		onDragExit: null,
		onDragLeave: null,
		onDragOver: null,
		onDragStart: null,
		onDrop: null,
		onDurationChange: null,
		onEmptied: null,
		onEnded: null,
		onError: null,
		onFocus: null,
		onFormData: null,
		onHashChange: null,
		onInput: null,
		onInvalid: null,
		onKeyDown: null,
		onKeyPress: null,
		onKeyUp: null,
		onLanguageChange: null,
		onLoad: null,
		onLoadedData: null,
		onLoadedMetadata: null,
		onLoadEnd: null,
		onLoadStart: null,
		onMessage: null,
		onMessageError: null,
		onMouseDown: null,
		onMouseEnter: null,
		onMouseLeave: null,
		onMouseMove: null,
		onMouseOut: null,
		onMouseOver: null,
		onMouseUp: null,
		onOffline: null,
		onOnline: null,
		onPageHide: null,
		onPageShow: null,
		onPaste: null,
		onPause: null,
		onPlay: null,
		onPlaying: null,
		onPopState: null,
		onProgress: null,
		onRateChange: null,
		onRejectionHandled: null,
		onReset: null,
		onResize: null,
		onScroll: null,
		onScrollEnd: null,
		onSecurityPolicyViolation: null,
		onSeeked: null,
		onSeeking: null,
		onSelect: null,
		onSlotChange: null,
		onStalled: null,
		onStorage: null,
		onSubmit: null,
		onSuspend: null,
		onTimeUpdate: null,
		onToggle: null,
		onUnhandledRejection: null,
		onUnload: null,
		onVolumeChange: null,
		onWaiting: null,
		onWheel: null,
		open: boolean,
		optimum: number,
		pattern: null,
		ping: spaceSeparated,
		placeholder: null,
		playsInline: boolean,
		popover: null,
		popoverTarget: null,
		popoverTargetAction: null,
		poster: null,
		preload: null,
		readOnly: boolean,
		referrerPolicy: null,
		rel: spaceSeparated,
		required: boolean,
		reversed: boolean,
		rows: number,
		rowSpan: number,
		sandbox: spaceSeparated,
		scope: null,
		scoped: boolean,
		seamless: boolean,
		selected: boolean,
		shadowRootClonable: boolean,
		shadowRootDelegatesFocus: boolean,
		shadowRootMode: null,
		shape: null,
		size: number,
		sizes: null,
		slot: null,
		span: number,
		spellCheck: booleanish,
		src: null,
		srcDoc: null,
		srcLang: null,
		srcSet: null,
		start: number,
		step: null,
		style: null,
		tabIndex: number,
		target: null,
		title: null,
		translate: null,
		type: null,
		typeMustMatch: boolean,
		useMap: null,
		value: booleanish,
		width: number,
		wrap: null,
		writingSuggestions: null,
		align: null,
		aLink: null,
		archive: spaceSeparated,
		axis: null,
		background: null,
		bgColor: null,
		border: number,
		borderColor: null,
		bottomMargin: number,
		cellPadding: null,
		cellSpacing: null,
		char: null,
		charOff: null,
		classId: null,
		clear: null,
		code: null,
		codeBase: null,
		codeType: null,
		color: null,
		compact: boolean,
		declare: boolean,
		event: null,
		face: null,
		frame: null,
		frameBorder: null,
		hSpace: number,
		leftMargin: number,
		link: null,
		longDesc: null,
		lowSrc: null,
		marginHeight: number,
		marginWidth: number,
		noResize: boolean,
		noHref: boolean,
		noShade: boolean,
		noWrap: boolean,
		object: null,
		profile: null,
		prompt: null,
		rev: null,
		rightMargin: number,
		rules: null,
		scheme: null,
		scrolling: booleanish,
		standby: null,
		summary: null,
		text: null,
		topMargin: number,
		valueType: null,
		version: null,
		vAlign: null,
		vLink: null,
		vSpace: number,
		allowTransparency: null,
		autoCorrect: null,
		autoSave: null,
		disablePictureInPicture: boolean,
		disableRemotePlayback: boolean,
		prefix: null,
		property: null,
		results: number,
		security: null,
		unselectable: null
	},
	space: "html",
	transform: caseInsensitiveTransform
});
//#endregion
//#region ../../node_modules/property-information/lib/svg.js
var svg$1 = create({
	attributes: {
		accentHeight: "accent-height",
		alignmentBaseline: "alignment-baseline",
		arabicForm: "arabic-form",
		baselineShift: "baseline-shift",
		capHeight: "cap-height",
		className: "class",
		clipPath: "clip-path",
		clipRule: "clip-rule",
		colorInterpolation: "color-interpolation",
		colorInterpolationFilters: "color-interpolation-filters",
		colorProfile: "color-profile",
		colorRendering: "color-rendering",
		crossOrigin: "crossorigin",
		dataType: "datatype",
		dominantBaseline: "dominant-baseline",
		enableBackground: "enable-background",
		fillOpacity: "fill-opacity",
		fillRule: "fill-rule",
		floodColor: "flood-color",
		floodOpacity: "flood-opacity",
		fontFamily: "font-family",
		fontSize: "font-size",
		fontSizeAdjust: "font-size-adjust",
		fontStretch: "font-stretch",
		fontStyle: "font-style",
		fontVariant: "font-variant",
		fontWeight: "font-weight",
		glyphName: "glyph-name",
		glyphOrientationHorizontal: "glyph-orientation-horizontal",
		glyphOrientationVertical: "glyph-orientation-vertical",
		hrefLang: "hreflang",
		horizAdvX: "horiz-adv-x",
		horizOriginX: "horiz-origin-x",
		horizOriginY: "horiz-origin-y",
		imageRendering: "image-rendering",
		letterSpacing: "letter-spacing",
		lightingColor: "lighting-color",
		markerEnd: "marker-end",
		markerMid: "marker-mid",
		markerStart: "marker-start",
		navDown: "nav-down",
		navDownLeft: "nav-down-left",
		navDownRight: "nav-down-right",
		navLeft: "nav-left",
		navNext: "nav-next",
		navPrev: "nav-prev",
		navRight: "nav-right",
		navUp: "nav-up",
		navUpLeft: "nav-up-left",
		navUpRight: "nav-up-right",
		onAbort: "onabort",
		onActivate: "onactivate",
		onAfterPrint: "onafterprint",
		onBeforePrint: "onbeforeprint",
		onBegin: "onbegin",
		onCancel: "oncancel",
		onCanPlay: "oncanplay",
		onCanPlayThrough: "oncanplaythrough",
		onChange: "onchange",
		onClick: "onclick",
		onClose: "onclose",
		onCopy: "oncopy",
		onCueChange: "oncuechange",
		onCut: "oncut",
		onDblClick: "ondblclick",
		onDrag: "ondrag",
		onDragEnd: "ondragend",
		onDragEnter: "ondragenter",
		onDragExit: "ondragexit",
		onDragLeave: "ondragleave",
		onDragOver: "ondragover",
		onDragStart: "ondragstart",
		onDrop: "ondrop",
		onDurationChange: "ondurationchange",
		onEmptied: "onemptied",
		onEnd: "onend",
		onEnded: "onended",
		onError: "onerror",
		onFocus: "onfocus",
		onFocusIn: "onfocusin",
		onFocusOut: "onfocusout",
		onHashChange: "onhashchange",
		onInput: "oninput",
		onInvalid: "oninvalid",
		onKeyDown: "onkeydown",
		onKeyPress: "onkeypress",
		onKeyUp: "onkeyup",
		onLoad: "onload",
		onLoadedData: "onloadeddata",
		onLoadedMetadata: "onloadedmetadata",
		onLoadStart: "onloadstart",
		onMessage: "onmessage",
		onMouseDown: "onmousedown",
		onMouseEnter: "onmouseenter",
		onMouseLeave: "onmouseleave",
		onMouseMove: "onmousemove",
		onMouseOut: "onmouseout",
		onMouseOver: "onmouseover",
		onMouseUp: "onmouseup",
		onMouseWheel: "onmousewheel",
		onOffline: "onoffline",
		onOnline: "ononline",
		onPageHide: "onpagehide",
		onPageShow: "onpageshow",
		onPaste: "onpaste",
		onPause: "onpause",
		onPlay: "onplay",
		onPlaying: "onplaying",
		onPopState: "onpopstate",
		onProgress: "onprogress",
		onRateChange: "onratechange",
		onRepeat: "onrepeat",
		onReset: "onreset",
		onResize: "onresize",
		onScroll: "onscroll",
		onSeeked: "onseeked",
		onSeeking: "onseeking",
		onSelect: "onselect",
		onShow: "onshow",
		onStalled: "onstalled",
		onStorage: "onstorage",
		onSubmit: "onsubmit",
		onSuspend: "onsuspend",
		onTimeUpdate: "ontimeupdate",
		onToggle: "ontoggle",
		onUnload: "onunload",
		onVolumeChange: "onvolumechange",
		onWaiting: "onwaiting",
		onZoom: "onzoom",
		overlinePosition: "overline-position",
		overlineThickness: "overline-thickness",
		paintOrder: "paint-order",
		panose1: "panose-1",
		pointerEvents: "pointer-events",
		referrerPolicy: "referrerpolicy",
		renderingIntent: "rendering-intent",
		shapeRendering: "shape-rendering",
		stopColor: "stop-color",
		stopOpacity: "stop-opacity",
		strikethroughPosition: "strikethrough-position",
		strikethroughThickness: "strikethrough-thickness",
		strokeDashArray: "stroke-dasharray",
		strokeDashOffset: "stroke-dashoffset",
		strokeLineCap: "stroke-linecap",
		strokeLineJoin: "stroke-linejoin",
		strokeMiterLimit: "stroke-miterlimit",
		strokeOpacity: "stroke-opacity",
		strokeWidth: "stroke-width",
		tabIndex: "tabindex",
		textAnchor: "text-anchor",
		textDecoration: "text-decoration",
		textRendering: "text-rendering",
		transformOrigin: "transform-origin",
		typeOf: "typeof",
		underlinePosition: "underline-position",
		underlineThickness: "underline-thickness",
		unicodeBidi: "unicode-bidi",
		unicodeRange: "unicode-range",
		unitsPerEm: "units-per-em",
		vAlphabetic: "v-alphabetic",
		vHanging: "v-hanging",
		vIdeographic: "v-ideographic",
		vMathematical: "v-mathematical",
		vectorEffect: "vector-effect",
		vertAdvY: "vert-adv-y",
		vertOriginX: "vert-origin-x",
		vertOriginY: "vert-origin-y",
		wordSpacing: "word-spacing",
		writingMode: "writing-mode",
		xHeight: "x-height",
		playbackOrder: "playbackorder",
		timelineBegin: "timelinebegin"
	},
	properties: {
		about: commaOrSpaceSeparated,
		accentHeight: number,
		accumulate: null,
		additive: null,
		alignmentBaseline: null,
		alphabetic: number,
		amplitude: number,
		arabicForm: null,
		ascent: number,
		attributeName: null,
		attributeType: null,
		azimuth: number,
		bandwidth: null,
		baselineShift: null,
		baseFrequency: null,
		baseProfile: null,
		bbox: null,
		begin: null,
		bias: number,
		by: null,
		calcMode: null,
		capHeight: number,
		className: spaceSeparated,
		clip: null,
		clipPath: null,
		clipPathUnits: null,
		clipRule: null,
		color: null,
		colorInterpolation: null,
		colorInterpolationFilters: null,
		colorProfile: null,
		colorRendering: null,
		content: null,
		contentScriptType: null,
		contentStyleType: null,
		crossOrigin: null,
		cursor: null,
		cx: null,
		cy: null,
		d: null,
		dataType: null,
		defaultAction: null,
		descent: number,
		diffuseConstant: number,
		direction: null,
		display: null,
		dur: null,
		divisor: number,
		dominantBaseline: null,
		download: boolean,
		dx: null,
		dy: null,
		edgeMode: null,
		editable: null,
		elevation: number,
		enableBackground: null,
		end: null,
		event: null,
		exponent: number,
		externalResourcesRequired: null,
		fill: null,
		fillOpacity: number,
		fillRule: null,
		filter: null,
		filterRes: null,
		filterUnits: null,
		floodColor: null,
		floodOpacity: null,
		focusable: null,
		focusHighlight: null,
		fontFamily: null,
		fontSize: null,
		fontSizeAdjust: null,
		fontStretch: null,
		fontStyle: null,
		fontVariant: null,
		fontWeight: null,
		format: null,
		fr: null,
		from: null,
		fx: null,
		fy: null,
		g1: commaSeparated,
		g2: commaSeparated,
		glyphName: commaSeparated,
		glyphOrientationHorizontal: null,
		glyphOrientationVertical: null,
		glyphRef: null,
		gradientTransform: null,
		gradientUnits: null,
		handler: null,
		hanging: number,
		hatchContentUnits: null,
		hatchUnits: null,
		height: null,
		href: null,
		hrefLang: null,
		horizAdvX: number,
		horizOriginX: number,
		horizOriginY: number,
		id: null,
		ideographic: number,
		imageRendering: null,
		initialVisibility: null,
		in: null,
		in2: null,
		intercept: number,
		k: number,
		k1: number,
		k2: number,
		k3: number,
		k4: number,
		kernelMatrix: commaOrSpaceSeparated,
		kernelUnitLength: null,
		keyPoints: null,
		keySplines: null,
		keyTimes: null,
		kerning: null,
		lang: null,
		lengthAdjust: null,
		letterSpacing: null,
		lightingColor: null,
		limitingConeAngle: number,
		local: null,
		markerEnd: null,
		markerMid: null,
		markerStart: null,
		markerHeight: null,
		markerUnits: null,
		markerWidth: null,
		mask: null,
		maskContentUnits: null,
		maskUnits: null,
		mathematical: null,
		max: null,
		media: null,
		mediaCharacterEncoding: null,
		mediaContentEncodings: null,
		mediaSize: number,
		mediaTime: null,
		method: null,
		min: null,
		mode: null,
		name: null,
		navDown: null,
		navDownLeft: null,
		navDownRight: null,
		navLeft: null,
		navNext: null,
		navPrev: null,
		navRight: null,
		navUp: null,
		navUpLeft: null,
		navUpRight: null,
		numOctaves: null,
		observer: null,
		offset: null,
		onAbort: null,
		onActivate: null,
		onAfterPrint: null,
		onBeforePrint: null,
		onBegin: null,
		onCancel: null,
		onCanPlay: null,
		onCanPlayThrough: null,
		onChange: null,
		onClick: null,
		onClose: null,
		onCopy: null,
		onCueChange: null,
		onCut: null,
		onDblClick: null,
		onDrag: null,
		onDragEnd: null,
		onDragEnter: null,
		onDragExit: null,
		onDragLeave: null,
		onDragOver: null,
		onDragStart: null,
		onDrop: null,
		onDurationChange: null,
		onEmptied: null,
		onEnd: null,
		onEnded: null,
		onError: null,
		onFocus: null,
		onFocusIn: null,
		onFocusOut: null,
		onHashChange: null,
		onInput: null,
		onInvalid: null,
		onKeyDown: null,
		onKeyPress: null,
		onKeyUp: null,
		onLoad: null,
		onLoadedData: null,
		onLoadedMetadata: null,
		onLoadStart: null,
		onMessage: null,
		onMouseDown: null,
		onMouseEnter: null,
		onMouseLeave: null,
		onMouseMove: null,
		onMouseOut: null,
		onMouseOver: null,
		onMouseUp: null,
		onMouseWheel: null,
		onOffline: null,
		onOnline: null,
		onPageHide: null,
		onPageShow: null,
		onPaste: null,
		onPause: null,
		onPlay: null,
		onPlaying: null,
		onPopState: null,
		onProgress: null,
		onRateChange: null,
		onRepeat: null,
		onReset: null,
		onResize: null,
		onScroll: null,
		onSeeked: null,
		onSeeking: null,
		onSelect: null,
		onShow: null,
		onStalled: null,
		onStorage: null,
		onSubmit: null,
		onSuspend: null,
		onTimeUpdate: null,
		onToggle: null,
		onUnload: null,
		onVolumeChange: null,
		onWaiting: null,
		onZoom: null,
		opacity: null,
		operator: null,
		order: null,
		orient: null,
		orientation: null,
		origin: null,
		overflow: null,
		overlay: null,
		overlinePosition: number,
		overlineThickness: number,
		paintOrder: null,
		panose1: null,
		path: null,
		pathLength: number,
		patternContentUnits: null,
		patternTransform: null,
		patternUnits: null,
		phase: null,
		ping: spaceSeparated,
		pitch: null,
		playbackOrder: null,
		pointerEvents: null,
		points: null,
		pointsAtX: number,
		pointsAtY: number,
		pointsAtZ: number,
		preserveAlpha: null,
		preserveAspectRatio: null,
		primitiveUnits: null,
		propagate: null,
		property: commaOrSpaceSeparated,
		r: null,
		radius: null,
		referrerPolicy: null,
		refX: null,
		refY: null,
		rel: commaOrSpaceSeparated,
		rev: commaOrSpaceSeparated,
		renderingIntent: null,
		repeatCount: null,
		repeatDur: null,
		requiredExtensions: commaOrSpaceSeparated,
		requiredFeatures: commaOrSpaceSeparated,
		requiredFonts: commaOrSpaceSeparated,
		requiredFormats: commaOrSpaceSeparated,
		resource: null,
		restart: null,
		result: null,
		rotate: null,
		rx: null,
		ry: null,
		scale: null,
		seed: null,
		shapeRendering: null,
		side: null,
		slope: null,
		snapshotTime: null,
		specularConstant: number,
		specularExponent: number,
		spreadMethod: null,
		spacing: null,
		startOffset: null,
		stdDeviation: null,
		stemh: null,
		stemv: null,
		stitchTiles: null,
		stopColor: null,
		stopOpacity: null,
		strikethroughPosition: number,
		strikethroughThickness: number,
		string: null,
		stroke: null,
		strokeDashArray: commaOrSpaceSeparated,
		strokeDashOffset: null,
		strokeLineCap: null,
		strokeLineJoin: null,
		strokeMiterLimit: number,
		strokeOpacity: number,
		strokeWidth: null,
		style: null,
		surfaceScale: number,
		syncBehavior: null,
		syncBehaviorDefault: null,
		syncMaster: null,
		syncTolerance: null,
		syncToleranceDefault: null,
		systemLanguage: commaOrSpaceSeparated,
		tabIndex: number,
		tableValues: null,
		target: null,
		targetX: number,
		targetY: number,
		textAnchor: null,
		textDecoration: null,
		textRendering: null,
		textLength: null,
		timelineBegin: null,
		title: null,
		transformBehavior: null,
		type: null,
		typeOf: commaOrSpaceSeparated,
		to: null,
		transform: null,
		transformOrigin: null,
		u1: null,
		u2: null,
		underlinePosition: number,
		underlineThickness: number,
		unicode: null,
		unicodeBidi: null,
		unicodeRange: null,
		unitsPerEm: number,
		values: null,
		vAlphabetic: number,
		vMathematical: number,
		vectorEffect: null,
		vHanging: number,
		vIdeographic: number,
		version: null,
		vertAdvY: number,
		vertOriginX: number,
		vertOriginY: number,
		viewBox: null,
		viewTarget: null,
		visibility: null,
		width: null,
		widths: null,
		wordSpacing: null,
		writingMode: null,
		x: null,
		x1: null,
		x2: null,
		xChannelSelector: null,
		xHeight: number,
		y: null,
		y1: null,
		y2: null,
		yChannelSelector: null,
		z: null,
		zoomAndPan: null
	},
	space: "svg",
	transform: caseSensitiveTransform
});
//#endregion
//#region ../../node_modules/property-information/lib/xlink.js
var xlink = create({
	properties: {
		xLinkActuate: null,
		xLinkArcRole: null,
		xLinkHref: null,
		xLinkRole: null,
		xLinkShow: null,
		xLinkTitle: null,
		xLinkType: null
	},
	space: "xlink",
	transform(_, property) {
		return "xlink:" + property.slice(5).toLowerCase();
	}
});
//#endregion
//#region ../../node_modules/property-information/lib/xmlns.js
var xmlns = create({
	attributes: { xmlnsxlink: "xmlns:xlink" },
	properties: {
		xmlnsXLink: null,
		xmlns: null
	},
	space: "xmlns",
	transform: caseInsensitiveTransform
});
//#endregion
//#region ../../node_modules/property-information/lib/xml.js
var xml = create({
	properties: {
		xmlBase: null,
		xmlLang: null,
		xmlSpace: null
	},
	space: "xml",
	transform(_, property) {
		return "xml:" + property.slice(3).toLowerCase();
	}
});
//#endregion
//#region ../../node_modules/property-information/lib/hast-to-react.js
/**
* Special cases for React (`Record<string, string>`).
*
* `hast` is close to `React` but differs in a couple of cases.
* To get a React property from a hast property,
* check if it is in `hastToReact`.
* If it is, use the corresponding value;
* otherwise, use the hast property.
*
* @type {Record<string, string>}
*/
var hastToReact = {
	classId: "classID",
	dataType: "datatype",
	itemId: "itemID",
	strokeDashArray: "strokeDasharray",
	strokeDashOffset: "strokeDashoffset",
	strokeLineCap: "strokeLinecap",
	strokeLineJoin: "strokeLinejoin",
	strokeMiterLimit: "strokeMiterlimit",
	typeOf: "typeof",
	xLinkActuate: "xlinkActuate",
	xLinkArcRole: "xlinkArcrole",
	xLinkHref: "xlinkHref",
	xLinkRole: "xlinkRole",
	xLinkShow: "xlinkShow",
	xLinkTitle: "xlinkTitle",
	xLinkType: "xlinkType",
	xmlnsXLink: "xmlnsXlink"
};
//#endregion
//#region ../../node_modules/property-information/lib/find.js
/**
* @import {Schema} from 'property-information'
*/
var cap$1 = /[A-Z]/g;
var dash = /-[a-z]/g;
var valid = /^data[-\w.:]+$/i;
/**
* Look up info on a property.
*
* In most cases the given `schema` contains info on the property.
* All standard,
* most legacy,
* and some non-standard properties are supported.
* For these cases,
* the returned `Info` has hints about the value of the property.
*
* `name` can also be a valid data attribute or property,
* in which case an `Info` object with the correctly cased `attribute` and
* `property` is returned.
*
* `name` can be an unknown attribute,
* in which case an `Info` object with `attribute` and `property` set to the
* given name is returned.
* It is not recommended to provide unsupported legacy or recently specced
* properties.
*
*
* @param {Schema} schema
*   Schema;
*   either the `html` or `svg` export.
* @param {string} value
*   An attribute-like or property-like name;
*   it will be passed through `normalize` to hopefully find the correct info.
* @returns {Info}
*   Info.
*/
function find(schema, value) {
	const normal = normalize$1(value);
	let property = value;
	let Type = Info;
	if (normal in schema.normal) return schema.property[schema.normal[normal]];
	if (normal.length > 4 && normal.slice(0, 4) === "data" && valid.test(value)) {
		if (value.charAt(4) === "-") {
			const rest = value.slice(5).replace(dash, camelcase);
			property = "data" + rest.charAt(0).toUpperCase() + rest.slice(1);
		} else {
			const rest = value.slice(4);
			if (!dash.test(rest)) {
				let dashes = rest.replace(cap$1, kebab);
				if (dashes.charAt(0) !== "-") dashes = "-" + dashes;
				value = "data" + dashes;
			}
		}
		Type = DefinedInfo;
	}
	return new Type(property, value);
}
/**
* @param {string} $0
*   Value.
* @returns {string}
*   Kebab.
*/
function kebab($0) {
	return "-" + $0.toLowerCase();
}
/**
* @param {string} $0
*   Value.
* @returns {string}
*   Camel.
*/
function camelcase($0) {
	return $0.charAt(1).toUpperCase();
}
//#endregion
//#region ../../node_modules/property-information/index.js
var html$2 = merge([
	aria,
	html$3,
	xlink,
	xmlns,
	xml
], "html");
var svg = merge([
	aria,
	svg$1,
	xlink,
	xmlns,
	xml
], "svg");
//#endregion
//#region ../../node_modules/space-separated-tokens/index.js
/**
* Parse space-separated tokens to an array of strings.
*
* @param {string} value
*   Space-separated tokens.
* @returns {Array<string>}
*   List of tokens.
*/
function parse$1(value) {
	const input = String(value || "").trim();
	return input ? input.split(/[ \t\n\r\f]+/g) : [];
}
/**
* Serialize an array of strings as space separated-tokens.
*
* @param {Array<string|number>} values
*   List of tokens.
* @returns {string}
*   Space-separated tokens.
*/
function stringify(values) {
	return values.join(" ").trim();
}
//#endregion
//#region ../../node_modules/inline-style-parser/index.js
var require_inline_style_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
	var NEWLINE_REGEX = /\n/g;
	var WHITESPACE_REGEX = /^\s*/;
	var PROPERTY_REGEX = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/;
	var COLON_REGEX = /^:\s*/;
	var VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/;
	var SEMICOLON_REGEX = /^[;\s]*/;
	var TRIM_REGEX = /^\s+|\s+$/g;
	var NEWLINE = "\n";
	var FORWARD_SLASH = "/";
	var ASTERISK = "*";
	var EMPTY_STRING = "";
	var TYPE_COMMENT = "comment";
	var TYPE_DECLARATION = "declaration";
	/**
	* @param {String} style
	* @param {Object} [options]
	* @return {Object[]}
	* @throws {TypeError}
	* @throws {Error}
	*/
	module.exports = function(style, options) {
		if (typeof style !== "string") throw new TypeError("First argument must be a string");
		if (!style) return [];
		options = options || {};
		/**
		* Positional.
		*/
		var lineno = 1;
		var column = 1;
		/**
		* Update lineno and column based on `str`.
		*
		* @param {String} str
		*/
		function updatePosition(str) {
			var lines = str.match(NEWLINE_REGEX);
			if (lines) lineno += lines.length;
			var i = str.lastIndexOf(NEWLINE);
			column = ~i ? str.length - i : column + str.length;
		}
		/**
		* Mark position and patch `node.position`.
		*
		* @return {Function}
		*/
		function position() {
			var start = {
				line: lineno,
				column
			};
			return function(node) {
				node.position = new Position(start);
				whitespace();
				return node;
			};
		}
		/**
		* Store position information for a node.
		*
		* @constructor
		* @property {Object} start
		* @property {Object} end
		* @property {undefined|String} source
		*/
		function Position(start) {
			this.start = start;
			this.end = {
				line: lineno,
				column
			};
			this.source = options.source;
		}
		/**
		* Non-enumerable source string.
		*/
		Position.prototype.content = style;
		var errorsList = [];
		/**
		* Error `msg`.
		*
		* @param {String} msg
		* @throws {Error}
		*/
		function error(msg) {
			var err = /* @__PURE__ */ new Error(options.source + ":" + lineno + ":" + column + ": " + msg);
			err.reason = msg;
			err.filename = options.source;
			err.line = lineno;
			err.column = column;
			err.source = style;
			if (options.silent) errorsList.push(err);
			else throw err;
		}
		/**
		* Match `re` and return captures.
		*
		* @param {RegExp} re
		* @return {undefined|Array}
		*/
		function match(re) {
			var m = re.exec(style);
			if (!m) return;
			var str = m[0];
			updatePosition(str);
			style = style.slice(str.length);
			return m;
		}
		/**
		* Parse whitespace.
		*/
		function whitespace() {
			match(WHITESPACE_REGEX);
		}
		/**
		* Parse comments.
		*
		* @param {Object[]} [rules]
		* @return {Object[]}
		*/
		function comments(rules) {
			var c;
			rules = rules || [];
			while (c = comment()) if (c !== false) rules.push(c);
			return rules;
		}
		/**
		* Parse comment.
		*
		* @return {Object}
		* @throws {Error}
		*/
		function comment() {
			var pos = position();
			if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;
			var i = 2;
			while (EMPTY_STRING != style.charAt(i) && (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))) ++i;
			i += 2;
			if (EMPTY_STRING === style.charAt(i - 1)) return error("End of comment missing");
			var str = style.slice(2, i - 2);
			column += 2;
			updatePosition(str);
			style = style.slice(i);
			column += 2;
			return pos({
				type: TYPE_COMMENT,
				comment: str
			});
		}
		/**
		* Parse declaration.
		*
		* @return {Object}
		* @throws {Error}
		*/
		function declaration() {
			var pos = position();
			var prop = match(PROPERTY_REGEX);
			if (!prop) return;
			comment();
			if (!match(COLON_REGEX)) return error("property missing ':'");
			var val = match(VALUE_REGEX);
			var ret = pos({
				type: TYPE_DECLARATION,
				property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),
				value: val ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING)) : EMPTY_STRING
			});
			match(SEMICOLON_REGEX);
			return ret;
		}
		/**
		* Parse declarations.
		*
		* @return {Object[]}
		*/
		function declarations() {
			var decls = [];
			comments(decls);
			var decl;
			while (decl = declaration()) if (decl !== false) {
				decls.push(decl);
				comments(decls);
			}
			return decls;
		}
		whitespace();
		return declarations();
	};
	/**
	* Trim `str`.
	*
	* @param {String} str
	* @return {String}
	*/
	function trim(str) {
		return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;
	}
}));
//#endregion
//#region ../../node_modules/style-to-object/cjs/index.js
var require_cjs$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
	var __importDefault = exports && exports.__importDefault || function(mod) {
		return mod && mod.__esModule ? mod : { "default": mod };
	};
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.default = StyleToObject;
	var inline_style_parser_1 = __importDefault(require_inline_style_parser());
	/**
	* Parses inline style to object.
	*
	* @param style - Inline style.
	* @param iterator - Iterator.
	* @returns - Style object or null.
	*
	* @example Parsing inline style to object:
	*
	* ```js
	* import parse from 'style-to-object';
	* parse('line-height: 42;'); // { 'line-height': '42' }
	* ```
	*/
	function StyleToObject(style, iterator) {
		var styleObject = null;
		if (!style || typeof style !== "string") return styleObject;
		var declarations = (0, inline_style_parser_1.default)(style);
		var hasIterator = typeof iterator === "function";
		declarations.forEach(function(declaration) {
			if (declaration.type !== "declaration") return;
			var property = declaration.property, value = declaration.value;
			if (hasIterator) iterator(property, value, declaration);
			else if (value) {
				styleObject = styleObject || {};
				styleObject[property] = value;
			}
		});
		return styleObject;
	}
}));
//#endregion
//#region ../../node_modules/style-to-js/cjs/utilities.js
var require_utilities = /* @__PURE__ */ __commonJSMin(((exports) => {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.camelCase = void 0;
	var CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9_-]+$/;
	var HYPHEN_REGEX = /-([a-z])/g;
	var NO_HYPHEN_REGEX = /^[^-]+$/;
	var VENDOR_PREFIX_REGEX = /^-(webkit|moz|ms|o|khtml)-/;
	var MS_VENDOR_PREFIX_REGEX = /^-(ms)-/;
	/**
	* Checks whether to skip camelCase.
	*/
	var skipCamelCase = function(property) {
		return !property || NO_HYPHEN_REGEX.test(property) || CUSTOM_PROPERTY_REGEX.test(property);
	};
	/**
	* Replacer that capitalizes first character.
	*/
	var capitalize = function(match, character) {
		return character.toUpperCase();
	};
	/**
	* Replacer that removes beginning hyphen of vendor prefix property.
	*/
	var trimHyphen = function(match, prefix) {
		return "".concat(prefix, "-");
	};
	/**
	* CamelCases a CSS property.
	*/
	var camelCase = function(property, options) {
		if (options === void 0) options = {};
		if (skipCamelCase(property)) return property;
		property = property.toLowerCase();
		if (options.reactCompat) property = property.replace(MS_VENDOR_PREFIX_REGEX, trimHyphen);
		else property = property.replace(VENDOR_PREFIX_REGEX, trimHyphen);
		return property.replace(HYPHEN_REGEX, capitalize);
	};
	exports.camelCase = camelCase;
}));
//#endregion
//#region ../../node_modules/style-to-js/cjs/index.js
var require_cjs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	var style_to_object_1 = (exports && exports.__importDefault || function(mod) {
		return mod && mod.__esModule ? mod : { "default": mod };
	})(require_cjs$1());
	var utilities_1 = require_utilities();
	/**
	* Parses CSS inline style to JavaScript object (camelCased).
	*/
	function StyleToJS(style, options) {
		var output = {};
		if (!style || typeof style !== "string") return output;
		(0, style_to_object_1.default)(style, function(property, value) {
			if (property && value) output[(0, utilities_1.camelCase)(property, options)] = value;
		});
		return output;
	}
	StyleToJS.default = StyleToJS;
	module.exports = StyleToJS;
}));
//#endregion
//#region ../../node_modules/unist-util-position/lib/index.js
/**
* @typedef {import('unist').Node} Node
* @typedef {import('unist').Point} Point
* @typedef {import('unist').Position} Position
*/
/**
* @typedef NodeLike
* @property {string} type
* @property {PositionLike | null | undefined} [position]
*
* @typedef PositionLike
* @property {PointLike | null | undefined} [start]
* @property {PointLike | null | undefined} [end]
*
* @typedef PointLike
* @property {number | null | undefined} [line]
* @property {number | null | undefined} [column]
* @property {number | null | undefined} [offset]
*/
/**
* Get the ending point of `node`.
*
* @param node
*   Node.
* @returns
*   Point.
*/
var pointEnd = point$2("end");
/**
* Get the starting point of `node`.
*
* @param node
*   Node.
* @returns
*   Point.
*/
var pointStart = point$2("start");
/**
* Get the positional info of `node`.
*
* @param {'end' | 'start'} type
*   Side.
* @returns
*   Getter.
*/
function point$2(type) {
	return point;
	/**
	* Get the point info of `node` at a bound side.
	*
	* @param {Node | NodeLike | null | undefined} [node]
	* @returns {Point | undefined}
	*/
	function point(node) {
		const point = node && node.position && node.position[type] || {};
		if (typeof point.line === "number" && point.line > 0 && typeof point.column === "number" && point.column > 0) return {
			line: point.line,
			column: point.column,
			offset: typeof point.offset === "number" && point.offset > -1 ? point.offset : void 0
		};
	}
}
/**
* Get the positional info of `node`.
*
* @param {Node | NodeLike | null | undefined} [node]
*   Node.
* @returns {Position | undefined}
*   Position.
*/
function position$1(node) {
	const start = pointStart(node);
	const end = pointEnd(node);
	if (start && end) return {
		start,
		end
	};
}
//#endregion
//#region ../../node_modules/unist-util-stringify-position/lib/index.js
/**
* @typedef {import('unist').Node} Node
* @typedef {import('unist').Point} Point
* @typedef {import('unist').Position} Position
*/
/**
* @typedef NodeLike
* @property {string} type
* @property {PositionLike | null | undefined} [position]
*
* @typedef PointLike
* @property {number | null | undefined} [line]
* @property {number | null | undefined} [column]
* @property {number | null | undefined} [offset]
*
* @typedef PositionLike
* @property {PointLike | null | undefined} [start]
* @property {PointLike | null | undefined} [end]
*/
/**
* Serialize the positional info of a point, position (start and end points),
* or node.
*
* @param {Node | NodeLike | Point | PointLike | Position | PositionLike | null | undefined} [value]
*   Node, position, or point.
* @returns {string}
*   Pretty printed positional info of a node (`string`).
*
*   In the format of a range `ls:cs-le:ce` (when given `node` or `position`)
*   or a point `l:c` (when given `point`), where `l` stands for line, `c` for
*   column, `s` for `start`, and `e` for end.
*   An empty string (`''`) is returned if the given value is neither `node`,
*   `position`, nor `point`.
*/
function stringifyPosition(value) {
	if (!value || typeof value !== "object") return "";
	if ("position" in value || "type" in value) return position(value.position);
	if ("start" in value || "end" in value) return position(value);
	if ("line" in value || "column" in value) return point$1(value);
	return "";
}
/**
* @param {Point | PointLike | null | undefined} point
* @returns {string}
*/
function point$1(point) {
	return index(point && point.line) + ":" + index(point && point.column);
}
/**
* @param {Position | PositionLike | null | undefined} pos
* @returns {string}
*/
function position(pos) {
	return point$1(pos && pos.start) + "-" + point$1(pos && pos.end);
}
/**
* @param {number | null | undefined} value
* @returns {number}
*/
function index(value) {
	return value && typeof value === "number" ? value : 1;
}
//#endregion
//#region ../../node_modules/vfile-message/lib/index.js
/**
* @import {Node, Point, Position} from 'unist'
*/
/**
* @typedef {object & {type: string, position?: Position | undefined}} NodeLike
*
* @typedef Options
*   Configuration.
* @property {Array<Node> | null | undefined} [ancestors]
*   Stack of (inclusive) ancestor nodes surrounding the message (optional).
* @property {Error | null | undefined} [cause]
*   Original error cause of the message (optional).
* @property {Point | Position | null | undefined} [place]
*   Place of message (optional).
* @property {string | null | undefined} [ruleId]
*   Category of message (optional, example: `'my-rule'`).
* @property {string | null | undefined} [source]
*   Namespace of who sent the message (optional, example: `'my-package'`).
*/
/**
* Message.
*/
var VFileMessage = class extends Error {
	/**
	* Create a message for `reason`.
	*
	* > 🪦 **Note**: also has obsolete signatures.
	*
	* @overload
	* @param {string} reason
	* @param {Options | null | undefined} [options]
	* @returns
	*
	* @overload
	* @param {string} reason
	* @param {Node | NodeLike | null | undefined} parent
	* @param {string | null | undefined} [origin]
	* @returns
	*
	* @overload
	* @param {string} reason
	* @param {Point | Position | null | undefined} place
	* @param {string | null | undefined} [origin]
	* @returns
	*
	* @overload
	* @param {string} reason
	* @param {string | null | undefined} [origin]
	* @returns
	*
	* @overload
	* @param {Error | VFileMessage} cause
	* @param {Node | NodeLike | null | undefined} parent
	* @param {string | null | undefined} [origin]
	* @returns
	*
	* @overload
	* @param {Error | VFileMessage} cause
	* @param {Point | Position | null | undefined} place
	* @param {string | null | undefined} [origin]
	* @returns
	*
	* @overload
	* @param {Error | VFileMessage} cause
	* @param {string | null | undefined} [origin]
	* @returns
	*
	* @param {Error | VFileMessage | string} causeOrReason
	*   Reason for message, should use markdown.
	* @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
	*   Configuration (optional).
	* @param {string | null | undefined} [origin]
	*   Place in code where the message originates (example:
	*   `'my-package:my-rule'` or `'my-rule'`).
	* @returns
	*   Instance of `VFileMessage`.
	*/
	constructor(causeOrReason, optionsOrParentOrPlace, origin) {
		super();
		if (typeof optionsOrParentOrPlace === "string") {
			origin = optionsOrParentOrPlace;
			optionsOrParentOrPlace = void 0;
		}
		/** @type {string} */
		let reason = "";
		/** @type {Options} */
		let options = {};
		let legacyCause = false;
		if (optionsOrParentOrPlace) if ("line" in optionsOrParentOrPlace && "column" in optionsOrParentOrPlace) options = { place: optionsOrParentOrPlace };
		else if ("start" in optionsOrParentOrPlace && "end" in optionsOrParentOrPlace) options = { place: optionsOrParentOrPlace };
		else if ("type" in optionsOrParentOrPlace) options = {
			ancestors: [optionsOrParentOrPlace],
			place: optionsOrParentOrPlace.position
		};
		else options = { ...optionsOrParentOrPlace };
		if (typeof causeOrReason === "string") reason = causeOrReason;
		else if (!options.cause && causeOrReason) {
			legacyCause = true;
			reason = causeOrReason.message;
			options.cause = causeOrReason;
		}
		if (!options.ruleId && !options.source && typeof origin === "string") {
			const index = origin.indexOf(":");
			if (index === -1) options.ruleId = origin;
			else {
				options.source = origin.slice(0, index);
				options.ruleId = origin.slice(index + 1);
			}
		}
		if (!options.place && options.ancestors && options.ancestors) {
			const parent = options.ancestors[options.ancestors.length - 1];
			if (parent) options.place = parent.position;
		}
		const start = options.place && "start" in options.place ? options.place.start : options.place;
		/**
		* Stack of ancestor nodes surrounding the message.
		*
		* @type {Array<Node> | undefined}
		*/
		this.ancestors = options.ancestors || void 0;
		/**
		* Original error cause of the message.
		*
		* @type {Error | undefined}
		*/
		this.cause = options.cause || void 0;
		/**
		* Starting column of message.
		*
		* @type {number | undefined}
		*/
		this.column = start ? start.column : void 0;
		/**
		* State of problem.
		*
		* * `true` — error, file not usable
		* * `false` — warning, change may be needed
		* * `undefined` — change likely not needed
		*
		* @type {boolean | null | undefined}
		*/
		this.fatal = void 0;
		/**
		* Path of a file (used throughout the `VFile` ecosystem).
		*
		* @type {string | undefined}
		*/
		this.file = "";
		/**
		* Reason for message.
		*
		* @type {string}
		*/
		this.message = reason;
		/**
		* Starting line of error.
		*
		* @type {number | undefined}
		*/
		this.line = start ? start.line : void 0;
		/**
		* Serialized positional info of message.
		*
		* On normal errors, this would be something like `ParseError`, buit in
		* `VFile` messages we use this space to show where an error happened.
		*/
		this.name = stringifyPosition(options.place) || "1:1";
		/**
		* Place of message.
		*
		* @type {Point | Position | undefined}
		*/
		this.place = options.place || void 0;
		/**
		* Reason for message, should use markdown.
		*
		* @type {string}
		*/
		this.reason = this.message;
		/**
		* Category of message (example: `'my-rule'`).
		*
		* @type {string | undefined}
		*/
		this.ruleId = options.ruleId || void 0;
		/**
		* Namespace of message (example: `'my-package'`).
		*
		* @type {string | undefined}
		*/
		this.source = options.source || void 0;
		/**
		* Stack of message.
		*
		* This is used by normal errors to show where something happened in
		* programming code, irrelevant for `VFile` messages,
		*
		* @type {string}
		*/
		this.stack = legacyCause && options.cause && typeof options.cause.stack === "string" ? options.cause.stack : "";
		/**
		* Specify the source value that’s being reported, which is deemed
		* incorrect.
		*
		* @type {string | undefined}
		*/
		this.actual = void 0;
		/**
		* Suggest acceptable values that can be used instead of `actual`.
		*
		* @type {Array<string> | undefined}
		*/
		this.expected = void 0;
		/**
		* Long form description of the message (you should use markdown).
		*
		* @type {string | undefined}
		*/
		this.note = void 0;
		/**
		* Link to docs for the message.
		*
		* > 👉 **Note**: this must be an absolute URL that can be passed as `x`
		* > to `new URL(x)`.
		*
		* @type {string | undefined}
		*/
		this.url = void 0;
	}
};
VFileMessage.prototype.file = "";
VFileMessage.prototype.name = "";
VFileMessage.prototype.reason = "";
VFileMessage.prototype.message = "";
VFileMessage.prototype.stack = "";
VFileMessage.prototype.column = void 0;
VFileMessage.prototype.line = void 0;
VFileMessage.prototype.ancestors = void 0;
VFileMessage.prototype.cause = void 0;
VFileMessage.prototype.fatal = void 0;
VFileMessage.prototype.place = void 0;
VFileMessage.prototype.ruleId = void 0;
VFileMessage.prototype.source = void 0;
//#endregion
//#region ../../node_modules/hast-util-to-jsx-runtime/lib/index.js
/**
* @import {Identifier, Literal, MemberExpression} from 'estree'
* @import {Jsx, JsxDev, Options, Props} from 'hast-util-to-jsx-runtime'
* @import {Element, Nodes, Parents, Root, Text} from 'hast'
* @import {MdxFlowExpressionHast, MdxTextExpressionHast} from 'mdast-util-mdx-expression'
* @import {MdxJsxFlowElementHast, MdxJsxTextElementHast} from 'mdast-util-mdx-jsx'
* @import {MdxjsEsmHast} from 'mdast-util-mdxjs-esm'
* @import {Position} from 'unist'
* @import {Child, Create, Field, JsxElement, State, Style} from './types.js'
*/
var import_cjs = /* @__PURE__ */ __toESM(require_cjs(), 1);
var own$3 = {}.hasOwnProperty;
/** @type {Map<string, number>} */
var emptyMap = /* @__PURE__ */ new Map();
var cap = /[A-Z]/g;
var tableElements = new Set([
	"table",
	"tbody",
	"thead",
	"tfoot",
	"tr"
]);
var tableCellElement = new Set(["td", "th"]);
var docs = "https://github.com/syntax-tree/hast-util-to-jsx-runtime";
/**
* Transform a hast tree to preact, react, solid, svelte, vue, etc.,
* with an automatic JSX runtime.
*
* @param {Nodes} tree
*   Tree to transform.
* @param {Options} options
*   Configuration (required).
* @returns {JsxElement}
*   JSX element.
*/
function toJsxRuntime(tree, options) {
	if (!options || options.Fragment === void 0) throw new TypeError("Expected `Fragment` in options");
	const filePath = options.filePath || void 0;
	/** @type {Create} */
	let create;
	if (options.development) {
		if (typeof options.jsxDEV !== "function") throw new TypeError("Expected `jsxDEV` in options when `development: true`");
		create = developmentCreate(filePath, options.jsxDEV);
	} else {
		if (typeof options.jsx !== "function") throw new TypeError("Expected `jsx` in production options");
		if (typeof options.jsxs !== "function") throw new TypeError("Expected `jsxs` in production options");
		create = productionCreate(filePath, options.jsx, options.jsxs);
	}
	/** @type {State} */
	const state = {
		Fragment: options.Fragment,
		ancestors: [],
		components: options.components || {},
		create,
		elementAttributeNameCase: options.elementAttributeNameCase || "react",
		evaluater: options.createEvaluater ? options.createEvaluater() : void 0,
		filePath,
		ignoreInvalidStyle: options.ignoreInvalidStyle || false,
		passKeys: options.passKeys !== false,
		passNode: options.passNode || false,
		schema: options.space === "svg" ? svg : html$2,
		stylePropertyNameCase: options.stylePropertyNameCase || "dom",
		tableCellAlignToStyle: options.tableCellAlignToStyle !== false
	};
	const result = one$1(state, tree, void 0);
	if (result && typeof result !== "string") return result;
	return state.create(tree, state.Fragment, { children: result || void 0 }, void 0);
}
/**
* Transform a node.
*
* @param {State} state
*   Info passed around.
* @param {Nodes} node
*   Current node.
* @param {string | undefined} key
*   Key.
* @returns {Child | undefined}
*   Child, optional.
*/
function one$1(state, node, key) {
	if (node.type === "element") return element$2(state, node, key);
	if (node.type === "mdxFlowExpression" || node.type === "mdxTextExpression") return mdxExpression(state, node);
	if (node.type === "mdxJsxFlowElement" || node.type === "mdxJsxTextElement") return mdxJsxElement(state, node, key);
	if (node.type === "mdxjsEsm") return mdxEsm(state, node);
	if (node.type === "root") return root$2(state, node, key);
	if (node.type === "text") return text$5(state, node);
}
/**
* Handle element.
*
* @param {State} state
*   Info passed around.
* @param {Element} node
*   Current node.
* @param {string | undefined} key
*   Key.
* @returns {Child | undefined}
*   Child, optional.
*/
function element$2(state, node, key) {
	const parentSchema = state.schema;
	let schema = parentSchema;
	if (node.tagName.toLowerCase() === "svg" && parentSchema.space === "html") {
		schema = svg;
		state.schema = schema;
	}
	state.ancestors.push(node);
	const type = findComponentFromName(state, node.tagName, false);
	const props = createElementProps(state, node);
	let children = createChildren(state, node);
	if (tableElements.has(node.tagName)) children = children.filter(function(child) {
		return typeof child === "string" ? !whitespace(child) : true;
	});
	addNode(state, props, type, node);
	addChildren(props, children);
	state.ancestors.pop();
	state.schema = parentSchema;
	return state.create(node, type, props, key);
}
/**
* Handle MDX expression.
*
* @param {State} state
*   Info passed around.
* @param {MdxFlowExpressionHast | MdxTextExpressionHast} node
*   Current node.
* @returns {Child | undefined}
*   Child, optional.
*/
function mdxExpression(state, node) {
	if (node.data && node.data.estree && state.evaluater) {
		const expression = node.data.estree.body[0];
		expression.type;
		return state.evaluater.evaluateExpression(expression.expression);
	}
	crashEstree(state, node.position);
}
/**
* Handle MDX ESM.
*
* @param {State} state
*   Info passed around.
* @param {MdxjsEsmHast} node
*   Current node.
* @returns {Child | undefined}
*   Child, optional.
*/
function mdxEsm(state, node) {
	if (node.data && node.data.estree && state.evaluater) return state.evaluater.evaluateProgram(node.data.estree);
	crashEstree(state, node.position);
}
/**
* Handle MDX JSX.
*
* @param {State} state
*   Info passed around.
* @param {MdxJsxFlowElementHast | MdxJsxTextElementHast} node
*   Current node.
* @param {string | undefined} key
*   Key.
* @returns {Child | undefined}
*   Child, optional.
*/
function mdxJsxElement(state, node, key) {
	const parentSchema = state.schema;
	let schema = parentSchema;
	if (node.name === "svg" && parentSchema.space === "html") {
		schema = svg;
		state.schema = schema;
	}
	state.ancestors.push(node);
	const type = node.name === null ? state.Fragment : findComponentFromName(state, node.name, true);
	const props = createJsxElementProps(state, node);
	const children = createChildren(state, node);
	addNode(state, props, type, node);
	addChildren(props, children);
	state.ancestors.pop();
	state.schema = parentSchema;
	return state.create(node, type, props, key);
}
/**
* Handle root.
*
* @param {State} state
*   Info passed around.
* @param {Root} node
*   Current node.
* @param {string | undefined} key
*   Key.
* @returns {Child | undefined}
*   Child, optional.
*/
function root$2(state, node, key) {
	/** @type {Props} */
	const props = {};
	addChildren(props, createChildren(state, node));
	return state.create(node, state.Fragment, props, key);
}
/**
* Handle text.
*
* @param {State} _
*   Info passed around.
* @param {Text} node
*   Current node.
* @returns {Child | undefined}
*   Child, optional.
*/
function text$5(_, node) {
	return node.value;
}
/**
* Add `node` to props.
*
* @param {State} state
*   Info passed around.
* @param {Props} props
*   Props.
* @param {unknown} type
*   Type.
* @param {Element | MdxJsxFlowElementHast | MdxJsxTextElementHast} node
*   Node.
* @returns {undefined}
*   Nothing.
*/
function addNode(state, props, type, node) {
	if (typeof type !== "string" && type !== state.Fragment && state.passNode) props.node = node;
}
/**
* Add children to props.
*
* @param {Props} props
*   Props.
* @param {Array<Child>} children
*   Children.
* @returns {undefined}
*   Nothing.
*/
function addChildren(props, children) {
	if (children.length > 0) {
		const value = children.length > 1 ? children : children[0];
		if (value) props.children = value;
	}
}
/**
* @param {string | undefined} _
*   Path to file.
* @param {Jsx} jsx
*   Dynamic.
* @param {Jsx} jsxs
*   Static.
* @returns {Create}
*   Create a production element.
*/
function productionCreate(_, jsx, jsxs) {
	return create;
	/** @type {Create} */
	function create(_, type, props, key) {
		const fn = Array.isArray(props.children) ? jsxs : jsx;
		return key ? fn(type, props, key) : fn(type, props);
	}
}
/**
* @param {string | undefined} filePath
*   Path to file.
* @param {JsxDev} jsxDEV
*   Development.
* @returns {Create}
*   Create a development element.
*/
function developmentCreate(filePath, jsxDEV) {
	return create;
	/** @type {Create} */
	function create(node, type, props, key) {
		const isStaticChildren = Array.isArray(props.children);
		const point = pointStart(node);
		return jsxDEV(type, props, key, isStaticChildren, {
			columnNumber: point ? point.column - 1 : void 0,
			fileName: filePath,
			lineNumber: point ? point.line : void 0
		}, void 0);
	}
}
/**
* Create props from an element.
*
* @param {State} state
*   Info passed around.
* @param {Element} node
*   Current element.
* @returns {Props}
*   Props.
*/
function createElementProps(state, node) {
	/** @type {Props} */
	const props = {};
	/** @type {string | undefined} */
	let alignValue;
	/** @type {string} */
	let prop;
	for (prop in node.properties) if (prop !== "children" && own$3.call(node.properties, prop)) {
		const result = createProperty(state, prop, node.properties[prop]);
		if (result) {
			const [key, value] = result;
			if (state.tableCellAlignToStyle && key === "align" && typeof value === "string" && tableCellElement.has(node.tagName)) alignValue = value;
			else props[key] = value;
		}
	}
	if (alignValue) {
		const style = props.style || (props.style = {});
		style[state.stylePropertyNameCase === "css" ? "text-align" : "textAlign"] = alignValue;
	}
	return props;
}
/**
* Create props from a JSX element.
*
* @param {State} state
*   Info passed around.
* @param {MdxJsxFlowElementHast | MdxJsxTextElementHast} node
*   Current JSX element.
* @returns {Props}
*   Props.
*/
function createJsxElementProps(state, node) {
	/** @type {Props} */
	const props = {};
	for (const attribute of node.attributes) if (attribute.type === "mdxJsxExpressionAttribute") if (attribute.data && attribute.data.estree && state.evaluater) {
		const expression = attribute.data.estree.body[0];
		expression.type;
		const objectExpression = expression.expression;
		objectExpression.type;
		const property = objectExpression.properties[0];
		property.type;
		Object.assign(props, state.evaluater.evaluateExpression(property.argument));
	} else crashEstree(state, node.position);
	else {
		const name = attribute.name;
		/** @type {unknown} */
		let value;
		if (attribute.value && typeof attribute.value === "object") if (attribute.value.data && attribute.value.data.estree && state.evaluater) {
			const expression = attribute.value.data.estree.body[0];
			expression.type;
			value = state.evaluater.evaluateExpression(expression.expression);
		} else crashEstree(state, node.position);
		else value = attribute.value === null ? true : attribute.value;
		props[name] = value;
	}
	return props;
}
/**
* Create children.
*
* @param {State} state
*   Info passed around.
* @param {Parents} node
*   Current element.
* @returns {Array<Child>}
*   Children.
*/
function createChildren(state, node) {
	/** @type {Array<Child>} */
	const children = [];
	let index = -1;
	/** @type {Map<string, number>} */
	/* c8 ignore next */
	const countsByName = state.passKeys ? /* @__PURE__ */ new Map() : emptyMap;
	while (++index < node.children.length) {
		const child = node.children[index];
		/** @type {string | undefined} */
		let key;
		if (state.passKeys) {
			const name = child.type === "element" ? child.tagName : child.type === "mdxJsxFlowElement" || child.type === "mdxJsxTextElement" ? child.name : void 0;
			if (name) {
				const count = countsByName.get(name) || 0;
				key = name + "-" + count;
				countsByName.set(name, count + 1);
			}
		}
		const result = one$1(state, child, key);
		if (result !== void 0) children.push(result);
	}
	return children;
}
/**
* Handle a property.
*
* @param {State} state
*   Info passed around.
* @param {string} prop
*   Key.
* @param {Array<number | string> | boolean | number | string | null | undefined} value
*   hast property value.
* @returns {Field | undefined}
*   Field for runtime, optional.
*/
function createProperty(state, prop, value) {
	const info = find(state.schema, prop);
	if (value === null || value === void 0 || typeof value === "number" && Number.isNaN(value)) return;
	if (Array.isArray(value)) value = info.commaSeparated ? stringify$1(value) : stringify(value);
	if (info.property === "style") {
		let styleObject = typeof value === "object" ? value : parseStyle(state, String(value));
		if (state.stylePropertyNameCase === "css") styleObject = transformStylesToCssCasing(styleObject);
		return ["style", styleObject];
	}
	return [state.elementAttributeNameCase === "react" && info.space ? hastToReact[info.property] || info.property : info.attribute, value];
}
/**
* Parse a CSS declaration to an object.
*
* @param {State} state
*   Info passed around.
* @param {string} value
*   CSS declarations.
* @returns {Style}
*   Properties.
* @throws
*   Throws `VFileMessage` when CSS cannot be parsed.
*/
function parseStyle(state, value) {
	try {
		return (0, import_cjs.default)(value, { reactCompat: true });
	} catch (error) {
		if (state.ignoreInvalidStyle) return {};
		const cause = error;
		const message = new VFileMessage("Cannot parse `style` attribute", {
			ancestors: state.ancestors,
			cause,
			ruleId: "style",
			source: "hast-util-to-jsx-runtime"
		});
		message.file = state.filePath || void 0;
		message.url = docs + "#cannot-parse-style-attribute";
		throw message;
	}
}
/**
* Create a JSX name from a string.
*
* @param {State} state
*   To do.
* @param {string} name
*   Name.
* @param {boolean} allowExpression
*   Allow member expressions and identifiers.
* @returns {unknown}
*   To do.
*/
function findComponentFromName(state, name$1, allowExpression) {
	/** @type {Identifier | Literal | MemberExpression} */
	let result;
	if (!allowExpression) result = {
		type: "Literal",
		value: name$1
	};
	else if (name$1.includes(".")) {
		const identifiers = name$1.split(".");
		let index = -1;
		/** @type {Identifier | Literal | MemberExpression | undefined} */
		let node;
		while (++index < identifiers.length) {
			/** @type {Identifier | Literal} */
			const prop = name(identifiers[index]) ? {
				type: "Identifier",
				name: identifiers[index]
			} : {
				type: "Literal",
				value: identifiers[index]
			};
			node = node ? {
				type: "MemberExpression",
				object: node,
				property: prop,
				computed: Boolean(index && prop.type === "Literal"),
				optional: false
			} : prop;
		}
		result = node;
	} else result = name(name$1) && !/^[a-z]/.test(name$1) ? {
		type: "Identifier",
		name: name$1
	} : {
		type: "Literal",
		value: name$1
	};
	if (result.type === "Literal") {
		const name = result.value;
		return own$3.call(state.components, name) ? state.components[name] : name;
	}
	if (state.evaluater) return state.evaluater.evaluateExpression(result);
	crashEstree(state);
}
/**
* @param {State} state
* @param {Position | undefined} [place]
* @returns {never}
*/
function crashEstree(state, place) {
	const message = new VFileMessage("Cannot handle MDX estrees without `createEvaluater`", {
		ancestors: state.ancestors,
		place,
		ruleId: "mdx-estree",
		source: "hast-util-to-jsx-runtime"
	});
	message.file = state.filePath || void 0;
	message.url = docs + "#cannot-handle-mdx-estrees-without-createevaluater";
	throw message;
}
/**
* Transform a DOM casing style object to a CSS casing style object.
*
* @param {Style} domCasing
* @returns {Style}
*/
function transformStylesToCssCasing(domCasing) {
	/** @type {Style} */
	const cssCasing = {};
	/** @type {string} */
	let from;
	for (from in domCasing) if (own$3.call(domCasing, from)) cssCasing[transformStyleToCssCasing(from)] = domCasing[from];
	return cssCasing;
}
/**
* Transform a DOM casing style field to a CSS casing style field.
*
* @param {string} from
* @returns {string}
*/
function transformStyleToCssCasing(from) {
	let to = from.replace(cap, toDash);
	if (to.slice(0, 3) === "ms-") to = "-" + to;
	return to;
}
/**
* Make `$0` dash cased.
*
* @param {string} $0
*   Capitalized ASCII leter.
* @returns {string}
*   Dash and lower letter.
*/
function toDash($0) {
	return "-" + $0.toLowerCase();
}
//#endregion
//#region ../../node_modules/html-url-attributes/lib/index.js
/**
* HTML URL properties.
*
* Each key is a property name and each value is a list of tag names it applies
* to or `null` if it applies to all elements.
*
* @type {Record<string, Array<string> | null>}
*/
var urlAttributes = {
	action: ["form"],
	cite: [
		"blockquote",
		"del",
		"ins",
		"q"
	],
	data: ["object"],
	formAction: ["button", "input"],
	href: [
		"a",
		"area",
		"base",
		"link"
	],
	icon: ["menuitem"],
	itemId: null,
	manifest: ["html"],
	ping: ["a", "area"],
	poster: ["video"],
	src: [
		"audio",
		"embed",
		"iframe",
		"img",
		"input",
		"script",
		"source",
		"track",
		"video"
	]
};
//#endregion
//#region ../../node_modules/mdast-util-to-string/lib/index.js
/**
* @typedef {import('mdast').Nodes} Nodes
*
* @typedef Options
*   Configuration (optional).
* @property {boolean | null | undefined} [includeImageAlt=true]
*   Whether to use `alt` for `image`s (default: `true`).
* @property {boolean | null | undefined} [includeHtml=true]
*   Whether to use `value` of HTML (default: `true`).
*/
/** @type {Options} */
var emptyOptions$3 = {};
/**
* Get the text content of a node or list of nodes.
*
* Prefers the node’s plain-text fields, otherwise serializes its children,
* and if the given value is an array, serialize the nodes in it.
*
* @param {unknown} [value]
*   Thing to serialize, typically `Node`.
* @param {Options | null | undefined} [options]
*   Configuration (optional).
* @returns {string}
*   Serialized `value`.
*/
function toString$2(value, options) {
	const settings = options || emptyOptions$3;
	return one(value, typeof settings.includeImageAlt === "boolean" ? settings.includeImageAlt : true, typeof settings.includeHtml === "boolean" ? settings.includeHtml : true);
}
/**
* One node or several nodes.
*
* @param {unknown} value
*   Thing to serialize.
* @param {boolean} includeImageAlt
*   Include image `alt`s.
* @param {boolean} includeHtml
*   Include HTML.
* @returns {string}
*   Serialized node.
*/
function one(value, includeImageAlt, includeHtml) {
	if (node(value)) {
		if ("value" in value) return value.type === "html" && !includeHtml ? "" : value.value;
		if (includeImageAlt && "alt" in value && value.alt) return value.alt;
		if ("children" in value) return all(value.children, includeImageAlt, includeHtml);
	}
	if (Array.isArray(value)) return all(value, includeImageAlt, includeHtml);
	return "";
}
/**
* Serialize a list of nodes.
*
* @param {Array<unknown>} values
*   Thing to serialize.
* @param {boolean} includeImageAlt
*   Include image `alt`s.
* @param {boolean} includeHtml
*   Include HTML.
* @returns {string}
*   Serialized nodes.
*/
function all(values, includeImageAlt, includeHtml) {
	/** @type {Array<string>} */
	const result = [];
	let index = -1;
	while (++index < values.length) result[index] = one(values[index], includeImageAlt, includeHtml);
	return result.join("");
}
/**
* Check if `value` looks like a node.
*
* @param {unknown} value
*   Thing.
* @returns {value is Nodes}
*   Whether `value` is a node.
*/
function node(value) {
	return Boolean(value && typeof value === "object");
}
//#endregion
//#region ../../node_modules/decode-named-character-reference/index.dom.js
var element$1 = document.createElement("i");
/**
* @param {string} value
* @returns {string | false}
*/
function decodeNamedCharacterReference(value) {
	const characterReference = "&" + value + ";";
	element$1.innerHTML = characterReference;
	const character = element$1.textContent;
	if (character.charCodeAt(character.length - 1) === 59 && value !== "semi") return false;
	return character === characterReference ? false : character;
}
//#endregion
//#region ../../node_modules/micromark-util-chunked/index.js
/**
* Like `Array#splice`, but smarter for giant arrays.
*
* `Array#splice` takes all items to be inserted as individual argument which
* causes a stack overflow in V8 when trying to insert 100k items for instance.
*
* Otherwise, this does not return the removed items, and takes `items` as an
* array instead of rest parameters.
*
* @template {unknown} T
*   Item type.
* @param {Array<T>} list
*   List to operate on.
* @param {number} start
*   Index to remove/insert at (can be negative).
* @param {number} remove
*   Number of items to remove.
* @param {Array<T>} items
*   Items to inject into `list`.
* @returns {undefined}
*   Nothing.
*/
function splice(list, start, remove, items) {
	const end = list.length;
	let chunkStart = 0;
	/** @type {Array<unknown>} */
	let parameters;
	if (start < 0) start = -start > end ? 0 : end + start;
	else start = start > end ? end : start;
	remove = remove > 0 ? remove : 0;
	if (items.length < 1e4) {
		parameters = Array.from(items);
		parameters.unshift(start, remove);
		list.splice(...parameters);
	} else {
		if (remove) list.splice(start, remove);
		while (chunkStart < items.length) {
			parameters = items.slice(chunkStart, chunkStart + 1e4);
			parameters.unshift(start, 0);
			list.splice(...parameters);
			chunkStart += 1e4;
			start += 1e4;
		}
	}
}
/**
* Append `items` (an array) at the end of `list` (another array).
* When `list` was empty, returns `items` instead.
*
* This prevents a potentially expensive operation when `list` is empty,
* and adds items in batches to prevent V8 from hanging.
*
* @template {unknown} T
*   Item type.
* @param {Array<T>} list
*   List to operate on.
* @param {Array<T>} items
*   Items to add to `list`.
* @returns {Array<T>}
*   Either `list` or `items`.
*/
function push(list, items) {
	if (list.length > 0) {
		splice(list, list.length, 0, items);
		return list;
	}
	return items;
}
//#endregion
//#region ../../node_modules/micromark-util-combine-extensions/index.js
/**
* @import {
*   Extension,
*   Handles,
*   HtmlExtension,
*   NormalizedExtension
* } from 'micromark-util-types'
*/
var hasOwnProperty = {}.hasOwnProperty;
/**
* Combine multiple syntax extensions into one.
*
* @param {ReadonlyArray<Extension>} extensions
*   List of syntax extensions.
* @returns {NormalizedExtension}
*   A single combined extension.
*/
function combineExtensions(extensions) {
	/** @type {NormalizedExtension} */
	const all = {};
	let index = -1;
	while (++index < extensions.length) syntaxExtension(all, extensions[index]);
	return all;
}
/**
* Merge `extension` into `all`.
*
* @param {NormalizedExtension} all
*   Extension to merge into.
* @param {Extension} extension
*   Extension to merge.
* @returns {undefined}
*   Nothing.
*/
function syntaxExtension(all, extension) {
	/** @type {keyof Extension} */
	let hook;
	for (hook in extension) {
		/** @type {Record<string, unknown>} */
		const left = (hasOwnProperty.call(all, hook) ? all[hook] : void 0) || (all[hook] = {});
		/** @type {Record<string, unknown> | undefined} */
		const right = extension[hook];
		/** @type {string} */
		let code;
		if (right) for (code in right) {
			if (!hasOwnProperty.call(left, code)) left[code] = [];
			const value = right[code];
			constructs(left[code], Array.isArray(value) ? value : value ? [value] : []);
		}
	}
}
/**
* Merge `list` into `existing` (both lists of constructs).
* Mutates `existing`.
*
* @param {Array<unknown>} existing
*   List of constructs to merge into.
* @param {Array<unknown>} list
*   List of constructs to merge.
* @returns {undefined}
*   Nothing.
*/
function constructs(existing, list) {
	let index = -1;
	/** @type {Array<unknown>} */
	const before = [];
	while (++index < list.length) (list[index].add === "after" ? existing : before).push(list[index]);
	splice(existing, 0, 0, before);
}
//#endregion
//#region ../../node_modules/micromark-util-decode-numeric-character-reference/index.js
/**
* Turn the number (in string form as either hexa- or plain decimal) coming from
* a numeric character reference into a character.
*
* Sort of like `String.fromCodePoint(Number.parseInt(value, base))`, but makes
* non-characters and control characters safe.
*
* @param {string} value
*   Value to decode.
* @param {number} base
*   Numeric base.
* @returns {string}
*   Character.
*/
function decodeNumericCharacterReference(value, base) {
	const code = Number.parseInt(value, base);
	if (code < 9 || code === 11 || code > 13 && code < 32 || code > 126 && code < 160 || code > 55295 && code < 57344 || code > 64975 && code < 65008 || (code & 65535) === 65535 || (code & 65535) === 65534 || code > 1114111) return "�";
	return String.fromCodePoint(code);
}
//#endregion
//#region ../../node_modules/micromark-util-normalize-identifier/index.js
/**
* Normalize an identifier (as found in references, definitions).
*
* Collapses markdown whitespace, trim, and then lower- and uppercase.
*
* Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their
* lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different
* uppercase character (U+0398 (`Θ`)).
* So, to get a canonical form, we perform both lower- and uppercase.
*
* Using uppercase last makes sure keys will never interact with default
* prototypal values (such as `constructor`): nothing in the prototype of
* `Object` is uppercase.
*
* @param {string} value
*   Identifier to normalize.
* @returns {string}
*   Normalized identifier.
*/
function normalizeIdentifier(value) {
	return value.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
}
//#endregion
//#region ../../node_modules/micromark-util-character/index.js
/**
* @import {Code} from 'micromark-util-types'
*/
/**
* Check whether the character code represents an ASCII alpha (`a` through `z`,
* case insensitive).
*
* An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha.
*
* An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`)
* to U+005A (`Z`).
*
* An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`)
* to U+007A (`z`).
*
* @param code
*   Code.
* @returns {boolean}
*   Whether it matches.
*/
var asciiAlpha = regexCheck(/[A-Za-z]/);
/**
* Check whether the character code represents an ASCII alphanumeric (`a`
* through `z`, case insensitive, or `0` through `9`).
*
* An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha
* (see `asciiAlpha`).
*
* @param code
*   Code.
* @returns {boolean}
*   Whether it matches.
*/
var asciiAlphanumeric = regexCheck(/[\dA-Za-z]/);
/**
* Check whether the character code represents an ASCII atext.
*
* atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in
* the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`),
* U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F
* SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E
* CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE
* (`{`) to U+007E TILDE (`~`).
*
* See:
* **\[RFC5322]**:
* [Internet Message Format](https://tools.ietf.org/html/rfc5322).
* P. Resnick.
* IETF.
*
* @param code
*   Code.
* @returns {boolean}
*   Whether it matches.
*/
var asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/);
/**
* Check whether a character code is an ASCII control character.
*
* An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL)
* to U+001F (US), or U+007F (DEL).
*
* @param {Code} code
*   Code.
* @returns {boolean}
*   Whether it matches.
*/
function asciiControl(code) {
	return code !== null && (code < 32 || code === 127);
}
/**
* Check whether the character code represents an ASCII digit (`0` through `9`).
*
* An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to
* U+0039 (`9`).
*
* @param code
*   Code.
* @returns {boolean}
*   Whether it matches.
*/
var asciiDigit = regexCheck(/\d/);
/**
* Check whether the character code represents an ASCII hex digit (`a` through
* `f`, case insensitive, or `0` through `9`).
*
* An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex
* digit, or an ASCII lower hex digit.
*
* An **ASCII upper hex digit** is a character in the inclusive range U+0041
* (`A`) to U+0046 (`F`).
*
* An **ASCII lower hex digit** is a character in the inclusive range U+0061
* (`a`) to U+0066 (`f`).
*
* @param code
*   Code.
* @returns {boolean}
*   Whether it matches.
*/
var asciiHexDigit = regexCheck(/[\dA-Fa-f]/);
/**
* Check whether the character code represents ASCII punctuation.
*
* An **ASCII punctuation** is a character in the inclusive ranges U+0021
* EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT
* SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT
* (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`).
*
* @param code
*   Code.
* @returns {boolean}
*   Whether it matches.
*/
var asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/);
/**
* Check whether a character code is a markdown line ending.
*
* A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN
* LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR).
*
* In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE
* RETURN (CR) are replaced by these virtual characters depending on whether
* they occurred together.
*
* @param {Code} code
*   Code.
* @returns {boolean}
*   Whether it matches.
*/
function markdownLineEnding(code) {
	return code !== null && code < -2;
}
/**
* Check whether a character code is a markdown line ending (see
* `markdownLineEnding`) or markdown space (see `markdownSpace`).
*
* @param {Code} code
*   Code.
* @returns {boolean}
*   Whether it matches.
*/
function markdownLineEndingOrSpace(code) {
	return code !== null && (code < 0 || code === 32);
}
/**
* Check whether a character code is a markdown space.
*
* A **markdown space** is the concrete character U+0020 SPACE (SP) and the
* virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT).
*
* In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is
* replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL
* SPACE (VS) characters, depending on the column at which the tab occurred.
*
* @param {Code} code
*   Code.
* @returns {boolean}
*   Whether it matches.
*/
function markdownSpace(code) {
	return code === -2 || code === -1 || code === 32;
}
/**
* Check whether the character code represents Unicode punctuation.
*
* A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation,
* Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf`
* (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po`
* (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII
* punctuation (see `asciiPunctuation`).
*
* See:
* **\[UNICODE]**:
* [The Unicode Standard](https://www.unicode.org/versions/).
* Unicode Consortium.
*
* @param code
*   Code.
* @returns
*   Whether it matches.
*/
var unicodePunctuation = regexCheck(/\p{P}|\p{S}/u);
/**
* Check whether the character code represents Unicode whitespace.
*
* Note that this does handle micromark specific markdown whitespace characters.
* See `markdownLineEndingOrSpace` to check that.
*
* A **Unicode whitespace** is a character in the Unicode `Zs` (Separator,
* Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF),
* U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\[UNICODE]**).
*
* See:
* **\[UNICODE]**:
* [The Unicode Standard](https://www.unicode.org/versions/).
* Unicode Consortium.
*
* @param code
*   Code.
* @returns
*   Whether it matches.
*/
var unicodeWhitespace = regexCheck(/\s/);
/**
* Create a code check from a regex.
*
* @param {RegExp} regex
*   Expression.
* @returns {(code: Code) => boolean}
*   Check.
*/
function regexCheck(regex) {
	return check;
	/**
	* Check whether a code matches the bound regex.
	*
	* @param {Code} code
	*   Character code.
	* @returns {boolean}
	*   Whether the character code matches the bound regex.
	*/
	function check(code) {
		return code !== null && code > -1 && regex.test(String.fromCharCode(code));
	}
}
//#endregion
//#region ../../node_modules/micromark-util-sanitize-uri/index.js
/**
* Normalize a URL.
*
* Encode unsafe characters with percent-encoding, skipping already encoded
* sequences.
*
* @param {string} value
*   URI to normalize.
* @returns {string}
*   Normalized URI.
*/
function normalizeUri(value) {
	/** @type {Array<string>} */
	const result = [];
	let index = -1;
	let start = 0;
	let skip = 0;
	while (++index < value.length) {
		const code = value.charCodeAt(index);
		/** @type {string} */
		let replace = "";
		if (code === 37 && asciiAlphanumeric(value.charCodeAt(index + 1)) && asciiAlphanumeric(value.charCodeAt(index + 2))) skip = 2;
		else if (code < 128) {
			if (!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(code))) replace = String.fromCharCode(code);
		} else if (code > 55295 && code < 57344) {
			const next = value.charCodeAt(index + 1);
			if (code < 56320 && next > 56319 && next < 57344) {
				replace = String.fromCharCode(code, next);
				skip = 1;
			} else replace = "�";
		} else replace = String.fromCharCode(code);
		if (replace) {
			result.push(value.slice(start, index), encodeURIComponent(replace));
			start = index + skip + 1;
			replace = "";
		}
		if (skip) {
			index += skip;
			skip = 0;
		}
	}
	return result.join("") + value.slice(start);
}
//#endregion
//#region ../../node_modules/micromark-factory-space/index.js
/**
* @import {Effects, State, TokenType} from 'micromark-util-types'
*/
/**
* Parse spaces and tabs.
*
* There is no `nok` parameter:
*
* *   spaces in markdown are often optional, in which case this factory can be
*     used and `ok` will be switched to whether spaces were found or not
* *   one line ending or space can be detected with `markdownSpace(code)` right
*     before using `factorySpace`
*
* ###### Examples
*
* Where `␉` represents a tab (plus how much it expands) and `␠` represents a
* single space.
*
* ```markdown
* ␉
* ␠␠␠␠
* ␉␠
* ```
*
* @param {Effects} effects
*   Context.
* @param {State} ok
*   State switched to when successful.
* @param {TokenType} type
*   Type (`' \t'`).
* @param {number | undefined} [max=Infinity]
*   Max (exclusive).
* @returns {State}
*   Start state.
*/
function factorySpace(effects, ok, type, max) {
	const limit = max ? max - 1 : Number.POSITIVE_INFINITY;
	let size = 0;
	return start;
	/** @type {State} */
	function start(code) {
		if (markdownSpace(code)) {
			effects.enter(type);
			return prefix(code);
		}
		return ok(code);
	}
	/** @type {State} */
	function prefix(code) {
		if (markdownSpace(code) && size++ < limit) {
			effects.consume(code);
			return prefix;
		}
		effects.exit(type);
		return ok(code);
	}
}
//#endregion
//#region ../../node_modules/micromark/lib/initialize/content.js
/**
* @import {
*   InitialConstruct,
*   Initializer,
*   State,
*   TokenizeContext,
*   Token
* } from 'micromark-util-types'
*/
/** @type {InitialConstruct} */
var content$1 = { tokenize: initializeContent };
/**
* @this {TokenizeContext}
*   Context.
* @type {Initializer}
*   Content.
*/
function initializeContent(effects) {
	const contentStart = effects.attempt(this.parser.constructs.contentInitial, afterContentStartConstruct, paragraphInitial);
	/** @type {Token} */
	let previous;
	return contentStart;
	/** @type {State} */
	function afterContentStartConstruct(code) {
		if (code === null) {
			effects.consume(code);
			return;
		}
		effects.enter("lineEnding");
		effects.consume(code);
		effects.exit("lineEnding");
		return factorySpace(effects, contentStart, "linePrefix");
	}
	/** @type {State} */
	function paragraphInitial(code) {
		effects.enter("paragraph");
		return lineStart(code);
	}
	/** @type {State} */
	function lineStart(code) {
		const token = effects.enter("chunkText", {
			contentType: "text",
			previous
		});
		if (previous) previous.next = token;
		previous = token;
		return data(code);
	}
	/** @type {State} */
	function data(code) {
		if (code === null) {
			effects.exit("chunkText");
			effects.exit("paragraph");
			effects.consume(code);
			return;
		}
		if (markdownLineEnding(code)) {
			effects.consume(code);
			effects.exit("chunkText");
			return lineStart;
		}
		effects.consume(code);
		return data;
	}
}
//#endregion
//#region ../../node_modules/micromark/lib/initialize/document.js
/**
* @import {
*   Construct,
*   ContainerState,
*   InitialConstruct,
*   Initializer,
*   Point,
*   State,
*   TokenizeContext,
*   Tokenizer,
*   Token
* } from 'micromark-util-types'
*/
/**
* @typedef {[Construct, ContainerState]} StackItem
*   Construct and its state.
*/
/** @type {InitialConstruct} */
var document$2 = { tokenize: initializeDocument };
/** @type {Construct} */
var containerConstruct = { tokenize: tokenizeContainer };
/**
* @this {TokenizeContext}
*   Self.
* @type {Initializer}
*   Initializer.
*/
function initializeDocument(effects) {
	const self = this;
	/** @type {Array<StackItem>} */
	const stack = [];
	let continued = 0;
	/** @type {TokenizeContext | undefined} */
	let childFlow;
	/** @type {Token | undefined} */
	let childToken;
	/** @type {number} */
	let lineStartOffset;
	return start;
	/** @type {State} */
	function start(code) {
		if (continued < stack.length) {
			const item = stack[continued];
			self.containerState = item[1];
			return effects.attempt(item[0].continuation, documentContinue, checkNewContainers)(code);
		}
		return checkNewContainers(code);
	}
	/** @type {State} */
	function documentContinue(code) {
		continued++;
		if (self.containerState._closeFlow) {
			self.containerState._closeFlow = void 0;
			if (childFlow) closeFlow();
			const indexBeforeExits = self.events.length;
			let indexBeforeFlow = indexBeforeExits;
			/** @type {Point | undefined} */
			let point;
			while (indexBeforeFlow--) if (self.events[indexBeforeFlow][0] === "exit" && self.events[indexBeforeFlow][1].type === "chunkFlow") {
				point = self.events[indexBeforeFlow][1].end;
				break;
			}
			exitContainers(continued);
			let index = indexBeforeExits;
			while (index < self.events.length) {
				self.events[index][1].end = { ...point };
				index++;
			}
			splice(self.events, indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits));
			self.events.length = index;
			return checkNewContainers(code);
		}
		return start(code);
	}
	/** @type {State} */
	function checkNewContainers(code) {
		if (continued === stack.length) {
			if (!childFlow) return documentContinued(code);
			if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) return flowStart(code);
			self.interrupt = Boolean(childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack);
		}
		self.containerState = {};
		return effects.check(containerConstruct, thereIsANewContainer, thereIsNoNewContainer)(code);
	}
	/** @type {State} */
	function thereIsANewContainer(code) {
		if (childFlow) closeFlow();
		exitContainers(continued);
		return documentContinued(code);
	}
	/** @type {State} */
	function thereIsNoNewContainer(code) {
		self.parser.lazy[self.now().line] = continued !== stack.length;
		lineStartOffset = self.now().offset;
		return flowStart(code);
	}
	/** @type {State} */
	function documentContinued(code) {
		self.containerState = {};
		return effects.attempt(containerConstruct, containerContinue, flowStart)(code);
	}
	/** @type {State} */
	function containerContinue(code) {
		continued++;
		stack.push([self.currentConstruct, self.containerState]);
		return documentContinued(code);
	}
	/** @type {State} */
	function flowStart(code) {
		if (code === null) {
			if (childFlow) closeFlow();
			exitContainers(0);
			effects.consume(code);
			return;
		}
		childFlow = childFlow || self.parser.flow(self.now());
		effects.enter("chunkFlow", {
			_tokenizer: childFlow,
			contentType: "flow",
			previous: childToken
		});
		return flowContinue(code);
	}
	/** @type {State} */
	function flowContinue(code) {
		if (code === null) {
			writeToChild(effects.exit("chunkFlow"), true);
			exitContainers(0);
			effects.consume(code);
			return;
		}
		if (markdownLineEnding(code)) {
			effects.consume(code);
			writeToChild(effects.exit("chunkFlow"));
			continued = 0;
			self.interrupt = void 0;
			return start;
		}
		effects.consume(code);
		return flowContinue;
	}
	/**
	* @param {Token} token
	*   Token.
	* @param {boolean | undefined} [endOfFile]
	*   Whether the token is at the end of the file (default: `false`).
	* @returns {undefined}
	*   Nothing.
	*/
	function writeToChild(token, endOfFile) {
		const stream = self.sliceStream(token);
		if (endOfFile) stream.push(null);
		token.previous = childToken;
		if (childToken) childToken.next = token;
		childToken = token;
		childFlow.defineSkip(token.start);
		childFlow.write(stream);
		if (self.parser.lazy[token.start.line]) {
			let index = childFlow.events.length;
			while (index--) if (childFlow.events[index][1].start.offset < lineStartOffset && (!childFlow.events[index][1].end || childFlow.events[index][1].end.offset > lineStartOffset)) return;
			const indexBeforeExits = self.events.length;
			let indexBeforeFlow = indexBeforeExits;
			/** @type {boolean | undefined} */
			let seen;
			/** @type {Point | undefined} */
			let point;
			while (indexBeforeFlow--) if (self.events[indexBeforeFlow][0] === "exit" && self.events[indexBeforeFlow][1].type === "chunkFlow") {
				if (seen) {
					point = self.events[indexBeforeFlow][1].end;
					break;
				}
				seen = true;
			}
			exitContainers(continued);
			index = indexBeforeExits;
			while (index < self.events.length) {
				self.events[index][1].end = { ...point };
				index++;
			}
			splice(self.events, indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits));
			self.events.length = index;
		}
	}
	/**
	* @param {number} size
	*   Size.
	* @returns {undefined}
	*   Nothing.
	*/
	function exitContainers(size) {
		let index = stack.length;
		while (index-- > size) {
			const entry = stack[index];
			self.containerState = entry[1];
			entry[0].exit.call(self, effects);
		}
		stack.length = size;
	}
	function closeFlow() {
		childFlow.write([null]);
		childToken = void 0;
		childFlow = void 0;
		self.containerState._closeFlow = void 0;
	}
}
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*   Tokenizer.
*/
function tokenizeContainer(effects, ok, nok) {
	return factorySpace(effects, effects.attempt(this.parser.constructs.document, ok, nok), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
}
//#endregion
//#region ../../node_modules/micromark-util-classify-character/index.js
/**
* @import {Code} from 'micromark-util-types'
*/
/**
* Classify whether a code represents whitespace, punctuation, or something
* else.
*
* Used for attention (emphasis, strong), whose sequences can open or close
* based on the class of surrounding characters.
*
* > 👉 **Note**: eof (`null`) is seen as whitespace.
*
* @param {Code} code
*   Code.
* @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined}
*   Group.
*/
function classifyCharacter(code) {
	if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) return 1;
	if (unicodePunctuation(code)) return 2;
}
//#endregion
//#region ../../node_modules/micromark-util-resolve-all/index.js
/**
* @import {Event, Resolver, TokenizeContext} from 'micromark-util-types'
*/
/**
* Call all `resolveAll`s.
*
* @param {ReadonlyArray<{resolveAll?: Resolver | undefined}>} constructs
*   List of constructs, optionally with `resolveAll`s.
* @param {Array<Event>} events
*   List of events.
* @param {TokenizeContext} context
*   Context used by `tokenize`.
* @returns {Array<Event>}
*   Changed events.
*/
function resolveAll(constructs, events, context) {
	/** @type {Array<Resolver>} */
	const called = [];
	let index = -1;
	while (++index < constructs.length) {
		const resolve = constructs[index].resolveAll;
		if (resolve && !called.includes(resolve)) {
			events = resolve(events, context);
			called.push(resolve);
		}
	}
	return events;
}
//#endregion
//#region ../../node_modules/micromark-core-commonmark/lib/attention.js
/**
* @import {
*   Code,
*   Construct,
*   Event,
*   Point,
*   Resolver,
*   State,
*   TokenizeContext,
*   Tokenizer,
*   Token
* } from 'micromark-util-types'
*/
/** @type {Construct} */
var attention = {
	name: "attention",
	resolveAll: resolveAllAttention,
	tokenize: tokenizeAttention
};
/**
* Take all events and resolve attention to emphasis or strong.
*
* @type {Resolver}
*/
function resolveAllAttention(events, context) {
	let index = -1;
	/** @type {number} */
	let open;
	/** @type {Token} */
	let group;
	/** @type {Token} */
	let text;
	/** @type {Token} */
	let openingSequence;
	/** @type {Token} */
	let closingSequence;
	/** @type {number} */
	let use;
	/** @type {Array<Event>} */
	let nextEvents;
	/** @type {number} */
	let offset;
	while (++index < events.length) if (events[index][0] === "enter" && events[index][1].type === "attentionSequence" && events[index][1]._close) {
		open = index;
		while (open--) if (events[open][0] === "exit" && events[open][1].type === "attentionSequence" && events[open][1]._open && context.sliceSerialize(events[open][1]).charCodeAt(0) === context.sliceSerialize(events[index][1]).charCodeAt(0)) {
			if ((events[open][1]._close || events[index][1]._open) && (events[index][1].end.offset - events[index][1].start.offset) % 3 && !((events[open][1].end.offset - events[open][1].start.offset + events[index][1].end.offset - events[index][1].start.offset) % 3)) continue;
			use = events[open][1].end.offset - events[open][1].start.offset > 1 && events[index][1].end.offset - events[index][1].start.offset > 1 ? 2 : 1;
			const start = { ...events[open][1].end };
			const end = { ...events[index][1].start };
			movePoint(start, -use);
			movePoint(end, use);
			openingSequence = {
				type: use > 1 ? "strongSequence" : "emphasisSequence",
				start,
				end: { ...events[open][1].end }
			};
			closingSequence = {
				type: use > 1 ? "strongSequence" : "emphasisSequence",
				start: { ...events[index][1].start },
				end
			};
			text = {
				type: use > 1 ? "strongText" : "emphasisText",
				start: { ...events[open][1].end },
				end: { ...events[index][1].start }
			};
			group = {
				type: use > 1 ? "strong" : "emphasis",
				start: { ...openingSequence.start },
				end: { ...closingSequence.end }
			};
			events[open][1].end = { ...openingSequence.start };
			events[index][1].start = { ...closingSequence.end };
			nextEvents = [];
			if (events[open][1].end.offset - events[open][1].start.offset) nextEvents = push(nextEvents, [[
				"enter",
				events[open][1],
				context
			], [
				"exit",
				events[open][1],
				context
			]]);
			nextEvents = push(nextEvents, [
				[
					"enter",
					group,
					context
				],
				[
					"enter",
					openingSequence,
					context
				],
				[
					"exit",
					openingSequence,
					context
				],
				[
					"enter",
					text,
					context
				]
			]);
			nextEvents = push(nextEvents, resolveAll(context.parser.constructs.insideSpan.null, events.slice(open + 1, index), context));
			nextEvents = push(nextEvents, [
				[
					"exit",
					text,
					context
				],
				[
					"enter",
					closingSequence,
					context
				],
				[
					"exit",
					closingSequence,
					context
				],
				[
					"exit",
					group,
					context
				]
			]);
			if (events[index][1].end.offset - events[index][1].start.offset) {
				offset = 2;
				nextEvents = push(nextEvents, [[
					"enter",
					events[index][1],
					context
				], [
					"exit",
					events[index][1],
					context
				]]);
			} else offset = 0;
			splice(events, open - 1, index - open + 3, nextEvents);
			index = open + nextEvents.length - offset - 2;
			break;
		}
	}
	index = -1;
	while (++index < events.length) if (events[index][1].type === "attentionSequence") events[index][1].type = "data";
	return events;
}
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeAttention(effects, ok) {
	const attentionMarkers = this.parser.constructs.attentionMarkers.null;
	const previous = this.previous;
	const before = classifyCharacter(previous);
	/** @type {NonNullable<Code>} */
	let marker;
	return start;
	/**
	* Before a sequence.
	*
	* ```markdown
	* > | **
	*     ^
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		marker = code;
		effects.enter("attentionSequence");
		return inside(code);
	}
	/**
	* In a sequence.
	*
	* ```markdown
	* > | **
	*     ^^
	* ```
	*
	* @type {State}
	*/
	function inside(code) {
		if (code === marker) {
			effects.consume(code);
			return inside;
		}
		const token = effects.exit("attentionSequence");
		const after = classifyCharacter(code);
		const open = !after || after === 2 && before || attentionMarkers.includes(code);
		const close = !before || before === 2 && after || attentionMarkers.includes(previous);
		token._open = Boolean(marker === 42 ? open : open && (before || !close));
		token._close = Boolean(marker === 42 ? close : close && (after || !open));
		return ok(code);
	}
}
/**
* Move a point a bit.
*
* Note: `move` only works inside lines! It’s not possible to move past other
* chunks (replacement characters, tabs, or line endings).
*
* @param {Point} point
*   Point.
* @param {number} offset
*   Amount to move.
* @returns {undefined}
*   Nothing.
*/
function movePoint(point, offset) {
	point.column += offset;
	point.offset += offset;
	point._bufferIndex += offset;
}
//#endregion
//#region ../../node_modules/micromark-core-commonmark/lib/autolink.js
/**
* @import {
*   Construct,
*   State,
*   TokenizeContext,
*   Tokenizer
* } from 'micromark-util-types'
*/
/** @type {Construct} */
var autolink = {
	name: "autolink",
	tokenize: tokenizeAutolink
};
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeAutolink(effects, ok, nok) {
	let size = 0;
	return start;
	/**
	* Start of an autolink.
	*
	* ```markdown
	* > | a<https://example.com>b
	*      ^
	* > | a<user@example.com>b
	*      ^
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		effects.enter("autolink");
		effects.enter("autolinkMarker");
		effects.consume(code);
		effects.exit("autolinkMarker");
		effects.enter("autolinkProtocol");
		return open;
	}
	/**
	* After `<`, at protocol or atext.
	*
	* ```markdown
	* > | a<https://example.com>b
	*       ^
	* > | a<user@example.com>b
	*       ^
	* ```
	*
	* @type {State}
	*/
	function open(code) {
		if (asciiAlpha(code)) {
			effects.consume(code);
			return schemeOrEmailAtext;
		}
		if (code === 64) return nok(code);
		return emailAtext(code);
	}
	/**
	* At second byte of protocol or atext.
	*
	* ```markdown
	* > | a<https://example.com>b
	*        ^
	* > | a<user@example.com>b
	*        ^
	* ```
	*
	* @type {State}
	*/
	function schemeOrEmailAtext(code) {
		if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) {
			size = 1;
			return schemeInsideOrEmailAtext(code);
		}
		return emailAtext(code);
	}
	/**
	* In ambiguous protocol or atext.
	*
	* ```markdown
	* > | a<https://example.com>b
	*        ^
	* > | a<user@example.com>b
	*        ^
	* ```
	*
	* @type {State}
	*/
	function schemeInsideOrEmailAtext(code) {
		if (code === 58) {
			effects.consume(code);
			size = 0;
			return urlInside;
		}
		if ((code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && size++ < 32) {
			effects.consume(code);
			return schemeInsideOrEmailAtext;
		}
		size = 0;
		return emailAtext(code);
	}
	/**
	* After protocol, in URL.
	*
	* ```markdown
	* > | a<https://example.com>b
	*             ^
	* ```
	*
	* @type {State}
	*/
	function urlInside(code) {
		if (code === 62) {
			effects.exit("autolinkProtocol");
			effects.enter("autolinkMarker");
			effects.consume(code);
			effects.exit("autolinkMarker");
			effects.exit("autolink");
			return ok;
		}
		if (code === null || code === 32 || code === 60 || asciiControl(code)) return nok(code);
		effects.consume(code);
		return urlInside;
	}
	/**
	* In email atext.
	*
	* ```markdown
	* > | a<user.name@example.com>b
	*              ^
	* ```
	*
	* @type {State}
	*/
	function emailAtext(code) {
		if (code === 64) {
			effects.consume(code);
			return emailAtSignOrDot;
		}
		if (asciiAtext(code)) {
			effects.consume(code);
			return emailAtext;
		}
		return nok(code);
	}
	/**
	* In label, after at-sign or dot.
	*
	* ```markdown
	* > | a<user.name@example.com>b
	*                 ^       ^
	* ```
	*
	* @type {State}
	*/
	function emailAtSignOrDot(code) {
		return asciiAlphanumeric(code) ? emailLabel(code) : nok(code);
	}
	/**
	* In label, where `.` and `>` are allowed.
	*
	* ```markdown
	* > | a<user.name@example.com>b
	*                   ^
	* ```
	*
	* @type {State}
	*/
	function emailLabel(code) {
		if (code === 46) {
			effects.consume(code);
			size = 0;
			return emailAtSignOrDot;
		}
		if (code === 62) {
			effects.exit("autolinkProtocol").type = "autolinkEmail";
			effects.enter("autolinkMarker");
			effects.consume(code);
			effects.exit("autolinkMarker");
			effects.exit("autolink");
			return ok;
		}
		return emailValue(code);
	}
	/**
	* In label, where `.` and `>` are *not* allowed.
	*
	* Though, this is also used in `emailLabel` to parse other values.
	*
	* ```markdown
	* > | a<user.name@ex-ample.com>b
	*                    ^
	* ```
	*
	* @type {State}
	*/
	function emailValue(code) {
		if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) {
			const next = code === 45 ? emailValue : emailLabel;
			effects.consume(code);
			return next;
		}
		return nok(code);
	}
}
//#endregion
//#region ../../node_modules/micromark-core-commonmark/lib/blank-line.js
/**
* @import {
*   Construct,
*   State,
*   TokenizeContext,
*   Tokenizer
* } from 'micromark-util-types'
*/
/** @type {Construct} */
var blankLine = {
	partial: true,
	tokenize: tokenizeBlankLine
};
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeBlankLine(effects, ok, nok) {
	return start;
	/**
	* Start of blank line.
	*
	* > 👉 **Note**: `␠` represents a space character.
	*
	* ```markdown
	* > | ␠␠␊
	*     ^
	* > | ␊
	*     ^
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		return markdownSpace(code) ? factorySpace(effects, after, "linePrefix")(code) : after(code);
	}
	/**
	* At eof/eol, after optional whitespace.
	*
	* > 👉 **Note**: `␠` represents a space character.
	*
	* ```markdown
	* > | ␠␠␊
	*       ^
	* > | ␊
	*     ^
	* ```
	*
	* @type {State}
	*/
	function after(code) {
		return code === null || markdownLineEnding(code) ? ok(code) : nok(code);
	}
}
//#endregion
//#region ../../node_modules/micromark-core-commonmark/lib/block-quote.js
/**
* @import {
*   Construct,
*   Exiter,
*   State,
*   TokenizeContext,
*   Tokenizer
* } from 'micromark-util-types'
*/
/** @type {Construct} */
var blockQuote = {
	continuation: { tokenize: tokenizeBlockQuoteContinuation },
	exit: exit$1,
	name: "blockQuote",
	tokenize: tokenizeBlockQuoteStart
};
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeBlockQuoteStart(effects, ok, nok) {
	const self = this;
	return start;
	/**
	* Start of block quote.
	*
	* ```markdown
	* > | > a
	*     ^
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		if (code === 62) {
			const state = self.containerState;
			if (!state.open) {
				effects.enter("blockQuote", { _container: true });
				state.open = true;
			}
			effects.enter("blockQuotePrefix");
			effects.enter("blockQuoteMarker");
			effects.consume(code);
			effects.exit("blockQuoteMarker");
			return after;
		}
		return nok(code);
	}
	/**
	* After `>`, before optional whitespace.
	*
	* ```markdown
	* > | > a
	*      ^
	* ```
	*
	* @type {State}
	*/
	function after(code) {
		if (markdownSpace(code)) {
			effects.enter("blockQuotePrefixWhitespace");
			effects.consume(code);
			effects.exit("blockQuotePrefixWhitespace");
			effects.exit("blockQuotePrefix");
			return ok;
		}
		effects.exit("blockQuotePrefix");
		return ok(code);
	}
}
/**
* Start of block quote continuation.
*
* ```markdown
*   | > a
* > | > b
*     ^
* ```
*
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeBlockQuoteContinuation(effects, ok, nok) {
	const self = this;
	return contStart;
	/**
	* Start of block quote continuation.
	*
	* Also used to parse the first block quote opening.
	*
	* ```markdown
	*   | > a
	* > | > b
	*     ^
	* ```
	*
	* @type {State}
	*/
	function contStart(code) {
		if (markdownSpace(code)) return factorySpace(effects, contBefore, "linePrefix", self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(code);
		return contBefore(code);
	}
	/**
	* At `>`, after optional whitespace.
	*
	* Also used to parse the first block quote opening.
	*
	* ```markdown
	*   | > a
	* > | > b
	*     ^
	* ```
	*
	* @type {State}
	*/
	function contBefore(code) {
		return effects.attempt(blockQuote, ok, nok)(code);
	}
}
/** @type {Exiter} */
function exit$1(effects) {
	effects.exit("blockQuote");
}
//#endregion
//#region ../../node_modules/micromark-core-commonmark/lib/character-escape.js
/**
* @import {
*   Construct,
*   State,
*   TokenizeContext,
*   Tokenizer
* } from 'micromark-util-types'
*/
/** @type {Construct} */
var characterEscape = {
	name: "characterEscape",
	tokenize: tokenizeCharacterEscape
};
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeCharacterEscape(effects, ok, nok) {
	return start;
	/**
	* Start of character escape.
	*
	* ```markdown
	* > | a\*b
	*      ^
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		effects.enter("characterEscape");
		effects.enter("escapeMarker");
		effects.consume(code);
		effects.exit("escapeMarker");
		return inside;
	}
	/**
	* After `\`, at punctuation.
	*
	* ```markdown
	* > | a\*b
	*       ^
	* ```
	*
	* @type {State}
	*/
	function inside(code) {
		if (asciiPunctuation(code)) {
			effects.enter("characterEscapeValue");
			effects.consume(code);
			effects.exit("characterEscapeValue");
			effects.exit("characterEscape");
			return ok;
		}
		return nok(code);
	}
}
//#endregion
//#region ../../node_modules/micromark-core-commonmark/lib/character-reference.js
/**
* @import {
*   Code,
*   Construct,
*   State,
*   TokenizeContext,
*   Tokenizer
* } from 'micromark-util-types'
*/
/** @type {Construct} */
var characterReference = {
	name: "characterReference",
	tokenize: tokenizeCharacterReference
};
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeCharacterReference(effects, ok, nok) {
	const self = this;
	let size = 0;
	/** @type {number} */
	let max;
	/** @type {(code: Code) => boolean} */
	let test;
	return start;
	/**
	* Start of character reference.
	*
	* ```markdown
	* > | a&amp;b
	*      ^
	* > | a&#123;b
	*      ^
	* > | a&#x9;b
	*      ^
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		effects.enter("characterReference");
		effects.enter("characterReferenceMarker");
		effects.consume(code);
		effects.exit("characterReferenceMarker");
		return open;
	}
	/**
	* After `&`, at `#` for numeric references or alphanumeric for named
	* references.
	*
	* ```markdown
	* > | a&amp;b
	*       ^
	* > | a&#123;b
	*       ^
	* > | a&#x9;b
	*       ^
	* ```
	*
	* @type {State}
	*/
	function open(code) {
		if (code === 35) {
			effects.enter("characterReferenceMarkerNumeric");
			effects.consume(code);
			effects.exit("characterReferenceMarkerNumeric");
			return numeric;
		}
		effects.enter("characterReferenceValue");
		max = 31;
		test = asciiAlphanumeric;
		return value(code);
	}
	/**
	* After `#`, at `x` for hexadecimals or digit for decimals.
	*
	* ```markdown
	* > | a&#123;b
	*        ^
	* > | a&#x9;b
	*        ^
	* ```
	*
	* @type {State}
	*/
	function numeric(code) {
		if (code === 88 || code === 120) {
			effects.enter("characterReferenceMarkerHexadecimal");
			effects.consume(code);
			effects.exit("characterReferenceMarkerHexadecimal");
			effects.enter("characterReferenceValue");
			max = 6;
			test = asciiHexDigit;
			return value;
		}
		effects.enter("characterReferenceValue");
		max = 7;
		test = asciiDigit;
		return value(code);
	}
	/**
	* After markers (`&#x`, `&#`, or `&`), in value, before `;`.
	*
	* The character reference kind defines what and how many characters are
	* allowed.
	*
	* ```markdown
	* > | a&amp;b
	*       ^^^
	* > | a&#123;b
	*        ^^^
	* > | a&#x9;b
	*         ^
	* ```
	*
	* @type {State}
	*/
	function value(code) {
		if (code === 59 && size) {
			const token = effects.exit("characterReferenceValue");
			if (test === asciiAlphanumeric && !decodeNamedCharacterReference(self.sliceSerialize(token))) return nok(code);
			effects.enter("characterReferenceMarker");
			effects.consume(code);
			effects.exit("characterReferenceMarker");
			effects.exit("characterReference");
			return ok;
		}
		if (test(code) && size++ < max) {
			effects.consume(code);
			return value;
		}
		return nok(code);
	}
}
//#endregion
//#region ../../node_modules/micromark-core-commonmark/lib/code-fenced.js
/**
* @import {
*   Code,
*   Construct,
*   State,
*   TokenizeContext,
*   Tokenizer
* } from 'micromark-util-types'
*/
/** @type {Construct} */
var nonLazyContinuation = {
	partial: true,
	tokenize: tokenizeNonLazyContinuation
};
/** @type {Construct} */
var codeFenced = {
	concrete: true,
	name: "codeFenced",
	tokenize: tokenizeCodeFenced
};
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeCodeFenced(effects, ok, nok) {
	const self = this;
	/** @type {Construct} */
	const closeStart = {
		partial: true,
		tokenize: tokenizeCloseStart
	};
	let initialPrefix = 0;
	let sizeOpen = 0;
	/** @type {NonNullable<Code>} */
	let marker;
	return start;
	/**
	* Start of code.
	*
	* ```markdown
	* > | ~~~js
	*     ^
	*   | alert(1)
	*   | ~~~
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		return beforeSequenceOpen(code);
	}
	/**
	* In opening fence, after prefix, at sequence.
	*
	* ```markdown
	* > | ~~~js
	*     ^
	*   | alert(1)
	*   | ~~~
	* ```
	*
	* @type {State}
	*/
	function beforeSequenceOpen(code) {
		const tail = self.events[self.events.length - 1];
		initialPrefix = tail && tail[1].type === "linePrefix" ? tail[2].sliceSerialize(tail[1], true).length : 0;
		marker = code;
		effects.enter("codeFenced");
		effects.enter("codeFencedFence");
		effects.enter("codeFencedFenceSequence");
		return sequenceOpen(code);
	}
	/**
	* In opening fence sequence.
	*
	* ```markdown
	* > | ~~~js
	*      ^
	*   | alert(1)
	*   | ~~~
	* ```
	*
	* @type {State}
	*/
	function sequenceOpen(code) {
		if (code === marker) {
			sizeOpen++;
			effects.consume(code);
			return sequenceOpen;
		}
		if (sizeOpen < 3) return nok(code);
		effects.exit("codeFencedFenceSequence");
		return markdownSpace(code) ? factorySpace(effects, infoBefore, "whitespace")(code) : infoBefore(code);
	}
	/**
	* In opening fence, after the sequence (and optional whitespace), before info.
	*
	* ```markdown
	* > | ~~~js
	*        ^
	*   | alert(1)
	*   | ~~~
	* ```
	*
	* @type {State}
	*/
	function infoBefore(code) {
		if (code === null || markdownLineEnding(code)) {
			effects.exit("codeFencedFence");
			return self.interrupt ? ok(code) : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code);
		}
		effects.enter("codeFencedFenceInfo");
		effects.enter("chunkString", { contentType: "string" });
		return info(code);
	}
	/**
	* In info.
	*
	* ```markdown
	* > | ~~~js
	*        ^
	*   | alert(1)
	*   | ~~~
	* ```
	*
	* @type {State}
	*/
	function info(code) {
		if (code === null || markdownLineEnding(code)) {
			effects.exit("chunkString");
			effects.exit("codeFencedFenceInfo");
			return infoBefore(code);
		}
		if (markdownSpace(code)) {
			effects.exit("chunkString");
			effects.exit("codeFencedFenceInfo");
			return factorySpace(effects, metaBefore, "whitespace")(code);
		}
		if (code === 96 && code === marker) return nok(code);
		effects.consume(code);
		return info;
	}
	/**
	* In opening fence, after info and whitespace, before meta.
	*
	* ```markdown
	* > | ~~~js eval
	*           ^
	*   | alert(1)
	*   | ~~~
	* ```
	*
	* @type {State}
	*/
	function metaBefore(code) {
		if (code === null || markdownLineEnding(code)) return infoBefore(code);
		effects.enter("codeFencedFenceMeta");
		effects.enter("chunkString", { contentType: "string" });
		return meta(code);
	}
	/**
	* In meta.
	*
	* ```markdown
	* > | ~~~js eval
	*           ^
	*   | alert(1)
	*   | ~~~
	* ```
	*
	* @type {State}
	*/
	function meta(code) {
		if (code === null || markdownLineEnding(code)) {
			effects.exit("chunkString");
			effects.exit("codeFencedFenceMeta");
			return infoBefore(code);
		}
		if (code === 96 && code === marker) return nok(code);
		effects.consume(code);
		return meta;
	}
	/**
	* At eol/eof in code, before a non-lazy closing fence or content.
	*
	* ```markdown
	* > | ~~~js
	*          ^
	* > | alert(1)
	*             ^
	*   | ~~~
	* ```
	*
	* @type {State}
	*/
	function atNonLazyBreak(code) {
		return effects.attempt(closeStart, after, contentBefore)(code);
	}
	/**
	* Before code content, not a closing fence, at eol.
	*
	* ```markdown
	*   | ~~~js
	* > | alert(1)
	*             ^
	*   | ~~~
	* ```
	*
	* @type {State}
	*/
	function contentBefore(code) {
		effects.enter("lineEnding");
		effects.consume(code);
		effects.exit("lineEnding");
		return contentStart;
	}
	/**
	* Before code content, not a closing fence.
	*
	* ```markdown
	*   | ~~~js
	* > | alert(1)
	*     ^
	*   | ~~~
	* ```
	*
	* @type {State}
	*/
	function contentStart(code) {
		return initialPrefix > 0 && markdownSpace(code) ? factorySpace(effects, beforeContentChunk, "linePrefix", initialPrefix + 1)(code) : beforeContentChunk(code);
	}
	/**
	* Before code content, after optional prefix.
	*
	* ```markdown
	*   | ~~~js
	* > | alert(1)
	*     ^
	*   | ~~~
	* ```
	*
	* @type {State}
	*/
	function beforeContentChunk(code) {
		if (code === null || markdownLineEnding(code)) return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code);
		effects.enter("codeFlowValue");
		return contentChunk(code);
	}
	/**
	* In code content.
	*
	* ```markdown
	*   | ~~~js
	* > | alert(1)
	*     ^^^^^^^^
	*   | ~~~
	* ```
	*
	* @type {State}
	*/
	function contentChunk(code) {
		if (code === null || markdownLineEnding(code)) {
			effects.exit("codeFlowValue");
			return beforeContentChunk(code);
		}
		effects.consume(code);
		return contentChunk;
	}
	/**
	* After code.
	*
	* ```markdown
	*   | ~~~js
	*   | alert(1)
	* > | ~~~
	*        ^
	* ```
	*
	* @type {State}
	*/
	function after(code) {
		effects.exit("codeFenced");
		return ok(code);
	}
	/**
	* @this {TokenizeContext}
	*   Context.
	* @type {Tokenizer}
	*/
	function tokenizeCloseStart(effects, ok, nok) {
		let size = 0;
		return startBefore;
		/**
		*
		*
		* @type {State}
		*/
		function startBefore(code) {
			effects.enter("lineEnding");
			effects.consume(code);
			effects.exit("lineEnding");
			return start;
		}
		/**
		* Before closing fence, at optional whitespace.
		*
		* ```markdown
		*   | ~~~js
		*   | alert(1)
		* > | ~~~
		*     ^
		* ```
		*
		* @type {State}
		*/
		function start(code) {
			effects.enter("codeFencedFence");
			return markdownSpace(code) ? factorySpace(effects, beforeSequenceClose, "linePrefix", self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(code) : beforeSequenceClose(code);
		}
		/**
		* In closing fence, after optional whitespace, at sequence.
		*
		* ```markdown
		*   | ~~~js
		*   | alert(1)
		* > | ~~~
		*     ^
		* ```
		*
		* @type {State}
		*/
		function beforeSequenceClose(code) {
			if (code === marker) {
				effects.enter("codeFencedFenceSequence");
				return sequenceClose(code);
			}
			return nok(code);
		}
		/**
		* In closing fence sequence.
		*
		* ```markdown
		*   | ~~~js
		*   | alert(1)
		* > | ~~~
		*     ^
		* ```
		*
		* @type {State}
		*/
		function sequenceClose(code) {
			if (code === marker) {
				size++;
				effects.consume(code);
				return sequenceClose;
			}
			if (size >= sizeOpen) {
				effects.exit("codeFencedFenceSequence");
				return markdownSpace(code) ? factorySpace(effects, sequenceCloseAfter, "whitespace")(code) : sequenceCloseAfter(code);
			}
			return nok(code);
		}
		/**
		* After closing fence sequence, after optional whitespace.
		*
		* ```markdown
		*   | ~~~js
		*   | alert(1)
		* > | ~~~
		*        ^
		* ```
		*
		* @type {State}
		*/
		function sequenceCloseAfter(code) {
			if (code === null || markdownLineEnding(code)) {
				effects.exit("codeFencedFence");
				return ok(code);
			}
			return nok(code);
		}
	}
}
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeNonLazyContinuation(effects, ok, nok) {
	const self = this;
	return start;
	/**
	*
	*
	* @type {State}
	*/
	function start(code) {
		if (code === null) return nok(code);
		effects.enter("lineEnding");
		effects.consume(code);
		effects.exit("lineEnding");
		return lineStart;
	}
	/**
	*
	*
	* @type {State}
	*/
	function lineStart(code) {
		return self.parser.lazy[self.now().line] ? nok(code) : ok(code);
	}
}
//#endregion
//#region ../../node_modules/micromark-core-commonmark/lib/code-indented.js
/**
* @import {
*   Construct,
*   State,
*   TokenizeContext,
*   Tokenizer
* } from 'micromark-util-types'
*/
/** @type {Construct} */
var codeIndented = {
	name: "codeIndented",
	tokenize: tokenizeCodeIndented
};
/** @type {Construct} */
var furtherStart = {
	partial: true,
	tokenize: tokenizeFurtherStart
};
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeCodeIndented(effects, ok, nok) {
	const self = this;
	return start;
	/**
	* Start of code (indented).
	*
	* > **Parsing note**: it is not needed to check if this first line is a
	* > filled line (that it has a non-whitespace character), because blank lines
	* > are parsed already, so we never run into that.
	*
	* ```markdown
	* > |     aaa
	*     ^
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		effects.enter("codeIndented");
		return factorySpace(effects, afterPrefix, "linePrefix", 5)(code);
	}
	/**
	* At start, after 1 or 4 spaces.
	*
	* ```markdown
	* > |     aaa
	*         ^
	* ```
	*
	* @type {State}
	*/
	function afterPrefix(code) {
		const tail = self.events[self.events.length - 1];
		return tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4 ? atBreak(code) : nok(code);
	}
	/**
	* At a break.
	*
	* ```markdown
	* > |     aaa
	*         ^  ^
	* ```
	*
	* @type {State}
	*/
	function atBreak(code) {
		if (code === null) return after(code);
		if (markdownLineEnding(code)) return effects.attempt(furtherStart, atBreak, after)(code);
		effects.enter("codeFlowValue");
		return inside(code);
	}
	/**
	* In code content.
	*
	* ```markdown
	* > |     aaa
	*         ^^^^
	* ```
	*
	* @type {State}
	*/
	function inside(code) {
		if (code === null || markdownLineEnding(code)) {
			effects.exit("codeFlowValue");
			return atBreak(code);
		}
		effects.consume(code);
		return inside;
	}
	/** @type {State} */
	function after(code) {
		effects.exit("codeIndented");
		return ok(code);
	}
}
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeFurtherStart(effects, ok, nok) {
	const self = this;
	return furtherStart;
	/**
	* At eol, trying to parse another indent.
	*
	* ```markdown
	* > |     aaa
	*            ^
	*   |     bbb
	* ```
	*
	* @type {State}
	*/
	function furtherStart(code) {
		if (self.parser.lazy[self.now().line]) return nok(code);
		if (markdownLineEnding(code)) {
			effects.enter("lineEnding");
			effects.consume(code);
			effects.exit("lineEnding");
			return furtherStart;
		}
		return factorySpace(effects, afterPrefix, "linePrefix", 5)(code);
	}
	/**
	* At start, after 1 or 4 spaces.
	*
	* ```markdown
	* > |     aaa
	*         ^
	* ```
	*
	* @type {State}
	*/
	function afterPrefix(code) {
		const tail = self.events[self.events.length - 1];
		return tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4 ? ok(code) : markdownLineEnding(code) ? furtherStart(code) : nok(code);
	}
}
//#endregion
//#region ../../node_modules/micromark-core-commonmark/lib/code-text.js
/**
* @import {
*   Construct,
*   Previous,
*   Resolver,
*   State,
*   TokenizeContext,
*   Tokenizer,
*   Token
* } from 'micromark-util-types'
*/
/** @type {Construct} */
var codeText = {
	name: "codeText",
	previous: previous$1,
	resolve: resolveCodeText,
	tokenize: tokenizeCodeText
};
/** @type {Resolver} */
function resolveCodeText(events) {
	let tailExitIndex = events.length - 4;
	let headEnterIndex = 3;
	/** @type {number} */
	let index;
	/** @type {number | undefined} */
	let enter;
	if ((events[headEnterIndex][1].type === "lineEnding" || events[headEnterIndex][1].type === "space") && (events[tailExitIndex][1].type === "lineEnding" || events[tailExitIndex][1].type === "space")) {
		index = headEnterIndex;
		while (++index < tailExitIndex) if (events[index][1].type === "codeTextData") {
			events[headEnterIndex][1].type = "codeTextPadding";
			events[tailExitIndex][1].type = "codeTextPadding";
			headEnterIndex += 2;
			tailExitIndex -= 2;
			break;
		}
	}
	index = headEnterIndex - 1;
	tailExitIndex++;
	while (++index <= tailExitIndex) if (enter === void 0) {
		if (index !== tailExitIndex && events[index][1].type !== "lineEnding") enter = index;
	} else if (index === tailExitIndex || events[index][1].type === "lineEnding") {
		events[enter][1].type = "codeTextData";
		if (index !== enter + 2) {
			events[enter][1].end = events[index - 1][1].end;
			events.splice(enter + 2, index - enter - 2);
			tailExitIndex -= index - enter - 2;
			index = enter + 2;
		}
		enter = void 0;
	}
	return events;
}
/**
* @this {TokenizeContext}
*   Context.
* @type {Previous}
*/
function previous$1(code) {
	return code !== 96 || this.events[this.events.length - 1][1].type === "characterEscape";
}
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeCodeText(effects, ok, nok) {
	let sizeOpen = 0;
	/** @type {number} */
	let size;
	/** @type {Token} */
	let token;
	return start;
	/**
	* Start of code (text).
	*
	* ```markdown
	* > | `a`
	*     ^
	* > | \`a`
	*      ^
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		effects.enter("codeText");
		effects.enter("codeTextSequence");
		return sequenceOpen(code);
	}
	/**
	* In opening sequence.
	*
	* ```markdown
	* > | `a`
	*     ^
	* ```
	*
	* @type {State}
	*/
	function sequenceOpen(code) {
		if (code === 96) {
			effects.consume(code);
			sizeOpen++;
			return sequenceOpen;
		}
		effects.exit("codeTextSequence");
		return between(code);
	}
	/**
	* Between something and something else.
	*
	* ```markdown
	* > | `a`
	*      ^^
	* ```
	*
	* @type {State}
	*/
	function between(code) {
		if (code === null) return nok(code);
		if (code === 32) {
			effects.enter("space");
			effects.consume(code);
			effects.exit("space");
			return between;
		}
		if (code === 96) {
			token = effects.enter("codeTextSequence");
			size = 0;
			return sequenceClose(code);
		}
		if (markdownLineEnding(code)) {
			effects.enter("lineEnding");
			effects.consume(code);
			effects.exit("lineEnding");
			return between;
		}
		effects.enter("codeTextData");
		return data(code);
	}
	/**
	* In data.
	*
	* ```markdown
	* > | `a`
	*      ^
	* ```
	*
	* @type {State}
	*/
	function data(code) {
		if (code === null || code === 32 || code === 96 || markdownLineEnding(code)) {
			effects.exit("codeTextData");
			return between(code);
		}
		effects.consume(code);
		return data;
	}
	/**
	* In closing sequence.
	*
	* ```markdown
	* > | `a`
	*       ^
	* ```
	*
	* @type {State}
	*/
	function sequenceClose(code) {
		if (code === 96) {
			effects.consume(code);
			size++;
			return sequenceClose;
		}
		if (size === sizeOpen) {
			effects.exit("codeTextSequence");
			effects.exit("codeText");
			return ok(code);
		}
		token.type = "codeTextData";
		return data(code);
	}
}
//#endregion
//#region ../../node_modules/micromark-util-subtokenize/lib/splice-buffer.js
/**
* Some of the internal operations of micromark do lots of editing
* operations on very large arrays. This runs into problems with two
* properties of most circa-2020 JavaScript interpreters:
*
*  - Array-length modifications at the high end of an array (push/pop) are
*    expected to be common and are implemented in (amortized) time
*    proportional to the number of elements added or removed, whereas
*    other operations (shift/unshift and splice) are much less efficient.
*  - Function arguments are passed on the stack, so adding tens of thousands
*    of elements to an array with `arr.push(...newElements)` will frequently
*    cause stack overflows. (see <https://stackoverflow.com/questions/22123769/rangeerror-maximum-call-stack-size-exceeded-why>)
*
* SpliceBuffers are an implementation of gap buffers, which are a
* generalization of the "queue made of two stacks" idea. The splice buffer
* maintains a cursor, and moving the cursor has cost proportional to the
* distance the cursor moves, but inserting, deleting, or splicing in
* new information at the cursor is as efficient as the push/pop operation.
* This allows for an efficient sequence of splices (or pushes, pops, shifts,
* or unshifts) as long such edits happen at the same part of the array or
* generally sweep through the array from the beginning to the end.
*
* The interface for splice buffers also supports large numbers of inputs by
* passing a single array argument rather passing multiple arguments on the
* function call stack.
*
* @template T
*   Item type.
*/
var SpliceBuffer = class {
	/**
	* @param {ReadonlyArray<T> | null | undefined} [initial]
	*   Initial items (optional).
	* @returns
	*   Splice buffer.
	*/
	constructor(initial) {
		/** @type {Array<T>} */
		this.left = initial ? [...initial] : [];
		/** @type {Array<T>} */
		this.right = [];
	}
	/**
	* Array access;
	* does not move the cursor.
	*
	* @param {number} index
	*   Index.
	* @return {T}
	*   Item.
	*/
	get(index) {
		if (index < 0 || index >= this.left.length + this.right.length) throw new RangeError("Cannot access index `" + index + "` in a splice buffer of size `" + (this.left.length + this.right.length) + "`");
		if (index < this.left.length) return this.left[index];
		return this.right[this.right.length - index + this.left.length - 1];
	}
	/**
	* The length of the splice buffer, one greater than the largest index in the
	* array.
	*/
	get length() {
		return this.left.length + this.right.length;
	}
	/**
	* Remove and return `list[0]`;
	* moves the cursor to `0`.
	*
	* @returns {T | undefined}
	*   Item, optional.
	*/
	shift() {
		this.setCursor(0);
		return this.right.pop();
	}
	/**
	* Slice the buffer to get an array;
	* does not move the cursor.
	*
	* @param {number} start
	*   Start.
	* @param {number | null | undefined} [end]
	*   End (optional).
	* @returns {Array<T>}
	*   Array of items.
	*/
	slice(start, end) {
		/** @type {number} */
		const stop = end === null || end === void 0 ? Number.POSITIVE_INFINITY : end;
		if (stop < this.left.length) return this.left.slice(start, stop);
		if (start > this.left.length) return this.right.slice(this.right.length - stop + this.left.length, this.right.length - start + this.left.length).reverse();
		return this.left.slice(start).concat(this.right.slice(this.right.length - stop + this.left.length).reverse());
	}
	/**
	* Mimics the behavior of Array.prototype.splice() except for the change of
	* interface necessary to avoid segfaults when patching in very large arrays.
	*
	* This operation moves cursor is moved to `start` and results in the cursor
	* placed after any inserted items.
	*
	* @param {number} start
	*   Start;
	*   zero-based index at which to start changing the array;
	*   negative numbers count backwards from the end of the array and values
	*   that are out-of bounds are clamped to the appropriate end of the array.
	* @param {number | null | undefined} [deleteCount=0]
	*   Delete count (default: `0`);
	*   maximum number of elements to delete, starting from start.
	* @param {Array<T> | null | undefined} [items=[]]
	*   Items to include in place of the deleted items (default: `[]`).
	* @return {Array<T>}
	*   Any removed items.
	*/
	splice(start, deleteCount, items) {
		/** @type {number} */
		const count = deleteCount || 0;
		this.setCursor(Math.trunc(start));
		const removed = this.right.splice(this.right.length - count, Number.POSITIVE_INFINITY);
		if (items) chunkedPush(this.left, items);
		return removed.reverse();
	}
	/**
	* Remove and return the highest-numbered item in the array, so
	* `list[list.length - 1]`;
	* Moves the cursor to `length`.
	*
	* @returns {T | undefined}
	*   Item, optional.
	*/
	pop() {
		this.setCursor(Number.POSITIVE_INFINITY);
		return this.left.pop();
	}
	/**
	* Inserts a single item to the high-numbered side of the array;
	* moves the cursor to `length`.
	*
	* @param {T} item
	*   Item.
	* @returns {undefined}
	*   Nothing.
	*/
	push(item) {
		this.setCursor(Number.POSITIVE_INFINITY);
		this.left.push(item);
	}
	/**
	* Inserts many items to the high-numbered side of the array.
	* Moves the cursor to `length`.
	*
	* @param {Array<T>} items
	*   Items.
	* @returns {undefined}
	*   Nothing.
	*/
	pushMany(items) {
		this.setCursor(Number.POSITIVE_INFINITY);
		chunkedPush(this.left, items);
	}
	/**
	* Inserts a single item to the low-numbered side of the array;
	* Moves the cursor to `0`.
	*
	* @param {T} item
	*   Item.
	* @returns {undefined}
	*   Nothing.
	*/
	unshift(item) {
		this.setCursor(0);
		this.right.push(item);
	}
	/**
	* Inserts many items to the low-numbered side of the array;
	* moves the cursor to `0`.
	*
	* @param {Array<T>} items
	*   Items.
	* @returns {undefined}
	*   Nothing.
	*/
	unshiftMany(items) {
		this.setCursor(0);
		chunkedPush(this.right, items.reverse());
	}
	/**
	* Move the cursor to a specific position in the array. Requires
	* time proportional to the distance moved.
	*
	* If `n < 0`, the cursor will end up at the beginning.
	* If `n > length`, the cursor will end up at the end.
	*
	* @param {number} n
	*   Position.
	* @return {undefined}
	*   Nothing.
	*/
	setCursor(n) {
		if (n === this.left.length || n > this.left.length && this.right.length === 0 || n < 0 && this.left.length === 0) return;
		if (n < this.left.length) {
			const removed = this.left.splice(n, Number.POSITIVE_INFINITY);
			chunkedPush(this.right, removed.reverse());
		} else {
			const removed = this.right.splice(this.left.length + this.right.length - n, Number.POSITIVE_INFINITY);
			chunkedPush(this.left, removed.reverse());
		}
	}
};
/**
* Avoid stack overflow by pushing items onto the stack in segments
*
* @template T
*   Item type.
* @param {Array<T>} list
*   List to inject into.
* @param {ReadonlyArray<T>} right
*   Items to inject.
* @return {undefined}
*   Nothing.
*/
function chunkedPush(list, right) {
	/** @type {number} */
	let chunkStart = 0;
	if (right.length < 1e4) list.push(...right);
	else while (chunkStart < right.length) {
		list.push(...right.slice(chunkStart, chunkStart + 1e4));
		chunkStart += 1e4;
	}
}
//#endregion
//#region ../../node_modules/micromark-util-subtokenize/index.js
/**
* @import {Chunk, Event, Token} from 'micromark-util-types'
*/
/**
* Tokenize subcontent.
*
* @param {Array<Event>} eventsArray
*   List of events.
* @returns {boolean}
*   Whether subtokens were found.
*/
function subtokenize(eventsArray) {
	/** @type {Record<string, number>} */
	const jumps = {};
	let index = -1;
	/** @type {Event} */
	let event;
	/** @type {number | undefined} */
	let lineIndex;
	/** @type {number} */
	let otherIndex;
	/** @type {Event} */
	let otherEvent;
	/** @type {Array<Event>} */
	let parameters;
	/** @type {Array<Event>} */
	let subevents;
	/** @type {boolean | undefined} */
	let more;
	const events = new SpliceBuffer(eventsArray);
	while (++index < events.length) {
		while (index in jumps) index = jumps[index];
		event = events.get(index);
		if (index && event[1].type === "chunkFlow" && events.get(index - 1)[1].type === "listItemPrefix") {
			subevents = event[1]._tokenizer.events;
			otherIndex = 0;
			if (otherIndex < subevents.length && subevents[otherIndex][1].type === "lineEndingBlank") otherIndex += 2;
			if (otherIndex < subevents.length && subevents[otherIndex][1].type === "content") while (++otherIndex < subevents.length) {
				if (subevents[otherIndex][1].type === "content") break;
				if (subevents[otherIndex][1].type === "chunkText") {
					subevents[otherIndex][1]._isInFirstContentOfListItem = true;
					otherIndex++;
				}
			}
		}
		if (event[0] === "enter") {
			if (event[1].contentType) {
				Object.assign(jumps, subcontent(events, index));
				index = jumps[index];
				more = true;
			}
		} else if (event[1]._container) {
			otherIndex = index;
			lineIndex = void 0;
			while (otherIndex--) {
				otherEvent = events.get(otherIndex);
				if (otherEvent[1].type === "lineEnding" || otherEvent[1].type === "lineEndingBlank") {
					if (otherEvent[0] === "enter") {
						if (lineIndex) events.get(lineIndex)[1].type = "lineEndingBlank";
						otherEvent[1].type = "lineEnding";
						lineIndex = otherIndex;
					}
				} else if (otherEvent[1].type === "linePrefix" || otherEvent[1].type === "listItemIndent") {} else break;
			}
			if (lineIndex) {
				event[1].end = { ...events.get(lineIndex)[1].start };
				parameters = events.slice(lineIndex, index);
				parameters.unshift(event);
				events.splice(lineIndex, index - lineIndex + 1, parameters);
			}
		}
	}
	splice(eventsArray, 0, Number.POSITIVE_INFINITY, events.slice(0));
	return !more;
}
/**
* Tokenize embedded tokens.
*
* @param {SpliceBuffer<Event>} events
*   Events.
* @param {number} eventIndex
*   Index.
* @returns {Record<string, number>}
*   Gaps.
*/
function subcontent(events, eventIndex) {
	const token = events.get(eventIndex)[1];
	const context = events.get(eventIndex)[2];
	let startPosition = eventIndex - 1;
	/** @type {Array<number>} */
	const startPositions = [];
	let tokenizer = token._tokenizer;
	if (!tokenizer) {
		tokenizer = context.parser[token.contentType](token.start);
		if (token._contentTypeTextTrailing) tokenizer._contentTypeTextTrailing = true;
	}
	const childEvents = tokenizer.events;
	/** @type {Array<[number, number]>} */
	const jumps = [];
	/** @type {Record<string, number>} */
	const gaps = {};
	/** @type {Array<Chunk>} */
	let stream;
	/** @type {Token | undefined} */
	let previous;
	let index = -1;
	/** @type {Token | undefined} */
	let current = token;
	let adjust = 0;
	let start = 0;
	const breaks = [start];
	while (current) {
		while (events.get(++startPosition)[1] !== current);
		startPositions.push(startPosition);
		if (!current._tokenizer) {
			stream = context.sliceStream(current);
			if (!current.next) stream.push(null);
			if (previous) tokenizer.defineSkip(current.start);
			if (current._isInFirstContentOfListItem) tokenizer._gfmTasklistFirstContentOfListItem = true;
			tokenizer.write(stream);
			if (current._isInFirstContentOfListItem) tokenizer._gfmTasklistFirstContentOfListItem = void 0;
		}
		previous = current;
		current = current.next;
	}
	current = token;
	while (++index < childEvents.length) if (childEvents[index][0] === "exit" && childEvents[index - 1][0] === "enter" && childEvents[index][1].type === childEvents[index - 1][1].type && childEvents[index][1].start.line !== childEvents[index][1].end.line) {
		start = index + 1;
		breaks.push(start);
		current._tokenizer = void 0;
		current.previous = void 0;
		current = current.next;
	}
	tokenizer.events = [];
	if (current) {
		current._tokenizer = void 0;
		current.previous = void 0;
	} else breaks.pop();
	index = breaks.length;
	while (index--) {
		const slice = childEvents.slice(breaks[index], breaks[index + 1]);
		const start = startPositions.pop();
		jumps.push([start, start + slice.length - 1]);
		events.splice(start, 2, slice);
	}
	jumps.reverse();
	index = -1;
	while (++index < jumps.length) {
		gaps[adjust + jumps[index][0]] = adjust + jumps[index][1];
		adjust += jumps[index][1] - jumps[index][0] - 1;
	}
	return gaps;
}
//#endregion
//#region ../../node_modules/micromark-core-commonmark/lib/content.js
/**
* @import {
*   Construct,
*   Resolver,
*   State,
*   TokenizeContext,
*   Tokenizer,
*   Token
* } from 'micromark-util-types'
*/
/**
* No name because it must not be turned off.
* @type {Construct}
*/
var content = {
	resolve: resolveContent,
	tokenize: tokenizeContent
};
/** @type {Construct} */
var continuationConstruct = {
	partial: true,
	tokenize: tokenizeContinuation
};
/**
* Content is transparent: it’s parsed right now. That way, definitions are also
* parsed right now: before text in paragraphs (specifically, media) are parsed.
*
* @type {Resolver}
*/
function resolveContent(events) {
	subtokenize(events);
	return events;
}
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeContent(effects, ok) {
	/** @type {Token | undefined} */
	let previous;
	return chunkStart;
	/**
	* Before a content chunk.
	*
	* ```markdown
	* > | abc
	*     ^
	* ```
	*
	* @type {State}
	*/
	function chunkStart(code) {
		effects.enter("content");
		previous = effects.enter("chunkContent", { contentType: "content" });
		return chunkInside(code);
	}
	/**
	* In a content chunk.
	*
	* ```markdown
	* > | abc
	*     ^^^
	* ```
	*
	* @type {State}
	*/
	function chunkInside(code) {
		if (code === null) return contentEnd(code);
		if (markdownLineEnding(code)) return effects.check(continuationConstruct, contentContinue, contentEnd)(code);
		effects.consume(code);
		return chunkInside;
	}
	/**
	*
	*
	* @type {State}
	*/
	function contentEnd(code) {
		effects.exit("chunkContent");
		effects.exit("content");
		return ok(code);
	}
	/**
	*
	*
	* @type {State}
	*/
	function contentContinue(code) {
		effects.consume(code);
		effects.exit("chunkContent");
		previous.next = effects.enter("chunkContent", {
			contentType: "content",
			previous
		});
		previous = previous.next;
		return chunkInside;
	}
}
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeContinuation(effects, ok, nok) {
	const self = this;
	return startLookahead;
	/**
	*
	*
	* @type {State}
	*/
	function startLookahead(code) {
		effects.exit("chunkContent");
		effects.enter("lineEnding");
		effects.consume(code);
		effects.exit("lineEnding");
		return factorySpace(effects, prefixed, "linePrefix");
	}
	/**
	*
	*
	* @type {State}
	*/
	function prefixed(code) {
		if (code === null || markdownLineEnding(code)) return nok(code);
		const tail = self.events[self.events.length - 1];
		if (!self.parser.constructs.disable.null.includes("codeIndented") && tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4) return ok(code);
		return effects.interrupt(self.parser.constructs.flow, nok, ok)(code);
	}
}
//#endregion
//#region ../../node_modules/micromark-factory-destination/index.js
/**
* @import {Effects, State, TokenType} from 'micromark-util-types'
*/
/**
* Parse destinations.
*
* ###### Examples
*
* ```markdown
* <a>
* <a\>b>
* <a b>
* <a)>
* a
* a\)b
* a(b)c
* a(b)
* ```
*
* @param {Effects} effects
*   Context.
* @param {State} ok
*   State switched to when successful.
* @param {State} nok
*   State switched to when unsuccessful.
* @param {TokenType} type
*   Type for whole (`<a>` or `b`).
* @param {TokenType} literalType
*   Type when enclosed (`<a>`).
* @param {TokenType} literalMarkerType
*   Type for enclosing (`<` and `>`).
* @param {TokenType} rawType
*   Type when not enclosed (`b`).
* @param {TokenType} stringType
*   Type for the value (`a` or `b`).
* @param {number | undefined} [max=Infinity]
*   Depth of nested parens (inclusive).
* @returns {State}
*   Start state.
*/
function factoryDestination(effects, ok, nok, type, literalType, literalMarkerType, rawType, stringType, max) {
	const limit = max || Number.POSITIVE_INFINITY;
	let balance = 0;
	return start;
	/**
	* Start of destination.
	*
	* ```markdown
	* > | <aa>
	*     ^
	* > | aa
	*     ^
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		if (code === 60) {
			effects.enter(type);
			effects.enter(literalType);
			effects.enter(literalMarkerType);
			effects.consume(code);
			effects.exit(literalMarkerType);
			return enclosedBefore;
		}
		if (code === null || code === 32 || code === 41 || asciiControl(code)) return nok(code);
		effects.enter(type);
		effects.enter(rawType);
		effects.enter(stringType);
		effects.enter("chunkString", { contentType: "string" });
		return raw(code);
	}
	/**
	* After `<`, at an enclosed destination.
	*
	* ```markdown
	* > | <aa>
	*      ^
	* ```
	*
	* @type {State}
	*/
	function enclosedBefore(code) {
		if (code === 62) {
			effects.enter(literalMarkerType);
			effects.consume(code);
			effects.exit(literalMarkerType);
			effects.exit(literalType);
			effects.exit(type);
			return ok;
		}
		effects.enter(stringType);
		effects.enter("chunkString", { contentType: "string" });
		return enclosed(code);
	}
	/**
	* In enclosed destination.
	*
	* ```markdown
	* > | <aa>
	*      ^
	* ```
	*
	* @type {State}
	*/
	function enclosed(code) {
		if (code === 62) {
			effects.exit("chunkString");
			effects.exit(stringType);
			return enclosedBefore(code);
		}
		if (code === null || code === 60 || markdownLineEnding(code)) return nok(code);
		effects.consume(code);
		return code === 92 ? enclosedEscape : enclosed;
	}
	/**
	* After `\`, at a special character.
	*
	* ```markdown
	* > | <a\*a>
	*        ^
	* ```
	*
	* @type {State}
	*/
	function enclosedEscape(code) {
		if (code === 60 || code === 62 || code === 92) {
			effects.consume(code);
			return enclosed;
		}
		return enclosed(code);
	}
	/**
	* In raw destination.
	*
	* ```markdown
	* > | aa
	*     ^
	* ```
	*
	* @type {State}
	*/
	function raw(code) {
		if (!balance && (code === null || code === 41 || markdownLineEndingOrSpace(code))) {
			effects.exit("chunkString");
			effects.exit(stringType);
			effects.exit(rawType);
			effects.exit(type);
			return ok(code);
		}
		if (balance < limit && code === 40) {
			effects.consume(code);
			balance++;
			return raw;
		}
		if (code === 41) {
			effects.consume(code);
			balance--;
			return raw;
		}
		if (code === null || code === 32 || code === 40 || asciiControl(code)) return nok(code);
		effects.consume(code);
		return code === 92 ? rawEscape : raw;
	}
	/**
	* After `\`, at special character.
	*
	* ```markdown
	* > | a\*a
	*       ^
	* ```
	*
	* @type {State}
	*/
	function rawEscape(code) {
		if (code === 40 || code === 41 || code === 92) {
			effects.consume(code);
			return raw;
		}
		return raw(code);
	}
}
//#endregion
//#region ../../node_modules/micromark-factory-label/index.js
/**
* @import {
*   Effects,
*   State,
*   TokenizeContext,
*   TokenType
* } from 'micromark-util-types'
*/
/**
* Parse labels.
*
* > 👉 **Note**: labels in markdown are capped at 999 characters in the string.
*
* ###### Examples
*
* ```markdown
* [a]
* [a
* b]
* [a\]b]
* ```
*
* @this {TokenizeContext}
*   Tokenize context.
* @param {Effects} effects
*   Context.
* @param {State} ok
*   State switched to when successful.
* @param {State} nok
*   State switched to when unsuccessful.
* @param {TokenType} type
*   Type of the whole label (`[a]`).
* @param {TokenType} markerType
*   Type for the markers (`[` and `]`).
* @param {TokenType} stringType
*   Type for the identifier (`a`).
* @returns {State}
*   Start state.
*/
function factoryLabel(effects, ok, nok, type, markerType, stringType) {
	const self = this;
	let size = 0;
	/** @type {boolean} */
	let seen;
	return start;
	/**
	* Start of label.
	*
	* ```markdown
	* > | [a]
	*     ^
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		effects.enter(type);
		effects.enter(markerType);
		effects.consume(code);
		effects.exit(markerType);
		effects.enter(stringType);
		return atBreak;
	}
	/**
	* In label, at something, before something else.
	*
	* ```markdown
	* > | [a]
	*      ^
	* ```
	*
	* @type {State}
	*/
	function atBreak(code) {
		if (size > 999 || code === null || code === 91 || code === 93 && !seen || code === 94 && !size && "_hiddenFootnoteSupport" in self.parser.constructs) return nok(code);
		if (code === 93) {
			effects.exit(stringType);
			effects.enter(markerType);
			effects.consume(code);
			effects.exit(markerType);
			effects.exit(type);
			return ok;
		}
		if (markdownLineEnding(code)) {
			effects.enter("lineEnding");
			effects.consume(code);
			effects.exit("lineEnding");
			return atBreak;
		}
		effects.enter("chunkString", { contentType: "string" });
		return labelInside(code);
	}
	/**
	* In label, in text.
	*
	* ```markdown
	* > | [a]
	*      ^
	* ```
	*
	* @type {State}
	*/
	function labelInside(code) {
		if (code === null || code === 91 || code === 93 || markdownLineEnding(code) || size++ > 999) {
			effects.exit("chunkString");
			return atBreak(code);
		}
		effects.consume(code);
		if (!seen) seen = !markdownSpace(code);
		return code === 92 ? labelEscape : labelInside;
	}
	/**
	* After `\`, at a special character.
	*
	* ```markdown
	* > | [a\*a]
	*        ^
	* ```
	*
	* @type {State}
	*/
	function labelEscape(code) {
		if (code === 91 || code === 92 || code === 93) {
			effects.consume(code);
			size++;
			return labelInside;
		}
		return labelInside(code);
	}
}
//#endregion
//#region ../../node_modules/micromark-factory-title/index.js
/**
* @import {
*   Code,
*   Effects,
*   State,
*   TokenType
* } from 'micromark-util-types'
*/
/**
* Parse titles.
*
* ###### Examples
*
* ```markdown
* "a"
* 'b'
* (c)
* "a
* b"
* 'a
*     b'
* (a\)b)
* ```
*
* @param {Effects} effects
*   Context.
* @param {State} ok
*   State switched to when successful.
* @param {State} nok
*   State switched to when unsuccessful.
* @param {TokenType} type
*   Type of the whole title (`"a"`, `'b'`, `(c)`).
* @param {TokenType} markerType
*   Type for the markers (`"`, `'`, `(`, and `)`).
* @param {TokenType} stringType
*   Type for the value (`a`).
* @returns {State}
*   Start state.
*/
function factoryTitle(effects, ok, nok, type, markerType, stringType) {
	/** @type {NonNullable<Code>} */
	let marker;
	return start;
	/**
	* Start of title.
	*
	* ```markdown
	* > | "a"
	*     ^
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		if (code === 34 || code === 39 || code === 40) {
			effects.enter(type);
			effects.enter(markerType);
			effects.consume(code);
			effects.exit(markerType);
			marker = code === 40 ? 41 : code;
			return begin;
		}
		return nok(code);
	}
	/**
	* After opening marker.
	*
	* This is also used at the closing marker.
	*
	* ```markdown
	* > | "a"
	*      ^
	* ```
	*
	* @type {State}
	*/
	function begin(code) {
		if (code === marker) {
			effects.enter(markerType);
			effects.consume(code);
			effects.exit(markerType);
			effects.exit(type);
			return ok;
		}
		effects.enter(stringType);
		return atBreak(code);
	}
	/**
	* At something, before something else.
	*
	* ```markdown
	* > | "a"
	*      ^
	* ```
	*
	* @type {State}
	*/
	function atBreak(code) {
		if (code === marker) {
			effects.exit(stringType);
			return begin(marker);
		}
		if (code === null) return nok(code);
		if (markdownLineEnding(code)) {
			effects.enter("lineEnding");
			effects.consume(code);
			effects.exit("lineEnding");
			return factorySpace(effects, atBreak, "linePrefix");
		}
		effects.enter("chunkString", { contentType: "string" });
		return inside(code);
	}
	/**
	*
	*
	* @type {State}
	*/
	function inside(code) {
		if (code === marker || code === null || markdownLineEnding(code)) {
			effects.exit("chunkString");
			return atBreak(code);
		}
		effects.consume(code);
		return code === 92 ? escape : inside;
	}
	/**
	* After `\`, at a special character.
	*
	* ```markdown
	* > | "a\*b"
	*      ^
	* ```
	*
	* @type {State}
	*/
	function escape(code) {
		if (code === marker || code === 92) {
			effects.consume(code);
			return inside;
		}
		return inside(code);
	}
}
//#endregion
//#region ../../node_modules/micromark-factory-whitespace/index.js
/**
* @import {Effects, State} from 'micromark-util-types'
*/
/**
* Parse spaces and tabs.
*
* There is no `nok` parameter:
*
* *   line endings or spaces in markdown are often optional, in which case this
*     factory can be used and `ok` will be switched to whether spaces were found
*     or not
* *   one line ending or space can be detected with
*     `markdownLineEndingOrSpace(code)` right before using `factoryWhitespace`
*
* @param {Effects} effects
*   Context.
* @param {State} ok
*   State switched to when successful.
* @returns {State}
*   Start state.
*/
function factoryWhitespace(effects, ok) {
	/** @type {boolean} */
	let seen;
	return start;
	/** @type {State} */
	function start(code) {
		if (markdownLineEnding(code)) {
			effects.enter("lineEnding");
			effects.consume(code);
			effects.exit("lineEnding");
			seen = true;
			return start;
		}
		if (markdownSpace(code)) return factorySpace(effects, start, seen ? "linePrefix" : "lineSuffix")(code);
		return ok(code);
	}
}
//#endregion
//#region ../../node_modules/micromark-core-commonmark/lib/definition.js
/**
* @import {
*   Construct,
*   State,
*   TokenizeContext,
*   Tokenizer
* } from 'micromark-util-types'
*/
/** @type {Construct} */
var definition$1 = {
	name: "definition",
	tokenize: tokenizeDefinition
};
/** @type {Construct} */
var titleBefore = {
	partial: true,
	tokenize: tokenizeTitleBefore
};
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeDefinition(effects, ok, nok) {
	const self = this;
	/** @type {string} */
	let identifier;
	return start;
	/**
	* At start of a definition.
	*
	* ```markdown
	* > | [a]: b "c"
	*     ^
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		effects.enter("definition");
		return before(code);
	}
	/**
	* After optional whitespace, at `[`.
	*
	* ```markdown
	* > | [a]: b "c"
	*     ^
	* ```
	*
	* @type {State}
	*/
	function before(code) {
		return factoryLabel.call(self, effects, labelAfter, nok, "definitionLabel", "definitionLabelMarker", "definitionLabelString")(code);
	}
	/**
	* After label.
	*
	* ```markdown
	* > | [a]: b "c"
	*        ^
	* ```
	*
	* @type {State}
	*/
	function labelAfter(code) {
		identifier = normalizeIdentifier(self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1));
		if (code === 58) {
			effects.enter("definitionMarker");
			effects.consume(code);
			effects.exit("definitionMarker");
			return markerAfter;
		}
		return nok(code);
	}
	/**
	* After marker.
	*
	* ```markdown
	* > | [a]: b "c"
	*         ^
	* ```
	*
	* @type {State}
	*/
	function markerAfter(code) {
		return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, destinationBefore)(code) : destinationBefore(code);
	}
	/**
	* Before destination.
	*
	* ```markdown
	* > | [a]: b "c"
	*          ^
	* ```
	*
	* @type {State}
	*/
	function destinationBefore(code) {
		return factoryDestination(effects, destinationAfter, nok, "definitionDestination", "definitionDestinationLiteral", "definitionDestinationLiteralMarker", "definitionDestinationRaw", "definitionDestinationString")(code);
	}
	/**
	* After destination.
	*
	* ```markdown
	* > | [a]: b "c"
	*           ^
	* ```
	*
	* @type {State}
	*/
	function destinationAfter(code) {
		return effects.attempt(titleBefore, after, after)(code);
	}
	/**
	* After definition.
	*
	* ```markdown
	* > | [a]: b
	*           ^
	* > | [a]: b "c"
	*               ^
	* ```
	*
	* @type {State}
	*/
	function after(code) {
		return markdownSpace(code) ? factorySpace(effects, afterWhitespace, "whitespace")(code) : afterWhitespace(code);
	}
	/**
	* After definition, after optional whitespace.
	*
	* ```markdown
	* > | [a]: b
	*           ^
	* > | [a]: b "c"
	*               ^
	* ```
	*
	* @type {State}
	*/
	function afterWhitespace(code) {
		if (code === null || markdownLineEnding(code)) {
			effects.exit("definition");
			self.parser.defined.push(identifier);
			return ok(code);
		}
		return nok(code);
	}
}
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeTitleBefore(effects, ok, nok) {
	return titleBefore;
	/**
	* After destination, at whitespace.
	*
	* ```markdown
	* > | [a]: b
	*           ^
	* > | [a]: b "c"
	*           ^
	* ```
	*
	* @type {State}
	*/
	function titleBefore(code) {
		return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, beforeMarker)(code) : nok(code);
	}
	/**
	* At title.
	*
	* ```markdown
	*   | [a]: b
	* > | "c"
	*     ^
	* ```
	*
	* @type {State}
	*/
	function beforeMarker(code) {
		return factoryTitle(effects, titleAfter, nok, "definitionTitle", "definitionTitleMarker", "definitionTitleString")(code);
	}
	/**
	* After title.
	*
	* ```markdown
	* > | [a]: b "c"
	*               ^
	* ```
	*
	* @type {State}
	*/
	function titleAfter(code) {
		return markdownSpace(code) ? factorySpace(effects, titleAfterOptionalWhitespace, "whitespace")(code) : titleAfterOptionalWhitespace(code);
	}
	/**
	* After title, after optional whitespace.
	*
	* ```markdown
	* > | [a]: b "c"
	*               ^
	* ```
	*
	* @type {State}
	*/
	function titleAfterOptionalWhitespace(code) {
		return code === null || markdownLineEnding(code) ? ok(code) : nok(code);
	}
}
//#endregion
//#region ../../node_modules/micromark-core-commonmark/lib/hard-break-escape.js
/**
* @import {
*   Construct,
*   State,
*   TokenizeContext,
*   Tokenizer
* } from 'micromark-util-types'
*/
/** @type {Construct} */
var hardBreakEscape = {
	name: "hardBreakEscape",
	tokenize: tokenizeHardBreakEscape
};
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeHardBreakEscape(effects, ok, nok) {
	return start;
	/**
	* Start of a hard break (escape).
	*
	* ```markdown
	* > | a\
	*      ^
	*   | b
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		effects.enter("hardBreakEscape");
		effects.consume(code);
		return after;
	}
	/**
	* After `\`, at eol.
	*
	* ```markdown
	* > | a\
	*       ^
	*   | b
	* ```
	*
	*  @type {State}
	*/
	function after(code) {
		if (markdownLineEnding(code)) {
			effects.exit("hardBreakEscape");
			return ok(code);
		}
		return nok(code);
	}
}
//#endregion
//#region ../../node_modules/micromark-core-commonmark/lib/heading-atx.js
/**
* @import {
*   Construct,
*   Resolver,
*   State,
*   TokenizeContext,
*   Tokenizer,
*   Token
* } from 'micromark-util-types'
*/
/** @type {Construct} */
var headingAtx = {
	name: "headingAtx",
	resolve: resolveHeadingAtx,
	tokenize: tokenizeHeadingAtx
};
/** @type {Resolver} */
function resolveHeadingAtx(events, context) {
	let contentEnd = events.length - 2;
	let contentStart = 3;
	/** @type {Token} */
	let content;
	/** @type {Token} */
	let text;
	if (events[contentStart][1].type === "whitespace") contentStart += 2;
	if (contentEnd - 2 > contentStart && events[contentEnd][1].type === "whitespace") contentEnd -= 2;
	if (events[contentEnd][1].type === "atxHeadingSequence" && (contentStart === contentEnd - 1 || contentEnd - 4 > contentStart && events[contentEnd - 2][1].type === "whitespace")) contentEnd -= contentStart + 1 === contentEnd ? 2 : 4;
	if (contentEnd > contentStart) {
		content = {
			type: "atxHeadingText",
			start: events[contentStart][1].start,
			end: events[contentEnd][1].end
		};
		text = {
			type: "chunkText",
			start: events[contentStart][1].start,
			end: events[contentEnd][1].end,
			contentType: "text"
		};
		splice(events, contentStart, contentEnd - contentStart + 1, [
			[
				"enter",
				content,
				context
			],
			[
				"enter",
				text,
				context
			],
			[
				"exit",
				text,
				context
			],
			[
				"exit",
				content,
				context
			]
		]);
	}
	return events;
}
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeHeadingAtx(effects, ok, nok) {
	let size = 0;
	return start;
	/**
	* Start of a heading (atx).
	*
	* ```markdown
	* > | ## aa
	*     ^
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		effects.enter("atxHeading");
		return before(code);
	}
	/**
	* After optional whitespace, at `#`.
	*
	* ```markdown
	* > | ## aa
	*     ^
	* ```
	*
	* @type {State}
	*/
	function before(code) {
		effects.enter("atxHeadingSequence");
		return sequenceOpen(code);
	}
	/**
	* In opening sequence.
	*
	* ```markdown
	* > | ## aa
	*     ^
	* ```
	*
	* @type {State}
	*/
	function sequenceOpen(code) {
		if (code === 35 && size++ < 6) {
			effects.consume(code);
			return sequenceOpen;
		}
		if (code === null || markdownLineEndingOrSpace(code)) {
			effects.exit("atxHeadingSequence");
			return atBreak(code);
		}
		return nok(code);
	}
	/**
	* After something, before something else.
	*
	* ```markdown
	* > | ## aa
	*       ^
	* ```
	*
	* @type {State}
	*/
	function atBreak(code) {
		if (code === 35) {
			effects.enter("atxHeadingSequence");
			return sequenceFurther(code);
		}
		if (code === null || markdownLineEnding(code)) {
			effects.exit("atxHeading");
			return ok(code);
		}
		if (markdownSpace(code)) return factorySpace(effects, atBreak, "whitespace")(code);
		effects.enter("atxHeadingText");
		return data(code);
	}
	/**
	* In further sequence (after whitespace).
	*
	* Could be normal “visible” hashes in the heading or a final sequence.
	*
	* ```markdown
	* > | ## aa ##
	*           ^
	* ```
	*
	* @type {State}
	*/
	function sequenceFurther(code) {
		if (code === 35) {
			effects.consume(code);
			return sequenceFurther;
		}
		effects.exit("atxHeadingSequence");
		return atBreak(code);
	}
	/**
	* In text.
	*
	* ```markdown
	* > | ## aa
	*        ^
	* ```
	*
	* @type {State}
	*/
	function data(code) {
		if (code === null || code === 35 || markdownLineEndingOrSpace(code)) {
			effects.exit("atxHeadingText");
			return atBreak(code);
		}
		effects.consume(code);
		return data;
	}
}
//#endregion
//#region ../../node_modules/micromark-util-html-tag-name/index.js
/**
* List of lowercase HTML “block” tag names.
*
* The list, when parsing HTML (flow), results in more relaxed rules (condition
* 6).
* Because they are known blocks, the HTML-like syntax doesn’t have to be
* strictly parsed.
* For tag names not in this list, a more strict algorithm (condition 7) is used
* to detect whether the HTML-like syntax is seen as HTML (flow) or not.
*
* This is copied from:
* <https://spec.commonmark.org/0.30/#html-blocks>.
*
* > 👉 **Note**: `search` was added in `CommonMark@0.31`.
*/
var htmlBlockNames = [
	"address",
	"article",
	"aside",
	"base",
	"basefont",
	"blockquote",
	"body",
	"caption",
	"center",
	"col",
	"colgroup",
	"dd",
	"details",
	"dialog",
	"dir",
	"div",
	"dl",
	"dt",
	"fieldset",
	"figcaption",
	"figure",
	"footer",
	"form",
	"frame",
	"frameset",
	"h1",
	"h2",
	"h3",
	"h4",
	"h5",
	"h6",
	"head",
	"header",
	"hr",
	"html",
	"iframe",
	"legend",
	"li",
	"link",
	"main",
	"menu",
	"menuitem",
	"nav",
	"noframes",
	"ol",
	"optgroup",
	"option",
	"p",
	"param",
	"search",
	"section",
	"summary",
	"table",
	"tbody",
	"td",
	"tfoot",
	"th",
	"thead",
	"title",
	"tr",
	"track",
	"ul"
];
/**
* List of lowercase HTML “raw” tag names.
*
* The list, when parsing HTML (flow), results in HTML that can include lines
* without exiting, until a closing tag also in this list is found (condition
* 1).
*
* This module is copied from:
* <https://spec.commonmark.org/0.30/#html-blocks>.
*
* > 👉 **Note**: `textarea` was added in `CommonMark@0.30`.
*/
var htmlRawNames = [
	"pre",
	"script",
	"style",
	"textarea"
];
//#endregion
//#region ../../node_modules/micromark-core-commonmark/lib/html-flow.js
/**
* @import {
*   Code,
*   Construct,
*   Resolver,
*   State,
*   TokenizeContext,
*   Tokenizer
* } from 'micromark-util-types'
*/
/** @type {Construct} */
var htmlFlow = {
	concrete: true,
	name: "htmlFlow",
	resolveTo: resolveToHtmlFlow,
	tokenize: tokenizeHtmlFlow
};
/** @type {Construct} */
var blankLineBefore = {
	partial: true,
	tokenize: tokenizeBlankLineBefore
};
var nonLazyContinuationStart = {
	partial: true,
	tokenize: tokenizeNonLazyContinuationStart
};
/** @type {Resolver} */
function resolveToHtmlFlow(events) {
	let index = events.length;
	while (index--) if (events[index][0] === "enter" && events[index][1].type === "htmlFlow") break;
	if (index > 1 && events[index - 2][1].type === "linePrefix") {
		events[index][1].start = events[index - 2][1].start;
		events[index + 1][1].start = events[index - 2][1].start;
		events.splice(index - 2, 2);
	}
	return events;
}
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeHtmlFlow(effects, ok, nok) {
	const self = this;
	/** @type {number} */
	let marker;
	/** @type {boolean} */
	let closingTag;
	/** @type {string} */
	let buffer;
	/** @type {number} */
	let index;
	/** @type {Code} */
	let markerB;
	return start;
	/**
	* Start of HTML (flow).
	*
	* ```markdown
	* > | <x />
	*     ^
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		return before(code);
	}
	/**
	* At `<`, after optional whitespace.
	*
	* ```markdown
	* > | <x />
	*     ^
	* ```
	*
	* @type {State}
	*/
	function before(code) {
		effects.enter("htmlFlow");
		effects.enter("htmlFlowData");
		effects.consume(code);
		return open;
	}
	/**
	* After `<`, at tag name or other stuff.
	*
	* ```markdown
	* > | <x />
	*      ^
	* > | <!doctype>
	*      ^
	* > | <!--xxx-->
	*      ^
	* ```
	*
	* @type {State}
	*/
	function open(code) {
		if (code === 33) {
			effects.consume(code);
			return declarationOpen;
		}
		if (code === 47) {
			effects.consume(code);
			closingTag = true;
			return tagCloseStart;
		}
		if (code === 63) {
			effects.consume(code);
			marker = 3;
			return self.interrupt ? ok : continuationDeclarationInside;
		}
		if (asciiAlpha(code)) {
			effects.consume(code);
			buffer = String.fromCharCode(code);
			return tagName;
		}
		return nok(code);
	}
	/**
	* After `<!`, at declaration, comment, or CDATA.
	*
	* ```markdown
	* > | <!doctype>
	*       ^
	* > | <!--xxx-->
	*       ^
	* > | <![CDATA[>&<]]>
	*       ^
	* ```
	*
	* @type {State}
	*/
	function declarationOpen(code) {
		if (code === 45) {
			effects.consume(code);
			marker = 2;
			return commentOpenInside;
		}
		if (code === 91) {
			effects.consume(code);
			marker = 5;
			index = 0;
			return cdataOpenInside;
		}
		if (asciiAlpha(code)) {
			effects.consume(code);
			marker = 4;
			return self.interrupt ? ok : continuationDeclarationInside;
		}
		return nok(code);
	}
	/**
	* After `<!-`, inside a comment, at another `-`.
	*
	* ```markdown
	* > | <!--xxx-->
	*        ^
	* ```
	*
	* @type {State}
	*/
	function commentOpenInside(code) {
		if (code === 45) {
			effects.consume(code);
			return self.interrupt ? ok : continuationDeclarationInside;
		}
		return nok(code);
	}
	/**
	* After `<![`, inside CDATA, expecting `CDATA[`.
	*
	* ```markdown
	* > | <![CDATA[>&<]]>
	*        ^^^^^^
	* ```
	*
	* @type {State}
	*/
	function cdataOpenInside(code) {
		if (code === "CDATA[".charCodeAt(index++)) {
			effects.consume(code);
			if (index === 6) return self.interrupt ? ok : continuation;
			return cdataOpenInside;
		}
		return nok(code);
	}
	/**
	* After `</`, in closing tag, at tag name.
	*
	* ```markdown
	* > | </x>
	*       ^
	* ```
	*
	* @type {State}
	*/
	function tagCloseStart(code) {
		if (asciiAlpha(code)) {
			effects.consume(code);
			buffer = String.fromCharCode(code);
			return tagName;
		}
		return nok(code);
	}
	/**
	* In tag name.
	*
	* ```markdown
	* > | <ab>
	*      ^^
	* > | </ab>
	*       ^^
	* ```
	*
	* @type {State}
	*/
	function tagName(code) {
		if (code === null || code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {
			const slash = code === 47;
			const name = buffer.toLowerCase();
			if (!slash && !closingTag && htmlRawNames.includes(name)) {
				marker = 1;
				return self.interrupt ? ok(code) : continuation(code);
			}
			if (htmlBlockNames.includes(buffer.toLowerCase())) {
				marker = 6;
				if (slash) {
					effects.consume(code);
					return basicSelfClosing;
				}
				return self.interrupt ? ok(code) : continuation(code);
			}
			marker = 7;
			return self.interrupt && !self.parser.lazy[self.now().line] ? nok(code) : closingTag ? completeClosingTagAfter(code) : completeAttributeNameBefore(code);
		}
		if (code === 45 || asciiAlphanumeric(code)) {
			effects.consume(code);
			buffer += String.fromCharCode(code);
			return tagName;
		}
		return nok(code);
	}
	/**
	* After closing slash of a basic tag name.
	*
	* ```markdown
	* > | <div/>
	*          ^
	* ```
	*
	* @type {State}
	*/
	function basicSelfClosing(code) {
		if (code === 62) {
			effects.consume(code);
			return self.interrupt ? ok : continuation;
		}
		return nok(code);
	}
	/**
	* After closing slash of a complete tag name.
	*
	* ```markdown
	* > | <x/>
	*        ^
	* ```
	*
	* @type {State}
	*/
	function completeClosingTagAfter(code) {
		if (markdownSpace(code)) {
			effects.consume(code);
			return completeClosingTagAfter;
		}
		return completeEnd(code);
	}
	/**
	* At an attribute name.
	*
	* At first, this state is used after a complete tag name, after whitespace,
	* where it expects optional attributes or the end of the tag.
	* It is also reused after attributes, when expecting more optional
	* attributes.
	*
	* ```markdown
	* > | <a />
	*        ^
	* > | <a :b>
	*        ^
	* > | <a _b>
	*        ^
	* > | <a b>
	*        ^
	* > | <a >
	*        ^
	* ```
	*
	* @type {State}
	*/
	function completeAttributeNameBefore(code) {
		if (code === 47) {
			effects.consume(code);
			return completeEnd;
		}
		if (code === 58 || code === 95 || asciiAlpha(code)) {
			effects.consume(code);
			return completeAttributeName;
		}
		if (markdownSpace(code)) {
			effects.consume(code);
			return completeAttributeNameBefore;
		}
		return completeEnd(code);
	}
	/**
	* In attribute name.
	*
	* ```markdown
	* > | <a :b>
	*         ^
	* > | <a _b>
	*         ^
	* > | <a b>
	*         ^
	* ```
	*
	* @type {State}
	*/
	function completeAttributeName(code) {
		if (code === 45 || code === 46 || code === 58 || code === 95 || asciiAlphanumeric(code)) {
			effects.consume(code);
			return completeAttributeName;
		}
		return completeAttributeNameAfter(code);
	}
	/**
	* After attribute name, at an optional initializer, the end of the tag, or
	* whitespace.
	*
	* ```markdown
	* > | <a b>
	*         ^
	* > | <a b=c>
	*         ^
	* ```
	*
	* @type {State}
	*/
	function completeAttributeNameAfter(code) {
		if (code === 61) {
			effects.consume(code);
			return completeAttributeValueBefore;
		}
		if (markdownSpace(code)) {
			effects.consume(code);
			return completeAttributeNameAfter;
		}
		return completeAttributeNameBefore(code);
	}
	/**
	* Before unquoted, double quoted, or single quoted attribute value, allowing
	* whitespace.
	*
	* ```markdown
	* > | <a b=c>
	*          ^
	* > | <a b="c">
	*          ^
	* ```
	*
	* @type {State}
	*/
	function completeAttributeValueBefore(code) {
		if (code === null || code === 60 || code === 61 || code === 62 || code === 96) return nok(code);
		if (code === 34 || code === 39) {
			effects.consume(code);
			markerB = code;
			return completeAttributeValueQuoted;
		}
		if (markdownSpace(code)) {
			effects.consume(code);
			return completeAttributeValueBefore;
		}
		return completeAttributeValueUnquoted(code);
	}
	/**
	* In double or single quoted attribute value.
	*
	* ```markdown
	* > | <a b="c">
	*           ^
	* > | <a b='c'>
	*           ^
	* ```
	*
	* @type {State}
	*/
	function completeAttributeValueQuoted(code) {
		if (code === markerB) {
			effects.consume(code);
			markerB = null;
			return completeAttributeValueQuotedAfter;
		}
		if (code === null || markdownLineEnding(code)) return nok(code);
		effects.consume(code);
		return completeAttributeValueQuoted;
	}
	/**
	* In unquoted attribute value.
	*
	* ```markdown
	* > | <a b=c>
	*          ^
	* ```
	*
	* @type {State}
	*/
	function completeAttributeValueUnquoted(code) {
		if (code === null || code === 34 || code === 39 || code === 47 || code === 60 || code === 61 || code === 62 || code === 96 || markdownLineEndingOrSpace(code)) return completeAttributeNameAfter(code);
		effects.consume(code);
		return completeAttributeValueUnquoted;
	}
	/**
	* After double or single quoted attribute value, before whitespace or the
	* end of the tag.
	*
	* ```markdown
	* > | <a b="c">
	*            ^
	* ```
	*
	* @type {State}
	*/
	function completeAttributeValueQuotedAfter(code) {
		if (code === 47 || code === 62 || markdownSpace(code)) return completeAttributeNameBefore(code);
		return nok(code);
	}
	/**
	* In certain circumstances of a complete tag where only an `>` is allowed.
	*
	* ```markdown
	* > | <a b="c">
	*             ^
	* ```
	*
	* @type {State}
	*/
	function completeEnd(code) {
		if (code === 62) {
			effects.consume(code);
			return completeAfter;
		}
		return nok(code);
	}
	/**
	* After `>` in a complete tag.
	*
	* ```markdown
	* > | <x>
	*        ^
	* ```
	*
	* @type {State}
	*/
	function completeAfter(code) {
		if (code === null || markdownLineEnding(code)) return continuation(code);
		if (markdownSpace(code)) {
			effects.consume(code);
			return completeAfter;
		}
		return nok(code);
	}
	/**
	* In continuation of any HTML kind.
	*
	* ```markdown
	* > | <!--xxx-->
	*          ^
	* ```
	*
	* @type {State}
	*/
	function continuation(code) {
		if (code === 45 && marker === 2) {
			effects.consume(code);
			return continuationCommentInside;
		}
		if (code === 60 && marker === 1) {
			effects.consume(code);
			return continuationRawTagOpen;
		}
		if (code === 62 && marker === 4) {
			effects.consume(code);
			return continuationClose;
		}
		if (code === 63 && marker === 3) {
			effects.consume(code);
			return continuationDeclarationInside;
		}
		if (code === 93 && marker === 5) {
			effects.consume(code);
			return continuationCdataInside;
		}
		if (markdownLineEnding(code) && (marker === 6 || marker === 7)) {
			effects.exit("htmlFlowData");
			return effects.check(blankLineBefore, continuationAfter, continuationStart)(code);
		}
		if (code === null || markdownLineEnding(code)) {
			effects.exit("htmlFlowData");
			return continuationStart(code);
		}
		effects.consume(code);
		return continuation;
	}
	/**
	* In continuation, at eol.
	*
	* ```markdown
	* > | <x>
	*        ^
	*   | asd
	* ```
	*
	* @type {State}
	*/
	function continuationStart(code) {
		return effects.check(nonLazyContinuationStart, continuationStartNonLazy, continuationAfter)(code);
	}
	/**
	* In continuation, at eol, before non-lazy content.
	*
	* ```markdown
	* > | <x>
	*        ^
	*   | asd
	* ```
	*
	* @type {State}
	*/
	function continuationStartNonLazy(code) {
		effects.enter("lineEnding");
		effects.consume(code);
		effects.exit("lineEnding");
		return continuationBefore;
	}
	/**
	* In continuation, before non-lazy content.
	*
	* ```markdown
	*   | <x>
	* > | asd
	*     ^
	* ```
	*
	* @type {State}
	*/
	function continuationBefore(code) {
		if (code === null || markdownLineEnding(code)) return continuationStart(code);
		effects.enter("htmlFlowData");
		return continuation(code);
	}
	/**
	* In comment continuation, after one `-`, expecting another.
	*
	* ```markdown
	* > | <!--xxx-->
	*             ^
	* ```
	*
	* @type {State}
	*/
	function continuationCommentInside(code) {
		if (code === 45) {
			effects.consume(code);
			return continuationDeclarationInside;
		}
		return continuation(code);
	}
	/**
	* In raw continuation, after `<`, at `/`.
	*
	* ```markdown
	* > | <script>console.log(1)<\/script>
	*                            ^
	* ```
	*
	* @type {State}
	*/
	function continuationRawTagOpen(code) {
		if (code === 47) {
			effects.consume(code);
			buffer = "";
			return continuationRawEndTag;
		}
		return continuation(code);
	}
	/**
	* In raw continuation, after `</`, in a raw tag name.
	*
	* ```markdown
	* > | <script>console.log(1)<\/script>
	*                             ^^^^^^
	* ```
	*
	* @type {State}
	*/
	function continuationRawEndTag(code) {
		if (code === 62) {
			const name = buffer.toLowerCase();
			if (htmlRawNames.includes(name)) {
				effects.consume(code);
				return continuationClose;
			}
			return continuation(code);
		}
		if (asciiAlpha(code) && buffer.length < 8) {
			effects.consume(code);
			buffer += String.fromCharCode(code);
			return continuationRawEndTag;
		}
		return continuation(code);
	}
	/**
	* In cdata continuation, after `]`, expecting `]>`.
	*
	* ```markdown
	* > | <![CDATA[>&<]]>
	*                  ^
	* ```
	*
	* @type {State}
	*/
	function continuationCdataInside(code) {
		if (code === 93) {
			effects.consume(code);
			return continuationDeclarationInside;
		}
		return continuation(code);
	}
	/**
	* In declaration or instruction continuation, at `>`.
	*
	* ```markdown
	* > | <!-->
	*         ^
	* > | <?>
	*       ^
	* > | <!q>
	*        ^
	* > | <!--ab-->
	*             ^
	* > | <![CDATA[>&<]]>
	*                   ^
	* ```
	*
	* @type {State}
	*/
	function continuationDeclarationInside(code) {
		if (code === 62) {
			effects.consume(code);
			return continuationClose;
		}
		if (code === 45 && marker === 2) {
			effects.consume(code);
			return continuationDeclarationInside;
		}
		return continuation(code);
	}
	/**
	* In closed continuation: everything we get until the eol/eof is part of it.
	*
	* ```markdown
	* > | <!doctype>
	*               ^
	* ```
	*
	* @type {State}
	*/
	function continuationClose(code) {
		if (code === null || markdownLineEnding(code)) {
			effects.exit("htmlFlowData");
			return continuationAfter(code);
		}
		effects.consume(code);
		return continuationClose;
	}
	/**
	* Done.
	*
	* ```markdown
	* > | <!doctype>
	*               ^
	* ```
	*
	* @type {State}
	*/
	function continuationAfter(code) {
		effects.exit("htmlFlow");
		return ok(code);
	}
}
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeNonLazyContinuationStart(effects, ok, nok) {
	const self = this;
	return start;
	/**
	* At eol, before continuation.
	*
	* ```markdown
	* > | * ```js
	*            ^
	*   | b
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		if (markdownLineEnding(code)) {
			effects.enter("lineEnding");
			effects.consume(code);
			effects.exit("lineEnding");
			return after;
		}
		return nok(code);
	}
	/**
	* A continuation.
	*
	* ```markdown
	*   | * ```js
	* > | b
	*     ^
	* ```
	*
	* @type {State}
	*/
	function after(code) {
		return self.parser.lazy[self.now().line] ? nok(code) : ok(code);
	}
}
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeBlankLineBefore(effects, ok, nok) {
	return start;
	/**
	* Before eol, expecting blank line.
	*
	* ```markdown
	* > | <div>
	*          ^
	*   |
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		effects.enter("lineEnding");
		effects.consume(code);
		effects.exit("lineEnding");
		return effects.attempt(blankLine, ok, nok);
	}
}
//#endregion
//#region ../../node_modules/micromark-core-commonmark/lib/html-text.js
/**
* @import {
*   Code,
*   Construct,
*   State,
*   TokenizeContext,
*   Tokenizer
* } from 'micromark-util-types'
*/
/** @type {Construct} */
var htmlText = {
	name: "htmlText",
	tokenize: tokenizeHtmlText
};
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeHtmlText(effects, ok, nok) {
	const self = this;
	/** @type {NonNullable<Code> | undefined} */
	let marker;
	/** @type {number} */
	let index;
	/** @type {State} */
	let returnState;
	return start;
	/**
	* Start of HTML (text).
	*
	* ```markdown
	* > | a <b> c
	*       ^
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		effects.enter("htmlText");
		effects.enter("htmlTextData");
		effects.consume(code);
		return open;
	}
	/**
	* After `<`, at tag name or other stuff.
	*
	* ```markdown
	* > | a <b> c
	*        ^
	* > | a <!doctype> c
	*        ^
	* > | a <!--b--> c
	*        ^
	* ```
	*
	* @type {State}
	*/
	function open(code) {
		if (code === 33) {
			effects.consume(code);
			return declarationOpen;
		}
		if (code === 47) {
			effects.consume(code);
			return tagCloseStart;
		}
		if (code === 63) {
			effects.consume(code);
			return instruction;
		}
		if (asciiAlpha(code)) {
			effects.consume(code);
			return tagOpen;
		}
		return nok(code);
	}
	/**
	* After `<!`, at declaration, comment, or CDATA.
	*
	* ```markdown
	* > | a <!doctype> c
	*         ^
	* > | a <!--b--> c
	*         ^
	* > | a <![CDATA[>&<]]> c
	*         ^
	* ```
	*
	* @type {State}
	*/
	function declarationOpen(code) {
		if (code === 45) {
			effects.consume(code);
			return commentOpenInside;
		}
		if (code === 91) {
			effects.consume(code);
			index = 0;
			return cdataOpenInside;
		}
		if (asciiAlpha(code)) {
			effects.consume(code);
			return declaration;
		}
		return nok(code);
	}
	/**
	* In a comment, after `<!-`, at another `-`.
	*
	* ```markdown
	* > | a <!--b--> c
	*          ^
	* ```
	*
	* @type {State}
	*/
	function commentOpenInside(code) {
		if (code === 45) {
			effects.consume(code);
			return commentEnd;
		}
		return nok(code);
	}
	/**
	* In comment.
	*
	* ```markdown
	* > | a <!--b--> c
	*           ^
	* ```
	*
	* @type {State}
	*/
	function comment(code) {
		if (code === null) return nok(code);
		if (code === 45) {
			effects.consume(code);
			return commentClose;
		}
		if (markdownLineEnding(code)) {
			returnState = comment;
			return lineEndingBefore(code);
		}
		effects.consume(code);
		return comment;
	}
	/**
	* In comment, after `-`.
	*
	* ```markdown
	* > | a <!--b--> c
	*             ^
	* ```
	*
	* @type {State}
	*/
	function commentClose(code) {
		if (code === 45) {
			effects.consume(code);
			return commentEnd;
		}
		return comment(code);
	}
	/**
	* In comment, after `--`.
	*
	* ```markdown
	* > | a <!--b--> c
	*              ^
	* ```
	*
	* @type {State}
	*/
	function commentEnd(code) {
		return code === 62 ? end(code) : code === 45 ? commentClose(code) : comment(code);
	}
	/**
	* After `<![`, in CDATA, expecting `CDATA[`.
	*
	* ```markdown
	* > | a <![CDATA[>&<]]> b
	*          ^^^^^^
	* ```
	*
	* @type {State}
	*/
	function cdataOpenInside(code) {
		if (code === "CDATA[".charCodeAt(index++)) {
			effects.consume(code);
			return index === 6 ? cdata : cdataOpenInside;
		}
		return nok(code);
	}
	/**
	* In CDATA.
	*
	* ```markdown
	* > | a <![CDATA[>&<]]> b
	*                ^^^
	* ```
	*
	* @type {State}
	*/
	function cdata(code) {
		if (code === null) return nok(code);
		if (code === 93) {
			effects.consume(code);
			return cdataClose;
		}
		if (markdownLineEnding(code)) {
			returnState = cdata;
			return lineEndingBefore(code);
		}
		effects.consume(code);
		return cdata;
	}
	/**
	* In CDATA, after `]`, at another `]`.
	*
	* ```markdown
	* > | a <![CDATA[>&<]]> b
	*                    ^
	* ```
	*
	* @type {State}
	*/
	function cdataClose(code) {
		if (code === 93) {
			effects.consume(code);
			return cdataEnd;
		}
		return cdata(code);
	}
	/**
	* In CDATA, after `]]`, at `>`.
	*
	* ```markdown
	* > | a <![CDATA[>&<]]> b
	*                     ^
	* ```
	*
	* @type {State}
	*/
	function cdataEnd(code) {
		if (code === 62) return end(code);
		if (code === 93) {
			effects.consume(code);
			return cdataEnd;
		}
		return cdata(code);
	}
	/**
	* In declaration.
	*
	* ```markdown
	* > | a <!b> c
	*          ^
	* ```
	*
	* @type {State}
	*/
	function declaration(code) {
		if (code === null || code === 62) return end(code);
		if (markdownLineEnding(code)) {
			returnState = declaration;
			return lineEndingBefore(code);
		}
		effects.consume(code);
		return declaration;
	}
	/**
	* In instruction.
	*
	* ```markdown
	* > | a <?b?> c
	*         ^
	* ```
	*
	* @type {State}
	*/
	function instruction(code) {
		if (code === null) return nok(code);
		if (code === 63) {
			effects.consume(code);
			return instructionClose;
		}
		if (markdownLineEnding(code)) {
			returnState = instruction;
			return lineEndingBefore(code);
		}
		effects.consume(code);
		return instruction;
	}
	/**
	* In instruction, after `?`, at `>`.
	*
	* ```markdown
	* > | a <?b?> c
	*           ^
	* ```
	*
	* @type {State}
	*/
	function instructionClose(code) {
		return code === 62 ? end(code) : instruction(code);
	}
	/**
	* After `</`, in closing tag, at tag name.
	*
	* ```markdown
	* > | a </b> c
	*         ^
	* ```
	*
	* @type {State}
	*/
	function tagCloseStart(code) {
		if (asciiAlpha(code)) {
			effects.consume(code);
			return tagClose;
		}
		return nok(code);
	}
	/**
	* After `</x`, in a tag name.
	*
	* ```markdown
	* > | a </b> c
	*          ^
	* ```
	*
	* @type {State}
	*/
	function tagClose(code) {
		if (code === 45 || asciiAlphanumeric(code)) {
			effects.consume(code);
			return tagClose;
		}
		return tagCloseBetween(code);
	}
	/**
	* In closing tag, after tag name.
	*
	* ```markdown
	* > | a </b> c
	*          ^
	* ```
	*
	* @type {State}
	*/
	function tagCloseBetween(code) {
		if (markdownLineEnding(code)) {
			returnState = tagCloseBetween;
			return lineEndingBefore(code);
		}
		if (markdownSpace(code)) {
			effects.consume(code);
			return tagCloseBetween;
		}
		return end(code);
	}
	/**
	* After `<x`, in opening tag name.
	*
	* ```markdown
	* > | a <b> c
	*         ^
	* ```
	*
	* @type {State}
	*/
	function tagOpen(code) {
		if (code === 45 || asciiAlphanumeric(code)) {
			effects.consume(code);
			return tagOpen;
		}
		if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) return tagOpenBetween(code);
		return nok(code);
	}
	/**
	* In opening tag, after tag name.
	*
	* ```markdown
	* > | a <b> c
	*         ^
	* ```
	*
	* @type {State}
	*/
	function tagOpenBetween(code) {
		if (code === 47) {
			effects.consume(code);
			return end;
		}
		if (code === 58 || code === 95 || asciiAlpha(code)) {
			effects.consume(code);
			return tagOpenAttributeName;
		}
		if (markdownLineEnding(code)) {
			returnState = tagOpenBetween;
			return lineEndingBefore(code);
		}
		if (markdownSpace(code)) {
			effects.consume(code);
			return tagOpenBetween;
		}
		return end(code);
	}
	/**
	* In attribute name.
	*
	* ```markdown
	* > | a <b c> d
	*          ^
	* ```
	*
	* @type {State}
	*/
	function tagOpenAttributeName(code) {
		if (code === 45 || code === 46 || code === 58 || code === 95 || asciiAlphanumeric(code)) {
			effects.consume(code);
			return tagOpenAttributeName;
		}
		return tagOpenAttributeNameAfter(code);
	}
	/**
	* After attribute name, before initializer, the end of the tag, or
	* whitespace.
	*
	* ```markdown
	* > | a <b c> d
	*           ^
	* ```
	*
	* @type {State}
	*/
	function tagOpenAttributeNameAfter(code) {
		if (code === 61) {
			effects.consume(code);
			return tagOpenAttributeValueBefore;
		}
		if (markdownLineEnding(code)) {
			returnState = tagOpenAttributeNameAfter;
			return lineEndingBefore(code);
		}
		if (markdownSpace(code)) {
			effects.consume(code);
			return tagOpenAttributeNameAfter;
		}
		return tagOpenBetween(code);
	}
	/**
	* Before unquoted, double quoted, or single quoted attribute value, allowing
	* whitespace.
	*
	* ```markdown
	* > | a <b c=d> e
	*            ^
	* ```
	*
	* @type {State}
	*/
	function tagOpenAttributeValueBefore(code) {
		if (code === null || code === 60 || code === 61 || code === 62 || code === 96) return nok(code);
		if (code === 34 || code === 39) {
			effects.consume(code);
			marker = code;
			return tagOpenAttributeValueQuoted;
		}
		if (markdownLineEnding(code)) {
			returnState = tagOpenAttributeValueBefore;
			return lineEndingBefore(code);
		}
		if (markdownSpace(code)) {
			effects.consume(code);
			return tagOpenAttributeValueBefore;
		}
		effects.consume(code);
		return tagOpenAttributeValueUnquoted;
	}
	/**
	* In double or single quoted attribute value.
	*
	* ```markdown
	* > | a <b c="d"> e
	*             ^
	* ```
	*
	* @type {State}
	*/
	function tagOpenAttributeValueQuoted(code) {
		if (code === marker) {
			effects.consume(code);
			marker = void 0;
			return tagOpenAttributeValueQuotedAfter;
		}
		if (code === null) return nok(code);
		if (markdownLineEnding(code)) {
			returnState = tagOpenAttributeValueQuoted;
			return lineEndingBefore(code);
		}
		effects.consume(code);
		return tagOpenAttributeValueQuoted;
	}
	/**
	* In unquoted attribute value.
	*
	* ```markdown
	* > | a <b c=d> e
	*            ^
	* ```
	*
	* @type {State}
	*/
	function tagOpenAttributeValueUnquoted(code) {
		if (code === null || code === 34 || code === 39 || code === 60 || code === 61 || code === 96) return nok(code);
		if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) return tagOpenBetween(code);
		effects.consume(code);
		return tagOpenAttributeValueUnquoted;
	}
	/**
	* After double or single quoted attribute value, before whitespace or the end
	* of the tag.
	*
	* ```markdown
	* > | a <b c="d"> e
	*               ^
	* ```
	*
	* @type {State}
	*/
	function tagOpenAttributeValueQuotedAfter(code) {
		if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) return tagOpenBetween(code);
		return nok(code);
	}
	/**
	* In certain circumstances of a tag where only an `>` is allowed.
	*
	* ```markdown
	* > | a <b c="d"> e
	*               ^
	* ```
	*
	* @type {State}
	*/
	function end(code) {
		if (code === 62) {
			effects.consume(code);
			effects.exit("htmlTextData");
			effects.exit("htmlText");
			return ok;
		}
		return nok(code);
	}
	/**
	* At eol.
	*
	* > 👉 **Note**: we can’t have blank lines in text, so no need to worry about
	* > empty tokens.
	*
	* ```markdown
	* > | a <!--a
	*            ^
	*   | b-->
	* ```
	*
	* @type {State}
	*/
	function lineEndingBefore(code) {
		effects.exit("htmlTextData");
		effects.enter("lineEnding");
		effects.consume(code);
		effects.exit("lineEnding");
		return lineEndingAfter;
	}
	/**
	* After eol, at optional whitespace.
	*
	* > 👉 **Note**: we can’t have blank lines in text, so no need to worry about
	* > empty tokens.
	*
	* ```markdown
	*   | a <!--a
	* > | b-->
	*     ^
	* ```
	*
	* @type {State}
	*/
	function lineEndingAfter(code) {
		return markdownSpace(code) ? factorySpace(effects, lineEndingAfterPrefix, "linePrefix", self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(code) : lineEndingAfterPrefix(code);
	}
	/**
	* After eol, after optional whitespace.
	*
	* > 👉 **Note**: we can’t have blank lines in text, so no need to worry about
	* > empty tokens.
	*
	* ```markdown
	*   | a <!--a
	* > | b-->
	*     ^
	* ```
	*
	* @type {State}
	*/
	function lineEndingAfterPrefix(code) {
		effects.enter("htmlTextData");
		return returnState(code);
	}
}
//#endregion
//#region ../../node_modules/micromark-core-commonmark/lib/label-end.js
/**
* @import {
*   Construct,
*   Event,
*   Resolver,
*   State,
*   TokenizeContext,
*   Tokenizer,
*   Token
* } from 'micromark-util-types'
*/
/** @type {Construct} */
var labelEnd = {
	name: "labelEnd",
	resolveAll: resolveAllLabelEnd,
	resolveTo: resolveToLabelEnd,
	tokenize: tokenizeLabelEnd
};
/** @type {Construct} */
var resourceConstruct = { tokenize: tokenizeResource };
/** @type {Construct} */
var referenceFullConstruct = { tokenize: tokenizeReferenceFull };
/** @type {Construct} */
var referenceCollapsedConstruct = { tokenize: tokenizeReferenceCollapsed };
/** @type {Resolver} */
function resolveAllLabelEnd(events) {
	let index = -1;
	/** @type {Array<Event>} */
	const newEvents = [];
	while (++index < events.length) {
		const token = events[index][1];
		newEvents.push(events[index]);
		if (token.type === "labelImage" || token.type === "labelLink" || token.type === "labelEnd") {
			const offset = token.type === "labelImage" ? 4 : 2;
			token.type = "data";
			index += offset;
		}
	}
	if (events.length !== newEvents.length) splice(events, 0, events.length, newEvents);
	return events;
}
/** @type {Resolver} */
function resolveToLabelEnd(events, context) {
	let index = events.length;
	let offset = 0;
	/** @type {Token} */
	let token;
	/** @type {number | undefined} */
	let open;
	/** @type {number | undefined} */
	let close;
	/** @type {Array<Event>} */
	let media;
	while (index--) {
		token = events[index][1];
		if (open) {
			if (token.type === "link" || token.type === "labelLink" && token._inactive) break;
			if (events[index][0] === "enter" && token.type === "labelLink") token._inactive = true;
		} else if (close) {
			if (events[index][0] === "enter" && (token.type === "labelImage" || token.type === "labelLink") && !token._balanced) {
				open = index;
				if (token.type !== "labelLink") {
					offset = 2;
					break;
				}
			}
		} else if (token.type === "labelEnd") close = index;
	}
	const group = {
		type: events[open][1].type === "labelLink" ? "link" : "image",
		start: { ...events[open][1].start },
		end: { ...events[events.length - 1][1].end }
	};
	const label = {
		type: "label",
		start: { ...events[open][1].start },
		end: { ...events[close][1].end }
	};
	const text = {
		type: "labelText",
		start: { ...events[open + offset + 2][1].end },
		end: { ...events[close - 2][1].start }
	};
	media = [[
		"enter",
		group,
		context
	], [
		"enter",
		label,
		context
	]];
	media = push(media, events.slice(open + 1, open + offset + 3));
	media = push(media, [[
		"enter",
		text,
		context
	]]);
	media = push(media, resolveAll(context.parser.constructs.insideSpan.null, events.slice(open + offset + 4, close - 3), context));
	media = push(media, [
		[
			"exit",
			text,
			context
		],
		events[close - 2],
		events[close - 1],
		[
			"exit",
			label,
			context
		]
	]);
	media = push(media, events.slice(close + 1));
	media = push(media, [[
		"exit",
		group,
		context
	]]);
	splice(events, open, events.length, media);
	return events;
}
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeLabelEnd(effects, ok, nok) {
	const self = this;
	let index = self.events.length;
	/** @type {Token} */
	let labelStart;
	/** @type {boolean} */
	let defined;
	while (index--) if ((self.events[index][1].type === "labelImage" || self.events[index][1].type === "labelLink") && !self.events[index][1]._balanced) {
		labelStart = self.events[index][1];
		break;
	}
	return start;
	/**
	* Start of label end.
	*
	* ```markdown
	* > | [a](b) c
	*       ^
	* > | [a][b] c
	*       ^
	* > | [a][] b
	*       ^
	* > | [a] b
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		if (!labelStart) return nok(code);
		if (labelStart._inactive) return labelEndNok(code);
		defined = self.parser.defined.includes(normalizeIdentifier(self.sliceSerialize({
			start: labelStart.end,
			end: self.now()
		})));
		effects.enter("labelEnd");
		effects.enter("labelMarker");
		effects.consume(code);
		effects.exit("labelMarker");
		effects.exit("labelEnd");
		return after;
	}
	/**
	* After `]`.
	*
	* ```markdown
	* > | [a](b) c
	*       ^
	* > | [a][b] c
	*       ^
	* > | [a][] b
	*       ^
	* > | [a] b
	*       ^
	* ```
	*
	* @type {State}
	*/
	function after(code) {
		if (code === 40) return effects.attempt(resourceConstruct, labelEndOk, defined ? labelEndOk : labelEndNok)(code);
		if (code === 91) return effects.attempt(referenceFullConstruct, labelEndOk, defined ? referenceNotFull : labelEndNok)(code);
		return defined ? labelEndOk(code) : labelEndNok(code);
	}
	/**
	* After `]`, at `[`, but not at a full reference.
	*
	* > 👉 **Note**: we only get here if the label is defined.
	*
	* ```markdown
	* > | [a][] b
	*        ^
	* > | [a] b
	*        ^
	* ```
	*
	* @type {State}
	*/
	function referenceNotFull(code) {
		return effects.attempt(referenceCollapsedConstruct, labelEndOk, labelEndNok)(code);
	}
	/**
	* Done, we found something.
	*
	* ```markdown
	* > | [a](b) c
	*           ^
	* > | [a][b] c
	*           ^
	* > | [a][] b
	*          ^
	* > | [a] b
	*        ^
	* ```
	*
	* @type {State}
	*/
	function labelEndOk(code) {
		return ok(code);
	}
	/**
	* Done, it’s nothing.
	*
	* There was an okay opening, but we didn’t match anything.
	*
	* ```markdown
	* > | [a](b c
	*        ^
	* > | [a][b c
	*        ^
	* > | [a] b
	*        ^
	* ```
	*
	* @type {State}
	*/
	function labelEndNok(code) {
		labelStart._balanced = true;
		return nok(code);
	}
}
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeResource(effects, ok, nok) {
	return resourceStart;
	/**
	* At a resource.
	*
	* ```markdown
	* > | [a](b) c
	*        ^
	* ```
	*
	* @type {State}
	*/
	function resourceStart(code) {
		effects.enter("resource");
		effects.enter("resourceMarker");
		effects.consume(code);
		effects.exit("resourceMarker");
		return resourceBefore;
	}
	/**
	* In resource, after `(`, at optional whitespace.
	*
	* ```markdown
	* > | [a](b) c
	*         ^
	* ```
	*
	* @type {State}
	*/
	function resourceBefore(code) {
		return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceOpen)(code) : resourceOpen(code);
	}
	/**
	* In resource, after optional whitespace, at `)` or a destination.
	*
	* ```markdown
	* > | [a](b) c
	*         ^
	* ```
	*
	* @type {State}
	*/
	function resourceOpen(code) {
		if (code === 41) return resourceEnd(code);
		return factoryDestination(effects, resourceDestinationAfter, resourceDestinationMissing, "resourceDestination", "resourceDestinationLiteral", "resourceDestinationLiteralMarker", "resourceDestinationRaw", "resourceDestinationString", 32)(code);
	}
	/**
	* In resource, after destination, at optional whitespace.
	*
	* ```markdown
	* > | [a](b) c
	*          ^
	* ```
	*
	* @type {State}
	*/
	function resourceDestinationAfter(code) {
		return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceBetween)(code) : resourceEnd(code);
	}
	/**
	* At invalid destination.
	*
	* ```markdown
	* > | [a](<<) b
	*         ^
	* ```
	*
	* @type {State}
	*/
	function resourceDestinationMissing(code) {
		return nok(code);
	}
	/**
	* In resource, after destination and whitespace, at `(` or title.
	*
	* ```markdown
	* > | [a](b ) c
	*           ^
	* ```
	*
	* @type {State}
	*/
	function resourceBetween(code) {
		if (code === 34 || code === 39 || code === 40) return factoryTitle(effects, resourceTitleAfter, nok, "resourceTitle", "resourceTitleMarker", "resourceTitleString")(code);
		return resourceEnd(code);
	}
	/**
	* In resource, after title, at optional whitespace.
	*
	* ```markdown
	* > | [a](b "c") d
	*              ^
	* ```
	*
	* @type {State}
	*/
	function resourceTitleAfter(code) {
		return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceEnd)(code) : resourceEnd(code);
	}
	/**
	* In resource, at `)`.
	*
	* ```markdown
	* > | [a](b) d
	*          ^
	* ```
	*
	* @type {State}
	*/
	function resourceEnd(code) {
		if (code === 41) {
			effects.enter("resourceMarker");
			effects.consume(code);
			effects.exit("resourceMarker");
			effects.exit("resource");
			return ok;
		}
		return nok(code);
	}
}
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeReferenceFull(effects, ok, nok) {
	const self = this;
	return referenceFull;
	/**
	* In a reference (full), at the `[`.
	*
	* ```markdown
	* > | [a][b] d
	*        ^
	* ```
	*
	* @type {State}
	*/
	function referenceFull(code) {
		return factoryLabel.call(self, effects, referenceFullAfter, referenceFullMissing, "reference", "referenceMarker", "referenceString")(code);
	}
	/**
	* In a reference (full), after `]`.
	*
	* ```markdown
	* > | [a][b] d
	*          ^
	* ```
	*
	* @type {State}
	*/
	function referenceFullAfter(code) {
		return self.parser.defined.includes(normalizeIdentifier(self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1))) ? ok(code) : nok(code);
	}
	/**
	* In reference (full) that was missing.
	*
	* ```markdown
	* > | [a][b d
	*        ^
	* ```
	*
	* @type {State}
	*/
	function referenceFullMissing(code) {
		return nok(code);
	}
}
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeReferenceCollapsed(effects, ok, nok) {
	return referenceCollapsedStart;
	/**
	* In reference (collapsed), at `[`.
	*
	* > 👉 **Note**: we only get here if the label is defined.
	*
	* ```markdown
	* > | [a][] d
	*        ^
	* ```
	*
	* @type {State}
	*/
	function referenceCollapsedStart(code) {
		effects.enter("reference");
		effects.enter("referenceMarker");
		effects.consume(code);
		effects.exit("referenceMarker");
		return referenceCollapsedOpen;
	}
	/**
	* In reference (collapsed), at `]`.
	*
	* > 👉 **Note**: we only get here if the label is defined.
	*
	* ```markdown
	* > | [a][] d
	*         ^
	* ```
	*
	*  @type {State}
	*/
	function referenceCollapsedOpen(code) {
		if (code === 93) {
			effects.enter("referenceMarker");
			effects.consume(code);
			effects.exit("referenceMarker");
			effects.exit("reference");
			return ok;
		}
		return nok(code);
	}
}
//#endregion
//#region ../../node_modules/micromark-core-commonmark/lib/label-start-image.js
/**
* @import {
*   Construct,
*   State,
*   TokenizeContext,
*   Tokenizer
* } from 'micromark-util-types'
*/
/** @type {Construct} */
var labelStartImage = {
	name: "labelStartImage",
	resolveAll: labelEnd.resolveAll,
	tokenize: tokenizeLabelStartImage
};
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeLabelStartImage(effects, ok, nok) {
	const self = this;
	return start;
	/**
	* Start of label (image) start.
	*
	* ```markdown
	* > | a ![b] c
	*       ^
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		effects.enter("labelImage");
		effects.enter("labelImageMarker");
		effects.consume(code);
		effects.exit("labelImageMarker");
		return open;
	}
	/**
	* After `!`, at `[`.
	*
	* ```markdown
	* > | a ![b] c
	*        ^
	* ```
	*
	* @type {State}
	*/
	function open(code) {
		if (code === 91) {
			effects.enter("labelMarker");
			effects.consume(code);
			effects.exit("labelMarker");
			effects.exit("labelImage");
			return after;
		}
		return nok(code);
	}
	/**
	* After `![`.
	*
	* ```markdown
	* > | a ![b] c
	*         ^
	* ```
	*
	* This is needed in because, when GFM footnotes are enabled, images never
	* form when started with a `^`.
	* Instead, links form:
	*
	* ```markdown
	* ![^a](b)
	*
	* ![^a][b]
	*
	* [b]: c
	* ```
	*
	* ```html
	* <p>!<a href=\"b\">^a</a></p>
	* <p>!<a href=\"c\">^a</a></p>
	* ```
	*
	* @type {State}
	*/
	function after(code) {
		/* c8 ignore next 3 */
		return code === 94 && "_hiddenFootnoteSupport" in self.parser.constructs ? nok(code) : ok(code);
	}
}
//#endregion
//#region ../../node_modules/micromark-core-commonmark/lib/label-start-link.js
/**
* @import {
*   Construct,
*   State,
*   TokenizeContext,
*   Tokenizer
* } from 'micromark-util-types'
*/
/** @type {Construct} */
var labelStartLink = {
	name: "labelStartLink",
	resolveAll: labelEnd.resolveAll,
	tokenize: tokenizeLabelStartLink
};
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeLabelStartLink(effects, ok, nok) {
	const self = this;
	return start;
	/**
	* Start of label (link) start.
	*
	* ```markdown
	* > | a [b] c
	*       ^
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		effects.enter("labelLink");
		effects.enter("labelMarker");
		effects.consume(code);
		effects.exit("labelMarker");
		effects.exit("labelLink");
		return after;
	}
	/** @type {State} */
	function after(code) {
		/* c8 ignore next 3 */
		return code === 94 && "_hiddenFootnoteSupport" in self.parser.constructs ? nok(code) : ok(code);
	}
}
//#endregion
//#region ../../node_modules/micromark-core-commonmark/lib/line-ending.js
/**
* @import {
*   Construct,
*   State,
*   TokenizeContext,
*   Tokenizer
* } from 'micromark-util-types'
*/
/** @type {Construct} */
var lineEnding = {
	name: "lineEnding",
	tokenize: tokenizeLineEnding
};
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeLineEnding(effects, ok) {
	return start;
	/** @type {State} */
	function start(code) {
		effects.enter("lineEnding");
		effects.consume(code);
		effects.exit("lineEnding");
		return factorySpace(effects, ok, "linePrefix");
	}
}
//#endregion
//#region ../../node_modules/micromark-core-commonmark/lib/thematic-break.js
/**
* @import {
*   Code,
*   Construct,
*   State,
*   TokenizeContext,
*   Tokenizer
* } from 'micromark-util-types'
*/
/** @type {Construct} */
var thematicBreak$2 = {
	name: "thematicBreak",
	tokenize: tokenizeThematicBreak
};
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeThematicBreak(effects, ok, nok) {
	let size = 0;
	/** @type {NonNullable<Code>} */
	let marker;
	return start;
	/**
	* Start of thematic break.
	*
	* ```markdown
	* > | ***
	*     ^
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		effects.enter("thematicBreak");
		return before(code);
	}
	/**
	* After optional whitespace, at marker.
	*
	* ```markdown
	* > | ***
	*     ^
	* ```
	*
	* @type {State}
	*/
	function before(code) {
		marker = code;
		return atBreak(code);
	}
	/**
	* After something, before something else.
	*
	* ```markdown
	* > | ***
	*     ^
	* ```
	*
	* @type {State}
	*/
	function atBreak(code) {
		if (code === marker) {
			effects.enter("thematicBreakSequence");
			return sequence(code);
		}
		if (size >= 3 && (code === null || markdownLineEnding(code))) {
			effects.exit("thematicBreak");
			return ok(code);
		}
		return nok(code);
	}
	/**
	* In sequence.
	*
	* ```markdown
	* > | ***
	*     ^
	* ```
	*
	* @type {State}
	*/
	function sequence(code) {
		if (code === marker) {
			effects.consume(code);
			size++;
			return sequence;
		}
		effects.exit("thematicBreakSequence");
		return markdownSpace(code) ? factorySpace(effects, atBreak, "whitespace")(code) : atBreak(code);
	}
}
//#endregion
//#region ../../node_modules/micromark-core-commonmark/lib/list.js
/**
* @import {
*   Code,
*   Construct,
*   Exiter,
*   State,
*   TokenizeContext,
*   Tokenizer
* } from 'micromark-util-types'
*/
/** @type {Construct} */
var list$2 = {
	continuation: { tokenize: tokenizeListContinuation },
	exit: tokenizeListEnd,
	name: "list",
	tokenize: tokenizeListStart
};
/** @type {Construct} */
var listItemPrefixWhitespaceConstruct = {
	partial: true,
	tokenize: tokenizeListItemPrefixWhitespace
};
/** @type {Construct} */
var indentConstruct = {
	partial: true,
	tokenize: tokenizeIndent$1
};
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeListStart(effects, ok, nok) {
	const self = this;
	const tail = self.events[self.events.length - 1];
	let initialSize = tail && tail[1].type === "linePrefix" ? tail[2].sliceSerialize(tail[1], true).length : 0;
	let size = 0;
	return start;
	/** @type {State} */
	function start(code) {
		const kind = self.containerState.type || (code === 42 || code === 43 || code === 45 ? "listUnordered" : "listOrdered");
		if (kind === "listUnordered" ? !self.containerState.marker || code === self.containerState.marker : asciiDigit(code)) {
			if (!self.containerState.type) {
				self.containerState.type = kind;
				effects.enter(kind, { _container: true });
			}
			if (kind === "listUnordered") {
				effects.enter("listItemPrefix");
				return code === 42 || code === 45 ? effects.check(thematicBreak$2, nok, atMarker)(code) : atMarker(code);
			}
			if (!self.interrupt || code === 49) {
				effects.enter("listItemPrefix");
				effects.enter("listItemValue");
				return inside(code);
			}
		}
		return nok(code);
	}
	/** @type {State} */
	function inside(code) {
		if (asciiDigit(code) && ++size < 10) {
			effects.consume(code);
			return inside;
		}
		if ((!self.interrupt || size < 2) && (self.containerState.marker ? code === self.containerState.marker : code === 41 || code === 46)) {
			effects.exit("listItemValue");
			return atMarker(code);
		}
		return nok(code);
	}
	/**
	* @type {State}
	**/
	function atMarker(code) {
		effects.enter("listItemMarker");
		effects.consume(code);
		effects.exit("listItemMarker");
		self.containerState.marker = self.containerState.marker || code;
		return effects.check(blankLine, self.interrupt ? nok : onBlank, effects.attempt(listItemPrefixWhitespaceConstruct, endOfPrefix, otherPrefix));
	}
	/** @type {State} */
	function onBlank(code) {
		self.containerState.initialBlankLine = true;
		initialSize++;
		return endOfPrefix(code);
	}
	/** @type {State} */
	function otherPrefix(code) {
		if (markdownSpace(code)) {
			effects.enter("listItemPrefixWhitespace");
			effects.consume(code);
			effects.exit("listItemPrefixWhitespace");
			return endOfPrefix;
		}
		return nok(code);
	}
	/** @type {State} */
	function endOfPrefix(code) {
		self.containerState.size = initialSize + self.sliceSerialize(effects.exit("listItemPrefix"), true).length;
		return ok(code);
	}
}
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeListContinuation(effects, ok, nok) {
	const self = this;
	self.containerState._closeFlow = void 0;
	return effects.check(blankLine, onBlank, notBlank);
	/** @type {State} */
	function onBlank(code) {
		self.containerState.furtherBlankLines = self.containerState.furtherBlankLines || self.containerState.initialBlankLine;
		return factorySpace(effects, ok, "listItemIndent", self.containerState.size + 1)(code);
	}
	/** @type {State} */
	function notBlank(code) {
		if (self.containerState.furtherBlankLines || !markdownSpace(code)) {
			self.containerState.furtherBlankLines = void 0;
			self.containerState.initialBlankLine = void 0;
			return notInCurrentItem(code);
		}
		self.containerState.furtherBlankLines = void 0;
		self.containerState.initialBlankLine = void 0;
		return effects.attempt(indentConstruct, ok, notInCurrentItem)(code);
	}
	/** @type {State} */
	function notInCurrentItem(code) {
		self.containerState._closeFlow = true;
		self.interrupt = void 0;
		return factorySpace(effects, effects.attempt(list$2, ok, nok), "linePrefix", self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(code);
	}
}
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeIndent$1(effects, ok, nok) {
	const self = this;
	return factorySpace(effects, afterPrefix, "listItemIndent", self.containerState.size + 1);
	/** @type {State} */
	function afterPrefix(code) {
		const tail = self.events[self.events.length - 1];
		return tail && tail[1].type === "listItemIndent" && tail[2].sliceSerialize(tail[1], true).length === self.containerState.size ? ok(code) : nok(code);
	}
}
/**
* @this {TokenizeContext}
*   Context.
* @type {Exiter}
*/
function tokenizeListEnd(effects) {
	effects.exit(this.containerState.type);
}
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeListItemPrefixWhitespace(effects, ok, nok) {
	const self = this;
	return factorySpace(effects, afterPrefix, "listItemPrefixWhitespace", self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 5);
	/** @type {State} */
	function afterPrefix(code) {
		const tail = self.events[self.events.length - 1];
		return !markdownSpace(code) && tail && tail[1].type === "listItemPrefixWhitespace" ? ok(code) : nok(code);
	}
}
//#endregion
//#region ../../node_modules/micromark-core-commonmark/lib/setext-underline.js
/**
* @import {
*   Code,
*   Construct,
*   Resolver,
*   State,
*   TokenizeContext,
*   Tokenizer
* } from 'micromark-util-types'
*/
/** @type {Construct} */
var setextUnderline = {
	name: "setextUnderline",
	resolveTo: resolveToSetextUnderline,
	tokenize: tokenizeSetextUnderline
};
/** @type {Resolver} */
function resolveToSetextUnderline(events, context) {
	let index = events.length;
	/** @type {number | undefined} */
	let content;
	/** @type {number | undefined} */
	let text;
	/** @type {number | undefined} */
	let definition;
	while (index--) if (events[index][0] === "enter") {
		if (events[index][1].type === "content") {
			content = index;
			break;
		}
		if (events[index][1].type === "paragraph") text = index;
	} else {
		if (events[index][1].type === "content") events.splice(index, 1);
		if (!definition && events[index][1].type === "definition") definition = index;
	}
	const heading = {
		type: "setextHeading",
		start: { ...events[content][1].start },
		end: { ...events[events.length - 1][1].end }
	};
	events[text][1].type = "setextHeadingText";
	if (definition) {
		events.splice(text, 0, [
			"enter",
			heading,
			context
		]);
		events.splice(definition + 1, 0, [
			"exit",
			events[content][1],
			context
		]);
		events[content][1].end = { ...events[definition][1].end };
	} else events[content][1] = heading;
	events.push([
		"exit",
		heading,
		context
	]);
	return events;
}
/**
* @this {TokenizeContext}
*   Context.
* @type {Tokenizer}
*/
function tokenizeSetextUnderline(effects, ok, nok) {
	const self = this;
	/** @type {NonNullable<Code>} */
	let marker;
	return start;
	/**
	* At start of heading (setext) underline.
	*
	* ```markdown
	*   | aa
	* > | ==
	*     ^
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		let index = self.events.length;
		/** @type {boolean | undefined} */
		let paragraph;
		while (index--) if (self.events[index][1].type !== "lineEnding" && self.events[index][1].type !== "linePrefix" && self.events[index][1].type !== "content") {
			paragraph = self.events[index][1].type === "paragraph";
			break;
		}
		if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) {
			effects.enter("setextHeadingLine");
			marker = code;
			return before(code);
		}
		return nok(code);
	}
	/**
	* After optional whitespace, at `-` or `=`.
	*
	* ```markdown
	*   | aa
	* > | ==
	*     ^
	* ```
	*
	* @type {State}
	*/
	function before(code) {
		effects.enter("setextHeadingLineSequence");
		return inside(code);
	}
	/**
	* In sequence.
	*
	* ```markdown
	*   | aa
	* > | ==
	*     ^
	* ```
	*
	* @type {State}
	*/
	function inside(code) {
		if (code === marker) {
			effects.consume(code);
			return inside;
		}
		effects.exit("setextHeadingLineSequence");
		return markdownSpace(code) ? factorySpace(effects, after, "lineSuffix")(code) : after(code);
	}
	/**
	* After sequence, after optional whitespace.
	*
	* ```markdown
	*   | aa
	* > | ==
	*       ^
	* ```
	*
	* @type {State}
	*/
	function after(code) {
		if (code === null || markdownLineEnding(code)) {
			effects.exit("setextHeadingLine");
			return ok(code);
		}
		return nok(code);
	}
}
//#endregion
//#region ../../node_modules/micromark/lib/initialize/flow.js
/**
* @import {
*   InitialConstruct,
*   Initializer,
*   State,
*   TokenizeContext
* } from 'micromark-util-types'
*/
/** @type {InitialConstruct} */
var flow$1 = { tokenize: initializeFlow };
/**
* @this {TokenizeContext}
*   Self.
* @type {Initializer}
*   Initializer.
*/
function initializeFlow(effects) {
	const self = this;
	const initial = effects.attempt(blankLine, atBlankEnding, effects.attempt(this.parser.constructs.flowInitial, afterConstruct, factorySpace(effects, effects.attempt(this.parser.constructs.flow, afterConstruct, effects.attempt(content, afterConstruct)), "linePrefix")));
	return initial;
	/** @type {State} */
	function atBlankEnding(code) {
		if (code === null) {
			effects.consume(code);
			return;
		}
		effects.enter("lineEndingBlank");
		effects.consume(code);
		effects.exit("lineEndingBlank");
		self.currentConstruct = void 0;
		return initial;
	}
	/** @type {State} */
	function afterConstruct(code) {
		if (code === null) {
			effects.consume(code);
			return;
		}
		effects.enter("lineEnding");
		effects.consume(code);
		effects.exit("lineEnding");
		self.currentConstruct = void 0;
		return initial;
	}
}
//#endregion
//#region ../../node_modules/micromark/lib/initialize/text.js
/**
* @import {
*   Code,
*   InitialConstruct,
*   Initializer,
*   Resolver,
*   State,
*   TokenizeContext
* } from 'micromark-util-types'
*/
var resolver = { resolveAll: createResolver() };
var string$1 = initializeFactory("string");
var text$4 = initializeFactory("text");
/**
* @param {'string' | 'text'} field
*   Field.
* @returns {InitialConstruct}
*   Construct.
*/
function initializeFactory(field) {
	return {
		resolveAll: createResolver(field === "text" ? resolveAllLineSuffixes : void 0),
		tokenize: initializeText
	};
	/**
	* @this {TokenizeContext}
	*   Context.
	* @type {Initializer}
	*/
	function initializeText(effects) {
		const self = this;
		const constructs = this.parser.constructs[field];
		const text = effects.attempt(constructs, start, notText);
		return start;
		/** @type {State} */
		function start(code) {
			return atBreak(code) ? text(code) : notText(code);
		}
		/** @type {State} */
		function notText(code) {
			if (code === null) {
				effects.consume(code);
				return;
			}
			effects.enter("data");
			effects.consume(code);
			return data;
		}
		/** @type {State} */
		function data(code) {
			if (atBreak(code)) {
				effects.exit("data");
				return text(code);
			}
			effects.consume(code);
			return data;
		}
		/**
		* @param {Code} code
		*   Code.
		* @returns {boolean}
		*   Whether the code is a break.
		*/
		function atBreak(code) {
			if (code === null) return true;
			const list = constructs[code];
			let index = -1;
			if (list) while (++index < list.length) {
				const item = list[index];
				if (!item.previous || item.previous.call(self, self.previous)) return true;
			}
			return false;
		}
	}
}
/**
* @param {Resolver | undefined} [extraResolver]
*   Resolver.
* @returns {Resolver}
*   Resolver.
*/
function createResolver(extraResolver) {
	return resolveAllText;
	/** @type {Resolver} */
	function resolveAllText(events, context) {
		let index = -1;
		/** @type {number | undefined} */
		let enter;
		while (++index <= events.length) if (enter === void 0) {
			if (events[index] && events[index][1].type === "data") {
				enter = index;
				index++;
			}
		} else if (!events[index] || events[index][1].type !== "data") {
			if (index !== enter + 2) {
				events[enter][1].end = events[index - 1][1].end;
				events.splice(enter + 2, index - enter - 2);
				index = enter + 2;
			}
			enter = void 0;
		}
		return extraResolver ? extraResolver(events, context) : events;
	}
}
/**
* A rather ugly set of instructions which again looks at chunks in the input
* stream.
* The reason to do this here is that it is *much* faster to parse in reverse.
* And that we can’t hook into `null` to split the line suffix before an EOF.
* To do: figure out if we can make this into a clean utility, or even in core.
* As it will be useful for GFMs literal autolink extension (and maybe even
* tables?)
*
* @type {Resolver}
*/
function resolveAllLineSuffixes(events, context) {
	let eventIndex = 0;
	while (++eventIndex <= events.length) if ((eventIndex === events.length || events[eventIndex][1].type === "lineEnding") && events[eventIndex - 1][1].type === "data") {
		const data = events[eventIndex - 1][1];
		const chunks = context.sliceStream(data);
		let index = chunks.length;
		let bufferIndex = -1;
		let size = 0;
		/** @type {boolean | undefined} */
		let tabs;
		while (index--) {
			const chunk = chunks[index];
			if (typeof chunk === "string") {
				bufferIndex = chunk.length;
				while (chunk.charCodeAt(bufferIndex - 1) === 32) {
					size++;
					bufferIndex--;
				}
				if (bufferIndex) break;
				bufferIndex = -1;
			} else if (chunk === -2) {
				tabs = true;
				size++;
			} else if (chunk === -1) {} else {
				index++;
				break;
			}
		}
		if (context._contentTypeTextTrailing && eventIndex === events.length) size = 0;
		if (size) {
			const token = {
				type: eventIndex === events.length || tabs || size < 2 ? "lineSuffix" : "hardBreakTrailing",
				start: {
					_bufferIndex: index ? bufferIndex : data.start._bufferIndex + bufferIndex,
					_index: data.start._index + index,
					line: data.end.line,
					column: data.end.column - size,
					offset: data.end.offset - size
				},
				end: { ...data.end }
			};
			data.end = { ...token.start };
			if (data.start.offset === data.end.offset) Object.assign(data, token);
			else {
				events.splice(eventIndex, 0, [
					"enter",
					token,
					context
				], [
					"exit",
					token,
					context
				]);
				eventIndex += 2;
			}
		}
		eventIndex++;
	}
	return events;
}
//#endregion
//#region ../../node_modules/micromark/lib/constructs.js
/**
* @import {Extension} from 'micromark-util-types'
*/
var constructs_exports = /* @__PURE__ */ __exportAll({
	attentionMarkers: () => attentionMarkers,
	contentInitial: () => contentInitial,
	disable: () => disable,
	document: () => document$1,
	flow: () => flow,
	flowInitial: () => flowInitial,
	insideSpan: () => insideSpan,
	string: () => string,
	text: () => text$3
});
/** @satisfies {Extension['document']} */
var document$1 = {
	[42]: list$2,
	[43]: list$2,
	[45]: list$2,
	[48]: list$2,
	[49]: list$2,
	[50]: list$2,
	[51]: list$2,
	[52]: list$2,
	[53]: list$2,
	[54]: list$2,
	[55]: list$2,
	[56]: list$2,
	[57]: list$2,
	[62]: blockQuote
};
/** @satisfies {Extension['contentInitial']} */
var contentInitial = { [91]: definition$1 };
/** @satisfies {Extension['flowInitial']} */
var flowInitial = {
	[-2]: codeIndented,
	[-1]: codeIndented,
	[32]: codeIndented
};
/** @satisfies {Extension['flow']} */
var flow = {
	[35]: headingAtx,
	[42]: thematicBreak$2,
	[45]: [setextUnderline, thematicBreak$2],
	[60]: htmlFlow,
	[61]: setextUnderline,
	[95]: thematicBreak$2,
	[96]: codeFenced,
	[126]: codeFenced
};
/** @satisfies {Extension['string']} */
var string = {
	[38]: characterReference,
	[92]: characterEscape
};
/** @satisfies {Extension['text']} */
var text$3 = {
	[-5]: lineEnding,
	[-4]: lineEnding,
	[-3]: lineEnding,
	[33]: labelStartImage,
	[38]: characterReference,
	[42]: attention,
	[60]: [autolink, htmlText],
	[91]: labelStartLink,
	[92]: [hardBreakEscape, characterEscape],
	[93]: labelEnd,
	[95]: attention,
	[96]: codeText
};
/** @satisfies {Extension['insideSpan']} */
var insideSpan = { null: [attention, resolver] };
/** @satisfies {Extension['attentionMarkers']} */
var attentionMarkers = { null: [42, 95] };
/** @satisfies {Extension['disable']} */
var disable = { null: [] };
//#endregion
//#region ../../node_modules/micromark/lib/create-tokenizer.js
/**
* @import {
*   Chunk,
*   Code,
*   ConstructRecord,
*   Construct,
*   Effects,
*   InitialConstruct,
*   ParseContext,
*   Point,
*   State,
*   TokenizeContext,
*   Token
* } from 'micromark-util-types'
*/
/**
* @callback Restore
*   Restore the state.
* @returns {undefined}
*   Nothing.
*
* @typedef Info
*   Info.
* @property {Restore} restore
*   Restore.
* @property {number} from
*   From.
*
* @callback ReturnHandle
*   Handle a successful run.
* @param {Construct} construct
*   Construct.
* @param {Info} info
*   Info.
* @returns {undefined}
*   Nothing.
*/
/**
* Create a tokenizer.
* Tokenizers deal with one type of data (e.g., containers, flow, text).
* The parser is the object dealing with it all.
* `initialize` works like other constructs, except that only its `tokenize`
* function is used, in which case it doesn’t receive an `ok` or `nok`.
* `from` can be given to set the point before the first character, although
* when further lines are indented, they must be set with `defineSkip`.
*
* @param {ParseContext} parser
*   Parser.
* @param {InitialConstruct} initialize
*   Construct.
* @param {Omit<Point, '_bufferIndex' | '_index'> | undefined} [from]
*   Point (optional).
* @returns {TokenizeContext}
*   Context.
*/
function createTokenizer(parser, initialize, from) {
	/** @type {Point} */
	let point = {
		_bufferIndex: -1,
		_index: 0,
		line: from && from.line || 1,
		column: from && from.column || 1,
		offset: from && from.offset || 0
	};
	/** @type {Record<string, number>} */
	const columnStart = {};
	/** @type {Array<Construct>} */
	const resolveAllConstructs = [];
	/** @type {Array<Chunk>} */
	let chunks = [];
	/** @type {Array<Token>} */
	let stack = [];
	/**
	* Tools used for tokenizing.
	*
	* @type {Effects}
	*/
	const effects = {
		attempt: constructFactory(onsuccessfulconstruct),
		check: constructFactory(onsuccessfulcheck),
		consume,
		enter,
		exit,
		interrupt: constructFactory(onsuccessfulcheck, { interrupt: true })
	};
	/**
	* State and tools for resolving and serializing.
	*
	* @type {TokenizeContext}
	*/
	const context = {
		code: null,
		containerState: {},
		defineSkip,
		events: [],
		now,
		parser,
		previous: null,
		sliceSerialize,
		sliceStream,
		write
	};
	/**
	* The state function.
	*
	* @type {State | undefined}
	*/
	let state = initialize.tokenize.call(context, effects);
	if (initialize.resolveAll) resolveAllConstructs.push(initialize);
	return context;
	/** @type {TokenizeContext['write']} */
	function write(slice) {
		chunks = push(chunks, slice);
		main();
		if (chunks[chunks.length - 1] !== null) return [];
		addResult(initialize, 0);
		context.events = resolveAll(resolveAllConstructs, context.events, context);
		return context.events;
	}
	/** @type {TokenizeContext['sliceSerialize']} */
	function sliceSerialize(token, expandTabs) {
		return serializeChunks(sliceStream(token), expandTabs);
	}
	/** @type {TokenizeContext['sliceStream']} */
	function sliceStream(token) {
		return sliceChunks(chunks, token);
	}
	/** @type {TokenizeContext['now']} */
	function now() {
		const { _bufferIndex, _index, line, column, offset } = point;
		return {
			_bufferIndex,
			_index,
			line,
			column,
			offset
		};
	}
	/** @type {TokenizeContext['defineSkip']} */
	function defineSkip(value) {
		columnStart[value.line] = value.column;
		accountForPotentialSkip();
	}
	/**
	* Main loop (note that `_index` and `_bufferIndex` in `point` are modified by
	* `consume`).
	* Here is where we walk through the chunks, which either include strings of
	* several characters, or numerical character codes.
	* The reason to do this in a loop instead of a call is so the stack can
	* drain.
	*
	* @returns {undefined}
	*   Nothing.
	*/
	function main() {
		/** @type {number} */
		let chunkIndex;
		while (point._index < chunks.length) {
			const chunk = chunks[point._index];
			if (typeof chunk === "string") {
				chunkIndex = point._index;
				if (point._bufferIndex < 0) point._bufferIndex = 0;
				while (point._index === chunkIndex && point._bufferIndex < chunk.length) go(chunk.charCodeAt(point._bufferIndex));
			} else go(chunk);
		}
	}
	/**
	* Deal with one code.
	*
	* @param {Code} code
	*   Code.
	* @returns {undefined}
	*   Nothing.
	*/
	function go(code) {
		state = state(code);
	}
	/** @type {Effects['consume']} */
	function consume(code) {
		if (markdownLineEnding(code)) {
			point.line++;
			point.column = 1;
			point.offset += code === -3 ? 2 : 1;
			accountForPotentialSkip();
		} else if (code !== -1) {
			point.column++;
			point.offset++;
		}
		if (point._bufferIndex < 0) point._index++;
		else {
			point._bufferIndex++;
			if (point._bufferIndex === chunks[point._index].length) {
				point._bufferIndex = -1;
				point._index++;
			}
		}
		context.previous = code;
	}
	/** @type {Effects['enter']} */
	function enter(type, fields) {
		/** @type {Token} */
		const token = fields || {};
		token.type = type;
		token.start = now();
		context.events.push([
			"enter",
			token,
			context
		]);
		stack.push(token);
		return token;
	}
	/** @type {Effects['exit']} */
	function exit(type) {
		const token = stack.pop();
		token.end = now();
		context.events.push([
			"exit",
			token,
			context
		]);
		return token;
	}
	/**
	* Use results.
	*
	* @type {ReturnHandle}
	*/
	function onsuccessfulconstruct(construct, info) {
		addResult(construct, info.from);
	}
	/**
	* Discard results.
	*
	* @type {ReturnHandle}
	*/
	function onsuccessfulcheck(_, info) {
		info.restore();
	}
	/**
	* Factory to attempt/check/interrupt.
	*
	* @param {ReturnHandle} onreturn
	*   Callback.
	* @param {{interrupt?: boolean | undefined} | undefined} [fields]
	*   Fields.
	*/
	function constructFactory(onreturn, fields) {
		return hook;
		/**
		* Handle either an object mapping codes to constructs, a list of
		* constructs, or a single construct.
		*
		* @param {Array<Construct> | ConstructRecord | Construct} constructs
		*   Constructs.
		* @param {State} returnState
		*   State.
		* @param {State | undefined} [bogusState]
		*   State.
		* @returns {State}
		*   State.
		*/
		function hook(constructs, returnState, bogusState) {
			/** @type {ReadonlyArray<Construct>} */
			let listOfConstructs;
			/** @type {number} */
			let constructIndex;
			/** @type {Construct} */
			let currentConstruct;
			/** @type {Info} */
			let info;
			return Array.isArray(constructs) ? handleListOfConstructs(constructs) : "tokenize" in constructs ? handleListOfConstructs([constructs]) : handleMapOfConstructs(constructs);
			/**
			* Handle a list of construct.
			*
			* @param {ConstructRecord} map
			*   Constructs.
			* @returns {State}
			*   State.
			*/
			function handleMapOfConstructs(map) {
				return start;
				/** @type {State} */
				function start(code) {
					const left = code !== null && map[code];
					const all = code !== null && map.null;
					return handleListOfConstructs([...Array.isArray(left) ? left : left ? [left] : [], ...Array.isArray(all) ? all : all ? [all] : []])(code);
				}
			}
			/**
			* Handle a list of construct.
			*
			* @param {ReadonlyArray<Construct>} list
			*   Constructs.
			* @returns {State}
			*   State.
			*/
			function handleListOfConstructs(list) {
				listOfConstructs = list;
				constructIndex = 0;
				if (list.length === 0) return bogusState;
				return handleConstruct(list[constructIndex]);
			}
			/**
			* Handle a single construct.
			*
			* @param {Construct} construct
			*   Construct.
			* @returns {State}
			*   State.
			*/
			function handleConstruct(construct) {
				return start;
				/** @type {State} */
				function start(code) {
					info = store();
					currentConstruct = construct;
					if (!construct.partial) context.currentConstruct = construct;
					if (construct.name && context.parser.constructs.disable.null.includes(construct.name)) return nok(code);
					return construct.tokenize.call(fields ? Object.assign(Object.create(context), fields) : context, effects, ok, nok)(code);
				}
			}
			/** @type {State} */
			function ok(code) {
				onreturn(currentConstruct, info);
				return returnState;
			}
			/** @type {State} */
			function nok(code) {
				info.restore();
				if (++constructIndex < listOfConstructs.length) return handleConstruct(listOfConstructs[constructIndex]);
				return bogusState;
			}
		}
	}
	/**
	* @param {Construct} construct
	*   Construct.
	* @param {number} from
	*   From.
	* @returns {undefined}
	*   Nothing.
	*/
	function addResult(construct, from) {
		if (construct.resolveAll && !resolveAllConstructs.includes(construct)) resolveAllConstructs.push(construct);
		if (construct.resolve) splice(context.events, from, context.events.length - from, construct.resolve(context.events.slice(from), context));
		if (construct.resolveTo) context.events = construct.resolveTo(context.events, context);
	}
	/**
	* Store state.
	*
	* @returns {Info}
	*   Info.
	*/
	function store() {
		const startPoint = now();
		const startPrevious = context.previous;
		const startCurrentConstruct = context.currentConstruct;
		const startEventsIndex = context.events.length;
		const startStack = Array.from(stack);
		return {
			from: startEventsIndex,
			restore
		};
		/**
		* Restore state.
		*
		* @returns {undefined}
		*   Nothing.
		*/
		function restore() {
			point = startPoint;
			context.previous = startPrevious;
			context.currentConstruct = startCurrentConstruct;
			context.events.length = startEventsIndex;
			stack = startStack;
			accountForPotentialSkip();
		}
	}
	/**
	* Move the current point a bit forward in the line when it’s on a column
	* skip.
	*
	* @returns {undefined}
	*   Nothing.
	*/
	function accountForPotentialSkip() {
		if (point.line in columnStart && point.column < 2) {
			point.column = columnStart[point.line];
			point.offset += columnStart[point.line] - 1;
		}
	}
}
/**
* Get the chunks from a slice of chunks in the range of a token.
*
* @param {ReadonlyArray<Chunk>} chunks
*   Chunks.
* @param {Pick<Token, 'end' | 'start'>} token
*   Token.
* @returns {Array<Chunk>}
*   Chunks.
*/
function sliceChunks(chunks, token) {
	const startIndex = token.start._index;
	const startBufferIndex = token.start._bufferIndex;
	const endIndex = token.end._index;
	const endBufferIndex = token.end._bufferIndex;
	/** @type {Array<Chunk>} */
	let view;
	if (startIndex === endIndex) view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)];
	else {
		view = chunks.slice(startIndex, endIndex);
		if (startBufferIndex > -1) {
			const head = view[0];
			if (typeof head === "string") view[0] = head.slice(startBufferIndex);
			else view.shift();
		}
		if (endBufferIndex > 0) view.push(chunks[endIndex].slice(0, endBufferIndex));
	}
	return view;
}
/**
* Get the string value of a slice of chunks.
*
* @param {ReadonlyArray<Chunk>} chunks
*   Chunks.
* @param {boolean | undefined} [expandTabs=false]
*   Whether to expand tabs (default: `false`).
* @returns {string}
*   Result.
*/
function serializeChunks(chunks, expandTabs) {
	let index = -1;
	/** @type {Array<string>} */
	const result = [];
	/** @type {boolean | undefined} */
	let atTab;
	while (++index < chunks.length) {
		const chunk = chunks[index];
		/** @type {string} */
		let value;
		if (typeof chunk === "string") value = chunk;
		else switch (chunk) {
			case -5:
				value = "\r";
				break;
			case -4:
				value = "\n";
				break;
			case -3:
				value = "\r\n";
				break;
			case -2:
				value = expandTabs ? " " : "	";
				break;
			case -1:
				if (!expandTabs && atTab) continue;
				value = " ";
				break;
			default: value = String.fromCharCode(chunk);
		}
		atTab = chunk === -2;
		result.push(value);
	}
	return result.join("");
}
//#endregion
//#region ../../node_modules/micromark/lib/parse.js
/**
* @import {
*   Create,
*   FullNormalizedExtension,
*   InitialConstruct,
*   ParseContext,
*   ParseOptions
* } from 'micromark-util-types'
*/
/**
* @param {ParseOptions | null | undefined} [options]
*   Configuration (optional).
* @returns {ParseContext}
*   Parser.
*/
function parse(options) {
	/** @type {ParseContext} */
	const parser = {
		constructs: combineExtensions([constructs_exports, ...(options || {}).extensions || []]),
		content: create(content$1),
		defined: [],
		document: create(document$2),
		flow: create(flow$1),
		lazy: {},
		string: create(string$1),
		text: create(text$4)
	};
	return parser;
	/**
	* @param {InitialConstruct} initial
	*   Construct to start with.
	* @returns {Create}
	*   Create a tokenizer.
	*/
	function create(initial) {
		return creator;
		/** @type {Create} */
		function creator(from) {
			return createTokenizer(parser, initial, from);
		}
	}
}
//#endregion
//#region ../../node_modules/micromark/lib/postprocess.js
/**
* @import {Event} from 'micromark-util-types'
*/
/**
* @param {Array<Event>} events
*   Events.
* @returns {Array<Event>}
*   Events.
*/
function postprocess(events) {
	while (!subtokenize(events));
	return events;
}
//#endregion
//#region ../../node_modules/micromark/lib/preprocess.js
/**
* @import {Chunk, Code, Encoding, Value} from 'micromark-util-types'
*/
/**
* @callback Preprocessor
*   Preprocess a value.
* @param {Value} value
*   Value.
* @param {Encoding | null | undefined} [encoding]
*   Encoding when `value` is a typed array (optional).
* @param {boolean | null | undefined} [end=false]
*   Whether this is the last chunk (default: `false`).
* @returns {Array<Chunk>}
*   Chunks.
*/
var search = /[\0\t\n\r]/g;
/**
* @returns {Preprocessor}
*   Preprocess a value.
*/
function preprocess() {
	let column = 1;
	let buffer = "";
	/** @type {boolean | undefined} */
	let start = true;
	/** @type {boolean | undefined} */
	let atCarriageReturn;
	return preprocessor;
	/** @type {Preprocessor} */
	function preprocessor(value, encoding, end) {
		/** @type {Array<Chunk>} */
		const chunks = [];
		/** @type {RegExpMatchArray | null} */
		let match;
		/** @type {number} */
		let next;
		/** @type {number} */
		let startPosition;
		/** @type {number} */
		let endPosition;
		/** @type {Code} */
		let code;
		value = buffer + (typeof value === "string" ? value.toString() : new TextDecoder(encoding || void 0).decode(value));
		startPosition = 0;
		buffer = "";
		if (start) {
			if (value.charCodeAt(0) === 65279) startPosition++;
			start = void 0;
		}
		while (startPosition < value.length) {
			search.lastIndex = startPosition;
			match = search.exec(value);
			endPosition = match && match.index !== void 0 ? match.index : value.length;
			code = value.charCodeAt(endPosition);
			if (!match) {
				buffer = value.slice(startPosition);
				break;
			}
			if (code === 10 && startPosition === endPosition && atCarriageReturn) {
				chunks.push(-3);
				atCarriageReturn = void 0;
			} else {
				if (atCarriageReturn) {
					chunks.push(-5);
					atCarriageReturn = void 0;
				}
				if (startPosition < endPosition) {
					chunks.push(value.slice(startPosition, endPosition));
					column += endPosition - startPosition;
				}
				switch (code) {
					case 0:
						chunks.push(65533);
						column++;
						break;
					case 9:
						next = Math.ceil(column / 4) * 4;
						chunks.push(-2);
						while (column++ < next) chunks.push(-1);
						break;
					case 10:
						chunks.push(-4);
						column = 1;
						break;
					default:
						atCarriageReturn = true;
						column = 1;
				}
			}
			startPosition = endPosition + 1;
		}
		if (end) {
			if (atCarriageReturn) chunks.push(-5);
			if (buffer) chunks.push(buffer);
			chunks.push(null);
		}
		return chunks;
	}
}
//#endregion
//#region ../../node_modules/micromark-util-decode-string/index.js
var characterEscapeOrReference = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
/**
* Decode markdown strings (which occur in places such as fenced code info
* strings, destinations, labels, and titles).
*
* The “string” content type allows character escapes and -references.
* This decodes those.
*
* @param {string} value
*   Value to decode.
* @returns {string}
*   Decoded value.
*/
function decodeString(value) {
	return value.replace(characterEscapeOrReference, decode);
}
/**
* @param {string} $0
*   Match.
* @param {string} $1
*   Character escape.
* @param {string} $2
*   Character reference.
* @returns {string}
*   Decoded value
*/
function decode($0, $1, $2) {
	if ($1) return $1;
	if ($2.charCodeAt(0) === 35) {
		const head = $2.charCodeAt(1);
		const hex = head === 120 || head === 88;
		return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10);
	}
	return decodeNamedCharacterReference($2) || $0;
}
//#endregion
//#region ../../node_modules/mdast-util-from-markdown/lib/index.js
/**
* @import {
*   Break,
*   Blockquote,
*   Code,
*   Definition,
*   Emphasis,
*   Heading,
*   Html,
*   Image,
*   InlineCode,
*   Link,
*   ListItem,
*   List,
*   Nodes,
*   Paragraph,
*   PhrasingContent,
*   ReferenceType,
*   Root,
*   Strong,
*   Text,
*   ThematicBreak
* } from 'mdast'
* @import {
*   Encoding,
*   Event,
*   Token,
*   Value
* } from 'micromark-util-types'
* @import {Point} from 'unist'
* @import {
*   CompileContext,
*   CompileData,
*   Config,
*   Extension,
*   Handle,
*   OnEnterError,
*   Options
* } from './types.js'
*/
var own$2 = {}.hasOwnProperty;
/**
* Turn markdown into a syntax tree.
*
* @overload
* @param {Value} value
* @param {Encoding | null | undefined} [encoding]
* @param {Options | null | undefined} [options]
* @returns {Root}
*
* @overload
* @param {Value} value
* @param {Options | null | undefined} [options]
* @returns {Root}
*
* @param {Value} value
*   Markdown to parse.
* @param {Encoding | Options | null | undefined} [encoding]
*   Character encoding for when `value` is `Buffer`.
* @param {Options | null | undefined} [options]
*   Configuration.
* @returns {Root}
*   mdast tree.
*/
function fromMarkdown(value, encoding, options) {
	if (typeof encoding !== "string") {
		options = encoding;
		encoding = void 0;
	}
	return compiler(options)(postprocess(parse(options).document().write(preprocess()(value, encoding, true))));
}
/**
* Note this compiler only understand complete buffering, not streaming.
*
* @param {Options | null | undefined} [options]
*/
function compiler(options) {
	/** @type {Config} */
	const config = {
		transforms: [],
		canContainEols: [
			"emphasis",
			"fragment",
			"heading",
			"paragraph",
			"strong"
		],
		enter: {
			autolink: opener(link),
			autolinkProtocol: onenterdata,
			autolinkEmail: onenterdata,
			atxHeading: opener(heading),
			blockQuote: opener(blockQuote),
			characterEscape: onenterdata,
			characterReference: onenterdata,
			codeFenced: opener(codeFlow),
			codeFencedFenceInfo: buffer,
			codeFencedFenceMeta: buffer,
			codeIndented: opener(codeFlow, buffer),
			codeText: opener(codeText, buffer),
			codeTextData: onenterdata,
			data: onenterdata,
			codeFlowValue: onenterdata,
			definition: opener(definition),
			definitionDestinationString: buffer,
			definitionLabelString: buffer,
			definitionTitleString: buffer,
			emphasis: opener(emphasis),
			hardBreakEscape: opener(hardBreak),
			hardBreakTrailing: opener(hardBreak),
			htmlFlow: opener(html, buffer),
			htmlFlowData: onenterdata,
			htmlText: opener(html, buffer),
			htmlTextData: onenterdata,
			image: opener(image),
			label: buffer,
			link: opener(link),
			listItem: opener(listItem),
			listItemValue: onenterlistitemvalue,
			listOrdered: opener(list, onenterlistordered),
			listUnordered: opener(list),
			paragraph: opener(paragraph),
			reference: onenterreference,
			referenceString: buffer,
			resourceDestinationString: buffer,
			resourceTitleString: buffer,
			setextHeading: opener(heading),
			strong: opener(strong),
			thematicBreak: opener(thematicBreak)
		},
		exit: {
			atxHeading: closer(),
			atxHeadingSequence: onexitatxheadingsequence,
			autolink: closer(),
			autolinkEmail: onexitautolinkemail,
			autolinkProtocol: onexitautolinkprotocol,
			blockQuote: closer(),
			characterEscapeValue: onexitdata,
			characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker,
			characterReferenceMarkerNumeric: onexitcharacterreferencemarker,
			characterReferenceValue: onexitcharacterreferencevalue,
			characterReference: onexitcharacterreference,
			codeFenced: closer(onexitcodefenced),
			codeFencedFence: onexitcodefencedfence,
			codeFencedFenceInfo: onexitcodefencedfenceinfo,
			codeFencedFenceMeta: onexitcodefencedfencemeta,
			codeFlowValue: onexitdata,
			codeIndented: closer(onexitcodeindented),
			codeText: closer(onexitcodetext),
			codeTextData: onexitdata,
			data: onexitdata,
			definition: closer(),
			definitionDestinationString: onexitdefinitiondestinationstring,
			definitionLabelString: onexitdefinitionlabelstring,
			definitionTitleString: onexitdefinitiontitlestring,
			emphasis: closer(),
			hardBreakEscape: closer(onexithardbreak),
			hardBreakTrailing: closer(onexithardbreak),
			htmlFlow: closer(onexithtmlflow),
			htmlFlowData: onexitdata,
			htmlText: closer(onexithtmltext),
			htmlTextData: onexitdata,
			image: closer(onexitimage),
			label: onexitlabel,
			labelText: onexitlabeltext,
			lineEnding: onexitlineending,
			link: closer(onexitlink),
			listItem: closer(),
			listOrdered: closer(),
			listUnordered: closer(),
			paragraph: closer(),
			referenceString: onexitreferencestring,
			resourceDestinationString: onexitresourcedestinationstring,
			resourceTitleString: onexitresourcetitlestring,
			resource: onexitresource,
			setextHeading: closer(onexitsetextheading),
			setextHeadingLineSequence: onexitsetextheadinglinesequence,
			setextHeadingText: onexitsetextheadingtext,
			strong: closer(),
			thematicBreak: closer()
		}
	};
	configure(config, (options || {}).mdastExtensions || []);
	/** @type {CompileData} */
	const data = {};
	return compile;
	/**
	* Turn micromark events into an mdast tree.
	*
	* @param {Array<Event>} events
	*   Events.
	* @returns {Root}
	*   mdast tree.
	*/
	function compile(events) {
		/** @type {Root} */
		let tree = {
			type: "root",
			children: []
		};
		/** @type {Omit<CompileContext, 'sliceSerialize'>} */
		const context = {
			stack: [tree],
			tokenStack: [],
			config,
			enter,
			exit,
			buffer,
			resume,
			data
		};
		/** @type {Array<number>} */
		const listStack = [];
		let index = -1;
		while (++index < events.length) if (events[index][1].type === "listOrdered" || events[index][1].type === "listUnordered") if (events[index][0] === "enter") listStack.push(index);
		else index = prepareList(events, listStack.pop(), index);
		index = -1;
		while (++index < events.length) {
			const handler = config[events[index][0]];
			if (own$2.call(handler, events[index][1].type)) handler[events[index][1].type].call(Object.assign({ sliceSerialize: events[index][2].sliceSerialize }, context), events[index][1]);
		}
		if (context.tokenStack.length > 0) {
			const tail = context.tokenStack[context.tokenStack.length - 1];
			(tail[1] || defaultOnError).call(context, void 0, tail[0]);
		}
		tree.position = {
			start: point(events.length > 0 ? events[0][1].start : {
				line: 1,
				column: 1,
				offset: 0
			}),
			end: point(events.length > 0 ? events[events.length - 2][1].end : {
				line: 1,
				column: 1,
				offset: 0
			})
		};
		index = -1;
		while (++index < config.transforms.length) tree = config.transforms[index](tree) || tree;
		return tree;
	}
	/**
	* @param {Array<Event>} events
	* @param {number} start
	* @param {number} length
	* @returns {number}
	*/
	function prepareList(events, start, length) {
		let index = start - 1;
		let containerBalance = -1;
		let listSpread = false;
		/** @type {Token | undefined} */
		let listItem;
		/** @type {number | undefined} */
		let lineIndex;
		/** @type {number | undefined} */
		let firstBlankLineIndex;
		/** @type {boolean | undefined} */
		let atMarker;
		while (++index <= length) {
			const event = events[index];
			switch (event[1].type) {
				case "listUnordered":
				case "listOrdered":
				case "blockQuote":
					if (event[0] === "enter") containerBalance++;
					else containerBalance--;
					atMarker = void 0;
					break;
				case "lineEndingBlank":
					if (event[0] === "enter") {
						if (listItem && !atMarker && !containerBalance && !firstBlankLineIndex) firstBlankLineIndex = index;
						atMarker = void 0;
					}
					break;
				case "linePrefix":
				case "listItemValue":
				case "listItemMarker":
				case "listItemPrefix":
				case "listItemPrefixWhitespace": break;
				default: atMarker = void 0;
			}
			if (!containerBalance && event[0] === "enter" && event[1].type === "listItemPrefix" || containerBalance === -1 && event[0] === "exit" && (event[1].type === "listUnordered" || event[1].type === "listOrdered")) {
				if (listItem) {
					let tailIndex = index;
					lineIndex = void 0;
					while (tailIndex--) {
						const tailEvent = events[tailIndex];
						if (tailEvent[1].type === "lineEnding" || tailEvent[1].type === "lineEndingBlank") {
							if (tailEvent[0] === "exit") continue;
							if (lineIndex) {
								events[lineIndex][1].type = "lineEndingBlank";
								listSpread = true;
							}
							tailEvent[1].type = "lineEnding";
							lineIndex = tailIndex;
						} else if (tailEvent[1].type === "linePrefix" || tailEvent[1].type === "blockQuotePrefix" || tailEvent[1].type === "blockQuotePrefixWhitespace" || tailEvent[1].type === "blockQuoteMarker" || tailEvent[1].type === "listItemIndent") {} else break;
					}
					if (firstBlankLineIndex && (!lineIndex || firstBlankLineIndex < lineIndex)) listItem._spread = true;
					listItem.end = Object.assign({}, lineIndex ? events[lineIndex][1].start : event[1].end);
					events.splice(lineIndex || index, 0, [
						"exit",
						listItem,
						event[2]
					]);
					index++;
					length++;
				}
				if (event[1].type === "listItemPrefix") {
					/** @type {Token} */
					const item = {
						type: "listItem",
						_spread: false,
						start: Object.assign({}, event[1].start),
						end: void 0
					};
					listItem = item;
					events.splice(index, 0, [
						"enter",
						item,
						event[2]
					]);
					index++;
					length++;
					firstBlankLineIndex = void 0;
					atMarker = true;
				}
			}
		}
		events[start][1]._spread = listSpread;
		return length;
	}
	/**
	* Create an opener handle.
	*
	* @param {(token: Token) => Nodes} create
	*   Create a node.
	* @param {Handle | undefined} [and]
	*   Optional function to also run.
	* @returns {Handle}
	*   Handle.
	*/
	function opener(create, and) {
		return open;
		/**
		* @this {CompileContext}
		* @param {Token} token
		* @returns {undefined}
		*/
		function open(token) {
			enter.call(this, create(token), token);
			if (and) and.call(this, token);
		}
	}
	/**
	* @type {CompileContext['buffer']}
	*/
	function buffer() {
		this.stack.push({
			type: "fragment",
			children: []
		});
	}
	/**
	* @type {CompileContext['enter']}
	*/
	function enter(node, token, errorHandler) {
		this.stack[this.stack.length - 1].children.push(node);
		this.stack.push(node);
		this.tokenStack.push([token, errorHandler || void 0]);
		node.position = {
			start: point(token.start),
			end: void 0
		};
	}
	/**
	* Create a closer handle.
	*
	* @param {Handle | undefined} [and]
	*   Optional function to also run.
	* @returns {Handle}
	*   Handle.
	*/
	function closer(and) {
		return close;
		/**
		* @this {CompileContext}
		* @param {Token} token
		* @returns {undefined}
		*/
		function close(token) {
			if (and) and.call(this, token);
			exit.call(this, token);
		}
	}
	/**
	* @type {CompileContext['exit']}
	*/
	function exit(token, onExitError) {
		const node = this.stack.pop();
		const open = this.tokenStack.pop();
		if (!open) throw new Error("Cannot close `" + token.type + "` (" + stringifyPosition({
			start: token.start,
			end: token.end
		}) + "): it’s not open");
		else if (open[0].type !== token.type) if (onExitError) onExitError.call(this, token, open[0]);
		else (open[1] || defaultOnError).call(this, token, open[0]);
		node.position.end = point(token.end);
	}
	/**
	* @type {CompileContext['resume']}
	*/
	function resume() {
		return toString$2(this.stack.pop());
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onenterlistordered() {
		this.data.expectingFirstListItemValue = true;
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onenterlistitemvalue(token) {
		if (this.data.expectingFirstListItemValue) {
			const ancestor = this.stack[this.stack.length - 2];
			ancestor.start = Number.parseInt(this.sliceSerialize(token), 10);
			this.data.expectingFirstListItemValue = void 0;
		}
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitcodefencedfenceinfo() {
		const data = this.resume();
		const node = this.stack[this.stack.length - 1];
		node.lang = data;
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitcodefencedfencemeta() {
		const data = this.resume();
		const node = this.stack[this.stack.length - 1];
		node.meta = data;
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitcodefencedfence() {
		if (this.data.flowCodeInside) return;
		this.buffer();
		this.data.flowCodeInside = true;
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitcodefenced() {
		const data = this.resume();
		const node = this.stack[this.stack.length - 1];
		node.value = data.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, "");
		this.data.flowCodeInside = void 0;
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitcodeindented() {
		const data = this.resume();
		const node = this.stack[this.stack.length - 1];
		node.value = data.replace(/(\r?\n|\r)$/g, "");
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitdefinitionlabelstring(token) {
		const label = this.resume();
		const node = this.stack[this.stack.length - 1];
		node.label = label;
		node.identifier = normalizeIdentifier(this.sliceSerialize(token)).toLowerCase();
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitdefinitiontitlestring() {
		const data = this.resume();
		const node = this.stack[this.stack.length - 1];
		node.title = data;
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitdefinitiondestinationstring() {
		const data = this.resume();
		const node = this.stack[this.stack.length - 1];
		node.url = data;
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitatxheadingsequence(token) {
		const node = this.stack[this.stack.length - 1];
		if (!node.depth) node.depth = this.sliceSerialize(token).length;
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitsetextheadingtext() {
		this.data.setextHeadingSlurpLineEnding = true;
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitsetextheadinglinesequence(token) {
		const node = this.stack[this.stack.length - 1];
		node.depth = this.sliceSerialize(token).codePointAt(0) === 61 ? 1 : 2;
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitsetextheading() {
		this.data.setextHeadingSlurpLineEnding = void 0;
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onenterdata(token) {
		/** @type {Array<Nodes>} */
		const siblings = this.stack[this.stack.length - 1].children;
		let tail = siblings[siblings.length - 1];
		if (!tail || tail.type !== "text") {
			tail = text();
			tail.position = {
				start: point(token.start),
				end: void 0
			};
			siblings.push(tail);
		}
		this.stack.push(tail);
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitdata(token) {
		const tail = this.stack.pop();
		tail.value += this.sliceSerialize(token);
		tail.position.end = point(token.end);
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitlineending(token) {
		const context = this.stack[this.stack.length - 1];
		if (this.data.atHardBreak) {
			const tail = context.children[context.children.length - 1];
			tail.position.end = point(token.end);
			this.data.atHardBreak = void 0;
			return;
		}
		if (!this.data.setextHeadingSlurpLineEnding && config.canContainEols.includes(context.type)) {
			onenterdata.call(this, token);
			onexitdata.call(this, token);
		}
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexithardbreak() {
		this.data.atHardBreak = true;
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexithtmlflow() {
		const data = this.resume();
		const node = this.stack[this.stack.length - 1];
		node.value = data;
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexithtmltext() {
		const data = this.resume();
		const node = this.stack[this.stack.length - 1];
		node.value = data;
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitcodetext() {
		const data = this.resume();
		const node = this.stack[this.stack.length - 1];
		node.value = data;
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitlink() {
		const node = this.stack[this.stack.length - 1];
		if (this.data.inReference) {
			/** @type {ReferenceType} */
			const referenceType = this.data.referenceType || "shortcut";
			node.type += "Reference";
			node.referenceType = referenceType;
			delete node.url;
			delete node.title;
		} else {
			delete node.identifier;
			delete node.label;
		}
		this.data.referenceType = void 0;
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitimage() {
		const node = this.stack[this.stack.length - 1];
		if (this.data.inReference) {
			/** @type {ReferenceType} */
			const referenceType = this.data.referenceType || "shortcut";
			node.type += "Reference";
			node.referenceType = referenceType;
			delete node.url;
			delete node.title;
		} else {
			delete node.identifier;
			delete node.label;
		}
		this.data.referenceType = void 0;
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitlabeltext(token) {
		const string = this.sliceSerialize(token);
		const ancestor = this.stack[this.stack.length - 2];
		ancestor.label = decodeString(string);
		ancestor.identifier = normalizeIdentifier(string).toLowerCase();
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitlabel() {
		const fragment = this.stack[this.stack.length - 1];
		const value = this.resume();
		const node = this.stack[this.stack.length - 1];
		this.data.inReference = true;
		if (node.type === "link") node.children = fragment.children;
		else node.alt = value;
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitresourcedestinationstring() {
		const data = this.resume();
		const node = this.stack[this.stack.length - 1];
		node.url = data;
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitresourcetitlestring() {
		const data = this.resume();
		const node = this.stack[this.stack.length - 1];
		node.title = data;
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitresource() {
		this.data.inReference = void 0;
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onenterreference() {
		this.data.referenceType = "collapsed";
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitreferencestring(token) {
		const label = this.resume();
		const node = this.stack[this.stack.length - 1];
		node.label = label;
		node.identifier = normalizeIdentifier(this.sliceSerialize(token)).toLowerCase();
		this.data.referenceType = "full";
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitcharacterreferencemarker(token) {
		this.data.characterReferenceType = token.type;
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitcharacterreferencevalue(token) {
		const data = this.sliceSerialize(token);
		const type = this.data.characterReferenceType;
		/** @type {string} */
		let value;
		if (type) {
			value = decodeNumericCharacterReference(data, type === "characterReferenceMarkerNumeric" ? 10 : 16);
			this.data.characterReferenceType = void 0;
		} else value = decodeNamedCharacterReference(data);
		const tail = this.stack[this.stack.length - 1];
		tail.value += value;
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitcharacterreference(token) {
		const tail = this.stack.pop();
		tail.position.end = point(token.end);
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitautolinkprotocol(token) {
		onexitdata.call(this, token);
		const node = this.stack[this.stack.length - 1];
		node.url = this.sliceSerialize(token);
	}
	/**
	* @this {CompileContext}
	* @type {Handle}
	*/
	function onexitautolinkemail(token) {
		onexitdata.call(this, token);
		const node = this.stack[this.stack.length - 1];
		node.url = "mailto:" + this.sliceSerialize(token);
	}
	/** @returns {Blockquote} */
	function blockQuote() {
		return {
			type: "blockquote",
			children: []
		};
	}
	/** @returns {Code} */
	function codeFlow() {
		return {
			type: "code",
			lang: null,
			meta: null,
			value: ""
		};
	}
	/** @returns {InlineCode} */
	function codeText() {
		return {
			type: "inlineCode",
			value: ""
		};
	}
	/** @returns {Definition} */
	function definition() {
		return {
			type: "definition",
			identifier: "",
			label: null,
			title: null,
			url: ""
		};
	}
	/** @returns {Emphasis} */
	function emphasis() {
		return {
			type: "emphasis",
			children: []
		};
	}
	/** @returns {Heading} */
	function heading() {
		return {
			type: "heading",
			depth: 0,
			children: []
		};
	}
	/** @returns {Break} */
	function hardBreak() {
		return { type: "break" };
	}
	/** @returns {Html} */
	function html() {
		return {
			type: "html",
			value: ""
		};
	}
	/** @returns {Image} */
	function image() {
		return {
			type: "image",
			title: null,
			url: "",
			alt: null
		};
	}
	/** @returns {Link} */
	function link() {
		return {
			type: "link",
			title: null,
			url: "",
			children: []
		};
	}
	/**
	* @param {Token} token
	* @returns {List}
	*/
	function list(token) {
		return {
			type: "list",
			ordered: token.type === "listOrdered",
			start: null,
			spread: token._spread,
			children: []
		};
	}
	/**
	* @param {Token} token
	* @returns {ListItem}
	*/
	function listItem(token) {
		return {
			type: "listItem",
			spread: token._spread,
			checked: null,
			children: []
		};
	}
	/** @returns {Paragraph} */
	function paragraph() {
		return {
			type: "paragraph",
			children: []
		};
	}
	/** @returns {Strong} */
	function strong() {
		return {
			type: "strong",
			children: []
		};
	}
	/** @returns {Text} */
	function text() {
		return {
			type: "text",
			value: ""
		};
	}
	/** @returns {ThematicBreak} */
	function thematicBreak() {
		return { type: "thematicBreak" };
	}
}
/**
* Copy a point-like value.
*
* @param {Point} d
*   Point-like value.
* @returns {Point}
*   unist point.
*/
function point(d) {
	return {
		line: d.line,
		column: d.column,
		offset: d.offset
	};
}
/**
* @param {Config} combined
* @param {Array<Array<Extension> | Extension>} extensions
* @returns {undefined}
*/
function configure(combined, extensions) {
	let index = -1;
	while (++index < extensions.length) {
		const value = extensions[index];
		if (Array.isArray(value)) configure(combined, value);
		else extension(combined, value);
	}
}
/**
* @param {Config} combined
* @param {Extension} extension
* @returns {undefined}
*/
function extension(combined, extension) {
	/** @type {keyof Extension} */
	let key;
	for (key in extension) if (own$2.call(extension, key)) switch (key) {
		case "canContainEols": {
			const right = extension[key];
			if (right) combined[key].push(...right);
			break;
		}
		case "transforms": {
			const right = extension[key];
			if (right) combined[key].push(...right);
			break;
		}
		case "enter":
		case "exit": {
			const right = extension[key];
			if (right) Object.assign(combined[key], right);
			break;
		}
	}
}
/** @type {OnEnterError} */
function defaultOnError(left, right) {
	if (left) throw new Error("Cannot close `" + left.type + "` (" + stringifyPosition({
		start: left.start,
		end: left.end
	}) + "): a different token (`" + right.type + "`, " + stringifyPosition({
		start: right.start,
		end: right.end
	}) + ") is open");
	else throw new Error("Cannot close document, a token (`" + right.type + "`, " + stringifyPosition({
		start: right.start,
		end: right.end
	}) + ") is still open");
}
//#endregion
//#region ../../node_modules/remark-parse/lib/index.js
/**
* @typedef {import('mdast').Root} Root
* @typedef {import('mdast-util-from-markdown').Options} FromMarkdownOptions
* @typedef {import('unified').Parser<Root>} Parser
* @typedef {import('unified').Processor<Root>} Processor
*/
/**
* @typedef {Omit<FromMarkdownOptions, 'extensions' | 'mdastExtensions'>} Options
*/
/**
* Aadd support for parsing from markdown.
*
* @param {Readonly<Options> | null | undefined} [options]
*   Configuration (optional).
* @returns {undefined}
*   Nothing.
*/
function remarkParse(options) {
	/** @type {Processor} */
	const self = this;
	self.parser = parser;
	/**
	* @type {Parser}
	*/
	function parser(doc) {
		return fromMarkdown(doc, {
			...self.data("settings"),
			...options,
			extensions: self.data("micromarkExtensions") || [],
			mdastExtensions: self.data("fromMarkdownExtensions") || []
		});
	}
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/handlers/blockquote.js
/**
* @import {Element} from 'hast'
* @import {Blockquote} from 'mdast'
* @import {State} from '../state.js'
*/
/**
* Turn an mdast `blockquote` node into hast.
*
* @param {State} state
*   Info passed around.
* @param {Blockquote} node
*   mdast node.
* @returns {Element}
*   hast node.
*/
function blockquote$1(state, node) {
	/** @type {Element} */
	const result = {
		type: "element",
		tagName: "blockquote",
		properties: {},
		children: state.wrap(state.all(node), true)
	};
	state.patch(node, result);
	return state.applyData(node, result);
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/handlers/break.js
/**
* @import {Element, Text} from 'hast'
* @import {Break} from 'mdast'
* @import {State} from '../state.js'
*/
/**
* Turn an mdast `break` node into hast.
*
* @param {State} state
*   Info passed around.
* @param {Break} node
*   mdast node.
* @returns {Array<Element | Text>}
*   hast element content.
*/
function hardBreak$1(state, node) {
	/** @type {Element} */
	const result = {
		type: "element",
		tagName: "br",
		properties: {},
		children: []
	};
	state.patch(node, result);
	return [state.applyData(node, result), {
		type: "text",
		value: "\n"
	}];
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/handlers/code.js
/**
* @import {Element, Properties} from 'hast'
* @import {Code} from 'mdast'
* @import {State} from '../state.js'
*/
/**
* Turn an mdast `code` node into hast.
*
* @param {State} state
*   Info passed around.
* @param {Code} node
*   mdast node.
* @returns {Element}
*   hast node.
*/
function code$2(state, node) {
	const value = node.value ? node.value + "\n" : "";
	/** @type {Properties} */
	const properties = {};
	const language = node.lang ? node.lang.split(/\s+/) : [];
	if (language.length > 0) properties.className = ["language-" + language[0]];
	/** @type {Element} */
	let result = {
		type: "element",
		tagName: "code",
		properties,
		children: [{
			type: "text",
			value
		}]
	};
	if (node.meta) result.data = { meta: node.meta };
	state.patch(node, result);
	result = state.applyData(node, result);
	result = {
		type: "element",
		tagName: "pre",
		properties: {},
		children: [result]
	};
	state.patch(node, result);
	return result;
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/handlers/delete.js
/**
* @import {Element} from 'hast'
* @import {Delete} from 'mdast'
* @import {State} from '../state.js'
*/
/**
* Turn an mdast `delete` node into hast.
*
* @param {State} state
*   Info passed around.
* @param {Delete} node
*   mdast node.
* @returns {Element}
*   hast node.
*/
function strikethrough(state, node) {
	/** @type {Element} */
	const result = {
		type: "element",
		tagName: "del",
		properties: {},
		children: state.all(node)
	};
	state.patch(node, result);
	return state.applyData(node, result);
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/handlers/emphasis.js
/**
* @import {Element} from 'hast'
* @import {Emphasis} from 'mdast'
* @import {State} from '../state.js'
*/
/**
* Turn an mdast `emphasis` node into hast.
*
* @param {State} state
*   Info passed around.
* @param {Emphasis} node
*   mdast node.
* @returns {Element}
*   hast node.
*/
function emphasis$1(state, node) {
	/** @type {Element} */
	const result = {
		type: "element",
		tagName: "em",
		properties: {},
		children: state.all(node)
	};
	state.patch(node, result);
	return state.applyData(node, result);
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js
/**
* @import {Element} from 'hast'
* @import {FootnoteReference} from 'mdast'
* @import {State} from '../state.js'
*/
/**
* Turn an mdast `footnoteReference` node into hast.
*
* @param {State} state
*   Info passed around.
* @param {FootnoteReference} node
*   mdast node.
* @returns {Element}
*   hast node.
*/
function footnoteReference$1(state, node) {
	const clobberPrefix = typeof state.options.clobberPrefix === "string" ? state.options.clobberPrefix : "user-content-";
	const id = String(node.identifier).toUpperCase();
	const safeId = normalizeUri(id.toLowerCase());
	const index = state.footnoteOrder.indexOf(id);
	/** @type {number} */
	let counter;
	let reuseCounter = state.footnoteCounts.get(id);
	if (reuseCounter === void 0) {
		reuseCounter = 0;
		state.footnoteOrder.push(id);
		counter = state.footnoteOrder.length;
	} else counter = index + 1;
	reuseCounter += 1;
	state.footnoteCounts.set(id, reuseCounter);
	/** @type {Element} */
	const link = {
		type: "element",
		tagName: "a",
		properties: {
			href: "#" + clobberPrefix + "fn-" + safeId,
			id: clobberPrefix + "fnref-" + safeId + (reuseCounter > 1 ? "-" + reuseCounter : ""),
			dataFootnoteRef: true,
			ariaDescribedBy: ["footnote-label"]
		},
		children: [{
			type: "text",
			value: String(counter)
		}]
	};
	state.patch(node, link);
	/** @type {Element} */
	const sup = {
		type: "element",
		tagName: "sup",
		properties: {},
		children: [link]
	};
	state.patch(node, sup);
	return state.applyData(node, sup);
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/handlers/heading.js
/**
* @import {Element} from 'hast'
* @import {Heading} from 'mdast'
* @import {State} from '../state.js'
*/
/**
* Turn an mdast `heading` node into hast.
*
* @param {State} state
*   Info passed around.
* @param {Heading} node
*   mdast node.
* @returns {Element}
*   hast node.
*/
function heading$1(state, node) {
	/** @type {Element} */
	const result = {
		type: "element",
		tagName: "h" + node.depth,
		properties: {},
		children: state.all(node)
	};
	state.patch(node, result);
	return state.applyData(node, result);
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/handlers/html.js
/**
* @import {Element} from 'hast'
* @import {Html} from 'mdast'
* @import {State} from '../state.js'
* @import {Raw} from '../../index.js'
*/
/**
* Turn an mdast `html` node into hast (`raw` node in dangerous mode, otherwise
* nothing).
*
* @param {State} state
*   Info passed around.
* @param {Html} node
*   mdast node.
* @returns {Element | Raw | undefined}
*   hast node.
*/
function html$1(state, node) {
	if (state.options.allowDangerousHtml) {
		/** @type {Raw} */
		const result = {
			type: "raw",
			value: node.value
		};
		state.patch(node, result);
		return state.applyData(node, result);
	}
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/revert.js
/**
* @import {ElementContent} from 'hast'
* @import {Reference, Nodes} from 'mdast'
* @import {State} from './state.js'
*/
/**
* Return the content of a reference without definition as plain text.
*
* @param {State} state
*   Info passed around.
* @param {Extract<Nodes, Reference>} node
*   Reference node (image, link).
* @returns {Array<ElementContent>}
*   hast content.
*/
function revert(state, node) {
	const subtype = node.referenceType;
	let suffix = "]";
	if (subtype === "collapsed") suffix += "[]";
	else if (subtype === "full") suffix += "[" + (node.label || node.identifier) + "]";
	if (node.type === "imageReference") return [{
		type: "text",
		value: "![" + node.alt + suffix
	}];
	const contents = state.all(node);
	const head = contents[0];
	if (head && head.type === "text") head.value = "[" + head.value;
	else contents.unshift({
		type: "text",
		value: "["
	});
	const tail = contents[contents.length - 1];
	if (tail && tail.type === "text") tail.value += suffix;
	else contents.push({
		type: "text",
		value: suffix
	});
	return contents;
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/handlers/image-reference.js
/**
* @import {ElementContent, Element, Properties} from 'hast'
* @import {ImageReference} from 'mdast'
* @import {State} from '../state.js'
*/
/**
* Turn an mdast `imageReference` node into hast.
*
* @param {State} state
*   Info passed around.
* @param {ImageReference} node
*   mdast node.
* @returns {Array<ElementContent> | ElementContent}
*   hast node.
*/
function imageReference$1(state, node) {
	const id = String(node.identifier).toUpperCase();
	const definition = state.definitionById.get(id);
	if (!definition) return revert(state, node);
	/** @type {Properties} */
	const properties = {
		src: normalizeUri(definition.url || ""),
		alt: node.alt
	};
	if (definition.title !== null && definition.title !== void 0) properties.title = definition.title;
	/** @type {Element} */
	const result = {
		type: "element",
		tagName: "img",
		properties,
		children: []
	};
	state.patch(node, result);
	return state.applyData(node, result);
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/handlers/image.js
/**
* @import {Element, Properties} from 'hast'
* @import {Image} from 'mdast'
* @import {State} from '../state.js'
*/
/**
* Turn an mdast `image` node into hast.
*
* @param {State} state
*   Info passed around.
* @param {Image} node
*   mdast node.
* @returns {Element}
*   hast node.
*/
function image$1(state, node) {
	/** @type {Properties} */
	const properties = { src: normalizeUri(node.url) };
	if (node.alt !== null && node.alt !== void 0) properties.alt = node.alt;
	if (node.title !== null && node.title !== void 0) properties.title = node.title;
	/** @type {Element} */
	const result = {
		type: "element",
		tagName: "img",
		properties,
		children: []
	};
	state.patch(node, result);
	return state.applyData(node, result);
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/handlers/inline-code.js
/**
* @import {Element, Text} from 'hast'
* @import {InlineCode} from 'mdast'
* @import {State} from '../state.js'
*/
/**
* Turn an mdast `inlineCode` node into hast.
*
* @param {State} state
*   Info passed around.
* @param {InlineCode} node
*   mdast node.
* @returns {Element}
*   hast node.
*/
function inlineCode$1(state, node) {
	/** @type {Text} */
	const text = {
		type: "text",
		value: node.value.replace(/\r?\n|\r/g, " ")
	};
	state.patch(node, text);
	/** @type {Element} */
	const result = {
		type: "element",
		tagName: "code",
		properties: {},
		children: [text]
	};
	state.patch(node, result);
	return state.applyData(node, result);
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/handlers/link-reference.js
/**
* @import {ElementContent, Element, Properties} from 'hast'
* @import {LinkReference} from 'mdast'
* @import {State} from '../state.js'
*/
/**
* Turn an mdast `linkReference` node into hast.
*
* @param {State} state
*   Info passed around.
* @param {LinkReference} node
*   mdast node.
* @returns {Array<ElementContent> | ElementContent}
*   hast node.
*/
function linkReference$1(state, node) {
	const id = String(node.identifier).toUpperCase();
	const definition = state.definitionById.get(id);
	if (!definition) return revert(state, node);
	/** @type {Properties} */
	const properties = { href: normalizeUri(definition.url || "") };
	if (definition.title !== null && definition.title !== void 0) properties.title = definition.title;
	/** @type {Element} */
	const result = {
		type: "element",
		tagName: "a",
		properties,
		children: state.all(node)
	};
	state.patch(node, result);
	return state.applyData(node, result);
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/handlers/link.js
/**
* @import {Element, Properties} from 'hast'
* @import {Link} from 'mdast'
* @import {State} from '../state.js'
*/
/**
* Turn an mdast `link` node into hast.
*
* @param {State} state
*   Info passed around.
* @param {Link} node
*   mdast node.
* @returns {Element}
*   hast node.
*/
function link$1(state, node) {
	/** @type {Properties} */
	const properties = { href: normalizeUri(node.url) };
	if (node.title !== null && node.title !== void 0) properties.title = node.title;
	/** @type {Element} */
	const result = {
		type: "element",
		tagName: "a",
		properties,
		children: state.all(node)
	};
	state.patch(node, result);
	return state.applyData(node, result);
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/handlers/list-item.js
/**
* @import {ElementContent, Element, Properties} from 'hast'
* @import {ListItem, Parents} from 'mdast'
* @import {State} from '../state.js'
*/
/**
* Turn an mdast `listItem` node into hast.
*
* @param {State} state
*   Info passed around.
* @param {ListItem} node
*   mdast node.
* @param {Parents | undefined} parent
*   Parent of `node`.
* @returns {Element}
*   hast node.
*/
function listItem$1(state, node, parent) {
	const results = state.all(node);
	const loose = parent ? listLoose(parent) : listItemLoose(node);
	/** @type {Properties} */
	const properties = {};
	/** @type {Array<ElementContent>} */
	const children = [];
	if (typeof node.checked === "boolean") {
		const head = results[0];
		/** @type {Element} */
		let paragraph;
		if (head && head.type === "element" && head.tagName === "p") paragraph = head;
		else {
			paragraph = {
				type: "element",
				tagName: "p",
				properties: {},
				children: []
			};
			results.unshift(paragraph);
		}
		if (paragraph.children.length > 0) paragraph.children.unshift({
			type: "text",
			value: " "
		});
		paragraph.children.unshift({
			type: "element",
			tagName: "input",
			properties: {
				type: "checkbox",
				checked: node.checked,
				disabled: true
			},
			children: []
		});
		properties.className = ["task-list-item"];
	}
	let index = -1;
	while (++index < results.length) {
		const child = results[index];
		if (loose || index !== 0 || child.type !== "element" || child.tagName !== "p") children.push({
			type: "text",
			value: "\n"
		});
		if (child.type === "element" && child.tagName === "p" && !loose) children.push(...child.children);
		else children.push(child);
	}
	const tail = results[results.length - 1];
	if (tail && (loose || tail.type !== "element" || tail.tagName !== "p")) children.push({
		type: "text",
		value: "\n"
	});
	/** @type {Element} */
	const result = {
		type: "element",
		tagName: "li",
		properties,
		children
	};
	state.patch(node, result);
	return state.applyData(node, result);
}
/**
* @param {Parents} node
* @return {Boolean}
*/
function listLoose(node) {
	let loose = false;
	if (node.type === "list") {
		loose = node.spread || false;
		const children = node.children;
		let index = -1;
		while (!loose && ++index < children.length) loose = listItemLoose(children[index]);
	}
	return loose;
}
/**
* @param {ListItem} node
* @return {Boolean}
*/
function listItemLoose(node) {
	const spread = node.spread;
	return spread === null || spread === void 0 ? node.children.length > 1 : spread;
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/handlers/list.js
/**
* @import {Element, Properties} from 'hast'
* @import {List} from 'mdast'
* @import {State} from '../state.js'
*/
/**
* Turn an mdast `list` node into hast.
*
* @param {State} state
*   Info passed around.
* @param {List} node
*   mdast node.
* @returns {Element}
*   hast node.
*/
function list$1(state, node) {
	/** @type {Properties} */
	const properties = {};
	const results = state.all(node);
	let index = -1;
	if (typeof node.start === "number" && node.start !== 1) properties.start = node.start;
	while (++index < results.length) {
		const child = results[index];
		if (child.type === "element" && child.tagName === "li" && child.properties && Array.isArray(child.properties.className) && child.properties.className.includes("task-list-item")) {
			properties.className = ["contains-task-list"];
			break;
		}
	}
	/** @type {Element} */
	const result = {
		type: "element",
		tagName: node.ordered ? "ol" : "ul",
		properties,
		children: state.wrap(results, true)
	};
	state.patch(node, result);
	return state.applyData(node, result);
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/handlers/paragraph.js
/**
* @import {Element} from 'hast'
* @import {Paragraph} from 'mdast'
* @import {State} from '../state.js'
*/
/**
* Turn an mdast `paragraph` node into hast.
*
* @param {State} state
*   Info passed around.
* @param {Paragraph} node
*   mdast node.
* @returns {Element}
*   hast node.
*/
function paragraph$1(state, node) {
	/** @type {Element} */
	const result = {
		type: "element",
		tagName: "p",
		properties: {},
		children: state.all(node)
	};
	state.patch(node, result);
	return state.applyData(node, result);
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/handlers/root.js
/**
* @import {Parents as HastParents, Root as HastRoot} from 'hast'
* @import {Root as MdastRoot} from 'mdast'
* @import {State} from '../state.js'
*/
/**
* Turn an mdast `root` node into hast.
*
* @param {State} state
*   Info passed around.
* @param {MdastRoot} node
*   mdast node.
* @returns {HastParents}
*   hast node.
*/
function root$1(state, node) {
	/** @type {HastRoot} */
	const result = {
		type: "root",
		children: state.wrap(state.all(node))
	};
	state.patch(node, result);
	return state.applyData(node, result);
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/handlers/strong.js
/**
* @import {Element} from 'hast'
* @import {Strong} from 'mdast'
* @import {State} from '../state.js'
*/
/**
* Turn an mdast `strong` node into hast.
*
* @param {State} state
*   Info passed around.
* @param {Strong} node
*   mdast node.
* @returns {Element}
*   hast node.
*/
function strong$1(state, node) {
	/** @type {Element} */
	const result = {
		type: "element",
		tagName: "strong",
		properties: {},
		children: state.all(node)
	};
	state.patch(node, result);
	return state.applyData(node, result);
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/handlers/table.js
/**
* @import {Table} from 'mdast'
* @import {Element} from 'hast'
* @import {State} from '../state.js'
*/
/**
* Turn an mdast `table` node into hast.
*
* @param {State} state
*   Info passed around.
* @param {Table} node
*   mdast node.
* @returns {Element}
*   hast node.
*/
function table(state, node) {
	const rows = state.all(node);
	const firstRow = rows.shift();
	/** @type {Array<Element>} */
	const tableContent = [];
	if (firstRow) {
		/** @type {Element} */
		const head = {
			type: "element",
			tagName: "thead",
			properties: {},
			children: state.wrap([firstRow], true)
		};
		state.patch(node.children[0], head);
		tableContent.push(head);
	}
	if (rows.length > 0) {
		/** @type {Element} */
		const body = {
			type: "element",
			tagName: "tbody",
			properties: {},
			children: state.wrap(rows, true)
		};
		const start = pointStart(node.children[1]);
		const end = pointEnd(node.children[node.children.length - 1]);
		if (start && end) body.position = {
			start,
			end
		};
		tableContent.push(body);
	}
	/** @type {Element} */
	const result = {
		type: "element",
		tagName: "table",
		properties: {},
		children: state.wrap(tableContent, true)
	};
	state.patch(node, result);
	return state.applyData(node, result);
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/handlers/table-row.js
/**
* @import {Element, ElementContent, Properties} from 'hast'
* @import {Parents, TableRow} from 'mdast'
* @import {State} from '../state.js'
*/
/**
* Turn an mdast `tableRow` node into hast.
*
* @param {State} state
*   Info passed around.
* @param {TableRow} node
*   mdast node.
* @param {Parents | undefined} parent
*   Parent of `node`.
* @returns {Element}
*   hast node.
*/
function tableRow(state, node, parent) {
	const siblings = parent ? parent.children : void 0;
	const tagName = (siblings ? siblings.indexOf(node) : 1) === 0 ? "th" : "td";
	const align = parent && parent.type === "table" ? parent.align : void 0;
	const length = align ? align.length : node.children.length;
	let cellIndex = -1;
	/** @type {Array<ElementContent>} */
	const cells = [];
	while (++cellIndex < length) {
		const cell = node.children[cellIndex];
		/** @type {Properties} */
		const properties = {};
		const alignValue = align ? align[cellIndex] : void 0;
		if (alignValue) properties.align = alignValue;
		/** @type {Element} */
		let result = {
			type: "element",
			tagName,
			properties,
			children: []
		};
		if (cell) {
			result.children = state.all(cell);
			state.patch(cell, result);
			result = state.applyData(cell, result);
		}
		cells.push(result);
	}
	/** @type {Element} */
	const result = {
		type: "element",
		tagName: "tr",
		properties: {},
		children: state.wrap(cells, true)
	};
	state.patch(node, result);
	return state.applyData(node, result);
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/handlers/table-cell.js
/**
* @import {Element} from 'hast'
* @import {TableCell} from 'mdast'
* @import {State} from '../state.js'
*/
/**
* Turn an mdast `tableCell` node into hast.
*
* @param {State} state
*   Info passed around.
* @param {TableCell} node
*   mdast node.
* @returns {Element}
*   hast node.
*/
function tableCell(state, node) {
	/** @type {Element} */
	const result = {
		type: "element",
		tagName: "td",
		properties: {},
		children: state.all(node)
	};
	state.patch(node, result);
	return state.applyData(node, result);
}
//#endregion
//#region ../../node_modules/trim-lines/index.js
var tab = 9;
var space = 32;
/**
* Remove initial and final spaces and tabs at the line breaks in `value`.
* Does not trim initial and final spaces and tabs of the value itself.
*
* @param {string} value
*   Value to trim.
* @returns {string}
*   Trimmed value.
*/
function trimLines(value) {
	const source = String(value);
	const search = /\r?\n|\r/g;
	let match = search.exec(source);
	let last = 0;
	/** @type {Array<string>} */
	const lines = [];
	while (match) {
		lines.push(trimLine(source.slice(last, match.index), last > 0, true), match[0]);
		last = match.index + match[0].length;
		match = search.exec(source);
	}
	lines.push(trimLine(source.slice(last), last > 0, false));
	return lines.join("");
}
/**
* @param {string} value
*   Line to trim.
* @param {boolean} start
*   Whether to trim the start of the line.
* @param {boolean} end
*   Whether to trim the end of the line.
* @returns {string}
*   Trimmed line.
*/
function trimLine(value, start, end) {
	let startIndex = 0;
	let endIndex = value.length;
	if (start) {
		let code = value.codePointAt(startIndex);
		while (code === tab || code === space) {
			startIndex++;
			code = value.codePointAt(startIndex);
		}
	}
	if (end) {
		let code = value.codePointAt(endIndex - 1);
		while (code === tab || code === space) {
			endIndex--;
			code = value.codePointAt(endIndex - 1);
		}
	}
	return endIndex > startIndex ? value.slice(startIndex, endIndex) : "";
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/handlers/text.js
/**
* @import {Element as HastElement, Text as HastText} from 'hast'
* @import {Text as MdastText} from 'mdast'
* @import {State} from '../state.js'
*/
/**
* Turn an mdast `text` node into hast.
*
* @param {State} state
*   Info passed around.
* @param {MdastText} node
*   mdast node.
* @returns {HastElement | HastText}
*   hast node.
*/
function text$2(state, node) {
	/** @type {HastText} */
	const result = {
		type: "text",
		value: trimLines(String(node.value))
	};
	state.patch(node, result);
	return state.applyData(node, result);
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js
/**
* @import {Element} from 'hast'
* @import {ThematicBreak} from 'mdast'
* @import {State} from '../state.js'
*/
/**
* Turn an mdast `thematicBreak` node into hast.
*
* @param {State} state
*   Info passed around.
* @param {ThematicBreak} node
*   mdast node.
* @returns {Element}
*   hast node.
*/
function thematicBreak$1(state, node) {
	/** @type {Element} */
	const result = {
		type: "element",
		tagName: "hr",
		properties: {},
		children: []
	};
	state.patch(node, result);
	return state.applyData(node, result);
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/handlers/index.js
/**
* @import {Handlers} from '../state.js'
*/
/**
* Default handlers for nodes.
*
* @satisfies {Handlers}
*/
var handlers = {
	blockquote: blockquote$1,
	break: hardBreak$1,
	code: code$2,
	delete: strikethrough,
	emphasis: emphasis$1,
	footnoteReference: footnoteReference$1,
	heading: heading$1,
	html: html$1,
	imageReference: imageReference$1,
	image: image$1,
	inlineCode: inlineCode$1,
	linkReference: linkReference$1,
	link: link$1,
	listItem: listItem$1,
	list: list$1,
	paragraph: paragraph$1,
	root: root$1,
	strong: strong$1,
	table,
	tableCell,
	tableRow,
	text: text$2,
	thematicBreak: thematicBreak$1,
	toml: ignore,
	yaml: ignore,
	definition: ignore,
	footnoteDefinition: ignore
};
function ignore() {}
//#endregion
//#region ../../node_modules/@ungap/structured-clone/esm/deserialize.js
var env = typeof self === "object" ? self : globalThis;
var deserializer = ($, _) => {
	const as = (out, index) => {
		$.set(index, out);
		return out;
	};
	const unpair = (index) => {
		if ($.has(index)) return $.get(index);
		const [type, value] = _[index];
		switch (type) {
			case 0:
			case -1: return as(value, index);
			case 1: {
				const arr = as([], index);
				for (const index of value) arr.push(unpair(index));
				return arr;
			}
			case 2: {
				const object = as({}, index);
				for (const [key, index] of value) object[unpair(key)] = unpair(index);
				return object;
			}
			case 3: return as(new Date(value), index);
			case 4: {
				const { source, flags } = value;
				return as(new RegExp(source, flags), index);
			}
			case 5: {
				const map = as(/* @__PURE__ */ new Map(), index);
				for (const [key, index] of value) map.set(unpair(key), unpair(index));
				return map;
			}
			case 6: {
				const set = as(/* @__PURE__ */ new Set(), index);
				for (const index of value) set.add(unpair(index));
				return set;
			}
			case 7: {
				const { name, message } = value;
				return as(new env[name](message), index);
			}
			case 8: return as(BigInt(value), index);
			case "BigInt": return as(Object(BigInt(value)), index);
			case "ArrayBuffer": return as(new Uint8Array(value).buffer, value);
			case "DataView": {
				const { buffer } = new Uint8Array(value);
				return as(new DataView(buffer), value);
			}
		}
		return as(new env[type](value), index);
	};
	return unpair;
};
/**
* @typedef {Array<string,any>} Record a type representation
*/
/**
* Returns a deserialized value from a serialized array of Records.
* @param {Record[]} serialized a previously serialized value.
* @returns {any}
*/
var deserialize = (serialized) => deserializer(/* @__PURE__ */ new Map(), serialized)(0);
//#endregion
//#region ../../node_modules/@ungap/structured-clone/esm/serialize.js
var EMPTY = "";
var { toString: toString$1 } = {};
var { keys: keys$1 } = Object;
var typeOf = (value) => {
	const type = typeof value;
	if (type !== "object" || !value) return [0, type];
	const asString = toString$1.call(value).slice(8, -1);
	switch (asString) {
		case "Array": return [1, EMPTY];
		case "Object": return [2, EMPTY];
		case "Date": return [3, EMPTY];
		case "RegExp": return [4, EMPTY];
		case "Map": return [5, EMPTY];
		case "Set": return [6, EMPTY];
		case "DataView": return [1, asString];
	}
	if (asString.includes("Array")) return [1, asString];
	if (asString.includes("Error")) return [7, asString];
	return [2, asString];
};
var shouldSkip = ([TYPE, type]) => TYPE === 0 && (type === "function" || type === "symbol");
var serializer = (strict, json, $, _) => {
	const as = (out, value) => {
		const index = _.push(out) - 1;
		$.set(value, index);
		return index;
	};
	const pair = (value) => {
		if ($.has(value)) return $.get(value);
		let [TYPE, type] = typeOf(value);
		switch (TYPE) {
			case 0: {
				let entry = value;
				switch (type) {
					case "bigint":
						TYPE = 8;
						entry = value.toString();
						break;
					case "function":
					case "symbol":
						if (strict) throw new TypeError("unable to serialize " + type);
						entry = null;
						break;
					case "undefined": return as([-1], value);
				}
				return as([TYPE, entry], value);
			}
			case 1: {
				if (type) {
					let spread = value;
					if (type === "DataView") spread = new Uint8Array(value.buffer);
					else if (type === "ArrayBuffer") spread = new Uint8Array(value);
					return as([type, [...spread]], value);
				}
				const arr = [];
				const index = as([TYPE, arr], value);
				for (const entry of value) arr.push(pair(entry));
				return index;
			}
			case 2: {
				if (type) switch (type) {
					case "BigInt": return as([type, value.toString()], value);
					case "Boolean":
					case "Number":
					case "String": return as([type, value.valueOf()], value);
				}
				if (json && "toJSON" in value) return pair(value.toJSON());
				const entries = [];
				const index = as([TYPE, entries], value);
				for (const key of keys$1(value)) if (strict || !shouldSkip(typeOf(value[key]))) entries.push([pair(key), pair(value[key])]);
				return index;
			}
			case 3: return as([TYPE, value.toISOString()], value);
			case 4: {
				const { source, flags } = value;
				return as([TYPE, {
					source,
					flags
				}], value);
			}
			case 5: {
				const entries = [];
				const index = as([TYPE, entries], value);
				for (const [key, entry] of value) if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry)))) entries.push([pair(key), pair(entry)]);
				return index;
			}
			case 6: {
				const entries = [];
				const index = as([TYPE, entries], value);
				for (const entry of value) if (strict || !shouldSkip(typeOf(entry))) entries.push(pair(entry));
				return index;
			}
		}
		const { message } = value;
		return as([TYPE, {
			name: type,
			message
		}], value);
	};
	return pair;
};
/**
* @typedef {Array<string,any>} Record a type representation
*/
/**
* Returns an array of serialized Records.
* @param {any} value a serializable value.
* @param {{json?: boolean, lossy?: boolean}?} options an object with a `lossy` or `json` property that,
*  if `true`, will not throw errors on incompatible types, and behave more
*  like JSON stringify would behave. Symbol and Function will be discarded.
* @returns {Record[]}
*/
var serialize$1 = (value, { json, lossy } = {}) => {
	const _ = [];
	return serializer(!(json || lossy), !!json, /* @__PURE__ */ new Map(), _)(value), _;
};
//#endregion
//#region ../../node_modules/@ungap/structured-clone/esm/index.js
/**
* @typedef {Array<string,any>} Record a type representation
*/
/**
* Returns an array of serialized Records.
* @param {any} any a serializable value.
* @param {{transfer?: any[], json?: boolean, lossy?: boolean}?} options an object with
* a transfer option (ignored when polyfilled) and/or non standard fields that
* fallback to the polyfill if present.
* @returns {Record[]}
*/
var esm_default = typeof structuredClone === "function" ? (any, options) => options && ("json" in options || "lossy" in options) ? deserialize(serialize$1(any, options)) : structuredClone(any) : (any, options) => deserialize(serialize$1(any, options));
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/footer.js
/**
* @import {ElementContent, Element} from 'hast'
* @import {State} from './state.js'
*/
/**
* @callback FootnoteBackContentTemplate
*   Generate content for the backreference dynamically.
*
*   For the following markdown:
*
*   ```markdown
*   Alpha[^micromark], bravo[^micromark], and charlie[^remark].
*
*   [^remark]: things about remark
*   [^micromark]: things about micromark
*   ```
*
*   This function will be called with:
*
*   *  `0` and `0` for the backreference from `things about micromark` to
*      `alpha`, as it is the first used definition, and the first call to it
*   *  `0` and `1` for the backreference from `things about micromark` to
*      `bravo`, as it is the first used definition, and the second call to it
*   *  `1` and `0` for the backreference from `things about remark` to
*      `charlie`, as it is the second used definition
* @param {number} referenceIndex
*   Index of the definition in the order that they are first referenced,
*   0-indexed.
* @param {number} rereferenceIndex
*   Index of calls to the same definition, 0-indexed.
* @returns {Array<ElementContent> | ElementContent | string}
*   Content for the backreference when linking back from definitions to their
*   reference.
*
* @callback FootnoteBackLabelTemplate
*   Generate a back label dynamically.
*
*   For the following markdown:
*
*   ```markdown
*   Alpha[^micromark], bravo[^micromark], and charlie[^remark].
*
*   [^remark]: things about remark
*   [^micromark]: things about micromark
*   ```
*
*   This function will be called with:
*
*   *  `0` and `0` for the backreference from `things about micromark` to
*      `alpha`, as it is the first used definition, and the first call to it
*   *  `0` and `1` for the backreference from `things about micromark` to
*      `bravo`, as it is the first used definition, and the second call to it
*   *  `1` and `0` for the backreference from `things about remark` to
*      `charlie`, as it is the second used definition
* @param {number} referenceIndex
*   Index of the definition in the order that they are first referenced,
*   0-indexed.
* @param {number} rereferenceIndex
*   Index of calls to the same definition, 0-indexed.
* @returns {string}
*   Back label to use when linking back from definitions to their reference.
*/
/**
* Generate the default content that GitHub uses on backreferences.
*
* @param {number} _
*   Index of the definition in the order that they are first referenced,
*   0-indexed.
* @param {number} rereferenceIndex
*   Index of calls to the same definition, 0-indexed.
* @returns {Array<ElementContent>}
*   Content.
*/
function defaultFootnoteBackContent(_, rereferenceIndex) {
	/** @type {Array<ElementContent>} */
	const result = [{
		type: "text",
		value: "↩"
	}];
	if (rereferenceIndex > 1) result.push({
		type: "element",
		tagName: "sup",
		properties: {},
		children: [{
			type: "text",
			value: String(rereferenceIndex)
		}]
	});
	return result;
}
/**
* Generate the default label that GitHub uses on backreferences.
*
* @param {number} referenceIndex
*   Index of the definition in the order that they are first referenced,
*   0-indexed.
* @param {number} rereferenceIndex
*   Index of calls to the same definition, 0-indexed.
* @returns {string}
*   Label.
*/
function defaultFootnoteBackLabel(referenceIndex, rereferenceIndex) {
	return "Back to reference " + (referenceIndex + 1) + (rereferenceIndex > 1 ? "-" + rereferenceIndex : "");
}
/**
* Generate a hast footer for called footnote definitions.
*
* @param {State} state
*   Info passed around.
* @returns {Element | undefined}
*   `section` element or `undefined`.
*/
function footer(state) {
	const clobberPrefix = typeof state.options.clobberPrefix === "string" ? state.options.clobberPrefix : "user-content-";
	const footnoteBackContent = state.options.footnoteBackContent || defaultFootnoteBackContent;
	const footnoteBackLabel = state.options.footnoteBackLabel || defaultFootnoteBackLabel;
	const footnoteLabel = state.options.footnoteLabel || "Footnotes";
	const footnoteLabelTagName = state.options.footnoteLabelTagName || "h2";
	const footnoteLabelProperties = state.options.footnoteLabelProperties || { className: ["sr-only"] };
	/** @type {Array<ElementContent>} */
	const listItems = [];
	let referenceIndex = -1;
	while (++referenceIndex < state.footnoteOrder.length) {
		const definition = state.footnoteById.get(state.footnoteOrder[referenceIndex]);
		if (!definition) continue;
		const content = state.all(definition);
		const id = String(definition.identifier).toUpperCase();
		const safeId = normalizeUri(id.toLowerCase());
		let rereferenceIndex = 0;
		/** @type {Array<ElementContent>} */
		const backReferences = [];
		const counts = state.footnoteCounts.get(id);
		while (counts !== void 0 && ++rereferenceIndex <= counts) {
			if (backReferences.length > 0) backReferences.push({
				type: "text",
				value: " "
			});
			let children = typeof footnoteBackContent === "string" ? footnoteBackContent : footnoteBackContent(referenceIndex, rereferenceIndex);
			if (typeof children === "string") children = {
				type: "text",
				value: children
			};
			backReferences.push({
				type: "element",
				tagName: "a",
				properties: {
					href: "#" + clobberPrefix + "fnref-" + safeId + (rereferenceIndex > 1 ? "-" + rereferenceIndex : ""),
					dataFootnoteBackref: "",
					ariaLabel: typeof footnoteBackLabel === "string" ? footnoteBackLabel : footnoteBackLabel(referenceIndex, rereferenceIndex),
					className: ["data-footnote-backref"]
				},
				children: Array.isArray(children) ? children : [children]
			});
		}
		const tail = content[content.length - 1];
		if (tail && tail.type === "element" && tail.tagName === "p") {
			const tailTail = tail.children[tail.children.length - 1];
			if (tailTail && tailTail.type === "text") tailTail.value += " ";
			else tail.children.push({
				type: "text",
				value: " "
			});
			tail.children.push(...backReferences);
		} else content.push(...backReferences);
		/** @type {Element} */
		const listItem = {
			type: "element",
			tagName: "li",
			properties: { id: clobberPrefix + "fn-" + safeId },
			children: state.wrap(content, true)
		};
		state.patch(definition, listItem);
		listItems.push(listItem);
	}
	if (listItems.length === 0) return;
	return {
		type: "element",
		tagName: "section",
		properties: {
			dataFootnotes: true,
			className: ["footnotes"]
		},
		children: [
			{
				type: "element",
				tagName: footnoteLabelTagName,
				properties: {
					...esm_default(footnoteLabelProperties),
					id: "footnote-label"
				},
				children: [{
					type: "text",
					value: footnoteLabel
				}]
			},
			{
				type: "text",
				value: "\n"
			},
			{
				type: "element",
				tagName: "ol",
				properties: {},
				children: state.wrap(listItems, true)
			},
			{
				type: "text",
				value: "\n"
			}
		]
	};
}
//#endregion
//#region ../../node_modules/unist-util-is/lib/index.js
/**
* Generate an assertion from a test.
*
* Useful if you’re going to test many nodes, for example when creating a
* utility where something else passes a compatible test.
*
* The created function is a bit faster because it expects valid input only:
* a `node`, `index`, and `parent`.
*
* @param {Test} test
*   *   when nullish, checks if `node` is a `Node`.
*   *   when `string`, works like passing `(node) => node.type === test`.
*   *   when `function` checks if function passed the node is true.
*   *   when `object`, checks that all keys in test are in node, and that they have (strictly) equal values.
*   *   when `array`, checks if any one of the subtests pass.
* @returns {Check}
*   An assertion.
*/
var convert = (function(test) {
	if (test === null || test === void 0) return ok;
	if (typeof test === "function") return castFactory$1(test);
	if (typeof test === "object") return Array.isArray(test) ? anyFactory$1(test) : propsFactory(test);
	if (typeof test === "string") return typeFactory(test);
	throw new Error("Expected function, string, or object as test");
});
/**
* @param {Array<Props | TestFunction | string>} tests
* @returns {Check}
*/
function anyFactory$1(tests) {
	/** @type {Array<Check>} */
	const checks = [];
	let index = -1;
	while (++index < tests.length) checks[index] = convert(tests[index]);
	return castFactory$1(any);
	/**
	* @this {unknown}
	* @type {TestFunction}
	*/
	function any(...parameters) {
		let index = -1;
		while (++index < checks.length) if (checks[index].apply(this, parameters)) return true;
		return false;
	}
}
/**
* Turn an object into a test for a node with a certain fields.
*
* @param {Props} check
* @returns {Check}
*/
function propsFactory(check) {
	const checkAsRecord = check;
	return castFactory$1(all);
	/**
	* @param {Node} node
	* @returns {boolean}
	*/
	function all(node) {
		const nodeAsRecord = node;
		/** @type {string} */
		let key;
		for (key in check) if (nodeAsRecord[key] !== checkAsRecord[key]) return false;
		return true;
	}
}
/**
* Turn a string into a test for a node with a certain type.
*
* @param {string} check
* @returns {Check}
*/
function typeFactory(check) {
	return castFactory$1(type);
	/**
	* @param {Node} node
	*/
	function type(node) {
		return node && node.type === check;
	}
}
/**
* Turn a custom test into a test for a node that passes that test.
*
* @param {TestFunction} testFunction
* @returns {Check}
*/
function castFactory$1(testFunction) {
	return check;
	/**
	* @this {unknown}
	* @type {Check}
	*/
	function check(value, index, parent) {
		return Boolean(looksLikeANode(value) && testFunction.call(this, value, typeof index === "number" ? index : void 0, parent || void 0));
	}
}
function ok() {
	return true;
}
/**
* @param {unknown} value
* @returns {value is Node}
*/
function looksLikeANode(value) {
	return value !== null && typeof value === "object" && "type" in value;
}
//#endregion
//#region ../../node_modules/unist-util-visit-parents/lib/color.js
/**
* @param {string} d
* @returns {string}
*/
function color(d) {
	return d;
}
//#endregion
//#region ../../node_modules/unist-util-visit-parents/lib/index.js
/**
* @typedef {import('unist').Node} UnistNode
* @typedef {import('unist').Parent} UnistParent
*/
/**
* @typedef {Exclude<import('unist-util-is').Test, undefined> | undefined} Test
*   Test from `unist-util-is`.
*
*   Note: we have remove and add `undefined`, because otherwise when generating
*   automatic `.d.ts` files, TS tries to flatten paths from a local perspective,
*   which doesn’t work when publishing on npm.
*/
/**
* @typedef {(
*   Fn extends (value: any) => value is infer Thing
*   ? Thing
*   : Fallback
* )} Predicate
*   Get the value of a type guard `Fn`.
* @template Fn
*   Value; typically function that is a type guard (such as `(x): x is Y`).
* @template Fallback
*   Value to yield if `Fn` is not a type guard.
*/
/**
* @typedef {(
*   Check extends null | undefined // No test.
*   ? Value
*   : Value extends {type: Check} // String (type) test.
*   ? Value
*   : Value extends Check // Partial test.
*   ? Value
*   : Check extends Function // Function test.
*   ? Predicate<Check, Value> extends Value
*     ? Predicate<Check, Value>
*     : never
*   : never // Some other test?
* )} MatchesOne
*   Check whether a node matches a primitive check in the type system.
* @template Value
*   Value; typically unist `Node`.
* @template Check
*   Value; typically `unist-util-is`-compatible test, but not arrays.
*/
/**
* @typedef {(
*   Check extends Array<any>
*   ? MatchesOne<Value, Check[keyof Check]>
*   : MatchesOne<Value, Check>
* )} Matches
*   Check whether a node matches a check in the type system.
* @template Value
*   Value; typically unist `Node`.
* @template Check
*   Value; typically `unist-util-is`-compatible test.
*/
/**
* @typedef {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10} Uint
*   Number; capped reasonably.
*/
/**
* @typedef {I extends 0 ? 1 : I extends 1 ? 2 : I extends 2 ? 3 : I extends 3 ? 4 : I extends 4 ? 5 : I extends 5 ? 6 : I extends 6 ? 7 : I extends 7 ? 8 : I extends 8 ? 9 : 10} Increment
*   Increment a number in the type system.
* @template {Uint} [I=0]
*   Index.
*/
/**
* @typedef {(
*   Node extends UnistParent
*   ? Node extends {children: Array<infer Children>}
*     ? Child extends Children ? Node : never
*     : never
*   : never
* )} InternalParent
*   Collect nodes that can be parents of `Child`.
* @template {UnistNode} Node
*   All node types in a tree.
* @template {UnistNode} Child
*   Node to search for.
*/
/**
* @typedef {InternalParent<InclusiveDescendant<Tree>, Child>} Parent
*   Collect nodes in `Tree` that can be parents of `Child`.
* @template {UnistNode} Tree
*   All node types in a tree.
* @template {UnistNode} Child
*   Node to search for.
*/
/**
* @typedef {(
*   Depth extends Max
*   ? never
*   :
*     | InternalParent<Node, Child>
*     | InternalAncestor<Node, InternalParent<Node, Child>, Max, Increment<Depth>>
* )} InternalAncestor
*   Collect nodes in `Tree` that can be ancestors of `Child`.
* @template {UnistNode} Node
*   All node types in a tree.
* @template {UnistNode} Child
*   Node to search for.
* @template {Uint} [Max=10]
*   Max; searches up to this depth.
* @template {Uint} [Depth=0]
*   Current depth.
*/
/**
* @typedef {InternalAncestor<InclusiveDescendant<Tree>, Child>} Ancestor
*   Collect nodes in `Tree` that can be ancestors of `Child`.
* @template {UnistNode} Tree
*   All node types in a tree.
* @template {UnistNode} Child
*   Node to search for.
*/
/**
* @typedef {(
*   Tree extends UnistParent
*     ? Depth extends Max
*       ? Tree
*       : Tree | InclusiveDescendant<Tree['children'][number], Max, Increment<Depth>>
*     : Tree
* )} InclusiveDescendant
*   Collect all (inclusive) descendants of `Tree`.
*
*   > 👉 **Note**: for performance reasons, this seems to be the fastest way to
*   > recurse without actually running into an infinite loop, which the
*   > previous version did.
*   >
*   > Practically, a max of `2` is typically enough assuming a `Root` is
*   > passed, but it doesn’t improve performance.
*   > It gets higher with `List > ListItem > Table > TableRow > TableCell`.
*   > Using up to `10` doesn’t hurt or help either.
* @template {UnistNode} Tree
*   Tree type.
* @template {Uint} [Max=10]
*   Max; searches up to this depth.
* @template {Uint} [Depth=0]
*   Current depth.
*/
/**
* @typedef {'skip' | boolean} Action
*   Union of the action types.
*
* @typedef {number} Index
*   Move to the sibling at `index` next (after node itself is completely
*   traversed).
*
*   Useful if mutating the tree, such as removing the node the visitor is
*   currently on, or any of its previous siblings.
*   Results less than 0 or greater than or equal to `children.length` stop
*   traversing the parent.
*
* @typedef {[(Action | null | undefined | void)?, (Index | null | undefined)?]} ActionTuple
*   List with one or two values, the first an action, the second an index.
*
* @typedef {Action | ActionTuple | Index | null | undefined | void} VisitorResult
*   Any value that can be returned from a visitor.
*/
/**
* @callback Visitor
*   Handle a node (matching `test`, if given).
*
*   Visitors are free to transform `node`.
*   They can also transform the parent of node (the last of `ancestors`).
*
*   Replacing `node` itself, if `SKIP` is not returned, still causes its
*   descendants to be walked (which is a bug).
*
*   When adding or removing previous siblings of `node` (or next siblings, in
*   case of reverse), the `Visitor` should return a new `Index` to specify the
*   sibling to traverse after `node` is traversed.
*   Adding or removing next siblings of `node` (or previous siblings, in case
*   of reverse) is handled as expected without needing to return a new `Index`.
*
*   Removing the children property of an ancestor still results in them being
*   traversed.
* @param {Visited} node
*   Found node.
* @param {Array<VisitedParents>} ancestors
*   Ancestors of `node`.
* @returns {VisitorResult}
*   What to do next.
*
*   An `Index` is treated as a tuple of `[CONTINUE, Index]`.
*   An `Action` is treated as a tuple of `[Action]`.
*
*   Passing a tuple back only makes sense if the `Action` is `SKIP`.
*   When the `Action` is `EXIT`, that action can be returned.
*   When the `Action` is `CONTINUE`, `Index` can be returned.
* @template {UnistNode} [Visited=UnistNode]
*   Visited node type.
* @template {UnistParent} [VisitedParents=UnistParent]
*   Ancestor type.
*/
/**
* @typedef {Visitor<Matches<InclusiveDescendant<Tree>, Check>, Ancestor<Tree, Matches<InclusiveDescendant<Tree>, Check>>>} BuildVisitor
*   Build a typed `Visitor` function from a tree and a test.
*
*   It will infer which values are passed as `node` and which as `parents`.
* @template {UnistNode} [Tree=UnistNode]
*   Tree type.
* @template {Test} [Check=Test]
*   Test type.
*/
/** @type {Readonly<ActionTuple>} */
var empty = [];
/**
* Visit nodes, with ancestral information.
*
* This algorithm performs *depth-first* *tree traversal* in *preorder*
* (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).
*
* You can choose for which nodes `visitor` is called by passing a `test`.
* For complex tests, you should test yourself in `visitor`, as it will be
* faster and will have improved type information.
*
* Walking the tree is an intensive task.
* Make use of the return values of the visitor when possible.
* Instead of walking a tree multiple times, walk it once, use `unist-util-is`
* to check if a node matches, and then perform different operations.
*
* You can change the tree.
* See `Visitor` for more info.
*
* @overload
* @param {Tree} tree
* @param {Check} check
* @param {BuildVisitor<Tree, Check>} visitor
* @param {boolean | null | undefined} [reverse]
* @returns {undefined}
*
* @overload
* @param {Tree} tree
* @param {BuildVisitor<Tree>} visitor
* @param {boolean | null | undefined} [reverse]
* @returns {undefined}
*
* @param {UnistNode} tree
*   Tree to traverse.
* @param {Visitor | Test} test
*   `unist-util-is`-compatible test
* @param {Visitor | boolean | null | undefined} [visitor]
*   Handle each node.
* @param {boolean | null | undefined} [reverse]
*   Traverse in reverse preorder (NRL) instead of the default preorder (NLR).
* @returns {undefined}
*   Nothing.
*
* @template {UnistNode} Tree
*   Node type.
* @template {Test} Check
*   `unist-util-is`-compatible test.
*/
function visitParents(tree, test, visitor, reverse) {
	/** @type {Test} */
	let check;
	if (typeof test === "function" && typeof visitor !== "function") {
		reverse = visitor;
		visitor = test;
	} else check = test;
	const is = convert(check);
	const step = reverse ? -1 : 1;
	factory(tree, void 0, [])();
	/**
	* @param {UnistNode} node
	* @param {number | undefined} index
	* @param {Array<UnistParent>} parents
	*/
	function factory(node, index, parents) {
		const value = node && typeof node === "object" ? node : {};
		if (typeof value.type === "string") {
			const name = typeof value.tagName === "string" ? value.tagName : typeof value.name === "string" ? value.name : void 0;
			Object.defineProperty(visit, "name", { value: "node (" + color(node.type + (name ? "<" + name + ">" : "")) + ")" });
		}
		return visit;
		function visit() {
			/** @type {Readonly<ActionTuple>} */
			let result = empty;
			/** @type {Readonly<ActionTuple>} */
			let subresult;
			/** @type {number} */
			let offset;
			/** @type {Array<UnistParent>} */
			let grandparents;
			if (!test || is(node, index, parents[parents.length - 1] || void 0)) {
				result = toResult(visitor(node, parents));
				if (result[0] === false) return result;
			}
			if ("children" in node && node.children) {
				const nodeAsParent = node;
				if (nodeAsParent.children && result[0] !== "skip") {
					offset = (reverse ? nodeAsParent.children.length : -1) + step;
					grandparents = parents.concat(nodeAsParent);
					while (offset > -1 && offset < nodeAsParent.children.length) {
						const child = nodeAsParent.children[offset];
						subresult = factory(child, offset, grandparents)();
						if (subresult[0] === false) return subresult;
						offset = typeof subresult[1] === "number" ? subresult[1] : offset + step;
					}
				}
			}
			return result;
		}
	}
}
/**
* Turn a return value into a clean result.
*
* @param {VisitorResult} value
*   Valid return values from visitors.
* @returns {Readonly<ActionTuple>}
*   Clean result.
*/
function toResult(value) {
	if (Array.isArray(value)) return value;
	if (typeof value === "number") return [true, value];
	return value === null || value === void 0 ? empty : [value];
}
//#endregion
//#region ../../node_modules/unist-util-visit/lib/index.js
/**
* @typedef {import('unist').Node} UnistNode
* @typedef {import('unist').Parent} UnistParent
* @typedef {import('unist-util-visit-parents').VisitorResult} VisitorResult
*/
/**
* @typedef {Exclude<import('unist-util-is').Test, undefined> | undefined} Test
*   Test from `unist-util-is`.
*
*   Note: we have remove and add `undefined`, because otherwise when generating
*   automatic `.d.ts` files, TS tries to flatten paths from a local perspective,
*   which doesn’t work when publishing on npm.
*/
/**
* @typedef {(
*   Fn extends (value: any) => value is infer Thing
*   ? Thing
*   : Fallback
* )} Predicate
*   Get the value of a type guard `Fn`.
* @template Fn
*   Value; typically function that is a type guard (such as `(x): x is Y`).
* @template Fallback
*   Value to yield if `Fn` is not a type guard.
*/
/**
* @typedef {(
*   Check extends null | undefined // No test.
*   ? Value
*   : Value extends {type: Check} // String (type) test.
*   ? Value
*   : Value extends Check // Partial test.
*   ? Value
*   : Check extends Function // Function test.
*   ? Predicate<Check, Value> extends Value
*     ? Predicate<Check, Value>
*     : never
*   : never // Some other test?
* )} MatchesOne
*   Check whether a node matches a primitive check in the type system.
* @template Value
*   Value; typically unist `Node`.
* @template Check
*   Value; typically `unist-util-is`-compatible test, but not arrays.
*/
/**
* @typedef {(
*   Check extends Array<any>
*   ? MatchesOne<Value, Check[keyof Check]>
*   : MatchesOne<Value, Check>
* )} Matches
*   Check whether a node matches a check in the type system.
* @template Value
*   Value; typically unist `Node`.
* @template Check
*   Value; typically `unist-util-is`-compatible test.
*/
/**
* @typedef {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10} Uint
*   Number; capped reasonably.
*/
/**
* @typedef {I extends 0 ? 1 : I extends 1 ? 2 : I extends 2 ? 3 : I extends 3 ? 4 : I extends 4 ? 5 : I extends 5 ? 6 : I extends 6 ? 7 : I extends 7 ? 8 : I extends 8 ? 9 : 10} Increment
*   Increment a number in the type system.
* @template {Uint} [I=0]
*   Index.
*/
/**
* @typedef {(
*   Node extends UnistParent
*   ? Node extends {children: Array<infer Children>}
*     ? Child extends Children ? Node : never
*     : never
*   : never
* )} InternalParent
*   Collect nodes that can be parents of `Child`.
* @template {UnistNode} Node
*   All node types in a tree.
* @template {UnistNode} Child
*   Node to search for.
*/
/**
* @typedef {InternalParent<InclusiveDescendant<Tree>, Child>} Parent
*   Collect nodes in `Tree` that can be parents of `Child`.
* @template {UnistNode} Tree
*   All node types in a tree.
* @template {UnistNode} Child
*   Node to search for.
*/
/**
* @typedef {(
*   Depth extends Max
*   ? never
*   :
*     | InternalParent<Node, Child>
*     | InternalAncestor<Node, InternalParent<Node, Child>, Max, Increment<Depth>>
* )} InternalAncestor
*   Collect nodes in `Tree` that can be ancestors of `Child`.
* @template {UnistNode} Node
*   All node types in a tree.
* @template {UnistNode} Child
*   Node to search for.
* @template {Uint} [Max=10]
*   Max; searches up to this depth.
* @template {Uint} [Depth=0]
*   Current depth.
*/
/**
* @typedef {(
*   Tree extends UnistParent
*     ? Depth extends Max
*       ? Tree
*       : Tree | InclusiveDescendant<Tree['children'][number], Max, Increment<Depth>>
*     : Tree
* )} InclusiveDescendant
*   Collect all (inclusive) descendants of `Tree`.
*
*   > 👉 **Note**: for performance reasons, this seems to be the fastest way to
*   > recurse without actually running into an infinite loop, which the
*   > previous version did.
*   >
*   > Practically, a max of `2` is typically enough assuming a `Root` is
*   > passed, but it doesn’t improve performance.
*   > It gets higher with `List > ListItem > Table > TableRow > TableCell`.
*   > Using up to `10` doesn’t hurt or help either.
* @template {UnistNode} Tree
*   Tree type.
* @template {Uint} [Max=10]
*   Max; searches up to this depth.
* @template {Uint} [Depth=0]
*   Current depth.
*/
/**
* @callback Visitor
*   Handle a node (matching `test`, if given).
*
*   Visitors are free to transform `node`.
*   They can also transform `parent`.
*
*   Replacing `node` itself, if `SKIP` is not returned, still causes its
*   descendants to be walked (which is a bug).
*
*   When adding or removing previous siblings of `node` (or next siblings, in
*   case of reverse), the `Visitor` should return a new `Index` to specify the
*   sibling to traverse after `node` is traversed.
*   Adding or removing next siblings of `node` (or previous siblings, in case
*   of reverse) is handled as expected without needing to return a new `Index`.
*
*   Removing the children property of `parent` still results in them being
*   traversed.
* @param {Visited} node
*   Found node.
* @param {Visited extends UnistNode ? number | undefined : never} index
*   Index of `node` in `parent`.
* @param {Ancestor extends UnistParent ? Ancestor | undefined : never} parent
*   Parent of `node`.
* @returns {VisitorResult}
*   What to do next.
*
*   An `Index` is treated as a tuple of `[CONTINUE, Index]`.
*   An `Action` is treated as a tuple of `[Action]`.
*
*   Passing a tuple back only makes sense if the `Action` is `SKIP`.
*   When the `Action` is `EXIT`, that action can be returned.
*   When the `Action` is `CONTINUE`, `Index` can be returned.
* @template {UnistNode} [Visited=UnistNode]
*   Visited node type.
* @template {UnistParent} [Ancestor=UnistParent]
*   Ancestor type.
*/
/**
* @typedef {Visitor<Visited, Parent<Ancestor, Visited>>} BuildVisitorFromMatch
*   Build a typed `Visitor` function from a node and all possible parents.
*
*   It will infer which values are passed as `node` and which as `parent`.
* @template {UnistNode} Visited
*   Node type.
* @template {UnistParent} Ancestor
*   Parent type.
*/
/**
* @typedef {(
*   BuildVisitorFromMatch<
*     Matches<Descendant, Check>,
*     Extract<Descendant, UnistParent>
*   >
* )} BuildVisitorFromDescendants
*   Build a typed `Visitor` function from a list of descendants and a test.
*
*   It will infer which values are passed as `node` and which as `parent`.
* @template {UnistNode} Descendant
*   Node type.
* @template {Test} Check
*   Test type.
*/
/**
* @typedef {(
*   BuildVisitorFromDescendants<
*     InclusiveDescendant<Tree>,
*     Check
*   >
* )} BuildVisitor
*   Build a typed `Visitor` function from a tree and a test.
*
*   It will infer which values are passed as `node` and which as `parent`.
* @template {UnistNode} [Tree=UnistNode]
*   Node type.
* @template {Test} [Check=Test]
*   Test type.
*/
/**
* Visit nodes.
*
* This algorithm performs *depth-first* *tree traversal* in *preorder*
* (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).
*
* You can choose for which nodes `visitor` is called by passing a `test`.
* For complex tests, you should test yourself in `visitor`, as it will be
* faster and will have improved type information.
*
* Walking the tree is an intensive task.
* Make use of the return values of the visitor when possible.
* Instead of walking a tree multiple times, walk it once, use `unist-util-is`
* to check if a node matches, and then perform different operations.
*
* You can change the tree.
* See `Visitor` for more info.
*
* @overload
* @param {Tree} tree
* @param {Check} check
* @param {BuildVisitor<Tree, Check>} visitor
* @param {boolean | null | undefined} [reverse]
* @returns {undefined}
*
* @overload
* @param {Tree} tree
* @param {BuildVisitor<Tree>} visitor
* @param {boolean | null | undefined} [reverse]
* @returns {undefined}
*
* @param {UnistNode} tree
*   Tree to traverse.
* @param {Visitor | Test} testOrVisitor
*   `unist-util-is`-compatible test (optional, omit to pass a visitor).
* @param {Visitor | boolean | null | undefined} [visitorOrReverse]
*   Handle each node (when test is omitted, pass `reverse`).
* @param {boolean | null | undefined} [maybeReverse=false]
*   Traverse in reverse preorder (NRL) instead of the default preorder (NLR).
* @returns {undefined}
*   Nothing.
*
* @template {UnistNode} Tree
*   Node type.
* @template {Test} Check
*   `unist-util-is`-compatible test.
*/
function visit(tree, testOrVisitor, visitorOrReverse, maybeReverse) {
	/** @type {boolean | null | undefined} */
	let reverse;
	/** @type {Test} */
	let test;
	/** @type {Visitor} */
	let visitor;
	if (typeof testOrVisitor === "function" && typeof visitorOrReverse !== "function") {
		test = void 0;
		visitor = testOrVisitor;
		reverse = visitorOrReverse;
	} else {
		test = testOrVisitor;
		visitor = visitorOrReverse;
		reverse = maybeReverse;
	}
	visitParents(tree, test, overload, reverse);
	/**
	* @param {UnistNode} node
	* @param {Array<UnistParent>} parents
	*/
	function overload(node, parents) {
		const parent = parents[parents.length - 1];
		const index = parent ? parent.children.indexOf(node) : void 0;
		return visitor(node, index, parent);
	}
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/state.js
/**
* @import {
*   ElementContent as HastElementContent,
*   Element as HastElement,
*   Nodes as HastNodes,
*   Properties as HastProperties,
*   RootContent as HastRootContent,
*   Text as HastText
* } from 'hast'
* @import {
*   Definition as MdastDefinition,
*   FootnoteDefinition as MdastFootnoteDefinition,
*   Nodes as MdastNodes,
*   Parents as MdastParents
* } from 'mdast'
* @import {VFile} from 'vfile'
* @import {
*   FootnoteBackContentTemplate,
*   FootnoteBackLabelTemplate
* } from './footer.js'
*/
/**
* @callback Handler
*   Handle a node.
* @param {State} state
*   Info passed around.
* @param {any} node
*   mdast node to handle.
* @param {MdastParents | undefined} parent
*   Parent of `node`.
* @returns {Array<HastElementContent> | HastElementContent | undefined}
*   hast node.
*
* @typedef {Partial<Record<MdastNodes['type'], Handler>>} Handlers
*   Handle nodes.
*
* @typedef Options
*   Configuration (optional).
* @property {boolean | null | undefined} [allowDangerousHtml=false]
*   Whether to persist raw HTML in markdown in the hast tree (default:
*   `false`).
* @property {string | null | undefined} [clobberPrefix='user-content-']
*   Prefix to use before the `id` property on footnotes to prevent them from
*   *clobbering* (default: `'user-content-'`).
*
*   Pass `''` for trusted markdown and when you are careful with
*   polyfilling.
*   You could pass a different prefix.
*
*   DOM clobbering is this:
*
*   ```html
*   <p id="x"></p>
*   <script>alert(x) // `x` now refers to the `p#x` DOM element<\/script>
*   ```
*
*   The above example shows that elements are made available by browsers, by
*   their ID, on the `window` object.
*   This is a security risk because you might be expecting some other variable
*   at that place.
*   It can also break polyfills.
*   Using a prefix solves these problems.
* @property {VFile | null | undefined} [file]
*   Corresponding virtual file representing the input document (optional).
* @property {FootnoteBackContentTemplate | string | null | undefined} [footnoteBackContent]
*   Content of the backreference back to references (default: `defaultFootnoteBackContent`).
*
*   The default value is:
*
*   ```js
*   function defaultFootnoteBackContent(_, rereferenceIndex) {
*     const result = [{type: 'text', value: '↩'}]
*
*     if (rereferenceIndex > 1) {
*       result.push({
*         type: 'element',
*         tagName: 'sup',
*         properties: {},
*         children: [{type: 'text', value: String(rereferenceIndex)}]
*       })
*     }
*
*     return result
*   }
*   ```
*
*   This content is used in the `a` element of each backreference (the `↩`
*   links).
* @property {FootnoteBackLabelTemplate | string | null | undefined} [footnoteBackLabel]
*   Label to describe the backreference back to references (default:
*   `defaultFootnoteBackLabel`).
*
*   The default value is:
*
*   ```js
*   function defaultFootnoteBackLabel(referenceIndex, rereferenceIndex) {
*    return (
*      'Back to reference ' +
*      (referenceIndex + 1) +
*      (rereferenceIndex > 1 ? '-' + rereferenceIndex : '')
*    )
*   }
*   ```
*
*   Change it when the markdown is not in English.
*
*   This label is used in the `ariaLabel` property on each backreference
*   (the `↩` links).
*   It affects users of assistive technology.
* @property {string | null | undefined} [footnoteLabel='Footnotes']
*   Textual label to use for the footnotes section (default: `'Footnotes'`).
*
*   Change it when the markdown is not in English.
*
*   This label is typically hidden visually (assuming a `sr-only` CSS class
*   is defined that does that) and so affects screen readers only.
*   If you do have such a class, but want to show this section to everyone,
*   pass different properties with the `footnoteLabelProperties` option.
* @property {HastProperties | null | undefined} [footnoteLabelProperties={className: ['sr-only']}]
*   Properties to use on the footnote label (default: `{className:
*   ['sr-only']}`).
*
*   Change it to show the label and add other properties.
*
*   This label is typically hidden visually (assuming an `sr-only` CSS class
*   is defined that does that) and so affects screen readers only.
*   If you do have such a class, but want to show this section to everyone,
*   pass an empty string.
*   You can also add different properties.
*
*   > **Note**: `id: 'footnote-label'` is always added, because footnote
*   > calls use it with `aria-describedby` to provide an accessible label.
* @property {string | null | undefined} [footnoteLabelTagName='h2']
*   HTML tag name to use for the footnote label element (default: `'h2'`).
*
*   Change it to match your document structure.
*
*   This label is typically hidden visually (assuming a `sr-only` CSS class
*   is defined that does that) and so affects screen readers only.
*   If you do have such a class, but want to show this section to everyone,
*   pass different properties with the `footnoteLabelProperties` option.
* @property {Handlers | null | undefined} [handlers]
*   Extra handlers for nodes (optional).
* @property {Array<MdastNodes['type']> | null | undefined} [passThrough]
*   List of custom mdast node types to pass through (keep) in hast (note that
*   the node itself is passed, but eventual children are transformed)
*   (optional).
* @property {Handler | null | undefined} [unknownHandler]
*   Handler for all unknown nodes (optional).
*
* @typedef State
*   Info passed around.
* @property {(node: MdastNodes) => Array<HastElementContent>} all
*   Transform the children of an mdast parent to hast.
* @property {<Type extends HastNodes>(from: MdastNodes, to: Type) => HastElement | Type} applyData
*   Honor the `data` of `from`, and generate an element instead of `node`.
* @property {Map<string, MdastDefinition>} definitionById
*   Definitions by their identifier.
* @property {Map<string, MdastFootnoteDefinition>} footnoteById
*   Footnote definitions by their identifier.
* @property {Map<string, number>} footnoteCounts
*   Counts for how often the same footnote was called.
* @property {Array<string>} footnoteOrder
*   Identifiers of order when footnote calls first appear in tree order.
* @property {Handlers} handlers
*   Applied handlers.
* @property {(node: MdastNodes, parent: MdastParents | undefined) => Array<HastElementContent> | HastElementContent | undefined} one
*   Transform an mdast node to hast.
* @property {Options} options
*   Configuration.
* @property {(from: MdastNodes, node: HastNodes) => undefined} patch
*   Copy a node’s positional info.
* @property {<Type extends HastRootContent>(nodes: Array<Type>, loose?: boolean | undefined) => Array<HastText | Type>} wrap
*   Wrap `nodes` with line endings between each node, adds initial/final line endings when `loose`.
*/
var own$1 = {}.hasOwnProperty;
/** @type {Options} */
var emptyOptions$2 = {};
/**
* Create `state` from an mdast tree.
*
* @param {MdastNodes} tree
*   mdast node to transform.
* @param {Options | null | undefined} [options]
*   Configuration (optional).
* @returns {State}
*   `state` function.
*/
function createState(tree, options) {
	const settings = options || emptyOptions$2;
	/** @type {Map<string, MdastDefinition>} */
	const definitionById = /* @__PURE__ */ new Map();
	/** @type {Map<string, MdastFootnoteDefinition>} */
	const footnoteById = /* @__PURE__ */ new Map();
	/** @type {State} */
	const state = {
		all,
		applyData,
		definitionById,
		footnoteById,
		footnoteCounts: /* @__PURE__ */ new Map(),
		footnoteOrder: [],
		handlers: {
			...handlers,
			...settings.handlers
		},
		one,
		options: settings,
		patch,
		wrap: wrap$1
	};
	visit(tree, function(node) {
		if (node.type === "definition" || node.type === "footnoteDefinition") {
			const map = node.type === "definition" ? definitionById : footnoteById;
			const id = String(node.identifier).toUpperCase();
			if (!map.has(id)) map.set(id, node);
		}
	});
	return state;
	/**
	* Transform an mdast node into a hast node.
	*
	* @param {MdastNodes} node
	*   mdast node.
	* @param {MdastParents | undefined} [parent]
	*   Parent of `node`.
	* @returns {Array<HastElementContent> | HastElementContent | undefined}
	*   Resulting hast node.
	*/
	function one(node, parent) {
		const type = node.type;
		const handle = state.handlers[type];
		if (own$1.call(state.handlers, type) && handle) return handle(state, node, parent);
		if (state.options.passThrough && state.options.passThrough.includes(type)) {
			if ("children" in node) {
				const { children, ...shallow } = node;
				const result = esm_default(shallow);
				result.children = state.all(node);
				return result;
			}
			return esm_default(node);
		}
		return (state.options.unknownHandler || defaultUnknownHandler)(state, node, parent);
	}
	/**
	* Transform the children of an mdast node into hast nodes.
	*
	* @param {MdastNodes} parent
	*   mdast node to compile
	* @returns {Array<HastElementContent>}
	*   Resulting hast nodes.
	*/
	function all(parent) {
		/** @type {Array<HastElementContent>} */
		const values = [];
		if ("children" in parent) {
			const nodes = parent.children;
			let index = -1;
			while (++index < nodes.length) {
				const result = state.one(nodes[index], parent);
				if (result) {
					if (index && nodes[index - 1].type === "break") {
						if (!Array.isArray(result) && result.type === "text") result.value = trimMarkdownSpaceStart(result.value);
						if (!Array.isArray(result) && result.type === "element") {
							const head = result.children[0];
							if (head && head.type === "text") head.value = trimMarkdownSpaceStart(head.value);
						}
					}
					if (Array.isArray(result)) values.push(...result);
					else values.push(result);
				}
			}
		}
		return values;
	}
}
/**
* Copy a node’s positional info.
*
* @param {MdastNodes} from
*   mdast node to copy from.
* @param {HastNodes} to
*   hast node to copy into.
* @returns {undefined}
*   Nothing.
*/
function patch(from, to) {
	if (from.position) to.position = position$1(from);
}
/**
* Honor the `data` of `from` and maybe generate an element instead of `to`.
*
* @template {HastNodes} Type
*   Node type.
* @param {MdastNodes} from
*   mdast node to use data from.
* @param {Type} to
*   hast node to change.
* @returns {HastElement | Type}
*   Nothing.
*/
function applyData(from, to) {
	/** @type {HastElement | Type} */
	let result = to;
	if (from && from.data) {
		const hName = from.data.hName;
		const hChildren = from.data.hChildren;
		const hProperties = from.data.hProperties;
		if (typeof hName === "string") if (result.type === "element") result.tagName = hName;
		else result = {
			type: "element",
			tagName: hName,
			properties: {},
			children: "children" in result ? result.children : [result]
		};
		if (result.type === "element" && hProperties) Object.assign(result.properties, esm_default(hProperties));
		if ("children" in result && result.children && hChildren !== null && hChildren !== void 0) result.children = hChildren;
	}
	return result;
}
/**
* Transform an unknown node.
*
* @param {State} state
*   Info passed around.
* @param {MdastNodes} node
*   Unknown mdast node.
* @returns {HastElement | HastText}
*   Resulting hast node.
*/
function defaultUnknownHandler(state, node) {
	const data = node.data || {};
	/** @type {HastElement | HastText} */
	const result = "value" in node && !(own$1.call(data, "hProperties") || own$1.call(data, "hChildren")) ? {
		type: "text",
		value: node.value
	} : {
		type: "element",
		tagName: "div",
		properties: {},
		children: state.all(node)
	};
	state.patch(node, result);
	return state.applyData(node, result);
}
/**
* Wrap `nodes` with line endings between each node.
*
* @template {HastRootContent} Type
*   Node type.
* @param {Array<Type>} nodes
*   List of nodes to wrap.
* @param {boolean | undefined} [loose=false]
*   Whether to add line endings at start and end (default: `false`).
* @returns {Array<HastText | Type>}
*   Wrapped nodes.
*/
function wrap$1(nodes, loose) {
	/** @type {Array<HastText | Type>} */
	const result = [];
	let index = -1;
	if (loose) result.push({
		type: "text",
		value: "\n"
	});
	while (++index < nodes.length) {
		if (index) result.push({
			type: "text",
			value: "\n"
		});
		result.push(nodes[index]);
	}
	if (loose && nodes.length > 0) result.push({
		type: "text",
		value: "\n"
	});
	return result;
}
/**
* Trim spaces and tabs at the start of `value`.
*
* @param {string} value
*   Value to trim.
* @returns {string}
*   Result.
*/
function trimMarkdownSpaceStart(value) {
	let index = 0;
	let code = value.charCodeAt(index);
	while (code === 9 || code === 32) {
		index++;
		code = value.charCodeAt(index);
	}
	return value.slice(index);
}
//#endregion
//#region ../../node_modules/mdast-util-to-hast/lib/index.js
/**
* @import {Nodes as HastNodes} from 'hast'
* @import {Nodes as MdastNodes} from 'mdast'
* @import {Options} from './state.js'
*/
/**
* Transform mdast to hast.
*
* ##### Notes
*
* ###### HTML
*
* Raw HTML is available in mdast as `html` nodes and can be embedded in hast
* as semistandard `raw` nodes.
* Most utilities ignore `raw` nodes but two notable ones don’t:
*
* *   `hast-util-to-html` also has an option `allowDangerousHtml` which will
*     output the raw HTML.
*     This is typically discouraged as noted by the option name but is useful
*     if you completely trust authors
* *   `hast-util-raw` can handle the raw embedded HTML strings by parsing them
*     into standard hast nodes (`element`, `text`, etc).
*     This is a heavy task as it needs a full HTML parser, but it is the only
*     way to support untrusted content
*
* ###### Footnotes
*
* Many options supported here relate to footnotes.
* Footnotes are not specified by CommonMark, which we follow by default.
* They are supported by GitHub, so footnotes can be enabled in markdown with
* `mdast-util-gfm`.
*
* The options `footnoteBackLabel` and `footnoteLabel` define natural language
* that explains footnotes, which is hidden for sighted users but shown to
* assistive technology.
* When your page is not in English, you must define translated values.
*
* Back references use ARIA attributes, but the section label itself uses a
* heading that is hidden with an `sr-only` class.
* To show it to sighted users, define different attributes in
* `footnoteLabelProperties`.
*
* ###### Clobbering
*
* Footnotes introduces a problem, as it links footnote calls to footnote
* definitions on the page through `id` attributes generated from user content,
* which results in DOM clobbering.
*
* DOM clobbering is this:
*
* ```html
* <p id=x></p>
* <script>alert(x) // `x` now refers to the DOM `p#x` element<\/script>
* ```
*
* Elements by their ID are made available by browsers on the `window` object,
* which is a security risk.
* Using a prefix solves this problem.
*
* More information on how to handle clobbering and the prefix is explained in
* Example: headings (DOM clobbering) in `rehype-sanitize`.
*
* ###### Unknown nodes
*
* Unknown nodes are nodes with a type that isn’t in `handlers` or `passThrough`.
* The default behavior for unknown nodes is:
*
* *   when the node has a `value` (and doesn’t have `data.hName`,
*     `data.hProperties`, or `data.hChildren`, see later), create a hast `text`
*     node
* *   otherwise, create a `<div>` element (which could be changed with
*     `data.hName`), with its children mapped from mdast to hast as well
*
* This behavior can be changed by passing an `unknownHandler`.
*
* @param {MdastNodes} tree
*   mdast tree.
* @param {Options | null | undefined} [options]
*   Configuration (optional).
* @returns {HastNodes}
*   hast tree.
*/
function toHast(tree, options) {
	const state = createState(tree, options);
	const node = state.one(tree, void 0);
	const foot = footer(state);
	/** @type {HastNodes} */
	const result = Array.isArray(node) ? {
		type: "root",
		children: node
	} : node || {
		type: "root",
		children: []
	};
	if (foot) {
		"children" in result;
		result.children.push({
			type: "text",
			value: "\n"
		}, foot);
	}
	return result;
}
//#endregion
//#region ../../node_modules/remark-rehype/lib/index.js
/**
* @import {Root as HastRoot} from 'hast'
* @import {Root as MdastRoot} from 'mdast'
* @import {Options as ToHastOptions} from 'mdast-util-to-hast'
* @import {Processor} from 'unified'
* @import {VFile} from 'vfile'
*/
/**
* @typedef {Omit<ToHastOptions, 'file'>} Options
*
* @callback TransformBridge
*   Bridge-mode.
*
*   Runs the destination with the new hast tree.
*   Discards result.
* @param {MdastRoot} tree
*   Tree.
* @param {VFile} file
*   File.
* @returns {Promise<undefined>}
*   Nothing.
*
* @callback TransformMutate
*  Mutate-mode.
*
*  Further transformers run on the hast tree.
* @param {MdastRoot} tree
*   Tree.
* @param {VFile} file
*   File.
* @returns {HastRoot}
*   Tree (hast).
*/
/**
* Turn markdown into HTML.
*
* ##### Notes
*
* ###### Signature
*
* * if a processor is given,
*   runs the (rehype) plugins used on it with a hast tree,
*   then discards the result (*bridge mode*)
* * otherwise,
*   returns a hast tree,
*   the plugins used after `remarkRehype` are rehype plugins (*mutate mode*)
*
* > 👉 **Note**:
* > It’s highly unlikely that you want to pass a `processor`.
*
* ###### HTML
*
* Raw HTML is available in mdast as `html` nodes and can be embedded in hast
* as semistandard `raw` nodes.
* Most plugins ignore `raw` nodes but two notable ones don’t:
*
* * `rehype-stringify` also has an option `allowDangerousHtml` which will
*   output the raw HTML.
*   This is typically discouraged as noted by the option name but is useful if
*   you completely trust authors
* * `rehype-raw` can handle the raw embedded HTML strings by parsing them
*   into standard hast nodes (`element`, `text`, etc);
*   this is a heavy task as it needs a full HTML parser,
*   but it is the only way to support untrusted content
*
* ###### Footnotes
*
* Many options supported here relate to footnotes.
* Footnotes are not specified by CommonMark,
* which we follow by default.
* They are supported by GitHub,
* so footnotes can be enabled in markdown with `remark-gfm`.
*
* The options `footnoteBackLabel` and `footnoteLabel` define natural language
* that explains footnotes,
* which is hidden for sighted users but shown to assistive technology.
* When your page is not in English,
* you must define translated values.
*
* Back references use ARIA attributes,
* but the section label itself uses a heading that is hidden with an
* `sr-only` class.
* To show it to sighted users,
* define different attributes in `footnoteLabelProperties`.
*
* ###### Clobbering
*
* Footnotes introduces a problem,
* as it links footnote calls to footnote definitions on the page through `id`
* attributes generated from user content,
* which results in DOM clobbering.
*
* DOM clobbering is this:
*
* ```html
* <p id=x></p>
* <script>alert(x) // `x` now refers to the DOM `p#x` element<\/script>
* ```
*
* Elements by their ID are made available by browsers on the `window` object,
* which is a security risk.
* Using a prefix solves this problem.
*
* More information on how to handle clobbering and the prefix is explained in
* *Example: headings (DOM clobbering)* in `rehype-sanitize`.
*
* ###### Unknown nodes
*
* Unknown nodes are nodes with a type that isn’t in `handlers` or `passThrough`.
* The default behavior for unknown nodes is:
*
* * when the node has a `value`
*   (and doesn’t have `data.hName`, `data.hProperties`, or `data.hChildren`,
*   see later),
*   create a hast `text` node
* * otherwise,
*   create a `<div>` element (which could be changed with `data.hName`),
*   with its children mapped from mdast to hast as well
*
* This behavior can be changed by passing an `unknownHandler`.
*
* @overload
* @param {Processor} processor
* @param {Readonly<Options> | null | undefined} [options]
* @returns {TransformBridge}
*
* @overload
* @param {Readonly<Options> | null | undefined} [options]
* @returns {TransformMutate}
*
* @overload
* @param {Readonly<Options> | Processor | null | undefined} [destination]
* @param {Readonly<Options> | null | undefined} [options]
* @returns {TransformBridge | TransformMutate}
*
* @param {Readonly<Options> | Processor | null | undefined} [destination]
*   Processor or configuration (optional).
* @param {Readonly<Options> | null | undefined} [options]
*   When a processor was given,
*   configuration (optional).
* @returns {TransformBridge | TransformMutate}
*   Transform.
*/
function remarkRehype(destination, options) {
	if (destination && "run" in destination)
 /**
	* @type {TransformBridge}
	*/
	return async function(tree, file) {
		const hastTree = toHast(tree, {
			file,
			...options
		});
		await destination.run(hastTree, file);
	};
	/**
	* @type {TransformMutate}
	*/
	return function(tree, file) {
		return toHast(tree, {
			file,
			...destination || options
		});
	};
}
//#endregion
//#region ../../node_modules/bail/index.js
/**
* Throw a given error.
*
* @param {Error|null|undefined} [error]
*   Maybe error.
* @returns {asserts error is null|undefined}
*/
function bail(error) {
	if (error) throw error;
}
//#endregion
//#region ../../node_modules/is-plain-obj/index.js
var import_extend = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
	var hasOwn = Object.prototype.hasOwnProperty;
	var toStr = Object.prototype.toString;
	var defineProperty = Object.defineProperty;
	var gOPD = Object.getOwnPropertyDescriptor;
	var isArray = function isArray(arr) {
		if (typeof Array.isArray === "function") return Array.isArray(arr);
		return toStr.call(arr) === "[object Array]";
	};
	var isPlainObject = function isPlainObject(obj) {
		if (!obj || toStr.call(obj) !== "[object Object]") return false;
		var hasOwnConstructor = hasOwn.call(obj, "constructor");
		var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, "isPrototypeOf");
		if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) return false;
		var key;
		for (key in obj);
		return typeof key === "undefined" || hasOwn.call(obj, key);
	};
	var setProperty = function setProperty(target, options) {
		if (defineProperty && options.name === "__proto__") defineProperty(target, options.name, {
			enumerable: true,
			configurable: true,
			value: options.newValue,
			writable: true
		});
		else target[options.name] = options.newValue;
	};
	var getProperty = function getProperty(obj, name) {
		if (name === "__proto__") {
			if (!hasOwn.call(obj, name)) return;
			else if (gOPD) return gOPD(obj, name).value;
		}
		return obj[name];
	};
	module.exports = function extend() {
		var options, name, src, copy, copyIsArray, clone;
		var target = arguments[0];
		var i = 1;
		var length = arguments.length;
		var deep = false;
		if (typeof target === "boolean") {
			deep = target;
			target = arguments[1] || {};
			i = 2;
		}
		if (target == null || typeof target !== "object" && typeof target !== "function") target = {};
		for (; i < length; ++i) {
			options = arguments[i];
			if (options != null) for (name in options) {
				src = getProperty(target, name);
				copy = getProperty(options, name);
				if (target !== copy) {
					if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {
						if (copyIsArray) {
							copyIsArray = false;
							clone = src && isArray(src) ? src : [];
						} else clone = src && isPlainObject(src) ? src : {};
						setProperty(target, {
							name,
							newValue: extend(deep, clone, copy)
						});
					} else if (typeof copy !== "undefined") setProperty(target, {
						name,
						newValue: copy
					});
				}
			}
		}
		return target;
	};
})))(), 1);
function isPlainObject(value) {
	if (typeof value !== "object" || value === null) return false;
	const prototype = Object.getPrototypeOf(value);
	return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
}
//#endregion
//#region ../../node_modules/trough/lib/index.js
/**
* @typedef {(error?: Error | null | undefined, ...output: Array<any>) => void} Callback
*   Callback.
*
* @typedef {(...input: Array<any>) => any} Middleware
*   Ware.
*
* @typedef Pipeline
*   Pipeline.
* @property {Run} run
*   Run the pipeline.
* @property {Use} use
*   Add middleware.
*
* @typedef {(...input: Array<any>) => void} Run
*   Call all middleware.
*
*   Calls `done` on completion with either an error or the output of the
*   last middleware.
*
*   > 👉 **Note**: as the length of input defines whether async functions get a
*   > `next` function,
*   > it’s recommended to keep `input` at one value normally.

*
* @typedef {(fn: Middleware) => Pipeline} Use
*   Add middleware.
*/
/**
* Create new middleware.
*
* @returns {Pipeline}
*   Pipeline.
*/
function trough() {
	/** @type {Array<Middleware>} */
	const fns = [];
	/** @type {Pipeline} */
	const pipeline = {
		run,
		use
	};
	return pipeline;
	/** @type {Run} */
	function run(...values) {
		let middlewareIndex = -1;
		/** @type {Callback} */
		const callback = values.pop();
		if (typeof callback !== "function") throw new TypeError("Expected function as last argument, not " + callback);
		next(null, ...values);
		/**
		* Run the next `fn`, or we’re done.
		*
		* @param {Error | null | undefined} error
		* @param {Array<any>} output
		*/
		function next(error, ...output) {
			const fn = fns[++middlewareIndex];
			let index = -1;
			if (error) {
				callback(error);
				return;
			}
			while (++index < values.length) if (output[index] === null || output[index] === void 0) output[index] = values[index];
			values = output;
			if (fn) wrap(fn, next)(...output);
			else callback(null, ...output);
		}
	}
	/** @type {Use} */
	function use(middelware) {
		if (typeof middelware !== "function") throw new TypeError("Expected `middelware` to be a function, not " + middelware);
		fns.push(middelware);
		return pipeline;
	}
}
/**
* Wrap `middleware` into a uniform interface.
*
* You can pass all input to the resulting function.
* `callback` is then called with the output of `middleware`.
*
* If `middleware` accepts more arguments than the later given in input,
* an extra `done` function is passed to it after that input,
* which must be called by `middleware`.
*
* The first value in `input` is the main input value.
* All other input values are the rest input values.
* The values given to `callback` are the input values,
* merged with every non-nullish output value.
*
* * if `middleware` throws an error,
*   returns a promise that is rejected,
*   or calls the given `done` function with an error,
*   `callback` is called with that error
* * if `middleware` returns a value or returns a promise that is resolved,
*   that value is the main output value
* * if `middleware` calls `done`,
*   all non-nullish values except for the first one (the error) overwrite the
*   output values
*
* @param {Middleware} middleware
*   Function to wrap.
* @param {Callback} callback
*   Callback called with the output of `middleware`.
* @returns {Run}
*   Wrapped middleware.
*/
function wrap(middleware, callback) {
	/** @type {boolean} */
	let called;
	return wrapped;
	/**
	* Call `middleware`.
	* @this {any}
	* @param {Array<any>} parameters
	* @returns {void}
	*/
	function wrapped(...parameters) {
		const fnExpectsCallback = middleware.length > parameters.length;
		/** @type {any} */
		let result;
		if (fnExpectsCallback) parameters.push(done);
		try {
			result = middleware.apply(this, parameters);
		} catch (error) {
			const exception = error;
			if (fnExpectsCallback && called) throw exception;
			return done(exception);
		}
		if (!fnExpectsCallback) if (result && result.then && typeof result.then === "function") result.then(then, done);
		else if (result instanceof Error) done(result);
		else then(result);
	}
	/**
	* Call `callback`, only once.
	*
	* @type {Callback}
	*/
	function done(error, ...output) {
		if (!called) {
			called = true;
			callback(error, ...output);
		}
	}
	/**
	* Call `done` with one value.
	*
	* @param {any} [value]
	*/
	function then(value) {
		done(null, value);
	}
}
//#endregion
//#region ../../node_modules/vfile/lib/minpath.browser.js
var minpath = {
	basename,
	dirname,
	extname,
	join,
	sep: "/"
};
/**
* Get the basename from a path.
*
* @param {string} path
*   File path.
* @param {string | null | undefined} [extname]
*   Extension to strip.
* @returns {string}
*   Stem or basename.
*/
function basename(path, extname) {
	if (extname !== void 0 && typeof extname !== "string") throw new TypeError("\"ext\" argument must be a string");
	assertPath$1(path);
	let start = 0;
	let end = -1;
	let index = path.length;
	/** @type {boolean | undefined} */
	let seenNonSlash;
	if (extname === void 0 || extname.length === 0 || extname.length > path.length) {
		while (index--) if (path.codePointAt(index) === 47) {
			if (seenNonSlash) {
				start = index + 1;
				break;
			}
		} else if (end < 0) {
			seenNonSlash = true;
			end = index + 1;
		}
		return end < 0 ? "" : path.slice(start, end);
	}
	if (extname === path) return "";
	let firstNonSlashEnd = -1;
	let extnameIndex = extname.length - 1;
	while (index--) if (path.codePointAt(index) === 47) {
		if (seenNonSlash) {
			start = index + 1;
			break;
		}
	} else {
		if (firstNonSlashEnd < 0) {
			seenNonSlash = true;
			firstNonSlashEnd = index + 1;
		}
		if (extnameIndex > -1) if (path.codePointAt(index) === extname.codePointAt(extnameIndex--)) {
			if (extnameIndex < 0) end = index;
		} else {
			extnameIndex = -1;
			end = firstNonSlashEnd;
		}
	}
	if (start === end) end = firstNonSlashEnd;
	else if (end < 0) end = path.length;
	return path.slice(start, end);
}
/**
* Get the dirname from a path.
*
* @param {string} path
*   File path.
* @returns {string}
*   File path.
*/
function dirname(path) {
	assertPath$1(path);
	if (path.length === 0) return ".";
	let end = -1;
	let index = path.length;
	/** @type {boolean | undefined} */
	let unmatchedSlash;
	while (--index) if (path.codePointAt(index) === 47) {
		if (unmatchedSlash) {
			end = index;
			break;
		}
	} else if (!unmatchedSlash) unmatchedSlash = true;
	return end < 0 ? path.codePointAt(0) === 47 ? "/" : "." : end === 1 && path.codePointAt(0) === 47 ? "//" : path.slice(0, end);
}
/**
* Get an extname from a path.
*
* @param {string} path
*   File path.
* @returns {string}
*   Extname.
*/
function extname(path) {
	assertPath$1(path);
	let index = path.length;
	let end = -1;
	let startPart = 0;
	let startDot = -1;
	let preDotState = 0;
	/** @type {boolean | undefined} */
	let unmatchedSlash;
	while (index--) {
		const code = path.codePointAt(index);
		if (code === 47) {
			if (unmatchedSlash) {
				startPart = index + 1;
				break;
			}
			continue;
		}
		if (end < 0) {
			unmatchedSlash = true;
			end = index + 1;
		}
		if (code === 46) {
			if (startDot < 0) startDot = index;
			else if (preDotState !== 1) preDotState = 1;
		} else if (startDot > -1) preDotState = -1;
	}
	if (startDot < 0 || end < 0 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) return "";
	return path.slice(startDot, end);
}
/**
* Join segments from a path.
*
* @param {Array<string>} segments
*   Path segments.
* @returns {string}
*   File path.
*/
function join(...segments) {
	let index = -1;
	/** @type {string | undefined} */
	let joined;
	while (++index < segments.length) {
		assertPath$1(segments[index]);
		if (segments[index]) joined = joined === void 0 ? segments[index] : joined + "/" + segments[index];
	}
	return joined === void 0 ? "." : normalize(joined);
}
/**
* Normalize a basic file path.
*
* @param {string} path
*   File path.
* @returns {string}
*   File path.
*/
function normalize(path) {
	assertPath$1(path);
	const absolute = path.codePointAt(0) === 47;
	let value = normalizeString(path, !absolute);
	if (value.length === 0 && !absolute) value = ".";
	if (value.length > 0 && path.codePointAt(path.length - 1) === 47) value += "/";
	return absolute ? "/" + value : value;
}
/**
* Resolve `.` and `..` elements in a path with directory names.
*
* @param {string} path
*   File path.
* @param {boolean} allowAboveRoot
*   Whether `..` can move above root.
* @returns {string}
*   File path.
*/
function normalizeString(path, allowAboveRoot) {
	let result = "";
	let lastSegmentLength = 0;
	let lastSlash = -1;
	let dots = 0;
	let index = -1;
	/** @type {number | undefined} */
	let code;
	/** @type {number} */
	let lastSlashIndex;
	while (++index <= path.length) {
		if (index < path.length) code = path.codePointAt(index);
		else if (code === 47) break;
		else code = 47;
		if (code === 47) {
			if (lastSlash === index - 1 || dots === 1) {} else if (lastSlash !== index - 1 && dots === 2) {
				if (result.length < 2 || lastSegmentLength !== 2 || result.codePointAt(result.length - 1) !== 46 || result.codePointAt(result.length - 2) !== 46) {
					if (result.length > 2) {
						lastSlashIndex = result.lastIndexOf("/");
						if (lastSlashIndex !== result.length - 1) {
							if (lastSlashIndex < 0) {
								result = "";
								lastSegmentLength = 0;
							} else {
								result = result.slice(0, lastSlashIndex);
								lastSegmentLength = result.length - 1 - result.lastIndexOf("/");
							}
							lastSlash = index;
							dots = 0;
							continue;
						}
					} else if (result.length > 0) {
						result = "";
						lastSegmentLength = 0;
						lastSlash = index;
						dots = 0;
						continue;
					}
				}
				if (allowAboveRoot) {
					result = result.length > 0 ? result + "/.." : "..";
					lastSegmentLength = 2;
				}
			} else {
				if (result.length > 0) result += "/" + path.slice(lastSlash + 1, index);
				else result = path.slice(lastSlash + 1, index);
				lastSegmentLength = index - lastSlash - 1;
			}
			lastSlash = index;
			dots = 0;
		} else if (code === 46 && dots > -1) dots++;
		else dots = -1;
	}
	return result;
}
/**
* Make sure `path` is a string.
*
* @param {string} path
*   File path.
* @returns {asserts path is string}
*   Nothing.
*/
function assertPath$1(path) {
	if (typeof path !== "string") throw new TypeError("Path must be a string. Received " + JSON.stringify(path));
}
//#endregion
//#region ../../node_modules/vfile/lib/minproc.browser.js
var minproc = { cwd };
function cwd() {
	return "/";
}
//#endregion
//#region ../../node_modules/vfile/lib/minurl.shared.js
/**
* Checks if a value has the shape of a WHATWG URL object.
*
* Using a symbol or instanceof would not be able to recognize URL objects
* coming from other implementations (e.g. in Electron), so instead we are
* checking some well known properties for a lack of a better test.
*
* We use `href` and `protocol` as they are the only properties that are
* easy to retrieve and calculate due to the lazy nature of the getters.
*
* We check for auth attribute to distinguish legacy url instance with
* WHATWG URL instance.
*
* @param {unknown} fileUrlOrPath
*   File path or URL.
* @returns {fileUrlOrPath is URL}
*   Whether it’s a URL.
*/
function isUrl(fileUrlOrPath) {
	return Boolean(fileUrlOrPath !== null && typeof fileUrlOrPath === "object" && "href" in fileUrlOrPath && fileUrlOrPath.href && "protocol" in fileUrlOrPath && fileUrlOrPath.protocol && fileUrlOrPath.auth === void 0);
}
//#endregion
//#region ../../node_modules/vfile/lib/minurl.browser.js
/**
* @param {URL | string} path
*   File URL.
* @returns {string}
*   File URL.
*/
function urlToPath(path) {
	if (typeof path === "string") path = new URL(path);
	else if (!isUrl(path)) {
		/** @type {NodeJS.ErrnoException} */
		const error = /* @__PURE__ */ new TypeError("The \"path\" argument must be of type string or an instance of URL. Received `" + path + "`");
		error.code = "ERR_INVALID_ARG_TYPE";
		throw error;
	}
	if (path.protocol !== "file:") {
		/** @type {NodeJS.ErrnoException} */
		const error = /* @__PURE__ */ new TypeError("The URL must be of scheme file");
		error.code = "ERR_INVALID_URL_SCHEME";
		throw error;
	}
	return getPathFromURLPosix(path);
}
/**
* Get a path from a POSIX URL.
*
* @param {URL} url
*   URL.
* @returns {string}
*   File path.
*/
function getPathFromURLPosix(url) {
	if (url.hostname !== "") {
		/** @type {NodeJS.ErrnoException} */
		const error = /* @__PURE__ */ new TypeError("File URL host must be \"localhost\" or empty on darwin");
		error.code = "ERR_INVALID_FILE_URL_HOST";
		throw error;
	}
	const pathname = url.pathname;
	let index = -1;
	while (++index < pathname.length) if (pathname.codePointAt(index) === 37 && pathname.codePointAt(index + 1) === 50) {
		const third = pathname.codePointAt(index + 2);
		if (third === 70 || third === 102) {
			/** @type {NodeJS.ErrnoException} */
			const error = /* @__PURE__ */ new TypeError("File URL path must not include encoded / characters");
			error.code = "ERR_INVALID_FILE_URL_PATH";
			throw error;
		}
	}
	return decodeURIComponent(pathname);
}
//#endregion
//#region ../../node_modules/vfile/lib/index.js
/**
* @import {Node, Point, Position} from 'unist'
* @import {Options as MessageOptions} from 'vfile-message'
* @import {Compatible, Data, Map, Options, Value} from 'vfile'
*/
/**
* @typedef {object & {type: string, position?: Position | undefined}} NodeLike
*/
/**
* Order of setting (least specific to most), we need this because otherwise
* `{stem: 'a', path: '~/b.js'}` would throw, as a path is needed before a
* stem can be set.
*/
var order = [
	"history",
	"path",
	"basename",
	"stem",
	"extname",
	"dirname"
];
var VFile = class {
	/**
	* Create a new virtual file.
	*
	* `options` is treated as:
	*
	* *   `string` or `Uint8Array` — `{value: options}`
	* *   `URL` — `{path: options}`
	* *   `VFile` — shallow copies its data over to the new file
	* *   `object` — all fields are shallow copied over to the new file
	*
	* Path related fields are set in the following order (least specific to
	* most specific): `history`, `path`, `basename`, `stem`, `extname`,
	* `dirname`.
	*
	* You cannot set `dirname` or `extname` without setting either `history`,
	* `path`, `basename`, or `stem` too.
	*
	* @param {Compatible | null | undefined} [value]
	*   File value.
	* @returns
	*   New instance.
	*/
	constructor(value) {
		/** @type {Options | VFile} */
		let options;
		if (!value) options = {};
		else if (isUrl(value)) options = { path: value };
		else if (typeof value === "string" || isUint8Array$1(value)) options = { value };
		else options = value;
		/**
		* Base of `path` (default: `process.cwd()` or `'/'` in browsers).
		*
		* @type {string}
		*/
		this.cwd = "cwd" in options ? "" : minproc.cwd();
		/**
		* Place to store custom info (default: `{}`).
		*
		* It’s OK to store custom data directly on the file but moving it to
		* `data` is recommended.
		*
		* @type {Data}
		*/
		this.data = {};
		/**
		* List of file paths the file moved between.
		*
		* The first is the original path and the last is the current path.
		*
		* @type {Array<string>}
		*/
		this.history = [];
		/**
		* List of messages associated with the file.
		*
		* @type {Array<VFileMessage>}
		*/
		this.messages = [];
		/**
		* Raw value.
		*
		* @type {Value}
		*/
		this.value;
		/**
		* Source map.
		*
		* This type is equivalent to the `RawSourceMap` type from the `source-map`
		* module.
		*
		* @type {Map | null | undefined}
		*/
		this.map;
		/**
		* Custom, non-string, compiled, representation.
		*
		* This is used by unified to store non-string results.
		* One example is when turning markdown into React nodes.
		*
		* @type {unknown}
		*/
		this.result;
		/**
		* Whether a file was saved to disk.
		*
		* This is used by vfile reporters.
		*
		* @type {boolean}
		*/
		this.stored;
		let index = -1;
		while (++index < order.length) {
			const field = order[index];
			if (field in options && options[field] !== void 0 && options[field] !== null) this[field] = field === "history" ? [...options[field]] : options[field];
		}
		/** @type {string} */
		let field;
		for (field in options) if (!order.includes(field)) this[field] = options[field];
	}
	/**
	* Get the basename (including extname) (example: `'index.min.js'`).
	*
	* @returns {string | undefined}
	*   Basename.
	*/
	get basename() {
		return typeof this.path === "string" ? minpath.basename(this.path) : void 0;
	}
	/**
	* Set basename (including extname) (`'index.min.js'`).
	*
	* Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
	* on windows).
	* Cannot be nullified (use `file.path = file.dirname` instead).
	*
	* @param {string} basename
	*   Basename.
	* @returns {undefined}
	*   Nothing.
	*/
	set basename(basename) {
		assertNonEmpty(basename, "basename");
		assertPart(basename, "basename");
		this.path = minpath.join(this.dirname || "", basename);
	}
	/**
	* Get the parent path (example: `'~'`).
	*
	* @returns {string | undefined}
	*   Dirname.
	*/
	get dirname() {
		return typeof this.path === "string" ? minpath.dirname(this.path) : void 0;
	}
	/**
	* Set the parent path (example: `'~'`).
	*
	* Cannot be set if there’s no `path` yet.
	*
	* @param {string | undefined} dirname
	*   Dirname.
	* @returns {undefined}
	*   Nothing.
	*/
	set dirname(dirname) {
		assertPath(this.basename, "dirname");
		this.path = minpath.join(dirname || "", this.basename);
	}
	/**
	* Get the extname (including dot) (example: `'.js'`).
	*
	* @returns {string | undefined}
	*   Extname.
	*/
	get extname() {
		return typeof this.path === "string" ? minpath.extname(this.path) : void 0;
	}
	/**
	* Set the extname (including dot) (example: `'.js'`).
	*
	* Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
	* on windows).
	* Cannot be set if there’s no `path` yet.
	*
	* @param {string | undefined} extname
	*   Extname.
	* @returns {undefined}
	*   Nothing.
	*/
	set extname(extname) {
		assertPart(extname, "extname");
		assertPath(this.dirname, "extname");
		if (extname) {
			if (extname.codePointAt(0) !== 46) throw new Error("`extname` must start with `.`");
			if (extname.includes(".", 1)) throw new Error("`extname` cannot contain multiple dots");
		}
		this.path = minpath.join(this.dirname, this.stem + (extname || ""));
	}
	/**
	* Get the full path (example: `'~/index.min.js'`).
	*
	* @returns {string}
	*   Path.
	*/
	get path() {
		return this.history[this.history.length - 1];
	}
	/**
	* Set the full path (example: `'~/index.min.js'`).
	*
	* Cannot be nullified.
	* You can set a file URL (a `URL` object with a `file:` protocol) which will
	* be turned into a path with `url.fileURLToPath`.
	*
	* @param {URL | string} path
	*   Path.
	* @returns {undefined}
	*   Nothing.
	*/
	set path(path) {
		if (isUrl(path)) path = urlToPath(path);
		assertNonEmpty(path, "path");
		if (this.path !== path) this.history.push(path);
	}
	/**
	* Get the stem (basename w/o extname) (example: `'index.min'`).
	*
	* @returns {string | undefined}
	*   Stem.
	*/
	get stem() {
		return typeof this.path === "string" ? minpath.basename(this.path, this.extname) : void 0;
	}
	/**
	* Set the stem (basename w/o extname) (example: `'index.min'`).
	*
	* Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
	* on windows).
	* Cannot be nullified (use `file.path = file.dirname` instead).
	*
	* @param {string} stem
	*   Stem.
	* @returns {undefined}
	*   Nothing.
	*/
	set stem(stem) {
		assertNonEmpty(stem, "stem");
		assertPart(stem, "stem");
		this.path = minpath.join(this.dirname || "", stem + (this.extname || ""));
	}
	/**
	* Create a fatal message for `reason` associated with the file.
	*
	* The `fatal` field of the message is set to `true` (error; file not usable)
	* and the `file` field is set to the current file path.
	* The message is added to the `messages` field on `file`.
	*
	* > 🪦 **Note**: also has obsolete signatures.
	*
	* @overload
	* @param {string} reason
	* @param {MessageOptions | null | undefined} [options]
	* @returns {never}
	*
	* @overload
	* @param {string} reason
	* @param {Node | NodeLike | null | undefined} parent
	* @param {string | null | undefined} [origin]
	* @returns {never}
	*
	* @overload
	* @param {string} reason
	* @param {Point | Position | null | undefined} place
	* @param {string | null | undefined} [origin]
	* @returns {never}
	*
	* @overload
	* @param {string} reason
	* @param {string | null | undefined} [origin]
	* @returns {never}
	*
	* @overload
	* @param {Error | VFileMessage} cause
	* @param {Node | NodeLike | null | undefined} parent
	* @param {string | null | undefined} [origin]
	* @returns {never}
	*
	* @overload
	* @param {Error | VFileMessage} cause
	* @param {Point | Position | null | undefined} place
	* @param {string | null | undefined} [origin]
	* @returns {never}
	*
	* @overload
	* @param {Error | VFileMessage} cause
	* @param {string | null | undefined} [origin]
	* @returns {never}
	*
	* @param {Error | VFileMessage | string} causeOrReason
	*   Reason for message, should use markdown.
	* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
	*   Configuration (optional).
	* @param {string | null | undefined} [origin]
	*   Place in code where the message originates (example:
	*   `'my-package:my-rule'` or `'my-rule'`).
	* @returns {never}
	*   Never.
	* @throws {VFileMessage}
	*   Message.
	*/
	fail(causeOrReason, optionsOrParentOrPlace, origin) {
		const message = this.message(causeOrReason, optionsOrParentOrPlace, origin);
		message.fatal = true;
		throw message;
	}
	/**
	* Create an info message for `reason` associated with the file.
	*
	* The `fatal` field of the message is set to `undefined` (info; change
	* likely not needed) and the `file` field is set to the current file path.
	* The message is added to the `messages` field on `file`.
	*
	* > 🪦 **Note**: also has obsolete signatures.
	*
	* @overload
	* @param {string} reason
	* @param {MessageOptions | null | undefined} [options]
	* @returns {VFileMessage}
	*
	* @overload
	* @param {string} reason
	* @param {Node | NodeLike | null | undefined} parent
	* @param {string | null | undefined} [origin]
	* @returns {VFileMessage}
	*
	* @overload
	* @param {string} reason
	* @param {Point | Position | null | undefined} place
	* @param {string | null | undefined} [origin]
	* @returns {VFileMessage}
	*
	* @overload
	* @param {string} reason
	* @param {string | null | undefined} [origin]
	* @returns {VFileMessage}
	*
	* @overload
	* @param {Error | VFileMessage} cause
	* @param {Node | NodeLike | null | undefined} parent
	* @param {string | null | undefined} [origin]
	* @returns {VFileMessage}
	*
	* @overload
	* @param {Error | VFileMessage} cause
	* @param {Point | Position | null | undefined} place
	* @param {string | null | undefined} [origin]
	* @returns {VFileMessage}
	*
	* @overload
	* @param {Error | VFileMessage} cause
	* @param {string | null | undefined} [origin]
	* @returns {VFileMessage}
	*
	* @param {Error | VFileMessage | string} causeOrReason
	*   Reason for message, should use markdown.
	* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
	*   Configuration (optional).
	* @param {string | null | undefined} [origin]
	*   Place in code where the message originates (example:
	*   `'my-package:my-rule'` or `'my-rule'`).
	* @returns {VFileMessage}
	*   Message.
	*/
	info(causeOrReason, optionsOrParentOrPlace, origin) {
		const message = this.message(causeOrReason, optionsOrParentOrPlace, origin);
		message.fatal = void 0;
		return message;
	}
	/**
	* Create a message for `reason` associated with the file.
	*
	* The `fatal` field of the message is set to `false` (warning; change may be
	* needed) and the `file` field is set to the current file path.
	* The message is added to the `messages` field on `file`.
	*
	* > 🪦 **Note**: also has obsolete signatures.
	*
	* @overload
	* @param {string} reason
	* @param {MessageOptions | null | undefined} [options]
	* @returns {VFileMessage}
	*
	* @overload
	* @param {string} reason
	* @param {Node | NodeLike | null | undefined} parent
	* @param {string | null | undefined} [origin]
	* @returns {VFileMessage}
	*
	* @overload
	* @param {string} reason
	* @param {Point | Position | null | undefined} place
	* @param {string | null | undefined} [origin]
	* @returns {VFileMessage}
	*
	* @overload
	* @param {string} reason
	* @param {string | null | undefined} [origin]
	* @returns {VFileMessage}
	*
	* @overload
	* @param {Error | VFileMessage} cause
	* @param {Node | NodeLike | null | undefined} parent
	* @param {string | null | undefined} [origin]
	* @returns {VFileMessage}
	*
	* @overload
	* @param {Error | VFileMessage} cause
	* @param {Point | Position | null | undefined} place
	* @param {string | null | undefined} [origin]
	* @returns {VFileMessage}
	*
	* @overload
	* @param {Error | VFileMessage} cause
	* @param {string | null | undefined} [origin]
	* @returns {VFileMessage}
	*
	* @param {Error | VFileMessage | string} causeOrReason
	*   Reason for message, should use markdown.
	* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
	*   Configuration (optional).
	* @param {string | null | undefined} [origin]
	*   Place in code where the message originates (example:
	*   `'my-package:my-rule'` or `'my-rule'`).
	* @returns {VFileMessage}
	*   Message.
	*/
	message(causeOrReason, optionsOrParentOrPlace, origin) {
		const message = new VFileMessage(causeOrReason, optionsOrParentOrPlace, origin);
		if (this.path) {
			message.name = this.path + ":" + message.name;
			message.file = this.path;
		}
		message.fatal = false;
		this.messages.push(message);
		return message;
	}
	/**
	* Serialize the file.
	*
	* > **Note**: which encodings are supported depends on the engine.
	* > For info on Node.js, see:
	* > <https://nodejs.org/api/util.html#whatwg-supported-encodings>.
	*
	* @param {string | null | undefined} [encoding='utf8']
	*   Character encoding to understand `value` as when it’s a `Uint8Array`
	*   (default: `'utf-8'`).
	* @returns {string}
	*   Serialized file.
	*/
	toString(encoding) {
		if (this.value === void 0) return "";
		if (typeof this.value === "string") return this.value;
		return new TextDecoder(encoding || void 0).decode(this.value);
	}
};
/**
* Assert that `part` is not a path (as in, does not contain `path.sep`).
*
* @param {string | null | undefined} part
*   File path part.
* @param {string} name
*   Part name.
* @returns {undefined}
*   Nothing.
*/
function assertPart(part, name) {
	if (part && part.includes(minpath.sep)) throw new Error("`" + name + "` cannot be a path: did not expect `" + minpath.sep + "`");
}
/**
* Assert that `part` is not empty.
*
* @param {string | undefined} part
*   Thing.
* @param {string} name
*   Part name.
* @returns {asserts part is string}
*   Nothing.
*/
function assertNonEmpty(part, name) {
	if (!part) throw new Error("`" + name + "` cannot be empty");
}
/**
* Assert `path` exists.
*
* @param {string | undefined} path
*   Path.
* @param {string} name
*   Dependency name.
* @returns {asserts path is string}
*   Nothing.
*/
function assertPath(path, name) {
	if (!path) throw new Error("Setting `" + name + "` requires `path` to be set too");
}
/**
* Assert `value` is an `Uint8Array`.
*
* @param {unknown} value
*   thing.
* @returns {value is Uint8Array}
*   Whether `value` is an `Uint8Array`.
*/
function isUint8Array$1(value) {
	return Boolean(value && typeof value === "object" && "byteLength" in value && "byteOffset" in value);
}
//#endregion
//#region ../../node_modules/unified/lib/callable-instance.js
var CallableInstance = (function(property) {
	const proto = this.constructor.prototype;
	const value = proto[property];
	/** @type {(...parameters: Array<unknown>) => unknown} */
	const apply = function() {
		return value.apply(apply, arguments);
	};
	Object.setPrototypeOf(apply, proto);
	return apply;
});
//#endregion
//#region ../../node_modules/unified/lib/index.js
/**
* @typedef {import('trough').Pipeline} Pipeline
*
* @typedef {import('unist').Node} Node
*
* @typedef {import('vfile').Compatible} Compatible
* @typedef {import('vfile').Value} Value
*
* @typedef {import('../index.js').CompileResultMap} CompileResultMap
* @typedef {import('../index.js').Data} Data
* @typedef {import('../index.js').Settings} Settings
*/
/**
* @typedef {CompileResultMap[keyof CompileResultMap]} CompileResults
*   Acceptable results from compilers.
*
*   To register custom results, add them to
*   {@linkcode CompileResultMap}.
*/
/**
* @template {Node} [Tree=Node]
*   The node that the compiler receives (default: `Node`).
* @template {CompileResults} [Result=CompileResults]
*   The thing that the compiler yields (default: `CompileResults`).
* @callback Compiler
*   A **compiler** handles the compiling of a syntax tree to something else
*   (in most cases, text) (TypeScript type).
*
*   It is used in the stringify phase and called with a {@linkcode Node}
*   and {@linkcode VFile} representation of the document to compile.
*   It should return the textual representation of the given tree (typically
*   `string`).
*
*   > **Note**: unified typically compiles by serializing: most compilers
*   > return `string` (or `Uint8Array`).
*   > Some compilers, such as the one configured with
*   > [`rehype-react`][rehype-react], return other values (in this case, a
*   > React tree).
*   > If you’re using a compiler that doesn’t serialize, expect different
*   > result values.
*   >
*   > To register custom results in TypeScript, add them to
*   > {@linkcode CompileResultMap}.
*
*   [rehype-react]: https://github.com/rehypejs/rehype-react
* @param {Tree} tree
*   Tree to compile.
* @param {VFile} file
*   File associated with `tree`.
* @returns {Result}
*   New content: compiled text (`string` or `Uint8Array`, for `file.value`) or
*   something else (for `file.result`).
*/
/**
* @template {Node} [Tree=Node]
*   The node that the parser yields (default: `Node`)
* @callback Parser
*   A **parser** handles the parsing of text to a syntax tree.
*
*   It is used in the parse phase and is called with a `string` and
*   {@linkcode VFile} of the document to parse.
*   It must return the syntax tree representation of the given file
*   ({@linkcode Node}).
* @param {string} document
*   Document to parse.
* @param {VFile} file
*   File associated with `document`.
* @returns {Tree}
*   Node representing the given file.
*/
/**
* @typedef {(
*   Plugin<Array<any>, any, any> |
*   PluginTuple<Array<any>, any, any> |
*   Preset
* )} Pluggable
*   Union of the different ways to add plugins and settings.
*/
/**
* @typedef {Array<Pluggable>} PluggableList
*   List of plugins and presets.
*/
/**
* @template {Array<unknown>} [PluginParameters=[]]
*   Arguments passed to the plugin (default: `[]`, the empty tuple).
* @template {Node | string | undefined} [Input=Node]
*   Value that is expected as input (default: `Node`).
*
*   *   If the plugin returns a {@linkcode Transformer}, this
*       should be the node it expects.
*   *   If the plugin sets a {@linkcode Parser}, this should be
*       `string`.
*   *   If the plugin sets a {@linkcode Compiler}, this should be the
*       node it expects.
* @template [Output=Input]
*   Value that is yielded as output (default: `Input`).
*
*   *   If the plugin returns a {@linkcode Transformer}, this
*       should be the node that that yields.
*   *   If the plugin sets a {@linkcode Parser}, this should be the
*       node that it yields.
*   *   If the plugin sets a {@linkcode Compiler}, this should be
*       result it yields.
* @typedef {(
*   (this: Processor, ...parameters: PluginParameters) =>
*     Input extends string ? // Parser.
*        Output extends Node | undefined ? undefined | void : never :
*     Output extends CompileResults ? // Compiler.
*        Input extends Node | undefined ? undefined | void : never :
*     Transformer<
*       Input extends Node ? Input : Node,
*       Output extends Node ? Output : Node
*     > | undefined | void
* )} Plugin
*   Single plugin.
*
*   Plugins configure the processors they are applied on in the following
*   ways:
*
*   *   they change the processor, such as the parser, the compiler, or by
*       configuring data
*   *   they specify how to handle trees and files
*
*   In practice, they are functions that can receive options and configure the
*   processor (`this`).
*
*   > **Note**: plugins are called when the processor is *frozen*, not when
*   > they are applied.
*/
/**
* Tuple of a plugin and its configuration.
*
* The first item is a plugin, the rest are its parameters.
*
* @template {Array<unknown>} [TupleParameters=[]]
*   Arguments passed to the plugin (default: `[]`, the empty tuple).
* @template {Node | string | undefined} [Input=undefined]
*   Value that is expected as input (optional).
*
*   *   If the plugin returns a {@linkcode Transformer}, this
*       should be the node it expects.
*   *   If the plugin sets a {@linkcode Parser}, this should be
*       `string`.
*   *   If the plugin sets a {@linkcode Compiler}, this should be the
*       node it expects.
* @template [Output=undefined] (optional).
*   Value that is yielded as output.
*
*   *   If the plugin returns a {@linkcode Transformer}, this
*       should be the node that that yields.
*   *   If the plugin sets a {@linkcode Parser}, this should be the
*       node that it yields.
*   *   If the plugin sets a {@linkcode Compiler}, this should be
*       result it yields.
* @typedef {(
*   [
*     plugin: Plugin<TupleParameters, Input, Output>,
*     ...parameters: TupleParameters
*   ]
* )} PluginTuple
*/
/**
* @typedef Preset
*   Sharable configuration.
*
*   They can contain plugins and settings.
* @property {PluggableList | undefined} [plugins]
*   List of plugins and presets (optional).
* @property {Settings | undefined} [settings]
*   Shared settings for parsers and compilers (optional).
*/
/**
* @template {VFile} [File=VFile]
*   The file that the callback receives (default: `VFile`).
* @callback ProcessCallback
*   Callback called when the process is done.
*
*   Called with either an error or a result.
* @param {Error | undefined} [error]
*   Fatal error (optional).
* @param {File | undefined} [file]
*   Processed file (optional).
* @returns {undefined}
*   Nothing.
*/
/**
* @template {Node} [Tree=Node]
*   The tree that the callback receives (default: `Node`).
* @callback RunCallback
*   Callback called when transformers are done.
*
*   Called with either an error or results.
* @param {Error | undefined} [error]
*   Fatal error (optional).
* @param {Tree | undefined} [tree]
*   Transformed tree (optional).
* @param {VFile | undefined} [file]
*   File (optional).
* @returns {undefined}
*   Nothing.
*/
/**
* @template {Node} [Output=Node]
*   Node type that the transformer yields (default: `Node`).
* @callback TransformCallback
*   Callback passed to transforms.
*
*   If the signature of a `transformer` accepts a third argument, the
*   transformer may perform asynchronous operations, and must call it.
* @param {Error | undefined} [error]
*   Fatal error to stop the process (optional).
* @param {Output | undefined} [tree]
*   New, changed, tree (optional).
* @param {VFile | undefined} [file]
*   New, changed, file (optional).
* @returns {undefined}
*   Nothing.
*/
/**
* @template {Node} [Input=Node]
*   Node type that the transformer expects (default: `Node`).
* @template {Node} [Output=Input]
*   Node type that the transformer yields (default: `Input`).
* @callback Transformer
*   Transformers handle syntax trees and files.
*
*   They are functions that are called each time a syntax tree and file are
*   passed through the run phase.
*   When an error occurs in them (either because it’s thrown, returned,
*   rejected, or passed to `next`), the process stops.
*
*   The run phase is handled by [`trough`][trough], see its documentation for
*   the exact semantics of these functions.
*
*   > **Note**: you should likely ignore `next`: don’t accept it.
*   > it supports callback-style async work.
*   > But promises are likely easier to reason about.
*
*   [trough]: https://github.com/wooorm/trough#function-fninput-next
* @param {Input} tree
*   Tree to handle.
* @param {VFile} file
*   File to handle.
* @param {TransformCallback<Output>} next
*   Callback.
* @returns {(
*   Promise<Output | undefined | void> |
*   Promise<never> | // For some reason this is needed separately.
*   Output |
*   Error |
*   undefined |
*   void
* )}
*   If you accept `next`, nothing.
*   Otherwise:
*
*   *   `Error` — fatal error to stop the process
*   *   `Promise<undefined>` or `undefined` — the next transformer keeps using
*       same tree
*   *   `Promise<Node>` or `Node` — new, changed, tree
*/
/**
* @template {Node | undefined} ParseTree
*   Output of `parse`.
* @template {Node | undefined} HeadTree
*   Input for `run`.
* @template {Node | undefined} TailTree
*   Output for `run`.
* @template {Node | undefined} CompileTree
*   Input of `stringify`.
* @template {CompileResults | undefined} CompileResult
*   Output of `stringify`.
* @template {Node | string | undefined} Input
*   Input of plugin.
* @template Output
*   Output of plugin (optional).
* @typedef {(
*   Input extends string
*     ? Output extends Node | undefined
*       ? // Parser.
*         Processor<
*           Output extends undefined ? ParseTree : Output,
*           HeadTree,
*           TailTree,
*           CompileTree,
*           CompileResult
*         >
*       : // Unknown.
*         Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>
*     : Output extends CompileResults
*     ? Input extends Node | undefined
*       ? // Compiler.
*         Processor<
*           ParseTree,
*           HeadTree,
*           TailTree,
*           Input extends undefined ? CompileTree : Input,
*           Output extends undefined ? CompileResult : Output
*         >
*       : // Unknown.
*         Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>
*     : Input extends Node | undefined
*     ? Output extends Node | undefined
*       ? // Transform.
*         Processor<
*           ParseTree,
*           HeadTree extends undefined ? Input : HeadTree,
*           Output extends undefined ? TailTree : Output,
*           CompileTree,
*           CompileResult
*         >
*       : // Unknown.
*         Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>
*     : // Unknown.
*       Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>
* )} UsePlugin
*   Create a processor based on the input/output of a {@link Plugin plugin}.
*/
/**
* @template {CompileResults | undefined} Result
*   Node type that the transformer yields.
* @typedef {(
*   Result extends Value | undefined ?
*     VFile :
*     VFile & {result: Result}
*   )} VFileWithOutput
*   Type to generate a {@linkcode VFile} corresponding to a compiler result.
*
*   If a result that is not acceptable on a `VFile` is used, that will
*   be stored on the `result` field of {@linkcode VFile}.
*/
var own = {}.hasOwnProperty;
/**
* Create a new processor.
*
* @example
*   This example shows how a new processor can be created (from `remark`) and linked
*   to **stdin**(4) and **stdout**(4).
*
*   ```js
*   import process from 'node:process'
*   import concatStream from 'concat-stream'
*   import {remark} from 'remark'
*
*   process.stdin.pipe(
*     concatStream(function (buf) {
*       process.stdout.write(String(remark().processSync(buf)))
*     })
*   )
*   ```
*
* @returns
*   New *unfrozen* processor (`processor`).
*
*   This processor is configured to work the same as its ancestor.
*   When the descendant processor is configured in the future it does not
*   affect the ancestral processor.
*/
var unified = new class Processor extends CallableInstance {
	/**
	* Create a processor.
	*/
	constructor() {
		super("copy");
		/**
		* Compiler to use (deprecated).
		*
		* @deprecated
		*   Use `compiler` instead.
		* @type {(
		*   Compiler<
		*     CompileTree extends undefined ? Node : CompileTree,
		*     CompileResult extends undefined ? CompileResults : CompileResult
		*   > |
		*   undefined
		* )}
		*/
		this.Compiler = void 0;
		/**
		* Parser to use (deprecated).
		*
		* @deprecated
		*   Use `parser` instead.
		* @type {(
		*   Parser<ParseTree extends undefined ? Node : ParseTree> |
		*   undefined
		* )}
		*/
		this.Parser = void 0;
		/**
		* Internal list of configured plugins.
		*
		* @deprecated
		*   This is a private internal property and should not be used.
		* @type {Array<PluginTuple<Array<unknown>>>}
		*/
		this.attachers = [];
		/**
		* Compiler to use.
		*
		* @type {(
		*   Compiler<
		*     CompileTree extends undefined ? Node : CompileTree,
		*     CompileResult extends undefined ? CompileResults : CompileResult
		*   > |
		*   undefined
		* )}
		*/
		this.compiler = void 0;
		/**
		* Internal state to track where we are while freezing.
		*
		* @deprecated
		*   This is a private internal property and should not be used.
		* @type {number}
		*/
		this.freezeIndex = -1;
		/**
		* Internal state to track whether we’re frozen.
		*
		* @deprecated
		*   This is a private internal property and should not be used.
		* @type {boolean | undefined}
		*/
		this.frozen = void 0;
		/**
		* Internal state.
		*
		* @deprecated
		*   This is a private internal property and should not be used.
		* @type {Data}
		*/
		this.namespace = {};
		/**
		* Parser to use.
		*
		* @type {(
		*   Parser<ParseTree extends undefined ? Node : ParseTree> |
		*   undefined
		* )}
		*/
		this.parser = void 0;
		/**
		* Internal list of configured transformers.
		*
		* @deprecated
		*   This is a private internal property and should not be used.
		* @type {Pipeline}
		*/
		this.transformers = trough();
	}
	/**
	* Copy a processor.
	*
	* @deprecated
	*   This is a private internal method and should not be used.
	* @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
	*   New *unfrozen* processor ({@linkcode Processor}) that is
	*   configured to work the same as its ancestor.
	*   When the descendant processor is configured in the future it does not
	*   affect the ancestral processor.
	*/
	copy() {
		const destination = new Processor();
		let index = -1;
		while (++index < this.attachers.length) {
			const attacher = this.attachers[index];
			destination.use(...attacher);
		}
		destination.data((0, import_extend.default)(true, {}, this.namespace));
		return destination;
	}
	/**
	* Configure the processor with info available to all plugins.
	* Information is stored in an object.
	*
	* Typically, options can be given to a specific plugin, but sometimes it
	* makes sense to have information shared with several plugins.
	* For example, a list of HTML elements that are self-closing, which is
	* needed during all phases.
	*
	* > **Note**: setting information cannot occur on *frozen* processors.
	* > Call the processor first to create a new unfrozen processor.
	*
	* > **Note**: to register custom data in TypeScript, augment the
	* > {@linkcode Data} interface.
	*
	* @example
	*   This example show how to get and set info:
	*
	*   ```js
	*   import {unified} from 'unified'
	*
	*   const processor = unified().data('alpha', 'bravo')
	*
	*   processor.data('alpha') // => 'bravo'
	*
	*   processor.data() // => {alpha: 'bravo'}
	*
	*   processor.data({charlie: 'delta'})
	*
	*   processor.data() // => {charlie: 'delta'}
	*   ```
	*
	* @template {keyof Data} Key
	*
	* @overload
	* @returns {Data}
	*
	* @overload
	* @param {Data} dataset
	* @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
	*
	* @overload
	* @param {Key} key
	* @returns {Data[Key]}
	*
	* @overload
	* @param {Key} key
	* @param {Data[Key]} value
	* @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
	*
	* @param {Data | Key} [key]
	*   Key to get or set, or entire dataset to set, or nothing to get the
	*   entire dataset (optional).
	* @param {Data[Key]} [value]
	*   Value to set (optional).
	* @returns {unknown}
	*   The current processor when setting, the value at `key` when getting, or
	*   the entire dataset when getting without key.
	*/
	data(key, value) {
		if (typeof key === "string") {
			if (arguments.length === 2) {
				assertUnfrozen("data", this.frozen);
				this.namespace[key] = value;
				return this;
			}
			return own.call(this.namespace, key) && this.namespace[key] || void 0;
		}
		if (key) {
			assertUnfrozen("data", this.frozen);
			this.namespace = key;
			return this;
		}
		return this.namespace;
	}
	/**
	* Freeze a processor.
	*
	* Frozen processors are meant to be extended and not to be configured
	* directly.
	*
	* When a processor is frozen it cannot be unfrozen.
	* New processors working the same way can be created by calling the
	* processor.
	*
	* It’s possible to freeze processors explicitly by calling `.freeze()`.
	* Processors freeze automatically when `.parse()`, `.run()`, `.runSync()`,
	* `.stringify()`, `.process()`, or `.processSync()` are called.
	*
	* @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
	*   The current processor.
	*/
	freeze() {
		if (this.frozen) return this;
		const self = this;
		while (++this.freezeIndex < this.attachers.length) {
			const [attacher, ...options] = this.attachers[this.freezeIndex];
			if (options[0] === false) continue;
			if (options[0] === true) options[0] = void 0;
			const transformer = attacher.call(self, ...options);
			if (typeof transformer === "function") this.transformers.use(transformer);
		}
		this.frozen = true;
		this.freezeIndex = Number.POSITIVE_INFINITY;
		return this;
	}
	/**
	* Parse text to a syntax tree.
	*
	* > **Note**: `parse` freezes the processor if not already *frozen*.
	*
	* > **Note**: `parse` performs the parse phase, not the run phase or other
	* > phases.
	*
	* @param {Compatible | undefined} [file]
	*   file to parse (optional); typically `string` or `VFile`; any value
	*   accepted as `x` in `new VFile(x)`.
	* @returns {ParseTree extends undefined ? Node : ParseTree}
	*   Syntax tree representing `file`.
	*/
	parse(file) {
		this.freeze();
		const realFile = vfile(file);
		const parser = this.parser || this.Parser;
		assertParser("parse", parser);
		return parser(String(realFile), realFile);
	}
	/**
	* Process the given file as configured on the processor.
	*
	* > **Note**: `process` freezes the processor if not already *frozen*.
	*
	* > **Note**: `process` performs the parse, run, and stringify phases.
	*
	* @overload
	* @param {Compatible | undefined} file
	* @param {ProcessCallback<VFileWithOutput<CompileResult>>} done
	* @returns {undefined}
	*
	* @overload
	* @param {Compatible | undefined} [file]
	* @returns {Promise<VFileWithOutput<CompileResult>>}
	*
	* @param {Compatible | undefined} [file]
	*   File (optional); typically `string` or `VFile`]; any value accepted as
	*   `x` in `new VFile(x)`.
	* @param {ProcessCallback<VFileWithOutput<CompileResult>> | undefined} [done]
	*   Callback (optional).
	* @returns {Promise<VFile> | undefined}
	*   Nothing if `done` is given.
	*   Otherwise a promise, rejected with a fatal error or resolved with the
	*   processed file.
	*
	*   The parsed, transformed, and compiled value is available at
	*   `file.value` (see note).
	*
	*   > **Note**: unified typically compiles by serializing: most
	*   > compilers return `string` (or `Uint8Array`).
	*   > Some compilers, such as the one configured with
	*   > [`rehype-react`][rehype-react], return other values (in this case, a
	*   > React tree).
	*   > If you’re using a compiler that doesn’t serialize, expect different
	*   > result values.
	*   >
	*   > To register custom results in TypeScript, add them to
	*   > {@linkcode CompileResultMap}.
	*
	*   [rehype-react]: https://github.com/rehypejs/rehype-react
	*/
	process(file, done) {
		const self = this;
		this.freeze();
		assertParser("process", this.parser || this.Parser);
		assertCompiler("process", this.compiler || this.Compiler);
		return done ? executor(void 0, done) : new Promise(executor);
		/**
		* @param {((file: VFileWithOutput<CompileResult>) => undefined | void) | undefined} resolve
		* @param {(error: Error | undefined) => undefined | void} reject
		* @returns {undefined}
		*/
		function executor(resolve, reject) {
			const realFile = vfile(file);
			const parseTree = self.parse(realFile);
			self.run(parseTree, realFile, function(error, tree, file) {
				if (error || !tree || !file) return realDone(error);
				const compileTree = tree;
				const compileResult = self.stringify(compileTree, file);
				if (looksLikeAValue(compileResult)) file.value = compileResult;
				else file.result = compileResult;
				realDone(error, file);
			});
			/**
			* @param {Error | undefined} error
			* @param {VFileWithOutput<CompileResult> | undefined} [file]
			* @returns {undefined}
			*/
			function realDone(error, file) {
				if (error || !file) reject(error);
				else if (resolve) resolve(file);
				else done(void 0, file);
			}
		}
	}
	/**
	* Process the given file as configured on the processor.
	*
	* An error is thrown if asynchronous transforms are configured.
	*
	* > **Note**: `processSync` freezes the processor if not already *frozen*.
	*
	* > **Note**: `processSync` performs the parse, run, and stringify phases.
	*
	* @param {Compatible | undefined} [file]
	*   File (optional); typically `string` or `VFile`; any value accepted as
	*   `x` in `new VFile(x)`.
	* @returns {VFileWithOutput<CompileResult>}
	*   The processed file.
	*
	*   The parsed, transformed, and compiled value is available at
	*   `file.value` (see note).
	*
	*   > **Note**: unified typically compiles by serializing: most
	*   > compilers return `string` (or `Uint8Array`).
	*   > Some compilers, such as the one configured with
	*   > [`rehype-react`][rehype-react], return other values (in this case, a
	*   > React tree).
	*   > If you’re using a compiler that doesn’t serialize, expect different
	*   > result values.
	*   >
	*   > To register custom results in TypeScript, add them to
	*   > {@linkcode CompileResultMap}.
	*
	*   [rehype-react]: https://github.com/rehypejs/rehype-react
	*/
	processSync(file) {
		/** @type {boolean} */
		let complete = false;
		/** @type {VFileWithOutput<CompileResult> | undefined} */
		let result;
		this.freeze();
		assertParser("processSync", this.parser || this.Parser);
		assertCompiler("processSync", this.compiler || this.Compiler);
		this.process(file, realDone);
		assertDone("processSync", "process", complete);
		return result;
		/**
		* @type {ProcessCallback<VFileWithOutput<CompileResult>>}
		*/
		function realDone(error, file) {
			complete = true;
			bail(error);
			result = file;
		}
	}
	/**
	* Run *transformers* on a syntax tree.
	*
	* > **Note**: `run` freezes the processor if not already *frozen*.
	*
	* > **Note**: `run` performs the run phase, not other phases.
	*
	* @overload
	* @param {HeadTree extends undefined ? Node : HeadTree} tree
	* @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done
	* @returns {undefined}
	*
	* @overload
	* @param {HeadTree extends undefined ? Node : HeadTree} tree
	* @param {Compatible | undefined} file
	* @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done
	* @returns {undefined}
	*
	* @overload
	* @param {HeadTree extends undefined ? Node : HeadTree} tree
	* @param {Compatible | undefined} [file]
	* @returns {Promise<TailTree extends undefined ? Node : TailTree>}
	*
	* @param {HeadTree extends undefined ? Node : HeadTree} tree
	*   Tree to transform and inspect.
	* @param {(
	*   RunCallback<TailTree extends undefined ? Node : TailTree> |
	*   Compatible
	* )} [file]
	*   File associated with `node` (optional); any value accepted as `x` in
	*   `new VFile(x)`.
	* @param {RunCallback<TailTree extends undefined ? Node : TailTree>} [done]
	*   Callback (optional).
	* @returns {Promise<TailTree extends undefined ? Node : TailTree> | undefined}
	*   Nothing if `done` is given.
	*   Otherwise, a promise rejected with a fatal error or resolved with the
	*   transformed tree.
	*/
	run(tree, file, done) {
		assertNode(tree);
		this.freeze();
		const transformers = this.transformers;
		if (!done && typeof file === "function") {
			done = file;
			file = void 0;
		}
		return done ? executor(void 0, done) : new Promise(executor);
		/**
		* @param {(
		*   ((tree: TailTree extends undefined ? Node : TailTree) => undefined | void) |
		*   undefined
		* )} resolve
		* @param {(error: Error) => undefined | void} reject
		* @returns {undefined}
		*/
		function executor(resolve, reject) {
			const realFile = vfile(file);
			transformers.run(tree, realFile, realDone);
			/**
			* @param {Error | undefined} error
			* @param {Node} outputTree
			* @param {VFile} file
			* @returns {undefined}
			*/
			function realDone(error, outputTree, file) {
				const resultingTree = outputTree || tree;
				if (error) reject(error);
				else if (resolve) resolve(resultingTree);
				else done(void 0, resultingTree, file);
			}
		}
	}
	/**
	* Run *transformers* on a syntax tree.
	*
	* An error is thrown if asynchronous transforms are configured.
	*
	* > **Note**: `runSync` freezes the processor if not already *frozen*.
	*
	* > **Note**: `runSync` performs the run phase, not other phases.
	*
	* @param {HeadTree extends undefined ? Node : HeadTree} tree
	*   Tree to transform and inspect.
	* @param {Compatible | undefined} [file]
	*   File associated with `node` (optional); any value accepted as `x` in
	*   `new VFile(x)`.
	* @returns {TailTree extends undefined ? Node : TailTree}
	*   Transformed tree.
	*/
	runSync(tree, file) {
		/** @type {boolean} */
		let complete = false;
		/** @type {(TailTree extends undefined ? Node : TailTree) | undefined} */
		let result;
		this.run(tree, file, realDone);
		assertDone("runSync", "run", complete);
		return result;
		/**
		* @type {RunCallback<TailTree extends undefined ? Node : TailTree>}
		*/
		function realDone(error, tree) {
			bail(error);
			result = tree;
			complete = true;
		}
	}
	/**
	* Compile a syntax tree.
	*
	* > **Note**: `stringify` freezes the processor if not already *frozen*.
	*
	* > **Note**: `stringify` performs the stringify phase, not the run phase
	* > or other phases.
	*
	* @param {CompileTree extends undefined ? Node : CompileTree} tree
	*   Tree to compile.
	* @param {Compatible | undefined} [file]
	*   File associated with `node` (optional); any value accepted as `x` in
	*   `new VFile(x)`.
	* @returns {CompileResult extends undefined ? Value : CompileResult}
	*   Textual representation of the tree (see note).
	*
	*   > **Note**: unified typically compiles by serializing: most compilers
	*   > return `string` (or `Uint8Array`).
	*   > Some compilers, such as the one configured with
	*   > [`rehype-react`][rehype-react], return other values (in this case, a
	*   > React tree).
	*   > If you’re using a compiler that doesn’t serialize, expect different
	*   > result values.
	*   >
	*   > To register custom results in TypeScript, add them to
	*   > {@linkcode CompileResultMap}.
	*
	*   [rehype-react]: https://github.com/rehypejs/rehype-react
	*/
	stringify(tree, file) {
		this.freeze();
		const realFile = vfile(file);
		const compiler = this.compiler || this.Compiler;
		assertCompiler("stringify", compiler);
		assertNode(tree);
		return compiler(tree, realFile);
	}
	/**
	* Configure the processor to use a plugin, a list of usable values, or a
	* preset.
	*
	* If the processor is already using a plugin, the previous plugin
	* configuration is changed based on the options that are passed in.
	* In other words, the plugin is not added a second time.
	*
	* > **Note**: `use` cannot be called on *frozen* processors.
	* > Call the processor first to create a new unfrozen processor.
	*
	* @example
	*   There are many ways to pass plugins to `.use()`.
	*   This example gives an overview:
	*
	*   ```js
	*   import {unified} from 'unified'
	*
	*   unified()
	*     // Plugin with options:
	*     .use(pluginA, {x: true, y: true})
	*     // Passing the same plugin again merges configuration (to `{x: true, y: false, z: true}`):
	*     .use(pluginA, {y: false, z: true})
	*     // Plugins:
	*     .use([pluginB, pluginC])
	*     // Two plugins, the second with options:
	*     .use([pluginD, [pluginE, {}]])
	*     // Preset with plugins and settings:
	*     .use({plugins: [pluginF, [pluginG, {}]], settings: {position: false}})
	*     // Settings only:
	*     .use({settings: {position: false}})
	*   ```
	*
	* @template {Array<unknown>} [Parameters=[]]
	* @template {Node | string | undefined} [Input=undefined]
	* @template [Output=Input]
	*
	* @overload
	* @param {Preset | null | undefined} [preset]
	* @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
	*
	* @overload
	* @param {PluggableList} list
	* @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
	*
	* @overload
	* @param {Plugin<Parameters, Input, Output>} plugin
	* @param {...(Parameters | [boolean])} parameters
	* @returns {UsePlugin<ParseTree, HeadTree, TailTree, CompileTree, CompileResult, Input, Output>}
	*
	* @param {PluggableList | Plugin | Preset | null | undefined} value
	*   Usable value.
	* @param {...unknown} parameters
	*   Parameters, when a plugin is given as a usable value.
	* @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
	*   Current processor.
	*/
	use(value, ...parameters) {
		const attachers = this.attachers;
		const namespace = this.namespace;
		assertUnfrozen("use", this.frozen);
		if (value === null || value === void 0) {} else if (typeof value === "function") addPlugin(value, parameters);
		else if (typeof value === "object") if (Array.isArray(value)) addList(value);
		else addPreset(value);
		else throw new TypeError("Expected usable value, not `" + value + "`");
		return this;
		/**
		* @param {Pluggable} value
		* @returns {undefined}
		*/
		function add(value) {
			if (typeof value === "function") addPlugin(value, []);
			else if (typeof value === "object") if (Array.isArray(value)) {
				const [plugin, ...parameters] = value;
				addPlugin(plugin, parameters);
			} else addPreset(value);
			else throw new TypeError("Expected usable value, not `" + value + "`");
		}
		/**
		* @param {Preset} result
		* @returns {undefined}
		*/
		function addPreset(result) {
			if (!("plugins" in result) && !("settings" in result)) throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");
			addList(result.plugins);
			if (result.settings) namespace.settings = (0, import_extend.default)(true, namespace.settings, result.settings);
		}
		/**
		* @param {PluggableList | null | undefined} plugins
		* @returns {undefined}
		*/
		function addList(plugins) {
			let index = -1;
			if (plugins === null || plugins === void 0) {} else if (Array.isArray(plugins)) while (++index < plugins.length) {
				const thing = plugins[index];
				add(thing);
			}
			else throw new TypeError("Expected a list of plugins, not `" + plugins + "`");
		}
		/**
		* @param {Plugin} plugin
		* @param {Array<unknown>} parameters
		* @returns {undefined}
		*/
		function addPlugin(plugin, parameters) {
			let index = -1;
			let entryIndex = -1;
			while (++index < attachers.length) if (attachers[index][0] === plugin) {
				entryIndex = index;
				break;
			}
			if (entryIndex === -1) attachers.push([plugin, ...parameters]);
			else if (parameters.length > 0) {
				let [primary, ...rest] = parameters;
				const currentPrimary = attachers[entryIndex][1];
				if (isPlainObject(currentPrimary) && isPlainObject(primary)) primary = (0, import_extend.default)(true, currentPrimary, primary);
				attachers[entryIndex] = [
					plugin,
					primary,
					...rest
				];
			}
		}
	}
}().freeze();
/**
* Assert a parser is available.
*
* @param {string} name
* @param {unknown} value
* @returns {asserts value is Parser}
*/
function assertParser(name, value) {
	if (typeof value !== "function") throw new TypeError("Cannot `" + name + "` without `parser`");
}
/**
* Assert a compiler is available.
*
* @param {string} name
* @param {unknown} value
* @returns {asserts value is Compiler}
*/
function assertCompiler(name, value) {
	if (typeof value !== "function") throw new TypeError("Cannot `" + name + "` without `compiler`");
}
/**
* Assert the processor is not frozen.
*
* @param {string} name
* @param {unknown} frozen
* @returns {asserts frozen is false}
*/
function assertUnfrozen(name, frozen) {
	if (frozen) throw new Error("Cannot call `" + name + "` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.");
}
/**
* Assert `node` is a unist node.
*
* @param {unknown} node
* @returns {asserts node is Node}
*/
function assertNode(node) {
	if (!isPlainObject(node) || typeof node.type !== "string") throw new TypeError("Expected node, got `" + node + "`");
}
/**
* Assert that `complete` is `true`.
*
* @param {string} name
* @param {string} asyncName
* @param {unknown} complete
* @returns {asserts complete is true}
*/
function assertDone(name, asyncName, complete) {
	if (!complete) throw new Error("`" + name + "` finished async. Use `" + asyncName + "` instead");
}
/**
* @param {Compatible | undefined} [value]
* @returns {VFile}
*/
function vfile(value) {
	return looksLikeAVFile(value) ? value : new VFile(value);
}
/**
* @param {Compatible | undefined} [value]
* @returns {value is VFile}
*/
function looksLikeAVFile(value) {
	return Boolean(value && typeof value === "object" && "message" in value && "messages" in value);
}
/**
* @param {unknown} [value]
* @returns {value is Value}
*/
function looksLikeAValue(value) {
	return typeof value === "string" || isUint8Array(value);
}
/**
* Assert `value` is an `Uint8Array`.
*
* @param {unknown} value
*   thing.
* @returns {value is Uint8Array}
*   Whether `value` is an `Uint8Array`.
*/
function isUint8Array(value) {
	return Boolean(value && typeof value === "object" && "byteLength" in value && "byteOffset" in value);
}
//#endregion
//#region ../../node_modules/react-markdown/lib/index.js
/**
* @import {Element, Nodes, Parents, Root} from 'hast'
* @import {Root as MdastRoot} from 'mdast'
* @import {ComponentType, JSX, ReactElement, ReactNode} from 'react'
* @import {Options as RemarkRehypeOptions} from 'remark-rehype'
* @import {BuildVisitor} from 'unist-util-visit'
* @import {PluggableList, Processor} from 'unified'
*/
/**
* @callback AllowElement
*   Filter elements.
* @param {Readonly<Element>} element
*   Element to check.
* @param {number} index
*   Index of `element` in `parent`.
* @param {Readonly<Parents> | undefined} parent
*   Parent of `element`.
* @returns {boolean | null | undefined}
*   Whether to allow `element` (default: `false`).
*/
/**
* @typedef ExtraProps
*   Extra fields we pass.
* @property {Element | undefined} [node]
*   passed when `passNode` is on.
*/
/**
* @typedef {{
*   [Key in keyof JSX.IntrinsicElements]?: ComponentType<JSX.IntrinsicElements[Key] & ExtraProps> | keyof JSX.IntrinsicElements
* }} Components
*   Map tag names to components.
*/
/**
* @typedef Deprecation
*   Deprecation.
* @property {string} from
*   Old field.
* @property {string} id
*   ID in readme.
* @property {keyof Options} [to]
*   New field.
*/
/**
* @typedef Options
*   Configuration.
* @property {AllowElement | null | undefined} [allowElement]
*   Filter elements (optional);
*   `allowedElements` / `disallowedElements` is used first.
* @property {ReadonlyArray<string> | null | undefined} [allowedElements]
*   Tag names to allow (default: all tag names);
*   cannot combine w/ `disallowedElements`.
* @property {string | null | undefined} [children]
*   Markdown.
* @property {Components | null | undefined} [components]
*   Map tag names to components.
* @property {ReadonlyArray<string> | null | undefined} [disallowedElements]
*   Tag names to disallow (default: `[]`);
*   cannot combine w/ `allowedElements`.
* @property {PluggableList | null | undefined} [rehypePlugins]
*   List of rehype plugins to use.
* @property {PluggableList | null | undefined} [remarkPlugins]
*   List of remark plugins to use.
* @property {Readonly<RemarkRehypeOptions> | null | undefined} [remarkRehypeOptions]
*   Options to pass through to `remark-rehype`.
* @property {boolean | null | undefined} [skipHtml=false]
*   Ignore HTML in markdown completely (default: `false`).
* @property {boolean | null | undefined} [unwrapDisallowed=false]
*   Extract (unwrap) what’s in disallowed elements (default: `false`);
*   normally when say `strong` is not allowed, it and it’s children are dropped,
*   with `unwrapDisallowed` the element itself is replaced by its children.
* @property {UrlTransform | null | undefined} [urlTransform]
*   Change URLs (default: `defaultUrlTransform`)
*/
/**
* @typedef HooksOptionsOnly
*   Configuration specifically for {@linkcode MarkdownHooks}.
* @property {ReactNode | null | undefined} [fallback]
*   Content to render while the processor processing the markdown (optional).
*/
/**
* @typedef {Options & HooksOptionsOnly} HooksOptions
*   Configuration for {@linkcode MarkdownHooks};
*   extends the regular {@linkcode Options} with a `fallback` prop.
*/
/**
* @callback UrlTransform
*   Transform all URLs.
* @param {string} url
*   URL.
* @param {string} key
*   Property name (example: `'href'`).
* @param {Readonly<Element>} node
*   Node.
* @returns {string | null | undefined}
*   Transformed URL (optional).
*/
/** @type {PluggableList} */
var emptyPlugins = [];
/** @type {Readonly<RemarkRehypeOptions>} */
var emptyRemarkRehypeOptions = { allowDangerousHtml: true };
var safeProtocol = /^(https?|ircs?|mailto|xmpp)$/i;
/** @type {ReadonlyArray<Readonly<Deprecation>>} */
var deprecations$1 = [
	{
		from: "astPlugins",
		id: "remove-buggy-html-in-markdown-parser"
	},
	{
		from: "allowDangerousHtml",
		id: "remove-buggy-html-in-markdown-parser"
	},
	{
		from: "allowNode",
		id: "replace-allownode-allowedtypes-and-disallowedtypes",
		to: "allowElement"
	},
	{
		from: "allowedTypes",
		id: "replace-allownode-allowedtypes-and-disallowedtypes",
		to: "allowedElements"
	},
	{
		from: "className",
		id: "remove-classname"
	},
	{
		from: "disallowedTypes",
		id: "replace-allownode-allowedtypes-and-disallowedtypes",
		to: "disallowedElements"
	},
	{
		from: "escapeHtml",
		id: "remove-buggy-html-in-markdown-parser"
	},
	{
		from: "includeElementIndex",
		id: "#remove-includeelementindex"
	},
	{
		from: "includeNodeIndex",
		id: "change-includenodeindex-to-includeelementindex"
	},
	{
		from: "linkTarget",
		id: "remove-linktarget"
	},
	{
		from: "plugins",
		id: "change-plugins-to-remarkplugins",
		to: "remarkPlugins"
	},
	{
		from: "rawSourcePos",
		id: "#remove-rawsourcepos"
	},
	{
		from: "renderers",
		id: "change-renderers-to-components",
		to: "components"
	},
	{
		from: "source",
		id: "change-source-to-children",
		to: "children"
	},
	{
		from: "sourcePos",
		id: "#remove-sourcepos"
	},
	{
		from: "transformImageUri",
		id: "#add-urltransform",
		to: "urlTransform"
	},
	{
		from: "transformLinkUri",
		id: "#add-urltransform",
		to: "urlTransform"
	}
];
/**
* Component to render markdown.
*
* This is a synchronous component.
* When using async plugins,
* see {@linkcode MarkdownAsync} or {@linkcode MarkdownHooks}.
*
* @param {Readonly<Options>} options
*   Props.
* @returns {ReactElement}
*   React element.
*/
function Markdown(options) {
	const processor = createProcessor(options);
	const file = createFile(options);
	return post(processor.runSync(processor.parse(file), file), options);
}
/**
* Set up the `unified` processor.
*
* @param {Readonly<Options>} options
*   Props.
* @returns {Processor<MdastRoot, MdastRoot, Root, undefined, undefined>}
*   Result.
*/
function createProcessor(options) {
	const rehypePlugins = options.rehypePlugins || emptyPlugins;
	const remarkPlugins = options.remarkPlugins || emptyPlugins;
	const remarkRehypeOptions = options.remarkRehypeOptions ? {
		...options.remarkRehypeOptions,
		...emptyRemarkRehypeOptions
	} : emptyRemarkRehypeOptions;
	return unified().use(remarkParse).use(remarkPlugins).use(remarkRehype, remarkRehypeOptions).use(rehypePlugins);
}
/**
* Set up the virtual file.
*
* @param {Readonly<Options>} options
*   Props.
* @returns {VFile}
*   Result.
*/
function createFile(options) {
	const children = options.children || "";
	const file = new VFile();
	if (typeof children === "string") file.value = children;
	else "" + children;
	return file;
}
/**
* Process the result from unified some more.
*
* @param {Nodes} tree
*   Tree.
* @param {Readonly<Options>} options
*   Props.
* @returns {ReactElement}
*   React element.
*/
function post(tree, options) {
	const allowedElements = options.allowedElements;
	const allowElement = options.allowElement;
	const components = options.components;
	const disallowedElements = options.disallowedElements;
	const skipHtml = options.skipHtml;
	const unwrapDisallowed = options.unwrapDisallowed;
	const urlTransform = options.urlTransform || defaultUrlTransform;
	for (const deprecation of deprecations$1) if (Object.hasOwn(options, deprecation.from)) "" + deprecation.from + (deprecation.to ? "use `" + deprecation.to + "` instead" : "remove it") + deprecation.id;
	if (allowedElements && disallowedElements);
	visit(tree, transform);
	return toJsxRuntime(tree, {
		Fragment: import_jsx_runtime.Fragment,
		components,
		ignoreInvalidStyle: true,
		jsx: import_jsx_runtime.jsx,
		jsxs: import_jsx_runtime.jsxs,
		passKeys: true,
		passNode: true
	});
	/** @type {BuildVisitor<Root>} */
	function transform(node, index, parent) {
		if (node.type === "raw" && parent && typeof index === "number") {
			if (skipHtml) parent.children.splice(index, 1);
			else parent.children[index] = {
				type: "text",
				value: node.value
			};
			return index;
		}
		if (node.type === "element") {
			/** @type {string} */
			let key;
			for (key in urlAttributes) if (Object.hasOwn(urlAttributes, key) && Object.hasOwn(node.properties, key)) {
				const value = node.properties[key];
				const test = urlAttributes[key];
				if (test === null || test.includes(node.tagName)) node.properties[key] = urlTransform(String(value || ""), key, node);
			}
		}
		if (node.type === "element") {
			let remove = allowedElements ? !allowedElements.includes(node.tagName) : disallowedElements ? disallowedElements.includes(node.tagName) : false;
			if (!remove && allowElement && typeof index === "number") remove = !allowElement(node, index, parent);
			if (remove && parent && typeof index === "number") {
				if (unwrapDisallowed && node.children) parent.children.splice(index, 1, ...node.children);
				else parent.children.splice(index, 1);
				return index;
			}
		}
	}
}
/**
* Make a URL safe.
*
* @satisfies {UrlTransform}
* @param {string} value
*   URL.
* @returns {string}
*   Safe URL.
*/
function defaultUrlTransform(value) {
	const colon = value.indexOf(":");
	const questionMark = value.indexOf("?");
	const numberSign = value.indexOf("#");
	const slash = value.indexOf("/");
	if (colon === -1 || slash !== -1 && colon > slash || questionMark !== -1 && colon > questionMark || numberSign !== -1 && colon > numberSign || safeProtocol.test(value.slice(0, colon))) return value;
	return "";
}
//#endregion
//#region ../../node_modules/hast-util-is-element/lib/index.js
/**
* Generate a check from a test.
*
* Useful if you’re going to test many nodes, for example when creating a
* utility where something else passes a compatible test.
*
* The created function is a bit faster because it expects valid input only:
* an `element`, `index`, and `parent`.
*
* @param test
*   A test for a specific element.
* @returns
*   A check.
*/
var convertElement = (function(test) {
	if (test === null || test === void 0) return element;
	if (typeof test === "string") return tagNameFactory(test);
	if (typeof test === "object") return anyFactory(test);
	if (typeof test === "function") return castFactory(test);
	throw new Error("Expected function, string, or array as `test`");
});
/**
* Handle multiple tests.
*
* @param {Array<TestFunction | string>} tests
* @returns {Check}
*/
function anyFactory(tests) {
	/** @type {Array<Check>} */
	const checks = [];
	let index = -1;
	while (++index < tests.length) checks[index] = convertElement(tests[index]);
	return castFactory(any);
	/**
	* @this {unknown}
	* @type {TestFunction}
	*/
	function any(...parameters) {
		let index = -1;
		while (++index < checks.length) if (checks[index].apply(this, parameters)) return true;
		return false;
	}
}
/**
* Turn a string into a test for an element with a certain type.
*
* @param {string} check
* @returns {Check}
*/
function tagNameFactory(check) {
	return castFactory(tagName);
	/**
	* @param {Element} element
	* @returns {boolean}
	*/
	function tagName(element) {
		return element.tagName === check;
	}
}
/**
* Turn a custom test into a test for an element that passes that test.
*
* @param {TestFunction} testFunction
* @returns {Check}
*/
function castFactory(testFunction) {
	return check;
	/**
	* @this {unknown}
	* @type {Check}
	*/
	function check(value, index, parent) {
		return Boolean(looksLikeAnElement(value) && testFunction.call(this, value, typeof index === "number" ? index : void 0, parent || void 0));
	}
}
/**
* Make sure something is an element.
*
* @param {unknown} element
* @returns {element is Element}
*/
function element(element) {
	return Boolean(element && typeof element === "object" && "type" in element && element.type === "element" && "tagName" in element && typeof element.tagName === "string");
}
/**
* @param {unknown} value
* @returns {value is Element}
*/
function looksLikeAnElement(value) {
	return value !== null && typeof value === "object" && "type" in value && "tagName" in value;
}
//#endregion
//#region ../../node_modules/is-absolute-url/index.js
var ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/;
var WINDOWS_PATH_REGEX$1 = /^[a-zA-Z]:\\/;
function isAbsoluteUrl(url) {
	if (typeof url !== "string") throw new TypeError(`Expected a \`string\`, got \`${typeof url}\``);
	if (WINDOWS_PATH_REGEX$1.test(url)) return false;
	return ABSOLUTE_URL_REGEX.test(url);
}
//#endregion
//#region ../../node_modules/rehype-external-links/lib/index.js
/**
* @typedef {import('hast').Element} Element
* @typedef {import('hast').ElementContent} ElementContent
* @typedef {import('hast').Properties} Properties
* @typedef {import('hast').Root} Root
* @typedef {import('hast-util-is-element').Test} Test
*/
/**
* @callback CreateContent
*   Create a target for the element.
* @param {Element} element
*   Element to check.
* @returns {Array<ElementContent> | ElementContent | null | undefined}
*   Content to add.
*
* @callback CreateProperties
*   Create properties for an element.
* @param {Element} element
*   Element to check.
* @returns {Properties | null | undefined}
*   Properties to add.
*
* @callback CreateRel
*   Create a `rel` for the element.
* @param {Element} element
*   Element to check.
* @returns {Array<string> | string | null | undefined}
*   `rel` to use.
*
* @callback CreateTarget
*   Create a `target` for the element.
* @param {Element} element
*   Element to check.
* @returns {Target | null | undefined}
*   `target` to use.
*
* @typedef Options
*   Configuration.
* @property {Array<ElementContent> | CreateContent | ElementContent | null | undefined} [content]
*   Content to insert at the end of external links (optional); will be
*   inserted in a `<span>` element; useful for improving accessibility by
*   giving users advanced warning when opening a new window.
* @property {CreateProperties | Properties | null | undefined} [contentProperties]
*   Properties to add to the `span` wrapping `content` (optional).
* @property {CreateProperties | Properties | null | undefined} [properties]
*   Properties to add to the link itself (optional).
* @property {Array<string> | null | undefined} [protocols=['http', 'https']]
*   Protocols to check, such as `mailto` or `tel` (default: `['http',
*   'https']`).
* @property {Array<string> | CreateRel | string | null | undefined} [rel=['nofollow']]
*   Link types to hint about the referenced documents (default:
*   `['nofollow']`); pass an empty array (`[]`) to not set `rel`s on links;
*   when using a `target`, add `noopener` and `noreferrer` to avoid
*   exploitation of the `window.opener` API.
* @property {CreateTarget | Target | null | undefined} [target]
*   How to display referenced documents; the default (nothing) is to not set
*   `target`s on links.
* @property {Test | null | undefined} [test]
*   Extra test to define which external link elements are modified (optional);
*   any test that can be given to `hast-util-is-element` is supported.
*
* @typedef {'_blank' | '_parent' | '_self' | '_top'} Target
*   Target.
*/
var defaultProtocols = ["http", "https"];
var defaultRel = ["nofollow"];
/** @type {Options} */
var emptyOptions$1 = {};
/**
* Automatically add `rel` (and `target`?) to external links.
*
* ###### Notes
*
* You should [likely not configure `target`][css-tricks].
*
* You should at least set `rel` to `['nofollow']`.
* When using a `target`, add `noopener` and `noreferrer` to avoid exploitation
* of the `window.opener` API.
*
* When using a `target`, you should set `content` to adhere to accessibility
* guidelines by giving users advanced warning when opening a new window.
*
* [css-tricks]: https://css-tricks.com/use-target_blank/
*
* @param {Readonly<Options> | null | undefined} [options]
*   Configuration (optional).
* @returns
*   Transform.
*/
function rehypeExternalLinks(options) {
	const settings = options || emptyOptions$1;
	const protocols = settings.protocols || defaultProtocols;
	const is = convertElement(settings.test);
	/**
	* Transform.
	*
	* @param {Root} tree
	*   Tree.
	* @returns {undefined}
	*   Nothing.
	*/
	return function(tree) {
		visit(tree, "element", function(node, index, parent) {
			if (node.tagName === "a" && typeof node.properties.href === "string" && is(node, index, parent)) {
				const url = node.properties.href;
				if (isAbsoluteUrl(url) ? protocols.includes(url.slice(0, url.indexOf(":"))) : url.startsWith("//")) {
					const contentRaw = createIfNeeded(settings.content, node);
					const content = contentRaw && !Array.isArray(contentRaw) ? [contentRaw] : contentRaw;
					const relRaw = createIfNeeded(settings.rel, node) || defaultRel;
					const rel = typeof relRaw === "string" ? parse$1(relRaw) : relRaw;
					const target = createIfNeeded(settings.target, node);
					const properties = createIfNeeded(settings.properties, node);
					if (properties) Object.assign(node.properties, esm_default(properties));
					if (rel.length > 0) node.properties.rel = [...rel];
					if (target) node.properties.target = target;
					if (content) {
						const properties = createIfNeeded(settings.contentProperties, node) || {};
						node.children.push({
							type: "element",
							tagName: "span",
							properties: esm_default(properties),
							children: esm_default(content)
						});
					}
				}
			}
		});
	};
}
/**
* Call a function to get a return value or use the value.
*
* @template T
*   Type of value.
* @param {T} value
*   Value.
* @param {Element} element
*   Element.
* @returns {T extends Function ? ReturnType<T> : T}
*   Result.
*/
function createIfNeeded(value, element) {
	return typeof value === "function" ? value(element) : value;
}
//#endregion
//#region ../../node_modules/ccount/index.js
/**
* Count how often a character (or substring) is used in a string.
*
* @param {string} value
*   Value to search in.
* @param {string} character
*   Character (or substring) to look for.
* @return {number}
*   Number of times `character` occurred in `value`.
*/
function ccount(value, character) {
	const source = String(value);
	if (typeof character !== "string") throw new TypeError("Expected character");
	let count = 0;
	let index = source.indexOf(character);
	while (index !== -1) {
		count++;
		index = source.indexOf(character, index + character.length);
	}
	return count;
}
//#endregion
//#region ../../node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp/index.js
function escapeStringRegexp(string) {
	if (typeof string !== "string") throw new TypeError("Expected a string");
	return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
}
//#endregion
//#region ../../node_modules/mdast-util-find-and-replace/lib/index.js
/**
* @import {Nodes, Parents, PhrasingContent, Root, Text} from 'mdast'
* @import {BuildVisitor, Test, VisitorResult} from 'unist-util-visit-parents'
*/
/**
* @typedef RegExpMatchObject
*   Info on the match.
* @property {number} index
*   The index of the search at which the result was found.
* @property {string} input
*   A copy of the search string in the text node.
* @property {[...Array<Parents>, Text]} stack
*   All ancestors of the text node, where the last node is the text itself.
*
* @typedef {RegExp | string} Find
*   Pattern to find.
*
*   Strings are escaped and then turned into global expressions.
*
* @typedef {Array<FindAndReplaceTuple>} FindAndReplaceList
*   Several find and replaces, in array form.
*
* @typedef {[Find, Replace?]} FindAndReplaceTuple
*   Find and replace in tuple form.
*
* @typedef {ReplaceFunction | string | null | undefined} Replace
*   Thing to replace with.
*
* @callback ReplaceFunction
*   Callback called when a search matches.
* @param {...any} parameters
*   The parameters are the result of corresponding search expression:
*
*   * `value` (`string`) — whole match
*   * `...capture` (`Array<string>`) — matches from regex capture groups
*   * `match` (`RegExpMatchObject`) — info on the match
* @returns {Array<PhrasingContent> | PhrasingContent | string | false | null | undefined}
*   Thing to replace with.
*
*   * when `null`, `undefined`, `''`, remove the match
*   * …or when `false`, do not replace at all
*   * …or when `string`, replace with a text node of that value
*   * …or when `Node` or `Array<Node>`, replace with those nodes
*
* @typedef {[RegExp, ReplaceFunction]} Pair
*   Normalized find and replace.
*
* @typedef {Array<Pair>} Pairs
*   All find and replaced.
*
* @typedef Options
*   Configuration.
* @property {Test | null | undefined} [ignore]
*   Test for which nodes to ignore (optional).
*/
/**
* Find patterns in a tree and replace them.
*
* The algorithm searches the tree in *preorder* for complete values in `Text`
* nodes.
* Partial matches are not supported.
*
* @param {Nodes} tree
*   Tree to change.
* @param {FindAndReplaceList | FindAndReplaceTuple} list
*   Patterns to find.
* @param {Options | null | undefined} [options]
*   Configuration (when `find` is not `Find`).
* @returns {undefined}
*   Nothing.
*/
function findAndReplace(tree, list, options) {
	const ignored = convert((options || {}).ignore || []);
	const pairs = toPairs(list);
	let pairIndex = -1;
	while (++pairIndex < pairs.length) visitParents(tree, "text", visitor);
	/** @type {BuildVisitor<Root, 'text'>} */
	function visitor(node, parents) {
		let index = -1;
		/** @type {Parents | undefined} */
		let grandparent;
		while (++index < parents.length) {
			const parent = parents[index];
			/** @type {Array<Nodes> | undefined} */
			const siblings = grandparent ? grandparent.children : void 0;
			if (ignored(parent, siblings ? siblings.indexOf(parent) : void 0, grandparent)) return;
			grandparent = parent;
		}
		if (grandparent) return handler(node, parents);
	}
	/**
	* Handle a text node which is not in an ignored parent.
	*
	* @param {Text} node
	*   Text node.
	* @param {Array<Parents>} parents
	*   Parents.
	* @returns {VisitorResult}
	*   Result.
	*/
	function handler(node, parents) {
		const parent = parents[parents.length - 1];
		const find = pairs[pairIndex][0];
		const replace = pairs[pairIndex][1];
		let start = 0;
		const index = parent.children.indexOf(node);
		let change = false;
		/** @type {Array<PhrasingContent>} */
		let nodes = [];
		find.lastIndex = 0;
		let match = find.exec(node.value);
		while (match) {
			const position = match.index;
			/** @type {RegExpMatchObject} */
			const matchObject = {
				index: match.index,
				input: match.input,
				stack: [...parents, node]
			};
			let value = replace(...match, matchObject);
			if (typeof value === "string") value = value.length > 0 ? {
				type: "text",
				value
			} : void 0;
			if (value === false) find.lastIndex = position + 1;
			else {
				if (start !== position) nodes.push({
					type: "text",
					value: node.value.slice(start, position)
				});
				if (Array.isArray(value)) nodes.push(...value);
				else if (value) nodes.push(value);
				start = position + match[0].length;
				change = true;
			}
			if (!find.global) break;
			match = find.exec(node.value);
		}
		if (change) {
			if (start < node.value.length) nodes.push({
				type: "text",
				value: node.value.slice(start)
			});
			parent.children.splice(index, 1, ...nodes);
		} else nodes = [node];
		return index + nodes.length;
	}
}
/**
* Turn a tuple or a list of tuples into pairs.
*
* @param {FindAndReplaceList | FindAndReplaceTuple} tupleOrList
*   Schema.
* @returns {Pairs}
*   Clean pairs.
*/
function toPairs(tupleOrList) {
	/** @type {Pairs} */
	const result = [];
	if (!Array.isArray(tupleOrList)) throw new TypeError("Expected find and replace tuple or list of tuples");
	/** @type {FindAndReplaceList} */
	const list = !tupleOrList[0] || Array.isArray(tupleOrList[0]) ? tupleOrList : [tupleOrList];
	let index = -1;
	while (++index < list.length) {
		const tuple = list[index];
		result.push([toExpression(tuple[0]), toFunction(tuple[1])]);
	}
	return result;
}
/**
* Turn a find into an expression.
*
* @param {Find} find
*   Find.
* @returns {RegExp}
*   Expression.
*/
function toExpression(find) {
	return typeof find === "string" ? new RegExp(escapeStringRegexp(find), "g") : find;
}
/**
* Turn a replace into a function.
*
* @param {Replace} replace
*   Replace.
* @returns {ReplaceFunction}
*   Function.
*/
function toFunction(replace) {
	return typeof replace === "function" ? replace : function() {
		return replace;
	};
}
//#endregion
//#region ../../node_modules/mdast-util-gfm-autolink-literal/lib/index.js
/**
* @import {RegExpMatchObject, ReplaceFunction} from 'mdast-util-find-and-replace'
* @import {CompileContext, Extension as FromMarkdownExtension, Handle as FromMarkdownHandle, Transform as FromMarkdownTransform} from 'mdast-util-from-markdown'
* @import {ConstructName, Options as ToMarkdownExtension} from 'mdast-util-to-markdown'
* @import {Link, PhrasingContent} from 'mdast'
*/
/** @type {ConstructName} */
var inConstruct = "phrasing";
/** @type {Array<ConstructName>} */
var notInConstruct = [
	"autolink",
	"link",
	"image",
	"label"
];
/**
* Create an extension for `mdast-util-from-markdown` to enable GFM autolink
* literals in markdown.
*
* @returns {FromMarkdownExtension}
*   Extension for `mdast-util-to-markdown` to enable GFM autolink literals.
*/
function gfmAutolinkLiteralFromMarkdown() {
	return {
		transforms: [transformGfmAutolinkLiterals],
		enter: {
			literalAutolink: enterLiteralAutolink,
			literalAutolinkEmail: enterLiteralAutolinkValue,
			literalAutolinkHttp: enterLiteralAutolinkValue,
			literalAutolinkWww: enterLiteralAutolinkValue
		},
		exit: {
			literalAutolink: exitLiteralAutolink,
			literalAutolinkEmail: exitLiteralAutolinkEmail,
			literalAutolinkHttp: exitLiteralAutolinkHttp,
			literalAutolinkWww: exitLiteralAutolinkWww
		}
	};
}
/**
* Create an extension for `mdast-util-to-markdown` to enable GFM autolink
* literals in markdown.
*
* @returns {ToMarkdownExtension}
*   Extension for `mdast-util-to-markdown` to enable GFM autolink literals.
*/
function gfmAutolinkLiteralToMarkdown() {
	return { unsafe: [
		{
			character: "@",
			before: "[+\\-.\\w]",
			after: "[\\-.\\w]",
			inConstruct,
			notInConstruct
		},
		{
			character: ".",
			before: "[Ww]",
			after: "[\\-.\\w]",
			inConstruct,
			notInConstruct
		},
		{
			character: ":",
			before: "[ps]",
			after: "\\/",
			inConstruct,
			notInConstruct
		}
	] };
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function enterLiteralAutolink(token) {
	this.enter({
		type: "link",
		title: null,
		url: "",
		children: []
	}, token);
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function enterLiteralAutolinkValue(token) {
	this.config.enter.autolinkProtocol.call(this, token);
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function exitLiteralAutolinkHttp(token) {
	this.config.exit.autolinkProtocol.call(this, token);
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function exitLiteralAutolinkWww(token) {
	this.config.exit.data.call(this, token);
	const node = this.stack[this.stack.length - 1];
	node.type;
	node.url = "http://" + this.sliceSerialize(token);
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function exitLiteralAutolinkEmail(token) {
	this.config.exit.autolinkEmail.call(this, token);
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function exitLiteralAutolink(token) {
	this.exit(token);
}
/** @type {FromMarkdownTransform} */
function transformGfmAutolinkLiterals(tree) {
	findAndReplace(tree, [[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, findUrl], [/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu, findEmail]], { ignore: ["link", "linkReference"] });
}
/**
* @type {ReplaceFunction}
* @param {string} _
* @param {string} protocol
* @param {string} domain
* @param {string} path
* @param {RegExpMatchObject} match
* @returns {Array<PhrasingContent> | Link | false}
*/
function findUrl(_, protocol, domain, path, match) {
	let prefix = "";
	if (!previous(match)) return false;
	if (/^w/i.test(protocol)) {
		domain = protocol + domain;
		protocol = "";
		prefix = "http://";
	}
	if (!isCorrectDomain(domain)) return false;
	const parts = splitUrl(domain + path);
	if (!parts[0]) return false;
	/** @type {Link} */
	const result = {
		type: "link",
		title: null,
		url: prefix + protocol + parts[0],
		children: [{
			type: "text",
			value: protocol + parts[0]
		}]
	};
	if (parts[1]) return [result, {
		type: "text",
		value: parts[1]
	}];
	return result;
}
/**
* @type {ReplaceFunction}
* @param {string} _
* @param {string} atext
* @param {string} label
* @param {RegExpMatchObject} match
* @returns {Link | false}
*/
function findEmail(_, atext, label, match) {
	if (!previous(match, true) || /[-\d_]$/.test(label)) return false;
	return {
		type: "link",
		title: null,
		url: "mailto:" + atext + "@" + label,
		children: [{
			type: "text",
			value: atext + "@" + label
		}]
	};
}
/**
* @param {string} domain
* @returns {boolean}
*/
function isCorrectDomain(domain) {
	const parts = domain.split(".");
	if (parts.length < 2 || parts[parts.length - 1] && (/_/.test(parts[parts.length - 1]) || !/[a-zA-Z\d]/.test(parts[parts.length - 1])) || parts[parts.length - 2] && (/_/.test(parts[parts.length - 2]) || !/[a-zA-Z\d]/.test(parts[parts.length - 2]))) return false;
	return true;
}
/**
* @param {string} url
* @returns {[string, string | undefined]}
*/
function splitUrl(url) {
	const trailExec = /[!"&'),.:;<>?\]}]+$/.exec(url);
	if (!trailExec) return [url, void 0];
	url = url.slice(0, trailExec.index);
	let trail = trailExec[0];
	let closingParenIndex = trail.indexOf(")");
	const openingParens = ccount(url, "(");
	let closingParens = ccount(url, ")");
	while (closingParenIndex !== -1 && openingParens > closingParens) {
		url += trail.slice(0, closingParenIndex + 1);
		trail = trail.slice(closingParenIndex + 1);
		closingParenIndex = trail.indexOf(")");
		closingParens++;
	}
	return [url, trail];
}
/**
* @param {RegExpMatchObject} match
* @param {boolean | null | undefined} [email=false]
* @returns {boolean}
*/
function previous(match, email) {
	const code = match.input.charCodeAt(match.index - 1);
	return (match.index === 0 || unicodeWhitespace(code) || unicodePunctuation(code)) && (!email || code !== 47);
}
//#endregion
//#region ../../node_modules/mdast-util-gfm-footnote/lib/index.js
/**
* @import {
*   CompileContext,
*   Extension as FromMarkdownExtension,
*   Handle as FromMarkdownHandle
* } from 'mdast-util-from-markdown'
* @import {ToMarkdownOptions} from 'mdast-util-gfm-footnote'
* @import {
*   Handle as ToMarkdownHandle,
*   Map,
*   Options as ToMarkdownExtension
* } from 'mdast-util-to-markdown'
* @import {FootnoteDefinition, FootnoteReference} from 'mdast'
*/
footnoteReference.peek = footnoteReferencePeek;
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function enterFootnoteCallString() {
	this.buffer();
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function enterFootnoteCall(token) {
	this.enter({
		type: "footnoteReference",
		identifier: "",
		label: ""
	}, token);
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function enterFootnoteDefinitionLabelString() {
	this.buffer();
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function enterFootnoteDefinition(token) {
	this.enter({
		type: "footnoteDefinition",
		identifier: "",
		label: "",
		children: []
	}, token);
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function exitFootnoteCallString(token) {
	const label = this.resume();
	const node = this.stack[this.stack.length - 1];
	node.type;
	node.identifier = normalizeIdentifier(this.sliceSerialize(token)).toLowerCase();
	node.label = label;
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function exitFootnoteCall(token) {
	this.exit(token);
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function exitFootnoteDefinitionLabelString(token) {
	const label = this.resume();
	const node = this.stack[this.stack.length - 1];
	node.type;
	node.identifier = normalizeIdentifier(this.sliceSerialize(token)).toLowerCase();
	node.label = label;
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function exitFootnoteDefinition(token) {
	this.exit(token);
}
/** @type {ToMarkdownHandle} */
function footnoteReferencePeek() {
	return "[";
}
/**
* @type {ToMarkdownHandle}
* @param {FootnoteReference} node
*/
function footnoteReference(node, _, state, info) {
	const tracker = state.createTracker(info);
	let value = tracker.move("[^");
	const exit = state.enter("footnoteReference");
	const subexit = state.enter("reference");
	value += tracker.move(state.safe(state.associationId(node), {
		after: "]",
		before: value
	}));
	subexit();
	exit();
	value += tracker.move("]");
	return value;
}
/**
* Create an extension for `mdast-util-from-markdown` to enable GFM footnotes
* in markdown.
*
* @returns {FromMarkdownExtension}
*   Extension for `mdast-util-from-markdown`.
*/
function gfmFootnoteFromMarkdown() {
	return {
		enter: {
			gfmFootnoteCallString: enterFootnoteCallString,
			gfmFootnoteCall: enterFootnoteCall,
			gfmFootnoteDefinitionLabelString: enterFootnoteDefinitionLabelString,
			gfmFootnoteDefinition: enterFootnoteDefinition
		},
		exit: {
			gfmFootnoteCallString: exitFootnoteCallString,
			gfmFootnoteCall: exitFootnoteCall,
			gfmFootnoteDefinitionLabelString: exitFootnoteDefinitionLabelString,
			gfmFootnoteDefinition: exitFootnoteDefinition
		}
	};
}
/**
* Create an extension for `mdast-util-to-markdown` to enable GFM footnotes
* in markdown.
*
* @param {ToMarkdownOptions | null | undefined} [options]
*   Configuration (optional).
* @returns {ToMarkdownExtension}
*   Extension for `mdast-util-to-markdown`.
*/
function gfmFootnoteToMarkdown(options) {
	let firstLineBlank = false;
	if (options && options.firstLineBlank) firstLineBlank = true;
	return {
		handlers: {
			footnoteDefinition,
			footnoteReference
		},
		unsafe: [{
			character: "[",
			inConstruct: [
				"label",
				"phrasing",
				"reference"
			]
		}]
	};
	/**
	* @type {ToMarkdownHandle}
	* @param {FootnoteDefinition} node
	*/
	function footnoteDefinition(node, _, state, info) {
		const tracker = state.createTracker(info);
		let value = tracker.move("[^");
		const exit = state.enter("footnoteDefinition");
		const subexit = state.enter("label");
		value += tracker.move(state.safe(state.associationId(node), {
			before: value,
			after: "]"
		}));
		subexit();
		value += tracker.move("]:");
		if (node.children && node.children.length > 0) {
			tracker.shift(4);
			value += tracker.move((firstLineBlank ? "\n" : " ") + state.indentLines(state.containerFlow(node, tracker.current()), firstLineBlank ? mapAll : mapExceptFirst));
		}
		exit();
		return value;
	}
}
/** @type {Map} */
function mapExceptFirst(line, index, blank) {
	return index === 0 ? line : mapAll(line, index, blank);
}
/** @type {Map} */
function mapAll(line, index, blank) {
	return (blank ? "" : "    ") + line;
}
//#endregion
//#region ../../node_modules/mdast-util-gfm-strikethrough/lib/index.js
/**
* @typedef {import('mdast').Delete} Delete
*
* @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext
* @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension
* @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle
*
* @typedef {import('mdast-util-to-markdown').ConstructName} ConstructName
* @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle
* @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension
*/
/**
* List of constructs that occur in phrasing (paragraphs, headings), but cannot
* contain strikethrough.
* So they sort of cancel each other out.
* Note: could use a better name.
*
* Note: keep in sync with: <https://github.com/syntax-tree/mdast-util-to-markdown/blob/8ce8dbf/lib/unsafe.js#L14>
*
* @type {Array<ConstructName>}
*/
var constructsWithoutStrikethrough = [
	"autolink",
	"destinationLiteral",
	"destinationRaw",
	"reference",
	"titleQuote",
	"titleApostrophe"
];
handleDelete.peek = peekDelete;
/**
* Create an extension for `mdast-util-from-markdown` to enable GFM
* strikethrough in markdown.
*
* @returns {FromMarkdownExtension}
*   Extension for `mdast-util-from-markdown` to enable GFM strikethrough.
*/
function gfmStrikethroughFromMarkdown() {
	return {
		canContainEols: ["delete"],
		enter: { strikethrough: enterStrikethrough },
		exit: { strikethrough: exitStrikethrough }
	};
}
/**
* Create an extension for `mdast-util-to-markdown` to enable GFM
* strikethrough in markdown.
*
* @returns {ToMarkdownExtension}
*   Extension for `mdast-util-to-markdown` to enable GFM strikethrough.
*/
function gfmStrikethroughToMarkdown() {
	return {
		unsafe: [{
			character: "~",
			inConstruct: "phrasing",
			notInConstruct: constructsWithoutStrikethrough
		}],
		handlers: { delete: handleDelete }
	};
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function enterStrikethrough(token) {
	this.enter({
		type: "delete",
		children: []
	}, token);
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function exitStrikethrough(token) {
	this.exit(token);
}
/**
* @type {ToMarkdownHandle}
* @param {Delete} node
*/
function handleDelete(node, _, state, info) {
	const tracker = state.createTracker(info);
	const exit = state.enter("strikethrough");
	let value = tracker.move("~~");
	value += state.containerPhrasing(node, {
		...tracker.current(),
		before: value,
		after: "~"
	});
	value += tracker.move("~~");
	exit();
	return value;
}
/** @type {ToMarkdownHandle} */
function peekDelete() {
	return "~";
}
//#endregion
//#region ../../node_modules/markdown-table/index.js
/**
* @typedef {Options} MarkdownTableOptions
*   Configuration.
*/
/**
* @typedef Options
*   Configuration.
* @property {boolean | null | undefined} [alignDelimiters=true]
*   Whether to align the delimiters (default: `true`);
*   they are aligned by default:
*
*   ```markdown
*   | Alpha | B     |
*   | ----- | ----- |
*   | C     | Delta |
*   ```
*
*   Pass `false` to make them staggered:
*
*   ```markdown
*   | Alpha | B |
*   | - | - |
*   | C | Delta |
*   ```
* @property {ReadonlyArray<string | null | undefined> | string | null | undefined} [align]
*   How to align columns (default: `''`);
*   one style for all columns or styles for their respective columns;
*   each style is either `'l'` (left), `'r'` (right), or `'c'` (center);
*   other values are treated as `''`, which doesn’t place the colon in the
*   alignment row but does align left;
*   *only the lowercased first character is used, so `Right` is fine.*
* @property {boolean | null | undefined} [delimiterEnd=true]
*   Whether to end each row with the delimiter (default: `true`).
*
*   > 👉 **Note**: please don’t use this: it could create fragile structures
*   > that aren’t understandable to some markdown parsers.
*
*   When `true`, there are ending delimiters:
*
*   ```markdown
*   | Alpha | B     |
*   | ----- | ----- |
*   | C     | Delta |
*   ```
*
*   When `false`, there are no ending delimiters:
*
*   ```markdown
*   | Alpha | B
*   | ----- | -----
*   | C     | Delta
*   ```
* @property {boolean | null | undefined} [delimiterStart=true]
*   Whether to begin each row with the delimiter (default: `true`).
*
*   > 👉 **Note**: please don’t use this: it could create fragile structures
*   > that aren’t understandable to some markdown parsers.
*
*   When `true`, there are starting delimiters:
*
*   ```markdown
*   | Alpha | B     |
*   | ----- | ----- |
*   | C     | Delta |
*   ```
*
*   When `false`, there are no starting delimiters:
*
*   ```markdown
*   Alpha | B     |
*   ----- | ----- |
*   C     | Delta |
*   ```
* @property {boolean | null | undefined} [padding=true]
*   Whether to add a space of padding between delimiters and cells
*   (default: `true`).
*
*   When `true`, there is padding:
*
*   ```markdown
*   | Alpha | B     |
*   | ----- | ----- |
*   | C     | Delta |
*   ```
*
*   When `false`, there is no padding:
*
*   ```markdown
*   |Alpha|B    |
*   |-----|-----|
*   |C    |Delta|
*   ```
* @property {((value: string) => number) | null | undefined} [stringLength]
*   Function to detect the length of table cell content (optional);
*   this is used when aligning the delimiters (`|`) between table cells;
*   full-width characters and emoji mess up delimiter alignment when viewing
*   the markdown source;
*   to fix this, you can pass this function,
*   which receives the cell content and returns its “visible” size;
*   note that what is and isn’t visible depends on where the text is displayed.
*
*   Without such a function, the following:
*
*   ```js
*   markdownTable([
*     ['Alpha', 'Bravo'],
*     ['中文', 'Charlie'],
*     ['👩‍❤️‍👩', 'Delta']
*   ])
*   ```
*
*   Yields:
*
*   ```markdown
*   | Alpha | Bravo |
*   | - | - |
*   | 中文 | Charlie |
*   | 👩‍❤️‍👩 | Delta |
*   ```
*
*   With [`string-width`](https://github.com/sindresorhus/string-width):
*
*   ```js
*   import stringWidth from 'string-width'
*
*   markdownTable(
*     [
*       ['Alpha', 'Bravo'],
*       ['中文', 'Charlie'],
*       ['👩‍❤️‍👩', 'Delta']
*     ],
*     {stringLength: stringWidth}
*   )
*   ```
*
*   Yields:
*
*   ```markdown
*   | Alpha | Bravo   |
*   | ----- | ------- |
*   | 中文  | Charlie |
*   | 👩‍❤️‍👩    | Delta   |
*   ```
*/
/**
* @param {string} value
*   Cell value.
* @returns {number}
*   Cell size.
*/
function defaultStringLength(value) {
	return value.length;
}
/**
* Generate a markdown
* ([GFM](https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables))
* table.
*
* @param {ReadonlyArray<ReadonlyArray<string | null | undefined>>} table
*   Table data (matrix of strings).
* @param {Readonly<Options> | null | undefined} [options]
*   Configuration (optional).
* @returns {string}
*   Result.
*/
function markdownTable(table, options) {
	const settings = options || {};
	const align = (settings.align || []).concat();
	const stringLength = settings.stringLength || defaultStringLength;
	/** @type {Array<number>} Character codes as symbols for alignment per column. */
	const alignments = [];
	/** @type {Array<Array<string>>} Cells per row. */
	const cellMatrix = [];
	/** @type {Array<Array<number>>} Sizes of each cell per row. */
	const sizeMatrix = [];
	/** @type {Array<number>} */
	const longestCellByColumn = [];
	let mostCellsPerRow = 0;
	let rowIndex = -1;
	while (++rowIndex < table.length) {
		/** @type {Array<string>} */
		const row = [];
		/** @type {Array<number>} */
		const sizes = [];
		let columnIndex = -1;
		if (table[rowIndex].length > mostCellsPerRow) mostCellsPerRow = table[rowIndex].length;
		while (++columnIndex < table[rowIndex].length) {
			const cell = serialize(table[rowIndex][columnIndex]);
			if (settings.alignDelimiters !== false) {
				const size = stringLength(cell);
				sizes[columnIndex] = size;
				if (longestCellByColumn[columnIndex] === void 0 || size > longestCellByColumn[columnIndex]) longestCellByColumn[columnIndex] = size;
			}
			row.push(cell);
		}
		cellMatrix[rowIndex] = row;
		sizeMatrix[rowIndex] = sizes;
	}
	let columnIndex = -1;
	if (typeof align === "object" && "length" in align) while (++columnIndex < mostCellsPerRow) alignments[columnIndex] = toAlignment(align[columnIndex]);
	else {
		const code = toAlignment(align);
		while (++columnIndex < mostCellsPerRow) alignments[columnIndex] = code;
	}
	columnIndex = -1;
	/** @type {Array<string>} */
	const row = [];
	/** @type {Array<number>} */
	const sizes = [];
	while (++columnIndex < mostCellsPerRow) {
		const code = alignments[columnIndex];
		let before = "";
		let after = "";
		if (code === 99) {
			before = ":";
			after = ":";
		} else if (code === 108) before = ":";
		else if (code === 114) after = ":";
		let size = settings.alignDelimiters === false ? 1 : Math.max(1, longestCellByColumn[columnIndex] - before.length - after.length);
		const cell = before + "-".repeat(size) + after;
		if (settings.alignDelimiters !== false) {
			size = before.length + size + after.length;
			if (size > longestCellByColumn[columnIndex]) longestCellByColumn[columnIndex] = size;
			sizes[columnIndex] = size;
		}
		row[columnIndex] = cell;
	}
	cellMatrix.splice(1, 0, row);
	sizeMatrix.splice(1, 0, sizes);
	rowIndex = -1;
	/** @type {Array<string>} */
	const lines = [];
	while (++rowIndex < cellMatrix.length) {
		const row = cellMatrix[rowIndex];
		const sizes = sizeMatrix[rowIndex];
		columnIndex = -1;
		/** @type {Array<string>} */
		const line = [];
		while (++columnIndex < mostCellsPerRow) {
			const cell = row[columnIndex] || "";
			let before = "";
			let after = "";
			if (settings.alignDelimiters !== false) {
				const size = longestCellByColumn[columnIndex] - (sizes[columnIndex] || 0);
				const code = alignments[columnIndex];
				if (code === 114) before = " ".repeat(size);
				else if (code === 99) if (size % 2) {
					before = " ".repeat(size / 2 + .5);
					after = " ".repeat(size / 2 - .5);
				} else {
					before = " ".repeat(size / 2);
					after = before;
				}
				else after = " ".repeat(size);
			}
			if (settings.delimiterStart !== false && !columnIndex) line.push("|");
			if (settings.padding !== false && !(settings.alignDelimiters === false && cell === "") && (settings.delimiterStart !== false || columnIndex)) line.push(" ");
			if (settings.alignDelimiters !== false) line.push(before);
			line.push(cell);
			if (settings.alignDelimiters !== false) line.push(after);
			if (settings.padding !== false) line.push(" ");
			if (settings.delimiterEnd !== false || columnIndex !== mostCellsPerRow - 1) line.push("|");
		}
		lines.push(settings.delimiterEnd === false ? line.join("").replace(/ +$/, "") : line.join(""));
	}
	return lines.join("\n");
}
/**
* @param {string | null | undefined} [value]
*   Value to serialize.
* @returns {string}
*   Result.
*/
function serialize(value) {
	return value === null || value === void 0 ? "" : String(value);
}
/**
* @param {string | null | undefined} value
*   Value.
* @returns {number}
*   Alignment.
*/
function toAlignment(value) {
	const code = typeof value === "string" ? value.codePointAt(0) : 0;
	return code === 67 || code === 99 ? 99 : code === 76 || code === 108 ? 108 : code === 82 || code === 114 ? 114 : 0;
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/handle/blockquote.js
/**
* @import {Blockquote, Parents} from 'mdast'
* @import {Info, Map, State} from 'mdast-util-to-markdown'
*/
/**
* @param {Blockquote} node
* @param {Parents | undefined} _
* @param {State} state
* @param {Info} info
* @returns {string}
*/
function blockquote(node, _, state, info) {
	const exit = state.enter("blockquote");
	const tracker = state.createTracker(info);
	tracker.move("> ");
	tracker.shift(2);
	const value = state.indentLines(state.containerFlow(node, tracker.current()), map$2);
	exit();
	return value;
}
/** @type {Map} */
function map$2(line, _, blank) {
	return ">" + (blank ? "" : " ") + line;
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js
/**
* @import {ConstructName, Unsafe} from 'mdast-util-to-markdown'
*/
/**
* @param {Array<ConstructName>} stack
* @param {Unsafe} pattern
* @returns {boolean}
*/
function patternInScope(stack, pattern) {
	return listInScope(stack, pattern.inConstruct, true) && !listInScope(stack, pattern.notInConstruct, false);
}
/**
* @param {Array<ConstructName>} stack
* @param {Unsafe['inConstruct']} list
* @param {boolean} none
* @returns {boolean}
*/
function listInScope(stack, list, none) {
	if (typeof list === "string") list = [list];
	if (!list || list.length === 0) return none;
	let index = -1;
	while (++index < list.length) if (stack.includes(list[index])) return true;
	return false;
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/handle/break.js
/**
* @import {Break, Parents} from 'mdast'
* @import {Info, State} from 'mdast-util-to-markdown'
*/
/**
* @param {Break} _
* @param {Parents | undefined} _1
* @param {State} state
* @param {Info} info
* @returns {string}
*/
function hardBreak(_, _1, state, info) {
	let index = -1;
	while (++index < state.unsafe.length) if (state.unsafe[index].character === "\n" && patternInScope(state.stack, state.unsafe[index])) return /[ \t]/.test(info.before) ? "" : " ";
	return "\\\n";
}
//#endregion
//#region ../../node_modules/longest-streak/index.js
/**
* Get the count of the longest repeating streak of `substring` in `value`.
*
* @param {string} value
*   Content to search in.
* @param {string} substring
*   Substring to look for, typically one character.
* @returns {number}
*   Count of most frequent adjacent `substring`s in `value`.
*/
function longestStreak(value, substring) {
	const source = String(value);
	let index = source.indexOf(substring);
	let expected = index;
	let count = 0;
	let max = 0;
	if (typeof substring !== "string") throw new TypeError("Expected substring");
	while (index !== -1) {
		if (index === expected) {
			if (++count > max) max = count;
		} else count = 1;
		expected = index + substring.length;
		index = source.indexOf(substring, expected);
	}
	return max;
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js
/**
* @import {State} from 'mdast-util-to-markdown'
* @import {Code} from 'mdast'
*/
/**
* @param {Code} node
* @param {State} state
* @returns {boolean}
*/
function formatCodeAsIndented(node, state) {
	return Boolean(state.options.fences === false && node.value && !node.lang && /[^ \r\n]/.test(node.value) && !/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(node.value));
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/util/check-fence.js
/**
* @import {Options, State} from 'mdast-util-to-markdown'
*/
/**
* @param {State} state
* @returns {Exclude<Options['fence'], null | undefined>}
*/
function checkFence(state) {
	const marker = state.options.fence || "`";
	if (marker !== "`" && marker !== "~") throw new Error("Cannot serialize code with `" + marker + "` for `options.fence`, expected `` ` `` or `~`");
	return marker;
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/handle/code.js
/**
* @import {Info, Map, State} from 'mdast-util-to-markdown'
* @import {Code, Parents} from 'mdast'
*/
/**
* @param {Code} node
* @param {Parents | undefined} _
* @param {State} state
* @param {Info} info
* @returns {string}
*/
function code$1(node, _, state, info) {
	const marker = checkFence(state);
	const raw = node.value || "";
	const suffix = marker === "`" ? "GraveAccent" : "Tilde";
	if (formatCodeAsIndented(node, state)) {
		const exit = state.enter("codeIndented");
		const value = state.indentLines(raw, map$1);
		exit();
		return value;
	}
	const tracker = state.createTracker(info);
	const sequence = marker.repeat(Math.max(longestStreak(raw, marker) + 1, 3));
	const exit = state.enter("codeFenced");
	let value = tracker.move(sequence);
	if (node.lang) {
		const subexit = state.enter(`codeFencedLang${suffix}`);
		value += tracker.move(state.safe(node.lang, {
			before: value,
			after: " ",
			encode: ["`"],
			...tracker.current()
		}));
		subexit();
	}
	if (node.lang && node.meta) {
		const subexit = state.enter(`codeFencedMeta${suffix}`);
		value += tracker.move(" ");
		value += tracker.move(state.safe(node.meta, {
			before: value,
			after: "\n",
			encode: ["`"],
			...tracker.current()
		}));
		subexit();
	}
	value += tracker.move("\n");
	if (raw) value += tracker.move(raw + "\n");
	value += tracker.move(sequence);
	exit();
	return value;
}
/** @type {Map} */
function map$1(line, _, blank) {
	return (blank ? "" : "    ") + line;
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/util/check-quote.js
/**
* @import {Options, State} from 'mdast-util-to-markdown'
*/
/**
* @param {State} state
* @returns {Exclude<Options['quote'], null | undefined>}
*/
function checkQuote(state) {
	const marker = state.options.quote || "\"";
	if (marker !== "\"" && marker !== "'") throw new Error("Cannot serialize title with `" + marker + "` for `options.quote`, expected `\"`, or `'`");
	return marker;
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/handle/definition.js
/**
* @import {Info, State} from 'mdast-util-to-markdown'
* @import {Definition, Parents} from 'mdast'
*/
/**
* @param {Definition} node
* @param {Parents | undefined} _
* @param {State} state
* @param {Info} info
* @returns {string}
*/
function definition(node, _, state, info) {
	const quote = checkQuote(state);
	const suffix = quote === "\"" ? "Quote" : "Apostrophe";
	const exit = state.enter("definition");
	let subexit = state.enter("label");
	const tracker = state.createTracker(info);
	let value = tracker.move("[");
	value += tracker.move(state.safe(state.associationId(node), {
		before: value,
		after: "]",
		...tracker.current()
	}));
	value += tracker.move("]: ");
	subexit();
	if (!node.url || /[\0- \u007F]/.test(node.url)) {
		subexit = state.enter("destinationLiteral");
		value += tracker.move("<");
		value += tracker.move(state.safe(node.url, {
			before: value,
			after: ">",
			...tracker.current()
		}));
		value += tracker.move(">");
	} else {
		subexit = state.enter("destinationRaw");
		value += tracker.move(state.safe(node.url, {
			before: value,
			after: node.title ? " " : "\n",
			...tracker.current()
		}));
	}
	subexit();
	if (node.title) {
		subexit = state.enter(`title${suffix}`);
		value += tracker.move(" " + quote);
		value += tracker.move(state.safe(node.title, {
			before: value,
			after: quote,
			...tracker.current()
		}));
		value += tracker.move(quote);
		subexit();
	}
	exit();
	return value;
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js
/**
* @import {Options, State} from 'mdast-util-to-markdown'
*/
/**
* @param {State} state
* @returns {Exclude<Options['emphasis'], null | undefined>}
*/
function checkEmphasis(state) {
	const marker = state.options.emphasis || "*";
	if (marker !== "*" && marker !== "_") throw new Error("Cannot serialize emphasis with `" + marker + "` for `options.emphasis`, expected `*`, or `_`");
	return marker;
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js
/**
* Encode a code point as a character reference.
*
* @param {number} code
*   Code point to encode.
* @returns {string}
*   Encoded character reference.
*/
function encodeCharacterReference(code) {
	return "&#x" + code.toString(16).toUpperCase() + ";";
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/util/encode-info.js
/**
* @import {EncodeSides} from '../types.js'
*/
/**
* Check whether to encode (as a character reference) the characters
* surrounding an attention run.
*
* Which characters are around an attention run influence whether it works or
* not.
*
* See <https://github.com/orgs/syntax-tree/discussions/60> for more info.
* See this markdown in a particular renderer to see what works:
*
* ```markdown
* |                         | A (letter inside) | B (punctuation inside) | C (whitespace inside) | D (nothing inside) |
* | ----------------------- | ----------------- | ---------------------- | --------------------- | ------------------ |
* | 1 (letter outside)      | x*y*z             | x*.*z                  | x* *z                 | x**z               |
* | 2 (punctuation outside) | .*y*.             | .*.*.                  | .* *.                 | .**.               |
* | 3 (whitespace outside)  | x *y* z           | x *.* z                | x * * z               | x ** z             |
* | 4 (nothing outside)     | *x*               | *.*                    | * *                   | **                 |
* ```
*
* @param {number} outside
*   Code point on the outer side of the run.
* @param {number} inside
*   Code point on the inner side of the run.
* @param {'*' | '_'} marker
*   Marker of the run.
*   Underscores are handled more strictly (they form less often) than
*   asterisks.
* @returns {EncodeSides}
*   Whether to encode characters.
*/
function encodeInfo(outside, inside, marker) {
	const outsideKind = classifyCharacter(outside);
	const insideKind = classifyCharacter(inside);
	if (outsideKind === void 0) return insideKind === void 0 ? marker === "_" ? {
		inside: true,
		outside: true
	} : {
		inside: false,
		outside: false
	} : insideKind === 1 ? {
		inside: true,
		outside: true
	} : {
		inside: false,
		outside: true
	};
	if (outsideKind === 1) return insideKind === void 0 ? {
		inside: false,
		outside: false
	} : insideKind === 1 ? {
		inside: true,
		outside: true
	} : {
		inside: false,
		outside: false
	};
	return insideKind === void 0 ? {
		inside: false,
		outside: false
	} : insideKind === 1 ? {
		inside: true,
		outside: false
	} : {
		inside: false,
		outside: false
	};
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/handle/emphasis.js
/**
* @import {Info, State} from 'mdast-util-to-markdown'
* @import {Emphasis, Parents} from 'mdast'
*/
emphasis.peek = emphasisPeek;
/**
* @param {Emphasis} node
* @param {Parents | undefined} _
* @param {State} state
* @param {Info} info
* @returns {string}
*/
function emphasis(node, _, state, info) {
	const marker = checkEmphasis(state);
	const exit = state.enter("emphasis");
	const tracker = state.createTracker(info);
	const before = tracker.move(marker);
	let between = tracker.move(state.containerPhrasing(node, {
		after: marker,
		before,
		...tracker.current()
	}));
	const betweenHead = between.charCodeAt(0);
	const open = encodeInfo(info.before.charCodeAt(info.before.length - 1), betweenHead, marker);
	if (open.inside) between = encodeCharacterReference(betweenHead) + between.slice(1);
	const betweenTail = between.charCodeAt(between.length - 1);
	const close = encodeInfo(info.after.charCodeAt(0), betweenTail, marker);
	if (close.inside) between = between.slice(0, -1) + encodeCharacterReference(betweenTail);
	const after = tracker.move(marker);
	exit();
	state.attentionEncodeSurroundingInfo = {
		after: close.outside,
		before: open.outside
	};
	return before + between + after;
}
/**
* @param {Emphasis} _
* @param {Parents | undefined} _1
* @param {State} state
* @returns {string}
*/
function emphasisPeek(_, _1, state) {
	return state.options.emphasis || "*";
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js
/**
* @import {State} from 'mdast-util-to-markdown'
* @import {Heading} from 'mdast'
*/
/**
* @param {Heading} node
* @param {State} state
* @returns {boolean}
*/
function formatHeadingAsSetext(node, state) {
	let literalWithBreak = false;
	visit(node, function(node) {
		if ("value" in node && /\r?\n|\r/.test(node.value) || node.type === "break") {
			literalWithBreak = true;
			return false;
		}
	});
	return Boolean((!node.depth || node.depth < 3) && toString$2(node) && (state.options.setext || literalWithBreak));
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/handle/heading.js
/**
* @import {Info, State} from 'mdast-util-to-markdown'
* @import {Heading, Parents} from 'mdast'
*/
/**
* @param {Heading} node
* @param {Parents | undefined} _
* @param {State} state
* @param {Info} info
* @returns {string}
*/
function heading(node, _, state, info) {
	const rank = Math.max(Math.min(6, node.depth || 1), 1);
	const tracker = state.createTracker(info);
	if (formatHeadingAsSetext(node, state)) {
		const exit = state.enter("headingSetext");
		const subexit = state.enter("phrasing");
		const value = state.containerPhrasing(node, {
			...tracker.current(),
			before: "\n",
			after: "\n"
		});
		subexit();
		exit();
		return value + "\n" + (rank === 1 ? "=" : "-").repeat(value.length - (Math.max(value.lastIndexOf("\r"), value.lastIndexOf("\n")) + 1));
	}
	const sequence = "#".repeat(rank);
	const exit = state.enter("headingAtx");
	const subexit = state.enter("phrasing");
	tracker.move(sequence + " ");
	let value = state.containerPhrasing(node, {
		before: "# ",
		after: "\n",
		...tracker.current()
	});
	if (/^[\t ]/.test(value)) value = encodeCharacterReference(value.charCodeAt(0)) + value.slice(1);
	value = value ? sequence + " " + value : sequence;
	if (state.options.closeAtx) value += " " + sequence;
	subexit();
	exit();
	return value;
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/handle/html.js
/**
* @import {Html} from 'mdast'
*/
html.peek = htmlPeek;
/**
* @param {Html} node
* @returns {string}
*/
function html(node) {
	return node.value || "";
}
/**
* @returns {string}
*/
function htmlPeek() {
	return "<";
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/handle/image.js
/**
* @import {Info, State} from 'mdast-util-to-markdown'
* @import {Image, Parents} from 'mdast'
*/
image.peek = imagePeek;
/**
* @param {Image} node
* @param {Parents | undefined} _
* @param {State} state
* @param {Info} info
* @returns {string}
*/
function image(node, _, state, info) {
	const quote = checkQuote(state);
	const suffix = quote === "\"" ? "Quote" : "Apostrophe";
	const exit = state.enter("image");
	let subexit = state.enter("label");
	const tracker = state.createTracker(info);
	let value = tracker.move("![");
	value += tracker.move(state.safe(node.alt, {
		before: value,
		after: "]",
		...tracker.current()
	}));
	value += tracker.move("](");
	subexit();
	if (!node.url && node.title || /[\0- \u007F]/.test(node.url)) {
		subexit = state.enter("destinationLiteral");
		value += tracker.move("<");
		value += tracker.move(state.safe(node.url, {
			before: value,
			after: ">",
			...tracker.current()
		}));
		value += tracker.move(">");
	} else {
		subexit = state.enter("destinationRaw");
		value += tracker.move(state.safe(node.url, {
			before: value,
			after: node.title ? " " : ")",
			...tracker.current()
		}));
	}
	subexit();
	if (node.title) {
		subexit = state.enter(`title${suffix}`);
		value += tracker.move(" " + quote);
		value += tracker.move(state.safe(node.title, {
			before: value,
			after: quote,
			...tracker.current()
		}));
		value += tracker.move(quote);
		subexit();
	}
	value += tracker.move(")");
	exit();
	return value;
}
/**
* @returns {string}
*/
function imagePeek() {
	return "!";
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/handle/image-reference.js
/**
* @import {Info, State} from 'mdast-util-to-markdown'
* @import {ImageReference, Parents} from 'mdast'
*/
imageReference.peek = imageReferencePeek;
/**
* @param {ImageReference} node
* @param {Parents | undefined} _
* @param {State} state
* @param {Info} info
* @returns {string}
*/
function imageReference(node, _, state, info) {
	const type = node.referenceType;
	const exit = state.enter("imageReference");
	let subexit = state.enter("label");
	const tracker = state.createTracker(info);
	let value = tracker.move("![");
	const alt = state.safe(node.alt, {
		before: value,
		after: "]",
		...tracker.current()
	});
	value += tracker.move(alt + "][");
	subexit();
	const stack = state.stack;
	state.stack = [];
	subexit = state.enter("reference");
	const reference = state.safe(state.associationId(node), {
		before: value,
		after: "]",
		...tracker.current()
	});
	subexit();
	state.stack = stack;
	exit();
	if (type === "full" || !alt || alt !== reference) value += tracker.move(reference + "]");
	else if (type === "shortcut") value = value.slice(0, -1);
	else value += tracker.move("]");
	return value;
}
/**
* @returns {string}
*/
function imageReferencePeek() {
	return "!";
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/handle/inline-code.js
/**
* @import {State} from 'mdast-util-to-markdown'
* @import {InlineCode, Parents} from 'mdast'
*/
inlineCode.peek = inlineCodePeek;
/**
* @param {InlineCode} node
* @param {Parents | undefined} _
* @param {State} state
* @returns {string}
*/
function inlineCode(node, _, state) {
	let value = node.value || "";
	let sequence = "`";
	let index = -1;
	while (new RegExp("(^|[^`])" + sequence + "([^`]|$)").test(value)) sequence += "`";
	if (/[^ \r\n]/.test(value) && (/^[ \r\n]/.test(value) && /[ \r\n]$/.test(value) || /^`|`$/.test(value))) value = " " + value + " ";
	while (++index < state.unsafe.length) {
		const pattern = state.unsafe[index];
		const expression = state.compilePattern(pattern);
		/** @type {RegExpExecArray | null} */
		let match;
		if (!pattern.atBreak) continue;
		while (match = expression.exec(value)) {
			let position = match.index;
			if (value.charCodeAt(position) === 10 && value.charCodeAt(position - 1) === 13) position--;
			value = value.slice(0, position) + " " + value.slice(match.index + 1);
		}
	}
	return sequence + value + sequence;
}
/**
* @returns {string}
*/
function inlineCodePeek() {
	return "`";
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js
/**
* @import {State} from 'mdast-util-to-markdown'
* @import {Link} from 'mdast'
*/
/**
* @param {Link} node
* @param {State} state
* @returns {boolean}
*/
function formatLinkAsAutolink(node, state) {
	const raw = toString$2(node);
	return Boolean(!state.options.resourceLink && node.url && !node.title && node.children && node.children.length === 1 && node.children[0].type === "text" && (raw === node.url || "mailto:" + raw === node.url) && /^[a-z][a-z+.-]+:/i.test(node.url) && !/[\0- <>\u007F]/.test(node.url));
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/handle/link.js
/**
* @import {Info, State} from 'mdast-util-to-markdown'
* @import {Link, Parents} from 'mdast'
* @import {Exit} from '../types.js'
*/
link.peek = linkPeek;
/**
* @param {Link} node
* @param {Parents | undefined} _
* @param {State} state
* @param {Info} info
* @returns {string}
*/
function link(node, _, state, info) {
	const quote = checkQuote(state);
	const suffix = quote === "\"" ? "Quote" : "Apostrophe";
	const tracker = state.createTracker(info);
	/** @type {Exit} */
	let exit;
	/** @type {Exit} */
	let subexit;
	if (formatLinkAsAutolink(node, state)) {
		const stack = state.stack;
		state.stack = [];
		exit = state.enter("autolink");
		let value = tracker.move("<");
		value += tracker.move(state.containerPhrasing(node, {
			before: value,
			after: ">",
			...tracker.current()
		}));
		value += tracker.move(">");
		exit();
		state.stack = stack;
		return value;
	}
	exit = state.enter("link");
	subexit = state.enter("label");
	let value = tracker.move("[");
	value += tracker.move(state.containerPhrasing(node, {
		before: value,
		after: "](",
		...tracker.current()
	}));
	value += tracker.move("](");
	subexit();
	if (!node.url && node.title || /[\0- \u007F]/.test(node.url)) {
		subexit = state.enter("destinationLiteral");
		value += tracker.move("<");
		value += tracker.move(state.safe(node.url, {
			before: value,
			after: ">",
			...tracker.current()
		}));
		value += tracker.move(">");
	} else {
		subexit = state.enter("destinationRaw");
		value += tracker.move(state.safe(node.url, {
			before: value,
			after: node.title ? " " : ")",
			...tracker.current()
		}));
	}
	subexit();
	if (node.title) {
		subexit = state.enter(`title${suffix}`);
		value += tracker.move(" " + quote);
		value += tracker.move(state.safe(node.title, {
			before: value,
			after: quote,
			...tracker.current()
		}));
		value += tracker.move(quote);
		subexit();
	}
	value += tracker.move(")");
	exit();
	return value;
}
/**
* @param {Link} node
* @param {Parents | undefined} _
* @param {State} state
* @returns {string}
*/
function linkPeek(node, _, state) {
	return formatLinkAsAutolink(node, state) ? "<" : "[";
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/handle/link-reference.js
/**
* @import {Info, State} from 'mdast-util-to-markdown'
* @import {LinkReference, Parents} from 'mdast'
*/
linkReference.peek = linkReferencePeek;
/**
* @param {LinkReference} node
* @param {Parents | undefined} _
* @param {State} state
* @param {Info} info
* @returns {string}
*/
function linkReference(node, _, state, info) {
	const type = node.referenceType;
	const exit = state.enter("linkReference");
	let subexit = state.enter("label");
	const tracker = state.createTracker(info);
	let value = tracker.move("[");
	const text = state.containerPhrasing(node, {
		before: value,
		after: "]",
		...tracker.current()
	});
	value += tracker.move(text + "][");
	subexit();
	const stack = state.stack;
	state.stack = [];
	subexit = state.enter("reference");
	const reference = state.safe(state.associationId(node), {
		before: value,
		after: "]",
		...tracker.current()
	});
	subexit();
	state.stack = stack;
	exit();
	if (type === "full" || !text || text !== reference) value += tracker.move(reference + "]");
	else if (type === "shortcut") value = value.slice(0, -1);
	else value += tracker.move("]");
	return value;
}
/**
* @returns {string}
*/
function linkReferencePeek() {
	return "[";
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/util/check-bullet.js
/**
* @import {Options, State} from 'mdast-util-to-markdown'
*/
/**
* @param {State} state
* @returns {Exclude<Options['bullet'], null | undefined>}
*/
function checkBullet(state) {
	const marker = state.options.bullet || "*";
	if (marker !== "*" && marker !== "+" && marker !== "-") throw new Error("Cannot serialize items with `" + marker + "` for `options.bullet`, expected `*`, `+`, or `-`");
	return marker;
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js
/**
* @import {Options, State} from 'mdast-util-to-markdown'
*/
/**
* @param {State} state
* @returns {Exclude<Options['bullet'], null | undefined>}
*/
function checkBulletOther(state) {
	const bullet = checkBullet(state);
	const bulletOther = state.options.bulletOther;
	if (!bulletOther) return bullet === "*" ? "-" : "*";
	if (bulletOther !== "*" && bulletOther !== "+" && bulletOther !== "-") throw new Error("Cannot serialize items with `" + bulletOther + "` for `options.bulletOther`, expected `*`, `+`, or `-`");
	if (bulletOther === bullet) throw new Error("Expected `bullet` (`" + bullet + "`) and `bulletOther` (`" + bulletOther + "`) to be different");
	return bulletOther;
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js
/**
* @import {Options, State} from 'mdast-util-to-markdown'
*/
/**
* @param {State} state
* @returns {Exclude<Options['bulletOrdered'], null | undefined>}
*/
function checkBulletOrdered(state) {
	const marker = state.options.bulletOrdered || ".";
	if (marker !== "." && marker !== ")") throw new Error("Cannot serialize items with `" + marker + "` for `options.bulletOrdered`, expected `.` or `)`");
	return marker;
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/util/check-rule.js
/**
* @import {Options, State} from 'mdast-util-to-markdown'
*/
/**
* @param {State} state
* @returns {Exclude<Options['rule'], null | undefined>}
*/
function checkRule(state) {
	const marker = state.options.rule || "*";
	if (marker !== "*" && marker !== "-" && marker !== "_") throw new Error("Cannot serialize rules with `" + marker + "` for `options.rule`, expected `*`, `-`, or `_`");
	return marker;
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/handle/list.js
/**
* @import {Info, State} from 'mdast-util-to-markdown'
* @import {List, Parents} from 'mdast'
*/
/**
* @param {List} node
* @param {Parents | undefined} parent
* @param {State} state
* @param {Info} info
* @returns {string}
*/
function list(node, parent, state, info) {
	const exit = state.enter("list");
	const bulletCurrent = state.bulletCurrent;
	/** @type {string} */
	let bullet = node.ordered ? checkBulletOrdered(state) : checkBullet(state);
	/** @type {string} */
	const bulletOther = node.ordered ? bullet === "." ? ")" : "." : checkBulletOther(state);
	let useDifferentMarker = parent && state.bulletLastUsed ? bullet === state.bulletLastUsed : false;
	if (!node.ordered) {
		const firstListItem = node.children ? node.children[0] : void 0;
		if ((bullet === "*" || bullet === "-") && firstListItem && (!firstListItem.children || !firstListItem.children[0]) && state.stack[state.stack.length - 1] === "list" && state.stack[state.stack.length - 2] === "listItem" && state.stack[state.stack.length - 3] === "list" && state.stack[state.stack.length - 4] === "listItem" && state.indexStack[state.indexStack.length - 1] === 0 && state.indexStack[state.indexStack.length - 2] === 0 && state.indexStack[state.indexStack.length - 3] === 0) useDifferentMarker = true;
		if (checkRule(state) === bullet && firstListItem) {
			let index = -1;
			while (++index < node.children.length) {
				const item = node.children[index];
				if (item && item.type === "listItem" && item.children && item.children[0] && item.children[0].type === "thematicBreak") {
					useDifferentMarker = true;
					break;
				}
			}
		}
	}
	if (useDifferentMarker) bullet = bulletOther;
	state.bulletCurrent = bullet;
	const value = state.containerFlow(node, info);
	state.bulletLastUsed = bullet;
	state.bulletCurrent = bulletCurrent;
	exit();
	return value;
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js
/**
* @import {Options, State} from 'mdast-util-to-markdown'
*/
/**
* @param {State} state
* @returns {Exclude<Options['listItemIndent'], null | undefined>}
*/
function checkListItemIndent(state) {
	const style = state.options.listItemIndent || "one";
	if (style !== "tab" && style !== "one" && style !== "mixed") throw new Error("Cannot serialize items with `" + style + "` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");
	return style;
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/handle/list-item.js
/**
* @import {Info, Map, State} from 'mdast-util-to-markdown'
* @import {ListItem, Parents} from 'mdast'
*/
/**
* @param {ListItem} node
* @param {Parents | undefined} parent
* @param {State} state
* @param {Info} info
* @returns {string}
*/
function listItem(node, parent, state, info) {
	const listItemIndent = checkListItemIndent(state);
	let bullet = state.bulletCurrent || checkBullet(state);
	if (parent && parent.type === "list" && parent.ordered) bullet = (typeof parent.start === "number" && parent.start > -1 ? parent.start : 1) + (state.options.incrementListMarker === false ? 0 : parent.children.indexOf(node)) + bullet;
	let size = bullet.length + 1;
	if (listItemIndent === "tab" || listItemIndent === "mixed" && (parent && parent.type === "list" && parent.spread || node.spread)) size = Math.ceil(size / 4) * 4;
	const tracker = state.createTracker(info);
	tracker.move(bullet + " ".repeat(size - bullet.length));
	tracker.shift(size);
	const exit = state.enter("listItem");
	const value = state.indentLines(state.containerFlow(node, tracker.current()), map);
	exit();
	return value;
	/** @type {Map} */
	function map(line, index, blank) {
		if (index) return (blank ? "" : " ".repeat(size)) + line;
		return (blank ? bullet : bullet + " ".repeat(size - bullet.length)) + line;
	}
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/handle/paragraph.js
/**
* @import {Info, State} from 'mdast-util-to-markdown'
* @import {Paragraph, Parents} from 'mdast'
*/
/**
* @param {Paragraph} node
* @param {Parents | undefined} _
* @param {State} state
* @param {Info} info
* @returns {string}
*/
function paragraph(node, _, state, info) {
	const exit = state.enter("paragraph");
	const subexit = state.enter("phrasing");
	const value = state.containerPhrasing(node, info);
	subexit();
	exit();
	return value;
}
//#endregion
//#region ../../node_modules/mdast-util-phrasing/lib/index.js
/**
* @typedef {import('mdast').Html} Html
* @typedef {import('mdast').PhrasingContent} PhrasingContent
*/
/**
* Check if the given value is *phrasing content*.
*
* > 👉 **Note**: Excludes `html`, which can be both phrasing or flow.
*
* @param node
*   Thing to check, typically `Node`.
* @returns
*   Whether `value` is phrasing content.
*/
var phrasing = convert([
	"break",
	"delete",
	"emphasis",
	"footnote",
	"footnoteReference",
	"image",
	"imageReference",
	"inlineCode",
	"inlineMath",
	"link",
	"linkReference",
	"mdxJsxTextElement",
	"mdxTextExpression",
	"strong",
	"text",
	"textDirective"
]);
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/handle/root.js
/**
* @import {Info, State} from 'mdast-util-to-markdown'
* @import {Parents, Root} from 'mdast'
*/
/**
* @param {Root} node
* @param {Parents | undefined} _
* @param {State} state
* @param {Info} info
* @returns {string}
*/
function root(node, _, state, info) {
	return (node.children.some(function(d) {
		return phrasing(d);
	}) ? state.containerPhrasing : state.containerFlow).call(state, node, info);
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/util/check-strong.js
/**
* @import {Options, State} from 'mdast-util-to-markdown'
*/
/**
* @param {State} state
* @returns {Exclude<Options['strong'], null | undefined>}
*/
function checkStrong(state) {
	const marker = state.options.strong || "*";
	if (marker !== "*" && marker !== "_") throw new Error("Cannot serialize strong with `" + marker + "` for `options.strong`, expected `*`, or `_`");
	return marker;
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/handle/strong.js
/**
* @import {Info, State} from 'mdast-util-to-markdown'
* @import {Parents, Strong} from 'mdast'
*/
strong.peek = strongPeek;
/**
* @param {Strong} node
* @param {Parents | undefined} _
* @param {State} state
* @param {Info} info
* @returns {string}
*/
function strong(node, _, state, info) {
	const marker = checkStrong(state);
	const exit = state.enter("strong");
	const tracker = state.createTracker(info);
	const before = tracker.move(marker + marker);
	let between = tracker.move(state.containerPhrasing(node, {
		after: marker,
		before,
		...tracker.current()
	}));
	const betweenHead = between.charCodeAt(0);
	const open = encodeInfo(info.before.charCodeAt(info.before.length - 1), betweenHead, marker);
	if (open.inside) between = encodeCharacterReference(betweenHead) + between.slice(1);
	const betweenTail = between.charCodeAt(between.length - 1);
	const close = encodeInfo(info.after.charCodeAt(0), betweenTail, marker);
	if (close.inside) between = between.slice(0, -1) + encodeCharacterReference(betweenTail);
	const after = tracker.move(marker + marker);
	exit();
	state.attentionEncodeSurroundingInfo = {
		after: close.outside,
		before: open.outside
	};
	return before + between + after;
}
/**
* @param {Strong} _
* @param {Parents | undefined} _1
* @param {State} state
* @returns {string}
*/
function strongPeek(_, _1, state) {
	return state.options.strong || "*";
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/handle/text.js
/**
* @import {Info, State} from 'mdast-util-to-markdown'
* @import {Parents, Text} from 'mdast'
*/
/**
* @param {Text} node
* @param {Parents | undefined} _
* @param {State} state
* @param {Info} info
* @returns {string}
*/
function text$1(node, _, state, info) {
	return state.safe(node.value, info);
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js
/**
* @import {Options, State} from 'mdast-util-to-markdown'
*/
/**
* @param {State} state
* @returns {Exclude<Options['ruleRepetition'], null | undefined>}
*/
function checkRuleRepetition(state) {
	const repetition = state.options.ruleRepetition || 3;
	if (repetition < 3) throw new Error("Cannot serialize rules with repetition `" + repetition + "` for `options.ruleRepetition`, expected `3` or more");
	return repetition;
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js
/**
* @import {State} from 'mdast-util-to-markdown'
* @import {Parents, ThematicBreak} from 'mdast'
*/
/**
* @param {ThematicBreak} _
* @param {Parents | undefined} _1
* @param {State} state
* @returns {string}
*/
function thematicBreak(_, _1, state) {
	const value = (checkRule(state) + (state.options.ruleSpaces ? " " : "")).repeat(checkRuleRepetition(state));
	return state.options.ruleSpaces ? value.slice(0, -1) : value;
}
//#endregion
//#region ../../node_modules/mdast-util-to-markdown/lib/handle/index.js
/**
* Default (CommonMark) handlers.
*/
var handle = {
	blockquote,
	break: hardBreak,
	code: code$1,
	definition,
	emphasis,
	hardBreak,
	heading,
	html,
	image,
	imageReference,
	inlineCode,
	link,
	linkReference,
	list,
	listItem,
	paragraph,
	root,
	strong,
	text: text$1,
	thematicBreak
};
//#endregion
//#region ../../node_modules/mdast-util-gfm-table/lib/index.js
/**
* @typedef {import('mdast').InlineCode} InlineCode
* @typedef {import('mdast').Table} Table
* @typedef {import('mdast').TableCell} TableCell
* @typedef {import('mdast').TableRow} TableRow
*
* @typedef {import('markdown-table').Options} MarkdownTableOptions
*
* @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext
* @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension
* @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle
*
* @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension
* @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle
* @typedef {import('mdast-util-to-markdown').State} State
* @typedef {import('mdast-util-to-markdown').Info} Info
*/
/**
* @typedef Options
*   Configuration.
* @property {boolean | null | undefined} [tableCellPadding=true]
*   Whether to add a space of padding between delimiters and cells (default:
*   `true`).
* @property {boolean | null | undefined} [tablePipeAlign=true]
*   Whether to align the delimiters (default: `true`).
* @property {MarkdownTableOptions['stringLength'] | null | undefined} [stringLength]
*   Function to detect the length of table cell content, used when aligning
*   the delimiters between cells (optional).
*/
/**
* Create an extension for `mdast-util-from-markdown` to enable GFM tables in
* markdown.
*
* @returns {FromMarkdownExtension}
*   Extension for `mdast-util-from-markdown` to enable GFM tables.
*/
function gfmTableFromMarkdown() {
	return {
		enter: {
			table: enterTable,
			tableData: enterCell,
			tableHeader: enterCell,
			tableRow: enterRow
		},
		exit: {
			codeText: exitCodeText,
			table: exitTable,
			tableData: exit,
			tableHeader: exit,
			tableRow: exit
		}
	};
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function enterTable(token) {
	const align = token._align;
	this.enter({
		type: "table",
		align: align.map(function(d) {
			return d === "none" ? null : d;
		}),
		children: []
	}, token);
	this.data.inTable = true;
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function exitTable(token) {
	this.exit(token);
	this.data.inTable = void 0;
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function enterRow(token) {
	this.enter({
		type: "tableRow",
		children: []
	}, token);
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function exit(token) {
	this.exit(token);
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function enterCell(token) {
	this.enter({
		type: "tableCell",
		children: []
	}, token);
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function exitCodeText(token) {
	let value = this.resume();
	if (this.data.inTable) value = value.replace(/\\([\\|])/g, replace$1);
	const node = this.stack[this.stack.length - 1];
	node.type;
	node.value = value;
	this.exit(token);
}
/**
* @param {string} $0
* @param {string} $1
* @returns {string}
*/
function replace$1($0, $1) {
	return $1 === "|" ? $1 : $0;
}
/**
* Create an extension for `mdast-util-to-markdown` to enable GFM tables in
* markdown.
*
* @param {Options | null | undefined} [options]
*   Configuration.
* @returns {ToMarkdownExtension}
*   Extension for `mdast-util-to-markdown` to enable GFM tables.
*/
function gfmTableToMarkdown(options) {
	const settings = options || {};
	const padding = settings.tableCellPadding;
	const alignDelimiters = settings.tablePipeAlign;
	const stringLength = settings.stringLength;
	const around = padding ? " " : "|";
	return {
		unsafe: [
			{
				character: "\r",
				inConstruct: "tableCell"
			},
			{
				character: "\n",
				inConstruct: "tableCell"
			},
			{
				atBreak: true,
				character: "|",
				after: "[	 :-]"
			},
			{
				character: "|",
				inConstruct: "tableCell"
			},
			{
				atBreak: true,
				character: ":",
				after: "-"
			},
			{
				atBreak: true,
				character: "-",
				after: "[:|-]"
			}
		],
		handlers: {
			inlineCode: inlineCodeWithTable,
			table: handleTable,
			tableCell: handleTableCell,
			tableRow: handleTableRow
		}
	};
	/**
	* @type {ToMarkdownHandle}
	* @param {Table} node
	*/
	function handleTable(node, _, state, info) {
		return serializeData(handleTableAsData(node, state, info), node.align);
	}
	/**
	* This function isn’t really used normally, because we handle rows at the
	* table level.
	* But, if someone passes in a table row, this ensures we make somewhat sense.
	*
	* @type {ToMarkdownHandle}
	* @param {TableRow} node
	*/
	function handleTableRow(node, _, state, info) {
		const value = serializeData([handleTableRowAsData(node, state, info)]);
		return value.slice(0, value.indexOf("\n"));
	}
	/**
	* @type {ToMarkdownHandle}
	* @param {TableCell} node
	*/
	function handleTableCell(node, _, state, info) {
		const exit = state.enter("tableCell");
		const subexit = state.enter("phrasing");
		const value = state.containerPhrasing(node, {
			...info,
			before: around,
			after: around
		});
		subexit();
		exit();
		return value;
	}
	/**
	* @param {Array<Array<string>>} matrix
	* @param {Array<string | null | undefined> | null | undefined} [align]
	*/
	function serializeData(matrix, align) {
		return markdownTable(matrix, {
			align,
			alignDelimiters,
			padding,
			stringLength
		});
	}
	/**
	* @param {Table} node
	* @param {State} state
	* @param {Info} info
	*/
	function handleTableAsData(node, state, info) {
		const children = node.children;
		let index = -1;
		/** @type {Array<Array<string>>} */
		const result = [];
		const subexit = state.enter("table");
		while (++index < children.length) result[index] = handleTableRowAsData(children[index], state, info);
		subexit();
		return result;
	}
	/**
	* @param {TableRow} node
	* @param {State} state
	* @param {Info} info
	*/
	function handleTableRowAsData(node, state, info) {
		const children = node.children;
		let index = -1;
		/** @type {Array<string>} */
		const result = [];
		const subexit = state.enter("tableRow");
		while (++index < children.length) result[index] = handleTableCell(children[index], node, state, info);
		subexit();
		return result;
	}
	/**
	* @type {ToMarkdownHandle}
	* @param {InlineCode} node
	*/
	function inlineCodeWithTable(node, parent, state) {
		let value = handle.inlineCode(node, parent, state);
		if (state.stack.includes("tableCell")) value = value.replace(/\|/g, "\\$&");
		return value;
	}
}
//#endregion
//#region ../../node_modules/mdast-util-gfm-task-list-item/lib/index.js
/**
* @typedef {import('mdast').ListItem} ListItem
* @typedef {import('mdast').Paragraph} Paragraph
* @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext
* @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension
* @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle
* @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension
* @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle
*/
/**
* Create an extension for `mdast-util-from-markdown` to enable GFM task
* list items in markdown.
*
* @returns {FromMarkdownExtension}
*   Extension for `mdast-util-from-markdown` to enable GFM task list items.
*/
function gfmTaskListItemFromMarkdown() {
	return { exit: {
		taskListCheckValueChecked: exitCheck,
		taskListCheckValueUnchecked: exitCheck,
		paragraph: exitParagraphWithTaskListItem
	} };
}
/**
* Create an extension for `mdast-util-to-markdown` to enable GFM task list
* items in markdown.
*
* @returns {ToMarkdownExtension}
*   Extension for `mdast-util-to-markdown` to enable GFM task list items.
*/
function gfmTaskListItemToMarkdown() {
	return {
		unsafe: [{
			atBreak: true,
			character: "-",
			after: "[:|-]"
		}],
		handlers: { listItem: listItemWithTaskListItem }
	};
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function exitCheck(token) {
	const node = this.stack[this.stack.length - 2];
	node.type;
	node.checked = token.type === "taskListCheckValueChecked";
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function exitParagraphWithTaskListItem(token) {
	const parent = this.stack[this.stack.length - 2];
	if (parent && parent.type === "listItem" && typeof parent.checked === "boolean") {
		const node = this.stack[this.stack.length - 1];
		node.type;
		const head = node.children[0];
		if (head && head.type === "text") {
			const siblings = parent.children;
			let index = -1;
			/** @type {Paragraph | undefined} */
			let firstParaghraph;
			while (++index < siblings.length) {
				const sibling = siblings[index];
				if (sibling.type === "paragraph") {
					firstParaghraph = sibling;
					break;
				}
			}
			if (firstParaghraph === node) {
				head.value = head.value.slice(1);
				if (head.value.length === 0) node.children.shift();
				else if (node.position && head.position && typeof head.position.start.offset === "number") {
					head.position.start.column++;
					head.position.start.offset++;
					node.position.start = Object.assign({}, head.position.start);
				}
			}
		}
	}
	this.exit(token);
}
/**
* @type {ToMarkdownHandle}
* @param {ListItem} node
*/
function listItemWithTaskListItem(node, parent, state, info) {
	const head = node.children[0];
	const checkable = typeof node.checked === "boolean" && head && head.type === "paragraph";
	const checkbox = "[" + (node.checked ? "x" : " ") + "] ";
	const tracker = state.createTracker(info);
	if (checkable) tracker.move(checkbox);
	let value = handle.listItem(node, parent, state, {
		...info,
		...tracker.current()
	});
	if (checkable) value = value.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/, check);
	return value;
	/**
	* @param {string} $0
	* @returns {string}
	*/
	function check($0) {
		return $0 + checkbox;
	}
}
//#endregion
//#region ../../node_modules/mdast-util-gfm/lib/index.js
/**
* @import {Extension as FromMarkdownExtension} from 'mdast-util-from-markdown'
* @import {Options} from 'mdast-util-gfm'
* @import {Options as ToMarkdownExtension} from 'mdast-util-to-markdown'
*/
/**
* Create an extension for `mdast-util-from-markdown` to enable GFM (autolink
* literals, footnotes, strikethrough, tables, tasklists).
*
* @returns {Array<FromMarkdownExtension>}
*   Extension for `mdast-util-from-markdown` to enable GFM (autolink literals,
*   footnotes, strikethrough, tables, tasklists).
*/
function gfmFromMarkdown() {
	return [
		gfmAutolinkLiteralFromMarkdown(),
		gfmFootnoteFromMarkdown(),
		gfmStrikethroughFromMarkdown(),
		gfmTableFromMarkdown(),
		gfmTaskListItemFromMarkdown()
	];
}
/**
* Create an extension for `mdast-util-to-markdown` to enable GFM (autolink
* literals, footnotes, strikethrough, tables, tasklists).
*
* @param {Options | null | undefined} [options]
*   Configuration (optional).
* @returns {ToMarkdownExtension}
*   Extension for `mdast-util-to-markdown` to enable GFM (autolink literals,
*   footnotes, strikethrough, tables, tasklists).
*/
function gfmToMarkdown(options) {
	return { extensions: [
		gfmAutolinkLiteralToMarkdown(),
		gfmFootnoteToMarkdown(options),
		gfmStrikethroughToMarkdown(),
		gfmTableToMarkdown(options),
		gfmTaskListItemToMarkdown()
	] };
}
//#endregion
//#region ../../node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js
/**
* @import {Code, ConstructRecord, Event, Extension, Previous, State, TokenizeContext, Tokenizer} from 'micromark-util-types'
*/
var wwwPrefix = {
	tokenize: tokenizeWwwPrefix,
	partial: true
};
var domain = {
	tokenize: tokenizeDomain,
	partial: true
};
var path = {
	tokenize: tokenizePath,
	partial: true
};
var trail = {
	tokenize: tokenizeTrail,
	partial: true
};
var emailDomainDotTrail = {
	tokenize: tokenizeEmailDomainDotTrail,
	partial: true
};
var wwwAutolink = {
	name: "wwwAutolink",
	tokenize: tokenizeWwwAutolink,
	previous: previousWww
};
var protocolAutolink = {
	name: "protocolAutolink",
	tokenize: tokenizeProtocolAutolink,
	previous: previousProtocol
};
var emailAutolink = {
	name: "emailAutolink",
	tokenize: tokenizeEmailAutolink,
	previous: previousEmail
};
/** @type {ConstructRecord} */
var text = {};
/**
* Create an extension for `micromark` to support GitHub autolink literal
* syntax.
*
* @returns {Extension}
*   Extension for `micromark` that can be passed in `extensions` to enable GFM
*   autolink literal syntax.
*/
function gfmAutolinkLiteral() {
	return { text };
}
/** @type {Code} */
var code = 48;
while (code < 123) {
	text[code] = emailAutolink;
	code++;
	if (code === 58) code = 65;
	else if (code === 91) code = 97;
}
text[43] = emailAutolink;
text[45] = emailAutolink;
text[46] = emailAutolink;
text[95] = emailAutolink;
text[72] = [emailAutolink, protocolAutolink];
text[104] = [emailAutolink, protocolAutolink];
text[87] = [emailAutolink, wwwAutolink];
text[119] = [emailAutolink, wwwAutolink];
/**
* Email autolink literal.
*
* ```markdown
* > | a contact@example.org b
*       ^^^^^^^^^^^^^^^^^^^
* ```
*
* @this {TokenizeContext}
* @type {Tokenizer}
*/
function tokenizeEmailAutolink(effects, ok, nok) {
	const self = this;
	/** @type {boolean | undefined} */
	let dot;
	/** @type {boolean} */
	let data;
	return start;
	/**
	* Start of email autolink literal.
	*
	* ```markdown
	* > | a contact@example.org b
	*       ^
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		if (!gfmAtext(code) || !previousEmail.call(self, self.previous) || previousUnbalanced(self.events)) return nok(code);
		effects.enter("literalAutolink");
		effects.enter("literalAutolinkEmail");
		return atext(code);
	}
	/**
	* In email atext.
	*
	* ```markdown
	* > | a contact@example.org b
	*       ^
	* ```
	*
	* @type {State}
	*/
	function atext(code) {
		if (gfmAtext(code)) {
			effects.consume(code);
			return atext;
		}
		if (code === 64) {
			effects.consume(code);
			return emailDomain;
		}
		return nok(code);
	}
	/**
	* In email domain.
	*
	* The reference code is a bit overly complex as it handles the `@`, of which
	* there may be just one.
	* Source: <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L318>
	*
	* ```markdown
	* > | a contact@example.org b
	*               ^
	* ```
	*
	* @type {State}
	*/
	function emailDomain(code) {
		if (code === 46) return effects.check(emailDomainDotTrail, emailDomainAfter, emailDomainDot)(code);
		if (code === 45 || code === 95 || asciiAlphanumeric(code)) {
			data = true;
			effects.consume(code);
			return emailDomain;
		}
		return emailDomainAfter(code);
	}
	/**
	* In email domain, on dot that is not a trail.
	*
	* ```markdown
	* > | a contact@example.org b
	*                      ^
	* ```
	*
	* @type {State}
	*/
	function emailDomainDot(code) {
		effects.consume(code);
		dot = true;
		return emailDomain;
	}
	/**
	* After email domain.
	*
	* ```markdown
	* > | a contact@example.org b
	*                          ^
	* ```
	*
	* @type {State}
	*/
	function emailDomainAfter(code) {
		if (data && dot && asciiAlpha(self.previous)) {
			effects.exit("literalAutolinkEmail");
			effects.exit("literalAutolink");
			return ok(code);
		}
		return nok(code);
	}
}
/**
* `www` autolink literal.
*
* ```markdown
* > | a www.example.org b
*       ^^^^^^^^^^^^^^^
* ```
*
* @this {TokenizeContext}
* @type {Tokenizer}
*/
function tokenizeWwwAutolink(effects, ok, nok) {
	const self = this;
	return wwwStart;
	/**
	* Start of www autolink literal.
	*
	* ```markdown
	* > | www.example.com/a?b#c
	*     ^
	* ```
	*
	* @type {State}
	*/
	function wwwStart(code) {
		if (code !== 87 && code !== 119 || !previousWww.call(self, self.previous) || previousUnbalanced(self.events)) return nok(code);
		effects.enter("literalAutolink");
		effects.enter("literalAutolinkWww");
		return effects.check(wwwPrefix, effects.attempt(domain, effects.attempt(path, wwwAfter), nok), nok)(code);
	}
	/**
	* After a www autolink literal.
	*
	* ```markdown
	* > | www.example.com/a?b#c
	*                          ^
	* ```
	*
	* @type {State}
	*/
	function wwwAfter(code) {
		effects.exit("literalAutolinkWww");
		effects.exit("literalAutolink");
		return ok(code);
	}
}
/**
* Protocol autolink literal.
*
* ```markdown
* > | a https://example.org b
*       ^^^^^^^^^^^^^^^^^^^
* ```
*
* @this {TokenizeContext}
* @type {Tokenizer}
*/
function tokenizeProtocolAutolink(effects, ok, nok) {
	const self = this;
	let buffer = "";
	let seen = false;
	return protocolStart;
	/**
	* Start of protocol autolink literal.
	*
	* ```markdown
	* > | https://example.com/a?b#c
	*     ^
	* ```
	*
	* @type {State}
	*/
	function protocolStart(code) {
		if ((code === 72 || code === 104) && previousProtocol.call(self, self.previous) && !previousUnbalanced(self.events)) {
			effects.enter("literalAutolink");
			effects.enter("literalAutolinkHttp");
			buffer += String.fromCodePoint(code);
			effects.consume(code);
			return protocolPrefixInside;
		}
		return nok(code);
	}
	/**
	* In protocol.
	*
	* ```markdown
	* > | https://example.com/a?b#c
	*     ^^^^^
	* ```
	*
	* @type {State}
	*/
	function protocolPrefixInside(code) {
		if (asciiAlpha(code) && buffer.length < 5) {
			buffer += String.fromCodePoint(code);
			effects.consume(code);
			return protocolPrefixInside;
		}
		if (code === 58) {
			const protocol = buffer.toLowerCase();
			if (protocol === "http" || protocol === "https") {
				effects.consume(code);
				return protocolSlashesInside;
			}
		}
		return nok(code);
	}
	/**
	* In slashes.
	*
	* ```markdown
	* > | https://example.com/a?b#c
	*           ^^
	* ```
	*
	* @type {State}
	*/
	function protocolSlashesInside(code) {
		if (code === 47) {
			effects.consume(code);
			if (seen) return afterProtocol;
			seen = true;
			return protocolSlashesInside;
		}
		return nok(code);
	}
	/**
	* After protocol, before domain.
	*
	* ```markdown
	* > | https://example.com/a?b#c
	*             ^
	* ```
	*
	* @type {State}
	*/
	function afterProtocol(code) {
		return code === null || asciiControl(code) || markdownLineEndingOrSpace(code) || unicodeWhitespace(code) || unicodePunctuation(code) ? nok(code) : effects.attempt(domain, effects.attempt(path, protocolAfter), nok)(code);
	}
	/**
	* After a protocol autolink literal.
	*
	* ```markdown
	* > | https://example.com/a?b#c
	*                              ^
	* ```
	*
	* @type {State}
	*/
	function protocolAfter(code) {
		effects.exit("literalAutolinkHttp");
		effects.exit("literalAutolink");
		return ok(code);
	}
}
/**
* `www` prefix.
*
* ```markdown
* > | a www.example.org b
*       ^^^^
* ```
*
* @this {TokenizeContext}
* @type {Tokenizer}
*/
function tokenizeWwwPrefix(effects, ok, nok) {
	let size = 0;
	return wwwPrefixInside;
	/**
	* In www prefix.
	*
	* ```markdown
	* > | www.example.com
	*     ^^^^
	* ```
	*
	* @type {State}
	*/
	function wwwPrefixInside(code) {
		if ((code === 87 || code === 119) && size < 3) {
			size++;
			effects.consume(code);
			return wwwPrefixInside;
		}
		if (code === 46 && size === 3) {
			effects.consume(code);
			return wwwPrefixAfter;
		}
		return nok(code);
	}
	/**
	* After www prefix.
	*
	* ```markdown
	* > | www.example.com
	*         ^
	* ```
	*
	* @type {State}
	*/
	function wwwPrefixAfter(code) {
		return code === null ? nok(code) : ok(code);
	}
}
/**
* Domain.
*
* ```markdown
* > | a https://example.org b
*               ^^^^^^^^^^^
* ```
*
* @this {TokenizeContext}
* @type {Tokenizer}
*/
function tokenizeDomain(effects, ok, nok) {
	/** @type {boolean | undefined} */
	let underscoreInLastSegment;
	/** @type {boolean | undefined} */
	let underscoreInLastLastSegment;
	/** @type {boolean | undefined} */
	let seen;
	return domainInside;
	/**
	* In domain.
	*
	* ```markdown
	* > | https://example.com/a
	*             ^^^^^^^^^^^
	* ```
	*
	* @type {State}
	*/
	function domainInside(code) {
		if (code === 46 || code === 95) return effects.check(trail, domainAfter, domainAtPunctuation)(code);
		if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code) || code !== 45 && unicodePunctuation(code)) return domainAfter(code);
		seen = true;
		effects.consume(code);
		return domainInside;
	}
	/**
	* In domain, at potential trailing punctuation, that was not trailing.
	*
	* ```markdown
	* > | https://example.com
	*                    ^
	* ```
	*
	* @type {State}
	*/
	function domainAtPunctuation(code) {
		if (code === 95) underscoreInLastSegment = true;
		else {
			underscoreInLastLastSegment = underscoreInLastSegment;
			underscoreInLastSegment = void 0;
		}
		effects.consume(code);
		return domainInside;
	}
	/**
	* After domain.
	*
	* ```markdown
	* > | https://example.com/a
	*                        ^
	* ```
	*
	* @type {State} */
	function domainAfter(code) {
		if (underscoreInLastLastSegment || underscoreInLastSegment || !seen) return nok(code);
		return ok(code);
	}
}
/**
* Path.
*
* ```markdown
* > | a https://example.org/stuff b
*                          ^^^^^^
* ```
*
* @this {TokenizeContext}
* @type {Tokenizer}
*/
function tokenizePath(effects, ok) {
	let sizeOpen = 0;
	let sizeClose = 0;
	return pathInside;
	/**
	* In path.
	*
	* ```markdown
	* > | https://example.com/a
	*                        ^^
	* ```
	*
	* @type {State}
	*/
	function pathInside(code) {
		if (code === 40) {
			sizeOpen++;
			effects.consume(code);
			return pathInside;
		}
		if (code === 41 && sizeClose < sizeOpen) return pathAtPunctuation(code);
		if (code === 33 || code === 34 || code === 38 || code === 39 || code === 41 || code === 42 || code === 44 || code === 46 || code === 58 || code === 59 || code === 60 || code === 63 || code === 93 || code === 95 || code === 126) return effects.check(trail, ok, pathAtPunctuation)(code);
		if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) return ok(code);
		effects.consume(code);
		return pathInside;
	}
	/**
	* In path, at potential trailing punctuation, that was not trailing.
	*
	* ```markdown
	* > | https://example.com/a"b
	*                          ^
	* ```
	*
	* @type {State}
	*/
	function pathAtPunctuation(code) {
		if (code === 41) sizeClose++;
		effects.consume(code);
		return pathInside;
	}
}
/**
* Trail.
*
* This calls `ok` if this *is* the trail, followed by an end, which means
* the entire trail is not part of the link.
* It calls `nok` if this *is* part of the link.
*
* ```markdown
* > | https://example.com").
*                        ^^^
* ```
*
* @this {TokenizeContext}
* @type {Tokenizer}
*/
function tokenizeTrail(effects, ok, nok) {
	return trail;
	/**
	* In trail of domain or path.
	*
	* ```markdown
	* > | https://example.com").
	*                        ^
	* ```
	*
	* @type {State}
	*/
	function trail(code) {
		if (code === 33 || code === 34 || code === 39 || code === 41 || code === 42 || code === 44 || code === 46 || code === 58 || code === 59 || code === 63 || code === 95 || code === 126) {
			effects.consume(code);
			return trail;
		}
		if (code === 38) {
			effects.consume(code);
			return trailCharacterReferenceStart;
		}
		if (code === 93) {
			effects.consume(code);
			return trailBracketAfter;
		}
		if (code === 60 || code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) return ok(code);
		return nok(code);
	}
	/**
	* In trail, after `]`.
	*
	* > 👉 **Note**: this deviates from `cmark-gfm` to fix a bug.
	* > See end of <https://github.com/github/cmark-gfm/issues/278> for more.
	*
	* ```markdown
	* > | https://example.com](
	*                         ^
	* ```
	*
	* @type {State}
	*/
	function trailBracketAfter(code) {
		if (code === null || code === 40 || code === 91 || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) return ok(code);
		return trail(code);
	}
	/**
	* In character-reference like trail, after `&`.
	*
	* ```markdown
	* > | https://example.com&amp;).
	*                         ^
	* ```
	*
	* @type {State}
	*/
	function trailCharacterReferenceStart(code) {
		return asciiAlpha(code) ? trailCharacterReferenceInside(code) : nok(code);
	}
	/**
	* In character-reference like trail.
	*
	* ```markdown
	* > | https://example.com&amp;).
	*                         ^
	* ```
	*
	* @type {State}
	*/
	function trailCharacterReferenceInside(code) {
		if (code === 59) {
			effects.consume(code);
			return trail;
		}
		if (asciiAlpha(code)) {
			effects.consume(code);
			return trailCharacterReferenceInside;
		}
		return nok(code);
	}
}
/**
* Dot in email domain trail.
*
* This calls `ok` if this *is* the trail, followed by an end, which means
* the trail is not part of the link.
* It calls `nok` if this *is* part of the link.
*
* ```markdown
* > | contact@example.org.
*                        ^
* ```
*
* @this {TokenizeContext}
* @type {Tokenizer}
*/
function tokenizeEmailDomainDotTrail(effects, ok, nok) {
	return start;
	/**
	* Dot.
	*
	* ```markdown
	* > | contact@example.org.
	*                    ^   ^
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		effects.consume(code);
		return after;
	}
	/**
	* After dot.
	*
	* ```markdown
	* > | contact@example.org.
	*                     ^   ^
	* ```
	*
	* @type {State}
	*/
	function after(code) {
		return asciiAlphanumeric(code) ? nok(code) : ok(code);
	}
}
/**
* See:
* <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L156>.
*
* @type {Previous}
*/
function previousWww(code) {
	return code === null || code === 40 || code === 42 || code === 95 || code === 91 || code === 93 || code === 126 || markdownLineEndingOrSpace(code);
}
/**
* See:
* <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L214>.
*
* @type {Previous}
*/
function previousProtocol(code) {
	return !asciiAlpha(code);
}
/**
* @this {TokenizeContext}
* @type {Previous}
*/
function previousEmail(code) {
	return !(code === 47 || gfmAtext(code));
}
/**
* @param {Code} code
* @returns {boolean}
*/
function gfmAtext(code) {
	return code === 43 || code === 45 || code === 46 || code === 95 || asciiAlphanumeric(code);
}
/**
* @param {Array<Event>} events
* @returns {boolean}
*/
function previousUnbalanced(events) {
	let index = events.length;
	let result = false;
	while (index--) {
		const token = events[index][1];
		if ((token.type === "labelLink" || token.type === "labelImage") && !token._balanced) {
			result = true;
			break;
		}
		if (token._gfmAutolinkLiteralWalkedInto) {
			result = false;
			break;
		}
	}
	if (events.length > 0 && !result) events[events.length - 1][1]._gfmAutolinkLiteralWalkedInto = true;
	return result;
}
//#endregion
//#region ../../node_modules/micromark-extension-gfm-footnote/lib/syntax.js
/**
* @import {Event, Exiter, Extension, Resolver, State, Token, TokenizeContext, Tokenizer} from 'micromark-util-types'
*/
var indent = {
	tokenize: tokenizeIndent,
	partial: true
};
/**
* Create an extension for `micromark` to enable GFM footnote syntax.
*
* @returns {Extension}
*   Extension for `micromark` that can be passed in `extensions` to
*   enable GFM footnote syntax.
*/
function gfmFootnote() {
	/** @type {Extension} */
	return {
		document: { [91]: {
			name: "gfmFootnoteDefinition",
			tokenize: tokenizeDefinitionStart,
			continuation: { tokenize: tokenizeDefinitionContinuation },
			exit: gfmFootnoteDefinitionEnd
		} },
		text: {
			[91]: {
				name: "gfmFootnoteCall",
				tokenize: tokenizeGfmFootnoteCall
			},
			[93]: {
				name: "gfmPotentialFootnoteCall",
				add: "after",
				tokenize: tokenizePotentialGfmFootnoteCall,
				resolveTo: resolveToPotentialGfmFootnoteCall
			}
		}
	};
}
/**
* @this {TokenizeContext}
* @type {Tokenizer}
*/
function tokenizePotentialGfmFootnoteCall(effects, ok, nok) {
	const self = this;
	let index = self.events.length;
	const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = []);
	/** @type {Token} */
	let labelStart;
	while (index--) {
		const token = self.events[index][1];
		if (token.type === "labelImage") {
			labelStart = token;
			break;
		}
		if (token.type === "gfmFootnoteCall" || token.type === "labelLink" || token.type === "label" || token.type === "image" || token.type === "link") break;
	}
	return start;
	/**
	* @type {State}
	*/
	function start(code) {
		if (!labelStart || !labelStart._balanced) return nok(code);
		const id = normalizeIdentifier(self.sliceSerialize({
			start: labelStart.end,
			end: self.now()
		}));
		if (id.codePointAt(0) !== 94 || !defined.includes(id.slice(1))) return nok(code);
		effects.enter("gfmFootnoteCallLabelMarker");
		effects.consume(code);
		effects.exit("gfmFootnoteCallLabelMarker");
		return ok(code);
	}
}
/** @type {Resolver} */
function resolveToPotentialGfmFootnoteCall(events, context) {
	let index = events.length;
	while (index--) if (events[index][1].type === "labelImage" && events[index][0] === "enter") {
		events[index][1];
		break;
	}
	events[index + 1][1].type = "data";
	events[index + 3][1].type = "gfmFootnoteCallLabelMarker";
	/** @type {Token} */
	const call = {
		type: "gfmFootnoteCall",
		start: Object.assign({}, events[index + 3][1].start),
		end: Object.assign({}, events[events.length - 1][1].end)
	};
	/** @type {Token} */
	const marker = {
		type: "gfmFootnoteCallMarker",
		start: Object.assign({}, events[index + 3][1].end),
		end: Object.assign({}, events[index + 3][1].end)
	};
	marker.end.column++;
	marker.end.offset++;
	marker.end._bufferIndex++;
	/** @type {Token} */
	const string = {
		type: "gfmFootnoteCallString",
		start: Object.assign({}, marker.end),
		end: Object.assign({}, events[events.length - 1][1].start)
	};
	/** @type {Token} */
	const chunk = {
		type: "chunkString",
		contentType: "string",
		start: Object.assign({}, string.start),
		end: Object.assign({}, string.end)
	};
	/** @type {Array<Event>} */
	const replacement = [
		events[index + 1],
		events[index + 2],
		[
			"enter",
			call,
			context
		],
		events[index + 3],
		events[index + 4],
		[
			"enter",
			marker,
			context
		],
		[
			"exit",
			marker,
			context
		],
		[
			"enter",
			string,
			context
		],
		[
			"enter",
			chunk,
			context
		],
		[
			"exit",
			chunk,
			context
		],
		[
			"exit",
			string,
			context
		],
		events[events.length - 2],
		events[events.length - 1],
		[
			"exit",
			call,
			context
		]
	];
	events.splice(index, events.length - index + 1, ...replacement);
	return events;
}
/**
* @this {TokenizeContext}
* @type {Tokenizer}
*/
function tokenizeGfmFootnoteCall(effects, ok, nok) {
	const self = this;
	const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = []);
	let size = 0;
	/** @type {boolean} */
	let data;
	return start;
	/**
	* Start of footnote label.
	*
	* ```markdown
	* > | a [^b] c
	*       ^
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		effects.enter("gfmFootnoteCall");
		effects.enter("gfmFootnoteCallLabelMarker");
		effects.consume(code);
		effects.exit("gfmFootnoteCallLabelMarker");
		return callStart;
	}
	/**
	* After `[`, at `^`.
	*
	* ```markdown
	* > | a [^b] c
	*        ^
	* ```
	*
	* @type {State}
	*/
	function callStart(code) {
		if (code !== 94) return nok(code);
		effects.enter("gfmFootnoteCallMarker");
		effects.consume(code);
		effects.exit("gfmFootnoteCallMarker");
		effects.enter("gfmFootnoteCallString");
		effects.enter("chunkString").contentType = "string";
		return callData;
	}
	/**
	* In label.
	*
	* ```markdown
	* > | a [^b] c
	*         ^
	* ```
	*
	* @type {State}
	*/
	function callData(code) {
		if (size > 999 || code === 93 && !data || code === null || code === 91 || markdownLineEndingOrSpace(code)) return nok(code);
		if (code === 93) {
			effects.exit("chunkString");
			const token = effects.exit("gfmFootnoteCallString");
			if (!defined.includes(normalizeIdentifier(self.sliceSerialize(token)))) return nok(code);
			effects.enter("gfmFootnoteCallLabelMarker");
			effects.consume(code);
			effects.exit("gfmFootnoteCallLabelMarker");
			effects.exit("gfmFootnoteCall");
			return ok;
		}
		if (!markdownLineEndingOrSpace(code)) data = true;
		size++;
		effects.consume(code);
		return code === 92 ? callEscape : callData;
	}
	/**
	* On character after escape.
	*
	* ```markdown
	* > | a [^b\c] d
	*           ^
	* ```
	*
	* @type {State}
	*/
	function callEscape(code) {
		if (code === 91 || code === 92 || code === 93) {
			effects.consume(code);
			size++;
			return callData;
		}
		return callData(code);
	}
}
/**
* @this {TokenizeContext}
* @type {Tokenizer}
*/
function tokenizeDefinitionStart(effects, ok, nok) {
	const self = this;
	const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = []);
	/** @type {string} */
	let identifier;
	let size = 0;
	/** @type {boolean | undefined} */
	let data;
	return start;
	/**
	* Start of GFM footnote definition.
	*
	* ```markdown
	* > | [^a]: b
	*     ^
	* ```
	*
	* @type {State}
	*/
	function start(code) {
		effects.enter("gfmFootnoteDefinition")._container = true;
		effects.enter("gfmFootnoteDefinitionLabel");
		effects.enter("gfmFootnoteDefinitionLabelMarker");
		effects.consume(code);
		effects.exit("gfmFootnoteDefinitionLabelMarker");
		return labelAtMarker;
	}
	/**
	* In label, at caret.
	*
	* ```markdown
	* > | [^a]: b
	*      ^
	* ```
	*
	* @type {State}
	*/
	function labelAtMarker(code) {
		if (code === 94) {
			effects.enter("gfmFootnoteDefinitionMarker");
			effects.consume(code);
			effects.exit("gfmFootnoteDefinitionMarker");
			effects.enter("gfmFootnoteDefinitionLabelString");
			effects.enter("chunkString").contentType = "string";
			return labelInside;
		}
		return nok(code);
	}
	/**
	* In label.
	*
	* > 👉 **Note**: `cmark-gfm` prevents whitespace from occurring in footnote
	* > definition labels.
	*
	* ```markdown
	* > | [^a]: b
	*       ^
	* ```
	*
	* @type {State}
	*/
	function labelInside(code) {
		if (size > 999 || code === 93 && !data || code === null || code === 91 || markdownLineEndingOrSpace(code)) return nok(code);
		if (code === 93) {
			effects.exit("chunkString");
			const token = effects.exit("gfmFootnoteDefinitionLabelString");
			identifier = normalizeIdentifier(self.sliceSerialize(token));
			effects.enter("gfmFootnoteDefinitionLabelMarker");
			effects.consume(code);
			effects.exit("gfmFootnoteDefinitionLabelMarker");
			effects.exit("gfmFootnoteDefinitionLabel");
			return labelAfter;
		}
		if (!markdownLineEndingOrSpace(code)) data = true;
		size++;
		effects.consume(code);
		return code === 92 ? labelEscape : labelInside;
	}
	/**
	* After `\`, at a special character.
	*
	* > 👉 **Note**: `cmark-gfm` currently does not support escaped brackets:
	* > <https://github.com/github/cmark-gfm/issues/240>
	*
	* ```markdown
	* > | [^a\*b]: c
	*         ^
	* ```
	*
	* @type {State}
	*/
	function labelEscape(code) {
		if (code === 91 || code === 92 || code === 93) {
			effects.consume(code);
			size++;
			return labelInside;
		}
		return labelInside(code);
	}
	/**
	* After definition label.
	*
	* ```markdown
	* > | [^a]: b
	*         ^
	* ```
	*
	* @type {State}
	*/
	function labelAfter(code) {
		if (code === 58) {
			effects.enter("definitionMarker");
			effects.consume(code);
			effects.exit("definitionMarker");
			if (!defined.includes(identifier)) defined.push(identifier);
			return factorySpace(effects, whitespaceAfter, "gfmFootnoteDefinitionWhitespace");
		}
		return nok(code);
	}
	/**
	* After definition prefix.
	*
	* ```markdown
	* > | [^a]: b
	*           ^
	* ```
	*
	* @type {State}
	*/
	function whitespaceAfter(code) {
		return ok(code);
	}
}
/**
* @this {TokenizeContext}
* @type {Tokenizer}
*/
function tokenizeDefinitionContinuation(effects, ok, nok) {
	return effects.check(blankLine, ok, effects.attempt(indent, ok, nok));
}
/** @type {Exiter} */
function gfmFootnoteDefinitionEnd(effects) {
	effects.exit("gfmFootnoteDefinition");
}
/**
* @this {TokenizeContext}
* @type {Tokenizer}
*/
function tokenizeIndent(effects, ok, nok) {
	const self = this;
	return factorySpace(effects, afterPrefix, "gfmFootnoteDefinitionIndent", 5);
	/**
	* @type {State}
	*/
	function afterPrefix(code) {
		const tail = self.events[self.events.length - 1];
		return tail && tail[1].type === "gfmFootnoteDefinitionIndent" && tail[2].sliceSerialize(tail[1], true).length === 4 ? ok(code) : nok(code);
	}
}
//#endregion
//#region ../../node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js
/**
* @import {Options} from 'micromark-extension-gfm-strikethrough'
* @import {Event, Extension, Resolver, State, Token, TokenizeContext, Tokenizer} from 'micromark-util-types'
*/
/**
* Create an extension for `micromark` to enable GFM strikethrough syntax.
*
* @param {Options | null | undefined} [options={}]
*   Configuration.
* @returns {Extension}
*   Extension for `micromark` that can be passed in `extensions`, to
*   enable GFM strikethrough syntax.
*/
function gfmStrikethrough(options) {
	let single = (options || {}).singleTilde;
	const tokenizer = {
		name: "strikethrough",
		tokenize: tokenizeStrikethrough,
		resolveAll: resolveAllStrikethrough
	};
	if (single === null || single === void 0) single = true;
	return {
		text: { [126]: tokenizer },
		insideSpan: { null: [tokenizer] },
		attentionMarkers: { null: [126] }
	};
	/**
	* Take events and resolve strikethrough.
	*
	* @type {Resolver}
	*/
	function resolveAllStrikethrough(events, context) {
		let index = -1;
		while (++index < events.length) if (events[index][0] === "enter" && events[index][1].type === "strikethroughSequenceTemporary" && events[index][1]._close) {
			let open = index;
			while (open--) if (events[open][0] === "exit" && events[open][1].type === "strikethroughSequenceTemporary" && events[open][1]._open && events[index][1].end.offset - events[index][1].start.offset === events[open][1].end.offset - events[open][1].start.offset) {
				events[index][1].type = "strikethroughSequence";
				events[open][1].type = "strikethroughSequence";
				/** @type {Token} */
				const strikethrough = {
					type: "strikethrough",
					start: Object.assign({}, events[open][1].start),
					end: Object.assign({}, events[index][1].end)
				};
				/** @type {Token} */
				const text = {
					type: "strikethroughText",
					start: Object.assign({}, events[open][1].end),
					end: Object.assign({}, events[index][1].start)
				};
				/** @type {Array<Event>} */
				const nextEvents = [
					[
						"enter",
						strikethrough,
						context
					],
					[
						"enter",
						events[open][1],
						context
					],
					[
						"exit",
						events[open][1],
						context
					],
					[
						"enter",
						text,
						context
					]
				];
				const insideSpan = context.parser.constructs.insideSpan.null;
				if (insideSpan) splice(nextEvents, nextEvents.length, 0, resolveAll(insideSpan, events.slice(open + 1, index), context));
				splice(nextEvents, nextEvents.length, 0, [
					[
						"exit",
						text,
						context
					],
					[
						"enter",
						events[index][1],
						context
					],
					[
						"exit",
						events[index][1],
						context
					],
					[
						"exit",
						strikethrough,
						context
					]
				]);
				splice(events, open - 1, index - open + 3, nextEvents);
				index = open + nextEvents.length - 2;
				break;
			}
		}
		index = -1;
		while (++index < events.length) if (events[index][1].type === "strikethroughSequenceTemporary") events[index][1].type = "data";
		return events;
	}
	/**
	* @this {TokenizeContext}
	* @type {Tokenizer}
	*/
	function tokenizeStrikethrough(effects, ok, nok) {
		const previous = this.previous;
		const events = this.events;
		let size = 0;
		return start;
		/** @type {State} */
		function start(code) {
			if (previous === 126 && events[events.length - 1][1].type !== "characterEscape") return nok(code);
			effects.enter("strikethroughSequenceTemporary");
			return more(code);
		}
		/** @type {State} */
		function more(code) {
			const before = classifyCharacter(previous);
			if (code === 126) {
				if (size > 1) return nok(code);
				effects.consume(code);
				size++;
				return more;
			}
			if (size < 2 && !single) return nok(code);
			const token = effects.exit("strikethroughSequenceTemporary");
			const after = classifyCharacter(code);
			token._open = !after || after === 2 && Boolean(before);
			token._close = !before || before === 2 && Boolean(after);
			return ok(code);
		}
	}
}
//#endregion
//#region ../../node_modules/micromark-extension-gfm-table/lib/edit-map.js
/**
* @import {Event} from 'micromark-util-types'
*/
/**
* @typedef {[number, number, Array<Event>]} Change
* @typedef {[number, number, number]} Jump
*/
/**
* Tracks a bunch of edits.
*/
var EditMap = class {
	/**
	* Create a new edit map.
	*/
	constructor() {
		/**
		* Record of changes.
		*
		* @type {Array<Change>}
		*/
		this.map = [];
	}
	/**
	* Create an edit: a remove and/or add at a certain place.
	*
	* @param {number} index
	* @param {number} remove
	* @param {Array<Event>} add
	* @returns {undefined}
	*/
	add(index, remove, add) {
		addImplementation(this, index, remove, add);
	}
	/**
	* Done, change the events.
	*
	* @param {Array<Event>} events
	* @returns {undefined}
	*/
	consume(events) {
		this.map.sort(function(a, b) {
			return a[0] - b[0];
		});
		/* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */
		if (this.map.length === 0) return;
		let index = this.map.length;
		/** @type {Array<Array<Event>>} */
		const vecs = [];
		while (index > 0) {
			index -= 1;
			vecs.push(events.slice(this.map[index][0] + this.map[index][1]), this.map[index][2]);
			events.length = this.map[index][0];
		}
		vecs.push(events.slice());
		events.length = 0;
		let slice = vecs.pop();
		while (slice) {
			for (const element of slice) events.push(element);
			slice = vecs.pop();
		}
		this.map.length = 0;
	}
};
/**
* Create an edit.
*
* @param {EditMap} editMap
* @param {number} at
* @param {number} remove
* @param {Array<Event>} add
* @returns {undefined}
*/
function addImplementation(editMap, at, remove, add) {
	let index = 0;
	/* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */
	if (remove === 0 && add.length === 0) return;
	while (index < editMap.map.length) {
		if (editMap.map[index][0] === at) {
			editMap.map[index][1] += remove;
			editMap.map[index][2].push(...add);
			return;
		}
		index += 1;
	}
	editMap.map.push([
		at,
		remove,
		add
	]);
}
//#endregion
//#region ../../node_modules/micromark-extension-gfm-table/lib/infer.js
/**
* @import {Event} from 'micromark-util-types'
*/
/**
* @typedef {'center' | 'left' | 'none' | 'right'} Align
*/
/**
* Figure out the alignment of a GFM table.
*
* @param {Readonly<Array<Event>>} events
*   List of events.
* @param {number} index
*   Table enter event.
* @returns {Array<Align>}
*   List of aligns.
*/
function gfmTableAlign(events, index) {
	let inDelimiterRow = false;
	/** @type {Array<Align>} */
	const align = [];
	while (index < events.length) {
		const event = events[index];
		if (inDelimiterRow) {
			if (event[0] === "enter") {
				if (event[1].type === "tableContent") align.push(events[index + 1][1].type === "tableDelimiterMarker" ? "left" : "none");
			} else if (event[1].type === "tableContent") {
				if (events[index - 1][1].type === "tableDelimiterMarker") {
					const alignIndex = align.length - 1;
					align[alignIndex] = align[alignIndex] === "left" ? "center" : "right";
				}
			} else if (event[1].type === "tableDelimiterRow") break;
		} else if (event[0] === "enter" && event[1].type === "tableDelimiterRow") inDelimiterRow = true;
		index += 1;
	}
	return align;
}
//#endregion
//#region ../../node_modules/micromark-extension-gfm-table/lib/syntax.js
/**
* @import {Event, Extension, Point, Resolver, State, Token, TokenizeContext, Tokenizer} from 'micromark-util-types'
*/
/**
* @typedef {[number, number, number, number]} Range
*   Cell info.
*
* @typedef {0 | 1 | 2 | 3} RowKind
*   Where we are: `1` for head row, `2` for delimiter row, `3` for body row.
*/
/**
* Create an HTML extension for `micromark` to support GitHub tables syntax.
*
* @returns {Extension}
*   Extension for `micromark` that can be passed in `extensions` to enable GFM
*   table syntax.
*/
function gfmTable() {
	return { flow: { null: {
		name: "table",
		tokenize: tokenizeTable,
		resolveAll: resolveTable
	} } };
}
/**
* @this {TokenizeContext}
* @type {Tokenizer}
*/
function tokenizeTable(effects, ok, nok) {
	const self = this;
	let size = 0;
	let sizeB = 0;
	/** @type {boolean | undefined} */
	let seen;
	return start;
	/**
	* Start of a GFM table.
	*
	* If there is a valid table row or table head before, then we try to parse
	* another row.
	* Otherwise, we try to parse a head.
	*
	* ```markdown
	* > | | a |
	*     ^
	*   | | - |
	* > | | b |
	*     ^
	* ```
	* @type {State}
	*/
	function start(code) {
		let index = self.events.length - 1;
		while (index > -1) {
			const type = self.events[index][1].type;
			if (type === "lineEnding" || type === "linePrefix") index--;
			else break;
		}
		const tail = index > -1 ? self.events[index][1].type : null;
		const next = tail === "tableHead" || tail === "tableRow" ? bodyRowStart : headRowBefore;
		if (next === bodyRowStart && self.parser.lazy[self.now().line]) return nok(code);
		return next(code);
	}
	/**
	* Before table head row.
	*
	* ```markdown
	* > | | a |
	*     ^
	*   | | - |
	*   | | b |
	* ```
	*
	* @type {State}
	*/
	function headRowBefore(code) {
		effects.enter("tableHead");
		effects.enter("tableRow");
		return headRowStart(code);
	}
	/**
	* Before table head row, after whitespace.
	*
	* ```markdown
	* > | | a |
	*     ^
	*   | | - |
	*   | | b |
	* ```
	*
	* @type {State}
	*/
	function headRowStart(code) {
		if (code === 124) return headRowBreak(code);
		seen = true;
		sizeB += 1;
		return headRowBreak(code);
	}
	/**
	* At break in table head row.
	*
	* ```markdown
	* > | | a |
	*     ^
	*       ^
	*         ^
	*   | | - |
	*   | | b |
	* ```
	*
	* @type {State}
	*/
	function headRowBreak(code) {
		if (code === null) return nok(code);
		if (markdownLineEnding(code)) {
			if (sizeB > 1) {
				sizeB = 0;
				self.interrupt = true;
				effects.exit("tableRow");
				effects.enter("lineEnding");
				effects.consume(code);
				effects.exit("lineEnding");
				return headDelimiterStart;
			}
			return nok(code);
		}
		if (markdownSpace(code)) return factorySpace(effects, headRowBreak, "whitespace")(code);
		sizeB += 1;
		if (seen) {
			seen = false;
			size += 1;
		}
		if (code === 124) {
			effects.enter("tableCellDivider");
			effects.consume(code);
			effects.exit("tableCellDivider");
			seen = true;
			return headRowBreak;
		}
		effects.enter("data");
		return headRowData(code);
	}
	/**
	* In table head row data.
	*
	* ```markdown
	* > | | a |
	*       ^
	*   | | - |
	*   | | b |
	* ```
	*
	* @type {State}
	*/
	function headRowData(code) {
		if (code === null || code === 124 || markdownLineEndingOrSpace(code)) {
			effects.exit("data");
			return headRowBreak(code);
		}
		effects.consume(code);
		return code === 92 ? headRowEscape : headRowData;
	}
	/**
	* In table head row escape.
	*
	* ```markdown
	* > | | a\-b |
	*         ^
	*   | | ---- |
	*   | | c    |
	* ```
	*
	* @type {State}
	*/
	function headRowEscape(code) {
		if (code === 92 || code === 124) {
			effects.consume(code);
			return headRowData;
		}
		return headRowData(code);
	}
	/**
	* Before delimiter row.
	*
	* ```markdown
	*   | | a |
	* > | | - |
	*     ^
	*   | | b |
	* ```
	*
	* @type {State}
	*/
	function headDelimiterStart(code) {
		self.interrupt = false;
		if (self.parser.lazy[self.now().line]) return nok(code);
		effects.enter("tableDelimiterRow");
		seen = false;
		if (markdownSpace(code)) return factorySpace(effects, headDelimiterBefore, "linePrefix", self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(code);
		return headDelimiterBefore(code);
	}
	/**
	* Before delimiter row, after optional whitespace.
	*
	* Reused when a `|` is found later, to parse another cell.
	*
	* ```markdown
	*   | | a |
	* > | | - |
	*     ^
	*   | | b |
	* ```
	*
	* @type {State}
	*/
	function headDelimiterBefore(code) {
		if (code === 45 || code === 58) return headDelimiterValueBefore(code);
		if (code === 124) {
			seen = true;
			effects.enter("tableCellDivider");
			effects.consume(code);
			effects.exit("tableCellDivider");
			return headDelimiterCellBefore;
		}
		return headDelimiterNok(code);
	}
	/**
	* After `|`, before delimiter cell.
	*
	* ```markdown
	*   | | a |
	* > | | - |
	*      ^
	* ```
	*
	* @type {State}
	*/
	function headDelimiterCellBefore(code) {
		if (markdownSpace(code)) return factorySpace(effects, headDelimiterValueBefore, "whitespace")(code);
		return headDelimiterValueBefore(code);
	}
	/**
	* Before delimiter cell value.
	*
	* ```markdown
	*   | | a |
	* > | | - |
	*       ^
	* ```
	*
	* @type {State}
	*/
	function headDelimiterValueBefore(code) {
		if (code === 58) {
			sizeB += 1;
			seen = true;
			effects.enter("tableDelimiterMarker");
			effects.consume(code);
			effects.exit("tableDelimiterMarker");
			return headDelimiterLeftAlignmentAfter;
		}
		if (code === 45) {
			sizeB += 1;
			return headDelimiterLeftAlignmentAfter(code);
		}
		if (code === null || markdownLineEnding(code)) return headDelimiterCellAfter(code);
		return headDelimiterNok(code);
	}
	/**
	* After delimiter cell left alignment marker.
	*
	* ```markdown
	*   | | a  |
	* > | | :- |
	*        ^
	* ```
	*
	* @type {State}
	*/
	function headDelimiterLeftAlignmentAfter(code) {
		if (code === 45) {
			effects.enter("tableDelimiterFiller");
			return headDelimiterFiller(code);
		}
		return headDelimiterNok(code);
	}
	/**
	* In delimiter cell filler.
	*
	* ```markdown
	*   | | a |
	* > | | - |
	*       ^
	* ```
	*
	* @type {State}
	*/
	function headDelimiterFiller(code) {
		if (code === 45) {
			effects.consume(code);
			return headDelimiterFiller;
		}
		if (code === 58) {
			seen = true;
			effects.exit("tableDelimiterFiller");
			effects.enter("tableDelimiterMarker");
			effects.consume(code);
			effects.exit("tableDelimiterMarker");
			return headDelimiterRightAlignmentAfter;
		}
		effects.exit("tableDelimiterFiller");
		return headDelimiterRightAlignmentAfter(code);
	}
	/**
	* After delimiter cell right alignment marker.
	*
	* ```markdown
	*   | |  a |
	* > | | -: |
	*         ^
	* ```
	*
	* @type {State}
	*/
	function headDelimiterRightAlignmentAfter(code) {
		if (markdownSpace(code)) return factorySpace(effects, headDelimiterCellAfter, "whitespace")(code);
		return headDelimiterCellAfter(code);
	}
	/**
	* After delimiter cell.
	*
	* ```markdown
	*   | |  a |
	* > | | -: |
	*          ^
	* ```
	*
	* @type {State}
	*/
	function headDelimiterCellAfter(code) {
		if (code === 124) return headDelimiterBefore(code);
		if (code === null || markdownLineEnding(code)) {
			if (!seen || size !== sizeB) return headDelimiterNok(code);
			effects.exit("tableDelimiterRow");
			effects.exit("tableHead");
			return ok(code);
		}
		return headDelimiterNok(code);
	}
	/**
	* In delimiter row, at a disallowed byte.
	*
	* ```markdown
	*   | | a |
	* > | | x |
	*       ^
	* ```
	*
	* @type {State}
	*/
	function headDelimiterNok(code) {
		return nok(code);
	}
	/**
	* Before table body row.
	*
	* ```markdown
	*   | | a |
	*   | | - |
	* > | | b |
	*     ^
	* ```
	*
	* @type {State}
	*/
	function bodyRowStart(code) {
		effects.enter("tableRow");
		return bodyRowBreak(code);
	}
	/**
	* At break in table body row.
	*
	* ```markdown
	*   | | a |
	*   | | - |
	* > | | b |
	*     ^
	*       ^
	*         ^
	* ```
	*
	* @type {State}
	*/
	function bodyRowBreak(code) {
		if (code === 124) {
			effects.enter("tableCellDivider");
			effects.consume(code);
			effects.exit("tableCellDivider");
			return bodyRowBreak;
		}
		if (code === null || markdownLineEnding(code)) {
			effects.exit("tableRow");
			return ok(code);
		}
		if (markdownSpace(code)) return factorySpace(effects, bodyRowBreak, "whitespace")(code);
		effects.enter("data");
		return bodyRowData(code);
	}
	/**
	* In table body row data.
	*
	* ```markdown
	*   | | a |
	*   | | - |
	* > | | b |
	*       ^
	* ```
	*
	* @type {State}
	*/
	function bodyRowData(code) {
		if (code === null || code === 124 || markdownLineEndingOrSpace(code)) {
			effects.exit("data");
			return bodyRowBreak(code);
		}
		effects.consume(code);
		return code === 92 ? bodyRowEscape : bodyRowData;
	}
	/**
	* In table body row escape.
	*
	* ```markdown
	*   | | a    |
	*   | | ---- |
	* > | | b\-c |
	*         ^
	* ```
	*
	* @type {State}
	*/
	function bodyRowEscape(code) {
		if (code === 92 || code === 124) {
			effects.consume(code);
			return bodyRowData;
		}
		return bodyRowData(code);
	}
}
/** @type {Resolver} */
function resolveTable(events, context) {
	let index = -1;
	let inFirstCellAwaitingPipe = true;
	/** @type {RowKind} */
	let rowKind = 0;
	/** @type {Range} */
	let lastCell = [
		0,
		0,
		0,
		0
	];
	/** @type {Range} */
	let cell = [
		0,
		0,
		0,
		0
	];
	let afterHeadAwaitingFirstBodyRow = false;
	let lastTableEnd = 0;
	/** @type {Token | undefined} */
	let currentTable;
	/** @type {Token | undefined} */
	let currentBody;
	/** @type {Token | undefined} */
	let currentCell;
	const map = new EditMap();
	while (++index < events.length) {
		const event = events[index];
		const token = event[1];
		if (event[0] === "enter") {
			if (token.type === "tableHead") {
				afterHeadAwaitingFirstBodyRow = false;
				if (lastTableEnd !== 0) {
					flushTableEnd(map, context, lastTableEnd, currentTable, currentBody);
					currentBody = void 0;
					lastTableEnd = 0;
				}
				currentTable = {
					type: "table",
					start: Object.assign({}, token.start),
					end: Object.assign({}, token.end)
				};
				map.add(index, 0, [[
					"enter",
					currentTable,
					context
				]]);
			} else if (token.type === "tableRow" || token.type === "tableDelimiterRow") {
				inFirstCellAwaitingPipe = true;
				currentCell = void 0;
				lastCell = [
					0,
					0,
					0,
					0
				];
				cell = [
					0,
					index + 1,
					0,
					0
				];
				if (afterHeadAwaitingFirstBodyRow) {
					afterHeadAwaitingFirstBodyRow = false;
					currentBody = {
						type: "tableBody",
						start: Object.assign({}, token.start),
						end: Object.assign({}, token.end)
					};
					map.add(index, 0, [[
						"enter",
						currentBody,
						context
					]]);
				}
				rowKind = token.type === "tableDelimiterRow" ? 2 : currentBody ? 3 : 1;
			} else if (rowKind && (token.type === "data" || token.type === "tableDelimiterMarker" || token.type === "tableDelimiterFiller")) {
				inFirstCellAwaitingPipe = false;
				if (cell[2] === 0) {
					if (lastCell[1] !== 0) {
						cell[0] = cell[1];
						currentCell = flushCell(map, context, lastCell, rowKind, void 0, currentCell);
						lastCell = [
							0,
							0,
							0,
							0
						];
					}
					cell[2] = index;
				}
			} else if (token.type === "tableCellDivider") if (inFirstCellAwaitingPipe) inFirstCellAwaitingPipe = false;
			else {
				if (lastCell[1] !== 0) {
					cell[0] = cell[1];
					currentCell = flushCell(map, context, lastCell, rowKind, void 0, currentCell);
				}
				lastCell = cell;
				cell = [
					lastCell[1],
					index,
					0,
					0
				];
			}
		} else if (token.type === "tableHead") {
			afterHeadAwaitingFirstBodyRow = true;
			lastTableEnd = index;
		} else if (token.type === "tableRow" || token.type === "tableDelimiterRow") {
			lastTableEnd = index;
			if (lastCell[1] !== 0) {
				cell[0] = cell[1];
				currentCell = flushCell(map, context, lastCell, rowKind, index, currentCell);
			} else if (cell[1] !== 0) currentCell = flushCell(map, context, cell, rowKind, index, currentCell);
			rowKind = 0;
		} else if (rowKind && (token.type === "data" || token.type === "tableDelimiterMarker" || token.type === "tableDelimiterFiller")) cell[3] = index;
	}
	if (lastTableEnd !== 0) flushTableEnd(map, context, lastTableEnd, currentTable, currentBody);
	map.consume(context.events);
	index = -1;
	while (++index < context.events.length) {
		const event = context.events[index];
		if (event[0] === "enter" && event[1].type === "table") event[1]._align = gfmTableAlign(context.events, index);
	}
	return events;
}
/**
* Generate a cell.
*
* @param {EditMap} map
* @param {Readonly<TokenizeContext>} context
* @param {Readonly<Range>} range
* @param {RowKind} rowKind
* @param {number | undefined} rowEnd
* @param {Token | undefined} previousCell
* @returns {Token | undefined}
*/
function flushCell(map, context, range, rowKind, rowEnd, previousCell) {
	const groupName = rowKind === 1 ? "tableHeader" : rowKind === 2 ? "tableDelimiter" : "tableData";
	const valueName = "tableContent";
	if (range[0] !== 0) {
		previousCell.end = Object.assign({}, getPoint(context.events, range[0]));
		map.add(range[0], 0, [[
			"exit",
			previousCell,
			context
		]]);
	}
	const now = getPoint(context.events, range[1]);
	previousCell = {
		type: groupName,
		start: Object.assign({}, now),
		end: Object.assign({}, now)
	};
	map.add(range[1], 0, [[
		"enter",
		previousCell,
		context
	]]);
	if (range[2] !== 0) {
		const relatedStart = getPoint(context.events, range[2]);
		const relatedEnd = getPoint(context.events, range[3]);
		/** @type {Token} */
		const valueToken = {
			type: valueName,
			start: Object.assign({}, relatedStart),
			end: Object.assign({}, relatedEnd)
		};
		map.add(range[2], 0, [[
			"enter",
			valueToken,
			context
		]]);
		if (rowKind !== 2) {
			const start = context.events[range[2]];
			const end = context.events[range[3]];
			start[1].end = Object.assign({}, end[1].end);
			start[1].type = "chunkText";
			start[1].contentType = "text";
			if (range[3] > range[2] + 1) {
				const a = range[2] + 1;
				const b = range[3] - range[2] - 1;
				map.add(a, b, []);
			}
		}
		map.add(range[3] + 1, 0, [[
			"exit",
			valueToken,
			context
		]]);
	}
	if (rowEnd !== void 0) {
		previousCell.end = Object.assign({}, getPoint(context.events, rowEnd));
		map.add(rowEnd, 0, [[
			"exit",
			previousCell,
			context
		]]);
		previousCell = void 0;
	}
	return previousCell;
}
/**
* Generate table end (and table body end).
*
* @param {Readonly<EditMap>} map
* @param {Readonly<TokenizeContext>} context
* @param {number} index
* @param {Token} table
* @param {Token | undefined} tableBody
*/
function flushTableEnd(map, context, index, table, tableBody) {
	/** @type {Array<Event>} */
	const exits = [];
	const related = getPoint(context.events, index);
	if (tableBody) {
		tableBody.end = Object.assign({}, related);
		exits.push([
			"exit",
			tableBody,
			context
		]);
	}
	table.end = Object.assign({}, related);
	exits.push([
		"exit",
		table,
		context
	]);
	map.add(index + 1, 0, exits);
}
/**
* @param {Readonly<Array<Event>>} events
* @param {number} index
* @returns {Readonly<Point>}
*/
function getPoint(events, index) {
	const event = events[index];
	const side = event[0] === "enter" ? "start" : "end";
	return event[1][side];
}
//#endregion
//#region ../../node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js
/**
* @import {Extension, State, TokenizeContext, Tokenizer} from 'micromark-util-types'
*/
var tasklistCheck = {
	name: "tasklistCheck",
	tokenize: tokenizeTasklistCheck
};
/**
* Create an HTML extension for `micromark` to support GFM task list items
* syntax.
*
* @returns {Extension}
*   Extension for `micromark` that can be passed in `htmlExtensions` to
*   support GFM task list items when serializing to HTML.
*/
function gfmTaskListItem() {
	return { text: { [91]: tasklistCheck } };
}
/**
* @this {TokenizeContext}
* @type {Tokenizer}
*/
function tokenizeTasklistCheck(effects, ok, nok) {
	const self = this;
	return open;
	/**
	* At start of task list item check.
	*
	* ```markdown
	* > | * [x] y.
	*       ^
	* ```
	*
	* @type {State}
	*/
	function open(code) {
		if (self.previous !== null || !self._gfmTasklistFirstContentOfListItem) return nok(code);
		effects.enter("taskListCheck");
		effects.enter("taskListCheckMarker");
		effects.consume(code);
		effects.exit("taskListCheckMarker");
		return inside;
	}
	/**
	* In task list item check.
	*
	* ```markdown
	* > | * [x] y.
	*        ^
	* ```
	*
	* @type {State}
	*/
	function inside(code) {
		if (markdownLineEndingOrSpace(code)) {
			effects.enter("taskListCheckValueUnchecked");
			effects.consume(code);
			effects.exit("taskListCheckValueUnchecked");
			return close;
		}
		if (code === 88 || code === 120) {
			effects.enter("taskListCheckValueChecked");
			effects.consume(code);
			effects.exit("taskListCheckValueChecked");
			return close;
		}
		return nok(code);
	}
	/**
	* At close of task list item check.
	*
	* ```markdown
	* > | * [x] y.
	*         ^
	* ```
	*
	* @type {State}
	*/
	function close(code) {
		if (code === 93) {
			effects.enter("taskListCheckMarker");
			effects.consume(code);
			effects.exit("taskListCheckMarker");
			effects.exit("taskListCheck");
			return after;
		}
		return nok(code);
	}
	/**
	* @type {State}
	*/
	function after(code) {
		if (markdownLineEnding(code)) return ok(code);
		if (markdownSpace(code)) return effects.check({ tokenize: spaceThenNonSpace }, ok, nok)(code);
		return nok(code);
	}
}
/**
* @this {TokenizeContext}
* @type {Tokenizer}
*/
function spaceThenNonSpace(effects, ok, nok) {
	return factorySpace(effects, after, "whitespace");
	/**
	* After whitespace, after task list item check.
	*
	* ```markdown
	* > | * [x] y.
	*           ^
	* ```
	*
	* @type {State}
	*/
	function after(code) {
		return code === null ? nok(code) : ok(code);
	}
}
//#endregion
//#region ../../node_modules/micromark-extension-gfm/index.js
/**
* @typedef {import('micromark-extension-gfm-footnote').HtmlOptions} HtmlOptions
* @typedef {import('micromark-extension-gfm-strikethrough').Options} Options
* @typedef {import('micromark-util-types').Extension} Extension
* @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension
*/
/**
* Create an extension for `micromark` to enable GFM syntax.
*
* @param {Options | null | undefined} [options]
*   Configuration (optional).
*
*   Passed to `micromark-extens-gfm-strikethrough`.
* @returns {Extension}
*   Extension for `micromark` that can be passed in `extensions` to enable GFM
*   syntax.
*/
function gfm(options) {
	return combineExtensions([
		gfmAutolinkLiteral(),
		gfmFootnote(),
		gfmStrikethrough(options),
		gfmTable(),
		gfmTaskListItem()
	]);
}
//#endregion
//#region ../../node_modules/remark-gfm/lib/index.js
/**
* @import {Root} from 'mdast'
* @import {Options} from 'remark-gfm'
* @import {} from 'remark-parse'
* @import {} from 'remark-stringify'
* @import {Processor} from 'unified'
*/
/** @type {Options} */
var emptyOptions = {};
/**
* Add support GFM (autolink literals, footnotes, strikethrough, tables,
* tasklists).
*
* @param {Options | null | undefined} [options]
*   Configuration (optional).
* @returns {undefined}
*   Nothing.
*/
function remarkGfm(options) {
	const self = this;
	const settings = options || emptyOptions;
	const data = self.data();
	const micromarkExtensions = data.micromarkExtensions || (data.micromarkExtensions = []);
	const fromMarkdownExtensions = data.fromMarkdownExtensions || (data.fromMarkdownExtensions = []);
	const toMarkdownExtensions = data.toMarkdownExtensions || (data.toMarkdownExtensions = []);
	micromarkExtensions.push(gfm(settings));
	fromMarkdownExtensions.push(gfmFromMarkdown());
	toMarkdownExtensions.push(gfmToMarkdown(settings));
}
//#endregion
//#region ../../node_modules/mdast-util-newline-to-break/lib/index.js
/**
* @typedef {import('mdast').Nodes} Nodes
* @typedef {import('mdast-util-find-and-replace').ReplaceFunction} ReplaceFunction
*/
/**
* Turn normal line endings into hard breaks.
*
* @param {Nodes} tree
*   Tree to change.
* @returns {undefined}
*   Nothing.
*/
function newlineToBreak(tree) {
	findAndReplace(tree, [/\r?\n|\r/g, replace]);
}
/**
* Replace line endings.
*
* @type {ReplaceFunction}
*/
function replace() {
	return { type: "break" };
}
//#endregion
//#region src/util/markdown.ts
function sequentialNewlinesPlugin() {
	const data = this.data();
	function add(field, value) {
		(data[field] ? data[field] : data[field] = []).push(value);
	}
	add("fromMarkdownExtensions", {
		enter: { lineEndingBlank: function enterLineEndingBlank(token) {
			this.enter({
				type: "break",
				value: "",
				data: {},
				children: []
			}, token);
		} },
		exit: { lineEndingBlank: function exitLineEndingBlank(token) {
			this.exit(token);
		} }
	});
}
function remarkBreaks() {
	return newlineToBreak;
}
var markdownBaseStyles = css({
	overflowWrap: "break-word",
	"& p": {
		margin: 0,
		":not(:first-child)": { marginTop: "0.25rem" }
	},
	"& ul, & ol": {
		listStylePosition: "inside",
		margin: 0,
		paddingLeft: 0
	},
	"&>* ul, &>* ol": { marginLeft: "1.5rem" },
	"& li>p": { display: "contents" },
	"& blockquote": {
		paddingLeft: "0.75rem",
		borderLeft: "3px solid " + theme.markdownDark,
		margin: 0
	},
	"& hr": {
		borderTop: "none",
		borderLeft: "none",
		borderRight: "none",
		borderBottom: "1px solid " + theme.markdownNormal
	},
	"& code": {
		backgroundColor: theme.markdownLight,
		padding: "0.1rem 0.5rem",
		borderRadius: "0.25rem"
	},
	"& pre": {
		padding: "0.5rem",
		backgroundColor: theme.markdownLight,
		textAlign: "left",
		borderRadius: "0.5rem",
		margin: 0,
		":not(:first-child)": { marginTop: "0.25rem" },
		"& code": {
			background: "inherit",
			padding: 0,
			borderRadius: 0
		}
	},
	"& table, & th, & td": { border: "1px solid " + theme.markdownNormal },
	"& table": {
		borderCollapse: "collapse",
		wordBreak: "break-word"
	},
	"& td": { padding: "0.25rem 0.75rem" },
	"& h3": styles.mediumText
});
//#endregion
//#region src/components/Notes.tsx
var remarkPlugins = [
	sequentialNewlinesPlugin,
	remarkGfm,
	remarkBreaks
];
var markdownStyles = css(markdownBaseStyles, {
	display: "block",
	maxWidth: 350,
	padding: 8
});
function Notes(t0) {
	const $ = (0, import_compiler_runtime.c)(12);
	const { notes, editable, focused, onChange, onBlur, getStyle } = t0;
	const { isNarrowWidth } = useResponsive();
	const { t } = useTranslation();
	const textAreaRef = (0, import_react.useRef)(null);
	let t1;
	let t2;
	if ($[0] !== editable || $[1] !== focused) {
		t1 = () => {
			if (focused && editable) textAreaRef.current?.focus();
		};
		t2 = [focused, editable];
		$[0] = editable;
		$[1] = focused;
		$[2] = t1;
		$[3] = t2;
	} else {
		t1 = $[2];
		t2 = $[3];
	}
	(0, import_react.useEffect)(t1, t2);
	let t3;
	if ($[4] !== editable || $[5] !== getStyle || $[6] !== isNarrowWidth || $[7] !== notes || $[8] !== onBlur || $[9] !== onChange || $[10] !== t) {
		t3 = editable ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("textarea", {
			ref: textAreaRef,
			className: css({
				border: "1px solid " + theme.buttonNormalBorder,
				padding: 7,
				...!isNarrowWidth && {
					minWidth: 350,
					minHeight: 120
				},
				outline: "none",
				backgroundColor: theme.tableBackground,
				color: theme.tableText,
				...getStyle?.(editable)
			}),
			value: notes || "",
			onChange: (e) => onChange?.(e.target.value),
			onBlur: (e_0) => onBlur?.(e_0.target.value),
			placeholder: t("Notes (markdown supported)")
		}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
			className: css([markdownStyles, getStyle?.(false)]),
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Markdown, {
				remarkPlugins,
				rehypePlugins: [[rehypeExternalLinks, {
					target: "_blank",
					rel: ["noopener", "noreferrer"]
				}]],
				children: notes
			})
		});
		$[4] = editable;
		$[5] = getStyle;
		$[6] = isNarrowWidth;
		$[7] = notes;
		$[8] = onBlur;
		$[9] = onChange;
		$[10] = t;
		$[11] = t3;
	} else t3 = $[11];
	return t3;
}
//#endregion
//#region src/components/NotesButton.tsx
function NotesButton(t0) {
	const $ = (0, import_compiler_runtime.c)(45);
	const { id, width: t1, height: t2, defaultColor: t3, tooltipPosition: t4, showPlaceholder: t5, style } = t0;
	const width = t1 === void 0 ? 12 : t1;
	const height = t2 === void 0 ? 12 : t2;
	const defaultColor = t3 === void 0 ? theme.buttonNormalText : t3;
	const tooltipPosition = t4 === void 0 ? "bottom start" : t4;
	const showPlaceholder = t5 === void 0 ? false : t5;
	const { t } = useTranslation();
	const triggerRef = (0, import_react.useRef)(null);
	const [isOpen, setIsOpen] = (0, import_react.useState)(false);
	const note = useNotes(id) || "";
	const hasNotes = note && note !== "";
	const [tempNotes, setTempNotes] = (0, import_react.useState)(note);
	let t6;
	if ($[0] !== note) {
		t6 = () => setTempNotes(note);
		$[0] = note;
		$[1] = t6;
	} else t6 = $[1];
	let t7;
	if ($[2] !== id || $[3] !== note) {
		t7 = [note, id];
		$[2] = id;
		$[3] = note;
		$[4] = t7;
	} else t7 = $[4];
	(0, import_react.useEffect)(t6, t7);
	let t8;
	if ($[5] !== id || $[6] !== note || $[7] !== tempNotes) {
		t8 = (isOpen_0) => {
			if (!isOpen_0) {
				if (tempNotes !== note) send("notes-save", {
					id,
					note: tempNotes
				});
				setIsOpen(false);
			}
		};
		$[5] = id;
		$[6] = note;
		$[7] = tempNotes;
		$[8] = t8;
	} else t8 = $[8];
	const onOpenChange = t8;
	let t9;
	if ($[9] !== note) {
		t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Notes, { notes: note });
		$[9] = note;
		$[10] = t9;
	} else t9 = $[10];
	const t10 = !hasNotes || isOpen;
	let t11;
	if ($[11] !== t10) {
		t11 = { isDisabled: t10 };
		$[11] = t10;
		$[12] = t11;
	} else t11 = $[12];
	let t12;
	if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
		t12 = { flexShrink: 0 };
		$[13] = t12;
	} else t12 = $[13];
	let t13;
	if ($[14] !== t) {
		t13 = t("View notes");
		$[14] = t;
		$[15] = t13;
	} else t13 = $[15];
	let t14;
	if ($[16] !== defaultColor || $[17] !== hasNotes || $[18] !== isOpen || $[19] !== showPlaceholder || $[20] !== style) {
		t14 = cx(css({
			color: defaultColor,
			...style,
			padding: 4,
			...showPlaceholder && { opacity: hasNotes || isOpen ? 1 : .3 },
			...isOpen && { color: theme.buttonNormalText },
			"&:hover": { opacity: 1 }
		}), !hasNotes && !isOpen && !showPlaceholder ? "hover-visible" : "");
		$[16] = defaultColor;
		$[17] = hasNotes;
		$[18] = isOpen;
		$[19] = showPlaceholder;
		$[20] = style;
		$[21] = t14;
	} else t14 = $[21];
	let t15;
	if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
		t15 = () => {
			setIsOpen(true);
		};
		$[22] = t15;
	} else t15 = $[22];
	let t16;
	if ($[23] !== height || $[24] !== width) {
		t16 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgCustomNotesPaper, { style: {
			width,
			height,
			flexShrink: 0
		} });
		$[23] = height;
		$[24] = width;
		$[25] = t16;
	} else t16 = $[25];
	let t17;
	if ($[26] !== showPlaceholder || $[27] !== t13 || $[28] !== t14 || $[29] !== t16) {
		t17 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t12,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
				ref: triggerRef,
				variant: "bare",
				"aria-label": t13,
				className: t14,
				"data-placeholder": showPlaceholder,
				onPress: t15,
				children: t16
			})
		});
		$[26] = showPlaceholder;
		$[27] = t13;
		$[28] = t14;
		$[29] = t16;
		$[30] = t17;
	} else t17 = $[30];
	let t18;
	if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
		t18 = { padding: 4 };
		$[31] = t18;
	} else t18 = $[31];
	let t19;
	if ($[32] !== tempNotes) {
		t19 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Notes, {
			notes: tempNotes,
			editable: true,
			focused: true,
			onChange: setTempNotes
		});
		$[32] = tempNotes;
		$[33] = t19;
	} else t19 = $[33];
	let t20;
	if ($[34] !== isOpen || $[35] !== onOpenChange || $[36] !== t19 || $[37] !== tooltipPosition) {
		t20 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Popover, {
			triggerRef,
			isOpen,
			onOpenChange,
			placement: tooltipPosition,
			style: t18,
			children: t19
		});
		$[34] = isOpen;
		$[35] = onOpenChange;
		$[36] = t19;
		$[37] = tooltipPosition;
		$[38] = t20;
	} else t20 = $[38];
	let t21;
	if ($[39] !== t11 || $[40] !== t17 || $[41] !== t20 || $[42] !== t9 || $[43] !== tooltipPosition) {
		t21 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Tooltip, {
			content: t9,
			placement: tooltipPosition,
			triggerProps: t11,
			children: [t17, t20]
		});
		$[39] = t11;
		$[40] = t17;
		$[41] = t20;
		$[42] = t9;
		$[43] = tooltipPosition;
		$[44] = t21;
	} else t21 = $[44];
	return t21;
}
//#endregion
//#region src/hooks/useSchedules.ts
function loadStatuses(schedules, onData, onError, upcomingLength = "7") {
	return liveQuery(getHasTransactionsQuery(schedules), {
		onData: (data) => {
			const hasTrans = new Set(data.filter(Boolean).map((row) => row.schedule));
			const scheduleStatuses = new Map(schedules.map((s) => [s.id, getStatus(s.next_date, s.completed, hasTrans.has(s.id), s.custom_upcoming_length ?? upcomingLength)]));
			onData?.(scheduleStatuses);
		},
		onError
	});
}
function useSchedules({ query } = {}) {
	const [isLoading, setIsLoading] = (0, import_react.useState)(true);
	const [error, setError] = (0, import_react.useState)(void 0);
	const [data, setData] = (0, import_react.useState)({
		schedules: [],
		statuses: /* @__PURE__ */ new Map(),
		statusLabels: /* @__PURE__ */ new Map()
	});
	const [upcomingLength] = useSyncedPref("upcomingScheduledTransactionLength");
	const scheduleQueryRef = (0, import_react.useRef)(null);
	const statusQueryRef = (0, import_react.useRef)(null);
	(0, import_react.useEffect)(() => {
		let isUnmounted = false;
		setError(void 0);
		if (!query) return;
		function onError(error) {
			if (!isUnmounted) {
				setError(error);
				setIsLoading(false);
			}
		}
		if (query.state.table !== "schedules") {
			onError(/* @__PURE__ */ new Error("Query must be a schedules query."));
			return;
		}
		setIsLoading(true);
		scheduleQueryRef.current = liveQuery(query, {
			onData: async (schedules) => {
				statusQueryRef.current = loadStatuses(schedules, (statuses) => {
					if (!isUnmounted) {
						setData({
							schedules,
							statuses,
							statusLabels: new Map([...statuses.keys()].map((key) => [key, getStatusLabel(statuses.get(key) || "")]))
						});
						setIsLoading(false);
					}
				}, onError, upcomingLength);
			},
			onError
		});
		return () => {
			isUnmounted = true;
			scheduleQueryRef.current?.unsubscribe();
			statusQueryRef.current?.unsubscribe();
		};
	}, [query, upcomingLength]);
	return {
		isLoading,
		error,
		...data
	};
}
function getSchedulesQuery(view) {
	const filterByAccount = accountFilter(view, "_account");
	const filterByPayee = accountFilter(view, "_payee.transfer_acct");
	let query = q$1("schedules").select("*").filter({ $and: [{ "_account.closed": false }] });
	if (view) if (view === "uncategorized") query = query.filter({ next_date: null });
	else query = query.filter({ $or: [filterByAccount, filterByPayee] });
	return query.orderBy({ next_date: "desc" });
}
//#endregion
//#region src/hooks/useCachedSchedules.tsx
var SchedulesContext = (0, import_react.createContext)(void 0);
function SchedulesProvider(t0) {
	const $ = (0, import_compiler_runtime.c)(5);
	const { query, children } = t0;
	let t1;
	if ($[0] !== query) {
		t1 = { query };
		$[0] = query;
		$[1] = t1;
	} else t1 = $[1];
	const data = useSchedules(t1);
	let t2;
	if ($[2] !== children || $[3] !== data) {
		t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SchedulesContext.Provider, {
			value: data,
			children
		});
		$[2] = children;
		$[3] = data;
		$[4] = t2;
	} else t2 = $[4];
	return t2;
}
function useCachedSchedules() {
	const context = (0, import_react.useContext)(SchedulesContext);
	if (!context) throw new Error("useCachedSchedules must be used within a SchedulesProvider");
	return context;
}
//#endregion
//#region src/hooks/useCategoryScheduleGoalTemplates.ts
function useCategoryScheduleGoalTemplates({ category }) {
	const isGoalTemplatesEnabled = useFeatureFlag("goalTemplatesEnabled");
	const { schedules: allSchedules, statuses: allStatuses, statusLabels: allStatusLabels } = useCachedSchedules();
	return (0, import_react.useMemo)(() => {
		if (!isGoalTemplatesEnabled || !category || !category.goal_def) return {
			schedules: [],
			statuses: /* @__PURE__ */ new Map(),
			statusLabels: /* @__PURE__ */ new Map()
		};
		let goalDefinitions = [];
		try {
			goalDefinitions = JSON.parse(category.goal_def);
		} catch (e) {
			console.error("Failed to parse category goal_def:", e);
			return {
				schedules: [],
				statuses: /* @__PURE__ */ new Map(),
				statusLabels: /* @__PURE__ */ new Map()
			};
		}
		const scheduleGoalDefinitions = goalDefinitions.filter((g) => g.type === "schedule");
		if (!scheduleGoalDefinitions.length) return {
			schedules: [],
			statuses: /* @__PURE__ */ new Map(),
			statusLabels: /* @__PURE__ */ new Map()
		};
		const schedules = allSchedules.filter((s) => scheduleGoalDefinitions.some((g) => g.name === s.name));
		const scheduleIds = new Set(schedules.map((s) => s.id));
		return {
			schedules,
			statuses: new Map([...allStatuses].filter(([id]) => scheduleIds.has(id))),
			statusLabels: new Map([...allStatusLabels].filter(([id]) => scheduleIds.has(id)))
		};
	}, [
		allSchedules,
		allStatusLabels,
		allStatuses,
		category,
		isGoalTemplatesEnabled
	]);
}
//#endregion
//#region ../../node_modules/date-fns/locale/af/_lib/formatDistance.js
var formatDistanceLocale$82 = {
	lessThanXSeconds: {
		one: "minder as 'n sekonde",
		other: "minder as {{count}} sekondes"
	},
	xSeconds: {
		one: "1 sekonde",
		other: "{{count}} sekondes"
	},
	halfAMinute: "'n halwe minuut",
	lessThanXMinutes: {
		one: "minder as 'n minuut",
		other: "minder as {{count}} minute"
	},
	xMinutes: {
		one: "'n minuut",
		other: "{{count}} minute"
	},
	aboutXHours: {
		one: "ongeveer 1 uur",
		other: "ongeveer {{count}} ure"
	},
	xHours: {
		one: "1 uur",
		other: "{{count}} ure"
	},
	xDays: {
		one: "1 dag",
		other: "{{count}} dae"
	},
	aboutXWeeks: {
		one: "ongeveer 1 week",
		other: "ongeveer {{count}} weke"
	},
	xWeeks: {
		one: "1 week",
		other: "{{count}} weke"
	},
	aboutXMonths: {
		one: "ongeveer 1 maand",
		other: "ongeveer {{count}} maande"
	},
	xMonths: {
		one: "1 maand",
		other: "{{count}} maande"
	},
	aboutXYears: {
		one: "ongeveer 1 jaar",
		other: "ongeveer {{count}} jaar"
	},
	xYears: {
		one: "1 jaar",
		other: "{{count}} jaar"
	},
	overXYears: {
		one: "meer as 1 jaar",
		other: "meer as {{count}} jaar"
	},
	almostXYears: {
		one: "byna 1 jaar",
		other: "byna {{count}} jaar"
	}
};
var formatDistance$83 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$82[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "oor " + result;
	else return result + " gelede";
	return result;
};
var formatLong$91 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, d MMMM yyyy",
			long: "d MMMM yyyy",
			medium: "d MMM yyyy",
			short: "yyyy/MM/dd"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'om' {{time}}",
			long: "{{date}} 'om' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/af/_lib/formatRelative.js
var formatRelativeLocale$83 = {
	lastWeek: "'verlede' eeee 'om' p",
	yesterday: "'gister om' p",
	today: "'vandag om' p",
	tomorrow: "'môre om' p",
	nextWeek: "eeee 'om' p",
	other: "P"
};
var formatRelative$83 = (token, _date, _baseDate, _options) => formatRelativeLocale$83[token];
//#endregion
//#region ../../node_modules/date-fns/locale/af/_lib/localize.js
var eraValues$83 = {
	narrow: ["vC", "nC"],
	abbreviated: ["vC", "nC"],
	wide: ["voor Christus", "na Christus"]
};
var quarterValues$83 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"K1",
		"K2",
		"K3",
		"K4"
	],
	wide: [
		"1ste kwartaal",
		"2de kwartaal",
		"3de kwartaal",
		"4de kwartaal"
	]
};
var monthValues$83 = {
	narrow: [
		"J",
		"F",
		"M",
		"A",
		"M",
		"J",
		"J",
		"A",
		"S",
		"O",
		"N",
		"D"
	],
	abbreviated: [
		"Jan",
		"Feb",
		"Mrt",
		"Apr",
		"Mei",
		"Jun",
		"Jul",
		"Aug",
		"Sep",
		"Okt",
		"Nov",
		"Des"
	],
	wide: [
		"Januarie",
		"Februarie",
		"Maart",
		"April",
		"Mei",
		"Junie",
		"Julie",
		"Augustus",
		"September",
		"Oktober",
		"November",
		"Desember"
	]
};
var dayValues$83 = {
	narrow: [
		"S",
		"M",
		"D",
		"W",
		"D",
		"V",
		"S"
	],
	short: [
		"So",
		"Ma",
		"Di",
		"Wo",
		"Do",
		"Vr",
		"Sa"
	],
	abbreviated: [
		"Son",
		"Maa",
		"Din",
		"Woe",
		"Don",
		"Vry",
		"Sat"
	],
	wide: [
		"Sondag",
		"Maandag",
		"Dinsdag",
		"Woensdag",
		"Donderdag",
		"Vrydag",
		"Saterdag"
	]
};
var dayPeriodValues$83 = {
	narrow: {
		am: "vm",
		pm: "nm",
		midnight: "middernag",
		noon: "middaguur",
		morning: "oggend",
		afternoon: "middag",
		evening: "laat middag",
		night: "aand"
	},
	abbreviated: {
		am: "vm",
		pm: "nm",
		midnight: "middernag",
		noon: "middaguur",
		morning: "oggend",
		afternoon: "middag",
		evening: "laat middag",
		night: "aand"
	},
	wide: {
		am: "vm",
		pm: "nm",
		midnight: "middernag",
		noon: "middaguur",
		morning: "oggend",
		afternoon: "middag",
		evening: "laat middag",
		night: "aand"
	}
};
var formattingDayPeriodValues$67 = {
	narrow: {
		am: "vm",
		pm: "nm",
		midnight: "middernag",
		noon: "uur die middag",
		morning: "uur die oggend",
		afternoon: "uur die middag",
		evening: "uur die aand",
		night: "uur die aand"
	},
	abbreviated: {
		am: "vm",
		pm: "nm",
		midnight: "middernag",
		noon: "uur die middag",
		morning: "uur die oggend",
		afternoon: "uur die middag",
		evening: "uur die aand",
		night: "uur die aand"
	},
	wide: {
		am: "vm",
		pm: "nm",
		midnight: "middernag",
		noon: "uur die middag",
		morning: "uur die oggend",
		afternoon: "uur die middag",
		evening: "uur die aand",
		night: "uur die aand"
	}
};
var ordinalNumber$83 = (dirtyNumber) => {
	const number = Number(dirtyNumber);
	const rem100 = number % 100;
	if (rem100 < 20) switch (rem100) {
		case 1:
		case 8: return number + "ste";
		default: return number + "de";
	}
	return number + "ste";
};
//#endregion
//#region ../../node_modules/date-fns/locale/af.js
/**
* @category Locales
* @summary Afrikaans locale.
* @language Afrikaans
* @iso-639-2 afr
* @author Marnus Weststrate [@marnusw](https://github.com/marnusw)
*/
var af = {
	code: "af",
	formatDistance: formatDistance$83,
	formatLong: formatLong$91,
	formatRelative: formatRelative$83,
	localize: {
		ordinalNumber: ordinalNumber$83,
		era: buildLocalizeFn({
			values: eraValues$83,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$83,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$83,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$83,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$83,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$67,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(ste|de)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^([vn]\.? ?C\.?)/,
				abbreviated: /^([vn]\. ?C\.?)/,
				wide: /^((voor|na) Christus)/
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^v/, /^n/] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^K[1234]/i,
				wide: /^[1234](st|d)e kwartaal/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[jfmasond]/i,
				abbreviated: /^(Jan|Feb|Mrt|Apr|Mei|Jun|Jul|Aug|Sep|Okt|Nov|Dec)\.?/i,
				wide: /^(Januarie|Februarie|Maart|April|Mei|Junie|Julie|Augustus|September|Oktober|November|Desember)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^J/i,
					/^F/i,
					/^M/i,
					/^A/i,
					/^M/i,
					/^J/i,
					/^J/i,
					/^A/i,
					/^S/i,
					/^O/i,
					/^N/i,
					/^D/i
				],
				any: [
					/^Jan/i,
					/^Feb/i,
					/^Mrt/i,
					/^Apr/i,
					/^Mei/i,
					/^Jun/i,
					/^Jul/i,
					/^Aug/i,
					/^Sep/i,
					/^Okt/i,
					/^Nov/i,
					/^Dec/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[smdwv]/i,
				short: /^(So|Ma|Di|Wo|Do|Vr|Sa)/i,
				abbreviated: /^(Son|Maa|Din|Woe|Don|Vry|Sat)/i,
				wide: /^(Sondag|Maandag|Dinsdag|Woensdag|Donderdag|Vrydag|Saterdag)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^S/i,
					/^M/i,
					/^D/i,
					/^W/i,
					/^D/i,
					/^V/i,
					/^S/i
				],
				any: [
					/^So/i,
					/^Ma/i,
					/^Di/i,
					/^Wo/i,
					/^Do/i,
					/^Vr/i,
					/^Sa/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: { any: /^(vm|nm|middernag|(?:uur )?die (oggend|middag|aand))/i },
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^vm/i,
				pm: /^nm/i,
				midnight: /^middernag/i,
				noon: /^middaguur/i,
				morning: /oggend/i,
				afternoon: /middag/i,
				evening: /laat middag/i,
				night: /aand/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 0,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/ar/_lib/formatDistance.js
var formatDistanceLocale$81 = {
	lessThanXSeconds: {
		one: "أقل من ثانية",
		two: "أقل من ثانيتين",
		threeToTen: "أقل من {{count}} ثواني",
		other: "أقل من {{count}} ثانية"
	},
	xSeconds: {
		one: "ثانية واحدة",
		two: "ثانيتان",
		threeToTen: "{{count}} ثواني",
		other: "{{count}} ثانية"
	},
	halfAMinute: "نصف دقيقة",
	lessThanXMinutes: {
		one: "أقل من دقيقة",
		two: "أقل من دقيقتين",
		threeToTen: "أقل من {{count}} دقائق",
		other: "أقل من {{count}} دقيقة"
	},
	xMinutes: {
		one: "دقيقة واحدة",
		two: "دقيقتان",
		threeToTen: "{{count}} دقائق",
		other: "{{count}} دقيقة"
	},
	aboutXHours: {
		one: "ساعة واحدة تقريباً",
		two: "ساعتين تقريبا",
		threeToTen: "{{count}} ساعات تقريباً",
		other: "{{count}} ساعة تقريباً"
	},
	xHours: {
		one: "ساعة واحدة",
		two: "ساعتان",
		threeToTen: "{{count}} ساعات",
		other: "{{count}} ساعة"
	},
	xDays: {
		one: "يوم واحد",
		two: "يومان",
		threeToTen: "{{count}} أيام",
		other: "{{count}} يوم"
	},
	aboutXWeeks: {
		one: "أسبوع واحد تقريبا",
		two: "أسبوعين تقريبا",
		threeToTen: "{{count}} أسابيع تقريبا",
		other: "{{count}} أسبوعا تقريبا"
	},
	xWeeks: {
		one: "أسبوع واحد",
		two: "أسبوعان",
		threeToTen: "{{count}} أسابيع",
		other: "{{count}} أسبوعا"
	},
	aboutXMonths: {
		one: "شهر واحد تقريباً",
		two: "شهرين تقريبا",
		threeToTen: "{{count}} أشهر تقريبا",
		other: "{{count}} شهرا تقريباً"
	},
	xMonths: {
		one: "شهر واحد",
		two: "شهران",
		threeToTen: "{{count}} أشهر",
		other: "{{count}} شهرا"
	},
	aboutXYears: {
		one: "سنة واحدة تقريباً",
		two: "سنتين تقريبا",
		threeToTen: "{{count}} سنوات تقريباً",
		other: "{{count}} سنة تقريباً"
	},
	xYears: {
		one: "سنة واحد",
		two: "سنتان",
		threeToTen: "{{count}} سنوات",
		other: "{{count}} سنة"
	},
	overXYears: {
		one: "أكثر من سنة",
		two: "أكثر من سنتين",
		threeToTen: "أكثر من {{count}} سنوات",
		other: "أكثر من {{count}} سنة"
	},
	almostXYears: {
		one: "ما يقارب سنة واحدة",
		two: "ما يقارب سنتين",
		threeToTen: "ما يقارب {{count}} سنوات",
		other: "ما يقارب {{count}} سنة"
	}
};
var formatDistance$82 = (token, count, options) => {
	const usageGroup = formatDistanceLocale$81[token];
	let result;
	if (typeof usageGroup === "string") result = usageGroup;
	else if (count === 1) result = usageGroup.one;
	else if (count === 2) result = usageGroup.two;
	else if (count <= 10) result = usageGroup.threeToTen.replace("{{count}}", String(count));
	else result = usageGroup.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "خلال " + result;
	else return "منذ " + result;
	return result;
};
var formatLong$90 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE، do MMMM y",
			long: "do MMMM y",
			medium: "d MMM y",
			short: "dd/MM/yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss",
			long: "HH:mm:ss",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'عند الساعة' {{time}}",
			long: "{{date}} 'عند الساعة' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/ar/_lib/formatRelative.js
var formatRelativeLocale$82 = {
	lastWeek: "eeee 'الماضي عند الساعة' p",
	yesterday: "'الأمس عند الساعة' p",
	today: "'اليوم عند الساعة' p",
	tomorrow: "'غدا عند الساعة' p",
	nextWeek: "eeee 'القادم عند الساعة' p",
	other: "P"
};
var formatRelative$82 = (token) => formatRelativeLocale$82[token];
//#endregion
//#region ../../node_modules/date-fns/locale/ar/_lib/localize.js
var eraValues$82 = {
	narrow: ["ق", "ب"],
	abbreviated: ["ق.م.", "ب.م."],
	wide: ["قبل الميلاد", "بعد الميلاد"]
};
var quarterValues$82 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"ر1",
		"ر2",
		"ر3",
		"ر4"
	],
	wide: [
		"الربع الأول",
		"الربع الثاني",
		"الربع الثالث",
		"الربع الرابع"
	]
};
var monthValues$82 = {
	narrow: [
		"ي",
		"ف",
		"م",
		"أ",
		"م",
		"ي",
		"ي",
		"أ",
		"س",
		"أ",
		"ن",
		"د"
	],
	abbreviated: [
		"يناير",
		"فبراير",
		"مارس",
		"أبريل",
		"مايو",
		"يونيو",
		"يوليو",
		"أغسطس",
		"سبتمبر",
		"أكتوبر",
		"نوفمبر",
		"ديسمبر"
	],
	wide: [
		"يناير",
		"فبراير",
		"مارس",
		"أبريل",
		"مايو",
		"يونيو",
		"يوليو",
		"أغسطس",
		"سبتمبر",
		"أكتوبر",
		"نوفمبر",
		"ديسمبر"
	]
};
var dayValues$82 = {
	narrow: [
		"ح",
		"ن",
		"ث",
		"ر",
		"خ",
		"ج",
		"س"
	],
	short: [
		"أحد",
		"اثنين",
		"ثلاثاء",
		"أربعاء",
		"خميس",
		"جمعة",
		"سبت"
	],
	abbreviated: [
		"أحد",
		"اثنين",
		"ثلاثاء",
		"أربعاء",
		"خميس",
		"جمعة",
		"سبت"
	],
	wide: [
		"الأحد",
		"الاثنين",
		"الثلاثاء",
		"الأربعاء",
		"الخميس",
		"الجمعة",
		"السبت"
	]
};
var dayPeriodValues$82 = {
	narrow: {
		am: "ص",
		pm: "م",
		morning: "الصباح",
		noon: "الظهر",
		afternoon: "بعد الظهر",
		evening: "المساء",
		night: "الليل",
		midnight: "منتصف الليل"
	},
	abbreviated: {
		am: "ص",
		pm: "م",
		morning: "الصباح",
		noon: "الظهر",
		afternoon: "بعد الظهر",
		evening: "المساء",
		night: "الليل",
		midnight: "منتصف الليل"
	},
	wide: {
		am: "ص",
		pm: "م",
		morning: "الصباح",
		noon: "الظهر",
		afternoon: "بعد الظهر",
		evening: "المساء",
		night: "الليل",
		midnight: "منتصف الليل"
	}
};
var formattingDayPeriodValues$66 = {
	narrow: {
		am: "ص",
		pm: "م",
		morning: "في الصباح",
		noon: "الظهر",
		afternoon: "بعد الظهر",
		evening: "في المساء",
		night: "في الليل",
		midnight: "منتصف الليل"
	},
	abbreviated: {
		am: "ص",
		pm: "م",
		morning: "في الصباح",
		noon: "الظهر",
		afternoon: "بعد الظهر",
		evening: "في المساء",
		night: "في الليل",
		midnight: "منتصف الليل"
	},
	wide: {
		am: "ص",
		pm: "م",
		morning: "في الصباح",
		noon: "الظهر",
		afternoon: "بعد الظهر",
		evening: "في المساء",
		night: "في الليل",
		midnight: "منتصف الليل"
	}
};
var ordinalNumber$82 = (num) => String(num);
//#endregion
//#region ../../node_modules/date-fns/locale/ar.js
/**
* @category Locales
* @summary Arabic locale (Modern Standard Arabic - Al-fussha).
* @language Modern Standard Arabic
* @iso-639-2 ara
* @author Abdallah Hassan [@AbdallahAHO](https://github.com/AbdallahAHO)
* @author Koussay Haj Kacem [@essana3](https://github.com/essana3)
*/
var ar = {
	code: "ar",
	formatDistance: formatDistance$82,
	formatLong: formatLong$90,
	formatRelative: formatRelative$82,
	localize: {
		ordinalNumber: ordinalNumber$82,
		era: buildLocalizeFn({
			values: eraValues$82,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$82,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$82,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$82,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$82,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$66,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(th|st|nd|rd)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /[قب]/,
				abbreviated: /[قب]\.م\./,
				wide: /(قبل|بعد) الميلاد/
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/قبل/, /بعد/] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /ر[1234]/,
				wide: /الربع (الأول|الثاني|الثالث|الرابع)/
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[أيفمسند]/,
				abbreviated: /^(يناير|فبراير|مارس|أبريل|مايو|يونيو|يوليو|أغسطس|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/,
				wide: /^(يناير|فبراير|مارس|أبريل|مايو|يونيو|يوليو|أغسطس|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ي/i,
					/^ف/i,
					/^م/i,
					/^أ/i,
					/^م/i,
					/^ي/i,
					/^ي/i,
					/^أ/i,
					/^س/i,
					/^أ/i,
					/^ن/i,
					/^د/i
				],
				any: [
					/^يناير/i,
					/^فبراير/i,
					/^مارس/i,
					/^أبريل/i,
					/^مايو/i,
					/^يونيو/i,
					/^يوليو/i,
					/^أغسطس/i,
					/^سبتمبر/i,
					/^أكتوبر/i,
					/^نوفمبر/i,
					/^ديسمبر/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[حنثرخجس]/i,
				short: /^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,
				abbreviated: /^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,
				wide: /^(الأحد|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ح/i,
					/^ن/i,
					/^ث/i,
					/^ر/i,
					/^خ/i,
					/^ج/i,
					/^س/i
				],
				wide: [
					/^الأحد/i,
					/^الاثنين/i,
					/^الثلاثاء/i,
					/^الأربعاء/i,
					/^الخميس/i,
					/^الجمعة/i,
					/^السبت/i
				],
				any: [
					/^أح/i,
					/^اث/i,
					/^ث/i,
					/^أر/i,
					/^خ/i,
					/^ج/i,
					/^س/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(ص|م|منتصف الليل|الظهر|بعد الظهر|في الصباح|في المساء|في الليل)/,
				any: /^(ص|م|منتصف الليل|الظهر|بعد الظهر|في الصباح|في المساء|في الليل)/
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^ص/,
				pm: /^م/,
				midnight: /منتصف الليل/,
				noon: /الظهر/,
				afternoon: /بعد الظهر/,
				morning: /في الصباح/,
				evening: /في المساء/,
				night: /في الليل/
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 6,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/ar-DZ/_lib/formatDistance.js
var formatDistanceLocale$80 = {
	lessThanXSeconds: {
		one: "أقل من ثانية واحدة",
		two: "أقل من ثانتين",
		threeToTen: "أقل من {{count}} ثواني",
		other: "أقل من {{count}} ثانية"
	},
	xSeconds: {
		one: "ثانية واحدة",
		two: "ثانتين",
		threeToTen: "{{count}} ثواني",
		other: "{{count}} ثانية"
	},
	halfAMinute: "نصف دقيقة",
	lessThanXMinutes: {
		one: "أقل من دقيقة",
		two: "أقل من دقيقتين",
		threeToTen: "أقل من {{count}} دقائق",
		other: "أقل من {{count}} دقيقة"
	},
	xMinutes: {
		one: "دقيقة واحدة",
		two: "دقيقتين",
		threeToTen: "{{count}} دقائق",
		other: "{{count}} دقيقة"
	},
	aboutXHours: {
		one: "ساعة واحدة تقريباً",
		two: "ساعتين تقريباً",
		threeToTen: "{{count}} ساعات تقريباً",
		other: "{{count}} ساعة تقريباً"
	},
	xHours: {
		one: "ساعة واحدة",
		two: "ساعتين",
		threeToTen: "{{count}} ساعات",
		other: "{{count}} ساعة"
	},
	xDays: {
		one: "يوم واحد",
		two: "يومين",
		threeToTen: "{{count}} أيام",
		other: "{{count}} يوم"
	},
	aboutXWeeks: {
		one: "أسبوع واحد تقريباً",
		two: "أسبوعين تقريباً",
		threeToTen: "{{count}} أسابيع تقريباً",
		other: "{{count}} أسبوع تقريباً"
	},
	xWeeks: {
		one: "أسبوع واحد",
		two: "أسبوعين",
		threeToTen: "{{count}} أسابيع",
		other: "{{count}} أسبوع"
	},
	aboutXMonths: {
		one: "شهر واحد تقريباً",
		two: "شهرين تقريباً",
		threeToTen: "{{count}} أشهر تقريباً",
		other: "{{count}} شهر تقريباً"
	},
	xMonths: {
		one: "شهر واحد",
		two: "شهرين",
		threeToTen: "{{count}} أشهر",
		other: "{{count}} شهر"
	},
	aboutXYears: {
		one: "عام واحد تقريباً",
		two: "عامين تقريباً",
		threeToTen: "{{count}} أعوام تقريباً",
		other: "{{count}} عام تقريباً"
	},
	xYears: {
		one: "عام واحد",
		two: "عامين",
		threeToTen: "{{count}} أعوام",
		other: "{{count}} عام"
	},
	overXYears: {
		one: "أكثر من عام",
		two: "أكثر من عامين",
		threeToTen: "أكثر من {{count}} أعوام",
		other: "أكثر من {{count}} عام"
	},
	almostXYears: {
		one: "عام واحد تقريباً",
		two: "عامين تقريباً",
		threeToTen: "{{count}} أعوام تقريباً",
		other: "{{count}} عام تقريباً"
	}
};
var formatDistance$81 = (token, count, options) => {
	options = options || {};
	const usageGroup = formatDistanceLocale$80[token];
	let result;
	if (typeof usageGroup === "string") result = usageGroup;
	else if (count === 1) result = usageGroup.one;
	else if (count === 2) result = usageGroup.two;
	else if (count <= 10) result = usageGroup.threeToTen.replace("{{count}}", String(count));
	else result = usageGroup.other.replace("{{count}}", String(count));
	if (options.addSuffix) if (options.comparison && options.comparison > 0) return "في خلال " + result;
	else return "منذ " + result;
	return result;
};
var formatLong$89 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, MMMM do, y",
			long: "MMMM do, y",
			medium: "MMM d, y",
			short: "MM/dd/yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "h:mm:ss a zzzz",
			long: "h:mm:ss a z",
			medium: "h:mm:ss a",
			short: "h:mm a"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'عند' {{time}}",
			long: "{{date}} 'عند' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/ar-DZ/_lib/formatRelative.js
var formatRelativeLocale$81 = {
	lastWeek: "'أخر' eeee 'عند' p",
	yesterday: "'أمس عند' p",
	today: "'اليوم عند' p",
	tomorrow: "'غداً عند' p",
	nextWeek: "eeee 'عند' p",
	other: "P"
};
var formatRelative$81 = (token, _date, _baseDate, _options) => {
	return formatRelativeLocale$81[token];
};
//#endregion
//#region ../../node_modules/date-fns/locale/ar-DZ/_lib/localize.js
var eraValues$81 = {
	narrow: ["ق", "ب"],
	abbreviated: ["ق.م.", "ب.م."],
	wide: ["قبل الميلاد", "بعد الميلاد"]
};
var quarterValues$81 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"ر1",
		"ر2",
		"ر3",
		"ر4"
	],
	wide: [
		"الربع الأول",
		"الربع الثاني",
		"الربع الثالث",
		"الربع الرابع"
	]
};
var monthValues$81 = {
	narrow: [
		"ج",
		"ف",
		"م",
		"أ",
		"م",
		"ج",
		"ج",
		"أ",
		"س",
		"أ",
		"ن",
		"د"
	],
	abbreviated: [
		"جانـ",
		"فيفـ",
		"مارس",
		"أفريل",
		"مايـ",
		"جوانـ",
		"جويـ",
		"أوت",
		"سبتـ",
		"أكتـ",
		"نوفـ",
		"ديسـ"
	],
	wide: [
		"جانفي",
		"فيفري",
		"مارس",
		"أفريل",
		"ماي",
		"جوان",
		"جويلية",
		"أوت",
		"سبتمبر",
		"أكتوبر",
		"نوفمبر",
		"ديسمبر"
	]
};
var dayValues$81 = {
	narrow: [
		"ح",
		"ن",
		"ث",
		"ر",
		"خ",
		"ج",
		"س"
	],
	short: [
		"أحد",
		"اثنين",
		"ثلاثاء",
		"أربعاء",
		"خميس",
		"جمعة",
		"سبت"
	],
	abbreviated: [
		"أحد",
		"اثنـ",
		"ثلا",
		"أربـ",
		"خميـ",
		"جمعة",
		"سبت"
	],
	wide: [
		"الأحد",
		"الاثنين",
		"الثلاثاء",
		"الأربعاء",
		"الخميس",
		"الجمعة",
		"السبت"
	]
};
var dayPeriodValues$81 = {
	narrow: {
		am: "ص",
		pm: "م",
		midnight: "ن",
		noon: "ظ",
		morning: "صباحاً",
		afternoon: "بعد الظهر",
		evening: "مساءاً",
		night: "ليلاً"
	},
	abbreviated: {
		am: "ص",
		pm: "م",
		midnight: "نصف الليل",
		noon: "ظهر",
		morning: "صباحاً",
		afternoon: "بعد الظهر",
		evening: "مساءاً",
		night: "ليلاً"
	},
	wide: {
		am: "ص",
		pm: "م",
		midnight: "نصف الليل",
		noon: "ظهر",
		morning: "صباحاً",
		afternoon: "بعد الظهر",
		evening: "مساءاً",
		night: "ليلاً"
	}
};
var formattingDayPeriodValues$65 = {
	narrow: {
		am: "ص",
		pm: "م",
		midnight: "ن",
		noon: "ظ",
		morning: "في الصباح",
		afternoon: "بعد الظـهر",
		evening: "في المساء",
		night: "في الليل"
	},
	abbreviated: {
		am: "ص",
		pm: "م",
		midnight: "نصف الليل",
		noon: "ظهر",
		morning: "في الصباح",
		afternoon: "بعد الظهر",
		evening: "في المساء",
		night: "في الليل"
	},
	wide: {
		am: "ص",
		pm: "م",
		midnight: "نصف الليل",
		noon: "ظهر",
		morning: "صباحاً",
		afternoon: "بعد الظـهر",
		evening: "في المساء",
		night: "في الليل"
	}
};
var ordinalNumber$81 = (dirtyNumber) => {
	return String(dirtyNumber);
};
//#endregion
//#region ../../node_modules/date-fns/locale/ar-DZ.js
/**
* @category Locales
* @summary Arabic locale (Algerian Arabic).
* @language Algerian Arabic
* @iso-639-2 ara
* @author Badreddine Boumaza [@badre429](https://github.com/badre429)
* @author Ahmed ElShahat [@elshahat](https://github.com/elshahat)
*/
var arDZ = {
	code: "ar-DZ",
	formatDistance: formatDistance$81,
	formatLong: formatLong$89,
	formatRelative: formatRelative$81,
	localize: {
		ordinalNumber: ordinalNumber$81,
		era: buildLocalizeFn({
			values: eraValues$81,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$81,
			defaultWidth: "wide",
			argumentCallback: (quarter) => Number(quarter) - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$81,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$81,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$81,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$65,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(th|st|nd|rd)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(ق|ب)/i,
				abbreviated: /^(ق\.?\s?م\.?|ق\.?\s?م\.?\s?|a\.?\s?d\.?|c\.?\s?)/i,
				wide: /^(قبل الميلاد|قبل الميلاد|بعد الميلاد|بعد الميلاد)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^قبل/i, /^بعد/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^ر[1234]/i,
				wide: /^الربع [1234]/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => Number(index) + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[جفمأسند]/i,
				abbreviated: /^(جان|فيف|مار|أفر|ماي|جوا|جوي|أوت|سبت|أكت|نوف|ديس)/i,
				wide: /^(جانفي|فيفري|مارس|أفريل|ماي|جوان|جويلية|أوت|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ج/i,
					/^ف/i,
					/^م/i,
					/^أ/i,
					/^م/i,
					/^ج/i,
					/^ج/i,
					/^أ/i,
					/^س/i,
					/^أ/i,
					/^ن/i,
					/^د/i
				],
				any: [
					/^جان/i,
					/^فيف/i,
					/^مار/i,
					/^أفر/i,
					/^ماي/i,
					/^جوا/i,
					/^جوي/i,
					/^أوت/i,
					/^سبت/i,
					/^أكت/i,
					/^نوف/i,
					/^ديس/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[حنثرخجس]/i,
				short: /^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,
				abbreviated: /^(أحد|اثن|ثلا|أرب|خمي|جمعة|سبت)/i,
				wide: /^(الأحد|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ح/i,
					/^ن/i,
					/^ث/i,
					/^ر/i,
					/^خ/i,
					/^ج/i,
					/^س/i
				],
				wide: [
					/^الأحد/i,
					/^الاثنين/i,
					/^الثلاثاء/i,
					/^الأربعاء/i,
					/^الخميس/i,
					/^الجمعة/i,
					/^السبت/i
				],
				any: [
					/^أح/i,
					/^اث/i,
					/^ث/i,
					/^أر/i,
					/^خ/i,
					/^ج/i,
					/^س/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
				any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a/i,
				pm: /^p/i,
				midnight: /^mi/i,
				noon: /^no/i,
				morning: /morning/i,
				afternoon: /afternoon/i,
				evening: /evening/i,
				night: /night/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 0,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/ar-EG/_lib/formatDistance.js
var formatDistanceLocale$79 = {
	lessThanXSeconds: {
		one: "أقل من ثانية",
		two: "أقل من ثانيتين",
		threeToTen: "أقل من {{count}} ثواني",
		other: "أقل من {{count}} ثانية"
	},
	xSeconds: {
		one: "ثانية",
		two: "ثانيتين",
		threeToTen: "{{count}} ثواني",
		other: "{{count}} ثانية"
	},
	halfAMinute: "نص دقيقة",
	lessThanXMinutes: {
		one: "أقل من دقيقة",
		two: "أقل من دقيقتين",
		threeToTen: "أقل من {{count}} دقايق",
		other: "أقل من {{count}} دقيقة"
	},
	xMinutes: {
		one: "دقيقة",
		two: "دقيقتين",
		threeToTen: "{{count}} دقايق",
		other: "{{count}} دقيقة"
	},
	aboutXHours: {
		one: "حوالي ساعة",
		two: "حوالي ساعتين",
		threeToTen: "حوالي {{count}} ساعات",
		other: "حوالي {{count}} ساعة"
	},
	xHours: {
		one: "ساعة",
		two: "ساعتين",
		threeToTen: "{{count}} ساعات",
		other: "{{count}} ساعة"
	},
	xDays: {
		one: "يوم",
		two: "يومين",
		threeToTen: "{{count}} أيام",
		other: "{{count}} يوم"
	},
	aboutXWeeks: {
		one: "حوالي أسبوع",
		two: "حوالي أسبوعين",
		threeToTen: "حوالي {{count}} أسابيع",
		other: "حوالي {{count}} أسبوع"
	},
	xWeeks: {
		one: "أسبوع",
		two: "أسبوعين",
		threeToTen: "{{count}} أسابيع",
		other: "{{count}} أسبوع"
	},
	aboutXMonths: {
		one: "حوالي شهر",
		two: "حوالي شهرين",
		threeToTen: "حوالي {{count}} أشهر",
		other: "حوالي {{count}} شهر"
	},
	xMonths: {
		one: "شهر",
		two: "شهرين",
		threeToTen: "{{count}} أشهر",
		other: "{{count}} شهر"
	},
	aboutXYears: {
		one: "حوالي سنة",
		two: "حوالي سنتين",
		threeToTen: "حوالي {{count}} سنين",
		other: "حوالي {{count}} سنة"
	},
	xYears: {
		one: "عام",
		two: "عامين",
		threeToTen: "{{count}} أعوام",
		other: "{{count}} عام"
	},
	overXYears: {
		one: "أكثر من سنة",
		two: "أكثر من سنتين",
		threeToTen: "أكثر من {{count}} سنين",
		other: "أكثر من {{count}} سنة"
	},
	almostXYears: {
		one: "عام تقريبًا",
		two: "عامين تقريبًا",
		threeToTen: "{{count}} أعوام تقريبًا",
		other: "{{count}} عام تقريبًا"
	}
};
var formatDistance$80 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$79[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else if (count === 2) result = tokenValue.two;
	else if (count <= 10) result = tokenValue.threeToTen.replace("{{count}}", String(count));
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return `في خلال ${result}`;
	else return `منذ ${result}`;
	return result;
};
var formatLong$88 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE، do MMMM y",
			long: "do MMMM y",
			medium: "dd/MMM/y",
			short: "d/MM/y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "h:mm:ss a zzzz",
			long: "h:mm:ss a z",
			medium: "h:mm:ss a",
			short: "h:mm a"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'الساعة' {{time}}",
			long: "{{date}} 'الساعة' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/ar-EG/_lib/formatRelative.js
var formatRelativeLocale$80 = {
	lastWeek: "eeee 'اللي جاي الساعة' p",
	yesterday: "'إمبارح الساعة' p",
	today: "'النهاردة الساعة' p",
	tomorrow: "'بكرة الساعة' p",
	nextWeek: "eeee 'الساعة' p",
	other: "P"
};
var formatRelative$80 = (token, _date, _baseDate, _options) => formatRelativeLocale$80[token];
//#endregion
//#region ../../node_modules/date-fns/locale/ar-EG/_lib/localize.js
var eraValues$80 = {
	narrow: ["ق", "ب"],
	abbreviated: ["ق.م", "ب.م"],
	wide: ["قبل الميلاد", "بعد الميلاد"]
};
var quarterValues$80 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"ر1",
		"ر2",
		"ر3",
		"ر4"
	],
	wide: [
		"الربع الأول",
		"الربع الثاني",
		"الربع الثالث",
		"الربع الرابع"
	]
};
var monthValues$80 = {
	narrow: [
		"ي",
		"ف",
		"م",
		"أ",
		"م",
		"ي",
		"ي",
		"أ",
		"س",
		"أ",
		"ن",
		"د"
	],
	abbreviated: [
		"ينا",
		"فبر",
		"مارس",
		"أبريل",
		"مايو",
		"يونـ",
		"يولـ",
		"أغسـ",
		"سبتـ",
		"أكتـ",
		"نوفـ",
		"ديسـ"
	],
	wide: [
		"يناير",
		"فبراير",
		"مارس",
		"أبريل",
		"مايو",
		"يونيو",
		"يوليو",
		"أغسطس",
		"سبتمبر",
		"أكتوبر",
		"نوفمبر",
		"ديسمبر"
	]
};
var dayValues$80 = {
	narrow: [
		"ح",
		"ن",
		"ث",
		"ر",
		"خ",
		"ج",
		"س"
	],
	short: [
		"أحد",
		"اثنين",
		"ثلاثاء",
		"أربعاء",
		"خميس",
		"جمعة",
		"سبت"
	],
	abbreviated: [
		"أحد",
		"اثنين",
		"ثلاثاء",
		"أربعاء",
		"خميس",
		"جمعة",
		"سبت"
	],
	wide: [
		"الأحد",
		"الاثنين",
		"الثلاثاء",
		"الأربعاء",
		"الخميس",
		"الجمعة",
		"السبت"
	]
};
var dayPeriodValues$80 = {
	narrow: {
		am: "ص",
		pm: "م",
		midnight: "ن",
		noon: "ظ",
		morning: "صباحاً",
		afternoon: "بعد الظهر",
		evening: "مساءً",
		night: "ليلاً"
	},
	abbreviated: {
		am: "ص",
		pm: "م",
		midnight: "نصف الليل",
		noon: "ظهراً",
		morning: "صباحاً",
		afternoon: "بعد الظهر",
		evening: "مساءً",
		night: "ليلاً"
	},
	wide: {
		am: "ص",
		pm: "م",
		midnight: "نصف الليل",
		noon: "ظهراً",
		morning: "صباحاً",
		afternoon: "بعد الظهر",
		evening: "مساءً",
		night: "ليلاً"
	}
};
var formattingDayPeriodValues$64 = {
	narrow: {
		am: "ص",
		pm: "م",
		midnight: "ن",
		noon: "ظ",
		morning: "في الصباح",
		afternoon: "بعد الظهر",
		evening: "في المساء",
		night: "في الليل"
	},
	abbreviated: {
		am: "ص",
		pm: "م",
		midnight: "نصف الليل",
		noon: "ظهراً",
		morning: "في الصباح",
		afternoon: "بعد الظهر",
		evening: "في المساء",
		night: "في الليل"
	},
	wide: {
		am: "ص",
		pm: "م",
		midnight: "نصف الليل",
		morning: "في الصباح",
		noon: "ظهراً",
		afternoon: "بعد الظهر",
		evening: "في المساء",
		night: "في الليل"
	}
};
var ordinalNumber$80 = (dirtyNumber, _options) => {
	return String(dirtyNumber);
};
//#endregion
//#region ../../node_modules/date-fns/locale/ar-EG.js
/**
* @category Locales
* @summary Arabic locale (Egypt).
* @language Arabic
* @iso-639-2 ara
* @author AbdAllah AbdElFattah [@AbdAllahAbdElFattah13](https://github.com/AbdAllahAbdElFattah13)
*/
var arEG = {
	code: "ar-EG",
	formatDistance: formatDistance$80,
	formatLong: formatLong$88,
	formatRelative: formatRelative$80,
	localize: {
		ordinalNumber: ordinalNumber$80,
		era: buildLocalizeFn({
			values: eraValues$80,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$80,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$80,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$80,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$80,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$64,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)/,
			parsePattern: /\d+/i,
			valueCallback: function(value) {
				return parseInt(value, 10);
			}
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(ق|ب)/g,
				abbreviated: /^(ق.م|ب.م)/g,
				wide: /^(قبل الميلاد|بعد الميلاد)/g
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^ق/g, /^ب/g] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/,
				abbreviated: /^ر[1234]/,
				wide: /^الربع (الأول|الثاني|الثالث|الرابع)/
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				wide: [
					/الربع الأول/,
					/الربع الثاني/,
					/الربع الثالث/,
					/الربع الرابع/
				],
				any: [
					/1/,
					/2/,
					/3/,
					/4/
				]
			},
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^(ي|ف|م|أ|س|ن|د)/,
				abbreviated: /^(ينا|فبر|مارس|أبريل|مايو|يونـ|يولـ|أغسـ|سبتـ|أكتـ|نوفـ|ديسـ)/,
				wide: /^(يناير|فبراير|مارس|أبريل|مايو|يونيو|يوليو|أغسطس|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ي/,
					/^ف/,
					/^م/,
					/^أ/,
					/^م/,
					/^ي/,
					/^ي/,
					/^أ/,
					/^س/,
					/^أ/,
					/^ن/,
					/^د/
				],
				any: [
					/^ينا/,
					/^فبر/,
					/^مارس/,
					/^أبريل/,
					/^مايو/,
					/^يون/,
					/^يول/,
					/^أغس/,
					/^سبت/,
					/^أكت/,
					/^نوف/,
					/^ديس/
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^(ح|ن|ث|ر|خ|ج|س)/,
				short: /^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/,
				abbreviated: /^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/,
				wide: /^(الأحد|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ح/,
					/^ن/,
					/^ث/,
					/^ر/,
					/^خ/,
					/^ج/,
					/^س/
				],
				any: [
					/أحد/,
					/اثنين/,
					/ثلاثاء/,
					/أربعاء/,
					/خميس/,
					/جمعة/,
					/سبت/
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(ص|م|ن|ظ|في الصباح|بعد الظهر|في المساء|في الليل)/,
				abbreviated: /^(ص|م|نصف الليل|ظهراً|في الصباح|بعد الظهر|في المساء|في الليل)/,
				wide: /^(ص|م|نصف الليل|في الصباح|ظهراً|بعد الظهر|في المساء|في الليل)/,
				any: /^(ص|م|صباح|ظهر|مساء|ليل)/
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^ص/,
				pm: /^م/,
				midnight: /^ن/,
				noon: /^ظ/,
				morning: /^ص/,
				afternoon: /^بعد/,
				evening: /^م/,
				night: /^ل/
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 0,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/ar-MA/_lib/formatDistance.js
var formatDistanceLocale$78 = {
	lessThanXSeconds: {
		one: "أقل من ثانية واحدة",
		two: "أقل من ثانتين",
		threeToTen: "أقل من {{count}} ثواني",
		other: "أقل من {{count}} ثانية"
	},
	xSeconds: {
		one: "ثانية واحدة",
		two: "ثانتين",
		threeToTen: "{{count}} ثواني",
		other: "{{count}} ثانية"
	},
	halfAMinute: "نصف دقيقة",
	lessThanXMinutes: {
		one: "أقل من دقيقة",
		two: "أقل من دقيقتين",
		threeToTen: "أقل من {{count}} دقائق",
		other: "أقل من {{count}} دقيقة"
	},
	xMinutes: {
		one: "دقيقة واحدة",
		two: "دقيقتين",
		threeToTen: "{{count}} دقائق",
		other: "{{count}} دقيقة"
	},
	aboutXHours: {
		one: "ساعة واحدة تقريباً",
		two: "ساعتين تقريباً",
		threeToTen: "{{count}} ساعات تقريباً",
		other: "{{count}} ساعة تقريباً"
	},
	xHours: {
		one: "ساعة واحدة",
		two: "ساعتين",
		threeToTen: "{{count}} ساعات",
		other: "{{count}} ساعة"
	},
	xDays: {
		one: "يوم واحد",
		two: "يومين",
		threeToTen: "{{count}} أيام",
		other: "{{count}} يوم"
	},
	aboutXWeeks: {
		one: "أسبوع واحد تقريباً",
		two: "أسبوعين تقريباً",
		threeToTen: "{{count}} أسابيع تقريباً",
		other: "{{count}} أسبوع تقريباً"
	},
	xWeeks: {
		one: "أسبوع واحد",
		two: "أسبوعين",
		threeToTen: "{{count}} أسابيع",
		other: "{{count}} أسبوع"
	},
	aboutXMonths: {
		one: "شهر واحد تقريباً",
		two: "شهرين تقريباً",
		threeToTen: "{{count}} أشهر تقريباً",
		other: "{{count}} شهر تقريباً"
	},
	xMonths: {
		one: "شهر واحد",
		two: "شهرين",
		threeToTen: "{{count}} أشهر",
		other: "{{count}} شهر"
	},
	aboutXYears: {
		one: "عام واحد تقريباً",
		two: "عامين تقريباً",
		threeToTen: "{{count}} أعوام تقريباً",
		other: "{{count}} عام تقريباً"
	},
	xYears: {
		one: "عام واحد",
		two: "عامين",
		threeToTen: "{{count}} أعوام",
		other: "{{count}} عام"
	},
	overXYears: {
		one: "أكثر من عام",
		two: "أكثر من عامين",
		threeToTen: "أكثر من {{count}} أعوام",
		other: "أكثر من {{count}} عام"
	},
	almostXYears: {
		one: "عام واحد تقريباً",
		two: "عامين تقريباً",
		threeToTen: "{{count}} أعوام تقريباً",
		other: "{{count}} عام تقريباً"
	}
};
var formatDistance$79 = (token, count, options) => {
	options = options || {};
	const usageGroup = formatDistanceLocale$78[token];
	let result;
	if (typeof usageGroup === "string") result = usageGroup;
	else if (count === 1) result = usageGroup.one;
	else if (count === 2) result = usageGroup.two;
	else if (count <= 10) result = usageGroup.threeToTen.replace("{{count}}", String(count));
	else result = usageGroup.other.replace("{{count}}", String(count));
	if (options.addSuffix) if (options.comparison && options.comparison > 0) return "في خلال " + result;
	else return "منذ " + result;
	return result;
};
var formatLong$87 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, MMMM do, y",
			long: "MMMM do, y",
			medium: "MMM d, y",
			short: "MM/dd/yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "h:mm:ss a zzzz",
			long: "h:mm:ss a z",
			medium: "h:mm:ss a",
			short: "h:mm a"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'عند' {{time}}",
			long: "{{date}} 'عند' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/ar-MA/_lib/formatRelative.js
var formatRelativeLocale$79 = {
	lastWeek: "'أخر' eeee 'عند' p",
	yesterday: "'أمس عند' p",
	today: "'اليوم عند' p",
	tomorrow: "'غداً عند' p",
	nextWeek: "eeee 'عند' p",
	other: "P"
};
var formatRelative$79 = (token, _date, _baseDate, _options) => {
	return formatRelativeLocale$79[token];
};
//#endregion
//#region ../../node_modules/date-fns/locale/ar-MA/_lib/localize.js
var eraValues$79 = {
	narrow: ["ق", "ب"],
	abbreviated: ["ق.م.", "ب.م."],
	wide: ["قبل الميلاد", "بعد الميلاد"]
};
var quarterValues$79 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"ر1",
		"ر2",
		"ر3",
		"ر4"
	],
	wide: [
		"الربع الأول",
		"الربع الثاني",
		"الربع الثالث",
		"الربع الرابع"
	]
};
var monthValues$79 = {
	narrow: [
		"ي",
		"ف",
		"م",
		"أ",
		"م",
		"ي",
		"ي",
		"غ",
		"ش",
		"أ",
		"ن",
		"د"
	],
	abbreviated: [
		"ينا",
		"فبر",
		"مارس",
		"أبريل",
		"ماي",
		"يونـ",
		"يولـ",
		"غشت",
		"شتنـ",
		"أكتـ",
		"نونـ",
		"دجنـ"
	],
	wide: [
		"يناير",
		"فبراير",
		"مارس",
		"أبريل",
		"ماي",
		"يونيو",
		"يوليوز",
		"غشت",
		"شتنبر",
		"أكتوبر",
		"نونبر",
		"دجنبر"
	]
};
var dayValues$79 = {
	narrow: [
		"ح",
		"ن",
		"ث",
		"ر",
		"خ",
		"ج",
		"س"
	],
	short: [
		"أحد",
		"اثنين",
		"ثلاثاء",
		"أربعاء",
		"خميس",
		"جمعة",
		"سبت"
	],
	abbreviated: [
		"أحد",
		"اثنـ",
		"ثلا",
		"أربـ",
		"خميـ",
		"جمعة",
		"سبت"
	],
	wide: [
		"الأحد",
		"الإثنين",
		"الثلاثاء",
		"الأربعاء",
		"الخميس",
		"الجمعة",
		"السبت"
	]
};
var dayPeriodValues$79 = {
	narrow: {
		am: "ص",
		pm: "م",
		midnight: "ن",
		noon: "ظ",
		morning: "صباحاً",
		afternoon: "بعد الظهر",
		evening: "مساءاً",
		night: "ليلاً"
	},
	abbreviated: {
		am: "ص",
		pm: "م",
		midnight: "نصف الليل",
		noon: "ظهر",
		morning: "صباحاً",
		afternoon: "بعد الظهر",
		evening: "مساءاً",
		night: "ليلاً"
	},
	wide: {
		am: "ص",
		pm: "م",
		midnight: "نصف الليل",
		noon: "ظهر",
		morning: "صباحاً",
		afternoon: "بعد الظهر",
		evening: "مساءاً",
		night: "ليلاً"
	}
};
var formattingDayPeriodValues$63 = {
	narrow: {
		am: "ص",
		pm: "م",
		midnight: "ن",
		noon: "ظ",
		morning: "في الصباح",
		afternoon: "بعد الظـهر",
		evening: "في المساء",
		night: "في الليل"
	},
	abbreviated: {
		am: "ص",
		pm: "م",
		midnight: "نصف الليل",
		noon: "ظهر",
		morning: "في الصباح",
		afternoon: "بعد الظهر",
		evening: "في المساء",
		night: "في الليل"
	},
	wide: {
		am: "ص",
		pm: "م",
		midnight: "نصف الليل",
		noon: "ظهر",
		morning: "صباحاً",
		afternoon: "بعد الظـهر",
		evening: "في المساء",
		night: "في الليل"
	}
};
var ordinalNumber$79 = (dirtyNumber) => {
	return String(dirtyNumber);
};
//#endregion
//#region ../../node_modules/date-fns/locale/ar-MA.js
/**
* @category Locales
* @summary Arabic locale (Moroccan Arabic).
* @language Moroccan Arabic
* @iso-639-2 ara
* @author Achraf Rrami [@rramiachraf](https://github.com/rramiachraf)
*/
var arMA = {
	code: "ar-MA",
	formatDistance: formatDistance$79,
	formatLong: formatLong$87,
	formatRelative: formatRelative$79,
	localize: {
		ordinalNumber: ordinalNumber$79,
		era: buildLocalizeFn({
			values: eraValues$79,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$79,
			defaultWidth: "wide",
			argumentCallback: (quarter) => Number(quarter) - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$79,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$79,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$79,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$63,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(th|st|nd|rd)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(ق|ب)/i,
				abbreviated: /^(ق\.?\s?م\.?|ق\.?\s?م\.?\s?|a\.?\s?d\.?|c\.?\s?)/i,
				wide: /^(قبل الميلاد|قبل الميلاد|بعد الميلاد|بعد الميلاد)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^قبل/i, /^بعد/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^ر[1234]/i,
				wide: /^الربع [1234]/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => Number(index) + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[يفمأمسند]/i,
				abbreviated: /^(ين|ف|مار|أب|ماي|يون|يول|غش|شت|أك|ن|د)/i,
				wide: /^(ين|ف|مار|أب|ماي|يون|يول|غش|شت|أك|ن|د)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ي/i,
					/^ف/i,
					/^م/i,
					/^أ/i,
					/^م/i,
					/^ي/i,
					/^ي/i,
					/^غ/i,
					/^ش/i,
					/^أ/i,
					/^ن/i,
					/^د/i
				],
				any: [
					/^ين/i,
					/^فب/i,
					/^مار/i,
					/^أب/i,
					/^ماي/i,
					/^يون/i,
					/^يول/i,
					/^غشت/i,
					/^ش/i,
					/^أك/i,
					/^ن/i,
					/^د/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[حنثرخجس]/i,
				short: /^(أحد|إثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,
				abbreviated: /^(أحد|إثن|ثلا|أرب|خمي|جمعة|سبت)/i,
				wide: /^(الأحد|الإثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ح/i,
					/^ن/i,
					/^ث/i,
					/^ر/i,
					/^خ/i,
					/^ج/i,
					/^س/i
				],
				wide: [
					/^الأحد/i,
					/^الإثنين/i,
					/^الثلاثاء/i,
					/^الأربعاء/i,
					/^الخميس/i,
					/^الجمعة/i,
					/^السبت/i
				],
				any: [
					/^أح/i,
					/^إث/i,
					/^ث/i,
					/^أر/i,
					/^خ/i,
					/^ج/i,
					/^س/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
				any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a/i,
				pm: /^p/i,
				midnight: /^mi/i,
				noon: /^no/i,
				morning: /morning/i,
				afternoon: /afternoon/i,
				evening: /evening/i,
				night: /night/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/ar-SA/_lib/formatDistance.js
var formatDistanceLocale$77 = {
	lessThanXSeconds: {
		one: "أقل من ثانية واحدة",
		two: "أقل من ثانتين",
		threeToTen: "أقل من {{count}} ثواني",
		other: "أقل من {{count}} ثانية"
	},
	xSeconds: {
		one: "ثانية واحدة",
		two: "ثانتين",
		threeToTen: "{{count}} ثواني",
		other: "{{count}} ثانية"
	},
	halfAMinute: "نصف دقيقة",
	lessThanXMinutes: {
		one: "أقل من دقيقة",
		two: "أقل من دقيقتين",
		threeToTen: "أقل من {{count}} دقائق",
		other: "أقل من {{count}} دقيقة"
	},
	xMinutes: {
		one: "دقيقة واحدة",
		two: "دقيقتين",
		threeToTen: "{{count}} دقائق",
		other: "{{count}} دقيقة"
	},
	aboutXHours: {
		one: "ساعة واحدة تقريباً",
		two: "ساعتين تقريباً",
		threeToTen: "{{count}} ساعات تقريباً",
		other: "{{count}} ساعة تقريباً"
	},
	xHours: {
		one: "ساعة واحدة",
		two: "ساعتين",
		threeToTen: "{{count}} ساعات",
		other: "{{count}} ساعة"
	},
	xDays: {
		one: "يوم واحد",
		two: "يومين",
		threeToTen: "{{count}} أيام",
		other: "{{count}} يوم"
	},
	aboutXWeeks: {
		one: "أسبوع واحد تقريباً",
		two: "أسبوعين تقريباً",
		threeToTen: "{{count}} أسابيع تقريباً",
		other: "{{count}} أسبوع تقريباً"
	},
	xWeeks: {
		one: "أسبوع واحد",
		two: "أسبوعين",
		threeToTen: "{{count}} أسابيع",
		other: "{{count}} أسبوع"
	},
	aboutXMonths: {
		one: "شهر واحد تقريباً",
		two: "شهرين تقريباً",
		threeToTen: "{{count}} أشهر تقريباً",
		other: "{{count}} شهر تقريباً"
	},
	xMonths: {
		one: "شهر واحد",
		two: "شهرين",
		threeToTen: "{{count}} أشهر",
		other: "{{count}} شهر"
	},
	aboutXYears: {
		one: "عام واحد تقريباً",
		two: "عامين تقريباً",
		threeToTen: "{{count}} أعوام تقريباً",
		other: "{{count}} عام تقريباً"
	},
	xYears: {
		one: "عام واحد",
		two: "عامين",
		threeToTen: "{{count}} أعوام",
		other: "{{count}} عام"
	},
	overXYears: {
		one: "أكثر من عام",
		two: "أكثر من عامين",
		threeToTen: "أكثر من {{count}} أعوام",
		other: "أكثر من {{count}} عام"
	},
	almostXYears: {
		one: "عام واحد تقريباً",
		two: "عامين تقريباً",
		threeToTen: "{{count}} أعوام تقريباً",
		other: "{{count}} عام تقريباً"
	}
};
var formatDistance$78 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$77[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else if (count === 2) result = tokenValue.two;
	else if (count <= 10) result = tokenValue.threeToTen.replace("{{count}}", String(count));
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "في خلال " + result;
	else return "منذ " + result;
	return result;
};
var formatLong$86 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, MMMM do, y",
			long: "MMMM do, y",
			medium: "MMM d, y",
			short: "MM/dd/yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "h:mm:ss a zzzz",
			long: "h:mm:ss a z",
			medium: "h:mm:ss a",
			short: "h:mm a"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'عند' {{time}}",
			long: "{{date}} 'عند' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/ar-SA/_lib/formatRelative.js
var formatRelativeLocale$78 = {
	lastWeek: "'أخر' eeee 'عند' p",
	yesterday: "'أمس عند' p",
	today: "'اليوم عند' p",
	tomorrow: "'غداً عند' p",
	nextWeek: "eeee 'عند' p",
	other: "P"
};
var formatRelative$78 = (token, _date, _baseDate, _options) => formatRelativeLocale$78[token];
//#endregion
//#region ../../node_modules/date-fns/locale/ar-SA/_lib/localize.js
var eraValues$78 = {
	narrow: ["ق", "ب"],
	abbreviated: ["ق.م.", "ب.م."],
	wide: ["قبل الميلاد", "بعد الميلاد"]
};
var quarterValues$78 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"ر1",
		"ر2",
		"ر3",
		"ر4"
	],
	wide: [
		"الربع الأول",
		"الربع الثاني",
		"الربع الثالث",
		"الربع الرابع"
	]
};
var monthValues$78 = {
	narrow: [
		"ي",
		"ف",
		"م",
		"أ",
		"م",
		"ي",
		"ي",
		"أ",
		"س",
		"أ",
		"ن",
		"د"
	],
	abbreviated: [
		"ينا",
		"فبر",
		"مارس",
		"أبريل",
		"مايو",
		"يونـ",
		"يولـ",
		"أغسـ",
		"سبتـ",
		"أكتـ",
		"نوفـ",
		"ديسـ"
	],
	wide: [
		"يناير",
		"فبراير",
		"مارس",
		"أبريل",
		"مايو",
		"يونيو",
		"يوليو",
		"أغسطس",
		"سبتمبر",
		"أكتوبر",
		"نوفمبر",
		"ديسمبر"
	]
};
var dayValues$78 = {
	narrow: [
		"ح",
		"ن",
		"ث",
		"ر",
		"خ",
		"ج",
		"س"
	],
	short: [
		"أحد",
		"اثنين",
		"ثلاثاء",
		"أربعاء",
		"خميس",
		"جمعة",
		"سبت"
	],
	abbreviated: [
		"أحد",
		"اثنـ",
		"ثلا",
		"أربـ",
		"خميـ",
		"جمعة",
		"سبت"
	],
	wide: [
		"الأحد",
		"الاثنين",
		"الثلاثاء",
		"الأربعاء",
		"الخميس",
		"الجمعة",
		"السبت"
	]
};
var dayPeriodValues$78 = {
	narrow: {
		am: "ص",
		pm: "م",
		midnight: "ن",
		noon: "ظ",
		morning: "صباحاً",
		afternoon: "بعد الظهر",
		evening: "مساءاً",
		night: "ليلاً"
	},
	abbreviated: {
		am: "ص",
		pm: "م",
		midnight: "نصف الليل",
		noon: "ظهر",
		morning: "صباحاً",
		afternoon: "بعد الظهر",
		evening: "مساءاً",
		night: "ليلاً"
	},
	wide: {
		am: "ص",
		pm: "م",
		midnight: "نصف الليل",
		noon: "ظهر",
		morning: "صباحاً",
		afternoon: "بعد الظهر",
		evening: "مساءاً",
		night: "ليلاً"
	}
};
var formattingDayPeriodValues$62 = {
	narrow: {
		am: "ص",
		pm: "م",
		midnight: "ن",
		noon: "ظ",
		morning: "في الصباح",
		afternoon: "بعد الظـهر",
		evening: "في المساء",
		night: "في الليل"
	},
	abbreviated: {
		am: "ص",
		pm: "م",
		midnight: "نصف الليل",
		noon: "ظهر",
		morning: "في الصباح",
		afternoon: "بعد الظهر",
		evening: "في المساء",
		night: "في الليل"
	},
	wide: {
		am: "ص",
		pm: "م",
		midnight: "نصف الليل",
		noon: "ظهر",
		morning: "صباحاً",
		afternoon: "بعد الظـهر",
		evening: "في المساء",
		night: "في الليل"
	}
};
var ordinalNumber$78 = (dirtyNumber) => {
	return String(dirtyNumber);
};
//#endregion
//#region ../../node_modules/date-fns/locale/ar-SA.js
/**
* @category Locales
* @summary Arabic locale (Sauid Arabic).
* @language Arabic
* @iso-639-2 ara
* @author Dhaifallah Alwadani [@dalwadani](https://github.com/dalwadani)
*/
var arSA = {
	code: "ar-SA",
	formatDistance: formatDistance$78,
	formatLong: formatLong$86,
	formatRelative: formatRelative$78,
	localize: {
		ordinalNumber: ordinalNumber$78,
		era: buildLocalizeFn({
			values: eraValues$78,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$78,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$78,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$78,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$78,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$62,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(th|st|nd|rd)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(ق|ب)/i,
				abbreviated: /^(ق\.?\s?م\.?|ق\.?\s?م\.?\s?|a\.?\s?d\.?|c\.?\s?)/i,
				wide: /^(قبل الميلاد|قبل الميلاد|بعد الميلاد|بعد الميلاد)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^قبل/i, /^بعد/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^ر[1234]/i,
				wide: /^الربع [1234]/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[يفمأمسند]/i,
				abbreviated: /^(ين|ف|مار|أب|ماي|يون|يول|أغ|س|أك|ن|د)/i,
				wide: /^(ين|ف|مار|أب|ماي|يون|يول|أغ|س|أك|ن|د)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ي/i,
					/^ف/i,
					/^م/i,
					/^أ/i,
					/^م/i,
					/^ي/i,
					/^ي/i,
					/^أ/i,
					/^س/i,
					/^أ/i,
					/^ن/i,
					/^د/i
				],
				any: [
					/^ين/i,
					/^ف/i,
					/^مار/i,
					/^أب/i,
					/^ماي/i,
					/^يون/i,
					/^يول/i,
					/^أغ/i,
					/^س/i,
					/^أك/i,
					/^ن/i,
					/^د/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[حنثرخجس]/i,
				short: /^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,
				abbreviated: /^(أحد|اثن|ثلا|أرب|خمي|جمعة|سبت)/i,
				wide: /^(الأحد|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ح/i,
					/^ن/i,
					/^ث/i,
					/^ر/i,
					/^خ/i,
					/^ج/i,
					/^س/i
				],
				wide: [
					/^الأحد/i,
					/^الاثنين/i,
					/^الثلاثاء/i,
					/^الأربعاء/i,
					/^الخميس/i,
					/^الجمعة/i,
					/^السبت/i
				],
				any: [
					/^أح/i,
					/^اث/i,
					/^ث/i,
					/^أر/i,
					/^خ/i,
					/^ج/i,
					/^س/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
				any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a/i,
				pm: /^p/i,
				midnight: /^mi/i,
				noon: /^no/i,
				morning: /morning/i,
				afternoon: /afternoon/i,
				evening: /evening/i,
				night: /night/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 0,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/ar-TN/_lib/formatDistance.js
var formatDistanceLocale$76 = {
	lessThanXSeconds: {
		one: "أقل من ثانية",
		two: "أقل من زوز ثواني",
		threeToTen: "أقل من {{count}} ثواني",
		other: "أقل من {{count}} ثانية"
	},
	xSeconds: {
		one: "ثانية",
		two: "زوز ثواني",
		threeToTen: "{{count}} ثواني",
		other: "{{count}} ثانية"
	},
	halfAMinute: "نص دقيقة",
	lessThanXMinutes: {
		one: "أقل من دقيقة",
		two: "أقل من دقيقتين",
		threeToTen: "أقل من {{count}} دقايق",
		other: "أقل من {{count}} دقيقة"
	},
	xMinutes: {
		one: "دقيقة",
		two: "دقيقتين",
		threeToTen: "{{count}} دقايق",
		other: "{{count}} دقيقة"
	},
	aboutXHours: {
		one: "ساعة تقريب",
		two: "ساعتين تقريب",
		threeToTen: "{{count}} سوايع تقريب",
		other: "{{count}} ساعة تقريب"
	},
	xHours: {
		one: "ساعة",
		two: "ساعتين",
		threeToTen: "{{count}} سوايع",
		other: "{{count}} ساعة"
	},
	xDays: {
		one: "نهار",
		two: "نهارين",
		threeToTen: "{{count}} أيام",
		other: "{{count}} يوم"
	},
	aboutXWeeks: {
		one: "جمعة تقريب",
		two: "جمعتين تقريب",
		threeToTen: "{{count}} جماع تقريب",
		other: "{{count}} جمعة تقريب"
	},
	xWeeks: {
		one: "جمعة",
		two: "جمعتين",
		threeToTen: "{{count}} جماع",
		other: "{{count}} جمعة"
	},
	aboutXMonths: {
		one: "شهر تقريب",
		two: "شهرين تقريب",
		threeToTen: "{{count}} أشهرة تقريب",
		other: "{{count}} شهر تقريب"
	},
	xMonths: {
		one: "شهر",
		two: "شهرين",
		threeToTen: "{{count}} أشهرة",
		other: "{{count}} شهر"
	},
	aboutXYears: {
		one: "عام تقريب",
		two: "عامين تقريب",
		threeToTen: "{{count}} أعوام تقريب",
		other: "{{count}} عام تقريب"
	},
	xYears: {
		one: "عام",
		two: "عامين",
		threeToTen: "{{count}} أعوام",
		other: "{{count}} عام"
	},
	overXYears: {
		one: "أكثر من عام",
		two: "أكثر من عامين",
		threeToTen: "أكثر من {{count}} أعوام",
		other: "أكثر من {{count}} عام"
	},
	almostXYears: {
		one: "عام تقريب",
		two: "عامين تقريب",
		threeToTen: "{{count}} أعوام تقريب",
		other: "{{count}} عام تقريب"
	}
};
var formatDistance$77 = (token, count, options) => {
	const usageGroup = formatDistanceLocale$76[token];
	let result;
	if (typeof usageGroup === "string") result = usageGroup;
	else if (count === 1) result = usageGroup.one;
	else if (count === 2) result = usageGroup.two;
	else if (count <= 10) result = usageGroup.threeToTen.replace("{{count}}", String(count));
	else result = usageGroup.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "في " + result;
	else return "عندو " + result;
	return result;
};
var formatLong$85 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE، do MMMM y",
			long: "do MMMM y",
			medium: "d MMM y",
			short: "dd/MM/yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss",
			long: "HH:mm:ss",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'مع' {{time}}",
			long: "{{date}} 'مع' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/ar-TN/_lib/formatRelative.js
var formatRelativeLocale$77 = {
	lastWeek: "eeee 'إلي فات مع' p",
	yesterday: "'البارح مع' p",
	today: "'اليوم مع' p",
	tomorrow: "'غدوة مع' p",
	nextWeek: "eeee 'الجمعة الجاية مع' p 'نهار'",
	other: "P"
};
var formatRelative$77 = (token) => formatRelativeLocale$77[token];
//#endregion
//#region ../../node_modules/date-fns/locale/ar-TN/_lib/localize.js
var eraValues$77 = {
	narrow: ["ق", "ب"],
	abbreviated: ["ق.م.", "ب.م."],
	wide: ["قبل الميلاد", "بعد الميلاد"]
};
var quarterValues$77 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"ر1",
		"ر2",
		"ر3",
		"ر4"
	],
	wide: [
		"الربع الأول",
		"الربع الثاني",
		"الربع الثالث",
		"الربع الرابع"
	]
};
var monthValues$77 = {
	narrow: [
		"د",
		"ن",
		"أ",
		"س",
		"أ",
		"ج",
		"ج",
		"م",
		"أ",
		"م",
		"ف",
		"ج"
	],
	abbreviated: [
		"جانفي",
		"فيفري",
		"مارس",
		"أفريل",
		"ماي",
		"جوان",
		"جويلية",
		"أوت",
		"سبتمبر",
		"أكتوبر",
		"نوفمبر",
		"ديسمبر"
	],
	wide: [
		"جانفي",
		"فيفري",
		"مارس",
		"أفريل",
		"ماي",
		"جوان",
		"جويلية",
		"أوت",
		"سبتمبر",
		"أكتوبر",
		"نوفمبر",
		"ديسمبر"
	]
};
var dayValues$77 = {
	narrow: [
		"ح",
		"ن",
		"ث",
		"ر",
		"خ",
		"ج",
		"س"
	],
	short: [
		"أحد",
		"اثنين",
		"ثلاثاء",
		"أربعاء",
		"خميس",
		"جمعة",
		"سبت"
	],
	abbreviated: [
		"أحد",
		"اثنين",
		"ثلاثاء",
		"أربعاء",
		"خميس",
		"جمعة",
		"سبت"
	],
	wide: [
		"الأحد",
		"الاثنين",
		"الثلاثاء",
		"الأربعاء",
		"الخميس",
		"الجمعة",
		"السبت"
	]
};
var dayPeriodValues$77 = {
	narrow: {
		am: "ص",
		pm: "ع",
		morning: "الصباح",
		noon: "القايلة",
		afternoon: "بعد القايلة",
		evening: "العشية",
		night: "الليل",
		midnight: "نص الليل"
	},
	abbreviated: {
		am: "ص",
		pm: "ع",
		morning: "الصباح",
		noon: "القايلة",
		afternoon: "بعد القايلة",
		evening: "العشية",
		night: "الليل",
		midnight: "نص الليل"
	},
	wide: {
		am: "ص",
		pm: "ع",
		morning: "الصباح",
		noon: "القايلة",
		afternoon: "بعد القايلة",
		evening: "العشية",
		night: "الليل",
		midnight: "نص الليل"
	}
};
var formattingDayPeriodValues$61 = {
	narrow: {
		am: "ص",
		pm: "ع",
		morning: "في الصباح",
		noon: "في القايلة",
		afternoon: "بعد القايلة",
		evening: "في العشية",
		night: "في الليل",
		midnight: "نص الليل"
	},
	abbreviated: {
		am: "ص",
		pm: "ع",
		morning: "في الصباح",
		noon: "في القايلة",
		afternoon: "بعد القايلة",
		evening: "في العشية",
		night: "في الليل",
		midnight: "نص الليل"
	},
	wide: {
		am: "ص",
		pm: "ع",
		morning: "في الصباح",
		noon: "في القايلة",
		afternoon: "بعد القايلة",
		evening: "في العشية",
		night: "في الليل",
		midnight: "نص الليل"
	}
};
var ordinalNumber$77 = (num) => String(num);
//#endregion
//#region ../../node_modules/date-fns/locale/ar-TN.js
/**
* @category Locales
* @summary Arabic locale (Tunisian Arabic).
* @language Arabic
* @iso-639-2 ara
* @author Koussay Haj Kacem [@essana3](https://github.com/essana3)
*/
var arTN = {
	code: "ar-TN",
	formatDistance: formatDistance$77,
	formatLong: formatLong$85,
	formatRelative: formatRelative$77,
	localize: {
		ordinalNumber: ordinalNumber$77,
		era: buildLocalizeFn({
			values: eraValues$77,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$77,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$77,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$77,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$77,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$61,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(th|st|nd|rd)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /[قب]/,
				abbreviated: /[قب]\.م\./,
				wide: /(قبل|بعد) الميلاد/
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/قبل/, /بعد/] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /ر[1234]/,
				wide: /الربع (الأول|الثاني|الثالث|الرابع)/
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[جفمأسند]/,
				abbreviated: /^(جانفي|فيفري|مارس|أفريل|ماي|جوان|جويلية|أوت|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/,
				wide: /^(جانفي|فيفري|مارس|أفريل|ماي|جوان|جويلية|أوت|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ج/i,
					/^ف/i,
					/^م/i,
					/^أ/i,
					/^م/i,
					/^ج/i,
					/^ج/i,
					/^أ/i,
					/^س/i,
					/^أ/i,
					/^ن/i,
					/^د/i
				],
				any: [
					/^جانفي/i,
					/^فيفري/i,
					/^مارس/i,
					/^أفريل/i,
					/^ماي/i,
					/^جوان/i,
					/^جويلية/i,
					/^أوت/i,
					/^سبتمبر/i,
					/^أكتوبر/i,
					/^نوفمبر/i,
					/^ديسمبر/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[حنثرخجس]/i,
				short: /^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,
				abbreviated: /^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,
				wide: /^(الأحد|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ح/i,
					/^ن/i,
					/^ث/i,
					/^ر/i,
					/^خ/i,
					/^ج/i,
					/^س/i
				],
				wide: [
					/^الأحد/i,
					/^الاثنين/i,
					/^الثلاثاء/i,
					/^الأربعاء/i,
					/^الخميس/i,
					/^الجمعة/i,
					/^السبت/i
				],
				any: [
					/^أح/i,
					/^اث/i,
					/^ث/i,
					/^أر/i,
					/^خ/i,
					/^ج/i,
					/^س/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(ص|ع|ن ل|ل|(في|مع) (صباح|قايلة|عشية|ليل))/,
				any: /^([صع]|نص الليل|قايلة|(في|مع) (صباح|قايلة|عشية|ليل))/
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^ص/,
				pm: /^ع/,
				midnight: /نص الليل/,
				noon: /قايلة/,
				afternoon: /بعد القايلة/,
				morning: /صباح/,
				evening: /عشية/,
				night: /ليل/
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/az/_lib/formatDistance.js
var formatDistanceLocale$75 = {
	lessThanXSeconds: {
		one: "bir saniyədən az",
		other: "{{count}} bir saniyədən az"
	},
	xSeconds: {
		one: "1 saniyə",
		other: "{{count}} saniyə"
	},
	halfAMinute: "yarım dəqiqə",
	lessThanXMinutes: {
		one: "bir dəqiqədən az",
		other: "{{count}} bir dəqiqədən az"
	},
	xMinutes: {
		one: "bir dəqiqə",
		other: "{{count}} dəqiqə"
	},
	aboutXHours: {
		one: "təxminən 1 saat",
		other: "təxminən {{count}} saat"
	},
	xHours: {
		one: "1 saat",
		other: "{{count}} saat"
	},
	xDays: {
		one: "1 gün",
		other: "{{count}} gün"
	},
	aboutXWeeks: {
		one: "təxminən 1 həftə",
		other: "təxminən {{count}} həftə"
	},
	xWeeks: {
		one: "1 həftə",
		other: "{{count}} həftə"
	},
	aboutXMonths: {
		one: "təxminən 1 ay",
		other: "təxminən {{count}} ay"
	},
	xMonths: {
		one: "1 ay",
		other: "{{count}} ay"
	},
	aboutXYears: {
		one: "təxminən 1 il",
		other: "təxminən {{count}} il"
	},
	xYears: {
		one: "1 il",
		other: "{{count}} il"
	},
	overXYears: {
		one: "1 ildən çox",
		other: "{{count}} ildən çox"
	},
	almostXYears: {
		one: "demək olar ki 1 il",
		other: "demək olar ki {{count}} il"
	}
};
var formatDistance$76 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$75[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return result + " sonra";
	else return result + " əvvəl";
	return result;
};
var formatLong$84 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, do MMMM y 'il'",
			long: "do MMMM y 'il'",
			medium: "d MMM y 'il'",
			short: "dd.MM.yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "H:mm:ss zzzz",
			long: "H:mm:ss z",
			medium: "H:mm:ss",
			short: "H:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} {{time}} - 'də'",
			long: "{{date}} {{time}} - 'də'",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/az/_lib/formatRelative.js
var formatRelativeLocale$76 = {
	lastWeek: "'sonuncu' eeee p -'də'",
	yesterday: "'dünən' p -'də'",
	today: "'bugün' p -'də'",
	tomorrow: "'sabah' p -'də'",
	nextWeek: "eeee p -'də'",
	other: "P"
};
var formatRelative$76 = (token, _date, _baseDate, _options) => formatRelativeLocale$76[token];
//#endregion
//#region ../../node_modules/date-fns/locale/az/_lib/localize.js
var eraValues$76 = {
	narrow: ["e.ə", "b.e"],
	abbreviated: ["e.ə", "b.e"],
	wide: ["eramızdan əvvəl", "bizim era"]
};
var quarterValues$76 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"K1",
		"K2",
		"K3",
		"K4"
	],
	wide: [
		"1ci kvartal",
		"2ci kvartal",
		"3cü kvartal",
		"4cü kvartal"
	]
};
var monthValues$76 = {
	narrow: [
		"Y",
		"F",
		"M",
		"A",
		"M",
		"İ",
		"İ",
		"A",
		"S",
		"O",
		"N",
		"D"
	],
	abbreviated: [
		"Yan",
		"Fev",
		"Mar",
		"Apr",
		"May",
		"İyun",
		"İyul",
		"Avq",
		"Sen",
		"Okt",
		"Noy",
		"Dek"
	],
	wide: [
		"Yanvar",
		"Fevral",
		"Mart",
		"Aprel",
		"May",
		"İyun",
		"İyul",
		"Avqust",
		"Sentyabr",
		"Oktyabr",
		"Noyabr",
		"Dekabr"
	]
};
var dayValues$76 = {
	narrow: [
		"B.",
		"B.e",
		"Ç.a",
		"Ç.",
		"C.a",
		"C.",
		"Ş."
	],
	short: [
		"B.",
		"B.e",
		"Ç.a",
		"Ç.",
		"C.a",
		"C.",
		"Ş."
	],
	abbreviated: [
		"Baz",
		"Baz.e",
		"Çər.a",
		"Çər",
		"Cüm.a",
		"Cüm",
		"Şə"
	],
	wide: [
		"Bazar",
		"Bazar ertəsi",
		"Çərşənbə axşamı",
		"Çərşənbə",
		"Cümə axşamı",
		"Cümə",
		"Şənbə"
	]
};
var dayPeriodValues$76 = {
	narrow: {
		am: "am",
		pm: "pm",
		midnight: "gecəyarı",
		noon: "gün",
		morning: "səhər",
		afternoon: "gündüz",
		evening: "axşam",
		night: "gecə"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "gecəyarı",
		noon: "gün",
		morning: "səhər",
		afternoon: "gündüz",
		evening: "axşam",
		night: "gecə"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "gecəyarı",
		noon: "gün",
		morning: "səhər",
		afternoon: "gündüz",
		evening: "axşam",
		night: "gecə"
	}
};
var formattingDayPeriodValues$60 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "gecəyarı",
		noon: "gün",
		morning: "səhər",
		afternoon: "gündüz",
		evening: "axşam",
		night: "gecə"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "gecəyarı",
		noon: "gün",
		morning: "səhər",
		afternoon: "gündüz",
		evening: "axşam",
		night: "gecə"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "gecəyarı",
		noon: "gün",
		morning: "səhər",
		afternoon: "gündüz",
		evening: "axşam",
		night: "gecə"
	}
};
var suffixes$1 = {
	1: "-inci",
	5: "-inci",
	8: "-inci",
	70: "-inci",
	80: "-inci",
	2: "-nci",
	7: "-nci",
	20: "-nci",
	50: "-nci",
	3: "-üncü",
	4: "-üncü",
	100: "-üncü",
	6: "-ncı",
	9: "-uncu",
	10: "-uncu",
	30: "-uncu",
	60: "-ıncı",
	90: "-ıncı"
};
var getSuffix = (number) => {
	if (number === 0) return number + "-ıncı";
	const a = number % 10;
	const b = number % 100 - a;
	const c = number >= 100 ? 100 : null;
	if (suffixes$1[a]) return suffixes$1[a];
	else if (suffixes$1[b]) return suffixes$1[b];
	else if (c !== null) return suffixes$1[c];
	return "";
};
var ordinalNumber$76 = (dirtyNumber, _options) => {
	const number = Number(dirtyNumber);
	return number + getSuffix(number);
};
//#endregion
//#region ../../node_modules/date-fns/locale/az.js
/**
* @category Locales
* @summary Azerbaijani locale.
* @language Azerbaijani
* @iso-639-2 aze
*/
var az = {
	code: "az",
	formatDistance: formatDistance$76,
	formatLong: formatLong$84,
	formatRelative: formatRelative$76,
	localize: {
		ordinalNumber: ordinalNumber$76,
		era: buildLocalizeFn({
			values: eraValues$76,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$76,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$76,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$76,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$76,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$60,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(-?(ci|inci|nci|uncu|üncü|ncı))?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(b|a)$/i,
				abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)$/i,
				wide: /^(bizim eradan əvvəl|bizim era)$/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^b$/i, /^(a|c)$/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]$/i,
				abbreviated: /^K[1234]$/i,
				wide: /^[1234](ci)? kvartal$/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[(?-i)yfmaisond]$/i,
				abbreviated: /^(Yan|Fev|Mar|Apr|May|İyun|İyul|Avq|Sen|Okt|Noy|Dek)$/i,
				wide: /^(Yanvar|Fevral|Mart|Aprel|May|İyun|İyul|Avgust|Sentyabr|Oktyabr|Noyabr|Dekabr)$/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^[(?-i)y]$/i,
					/^[(?-i)f]$/i,
					/^[(?-i)m]$/i,
					/^[(?-i)a]$/i,
					/^[(?-i)m]$/i,
					/^[(?-i)i]$/i,
					/^[(?-i)i]$/i,
					/^[(?-i)a]$/i,
					/^[(?-i)s]$/i,
					/^[(?-i)o]$/i,
					/^[(?-i)n]$/i,
					/^[(?-i)d]$/i
				],
				abbreviated: [
					/^Yan$/i,
					/^Fev$/i,
					/^Mar$/i,
					/^Apr$/i,
					/^May$/i,
					/^İyun$/i,
					/^İyul$/i,
					/^Avg$/i,
					/^Sen$/i,
					/^Okt$/i,
					/^Noy$/i,
					/^Dek$/i
				],
				wide: [
					/^Yanvar$/i,
					/^Fevral$/i,
					/^Mart$/i,
					/^Aprel$/i,
					/^May$/i,
					/^İyun$/i,
					/^İyul$/i,
					/^Avgust$/i,
					/^Sentyabr$/i,
					/^Oktyabr$/i,
					/^Noyabr$/i,
					/^Dekabr$/i
				]
			},
			defaultParseWidth: "narrow"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^(B\.|B\.e|Ç\.a|Ç\.|C\.a|C\.|Ş\.)$/i,
				short: /^(B\.|B\.e|Ç\.a|Ç\.|C\.a|C\.|Ş\.)$/i,
				abbreviated: /^(Baz\.e|Çər|Çər\.a|Cüm|Cüm\.a|Şə)$/i,
				wide: /^(Bazar|Bazar ertəsi|Çərşənbə axşamı|Çərşənbə|Cümə axşamı|Cümə|Şənbə)$/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^B\.$/i,
					/^B\.e$/i,
					/^Ç\.a$/i,
					/^Ç\.$/i,
					/^C\.a$/i,
					/^C\.$/i,
					/^Ş\.$/i
				],
				abbreviated: [
					/^Baz$/i,
					/^Baz\.e$/i,
					/^Çər\.a$/i,
					/^Çər$/i,
					/^Cüm\.a$/i,
					/^Cüm$/i,
					/^Şə$/i
				],
				wide: [
					/^Bazar$/i,
					/^Bazar ertəsi$/i,
					/^Çərşənbə axşamı$/i,
					/^Çərşənbə$/i,
					/^Cümə axşamı$/i,
					/^Cümə$/i,
					/^Şənbə$/i
				],
				any: [
					/^B\.$/i,
					/^B\.e$/i,
					/^Ç\.a$/i,
					/^Ç\.$/i,
					/^C\.a$/i,
					/^C\.$/i,
					/^Ş\.$/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(a|p|gecəyarı|gün|səhər|gündüz|axşam|gecə)$/i,
				any: /^(am|pm|a\.m\.|p\.m\.|AM|PM|gecəyarı|gün|səhər|gündüz|axşam|gecə)$/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a$/i,
				pm: /^p$/i,
				midnight: /^gecəyarı$/i,
				noon: /^gün$/i,
				morning: /səhər$/i,
				afternoon: /gündüz$/i,
				evening: /axşam$/i,
				night: /gecə$/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/be/_lib/formatDistance.js
function declension$6(scheme, count) {
	if (scheme.one !== void 0 && count === 1) return scheme.one;
	const rem10 = count % 10;
	const rem100 = count % 100;
	if (rem10 === 1 && rem100 !== 11) return scheme.singularNominative.replace("{{count}}", String(count));
	else if (rem10 >= 2 && rem10 <= 4 && (rem100 < 10 || rem100 > 20)) return scheme.singularGenitive.replace("{{count}}", String(count));
	else return scheme.pluralGenitive.replace("{{count}}", String(count));
}
function buildLocalizeTokenFn$4(scheme) {
	return (count, options) => {
		if (options && options.addSuffix) if (options.comparison && options.comparison > 0) if (scheme.future) return declension$6(scheme.future, count);
		else return "праз " + declension$6(scheme.regular, count);
		else if (scheme.past) return declension$6(scheme.past, count);
		else return declension$6(scheme.regular, count) + " таму";
		else return declension$6(scheme.regular, count);
	};
}
var halfAMinute$1 = (_, options) => {
	if (options && options.addSuffix) if (options.comparison && options.comparison > 0) return "праз паўхвіліны";
	else return "паўхвіліны таму";
	return "паўхвіліны";
};
var formatDistanceLocale$74 = {
	lessThanXSeconds: buildLocalizeTokenFn$4({
		regular: {
			one: "менш за секунду",
			singularNominative: "менш за {{count}} секунду",
			singularGenitive: "менш за {{count}} секунды",
			pluralGenitive: "менш за {{count}} секунд"
		},
		future: {
			one: "менш, чым праз секунду",
			singularNominative: "менш, чым праз {{count}} секунду",
			singularGenitive: "менш, чым праз {{count}} секунды",
			pluralGenitive: "менш, чым праз {{count}} секунд"
		}
	}),
	xSeconds: buildLocalizeTokenFn$4({
		regular: {
			singularNominative: "{{count}} секунда",
			singularGenitive: "{{count}} секунды",
			pluralGenitive: "{{count}} секунд"
		},
		past: {
			singularNominative: "{{count}} секунду таму",
			singularGenitive: "{{count}} секунды таму",
			pluralGenitive: "{{count}} секунд таму"
		},
		future: {
			singularNominative: "праз {{count}} секунду",
			singularGenitive: "праз {{count}} секунды",
			pluralGenitive: "праз {{count}} секунд"
		}
	}),
	halfAMinute: halfAMinute$1,
	lessThanXMinutes: buildLocalizeTokenFn$4({
		regular: {
			one: "менш за хвіліну",
			singularNominative: "менш за {{count}} хвіліну",
			singularGenitive: "менш за {{count}} хвіліны",
			pluralGenitive: "менш за {{count}} хвілін"
		},
		future: {
			one: "менш, чым праз хвіліну",
			singularNominative: "менш, чым праз {{count}} хвіліну",
			singularGenitive: "менш, чым праз {{count}} хвіліны",
			pluralGenitive: "менш, чым праз {{count}} хвілін"
		}
	}),
	xMinutes: buildLocalizeTokenFn$4({
		regular: {
			singularNominative: "{{count}} хвіліна",
			singularGenitive: "{{count}} хвіліны",
			pluralGenitive: "{{count}} хвілін"
		},
		past: {
			singularNominative: "{{count}} хвіліну таму",
			singularGenitive: "{{count}} хвіліны таму",
			pluralGenitive: "{{count}} хвілін таму"
		},
		future: {
			singularNominative: "праз {{count}} хвіліну",
			singularGenitive: "праз {{count}} хвіліны",
			pluralGenitive: "праз {{count}} хвілін"
		}
	}),
	aboutXHours: buildLocalizeTokenFn$4({
		regular: {
			singularNominative: "каля {{count}} гадзіны",
			singularGenitive: "каля {{count}} гадзін",
			pluralGenitive: "каля {{count}} гадзін"
		},
		future: {
			singularNominative: "прыблізна праз {{count}} гадзіну",
			singularGenitive: "прыблізна праз {{count}} гадзіны",
			pluralGenitive: "прыблізна праз {{count}} гадзін"
		}
	}),
	xHours: buildLocalizeTokenFn$4({
		regular: {
			singularNominative: "{{count}} гадзіна",
			singularGenitive: "{{count}} гадзіны",
			pluralGenitive: "{{count}} гадзін"
		},
		past: {
			singularNominative: "{{count}} гадзіну таму",
			singularGenitive: "{{count}} гадзіны таму",
			pluralGenitive: "{{count}} гадзін таму"
		},
		future: {
			singularNominative: "праз {{count}} гадзіну",
			singularGenitive: "праз {{count}} гадзіны",
			pluralGenitive: "праз {{count}} гадзін"
		}
	}),
	xDays: buildLocalizeTokenFn$4({ regular: {
		singularNominative: "{{count}} дзень",
		singularGenitive: "{{count}} дні",
		pluralGenitive: "{{count}} дзён"
	} }),
	aboutXWeeks: buildLocalizeTokenFn$4({
		regular: {
			singularNominative: "каля {{count}} тыдні",
			singularGenitive: "каля {{count}} тыдняў",
			pluralGenitive: "каля {{count}} тыдняў"
		},
		future: {
			singularNominative: "прыблізна праз {{count}} тыдзень",
			singularGenitive: "прыблізна праз {{count}} тыдні",
			pluralGenitive: "прыблізна праз {{count}} тыдняў"
		}
	}),
	xWeeks: buildLocalizeTokenFn$4({ regular: {
		singularNominative: "{{count}} тыдзень",
		singularGenitive: "{{count}} тыдні",
		pluralGenitive: "{{count}} тыдняў"
	} }),
	aboutXMonths: buildLocalizeTokenFn$4({
		regular: {
			singularNominative: "каля {{count}} месяца",
			singularGenitive: "каля {{count}} месяцаў",
			pluralGenitive: "каля {{count}} месяцаў"
		},
		future: {
			singularNominative: "прыблізна праз {{count}} месяц",
			singularGenitive: "прыблізна праз {{count}} месяцы",
			pluralGenitive: "прыблізна праз {{count}} месяцаў"
		}
	}),
	xMonths: buildLocalizeTokenFn$4({ regular: {
		singularNominative: "{{count}} месяц",
		singularGenitive: "{{count}} месяцы",
		pluralGenitive: "{{count}} месяцаў"
	} }),
	aboutXYears: buildLocalizeTokenFn$4({
		regular: {
			singularNominative: "каля {{count}} года",
			singularGenitive: "каля {{count}} гадоў",
			pluralGenitive: "каля {{count}} гадоў"
		},
		future: {
			singularNominative: "прыблізна праз {{count}} год",
			singularGenitive: "прыблізна праз {{count}} гады",
			pluralGenitive: "прыблізна праз {{count}} гадоў"
		}
	}),
	xYears: buildLocalizeTokenFn$4({ regular: {
		singularNominative: "{{count}} год",
		singularGenitive: "{{count}} гады",
		pluralGenitive: "{{count}} гадоў"
	} }),
	overXYears: buildLocalizeTokenFn$4({
		regular: {
			singularNominative: "больш за {{count}} год",
			singularGenitive: "больш за {{count}} гады",
			pluralGenitive: "больш за {{count}} гадоў"
		},
		future: {
			singularNominative: "больш, чым праз {{count}} год",
			singularGenitive: "больш, чым праз {{count}} гады",
			pluralGenitive: "больш, чым праз {{count}} гадоў"
		}
	}),
	almostXYears: buildLocalizeTokenFn$4({
		regular: {
			singularNominative: "амаль {{count}} год",
			singularGenitive: "амаль {{count}} гады",
			pluralGenitive: "амаль {{count}} гадоў"
		},
		future: {
			singularNominative: "амаль праз {{count}} год",
			singularGenitive: "амаль праз {{count}} гады",
			pluralGenitive: "амаль праз {{count}} гадоў"
		}
	})
};
var formatDistance$75 = (token, count, options) => {
	options = options || {};
	return formatDistanceLocale$74[token](count, options);
};
var formatLong$83 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, d MMMM y 'г.'",
			long: "d MMMM y 'г.'",
			medium: "d MMM y 'г.'",
			short: "dd.MM.y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "H:mm:ss zzzz",
			long: "H:mm:ss z",
			medium: "H:mm:ss",
			short: "H:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: { any: "{{date}}, {{time}}" },
		defaultWidth: "any"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/be/_lib/formatRelative.js
var accusativeWeekdays$7 = [
	"нядзелю",
	"панядзелак",
	"аўторак",
	"сераду",
	"чацвер",
	"пятніцу",
	"суботу"
];
function lastWeek$8(day) {
	const weekday = accusativeWeekdays$7[day];
	switch (day) {
		case 0:
		case 3:
		case 5:
		case 6: return "'у мінулую " + weekday + " а' p";
		case 1:
		case 2:
		case 4: return "'у мінулы " + weekday + " а' p";
	}
}
function thisWeek$8(day) {
	return "'у " + accusativeWeekdays$7[day] + " а' p";
}
function nextWeek$8(day) {
	const weekday = accusativeWeekdays$7[day];
	switch (day) {
		case 0:
		case 3:
		case 5:
		case 6: return "'у наступную " + weekday + " а' p";
		case 1:
		case 2:
		case 4: return "'у наступны " + weekday + " а' p";
	}
}
var lastWeekFormat$2 = (dirtyDate, baseDate, options) => {
	const date = toDate$1(dirtyDate);
	const day = date.getDay();
	if (isSameWeek(date, baseDate, options)) return thisWeek$8(day);
	else return lastWeek$8(day);
};
var nextWeekFormat$2 = (dirtyDate, baseDate, options) => {
	const date = toDate$1(dirtyDate);
	const day = date.getDay();
	if (isSameWeek(date, baseDate, options)) return thisWeek$8(day);
	else return nextWeek$8(day);
};
var formatRelativeLocale$75 = {
	lastWeek: lastWeekFormat$2,
	yesterday: "'учора а' p",
	today: "'сёння а' p",
	tomorrow: "'заўтра а' p",
	nextWeek: nextWeekFormat$2,
	other: "P"
};
var formatRelative$75 = (token, date, baseDate, options) => {
	const format = formatRelativeLocale$75[token];
	if (typeof format === "function") return format(date, baseDate, options);
	return format;
};
//#endregion
//#region ../../node_modules/date-fns/locale/be/_lib/localize.js
var eraValues$75 = {
	narrow: ["да н.э.", "н.э."],
	abbreviated: ["да н. э.", "н. э."],
	wide: ["да нашай эры", "нашай эры"]
};
var quarterValues$75 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"1-ы кв.",
		"2-і кв.",
		"3-і кв.",
		"4-ы кв."
	],
	wide: [
		"1-ы квартал",
		"2-і квартал",
		"3-і квартал",
		"4-ы квартал"
	]
};
var monthValues$75 = {
	narrow: [
		"С",
		"Л",
		"С",
		"К",
		"М",
		"Ч",
		"Л",
		"Ж",
		"В",
		"К",
		"Л",
		"С"
	],
	abbreviated: [
		"студз.",
		"лют.",
		"сак.",
		"крас.",
		"май",
		"чэрв.",
		"ліп.",
		"жн.",
		"вер.",
		"кастр.",
		"ліст.",
		"снеж."
	],
	wide: [
		"студзень",
		"люты",
		"сакавік",
		"красавік",
		"май",
		"чэрвень",
		"ліпень",
		"жнівень",
		"верасень",
		"кастрычнік",
		"лістапад",
		"снежань"
	]
};
var formattingMonthValues$18 = {
	narrow: [
		"С",
		"Л",
		"С",
		"К",
		"М",
		"Ч",
		"Л",
		"Ж",
		"В",
		"К",
		"Л",
		"С"
	],
	abbreviated: [
		"студз.",
		"лют.",
		"сак.",
		"крас.",
		"мая",
		"чэрв.",
		"ліп.",
		"жн.",
		"вер.",
		"кастр.",
		"ліст.",
		"снеж."
	],
	wide: [
		"студзеня",
		"лютага",
		"сакавіка",
		"красавіка",
		"мая",
		"чэрвеня",
		"ліпеня",
		"жніўня",
		"верасня",
		"кастрычніка",
		"лістапада",
		"снежня"
	]
};
var dayValues$75 = {
	narrow: [
		"Н",
		"П",
		"А",
		"С",
		"Ч",
		"П",
		"С"
	],
	short: [
		"нд",
		"пн",
		"аў",
		"ср",
		"чц",
		"пт",
		"сб"
	],
	abbreviated: [
		"нядз",
		"пан",
		"аўт",
		"сер",
		"чац",
		"пят",
		"суб"
	],
	wide: [
		"нядзеля",
		"панядзелак",
		"аўторак",
		"серада",
		"чацвер",
		"пятніца",
		"субота"
	]
};
var dayPeriodValues$75 = {
	narrow: {
		am: "ДП",
		pm: "ПП",
		midnight: "поўн.",
		noon: "поўд.",
		morning: "ран.",
		afternoon: "дзень",
		evening: "веч.",
		night: "ноч"
	},
	abbreviated: {
		am: "ДП",
		pm: "ПП",
		midnight: "поўн.",
		noon: "поўд.",
		morning: "ран.",
		afternoon: "дзень",
		evening: "веч.",
		night: "ноч"
	},
	wide: {
		am: "ДП",
		pm: "ПП",
		midnight: "поўнач",
		noon: "поўдзень",
		morning: "раніца",
		afternoon: "дзень",
		evening: "вечар",
		night: "ноч"
	}
};
var formattingDayPeriodValues$59 = {
	narrow: {
		am: "ДП",
		pm: "ПП",
		midnight: "поўн.",
		noon: "поўд.",
		morning: "ран.",
		afternoon: "дня",
		evening: "веч.",
		night: "ночы"
	},
	abbreviated: {
		am: "ДП",
		pm: "ПП",
		midnight: "поўн.",
		noon: "поўд.",
		morning: "ран.",
		afternoon: "дня",
		evening: "веч.",
		night: "ночы"
	},
	wide: {
		am: "ДП",
		pm: "ПП",
		midnight: "поўнач",
		noon: "поўдзень",
		morning: "раніцы",
		afternoon: "дня",
		evening: "вечара",
		night: "ночы"
	}
};
var ordinalNumber$75 = (dirtyNumber, options) => {
	const unit = String(options?.unit);
	const number = Number(dirtyNumber);
	let suffix;
	/** Though it's an incorrect ordinal form of a date we use it here for consistency with other similar locales (ru, uk)
	*  For date-month combinations should be used `d` formatter.
	*  Correct:   `d MMMM` (4 верасня)
	*  Incorrect: `do MMMM` (4-га верасня)
	*
	*  But following the consistency leads to mistakes for literal uses of `do` formatter (ordinal day of month).
	*  So for phrase "5th day of month" (`do дзень месяца`)
	*  library will produce:            `5-га дзень месяца`
	*  but correct spelling should be:  `5-ы дзень месяца`
	*
	*  So I guess there should be a stand-alone and a formatting version of "day of month" formatters
	*/
	if (unit === "date") suffix = "-га";
	else if (unit === "hour" || unit === "minute" || unit === "second") suffix = "-я";
	else suffix = (number % 10 === 2 || number % 10 === 3) && number % 100 !== 12 && number % 100 !== 13 ? "-і" : "-ы";
	return number + suffix;
};
//#endregion
//#region ../../node_modules/date-fns/locale/be.js
/**
* @category Locales
* @summary Belarusian locale.
* @language Belarusian
* @iso-639-2 bel
* @author Kiryl Anokhin [@alyrik](https://github.com/alyrik)
* @author Martin Wind [@arvigeus](https://github.com/mawi12345)
*/
var be = {
	code: "be",
	formatDistance: formatDistance$75,
	formatLong: formatLong$83,
	formatRelative: formatRelative$75,
	localize: {
		ordinalNumber: ordinalNumber$75,
		era: buildLocalizeFn({
			values: eraValues$75,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$75,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$75,
			defaultWidth: "wide",
			formattingValues: formattingMonthValues$18,
			defaultFormattingWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$75,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$75,
			defaultWidth: "any",
			formattingValues: formattingDayPeriodValues$59,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(-?(е|я|га|і|ы|ае|ая|яя|шы|гі|ці|ты|мы))?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^((да )?н\.?\s?э\.?)/i,
				abbreviated: /^((да )?н\.?\s?э\.?)/i,
				wide: /^(да нашай эры|нашай эры|наша эра)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^д/i, /^н/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^[1234](-?[ыі]?)? кв.?/i,
				wide: /^[1234](-?[ыі]?)? квартал/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[слкмчжв]/i,
				abbreviated: /^(студз|лют|сак|крас|ма[йя]|чэрв|ліп|жн|вер|кастр|ліст|снеж)\.?/i,
				wide: /^(студзен[ья]|лют(ы|ага)|сакавіка?|красавіка?|ма[йя]|чэрвен[ья]|ліпен[ья]|жні(вень|ўня)|верас(ень|ня)|кастрычніка?|лістапада?|снеж(ань|ня))/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^с/i,
					/^л/i,
					/^с/i,
					/^к/i,
					/^м/i,
					/^ч/i,
					/^л/i,
					/^ж/i,
					/^в/i,
					/^к/i,
					/^л/i,
					/^с/i
				],
				any: [
					/^ст/i,
					/^лю/i,
					/^са/i,
					/^кр/i,
					/^ма/i,
					/^ч/i,
					/^ліп/i,
					/^ж/i,
					/^в/i,
					/^ка/i,
					/^ліс/i,
					/^сн/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[нпасч]/i,
				short: /^(нд|ня|пн|па|аў|ат|ср|се|чц|ча|пт|пя|сб|су)\.?/i,
				abbreviated: /^(нядз?|ндз|пнд|пан|аўт|срд|сер|чцв|чац|птн|пят|суб).?/i,
				wide: /^(нядзел[яі]|панядзел(ак|ка)|аўтор(ак|ка)|серад[аы]|чацв(ер|ярга)|пятніц[аы]|субот[аы])/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^н/i,
					/^п/i,
					/^а/i,
					/^с/i,
					/^ч/i,
					/^п/i,
					/^с/i
				],
				any: [
					/^н/i,
					/^п[ан]/i,
					/^а/i,
					/^с[ер]/i,
					/^ч/i,
					/^п[ят]/i,
					/^с[уб]/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^([дп]п|поўн\.?|поўд\.?|ран\.?|дзень|дня|веч\.?|ночы?)/i,
				abbreviated: /^([дп]п|поўн\.?|поўд\.?|ран\.?|дзень|дня|веч\.?|ночы?)/i,
				wide: /^([дп]п|поўнач|поўдзень|раніц[аы]|дзень|дня|вечара?|ночы?)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: {
				am: /^дп/i,
				pm: /^пп/i,
				midnight: /^поўн/i,
				noon: /^поўд/i,
				morning: /^р/i,
				afternoon: /^д[зн]/i,
				evening: /^в/i,
				night: /^н/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/be-tarask/_lib/formatDistance.js
function declension$5(scheme, count) {
	if (scheme.one !== void 0 && count === 1) return scheme.one;
	const rem10 = count % 10;
	const rem100 = count % 100;
	if (rem10 === 1 && rem100 !== 11) return scheme.singularNominative.replace("{{count}}", String(count));
	else if (rem10 >= 2 && rem10 <= 4 && (rem100 < 10 || rem100 > 20)) return scheme.singularGenitive.replace("{{count}}", String(count));
	else return scheme.pluralGenitive.replace("{{count}}", String(count));
}
function buildLocalizeTokenFn$3(scheme) {
	return (count, options) => {
		if (options && options.addSuffix) if (options.comparison && options.comparison > 0) if (scheme.future) return declension$5(scheme.future, count);
		else return "праз " + declension$5(scheme.regular, count);
		else if (scheme.past) return declension$5(scheme.past, count);
		else return declension$5(scheme.regular, count) + " таму";
		else return declension$5(scheme.regular, count);
	};
}
var halfAMinute = (_, options) => {
	if (options && options.addSuffix) if (options.comparison && options.comparison > 0) return "праз паўхвіліны";
	else return "паўхвіліны таму";
	return "паўхвіліны";
};
var formatDistanceLocale$73 = {
	lessThanXSeconds: buildLocalizeTokenFn$3({
		regular: {
			one: "менш за секунду",
			singularNominative: "менш за {{count}} секунду",
			singularGenitive: "менш за {{count}} секунды",
			pluralGenitive: "менш за {{count}} секунд"
		},
		future: {
			one: "менш, чым праз секунду",
			singularNominative: "менш, чым праз {{count}} секунду",
			singularGenitive: "менш, чым праз {{count}} секунды",
			pluralGenitive: "менш, чым праз {{count}} секунд"
		}
	}),
	xSeconds: buildLocalizeTokenFn$3({
		regular: {
			singularNominative: "{{count}} секунда",
			singularGenitive: "{{count}} секунды",
			pluralGenitive: "{{count}} секунд"
		},
		past: {
			singularNominative: "{{count}} секунду таму",
			singularGenitive: "{{count}} секунды таму",
			pluralGenitive: "{{count}} секунд таму"
		},
		future: {
			singularNominative: "праз {{count}} секунду",
			singularGenitive: "праз {{count}} секунды",
			pluralGenitive: "праз {{count}} секунд"
		}
	}),
	halfAMinute,
	lessThanXMinutes: buildLocalizeTokenFn$3({
		regular: {
			one: "менш за хвіліну",
			singularNominative: "менш за {{count}} хвіліну",
			singularGenitive: "менш за {{count}} хвіліны",
			pluralGenitive: "менш за {{count}} хвілін"
		},
		future: {
			one: "менш, чым праз хвіліну",
			singularNominative: "менш, чым праз {{count}} хвіліну",
			singularGenitive: "менш, чым праз {{count}} хвіліны",
			pluralGenitive: "менш, чым праз {{count}} хвілін"
		}
	}),
	xMinutes: buildLocalizeTokenFn$3({
		regular: {
			singularNominative: "{{count}} хвіліна",
			singularGenitive: "{{count}} хвіліны",
			pluralGenitive: "{{count}} хвілін"
		},
		past: {
			singularNominative: "{{count}} хвіліну таму",
			singularGenitive: "{{count}} хвіліны таму",
			pluralGenitive: "{{count}} хвілін таму"
		},
		future: {
			singularNominative: "праз {{count}} хвіліну",
			singularGenitive: "праз {{count}} хвіліны",
			pluralGenitive: "праз {{count}} хвілін"
		}
	}),
	aboutXHours: buildLocalizeTokenFn$3({
		regular: {
			singularNominative: "каля {{count}} гадзіны",
			singularGenitive: "каля {{count}} гадзін",
			pluralGenitive: "каля {{count}} гадзін"
		},
		future: {
			singularNominative: "прыблізна праз {{count}} гадзіну",
			singularGenitive: "прыблізна праз {{count}} гадзіны",
			pluralGenitive: "прыблізна праз {{count}} гадзін"
		}
	}),
	xHours: buildLocalizeTokenFn$3({
		regular: {
			singularNominative: "{{count}} гадзіна",
			singularGenitive: "{{count}} гадзіны",
			pluralGenitive: "{{count}} гадзін"
		},
		past: {
			singularNominative: "{{count}} гадзіну таму",
			singularGenitive: "{{count}} гадзіны таму",
			pluralGenitive: "{{count}} гадзін таму"
		},
		future: {
			singularNominative: "праз {{count}} гадзіну",
			singularGenitive: "праз {{count}} гадзіны",
			pluralGenitive: "праз {{count}} гадзін"
		}
	}),
	xDays: buildLocalizeTokenFn$3({ regular: {
		singularNominative: "{{count}} дзень",
		singularGenitive: "{{count}} дні",
		pluralGenitive: "{{count}} дзён"
	} }),
	aboutXWeeks: buildLocalizeTokenFn$3({
		regular: {
			singularNominative: "каля {{count}} тыдні",
			singularGenitive: "каля {{count}} тыдняў",
			pluralGenitive: "каля {{count}} тыдняў"
		},
		future: {
			singularNominative: "прыблізна праз {{count}} тыдзень",
			singularGenitive: "прыблізна праз {{count}} тыдні",
			pluralGenitive: "прыблізна праз {{count}} тыдняў"
		}
	}),
	xWeeks: buildLocalizeTokenFn$3({ regular: {
		singularNominative: "{{count}} тыдзень",
		singularGenitive: "{{count}} тыдні",
		pluralGenitive: "{{count}} тыдняў"
	} }),
	aboutXMonths: buildLocalizeTokenFn$3({
		regular: {
			singularNominative: "каля {{count}} месяца",
			singularGenitive: "каля {{count}} месяцаў",
			pluralGenitive: "каля {{count}} месяцаў"
		},
		future: {
			singularNominative: "прыблізна праз {{count}} месяц",
			singularGenitive: "прыблізна праз {{count}} месяцы",
			pluralGenitive: "прыблізна праз {{count}} месяцаў"
		}
	}),
	xMonths: buildLocalizeTokenFn$3({ regular: {
		singularNominative: "{{count}} месяц",
		singularGenitive: "{{count}} месяцы",
		pluralGenitive: "{{count}} месяцаў"
	} }),
	aboutXYears: buildLocalizeTokenFn$3({
		regular: {
			singularNominative: "каля {{count}} года",
			singularGenitive: "каля {{count}} гадоў",
			pluralGenitive: "каля {{count}} гадоў"
		},
		future: {
			singularNominative: "прыблізна праз {{count}} год",
			singularGenitive: "прыблізна праз {{count}} гады",
			pluralGenitive: "прыблізна праз {{count}} гадоў"
		}
	}),
	xYears: buildLocalizeTokenFn$3({ regular: {
		singularNominative: "{{count}} год",
		singularGenitive: "{{count}} гады",
		pluralGenitive: "{{count}} гадоў"
	} }),
	overXYears: buildLocalizeTokenFn$3({
		regular: {
			singularNominative: "больш за {{count}} год",
			singularGenitive: "больш за {{count}} гады",
			pluralGenitive: "больш за {{count}} гадоў"
		},
		future: {
			singularNominative: "больш, чым праз {{count}} год",
			singularGenitive: "больш, чым праз {{count}} гады",
			pluralGenitive: "больш, чым праз {{count}} гадоў"
		}
	}),
	almostXYears: buildLocalizeTokenFn$3({
		regular: {
			singularNominative: "амаль {{count}} год",
			singularGenitive: "амаль {{count}} гады",
			pluralGenitive: "амаль {{count}} гадоў"
		},
		future: {
			singularNominative: "амаль праз {{count}} год",
			singularGenitive: "амаль праз {{count}} гады",
			pluralGenitive: "амаль праз {{count}} гадоў"
		}
	})
};
var formatDistance$74 = (token, count, options) => {
	options = options || {};
	return formatDistanceLocale$73[token](count, options);
};
var formatLong$82 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, d MMMM y 'г.'",
			long: "d MMMM y 'г.'",
			medium: "d MMM y 'г.'",
			short: "dd.MM.y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "H:mm:ss zzzz",
			long: "H:mm:ss z",
			medium: "H:mm:ss",
			short: "H:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: { any: "{{date}}, {{time}}" },
		defaultWidth: "any"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/be-tarask/_lib/formatRelative.js
var accusativeWeekdays$6 = [
	"нядзелю",
	"панядзелак",
	"аўторак",
	"сераду",
	"чацьвер",
	"пятніцу",
	"суботу"
];
function lastWeek$7(day) {
	const weekday = accusativeWeekdays$6[day];
	switch (day) {
		case 0:
		case 3:
		case 5:
		case 6: return "'у мінулую " + weekday + " а' p";
		case 1:
		case 2:
		case 4: return "'у мінулы " + weekday + " а' p";
	}
}
function thisWeek$7(day) {
	return "'у " + accusativeWeekdays$6[day] + " а' p";
}
function nextWeek$7(day) {
	const weekday = accusativeWeekdays$6[day];
	switch (day) {
		case 0:
		case 3:
		case 5:
		case 6: return "'у наступную " + weekday + " а' p";
		case 1:
		case 2:
		case 4: return "'у наступны " + weekday + " а' p";
	}
}
var lastWeekFormat$1 = (dirtyDate, baseDate, options) => {
	const date = toDate$1(dirtyDate);
	const day = date.getDay();
	if (isSameWeek(date, baseDate, options)) return thisWeek$7(day);
	else return lastWeek$7(day);
};
var nextWeekFormat$1 = (dirtyDate, baseDate, options) => {
	const date = toDate$1(dirtyDate);
	const day = date.getDay();
	if (isSameWeek(date, baseDate, options)) return thisWeek$7(day);
	else return nextWeek$7(day);
};
var formatRelativeLocale$74 = {
	lastWeek: lastWeekFormat$1,
	yesterday: "'учора а' p",
	today: "'сёньня а' p",
	tomorrow: "'заўтра а' p",
	nextWeek: nextWeekFormat$1,
	other: "P"
};
var formatRelative$74 = (token, date, baseDate, options) => {
	const format = formatRelativeLocale$74[token];
	if (typeof format === "function") return format(date, baseDate, options);
	return format;
};
//#endregion
//#region ../../node_modules/date-fns/locale/be-tarask/_lib/localize.js
var eraValues$74 = {
	narrow: ["да н.э.", "н.э."],
	abbreviated: ["да н. э.", "н. э."],
	wide: ["да нашай эры", "нашай эры"]
};
var quarterValues$74 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"1-ы кв.",
		"2-і кв.",
		"3-і кв.",
		"4-ы кв."
	],
	wide: [
		"1-ы квартал",
		"2-і квартал",
		"3-і квартал",
		"4-ы квартал"
	]
};
var monthValues$74 = {
	narrow: [
		"С",
		"Л",
		"С",
		"К",
		"Т",
		"Ч",
		"Л",
		"Ж",
		"В",
		"К",
		"Л",
		"С"
	],
	abbreviated: [
		"студз.",
		"лют.",
		"сак.",
		"крас.",
		"трав.",
		"чэрв.",
		"ліп.",
		"жн.",
		"вер.",
		"кастр.",
		"ліст.",
		"сьнеж."
	],
	wide: [
		"студзень",
		"люты",
		"сакавік",
		"красавік",
		"травень",
		"чэрвень",
		"ліпень",
		"жнівень",
		"верасень",
		"кастрычнік",
		"лістапад",
		"сьнежань"
	]
};
var formattingMonthValues$17 = {
	narrow: [
		"С",
		"Л",
		"С",
		"К",
		"Т",
		"Ч",
		"Л",
		"Ж",
		"В",
		"К",
		"Л",
		"С"
	],
	abbreviated: [
		"студз.",
		"лют.",
		"сак.",
		"крас.",
		"трав.",
		"чэрв.",
		"ліп.",
		"жн.",
		"вер.",
		"кастр.",
		"ліст.",
		"сьнеж."
	],
	wide: [
		"студзеня",
		"лютага",
		"сакавіка",
		"красавіка",
		"траўня",
		"чэрвеня",
		"ліпеня",
		"жніўня",
		"верасня",
		"кастрычніка",
		"лістапада",
		"сьнежня"
	]
};
var dayValues$74 = {
	narrow: [
		"Н",
		"П",
		"А",
		"С",
		"Ч",
		"П",
		"С"
	],
	short: [
		"нд",
		"пн",
		"аў",
		"ср",
		"чц",
		"пт",
		"сб"
	],
	abbreviated: [
		"нядз",
		"пан",
		"аўт",
		"сер",
		"чаць",
		"пят",
		"суб"
	],
	wide: [
		"нядзеля",
		"панядзелак",
		"аўторак",
		"серада",
		"чацьвер",
		"пятніца",
		"субота"
	]
};
var dayPeriodValues$74 = {
	narrow: {
		am: "ДП",
		pm: "ПП",
		midnight: "поўн.",
		noon: "поўд.",
		morning: "ран.",
		afternoon: "дзень",
		evening: "веч.",
		night: "ноч"
	},
	abbreviated: {
		am: "ДП",
		pm: "ПП",
		midnight: "поўн.",
		noon: "поўд.",
		morning: "ран.",
		afternoon: "дзень",
		evening: "веч.",
		night: "ноч"
	},
	wide: {
		am: "ДП",
		pm: "ПП",
		midnight: "поўнач",
		noon: "поўдзень",
		morning: "раніца",
		afternoon: "дзень",
		evening: "вечар",
		night: "ноч"
	}
};
var formattingDayPeriodValues$58 = {
	narrow: {
		am: "ДП",
		pm: "ПП",
		midnight: "поўн.",
		noon: "поўд.",
		morning: "ран.",
		afternoon: "дня",
		evening: "веч.",
		night: "ночы"
	},
	abbreviated: {
		am: "ДП",
		pm: "ПП",
		midnight: "поўн.",
		noon: "поўд.",
		morning: "ран.",
		afternoon: "дня",
		evening: "веч.",
		night: "ночы"
	},
	wide: {
		am: "ДП",
		pm: "ПП",
		midnight: "поўнач",
		noon: "поўдзень",
		morning: "раніцы",
		afternoon: "дня",
		evening: "вечара",
		night: "ночы"
	}
};
var ordinalNumber$74 = (dirtyNumber, options) => {
	const unit = String(options?.unit);
	const number = Number(dirtyNumber);
	let suffix;
	/** Though it's an incorrect ordinal form of a date we use it here for consistency with other similar locales (ru, uk)
	*  For date-month combinations should be used `d` formatter.
	*  Correct:   `d MMMM` (4 верасня)
	*  Incorrect: `do MMMM` (4-га верасня)
	*
	*  But following the consistency leads to mistakes for literal uses of `do` formatter (ordinal day of month).
	*  So for phrase "5th day of month" (`do дзень месяца`)
	*  library will produce:            `5-га дзень месяца`
	*  but correct spelling should be:  `5-ы дзень месяца`
	*
	*  So I guess there should be a stand-alone and a formatting version of "day of month" formatters
	*/
	if (unit === "date") suffix = "-га";
	else if (unit === "hour" || unit === "minute" || unit === "second") suffix = "-я";
	else suffix = (number % 10 === 2 || number % 10 === 3) && number % 100 !== 12 && number % 100 !== 13 ? "-і" : "-ы";
	return number + suffix;
};
//#endregion
//#region ../../node_modules/date-fns/locale/be-tarask.js
/**
* @category Locales
* @summary Belarusian Classic locale.
* @language Belarusian Classic
* @iso-639-2 bel
* @author Ryhor Nopears [@nopears](https://github.com/nopears)
*/
var beTarask = {
	code: "be-tarask",
	formatDistance: formatDistance$74,
	formatLong: formatLong$82,
	formatRelative: formatRelative$74,
	localize: {
		ordinalNumber: ordinalNumber$74,
		era: buildLocalizeFn({
			values: eraValues$74,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$74,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$74,
			defaultWidth: "wide",
			formattingValues: formattingMonthValues$17,
			defaultFormattingWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$74,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$74,
			defaultWidth: "any",
			formattingValues: formattingDayPeriodValues$58,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(-?(е|я|га|і|ы|ае|ая|яя|шы|гі|ці|ты|мы))?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^((да )?н\.?\s?э\.?)/i,
				abbreviated: /^((да )?н\.?\s?э\.?)/i,
				wide: /^(да нашай эры|нашай эры|наша эра)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^д/i, /^н/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^[1234](-?[ыі]?)? кв.?/i,
				wide: /^[1234](-?[ыі]?)? квартал/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[слкмчжв]/i,
				abbreviated: /^(студз|лют|сак|крас|тр(ав)?|чэрв|ліп|жн|вер|кастр|ліст|сьнеж)\.?/i,
				wide: /^(студзен[ья]|лют(ы|ага)|сакавіка?|красавіка?|тра(вень|ўня)|чэрвен[ья]|ліпен[ья]|жні(вень|ўня)|верас(ень|ня)|кастрычніка?|лістапада?|сьнеж(ань|ня))/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^с/i,
					/^л/i,
					/^с/i,
					/^к/i,
					/^т/i,
					/^ч/i,
					/^л/i,
					/^ж/i,
					/^в/i,
					/^к/i,
					/^л/i,
					/^с/i
				],
				any: [
					/^ст/i,
					/^лю/i,
					/^са/i,
					/^кр/i,
					/^тр/i,
					/^ч/i,
					/^ліп/i,
					/^ж/i,
					/^в/i,
					/^ка/i,
					/^ліс/i,
					/^сн/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[нпасч]/i,
				short: /^(нд|ня|пн|па|аў|ат|ср|се|чц|ча|пт|пя|сб|су)\.?/i,
				abbreviated: /^(нядз?|ндз|пнд|пан|аўт|срд|сер|чцьв|чаць|птн|пят|суб).?/i,
				wide: /^(нядзел[яі]|панядзел(ак|ка)|аўтор(ак|ка)|серад[аы]|чацьв(ер|ярга)|пятніц[аы]|субот[аы])/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^н/i,
					/^п/i,
					/^а/i,
					/^с/i,
					/^ч/i,
					/^п/i,
					/^с/i
				],
				any: [
					/^н/i,
					/^п[ан]/i,
					/^а/i,
					/^с[ер]/i,
					/^ч/i,
					/^п[ят]/i,
					/^с[уб]/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^([дп]п|поўн\.?|поўд\.?|ран\.?|дзень|дня|веч\.?|ночы?)/i,
				abbreviated: /^([дп]п|поўн\.?|поўд\.?|ран\.?|дзень|дня|веч\.?|ночы?)/i,
				wide: /^([дп]п|поўнач|поўдзень|раніц[аы]|дзень|дня|вечара?|ночы?)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: {
				am: /^дп/i,
				pm: /^пп/i,
				midnight: /^поўн/i,
				noon: /^поўд/i,
				morning: /^р/i,
				afternoon: /^д[зн]/i,
				evening: /^в/i,
				night: /^н/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/bg/_lib/formatDistance.js
var formatDistanceLocale$72 = {
	lessThanXSeconds: {
		one: "по-малко от секунда",
		other: "по-малко от {{count}} секунди"
	},
	xSeconds: {
		one: "1 секунда",
		other: "{{count}} секунди"
	},
	halfAMinute: "половин минута",
	lessThanXMinutes: {
		one: "по-малко от минута",
		other: "по-малко от {{count}} минути"
	},
	xMinutes: {
		one: "1 минута",
		other: "{{count}} минути"
	},
	aboutXHours: {
		one: "около час",
		other: "около {{count}} часа"
	},
	xHours: {
		one: "1 час",
		other: "{{count}} часа"
	},
	xDays: {
		one: "1 ден",
		other: "{{count}} дни"
	},
	aboutXWeeks: {
		one: "около седмица",
		other: "около {{count}} седмици"
	},
	xWeeks: {
		one: "1 седмица",
		other: "{{count}} седмици"
	},
	aboutXMonths: {
		one: "около месец",
		other: "около {{count}} месеца"
	},
	xMonths: {
		one: "1 месец",
		other: "{{count}} месеца"
	},
	aboutXYears: {
		one: "около година",
		other: "около {{count}} години"
	},
	xYears: {
		one: "1 година",
		other: "{{count}} години"
	},
	overXYears: {
		one: "над година",
		other: "над {{count}} години"
	},
	almostXYears: {
		one: "почти година",
		other: "почти {{count}} години"
	}
};
var formatDistance$73 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$72[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "след " + result;
	else return "преди " + result;
	return result;
};
var formatLong$81 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, dd MMMM yyyy",
			long: "dd MMMM yyyy",
			medium: "dd MMM yyyy",
			short: "dd.MM.yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "H:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: { any: "{{date}} {{time}}" },
		defaultWidth: "any"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/bg/_lib/formatRelative.js
var weekdays$3 = [
	"неделя",
	"понеделник",
	"вторник",
	"сряда",
	"четвъртък",
	"петък",
	"събота"
];
function lastWeek$6(day) {
	const weekday = weekdays$3[day];
	switch (day) {
		case 0:
		case 3:
		case 6: return "'миналата " + weekday + " в' p";
		case 1:
		case 2:
		case 4:
		case 5: return "'миналия " + weekday + " в' p";
	}
}
function thisWeek$6(day) {
	const weekday = weekdays$3[day];
	if (day === 2) return "'във " + weekday + " в' p";
	else return "'в " + weekday + " в' p";
}
function nextWeek$6(day) {
	const weekday = weekdays$3[day];
	switch (day) {
		case 0:
		case 3:
		case 6: return "'следващата " + weekday + " в' p";
		case 1:
		case 2:
		case 4:
		case 5: return "'следващия " + weekday + " в' p";
	}
}
var lastWeekFormatToken = (dirtyDate, baseDate, options) => {
	const date = toDate$1(dirtyDate);
	const day = date.getDay();
	if (isSameWeek(date, baseDate, options)) return thisWeek$6(day);
	else return lastWeek$6(day);
};
var nextWeekFormatToken = (dirtyDate, baseDate, options) => {
	const date = toDate$1(dirtyDate);
	const day = date.getDay();
	if (isSameWeek(date, baseDate, options)) return thisWeek$6(day);
	else return nextWeek$6(day);
};
var formatRelativeLocale$73 = {
	lastWeek: lastWeekFormatToken,
	yesterday: "'вчера в' p",
	today: "'днес в' p",
	tomorrow: "'утре в' p",
	nextWeek: nextWeekFormatToken,
	other: "P"
};
var formatRelative$73 = (token, date, baseDate, options) => {
	const format = formatRelativeLocale$73[token];
	if (typeof format === "function") return format(date, baseDate, options);
	return format;
};
//#endregion
//#region ../../node_modules/date-fns/locale/bg/_lib/localize.js
var eraValues$73 = {
	narrow: ["пр.н.е.", "н.е."],
	abbreviated: ["преди н. е.", "н. е."],
	wide: ["преди новата ера", "новата ера"]
};
var quarterValues$73 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"1-во тримес.",
		"2-ро тримес.",
		"3-то тримес.",
		"4-то тримес."
	],
	wide: [
		"1-во тримесечие",
		"2-ро тримесечие",
		"3-то тримесечие",
		"4-то тримесечие"
	]
};
var monthValues$73 = {
	abbreviated: [
		"яну",
		"фев",
		"мар",
		"апр",
		"май",
		"юни",
		"юли",
		"авг",
		"сеп",
		"окт",
		"ное",
		"дек"
	],
	wide: [
		"януари",
		"февруари",
		"март",
		"април",
		"май",
		"юни",
		"юли",
		"август",
		"септември",
		"октомври",
		"ноември",
		"декември"
	]
};
var dayValues$73 = {
	narrow: [
		"Н",
		"П",
		"В",
		"С",
		"Ч",
		"П",
		"С"
	],
	short: [
		"нд",
		"пн",
		"вт",
		"ср",
		"чт",
		"пт",
		"сб"
	],
	abbreviated: [
		"нед",
		"пон",
		"вто",
		"сря",
		"чет",
		"пет",
		"съб"
	],
	wide: [
		"неделя",
		"понеделник",
		"вторник",
		"сряда",
		"четвъртък",
		"петък",
		"събота"
	]
};
var dayPeriodValues$73 = { wide: {
	am: "преди обяд",
	pm: "след обяд",
	midnight: "в полунощ",
	noon: "на обяд",
	morning: "сутринта",
	afternoon: "следобед",
	evening: "вечерта",
	night: "през нощта"
} };
function isFeminine(unit) {
	return unit === "year" || unit === "week" || unit === "minute" || unit === "second";
}
function isNeuter(unit) {
	return unit === "quarter";
}
function numberWithSuffix(number, unit, masculine, feminine, neuter) {
	const suffix = isNeuter(unit) ? neuter : isFeminine(unit) ? feminine : masculine;
	return number + "-" + suffix;
}
var ordinalNumber$73 = (dirtyNumber, options) => {
	const number = Number(dirtyNumber);
	const unit = options?.unit;
	if (number === 0) return numberWithSuffix(0, unit, "ев", "ева", "ево");
	else if (number % 1e3 === 0) return numberWithSuffix(number, unit, "ен", "на", "но");
	else if (number % 100 === 0) return numberWithSuffix(number, unit, "тен", "тна", "тно");
	const rem100 = number % 100;
	if (rem100 > 20 || rem100 < 10) switch (rem100 % 10) {
		case 1: return numberWithSuffix(number, unit, "ви", "ва", "во");
		case 2: return numberWithSuffix(number, unit, "ри", "ра", "ро");
		case 7:
		case 8: return numberWithSuffix(number, unit, "ми", "ма", "мо");
	}
	return numberWithSuffix(number, unit, "ти", "та", "то");
};
//#endregion
//#region ../../node_modules/date-fns/locale/bg.js
/**
* @category Locales
* @summary Bulgarian locale.
* @language Bulgarian
* @iso-639-2 bul
* @author Nikolay Stoynov [@arvigeus](https://github.com/arvigeus)
* @author Tsvetan Ovedenski [@fintara](https://github.com/fintara)
*/
var bg = {
	code: "bg",
	formatDistance: formatDistance$73,
	formatLong: formatLong$81,
	formatRelative: formatRelative$73,
	localize: {
		ordinalNumber: ordinalNumber$73,
		era: buildLocalizeFn({
			values: eraValues$73,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$73,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$73,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$73,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$73,
			defaultWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(-?[врмт][аи]|-?т?(ен|на)|-?(ев|ева))?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^((пр)?н\.?\s?е\.?)/i,
				abbreviated: /^((пр)?н\.?\s?е\.?)/i,
				wide: /^(преди новата ера|новата ера|нова ера)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^п/i, /^н/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^[1234](-?[врт]?o?)? тримес.?/i,
				wide: /^[1234](-?[врт]?о?)? тримесечие/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				abbreviated: /^(яну|фев|мар|апр|май|юни|юли|авг|сеп|окт|ное|дек)/i,
				wide: /^(януари|февруари|март|април|май|юни|юли|август|септември|октомври|ноември|декември)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/^я/i,
				/^ф/i,
				/^мар/i,
				/^ап/i,
				/^май/i,
				/^юн/i,
				/^юл/i,
				/^ав/i,
				/^се/i,
				/^окт/i,
				/^но/i,
				/^де/i
			] },
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[нпвсч]/i,
				short: /^(нд|пн|вт|ср|чт|пт|сб)/i,
				abbreviated: /^(нед|пон|вто|сря|чет|пет|съб)/i,
				wide: /^(неделя|понеделник|вторник|сряда|четвъртък|петък|събота)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^н/i,
					/^п/i,
					/^в/i,
					/^с/i,
					/^ч/i,
					/^п/i,
					/^с/i
				],
				any: [
					/^н[ед]/i,
					/^п[он]/i,
					/^вт/i,
					/^ср/i,
					/^ч[ет]/i,
					/^п[ет]/i,
					/^с[ъб]/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: { any: /^(преди о|след о|в по|на о|през|веч|сут|следо)/i },
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^преди о/i,
				pm: /^след о/i,
				midnight: /^в пол/i,
				noon: /^на об/i,
				morning: /^сут/i,
				afternoon: /^следо/i,
				evening: /^веч/i,
				night: /^през н/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/bn/_lib/localize.js
var numberValues$1 = {
	locale: {
		1: "১",
		2: "২",
		3: "৩",
		4: "৪",
		5: "৫",
		6: "৬",
		7: "৭",
		8: "৮",
		9: "৯",
		0: "০"
	},
	number: {
		"১": "1",
		"২": "2",
		"৩": "3",
		"৪": "4",
		"৫": "5",
		"৬": "6",
		"৭": "7",
		"৮": "8",
		"৯": "9",
		"০": "0"
	}
};
var eraValues$72 = {
	narrow: ["খ্রিঃপূঃ", "খ্রিঃ"],
	abbreviated: ["খ্রিঃপূর্ব", "খ্রিঃ"],
	wide: ["খ্রিস্টপূর্ব", "খ্রিস্টাব্দ"]
};
var quarterValues$72 = {
	narrow: [
		"১",
		"২",
		"৩",
		"৪"
	],
	abbreviated: [
		"১ত্রৈ",
		"২ত্রৈ",
		"৩ত্রৈ",
		"৪ত্রৈ"
	],
	wide: [
		"১ম ত্রৈমাসিক",
		"২য় ত্রৈমাসিক",
		"৩য় ত্রৈমাসিক",
		"৪র্থ ত্রৈমাসিক"
	]
};
var monthValues$72 = {
	narrow: [
		"জানু",
		"ফেব্রু",
		"মার্চ",
		"এপ্রিল",
		"মে",
		"জুন",
		"জুলাই",
		"আগস্ট",
		"সেপ্ট",
		"অক্টো",
		"নভে",
		"ডিসে"
	],
	abbreviated: [
		"জানু",
		"ফেব্রু",
		"মার্চ",
		"এপ্রিল",
		"মে",
		"জুন",
		"জুলাই",
		"আগস্ট",
		"সেপ্ট",
		"অক্টো",
		"নভে",
		"ডিসে"
	],
	wide: [
		"জানুয়ারি",
		"ফেব্রুয়ারি",
		"মার্চ",
		"এপ্রিল",
		"মে",
		"জুন",
		"জুলাই",
		"আগস্ট",
		"সেপ্টেম্বর",
		"অক্টোবর",
		"নভেম্বর",
		"ডিসেম্বর"
	]
};
var dayValues$72 = {
	narrow: [
		"র",
		"সো",
		"ম",
		"বু",
		"বৃ",
		"শু",
		"শ"
	],
	short: [
		"রবি",
		"সোম",
		"মঙ্গল",
		"বুধ",
		"বৃহ",
		"শুক্র",
		"শনি"
	],
	abbreviated: [
		"রবি",
		"সোম",
		"মঙ্গল",
		"বুধ",
		"বৃহ",
		"শুক্র",
		"শনি"
	],
	wide: [
		"রবিবার",
		"সোমবার",
		"মঙ্গলবার",
		"বুধবার",
		"বৃহস্পতিবার ",
		"শুক্রবার",
		"শনিবার"
	]
};
var dayPeriodValues$72 = {
	narrow: {
		am: "পূ",
		pm: "অপ",
		midnight: "মধ্যরাত",
		noon: "মধ্যাহ্ন",
		morning: "সকাল",
		afternoon: "বিকাল",
		evening: "সন্ধ্যা",
		night: "রাত"
	},
	abbreviated: {
		am: "পূর্বাহ্ন",
		pm: "অপরাহ্ন",
		midnight: "মধ্যরাত",
		noon: "মধ্যাহ্ন",
		morning: "সকাল",
		afternoon: "বিকাল",
		evening: "সন্ধ্যা",
		night: "রাত"
	},
	wide: {
		am: "পূর্বাহ্ন",
		pm: "অপরাহ্ন",
		midnight: "মধ্যরাত",
		noon: "মধ্যাহ্ন",
		morning: "সকাল",
		afternoon: "বিকাল",
		evening: "সন্ধ্যা",
		night: "রাত"
	}
};
var formattingDayPeriodValues$57 = {
	narrow: {
		am: "পূ",
		pm: "অপ",
		midnight: "মধ্যরাত",
		noon: "মধ্যাহ্ন",
		morning: "সকাল",
		afternoon: "বিকাল",
		evening: "সন্ধ্যা",
		night: "রাত"
	},
	abbreviated: {
		am: "পূর্বাহ্ন",
		pm: "অপরাহ্ন",
		midnight: "মধ্যরাত",
		noon: "মধ্যাহ্ন",
		morning: "সকাল",
		afternoon: "বিকাল",
		evening: "সন্ধ্যা",
		night: "রাত"
	},
	wide: {
		am: "পূর্বাহ্ন",
		pm: "অপরাহ্ন",
		midnight: "মধ্যরাত",
		noon: "মধ্যাহ্ন",
		morning: "সকাল",
		afternoon: "বিকাল",
		evening: "সন্ধ্যা",
		night: "রাত"
	}
};
function dateOrdinalNumber(number, localeNumber) {
	if (number > 18 && number <= 31) return localeNumber + "শে";
	else switch (number) {
		case 1: return localeNumber + "লা";
		case 2:
		case 3: return localeNumber + "রা";
		case 4: return localeNumber + "ঠা";
		default: return localeNumber + "ই";
	}
}
var ordinalNumber$72 = (dirtyNumber, options) => {
	const number = Number(dirtyNumber);
	const localeNumber = numberToLocale$1(number);
	if (options?.unit === "date") return dateOrdinalNumber(number, localeNumber);
	if (number > 10 || number === 0) return localeNumber + "তম";
	switch (number % 10) {
		case 2:
		case 3: return localeNumber + "য়";
		case 4: return localeNumber + "র্থ";
		case 6: return localeNumber + "ষ্ঠ";
		default: return localeNumber + "ম";
	}
};
function numberToLocale$1(enNumber) {
	return enNumber.toString().replace(/\d/g, function(match) {
		return numberValues$1.locale[match];
	});
}
var localize$72 = {
	ordinalNumber: ordinalNumber$72,
	era: buildLocalizeFn({
		values: eraValues$72,
		defaultWidth: "wide"
	}),
	quarter: buildLocalizeFn({
		values: quarterValues$72,
		defaultWidth: "wide",
		argumentCallback: (quarter) => quarter - 1
	}),
	month: buildLocalizeFn({
		values: monthValues$72,
		defaultWidth: "wide"
	}),
	day: buildLocalizeFn({
		values: dayValues$72,
		defaultWidth: "wide"
	}),
	dayPeriod: buildLocalizeFn({
		values: dayPeriodValues$72,
		defaultWidth: "wide",
		formattingValues: formattingDayPeriodValues$57,
		defaultFormattingWidth: "wide"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/bn/_lib/formatDistance.js
var formatDistanceLocale$71 = {
	lessThanXSeconds: {
		one: "প্রায় ১ সেকেন্ড",
		other: "প্রায় {{count}} সেকেন্ড"
	},
	xSeconds: {
		one: "১ সেকেন্ড",
		other: "{{count}} সেকেন্ড"
	},
	halfAMinute: "আধ মিনিট",
	lessThanXMinutes: {
		one: "প্রায় ১ মিনিট",
		other: "প্রায় {{count}} মিনিট"
	},
	xMinutes: {
		one: "১ মিনিট",
		other: "{{count}} মিনিট"
	},
	aboutXHours: {
		one: "প্রায় ১ ঘন্টা",
		other: "প্রায় {{count}} ঘন্টা"
	},
	xHours: {
		one: "১ ঘন্টা",
		other: "{{count}} ঘন্টা"
	},
	xDays: {
		one: "১ দিন",
		other: "{{count}} দিন"
	},
	aboutXWeeks: {
		one: "প্রায় ১ সপ্তাহ",
		other: "প্রায় {{count}} সপ্তাহ"
	},
	xWeeks: {
		one: "১ সপ্তাহ",
		other: "{{count}} সপ্তাহ"
	},
	aboutXMonths: {
		one: "প্রায় ১ মাস",
		other: "প্রায় {{count}} মাস"
	},
	xMonths: {
		one: "১ মাস",
		other: "{{count}} মাস"
	},
	aboutXYears: {
		one: "প্রায় ১ বছর",
		other: "প্রায় {{count}} বছর"
	},
	xYears: {
		one: "১ বছর",
		other: "{{count}} বছর"
	},
	overXYears: {
		one: "১ বছরের বেশি",
		other: "{{count}} বছরের বেশি"
	},
	almostXYears: {
		one: "প্রায় ১ বছর",
		other: "প্রায় {{count}} বছর"
	}
};
var formatDistance$72 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$71[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", numberToLocale$1(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return result + " এর মধ্যে";
	else return result + " আগে";
	return result;
};
var formatLong$80 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, MMMM do, y",
			long: "MMMM do, y",
			medium: "MMM d, y",
			short: "MM/dd/yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "h:mm:ss a zzzz",
			long: "h:mm:ss a z",
			medium: "h:mm:ss a",
			short: "h:mm a"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} {{time}} 'সময়'",
			long: "{{date}} {{time}} 'সময়'",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/bn/_lib/formatRelative.js
var formatRelativeLocale$72 = {
	lastWeek: "'গত' eeee 'সময়' p",
	yesterday: "'গতকাল' 'সময়' p",
	today: "'আজ' 'সময়' p",
	tomorrow: "'আগামীকাল' 'সময়' p",
	nextWeek: "eeee 'সময়' p",
	other: "P"
};
var formatRelative$72 = (token, _date, _baseDate, _options) => formatRelativeLocale$72[token];
//#endregion
//#region ../../node_modules/date-fns/locale/bn.js
/**
* @category Locales
* @summary Bengali locale.
* @language Bengali
* @iso-639-2 ben
* @author Touhidur Rahman [@touhidrahman](https://github.com/touhidrahman)
* @author Farhad Yasir [@nutboltu](https://github.com/nutboltu)
*/
var bn = {
	code: "bn",
	formatDistance: formatDistance$72,
	formatLong: formatLong$80,
	formatRelative: formatRelative$72,
	localize: localize$72,
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(ম|য়|র্থ|ষ্ঠ|শে|ই|তম)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(খ্রিঃপূঃ|খ্রিঃ)/i,
				abbreviated: /^(খ্রিঃপূর্ব|খ্রিঃ)/i,
				wide: /^(খ্রিস্টপূর্ব|খ্রিস্টাব্দ)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [/^খ্রিঃপূঃ/i, /^খ্রিঃ/i],
				abbreviated: [/^খ্রিঃপূর্ব/i, /^খ্রিঃ/i],
				wide: [/^খ্রিস্টপূর্ব/i, /^খ্রিস্টাব্দ/i]
			},
			defaultParseWidth: "wide"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[১২৩৪]/i,
				abbreviated: /^[১২৩৪]ত্রৈ/i,
				wide: /^[১২৩৪](ম|য়|র্থ)? ত্রৈমাসিক/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/১/i,
				/২/i,
				/৩/i,
				/৪/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^(জানু|ফেব্রু|মার্চ|এপ্রিল|মে|জুন|জুলাই|আগস্ট|সেপ্ট|অক্টো|নভে|ডিসে)/i,
				abbreviated: /^(জানু|ফেব্রু|মার্চ|এপ্রিল|মে|জুন|জুলাই|আগস্ট|সেপ্ট|অক্টো|নভে|ডিসে)/i,
				wide: /^(জানুয়ারি|ফেব্রুয়ারি|মার্চ|এপ্রিল|মে|জুন|জুলাই|আগস্ট|সেপ্টেম্বর|অক্টোবর|নভেম্বর|ডিসেম্বর)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/^জানু/i,
				/^ফেব্রু/i,
				/^মার্চ/i,
				/^এপ্রিল/i,
				/^মে/i,
				/^জুন/i,
				/^জুলাই/i,
				/^আগস্ট/i,
				/^সেপ্ট/i,
				/^অক্টো/i,
				/^নভে/i,
				/^ডিসে/i
			] },
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^(র|সো|ম|বু|বৃ|শু|শ)+/i,
				short: /^(রবি|সোম|মঙ্গল|বুধ|বৃহ|শুক্র|শনি)+/i,
				abbreviated: /^(রবি|সোম|মঙ্গল|বুধ|বৃহ|শুক্র|শনি)+/i,
				wide: /^(রবিবার|সোমবার|মঙ্গলবার|বুধবার|বৃহস্পতিবার |শুক্রবার|শনিবার)+/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^র/i,
					/^সো/i,
					/^ম/i,
					/^বু/i,
					/^বৃ/i,
					/^শু/i,
					/^শ/i
				],
				short: [
					/^রবি/i,
					/^সোম/i,
					/^মঙ্গল/i,
					/^বুধ/i,
					/^বৃহ/i,
					/^শুক্র/i,
					/^শনি/i
				],
				abbreviated: [
					/^রবি/i,
					/^সোম/i,
					/^মঙ্গল/i,
					/^বুধ/i,
					/^বৃহ/i,
					/^শুক্র/i,
					/^শনি/i
				],
				wide: [
					/^রবিবার/i,
					/^সোমবার/i,
					/^মঙ্গলবার/i,
					/^বুধবার/i,
					/^বৃহস্পতিবার /i,
					/^শুক্রবার/i,
					/^শনিবার/i
				]
			},
			defaultParseWidth: "wide"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(পূ|অপ|মধ্যরাত|মধ্যাহ্ন|সকাল|বিকাল|সন্ধ্যা|রাত)/i,
				abbreviated: /^(পূর্বাহ্ন|অপরাহ্ন|মধ্যরাত|মধ্যাহ্ন|সকাল|বিকাল|সন্ধ্যা|রাত)/i,
				wide: /^(পূর্বাহ্ন|অপরাহ্ন|মধ্যরাত|মধ্যাহ্ন|সকাল|বিকাল|সন্ধ্যা|রাত)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: {
				am: /^পূ/i,
				pm: /^অপ/i,
				midnight: /^মধ্যরাত/i,
				noon: /^মধ্যাহ্ন/i,
				morning: /সকাল/i,
				afternoon: /বিকাল/i,
				evening: /সন্ধ্যা/i,
				night: /রাত/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 0,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/bs/_lib/formatDistance.js
var formatDistanceLocale$70 = {
	lessThanXSeconds: {
		one: {
			standalone: "manje od 1 sekunde",
			withPrepositionAgo: "manje od 1 sekunde",
			withPrepositionIn: "manje od 1 sekundu"
		},
		dual: "manje od {{count}} sekunde",
		other: "manje od {{count}} sekundi"
	},
	xSeconds: {
		one: {
			standalone: "1 sekunda",
			withPrepositionAgo: "1 sekunde",
			withPrepositionIn: "1 sekundu"
		},
		dual: "{{count}} sekunde",
		other: "{{count}} sekundi"
	},
	halfAMinute: "pola minute",
	lessThanXMinutes: {
		one: {
			standalone: "manje od 1 minute",
			withPrepositionAgo: "manje od 1 minute",
			withPrepositionIn: "manje od 1 minutu"
		},
		dual: "manje od {{count}} minute",
		other: "manje od {{count}} minuta"
	},
	xMinutes: {
		one: {
			standalone: "1 minuta",
			withPrepositionAgo: "1 minute",
			withPrepositionIn: "1 minutu"
		},
		dual: "{{count}} minute",
		other: "{{count}} minuta"
	},
	aboutXHours: {
		one: {
			standalone: "oko 1 sat",
			withPrepositionAgo: "oko 1 sat",
			withPrepositionIn: "oko 1 sat"
		},
		dual: "oko {{count}} sata",
		other: "oko {{count}} sati"
	},
	xHours: {
		one: {
			standalone: "1 sat",
			withPrepositionAgo: "1 sat",
			withPrepositionIn: "1 sat"
		},
		dual: "{{count}} sata",
		other: "{{count}} sati"
	},
	xDays: {
		one: {
			standalone: "1 dan",
			withPrepositionAgo: "1 dan",
			withPrepositionIn: "1 dan"
		},
		dual: "{{count}} dana",
		other: "{{count}} dana"
	},
	aboutXWeeks: {
		one: {
			standalone: "oko 1 sedmicu",
			withPrepositionAgo: "oko 1 sedmicu",
			withPrepositionIn: "oko 1 sedmicu"
		},
		dual: "oko {{count}} sedmice",
		other: "oko {{count}} sedmice"
	},
	xWeeks: {
		one: {
			standalone: "1 sedmicu",
			withPrepositionAgo: "1 sedmicu",
			withPrepositionIn: "1 sedmicu"
		},
		dual: "{{count}} sedmice",
		other: "{{count}} sedmice"
	},
	aboutXMonths: {
		one: {
			standalone: "oko 1 mjesec",
			withPrepositionAgo: "oko 1 mjesec",
			withPrepositionIn: "oko 1 mjesec"
		},
		dual: "oko {{count}} mjeseca",
		other: "oko {{count}} mjeseci"
	},
	xMonths: {
		one: {
			standalone: "1 mjesec",
			withPrepositionAgo: "1 mjesec",
			withPrepositionIn: "1 mjesec"
		},
		dual: "{{count}} mjeseca",
		other: "{{count}} mjeseci"
	},
	aboutXYears: {
		one: {
			standalone: "oko 1 godinu",
			withPrepositionAgo: "oko 1 godinu",
			withPrepositionIn: "oko 1 godinu"
		},
		dual: "oko {{count}} godine",
		other: "oko {{count}} godina"
	},
	xYears: {
		one: {
			standalone: "1 godina",
			withPrepositionAgo: "1 godine",
			withPrepositionIn: "1 godinu"
		},
		dual: "{{count}} godine",
		other: "{{count}} godina"
	},
	overXYears: {
		one: {
			standalone: "preko 1 godinu",
			withPrepositionAgo: "preko 1 godinu",
			withPrepositionIn: "preko 1 godinu"
		},
		dual: "preko {{count}} godine",
		other: "preko {{count}} godina"
	},
	almostXYears: {
		one: {
			standalone: "gotovo 1 godinu",
			withPrepositionAgo: "gotovo 1 godinu",
			withPrepositionIn: "gotovo 1 godinu"
		},
		dual: "gotovo {{count}} godine",
		other: "gotovo {{count}} godina"
	}
};
var formatDistance$71 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$70[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) if (options?.addSuffix) if (options.comparison && options.comparison > 0) result = tokenValue.one.withPrepositionIn;
	else result = tokenValue.one.withPrepositionAgo;
	else result = tokenValue.one.standalone;
	else if (count % 10 > 1 && count % 10 < 5 && String(count).substr(-2, 1) !== "1") result = tokenValue.dual.replace("{{count}}", String(count));
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "za " + result;
	else return "prije " + result;
	return result;
};
var formatLong$79 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, d. MMMM yyyy.",
			long: "d. MMMM yyyy.",
			medium: "d. MMM yy.",
			short: "dd. MM. yy."
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss (zzzz)",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'u' {{time}}",
			long: "{{date}} 'u' {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/bs/_lib/formatRelative.js
var formatRelativeLocale$71 = {
	lastWeek: (date) => {
		switch (date.getDay()) {
			case 0: return "'prošle nedjelje u' p";
			case 3: return "'prošle srijede u' p";
			case 6: return "'prošle subote u' p";
			default: return "'prošli' EEEE 'u' p";
		}
	},
	yesterday: "'juče u' p",
	today: "'danas u' p",
	tomorrow: "'sutra u' p",
	nextWeek: (date) => {
		switch (date.getDay()) {
			case 0: return "'sljedeće nedjelje u' p";
			case 3: return "'sljedeću srijedu u' p";
			case 6: return "'sljedeću subotu u' p";
			default: return "'sljedeći' EEEE 'u' p";
		}
	},
	other: "P"
};
var formatRelative$71 = (token, date, _baseDate, _options) => {
	const format = formatRelativeLocale$71[token];
	if (typeof format === "function") return format(date);
	return format;
};
//#endregion
//#region ../../node_modules/date-fns/locale/bs/_lib/localize.js
var eraValues$71 = {
	narrow: ["pr.n.e.", "AD"],
	abbreviated: ["pr. Hr.", "po. Hr."],
	wide: ["Prije Hrista", "Poslije Hrista"]
};
var quarterValues$71 = {
	narrow: [
		"1.",
		"2.",
		"3.",
		"4."
	],
	abbreviated: [
		"1. kv.",
		"2. kv.",
		"3. kv.",
		"4. kv."
	],
	wide: [
		"1. kvartal",
		"2. kvartal",
		"3. kvartal",
		"4. kvartal"
	]
};
var monthValues$71 = {
	narrow: [
		"1.",
		"2.",
		"3.",
		"4.",
		"5.",
		"6.",
		"7.",
		"8.",
		"9.",
		"10.",
		"11.",
		"12."
	],
	abbreviated: [
		"jan",
		"feb",
		"mar",
		"apr",
		"maj",
		"jun",
		"jul",
		"avg",
		"sep",
		"okt",
		"nov",
		"dec"
	],
	wide: [
		"januar",
		"februar",
		"mart",
		"april",
		"maj",
		"juni",
		"juli",
		"avgust",
		"septembar",
		"oktobar",
		"novembar",
		"decembar"
	]
};
var formattingMonthValues$16 = {
	narrow: [
		"1.",
		"2.",
		"3.",
		"4.",
		"5.",
		"6.",
		"7.",
		"8.",
		"9.",
		"10.",
		"11.",
		"12."
	],
	abbreviated: [
		"jan",
		"feb",
		"mar",
		"apr",
		"maj",
		"jun",
		"jul",
		"avg",
		"sep",
		"okt",
		"nov",
		"dec"
	],
	wide: [
		"januar",
		"februar",
		"mart",
		"april",
		"maj",
		"juni",
		"juli",
		"avgust",
		"septembar",
		"oktobar",
		"novembar",
		"decembar"
	]
};
var dayValues$71 = {
	narrow: [
		"N",
		"P",
		"U",
		"S",
		"Č",
		"P",
		"S"
	],
	short: [
		"ned",
		"pon",
		"uto",
		"sre",
		"čet",
		"pet",
		"sub"
	],
	abbreviated: [
		"ned",
		"pon",
		"uto",
		"sre",
		"čet",
		"pet",
		"sub"
	],
	wide: [
		"nedjelja",
		"ponedjeljak",
		"utorak",
		"srijeda",
		"četvrtak",
		"petak",
		"subota"
	]
};
var dayPeriodValues$71 = {
	narrow: {
		am: "AM",
		pm: "PM",
		midnight: "ponoć",
		noon: "podne",
		morning: "ujutru",
		afternoon: "popodne",
		evening: "uveče",
		night: "noću"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "ponoć",
		noon: "podne",
		morning: "ujutru",
		afternoon: "popodne",
		evening: "uveče",
		night: "noću"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "ponoć",
		noon: "podne",
		morning: "ujutru",
		afternoon: "poslije podne",
		evening: "uveče",
		night: "noću"
	}
};
var formattingDayPeriodValues$56 = {
	narrow: {
		am: "AM",
		pm: "PM",
		midnight: "ponoć",
		noon: "podne",
		morning: "ujutru",
		afternoon: "popodne",
		evening: "uveče",
		night: "noću"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "ponoć",
		noon: "podne",
		morning: "ujutru",
		afternoon: "popodne",
		evening: "uveče",
		night: "noću"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "ponoć",
		noon: "podne",
		morning: "ujutru",
		afternoon: "poslije podne",
		evening: "uveče",
		night: "noću"
	}
};
var ordinalNumber$71 = (dirtyNumber, _options) => {
	const number = Number(dirtyNumber);
	return String(number) + ".";
};
//#endregion
//#region ../../node_modules/date-fns/locale/bs.js
/**
* @category Locales
* @summary Bosnian locale.
* @language Bosnian
* @iso-639-2 bos
* @author Branislav Lazić [@branislavlazic](https://github.com/branislavlazic)
*/
var bs = {
	code: "bs",
	formatDistance: formatDistance$71,
	formatLong: formatLong$79,
	formatRelative: formatRelative$71,
	localize: {
		ordinalNumber: ordinalNumber$71,
		era: buildLocalizeFn({
			values: eraValues$71,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$71,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$71,
			defaultWidth: "wide",
			formattingValues: formattingMonthValues$16,
			defaultFormattingWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$71,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$71,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$56,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)\./i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(pr\.n\.e\.|AD)/i,
				abbreviated: /^(pr\.\s?Hr\.|po\.\s?Hr\.)/i,
				wide: /^(Prije Hrista|prije nove ere|Poslije Hrista|nova era)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^pr/i, /^(po|nova)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^[1234]\.\s?kv\.?/i,
				wide: /^[1234]\. kvartal/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^(10|11|12|[123456789])\./i,
				abbreviated: /^(jan|feb|mar|apr|maj|jun|jul|avg|sep|okt|nov|dec)/i,
				wide: /^((januar|januara)|(februar|februara)|(mart|marta)|(april|aprila)|(maj|maja)|(juni|juna)|(juli|jula)|(avgust|avgusta)|(septembar|septembra)|(oktobar|oktobra)|(novembar|novembra)|(decembar|decembra))/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^1/i,
					/^2/i,
					/^3/i,
					/^4/i,
					/^5/i,
					/^6/i,
					/^7/i,
					/^8/i,
					/^9/i,
					/^10/i,
					/^11/i,
					/^12/i
				],
				any: [
					/^ja/i,
					/^f/i,
					/^mar/i,
					/^ap/i,
					/^maj/i,
					/^jun/i,
					/^jul/i,
					/^avg/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[npusčc]/i,
				short: /^(ned|pon|uto|sre|(čet|cet)|pet|sub)/i,
				abbreviated: /^(ned|pon|uto|sre|(čet|cet)|pet|sub)/i,
				wide: /^(nedjelja|ponedjeljak|utorak|srijeda|(četvrtak|cetvrtak)|petak|subota)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^s/i,
					/^m/i,
					/^t/i,
					/^w/i,
					/^t/i,
					/^f/i,
					/^s/i
				],
				any: [
					/^su/i,
					/^m/i,
					/^tu/i,
					/^w/i,
					/^th/i,
					/^f/i,
					/^sa/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: { any: /^(am|pm|ponoc|ponoć|(po)?podne|uvece|uveče|noću|poslije podne|ujutru)/i },
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a/i,
				pm: /^p/i,
				midnight: /^pono/i,
				noon: /^pod/i,
				morning: /jutro/i,
				afternoon: /(poslije\s|po)+podne/i,
				evening: /(uvece|uveče)/i,
				night: /(nocu|noću)/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/ca/_lib/formatDistance.js
/**
* Davant de les xifres que es diuen amb vocal inicial, 1 i 11, s'apostrofen els articles el i la i la preposició de igual que si estiguessin escrits amb lletres.
*    l'1 de juliol ('l'u')
*    l'11 de novembre ('l'onze')
*    l'11a clàusula del contracte ('l'onzena')
*    la contractació d'11 jugadors ('d'onze')
*    l'aval d'11.000 socis ('d'onze mil')
*
* Reference: https://aplicacions.llengua.gencat.cat/llc/AppJava/index.html?input_cercar=apostrofaci%25F3+davant+xifres&action=Principal&method=detall_completa&numPagina=1&idHit=11236&database=FITXES_PUB&tipusFont=Fitxes%20de%20l%27Optimot&idFont=11236&titol=apostrofaci%F3%20davant%20de%20xifres%20%2F%20apostrofaci%F3%20davant%20de%201%20i%2011&numeroResultat=1&clickLink=detall&tipusCerca=cerca.normes
*/
var formatDistanceLocale$69 = {
	lessThanXSeconds: {
		one: "menys d'un segon",
		eleven: "menys d'onze segons",
		other: "menys de {{count}} segons"
	},
	xSeconds: {
		one: "1 segon",
		other: "{{count}} segons"
	},
	halfAMinute: "mig minut",
	lessThanXMinutes: {
		one: "menys d'un minut",
		eleven: "menys d'onze minuts",
		other: "menys de {{count}} minuts"
	},
	xMinutes: {
		one: "1 minut",
		other: "{{count}} minuts"
	},
	aboutXHours: {
		one: "aproximadament una hora",
		other: "aproximadament {{count}} hores"
	},
	xHours: {
		one: "1 hora",
		other: "{{count}} hores"
	},
	xDays: {
		one: "1 dia",
		other: "{{count}} dies"
	},
	aboutXWeeks: {
		one: "aproximadament una setmana",
		other: "aproximadament {{count}} setmanes"
	},
	xWeeks: {
		one: "1 setmana",
		other: "{{count}} setmanes"
	},
	aboutXMonths: {
		one: "aproximadament un mes",
		other: "aproximadament {{count}} mesos"
	},
	xMonths: {
		one: "1 mes",
		other: "{{count}} mesos"
	},
	aboutXYears: {
		one: "aproximadament un any",
		other: "aproximadament {{count}} anys"
	},
	xYears: {
		one: "1 any",
		other: "{{count}} anys"
	},
	overXYears: {
		one: "més d'un any",
		eleven: "més d'onze anys",
		other: "més de {{count}} anys"
	},
	almostXYears: {
		one: "gairebé un any",
		other: "gairebé {{count}} anys"
	}
};
var formatDistance$70 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$69[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else if (count === 11 && tokenValue.eleven) result = tokenValue.eleven;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "en " + result;
	else return "fa " + result;
	return result;
};
var formatLong$78 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, d 'de' MMMM y",
			long: "d 'de' MMMM y",
			medium: "d MMM y",
			short: "dd/MM/y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'a les' {{time}}",
			long: "{{date}} 'a les' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/ca/_lib/formatRelative.js
var formatRelativeLocale$70 = {
	lastWeek: "'el' eeee 'passat a la' LT",
	yesterday: "'ahir a la' p",
	today: "'avui a la' p",
	tomorrow: "'demà a la' p",
	nextWeek: "eeee 'a la' p",
	other: "P"
};
var formatRelativeLocalePlural$3 = {
	lastWeek: "'el' eeee 'passat a les' p",
	yesterday: "'ahir a les' p",
	today: "'avui a les' p",
	tomorrow: "'demà a les' p",
	nextWeek: "eeee 'a les' p",
	other: "P"
};
var formatRelative$70 = (token, date, _baseDate, _options) => {
	if (date.getHours() !== 1) return formatRelativeLocalePlural$3[token];
	return formatRelativeLocale$70[token];
};
//#endregion
//#region ../../node_modules/date-fns/locale/ca/_lib/localize.js
/**
* General information
* Reference: https://aplicacions.llengua.gencat.cat
* Reference: https://www.uoc.edu/portal/ca/servei-linguistic/convencions/abreviacions/simbols/simbols-habituals.html
*/
/**
* Abans de Crist: https://aplicacions.llengua.gencat.cat/llc/AppJava/index.html?input_cercar=abans+de+crist&action=Principal&method=detall_completa&numPagina=1&idHit=6876&database=FITXES_PUB&tipusFont=Fitxes%20de%20l%27Optimot&idFont=6876&titol=abans%20de%20Crist%20(abreviatura)%20/%20abans%20de%20Crist%20(sigla)&numeroResultat=1&clickLink=detall&tipusCerca=cerca.fitxes
* Desprest de Crist: https://aplicacions.llengua.gencat.cat/llc/AppJava/index.html?input_cercar=despr%E9s+de+crist&action=Principal&method=detall_completa&numPagina=1&idHit=6879&database=FITXES_PUB&tipusFont=Fitxes%20de%20l%27Optimot&idFont=6879&titol=despr%E9s%20de%20Crist%20(sigla)%20/%20despr%E9s%20de%20Crist%20(abreviatura)&numeroResultat=1&clickLink=detall&tipusCerca=cerca.fitxes
*/
var eraValues$70 = {
	narrow: ["aC", "dC"],
	abbreviated: ["a. de C.", "d. de C."],
	wide: ["abans de Crist", "després de Crist"]
};
var quarterValues$70 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"T1",
		"T2",
		"T3",
		"T4"
	],
	wide: [
		"1r trimestre",
		"2n trimestre",
		"3r trimestre",
		"4t trimestre"
	]
};
/**
* Dins d'un text convé fer servir la forma sencera dels mesos, ja que sempre és més clar el mot sencer que l'abreviatura, encara que aquesta sigui força coneguda.
* Cal reservar, doncs, les abreviatures per a les llistes o classificacions, els gràfics, les taules o quadres estadístics, els textos publicitaris, etc.
*
* Reference: https://aplicacions.llengua.gencat.cat/llc/AppJava/index.html?input_cercar=abreviacions+mesos&action=Principal&method=detall_completa&numPagina=1&idHit=8402&database=FITXES_PUB&tipusFont=Fitxes%20de%20l%27Optimot&idFont=8402&titol=abreviatures%20dels%20mesos%20de%20l%27any&numeroResultat=5&clickLink=detall&tipusCerca=cerca.fitxes
*/
var monthValues$70 = {
	narrow: [
		"GN",
		"FB",
		"MÇ",
		"AB",
		"MG",
		"JN",
		"JL",
		"AG",
		"ST",
		"OC",
		"NV",
		"DS"
	],
	abbreviated: [
		"gen.",
		"febr.",
		"març",
		"abr.",
		"maig",
		"juny",
		"jul.",
		"ag.",
		"set.",
		"oct.",
		"nov.",
		"des."
	],
	wide: [
		"gener",
		"febrer",
		"març",
		"abril",
		"maig",
		"juny",
		"juliol",
		"agost",
		"setembre",
		"octubre",
		"novembre",
		"desembre"
	]
};
/**
* Les abreviatures dels dies de la setmana comencen totes amb la lletra d.
* Tot seguit porten la consonant següent a la i, excepte en el cas de dimarts, dimecres i diumenge, en què aquesta consonant és la m i, per tant, hi podria haver confusió.
* Per evitar-ho, s'ha substituït la m per una t (en el cas de dimarts), una c (en el cas de dimecres) i una g (en el cas de diumenge), respectivament.
*
* Seguint la norma general d'ús de les abreviatures, les dels dies de la setmana sempre porten punt final.
* Igualment, van amb la primera lletra en majúscula quan la paraula sencera també hi aniria.
* En canvi, van amb la primera lletra en minúscula quan la inicial de la paraula sencera també hi aniria.
*
* Reference: https://aplicacions.llengua.gencat.cat/llc/AppJava/index.html?input_cercar=abreviatures+dies&action=Principal&method=detall_completa&numPagina=1&idHit=8387&database=FITXES_PUB&tipusFont=Fitxes%20de%20l%27Optimot&idFont=8387&titol=abreviatures%20dels%20dies%20de%20la%20setmana&numeroResultat=1&clickLink=detall&tipusCerca=cerca.tot
*/
var dayValues$70 = {
	narrow: [
		"dg.",
		"dl.",
		"dt.",
		"dm.",
		"dj.",
		"dv.",
		"ds."
	],
	short: [
		"dg.",
		"dl.",
		"dt.",
		"dm.",
		"dj.",
		"dv.",
		"ds."
	],
	abbreviated: [
		"dg.",
		"dl.",
		"dt.",
		"dm.",
		"dj.",
		"dv.",
		"ds."
	],
	wide: [
		"diumenge",
		"dilluns",
		"dimarts",
		"dimecres",
		"dijous",
		"divendres",
		"dissabte"
	]
};
/**
* Reference: https://aplicacions.llengua.gencat.cat/llc/AppJava/index.html?action=Principal&method=detall&input_cercar=parts+del+dia&numPagina=1&database=FITXES_PUB&idFont=12801&idHit=12801&tipusFont=Fitxes+de+l%27Optimot&numeroResultat=1&databases_avansada=&categories_avansada=&clickLink=detall&titol=Nom+de+les+parts+del+dia&tematica=&tipusCerca=cerca.fitxes
*/
var dayPeriodValues$70 = {
	narrow: {
		am: "am",
		pm: "pm",
		midnight: "mitjanit",
		noon: "migdia",
		morning: "matí",
		afternoon: "tarda",
		evening: "vespre",
		night: "nit"
	},
	abbreviated: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "mitjanit",
		noon: "migdia",
		morning: "matí",
		afternoon: "tarda",
		evening: "vespre",
		night: "nit"
	},
	wide: {
		am: "ante meridiem",
		pm: "post meridiem",
		midnight: "mitjanit",
		noon: "migdia",
		morning: "matí",
		afternoon: "tarda",
		evening: "vespre",
		night: "nit"
	}
};
var formattingDayPeriodValues$55 = {
	narrow: {
		am: "am",
		pm: "pm",
		midnight: "de la mitjanit",
		noon: "del migdia",
		morning: "del matí",
		afternoon: "de la tarda",
		evening: "del vespre",
		night: "de la nit"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "de la mitjanit",
		noon: "del migdia",
		morning: "del matí",
		afternoon: "de la tarda",
		evening: "del vespre",
		night: "de la nit"
	},
	wide: {
		am: "ante meridiem",
		pm: "post meridiem",
		midnight: "de la mitjanit",
		noon: "del migdia",
		morning: "del matí",
		afternoon: "de la tarda",
		evening: "del vespre",
		night: "de la nit"
	}
};
/**
* Quan van en singular, els nombres ordinals es representen, en forma d’abreviatura, amb la xifra seguida de l’última lletra del mot desplegat.
* És optatiu posar punt després de la lletra.
*
* Reference: https://aplicacions.llengua.gencat.cat/llc/AppJava/pdf/abrevia.pdf#page=18
*/
var ordinalNumber$70 = (dirtyNumber, _options) => {
	const number = Number(dirtyNumber);
	const rem100 = number % 100;
	if (rem100 > 20 || rem100 < 10) switch (rem100 % 10) {
		case 1: return number + "r";
		case 2: return number + "n";
		case 3: return number + "r";
		case 4: return number + "t";
	}
	return number + "è";
};
//#endregion
//#region ../../node_modules/date-fns/locale/ca.js
/**
* @category Locales
* @summary Catalan locale.
* @language Catalan
* @iso-639-2 cat
* @author Guillermo Grau [@guigrpa](https://github.com/guigrpa)
* @author Alex Vizcaino [@avizcaino](https://github.com/avizcaino)
*/
var ca = {
	code: "ca",
	formatDistance: formatDistance$70,
	formatLong: formatLong$78,
	formatRelative: formatRelative$70,
	localize: {
		ordinalNumber: ordinalNumber$70,
		era: buildLocalizeFn({
			values: eraValues$70,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$70,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$70,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$70,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$70,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$55,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(è|r|n|r|t)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(aC|dC)/i,
				abbreviated: /^(a. de C.|d. de C.)/i,
				wide: /^(abans de Crist|despr[eé]s de Crist)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [/^aC/i, /^dC/i],
				abbreviated: [/^(a. de C.)/i, /^(d. de C.)/i],
				wide: [/^(abans de Crist)/i, /^(despr[eé]s de Crist)/i]
			},
			defaultParseWidth: "wide"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^T[1234]/i,
				wide: /^[1234](è|r|n|r|t)? trimestre/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^(GN|FB|MÇ|AB|MG|JN|JL|AG|ST|OC|NV|DS)/i,
				abbreviated: /^(gen.|febr.|març|abr.|maig|juny|jul.|ag.|set.|oct.|nov.|des.)/i,
				wide: /^(gener|febrer|març|abril|maig|juny|juliol|agost|setembre|octubre|novembre|desembre)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^GN/i,
					/^FB/i,
					/^MÇ/i,
					/^AB/i,
					/^MG/i,
					/^JN/i,
					/^JL/i,
					/^AG/i,
					/^ST/i,
					/^OC/i,
					/^NV/i,
					/^DS/i
				],
				abbreviated: [
					/^gen./i,
					/^febr./i,
					/^març/i,
					/^abr./i,
					/^maig/i,
					/^juny/i,
					/^jul./i,
					/^ag./i,
					/^set./i,
					/^oct./i,
					/^nov./i,
					/^des./i
				],
				wide: [
					/^gener/i,
					/^febrer/i,
					/^març/i,
					/^abril/i,
					/^maig/i,
					/^juny/i,
					/^juliol/i,
					/^agost/i,
					/^setembre/i,
					/^octubre/i,
					/^novembre/i,
					/^desembre/i
				]
			},
			defaultParseWidth: "wide"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,
				short: /^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,
				abbreviated: /^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,
				wide: /^(diumenge|dilluns|dimarts|dimecres|dijous|divendres|dissabte)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^dg./i,
					/^dl./i,
					/^dt./i,
					/^dm./i,
					/^dj./i,
					/^dv./i,
					/^ds./i
				],
				abbreviated: [
					/^dg./i,
					/^dl./i,
					/^dt./i,
					/^dm./i,
					/^dj./i,
					/^dv./i,
					/^ds./i
				],
				wide: [
					/^diumenge/i,
					/^dilluns/i,
					/^dimarts/i,
					/^dimecres/i,
					/^dijous/i,
					/^divendres/i,
					/^disssabte/i
				]
			},
			defaultParseWidth: "wide"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(a|p|mn|md|(del|de la) (matí|tarda|vespre|nit))/i,
				abbreviated: /^([ap]\.?\s?m\.?|mitjanit|migdia|(del|de la) (matí|tarda|vespre|nit))/i,
				wide: /^(ante meridiem|post meridiem|mitjanit|migdia|(del|de la) (matí|tarda|vespre|nit))/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: {
				am: /^a/i,
				pm: /^p/i,
				midnight: /^mitjanit/i,
				noon: /^migdia/i,
				morning: /matí/i,
				afternoon: /tarda/i,
				evening: /vespre/i,
				night: /nit/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/ckb/_lib/formatDistance.js
var formatDistanceLocale$68 = {
	lessThanXSeconds: {
		one: "کەمتر لە یەک چرکە",
		other: "کەمتر لە {{count}} چرکە"
	},
	xSeconds: {
		one: "1 چرکە",
		other: "{{count}} چرکە"
	},
	halfAMinute: "نیو کاتژمێر",
	lessThanXMinutes: {
		one: "کەمتر لە یەک خولەک",
		other: "کەمتر لە {{count}} خولەک"
	},
	xMinutes: {
		one: "1 خولەک",
		other: "{{count}} خولەک"
	},
	aboutXHours: {
		one: "دەوروبەری 1 کاتژمێر",
		other: "دەوروبەری {{count}} کاتژمێر"
	},
	xHours: {
		one: "1 کاتژمێر",
		other: "{{count}} کاتژمێر"
	},
	xDays: {
		one: "1 ڕۆژ",
		other: "{{count}} ژۆژ"
	},
	aboutXWeeks: {
		one: "دەوروبەری 1 هەفتە",
		other: "دوروبەری {{count}} هەفتە"
	},
	xWeeks: {
		one: "1 هەفتە",
		other: "{{count}} هەفتە"
	},
	aboutXMonths: {
		one: "داوروبەری 1 مانگ",
		other: "دەوروبەری {{count}} مانگ"
	},
	xMonths: {
		one: "1 مانگ",
		other: "{{count}} مانگ"
	},
	aboutXYears: {
		one: "دەوروبەری  1 ساڵ",
		other: "دەوروبەری {{count}} ساڵ"
	},
	xYears: {
		one: "1 ساڵ",
		other: "{{count}} ساڵ"
	},
	overXYears: {
		one: "زیاتر لە ساڵێک",
		other: "زیاتر لە {{count}} ساڵ"
	},
	almostXYears: {
		one: "بەنزیکەیی ساڵێک  ",
		other: "بەنزیکەیی {{count}} ساڵ"
	}
};
var formatDistance$69 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$68[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", count.toString());
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "لە ماوەی " + result + "دا";
	else return result + "پێش ئێستا";
	return result;
};
var formatLong$77 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, MMMM do, y",
			long: "MMMM do, y",
			medium: "MMM d, y",
			short: "MM/dd/yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "h:mm:ss a zzzz",
			long: "h:mm:ss a z",
			medium: "h:mm:ss a",
			short: "h:mm a"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'کاتژمێر' {{time}}",
			long: "{{date}} 'کاتژمێر' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/ckb/_lib/formatRelative.js
var formatRelativeLocale$69 = {
	lastWeek: "'هەفتەی ڕابردوو' eeee 'کاتژمێر' p",
	yesterday: "'دوێنێ کاتژمێر' p",
	today: "'ئەمڕۆ کاتژمێر' p",
	tomorrow: "'بەیانی کاتژمێر' p",
	nextWeek: "eeee 'کاتژمێر' p",
	other: "P"
};
var formatRelative$69 = (token, _date, _baseDate, _options) => formatRelativeLocale$69[token];
//#endregion
//#region ../../node_modules/date-fns/locale/ckb/_lib/localize.js
var eraValues$69 = {
	narrow: ["پ", "د"],
	abbreviated: ["پ-ز", "د-ز"],
	wide: ["پێش زاین", "دوای زاین"]
};
var quarterValues$69 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"چ1م",
		"چ2م",
		"چ3م",
		"چ4م"
	],
	wide: [
		"چارەگی یەکەم",
		"چارەگی دووەم",
		"چارەگی سێیەم",
		"چارەگی چوارەم"
	]
};
var monthValues$69 = {
	narrow: [
		"ک-د",
		"ش",
		"ئا",
		"ن",
		"م",
		"ح",
		"ت",
		"ئا",
		"ئە",
		"تش-ی",
		"تش-د",
		"ک-ی"
	],
	abbreviated: [
		"کان-دوو",
		"شوب",
		"ئاد",
		"نیس",
		"مایس",
		"حوز",
		"تەم",
		"ئاب",
		"ئەل",
		"تش-یەک",
		"تش-دوو",
		"کان-یەک"
	],
	wide: [
		"کانوونی دووەم",
		"شوبات",
		"ئادار",
		"نیسان",
		"مایس",
		"حوزەیران",
		"تەمموز",
		"ئاب",
		"ئەیلول",
		"تشرینی یەکەم",
		"تشرینی دووەم",
		"کانوونی یەکەم"
	]
};
var dayValues$69 = {
	narrow: [
		"ی-ش",
		"د-ش",
		"س-ش",
		"چ-ش",
		"پ-ش",
		"هە",
		"ش"
	],
	short: [
		"یە-شە",
		"دوو-شە",
		"سێ-شە",
		"چو-شە",
		"پێ-شە",
		"هەی",
		"شە"
	],
	abbreviated: [
		"یەک-شەم",
		"دوو-شەم",
		"سێ-شەم",
		"چوار-شەم",
		"پێنج-شەم",
		"هەینی",
		"شەمە"
	],
	wide: [
		"یەک شەمە",
		"دوو شەمە",
		"سێ شەمە",
		"چوار شەمە",
		"پێنج شەمە",
		"هەینی",
		"شەمە"
	]
};
var dayPeriodValues$69 = {
	narrow: {
		am: "پ",
		pm: "د",
		midnight: "ن-ش",
		noon: "ن",
		morning: "بەیانی",
		afternoon: "دوای نیوەڕۆ",
		evening: "ئێوارە",
		night: "شەو"
	},
	abbreviated: {
		am: "پ-ن",
		pm: "د-ن",
		midnight: "نیوە شەو",
		noon: "نیوەڕۆ",
		morning: "بەیانی",
		afternoon: "دوای نیوەڕۆ",
		evening: "ئێوارە",
		night: "شەو"
	},
	wide: {
		am: "پێش نیوەڕۆ",
		pm: "دوای نیوەڕۆ",
		midnight: "نیوە شەو",
		noon: "نیوەڕۆ",
		morning: "بەیانی",
		afternoon: "دوای نیوەڕۆ",
		evening: "ئێوارە",
		night: "شەو"
	}
};
var formattingDayPeriodValues$54 = {
	narrow: {
		am: "پ",
		pm: "د",
		midnight: "ن-ش",
		noon: "ن",
		morning: "لە بەیانیدا",
		afternoon: "لە دوای نیوەڕۆدا",
		evening: "لە ئێوارەدا",
		night: "لە شەودا"
	},
	abbreviated: {
		am: "پ-ن",
		pm: "د-ن",
		midnight: "نیوە شەو",
		noon: "نیوەڕۆ",
		morning: "لە بەیانیدا",
		afternoon: "لە دوای نیوەڕۆدا",
		evening: "لە ئێوارەدا",
		night: "لە شەودا"
	},
	wide: {
		am: "پێش نیوەڕۆ",
		pm: "دوای نیوەڕۆ",
		midnight: "نیوە شەو",
		noon: "نیوەڕۆ",
		morning: "لە بەیانیدا",
		afternoon: "لە دوای نیوەڕۆدا",
		evening: "لە ئێوارەدا",
		night: "لە شەودا"
	}
};
var ordinalNumber$69 = (dirtyNumber, _options) => {
	return String(dirtyNumber);
};
//#endregion
//#region ../../node_modules/date-fns/locale/ckb.js
/**
* @type {Locale}
* @category Locales
* @summary Central Kurdish locale.
* @language Central Kurdish
* @iso-639-2 kur
* @author Revan Sarbast [@Revan99]{@link https://github.com/Revan99}
*/
var ckb = {
	code: "ckb",
	formatDistance: formatDistance$69,
	formatLong: formatLong$77,
	formatRelative: formatRelative$69,
	localize: {
		ordinalNumber: ordinalNumber$69,
		era: buildLocalizeFn({
			values: eraValues$69,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$69,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$69,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$69,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$69,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$54,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(th|st|nd|rd)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(پ|د)/i,
				abbreviated: /^(پ-ز|د.ز)/i,
				wide: /^(پێش زاین| دوای زاین)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^د/g, /^پ/g] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^م[1234]چ/i,
				wide: /^(یەکەم|دووەم|سێیەم| چوارەم) (چارەگی)? quarter/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				wide: [
					/چارەگی یەکەم/,
					/چارەگی دووەم/,
					/چارەگی سيیەم/,
					/چارەگی چوارەم/
				],
				any: [
					/1/i,
					/2/i,
					/3/i,
					/4/i
				]
			},
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^(ک-د|ش|ئا|ن|م|ح|ت|ئە|تش-ی|تش-د|ک-ی)/i,
				abbreviated: /^(کان-دوو|شوب|ئاد|نیس|مایس|حوز|تەم|ئاب|ئەل|تش-یەک|تش-دوو|کان-یەک)/i,
				wide: /^(کانوونی دووەم|شوبات|ئادار|نیسان|مایس|حوزەیران|تەمموز|ئاب|ئەیلول|تشرینی یەکەم|تشرینی دووەم|کانوونی یەکەم)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ک-د/i,
					/^ش/i,
					/^ئا/i,
					/^ن/i,
					/^م/i,
					/^ح/i,
					/^ت/i,
					/^ئا/i,
					/^ئە/i,
					/^تش-ی/i,
					/^تش-د/i,
					/^ک-ی/i
				],
				any: [
					/^کان-دوو/i,
					/^شوب/i,
					/^ئاد/i,
					/^نیس/i,
					/^مایس/i,
					/^حوز/i,
					/^تەم/i,
					/^ئاب/i,
					/^ئەل/i,
					/^تش-یەک/i,
					/^تش-دوو/i,
					/^|کان-یەک/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^(ش|ی|د|س|چ|پ|هە)/i,
				short: /^(یە-شە|دوو-شە|سێ-شە|چو-شە|پێ-شە|هە|شە)/i,
				abbreviated: /^(یەک-شەم|دوو-شەم|سێ-شەم|چوار-شەم|پێنخ-شەم|هەینی|شەمە)/i,
				wide: /^(یەک شەمە|دوو شەمە|سێ شەمە|چوار شەمە|پێنج شەمە|هەینی|شەمە)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^s/i,
					/^m/i,
					/^t/i,
					/^w/i,
					/^t/i,
					/^f/i,
					/^s/i
				],
				any: [
					/^su/i,
					/^m/i,
					/^tu/i,
					/^w/i,
					/^th/i,
					/^f/i,
					/^sa/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(پ|د|ن-ش|ن| (بەیانی|دوای نیوەڕۆ|ئێوارە|شەو))/i,
				abbreviated: /^(پ-ن|د-ن|نیوە شەو|نیوەڕۆ|بەیانی|دوای نیوەڕۆ|ئێوارە|شەو)/,
				wide: /^(پێش نیوەڕۆ|دوای نیوەڕۆ|نیوەڕۆ|نیوە شەو|لەبەیانیدا|لەدواینیوەڕۆدا|لە ئێوارەدا|لە شەودا)/,
				any: /^(پ|د|بەیانی|نیوەڕۆ|ئێوارە|شەو)/
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^د/i,
				pm: /^پ/i,
				midnight: /^ن-ش/i,
				noon: /^ن/i,
				morning: /بەیانی/i,
				afternoon: /دواینیوەڕۆ/i,
				evening: /ئێوارە/i,
				night: /شەو/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 0,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/cs/_lib/formatDistance.js
var formatDistanceLocale$67 = {
	lessThanXSeconds: {
		one: {
			regular: "méně než 1 sekunda",
			past: "před méně než 1 sekundou",
			future: "za méně než 1 sekundu"
		},
		few: {
			regular: "méně než {{count}} sekundy",
			past: "před méně než {{count}} sekundami",
			future: "za méně než {{count}} sekundy"
		},
		many: {
			regular: "méně než {{count}} sekund",
			past: "před méně než {{count}} sekundami",
			future: "za méně než {{count}} sekund"
		}
	},
	xSeconds: {
		one: {
			regular: "1 sekunda",
			past: "před 1 sekundou",
			future: "za 1 sekundu"
		},
		few: {
			regular: "{{count}} sekundy",
			past: "před {{count}} sekundami",
			future: "za {{count}} sekundy"
		},
		many: {
			regular: "{{count}} sekund",
			past: "před {{count}} sekundami",
			future: "za {{count}} sekund"
		}
	},
	halfAMinute: {
		type: "other",
		other: {
			regular: "půl minuty",
			past: "před půl minutou",
			future: "za půl minuty"
		}
	},
	lessThanXMinutes: {
		one: {
			regular: "méně než 1 minuta",
			past: "před méně než 1 minutou",
			future: "za méně než 1 minutu"
		},
		few: {
			regular: "méně než {{count}} minuty",
			past: "před méně než {{count}} minutami",
			future: "za méně než {{count}} minuty"
		},
		many: {
			regular: "méně než {{count}} minut",
			past: "před méně než {{count}} minutami",
			future: "za méně než {{count}} minut"
		}
	},
	xMinutes: {
		one: {
			regular: "1 minuta",
			past: "před 1 minutou",
			future: "za 1 minutu"
		},
		few: {
			regular: "{{count}} minuty",
			past: "před {{count}} minutami",
			future: "za {{count}} minuty"
		},
		many: {
			regular: "{{count}} minut",
			past: "před {{count}} minutami",
			future: "za {{count}} minut"
		}
	},
	aboutXHours: {
		one: {
			regular: "přibližně 1 hodina",
			past: "přibližně před 1 hodinou",
			future: "přibližně za 1 hodinu"
		},
		few: {
			regular: "přibližně {{count}} hodiny",
			past: "přibližně před {{count}} hodinami",
			future: "přibližně za {{count}} hodiny"
		},
		many: {
			regular: "přibližně {{count}} hodin",
			past: "přibližně před {{count}} hodinami",
			future: "přibližně za {{count}} hodin"
		}
	},
	xHours: {
		one: {
			regular: "1 hodina",
			past: "před 1 hodinou",
			future: "za 1 hodinu"
		},
		few: {
			regular: "{{count}} hodiny",
			past: "před {{count}} hodinami",
			future: "za {{count}} hodiny"
		},
		many: {
			regular: "{{count}} hodin",
			past: "před {{count}} hodinami",
			future: "za {{count}} hodin"
		}
	},
	xDays: {
		one: {
			regular: "1 den",
			past: "před 1 dnem",
			future: "za 1 den"
		},
		few: {
			regular: "{{count}} dny",
			past: "před {{count}} dny",
			future: "za {{count}} dny"
		},
		many: {
			regular: "{{count}} dní",
			past: "před {{count}} dny",
			future: "za {{count}} dní"
		}
	},
	aboutXWeeks: {
		one: {
			regular: "přibližně 1 týden",
			past: "přibližně před 1 týdnem",
			future: "přibližně za 1 týden"
		},
		few: {
			regular: "přibližně {{count}} týdny",
			past: "přibližně před {{count}} týdny",
			future: "přibližně za {{count}} týdny"
		},
		many: {
			regular: "přibližně {{count}} týdnů",
			past: "přibližně před {{count}} týdny",
			future: "přibližně za {{count}} týdnů"
		}
	},
	xWeeks: {
		one: {
			regular: "1 týden",
			past: "před 1 týdnem",
			future: "za 1 týden"
		},
		few: {
			regular: "{{count}} týdny",
			past: "před {{count}} týdny",
			future: "za {{count}} týdny"
		},
		many: {
			regular: "{{count}} týdnů",
			past: "před {{count}} týdny",
			future: "za {{count}} týdnů"
		}
	},
	aboutXMonths: {
		one: {
			regular: "přibližně 1 měsíc",
			past: "přibližně před 1 měsícem",
			future: "přibližně za 1 měsíc"
		},
		few: {
			regular: "přibližně {{count}} měsíce",
			past: "přibližně před {{count}} měsíci",
			future: "přibližně za {{count}} měsíce"
		},
		many: {
			regular: "přibližně {{count}} měsíců",
			past: "přibližně před {{count}} měsíci",
			future: "přibližně za {{count}} měsíců"
		}
	},
	xMonths: {
		one: {
			regular: "1 měsíc",
			past: "před 1 měsícem",
			future: "za 1 měsíc"
		},
		few: {
			regular: "{{count}} měsíce",
			past: "před {{count}} měsíci",
			future: "za {{count}} měsíce"
		},
		many: {
			regular: "{{count}} měsíců",
			past: "před {{count}} měsíci",
			future: "za {{count}} měsíců"
		}
	},
	aboutXYears: {
		one: {
			regular: "přibližně 1 rok",
			past: "přibližně před 1 rokem",
			future: "přibližně za 1 rok"
		},
		few: {
			regular: "přibližně {{count}} roky",
			past: "přibližně před {{count}} roky",
			future: "přibližně za {{count}} roky"
		},
		many: {
			regular: "přibližně {{count}} roků",
			past: "přibližně před {{count}} roky",
			future: "přibližně za {{count}} roků"
		}
	},
	xYears: {
		one: {
			regular: "1 rok",
			past: "před 1 rokem",
			future: "za 1 rok"
		},
		few: {
			regular: "{{count}} roky",
			past: "před {{count}} roky",
			future: "za {{count}} roky"
		},
		many: {
			regular: "{{count}} roků",
			past: "před {{count}} roky",
			future: "za {{count}} roků"
		}
	},
	overXYears: {
		one: {
			regular: "více než 1 rok",
			past: "před více než 1 rokem",
			future: "za více než 1 rok"
		},
		few: {
			regular: "více než {{count}} roky",
			past: "před více než {{count}} roky",
			future: "za více než {{count}} roky"
		},
		many: {
			regular: "více než {{count}} roků",
			past: "před více než {{count}} roky",
			future: "za více než {{count}} roků"
		}
	},
	almostXYears: {
		one: {
			regular: "skoro 1 rok",
			past: "skoro před 1 rokem",
			future: "skoro za 1 rok"
		},
		few: {
			regular: "skoro {{count}} roky",
			past: "skoro před {{count}} roky",
			future: "skoro za {{count}} roky"
		},
		many: {
			regular: "skoro {{count}} roků",
			past: "skoro před {{count}} roky",
			future: "skoro za {{count}} roků"
		}
	}
};
var formatDistance$68 = (token, count, options) => {
	let pluralResult;
	const tokenValue = formatDistanceLocale$67[token];
	if (tokenValue.type === "other") pluralResult = tokenValue.other;
	else if (count === 1) pluralResult = tokenValue.one;
	else if (count > 1 && count < 5) pluralResult = tokenValue.few;
	else pluralResult = tokenValue.many;
	const suffixExist = options?.addSuffix === true;
	const comparison = options?.comparison;
	let timeResult;
	if (suffixExist && comparison === -1) timeResult = pluralResult.past;
	else if (suffixExist && comparison === 1) timeResult = pluralResult.future;
	else timeResult = pluralResult.regular;
	return timeResult.replace("{{count}}", String(count));
};
var formatLong$76 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, d. MMMM yyyy",
			long: "d. MMMM yyyy",
			medium: "d. M. yyyy",
			short: "dd.MM.yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "H:mm:ss zzzz",
			long: "H:mm:ss z",
			medium: "H:mm:ss",
			short: "H:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'v' {{time}}",
			long: "{{date}} 'v' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/cs/_lib/formatRelative.js
var accusativeWeekdays$5 = [
	"neděli",
	"pondělí",
	"úterý",
	"středu",
	"čtvrtek",
	"pátek",
	"sobotu"
];
var formatRelativeLocale$68 = {
	lastWeek: "'poslední' eeee 've' p",
	yesterday: "'včera v' p",
	today: "'dnes v' p",
	tomorrow: "'zítra v' p",
	nextWeek: (date) => {
		return "'v " + accusativeWeekdays$5[date.getDay()] + " o' p";
	},
	other: "P"
};
var formatRelative$68 = (token, date) => {
	const format = formatRelativeLocale$68[token];
	if (typeof format === "function") return format(date);
	return format;
};
//#endregion
//#region ../../node_modules/date-fns/locale/cs/_lib/localize.js
var eraValues$68 = {
	narrow: ["př. n. l.", "n. l."],
	abbreviated: ["př. n. l.", "n. l."],
	wide: ["před naším letopočtem", "našeho letopočtu"]
};
var quarterValues$68 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"1. čtvrtletí",
		"2. čtvrtletí",
		"3. čtvrtletí",
		"4. čtvrtletí"
	],
	wide: [
		"1. čtvrtletí",
		"2. čtvrtletí",
		"3. čtvrtletí",
		"4. čtvrtletí"
	]
};
var monthValues$68 = {
	narrow: [
		"L",
		"Ú",
		"B",
		"D",
		"K",
		"Č",
		"Č",
		"S",
		"Z",
		"Ř",
		"L",
		"P"
	],
	abbreviated: [
		"led",
		"úno",
		"bře",
		"dub",
		"kvě",
		"čvn",
		"čvc",
		"srp",
		"zář",
		"říj",
		"lis",
		"pro"
	],
	wide: [
		"leden",
		"únor",
		"březen",
		"duben",
		"květen",
		"červen",
		"červenec",
		"srpen",
		"září",
		"říjen",
		"listopad",
		"prosinec"
	]
};
var formattingMonthValues$15 = {
	narrow: [
		"L",
		"Ú",
		"B",
		"D",
		"K",
		"Č",
		"Č",
		"S",
		"Z",
		"Ř",
		"L",
		"P"
	],
	abbreviated: [
		"led",
		"úno",
		"bře",
		"dub",
		"kvě",
		"čvn",
		"čvc",
		"srp",
		"zář",
		"říj",
		"lis",
		"pro"
	],
	wide: [
		"ledna",
		"února",
		"března",
		"dubna",
		"května",
		"června",
		"července",
		"srpna",
		"září",
		"října",
		"listopadu",
		"prosince"
	]
};
var dayValues$68 = {
	narrow: [
		"ne",
		"po",
		"út",
		"st",
		"čt",
		"pá",
		"so"
	],
	short: [
		"ne",
		"po",
		"út",
		"st",
		"čt",
		"pá",
		"so"
	],
	abbreviated: [
		"ned",
		"pon",
		"úte",
		"stř",
		"čtv",
		"pát",
		"sob"
	],
	wide: [
		"neděle",
		"pondělí",
		"úterý",
		"středa",
		"čtvrtek",
		"pátek",
		"sobota"
	]
};
var dayPeriodValues$68 = {
	narrow: {
		am: "dop.",
		pm: "odp.",
		midnight: "půlnoc",
		noon: "poledne",
		morning: "ráno",
		afternoon: "odpoledne",
		evening: "večer",
		night: "noc"
	},
	abbreviated: {
		am: "dop.",
		pm: "odp.",
		midnight: "půlnoc",
		noon: "poledne",
		morning: "ráno",
		afternoon: "odpoledne",
		evening: "večer",
		night: "noc"
	},
	wide: {
		am: "dopoledne",
		pm: "odpoledne",
		midnight: "půlnoc",
		noon: "poledne",
		morning: "ráno",
		afternoon: "odpoledne",
		evening: "večer",
		night: "noc"
	}
};
var formattingDayPeriodValues$53 = {
	narrow: {
		am: "dop.",
		pm: "odp.",
		midnight: "půlnoc",
		noon: "poledne",
		morning: "ráno",
		afternoon: "odpoledne",
		evening: "večer",
		night: "noc"
	},
	abbreviated: {
		am: "dop.",
		pm: "odp.",
		midnight: "půlnoc",
		noon: "poledne",
		morning: "ráno",
		afternoon: "odpoledne",
		evening: "večer",
		night: "noc"
	},
	wide: {
		am: "dopoledne",
		pm: "odpoledne",
		midnight: "půlnoc",
		noon: "poledne",
		morning: "ráno",
		afternoon: "odpoledne",
		evening: "večer",
		night: "noc"
	}
};
var ordinalNumber$68 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + ".";
};
//#endregion
//#region ../../node_modules/date-fns/locale/cs.js
/**
* @category Locales
* @summary Czech locale.
* @language Czech
* @iso-639-2 ces
* @author David Rus [@davidrus](https://github.com/davidrus)
* @author Pavel Hrách [@SilenY](https://github.com/SilenY)
* @author Jozef Bíroš [@JozefBiros](https://github.com/JozefBiros)
*/
var cs = {
	code: "cs",
	formatDistance: formatDistance$68,
	formatLong: formatLong$76,
	formatRelative: formatRelative$68,
	localize: {
		ordinalNumber: ordinalNumber$68,
		era: buildLocalizeFn({
			values: eraValues$68,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$68,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$68,
			defaultWidth: "wide",
			formattingValues: formattingMonthValues$15,
			defaultFormattingWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$68,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$68,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$53,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)\.?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(p[řr](\.|ed) Kr\.|p[řr](\.|ed) n\. l\.|po Kr\.|n\. l\.)/i,
				abbreviated: /^(p[řr](\.|ed) Kr\.|p[řr](\.|ed) n\. l\.|po Kr\.|n\. l\.)/i,
				wide: /^(p[řr](\.|ed) Kristem|p[řr](\.|ed) na[šs][íi]m letopo[čc]tem|po Kristu|na[šs]eho letopo[čc]tu)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^p[řr]/i, /^(po|n)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^[1234]\. [čc]tvrtlet[íi]/i,
				wide: /^[1234]\. [čc]tvrtlet[íi]/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[lúubdkčcszřrlp]/i,
				abbreviated: /^(led|[úu]no|b[řr]e|dub|kv[ěe]|[čc]vn|[čc]vc|srp|z[áa][řr]|[řr][íi]j|lis|pro)/i,
				wide: /^(leden|ledna|[úu]nora?|b[řr]ezen|b[řr]ezna|duben|dubna|kv[ěe]ten|kv[ěe]tna|[čc]erven(ec|ce)?|[čc]ervna|srpen|srpna|z[áa][řr][íi]|[řr][íi]jen|[řr][íi]jna|listopad(a|u)?|prosinec|prosince)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^l/i,
					/^[úu]/i,
					/^b/i,
					/^d/i,
					/^k/i,
					/^[čc]/i,
					/^[čc]/i,
					/^s/i,
					/^z/i,
					/^[řr]/i,
					/^l/i,
					/^p/i
				],
				any: [
					/^led/i,
					/^[úu]n/i,
					/^b[řr]e/i,
					/^dub/i,
					/^kv[ěe]/i,
					/^[čc]vn|[čc]erven(?!\w)|[čc]ervna/i,
					/^[čc]vc|[čc]erven(ec|ce)/i,
					/^srp/i,
					/^z[áa][řr]/i,
					/^[řr][íi]j/i,
					/^lis/i,
					/^pro/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[npuúsčps]/i,
				short: /^(ne|po|[úu]t|st|[čc]t|p[áa]|so)/i,
				abbreviated: /^(ned|pon|[úu]te|st[rř]|[čc]tv|p[áa]t|sob)/i,
				wide: /^(ned[ěe]le|pond[ěe]l[íi]|[úu]ter[ýy]|st[řr]eda|[čc]tvrtek|p[áa]tek|sobota)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^n/i,
					/^p/i,
					/^[úu]/i,
					/^s/i,
					/^[čc]/i,
					/^p/i,
					/^s/i
				],
				any: [
					/^ne/i,
					/^po/i,
					/^[úu]t/i,
					/^st/i,
					/^[čc]t/i,
					/^p[áa]/i,
					/^so/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: { any: /^dopoledne|dop\.?|odpoledne|odp\.?|p[ůu]lnoc|poledne|r[áa]no|odpoledne|ve[čc]er|(v )?noci?/i },
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^dop/i,
				pm: /^odp/i,
				midnight: /^p[ůu]lnoc/i,
				noon: /^poledne/i,
				morning: /r[áa]no/i,
				afternoon: /odpoledne/i,
				evening: /ve[čc]er/i,
				night: /noc/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/cy/_lib/formatDistance.js
var formatDistanceLocale$66 = {
	lessThanXSeconds: {
		one: "llai na eiliad",
		other: "llai na {{count}} eiliad"
	},
	xSeconds: {
		one: "1 eiliad",
		other: "{{count}} eiliad"
	},
	halfAMinute: "hanner munud",
	lessThanXMinutes: {
		one: "llai na munud",
		two: "llai na 2 funud",
		other: "llai na {{count}} munud"
	},
	xMinutes: {
		one: "1 munud",
		two: "2 funud",
		other: "{{count}} munud"
	},
	aboutXHours: {
		one: "tua 1 awr",
		other: "tua {{count}} awr"
	},
	xHours: {
		one: "1 awr",
		other: "{{count}} awr"
	},
	xDays: {
		one: "1 diwrnod",
		two: "2 ddiwrnod",
		other: "{{count}} diwrnod"
	},
	aboutXWeeks: {
		one: "tua 1 wythnos",
		two: "tua pythefnos",
		other: "tua {{count}} wythnos"
	},
	xWeeks: {
		one: "1 wythnos",
		two: "pythefnos",
		other: "{{count}} wythnos"
	},
	aboutXMonths: {
		one: "tua 1 mis",
		two: "tua 2 fis",
		other: "tua {{count}} mis"
	},
	xMonths: {
		one: "1 mis",
		two: "2 fis",
		other: "{{count}} mis"
	},
	aboutXYears: {
		one: "tua 1 flwyddyn",
		two: "tua 2 flynedd",
		other: "tua {{count}} mlynedd"
	},
	xYears: {
		one: "1 flwyddyn",
		two: "2 flynedd",
		other: "{{count}} mlynedd"
	},
	overXYears: {
		one: "dros 1 flwyddyn",
		two: "dros 2 flynedd",
		other: "dros {{count}} mlynedd"
	},
	almostXYears: {
		one: "bron 1 flwyddyn",
		two: "bron 2 flynedd",
		other: "bron {{count}} mlynedd"
	}
};
var formatDistance$67 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$66[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else if (count === 2 && !!tokenValue.two) result = tokenValue.two;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "mewn " + result;
	else return result + " yn ôl";
	return result;
};
var formatLong$75 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, d MMMM yyyy",
			long: "d MMMM yyyy",
			medium: "d MMM yyyy",
			short: "dd/MM/yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "h:mm:ss a zzzz",
			long: "h:mm:ss a z",
			medium: "h:mm:ss a",
			short: "h:mm a"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'am' {{time}}",
			long: "{{date}} 'am' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/cy/_lib/formatRelative.js
var formatRelativeLocale$67 = {
	lastWeek: "eeee 'diwethaf am' p",
	yesterday: "'ddoe am' p",
	today: "'heddiw am' p",
	tomorrow: "'yfory am' p",
	nextWeek: "eeee 'am' p",
	other: "P"
};
var formatRelative$67 = (token, _date, _baseDate, _options) => formatRelativeLocale$67[token];
//#endregion
//#region ../../node_modules/date-fns/locale/cy/_lib/localize.js
var eraValues$67 = {
	narrow: ["C", "O"],
	abbreviated: ["CC", "OC"],
	wide: ["Cyn Crist", "Ar ôl Crist"]
};
var quarterValues$67 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"Ch1",
		"Ch2",
		"Ch3",
		"Ch4"
	],
	wide: [
		"Chwarter 1af",
		"2ail chwarter",
		"3ydd chwarter",
		"4ydd chwarter"
	]
};
var monthValues$67 = {
	narrow: [
		"I",
		"Ch",
		"Ma",
		"E",
		"Mi",
		"Me",
		"G",
		"A",
		"Md",
		"H",
		"T",
		"Rh"
	],
	abbreviated: [
		"Ion",
		"Chwe",
		"Maw",
		"Ebr",
		"Mai",
		"Meh",
		"Gor",
		"Aws",
		"Med",
		"Hyd",
		"Tach",
		"Rhag"
	],
	wide: [
		"Ionawr",
		"Chwefror",
		"Mawrth",
		"Ebrill",
		"Mai",
		"Mehefin",
		"Gorffennaf",
		"Awst",
		"Medi",
		"Hydref",
		"Tachwedd",
		"Rhagfyr"
	]
};
var dayValues$67 = {
	narrow: [
		"S",
		"Ll",
		"M",
		"M",
		"I",
		"G",
		"S"
	],
	short: [
		"Su",
		"Ll",
		"Ma",
		"Me",
		"Ia",
		"Gw",
		"Sa"
	],
	abbreviated: [
		"Sul",
		"Llun",
		"Maw",
		"Mer",
		"Iau",
		"Gwe",
		"Sad"
	],
	wide: [
		"dydd Sul",
		"dydd Llun",
		"dydd Mawrth",
		"dydd Mercher",
		"dydd Iau",
		"dydd Gwener",
		"dydd Sadwrn"
	]
};
var dayPeriodValues$67 = {
	narrow: {
		am: "b",
		pm: "h",
		midnight: "hn",
		noon: "hd",
		morning: "bore",
		afternoon: "prynhawn",
		evening: "gyda'r nos",
		night: "nos"
	},
	abbreviated: {
		am: "yb",
		pm: "yh",
		midnight: "hanner nos",
		noon: "hanner dydd",
		morning: "bore",
		afternoon: "prynhawn",
		evening: "gyda'r nos",
		night: "nos"
	},
	wide: {
		am: "y.b.",
		pm: "y.h.",
		midnight: "hanner nos",
		noon: "hanner dydd",
		morning: "bore",
		afternoon: "prynhawn",
		evening: "gyda'r nos",
		night: "nos"
	}
};
var formattingDayPeriodValues$52 = {
	narrow: {
		am: "b",
		pm: "h",
		midnight: "hn",
		noon: "hd",
		morning: "yn y bore",
		afternoon: "yn y prynhawn",
		evening: "gyda'r nos",
		night: "yn y nos"
	},
	abbreviated: {
		am: "yb",
		pm: "yh",
		midnight: "hanner nos",
		noon: "hanner dydd",
		morning: "yn y bore",
		afternoon: "yn y prynhawn",
		evening: "gyda'r nos",
		night: "yn y nos"
	},
	wide: {
		am: "y.b.",
		pm: "y.h.",
		midnight: "hanner nos",
		noon: "hanner dydd",
		morning: "yn y bore",
		afternoon: "yn y prynhawn",
		evening: "gyda'r nos",
		night: "yn y nos"
	}
};
var ordinalNumber$67 = (dirtyNumber, _options) => {
	const number = Number(dirtyNumber);
	if (number < 20) switch (number) {
		case 0: return number + "fed";
		case 1: return number + "af";
		case 2: return number + "ail";
		case 3:
		case 4: return number + "ydd";
		case 5:
		case 6: return number + "ed";
		case 7:
		case 8:
		case 9:
		case 10:
		case 12:
		case 15:
		case 18: return number + "fed";
		case 11:
		case 13:
		case 14:
		case 16:
		case 17:
		case 19: return number + "eg";
	}
	else if (number >= 50 && number <= 60 || number === 80 || number >= 100) return number + "fed";
	return number + "ain";
};
//#endregion
//#region ../../node_modules/date-fns/locale/cy.js
/**
* @category Locales
* @summary Welsh locale.
* @language Welsh
* @iso-639-2 cym
* @author Elwyn Malethan [@elmomalmo](https://github.com/elmomalmo)
*/
var cy = {
	code: "cy",
	formatDistance: formatDistance$67,
	formatLong: formatLong$75,
	formatRelative: formatRelative$67,
	localize: {
		ordinalNumber: ordinalNumber$67,
		era: buildLocalizeFn({
			values: eraValues$67,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$67,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$67,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$67,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$67,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$52,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(af|ail|ydd|ed|fed|eg|ain)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(c|o)/i,
				abbreviated: /^(c\.?\s?c\.?|o\.?\s?c\.?)/i,
				wide: /^(cyn christ|ar ôl crist|ar ol crist)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				wide: [/^c/i, /^(ar ôl crist|ar ol crist)/i],
				any: [/^c/i, /^o/i]
			},
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^ch[1234]/i,
				wide: /^(chwarter 1af)|([234](ail|ydd)? chwarter)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^(i|ch|m|e|g|a|h|t|rh)/i,
				abbreviated: /^(ion|chwe|maw|ebr|mai|meh|gor|aws|med|hyd|tach|rhag)/i,
				wide: /^(ionawr|chwefror|mawrth|ebrill|mai|mehefin|gorffennaf|awst|medi|hydref|tachwedd|rhagfyr)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^i/i,
					/^ch/i,
					/^m/i,
					/^e/i,
					/^m/i,
					/^m/i,
					/^g/i,
					/^a/i,
					/^m/i,
					/^h/i,
					/^t/i,
					/^rh/i
				],
				any: [
					/^io/i,
					/^ch/i,
					/^maw/i,
					/^e/i,
					/^mai/i,
					/^meh/i,
					/^g/i,
					/^a/i,
					/^med/i,
					/^h/i,
					/^t/i,
					/^rh/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^(s|ll|m|i|g)/i,
				short: /^(su|ll|ma|me|ia|gw|sa)/i,
				abbreviated: /^(sul|llun|maw|mer|iau|gwe|sad)/i,
				wide: /^dydd (sul|llun|mawrth|mercher|iau|gwener|sadwrn)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^s/i,
					/^ll/i,
					/^m/i,
					/^m/i,
					/^i/i,
					/^g/i,
					/^s/i
				],
				wide: [
					/^dydd su/i,
					/^dydd ll/i,
					/^dydd ma/i,
					/^dydd me/i,
					/^dydd i/i,
					/^dydd g/i,
					/^dydd sa/i
				],
				any: [
					/^su/i,
					/^ll/i,
					/^ma/i,
					/^me/i,
					/^i/i,
					/^g/i,
					/^sa/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(b|h|hn|hd|(yn y|y|yr|gyda'r) (bore|prynhawn|nos|hwyr))/i,
				any: /^(y\.?\s?[bh]\.?|hanner nos|hanner dydd|(yn y|y|yr|gyda'r) (bore|prynhawn|nos|hwyr))/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^b|(y\.?\s?b\.?)/i,
				pm: /^h|(y\.?\s?h\.?)|(yr hwyr)/i,
				midnight: /^hn|hanner nos/i,
				noon: /^hd|hanner dydd/i,
				morning: /bore/i,
				afternoon: /prynhawn/i,
				evening: /^gyda'r nos$/i,
				night: /blah/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 0,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/da/_lib/formatDistance.js
var formatDistanceLocale$65 = {
	lessThanXSeconds: {
		one: "mindre end ét sekund",
		other: "mindre end {{count}} sekunder"
	},
	xSeconds: {
		one: "1 sekund",
		other: "{{count}} sekunder"
	},
	halfAMinute: "ét halvt minut",
	lessThanXMinutes: {
		one: "mindre end ét minut",
		other: "mindre end {{count}} minutter"
	},
	xMinutes: {
		one: "1 minut",
		other: "{{count}} minutter"
	},
	aboutXHours: {
		one: "cirka 1 time",
		other: "cirka {{count}} timer"
	},
	xHours: {
		one: "1 time",
		other: "{{count}} timer"
	},
	xDays: {
		one: "1 dag",
		other: "{{count}} dage"
	},
	aboutXWeeks: {
		one: "cirka 1 uge",
		other: "cirka {{count}} uger"
	},
	xWeeks: {
		one: "1 uge",
		other: "{{count}} uger"
	},
	aboutXMonths: {
		one: "cirka 1 måned",
		other: "cirka {{count}} måneder"
	},
	xMonths: {
		one: "1 måned",
		other: "{{count}} måneder"
	},
	aboutXYears: {
		one: "cirka 1 år",
		other: "cirka {{count}} år"
	},
	xYears: {
		one: "1 år",
		other: "{{count}} år"
	},
	overXYears: {
		one: "over 1 år",
		other: "over {{count}} år"
	},
	almostXYears: {
		one: "næsten 1 år",
		other: "næsten {{count}} år"
	}
};
var formatDistance$66 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$65[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "om " + result;
	else return result + " siden";
	return result;
};
var formatLong$74 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE 'den' d. MMMM y",
			long: "d. MMMM y",
			medium: "d. MMM y",
			short: "dd/MM/y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'kl'. {{time}}",
			long: "{{date}} 'kl'. {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/da/_lib/formatRelative.js
var formatRelativeLocale$66 = {
	lastWeek: "'sidste' eeee 'kl.' p",
	yesterday: "'i går kl.' p",
	today: "'i dag kl.' p",
	tomorrow: "'i morgen kl.' p",
	nextWeek: "'på' eeee 'kl.' p",
	other: "P"
};
var formatRelative$66 = (token, _date, _baseDate, _options) => formatRelativeLocale$66[token];
//#endregion
//#region ../../node_modules/date-fns/locale/da/_lib/localize.js
var eraValues$66 = {
	narrow: ["fvt", "vt"],
	abbreviated: ["f.v.t.", "v.t."],
	wide: ["før vesterlandsk tidsregning", "vesterlandsk tidsregning"]
};
var quarterValues$66 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"1. kvt.",
		"2. kvt.",
		"3. kvt.",
		"4. kvt."
	],
	wide: [
		"1. kvartal",
		"2. kvartal",
		"3. kvartal",
		"4. kvartal"
	]
};
var monthValues$66 = {
	narrow: [
		"J",
		"F",
		"M",
		"A",
		"M",
		"J",
		"J",
		"A",
		"S",
		"O",
		"N",
		"D"
	],
	abbreviated: [
		"jan.",
		"feb.",
		"mar.",
		"apr.",
		"maj",
		"jun.",
		"jul.",
		"aug.",
		"sep.",
		"okt.",
		"nov.",
		"dec."
	],
	wide: [
		"januar",
		"februar",
		"marts",
		"april",
		"maj",
		"juni",
		"juli",
		"august",
		"september",
		"oktober",
		"november",
		"december"
	]
};
var dayValues$66 = {
	narrow: [
		"S",
		"M",
		"T",
		"O",
		"T",
		"F",
		"L"
	],
	short: [
		"sø",
		"ma",
		"ti",
		"on",
		"to",
		"fr",
		"lø"
	],
	abbreviated: [
		"søn.",
		"man.",
		"tir.",
		"ons.",
		"tor.",
		"fre.",
		"lør."
	],
	wide: [
		"søndag",
		"mandag",
		"tirsdag",
		"onsdag",
		"torsdag",
		"fredag",
		"lørdag"
	]
};
var dayPeriodValues$66 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "midnat",
		noon: "middag",
		morning: "morgen",
		afternoon: "eftermiddag",
		evening: "aften",
		night: "nat"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "midnat",
		noon: "middag",
		morning: "morgen",
		afternoon: "eftermiddag",
		evening: "aften",
		night: "nat"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "midnat",
		noon: "middag",
		morning: "morgen",
		afternoon: "eftermiddag",
		evening: "aften",
		night: "nat"
	}
};
var formattingDayPeriodValues$51 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "midnat",
		noon: "middag",
		morning: "om morgenen",
		afternoon: "om eftermiddagen",
		evening: "om aftenen",
		night: "om natten"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "midnat",
		noon: "middag",
		morning: "om morgenen",
		afternoon: "om eftermiddagen",
		evening: "om aftenen",
		night: "om natten"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "midnat",
		noon: "middag",
		morning: "om morgenen",
		afternoon: "om eftermiddagen",
		evening: "om aftenen",
		night: "om natten"
	}
};
var ordinalNumber$66 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + ".";
};
//#endregion
//#region ../../node_modules/date-fns/locale/da.js
/**
* @category Locales
* @summary Danish locale.
* @language Danish
* @iso-639-2 dan
* @author Mathias Wøbbe [@MathiasKandelborg](https://github.com/MathiasKandelborg)
* @author Anders B. Hansen [@Andersbiha](https://github.com/Andersbiha)
* @author [@kgram](https://github.com/kgram)
* @author [@stefanbugge](https://github.com/stefanbugge)
*/
var da = {
	code: "da",
	formatDistance: formatDistance$66,
	formatLong: formatLong$74,
	formatRelative: formatRelative$66,
	localize: {
		ordinalNumber: ordinalNumber$66,
		era: buildLocalizeFn({
			values: eraValues$66,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$66,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$66,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$66,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$66,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$51,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(\.)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(fKr|fvt|eKr|vt)/i,
				abbreviated: /^(f\.Kr\.?|f\.v\.t\.?|e\.Kr\.?|v\.t\.)/i,
				wide: /^(f.Kr.|før vesterlandsk tidsregning|e.Kr.|vesterlandsk tidsregning)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^f/i, /^(v|e)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^[1234]. kvt\./i,
				wide: /^[1234]\.? kvartal/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[jfmasond]/i,
				abbreviated: /^(jan.|feb.|mar.|apr.|maj|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,
				wide: /^(januar|februar|marts|april|maj|juni|juli|august|september|oktober|november|december)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^j/i,
					/^f/i,
					/^m/i,
					/^a/i,
					/^m/i,
					/^j/i,
					/^j/i,
					/^a/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				],
				any: [
					/^ja/i,
					/^f/i,
					/^mar/i,
					/^ap/i,
					/^maj/i,
					/^jun/i,
					/^jul/i,
					/^au/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[smtofl]/i,
				short: /^(søn.|man.|tir.|ons.|tor.|fre.|lør.)/i,
				abbreviated: /^(søn|man|tir|ons|tor|fre|lør)/i,
				wide: /^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^s/i,
					/^m/i,
					/^t/i,
					/^o/i,
					/^t/i,
					/^f/i,
					/^l/i
				],
				any: [
					/^s/i,
					/^m/i,
					/^ti/i,
					/^o/i,
					/^to/i,
					/^f/i,
					/^l/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(a|p|midnat|middag|(om) (morgenen|eftermiddagen|aftenen|natten))/i,
				any: /^([ap]\.?\s?m\.?|midnat|middag|(om) (morgenen|eftermiddagen|aftenen|natten))/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a/i,
				pm: /^p/i,
				midnight: /midnat/i,
				noon: /middag/i,
				morning: /morgen/i,
				afternoon: /eftermiddag/i,
				evening: /aften/i,
				night: /nat/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/de/_lib/formatDistance.js
var formatDistanceLocale$64 = {
	lessThanXSeconds: {
		standalone: {
			one: "weniger als 1 Sekunde",
			other: "weniger als {{count}} Sekunden"
		},
		withPreposition: {
			one: "weniger als 1 Sekunde",
			other: "weniger als {{count}} Sekunden"
		}
	},
	xSeconds: {
		standalone: {
			one: "1 Sekunde",
			other: "{{count}} Sekunden"
		},
		withPreposition: {
			one: "1 Sekunde",
			other: "{{count}} Sekunden"
		}
	},
	halfAMinute: {
		standalone: "eine halbe Minute",
		withPreposition: "einer halben Minute"
	},
	lessThanXMinutes: {
		standalone: {
			one: "weniger als 1 Minute",
			other: "weniger als {{count}} Minuten"
		},
		withPreposition: {
			one: "weniger als 1 Minute",
			other: "weniger als {{count}} Minuten"
		}
	},
	xMinutes: {
		standalone: {
			one: "1 Minute",
			other: "{{count}} Minuten"
		},
		withPreposition: {
			one: "1 Minute",
			other: "{{count}} Minuten"
		}
	},
	aboutXHours: {
		standalone: {
			one: "etwa 1 Stunde",
			other: "etwa {{count}} Stunden"
		},
		withPreposition: {
			one: "etwa 1 Stunde",
			other: "etwa {{count}} Stunden"
		}
	},
	xHours: {
		standalone: {
			one: "1 Stunde",
			other: "{{count}} Stunden"
		},
		withPreposition: {
			one: "1 Stunde",
			other: "{{count}} Stunden"
		}
	},
	xDays: {
		standalone: {
			one: "1 Tag",
			other: "{{count}} Tage"
		},
		withPreposition: {
			one: "1 Tag",
			other: "{{count}} Tagen"
		}
	},
	aboutXWeeks: {
		standalone: {
			one: "etwa 1 Woche",
			other: "etwa {{count}} Wochen"
		},
		withPreposition: {
			one: "etwa 1 Woche",
			other: "etwa {{count}} Wochen"
		}
	},
	xWeeks: {
		standalone: {
			one: "1 Woche",
			other: "{{count}} Wochen"
		},
		withPreposition: {
			one: "1 Woche",
			other: "{{count}} Wochen"
		}
	},
	aboutXMonths: {
		standalone: {
			one: "etwa 1 Monat",
			other: "etwa {{count}} Monate"
		},
		withPreposition: {
			one: "etwa 1 Monat",
			other: "etwa {{count}} Monaten"
		}
	},
	xMonths: {
		standalone: {
			one: "1 Monat",
			other: "{{count}} Monate"
		},
		withPreposition: {
			one: "1 Monat",
			other: "{{count}} Monaten"
		}
	},
	aboutXYears: {
		standalone: {
			one: "etwa 1 Jahr",
			other: "etwa {{count}} Jahre"
		},
		withPreposition: {
			one: "etwa 1 Jahr",
			other: "etwa {{count}} Jahren"
		}
	},
	xYears: {
		standalone: {
			one: "1 Jahr",
			other: "{{count}} Jahre"
		},
		withPreposition: {
			one: "1 Jahr",
			other: "{{count}} Jahren"
		}
	},
	overXYears: {
		standalone: {
			one: "mehr als 1 Jahr",
			other: "mehr als {{count}} Jahre"
		},
		withPreposition: {
			one: "mehr als 1 Jahr",
			other: "mehr als {{count}} Jahren"
		}
	},
	almostXYears: {
		standalone: {
			one: "fast 1 Jahr",
			other: "fast {{count}} Jahre"
		},
		withPreposition: {
			one: "fast 1 Jahr",
			other: "fast {{count}} Jahren"
		}
	}
};
var formatDistance$65 = (token, count, options) => {
	let result;
	const tokenValue = options?.addSuffix ? formatDistanceLocale$64[token].withPreposition : formatDistanceLocale$64[token].standalone;
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "in " + result;
	else return "vor " + result;
	return result;
};
var formatLong$73 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, do MMMM y",
			long: "do MMMM y",
			medium: "do MMM y",
			short: "dd.MM.y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'um' {{time}}",
			long: "{{date}} 'um' {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/de/_lib/formatRelative.js
var formatRelativeLocale$65 = {
	lastWeek: "'letzten' eeee 'um' p",
	yesterday: "'gestern um' p",
	today: "'heute um' p",
	tomorrow: "'morgen um' p",
	nextWeek: "eeee 'um' p",
	other: "P"
};
var formatRelative$65 = (token, _date, _baseDate, _options) => formatRelativeLocale$65[token];
//#endregion
//#region ../../node_modules/date-fns/locale/de/_lib/localize.js
var eraValues$65 = {
	narrow: ["v.Chr.", "n.Chr."],
	abbreviated: ["v.Chr.", "n.Chr."],
	wide: ["vor Christus", "nach Christus"]
};
var quarterValues$65 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"Q1",
		"Q2",
		"Q3",
		"Q4"
	],
	wide: [
		"1. Quartal",
		"2. Quartal",
		"3. Quartal",
		"4. Quartal"
	]
};
var monthValues$65 = {
	narrow: [
		"J",
		"F",
		"M",
		"A",
		"M",
		"J",
		"J",
		"A",
		"S",
		"O",
		"N",
		"D"
	],
	abbreviated: [
		"Jan",
		"Feb",
		"Mär",
		"Apr",
		"Mai",
		"Jun",
		"Jul",
		"Aug",
		"Sep",
		"Okt",
		"Nov",
		"Dez"
	],
	wide: [
		"Januar",
		"Februar",
		"März",
		"April",
		"Mai",
		"Juni",
		"Juli",
		"August",
		"September",
		"Oktober",
		"November",
		"Dezember"
	]
};
var formattingMonthValues$14 = {
	narrow: monthValues$65.narrow,
	abbreviated: [
		"Jan.",
		"Feb.",
		"März",
		"Apr.",
		"Mai",
		"Juni",
		"Juli",
		"Aug.",
		"Sep.",
		"Okt.",
		"Nov.",
		"Dez."
	],
	wide: monthValues$65.wide
};
var dayValues$65 = {
	narrow: [
		"S",
		"M",
		"D",
		"M",
		"D",
		"F",
		"S"
	],
	short: [
		"So",
		"Mo",
		"Di",
		"Mi",
		"Do",
		"Fr",
		"Sa"
	],
	abbreviated: [
		"So.",
		"Mo.",
		"Di.",
		"Mi.",
		"Do.",
		"Fr.",
		"Sa."
	],
	wide: [
		"Sonntag",
		"Montag",
		"Dienstag",
		"Mittwoch",
		"Donnerstag",
		"Freitag",
		"Samstag"
	]
};
var dayPeriodValues$65 = {
	narrow: {
		am: "vm.",
		pm: "nm.",
		midnight: "Mitternacht",
		noon: "Mittag",
		morning: "Morgen",
		afternoon: "Nachm.",
		evening: "Abend",
		night: "Nacht"
	},
	abbreviated: {
		am: "vorm.",
		pm: "nachm.",
		midnight: "Mitternacht",
		noon: "Mittag",
		morning: "Morgen",
		afternoon: "Nachmittag",
		evening: "Abend",
		night: "Nacht"
	},
	wide: {
		am: "vormittags",
		pm: "nachmittags",
		midnight: "Mitternacht",
		noon: "Mittag",
		morning: "Morgen",
		afternoon: "Nachmittag",
		evening: "Abend",
		night: "Nacht"
	}
};
var formattingDayPeriodValues$50 = {
	narrow: {
		am: "vm.",
		pm: "nm.",
		midnight: "Mitternacht",
		noon: "Mittag",
		morning: "morgens",
		afternoon: "nachm.",
		evening: "abends",
		night: "nachts"
	},
	abbreviated: {
		am: "vorm.",
		pm: "nachm.",
		midnight: "Mitternacht",
		noon: "Mittag",
		morning: "morgens",
		afternoon: "nachmittags",
		evening: "abends",
		night: "nachts"
	},
	wide: {
		am: "vormittags",
		pm: "nachmittags",
		midnight: "Mitternacht",
		noon: "Mittag",
		morning: "morgens",
		afternoon: "nachmittags",
		evening: "abends",
		night: "nachts"
	}
};
var ordinalNumber$65 = (dirtyNumber) => {
	return Number(dirtyNumber) + ".";
};
var localize$65 = {
	ordinalNumber: ordinalNumber$65,
	era: buildLocalizeFn({
		values: eraValues$65,
		defaultWidth: "wide"
	}),
	quarter: buildLocalizeFn({
		values: quarterValues$65,
		defaultWidth: "wide",
		argumentCallback: (quarter) => quarter - 1
	}),
	month: buildLocalizeFn({
		values: monthValues$65,
		formattingValues: formattingMonthValues$14,
		defaultWidth: "wide"
	}),
	day: buildLocalizeFn({
		values: dayValues$65,
		defaultWidth: "wide"
	}),
	dayPeriod: buildLocalizeFn({
		values: dayPeriodValues$65,
		defaultWidth: "wide",
		formattingValues: formattingDayPeriodValues$50,
		defaultFormattingWidth: "wide"
	})
};
var match$64 = {
	ordinalNumber: buildMatchPatternFn({
		matchPattern: /^(\d+)(\.)?/i,
		parsePattern: /\d+/i,
		valueCallback: (value) => parseInt(value)
	}),
	era: buildMatchFn({
		matchPatterns: {
			narrow: /^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,
			abbreviated: /^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,
			wide: /^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i
		},
		defaultMatchWidth: "wide",
		parsePatterns: { any: [/^v/i, /^n/i] },
		defaultParseWidth: "any"
	}),
	quarter: buildMatchFn({
		matchPatterns: {
			narrow: /^[1234]/i,
			abbreviated: /^q[1234]/i,
			wide: /^[1234](\.)? Quartal/i
		},
		defaultMatchWidth: "wide",
		parsePatterns: { any: [
			/1/i,
			/2/i,
			/3/i,
			/4/i
		] },
		defaultParseWidth: "any",
		valueCallback: (index) => index + 1
	}),
	month: buildMatchFn({
		matchPatterns: {
			narrow: /^[jfmasond]/i,
			abbreviated: /^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,
			wide: /^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i
		},
		defaultMatchWidth: "wide",
		parsePatterns: {
			narrow: [
				/^j/i,
				/^f/i,
				/^m/i,
				/^a/i,
				/^m/i,
				/^j/i,
				/^j/i,
				/^a/i,
				/^s/i,
				/^o/i,
				/^n/i,
				/^d/i
			],
			any: [
				/^j[aä]/i,
				/^f/i,
				/^mär/i,
				/^ap/i,
				/^mai/i,
				/^jun/i,
				/^jul/i,
				/^au/i,
				/^s/i,
				/^o/i,
				/^n/i,
				/^d/i
			]
		},
		defaultParseWidth: "any"
	}),
	day: buildMatchFn({
		matchPatterns: {
			narrow: /^[smdmf]/i,
			short: /^(so|mo|di|mi|do|fr|sa)/i,
			abbreviated: /^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,
			wide: /^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i
		},
		defaultMatchWidth: "wide",
		parsePatterns: { any: [
			/^so/i,
			/^mo/i,
			/^di/i,
			/^mi/i,
			/^do/i,
			/^f/i,
			/^sa/i
		] },
		defaultParseWidth: "any"
	}),
	dayPeriod: buildMatchFn({
		matchPatterns: {
			narrow: /^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,
			abbreviated: /^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,
			wide: /^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i
		},
		defaultMatchWidth: "wide",
		parsePatterns: { any: {
			am: /^v/i,
			pm: /^n/i,
			midnight: /^Mitte/i,
			noon: /^Mitta/i,
			morning: /morgens/i,
			afternoon: /nachmittags/i,
			evening: /abends/i,
			night: /nachts/i
		} },
		defaultParseWidth: "any"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/de.js
/**
* @category Locales
* @summary German locale.
* @language German
* @iso-639-2 deu
* @author Thomas Eilmsteiner [@DeMuu](https://github.com/DeMuu)
* @author Asia [@asia-t](https://github.com/asia-t)
* @author Van Vuong Ngo [@vanvuongngo](https://github.com/vanvuongngo)
* @author RomanErnst [@pex](https://github.com/pex)
* @author Philipp Keck [@Philipp91](https://github.com/Philipp91)
*/
var de = {
	code: "de",
	formatDistance: formatDistance$65,
	formatLong: formatLong$73,
	formatRelative: formatRelative$65,
	localize: localize$65,
	match: match$64,
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/de-AT/_lib/localize.js
var eraValues$64 = {
	narrow: ["v.Chr.", "n.Chr."],
	abbreviated: ["v.Chr.", "n.Chr."],
	wide: ["vor Christus", "nach Christus"]
};
var quarterValues$64 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"Q1",
		"Q2",
		"Q3",
		"Q4"
	],
	wide: [
		"1. Quartal",
		"2. Quartal",
		"3. Quartal",
		"4. Quartal"
	]
};
var monthValues$64 = {
	narrow: [
		"J",
		"F",
		"M",
		"A",
		"M",
		"J",
		"J",
		"A",
		"S",
		"O",
		"N",
		"D"
	],
	abbreviated: [
		"Jän",
		"Feb",
		"Mär",
		"Apr",
		"Mai",
		"Jun",
		"Jul",
		"Aug",
		"Sep",
		"Okt",
		"Nov",
		"Dez"
	],
	wide: [
		"Jänner",
		"Februar",
		"März",
		"April",
		"Mai",
		"Juni",
		"Juli",
		"August",
		"September",
		"Oktober",
		"November",
		"Dezember"
	]
};
var formattingMonthValues$13 = {
	narrow: monthValues$64.narrow,
	abbreviated: [
		"Jän.",
		"Feb.",
		"März",
		"Apr.",
		"Mai",
		"Juni",
		"Juli",
		"Aug.",
		"Sep.",
		"Okt.",
		"Nov.",
		"Dez."
	],
	wide: monthValues$64.wide
};
var dayValues$64 = {
	narrow: [
		"S",
		"M",
		"D",
		"M",
		"D",
		"F",
		"S"
	],
	short: [
		"So",
		"Mo",
		"Di",
		"Mi",
		"Do",
		"Fr",
		"Sa"
	],
	abbreviated: [
		"So.",
		"Mo.",
		"Di.",
		"Mi.",
		"Do.",
		"Fr.",
		"Sa."
	],
	wide: [
		"Sonntag",
		"Montag",
		"Dienstag",
		"Mittwoch",
		"Donnerstag",
		"Freitag",
		"Samstag"
	]
};
var dayPeriodValues$64 = {
	narrow: {
		am: "vm.",
		pm: "nm.",
		midnight: "Mitternacht",
		noon: "Mittag",
		morning: "Morgen",
		afternoon: "Nachm.",
		evening: "Abend",
		night: "Nacht"
	},
	abbreviated: {
		am: "vorm.",
		pm: "nachm.",
		midnight: "Mitternacht",
		noon: "Mittag",
		morning: "Morgen",
		afternoon: "Nachmittag",
		evening: "Abend",
		night: "Nacht"
	},
	wide: {
		am: "vormittags",
		pm: "nachmittags",
		midnight: "Mitternacht",
		noon: "Mittag",
		morning: "Morgen",
		afternoon: "Nachmittag",
		evening: "Abend",
		night: "Nacht"
	}
};
var formattingDayPeriodValues$49 = {
	narrow: {
		am: "vm.",
		pm: "nm.",
		midnight: "Mitternacht",
		noon: "Mittag",
		morning: "morgens",
		afternoon: "nachm.",
		evening: "abends",
		night: "nachts"
	},
	abbreviated: {
		am: "vorm.",
		pm: "nachm.",
		midnight: "Mitternacht",
		noon: "Mittag",
		morning: "morgens",
		afternoon: "nachmittags",
		evening: "abends",
		night: "nachts"
	},
	wide: {
		am: "vormittags",
		pm: "nachmittags",
		midnight: "Mitternacht",
		noon: "Mittag",
		morning: "morgens",
		afternoon: "nachmittags",
		evening: "abends",
		night: "nachts"
	}
};
var ordinalNumber$64 = (dirtyNumber) => {
	return Number(dirtyNumber) + ".";
};
//#endregion
//#region ../../node_modules/date-fns/locale/de-AT.js
/**
* @category Locales
* @summary German locale (Austria).
* @language German
* @iso-639-2 deu
* @author Christoph Tobias Stenglein [@cstenglein](https://github.com/cstenglein)
*/
var deAT = {
	code: "de-AT",
	formatDistance: formatDistance$65,
	formatLong: formatLong$73,
	formatRelative: formatRelative$65,
	localize: {
		ordinalNumber: ordinalNumber$64,
		era: buildLocalizeFn({
			values: eraValues$64,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$64,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$64,
			formattingValues: formattingMonthValues$13,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$64,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$64,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$49,
			defaultFormattingWidth: "wide"
		})
	},
	match: match$64,
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/el/_lib/formatDistance.js
var formatDistanceLocale$63 = {
	lessThanXSeconds: {
		one: "λιγότερο από ένα δευτερόλεπτο",
		other: "λιγότερο από {{count}} δευτερόλεπτα"
	},
	xSeconds: {
		one: "1 δευτερόλεπτο",
		other: "{{count}} δευτερόλεπτα"
	},
	halfAMinute: "μισό λεπτό",
	lessThanXMinutes: {
		one: "λιγότερο από ένα λεπτό",
		other: "λιγότερο από {{count}} λεπτά"
	},
	xMinutes: {
		one: "1 λεπτό",
		other: "{{count}} λεπτά"
	},
	aboutXHours: {
		one: "περίπου 1 ώρα",
		other: "περίπου {{count}} ώρες"
	},
	xHours: {
		one: "1 ώρα",
		other: "{{count}} ώρες"
	},
	xDays: {
		one: "1 ημέρα",
		other: "{{count}} ημέρες"
	},
	aboutXWeeks: {
		one: "περίπου 1 εβδομάδα",
		other: "περίπου {{count}} εβδομάδες"
	},
	xWeeks: {
		one: "1 εβδομάδα",
		other: "{{count}} εβδομάδες"
	},
	aboutXMonths: {
		one: "περίπου 1 μήνας",
		other: "περίπου {{count}} μήνες"
	},
	xMonths: {
		one: "1 μήνας",
		other: "{{count}} μήνες"
	},
	aboutXYears: {
		one: "περίπου 1 χρόνο",
		other: "περίπου {{count}} χρόνια"
	},
	xYears: {
		one: "1 χρόνο",
		other: "{{count}} χρόνια"
	},
	overXYears: {
		one: "πάνω από 1 χρόνο",
		other: "πάνω από {{count}} χρόνια"
	},
	almostXYears: {
		one: "περίπου 1 χρόνο",
		other: "περίπου {{count}} χρόνια"
	}
};
var formatDistance$64 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$63[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "σε " + result;
	else return result + " πριν";
	return result;
};
var formatLong$72 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, d MMMM y",
			long: "d MMMM y",
			medium: "d MMM y",
			short: "d/M/yy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "h:mm:ss a zzzz",
			long: "h:mm:ss a z",
			medium: "h:mm:ss a",
			short: "h:mm a"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} - {{time}}",
			long: "{{date}} - {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/el/_lib/formatRelative.js
var formatRelativeLocale$64 = {
	lastWeek: (date) => {
		switch (date.getDay()) {
			case 6: return "'το προηγούμενο' eeee 'στις' p";
			default: return "'την προηγούμενη' eeee 'στις' p";
		}
	},
	yesterday: "'χθες στις' p",
	today: "'σήμερα στις' p",
	tomorrow: "'αύριο στις' p",
	nextWeek: "eeee 'στις' p",
	other: "P"
};
var formatRelative$64 = (token, date) => {
	const format = formatRelativeLocale$64[token];
	if (typeof format === "function") return format(date);
	return format;
};
//#endregion
//#region ../../node_modules/date-fns/locale/el/_lib/localize.js
var eraValues$63 = {
	narrow: ["πΧ", "μΧ"],
	abbreviated: ["π.Χ.", "μ.Χ."],
	wide: ["προ Χριστού", "μετά Χριστόν"]
};
var quarterValues$63 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"Τ1",
		"Τ2",
		"Τ3",
		"Τ4"
	],
	wide: [
		"1ο τρίμηνο",
		"2ο τρίμηνο",
		"3ο τρίμηνο",
		"4ο τρίμηνο"
	]
};
var monthValues$63 = {
	narrow: [
		"Ι",
		"Φ",
		"Μ",
		"Α",
		"Μ",
		"Ι",
		"Ι",
		"Α",
		"Σ",
		"Ο",
		"Ν",
		"Δ"
	],
	abbreviated: [
		"Ιαν",
		"Φεβ",
		"Μάρ",
		"Απρ",
		"Μάι",
		"Ιούν",
		"Ιούλ",
		"Αύγ",
		"Σεπ",
		"Οκτ",
		"Νοέ",
		"Δεκ"
	],
	wide: [
		"Ιανουάριος",
		"Φεβρουάριος",
		"Μάρτιος",
		"Απρίλιος",
		"Μάιος",
		"Ιούνιος",
		"Ιούλιος",
		"Αύγουστος",
		"Σεπτέμβριος",
		"Οκτώβριος",
		"Νοέμβριος",
		"Δεκέμβριος"
	]
};
var formattingMonthValues$12 = {
	narrow: [
		"Ι",
		"Φ",
		"Μ",
		"Α",
		"Μ",
		"Ι",
		"Ι",
		"Α",
		"Σ",
		"Ο",
		"Ν",
		"Δ"
	],
	abbreviated: [
		"Ιαν",
		"Φεβ",
		"Μαρ",
		"Απρ",
		"Μαΐ",
		"Ιουν",
		"Ιουλ",
		"Αυγ",
		"Σεπ",
		"Οκτ",
		"Νοε",
		"Δεκ"
	],
	wide: [
		"Ιανουαρίου",
		"Φεβρουαρίου",
		"Μαρτίου",
		"Απριλίου",
		"Μαΐου",
		"Ιουνίου",
		"Ιουλίου",
		"Αυγούστου",
		"Σεπτεμβρίου",
		"Οκτωβρίου",
		"Νοεμβρίου",
		"Δεκεμβρίου"
	]
};
var dayValues$63 = {
	narrow: [
		"Κ",
		"Δ",
		"T",
		"Τ",
		"Π",
		"Π",
		"Σ"
	],
	short: [
		"Κυ",
		"Δε",
		"Τρ",
		"Τε",
		"Πέ",
		"Πα",
		"Σά"
	],
	abbreviated: [
		"Κυρ",
		"Δευ",
		"Τρί",
		"Τετ",
		"Πέμ",
		"Παρ",
		"Σάβ"
	],
	wide: [
		"Κυριακή",
		"Δευτέρα",
		"Τρίτη",
		"Τετάρτη",
		"Πέμπτη",
		"Παρασκευή",
		"Σάββατο"
	]
};
var dayPeriodValues$63 = {
	narrow: {
		am: "πμ",
		pm: "μμ",
		midnight: "μεσάνυχτα",
		noon: "μεσημέρι",
		morning: "πρωί",
		afternoon: "απόγευμα",
		evening: "βράδυ",
		night: "νύχτα"
	},
	abbreviated: {
		am: "π.μ.",
		pm: "μ.μ.",
		midnight: "μεσάνυχτα",
		noon: "μεσημέρι",
		morning: "πρωί",
		afternoon: "απόγευμα",
		evening: "βράδυ",
		night: "νύχτα"
	},
	wide: {
		am: "π.μ.",
		pm: "μ.μ.",
		midnight: "μεσάνυχτα",
		noon: "μεσημέρι",
		morning: "πρωί",
		afternoon: "απόγευμα",
		evening: "βράδυ",
		night: "νύχτα"
	}
};
var ordinalNumber$63 = (dirtyNumber, options) => {
	const number = Number(dirtyNumber);
	const unit = options?.unit;
	let suffix;
	if (unit === "year" || unit === "month") suffix = "ος";
	else if (unit === "week" || unit === "dayOfYear" || unit === "day" || unit === "hour" || unit === "date") suffix = "η";
	else suffix = "ο";
	return number + suffix;
};
//#endregion
//#region ../../node_modules/date-fns/locale/el.js
/**
* @category Locales
* @summary Greek locale.
* @language Greek
* @iso-639-2 ell
* @author Fanis Katsimpas [@fanixk](https://github.com/fanixk)
* @author Theodoros Orfanidis [@teoulas](https://github.com/teoulas)
*/
var el = {
	code: "el",
	formatDistance: formatDistance$64,
	formatLong: formatLong$72,
	formatRelative: formatRelative$64,
	localize: {
		ordinalNumber: ordinalNumber$63,
		era: buildLocalizeFn({
			values: eraValues$63,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$63,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$63,
			defaultWidth: "wide",
			formattingValues: formattingMonthValues$12,
			defaultFormattingWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$63,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$63,
			defaultWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(ος|η|ο)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(πΧ|μΧ)/i,
				abbreviated: /^(π\.?\s?χ\.?|π\.?\s?κ\.?\s?χ\.?|μ\.?\s?χ\.?|κ\.?\s?χ\.?)/i,
				wide: /^(προ Χριστο(ύ|υ)|πριν απ(ό|ο) την Κοιν(ή|η) Χρονολογ(ί|ι)α|μετ(ά|α) Χριστ(ό|ο)ν|Κοιν(ή|η) Χρονολογ(ί|ι)α)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^π/i, /^(μ|κ)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^τ[1234]/i,
				wide: /^[1234]ο? τρ(ί|ι)μηνο/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[ιφμαμιιασονδ]/i,
				abbreviated: /^(ιαν|φεβ|μ[άα]ρ|απρ|μ[άα][ιΐ]|ιο[ύυ]ν|ιο[ύυ]λ|α[ύυ]γ|σεπ|οκτ|νο[έε]|δεκ)/i,
				wide: /^(μ[άα][ιΐ]|α[ύυ]γο[υύ]στ)(ος|ου)|(ιανου[άα]ρ|φεβρου[άα]ρ|μ[άα]ρτ|απρ[ίι]λ|ιο[ύυ]ν|ιο[ύυ]λ|σεπτ[έε]μβρ|οκτ[ώω]βρ|νο[έε]μβρ|δεκ[έε]μβρ)(ιος|ίου)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ι/i,
					/^φ/i,
					/^μ/i,
					/^α/i,
					/^μ/i,
					/^ι/i,
					/^ι/i,
					/^α/i,
					/^σ/i,
					/^ο/i,
					/^ν/i,
					/^δ/i
				],
				any: [
					/^ια/i,
					/^φ/i,
					/^μ[άα]ρ/i,
					/^απ/i,
					/^μ[άα][ιΐ]/i,
					/^ιο[ύυ]ν/i,
					/^ιο[ύυ]λ/i,
					/^α[ύυ]/i,
					/^σ/i,
					/^ο/i,
					/^ν/i,
					/^δ/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[κδτπσ]/i,
				short: /^(κυ|δε|τρ|τε|π[εέ]|π[αά]|σ[αά])/i,
				abbreviated: /^(κυρ|δευ|τρι|τετ|πεμ|παρ|σαβ)/i,
				wide: /^(κυριακ(ή|η)|δευτ(έ|ε)ρα|τρ(ί|ι)τη|τετ(ά|α)ρτη|π(έ|ε)μπτη|παρασκευ(ή|η)|σ(ά|α)ββατο)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^κ/i,
					/^δ/i,
					/^τ/i,
					/^τ/i,
					/^π/i,
					/^π/i,
					/^σ/i
				],
				any: [
					/^κ/i,
					/^δ/i,
					/^τρ/i,
					/^τε/i,
					/^π[εέ]/i,
					/^π[αά]/i,
					/^σ/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(πμ|μμ|μεσ(ά|α)νυχτα|μεσημ(έ|ε)ρι|πρω(ί|ι)|απ(ό|ο)γευμα|βρ(ά|α)δυ|ν(ύ|υ)χτα)/i,
				any: /^([πμ]\.?\s?μ\.?|μεσ(ά|α)νυχτα|μεσημ(έ|ε)ρι|πρω(ί|ι)|απ(ό|ο)γευμα|βρ(ά|α)δυ|ν(ύ|υ)χτα)/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^πμ|π\.\s?μ\./i,
				pm: /^μμ|μ\.\s?μ\./i,
				midnight: /^μεσάν/i,
				noon: /^μεσημ(έ|ε)/i,
				morning: /πρω(ί|ι)/i,
				afternoon: /απ(ό|ο)γευμα/i,
				evening: /βρ(ά|α)δυ/i,
				night: /ν(ύ|υ)χτα/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/en-AU.js
/**
* @category Locales
* @summary English locale (Australia).
* @language English
* @iso-639-2 eng
* @author Julien Malige [@JulienMalige](https://github.com/JulienMalige)
*/
var enAU = {
	code: "en-AU",
	formatDistance: formatDistance$87,
	formatLong: {
		date: buildFormatLongFn({
			formats: {
				full: "EEEE, d MMMM yyyy",
				long: "d MMMM yyyy",
				medium: "d MMM yyyy",
				short: "dd/MM/yyyy"
			},
			defaultWidth: "full"
		}),
		time: buildFormatLongFn({
			formats: {
				full: "h:mm:ss a zzzz",
				long: "h:mm:ss a z",
				medium: "h:mm:ss a",
				short: "h:mm a"
			},
			defaultWidth: "full"
		}),
		dateTime: buildFormatLongFn({
			formats: {
				full: "{{date}} 'at' {{time}}",
				long: "{{date}} 'at' {{time}}",
				medium: "{{date}}, {{time}}",
				short: "{{date}}, {{time}}"
			},
			defaultWidth: "full"
		})
	},
	formatRelative: formatRelative$84,
	localize: localize$84,
	match: match$83,
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/en-CA/_lib/formatDistance.js
var formatDistanceLocale$62 = {
	lessThanXSeconds: {
		one: "less than a second",
		other: "less than {{count}} seconds"
	},
	xSeconds: {
		one: "a second",
		other: "{{count}} seconds"
	},
	halfAMinute: "half a minute",
	lessThanXMinutes: {
		one: "less than a minute",
		other: "less than {{count}} minutes"
	},
	xMinutes: {
		one: "a minute",
		other: "{{count}} minutes"
	},
	aboutXHours: {
		one: "about an hour",
		other: "about {{count}} hours"
	},
	xHours: {
		one: "an hour",
		other: "{{count}} hours"
	},
	xDays: {
		one: "a day",
		other: "{{count}} days"
	},
	aboutXWeeks: {
		one: "about a week",
		other: "about {{count}} weeks"
	},
	xWeeks: {
		one: "a week",
		other: "{{count}} weeks"
	},
	aboutXMonths: {
		one: "about a month",
		other: "about {{count}} months"
	},
	xMonths: {
		one: "a month",
		other: "{{count}} months"
	},
	aboutXYears: {
		one: "about a year",
		other: "about {{count}} years"
	},
	xYears: {
		one: "a year",
		other: "{{count}} years"
	},
	overXYears: {
		one: "over a year",
		other: "over {{count}} years"
	},
	almostXYears: {
		one: "almost a year",
		other: "almost {{count}} years"
	}
};
var formatDistance$63 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$62[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", count.toString());
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "in " + result;
	else return result + " ago";
	return result;
};
//#endregion
//#region ../../node_modules/date-fns/locale/en-CA.js
/**
* @category Locales
* @summary English locale (Canada).
* @language English
* @iso-639-2 eng
* @author Mark Owsiak [@markowsiak](https://github.com/markowsiak)
* @author Marco Imperatore [@mimperatore](https://github.com/mimperatore)
*/
var enCA = {
	code: "en-CA",
	formatDistance: formatDistance$63,
	formatLong: {
		date: buildFormatLongFn({
			formats: {
				full: "EEEE, MMMM do, yyyy",
				long: "MMMM do, yyyy",
				medium: "MMM d, yyyy",
				short: "yyyy-MM-dd"
			},
			defaultWidth: "full"
		}),
		time: buildFormatLongFn({
			formats: {
				full: "h:mm:ss a zzzz",
				long: "h:mm:ss a z",
				medium: "h:mm:ss a",
				short: "h:mm a"
			},
			defaultWidth: "full"
		}),
		dateTime: buildFormatLongFn({
			formats: {
				full: "{{date}} 'at' {{time}}",
				long: "{{date}} 'at' {{time}}",
				medium: "{{date}}, {{time}}",
				short: "{{date}}, {{time}}"
			},
			defaultWidth: "full"
		})
	},
	formatRelative: formatRelative$84,
	localize: localize$84,
	match: match$83,
	options: {
		weekStartsOn: 0,
		firstWeekContainsDate: 1
	}
};
var formatLong$69 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, d MMMM yyyy",
			long: "d MMMM yyyy",
			medium: "d MMM yyyy",
			short: "dd/MM/yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'at' {{time}}",
			long: "{{date}} 'at' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/en-GB.js
/**
* @category Locales
* @summary English locale (United Kingdom).
* @language English
* @iso-639-2 eng
* @author Alex [@glintik](https://github.com/glintik)
*/
var enGB = {
	code: "en-GB",
	formatDistance: formatDistance$87,
	formatLong: formatLong$69,
	formatRelative: formatRelative$84,
	localize: localize$84,
	match: match$83,
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/en-IE.js
/**
* @category Locales
* @summary English locale (Ireland).
* @language English
* @iso-639-2 eng
* @author Tetiana [@tan75](https://github.com/tan75)
*/
var enIE = {
	code: "en-IE",
	formatDistance: formatDistance$87,
	formatLong: formatLong$69,
	formatRelative: formatRelative$84,
	localize: localize$84,
	match: match$83,
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/en-IN.js
/**
* @category Locales
* @summary English locale (India).
* @language English
* @iso-639-2 eng
* @author Galeel Bhasha Satthar [@gbhasha](https://github.com/gbhasha)
*/
var enIN = {
	code: "en-IN",
	formatDistance: formatDistance$87,
	formatLong: {
		date: buildFormatLongFn({
			formats: {
				full: "EEEE, d MMMM yyyy",
				long: "d MMMM, yyyy",
				medium: "d MMM, yyyy",
				short: "dd/MM/yyyy"
			},
			defaultWidth: "full"
		}),
		time: buildFormatLongFn({
			formats: {
				full: "h:mm:ss a zzzz",
				long: "h:mm:ss a z",
				medium: "h:mm:ss a",
				short: "h:mm a"
			},
			defaultWidth: "full"
		}),
		dateTime: buildFormatLongFn({
			formats: {
				full: "{{date}} 'at' {{time}}",
				long: "{{date}} 'at' {{time}}",
				medium: "{{date}}, {{time}}",
				short: "{{date}}, {{time}}"
			},
			defaultWidth: "full"
		})
	},
	formatRelative: formatRelative$84,
	localize: localize$84,
	match: match$83,
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/en-NZ.js
/**
* @category Locales
* @summary English locale (New Zealand).
* @language English
* @iso-639-2 eng
* @author Murray Lucas [@muntact](https://github.com/muntact)
*/
var enNZ = {
	code: "en-NZ",
	formatDistance: formatDistance$87,
	formatLong: {
		date: buildFormatLongFn({
			formats: {
				full: "EEEE, d MMMM yyyy",
				long: "d MMMM yyyy",
				medium: "d MMM yyyy",
				short: "dd/MM/yyyy"
			},
			defaultWidth: "full"
		}),
		time: buildFormatLongFn({
			formats: {
				full: "h:mm:ss a zzzz",
				long: "h:mm:ss a z",
				medium: "h:mm:ss a",
				short: "h:mm a"
			},
			defaultWidth: "full"
		}),
		dateTime: buildFormatLongFn({
			formats: {
				full: "{{date}} 'at' {{time}}",
				long: "{{date}} 'at' {{time}}",
				medium: "{{date}}, {{time}}",
				short: "{{date}}, {{time}}"
			},
			defaultWidth: "full"
		})
	},
	formatRelative: formatRelative$84,
	localize: localize$84,
	match: match$83,
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/en-ZA.js
/**
* @category Locales
* @summary English locale (South Africa).
* @language English
* @iso-639-2 eng
* @author Shaila Kavrakova [@shaykav](https://github.com/shaykav)
*/
var enZA = {
	code: "en-ZA",
	formatDistance: formatDistance$87,
	formatLong: {
		date: buildFormatLongFn({
			formats: {
				full: "EEEE, dd MMMM yyyy",
				long: "dd MMMM yyyy",
				medium: "dd MMM yyyy",
				short: "yyyy/MM/dd"
			},
			defaultWidth: "full"
		}),
		time: buildFormatLongFn({
			formats: {
				full: "HH:mm:ss zzzz",
				long: "HH:mm:ss z",
				medium: "HH:mm:ss",
				short: "HH:mm"
			},
			defaultWidth: "full"
		}),
		dateTime: buildFormatLongFn({
			formats: {
				full: "{{date}} 'at' {{time}}",
				long: "{{date}} 'at' {{time}}",
				medium: "{{date}}, {{time}}",
				short: "{{date}}, {{time}}"
			},
			defaultWidth: "full"
		})
	},
	formatRelative: formatRelative$84,
	localize: localize$84,
	match: match$83,
	options: {
		weekStartsOn: 0,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/eo/_lib/formatDistance.js
var formatDistanceLocale$61 = {
	lessThanXSeconds: {
		one: "malpli ol sekundo",
		other: "malpli ol {{count}} sekundoj"
	},
	xSeconds: {
		one: "1 sekundo",
		other: "{{count}} sekundoj"
	},
	halfAMinute: "duonminuto",
	lessThanXMinutes: {
		one: "malpli ol minuto",
		other: "malpli ol {{count}} minutoj"
	},
	xMinutes: {
		one: "1 minuto",
		other: "{{count}} minutoj"
	},
	aboutXHours: {
		one: "proksimume 1 horo",
		other: "proksimume {{count}} horoj"
	},
	xHours: {
		one: "1 horo",
		other: "{{count}} horoj"
	},
	xDays: {
		one: "1 tago",
		other: "{{count}} tagoj"
	},
	aboutXMonths: {
		one: "proksimume 1 monato",
		other: "proksimume {{count}} monatoj"
	},
	xWeeks: {
		one: "1 semajno",
		other: "{{count}} semajnoj"
	},
	aboutXWeeks: {
		one: "proksimume 1 semajno",
		other: "proksimume {{count}} semajnoj"
	},
	xMonths: {
		one: "1 monato",
		other: "{{count}} monatoj"
	},
	aboutXYears: {
		one: "proksimume 1 jaro",
		other: "proksimume {{count}} jaroj"
	},
	xYears: {
		one: "1 jaro",
		other: "{{count}} jaroj"
	},
	overXYears: {
		one: "pli ol 1 jaro",
		other: "pli ol {{count}} jaroj"
	},
	almostXYears: {
		one: "preskaŭ 1 jaro",
		other: "preskaŭ {{count}} jaroj"
	}
};
var formatDistance$62 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$61[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options?.comparison && options.comparison > 0) return "post " + result;
	else return "antaŭ " + result;
	return result;
};
var formatLong$65 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, do 'de' MMMM y",
			long: "y-MMMM-dd",
			medium: "y-MMM-dd",
			short: "yyyy-MM-dd"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "Ho 'horo kaj' m:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: { any: "{{date}} {{time}}" },
		defaultWidth: "any"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/eo/_lib/formatRelative.js
var formatRelativeLocale$63 = {
	lastWeek: "'pasinta' eeee 'je' p",
	yesterday: "'hieraŭ je' p",
	today: "'hodiaŭ je' p",
	tomorrow: "'morgaŭ je' p",
	nextWeek: "eeee 'je' p",
	other: "P"
};
var formatRelative$63 = (token, _date, _baseDate, _options) => formatRelativeLocale$63[token];
//#endregion
//#region ../../node_modules/date-fns/locale/eo/_lib/localize.js
var eraValues$62 = {
	narrow: ["aK", "pK"],
	abbreviated: ["a.K.E.", "p.K.E."],
	wide: ["antaŭ Komuna Erao", "Komuna Erao"]
};
var quarterValues$62 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"K1",
		"K2",
		"K3",
		"K4"
	],
	wide: [
		"1-a kvaronjaro",
		"2-a kvaronjaro",
		"3-a kvaronjaro",
		"4-a kvaronjaro"
	]
};
var monthValues$62 = {
	narrow: [
		"J",
		"F",
		"M",
		"A",
		"M",
		"J",
		"J",
		"A",
		"S",
		"O",
		"N",
		"D"
	],
	abbreviated: [
		"jan",
		"feb",
		"mar",
		"apr",
		"maj",
		"jun",
		"jul",
		"aŭg",
		"sep",
		"okt",
		"nov",
		"dec"
	],
	wide: [
		"januaro",
		"februaro",
		"marto",
		"aprilo",
		"majo",
		"junio",
		"julio",
		"aŭgusto",
		"septembro",
		"oktobro",
		"novembro",
		"decembro"
	]
};
var dayValues$62 = {
	narrow: [
		"D",
		"L",
		"M",
		"M",
		"Ĵ",
		"V",
		"S"
	],
	short: [
		"di",
		"lu",
		"ma",
		"me",
		"ĵa",
		"ve",
		"sa"
	],
	abbreviated: [
		"dim",
		"lun",
		"mar",
		"mer",
		"ĵaŭ",
		"ven",
		"sab"
	],
	wide: [
		"dimanĉo",
		"lundo",
		"mardo",
		"merkredo",
		"ĵaŭdo",
		"vendredo",
		"sabato"
	]
};
var dayPeriodValues$62 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "noktomezo",
		noon: "tagmezo",
		morning: "matene",
		afternoon: "posttagmeze",
		evening: "vespere",
		night: "nokte"
	},
	abbreviated: {
		am: "a.t.m.",
		pm: "p.t.m.",
		midnight: "noktomezo",
		noon: "tagmezo",
		morning: "matene",
		afternoon: "posttagmeze",
		evening: "vespere",
		night: "nokte"
	},
	wide: {
		am: "antaŭtagmeze",
		pm: "posttagmeze",
		midnight: "noktomezo",
		noon: "tagmezo",
		morning: "matene",
		afternoon: "posttagmeze",
		evening: "vespere",
		night: "nokte"
	}
};
var ordinalNumber$62 = (dirtyNumber) => {
	return Number(dirtyNumber) + "-a";
};
//#endregion
//#region ../../node_modules/date-fns/locale/eo.js
/**
* @category Locales
* @summary Esperanto locale.
* @language Esperanto
* @iso-639-2 epo
* @author date-fns
*/
var eo = {
	code: "eo",
	formatDistance: formatDistance$62,
	formatLong: formatLong$65,
	formatRelative: formatRelative$63,
	localize: {
		ordinalNumber: ordinalNumber$62,
		era: buildLocalizeFn({
			values: eraValues$62,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$62,
			defaultWidth: "wide",
			argumentCallback: function(quarter) {
				return Number(quarter) - 1;
			}
		}),
		month: buildLocalizeFn({
			values: monthValues$62,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$62,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$62,
			defaultWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(-?a)?/i,
			parsePattern: /\d+/i,
			valueCallback: function(value) {
				return parseInt(value, 10);
			}
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^([ap]k)/i,
				abbreviated: /^([ap]\.?\s?k\.?\s?e\.?)/i,
				wide: /^((antaǔ |post )?komuna erao)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^a/i, /^[kp]/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^k[1234]/i,
				wide: /^[1234](-?a)? kvaronjaro/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: function(index) {
				return index + 1;
			}
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[jfmasond]/i,
				abbreviated: /^(jan|feb|mar|apr|maj|jun|jul|a(ŭ|ux|uh|u)g|sep|okt|nov|dec)/i,
				wide: /^(januaro|februaro|marto|aprilo|majo|junio|julio|a(ŭ|ux|uh|u)gusto|septembro|oktobro|novembro|decembro)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^j/i,
					/^f/i,
					/^m/i,
					/^a/i,
					/^m/i,
					/^j/i,
					/^j/i,
					/^a/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				],
				any: [
					/^ja/i,
					/^f/i,
					/^mar/i,
					/^ap/i,
					/^maj/i,
					/^jun/i,
					/^jul/i,
					/^a(u|ŭ)/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[dlmĵjvs]/i,
				short: /^(di|lu|ma|me|(ĵ|jx|jh|j)a|ve|sa)/i,
				abbreviated: /^(dim|lun|mar|mer|(ĵ|jx|jh|j)a(ŭ|ux|uh|u)|ven|sab)/i,
				wide: /^(diman(ĉ|cx|ch|c)o|lundo|mardo|merkredo|(ĵ|jx|jh|j)a(ŭ|ux|uh|u)do|vendredo|sabato)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^d/i,
					/^l/i,
					/^m/i,
					/^m/i,
					/^(j|ĵ)/i,
					/^v/i,
					/^s/i
				],
				any: [
					/^d/i,
					/^l/i,
					/^ma/i,
					/^me/i,
					/^(j|ĵ)/i,
					/^v/i,
					/^s/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^([ap]|(posttagmez|noktomez|tagmez|maten|vesper|nokt)[eo])/i,
				abbreviated: /^([ap][.\s]?t[.\s]?m[.\s]?|(posttagmez|noktomez|tagmez|maten|vesper|nokt)[eo])/i,
				wide: /^(anta(ŭ|ux)tagmez|posttagmez|noktomez|tagmez|maten|vesper|nokt)[eo]/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: {
				am: /^a/i,
				pm: /^p/i,
				midnight: /^noktom/i,
				noon: /^t/i,
				morning: /^m/i,
				afternoon: /^posttagmeze/i,
				evening: /^v/i,
				night: /^n/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/es/_lib/formatDistance.js
var formatDistanceLocale$60 = {
	lessThanXSeconds: {
		one: "menos de un segundo",
		other: "menos de {{count}} segundos"
	},
	xSeconds: {
		one: "1 segundo",
		other: "{{count}} segundos"
	},
	halfAMinute: "medio minuto",
	lessThanXMinutes: {
		one: "menos de un minuto",
		other: "menos de {{count}} minutos"
	},
	xMinutes: {
		one: "1 minuto",
		other: "{{count}} minutos"
	},
	aboutXHours: {
		one: "alrededor de 1 hora",
		other: "alrededor de {{count}} horas"
	},
	xHours: {
		one: "1 hora",
		other: "{{count}} horas"
	},
	xDays: {
		one: "1 día",
		other: "{{count}} días"
	},
	aboutXWeeks: {
		one: "alrededor de 1 semana",
		other: "alrededor de {{count}} semanas"
	},
	xWeeks: {
		one: "1 semana",
		other: "{{count}} semanas"
	},
	aboutXMonths: {
		one: "alrededor de 1 mes",
		other: "alrededor de {{count}} meses"
	},
	xMonths: {
		one: "1 mes",
		other: "{{count}} meses"
	},
	aboutXYears: {
		one: "alrededor de 1 año",
		other: "alrededor de {{count}} años"
	},
	xYears: {
		one: "1 año",
		other: "{{count}} años"
	},
	overXYears: {
		one: "más de 1 año",
		other: "más de {{count}} años"
	},
	almostXYears: {
		one: "casi 1 año",
		other: "casi {{count}} años"
	}
};
var formatDistance$61 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$60[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", count.toString());
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "en " + result;
	else return "hace " + result;
	return result;
};
var formatLong$64 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, d 'de' MMMM 'de' y",
			long: "d 'de' MMMM 'de' y",
			medium: "d MMM y",
			short: "dd/MM/y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'a las' {{time}}",
			long: "{{date}} 'a las' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/es/_lib/formatRelative.js
var formatRelativeLocale$62 = {
	lastWeek: "'el' eeee 'pasado a la' p",
	yesterday: "'ayer a la' p",
	today: "'hoy a la' p",
	tomorrow: "'mañana a la' p",
	nextWeek: "eeee 'a la' p",
	other: "P"
};
var formatRelativeLocalePlural$2 = {
	lastWeek: "'el' eeee 'pasado a las' p",
	yesterday: "'ayer a las' p",
	today: "'hoy a las' p",
	tomorrow: "'mañana a las' p",
	nextWeek: "eeee 'a las' p",
	other: "P"
};
var formatRelative$62 = (token, date, _baseDate, _options) => {
	if (date.getHours() !== 1) return formatRelativeLocalePlural$2[token];
	else return formatRelativeLocale$62[token];
};
//#endregion
//#region ../../node_modules/date-fns/locale/es/_lib/localize.js
var eraValues$61 = {
	narrow: ["AC", "DC"],
	abbreviated: ["AC", "DC"],
	wide: ["antes de cristo", "después de cristo"]
};
var quarterValues$61 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"T1",
		"T2",
		"T3",
		"T4"
	],
	wide: [
		"1º trimestre",
		"2º trimestre",
		"3º trimestre",
		"4º trimestre"
	]
};
var monthValues$61 = {
	narrow: [
		"e",
		"f",
		"m",
		"a",
		"m",
		"j",
		"j",
		"a",
		"s",
		"o",
		"n",
		"d"
	],
	abbreviated: [
		"ene",
		"feb",
		"mar",
		"abr",
		"may",
		"jun",
		"jul",
		"ago",
		"sep",
		"oct",
		"nov",
		"dic"
	],
	wide: [
		"enero",
		"febrero",
		"marzo",
		"abril",
		"mayo",
		"junio",
		"julio",
		"agosto",
		"septiembre",
		"octubre",
		"noviembre",
		"diciembre"
	]
};
var dayValues$61 = {
	narrow: [
		"d",
		"l",
		"m",
		"m",
		"j",
		"v",
		"s"
	],
	short: [
		"do",
		"lu",
		"ma",
		"mi",
		"ju",
		"vi",
		"sá"
	],
	abbreviated: [
		"dom",
		"lun",
		"mar",
		"mié",
		"jue",
		"vie",
		"sáb"
	],
	wide: [
		"domingo",
		"lunes",
		"martes",
		"miércoles",
		"jueves",
		"viernes",
		"sábado"
	]
};
var dayPeriodValues$61 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "mn",
		noon: "md",
		morning: "mañana",
		afternoon: "tarde",
		evening: "tarde",
		night: "noche"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "medianoche",
		noon: "mediodia",
		morning: "mañana",
		afternoon: "tarde",
		evening: "tarde",
		night: "noche"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "medianoche",
		noon: "mediodia",
		morning: "mañana",
		afternoon: "tarde",
		evening: "tarde",
		night: "noche"
	}
};
var formattingDayPeriodValues$48 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "mn",
		noon: "md",
		morning: "de la mañana",
		afternoon: "de la tarde",
		evening: "de la tarde",
		night: "de la noche"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "medianoche",
		noon: "mediodia",
		morning: "de la mañana",
		afternoon: "de la tarde",
		evening: "de la tarde",
		night: "de la noche"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "medianoche",
		noon: "mediodia",
		morning: "de la mañana",
		afternoon: "de la tarde",
		evening: "de la tarde",
		night: "de la noche"
	}
};
var ordinalNumber$61 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + "º";
};
//#endregion
//#region ../../node_modules/date-fns/locale/es.js
/**
* @category Locales
* @summary Spanish locale.
* @language Spanish
* @iso-639-2 spa
* @author Juan Angosto [@juanangosto](https://github.com/juanangosto)
* @author Guillermo Grau [@guigrpa](https://github.com/guigrpa)
* @author Fernando Agüero [@fjaguero](https://github.com/fjaguero)
* @author Gastón Haro [@harogaston](https://github.com/harogaston)
* @author Yago Carballo [@YagoCarballo](https://github.com/YagoCarballo)
*/
var es = {
	code: "es",
	formatDistance: formatDistance$61,
	formatLong: formatLong$64,
	formatRelative: formatRelative$62,
	localize: {
		ordinalNumber: ordinalNumber$61,
		era: buildLocalizeFn({
			values: eraValues$61,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$61,
			defaultWidth: "wide",
			argumentCallback: (quarter) => Number(quarter) - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$61,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$61,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$61,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$48,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(º)?/i,
			parsePattern: /\d+/i,
			valueCallback: function(value) {
				return parseInt(value, 10);
			}
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(ac|dc|a|d)/i,
				abbreviated: /^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,
				wide: /^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				any: [/^ac/i, /^dc/i],
				wide: [/^(antes de cristo|antes de la era com[uú]n)/i, /^(despu[eé]s de cristo|era com[uú]n)/i]
			},
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^T[1234]/i,
				wide: /^[1234](º)? trimestre/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[efmajsond]/i,
				abbreviated: /^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,
				wide: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^e/i,
					/^f/i,
					/^m/i,
					/^a/i,
					/^m/i,
					/^j/i,
					/^j/i,
					/^a/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				],
				any: [
					/^en/i,
					/^feb/i,
					/^mar/i,
					/^abr/i,
					/^may/i,
					/^jun/i,
					/^jul/i,
					/^ago/i,
					/^sep/i,
					/^oct/i,
					/^nov/i,
					/^dic/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[dlmjvs]/i,
				short: /^(do|lu|ma|mi|ju|vi|s[áa])/i,
				abbreviated: /^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,
				wide: /^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^d/i,
					/^l/i,
					/^m/i,
					/^m/i,
					/^j/i,
					/^v/i,
					/^s/i
				],
				any: [
					/^do/i,
					/^lu/i,
					/^ma/i,
					/^mi/i,
					/^ju/i,
					/^vi/i,
					/^sa/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,
				any: /^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a/i,
				pm: /^p/i,
				midnight: /^mn/i,
				noon: /^md/i,
				morning: /mañana/i,
				afternoon: /tarde/i,
				evening: /tarde/i,
				night: /noche/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/et/_lib/formatDistance.js
var formatDistanceLocale$59 = {
	lessThanXSeconds: {
		standalone: {
			one: "vähem kui üks sekund",
			other: "vähem kui {{count}} sekundit"
		},
		withPreposition: {
			one: "vähem kui ühe sekundi",
			other: "vähem kui {{count}} sekundi"
		}
	},
	xSeconds: {
		standalone: {
			one: "üks sekund",
			other: "{{count}} sekundit"
		},
		withPreposition: {
			one: "ühe sekundi",
			other: "{{count}} sekundi"
		}
	},
	halfAMinute: {
		standalone: "pool minutit",
		withPreposition: "poole minuti"
	},
	lessThanXMinutes: {
		standalone: {
			one: "vähem kui üks minut",
			other: "vähem kui {{count}} minutit"
		},
		withPreposition: {
			one: "vähem kui ühe minuti",
			other: "vähem kui {{count}} minuti"
		}
	},
	xMinutes: {
		standalone: {
			one: "üks minut",
			other: "{{count}} minutit"
		},
		withPreposition: {
			one: "ühe minuti",
			other: "{{count}} minuti"
		}
	},
	aboutXHours: {
		standalone: {
			one: "umbes üks tund",
			other: "umbes {{count}} tundi"
		},
		withPreposition: {
			one: "umbes ühe tunni",
			other: "umbes {{count}} tunni"
		}
	},
	xHours: {
		standalone: {
			one: "üks tund",
			other: "{{count}} tundi"
		},
		withPreposition: {
			one: "ühe tunni",
			other: "{{count}} tunni"
		}
	},
	xDays: {
		standalone: {
			one: "üks päev",
			other: "{{count}} päeva"
		},
		withPreposition: {
			one: "ühe päeva",
			other: "{{count}} päeva"
		}
	},
	aboutXWeeks: {
		standalone: {
			one: "umbes üks nädal",
			other: "umbes {{count}} nädalat"
		},
		withPreposition: {
			one: "umbes ühe nädala",
			other: "umbes {{count}} nädala"
		}
	},
	xWeeks: {
		standalone: {
			one: "üks nädal",
			other: "{{count}} nädalat"
		},
		withPreposition: {
			one: "ühe nädala",
			other: "{{count}} nädala"
		}
	},
	aboutXMonths: {
		standalone: {
			one: "umbes üks kuu",
			other: "umbes {{count}} kuud"
		},
		withPreposition: {
			one: "umbes ühe kuu",
			other: "umbes {{count}} kuu"
		}
	},
	xMonths: {
		standalone: {
			one: "üks kuu",
			other: "{{count}} kuud"
		},
		withPreposition: {
			one: "ühe kuu",
			other: "{{count}} kuu"
		}
	},
	aboutXYears: {
		standalone: {
			one: "umbes üks aasta",
			other: "umbes {{count}} aastat"
		},
		withPreposition: {
			one: "umbes ühe aasta",
			other: "umbes {{count}} aasta"
		}
	},
	xYears: {
		standalone: {
			one: "üks aasta",
			other: "{{count}} aastat"
		},
		withPreposition: {
			one: "ühe aasta",
			other: "{{count}} aasta"
		}
	},
	overXYears: {
		standalone: {
			one: "rohkem kui üks aasta",
			other: "rohkem kui {{count}} aastat"
		},
		withPreposition: {
			one: "rohkem kui ühe aasta",
			other: "rohkem kui {{count}} aasta"
		}
	},
	almostXYears: {
		standalone: {
			one: "peaaegu üks aasta",
			other: "peaaegu {{count}} aastat"
		},
		withPreposition: {
			one: "peaaegu ühe aasta",
			other: "peaaegu {{count}} aasta"
		}
	}
};
var formatDistance$60 = (token, count, options) => {
	const usageGroup = options?.addSuffix ? formatDistanceLocale$59[token].withPreposition : formatDistanceLocale$59[token].standalone;
	let result;
	if (typeof usageGroup === "string") result = usageGroup;
	else if (count === 1) result = usageGroup.one;
	else result = usageGroup.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return result + " pärast";
	else return result + " eest";
	return result;
};
var formatLong$63 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, d. MMMM y",
			long: "d. MMMM y",
			medium: "d. MMM y",
			short: "dd.MM.y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'kell' {{time}}",
			long: "{{date}} 'kell' {{time}}",
			medium: "{{date}}. {{time}}",
			short: "{{date}}. {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/et/_lib/formatRelative.js
var formatRelativeLocale$61 = {
	lastWeek: "'eelmine' eeee 'kell' p",
	yesterday: "'eile kell' p",
	today: "'täna kell' p",
	tomorrow: "'homme kell' p",
	nextWeek: "'järgmine' eeee 'kell' p",
	other: "P"
};
var formatRelative$61 = (token, _date, _baseDate, _options) => formatRelativeLocale$61[token];
//#endregion
//#region ../../node_modules/date-fns/locale/et/_lib/localize.js
var eraValues$60 = {
	narrow: ["e.m.a", "m.a.j"],
	abbreviated: ["e.m.a", "m.a.j"],
	wide: ["enne meie ajaarvamist", "meie ajaarvamise järgi"]
};
var quarterValues$60 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"K1",
		"K2",
		"K3",
		"K4"
	],
	wide: [
		"1. kvartal",
		"2. kvartal",
		"3. kvartal",
		"4. kvartal"
	]
};
var monthValues$60 = {
	narrow: [
		"J",
		"V",
		"M",
		"A",
		"M",
		"J",
		"J",
		"A",
		"S",
		"O",
		"N",
		"D"
	],
	abbreviated: [
		"jaan",
		"veebr",
		"märts",
		"apr",
		"mai",
		"juuni",
		"juuli",
		"aug",
		"sept",
		"okt",
		"nov",
		"dets"
	],
	wide: [
		"jaanuar",
		"veebruar",
		"märts",
		"aprill",
		"mai",
		"juuni",
		"juuli",
		"august",
		"september",
		"oktoober",
		"november",
		"detsember"
	]
};
var dayValues$60 = {
	narrow: [
		"P",
		"E",
		"T",
		"K",
		"N",
		"R",
		"L"
	],
	short: [
		"P",
		"E",
		"T",
		"K",
		"N",
		"R",
		"L"
	],
	abbreviated: [
		"pühap.",
		"esmasp.",
		"teisip.",
		"kolmap.",
		"neljap.",
		"reede.",
		"laup."
	],
	wide: [
		"pühapäev",
		"esmaspäev",
		"teisipäev",
		"kolmapäev",
		"neljapäev",
		"reede",
		"laupäev"
	]
};
var dayPeriodValues$60 = {
	narrow: {
		am: "AM",
		pm: "PM",
		midnight: "kesköö",
		noon: "keskpäev",
		morning: "hommik",
		afternoon: "pärastlõuna",
		evening: "õhtu",
		night: "öö"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "kesköö",
		noon: "keskpäev",
		morning: "hommik",
		afternoon: "pärastlõuna",
		evening: "õhtu",
		night: "öö"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "kesköö",
		noon: "keskpäev",
		morning: "hommik",
		afternoon: "pärastlõuna",
		evening: "õhtu",
		night: "öö"
	}
};
var formattingDayPeriodValues$47 = {
	narrow: {
		am: "AM",
		pm: "PM",
		midnight: "keskööl",
		noon: "keskpäeval",
		morning: "hommikul",
		afternoon: "pärastlõunal",
		evening: "õhtul",
		night: "öösel"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "keskööl",
		noon: "keskpäeval",
		morning: "hommikul",
		afternoon: "pärastlõunal",
		evening: "õhtul",
		night: "öösel"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "keskööl",
		noon: "keskpäeval",
		morning: "hommikul",
		afternoon: "pärastlõunal",
		evening: "õhtul",
		night: "öösel"
	}
};
var ordinalNumber$60 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + ".";
};
//#endregion
//#region ../../node_modules/date-fns/locale/et.js
/**
* @category Locales
* @summary Estonian locale.
* @language Estonian
* @iso-639-2 est
* @author Priit Hansen [@HansenPriit](https://github.com/priithansen)
*/
var et = {
	code: "et",
	formatDistance: formatDistance$60,
	formatLong: formatLong$63,
	formatRelative: formatRelative$61,
	localize: {
		ordinalNumber: ordinalNumber$60,
		era: buildLocalizeFn({
			values: eraValues$60,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$60,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$60,
			defaultWidth: "wide",
			formattingValues: monthValues$60,
			defaultFormattingWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$60,
			defaultWidth: "wide",
			formattingValues: dayValues$60,
			defaultFormattingWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$60,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$47,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^\d+\./i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(e\.m\.a|m\.a\.j|eKr|pKr)/i,
				abbreviated: /^(e\.m\.a|m\.a\.j|eKr|pKr)/i,
				wide: /^(enne meie ajaarvamist|meie ajaarvamise järgi|enne Kristust|pärast Kristust)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^e/i, /^(m|p)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^K[1234]/i,
				wide: /^[1234](\.)? kvartal/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[jvmasond]/i,
				abbreviated: /^(jaan|veebr|märts|apr|mai|juuni|juuli|aug|sept|okt|nov|dets)/i,
				wide: /^(jaanuar|veebruar|märts|aprill|mai|juuni|juuli|august|september|oktoober|november|detsember)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^j/i,
					/^v/i,
					/^m/i,
					/^a/i,
					/^m/i,
					/^j/i,
					/^j/i,
					/^a/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				],
				any: [
					/^ja/i,
					/^v/i,
					/^mär/i,
					/^ap/i,
					/^mai/i,
					/^juun/i,
					/^juul/i,
					/^au/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[petknrl]/i,
				short: /^[petknrl]/i,
				abbreviated: /^(püh?|esm?|tei?|kolm?|nel?|ree?|laup?)\.?/i,
				wide: /^(pühapäev|esmaspäev|teisipäev|kolmapäev|neljapäev|reede|laupäev)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/^p/i,
				/^e/i,
				/^t/i,
				/^k/i,
				/^n/i,
				/^r/i,
				/^l/i
			] },
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: { any: /^(am|pm|keskööl?|keskpäev(al)?|hommik(ul)?|pärastlõunal?|õhtul?|öö(sel)?)/i },
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a/i,
				pm: /^p/i,
				midnight: /^keskö/i,
				noon: /^keskp/i,
				morning: /hommik/i,
				afternoon: /pärastlõuna/i,
				evening: /õhtu/i,
				night: /öö/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/eu/_lib/formatDistance.js
var formatDistanceLocale$58 = {
	lessThanXSeconds: {
		one: "segundo bat baino gutxiago",
		other: "{{count}} segundo baino gutxiago"
	},
	xSeconds: {
		one: "1 segundo",
		other: "{{count}} segundo"
	},
	halfAMinute: "minutu erdi",
	lessThanXMinutes: {
		one: "minutu bat baino gutxiago",
		other: "{{count}} minutu baino gutxiago"
	},
	xMinutes: {
		one: "1 minutu",
		other: "{{count}} minutu"
	},
	aboutXHours: {
		one: "1 ordu gutxi gorabehera",
		other: "{{count}} ordu gutxi gorabehera"
	},
	xHours: {
		one: "1 ordu",
		other: "{{count}} ordu"
	},
	xDays: {
		one: "1 egun",
		other: "{{count}} egun"
	},
	aboutXWeeks: {
		one: "aste 1 inguru",
		other: "{{count}} aste inguru"
	},
	xWeeks: {
		one: "1 aste",
		other: "{{count}} astean"
	},
	aboutXMonths: {
		one: "1 hilabete gutxi gorabehera",
		other: "{{count}} hilabete gutxi gorabehera"
	},
	xMonths: {
		one: "1 hilabete",
		other: "{{count}} hilabete"
	},
	aboutXYears: {
		one: "1 urte gutxi gorabehera",
		other: "{{count}} urte gutxi gorabehera"
	},
	xYears: {
		one: "1 urte",
		other: "{{count}} urte"
	},
	overXYears: {
		one: "1 urte baino gehiago",
		other: "{{count}} urte baino gehiago"
	},
	almostXYears: {
		one: "ia 1 urte",
		other: "ia {{count}} urte"
	}
};
var formatDistance$59 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$58[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "en " + result;
	else return "duela " + result;
	return result;
};
var formatLong$62 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, y'ko' MMMM'ren' d'a' y'ren'",
			long: "y'ko' MMMM'ren' d'a'",
			medium: "y MMM d",
			short: "yy/MM/dd"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'tan' {{time}}",
			long: "{{date}} 'tan' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/eu/_lib/formatRelative.js
var formatRelativeLocale$60 = {
	lastWeek: "'joan den' eeee, LT",
	yesterday: "'atzo,' p",
	today: "'gaur,' p",
	tomorrow: "'bihar,' p",
	nextWeek: "eeee, p",
	other: "P"
};
var formatRelativeLocalePlural$1 = {
	lastWeek: "'joan den' eeee, p",
	yesterday: "'atzo,' p",
	today: "'gaur,' p",
	tomorrow: "'bihar,' p",
	nextWeek: "eeee, p",
	other: "P"
};
var formatRelative$60 = (token, date) => {
	if (date.getHours() !== 1) return formatRelativeLocalePlural$1[token];
	return formatRelativeLocale$60[token];
};
//#endregion
//#region ../../node_modules/date-fns/locale/eu/_lib/localize.js
var eraValues$59 = {
	narrow: ["k.a.", "k.o."],
	abbreviated: ["k.a.", "k.o."],
	wide: ["kristo aurretik", "kristo ondoren"]
};
var quarterValues$59 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"1H",
		"2H",
		"3H",
		"4H"
	],
	wide: [
		"1. hiruhilekoa",
		"2. hiruhilekoa",
		"3. hiruhilekoa",
		"4. hiruhilekoa"
	]
};
var monthValues$59 = {
	narrow: [
		"u",
		"o",
		"m",
		"a",
		"m",
		"e",
		"u",
		"a",
		"i",
		"u",
		"a",
		"a"
	],
	abbreviated: [
		"urt",
		"ots",
		"mar",
		"api",
		"mai",
		"eka",
		"uzt",
		"abu",
		"ira",
		"urr",
		"aza",
		"abe"
	],
	wide: [
		"urtarrila",
		"otsaila",
		"martxoa",
		"apirila",
		"maiatza",
		"ekaina",
		"uztaila",
		"abuztua",
		"iraila",
		"urria",
		"azaroa",
		"abendua"
	]
};
var dayValues$59 = {
	narrow: [
		"i",
		"a",
		"a",
		"a",
		"o",
		"o",
		"l"
	],
	short: [
		"ig",
		"al",
		"as",
		"az",
		"og",
		"or",
		"lr"
	],
	abbreviated: [
		"iga",
		"ast",
		"ast",
		"ast",
		"ost",
		"ost",
		"lar"
	],
	wide: [
		"igandea",
		"astelehena",
		"asteartea",
		"asteazkena",
		"osteguna",
		"ostirala",
		"larunbata"
	]
};
var dayPeriodValues$59 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "ge",
		noon: "eg",
		morning: "goiza",
		afternoon: "arratsaldea",
		evening: "arratsaldea",
		night: "gaua"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "gauerdia",
		noon: "eguerdia",
		morning: "goiza",
		afternoon: "arratsaldea",
		evening: "arratsaldea",
		night: "gaua"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "gauerdia",
		noon: "eguerdia",
		morning: "goiza",
		afternoon: "arratsaldea",
		evening: "arratsaldea",
		night: "gaua"
	}
};
var formattingDayPeriodValues$46 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "ge",
		noon: "eg",
		morning: "goizean",
		afternoon: "arratsaldean",
		evening: "arratsaldean",
		night: "gauean"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "gauerdia",
		noon: "eguerdia",
		morning: "goizean",
		afternoon: "arratsaldean",
		evening: "arratsaldean",
		night: "gauean"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "gauerdia",
		noon: "eguerdia",
		morning: "goizean",
		afternoon: "arratsaldean",
		evening: "arratsaldean",
		night: "gauean"
	}
};
var ordinalNumber$59 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + ".";
};
//#endregion
//#region ../../node_modules/date-fns/locale/eu.js
/**
* @category Locales
* @summary Basque locale.
* @language Basque
* @iso-639-2 eus
* @author Jacob Söderblom [@JacobSoderblom](https://github.com/JacobSoderblom)
*/
var eu = {
	code: "eu",
	formatDistance: formatDistance$59,
	formatLong: formatLong$62,
	formatRelative: formatRelative$60,
	localize: {
		ordinalNumber: ordinalNumber$59,
		era: buildLocalizeFn({
			values: eraValues$59,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$59,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$59,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$59,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$59,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$46,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(.)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(k.a.|k.o.)/i,
				abbreviated: /^(k.a.|k.o.)/i,
				wide: /^(kristo aurretik|kristo ondoren)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [/^k.a./i, /^k.o./i],
				abbreviated: [/^(k.a.)/i, /^(k.o.)/i],
				wide: [/^(kristo aurretik)/i, /^(kristo ondoren)/i]
			},
			defaultParseWidth: "wide"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^[1234]H/i,
				wide: /^[1234](.)? hiruhilekoa/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[uomaei]/i,
				abbreviated: /^(urt|ots|mar|api|mai|eka|uzt|abu|ira|urr|aza|abe)/i,
				wide: /^(urtarrila|otsaila|martxoa|apirila|maiatza|ekaina|uztaila|abuztua|iraila|urria|azaroa|abendua)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^u/i,
					/^o/i,
					/^m/i,
					/^a/i,
					/^m/i,
					/^e/i,
					/^u/i,
					/^a/i,
					/^i/i,
					/^u/i,
					/^a/i,
					/^a/i
				],
				any: [
					/^urt/i,
					/^ots/i,
					/^mar/i,
					/^api/i,
					/^mai/i,
					/^eka/i,
					/^uzt/i,
					/^abu/i,
					/^ira/i,
					/^urr/i,
					/^aza/i,
					/^abe/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[iaol]/i,
				short: /^(ig|al|as|az|og|or|lr)/i,
				abbreviated: /^(iga|ast|ast|ast|ost|ost|lar)/i,
				wide: /^(igandea|astelehena|asteartea|asteazkena|osteguna|ostirala|larunbata)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^i/i,
					/^a/i,
					/^a/i,
					/^a/i,
					/^o/i,
					/^o/i,
					/^l/i
				],
				short: [
					/^ig/i,
					/^al/i,
					/^as/i,
					/^az/i,
					/^og/i,
					/^or/i,
					/^lr/i
				],
				abbreviated: [
					/^iga/i,
					/^ast/i,
					/^ast/i,
					/^ast/i,
					/^ost/i,
					/^ost/i,
					/^lar/i
				],
				wide: [
					/^igandea/i,
					/^astelehena/i,
					/^asteartea/i,
					/^asteazkena/i,
					/^osteguna/i,
					/^ostirala/i,
					/^larunbata/i
				]
			},
			defaultParseWidth: "wide"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(a|p|ge|eg|((goiza|goizean)|arratsaldea|(gaua|gauean)))/i,
				any: /^([ap]\.?\s?m\.?|gauerdia|eguerdia|((goiza|goizean)|arratsaldea|(gaua|gauean)))/i
			},
			defaultMatchWidth: "any",
			parsePatterns: {
				narrow: {
					am: /^a/i,
					pm: /^p/i,
					midnight: /^ge/i,
					noon: /^eg/i,
					morning: /goiz/i,
					afternoon: /arratsaldea/i,
					evening: /arratsaldea/i,
					night: /gau/i
				},
				any: {
					am: /^a/i,
					pm: /^p/i,
					midnight: /^gauerdia/i,
					noon: /^eguerdia/i,
					morning: /goiz/i,
					afternoon: /arratsaldea/i,
					evening: /arratsaldea/i,
					night: /gau/i
				}
			},
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/fa-IR/_lib/formatDistance.js
var formatDistanceLocale$57 = {
	lessThanXSeconds: {
		one: "کمتر از یک ثانیه",
		other: "کمتر از {{count}} ثانیه"
	},
	xSeconds: {
		one: "1 ثانیه",
		other: "{{count}} ثانیه"
	},
	halfAMinute: "نیم دقیقه",
	lessThanXMinutes: {
		one: "کمتر از یک دقیقه",
		other: "کمتر از {{count}} دقیقه"
	},
	xMinutes: {
		one: "1 دقیقه",
		other: "{{count}} دقیقه"
	},
	aboutXHours: {
		one: "حدود 1 ساعت",
		other: "حدود {{count}} ساعت"
	},
	xHours: {
		one: "1 ساعت",
		other: "{{count}} ساعت"
	},
	xDays: {
		one: "1 روز",
		other: "{{count}} روز"
	},
	aboutXWeeks: {
		one: "حدود 1 هفته",
		other: "حدود {{count}} هفته"
	},
	xWeeks: {
		one: "1 هفته",
		other: "{{count}} هفته"
	},
	aboutXMonths: {
		one: "حدود 1 ماه",
		other: "حدود {{count}} ماه"
	},
	xMonths: {
		one: "1 ماه",
		other: "{{count}} ماه"
	},
	aboutXYears: {
		one: "حدود 1 سال",
		other: "حدود {{count}} سال"
	},
	xYears: {
		one: "1 سال",
		other: "{{count}} سال"
	},
	overXYears: {
		one: "بیشتر از 1 سال",
		other: "بیشتر از {{count}} سال"
	},
	almostXYears: {
		one: "نزدیک 1 سال",
		other: "نزدیک {{count}} سال"
	}
};
var formatDistance$58 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$57[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "در " + result;
	else return result + " قبل";
	return result;
};
var formatLong$61 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE do MMMM y",
			long: "do MMMM y",
			medium: "d MMM y",
			short: "yyyy/MM/dd"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "h:mm:ss a zzzz",
			long: "h:mm:ss a z",
			medium: "h:mm:ss a",
			short: "h:mm a"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'در' {{time}}",
			long: "{{date}} 'در' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/fa-IR/_lib/formatRelative.js
var formatRelativeLocale$59 = {
	lastWeek: "eeee 'گذشته در' p",
	yesterday: "'دیروز در' p",
	today: "'امروز در' p",
	tomorrow: "'فردا در' p",
	nextWeek: "eeee 'در' p",
	other: "P"
};
var formatRelative$59 = (token, _date, _baseDate, _options) => formatRelativeLocale$59[token];
//#endregion
//#region ../../node_modules/date-fns/locale/fa-IR/_lib/localize.js
var eraValues$58 = {
	narrow: ["ق", "ب"],
	abbreviated: ["ق.م.", "ب.م."],
	wide: ["قبل از میلاد", "بعد از میلاد"]
};
var quarterValues$58 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"س‌م1",
		"س‌م2",
		"س‌م3",
		"س‌م4"
	],
	wide: [
		"سه‌ماهه 1",
		"سه‌ماهه 2",
		"سه‌ماهه 3",
		"سه‌ماهه 4"
	]
};
var monthValues$58 = {
	narrow: [
		"ژ",
		"ف",
		"م",
		"آ",
		"م",
		"ج",
		"ج",
		"آ",
		"س",
		"ا",
		"ن",
		"د"
	],
	abbreviated: [
		"ژانـ",
		"فور",
		"مارس",
		"آپر",
		"می",
		"جون",
		"جولـ",
		"آگو",
		"سپتـ",
		"اکتـ",
		"نوامـ",
		"دسامـ"
	],
	wide: [
		"ژانویه",
		"فوریه",
		"مارس",
		"آپریل",
		"می",
		"جون",
		"جولای",
		"آگوست",
		"سپتامبر",
		"اکتبر",
		"نوامبر",
		"دسامبر"
	]
};
var dayValues$58 = {
	narrow: [
		"ی",
		"د",
		"س",
		"چ",
		"پ",
		"ج",
		"ش"
	],
	short: [
		"1ش",
		"2ش",
		"3ش",
		"4ش",
		"5ش",
		"ج",
		"ش"
	],
	abbreviated: [
		"یکشنبه",
		"دوشنبه",
		"سه‌شنبه",
		"چهارشنبه",
		"پنجشنبه",
		"جمعه",
		"شنبه"
	],
	wide: [
		"یکشنبه",
		"دوشنبه",
		"سه‌شنبه",
		"چهارشنبه",
		"پنجشنبه",
		"جمعه",
		"شنبه"
	]
};
var dayPeriodValues$58 = {
	narrow: {
		am: "ق",
		pm: "ب",
		midnight: "ن",
		noon: "ظ",
		morning: "ص",
		afternoon: "ب.ظ.",
		evening: "ع",
		night: "ش"
	},
	abbreviated: {
		am: "ق.ظ.",
		pm: "ب.ظ.",
		midnight: "نیمه‌شب",
		noon: "ظهر",
		morning: "صبح",
		afternoon: "بعدازظهر",
		evening: "عصر",
		night: "شب"
	},
	wide: {
		am: "قبل‌ازظهر",
		pm: "بعدازظهر",
		midnight: "نیمه‌شب",
		noon: "ظهر",
		morning: "صبح",
		afternoon: "بعدازظهر",
		evening: "عصر",
		night: "شب"
	}
};
var formattingDayPeriodValues$45 = {
	narrow: {
		am: "ق",
		pm: "ب",
		midnight: "ن",
		noon: "ظ",
		morning: "ص",
		afternoon: "ب.ظ.",
		evening: "ع",
		night: "ش"
	},
	abbreviated: {
		am: "ق.ظ.",
		pm: "ب.ظ.",
		midnight: "نیمه‌شب",
		noon: "ظهر",
		morning: "صبح",
		afternoon: "بعدازظهر",
		evening: "عصر",
		night: "شب"
	},
	wide: {
		am: "قبل‌ازظهر",
		pm: "بعدازظهر",
		midnight: "نیمه‌شب",
		noon: "ظهر",
		morning: "صبح",
		afternoon: "بعدازظهر",
		evening: "عصر",
		night: "شب"
	}
};
var ordinalNumber$58 = (dirtyNumber, _options) => {
	return String(dirtyNumber);
};
//#endregion
//#region ../../node_modules/date-fns/locale/fa-IR.js
/**
* @category Locales
* @summary Persian/Farsi locale (Iran).
* @language Persian
* @iso-639-2 ira
* @author Morteza Ziyae [@mort3za](https://github.com/mort3za)
*/
var faIR = {
	code: "fa-IR",
	formatDistance: formatDistance$58,
	formatLong: formatLong$61,
	formatRelative: formatRelative$59,
	localize: {
		ordinalNumber: ordinalNumber$58,
		era: buildLocalizeFn({
			values: eraValues$58,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$58,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$58,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$58,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$58,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$45,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(th|st|nd|rd)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(ق|ب)/i,
				abbreviated: /^(ق\.?\s?م\.?|ق\.?\s?د\.?\s?م\.?|م\.?\s?|د\.?\s?م\.?)/i,
				wide: /^(قبل از میلاد|قبل از دوران مشترک|میلادی|دوران مشترک|بعد از میلاد)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^قبل/i, /^بعد/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^س‌م[1234]/i,
				wide: /^سه‌ماهه [1234]/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[جژفمآاماسند]/i,
				abbreviated: /^(جنو|ژانـ|ژانویه|فوریه|فور|مارس|آوریل|آپر|مه|می|ژوئن|جون|جول|جولـ|ژوئیه|اوت|آگو|سپتمبر|سپتامبر|اکتبر|اکتوبر|نوامبر|نوامـ|دسامبر|دسامـ|دسم)/i,
				wide: /^(ژانویه|جنوری|فبروری|فوریه|مارچ|مارس|آپریل|اپریل|ایپریل|آوریل|مه|می|ژوئن|جون|جولای|ژوئیه|آگست|اگست|آگوست|اوت|سپتمبر|سپتامبر|اکتبر|اکتوبر|نوامبر|نومبر|دسامبر|دسمبر)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^(ژ|ج)/i,
					/^ف/i,
					/^م/i,
					/^(آ|ا)/i,
					/^م/i,
					/^(ژ|ج)/i,
					/^(ج|ژ)/i,
					/^(آ|ا)/i,
					/^س/i,
					/^ا/i,
					/^ن/i,
					/^د/i
				],
				any: [
					/^ژا/i,
					/^ف/i,
					/^ما/i,
					/^آپ/i,
					/^(می|مه)/i,
					/^(ژوئن|جون)/i,
					/^(ژوئی|جول)/i,
					/^(اوت|آگ)/i,
					/^س/i,
					/^(اوک|اک)/i,
					/^ن/i,
					/^د/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[شیدسچپج]/i,
				short: /^(ش|ج|1ش|2ش|3ش|4ش|5ش)/i,
				abbreviated: /^(یکشنبه|دوشنبه|سه‌شنبه|چهارشنبه|پنج‌شنبه|جمعه|شنبه)/i,
				wide: /^(یکشنبه|دوشنبه|سه‌شنبه|چهارشنبه|پنج‌شنبه|جمعه|شنبه)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ی/i,
					/^دو/i,
					/^س/i,
					/^چ/i,
					/^پ/i,
					/^ج/i,
					/^ش/i
				],
				any: [
					/^(ی|1ش|یکشنبه)/i,
					/^(د|2ش|دوشنبه)/i,
					/^(س|3ش|سه‌شنبه)/i,
					/^(چ|4ش|چهارشنبه)/i,
					/^(پ|5ش|پنجشنبه)/i,
					/^(ج|جمعه)/i,
					/^(ش|شنبه)/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(ب|ق|ن|ظ|ص|ب.ظ.|ع|ش)/i,
				abbreviated: /^(ق.ظ.|ب.ظ.|نیمه‌شب|ظهر|صبح|بعدازظهر|عصر|شب)/i,
				wide: /^(قبل‌ازظهر|نیمه‌شب|ظهر|صبح|بعدازظهر|عصر|شب)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: {
				am: /^(ق|ق.ظ.|قبل‌ازظهر)/i,
				pm: /^(ب|ب.ظ.|بعدازظهر)/i,
				midnight: /^(‌نیمه‌شب|ن)/i,
				noon: /^(ظ|ظهر)/i,
				morning: /(ص|صبح)/i,
				afternoon: /(ب|ب.ظ.|بعدازظهر)/i,
				evening: /(ع|عصر)/i,
				night: /(ش|شب)/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 6,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/fi/_lib/formatDistance.js
function futureSeconds(text) {
	return text.replace(/sekuntia?/, "sekunnin");
}
function futureMinutes(text) {
	return text.replace(/minuuttia?/, "minuutin");
}
function futureHours(text) {
	return text.replace(/tuntia?/, "tunnin");
}
function futureDays(text) {
	return text.replace(/päivää?/, "päivän");
}
function futureWeeks(text) {
	return text.replace(/(viikko|viikkoa)/, "viikon");
}
function futureMonths(text) {
	return text.replace(/(kuukausi|kuukautta)/, "kuukauden");
}
function futureYears(text) {
	return text.replace(/(vuosi|vuotta)/, "vuoden");
}
var formatDistanceLocale$56 = {
	lessThanXSeconds: {
		one: "alle sekunti",
		other: "alle {{count}} sekuntia",
		futureTense: futureSeconds
	},
	xSeconds: {
		one: "sekunti",
		other: "{{count}} sekuntia",
		futureTense: futureSeconds
	},
	halfAMinute: {
		one: "puoli minuuttia",
		other: "puoli minuuttia",
		futureTense: (_text) => "puolen minuutin"
	},
	lessThanXMinutes: {
		one: "alle minuutti",
		other: "alle {{count}} minuuttia",
		futureTense: futureMinutes
	},
	xMinutes: {
		one: "minuutti",
		other: "{{count}} minuuttia",
		futureTense: futureMinutes
	},
	aboutXHours: {
		one: "noin tunti",
		other: "noin {{count}} tuntia",
		futureTense: futureHours
	},
	xHours: {
		one: "tunti",
		other: "{{count}} tuntia",
		futureTense: futureHours
	},
	xDays: {
		one: "päivä",
		other: "{{count}} päivää",
		futureTense: futureDays
	},
	aboutXWeeks: {
		one: "noin viikko",
		other: "noin {{count}} viikkoa",
		futureTense: futureWeeks
	},
	xWeeks: {
		one: "viikko",
		other: "{{count}} viikkoa",
		futureTense: futureWeeks
	},
	aboutXMonths: {
		one: "noin kuukausi",
		other: "noin {{count}} kuukautta",
		futureTense: futureMonths
	},
	xMonths: {
		one: "kuukausi",
		other: "{{count}} kuukautta",
		futureTense: futureMonths
	},
	aboutXYears: {
		one: "noin vuosi",
		other: "noin {{count}} vuotta",
		futureTense: futureYears
	},
	xYears: {
		one: "vuosi",
		other: "{{count}} vuotta",
		futureTense: futureYears
	},
	overXYears: {
		one: "yli vuosi",
		other: "yli {{count}} vuotta",
		futureTense: futureYears
	},
	almostXYears: {
		one: "lähes vuosi",
		other: "lähes {{count}} vuotta",
		futureTense: futureYears
	}
};
var formatDistance$57 = (token, count, options) => {
	const tokenValue = formatDistanceLocale$56[token];
	const result = count === 1 ? tokenValue.one : tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return tokenValue.futureTense(result) + " kuluttua";
	else return result + " sitten";
	return result;
};
var formatLong$60 = {
	date: buildFormatLongFn({
		formats: {
			full: "eeee d. MMMM y",
			long: "d. MMMM y",
			medium: "d. MMM y",
			short: "d.M.y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH.mm.ss zzzz",
			long: "HH.mm.ss z",
			medium: "HH.mm.ss",
			short: "HH.mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'klo' {{time}}",
			long: "{{date}} 'klo' {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/fi/_lib/formatRelative.js
var formatRelativeLocale$58 = {
	lastWeek: "'viime' eeee 'klo' p",
	yesterday: "'eilen klo' p",
	today: "'tänään klo' p",
	tomorrow: "'huomenna klo' p",
	nextWeek: "'ensi' eeee 'klo' p",
	other: "P"
};
var formatRelative$58 = (token, _date, _baseDate, _options) => formatRelativeLocale$58[token];
//#endregion
//#region ../../node_modules/date-fns/locale/fi/_lib/localize.js
var eraValues$57 = {
	narrow: ["eaa.", "jaa."],
	abbreviated: ["eaa.", "jaa."],
	wide: ["ennen ajanlaskun alkua", "jälkeen ajanlaskun alun"]
};
var quarterValues$57 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"Q1",
		"Q2",
		"Q3",
		"Q4"
	],
	wide: [
		"1. kvartaali",
		"2. kvartaali",
		"3. kvartaali",
		"4. kvartaali"
	]
};
var monthValues$57 = {
	narrow: [
		"T",
		"H",
		"M",
		"H",
		"T",
		"K",
		"H",
		"E",
		"S",
		"L",
		"M",
		"J"
	],
	abbreviated: [
		"tammi",
		"helmi",
		"maalis",
		"huhti",
		"touko",
		"kesä",
		"heinä",
		"elo",
		"syys",
		"loka",
		"marras",
		"joulu"
	],
	wide: [
		"tammikuu",
		"helmikuu",
		"maaliskuu",
		"huhtikuu",
		"toukokuu",
		"kesäkuu",
		"heinäkuu",
		"elokuu",
		"syyskuu",
		"lokakuu",
		"marraskuu",
		"joulukuu"
	]
};
var formattingMonthValues$11 = {
	narrow: monthValues$57.narrow,
	abbreviated: monthValues$57.abbreviated,
	wide: [
		"tammikuuta",
		"helmikuuta",
		"maaliskuuta",
		"huhtikuuta",
		"toukokuuta",
		"kesäkuuta",
		"heinäkuuta",
		"elokuuta",
		"syyskuuta",
		"lokakuuta",
		"marraskuuta",
		"joulukuuta"
	]
};
var dayValues$57 = {
	narrow: [
		"S",
		"M",
		"T",
		"K",
		"T",
		"P",
		"L"
	],
	short: [
		"su",
		"ma",
		"ti",
		"ke",
		"to",
		"pe",
		"la"
	],
	abbreviated: [
		"sunn.",
		"maan.",
		"tiis.",
		"kesk.",
		"torst.",
		"perj.",
		"la"
	],
	wide: [
		"sunnuntai",
		"maanantai",
		"tiistai",
		"keskiviikko",
		"torstai",
		"perjantai",
		"lauantai"
	]
};
var formattingDayValues$3 = {
	narrow: dayValues$57.narrow,
	short: dayValues$57.short,
	abbreviated: dayValues$57.abbreviated,
	wide: [
		"sunnuntaina",
		"maanantaina",
		"tiistaina",
		"keskiviikkona",
		"torstaina",
		"perjantaina",
		"lauantaina"
	]
};
var dayPeriodValues$57 = {
	narrow: {
		am: "ap",
		pm: "ip",
		midnight: "keskiyö",
		noon: "keskipäivä",
		morning: "ap",
		afternoon: "ip",
		evening: "illalla",
		night: "yöllä"
	},
	abbreviated: {
		am: "ap",
		pm: "ip",
		midnight: "keskiyö",
		noon: "keskipäivä",
		morning: "ap",
		afternoon: "ip",
		evening: "illalla",
		night: "yöllä"
	},
	wide: {
		am: "ap",
		pm: "ip",
		midnight: "keskiyöllä",
		noon: "keskipäivällä",
		morning: "aamupäivällä",
		afternoon: "iltapäivällä",
		evening: "illalla",
		night: "yöllä"
	}
};
var ordinalNumber$57 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + ".";
};
//#endregion
//#region ../../node_modules/date-fns/locale/fi.js
/**
* @category Locales
* @summary Finnish locale.
* @language Finnish
* @iso-639-2 fin
* @author Pyry-Samuli Lahti [@Pyppe](https://github.com/Pyppe)
* @author Edo Rivai [@mikolajgrzyb](https://github.com/mikolajgrzyb)
* @author Samu Juvonen [@sjuvonen](https://github.com/sjuvonen)
*/
var fi = {
	code: "fi",
	formatDistance: formatDistance$57,
	formatLong: formatLong$60,
	formatRelative: formatRelative$58,
	localize: {
		ordinalNumber: ordinalNumber$57,
		era: buildLocalizeFn({
			values: eraValues$57,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$57,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$57,
			defaultWidth: "wide",
			formattingValues: formattingMonthValues$11,
			defaultFormattingWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$57,
			defaultWidth: "wide",
			formattingValues: formattingDayValues$3,
			defaultFormattingWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$57,
			defaultWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(\.)/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(e|j)/i,
				abbreviated: /^(eaa.|jaa.)/i,
				wide: /^(ennen ajanlaskun alkua|jälkeen ajanlaskun alun)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^e/i, /^j/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^q[1234]/i,
				wide: /^[1234]\.? kvartaali/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[thmkeslj]/i,
				abbreviated: /^(tammi|helmi|maalis|huhti|touko|kesä|heinä|elo|syys|loka|marras|joulu)/i,
				wide: /^(tammikuu|helmikuu|maaliskuu|huhtikuu|toukokuu|kesäkuu|heinäkuu|elokuu|syyskuu|lokakuu|marraskuu|joulukuu)(ta)?/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^t/i,
					/^h/i,
					/^m/i,
					/^h/i,
					/^t/i,
					/^k/i,
					/^h/i,
					/^e/i,
					/^s/i,
					/^l/i,
					/^m/i,
					/^j/i
				],
				any: [
					/^ta/i,
					/^hel/i,
					/^maa/i,
					/^hu/i,
					/^to/i,
					/^k/i,
					/^hei/i,
					/^e/i,
					/^s/i,
					/^l/i,
					/^mar/i,
					/^j/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[smtkpl]/i,
				short: /^(su|ma|ti|ke|to|pe|la)/i,
				abbreviated: /^(sunn.|maan.|tiis.|kesk.|torst.|perj.|la)/i,
				wide: /^(sunnuntai|maanantai|tiistai|keskiviikko|torstai|perjantai|lauantai)(na)?/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^s/i,
					/^m/i,
					/^t/i,
					/^k/i,
					/^t/i,
					/^p/i,
					/^l/i
				],
				any: [
					/^s/i,
					/^m/i,
					/^ti/i,
					/^k/i,
					/^to/i,
					/^p/i,
					/^l/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(ap|ip|keskiyö|keskipäivä|aamupäivällä|iltapäivällä|illalla|yöllä)/i,
				any: /^(ap|ip|keskiyöllä|keskipäivällä|aamupäivällä|iltapäivällä|illalla|yöllä)/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^ap/i,
				pm: /^ip/i,
				midnight: /^keskiyö/i,
				noon: /^keskipäivä/i,
				morning: /aamupäivällä/i,
				afternoon: /iltapäivällä/i,
				evening: /illalla/i,
				night: /yöllä/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/fr/_lib/formatDistance.js
var formatDistanceLocale$55 = {
	lessThanXSeconds: {
		one: "moins d’une seconde",
		other: "moins de {{count}} secondes"
	},
	xSeconds: {
		one: "1 seconde",
		other: "{{count}} secondes"
	},
	halfAMinute: "30 secondes",
	lessThanXMinutes: {
		one: "moins d’une minute",
		other: "moins de {{count}} minutes"
	},
	xMinutes: {
		one: "1 minute",
		other: "{{count}} minutes"
	},
	aboutXHours: {
		one: "environ 1 heure",
		other: "environ {{count}} heures"
	},
	xHours: {
		one: "1 heure",
		other: "{{count}} heures"
	},
	xDays: {
		one: "1 jour",
		other: "{{count}} jours"
	},
	aboutXWeeks: {
		one: "environ 1 semaine",
		other: "environ {{count}} semaines"
	},
	xWeeks: {
		one: "1 semaine",
		other: "{{count}} semaines"
	},
	aboutXMonths: {
		one: "environ 1 mois",
		other: "environ {{count}} mois"
	},
	xMonths: {
		one: "1 mois",
		other: "{{count}} mois"
	},
	aboutXYears: {
		one: "environ 1 an",
		other: "environ {{count}} ans"
	},
	xYears: {
		one: "1 an",
		other: "{{count}} ans"
	},
	overXYears: {
		one: "plus d’un an",
		other: "plus de {{count}} ans"
	},
	almostXYears: {
		one: "presqu’un an",
		other: "presque {{count}} ans"
	}
};
var formatDistance$56 = (token, count, options) => {
	let result;
	const form = formatDistanceLocale$55[token];
	if (typeof form === "string") result = form;
	else if (count === 1) result = form.one;
	else result = form.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "dans " + result;
	else return "il y a " + result;
	return result;
};
var formatLong$59 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE d MMMM y",
			long: "d MMMM y",
			medium: "d MMM y",
			short: "dd/MM/y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'à' {{time}}",
			long: "{{date}} 'à' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/fr/_lib/formatRelative.js
var formatRelativeLocale$57 = {
	lastWeek: "eeee 'dernier à' p",
	yesterday: "'hier à' p",
	today: "'aujourd’hui à' p",
	tomorrow: "'demain à' p'",
	nextWeek: "eeee 'prochain à' p",
	other: "P"
};
var formatRelative$57 = (token, _date, _baseDate, _options) => formatRelativeLocale$57[token];
//#endregion
//#region ../../node_modules/date-fns/locale/fr/_lib/localize.js
var eraValues$56 = {
	narrow: ["av. J.-C", "ap. J.-C"],
	abbreviated: ["av. J.-C", "ap. J.-C"],
	wide: ["avant Jésus-Christ", "après Jésus-Christ"]
};
var quarterValues$56 = {
	narrow: [
		"T1",
		"T2",
		"T3",
		"T4"
	],
	abbreviated: [
		"1er trim.",
		"2ème trim.",
		"3ème trim.",
		"4ème trim."
	],
	wide: [
		"1er trimestre",
		"2ème trimestre",
		"3ème trimestre",
		"4ème trimestre"
	]
};
var monthValues$56 = {
	narrow: [
		"J",
		"F",
		"M",
		"A",
		"M",
		"J",
		"J",
		"A",
		"S",
		"O",
		"N",
		"D"
	],
	abbreviated: [
		"janv.",
		"févr.",
		"mars",
		"avr.",
		"mai",
		"juin",
		"juil.",
		"août",
		"sept.",
		"oct.",
		"nov.",
		"déc."
	],
	wide: [
		"janvier",
		"février",
		"mars",
		"avril",
		"mai",
		"juin",
		"juillet",
		"août",
		"septembre",
		"octobre",
		"novembre",
		"décembre"
	]
};
var dayValues$56 = {
	narrow: [
		"D",
		"L",
		"M",
		"M",
		"J",
		"V",
		"S"
	],
	short: [
		"di",
		"lu",
		"ma",
		"me",
		"je",
		"ve",
		"sa"
	],
	abbreviated: [
		"dim.",
		"lun.",
		"mar.",
		"mer.",
		"jeu.",
		"ven.",
		"sam."
	],
	wide: [
		"dimanche",
		"lundi",
		"mardi",
		"mercredi",
		"jeudi",
		"vendredi",
		"samedi"
	]
};
var dayPeriodValues$56 = {
	narrow: {
		am: "AM",
		pm: "PM",
		midnight: "minuit",
		noon: "midi",
		morning: "mat.",
		afternoon: "ap.m.",
		evening: "soir",
		night: "mat."
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "minuit",
		noon: "midi",
		morning: "matin",
		afternoon: "après-midi",
		evening: "soir",
		night: "matin"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "minuit",
		noon: "midi",
		morning: "du matin",
		afternoon: "de l’après-midi",
		evening: "du soir",
		night: "du matin"
	}
};
var ordinalNumber$56 = (dirtyNumber, options) => {
	const number = Number(dirtyNumber);
	const unit = options?.unit;
	if (number === 0) return "0";
	const feminineUnits = [
		"year",
		"week",
		"hour",
		"minute",
		"second"
	];
	let suffix;
	if (number === 1) suffix = unit && feminineUnits.includes(unit) ? "ère" : "er";
	else suffix = "ème";
	return number + suffix;
};
var LONG_MONTHS_TOKENS = ["MMM", "MMMM"];
var localize$56 = {
	preprocessor: (date, parts) => {
		if (date.getDate() === 1) return parts;
		if (!parts.some((part) => part.isToken && LONG_MONTHS_TOKENS.includes(part.value))) return parts;
		return parts.map((part) => part.isToken && part.value === "do" ? {
			isToken: true,
			value: "d"
		} : part);
	},
	ordinalNumber: ordinalNumber$56,
	era: buildLocalizeFn({
		values: eraValues$56,
		defaultWidth: "wide"
	}),
	quarter: buildLocalizeFn({
		values: quarterValues$56,
		defaultWidth: "wide",
		argumentCallback: (quarter) => quarter - 1
	}),
	month: buildLocalizeFn({
		values: monthValues$56,
		defaultWidth: "wide"
	}),
	day: buildLocalizeFn({
		values: dayValues$56,
		defaultWidth: "wide"
	}),
	dayPeriod: buildLocalizeFn({
		values: dayPeriodValues$56,
		defaultWidth: "wide"
	})
};
var match$56 = {
	ordinalNumber: buildMatchPatternFn({
		matchPattern: /^(\d+)(ième|ère|ème|er|e)?/i,
		parsePattern: /\d+/i,
		valueCallback: (value) => parseInt(value)
	}),
	era: buildMatchFn({
		matchPatterns: {
			narrow: /^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,
			abbreviated: /^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,
			wide: /^(avant Jésus-Christ|après Jésus-Christ)/i
		},
		defaultMatchWidth: "wide",
		parsePatterns: { any: [/^av/i, /^ap/i] },
		defaultParseWidth: "any"
	}),
	quarter: buildMatchFn({
		matchPatterns: {
			narrow: /^T?[1234]/i,
			abbreviated: /^[1234](er|ème|e)? trim\.?/i,
			wide: /^[1234](er|ème|e)? trimestre/i
		},
		defaultMatchWidth: "wide",
		parsePatterns: { any: [
			/1/i,
			/2/i,
			/3/i,
			/4/i
		] },
		defaultParseWidth: "any",
		valueCallback: (index) => index + 1
	}),
	month: buildMatchFn({
		matchPatterns: {
			narrow: /^[jfmasond]/i,
			abbreviated: /^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,
			wide: /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i
		},
		defaultMatchWidth: "wide",
		parsePatterns: {
			narrow: [
				/^j/i,
				/^f/i,
				/^m/i,
				/^a/i,
				/^m/i,
				/^j/i,
				/^j/i,
				/^a/i,
				/^s/i,
				/^o/i,
				/^n/i,
				/^d/i
			],
			any: [
				/^ja/i,
				/^f/i,
				/^mar/i,
				/^av/i,
				/^ma/i,
				/^juin/i,
				/^juil/i,
				/^ao/i,
				/^s/i,
				/^o/i,
				/^n/i,
				/^d/i
			]
		},
		defaultParseWidth: "any"
	}),
	day: buildMatchFn({
		matchPatterns: {
			narrow: /^[lmjvsd]/i,
			short: /^(di|lu|ma|me|je|ve|sa)/i,
			abbreviated: /^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,
			wide: /^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i
		},
		defaultMatchWidth: "wide",
		parsePatterns: {
			narrow: [
				/^d/i,
				/^l/i,
				/^m/i,
				/^m/i,
				/^j/i,
				/^v/i,
				/^s/i
			],
			any: [
				/^di/i,
				/^lu/i,
				/^ma/i,
				/^me/i,
				/^je/i,
				/^ve/i,
				/^sa/i
			]
		},
		defaultParseWidth: "any"
	}),
	dayPeriod: buildMatchFn({
		matchPatterns: {
			narrow: /^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,
			any: /^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i
		},
		defaultMatchWidth: "any",
		parsePatterns: { any: {
			am: /^a/i,
			pm: /^p/i,
			midnight: /^min/i,
			noon: /^mid/i,
			morning: /mat/i,
			afternoon: /ap/i,
			evening: /soir/i,
			night: /nuit/i
		} },
		defaultParseWidth: "any"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/fr.js
/**
* @category Locales
* @summary French locale.
* @language French
* @iso-639-2 fra
* @author Jean Dupouy [@izeau](https://github.com/izeau)
* @author François B [@fbonzon](https://github.com/fbonzon)
*/
var fr = {
	code: "fr",
	formatDistance: formatDistance$56,
	formatLong: formatLong$59,
	formatRelative: formatRelative$57,
	localize: localize$56,
	match: match$56,
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/fr-CA.js
/**
* @category Locales
* @summary French locale (Canada).
* @language French
* @iso-639-2 fra
* @author Jean Dupouy [@izeau](https://github.com/izeau)
* @author François B [@fbonzon](https://github.com/fbonzon)
* @author Gabriele Petrioli [@gpetrioli](https://github.com/gpetrioli)
*/
var frCA = {
	code: "fr-CA",
	formatDistance: formatDistance$56,
	formatLong: {
		date: buildFormatLongFn({
			formats: {
				full: "EEEE d MMMM y",
				long: "d MMMM y",
				medium: "d MMM y",
				short: "yy-MM-dd"
			},
			defaultWidth: "full"
		}),
		time: buildFormatLongFn({
			formats: {
				full: "HH:mm:ss zzzz",
				long: "HH:mm:ss z",
				medium: "HH:mm:ss",
				short: "HH:mm"
			},
			defaultWidth: "full"
		}),
		dateTime: buildFormatLongFn({
			formats: {
				full: "{{date}} 'à' {{time}}",
				long: "{{date}} 'à' {{time}}",
				medium: "{{date}}, {{time}}",
				short: "{{date}}, {{time}}"
			},
			defaultWidth: "full"
		})
	},
	formatRelative: formatRelative$57,
	localize: localize$56,
	match: match$56,
	options: {
		weekStartsOn: 0,
		firstWeekContainsDate: 1
	}
};
var formatLong$57 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE d MMMM y",
			long: "d MMMM y",
			medium: "d MMM y",
			short: "dd.MM.y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'à' {{time}}",
			long: "{{date}} 'à' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/fr-CH/_lib/formatRelative.js
var formatRelativeLocale$56 = {
	lastWeek: "eeee 'la semaine dernière à' p",
	yesterday: "'hier à' p",
	today: "'aujourd’hui à' p",
	tomorrow: "'demain à' p'",
	nextWeek: "eeee 'la semaine prochaine à' p",
	other: "P"
};
var formatRelative$56 = (token, _date, _baseDate, _options) => formatRelativeLocale$56[token];
//#endregion
//#region ../../node_modules/date-fns/locale/fr-CH.js
/**
* @category Locales
* @summary French locale (Switzerland).
* @language French
* @iso-639-2 fra
* @author Jean Dupouy [@izeau](https://github.com/izeau)
* @author François B [@fbonzon](https://github.com/fbonzon)
* @author Van Vuong Ngo [@vanvuongngo](https://github.com/vanvuongngo)
* @author Alex Hoeing [@dcbn](https://github.com/dcbn)
*/
var frCH = {
	code: "fr-CH",
	formatDistance: formatDistance$56,
	formatLong: formatLong$57,
	formatRelative: formatRelative$56,
	localize: localize$56,
	match: match$56,
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/fy/_lib/formatDistance.js
var formatDistanceLocale$54 = {
	lessThanXSeconds: {
		one: "minder as 1 sekonde",
		other: "minder as {{count}} sekonden"
	},
	xSeconds: {
		one: "1 sekonde",
		other: "{{count}} sekonden"
	},
	halfAMinute: "oardel minút",
	lessThanXMinutes: {
		one: "minder as 1 minút",
		other: "minder as {{count}} minuten"
	},
	xMinutes: {
		one: "1 minút",
		other: "{{count}} minuten"
	},
	aboutXHours: {
		one: "sawat 1 oere",
		other: "sawat {{count}} oere"
	},
	xHours: {
		one: "1 oere",
		other: "{{count}} oere"
	},
	xDays: {
		one: "1 dei",
		other: "{{count}} dagen"
	},
	aboutXWeeks: {
		one: "sawat 1 wike",
		other: "sawat {{count}} wiken"
	},
	xWeeks: {
		one: "1 wike",
		other: "{{count}} wiken"
	},
	aboutXMonths: {
		one: "sawat 1 moanne",
		other: "sawat {{count}} moannen"
	},
	xMonths: {
		one: "1 moanne",
		other: "{{count}} moannen"
	},
	aboutXYears: {
		one: "sawat 1 jier",
		other: "sawat {{count}} jier"
	},
	xYears: {
		one: "1 jier",
		other: "{{count}} jier"
	},
	overXYears: {
		one: "mear as 1 jier",
		other: "mear as {{count}}s jier"
	},
	almostXYears: {
		one: "hast 1 jier",
		other: "hast {{count}} jier"
	}
};
var formatDistance$55 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$54[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "oer " + result;
	else return result + " lyn";
	return result;
};
var formatLong$56 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE d MMMM y",
			long: "d MMMM y",
			medium: "d MMM y",
			short: "dd-MM-y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'om' {{time}}",
			long: "{{date}} 'om' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/fy/_lib/formatRelative.js
var formatRelativeLocale$55 = {
	lastWeek: "'ôfrûne' eeee 'om' p",
	yesterday: "'juster om' p",
	today: "'hjoed om' p",
	tomorrow: "'moarn om' p",
	nextWeek: "eeee 'om' p",
	other: "P"
};
var formatRelative$55 = (token, _date, _baseDate, _options) => formatRelativeLocale$55[token];
//#endregion
//#region ../../node_modules/date-fns/locale/fy/_lib/localize.js
var eraValues$55 = {
	narrow: ["f.K.", "n.K."],
	abbreviated: ["f.Kr.", "n.Kr."],
	wide: ["foar Kristus", "nei Kristus"]
};
var quarterValues$55 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"K1",
		"K2",
		"K3",
		"K4"
	],
	wide: [
		"1e fearnsjier",
		"2e fearnsjier",
		"3e fearnsjier",
		"4e fearnsjier"
	]
};
var monthValues$55 = {
	narrow: [
		"j",
		"f",
		"m",
		"a",
		"m",
		"j",
		"j",
		"a",
		"s",
		"o",
		"n",
		"d"
	],
	abbreviated: [
		"jan.",
		"feb.",
		"mrt.",
		"apr.",
		"mai.",
		"jun.",
		"jul.",
		"aug.",
		"sep.",
		"okt.",
		"nov.",
		"des."
	],
	wide: [
		"jannewaris",
		"febrewaris",
		"maart",
		"april",
		"maaie",
		"juny",
		"july",
		"augustus",
		"septimber",
		"oktober",
		"novimber",
		"desimber"
	]
};
var dayValues$55 = {
	narrow: [
		"s",
		"m",
		"t",
		"w",
		"t",
		"f",
		"s"
	],
	short: [
		"si",
		"mo",
		"ti",
		"wo",
		"to",
		"fr",
		"so"
	],
	abbreviated: [
		"snein",
		"moa",
		"tii",
		"woa",
		"ton",
		"fre",
		"sneon"
	],
	wide: [
		"snein",
		"moandei",
		"tiisdei",
		"woansdei",
		"tongersdei",
		"freed",
		"sneon"
	]
};
var dayPeriodValues$55 = {
	narrow: {
		am: "AM",
		pm: "PM",
		midnight: "middernacht",
		noon: "middei",
		morning: "moarns",
		afternoon: "middeis",
		evening: "jûns",
		night: "nachts"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "middernacht",
		noon: "middei",
		morning: "moarns",
		afternoon: "middeis",
		evening: "jûns",
		night: "nachts"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "middernacht",
		noon: "middei",
		morning: "moarns",
		afternoon: "middeis",
		evening: "jûns",
		night: "nachts"
	}
};
var ordinalNumber$55 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + "e";
};
//#endregion
//#region ../../node_modules/date-fns/locale/fy.js
/**
* @category Locales
* @summary Western Frisian locale (Netherlands).
* @language West Frisian
* @iso-639-2 fry
* @author Damon Asberg [@damon02](https://github.com/damon02)
*/
var fy = {
	code: "fy",
	formatDistance: formatDistance$55,
	formatLong: formatLong$56,
	formatRelative: formatRelative$55,
	localize: {
		ordinalNumber: ordinalNumber$55,
		era: buildLocalizeFn({
			values: eraValues$55,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$55,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$55,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$55,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$55,
			defaultWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)e?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^([fn]\.? ?K\.?)/,
				abbreviated: /^([fn]\. ?Kr\.?)/,
				wide: /^((foar|nei) Kristus)/
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^f/, /^n/] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^K[1234]/i,
				wide: /^[1234]e fearnsjier/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[jfmasond]/i,
				abbreviated: /^(jan.|feb.|mrt.|apr.|mai.|jun.|jul.|aug.|sep.|okt.|nov.|des.)/i,
				wide: /^(jannewaris|febrewaris|maart|april|maaie|juny|july|augustus|septimber|oktober|novimber|desimber)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^j/i,
					/^f/i,
					/^m/i,
					/^a/i,
					/^m/i,
					/^j/i,
					/^j/i,
					/^a/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				],
				any: [
					/^jan/i,
					/^feb/i,
					/^m(r|a)/i,
					/^apr/i,
					/^mai/i,
					/^jun/i,
					/^jul/i,
					/^aug/i,
					/^sep/i,
					/^okt/i,
					/^nov/i,
					/^des/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[smtwf]/i,
				short: /^(si|mo|ti|wo|to|fr|so)/i,
				abbreviated: /^(snein|moa|tii|woa|ton|fre|sneon)/i,
				wide: /^(snein|moandei|tiisdei|woansdei|tongersdei|freed|sneon)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^s/i,
					/^m/i,
					/^t/i,
					/^w/i,
					/^t/i,
					/^f/i,
					/^s/i
				],
				any: [
					/^sn/i,
					/^mo/i,
					/^ti/i,
					/^wo/i,
					/^to/i,
					/^fr/i,
					/^sn/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: { any: /^(am|pm|middernacht|middeis|moarns|middei|jûns|nachts)/i },
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^am/i,
				pm: /^pm/i,
				midnight: /^middernacht/i,
				noon: /^middei/i,
				morning: /moarns/i,
				afternoon: /^middeis/i,
				evening: /jûns/i,
				night: /nachts/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/gd/_lib/formatDistance.js
var formatDistanceLocale$53 = {
	lessThanXSeconds: {
		one: "nas lugha na diog",
		other: "nas lugha na {{count}} diogan"
	},
	xSeconds: {
		one: "1 diog",
		two: "2 dhiog",
		twenty: "20 diog",
		other: "{{count}} diogan"
	},
	halfAMinute: "leth mhionaid",
	lessThanXMinutes: {
		one: "nas lugha na mionaid",
		other: "nas lugha na {{count}} mionaidean"
	},
	xMinutes: {
		one: "1 mionaid",
		two: "2 mhionaid",
		twenty: "20 mionaid",
		other: "{{count}} mionaidean"
	},
	aboutXHours: {
		one: "mu uair de thìde",
		other: "mu {{count}} uairean de thìde"
	},
	xHours: {
		one: "1 uair de thìde",
		two: "2 uair de thìde",
		twenty: "20 uair de thìde",
		other: "{{count}} uairean de thìde"
	},
	xDays: {
		one: "1 là",
		other: "{{count}} là"
	},
	aboutXWeeks: {
		one: "mu 1 seachdain",
		other: "mu {{count}} seachdainean"
	},
	xWeeks: {
		one: "1 seachdain",
		other: "{{count}} seachdainean"
	},
	aboutXMonths: {
		one: "mu mhìos",
		other: "mu {{count}} mìosan"
	},
	xMonths: {
		one: "1 mìos",
		other: "{{count}} mìosan"
	},
	aboutXYears: {
		one: "mu bhliadhna",
		other: "mu {{count}} bliadhnaichean"
	},
	xYears: {
		one: "1 bhliadhna",
		other: "{{count}} bliadhna"
	},
	overXYears: {
		one: "còrr is bliadhna",
		other: "còrr is {{count}} bliadhnaichean"
	},
	almostXYears: {
		one: "cha mhòr bliadhna",
		other: "cha mhòr {{count}} bliadhnaichean"
	}
};
var formatDistance$54 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$53[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else if (count === 2 && !!tokenValue.two) result = tokenValue.two;
	else if (count === 20 && !!tokenValue.twenty) result = tokenValue.twenty;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "ann an " + result;
	else return "o chionn " + result;
	return result;
};
var formatLong$55 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, MMMM do, y",
			long: "MMMM do, y",
			medium: "MMM d, y",
			short: "MM/dd/yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "h:mm:ss a zzzz",
			long: "h:mm:ss a z",
			medium: "h:mm:ss a",
			short: "h:mm a"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'aig' {{time}}",
			long: "{{date}} 'aig' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/gd/_lib/formatRelative.js
var formatRelativeLocale$54 = {
	lastWeek: "'mu dheireadh' eeee 'aig' p",
	yesterday: "'an-dè aig' p",
	today: "'an-diugh aig' p",
	tomorrow: "'a-màireach aig' p",
	nextWeek: "eeee 'aig' p",
	other: "P"
};
var formatRelative$54 = (token, _date, _baseDate, _options) => formatRelativeLocale$54[token];
//#endregion
//#region ../../node_modules/date-fns/locale/gd/_lib/localize.js
var eraValues$54 = {
	narrow: ["R", "A"],
	abbreviated: ["RC", "AD"],
	wide: ["ro Chrìosta", "anno domini"]
};
var quarterValues$54 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"C1",
		"C2",
		"C3",
		"C4"
	],
	wide: [
		"a' chiad chairteal",
		"an dàrna cairteal",
		"an treas cairteal",
		"an ceathramh cairteal"
	]
};
var monthValues$54 = {
	narrow: [
		"F",
		"G",
		"M",
		"G",
		"C",
		"Ò",
		"I",
		"L",
		"S",
		"D",
		"S",
		"D"
	],
	abbreviated: [
		"Faoi",
		"Gear",
		"Màrt",
		"Gibl",
		"Cèit",
		"Ògmh",
		"Iuch",
		"Lùn",
		"Sult",
		"Dàmh",
		"Samh",
		"Dùbh"
	],
	wide: [
		"Am Faoilleach",
		"An Gearran",
		"Am Màrt",
		"An Giblean",
		"An Cèitean",
		"An t-Ògmhios",
		"An t-Iuchar",
		"An Lùnastal",
		"An t-Sultain",
		"An Dàmhair",
		"An t-Samhain",
		"An Dùbhlachd"
	]
};
var dayValues$54 = {
	narrow: [
		"D",
		"L",
		"M",
		"C",
		"A",
		"H",
		"S"
	],
	short: [
		"Dò",
		"Lu",
		"Mà",
		"Ci",
		"Ar",
		"Ha",
		"Sa"
	],
	abbreviated: [
		"Did",
		"Dil",
		"Dim",
		"Dic",
		"Dia",
		"Dih",
		"Dis"
	],
	wide: [
		"Didòmhnaich",
		"Diluain",
		"Dimàirt",
		"Diciadain",
		"Diardaoin",
		"Dihaoine",
		"Disathairne"
	]
};
var dayPeriodValues$54 = {
	narrow: {
		am: "m",
		pm: "f",
		midnight: "m.o.",
		noon: "m.l.",
		morning: "madainn",
		afternoon: "feasgar",
		evening: "feasgar",
		night: "oidhche"
	},
	abbreviated: {
		am: "M.",
		pm: "F.",
		midnight: "meadhan oidhche",
		noon: "meadhan là",
		morning: "madainn",
		afternoon: "feasgar",
		evening: "feasgar",
		night: "oidhche"
	},
	wide: {
		am: "m.",
		pm: "f.",
		midnight: "meadhan oidhche",
		noon: "meadhan là",
		morning: "madainn",
		afternoon: "feasgar",
		evening: "feasgar",
		night: "oidhche"
	}
};
var formattingDayPeriodValues$44 = {
	narrow: {
		am: "m",
		pm: "f",
		midnight: "m.o.",
		noon: "m.l.",
		morning: "sa mhadainn",
		afternoon: "feasgar",
		evening: "feasgar",
		night: "air an oidhche"
	},
	abbreviated: {
		am: "M.",
		pm: "F.",
		midnight: "meadhan oidhche",
		noon: "meadhan là",
		morning: "sa mhadainn",
		afternoon: "feasgar",
		evening: "feasgar",
		night: "air an oidhche"
	},
	wide: {
		am: "m.",
		pm: "f.",
		midnight: "meadhan oidhche",
		noon: "meadhan là",
		morning: "sa mhadainn",
		afternoon: "feasgar",
		evening: "feasgar",
		night: "air an oidhche"
	}
};
var ordinalNumber$54 = (dirtyNumber) => {
	const number = Number(dirtyNumber);
	const rem100 = number % 100;
	if (rem100 > 20 || rem100 < 10) switch (rem100 % 10) {
		case 1: return number + "d";
		case 2: return number + "na";
	}
	if (rem100 === 12) return number + "na";
	return number + "mh";
};
//#endregion
//#region ../../node_modules/date-fns/locale/gd.js
/**
* @category Locales
* @summary Scottish Gaelic.
* @language Scottish Gaelic
* @iso-639-2 gla
* @author Lee Driscoll [@leedriscoll](https://github.com/leedriscoll)
*/
var gd = {
	code: "gd",
	formatDistance: formatDistance$54,
	formatLong: formatLong$55,
	formatRelative: formatRelative$54,
	localize: {
		ordinalNumber: ordinalNumber$54,
		era: buildLocalizeFn({
			values: eraValues$54,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$54,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$54,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$54,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$54,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$44,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(d|na|tr|mh)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(r|a)/i,
				abbreviated: /^(r\.?\s?c\.?|r\.?\s?a\.?\s?c\.?|a\.?\s?d\.?|a\.?\s?c\.?)/i,
				wide: /^(ro Chrìosta|ron aois choitchinn|anno domini|aois choitcheann)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^b/i, /^(a|c)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^c[1234]/i,
				wide: /^[1234](cd|na|tr|mh)? cairteal/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[fgmcòilsd]/i,
				abbreviated: /^(faoi|gear|màrt|gibl|cèit|ògmh|iuch|lùn|sult|dàmh|samh|dùbh)/i,
				wide: /^(am faoilleach|an gearran|am màrt|an giblean|an cèitean|an t-Ògmhios|an t-Iuchar|an lùnastal|an t-Sultain|an dàmhair|an t-Samhain|an dùbhlachd)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^f/i,
					/^g/i,
					/^m/i,
					/^g/i,
					/^c/i,
					/^ò/i,
					/^i/i,
					/^l/i,
					/^s/i,
					/^d/i,
					/^s/i,
					/^d/i
				],
				any: [
					/^fa/i,
					/^ge/i,
					/^mà/i,
					/^gi/i,
					/^c/i,
					/^ò/i,
					/^i/i,
					/^l/i,
					/^su/i,
					/^d/i,
					/^sa/i,
					/^d/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[dlmcahs]/i,
				short: /^(dò|lu|mà|ci|ar|ha|sa)/i,
				abbreviated: /^(did|dil|dim|dic|dia|dih|dis)/i,
				wide: /^(didòmhnaich|diluain|dimàirt|diciadain|diardaoin|dihaoine|disathairne)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^d/i,
					/^l/i,
					/^m/i,
					/^c/i,
					/^a/i,
					/^h/i,
					/^s/i
				],
				any: [
					/^d/i,
					/^l/i,
					/^m/i,
					/^c/i,
					/^a/i,
					/^h/i,
					/^s/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(a|p|mi|n|(san|aig) (madainn|feasgar|feasgar|oidhche))/i,
				any: /^([ap]\.?\s?m\.?|meadhan oidhche|meadhan là|(san|aig) (madainn|feasgar|feasgar|oidhche))/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^m/i,
				pm: /^f/i,
				midnight: /^meadhan oidhche/i,
				noon: /^meadhan là/i,
				morning: /sa mhadainn/i,
				afternoon: /feasgar/i,
				evening: /feasgar/i,
				night: /air an oidhche/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 0,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/gl/_lib/formatDistance.js
var formatDistanceLocale$52 = {
	lessThanXSeconds: {
		one: "menos dun segundo",
		other: "menos de {{count}} segundos"
	},
	xSeconds: {
		one: "1 segundo",
		other: "{{count}} segundos"
	},
	halfAMinute: "medio minuto",
	lessThanXMinutes: {
		one: "menos dun minuto",
		other: "menos de {{count}} minutos"
	},
	xMinutes: {
		one: "1 minuto",
		other: "{{count}} minutos"
	},
	aboutXHours: {
		one: "arredor dunha hora",
		other: "arredor de {{count}} horas"
	},
	xHours: {
		one: "1 hora",
		other: "{{count}} horas"
	},
	xDays: {
		one: "1 día",
		other: "{{count}} días"
	},
	aboutXWeeks: {
		one: "arredor dunha semana",
		other: "arredor de {{count}} semanas"
	},
	xWeeks: {
		one: "1 semana",
		other: "{{count}} semanas"
	},
	aboutXMonths: {
		one: "arredor de 1 mes",
		other: "arredor de {{count}} meses"
	},
	xMonths: {
		one: "1 mes",
		other: "{{count}} meses"
	},
	aboutXYears: {
		one: "arredor dun ano",
		other: "arredor de {{count}} anos"
	},
	xYears: {
		one: "1 ano",
		other: "{{count}} anos"
	},
	overXYears: {
		one: "máis dun ano",
		other: "máis de {{count}} anos"
	},
	almostXYears: {
		one: "case un ano",
		other: "case {{count}} anos"
	}
};
var formatDistance$53 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$52[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "en " + result;
	else return "hai " + result;
	return result;
};
var formatLong$54 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, d 'de' MMMM y",
			long: "d 'de' MMMM y",
			medium: "d MMM y",
			short: "dd/MM/y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'ás' {{time}}",
			long: "{{date}} 'ás' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/gl/_lib/formatRelative.js
var formatRelativeLocale$53 = {
	lastWeek: "'o' eeee 'pasado á' LT",
	yesterday: "'onte á' p",
	today: "'hoxe á' p",
	tomorrow: "'mañá á' p",
	nextWeek: "eeee 'á' p",
	other: "P"
};
var formatRelativeLocalePlural = {
	lastWeek: "'o' eeee 'pasado ás' p",
	yesterday: "'onte ás' p",
	today: "'hoxe ás' p",
	tomorrow: "'mañá ás' p",
	nextWeek: "eeee 'ás' p",
	other: "P"
};
var formatRelative$53 = (token, date, _baseDate, _options) => {
	if (date.getHours() !== 1) return formatRelativeLocalePlural[token];
	return formatRelativeLocale$53[token];
};
//#endregion
//#region ../../node_modules/date-fns/locale/gl/_lib/localize.js
var eraValues$53 = {
	narrow: ["AC", "DC"],
	abbreviated: ["AC", "DC"],
	wide: ["antes de cristo", "despois de cristo"]
};
var quarterValues$53 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"T1",
		"T2",
		"T3",
		"T4"
	],
	wide: [
		"1º trimestre",
		"2º trimestre",
		"3º trimestre",
		"4º trimestre"
	]
};
var monthValues$53 = {
	narrow: [
		"e",
		"f",
		"m",
		"a",
		"m",
		"j",
		"j",
		"a",
		"s",
		"o",
		"n",
		"d"
	],
	abbreviated: [
		"xan",
		"feb",
		"mar",
		"abr",
		"mai",
		"xun",
		"xul",
		"ago",
		"set",
		"out",
		"nov",
		"dec"
	],
	wide: [
		"xaneiro",
		"febreiro",
		"marzo",
		"abril",
		"maio",
		"xuño",
		"xullo",
		"agosto",
		"setembro",
		"outubro",
		"novembro",
		"decembro"
	]
};
var dayValues$53 = {
	narrow: [
		"d",
		"l",
		"m",
		"m",
		"j",
		"v",
		"s"
	],
	short: [
		"do",
		"lu",
		"ma",
		"me",
		"xo",
		"ve",
		"sa"
	],
	abbreviated: [
		"dom",
		"lun",
		"mar",
		"mer",
		"xov",
		"ven",
		"sab"
	],
	wide: [
		"domingo",
		"luns",
		"martes",
		"mércores",
		"xoves",
		"venres",
		"sábado"
	]
};
var dayPeriodValues$53 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "mn",
		noon: "md",
		morning: "mañá",
		afternoon: "tarde",
		evening: "tarde",
		night: "noite"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "medianoite",
		noon: "mediodía",
		morning: "mañá",
		afternoon: "tarde",
		evening: "tardiña",
		night: "noite"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "medianoite",
		noon: "mediodía",
		morning: "mañá",
		afternoon: "tarde",
		evening: "tardiña",
		night: "noite"
	}
};
var formattingDayPeriodValues$43 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "mn",
		noon: "md",
		morning: "da mañá",
		afternoon: "da tarde",
		evening: "da tardiña",
		night: "da noite"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "medianoite",
		noon: "mediodía",
		morning: "da mañá",
		afternoon: "da tarde",
		evening: "da tardiña",
		night: "da noite"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "medianoite",
		noon: "mediodía",
		morning: "da mañá",
		afternoon: "da tarde",
		evening: "da tardiña",
		night: "da noite"
	}
};
var ordinalNumber$53 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + "º";
};
//#endregion
//#region ../../node_modules/date-fns/locale/gl.js
/**
* @category Locales
* @summary Galician locale.
* @language Galician
* @iso-639-2 glg
* @author Alberto Doval - Cocodin Technology[@cocodinTech](https://github.com/cocodinTech)
* @author Fidel Pita [@fidelpita](https://github.com/fidelpita)
*/
var gl = {
	code: "gl",
	formatDistance: formatDistance$53,
	formatLong: formatLong$54,
	formatRelative: formatRelative$53,
	localize: {
		ordinalNumber: ordinalNumber$53,
		era: buildLocalizeFn({
			values: eraValues$53,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$53,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$53,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$53,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$53,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$43,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(º)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(ac|dc|a|d)/i,
				abbreviated: /^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,
				wide: /^(antes de cristo|antes da era com[uú]n|despois de cristo|era com[uú]n)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				any: [/^ac/i, /^dc/i],
				wide: [/^(antes de cristo|antes da era com[uú]n)/i, /^(despois de cristo|era com[uú]n)/i]
			},
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^T[1234]/i,
				wide: /^[1234](º)? trimestre/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[xfmasond]/i,
				abbreviated: /^(xan|feb|mar|abr|mai|xun|xul|ago|set|out|nov|dec)/i,
				wide: /^(xaneiro|febreiro|marzo|abril|maio|xuño|xullo|agosto|setembro|outubro|novembro|decembro)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^x/i,
					/^f/i,
					/^m/i,
					/^a/i,
					/^m/i,
					/^x/i,
					/^x/i,
					/^a/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				],
				any: [
					/^xan/i,
					/^feb/i,
					/^mar/i,
					/^abr/i,
					/^mai/i,
					/^xun/i,
					/^xul/i,
					/^ago/i,
					/^set/i,
					/^out/i,
					/^nov/i,
					/^dec/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[dlmxvs]/i,
				short: /^(do|lu|ma|me|xo|ve|sa)/i,
				abbreviated: /^(dom|lun|mar|mer|xov|ven|sab)/i,
				wide: /^(domingo|luns|martes|m[eé]rcores|xoves|venres|s[áa]bado)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^d/i,
					/^l/i,
					/^m/i,
					/^m/i,
					/^x/i,
					/^v/i,
					/^s/i
				],
				any: [
					/^do/i,
					/^lu/i,
					/^ma/i,
					/^me/i,
					/^xo/i,
					/^ve/i,
					/^sa/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(a|p|mn|md|(da|[aá]s) (mañ[aá]|tarde|noite))/i,
				any: /^([ap]\.?\s?m\.?|medianoite|mediod[ií]a|(da|[aá]s) (mañ[aá]|tarde|noite))/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a/i,
				pm: /^p/i,
				midnight: /^mn/i,
				noon: /^md/i,
				morning: /mañ[aá]/i,
				afternoon: /tarde/i,
				evening: /tardiña/i,
				night: /noite/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/gu/_lib/formatDistance.js
var formatDistanceLocale$51 = {
	lessThanXSeconds: {
		one: "હમણાં",
		other: "​આશરે {{count}} સેકંડ"
	},
	xSeconds: {
		one: "1 સેકંડ",
		other: "{{count}} સેકંડ"
	},
	halfAMinute: "અડધી મિનિટ",
	lessThanXMinutes: {
		one: "આ મિનિટ",
		other: "​આશરે {{count}} મિનિટ"
	},
	xMinutes: {
		one: "1 મિનિટ",
		other: "{{count}} મિનિટ"
	},
	aboutXHours: {
		one: "​આશરે 1 કલાક",
		other: "​આશરે {{count}} કલાક"
	},
	xHours: {
		one: "1 કલાક",
		other: "{{count}} કલાક"
	},
	xDays: {
		one: "1 દિવસ",
		other: "{{count}} દિવસ"
	},
	aboutXWeeks: {
		one: "આશરે 1 અઠવાડિયું",
		other: "આશરે {{count}} અઠવાડિયા"
	},
	xWeeks: {
		one: "1 અઠવાડિયું",
		other: "{{count}} અઠવાડિયા"
	},
	aboutXMonths: {
		one: "આશરે 1 મહિનો",
		other: "આશરે {{count}} મહિના"
	},
	xMonths: {
		one: "1 મહિનો",
		other: "{{count}} મહિના"
	},
	aboutXYears: {
		one: "આશરે 1 વર્ષ",
		other: "આશરે {{count}} વર્ષ"
	},
	xYears: {
		one: "1 વર્ષ",
		other: "{{count}} વર્ષ"
	},
	overXYears: {
		one: "1 વર્ષથી વધુ",
		other: "{{count}} વર્ષથી વધુ"
	},
	almostXYears: {
		one: "લગભગ 1 વર્ષ",
		other: "લગભગ {{count}} વર્ષ"
	}
};
var formatDistance$52 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$51[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return result + "માં";
	else return result + " પહેલાં";
	return result;
};
var formatLong$53 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, d MMMM, y",
			long: "d MMMM, y",
			medium: "d MMM, y",
			short: "d/M/yy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "hh:mm:ss a zzzz",
			long: "hh:mm:ss a z",
			medium: "hh:mm:ss a",
			short: "hh:mm a"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} {{time}}",
			long: "{{date}} {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/gu/_lib/formatRelative.js
var formatRelativeLocale$52 = {
	lastWeek: "'પાછલા' eeee p",
	yesterday: "'ગઈકાલે' p",
	today: "'આજે' p",
	tomorrow: "'આવતીકાલે' p",
	nextWeek: "eeee p",
	other: "P"
};
var formatRelative$52 = (token, _date, _baseDate, _options) => formatRelativeLocale$52[token];
//#endregion
//#region ../../node_modules/date-fns/locale/gu/_lib/localize.js
var eraValues$52 = {
	narrow: ["ઈસપૂ", "ઈસ"],
	abbreviated: ["ઈ.સ.પૂર્વે", "ઈ.સ."],
	wide: ["ઈસવીસન પૂર્વે", "ઈસવીસન"]
};
var quarterValues$52 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"Q1",
		"Q2",
		"Q3",
		"Q4"
	],
	wide: [
		"1લો ત્રિમાસ",
		"2જો ત્રિમાસ",
		"3જો ત્રિમાસ",
		"4થો ત્રિમાસ"
	]
};
var monthValues$52 = {
	narrow: [
		"જા",
		"ફે",
		"મા",
		"એ",
		"મે",
		"જૂ",
		"જુ",
		"ઓ",
		"સ",
		"ઓ",
		"ન",
		"ડિ"
	],
	abbreviated: [
		"જાન્યુ",
		"ફેબ્રુ",
		"માર્ચ",
		"એપ્રિલ",
		"મે",
		"જૂન",
		"જુલાઈ",
		"ઑગસ્ટ",
		"સપ્ટે",
		"ઓક્ટો",
		"નવે",
		"ડિસે"
	],
	wide: [
		"જાન્યુઆરી",
		"ફેબ્રુઆરી",
		"માર્ચ",
		"એપ્રિલ",
		"મે",
		"જૂન",
		"જુલાઇ",
		"ઓગસ્ટ",
		"સપ્ટેમ્બર",
		"ઓક્ટોબર",
		"નવેમ્બર",
		"ડિસેમ્બર"
	]
};
var dayValues$52 = {
	narrow: [
		"ર",
		"સો",
		"મં",
		"બુ",
		"ગુ",
		"શુ",
		"શ"
	],
	short: [
		"ર",
		"સો",
		"મં",
		"બુ",
		"ગુ",
		"શુ",
		"શ"
	],
	abbreviated: [
		"રવિ",
		"સોમ",
		"મંગળ",
		"બુધ",
		"ગુરુ",
		"શુક્ર",
		"શનિ"
	],
	wide: [
		"રવિવાર",
		"સોમવાર",
		"મંગળવાર",
		"બુધવાર",
		"ગુરુવાર",
		"શુક્રવાર",
		"શનિવાર"
	]
};
var dayPeriodValues$52 = {
	narrow: {
		am: "AM",
		pm: "PM",
		midnight: "મ.રાત્રિ",
		noon: "બ.",
		morning: "સવારે",
		afternoon: "બપોરે",
		evening: "સાંજે",
		night: "રાત્રે"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "​મધ્યરાત્રિ",
		noon: "બપોરે",
		morning: "સવારે",
		afternoon: "બપોરે",
		evening: "સાંજે",
		night: "રાત્રે"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "​મધ્યરાત્રિ",
		noon: "બપોરે",
		morning: "સવારે",
		afternoon: "બપોરે",
		evening: "સાંજે",
		night: "રાત્રે"
	}
};
var formattingDayPeriodValues$42 = {
	narrow: {
		am: "AM",
		pm: "PM",
		midnight: "મ.રાત્રિ",
		noon: "બપોરે",
		morning: "સવારે",
		afternoon: "બપોરે",
		evening: "સાંજે",
		night: "રાત્રે"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "મધ્યરાત્રિ",
		noon: "બપોરે",
		morning: "સવારે",
		afternoon: "બપોરે",
		evening: "સાંજે",
		night: "રાત્રે"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "​મધ્યરાત્રિ",
		noon: "બપોરે",
		morning: "સવારે",
		afternoon: "બપોરે",
		evening: "સાંજે",
		night: "રાત્રે"
	}
};
var ordinalNumber$52 = (dirtyNumber, _options) => {
	return String(dirtyNumber);
};
//#endregion
//#region ../../node_modules/date-fns/locale/gu.js
/**
* @category Locales
* @summary Gujarati locale (India).
* @language Gujarati
* @iso-639-2 guj
* @author Manaday Mavani [@ManadayM](https://github.com/manadaym)
*/
var gu = {
	code: "gu",
	formatDistance: formatDistance$52,
	formatLong: formatLong$53,
	formatRelative: formatRelative$52,
	localize: {
		ordinalNumber: ordinalNumber$52,
		era: buildLocalizeFn({
			values: eraValues$52,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$52,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$52,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$52,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$52,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$42,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(લ|જ|થ|ઠ્ઠ|મ)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(ઈસપૂ|ઈસ)/i,
				abbreviated: /^(ઈ\.સ\.પૂર્વે|ઈ\.સ\.)/i,
				wide: /^(ઈસવીસન\sપૂર્વે|ઈસવીસન)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^ઈસપૂ/i, /^ઈસ/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^q[1234]/i,
				wide: /^[1234](લો|જો|થો)? ત્રિમાસ/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[જાફેમાએમેજૂજુઓસઓનડિ]/i,
				abbreviated: /^(જાન્યુ|ફેબ્રુ|માર્ચ|એપ્રિલ|મે|જૂન|જુલાઈ|ઑગસ્ટ|સપ્ટે|ઓક્ટો|નવે|ડિસે)/i,
				wide: /^(જાન્યુઆરી|ફેબ્રુઆરી|માર્ચ|એપ્રિલ|મે|જૂન|જુલાઇ|ઓગસ્ટ|સપ્ટેમ્બર|ઓક્ટોબર|નવેમ્બર|ડિસેમ્બર)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^જા/i,
					/^ફે/i,
					/^મા/i,
					/^એ/i,
					/^મે/i,
					/^જૂ/i,
					/^જુ/i,
					/^ઑગ/i,
					/^સ/i,
					/^ઓક્ટો/i,
					/^ન/i,
					/^ડિ/i
				],
				any: [
					/^જા/i,
					/^ફે/i,
					/^મા/i,
					/^એ/i,
					/^મે/i,
					/^જૂ/i,
					/^જુ/i,
					/^ઑગ/i,
					/^સ/i,
					/^ઓક્ટો/i,
					/^ન/i,
					/^ડિ/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^(ર|સો|મં|બુ|ગુ|શુ|શ)/i,
				short: /^(ર|સો|મં|બુ|ગુ|શુ|શ)/i,
				abbreviated: /^(રવિ|સોમ|મંગળ|બુધ|ગુરુ|શુક્ર|શનિ)/i,
				wide: /^(રવિવાર|સોમવાર|મંગળવાર|બુધવાર|ગુરુવાર|શુક્રવાર|શનિવાર)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ર/i,
					/^સો/i,
					/^મં/i,
					/^બુ/i,
					/^ગુ/i,
					/^શુ/i,
					/^શ/i
				],
				any: [
					/^ર/i,
					/^સો/i,
					/^મં/i,
					/^બુ/i,
					/^ગુ/i,
					/^શુ/i,
					/^શ/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(a|p|મ\.?|સ|બ|સાં|રા)/i,
				any: /^(a|p|મ\.?|સ|બ|સાં|રા)/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a/i,
				pm: /^p/i,
				midnight: /^મ\.?/i,
				noon: /^બ/i,
				morning: /સ/i,
				afternoon: /બ/i,
				evening: /સાં/i,
				night: /રા/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/he/_lib/formatDistance.js
var formatDistanceLocale$50 = {
	lessThanXSeconds: {
		one: "פחות משנייה",
		two: "פחות משתי שניות",
		other: "פחות מ־{{count}} שניות"
	},
	xSeconds: {
		one: "שנייה",
		two: "שתי שניות",
		other: "{{count}} שניות"
	},
	halfAMinute: "חצי דקה",
	lessThanXMinutes: {
		one: "פחות מדקה",
		two: "פחות משתי דקות",
		other: "פחות מ־{{count}} דקות"
	},
	xMinutes: {
		one: "דקה",
		two: "שתי דקות",
		other: "{{count}} דקות"
	},
	aboutXHours: {
		one: "כשעה",
		two: "כשעתיים",
		other: "כ־{{count}} שעות"
	},
	xHours: {
		one: "שעה",
		two: "שעתיים",
		other: "{{count}} שעות"
	},
	xDays: {
		one: "יום",
		two: "יומיים",
		other: "{{count}} ימים"
	},
	aboutXWeeks: {
		one: "כשבוע",
		two: "כשבועיים",
		other: "כ־{{count}} שבועות"
	},
	xWeeks: {
		one: "שבוע",
		two: "שבועיים",
		other: "{{count}} שבועות"
	},
	aboutXMonths: {
		one: "כחודש",
		two: "כחודשיים",
		other: "כ־{{count}} חודשים"
	},
	xMonths: {
		one: "חודש",
		two: "חודשיים",
		other: "{{count}} חודשים"
	},
	aboutXYears: {
		one: "כשנה",
		two: "כשנתיים",
		other: "כ־{{count}} שנים"
	},
	xYears: {
		one: "שנה",
		two: "שנתיים",
		other: "{{count}} שנים"
	},
	overXYears: {
		one: "יותר משנה",
		two: "יותר משנתיים",
		other: "יותר מ־{{count}} שנים"
	},
	almostXYears: {
		one: "כמעט שנה",
		two: "כמעט שנתיים",
		other: "כמעט {{count}} שנים"
	}
};
var formatDistance$51 = (token, count, options) => {
	if (token === "xDays" && options?.addSuffix && count <= 2) {
		if (options.comparison && options.comparison > 0) return count === 1 ? "מחר" : "מחרתיים";
		return count === 1 ? "אתמול" : "שלשום";
	}
	let result;
	const tokenValue = formatDistanceLocale$50[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else if (count === 2) result = tokenValue.two;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "בעוד " + result;
	else return "לפני " + result;
	return result;
};
var formatLong$52 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, d בMMMM y",
			long: "d בMMMM y",
			medium: "d בMMM y",
			short: "d.M.y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "H:mm:ss zzzz",
			long: "H:mm:ss z",
			medium: "H:mm:ss",
			short: "H:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'בשעה' {{time}}",
			long: "{{date}} 'בשעה' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/he/_lib/formatRelative.js
var formatRelativeLocale$51 = {
	lastWeek: "eeee 'שעבר בשעה' p",
	yesterday: "'אתמול בשעה' p",
	today: "'היום בשעה' p",
	tomorrow: "'מחר בשעה' p",
	nextWeek: "eeee 'בשעה' p",
	other: "P"
};
var formatRelative$51 = (token, _date, _baseDate, _options) => formatRelativeLocale$51[token];
//#endregion
//#region ../../node_modules/date-fns/locale/he/_lib/localize.js
var eraValues$51 = {
	narrow: ["לפנה״ס", "לספירה"],
	abbreviated: ["לפנה״ס", "לספירה"],
	wide: ["לפני הספירה", "לספירה"]
};
var quarterValues$51 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"Q1",
		"Q2",
		"Q3",
		"Q4"
	],
	wide: [
		"רבעון 1",
		"רבעון 2",
		"רבעון 3",
		"רבעון 4"
	]
};
var monthValues$51 = {
	narrow: [
		"1",
		"2",
		"3",
		"4",
		"5",
		"6",
		"7",
		"8",
		"9",
		"10",
		"11",
		"12"
	],
	abbreviated: [
		"ינו׳",
		"פבר׳",
		"מרץ",
		"אפר׳",
		"מאי",
		"יוני",
		"יולי",
		"אוג׳",
		"ספט׳",
		"אוק׳",
		"נוב׳",
		"דצמ׳"
	],
	wide: [
		"ינואר",
		"פברואר",
		"מרץ",
		"אפריל",
		"מאי",
		"יוני",
		"יולי",
		"אוגוסט",
		"ספטמבר",
		"אוקטובר",
		"נובמבר",
		"דצמבר"
	]
};
var dayValues$51 = {
	narrow: [
		"א׳",
		"ב׳",
		"ג׳",
		"ד׳",
		"ה׳",
		"ו׳",
		"ש׳"
	],
	short: [
		"א׳",
		"ב׳",
		"ג׳",
		"ד׳",
		"ה׳",
		"ו׳",
		"ש׳"
	],
	abbreviated: [
		"יום א׳",
		"יום ב׳",
		"יום ג׳",
		"יום ד׳",
		"יום ה׳",
		"יום ו׳",
		"שבת"
	],
	wide: [
		"יום ראשון",
		"יום שני",
		"יום שלישי",
		"יום רביעי",
		"יום חמישי",
		"יום שישי",
		"יום שבת"
	]
};
var dayPeriodValues$51 = {
	narrow: {
		am: "לפנה״צ",
		pm: "אחה״צ",
		midnight: "חצות",
		noon: "צהריים",
		morning: "בוקר",
		afternoon: "אחר הצהריים",
		evening: "ערב",
		night: "לילה"
	},
	abbreviated: {
		am: "לפנה״צ",
		pm: "אחה״צ",
		midnight: "חצות",
		noon: "צהריים",
		morning: "בוקר",
		afternoon: "אחר הצהריים",
		evening: "ערב",
		night: "לילה"
	},
	wide: {
		am: "לפנה״צ",
		pm: "אחה״צ",
		midnight: "חצות",
		noon: "צהריים",
		morning: "בוקר",
		afternoon: "אחר הצהריים",
		evening: "ערב",
		night: "לילה"
	}
};
var formattingDayPeriodValues$41 = {
	narrow: {
		am: "לפנה״צ",
		pm: "אחה״צ",
		midnight: "חצות",
		noon: "צהריים",
		morning: "בבוקר",
		afternoon: "בצהריים",
		evening: "בערב",
		night: "בלילה"
	},
	abbreviated: {
		am: "לפנה״צ",
		pm: "אחה״צ",
		midnight: "חצות",
		noon: "צהריים",
		morning: "בבוקר",
		afternoon: "אחר הצהריים",
		evening: "בערב",
		night: "בלילה"
	},
	wide: {
		am: "לפנה״צ",
		pm: "אחה״צ",
		midnight: "חצות",
		noon: "צהריים",
		morning: "בבוקר",
		afternoon: "אחר הצהריים",
		evening: "בערב",
		night: "בלילה"
	}
};
var ordinalNumber$51 = (dirtyNumber, options) => {
	const number = Number(dirtyNumber);
	if (number <= 0 || number > 10) return String(number);
	const unit = String(options?.unit);
	const isFemale = [
		"year",
		"hour",
		"minute",
		"second"
	].indexOf(unit) >= 0;
	const male = [
		"ראשון",
		"שני",
		"שלישי",
		"רביעי",
		"חמישי",
		"שישי",
		"שביעי",
		"שמיני",
		"תשיעי",
		"עשירי"
	];
	const female = [
		"ראשונה",
		"שנייה",
		"שלישית",
		"רביעית",
		"חמישית",
		"שישית",
		"שביעית",
		"שמינית",
		"תשיעית",
		"עשירית"
	];
	const index = number - 1;
	return isFemale ? female[index] : male[index];
};
var localize$51 = {
	ordinalNumber: ordinalNumber$51,
	era: buildLocalizeFn({
		values: eraValues$51,
		defaultWidth: "wide"
	}),
	quarter: buildLocalizeFn({
		values: quarterValues$51,
		defaultWidth: "wide",
		argumentCallback: (quarter) => quarter - 1
	}),
	month: buildLocalizeFn({
		values: monthValues$51,
		defaultWidth: "wide"
	}),
	day: buildLocalizeFn({
		values: dayValues$51,
		defaultWidth: "wide"
	}),
	dayPeriod: buildLocalizeFn({
		values: dayPeriodValues$51,
		defaultWidth: "wide",
		formattingValues: formattingDayPeriodValues$41,
		defaultFormattingWidth: "wide"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/he/_lib/match.js
var matchOrdinalNumberPattern$51 = /^(\d+|(ראשון|שני|שלישי|רביעי|חמישי|שישי|שביעי|שמיני|תשיעי|עשירי|ראשונה|שנייה|שלישית|רביעית|חמישית|שישית|שביעית|שמינית|תשיעית|עשירית))/i;
var parseOrdinalNumberPattern$51 = /^(\d+|רא|שנ|של|רב|ח|שי|שב|שמ|ת|ע)/i;
var matchEraPatterns$51 = {
	narrow: /^ל(ספירה|פנה״ס)/i,
	abbreviated: /^ל(ספירה|פנה״ס)/i,
	wide: /^ל(פני ה)?ספירה/i
};
var parseEraPatterns$51 = { any: [/^לפ/i, /^לס/i] };
var matchQuarterPatterns$51 = {
	narrow: /^[1234]/i,
	abbreviated: /^q[1234]/i,
	wide: /^רבעון [1234]/i
};
var parseQuarterPatterns$51 = { any: [
	/1/i,
	/2/i,
	/3/i,
	/4/i
] };
var matchMonthPatterns$51 = {
	narrow: /^\d+/i,
	abbreviated: /^(ינו|פבר|מרץ|אפר|מאי|יוני|יולי|אוג|ספט|אוק|נוב|דצמ)׳?/i,
	wide: /^(ינואר|פברואר|מרץ|אפריל|מאי|יוני|יולי|אוגוסט|ספטמבר|אוקטובר|נובמבר|דצמבר)/i
};
var parseMonthPatterns$51 = {
	narrow: [
		/^1$/i,
		/^2/i,
		/^3/i,
		/^4/i,
		/^5/i,
		/^6/i,
		/^7/i,
		/^8/i,
		/^9/i,
		/^10/i,
		/^11/i,
		/^12/i
	],
	any: [
		/^ינ/i,
		/^פ/i,
		/^מר/i,
		/^אפ/i,
		/^מא/i,
		/^יונ/i,
		/^יול/i,
		/^אוג/i,
		/^ס/i,
		/^אוק/i,
		/^נ/i,
		/^ד/i
	]
};
var matchDayPatterns$51 = {
	narrow: /^[אבגדהוש]׳/i,
	short: /^[אבגדהוש]׳/i,
	abbreviated: /^(שבת|יום (א|ב|ג|ד|ה|ו)׳)/i,
	wide: /^יום (ראשון|שני|שלישי|רביעי|חמישי|שישי|שבת)/i
};
var parseDayPatterns$51 = {
	abbreviated: [
		/א׳$/i,
		/ב׳$/i,
		/ג׳$/i,
		/ד׳$/i,
		/ה׳$/i,
		/ו׳$/i,
		/^ש/i
	],
	wide: [
		/ן$/i,
		/ני$/i,
		/לישי$/i,
		/עי$/i,
		/מישי$/i,
		/שישי$/i,
		/ת$/i
	],
	any: [
		/^א/i,
		/^ב/i,
		/^ג/i,
		/^ד/i,
		/^ה/i,
		/^ו/i,
		/^ש/i
	]
};
var matchDayPeriodPatterns$51 = { any: /^(אחר ה|ב)?(חצות|צהריים|בוקר|ערב|לילה|אחה״צ|לפנה״צ)/i };
var parseDayPeriodPatterns$51 = { any: {
	am: /^לפ/i,
	pm: /^אחה/i,
	midnight: /^ח/i,
	noon: /^צ/i,
	morning: /בוקר/i,
	afternoon: /בצ|אחר/i,
	evening: /ערב/i,
	night: /לילה/i
} };
var ordinalName = [
	"רא",
	"שנ",
	"של",
	"רב",
	"ח",
	"שי",
	"שב",
	"שמ",
	"ת",
	"ע"
];
//#endregion
//#region ../../node_modules/date-fns/locale/he.js
/**
* @category Locales
* @summary Hebrew locale.
* @language Hebrew
* @iso-639-2 heb
* @author Nir Lahad [@nirlah](https://github.com/nirlah)
*/
var he = {
	code: "he",
	formatDistance: formatDistance$51,
	formatLong: formatLong$52,
	formatRelative: formatRelative$51,
	localize: localize$51,
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: matchOrdinalNumberPattern$51,
			parsePattern: parseOrdinalNumberPattern$51,
			valueCallback: (value) => {
				const number = parseInt(value, 10);
				return isNaN(number) ? ordinalName.indexOf(value) + 1 : number;
			}
		}),
		era: buildMatchFn({
			matchPatterns: matchEraPatterns$51,
			defaultMatchWidth: "wide",
			parsePatterns: parseEraPatterns$51,
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: matchQuarterPatterns$51,
			defaultMatchWidth: "wide",
			parsePatterns: parseQuarterPatterns$51,
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: matchMonthPatterns$51,
			defaultMatchWidth: "wide",
			parsePatterns: parseMonthPatterns$51,
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: matchDayPatterns$51,
			defaultMatchWidth: "wide",
			parsePatterns: parseDayPatterns$51,
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: matchDayPeriodPatterns$51,
			defaultMatchWidth: "any",
			parsePatterns: parseDayPeriodPatterns$51,
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 0,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/hi/_lib/localize.js
var numberValues = {
	locale: {
		1: "१",
		2: "२",
		3: "३",
		4: "४",
		5: "५",
		6: "६",
		7: "७",
		8: "८",
		9: "९",
		0: "०"
	},
	number: {
		"१": "1",
		"२": "2",
		"३": "3",
		"४": "4",
		"५": "5",
		"६": "6",
		"७": "7",
		"८": "8",
		"९": "9",
		"०": "0"
	}
};
var eraValues$50 = {
	narrow: ["ईसा-पूर्व", "ईस्वी"],
	abbreviated: ["ईसा-पूर्व", "ईस्वी"],
	wide: ["ईसा-पूर्व", "ईसवी सन"]
};
var quarterValues$50 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"ति1",
		"ति2",
		"ति3",
		"ति4"
	],
	wide: [
		"पहली तिमाही",
		"दूसरी तिमाही",
		"तीसरी तिमाही",
		"चौथी तिमाही"
	]
};
var monthValues$50 = {
	narrow: [
		"ज",
		"फ़",
		"मा",
		"अ",
		"मई",
		"जू",
		"जु",
		"अग",
		"सि",
		"अक्टू",
		"न",
		"दि"
	],
	abbreviated: [
		"जन",
		"फ़र",
		"मार्च",
		"अप्रैल",
		"मई",
		"जून",
		"जुल",
		"अग",
		"सित",
		"अक्टू",
		"नव",
		"दिस"
	],
	wide: [
		"जनवरी",
		"फ़रवरी",
		"मार्च",
		"अप्रैल",
		"मई",
		"जून",
		"जुलाई",
		"अगस्त",
		"सितंबर",
		"अक्टूबर",
		"नवंबर",
		"दिसंबर"
	]
};
var dayValues$50 = {
	narrow: [
		"र",
		"सो",
		"मं",
		"बु",
		"गु",
		"शु",
		"श"
	],
	short: [
		"र",
		"सो",
		"मं",
		"बु",
		"गु",
		"शु",
		"श"
	],
	abbreviated: [
		"रवि",
		"सोम",
		"मंगल",
		"बुध",
		"गुरु",
		"शुक्र",
		"शनि"
	],
	wide: [
		"रविवार",
		"सोमवार",
		"मंगलवार",
		"बुधवार",
		"गुरुवार",
		"शुक्रवार",
		"शनिवार"
	]
};
var dayPeriodValues$50 = {
	narrow: {
		am: "पूर्वाह्न",
		pm: "अपराह्न",
		midnight: "मध्यरात्रि",
		noon: "दोपहर",
		morning: "सुबह",
		afternoon: "दोपहर",
		evening: "शाम",
		night: "रात"
	},
	abbreviated: {
		am: "पूर्वाह्न",
		pm: "अपराह्न",
		midnight: "मध्यरात्रि",
		noon: "दोपहर",
		morning: "सुबह",
		afternoon: "दोपहर",
		evening: "शाम",
		night: "रात"
	},
	wide: {
		am: "पूर्वाह्न",
		pm: "अपराह्न",
		midnight: "मध्यरात्रि",
		noon: "दोपहर",
		morning: "सुबह",
		afternoon: "दोपहर",
		evening: "शाम",
		night: "रात"
	}
};
var formattingDayPeriodValues$40 = {
	narrow: {
		am: "पूर्वाह्न",
		pm: "अपराह्न",
		midnight: "मध्यरात्रि",
		noon: "दोपहर",
		morning: "सुबह",
		afternoon: "दोपहर",
		evening: "शाम",
		night: "रात"
	},
	abbreviated: {
		am: "पूर्वाह्न",
		pm: "अपराह्न",
		midnight: "मध्यरात्रि",
		noon: "दोपहर",
		morning: "सुबह",
		afternoon: "दोपहर",
		evening: "शाम",
		night: "रात"
	},
	wide: {
		am: "पूर्वाह्न",
		pm: "अपराह्न",
		midnight: "मध्यरात्रि",
		noon: "दोपहर",
		morning: "सुबह",
		afternoon: "दोपहर",
		evening: "शाम",
		night: "रात"
	}
};
var ordinalNumber$50 = (dirtyNumber, _options) => {
	return numberToLocale(Number(dirtyNumber));
};
function localeToNumber(locale) {
	const enNumber = locale.toString().replace(/[१२३४५६७८९०]/g, function(match) {
		return numberValues.number[match];
	});
	return Number(enNumber);
}
function numberToLocale(enNumber) {
	return enNumber.toString().replace(/\d/g, function(match) {
		return numberValues.locale[match];
	});
}
var localize$50 = {
	ordinalNumber: ordinalNumber$50,
	era: buildLocalizeFn({
		values: eraValues$50,
		defaultWidth: "wide"
	}),
	quarter: buildLocalizeFn({
		values: quarterValues$50,
		defaultWidth: "wide",
		argumentCallback: (quarter) => quarter - 1
	}),
	month: buildLocalizeFn({
		values: monthValues$50,
		defaultWidth: "wide"
	}),
	day: buildLocalizeFn({
		values: dayValues$50,
		defaultWidth: "wide"
	}),
	dayPeriod: buildLocalizeFn({
		values: dayPeriodValues$50,
		defaultWidth: "wide",
		formattingValues: formattingDayPeriodValues$40,
		defaultFormattingWidth: "wide"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/hi/_lib/formatDistance.js
var formatDistanceLocale$49 = {
	lessThanXSeconds: {
		one: "१ सेकंड से कम",
		other: "{{count}} सेकंड से कम"
	},
	xSeconds: {
		one: "१ सेकंड",
		other: "{{count}} सेकंड"
	},
	halfAMinute: "आधा मिनट",
	lessThanXMinutes: {
		one: "१ मिनट से कम",
		other: "{{count}} मिनट से कम"
	},
	xMinutes: {
		one: "१ मिनट",
		other: "{{count}} मिनट"
	},
	aboutXHours: {
		one: "लगभग १ घंटा",
		other: "लगभग {{count}} घंटे"
	},
	xHours: {
		one: "१ घंटा",
		other: "{{count}} घंटे"
	},
	xDays: {
		one: "१ दिन",
		other: "{{count}} दिन"
	},
	aboutXWeeks: {
		one: "लगभग १ सप्ताह",
		other: "लगभग {{count}} सप्ताह"
	},
	xWeeks: {
		one: "१ सप्ताह",
		other: "{{count}} सप्ताह"
	},
	aboutXMonths: {
		one: "लगभग १ महीना",
		other: "लगभग {{count}} महीने"
	},
	xMonths: {
		one: "१ महीना",
		other: "{{count}} महीने"
	},
	aboutXYears: {
		one: "लगभग १ वर्ष",
		other: "लगभग {{count}} वर्ष"
	},
	xYears: {
		one: "१ वर्ष",
		other: "{{count}} वर्ष"
	},
	overXYears: {
		one: "१ वर्ष से अधिक",
		other: "{{count}} वर्ष से अधिक"
	},
	almostXYears: {
		one: "लगभग १ वर्ष",
		other: "लगभग {{count}} वर्ष"
	}
};
var formatDistance$50 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$49[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", numberToLocale(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return result + "मे ";
	else return result + " पहले";
	return result;
};
var formatLong$51 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, do MMMM, y",
			long: "do MMMM, y",
			medium: "d MMM, y",
			short: "dd/MM/yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "h:mm:ss a zzzz",
			long: "h:mm:ss a z",
			medium: "h:mm:ss a",
			short: "h:mm a"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'को' {{time}}",
			long: "{{date}} 'को' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/hi/_lib/formatRelative.js
var formatRelativeLocale$50 = {
	lastWeek: "'पिछले' eeee p",
	yesterday: "'कल' p",
	today: "'आज' p",
	tomorrow: "'कल' p",
	nextWeek: "eeee 'को' p",
	other: "P"
};
var formatRelative$50 = (token, _date, _baseDate, _options) => formatRelativeLocale$50[token];
//#endregion
//#region ../../node_modules/date-fns/locale/hi.js
/**
* @category Locales
* @summary Hindi locale (India).
* @language Hindi
* @iso-639-2 hin
* @author Mukesh Mandiwal [@mukeshmandiwal](https://github.com/mukeshmandiwal)
*/
var hi = {
	code: "hi",
	formatDistance: formatDistance$50,
	formatLong: formatLong$51,
	formatRelative: formatRelative$50,
	localize: localize$50,
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^[०१२३४५६७८९]+/i,
			parsePattern: /^[०१२३४५६७८९]+/i,
			valueCallback: localeToNumber
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(ईसा-पूर्व|ईस्वी)/i,
				abbreviated: /^(ईसा\.?\s?पूर्व\.?|ईसा\.?)/i,
				wide: /^(ईसा-पूर्व|ईसवी पूर्व|ईसवी सन|ईसवी)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^b/i, /^(a|c)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^ति[1234]/i,
				wide: /^[1234](पहली|दूसरी|तीसरी|चौथी)? तिमाही/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[जफ़माअप्मईजूनजुअगसिअक्तनदि]/i,
				abbreviated: /^(जन|फ़र|मार्च|अप्|मई|जून|जुल|अग|सित|अक्तू|नव|दिस)/i,
				wide: /^(जनवरी|फ़रवरी|मार्च|अप्रैल|मई|जून|जुलाई|अगस्त|सितंबर|अक्तूबर|नवंबर|दिसंबर)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ज/i,
					/^फ़/i,
					/^मा/i,
					/^अप्/i,
					/^मई/i,
					/^जू/i,
					/^जु/i,
					/^अग/i,
					/^सि/i,
					/^अक्तू/i,
					/^न/i,
					/^दि/i
				],
				any: [
					/^जन/i,
					/^फ़/i,
					/^मा/i,
					/^अप्/i,
					/^मई/i,
					/^जू/i,
					/^जु/i,
					/^अग/i,
					/^सि/i,
					/^अक्तू/i,
					/^नव/i,
					/^दिस/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[रविसोममंगलबुधगुरुशुक्रशनि]/i,
				short: /^(रवि|सोम|मंगल|बुध|गुरु|शुक्र|शनि)/i,
				abbreviated: /^(रवि|सोम|मंगल|बुध|गुरु|शुक्र|शनि)/i,
				wide: /^(रविवार|सोमवार|मंगलवार|बुधवार|गुरुवार|शुक्रवार|शनिवार)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^रवि/i,
					/^सोम/i,
					/^मंगल/i,
					/^बुध/i,
					/^गुरु/i,
					/^शुक्र/i,
					/^शनि/i
				],
				any: [
					/^रवि/i,
					/^सोम/i,
					/^मंगल/i,
					/^बुध/i,
					/^गुरु/i,
					/^शुक्र/i,
					/^शनि/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(पू|अ|म|द.\?|सु|दो|शा|रा)/i,
				any: /^(पूर्वाह्न|अपराह्न|म|द.\?|सु|दो|शा|रा)/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^पूर्वाह्न/i,
				pm: /^अपराह्न/i,
				midnight: /^मध्य/i,
				noon: /^दो/i,
				morning: /सु/i,
				afternoon: /दो/i,
				evening: /शा/i,
				night: /रा/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 0,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/hr/_lib/formatDistance.js
var formatDistanceLocale$48 = {
	lessThanXSeconds: {
		one: {
			standalone: "manje od 1 sekunde",
			withPrepositionAgo: "manje od 1 sekunde",
			withPrepositionIn: "manje od 1 sekundu"
		},
		dual: "manje od {{count}} sekunde",
		other: "manje od {{count}} sekundi"
	},
	xSeconds: {
		one: {
			standalone: "1 sekunda",
			withPrepositionAgo: "1 sekunde",
			withPrepositionIn: "1 sekundu"
		},
		dual: "{{count}} sekunde",
		other: "{{count}} sekundi"
	},
	halfAMinute: "pola minute",
	lessThanXMinutes: {
		one: {
			standalone: "manje od 1 minute",
			withPrepositionAgo: "manje od 1 minute",
			withPrepositionIn: "manje od 1 minutu"
		},
		dual: "manje od {{count}} minute",
		other: "manje od {{count}} minuta"
	},
	xMinutes: {
		one: {
			standalone: "1 minuta",
			withPrepositionAgo: "1 minute",
			withPrepositionIn: "1 minutu"
		},
		dual: "{{count}} minute",
		other: "{{count}} minuta"
	},
	aboutXHours: {
		one: {
			standalone: "oko 1 sat",
			withPrepositionAgo: "oko 1 sat",
			withPrepositionIn: "oko 1 sat"
		},
		dual: "oko {{count}} sata",
		other: "oko {{count}} sati"
	},
	xHours: {
		one: {
			standalone: "1 sat",
			withPrepositionAgo: "1 sat",
			withPrepositionIn: "1 sat"
		},
		dual: "{{count}} sata",
		other: "{{count}} sati"
	},
	xDays: {
		one: {
			standalone: "1 dan",
			withPrepositionAgo: "1 dan",
			withPrepositionIn: "1 dan"
		},
		dual: "{{count}} dana",
		other: "{{count}} dana"
	},
	aboutXWeeks: {
		one: {
			standalone: "oko 1 tjedan",
			withPrepositionAgo: "oko 1 tjedan",
			withPrepositionIn: "oko 1 tjedan"
		},
		dual: "oko {{count}} tjedna",
		other: "oko {{count}} tjedana"
	},
	xWeeks: {
		one: {
			standalone: "1 tjedan",
			withPrepositionAgo: "1 tjedan",
			withPrepositionIn: "1 tjedan"
		},
		dual: "{{count}} tjedna",
		other: "{{count}} tjedana"
	},
	aboutXMonths: {
		one: {
			standalone: "oko 1 mjesec",
			withPrepositionAgo: "oko 1 mjesec",
			withPrepositionIn: "oko 1 mjesec"
		},
		dual: "oko {{count}} mjeseca",
		other: "oko {{count}} mjeseci"
	},
	xMonths: {
		one: {
			standalone: "1 mjesec",
			withPrepositionAgo: "1 mjesec",
			withPrepositionIn: "1 mjesec"
		},
		dual: "{{count}} mjeseca",
		other: "{{count}} mjeseci"
	},
	aboutXYears: {
		one: {
			standalone: "oko 1 godinu",
			withPrepositionAgo: "oko 1 godinu",
			withPrepositionIn: "oko 1 godinu"
		},
		dual: "oko {{count}} godine",
		other: "oko {{count}} godina"
	},
	xYears: {
		one: {
			standalone: "1 godina",
			withPrepositionAgo: "1 godine",
			withPrepositionIn: "1 godinu"
		},
		dual: "{{count}} godine",
		other: "{{count}} godina"
	},
	overXYears: {
		one: {
			standalone: "preko 1 godinu",
			withPrepositionAgo: "preko 1 godinu",
			withPrepositionIn: "preko 1 godinu"
		},
		dual: "preko {{count}} godine",
		other: "preko {{count}} godina"
	},
	almostXYears: {
		one: {
			standalone: "gotovo 1 godinu",
			withPrepositionAgo: "gotovo 1 godinu",
			withPrepositionIn: "gotovo 1 godinu"
		},
		dual: "gotovo {{count}} godine",
		other: "gotovo {{count}} godina"
	}
};
var formatDistance$49 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$48[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) if (options?.addSuffix) if (options.comparison && options.comparison > 0) result = tokenValue.one.withPrepositionIn;
	else result = tokenValue.one.withPrepositionAgo;
	else result = tokenValue.one.standalone;
	else if (count % 10 > 1 && count % 10 < 5 && String(count).substr(-2, 1) !== "1") result = tokenValue.dual.replace("{{count}}", String(count));
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "za " + result;
	else return "prije " + result;
	return result;
};
var formatLong$50 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, d. MMMM y.",
			long: "d. MMMM y.",
			medium: "d. MMM y.",
			short: "dd. MM. y."
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss (zzzz)",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'u' {{time}}",
			long: "{{date}} 'u' {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/hr/_lib/formatRelative.js
var formatRelativeLocale$49 = {
	lastWeek: (date) => {
		switch (date.getDay()) {
			case 0: return "'prošlu nedjelju u' p";
			case 3: return "'prošlu srijedu u' p";
			case 6: return "'prošlu subotu u' p";
			default: return "'prošli' EEEE 'u' p";
		}
	},
	yesterday: "'jučer u' p",
	today: "'danas u' p",
	tomorrow: "'sutra u' p",
	nextWeek: (date) => {
		switch (date.getDay()) {
			case 0: return "'iduću nedjelju u' p";
			case 3: return "'iduću srijedu u' p";
			case 6: return "'iduću subotu u' p";
			default: return "'prošli' EEEE 'u' p";
		}
	},
	other: "P"
};
var formatRelative$49 = (token, date, _baseDate, _options) => {
	const format = formatRelativeLocale$49[token];
	if (typeof format === "function") return format(date);
	return format;
};
//#endregion
//#region ../../node_modules/date-fns/locale/hr/_lib/localize.js
var eraValues$49 = {
	narrow: ["pr.n.e.", "AD"],
	abbreviated: ["pr. Kr.", "po. Kr."],
	wide: ["Prije Krista", "Poslije Krista"]
};
var quarterValues$49 = {
	narrow: [
		"1.",
		"2.",
		"3.",
		"4."
	],
	abbreviated: [
		"1. kv.",
		"2. kv.",
		"3. kv.",
		"4. kv."
	],
	wide: [
		"1. kvartal",
		"2. kvartal",
		"3. kvartal",
		"4. kvartal"
	]
};
var monthValues$49 = {
	narrow: [
		"1.",
		"2.",
		"3.",
		"4.",
		"5.",
		"6.",
		"7.",
		"8.",
		"9.",
		"10.",
		"11.",
		"12."
	],
	abbreviated: [
		"sij",
		"velj",
		"ožu",
		"tra",
		"svi",
		"lip",
		"srp",
		"kol",
		"ruj",
		"lis",
		"stu",
		"pro"
	],
	wide: [
		"siječanj",
		"veljača",
		"ožujak",
		"travanj",
		"svibanj",
		"lipanj",
		"srpanj",
		"kolovoz",
		"rujan",
		"listopad",
		"studeni",
		"prosinac"
	]
};
var formattingMonthValues$10 = {
	narrow: [
		"1.",
		"2.",
		"3.",
		"4.",
		"5.",
		"6.",
		"7.",
		"8.",
		"9.",
		"10.",
		"11.",
		"12."
	],
	abbreviated: [
		"sij",
		"velj",
		"ožu",
		"tra",
		"svi",
		"lip",
		"srp",
		"kol",
		"ruj",
		"lis",
		"stu",
		"pro"
	],
	wide: [
		"siječnja",
		"veljače",
		"ožujka",
		"travnja",
		"svibnja",
		"lipnja",
		"srpnja",
		"kolovoza",
		"rujna",
		"listopada",
		"studenog",
		"prosinca"
	]
};
var dayValues$49 = {
	narrow: [
		"N",
		"P",
		"U",
		"S",
		"Č",
		"P",
		"S"
	],
	short: [
		"ned",
		"pon",
		"uto",
		"sri",
		"čet",
		"pet",
		"sub"
	],
	abbreviated: [
		"ned",
		"pon",
		"uto",
		"sri",
		"čet",
		"pet",
		"sub"
	],
	wide: [
		"nedjelja",
		"ponedjeljak",
		"utorak",
		"srijeda",
		"četvrtak",
		"petak",
		"subota"
	]
};
var formattingDayPeriodValues$39 = {
	narrow: {
		am: "AM",
		pm: "PM",
		midnight: "ponoć",
		noon: "podne",
		morning: "ujutro",
		afternoon: "popodne",
		evening: "navečer",
		night: "noću"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "ponoć",
		noon: "podne",
		morning: "ujutro",
		afternoon: "popodne",
		evening: "navečer",
		night: "noću"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "ponoć",
		noon: "podne",
		morning: "ujutro",
		afternoon: "poslije podne",
		evening: "navečer",
		night: "noću"
	}
};
var dayPeriodValues$49 = {
	narrow: {
		am: "AM",
		pm: "PM",
		midnight: "ponoć",
		noon: "podne",
		morning: "ujutro",
		afternoon: "popodne",
		evening: "navečer",
		night: "noću"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "ponoć",
		noon: "podne",
		morning: "ujutro",
		afternoon: "popodne",
		evening: "navečer",
		night: "noću"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "ponoć",
		noon: "podne",
		morning: "ujutro",
		afternoon: "poslije podne",
		evening: "navečer",
		night: "noću"
	}
};
var ordinalNumber$49 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + ".";
};
//#endregion
//#region ../../node_modules/date-fns/locale/hr.js
/**
* @category Locales
* @summary Croatian locale.
* @language Croatian
* @iso-639-2 hrv
* @author Matija Marohnić [@silvenon](https://github.com/silvenon)
* @author Manico [@manico](https://github.com/manico)
* @author Ivan Jeržabek [@jerzabek](https://github.com/jerzabek)
*/
var hr = {
	code: "hr",
	formatDistance: formatDistance$49,
	formatLong: formatLong$50,
	formatRelative: formatRelative$49,
	localize: {
		ordinalNumber: ordinalNumber$49,
		era: buildLocalizeFn({
			values: eraValues$49,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$49,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$49,
			defaultWidth: "wide",
			formattingValues: formattingMonthValues$10,
			defaultFormattingWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$49,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$49,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$39,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)\./i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(pr\.n\.e\.|AD)/i,
				abbreviated: /^(pr\.\s?Kr\.|po\.\s?Kr\.)/i,
				wide: /^(Prije Krista|prije nove ere|Poslije Krista|nova era)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^pr/i, /^(po|nova)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^[1234]\.\s?kv\.?/i,
				wide: /^[1234]\. kvartal/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^(10|11|12|[123456789])\./i,
				abbreviated: /^(sij|velj|(ožu|ozu)|tra|svi|lip|srp|kol|ruj|lis|stu|pro)/i,
				wide: /^((siječanj|siječnja|sijecanj|sijecnja)|(veljača|veljače|veljaca|veljace)|(ožujak|ožujka|ozujak|ozujka)|(travanj|travnja)|(svibanj|svibnja)|(lipanj|lipnja)|(srpanj|srpnja)|(kolovoz|kolovoza)|(rujan|rujna)|(listopad|listopada)|(studeni|studenog)|(prosinac|prosinca))/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/1/i,
					/2/i,
					/3/i,
					/4/i,
					/5/i,
					/6/i,
					/7/i,
					/8/i,
					/9/i,
					/10/i,
					/11/i,
					/12/i
				],
				abbreviated: [
					/^sij/i,
					/^velj/i,
					/^(ožu|ozu)/i,
					/^tra/i,
					/^svi/i,
					/^lip/i,
					/^srp/i,
					/^kol/i,
					/^ruj/i,
					/^lis/i,
					/^stu/i,
					/^pro/i
				],
				wide: [
					/^sij/i,
					/^velj/i,
					/^(ožu|ozu)/i,
					/^tra/i,
					/^svi/i,
					/^lip/i,
					/^srp/i,
					/^kol/i,
					/^ruj/i,
					/^lis/i,
					/^stu/i,
					/^pro/i
				]
			},
			defaultParseWidth: "wide"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[npusčc]/i,
				short: /^(ned|pon|uto|sri|(čet|cet)|pet|sub)/i,
				abbreviated: /^(ned|pon|uto|sri|(čet|cet)|pet|sub)/i,
				wide: /^(nedjelja|ponedjeljak|utorak|srijeda|(četvrtak|cetvrtak)|petak|subota)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^s/i,
					/^m/i,
					/^t/i,
					/^w/i,
					/^t/i,
					/^f/i,
					/^s/i
				],
				any: [
					/^su/i,
					/^m/i,
					/^tu/i,
					/^w/i,
					/^th/i,
					/^f/i,
					/^sa/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: { any: /^(am|pm|ponoc|ponoć|(po)?podne|navecer|navečer|noću|poslije podne|ujutro)/i },
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a/i,
				pm: /^p/i,
				midnight: /^pono/i,
				noon: /^pod/i,
				morning: /jutro/i,
				afternoon: /(poslije\s|po)+podne/i,
				evening: /(navece|naveče)/i,
				night: /(nocu|noću)/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/ht/_lib/formatDistance.js
var formatDistanceLocale$47 = {
	lessThanXSeconds: {
		one: "mwens pase yon segond",
		other: "mwens pase {{count}} segond"
	},
	xSeconds: {
		one: "1 segond",
		other: "{{count}} segond"
	},
	halfAMinute: "30 segond",
	lessThanXMinutes: {
		one: "mwens pase yon minit",
		other: "mwens pase {{count}} minit"
	},
	xMinutes: {
		one: "1 minit",
		other: "{{count}} minit"
	},
	aboutXHours: {
		one: "anviwon inè",
		other: "anviwon {{count}} è"
	},
	xHours: {
		one: "1 lè",
		other: "{{count}} lè"
	},
	xDays: {
		one: "1 jou",
		other: "{{count}} jou"
	},
	aboutXWeeks: {
		one: "anviwon 1 semèn",
		other: "anviwon {{count}} semèn"
	},
	xWeeks: {
		one: "1 semèn",
		other: "{{count}} semèn"
	},
	aboutXMonths: {
		one: "anviwon 1 mwa",
		other: "anviwon {{count}} mwa"
	},
	xMonths: {
		one: "1 mwa",
		other: "{{count}} mwa"
	},
	aboutXYears: {
		one: "anviwon 1 an",
		other: "anviwon {{count}} an"
	},
	xYears: {
		one: "1 an",
		other: "{{count}} an"
	},
	overXYears: {
		one: "plis pase 1 an",
		other: "plis pase {{count}} an"
	},
	almostXYears: {
		one: "prèske 1 an",
		other: "prèske {{count}} an"
	}
};
var formatDistance$48 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$47[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "nan " + result;
	else return "sa fè " + result;
	return result;
};
var formatLong$49 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE d MMMM y",
			long: "d MMMM y",
			medium: "d MMM y",
			short: "dd/MM/y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'nan lè' {{time}}",
			long: "{{date}} 'nan lè' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/ht/_lib/formatRelative.js
var formatRelativeLocale$48 = {
	lastWeek: "eeee 'pase nan lè' p",
	yesterday: "'yè nan lè' p",
	today: "'jodi a' p",
	tomorrow: "'demen nan lè' p'",
	nextWeek: "eeee 'pwochen nan lè' p",
	other: "P"
};
var formatRelative$48 = (token, _date, _baseDate, _options) => formatRelativeLocale$48[token];
//#endregion
//#region ../../node_modules/date-fns/locale/ht/_lib/localize.js
var eraValues$48 = {
	narrow: ["av. J.-K", "ap. J.-K"],
	abbreviated: ["av. J.-K", "ap. J.-K"],
	wide: ["anvan Jezi Kris", "apre Jezi Kris"]
};
var quarterValues$48 = {
	narrow: [
		"T1",
		"T2",
		"T3",
		"T4"
	],
	abbreviated: [
		"1ye trim.",
		"2yèm trim.",
		"3yèm trim.",
		"4yèm trim."
	],
	wide: [
		"1ye trimès",
		"2yèm trimès",
		"3yèm trimès",
		"4yèm trimès"
	]
};
var monthValues$48 = {
	narrow: [
		"J",
		"F",
		"M",
		"A",
		"M",
		"J",
		"J",
		"O",
		"S",
		"O",
		"N",
		"D"
	],
	abbreviated: [
		"janv.",
		"fevr.",
		"mas",
		"avr.",
		"me",
		"jen",
		"jiyè",
		"out",
		"sept.",
		"okt.",
		"nov.",
		"des."
	],
	wide: [
		"janvye",
		"fevrye",
		"mas",
		"avril",
		"me",
		"jen",
		"jiyè",
		"out",
		"septanm",
		"oktòb",
		"novanm",
		"desanm"
	]
};
var dayValues$48 = {
	narrow: [
		"D",
		"L",
		"M",
		"M",
		"J",
		"V",
		"S"
	],
	short: [
		"di",
		"le",
		"ma",
		"mè",
		"je",
		"va",
		"sa"
	],
	abbreviated: [
		"dim.",
		"len.",
		"mad.",
		"mèk.",
		"jed.",
		"van.",
		"sam."
	],
	wide: [
		"dimanch",
		"lendi",
		"madi",
		"mèkredi",
		"jedi",
		"vandredi",
		"samdi"
	]
};
var dayPeriodValues$48 = {
	narrow: {
		am: "AM",
		pm: "PM",
		midnight: "minwit",
		noon: "midi",
		morning: "mat.",
		afternoon: "ap.m.",
		evening: "swa",
		night: "mat."
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "minwit",
		noon: "midi",
		morning: "maten",
		afternoon: "aprèmidi",
		evening: "swa",
		night: "maten"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "minwit",
		noon: "midi",
		morning: "nan maten",
		afternoon: "nan aprèmidi",
		evening: "nan aswè",
		night: "nan maten"
	}
};
var ordinalNumber$48 = (dirtyNumber, _options) => {
	const number = Number(dirtyNumber);
	if (number === 0) return String(number);
	return number + (number === 1 ? "ye" : "yèm");
};
//#endregion
//#region ../../node_modules/date-fns/locale/ht.js
/**
* @category Locales
* @summary Haitian Creole locale.
* @language Haitian Creole
* @iso-639-2 hat
* @author Rubens Mariuzzo [@rmariuzzo](https://github.com/rmariuzzo)
* @author Watson Marcelain [@watsongm24](https://github.com/watsongm24)
*/
var ht = {
	code: "ht",
	formatDistance: formatDistance$48,
	formatLong: formatLong$49,
	formatRelative: formatRelative$48,
	localize: {
		ordinalNumber: ordinalNumber$48,
		era: buildLocalizeFn({
			values: eraValues$48,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$48,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$48,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$48,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$48,
			defaultWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(ye|yèm)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(av\.J\.K|ap\.J\.K|ap\.J\.-K)/i,
				abbreviated: /^(av\.J\.-K|av\.J-K|apr\.J\.-K|apr\.J-K|ap\.J-K)/i,
				wide: /^(avan Jezi Kris|apre Jezi Kris)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^av/i, /^ap/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^t[1234]/i,
				wide: /^[1234](ye|yèm)? trimès/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[jfmasond]/i,
				abbreviated: /^(janv|fevr|mas|avr|me|jen|jiyè|out|sept|okt|nov|des)\.?/i,
				wide: /^(janvye|fevrye|mas|avril|me|jen|jiyè|out|septanm|oktòb|novanm|desanm)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^j/i,
					/^f/i,
					/^m/i,
					/^a/i,
					/^m/i,
					/^j/i,
					/^j/i,
					/^o/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				],
				any: [
					/^ja/i,
					/^f/i,
					/^ma/i,
					/^av/i,
					/^me/i,
					/^je/i,
					/^ji/i,
					/^ou/i,
					/^s/i,
					/^ok/i,
					/^n/i,
					/^d/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[lmjvsd]/i,
				short: /^(di|le|ma|me|je|va|sa)/i,
				abbreviated: /^(dim|len|mad|mèk|jed|van|sam)\.?/i,
				wide: /^(dimanch|lendi|madi|mèkredi|jedi|vandredi|samdi)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^d/i,
					/^l/i,
					/^m/i,
					/^m/i,
					/^j/i,
					/^v/i,
					/^s/i
				],
				any: [
					/^di/i,
					/^le/i,
					/^ma/i,
					/^mè/i,
					/^je/i,
					/^va/i,
					/^sa/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(a|p|minwit|midi|mat\.?|ap\.?m\.?|swa)/i,
				any: /^([ap]\.?\s?m\.?|nan maten|nan aprèmidi|nan aswè)/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a/i,
				pm: /^p/i,
				midnight: /^min/i,
				noon: /^mid/i,
				morning: /mat/i,
				afternoon: /ap/i,
				evening: /sw/i,
				night: /nwit/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/hu/_lib/formatDistance.js
var translations$1 = {
	about: "körülbelül",
	over: "több mint",
	almost: "majdnem",
	lessthan: "kevesebb mint"
};
var withoutSuffixes = {
	xseconds: " másodperc",
	halfaminute: "fél perc",
	xminutes: " perc",
	xhours: " óra",
	xdays: " nap",
	xweeks: " hét",
	xmonths: " hónap",
	xyears: " év"
};
var withSuffixes = {
	xseconds: {
		"-1": " másodperccel ezelőtt",
		1: " másodperc múlva",
		0: " másodperce"
	},
	halfaminute: {
		"-1": "fél perccel ezelőtt",
		1: "fél perc múlva",
		0: "fél perce"
	},
	xminutes: {
		"-1": " perccel ezelőtt",
		1: " perc múlva",
		0: " perce"
	},
	xhours: {
		"-1": " órával ezelőtt",
		1: " óra múlva",
		0: " órája"
	},
	xdays: {
		"-1": " nappal ezelőtt",
		1: " nap múlva",
		0: " napja"
	},
	xweeks: {
		"-1": " héttel ezelőtt",
		1: " hét múlva",
		0: " hete"
	},
	xmonths: {
		"-1": " hónappal ezelőtt",
		1: " hónap múlva",
		0: " hónapja"
	},
	xyears: {
		"-1": " évvel ezelőtt",
		1: " év múlva",
		0: " éve"
	}
};
var formatDistance$47 = (token, count, options) => {
	const adverb = token.match(/about|over|almost|lessthan/i);
	const unit = adverb ? token.replace(adverb[0], "") : token;
	const addSuffix = options?.addSuffix === true;
	const key = unit.toLowerCase();
	const comparison = options?.comparison || 0;
	const translated = addSuffix ? withSuffixes[key][comparison] : withoutSuffixes[key];
	let result = key === "halfaminute" ? translated : count + translated;
	if (adverb) result = translations$1[adverb[0].toLowerCase()] + " " + result;
	return result;
};
var formatLong$48 = {
	date: buildFormatLongFn({
		formats: {
			full: "y. MMMM d., EEEE",
			long: "y. MMMM d.",
			medium: "y. MMM d.",
			short: "y. MM. dd."
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "H:mm:ss zzzz",
			long: "H:mm:ss z",
			medium: "H:mm:ss",
			short: "H:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} {{time}}",
			long: "{{date}} {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/hu/_lib/formatRelative.js
var accusativeWeekdays$4 = [
	"vasárnap",
	"hétfőn",
	"kedden",
	"szerdán",
	"csütörtökön",
	"pénteken",
	"szombaton"
];
function week(isFuture) {
	return (date) => {
		const weekday = accusativeWeekdays$4[date.getDay()];
		return `${isFuture ? "" : "'múlt' "}'${weekday}' p'-kor'`;
	};
}
var formatRelativeLocale$47 = {
	lastWeek: week(false),
	yesterday: "'tegnap' p'-kor'",
	today: "'ma' p'-kor'",
	tomorrow: "'holnap' p'-kor'",
	nextWeek: week(true),
	other: "P"
};
var formatRelative$47 = (token, date) => {
	const format = formatRelativeLocale$47[token];
	if (typeof format === "function") return format(date);
	return format;
};
//#endregion
//#region ../../node_modules/date-fns/locale/hu/_lib/localize.js
var eraValues$47 = {
	narrow: ["ie.", "isz."],
	abbreviated: ["i. e.", "i. sz."],
	wide: ["Krisztus előtt", "időszámításunk szerint"]
};
var quarterValues$47 = {
	narrow: [
		"1.",
		"2.",
		"3.",
		"4."
	],
	abbreviated: [
		"1. n.év",
		"2. n.év",
		"3. n.év",
		"4. n.év"
	],
	wide: [
		"1. negyedév",
		"2. negyedév",
		"3. negyedév",
		"4. negyedév"
	]
};
var formattingQuarterValues$3 = {
	narrow: [
		"I.",
		"II.",
		"III.",
		"IV."
	],
	abbreviated: [
		"I. n.év",
		"II. n.év",
		"III. n.év",
		"IV. n.év"
	],
	wide: [
		"I. negyedév",
		"II. negyedév",
		"III. negyedév",
		"IV. negyedév"
	]
};
var monthValues$47 = {
	narrow: [
		"J",
		"F",
		"M",
		"Á",
		"M",
		"J",
		"J",
		"A",
		"Sz",
		"O",
		"N",
		"D"
	],
	abbreviated: [
		"jan.",
		"febr.",
		"márc.",
		"ápr.",
		"máj.",
		"jún.",
		"júl.",
		"aug.",
		"szept.",
		"okt.",
		"nov.",
		"dec."
	],
	wide: [
		"január",
		"február",
		"március",
		"április",
		"május",
		"június",
		"július",
		"augusztus",
		"szeptember",
		"október",
		"november",
		"december"
	]
};
var dayValues$47 = {
	narrow: [
		"V",
		"H",
		"K",
		"Sz",
		"Cs",
		"P",
		"Sz"
	],
	short: [
		"V",
		"H",
		"K",
		"Sze",
		"Cs",
		"P",
		"Szo"
	],
	abbreviated: [
		"V",
		"H",
		"K",
		"Sze",
		"Cs",
		"P",
		"Szo"
	],
	wide: [
		"vasárnap",
		"hétfő",
		"kedd",
		"szerda",
		"csütörtök",
		"péntek",
		"szombat"
	]
};
var dayPeriodValues$47 = {
	narrow: {
		am: "de.",
		pm: "du.",
		midnight: "éjfél",
		noon: "dél",
		morning: "reggel",
		afternoon: "du.",
		evening: "este",
		night: "éjjel"
	},
	abbreviated: {
		am: "de.",
		pm: "du.",
		midnight: "éjfél",
		noon: "dél",
		morning: "reggel",
		afternoon: "du.",
		evening: "este",
		night: "éjjel"
	},
	wide: {
		am: "de.",
		pm: "du.",
		midnight: "éjfél",
		noon: "dél",
		morning: "reggel",
		afternoon: "délután",
		evening: "este",
		night: "éjjel"
	}
};
var ordinalNumber$47 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + ".";
};
//#endregion
//#region ../../node_modules/date-fns/locale/hu.js
/**
* @category Locales
* @summary Hungarian locale.
* @language Hungarian
* @iso-639-2 hun
* @author Pavlo Shpak [@pshpak](https://github.com/pshpak)
* @author Eduardo Pardo [@eduardopsll](https://github.com/eduardopsll)
* @author Zoltan Szepesi [@twodcube](https://github.com/twodcube)
*/
var hu = {
	code: "hu",
	formatDistance: formatDistance$47,
	formatLong: formatLong$48,
	formatRelative: formatRelative$47,
	localize: {
		ordinalNumber: ordinalNumber$47,
		era: buildLocalizeFn({
			values: eraValues$47,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$47,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1,
			formattingValues: formattingQuarterValues$3,
			defaultFormattingWidth: "wide"
		}),
		month: buildLocalizeFn({
			values: monthValues$47,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$47,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$47,
			defaultWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)\.?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(ie\.|isz\.)/i,
				abbreviated: /^(i\.\s?e\.?|b?\s?c\s?e|i\.\s?sz\.?)/i,
				wide: /^(Krisztus előtt|időszámításunk előtt|időszámításunk szerint|i\. sz\.)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [/ie/i, /isz/i],
				abbreviated: [/^(i\.?\s?e\.?|b\s?ce)/i, /^(i\.?\s?sz\.?|c\s?e)/i],
				any: [/előtt/i, /(szerint|i. sz.)/i]
			},
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]\.?/i,
				abbreviated: /^[1234]?\.?\s?n\.év/i,
				wide: /^([1234]|I|II|III|IV)?\.?\s?negyedév/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1|I$/i,
				/2|II$/i,
				/3|III/i,
				/4|IV/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[jfmaásond]|sz/i,
				abbreviated: /^(jan\.?|febr\.?|márc\.?|ápr\.?|máj\.?|jún\.?|júl\.?|aug\.?|szept\.?|okt\.?|nov\.?|dec\.?)/i,
				wide: /^(január|február|március|április|május|június|július|augusztus|szeptember|október|november|december)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^j/i,
					/^f/i,
					/^m/i,
					/^a|á/i,
					/^m/i,
					/^j/i,
					/^j/i,
					/^a/i,
					/^s|sz/i,
					/^o/i,
					/^n/i,
					/^d/i
				],
				any: [
					/^ja/i,
					/^f/i,
					/^már/i,
					/^áp/i,
					/^máj/i,
					/^jún/i,
					/^júl/i,
					/^au/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^([vhkpc]|sz|cs|sz)/i,
				short: /^([vhkp]|sze|cs|szo)/i,
				abbreviated: /^([vhkp]|sze|cs|szo)/i,
				wide: /^(vasárnap|hétfő|kedd|szerda|csütörtök|péntek|szombat)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^v/i,
					/^h/i,
					/^k/i,
					/^sz/i,
					/^c/i,
					/^p/i,
					/^sz/i
				],
				any: [
					/^v/i,
					/^h/i,
					/^k/i,
					/^sze/i,
					/^c/i,
					/^p/i,
					/^szo/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: { any: /^((de|du)\.?|éjfél|délután|dél|reggel|este|éjjel)/i },
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^de\.?/i,
				pm: /^du\.?/i,
				midnight: /^éjf/i,
				noon: /^dé/i,
				morning: /reg/i,
				afternoon: /^délu\.?/i,
				evening: /es/i,
				night: /éjj/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/hy/_lib/formatDistance.js
var formatDistanceLocale$46 = {
	lessThanXSeconds: {
		one: "ավելի քիչ քան 1 վայրկյան",
		other: "ավելի քիչ քան {{count}} վայրկյան"
	},
	xSeconds: {
		one: "1 վայրկյան",
		other: "{{count}} վայրկյան"
	},
	halfAMinute: "կես րոպե",
	lessThanXMinutes: {
		one: "ավելի քիչ քան 1 րոպե",
		other: "ավելի քիչ քան {{count}} րոպե"
	},
	xMinutes: {
		one: "1 րոպե",
		other: "{{count}} րոպե"
	},
	aboutXHours: {
		one: "մոտ 1 ժամ",
		other: "մոտ {{count}} ժամ"
	},
	xHours: {
		one: "1 ժամ",
		other: "{{count}} ժամ"
	},
	xDays: {
		one: "1 օր",
		other: "{{count}} օր"
	},
	aboutXWeeks: {
		one: "մոտ 1 շաբաթ",
		other: "մոտ {{count}} շաբաթ"
	},
	xWeeks: {
		one: "1 շաբաթ",
		other: "{{count}} շաբաթ"
	},
	aboutXMonths: {
		one: "մոտ 1 ամիս",
		other: "մոտ {{count}} ամիս"
	},
	xMonths: {
		one: "1 ամիս",
		other: "{{count}} ամիս"
	},
	aboutXYears: {
		one: "մոտ 1 տարի",
		other: "մոտ {{count}} տարի"
	},
	xYears: {
		one: "1 տարի",
		other: "{{count}} տարի"
	},
	overXYears: {
		one: "ավելի քան 1 տարի",
		other: "ավելի քան {{count}} տարի"
	},
	almostXYears: {
		one: "համարյա 1 տարի",
		other: "համարյա {{count}} տարի"
	}
};
var formatDistance$46 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$46[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return result + " հետո";
	else return result + " առաջ";
	return result;
};
var formatLong$47 = {
	date: buildFormatLongFn({
		formats: {
			full: "d MMMM, y, EEEE",
			long: "d MMMM, y",
			medium: "d MMM, y",
			short: "dd.MM.yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'ժ․'{{time}}",
			long: "{{date}} 'ժ․'{{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/hy/_lib/formatRelative.js
var formatRelativeLocale$46 = {
	lastWeek: "'նախորդ' eeee p'֊ին'",
	yesterday: "'երեկ' p'֊ին'",
	today: "'այսօր' p'֊ին'",
	tomorrow: "'վաղը' p'֊ին'",
	nextWeek: "'հաջորդ' eeee p'֊ին'",
	other: "P"
};
var formatRelative$46 = (token, _date, _baseDate, _options) => formatRelativeLocale$46[token];
//#endregion
//#region ../../node_modules/date-fns/locale/hy/_lib/localize.js
var eraValues$46 = {
	narrow: ["Ք", "Մ"],
	abbreviated: ["ՔԱ", "ՄԹ"],
	wide: ["Քրիստոսից առաջ", "Մեր թվարկության"]
};
var quarterValues$46 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"Ք1",
		"Ք2",
		"Ք3",
		"Ք4"
	],
	wide: [
		"1֊ին քառորդ",
		"2֊րդ քառորդ",
		"3֊րդ քառորդ",
		"4֊րդ քառորդ"
	]
};
var monthValues$46 = {
	narrow: [
		"Հ",
		"Փ",
		"Մ",
		"Ա",
		"Մ",
		"Հ",
		"Հ",
		"Օ",
		"Ս",
		"Հ",
		"Ն",
		"Դ"
	],
	abbreviated: [
		"հուն",
		"փետ",
		"մար",
		"ապր",
		"մայ",
		"հուն",
		"հուլ",
		"օգս",
		"սեպ",
		"հոկ",
		"նոյ",
		"դեկ"
	],
	wide: [
		"հունվար",
		"փետրվար",
		"մարտ",
		"ապրիլ",
		"մայիս",
		"հունիս",
		"հուլիս",
		"օգոստոս",
		"սեպտեմբեր",
		"հոկտեմբեր",
		"նոյեմբեր",
		"դեկտեմբեր"
	]
};
var dayValues$46 = {
	narrow: [
		"Կ",
		"Ե",
		"Ե",
		"Չ",
		"Հ",
		"Ո",
		"Շ"
	],
	short: [
		"կր",
		"եր",
		"եք",
		"չք",
		"հգ",
		"ուր",
		"շբ"
	],
	abbreviated: [
		"կիր",
		"երկ",
		"երք",
		"չոր",
		"հնգ",
		"ուրբ",
		"շաբ"
	],
	wide: [
		"կիրակի",
		"երկուշաբթի",
		"երեքշաբթի",
		"չորեքշաբթի",
		"հինգշաբթի",
		"ուրբաթ",
		"շաբաթ"
	]
};
var dayPeriodValues$46 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "կեսգշ",
		noon: "կեսօր",
		morning: "առավոտ",
		afternoon: "ցերեկ",
		evening: "երեկո",
		night: "գիշեր"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "կեսգիշեր",
		noon: "կեսօր",
		morning: "առավոտ",
		afternoon: "ցերեկ",
		evening: "երեկո",
		night: "գիշեր"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "կեսգիշեր",
		noon: "կեսօր",
		morning: "առավոտ",
		afternoon: "ցերեկ",
		evening: "երեկո",
		night: "գիշեր"
	}
};
var formattingDayPeriodValues$38 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "կեսգշ",
		noon: "կեսօր",
		morning: "առավոտը",
		afternoon: "ցերեկը",
		evening: "երեկոյան",
		night: "գիշերը"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "կեսգիշերին",
		noon: "կեսօրին",
		morning: "առավոտը",
		afternoon: "ցերեկը",
		evening: "երեկոյան",
		night: "գիշերը"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "կեսգիշերին",
		noon: "կեսօրին",
		morning: "առավոտը",
		afternoon: "ցերեկը",
		evening: "երեկոյան",
		night: "գիշերը"
	}
};
var ordinalNumber$46 = (dirtyNumber, _options) => {
	const number = Number(dirtyNumber);
	const rem100 = number % 100;
	if (rem100 < 10) {
		if (rem100 % 10 === 1) return number + "֊ին";
	}
	return number + "֊րդ";
};
//#endregion
//#region ../../node_modules/date-fns/locale/hy.js
/**
* @category Locales
* @summary Armenian locale
* @language Armenian
* @iso-639-2 arm
* @author Alex Igityan [@alexigityan](https://github.com/alexigityan)
*/
var hy = {
	code: "hy",
	formatDistance: formatDistance$46,
	formatLong: formatLong$47,
	formatRelative: formatRelative$46,
	localize: {
		ordinalNumber: ordinalNumber$46,
		era: buildLocalizeFn({
			values: eraValues$46,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$46,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$46,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$46,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$46,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$38,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)((-|֊)?(ին|րդ))?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(Ք|Մ)/i,
				abbreviated: /^(Ք\.?\s?Ա\.?|Մ\.?\s?Թ\.?\s?Ա\.?|Մ\.?\s?Թ\.?|Ք\.?\s?Հ\.?)/i,
				wide: /^(քրիստոսից առաջ|մեր թվարկությունից առաջ|մեր թվարկության|քրիստոսից հետո)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^ք/i, /^մ/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^ք[1234]/i,
				wide: /^[1234]((-|֊)?(ին|րդ)) քառորդ/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[հփմաօսնդ]/i,
				abbreviated: /^(հուն|փետ|մար|ապր|մայ|հուն|հուլ|օգս|սեպ|հոկ|նոյ|դեկ)/i,
				wide: /^(հունվար|փետրվար|մարտ|ապրիլ|մայիս|հունիս|հուլիս|օգոստոս|սեպտեմբեր|հոկտեմբեր|նոյեմբեր|դեկտեմբեր)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^հ/i,
					/^փ/i,
					/^մ/i,
					/^ա/i,
					/^մ/i,
					/^հ/i,
					/^հ/i,
					/^օ/i,
					/^ս/i,
					/^հ/i,
					/^ն/i,
					/^դ/i
				],
				any: [
					/^հու/i,
					/^փ/i,
					/^մար/i,
					/^ա/i,
					/^մայ/i,
					/^հուն/i,
					/^հուլ/i,
					/^օ/i,
					/^ս/i,
					/^հոկ/i,
					/^ն/i,
					/^դ/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[եչհոշկ]/i,
				short: /^(կր|եր|եք|չք|հգ|ուր|շբ)/i,
				abbreviated: /^(կիր|երկ|երք|չոր|հնգ|ուրբ|շաբ)/i,
				wide: /^(կիրակի|երկուշաբթի|երեքշաբթի|չորեքշաբթի|հինգշաբթի|ուրբաթ|շաբաթ)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^կ/i,
					/^ե/i,
					/^ե/i,
					/^չ/i,
					/^հ/i,
					/^(ո|Ո)/,
					/^շ/i
				],
				short: [
					/^կ/i,
					/^եր/i,
					/^եք/i,
					/^չ/i,
					/^հ/i,
					/^(ո|Ո)/,
					/^շ/i
				],
				abbreviated: [
					/^կ/i,
					/^երկ/i,
					/^երք/i,
					/^չ/i,
					/^հ/i,
					/^(ո|Ո)/,
					/^շ/i
				],
				wide: [
					/^կ/i,
					/^երկ/i,
					/^երե/i,
					/^չ/i,
					/^հ/i,
					/^(ո|Ո)/,
					/^շ/i
				]
			},
			defaultParseWidth: "wide"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^([ap]|կեսգշ|կեսօր|(առավոտը?|ցերեկը?|երեկո(յան)?|գիշերը?))/i,
				any: /^([ap]\.?\s?m\.?|կեսգիշեր(ին)?|կեսօր(ին)?|(առավոտը?|ցերեկը?|երեկո(յան)?|գիշերը?))/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a/i,
				pm: /^p/i,
				midnight: /կեսգիշեր/i,
				noon: /կեսօր/i,
				morning: /առավոտ/i,
				afternoon: /ցերեկ/i,
				evening: /երեկո/i,
				night: /գիշեր/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/id/_lib/formatDistance.js
var formatDistanceLocale$45 = {
	lessThanXSeconds: {
		one: "kurang dari 1 detik",
		other: "kurang dari {{count}} detik"
	},
	xSeconds: {
		one: "1 detik",
		other: "{{count}} detik"
	},
	halfAMinute: "setengah menit",
	lessThanXMinutes: {
		one: "kurang dari 1 menit",
		other: "kurang dari {{count}} menit"
	},
	xMinutes: {
		one: "1 menit",
		other: "{{count}} menit"
	},
	aboutXHours: {
		one: "sekitar 1 jam",
		other: "sekitar {{count}} jam"
	},
	xHours: {
		one: "1 jam",
		other: "{{count}} jam"
	},
	xDays: {
		one: "1 hari",
		other: "{{count}} hari"
	},
	aboutXWeeks: {
		one: "sekitar 1 minggu",
		other: "sekitar {{count}} minggu"
	},
	xWeeks: {
		one: "1 minggu",
		other: "{{count}} minggu"
	},
	aboutXMonths: {
		one: "sekitar 1 bulan",
		other: "sekitar {{count}} bulan"
	},
	xMonths: {
		one: "1 bulan",
		other: "{{count}} bulan"
	},
	aboutXYears: {
		one: "sekitar 1 tahun",
		other: "sekitar {{count}} tahun"
	},
	xYears: {
		one: "1 tahun",
		other: "{{count}} tahun"
	},
	overXYears: {
		one: "lebih dari 1 tahun",
		other: "lebih dari {{count}} tahun"
	},
	almostXYears: {
		one: "hampir 1 tahun",
		other: "hampir {{count}} tahun"
	}
};
var formatDistance$45 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$45[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", count.toString());
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "dalam waktu " + result;
	else return result + " yang lalu";
	return result;
};
var formatLong$46 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, d MMMM yyyy",
			long: "d MMMM yyyy",
			medium: "d MMM yyyy",
			short: "d/M/yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH.mm.ss",
			long: "HH.mm.ss",
			medium: "HH.mm",
			short: "HH.mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'pukul' {{time}}",
			long: "{{date}} 'pukul' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/id/_lib/formatRelative.js
var formatRelativeLocale$45 = {
	lastWeek: "eeee 'lalu pukul' p",
	yesterday: "'Kemarin pukul' p",
	today: "'Hari ini pukul' p",
	tomorrow: "'Besok pukul' p",
	nextWeek: "eeee 'pukul' p",
	other: "P"
};
var formatRelative$45 = (token, _date, _baseDate, _options) => formatRelativeLocale$45[token];
//#endregion
//#region ../../node_modules/date-fns/locale/id/_lib/localize.js
var eraValues$45 = {
	narrow: ["SM", "M"],
	abbreviated: ["SM", "M"],
	wide: ["Sebelum Masehi", "Masehi"]
};
var quarterValues$45 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"K1",
		"K2",
		"K3",
		"K4"
	],
	wide: [
		"Kuartal ke-1",
		"Kuartal ke-2",
		"Kuartal ke-3",
		"Kuartal ke-4"
	]
};
var monthValues$45 = {
	narrow: [
		"J",
		"F",
		"M",
		"A",
		"M",
		"J",
		"J",
		"A",
		"S",
		"O",
		"N",
		"D"
	],
	abbreviated: [
		"Jan",
		"Feb",
		"Mar",
		"Apr",
		"Mei",
		"Jun",
		"Jul",
		"Agt",
		"Sep",
		"Okt",
		"Nov",
		"Des"
	],
	wide: [
		"Januari",
		"Februari",
		"Maret",
		"April",
		"Mei",
		"Juni",
		"Juli",
		"Agustus",
		"September",
		"Oktober",
		"November",
		"Desember"
	]
};
var dayValues$45 = {
	narrow: [
		"M",
		"S",
		"S",
		"R",
		"K",
		"J",
		"S"
	],
	short: [
		"Min",
		"Sen",
		"Sel",
		"Rab",
		"Kam",
		"Jum",
		"Sab"
	],
	abbreviated: [
		"Min",
		"Sen",
		"Sel",
		"Rab",
		"Kam",
		"Jum",
		"Sab"
	],
	wide: [
		"Minggu",
		"Senin",
		"Selasa",
		"Rabu",
		"Kamis",
		"Jumat",
		"Sabtu"
	]
};
var dayPeriodValues$45 = {
	narrow: {
		am: "AM",
		pm: "PM",
		midnight: "tengah malam",
		noon: "tengah hari",
		morning: "pagi",
		afternoon: "siang",
		evening: "sore",
		night: "malam"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "tengah malam",
		noon: "tengah hari",
		morning: "pagi",
		afternoon: "siang",
		evening: "sore",
		night: "malam"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "tengah malam",
		noon: "tengah hari",
		morning: "pagi",
		afternoon: "siang",
		evening: "sore",
		night: "malam"
	}
};
var formattingDayPeriodValues$37 = {
	narrow: {
		am: "AM",
		pm: "PM",
		midnight: "tengah malam",
		noon: "tengah hari",
		morning: "pagi",
		afternoon: "siang",
		evening: "sore",
		night: "malam"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "tengah malam",
		noon: "tengah hari",
		morning: "pagi",
		afternoon: "siang",
		evening: "sore",
		night: "malam"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "tengah malam",
		noon: "tengah hari",
		morning: "pagi",
		afternoon: "siang",
		evening: "sore",
		night: "malam"
	}
};
var ordinalNumber$45 = (dirtyNumber, _options) => {
	return "ke-" + Number(dirtyNumber);
};
//#endregion
//#region ../../node_modules/date-fns/locale/id.js
/**
* @category Locales
* @summary Indonesian locale.
* @language Indonesian
* @iso-639-2 ind
* @author Rahmat Budiharso [@rbudiharso](https://github.com/rbudiharso)
* @author Benget Nata [@bentinata](https://github.com/bentinata)
* @author Budi Irawan [@deerawan](https://github.com/deerawan)
* @author Try Ajitiono [@imballinst](https://github.com/imballinst)
*/
var id = {
	code: "id",
	formatDistance: formatDistance$45,
	formatLong: formatLong$46,
	formatRelative: formatRelative$45,
	localize: {
		ordinalNumber: ordinalNumber$45,
		era: buildLocalizeFn({
			values: eraValues$45,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$45,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$45,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$45,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$45,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$37,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^ke-(\d+)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(sm|m)/i,
				abbreviated: /^(s\.?\s?m\.?|s\.?\s?e\.?\s?u\.?|m\.?|e\.?\s?u\.?)/i,
				wide: /^(sebelum masehi|sebelum era umum|masehi|era umum)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^s/i, /^(m|e)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^K-?\s[1234]/i,
				wide: /^Kuartal ke-?\s?[1234]/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[jfmasond]/i,
				abbreviated: /^(jan|feb|mar|apr|mei|jun|jul|agt|sep|okt|nov|des)/i,
				wide: /^(januari|februari|maret|april|mei|juni|juli|agustus|september|oktober|november|desember)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^j/i,
					/^f/i,
					/^m/i,
					/^a/i,
					/^m/i,
					/^j/i,
					/^j/i,
					/^a/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				],
				any: [
					/^ja/i,
					/^f/i,
					/^ma/i,
					/^ap/i,
					/^me/i,
					/^jun/i,
					/^jul/i,
					/^ag/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[srkjm]/i,
				short: /^(min|sen|sel|rab|kam|jum|sab)/i,
				abbreviated: /^(min|sen|sel|rab|kam|jum|sab)/i,
				wide: /^(minggu|senin|selasa|rabu|kamis|jumat|sabtu)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^m/i,
					/^s/i,
					/^s/i,
					/^r/i,
					/^k/i,
					/^j/i,
					/^s/i
				],
				any: [
					/^m/i,
					/^sen/i,
					/^sel/i,
					/^r/i,
					/^k/i,
					/^j/i,
					/^sa/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(a|p|tengah m|tengah h|(di(\swaktu)?) (pagi|siang|sore|malam))/i,
				any: /^([ap]\.?\s?m\.?|tengah malam|tengah hari|(di(\swaktu)?) (pagi|siang|sore|malam))/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a/i,
				pm: /^pm/i,
				midnight: /^tengah m/i,
				noon: /^tengah h/i,
				morning: /pagi/i,
				afternoon: /siang/i,
				evening: /sore/i,
				night: /malam/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/is/_lib/formatDistance.js
var formatDistanceLocale$44 = {
	lessThanXSeconds: {
		one: "minna en 1 sekúnda",
		other: "minna en {{count}} sekúndur"
	},
	xSeconds: {
		one: "1 sekúnda",
		other: "{{count}} sekúndur"
	},
	halfAMinute: "hálf mínúta",
	lessThanXMinutes: {
		one: "minna en 1 mínúta",
		other: "minna en {{count}} mínútur"
	},
	xMinutes: {
		one: "1 mínúta",
		other: "{{count}} mínútur"
	},
	aboutXHours: {
		one: "u.þ.b. 1 klukkustund",
		other: "u.þ.b. {{count}} klukkustundir"
	},
	xHours: {
		one: "1 klukkustund",
		other: "{{count}} klukkustundir"
	},
	xDays: {
		one: "1 dagur",
		other: "{{count}} dagar"
	},
	aboutXWeeks: {
		one: "um viku",
		other: "um {{count}} vikur"
	},
	xWeeks: {
		one: "1 viku",
		other: "{{count}} vikur"
	},
	aboutXMonths: {
		one: "u.þ.b. 1 mánuður",
		other: "u.þ.b. {{count}} mánuðir"
	},
	xMonths: {
		one: "1 mánuður",
		other: "{{count}} mánuðir"
	},
	aboutXYears: {
		one: "u.þ.b. 1 ár",
		other: "u.þ.b. {{count}} ár"
	},
	xYears: {
		one: "1 ár",
		other: "{{count}} ár"
	},
	overXYears: {
		one: "meira en 1 ár",
		other: "meira en {{count}} ár"
	},
	almostXYears: {
		one: "næstum 1 ár",
		other: "næstum {{count}} ár"
	}
};
var formatDistance$44 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$44[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", count.toString());
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "í " + result;
	else return result + " síðan";
	return result;
};
var formatLong$45 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, do MMMM y",
			long: "do MMMM y",
			medium: "do MMM y",
			short: "d.MM.y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "'kl'. HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'kl.' {{time}}",
			long: "{{date}} 'kl.' {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/is/_lib/formatRelative.js
var formatRelativeLocale$44 = {
	lastWeek: "'síðasta' dddd 'kl.' p",
	yesterday: "'í gær kl.' p",
	today: "'í dag kl.' p",
	tomorrow: "'á morgun kl.' p",
	nextWeek: "dddd 'kl.' p",
	other: "P"
};
var formatRelative$44 = (token, _date, _baseDate, _options) => formatRelativeLocale$44[token];
//#endregion
//#region ../../node_modules/date-fns/locale/is/_lib/localize.js
var eraValues$44 = {
	narrow: ["f.Kr.", "e.Kr."],
	abbreviated: ["f.Kr.", "e.Kr."],
	wide: ["fyrir Krist", "eftir Krist"]
};
var quarterValues$44 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"1F",
		"2F",
		"3F",
		"4F"
	],
	wide: [
		"1. fjórðungur",
		"2. fjórðungur",
		"3. fjórðungur",
		"4. fjórðungur"
	]
};
var monthValues$44 = {
	narrow: [
		"J",
		"F",
		"M",
		"A",
		"M",
		"J",
		"J",
		"Á",
		"S",
		"Ó",
		"N",
		"D"
	],
	abbreviated: [
		"jan.",
		"feb.",
		"mars",
		"apríl",
		"maí",
		"júní",
		"júlí",
		"ágúst",
		"sept.",
		"okt.",
		"nóv.",
		"des."
	],
	wide: [
		"janúar",
		"febrúar",
		"mars",
		"apríl",
		"maí",
		"júní",
		"júlí",
		"ágúst",
		"september",
		"október",
		"nóvember",
		"desember"
	]
};
var dayValues$44 = {
	narrow: [
		"S",
		"M",
		"Þ",
		"M",
		"F",
		"F",
		"L"
	],
	short: [
		"Su",
		"Má",
		"Þr",
		"Mi",
		"Fi",
		"Fö",
		"La"
	],
	abbreviated: [
		"sun.",
		"mán.",
		"þri.",
		"mið.",
		"fim.",
		"fös.",
		"lau."
	],
	wide: [
		"sunnudagur",
		"mánudagur",
		"þriðjudagur",
		"miðvikudagur",
		"fimmtudagur",
		"föstudagur",
		"laugardagur"
	]
};
var dayPeriodValues$44 = {
	narrow: {
		am: "f",
		pm: "e",
		midnight: "miðnætti",
		noon: "hádegi",
		morning: "morgunn",
		afternoon: "síðdegi",
		evening: "kvöld",
		night: "nótt"
	},
	abbreviated: {
		am: "f.h.",
		pm: "e.h.",
		midnight: "miðnætti",
		noon: "hádegi",
		morning: "morgunn",
		afternoon: "síðdegi",
		evening: "kvöld",
		night: "nótt"
	},
	wide: {
		am: "fyrir hádegi",
		pm: "eftir hádegi",
		midnight: "miðnætti",
		noon: "hádegi",
		morning: "morgunn",
		afternoon: "síðdegi",
		evening: "kvöld",
		night: "nótt"
	}
};
var formattingDayPeriodValues$36 = {
	narrow: {
		am: "f",
		pm: "e",
		midnight: "á miðnætti",
		noon: "á hádegi",
		morning: "að morgni",
		afternoon: "síðdegis",
		evening: "um kvöld",
		night: "um nótt"
	},
	abbreviated: {
		am: "f.h.",
		pm: "e.h.",
		midnight: "á miðnætti",
		noon: "á hádegi",
		morning: "að morgni",
		afternoon: "síðdegis",
		evening: "um kvöld",
		night: "um nótt"
	},
	wide: {
		am: "fyrir hádegi",
		pm: "eftir hádegi",
		midnight: "á miðnætti",
		noon: "á hádegi",
		morning: "að morgni",
		afternoon: "síðdegis",
		evening: "um kvöld",
		night: "um nótt"
	}
};
var ordinalNumber$44 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + ".";
};
//#endregion
//#region ../../node_modules/date-fns/locale/is.js
/**
* @category Locales
* @summary Icelandic locale.
* @language Icelandic
* @iso-639-2 isl
* @author Derek Blank [@derekblank](https://github.com/derekblank)
* @author Arnór Ýmir [@lamayg](https://github.com/lamayg)
*/
var is = {
	code: "is",
	formatDistance: formatDistance$44,
	formatLong: formatLong$45,
	formatRelative: formatRelative$44,
	localize: {
		ordinalNumber: ordinalNumber$44,
		era: buildLocalizeFn({
			values: eraValues$44,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$44,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$44,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$44,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$44,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$36,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(\.)?/i,
			parsePattern: /\d+(\.)?/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(f\.Kr\.|e\.Kr\.)/i,
				abbreviated: /^(f\.Kr\.|e\.Kr\.)/i,
				wide: /^(fyrir Krist|eftir Krist)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^(f\.Kr\.)/i, /^(e\.Kr\.)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]\.?/i,
				abbreviated: /^q[1234]\.?/i,
				wide: /^[1234]\.? fjórðungur/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1\.?/i,
				/2\.?/i,
				/3\.?/i,
				/4\.?/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[jfmásónd]/i,
				abbreviated: /^(jan\.|feb\.|mars\.|apríl\.|maí|júní|júlí|águst|sep\.|oct\.|nov\.|dec\.)/i,
				wide: /^(januar|febrúar|mars|apríl|maí|júní|júlí|águst|september|október|nóvember|desember)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^j/i,
					/^f/i,
					/^m/i,
					/^a/i,
					/^m/i,
					/^j/i,
					/^j/i,
					/^á/i,
					/^s/i,
					/^ó/i,
					/^n/i,
					/^d/i
				],
				any: [
					/^ja/i,
					/^f/i,
					/^mar/i,
					/^ap/i,
					/^maí/i,
					/^jún/i,
					/^júl/i,
					/^áu/i,
					/^s/i,
					/^ó/i,
					/^n/i,
					/^d/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[smtwf]/i,
				short: /^(su|má|þr|mi|fi|fö|la)/i,
				abbreviated: /^(sun|mán|þri|mið|fim|fös|lau)\.?/i,
				wide: /^(sunnudagur|mánudagur|þriðjudagur|miðvikudagur|fimmtudagur|föstudagur|laugardagur)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^s/i,
					/^m/i,
					/^þ/i,
					/^m/i,
					/^f/i,
					/^f/i,
					/^l/i
				],
				any: [
					/^su/i,
					/^má/i,
					/^þr/i,
					/^mi/i,
					/^fi/i,
					/^fö/i,
					/^la/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(f|e|síðdegis|(á|að|um) (morgni|kvöld|nótt|miðnætti))/i,
				any: /^(fyrir hádegi|eftir hádegi|[ef]\.?h\.?|síðdegis|morgunn|(á|að|um) (morgni|kvöld|nótt|miðnætti))/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^f/i,
				pm: /^e/i,
				midnight: /^mi/i,
				noon: /^há/i,
				morning: /morgunn/i,
				afternoon: /síðdegi/i,
				evening: /kvöld/i,
				night: /nótt/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/it/_lib/formatDistance.js
var formatDistanceLocale$43 = {
	lessThanXSeconds: {
		one: "meno di un secondo",
		other: "meno di {{count}} secondi"
	},
	xSeconds: {
		one: "un secondo",
		other: "{{count}} secondi"
	},
	halfAMinute: "alcuni secondi",
	lessThanXMinutes: {
		one: "meno di un minuto",
		other: "meno di {{count}} minuti"
	},
	xMinutes: {
		one: "un minuto",
		other: "{{count}} minuti"
	},
	aboutXHours: {
		one: "circa un'ora",
		other: "circa {{count}} ore"
	},
	xHours: {
		one: "un'ora",
		other: "{{count}} ore"
	},
	xDays: {
		one: "un giorno",
		other: "{{count}} giorni"
	},
	aboutXWeeks: {
		one: "circa una settimana",
		other: "circa {{count}} settimane"
	},
	xWeeks: {
		one: "una settimana",
		other: "{{count}} settimane"
	},
	aboutXMonths: {
		one: "circa un mese",
		other: "circa {{count}} mesi"
	},
	xMonths: {
		one: "un mese",
		other: "{{count}} mesi"
	},
	aboutXYears: {
		one: "circa un anno",
		other: "circa {{count}} anni"
	},
	xYears: {
		one: "un anno",
		other: "{{count}} anni"
	},
	overXYears: {
		one: "più di un anno",
		other: "più di {{count}} anni"
	},
	almostXYears: {
		one: "quasi un anno",
		other: "quasi {{count}} anni"
	}
};
var formatDistance$43 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$43[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", count.toString());
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "tra " + result;
	else return result + " fa";
	return result;
};
var formatLong$44 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE d MMMM y",
			long: "d MMMM y",
			medium: "d MMM y",
			short: "dd/MM/y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} {{time}}",
			long: "{{date}} {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/it/_lib/formatRelative.js
var weekdays$2 = [
	"domenica",
	"lunedì",
	"martedì",
	"mercoledì",
	"giovedì",
	"venerdì",
	"sabato"
];
function lastWeek$5(day) {
	switch (day) {
		case 0: return "'domenica scorsa alle' p";
		default: return "'" + weekdays$2[day] + " scorso alle' p";
	}
}
function thisWeek$5(day) {
	return "'" + weekdays$2[day] + " alle' p";
}
function nextWeek$5(day) {
	switch (day) {
		case 0: return "'domenica prossima alle' p";
		default: return "'" + weekdays$2[day] + " prossimo alle' p";
	}
}
var formatRelativeLocale$43 = {
	lastWeek: (date, baseDate, options) => {
		const day = date.getDay();
		if (isSameWeek(date, baseDate, options)) return thisWeek$5(day);
		else return lastWeek$5(day);
	},
	yesterday: "'ieri alle' p",
	today: "'oggi alle' p",
	tomorrow: "'domani alle' p",
	nextWeek: (date, baseDate, options) => {
		const day = date.getDay();
		if (isSameWeek(date, baseDate, options)) return thisWeek$5(day);
		else return nextWeek$5(day);
	},
	other: "P"
};
var formatRelative$43 = (token, date, baseDate, options) => {
	const format = formatRelativeLocale$43[token];
	if (typeof format === "function") return format(date, baseDate, options);
	return format;
};
//#endregion
//#region ../../node_modules/date-fns/locale/it/_lib/localize.js
var eraValues$43 = {
	narrow: ["aC", "dC"],
	abbreviated: ["a.C.", "d.C."],
	wide: ["avanti Cristo", "dopo Cristo"]
};
var quarterValues$43 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"T1",
		"T2",
		"T3",
		"T4"
	],
	wide: [
		"1º trimestre",
		"2º trimestre",
		"3º trimestre",
		"4º trimestre"
	]
};
var monthValues$43 = {
	narrow: [
		"G",
		"F",
		"M",
		"A",
		"M",
		"G",
		"L",
		"A",
		"S",
		"O",
		"N",
		"D"
	],
	abbreviated: [
		"gen",
		"feb",
		"mar",
		"apr",
		"mag",
		"giu",
		"lug",
		"ago",
		"set",
		"ott",
		"nov",
		"dic"
	],
	wide: [
		"gennaio",
		"febbraio",
		"marzo",
		"aprile",
		"maggio",
		"giugno",
		"luglio",
		"agosto",
		"settembre",
		"ottobre",
		"novembre",
		"dicembre"
	]
};
var dayValues$43 = {
	narrow: [
		"D",
		"L",
		"M",
		"M",
		"G",
		"V",
		"S"
	],
	short: [
		"dom",
		"lun",
		"mar",
		"mer",
		"gio",
		"ven",
		"sab"
	],
	abbreviated: [
		"dom",
		"lun",
		"mar",
		"mer",
		"gio",
		"ven",
		"sab"
	],
	wide: [
		"domenica",
		"lunedì",
		"martedì",
		"mercoledì",
		"giovedì",
		"venerdì",
		"sabato"
	]
};
var dayPeriodValues$43 = {
	narrow: {
		am: "m.",
		pm: "p.",
		midnight: "mezzanotte",
		noon: "mezzogiorno",
		morning: "mattina",
		afternoon: "pomeriggio",
		evening: "sera",
		night: "notte"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "mezzanotte",
		noon: "mezzogiorno",
		morning: "mattina",
		afternoon: "pomeriggio",
		evening: "sera",
		night: "notte"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "mezzanotte",
		noon: "mezzogiorno",
		morning: "mattina",
		afternoon: "pomeriggio",
		evening: "sera",
		night: "notte"
	}
};
var formattingDayPeriodValues$35 = {
	narrow: {
		am: "m.",
		pm: "p.",
		midnight: "mezzanotte",
		noon: "mezzogiorno",
		morning: "di mattina",
		afternoon: "del pomeriggio",
		evening: "di sera",
		night: "di notte"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "mezzanotte",
		noon: "mezzogiorno",
		morning: "di mattina",
		afternoon: "del pomeriggio",
		evening: "di sera",
		night: "di notte"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "mezzanotte",
		noon: "mezzogiorno",
		morning: "di mattina",
		afternoon: "del pomeriggio",
		evening: "di sera",
		night: "di notte"
	}
};
var ordinalNumber$43 = (dirtyNumber, _options) => {
	const number = Number(dirtyNumber);
	return String(number);
};
var localize$43 = {
	ordinalNumber: ordinalNumber$43,
	era: buildLocalizeFn({
		values: eraValues$43,
		defaultWidth: "wide"
	}),
	quarter: buildLocalizeFn({
		values: quarterValues$43,
		defaultWidth: "wide",
		argumentCallback: (quarter) => quarter - 1
	}),
	month: buildLocalizeFn({
		values: monthValues$43,
		defaultWidth: "wide"
	}),
	day: buildLocalizeFn({
		values: dayValues$43,
		defaultWidth: "wide"
	}),
	dayPeriod: buildLocalizeFn({
		values: dayPeriodValues$43,
		defaultWidth: "wide",
		formattingValues: formattingDayPeriodValues$35,
		defaultFormattingWidth: "wide"
	})
};
var match$43 = {
	ordinalNumber: buildMatchPatternFn({
		matchPattern: /^(\d+)(º)?/i,
		parsePattern: /\d+/i,
		valueCallback: (value) => parseInt(value, 10)
	}),
	era: buildMatchFn({
		matchPatterns: {
			narrow: /^(aC|dC)/i,
			abbreviated: /^(a\.?\s?C\.?|a\.?\s?e\.?\s?v\.?|d\.?\s?C\.?|e\.?\s?v\.?)/i,
			wide: /^(avanti Cristo|avanti Era Volgare|dopo Cristo|Era Volgare)/i
		},
		defaultMatchWidth: "wide",
		parsePatterns: { any: [/^a/i, /^(d|e)/i] },
		defaultParseWidth: "any"
	}),
	quarter: buildMatchFn({
		matchPatterns: {
			narrow: /^[1234]/i,
			abbreviated: /^t[1234]/i,
			wide: /^[1234](º)? trimestre/i
		},
		defaultMatchWidth: "wide",
		parsePatterns: { any: [
			/1/i,
			/2/i,
			/3/i,
			/4/i
		] },
		defaultParseWidth: "any",
		valueCallback: (index) => index + 1
	}),
	month: buildMatchFn({
		matchPatterns: {
			narrow: /^[gfmalsond]/i,
			abbreviated: /^(gen|feb|mar|apr|mag|giu|lug|ago|set|ott|nov|dic)/i,
			wide: /^(gennaio|febbraio|marzo|aprile|maggio|giugno|luglio|agosto|settembre|ottobre|novembre|dicembre)/i
		},
		defaultMatchWidth: "wide",
		parsePatterns: {
			narrow: [
				/^g/i,
				/^f/i,
				/^m/i,
				/^a/i,
				/^m/i,
				/^g/i,
				/^l/i,
				/^a/i,
				/^s/i,
				/^o/i,
				/^n/i,
				/^d/i
			],
			any: [
				/^ge/i,
				/^f/i,
				/^mar/i,
				/^ap/i,
				/^mag/i,
				/^gi/i,
				/^l/i,
				/^ag/i,
				/^s/i,
				/^o/i,
				/^n/i,
				/^d/i
			]
		},
		defaultParseWidth: "any"
	}),
	day: buildMatchFn({
		matchPatterns: {
			narrow: /^[dlmgvs]/i,
			short: /^(do|lu|ma|me|gi|ve|sa)/i,
			abbreviated: /^(dom|lun|mar|mer|gio|ven|sab)/i,
			wide: /^(domenica|luned[i|ì]|marted[i|ì]|mercoled[i|ì]|gioved[i|ì]|venerd[i|ì]|sabato)/i
		},
		defaultMatchWidth: "wide",
		parsePatterns: {
			narrow: [
				/^d/i,
				/^l/i,
				/^m/i,
				/^m/i,
				/^g/i,
				/^v/i,
				/^s/i
			],
			any: [
				/^d/i,
				/^l/i,
				/^ma/i,
				/^me/i,
				/^g/i,
				/^v/i,
				/^s/i
			]
		},
		defaultParseWidth: "any"
	}),
	dayPeriod: buildMatchFn({
		matchPatterns: {
			narrow: /^(a|m\.|p|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i,
			any: /^([ap]\.?\s?m\.?|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i
		},
		defaultMatchWidth: "any",
		parsePatterns: { any: {
			am: /^a/i,
			pm: /^p/i,
			midnight: /^mezza/i,
			noon: /^mezzo/i,
			morning: /mattina/i,
			afternoon: /pomeriggio/i,
			evening: /sera/i,
			night: /notte/i
		} },
		defaultParseWidth: "any"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/it.js
/**
* @category Locales
* @summary Italian locale.
* @language Italian
* @iso-639-2 ita
* @author Alberto Restifo [@albertorestifo](https://github.com/albertorestifo)
* @author Giovanni Polimeni [@giofilo](https://github.com/giofilo)
* @author Vincenzo Carrese [@vin-car](https://github.com/vin-car)
*/
var it = {
	code: "it",
	formatDistance: formatDistance$43,
	formatLong: formatLong$44,
	formatRelative: formatRelative$43,
	localize: localize$43,
	match: match$43,
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/it-CH.js
/**
* @category Locales
* @summary Italian locale (Switzerland).
* @language Italian
* @iso-639-2 ita
* @author Mike Peyer [@maic66](https://github.com/maic66)
*/
var itCH = {
	code: "it-CH",
	formatDistance: formatDistance$43,
	formatLong: {
		date: buildFormatLongFn({
			formats: {
				full: "EEEE d MMMM y",
				long: "d MMMM y",
				medium: "d MMM y",
				short: "dd.MM.y"
			},
			defaultWidth: "full"
		}),
		time: buildFormatLongFn({
			formats: {
				full: "HH:mm:ss zzzz",
				long: "HH:mm:ss z",
				medium: "HH:mm:ss",
				short: "HH:mm"
			},
			defaultWidth: "full"
		}),
		dateTime: buildFormatLongFn({
			formats: {
				full: "{{date}} {{time}}",
				long: "{{date}} {{time}}",
				medium: "{{date}} {{time}}",
				short: "{{date}} {{time}}"
			},
			defaultWidth: "full"
		})
	},
	formatRelative: formatRelative$43,
	localize: localize$43,
	match: match$43,
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/ja/_lib/formatDistance.js
var formatDistanceLocale$42 = {
	lessThanXSeconds: {
		one: "1秒未満",
		other: "{{count}}秒未満",
		oneWithSuffix: "約1秒",
		otherWithSuffix: "約{{count}}秒"
	},
	xSeconds: {
		one: "1秒",
		other: "{{count}}秒"
	},
	halfAMinute: "30秒",
	lessThanXMinutes: {
		one: "1分未満",
		other: "{{count}}分未満",
		oneWithSuffix: "約1分",
		otherWithSuffix: "約{{count}}分"
	},
	xMinutes: {
		one: "1分",
		other: "{{count}}分"
	},
	aboutXHours: {
		one: "約1時間",
		other: "約{{count}}時間"
	},
	xHours: {
		one: "1時間",
		other: "{{count}}時間"
	},
	xDays: {
		one: "1日",
		other: "{{count}}日"
	},
	aboutXWeeks: {
		one: "約1週間",
		other: "約{{count}}週間"
	},
	xWeeks: {
		one: "1週間",
		other: "{{count}}週間"
	},
	aboutXMonths: {
		one: "約1か月",
		other: "約{{count}}か月"
	},
	xMonths: {
		one: "1か月",
		other: "{{count}}か月"
	},
	aboutXYears: {
		one: "約1年",
		other: "約{{count}}年"
	},
	xYears: {
		one: "1年",
		other: "{{count}}年"
	},
	overXYears: {
		one: "1年以上",
		other: "{{count}}年以上"
	},
	almostXYears: {
		one: "1年近く",
		other: "{{count}}年近く"
	}
};
var formatDistance$42 = (token, count, options) => {
	options = options || {};
	let result;
	const tokenValue = formatDistanceLocale$42[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) if (options.addSuffix && tokenValue.oneWithSuffix) result = tokenValue.oneWithSuffix;
	else result = tokenValue.one;
	else if (options.addSuffix && tokenValue.otherWithSuffix) result = tokenValue.otherWithSuffix.replace("{{count}}", String(count));
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options.addSuffix) if (options.comparison && options.comparison > 0) return result + "後";
	else return result + "前";
	return result;
};
var formatLong$42 = {
	date: buildFormatLongFn({
		formats: {
			full: "y年M月d日EEEE",
			long: "y年M月d日",
			medium: "y/MM/dd",
			short: "y/MM/dd"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "H時mm分ss秒 zzzz",
			long: "H:mm:ss z",
			medium: "H:mm:ss",
			short: "H:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} {{time}}",
			long: "{{date}} {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/ja/_lib/formatRelative.js
var formatRelativeLocale$42 = {
	lastWeek: "先週のeeeeのp",
	yesterday: "昨日のp",
	today: "今日のp",
	tomorrow: "明日のp",
	nextWeek: "翌週のeeeeのp",
	other: "P"
};
var formatRelative$42 = (token, _date, _baseDate, _options) => {
	return formatRelativeLocale$42[token];
};
//#endregion
//#region ../../node_modules/date-fns/locale/ja/_lib/localize.js
var eraValues$42 = {
	narrow: ["BC", "AC"],
	abbreviated: ["紀元前", "西暦"],
	wide: ["紀元前", "西暦"]
};
var quarterValues$42 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"Q1",
		"Q2",
		"Q3",
		"Q4"
	],
	wide: [
		"第1四半期",
		"第2四半期",
		"第3四半期",
		"第4四半期"
	]
};
var monthValues$42 = {
	narrow: [
		"1",
		"2",
		"3",
		"4",
		"5",
		"6",
		"7",
		"8",
		"9",
		"10",
		"11",
		"12"
	],
	abbreviated: [
		"1月",
		"2月",
		"3月",
		"4月",
		"5月",
		"6月",
		"7月",
		"8月",
		"9月",
		"10月",
		"11月",
		"12月"
	],
	wide: [
		"1月",
		"2月",
		"3月",
		"4月",
		"5月",
		"6月",
		"7月",
		"8月",
		"9月",
		"10月",
		"11月",
		"12月"
	]
};
var dayValues$42 = {
	narrow: [
		"日",
		"月",
		"火",
		"水",
		"木",
		"金",
		"土"
	],
	short: [
		"日",
		"月",
		"火",
		"水",
		"木",
		"金",
		"土"
	],
	abbreviated: [
		"日",
		"月",
		"火",
		"水",
		"木",
		"金",
		"土"
	],
	wide: [
		"日曜日",
		"月曜日",
		"火曜日",
		"水曜日",
		"木曜日",
		"金曜日",
		"土曜日"
	]
};
var dayPeriodValues$42 = {
	narrow: {
		am: "午前",
		pm: "午後",
		midnight: "深夜",
		noon: "正午",
		morning: "朝",
		afternoon: "午後",
		evening: "夜",
		night: "深夜"
	},
	abbreviated: {
		am: "午前",
		pm: "午後",
		midnight: "深夜",
		noon: "正午",
		morning: "朝",
		afternoon: "午後",
		evening: "夜",
		night: "深夜"
	},
	wide: {
		am: "午前",
		pm: "午後",
		midnight: "深夜",
		noon: "正午",
		morning: "朝",
		afternoon: "午後",
		evening: "夜",
		night: "深夜"
	}
};
var formattingDayPeriodValues$34 = {
	narrow: {
		am: "午前",
		pm: "午後",
		midnight: "深夜",
		noon: "正午",
		morning: "朝",
		afternoon: "午後",
		evening: "夜",
		night: "深夜"
	},
	abbreviated: {
		am: "午前",
		pm: "午後",
		midnight: "深夜",
		noon: "正午",
		morning: "朝",
		afternoon: "午後",
		evening: "夜",
		night: "深夜"
	},
	wide: {
		am: "午前",
		pm: "午後",
		midnight: "深夜",
		noon: "正午",
		morning: "朝",
		afternoon: "午後",
		evening: "夜",
		night: "深夜"
	}
};
var ordinalNumber$42 = (dirtyNumber, options) => {
	const number = Number(dirtyNumber);
	switch (String(options?.unit)) {
		case "year": return `${number}年`;
		case "quarter": return `第${number}四半期`;
		case "month": return `${number}月`;
		case "week": return `第${number}週`;
		case "date": return `${number}日`;
		case "hour": return `${number}時`;
		case "minute": return `${number}分`;
		case "second": return `${number}秒`;
		default: return `${number}`;
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/ja.js
/**
* @category Locales
* @summary Japanese locale.
* @language Japanese
* @iso-639-2 jpn
* @author Thomas Eilmsteiner [@DeMuu](https://github.com/DeMuu)
* @author Yamagishi Kazutoshi [@ykzts](https://github.com/ykzts)
* @author Luca Ban [@mesqueeb](https://github.com/mesqueeb)
* @author Terrence Lam [@skyuplam](https://github.com/skyuplam)
* @author Taiki IKeda [@so99ynoodles](https://github.com/so99ynoodles)
*/
var ja = {
	code: "ja",
	formatDistance: formatDistance$42,
	formatLong: formatLong$42,
	formatRelative: formatRelative$42,
	localize: {
		ordinalNumber: ordinalNumber$42,
		era: buildLocalizeFn({
			values: eraValues$42,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$42,
			defaultWidth: "wide",
			argumentCallback: (quarter) => Number(quarter) - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$42,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$42,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$42,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$34,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^第?\d+(年|四半期|月|週|日|時|分|秒)?/i,
			parsePattern: /\d+/i,
			valueCallback: function(value) {
				return parseInt(value, 10);
			}
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(B\.?C\.?|A\.?D\.?)/i,
				abbreviated: /^(紀元[前後]|西暦)/i,
				wide: /^(紀元[前後]|西暦)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [/^B/i, /^A/i],
				any: [/^(紀元前)/i, /^(西暦|紀元後)/i]
			},
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^Q[1234]/i,
				wide: /^第[1234一二三四１２３４]四半期/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/(1|一|１)/i,
				/(2|二|２)/i,
				/(3|三|３)/i,
				/(4|四|４)/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^([123456789]|1[012])/,
				abbreviated: /^([123456789]|1[012])月/i,
				wide: /^([123456789]|1[012])月/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/^1\D/,
				/^2/,
				/^3/,
				/^4/,
				/^5/,
				/^6/,
				/^7/,
				/^8/,
				/^9/,
				/^10/,
				/^11/,
				/^12/
			] },
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[日月火水木金土]/,
				short: /^[日月火水木金土]/,
				abbreviated: /^[日月火水木金土]/,
				wide: /^[日月火水木金土]曜日/
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/^日/,
				/^月/,
				/^火/,
				/^水/,
				/^木/,
				/^金/,
				/^土/
			] },
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: { any: /^(AM|PM|午前|午後|正午|深夜|真夜中|夜|朝)/i },
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^(A|午前)/i,
				pm: /^(P|午後)/i,
				midnight: /^深夜|真夜中/i,
				noon: /^正午/i,
				morning: /^朝/i,
				afternoon: /^午後/i,
				evening: /^夜/i,
				night: /^深夜/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 0,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/ja-Hira/_lib/formatDistance.js
var formatDistanceLocale$41 = {
	lessThanXSeconds: {
		one: "1びょうみまん",
		other: "{{count}}びょうみまん",
		oneWithSuffix: "やく1びょう",
		otherWithSuffix: "やく{{count}}びょう"
	},
	xSeconds: {
		one: "1びょう",
		other: "{{count}}びょう"
	},
	halfAMinute: "30びょう",
	lessThanXMinutes: {
		one: "1ぷんみまん",
		other: "{{count}}ふんみまん",
		oneWithSuffix: "やく1ぷん",
		otherWithSuffix: "やく{{count}}ふん"
	},
	xMinutes: {
		one: "1ぷん",
		other: "{{count}}ふん"
	},
	aboutXHours: {
		one: "やく1じかん",
		other: "やく{{count}}じかん"
	},
	xHours: {
		one: "1じかん",
		other: "{{count}}じかん"
	},
	xDays: {
		one: "1にち",
		other: "{{count}}にち"
	},
	aboutXWeeks: {
		one: "やく1しゅうかん",
		other: "やく{{count}}しゅうかん"
	},
	xWeeks: {
		one: "1しゅうかん",
		other: "{{count}}しゅうかん"
	},
	aboutXMonths: {
		one: "やく1かげつ",
		other: "やく{{count}}かげつ"
	},
	xMonths: {
		one: "1かげつ",
		other: "{{count}}かげつ"
	},
	aboutXYears: {
		one: "やく1ねん",
		other: "やく{{count}}ねん"
	},
	xYears: {
		one: "1ねん",
		other: "{{count}}ねん"
	},
	overXYears: {
		one: "1ねんいじょう",
		other: "{{count}}ねんいじょう"
	},
	almostXYears: {
		one: "1ねんちかく",
		other: "{{count}}ねんちかく"
	}
};
var formatDistance$41 = (token, count, options) => {
	options = options || {};
	let result;
	const tokenValue = formatDistanceLocale$41[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) if (options.addSuffix && tokenValue.oneWithSuffix) result = tokenValue.oneWithSuffix;
	else result = tokenValue.one;
	else if (options.addSuffix && tokenValue.otherWithSuffix) result = tokenValue.otherWithSuffix.replace("{{count}}", String(count));
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options.addSuffix) if (options.comparison && options.comparison > 0) return result + "あと";
	else return result + "まえ";
	return result;
};
var formatLong$41 = {
	date: buildFormatLongFn({
		formats: {
			full: "yねんMがつdにちEEEE",
			long: "yねんMがつdにち",
			medium: "y/MM/dd",
			short: "y/MM/dd"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "Hじmmふんssびょう zzzz",
			long: "H:mm:ss z",
			medium: "H:mm:ss",
			short: "H:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} {{time}}",
			long: "{{date}} {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/ja-Hira/_lib/formatRelative.js
var formatRelativeLocale$41 = {
	lastWeek: "せんしゅうのeeeeのp",
	yesterday: "きのうのp",
	today: "きょうのp",
	tomorrow: "あしたのp",
	nextWeek: "よくしゅうのeeeeのp",
	other: "P"
};
var formatRelative$41 = (token, _date, _baseDate, _options) => {
	return formatRelativeLocale$41[token];
};
//#endregion
//#region ../../node_modules/date-fns/locale/ja-Hira/_lib/localize.js
var eraValues$41 = {
	narrow: ["BC", "AC"],
	abbreviated: ["きげんぜん", "せいれき"],
	wide: ["きげんぜん", "せいれき"]
};
var quarterValues$41 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"Q1",
		"Q2",
		"Q3",
		"Q4"
	],
	wide: [
		"だい1しはんき",
		"だい2しはんき",
		"だい3しはんき",
		"だい4しはんき"
	]
};
var monthValues$41 = {
	narrow: [
		"1",
		"2",
		"3",
		"4",
		"5",
		"6",
		"7",
		"8",
		"9",
		"10",
		"11",
		"12"
	],
	abbreviated: [
		"1がつ",
		"2がつ",
		"3がつ",
		"4がつ",
		"5がつ",
		"6がつ",
		"7がつ",
		"8がつ",
		"9がつ",
		"10がつ",
		"11がつ",
		"12がつ"
	],
	wide: [
		"1がつ",
		"2がつ",
		"3がつ",
		"4がつ",
		"5がつ",
		"6がつ",
		"7がつ",
		"8がつ",
		"9がつ",
		"10がつ",
		"11がつ",
		"12がつ"
	]
};
var dayValues$41 = {
	narrow: [
		"にち",
		"げつ",
		"か",
		"すい",
		"もく",
		"きん",
		"ど"
	],
	short: [
		"にち",
		"げつ",
		"か",
		"すい",
		"もく",
		"きん",
		"ど"
	],
	abbreviated: [
		"にち",
		"げつ",
		"か",
		"すい",
		"もく",
		"きん",
		"ど"
	],
	wide: [
		"にちようび",
		"げつようび",
		"かようび",
		"すいようび",
		"もくようび",
		"きんようび",
		"どようび"
	]
};
var dayPeriodValues$41 = {
	narrow: {
		am: "ごぜん",
		pm: "ごご",
		midnight: "しんや",
		noon: "しょうご",
		morning: "あさ",
		afternoon: "ごご",
		evening: "よる",
		night: "しんや"
	},
	abbreviated: {
		am: "ごぜん",
		pm: "ごご",
		midnight: "しんや",
		noon: "しょうご",
		morning: "あさ",
		afternoon: "ごご",
		evening: "よる",
		night: "しんや"
	},
	wide: {
		am: "ごぜん",
		pm: "ごご",
		midnight: "しんや",
		noon: "しょうご",
		morning: "あさ",
		afternoon: "ごご",
		evening: "よる",
		night: "しんや"
	}
};
var formattingDayPeriodValues$33 = {
	narrow: {
		am: "ごぜん",
		pm: "ごご",
		midnight: "しんや",
		noon: "しょうご",
		morning: "あさ",
		afternoon: "ごご",
		evening: "よる",
		night: "しんや"
	},
	abbreviated: {
		am: "ごぜん",
		pm: "ごご",
		midnight: "しんや",
		noon: "しょうご",
		morning: "あさ",
		afternoon: "ごご",
		evening: "よる",
		night: "しんや"
	},
	wide: {
		am: "ごぜん",
		pm: "ごご",
		midnight: "しんや",
		noon: "しょうご",
		morning: "あさ",
		afternoon: "ごご",
		evening: "よる",
		night: "しんや"
	}
};
var ordinalNumber$41 = (dirtyNumber, options) => {
	const number = Number(dirtyNumber);
	switch (String(options?.unit)) {
		case "year": return `${number}ねん`;
		case "quarter": return `だい${number}しはんき`;
		case "month": return `${number}がつ`;
		case "week": return `だい${number}しゅう`;
		case "date": return `${number}にち`;
		case "hour": return `${number}じ`;
		case "minute": return `${number}ふん`;
		case "second": return `${number}びょう`;
		default: return `${number}`;
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/ja-Hira.js
/**
* @category Locales
* @summary Japanese (Hiragana) locale.
* @language Japanese (Hiragana)
* @iso-639-2 jpn
* @author Eri Hiramatsu [@Eritutteo](https://github.com/Eritutteo)
*/
var jaHira = {
	code: "ja-Hira",
	formatDistance: formatDistance$41,
	formatLong: formatLong$41,
	formatRelative: formatRelative$41,
	localize: {
		ordinalNumber: ordinalNumber$41,
		era: buildLocalizeFn({
			values: eraValues$41,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$41,
			defaultWidth: "wide",
			argumentCallback: (quarter) => Number(quarter) - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$41,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$41,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$41,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$33,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^だ?い?\d+(ねん|しはんき|がつ|しゅう|にち|じ|ふん|びょう)?/i,
			parsePattern: /\d+/i,
			valueCallback: function(value) {
				return parseInt(value, 10);
			}
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(B\.?C\.?|A\.?D\.?)/i,
				abbreviated: /^(きげん[前後]|せいれき)/i,
				wide: /^(きげん[前後]|せいれき)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [/^B/i, /^A/i],
				any: [/^(きげんぜん)/i, /^(せいれき|きげんご)/i]
			},
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^Q[1234]/i,
				wide: /^だい[1234一二三四１２３４]しはんき/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/(1|一|１)/i,
				/(2|二|２)/i,
				/(3|三|３)/i,
				/(4|四|４)/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^([123456789]|1[012])/,
				abbreviated: /^([123456789]|1[012])がつ/i,
				wide: /^([123456789]|1[012])がつ/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/^1\D/,
				/^2/,
				/^3/,
				/^4/,
				/^5/,
				/^6/,
				/^7/,
				/^8/,
				/^9/,
				/^10/,
				/^11/,
				/^12/
			] },
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^(にち|げつ|か|すい|もく|きん|ど)/,
				short: /^(にち|げつ|か|すい|もく|きん|ど)/,
				abbreviated: /^(にち|げつ|か|すい|もく|きん|ど)/,
				wide: /^(にち|げつ|か|すい|もく|きん|ど)ようび/
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/^にち/,
				/^げつ/,
				/^か/,
				/^すい/,
				/^もく/,
				/^きん/,
				/^ど/
			] },
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: { any: /^(AM|PM|ごぜん|ごご|しょうご|しんや|まよなか|よる|あさ)/i },
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^(A|ごぜん)/i,
				pm: /^(P|ごご)/i,
				midnight: /^しんや|まよなか/i,
				noon: /^しょうご/i,
				morning: /^あさ/i,
				afternoon: /^ごご/i,
				evening: /^よる/i,
				night: /^しんや/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 0,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/ka/_lib/formatDistance.js
var formatDistanceLocale$40 = {
	lessThanXSeconds: {
		past: "{{count}} წამზე ნაკლები ხნის წინ",
		present: "{{count}} წამზე ნაკლები",
		future: "{{count}} წამზე ნაკლებში"
	},
	xSeconds: {
		past: "{{count}} წამის წინ",
		present: "{{count}} წამი",
		future: "{{count}} წამში"
	},
	halfAMinute: {
		past: "ნახევარი წუთის წინ",
		present: "ნახევარი წუთი",
		future: "ნახევარი წუთში"
	},
	lessThanXMinutes: {
		past: "{{count}} წუთზე ნაკლები ხნის წინ",
		present: "{{count}} წუთზე ნაკლები",
		future: "{{count}} წუთზე ნაკლებში"
	},
	xMinutes: {
		past: "{{count}} წუთის წინ",
		present: "{{count}} წუთი",
		future: "{{count}} წუთში"
	},
	aboutXHours: {
		past: "დაახლოებით {{count}} საათის წინ",
		present: "დაახლოებით {{count}} საათი",
		future: "დაახლოებით {{count}} საათში"
	},
	xHours: {
		past: "{{count}} საათის წინ",
		present: "{{count}} საათი",
		future: "{{count}} საათში"
	},
	xDays: {
		past: "{{count}} დღის წინ",
		present: "{{count}} დღე",
		future: "{{count}} დღეში"
	},
	aboutXWeeks: {
		past: "დაახლოებით {{count}} კვირას წინ",
		present: "დაახლოებით {{count}} კვირა",
		future: "დაახლოებით {{count}} კვირაში"
	},
	xWeeks: {
		past: "{{count}} კვირას კვირა",
		present: "{{count}} კვირა",
		future: "{{count}} კვირაში"
	},
	aboutXMonths: {
		past: "დაახლოებით {{count}} თვის წინ",
		present: "დაახლოებით {{count}} თვე",
		future: "დაახლოებით {{count}} თვეში"
	},
	xMonths: {
		past: "{{count}} თვის წინ",
		present: "{{count}} თვე",
		future: "{{count}} თვეში"
	},
	aboutXYears: {
		past: "დაახლოებით {{count}} წლის წინ",
		present: "დაახლოებით {{count}} წელი",
		future: "დაახლოებით {{count}} წელში"
	},
	xYears: {
		past: "{{count}} წლის წინ",
		present: "{{count}} წელი",
		future: "{{count}} წელში"
	},
	overXYears: {
		past: "{{count}} წელზე მეტი ხნის წინ",
		present: "{{count}} წელზე მეტი",
		future: "{{count}} წელზე მეტი ხნის შემდეგ"
	},
	almostXYears: {
		past: "თითქმის {{count}} წლის წინ",
		present: "თითქმის {{count}} წელი",
		future: "თითქმის {{count}} წელში"
	}
};
var formatDistance$40 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$40[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (options?.addSuffix && options.comparison && options.comparison > 0) result = tokenValue.future.replace("{{count}}", String(count));
	else if (options?.addSuffix) result = tokenValue.past.replace("{{count}}", String(count));
	else result = tokenValue.present.replace("{{count}}", String(count));
	return result;
};
var formatLong$40 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, do MMMM, y",
			long: "do, MMMM, y",
			medium: "d, MMM, y",
			short: "dd/MM/yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "h:mm:ss a zzzz",
			long: "h:mm:ss a z",
			medium: "h:mm:ss a",
			short: "h:mm a"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} {{time}}'-ზე'",
			long: "{{date}} {{time}}'-ზე'",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/ka/_lib/formatRelative.js
var formatRelativeLocale$40 = {
	lastWeek: "'წინა' eeee p'-ზე'",
	yesterday: "'გუშინ' p'-ზე'",
	today: "'დღეს' p'-ზე'",
	tomorrow: "'ხვალ' p'-ზე'",
	nextWeek: "'შემდეგი' eeee p'-ზე'",
	other: "P"
};
var formatRelative$40 = (token, _date, _baseDate, _options) => formatRelativeLocale$40[token];
//#endregion
//#region ../../node_modules/date-fns/locale/ka/_lib/localize.js
var eraValues$40 = {
	narrow: ["ჩ.წ-მდე", "ჩ.წ"],
	abbreviated: ["ჩვ.წ-მდე", "ჩვ.წ"],
	wide: ["ჩვენს წელთაღრიცხვამდე", "ჩვენი წელთაღრიცხვით"]
};
var quarterValues$40 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"1-ლი კვ",
		"2-ე კვ",
		"3-ე კვ",
		"4-ე კვ"
	],
	wide: [
		"1-ლი კვარტალი",
		"2-ე კვარტალი",
		"3-ე კვარტალი",
		"4-ე კვარტალი"
	]
};
var monthValues$40 = {
	narrow: [
		"ია",
		"თე",
		"მა",
		"აპ",
		"მს",
		"ვნ",
		"ვლ",
		"აგ",
		"სე",
		"ოქ",
		"ნო",
		"დე"
	],
	abbreviated: [
		"იან",
		"თებ",
		"მარ",
		"აპრ",
		"მაი",
		"ივნ",
		"ივლ",
		"აგვ",
		"სექ",
		"ოქტ",
		"ნოე",
		"დეკ"
	],
	wide: [
		"იანვარი",
		"თებერვალი",
		"მარტი",
		"აპრილი",
		"მაისი",
		"ივნისი",
		"ივლისი",
		"აგვისტო",
		"სექტემბერი",
		"ოქტომბერი",
		"ნოემბერი",
		"დეკემბერი"
	]
};
var dayValues$40 = {
	narrow: [
		"კვ",
		"ორ",
		"სა",
		"ოთ",
		"ხუ",
		"პა",
		"შა"
	],
	short: [
		"კვი",
		"ორშ",
		"სამ",
		"ოთხ",
		"ხუთ",
		"პარ",
		"შაბ"
	],
	abbreviated: [
		"კვი",
		"ორშ",
		"სამ",
		"ოთხ",
		"ხუთ",
		"პარ",
		"შაბ"
	],
	wide: [
		"კვირა",
		"ორშაბათი",
		"სამშაბათი",
		"ოთხშაბათი",
		"ხუთშაბათი",
		"პარასკევი",
		"შაბათი"
	]
};
var dayPeriodValues$40 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "შუაღამე",
		noon: "შუადღე",
		morning: "დილა",
		afternoon: "საღამო",
		evening: "საღამო",
		night: "ღამე"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "შუაღამე",
		noon: "შუადღე",
		morning: "დილა",
		afternoon: "საღამო",
		evening: "საღამო",
		night: "ღამე"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "შუაღამე",
		noon: "შუადღე",
		morning: "დილა",
		afternoon: "საღამო",
		evening: "საღამო",
		night: "ღამე"
	}
};
var formattingDayPeriodValues$32 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "შუაღამით",
		noon: "შუადღისას",
		morning: "დილით",
		afternoon: "ნაშუადღევს",
		evening: "საღამოს",
		night: "ღამით"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "შუაღამით",
		noon: "შუადღისას",
		morning: "დილით",
		afternoon: "ნაშუადღევს",
		evening: "საღამოს",
		night: "ღამით"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "შუაღამით",
		noon: "შუადღისას",
		morning: "დილით",
		afternoon: "ნაშუადღევს",
		evening: "საღამოს",
		night: "ღამით"
	}
};
var ordinalNumber$40 = (dirtyNumber) => {
	const number = Number(dirtyNumber);
	if (number === 1) return number + "-ლი";
	return number + "-ე";
};
//#endregion
//#region ../../node_modules/date-fns/locale/ka.js
/**
* @category Locales
* @summary Georgian locale.
* @language Georgian
* @iso-639-2 geo
* @author Lado Lomidze [@Landish](https://github.com/Landish)
* @author Nick Shvelidze [@shvelo](https://github.com/shvelo)
*/
var ka = {
	code: "ka",
	formatDistance: formatDistance$40,
	formatLong: formatLong$40,
	formatRelative: formatRelative$40,
	localize: {
		ordinalNumber: ordinalNumber$40,
		era: buildLocalizeFn({
			values: eraValues$40,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$40,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$40,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$40,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$40,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$32,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(-ლი|-ე)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(ჩვ?\.წ)/i,
				abbreviated: /^(ჩვ?\.წ)/i,
				wide: /^(ჩვენს წელთაღრიცხვამდე|ქრისტეშობამდე|ჩვენი წელთაღრიცხვით|ქრისტეშობიდან)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^(ჩვენს წელთაღრიცხვამდე|ქრისტეშობამდე)/i, /^(ჩვენი წელთაღრიცხვით|ქრისტეშობიდან)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^[1234]-(ლი|ე)? კვ/i,
				wide: /^[1234]-(ლი|ე)? კვარტალი/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: { any: /^(ია|თე|მა|აპ|მს|ვნ|ვლ|აგ|სე|ოქ|ნო|დე)/i },
			defaultMatchWidth: "any",
			parsePatterns: { any: [
				/^ია/i,
				/^თ/i,
				/^მარ/i,
				/^აპ/i,
				/^მაი/i,
				/^ი?ვნ/i,
				/^ი?ვლ/i,
				/^აგ/i,
				/^ს/i,
				/^ო/i,
				/^ნ/i,
				/^დ/i
			] },
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^(კვ|ორ|სა|ოთ|ხუ|პა|შა)/i,
				short: /^(კვი|ორშ|სამ|ოთხ|ხუთ|პარ|შაბ)/i,
				wide: /^(კვირა|ორშაბათი|სამშაბათი|ოთხშაბათი|ხუთშაბათი|პარასკევი|შაბათი)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/^კვ/i,
				/^ორ/i,
				/^სა/i,
				/^ოთ/i,
				/^ხუ/i,
				/^პა/i,
				/^შა/i
			] },
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: { any: /^([ap]\.?\s?m\.?|შუაღ|დილ)/i },
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a/i,
				pm: /^p/i,
				midnight: /^შუაღ/i,
				noon: /^შუადღ/i,
				morning: /^დილ/i,
				afternoon: /ნაშუადღევს/i,
				evening: /საღამო/i,
				night: /ღამ/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/kk/_lib/formatDistance.js
var formatDistanceLocale$39 = {
	lessThanXSeconds: {
		regular: {
			one: "1 секундтан аз",
			singularNominative: "{{count}} секундтан аз",
			singularGenitive: "{{count}} секундтан аз",
			pluralGenitive: "{{count}} секундтан аз"
		},
		future: {
			one: "бір секундтан кейін",
			singularNominative: "{{count}} секундтан кейін",
			singularGenitive: "{{count}} секундтан кейін",
			pluralGenitive: "{{count}} секундтан кейін"
		}
	},
	xSeconds: {
		regular: {
			singularNominative: "{{count}} секунд",
			singularGenitive: "{{count}} секунд",
			pluralGenitive: "{{count}} секунд"
		},
		past: {
			singularNominative: "{{count}} секунд бұрын",
			singularGenitive: "{{count}} секунд бұрын",
			pluralGenitive: "{{count}} секунд бұрын"
		},
		future: {
			singularNominative: "{{count}} секундтан кейін",
			singularGenitive: "{{count}} секундтан кейін",
			pluralGenitive: "{{count}} секундтан кейін"
		}
	},
	halfAMinute: (options) => {
		if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "жарты минут ішінде";
		else return "жарты минут бұрын";
		return "жарты минут";
	},
	lessThanXMinutes: {
		regular: {
			one: "1 минуттан аз",
			singularNominative: "{{count}} минуттан аз",
			singularGenitive: "{{count}} минуттан аз",
			pluralGenitive: "{{count}} минуттан аз"
		},
		future: {
			one: "минуттан кем ",
			singularNominative: "{{count}} минуттан кем",
			singularGenitive: "{{count}} минуттан кем",
			pluralGenitive: "{{count}} минуттан кем"
		}
	},
	xMinutes: {
		regular: {
			singularNominative: "{{count}} минут",
			singularGenitive: "{{count}} минут",
			pluralGenitive: "{{count}} минут"
		},
		past: {
			singularNominative: "{{count}} минут бұрын",
			singularGenitive: "{{count}} минут бұрын",
			pluralGenitive: "{{count}} минут бұрын"
		},
		future: {
			singularNominative: "{{count}} минуттан кейін",
			singularGenitive: "{{count}} минуттан кейін",
			pluralGenitive: "{{count}} минуттан кейін"
		}
	},
	aboutXHours: {
		regular: {
			singularNominative: "шамамен {{count}} сағат",
			singularGenitive: "шамамен {{count}} сағат",
			pluralGenitive: "шамамен {{count}} сағат"
		},
		future: {
			singularNominative: "шамамен {{count}} сағаттан кейін",
			singularGenitive: "шамамен {{count}} сағаттан кейін",
			pluralGenitive: "шамамен {{count}} сағаттан кейін"
		}
	},
	xHours: { regular: {
		singularNominative: "{{count}} сағат",
		singularGenitive: "{{count}} сағат",
		pluralGenitive: "{{count}} сағат"
	} },
	xDays: {
		regular: {
			singularNominative: "{{count}} күн",
			singularGenitive: "{{count}} күн",
			pluralGenitive: "{{count}} күн"
		},
		future: {
			singularNominative: "{{count}} күннен кейін",
			singularGenitive: "{{count}} күннен кейін",
			pluralGenitive: "{{count}} күннен кейін"
		}
	},
	aboutXWeeks: {
		type: "weeks",
		one: "шамамен 1 апта",
		other: "шамамен {{count}} апта"
	},
	xWeeks: {
		type: "weeks",
		one: "1 апта",
		other: "{{count}} апта"
	},
	aboutXMonths: {
		regular: {
			singularNominative: "шамамен {{count}} ай",
			singularGenitive: "шамамен {{count}} ай",
			pluralGenitive: "шамамен {{count}} ай"
		},
		future: {
			singularNominative: "шамамен {{count}} айдан кейін",
			singularGenitive: "шамамен {{count}} айдан кейін",
			pluralGenitive: "шамамен {{count}} айдан кейін"
		}
	},
	xMonths: { regular: {
		singularNominative: "{{count}} ай",
		singularGenitive: "{{count}} ай",
		pluralGenitive: "{{count}} ай"
	} },
	aboutXYears: {
		regular: {
			singularNominative: "шамамен {{count}} жыл",
			singularGenitive: "шамамен {{count}} жыл",
			pluralGenitive: "шамамен {{count}} жыл"
		},
		future: {
			singularNominative: "шамамен {{count}} жылдан кейін",
			singularGenitive: "шамамен {{count}} жылдан кейін",
			pluralGenitive: "шамамен {{count}} жылдан кейін"
		}
	},
	xYears: {
		regular: {
			singularNominative: "{{count}} жыл",
			singularGenitive: "{{count}} жыл",
			pluralGenitive: "{{count}} жыл"
		},
		future: {
			singularNominative: "{{count}} жылдан кейін",
			singularGenitive: "{{count}} жылдан кейін",
			pluralGenitive: "{{count}} жылдан кейін"
		}
	},
	overXYears: {
		regular: {
			singularNominative: "{{count}} жылдан астам",
			singularGenitive: "{{count}} жылдан астам",
			pluralGenitive: "{{count}} жылдан астам"
		},
		future: {
			singularNominative: "{{count}} жылдан астам",
			singularGenitive: "{{count}} жылдан астам",
			pluralGenitive: "{{count}} жылдан астам"
		}
	},
	almostXYears: {
		regular: {
			singularNominative: "{{count}} жылға жақын",
			singularGenitive: "{{count}} жылға жақын",
			pluralGenitive: "{{count}} жылға жақын"
		},
		future: {
			singularNominative: "{{count}} жылдан кейін",
			singularGenitive: "{{count}} жылдан кейін",
			pluralGenitive: "{{count}} жылдан кейін"
		}
	}
};
function declension$4(scheme, count) {
	if (scheme.one && count === 1) return scheme.one;
	const rem10 = count % 10;
	const rem100 = count % 100;
	if (rem10 === 1 && rem100 !== 11) return scheme.singularNominative.replace("{{count}}", String(count));
	else if (rem10 >= 2 && rem10 <= 4 && (rem100 < 10 || rem100 > 20)) return scheme.singularGenitive.replace("{{count}}", String(count));
	else return scheme.pluralGenitive.replace("{{count}}", String(count));
}
var formatDistance$39 = (token, count, options) => {
	const tokenValue = formatDistanceLocale$39[token];
	if (typeof tokenValue === "function") return tokenValue(options);
	if (tokenValue.type === "weeks") return count === 1 ? tokenValue.one : tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) if (tokenValue.future) return declension$4(tokenValue.future, count);
	else return declension$4(tokenValue.regular, count) + " кейін";
	else if (tokenValue.past) return declension$4(tokenValue.past, count);
	else return declension$4(tokenValue.regular, count) + " бұрын";
	else return declension$4(tokenValue.regular, count);
};
var formatLong$39 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, do MMMM y 'ж.'",
			long: "do MMMM y 'ж.'",
			medium: "d MMM y 'ж.'",
			short: "dd.MM.yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "H:mm:ss zzzz",
			long: "H:mm:ss z",
			medium: "H:mm:ss",
			short: "H:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: { any: "{{date}}, {{time}}" },
		defaultWidth: "any"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/kk/_lib/formatRelative.js
var accusativeWeekdays$3 = [
	"жексенбіде",
	"дүйсенбіде",
	"сейсенбіде",
	"сәрсенбіде",
	"бейсенбіде",
	"жұмада",
	"сенбіде"
];
function lastWeek$4(day) {
	return "'өткен " + accusativeWeekdays$3[day] + " сағат' p'-де'";
}
function thisWeek$4(day) {
	return "'" + accusativeWeekdays$3[day] + " сағат' p'-де'";
}
function nextWeek$4(day) {
	return "'келесі " + accusativeWeekdays$3[day] + " сағат' p'-де'";
}
var formatRelativeLocale$39 = {
	lastWeek: (date, baseDate, options) => {
		const day = date.getDay();
		if (isSameWeek(date, baseDate, options)) return thisWeek$4(day);
		else return lastWeek$4(day);
	},
	yesterday: "'кеше сағат' p'-де'",
	today: "'бүгін сағат' p'-де'",
	tomorrow: "'ертең сағат' p'-де'",
	nextWeek: (date, baseDate, options) => {
		const day = date.getDay();
		if (isSameWeek(date, baseDate, options)) return thisWeek$4(day);
		else return nextWeek$4(day);
	},
	other: "P"
};
var formatRelative$39 = (token, date, baseDate, options) => {
	const format = formatRelativeLocale$39[token];
	if (typeof format === "function") return format(date, baseDate, options);
	return format;
};
//#endregion
//#region ../../node_modules/date-fns/locale/kk/_lib/localize.js
var eraValues$39 = {
	narrow: ["б.з.д.", "б.з."],
	abbreviated: ["б.з.д.", "б.з."],
	wide: ["біздің заманымызға дейін", "біздің заманымыз"]
};
var quarterValues$39 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"1-ші тоқ.",
		"2-ші тоқ.",
		"3-ші тоқ.",
		"4-ші тоқ."
	],
	wide: [
		"1-ші тоқсан",
		"2-ші тоқсан",
		"3-ші тоқсан",
		"4-ші тоқсан"
	]
};
var monthValues$39 = {
	narrow: [
		"Қ",
		"А",
		"Н",
		"С",
		"М",
		"М",
		"Ш",
		"Т",
		"Қ",
		"Қ",
		"Қ",
		"Ж"
	],
	abbreviated: [
		"қаң",
		"ақп",
		"нау",
		"сәу",
		"мам",
		"мау",
		"шіл",
		"там",
		"қыр",
		"қаз",
		"қар",
		"жел"
	],
	wide: [
		"қаңтар",
		"ақпан",
		"наурыз",
		"сәуір",
		"мамыр",
		"маусым",
		"шілде",
		"тамыз",
		"қыркүйек",
		"қазан",
		"қараша",
		"желтоқсан"
	]
};
var formattingMonthValues$9 = {
	narrow: [
		"Қ",
		"А",
		"Н",
		"С",
		"М",
		"М",
		"Ш",
		"Т",
		"Қ",
		"Қ",
		"Қ",
		"Ж"
	],
	abbreviated: [
		"қаң",
		"ақп",
		"нау",
		"сәу",
		"мам",
		"мау",
		"шіл",
		"там",
		"қыр",
		"қаз",
		"қар",
		"жел"
	],
	wide: [
		"қаңтар",
		"ақпан",
		"наурыз",
		"сәуір",
		"мамыр",
		"маусым",
		"шілде",
		"тамыз",
		"қыркүйек",
		"қазан",
		"қараша",
		"желтоқсан"
	]
};
var dayValues$39 = {
	narrow: [
		"Ж",
		"Д",
		"С",
		"С",
		"Б",
		"Ж",
		"С"
	],
	short: [
		"жс",
		"дс",
		"сс",
		"ср",
		"бс",
		"жм",
		"сб"
	],
	abbreviated: [
		"жс",
		"дс",
		"сс",
		"ср",
		"бс",
		"жм",
		"сб"
	],
	wide: [
		"жексенбі",
		"дүйсенбі",
		"сейсенбі",
		"сәрсенбі",
		"бейсенбі",
		"жұма",
		"сенбі"
	]
};
var dayPeriodValues$39 = {
	narrow: {
		am: "ТД",
		pm: "ТК",
		midnight: "түн ортасы",
		noon: "түс",
		morning: "таң",
		afternoon: "күндіз",
		evening: "кеш",
		night: "түн"
	},
	wide: {
		am: "ТД",
		pm: "ТК",
		midnight: "түн ортасы",
		noon: "түс",
		morning: "таң",
		afternoon: "күндіз",
		evening: "кеш",
		night: "түн"
	}
};
var formattingDayPeriodValues$31 = {
	narrow: {
		am: "ТД",
		pm: "ТК",
		midnight: "түн ортасында",
		noon: "түс",
		morning: "таң",
		afternoon: "күн",
		evening: "кеш",
		night: "түн"
	},
	wide: {
		am: "ТД",
		pm: "ТК",
		midnight: "түн ортасында",
		noon: "түсте",
		morning: "таңертең",
		afternoon: "күндіз",
		evening: "кеште",
		night: "түнде"
	}
};
var suffixes = {
	0: "-ші",
	1: "-ші",
	2: "-ші",
	3: "-ші",
	4: "-ші",
	5: "-ші",
	6: "-шы",
	7: "-ші",
	8: "-ші",
	9: "-шы",
	10: "-шы",
	20: "-шы",
	30: "-шы",
	40: "-шы",
	50: "-ші",
	60: "-шы",
	70: "-ші",
	80: "-ші",
	90: "-шы",
	100: "-ші"
};
var ordinalNumber$39 = (dirtyNumber, _options) => {
	const number = Number(dirtyNumber);
	const mod10 = number % 10;
	const b = number >= 100 ? 100 : null;
	return number + (suffixes[number] || suffixes[mod10] || b && suffixes[b] || "");
};
//#endregion
//#region ../../node_modules/date-fns/locale/kk.js
/**
* @category Locales
* @summary Kazakh locale.
* @language Kazakh
* @iso-639-2 kaz
* @author Nikita Bayev [@drugoi](https://github.com/drugoi)
*/
var kk = {
	code: "kk",
	formatDistance: formatDistance$39,
	formatLong: formatLong$39,
	formatRelative: formatRelative$39,
	localize: {
		ordinalNumber: ordinalNumber$39,
		era: buildLocalizeFn({
			values: eraValues$39,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$39,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$39,
			defaultWidth: "wide",
			formattingValues: formattingMonthValues$9,
			defaultFormattingWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$39,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$39,
			defaultWidth: "any",
			formattingValues: formattingDayPeriodValues$31,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(-?(ші|шы))?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^((б )?з\.?\s?д\.?)/i,
				abbreviated: /^((б )?з\.?\s?д\.?)/i,
				wide: /^(біздің заманымызға дейін|біздің заманымыз|біздің заманымыздан)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^б/i, /^з/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^[1234](-?ші)? тоқ.?/i,
				wide: /^[1234](-?ші)? тоқсан/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^(қ|а|н|с|м|мау|ш|т|қыр|қаз|қар|ж)/i,
				abbreviated: /^(қаң|ақп|нау|сәу|мам|мау|шіл|там|қыр|қаз|қар|жел)/i,
				wide: /^(қаңтар|ақпан|наурыз|сәуір|мамыр|маусым|шілде|тамыз|қыркүйек|қазан|қараша|желтоқсан)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^қ/i,
					/^а/i,
					/^н/i,
					/^с/i,
					/^м/i,
					/^м/i,
					/^ш/i,
					/^т/i,
					/^қ/i,
					/^қ/i,
					/^қ/i,
					/^ж/i
				],
				abbreviated: [
					/^қаң/i,
					/^ақп/i,
					/^нау/i,
					/^сәу/i,
					/^мам/i,
					/^мау/i,
					/^шіл/i,
					/^там/i,
					/^қыр/i,
					/^қаз/i,
					/^қар/i,
					/^жел/i
				],
				any: [
					/^қ/i,
					/^а/i,
					/^н/i,
					/^с/i,
					/^м/i,
					/^м/i,
					/^ш/i,
					/^т/i,
					/^қ/i,
					/^қ/i,
					/^қ/i,
					/^ж/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^(ж|д|с|с|б|ж|с)/i,
				short: /^(жс|дс|сс|ср|бс|жм|сб)/i,
				wide: /^(жексенбі|дүйсенбі|сейсенбі|сәрсенбі|бейсенбі|жұма|сенбі)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ж/i,
					/^д/i,
					/^с/i,
					/^с/i,
					/^б/i,
					/^ж/i,
					/^с/i
				],
				short: [
					/^жс/i,
					/^дс/i,
					/^сс/i,
					/^ср/i,
					/^бс/i,
					/^жм/i,
					/^сб/i
				],
				any: [
					/^ж[ек]/i,
					/^д[үй]/i,
					/^сe[й]/i,
					/^сә[р]/i,
					/^б[ей]/i,
					/^ж[ұм]/i,
					/^се[н]/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^Т\.?\s?[ДК]\.?|түн ортасында|((түсте|таңертең|таңда|таңертең|таңмен|таң|күндіз|күн|кеште|кеш|түнде|түн)\.?)/i,
				wide: /^Т\.?\s?[ДК]\.?|түн ортасында|((түсте|таңертең|таңда|таңертең|таңмен|таң|күндіз|күн|кеште|кеш|түнде|түн)\.?)/i,
				any: /^Т\.?\s?[ДК]\.?|түн ортасында|((түсте|таңертең|таңда|таңертең|таңмен|таң|күндіз|күн|кеште|кеш|түнде|түн)\.?)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: {
				am: /^ТД/i,
				pm: /^ТК/i,
				midnight: /^түн орта/i,
				noon: /^күндіз/i,
				morning: /таң/i,
				afternoon: /түс/i,
				evening: /кеш/i,
				night: /түн/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/km/_lib/formatDistance.js
var formatDistanceLocale$38 = {
	lessThanXSeconds: "តិចជាង {{count}} វិនាទី",
	xSeconds: "{{count}} វិនាទី",
	halfAMinute: "កន្លះនាទី",
	lessThanXMinutes: "តិចជាង {{count}} នាទី",
	xMinutes: "{{count}} នាទី",
	aboutXHours: "ប្រហែល {{count}} ម៉ោង",
	xHours: "{{count}} ម៉ោង",
	xDays: "{{count}} ថ្ងៃ",
	aboutXWeeks: "ប្រហែល {{count}} សប្តាហ៍",
	xWeeks: "{{count}} សប្តាហ៍",
	aboutXMonths: "ប្រហែល {{count}} ខែ",
	xMonths: "{{count}} ខែ",
	aboutXYears: "ប្រហែល {{count}} ឆ្នាំ",
	xYears: "{{count}} ឆ្នាំ",
	overXYears: "ជាង {{count}} ឆ្នាំ",
	almostXYears: "ជិត {{count}} ឆ្នាំ"
};
var formatDistance$38 = (token, count, options) => {
	let result = formatDistanceLocale$38[token];
	if (typeof count === "number") result = result.replace("{{count}}", count.toString());
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "ក្នុងរយៈពេល " + result;
	else return result + "មុន";
	return result;
};
var formatLong$38 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE do MMMM y",
			long: "do MMMM y",
			medium: "d MMM y",
			short: "dd/MM/yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "h:mm:ss a",
			long: "h:mm:ss a",
			medium: "h:mm:ss a",
			short: "h:mm a"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'ម៉ោង' {{time}}",
			long: "{{date}} 'ម៉ោង' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/km/_lib/formatRelative.js
var formatRelativeLocale$38 = {
	lastWeek: "'ថ្ងៃ'eeee'ស​ប្តា​ហ៍​មុនម៉ោង' p",
	yesterday: "'ម្សិលមិញនៅម៉ោង' p",
	today: "'ថ្ងៃនេះម៉ោង' p",
	tomorrow: "'ថ្ងៃស្អែកម៉ោង' p",
	nextWeek: "'ថ្ងៃ'eeee'ស​ប្តា​ហ៍​ក្រោយម៉ោង' p",
	other: "P"
};
var formatRelative$38 = (token, _date, _baseDate, _options) => formatRelativeLocale$38[token];
//#endregion
//#region ../../node_modules/date-fns/locale/km/_lib/localize.js
var eraValues$38 = {
	narrow: ["ម.គស", "គស"],
	abbreviated: ["មុនគ.ស", "គ.ស"],
	wide: ["មុនគ្រិស្តសករាជ", "នៃគ្រិស្តសករាជ"]
};
var quarterValues$38 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"Q1",
		"Q2",
		"Q3",
		"Q4"
	],
	wide: [
		"ត្រីមាសទី 1",
		"ត្រីមាសទី 2",
		"ត្រីមាសទី 3",
		"ត្រីមាសទី 4"
	]
};
var monthValues$38 = {
	narrow: [
		"ម.ក",
		"ក.ម",
		"មិ",
		"ម.ស",
		"ឧ.ស",
		"ម.ថ",
		"ក.ដ",
		"សី",
		"កញ",
		"តុ",
		"វិ",
		"ធ"
	],
	abbreviated: [
		"មករា",
		"កុម្ភៈ",
		"មីនា",
		"មេសា",
		"ឧសភា",
		"មិថុនា",
		"កក្កដា",
		"សីហា",
		"កញ្ញា",
		"តុលា",
		"វិច្ឆិកា",
		"ធ្នូ"
	],
	wide: [
		"មករា",
		"កុម្ភៈ",
		"មីនា",
		"មេសា",
		"ឧសភា",
		"មិថុនា",
		"កក្កដា",
		"សីហា",
		"កញ្ញា",
		"តុលា",
		"វិច្ឆិកា",
		"ធ្នូ"
	]
};
var dayValues$38 = {
	narrow: [
		"អា",
		"ច",
		"អ",
		"ព",
		"ព្រ",
		"សុ",
		"ស"
	],
	short: [
		"អា",
		"ច",
		"អ",
		"ព",
		"ព្រ",
		"សុ",
		"ស"
	],
	abbreviated: [
		"អា",
		"ច",
		"អ",
		"ព",
		"ព្រ",
		"សុ",
		"ស"
	],
	wide: [
		"អាទិត្យ",
		"ចន្ទ",
		"អង្គារ",
		"ពុធ",
		"ព្រហស្បតិ៍",
		"សុក្រ",
		"សៅរ៍"
	]
};
var dayPeriodValues$38 = {
	narrow: {
		am: "ព្រឹក",
		pm: "ល្ងាច",
		midnight: "​ពេលកណ្ដាលអធ្រាត្រ",
		noon: "ពេលថ្ងៃត្រង់",
		morning: "ពេលព្រឹក",
		afternoon: "ពេលរសៀល",
		evening: "ពេលល្ងាច",
		night: "ពេលយប់"
	},
	abbreviated: {
		am: "ព្រឹក",
		pm: "ល្ងាច",
		midnight: "​ពេលកណ្ដាលអធ្រាត្រ",
		noon: "ពេលថ្ងៃត្រង់",
		morning: "ពេលព្រឹក",
		afternoon: "ពេលរសៀល",
		evening: "ពេលល្ងាច",
		night: "ពេលយប់"
	},
	wide: {
		am: "ព្រឹក",
		pm: "ល្ងាច",
		midnight: "​ពេលកណ្ដាលអធ្រាត្រ",
		noon: "ពេលថ្ងៃត្រង់",
		morning: "ពេលព្រឹក",
		afternoon: "ពេលរសៀល",
		evening: "ពេលល្ងាច",
		night: "ពេលយប់"
	}
};
var formattingDayPeriodValues$30 = {
	narrow: {
		am: "ព្រឹក",
		pm: "ល្ងាច",
		midnight: "​ពេលកណ្ដាលអធ្រាត្រ",
		noon: "ពេលថ្ងៃត្រង់",
		morning: "ពេលព្រឹក",
		afternoon: "ពេលរសៀល",
		evening: "ពេលល្ងាច",
		night: "ពេលយប់"
	},
	abbreviated: {
		am: "ព្រឹក",
		pm: "ល្ងាច",
		midnight: "​ពេលកណ្ដាលអធ្រាត្រ",
		noon: "ពេលថ្ងៃត្រង់",
		morning: "ពេលព្រឹក",
		afternoon: "ពេលរសៀល",
		evening: "ពេលល្ងាច",
		night: "ពេលយប់"
	},
	wide: {
		am: "ព្រឹក",
		pm: "ល្ងាច",
		midnight: "​ពេលកណ្ដាលអធ្រាត្រ",
		noon: "ពេលថ្ងៃត្រង់",
		morning: "ពេលព្រឹក",
		afternoon: "ពេលរសៀល",
		evening: "ពេលល្ងាច",
		night: "ពេលយប់"
	}
};
var ordinalNumber$38 = (dirtyNumber, _) => {
	return Number(dirtyNumber).toString();
};
//#endregion
//#region ../../node_modules/date-fns/locale/km.js
/**
* @category Locales
* @summary Khmer locale (Cambodian).
* @language Khmer
* @iso-639-2 khm
* @author Seanghay Yath [@seanghay](https://github.com/seanghay)
*/
var km = {
	code: "km",
	formatDistance: formatDistance$38,
	formatLong: formatLong$38,
	formatRelative: formatRelative$38,
	localize: {
		ordinalNumber: ordinalNumber$38,
		era: buildLocalizeFn({
			values: eraValues$38,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$38,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$38,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$38,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$38,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$30,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(th|st|nd|rd)?/i,
			parsePattern: /\d+/i,
			valueCallback: function(value) {
				return parseInt(value, 10);
			}
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(ម\.)?គស/i,
				abbreviated: /^(មុន)?គ\.ស/i,
				wide: /^(មុន|នៃ)គ្រិស្តសករាជ/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^(ម|មុន)គ\.?ស/i, /^(នៃ)?គ\.?ស/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^q[1234]/i,
				wide: /^(ត្រីមាស)(ទី)?\s?[1234]/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^(ម\.ក|ក\.ម|មិ|ម\.ស|ឧ\.ស|ម\.ថ|ក\.ដ|សី|កញ|តុ|វិ|ធ)/i,
				abbreviated: /^(មករា|កុម្ភៈ|មីនា|មេសា|ឧសភា|មិថុនា|កក្កដា|សីហា|កញ្ញា|តុលា|វិច្ឆិកា|ធ្នូ)/i,
				wide: /^(មករា|កុម្ភៈ|មីនា|មេសា|ឧសភា|មិថុនា|កក្កដា|សីហា|កញ្ញា|តុលា|វិច្ឆិកា|ធ្នូ)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ម\.ក/i,
					/^ក\.ម/i,
					/^មិ/i,
					/^ម\.ស/i,
					/^ឧ\.ស/i,
					/^ម\.ថ/i,
					/^ក\.ដ/i,
					/^សី/i,
					/^កញ/i,
					/^តុ/i,
					/^វិ/i,
					/^ធ/i
				],
				any: [
					/^មក/i,
					/^កុ/i,
					/^មីន/i,
					/^មេ/i,
					/^ឧស/i,
					/^មិថ/i,
					/^កក/i,
					/^សី/i,
					/^កញ/i,
					/^តុ/i,
					/^វិច/i,
					/^ធ/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^(អា|ច|អ|ព|ព្រ|សុ|ស)/i,
				short: /^(អា|ច|អ|ព|ព្រ|សុ|ស)/i,
				abbreviated: /^(អា|ច|អ|ព|ព្រ|សុ|ស)/i,
				wide: /^(អាទិត្យ|ចន្ទ|អង្គារ|ពុធ|ព្រហស្បតិ៍|សុក្រ|សៅរ៍)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^អា/i,
					/^ច/i,
					/^អ/i,
					/^ព/i,
					/^ព្រ/i,
					/^សុ/i,
					/^ស/i
				],
				any: [
					/^អា/i,
					/^ច/i,
					/^អ/i,
					/^ព/i,
					/^ព្រ/i,
					/^សុ/i,
					/^សៅ/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(ព្រឹក|ល្ងាច|ពេលព្រឹក|ពេលថ្ងៃត្រង់|ពេលល្ងាច|ពេលរសៀល|ពេលយប់|ពេលកណ្ដាលអធ្រាត្រ)/i,
				any: /^(ព្រឹក|ល្ងាច|ពេលព្រឹក|ពេលថ្ងៃត្រង់|ពេលល្ងាច|ពេលរសៀល|ពេលយប់|ពេលកណ្ដាលអធ្រាត្រ)/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^ព្រឹក/i,
				pm: /^ល្ងាច/i,
				midnight: /^ពេលកណ្ដាលអធ្រាត្រ/i,
				noon: /^ពេលថ្ងៃត្រង់/i,
				morning: /ពេលព្រឹក/i,
				afternoon: /ពេលរសៀល/i,
				evening: /ពេលល្ងាច/i,
				night: /ពេលយប់/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 0,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/kn/_lib/formatDistance.js
var formatDistanceLocale$37 = {
	lessThanXSeconds: {
		one: {
			default: "1 ಸೆಕೆಂಡ್‌ಗಿಂತ ಕಡಿಮೆ",
			future: "1 ಸೆಕೆಂಡ್‌ಗಿಂತ ಕಡಿಮೆ",
			past: "1 ಸೆಕೆಂಡ್‌ಗಿಂತ ಕಡಿಮೆ"
		},
		other: {
			default: "{{count}} ಸೆಕೆಂಡ್‌ಗಿಂತ ಕಡಿಮೆ",
			future: "{{count}} ಸೆಕೆಂಡ್‌ಗಿಂತ ಕಡಿಮೆ",
			past: "{{count}} ಸೆಕೆಂಡ್‌ಗಿಂತ ಕಡಿಮೆ"
		}
	},
	xSeconds: {
		one: {
			default: "1 ಸೆಕೆಂಡ್",
			future: "1 ಸೆಕೆಂಡ್‌ನಲ್ಲಿ",
			past: "1 ಸೆಕೆಂಡ್ ಹಿಂದೆ"
		},
		other: {
			default: "{{count}} ಸೆಕೆಂಡುಗಳು",
			future: "{{count}} ಸೆಕೆಂಡ್‌ಗಳಲ್ಲಿ",
			past: "{{count}} ಸೆಕೆಂಡ್ ಹಿಂದೆ"
		}
	},
	halfAMinute: { other: {
		default: "ಅರ್ಧ ನಿಮಿಷ",
		future: "ಅರ್ಧ ನಿಮಿಷದಲ್ಲಿ",
		past: "ಅರ್ಧ ನಿಮಿಷದ ಹಿಂದೆ"
	} },
	lessThanXMinutes: {
		one: {
			default: "1 ನಿಮಿಷಕ್ಕಿಂತ ಕಡಿಮೆ",
			future: "1 ನಿಮಿಷಕ್ಕಿಂತ ಕಡಿಮೆ",
			past: "1 ನಿಮಿಷಕ್ಕಿಂತ ಕಡಿಮೆ"
		},
		other: {
			default: "{{count}} ನಿಮಿಷಕ್ಕಿಂತ ಕಡಿಮೆ",
			future: "{{count}} ನಿಮಿಷಕ್ಕಿಂತ ಕಡಿಮೆ",
			past: "{{count}} ನಿಮಿಷಕ್ಕಿಂತ ಕಡಿಮೆ"
		}
	},
	xMinutes: {
		one: {
			default: "1 ನಿಮಿಷ",
			future: "1 ನಿಮಿಷದಲ್ಲಿ",
			past: "1 ನಿಮಿಷದ ಹಿಂದೆ"
		},
		other: {
			default: "{{count}} ನಿಮಿಷಗಳು",
			future: "{{count}} ನಿಮಿಷಗಳಲ್ಲಿ",
			past: "{{count}} ನಿಮಿಷಗಳ ಹಿಂದೆ"
		}
	},
	aboutXHours: {
		one: {
			default: "ಸುಮಾರು 1 ಗಂಟೆ",
			future: "ಸುಮಾರು 1 ಗಂಟೆಯಲ್ಲಿ",
			past: "ಸುಮಾರು 1 ಗಂಟೆ ಹಿಂದೆ"
		},
		other: {
			default: "ಸುಮಾರು {{count}} ಗಂಟೆಗಳು",
			future: "ಸುಮಾರು {{count}} ಗಂಟೆಗಳಲ್ಲಿ",
			past: "ಸುಮಾರು {{count}} ಗಂಟೆಗಳ ಹಿಂದೆ"
		}
	},
	xHours: {
		one: {
			default: "1 ಗಂಟೆ",
			future: "1 ಗಂಟೆಯಲ್ಲಿ",
			past: "1 ಗಂಟೆ ಹಿಂದೆ"
		},
		other: {
			default: "{{count}} ಗಂಟೆಗಳು",
			future: "{{count}} ಗಂಟೆಗಳಲ್ಲಿ",
			past: "{{count}} ಗಂಟೆಗಳ ಹಿಂದೆ"
		}
	},
	xDays: {
		one: {
			default: "1 ದಿನ",
			future: "1 ದಿನದಲ್ಲಿ",
			past: "1 ದಿನದ ಹಿಂದೆ"
		},
		other: {
			default: "{{count}} ದಿನಗಳು",
			future: "{{count}} ದಿನಗಳಲ್ಲಿ",
			past: "{{count}} ದಿನಗಳ ಹಿಂದೆ"
		}
	},
	aboutXMonths: {
		one: {
			default: "ಸುಮಾರು 1 ತಿಂಗಳು",
			future: "ಸುಮಾರು 1 ತಿಂಗಳಲ್ಲಿ",
			past: "ಸುಮಾರು 1 ತಿಂಗಳ ಹಿಂದೆ"
		},
		other: {
			default: "ಸುಮಾರು {{count}} ತಿಂಗಳು",
			future: "ಸುಮಾರು {{count}} ತಿಂಗಳುಗಳಲ್ಲಿ",
			past: "ಸುಮಾರು {{count}} ತಿಂಗಳುಗಳ ಹಿಂದೆ"
		}
	},
	xMonths: {
		one: {
			default: "1 ತಿಂಗಳು",
			future: "1 ತಿಂಗಳಲ್ಲಿ",
			past: "1 ತಿಂಗಳ ಹಿಂದೆ"
		},
		other: {
			default: "{{count}} ತಿಂಗಳು",
			future: "{{count}} ತಿಂಗಳುಗಳಲ್ಲಿ",
			past: "{{count}} ತಿಂಗಳುಗಳ ಹಿಂದೆ"
		}
	},
	aboutXYears: {
		one: {
			default: "ಸುಮಾರು 1 ವರ್ಷ",
			future: "ಸುಮಾರು 1 ವರ್ಷದಲ್ಲಿ",
			past: "ಸುಮಾರು 1 ವರ್ಷದ ಹಿಂದೆ"
		},
		other: {
			default: "ಸುಮಾರು {{count}} ವರ್ಷಗಳು",
			future: "ಸುಮಾರು {{count}} ವರ್ಷಗಳಲ್ಲಿ",
			past: "ಸುಮಾರು {{count}} ವರ್ಷಗಳ ಹಿಂದೆ"
		}
	},
	xYears: {
		one: {
			default: "1 ವರ್ಷ",
			future: "1 ವರ್ಷದಲ್ಲಿ",
			past: "1 ವರ್ಷದ ಹಿಂದೆ"
		},
		other: {
			default: "{{count}} ವರ್ಷಗಳು",
			future: "{{count}} ವರ್ಷಗಳಲ್ಲಿ",
			past: "{{count}} ವರ್ಷಗಳ ಹಿಂದೆ"
		}
	},
	overXYears: {
		one: {
			default: "1 ವರ್ಷದ ಮೇಲೆ",
			future: "1 ವರ್ಷದ ಮೇಲೆ",
			past: "1 ವರ್ಷದ ಮೇಲೆ"
		},
		other: {
			default: "{{count}} ವರ್ಷಗಳ ಮೇಲೆ",
			future: "{{count}} ವರ್ಷಗಳ ಮೇಲೆ",
			past: "{{count}} ವರ್ಷಗಳ ಮೇಲೆ"
		}
	},
	almostXYears: {
		one: {
			default: "ಬಹುತೇಕ 1 ವರ್ಷದಲ್ಲಿ",
			future: "ಬಹುತೇಕ 1 ವರ್ಷದಲ್ಲಿ",
			past: "ಬಹುತೇಕ 1 ವರ್ಷದಲ್ಲಿ"
		},
		other: {
			default: "ಬಹುತೇಕ {{count}} ವರ್ಷಗಳಲ್ಲಿ",
			future: "ಬಹುತೇಕ {{count}} ವರ್ಷಗಳಲ್ಲಿ",
			past: "ಬಹುತೇಕ {{count}} ವರ್ಷಗಳಲ್ಲಿ"
		}
	}
};
function getResultByTense(parentToken, options) {
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return parentToken.future;
	else return parentToken.past;
	return parentToken.default;
}
var formatDistance$37 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$37[token];
	if (tokenValue.one && count === 1) result = getResultByTense(tokenValue.one, options);
	else result = getResultByTense(tokenValue.other, options);
	return result.replace("{{count}}", String(count));
};
var formatLong$37 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, MMMM d, y",
			long: "MMMM d, y",
			medium: "MMM d, y",
			short: "d/M/yy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "hh:mm:ss a zzzz",
			long: "hh:mm:ss a z",
			medium: "hh:mm:ss a",
			short: "hh:mm a"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} {{time}}",
			long: "{{date}} {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/kn/_lib/formatRelative.js
var formatRelativeLocale$37 = {
	lastWeek: "'ಕಳೆದ' eeee p 'ಕ್ಕೆ'",
	yesterday: "'ನಿನ್ನೆ' p 'ಕ್ಕೆ'",
	today: "'ಇಂದು' p 'ಕ್ಕೆ'",
	tomorrow: "'ನಾಳೆ' p 'ಕ್ಕೆ'",
	nextWeek: "eeee p 'ಕ್ಕೆ'",
	other: "P"
};
var formatRelative$37 = (token, _date, _baseDate, _options) => formatRelativeLocale$37[token];
//#endregion
//#region ../../node_modules/date-fns/locale/kn/_lib/localize.js
var eraValues$37 = {
	narrow: ["ಕ್ರಿ.ಪೂ", "ಕ್ರಿ.ಶ"],
	abbreviated: ["ಕ್ರಿ.ಪೂ", "ಕ್ರಿ.ಶ"],
	wide: ["ಕ್ರಿಸ್ತ ಪೂರ್ವ", "ಕ್ರಿಸ್ತ ಶಕ"]
};
var quarterValues$37 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"ತ್ರೈ 1",
		"ತ್ರೈ 2",
		"ತ್ರೈ 3",
		"ತ್ರೈ 4"
	],
	wide: [
		"1ನೇ ತ್ರೈಮಾಸಿಕ",
		"2ನೇ ತ್ರೈಮಾಸಿಕ",
		"3ನೇ ತ್ರೈಮಾಸಿಕ",
		"4ನೇ ತ್ರೈಮಾಸಿಕ"
	]
};
var monthValues$37 = {
	narrow: [
		"ಜ",
		"ಫೆ",
		"ಮಾ",
		"ಏ",
		"ಮೇ",
		"ಜೂ",
		"ಜು",
		"ಆ",
		"ಸೆ",
		"ಅ",
		"ನ",
		"ಡಿ"
	],
	abbreviated: [
		"ಜನ",
		"ಫೆಬ್ರ",
		"ಮಾರ್ಚ್",
		"ಏಪ್ರಿ",
		"ಮೇ",
		"ಜೂನ್",
		"ಜುಲೈ",
		"ಆಗ",
		"ಸೆಪ್ಟೆಂ",
		"ಅಕ್ಟೋ",
		"ನವೆಂ",
		"ಡಿಸೆಂ"
	],
	wide: [
		"ಜನವರಿ",
		"ಫೆಬ್ರವರಿ",
		"ಮಾರ್ಚ್",
		"ಏಪ್ರಿಲ್",
		"ಮೇ",
		"ಜೂನ್",
		"ಜುಲೈ",
		"ಆಗಸ್ಟ್",
		"ಸೆಪ್ಟೆಂಬರ್",
		"ಅಕ್ಟೋಬರ್",
		"ನವೆಂಬರ್",
		"ಡಿಸೆಂಬರ್"
	]
};
var dayValues$37 = {
	narrow: [
		"ಭಾ",
		"ಸೋ",
		"ಮಂ",
		"ಬು",
		"ಗು",
		"ಶು",
		"ಶ"
	],
	short: [
		"ಭಾನು",
		"ಸೋಮ",
		"ಮಂಗಳ",
		"ಬುಧ",
		"ಗುರು",
		"ಶುಕ್ರ",
		"ಶನಿ"
	],
	abbreviated: [
		"ಭಾನು",
		"ಸೋಮ",
		"ಮಂಗಳ",
		"ಬುಧ",
		"ಗುರು",
		"ಶುಕ್ರ",
		"ಶನಿ"
	],
	wide: [
		"ಭಾನುವಾರ",
		"ಸೋಮವಾರ",
		"ಮಂಗಳವಾರ",
		"ಬುಧವಾರ",
		"ಗುರುವಾರ",
		"ಶುಕ್ರವಾರ",
		"ಶನಿವಾರ"
	]
};
var dayPeriodValues$37 = {
	narrow: {
		am: "ಪೂರ್ವಾಹ್ನ",
		pm: "ಅಪರಾಹ್ನ",
		midnight: "ಮಧ್ಯರಾತ್ರಿ",
		noon: "ಮಧ್ಯಾಹ್ನ",
		morning: "ಬೆಳಗ್ಗೆ",
		afternoon: "ಮಧ್ಯಾಹ್ನ",
		evening: "ಸಂಜೆ",
		night: "ರಾತ್ರಿ"
	},
	abbreviated: {
		am: "ಪೂರ್ವಾಹ್ನ",
		pm: "ಅಪರಾಹ್ನ",
		midnight: "ಮಧ್ಯರಾತ್ರಿ",
		noon: "ಮಧ್ಯಾನ್ಹ",
		morning: "ಬೆಳಗ್ಗೆ",
		afternoon: "ಮಧ್ಯಾನ್ಹ",
		evening: "ಸಂಜೆ",
		night: "ರಾತ್ರಿ"
	},
	wide: {
		am: "ಪೂರ್ವಾಹ್ನ",
		pm: "ಅಪರಾಹ್ನ",
		midnight: "ಮಧ್ಯರಾತ್ರಿ",
		noon: "ಮಧ್ಯಾನ್ಹ",
		morning: "ಬೆಳಗ್ಗೆ",
		afternoon: "ಮಧ್ಯಾನ್ಹ",
		evening: "ಸಂಜೆ",
		night: "ರಾತ್ರಿ"
	}
};
var formattingDayPeriodValues$29 = {
	narrow: {
		am: "ಪೂ",
		pm: "ಅ",
		midnight: "ಮಧ್ಯರಾತ್ರಿ",
		noon: "ಮಧ್ಯಾನ್ಹ",
		morning: "ಬೆಳಗ್ಗೆ",
		afternoon: "ಮಧ್ಯಾನ್ಹ",
		evening: "ಸಂಜೆ",
		night: "ರಾತ್ರಿ"
	},
	abbreviated: {
		am: "ಪೂರ್ವಾಹ್ನ",
		pm: "ಅಪರಾಹ್ನ",
		midnight: "ಮಧ್ಯ ರಾತ್ರಿ",
		noon: "ಮಧ್ಯಾನ್ಹ",
		morning: "ಬೆಳಗ್ಗೆ",
		afternoon: "ಮಧ್ಯಾನ್ಹ",
		evening: "ಸಂಜೆ",
		night: "ರಾತ್ರಿ"
	},
	wide: {
		am: "ಪೂರ್ವಾಹ್ನ",
		pm: "ಅಪರಾಹ್ನ",
		midnight: "ಮಧ್ಯ ರಾತ್ರಿ",
		noon: "ಮಧ್ಯಾನ್ಹ",
		morning: "ಬೆಳಗ್ಗೆ",
		afternoon: "ಮಧ್ಯಾನ್ಹ",
		evening: "ಸಂಜೆ",
		night: "ರಾತ್ರಿ"
	}
};
var ordinalNumber$37 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + "ನೇ";
};
//#endregion
//#region ../../node_modules/date-fns/locale/kn.js
/**
* @category Locales
* @summary Kannada locale (India).
* @language Kannada
* @iso-639-2 kan
* @author Manjunatha Gouli [@developergouli](https://github.com/developergouli)
*/
var kn = {
	code: "kn",
	formatDistance: formatDistance$37,
	formatLong: formatLong$37,
	formatRelative: formatRelative$37,
	localize: {
		ordinalNumber: ordinalNumber$37,
		era: buildLocalizeFn({
			values: eraValues$37,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$37,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$37,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$37,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$37,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$29,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(ನೇ|ನೆ)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(ಕ್ರಿ.ಪೂ|ಕ್ರಿ.ಶ)/i,
				abbreviated: /^(ಕ್ರಿ\.?\s?ಪೂ\.?|ಕ್ರಿ\.?\s?ಶ\.?|ಪ್ರ\.?\s?ಶ\.?)/i,
				wide: /^(ಕ್ರಿಸ್ತ ಪೂರ್ವ|ಕ್ರಿಸ್ತ ಶಕ|ಪ್ರಸಕ್ತ ಶಕ)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^ಪೂ/i, /^(ಶ|ಪ್ರ)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^ತ್ರೈ[1234]|ತ್ರೈ [1234]| [1234]ತ್ರೈ/i,
				wide: /^[1234](ನೇ)? ತ್ರೈಮಾಸಿಕ/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^(ಜೂ|ಜು|ಜ|ಫೆ|ಮಾ|ಏ|ಮೇ|ಆ|ಸೆ|ಅ|ನ|ಡಿ)/i,
				abbreviated: /^(ಜನ|ಫೆಬ್ರ|ಮಾರ್ಚ್|ಏಪ್ರಿ|ಮೇ|ಜೂನ್|ಜುಲೈ|ಆಗ|ಸೆಪ್ಟೆಂ|ಅಕ್ಟೋ|ನವೆಂ|ಡಿಸೆಂ)/i,
				wide: /^(ಜನವರಿ|ಫೆಬ್ರವರಿ|ಮಾರ್ಚ್|ಏಪ್ರಿಲ್|ಮೇ|ಜೂನ್|ಜುಲೈ|ಆಗಸ್ಟ್|ಸೆಪ್ಟೆಂಬರ್|ಅಕ್ಟೋಬರ್|ನವೆಂಬರ್|ಡಿಸೆಂಬರ್)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ಜ$/i,
					/^ಫೆ/i,
					/^ಮಾ/i,
					/^ಏ/i,
					/^ಮೇ/i,
					/^ಜೂ/i,
					/^ಜು$/i,
					/^ಆ/i,
					/^ಸೆ/i,
					/^ಅ/i,
					/^ನ/i,
					/^ಡಿ/i
				],
				any: [
					/^ಜನ/i,
					/^ಫೆ/i,
					/^ಮಾ/i,
					/^ಏ/i,
					/^ಮೇ/i,
					/^ಜೂನ್/i,
					/^ಜುಲೈ/i,
					/^ಆ/i,
					/^ಸೆ/i,
					/^ಅ/i,
					/^ನ/i,
					/^ಡಿ/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^(ಭಾ|ಸೋ|ಮ|ಬು|ಗು|ಶು|ಶ)/i,
				short: /^(ಭಾನು|ಸೋಮ|ಮಂಗಳ|ಬುಧ|ಗುರು|ಶುಕ್ರ|ಶನಿ)/i,
				abbreviated: /^(ಭಾನು|ಸೋಮ|ಮಂಗಳ|ಬುಧ|ಗುರು|ಶುಕ್ರ|ಶನಿ)/i,
				wide: /^(ಭಾನುವಾರ|ಸೋಮವಾರ|ಮಂಗಳವಾರ|ಬುಧವಾರ|ಗುರುವಾರ|ಶುಕ್ರವಾರ|ಶನಿವಾರ)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ಭಾ/i,
					/^ಸೋ/i,
					/^ಮ/i,
					/^ಬು/i,
					/^ಗು/i,
					/^ಶು/i,
					/^ಶ/i
				],
				any: [
					/^ಭಾ/i,
					/^ಸೋ/i,
					/^ಮ/i,
					/^ಬು/i,
					/^ಗು/i,
					/^ಶು/i,
					/^ಶ/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(ಪೂ|ಅ|ಮಧ್ಯರಾತ್ರಿ|ಮಧ್ಯಾನ್ಹ|ಬೆಳಗ್ಗೆ|ಸಂಜೆ|ರಾತ್ರಿ)/i,
				any: /^(ಪೂರ್ವಾಹ್ನ|ಅಪರಾಹ್ನ|ಮಧ್ಯರಾತ್ರಿ|ಮಧ್ಯಾನ್ಹ|ಬೆಳಗ್ಗೆ|ಸಂಜೆ|ರಾತ್ರಿ)/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^ಪೂ/i,
				pm: /^ಅ/i,
				midnight: /ಮಧ್ಯರಾತ್ರಿ/i,
				noon: /ಮಧ್ಯಾನ್ಹ/i,
				morning: /ಬೆಳಗ್ಗೆ/i,
				afternoon: /ಮಧ್ಯಾನ್ಹ/i,
				evening: /ಸಂಜೆ/i,
				night: /ರಾತ್ರಿ/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/ko/_lib/formatDistance.js
var formatDistanceLocale$36 = {
	lessThanXSeconds: {
		one: "1초 미만",
		other: "{{count}}초 미만"
	},
	xSeconds: {
		one: "1초",
		other: "{{count}}초"
	},
	halfAMinute: "30초",
	lessThanXMinutes: {
		one: "1분 미만",
		other: "{{count}}분 미만"
	},
	xMinutes: {
		one: "1분",
		other: "{{count}}분"
	},
	aboutXHours: {
		one: "약 1시간",
		other: "약 {{count}}시간"
	},
	xHours: {
		one: "1시간",
		other: "{{count}}시간"
	},
	xDays: {
		one: "1일",
		other: "{{count}}일"
	},
	aboutXWeeks: {
		one: "약 1주",
		other: "약 {{count}}주"
	},
	xWeeks: {
		one: "1주",
		other: "{{count}}주"
	},
	aboutXMonths: {
		one: "약 1개월",
		other: "약 {{count}}개월"
	},
	xMonths: {
		one: "1개월",
		other: "{{count}}개월"
	},
	aboutXYears: {
		one: "약 1년",
		other: "약 {{count}}년"
	},
	xYears: {
		one: "1년",
		other: "{{count}}년"
	},
	overXYears: {
		one: "1년 이상",
		other: "{{count}}년 이상"
	},
	almostXYears: {
		one: "거의 1년",
		other: "거의 {{count}}년"
	}
};
var formatDistance$36 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$36[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", count.toString());
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return result + " 후";
	else return result + " 전";
	return result;
};
var formatLong$36 = {
	date: buildFormatLongFn({
		formats: {
			full: "y년 M월 d일 EEEE",
			long: "y년 M월 d일",
			medium: "y.MM.dd",
			short: "y.MM.dd"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "a H시 mm분 ss초 zzzz",
			long: "a H:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} {{time}}",
			long: "{{date}} {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/ko/_lib/formatRelative.js
var formatRelativeLocale$36 = {
	lastWeek: "'지난' eeee p",
	yesterday: "'어제' p",
	today: "'오늘' p",
	tomorrow: "'내일' p",
	nextWeek: "'다음' eeee p",
	other: "P"
};
var formatRelative$36 = (token, _date, _baseDate, _options) => formatRelativeLocale$36[token];
//#endregion
//#region ../../node_modules/date-fns/locale/ko/_lib/localize.js
var eraValues$36 = {
	narrow: ["BC", "AD"],
	abbreviated: ["BC", "AD"],
	wide: ["기원전", "서기"]
};
var quarterValues$36 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"Q1",
		"Q2",
		"Q3",
		"Q4"
	],
	wide: [
		"1분기",
		"2분기",
		"3분기",
		"4분기"
	]
};
var monthValues$36 = {
	narrow: [
		"1",
		"2",
		"3",
		"4",
		"5",
		"6",
		"7",
		"8",
		"9",
		"10",
		"11",
		"12"
	],
	abbreviated: [
		"1월",
		"2월",
		"3월",
		"4월",
		"5월",
		"6월",
		"7월",
		"8월",
		"9월",
		"10월",
		"11월",
		"12월"
	],
	wide: [
		"1월",
		"2월",
		"3월",
		"4월",
		"5월",
		"6월",
		"7월",
		"8월",
		"9월",
		"10월",
		"11월",
		"12월"
	]
};
var dayValues$36 = {
	narrow: [
		"일",
		"월",
		"화",
		"수",
		"목",
		"금",
		"토"
	],
	short: [
		"일",
		"월",
		"화",
		"수",
		"목",
		"금",
		"토"
	],
	abbreviated: [
		"일",
		"월",
		"화",
		"수",
		"목",
		"금",
		"토"
	],
	wide: [
		"일요일",
		"월요일",
		"화요일",
		"수요일",
		"목요일",
		"금요일",
		"토요일"
	]
};
var dayPeriodValues$36 = {
	narrow: {
		am: "오전",
		pm: "오후",
		midnight: "자정",
		noon: "정오",
		morning: "아침",
		afternoon: "오후",
		evening: "저녁",
		night: "밤"
	},
	abbreviated: {
		am: "오전",
		pm: "오후",
		midnight: "자정",
		noon: "정오",
		morning: "아침",
		afternoon: "오후",
		evening: "저녁",
		night: "밤"
	},
	wide: {
		am: "오전",
		pm: "오후",
		midnight: "자정",
		noon: "정오",
		morning: "아침",
		afternoon: "오후",
		evening: "저녁",
		night: "밤"
	}
};
var formattingDayPeriodValues$28 = {
	narrow: {
		am: "오전",
		pm: "오후",
		midnight: "자정",
		noon: "정오",
		morning: "아침",
		afternoon: "오후",
		evening: "저녁",
		night: "밤"
	},
	abbreviated: {
		am: "오전",
		pm: "오후",
		midnight: "자정",
		noon: "정오",
		morning: "아침",
		afternoon: "오후",
		evening: "저녁",
		night: "밤"
	},
	wide: {
		am: "오전",
		pm: "오후",
		midnight: "자정",
		noon: "정오",
		morning: "아침",
		afternoon: "오후",
		evening: "저녁",
		night: "밤"
	}
};
var ordinalNumber$36 = (dirtyNumber, options) => {
	const number = Number(dirtyNumber);
	switch (String(options?.unit)) {
		case "minute":
		case "second": return String(number);
		case "date": return number + "일";
		default: return number + "번째";
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/ko.js
/**
* @category Locales
* @summary Korean locale.
* @language Korean
* @iso-639-2 kor
* @author Hong Chulju [@angdev](https://github.com/angdev)
* @author Lee Seoyoen [@iamssen](https://github.com/iamssen)
* @author Taiki IKeda [@so99ynoodles](https://github.com/so99ynoodles)
*/
var ko = {
	code: "ko",
	formatDistance: formatDistance$36,
	formatLong: formatLong$36,
	formatRelative: formatRelative$36,
	localize: {
		ordinalNumber: ordinalNumber$36,
		era: buildLocalizeFn({
			values: eraValues$36,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$36,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$36,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$36,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$36,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$28,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(일|번째)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
				abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
				wide: /^(기원전|서기)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^(bc|기원전)/i, /^(ad|서기)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^q[1234]/i,
				wide: /^[1234]사?분기/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^(1[012]|[123456789])/,
				abbreviated: /^(1[012]|[123456789])월/i,
				wide: /^(1[012]|[123456789])월/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/^1월?$/,
				/^2/,
				/^3/,
				/^4/,
				/^5/,
				/^6/,
				/^7/,
				/^8/,
				/^9/,
				/^10/,
				/^11/,
				/^12/
			] },
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[일월화수목금토]/,
				short: /^[일월화수목금토]/,
				abbreviated: /^[일월화수목금토]/,
				wide: /^[일월화수목금토]요일/
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/^일/,
				/^월/,
				/^화/,
				/^수/,
				/^목/,
				/^금/,
				/^토/
			] },
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: { any: /^(am|pm|오전|오후|자정|정오|아침|저녁|밤)/i },
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^(am|오전)/i,
				pm: /^(pm|오후)/i,
				midnight: /^자정/i,
				noon: /^정오/i,
				morning: /^아침/i,
				afternoon: /^오후/i,
				evening: /^저녁/i,
				night: /^밤/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 0,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/lb/_lib/formatDistance.js
var formatDistanceLocale$35 = {
	lessThanXSeconds: {
		standalone: {
			one: "manner wéi eng Sekonn",
			other: "manner wéi {{count}} Sekonnen"
		},
		withPreposition: {
			one: "manner wéi enger Sekonn",
			other: "manner wéi {{count}} Sekonnen"
		}
	},
	xSeconds: {
		standalone: {
			one: "eng Sekonn",
			other: "{{count}} Sekonnen"
		},
		withPreposition: {
			one: "enger Sekonn",
			other: "{{count}} Sekonnen"
		}
	},
	halfAMinute: {
		standalone: "eng hallef Minutt",
		withPreposition: "enger hallwer Minutt"
	},
	lessThanXMinutes: {
		standalone: {
			one: "manner wéi eng Minutt",
			other: "manner wéi {{count}} Minutten"
		},
		withPreposition: {
			one: "manner wéi enger Minutt",
			other: "manner wéi {{count}} Minutten"
		}
	},
	xMinutes: {
		standalone: {
			one: "eng Minutt",
			other: "{{count}} Minutten"
		},
		withPreposition: {
			one: "enger Minutt",
			other: "{{count}} Minutten"
		}
	},
	aboutXHours: {
		standalone: {
			one: "ongeféier eng Stonn",
			other: "ongeféier {{count}} Stonnen"
		},
		withPreposition: {
			one: "ongeféier enger Stonn",
			other: "ongeféier {{count}} Stonnen"
		}
	},
	xHours: {
		standalone: {
			one: "eng Stonn",
			other: "{{count}} Stonnen"
		},
		withPreposition: {
			one: "enger Stonn",
			other: "{{count}} Stonnen"
		}
	},
	xDays: {
		standalone: {
			one: "een Dag",
			other: "{{count}} Deeg"
		},
		withPreposition: {
			one: "engem Dag",
			other: "{{count}} Deeg"
		}
	},
	aboutXWeeks: {
		standalone: {
			one: "ongeféier eng Woch",
			other: "ongeféier {{count}} Wochen"
		},
		withPreposition: {
			one: "ongeféier enger Woche",
			other: "ongeféier {{count}} Wochen"
		}
	},
	xWeeks: {
		standalone: {
			one: "eng Woch",
			other: "{{count}} Wochen"
		},
		withPreposition: {
			one: "enger Woch",
			other: "{{count}} Wochen"
		}
	},
	aboutXMonths: {
		standalone: {
			one: "ongeféier ee Mount",
			other: "ongeféier {{count}} Méint"
		},
		withPreposition: {
			one: "ongeféier engem Mount",
			other: "ongeféier {{count}} Méint"
		}
	},
	xMonths: {
		standalone: {
			one: "ee Mount",
			other: "{{count}} Méint"
		},
		withPreposition: {
			one: "engem Mount",
			other: "{{count}} Méint"
		}
	},
	aboutXYears: {
		standalone: {
			one: "ongeféier ee Joer",
			other: "ongeféier {{count}} Joer"
		},
		withPreposition: {
			one: "ongeféier engem Joer",
			other: "ongeféier {{count}} Joer"
		}
	},
	xYears: {
		standalone: {
			one: "ee Joer",
			other: "{{count}} Joer"
		},
		withPreposition: {
			one: "engem Joer",
			other: "{{count}} Joer"
		}
	},
	overXYears: {
		standalone: {
			one: "méi wéi ee Joer",
			other: "méi wéi {{count}} Joer"
		},
		withPreposition: {
			one: "méi wéi engem Joer",
			other: "méi wéi {{count}} Joer"
		}
	},
	almostXYears: {
		standalone: {
			one: "bal ee Joer",
			other: "bal {{count}} Joer"
		},
		withPreposition: {
			one: "bal engem Joer",
			other: "bal {{count}} Joer"
		}
	}
};
var EXCEPTION_CONSONANTS = [
	"d",
	"h",
	"n",
	"t",
	"z"
];
var VOWELS = [
	"a,",
	"e",
	"i",
	"o",
	"u"
];
var DIGITS_SPOKEN_N_NEEDED = [
	0,
	1,
	2,
	3,
	8,
	9
];
var FIRST_TWO_DIGITS_SPOKEN_NO_N_NEEDED = [
	40,
	50,
	60,
	70
];
function isFinalNNeeded(nextWords) {
	const firstLetter = nextWords.charAt(0).toLowerCase();
	if (VOWELS.indexOf(firstLetter) != -1 || EXCEPTION_CONSONANTS.indexOf(firstLetter) != -1) return true;
	const firstWord = nextWords.split(" ")[0];
	const number = parseInt(firstWord);
	if (!isNaN(number) && DIGITS_SPOKEN_N_NEEDED.indexOf(number % 10) != -1 && FIRST_TWO_DIGITS_SPOKEN_NO_N_NEEDED.indexOf(parseInt(firstWord.substring(0, 2))) == -1) return true;
	return false;
}
var formatDistance$35 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$35[token];
	const usageGroup = options?.addSuffix ? tokenValue.withPreposition : tokenValue.standalone;
	if (typeof usageGroup === "string") result = usageGroup;
	else if (count === 1) result = usageGroup.one;
	else result = usageGroup.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "a" + (isFinalNNeeded(result) ? "n" : "") + " " + result;
	else return "viru" + (isFinalNNeeded(result) ? "n" : "") + " " + result;
	return result;
};
var formatLong$35 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, do MMMM y",
			long: "do MMMM y",
			medium: "do MMM y",
			short: "dd.MM.yy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'um' {{time}}",
			long: "{{date}} 'um' {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/lb/_lib/formatRelative.js
var formatRelativeLocale$35 = {
	lastWeek: (date) => {
		const day = date.getDay();
		let result = "'läschte";
		if (day === 2 || day === 4) result += "n";
		result += "' eeee 'um' p";
		return result;
	},
	yesterday: "'gëschter um' p",
	today: "'haut um' p",
	tomorrow: "'moien um' p",
	nextWeek: "eeee 'um' p",
	other: "P"
};
var formatRelative$35 = (token, date, _baseDate, _options) => {
	const format = formatRelativeLocale$35[token];
	if (typeof format === "function") return format(date);
	return format;
};
//#endregion
//#region ../../node_modules/date-fns/locale/lb/_lib/localize.js
var eraValues$35 = {
	narrow: ["v.Chr.", "n.Chr."],
	abbreviated: ["v.Chr.", "n.Chr."],
	wide: ["viru Christus", "no Christus"]
};
var quarterValues$35 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"Q1",
		"Q2",
		"Q3",
		"Q4"
	],
	wide: [
		"1. Quartal",
		"2. Quartal",
		"3. Quartal",
		"4. Quartal"
	]
};
var monthValues$35 = {
	narrow: [
		"J",
		"F",
		"M",
		"A",
		"M",
		"J",
		"J",
		"A",
		"S",
		"O",
		"N",
		"D"
	],
	abbreviated: [
		"Jan",
		"Feb",
		"Mäe",
		"Abr",
		"Mee",
		"Jun",
		"Jul",
		"Aug",
		"Sep",
		"Okt",
		"Nov",
		"Dez"
	],
	wide: [
		"Januar",
		"Februar",
		"Mäerz",
		"Abrëll",
		"Mee",
		"Juni",
		"Juli",
		"August",
		"September",
		"Oktober",
		"November",
		"Dezember"
	]
};
var dayValues$35 = {
	narrow: [
		"S",
		"M",
		"D",
		"M",
		"D",
		"F",
		"S"
	],
	short: [
		"So",
		"Mé",
		"Dë",
		"Më",
		"Do",
		"Fr",
		"Sa"
	],
	abbreviated: [
		"So.",
		"Mé.",
		"Dë.",
		"Më.",
		"Do.",
		"Fr.",
		"Sa."
	],
	wide: [
		"Sonndeg",
		"Méindeg",
		"Dënschdeg",
		"Mëttwoch",
		"Donneschdeg",
		"Freideg",
		"Samschdeg"
	]
};
var dayPeriodValues$35 = {
	narrow: {
		am: "mo.",
		pm: "nomë.",
		midnight: "Mëtternuecht",
		noon: "Mëtteg",
		morning: "Moien",
		afternoon: "Nomëtteg",
		evening: "Owend",
		night: "Nuecht"
	},
	abbreviated: {
		am: "moies",
		pm: "nomëttes",
		midnight: "Mëtternuecht",
		noon: "Mëtteg",
		morning: "Moien",
		afternoon: "Nomëtteg",
		evening: "Owend",
		night: "Nuecht"
	},
	wide: {
		am: "moies",
		pm: "nomëttes",
		midnight: "Mëtternuecht",
		noon: "Mëtteg",
		morning: "Moien",
		afternoon: "Nomëtteg",
		evening: "Owend",
		night: "Nuecht"
	}
};
var formattingDayPeriodValues$27 = {
	narrow: {
		am: "mo.",
		pm: "nom.",
		midnight: "Mëtternuecht",
		noon: "mëttes",
		morning: "moies",
		afternoon: "nomëttes",
		evening: "owes",
		night: "nuets"
	},
	abbreviated: {
		am: "moies",
		pm: "nomëttes",
		midnight: "Mëtternuecht",
		noon: "mëttes",
		morning: "moies",
		afternoon: "nomëttes",
		evening: "owes",
		night: "nuets"
	},
	wide: {
		am: "moies",
		pm: "nomëttes",
		midnight: "Mëtternuecht",
		noon: "mëttes",
		morning: "moies",
		afternoon: "nomëttes",
		evening: "owes",
		night: "nuets"
	}
};
var ordinalNumber$35 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + ".";
};
//#endregion
//#region ../../node_modules/date-fns/locale/lb.js
/**
* @category Locales
* @summary Luxembourgish locale.
* @language Luxembourgish
* @iso-639-2 ltz
* @author Daniel Waxweiler [@dwaxweiler](https://github.com/dwaxweiler)
*/
var lb = {
	code: "lb",
	formatDistance: formatDistance$35,
	formatLong: formatLong$35,
	formatRelative: formatRelative$35,
	localize: {
		ordinalNumber: ordinalNumber$35,
		era: buildLocalizeFn({
			values: eraValues$35,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$35,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$35,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$35,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$35,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$27,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(\.)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,
				abbreviated: /^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,
				wide: /^(viru Christus|virun eiser Zäitrechnung|no Christus|eiser Zäitrechnung)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^v/i, /^n/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^q[1234]/i,
				wide: /^[1234](\.)? Quartal/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[jfmasond]/i,
				abbreviated: /^(jan|feb|mäe|abr|mee|jun|jul|aug|sep|okt|nov|dez)/i,
				wide: /^(januar|februar|mäerz|abrëll|mee|juni|juli|august|september|oktober|november|dezember)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^j/i,
					/^f/i,
					/^m/i,
					/^a/i,
					/^m/i,
					/^j/i,
					/^j/i,
					/^a/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				],
				any: [
					/^ja/i,
					/^f/i,
					/^mä/i,
					/^ab/i,
					/^me/i,
					/^jun/i,
					/^jul/i,
					/^au/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[smdf]/i,
				short: /^(so|mé|dë|më|do|fr|sa)/i,
				abbreviated: /^(son?|méi?|dën?|mët?|don?|fre?|sam?)\.?/i,
				wide: /^(sonndeg|méindeg|dënschdeg|mëttwoch|donneschdeg|freideg|samschdeg)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/^so/i,
				/^mé/i,
				/^dë/i,
				/^më/i,
				/^do/i,
				/^f/i,
				/^sa/i
			] },
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(mo\.?|nomë\.?|Mëtternuecht|mëttes|moies|nomëttes|owes|nuets)/i,
				abbreviated: /^(moi\.?|nomët\.?|Mëtternuecht|mëttes|moies|nomëttes|owes|nuets)/i,
				wide: /^(moies|nomëttes|Mëtternuecht|mëttes|moies|nomëttes|owes|nuets)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: {
				am: /^m/i,
				pm: /^n/i,
				midnight: /^Mëtter/i,
				noon: /^mëttes/i,
				morning: /moies/i,
				afternoon: /nomëttes/i,
				evening: /owes/i,
				night: /nuets/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/lt/_lib/formatDistance.js
var translations = {
	xseconds_other: "sekundė_sekundžių_sekundes",
	xminutes_one: "minutė_minutės_minutę",
	xminutes_other: "minutės_minučių_minutes",
	xhours_one: "valanda_valandos_valandą",
	xhours_other: "valandos_valandų_valandas",
	xdays_one: "diena_dienos_dieną",
	xdays_other: "dienos_dienų_dienas",
	xweeks_one: "savaitė_savaitės_savaitę",
	xweeks_other: "savaitės_savaičių_savaites",
	xmonths_one: "mėnuo_mėnesio_mėnesį",
	xmonths_other: "mėnesiai_mėnesių_mėnesius",
	xyears_one: "metai_metų_metus",
	xyears_other: "metai_metų_metus",
	about: "apie",
	over: "daugiau nei",
	almost: "beveik",
	lessthan: "mažiau nei"
};
var translateSeconds = (_number, addSuffix, _key, isFuture) => {
	if (!addSuffix) return "kelios sekundės";
	else return isFuture ? "kelių sekundžių" : "kelias sekundes";
};
var translateSingular = (_number, addSuffix, key, isFuture) => {
	return !addSuffix ? forms(key)[0] : isFuture ? forms(key)[1] : forms(key)[2];
};
var translate = (number, addSuffix, key, isFuture) => {
	const result = number + " ";
	if (number === 1) return result + translateSingular(number, addSuffix, key, isFuture);
	else if (!addSuffix) return result + (special(number) ? forms(key)[1] : forms(key)[0]);
	else if (isFuture) return result + forms(key)[1];
	else return result + (special(number) ? forms(key)[1] : forms(key)[2]);
};
function special(number) {
	return number % 10 === 0 || number > 10 && number < 20;
}
function forms(key) {
	return translations[key].split("_");
}
var formatDistanceLocale$34 = {
	lessThanXSeconds: {
		one: translateSeconds,
		other: translate
	},
	xSeconds: {
		one: translateSeconds,
		other: translate
	},
	halfAMinute: "pusė minutės",
	lessThanXMinutes: {
		one: translateSingular,
		other: translate
	},
	xMinutes: {
		one: translateSingular,
		other: translate
	},
	aboutXHours: {
		one: translateSingular,
		other: translate
	},
	xHours: {
		one: translateSingular,
		other: translate
	},
	xDays: {
		one: translateSingular,
		other: translate
	},
	aboutXWeeks: {
		one: translateSingular,
		other: translate
	},
	xWeeks: {
		one: translateSingular,
		other: translate
	},
	aboutXMonths: {
		one: translateSingular,
		other: translate
	},
	xMonths: {
		one: translateSingular,
		other: translate
	},
	aboutXYears: {
		one: translateSingular,
		other: translate
	},
	xYears: {
		one: translateSingular,
		other: translate
	},
	overXYears: {
		one: translateSingular,
		other: translate
	},
	almostXYears: {
		one: translateSingular,
		other: translate
	}
};
var formatDistance$34 = (token, count, options) => {
	const adverb = token.match(/about|over|almost|lessthan/i);
	const unit = adverb ? token.replace(adverb[0], "") : token;
	const isFuture = options?.comparison !== void 0 && options.comparison > 0;
	let result;
	const tokenValue = formatDistanceLocale$34[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one(count, options?.addSuffix === true, unit.toLowerCase() + "_one", isFuture);
	else result = tokenValue.other(count, options?.addSuffix === true, unit.toLowerCase() + "_other", isFuture);
	if (adverb) result = translations[adverb[0].toLowerCase()] + " " + result;
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "po " + result;
	else return "prieš " + result;
	return result;
};
var formatLong$34 = {
	date: buildFormatLongFn({
		formats: {
			full: "y 'm'. MMMM d 'd'., EEEE",
			long: "y 'm'. MMMM d 'd'.",
			medium: "y-MM-dd",
			short: "y-MM-dd"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} {{time}}",
			long: "{{date}} {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/lt/_lib/formatRelative.js
var formatRelativeLocale$34 = {
	lastWeek: "'Praėjusį' eeee p",
	yesterday: "'Vakar' p",
	today: "'Šiandien' p",
	tomorrow: "'Rytoj' p",
	nextWeek: "eeee p",
	other: "P"
};
var formatRelative$34 = (token, _date, _baseDate, _options) => formatRelativeLocale$34[token];
//#endregion
//#region ../../node_modules/date-fns/locale/lt/_lib/localize.js
var eraValues$34 = {
	narrow: ["pr. Kr.", "po Kr."],
	abbreviated: ["pr. Kr.", "po Kr."],
	wide: ["prieš Kristų", "po Kristaus"]
};
var quarterValues$34 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"I ketv.",
		"II ketv.",
		"III ketv.",
		"IV ketv."
	],
	wide: [
		"I ketvirtis",
		"II ketvirtis",
		"III ketvirtis",
		"IV ketvirtis"
	]
};
var formattingQuarterValues$2 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"I k.",
		"II k.",
		"III k.",
		"IV k."
	],
	wide: [
		"I ketvirtis",
		"II ketvirtis",
		"III ketvirtis",
		"IV ketvirtis"
	]
};
var monthValues$34 = {
	narrow: [
		"S",
		"V",
		"K",
		"B",
		"G",
		"B",
		"L",
		"R",
		"R",
		"S",
		"L",
		"G"
	],
	abbreviated: [
		"saus.",
		"vas.",
		"kov.",
		"bal.",
		"geg.",
		"birž.",
		"liep.",
		"rugp.",
		"rugs.",
		"spal.",
		"lapkr.",
		"gruod."
	],
	wide: [
		"sausis",
		"vasaris",
		"kovas",
		"balandis",
		"gegužė",
		"birželis",
		"liepa",
		"rugpjūtis",
		"rugsėjis",
		"spalis",
		"lapkritis",
		"gruodis"
	]
};
var formattingMonthValues$8 = {
	narrow: [
		"S",
		"V",
		"K",
		"B",
		"G",
		"B",
		"L",
		"R",
		"R",
		"S",
		"L",
		"G"
	],
	abbreviated: [
		"saus.",
		"vas.",
		"kov.",
		"bal.",
		"geg.",
		"birž.",
		"liep.",
		"rugp.",
		"rugs.",
		"spal.",
		"lapkr.",
		"gruod."
	],
	wide: [
		"sausio",
		"vasario",
		"kovo",
		"balandžio",
		"gegužės",
		"birželio",
		"liepos",
		"rugpjūčio",
		"rugsėjo",
		"spalio",
		"lapkričio",
		"gruodžio"
	]
};
var dayValues$34 = {
	narrow: [
		"S",
		"P",
		"A",
		"T",
		"K",
		"P",
		"Š"
	],
	short: [
		"Sk",
		"Pr",
		"An",
		"Tr",
		"Kt",
		"Pn",
		"Št"
	],
	abbreviated: [
		"sk",
		"pr",
		"an",
		"tr",
		"kt",
		"pn",
		"št"
	],
	wide: [
		"sekmadienis",
		"pirmadienis",
		"antradienis",
		"trečiadienis",
		"ketvirtadienis",
		"penktadienis",
		"šeštadienis"
	]
};
var formattingDayValues$2 = {
	narrow: [
		"S",
		"P",
		"A",
		"T",
		"K",
		"P",
		"Š"
	],
	short: [
		"Sk",
		"Pr",
		"An",
		"Tr",
		"Kt",
		"Pn",
		"Št"
	],
	abbreviated: [
		"sk",
		"pr",
		"an",
		"tr",
		"kt",
		"pn",
		"št"
	],
	wide: [
		"sekmadienį",
		"pirmadienį",
		"antradienį",
		"trečiadienį",
		"ketvirtadienį",
		"penktadienį",
		"šeštadienį"
	]
};
var dayPeriodValues$34 = {
	narrow: {
		am: "pr. p.",
		pm: "pop.",
		midnight: "vidurnaktis",
		noon: "vidurdienis",
		morning: "rytas",
		afternoon: "diena",
		evening: "vakaras",
		night: "naktis"
	},
	abbreviated: {
		am: "priešpiet",
		pm: "popiet",
		midnight: "vidurnaktis",
		noon: "vidurdienis",
		morning: "rytas",
		afternoon: "diena",
		evening: "vakaras",
		night: "naktis"
	},
	wide: {
		am: "priešpiet",
		pm: "popiet",
		midnight: "vidurnaktis",
		noon: "vidurdienis",
		morning: "rytas",
		afternoon: "diena",
		evening: "vakaras",
		night: "naktis"
	}
};
var formattingDayPeriodValues$26 = {
	narrow: {
		am: "pr. p.",
		pm: "pop.",
		midnight: "vidurnaktis",
		noon: "perpiet",
		morning: "rytas",
		afternoon: "popietė",
		evening: "vakaras",
		night: "naktis"
	},
	abbreviated: {
		am: "priešpiet",
		pm: "popiet",
		midnight: "vidurnaktis",
		noon: "perpiet",
		morning: "rytas",
		afternoon: "popietė",
		evening: "vakaras",
		night: "naktis"
	},
	wide: {
		am: "priešpiet",
		pm: "popiet",
		midnight: "vidurnaktis",
		noon: "perpiet",
		morning: "rytas",
		afternoon: "popietė",
		evening: "vakaras",
		night: "naktis"
	}
};
var ordinalNumber$34 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + "-oji";
};
//#endregion
//#region ../../node_modules/date-fns/locale/lt.js
/**
* @category Locales
* @summary Lithuanian locale.
* @language Lithuanian
* @iso-639-2 lit
* @author Pavlo Shpak [@pshpak](https://github.com/pshpak)
* @author Eduardo Pardo [@eduardopsll](https://github.com/eduardopsll)
*/
var lt = {
	code: "lt",
	formatDistance: formatDistance$34,
	formatLong: formatLong$34,
	formatRelative: formatRelative$34,
	localize: {
		ordinalNumber: ordinalNumber$34,
		era: buildLocalizeFn({
			values: eraValues$34,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$34,
			defaultWidth: "wide",
			formattingValues: formattingQuarterValues$2,
			defaultFormattingWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$34,
			defaultWidth: "wide",
			formattingValues: formattingMonthValues$8,
			defaultFormattingWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$34,
			defaultWidth: "wide",
			formattingValues: formattingDayValues$2,
			defaultFormattingWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$34,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$26,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(-oji)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^p(r|o)\.?\s?(kr\.?|me)/i,
				abbreviated: /^(pr\.\s?(kr\.|m\.\s?e\.)|po\s?kr\.|mūsų eroje)/i,
				wide: /^(prieš Kristų|prieš mūsų erą|po Kristaus|mūsų eroje)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				wide: [/prieš/i, /(po|mūsų)/i],
				any: [/^pr/i, /^(po|m)/i]
			},
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^([1234])/i,
				abbreviated: /^(I|II|III|IV)\s?ketv?\.?/i,
				wide: /^(I|II|III|IV)\s?ketvirtis/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/1/i,
					/2/i,
					/3/i,
					/4/i
				],
				any: [
					/I$/i,
					/II$/i,
					/III/i,
					/IV/i
				]
			},
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[svkbglr]/i,
				abbreviated: /^(saus\.|vas\.|kov\.|bal\.|geg\.|birž\.|liep\.|rugp\.|rugs\.|spal\.|lapkr\.|gruod\.)/i,
				wide: /^(sausi(s|o)|vasari(s|o)|kov(a|o)s|balandž?i(s|o)|gegužės?|birželi(s|o)|liep(a|os)|rugpjū(t|č)i(s|o)|rugsėj(is|o)|spali(s|o)|lapkri(t|č)i(s|o)|gruodž?i(s|o))/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^s/i,
					/^v/i,
					/^k/i,
					/^b/i,
					/^g/i,
					/^b/i,
					/^l/i,
					/^r/i,
					/^r/i,
					/^s/i,
					/^l/i,
					/^g/i
				],
				any: [
					/^saus/i,
					/^vas/i,
					/^kov/i,
					/^bal/i,
					/^geg/i,
					/^birž/i,
					/^liep/i,
					/^rugp/i,
					/^rugs/i,
					/^spal/i,
					/^lapkr/i,
					/^gruod/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[spatkš]/i,
				short: /^(sk|pr|an|tr|kt|pn|št)/i,
				abbreviated: /^(sk|pr|an|tr|kt|pn|št)/i,
				wide: /^(sekmadien(is|į)|pirmadien(is|į)|antradien(is|į)|trečiadien(is|į)|ketvirtadien(is|į)|penktadien(is|į)|šeštadien(is|į))/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^s/i,
					/^p/i,
					/^a/i,
					/^t/i,
					/^k/i,
					/^p/i,
					/^š/i
				],
				wide: [
					/^se/i,
					/^pi/i,
					/^an/i,
					/^tr/i,
					/^ke/i,
					/^pe/i,
					/^še/i
				],
				any: [
					/^sk/i,
					/^pr/i,
					/^an/i,
					/^tr/i,
					/^kt/i,
					/^pn/i,
					/^št/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(pr.\s?p.|pop.|vidurnaktis|(vidurdienis|perpiet)|rytas|(diena|popietė)|vakaras|naktis)/i,
				any: /^(priešpiet|popiet$|vidurnaktis|(vidurdienis|perpiet)|rytas|(diena|popietė)|vakaras|naktis)/i
			},
			defaultMatchWidth: "any",
			parsePatterns: {
				narrow: {
					am: /^pr/i,
					pm: /^pop./i,
					midnight: /^vidurnaktis/i,
					noon: /^(vidurdienis|perp)/i,
					morning: /rytas/i,
					afternoon: /(die|popietė)/i,
					evening: /vakaras/i,
					night: /naktis/i
				},
				any: {
					am: /^pr/i,
					pm: /^popiet$/i,
					midnight: /^vidurnaktis/i,
					noon: /^(vidurdienis|perp)/i,
					morning: /rytas/i,
					afternoon: /(die|popietė)/i,
					evening: /vakaras/i,
					night: /naktis/i
				}
			},
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/lv/_lib/formatDistance.js
function buildLocalizeTokenFn$2(schema) {
	return (count, options) => {
		if (count === 1) if (options?.addSuffix) return schema.one[0].replace("{{time}}", schema.one[2]);
		else return schema.one[0].replace("{{time}}", schema.one[1]);
		else {
			const rem = count % 10 === 1 && count % 100 !== 11;
			if (options?.addSuffix) return schema.other[0].replace("{{time}}", rem ? schema.other[3] : schema.other[4]).replace("{{count}}", String(count));
			else return schema.other[0].replace("{{time}}", rem ? schema.other[1] : schema.other[2]).replace("{{count}}", String(count));
		}
	};
}
var formatDistanceLocale$33 = {
	lessThanXSeconds: buildLocalizeTokenFn$2({
		one: [
			"mazāk par {{time}}",
			"sekundi",
			"sekundi"
		],
		other: [
			"mazāk nekā {{count}} {{time}}",
			"sekunde",
			"sekundes",
			"sekundes",
			"sekundēm"
		]
	}),
	xSeconds: buildLocalizeTokenFn$2({
		one: [
			"1 {{time}}",
			"sekunde",
			"sekundes"
		],
		other: [
			"{{count}} {{time}}",
			"sekunde",
			"sekundes",
			"sekundes",
			"sekundēm"
		]
	}),
	halfAMinute: (_count, options) => {
		if (options?.addSuffix) return "pusminūtes";
		else return "pusminūte";
	},
	lessThanXMinutes: buildLocalizeTokenFn$2({
		one: [
			"mazāk par {{time}}",
			"minūti",
			"minūti"
		],
		other: [
			"mazāk nekā {{count}} {{time}}",
			"minūte",
			"minūtes",
			"minūtes",
			"minūtēm"
		]
	}),
	xMinutes: buildLocalizeTokenFn$2({
		one: [
			"1 {{time}}",
			"minūte",
			"minūtes"
		],
		other: [
			"{{count}} {{time}}",
			"minūte",
			"minūtes",
			"minūtes",
			"minūtēm"
		]
	}),
	aboutXHours: buildLocalizeTokenFn$2({
		one: [
			"apmēram 1 {{time}}",
			"stunda",
			"stundas"
		],
		other: [
			"apmēram {{count}} {{time}}",
			"stunda",
			"stundas",
			"stundas",
			"stundām"
		]
	}),
	xHours: buildLocalizeTokenFn$2({
		one: [
			"1 {{time}}",
			"stunda",
			"stundas"
		],
		other: [
			"{{count}} {{time}}",
			"stunda",
			"stundas",
			"stundas",
			"stundām"
		]
	}),
	xDays: buildLocalizeTokenFn$2({
		one: [
			"1 {{time}}",
			"diena",
			"dienas"
		],
		other: [
			"{{count}} {{time}}",
			"diena",
			"dienas",
			"dienas",
			"dienām"
		]
	}),
	aboutXWeeks: buildLocalizeTokenFn$2({
		one: [
			"apmēram 1 {{time}}",
			"nedēļa",
			"nedēļas"
		],
		other: [
			"apmēram {{count}} {{time}}",
			"nedēļa",
			"nedēļu",
			"nedēļas",
			"nedēļām"
		]
	}),
	xWeeks: buildLocalizeTokenFn$2({
		one: [
			"1 {{time}}",
			"nedēļa",
			"nedēļas"
		],
		other: [
			"{{count}} {{time}}",
			"nedēļa",
			"nedēļu",
			"nedēļas",
			"nedēļām"
		]
	}),
	aboutXMonths: buildLocalizeTokenFn$2({
		one: [
			"apmēram 1 {{time}}",
			"mēnesis",
			"mēneša"
		],
		other: [
			"apmēram {{count}} {{time}}",
			"mēnesis",
			"mēneši",
			"mēneša",
			"mēnešiem"
		]
	}),
	xMonths: buildLocalizeTokenFn$2({
		one: [
			"1 {{time}}",
			"mēnesis",
			"mēneša"
		],
		other: [
			"{{count}} {{time}}",
			"mēnesis",
			"mēneši",
			"mēneša",
			"mēnešiem"
		]
	}),
	aboutXYears: buildLocalizeTokenFn$2({
		one: [
			"apmēram 1 {{time}}",
			"gads",
			"gada"
		],
		other: [
			"apmēram {{count}} {{time}}",
			"gads",
			"gadi",
			"gada",
			"gadiem"
		]
	}),
	xYears: buildLocalizeTokenFn$2({
		one: [
			"1 {{time}}",
			"gads",
			"gada"
		],
		other: [
			"{{count}} {{time}}",
			"gads",
			"gadi",
			"gada",
			"gadiem"
		]
	}),
	overXYears: buildLocalizeTokenFn$2({
		one: [
			"ilgāk par 1 {{time}}",
			"gadu",
			"gadu"
		],
		other: [
			"vairāk nekā {{count}} {{time}}",
			"gads",
			"gadi",
			"gada",
			"gadiem"
		]
	}),
	almostXYears: buildLocalizeTokenFn$2({
		one: [
			"gandrīz 1 {{time}}",
			"gads",
			"gada"
		],
		other: [
			"vairāk nekā {{count}} {{time}}",
			"gads",
			"gadi",
			"gada",
			"gadiem"
		]
	})
};
var formatDistance$33 = (token, count, options) => {
	const result = formatDistanceLocale$33[token](count, options);
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "pēc " + result;
	else return "pirms " + result;
	return result;
};
var formatLong$33 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, y. 'gada' d. MMMM",
			long: "y. 'gada' d. MMMM",
			medium: "dd.MM.y.",
			short: "dd.MM.y."
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'plkst.' {{time}}",
			long: "{{date}} 'plkst.' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/lv/_lib/formatRelative.js
var weekdays$1 = [
	"svētdienā",
	"pirmdienā",
	"otrdienā",
	"trešdienā",
	"ceturtdienā",
	"piektdienā",
	"sestdienā"
];
var formatRelativeLocale$33 = {
	lastWeek: (date, baseDate, options) => {
		if (isSameWeek(date, baseDate, options)) return "eeee 'plkst.' p";
		return "'Pagājušā " + weekdays$1[date.getDay()] + " plkst.' p";
	},
	yesterday: "'Vakar plkst.' p",
	today: "'Šodien plkst.' p",
	tomorrow: "'Rīt plkst.' p",
	nextWeek: (date, baseDate, options) => {
		if (isSameWeek(date, baseDate, options)) return "eeee 'plkst.' p";
		return "'Nākamajā " + weekdays$1[date.getDay()] + " plkst.' p";
	},
	other: "P"
};
var formatRelative$33 = (token, date, baseDate, options) => {
	const format = formatRelativeLocale$33[token];
	if (typeof format === "function") return format(date, baseDate, options);
	return format;
};
//#endregion
//#region ../../node_modules/date-fns/locale/lv/_lib/localize.js
var eraValues$33 = {
	narrow: ["p.m.ē", "m.ē"],
	abbreviated: ["p. m. ē.", "m. ē."],
	wide: ["pirms mūsu ēras", "mūsu ērā"]
};
var quarterValues$33 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"1. cet.",
		"2. cet.",
		"3. cet.",
		"4. cet."
	],
	wide: [
		"pirmais ceturksnis",
		"otrais ceturksnis",
		"trešais ceturksnis",
		"ceturtais ceturksnis"
	]
};
var formattingQuarterValues$1 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"1. cet.",
		"2. cet.",
		"3. cet.",
		"4. cet."
	],
	wide: [
		"pirmajā ceturksnī",
		"otrajā ceturksnī",
		"trešajā ceturksnī",
		"ceturtajā ceturksnī"
	]
};
var monthValues$33 = {
	narrow: [
		"J",
		"F",
		"M",
		"A",
		"M",
		"J",
		"J",
		"A",
		"S",
		"O",
		"N",
		"D"
	],
	abbreviated: [
		"janv.",
		"febr.",
		"marts",
		"apr.",
		"maijs",
		"jūn.",
		"jūl.",
		"aug.",
		"sept.",
		"okt.",
		"nov.",
		"dec."
	],
	wide: [
		"janvāris",
		"februāris",
		"marts",
		"aprīlis",
		"maijs",
		"jūnijs",
		"jūlijs",
		"augusts",
		"septembris",
		"oktobris",
		"novembris",
		"decembris"
	]
};
var formattingMonthValues$7 = {
	narrow: [
		"J",
		"F",
		"M",
		"A",
		"M",
		"J",
		"J",
		"A",
		"S",
		"O",
		"N",
		"D"
	],
	abbreviated: [
		"janv.",
		"febr.",
		"martā",
		"apr.",
		"maijs",
		"jūn.",
		"jūl.",
		"aug.",
		"sept.",
		"okt.",
		"nov.",
		"dec."
	],
	wide: [
		"janvārī",
		"februārī",
		"martā",
		"aprīlī",
		"maijā",
		"jūnijā",
		"jūlijā",
		"augustā",
		"septembrī",
		"oktobrī",
		"novembrī",
		"decembrī"
	]
};
var dayValues$33 = {
	narrow: [
		"S",
		"P",
		"O",
		"T",
		"C",
		"P",
		"S"
	],
	short: [
		"Sv",
		"P",
		"O",
		"T",
		"C",
		"Pk",
		"S"
	],
	abbreviated: [
		"svētd.",
		"pirmd.",
		"otrd.",
		"trešd.",
		"ceturtd.",
		"piektd.",
		"sestd."
	],
	wide: [
		"svētdiena",
		"pirmdiena",
		"otrdiena",
		"trešdiena",
		"ceturtdiena",
		"piektdiena",
		"sestdiena"
	]
};
var formattingDayValues$1 = {
	narrow: [
		"S",
		"P",
		"O",
		"T",
		"C",
		"P",
		"S"
	],
	short: [
		"Sv",
		"P",
		"O",
		"T",
		"C",
		"Pk",
		"S"
	],
	abbreviated: [
		"svētd.",
		"pirmd.",
		"otrd.",
		"trešd.",
		"ceturtd.",
		"piektd.",
		"sestd."
	],
	wide: [
		"svētdienā",
		"pirmdienā",
		"otrdienā",
		"trešdienā",
		"ceturtdienā",
		"piektdienā",
		"sestdienā"
	]
};
var dayPeriodValues$33 = {
	narrow: {
		am: "am",
		pm: "pm",
		midnight: "pusn.",
		noon: "pusd.",
		morning: "rīts",
		afternoon: "diena",
		evening: "vakars",
		night: "nakts"
	},
	abbreviated: {
		am: "am",
		pm: "pm",
		midnight: "pusn.",
		noon: "pusd.",
		morning: "rīts",
		afternoon: "pēcpusd.",
		evening: "vakars",
		night: "nakts"
	},
	wide: {
		am: "am",
		pm: "pm",
		midnight: "pusnakts",
		noon: "pusdienlaiks",
		morning: "rīts",
		afternoon: "pēcpusdiena",
		evening: "vakars",
		night: "nakts"
	}
};
var formattingDayPeriodValues$25 = {
	narrow: {
		am: "am",
		pm: "pm",
		midnight: "pusn.",
		noon: "pusd.",
		morning: "rītā",
		afternoon: "dienā",
		evening: "vakarā",
		night: "naktī"
	},
	abbreviated: {
		am: "am",
		pm: "pm",
		midnight: "pusn.",
		noon: "pusd.",
		morning: "rītā",
		afternoon: "pēcpusd.",
		evening: "vakarā",
		night: "naktī"
	},
	wide: {
		am: "am",
		pm: "pm",
		midnight: "pusnaktī",
		noon: "pusdienlaikā",
		morning: "rītā",
		afternoon: "pēcpusdienā",
		evening: "vakarā",
		night: "naktī"
	}
};
var ordinalNumber$33 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + ".";
};
//#endregion
//#region ../../node_modules/date-fns/locale/lv.js
/**
* @category Locales
* @summary Latvian locale (Latvia).
* @language Latvian
* @iso-639-2 lav
* @author Rūdolfs Puķītis [@prudolfs](https://github.com/prudolfs)
*/
var lv = {
	code: "lv",
	formatDistance: formatDistance$33,
	formatLong: formatLong$33,
	formatRelative: formatRelative$33,
	localize: {
		ordinalNumber: ordinalNumber$33,
		era: buildLocalizeFn({
			values: eraValues$33,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$33,
			defaultWidth: "wide",
			formattingValues: formattingQuarterValues$1,
			defaultFormattingWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$33,
			defaultWidth: "wide",
			formattingValues: formattingMonthValues$7,
			defaultFormattingWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$33,
			defaultWidth: "wide",
			formattingValues: formattingDayValues$1,
			defaultFormattingWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$33,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$25,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)\./i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(p\.m\.ē|m\.ē)/i,
				abbreviated: /^(p\. m\. ē\.|m\. ē\.)/i,
				wide: /^(pirms mūsu ēras|mūsu ērā)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^p/i, /^m/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^[1234](\. cet\.)/i,
				wide: /^(pirma(is|jā)|otra(is|jā)|treša(is|jā)|ceturta(is|jā)) ceturksn(is|ī)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^1/i,
					/^2/i,
					/^3/i,
					/^4/i
				],
				abbreviated: [
					/^1/i,
					/^2/i,
					/^3/i,
					/^4/i
				],
				wide: [
					/^p/i,
					/^o/i,
					/^t/i,
					/^c/i
				]
			},
			defaultParseWidth: "wide",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[jfmasond]/i,
				abbreviated: /^(janv\.|febr\.|marts|apr\.|maijs|jūn\.|jūl\.|aug\.|sept\.|okt\.|nov\.|dec\.)/i,
				wide: /^(janvār(is|ī)|februār(is|ī)|mart[sā]|aprīl(is|ī)|maij[sā]|jūnij[sā]|jūlij[sā]|august[sā]|septembr(is|ī)|oktobr(is|ī)|novembr(is|ī)|decembr(is|ī))/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^j/i,
					/^f/i,
					/^m/i,
					/^a/i,
					/^m/i,
					/^j/i,
					/^j/i,
					/^a/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				],
				any: [
					/^ja/i,
					/^f/i,
					/^mar/i,
					/^ap/i,
					/^mai/i,
					/^jūn/i,
					/^jūl/i,
					/^au/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[spotc]/i,
				short: /^(sv|pi|o|t|c|pk|s)/i,
				abbreviated: /^(svētd\.|pirmd\.|otrd.\|trešd\.|ceturtd\.|piektd\.|sestd\.)/i,
				wide: /^(svētdien(a|ā)|pirmdien(a|ā)|otrdien(a|ā)|trešdien(a|ā)|ceturtdien(a|ā)|piektdien(a|ā)|sestdien(a|ā))/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^s/i,
					/^p/i,
					/^o/i,
					/^t/i,
					/^c/i,
					/^p/i,
					/^s/i
				],
				any: [
					/^sv/i,
					/^pi/i,
					/^o/i,
					/^t/i,
					/^c/i,
					/^p/i,
					/^se/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(am|pm|pusn\.|pusd\.|rīt(s|ā)|dien(a|ā)|vakar(s|ā)|nakt(s|ī))/,
				abbreviated: /^(am|pm|pusn\.|pusd\.|rīt(s|ā)|pēcpusd\.|vakar(s|ā)|nakt(s|ī))/,
				wide: /^(am|pm|pusnakt(s|ī)|pusdienlaik(s|ā)|rīt(s|ā)|pēcpusdien(a|ā)|vakar(s|ā)|nakt(s|ī))/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: {
				am: /^am/i,
				pm: /^pm/i,
				midnight: /^pusn/i,
				noon: /^pusd/i,
				morning: /^r/i,
				afternoon: /^(d|pēc)/i,
				evening: /^v/i,
				night: /^n/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/mk/_lib/formatDistance.js
var formatDistanceLocale$32 = {
	lessThanXSeconds: {
		one: "помалку од секунда",
		other: "помалку од {{count}} секунди"
	},
	xSeconds: {
		one: "1 секунда",
		other: "{{count}} секунди"
	},
	halfAMinute: "половина минута",
	lessThanXMinutes: {
		one: "помалку од минута",
		other: "помалку од {{count}} минути"
	},
	xMinutes: {
		one: "1 минута",
		other: "{{count}} минути"
	},
	aboutXHours: {
		one: "околу 1 час",
		other: "околу {{count}} часа"
	},
	xHours: {
		one: "1 час",
		other: "{{count}} часа"
	},
	xDays: {
		one: "1 ден",
		other: "{{count}} дена"
	},
	aboutXWeeks: {
		one: "околу 1 недела",
		other: "околу {{count}} месеци"
	},
	xWeeks: {
		one: "1 недела",
		other: "{{count}} недели"
	},
	aboutXMonths: {
		one: "околу 1 месец",
		other: "околу {{count}} недели"
	},
	xMonths: {
		one: "1 месец",
		other: "{{count}} месеци"
	},
	aboutXYears: {
		one: "околу 1 година",
		other: "околу {{count}} години"
	},
	xYears: {
		one: "1 година",
		other: "{{count}} години"
	},
	overXYears: {
		one: "повеќе од 1 година",
		other: "повеќе од {{count}} години"
	},
	almostXYears: {
		one: "безмалку 1 година",
		other: "безмалку {{count}} години"
	}
};
var formatDistance$32 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$32[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "за " + result;
	else return "пред " + result;
	return result;
};
var formatLong$32 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, dd MMMM yyyy",
			long: "dd MMMM yyyy",
			medium: "dd MMM yyyy",
			short: "dd/MM/yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "H:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: { any: "{{date}} {{time}}" },
		defaultWidth: "any"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/mk/_lib/formatRelative.js
var weekdays = [
	"недела",
	"понеделник",
	"вторник",
	"среда",
	"четврток",
	"петок",
	"сабота"
];
function lastWeek$3(day) {
	const weekday = weekdays[day];
	switch (day) {
		case 0:
		case 3:
		case 6: return "'минатата " + weekday + " во' p";
		case 1:
		case 2:
		case 4:
		case 5: return "'минатиот " + weekday + " во' p";
	}
}
function thisWeek$3(day) {
	const weekday = weekdays[day];
	switch (day) {
		case 0:
		case 3:
		case 6: return "'ова " + weekday + " вo' p";
		case 1:
		case 2:
		case 4:
		case 5: return "'овој " + weekday + " вo' p";
	}
}
function nextWeek$3(day) {
	const weekday = weekdays[day];
	switch (day) {
		case 0:
		case 3:
		case 6: return "'следната " + weekday + " вo' p";
		case 1:
		case 2:
		case 4:
		case 5: return "'следниот " + weekday + " вo' p";
	}
}
var formatRelativeLocale$32 = {
	lastWeek: (date, baseDate, options) => {
		const day = date.getDay();
		if (isSameWeek(date, baseDate, options)) return thisWeek$3(day);
		else return lastWeek$3(day);
	},
	yesterday: "'вчера во' p",
	today: "'денес во' p",
	tomorrow: "'утре во' p",
	nextWeek: (date, baseDate, options) => {
		const day = date.getDay();
		if (isSameWeek(date, baseDate, options)) return thisWeek$3(day);
		else return nextWeek$3(day);
	},
	other: "P"
};
var formatRelative$32 = (token, date, baseDate, options) => {
	const format = formatRelativeLocale$32[token];
	if (typeof format === "function") return format(date, baseDate, options);
	return format;
};
//#endregion
//#region ../../node_modules/date-fns/locale/mk/_lib/localize.js
var eraValues$32 = {
	narrow: ["пр.н.е.", "н.е."],
	abbreviated: ["пред н. е.", "н. е."],
	wide: ["пред нашата ера", "нашата ера"]
};
var quarterValues$32 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"1-ви кв.",
		"2-ри кв.",
		"3-ти кв.",
		"4-ти кв."
	],
	wide: [
		"1-ви квартал",
		"2-ри квартал",
		"3-ти квартал",
		"4-ти квартал"
	]
};
var monthValues$32 = {
	abbreviated: [
		"јан",
		"фев",
		"мар",
		"апр",
		"мај",
		"јун",
		"јул",
		"авг",
		"септ",
		"окт",
		"ноем",
		"дек"
	],
	wide: [
		"јануари",
		"февруари",
		"март",
		"април",
		"мај",
		"јуни",
		"јули",
		"август",
		"септември",
		"октомври",
		"ноември",
		"декември"
	]
};
var dayValues$32 = {
	narrow: [
		"Н",
		"П",
		"В",
		"С",
		"Ч",
		"П",
		"С"
	],
	short: [
		"не",
		"по",
		"вт",
		"ср",
		"че",
		"пе",
		"са"
	],
	abbreviated: [
		"нед",
		"пон",
		"вто",
		"сре",
		"чет",
		"пет",
		"саб"
	],
	wide: [
		"недела",
		"понеделник",
		"вторник",
		"среда",
		"четврток",
		"петок",
		"сабота"
	]
};
var dayPeriodValues$32 = { wide: {
	am: "претпладне",
	pm: "попладне",
	midnight: "полноќ",
	noon: "напладне",
	morning: "наутро",
	afternoon: "попладне",
	evening: "навечер",
	night: "ноќе"
} };
var ordinalNumber$32 = (dirtyNumber, _options) => {
	const number = Number(dirtyNumber);
	const rem100 = number % 100;
	if (rem100 > 20 || rem100 < 10) switch (rem100 % 10) {
		case 1: return number + "-ви";
		case 2: return number + "-ри";
		case 7:
		case 8: return number + "-ми";
	}
	return number + "-ти";
};
//#endregion
//#region ../../node_modules/date-fns/locale/mk.js
/**
* @category Locales
* @summary Macedonian locale.
* @language Macedonian
* @iso-639-2 mkd
* @author Petar Vlahu [@vlahupetar](https://github.com/vlahupetar)
* @author Altrim Beqiri [@altrim](https://github.com/altrim)
*/
var mk = {
	code: "mk",
	formatDistance: formatDistance$32,
	formatLong: formatLong$32,
	formatRelative: formatRelative$32,
	localize: {
		ordinalNumber: ordinalNumber$32,
		era: buildLocalizeFn({
			values: eraValues$32,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$32,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$32,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$32,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$32,
			defaultWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(-?[врмт][и])?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^((пр)?н\.?\s?е\.?)/i,
				abbreviated: /^((пр)?н\.?\s?е\.?)/i,
				wide: /^(пред нашата ера|нашата ера)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^п/i, /^н/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^[1234](-?[врт]?и?)? кв.?/i,
				wide: /^[1234](-?[врт]?и?)? квартал/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				abbreviated: /^(јан|фев|мар|апр|мај|јун|јул|авг|сеп|окт|ноем|дек)/i,
				wide: /^(јануари|февруари|март|април|мај|јуни|јули|август|септември|октомври|ноември|декември)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/^ја/i,
				/^Ф/i,
				/^мар/i,
				/^ап/i,
				/^мај/i,
				/^јун/i,
				/^јул/i,
				/^ав/i,
				/^се/i,
				/^окт/i,
				/^но/i,
				/^де/i
			] },
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[нпвсч]/i,
				short: /^(не|по|вт|ср|че|пе|са)/i,
				abbreviated: /^(нед|пон|вто|сре|чет|пет|саб)/i,
				wide: /^(недела|понеделник|вторник|среда|четврток|петок|сабота)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^н/i,
					/^п/i,
					/^в/i,
					/^с/i,
					/^ч/i,
					/^п/i,
					/^с/i
				],
				any: [
					/^н[ед]/i,
					/^п[он]/i,
					/^вт/i,
					/^ср/i,
					/^ч[ет]/i,
					/^п[ет]/i,
					/^с[аб]/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: { any: /^(претп|попл|полноќ|утро|пладне|вечер|ноќ)/i },
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /претпладне/i,
				pm: /попладне/i,
				midnight: /полноќ/i,
				noon: /напладне/i,
				morning: /наутро/i,
				afternoon: /попладне/i,
				evening: /навечер/i,
				night: /ноќе/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/mn/_lib/formatDistance.js
var formatDistanceLocale$31 = {
	lessThanXSeconds: {
		one: "секунд хүрэхгүй",
		other: "{{count}} секунд хүрэхгүй"
	},
	xSeconds: {
		one: "1 секунд",
		other: "{{count}} секунд"
	},
	halfAMinute: "хагас минут",
	lessThanXMinutes: {
		one: "минут хүрэхгүй",
		other: "{{count}} минут хүрэхгүй"
	},
	xMinutes: {
		one: "1 минут",
		other: "{{count}} минут"
	},
	aboutXHours: {
		one: "ойролцоогоор 1 цаг",
		other: "ойролцоогоор {{count}} цаг"
	},
	xHours: {
		one: "1 цаг",
		other: "{{count}} цаг"
	},
	xDays: {
		one: "1 өдөр",
		other: "{{count}} өдөр"
	},
	aboutXWeeks: {
		one: "ойролцоогоор 1 долоо хоног",
		other: "ойролцоогоор {{count}} долоо хоног"
	},
	xWeeks: {
		one: "1 долоо хоног",
		other: "{{count}} долоо хоног"
	},
	aboutXMonths: {
		one: "ойролцоогоор 1 сар",
		other: "ойролцоогоор {{count}} сар"
	},
	xMonths: {
		one: "1 сар",
		other: "{{count}} сар"
	},
	aboutXYears: {
		one: "ойролцоогоор 1 жил",
		other: "ойролцоогоор {{count}} жил"
	},
	xYears: {
		one: "1 жил",
		other: "{{count}} жил"
	},
	overXYears: {
		one: "1 жил гаран",
		other: "{{count}} жил гаран"
	},
	almostXYears: {
		one: "бараг 1 жил",
		other: "бараг {{count}} жил"
	}
};
var formatDistance$31 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$31[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) {
		/**
		* Append genitive case
		*/
		const words = result.split(" ");
		const lastword = words.pop();
		result = words.join(" ");
		switch (lastword) {
			case "секунд":
				result += " секундийн";
				break;
			case "минут":
				result += " минутын";
				break;
			case "цаг":
				result += " цагийн";
				break;
			case "өдөр":
				result += " өдрийн";
				break;
			case "сар":
				result += " сарын";
				break;
			case "жил":
				result += " жилийн";
				break;
			case "хоног":
				result += " хоногийн";
				break;
			case "гаран":
				result += " гараны";
				break;
			case "хүрэхгүй":
				result += " хүрэхгүй хугацааны";
				break;
			default: result += lastword + "-н";
		}
		if (options.comparison && options.comparison > 0) return result + " дараа";
		else return result + " өмнө";
	}
	return result;
};
var formatLong$31 = {
	date: buildFormatLongFn({
		formats: {
			full: "y 'оны' MMMM'ын' d, EEEE 'гараг'",
			long: "y 'оны' MMMM'ын' d",
			medium: "y 'оны' MMM'ын' d",
			short: "y.MM.dd"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "H:mm:ss zzzz",
			long: "H:mm:ss z",
			medium: "H:mm:ss",
			short: "H:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} {{time}}",
			long: "{{date}} {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/mn/_lib/formatRelative.js
var formatRelativeLocale$31 = {
	lastWeek: "'өнгөрсөн' eeee 'гарагийн' p 'цагт'",
	yesterday: "'өчигдөр' p 'цагт'",
	today: "'өнөөдөр' p 'цагт'",
	tomorrow: "'маргааш' p 'цагт'",
	nextWeek: "'ирэх' eeee 'гарагийн' p 'цагт'",
	other: "P"
};
var formatRelative$31 = (token, _date, _baseDate, _options) => formatRelativeLocale$31[token];
//#endregion
//#region ../../node_modules/date-fns/locale/mn/_lib/localize.js
var eraValues$31 = {
	narrow: ["НТӨ", "НТ"],
	abbreviated: ["НТӨ", "НТ"],
	wide: ["нийтийн тооллын өмнөх", "нийтийн тооллын"]
};
var quarterValues$31 = {
	narrow: [
		"I",
		"II",
		"III",
		"IV"
	],
	abbreviated: [
		"I улирал",
		"II улирал",
		"III улирал",
		"IV улирал"
	],
	wide: [
		"1-р улирал",
		"2-р улирал",
		"3-р улирал",
		"4-р улирал"
	]
};
var monthValues$31 = {
	narrow: [
		"I",
		"II",
		"III",
		"IV",
		"V",
		"VI",
		"VII",
		"VIII",
		"IX",
		"X",
		"XI",
		"XII"
	],
	abbreviated: [
		"1-р сар",
		"2-р сар",
		"3-р сар",
		"4-р сар",
		"5-р сар",
		"6-р сар",
		"7-р сар",
		"8-р сар",
		"9-р сар",
		"10-р сар",
		"11-р сар",
		"12-р сар"
	],
	wide: [
		"Нэгдүгээр сар",
		"Хоёрдугаар сар",
		"Гуравдугаар сар",
		"Дөрөвдүгээр сар",
		"Тавдугаар сар",
		"Зургаадугаар сар",
		"Долоодугаар сар",
		"Наймдугаар сар",
		"Есдүгээр сар",
		"Аравдугаар сар",
		"Арваннэгдүгээр сар",
		"Арван хоёрдугаар сар"
	]
};
var formattingMonthValues$6 = {
	narrow: [
		"I",
		"II",
		"III",
		"IV",
		"V",
		"VI",
		"VII",
		"VIII",
		"IX",
		"X",
		"XI",
		"XII"
	],
	abbreviated: [
		"1-р сар",
		"2-р сар",
		"3-р сар",
		"4-р сар",
		"5-р сар",
		"6-р сар",
		"7-р сар",
		"8-р сар",
		"9-р сар",
		"10-р сар",
		"11-р сар",
		"12-р сар"
	],
	wide: [
		"нэгдүгээр сар",
		"хоёрдугаар сар",
		"гуравдугаар сар",
		"дөрөвдүгээр сар",
		"тавдугаар сар",
		"зургаадугаар сар",
		"долоодугаар сар",
		"наймдугаар сар",
		"есдүгээр сар",
		"аравдугаар сар",
		"арваннэгдүгээр сар",
		"арван хоёрдугаар сар"
	]
};
var dayValues$31 = {
	narrow: [
		"Н",
		"Д",
		"М",
		"Л",
		"П",
		"Б",
		"Б"
	],
	short: [
		"Ня",
		"Да",
		"Мя",
		"Лх",
		"Пү",
		"Ба",
		"Бя"
	],
	abbreviated: [
		"Ням",
		"Дав",
		"Мяг",
		"Лха",
		"Пүр",
		"Баа",
		"Бям"
	],
	wide: [
		"Ням",
		"Даваа",
		"Мягмар",
		"Лхагва",
		"Пүрэв",
		"Баасан",
		"Бямба"
	]
};
var formattingDayValues = {
	narrow: [
		"Н",
		"Д",
		"М",
		"Л",
		"П",
		"Б",
		"Б"
	],
	short: [
		"Ня",
		"Да",
		"Мя",
		"Лх",
		"Пү",
		"Ба",
		"Бя"
	],
	abbreviated: [
		"Ням",
		"Дав",
		"Мяг",
		"Лха",
		"Пүр",
		"Баа",
		"Бям"
	],
	wide: [
		"ням",
		"даваа",
		"мягмар",
		"лхагва",
		"пүрэв",
		"баасан",
		"бямба"
	]
};
var dayPeriodValues$31 = {
	narrow: {
		am: "ү.ө.",
		pm: "ү.х.",
		midnight: "шөнө дунд",
		noon: "үд дунд",
		morning: "өглөө",
		afternoon: "өдөр",
		evening: "орой",
		night: "шөнө"
	},
	abbreviated: {
		am: "ү.ө.",
		pm: "ү.х.",
		midnight: "шөнө дунд",
		noon: "үд дунд",
		morning: "өглөө",
		afternoon: "өдөр",
		evening: "орой",
		night: "шөнө"
	},
	wide: {
		am: "ү.ө.",
		pm: "ү.х.",
		midnight: "шөнө дунд",
		noon: "үд дунд",
		morning: "өглөө",
		afternoon: "өдөр",
		evening: "орой",
		night: "шөнө"
	}
};
var ordinalNumber$31 = (dirtyNumber, _options) => {
	return String(dirtyNumber);
};
//#endregion
//#region ../../node_modules/date-fns/locale/mn.js
/**
* @category Locales
* @summary Mongolian locale.
* @language Mongolian
* @iso-639-2 mon
* @author Bilguun Ochirbat [@bilguun0203](https://github.com/bilguun0203)
*/
var mn = {
	code: "mn",
	formatDistance: formatDistance$31,
	formatLong: formatLong$31,
	formatRelative: formatRelative$31,
	localize: {
		ordinalNumber: ordinalNumber$31,
		era: buildLocalizeFn({
			values: eraValues$31,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$31,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$31,
			defaultWidth: "wide",
			formattingValues: formattingMonthValues$6,
			defaultFormattingWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$31,
			defaultWidth: "wide",
			formattingValues: formattingDayValues,
			defaultFormattingWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$31,
			defaultWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /\d+/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(нтө|нт)/i,
				abbreviated: /^(нтө|нт)/i,
				wide: /^(нийтийн тооллын өмнө|нийтийн тооллын)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^(нтө|нийтийн тооллын өмнө)/i, /^(нт|нийтийн тооллын)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^(iv|iii|ii|i)/i,
				abbreviated: /^(iv|iii|ii|i) улирал/i,
				wide: /^[1-4]-р улирал/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/^(i(\s|$)|1)/i,
				/^(ii(\s|$)|2)/i,
				/^(iii(\s|$)|3)/i,
				/^(iv(\s|$)|4)/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^(xii|xi|x|ix|viii|vii|vi|v|iv|iii|ii|i)/i,
				abbreviated: /^(1-р сар|2-р сар|3-р сар|4-р сар|5-р сар|6-р сар|7-р сар|8-р сар|9-р сар|10-р сар|11-р сар|12-р сар)/i,
				wide: /^(нэгдүгээр сар|хоёрдугаар сар|гуравдугаар сар|дөрөвдүгээр сар|тавдугаар сар|зургаадугаар сар|долоодугаар сар|наймдугаар сар|есдүгээр сар|аравдугаар сар|арван нэгдүгээр сар|арван хоёрдугаар сар)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^i$/i,
					/^ii$/i,
					/^iii$/i,
					/^iv$/i,
					/^v$/i,
					/^vi$/i,
					/^vii$/i,
					/^viii$/i,
					/^ix$/i,
					/^x$/i,
					/^xi$/i,
					/^xii$/i
				],
				any: [
					/^(1|нэгдүгээр)/i,
					/^(2|хоёрдугаар)/i,
					/^(3|гуравдугаар)/i,
					/^(4|дөрөвдүгээр)/i,
					/^(5|тавдугаар)/i,
					/^(6|зургаадугаар)/i,
					/^(7|долоодугаар)/i,
					/^(8|наймдугаар)/i,
					/^(9|есдүгээр)/i,
					/^(10|аравдугаар)/i,
					/^(11|арван нэгдүгээр)/i,
					/^(12|арван хоёрдугаар)/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[ндмлпбб]/i,
				short: /^(ня|да|мя|лх|пү|ба|бя)/i,
				abbreviated: /^(ням|дав|мяг|лха|пүр|баа|бям)/i,
				wide: /^(ням|даваа|мягмар|лхагва|пүрэв|баасан|бямба)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^н/i,
					/^д/i,
					/^м/i,
					/^л/i,
					/^п/i,
					/^б/i,
					/^б/i
				],
				any: [
					/^ня/i,
					/^да/i,
					/^мя/i,
					/^лх/i,
					/^пү/i,
					/^ба/i,
					/^бя/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(ү\.ө\.|ү\.х\.|шөнө дунд|үд дунд|өглөө|өдөр|орой|шөнө)/i,
				any: /^(ү\.ө\.|ү\.х\.|шөнө дунд|үд дунд|өглөө|өдөр|орой|шөнө)/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^ү\.ө\./i,
				pm: /^ү\.х\./i,
				midnight: /^шөнө дунд/i,
				noon: /^үд дунд/i,
				morning: /өглөө/i,
				afternoon: /өдөр/i,
				evening: /орой/i,
				night: /шөнө/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/ms/_lib/formatDistance.js
var formatDistanceLocale$30 = {
	lessThanXSeconds: {
		one: "kurang dari 1 saat",
		other: "kurang dari {{count}} saat"
	},
	xSeconds: {
		one: "1 saat",
		other: "{{count}} saat"
	},
	halfAMinute: "setengah minit",
	lessThanXMinutes: {
		one: "kurang dari 1 minit",
		other: "kurang dari {{count}} minit"
	},
	xMinutes: {
		one: "1 minit",
		other: "{{count}} minit"
	},
	aboutXHours: {
		one: "sekitar 1 jam",
		other: "sekitar {{count}} jam"
	},
	xHours: {
		one: "1 jam",
		other: "{{count}} jam"
	},
	xDays: {
		one: "1 hari",
		other: "{{count}} hari"
	},
	aboutXWeeks: {
		one: "sekitar 1 minggu",
		other: "sekitar {{count}} minggu"
	},
	xWeeks: {
		one: "1 minggu",
		other: "{{count}} minggu"
	},
	aboutXMonths: {
		one: "sekitar 1 bulan",
		other: "sekitar {{count}} bulan"
	},
	xMonths: {
		one: "1 bulan",
		other: "{{count}} bulan"
	},
	aboutXYears: {
		one: "sekitar 1 tahun",
		other: "sekitar {{count}} tahun"
	},
	xYears: {
		one: "1 tahun",
		other: "{{count}} tahun"
	},
	overXYears: {
		one: "lebih dari 1 tahun",
		other: "lebih dari {{count}} tahun"
	},
	almostXYears: {
		one: "hampir 1 tahun",
		other: "hampir {{count}} tahun"
	}
};
var formatDistance$30 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$30[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "dalam masa " + result;
	else return result + " yang lalu";
	return result;
};
var formatLong$30 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, d MMMM yyyy",
			long: "d MMMM yyyy",
			medium: "d MMM yyyy",
			short: "d/M/yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH.mm.ss",
			long: "HH.mm.ss",
			medium: "HH.mm",
			short: "HH.mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'pukul' {{time}}",
			long: "{{date}} 'pukul' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/ms/_lib/formatRelative.js
var formatRelativeLocale$30 = {
	lastWeek: "eeee 'lepas pada jam' p",
	yesterday: "'Semalam pada jam' p",
	today: "'Hari ini pada jam' p",
	tomorrow: "'Esok pada jam' p",
	nextWeek: "eeee 'pada jam' p",
	other: "P"
};
var formatRelative$30 = (token, _date, _baseDate, _options) => formatRelativeLocale$30[token];
//#endregion
//#region ../../node_modules/date-fns/locale/ms/_lib/localize.js
var eraValues$30 = {
	narrow: ["SM", "M"],
	abbreviated: ["SM", "M"],
	wide: ["Sebelum Masihi", "Masihi"]
};
var quarterValues$30 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"S1",
		"S2",
		"S3",
		"S4"
	],
	wide: [
		"Suku pertama",
		"Suku kedua",
		"Suku ketiga",
		"Suku keempat"
	]
};
var monthValues$30 = {
	narrow: [
		"J",
		"F",
		"M",
		"A",
		"M",
		"J",
		"J",
		"O",
		"S",
		"O",
		"N",
		"D"
	],
	abbreviated: [
		"Jan",
		"Feb",
		"Mac",
		"Apr",
		"Mei",
		"Jun",
		"Jul",
		"Ogo",
		"Sep",
		"Okt",
		"Nov",
		"Dis"
	],
	wide: [
		"Januari",
		"Februari",
		"Mac",
		"April",
		"Mei",
		"Jun",
		"Julai",
		"Ogos",
		"September",
		"Oktober",
		"November",
		"Disember"
	]
};
var dayValues$30 = {
	narrow: [
		"A",
		"I",
		"S",
		"R",
		"K",
		"J",
		"S"
	],
	short: [
		"Ahd",
		"Isn",
		"Sel",
		"Rab",
		"Kha",
		"Jum",
		"Sab"
	],
	abbreviated: [
		"Ahd",
		"Isn",
		"Sel",
		"Rab",
		"Kha",
		"Jum",
		"Sab"
	],
	wide: [
		"Ahad",
		"Isnin",
		"Selasa",
		"Rabu",
		"Khamis",
		"Jumaat",
		"Sabtu"
	]
};
var dayPeriodValues$30 = {
	narrow: {
		am: "am",
		pm: "pm",
		midnight: "tgh malam",
		noon: "tgh hari",
		morning: "pagi",
		afternoon: "tengah hari",
		evening: "petang",
		night: "malam"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "tengah malam",
		noon: "tengah hari",
		morning: "pagi",
		afternoon: "tengah hari",
		evening: "petang",
		night: "malam"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "tengah malam",
		noon: "tengah hari",
		morning: "pagi",
		afternoon: "tengah hari",
		evening: "petang",
		night: "malam"
	}
};
var formattingDayPeriodValues$24 = {
	narrow: {
		am: "am",
		pm: "pm",
		midnight: "tengah malam",
		noon: "tengah hari",
		morning: "pagi",
		afternoon: "tengah hari",
		evening: "petang",
		night: "malam"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "tengah malam",
		noon: "tengah hari",
		morning: "pagi",
		afternoon: "tengah hari",
		evening: "petang",
		night: "malam"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "tengah malam",
		noon: "tengah hari",
		morning: "pagi",
		afternoon: "tengah hari",
		evening: "petang",
		night: "malam"
	}
};
var ordinalNumber$30 = (dirtyNumber, _options) => {
	return "ke-" + Number(dirtyNumber);
};
//#endregion
//#region ../../node_modules/date-fns/locale/ms.js
/**
* @category Locales
* @summary Malay locale.
* @language Malay
* @iso-639-2 msa
* @author Ruban Selvarajah [@Zyten](https://github.com/Zyten)
*/
var ms = {
	code: "ms",
	formatDistance: formatDistance$30,
	formatLong: formatLong$30,
	formatRelative: formatRelative$30,
	localize: {
		ordinalNumber: ordinalNumber$30,
		era: buildLocalizeFn({
			values: eraValues$30,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$30,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$30,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$30,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$30,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$24,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^ke-(\d+)?/i,
			parsePattern: /petama|\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(sm|m)/i,
				abbreviated: /^(s\.?\s?m\.?|m\.?)/i,
				wide: /^(sebelum masihi|masihi)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^s/i, /^(m)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^S[1234]/i,
				wide: /Suku (pertama|kedua|ketiga|keempat)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/pertama|1/i,
				/kedua|2/i,
				/ketiga|3/i,
				/keempat|4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[jfmasond]/i,
				abbreviated: /^(jan|feb|mac|apr|mei|jun|jul|ogo|sep|okt|nov|dis)/i,
				wide: /^(januari|februari|mac|april|mei|jun|julai|ogos|september|oktober|november|disember)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^j/i,
					/^f/i,
					/^m/i,
					/^a/i,
					/^m/i,
					/^j/i,
					/^j/i,
					/^o/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				],
				any: [
					/^ja/i,
					/^f/i,
					/^ma/i,
					/^ap/i,
					/^me/i,
					/^jun/i,
					/^jul/i,
					/^og/i,
					/^s/i,
					/^ok/i,
					/^n/i,
					/^d/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[aisrkj]/i,
				short: /^(ahd|isn|sel|rab|kha|jum|sab)/i,
				abbreviated: /^(ahd|isn|sel|rab|kha|jum|sab)/i,
				wide: /^(ahad|isnin|selasa|rabu|khamis|jumaat|sabtu)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^a/i,
					/^i/i,
					/^s/i,
					/^r/i,
					/^k/i,
					/^j/i,
					/^s/i
				],
				any: [
					/^a/i,
					/^i/i,
					/^se/i,
					/^r/i,
					/^k/i,
					/^j/i,
					/^sa/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(am|pm|tengah malam|tengah hari|pagi|petang|malam)/i,
				any: /^([ap]\.?\s?m\.?|tengah malam|tengah hari|pagi|petang|malam)/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a/i,
				pm: /^pm/i,
				midnight: /^tengah m/i,
				noon: /^tengah h/i,
				morning: /pa/i,
				afternoon: /tengah h/i,
				evening: /pe/i,
				night: /m/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/mt/_lib/formatDistance.js
var formatDistanceLocale$29 = {
	lessThanXSeconds: {
		one: "inqas minn sekonda",
		other: "inqas minn {{count}} sekondi"
	},
	xSeconds: {
		one: "sekonda",
		other: "{{count}} sekondi"
	},
	halfAMinute: "nofs minuta",
	lessThanXMinutes: {
		one: "inqas minn minuta",
		other: "inqas minn {{count}} minuti"
	},
	xMinutes: {
		one: "minuta",
		other: "{{count}} minuti"
	},
	aboutXHours: {
		one: "madwar siegħa",
		other: "madwar {{count}} siegħat"
	},
	xHours: {
		one: "siegħa",
		other: "{{count}} siegħat"
	},
	xDays: {
		one: "ġurnata",
		other: "{{count}} ġranet"
	},
	aboutXWeeks: {
		one: "madwar ġimgħa",
		other: "madwar {{count}} ġimgħat"
	},
	xWeeks: {
		one: "ġimgħa",
		other: "{{count}} ġimgħat"
	},
	aboutXMonths: {
		one: "madwar xahar",
		other: "madwar {{count}} xhur"
	},
	xMonths: {
		one: "xahar",
		other: "{{count}} xhur"
	},
	aboutXYears: {
		one: "madwar sena",
		two: "madwar sentejn",
		other: "madwar {{count}} snin"
	},
	xYears: {
		one: "sena",
		two: "sentejn",
		other: "{{count}} snin"
	},
	overXYears: {
		one: "aktar minn sena",
		two: "aktar minn sentejn",
		other: "aktar minn {{count}} snin"
	},
	almostXYears: {
		one: "kważi sena",
		two: "kważi sentejn",
		other: "kważi {{count}} snin"
	}
};
var formatDistance$29 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$29[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else if (count === 2 && tokenValue.two) result = tokenValue.two;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "f'" + result;
	else return result + " ilu";
	return result;
};
var formatLong$29 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, d MMMM yyyy",
			long: "d MMMM yyyy",
			medium: "d MMM yyyy",
			short: "dd/MM/yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} {{time}}",
			long: "{{date}} {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/mt/_lib/formatRelative.js
var formatRelativeLocale$29 = {
	lastWeek: "eeee 'li għadda' 'fil-'p",
	yesterday: "'Il-bieraħ fil-'p",
	today: "'Illum fil-'p",
	tomorrow: "'Għada fil-'p",
	nextWeek: "eeee 'fil-'p",
	other: "P"
};
var formatRelative$29 = (token, _date, _baseDate, _options) => formatRelativeLocale$29[token];
//#endregion
//#region ../../node_modules/date-fns/locale/mt/_lib/localize.js
var eraValues$29 = {
	narrow: ["Q", "W"],
	abbreviated: ["QK", "WK"],
	wide: ["qabel Kristu", "wara Kristu"]
};
var quarterValues$29 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"K1",
		"K2",
		"K3",
		"K4"
	],
	wide: [
		"1. kwart",
		"2. kwart",
		"3. kwart",
		"4. kwart"
	]
};
var monthValues$29 = {
	narrow: [
		"J",
		"F",
		"M",
		"A",
		"M",
		"Ġ",
		"L",
		"A",
		"S",
		"O",
		"N",
		"D"
	],
	abbreviated: [
		"Jan",
		"Fra",
		"Mar",
		"Apr",
		"Mej",
		"Ġun",
		"Lul",
		"Aww",
		"Set",
		"Ott",
		"Nov",
		"Diċ"
	],
	wide: [
		"Jannar",
		"Frar",
		"Marzu",
		"April",
		"Mejju",
		"Ġunju",
		"Lulju",
		"Awwissu",
		"Settembru",
		"Ottubru",
		"Novembru",
		"Diċembru"
	]
};
var dayValues$29 = {
	narrow: [
		"Ħ",
		"T",
		"T",
		"E",
		"Ħ",
		"Ġ",
		"S"
	],
	short: [
		"Ħa",
		"Tn",
		"Tl",
		"Er",
		"Ħa",
		"Ġi",
		"Si"
	],
	abbreviated: [
		"Ħad",
		"Tne",
		"Tli",
		"Erb",
		"Ħam",
		"Ġim",
		"Sib"
	],
	wide: [
		"Il-Ħadd",
		"It-Tnejn",
		"It-Tlieta",
		"L-Erbgħa",
		"Il-Ħamis",
		"Il-Ġimgħa",
		"Is-Sibt"
	]
};
var dayPeriodValues$29 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "nofsillejl",
		noon: "nofsinhar",
		morning: "għodwa",
		afternoon: "wara nofsinhar",
		evening: "filgħaxija",
		night: "lejl"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "nofsillejl",
		noon: "nofsinhar",
		morning: "għodwa",
		afternoon: "wara nofsinhar",
		evening: "filgħaxija",
		night: "lejl"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "nofsillejl",
		noon: "nofsinhar",
		morning: "għodwa",
		afternoon: "wara nofsinhar",
		evening: "filgħaxija",
		night: "lejl"
	}
};
var formattingDayPeriodValues$23 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "f'nofsillejl",
		noon: "f'nofsinhar",
		morning: "filgħodu",
		afternoon: "wara nofsinhar",
		evening: "filgħaxija",
		night: "billejl"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "f'nofsillejl",
		noon: "f'nofsinhar",
		morning: "filgħodu",
		afternoon: "wara nofsinhar",
		evening: "filgħaxija",
		night: "billejl"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "f'nofsillejl",
		noon: "f'nofsinhar",
		morning: "filgħodu",
		afternoon: "wara nofsinhar",
		evening: "filgħaxija",
		night: "billejl"
	}
};
var ordinalNumber$29 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + "º";
};
//#endregion
//#region ../../node_modules/date-fns/locale/mt.js
/**
* @category Locales
* @summary Maltese locale.
* @language Maltese
* @iso-639-2 mlt
* @author Andras Matzon [@amatzon](@link https://github.com/amatzon)
* @author Bryan Borg [@bryanMt](@link https://github.com/bryanMt)
*/
var mt = {
	code: "mt",
	formatDistance: formatDistance$29,
	formatLong: formatLong$29,
	formatRelative: formatRelative$29,
	localize: {
		ordinalNumber: ordinalNumber$29,
		era: buildLocalizeFn({
			values: eraValues$29,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$29,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$29,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$29,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$29,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$23,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(º)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(q|w)/i,
				abbreviated: /^(q\.?\s?k\.?|b\.?\s?c\.?\s?e\.?|w\.?\s?k\.?)/i,
				wide: /^(qabel kristu|before common era|wara kristu|common era)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^(q|b)/i, /^(w|c)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^k[1234]/i,
				wide: /^[1234](\.)? kwart/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[jfmaglsond]/i,
				abbreviated: /^(jan|fra|mar|apr|mej|ġun|lul|aww|set|ott|nov|diċ)/i,
				wide: /^(jannar|frar|marzu|april|mejju|ġunju|lulju|awwissu|settembru|ottubru|novembru|diċembru)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^j/i,
					/^f/i,
					/^m/i,
					/^a/i,
					/^m/i,
					/^ġ/i,
					/^l/i,
					/^a/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				],
				any: [
					/^ja/i,
					/^f/i,
					/^mar/i,
					/^ap/i,
					/^mej/i,
					/^ġ/i,
					/^l/i,
					/^aw/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[ħteġs]/i,
				short: /^(ħa|tn|tl|er|ħa|ġi|si)/i,
				abbreviated: /^(ħad|tne|tli|erb|ħam|ġim|sib)/i,
				wide: /^(il-ħadd|it-tnejn|it-tlieta|l-erbgħa|il-ħamis|il-ġimgħa|is-sibt)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ħ/i,
					/^t/i,
					/^t/i,
					/^e/i,
					/^ħ/i,
					/^ġ/i,
					/^s/i
				],
				any: [
					/^(il-)?ħad/i,
					/^(it-)?tn/i,
					/^(it-)?tl/i,
					/^(l-)?er/i,
					/^(il-)?ham/i,
					/^(il-)?ġi/i,
					/^(is-)?si/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(a|p|f'nofsillejl|f'nofsinhar|(ta') (għodwa|wara nofsinhar|filgħaxija|lejl))/i,
				any: /^([ap]\.?\s?m\.?|f'nofsillejl|f'nofsinhar|(ta') (għodwa|wara nofsinhar|filgħaxija|lejl))/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a/i,
				pm: /^p/i,
				midnight: /^f'nofsillejl/i,
				noon: /^f'nofsinhar/i,
				morning: /għodwa/i,
				afternoon: /wara(\s.*)nofsinhar/i,
				evening: /filgħaxija/i,
				night: /lejl/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/nb/_lib/formatDistance.js
var formatDistanceLocale$28 = {
	lessThanXSeconds: {
		one: "mindre enn ett sekund",
		other: "mindre enn {{count}} sekunder"
	},
	xSeconds: {
		one: "ett sekund",
		other: "{{count}} sekunder"
	},
	halfAMinute: "et halvt minutt",
	lessThanXMinutes: {
		one: "mindre enn ett minutt",
		other: "mindre enn {{count}} minutter"
	},
	xMinutes: {
		one: "ett minutt",
		other: "{{count}} minutter"
	},
	aboutXHours: {
		one: "omtrent en time",
		other: "omtrent {{count}} timer"
	},
	xHours: {
		one: "en time",
		other: "{{count}} timer"
	},
	xDays: {
		one: "en dag",
		other: "{{count}} dager"
	},
	aboutXWeeks: {
		one: "omtrent en uke",
		other: "omtrent {{count}} uker"
	},
	xWeeks: {
		one: "en uke",
		other: "{{count}} uker"
	},
	aboutXMonths: {
		one: "omtrent en måned",
		other: "omtrent {{count}} måneder"
	},
	xMonths: {
		one: "en måned",
		other: "{{count}} måneder"
	},
	aboutXYears: {
		one: "omtrent ett år",
		other: "omtrent {{count}} år"
	},
	xYears: {
		one: "ett år",
		other: "{{count}} år"
	},
	overXYears: {
		one: "over ett år",
		other: "over {{count}} år"
	},
	almostXYears: {
		one: "nesten ett år",
		other: "nesten {{count}} år"
	}
};
var formatDistance$28 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$28[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "om " + result;
	else return result + " siden";
	return result;
};
var formatLong$28 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE d. MMMM y",
			long: "d. MMMM y",
			medium: "d. MMM y",
			short: "dd.MM.y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "'kl'. HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'kl.' {{time}}",
			long: "{{date}} 'kl.' {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/nb/_lib/formatRelative.js
var formatRelativeLocale$28 = {
	lastWeek: "'forrige' eeee 'kl.' p",
	yesterday: "'i går kl.' p",
	today: "'i dag kl.' p",
	tomorrow: "'i morgen kl.' p",
	nextWeek: "EEEE 'kl.' p",
	other: "P"
};
var formatRelative$28 = (token, _date, _baseDate, _options) => formatRelativeLocale$28[token];
//#endregion
//#region ../../node_modules/date-fns/locale/nb/_lib/localize.js
var eraValues$28 = {
	narrow: ["f.Kr.", "e.Kr."],
	abbreviated: ["f.Kr.", "e.Kr."],
	wide: ["før Kristus", "etter Kristus"]
};
var quarterValues$28 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"Q1",
		"Q2",
		"Q3",
		"Q4"
	],
	wide: [
		"1. kvartal",
		"2. kvartal",
		"3. kvartal",
		"4. kvartal"
	]
};
var monthValues$28 = {
	narrow: [
		"J",
		"F",
		"M",
		"A",
		"M",
		"J",
		"J",
		"A",
		"S",
		"O",
		"N",
		"D"
	],
	abbreviated: [
		"jan.",
		"feb.",
		"mars",
		"apr.",
		"mai",
		"juni",
		"juli",
		"aug.",
		"sep.",
		"okt.",
		"nov.",
		"des."
	],
	wide: [
		"januar",
		"februar",
		"mars",
		"april",
		"mai",
		"juni",
		"juli",
		"august",
		"september",
		"oktober",
		"november",
		"desember"
	]
};
var dayValues$28 = {
	narrow: [
		"S",
		"M",
		"T",
		"O",
		"T",
		"F",
		"L"
	],
	short: [
		"sø",
		"ma",
		"ti",
		"on",
		"to",
		"fr",
		"lø"
	],
	abbreviated: [
		"søn",
		"man",
		"tir",
		"ons",
		"tor",
		"fre",
		"lør"
	],
	wide: [
		"søndag",
		"mandag",
		"tirsdag",
		"onsdag",
		"torsdag",
		"fredag",
		"lørdag"
	]
};
var dayPeriodValues$28 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "midnatt",
		noon: "middag",
		morning: "på morg.",
		afternoon: "på etterm.",
		evening: "på kvelden",
		night: "på natten"
	},
	abbreviated: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "midnatt",
		noon: "middag",
		morning: "på morg.",
		afternoon: "på etterm.",
		evening: "på kvelden",
		night: "på natten"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "midnatt",
		noon: "middag",
		morning: "på morgenen",
		afternoon: "på ettermiddagen",
		evening: "på kvelden",
		night: "på natten"
	}
};
var ordinalNumber$28 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + ".";
};
//#endregion
//#region ../../node_modules/date-fns/locale/nb.js
/**
* @category Locales
* @summary Norwegian Bokmål locale.
* @language Norwegian Bokmål
* @iso-639-2 nob
* @author Hans-Kristian Koren [@Hanse](https://github.com/Hanse)
* @author Mikolaj Grzyb [@mikolajgrzyb](https://github.com/mikolajgrzyb)
* @author Dag Stuan [@dagstuan](https://github.com/dagstuan)
*/
var nb = {
	code: "nb",
	formatDistance: formatDistance$28,
	formatLong: formatLong$28,
	formatRelative: formatRelative$28,
	localize: {
		ordinalNumber: ordinalNumber$28,
		era: buildLocalizeFn({
			values: eraValues$28,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$28,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$28,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$28,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$28,
			defaultWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)\.?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,
				abbreviated: /^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,
				wide: /^(før Kristus|før vår tid|etter Kristus|vår tid)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^f/i, /^e/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^q[1234]/i,
				wide: /^[1234](\.)? kvartal/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[jfmasond]/i,
				abbreviated: /^(jan|feb|mars?|apr|mai|juni?|juli?|aug|sep|okt|nov|des)\.?/i,
				wide: /^(januar|februar|mars|april|mai|juni|juli|august|september|oktober|november|desember)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^j/i,
					/^f/i,
					/^m/i,
					/^a/i,
					/^m/i,
					/^j/i,
					/^j/i,
					/^a/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				],
				any: [
					/^ja/i,
					/^f/i,
					/^mar/i,
					/^ap/i,
					/^mai/i,
					/^jun/i,
					/^jul/i,
					/^aug/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[smtofl]/i,
				short: /^(sø|ma|ti|on|to|fr|lø)/i,
				abbreviated: /^(søn|man|tir|ons|tor|fre|lør)/i,
				wide: /^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/^s/i,
				/^m/i,
				/^ti/i,
				/^o/i,
				/^to/i,
				/^f/i,
				/^l/i
			] },
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten)|[ap])/i,
				any: /^([ap]\.?\s?m\.?|midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten))/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a(\.?\s?m\.?)?$/i,
				pm: /^p(\.?\s?m\.?)?$/i,
				midnight: /^midn/i,
				noon: /^midd/i,
				morning: /morgen/i,
				afternoon: /ettermiddag/i,
				evening: /kveld/i,
				night: /natt/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/nl/_lib/formatDistance.js
var formatDistanceLocale$27 = {
	lessThanXSeconds: {
		one: "minder dan een seconde",
		other: "minder dan {{count}} seconden"
	},
	xSeconds: {
		one: "1 seconde",
		other: "{{count}} seconden"
	},
	halfAMinute: "een halve minuut",
	lessThanXMinutes: {
		one: "minder dan een minuut",
		other: "minder dan {{count}} minuten"
	},
	xMinutes: {
		one: "een minuut",
		other: "{{count}} minuten"
	},
	aboutXHours: {
		one: "ongeveer 1 uur",
		other: "ongeveer {{count}} uur"
	},
	xHours: {
		one: "1 uur",
		other: "{{count}} uur"
	},
	xDays: {
		one: "1 dag",
		other: "{{count}} dagen"
	},
	aboutXWeeks: {
		one: "ongeveer 1 week",
		other: "ongeveer {{count}} weken"
	},
	xWeeks: {
		one: "1 week",
		other: "{{count}} weken"
	},
	aboutXMonths: {
		one: "ongeveer 1 maand",
		other: "ongeveer {{count}} maanden"
	},
	xMonths: {
		one: "1 maand",
		other: "{{count}} maanden"
	},
	aboutXYears: {
		one: "ongeveer 1 jaar",
		other: "ongeveer {{count}} jaar"
	},
	xYears: {
		one: "1 jaar",
		other: "{{count}} jaar"
	},
	overXYears: {
		one: "meer dan 1 jaar",
		other: "meer dan {{count}} jaar"
	},
	almostXYears: {
		one: "bijna 1 jaar",
		other: "bijna {{count}} jaar"
	}
};
var formatDistance$27 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$27[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "over " + result;
	else return result + " geleden";
	return result;
};
var formatLong$27 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE d MMMM y",
			long: "d MMMM y",
			medium: "d MMM y",
			short: "dd-MM-y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'om' {{time}}",
			long: "{{date}} 'om' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/nl/_lib/formatRelative.js
var formatRelativeLocale$27 = {
	lastWeek: "'afgelopen' eeee 'om' p",
	yesterday: "'gisteren om' p",
	today: "'vandaag om' p",
	tomorrow: "'morgen om' p",
	nextWeek: "eeee 'om' p",
	other: "P"
};
var formatRelative$27 = (token, _date, _baseDate, _options) => formatRelativeLocale$27[token];
//#endregion
//#region ../../node_modules/date-fns/locale/nl/_lib/localize.js
var eraValues$27 = {
	narrow: ["v.C.", "n.C."],
	abbreviated: ["v.Chr.", "n.Chr."],
	wide: ["voor Christus", "na Christus"]
};
var quarterValues$27 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"K1",
		"K2",
		"K3",
		"K4"
	],
	wide: [
		"1e kwartaal",
		"2e kwartaal",
		"3e kwartaal",
		"4e kwartaal"
	]
};
var monthValues$27 = {
	narrow: [
		"J",
		"F",
		"M",
		"A",
		"M",
		"J",
		"J",
		"A",
		"S",
		"O",
		"N",
		"D"
	],
	abbreviated: [
		"jan.",
		"feb.",
		"mrt.",
		"apr.",
		"mei",
		"jun.",
		"jul.",
		"aug.",
		"sep.",
		"okt.",
		"nov.",
		"dec."
	],
	wide: [
		"januari",
		"februari",
		"maart",
		"april",
		"mei",
		"juni",
		"juli",
		"augustus",
		"september",
		"oktober",
		"november",
		"december"
	]
};
var dayValues$27 = {
	narrow: [
		"Z",
		"M",
		"D",
		"W",
		"D",
		"V",
		"Z"
	],
	short: [
		"zo",
		"ma",
		"di",
		"wo",
		"do",
		"vr",
		"za"
	],
	abbreviated: [
		"zon",
		"maa",
		"din",
		"woe",
		"don",
		"vri",
		"zat"
	],
	wide: [
		"zondag",
		"maandag",
		"dinsdag",
		"woensdag",
		"donderdag",
		"vrijdag",
		"zaterdag"
	]
};
var dayPeriodValues$27 = {
	narrow: {
		am: "AM",
		pm: "PM",
		midnight: "middernacht",
		noon: "het middaguur",
		morning: "'s ochtends",
		afternoon: "'s middags",
		evening: "'s avonds",
		night: "'s nachts"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "middernacht",
		noon: "het middaguur",
		morning: "'s ochtends",
		afternoon: "'s middags",
		evening: "'s avonds",
		night: "'s nachts"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "middernacht",
		noon: "het middaguur",
		morning: "'s ochtends",
		afternoon: "'s middags",
		evening: "'s avonds",
		night: "'s nachts"
	}
};
var ordinalNumber$27 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + "e";
};
//#endregion
//#region ../../node_modules/date-fns/locale/nl.js
/**
* @category Locales
* @summary Dutch locale.
* @language Dutch
* @iso-639-2 nld
* @author Jorik Tangelder [@jtangelder](https://github.com/jtangelder)
* @author Ruben Stolk [@rubenstolk](https://github.com/rubenstolk)
* @author Lode Vanhove [@bitcrumb](https://github.com/bitcrumb)
* @author Edo Rivai [@edorivai](https://github.com/edorivai)
* @author Niels Keurentjes [@curry684](https://github.com/curry684)
* @author Stefan Vermaas [@stefanvermaas](https://github.com/stefanvermaas)
*/
var nl = {
	code: "nl",
	formatDistance: formatDistance$27,
	formatLong: formatLong$27,
	formatRelative: formatRelative$27,
	localize: {
		ordinalNumber: ordinalNumber$27,
		era: buildLocalizeFn({
			values: eraValues$27,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$27,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$27,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$27,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$27,
			defaultWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)e?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^([vn]\.? ?C\.?)/,
				abbreviated: /^([vn]\. ?Chr\.?)/,
				wide: /^((voor|na) Christus)/
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^v/, /^n/] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^K[1234]/i,
				wide: /^[1234]e kwartaal/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[jfmasond]/i,
				abbreviated: /^(jan.|feb.|mrt.|apr.|mei|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,
				wide: /^(januari|februari|maart|april|mei|juni|juli|augustus|september|oktober|november|december)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^j/i,
					/^f/i,
					/^m/i,
					/^a/i,
					/^m/i,
					/^j/i,
					/^j/i,
					/^a/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				],
				any: [
					/^jan/i,
					/^feb/i,
					/^m(r|a)/i,
					/^apr/i,
					/^mei/i,
					/^jun/i,
					/^jul/i,
					/^aug/i,
					/^sep/i,
					/^okt/i,
					/^nov/i,
					/^dec/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[zmdwv]/i,
				short: /^(zo|ma|di|wo|do|vr|za)/i,
				abbreviated: /^(zon|maa|din|woe|don|vri|zat)/i,
				wide: /^(zondag|maandag|dinsdag|woensdag|donderdag|vrijdag|zaterdag)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^z/i,
					/^m/i,
					/^d/i,
					/^w/i,
					/^d/i,
					/^v/i,
					/^z/i
				],
				any: [
					/^zo/i,
					/^ma/i,
					/^di/i,
					/^wo/i,
					/^do/i,
					/^vr/i,
					/^za/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: { any: /^(am|pm|middernacht|het middaguur|'s (ochtends|middags|avonds|nachts))/i },
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^am/i,
				pm: /^pm/i,
				midnight: /^middernacht/i,
				noon: /^het middaguur/i,
				morning: /ochtend/i,
				afternoon: /middag/i,
				evening: /avond/i,
				night: /nacht/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/nl-BE/_lib/formatDistance.js
var formatDistanceLocale$26 = {
	lessThanXSeconds: {
		one: "minder dan een seconde",
		other: "minder dan {{count}} seconden"
	},
	xSeconds: {
		one: "1 seconde",
		other: "{{count}} seconden"
	},
	halfAMinute: "een halve minuut",
	lessThanXMinutes: {
		one: "minder dan een minuut",
		other: "minder dan {{count}} minuten"
	},
	xMinutes: {
		one: "een minuut",
		other: "{{count}} minuten"
	},
	aboutXHours: {
		one: "ongeveer 1 uur",
		other: "ongeveer {{count}} uur"
	},
	xHours: {
		one: "1 uur",
		other: "{{count}} uur"
	},
	xDays: {
		one: "1 dag",
		other: "{{count}} dagen"
	},
	aboutXWeeks: {
		one: "ongeveer 1 week",
		other: "ongeveer {{count}} weken"
	},
	xWeeks: {
		one: "1 week",
		other: "{{count}} weken"
	},
	aboutXMonths: {
		one: "ongeveer 1 maand",
		other: "ongeveer {{count}} maanden"
	},
	xMonths: {
		one: "1 maand",
		other: "{{count}} maanden"
	},
	aboutXYears: {
		one: "ongeveer 1 jaar",
		other: "ongeveer {{count}} jaar"
	},
	xYears: {
		one: "1 jaar",
		other: "{{count}} jaar"
	},
	overXYears: {
		one: "meer dan 1 jaar",
		other: "meer dan {{count}} jaar"
	},
	almostXYears: {
		one: "bijna 1 jaar",
		other: "bijna {{count}} jaar"
	}
};
var formatDistance$26 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$26[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "over " + result;
	else return result + " geleden";
	return result;
};
var formatLong$26 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE d MMMM y",
			long: "d MMMM y",
			medium: "d MMM y",
			short: "dd.MM.y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'om' {{time}}",
			long: "{{date}} 'om' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/nl-BE/_lib/formatRelative.js
var formatRelativeLocale$26 = {
	lastWeek: "'vorige' eeee 'om' p",
	yesterday: "'gisteren om' p",
	today: "'vandaag om' p",
	tomorrow: "'morgen om' p",
	nextWeek: "eeee 'om' p",
	other: "P"
};
var formatRelative$26 = (token, _date, _baseDate, _options) => formatRelativeLocale$26[token];
//#endregion
//#region ../../node_modules/date-fns/locale/nl-BE/_lib/localize.js
var eraValues$26 = {
	narrow: ["v.C.", "n.C."],
	abbreviated: ["v.Chr.", "n.Chr."],
	wide: ["voor Christus", "na Christus"]
};
var quarterValues$26 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"K1",
		"K2",
		"K3",
		"K4"
	],
	wide: [
		"1e kwartaal",
		"2e kwartaal",
		"3e kwartaal",
		"4e kwartaal"
	]
};
var monthValues$26 = {
	narrow: [
		"J",
		"F",
		"M",
		"A",
		"M",
		"J",
		"J",
		"A",
		"S",
		"O",
		"N",
		"D"
	],
	abbreviated: [
		"jan.",
		"feb.",
		"mrt.",
		"apr.",
		"mei",
		"jun.",
		"jul.",
		"aug.",
		"sep.",
		"okt.",
		"nov.",
		"dec."
	],
	wide: [
		"januari",
		"februari",
		"maart",
		"april",
		"mei",
		"juni",
		"juli",
		"augustus",
		"september",
		"oktober",
		"november",
		"december"
	]
};
var dayValues$26 = {
	narrow: [
		"Z",
		"M",
		"D",
		"W",
		"D",
		"V",
		"Z"
	],
	short: [
		"zo",
		"ma",
		"di",
		"wo",
		"do",
		"vr",
		"za"
	],
	abbreviated: [
		"zon",
		"maa",
		"din",
		"woe",
		"don",
		"vri",
		"zat"
	],
	wide: [
		"zondag",
		"maandag",
		"dinsdag",
		"woensdag",
		"donderdag",
		"vrijdag",
		"zaterdag"
	]
};
var dayPeriodValues$26 = {
	narrow: {
		am: "AM",
		pm: "PM",
		midnight: "middernacht",
		noon: "het middag",
		morning: "'s ochtends",
		afternoon: "'s namiddags",
		evening: "'s avonds",
		night: "'s nachts"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "middernacht",
		noon: "het middag",
		morning: "'s ochtends",
		afternoon: "'s namiddags",
		evening: "'s avonds",
		night: "'s nachts"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "middernacht",
		noon: "het middag",
		morning: "'s ochtends",
		afternoon: "'s namiddags",
		evening: "'s avonds",
		night: "'s nachts"
	}
};
var ordinalNumber$26 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + "e";
};
//#endregion
//#region ../../node_modules/date-fns/locale/nl-BE.js
/**
* @category Locales
* @summary Dutch locale.
* @language Dutch
* @iso-639-2 nld
* @author Jorik Tangelder [@jtangelder](https://github.com/jtangelder)
* @author Ruben Stolk [@rubenstolk](https://github.com/rubenstolk)
* @author Lode Vanhove [@bitcrumb](https://github.com/bitcrumb)
* @author Alex Hoeing [@dcbn](https://github.com/dcbn)
*/
var nlBE = {
	code: "nl-BE",
	formatDistance: formatDistance$26,
	formatLong: formatLong$26,
	formatRelative: formatRelative$26,
	localize: {
		ordinalNumber: ordinalNumber$26,
		era: buildLocalizeFn({
			values: eraValues$26,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$26,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$26,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$26,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$26,
			defaultWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)e?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^([vn]\.? ?C\.?)/,
				abbreviated: /^([vn]\. ?Chr\.?)/,
				wide: /^((voor|na) Christus)/
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^v/, /^n/] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^K[1234]/i,
				wide: /^[1234]e kwartaal/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[jfmasond]/i,
				abbreviated: /^(jan.|feb.|mrt.|apr.|mei|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,
				wide: /^(januari|februari|maart|april|mei|juni|juli|augustus|september|oktober|november|december)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^j/i,
					/^f/i,
					/^m/i,
					/^a/i,
					/^m/i,
					/^j/i,
					/^j/i,
					/^a/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				],
				any: [
					/^jan/i,
					/^feb/i,
					/^m(r|a)/i,
					/^apr/i,
					/^mei/i,
					/^jun/i,
					/^jul/i,
					/^aug/i,
					/^sep/i,
					/^okt/i,
					/^nov/i,
					/^dec/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[zmdwv]/i,
				short: /^(zo|ma|di|wo|do|vr|za)/i,
				abbreviated: /^(zon|maa|din|woe|don|vri|zat)/i,
				wide: /^(zondag|maandag|dinsdag|woensdag|donderdag|vrijdag|zaterdag)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^z/i,
					/^m/i,
					/^d/i,
					/^w/i,
					/^d/i,
					/^v/i,
					/^z/i
				],
				any: [
					/^zo/i,
					/^ma/i,
					/^di/i,
					/^wo/i,
					/^do/i,
					/^vr/i,
					/^za/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: { any: /^(am|pm|middernacht|het middaguur|'s (ochtends|middags|avonds|nachts))/i },
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^am/i,
				pm: /^pm/i,
				midnight: /^middernacht/i,
				noon: /^het middaguur/i,
				morning: /ochtend/i,
				afternoon: /middag/i,
				evening: /avond/i,
				night: /nacht/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/nn/_lib/formatDistance.js
var formatDistanceLocale$25 = {
	lessThanXSeconds: {
		one: "mindre enn eitt sekund",
		other: "mindre enn {{count}} sekund"
	},
	xSeconds: {
		one: "eitt sekund",
		other: "{{count}} sekund"
	},
	halfAMinute: "eit halvt minutt",
	lessThanXMinutes: {
		one: "mindre enn eitt minutt",
		other: "mindre enn {{count}} minutt"
	},
	xMinutes: {
		one: "eitt minutt",
		other: "{{count}} minutt"
	},
	aboutXHours: {
		one: "omtrent ein time",
		other: "omtrent {{count}} timar"
	},
	xHours: {
		one: "ein time",
		other: "{{count}} timar"
	},
	xDays: {
		one: "ein dag",
		other: "{{count}} dagar"
	},
	aboutXWeeks: {
		one: "omtrent ei veke",
		other: "omtrent {{count}} veker"
	},
	xWeeks: {
		one: "ei veke",
		other: "{{count}} veker"
	},
	aboutXMonths: {
		one: "omtrent ein månad",
		other: "omtrent {{count}} månader"
	},
	xMonths: {
		one: "ein månad",
		other: "{{count}} månader"
	},
	aboutXYears: {
		one: "omtrent eitt år",
		other: "omtrent {{count}} år"
	},
	xYears: {
		one: "eitt år",
		other: "{{count}} år"
	},
	overXYears: {
		one: "over eitt år",
		other: "over {{count}} år"
	},
	almostXYears: {
		one: "nesten eitt år",
		other: "nesten {{count}} år"
	}
};
var wordMapping$1 = [
	"null",
	"ein",
	"to",
	"tre",
	"fire",
	"fem",
	"seks",
	"sju",
	"åtte",
	"ni",
	"ti",
	"elleve",
	"tolv"
];
var formatDistance$25 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$25[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", count < 13 ? wordMapping$1[count] : String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "om " + result;
	else return result + " sidan";
	return result;
};
var formatLong$25 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE d. MMMM y",
			long: "d. MMMM y",
			medium: "d. MMM y",
			short: "dd.MM.y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "'kl'. HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'kl.' {{time}}",
			long: "{{date}} 'kl.' {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/nn/_lib/formatRelative.js
var formatRelativeLocale$25 = {
	lastWeek: "'førre' eeee 'kl.' p",
	yesterday: "'i går kl.' p",
	today: "'i dag kl.' p",
	tomorrow: "'i morgon kl.' p",
	nextWeek: "EEEE 'kl.' p",
	other: "P"
};
var formatRelative$25 = (token, _date, _baseDate, _options) => formatRelativeLocale$25[token];
//#endregion
//#region ../../node_modules/date-fns/locale/nn/_lib/localize.js
var eraValues$25 = {
	narrow: ["f.Kr.", "e.Kr."],
	abbreviated: ["f.Kr.", "e.Kr."],
	wide: ["før Kristus", "etter Kristus"]
};
var quarterValues$25 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"Q1",
		"Q2",
		"Q3",
		"Q4"
	],
	wide: [
		"1. kvartal",
		"2. kvartal",
		"3. kvartal",
		"4. kvartal"
	]
};
var monthValues$25 = {
	narrow: [
		"J",
		"F",
		"M",
		"A",
		"M",
		"J",
		"J",
		"A",
		"S",
		"O",
		"N",
		"D"
	],
	abbreviated: [
		"jan.",
		"feb.",
		"mars",
		"apr.",
		"mai",
		"juni",
		"juli",
		"aug.",
		"sep.",
		"okt.",
		"nov.",
		"des."
	],
	wide: [
		"januar",
		"februar",
		"mars",
		"april",
		"mai",
		"juni",
		"juli",
		"august",
		"september",
		"oktober",
		"november",
		"desember"
	]
};
var dayValues$25 = {
	narrow: [
		"S",
		"M",
		"T",
		"O",
		"T",
		"F",
		"L"
	],
	short: [
		"su",
		"må",
		"ty",
		"on",
		"to",
		"fr",
		"lau"
	],
	abbreviated: [
		"sun",
		"mån",
		"tys",
		"ons",
		"tor",
		"fre",
		"laur"
	],
	wide: [
		"sundag",
		"måndag",
		"tysdag",
		"onsdag",
		"torsdag",
		"fredag",
		"laurdag"
	]
};
var dayPeriodValues$25 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "midnatt",
		noon: "middag",
		morning: "på morg.",
		afternoon: "på etterm.",
		evening: "på kvelden",
		night: "på natta"
	},
	abbreviated: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "midnatt",
		noon: "middag",
		morning: "på morg.",
		afternoon: "på etterm.",
		evening: "på kvelden",
		night: "på natta"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "midnatt",
		noon: "middag",
		morning: "på morgonen",
		afternoon: "på ettermiddagen",
		evening: "på kvelden",
		night: "på natta"
	}
};
var ordinalNumber$25 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + ".";
};
//#endregion
//#region ../../node_modules/date-fns/locale/nn.js
/**
* @category Locales
* @summary Norwegian Nynorsk locale.
* @language Norwegian Nynorsk
* @iso-639-2 nno
* @author Mats Byrkjeland [@draperunner](https://github.com/draperunner)
*/
var nn = {
	code: "nn",
	formatDistance: formatDistance$25,
	formatLong: formatLong$25,
	formatRelative: formatRelative$25,
	localize: {
		ordinalNumber: ordinalNumber$25,
		era: buildLocalizeFn({
			values: eraValues$25,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$25,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$25,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$25,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$25,
			defaultWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)\.?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,
				abbreviated: /^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,
				wide: /^(før Kristus|før vår tid|etter Kristus|vår tid)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^f/i, /^e/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^q[1234]/i,
				wide: /^[1234](\.)? kvartal/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[jfmasond]/i,
				abbreviated: /^(jan|feb|mars?|apr|mai|juni?|juli?|aug|sep|okt|nov|des)\.?/i,
				wide: /^(januar|februar|mars|april|mai|juni|juli|august|september|oktober|november|desember)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^j/i,
					/^f/i,
					/^m/i,
					/^a/i,
					/^m/i,
					/^j/i,
					/^j/i,
					/^a/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				],
				any: [
					/^ja/i,
					/^f/i,
					/^mar/i,
					/^ap/i,
					/^mai/i,
					/^jun/i,
					/^jul/i,
					/^aug/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[smtofl]/i,
				short: /^(su|må|ty|on|to|fr|la)/i,
				abbreviated: /^(sun|mån|tys|ons|tor|fre|laur)/i,
				wide: /^(sundag|måndag|tysdag|onsdag|torsdag|fredag|laurdag)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/^s/i,
				/^m/i,
				/^ty/i,
				/^o/i,
				/^to/i,
				/^f/i,
				/^l/i
			] },
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(midnatt|middag|(på) (morgonen|ettermiddagen|kvelden|natta)|[ap])/i,
				any: /^([ap]\.?\s?m\.?|midnatt|middag|(på) (morgonen|ettermiddagen|kvelden|natta))/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a(\.?\s?m\.?)?$/i,
				pm: /^p(\.?\s?m\.?)?$/i,
				midnight: /^midn/i,
				noon: /^midd/i,
				morning: /morgon/i,
				afternoon: /ettermiddag/i,
				evening: /kveld/i,
				night: /natt/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/oc/_lib/formatDistance.js
var formatDistanceLocale$24 = {
	lessThanXSeconds: {
		one: "mens d’una segonda",
		other: "mens de {{count}} segondas"
	},
	xSeconds: {
		one: "1 segonda",
		other: "{{count}} segondas"
	},
	halfAMinute: "30 segondas",
	lessThanXMinutes: {
		one: "mens d’una minuta",
		other: "mens de {{count}} minutas"
	},
	xMinutes: {
		one: "1 minuta",
		other: "{{count}} minutas"
	},
	aboutXHours: {
		one: "environ 1 ora",
		other: "environ {{count}} oras"
	},
	xHours: {
		one: "1 ora",
		other: "{{count}} oras"
	},
	xDays: {
		one: "1 jorn",
		other: "{{count}} jorns"
	},
	aboutXWeeks: {
		one: "environ 1 setmana",
		other: "environ {{count}} setmanas"
	},
	xWeeks: {
		one: "1 setmana",
		other: "{{count}} setmanas"
	},
	aboutXMonths: {
		one: "environ 1 mes",
		other: "environ {{count}} meses"
	},
	xMonths: {
		one: "1 mes",
		other: "{{count}} meses"
	},
	aboutXYears: {
		one: "environ 1 an",
		other: "environ {{count}} ans"
	},
	xYears: {
		one: "1 an",
		other: "{{count}} ans"
	},
	overXYears: {
		one: "mai d’un an",
		other: "mai de {{count}} ans"
	},
	almostXYears: {
		one: "gaireben un an",
		other: "gaireben {{count}} ans"
	}
};
var formatDistance$24 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$24[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "d’aquí " + result;
	else return "fa " + result;
	return result;
};
var formatLong$24 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE d 'de' MMMM y",
			long: "d 'de' MMMM y",
			medium: "d MMM y",
			short: "dd/MM/y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'a' {{time}}",
			long: "{{date}} 'a' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/oc/_lib/formatRelative.js
var formatRelativeLocale$24 = {
	lastWeek: "eeee 'passat a' p",
	yesterday: "'ièr a' p",
	today: "'uèi a' p",
	tomorrow: "'deman a' p",
	nextWeek: "eeee 'a' p",
	other: "P"
};
var formatRelative$24 = (token, _date, _baseDate, _options) => formatRelativeLocale$24[token];
//#endregion
//#region ../../node_modules/date-fns/locale/oc/_lib/localize.js
var eraValues$24 = {
	narrow: ["ab. J.C.", "apr. J.C."],
	abbreviated: ["ab. J.C.", "apr. J.C."],
	wide: ["abans Jèsus-Crist", "après Jèsus-Crist"]
};
var quarterValues$24 = {
	narrow: [
		"T1",
		"T2",
		"T3",
		"T4"
	],
	abbreviated: [
		"1èr trim.",
		"2nd trim.",
		"3en trim.",
		"4en trim."
	],
	wide: [
		"1èr trimèstre",
		"2nd trimèstre",
		"3en trimèstre",
		"4en trimèstre"
	]
};
var monthValues$24 = {
	narrow: [
		"GN",
		"FB",
		"MÇ",
		"AB",
		"MA",
		"JN",
		"JL",
		"AG",
		"ST",
		"OC",
		"NV",
		"DC"
	],
	abbreviated: [
		"gen.",
		"febr.",
		"març",
		"abr.",
		"mai",
		"junh",
		"jul.",
		"ag.",
		"set.",
		"oct.",
		"nov.",
		"dec."
	],
	wide: [
		"genièr",
		"febrièr",
		"març",
		"abril",
		"mai",
		"junh",
		"julhet",
		"agost",
		"setembre",
		"octòbre",
		"novembre",
		"decembre"
	]
};
var dayValues$24 = {
	narrow: [
		"dg.",
		"dl.",
		"dm.",
		"dc.",
		"dj.",
		"dv.",
		"ds."
	],
	short: [
		"dg.",
		"dl.",
		"dm.",
		"dc.",
		"dj.",
		"dv.",
		"ds."
	],
	abbreviated: [
		"dg.",
		"dl.",
		"dm.",
		"dc.",
		"dj.",
		"dv.",
		"ds."
	],
	wide: [
		"dimenge",
		"diluns",
		"dimars",
		"dimècres",
		"dijòus",
		"divendres",
		"dissabte"
	]
};
var dayPeriodValues$24 = {
	narrow: {
		am: "am",
		pm: "pm",
		midnight: "mièjanuèch",
		noon: "miègjorn",
		morning: "matin",
		afternoon: "aprèp-miègjorn",
		evening: "vèspre",
		night: "nuèch"
	},
	abbreviated: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "mièjanuèch",
		noon: "miègjorn",
		morning: "matin",
		afternoon: "aprèp-miègjorn",
		evening: "vèspre",
		night: "nuèch"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "mièjanuèch",
		noon: "miègjorn",
		morning: "matin",
		afternoon: "aprèp-miègjorn",
		evening: "vèspre",
		night: "nuèch"
	}
};
var formattingDayPeriodValues$22 = {
	narrow: {
		am: "am",
		pm: "pm",
		midnight: "mièjanuèch",
		noon: "miègjorn",
		morning: "del matin",
		afternoon: "de l’aprèp-miègjorn",
		evening: "del ser",
		night: "de la nuèch"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "mièjanuèch",
		noon: "miègjorn",
		morning: "del matin",
		afternoon: "de l’aprèp-miègjorn",
		evening: "del ser",
		night: "de la nuèch"
	},
	wide: {
		am: "ante meridiem",
		pm: "post meridiem",
		midnight: "mièjanuèch",
		noon: "miègjorn",
		morning: "del matin",
		afternoon: "de l’aprèp-miègjorn",
		evening: "del ser",
		night: "de la nuèch"
	}
};
var ordinalNumber$24 = (dirtyNumber, options) => {
	const number = Number(dirtyNumber);
	const unit = options?.unit;
	let ordinal;
	switch (number) {
		case 1:
			ordinal = "èr";
			break;
		case 2:
			ordinal = "nd";
			break;
		default: ordinal = "en";
	}
	if (unit === "year" || unit === "week" || unit === "hour" || unit === "minute" || unit === "second") ordinal += "a";
	return number + ordinal;
};
//#endregion
//#region ../../node_modules/date-fns/locale/oc.js
/**
* @category Locales
* @summary Occitan locale.
* @language Occitan
* @iso-639-2 oci
* @author Quentin PAGÈS
*/
var oc = {
	code: "oc",
	formatDistance: formatDistance$24,
	formatLong: formatLong$24,
	formatRelative: formatRelative$24,
	localize: {
		ordinalNumber: ordinalNumber$24,
		era: buildLocalizeFn({
			values: eraValues$24,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$24,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$24,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$24,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$24,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$22,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(èr|nd|en)?[a]?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(ab\.J\.C|apr\.J\.C|apr\.J\.-C)/i,
				abbreviated: /^(ab\.J\.-C|ab\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,
				wide: /^(abans Jèsus-Crist|après Jèsus-Crist)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^ab/i, /^ap/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^T[1234]/i,
				abbreviated: /^[1234](èr|nd|en)? trim\.?/i,
				wide: /^[1234](èr|nd|en)? trimèstre/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^(GN|FB|MÇ|AB|MA|JN|JL|AG|ST|OC|NV|DC)/i,
				abbreviated: /^(gen|febr|març|abr|mai|junh|jul|ag|set|oct|nov|dec)\.?/i,
				wide: /^(genièr|febrièr|març|abril|mai|junh|julhet|agost|setembre|octòbre|novembre|decembre)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/^g/i,
				/^f/i,
				/^ma[r?]|MÇ/i,
				/^ab/i,
				/^ma[i?]/i,
				/^ju[n?]|JN/i,
				/^ju[l?]|JL/i,
				/^ag/i,
				/^s/i,
				/^o/i,
				/^n/i,
				/^d/i
			] },
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^d[glmcjvs]\.?/i,
				short: /^d[glmcjvs]\.?/i,
				abbreviated: /^d[glmcjvs]\.?/i,
				wide: /^(dimenge|diluns|dimars|dimècres|dijòus|divendres|dissabte)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^dg/i,
					/^dl/i,
					/^dm/i,
					/^dc/i,
					/^dj/i,
					/^dv/i,
					/^ds/i
				],
				short: [
					/^dg/i,
					/^dl/i,
					/^dm/i,
					/^dc/i,
					/^dj/i,
					/^dv/i,
					/^ds/i
				],
				abbreviated: [
					/^dg/i,
					/^dl/i,
					/^dm/i,
					/^dc/i,
					/^dj/i,
					/^dv/i,
					/^ds/i
				],
				any: [
					/^dg|dime/i,
					/^dl|dil/i,
					/^dm|dima/i,
					/^dc|dimè/i,
					/^dj|dij/i,
					/^dv|div/i,
					/^ds|dis/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: { any: /(^(a\.?m|p\.?m))|(ante meridiem|post meridiem)|((del |de la |de l’)(matin|aprèp-miègjorn|vèspre|ser|nuèch))/i },
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /(^a)|ante meridiem/i,
				pm: /(^p)|post meridiem/i,
				midnight: /^mièj/i,
				noon: /^mièg/i,
				morning: /matin/i,
				afternoon: /aprèp-miègjorn/i,
				evening: /vèspre|ser/i,
				night: /nuèch/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/pl/_lib/formatDistance.js
var formatDistanceLocale$23 = {
	lessThanXSeconds: {
		one: {
			regular: "mniej niż sekunda",
			past: "mniej niż sekundę",
			future: "mniej niż sekundę"
		},
		twoFour: "mniej niż {{count}} sekundy",
		other: "mniej niż {{count}} sekund"
	},
	xSeconds: {
		one: {
			regular: "sekunda",
			past: "sekundę",
			future: "sekundę"
		},
		twoFour: "{{count}} sekundy",
		other: "{{count}} sekund"
	},
	halfAMinute: {
		one: "pół minuty",
		twoFour: "pół minuty",
		other: "pół minuty"
	},
	lessThanXMinutes: {
		one: {
			regular: "mniej niż minuta",
			past: "mniej niż minutę",
			future: "mniej niż minutę"
		},
		twoFour: "mniej niż {{count}} minuty",
		other: "mniej niż {{count}} minut"
	},
	xMinutes: {
		one: {
			regular: "minuta",
			past: "minutę",
			future: "minutę"
		},
		twoFour: "{{count}} minuty",
		other: "{{count}} minut"
	},
	aboutXHours: {
		one: {
			regular: "około godziny",
			past: "około godziny",
			future: "około godzinę"
		},
		twoFour: "około {{count}} godziny",
		other: "około {{count}} godzin"
	},
	xHours: {
		one: {
			regular: "godzina",
			past: "godzinę",
			future: "godzinę"
		},
		twoFour: "{{count}} godziny",
		other: "{{count}} godzin"
	},
	xDays: {
		one: {
			regular: "dzień",
			past: "dzień",
			future: "1 dzień"
		},
		twoFour: "{{count}} dni",
		other: "{{count}} dni"
	},
	aboutXWeeks: {
		one: "około tygodnia",
		twoFour: "około {{count}} tygodni",
		other: "około {{count}} tygodni"
	},
	xWeeks: {
		one: "tydzień",
		twoFour: "{{count}} tygodnie",
		other: "{{count}} tygodni"
	},
	aboutXMonths: {
		one: "około miesiąc",
		twoFour: "około {{count}} miesiące",
		other: "około {{count}} miesięcy"
	},
	xMonths: {
		one: "miesiąc",
		twoFour: "{{count}} miesiące",
		other: "{{count}} miesięcy"
	},
	aboutXYears: {
		one: "około rok",
		twoFour: "około {{count}} lata",
		other: "około {{count}} lat"
	},
	xYears: {
		one: "rok",
		twoFour: "{{count}} lata",
		other: "{{count}} lat"
	},
	overXYears: {
		one: "ponad rok",
		twoFour: "ponad {{count}} lata",
		other: "ponad {{count}} lat"
	},
	almostXYears: {
		one: "prawie rok",
		twoFour: "prawie {{count}} lata",
		other: "prawie {{count}} lat"
	}
};
function declensionGroup$1(scheme, count) {
	if (count === 1) return scheme.one;
	const rem100 = count % 100;
	if (rem100 <= 20 && rem100 > 10) return scheme.other;
	const rem10 = rem100 % 10;
	if (rem10 >= 2 && rem10 <= 4) return scheme.twoFour;
	return scheme.other;
}
function declension$3(scheme, count, time) {
	const group = declensionGroup$1(scheme, count);
	return (typeof group === "string" ? group : group[time]).replace("{{count}}", String(count));
}
var formatDistance$23 = (token, count, options) => {
	const scheme = formatDistanceLocale$23[token];
	if (!options?.addSuffix) return declension$3(scheme, count, "regular");
	if (options.comparison && options.comparison > 0) return "za " + declension$3(scheme, count, "future");
	else return declension$3(scheme, count, "past") + " temu";
};
var formatLong$23 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, do MMMM y",
			long: "do MMMM y",
			medium: "do MMM y",
			short: "dd.MM.y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} {{time}}",
			long: "{{date}} {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/pl/_lib/formatRelative.js
var adjectivesLastWeek = {
	masculine: "ostatni",
	feminine: "ostatnia"
};
var adjectivesThisWeek = {
	masculine: "ten",
	feminine: "ta"
};
var adjectivesNextWeek = {
	masculine: "następny",
	feminine: "następna"
};
var dayGrammaticalGender = {
	0: "feminine",
	1: "masculine",
	2: "masculine",
	3: "feminine",
	4: "masculine",
	5: "masculine",
	6: "feminine"
};
function dayAndTimeWithAdjective(token, date, baseDate, options) {
	let adjectives;
	if (isSameWeek(date, baseDate, options)) adjectives = adjectivesThisWeek;
	else if (token === "lastWeek") adjectives = adjectivesLastWeek;
	else if (token === "nextWeek") adjectives = adjectivesNextWeek;
	else throw new Error(`Cannot determine adjectives for token ${token}`);
	const grammaticalGender = dayGrammaticalGender[date.getDay()];
	return `'${adjectives[grammaticalGender]}' eeee 'o' p`;
}
var formatRelativeLocale$23 = {
	lastWeek: dayAndTimeWithAdjective,
	yesterday: "'wczoraj o' p",
	today: "'dzisiaj o' p",
	tomorrow: "'jutro o' p",
	nextWeek: dayAndTimeWithAdjective,
	other: "P"
};
var formatRelative$23 = (token, date, baseDate, options) => {
	const format = formatRelativeLocale$23[token];
	if (typeof format === "function") return format(token, date, baseDate, options);
	return format;
};
//#endregion
//#region ../../node_modules/date-fns/locale/pl/_lib/localize.js
var eraValues$23 = {
	narrow: ["p.n.e.", "n.e."],
	abbreviated: ["p.n.e.", "n.e."],
	wide: ["przed naszą erą", "naszej ery"]
};
var quarterValues$23 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"I kw.",
		"II kw.",
		"III kw.",
		"IV kw."
	],
	wide: [
		"I kwartał",
		"II kwartał",
		"III kwartał",
		"IV kwartał"
	]
};
var monthValues$23 = {
	narrow: [
		"S",
		"L",
		"M",
		"K",
		"M",
		"C",
		"L",
		"S",
		"W",
		"P",
		"L",
		"G"
	],
	abbreviated: [
		"sty",
		"lut",
		"mar",
		"kwi",
		"maj",
		"cze",
		"lip",
		"sie",
		"wrz",
		"paź",
		"lis",
		"gru"
	],
	wide: [
		"styczeń",
		"luty",
		"marzec",
		"kwiecień",
		"maj",
		"czerwiec",
		"lipiec",
		"sierpień",
		"wrzesień",
		"październik",
		"listopad",
		"grudzień"
	]
};
var monthFormattingValues = {
	narrow: [
		"s",
		"l",
		"m",
		"k",
		"m",
		"c",
		"l",
		"s",
		"w",
		"p",
		"l",
		"g"
	],
	abbreviated: [
		"sty",
		"lut",
		"mar",
		"kwi",
		"maj",
		"cze",
		"lip",
		"sie",
		"wrz",
		"paź",
		"lis",
		"gru"
	],
	wide: [
		"stycznia",
		"lutego",
		"marca",
		"kwietnia",
		"maja",
		"czerwca",
		"lipca",
		"sierpnia",
		"września",
		"października",
		"listopada",
		"grudnia"
	]
};
var dayValues$23 = {
	narrow: [
		"N",
		"P",
		"W",
		"Ś",
		"C",
		"P",
		"S"
	],
	short: [
		"nie",
		"pon",
		"wto",
		"śro",
		"czw",
		"pią",
		"sob"
	],
	abbreviated: [
		"niedz.",
		"pon.",
		"wt.",
		"śr.",
		"czw.",
		"pt.",
		"sob."
	],
	wide: [
		"niedziela",
		"poniedziałek",
		"wtorek",
		"środa",
		"czwartek",
		"piątek",
		"sobota"
	]
};
var dayFormattingValues = {
	narrow: [
		"n",
		"p",
		"w",
		"ś",
		"c",
		"p",
		"s"
	],
	short: [
		"nie",
		"pon",
		"wto",
		"śro",
		"czw",
		"pią",
		"sob"
	],
	abbreviated: [
		"niedz.",
		"pon.",
		"wt.",
		"śr.",
		"czw.",
		"pt.",
		"sob."
	],
	wide: [
		"niedziela",
		"poniedziałek",
		"wtorek",
		"środa",
		"czwartek",
		"piątek",
		"sobota"
	]
};
var dayPeriodValues$23 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "półn.",
		noon: "poł",
		morning: "rano",
		afternoon: "popoł.",
		evening: "wiecz.",
		night: "noc"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "północ",
		noon: "południe",
		morning: "rano",
		afternoon: "popołudnie",
		evening: "wieczór",
		night: "noc"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "północ",
		noon: "południe",
		morning: "rano",
		afternoon: "popołudnie",
		evening: "wieczór",
		night: "noc"
	}
};
var dayPeriodFormattingValues = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "o półn.",
		noon: "w poł.",
		morning: "rano",
		afternoon: "po poł.",
		evening: "wiecz.",
		night: "w nocy"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "o północy",
		noon: "w południe",
		morning: "rano",
		afternoon: "po południu",
		evening: "wieczorem",
		night: "w nocy"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "o północy",
		noon: "w południe",
		morning: "rano",
		afternoon: "po południu",
		evening: "wieczorem",
		night: "w nocy"
	}
};
var ordinalNumber$23 = (dirtyNumber, _options) => {
	return String(dirtyNumber);
};
//#endregion
//#region ../../node_modules/date-fns/locale/pl.js
/**
* @category Locales
* @summary Polish locale.
* @language Polish
* @iso-639-2 pol
* @author Mateusz Derks [@ertrzyiks](https://github.com/ertrzyiks)
* @author Just RAG [@justrag](https://github.com/justrag)
* @author Mikolaj Grzyb [@mikolajgrzyb](https://github.com/mikolajgrzyb)
* @author Mateusz Tokarski [@mutisz](https://github.com/mutisz)
*/
var pl = {
	code: "pl",
	formatDistance: formatDistance$23,
	formatLong: formatLong$23,
	formatRelative: formatRelative$23,
	localize: {
		ordinalNumber: ordinalNumber$23,
		era: buildLocalizeFn({
			values: eraValues$23,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$23,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$23,
			defaultWidth: "wide",
			formattingValues: monthFormattingValues,
			defaultFormattingWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$23,
			defaultWidth: "wide",
			formattingValues: dayFormattingValues,
			defaultFormattingWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$23,
			defaultWidth: "wide",
			formattingValues: dayPeriodFormattingValues,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(p\.?\s*n\.?\s*e\.?\s*|n\.?\s*e\.?\s*)/i,
				abbreviated: /^(p\.?\s*n\.?\s*e\.?\s*|n\.?\s*e\.?\s*)/i,
				wide: /^(przed\s*nasz(ą|a)\s*er(ą|a)|naszej\s*ery)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^p/i, /^n/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^(I|II|III|IV)\s*kw\.?/i,
				wide: /^(I|II|III|IV)\s*kwarta(ł|l)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/1/i,
					/2/i,
					/3/i,
					/4/i
				],
				any: [
					/^I kw/i,
					/^II kw/i,
					/^III kw/i,
					/^IV kw/i
				]
			},
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[slmkcwpg]/i,
				abbreviated: /^(sty|lut|mar|kwi|maj|cze|lip|sie|wrz|pa(ź|z)|lis|gru)/i,
				wide: /^(stycznia|stycze(ń|n)|lutego|luty|marca|marzec|kwietnia|kwiecie(ń|n)|maja|maj|czerwca|czerwiec|lipca|lipiec|sierpnia|sierpie(ń|n)|wrze(ś|s)nia|wrzesie(ń|n)|pa(ź|z)dziernika|pa(ź|z)dziernik|listopada|listopad|grudnia|grudzie(ń|n))/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^s/i,
					/^l/i,
					/^m/i,
					/^k/i,
					/^m/i,
					/^c/i,
					/^l/i,
					/^s/i,
					/^w/i,
					/^p/i,
					/^l/i,
					/^g/i
				],
				any: [
					/^st/i,
					/^lu/i,
					/^mar/i,
					/^k/i,
					/^maj/i,
					/^c/i,
					/^lip/i,
					/^si/i,
					/^w/i,
					/^p/i,
					/^lis/i,
					/^g/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[npwścs]/i,
				short: /^(nie|pon|wto|(ś|s)ro|czw|pi(ą|a)|sob)/i,
				abbreviated: /^(niedz|pon|wt|(ś|s)r|czw|pt|sob)\.?/i,
				wide: /^(niedziela|poniedzia(ł|l)ek|wtorek|(ś|s)roda|czwartek|pi(ą|a)tek|sobota)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^n/i,
					/^p/i,
					/^w/i,
					/^ś/i,
					/^c/i,
					/^p/i,
					/^s/i
				],
				abbreviated: [
					/^n/i,
					/^po/i,
					/^w/i,
					/^(ś|s)r/i,
					/^c/i,
					/^pt/i,
					/^so/i
				],
				any: [
					/^n/i,
					/^po/i,
					/^w/i,
					/^(ś|s)r/i,
					/^c/i,
					/^pi/i,
					/^so/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(^a$|^p$|pó(ł|l)n\.?|o\s*pó(ł|l)n\.?|po(ł|l)\.?|w\s*po(ł|l)\.?|po\s*po(ł|l)\.?|rano|wiecz\.?|noc|w\s*nocy)/i,
				any: /^(am|pm|pó(ł|l)noc|o\s*pó(ł|l)nocy|po(ł|l)udnie|w\s*po(ł|l)udnie|popo(ł|l)udnie|po\s*po(ł|l)udniu|rano|wieczór|wieczorem|noc|w\s*nocy)/i
			},
			defaultMatchWidth: "any",
			parsePatterns: {
				narrow: {
					am: /^a$/i,
					pm: /^p$/i,
					midnight: /pó(ł|l)n/i,
					noon: /po(ł|l)/i,
					morning: /rano/i,
					afternoon: /po\s*po(ł|l)/i,
					evening: /wiecz/i,
					night: /noc/i
				},
				any: {
					am: /^am/i,
					pm: /^pm/i,
					midnight: /pó(ł|l)n/i,
					noon: /po(ł|l)/i,
					morning: /rano/i,
					afternoon: /po\s*po(ł|l)/i,
					evening: /wiecz/i,
					night: /noc/i
				}
			},
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/pt/_lib/formatDistance.js
var formatDistanceLocale$22 = {
	lessThanXSeconds: {
		one: "menos de um segundo",
		other: "menos de {{count}} segundos"
	},
	xSeconds: {
		one: "1 segundo",
		other: "{{count}} segundos"
	},
	halfAMinute: "meio minuto",
	lessThanXMinutes: {
		one: "menos de um minuto",
		other: "menos de {{count}} minutos"
	},
	xMinutes: {
		one: "1 minuto",
		other: "{{count}} minutos"
	},
	aboutXHours: {
		one: "aproximadamente 1 hora",
		other: "aproximadamente {{count}} horas"
	},
	xHours: {
		one: "1 hora",
		other: "{{count}} horas"
	},
	xDays: {
		one: "1 dia",
		other: "{{count}} dias"
	},
	aboutXWeeks: {
		one: "aproximadamente 1 semana",
		other: "aproximadamente {{count}} semanas"
	},
	xWeeks: {
		one: "1 semana",
		other: "{{count}} semanas"
	},
	aboutXMonths: {
		one: "aproximadamente 1 mês",
		other: "aproximadamente {{count}} meses"
	},
	xMonths: {
		one: "1 mês",
		other: "{{count}} meses"
	},
	aboutXYears: {
		one: "aproximadamente 1 ano",
		other: "aproximadamente {{count}} anos"
	},
	xYears: {
		one: "1 ano",
		other: "{{count}} anos"
	},
	overXYears: {
		one: "mais de 1 ano",
		other: "mais de {{count}} anos"
	},
	almostXYears: {
		one: "quase 1 ano",
		other: "quase {{count}} anos"
	}
};
var formatDistance$22 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$22[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "daqui a " + result;
	else return "há " + result;
	return result;
};
var formatLong$22 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, d 'de' MMMM 'de' y",
			long: "d 'de' MMMM 'de' y",
			medium: "d 'de' MMM 'de' y",
			short: "dd/MM/y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'às' {{time}}",
			long: "{{date}} 'às' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/pt/_lib/formatRelative.js
var formatRelativeLocale$22 = {
	lastWeek: (date) => {
		const weekday = date.getDay();
		return "'" + (weekday === 0 || weekday === 6 ? "último" : "última") + "' eeee 'às' p";
	},
	yesterday: "'ontem às' p",
	today: "'hoje às' p",
	tomorrow: "'amanhã às' p",
	nextWeek: "eeee 'às' p",
	other: "P"
};
var formatRelative$22 = (token, date, _baseDate, _options) => {
	const format = formatRelativeLocale$22[token];
	if (typeof format === "function") return format(date);
	return format;
};
//#endregion
//#region ../../node_modules/date-fns/locale/pt/_lib/localize.js
var eraValues$22 = {
	narrow: ["aC", "dC"],
	abbreviated: ["a.C.", "d.C."],
	wide: ["antes de Cristo", "depois de Cristo"]
};
var quarterValues$22 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"T1",
		"T2",
		"T3",
		"T4"
	],
	wide: [
		"1º trimestre",
		"2º trimestre",
		"3º trimestre",
		"4º trimestre"
	]
};
var monthValues$22 = {
	narrow: [
		"j",
		"f",
		"m",
		"a",
		"m",
		"j",
		"j",
		"a",
		"s",
		"o",
		"n",
		"d"
	],
	abbreviated: [
		"jan",
		"fev",
		"mar",
		"abr",
		"mai",
		"jun",
		"jul",
		"ago",
		"set",
		"out",
		"nov",
		"dez"
	],
	wide: [
		"janeiro",
		"fevereiro",
		"março",
		"abril",
		"maio",
		"junho",
		"julho",
		"agosto",
		"setembro",
		"outubro",
		"novembro",
		"dezembro"
	]
};
var dayValues$22 = {
	narrow: [
		"d",
		"s",
		"t",
		"q",
		"q",
		"s",
		"s"
	],
	short: [
		"dom",
		"seg",
		"ter",
		"qua",
		"qui",
		"sex",
		"sáb"
	],
	abbreviated: [
		"dom",
		"seg",
		"ter",
		"qua",
		"qui",
		"sex",
		"sáb"
	],
	wide: [
		"domingo",
		"segunda-feira",
		"terça-feira",
		"quarta-feira",
		"quinta-feira",
		"sexta-feira",
		"sábado"
	]
};
var dayPeriodValues$22 = {
	narrow: {
		am: "AM",
		pm: "PM",
		midnight: "meia-noite",
		noon: "meio-dia",
		morning: "manhã",
		afternoon: "tarde",
		evening: "noite",
		night: "madrugada"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "meia-noite",
		noon: "meio-dia",
		morning: "manhã",
		afternoon: "tarde",
		evening: "noite",
		night: "madrugada"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "meia-noite",
		noon: "meio-dia",
		morning: "manhã",
		afternoon: "tarde",
		evening: "noite",
		night: "madrugada"
	}
};
var formattingDayPeriodValues$21 = {
	narrow: {
		am: "AM",
		pm: "PM",
		midnight: "meia-noite",
		noon: "meio-dia",
		morning: "da manhã",
		afternoon: "da tarde",
		evening: "da noite",
		night: "da madrugada"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "meia-noite",
		noon: "meio-dia",
		morning: "da manhã",
		afternoon: "da tarde",
		evening: "da noite",
		night: "da madrugada"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "meia-noite",
		noon: "meio-dia",
		morning: "da manhã",
		afternoon: "da tarde",
		evening: "da noite",
		night: "da madrugada"
	}
};
var ordinalNumber$22 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + "º";
};
//#endregion
//#region ../../node_modules/date-fns/locale/pt.js
/**
* @category Locales
* @summary Portuguese locale.
* @language Portuguese
* @iso-639-2 por
* @author Dário Freire [@dfreire](https://github.com/dfreire)
* @author Adrián de la Rosa [@adrm](https://github.com/adrm)
*/
var pt = {
	code: "pt",
	formatDistance: formatDistance$22,
	formatLong: formatLong$22,
	formatRelative: formatRelative$22,
	localize: {
		ordinalNumber: ordinalNumber$22,
		era: buildLocalizeFn({
			values: eraValues$22,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$22,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$22,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$22,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$22,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$21,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(º|ª)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(ac|dc|a|d)/i,
				abbreviated: /^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,
				wide: /^(antes de cristo|antes da era comum|depois de cristo|era comum)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				any: [/^ac/i, /^dc/i],
				wide: [/^(antes de cristo|antes da era comum)/i, /^(depois de cristo|era comum)/i]
			},
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^T[1234]/i,
				wide: /^[1234](º|ª)? trimestre/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[jfmasond]/i,
				abbreviated: /^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,
				wide: /^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^j/i,
					/^f/i,
					/^m/i,
					/^a/i,
					/^m/i,
					/^j/i,
					/^j/i,
					/^a/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				],
				any: [
					/^ja/i,
					/^f/i,
					/^mar/i,
					/^ab/i,
					/^mai/i,
					/^jun/i,
					/^jul/i,
					/^ag/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[dstq]/i,
				short: /^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,
				abbreviated: /^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,
				wide: /^(domingo|segunda-?\s?feira|terça-?\s?feira|quarta-?\s?feira|quinta-?\s?feira|sexta-?\s?feira|s[áa]bado)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^d/i,
					/^s/i,
					/^t/i,
					/^q/i,
					/^q/i,
					/^s/i,
					/^s/i
				],
				any: [
					/^d/i,
					/^seg/i,
					/^t/i,
					/^qua/i,
					/^qui/i,
					/^sex/i,
					/^s[áa]/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(a|p|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i,
				any: /^([ap]\.?\s?m\.?|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a/i,
				pm: /^p/i,
				midnight: /^meia/i,
				noon: /^meio/i,
				morning: /manh[ãa]/i,
				afternoon: /tarde/i,
				evening: /noite/i,
				night: /madrugada/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/pt-BR/_lib/formatDistance.js
var formatDistanceLocale$21 = {
	lessThanXSeconds: {
		one: "menos de um segundo",
		other: "menos de {{count}} segundos"
	},
	xSeconds: {
		one: "1 segundo",
		other: "{{count}} segundos"
	},
	halfAMinute: "meio minuto",
	lessThanXMinutes: {
		one: "menos de um minuto",
		other: "menos de {{count}} minutos"
	},
	xMinutes: {
		one: "1 minuto",
		other: "{{count}} minutos"
	},
	aboutXHours: {
		one: "cerca de 1 hora",
		other: "cerca de {{count}} horas"
	},
	xHours: {
		one: "1 hora",
		other: "{{count}} horas"
	},
	xDays: {
		one: "1 dia",
		other: "{{count}} dias"
	},
	aboutXWeeks: {
		one: "cerca de 1 semana",
		other: "cerca de {{count}} semanas"
	},
	xWeeks: {
		one: "1 semana",
		other: "{{count}} semanas"
	},
	aboutXMonths: {
		one: "cerca de 1 mês",
		other: "cerca de {{count}} meses"
	},
	xMonths: {
		one: "1 mês",
		other: "{{count}} meses"
	},
	aboutXYears: {
		one: "cerca de 1 ano",
		other: "cerca de {{count}} anos"
	},
	xYears: {
		one: "1 ano",
		other: "{{count}} anos"
	},
	overXYears: {
		one: "mais de 1 ano",
		other: "mais de {{count}} anos"
	},
	almostXYears: {
		one: "quase 1 ano",
		other: "quase {{count}} anos"
	}
};
var formatDistance$21 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$21[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "em " + result;
	else return "há " + result;
	return result;
};
var formatLong$21 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, d 'de' MMMM 'de' y",
			long: "d 'de' MMMM 'de' y",
			medium: "d MMM y",
			short: "dd/MM/yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'às' {{time}}",
			long: "{{date}} 'às' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/pt-BR/_lib/formatRelative.js
var formatRelativeLocale$21 = {
	lastWeek: (date) => {
		const weekday = date.getDay();
		return "'" + (weekday === 0 || weekday === 6 ? "último" : "última") + "' eeee 'às' p";
	},
	yesterday: "'ontem às' p",
	today: "'hoje às' p",
	tomorrow: "'amanhã às' p",
	nextWeek: "eeee 'às' p",
	other: "P"
};
var formatRelative$21 = (token, date, _baseDate, _options) => {
	const format = formatRelativeLocale$21[token];
	if (typeof format === "function") return format(date);
	return format;
};
//#endregion
//#region ../../node_modules/date-fns/locale/pt-BR/_lib/localize.js
var eraValues$21 = {
	narrow: ["AC", "DC"],
	abbreviated: ["AC", "DC"],
	wide: ["antes de cristo", "depois de cristo"]
};
var quarterValues$21 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"T1",
		"T2",
		"T3",
		"T4"
	],
	wide: [
		"1º trimestre",
		"2º trimestre",
		"3º trimestre",
		"4º trimestre"
	]
};
var monthValues$21 = {
	narrow: [
		"j",
		"f",
		"m",
		"a",
		"m",
		"j",
		"j",
		"a",
		"s",
		"o",
		"n",
		"d"
	],
	abbreviated: [
		"jan",
		"fev",
		"mar",
		"abr",
		"mai",
		"jun",
		"jul",
		"ago",
		"set",
		"out",
		"nov",
		"dez"
	],
	wide: [
		"janeiro",
		"fevereiro",
		"março",
		"abril",
		"maio",
		"junho",
		"julho",
		"agosto",
		"setembro",
		"outubro",
		"novembro",
		"dezembro"
	]
};
var dayValues$21 = {
	narrow: [
		"D",
		"S",
		"T",
		"Q",
		"Q",
		"S",
		"S"
	],
	short: [
		"dom",
		"seg",
		"ter",
		"qua",
		"qui",
		"sex",
		"sab"
	],
	abbreviated: [
		"domingo",
		"segunda",
		"terça",
		"quarta",
		"quinta",
		"sexta",
		"sábado"
	],
	wide: [
		"domingo",
		"segunda-feira",
		"terça-feira",
		"quarta-feira",
		"quinta-feira",
		"sexta-feira",
		"sábado"
	]
};
var dayPeriodValues$21 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "mn",
		noon: "md",
		morning: "manhã",
		afternoon: "tarde",
		evening: "tarde",
		night: "noite"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "meia-noite",
		noon: "meio-dia",
		morning: "manhã",
		afternoon: "tarde",
		evening: "tarde",
		night: "noite"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "meia-noite",
		noon: "meio-dia",
		morning: "manhã",
		afternoon: "tarde",
		evening: "tarde",
		night: "noite"
	}
};
var formattingDayPeriodValues$20 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "mn",
		noon: "md",
		morning: "da manhã",
		afternoon: "da tarde",
		evening: "da tarde",
		night: "da noite"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "meia-noite",
		noon: "meio-dia",
		morning: "da manhã",
		afternoon: "da tarde",
		evening: "da tarde",
		night: "da noite"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "meia-noite",
		noon: "meio-dia",
		morning: "da manhã",
		afternoon: "da tarde",
		evening: "da tarde",
		night: "da noite"
	}
};
var ordinalNumber$21 = (dirtyNumber, options) => {
	const number = Number(dirtyNumber);
	if (options?.unit === "week") return number + "ª";
	return number + "º";
};
//#endregion
//#region ../../node_modules/date-fns/locale/pt-BR.js
/**
* @category Locales
* @summary Portuguese locale (Brazil).
* @language Portuguese
* @iso-639-2 por
* @author Lucas Duailibe [@duailibe](https://github.com/duailibe)
* @author Yago Carballo [@yagocarballo](https://github.com/YagoCarballo)
*/
var ptBR = {
	code: "pt-BR",
	formatDistance: formatDistance$21,
	formatLong: formatLong$21,
	formatRelative: formatRelative$21,
	localize: {
		ordinalNumber: ordinalNumber$21,
		era: buildLocalizeFn({
			values: eraValues$21,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$21,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$21,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$21,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$21,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$20,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)[ºªo]?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(ac|dc|a|d)/i,
				abbreviated: /^(a\.?\s?c\.?|d\.?\s?c\.?)/i,
				wide: /^(antes de cristo|depois de cristo)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				any: [/^ac/i, /^dc/i],
				wide: [/^antes de cristo/i, /^depois de cristo/i]
			},
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^T[1234]/i,
				wide: /^[1234](º)? trimestre/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[jfmajsond]/i,
				abbreviated: /^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,
				wide: /^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^j/i,
					/^f/i,
					/^m/i,
					/^a/i,
					/^m/i,
					/^j/i,
					/^j/i,
					/^a/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				],
				any: [
					/^ja/i,
					/^fev/i,
					/^mar/i,
					/^abr/i,
					/^mai/i,
					/^jun/i,
					/^jul/i,
					/^ago/i,
					/^set/i,
					/^out/i,
					/^nov/i,
					/^dez/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^(dom|[23456]ª?|s[aá]b)/i,
				short: /^(dom|[23456]ª?|s[aá]b)/i,
				abbreviated: /^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,
				wide: /^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				short: [
					/^d/i,
					/^2/i,
					/^3/i,
					/^4/i,
					/^5/i,
					/^6/i,
					/^s[aá]/i
				],
				narrow: [
					/^d/i,
					/^2/i,
					/^3/i,
					/^4/i,
					/^5/i,
					/^6/i,
					/^s[aá]/i
				],
				any: [
					/^d/i,
					/^seg/i,
					/^t/i,
					/^qua/i,
					/^qui/i,
					/^sex/i,
					/^s[aá]b/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(a|p|mn|md|(da) (manhã|tarde|noite))/i,
				any: /^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a/i,
				pm: /^p/i,
				midnight: /^mn|^meia[-\s]noite/i,
				noon: /^md|^meio[-\s]dia/i,
				morning: /manhã/i,
				afternoon: /tarde/i,
				evening: /tarde/i,
				night: /noite/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 0,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/ro/_lib/formatDistance.js
var formatDistanceLocale$20 = {
	lessThanXSeconds: {
		one: "mai puțin de o secundă",
		other: "mai puțin de {{count}} secunde"
	},
	xSeconds: {
		one: "1 secundă",
		other: "{{count}} secunde"
	},
	halfAMinute: "jumătate de minut",
	lessThanXMinutes: {
		one: "mai puțin de un minut",
		other: "mai puțin de {{count}} minute"
	},
	xMinutes: {
		one: "1 minut",
		other: "{{count}} minute"
	},
	aboutXHours: {
		one: "circa 1 oră",
		other: "circa {{count}} ore"
	},
	xHours: {
		one: "1 oră",
		other: "{{count}} ore"
	},
	xDays: {
		one: "1 zi",
		other: "{{count}} zile"
	},
	aboutXWeeks: {
		one: "circa o săptămână",
		other: "circa {{count}} săptămâni"
	},
	xWeeks: {
		one: "1 săptămână",
		other: "{{count}} săptămâni"
	},
	aboutXMonths: {
		one: "circa 1 lună",
		other: "circa {{count}} luni"
	},
	xMonths: {
		one: "1 lună",
		other: "{{count}} luni"
	},
	aboutXYears: {
		one: "circa 1 an",
		other: "circa {{count}} ani"
	},
	xYears: {
		one: "1 an",
		other: "{{count}} ani"
	},
	overXYears: {
		one: "peste 1 an",
		other: "peste {{count}} ani"
	},
	almostXYears: {
		one: "aproape 1 an",
		other: "aproape {{count}} ani"
	}
};
var formatDistance$20 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$20[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "în " + result;
	else return result + " în urmă";
	return result;
};
var formatLong$20 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, d MMMM yyyy",
			long: "d MMMM yyyy",
			medium: "d MMM yyyy",
			short: "dd.MM.yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'la' {{time}}",
			long: "{{date}} 'la' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/ro/_lib/formatRelative.js
var formatRelativeLocale$20 = {
	lastWeek: "eeee 'trecută la' p",
	yesterday: "'ieri la' p",
	today: "'astăzi la' p",
	tomorrow: "'mâine la' p",
	nextWeek: "eeee 'viitoare la' p",
	other: "P"
};
var formatRelative$20 = (token, _date, _baseDate, _options) => formatRelativeLocale$20[token];
//#endregion
//#region ../../node_modules/date-fns/locale/ro/_lib/localize.js
var eraValues$20 = {
	narrow: ["Î", "D"],
	abbreviated: ["Î.d.C.", "D.C."],
	wide: ["Înainte de Cristos", "După Cristos"]
};
var quarterValues$20 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"T1",
		"T2",
		"T3",
		"T4"
	],
	wide: [
		"primul trimestru",
		"al doilea trimestru",
		"al treilea trimestru",
		"al patrulea trimestru"
	]
};
var monthValues$20 = {
	narrow: [
		"I",
		"F",
		"M",
		"A",
		"M",
		"I",
		"I",
		"A",
		"S",
		"O",
		"N",
		"D"
	],
	abbreviated: [
		"ian",
		"feb",
		"mar",
		"apr",
		"mai",
		"iun",
		"iul",
		"aug",
		"sep",
		"oct",
		"noi",
		"dec"
	],
	wide: [
		"ianuarie",
		"februarie",
		"martie",
		"aprilie",
		"mai",
		"iunie",
		"iulie",
		"august",
		"septembrie",
		"octombrie",
		"noiembrie",
		"decembrie"
	]
};
var dayValues$20 = {
	narrow: [
		"d",
		"l",
		"m",
		"m",
		"j",
		"v",
		"s"
	],
	short: [
		"du",
		"lu",
		"ma",
		"mi",
		"jo",
		"vi",
		"sâ"
	],
	abbreviated: [
		"dum",
		"lun",
		"mar",
		"mie",
		"joi",
		"vin",
		"sâm"
	],
	wide: [
		"duminică",
		"luni",
		"marți",
		"miercuri",
		"joi",
		"vineri",
		"sâmbătă"
	]
};
var dayPeriodValues$20 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "mn",
		noon: "ami",
		morning: "dim",
		afternoon: "da",
		evening: "s",
		night: "n"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "miezul nopții",
		noon: "amiază",
		morning: "dimineață",
		afternoon: "după-amiază",
		evening: "seară",
		night: "noapte"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "miezul nopții",
		noon: "amiază",
		morning: "dimineață",
		afternoon: "după-amiază",
		evening: "seară",
		night: "noapte"
	}
};
var formattingDayPeriodValues$19 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "mn",
		noon: "amiază",
		morning: "dimineață",
		afternoon: "după-amiază",
		evening: "seară",
		night: "noapte"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "miezul nopții",
		noon: "amiază",
		morning: "dimineață",
		afternoon: "după-amiază",
		evening: "seară",
		night: "noapte"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "miezul nopții",
		noon: "amiază",
		morning: "dimineață",
		afternoon: "după-amiază",
		evening: "seară",
		night: "noapte"
	}
};
var ordinalNumber$20 = (dirtyNumber, _options) => {
	return String(dirtyNumber);
};
//#endregion
//#region ../../node_modules/date-fns/locale/ro.js
/**
* @category Locales
* @summary Romanian locale.
* @language Romanian
* @iso-639-2 ron
* @author Sergiu Munteanu [@jsergiu](https://github.com/jsergiu)
* @author Adrian Ocneanu [@aocneanu](https://github.com/aocneanu)
* @author Mihai Ocneanu [@gandesc](https://github.com/gandesc)
*/
var ro = {
	code: "ro",
	formatDistance: formatDistance$20,
	formatLong: formatLong$20,
	formatRelative: formatRelative$20,
	localize: {
		ordinalNumber: ordinalNumber$20,
		era: buildLocalizeFn({
			values: eraValues$20,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$20,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$20,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$20,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$20,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$19,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(Î|D)/i,
				abbreviated: /^(Î\.?\s?d\.?\s?C\.?|Î\.?\s?e\.?\s?n\.?|D\.?\s?C\.?|e\.?\s?n\.?)/i,
				wide: /^(Înainte de Cristos|Înaintea erei noastre|După Cristos|Era noastră)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				any: [/^ÎC/i, /^DC/i],
				wide: [/^(Înainte de Cristos|Înaintea erei noastre)/i, /^(După Cristos|Era noastră)/i]
			},
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^T[1234]/i,
				wide: /^trimestrul [1234]/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[ifmaasond]/i,
				abbreviated: /^(ian|feb|mar|apr|mai|iun|iul|aug|sep|oct|noi|dec)/i,
				wide: /^(ianuarie|februarie|martie|aprilie|mai|iunie|iulie|august|septembrie|octombrie|noiembrie|decembrie)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^i/i,
					/^f/i,
					/^m/i,
					/^a/i,
					/^m/i,
					/^i/i,
					/^i/i,
					/^a/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				],
				any: [
					/^ia/i,
					/^f/i,
					/^mar/i,
					/^ap/i,
					/^mai/i,
					/^iun/i,
					/^iul/i,
					/^au/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[dlmjvs]/i,
				short: /^(d|l|ma|mi|j|v|s)/i,
				abbreviated: /^(dum|lun|mar|mie|jo|vi|sâ)/i,
				wide: /^(duminica|luni|marţi|miercuri|joi|vineri|sâmbătă)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^d/i,
					/^l/i,
					/^m/i,
					/^m/i,
					/^j/i,
					/^v/i,
					/^s/i
				],
				any: [
					/^d/i,
					/^l/i,
					/^ma/i,
					/^mi/i,
					/^j/i,
					/^v/i,
					/^s/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(a|p|mn|a|(dimineaţa|după-amiaza|seara|noaptea))/i,
				any: /^([ap]\.?\s?m\.?|miezul nopții|amiaza|(dimineaţa|după-amiaza|seara|noaptea))/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a/i,
				pm: /^p/i,
				midnight: /^mn/i,
				noon: /amiaza/i,
				morning: /dimineaţa/i,
				afternoon: /după-amiaza/i,
				evening: /seara/i,
				night: /noaptea/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/ru/_lib/formatDistance.js
function declension$2(scheme, count) {
	if (scheme.one !== void 0 && count === 1) return scheme.one;
	const rem10 = count % 10;
	const rem100 = count % 100;
	if (rem10 === 1 && rem100 !== 11) return scheme.singularNominative.replace("{{count}}", String(count));
	else if (rem10 >= 2 && rem10 <= 4 && (rem100 < 10 || rem100 > 20)) return scheme.singularGenitive.replace("{{count}}", String(count));
	else return scheme.pluralGenitive.replace("{{count}}", String(count));
}
function buildLocalizeTokenFn$1(scheme) {
	return (count, options) => {
		if (options?.addSuffix) if (options.comparison && options.comparison > 0) if (scheme.future) return declension$2(scheme.future, count);
		else return "через " + declension$2(scheme.regular, count);
		else if (scheme.past) return declension$2(scheme.past, count);
		else return declension$2(scheme.regular, count) + " назад";
		else return declension$2(scheme.regular, count);
	};
}
var formatDistanceLocale$19 = {
	lessThanXSeconds: buildLocalizeTokenFn$1({
		regular: {
			one: "меньше секунды",
			singularNominative: "меньше {{count}} секунды",
			singularGenitive: "меньше {{count}} секунд",
			pluralGenitive: "меньше {{count}} секунд"
		},
		future: {
			one: "меньше, чем через секунду",
			singularNominative: "меньше, чем через {{count}} секунду",
			singularGenitive: "меньше, чем через {{count}} секунды",
			pluralGenitive: "меньше, чем через {{count}} секунд"
		}
	}),
	xSeconds: buildLocalizeTokenFn$1({
		regular: {
			singularNominative: "{{count}} секунда",
			singularGenitive: "{{count}} секунды",
			pluralGenitive: "{{count}} секунд"
		},
		past: {
			singularNominative: "{{count}} секунду назад",
			singularGenitive: "{{count}} секунды назад",
			pluralGenitive: "{{count}} секунд назад"
		},
		future: {
			singularNominative: "через {{count}} секунду",
			singularGenitive: "через {{count}} секунды",
			pluralGenitive: "через {{count}} секунд"
		}
	}),
	halfAMinute: (_count, options) => {
		if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "через полминуты";
		else return "полминуты назад";
		return "полминуты";
	},
	lessThanXMinutes: buildLocalizeTokenFn$1({
		regular: {
			one: "меньше минуты",
			singularNominative: "меньше {{count}} минуты",
			singularGenitive: "меньше {{count}} минут",
			pluralGenitive: "меньше {{count}} минут"
		},
		future: {
			one: "меньше, чем через минуту",
			singularNominative: "меньше, чем через {{count}} минуту",
			singularGenitive: "меньше, чем через {{count}} минуты",
			pluralGenitive: "меньше, чем через {{count}} минут"
		}
	}),
	xMinutes: buildLocalizeTokenFn$1({
		regular: {
			singularNominative: "{{count}} минута",
			singularGenitive: "{{count}} минуты",
			pluralGenitive: "{{count}} минут"
		},
		past: {
			singularNominative: "{{count}} минуту назад",
			singularGenitive: "{{count}} минуты назад",
			pluralGenitive: "{{count}} минут назад"
		},
		future: {
			singularNominative: "через {{count}} минуту",
			singularGenitive: "через {{count}} минуты",
			pluralGenitive: "через {{count}} минут"
		}
	}),
	aboutXHours: buildLocalizeTokenFn$1({
		regular: {
			singularNominative: "около {{count}} часа",
			singularGenitive: "около {{count}} часов",
			pluralGenitive: "около {{count}} часов"
		},
		future: {
			singularNominative: "приблизительно через {{count}} час",
			singularGenitive: "приблизительно через {{count}} часа",
			pluralGenitive: "приблизительно через {{count}} часов"
		}
	}),
	xHours: buildLocalizeTokenFn$1({ regular: {
		singularNominative: "{{count}} час",
		singularGenitive: "{{count}} часа",
		pluralGenitive: "{{count}} часов"
	} }),
	xDays: buildLocalizeTokenFn$1({ regular: {
		singularNominative: "{{count}} день",
		singularGenitive: "{{count}} дня",
		pluralGenitive: "{{count}} дней"
	} }),
	aboutXWeeks: buildLocalizeTokenFn$1({
		regular: {
			singularNominative: "около {{count}} недели",
			singularGenitive: "около {{count}} недель",
			pluralGenitive: "около {{count}} недель"
		},
		future: {
			singularNominative: "приблизительно через {{count}} неделю",
			singularGenitive: "приблизительно через {{count}} недели",
			pluralGenitive: "приблизительно через {{count}} недель"
		}
	}),
	xWeeks: buildLocalizeTokenFn$1({ regular: {
		singularNominative: "{{count}} неделя",
		singularGenitive: "{{count}} недели",
		pluralGenitive: "{{count}} недель"
	} }),
	aboutXMonths: buildLocalizeTokenFn$1({
		regular: {
			singularNominative: "около {{count}} месяца",
			singularGenitive: "около {{count}} месяцев",
			pluralGenitive: "около {{count}} месяцев"
		},
		future: {
			singularNominative: "приблизительно через {{count}} месяц",
			singularGenitive: "приблизительно через {{count}} месяца",
			pluralGenitive: "приблизительно через {{count}} месяцев"
		}
	}),
	xMonths: buildLocalizeTokenFn$1({ regular: {
		singularNominative: "{{count}} месяц",
		singularGenitive: "{{count}} месяца",
		pluralGenitive: "{{count}} месяцев"
	} }),
	aboutXYears: buildLocalizeTokenFn$1({
		regular: {
			singularNominative: "около {{count}} года",
			singularGenitive: "около {{count}} лет",
			pluralGenitive: "около {{count}} лет"
		},
		future: {
			singularNominative: "приблизительно через {{count}} год",
			singularGenitive: "приблизительно через {{count}} года",
			pluralGenitive: "приблизительно через {{count}} лет"
		}
	}),
	xYears: buildLocalizeTokenFn$1({ regular: {
		singularNominative: "{{count}} год",
		singularGenitive: "{{count}} года",
		pluralGenitive: "{{count}} лет"
	} }),
	overXYears: buildLocalizeTokenFn$1({
		regular: {
			singularNominative: "больше {{count}} года",
			singularGenitive: "больше {{count}} лет",
			pluralGenitive: "больше {{count}} лет"
		},
		future: {
			singularNominative: "больше, чем через {{count}} год",
			singularGenitive: "больше, чем через {{count}} года",
			pluralGenitive: "больше, чем через {{count}} лет"
		}
	}),
	almostXYears: buildLocalizeTokenFn$1({
		regular: {
			singularNominative: "почти {{count}} год",
			singularGenitive: "почти {{count}} года",
			pluralGenitive: "почти {{count}} лет"
		},
		future: {
			singularNominative: "почти через {{count}} год",
			singularGenitive: "почти через {{count}} года",
			pluralGenitive: "почти через {{count}} лет"
		}
	})
};
var formatDistance$19 = (token, count, options) => {
	return formatDistanceLocale$19[token](count, options);
};
var formatLong$19 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, d MMMM y 'г.'",
			long: "d MMMM y 'г.'",
			medium: "d MMM y 'г.'",
			short: "dd.MM.y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "H:mm:ss zzzz",
			long: "H:mm:ss z",
			medium: "H:mm:ss",
			short: "H:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: { any: "{{date}}, {{time}}" },
		defaultWidth: "any"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/ru/_lib/formatRelative.js
var accusativeWeekdays$2 = [
	"воскресенье",
	"понедельник",
	"вторник",
	"среду",
	"четверг",
	"пятницу",
	"субботу"
];
function lastWeek$2(day) {
	const weekday = accusativeWeekdays$2[day];
	switch (day) {
		case 0: return "'в прошлое " + weekday + " в' p";
		case 1:
		case 2:
		case 4: return "'в прошлый " + weekday + " в' p";
		case 3:
		case 5:
		case 6: return "'в прошлую " + weekday + " в' p";
	}
}
function thisWeek$2(day) {
	const weekday = accusativeWeekdays$2[day];
	if (day === 2) return "'во " + weekday + " в' p";
	else return "'в " + weekday + " в' p";
}
function nextWeek$2(day) {
	const weekday = accusativeWeekdays$2[day];
	switch (day) {
		case 0: return "'в следующее " + weekday + " в' p";
		case 1:
		case 2:
		case 4: return "'в следующий " + weekday + " в' p";
		case 3:
		case 5:
		case 6: return "'в следующую " + weekday + " в' p";
	}
}
var formatRelativeLocale$19 = {
	lastWeek: (date, baseDate, options) => {
		const day = date.getDay();
		if (isSameWeek(date, baseDate, options)) return thisWeek$2(day);
		else return lastWeek$2(day);
	},
	yesterday: "'вчера в' p",
	today: "'сегодня в' p",
	tomorrow: "'завтра в' p",
	nextWeek: (date, baseDate, options) => {
		const day = date.getDay();
		if (isSameWeek(date, baseDate, options)) return thisWeek$2(day);
		else return nextWeek$2(day);
	},
	other: "P"
};
var formatRelative$19 = (token, date, baseDate, options) => {
	const format = formatRelativeLocale$19[token];
	if (typeof format === "function") return format(date, baseDate, options);
	return format;
};
//#endregion
//#region ../../node_modules/date-fns/locale/ru/_lib/localize.js
var eraValues$19 = {
	narrow: ["до н.э.", "н.э."],
	abbreviated: ["до н. э.", "н. э."],
	wide: ["до нашей эры", "нашей эры"]
};
var quarterValues$19 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"1-й кв.",
		"2-й кв.",
		"3-й кв.",
		"4-й кв."
	],
	wide: [
		"1-й квартал",
		"2-й квартал",
		"3-й квартал",
		"4-й квартал"
	]
};
var monthValues$19 = {
	narrow: [
		"Я",
		"Ф",
		"М",
		"А",
		"М",
		"И",
		"И",
		"А",
		"С",
		"О",
		"Н",
		"Д"
	],
	abbreviated: [
		"янв.",
		"фев.",
		"март",
		"апр.",
		"май",
		"июнь",
		"июль",
		"авг.",
		"сент.",
		"окт.",
		"нояб.",
		"дек."
	],
	wide: [
		"январь",
		"февраль",
		"март",
		"апрель",
		"май",
		"июнь",
		"июль",
		"август",
		"сентябрь",
		"октябрь",
		"ноябрь",
		"декабрь"
	]
};
var formattingMonthValues$5 = {
	narrow: [
		"Я",
		"Ф",
		"М",
		"А",
		"М",
		"И",
		"И",
		"А",
		"С",
		"О",
		"Н",
		"Д"
	],
	abbreviated: [
		"янв.",
		"фев.",
		"мар.",
		"апр.",
		"мая",
		"июн.",
		"июл.",
		"авг.",
		"сент.",
		"окт.",
		"нояб.",
		"дек."
	],
	wide: [
		"января",
		"февраля",
		"марта",
		"апреля",
		"мая",
		"июня",
		"июля",
		"августа",
		"сентября",
		"октября",
		"ноября",
		"декабря"
	]
};
var dayValues$19 = {
	narrow: [
		"В",
		"П",
		"В",
		"С",
		"Ч",
		"П",
		"С"
	],
	short: [
		"вс",
		"пн",
		"вт",
		"ср",
		"чт",
		"пт",
		"сб"
	],
	abbreviated: [
		"вск",
		"пнд",
		"втр",
		"срд",
		"чтв",
		"птн",
		"суб"
	],
	wide: [
		"воскресенье",
		"понедельник",
		"вторник",
		"среда",
		"четверг",
		"пятница",
		"суббота"
	]
};
var dayPeriodValues$19 = {
	narrow: {
		am: "ДП",
		pm: "ПП",
		midnight: "полн.",
		noon: "полд.",
		morning: "утро",
		afternoon: "день",
		evening: "веч.",
		night: "ночь"
	},
	abbreviated: {
		am: "ДП",
		pm: "ПП",
		midnight: "полн.",
		noon: "полд.",
		morning: "утро",
		afternoon: "день",
		evening: "веч.",
		night: "ночь"
	},
	wide: {
		am: "ДП",
		pm: "ПП",
		midnight: "полночь",
		noon: "полдень",
		morning: "утро",
		afternoon: "день",
		evening: "вечер",
		night: "ночь"
	}
};
var formattingDayPeriodValues$18 = {
	narrow: {
		am: "ДП",
		pm: "ПП",
		midnight: "полн.",
		noon: "полд.",
		morning: "утра",
		afternoon: "дня",
		evening: "веч.",
		night: "ночи"
	},
	abbreviated: {
		am: "ДП",
		pm: "ПП",
		midnight: "полн.",
		noon: "полд.",
		morning: "утра",
		afternoon: "дня",
		evening: "веч.",
		night: "ночи"
	},
	wide: {
		am: "ДП",
		pm: "ПП",
		midnight: "полночь",
		noon: "полдень",
		morning: "утра",
		afternoon: "дня",
		evening: "вечера",
		night: "ночи"
	}
};
var ordinalNumber$19 = (dirtyNumber, options) => {
	const number = Number(dirtyNumber);
	const unit = options?.unit;
	let suffix;
	if (unit === "date") suffix = "-е";
	else if (unit === "week" || unit === "minute" || unit === "second") suffix = "-я";
	else suffix = "-й";
	return number + suffix;
};
//#endregion
//#region ../../node_modules/date-fns/locale/ru.js
/**
* @category Locales
* @summary Russian locale.
* @language Russian
* @iso-639-2 rus
* @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)
* @author Lesha Koss [@leshakoss](https://github.com/leshakoss)
*/
var ru = {
	code: "ru",
	formatDistance: formatDistance$19,
	formatLong: formatLong$19,
	formatRelative: formatRelative$19,
	localize: {
		ordinalNumber: ordinalNumber$19,
		era: buildLocalizeFn({
			values: eraValues$19,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$19,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$19,
			defaultWidth: "wide",
			formattingValues: formattingMonthValues$5,
			defaultFormattingWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$19,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$19,
			defaultWidth: "any",
			formattingValues: formattingDayPeriodValues$18,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^((до )?н\.?\s?э\.?)/i,
				abbreviated: /^((до )?н\.?\s?э\.?)/i,
				wide: /^(до нашей эры|нашей эры|наша эра)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^д/i, /^н/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^[1234](-?[ыои]?й?)? кв.?/i,
				wide: /^[1234](-?[ыои]?й?)? квартал/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[яфмаисонд]/i,
				abbreviated: /^(янв|фев|март?|апр|ма[йя]|июн[ья]?|июл[ья]?|авг|сент?|окт|нояб?|дек)\.?/i,
				wide: /^(январ[ья]|феврал[ья]|марта?|апрел[ья]|ма[йя]|июн[ья]|июл[ья]|августа?|сентябр[ья]|октябр[ья]|октябр[ья]|ноябр[ья]|декабр[ья])/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^я/i,
					/^ф/i,
					/^м/i,
					/^а/i,
					/^м/i,
					/^и/i,
					/^и/i,
					/^а/i,
					/^с/i,
					/^о/i,
					/^н/i,
					/^я/i
				],
				any: [
					/^я/i,
					/^ф/i,
					/^мар/i,
					/^ап/i,
					/^ма[йя]/i,
					/^июн/i,
					/^июл/i,
					/^ав/i,
					/^с/i,
					/^о/i,
					/^н/i,
					/^д/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[впсч]/i,
				short: /^(вс|во|пн|по|вт|ср|чт|че|пт|пя|сб|су)\.?/i,
				abbreviated: /^(вск|вос|пнд|пон|втр|вто|срд|сре|чтв|чет|птн|пят|суб).?/i,
				wide: /^(воскресень[ея]|понедельника?|вторника?|сред[аы]|четверга?|пятниц[аы]|суббот[аы])/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^в/i,
					/^п/i,
					/^в/i,
					/^с/i,
					/^ч/i,
					/^п/i,
					/^с/i
				],
				any: [
					/^в[ос]/i,
					/^п[он]/i,
					/^в/i,
					/^ср/i,
					/^ч/i,
					/^п[ят]/i,
					/^с[уб]/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,
				abbreviated: /^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,
				wide: /^([дп]п|полночь|полдень|утр[оа]|день|дня|вечера?|ноч[ьи])/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: {
				am: /^дп/i,
				pm: /^пп/i,
				midnight: /^полн/i,
				noon: /^полд/i,
				morning: /^у/i,
				afternoon: /^д[ен]/i,
				evening: /^в/i,
				night: /^н/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/se/_lib/formatDistance.js
var formatDistanceLocale$18 = {
	lessThanXSeconds: {
		one: "unnit go ovtta sekundda",
		other: "unnit go {{count}} sekundda"
	},
	xSeconds: {
		one: "sekundda",
		other: "{{count}} sekundda"
	},
	halfAMinute: "bealle minuhta",
	lessThanXMinutes: {
		one: "unnit go bealle minuhta",
		other: "unnit go {{count}} minuhta"
	},
	xMinutes: {
		one: "minuhta",
		other: "{{count}} minuhta"
	},
	aboutXHours: {
		one: "sullii ovtta diimmu",
		other: "sullii {{count}} diimmu"
	},
	xHours: {
		one: "diimmu",
		other: "{{count}} diimmu"
	},
	xDays: {
		one: "beaivvi",
		other: "{{count}} beaivvi"
	},
	aboutXWeeks: {
		one: "sullii ovtta vahku",
		other: "sullii {{count}} vahku"
	},
	xWeeks: {
		one: "vahku",
		other: "{{count}} vahku"
	},
	aboutXMonths: {
		one: "sullii ovtta mánu",
		other: "sullii {{count}} mánu"
	},
	xMonths: {
		one: "mánu",
		other: "{{count}} mánu"
	},
	aboutXYears: {
		one: "sullii ovtta jagi",
		other: "sullii {{count}} jagi"
	},
	xYears: {
		one: "jagi",
		other: "{{count}} jagi"
	},
	overXYears: {
		one: "guhkit go jagi",
		other: "guhkit go {{count}} jagi"
	},
	almostXYears: {
		one: "measta jagi",
		other: "measta {{count}} jagi"
	}
};
var formatDistance$18 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$18[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "geahčen " + result;
	else return result + " áigi";
	return result;
};
var formatLong$18 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE MMMM d. 'b.' y",
			long: "MMMM d. 'b.' y",
			medium: "MMM d. 'b.' y",
			short: "dd.MM.y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "'dii.' HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'dii.' {{time}}",
			long: "{{date}} 'dii.' {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/se/_lib/formatRelative.js
var formatRelativeLocale$18 = {
	lastWeek: "'ovddit' eeee 'dii.' p",
	yesterday: "'ikte dii.' p",
	today: "'odne dii.' p",
	tomorrow: "'ihtin dii.' p",
	nextWeek: "EEEE 'dii.' p",
	other: "P"
};
var formatRelative$18 = (token, _date, _baseDate, _options) => formatRelativeLocale$18[token];
//#endregion
//#region ../../node_modules/date-fns/locale/se/_lib/localize.js
var eraValues$18 = {
	narrow: ["o.Kr.", "m.Kr."],
	abbreviated: ["o.Kr.", "m.Kr."],
	wide: ["ovdal Kristusa", "maŋŋel Kristusa"]
};
var quarterValues$18 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"Q1",
		"Q2",
		"Q3",
		"Q4"
	],
	wide: [
		"1. kvartála",
		"2. kvartála",
		"3. kvartála",
		"4. kvartála"
	]
};
var monthValues$18 = {
	narrow: [
		"O",
		"G",
		"N",
		"C",
		"M",
		"G",
		"S",
		"B",
		"Č",
		"G",
		"S",
		"J"
	],
	abbreviated: [
		"ođđa",
		"guov",
		"njuk",
		"cuo",
		"mies",
		"geas",
		"suoi",
		"borg",
		"čakč",
		"golg",
		"skáb",
		"juov"
	],
	wide: [
		"ođđajagemánnu",
		"guovvamánnu",
		"njukčamánnu",
		"cuoŋománnu",
		"miessemánnu",
		"geassemánnu",
		"suoidnemánnu",
		"borgemánnu",
		"čakčamánnu",
		"golggotmánnu",
		"skábmamánnu",
		"juovlamánnu"
	]
};
var dayValues$18 = {
	narrow: [
		"S",
		"V",
		"M",
		"G",
		"D",
		"B",
		"L"
	],
	short: [
		"sotn",
		"vuos",
		"maŋ",
		"gask",
		"duor",
		"bear",
		"láv"
	],
	abbreviated: [
		"sotn",
		"vuos",
		"maŋ",
		"gask",
		"duor",
		"bear",
		"láv"
	],
	wide: [
		"sotnabeaivi",
		"vuossárga",
		"maŋŋebárga",
		"gaskavahkku",
		"duorastat",
		"bearjadat",
		"lávvardat"
	]
};
var dayPeriodValues$18 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "gaskaidja",
		noon: "gaskabeaivi",
		morning: "iđđes",
		afternoon: "maŋŋel gaska.",
		evening: "eahkes",
		night: "ihkku"
	},
	abbreviated: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "gaskaidja",
		noon: "gaskabeaivvi",
		morning: "iđđes",
		afternoon: "maŋŋel gaskabea.",
		evening: "eahkes",
		night: "ihkku"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "gaskaidja",
		noon: "gaskabeavvi",
		morning: "iđđes",
		afternoon: "maŋŋel gaskabeaivvi",
		evening: "eahkes",
		night: "ihkku"
	}
};
var ordinalNumber$18 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + ".";
};
//#endregion
//#region ../../node_modules/date-fns/locale/se.js
/**
* @category Locales
* @summary Northern Sámi locale.
* @language Northern Sámi
* @iso-639-2 sme
* @author Audun Rundberg [@audunru](https://github.com/audunru)
*/
var se = {
	code: "se",
	formatDistance: formatDistance$18,
	formatLong: formatLong$18,
	formatRelative: formatRelative$18,
	localize: {
		ordinalNumber: ordinalNumber$18,
		era: buildLocalizeFn({
			values: eraValues$18,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$18,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$18,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$18,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$18,
			defaultWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)\.?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(o\.? ?Kr\.?|m\.? ?Kr\.?)/i,
				abbreviated: /^(o\.? ?Kr\.?|m\.? ?Kr\.?)/i,
				wide: /^(ovdal Kristusa|ovdal min áiggi|maŋŋel Kristusa|min áigi)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^o/i, /^m/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^q[1234]/i,
				wide: /^[1234](\.)? kvartála/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[ogncmsbčj]/i,
				abbreviated: /^(ođđa|guov|njuk|cuo|mies|geas|suoi|borg|čakč|golg|skáb|juov)\.?/i,
				wide: /^(ođđajagemánnu|guovvamánnu|njukčamánnu|cuoŋománnu|miessemánnu|geassemánnu|suoidnemánnu|borgemánnu|čakčamánnu|golggotmánnu|skábmamánnu|juovlamánnu)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^o/i,
					/^g/i,
					/^n/i,
					/^c/i,
					/^m/i,
					/^g/i,
					/^s/i,
					/^b/i,
					/^č/i,
					/^g/i,
					/^s/i,
					/^j/i
				],
				any: [
					/^o/i,
					/^gu/i,
					/^n/i,
					/^c/i,
					/^m/i,
					/^ge/i,
					/^su/i,
					/^b/i,
					/^č/i,
					/^go/i,
					/^sk/i,
					/^j/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[svmgdbl]/i,
				short: /^(sotn|vuos|maŋ|gask|duor|bear|láv)/i,
				abbreviated: /^(sotn|vuos|maŋ|gask|duor|bear|láv)/i,
				wide: /^(sotnabeaivi|vuossárga|maŋŋebárga|gaskavahkku|duorastat|bearjadat|lávvardat)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/^s/i,
				/^v/i,
				/^m/i,
				/^g/i,
				/^d/i,
				/^b/i,
				/^l/i
			] },
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(gaskaidja|gaskabeaivvi|(på) (iđđes|maŋŋel gaskabeaivvi|eahkes|ihkku)|[ap])/i,
				any: /^([ap]\.?\s?m\.?|gaskaidja|gaskabeaivvi|(på) (iđđes|maŋŋel gaskabeaivvi|eahkes|ihkku))/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a(\.?\s?m\.?)?$/i,
				pm: /^p(\.?\s?m\.?)?$/i,
				midnight: /^gaskai/i,
				noon: /^gaskab/i,
				morning: /iđđes/i,
				afternoon: /maŋŋel gaskabeaivvi/i,
				evening: /eahkes/i,
				night: /ihkku/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/sk/_lib/formatDistance.js
function declensionGroup(scheme, count) {
	if (count === 1 && scheme.one) return scheme.one;
	if (count >= 2 && count <= 4 && scheme.twoFour) return scheme.twoFour;
	return scheme.other;
}
function declension$1(scheme, count, time) {
	return declensionGroup(scheme, count)[time].replace("{{count}}", String(count));
}
function extractPreposition(token) {
	return [
		"lessThan",
		"about",
		"over",
		"almost"
	].filter(function(preposition) {
		return !!token.match(new RegExp("^" + preposition));
	})[0];
}
function prefixPreposition(preposition) {
	let translation = "";
	if (preposition === "almost") translation = "takmer";
	if (preposition === "about") translation = "približne";
	return translation.length > 0 ? translation + " " : "";
}
function suffixPreposition(preposition) {
	let translation = "";
	if (preposition === "lessThan") translation = "menej než";
	if (preposition === "over") translation = "viac než";
	return translation.length > 0 ? translation + " " : "";
}
function lowercaseFirstLetter(string) {
	return string.charAt(0).toLowerCase() + string.slice(1);
}
var formatDistanceLocale$17 = {
	xSeconds: {
		one: {
			present: "sekunda",
			past: "sekundou",
			future: "sekundu"
		},
		twoFour: {
			present: "{{count}} sekundy",
			past: "{{count}} sekundami",
			future: "{{count}} sekundy"
		},
		other: {
			present: "{{count}} sekúnd",
			past: "{{count}} sekundami",
			future: "{{count}} sekúnd"
		}
	},
	halfAMinute: { other: {
		present: "pol minúty",
		past: "pol minútou",
		future: "pol minúty"
	} },
	xMinutes: {
		one: {
			present: "minúta",
			past: "minútou",
			future: "minútu"
		},
		twoFour: {
			present: "{{count}} minúty",
			past: "{{count}} minútami",
			future: "{{count}} minúty"
		},
		other: {
			present: "{{count}} minút",
			past: "{{count}} minútami",
			future: "{{count}} minút"
		}
	},
	xHours: {
		one: {
			present: "hodina",
			past: "hodinou",
			future: "hodinu"
		},
		twoFour: {
			present: "{{count}} hodiny",
			past: "{{count}} hodinami",
			future: "{{count}} hodiny"
		},
		other: {
			present: "{{count}} hodín",
			past: "{{count}} hodinami",
			future: "{{count}} hodín"
		}
	},
	xDays: {
		one: {
			present: "deň",
			past: "dňom",
			future: "deň"
		},
		twoFour: {
			present: "{{count}} dni",
			past: "{{count}} dňami",
			future: "{{count}} dni"
		},
		other: {
			present: "{{count}} dní",
			past: "{{count}} dňami",
			future: "{{count}} dní"
		}
	},
	xWeeks: {
		one: {
			present: "týždeň",
			past: "týždňom",
			future: "týždeň"
		},
		twoFour: {
			present: "{{count}} týždne",
			past: "{{count}} týždňami",
			future: "{{count}} týždne"
		},
		other: {
			present: "{{count}} týždňov",
			past: "{{count}} týždňami",
			future: "{{count}} týždňov"
		}
	},
	xMonths: {
		one: {
			present: "mesiac",
			past: "mesiacom",
			future: "mesiac"
		},
		twoFour: {
			present: "{{count}} mesiace",
			past: "{{count}} mesiacmi",
			future: "{{count}} mesiace"
		},
		other: {
			present: "{{count}} mesiacov",
			past: "{{count}} mesiacmi",
			future: "{{count}} mesiacov"
		}
	},
	xYears: {
		one: {
			present: "rok",
			past: "rokom",
			future: "rok"
		},
		twoFour: {
			present: "{{count}} roky",
			past: "{{count}} rokmi",
			future: "{{count}} roky"
		},
		other: {
			present: "{{count}} rokov",
			past: "{{count}} rokmi",
			future: "{{count}} rokov"
		}
	}
};
var formatDistance$17 = (token, count, options) => {
	const preposition = extractPreposition(token) || "";
	const scheme = formatDistanceLocale$17[lowercaseFirstLetter(token.substring(preposition.length))];
	if (!options?.addSuffix) return prefixPreposition(preposition) + suffixPreposition(preposition) + declension$1(scheme, count, "present");
	if (options.comparison && options.comparison > 0) return prefixPreposition(preposition) + "o " + suffixPreposition(preposition) + declension$1(scheme, count, "future");
	else return prefixPreposition(preposition) + "pred " + suffixPreposition(preposition) + declension$1(scheme, count, "past");
};
var formatLong$17 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE d. MMMM y",
			long: "d. MMMM y",
			medium: "d. M. y",
			short: "d. M. y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "H:mm:ss zzzz",
			long: "H:mm:ss z",
			medium: "H:mm:ss",
			short: "H:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}}, {{time}}",
			long: "{{date}}, {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/sk/_lib/formatRelative.js
var accusativeWeekdays$1 = [
	"nedeľu",
	"pondelok",
	"utorok",
	"stredu",
	"štvrtok",
	"piatok",
	"sobotu"
];
function lastWeek$1(day) {
	const weekday = accusativeWeekdays$1[day];
	switch (day) {
		case 0:
		case 3:
		case 6: return "'minulú " + weekday + " o' p";
		default: return "'minulý' eeee 'o' p";
	}
}
function thisWeek$1(day) {
	const weekday = accusativeWeekdays$1[day];
	if (day === 4) return "'vo' eeee 'o' p";
	else return "'v " + weekday + " o' p";
}
function nextWeek$1(day) {
	const weekday = accusativeWeekdays$1[day];
	switch (day) {
		case 0:
		case 4:
		case 6: return "'budúcu " + weekday + " o' p";
		default: return "'budúci' eeee 'o' p";
	}
}
var formatRelativeLocale$17 = {
	lastWeek: (date, baseDate, options) => {
		const day = date.getDay();
		if (isSameWeek(date, baseDate, options)) return thisWeek$1(day);
		else return lastWeek$1(day);
	},
	yesterday: "'včera o' p",
	today: "'dnes o' p",
	tomorrow: "'zajtra o' p",
	nextWeek: (date, baseDate, options) => {
		const day = date.getDay();
		if (isSameWeek(date, baseDate, options)) return thisWeek$1(day);
		else return nextWeek$1(day);
	},
	other: "P"
};
var formatRelative$17 = (token, date, baseDate, options) => {
	const format = formatRelativeLocale$17[token];
	if (typeof format === "function") return format(date, baseDate, options);
	return format;
};
//#endregion
//#region ../../node_modules/date-fns/locale/sk/_lib/localize.js
var eraValues$17 = {
	narrow: ["pred Kr.", "po Kr."],
	abbreviated: ["pred Kr.", "po Kr."],
	wide: ["pred Kristom", "po Kristovi"]
};
var quarterValues$17 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"Q1",
		"Q2",
		"Q3",
		"Q4"
	],
	wide: [
		"1. štvrťrok",
		"2. štvrťrok",
		"3. štvrťrok",
		"4. štvrťrok"
	]
};
var monthValues$17 = {
	narrow: [
		"j",
		"f",
		"m",
		"a",
		"m",
		"j",
		"j",
		"a",
		"s",
		"o",
		"n",
		"d"
	],
	abbreviated: [
		"jan",
		"feb",
		"mar",
		"apr",
		"máj",
		"jún",
		"júl",
		"aug",
		"sep",
		"okt",
		"nov",
		"dec"
	],
	wide: [
		"január",
		"február",
		"marec",
		"apríl",
		"máj",
		"jún",
		"júl",
		"august",
		"september",
		"október",
		"november",
		"december"
	]
};
var formattingMonthValues$4 = {
	narrow: [
		"j",
		"f",
		"m",
		"a",
		"m",
		"j",
		"j",
		"a",
		"s",
		"o",
		"n",
		"d"
	],
	abbreviated: [
		"jan",
		"feb",
		"mar",
		"apr",
		"máj",
		"jún",
		"júl",
		"aug",
		"sep",
		"okt",
		"nov",
		"dec"
	],
	wide: [
		"januára",
		"februára",
		"marca",
		"apríla",
		"mája",
		"júna",
		"júla",
		"augusta",
		"septembra",
		"októbra",
		"novembra",
		"decembra"
	]
};
var dayValues$17 = {
	narrow: [
		"n",
		"p",
		"u",
		"s",
		"š",
		"p",
		"s"
	],
	short: [
		"ne",
		"po",
		"ut",
		"st",
		"št",
		"pi",
		"so"
	],
	abbreviated: [
		"ne",
		"po",
		"ut",
		"st",
		"št",
		"pi",
		"so"
	],
	wide: [
		"nedeľa",
		"pondelok",
		"utorok",
		"streda",
		"štvrtok",
		"piatok",
		"sobota"
	]
};
var dayPeriodValues$17 = {
	narrow: {
		am: "AM",
		pm: "PM",
		midnight: "poln.",
		noon: "pol.",
		morning: "ráno",
		afternoon: "pop.",
		evening: "več.",
		night: "noc"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "poln.",
		noon: "pol.",
		morning: "ráno",
		afternoon: "popol.",
		evening: "večer",
		night: "noc"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "polnoc",
		noon: "poludnie",
		morning: "ráno",
		afternoon: "popoludnie",
		evening: "večer",
		night: "noc"
	}
};
var formattingDayPeriodValues$17 = {
	narrow: {
		am: "AM",
		pm: "PM",
		midnight: "o poln.",
		noon: "nap.",
		morning: "ráno",
		afternoon: "pop.",
		evening: "več.",
		night: "v n."
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "o poln.",
		noon: "napol.",
		morning: "ráno",
		afternoon: "popol.",
		evening: "večer",
		night: "v noci"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "o polnoci",
		noon: "napoludnie",
		morning: "ráno",
		afternoon: "popoludní",
		evening: "večer",
		night: "v noci"
	}
};
var ordinalNumber$17 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + ".";
};
//#endregion
//#region ../../node_modules/date-fns/locale/sk.js
/**
* @category Locales
* @summary Slovak locale.
* @language Slovak
* @iso-639-2 slk
* @author Marek Suscak [@mareksuscak](https://github.com/mareksuscak)
*/
var sk = {
	code: "sk",
	formatDistance: formatDistance$17,
	formatLong: formatLong$17,
	formatRelative: formatRelative$17,
	localize: {
		ordinalNumber: ordinalNumber$17,
		era: buildLocalizeFn({
			values: eraValues$17,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$17,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$17,
			defaultWidth: "wide",
			formattingValues: formattingMonthValues$4,
			defaultFormattingWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$17,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$17,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$17,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)\.?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(pred Kr\.|pred n\. l\.|po Kr\.|n\. l\.)/i,
				abbreviated: /^(pred Kr\.|pred n\. l\.|po Kr\.|n\. l\.)/i,
				wide: /^(pred Kristom|pred na[šs][íi]m letopo[čc]tom|po Kristovi|n[áa][šs]ho letopo[čc]tu)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^pr/i, /^(po|n)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^q[1234]/i,
				wide: /^[1234]\. [šs]tvr[ťt]rok/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[jfmasond]/i,
				abbreviated: /^(jan|feb|mar|apr|m[áa]j|j[úu]n|j[úu]l|aug|sep|okt|nov|dec)/i,
				wide: /^(janu[áa]ra?|febru[áa]ra?|(marec|marca)|apr[íi]la?|m[áa]ja?|j[úu]na?|j[úu]la?|augusta?|(september|septembra)|(okt[óo]ber|okt[óo]bra)|(november|novembra)|(december|decembra))/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^j/i,
					/^f/i,
					/^m/i,
					/^a/i,
					/^m/i,
					/^j/i,
					/^j/i,
					/^a/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				],
				any: [
					/^ja/i,
					/^f/i,
					/^mar/i,
					/^ap/i,
					/^m[áa]j/i,
					/^j[úu]n/i,
					/^j[úu]l/i,
					/^au/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[npusšp]/i,
				short: /^(ne|po|ut|st|št|pi|so)/i,
				abbreviated: /^(ne|po|ut|st|št|pi|so)/i,
				wide: /^(nede[ľl]a|pondelok|utorok|streda|[šs]tvrtok|piatok|sobota])/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^n/i,
					/^p/i,
					/^u/i,
					/^s/i,
					/^š/i,
					/^p/i,
					/^s/i
				],
				any: [
					/^n/i,
					/^po/i,
					/^u/i,
					/^st/i,
					/^(št|stv)/i,
					/^pi/i,
					/^so/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(am|pm|(o )?poln\.?|(nap\.?|pol\.?)|r[áa]no|pop\.?|ve[čc]\.?|(v n\.?|noc))/i,
				abbreviated: /^(am|pm|(o )?poln\.?|(napol\.?|pol\.?)|r[áa]no|pop\.?|ve[čc]er|(v )?noci?)/i,
				any: /^(am|pm|(o )?polnoci?|(na)?poludnie|r[áa]no|popoludn(ie|í|i)|ve[čc]er|(v )?noci?)/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^am/i,
				pm: /^pm/i,
				midnight: /poln/i,
				noon: /^(nap|(na)?pol(\.|u))/i,
				morning: /^r[áa]no/i,
				afternoon: /^pop/i,
				evening: /^ve[čc]/i,
				night: /^(noc|v n\.)/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/sl/_lib/formatDistance.js
function isPluralType$1(val) {
	return val.one !== void 0;
}
var formatDistanceLocale$16 = {
	lessThanXSeconds: {
		present: {
			one: "manj kot {{count}} sekunda",
			two: "manj kot {{count}} sekundi",
			few: "manj kot {{count}} sekunde",
			other: "manj kot {{count}} sekund"
		},
		past: {
			one: "manj kot {{count}} sekundo",
			two: "manj kot {{count}} sekundama",
			few: "manj kot {{count}} sekundami",
			other: "manj kot {{count}} sekundami"
		},
		future: {
			one: "manj kot {{count}} sekundo",
			two: "manj kot {{count}} sekundi",
			few: "manj kot {{count}} sekunde",
			other: "manj kot {{count}} sekund"
		}
	},
	xSeconds: {
		present: {
			one: "{{count}} sekunda",
			two: "{{count}} sekundi",
			few: "{{count}} sekunde",
			other: "{{count}} sekund"
		},
		past: {
			one: "{{count}} sekundo",
			two: "{{count}} sekundama",
			few: "{{count}} sekundami",
			other: "{{count}} sekundami"
		},
		future: {
			one: "{{count}} sekundo",
			two: "{{count}} sekundi",
			few: "{{count}} sekunde",
			other: "{{count}} sekund"
		}
	},
	halfAMinute: "pol minute",
	lessThanXMinutes: {
		present: {
			one: "manj kot {{count}} minuta",
			two: "manj kot {{count}} minuti",
			few: "manj kot {{count}} minute",
			other: "manj kot {{count}} minut"
		},
		past: {
			one: "manj kot {{count}} minuto",
			two: "manj kot {{count}} minutama",
			few: "manj kot {{count}} minutami",
			other: "manj kot {{count}} minutami"
		},
		future: {
			one: "manj kot {{count}} minuto",
			two: "manj kot {{count}} minuti",
			few: "manj kot {{count}} minute",
			other: "manj kot {{count}} minut"
		}
	},
	xMinutes: {
		present: {
			one: "{{count}} minuta",
			two: "{{count}} minuti",
			few: "{{count}} minute",
			other: "{{count}} minut"
		},
		past: {
			one: "{{count}} minuto",
			two: "{{count}} minutama",
			few: "{{count}} minutami",
			other: "{{count}} minutami"
		},
		future: {
			one: "{{count}} minuto",
			two: "{{count}} minuti",
			few: "{{count}} minute",
			other: "{{count}} minut"
		}
	},
	aboutXHours: {
		present: {
			one: "približno {{count}} ura",
			two: "približno {{count}} uri",
			few: "približno {{count}} ure",
			other: "približno {{count}} ur"
		},
		past: {
			one: "približno {{count}} uro",
			two: "približno {{count}} urama",
			few: "približno {{count}} urami",
			other: "približno {{count}} urami"
		},
		future: {
			one: "približno {{count}} uro",
			two: "približno {{count}} uri",
			few: "približno {{count}} ure",
			other: "približno {{count}} ur"
		}
	},
	xHours: {
		present: {
			one: "{{count}} ura",
			two: "{{count}} uri",
			few: "{{count}} ure",
			other: "{{count}} ur"
		},
		past: {
			one: "{{count}} uro",
			two: "{{count}} urama",
			few: "{{count}} urami",
			other: "{{count}} urami"
		},
		future: {
			one: "{{count}} uro",
			two: "{{count}} uri",
			few: "{{count}} ure",
			other: "{{count}} ur"
		}
	},
	xDays: {
		present: {
			one: "{{count}} dan",
			two: "{{count}} dni",
			few: "{{count}} dni",
			other: "{{count}} dni"
		},
		past: {
			one: "{{count}} dnem",
			two: "{{count}} dnevoma",
			few: "{{count}} dnevi",
			other: "{{count}} dnevi"
		},
		future: {
			one: "{{count}} dan",
			two: "{{count}} dni",
			few: "{{count}} dni",
			other: "{{count}} dni"
		}
	},
	aboutXWeeks: {
		one: "približno {{count}} teden",
		two: "približno {{count}} tedna",
		few: "približno {{count}} tedne",
		other: "približno {{count}} tednov"
	},
	xWeeks: {
		one: "{{count}} teden",
		two: "{{count}} tedna",
		few: "{{count}} tedne",
		other: "{{count}} tednov"
	},
	aboutXMonths: {
		present: {
			one: "približno {{count}} mesec",
			two: "približno {{count}} meseca",
			few: "približno {{count}} mesece",
			other: "približno {{count}} mesecev"
		},
		past: {
			one: "približno {{count}} mesecem",
			two: "približno {{count}} mesecema",
			few: "približno {{count}} meseci",
			other: "približno {{count}} meseci"
		},
		future: {
			one: "približno {{count}} mesec",
			two: "približno {{count}} meseca",
			few: "približno {{count}} mesece",
			other: "približno {{count}} mesecev"
		}
	},
	xMonths: {
		present: {
			one: "{{count}} mesec",
			two: "{{count}} meseca",
			few: "{{count}} meseci",
			other: "{{count}} mesecev"
		},
		past: {
			one: "{{count}} mesecem",
			two: "{{count}} mesecema",
			few: "{{count}} meseci",
			other: "{{count}} meseci"
		},
		future: {
			one: "{{count}} mesec",
			two: "{{count}} meseca",
			few: "{{count}} mesece",
			other: "{{count}} mesecev"
		}
	},
	aboutXYears: {
		present: {
			one: "približno {{count}} leto",
			two: "približno {{count}} leti",
			few: "približno {{count}} leta",
			other: "približno {{count}} let"
		},
		past: {
			one: "približno {{count}} letom",
			two: "približno {{count}} letoma",
			few: "približno {{count}} leti",
			other: "približno {{count}} leti"
		},
		future: {
			one: "približno {{count}} leto",
			two: "približno {{count}} leti",
			few: "približno {{count}} leta",
			other: "približno {{count}} let"
		}
	},
	xYears: {
		present: {
			one: "{{count}} leto",
			two: "{{count}} leti",
			few: "{{count}} leta",
			other: "{{count}} let"
		},
		past: {
			one: "{{count}} letom",
			two: "{{count}} letoma",
			few: "{{count}} leti",
			other: "{{count}} leti"
		},
		future: {
			one: "{{count}} leto",
			two: "{{count}} leti",
			few: "{{count}} leta",
			other: "{{count}} let"
		}
	},
	overXYears: {
		present: {
			one: "več kot {{count}} leto",
			two: "več kot {{count}} leti",
			few: "več kot {{count}} leta",
			other: "več kot {{count}} let"
		},
		past: {
			one: "več kot {{count}} letom",
			two: "več kot {{count}} letoma",
			few: "več kot {{count}} leti",
			other: "več kot {{count}} leti"
		},
		future: {
			one: "več kot {{count}} leto",
			two: "več kot {{count}} leti",
			few: "več kot {{count}} leta",
			other: "več kot {{count}} let"
		}
	},
	almostXYears: {
		present: {
			one: "skoraj {{count}} leto",
			two: "skoraj {{count}} leti",
			few: "skoraj {{count}} leta",
			other: "skoraj {{count}} let"
		},
		past: {
			one: "skoraj {{count}} letom",
			two: "skoraj {{count}} letoma",
			few: "skoraj {{count}} leti",
			other: "skoraj {{count}} leti"
		},
		future: {
			one: "skoraj {{count}} leto",
			two: "skoraj {{count}} leti",
			few: "skoraj {{count}} leta",
			other: "skoraj {{count}} let"
		}
	}
};
function getFormFromCount(count) {
	switch (count % 100) {
		case 1: return "one";
		case 2: return "two";
		case 3:
		case 4: return "few";
		default: return "other";
	}
}
var formatDistance$16 = (token, count, options) => {
	let result = "";
	let tense = "present";
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) {
		tense = "future";
		result = "čez ";
	} else {
		tense = "past";
		result = "pred ";
	}
	const tokenValue = formatDistanceLocale$16[token];
	if (typeof tokenValue === "string") result += tokenValue;
	else {
		const form = getFormFromCount(count);
		if (isPluralType$1(tokenValue)) result += tokenValue[form].replace("{{count}}", String(count));
		else result += tokenValue[tense][form].replace("{{count}}", String(count));
	}
	return result;
};
var formatLong$16 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, dd. MMMM y",
			long: "dd. MMMM y",
			medium: "d. MMM y",
			short: "d. MM. yy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} {{time}}",
			long: "{{date}} {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/sl/_lib/formatRelative.js
var formatRelativeLocale$16 = {
	lastWeek: (date) => {
		switch (date.getDay()) {
			case 0: return "'prejšnjo nedeljo ob' p";
			case 3: return "'prejšnjo sredo ob' p";
			case 6: return "'prejšnjo soboto ob' p";
			default: return "'prejšnji' EEEE 'ob' p";
		}
	},
	yesterday: "'včeraj ob' p",
	today: "'danes ob' p",
	tomorrow: "'jutri ob' p",
	nextWeek: (date) => {
		switch (date.getDay()) {
			case 0: return "'naslednjo nedeljo ob' p";
			case 3: return "'naslednjo sredo ob' p";
			case 6: return "'naslednjo soboto ob' p";
			default: return "'naslednji' EEEE 'ob' p";
		}
	},
	other: "P"
};
var formatRelative$16 = (token, date, _baseDate, _options) => {
	const format = formatRelativeLocale$16[token];
	if (typeof format === "function") return format(date);
	return format;
};
//#endregion
//#region ../../node_modules/date-fns/locale/sl/_lib/localize.js
var eraValues$16 = {
	narrow: ["pr. n. št.", "po n. št."],
	abbreviated: ["pr. n. št.", "po n. št."],
	wide: ["pred našim štetjem", "po našem štetju"]
};
var quarterValues$16 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"1. čet.",
		"2. čet.",
		"3. čet.",
		"4. čet."
	],
	wide: [
		"1. četrtletje",
		"2. četrtletje",
		"3. četrtletje",
		"4. četrtletje"
	]
};
var monthValues$16 = {
	narrow: [
		"j",
		"f",
		"m",
		"a",
		"m",
		"j",
		"j",
		"a",
		"s",
		"o",
		"n",
		"d"
	],
	abbreviated: [
		"jan.",
		"feb.",
		"mar.",
		"apr.",
		"maj",
		"jun.",
		"jul.",
		"avg.",
		"sep.",
		"okt.",
		"nov.",
		"dec."
	],
	wide: [
		"januar",
		"februar",
		"marec",
		"april",
		"maj",
		"junij",
		"julij",
		"avgust",
		"september",
		"oktober",
		"november",
		"december"
	]
};
var dayValues$16 = {
	narrow: [
		"n",
		"p",
		"t",
		"s",
		"č",
		"p",
		"s"
	],
	short: [
		"ned.",
		"pon.",
		"tor.",
		"sre.",
		"čet.",
		"pet.",
		"sob."
	],
	abbreviated: [
		"ned.",
		"pon.",
		"tor.",
		"sre.",
		"čet.",
		"pet.",
		"sob."
	],
	wide: [
		"nedelja",
		"ponedeljek",
		"torek",
		"sreda",
		"četrtek",
		"petek",
		"sobota"
	]
};
var dayPeriodValues$16 = {
	narrow: {
		am: "d",
		pm: "p",
		midnight: "24.00",
		noon: "12.00",
		morning: "j",
		afternoon: "p",
		evening: "v",
		night: "n"
	},
	abbreviated: {
		am: "dop.",
		pm: "pop.",
		midnight: "poln.",
		noon: "pold.",
		morning: "jut.",
		afternoon: "pop.",
		evening: "več.",
		night: "noč"
	},
	wide: {
		am: "dop.",
		pm: "pop.",
		midnight: "polnoč",
		noon: "poldne",
		morning: "jutro",
		afternoon: "popoldne",
		evening: "večer",
		night: "noč"
	}
};
var formattingDayPeriodValues$16 = {
	narrow: {
		am: "d",
		pm: "p",
		midnight: "24.00",
		noon: "12.00",
		morning: "zj",
		afternoon: "p",
		evening: "zv",
		night: "po"
	},
	abbreviated: {
		am: "dop.",
		pm: "pop.",
		midnight: "opoln.",
		noon: "opold.",
		morning: "zjut.",
		afternoon: "pop.",
		evening: "zveč.",
		night: "ponoči"
	},
	wide: {
		am: "dop.",
		pm: "pop.",
		midnight: "opolnoči",
		noon: "opoldne",
		morning: "zjutraj",
		afternoon: "popoldan",
		evening: "zvečer",
		night: "ponoči"
	}
};
var ordinalNumber$16 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + ".";
};
//#endregion
//#region ../../node_modules/date-fns/locale/sl.js
/**
* @category Locales
* @summary Slovenian locale.
* @language Slovenian
* @iso-639-2 slv
* @author Adam Stradovnik [@Neoglyph](https://github.com/Neoglyph)
* @author Mato Žgajner [@mzgajner](https://github.com/mzgajner)
*/
var sl = {
	code: "sl",
	formatDistance: formatDistance$16,
	formatLong: formatLong$16,
	formatRelative: formatRelative$16,
	localize: {
		ordinalNumber: ordinalNumber$16,
		era: buildLocalizeFn({
			values: eraValues$16,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$16,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$16,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$16,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$16,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$16,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)\./i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				abbreviated: /^(pr\. n\. št\.|po n\. št\.)/i,
				wide: /^(pred Kristusom|pred na[sš]im [sš]tetjem|po Kristusu|po na[sš]em [sš]tetju|na[sš]ega [sš]tetja)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^pr/i, /^(po|na[sš]em)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^[1234]\.\s?[čc]et\.?/i,
				wide: /^[1234]\. [čc]etrtletje/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[jfmasond]/i,
				abbreviated: /^(jan\.|feb\.|mar\.|apr\.|maj|jun\.|jul\.|avg\.|sep\.|okt\.|nov\.|dec\.)/i,
				wide: /^(januar|februar|marec|april|maj|junij|julij|avgust|september|oktober|november|december)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^j/i,
					/^f/i,
					/^m/i,
					/^a/i,
					/^m/i,
					/^j/i,
					/^j/i,
					/^a/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				],
				abbreviated: [
					/^ja/i,
					/^fe/i,
					/^mar/i,
					/^ap/i,
					/^maj/i,
					/^jun/i,
					/^jul/i,
					/^av/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				],
				wide: [
					/^ja/i,
					/^fe/i,
					/^mar/i,
					/^ap/i,
					/^maj/i,
					/^jun/i,
					/^jul/i,
					/^av/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				]
			},
			defaultParseWidth: "wide"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[nptsčc]/i,
				short: /^(ned\.|pon\.|tor\.|sre\.|[cč]et\.|pet\.|sob\.)/i,
				abbreviated: /^(ned\.|pon\.|tor\.|sre\.|[cč]et\.|pet\.|sob\.)/i,
				wide: /^(nedelja|ponedeljek|torek|sreda|[cč]etrtek|petek|sobota)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^n/i,
					/^p/i,
					/^t/i,
					/^s/i,
					/^[cč]/i,
					/^p/i,
					/^s/i
				],
				any: [
					/^n/i,
					/^po/i,
					/^t/i,
					/^sr/i,
					/^[cč]/i,
					/^pe/i,
					/^so/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(d|po?|z?v|n|z?j|24\.00|12\.00)/i,
				any: /^(dop\.|pop\.|o?poln(\.|o[cč]i?)|o?pold(\.|ne)|z?ve[cč](\.|er)|(po)?no[cč]i?|popold(ne|an)|jut(\.|ro)|zjut(\.|raj))/i
			},
			defaultMatchWidth: "any",
			parsePatterns: {
				narrow: {
					am: /^d/i,
					pm: /^p/i,
					midnight: /^24/i,
					noon: /^12/i,
					morning: /^(z?j)/i,
					afternoon: /^p/i,
					evening: /^(z?v)/i,
					night: /^(n|po)/i
				},
				any: {
					am: /^dop\./i,
					pm: /^pop\./i,
					midnight: /^o?poln/i,
					noon: /^o?pold/i,
					morning: /j/i,
					afternoon: /^pop\./i,
					evening: /^z?ve/i,
					night: /(po)?no/i
				}
			},
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/sq/_lib/formatDistance.js
var formatDistanceLocale$15 = {
	lessThanXSeconds: {
		one: "më pak se një sekondë",
		other: "më pak se {{count}} sekonda"
	},
	xSeconds: {
		one: "1 sekondë",
		other: "{{count}} sekonda"
	},
	halfAMinute: "gjysëm minuti",
	lessThanXMinutes: {
		one: "më pak se një minute",
		other: "më pak se {{count}} minuta"
	},
	xMinutes: {
		one: "1 minutë",
		other: "{{count}} minuta"
	},
	aboutXHours: {
		one: "rreth 1 orë",
		other: "rreth {{count}} orë"
	},
	xHours: {
		one: "1 orë",
		other: "{{count}} orë"
	},
	xDays: {
		one: "1 ditë",
		other: "{{count}} ditë"
	},
	aboutXWeeks: {
		one: "rreth 1 javë",
		other: "rreth {{count}} javë"
	},
	xWeeks: {
		one: "1 javë",
		other: "{{count}} javë"
	},
	aboutXMonths: {
		one: "rreth 1 muaj",
		other: "rreth {{count}} muaj"
	},
	xMonths: {
		one: "1 muaj",
		other: "{{count}} muaj"
	},
	aboutXYears: {
		one: "rreth 1 vit",
		other: "rreth {{count}} vite"
	},
	xYears: {
		one: "1 vit",
		other: "{{count}} vite"
	},
	overXYears: {
		one: "mbi 1 vit",
		other: "mbi {{count}} vite"
	},
	almostXYears: {
		one: "pothuajse 1 vit",
		other: "pothuajse {{count}} vite"
	}
};
var formatDistance$15 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$15[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "në " + result;
	else return result + " më parë";
	return result;
};
var formatLong$15 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, MMMM do, y",
			long: "MMMM do, y",
			medium: "MMM d, y",
			short: "MM/dd/yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "h:mm:ss a zzzz",
			long: "h:mm:ss a z",
			medium: "h:mm:ss a",
			short: "h:mm a"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'në' {{time}}",
			long: "{{date}} 'në' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/sq/_lib/formatRelative.js
var formatRelativeLocale$15 = {
	lastWeek: "'të' eeee 'e shkuar në' p",
	yesterday: "'dje në' p",
	today: "'sot në' p",
	tomorrow: "'nesër në' p",
	nextWeek: "eeee 'at' p",
	other: "P"
};
var formatRelative$15 = (token, _date, _baseDate, _options) => formatRelativeLocale$15[token];
//#endregion
//#region ../../node_modules/date-fns/locale/sq/_lib/localize.js
var eraValues$15 = {
	narrow: ["P", "M"],
	abbreviated: ["PK", "MK"],
	wide: ["Para Krishtit", "Mbas Krishtit"]
};
var quarterValues$15 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"Q1",
		"Q2",
		"Q3",
		"Q4"
	],
	wide: [
		"4-mujori I",
		"4-mujori II",
		"4-mujori III",
		"4-mujori IV"
	]
};
var monthValues$15 = {
	narrow: [
		"J",
		"S",
		"M",
		"P",
		"M",
		"Q",
		"K",
		"G",
		"S",
		"T",
		"N",
		"D"
	],
	abbreviated: [
		"Jan",
		"Shk",
		"Mar",
		"Pri",
		"Maj",
		"Qer",
		"Kor",
		"Gus",
		"Sht",
		"Tet",
		"Nën",
		"Dhj"
	],
	wide: [
		"Janar",
		"Shkurt",
		"Mars",
		"Prill",
		"Maj",
		"Qershor",
		"Korrik",
		"Gusht",
		"Shtator",
		"Tetor",
		"Nëntor",
		"Dhjetor"
	]
};
var dayValues$15 = {
	narrow: [
		"D",
		"H",
		"M",
		"M",
		"E",
		"P",
		"S"
	],
	short: [
		"Di",
		"Hë",
		"Ma",
		"Më",
		"En",
		"Pr",
		"Sh"
	],
	abbreviated: [
		"Die",
		"Hën",
		"Mar",
		"Mër",
		"Enj",
		"Pre",
		"Sht"
	],
	wide: [
		"Dielë",
		"Hënë",
		"Martë",
		"Mërkurë",
		"Enjte",
		"Premte",
		"Shtunë"
	]
};
var dayPeriodValues$15 = {
	narrow: {
		am: "p",
		pm: "m",
		midnight: "m",
		noon: "d",
		morning: "mëngjes",
		afternoon: "dite",
		evening: "mbrëmje",
		night: "natë"
	},
	abbreviated: {
		am: "PD",
		pm: "MD",
		midnight: "mesnëtë",
		noon: "drek",
		morning: "mëngjes",
		afternoon: "mbasdite",
		evening: "mbrëmje",
		night: "natë"
	},
	wide: {
		am: "p.d.",
		pm: "m.d.",
		midnight: "mesnëtë",
		noon: "drek",
		morning: "mëngjes",
		afternoon: "mbasdite",
		evening: "mbrëmje",
		night: "natë"
	}
};
var formattingDayPeriodValues$15 = {
	narrow: {
		am: "p",
		pm: "m",
		midnight: "m",
		noon: "d",
		morning: "në mëngjes",
		afternoon: "në mbasdite",
		evening: "në mbrëmje",
		night: "në mesnatë"
	},
	abbreviated: {
		am: "PD",
		pm: "MD",
		midnight: "mesnatë",
		noon: "drek",
		morning: "në mëngjes",
		afternoon: "në mbasdite",
		evening: "në mbrëmje",
		night: "në mesnatë"
	},
	wide: {
		am: "p.d.",
		pm: "m.d.",
		midnight: "mesnatë",
		noon: "drek",
		morning: "në mëngjes",
		afternoon: "në mbasdite",
		evening: "në mbrëmje",
		night: "në mesnatë"
	}
};
var ordinalNumber$15 = (dirtyNumber, options) => {
	const number = Number(dirtyNumber);
	if (options?.unit === "hour") return String(number);
	if (number === 1) return number + "-rë";
	if (number === 4) return number + "t";
	return number + "-të";
};
//#endregion
//#region ../../node_modules/date-fns/locale/sq.js
/**
* @category Locales
* @summary Albanian locale.
* @language Shqip
* @iso-639-2 sqi
* @author Ardit Dine [@arditdine](https://github.com/arditdine)
*/
var sq = {
	code: "sq",
	formatDistance: formatDistance$15,
	formatLong: formatLong$15,
	formatRelative: formatRelative$15,
	localize: {
		ordinalNumber: ordinalNumber$15,
		era: buildLocalizeFn({
			values: eraValues$15,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$15,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$15,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$15,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$15,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$15,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(-rë|-të|t|)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(p|m)/i,
				abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
				wide: /^(para krishtit|mbas krishtit)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^b/i, /^(p|m)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^q[1234]/i,
				wide: /^[1234]-mujori (i{1,3}|iv)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[jsmpqkftnd]/i,
				abbreviated: /^(jan|shk|mar|pri|maj|qer|kor|gus|sht|tet|nën|dhj)/i,
				wide: /^(janar|shkurt|mars|prill|maj|qershor|korrik|gusht|shtator|tetor|nëntor|dhjetor)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^j/i,
					/^s/i,
					/^m/i,
					/^p/i,
					/^m/i,
					/^q/i,
					/^k/i,
					/^g/i,
					/^s/i,
					/^t/i,
					/^n/i,
					/^d/i
				],
				any: [
					/^ja/i,
					/^shk/i,
					/^mar/i,
					/^pri/i,
					/^maj/i,
					/^qer/i,
					/^kor/i,
					/^gu/i,
					/^sht/i,
					/^tet/i,
					/^n/i,
					/^d/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[dhmeps]/i,
				short: /^(di|hë|ma|më|en|pr|sh)/i,
				abbreviated: /^(die|hën|mar|mër|enj|pre|sht)/i,
				wide: /^(dielë|hënë|martë|mërkurë|enjte|premte|shtunë)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^d/i,
					/^h/i,
					/^m/i,
					/^m/i,
					/^e/i,
					/^p/i,
					/^s/i
				],
				any: [
					/^d/i,
					/^h/i,
					/^ma/i,
					/^më/i,
					/^e/i,
					/^p/i,
					/^s/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(p|m|me|në (mëngjes|mbasdite|mbrëmje|mesnatë))/i,
				any: /^([pm]\.?\s?d\.?|drek|në (mëngjes|mbasdite|mbrëmje|mesnatë))/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^p/i,
				pm: /^m/i,
				midnight: /^me/i,
				noon: /^dr/i,
				morning: /mëngjes/i,
				afternoon: /mbasdite/i,
				evening: /mbrëmje/i,
				night: /natë/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/sr/_lib/formatDistance.js
var formatDistanceLocale$14 = {
	lessThanXSeconds: {
		one: {
			standalone: "мање од 1 секунде",
			withPrepositionAgo: "мање од 1 секунде",
			withPrepositionIn: "мање од 1 секунду"
		},
		dual: "мање од {{count}} секунде",
		other: "мање од {{count}} секунди"
	},
	xSeconds: {
		one: {
			standalone: "1 секунда",
			withPrepositionAgo: "1 секунде",
			withPrepositionIn: "1 секунду"
		},
		dual: "{{count}} секунде",
		other: "{{count}} секунди"
	},
	halfAMinute: "пола минуте",
	lessThanXMinutes: {
		one: {
			standalone: "мање од 1 минуте",
			withPrepositionAgo: "мање од 1 минуте",
			withPrepositionIn: "мање од 1 минуту"
		},
		dual: "мање од {{count}} минуте",
		other: "мање од {{count}} минута"
	},
	xMinutes: {
		one: {
			standalone: "1 минута",
			withPrepositionAgo: "1 минуте",
			withPrepositionIn: "1 минуту"
		},
		dual: "{{count}} минуте",
		other: "{{count}} минута"
	},
	aboutXHours: {
		one: {
			standalone: "око 1 сат",
			withPrepositionAgo: "око 1 сат",
			withPrepositionIn: "око 1 сат"
		},
		dual: "око {{count}} сата",
		other: "око {{count}} сати"
	},
	xHours: {
		one: {
			standalone: "1 сат",
			withPrepositionAgo: "1 сат",
			withPrepositionIn: "1 сат"
		},
		dual: "{{count}} сата",
		other: "{{count}} сати"
	},
	xDays: {
		one: {
			standalone: "1 дан",
			withPrepositionAgo: "1 дан",
			withPrepositionIn: "1 дан"
		},
		dual: "{{count}} дана",
		other: "{{count}} дана"
	},
	aboutXWeeks: {
		one: {
			standalone: "око 1 недељу",
			withPrepositionAgo: "око 1 недељу",
			withPrepositionIn: "око 1 недељу"
		},
		dual: "око {{count}} недеље",
		other: "око {{count}} недеље"
	},
	xWeeks: {
		one: {
			standalone: "1 недељу",
			withPrepositionAgo: "1 недељу",
			withPrepositionIn: "1 недељу"
		},
		dual: "{{count}} недеље",
		other: "{{count}} недеље"
	},
	aboutXMonths: {
		one: {
			standalone: "око 1 месец",
			withPrepositionAgo: "око 1 месец",
			withPrepositionIn: "око 1 месец"
		},
		dual: "око {{count}} месеца",
		other: "око {{count}} месеци"
	},
	xMonths: {
		one: {
			standalone: "1 месец",
			withPrepositionAgo: "1 месец",
			withPrepositionIn: "1 месец"
		},
		dual: "{{count}} месеца",
		other: "{{count}} месеци"
	},
	aboutXYears: {
		one: {
			standalone: "око 1 годину",
			withPrepositionAgo: "око 1 годину",
			withPrepositionIn: "око 1 годину"
		},
		dual: "око {{count}} године",
		other: "око {{count}} година"
	},
	xYears: {
		one: {
			standalone: "1 година",
			withPrepositionAgo: "1 године",
			withPrepositionIn: "1 годину"
		},
		dual: "{{count}} године",
		other: "{{count}} година"
	},
	overXYears: {
		one: {
			standalone: "преко 1 годину",
			withPrepositionAgo: "преко 1 годину",
			withPrepositionIn: "преко 1 годину"
		},
		dual: "преко {{count}} године",
		other: "преко {{count}} година"
	},
	almostXYears: {
		one: {
			standalone: "готово 1 годину",
			withPrepositionAgo: "готово 1 годину",
			withPrepositionIn: "готово 1 годину"
		},
		dual: "готово {{count}} године",
		other: "готово {{count}} година"
	}
};
var formatDistance$14 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$14[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) if (options?.addSuffix) if (options.comparison && options.comparison > 0) result = tokenValue.one.withPrepositionIn;
	else result = tokenValue.one.withPrepositionAgo;
	else result = tokenValue.one.standalone;
	else if (count % 10 > 1 && count % 10 < 5 && String(count).substr(-2, 1) !== "1") result = tokenValue.dual.replace("{{count}}", String(count));
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "за " + result;
	else return "пре " + result;
	return result;
};
var formatLong$14 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, d. MMMM yyyy.",
			long: "d. MMMM yyyy.",
			medium: "d. MMM yy.",
			short: "dd. MM. yy."
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss (zzzz)",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'у' {{time}}",
			long: "{{date}} 'у' {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/sr/_lib/formatRelative.js
var formatRelativeLocale$14 = {
	lastWeek: (date) => {
		switch (date.getDay()) {
			case 0: return "'прошле недеље у' p";
			case 3: return "'прошле среде у' p";
			case 6: return "'прошле суботе у' p";
			default: return "'прошли' EEEE 'у' p";
		}
	},
	yesterday: "'јуче у' p",
	today: "'данас у' p",
	tomorrow: "'сутра у' p",
	nextWeek: (date) => {
		switch (date.getDay()) {
			case 0: return "'следеће недеље у' p";
			case 3: return "'следећу среду у' p";
			case 6: return "'следећу суботу у' p";
			default: return "'следећи' EEEE 'у' p";
		}
	},
	other: "P"
};
var formatRelative$14 = (token, date, _baseDate, _options) => {
	const format = formatRelativeLocale$14[token];
	if (typeof format === "function") return format(date);
	return format;
};
//#endregion
//#region ../../node_modules/date-fns/locale/sr/_lib/localize.js
var eraValues$14 = {
	narrow: ["пр.н.е.", "АД"],
	abbreviated: ["пр. Хр.", "по. Хр."],
	wide: ["Пре Христа", "После Христа"]
};
var quarterValues$14 = {
	narrow: [
		"1.",
		"2.",
		"3.",
		"4."
	],
	abbreviated: [
		"1. кв.",
		"2. кв.",
		"3. кв.",
		"4. кв."
	],
	wide: [
		"1. квартал",
		"2. квартал",
		"3. квартал",
		"4. квартал"
	]
};
var monthValues$14 = {
	narrow: [
		"1.",
		"2.",
		"3.",
		"4.",
		"5.",
		"6.",
		"7.",
		"8.",
		"9.",
		"10.",
		"11.",
		"12."
	],
	abbreviated: [
		"јан",
		"феб",
		"мар",
		"апр",
		"мај",
		"јун",
		"јул",
		"авг",
		"сеп",
		"окт",
		"нов",
		"дец"
	],
	wide: [
		"јануар",
		"фебруар",
		"март",
		"април",
		"мај",
		"јун",
		"јул",
		"август",
		"септембар",
		"октобар",
		"новембар",
		"децембар"
	]
};
var formattingMonthValues$3 = {
	narrow: [
		"1.",
		"2.",
		"3.",
		"4.",
		"5.",
		"6.",
		"7.",
		"8.",
		"9.",
		"10.",
		"11.",
		"12."
	],
	abbreviated: [
		"јан",
		"феб",
		"мар",
		"апр",
		"мај",
		"јун",
		"јул",
		"авг",
		"сеп",
		"окт",
		"нов",
		"дец"
	],
	wide: [
		"јануар",
		"фебруар",
		"март",
		"април",
		"мај",
		"јун",
		"јул",
		"август",
		"септембар",
		"октобар",
		"новембар",
		"децембар"
	]
};
var dayValues$14 = {
	narrow: [
		"Н",
		"П",
		"У",
		"С",
		"Ч",
		"П",
		"С"
	],
	short: [
		"нед",
		"пон",
		"уто",
		"сре",
		"чет",
		"пет",
		"суб"
	],
	abbreviated: [
		"нед",
		"пон",
		"уто",
		"сре",
		"чет",
		"пет",
		"суб"
	],
	wide: [
		"недеља",
		"понедељак",
		"уторак",
		"среда",
		"четвртак",
		"петак",
		"субота"
	]
};
var formattingDayPeriodValues$14 = {
	narrow: {
		am: "АМ",
		pm: "ПМ",
		midnight: "поноћ",
		noon: "подне",
		morning: "ујутру",
		afternoon: "поподне",
		evening: "увече",
		night: "ноћу"
	},
	abbreviated: {
		am: "АМ",
		pm: "ПМ",
		midnight: "поноћ",
		noon: "подне",
		morning: "ујутру",
		afternoon: "поподне",
		evening: "увече",
		night: "ноћу"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "поноћ",
		noon: "подне",
		morning: "ујутру",
		afternoon: "после подне",
		evening: "увече",
		night: "ноћу"
	}
};
var dayPeriodValues$14 = {
	narrow: {
		am: "AM",
		pm: "PM",
		midnight: "поноћ",
		noon: "подне",
		morning: "ујутру",
		afternoon: "поподне",
		evening: "увече",
		night: "ноћу"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "поноћ",
		noon: "подне",
		morning: "ујутру",
		afternoon: "поподне",
		evening: "увече",
		night: "ноћу"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "поноћ",
		noon: "подне",
		morning: "ујутру",
		afternoon: "после подне",
		evening: "увече",
		night: "ноћу"
	}
};
var ordinalNumber$14 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + ".";
};
//#endregion
//#region ../../node_modules/date-fns/locale/sr.js
/**
* @category Locales
* @summary Serbian cyrillic locale.
* @language Serbian
* @iso-639-2 srp
* @author Igor Radivojević [@rogyvoje](https://github.com/rogyvoje)
*/
var sr = {
	code: "sr",
	formatDistance: formatDistance$14,
	formatLong: formatLong$14,
	formatRelative: formatRelative$14,
	localize: {
		ordinalNumber: ordinalNumber$14,
		era: buildLocalizeFn({
			values: eraValues$14,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$14,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$14,
			defaultWidth: "wide",
			formattingValues: formattingMonthValues$3,
			defaultFormattingWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$14,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$14,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$14,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)\./i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(пр\.н\.е\.|АД)/i,
				abbreviated: /^(пр\.\s?Хр\.|по\.\s?Хр\.)/i,
				wide: /^(Пре Христа|пре нове ере|После Христа|нова ера)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^пр/i, /^(по|нова)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^[1234]\.\s?кв\.?/i,
				wide: /^[1234]\. квартал/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^(10|11|12|[123456789])\./i,
				abbreviated: /^(јан|феб|мар|апр|мај|јун|јул|авг|сеп|окт|нов|дец)/i,
				wide: /^((јануар|јануара)|(фебруар|фебруара)|(март|марта)|(април|априла)|(мја|маја)|(јун|јуна)|(јул|јула)|(август|августа)|(септембар|септембра)|(октобар|октобра)|(новембар|новембра)|(децембар|децембра))/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^1/i,
					/^2/i,
					/^3/i,
					/^4/i,
					/^5/i,
					/^6/i,
					/^7/i,
					/^8/i,
					/^9/i,
					/^10/i,
					/^11/i,
					/^12/i
				],
				any: [
					/^ја/i,
					/^ф/i,
					/^мар/i,
					/^ап/i,
					/^мај/i,
					/^јун/i,
					/^јул/i,
					/^авг/i,
					/^с/i,
					/^о/i,
					/^н/i,
					/^д/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[пусчн]/i,
				short: /^(нед|пон|уто|сре|чет|пет|суб)/i,
				abbreviated: /^(нед|пон|уто|сре|чет|пет|суб)/i,
				wide: /^(недеља|понедељак|уторак|среда|четвртак|петак|субота)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^п/i,
					/^у/i,
					/^с/i,
					/^ч/i,
					/^п/i,
					/^с/i,
					/^н/i
				],
				any: [
					/^нед/i,
					/^пон/i,
					/^уто/i,
					/^сре/i,
					/^чет/i,
					/^пет/i,
					/^суб/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: { any: /^(ам|пм|поноћ|(по)?подне|увече|ноћу|после подне|ујутру)/i },
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a/i,
				pm: /^p/i,
				midnight: /^поно/i,
				noon: /^под/i,
				morning: /ујутру/i,
				afternoon: /(после\s|по)+подне/i,
				evening: /(увече)/i,
				night: /(ноћу)/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/sr-Latn/_lib/formatDistance.js
var formatDistanceLocale$13 = {
	lessThanXSeconds: {
		one: {
			standalone: "manje od 1 sekunde",
			withPrepositionAgo: "manje od 1 sekunde",
			withPrepositionIn: "manje od 1 sekundu"
		},
		dual: "manje od {{count}} sekunde",
		other: "manje od {{count}} sekundi"
	},
	xSeconds: {
		one: {
			standalone: "1 sekunda",
			withPrepositionAgo: "1 sekunde",
			withPrepositionIn: "1 sekundu"
		},
		dual: "{{count}} sekunde",
		other: "{{count}} sekundi"
	},
	halfAMinute: "pola minute",
	lessThanXMinutes: {
		one: {
			standalone: "manje od 1 minute",
			withPrepositionAgo: "manje od 1 minute",
			withPrepositionIn: "manje od 1 minutu"
		},
		dual: "manje od {{count}} minute",
		other: "manje od {{count}} minuta"
	},
	xMinutes: {
		one: {
			standalone: "1 minuta",
			withPrepositionAgo: "1 minute",
			withPrepositionIn: "1 minutu"
		},
		dual: "{{count}} minute",
		other: "{{count}} minuta"
	},
	aboutXHours: {
		one: {
			standalone: "oko 1 sat",
			withPrepositionAgo: "oko 1 sat",
			withPrepositionIn: "oko 1 sat"
		},
		dual: "oko {{count}} sata",
		other: "oko {{count}} sati"
	},
	xHours: {
		one: {
			standalone: "1 sat",
			withPrepositionAgo: "1 sat",
			withPrepositionIn: "1 sat"
		},
		dual: "{{count}} sata",
		other: "{{count}} sati"
	},
	xDays: {
		one: {
			standalone: "1 dan",
			withPrepositionAgo: "1 dan",
			withPrepositionIn: "1 dan"
		},
		dual: "{{count}} dana",
		other: "{{count}} dana"
	},
	aboutXWeeks: {
		one: {
			standalone: "oko 1 nedelju",
			withPrepositionAgo: "oko 1 nedelju",
			withPrepositionIn: "oko 1 nedelju"
		},
		dual: "oko {{count}} nedelje",
		other: "oko {{count}} nedelje"
	},
	xWeeks: {
		one: {
			standalone: "1 nedelju",
			withPrepositionAgo: "1 nedelju",
			withPrepositionIn: "1 nedelju"
		},
		dual: "{{count}} nedelje",
		other: "{{count}} nedelje"
	},
	aboutXMonths: {
		one: {
			standalone: "oko 1 mesec",
			withPrepositionAgo: "oko 1 mesec",
			withPrepositionIn: "oko 1 mesec"
		},
		dual: "oko {{count}} meseca",
		other: "oko {{count}} meseci"
	},
	xMonths: {
		one: {
			standalone: "1 mesec",
			withPrepositionAgo: "1 mesec",
			withPrepositionIn: "1 mesec"
		},
		dual: "{{count}} meseca",
		other: "{{count}} meseci"
	},
	aboutXYears: {
		one: {
			standalone: "oko 1 godinu",
			withPrepositionAgo: "oko 1 godinu",
			withPrepositionIn: "oko 1 godinu"
		},
		dual: "oko {{count}} godine",
		other: "oko {{count}} godina"
	},
	xYears: {
		one: {
			standalone: "1 godina",
			withPrepositionAgo: "1 godine",
			withPrepositionIn: "1 godinu"
		},
		dual: "{{count}} godine",
		other: "{{count}} godina"
	},
	overXYears: {
		one: {
			standalone: "preko 1 godinu",
			withPrepositionAgo: "preko 1 godinu",
			withPrepositionIn: "preko 1 godinu"
		},
		dual: "preko {{count}} godine",
		other: "preko {{count}} godina"
	},
	almostXYears: {
		one: {
			standalone: "gotovo 1 godinu",
			withPrepositionAgo: "gotovo 1 godinu",
			withPrepositionIn: "gotovo 1 godinu"
		},
		dual: "gotovo {{count}} godine",
		other: "gotovo {{count}} godina"
	}
};
var formatDistance$13 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$13[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) if (options?.addSuffix) if (options.comparison && options.comparison > 0) result = tokenValue.one.withPrepositionIn;
	else result = tokenValue.one.withPrepositionAgo;
	else result = tokenValue.one.standalone;
	else if (count % 10 > 1 && count % 10 < 5 && String(count).substr(-2, 1) !== "1") result = tokenValue.dual.replace("{{count}}", String(count));
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "za " + result;
	else return "pre " + result;
	return result;
};
var formatLong$13 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, d. MMMM yyyy.",
			long: "d. MMMM yyyy.",
			medium: "d. MMM yy.",
			short: "dd. MM. yy."
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss (zzzz)",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'u' {{time}}",
			long: "{{date}} 'u' {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/sr-Latn/_lib/formatRelative.js
var formatRelativeLocale$13 = {
	lastWeek: (date) => {
		switch (date.getDay()) {
			case 0: return "'prošle nedelje u' p";
			case 3: return "'prošle srede u' p";
			case 6: return "'prošle subote u' p";
			default: return "'prošli' EEEE 'u' p";
		}
	},
	yesterday: "'juče u' p",
	today: "'danas u' p",
	tomorrow: "'sutra u' p",
	nextWeek: (date) => {
		switch (date.getDay()) {
			case 0: return "'sledeće nedelje u' p";
			case 3: return "'sledeću sredu u' p";
			case 6: return "'sledeću subotu u' p";
			default: return "'sledeći' EEEE 'u' p";
		}
	},
	other: "P"
};
var formatRelative$13 = (token, date, _baseDate, _options) => {
	const format = formatRelativeLocale$13[token];
	if (typeof format === "function") return format(date);
	return format;
};
//#endregion
//#region ../../node_modules/date-fns/locale/sr-Latn/_lib/localize.js
var eraValues$13 = {
	narrow: ["pr.n.e.", "AD"],
	abbreviated: ["pr. Hr.", "po. Hr."],
	wide: ["Pre Hrista", "Posle Hrista"]
};
var quarterValues$13 = {
	narrow: [
		"1.",
		"2.",
		"3.",
		"4."
	],
	abbreviated: [
		"1. kv.",
		"2. kv.",
		"3. kv.",
		"4. kv."
	],
	wide: [
		"1. kvartal",
		"2. kvartal",
		"3. kvartal",
		"4. kvartal"
	]
};
var monthValues$13 = {
	narrow: [
		"1.",
		"2.",
		"3.",
		"4.",
		"5.",
		"6.",
		"7.",
		"8.",
		"9.",
		"10.",
		"11.",
		"12."
	],
	abbreviated: [
		"jan",
		"feb",
		"mar",
		"apr",
		"maj",
		"jun",
		"jul",
		"avg",
		"sep",
		"okt",
		"nov",
		"dec"
	],
	wide: [
		"januar",
		"februar",
		"mart",
		"april",
		"maj",
		"jun",
		"jul",
		"avgust",
		"septembar",
		"oktobar",
		"novembar",
		"decembar"
	]
};
var formattingMonthValues$2 = {
	narrow: [
		"1.",
		"2.",
		"3.",
		"4.",
		"5.",
		"6.",
		"7.",
		"8.",
		"9.",
		"10.",
		"11.",
		"12."
	],
	abbreviated: [
		"jan",
		"feb",
		"mar",
		"apr",
		"maj",
		"jun",
		"jul",
		"avg",
		"sep",
		"okt",
		"nov",
		"dec"
	],
	wide: [
		"januar",
		"februar",
		"mart",
		"april",
		"maj",
		"jun",
		"jul",
		"avgust",
		"septembar",
		"oktobar",
		"novembar",
		"decembar"
	]
};
var dayValues$13 = {
	narrow: [
		"N",
		"P",
		"U",
		"S",
		"Č",
		"P",
		"S"
	],
	short: [
		"ned",
		"pon",
		"uto",
		"sre",
		"čet",
		"pet",
		"sub"
	],
	abbreviated: [
		"ned",
		"pon",
		"uto",
		"sre",
		"čet",
		"pet",
		"sub"
	],
	wide: [
		"nedelja",
		"ponedeljak",
		"utorak",
		"sreda",
		"četvrtak",
		"petak",
		"subota"
	]
};
var formattingDayPeriodValues$13 = {
	narrow: {
		am: "AM",
		pm: "PM",
		midnight: "ponoć",
		noon: "podne",
		morning: "ujutru",
		afternoon: "popodne",
		evening: "uveče",
		night: "noću"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "ponoć",
		noon: "podne",
		morning: "ujutru",
		afternoon: "popodne",
		evening: "uveče",
		night: "noću"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "ponoć",
		noon: "podne",
		morning: "ujutru",
		afternoon: "posle podne",
		evening: "uveče",
		night: "noću"
	}
};
var dayPeriodValues$13 = {
	narrow: {
		am: "AM",
		pm: "PM",
		midnight: "ponoć",
		noon: "podne",
		morning: "ujutru",
		afternoon: "popodne",
		evening: "uveče",
		night: "noću"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "ponoć",
		noon: "podne",
		morning: "ujutru",
		afternoon: "popodne",
		evening: "uveče",
		night: "noću"
	},
	wide: {
		am: "AM",
		pm: "PM",
		midnight: "ponoć",
		noon: "podne",
		morning: "ujutru",
		afternoon: "posle podne",
		evening: "uveče",
		night: "noću"
	}
};
var ordinalNumber$13 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + ".";
};
//#endregion
//#region ../../node_modules/date-fns/locale/sr-Latn.js
/**
* @category Locales
* @summary Serbian latin locale.
* @language Serbian
* @iso-639-2 srp
* @author Igor Radivojević [@rogyvoje](https://github.com/rogyvoje)
*/
var srLatn = {
	code: "sr-Latn",
	formatDistance: formatDistance$13,
	formatLong: formatLong$13,
	formatRelative: formatRelative$13,
	localize: {
		ordinalNumber: ordinalNumber$13,
		era: buildLocalizeFn({
			values: eraValues$13,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$13,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$13,
			defaultWidth: "wide",
			formattingValues: formattingMonthValues$2,
			defaultFormattingWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$13,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$13,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$13,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)\./i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(pr\.n\.e\.|AD)/i,
				abbreviated: /^(pr\.\s?Hr\.|po\.\s?Hr\.)/i,
				wide: /^(Pre Hrista|pre nove ere|Posle Hrista|nova era)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^pr/i, /^(po|nova)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^[1234]\.\s?kv\.?/i,
				wide: /^[1234]\. kvartal/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^(10|11|12|[123456789])\./i,
				abbreviated: /^(jan|feb|mar|apr|maj|jun|jul|avg|sep|okt|nov|dec)/i,
				wide: /^((januar|januara)|(februar|februara)|(mart|marta)|(april|aprila)|(maj|maja)|(jun|juna)|(jul|jula)|(avgust|avgusta)|(septembar|septembra)|(oktobar|oktobra)|(novembar|novembra)|(decembar|decembra))/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^1/i,
					/^2/i,
					/^3/i,
					/^4/i,
					/^5/i,
					/^6/i,
					/^7/i,
					/^8/i,
					/^9/i,
					/^10/i,
					/^11/i,
					/^12/i
				],
				any: [
					/^ja/i,
					/^f/i,
					/^mar/i,
					/^ap/i,
					/^maj/i,
					/^jun/i,
					/^jul/i,
					/^avg/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[npusčc]/i,
				short: /^(ned|pon|uto|sre|(čet|cet)|pet|sub)/i,
				abbreviated: /^(ned|pon|uto|sre|(čet|cet)|pet|sub)/i,
				wide: /^(nedelja|ponedeljak|utorak|sreda|(četvrtak|cetvrtak)|petak|subota)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^s/i,
					/^m/i,
					/^t/i,
					/^w/i,
					/^t/i,
					/^f/i,
					/^s/i
				],
				any: [
					/^su/i,
					/^m/i,
					/^tu/i,
					/^w/i,
					/^th/i,
					/^f/i,
					/^sa/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: { any: /^(am|pm|ponoc|ponoć|(po)?podne|uvece|uveče|noću|posle podne|ujutru)/i },
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a/i,
				pm: /^p/i,
				midnight: /^pono/i,
				noon: /^pod/i,
				morning: /jutro/i,
				afternoon: /(posle\s|po)+podne/i,
				evening: /(uvece|uveče)/i,
				night: /(nocu|noću)/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/sv/_lib/formatDistance.js
var formatDistanceLocale$12 = {
	lessThanXSeconds: {
		one: "mindre än en sekund",
		other: "mindre än {{count}} sekunder"
	},
	xSeconds: {
		one: "en sekund",
		other: "{{count}} sekunder"
	},
	halfAMinute: "en halv minut",
	lessThanXMinutes: {
		one: "mindre än en minut",
		other: "mindre än {{count}} minuter"
	},
	xMinutes: {
		one: "en minut",
		other: "{{count}} minuter"
	},
	aboutXHours: {
		one: "ungefär en timme",
		other: "ungefär {{count}} timmar"
	},
	xHours: {
		one: "en timme",
		other: "{{count}} timmar"
	},
	xDays: {
		one: "en dag",
		other: "{{count}} dagar"
	},
	aboutXWeeks: {
		one: "ungefär en vecka",
		other: "ungefär {{count}} veckor"
	},
	xWeeks: {
		one: "en vecka",
		other: "{{count}} veckor"
	},
	aboutXMonths: {
		one: "ungefär en månad",
		other: "ungefär {{count}} månader"
	},
	xMonths: {
		one: "en månad",
		other: "{{count}} månader"
	},
	aboutXYears: {
		one: "ungefär ett år",
		other: "ungefär {{count}} år"
	},
	xYears: {
		one: "ett år",
		other: "{{count}} år"
	},
	overXYears: {
		one: "över ett år",
		other: "över {{count}} år"
	},
	almostXYears: {
		one: "nästan ett år",
		other: "nästan {{count}} år"
	}
};
var wordMapping = [
	"noll",
	"en",
	"två",
	"tre",
	"fyra",
	"fem",
	"sex",
	"sju",
	"åtta",
	"nio",
	"tio",
	"elva",
	"tolv"
];
var formatDistance$12 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$12[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", count < 13 ? wordMapping[count] : String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "om " + result;
	else return result + " sedan";
	return result;
};
var formatLong$12 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE d MMMM y",
			long: "d MMMM y",
			medium: "d MMM y",
			short: "y-MM-dd"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "'kl'. HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'kl.' {{time}}",
			long: "{{date}} 'kl.' {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/sv/_lib/formatRelative.js
var formatRelativeLocale$12 = {
	lastWeek: "'i' EEEE's kl.' p",
	yesterday: "'igår kl.' p",
	today: "'idag kl.' p",
	tomorrow: "'imorgon kl.' p",
	nextWeek: "EEEE 'kl.' p",
	other: "P"
};
var formatRelative$12 = (token, _date, _baseDate, _options) => formatRelativeLocale$12[token];
//#endregion
//#region ../../node_modules/date-fns/locale/sv/_lib/localize.js
var eraValues$12 = {
	narrow: ["f.Kr.", "e.Kr."],
	abbreviated: ["f.Kr.", "e.Kr."],
	wide: ["före Kristus", "efter Kristus"]
};
var quarterValues$12 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"Q1",
		"Q2",
		"Q3",
		"Q4"
	],
	wide: [
		"1:a kvartalet",
		"2:a kvartalet",
		"3:e kvartalet",
		"4:e kvartalet"
	]
};
var monthValues$12 = {
	narrow: [
		"J",
		"F",
		"M",
		"A",
		"M",
		"J",
		"J",
		"A",
		"S",
		"O",
		"N",
		"D"
	],
	abbreviated: [
		"jan.",
		"feb.",
		"mars",
		"apr.",
		"maj",
		"juni",
		"juli",
		"aug.",
		"sep.",
		"okt.",
		"nov.",
		"dec."
	],
	wide: [
		"januari",
		"februari",
		"mars",
		"april",
		"maj",
		"juni",
		"juli",
		"augusti",
		"september",
		"oktober",
		"november",
		"december"
	]
};
var dayValues$12 = {
	narrow: [
		"S",
		"M",
		"T",
		"O",
		"T",
		"F",
		"L"
	],
	short: [
		"sö",
		"må",
		"ti",
		"on",
		"to",
		"fr",
		"lö"
	],
	abbreviated: [
		"sön",
		"mån",
		"tis",
		"ons",
		"tors",
		"fre",
		"lör"
	],
	wide: [
		"söndag",
		"måndag",
		"tisdag",
		"onsdag",
		"torsdag",
		"fredag",
		"lördag"
	]
};
var dayPeriodValues$12 = {
	narrow: {
		am: "fm",
		pm: "em",
		midnight: "midnatt",
		noon: "middag",
		morning: "morg.",
		afternoon: "efterm.",
		evening: "kväll",
		night: "natt"
	},
	abbreviated: {
		am: "f.m.",
		pm: "e.m.",
		midnight: "midnatt",
		noon: "middag",
		morning: "morgon",
		afternoon: "efterm.",
		evening: "kväll",
		night: "natt"
	},
	wide: {
		am: "förmiddag",
		pm: "eftermiddag",
		midnight: "midnatt",
		noon: "middag",
		morning: "morgon",
		afternoon: "eftermiddag",
		evening: "kväll",
		night: "natt"
	}
};
var formattingDayPeriodValues$12 = {
	narrow: {
		am: "fm",
		pm: "em",
		midnight: "midnatt",
		noon: "middag",
		morning: "på morg.",
		afternoon: "på efterm.",
		evening: "på kvällen",
		night: "på natten"
	},
	abbreviated: {
		am: "fm",
		pm: "em",
		midnight: "midnatt",
		noon: "middag",
		morning: "på morg.",
		afternoon: "på efterm.",
		evening: "på kvällen",
		night: "på natten"
	},
	wide: {
		am: "fm",
		pm: "em",
		midnight: "midnatt",
		noon: "middag",
		morning: "på morgonen",
		afternoon: "på eftermiddagen",
		evening: "på kvällen",
		night: "på natten"
	}
};
var ordinalNumber$12 = (dirtyNumber, _options) => {
	const number = Number(dirtyNumber);
	const rem100 = number % 100;
	if (rem100 > 20 || rem100 < 10) switch (rem100 % 10) {
		case 1:
		case 2: return number + ":a";
	}
	return number + ":e";
};
//#endregion
//#region ../../node_modules/date-fns/locale/sv.js
/**
* @category Locales
* @summary Swedish locale.
* @language Swedish
* @iso-639-2 swe
* @author Johannes Ulén [@ejulen](https://github.com/ejulen)
* @author Alexander Nanberg [@alexandernanberg](https://github.com/alexandernanberg)
* @author Henrik Andersson [@limelights](https://github.com/limelights)
*/
var sv = {
	code: "sv",
	formatDistance: formatDistance$12,
	formatLong: formatLong$12,
	formatRelative: formatRelative$12,
	localize: {
		ordinalNumber: ordinalNumber$12,
		era: buildLocalizeFn({
			values: eraValues$12,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$12,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$12,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$12,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$12,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$12,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(:a|:e)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(f\.? ?Kr\.?|f\.? ?v\.? ?t\.?|e\.? ?Kr\.?|v\.? ?t\.?)/i,
				abbreviated: /^(f\.? ?Kr\.?|f\.? ?v\.? ?t\.?|e\.? ?Kr\.?|v\.? ?t\.?)/i,
				wide: /^(före Kristus|före vår tid|efter Kristus|vår tid)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^f/i, /^[ev]/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^q[1234]/i,
				wide: /^[1234](:a|:e)? kvartalet/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[jfmasond]/i,
				abbreviated: /^(jan|feb|mar[s]?|apr|maj|jun[i]?|jul[i]?|aug|sep|okt|nov|dec)\.?/i,
				wide: /^(januari|februari|mars|april|maj|juni|juli|augusti|september|oktober|november|december)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^j/i,
					/^f/i,
					/^m/i,
					/^a/i,
					/^m/i,
					/^j/i,
					/^j/i,
					/^a/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				],
				any: [
					/^ja/i,
					/^f/i,
					/^mar/i,
					/^ap/i,
					/^maj/i,
					/^jun/i,
					/^jul/i,
					/^au/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[smtofl]/i,
				short: /^(sö|må|ti|on|to|fr|lö)/i,
				abbreviated: /^(sön|mån|tis|ons|tors|fre|lör)/i,
				wide: /^(söndag|måndag|tisdag|onsdag|torsdag|fredag|lördag)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/^s/i,
				/^m/i,
				/^ti/i,
				/^o/i,
				/^to/i,
				/^f/i,
				/^l/i
			] },
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: { any: /^([fe]\.?\s?m\.?|midn(att)?|midd(ag)?|(på) (morgonen|eftermiddagen|kvällen|natten))/i },
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^f/i,
				pm: /^e/i,
				midnight: /^midn/i,
				noon: /^midd/i,
				morning: /morgon/i,
				afternoon: /eftermiddag/i,
				evening: /kväll/i,
				night: /natt/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/ta/_lib/formatDistance.js
function isPluralType(val) {
	return val.one !== void 0;
}
var formatDistanceLocale$11 = {
	lessThanXSeconds: {
		one: {
			default: "ஒரு வினாடிக்கு குறைவாக",
			in: "ஒரு வினாடிக்குள்",
			ago: "ஒரு வினாடிக்கு முன்பு"
		},
		other: {
			default: "{{count}} வினாடிகளுக்கு குறைவாக",
			in: "{{count}} வினாடிகளுக்குள்",
			ago: "{{count}} வினாடிகளுக்கு முன்பு"
		}
	},
	xSeconds: {
		one: {
			default: "1 வினாடி",
			in: "1 வினாடியில்",
			ago: "1 வினாடி முன்பு"
		},
		other: {
			default: "{{count}} விநாடிகள்",
			in: "{{count}} வினாடிகளில்",
			ago: "{{count}} விநாடிகளுக்கு முன்பு"
		}
	},
	halfAMinute: {
		default: "அரை நிமிடம்",
		in: "அரை நிமிடத்தில்",
		ago: "அரை நிமிடம் முன்பு"
	},
	lessThanXMinutes: {
		one: {
			default: "ஒரு நிமிடத்திற்கும் குறைவாக",
			in: "ஒரு நிமிடத்திற்குள்",
			ago: "ஒரு நிமிடத்திற்கு முன்பு"
		},
		other: {
			default: "{{count}} நிமிடங்களுக்கும் குறைவாக",
			in: "{{count}} நிமிடங்களுக்குள்",
			ago: "{{count}} நிமிடங்களுக்கு முன்பு"
		}
	},
	xMinutes: {
		one: {
			default: "1 நிமிடம்",
			in: "1 நிமிடத்தில்",
			ago: "1 நிமிடம் முன்பு"
		},
		other: {
			default: "{{count}} நிமிடங்கள்",
			in: "{{count}} நிமிடங்களில்",
			ago: "{{count}} நிமிடங்களுக்கு முன்பு"
		}
	},
	aboutXHours: {
		one: {
			default: "சுமார் 1 மணி நேரம்",
			in: "சுமார் 1 மணி நேரத்தில்",
			ago: "சுமார் 1 மணி நேரத்திற்கு முன்பு"
		},
		other: {
			default: "சுமார் {{count}} மணி நேரம்",
			in: "சுமார் {{count}} மணி நேரத்திற்கு முன்பு",
			ago: "சுமார் {{count}} மணி நேரத்தில்"
		}
	},
	xHours: {
		one: {
			default: "1 மணி நேரம்",
			in: "1 மணி நேரத்தில்",
			ago: "1 மணி நேரத்திற்கு முன்பு"
		},
		other: {
			default: "{{count}} மணி நேரம்",
			in: "{{count}} மணி நேரத்தில்",
			ago: "{{count}} மணி நேரத்திற்கு முன்பு"
		}
	},
	xDays: {
		one: {
			default: "1 நாள்",
			in: "1 நாளில்",
			ago: "1 நாள் முன்பு"
		},
		other: {
			default: "{{count}} நாட்கள்",
			in: "{{count}} நாட்களில்",
			ago: "{{count}} நாட்களுக்கு முன்பு"
		}
	},
	aboutXWeeks: {
		one: {
			default: "சுமார் 1 வாரம்",
			in: "சுமார் 1 வாரத்தில்",
			ago: "சுமார் 1 வாரம் முன்பு"
		},
		other: {
			default: "சுமார் {{count}} வாரங்கள்",
			in: "சுமார் {{count}} வாரங்களில்",
			ago: "சுமார் {{count}} வாரங்களுக்கு முன்பு"
		}
	},
	xWeeks: {
		one: {
			default: "1 வாரம்",
			in: "1 வாரத்தில்",
			ago: "1 வாரம் முன்பு"
		},
		other: {
			default: "{{count}} வாரங்கள்",
			in: "{{count}} வாரங்களில்",
			ago: "{{count}} வாரங்களுக்கு முன்பு"
		}
	},
	aboutXMonths: {
		one: {
			default: "சுமார் 1 மாதம்",
			in: "சுமார் 1 மாதத்தில்",
			ago: "சுமார் 1 மாதத்திற்கு முன்பு"
		},
		other: {
			default: "சுமார் {{count}} மாதங்கள்",
			in: "சுமார் {{count}} மாதங்களில்",
			ago: "சுமார் {{count}} மாதங்களுக்கு முன்பு"
		}
	},
	xMonths: {
		one: {
			default: "1 மாதம்",
			in: "1 மாதத்தில்",
			ago: "1 மாதம் முன்பு"
		},
		other: {
			default: "{{count}} மாதங்கள்",
			in: "{{count}} மாதங்களில்",
			ago: "{{count}} மாதங்களுக்கு முன்பு"
		}
	},
	aboutXYears: {
		one: {
			default: "சுமார் 1 வருடம்",
			in: "சுமார் 1 ஆண்டில்",
			ago: "சுமார் 1 வருடம் முன்பு"
		},
		other: {
			default: "சுமார் {{count}} ஆண்டுகள்",
			in: "சுமார் {{count}} ஆண்டுகளில்",
			ago: "சுமார் {{count}} ஆண்டுகளுக்கு முன்பு"
		}
	},
	xYears: {
		one: {
			default: "1 வருடம்",
			in: "1 ஆண்டில்",
			ago: "1 வருடம் முன்பு"
		},
		other: {
			default: "{{count}} ஆண்டுகள்",
			in: "{{count}} ஆண்டுகளில்",
			ago: "{{count}} ஆண்டுகளுக்கு முன்பு"
		}
	},
	overXYears: {
		one: {
			default: "1 வருடத்திற்கு மேல்",
			in: "1 வருடத்திற்கும் மேலாக",
			ago: "1 வருடம் முன்பு"
		},
		other: {
			default: "{{count}} ஆண்டுகளுக்கும் மேலாக",
			in: "{{count}} ஆண்டுகளில்",
			ago: "{{count}} ஆண்டுகளுக்கு முன்பு"
		}
	},
	almostXYears: {
		one: {
			default: "கிட்டத்தட்ட 1 வருடம்",
			in: "கிட்டத்தட்ட 1 ஆண்டில்",
			ago: "கிட்டத்தட்ட 1 வருடம் முன்பு"
		},
		other: {
			default: "கிட்டத்தட்ட {{count}} ஆண்டுகள்",
			in: "கிட்டத்தட்ட {{count}} ஆண்டுகளில்",
			ago: "கிட்டத்தட்ட {{count}} ஆண்டுகளுக்கு முன்பு"
		}
	}
};
var formatDistance$11 = (token, count, options) => {
	const tense = options?.addSuffix ? options.comparison && options.comparison > 0 ? "in" : "ago" : "default";
	const tokenValue = formatDistanceLocale$11[token];
	if (!isPluralType(tokenValue)) return tokenValue[tense];
	if (count === 1) return tokenValue.one[tense];
	else return tokenValue.other[tense].replace("{{count}}", String(count));
};
var formatLong$11 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, d MMMM, y",
			long: "d MMMM, y",
			medium: "d MMM, y",
			short: "d/M/yy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "a h:mm:ss zzzz",
			long: "a h:mm:ss z",
			medium: "a h:mm:ss",
			short: "a h:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} {{time}}",
			long: "{{date}} {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/ta/_lib/formatRelative.js
var formatRelativeLocale$11 = {
	lastWeek: "'கடந்த' eeee p 'மணிக்கு'",
	yesterday: "'நேற்று ' p 'மணிக்கு'",
	today: "'இன்று ' p 'மணிக்கு'",
	tomorrow: "'நாளை ' p 'மணிக்கு'",
	nextWeek: "eeee p 'மணிக்கு'",
	other: "P"
};
var formatRelative$11 = (token, _date, _baseDate, _options) => formatRelativeLocale$11[token];
//#endregion
//#region ../../node_modules/date-fns/locale/ta/_lib/localize.js
var eraValues$11 = {
	narrow: ["கி.மு.", "கி.பி."],
	abbreviated: ["கி.மு.", "கி.பி."],
	wide: ["கிறிஸ்துவுக்கு முன்", "அன்னோ டோமினி"]
};
var quarterValues$11 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"காலா.1",
		"காலா.2",
		"காலா.3",
		"காலா.4"
	],
	wide: [
		"ஒன்றாம் காலாண்டு",
		"இரண்டாம் காலாண்டு",
		"மூன்றாம் காலாண்டு",
		"நான்காம் காலாண்டு"
	]
};
var monthValues$11 = {
	narrow: [
		"ஜ",
		"பி",
		"மா",
		"ஏ",
		"மே",
		"ஜூ",
		"ஜூ",
		"ஆ",
		"செ",
		"அ",
		"ந",
		"டி"
	],
	abbreviated: [
		"ஜன.",
		"பிப்.",
		"மார்.",
		"ஏப்.",
		"மே",
		"ஜூன்",
		"ஜூலை",
		"ஆக.",
		"செப்.",
		"அக்.",
		"நவ.",
		"டிச."
	],
	wide: [
		"ஜனவரி",
		"பிப்ரவரி",
		"மார்ச்",
		"ஏப்ரல்",
		"மே",
		"ஜூன்",
		"ஜூலை",
		"ஆகஸ்ட்",
		"செப்டம்பர்",
		"அக்டோபர்",
		"நவம்பர்",
		"டிசம்பர்"
	]
};
var dayValues$11 = {
	narrow: [
		"ஞா",
		"தி",
		"செ",
		"பு",
		"வி",
		"வெ",
		"ச"
	],
	short: [
		"ஞா",
		"தி",
		"செ",
		"பு",
		"வி",
		"வெ",
		"ச"
	],
	abbreviated: [
		"ஞாயி.",
		"திங்.",
		"செவ்.",
		"புத.",
		"வியா.",
		"வெள்.",
		"சனி"
	],
	wide: [
		"ஞாயிறு",
		"திங்கள்",
		"செவ்வாய்",
		"புதன்",
		"வியாழன்",
		"வெள்ளி",
		"சனி"
	]
};
var dayPeriodValues$11 = {
	narrow: {
		am: "மு.ப",
		pm: "பி.ப",
		midnight: "நள்.",
		noon: "நண்.",
		morning: "கா.",
		afternoon: "மதி.",
		evening: "மா.",
		night: "இர."
	},
	abbreviated: {
		am: "முற்பகல்",
		pm: "பிற்பகல்",
		midnight: "நள்ளிரவு",
		noon: "நண்பகல்",
		morning: "காலை",
		afternoon: "மதியம்",
		evening: "மாலை",
		night: "இரவு"
	},
	wide: {
		am: "முற்பகல்",
		pm: "பிற்பகல்",
		midnight: "நள்ளிரவு",
		noon: "நண்பகல்",
		morning: "காலை",
		afternoon: "மதியம்",
		evening: "மாலை",
		night: "இரவு"
	}
};
var formattingDayPeriodValues$11 = {
	narrow: {
		am: "மு.ப",
		pm: "பி.ப",
		midnight: "நள்.",
		noon: "நண்.",
		morning: "கா.",
		afternoon: "மதி.",
		evening: "மா.",
		night: "இர."
	},
	abbreviated: {
		am: "முற்பகல்",
		pm: "பிற்பகல்",
		midnight: "நள்ளிரவு",
		noon: "நண்பகல்",
		morning: "காலை",
		afternoon: "மதியம்",
		evening: "மாலை",
		night: "இரவு"
	},
	wide: {
		am: "முற்பகல்",
		pm: "பிற்பகல்",
		midnight: "நள்ளிரவு",
		noon: "நண்பகல்",
		morning: "காலை",
		afternoon: "மதியம்",
		evening: "மாலை",
		night: "இரவு"
	}
};
var ordinalNumber$11 = (dirtyNumber, _options) => {
	return String(dirtyNumber);
};
//#endregion
//#region ../../node_modules/date-fns/locale/ta.js
/**
* @category Locales
* @summary Tamil locale (India).
* @language Tamil
* @iso-639-2 tam
* @author Sibiraj [@sibiraj-s](https://github.com/sibiraj-s)
*/
var ta = {
	code: "ta",
	formatDistance: formatDistance$11,
	formatLong: formatLong$11,
	formatRelative: formatRelative$11,
	localize: {
		ordinalNumber: ordinalNumber$11,
		era: buildLocalizeFn({
			values: eraValues$11,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$11,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$11,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$11,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$11,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$11,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(வது)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(கி.மு.|கி.பி.)/i,
				abbreviated: /^(கி\.?\s?மு\.?|கி\.?\s?பி\.?)/,
				wide: /^(கிறிஸ்துவுக்கு\sமுன்|அன்னோ\sடோமினி)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/கி\.?\s?மு\.?/, /கி\.?\s?பி\.?/] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^காலா.[1234]/i,
				wide: /^(ஒன்றாம்|இரண்டாம்|மூன்றாம்|நான்காம்) காலாண்டு/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/1/i,
					/2/i,
					/3/i,
					/4/i
				],
				any: [
					/(1|காலா.1|ஒன்றாம்)/i,
					/(2|காலா.2|இரண்டாம்)/i,
					/(3|காலா.3|மூன்றாம்)/i,
					/(4|காலா.4|நான்காம்)/i
				]
			},
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^(ஜ|பி|மா|ஏ|மே|ஜூ|ஆ|செ|அ|ந|டி)$/i,
				abbreviated: /^(ஜன.|பிப்.|மார்.|ஏப்.|மே|ஜூன்|ஜூலை|ஆக.|செப்.|அக்.|நவ.|டிச.)/i,
				wide: /^(ஜனவரி|பிப்ரவரி|மார்ச்|ஏப்ரல்|மே|ஜூன்|ஜூலை|ஆகஸ்ட்|செப்டம்பர்|அக்டோபர்|நவம்பர்|டிசம்பர்)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ஜ$/i,
					/^பி/i,
					/^மா/i,
					/^ஏ/i,
					/^மே/i,
					/^ஜூ/i,
					/^ஜூ/i,
					/^ஆ/i,
					/^செ/i,
					/^அ/i,
					/^ந/i,
					/^டி/i
				],
				any: [
					/^ஜன/i,
					/^பி/i,
					/^மா/i,
					/^ஏ/i,
					/^மே/i,
					/^ஜூன்/i,
					/^ஜூலை/i,
					/^ஆ/i,
					/^செ/i,
					/^அ/i,
					/^ந/i,
					/^டி/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^(ஞா|தி|செ|பு|வி|வெ|ச)/i,
				short: /^(ஞா|தி|செ|பு|வி|வெ|ச)/i,
				abbreviated: /^(ஞாயி.|திங்.|செவ்.|புத.|வியா.|வெள்.|சனி)/i,
				wide: /^(ஞாயிறு|திங்கள்|செவ்வாய்|புதன்|வியாழன்|வெள்ளி|சனி)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ஞா/i,
					/^தி/i,
					/^செ/i,
					/^பு/i,
					/^வி/i,
					/^வெ/i,
					/^ச/i
				],
				any: [
					/^ஞா/i,
					/^தி/i,
					/^செ/i,
					/^பு/i,
					/^வி/i,
					/^வெ/i,
					/^ச/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(மு.ப|பி.ப|நள்|நண்|காலை|மதியம்|மாலை|இரவு)/i,
				any: /^(மு.ப|பி.ப|முற்பகல்|பிற்பகல்|நள்ளிரவு|நண்பகல்|காலை|மதியம்|மாலை|இரவு)/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^மு/i,
				pm: /^பி/i,
				midnight: /^நள்/i,
				noon: /^நண்/i,
				morning: /காலை/i,
				afternoon: /மதியம்/i,
				evening: /மாலை/i,
				night: /இரவு/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/te/_lib/formatDistance.js
var formatDistanceLocale$10 = {
	lessThanXSeconds: {
		standalone: {
			one: "సెకను కన్నా తక్కువ",
			other: "{{count}} సెకన్ల కన్నా తక్కువ"
		},
		withPreposition: {
			one: "సెకను",
			other: "{{count}} సెకన్ల"
		}
	},
	xSeconds: {
		standalone: {
			one: "ఒక సెకను",
			other: "{{count}} సెకన్ల"
		},
		withPreposition: {
			one: "ఒక సెకను",
			other: "{{count}} సెకన్ల"
		}
	},
	halfAMinute: {
		standalone: "అర నిమిషం",
		withPreposition: "అర నిమిషం"
	},
	lessThanXMinutes: {
		standalone: {
			one: "ఒక నిమిషం కన్నా తక్కువ",
			other: "{{count}} నిమిషాల కన్నా తక్కువ"
		},
		withPreposition: {
			one: "ఒక నిమిషం",
			other: "{{count}} నిమిషాల"
		}
	},
	xMinutes: {
		standalone: {
			one: "ఒక నిమిషం",
			other: "{{count}} నిమిషాలు"
		},
		withPreposition: {
			one: "ఒక నిమిషం",
			other: "{{count}} నిమిషాల"
		}
	},
	aboutXHours: {
		standalone: {
			one: "సుమారు ఒక గంట",
			other: "సుమారు {{count}} గంటలు"
		},
		withPreposition: {
			one: "సుమారు ఒక గంట",
			other: "సుమారు {{count}} గంటల"
		}
	},
	xHours: {
		standalone: {
			one: "ఒక గంట",
			other: "{{count}} గంటలు"
		},
		withPreposition: {
			one: "ఒక గంట",
			other: "{{count}} గంటల"
		}
	},
	xDays: {
		standalone: {
			one: "ఒక రోజు",
			other: "{{count}} రోజులు"
		},
		withPreposition: {
			one: "ఒక రోజు",
			other: "{{count}} రోజుల"
		}
	},
	aboutXWeeks: {
		standalone: {
			one: "సుమారు ఒక వారం",
			other: "సుమారు {{count}} వారాలు"
		},
		withPreposition: {
			one: "సుమారు ఒక వారం",
			other: "సుమారు {{count}} వారాలల"
		}
	},
	xWeeks: {
		standalone: {
			one: "ఒక వారం",
			other: "{{count}} వారాలు"
		},
		withPreposition: {
			one: "ఒక వారం",
			other: "{{count}} వారాలల"
		}
	},
	aboutXMonths: {
		standalone: {
			one: "సుమారు ఒక నెల",
			other: "సుమారు {{count}} నెలలు"
		},
		withPreposition: {
			one: "సుమారు ఒక నెల",
			other: "సుమారు {{count}} నెలల"
		}
	},
	xMonths: {
		standalone: {
			one: "ఒక నెల",
			other: "{{count}} నెలలు"
		},
		withPreposition: {
			one: "ఒక నెల",
			other: "{{count}} నెలల"
		}
	},
	aboutXYears: {
		standalone: {
			one: "సుమారు ఒక సంవత్సరం",
			other: "సుమారు {{count}} సంవత్సరాలు"
		},
		withPreposition: {
			one: "సుమారు ఒక సంవత్సరం",
			other: "సుమారు {{count}} సంవత్సరాల"
		}
	},
	xYears: {
		standalone: {
			one: "ఒక సంవత్సరం",
			other: "{{count}} సంవత్సరాలు"
		},
		withPreposition: {
			one: "ఒక సంవత్సరం",
			other: "{{count}} సంవత్సరాల"
		}
	},
	overXYears: {
		standalone: {
			one: "ఒక సంవత్సరం పైగా",
			other: "{{count}} సంవత్సరాలకు పైగా"
		},
		withPreposition: {
			one: "ఒక సంవత్సరం",
			other: "{{count}} సంవత్సరాల"
		}
	},
	almostXYears: {
		standalone: {
			one: "దాదాపు ఒక సంవత్సరం",
			other: "దాదాపు {{count}} సంవత్సరాలు"
		},
		withPreposition: {
			one: "దాదాపు ఒక సంవత్సరం",
			other: "దాదాపు {{count}} సంవత్సరాల"
		}
	}
};
var formatDistance$10 = (token, count, options) => {
	let result;
	const tokenValue = options?.addSuffix ? formatDistanceLocale$10[token].withPreposition : formatDistanceLocale$10[token].standalone;
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return result + "లో";
	else return result + " క్రితం";
	return result;
};
var formatLong$10 = {
	date: buildFormatLongFn({
		formats: {
			full: "d, MMMM y, EEEE",
			long: "d MMMM, y",
			medium: "d MMM, y",
			short: "dd-MM-yy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "h:mm:ss a zzzz",
			long: "h:mm:ss a z",
			medium: "h:mm:ss a",
			short: "h:mm a"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} {{time}}'కి'",
			long: "{{date}} {{time}}'కి'",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/te/_lib/formatRelative.js
var formatRelativeLocale$10 = {
	lastWeek: "'గత' eeee p",
	yesterday: "'నిన్న' p",
	today: "'ఈ రోజు' p",
	tomorrow: "'రేపు' p",
	nextWeek: "'తదుపరి' eeee p",
	other: "P"
};
var formatRelative$10 = (token, _date, _baseDate, _options) => formatRelativeLocale$10[token];
//#endregion
//#region ../../node_modules/date-fns/locale/te/_lib/localize.js
var eraValues$10 = {
	narrow: ["క్రీ.పూ.", "క్రీ.శ."],
	abbreviated: ["క్రీ.పూ.", "క్రీ.శ."],
	wide: ["క్రీస్తు పూర్వం", "క్రీస్తుశకం"]
};
var quarterValues$10 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"త్రై1",
		"త్రై2",
		"త్రై3",
		"త్రై4"
	],
	wide: [
		"1వ త్రైమాసికం",
		"2వ త్రైమాసికం",
		"3వ త్రైమాసికం",
		"4వ త్రైమాసికం"
	]
};
var monthValues$10 = {
	narrow: [
		"జ",
		"ఫి",
		"మా",
		"ఏ",
		"మే",
		"జూ",
		"జు",
		"ఆ",
		"సె",
		"అ",
		"న",
		"డి"
	],
	abbreviated: [
		"జన",
		"ఫిబ్ర",
		"మార్చి",
		"ఏప్రి",
		"మే",
		"జూన్",
		"జులై",
		"ఆగ",
		"సెప్టెం",
		"అక్టో",
		"నవం",
		"డిసెం"
	],
	wide: [
		"జనవరి",
		"ఫిబ్రవరి",
		"మార్చి",
		"ఏప్రిల్",
		"మే",
		"జూన్",
		"జులై",
		"ఆగస్టు",
		"సెప్టెంబర్",
		"అక్టోబర్",
		"నవంబర్",
		"డిసెంబర్"
	]
};
var dayValues$10 = {
	narrow: [
		"ఆ",
		"సో",
		"మ",
		"బు",
		"గు",
		"శు",
		"శ"
	],
	short: [
		"ఆది",
		"సోమ",
		"మంగళ",
		"బుధ",
		"గురు",
		"శుక్ర",
		"శని"
	],
	abbreviated: [
		"ఆది",
		"సోమ",
		"మంగళ",
		"బుధ",
		"గురు",
		"శుక్ర",
		"శని"
	],
	wide: [
		"ఆదివారం",
		"సోమవారం",
		"మంగళవారం",
		"బుధవారం",
		"గురువారం",
		"శుక్రవారం",
		"శనివారం"
	]
};
var dayPeriodValues$10 = {
	narrow: {
		am: "పూర్వాహ్నం",
		pm: "అపరాహ్నం",
		midnight: "అర్ధరాత్రి",
		noon: "మిట్టమధ్యాహ్నం",
		morning: "ఉదయం",
		afternoon: "మధ్యాహ్నం",
		evening: "సాయంత్రం",
		night: "రాత్రి"
	},
	abbreviated: {
		am: "పూర్వాహ్నం",
		pm: "అపరాహ్నం",
		midnight: "అర్ధరాత్రి",
		noon: "మిట్టమధ్యాహ్నం",
		morning: "ఉదయం",
		afternoon: "మధ్యాహ్నం",
		evening: "సాయంత్రం",
		night: "రాత్రి"
	},
	wide: {
		am: "పూర్వాహ్నం",
		pm: "అపరాహ్నం",
		midnight: "అర్ధరాత్రి",
		noon: "మిట్టమధ్యాహ్నం",
		morning: "ఉదయం",
		afternoon: "మధ్యాహ్నం",
		evening: "సాయంత్రం",
		night: "రాత్రి"
	}
};
var formattingDayPeriodValues$10 = {
	narrow: {
		am: "పూర్వాహ్నం",
		pm: "అపరాహ్నం",
		midnight: "అర్ధరాత్రి",
		noon: "మిట్టమధ్యాహ్నం",
		morning: "ఉదయం",
		afternoon: "మధ్యాహ్నం",
		evening: "సాయంత్రం",
		night: "రాత్రి"
	},
	abbreviated: {
		am: "పూర్వాహ్నం",
		pm: "అపరాహ్నం",
		midnight: "అర్ధరాత్రి",
		noon: "మిట్టమధ్యాహ్నం",
		morning: "ఉదయం",
		afternoon: "మధ్యాహ్నం",
		evening: "సాయంత్రం",
		night: "రాత్రి"
	},
	wide: {
		am: "పూర్వాహ్నం",
		pm: "అపరాహ్నం",
		midnight: "అర్ధరాత్రి",
		noon: "మిట్టమధ్యాహ్నం",
		morning: "ఉదయం",
		afternoon: "మధ్యాహ్నం",
		evening: "సాయంత్రం",
		night: "రాత్రి"
	}
};
var ordinalNumber$10 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + "వ";
};
//#endregion
//#region ../../node_modules/date-fns/locale/te.js
/**
* @category Locales
* @summary Telugu locale
* @language Telugu
* @iso-639-2 tel
* @author Kranthi Lakum [@kranthilakum](https://github.com/kranthilakum)
*/
var te = {
	code: "te",
	formatDistance: formatDistance$10,
	formatLong: formatLong$10,
	formatRelative: formatRelative$10,
	localize: {
		ordinalNumber: ordinalNumber$10,
		era: buildLocalizeFn({
			values: eraValues$10,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$10,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$10,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$10,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$10,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$10,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(వ)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(క్రీ\.పూ\.|క్రీ\.శ\.)/i,
				abbreviated: /^(క్రీ\.?\s?పూ\.?|ప్ర\.?\s?శ\.?\s?పూ\.?|క్రీ\.?\s?శ\.?|సా\.?\s?శ\.?)/i,
				wide: /^(క్రీస్తు పూర్వం|ప్రస్తుత శకానికి పూర్వం|క్రీస్తు శకం|ప్రస్తుత శకం)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^(పూ|శ)/i, /^సా/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^త్రై[1234]/i,
				wide: /^[1234](వ)? త్రైమాసికం/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^(జూ|జు|జ|ఫి|మా|ఏ|మే|ఆ|సె|అ|న|డి)/i,
				abbreviated: /^(జన|ఫిబ్ర|మార్చి|ఏప్రి|మే|జూన్|జులై|ఆగ|సెప్|అక్టో|నవ|డిసె)/i,
				wide: /^(జనవరి|ఫిబ్రవరి|మార్చి|ఏప్రిల్|మే|జూన్|జులై|ఆగస్టు|సెప్టెంబర్|అక్టోబర్|నవంబర్|డిసెంబర్)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^జ/i,
					/^ఫి/i,
					/^మా/i,
					/^ఏ/i,
					/^మే/i,
					/^జూ/i,
					/^జు/i,
					/^ఆ/i,
					/^సె/i,
					/^అ/i,
					/^న/i,
					/^డి/i
				],
				any: [
					/^జన/i,
					/^ఫి/i,
					/^మా/i,
					/^ఏ/i,
					/^మే/i,
					/^జూన్/i,
					/^జులై/i,
					/^ఆగ/i,
					/^సె/i,
					/^అ/i,
					/^న/i,
					/^డి/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^(ఆ|సో|మ|బు|గు|శు|శ)/i,
				short: /^(ఆది|సోమ|మం|బుధ|గురు|శుక్ర|శని)/i,
				abbreviated: /^(ఆది|సోమ|మం|బుధ|గురు|శుక్ర|శని)/i,
				wide: /^(ఆదివారం|సోమవారం|మంగళవారం|బుధవారం|గురువారం|శుక్రవారం|శనివారం)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ఆ/i,
					/^సో/i,
					/^మ/i,
					/^బు/i,
					/^గు/i,
					/^శు/i,
					/^శ/i
				],
				any: [
					/^ఆది/i,
					/^సోమ/i,
					/^మం/i,
					/^బుధ/i,
					/^గురు/i,
					/^శుక్ర/i,
					/^శని/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(పూర్వాహ్నం|అపరాహ్నం|అర్ధరాత్రి|మిట్టమధ్యాహ్నం|ఉదయం|మధ్యాహ్నం|సాయంత్రం|రాత్రి)/i,
				any: /^(పూర్వాహ్నం|అపరాహ్నం|అర్ధరాత్రి|మిట్టమధ్యాహ్నం|ఉదయం|మధ్యాహ్నం|సాయంత్రం|రాత్రి)/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^పూర్వాహ్నం/i,
				pm: /^అపరాహ్నం/i,
				midnight: /^అర్ధ/i,
				noon: /^మిట్ట/i,
				morning: /ఉదయం/i,
				afternoon: /మధ్యాహ్నం/i,
				evening: /సాయంత్రం/i,
				night: /రాత్రి/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 0,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/th/_lib/formatDistance.js
var formatDistanceLocale$9 = {
	lessThanXSeconds: {
		one: "น้อยกว่า 1 วินาที",
		other: "น้อยกว่า {{count}} วินาที"
	},
	xSeconds: {
		one: "1 วินาที",
		other: "{{count}} วินาที"
	},
	halfAMinute: "ครึ่งนาที",
	lessThanXMinutes: {
		one: "น้อยกว่า 1 นาที",
		other: "น้อยกว่า {{count}} นาที"
	},
	xMinutes: {
		one: "1 นาที",
		other: "{{count}} นาที"
	},
	aboutXHours: {
		one: "ประมาณ 1 ชั่วโมง",
		other: "ประมาณ {{count}} ชั่วโมง"
	},
	xHours: {
		one: "1 ชั่วโมง",
		other: "{{count}} ชั่วโมง"
	},
	xDays: {
		one: "1 วัน",
		other: "{{count}} วัน"
	},
	aboutXWeeks: {
		one: "ประมาณ 1 สัปดาห์",
		other: "ประมาณ {{count}} สัปดาห์"
	},
	xWeeks: {
		one: "1 สัปดาห์",
		other: "{{count}} สัปดาห์"
	},
	aboutXMonths: {
		one: "ประมาณ 1 เดือน",
		other: "ประมาณ {{count}} เดือน"
	},
	xMonths: {
		one: "1 เดือน",
		other: "{{count}} เดือน"
	},
	aboutXYears: {
		one: "ประมาณ 1 ปี",
		other: "ประมาณ {{count}} ปี"
	},
	xYears: {
		one: "1 ปี",
		other: "{{count}} ปี"
	},
	overXYears: {
		one: "มากกว่า 1 ปี",
		other: "มากกว่า {{count}} ปี"
	},
	almostXYears: {
		one: "เกือบ 1 ปี",
		other: "เกือบ {{count}} ปี"
	}
};
var formatDistance$9 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$9[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) if (token === "halfAMinute") return "ใน" + result;
	else return "ใน " + result;
	else return result + "ที่ผ่านมา";
	return result;
};
var formatLong$9 = {
	date: buildFormatLongFn({
		formats: {
			full: "วันEEEEที่ do MMMM y",
			long: "do MMMM y",
			medium: "d MMM y",
			short: "dd/MM/yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "H:mm:ss น. zzzz",
			long: "H:mm:ss น. z",
			medium: "H:mm:ss น.",
			short: "H:mm น."
		},
		defaultWidth: "medium"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'เวลา' {{time}}",
			long: "{{date}} 'เวลา' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/th/_lib/formatRelative.js
var formatRelativeLocale$9 = {
	lastWeek: "eeee'ที่แล้วเวลา' p",
	yesterday: "'เมื่อวานนี้เวลา' p",
	today: "'วันนี้เวลา' p",
	tomorrow: "'พรุ่งนี้เวลา' p",
	nextWeek: "eeee 'เวลา' p",
	other: "P"
};
var formatRelative$9 = (token, _date, _baseDate, _options) => formatRelativeLocale$9[token];
//#endregion
//#region ../../node_modules/date-fns/locale/th/_lib/localize.js
var eraValues$9 = {
	narrow: ["B", "คศ"],
	abbreviated: ["BC", "ค.ศ."],
	wide: ["ปีก่อนคริสตกาล", "คริสต์ศักราช"]
};
var quarterValues$9 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"Q1",
		"Q2",
		"Q3",
		"Q4"
	],
	wide: [
		"ไตรมาสแรก",
		"ไตรมาสที่สอง",
		"ไตรมาสที่สาม",
		"ไตรมาสที่สี่"
	]
};
var dayValues$9 = {
	narrow: [
		"อา.",
		"จ.",
		"อ.",
		"พ.",
		"พฤ.",
		"ศ.",
		"ส."
	],
	short: [
		"อา.",
		"จ.",
		"อ.",
		"พ.",
		"พฤ.",
		"ศ.",
		"ส."
	],
	abbreviated: [
		"อา.",
		"จ.",
		"อ.",
		"พ.",
		"พฤ.",
		"ศ.",
		"ส."
	],
	wide: [
		"อาทิตย์",
		"จันทร์",
		"อังคาร",
		"พุธ",
		"พฤหัสบดี",
		"ศุกร์",
		"เสาร์"
	]
};
var monthValues$9 = {
	narrow: [
		"ม.ค.",
		"ก.พ.",
		"มี.ค.",
		"เม.ย.",
		"พ.ค.",
		"มิ.ย.",
		"ก.ค.",
		"ส.ค.",
		"ก.ย.",
		"ต.ค.",
		"พ.ย.",
		"ธ.ค."
	],
	abbreviated: [
		"ม.ค.",
		"ก.พ.",
		"มี.ค.",
		"เม.ย.",
		"พ.ค.",
		"มิ.ย.",
		"ก.ค.",
		"ส.ค.",
		"ก.ย.",
		"ต.ค.",
		"พ.ย.",
		"ธ.ค."
	],
	wide: [
		"มกราคม",
		"กุมภาพันธ์",
		"มีนาคม",
		"เมษายน",
		"พฤษภาคม",
		"มิถุนายน",
		"กรกฎาคม",
		"สิงหาคม",
		"กันยายน",
		"ตุลาคม",
		"พฤศจิกายน",
		"ธันวาคม"
	]
};
var dayPeriodValues$9 = {
	narrow: {
		am: "ก่อนเที่ยง",
		pm: "หลังเที่ยง",
		midnight: "เที่ยงคืน",
		noon: "เที่ยง",
		morning: "เช้า",
		afternoon: "บ่าย",
		evening: "เย็น",
		night: "กลางคืน"
	},
	abbreviated: {
		am: "ก่อนเที่ยง",
		pm: "หลังเที่ยง",
		midnight: "เที่ยงคืน",
		noon: "เที่ยง",
		morning: "เช้า",
		afternoon: "บ่าย",
		evening: "เย็น",
		night: "กลางคืน"
	},
	wide: {
		am: "ก่อนเที่ยง",
		pm: "หลังเที่ยง",
		midnight: "เที่ยงคืน",
		noon: "เที่ยง",
		morning: "เช้า",
		afternoon: "บ่าย",
		evening: "เย็น",
		night: "กลางคืน"
	}
};
var formattingDayPeriodValues$9 = {
	narrow: {
		am: "ก่อนเที่ยง",
		pm: "หลังเที่ยง",
		midnight: "เที่ยงคืน",
		noon: "เที่ยง",
		morning: "ตอนเช้า",
		afternoon: "ตอนกลางวัน",
		evening: "ตอนเย็น",
		night: "ตอนกลางคืน"
	},
	abbreviated: {
		am: "ก่อนเที่ยง",
		pm: "หลังเที่ยง",
		midnight: "เที่ยงคืน",
		noon: "เที่ยง",
		morning: "ตอนเช้า",
		afternoon: "ตอนกลางวัน",
		evening: "ตอนเย็น",
		night: "ตอนกลางคืน"
	},
	wide: {
		am: "ก่อนเที่ยง",
		pm: "หลังเที่ยง",
		midnight: "เที่ยงคืน",
		noon: "เที่ยง",
		morning: "ตอนเช้า",
		afternoon: "ตอนกลางวัน",
		evening: "ตอนเย็น",
		night: "ตอนกลางคืน"
	}
};
var ordinalNumber$9 = (dirtyNumber, _options) => {
	return String(dirtyNumber);
};
//#endregion
//#region ../../node_modules/date-fns/locale/th.js
/**
* @category Locales
* @summary Thai locale.
* @language Thai
* @iso-639-2 tha
* @author Athiwat Hirunworawongkun [@athivvat](https://github.com/athivvat)
* @author [@hawkup](https://github.com/hawkup)
* @author  Jirawat I. [@nodtem66](https://github.com/nodtem66)
*/
var th = {
	code: "th",
	formatDistance: formatDistance$9,
	formatLong: formatLong$9,
	formatRelative: formatRelative$9,
	localize: {
		ordinalNumber: ordinalNumber$9,
		era: buildLocalizeFn({
			values: eraValues$9,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$9,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$9,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$9,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$9,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$9,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^\d+/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^([bB]|[aA]|คศ)/i,
				abbreviated: /^([bB]\.?\s?[cC]\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?|ค\.?ศ\.?)/i,
				wide: /^(ก่อนคริสตกาล|คริสต์ศักราช|คริสตกาล)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^[bB]/i, /^(^[aA]|ค\.?ศ\.?|คริสตกาล|คริสต์ศักราช|)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^q[1234]/i,
				wide: /^ไตรมาส(ที่)? ?[1234]/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/(1|แรก|หนึ่ง)/i,
				/(2|สอง)/i,
				/(3|สาม)/i,
				/(4|สี่)/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^(ม\.?ค\.?|ก\.?พ\.?|มี\.?ค\.?|เม\.?ย\.?|พ\.?ค\.?|มิ\.?ย\.?|ก\.?ค\.?|ส\.?ค\.?|ก\.?ย\.?|ต\.?ค\.?|พ\.?ย\.?|ธ\.?ค\.?)/i,
				abbreviated: /^(ม\.?ค\.?|ก\.?พ\.?|มี\.?ค\.?|เม\.?ย\.?|พ\.?ค\.?|มิ\.?ย\.?|ก\.?ค\.?|ส\.?ค\.?|ก\.?ย\.?|ต\.?ค\.?|พ\.?ย\.?|ธ\.?ค\.?')/i,
				wide: /^(มกราคม|กุมภาพันธ์|มีนาคม|เมษายน|พฤษภาคม|มิถุนายน|กรกฎาคม|สิงหาคม|กันยายน|ตุลาคม|พฤศจิกายน|ธันวาคม)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				wide: [
					/^มก/i,
					/^กุม/i,
					/^มี/i,
					/^เม/i,
					/^พฤษ/i,
					/^มิ/i,
					/^กรก/i,
					/^ส/i,
					/^กัน/i,
					/^ต/i,
					/^พฤศ/i,
					/^ธ/i
				],
				any: [
					/^ม\.?ค\.?/i,
					/^ก\.?พ\.?/i,
					/^มี\.?ค\.?/i,
					/^เม\.?ย\.?/i,
					/^พ\.?ค\.?/i,
					/^มิ\.?ย\.?/i,
					/^ก\.?ค\.?/i,
					/^ส\.?ค\.?/i,
					/^ก\.?ย\.?/i,
					/^ต\.?ค\.?/i,
					/^พ\.?ย\.?/i,
					/^ธ\.?ค\.?/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^(อา\.?|จ\.?|อ\.?|พฤ\.?|พ\.?|ศ\.?|ส\.?)/i,
				short: /^(อา\.?|จ\.?|อ\.?|พฤ\.?|พ\.?|ศ\.?|ส\.?)/i,
				abbreviated: /^(อา\.?|จ\.?|อ\.?|พฤ\.?|พ\.?|ศ\.?|ส\.?)/i,
				wide: /^(อาทิตย์|จันทร์|อังคาร|พุธ|พฤหัสบดี|ศุกร์|เสาร์)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				wide: [
					/^อา/i,
					/^จั/i,
					/^อั/i,
					/^พุธ/i,
					/^พฤ/i,
					/^ศ/i,
					/^เส/i
				],
				any: [
					/^อา/i,
					/^จ/i,
					/^อ/i,
					/^พ(?!ฤ)/i,
					/^พฤ/i,
					/^ศ/i,
					/^ส/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: { any: /^(ก่อนเที่ยง|หลังเที่ยง|เที่ยงคืน|เที่ยง|(ตอน.*?)?.*(เที่ยง|เช้า|บ่าย|เย็น|กลางคืน))/i },
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^ก่อนเที่ยง/i,
				pm: /^หลังเที่ยง/i,
				midnight: /^เที่ยงคืน/i,
				noon: /^เที่ยง/i,
				morning: /เช้า/i,
				afternoon: /บ่าย/i,
				evening: /เย็น/i,
				night: /กลางคืน/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 0,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/tr/_lib/formatDistance.js
var formatDistanceLocale$8 = {
	lessThanXSeconds: {
		one: "bir saniyeden az",
		other: "{{count}} saniyeden az"
	},
	xSeconds: {
		one: "1 saniye",
		other: "{{count}} saniye"
	},
	halfAMinute: "yarım dakika",
	lessThanXMinutes: {
		one: "bir dakikadan az",
		other: "{{count}} dakikadan az"
	},
	xMinutes: {
		one: "1 dakika",
		other: "{{count}} dakika"
	},
	aboutXHours: {
		one: "yaklaşık 1 saat",
		other: "yaklaşık {{count}} saat"
	},
	xHours: {
		one: "1 saat",
		other: "{{count}} saat"
	},
	xDays: {
		one: "1 gün",
		other: "{{count}} gün"
	},
	aboutXWeeks: {
		one: "yaklaşık 1 hafta",
		other: "yaklaşık {{count}} hafta"
	},
	xWeeks: {
		one: "1 hafta",
		other: "{{count}} hafta"
	},
	aboutXMonths: {
		one: "yaklaşık 1 ay",
		other: "yaklaşık {{count}} ay"
	},
	xMonths: {
		one: "1 ay",
		other: "{{count}} ay"
	},
	aboutXYears: {
		one: "yaklaşık 1 yıl",
		other: "yaklaşık {{count}} yıl"
	},
	xYears: {
		one: "1 yıl",
		other: "{{count}} yıl"
	},
	overXYears: {
		one: "1 yıldan fazla",
		other: "{{count}} yıldan fazla"
	},
	almostXYears: {
		one: "neredeyse 1 yıl",
		other: "neredeyse {{count}} yıl"
	}
};
var formatDistance$8 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$8[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", count.toString());
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return result + " sonra";
	else return result + " önce";
	return result;
};
var formatLong$8 = {
	date: buildFormatLongFn({
		formats: {
			full: "d MMMM y EEEE",
			long: "d MMMM y",
			medium: "d MMM y",
			short: "dd.MM.yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'saat' {{time}}",
			long: "{{date}} 'saat' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/tr/_lib/formatRelative.js
var formatRelativeLocale$8 = {
	lastWeek: "'geçen hafta' eeee 'saat' p",
	yesterday: "'dün saat' p",
	today: "'bugün saat' p",
	tomorrow: "'yarın saat' p",
	nextWeek: "eeee 'saat' p",
	other: "P"
};
var formatRelative$8 = (token, _date, _baseDate, _options) => formatRelativeLocale$8[token];
//#endregion
//#region ../../node_modules/date-fns/locale/tr/_lib/localize.js
var eraValues$8 = {
	narrow: ["MÖ", "MS"],
	abbreviated: ["MÖ", "MS"],
	wide: ["Milattan Önce", "Milattan Sonra"]
};
var quarterValues$8 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"1Ç",
		"2Ç",
		"3Ç",
		"4Ç"
	],
	wide: [
		"İlk çeyrek",
		"İkinci Çeyrek",
		"Üçüncü çeyrek",
		"Son çeyrek"
	]
};
var monthValues$8 = {
	narrow: [
		"O",
		"Ş",
		"M",
		"N",
		"M",
		"H",
		"T",
		"A",
		"E",
		"E",
		"K",
		"A"
	],
	abbreviated: [
		"Oca",
		"Şub",
		"Mar",
		"Nis",
		"May",
		"Haz",
		"Tem",
		"Ağu",
		"Eyl",
		"Eki",
		"Kas",
		"Ara"
	],
	wide: [
		"Ocak",
		"Şubat",
		"Mart",
		"Nisan",
		"Mayıs",
		"Haziran",
		"Temmuz",
		"Ağustos",
		"Eylül",
		"Ekim",
		"Kasım",
		"Aralık"
	]
};
var dayValues$8 = {
	narrow: [
		"P",
		"P",
		"S",
		"Ç",
		"P",
		"C",
		"C"
	],
	short: [
		"Pz",
		"Pt",
		"Sa",
		"Ça",
		"Pe",
		"Cu",
		"Ct"
	],
	abbreviated: [
		"Paz",
		"Pzt",
		"Sal",
		"Çar",
		"Per",
		"Cum",
		"Cts"
	],
	wide: [
		"Pazar",
		"Pazartesi",
		"Salı",
		"Çarşamba",
		"Perşembe",
		"Cuma",
		"Cumartesi"
	]
};
var dayPeriodValues$8 = {
	narrow: {
		am: "öö",
		pm: "ös",
		midnight: "gy",
		noon: "ö",
		morning: "sa",
		afternoon: "ös",
		evening: "ak",
		night: "ge"
	},
	abbreviated: {
		am: "ÖÖ",
		pm: "ÖS",
		midnight: "gece yarısı",
		noon: "öğle",
		morning: "sabah",
		afternoon: "öğleden sonra",
		evening: "akşam",
		night: "gece"
	},
	wide: {
		am: "Ö.Ö.",
		pm: "Ö.S.",
		midnight: "gece yarısı",
		noon: "öğle",
		morning: "sabah",
		afternoon: "öğleden sonra",
		evening: "akşam",
		night: "gece"
	}
};
var formattingDayPeriodValues$8 = {
	narrow: {
		am: "öö",
		pm: "ös",
		midnight: "gy",
		noon: "ö",
		morning: "sa",
		afternoon: "ös",
		evening: "ak",
		night: "ge"
	},
	abbreviated: {
		am: "ÖÖ",
		pm: "ÖS",
		midnight: "gece yarısı",
		noon: "öğlen",
		morning: "sabahleyin",
		afternoon: "öğleden sonra",
		evening: "akşamleyin",
		night: "geceleyin"
	},
	wide: {
		am: "ö.ö.",
		pm: "ö.s.",
		midnight: "gece yarısı",
		noon: "öğlen",
		morning: "sabahleyin",
		afternoon: "öğleden sonra",
		evening: "akşamleyin",
		night: "geceleyin"
	}
};
var ordinalNumber$8 = (dirtyNumber, _options) => {
	return Number(dirtyNumber) + ".";
};
//#endregion
//#region ../../node_modules/date-fns/locale/tr.js
/**
* @category Locales
* @summary Turkish locale.
* @language Turkish
* @iso-639-2 tur
* @author Alpcan Aydın [@alpcanaydin](https://github.com/alpcanaydin)
* @author Berkay Sargın [@berkaey](https://github.com/berkaey)
* @author Fatih Bulut [@bulutfatih](https://github.com/bulutfatih)
* @author Ismail Demirbilek [@dbtek](https://github.com/dbtek)
* @author İsmail Kayar [@ikayar](https://github.com/ikayar)
*
*
*/
var tr = {
	code: "tr",
	formatDistance: formatDistance$8,
	formatLong: formatLong$8,
	formatRelative: formatRelative$8,
	localize: {
		ordinalNumber: ordinalNumber$8,
		era: buildLocalizeFn({
			values: eraValues$8,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$8,
			defaultWidth: "wide",
			argumentCallback: (quarter) => Number(quarter) - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$8,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$8,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$8,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$8,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(\.)?/i,
			parsePattern: /\d+/i,
			valueCallback: function(value) {
				return parseInt(value, 10);
			}
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(mö|ms)/i,
				abbreviated: /^(mö|ms)/i,
				wide: /^(milattan önce|milattan sonra)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/(^mö|^milattan önce)/i, /(^ms|^milattan sonra)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^[1234]ç/i,
				wide: /^((i|İ)lk|(i|İ)kinci|üçüncü|son) çeyrek/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				any: [
					/1/i,
					/2/i,
					/3/i,
					/4/i
				],
				abbreviated: [
					/1ç/i,
					/2ç/i,
					/3ç/i,
					/4ç/i
				],
				wide: [
					/^(i|İ)lk çeyrek/i,
					/(i|İ)kinci çeyrek/i,
					/üçüncü çeyrek/i,
					/son çeyrek/i
				]
			},
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[oşmnhtaek]/i,
				abbreviated: /^(oca|şub|mar|nis|may|haz|tem|ağu|eyl|eki|kas|ara)/i,
				wide: /^(ocak|şubat|mart|nisan|mayıs|haziran|temmuz|ağustos|eylül|ekim|kasım|aralık)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^o/i,
					/^ş/i,
					/^m/i,
					/^n/i,
					/^m/i,
					/^h/i,
					/^t/i,
					/^a/i,
					/^e/i,
					/^e/i,
					/^k/i,
					/^a/i
				],
				any: [
					/^o/i,
					/^ş/i,
					/^mar/i,
					/^n/i,
					/^may/i,
					/^h/i,
					/^t/i,
					/^ağ/i,
					/^ey/i,
					/^ek/i,
					/^k/i,
					/^ar/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[psçc]/i,
				short: /^(pz|pt|sa|ça|pe|cu|ct)/i,
				abbreviated: /^(paz|pzt|sal|çar|per|cum|cts)/i,
				wide: /^(pazar(?!tesi)|pazartesi|salı|çarşamba|perşembe|cuma(?!rtesi)|cumartesi)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^p/i,
					/^p/i,
					/^s/i,
					/^ç/i,
					/^p/i,
					/^c/i,
					/^c/i
				],
				any: [
					/^pz/i,
					/^pt/i,
					/^sa/i,
					/^ça/i,
					/^pe/i,
					/^cu/i,
					/^ct/i
				],
				wide: [
					/^pazar(?!tesi)/i,
					/^pazartesi/i,
					/^salı/i,
					/^çarşamba/i,
					/^perşembe/i,
					/^cuma(?!rtesi)/i,
					/^cumartesi/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(öö|ös|gy|ö|sa|ös|ak|ge)/i,
				any: /^(ö\.?\s?[ös]\.?|öğleden sonra|gece yarısı|öğle|(sabah|öğ|akşam|gece)(leyin))/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^ö\.?ö\.?/i,
				pm: /^ö\.?s\.?/i,
				midnight: /^(gy|gece yarısı)/i,
				noon: /^öğ/i,
				morning: /^sa/i,
				afternoon: /^öğleden sonra/i,
				evening: /^ak/i,
				night: /^ge/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/ug/_lib/formatDistance.js
var formatDistanceLocale$7 = {
	lessThanXSeconds: {
		one: "بىر سىكۇنت ئىچىدە",
		other: "سىكۇنت ئىچىدە {{count}}"
	},
	xSeconds: {
		one: "بىر سىكۇنت",
		other: "سىكۇنت {{count}}"
	},
	halfAMinute: "يىرىم مىنۇت",
	lessThanXMinutes: {
		one: "بىر مىنۇت ئىچىدە",
		other: "مىنۇت ئىچىدە {{count}}"
	},
	xMinutes: {
		one: "بىر مىنۇت",
		other: "مىنۇت {{count}}"
	},
	aboutXHours: {
		one: "تەخمىنەن بىر سائەت",
		other: "سائەت {{count}} تەخمىنەن"
	},
	xHours: {
		one: "بىر سائەت",
		other: "سائەت {{count}}"
	},
	xDays: {
		one: "بىر كۈن",
		other: "كۈن {{count}}"
	},
	aboutXWeeks: {
		one: "تەخمىنەن بىرھەپتە",
		other: "ھەپتە {{count}} تەخمىنەن"
	},
	xWeeks: {
		one: "بىرھەپتە",
		other: "ھەپتە {{count}}"
	},
	aboutXMonths: {
		one: "تەخمىنەن بىر ئاي",
		other: "ئاي {{count}} تەخمىنەن"
	},
	xMonths: {
		one: "بىر ئاي",
		other: "ئاي {{count}}"
	},
	aboutXYears: {
		one: "تەخمىنەن بىر يىل",
		other: "يىل {{count}} تەخمىنەن"
	},
	xYears: {
		one: "بىر يىل",
		other: "يىل {{count}}"
	},
	overXYears: {
		one: "بىر يىلدىن ئارتۇق",
		other: "يىلدىن ئارتۇق {{count}}"
	},
	almostXYears: {
		one: "ئاساسەن بىر يىل",
		other: "يىل {{count}} ئاساسەن"
	}
};
var formatDistance$7 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$7[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return result;
	else return result + " بولدى";
	return result;
};
var formatLong$7 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, MMMM do, y",
			long: "MMMM do, y",
			medium: "MMM d, y",
			short: "MM/dd/yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "h:mm:ss a zzzz",
			long: "h:mm:ss a z",
			medium: "h:mm:ss a",
			short: "h:mm a"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'دە' {{time}}",
			long: "{{date}} 'دە' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/ug/_lib/formatRelative.js
var formatRelativeLocale$7 = {
	lastWeek: "'ئ‍ۆتكەن' eeee 'دە' p",
	yesterday: "'تۈنۈگۈن دە' p",
	today: "'بۈگۈن دە' p",
	tomorrow: "'ئەتە دە' p",
	nextWeek: "eeee 'دە' p",
	other: "P"
};
var formatRelative$7 = (token, _date, _baseDate, _options) => formatRelativeLocale$7[token];
//#endregion
//#region ../../node_modules/date-fns/locale/ug/_lib/localize.js
var eraValues$7 = {
	narrow: ["ب", "ك"],
	abbreviated: ["ب", "ك"],
	wide: ["مىيلادىدىن بۇرۇن", "مىيلادىدىن كىيىن"]
};
var quarterValues$7 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"1",
		"2",
		"3",
		"4"
	],
	wide: [
		"بىرىنجى چارەك",
		"ئىككىنجى چارەك",
		"ئۈچىنجى چارەك",
		"تۆتىنجى چارەك"
	]
};
var monthValues$7 = {
	narrow: [
		"ي",
		"ف",
		"م",
		"ا",
		"م",
		"ى",
		"ى",
		"ا",
		"س",
		"ۆ",
		"ن",
		"د"
	],
	abbreviated: [
		"يانۋار",
		"فېۋىرال",
		"مارت",
		"ئاپرىل",
		"ماي",
		"ئىيۇن",
		"ئىيول",
		"ئاۋغۇست",
		"سىنتەبىر",
		"ئۆكتەبىر",
		"نويابىر",
		"دىكابىر"
	],
	wide: [
		"يانۋار",
		"فېۋىرال",
		"مارت",
		"ئاپرىل",
		"ماي",
		"ئىيۇن",
		"ئىيول",
		"ئاۋغۇست",
		"سىنتەبىر",
		"ئۆكتەبىر",
		"نويابىر",
		"دىكابىر"
	]
};
var dayValues$7 = {
	narrow: [
		"ي",
		"د",
		"س",
		"چ",
		"پ",
		"ج",
		"ش"
	],
	short: [
		"ي",
		"د",
		"س",
		"چ",
		"پ",
		"ج",
		"ش"
	],
	abbreviated: [
		"يەكشەنبە",
		"دۈشەنبە",
		"سەيشەنبە",
		"چارشەنبە",
		"پەيشەنبە",
		"جۈمە",
		"شەنبە"
	],
	wide: [
		"يەكشەنبە",
		"دۈشەنبە",
		"سەيشەنبە",
		"چارشەنبە",
		"پەيشەنبە",
		"جۈمە",
		"شەنبە"
	]
};
var dayPeriodValues$7 = {
	narrow: {
		am: "ئە",
		pm: "چ",
		midnight: "ك",
		noon: "چ",
		morning: "ئەتىگەن",
		afternoon: "چۈشتىن كىيىن",
		evening: "ئاخشىم",
		night: "كىچە"
	},
	abbreviated: {
		am: "ئە",
		pm: "چ",
		midnight: "ك",
		noon: "چ",
		morning: "ئەتىگەن",
		afternoon: "چۈشتىن كىيىن",
		evening: "ئاخشىم",
		night: "كىچە"
	},
	wide: {
		am: "ئە",
		pm: "چ",
		midnight: "ك",
		noon: "چ",
		morning: "ئەتىگەن",
		afternoon: "چۈشتىن كىيىن",
		evening: "ئاخشىم",
		night: "كىچە"
	}
};
var formattingDayPeriodValues$7 = {
	narrow: {
		am: "ئە",
		pm: "چ",
		midnight: "ك",
		noon: "چ",
		morning: "ئەتىگەندە",
		afternoon: "چۈشتىن كىيىن",
		evening: "ئاخشامدا",
		night: "كىچىدە"
	},
	abbreviated: {
		am: "ئە",
		pm: "چ",
		midnight: "ك",
		noon: "چ",
		morning: "ئەتىگەندە",
		afternoon: "چۈشتىن كىيىن",
		evening: "ئاخشامدا",
		night: "كىچىدە"
	},
	wide: {
		am: "ئە",
		pm: "چ",
		midnight: "ك",
		noon: "چ",
		morning: "ئەتىگەندە",
		afternoon: "چۈشتىن كىيىن",
		evening: "ئاخشامدا",
		night: "كىچىدە"
	}
};
var ordinalNumber$7 = (dirtyNumber, _options) => {
	return String(dirtyNumber);
};
//#endregion
//#region ../../node_modules/date-fns/locale/ug.js
/**
* @category Locales
* @summary Uighur locale
* @language Uighur
* @iso-639-2 uig
* @author Abduwaly M. [@abduwaly](https://github.com/abduwaly)
*/
var ug = {
	code: "ug",
	formatDistance: formatDistance$7,
	formatLong: formatLong$7,
	formatRelative: formatRelative$7,
	localize: {
		ordinalNumber: ordinalNumber$7,
		era: buildLocalizeFn({
			values: eraValues$7,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$7,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$7,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$7,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$7,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$7,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(th|st|nd|rd)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(ب|ك)/i,
				wide: /^(مىيلادىدىن بۇرۇن|مىيلادىدىن كىيىن)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^بۇرۇن/i, /^كىيىن/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^چ[1234]/i,
				wide: /^چارەك [1234]/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[يفمئامئ‍ئاسۆند]/i,
				abbreviated: /^(يانۋار|فېۋىرال|مارت|ئاپرىل|ماي|ئىيۇن|ئىيول|ئاۋغۇست|سىنتەبىر|ئۆكتەبىر|نويابىر|دىكابىر)/i,
				wide: /^(يانۋار|فېۋىرال|مارت|ئاپرىل|ماي|ئىيۇن|ئىيول|ئاۋغۇست|سىنتەبىر|ئۆكتەبىر|نويابىر|دىكابىر)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ي/i,
					/^ف/i,
					/^م/i,
					/^ا/i,
					/^م/i,
					/^ى‍/i,
					/^ى‍/i,
					/^ا‍/i,
					/^س/i,
					/^ۆ/i,
					/^ن/i,
					/^د/i
				],
				any: [
					/^يان/i,
					/^فېۋ/i,
					/^مار/i,
					/^ئاپ/i,
					/^ماي/i,
					/^ئىيۇن/i,
					/^ئىيول/i,
					/^ئاۋ/i,
					/^سىن/i,
					/^ئۆك/i,
					/^نوي/i,
					/^دىك/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[دسچپجشي]/i,
				short: /^(يە|دۈ|سە|چا|پە|جۈ|شە)/i,
				abbreviated: /^(يە|دۈ|سە|چا|پە|جۈ|شە)/i,
				wide: /^(يەكشەنبە|دۈشەنبە|سەيشەنبە|چارشەنبە|پەيشەنبە|جۈمە|شەنبە)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^ي/i,
					/^د/i,
					/^س/i,
					/^چ/i,
					/^پ/i,
					/^ج/i,
					/^ش/i
				],
				any: [
					/^ي/i,
					/^د/i,
					/^س/i,
					/^چ/i,
					/^پ/i,
					/^ج/i,
					/^ش/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(ئە|چ|ك|چ|(دە|ئەتىگەن) ( ئە‍|چۈشتىن كىيىن|ئاخشىم|كىچە))/i,
				any: /^(ئە|چ|ك|چ|(دە|ئەتىگەن) ( ئە‍|چۈشتىن كىيىن|ئاخشىم|كىچە))/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^ئە/i,
				pm: /^چ/i,
				midnight: /^ك/i,
				noon: /^چ/i,
				morning: /ئەتىگەن/i,
				afternoon: /چۈشتىن كىيىن/i,
				evening: /ئاخشىم/i,
				night: /كىچە/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 0,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/uk/_lib/formatDistance.js
function declension(scheme, count) {
	if (scheme.one !== void 0 && count === 1) return scheme.one;
	const rem10 = count % 10;
	const rem100 = count % 100;
	if (rem10 === 1 && rem100 !== 11) return scheme.singularNominative.replace("{{count}}", String(count));
	else if (rem10 >= 2 && rem10 <= 4 && (rem100 < 10 || rem100 > 20)) return scheme.singularGenitive.replace("{{count}}", String(count));
	else return scheme.pluralGenitive.replace("{{count}}", String(count));
}
function buildLocalizeTokenFn(scheme) {
	return (count, options) => {
		if (options && options.addSuffix) if (options.comparison && options.comparison > 0) if (scheme.future) return declension(scheme.future, count);
		else return "за " + declension(scheme.regular, count);
		else if (scheme.past) return declension(scheme.past, count);
		else return declension(scheme.regular, count) + " тому";
		else return declension(scheme.regular, count);
	};
}
var halfAtMinute = (_, options) => {
	if (options && options.addSuffix) if (options.comparison && options.comparison > 0) return "за півхвилини";
	else return "півхвилини тому";
	return "півхвилини";
};
var formatDistanceLocale$6 = {
	lessThanXSeconds: buildLocalizeTokenFn({
		regular: {
			one: "менше секунди",
			singularNominative: "менше {{count}} секунди",
			singularGenitive: "менше {{count}} секунд",
			pluralGenitive: "менше {{count}} секунд"
		},
		future: {
			one: "менше, ніж за секунду",
			singularNominative: "менше, ніж за {{count}} секунду",
			singularGenitive: "менше, ніж за {{count}} секунди",
			pluralGenitive: "менше, ніж за {{count}} секунд"
		}
	}),
	xSeconds: buildLocalizeTokenFn({
		regular: {
			singularNominative: "{{count}} секунда",
			singularGenitive: "{{count}} секунди",
			pluralGenitive: "{{count}} секунд"
		},
		past: {
			singularNominative: "{{count}} секунду тому",
			singularGenitive: "{{count}} секунди тому",
			pluralGenitive: "{{count}} секунд тому"
		},
		future: {
			singularNominative: "за {{count}} секунду",
			singularGenitive: "за {{count}} секунди",
			pluralGenitive: "за {{count}} секунд"
		}
	}),
	halfAMinute: halfAtMinute,
	lessThanXMinutes: buildLocalizeTokenFn({
		regular: {
			one: "менше хвилини",
			singularNominative: "менше {{count}} хвилини",
			singularGenitive: "менше {{count}} хвилин",
			pluralGenitive: "менше {{count}} хвилин"
		},
		future: {
			one: "менше, ніж за хвилину",
			singularNominative: "менше, ніж за {{count}} хвилину",
			singularGenitive: "менше, ніж за {{count}} хвилини",
			pluralGenitive: "менше, ніж за {{count}} хвилин"
		}
	}),
	xMinutes: buildLocalizeTokenFn({
		regular: {
			singularNominative: "{{count}} хвилина",
			singularGenitive: "{{count}} хвилини",
			pluralGenitive: "{{count}} хвилин"
		},
		past: {
			singularNominative: "{{count}} хвилину тому",
			singularGenitive: "{{count}} хвилини тому",
			pluralGenitive: "{{count}} хвилин тому"
		},
		future: {
			singularNominative: "за {{count}} хвилину",
			singularGenitive: "за {{count}} хвилини",
			pluralGenitive: "за {{count}} хвилин"
		}
	}),
	aboutXHours: buildLocalizeTokenFn({
		regular: {
			singularNominative: "близько {{count}} години",
			singularGenitive: "близько {{count}} годин",
			pluralGenitive: "близько {{count}} годин"
		},
		future: {
			singularNominative: "приблизно за {{count}} годину",
			singularGenitive: "приблизно за {{count}} години",
			pluralGenitive: "приблизно за {{count}} годин"
		}
	}),
	xHours: buildLocalizeTokenFn({ regular: {
		singularNominative: "{{count}} годину",
		singularGenitive: "{{count}} години",
		pluralGenitive: "{{count}} годин"
	} }),
	xDays: buildLocalizeTokenFn({ regular: {
		singularNominative: "{{count}} день",
		singularGenitive: "{{count}} днi",
		pluralGenitive: "{{count}} днів"
	} }),
	aboutXWeeks: buildLocalizeTokenFn({
		regular: {
			singularNominative: "близько {{count}} тижня",
			singularGenitive: "близько {{count}} тижнів",
			pluralGenitive: "близько {{count}} тижнів"
		},
		future: {
			singularNominative: "приблизно за {{count}} тиждень",
			singularGenitive: "приблизно за {{count}} тижні",
			pluralGenitive: "приблизно за {{count}} тижнів"
		}
	}),
	xWeeks: buildLocalizeTokenFn({ regular: {
		singularNominative: "{{count}} тиждень",
		singularGenitive: "{{count}} тижні",
		pluralGenitive: "{{count}} тижнів"
	} }),
	aboutXMonths: buildLocalizeTokenFn({
		regular: {
			singularNominative: "близько {{count}} місяця",
			singularGenitive: "близько {{count}} місяців",
			pluralGenitive: "близько {{count}} місяців"
		},
		future: {
			singularNominative: "приблизно за {{count}} місяць",
			singularGenitive: "приблизно за {{count}} місяці",
			pluralGenitive: "приблизно за {{count}} місяців"
		}
	}),
	xMonths: buildLocalizeTokenFn({ regular: {
		singularNominative: "{{count}} місяць",
		singularGenitive: "{{count}} місяці",
		pluralGenitive: "{{count}} місяців"
	} }),
	aboutXYears: buildLocalizeTokenFn({
		regular: {
			singularNominative: "близько {{count}} року",
			singularGenitive: "близько {{count}} років",
			pluralGenitive: "близько {{count}} років"
		},
		future: {
			singularNominative: "приблизно за {{count}} рік",
			singularGenitive: "приблизно за {{count}} роки",
			pluralGenitive: "приблизно за {{count}} років"
		}
	}),
	xYears: buildLocalizeTokenFn({ regular: {
		singularNominative: "{{count}} рік",
		singularGenitive: "{{count}} роки",
		pluralGenitive: "{{count}} років"
	} }),
	overXYears: buildLocalizeTokenFn({
		regular: {
			singularNominative: "більше {{count}} року",
			singularGenitive: "більше {{count}} років",
			pluralGenitive: "більше {{count}} років"
		},
		future: {
			singularNominative: "більше, ніж за {{count}} рік",
			singularGenitive: "більше, ніж за {{count}} роки",
			pluralGenitive: "більше, ніж за {{count}} років"
		}
	}),
	almostXYears: buildLocalizeTokenFn({
		regular: {
			singularNominative: "майже {{count}} рік",
			singularGenitive: "майже {{count}} роки",
			pluralGenitive: "майже {{count}} років"
		},
		future: {
			singularNominative: "майже за {{count}} рік",
			singularGenitive: "майже за {{count}} роки",
			pluralGenitive: "майже за {{count}} років"
		}
	})
};
var formatDistance$6 = (token, count, options) => {
	options = options || {};
	return formatDistanceLocale$6[token](count, options);
};
var formatLong$6 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, do MMMM y 'р.'",
			long: "do MMMM y 'р.'",
			medium: "d MMM y 'р.'",
			short: "dd.MM.y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "H:mm:ss zzzz",
			long: "H:mm:ss z",
			medium: "H:mm:ss",
			short: "H:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} 'о' {{time}}",
			long: "{{date}} 'о' {{time}}",
			medium: "{{date}}, {{time}}",
			short: "{{date}}, {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/uk/_lib/formatRelative.js
var accusativeWeekdays = [
	"неділю",
	"понеділок",
	"вівторок",
	"середу",
	"четвер",
	"п’ятницю",
	"суботу"
];
function lastWeek(day) {
	const weekday = accusativeWeekdays[day];
	switch (day) {
		case 0:
		case 3:
		case 5:
		case 6: return "'у минулу " + weekday + " о' p";
		case 1:
		case 2:
		case 4: return "'у минулий " + weekday + " о' p";
	}
}
function thisWeek(day) {
	return "'у " + accusativeWeekdays[day] + " о' p";
}
function nextWeek(day) {
	const weekday = accusativeWeekdays[day];
	switch (day) {
		case 0:
		case 3:
		case 5:
		case 6: return "'у наступну " + weekday + " о' p";
		case 1:
		case 2:
		case 4: return "'у наступний " + weekday + " о' p";
	}
}
var lastWeekFormat = (dirtyDate, baseDate, options) => {
	const date = toDate$1(dirtyDate);
	const day = date.getDay();
	if (isSameWeek(date, baseDate, options)) return thisWeek(day);
	else return lastWeek(day);
};
var nextWeekFormat = (dirtyDate, baseDate, options) => {
	const date = toDate$1(dirtyDate);
	const day = date.getDay();
	if (isSameWeek(date, baseDate, options)) return thisWeek(day);
	else return nextWeek(day);
};
var formatRelativeLocale$6 = {
	lastWeek: lastWeekFormat,
	yesterday: "'вчора о' p",
	today: "'сьогодні о' p",
	tomorrow: "'завтра о' p",
	nextWeek: nextWeekFormat,
	other: "P"
};
var formatRelative$6 = (token, date, baseDate, options) => {
	const format = formatRelativeLocale$6[token];
	if (typeof format === "function") return format(date, baseDate, options);
	return format;
};
//#endregion
//#region ../../node_modules/date-fns/locale/uk/_lib/localize.js
var eraValues$6 = {
	narrow: ["до н.е.", "н.е."],
	abbreviated: ["до н. е.", "н. е."],
	wide: ["до нашої ери", "нашої ери"]
};
var quarterValues$6 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"1-й кв.",
		"2-й кв.",
		"3-й кв.",
		"4-й кв."
	],
	wide: [
		"1-й квартал",
		"2-й квартал",
		"3-й квартал",
		"4-й квартал"
	]
};
var monthValues$6 = {
	narrow: [
		"С",
		"Л",
		"Б",
		"К",
		"Т",
		"Ч",
		"Л",
		"С",
		"В",
		"Ж",
		"Л",
		"Г"
	],
	abbreviated: [
		"січ.",
		"лют.",
		"берез.",
		"квіт.",
		"трав.",
		"черв.",
		"лип.",
		"серп.",
		"верес.",
		"жовт.",
		"листоп.",
		"груд."
	],
	wide: [
		"січень",
		"лютий",
		"березень",
		"квітень",
		"травень",
		"червень",
		"липень",
		"серпень",
		"вересень",
		"жовтень",
		"листопад",
		"грудень"
	]
};
var formattingMonthValues$1 = {
	narrow: [
		"С",
		"Л",
		"Б",
		"К",
		"Т",
		"Ч",
		"Л",
		"С",
		"В",
		"Ж",
		"Л",
		"Г"
	],
	abbreviated: [
		"січ.",
		"лют.",
		"берез.",
		"квіт.",
		"трав.",
		"черв.",
		"лип.",
		"серп.",
		"верес.",
		"жовт.",
		"листоп.",
		"груд."
	],
	wide: [
		"січня",
		"лютого",
		"березня",
		"квітня",
		"травня",
		"червня",
		"липня",
		"серпня",
		"вересня",
		"жовтня",
		"листопада",
		"грудня"
	]
};
var dayValues$6 = {
	narrow: [
		"Н",
		"П",
		"В",
		"С",
		"Ч",
		"П",
		"С"
	],
	short: [
		"нд",
		"пн",
		"вт",
		"ср",
		"чт",
		"пт",
		"сб"
	],
	abbreviated: [
		"нед",
		"пон",
		"вів",
		"сер",
		"чтв",
		"птн",
		"суб"
	],
	wide: [
		"неділя",
		"понеділок",
		"вівторок",
		"середа",
		"четвер",
		"п’ятниця",
		"субота"
	]
};
var dayPeriodValues$6 = {
	narrow: {
		am: "ДП",
		pm: "ПП",
		midnight: "півн.",
		noon: "пол.",
		morning: "ранок",
		afternoon: "день",
		evening: "веч.",
		night: "ніч"
	},
	abbreviated: {
		am: "ДП",
		pm: "ПП",
		midnight: "півн.",
		noon: "пол.",
		morning: "ранок",
		afternoon: "день",
		evening: "веч.",
		night: "ніч"
	},
	wide: {
		am: "ДП",
		pm: "ПП",
		midnight: "північ",
		noon: "полудень",
		morning: "ранок",
		afternoon: "день",
		evening: "вечір",
		night: "ніч"
	}
};
var formattingDayPeriodValues$6 = {
	narrow: {
		am: "ДП",
		pm: "ПП",
		midnight: "півн.",
		noon: "пол.",
		morning: "ранку",
		afternoon: "дня",
		evening: "веч.",
		night: "ночі"
	},
	abbreviated: {
		am: "ДП",
		pm: "ПП",
		midnight: "півн.",
		noon: "пол.",
		morning: "ранку",
		afternoon: "дня",
		evening: "веч.",
		night: "ночі"
	},
	wide: {
		am: "ДП",
		pm: "ПП",
		midnight: "північ",
		noon: "полудень",
		morning: "ранку",
		afternoon: "дня",
		evening: "веч.",
		night: "ночі"
	}
};
var ordinalNumber$6 = (dirtyNumber, options) => {
	const unit = String(options?.unit);
	const number = Number(dirtyNumber);
	let suffix;
	if (unit === "date") if (number === 3 || number === 23) suffix = "-є";
	else suffix = "-е";
	else if (unit === "minute" || unit === "second" || unit === "hour") suffix = "-а";
	else suffix = "-й";
	return number + suffix;
};
//#endregion
//#region ../../node_modules/date-fns/locale/uk.js
/**
* @category Locales
* @summary Ukrainian locale.
* @language Ukrainian
* @iso-639-2 ukr
* @author Andrii Korzh [@korzhyk](https://github.com/korzhyk)
* @author Andriy Shcherbyak [@shcherbyakdev](https://github.com/shcherbyakdev)
*/
var uk = {
	code: "uk",
	formatDistance: formatDistance$6,
	formatLong: formatLong$6,
	formatRelative: formatRelative$6,
	localize: {
		ordinalNumber: ordinalNumber$6,
		era: buildLocalizeFn({
			values: eraValues$6,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$6,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$6,
			defaultWidth: "wide",
			formattingValues: formattingMonthValues$1,
			defaultFormattingWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$6,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$6,
			defaultWidth: "any",
			formattingValues: formattingDayPeriodValues$6,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(-?(е|й|є|а|я))?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^((до )?н\.?\s?е\.?)/i,
				abbreviated: /^((до )?н\.?\s?е\.?)/i,
				wide: /^(до нашої ери|нашої ери|наша ера)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^д/i, /^н/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^[1234](-?[иі]?й?)? кв.?/i,
				wide: /^[1234](-?[иі]?й?)? квартал/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[слбктчвжг]/i,
				abbreviated: /^(січ|лют|бер(ез)?|квіт|трав|черв|лип|серп|вер(ес)?|жовт|лис(топ)?|груд)\.?/i,
				wide: /^(січень|січня|лютий|лютого|березень|березня|квітень|квітня|травень|травня|червня|червень|липень|липня|серпень|серпня|вересень|вересня|жовтень|жовтня|листопад[а]?|грудень|грудня)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^с/i,
					/^л/i,
					/^б/i,
					/^к/i,
					/^т/i,
					/^ч/i,
					/^л/i,
					/^с/i,
					/^в/i,
					/^ж/i,
					/^л/i,
					/^г/i
				],
				any: [
					/^сі/i,
					/^лю/i,
					/^б/i,
					/^к/i,
					/^т/i,
					/^ч/i,
					/^лип/i,
					/^се/i,
					/^в/i,
					/^ж/i,
					/^лис/i,
					/^г/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[нпвсч]/i,
				short: /^(нд|пн|вт|ср|чт|пт|сб)\.?/i,
				abbreviated: /^(нед|пон|вів|сер|че?тв|птн?|суб)\.?/i,
				wide: /^(неділ[яі]|понеділ[ок][ка]|вівтор[ок][ка]|серед[аи]|четвер(га)?|п\W*?ятниц[яі]|субот[аи])/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^н/i,
					/^п/i,
					/^в/i,
					/^с/i,
					/^ч/i,
					/^п/i,
					/^с/i
				],
				any: [
					/^н/i,
					/^п[он]/i,
					/^в/i,
					/^с[ер]/i,
					/^ч/i,
					/^п\W*?[ят]/i,
					/^с[уб]/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^([дп]п|півн\.?|пол\.?|ранок|ранку|день|дня|веч\.?|ніч|ночі)/i,
				abbreviated: /^([дп]п|півн\.?|пол\.?|ранок|ранку|день|дня|веч\.?|ніч|ночі)/i,
				wide: /^([дп]п|північ|полудень|ранок|ранку|день|дня|вечір|вечора|ніч|ночі)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: {
				am: /^дп/i,
				pm: /^пп/i,
				midnight: /^півн/i,
				noon: /^пол/i,
				morning: /^р/i,
				afternoon: /^д[ен]/i,
				evening: /^в/i,
				night: /^н/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/uz/_lib/formatDistance.js
var formatDistanceLocale$5 = {
	lessThanXSeconds: {
		one: "sekunddan kam",
		other: "{{count}} sekunddan kam"
	},
	xSeconds: {
		one: "1 sekund",
		other: "{{count}} sekund"
	},
	halfAMinute: "yarim minut",
	lessThanXMinutes: {
		one: "bir minutdan kam",
		other: "{{count}} minutdan kam"
	},
	xMinutes: {
		one: "1 minut",
		other: "{{count}} minut"
	},
	aboutXHours: {
		one: "tahminan 1 soat",
		other: "tahminan {{count}} soat"
	},
	xHours: {
		one: "1 soat",
		other: "{{count}} soat"
	},
	xDays: {
		one: "1 kun",
		other: "{{count}} kun"
	},
	aboutXWeeks: {
		one: "tahminan 1 hafta",
		other: "tahminan {{count}} hafta"
	},
	xWeeks: {
		one: "1 hafta",
		other: "{{count}} hafta"
	},
	aboutXMonths: {
		one: "tahminan 1 oy",
		other: "tahminan {{count}} oy"
	},
	xMonths: {
		one: "1 oy",
		other: "{{count}} oy"
	},
	aboutXYears: {
		one: "tahminan 1 yil",
		other: "tahminan {{count}} yil"
	},
	xYears: {
		one: "1 yil",
		other: "{{count}} yil"
	},
	overXYears: {
		one: "1 yildan ko'p",
		other: "{{count}} yildan ko'p"
	},
	almostXYears: {
		one: "deyarli 1 yil",
		other: "deyarli {{count}} yil"
	}
};
var formatDistance$5 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$5[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return result + " dan keyin";
	else return result + " oldin";
	return result;
};
var formatLong$5 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, do MMMM, y",
			long: "do MMMM, y",
			medium: "d MMM, y",
			short: "dd/MM/yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "h:mm:ss zzzz",
			long: "h:mm:ss z",
			medium: "h:mm:ss",
			short: "h:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: { any: "{{date}}, {{time}}" },
		defaultWidth: "any"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/uz/_lib/formatRelative.js
var formatRelativeLocale$5 = {
	lastWeek: "'oldingi' eeee p 'da'",
	yesterday: "'kecha' p 'da'",
	today: "'bugun' p 'da'",
	tomorrow: "'ertaga' p 'da'",
	nextWeek: "eeee p 'da'",
	other: "P"
};
var formatRelative$5 = (token, _date, _baseDate, _options) => formatRelativeLocale$5[token];
//#endregion
//#region ../../node_modules/date-fns/locale/uz/_lib/localize.js
var eraValues$5 = {
	narrow: ["M.A", "M."],
	abbreviated: ["M.A", "M."],
	wide: ["Miloddan Avvalgi", "Milodiy"]
};
var quarterValues$5 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"CH.1",
		"CH.2",
		"CH.3",
		"CH.4"
	],
	wide: [
		"1-chi chorak",
		"2-chi chorak",
		"3-chi chorak",
		"4-chi chorak"
	]
};
var monthValues$5 = {
	narrow: [
		"Y",
		"F",
		"M",
		"A",
		"M",
		"I",
		"I",
		"A",
		"S",
		"O",
		"N",
		"D"
	],
	abbreviated: [
		"Yan",
		"Fev",
		"Mar",
		"Apr",
		"May",
		"Iyun",
		"Iyul",
		"Avg",
		"Sen",
		"Okt",
		"Noy",
		"Dek"
	],
	wide: [
		"Yanvar",
		"Fevral",
		"Mart",
		"Aprel",
		"May",
		"Iyun",
		"Iyul",
		"Avgust",
		"Sentabr",
		"Oktabr",
		"Noyabr",
		"Dekabr"
	]
};
var dayValues$5 = {
	narrow: [
		"Y",
		"D",
		"S",
		"CH",
		"P",
		"J",
		"SH"
	],
	short: [
		"Ya",
		"Du",
		"Se",
		"Cho",
		"Pa",
		"Ju",
		"Sha"
	],
	abbreviated: [
		"Yak",
		"Dush",
		"Sesh",
		"Chor",
		"Pay",
		"Jum",
		"Shan"
	],
	wide: [
		"Yakshanba",
		"Dushanba",
		"Seshanba",
		"Chorshanba",
		"Payshanba",
		"Juma",
		"Shanba"
	]
};
var dayPeriodValues$5 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "y.t",
		noon: "p.",
		morning: "ertalab",
		afternoon: "tushdan keyin",
		evening: "kechqurun",
		night: "tun"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "yarim tun",
		noon: "peshin",
		morning: "ertalab",
		afternoon: "tushdan keyin",
		evening: "kechqurun",
		night: "tun"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "yarim tun",
		noon: "peshin",
		morning: "ertalab",
		afternoon: "tushdan keyin",
		evening: "kechqurun",
		night: "tun"
	}
};
var formattingDayPeriodValues$5 = {
	narrow: {
		am: "a",
		pm: "p",
		midnight: "y.t",
		noon: "p.",
		morning: "ertalab",
		afternoon: "tushdan keyin",
		evening: "kechqurun",
		night: "tun"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "yarim tun",
		noon: "peshin",
		morning: "ertalab",
		afternoon: "tushdan keyin",
		evening: "kechqurun",
		night: "tun"
	},
	wide: {
		am: "a.m.",
		pm: "p.m.",
		midnight: "yarim tun",
		noon: "peshin",
		morning: "ertalab",
		afternoon: "tushdan keyin",
		evening: "kechqurun",
		night: "tun"
	}
};
var ordinalNumber$5 = (dirtyNumber, _options) => {
	return String(dirtyNumber);
};
//#endregion
//#region ../../node_modules/date-fns/locale/uz.js
/**
* @category Locales
* @summary Uzbek locale.
* @language Uzbek
* @iso-639-2 uzb
* @author Mukhammadali [@mukhammadali](https://github.com/Mukhammadali)
*/
var uz = {
	code: "uz",
	formatDistance: formatDistance$5,
	formatLong: formatLong$5,
	formatRelative: formatRelative$5,
	localize: {
		ordinalNumber: ordinalNumber$5,
		era: buildLocalizeFn({
			values: eraValues$5,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$5,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$5,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$5,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$5,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$5,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(chi)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(m\.a|m\.)/i,
				abbreviated: /^(m\.a\.?\s?m\.?)/i,
				wide: /^(miloddan avval|miloddan keyin)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^b/i, /^(a|c)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^q[1234]/i,
				wide: /^[1234](chi)? chorak/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[yfmasond]/i,
				abbreviated: /^(yan|fev|mar|apr|may|iyun|iyul|avg|sen|okt|noy|dek)/i,
				wide: /^(yanvar|fevral|mart|aprel|may|iyun|iyul|avgust|sentabr|oktabr|noyabr|dekabr)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^y/i,
					/^f/i,
					/^m/i,
					/^a/i,
					/^m/i,
					/^i/i,
					/^i/i,
					/^a/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				],
				any: [
					/^ya/i,
					/^f/i,
					/^mar/i,
					/^ap/i,
					/^may/i,
					/^iyun/i,
					/^iyul/i,
					/^av/i,
					/^s/i,
					/^o/i,
					/^n/i,
					/^d/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[ydschj]/i,
				short: /^(ya|du|se|cho|pa|ju|sha)/i,
				abbreviated: /^(yak|dush|sesh|chor|pay|jum|shan)/i,
				wide: /^(yakshanba|dushanba|seshanba|chorshanba|payshanba|juma|shanba)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^y/i,
					/^d/i,
					/^s/i,
					/^ch/i,
					/^p/i,
					/^j/i,
					/^sh/i
				],
				any: [
					/^ya/i,
					/^d/i,
					/^se/i,
					/^ch/i,
					/^p/i,
					/^j/i,
					/^sh/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(a|p|y\.t|p| (ertalab|tushdan keyin|kechqurun|tun))/i,
				any: /^([ap]\.?\s?m\.?|yarim tun|peshin| (ertalab|tushdan keyin|kechqurun|tun))/i
			},
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^a/i,
				pm: /^p/i,
				midnight: /^y\.t/i,
				noon: /^pe/i,
				morning: /ertalab/i,
				afternoon: /tushdan keyin/i,
				evening: /kechqurun/i,
				night: /tun/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/uz-Cyrl/_lib/formatDistance.js
var formatDistanceLocale$4 = {
	lessThanXSeconds: {
		one: "1 сониядан кам",
		other: "{{count}} сониядан кам"
	},
	xSeconds: {
		one: "1 сония",
		other: "{{count}} сония"
	},
	halfAMinute: "ярим дақиқа",
	lessThanXMinutes: {
		one: "1 дақиқадан кам",
		other: "{{count}} дақиқадан кам"
	},
	xMinutes: {
		one: "1 дақиқа",
		other: "{{count}} дақиқа"
	},
	aboutXHours: {
		one: "тахминан 1 соат",
		other: "тахминан {{count}} соат"
	},
	xHours: {
		one: "1 соат",
		other: "{{count}} соат"
	},
	xDays: {
		one: "1 кун",
		other: "{{count}} кун"
	},
	aboutXWeeks: {
		one: "тахминан 1 хафта",
		other: "тахминан {{count}} хафта"
	},
	xWeeks: {
		one: "1 хафта",
		other: "{{count}} хафта"
	},
	aboutXMonths: {
		one: "тахминан 1 ой",
		other: "тахминан {{count}} ой"
	},
	xMonths: {
		one: "1 ой",
		other: "{{count}} ой"
	},
	aboutXYears: {
		one: "тахминан 1 йил",
		other: "тахминан {{count}} йил"
	},
	xYears: {
		one: "1 йил",
		other: "{{count}} йил"
	},
	overXYears: {
		one: "1 йилдан кўп",
		other: "{{count}} йилдан кўп"
	},
	almostXYears: {
		one: "деярли 1 йил",
		other: "деярли {{count}} йил"
	}
};
var formatDistance$4 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$4[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return result + "дан кейин";
	else return result + " олдин";
	return result;
};
var formatLong$4 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, do MMMM, y",
			long: "do MMMM, y",
			medium: "d MMM, y",
			short: "dd/MM/yyyy"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "H:mm:ss zzzz",
			long: "H:mm:ss z",
			medium: "H:mm:ss",
			short: "H:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: { any: "{{date}}, {{time}}" },
		defaultWidth: "any"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/uz-Cyrl/_lib/formatRelative.js
var formatRelativeLocale$4 = {
	lastWeek: "'ўтган' eeee p 'да'",
	yesterday: "'кеча' p 'да'",
	today: "'бугун' p 'да'",
	tomorrow: "'эртага' p 'да'",
	nextWeek: "eeee p 'да'",
	other: "P"
};
var formatRelative$4 = (token, _date, _baseDate, _options) => formatRelativeLocale$4[token];
//#endregion
//#region ../../node_modules/date-fns/locale/uz-Cyrl/_lib/localize.js
var eraValues$4 = {
	narrow: ["М.А", "М"],
	abbreviated: ["М.А", "М"],
	wide: ["Милоддан Аввалги", "Милодий"]
};
var quarterValues$4 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"1-чор.",
		"2-чор.",
		"3-чор.",
		"4-чор."
	],
	wide: [
		"1-чорак",
		"2-чорак",
		"3-чорак",
		"4-чорак"
	]
};
var monthValues$4 = {
	narrow: [
		"Я",
		"Ф",
		"М",
		"А",
		"М",
		"И",
		"И",
		"А",
		"С",
		"О",
		"Н",
		"Д"
	],
	abbreviated: [
		"янв",
		"фев",
		"мар",
		"апр",
		"май",
		"июн",
		"июл",
		"авг",
		"сен",
		"окт",
		"ноя",
		"дек"
	],
	wide: [
		"январ",
		"феврал",
		"март",
		"апрел",
		"май",
		"июн",
		"июл",
		"август",
		"сентабр",
		"октабр",
		"ноябр",
		"декабр"
	]
};
var dayValues$4 = {
	narrow: [
		"Я",
		"Д",
		"С",
		"Ч",
		"П",
		"Ж",
		"Ш"
	],
	short: [
		"як",
		"ду",
		"се",
		"чо",
		"па",
		"жу",
		"ша"
	],
	abbreviated: [
		"якш",
		"душ",
		"сеш",
		"чор",
		"пай",
		"жум",
		"шан"
	],
	wide: [
		"якшанба",
		"душанба",
		"сешанба",
		"чоршанба",
		"пайшанба",
		"жума",
		"шанба"
	]
};
var dayPeriodValues$4 = { any: {
	am: "П.О.",
	pm: "П.К.",
	midnight: "ярим тун",
	noon: "пешин",
	morning: "эрталаб",
	afternoon: "пешиндан кейин",
	evening: "кечаси",
	night: "тун"
} };
var formattingDayPeriodValues$4 = { any: {
	am: "П.О.",
	pm: "П.К.",
	midnight: "ярим тун",
	noon: "пешин",
	morning: "эрталаб",
	afternoon: "пешиндан кейин",
	evening: "кечаси",
	night: "тун"
} };
var ordinalNumber$4 = (dirtyNumber, _options) => {
	return String(dirtyNumber);
};
//#endregion
//#region ../../node_modules/date-fns/locale/uz-Cyrl.js
/**
* @category Locales
* @summary Uzbek Cyrillic locale.
* @language Uzbek
* @iso-639-2 uzb
* @author Kamronbek Shodmonov [@kamronbek28](https://github.com/kamronbek28)
*/
var uzCyrl = {
	code: "uz-Cyrl",
	formatDistance: formatDistance$4,
	formatLong: formatLong$4,
	formatRelative: formatRelative$4,
	localize: {
		ordinalNumber: ordinalNumber$4,
		era: buildLocalizeFn({
			values: eraValues$4,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$4,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$4,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$4,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$4,
			defaultWidth: "any",
			formattingValues: formattingDayPeriodValues$4,
			defaultFormattingWidth: "any"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)(чи)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(м\.а|м\.)/i,
				abbreviated: /^(м\.а|м\.)/i,
				wide: /^(милоддан аввал|милоддан кейин)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^м/i, /^а/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^[1234]-чор./i,
				wide: /^[1234]-чорак/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/1/i,
				/2/i,
				/3/i,
				/4/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^[яфмамииасонд]/i,
				abbreviated: /^(янв|фев|мар|апр|май|июн|июл|авг|сен|окт|ноя|дек)/i,
				wide: /^(январ|феврал|март|апрел|май|июн|июл|август|сентабр|октабр|ноябр|декабр)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^я/i,
					/^ф/i,
					/^м/i,
					/^а/i,
					/^м/i,
					/^и/i,
					/^и/i,
					/^а/i,
					/^с/i,
					/^о/i,
					/^н/i,
					/^д/i
				],
				any: [
					/^я/i,
					/^ф/i,
					/^мар/i,
					/^ап/i,
					/^май/i,
					/^июн/i,
					/^июл/i,
					/^ав/i,
					/^с/i,
					/^о/i,
					/^н/i,
					/^д/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[ядсчпжш]/i,
				short: /^(як|ду|се|чо|па|жу|ша)/i,
				abbreviated: /^(якш|душ|сеш|чор|пай|жум|шан)/i,
				wide: /^(якшанба|душанба|сешанба|чоршанба|пайшанба|жума|шанба)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^я/i,
					/^д/i,
					/^с/i,
					/^ч/i,
					/^п/i,
					/^ж/i,
					/^ш/i
				],
				any: [
					/^як/i,
					/^ду/i,
					/^се/i,
					/^чор/i,
					/^пай/i,
					/^жу/i,
					/^шан/i
				]
			},
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: { any: /^(п\.о\.|п\.к\.|ярим тун|пешиндан кейин|(эрталаб|пешиндан кейин|кечаси|тун))/i },
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^п\.о\./i,
				pm: /^п\.к\./i,
				midnight: /^ярим тун/i,
				noon: /^пешиндан кейин/i,
				morning: /эрталаб/i,
				afternoon: /пешиндан кейин/i,
				evening: /кечаси/i,
				night: /тун/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/vi/_lib/formatDistance.js
var formatDistanceLocale$3 = {
	lessThanXSeconds: {
		one: "dưới 1 giây",
		other: "dưới {{count}} giây"
	},
	xSeconds: {
		one: "1 giây",
		other: "{{count}} giây"
	},
	halfAMinute: "nửa phút",
	lessThanXMinutes: {
		one: "dưới 1 phút",
		other: "dưới {{count}} phút"
	},
	xMinutes: {
		one: "1 phút",
		other: "{{count}} phút"
	},
	aboutXHours: {
		one: "khoảng 1 giờ",
		other: "khoảng {{count}} giờ"
	},
	xHours: {
		one: "1 giờ",
		other: "{{count}} giờ"
	},
	xDays: {
		one: "1 ngày",
		other: "{{count}} ngày"
	},
	aboutXWeeks: {
		one: "khoảng 1 tuần",
		other: "khoảng {{count}} tuần"
	},
	xWeeks: {
		one: "1 tuần",
		other: "{{count}} tuần"
	},
	aboutXMonths: {
		one: "khoảng 1 tháng",
		other: "khoảng {{count}} tháng"
	},
	xMonths: {
		one: "1 tháng",
		other: "{{count}} tháng"
	},
	aboutXYears: {
		one: "khoảng 1 năm",
		other: "khoảng {{count}} năm"
	},
	xYears: {
		one: "1 năm",
		other: "{{count}} năm"
	},
	overXYears: {
		one: "hơn 1 năm",
		other: "hơn {{count}} năm"
	},
	almostXYears: {
		one: "gần 1 năm",
		other: "gần {{count}} năm"
	}
};
var formatDistance$3 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$3[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return result + " nữa";
	else return result + " trước";
	return result;
};
var formatLong$3 = {
	date: buildFormatLongFn({
		formats: {
			full: "EEEE, 'ngày' d MMMM 'năm' y",
			long: "'ngày' d MMMM 'năm' y",
			medium: "d MMM 'năm' y",
			short: "dd/MM/y"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "HH:mm:ss zzzz",
			long: "HH:mm:ss z",
			medium: "HH:mm:ss",
			short: "HH:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} {{time}}",
			long: "{{date}} {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/vi/_lib/formatRelative.js
var formatRelativeLocale$3 = {
	lastWeek: "eeee 'tuần trước vào lúc' p",
	yesterday: "'hôm qua vào lúc' p",
	today: "'hôm nay vào lúc' p",
	tomorrow: "'ngày mai vào lúc' p",
	nextWeek: "eeee 'tới vào lúc' p",
	other: "P"
};
var formatRelative$3 = (token, _date, _baseDate, _options) => formatRelativeLocale$3[token];
//#endregion
//#region ../../node_modules/date-fns/locale/vi/_lib/localize.js
var eraValues$3 = {
	narrow: ["TCN", "SCN"],
	abbreviated: ["trước CN", "sau CN"],
	wide: ["trước Công Nguyên", "sau Công Nguyên"]
};
var quarterValues$3 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"Q1",
		"Q2",
		"Q3",
		"Q4"
	],
	wide: [
		"Quý 1",
		"Quý 2",
		"Quý 3",
		"Quý 4"
	]
};
var formattingQuarterValues = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"Q1",
		"Q2",
		"Q3",
		"Q4"
	],
	wide: [
		"quý I",
		"quý II",
		"quý III",
		"quý IV"
	]
};
var monthValues$3 = {
	narrow: [
		"1",
		"2",
		"3",
		"4",
		"5",
		"6",
		"7",
		"8",
		"9",
		"10",
		"11",
		"12"
	],
	abbreviated: [
		"Thg 1",
		"Thg 2",
		"Thg 3",
		"Thg 4",
		"Thg 5",
		"Thg 6",
		"Thg 7",
		"Thg 8",
		"Thg 9",
		"Thg 10",
		"Thg 11",
		"Thg 12"
	],
	wide: [
		"Tháng Một",
		"Tháng Hai",
		"Tháng Ba",
		"Tháng Tư",
		"Tháng Năm",
		"Tháng Sáu",
		"Tháng Bảy",
		"Tháng Tám",
		"Tháng Chín",
		"Tháng Mười",
		"Tháng Mười Một",
		"Tháng Mười Hai"
	]
};
var formattingMonthValues = {
	narrow: [
		"01",
		"02",
		"03",
		"04",
		"05",
		"06",
		"07",
		"08",
		"09",
		"10",
		"11",
		"12"
	],
	abbreviated: [
		"thg 1",
		"thg 2",
		"thg 3",
		"thg 4",
		"thg 5",
		"thg 6",
		"thg 7",
		"thg 8",
		"thg 9",
		"thg 10",
		"thg 11",
		"thg 12"
	],
	wide: [
		"tháng 01",
		"tháng 02",
		"tháng 03",
		"tháng 04",
		"tháng 05",
		"tháng 06",
		"tháng 07",
		"tháng 08",
		"tháng 09",
		"tháng 10",
		"tháng 11",
		"tháng 12"
	]
};
var dayValues$3 = {
	narrow: [
		"CN",
		"T2",
		"T3",
		"T4",
		"T5",
		"T6",
		"T7"
	],
	short: [
		"CN",
		"Th 2",
		"Th 3",
		"Th 4",
		"Th 5",
		"Th 6",
		"Th 7"
	],
	abbreviated: [
		"CN",
		"Thứ 2",
		"Thứ 3",
		"Thứ 4",
		"Thứ 5",
		"Thứ 6",
		"Thứ 7"
	],
	wide: [
		"Chủ Nhật",
		"Thứ Hai",
		"Thứ Ba",
		"Thứ Tư",
		"Thứ Năm",
		"Thứ Sáu",
		"Thứ Bảy"
	]
};
var dayPeriodValues$3 = {
	narrow: {
		am: "am",
		pm: "pm",
		midnight: "nửa đêm",
		noon: "tr",
		morning: "sg",
		afternoon: "ch",
		evening: "tối",
		night: "đêm"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "nửa đêm",
		noon: "trưa",
		morning: "sáng",
		afternoon: "chiều",
		evening: "tối",
		night: "đêm"
	},
	wide: {
		am: "SA",
		pm: "CH",
		midnight: "nửa đêm",
		noon: "trưa",
		morning: "sáng",
		afternoon: "chiều",
		evening: "tối",
		night: "đêm"
	}
};
var formattingDayPeriodValues$3 = {
	narrow: {
		am: "am",
		pm: "pm",
		midnight: "nửa đêm",
		noon: "tr",
		morning: "sg",
		afternoon: "ch",
		evening: "tối",
		night: "đêm"
	},
	abbreviated: {
		am: "AM",
		pm: "PM",
		midnight: "nửa đêm",
		noon: "trưa",
		morning: "sáng",
		afternoon: "chiều",
		evening: "tối",
		night: "đêm"
	},
	wide: {
		am: "SA",
		pm: "CH",
		midnight: "nửa đêm",
		noon: "giữa trưa",
		morning: "vào buổi sáng",
		afternoon: "vào buổi chiều",
		evening: "vào buổi tối",
		night: "vào ban đêm"
	}
};
var ordinalNumber$3 = (dirtyNumber, options) => {
	const number = Number(dirtyNumber);
	const unit = options?.unit;
	if (unit === "quarter") switch (number) {
		case 1: return "I";
		case 2: return "II";
		case 3: return "III";
		case 4: return "IV";
	}
	else if (unit === "day") switch (number) {
		case 1: return "thứ 2";
		case 2: return "thứ 3";
		case 3: return "thứ 4";
		case 4: return "thứ 5";
		case 5: return "thứ 6";
		case 6: return "thứ 7";
		case 7: return "chủ nhật";
	}
	else if (unit === "week") if (number === 1) return "thứ nhất";
	else return "thứ " + number;
	else if (unit === "dayOfYear") if (number === 1) return "đầu tiên";
	else return "thứ " + number;
	return String(number);
};
//#endregion
//#region ../../node_modules/date-fns/locale/vi.js
/**
* @category Locales
* @summary Vietnamese locale (Vietnam).
* @language Vietnamese
* @iso-639-2 vie
* @author Thanh Tran [@trongthanh](https://github.com/trongthanh)
* @author Leroy Hopson [@lihop](https://github.com/lihop)
*/
var vi = {
	code: "vi",
	formatDistance: formatDistance$3,
	formatLong: formatLong$3,
	formatRelative: formatRelative$3,
	localize: {
		ordinalNumber: ordinalNumber$3,
		era: buildLocalizeFn({
			values: eraValues$3,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$3,
			defaultWidth: "wide",
			formattingValues: formattingQuarterValues,
			defaultFormattingWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$3,
			defaultWidth: "wide",
			formattingValues: formattingMonthValues,
			defaultFormattingWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$3,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$3,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$3,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(\d+)/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(tcn|scn)/i,
				abbreviated: /^(trước CN|sau CN)/i,
				wide: /^(trước Công Nguyên|sau Công Nguyên)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^t/i, /^s/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^([1234]|i{1,3}v?)/i,
				abbreviated: /^q([1234]|i{1,3}v?)/i,
				wide: /^quý ([1234]|i{1,3}v?)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/(1|i)$/i,
				/(2|ii)$/i,
				/(3|iii)$/i,
				/(4|iv)$/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^(0?[2-9]|10|11|12|0?1)/i,
				abbreviated: /^thg[ _]?(0?[1-9](?!\d)|10|11|12)/i,
				wide: /^tháng ?(Một|Hai|Ba|Tư|Năm|Sáu|Bảy|Tám|Chín|Mười|Mười ?Một|Mười ?Hai|0?[1-9](?!\d)|10|11|12)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/0?1$/i,
					/0?2/i,
					/3/,
					/4/,
					/5/,
					/6/,
					/7/,
					/8/,
					/9/,
					/10/,
					/11/,
					/12/
				],
				abbreviated: [
					/^thg[ _]?0?1(?!\d)/i,
					/^thg[ _]?0?2/i,
					/^thg[ _]?0?3/i,
					/^thg[ _]?0?4/i,
					/^thg[ _]?0?5/i,
					/^thg[ _]?0?6/i,
					/^thg[ _]?0?7/i,
					/^thg[ _]?0?8/i,
					/^thg[ _]?0?9/i,
					/^thg[ _]?10/i,
					/^thg[ _]?11/i,
					/^thg[ _]?12/i
				],
				wide: [
					/^tháng ?(Một|0?1(?!\d))/i,
					/^tháng ?(Hai|0?2)/i,
					/^tháng ?(Ba|0?3)/i,
					/^tháng ?(Tư|0?4)/i,
					/^tháng ?(Năm|0?5)/i,
					/^tháng ?(Sáu|0?6)/i,
					/^tháng ?(Bảy|0?7)/i,
					/^tháng ?(Tám|0?8)/i,
					/^tháng ?(Chín|0?9)/i,
					/^tháng ?(Mười|10)/i,
					/^tháng ?(Mười ?Một|11)/i,
					/^tháng ?(Mười ?Hai|12)/i
				]
			},
			defaultParseWidth: "wide"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^(CN|T2|T3|T4|T5|T6|T7)/i,
				short: /^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,
				abbreviated: /^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,
				wide: /^(Chủ ?Nhật|Chúa ?Nhật|thứ ?Hai|thứ ?Ba|thứ ?Tư|thứ ?Năm|thứ ?Sáu|thứ ?Bảy)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/CN/i,
					/2/i,
					/3/i,
					/4/i,
					/5/i,
					/6/i,
					/7/i
				],
				short: [
					/CN/i,
					/2/i,
					/3/i,
					/4/i,
					/5/i,
					/6/i,
					/7/i
				],
				abbreviated: [
					/CN/i,
					/2/i,
					/3/i,
					/4/i,
					/5/i,
					/6/i,
					/7/i
				],
				wide: [
					/(Chủ|Chúa) ?Nhật/i,
					/Hai/i,
					/Ba/i,
					/Tư/i,
					/Năm/i,
					/Sáu/i,
					/Bảy/i
				]
			},
			defaultParseWidth: "wide"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: {
				narrow: /^(a|p|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,
				abbreviated: /^(am|pm|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,
				wide: /^(ch[^i]*|sa|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: {
				am: /^(a|sa)/i,
				pm: /^(p|ch[^i]*)/i,
				midnight: /nửa đêm/i,
				noon: /trưa/i,
				morning: /sáng/i,
				afternoon: /chiều/i,
				evening: /tối/i,
				night: /^đêm/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/zh-CN/_lib/formatDistance.js
var formatDistanceLocale$2 = {
	lessThanXSeconds: {
		one: "不到 1 秒",
		other: "不到 {{count}} 秒"
	},
	xSeconds: {
		one: "1 秒",
		other: "{{count}} 秒"
	},
	halfAMinute: "半分钟",
	lessThanXMinutes: {
		one: "不到 1 分钟",
		other: "不到 {{count}} 分钟"
	},
	xMinutes: {
		one: "1 分钟",
		other: "{{count}} 分钟"
	},
	xHours: {
		one: "1 小时",
		other: "{{count}} 小时"
	},
	aboutXHours: {
		one: "大约 1 小时",
		other: "大约 {{count}} 小时"
	},
	xDays: {
		one: "1 天",
		other: "{{count}} 天"
	},
	aboutXWeeks: {
		one: "大约 1 个星期",
		other: "大约 {{count}} 个星期"
	},
	xWeeks: {
		one: "1 个星期",
		other: "{{count}} 个星期"
	},
	aboutXMonths: {
		one: "大约 1 个月",
		other: "大约 {{count}} 个月"
	},
	xMonths: {
		one: "1 个月",
		other: "{{count}} 个月"
	},
	aboutXYears: {
		one: "大约 1 年",
		other: "大约 {{count}} 年"
	},
	xYears: {
		one: "1 年",
		other: "{{count}} 年"
	},
	overXYears: {
		one: "超过 1 年",
		other: "超过 {{count}} 年"
	},
	almostXYears: {
		one: "将近 1 年",
		other: "将近 {{count}} 年"
	}
};
var formatDistance$2 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$2[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return result + "内";
	else return result + "前";
	return result;
};
var formatLong$2 = {
	date: buildFormatLongFn({
		formats: {
			full: "y'年'M'月'd'日' EEEE",
			long: "y'年'M'月'd'日'",
			medium: "yyyy-MM-dd",
			short: "yy-MM-dd"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "zzzz a h:mm:ss",
			long: "z a h:mm:ss",
			medium: "a h:mm:ss",
			short: "a h:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} {{time}}",
			long: "{{date}} {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/zh-CN/_lib/formatRelative.js
function checkWeek(date, baseDate, options) {
	const baseFormat = "eeee p";
	if (isSameWeek(date, baseDate, options)) return baseFormat;
	else if (date.getTime() > baseDate.getTime()) return "'下个'" + baseFormat;
	return "'上个'" + baseFormat;
}
var formatRelativeLocale$2 = {
	lastWeek: checkWeek,
	yesterday: "'昨天' p",
	today: "'今天' p",
	tomorrow: "'明天' p",
	nextWeek: checkWeek,
	other: "PP p"
};
var formatRelative$2 = (token, date, baseDate, options) => {
	const format = formatRelativeLocale$2[token];
	if (typeof format === "function") return format(date, baseDate, options);
	return format;
};
//#endregion
//#region ../../node_modules/date-fns/locale/zh-CN/_lib/localize.js
var eraValues$2 = {
	narrow: ["前", "公元"],
	abbreviated: ["前", "公元"],
	wide: ["公元前", "公元"]
};
var quarterValues$2 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"第一季",
		"第二季",
		"第三季",
		"第四季"
	],
	wide: [
		"第一季度",
		"第二季度",
		"第三季度",
		"第四季度"
	]
};
var monthValues$2 = {
	narrow: [
		"一",
		"二",
		"三",
		"四",
		"五",
		"六",
		"七",
		"八",
		"九",
		"十",
		"十一",
		"十二"
	],
	abbreviated: [
		"1月",
		"2月",
		"3月",
		"4月",
		"5月",
		"6月",
		"7月",
		"8月",
		"9月",
		"10月",
		"11月",
		"12月"
	],
	wide: [
		"一月",
		"二月",
		"三月",
		"四月",
		"五月",
		"六月",
		"七月",
		"八月",
		"九月",
		"十月",
		"十一月",
		"十二月"
	]
};
var dayValues$2 = {
	narrow: [
		"日",
		"一",
		"二",
		"三",
		"四",
		"五",
		"六"
	],
	short: [
		"日",
		"一",
		"二",
		"三",
		"四",
		"五",
		"六"
	],
	abbreviated: [
		"周日",
		"周一",
		"周二",
		"周三",
		"周四",
		"周五",
		"周六"
	],
	wide: [
		"星期日",
		"星期一",
		"星期二",
		"星期三",
		"星期四",
		"星期五",
		"星期六"
	]
};
var dayPeriodValues$2 = {
	narrow: {
		am: "上",
		pm: "下",
		midnight: "凌晨",
		noon: "午",
		morning: "早",
		afternoon: "下午",
		evening: "晚",
		night: "夜"
	},
	abbreviated: {
		am: "上午",
		pm: "下午",
		midnight: "凌晨",
		noon: "中午",
		morning: "早晨",
		afternoon: "中午",
		evening: "晚上",
		night: "夜间"
	},
	wide: {
		am: "上午",
		pm: "下午",
		midnight: "凌晨",
		noon: "中午",
		morning: "早晨",
		afternoon: "中午",
		evening: "晚上",
		night: "夜间"
	}
};
var formattingDayPeriodValues$2 = {
	narrow: {
		am: "上",
		pm: "下",
		midnight: "凌晨",
		noon: "午",
		morning: "早",
		afternoon: "下午",
		evening: "晚",
		night: "夜"
	},
	abbreviated: {
		am: "上午",
		pm: "下午",
		midnight: "凌晨",
		noon: "中午",
		morning: "早晨",
		afternoon: "中午",
		evening: "晚上",
		night: "夜间"
	},
	wide: {
		am: "上午",
		pm: "下午",
		midnight: "凌晨",
		noon: "中午",
		morning: "早晨",
		afternoon: "中午",
		evening: "晚上",
		night: "夜间"
	}
};
var ordinalNumber$2 = (dirtyNumber, options) => {
	const number = Number(dirtyNumber);
	switch (options?.unit) {
		case "date": return number.toString() + "日";
		case "hour": return number.toString() + "时";
		case "minute": return number.toString() + "分";
		case "second": return number.toString() + "秒";
		default: return "第 " + number.toString();
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/zh-CN.js
/**
* @category Locales
* @summary Chinese Simplified locale.
* @language Chinese Simplified
* @iso-639-2 zho
* @author Changyu Geng [@KingMario](https://github.com/KingMario)
* @author Song Shuoyun [@fnlctrl](https://github.com/fnlctrl)
* @author sabrinaM [@sabrinamiao](https://github.com/sabrinamiao)
* @author Carney Wu [@cubicwork](https://github.com/cubicwork)
* @author Terrence Lam [@skyuplam](https://github.com/skyuplam)
*/
var zhCN = {
	code: "zh-CN",
	formatDistance: formatDistance$2,
	formatLong: formatLong$2,
	formatRelative: formatRelative$2,
	localize: {
		ordinalNumber: ordinalNumber$2,
		era: buildLocalizeFn({
			values: eraValues$2,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$2,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$2,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$2,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$2,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$2,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(第\s*)?\d+(日|时|分|秒)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(前)/i,
				abbreviated: /^(前)/i,
				wide: /^(公元前|公元)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^(前)/i, /^(公元)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^第[一二三四]刻/i,
				wide: /^第[一二三四]刻钟/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/(1|一)/i,
				/(2|二)/i,
				/(3|三)/i,
				/(4|四)/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^(一|二|三|四|五|六|七|八|九|十[二一])/i,
				abbreviated: /^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,
				wide: /^(一|二|三|四|五|六|七|八|九|十[二一])月/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^一/i,
					/^二/i,
					/^三/i,
					/^四/i,
					/^五/i,
					/^六/i,
					/^七/i,
					/^八/i,
					/^九/i,
					/^十(?!(一|二))/i,
					/^十一/i,
					/^十二/i
				],
				any: [
					/^一|1/i,
					/^二|2/i,
					/^三|3/i,
					/^四|4/i,
					/^五|5/i,
					/^六|6/i,
					/^七|7/i,
					/^八|8/i,
					/^九|9/i,
					/^十(?!(一|二))|10/i,
					/^十一|11/i,
					/^十二|12/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[一二三四五六日]/i,
				short: /^[一二三四五六日]/i,
				abbreviated: /^周[一二三四五六日]/i,
				wide: /^星期[一二三四五六日]/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/日/i,
				/一/i,
				/二/i,
				/三/i,
				/四/i,
				/五/i,
				/六/i
			] },
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: { any: /^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i },
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^上午?/i,
				pm: /^下午?/i,
				midnight: /^午夜/i,
				noon: /^[中正]午/i,
				morning: /^早上/i,
				afternoon: /^下午/i,
				evening: /^晚上?/i,
				night: /^凌晨/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/zh-HK/_lib/formatDistance.js
var formatDistanceLocale$1 = {
	lessThanXSeconds: {
		one: "少於 1 秒",
		other: "少於 {{count}} 秒"
	},
	xSeconds: {
		one: "1 秒",
		other: "{{count}} 秒"
	},
	halfAMinute: "半分鐘",
	lessThanXMinutes: {
		one: "少於 1 分鐘",
		other: "少於 {{count}} 分鐘"
	},
	xMinutes: {
		one: "1 分鐘",
		other: "{{count}} 分鐘"
	},
	xHours: {
		one: "1 小時",
		other: "{{count}} 小時"
	},
	aboutXHours: {
		one: "大約 1 小時",
		other: "大約 {{count}} 小時"
	},
	xDays: {
		one: "1 天",
		other: "{{count}} 天"
	},
	aboutXWeeks: {
		one: "大約 1 個星期",
		other: "大約 {{count}} 個星期"
	},
	xWeeks: {
		one: "1 個星期",
		other: "{{count}} 個星期"
	},
	aboutXMonths: {
		one: "大約 1 個月",
		other: "大約 {{count}} 個月"
	},
	xMonths: {
		one: "1 個月",
		other: "{{count}} 個月"
	},
	aboutXYears: {
		one: "大約 1 年",
		other: "大約 {{count}} 年"
	},
	xYears: {
		one: "1 年",
		other: "{{count}} 年"
	},
	overXYears: {
		one: "超過 1 年",
		other: "超過 {{count}} 年"
	},
	almostXYears: {
		one: "將近 1 年",
		other: "將近 {{count}} 年"
	}
};
var formatDistance$1 = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale$1[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return result + "內";
	else return result + "前";
	return result;
};
var formatLong$1 = {
	date: buildFormatLongFn({
		formats: {
			full: "y'年'M'月'd'日' EEEE",
			long: "y'年'M'月'd'日'",
			medium: "yyyy-MM-dd",
			short: "yy-MM-dd"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "zzzz a h:mm:ss",
			long: "z a h:mm:ss",
			medium: "a h:mm:ss",
			short: "a h:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} {{time}}",
			long: "{{date}} {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/zh-HK/_lib/formatRelative.js
var formatRelativeLocale$1 = {
	lastWeek: "'上個'eeee p",
	yesterday: "'昨天' p",
	today: "'今天' p",
	tomorrow: "'明天' p",
	nextWeek: "'下個'eeee p",
	other: "P"
};
var formatRelative$1 = (token, _date, _baseDate, _options) => formatRelativeLocale$1[token];
//#endregion
//#region ../../node_modules/date-fns/locale/zh-HK/_lib/localize.js
var eraValues$1 = {
	narrow: ["前", "公元"],
	abbreviated: ["前", "公元"],
	wide: ["公元前", "公元"]
};
var quarterValues$1 = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"第一季",
		"第二季",
		"第三季",
		"第四季"
	],
	wide: [
		"第一季度",
		"第二季度",
		"第三季度",
		"第四季度"
	]
};
var monthValues$1 = {
	narrow: [
		"一",
		"二",
		"三",
		"四",
		"五",
		"六",
		"七",
		"八",
		"九",
		"十",
		"十一",
		"十二"
	],
	abbreviated: [
		"1月",
		"2月",
		"3月",
		"4月",
		"5月",
		"6月",
		"7月",
		"8月",
		"9月",
		"10月",
		"11月",
		"12月"
	],
	wide: [
		"一月",
		"二月",
		"三月",
		"四月",
		"五月",
		"六月",
		"七月",
		"八月",
		"九月",
		"十月",
		"十一月",
		"十二月"
	]
};
var dayValues$1 = {
	narrow: [
		"日",
		"一",
		"二",
		"三",
		"四",
		"五",
		"六"
	],
	short: [
		"日",
		"一",
		"二",
		"三",
		"四",
		"五",
		"六"
	],
	abbreviated: [
		"週日",
		"週一",
		"週二",
		"週三",
		"週四",
		"週五",
		"週六"
	],
	wide: [
		"星期日",
		"星期一",
		"星期二",
		"星期三",
		"星期四",
		"星期五",
		"星期六"
	]
};
var dayPeriodValues$1 = {
	narrow: {
		am: "上",
		pm: "下",
		midnight: "午夜",
		noon: "晌",
		morning: "早",
		afternoon: "午",
		evening: "晚",
		night: "夜"
	},
	abbreviated: {
		am: "上午",
		pm: "下午",
		midnight: "午夜",
		noon: "中午",
		morning: "上午",
		afternoon: "下午",
		evening: "晚上",
		night: "夜晚"
	},
	wide: {
		am: "上午",
		pm: "下午",
		midnight: "午夜",
		noon: "中午",
		morning: "上午",
		afternoon: "下午",
		evening: "晚上",
		night: "夜晚"
	}
};
var formattingDayPeriodValues$1 = {
	narrow: {
		am: "上",
		pm: "下",
		midnight: "午夜",
		noon: "晌",
		morning: "早",
		afternoon: "午",
		evening: "晚",
		night: "夜"
	},
	abbreviated: {
		am: "上午",
		pm: "下午",
		midnight: "午夜",
		noon: "中午",
		morning: "上午",
		afternoon: "下午",
		evening: "晚上",
		night: "夜晚"
	},
	wide: {
		am: "上午",
		pm: "下午",
		midnight: "午夜",
		noon: "中午",
		morning: "上午",
		afternoon: "下午",
		evening: "晚上",
		night: "夜晚"
	}
};
var ordinalNumber$1 = (dirtyNumber, options) => {
	const number = Number(dirtyNumber);
	switch (options?.unit) {
		case "date": return number + "日";
		case "hour": return number + "時";
		case "minute": return number + "分";
		case "second": return number + "秒";
		default: return "第 " + number;
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/zh-HK.js
/**
* @category Locales
* @summary Chinese Traditional locale.
* @language Chinese Traditional
* @iso-639-2 zho
* @author Gary Ip [@gaplo](https://github.com/gaplo)
*/
var zhHK = {
	code: "zh-HK",
	formatDistance: formatDistance$1,
	formatLong: formatLong$1,
	formatRelative: formatRelative$1,
	localize: {
		ordinalNumber: ordinalNumber$1,
		era: buildLocalizeFn({
			values: eraValues$1,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues$1,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues$1,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues$1,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues$1,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues$1,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(第\s*)?\d+(日|時|分|秒)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(前)/i,
				abbreviated: /^(前)/i,
				wide: /^(公元前|公元)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^(前)/i, /^(公元)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^第[一二三四]季/i,
				wide: /^第[一二三四]季度/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/(1|一)/i,
				/(2|二)/i,
				/(3|三)/i,
				/(4|四)/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^(一|二|三|四|五|六|七|八|九|十[二一])/i,
				abbreviated: /^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,
				wide: /^(一|二|三|四|五|六|七|八|九|十[二一])月/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^一/i,
					/^二/i,
					/^三/i,
					/^四/i,
					/^五/i,
					/^六/i,
					/^七/i,
					/^八/i,
					/^九/i,
					/^十(?!(一|二))/i,
					/^十一/i,
					/^十二/i
				],
				any: [
					/^一|1/i,
					/^二|2/i,
					/^三|3/i,
					/^四|4/i,
					/^五|5/i,
					/^六|6/i,
					/^七|7/i,
					/^八|8/i,
					/^九|9/i,
					/^十(?!(一|二))|10/i,
					/^十一|11/i,
					/^十二|12/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[一二三四五六日]/i,
				short: /^[一二三四五六日]/i,
				abbreviated: /^週[一二三四五六日]/i,
				wide: /^星期[一二三四五六日]/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/日/i,
				/一/i,
				/二/i,
				/三/i,
				/四/i,
				/五/i,
				/六/i
			] },
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: { any: /^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨)/i },
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^上午?/i,
				pm: /^下午?/i,
				midnight: /^午夜/i,
				noon: /^[中正]午/i,
				morning: /^早上/i,
				afternoon: /^下午/i,
				evening: /^晚上?/i,
				night: /^凌晨/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 0,
		firstWeekContainsDate: 1
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/zh-TW/_lib/formatDistance.js
var formatDistanceLocale = {
	lessThanXSeconds: {
		one: "少於 1 秒",
		other: "少於 {{count}} 秒"
	},
	xSeconds: {
		one: "1 秒",
		other: "{{count}} 秒"
	},
	halfAMinute: "半分鐘",
	lessThanXMinutes: {
		one: "少於 1 分鐘",
		other: "少於 {{count}} 分鐘"
	},
	xMinutes: {
		one: "1 分鐘",
		other: "{{count}} 分鐘"
	},
	xHours: {
		one: "1 小時",
		other: "{{count}} 小時"
	},
	aboutXHours: {
		one: "大約 1 小時",
		other: "大約 {{count}} 小時"
	},
	xDays: {
		one: "1 天",
		other: "{{count}} 天"
	},
	aboutXWeeks: {
		one: "大約 1 個星期",
		other: "大約 {{count}} 個星期"
	},
	xWeeks: {
		one: "1 個星期",
		other: "{{count}} 個星期"
	},
	aboutXMonths: {
		one: "大約 1 個月",
		other: "大約 {{count}} 個月"
	},
	xMonths: {
		one: "1 個月",
		other: "{{count}} 個月"
	},
	aboutXYears: {
		one: "大約 1 年",
		other: "大約 {{count}} 年"
	},
	xYears: {
		one: "1 年",
		other: "{{count}} 年"
	},
	overXYears: {
		one: "超過 1 年",
		other: "超過 {{count}} 年"
	},
	almostXYears: {
		one: "將近 1 年",
		other: "將近 {{count}} 年"
	}
};
var formatDistance = (token, count, options) => {
	let result;
	const tokenValue = formatDistanceLocale[token];
	if (typeof tokenValue === "string") result = tokenValue;
	else if (count === 1) result = tokenValue.one;
	else result = tokenValue.other.replace("{{count}}", String(count));
	if (options?.addSuffix) if (options.comparison && options.comparison > 0) return result + "內";
	else return result + "前";
	return result;
};
var formatLong = {
	date: buildFormatLongFn({
		formats: {
			full: "y'年'M'月'd'日' EEEE",
			long: "y'年'M'月'd'日'",
			medium: "yyyy-MM-dd",
			short: "yy-MM-dd"
		},
		defaultWidth: "full"
	}),
	time: buildFormatLongFn({
		formats: {
			full: "zzzz a h:mm:ss",
			long: "z a h:mm:ss",
			medium: "a h:mm:ss",
			short: "a h:mm"
		},
		defaultWidth: "full"
	}),
	dateTime: buildFormatLongFn({
		formats: {
			full: "{{date}} {{time}}",
			long: "{{date}} {{time}}",
			medium: "{{date}} {{time}}",
			short: "{{date}} {{time}}"
		},
		defaultWidth: "full"
	})
};
//#endregion
//#region ../../node_modules/date-fns/locale/zh-TW/_lib/formatRelative.js
var formatRelativeLocale = {
	lastWeek: "'上個'eeee p",
	yesterday: "'昨天' p",
	today: "'今天' p",
	tomorrow: "'明天' p",
	nextWeek: "'下個'eeee p",
	other: "P"
};
var formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];
//#endregion
//#region ../../node_modules/date-fns/locale/zh-TW/_lib/localize.js
var eraValues = {
	narrow: ["前", "公元"],
	abbreviated: ["前", "公元"],
	wide: ["公元前", "公元"]
};
var quarterValues = {
	narrow: [
		"1",
		"2",
		"3",
		"4"
	],
	abbreviated: [
		"第一刻",
		"第二刻",
		"第三刻",
		"第四刻"
	],
	wide: [
		"第一刻鐘",
		"第二刻鐘",
		"第三刻鐘",
		"第四刻鐘"
	]
};
var monthValues = {
	narrow: [
		"一",
		"二",
		"三",
		"四",
		"五",
		"六",
		"七",
		"八",
		"九",
		"十",
		"十一",
		"十二"
	],
	abbreviated: [
		"1月",
		"2月",
		"3月",
		"4月",
		"5月",
		"6月",
		"7月",
		"8月",
		"9月",
		"10月",
		"11月",
		"12月"
	],
	wide: [
		"一月",
		"二月",
		"三月",
		"四月",
		"五月",
		"六月",
		"七月",
		"八月",
		"九月",
		"十月",
		"十一月",
		"十二月"
	]
};
var dayValues = {
	narrow: [
		"日",
		"一",
		"二",
		"三",
		"四",
		"五",
		"六"
	],
	short: [
		"日",
		"一",
		"二",
		"三",
		"四",
		"五",
		"六"
	],
	abbreviated: [
		"週日",
		"週一",
		"週二",
		"週三",
		"週四",
		"週五",
		"週六"
	],
	wide: [
		"星期日",
		"星期一",
		"星期二",
		"星期三",
		"星期四",
		"星期五",
		"星期六"
	]
};
var dayPeriodValues = {
	narrow: {
		am: "上",
		pm: "下",
		midnight: "凌晨",
		noon: "午",
		morning: "早",
		afternoon: "下午",
		evening: "晚",
		night: "夜"
	},
	abbreviated: {
		am: "上午",
		pm: "下午",
		midnight: "凌晨",
		noon: "中午",
		morning: "早晨",
		afternoon: "中午",
		evening: "晚上",
		night: "夜間"
	},
	wide: {
		am: "上午",
		pm: "下午",
		midnight: "凌晨",
		noon: "中午",
		morning: "早晨",
		afternoon: "中午",
		evening: "晚上",
		night: "夜間"
	}
};
var formattingDayPeriodValues = {
	narrow: {
		am: "上",
		pm: "下",
		midnight: "凌晨",
		noon: "午",
		morning: "早",
		afternoon: "下午",
		evening: "晚",
		night: "夜"
	},
	abbreviated: {
		am: "上午",
		pm: "下午",
		midnight: "凌晨",
		noon: "中午",
		morning: "早晨",
		afternoon: "中午",
		evening: "晚上",
		night: "夜間"
	},
	wide: {
		am: "上午",
		pm: "下午",
		midnight: "凌晨",
		noon: "中午",
		morning: "早晨",
		afternoon: "中午",
		evening: "晚上",
		night: "夜間"
	}
};
var ordinalNumber = (dirtyNumber, options) => {
	const number = Number(dirtyNumber);
	switch (options?.unit) {
		case "date": return number + "日";
		case "hour": return number + "時";
		case "minute": return number + "分";
		case "second": return number + "秒";
		default: return "第 " + number;
	}
};
//#endregion
//#region ../../node_modules/date-fns/locale/zh-TW.js
/**
* @category Locales
* @summary Chinese Traditional locale.
* @language Chinese Traditional
* @iso-639-2 zho
* @author tonypai [@tpai](https://github.com/tpai)
* @author Jack Hsu [@jackhsu978](https://github.com/jackhsu978)
* @author Terrence Lam [@skyuplam](https://github.com/skyuplam)
*/
var zhTW = {
	code: "zh-TW",
	formatDistance,
	formatLong,
	formatRelative,
	localize: {
		ordinalNumber,
		era: buildLocalizeFn({
			values: eraValues,
			defaultWidth: "wide"
		}),
		quarter: buildLocalizeFn({
			values: quarterValues,
			defaultWidth: "wide",
			argumentCallback: (quarter) => quarter - 1
		}),
		month: buildLocalizeFn({
			values: monthValues,
			defaultWidth: "wide"
		}),
		day: buildLocalizeFn({
			values: dayValues,
			defaultWidth: "wide"
		}),
		dayPeriod: buildLocalizeFn({
			values: dayPeriodValues,
			defaultWidth: "wide",
			formattingValues: formattingDayPeriodValues,
			defaultFormattingWidth: "wide"
		})
	},
	match: {
		ordinalNumber: buildMatchPatternFn({
			matchPattern: /^(第\s*)?\d+(日|時|分|秒)?/i,
			parsePattern: /\d+/i,
			valueCallback: (value) => parseInt(value, 10)
		}),
		era: buildMatchFn({
			matchPatterns: {
				narrow: /^(前)/i,
				abbreviated: /^(前)/i,
				wide: /^(公元前|公元)/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [/^(前)/i, /^(公元)/i] },
			defaultParseWidth: "any"
		}),
		quarter: buildMatchFn({
			matchPatterns: {
				narrow: /^[1234]/i,
				abbreviated: /^第[一二三四]刻/i,
				wide: /^第[一二三四]刻鐘/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/(1|一)/i,
				/(2|二)/i,
				/(3|三)/i,
				/(4|四)/i
			] },
			defaultParseWidth: "any",
			valueCallback: (index) => index + 1
		}),
		month: buildMatchFn({
			matchPatterns: {
				narrow: /^(一|二|三|四|五|六|七|八|九|十[二一])/i,
				abbreviated: /^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,
				wide: /^(一|二|三|四|五|六|七|八|九|十[二一])月/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: {
				narrow: [
					/^一/i,
					/^二/i,
					/^三/i,
					/^四/i,
					/^五/i,
					/^六/i,
					/^七/i,
					/^八/i,
					/^九/i,
					/^十(?!(一|二))/i,
					/^十一/i,
					/^十二/i
				],
				any: [
					/^一|1/i,
					/^二|2/i,
					/^三|3/i,
					/^四|4/i,
					/^五|5/i,
					/^六|6/i,
					/^七|7/i,
					/^八|8/i,
					/^九|9/i,
					/^十(?!(一|二))|10/i,
					/^十一|11/i,
					/^十二|12/i
				]
			},
			defaultParseWidth: "any"
		}),
		day: buildMatchFn({
			matchPatterns: {
				narrow: /^[一二三四五六日]/i,
				short: /^[一二三四五六日]/i,
				abbreviated: /^週[一二三四五六日]/i,
				wide: /^星期[一二三四五六日]/i
			},
			defaultMatchWidth: "wide",
			parsePatterns: { any: [
				/日/i,
				/一/i,
				/二/i,
				/三/i,
				/四/i,
				/五/i,
				/六/i
			] },
			defaultParseWidth: "any"
		}),
		dayPeriod: buildMatchFn({
			matchPatterns: { any: /^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨)/i },
			defaultMatchWidth: "any",
			parsePatterns: { any: {
				am: /^上午?/i,
				pm: /^下午?/i,
				midnight: /^午夜/i,
				noon: /^[中正]午/i,
				morning: /^早上/i,
				afternoon: /^下午/i,
				evening: /^晚上?/i,
				night: /^凌晨/i
			} },
			defaultParseWidth: "any"
		})
	},
	options: {
		weekStartsOn: 1,
		firstWeekContainsDate: 4
	}
};
//#endregion
//#region ../loot-core/src/shared/locale.ts
var locales$1 = { .../* @__PURE__ */ __exportAll({
	af: () => af,
	ar: () => ar,
	arDZ: () => arDZ,
	arEG: () => arEG,
	arMA: () => arMA,
	arSA: () => arSA,
	arTN: () => arTN,
	az: () => az,
	be: () => be,
	beTarask: () => beTarask,
	bg: () => bg,
	bn: () => bn,
	bs: () => bs,
	ca: () => ca,
	ckb: () => ckb,
	cs: () => cs,
	cy: () => cy,
	da: () => da,
	de: () => de,
	deAT: () => deAT,
	el: () => el,
	enAU: () => enAU,
	enCA: () => enCA,
	enGB: () => enGB,
	enIE: () => enIE,
	enIN: () => enIN,
	enNZ: () => enNZ,
	enUS: () => enUS,
	enZA: () => enZA,
	eo: () => eo,
	es: () => es,
	et: () => et,
	eu: () => eu,
	faIR: () => faIR,
	fi: () => fi,
	fr: () => fr,
	frCA: () => frCA,
	frCH: () => frCH,
	fy: () => fy,
	gd: () => gd,
	gl: () => gl,
	gu: () => gu,
	he: () => he,
	hi: () => hi,
	hr: () => hr,
	ht: () => ht,
	hu: () => hu,
	hy: () => hy,
	id: () => id,
	is: () => is,
	it: () => it,
	itCH: () => itCH,
	ja: () => ja,
	jaHira: () => jaHira,
	ka: () => ka,
	kk: () => kk,
	km: () => km,
	kn: () => kn,
	ko: () => ko,
	lb: () => lb,
	lt: () => lt,
	lv: () => lv,
	mk: () => mk,
	mn: () => mn,
	ms: () => ms,
	mt: () => mt,
	nb: () => nb,
	nl: () => nl,
	nlBE: () => nlBE,
	nn: () => nn,
	oc: () => oc,
	pl: () => pl,
	pt: () => pt,
	ptBR: () => ptBR,
	ro: () => ro,
	ru: () => ru,
	se: () => se,
	sk: () => sk,
	sl: () => sl,
	sq: () => sq,
	sr: () => sr,
	srLatn: () => srLatn,
	sv: () => sv,
	ta: () => ta,
	te: () => te,
	th: () => th,
	tr: () => tr,
	ug: () => ug,
	uk: () => uk,
	uz: () => uz,
	uzCyrl: () => uzCyrl,
	vi: () => vi,
	zhCN: () => zhCN,
	zhHK: () => zhHK,
	zhTW: () => zhTW
}) };
function getLocale$1(language) {
	if (!language || typeof language !== "string") return locales$1.enUS;
	let localeKey = language.replace("-", "");
	if (localeKey in locales$1) return locales$1[localeKey];
	localeKey = language.replace("-", "").substring(0, 2);
	if (localeKey in locales$1) return locales$1[localeKey];
	return locales$1.enUS;
}
//#endregion
//#region src/hooks/useLocale.ts
function useLocale() {
	const [language] = useGlobalPref("language");
	return (0, import_react.useMemo)(() => getLocale$1(language ? language : navigator.language ?? "en-US"), [language]);
}
//#endregion
//#region src/hooks/useCategoryScheduleGoalTemplateIndicator.ts
/**
* We only display an indicator for one schedule at a time, so we
* filter and then sort the schedules to show missed schedules first,
* then due schedules, then upcoming schedules. This is to ensure that
* the user sees the most important schedule first.
*/
function useCategoryScheduleGoalTemplateIndicator({ category, month }) {
	const { t } = useTranslation();
	const locale = useLocale();
	const [upcomingScheduledTransactionLength] = useSyncedPref("upcomingScheduledTransactionLength");
	const upcomingDays = getUpcomingDays(upcomingScheduledTransactionLength);
	const { schedules, statuses: scheduleStatuses } = useCategoryScheduleGoalTemplates({ category });
	return (0, import_react.useMemo)(() => {
		const schedulesToDisplay = schedules.filter((schedule) => {
			const status = scheduleStatuses.get(schedule.id);
			return status === "upcoming" || status === "due" || status === "missed";
		}).filter((schedule) => {
			if (monthFromDate(schedule.next_date) === month) return true;
			return monthFromDate(subDays(schedule.next_date, upcomingDays)) === month;
		}).sort((a, b) => {
			const aStatus = scheduleStatuses.get(a.id);
			const bStatus = scheduleStatuses.get(b.id);
			if (aStatus === "missed" && bStatus !== "missed") return -1;
			if (bStatus === "missed" && aStatus !== "missed") return 1;
			if (aStatus === "due" && bStatus !== "due") return -1;
			if (bStatus === "due" && aStatus !== "due") return 1;
			return 0;
		});
		const description = schedulesToDisplay.map((s) => {
			return getScheduleStatusDescription({
				t,
				schedule: s,
				scheduleStatus: scheduleStatuses.get(s.id),
				locale
			});
		}).join("\n");
		const schedule = schedulesToDisplay[0] || null;
		return {
			schedule,
			scheduleStatus: (schedule ? scheduleStatuses.get(schedule.id) : null) || null,
			isScheduleRecurring: !!(typeof schedule?._date === "object" && schedule?._date?.frequency),
			description
		};
	}, [
		locale,
		month,
		scheduleStatuses,
		schedules,
		t,
		upcomingDays
	]);
}
function getScheduleStatusDescription({ t, schedule, scheduleStatus, locale }) {
	if (!schedule || !scheduleStatus) return "";
	const isToday = isCurrentDay(schedule.next_date);
	const distanceFromNow = formatDistance$85(schedule.next_date, currentDay(), locale, { addSuffix: true });
	const formattedDate = format$2(schedule.next_date, "MMMM d", locale);
	switch (scheduleStatus) {
		case "missed": return t("Missed {{scheduleName}} due {{distanceFromNow}} ({{formattedDate}})", {
			scheduleName: schedule.name,
			distanceFromNow,
			formattedDate
		});
		case "due":
		case "upcoming": return t("{{scheduleName}} is due {{distanceFromNow}} ({{formattedDate}})", {
			scheduleName: schedule.name,
			distanceFromNow: isToday ? t("today") : distanceFromNow,
			formattedDate
		});
		default: throw new Error(`Unsupported schedule status for tooltip: ${scheduleStatus}`);
	}
}
//#endregion
//#region src/hooks/useContextMenu.ts
function useContextMenu() {
	const [menuOpen, setMenuOpen] = (0, import_react.useState)(false);
	const [asContextMenu, setAsContextMenu] = (0, import_react.useState)(false);
	const [position, setPosition] = (0, import_react.useState)({
		crossOffset: 0,
		offset: 0
	});
	const handleContextMenu = (e) => {
		e.preventDefault();
		setAsContextMenu(true);
		const rect = e.currentTarget.getBoundingClientRect();
		setPosition({
			crossOffset: e.clientX - rect.left,
			offset: e.clientY - rect.bottom
		});
		setMenuOpen(true);
	};
	const resetPosition = (crossOffset = 0, offset = 0) => {
		setPosition({
			crossOffset,
			offset
		});
	};
	return {
		menuOpen,
		setMenuOpen: (open) => {
			setMenuOpen(open);
			setAsContextMenu(false);
		},
		position,
		handleContextMenu,
		resetPosition,
		asContextMenu
	};
}
//#endregion
//#region src/undo/index.ts
function throttle(callback, wait) {
	let waiting = false;
	return () => {
		if (!waiting) {
			callback();
			waiting = true;
			setTimeout(function() {
				waiting = false;
			}, wait);
		}
	};
}
var _undo = throttle(() => send("undo"), 100);
var _redo = throttle(() => send("redo"), 100);
var _undoEnabled = true;
function enableUndo() {
	_undoEnabled = true;
}
function disableUndo() {
	_undoEnabled = false;
}
function undo() {
	if (_undoEnabled) _undo();
}
function redo() {
	if (_undoEnabled) _redo();
}
//#endregion
//#region src/hooks/useUndo.ts
var timeout = 1e4;
function useUndo() {
	const dispatch = useDispatch();
	const { isNarrowWidth } = useResponsive();
	const { t } = useTranslation();
	return {
		undo,
		redo,
		showUndoNotification: (0, import_react.useCallback)((notification) => {
			if (!isNarrowWidth) return;
			dispatch(addNotification({ notification: {
				type: "message",
				timeout,
				button: {
					title: t("Undo"),
					action: undo
				},
				...notification
			} }));
		}, [
			dispatch,
			isNarrowWidth,
			t
		]),
		showRedoNotification: (0, import_react.useCallback)((notification) => {
			if (!isNarrowWidth) return;
			dispatch(addNotification({ notification: {
				type: "message",
				timeout,
				button: {
					title: t("Redo"),
					action: redo
				},
				...notification
			} }));
		}, [
			dispatch,
			isNarrowWidth,
			t
		])
	};
}
//#endregion
//#region src/components/budget/envelope/BalanceMenu.tsx
function BalanceMenu(t0) {
	const $ = (0, import_compiler_runtime.c)(30);
	let categoryId;
	let onCarryover;
	let onCover;
	let onTransfer;
	let props;
	if ($[0] !== t0) {
		({categoryId, onTransfer, onCarryover, onCover, ...props} = t0);
		$[0] = t0;
		$[1] = categoryId;
		$[2] = onCarryover;
		$[3] = onCover;
		$[4] = onTransfer;
		$[5] = props;
	} else {
		categoryId = $[1];
		onCarryover = $[2];
		onCover = $[3];
		onTransfer = $[4];
		props = $[5];
	}
	const { t } = useTranslation();
	let t1;
	if ($[6] !== categoryId) {
		t1 = envelopeBudget.catCarryover(categoryId);
		$[6] = categoryId;
		$[7] = t1;
	} else t1 = $[7];
	const carryover = useEnvelopeSheetValue(t1);
	const balance = useEnvelopeSheetValue(envelopeBudget.catBalance(categoryId)) ?? 0;
	let t2;
	if ($[8] !== carryover || $[9] !== onCarryover || $[10] !== onCover || $[11] !== onTransfer) {
		t2 = (name) => {
			bb6: switch (name) {
				case "transfer":
					onTransfer?.();
					break bb6;
				case "carryover":
					onCarryover?.(!carryover);
					break bb6;
				case "cover":
					onCover?.();
					break bb6;
				default: throw new Error(`Unrecognized menu option: ${name}`);
			}
		};
		$[8] = carryover;
		$[9] = onCarryover;
		$[10] = onCover;
		$[11] = onTransfer;
		$[12] = t2;
	} else t2 = $[12];
	let t3;
	let t4;
	if ($[13] !== balance || $[14] !== t) {
		t3 = balance > 0 ? [{
			name: "transfer",
			text: t("Transfer to another category")
		}] : [];
		t4 = balance < 0 ? [{
			name: "cover",
			text: t("Cover overspending")
		}] : [];
		$[13] = balance;
		$[14] = t;
		$[15] = t3;
		$[16] = t4;
	} else {
		t3 = $[15];
		t4 = $[16];
	}
	let t5;
	if ($[17] !== carryover || $[18] !== t) {
		t5 = carryover ? t("Remove overspending rollover") : t("Rollover overspending");
		$[17] = carryover;
		$[18] = t;
		$[19] = t5;
	} else t5 = $[19];
	let t6;
	if ($[20] !== t5) {
		t6 = {
			name: "carryover",
			text: t5
		};
		$[20] = t5;
		$[21] = t6;
	} else t6 = $[21];
	let t7;
	if ($[22] !== t3 || $[23] !== t4 || $[24] !== t6) {
		t7 = [
			...t3,
			...t4,
			t6
		];
		$[22] = t3;
		$[23] = t4;
		$[24] = t6;
		$[25] = t7;
	} else t7 = $[25];
	let t8;
	if ($[26] !== props || $[27] !== t2 || $[28] !== t7) {
		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Menu, {
			...props,
			onMenuSelect: t2,
			items: t7
		});
		$[26] = props;
		$[27] = t2;
		$[28] = t7;
		$[29] = t8;
	} else t8 = $[29];
	return t8;
}
//#endregion
//#region src/hooks/useCategories.ts
function useCategories() {
	return useQuery$1(categoryQueries.list());
}
function useCategoriesById() {
	return useQuery$1({
		...categoryQueries.list(),
		select: (data) => {
			return {
				list: groupById(data.list),
				grouped: groupById(data.grouped)
			};
		}
	});
}
//#endregion
//#region src/components/budget/envelope/CoverMenu.tsx
function CoverMenu(t0) {
	const $ = (0, import_compiler_runtime.c)(36);
	const { showToBeBudgeted: t1, initialAmount: t2, categoryId, onSubmit, onClose } = t0;
	const showToBeBudgeted = t1 === void 0 ? true : t1;
	const initialAmount = t2 === void 0 ? 0 : t2;
	const { t } = useTranslation();
	const { data: t3 } = useCategories();
	let t4;
	if ($[0] !== t3) {
		t4 = t3 === void 0 ? { grouped: [] } : t3;
		$[0] = t3;
		$[1] = t4;
	} else t4 = $[1];
	const { grouped: originalCategoryGroups } = t4;
	const [fromCategoryId, setFromCategoryId] = (0, import_react.useState)(null);
	let t5;
	if ($[2] !== categoryId || $[3] !== originalCategoryGroups || $[4] !== showToBeBudgeted) {
		const expenseGroups = originalCategoryGroups.filter(_temp$12);
		const categoryGroups = showToBeBudgeted ? addToBeBudgetedGroup(expenseGroups) : expenseGroups;
		t5 = categoryId ? removeCategoriesFromGroups(categoryGroups, categoryId) : categoryGroups;
		$[2] = categoryId;
		$[3] = originalCategoryGroups;
		$[4] = showToBeBudgeted;
		$[5] = t5;
	} else t5 = $[5];
	const filteredCategoryGroups = t5;
	let t6;
	if ($[6] !== initialAmount) {
		t6 = integerToCurrency(Math.abs(initialAmount ?? 0));
		$[6] = initialAmount;
		$[7] = t6;
	} else t6 = $[7];
	const _initialAmount = t6;
	const [amount, setAmount] = (0, import_react.useState)(_initialAmount);
	let t7;
	if ($[8] !== amount || $[9] !== fromCategoryId || $[10] !== onClose || $[11] !== onSubmit) {
		t7 = function _onSubmit() {
			const parsedAmount = evalArithmetic(amount || "");
			if (parsedAmount && fromCategoryId) onSubmit(amountToInteger(parsedAmount), fromCategoryId);
			onClose();
		};
		$[8] = amount;
		$[9] = fromCategoryId;
		$[10] = onClose;
		$[11] = onSubmit;
		$[12] = t7;
	} else t7 = $[12];
	const _onSubmit = t7;
	let t8;
	if ($[13] !== _onSubmit) {
		t8 = (e) => {
			e.preventDefault();
			_onSubmit();
		};
		$[13] = _onSubmit;
		$[14] = t8;
	} else t8 = $[14];
	let t9;
	if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
		t9 = { padding: 10 };
		$[15] = t9;
	} else t9 = $[15];
	let t10;
	if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
		t10 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: { marginBottom: 5 },
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Cover this amount:" })
		});
		$[16] = t10;
	} else t10 = $[16];
	let t11;
	if ($[17] !== _initialAmount) {
		t11 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
			defaultValue: _initialAmount,
			onUpdate: setAmount,
			onChangeValue: setAmount,
			style: styles.tnum
		}) });
		$[17] = _initialAmount;
		$[18] = t11;
	} else t11 = $[18];
	let t12;
	if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
		t12 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: { margin: "10px 0 5px 0" },
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "From:" })
		});
		$[19] = t12;
	} else t12 = $[19];
	let t13;
	if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
		t13 = (id) => setFromCategoryId(id || null);
		$[20] = t13;
	} else t13 = $[20];
	let t14;
	if ($[21] !== t) {
		t14 = t("(none)");
		$[21] = t;
		$[22] = t14;
	} else t14 = $[22];
	let t15;
	if ($[23] !== t14) {
		t15 = { placeholder: t14 };
		$[23] = t14;
		$[24] = t15;
	} else t15 = $[24];
	let t16;
	if ($[25] !== filteredCategoryGroups || $[26] !== t15) {
		t16 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CategoryAutocomplete, {
			categoryGroups: filteredCategoryGroups,
			value: null,
			focused: true,
			openOnFocus: true,
			onSelect: t13,
			inputProps: t15,
			showHiddenCategories: false
		});
		$[25] = filteredCategoryGroups;
		$[26] = t15;
		$[27] = t16;
	} else t16 = $[27];
	let t17;
	if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
		t17 = {
			alignItems: "flex-end",
			marginTop: 10
		};
		$[28] = t17;
	} else t17 = $[28];
	let t18;
	if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
		t18 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t17,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
				type: "submit",
				variant: "primary",
				style: {
					fontSize: 12,
					paddingTop: 3
				},
				children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Transfer" })
			})
		});
		$[29] = t18;
	} else t18 = $[29];
	let t19;
	if ($[30] !== t11 || $[31] !== t16) {
		t19 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t9,
			children: [
				t10,
				t11,
				t12,
				t16,
				t18
			]
		});
		$[30] = t11;
		$[31] = t16;
		$[32] = t19;
	} else t19 = $[32];
	let t20;
	if ($[33] !== t19 || $[34] !== t8) {
		t20 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)($d3e0e05bdfcf66bd$export$a7fed597f4b8afd8, {
			onSubmit: t8,
			children: t19
		});
		$[33] = t19;
		$[34] = t8;
		$[35] = t20;
	} else t20 = $[35];
	return t20;
}
function _temp$12(g) {
	return !g.is_income;
}
//#endregion
//#region ../component-library/src/InitialFocus.ts
/**
* InitialFocus sets focus on its child element
* when it mounts.
* @param {ReactElement | function} children - A single React element or a function that returns a React element.
* The child element should have a `ref` prop for this to work. For child components which receives a ref via another prop
* e.g. `inputRef`, use a function as child and pass the ref to the appropriate prop.
*/
function InitialFocus({ children }) {
	const ref = (0, import_react.useRef)(null);
	(0, import_react.useEffect)(() => {
		if (ref.current) setTimeout(() => {
			if (ref.current) {
				ref.current.focus();
				if (ref.current instanceof HTMLInputElement || ref.current instanceof HTMLTextAreaElement) ref.current.setSelectionRange(0, 1e4);
			}
		}, 0);
	}, []);
	if (typeof children === "function") return children(ref);
	const child = import_react.Children.only(children);
	if ((0, import_react.isValidElement)(child)) return (0, import_react.cloneElement)(child, { ref });
	throw new Error("InitialFocus expects a single valid React element as its child.");
}
//#endregion
//#region src/components/util/FinancialInput.tsx
function FinancialInput(t0) {
	const $ = (0, import_compiler_runtime.c)(46);
	let integerValue;
	let onBlur;
	let onChangeValue;
	let onEnter;
	let onFocus;
	let onUpdate;
	let ref;
	let restProps;
	if ($[0] !== t0) {
		({ref, value: integerValue, onUpdate, onChangeValue, onBlur, onFocus, onEnter, ...restProps} = t0);
		$[0] = t0;
		$[1] = integerValue;
		$[2] = onBlur;
		$[3] = onChangeValue;
		$[4] = onEnter;
		$[5] = onFocus;
		$[6] = onUpdate;
		$[7] = ref;
		$[8] = restProps;
	} else {
		integerValue = $[1];
		onBlur = $[2];
		onChangeValue = $[3];
		onEnter = $[4];
		onFocus = $[5];
		onUpdate = $[6];
		ref = $[7];
		restProps = $[8];
	}
	const format = useFormat();
	const inputRef = (0, import_react.useRef)(null);
	let t1;
	if ($[9] !== format || $[10] !== integerValue) {
		t1 = () => format(integerValue, "financial");
		$[9] = format;
		$[10] = integerValue;
		$[11] = t1;
	} else t1 = $[11];
	const [internalValue, setInternalValue] = (0, import_react.useState)(t1);
	const [isFocused, setIsFocused] = (0, import_react.useState)(false);
	let t2;
	let t3;
	if ($[12] !== format || $[13] !== integerValue || $[14] !== isFocused) {
		t2 = () => {
			if (!isFocused) setInternalValue(format(integerValue, "financial"));
		};
		t3 = [
			integerValue,
			format,
			isFocused
		];
		$[12] = format;
		$[13] = integerValue;
		$[14] = isFocused;
		$[15] = t2;
		$[16] = t3;
	} else {
		t2 = $[15];
		t3 = $[16];
	}
	(0, import_react.useEffect)(t2, t3);
	let t4;
	if ($[17] !== format || $[18] !== integerValue || $[19] !== onFocus) {
		t4 = (e) => {
			setIsFocused(true);
			setInternalValue(format.forEdit(integerValue));
			setTimeout(() => {
				inputRef.current?.select();
			}, 0);
			onFocus?.(e);
		};
		$[17] = format;
		$[18] = integerValue;
		$[19] = onFocus;
		$[20] = t4;
	} else t4 = $[20];
	const handleFocus = t4;
	let t5;
	if ($[21] !== format || $[22] !== internalValue || $[23] !== onBlur || $[24] !== onUpdate) {
		t5 = (e_0) => {
			setIsFocused(false);
			const finalInteger = format.fromEdit(internalValue, 0) ?? 0;
			onUpdate?.(finalInteger);
			setInternalValue(format(finalInteger, "financial"));
			onBlur?.(e_0);
		};
		$[21] = format;
		$[22] = internalValue;
		$[23] = onBlur;
		$[24] = onUpdate;
		$[25] = t5;
	} else t5 = $[25];
	const handleBlur = t5;
	let t6;
	if ($[26] !== format || $[27] !== onEnter || $[28] !== onUpdate) {
		t6 = (stringValue) => {
			const finalInteger_0 = format.fromEdit(stringValue, 0) ?? 0;
			onUpdate?.(finalInteger_0);
			onEnter?.(finalInteger_0);
		};
		$[26] = format;
		$[27] = onEnter;
		$[28] = onUpdate;
		$[29] = t6;
	} else t6 = $[29];
	const handleEnter = t6;
	let t7;
	if ($[30] !== format || $[31] !== onChangeValue) {
		t7 = (stringValue_0) => {
			setInternalValue(stringValue_0);
			if (onChangeValue) {
				const newInteger = format.fromEdit(stringValue_0, 0) ?? 0;
				onChangeValue(newInteger);
			}
		};
		$[30] = format;
		$[31] = onChangeValue;
		$[32] = t7;
	} else t7 = $[32];
	const handleChange = t7;
	let t8;
	if ($[33] !== ref) {
		t8 = (node) => {
			inputRef.current = node;
			if (typeof ref === "function") ref(node);
			else if (ref) ref.current = node;
		};
		$[33] = ref;
		$[34] = t8;
	} else t8 = $[34];
	const setInputRef = t8;
	const t9 = internalValue || "";
	let t10;
	if ($[35] !== restProps.style) {
		t10 = {
			...restProps.style,
			...styles.tnum
		};
		$[35] = restProps.style;
		$[36] = t10;
	} else t10 = $[36];
	let t11;
	if ($[37] !== handleBlur || $[38] !== handleChange || $[39] !== handleEnter || $[40] !== handleFocus || $[41] !== restProps || $[42] !== setInputRef || $[43] !== t10 || $[44] !== t9) {
		t11 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
			...restProps,
			ref: setInputRef,
			value: t9,
			style: t10,
			onChangeValue: handleChange,
			onFocus: handleFocus,
			onBlur: handleBlur,
			onEnter: handleEnter
		});
		$[37] = handleBlur;
		$[38] = handleChange;
		$[39] = handleEnter;
		$[40] = handleFocus;
		$[41] = restProps;
		$[42] = setInputRef;
		$[43] = t10;
		$[44] = t9;
		$[45] = t11;
	} else t11 = $[45];
	return t11;
}
//#endregion
//#region src/components/budget/envelope/TransferMenu.tsx
function TransferMenu(t0) {
	const $ = (0, import_compiler_runtime.c)(34);
	const { categoryId, initialAmount: t1, showToBeBudgeted, onSubmit, onClose } = t0;
	const initialAmount = t1 === void 0 ? 0 : t1;
	const { data: t2 } = useCategories();
	let t3;
	if ($[0] !== t2) {
		t3 = t2 === void 0 ? { grouped: [] } : t2;
		$[0] = t2;
		$[1] = t3;
	} else t3 = $[1];
	const { grouped: originalCategoryGroups } = t3;
	let t4;
	if ($[2] !== categoryId || $[3] !== originalCategoryGroups || $[4] !== showToBeBudgeted) {
		const expenseCategoryGroups = originalCategoryGroups.filter(_temp$11);
		const categoryGroups = showToBeBudgeted ? addToBeBudgetedGroup(expenseCategoryGroups) : expenseCategoryGroups;
		t4 = categoryId ? removeCategoriesFromGroups(categoryGroups, categoryId) : categoryGroups;
		$[2] = categoryId;
		$[3] = originalCategoryGroups;
		$[4] = showToBeBudgeted;
		$[5] = t4;
	} else t4 = $[5];
	const filteredCategoryGroups = t4;
	const [amount, setAmount] = (0, import_react.useState)(Math.max(initialAmount ?? 0, 0));
	const [toCategoryId, setToCategoryId] = (0, import_react.useState)(null);
	let t5;
	if ($[6] !== amount || $[7] !== onClose || $[8] !== onSubmit || $[9] !== toCategoryId) {
		t5 = () => {
			if (amount != null && amount > 0 && toCategoryId) onSubmit(amount, toCategoryId);
			onClose();
		};
		$[6] = amount;
		$[7] = onClose;
		$[8] = onSubmit;
		$[9] = toCategoryId;
		$[10] = t5;
	} else t5 = $[10];
	const _onSubmit = t5;
	let t6;
	if ($[11] !== _onSubmit) {
		t6 = (e) => {
			e.preventDefault();
			_onSubmit();
		};
		$[11] = _onSubmit;
		$[12] = t6;
	} else t6 = $[12];
	let t7;
	if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
		t7 = { padding: 10 };
		$[13] = t7;
	} else t7 = $[13];
	let t8;
	if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: { marginBottom: 5 },
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Transfer this amount:" })
		});
		$[14] = t8;
	} else t8 = $[14];
	let t9;
	if ($[15] !== amount) {
		t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InitialFocus, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FinancialInput, {
			value: amount,
			onUpdate: setAmount
		}) }) });
		$[15] = amount;
		$[16] = t9;
	} else t9 = $[16];
	let t10;
	if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
		t10 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: { margin: "10px 0 5px 0" },
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "To:" })
		});
		$[17] = t10;
	} else t10 = $[17];
	let t11;
	let t12;
	if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
		t11 = (id) => setToCategoryId(id || null);
		t12 = { placeholder: "(none)" };
		$[18] = t11;
		$[19] = t12;
	} else {
		t11 = $[18];
		t12 = $[19];
	}
	let t13;
	if ($[20] !== filteredCategoryGroups) {
		t13 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CategoryAutocomplete, {
			categoryGroups: filteredCategoryGroups,
			value: null,
			openOnFocus: true,
			onSelect: t11,
			inputProps: t12,
			showHiddenCategories: true
		});
		$[20] = filteredCategoryGroups;
		$[21] = t13;
	} else t13 = $[21];
	let t14;
	if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
		t14 = {
			alignItems: "flex-end",
			marginTop: 10
		};
		$[22] = t14;
	} else t14 = $[22];
	const t15 = !toCategoryId || amount <= 0;
	let t16;
	let t17;
	if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
		t16 = {
			fontSize: 12,
			paddingTop: 3,
			paddingBottom: 3
		};
		t17 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Transfer" });
		$[23] = t16;
		$[24] = t17;
	} else {
		t16 = $[23];
		t17 = $[24];
	}
	let t18;
	if ($[25] !== t15) {
		t18 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t14,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
				type: "submit",
				variant: "primary",
				isDisabled: t15,
				style: t16,
				children: t17
			})
		});
		$[25] = t15;
		$[26] = t18;
	} else t18 = $[26];
	let t19;
	if ($[27] !== t13 || $[28] !== t18 || $[29] !== t9) {
		t19 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t7,
			children: [
				t8,
				t9,
				t10,
				t13,
				t18
			]
		});
		$[27] = t13;
		$[28] = t18;
		$[29] = t9;
		$[30] = t19;
	} else t19 = $[30];
	let t20;
	if ($[31] !== t19 || $[32] !== t6) {
		t20 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)($d3e0e05bdfcf66bd$export$a7fed597f4b8afd8, {
			onSubmit: t6,
			children: t19
		});
		$[31] = t19;
		$[32] = t6;
		$[33] = t20;
	} else t20 = $[33];
	return t20;
}
function _temp$11(g) {
	return !g.is_income;
}
//#endregion
//#region src/components/budget/envelope/BalanceMovementMenu.tsx
function BalanceMovementMenu(t0) {
	const $ = (0, import_compiler_runtime.c)(27);
	const { categoryId, month, onBudgetAction, onClose } = t0;
	const format = useFormat();
	const catBalance = useEnvelopeSheetValue(envelopeBudget.catBalance(categoryId)) ?? 0;
	const [menu, _setMenu] = (0, import_react.useState)("menu");
	const ref = (0, import_react.useRef)(null);
	let t1;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = (menu_0) => {
			ref.current?.focus();
			_setMenu(menu_0);
		};
		$[0] = t1;
	} else t1 = $[0];
	const setMenu = t1;
	let t2;
	if ($[1] !== categoryId || $[2] !== menu || $[3] !== month || $[4] !== onBudgetAction || $[5] !== onClose) {
		t2 = menu === "menu" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BalanceMenu, {
			categoryId,
			onCarryover: (carryover) => {
				onBudgetAction(month, "carryover", {
					category: categoryId,
					flag: carryover
				});
				onClose();
			},
			onTransfer: () => setMenu("transfer"),
			onCover: () => setMenu("cover")
		});
		$[1] = categoryId;
		$[2] = menu;
		$[3] = month;
		$[4] = onBudgetAction;
		$[5] = onClose;
		$[6] = t2;
	} else t2 = $[6];
	let t3;
	if ($[7] !== catBalance || $[8] !== categoryId || $[9] !== format || $[10] !== menu || $[11] !== month || $[12] !== onBudgetAction || $[13] !== onClose) {
		t3 = menu === "transfer" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TransferMenu, {
			categoryId,
			initialAmount: catBalance,
			showToBeBudgeted: true,
			onClose,
			onSubmit: (amount, toCategoryId) => {
				onBudgetAction(month, "transfer-category", {
					amount,
					from: categoryId,
					to: toCategoryId,
					currencyCode: format.currency.code
				});
			}
		});
		$[7] = catBalance;
		$[8] = categoryId;
		$[9] = format;
		$[10] = menu;
		$[11] = month;
		$[12] = onBudgetAction;
		$[13] = onClose;
		$[14] = t3;
	} else t3 = $[14];
	let t4;
	if ($[15] !== catBalance || $[16] !== categoryId || $[17] !== format || $[18] !== menu || $[19] !== month || $[20] !== onBudgetAction || $[21] !== onClose) {
		t4 = menu === "cover" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CoverMenu, {
			categoryId,
			initialAmount: catBalance,
			onClose,
			onSubmit: (amount_0, fromCategoryId) => {
				onBudgetAction(month, "cover-overspending", {
					to: categoryId,
					from: fromCategoryId,
					amount: amount_0,
					currencyCode: format.currency.code
				});
			}
		});
		$[15] = catBalance;
		$[16] = categoryId;
		$[17] = format;
		$[18] = menu;
		$[19] = month;
		$[20] = onBudgetAction;
		$[21] = onClose;
		$[22] = t4;
	} else t4 = $[22];
	let t5;
	if ($[23] !== t2 || $[24] !== t3 || $[25] !== t4) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
			tabIndex: -1,
			ref,
			children: [
				t2,
				t3,
				t4
			]
		});
		$[23] = t2;
		$[24] = t3;
		$[25] = t4;
		$[26] = t5;
	} else t5 = $[26];
	return t5;
}
//#endregion
//#region src/components/budget/envelope/BudgetMenu.tsx
function BudgetMenu(t0) {
	const $ = (0, import_compiler_runtime.c)(38);
	let onApplyBudgetTemplate;
	let onCopyLastMonthAverage;
	let onSetMonthsAverage;
	let props;
	if ($[0] !== t0) {
		({onCopyLastMonthAverage, onSetMonthsAverage, onApplyBudgetTemplate, ...props} = t0);
		$[0] = t0;
		$[1] = onApplyBudgetTemplate;
		$[2] = onCopyLastMonthAverage;
		$[3] = onSetMonthsAverage;
		$[4] = props;
	} else {
		onApplyBudgetTemplate = $[1];
		onCopyLastMonthAverage = $[2];
		onSetMonthsAverage = $[3];
		props = $[4];
	}
	const { t } = useTranslation();
	const isGoalTemplatesEnabled = useFeatureFlag("goalTemplatesEnabled");
	let t1;
	if ($[5] !== onApplyBudgetTemplate || $[6] !== onCopyLastMonthAverage || $[7] !== onSetMonthsAverage) {
		t1 = (name) => {
			bb2: switch (name) {
				case "copy-single-last":
					onCopyLastMonthAverage?.();
					break bb2;
				case "set-single-3-avg":
					onSetMonthsAverage?.(3);
					break bb2;
				case "set-single-6-avg":
					onSetMonthsAverage?.(6);
					break bb2;
				case "set-single-12-avg":
					onSetMonthsAverage?.(12);
					break bb2;
				case "apply-single-category-template":
					onApplyBudgetTemplate?.();
					break bb2;
				default: throw new Error(`Unrecognized menu item: ${name}`);
			}
		};
		$[5] = onApplyBudgetTemplate;
		$[6] = onCopyLastMonthAverage;
		$[7] = onSetMonthsAverage;
		$[8] = t1;
	} else t1 = $[8];
	const onMenuSelect = t1;
	let t2;
	if ($[9] !== t) {
		t2 = t("Copy last month's budget");
		$[9] = t;
		$[10] = t2;
	} else t2 = $[10];
	let t3;
	if ($[11] !== t2) {
		t3 = {
			name: "copy-single-last",
			text: t2
		};
		$[11] = t2;
		$[12] = t3;
	} else t3 = $[12];
	let t4;
	if ($[13] !== t) {
		t4 = t("Set to 3 month average");
		$[13] = t;
		$[14] = t4;
	} else t4 = $[14];
	let t5;
	if ($[15] !== t4) {
		t5 = {
			name: "set-single-3-avg",
			text: t4
		};
		$[15] = t4;
		$[16] = t5;
	} else t5 = $[16];
	let t6;
	if ($[17] !== t) {
		t6 = t("Set to 6 month average");
		$[17] = t;
		$[18] = t6;
	} else t6 = $[18];
	let t7;
	if ($[19] !== t6) {
		t7 = {
			name: "set-single-6-avg",
			text: t6
		};
		$[19] = t6;
		$[20] = t7;
	} else t7 = $[20];
	let t8;
	if ($[21] !== t) {
		t8 = t("Set to yearly average");
		$[21] = t;
		$[22] = t8;
	} else t8 = $[22];
	let t9;
	if ($[23] !== t8) {
		t9 = {
			name: "set-single-12-avg",
			text: t8
		};
		$[23] = t8;
		$[24] = t9;
	} else t9 = $[24];
	let t10;
	if ($[25] !== isGoalTemplatesEnabled || $[26] !== t) {
		t10 = isGoalTemplatesEnabled ? [{
			name: "apply-single-category-template",
			text: t("Overwrite with template")
		}] : [];
		$[25] = isGoalTemplatesEnabled;
		$[26] = t;
		$[27] = t10;
	} else t10 = $[27];
	let t11;
	if ($[28] !== t10 || $[29] !== t3 || $[30] !== t5 || $[31] !== t7 || $[32] !== t9) {
		t11 = [
			t3,
			t5,
			t7,
			t9,
			...t10
		];
		$[28] = t10;
		$[29] = t3;
		$[30] = t5;
		$[31] = t7;
		$[32] = t9;
		$[33] = t11;
	} else t11 = $[33];
	let t12;
	if ($[34] !== onMenuSelect || $[35] !== props || $[36] !== t11) {
		t12 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Menu, {
			...props,
			onMenuSelect,
			items: t11
		});
		$[34] = onMenuSelect;
		$[35] = props;
		$[36] = t11;
		$[37] = t12;
	} else t12 = $[37];
	return t12;
}
//#endregion
//#region src/components/budget/envelope/IncomeMenu.tsx
function IncomeMenu(t0) {
	const $ = (0, import_compiler_runtime.c)(24);
	const { categoryId, month, onBudgetAction, onShowActivity, onClose } = t0;
	const { t } = useTranslation();
	let t1;
	if ($[0] !== categoryId) {
		t1 = envelopeBudget.catCarryover(categoryId);
		$[0] = categoryId;
		$[1] = t1;
	} else t1 = $[1];
	const carryover = useEnvelopeSheetValue(t1);
	let t2;
	if ($[2] !== carryover || $[3] !== categoryId || $[4] !== month || $[5] !== onBudgetAction || $[6] !== onClose || $[7] !== onShowActivity) {
		t2 = (name) => {
			bb2: switch (name) {
				case "view":
					onShowActivity(categoryId, month);
					break bb2;
				case "carryover":
					if (!carryover) onBudgetAction(month, "reset-hold");
					onBudgetAction(month, "carryover", {
						category: categoryId,
						flag: !carryover
					});
					onClose();
					break bb2;
				default: throw new Error(`Unrecognized menu option: ${String(name)}`);
			}
		};
		$[2] = carryover;
		$[3] = categoryId;
		$[4] = month;
		$[5] = onBudgetAction;
		$[6] = onClose;
		$[7] = onShowActivity;
		$[8] = t2;
	} else t2 = $[8];
	let t3;
	if ($[9] !== carryover || $[10] !== t) {
		t3 = carryover ? t("Disable auto hold") : t("Enable auto hold");
		$[9] = carryover;
		$[10] = t;
		$[11] = t3;
	} else t3 = $[11];
	let t4;
	if ($[12] !== t3) {
		t4 = {
			name: "carryover",
			text: t3
		};
		$[12] = t3;
		$[13] = t4;
	} else t4 = $[13];
	let t5;
	if ($[14] !== t) {
		t5 = t("View transactions");
		$[14] = t;
		$[15] = t5;
	} else t5 = $[15];
	let t6;
	if ($[16] !== t5) {
		t6 = {
			name: "view",
			text: t5
		};
		$[16] = t5;
		$[17] = t6;
	} else t6 = $[17];
	let t7;
	if ($[18] !== t4 || $[19] !== t6) {
		t7 = [t4, t6];
		$[18] = t4;
		$[19] = t6;
		$[20] = t7;
	} else t7 = $[20];
	let t8;
	if ($[21] !== t2 || $[22] !== t7) {
		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Menu, {
			onMenuSelect: t2,
			items: t7
		}) });
		$[21] = t2;
		$[22] = t7;
		$[23] = t8;
	} else t8 = $[23];
	return t8;
}
//#endregion
//#region src/components/budget/envelope/EnvelopeBudgetContext.tsx
var EnvelopeBudgetContext = (0, import_react.createContext)({
	summaryCollapsed: false,
	onBudgetAction: () => {
		throw new Error("Unitialised context method called: onBudgetAction");
	},
	onToggleSummaryCollapse: () => {
		throw new Error("Unitialised context method called: onToggleSummaryCollapse");
	},
	currentMonth: "unknown"
});
function EnvelopeBudgetProvider(t0) {
	const $ = (0, import_compiler_runtime.c)(8);
	const { summaryCollapsed, onBudgetAction, onToggleSummaryCollapse, children } = t0;
	let t1;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = currentMonth();
		$[0] = t1;
	} else t1 = $[0];
	const currentMonth$1 = t1;
	let t2;
	if ($[1] !== onBudgetAction || $[2] !== onToggleSummaryCollapse || $[3] !== summaryCollapsed) {
		t2 = {
			currentMonth: currentMonth$1,
			summaryCollapsed,
			onBudgetAction,
			onToggleSummaryCollapse
		};
		$[1] = onBudgetAction;
		$[2] = onToggleSummaryCollapse;
		$[3] = summaryCollapsed;
		$[4] = t2;
	} else t2 = $[4];
	let t3;
	if ($[5] !== children || $[6] !== t2) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnvelopeBudgetContext.Provider, {
			value: t2,
			children
		});
		$[5] = children;
		$[6] = t2;
		$[7] = t3;
	} else t3 = $[7];
	return t3;
}
function useEnvelopeBudget() {
	return (0, import_react.useContext)(EnvelopeBudgetContext);
}
//#endregion
//#region src/components/budget/envelope/budgetsummary/BudgetMonthMenu.tsx
function BudgetMonthMenu(t0) {
	const $ = (0, import_compiler_runtime.c)(51);
	let onApplyBudgetTemplates;
	let onCheckTemplates;
	let onCopyLastMonthBudget;
	let onEndOfMonthCleanup;
	let onOverwriteWithBudgetTemplates;
	let onSetBudgetsToZero;
	let onSetMonthsAverage;
	let props;
	if ($[0] !== t0) {
		({onCopyLastMonthBudget, onSetBudgetsToZero, onSetMonthsAverage, onCheckTemplates, onApplyBudgetTemplates, onOverwriteWithBudgetTemplates, onEndOfMonthCleanup, ...props} = t0);
		$[0] = t0;
		$[1] = onApplyBudgetTemplates;
		$[2] = onCheckTemplates;
		$[3] = onCopyLastMonthBudget;
		$[4] = onEndOfMonthCleanup;
		$[5] = onOverwriteWithBudgetTemplates;
		$[6] = onSetBudgetsToZero;
		$[7] = onSetMonthsAverage;
		$[8] = props;
	} else {
		onApplyBudgetTemplates = $[1];
		onCheckTemplates = $[2];
		onCopyLastMonthBudget = $[3];
		onEndOfMonthCleanup = $[4];
		onOverwriteWithBudgetTemplates = $[5];
		onSetBudgetsToZero = $[6];
		onSetMonthsAverage = $[7];
		props = $[8];
	}
	const { t } = useTranslation();
	const isGoalTemplatesEnabled = useFeatureFlag("goalTemplatesEnabled");
	let t1;
	if ($[9] !== onApplyBudgetTemplates || $[10] !== onCheckTemplates || $[11] !== onCopyLastMonthBudget || $[12] !== onEndOfMonthCleanup || $[13] !== onOverwriteWithBudgetTemplates || $[14] !== onSetBudgetsToZero || $[15] !== onSetMonthsAverage) {
		t1 = (name) => {
			bb2: switch (name) {
				case "copy-last":
					onCopyLastMonthBudget();
					break bb2;
				case "set-zero":
					onSetBudgetsToZero();
					break bb2;
				case "set-3-avg":
					onSetMonthsAverage(3);
					break bb2;
				case "set-6-avg":
					onSetMonthsAverage(6);
					break bb2;
				case "set-12-avg":
					onSetMonthsAverage(12);
					break bb2;
				case "check-templates":
					onCheckTemplates();
					break bb2;
				case "apply-goal-template":
					onApplyBudgetTemplates();
					break bb2;
				case "overwrite-goal-template":
					onOverwriteWithBudgetTemplates();
					break bb2;
				case "cleanup-goal-template":
					onEndOfMonthCleanup();
					break bb2;
				default: throw new Error(`Unrecognized menu option: ${name}`);
			}
		};
		$[9] = onApplyBudgetTemplates;
		$[10] = onCheckTemplates;
		$[11] = onCopyLastMonthBudget;
		$[12] = onEndOfMonthCleanup;
		$[13] = onOverwriteWithBudgetTemplates;
		$[14] = onSetBudgetsToZero;
		$[15] = onSetMonthsAverage;
		$[16] = t1;
	} else t1 = $[16];
	let t2;
	if ($[17] !== t) {
		t2 = t("Copy last month's budget");
		$[17] = t;
		$[18] = t2;
	} else t2 = $[18];
	let t3;
	if ($[19] !== t2) {
		t3 = {
			name: "copy-last",
			text: t2
		};
		$[19] = t2;
		$[20] = t3;
	} else t3 = $[20];
	let t4;
	if ($[21] !== t) {
		t4 = t("Set budgets to zero");
		$[21] = t;
		$[22] = t4;
	} else t4 = $[22];
	let t5;
	if ($[23] !== t4) {
		t5 = {
			name: "set-zero",
			text: t4
		};
		$[23] = t4;
		$[24] = t5;
	} else t5 = $[24];
	let t6;
	if ($[25] !== t) {
		t6 = t("Set budgets to 3 month average");
		$[25] = t;
		$[26] = t6;
	} else t6 = $[26];
	let t7;
	if ($[27] !== t6) {
		t7 = {
			name: "set-3-avg",
			text: t6
		};
		$[27] = t6;
		$[28] = t7;
	} else t7 = $[28];
	let t8;
	if ($[29] !== t) {
		t8 = t("Set budgets to 6 month average");
		$[29] = t;
		$[30] = t8;
	} else t8 = $[30];
	let t9;
	if ($[31] !== t8) {
		t9 = {
			name: "set-6-avg",
			text: t8
		};
		$[31] = t8;
		$[32] = t9;
	} else t9 = $[32];
	let t10;
	if ($[33] !== t) {
		t10 = t("Set budgets to 12 month average");
		$[33] = t;
		$[34] = t10;
	} else t10 = $[34];
	let t11;
	if ($[35] !== t10) {
		t11 = {
			name: "set-12-avg",
			text: t10
		};
		$[35] = t10;
		$[36] = t11;
	} else t11 = $[36];
	let t12;
	if ($[37] !== isGoalTemplatesEnabled || $[38] !== t) {
		t12 = isGoalTemplatesEnabled ? [
			{
				name: "check-templates",
				text: t("Check templates")
			},
			{
				name: "apply-goal-template",
				text: t("Apply budget template")
			},
			{
				name: "overwrite-goal-template",
				text: t("Overwrite with budget template")
			},
			{
				name: "cleanup-goal-template",
				text: t("End of month cleanup")
			}
		] : [];
		$[37] = isGoalTemplatesEnabled;
		$[38] = t;
		$[39] = t12;
	} else t12 = $[39];
	let t13;
	if ($[40] !== t11 || $[41] !== t12 || $[42] !== t3 || $[43] !== t5 || $[44] !== t7 || $[45] !== t9) {
		t13 = [
			t3,
			t5,
			t7,
			t9,
			t11,
			...t12
		];
		$[40] = t11;
		$[41] = t12;
		$[42] = t3;
		$[43] = t5;
		$[44] = t7;
		$[45] = t9;
		$[46] = t13;
	} else t13 = $[46];
	let t14;
	if ($[47] !== props || $[48] !== t1 || $[49] !== t13) {
		t14 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Menu, {
			...props,
			onMenuSelect: t1,
			items: t13
		});
		$[47] = props;
		$[48] = t1;
		$[49] = t13;
		$[50] = t14;
	} else t14 = $[50];
	return t14;
}
//#endregion
//#region src/components/budget/envelope/HoldMenu.tsx
function HoldMenu(t0) {
	const $ = (0, import_compiler_runtime.c)(16);
	const { onSubmit, onClose } = t0;
	const [amount, setAmount] = (0, import_react.useState)(null);
	let t1;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = (t2) => {
			const { value } = t2;
			setAmount(Math.max(value || 0, 0));
		};
		$[0] = t1;
	} else t1 = $[0];
	useSheetValue("to-budget", t1);
	if (amount === null) return null;
	let t2;
	if ($[1] !== amount || $[2] !== onClose || $[3] !== onSubmit) {
		t2 = (e) => {
			e.preventDefault();
			onSubmit(amount);
			onClose();
		};
		$[1] = amount;
		$[2] = onClose;
		$[3] = onSubmit;
		$[4] = t2;
	} else t2 = $[4];
	let t3;
	if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
		t3 = { padding: 10 };
		$[5] = t3;
	} else t3 = $[5];
	let t4;
	if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: { marginBottom: 5 },
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Hold this amount:" })
		});
		$[6] = t4;
	} else t4 = $[6];
	let t5;
	if ($[7] !== amount) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InitialFocus, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FinancialInput, {
			value: amount,
			onChangeValue: setAmount
		}) }) });
		$[7] = amount;
		$[8] = t5;
	} else t5 = $[8];
	let t6;
	if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
		t6 = {
			alignItems: "flex-end",
			marginTop: 10
		};
		$[9] = t6;
	} else t6 = $[9];
	let t7;
	if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
		t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t6,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
				type: "submit",
				variant: "primary",
				style: {
					fontSize: 12,
					paddingTop: 3,
					paddingBottom: 3
				},
				children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Hold" })
			})
		});
		$[10] = t7;
	} else t7 = $[10];
	let t8;
	if ($[11] !== t5) {
		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t3,
			children: [
				t4,
				t5,
				t7
			]
		});
		$[11] = t5;
		$[12] = t8;
	} else t8 = $[12];
	let t9;
	if ($[13] !== t2 || $[14] !== t8) {
		t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)($d3e0e05bdfcf66bd$export$a7fed597f4b8afd8, {
			onSubmit: t2,
			children: t8
		});
		$[13] = t2;
		$[14] = t8;
		$[15] = t9;
	} else t9 = $[15];
	return t9;
}
//#endregion
//#region ../component-library/src/AlignedText.tsx
function AlignedText({ left, right, style, leftStyle, rightStyle, truncate = "left", ...nativeProps }) {
	const truncateStyle = {
		textOverflow: "ellipsis",
		whiteSpace: "nowrap",
		overflow: "hidden"
	};
	return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
		style: {
			flexDirection: "row",
			alignItems: "center",
			...style
		},
		...nativeProps,
		children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Block, {
			style: {
				marginRight: 10,
				...truncate === "left" && truncateStyle,
				...leftStyle
			},
			children: left
		}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Block, {
			style: {
				flex: 1,
				textAlign: "right",
				...truncate === "right" && truncateStyle,
				...rightStyle
			},
			children: right
		})]
	});
}
//#endregion
//#region src/components/budget/envelope/budgetsummary/TotalsList.tsx
/**
* Creates a formatter that displays values with explicit +/- signs.
* Uses Math.abs to avoid double-negative display (e.g., "--$0.00").
*
* @param format - The format function from useFormat hook
* @param invert - If true, shows '-' for positive and '+' for negative
*/
function makeSignedFormatter(format, invert = false) {
	return (value, type) => {
		const v = format(Math.abs(value), type);
		if (value === 0) return "-" + v;
		const isPositive = value > 0;
		return invert ? isPositive ? "-" + v : "+" + v : isPositive ? "+" + v : "-" + v;
	};
}
function TotalsList(t0) {
	const $ = (0, import_compiler_runtime.c)(32);
	const { prevMonthName, style } = t0;
	const format = useFormat();
	let t1;
	if ($[0] !== format) {
		t1 = makeSignedFormatter(format);
		$[0] = format;
		$[1] = t1;
	} else t1 = $[1];
	const signedFormatter = t1;
	let t2;
	if ($[2] !== format) {
		t2 = makeSignedFormatter(format, true);
		$[2] = format;
		$[3] = t2;
	} else t2 = $[3];
	const invertedSignedFormatter = t2;
	let t3;
	if ($[4] !== style) {
		t3 = {
			flexDirection: "row",
			lineHeight: 1.5,
			justifyContent: "center",
			...styles.smallText,
			...style
		};
		$[4] = style;
		$[5] = t3;
	} else t3 = $[5];
	let t4;
	if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
		t4 = {
			textAlign: "right",
			marginRight: 10,
			minWidth: 50
		};
		$[6] = t4;
	} else t4 = $[6];
	let t5;
	if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
		t5 = {
			...styles.tooltip,
			lineHeight: 1.5,
			padding: "6px 10px"
		};
		$[7] = t5;
	} else t5 = $[7];
	let t6;
	if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlignedText, {
			left: "Income:",
			right: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnvelopeCellValue, {
				binding: envelopeBudget.totalIncome,
				type: "financial"
			})
		});
		$[8] = t6;
	} else t6 = $[8];
	let t7;
	if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
		t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [t6, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlignedText, {
			left: "From Last Month:",
			right: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnvelopeCellValue, {
				binding: envelopeBudget.fromLastMonth,
				type: "financial"
			})
		})] });
		$[9] = t7;
	} else t7 = $[9];
	let t8;
	if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tooltip, {
			style: t5,
			content: t7,
			placement: "bottom end",
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnvelopeCellValue, {
				binding: envelopeBudget.incomeAvailable,
				type: "financial",
				children: _temp$10
			})
		});
		$[10] = t8;
	} else t8 = $[10];
	let t9;
	if ($[11] !== signedFormatter) {
		t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnvelopeCellValue, {
			binding: envelopeBudget.lastMonthOverspent,
			type: "financial",
			children: (props_0) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CellValueText, {
				...props_0,
				style: { fontWeight: 600 },
				formatter: signedFormatter
			})
		});
		$[11] = signedFormatter;
		$[12] = t9;
	} else t9 = $[12];
	let t10;
	if ($[13] !== signedFormatter) {
		t10 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnvelopeCellValue, {
			binding: envelopeBudget.totalBudgeted,
			type: "financial",
			children: (props_1) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CellValueText, {
				...props_1,
				style: { fontWeight: 600 },
				formatter: signedFormatter
			})
		});
		$[13] = signedFormatter;
		$[14] = t10;
	} else t10 = $[14];
	let t11;
	if ($[15] !== invertedSignedFormatter) {
		t11 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnvelopeCellValue, {
			binding: envelopeBudget.forNextMonth,
			type: "financial",
			children: (props_2) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CellValueText, {
				...props_2,
				style: { fontWeight: 600 },
				formatter: invertedSignedFormatter
			})
		});
		$[15] = invertedSignedFormatter;
		$[16] = t11;
	} else t11 = $[16];
	let t12;
	if ($[17] !== t10 || $[18] !== t11 || $[19] !== t9) {
		t12 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t4,
			children: [
				t8,
				t9,
				t10,
				t11
			]
		});
		$[17] = t10;
		$[18] = t11;
		$[19] = t9;
		$[20] = t12;
	} else t12 = $[20];
	let t13;
	if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
		t13 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Block, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Available funds" }) });
		$[21] = t13;
	} else t13 = $[21];
	let t14;
	if ($[22] !== prevMonthName) {
		t14 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Block, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Trans, { children: ["Overspent in ", { prevMonthName }] }) });
		$[22] = prevMonthName;
		$[23] = t14;
	} else t14 = $[23];
	let t15;
	if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
		t15 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Block, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Budgeted" }) });
		$[24] = t15;
	} else t15 = $[24];
	let t16;
	if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
		t16 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Block, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "For next month" }) });
		$[25] = t16;
	} else t16 = $[25];
	let t17;
	if ($[26] !== t14) {
		t17 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, { children: [
			t13,
			t14,
			t15,
			t16
		] });
		$[26] = t14;
		$[27] = t17;
	} else t17 = $[27];
	let t18;
	if ($[28] !== t12 || $[29] !== t17 || $[30] !== t3) {
		t18 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t3,
			children: [t12, t17]
		});
		$[28] = t12;
		$[29] = t17;
		$[30] = t3;
		$[31] = t18;
	} else t18 = $[31];
	return t18;
}
function _temp$10(props) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CellValueText, {
		...props,
		style: { fontWeight: 600 }
	});
}
//#endregion
//#region src/components/budget/envelope/budgetsummary/ToBudgetAmount.tsx
function ToBudgetAmount(t0) {
	const $ = (0, import_compiler_runtime.c)(37);
	const { prevMonthName, style, amountStyle, onClick, isTotalsListTooltipDisabled: t1, onContextMenu } = t0;
	const isTotalsListTooltipDisabled = t1 === void 0 ? false : t1;
	const { t } = useTranslation();
	const sheetName = useEnvelopeSheetName(envelopeBudget.toBudget);
	let t2;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = {
			name: envelopeBudget.toBudget,
			value: 0
		};
		$[0] = t2;
	} else t2 = $[0];
	const sheetValue = useEnvelopeSheetValue(t2);
	const format = useFormat();
	const availableValue = sheetValue;
	if (typeof availableValue !== "number" && availableValue !== null) throw new Error("Expected availableValue to be a number but got " + availableValue);
	const num = availableValue ?? 0;
	const isNegative = num < 0;
	const isPositive = num > 0;
	let t3;
	if ($[1] !== style) {
		t3 = {
			alignItems: "center",
			...style
		};
		$[1] = style;
		$[2] = t3;
	} else t3 = $[2];
	let t4;
	if ($[3] !== isNegative || $[4] !== t) {
		t4 = isNegative ? t("Overbudgeted:") : t("To Budget:");
		$[3] = isNegative;
		$[4] = t;
		$[5] = t4;
	} else t4 = $[5];
	let t5;
	if ($[6] !== t4) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Block, { children: t4 });
		$[6] = t4;
		$[7] = t5;
	} else t5 = $[7];
	let t6;
	if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
		t6 = { padding: 7 };
		$[8] = t6;
	} else t6 = $[8];
	let t7;
	if ($[9] !== prevMonthName) {
		t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TotalsList, {
			prevMonthName,
			style: t6
		});
		$[9] = prevMonthName;
		$[10] = t7;
	} else t7 = $[10];
	let t8;
	if ($[11] !== isTotalsListTooltipDisabled) {
		t8 = { isDisabled: isTotalsListTooltipDisabled };
		$[11] = isTotalsListTooltipDisabled;
		$[12] = t8;
	} else t8 = $[12];
	let t9;
	if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
		t9 = { textAlign: "center" };
		$[13] = t9;
	} else t9 = $[13];
	const t10 = isPositive ? theme.toBudgetPositive : isNegative ? theme.toBudgetNegative : theme.toBudgetZero;
	const t11 = isPositive ? theme.toBudgetPositive : isNegative ? theme.toBudgetNegative : theme.toBudgetZero;
	let t12;
	if ($[14] !== amountStyle || $[15] !== t10 || $[16] !== t11) {
		t12 = css([
			styles.veryLargeText,
			{
				fontWeight: 400,
				userSelect: "none",
				cursor: "pointer",
				color: t10,
				marginBottom: -1,
				borderBottom: "1px solid transparent",
				":hover": { borderColor: t11 }
			},
			amountStyle
		]);
		$[14] = amountStyle;
		$[15] = t10;
		$[16] = t11;
		$[17] = t12;
	} else t12 = $[17];
	let t13;
	if ($[18] !== format || $[19] !== num) {
		t13 = format(num, "financial");
		$[18] = format;
		$[19] = num;
		$[20] = t13;
	} else t13 = $[20];
	let t14;
	if ($[21] !== t13) {
		t14 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FinancialText, { children: t13 });
		$[21] = t13;
		$[22] = t14;
	} else t14 = $[22];
	let t15;
	if ($[23] !== onClick || $[24] !== onContextMenu || $[25] !== sheetName || $[26] !== t12 || $[27] !== t14) {
		t15 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PrivacyFilter, {
			style: t9,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Block, {
				onClick,
				onContextMenu,
				"data-cellname": sheetName,
				className: t12,
				children: t14
			})
		});
		$[23] = onClick;
		$[24] = onContextMenu;
		$[25] = sheetName;
		$[26] = t12;
		$[27] = t14;
		$[28] = t15;
	} else t15 = $[28];
	let t16;
	if ($[29] !== t15 || $[30] !== t7 || $[31] !== t8) {
		t16 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tooltip, {
			content: t7,
			placement: "bottom",
			offset: 3,
			triggerProps: t8,
			children: t15
		}) });
		$[29] = t15;
		$[30] = t7;
		$[31] = t8;
		$[32] = t16;
	} else t16 = $[32];
	let t17;
	if ($[33] !== t16 || $[34] !== t3 || $[35] !== t5) {
		t17 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t3,
			children: [t5, t16]
		});
		$[33] = t16;
		$[34] = t3;
		$[35] = t5;
		$[36] = t17;
	} else t17 = $[36];
	return t17;
}
//#endregion
//#region src/components/budget/envelope/budgetsummary/ToBudgetMenu.tsx
function ToBudgetMenu(t0) {
	const $ = (0, import_compiler_runtime.c)(43);
	let month;
	let onBudgetAction;
	let onCover;
	let onHoldBuffer;
	let onResetHoldBuffer;
	let onTransfer;
	let props;
	if ($[0] !== t0) {
		({onTransfer, onCover, onHoldBuffer, onResetHoldBuffer, onBudgetAction, month, ...props} = t0);
		$[0] = t0;
		$[1] = month;
		$[2] = onBudgetAction;
		$[3] = onCover;
		$[4] = onHoldBuffer;
		$[5] = onResetHoldBuffer;
		$[6] = onTransfer;
		$[7] = props;
	} else {
		month = $[1];
		onBudgetAction = $[2];
		onCover = $[3];
		onHoldBuffer = $[4];
		onResetHoldBuffer = $[5];
		onTransfer = $[6];
		props = $[7];
	}
	const { t } = useTranslation();
	const toBudget = useEnvelopeSheetValue(envelopeBudget.toBudget) ?? 0;
	const forNextMonth = useEnvelopeSheetValue(envelopeBudget.forNextMonth) ?? 0;
	const manualBuffered = useEnvelopeSheetValue(envelopeBudget.manualBuffered) ?? 0;
	const autoBuffered = useEnvelopeSheetValue(envelopeBudget.autoBuffered) ?? 0;
	let t1;
	if ($[8] !== t || $[9] !== toBudget) {
		t1 = toBudget > 0 ? [{
			name: "transfer",
			text: t("Move to a category")
		}] : [];
		$[8] = t;
		$[9] = toBudget;
		$[10] = t1;
	} else t1 = $[10];
	let t2;
	if ($[11] !== autoBuffered || $[12] !== t || $[13] !== toBudget) {
		t2 = autoBuffered === 0 && toBudget > 0 ? [{
			name: "buffer",
			text: t("Hold for next month")
		}] : [];
		$[11] = autoBuffered;
		$[12] = t;
		$[13] = toBudget;
		$[14] = t2;
	} else t2 = $[14];
	let t3;
	if ($[15] !== t || $[16] !== toBudget) {
		t3 = toBudget < 0 ? [{
			name: "cover",
			text: t("Cover from a category")
		}] : [];
		$[15] = t;
		$[16] = toBudget;
		$[17] = t3;
	} else t3 = $[17];
	let t4;
	let t5;
	if ($[18] !== forNextMonth || $[19] !== manualBuffered || $[20] !== t) {
		t4 = forNextMonth > 0 && manualBuffered === 0 ? [{
			name: "disable-auto-buffer",
			text: t("Disable current auto hold")
		}] : [];
		t5 = forNextMonth > 0 && manualBuffered !== 0 ? [{
			name: "reset-buffer",
			text: t("Reset next month's buffer")
		}] : [];
		$[18] = forNextMonth;
		$[19] = manualBuffered;
		$[20] = t;
		$[21] = t4;
		$[22] = t5;
	} else {
		t4 = $[21];
		t5 = $[22];
	}
	let t6;
	if ($[23] !== t1 || $[24] !== t2 || $[25] !== t3 || $[26] !== t4 || $[27] !== t5) {
		t6 = [
			...t1,
			...t2,
			...t3,
			...t4,
			...t5
		];
		$[23] = t1;
		$[24] = t2;
		$[25] = t3;
		$[26] = t4;
		$[27] = t5;
		$[28] = t6;
	} else t6 = $[28];
	const items = t6;
	let t7;
	if ($[29] !== month || $[30] !== onBudgetAction || $[31] !== onCover || $[32] !== onHoldBuffer || $[33] !== onResetHoldBuffer || $[34] !== onTransfer) {
		t7 = (name) => {
			bb50: switch (name) {
				case "transfer":
					onTransfer?.();
					break bb50;
				case "cover":
					onCover?.();
					break bb50;
				case "buffer":
					onHoldBuffer?.();
					onBudgetAction?.(month, "reset-income-carryover", {});
					break bb50;
				case "reset-buffer":
					onResetHoldBuffer?.();
					break bb50;
				case "disable-auto-buffer":
					onBudgetAction?.(month, "reset-income-carryover", {});
					break bb50;
				default: throw new Error(`Unrecognized menu option: ${name}`);
			}
		};
		$[29] = month;
		$[30] = onBudgetAction;
		$[31] = onCover;
		$[32] = onHoldBuffer;
		$[33] = onResetHoldBuffer;
		$[34] = onTransfer;
		$[35] = t7;
	} else t7 = $[35];
	let t8;
	if ($[36] !== items || $[37] !== t) {
		t8 = items.length > 0 ? items : [{
			name: "none",
			text: t("No actions available"),
			disabled: true
		}];
		$[36] = items;
		$[37] = t;
		$[38] = t8;
	} else t8 = $[38];
	let t9;
	if ($[39] !== props || $[40] !== t7 || $[41] !== t8) {
		t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Menu, {
			...props,
			onMenuSelect: t7,
			items: t8
		});
		$[39] = props;
		$[40] = t7;
		$[41] = t8;
		$[42] = t9;
	} else t9 = $[42];
	return t9;
}
//#endregion
//#region src/components/budget/envelope/budgetsummary/ToBudget.tsx
function ToBudget(t0) {
	const $ = (0, import_compiler_runtime.c)(52);
	const { month, prevMonthName, onBudgetAction, style, amountStyle, isCollapsed: t1 } = t0;
	const isCollapsed = t1 === void 0 ? false : t1;
	const [menuStep, _setMenuStep] = (0, import_react.useState)("actions");
	const triggerRef = (0, import_react.useRef)(null);
	const format = useFormat();
	const ref = (0, import_react.useRef)(null);
	let t2;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = (menu) => {
			if (menu) ref.current?.focus();
			_setMenuStep(menu);
		};
		$[0] = t2;
	} else t2 = $[0];
	const setMenuStep = t2;
	let t3;
	if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
		t3 = {
			name: envelopeBudget.toBudget,
			value: 0
		};
		$[1] = t3;
	} else t3 = $[1];
	const availableValue = useEnvelopeSheetValue(t3);
	if (typeof availableValue !== "number" && availableValue !== null) throw new Error("Expected availableValue to be a number but got " + availableValue);
	const { setMenuOpen, menuOpen, handleContextMenu, resetPosition, position, asContextMenu } = useContextMenu();
	let t4;
	if ($[2] !== resetPosition || $[3] !== setMenuOpen) {
		t4 = () => {
			resetPosition();
			setMenuOpen(true);
		};
		$[2] = resetPosition;
		$[3] = setMenuOpen;
		$[4] = t4;
	} else t4 = $[4];
	const t5 = !isCollapsed || menuOpen;
	let t6;
	if ($[5] !== amountStyle || $[6] !== handleContextMenu || $[7] !== prevMonthName || $[8] !== style || $[9] !== t4 || $[10] !== t5) {
		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			ref: triggerRef,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToBudgetAmount, {
				onClick: t4,
				prevMonthName,
				style,
				amountStyle,
				isTotalsListTooltipDisabled: t5,
				onContextMenu: handleContextMenu
			})
		});
		$[5] = amountStyle;
		$[6] = handleContextMenu;
		$[7] = prevMonthName;
		$[8] = style;
		$[9] = t4;
		$[10] = t5;
		$[11] = t6;
	} else t6 = $[11];
	const t7 = asContextMenu ? "bottom start" : "bottom";
	let t8;
	if ($[12] !== setMenuOpen) {
		t8 = () => {
			setMenuStep("actions");
			setMenuOpen(false);
		};
		$[12] = setMenuOpen;
		$[13] = t8;
	} else t8 = $[13];
	let t9;
	if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
		t9 = {
			width: 200,
			margin: 1
		};
		$[14] = t9;
	} else t9 = $[14];
	let t10;
	if ($[15] !== menuStep || $[16] !== month || $[17] !== onBudgetAction || $[18] !== setMenuOpen) {
		t10 = menuStep === "actions" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToBudgetMenu, {
			onTransfer: () => setMenuStep("transfer"),
			onCover: () => setMenuStep("cover"),
			onHoldBuffer: () => setMenuStep("buffer"),
			onResetHoldBuffer: () => {
				onBudgetAction(month, "reset-hold");
				setMenuOpen(false);
			},
			month,
			onBudgetAction
		});
		$[15] = menuStep;
		$[16] = month;
		$[17] = onBudgetAction;
		$[18] = setMenuOpen;
		$[19] = t10;
	} else t10 = $[19];
	let t11;
	if ($[20] !== menuStep || $[21] !== month || $[22] !== onBudgetAction || $[23] !== setMenuOpen) {
		t11 = menuStep === "buffer" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HoldMenu, {
			onClose: () => setMenuOpen(false),
			onSubmit: (amount) => {
				onBudgetAction(month, "hold", { amount });
			}
		});
		$[20] = menuStep;
		$[21] = month;
		$[22] = onBudgetAction;
		$[23] = setMenuOpen;
		$[24] = t11;
	} else t11 = $[24];
	let t12;
	if ($[25] !== availableValue || $[26] !== menuStep || $[27] !== month || $[28] !== onBudgetAction || $[29] !== setMenuOpen) {
		t12 = menuStep === "transfer" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TransferMenu, {
			initialAmount: availableValue,
			onClose: () => setMenuOpen(false),
			onSubmit: (amount_0, categoryId) => {
				onBudgetAction(month, "transfer-available", {
					amount: amount_0,
					category: categoryId
				});
			}
		});
		$[25] = availableValue;
		$[26] = menuStep;
		$[27] = month;
		$[28] = onBudgetAction;
		$[29] = setMenuOpen;
		$[30] = t12;
	} else t12 = $[30];
	let t13;
	if ($[31] !== availableValue || $[32] !== format || $[33] !== menuStep || $[34] !== month || $[35] !== onBudgetAction || $[36] !== setMenuOpen) {
		t13 = menuStep === "cover" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CoverMenu, {
			showToBeBudgeted: false,
			initialAmount: availableValue,
			onClose: () => setMenuOpen(false),
			onSubmit: (amount_1, categoryId_0) => {
				onBudgetAction(month, "cover-overbudgeted", {
					category: categoryId_0,
					amount: amount_1,
					currencyCode: format.currency.code
				});
			}
		});
		$[31] = availableValue;
		$[32] = format;
		$[33] = menuStep;
		$[34] = month;
		$[35] = onBudgetAction;
		$[36] = setMenuOpen;
		$[37] = t13;
	} else t13 = $[37];
	let t14;
	if ($[38] !== t10 || $[39] !== t11 || $[40] !== t12 || $[41] !== t13) {
		t14 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
			tabIndex: -1,
			ref,
			children: [
				t10,
				t11,
				t12,
				t13
			]
		});
		$[38] = t10;
		$[39] = t11;
		$[40] = t12;
		$[41] = t13;
		$[42] = t14;
	} else t14 = $[42];
	let t15;
	if ($[43] !== menuOpen || $[44] !== position || $[45] !== t14 || $[46] !== t7 || $[47] !== t8) {
		t15 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Popover, {
			triggerRef,
			placement: t7,
			isOpen: menuOpen,
			onOpenChange: t8,
			style: t9,
			isNonModal: true,
			...position,
			children: t14
		});
		$[43] = menuOpen;
		$[44] = position;
		$[45] = t14;
		$[46] = t7;
		$[47] = t8;
		$[48] = t15;
	} else t15 = $[48];
	let t16;
	if ($[49] !== t15 || $[50] !== t6) {
		t16 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [t6, t15] });
		$[49] = t15;
		$[50] = t6;
		$[51] = t16;
	} else t16 = $[51];
	return t16;
}
//#endregion
//#region src/components/budget/envelope/budgetsummary/BudgetSummary.tsx
var BudgetSummary = (0, import_react.memo)((t0) => {
	const $ = (0, import_compiler_runtime.c)(98);
	const { month } = t0;
	const locale = useLocale();
	const { currentMonth, summaryCollapsed: collapsed, onBudgetAction, onToggleSummaryCollapse } = useEnvelopeBudget();
	const [menuOpen, setMenuOpen] = (0, import_react.useState)(false);
	const triggerRef = (0, import_react.useRef)(null);
	const { showUndoNotification } = useUndo();
	let t1;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = function onMenuOpen() {
			setMenuOpen(true);
		};
		$[0] = t1;
	} else t1 = $[0];
	const onMenuOpen = t1;
	let t2;
	if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = function onMenuClose() {
			setMenuOpen(false);
		};
		$[1] = t2;
	} else t2 = $[1];
	const onMenuClose = t2;
	let t3;
	if ($[2] !== locale || $[3] !== month) {
		t3 = format$2(prevMonth(month), "MMM", locale);
		$[2] = locale;
		$[3] = month;
		$[4] = t3;
	} else t3 = $[4];
	const prevMonthName = t3;
	const ExpandOrCollapseIcon = collapsed ? SvgArrowButtonDown1 : SvgArrowButtonUp1;
	let t4;
	if ($[5] !== locale || $[6] !== month) {
		t4 = format$2(month, "MMMM ''yy", locale);
		$[5] = locale;
		$[6] = month;
		$[7] = t4;
	} else t4 = $[7];
	const displayMonth = t4;
	const { t } = useTranslation();
	const t5 = month === currentMonth ? theme.budgetCurrentMonth : theme.budgetOtherMonth;
	let t6;
	let t7;
	if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
		t6 = {
			opacity: 0,
			transition: "opacity .25s"
		};
		t7 = { opacity: 1 };
		$[8] = t6;
		$[9] = t7;
	} else {
		t6 = $[8];
		t7 = $[9];
	}
	let t8;
	if ($[10] !== t5) {
		t8 = {
			backgroundColor: t5,
			boxShadow: styles.cardShadow,
			borderRadius: 6,
			marginLeft: 0,
			marginRight: 0,
			marginTop: 5,
			flex: 1,
			cursor: "default",
			marginBottom: 5,
			overflow: "hidden",
			"& .hover-visible": t6,
			"&:hover .hover-visible": t7
		};
		$[10] = t5;
		$[11] = t8;
	} else t8 = $[11];
	let t9;
	if ($[12] !== month) {
		t9 = sheetForMonth(month);
		$[12] = month;
		$[13] = t9;
	} else t9 = $[13];
	let t10;
	if ($[14] !== collapsed) {
		t10 = {
			padding: "0 13px",
			...collapsed ? { margin: "10px 0" } : { marginTop: 16 }
		};
		$[14] = collapsed;
		$[15] = t10;
	} else t10 = $[15];
	let t11;
	if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
		t11 = {
			position: "absolute",
			left: 10,
			top: 0
		};
		$[16] = t11;
	} else t11 = $[16];
	let t12;
	if ($[17] !== collapsed || $[18] !== t) {
		t12 = collapsed ? t("Expand month summary") : t("Collapse month summary");
		$[17] = collapsed;
		$[18] = t;
		$[19] = t12;
	} else t12 = $[19];
	let t13;
	if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
		t13 = {
			color: theme.pageTextLight,
			margin: 1
		};
		$[20] = t13;
	} else t13 = $[20];
	let t14;
	if ($[21] !== ExpandOrCollapseIcon) {
		t14 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ExpandOrCollapseIcon, {
			width: 13,
			height: 13,
			style: t13
		});
		$[21] = ExpandOrCollapseIcon;
		$[22] = t14;
	} else t14 = $[22];
	let t15;
	if ($[23] !== onToggleSummaryCollapse || $[24] !== t12 || $[25] !== t14) {
		t15 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t11,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
				variant: "bare",
				"aria-label": t12,
				className: "hover-visible",
				onPress: onToggleSummaryCollapse,
				children: t14
			})
		});
		$[23] = onToggleSummaryCollapse;
		$[24] = t12;
		$[25] = t14;
		$[26] = t15;
	} else t15 = $[26];
	let t16;
	if ($[27] !== currentMonth || $[28] !== month) {
		t16 = css([{
			textAlign: "center",
			marginTop: 3,
			fontSize: 18,
			fontWeight: 500,
			textDecorationSkip: "ink"
		}, currentMonth === month && { fontWeight: "bold" }]);
		$[27] = currentMonth;
		$[28] = month;
		$[29] = t16;
	} else t16 = $[29];
	let t17;
	if ($[30] !== locale || $[31] !== month) {
		t17 = format$2(month, "MMMM", locale);
		$[30] = locale;
		$[31] = month;
		$[32] = t17;
	} else t17 = $[32];
	let t18;
	if ($[33] !== t16 || $[34] !== t17) {
		t18 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
			className: t16,
			children: t17
		});
		$[33] = t16;
		$[34] = t17;
		$[35] = t18;
	} else t18 = $[35];
	let t19;
	if ($[36] === Symbol.for("react.memo_cache_sentinel")) {
		t19 = {
			position: "absolute",
			right: 10,
			top: 0,
			flexDirection: "row",
			alignItems: "center"
		};
		$[36] = t19;
	} else t19 = $[36];
	const t20 = `budget-${month}`;
	let t21;
	if ($[37] !== t20) {
		t21 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NotesButton, {
			id: t20,
			width: 15,
			height: 15,
			tooltipPosition: "bottom right",
			defaultColor: theme.pageTextLight
		}) });
		$[37] = t20;
		$[38] = t21;
	} else t21 = $[38];
	let t22;
	if ($[39] === Symbol.for("react.memo_cache_sentinel")) {
		t22 = {
			userSelect: "none",
			marginLeft: 2
		};
		$[39] = t22;
	} else t22 = $[39];
	let t23;
	if ($[40] !== t) {
		t23 = t("Menu");
		$[40] = t;
		$[41] = t23;
	} else t23 = $[41];
	let t24;
	if ($[42] === Symbol.for("react.memo_cache_sentinel")) {
		t24 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgDotsHorizontalTriple, {
			width: 15,
			height: 15,
			style: { color: theme.pageTextLight }
		});
		$[42] = t24;
	} else t24 = $[42];
	let t25;
	if ($[43] !== t23) {
		t25 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
			ref: triggerRef,
			variant: "bare",
			"aria-label": t23,
			onPress: onMenuOpen,
			children: t24
		});
		$[43] = t23;
		$[44] = t25;
	} else t25 = $[44];
	let t26;
	let t27;
	let t28;
	if ($[45] !== displayMonth || $[46] !== month || $[47] !== onBudgetAction || $[48] !== showUndoNotification || $[49] !== t) {
		t26 = () => {
			onBudgetAction(month, "copy-last");
			onMenuClose();
			showUndoNotification({ message: t("{{displayMonth}} budgets have all been set to last month's budgeted amounts.", { displayMonth }) });
		};
		t27 = () => {
			onBudgetAction(month, "set-zero");
			onMenuClose();
			showUndoNotification({ message: t("{{displayMonth}} budgets have all been set to zero.", { displayMonth }) });
		};
		t28 = (numberOfMonths) => {
			onBudgetAction(month, `set-${numberOfMonths}-avg`);
			onMenuClose();
			showUndoNotification({ message: numberOfMonths === 12 ? t(`${displayMonth} budgets have all been set to yearly average.`) : t(`${displayMonth} budgets have all been set to ${numberOfMonths} month average.`) });
		};
		$[45] = displayMonth;
		$[46] = month;
		$[47] = onBudgetAction;
		$[48] = showUndoNotification;
		$[49] = t;
		$[50] = t26;
		$[51] = t27;
		$[52] = t28;
	} else {
		t26 = $[50];
		t27 = $[51];
		t28 = $[52];
	}
	let t29;
	if ($[53] !== month || $[54] !== onBudgetAction) {
		t29 = () => {
			onBudgetAction(month, "check-templates");
			onMenuClose();
		};
		$[53] = month;
		$[54] = onBudgetAction;
		$[55] = t29;
	} else t29 = $[55];
	let t30;
	let t31;
	let t32;
	if ($[56] !== displayMonth || $[57] !== month || $[58] !== onBudgetAction || $[59] !== showUndoNotification || $[60] !== t) {
		t30 = () => {
			onBudgetAction(month, "apply-goal-template");
			onMenuClose();
			showUndoNotification({ message: t("{{displayMonth}} budget templates have been applied.", { displayMonth }) });
		};
		t31 = () => {
			onBudgetAction(month, "overwrite-goal-template");
			onMenuClose();
			showUndoNotification({ message: t("{{displayMonth}} budget templates have been overwritten.", { displayMonth }) });
		};
		t32 = () => {
			onBudgetAction(month, "cleanup-goal-template");
			onMenuClose();
			showUndoNotification({ message: t("{{displayMonth}} end-of-month cleanup templates have been applied.", { displayMonth }) });
		};
		$[56] = displayMonth;
		$[57] = month;
		$[58] = onBudgetAction;
		$[59] = showUndoNotification;
		$[60] = t;
		$[61] = t30;
		$[62] = t31;
		$[63] = t32;
	} else {
		t30 = $[61];
		t31 = $[62];
		t32 = $[63];
	}
	let t33;
	if ($[64] !== t26 || $[65] !== t27 || $[66] !== t28 || $[67] !== t29 || $[68] !== t30 || $[69] !== t31 || $[70] !== t32) {
		t33 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BudgetMonthMenu, {
			onCopyLastMonthBudget: t26,
			onSetBudgetsToZero: t27,
			onSetMonthsAverage: t28,
			onCheckTemplates: t29,
			onApplyBudgetTemplates: t30,
			onOverwriteWithBudgetTemplates: t31,
			onEndOfMonthCleanup: t32
		});
		$[64] = t26;
		$[65] = t27;
		$[66] = t28;
		$[67] = t29;
		$[68] = t30;
		$[69] = t31;
		$[70] = t32;
		$[71] = t33;
	} else t33 = $[71];
	let t34;
	if ($[72] !== menuOpen || $[73] !== t33) {
		t34 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Popover, {
			triggerRef,
			isOpen: menuOpen,
			onOpenChange: onMenuClose,
			children: t33
		});
		$[72] = menuOpen;
		$[73] = t33;
		$[74] = t34;
	} else t34 = $[74];
	let t35;
	if ($[75] !== t25 || $[76] !== t34) {
		t35 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t22,
			children: [t25, t34]
		});
		$[75] = t25;
		$[76] = t34;
		$[77] = t35;
	} else t35 = $[77];
	let t36;
	if ($[78] !== t21 || $[79] !== t35) {
		t36 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t19,
			children: [t21, t35]
		});
		$[78] = t21;
		$[79] = t35;
		$[80] = t36;
	} else t36 = $[80];
	let t37;
	if ($[81] !== t10 || $[82] !== t15 || $[83] !== t18 || $[84] !== t36) {
		t37 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t10,
			children: [
				t15,
				t18,
				t36
			]
		});
		$[81] = t10;
		$[82] = t15;
		$[83] = t18;
		$[84] = t36;
		$[85] = t37;
	} else t37 = $[85];
	let t38;
	if ($[86] !== collapsed || $[87] !== month || $[88] !== onBudgetAction || $[89] !== prevMonthName) {
		t38 = collapsed ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: {
				alignItems: "center",
				padding: "10px 20px",
				justifyContent: "space-between",
				backgroundColor: theme.budgetCurrentMonth,
				borderTop: "1px solid " + theme.tableBorder
			},
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToBudget, {
				prevMonthName,
				month,
				onBudgetAction,
				isCollapsed: true
			})
		}) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TotalsList, {
			prevMonthName,
			style: {
				padding: "5px 0",
				marginTop: 17,
				backgroundColor: theme.budgetHeaderCurrentMonth,
				borderTopWidth: 1,
				borderBottomWidth: 1,
				borderColor: theme.tableBorder
			}
		}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: { margin: "23px 0" },
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToBudget, {
				prevMonthName,
				month,
				onBudgetAction
			})
		})] });
		$[86] = collapsed;
		$[87] = month;
		$[88] = onBudgetAction;
		$[89] = prevMonthName;
		$[90] = t38;
	} else t38 = $[90];
	let t39;
	if ($[91] !== t37 || $[92] !== t38 || $[93] !== t9) {
		t39 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SheetNameProvider, {
			name: t9,
			children: [t37, t38]
		});
		$[91] = t37;
		$[92] = t38;
		$[93] = t9;
		$[94] = t39;
	} else t39 = $[94];
	let t40;
	if ($[95] !== t39 || $[96] !== t8) {
		t40 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			"data-testid": "budget-summary",
			style: t8,
			children: t39
		});
		$[95] = t39;
		$[96] = t8;
		$[97] = t40;
	} else t40 = $[97];
	return t40;
});
BudgetSummary.displayName = "EnvelopeBudgetSummary";
//#endregion
//#region src/components/budget/envelope/EnvelopeBudgetComponents.tsx
function useEnvelopeSheetName(binding) {
	return useSheetName(binding);
}
function useEnvelopeSheetValue(binding) {
	return useSheetValue(binding);
}
var EnvelopeCellValue = (props) => {
	const $ = (0, import_compiler_runtime.c)(2);
	let t0;
	if ($[0] !== props) {
		t0 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CellValue, { ...props });
		$[0] = props;
		$[1] = t0;
	} else t0 = $[1];
	return t0;
};
var EnvelopeSheetCell = (props) => {
	const $ = (0, import_compiler_runtime.c)(2);
	let t0;
	if ($[0] !== props) {
		t0 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetCell, { ...props });
		$[0] = props;
		$[1] = t0;
	} else t0 = $[1];
	return t0;
};
var headerLabelStyle = {
	flex: 1,
	padding: "0 5px",
	textAlign: "right"
};
var cellStyle = {
	color: theme.tableHeaderText,
	fontWeight: 600
};
var BudgetTotalsMonth = (0, import_react.memo)(function BudgetTotalsMonth() {
	const $ = (0, import_compiler_runtime.c)(4);
	let t0;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t0 = {
			flex: 1,
			flexDirection: "row",
			marginRight: styles.monthRightPadding,
			paddingTop: 10,
			paddingBottom: 10,
			backgroundColor: theme.budgetCurrentMonth
		};
		$[0] = t0;
	} else t0 = $[0];
	let t1;
	if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: headerLabelStyle,
			children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
				style: { color: theme.tableHeaderText },
				children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Budgeted" })
			}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnvelopeCellValue, {
				binding: envelopeBudget.totalBudgeted,
				type: "financial",
				children: _temp$9
			})]
		});
		$[1] = t1;
	} else t1 = $[1];
	let t2;
	if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: headerLabelStyle,
			children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
				style: { color: theme.tableHeaderText },
				children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Spent" })
			}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnvelopeCellValue, {
				binding: envelopeBudget.totalSpent,
				type: "financial",
				children: _temp2$7
			})]
		});
		$[2] = t2;
	} else t2 = $[2];
	let t3;
	if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t0,
			children: [
				t1,
				t2,
				/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
					style: headerLabelStyle,
					children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
						style: { color: theme.tableHeaderText },
						children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Balance" })
					}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnvelopeCellValue, {
						binding: envelopeBudget.totalBalance,
						type: "financial",
						children: _temp3$4
					})]
				})
			]
		});
		$[3] = t3;
	} else t3 = $[3];
	return t3;
});
function IncomeHeaderMonth() {
	const $ = (0, import_compiler_runtime.c)(2);
	let t0;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t0 = {
			color: theme.tableHeaderText,
			alignItems: "center",
			paddingRight: 10,
			backgroundColor: theme.budgetCurrentMonth
		};
		$[0] = t0;
	} else t0 = $[0];
	let t1;
	if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Row, {
			style: t0,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
				style: {
					flex: 1,
					textAlign: "right"
				},
				children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Received" })
			})
		});
		$[1] = t1;
	} else t1 = $[1];
	return t1;
}
var ExpenseGroupMonth = (0, import_react.memo)(function ExpenseGroupMonth(t0) {
	const $ = (0, import_compiler_runtime.c)(22);
	const { month, group } = t0;
	const { id } = group;
	const t1 = isCurrentMonth(month) ? theme.budgetHeaderCurrentMonth : theme.budgetHeaderOtherMonth;
	let t2;
	if ($[0] !== t1) {
		t2 = {
			flex: 1,
			flexDirection: "row",
			backgroundColor: t1
		};
		$[0] = t1;
		$[1] = t2;
	} else t2 = $[1];
	let t3;
	if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
		t3 = {
			fontWeight: 600,
			...styles.tnum
		};
		$[2] = t3;
	} else t3 = $[2];
	let t4;
	if ($[3] !== id) {
		t4 = envelopeBudget.groupBudgeted(id);
		$[3] = id;
		$[4] = t4;
	} else t4 = $[4];
	let t5;
	if ($[5] !== t4) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnvelopeSheetCell, {
			name: "budgeted",
			width: "flex",
			textAlign: "right",
			style: t3,
			valueProps: {
				binding: t4,
				type: "financial"
			}
		});
		$[5] = t4;
		$[6] = t5;
	} else t5 = $[6];
	let t6;
	if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
		t6 = {
			fontWeight: 600,
			...styles.tnum
		};
		$[7] = t6;
	} else t6 = $[7];
	let t7;
	if ($[8] !== id) {
		t7 = envelopeBudget.groupSumAmount(id);
		$[8] = id;
		$[9] = t7;
	} else t7 = $[9];
	let t8;
	if ($[10] !== t7) {
		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnvelopeSheetCell, {
			name: "spent",
			width: "flex",
			textAlign: "right",
			style: t6,
			valueProps: {
				binding: t7,
				type: "financial"
			}
		});
		$[10] = t7;
		$[11] = t8;
	} else t8 = $[11];
	let t9;
	if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
		t9 = {
			fontWeight: 600,
			paddingRight: styles.monthRightPadding,
			...styles.tnum
		};
		$[12] = t9;
	} else t9 = $[12];
	let t10;
	if ($[13] !== id) {
		t10 = envelopeBudget.groupBalance(id);
		$[13] = id;
		$[14] = t10;
	} else t10 = $[14];
	let t11;
	if ($[15] !== t10) {
		t11 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnvelopeSheetCell, {
			name: "balance",
			width: "flex",
			textAlign: "right",
			style: t9,
			valueProps: {
				binding: t10,
				type: "financial"
			}
		});
		$[15] = t10;
		$[16] = t11;
	} else t11 = $[16];
	let t12;
	if ($[17] !== t11 || $[18] !== t2 || $[19] !== t5 || $[20] !== t8) {
		t12 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t2,
			children: [
				t5,
				t8,
				t11
			]
		});
		$[17] = t11;
		$[18] = t2;
		$[19] = t5;
		$[20] = t8;
		$[21] = t12;
	} else t12 = $[21];
	return t12;
});
var ExpenseCategoryMonth = (0, import_react.memo)(function ExpenseCategoryMonth(t0) {
	const $ = (0, import_compiler_runtime.c)(137);
	const { month, category, editing, onEdit, onBudgetAction, onShowActivity } = t0;
	const { t } = useTranslation();
	const format = useFormat();
	const budgetMenuTriggerRef = (0, import_react.useRef)(null);
	const balanceMenuTriggerRef = (0, import_react.useRef)(null);
	const { setMenuOpen: setBudgetMenuOpen, menuOpen: budgetMenuOpen, handleContextMenu: handleBudgetContextMenu, resetPosition: resetBudgetPosition, position: budgetPosition } = useContextMenu();
	const { setMenuOpen: setBalanceMenuOpen, menuOpen: balanceMenuOpen, handleContextMenu: handleBalanceContextMenu, resetPosition: resetBalancePosition, position: balancePosition } = useContextMenu();
	let t1;
	if ($[0] !== onBudgetAction || $[1] !== setBudgetMenuOpen) {
		t1 = (...t2) => {
			onBudgetAction(...t2);
			setBudgetMenuOpen(false);
		};
		$[0] = onBudgetAction;
		$[1] = setBudgetMenuOpen;
		$[2] = t1;
	} else t1 = $[2];
	const onMenuAction = t1;
	const { showUndoNotification } = useUndo();
	const navigate = useNavigate();
	let t2;
	if ($[3] !== category || $[4] !== month) {
		t2 = {
			category,
			month
		};
		$[3] = category;
		$[4] = month;
		$[5] = t2;
	} else t2 = $[5];
	const { schedule, scheduleStatus, isScheduleRecurring, description } = useCategoryScheduleGoalTemplateIndicator(t2);
	const showScheduleIndicator = schedule && scheduleStatus;
	const t3 = isCurrentMonth(month) ? theme.budgetCurrentMonth : theme.budgetOtherMonth;
	let t4;
	let t5;
	let t6;
	let t7;
	if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
		t4 = {
			opacity: 0,
			transition: "opacity .25s"
		};
		t5 = { opacity: 1 };
		t6 = {
			maxWidth: 0,
			overflow: "hidden",
			transition: "max-width 0s .25s"
		};
		t7 = {
			maxWidth: "300px",
			overflow: "visible",
			transition: "max-width 0s linear 0s"
		};
		$[6] = t4;
		$[7] = t5;
		$[8] = t6;
		$[9] = t7;
	} else {
		t4 = $[6];
		t5 = $[7];
		t6 = $[8];
		t7 = $[9];
	}
	let t8;
	if ($[10] !== t3) {
		t8 = {
			flex: 1,
			flexDirection: "row",
			backgroundColor: t3,
			"& .hover-visible": t4,
			"&:hover .hover-visible, & .force-visible .hover-visible": t5,
			"& .hover-expand": t6,
			"&:hover .hover-expand, & .hover-expand.force-visible": t7
		};
		$[10] = t3;
		$[11] = t8;
	} else t8 = $[11];
	let t9;
	if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
		t9 = {
			flex: 1,
			flexDirection: "row"
		};
		$[12] = t9;
	} else t9 = $[12];
	let t10;
	if ($[13] !== editing || $[14] !== handleBudgetContextMenu) {
		t10 = (e) => {
			if (editing) return;
			handleBudgetContextMenu(e);
		};
		$[13] = editing;
		$[14] = handleBudgetContextMenu;
		$[15] = t10;
	} else t10 = $[15];
	let t11;
	if ($[16] !== budgetMenuOpen || $[17] !== budgetPosition || $[18] !== category.id || $[19] !== editing || $[20] !== month || $[21] !== onMenuAction || $[22] !== resetBudgetPosition || $[23] !== setBudgetMenuOpen || $[24] !== showUndoNotification || $[25] !== t) {
		t11 = !editing && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: {
				paddingLeft: 3,
				alignItems: "center",
				justifyContent: "center",
				borderTopWidth: 1,
				borderBottomWidth: 1,
				borderColor: theme.tableBorder
			},
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NotesButton, {
				id: `${category.id}-${month}`,
				defaultColor: theme.pageTextLight
			})
		}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			className: `hover-expand ${budgetMenuOpen ? "force-visible" : ""}`,
			style: {
				flexDirection: "row",
				flexShrink: 1,
				paddingLeft: 3,
				alignItems: "center",
				justifyContent: "center",
				borderTopWidth: 1,
				borderBottomWidth: 1,
				borderColor: theme.tableBorder
			},
			children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
				variant: "bare",
				onPress: () => {
					resetBudgetPosition(2, -4);
					setBudgetMenuOpen(true);
				},
				style: { padding: 3 },
				children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgCheveronDown, {
					width: 14,
					height: 14,
					className: "hover-visible"
				})
			}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Popover, {
				triggerRef: budgetMenuTriggerRef,
				placement: "bottom left",
				isOpen: budgetMenuOpen,
				onOpenChange: () => setBudgetMenuOpen(false),
				style: { width: 200 },
				isNonModal: true,
				...budgetPosition,
				children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BudgetMenu, {
					onCopyLastMonthAverage: () => {
						onMenuAction(month, "copy-single-last", { category: category.id });
						showUndoNotification({ message: t("Budget set to last month's budget.") });
					},
					onSetMonthsAverage: (numberOfMonths) => {
						if (numberOfMonths !== 3 && numberOfMonths !== 6 && numberOfMonths !== 12) return;
						onMenuAction(month, `set-single-${numberOfMonths}-avg`, { category: category.id });
						showUndoNotification({ message: t("Budget set to {{numberOfMonths}}-month average.", { numberOfMonths }) });
					},
					onApplyBudgetTemplate: () => {
						onMenuAction(month, "apply-single-category-template", { category: category.id });
						showUndoNotification({ message: t("Budget template applied.") });
					}
				})
			})]
		})] });
		$[16] = budgetMenuOpen;
		$[17] = budgetPosition;
		$[18] = category.id;
		$[19] = editing;
		$[20] = month;
		$[21] = onMenuAction;
		$[22] = resetBudgetPosition;
		$[23] = setBudgetMenuOpen;
		$[24] = showUndoNotification;
		$[25] = t;
		$[26] = t11;
	} else t11 = $[26];
	let t12;
	if ($[27] !== category.id || $[28] !== month || $[29] !== onEdit) {
		t12 = () => onEdit(category.id, month);
		$[27] = category.id;
		$[28] = month;
		$[29] = onEdit;
		$[30] = t12;
	} else t12 = $[30];
	let t13;
	if ($[31] !== editing) {
		t13 = editing && { zIndex: 100 };
		$[31] = editing;
		$[32] = t13;
	} else t13 = $[32];
	let t14;
	if ($[33] !== t13) {
		t14 = {
			...t13,
			...styles.tnum
		};
		$[33] = t13;
		$[34] = t14;
	} else t14 = $[34];
	let t15;
	if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
		t15 = {
			cursor: "default",
			margin: 1,
			padding: "0 4px",
			borderRadius: 4,
			":hover": {
				boxShadow: "inset 0 0 0 1px " + theme.pageTextSubdued,
				backgroundColor: theme.budgetCurrentMonth
			}
		};
		$[35] = t15;
	} else t15 = $[35];
	let t16;
	if ($[36] !== category.id) {
		t16 = envelopeBudget.catBudgeted(category.id);
		$[36] = category.id;
		$[37] = t16;
	} else t16 = $[37];
	let t17;
	if ($[38] !== format.forEdit || $[39] !== format.fromEdit || $[40] !== t16) {
		t17 = {
			binding: t16,
			type: "financial",
			getValueStyle: makeAmountGrey,
			formatExpr: format.forEdit,
			unformatExpr: format.fromEdit
		};
		$[38] = format.forEdit;
		$[39] = format.fromEdit;
		$[40] = t16;
		$[41] = t17;
	} else t17 = $[41];
	let t18;
	if ($[42] !== onEdit) {
		t18 = () => {
			onEdit(null);
		};
		$[42] = onEdit;
		$[43] = t18;
	} else t18 = $[43];
	let t19;
	if ($[44] === Symbol.for("react.memo_cache_sentinel")) {
		t19 = { backgroundColor: theme.budgetCurrentMonth };
		$[44] = t19;
	} else t19 = $[44];
	let t20;
	if ($[45] !== t18) {
		t20 = {
			onBlur: t18,
			style: t19
		};
		$[45] = t18;
		$[46] = t20;
	} else t20 = $[46];
	let t21;
	if ($[47] !== category.id || $[48] !== month || $[49] !== onBudgetAction) {
		t21 = (parsedIntegerAmount) => {
			onBudgetAction(month, "budget-amount", {
				category: category.id,
				amount: parsedIntegerAmount ?? 0
			});
		};
		$[47] = category.id;
		$[48] = month;
		$[49] = onBudgetAction;
		$[50] = t21;
	} else t21 = $[50];
	let t22;
	if ($[51] !== editing || $[52] !== t12 || $[53] !== t14 || $[54] !== t17 || $[55] !== t20 || $[56] !== t21) {
		t22 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnvelopeSheetCell, {
			name: "budget",
			exposed: editing,
			focused: editing,
			width: "flex",
			onExpose: t12,
			style: t14,
			textAlign: "right",
			valueStyle: t15,
			valueProps: t17,
			inputProps: t20,
			onSave: t21
		});
		$[51] = editing;
		$[52] = t12;
		$[53] = t14;
		$[54] = t17;
		$[55] = t20;
		$[56] = t21;
		$[57] = t22;
	} else t22 = $[57];
	let t23;
	if ($[58] !== t10 || $[59] !== t11 || $[60] !== t22) {
		t23 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			ref: budgetMenuTriggerRef,
			style: t9,
			onContextMenu: t10,
			children: [t11, t22]
		});
		$[58] = t10;
		$[59] = t11;
		$[60] = t22;
		$[61] = t23;
	} else t23 = $[61];
	let t24;
	if ($[62] === Symbol.for("react.memo_cache_sentinel")) {
		t24 = { textAlign: "right" };
		$[62] = t24;
	} else t24 = $[62];
	let t25;
	if ($[63] !== category.id || $[64] !== month || $[65] !== onShowActivity) {
		t25 = () => onShowActivity(category.id, month);
		$[63] = category.id;
		$[64] = month;
		$[65] = onShowActivity;
		$[66] = t25;
	} else t25 = $[66];
	const t26 = showScheduleIndicator ? "space-between" : "flex-end";
	let t27;
	if ($[67] !== t26) {
		t27 = {
			flexDirection: "row",
			alignItems: "center",
			justifyContent: t26,
			gap: 2
		};
		$[67] = t26;
		$[68] = t27;
	} else t27 = $[68];
	let t28;
	if ($[69] !== description || $[70] !== isScheduleRecurring || $[71] !== navigate || $[72] !== schedule || $[73] !== scheduleStatus || $[74] !== showScheduleIndicator) {
		t28 = showScheduleIndicator && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			title: description,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
				variant: "bare",
				style: { color: scheduleStatus === "missed" ? theme.budgetNumberNegative : scheduleStatus === "due" ? theme.templateNumberUnderFunded : theme.upcomingText },
				onPress: () => schedule._account ? navigate(`/accounts/${schedule._account}`) : navigate("/accounts"),
				children: isScheduleRecurring ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgArrowsSynchronize, { style: {
					width: 12,
					height: 12
				} }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgCalendar3, { style: {
					width: 12,
					height: 12
				} })
			})
		});
		$[69] = description;
		$[70] = isScheduleRecurring;
		$[71] = navigate;
		$[72] = schedule;
		$[73] = scheduleStatus;
		$[74] = showScheduleIndicator;
		$[75] = t28;
	} else t28 = $[75];
	let t29;
	if ($[76] !== category.id) {
		t29 = envelopeBudget.catSumAmount(category.id);
		$[76] = category.id;
		$[77] = t29;
	} else t29 = $[77];
	let t30;
	if ($[78] !== t29) {
		t30 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnvelopeCellValue, {
			binding: t29,
			type: "financial",
			children: _temp4$3
		});
		$[78] = t29;
		$[79] = t30;
	} else t30 = $[79];
	let t31;
	if ($[80] !== t25 || $[81] !== t27 || $[82] !== t28 || $[83] !== t30) {
		t31 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Field, {
			name: "spent",
			width: "flex",
			style: t24,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
				"data-testid": "category-month-spent",
				onClick: t25,
				style: t27,
				children: [t28, t30]
			})
		});
		$[80] = t25;
		$[81] = t27;
		$[82] = t28;
		$[83] = t30;
		$[84] = t31;
	} else t31 = $[84];
	let t32;
	if ($[85] === Symbol.for("react.memo_cache_sentinel")) {
		t32 = {
			paddingRight: styles.monthRightPadding,
			textAlign: "right"
		};
		$[85] = t32;
	} else t32 = $[85];
	let t33;
	if ($[86] !== resetBalancePosition || $[87] !== setBalanceMenuOpen) {
		t33 = () => {
			resetBalancePosition(-6, -4);
			setBalanceMenuOpen(true);
		};
		$[86] = resetBalancePosition;
		$[87] = setBalanceMenuOpen;
		$[88] = t33;
	} else t33 = $[88];
	let t34;
	if ($[89] !== handleBalanceContextMenu || $[90] !== resetBalancePosition) {
		t34 = (e_0) => {
			handleBalanceContextMenu(e_0);
			const rect = e_0.currentTarget.getBoundingClientRect();
			resetBalancePosition(e_0.clientX - rect.right + 200 - 8, e_0.clientY - rect.bottom - 8);
		};
		$[89] = handleBalanceContextMenu;
		$[90] = resetBalancePosition;
		$[91] = t34;
	} else t34 = $[91];
	let t35;
	if ($[92] === Symbol.for("react.memo_cache_sentinel")) {
		t35 = {
			justifyContent: "flex-end",
			background: "transparent",
			width: "100%",
			padding: 0
		};
		$[92] = t35;
	} else t35 = $[92];
	let t36;
	if ($[93] !== category.id) {
		t36 = envelopeBudget.catCarryover(category.id);
		$[93] = category.id;
		$[94] = t36;
	} else t36 = $[94];
	let t37;
	if ($[95] !== category.id) {
		t37 = envelopeBudget.catBalance(category.id);
		$[95] = category.id;
		$[96] = t37;
	} else t37 = $[96];
	let t38;
	if ($[97] !== category.id) {
		t38 = envelopeBudget.catGoal(category.id);
		$[97] = category.id;
		$[98] = t38;
	} else t38 = $[98];
	let t39;
	if ($[99] !== category.id) {
		t39 = envelopeBudget.catBudgeted(category.id);
		$[99] = category.id;
		$[100] = t39;
	} else t39 = $[100];
	let t40;
	if ($[101] !== category.id) {
		t40 = envelopeBudget.catLongGoal(category.id);
		$[101] = category.id;
		$[102] = t40;
	} else t40 = $[102];
	let t41;
	if ($[103] !== balanceMenuOpen || $[104] !== t36 || $[105] !== t37 || $[106] !== t38 || $[107] !== t39 || $[108] !== t40) {
		t41 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BalanceWithCarryover, {
			carryover: t36,
			balance: t37,
			goal: t38,
			budgeted: t39,
			longGoal: t40,
			tooltipDisabled: balanceMenuOpen
		});
		$[103] = balanceMenuOpen;
		$[104] = t36;
		$[105] = t37;
		$[106] = t38;
		$[107] = t39;
		$[108] = t40;
		$[109] = t41;
	} else t41 = $[109];
	let t42;
	if ($[110] !== t33 || $[111] !== t34 || $[112] !== t41) {
		t42 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
			variant: "bare",
			onPress: t33,
			onContextMenu: t34,
			style: t35,
			children: t41
		});
		$[110] = t33;
		$[111] = t34;
		$[112] = t41;
		$[113] = t42;
	} else t42 = $[113];
	let t43;
	if ($[114] !== setBalanceMenuOpen) {
		t43 = () => setBalanceMenuOpen(false);
		$[114] = setBalanceMenuOpen;
		$[115] = t43;
	} else t43 = $[115];
	let t44;
	if ($[116] === Symbol.for("react.memo_cache_sentinel")) {
		t44 = {
			margin: 1,
			minWidth: 190
		};
		$[116] = t44;
	} else t44 = $[116];
	let t45;
	if ($[117] !== setBalanceMenuOpen) {
		t45 = () => setBalanceMenuOpen(false);
		$[117] = setBalanceMenuOpen;
		$[118] = t45;
	} else t45 = $[118];
	let t46;
	if ($[119] !== category.id || $[120] !== month || $[121] !== onBudgetAction || $[122] !== t45) {
		t46 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BalanceMovementMenu, {
			categoryId: category.id,
			month,
			onBudgetAction,
			onClose: t45
		});
		$[119] = category.id;
		$[120] = month;
		$[121] = onBudgetAction;
		$[122] = t45;
		$[123] = t46;
	} else t46 = $[123];
	let t47;
	if ($[124] !== balanceMenuOpen || $[125] !== balancePosition || $[126] !== t43 || $[127] !== t46) {
		t47 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Popover, {
			triggerRef: balanceMenuTriggerRef,
			placement: "bottom end",
			isOpen: balanceMenuOpen,
			onOpenChange: t43,
			style: t44,
			isNonModal: true,
			...balancePosition,
			children: t46
		});
		$[124] = balanceMenuOpen;
		$[125] = balancePosition;
		$[126] = t43;
		$[127] = t46;
		$[128] = t47;
	} else t47 = $[128];
	let t48;
	if ($[129] !== t42 || $[130] !== t47) {
		t48 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Field, {
			ref: balanceMenuTriggerRef,
			name: "balance",
			width: "flex",
			style: t32,
			children: [t42, t47]
		});
		$[129] = t42;
		$[130] = t47;
		$[131] = t48;
	} else t48 = $[131];
	let t49;
	if ($[132] !== t23 || $[133] !== t31 || $[134] !== t48 || $[135] !== t8) {
		t49 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t8,
			children: [
				t23,
				t31,
				t48
			]
		});
		$[132] = t23;
		$[133] = t31;
		$[134] = t48;
		$[135] = t8;
		$[136] = t49;
	} else t49 = $[136];
	return t49;
});
function IncomeGroupMonth(t0) {
	const $ = (0, import_compiler_runtime.c)(6);
	const { month } = t0;
	let t1;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = { flex: 1 };
		$[0] = t1;
	} else t1 = $[0];
	const t2 = isCurrentMonth(month) ? theme.budgetHeaderCurrentMonth : theme.budgetHeaderOtherMonth;
	let t3;
	if ($[1] !== t2) {
		t3 = {
			fontWeight: 600,
			paddingRight: styles.monthRightPadding,
			...styles.tnum,
			backgroundColor: t2
		};
		$[1] = t2;
		$[2] = t3;
	} else t3 = $[2];
	let t4;
	if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
		t4 = {
			binding: envelopeBudget.groupIncomeReceived,
			type: "financial"
		};
		$[3] = t4;
	} else t4 = $[3];
	let t5;
	if ($[4] !== t3) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t1,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnvelopeSheetCell, {
				name: "received",
				width: "flex",
				textAlign: "right",
				style: t3,
				valueProps: t4
			})
		});
		$[4] = t3;
		$[5] = t5;
	} else t5 = $[5];
	return t5;
}
function IncomeCategoryMonth(t0) {
	const $ = (0, import_compiler_runtime.c)(56);
	const { category, isLast, month, onShowActivity, onBudgetAction } = t0;
	const incomeMenuTriggerRef = (0, import_react.useRef)(null);
	const { setMenuOpen: setIncomeMenuOpen, menuOpen: incomeMenuOpen, handleContextMenu: handleIncomeContextMenu, resetPosition: resetIncomePosition, position: incomePosition } = useContextMenu();
	let t1;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = { flex: 1 };
		$[0] = t1;
	} else t1 = $[0];
	let t2;
	if ($[1] !== isLast) {
		t2 = isLast && { borderBottomWidth: 0 };
		$[1] = isLast;
		$[2] = t2;
	} else t2 = $[2];
	const t3 = isCurrentMonth(month) ? theme.budgetCurrentMonth : theme.budgetOtherMonth;
	let t4;
	if ($[3] !== t2 || $[4] !== t3) {
		t4 = {
			textAlign: "right",
			...t2,
			backgroundColor: t3
		};
		$[3] = t2;
		$[4] = t3;
		$[5] = t4;
	} else t4 = $[5];
	let t5;
	if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
		t5 = {
			display: "flex",
			flexDirection: "row",
			alignItems: "center",
			justifyContent: "flex-end",
			position: "relative"
		};
		$[6] = t5;
	} else t5 = $[6];
	let t6;
	if ($[7] !== resetIncomePosition || $[8] !== setIncomeMenuOpen) {
		t6 = () => {
			resetIncomePosition(-6, -4);
			setIncomeMenuOpen(true);
		};
		$[7] = resetIncomePosition;
		$[8] = setIncomeMenuOpen;
		$[9] = t6;
	} else t6 = $[9];
	let t7;
	if ($[10] !== handleIncomeContextMenu || $[11] !== resetIncomePosition) {
		t7 = (e) => {
			handleIncomeContextMenu(e);
			const rect = e.currentTarget.getBoundingClientRect();
			resetIncomePosition(e.clientX - rect.right + 200 - 8, e.clientY - rect.bottom - 8);
		};
		$[10] = handleIncomeContextMenu;
		$[11] = resetIncomePosition;
		$[12] = t7;
	} else t7 = $[12];
	let t8;
	if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
		t8 = {
			background: "transparent",
			padding: 0,
			paddingRight: styles.monthRightPadding
		};
		$[13] = t8;
	} else t8 = $[13];
	let t9;
	if ($[14] !== category.id) {
		t9 = envelopeBudget.catCarryover(category.id);
		$[14] = category.id;
		$[15] = t9;
	} else t9 = $[15];
	let t10;
	if ($[16] !== category.id) {
		t10 = envelopeBudget.catSumAmount(category.id);
		$[16] = category.id;
		$[17] = t10;
	} else t10 = $[17];
	let t11;
	if ($[18] !== category.id) {
		t11 = envelopeBudget.catGoal(category.id);
		$[18] = category.id;
		$[19] = t11;
	} else t11 = $[19];
	let t12;
	if ($[20] !== category.id) {
		t12 = envelopeBudget.catBudgeted(category.id);
		$[20] = category.id;
		$[21] = t12;
	} else t12 = $[21];
	let t13;
	if ($[22] !== category.id) {
		t13 = envelopeBudget.catLongGoal(category.id);
		$[22] = category.id;
		$[23] = t13;
	} else t13 = $[23];
	let t14;
	if ($[24] !== t10 || $[25] !== t11 || $[26] !== t12 || $[27] !== t13 || $[28] !== t9) {
		t14 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BalanceWithCarryover, {
			carryover: t9,
			balance: t10,
			goal: t11,
			budgeted: t12,
			longGoal: t13
		});
		$[24] = t10;
		$[25] = t11;
		$[26] = t12;
		$[27] = t13;
		$[28] = t9;
		$[29] = t14;
	} else t14 = $[29];
	let t15;
	if ($[30] !== t14 || $[31] !== t6 || $[32] !== t7) {
		t15 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
			variant: "bare",
			onPress: t6,
			onContextMenu: t7,
			style: t8,
			children: t14
		});
		$[30] = t14;
		$[31] = t6;
		$[32] = t7;
		$[33] = t15;
	} else t15 = $[33];
	let t16;
	if ($[34] !== setIncomeMenuOpen) {
		t16 = () => setIncomeMenuOpen(false);
		$[34] = setIncomeMenuOpen;
		$[35] = t16;
	} else t16 = $[35];
	let t17;
	if ($[36] === Symbol.for("react.memo_cache_sentinel")) {
		t17 = { margin: 1 };
		$[36] = t17;
	} else t17 = $[36];
	let t18;
	if ($[37] !== setIncomeMenuOpen) {
		t18 = () => setIncomeMenuOpen(false);
		$[37] = setIncomeMenuOpen;
		$[38] = t18;
	} else t18 = $[38];
	let t19;
	if ($[39] !== category.id || $[40] !== month || $[41] !== onBudgetAction || $[42] !== onShowActivity || $[43] !== t18) {
		t19 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IncomeMenu, {
			categoryId: category.id,
			month,
			onBudgetAction,
			onShowActivity,
			onClose: t18
		});
		$[39] = category.id;
		$[40] = month;
		$[41] = onBudgetAction;
		$[42] = onShowActivity;
		$[43] = t18;
		$[44] = t19;
	} else t19 = $[44];
	let t20;
	if ($[45] !== incomeMenuOpen || $[46] !== incomePosition || $[47] !== t16 || $[48] !== t19) {
		t20 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Popover, {
			triggerRef: incomeMenuTriggerRef,
			placement: "bottom end",
			isOpen: incomeMenuOpen,
			onOpenChange: t16,
			style: t17,
			isNonModal: true,
			...incomePosition,
			children: t19
		});
		$[45] = incomeMenuOpen;
		$[46] = incomePosition;
		$[47] = t16;
		$[48] = t19;
		$[49] = t20;
	} else t20 = $[49];
	let t21;
	if ($[50] !== t15 || $[51] !== t20) {
		t21 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			name: "received",
			style: t5,
			children: [t15, t20]
		});
		$[50] = t15;
		$[51] = t20;
		$[52] = t21;
	} else t21 = $[52];
	let t22;
	if ($[53] !== t21 || $[54] !== t4) {
		t22 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t1,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Field, {
				name: "received",
				width: "flex",
				truncate: false,
				ref: incomeMenuTriggerRef,
				style: t4,
				children: t21
			})
		});
		$[53] = t21;
		$[54] = t4;
		$[55] = t22;
	} else t22 = $[55];
	return t22;
}
function _temp$9(props) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CellValueText, {
		...props,
		value: -props.value,
		style: cellStyle
	});
}
function _temp2$7(props_0) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CellValueText, {
		...props_0,
		style: cellStyle
	});
}
function _temp3$4(props_1) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CellValueText, {
		...props_1,
		style: cellStyle
	});
}
function _temp4$3(props) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CellValueText, {
		...props,
		className: css({
			cursor: "pointer",
			":hover": { textDecoration: "underline" },
			...makeAmountGrey(props.value)
		})
	});
}
//#endregion
//#region src/components/autocomplete/CategoryAutocomplete.tsx
function CategoryList(t0) {
	const $ = (0, import_compiler_runtime.c)(38);
	const { items, getItemProps, highlightedIndex, embedded, footer, renderSplitTransactionButton: t1, renderCategoryItemGroupHeader: t2, renderCategoryItem: t3, showHiddenItems, showBalances } = t0;
	const renderSplitTransactionButton = t1 === void 0 ? defaultRenderSplitTransactionButton : t1;
	const renderCategoryItemGroupHeader = t2 === void 0 ? defaultRenderCategoryItemGroupHeader : t2;
	const renderCategoryItem = t3 === void 0 ? defaultRenderCategoryItem$1 : t3;
	const { t } = useTranslation();
	let t4;
	if ($[0] !== items) {
		t4 = items.reduce(_temp$8, {
			splitTransaction: null,
			groupedCategories: []
		});
		$[0] = items;
		$[1] = t4;
	} else t4 = $[1];
	const { splitTransaction, groupedCategories } = t4;
	let t5;
	if ($[2] !== embedded) {
		t5 = !embedded && { maxHeight: 175 };
		$[2] = embedded;
		$[3] = t5;
	} else t5 = $[3];
	let t6;
	if ($[4] !== t5) {
		t6 = {
			overflowY: "auto",
			willChange: "transform",
			padding: "5px 0",
			...t5
		};
		$[4] = t5;
		$[5] = t6;
	} else t6 = $[5];
	let t7;
	if ($[6] !== embedded || $[7] !== getItemProps || $[8] !== highlightedIndex || $[9] !== renderSplitTransactionButton || $[10] !== splitTransaction) {
		t7 = splitTransaction && (() => {
			const { onClick, ...restSplitButtonProps } = getItemProps ? getItemProps({ item: splitTransaction }) : {};
			return renderSplitTransactionButton({
				key: "split",
				...restSplitButtonProps,
				onClick,
				highlighted: splitTransaction.highlightedIndex === highlightedIndex,
				embedded
			});
		})();
		$[6] = embedded;
		$[7] = getItemProps;
		$[8] = highlightedIndex;
		$[9] = renderSplitTransactionButton;
		$[10] = splitTransaction;
		$[11] = t7;
	} else t7 = $[11];
	let t8;
	if ($[12] !== embedded || $[13] !== getItemProps || $[14] !== groupedCategories || $[15] !== highlightedIndex || $[16] !== renderCategoryItem || $[17] !== renderCategoryItemGroupHeader || $[18] !== showBalances || $[19] !== showHiddenItems || $[20] !== t) {
		let t9;
		if ($[22] !== embedded || $[23] !== getItemProps || $[24] !== highlightedIndex || $[25] !== renderCategoryItem || $[26] !== renderCategoryItemGroupHeader || $[27] !== showBalances || $[28] !== showHiddenItems || $[29] !== t) {
			t9 = (t10) => {
				const { group, categories } = t10;
				if (!group) return null;
				return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [renderCategoryItemGroupHeader({
					title: `${group.name}${group.hidden ? ` ${t("(hidden)")}` : ""}`,
					style: { ...showHiddenItems && group.hidden && { color: theme.pageTextSubdued } }
				}), categories.map((item_0) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children: renderCategoryItem({
					...getItemProps ? getItemProps({ item: item_0 }) : {},
					item: item_0,
					highlighted: highlightedIndex === item_0.highlightedIndex,
					embedded,
					style: { ...showHiddenItems && (item_0.hidden || group.hidden) && { color: theme.pageTextSubdued } },
					showBalances
				}) }, item_0.id))] }, group.id);
			};
			$[22] = embedded;
			$[23] = getItemProps;
			$[24] = highlightedIndex;
			$[25] = renderCategoryItem;
			$[26] = renderCategoryItemGroupHeader;
			$[27] = showBalances;
			$[28] = showHiddenItems;
			$[29] = t;
			$[30] = t9;
		} else t9 = $[30];
		t8 = groupedCategories.map(t9);
		$[12] = embedded;
		$[13] = getItemProps;
		$[14] = groupedCategories;
		$[15] = highlightedIndex;
		$[16] = renderCategoryItem;
		$[17] = renderCategoryItemGroupHeader;
		$[18] = showBalances;
		$[19] = showHiddenItems;
		$[20] = t;
		$[21] = t8;
	} else t8 = $[21];
	let t9;
	if ($[31] !== t6 || $[32] !== t7 || $[33] !== t8) {
		t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t6,
			children: [t7, t8]
		});
		$[31] = t6;
		$[32] = t7;
		$[33] = t8;
		$[34] = t9;
	} else t9 = $[34];
	let t10;
	if ($[35] !== footer || $[36] !== t9) {
		t10 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, { children: [t9, footer] });
		$[35] = footer;
		$[36] = t9;
		$[37] = t10;
	} else t10 = $[37];
	return t10;
}
function _temp$8(acc, item, index) {
	if (item.id === "split") {
		acc.splitTransaction = {
			...item,
			highlightedIndex: index
		};
		return acc;
	}
	const groupId = item.group?.id || "";
	const existing = acc.groupedCategories.find((x) => x.group?.id === groupId);
	const itemWithIndex = {
		...item,
		highlightedIndex: index
	};
	if (!existing) acc.groupedCategories.push({
		group: item.group ?? null,
		categories: [itemWithIndex]
	});
	else existing.categories.push(itemWithIndex);
	return acc;
}
function CategoryAutocomplete(t0) {
	const $ = (0, import_compiler_runtime.c)(31);
	let categoryGroups;
	let closeOnBlur;
	let embedded;
	let props;
	let renderCategoryItem;
	let renderCategoryItemGroupHeader;
	let renderSplitTransactionButton;
	let showHiddenCategories;
	let showSplitOption;
	let t1;
	if ($[0] !== t0) {
		({categoryGroups, showBalances: t1, showSplitOption, embedded, closeOnBlur, renderSplitTransactionButton, renderCategoryItemGroupHeader, renderCategoryItem, showHiddenCategories, ...props} = t0);
		$[0] = t0;
		$[1] = categoryGroups;
		$[2] = closeOnBlur;
		$[3] = embedded;
		$[4] = props;
		$[5] = renderCategoryItem;
		$[6] = renderCategoryItemGroupHeader;
		$[7] = renderSplitTransactionButton;
		$[8] = showHiddenCategories;
		$[9] = showSplitOption;
		$[10] = t1;
	} else {
		categoryGroups = $[1];
		closeOnBlur = $[2];
		embedded = $[3];
		props = $[4];
		renderCategoryItem = $[5];
		renderCategoryItemGroupHeader = $[6];
		renderSplitTransactionButton = $[7];
		showHiddenCategories = $[8];
		showSplitOption = $[9];
		t1 = $[10];
	}
	const showBalances = t1 === void 0 ? true : t1;
	const { data: t2 } = useCategories();
	let t3;
	if ($[11] !== t2) {
		t3 = t2 === void 0 ? { grouped: [] } : t2;
		$[11] = t2;
		$[12] = t3;
	} else t3 = $[12];
	const { grouped: defaultCategoryGroups } = t3;
	let t4;
	if ($[13] !== categoryGroups || $[14] !== defaultCategoryGroups || $[15] !== showHiddenCategories || $[16] !== showSplitOption) {
		bb0: {
			const allSuggestions = (categoryGroups || defaultCategoryGroups).reduce(_temp2$6, showSplitOption ? [{
				id: "split",
				name: ""
			}] : []);
			if (!showHiddenCategories) {
				t4 = allSuggestions.filter(_temp3$3);
				break bb0;
			}
			t4 = allSuggestions;
		}
		$[13] = categoryGroups;
		$[14] = defaultCategoryGroups;
		$[15] = showHiddenCategories;
		$[16] = showSplitOption;
		$[17] = t4;
	} else t4 = $[17];
	const categorySuggestions = t4;
	const filterSuggestions = _temp8$1;
	let t5;
	if ($[18] !== embedded || $[19] !== renderCategoryItem || $[20] !== renderCategoryItemGroupHeader || $[21] !== renderSplitTransactionButton || $[22] !== showBalances || $[23] !== showHiddenCategories) {
		t5 = (items, getItemProps, highlightedIndex) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CategoryList, {
			items,
			embedded,
			getItemProps,
			highlightedIndex,
			renderSplitTransactionButton,
			renderCategoryItemGroupHeader,
			renderCategoryItem,
			showHiddenItems: showHiddenCategories,
			showBalances
		});
		$[18] = embedded;
		$[19] = renderCategoryItem;
		$[20] = renderCategoryItemGroupHeader;
		$[21] = renderSplitTransactionButton;
		$[22] = showBalances;
		$[23] = showHiddenCategories;
		$[24] = t5;
	} else t5 = $[24];
	let t6;
	if ($[25] !== categorySuggestions || $[26] !== closeOnBlur || $[27] !== embedded || $[28] !== props || $[29] !== t5) {
		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Autocomplete, {
			strict: true,
			highlightFirst: true,
			embedded,
			closeOnBlur,
			getHighlightedIndex: _temp9$1,
			filterSuggestions,
			suggestions: categorySuggestions,
			renderItems: t5,
			...props
		});
		$[25] = categorySuggestions;
		$[26] = closeOnBlur;
		$[27] = embedded;
		$[28] = props;
		$[29] = t5;
		$[30] = t6;
	} else t6 = $[30];
	return t6;
}
function _temp9$1(suggestions_0) {
	if (suggestions_0.length === 0) return null;
	else if (suggestions_0[0].id === "split") return suggestions_0.length > 1 ? 1 : null;
	return 0;
}
function _temp8$1(suggestions, value) {
	const splitItem = suggestions.find(_temp4$2);
	const realSuggestions = suggestions.filter(_temp5$2);
	if (!value) return suggestions;
	const filtered = new Fzf(realSuggestions, {
		selector: _temp6$1,
		limit: 100
	}).find(value).map(_temp7$1);
	return splitItem ? [splitItem, ...filtered] : filtered;
}
function _temp7$1(result) {
	return result.item;
}
function _temp6$1(item) {
	return item.group ? item.group.name + " " + item.name : item.name;
}
function _temp5$2(s_0) {
	return s_0.id !== "split";
}
function _temp4$2(s) {
	return s.id === "split";
}
function _temp3$3(suggestion) {
	return suggestion.id === "split" || !suggestion.hidden && !suggestion.group?.hidden;
}
function _temp2$6(list, group) {
	return list.concat((group.categories || []).filter((category) => category.group === group.id).map((category_0) => ({
		...category_0,
		group
	})));
}
function defaultRenderCategoryItemGroupHeader(props) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ItemHeader, {
		...props,
		type: "category"
	});
}
function SplitTransactionButton(t0) {
	const $ = (0, import_compiler_runtime.c)(19);
	let Icon;
	let embedded;
	let highlighted;
	let props;
	let style;
	if ($[0] !== t0) {
		({Icon, highlighted, embedded, style, ...props} = t0);
		$[0] = t0;
		$[1] = Icon;
		$[2] = embedded;
		$[3] = highlighted;
		$[4] = props;
		$[5] = style;
	} else {
		Icon = $[1];
		embedded = $[2];
		highlighted = $[3];
		props = $[4];
		style = $[5];
	}
	const t1 = highlighted ? theme.menuAutoCompleteBackgroundHover : "transparent";
	const t2 = embedded ? 4 : 0;
	let t3;
	if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
		t3 = { backgroundColor: "rgba(100, 100, 100, .25)" };
		$[6] = t3;
	} else t3 = $[6];
	let t4;
	if ($[7] !== style || $[8] !== t1 || $[9] !== t2) {
		t4 = {
			backgroundColor: t1,
			borderRadius: t2,
			flexShrink: 0,
			flexDirection: "row",
			alignItems: "center",
			fontSize: 11,
			fontWeight: 500,
			color: theme.noticeTextMenu,
			padding: "6px 8px",
			":active": t3,
			...style
		};
		$[7] = style;
		$[8] = t1;
		$[9] = t2;
		$[10] = t4;
	} else t4 = $[10];
	let t5;
	if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
		t5 = { lineHeight: 0 };
		$[11] = t5;
	} else t5 = $[11];
	let t6;
	if ($[12] !== Icon) {
		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
			style: t5,
			children: Icon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { style: { marginRight: 5 } }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgSplit, {
				width: 10,
				height: 10,
				style: { marginRight: 5 }
			})
		});
		$[12] = Icon;
		$[13] = t6;
	} else t6 = $[13];
	let t7;
	if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
		t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Split Transaction" });
		$[14] = t7;
	} else t7 = $[14];
	let t8;
	if ($[15] !== props || $[16] !== t4 || $[17] !== t6) {
		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			role: "button",
			style: t4,
			"data-testid": "split-transaction-button",
			...props,
			children: [t6, t7]
		});
		$[15] = props;
		$[16] = t4;
		$[17] = t6;
		$[18] = t8;
	} else t8 = $[18];
	return t8;
}
function defaultRenderSplitTransactionButton(props) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SplitTransactionButton, { ...props });
}
function CategoryItem(t0) {
	const $ = (0, import_compiler_runtime.c)(37);
	let className;
	let embedded;
	let highlighted;
	let item;
	let props;
	let showBalances;
	let style;
	if ($[0] !== t0) {
		({item, className, style, highlighted, embedded, showBalances, ...props} = t0);
		$[0] = t0;
		$[1] = className;
		$[2] = embedded;
		$[3] = highlighted;
		$[4] = item;
		$[5] = props;
		$[6] = showBalances;
		$[7] = style;
	} else {
		className = $[1];
		embedded = $[2];
		highlighted = $[3];
		item = $[4];
		props = $[5];
		showBalances = $[6];
		style = $[7];
	}
	const { t } = useTranslation();
	const { isNarrowWidth } = useResponsive();
	const narrowStyle = isNarrowWidth ? {
		...styles.mobileMenuItem,
		borderRadius: 0,
		borderTop: `1px solid ${theme.pillBorder}`
	} : {};
	const [t1] = useSyncedPref("budgetType");
	const budgetType = t1 === void 0 ? "envelope" : t1;
	let t2;
	if ($[8] !== budgetType || $[9] !== item.id) {
		t2 = budgetType === "envelope" ? envelopeBudget.catBalance(item.id) : trackingBudget.catBalance(item.id);
		$[8] = budgetType;
		$[9] = item.id;
		$[10] = t2;
	} else t2 = $[10];
	const balance = useSheetValue(t2);
	const isToBudgetItem = item.id === "to-budget";
	const toBudget = useEnvelopeSheetValue(envelopeBudget.toBudget);
	const t3 = "button";
	const t4 = cx(className, css({
		backgroundColor: highlighted ? theme.menuAutoCompleteBackgroundHover : "transparent",
		color: highlighted ? theme.menuAutoCompleteItemTextHover : theme.menuAutoCompleteItemText,
		padding: 4,
		paddingLeft: 20,
		borderRadius: embedded ? 4 : 0,
		border: "none",
		font: "inherit",
		...narrowStyle
	}));
	const t5 = `${item.name}-category-item`;
	const t6 = highlighted || void 0;
	let t7;
	if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
		t7 = {
			flexDirection: "row",
			justifyContent: "space-between"
		};
		$[11] = t7;
	} else t7 = $[11];
	const t8 = item.hidden || item.group?.hidden ? " " + t("(hidden)") : "";
	let t9;
	if ($[12] !== item.name || $[13] !== t8) {
		t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TextOneLine, { children: [item.name, t8] });
		$[12] = item.name;
		$[13] = t8;
		$[14] = t9;
	} else t9 = $[14];
	const t10 = !showBalances ? "none" : void 0;
	const t11 = (isToBudgetItem ? toBudget : balance) || 0;
	let t12;
	if ($[15] !== t11) {
		t12 = makeAmountFullStyle(t11, {
			positiveColor: theme.noticeTextMenu,
			negativeColor: theme.errorTextMenu
		});
		$[15] = t11;
		$[16] = t12;
	} else t12 = $[16];
	let t13;
	if ($[17] !== t10 || $[18] !== t12) {
		t13 = {
			display: t10,
			marginLeft: 5,
			flexShrink: 0,
			...t12
		};
		$[17] = t10;
		$[18] = t12;
		$[19] = t13;
	} else t13 = $[19];
	let t14;
	if ($[20] !== balance || $[21] !== isToBudgetItem || $[22] !== toBudget) {
		t14 = isToBudgetItem ? toBudget != null && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [" ", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FinancialText, { children: integerToCurrency(toBudget || 0) })] }) : balance != null && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [" ", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FinancialText, { children: integerToCurrency(balance || 0) })] });
		$[20] = balance;
		$[21] = isToBudgetItem;
		$[22] = toBudget;
		$[23] = t14;
	} else t14 = $[23];
	let t15;
	if ($[24] !== t13 || $[25] !== t14) {
		t15 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextOneLine, {
			style: t13,
			children: t14
		});
		$[24] = t13;
		$[25] = t14;
		$[26] = t15;
	} else t15 = $[26];
	let t16;
	if ($[27] !== t15 || $[28] !== t9) {
		t16 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t7,
			children: [t9, t15]
		});
		$[27] = t15;
		$[28] = t9;
		$[29] = t16;
	} else t16 = $[29];
	let t17;
	if ($[30] !== props || $[31] !== style || $[32] !== t16 || $[33] !== t4 || $[34] !== t5 || $[35] !== t6) {
		t17 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
			type: t3,
			style,
			className: t4,
			"data-testid": t5,
			"data-highlighted": t6,
			...props,
			children: t16
		});
		$[30] = props;
		$[31] = style;
		$[32] = t16;
		$[33] = t4;
		$[34] = t5;
		$[35] = t6;
		$[36] = t17;
	} else t17 = $[36];
	return t17;
}
function defaultRenderCategoryItem$1(props) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CategoryItem, { ...props });
}
//#endregion
//#region src/hooks/useCommonPayees.ts
function useCommonPayees() {
	return useQuery$1(payeeQueries.listCommon());
}
//#endregion
//#region src/hooks/useLocationPermission.ts
/**
* Custom hook to manage geolocation permission status
* Currently behind the payeeLocations feature flag
*
* @returns boolean indicating whether geolocation access is granted
*/
function useLocationPermission() {
	const payeeLocationsEnabled = useFeatureFlag("payeeLocations");
	const { isNarrowWidth } = useResponsive();
	const [locationAccess, setLocationAccess] = (0, import_react.useState)(false);
	(0, import_react.useEffect)(() => {
		if (!payeeLocationsEnabled || !isNarrowWidth) {
			setLocationAccess(false);
			return;
		}
		let permissionStatus = null;
		let handleChange = null;
		let isMounted = true;
		if (!navigator.permissions || typeof navigator.permissions.query !== "function") {
			setLocationAccess(false);
			return;
		}
		try {
			navigator.permissions.query({ name: "geolocation" }).then((status) => {
				if (!isMounted) return;
				permissionStatus = status;
				setLocationAccess(status.state === "granted");
				handleChange = () => {
					setLocationAccess(status.state === "granted");
				};
				status.addEventListener("change", handleChange);
				if (status.state === "prompt") locationService.getCurrentPosition().then(() => {
					if (isMounted) setLocationAccess(true);
				}).catch(() => {
					if (isMounted) setLocationAccess(false);
				});
			}).catch(() => {
				if (!isMounted) return;
				setLocationAccess(false);
			});
		} catch {
			if (!isMounted) return;
			setLocationAccess(false);
		}
		return () => {
			isMounted = false;
			if (permissionStatus && handleChange) permissionStatus.removeEventListener("change", handleChange);
		};
	}, [payeeLocationsEnabled, isNarrowWidth]);
	return locationAccess;
}
//#endregion
//#region src/hooks/useNearbyPayees.ts
function useNearbyPayees() {
	const locationAccess = useLocationPermission();
	return useQuery$1({
		...payeeQueries.listNearby(),
		enabled: !!locationAccess
	});
}
//#endregion
//#region src/hooks/usePayees.ts
function usePayees() {
	return useQuery$1(payeeQueries.list());
}
function usePayeesById() {
	return useQuery$1({
		...payeeQueries.list(),
		select: (payees) => getPayeesById(payees)
	});
}
//#endregion
//#region src/components/autocomplete/PayeeAutocomplete.tsx
var MAX_AUTO_SUGGESTIONS = 5;
function getPayeeSuggestions(commonPayees, payees) {
	const favoritePayees = payees.filter((p) => p.favorite).map((p) => {
		return {
			...p,
			itemType: determineItemType(p, true)
		};
	}).sort((a, b) => a.name.localeCompare(b.name));
	let additionalCommonPayees = [];
	if (commonPayees?.length > 0) {
		if (favoritePayees.length < MAX_AUTO_SUGGESTIONS) additionalCommonPayees = commonPayees.filter((p) => !(p.favorite || favoritePayees.map((fp) => fp.id).includes(p.id))).slice(0, MAX_AUTO_SUGGESTIONS - favoritePayees.length).map((p) => {
			return {
				...p,
				itemType: determineItemType(p, true)
			};
		}).sort((a, b) => a.name.localeCompare(b.name));
	}
	if (favoritePayees.length + additionalCommonPayees.length) {
		const filteredPayees = payees.filter((p) => !favoritePayees.find((fp) => fp.id === p.id)).filter((p) => !additionalCommonPayees.find((fp) => fp.id === p.id)).map((p) => {
			return {
				...p,
				itemType: determineItemType(p, false)
			};
		});
		return favoritePayees.concat(additionalCommonPayees).concat(filteredPayees);
	}
	return payees.map((p) => {
		return {
			...p,
			itemType: determineItemType(p, false)
		};
	});
}
function filterActivePayees(payees, accounts) {
	return accounts ? getActivePayees(payees, accounts) : payees;
}
function filterTransferPayees(payees) {
	return payees.filter((payee) => !!payee.transfer_acct);
}
function makeNew(id, rawPayee) {
	if (id === "new" && !rawPayee.startsWith("new:")) return "new:" + rawPayee;
	return id;
}
function stripNew(value) {
	if (typeof value === "string" && value.startsWith("new:")) return "new";
	return value;
}
function determineItemType(item, isCommon, isNearby = false) {
	if (item.transfer_acct) return "account";
	if (isNearby) return "nearby_payee";
	if (isCommon) return "common_payee";
	else return "payee";
}
function PayeeList({ items, getItemProps, highlightedIndex, embedded, inputValue, renderCreatePayeeButton = defaultRenderCreatePayeeButton, renderPayeeItemGroupHeader = defaultRenderPayeeItemGroupHeader, renderPayeeItem = defaultRenderPayeeItem, footer, onForgetLocation }) {
	const { t } = useTranslation();
	const { newPayee, suggestedPayees, payees, transferPayees, nearbyPayees } = (0, import_react.useMemo)(() => {
		let currentIndex = 0;
		const result = items.reduce((acc, item) => {
			if (item.id === "new") acc.newPayee = { ...item };
			else if (item.itemType === "common_payee") acc.suggestedPayees.push({ ...item });
			else if (item.itemType === "payee") acc.payees.push({ ...item });
			else if (item.itemType === "account") acc.transferPayees.push({ ...item });
			else if (item.itemType === "nearby_payee") acc.nearbyPayees.push({ ...item });
			return acc;
		}, {
			newPayee: null,
			nearbyPayees: [],
			suggestedPayees: [],
			payees: [],
			transferPayees: []
		});
		return {
			newPayee: result.newPayee ? {
				...result.newPayee,
				highlightedIndex: currentIndex++
			} : null,
			nearbyPayees: result.nearbyPayees.map((item_0) => ({
				...item_0,
				highlightedIndex: currentIndex++
			})),
			suggestedPayees: result.suggestedPayees.map((item_1) => ({
				...item_1,
				highlightedIndex: currentIndex++
			})),
			payees: result.payees.map((item_2) => ({
				...item_2,
				highlightedIndex: currentIndex++
			})),
			transferPayees: result.transferPayees.map((item_3) => ({
				...item_3,
				highlightedIndex: currentIndex++
			}))
		};
	}, [items]);
	const showSearchForMore = items.length >= 100;
	return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
		style: {
			overflow: "auto",
			padding: "5px 0",
			...!embedded && { maxHeight: 175 }
		},
		children: [
			newPayee && renderCreatePayeeButton({
				...getItemProps ? getItemProps({ item: newPayee }) : {},
				payeeName: inputValue,
				highlighted: newPayee.highlightedIndex === highlightedIndex,
				embedded
			}),
			nearbyPayees.length > 0 && renderPayeeItemGroupHeader({ title: t("Nearby Payees") }),
			nearbyPayees.map((item_4) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NearbyPayeeItem, {
				...getItemProps ? getItemProps({ item: item_4 }) : {},
				item: item_4,
				highlighted: highlightedIndex === item_4.highlightedIndex,
				embedded,
				onForgetLocation
			}) }, item_4.id)),
			suggestedPayees.length > 0 && renderPayeeItemGroupHeader({ title: t("Suggested Payees") }),
			suggestedPayees.map((item_5) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children: renderPayeeItem({
				...getItemProps ? getItemProps({ item: item_5 }) : {},
				item: item_5,
				highlighted: highlightedIndex === item_5.highlightedIndex,
				embedded
			}) }, item_5.id)),
			payees.length > 0 && renderPayeeItemGroupHeader({ title: t("Payees") }),
			payees.map((item_6) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children: renderPayeeItem({
				...getItemProps ? getItemProps({ item: item_6 }) : {},
				item: item_6,
				highlighted: highlightedIndex === item_6.highlightedIndex,
				embedded
			}) }, item_6.id)),
			transferPayees.length > 0 && renderPayeeItemGroupHeader({ title: t("Transfer To/From") }),
			transferPayees.map((item_7) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children: renderPayeeItem({
				...getItemProps ? getItemProps({ item: item_7 }) : {},
				item: item_7,
				highlighted: highlightedIndex === item_7.highlightedIndex,
				embedded
			}) }, item_7.id)),
			showSearchForMore && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
				style: {
					fontSize: 11,
					padding: 5,
					color: theme.pageTextLight,
					textAlign: "center"
				},
				children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "More payees are available, search to find them" })
			})
		]
	}), footer] });
}
function PayeeAutocomplete({ value, inputProps, showInactivePayees = false, showMakeTransfer = true, showManagePayees = false, clearOnBlur = true, closeOnBlur, embedded, onUpdate, onSelect, onManagePayees, renderCreatePayeeButton = defaultRenderCreatePayeeButton, renderPayeeItemGroupHeader = defaultRenderPayeeItemGroupHeader, renderPayeeItem = defaultRenderPayeeItem, accounts, payees, nearbyPayees, ...props }) {
	const { t } = useTranslation();
	const { data: commonPayees } = useCommonPayees();
	const { data: retrievedPayees = [] } = usePayees();
	const { data: retrievedNearbyPayees = [] } = useNearbyPayees();
	if (!payees) payees = retrievedPayees;
	const createPayeeMutation = useCreatePayeeMutation();
	const deletePayeeLocationMutation = useDeletePayeeLocationMutation();
	if (!nearbyPayees) nearbyPayees = retrievedNearbyPayees;
	const { data: cachedAccounts = [] } = useAccounts();
	if (!accounts) accounts = cachedAccounts;
	const [focusTransferPayees, setFocusTransferPayees] = (0, import_react.useState)(false);
	const [rawPayee, setRawPayee] = (0, import_react.useState)("");
	const hasPayeeInput = !!rawPayee;
	const payeeSuggestions = (0, import_react.useMemo)(() => {
		let filteredSuggestions = [...getPayeeSuggestions(commonPayees, payees)];
		if (!showInactivePayees) filteredSuggestions = filterActivePayees(filteredSuggestions, accounts);
		if (focusTransferPayees) filteredSuggestions = filterTransferPayees(filteredSuggestions);
		if (!hasPayeeInput) return filteredSuggestions;
		return [{
			id: "new",
			favorite: false,
			name: ""
		}, ...filteredSuggestions];
	}, [
		commonPayees,
		payees,
		focusTransferPayees,
		accounts,
		hasPayeeInput,
		showInactivePayees
	]);
	const nearbyPayeesWithType = (0, import_react.useMemo)(() => {
		if (!nearbyPayees?.length) return [];
		return nearbyPayees.map((result) => ({
			...result.payee,
			itemType: "nearby_payee",
			nearbyLocationId: result.location.id,
			distance: result.location.distance
		}));
	}, [nearbyPayees]);
	const filteredNearbyPayees = (0, import_react.useMemo)(() => {
		if (!nearbyPayeesWithType.length || !rawPayee) return nearbyPayeesWithType;
		return new Fzf(nearbyPayeesWithType, {
			selector: (item) => item.name ?? "",
			limit: 100
		}).find(rawPayee).map((result_0) => result_0.item);
	}, [nearbyPayeesWithType, rawPayee]);
	const handleForgetLocation = (0, import_react.useCallback)(async (locationId) => {
		try {
			await deletePayeeLocationMutation.mutateAsync(locationId);
		} catch (error) {
			console.error("Failed to delete payee location", { error });
		}
	}, [deletePayeeLocationMutation]);
	async function handleSelect(idOrIds, rawInputValue) {
		if (!clearOnBlur) onSelect?.(makeNew(idOrIds, rawInputValue), rawInputValue);
		else {
			const create = (payeeName) => createPayeeMutation.mutateAsync({ name: payeeName });
			if (Array.isArray(idOrIds)) idOrIds = await Promise.all(idOrIds.map((v) => v === "new" ? create(rawInputValue) : v));
			else if (idOrIds === "new") idOrIds = await create(rawInputValue);
			onSelect?.(idOrIds, rawInputValue);
		}
	}
	const [payeeFieldFocused, setPayeeFieldFocused] = (0, import_react.useState)(false);
	const filterSuggestions = (suggestions_0, value_0) => {
		const newItem = suggestions_0.find((s) => s.id === "new");
		const realSuggestions = suggestions_0.filter((s_0) => s_0.id !== "new");
		let filtered;
		if (!value_0) filtered = realSuggestions.slice(0, 100);
		else filtered = new Fzf(realSuggestions, {
			selector: (item_0) => item_0.name ?? "",
			limit: 100
		}).find(value_0).map((result_1) => result_1.item);
		const results = newItem && value_0 && value_0 !== "" && !focusTransferPayees ? [newItem, ...filtered] : filtered;
		if (results.length >= 2 && results[0].id === "new") {
			const firstFiltered = results[1];
			if (getNormalisedString(firstFiltered.name) === getNormalisedString(value_0) && !firstFiltered.transfer_acct) return results.slice(1);
		}
		return results;
	};
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Autocomplete, {
		strict: true,
		embedded,
		value: stripNew(value),
		suggestions: payeeSuggestions,
		clearOnBlur,
		closeOnBlur,
		itemToString: (item_1) => {
			if (!item_1) return "";
			else if (item_1.id === "new") return rawPayee;
			return item_1.name;
		},
		focused: payeeFieldFocused,
		inputProps: {
			...inputProps,
			autoCapitalize: "words",
			onBlur: () => {
				setRawPayee("");
				setPayeeFieldFocused(false);
			},
			"aria-label": t("Payee"),
			onFocus: () => setPayeeFieldFocused(true),
			onChangeValue: setRawPayee
		},
		onUpdate: (id, inputValue) => onUpdate?.(id, makeNew(id, inputValue)),
		onSelect: handleSelect,
		getHighlightedIndex: (suggestions_1) => {
			if (filteredNearbyPayees.length > 0) return 0;
			if (suggestions_1.length === 0) return null;
			else if (suggestions_1[0].id === "new") return suggestions_1.length > 1 ? 1 : 0;
			return 0;
		},
		filterSuggestions,
		renderItems: (items, getItemProps, highlightedIndex, inputValue_0) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PayeeList, {
			items: [...filteredNearbyPayees, ...items],
			commonPayees,
			getItemProps,
			highlightedIndex,
			inputValue: inputValue_0,
			embedded,
			renderCreatePayeeButton,
			renderPayeeItemGroupHeader,
			renderPayeeItem,
			footer: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AutocompleteFooter, {
				embedded,
				children: [showMakeTransfer && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
					variant: focusTransferPayees ? "menuSelected" : "menu",
					style: showManagePayees && { marginBottom: 5 },
					onPress: () => {
						onUpdate?.(null, null);
						setFocusTransferPayees(!focusTransferPayees);
					},
					children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Make transfer" })
				}), showManagePayees && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
					variant: "menu",
					onPress: () => onManagePayees(),
					children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Manage payees" })
				})]
			}),
			onForgetLocation: handleForgetLocation
		}),
		...props
	}, focusTransferPayees ? "transfers" : "all");
}
function CreatePayeeButton(t0) {
	const $ = (0, import_compiler_runtime.c)(26);
	let Icon;
	let embedded;
	let highlighted;
	let payeeName;
	let props;
	let style;
	if ($[0] !== t0) {
		({Icon, payeeName, highlighted, embedded, style, ...props} = t0);
		$[0] = t0;
		$[1] = Icon;
		$[2] = embedded;
		$[3] = highlighted;
		$[4] = payeeName;
		$[5] = props;
		$[6] = style;
	} else {
		Icon = $[1];
		embedded = $[2];
		highlighted = $[3];
		payeeName = $[4];
		props = $[5];
		style = $[6];
	}
	const { isNarrowWidth } = useResponsive();
	let t1;
	if ($[7] !== isNarrowWidth) {
		t1 = isNarrowWidth ? { ...styles.mobileMenuItem } : {};
		$[7] = isNarrowWidth;
		$[8] = t1;
	} else t1 = $[8];
	const narrowStyle = t1;
	const iconSize = isNarrowWidth ? 14 : 8;
	const t2 = highlighted ? theme.menuAutoCompleteTextHover : theme.noticeTextMenu;
	const t3 = embedded ? 4 : 0;
	const t4 = highlighted ? theme.menuAutoCompleteBackgroundHover : "transparent";
	let t5;
	if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
		t5 = { backgroundColor: "rgba(100, 100, 100, .25)" };
		$[9] = t5;
	} else t5 = $[9];
	let t6;
	if ($[10] !== narrowStyle || $[11] !== style || $[12] !== t2 || $[13] !== t3 || $[14] !== t4) {
		t6 = {
			display: "block",
			flex: "1 0",
			color: t2,
			borderRadius: t3,
			fontSize: 11,
			fontWeight: 500,
			padding: "6px 9px",
			backgroundColor: t4,
			":active": t5,
			...narrowStyle,
			...style
		};
		$[10] = narrowStyle;
		$[11] = style;
		$[12] = t2;
		$[13] = t3;
		$[14] = t4;
		$[15] = t6;
	} else t6 = $[15];
	let t7;
	if ($[16] !== Icon || $[17] !== iconSize) {
		t7 = Icon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { style: {
			marginRight: 5,
			display: "inline-block"
		} }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgAdd, {
			width: iconSize,
			height: iconSize,
			style: {
				marginRight: 5,
				display: "inline-block"
			}
		});
		$[16] = Icon;
		$[17] = iconSize;
		$[18] = t7;
	} else t7 = $[18];
	let t8;
	if ($[19] !== payeeName) {
		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Trans, { children: [
			"Create payee \"",
			{ payeeName },
			"\""
		] });
		$[19] = payeeName;
		$[20] = t8;
	} else t8 = $[20];
	let t9;
	if ($[21] !== props || $[22] !== t6 || $[23] !== t7 || $[24] !== t8) {
		t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			"data-testid": "create-payee-button",
			style: t6,
			...props,
			children: [t7, t8]
		});
		$[21] = props;
		$[22] = t6;
		$[23] = t7;
		$[24] = t8;
		$[25] = t9;
	} else t9 = $[25];
	return t9;
}
function defaultRenderCreatePayeeButton(props) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CreatePayeeButton, { ...props });
}
function defaultRenderPayeeItemGroupHeader(props) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ItemHeader, {
		...props,
		type: "payee"
	});
}
function PayeeItem(t0) {
	const $ = (0, import_compiler_runtime.c)(27);
	let className;
	let embedded;
	let highlighted;
	let item;
	let props;
	if ($[0] !== t0) {
		({item, className, highlighted, embedded, ...props} = t0);
		$[0] = t0;
		$[1] = className;
		$[2] = embedded;
		$[3] = highlighted;
		$[4] = item;
		$[5] = props;
	} else {
		className = $[1];
		embedded = $[2];
		highlighted = $[3];
		item = $[4];
		props = $[5];
	}
	const { isNarrowWidth } = useResponsive();
	let itemIcon;
	let t1;
	let t2;
	if ($[6] !== className || $[7] !== embedded || $[8] !== highlighted || $[9] !== isNarrowWidth || $[10] !== item.favorite) {
		const narrowStyle = isNarrowWidth ? {
			...styles.mobileMenuItem,
			borderRadius: 0,
			borderTop: `1px solid ${theme.pillBorder}`
		} : {};
		const iconSize = isNarrowWidth ? 14 : 8;
		let paddingLeftOverFromIcon = 20;
		itemIcon = void 0;
		if (item.favorite) {
			let t3;
			if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
				t3 = {
					marginRight: 5,
					display: "inline-block"
				};
				$[14] = t3;
			} else t3 = $[14];
			let t4;
			if ($[15] !== iconSize) {
				t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgBookmark, {
					width: iconSize,
					height: iconSize,
					style: t3
				});
				$[15] = iconSize;
				$[16] = t4;
			} else t4 = $[16];
			itemIcon = t4;
			paddingLeftOverFromIcon = 20 - (iconSize + 5);
		}
		t1 = "button";
		t2 = cx(className, css({
			backgroundColor: highlighted ? theme.menuAutoCompleteBackgroundHover : "transparent",
			color: highlighted ? theme.menuAutoCompleteItemTextHover : theme.menuAutoCompleteItemText,
			borderRadius: embedded ? 4 : 0,
			padding: 4,
			paddingLeft: paddingLeftOverFromIcon,
			border: "none",
			font: "inherit",
			textAlign: "left",
			...narrowStyle
		}));
		$[6] = className;
		$[7] = embedded;
		$[8] = highlighted;
		$[9] = isNarrowWidth;
		$[10] = item.favorite;
		$[11] = itemIcon;
		$[12] = t1;
		$[13] = t2;
	} else {
		itemIcon = $[11];
		t1 = $[12];
		t2 = $[13];
	}
	const t3 = `${item.name}-payee-item`;
	const t4 = highlighted || void 0;
	let t5;
	if ($[17] !== item.name || $[18] !== itemIcon) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TextOneLine, { children: [itemIcon, item.name] });
		$[17] = item.name;
		$[18] = itemIcon;
		$[19] = t5;
	} else t5 = $[19];
	let t6;
	if ($[20] !== props || $[21] !== t1 || $[22] !== t2 || $[23] !== t3 || $[24] !== t4 || $[25] !== t5) {
		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
			type: t1,
			className: t2,
			"data-testid": t3,
			"data-highlighted": t4,
			...props,
			children: t5
		});
		$[20] = props;
		$[21] = t1;
		$[22] = t2;
		$[23] = t3;
		$[24] = t4;
		$[25] = t5;
		$[26] = t6;
	} else t6 = $[26];
	return t6;
}
function defaultRenderPayeeItem(props) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PayeeItem, { ...props });
}
function NearbyPayeeItem(t0) {
	const $ = (0, import_compiler_runtime.c)(51);
	let className;
	let embedded;
	let highlighted;
	let item;
	let onForgetLocation;
	let props;
	if ($[0] !== t0) {
		({item, className, highlighted, embedded, onForgetLocation, ...props} = t0);
		$[0] = t0;
		$[1] = className;
		$[2] = embedded;
		$[3] = highlighted;
		$[4] = item;
		$[5] = onForgetLocation;
		$[6] = props;
	} else {
		className = $[1];
		embedded = $[2];
		highlighted = $[3];
		item = $[4];
		onForgetLocation = $[5];
		props = $[6];
	}
	const { isNarrowWidth } = useResponsive();
	let distanceText;
	let handleForgetClick;
	let iconSize;
	let itemIcon;
	let locationId;
	let t1;
	if ($[7] !== className || $[8] !== embedded || $[9] !== highlighted || $[10] !== isNarrowWidth || $[11] !== item.distance || $[12] !== item.favorite || $[13] !== item.nearbyLocationId || $[14] !== onForgetLocation) {
		const narrowStyle = isNarrowWidth ? {
			...styles.mobileMenuItem,
			borderRadius: 0,
			borderTop: `1px solid ${theme.pillBorder}`
		} : {};
		iconSize = isNarrowWidth ? 14 : 8;
		let paddingLeftOverFromIcon = 20;
		itemIcon = void 0;
		if (item.favorite) {
			let t2;
			if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
				t2 = {
					marginRight: 5,
					display: "inline-block"
				};
				$[21] = t2;
			} else t2 = $[21];
			let t3;
			if ($[22] !== iconSize) {
				t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgBookmark, {
					width: iconSize,
					height: iconSize,
					style: t2
				});
				$[22] = iconSize;
				$[23] = t3;
			} else t3 = $[23];
			itemIcon = t3;
			paddingLeftOverFromIcon = 20 - (iconSize + 5);
		}
		locationId = item.nearbyLocationId;
		const distance = item.distance;
		let t2;
		if ($[24] !== distance) {
			t2 = distance !== void 0 ? formatDistance$84(distance) : "";
			$[24] = distance;
			$[25] = t2;
		} else t2 = $[25];
		distanceText = t2;
		let t3;
		if ($[26] !== locationId || $[27] !== onForgetLocation) {
			t3 = () => {
				if (locationId && onForgetLocation) onForgetLocation(locationId);
			};
			$[26] = locationId;
			$[27] = onForgetLocation;
			$[28] = t3;
		} else t3 = $[28];
		handleForgetClick = t3;
		t1 = cx(className, css({
			backgroundColor: highlighted ? theme.menuAutoCompleteBackgroundHover : "transparent",
			color: highlighted ? theme.menuAutoCompleteItemTextHover : theme.menuAutoCompleteItemText,
			borderRadius: embedded ? 4 : 0,
			padding: 4,
			paddingLeft: paddingLeftOverFromIcon,
			display: "flex",
			alignItems: "center",
			justifyContent: "space-between",
			...narrowStyle
		}));
		$[7] = className;
		$[8] = embedded;
		$[9] = highlighted;
		$[10] = isNarrowWidth;
		$[11] = item.distance;
		$[12] = item.favorite;
		$[13] = item.nearbyLocationId;
		$[14] = onForgetLocation;
		$[15] = distanceText;
		$[16] = handleForgetClick;
		$[17] = iconSize;
		$[18] = itemIcon;
		$[19] = locationId;
		$[20] = t1;
	} else {
		distanceText = $[15];
		handleForgetClick = $[16];
		iconSize = $[17];
		itemIcon = $[18];
		locationId = $[19];
		t1 = $[20];
	}
	const t2 = `${item.name}-payee-item`;
	const t3 = highlighted || void 0;
	let t4;
	if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
		t4 = css({
			display: "flex",
			flexDirection: "column",
			flex: 1,
			background: "none",
			border: "none",
			font: "inherit",
			color: "inherit",
			textAlign: "left",
			padding: 0,
			cursor: "pointer"
		});
		$[29] = t4;
	} else t4 = $[29];
	let t5;
	if ($[30] !== item.name || $[31] !== itemIcon) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TextOneLine, { children: [itemIcon, item.name] });
		$[30] = item.name;
		$[31] = itemIcon;
		$[32] = t5;
	} else t5 = $[32];
	let t6;
	if ($[33] !== distanceText || $[34] !== highlighted || $[35] !== iconSize || $[36] !== itemIcon) {
		t6 = distanceText && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
			style: {
				fontSize: "10px",
				color: highlighted ? theme.menuAutoCompleteItemTextHover : theme.pageTextSubdued,
				marginLeft: itemIcon ? iconSize + 5 : 0
			},
			children: distanceText
		});
		$[33] = distanceText;
		$[34] = highlighted;
		$[35] = iconSize;
		$[36] = itemIcon;
		$[37] = t6;
	} else t6 = $[37];
	let t7;
	if ($[38] !== props || $[39] !== t5 || $[40] !== t6) {
		t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
			type: "button",
			className: t4,
			...props,
			children: [t5, t6]
		});
		$[38] = props;
		$[39] = t5;
		$[40] = t6;
		$[41] = t7;
	} else t7 = $[41];
	let t8;
	if ($[42] !== handleForgetClick || $[43] !== locationId) {
		t8 = locationId && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button, {
			variant: "menu",
			onPress: handleForgetClick,
			style: {
				backgroundColor: theme.errorBackground,
				border: `1px solid ${theme.errorBorder}`,
				color: theme.pageText,
				fontSize: "11px",
				padding: "2px 6px",
				borderRadius: 3
			},
			children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, {
				i18nKey: "forget",
				children: "Forget"
			}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgLocation, {
				width: 10,
				height: 10,
				style: { marginLeft: 4 }
			})]
		});
		$[42] = handleForgetClick;
		$[43] = locationId;
		$[44] = t8;
	} else t8 = $[44];
	let t9;
	if ($[45] !== t1 || $[46] !== t2 || $[47] !== t3 || $[48] !== t7 || $[49] !== t8) {
		t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
			className: t1,
			"data-testid": t2,
			"data-highlighted": t3,
			children: [t7, t8]
		});
		$[45] = t1;
		$[46] = t2;
		$[47] = t3;
		$[48] = t7;
		$[49] = t8;
		$[50] = t9;
	} else t9 = $[50];
	return t9;
}
//#endregion
//#region src/hooks/useCurrentWordRange.ts
function useCurrentWordRange(inputValue, cursorPosition) {
	return (0, import_react.useMemo)(() => getCurrentWordRange(inputValue, cursorPosition), [inputValue, cursorPosition]);
}
function getCurrentWordRange(inputValue, cursorPosition) {
	if (!cursorPosition || cursorPosition < 0) return [0, 0];
	if (cursorPosition > inputValue.length) return [inputValue.length, inputValue.length];
	let startIdx = cursorPosition;
	const endIdx = cursorPosition;
	while (startIdx > 0 && inputValue.charAt(startIdx - 1).trim() !== "") startIdx--;
	if (startIdx < 0 || endIdx < 0 || startIdx === endIdx) return [0, 0];
	return [startIdx, endIdx];
}
//#endregion
//#region src/hooks/useRefEventListener.ts
function useRefEventListener(ref, event, callback, deps) {
	const _callback = (0, import_react.useCallback)(callback, deps);
	(0, import_react.useEffect)(() => {
		const el = ref.current;
		if (!el) return;
		const callbackRef = _callback;
		el.addEventListener(event, callbackRef);
		return () => {
			el.removeEventListener(event, callbackRef);
		};
	}, [
		ref,
		event,
		_callback
	]);
}
//#endregion
//#region src/hooks/useCursorPosition.ts
function useCursorPosition(ref) {
	const doc = (0, import_react.useRef)(document);
	const [cursorPosition, setCursorPosition] = (0, import_react.useState)(null);
	const update = () => {
		if (!ref.current || !document.hasFocus()) return;
		setCursorPosition(document.activeElement === ref.current ? ref.current.selectionStart : null);
	};
	useRefEventListener(ref, "focusin", update, [ref, setCursorPosition]);
	useRefEventListener(ref, "keyup", update, [ref, setCursorPosition]);
	useRefEventListener(doc, "selectionchange", update, [ref, setCursorPosition]);
	(0, import_react.useEffect)(update, [ref, setCursorPosition]);
	const clear = () => {
		if (document.hasFocus()) setCursorPosition(null);
	};
	useRefEventListener(ref, "focusout", clear, [setCursorPosition]);
	return [cursorPosition, (n) => setTimeout(() => {
		ref.current?.setSelectionRange(n, n);
		document.dispatchEvent(new Event("selectionchange"));
	})];
}
//#endregion
//#region src/tags/queries.ts
var tagQueries = {
	all: () => ["tags"],
	lists: () => [...tagQueries.all(), "lists"],
	list: () => queryOptions({
		queryKey: [...tagQueries.lists()],
		queryFn: async () => {
			return await send("tags-get");
		},
		placeholderData: [],
		staleTime: Infinity
	})
};
//#endregion
//#region src/hooks/useTags.ts
function useTags() {
	return useQuery$1(tagQueries.list());
}
function useFilteredTags(filterStr, requireHashInFilter) {
	const { data: tags, ...rest } = useTags();
	return {
		data: (0, import_react.useMemo)(() => {
			if (!filterStr || !tags) return [];
			if (requireHashInFilter && !filterStr.startsWith("#")) return [];
			return new Fzf(tags, {
				selector: (tag) => tag.tag,
				limit: 100,
				tiebreakers: [byLengthAsc, byStartAsc]
			}).find(filterStr.replace(/^#/, "")).map((item) => item.item);
		}, [
			tags,
			filterStr,
			requireHashInFilter
		]),
		...rest
	};
}
//#endregion
//#region src/hooks/useTagCSS.ts
function useTagCSS(opts) {
	const { data: tags = [] } = useTags();
	const [theme] = useTheme();
	return (0, import_react.useCallback)((tag, options = {}) => {
		const [color, backgroundColor, backgroundColorHovered] = getTagCSSColors(theme, options.color ?? tags.find((t) => t.tag === tag)?.color);
		return css({
			...opts?.ellipsis ? {
				overflow: "hidden",
				textOverflow: "ellipsis",
				maxWidth: "100%",
				display: "inline-block"
			} : { display: "inline-flex" },
			padding: options.compact ? "0px 7px" : "3px 7px",
			borderRadius: 16,
			userSelect: "none",
			backgroundColor,
			color,
			cursor: "pointer",
			"&[data-hovered]": { backgroundColor: backgroundColorHovered },
			"&[data-pressed]": { backgroundColor: backgroundColorHovered }
		});
	}, [
		theme,
		tags,
		opts
	]);
}
function getTagCSSColors(theme$1, color) {
	if (!color) return [
		theme.noteTagText,
		theme.noteTagBackground,
		theme.noteTagBackgroundHover
	];
	const r = parseInt(color.substring(1, 3), 16);
	const g = parseInt(color.substring(3, 5), 16);
	const b = parseInt(color.substring(5, 7), 16);
	if ((r * 299 + g * 587 + b * 114) / 1e3 >= 125) return [
		"black !important",
		color,
		`color-mix(in srgb, ${color} 80%, black)`
	];
	return [
		"white !important",
		color,
		`color-mix(in srgb, ${color} 70%, white)`
	];
}
//#endregion
//#region src/components/autocomplete/TagAutocomplete.tsx
function TagAutocomplete({ inputValue, setInputValue, onBlur, inputStyle, onKeyDown, onUpdate }) {
	const { t } = useTranslation();
	const getTagCSS = useTagCSS({ ellipsis: true });
	const autocompleteId = (0, import_react.useId)();
	const id = (0, import_react.useCallback)((itemId) => autocompleteId + "|" + itemId, [autocompleteId]);
	const inputRef = (0, import_react.useRef)(null);
	const [cursorPosition, setCursorPosition] = useCursorPosition(inputRef);
	const [startIdx, endIdx] = useCurrentWordRange(inputValue, cursorPosition);
	const currentWord = inputValue.slice(startIdx, endIdx);
	const { data: filteredTags, refetch } = useFilteredTags(currentWord, true);
	const filteredItems = (0, import_react.useMemo)(() => {
		const tagArr = filteredTags?.map((tag) => ({
			...tag,
			name: "#" + tag.tag
		})) ?? [];
		const isValidTag = currentWord.startsWith("#") && currentWord.length > 1;
		const exactMatchExists = tagArr.length && "#" + tagArr[0].tag === currentWord;
		if (isValidTag && !exactMatchExists) {
			const currentWordSingleHash = currentWord.replace(/^#+/, "#");
			tagArr.push({
				id: "create_tag",
				name: `${currentWordSingleHash}`,
				tag: currentWordSingleHash.slice(1)
			});
		}
		return tagArr;
	}, [filteredTags, currentWord]);
	const [isOpen, setIsOpen] = (0, import_react.useState)(false);
	const showPopup = isOpen && filteredItems.length > 0;
	const [highlightedIdx, setHighlightedIdx] = (0, import_react.useState)(0);
	const highlightedId = showPopup && highlightedIdx >= 0 && highlightedIdx < filteredItems.length ? filteredItems[highlightedIdx].id : null;
	const scrollItemIntoView = (0, import_react.useCallback)((idx) => {
		const targetId = showPopup && idx >= 0 && idx < filteredItems?.length && filteredItems[idx].id;
		if (targetId) document.querySelector(`[data-key="${id(targetId)}"]`)?.scrollIntoView?.({ block: "nearest" });
	}, [
		id,
		filteredItems,
		showPopup
	]);
	async function handleSelect(id_0) {
		const tagObj = filteredItems.find((tag_0) => tag_0.id === id_0);
		if (!tagObj) return;
		if (id_0 === "create_tag") {
			await send("tags-create", { tag: tagObj.tag });
			refetch({ cancelRefetch: true });
		}
		const space = inputValue.charAt(endIdx) === " " ? "" : " ";
		setInputValue(inputValue.slice(0, startIdx) + "#" + tagObj.tag + space + inputValue.slice(endIdx));
		setHighlightedIdx(0);
		setIsOpen(false);
		setCursorPosition(startIdx + tagObj.tag.length + 1 + space.length);
	}
	function handleKeyDown(e) {
		if (!showPopup) {
			onKeyDown?.(e);
			return;
		}
		if (e.key === "ArrowUp") {
			e.preventDefault();
			setHighlightedIdx(highlightedIdx - 1);
			scrollItemIntoView(highlightedIdx - 1);
		} else if (e.key === "ArrowDown") {
			e.preventDefault();
			setHighlightedIdx(highlightedIdx + 1);
			scrollItemIntoView(highlightedIdx + 1);
		} else if (e.key === "Home" && filteredItems.length > 1) {
			e.preventDefault();
			setHighlightedIdx(0);
		} else if (e.key === "End" && filteredItems.length > 1) {
			setHighlightedIdx(filteredItems.length - 1);
			e.preventDefault();
		} else if (highlightedId && (e.key === "Enter" || e.key === "Tab")) {
			e.preventDefault();
			e.stopPropagation();
			handleSelect(highlightedId);
		} else if (e.key === "Escape") setIsOpen(false);
		setHighlightedIdx((idx_0) => Math.max(0, Math.min(idx_0, filteredItems.length - 1)));
	}
	return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
		ref: inputRef,
		name: "notes",
		"aria-label": t("Notes"),
		"aria-expanded": showPopup,
		"aria-controls": id("popover"),
		role: "combobox",
		style: inputStyle,
		value: inputValue,
		onChange: (e_0) => {
			setIsOpen(true);
			setInputValue(e_0.currentTarget.value);
		},
		tabIndex: -1,
		onKeyDown: handleKeyDown,
		onFocus: () => setIsOpen(true),
		onBlur,
		onUpdate,
		autoComplete: "off"
	}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)($07b14b47974efb58$export$5b6b19405a83ff9d, {
		isNonModal: true,
		placement: "bottom start",
		className: css(styles.darkScrollbar, {
			background: theme.menuAutoCompleteBackground,
			borderRadius: 6,
			boxShadow: "0 4px 6px rgba(0,0,0,0.1)",
			width: inputRef.current?.offsetWidth ?? 100
		}),
		offset: 1,
		triggerRef: inputRef,
		isOpen: showPopup,
		onOpenChange: setIsOpen,
		children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)($eed445e0843c11d0$export$41f133550aa26f48, {
			"aria-label": t("Tag List"),
			id: id("popover"),
			items: filteredItems,
			selectionMode: "single",
			dependencies: [highlightedId],
			onPointerDown: (e_1) => e_1.preventDefault(),
			style: {
				borderRadius: 4,
				maxHeight: "150px",
				overflowY: "auto"
			},
			children: (item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)($eed445e0843c11d0$export$a11e76429ed99b4, {
				id: id(item.id),
				textValue: item.name,
				style: () => ({
					backgroundColor: highlightedId === item.id ? theme.menuAutoCompleteBackgroundHover : "transparent",
					alignItems: "center",
					fontWeight: 500,
					cursor: "pointer",
					color: highlightedId === item.id ? theme.menuAutoCompleteItemTextHover : theme.menuAutoCompleteItemText,
					padding: "4px 6px 1px 6px"
				}),
				onMouseMove: () => {
					const idx_1 = filteredItems.findIndex((_item) => _item.id === item.id);
					if (idx_1 >= 0 && highlightedIdx !== idx_1) setHighlightedIdx(idx_1);
				},
				onPointerDown: (e_2) => e_2.preventDefault(),
				onClick: () => handleSelect(item.id),
				children: item.id === "create_tag" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
					style: {
						display: "flex",
						alignItems: "center",
						gap: 5,
						color: theme.noticeTextMenu,
						paddingBottom: 3
					},
					children: [
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgAdd$1, {
							height: 8,
							width: 8
						}),
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
							style: {
								textWrap: "nowrap",
								fontSize: 11
							},
							children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Create tag" })
						}),
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
							className: getTagCSS(""),
							children: item.name
						})
					]
				}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
					className: getTagCSS(item.tag),
					children: item.name
				})
			}, item.id)
		})
	})] });
}
//#endregion
//#region src/components/schedules/StatusBadge.tsx
var defaultStatusProps = {
	color: theme.buttonNormalDisabledText,
	backgroundColor: theme.tableRowHeaderBackground,
	Icon: SvgCheckCircleHollow
};
function getStatusProps(status) {
	switch (status) {
		case "missed": return {
			color: theme.errorTextDarker,
			backgroundColor: theme.errorBackground,
			Icon: SvgEditSkull1
		};
		case "due": return {
			color: theme.warningTextDark,
			backgroundColor: theme.warningBackground,
			Icon: SvgAlertTriangle
		};
		case "upcoming": return {
			color: theme.upcomingText,
			backgroundColor: theme.upcomingBackground,
			Icon: SvgCalendar3
		};
		case "paid": return {
			color: theme.noticeText,
			backgroundColor: theme.noticeBackgroundLight,
			Icon: SvgValidationCheck
		};
		case "completed": return {
			color: theme.tableHeaderText,
			backgroundColor: theme.tableRowHeaderBackground,
			Icon: SvgFavoriteStar
		};
		case "pending": return {
			color: theme.noticeTextLight,
			backgroundColor: theme.noticeBackgroundLight,
			Icon: SvgCalendar3
		};
		case "scheduled": return {
			color: theme.tableRowHeaderText,
			backgroundColor: theme.tableRowHeaderBackground,
			Icon: SvgCalendar3
		};
		case "cleared": return {
			color: theme.noticeTextLight,
			backgroundColor: theme.tableRowHeaderBackground,
			Icon: SvgCheckCircle1
		};
		case "reconciled": return {
			color: theme.noticeTextLight,
			backgroundColor: theme.tableRowHeaderBackground,
			Icon: SvgLockClosed
		};
		default: return defaultStatusProps;
	}
}
function StatusBadge(t0) {
	const $ = (0, import_compiler_runtime.c)(17);
	const { status } = t0;
	let t1;
	if ($[0] !== status) {
		t1 = getStatusProps(status);
		$[0] = status;
		$[1] = t1;
	} else t1 = $[1];
	const { color, backgroundColor, Icon } = t1;
	let t2;
	if ($[2] !== backgroundColor || $[3] !== color) {
		t2 = {
			color,
			backgroundColor,
			padding: "6px 8px",
			borderRadius: 4,
			flexDirection: "row",
			alignItems: "center",
			flexShrink: 0
		};
		$[2] = backgroundColor;
		$[3] = color;
		$[4] = t2;
	} else t2 = $[4];
	let t3;
	if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
		t3 = {
			width: 13,
			height: 13,
			marginRight: 7
		};
		$[5] = t3;
	} else t3 = $[5];
	let t4;
	if ($[6] !== Icon) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { style: t3 });
		$[6] = Icon;
		$[7] = t4;
	} else t4 = $[7];
	let t5;
	if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
		t5 = { lineHeight: "1em" };
		$[8] = t5;
	} else t5 = $[8];
	let t6;
	if ($[9] !== status) {
		t6 = titleFirst(getStatusLabel(status));
		$[9] = status;
		$[10] = t6;
	} else t6 = $[10];
	let t7;
	if ($[11] !== t6) {
		t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
			style: t5,
			children: t6
		});
		$[11] = t6;
		$[12] = t7;
	} else t7 = $[12];
	let t8;
	if ($[13] !== t2 || $[14] !== t4 || $[15] !== t7) {
		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t2,
			children: [t4, t7]
		});
		$[13] = t2;
		$[14] = t4;
		$[15] = t7;
		$[16] = t8;
	} else t8 = $[16];
	return t8;
}
//#endregion
//#region ../../node_modules/moment/dist/moment.js
var moment_exports = /* @__PURE__ */ __exportAll({ default: () => hooks });
function hooks() {
	return hookCallback.apply(null, arguments);
}
function setHookCallback(callback) {
	hookCallback = callback;
}
function isArray(input) {
	return input instanceof Array || Object.prototype.toString.call(input) === "[object Array]";
}
function isObject(input) {
	return input != null && Object.prototype.toString.call(input) === "[object Object]";
}
function hasOwnProp(a, b) {
	return Object.prototype.hasOwnProperty.call(a, b);
}
function isObjectEmpty(obj) {
	if (Object.getOwnPropertyNames) return Object.getOwnPropertyNames(obj).length === 0;
	else {
		var k;
		for (k in obj) if (hasOwnProp(obj, k)) return false;
		return true;
	}
}
function isUndefined(input) {
	return input === void 0;
}
function isNumber(input) {
	return typeof input === "number" || Object.prototype.toString.call(input) === "[object Number]";
}
function isDate(input) {
	return input instanceof Date || Object.prototype.toString.call(input) === "[object Date]";
}
function map(arr, fn) {
	var res = [], i, arrLen = arr.length;
	for (i = 0; i < arrLen; ++i) res.push(fn(arr[i], i));
	return res;
}
function extend(a, b) {
	for (var i in b) if (hasOwnProp(b, i)) a[i] = b[i];
	if (hasOwnProp(b, "toString")) a.toString = b.toString;
	if (hasOwnProp(b, "valueOf")) a.valueOf = b.valueOf;
	return a;
}
function createUTC(input, format, locale, strict) {
	return createLocalOrUTC(input, format, locale, strict, true).utc();
}
function defaultParsingFlags() {
	return {
		empty: false,
		unusedTokens: [],
		unusedInput: [],
		overflow: -2,
		charsLeftOver: 0,
		nullInput: false,
		invalidEra: null,
		invalidMonth: null,
		invalidFormat: false,
		userInvalidated: false,
		iso: false,
		parsedDateParts: [],
		era: null,
		meridiem: null,
		rfc2822: false,
		weekdayMismatch: false
	};
}
function getParsingFlags(m) {
	if (m._pf == null) m._pf = defaultParsingFlags();
	return m._pf;
}
function isValid(m) {
	var flags = null, parsedParts = false, isNowValid = m._d && !isNaN(m._d.getTime());
	if (isNowValid) {
		flags = getParsingFlags(m);
		parsedParts = some.call(flags.parsedDateParts, function(i) {
			return i != null;
		});
		isNowValid = flags.overflow < 0 && !flags.empty && !flags.invalidEra && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts);
		if (m._strict) isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === void 0;
	}
	if (Object.isFrozen == null || !Object.isFrozen(m)) m._isValid = isNowValid;
	else return isNowValid;
	return m._isValid;
}
function createInvalid(flags) {
	var m = createUTC(NaN);
	if (flags != null) extend(getParsingFlags(m), flags);
	else getParsingFlags(m).userInvalidated = true;
	return m;
}
function copyConfig(to, from) {
	var i, prop, val, momentPropertiesLen = momentProperties.length;
	if (!isUndefined(from._isAMomentObject)) to._isAMomentObject = from._isAMomentObject;
	if (!isUndefined(from._i)) to._i = from._i;
	if (!isUndefined(from._f)) to._f = from._f;
	if (!isUndefined(from._l)) to._l = from._l;
	if (!isUndefined(from._strict)) to._strict = from._strict;
	if (!isUndefined(from._tzm)) to._tzm = from._tzm;
	if (!isUndefined(from._isUTC)) to._isUTC = from._isUTC;
	if (!isUndefined(from._offset)) to._offset = from._offset;
	if (!isUndefined(from._pf)) to._pf = getParsingFlags(from);
	if (!isUndefined(from._locale)) to._locale = from._locale;
	if (momentPropertiesLen > 0) for (i = 0; i < momentPropertiesLen; i++) {
		prop = momentProperties[i];
		val = from[prop];
		if (!isUndefined(val)) to[prop] = val;
	}
	return to;
}
function Moment(config) {
	copyConfig(this, config);
	this._d = new Date(config._d != null ? config._d.getTime() : NaN);
	if (!this.isValid()) this._d = /* @__PURE__ */ new Date(NaN);
	if (updateInProgress === false) {
		updateInProgress = true;
		hooks.updateOffset(this);
		updateInProgress = false;
	}
}
function isMoment(obj) {
	return obj instanceof Moment || obj != null && obj._isAMomentObject != null;
}
function warn(msg) {
	if (hooks.suppressDeprecationWarnings === false && typeof console !== "undefined" && console.warn) console.warn("Deprecation warning: " + msg);
}
function deprecate(msg, fn) {
	var firstTime = true;
	return extend(function() {
		if (hooks.deprecationHandler != null) hooks.deprecationHandler(null, msg);
		if (firstTime) {
			var args = [], arg, i, key, argLen = arguments.length;
			for (i = 0; i < argLen; i++) {
				arg = "";
				if (typeof arguments[i] === "object") {
					arg += "\n[" + i + "] ";
					for (key in arguments[0]) if (hasOwnProp(arguments[0], key)) arg += key + ": " + arguments[0][key] + ", ";
					arg = arg.slice(0, -2);
				} else arg = arguments[i];
				args.push(arg);
			}
			warn(msg + "\nArguments: " + Array.prototype.slice.call(args).join("") + "\n" + (/* @__PURE__ */ new Error()).stack);
			firstTime = false;
		}
		return fn.apply(this, arguments);
	}, fn);
}
function deprecateSimple(name, msg) {
	if (hooks.deprecationHandler != null) hooks.deprecationHandler(name, msg);
	if (!deprecations[name]) {
		warn(msg);
		deprecations[name] = true;
	}
}
function isFunction(input) {
	return typeof Function !== "undefined" && input instanceof Function || Object.prototype.toString.call(input) === "[object Function]";
}
function set(config) {
	var prop, i;
	for (i in config) if (hasOwnProp(config, i)) {
		prop = config[i];
		if (isFunction(prop)) this[i] = prop;
		else this["_" + i] = prop;
	}
	this._config = config;
	this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source);
}
function mergeConfigs(parentConfig, childConfig) {
	var res = extend({}, parentConfig), prop;
	for (prop in childConfig) if (hasOwnProp(childConfig, prop)) if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
		res[prop] = {};
		extend(res[prop], parentConfig[prop]);
		extend(res[prop], childConfig[prop]);
	} else if (childConfig[prop] != null) res[prop] = childConfig[prop];
	else delete res[prop];
	for (prop in parentConfig) if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) res[prop] = extend({}, res[prop]);
	return res;
}
function Locale(config) {
	if (config != null) this.set(config);
}
function calendar(key, mom, now) {
	var output = this._calendar[key] || this._calendar["sameElse"];
	return isFunction(output) ? output.call(mom, now) : output;
}
function zeroFill(number, targetLength, forceSign) {
	var absNumber = "" + Math.abs(number), zerosToFill = targetLength - absNumber.length;
	return (number >= 0 ? forceSign ? "+" : "" : "-") + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;
}
function addFormatToken(token, padded, ordinal, callback) {
	var func = callback;
	if (typeof callback === "string") func = function() {
		return this[callback]();
	};
	if (token) formatTokenFunctions[token] = func;
	if (padded) formatTokenFunctions[padded[0]] = function() {
		return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
	};
	if (ordinal) formatTokenFunctions[ordinal] = function() {
		return this.localeData().ordinal(func.apply(this, arguments), token);
	};
}
function removeFormattingTokens(input) {
	if (input.match(/\[[\s\S]/)) return input.replace(/^\[|\]$/g, "");
	return input.replace(/\\/g, "");
}
function makeFormatFunction(format) {
	var array = format.match(formattingTokens), i, length;
	for (i = 0, length = array.length; i < length; i++) if (formatTokenFunctions[array[i]]) array[i] = formatTokenFunctions[array[i]];
	else array[i] = removeFormattingTokens(array[i]);
	return function(mom) {
		var output = "", i;
		for (i = 0; i < length; i++) output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];
		return output;
	};
}
function formatMoment(m, format) {
	if (!m.isValid()) return m.localeData().invalidDate();
	format = expandFormat(format, m.localeData());
	formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);
	return formatFunctions[format](m);
}
function expandFormat(format, locale) {
	var i = 5;
	function replaceLongDateFormatTokens(input) {
		return locale.longDateFormat(input) || input;
	}
	localFormattingTokens.lastIndex = 0;
	while (i >= 0 && localFormattingTokens.test(format)) {
		format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
		localFormattingTokens.lastIndex = 0;
		i -= 1;
	}
	return format;
}
function longDateFormat(key) {
	var format = this._longDateFormat[key], formatUpper = this._longDateFormat[key.toUpperCase()];
	if (format || !formatUpper) return format;
	this._longDateFormat[key] = formatUpper.match(formattingTokens).map(function(tok) {
		if (tok === "MMMM" || tok === "MM" || tok === "DD" || tok === "dddd") return tok.slice(1);
		return tok;
	}).join("");
	return this._longDateFormat[key];
}
function invalidDate() {
	return this._invalidDate;
}
function ordinal(number) {
	return this._ordinal.replace("%d", number);
}
function relativeTime(number, withoutSuffix, string, isFuture) {
	var output = this._relativeTime[string];
	return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number);
}
function pastFuture(diff, output) {
	var format = this._relativeTime[diff > 0 ? "future" : "past"];
	return isFunction(format) ? format(output) : format.replace(/%s/i, output);
}
function normalizeUnits(units) {
	return typeof units === "string" ? aliases[units] || aliases[units.toLowerCase()] : void 0;
}
function normalizeObjectUnits(inputObject) {
	var normalizedInput = {}, normalizedProp, prop;
	for (prop in inputObject) if (hasOwnProp(inputObject, prop)) {
		normalizedProp = normalizeUnits(prop);
		if (normalizedProp) normalizedInput[normalizedProp] = inputObject[prop];
	}
	return normalizedInput;
}
function getPrioritizedUnits(unitsObj) {
	var units = [], u;
	for (u in unitsObj) if (hasOwnProp(unitsObj, u)) units.push({
		unit: u,
		priority: priorities[u]
	});
	units.sort(function(a, b) {
		return a.priority - b.priority;
	});
	return units;
}
function addRegexToken(token, regex, strictRegex) {
	regexes[token] = isFunction(regex) ? regex : function(isStrict, localeData) {
		return isStrict && strictRegex ? strictRegex : regex;
	};
}
function getParseRegexForToken(token, config) {
	if (!hasOwnProp(regexes, token)) return new RegExp(unescapeFormat(token));
	return regexes[token](config._strict, config._locale);
}
function unescapeFormat(s) {
	return regexEscape(s.replace("\\", "").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function(matched, p1, p2, p3, p4) {
		return p1 || p2 || p3 || p4;
	}));
}
function regexEscape(s) {
	return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
}
function absFloor(number) {
	if (number < 0) return Math.ceil(number) || 0;
	else return Math.floor(number);
}
function toInt(argumentForCoercion) {
	var coercedNumber = +argumentForCoercion, value = 0;
	if (coercedNumber !== 0 && isFinite(coercedNumber)) value = absFloor(coercedNumber);
	return value;
}
function addParseToken(token, callback) {
	var i, func = callback, tokenLen;
	if (typeof token === "string") token = [token];
	if (isNumber(callback)) func = function(input, array) {
		array[callback] = toInt(input);
	};
	tokenLen = token.length;
	for (i = 0; i < tokenLen; i++) tokens[token[i]] = func;
}
function addWeekParseToken(token, callback) {
	addParseToken(token, function(input, array, config, token) {
		config._w = config._w || {};
		callback(input, config._w, config, token);
	});
}
function addTimeToArrayFromToken(token, input, config) {
	if (input != null && hasOwnProp(tokens, token)) tokens[token](input, config._a, config, token);
}
function isLeapYear(year) {
	return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
}
function daysInYear(year) {
	return isLeapYear(year) ? 366 : 365;
}
function getIsLeapYear() {
	return isLeapYear(this.year());
}
function makeGetSet(unit, keepTime) {
	return function(value) {
		if (value != null) {
			set$1(this, unit, value);
			hooks.updateOffset(this, keepTime);
			return this;
		} else return get(this, unit);
	};
}
function get(mom, unit) {
	if (!mom.isValid()) return NaN;
	var d = mom._d, isUTC = mom._isUTC;
	switch (unit) {
		case "Milliseconds": return isUTC ? d.getUTCMilliseconds() : d.getMilliseconds();
		case "Seconds": return isUTC ? d.getUTCSeconds() : d.getSeconds();
		case "Minutes": return isUTC ? d.getUTCMinutes() : d.getMinutes();
		case "Hours": return isUTC ? d.getUTCHours() : d.getHours();
		case "Date": return isUTC ? d.getUTCDate() : d.getDate();
		case "Day": return isUTC ? d.getUTCDay() : d.getDay();
		case "Month": return isUTC ? d.getUTCMonth() : d.getMonth();
		case "FullYear": return isUTC ? d.getUTCFullYear() : d.getFullYear();
		default: return NaN;
	}
}
function set$1(mom, unit, value) {
	var d, isUTC, year, month, date;
	if (!mom.isValid() || isNaN(value)) return;
	d = mom._d;
	isUTC = mom._isUTC;
	switch (unit) {
		case "Milliseconds":
			isUTC ? d.setUTCMilliseconds(value) : d.setMilliseconds(value);
			return;
		case "Seconds":
			isUTC ? d.setUTCSeconds(value) : d.setSeconds(value);
			return;
		case "Minutes":
			isUTC ? d.setUTCMinutes(value) : d.setMinutes(value);
			return;
		case "Hours":
			isUTC ? d.setUTCHours(value) : d.setHours(value);
			return;
		case "Date":
			isUTC ? d.setUTCDate(value) : d.setDate(value);
			return;
		case "FullYear": break;
		default: return;
	}
	year = value;
	month = mom.month();
	date = mom.date();
	date = date === 29 && month === 1 && !isLeapYear(year) ? 28 : date;
	isUTC ? d.setUTCFullYear(year, month, date) : d.setFullYear(year, month, date);
}
function stringGet(units) {
	units = normalizeUnits(units);
	if (isFunction(this[units])) return this[units]();
	return this;
}
function stringSet(units, value) {
	if (typeof units === "object") {
		units = normalizeObjectUnits(units);
		var prioritized = getPrioritizedUnits(units), i, prioritizedLen = prioritized.length;
		for (i = 0; i < prioritizedLen; i++) this[prioritized[i].unit](units[prioritized[i].unit]);
	} else {
		units = normalizeUnits(units);
		if (isFunction(this[units])) return this[units](value);
	}
	return this;
}
function mod(n, x) {
	return (n % x + x) % x;
}
function daysInMonth(year, month) {
	if (isNaN(year) || isNaN(month)) return NaN;
	var modMonth = mod(month, 12);
	year += (month - modMonth) / 12;
	return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2;
}
function localeMonths(m, format) {
	if (!m) return isArray(this._months) ? this._months : this._months["standalone"];
	return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? "format" : "standalone"][m.month()];
}
function localeMonthsShort(m, format) {
	if (!m) return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort["standalone"];
	return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? "format" : "standalone"][m.month()];
}
function handleStrictParse(monthName, format, strict) {
	var i, ii, mom, llc = monthName.toLocaleLowerCase();
	if (!this._monthsParse) {
		this._monthsParse = [];
		this._longMonthsParse = [];
		this._shortMonthsParse = [];
		for (i = 0; i < 12; ++i) {
			mom = createUTC([2e3, i]);
			this._shortMonthsParse[i] = this.monthsShort(mom, "").toLocaleLowerCase();
			this._longMonthsParse[i] = this.months(mom, "").toLocaleLowerCase();
		}
	}
	if (strict) if (format === "MMM") {
		ii = indexOf.call(this._shortMonthsParse, llc);
		return ii !== -1 ? ii : null;
	} else {
		ii = indexOf.call(this._longMonthsParse, llc);
		return ii !== -1 ? ii : null;
	}
	else if (format === "MMM") {
		ii = indexOf.call(this._shortMonthsParse, llc);
		if (ii !== -1) return ii;
		ii = indexOf.call(this._longMonthsParse, llc);
		return ii !== -1 ? ii : null;
	} else {
		ii = indexOf.call(this._longMonthsParse, llc);
		if (ii !== -1) return ii;
		ii = indexOf.call(this._shortMonthsParse, llc);
		return ii !== -1 ? ii : null;
	}
}
function localeMonthsParse(monthName, format, strict) {
	var i, mom, regex;
	if (this._monthsParseExact) return handleStrictParse.call(this, monthName, format, strict);
	if (!this._monthsParse) {
		this._monthsParse = [];
		this._longMonthsParse = [];
		this._shortMonthsParse = [];
	}
	for (i = 0; i < 12; i++) {
		mom = createUTC([2e3, i]);
		if (strict && !this._longMonthsParse[i]) {
			this._longMonthsParse[i] = new RegExp("^" + this.months(mom, "").replace(".", "") + "$", "i");
			this._shortMonthsParse[i] = new RegExp("^" + this.monthsShort(mom, "").replace(".", "") + "$", "i");
		}
		if (!strict && !this._monthsParse[i]) {
			regex = "^" + this.months(mom, "") + "|^" + this.monthsShort(mom, "");
			this._monthsParse[i] = new RegExp(regex.replace(".", ""), "i");
		}
		if (strict && format === "MMMM" && this._longMonthsParse[i].test(monthName)) return i;
		else if (strict && format === "MMM" && this._shortMonthsParse[i].test(monthName)) return i;
		else if (!strict && this._monthsParse[i].test(monthName)) return i;
	}
}
function setMonth(mom, value) {
	if (!mom.isValid()) return mom;
	if (typeof value === "string") if (/^\d+$/.test(value)) value = toInt(value);
	else {
		value = mom.localeData().monthsParse(value);
		if (!isNumber(value)) return mom;
	}
	var month = value, date = mom.date();
	date = date < 29 ? date : Math.min(date, daysInMonth(mom.year(), month));
	mom._isUTC ? mom._d.setUTCMonth(month, date) : mom._d.setMonth(month, date);
	return mom;
}
function getSetMonth(value) {
	if (value != null) {
		setMonth(this, value);
		hooks.updateOffset(this, true);
		return this;
	} else return get(this, "Month");
}
function getDaysInMonth() {
	return daysInMonth(this.year(), this.month());
}
function monthsShortRegex(isStrict) {
	if (this._monthsParseExact) {
		if (!hasOwnProp(this, "_monthsRegex")) computeMonthsParse.call(this);
		if (isStrict) return this._monthsShortStrictRegex;
		else return this._monthsShortRegex;
	} else {
		if (!hasOwnProp(this, "_monthsShortRegex")) this._monthsShortRegex = defaultMonthsShortRegex;
		return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex;
	}
}
function monthsRegex(isStrict) {
	if (this._monthsParseExact) {
		if (!hasOwnProp(this, "_monthsRegex")) computeMonthsParse.call(this);
		if (isStrict) return this._monthsStrictRegex;
		else return this._monthsRegex;
	} else {
		if (!hasOwnProp(this, "_monthsRegex")) this._monthsRegex = defaultMonthsRegex;
		return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex;
	}
}
function computeMonthsParse() {
	function cmpLenRev(a, b) {
		return b.length - a.length;
	}
	var shortPieces = [], longPieces = [], mixedPieces = [], i, mom, shortP, longP;
	for (i = 0; i < 12; i++) {
		mom = createUTC([2e3, i]);
		shortP = regexEscape(this.monthsShort(mom, ""));
		longP = regexEscape(this.months(mom, ""));
		shortPieces.push(shortP);
		longPieces.push(longP);
		mixedPieces.push(longP);
		mixedPieces.push(shortP);
	}
	shortPieces.sort(cmpLenRev);
	longPieces.sort(cmpLenRev);
	mixedPieces.sort(cmpLenRev);
	this._monthsRegex = new RegExp("^(" + mixedPieces.join("|") + ")", "i");
	this._monthsShortRegex = this._monthsRegex;
	this._monthsStrictRegex = new RegExp("^(" + longPieces.join("|") + ")", "i");
	this._monthsShortStrictRegex = new RegExp("^(" + shortPieces.join("|") + ")", "i");
}
function createDate(y, m, d, h, M, s, ms) {
	var date;
	if (y < 100 && y >= 0) {
		date = new Date(y + 400, m, d, h, M, s, ms);
		if (isFinite(date.getFullYear())) date.setFullYear(y);
	} else date = new Date(y, m, d, h, M, s, ms);
	return date;
}
function createUTCDate(y) {
	var date, args;
	if (y < 100 && y >= 0) {
		args = Array.prototype.slice.call(arguments);
		args[0] = y + 400;
		date = new Date(Date.UTC.apply(null, args));
		if (isFinite(date.getUTCFullYear())) date.setUTCFullYear(y);
	} else date = new Date(Date.UTC.apply(null, arguments));
	return date;
}
function firstWeekOffset(year, dow, doy) {
	var fwd = 7 + dow - doy;
	return -((7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7) + fwd - 1;
}
function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
	var localWeekday = (7 + weekday - dow) % 7, weekOffset = firstWeekOffset(year, dow, doy), dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, resYear, resDayOfYear;
	if (dayOfYear <= 0) {
		resYear = year - 1;
		resDayOfYear = daysInYear(resYear) + dayOfYear;
	} else if (dayOfYear > daysInYear(year)) {
		resYear = year + 1;
		resDayOfYear = dayOfYear - daysInYear(year);
	} else {
		resYear = year;
		resDayOfYear = dayOfYear;
	}
	return {
		year: resYear,
		dayOfYear: resDayOfYear
	};
}
function weekOfYear(mom, dow, doy) {
	var weekOffset = firstWeekOffset(mom.year(), dow, doy), week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, resWeek, resYear;
	if (week < 1) {
		resYear = mom.year() - 1;
		resWeek = week + weeksInYear(resYear, dow, doy);
	} else if (week > weeksInYear(mom.year(), dow, doy)) {
		resWeek = week - weeksInYear(mom.year(), dow, doy);
		resYear = mom.year() + 1;
	} else {
		resYear = mom.year();
		resWeek = week;
	}
	return {
		week: resWeek,
		year: resYear
	};
}
function weeksInYear(year, dow, doy) {
	var weekOffset = firstWeekOffset(year, dow, doy), weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
	return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
}
function localeWeek(mom) {
	return weekOfYear(mom, this._week.dow, this._week.doy).week;
}
function localeFirstDayOfWeek() {
	return this._week.dow;
}
function localeFirstDayOfYear() {
	return this._week.doy;
}
function getSetWeek(input) {
	var week = this.localeData().week(this);
	return input == null ? week : this.add((input - week) * 7, "d");
}
function getSetISOWeek(input) {
	var week = weekOfYear(this, 1, 4).week;
	return input == null ? week : this.add((input - week) * 7, "d");
}
function parseWeekday(input, locale) {
	if (typeof input !== "string") return input;
	if (!isNaN(input)) return parseInt(input, 10);
	input = locale.weekdaysParse(input);
	if (typeof input === "number") return input;
	return null;
}
function parseIsoWeekday(input, locale) {
	if (typeof input === "string") return locale.weekdaysParse(input) % 7 || 7;
	return isNaN(input) ? null : input;
}
function shiftWeekdays(ws, n) {
	return ws.slice(n, 7).concat(ws.slice(0, n));
}
function localeWeekdays(m, format) {
	var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format) ? "format" : "standalone"];
	return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays;
}
function localeWeekdaysShort(m) {
	return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort;
}
function localeWeekdaysMin(m) {
	return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin;
}
function handleStrictParse$1(weekdayName, format, strict) {
	var i, ii, mom, llc = weekdayName.toLocaleLowerCase();
	if (!this._weekdaysParse) {
		this._weekdaysParse = [];
		this._shortWeekdaysParse = [];
		this._minWeekdaysParse = [];
		for (i = 0; i < 7; ++i) {
			mom = createUTC([2e3, 1]).day(i);
			this._minWeekdaysParse[i] = this.weekdaysMin(mom, "").toLocaleLowerCase();
			this._shortWeekdaysParse[i] = this.weekdaysShort(mom, "").toLocaleLowerCase();
			this._weekdaysParse[i] = this.weekdays(mom, "").toLocaleLowerCase();
		}
	}
	if (strict) if (format === "dddd") {
		ii = indexOf.call(this._weekdaysParse, llc);
		return ii !== -1 ? ii : null;
	} else if (format === "ddd") {
		ii = indexOf.call(this._shortWeekdaysParse, llc);
		return ii !== -1 ? ii : null;
	} else {
		ii = indexOf.call(this._minWeekdaysParse, llc);
		return ii !== -1 ? ii : null;
	}
	else if (format === "dddd") {
		ii = indexOf.call(this._weekdaysParse, llc);
		if (ii !== -1) return ii;
		ii = indexOf.call(this._shortWeekdaysParse, llc);
		if (ii !== -1) return ii;
		ii = indexOf.call(this._minWeekdaysParse, llc);
		return ii !== -1 ? ii : null;
	} else if (format === "ddd") {
		ii = indexOf.call(this._shortWeekdaysParse, llc);
		if (ii !== -1) return ii;
		ii = indexOf.call(this._weekdaysParse, llc);
		if (ii !== -1) return ii;
		ii = indexOf.call(this._minWeekdaysParse, llc);
		return ii !== -1 ? ii : null;
	} else {
		ii = indexOf.call(this._minWeekdaysParse, llc);
		if (ii !== -1) return ii;
		ii = indexOf.call(this._weekdaysParse, llc);
		if (ii !== -1) return ii;
		ii = indexOf.call(this._shortWeekdaysParse, llc);
		return ii !== -1 ? ii : null;
	}
}
function localeWeekdaysParse(weekdayName, format, strict) {
	var i, mom, regex;
	if (this._weekdaysParseExact) return handleStrictParse$1.call(this, weekdayName, format, strict);
	if (!this._weekdaysParse) {
		this._weekdaysParse = [];
		this._minWeekdaysParse = [];
		this._shortWeekdaysParse = [];
		this._fullWeekdaysParse = [];
	}
	for (i = 0; i < 7; i++) {
		mom = createUTC([2e3, 1]).day(i);
		if (strict && !this._fullWeekdaysParse[i]) {
			this._fullWeekdaysParse[i] = new RegExp("^" + this.weekdays(mom, "").replace(".", "\\.?") + "$", "i");
			this._shortWeekdaysParse[i] = new RegExp("^" + this.weekdaysShort(mom, "").replace(".", "\\.?") + "$", "i");
			this._minWeekdaysParse[i] = new RegExp("^" + this.weekdaysMin(mom, "").replace(".", "\\.?") + "$", "i");
		}
		if (!this._weekdaysParse[i]) {
			regex = "^" + this.weekdays(mom, "") + "|^" + this.weekdaysShort(mom, "") + "|^" + this.weekdaysMin(mom, "");
			this._weekdaysParse[i] = new RegExp(regex.replace(".", ""), "i");
		}
		if (strict && format === "dddd" && this._fullWeekdaysParse[i].test(weekdayName)) return i;
		else if (strict && format === "ddd" && this._shortWeekdaysParse[i].test(weekdayName)) return i;
		else if (strict && format === "dd" && this._minWeekdaysParse[i].test(weekdayName)) return i;
		else if (!strict && this._weekdaysParse[i].test(weekdayName)) return i;
	}
}
function getSetDayOfWeek(input) {
	if (!this.isValid()) return input != null ? this : NaN;
	var day = get(this, "Day");
	if (input != null) {
		input = parseWeekday(input, this.localeData());
		return this.add(input - day, "d");
	} else return day;
}
function getSetLocaleDayOfWeek(input) {
	if (!this.isValid()) return input != null ? this : NaN;
	var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
	return input == null ? weekday : this.add(input - weekday, "d");
}
function getSetISODayOfWeek(input) {
	if (!this.isValid()) return input != null ? this : NaN;
	if (input != null) {
		var weekday = parseIsoWeekday(input, this.localeData());
		return this.day(this.day() % 7 ? weekday : weekday - 7);
	} else return this.day() || 7;
}
function weekdaysRegex(isStrict) {
	if (this._weekdaysParseExact) {
		if (!hasOwnProp(this, "_weekdaysRegex")) computeWeekdaysParse.call(this);
		if (isStrict) return this._weekdaysStrictRegex;
		else return this._weekdaysRegex;
	} else {
		if (!hasOwnProp(this, "_weekdaysRegex")) this._weekdaysRegex = defaultWeekdaysRegex;
		return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex;
	}
}
function weekdaysShortRegex(isStrict) {
	if (this._weekdaysParseExact) {
		if (!hasOwnProp(this, "_weekdaysRegex")) computeWeekdaysParse.call(this);
		if (isStrict) return this._weekdaysShortStrictRegex;
		else return this._weekdaysShortRegex;
	} else {
		if (!hasOwnProp(this, "_weekdaysShortRegex")) this._weekdaysShortRegex = defaultWeekdaysShortRegex;
		return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex;
	}
}
function weekdaysMinRegex(isStrict) {
	if (this._weekdaysParseExact) {
		if (!hasOwnProp(this, "_weekdaysRegex")) computeWeekdaysParse.call(this);
		if (isStrict) return this._weekdaysMinStrictRegex;
		else return this._weekdaysMinRegex;
	} else {
		if (!hasOwnProp(this, "_weekdaysMinRegex")) this._weekdaysMinRegex = defaultWeekdaysMinRegex;
		return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex;
	}
}
function computeWeekdaysParse() {
	function cmpLenRev(a, b) {
		return b.length - a.length;
	}
	var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [], i, mom, minp, shortp, longp;
	for (i = 0; i < 7; i++) {
		mom = createUTC([2e3, 1]).day(i);
		minp = regexEscape(this.weekdaysMin(mom, ""));
		shortp = regexEscape(this.weekdaysShort(mom, ""));
		longp = regexEscape(this.weekdays(mom, ""));
		minPieces.push(minp);
		shortPieces.push(shortp);
		longPieces.push(longp);
		mixedPieces.push(minp);
		mixedPieces.push(shortp);
		mixedPieces.push(longp);
	}
	minPieces.sort(cmpLenRev);
	shortPieces.sort(cmpLenRev);
	longPieces.sort(cmpLenRev);
	mixedPieces.sort(cmpLenRev);
	this._weekdaysRegex = new RegExp("^(" + mixedPieces.join("|") + ")", "i");
	this._weekdaysShortRegex = this._weekdaysRegex;
	this._weekdaysMinRegex = this._weekdaysRegex;
	this._weekdaysStrictRegex = new RegExp("^(" + longPieces.join("|") + ")", "i");
	this._weekdaysShortStrictRegex = new RegExp("^(" + shortPieces.join("|") + ")", "i");
	this._weekdaysMinStrictRegex = new RegExp("^(" + minPieces.join("|") + ")", "i");
}
function hFormat() {
	return this.hours() % 12 || 12;
}
function kFormat() {
	return this.hours() || 24;
}
function meridiem(token, lowercase) {
	addFormatToken(token, 0, 0, function() {
		return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);
	});
}
function matchMeridiem(isStrict, locale) {
	return locale._meridiemParse;
}
function localeIsPM(input) {
	return (input + "").toLowerCase().charAt(0) === "p";
}
function localeMeridiem(hours, minutes, isLower) {
	if (hours > 11) return isLower ? "pm" : "PM";
	else return isLower ? "am" : "AM";
}
function commonPrefix(arr1, arr2) {
	var i, minl = Math.min(arr1.length, arr2.length);
	for (i = 0; i < minl; i += 1) if (arr1[i] !== arr2[i]) return i;
	return minl;
}
function normalizeLocale(key) {
	return key ? key.toLowerCase().replace("_", "-") : key;
}
function chooseLocale(names) {
	var i = 0, j, next, locale, split;
	while (i < names.length) {
		split = normalizeLocale(names[i]).split("-");
		j = split.length;
		next = normalizeLocale(names[i + 1]);
		next = next ? next.split("-") : null;
		while (j > 0) {
			locale = loadLocale(split.slice(0, j).join("-"));
			if (locale) return locale;
			if (next && next.length >= j && commonPrefix(split, next) >= j - 1) break;
			j--;
		}
		i++;
	}
	return globalLocale;
}
function isLocaleNameSane(name) {
	return !!(name && name.match("^[^/\\\\]*$"));
}
function loadLocale(name) {
	var oldLocale = null, aliasedRequire;
	if (locales[name] === void 0 && typeof module !== "undefined" && module && module.exports && isLocaleNameSane(name)) try {
		oldLocale = globalLocale._abbr;
		aliasedRequire = __require;
		aliasedRequire("./locale/" + name);
		getSetGlobalLocale(oldLocale);
	} catch (e) {
		locales[name] = null;
	}
	return locales[name];
}
function getSetGlobalLocale(key, values) {
	var data;
	if (key) {
		if (isUndefined(values)) data = getLocale(key);
		else data = defineLocale(key, values);
		if (data) globalLocale = data;
		else if (typeof console !== "undefined" && console.warn) console.warn("Locale " + key + " not found. Did you forget to load it?");
	}
	return globalLocale._abbr;
}
function defineLocale(name, config) {
	if (config !== null) {
		var locale, parentConfig = baseConfig;
		config.abbr = name;
		if (locales[name] != null) {
			deprecateSimple("defineLocaleOverride", "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.");
			parentConfig = locales[name]._config;
		} else if (config.parentLocale != null) if (locales[config.parentLocale] != null) parentConfig = locales[config.parentLocale]._config;
		else {
			locale = loadLocale(config.parentLocale);
			if (locale != null) parentConfig = locale._config;
			else {
				if (!localeFamilies[config.parentLocale]) localeFamilies[config.parentLocale] = [];
				localeFamilies[config.parentLocale].push({
					name,
					config
				});
				return null;
			}
		}
		locales[name] = new Locale(mergeConfigs(parentConfig, config));
		if (localeFamilies[name]) localeFamilies[name].forEach(function(x) {
			defineLocale(x.name, x.config);
		});
		getSetGlobalLocale(name);
		return locales[name];
	} else {
		delete locales[name];
		return null;
	}
}
function updateLocale(name, config) {
	if (config != null) {
		var locale, tmpLocale, parentConfig = baseConfig;
		if (locales[name] != null && locales[name].parentLocale != null) locales[name].set(mergeConfigs(locales[name]._config, config));
		else {
			tmpLocale = loadLocale(name);
			if (tmpLocale != null) parentConfig = tmpLocale._config;
			config = mergeConfigs(parentConfig, config);
			if (tmpLocale == null) config.abbr = name;
			locale = new Locale(config);
			locale.parentLocale = locales[name];
			locales[name] = locale;
		}
		getSetGlobalLocale(name);
	} else if (locales[name] != null) {
		if (locales[name].parentLocale != null) {
			locales[name] = locales[name].parentLocale;
			if (name === getSetGlobalLocale()) getSetGlobalLocale(name);
		} else if (locales[name] != null) delete locales[name];
	}
	return locales[name];
}
function getLocale(key) {
	var locale;
	if (key && key._locale && key._locale._abbr) key = key._locale._abbr;
	if (!key) return globalLocale;
	if (!isArray(key)) {
		locale = loadLocale(key);
		if (locale) return locale;
		key = [key];
	}
	return chooseLocale(key);
}
function listLocales() {
	return keys(locales);
}
function checkOverflow(m) {
	var overflow, a = m._a;
	if (a && getParsingFlags(m).overflow === -2) {
		overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1;
		if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) overflow = DATE;
		if (getParsingFlags(m)._overflowWeeks && overflow === -1) overflow = WEEK;
		if (getParsingFlags(m)._overflowWeekday && overflow === -1) overflow = WEEKDAY;
		getParsingFlags(m).overflow = overflow;
	}
	return m;
}
function configFromISO(config) {
	var i, l, string = config._i, match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), allowTime, dateFormat, timeFormat, tzFormat, isoDatesLen = isoDates.length, isoTimesLen = isoTimes.length;
	if (match) {
		getParsingFlags(config).iso = true;
		for (i = 0, l = isoDatesLen; i < l; i++) if (isoDates[i][1].exec(match[1])) {
			dateFormat = isoDates[i][0];
			allowTime = isoDates[i][2] !== false;
			break;
		}
		if (dateFormat == null) {
			config._isValid = false;
			return;
		}
		if (match[3]) {
			for (i = 0, l = isoTimesLen; i < l; i++) if (isoTimes[i][1].exec(match[3])) {
				timeFormat = (match[2] || " ") + isoTimes[i][0];
				break;
			}
			if (timeFormat == null) {
				config._isValid = false;
				return;
			}
		}
		if (!allowTime && timeFormat != null) {
			config._isValid = false;
			return;
		}
		if (match[4]) if (tzRegex.exec(match[4])) tzFormat = "Z";
		else {
			config._isValid = false;
			return;
		}
		config._f = dateFormat + (timeFormat || "") + (tzFormat || "");
		configFromStringAndFormat(config);
	} else config._isValid = false;
}
function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {
	var result = [
		untruncateYear(yearStr),
		defaultLocaleMonthsShort.indexOf(monthStr),
		parseInt(dayStr, 10),
		parseInt(hourStr, 10),
		parseInt(minuteStr, 10)
	];
	if (secondStr) result.push(parseInt(secondStr, 10));
	return result;
}
function untruncateYear(yearStr) {
	var year = parseInt(yearStr, 10);
	if (year <= 49) return 2e3 + year;
	else if (year <= 999) return 1900 + year;
	return year;
}
function preprocessRFC2822(s) {
	return s.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, "");
}
function checkWeekday(weekdayStr, parsedInput, config) {
	if (weekdayStr) {
		if (defaultLocaleWeekdaysShort.indexOf(weekdayStr) !== new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay()) {
			getParsingFlags(config).weekdayMismatch = true;
			config._isValid = false;
			return false;
		}
	}
	return true;
}
function calculateOffset(obsOffset, militaryOffset, numOffset) {
	if (obsOffset) return obsOffsets[obsOffset];
	else if (militaryOffset) return 0;
	else {
		var hm = parseInt(numOffset, 10), m = hm % 100;
		return (hm - m) / 100 * 60 + m;
	}
}
function configFromRFC2822(config) {
	var match = rfc2822.exec(preprocessRFC2822(config._i)), parsedArray;
	if (match) {
		parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);
		if (!checkWeekday(match[1], parsedArray, config)) return;
		config._a = parsedArray;
		config._tzm = calculateOffset(match[8], match[9], match[10]);
		config._d = createUTCDate.apply(null, config._a);
		config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
		getParsingFlags(config).rfc2822 = true;
	} else config._isValid = false;
}
function configFromString(config) {
	var matched = aspNetJsonRegex.exec(config._i);
	if (matched !== null) {
		config._d = /* @__PURE__ */ new Date(+matched[1]);
		return;
	}
	configFromISO(config);
	if (config._isValid === false) delete config._isValid;
	else return;
	configFromRFC2822(config);
	if (config._isValid === false) delete config._isValid;
	else return;
	if (config._strict) config._isValid = false;
	else hooks.createFromInputFallback(config);
}
function defaults(a, b, c) {
	if (a != null) return a;
	if (b != null) return b;
	return c;
}
function currentDateArray(config) {
	var nowValue = new Date(hooks.now());
	if (config._useUTC) return [
		nowValue.getUTCFullYear(),
		nowValue.getUTCMonth(),
		nowValue.getUTCDate()
	];
	return [
		nowValue.getFullYear(),
		nowValue.getMonth(),
		nowValue.getDate()
	];
}
function configFromArray(config) {
	var i, date, input = [], currentDate, expectedWeekday, yearToUse;
	if (config._d) return;
	currentDate = currentDateArray(config);
	if (config._w && config._a[DATE] == null && config._a[MONTH] == null) dayOfYearFromWeekInfo(config);
	if (config._dayOfYear != null) {
		yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
		if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) getParsingFlags(config)._overflowDayOfYear = true;
		date = createUTCDate(yearToUse, 0, config._dayOfYear);
		config._a[MONTH] = date.getUTCMonth();
		config._a[DATE] = date.getUTCDate();
	}
	for (i = 0; i < 3 && config._a[i] == null; ++i) config._a[i] = input[i] = currentDate[i];
	for (; i < 7; i++) config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];
	if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {
		config._nextDay = true;
		config._a[HOUR] = 0;
	}
	config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
	expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();
	if (config._tzm != null) config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
	if (config._nextDay) config._a[HOUR] = 24;
	if (config._w && typeof config._w.d !== "undefined" && config._w.d !== expectedWeekday) getParsingFlags(config).weekdayMismatch = true;
}
function dayOfYearFromWeekInfo(config) {
	var w = config._w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;
	if (w.GG != null || w.W != null || w.E != null) {
		dow = 1;
		doy = 4;
		weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);
		week = defaults(w.W, 1);
		weekday = defaults(w.E, 1);
		if (weekday < 1 || weekday > 7) weekdayOverflow = true;
	} else {
		dow = config._locale._week.dow;
		doy = config._locale._week.doy;
		curWeek = weekOfYear(createLocal(), dow, doy);
		weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
		week = defaults(w.w, curWeek.week);
		if (w.d != null) {
			weekday = w.d;
			if (weekday < 0 || weekday > 6) weekdayOverflow = true;
		} else if (w.e != null) {
			weekday = w.e + dow;
			if (w.e < 0 || w.e > 6) weekdayOverflow = true;
		} else weekday = dow;
	}
	if (week < 1 || week > weeksInYear(weekYear, dow, doy)) getParsingFlags(config)._overflowWeeks = true;
	else if (weekdayOverflow != null) getParsingFlags(config)._overflowWeekday = true;
	else {
		temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
		config._a[YEAR] = temp.year;
		config._dayOfYear = temp.dayOfYear;
	}
}
function configFromStringAndFormat(config) {
	if (config._f === hooks.ISO_8601) {
		configFromISO(config);
		return;
	}
	if (config._f === hooks.RFC_2822) {
		configFromRFC2822(config);
		return;
	}
	config._a = [];
	getParsingFlags(config).empty = true;
	var string = "" + config._i, i, parsedInput, tokens, token, skipped, stringLength = string.length, totalParsedInputLength = 0, era, tokenLen;
	tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
	tokenLen = tokens.length;
	for (i = 0; i < tokenLen; i++) {
		token = tokens[i];
		parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
		if (parsedInput) {
			skipped = string.substr(0, string.indexOf(parsedInput));
			if (skipped.length > 0) getParsingFlags(config).unusedInput.push(skipped);
			string = string.slice(string.indexOf(parsedInput) + parsedInput.length);
			totalParsedInputLength += parsedInput.length;
		}
		if (formatTokenFunctions[token]) {
			if (parsedInput) getParsingFlags(config).empty = false;
			else getParsingFlags(config).unusedTokens.push(token);
			addTimeToArrayFromToken(token, parsedInput, config);
		} else if (config._strict && !parsedInput) getParsingFlags(config).unusedTokens.push(token);
	}
	getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;
	if (string.length > 0) getParsingFlags(config).unusedInput.push(string);
	if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) getParsingFlags(config).bigHour = void 0;
	getParsingFlags(config).parsedDateParts = config._a.slice(0);
	getParsingFlags(config).meridiem = config._meridiem;
	config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);
	era = getParsingFlags(config).era;
	if (era !== null) config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);
	configFromArray(config);
	checkOverflow(config);
}
function meridiemFixWrap(locale, hour, meridiem) {
	var isPm;
	if (meridiem == null) return hour;
	if (locale.meridiemHour != null) return locale.meridiemHour(hour, meridiem);
	else if (locale.isPM != null) {
		isPm = locale.isPM(meridiem);
		if (isPm && hour < 12) hour += 12;
		if (!isPm && hour === 12) hour = 0;
		return hour;
	} else return hour;
}
function configFromStringAndArray(config) {
	var tempConfig, bestMoment, scoreToBeat, i, currentScore, validFormatFound, bestFormatIsValid = false, configfLen = config._f.length;
	if (configfLen === 0) {
		getParsingFlags(config).invalidFormat = true;
		config._d = /* @__PURE__ */ new Date(NaN);
		return;
	}
	for (i = 0; i < configfLen; i++) {
		currentScore = 0;
		validFormatFound = false;
		tempConfig = copyConfig({}, config);
		if (config._useUTC != null) tempConfig._useUTC = config._useUTC;
		tempConfig._f = config._f[i];
		configFromStringAndFormat(tempConfig);
		if (isValid(tempConfig)) validFormatFound = true;
		currentScore += getParsingFlags(tempConfig).charsLeftOver;
		currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
		getParsingFlags(tempConfig).score = currentScore;
		if (!bestFormatIsValid) {
			if (scoreToBeat == null || currentScore < scoreToBeat || validFormatFound) {
				scoreToBeat = currentScore;
				bestMoment = tempConfig;
				if (validFormatFound) bestFormatIsValid = true;
			}
		} else if (currentScore < scoreToBeat) {
			scoreToBeat = currentScore;
			bestMoment = tempConfig;
		}
	}
	extend(config, bestMoment || tempConfig);
}
function configFromObject(config) {
	if (config._d) return;
	var i = normalizeObjectUnits(config._i), dayOrDate = i.day === void 0 ? i.date : i.day;
	config._a = map([
		i.year,
		i.month,
		dayOrDate,
		i.hour,
		i.minute,
		i.second,
		i.millisecond
	], function(obj) {
		return obj && parseInt(obj, 10);
	});
	configFromArray(config);
}
function createFromConfig(config) {
	var res = new Moment(checkOverflow(prepareConfig(config)));
	if (res._nextDay) {
		res.add(1, "d");
		res._nextDay = void 0;
	}
	return res;
}
function prepareConfig(config) {
	var input = config._i, format = config._f;
	config._locale = config._locale || getLocale(config._l);
	if (input === null || format === void 0 && input === "") return createInvalid({ nullInput: true });
	if (typeof input === "string") config._i = input = config._locale.preparse(input);
	if (isMoment(input)) return new Moment(checkOverflow(input));
	else if (isDate(input)) config._d = input;
	else if (isArray(format)) configFromStringAndArray(config);
	else if (format) configFromStringAndFormat(config);
	else configFromInput(config);
	if (!isValid(config)) config._d = null;
	return config;
}
function configFromInput(config) {
	var input = config._i;
	if (isUndefined(input)) config._d = new Date(hooks.now());
	else if (isDate(input)) config._d = new Date(input.valueOf());
	else if (typeof input === "string") configFromString(config);
	else if (isArray(input)) {
		config._a = map(input.slice(0), function(obj) {
			return parseInt(obj, 10);
		});
		configFromArray(config);
	} else if (isObject(input)) configFromObject(config);
	else if (isNumber(input)) config._d = new Date(input);
	else hooks.createFromInputFallback(config);
}
function createLocalOrUTC(input, format, locale, strict, isUTC) {
	var c = {};
	if (format === true || format === false) {
		strict = format;
		format = void 0;
	}
	if (locale === true || locale === false) {
		strict = locale;
		locale = void 0;
	}
	if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) input = void 0;
	c._isAMomentObject = true;
	c._useUTC = c._isUTC = isUTC;
	c._l = locale;
	c._i = input;
	c._f = format;
	c._strict = strict;
	return createFromConfig(c);
}
function createLocal(input, format, locale, strict) {
	return createLocalOrUTC(input, format, locale, strict, false);
}
function pickBy(fn, moments) {
	var res, i;
	if (moments.length === 1 && isArray(moments[0])) moments = moments[0];
	if (!moments.length) return createLocal();
	res = moments[0];
	for (i = 1; i < moments.length; ++i) if (!moments[i].isValid() || moments[i][fn](res)) res = moments[i];
	return res;
}
function min() {
	return pickBy("isBefore", [].slice.call(arguments, 0));
}
function max() {
	return pickBy("isAfter", [].slice.call(arguments, 0));
}
function isDurationValid(m) {
	var key, unitHasDecimal = false, i, orderLen = ordering.length;
	for (key in m) if (hasOwnProp(m, key) && !(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) return false;
	for (i = 0; i < orderLen; ++i) if (m[ordering[i]]) {
		if (unitHasDecimal) return false;
		if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) unitHasDecimal = true;
	}
	return true;
}
function isValid$1() {
	return this._isValid;
}
function createInvalid$1() {
	return createDuration(NaN);
}
function Duration(duration) {
	var normalizedInput = normalizeObjectUnits(duration), years = normalizedInput.year || 0, quarters = normalizedInput.quarter || 0, months = normalizedInput.month || 0, weeks = normalizedInput.week || normalizedInput.isoWeek || 0, days = normalizedInput.day || 0, hours = normalizedInput.hour || 0, minutes = normalizedInput.minute || 0, seconds = normalizedInput.second || 0, milliseconds = normalizedInput.millisecond || 0;
	this._isValid = isDurationValid(normalizedInput);
	this._milliseconds = +milliseconds + seconds * 1e3 + minutes * 6e4 + hours * 1e3 * 60 * 60;
	this._days = +days + weeks * 7;
	this._months = +months + quarters * 3 + years * 12;
	this._data = {};
	this._locale = getLocale();
	this._bubble();
}
function isDuration(obj) {
	return obj instanceof Duration;
}
function absRound(number) {
	if (number < 0) return Math.round(-1 * number) * -1;
	else return Math.round(number);
}
function compareArrays(array1, array2, dontConvert) {
	var len = Math.min(array1.length, array2.length), lengthDiff = Math.abs(array1.length - array2.length), diffs = 0, i;
	for (i = 0; i < len; i++) if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) diffs++;
	return diffs + lengthDiff;
}
function offset(token, separator) {
	addFormatToken(token, 0, 0, function() {
		var offset = this.utcOffset(), sign = "+";
		if (offset < 0) {
			offset = -offset;
			sign = "-";
		}
		return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2);
	});
}
function offsetFromString(matcher, string) {
	var matches = (string || "").match(matcher), chunk, parts, minutes;
	if (matches === null) return null;
	chunk = matches[matches.length - 1] || [];
	parts = (chunk + "").match(chunkOffset) || [
		"-",
		0,
		0
	];
	minutes = +(parts[1] * 60) + toInt(parts[2]);
	return minutes === 0 ? 0 : parts[0] === "+" ? minutes : -minutes;
}
function cloneWithOffset(input, model) {
	var res, diff;
	if (model._isUTC) {
		res = model.clone();
		diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();
		res._d.setTime(res._d.valueOf() + diff);
		hooks.updateOffset(res, false);
		return res;
	} else return createLocal(input).local();
}
function getDateOffset(m) {
	return -Math.round(m._d.getTimezoneOffset());
}
function getSetOffset(input, keepLocalTime, keepMinutes) {
	var offset = this._offset || 0, localAdjust;
	if (!this.isValid()) return input != null ? this : NaN;
	if (input != null) {
		if (typeof input === "string") {
			input = offsetFromString(matchShortOffset, input);
			if (input === null) return this;
		} else if (Math.abs(input) < 16 && !keepMinutes) input = input * 60;
		if (!this._isUTC && keepLocalTime) localAdjust = getDateOffset(this);
		this._offset = input;
		this._isUTC = true;
		if (localAdjust != null) this.add(localAdjust, "m");
		if (offset !== input) {
			if (!keepLocalTime || this._changeInProgress) addSubtract(this, createDuration(input - offset, "m"), 1, false);
			else if (!this._changeInProgress) {
				this._changeInProgress = true;
				hooks.updateOffset(this, true);
				this._changeInProgress = null;
			}
		}
		return this;
	} else return this._isUTC ? offset : getDateOffset(this);
}
function getSetZone(input, keepLocalTime) {
	if (input != null) {
		if (typeof input !== "string") input = -input;
		this.utcOffset(input, keepLocalTime);
		return this;
	} else return -this.utcOffset();
}
function setOffsetToUTC(keepLocalTime) {
	return this.utcOffset(0, keepLocalTime);
}
function setOffsetToLocal(keepLocalTime) {
	if (this._isUTC) {
		this.utcOffset(0, keepLocalTime);
		this._isUTC = false;
		if (keepLocalTime) this.subtract(getDateOffset(this), "m");
	}
	return this;
}
function setOffsetToParsedOffset() {
	if (this._tzm != null) this.utcOffset(this._tzm, false, true);
	else if (typeof this._i === "string") {
		var tZone = offsetFromString(matchOffset, this._i);
		if (tZone != null) this.utcOffset(tZone);
		else this.utcOffset(0, true);
	}
	return this;
}
function hasAlignedHourOffset(input) {
	if (!this.isValid()) return false;
	input = input ? createLocal(input).utcOffset() : 0;
	return (this.utcOffset() - input) % 60 === 0;
}
function isDaylightSavingTime() {
	return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();
}
function isDaylightSavingTimeShifted() {
	if (!isUndefined(this._isDSTShifted)) return this._isDSTShifted;
	var c = {}, other;
	copyConfig(c, this);
	c = prepareConfig(c);
	if (c._a) {
		other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
		this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0;
	} else this._isDSTShifted = false;
	return this._isDSTShifted;
}
function isLocal() {
	return this.isValid() ? !this._isUTC : false;
}
function isUtcOffset() {
	return this.isValid() ? this._isUTC : false;
}
function isUtc() {
	return this.isValid() ? this._isUTC && this._offset === 0 : false;
}
function createDuration(input, key) {
	var duration = input, match = null, sign, ret, diffRes;
	if (isDuration(input)) duration = {
		ms: input._milliseconds,
		d: input._days,
		M: input._months
	};
	else if (isNumber(input) || !isNaN(+input)) {
		duration = {};
		if (key) duration[key] = +input;
		else duration.milliseconds = +input;
	} else if (match = aspNetRegex.exec(input)) {
		sign = match[1] === "-" ? -1 : 1;
		duration = {
			y: 0,
			d: toInt(match[DATE]) * sign,
			h: toInt(match[HOUR]) * sign,
			m: toInt(match[MINUTE]) * sign,
			s: toInt(match[SECOND]) * sign,
			ms: toInt(absRound(match[MILLISECOND] * 1e3)) * sign
		};
	} else if (match = isoRegex.exec(input)) {
		sign = match[1] === "-" ? -1 : 1;
		duration = {
			y: parseIso(match[2], sign),
			M: parseIso(match[3], sign),
			w: parseIso(match[4], sign),
			d: parseIso(match[5], sign),
			h: parseIso(match[6], sign),
			m: parseIso(match[7], sign),
			s: parseIso(match[8], sign)
		};
	} else if (duration == null) duration = {};
	else if (typeof duration === "object" && ("from" in duration || "to" in duration)) {
		diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));
		duration = {};
		duration.ms = diffRes.milliseconds;
		duration.M = diffRes.months;
	}
	ret = new Duration(duration);
	if (isDuration(input) && hasOwnProp(input, "_locale")) ret._locale = input._locale;
	if (isDuration(input) && hasOwnProp(input, "_isValid")) ret._isValid = input._isValid;
	return ret;
}
function parseIso(inp, sign) {
	var res = inp && parseFloat(inp.replace(",", "."));
	return (isNaN(res) ? 0 : res) * sign;
}
function positiveMomentsDifference(base, other) {
	var res = {};
	res.months = other.month() - base.month() + (other.year() - base.year()) * 12;
	if (base.clone().add(res.months, "M").isAfter(other)) --res.months;
	res.milliseconds = +other - +base.clone().add(res.months, "M");
	return res;
}
function momentsDifference(base, other) {
	var res;
	if (!(base.isValid() && other.isValid())) return {
		milliseconds: 0,
		months: 0
	};
	other = cloneWithOffset(other, base);
	if (base.isBefore(other)) res = positiveMomentsDifference(base, other);
	else {
		res = positiveMomentsDifference(other, base);
		res.milliseconds = -res.milliseconds;
		res.months = -res.months;
	}
	return res;
}
function createAdder(direction, name) {
	return function(val, period) {
		var dur, tmp;
		if (period !== null && !isNaN(+period)) {
			deprecateSimple(name, "moment()." + name + "(period, number) is deprecated. Please use moment()." + name + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.");
			tmp = val;
			val = period;
			period = tmp;
		}
		dur = createDuration(val, period);
		addSubtract(this, dur, direction);
		return this;
	};
}
function addSubtract(mom, duration, isAdding, updateOffset) {
	var milliseconds = duration._milliseconds, days = absRound(duration._days), months = absRound(duration._months);
	if (!mom.isValid()) return;
	updateOffset = updateOffset == null ? true : updateOffset;
	if (months) setMonth(mom, get(mom, "Month") + months * isAdding);
	if (days) set$1(mom, "Date", get(mom, "Date") + days * isAdding);
	if (milliseconds) mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
	if (updateOffset) hooks.updateOffset(mom, days || months);
}
function isString(input) {
	return typeof input === "string" || input instanceof String;
}
function isMomentInput(input) {
	return isMoment(input) || isDate(input) || isString(input) || isNumber(input) || isNumberOrStringArray(input) || isMomentInputObject(input) || input === null || input === void 0;
}
function isMomentInputObject(input) {
	var objectTest = isObject(input) && !isObjectEmpty(input), propertyTest = false, properties = [
		"years",
		"year",
		"y",
		"months",
		"month",
		"M",
		"days",
		"day",
		"d",
		"dates",
		"date",
		"D",
		"hours",
		"hour",
		"h",
		"minutes",
		"minute",
		"m",
		"seconds",
		"second",
		"s",
		"milliseconds",
		"millisecond",
		"ms"
	], i, property, propertyLen = properties.length;
	for (i = 0; i < propertyLen; i += 1) {
		property = properties[i];
		propertyTest = propertyTest || hasOwnProp(input, property);
	}
	return objectTest && propertyTest;
}
function isNumberOrStringArray(input) {
	var arrayTest = isArray(input), dataTypeTest = false;
	if (arrayTest) dataTypeTest = input.filter(function(item) {
		return !isNumber(item) && isString(input);
	}).length === 0;
	return arrayTest && dataTypeTest;
}
function isCalendarSpec(input) {
	var objectTest = isObject(input) && !isObjectEmpty(input), propertyTest = false, properties = [
		"sameDay",
		"nextDay",
		"lastDay",
		"nextWeek",
		"lastWeek",
		"sameElse"
	], i, property;
	for (i = 0; i < properties.length; i += 1) {
		property = properties[i];
		propertyTest = propertyTest || hasOwnProp(input, property);
	}
	return objectTest && propertyTest;
}
function getCalendarFormat(myMoment, now) {
	var diff = myMoment.diff(now, "days", true);
	return diff < -6 ? "sameElse" : diff < -1 ? "lastWeek" : diff < 0 ? "lastDay" : diff < 1 ? "sameDay" : diff < 2 ? "nextDay" : diff < 7 ? "nextWeek" : "sameElse";
}
function calendar$1(time, formats) {
	if (arguments.length === 1) {
		if (!arguments[0]) {
			time = void 0;
			formats = void 0;
		} else if (isMomentInput(arguments[0])) {
			time = arguments[0];
			formats = void 0;
		} else if (isCalendarSpec(arguments[0])) {
			formats = arguments[0];
			time = void 0;
		}
	}
	var now = time || createLocal(), sod = cloneWithOffset(now, this).startOf("day"), format = hooks.calendarFormat(this, sod) || "sameElse", output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);
	return this.format(output || this.localeData().calendar(format, this, createLocal(now)));
}
function clone() {
	return new Moment(this);
}
function isAfter(input, units) {
	var localInput = isMoment(input) ? input : createLocal(input);
	if (!(this.isValid() && localInput.isValid())) return false;
	units = normalizeUnits(units) || "millisecond";
	if (units === "millisecond") return this.valueOf() > localInput.valueOf();
	else return localInput.valueOf() < this.clone().startOf(units).valueOf();
}
function isBefore(input, units) {
	var localInput = isMoment(input) ? input : createLocal(input);
	if (!(this.isValid() && localInput.isValid())) return false;
	units = normalizeUnits(units) || "millisecond";
	if (units === "millisecond") return this.valueOf() < localInput.valueOf();
	else return this.clone().endOf(units).valueOf() < localInput.valueOf();
}
function isBetween(from, to, units, inclusivity) {
	var localFrom = isMoment(from) ? from : createLocal(from), localTo = isMoment(to) ? to : createLocal(to);
	if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) return false;
	inclusivity = inclusivity || "()";
	return (inclusivity[0] === "(" ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ")" ? this.isBefore(localTo, units) : !this.isAfter(localTo, units));
}
function isSame(input, units) {
	var localInput = isMoment(input) ? input : createLocal(input), inputMs;
	if (!(this.isValid() && localInput.isValid())) return false;
	units = normalizeUnits(units) || "millisecond";
	if (units === "millisecond") return this.valueOf() === localInput.valueOf();
	else {
		inputMs = localInput.valueOf();
		return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();
	}
}
function isSameOrAfter(input, units) {
	return this.isSame(input, units) || this.isAfter(input, units);
}
function isSameOrBefore(input, units) {
	return this.isSame(input, units) || this.isBefore(input, units);
}
function diff(input, units, asFloat) {
	var that, zoneDelta, output;
	if (!this.isValid()) return NaN;
	that = cloneWithOffset(input, this);
	if (!that.isValid()) return NaN;
	zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
	units = normalizeUnits(units);
	switch (units) {
		case "year":
			output = monthDiff(this, that) / 12;
			break;
		case "month":
			output = monthDiff(this, that);
			break;
		case "quarter":
			output = monthDiff(this, that) / 3;
			break;
		case "second":
			output = (this - that) / 1e3;
			break;
		case "minute":
			output = (this - that) / 6e4;
			break;
		case "hour":
			output = (this - that) / 36e5;
			break;
		case "day":
			output = (this - that - zoneDelta) / 864e5;
			break;
		case "week":
			output = (this - that - zoneDelta) / 6048e5;
			break;
		default: output = this - that;
	}
	return asFloat ? output : absFloor(output);
}
function monthDiff(a, b) {
	if (a.date() < b.date()) return -monthDiff(b, a);
	var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()), anchor = a.clone().add(wholeMonthDiff, "months"), anchor2, adjust;
	if (b - anchor < 0) {
		anchor2 = a.clone().add(wholeMonthDiff - 1, "months");
		adjust = (b - anchor) / (anchor - anchor2);
	} else {
		anchor2 = a.clone().add(wholeMonthDiff + 1, "months");
		adjust = (b - anchor) / (anchor2 - anchor);
	}
	return -(wholeMonthDiff + adjust) || 0;
}
function toString() {
	return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ");
}
function toISOString(keepOffset) {
	if (!this.isValid()) return null;
	var utc = keepOffset !== true, m = utc ? this.clone().utc() : this;
	if (m.year() < 0 || m.year() > 9999) return formatMoment(m, utc ? "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYYYY-MM-DD[T]HH:mm:ss.SSSZ");
	if (isFunction(Date.prototype.toISOString)) if (utc) return this.toDate().toISOString();
	else return new Date(this.valueOf() + this.utcOffset() * 60 * 1e3).toISOString().replace("Z", formatMoment(m, "Z"));
	return formatMoment(m, utc ? "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYY-MM-DD[T]HH:mm:ss.SSSZ");
}
/**
* Return a human readable representation of a moment that can
* also be evaluated to get a new moment which is the same
*
* @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
*/
function inspect() {
	if (!this.isValid()) return "moment.invalid(/* " + this._i + " */)";
	var func = "moment", zone = "", prefix, year, datetime, suffix;
	if (!this.isLocal()) {
		func = this.utcOffset() === 0 ? "moment.utc" : "moment.parseZone";
		zone = "Z";
	}
	prefix = "[" + func + "(\"]";
	year = 0 <= this.year() && this.year() <= 9999 ? "YYYY" : "YYYYYY";
	datetime = "-MM-DD[T]HH:mm:ss.SSS";
	suffix = zone + "[\")]";
	return this.format(prefix + year + datetime + suffix);
}
function format(inputString) {
	if (!inputString) inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;
	var output = formatMoment(this, inputString);
	return this.localeData().postformat(output);
}
function from(time, withoutSuffix) {
	if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) return createDuration({
		to: this,
		from: time
	}).locale(this.locale()).humanize(!withoutSuffix);
	else return this.localeData().invalidDate();
}
function fromNow(withoutSuffix) {
	return this.from(createLocal(), withoutSuffix);
}
function to(time, withoutSuffix) {
	if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) return createDuration({
		from: this,
		to: time
	}).locale(this.locale()).humanize(!withoutSuffix);
	else return this.localeData().invalidDate();
}
function toNow(withoutSuffix) {
	return this.to(createLocal(), withoutSuffix);
}
function locale(key) {
	var newLocaleData;
	if (key === void 0) return this._locale._abbr;
	else {
		newLocaleData = getLocale(key);
		if (newLocaleData != null) this._locale = newLocaleData;
		return this;
	}
}
function localeData() {
	return this._locale;
}
function mod$1(dividend, divisor) {
	return (dividend % divisor + divisor) % divisor;
}
function localStartOfDate(y, m, d) {
	if (y < 100 && y >= 0) return new Date(y + 400, m, d) - MS_PER_400_YEARS;
	else return new Date(y, m, d).valueOf();
}
function utcStartOfDate(y, m, d) {
	if (y < 100 && y >= 0) return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;
	else return Date.UTC(y, m, d);
}
function startOf(units) {
	var time, startOfDate;
	units = normalizeUnits(units);
	if (units === void 0 || units === "millisecond" || !this.isValid()) return this;
	startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
	switch (units) {
		case "year":
			time = startOfDate(this.year(), 0, 1);
			break;
		case "quarter":
			time = startOfDate(this.year(), this.month() - this.month() % 3, 1);
			break;
		case "month":
			time = startOfDate(this.year(), this.month(), 1);
			break;
		case "week":
			time = startOfDate(this.year(), this.month(), this.date() - this.weekday());
			break;
		case "isoWeek":
			time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1));
			break;
		case "day":
		case "date":
			time = startOfDate(this.year(), this.month(), this.date());
			break;
		case "hour":
			time = this._d.valueOf();
			time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR);
			break;
		case "minute":
			time = this._d.valueOf();
			time -= mod$1(time, MS_PER_MINUTE);
			break;
		case "second":
			time = this._d.valueOf();
			time -= mod$1(time, MS_PER_SECOND);
			break;
	}
	this._d.setTime(time);
	hooks.updateOffset(this, true);
	return this;
}
function endOf(units) {
	var time, startOfDate;
	units = normalizeUnits(units);
	if (units === void 0 || units === "millisecond" || !this.isValid()) return this;
	startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
	switch (units) {
		case "year":
			time = startOfDate(this.year() + 1, 0, 1) - 1;
			break;
		case "quarter":
			time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1;
			break;
		case "month":
			time = startOfDate(this.year(), this.month() + 1, 1) - 1;
			break;
		case "week":
			time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1;
			break;
		case "isoWeek":
			time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1;
			break;
		case "day":
		case "date":
			time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;
			break;
		case "hour":
			time = this._d.valueOf();
			time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1;
			break;
		case "minute":
			time = this._d.valueOf();
			time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;
			break;
		case "second":
			time = this._d.valueOf();
			time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;
			break;
	}
	this._d.setTime(time);
	hooks.updateOffset(this, true);
	return this;
}
function valueOf() {
	return this._d.valueOf() - (this._offset || 0) * 6e4;
}
function unix() {
	return Math.floor(this.valueOf() / 1e3);
}
function toDate() {
	return new Date(this.valueOf());
}
function toArray() {
	var m = this;
	return [
		m.year(),
		m.month(),
		m.date(),
		m.hour(),
		m.minute(),
		m.second(),
		m.millisecond()
	];
}
function toObject() {
	var m = this;
	return {
		years: m.year(),
		months: m.month(),
		date: m.date(),
		hours: m.hours(),
		minutes: m.minutes(),
		seconds: m.seconds(),
		milliseconds: m.milliseconds()
	};
}
function toJSON() {
	return this.isValid() ? this.toISOString() : null;
}
function isValid$2() {
	return isValid(this);
}
function parsingFlags() {
	return extend({}, getParsingFlags(this));
}
function invalidAt() {
	return getParsingFlags(this).overflow;
}
function creationData() {
	return {
		input: this._i,
		format: this._f,
		locale: this._locale,
		isUTC: this._isUTC,
		strict: this._strict
	};
}
function localeEras(m, format) {
	var i, l, date, eras = this._eras || getLocale("en")._eras;
	for (i = 0, l = eras.length; i < l; ++i) {
		switch (typeof eras[i].since) {
			case "string":
				date = hooks(eras[i].since).startOf("day");
				eras[i].since = date.valueOf();
				break;
		}
		switch (typeof eras[i].until) {
			case "undefined":
				eras[i].until = Infinity;
				break;
			case "string":
				date = hooks(eras[i].until).startOf("day").valueOf();
				eras[i].until = date.valueOf();
				break;
		}
	}
	return eras;
}
function localeErasParse(eraName, format, strict) {
	var i, l, eras = this.eras(), name, abbr, narrow;
	eraName = eraName.toUpperCase();
	for (i = 0, l = eras.length; i < l; ++i) {
		name = eras[i].name.toUpperCase();
		abbr = eras[i].abbr.toUpperCase();
		narrow = eras[i].narrow.toUpperCase();
		if (strict) switch (format) {
			case "N":
			case "NN":
			case "NNN":
				if (abbr === eraName) return eras[i];
				break;
			case "NNNN":
				if (name === eraName) return eras[i];
				break;
			case "NNNNN":
				if (narrow === eraName) return eras[i];
				break;
		}
		else if ([
			name,
			abbr,
			narrow
		].indexOf(eraName) >= 0) return eras[i];
	}
}
function localeErasConvertYear(era, year) {
	var dir = era.since <= era.until ? 1 : -1;
	if (year === void 0) return hooks(era.since).year();
	else return hooks(era.since).year() + (year - era.offset) * dir;
}
function getEraName() {
	var i, l, val, eras = this.localeData().eras();
	for (i = 0, l = eras.length; i < l; ++i) {
		val = this.clone().startOf("day").valueOf();
		if (eras[i].since <= val && val <= eras[i].until) return eras[i].name;
		if (eras[i].until <= val && val <= eras[i].since) return eras[i].name;
	}
	return "";
}
function getEraNarrow() {
	var i, l, val, eras = this.localeData().eras();
	for (i = 0, l = eras.length; i < l; ++i) {
		val = this.clone().startOf("day").valueOf();
		if (eras[i].since <= val && val <= eras[i].until) return eras[i].narrow;
		if (eras[i].until <= val && val <= eras[i].since) return eras[i].narrow;
	}
	return "";
}
function getEraAbbr() {
	var i, l, val, eras = this.localeData().eras();
	for (i = 0, l = eras.length; i < l; ++i) {
		val = this.clone().startOf("day").valueOf();
		if (eras[i].since <= val && val <= eras[i].until) return eras[i].abbr;
		if (eras[i].until <= val && val <= eras[i].since) return eras[i].abbr;
	}
	return "";
}
function getEraYear() {
	var i, l, dir, val, eras = this.localeData().eras();
	for (i = 0, l = eras.length; i < l; ++i) {
		dir = eras[i].since <= eras[i].until ? 1 : -1;
		val = this.clone().startOf("day").valueOf();
		if (eras[i].since <= val && val <= eras[i].until || eras[i].until <= val && val <= eras[i].since) return (this.year() - hooks(eras[i].since).year()) * dir + eras[i].offset;
	}
	return this.year();
}
function erasNameRegex(isStrict) {
	if (!hasOwnProp(this, "_erasNameRegex")) computeErasParse.call(this);
	return isStrict ? this._erasNameRegex : this._erasRegex;
}
function erasAbbrRegex(isStrict) {
	if (!hasOwnProp(this, "_erasAbbrRegex")) computeErasParse.call(this);
	return isStrict ? this._erasAbbrRegex : this._erasRegex;
}
function erasNarrowRegex(isStrict) {
	if (!hasOwnProp(this, "_erasNarrowRegex")) computeErasParse.call(this);
	return isStrict ? this._erasNarrowRegex : this._erasRegex;
}
function matchEraAbbr(isStrict, locale) {
	return locale.erasAbbrRegex(isStrict);
}
function matchEraName(isStrict, locale) {
	return locale.erasNameRegex(isStrict);
}
function matchEraNarrow(isStrict, locale) {
	return locale.erasNarrowRegex(isStrict);
}
function matchEraYearOrdinal(isStrict, locale) {
	return locale._eraYearOrdinalRegex || matchUnsigned;
}
function computeErasParse() {
	var abbrPieces = [], namePieces = [], narrowPieces = [], mixedPieces = [], i, l, erasName, erasAbbr, erasNarrow, eras = this.eras();
	for (i = 0, l = eras.length; i < l; ++i) {
		erasName = regexEscape(eras[i].name);
		erasAbbr = regexEscape(eras[i].abbr);
		erasNarrow = regexEscape(eras[i].narrow);
		namePieces.push(erasName);
		abbrPieces.push(erasAbbr);
		narrowPieces.push(erasNarrow);
		mixedPieces.push(erasName);
		mixedPieces.push(erasAbbr);
		mixedPieces.push(erasNarrow);
	}
	this._erasRegex = new RegExp("^(" + mixedPieces.join("|") + ")", "i");
	this._erasNameRegex = new RegExp("^(" + namePieces.join("|") + ")", "i");
	this._erasAbbrRegex = new RegExp("^(" + abbrPieces.join("|") + ")", "i");
	this._erasNarrowRegex = new RegExp("^(" + narrowPieces.join("|") + ")", "i");
}
function addWeekYearFormatToken(token, getter) {
	addFormatToken(0, [token, token.length], 0, getter);
}
function getSetWeekYear(input) {
	return getSetWeekYearHelper.call(this, input, this.week(), this.weekday() + this.localeData()._week.dow, this.localeData()._week.dow, this.localeData()._week.doy);
}
function getSetISOWeekYear(input) {
	return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4);
}
function getISOWeeksInYear() {
	return weeksInYear(this.year(), 1, 4);
}
function getISOWeeksInISOWeekYear() {
	return weeksInYear(this.isoWeekYear(), 1, 4);
}
function getWeeksInYear() {
	var weekInfo = this.localeData()._week;
	return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
}
function getWeeksInWeekYear() {
	var weekInfo = this.localeData()._week;
	return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);
}
function getSetWeekYearHelper(input, week, weekday, dow, doy) {
	var weeksTarget;
	if (input == null) return weekOfYear(this, dow, doy).year;
	else {
		weeksTarget = weeksInYear(input, dow, doy);
		if (week > weeksTarget) week = weeksTarget;
		return setWeekAll.call(this, input, week, weekday, dow, doy);
	}
}
function setWeekAll(weekYear, week, weekday, dow, doy) {
	var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
	this.year(date.getUTCFullYear());
	this.month(date.getUTCMonth());
	this.date(date.getUTCDate());
	return this;
}
function getSetQuarter(input) {
	return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
}
function getSetDayOfYear(input) {
	var dayOfYear = Math.round((this.clone().startOf("day") - this.clone().startOf("year")) / 864e5) + 1;
	return input == null ? dayOfYear : this.add(input - dayOfYear, "d");
}
function parseMs(input, array) {
	array[MILLISECOND] = toInt(("0." + input) * 1e3);
}
function getZoneAbbr() {
	return this._isUTC ? "UTC" : "";
}
function getZoneName() {
	return this._isUTC ? "Coordinated Universal Time" : "";
}
function createUnix(input) {
	return createLocal(input * 1e3);
}
function createInZone() {
	return createLocal.apply(null, arguments).parseZone();
}
function preParsePostFormat(string) {
	return string;
}
function get$1(format, index, field, setter) {
	var locale = getLocale(), utc = createUTC().set(setter, index);
	return locale[field](utc, format);
}
function listMonthsImpl(format, index, field) {
	if (isNumber(format)) {
		index = format;
		format = void 0;
	}
	format = format || "";
	if (index != null) return get$1(format, index, field, "month");
	var i, out = [];
	for (i = 0; i < 12; i++) out[i] = get$1(format, i, field, "month");
	return out;
}
function listWeekdaysImpl(localeSorted, format, index, field) {
	if (typeof localeSorted === "boolean") {
		if (isNumber(format)) {
			index = format;
			format = void 0;
		}
		format = format || "";
	} else {
		format = localeSorted;
		index = format;
		localeSorted = false;
		if (isNumber(format)) {
			index = format;
			format = void 0;
		}
		format = format || "";
	}
	var locale = getLocale(), shift = localeSorted ? locale._week.dow : 0, i, out = [];
	if (index != null) return get$1(format, (index + shift) % 7, field, "day");
	for (i = 0; i < 7; i++) out[i] = get$1(format, (i + shift) % 7, field, "day");
	return out;
}
function listMonths(format, index) {
	return listMonthsImpl(format, index, "months");
}
function listMonthsShort(format, index) {
	return listMonthsImpl(format, index, "monthsShort");
}
function listWeekdays(localeSorted, format, index) {
	return listWeekdaysImpl(localeSorted, format, index, "weekdays");
}
function listWeekdaysShort(localeSorted, format, index) {
	return listWeekdaysImpl(localeSorted, format, index, "weekdaysShort");
}
function listWeekdaysMin(localeSorted, format, index) {
	return listWeekdaysImpl(localeSorted, format, index, "weekdaysMin");
}
function abs() {
	var data = this._data;
	this._milliseconds = mathAbs(this._milliseconds);
	this._days = mathAbs(this._days);
	this._months = mathAbs(this._months);
	data.milliseconds = mathAbs(data.milliseconds);
	data.seconds = mathAbs(data.seconds);
	data.minutes = mathAbs(data.minutes);
	data.hours = mathAbs(data.hours);
	data.months = mathAbs(data.months);
	data.years = mathAbs(data.years);
	return this;
}
function addSubtract$1(duration, input, value, direction) {
	var other = createDuration(input, value);
	duration._milliseconds += direction * other._milliseconds;
	duration._days += direction * other._days;
	duration._months += direction * other._months;
	return duration._bubble();
}
function add$1(input, value) {
	return addSubtract$1(this, input, value, 1);
}
function subtract$1(input, value) {
	return addSubtract$1(this, input, value, -1);
}
function absCeil(number) {
	if (number < 0) return Math.floor(number);
	else return Math.ceil(number);
}
function bubble() {
	var milliseconds = this._milliseconds, days = this._days, months = this._months, data = this._data, seconds, minutes, hours, years, monthsFromDays;
	if (!(milliseconds >= 0 && days >= 0 && months >= 0 || milliseconds <= 0 && days <= 0 && months <= 0)) {
		milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
		days = 0;
		months = 0;
	}
	data.milliseconds = milliseconds % 1e3;
	seconds = absFloor(milliseconds / 1e3);
	data.seconds = seconds % 60;
	minutes = absFloor(seconds / 60);
	data.minutes = minutes % 60;
	hours = absFloor(minutes / 60);
	data.hours = hours % 24;
	days += absFloor(hours / 24);
	monthsFromDays = absFloor(daysToMonths(days));
	months += monthsFromDays;
	days -= absCeil(monthsToDays(monthsFromDays));
	years = absFloor(months / 12);
	months %= 12;
	data.days = days;
	data.months = months;
	data.years = years;
	return this;
}
function daysToMonths(days) {
	return days * 4800 / 146097;
}
function monthsToDays(months) {
	return months * 146097 / 4800;
}
function as(units) {
	if (!this.isValid()) return NaN;
	var days, months, milliseconds = this._milliseconds;
	units = normalizeUnits(units);
	if (units === "month" || units === "quarter" || units === "year") {
		days = this._days + milliseconds / 864e5;
		months = this._months + daysToMonths(days);
		switch (units) {
			case "month": return months;
			case "quarter": return months / 3;
			case "year": return months / 12;
		}
	} else {
		days = this._days + Math.round(monthsToDays(this._months));
		switch (units) {
			case "week": return days / 7 + milliseconds / 6048e5;
			case "day": return days + milliseconds / 864e5;
			case "hour": return days * 24 + milliseconds / 36e5;
			case "minute": return days * 1440 + milliseconds / 6e4;
			case "second": return days * 86400 + milliseconds / 1e3;
			case "millisecond": return Math.floor(days * 864e5) + milliseconds;
			default: throw new Error("Unknown unit " + units);
		}
	}
}
function makeAs(alias) {
	return function() {
		return this.as(alias);
	};
}
function clone$1() {
	return createDuration(this);
}
function get$2(units) {
	units = normalizeUnits(units);
	return this.isValid() ? this[units + "s"]() : NaN;
}
function makeGetter(name) {
	return function() {
		return this.isValid() ? this._data[name] : NaN;
	};
}
function weeks() {
	return absFloor(this.days() / 7);
}
function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
	return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
}
function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {
	var duration = createDuration(posNegDuration).abs(), seconds = round(duration.as("s")), minutes = round(duration.as("m")), hours = round(duration.as("h")), days = round(duration.as("d")), months = round(duration.as("M")), weeks = round(duration.as("w")), years = round(duration.as("y")), a = seconds <= thresholds.ss && ["s", seconds] || seconds < thresholds.s && ["ss", seconds] || minutes <= 1 && ["m"] || minutes < thresholds.m && ["mm", minutes] || hours <= 1 && ["h"] || hours < thresholds.h && ["hh", hours] || days <= 1 && ["d"] || days < thresholds.d && ["dd", days];
	if (thresholds.w != null) a = a || weeks <= 1 && ["w"] || weeks < thresholds.w && ["ww", weeks];
	a = a || months <= 1 && ["M"] || months < thresholds.M && ["MM", months] || years <= 1 && ["y"] || ["yy", years];
	a[2] = withoutSuffix;
	a[3] = +posNegDuration > 0;
	a[4] = locale;
	return substituteTimeAgo.apply(null, a);
}
function getSetRelativeTimeRounding(roundingFunction) {
	if (roundingFunction === void 0) return round;
	if (typeof roundingFunction === "function") {
		round = roundingFunction;
		return true;
	}
	return false;
}
function getSetRelativeTimeThreshold(threshold, limit) {
	if (thresholds[threshold] === void 0) return false;
	if (limit === void 0) return thresholds[threshold];
	thresholds[threshold] = limit;
	if (threshold === "s") thresholds.ss = limit - 1;
	return true;
}
function humanize(argWithSuffix, argThresholds) {
	if (!this.isValid()) return this.localeData().invalidDate();
	var withSuffix = false, th = thresholds, locale, output;
	if (typeof argWithSuffix === "object") {
		argThresholds = argWithSuffix;
		argWithSuffix = false;
	}
	if (typeof argWithSuffix === "boolean") withSuffix = argWithSuffix;
	if (typeof argThresholds === "object") {
		th = Object.assign({}, thresholds, argThresholds);
		if (argThresholds.s != null && argThresholds.ss == null) th.ss = argThresholds.s - 1;
	}
	locale = this.localeData();
	output = relativeTime$1(this, !withSuffix, th, locale);
	if (withSuffix) output = locale.pastFuture(+this, output);
	return locale.postformat(output);
}
function sign(x) {
	return (x > 0) - (x < 0) || +x;
}
function toISOString$1() {
	if (!this.isValid()) return this.localeData().invalidDate();
	var seconds = abs$1(this._milliseconds) / 1e3, days = abs$1(this._days), months = abs$1(this._months), minutes, hours, years, s, total = this.asSeconds(), totalSign, ymSign, daysSign, hmsSign;
	if (!total) return "P0D";
	minutes = absFloor(seconds / 60);
	hours = absFloor(minutes / 60);
	seconds %= 60;
	minutes %= 60;
	years = absFloor(months / 12);
	months %= 12;
	s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, "") : "";
	totalSign = total < 0 ? "-" : "";
	ymSign = sign(this._months) !== sign(total) ? "-" : "";
	daysSign = sign(this._days) !== sign(total) ? "-" : "";
	hmsSign = sign(this._milliseconds) !== sign(total) ? "-" : "";
	return totalSign + "P" + (years ? ymSign + years + "Y" : "") + (months ? ymSign + months + "M" : "") + (days ? daysSign + days + "D" : "") + (hours || minutes || seconds ? "T" : "") + (hours ? hmsSign + hours + "H" : "") + (minutes ? hmsSign + minutes + "M" : "") + (seconds ? hmsSign + s + "S" : "");
}
var hookCallback, some, momentProperties, updateInProgress, deprecations, keys, defaultCalendar, formattingTokens, localFormattingTokens, formatFunctions, formatTokenFunctions, defaultLongDateFormat, defaultInvalidDate, defaultOrdinal, defaultDayOfMonthOrdinalParse, defaultRelativeTime, aliases, priorities, match1, match2, match3, match4, match6, match1to2, match3to4, match5to6, match1to3, match1to4, match1to6, matchUnsigned, matchSigned, matchOffset, matchShortOffset, matchTimestamp, matchWord, match1to2NoLeadingZero, match1to2HasZero, regexes, tokens, YEAR, MONTH, DATE, HOUR, MINUTE, SECOND, MILLISECOND, WEEK, WEEKDAY, getSetYear, indexOf, defaultLocaleMonths, defaultLocaleMonthsShort, MONTHS_IN_FORMAT, defaultMonthsShortRegex, defaultMonthsRegex, defaultLocaleWeek, defaultLocaleWeekdays, defaultLocaleWeekdaysShort, defaultLocaleWeekdaysMin, defaultWeekdaysRegex, defaultWeekdaysShortRegex, defaultWeekdaysMinRegex, defaultLocaleMeridiemParse, getSetHour, baseConfig, locales, localeFamilies, globalLocale, extendedIsoRegex, basicIsoRegex, tzRegex, isoDates, isoTimes, aspNetJsonRegex, rfc2822, obsOffsets, prototypeMin, prototypeMax, now, ordering, chunkOffset, aspNetRegex, isoRegex, add, subtract, lang, MS_PER_SECOND, MS_PER_MINUTE, MS_PER_HOUR, MS_PER_400_YEARS, getSetDayOfMonth, getSetMinute, getSetSecond, token, getSetMillisecond, proto, proto$1, mathAbs, asMilliseconds, asSeconds, asMinutes, asHours, asDays, asWeeks, asMonths, asQuarters, asYears, valueOf$1, milliseconds, seconds, minutes, hours, days, months, years, round, thresholds, abs$1, proto$2;
var init_moment = __esmMin((() => {
	if (Array.prototype.some) some = Array.prototype.some;
	else some = function(fun) {
		var t = Object(this), len = t.length >>> 0, i;
		for (i = 0; i < len; i++) if (i in t && fun.call(this, t[i], i, t)) return true;
		return false;
	};
	momentProperties = hooks.momentProperties = [], updateInProgress = false;
	deprecations = {};
	hooks.suppressDeprecationWarnings = false;
	hooks.deprecationHandler = null;
	if (Object.keys) keys = Object.keys;
	else keys = function(obj) {
		var i, res = [];
		for (i in obj) if (hasOwnProp(obj, i)) res.push(i);
		return res;
	};
	defaultCalendar = {
		sameDay: "[Today at] LT",
		nextDay: "[Tomorrow at] LT",
		nextWeek: "dddd [at] LT",
		lastDay: "[Yesterday at] LT",
		lastWeek: "[Last] dddd [at] LT",
		sameElse: "L"
	};
	formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, formatFunctions = {}, formatTokenFunctions = {};
	defaultLongDateFormat = {
		LTS: "h:mm:ss A",
		LT: "h:mm A",
		L: "MM/DD/YYYY",
		LL: "MMMM D, YYYY",
		LLL: "MMMM D, YYYY h:mm A",
		LLLL: "dddd, MMMM D, YYYY h:mm A"
	};
	defaultInvalidDate = "Invalid date";
	defaultOrdinal = "%d", defaultDayOfMonthOrdinalParse = /\d{1,2}/;
	defaultRelativeTime = {
		future: "in %s",
		past: "%s ago",
		s: "a few seconds",
		ss: "%d seconds",
		m: "a minute",
		mm: "%d minutes",
		h: "an hour",
		hh: "%d hours",
		d: "a day",
		dd: "%d days",
		w: "a week",
		ww: "%d weeks",
		M: "a month",
		MM: "%d months",
		y: "a year",
		yy: "%d years"
	};
	aliases = {
		D: "date",
		dates: "date",
		date: "date",
		d: "day",
		days: "day",
		day: "day",
		e: "weekday",
		weekdays: "weekday",
		weekday: "weekday",
		E: "isoWeekday",
		isoweekdays: "isoWeekday",
		isoweekday: "isoWeekday",
		DDD: "dayOfYear",
		dayofyears: "dayOfYear",
		dayofyear: "dayOfYear",
		h: "hour",
		hours: "hour",
		hour: "hour",
		ms: "millisecond",
		milliseconds: "millisecond",
		millisecond: "millisecond",
		m: "minute",
		minutes: "minute",
		minute: "minute",
		M: "month",
		months: "month",
		month: "month",
		Q: "quarter",
		quarters: "quarter",
		quarter: "quarter",
		s: "second",
		seconds: "second",
		second: "second",
		gg: "weekYear",
		weekyears: "weekYear",
		weekyear: "weekYear",
		GG: "isoWeekYear",
		isoweekyears: "isoWeekYear",
		isoweekyear: "isoWeekYear",
		w: "week",
		weeks: "week",
		week: "week",
		W: "isoWeek",
		isoweeks: "isoWeek",
		isoweek: "isoWeek",
		y: "year",
		years: "year",
		year: "year"
	};
	priorities = {
		date: 9,
		day: 11,
		weekday: 11,
		isoWeekday: 11,
		dayOfYear: 4,
		hour: 13,
		millisecond: 16,
		minute: 14,
		month: 8,
		quarter: 7,
		second: 15,
		weekYear: 1,
		isoWeekYear: 1,
		week: 5,
		isoWeek: 5,
		year: 1
	};
	match1 = /\d/, match2 = /\d\d/, match3 = /\d{3}/, match4 = /\d{4}/, match6 = /[+-]?\d{6}/, match1to2 = /\d\d?/, match3to4 = /\d\d\d\d?/, match5to6 = /\d\d\d\d\d\d?/, match1to3 = /\d{1,3}/, match1to4 = /\d{1,4}/, match1to6 = /[+-]?\d{1,6}/, matchUnsigned = /\d+/, matchSigned = /[+-]?\d+/, matchOffset = /Z|[+-]\d\d:?\d\d/gi, matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, match1to2NoLeadingZero = /^[1-9]\d?/, match1to2HasZero = /^([1-9]\d|\d)/, regexes = {};
	tokens = {};
	YEAR = 0, MONTH = 1, DATE = 2, HOUR = 3, MINUTE = 4, SECOND = 5, MILLISECOND = 6, WEEK = 7, WEEKDAY = 8;
	addFormatToken("Y", 0, 0, function() {
		var y = this.year();
		return y <= 9999 ? zeroFill(y, 4) : "+" + y;
	});
	addFormatToken(0, ["YY", 2], 0, function() {
		return this.year() % 100;
	});
	addFormatToken(0, ["YYYY", 4], 0, "year");
	addFormatToken(0, ["YYYYY", 5], 0, "year");
	addFormatToken(0, [
		"YYYYYY",
		6,
		true
	], 0, "year");
	addRegexToken("Y", matchSigned);
	addRegexToken("YY", match1to2, match2);
	addRegexToken("YYYY", match1to4, match4);
	addRegexToken("YYYYY", match1to6, match6);
	addRegexToken("YYYYYY", match1to6, match6);
	addParseToken(["YYYYY", "YYYYYY"], YEAR);
	addParseToken("YYYY", function(input, array) {
		array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
	});
	addParseToken("YY", function(input, array) {
		array[YEAR] = hooks.parseTwoDigitYear(input);
	});
	addParseToken("Y", function(input, array) {
		array[YEAR] = parseInt(input, 10);
	});
	hooks.parseTwoDigitYear = function(input) {
		return toInt(input) + (toInt(input) > 68 ? 1900 : 2e3);
	};
	getSetYear = makeGetSet("FullYear", true);
	if (Array.prototype.indexOf) indexOf = Array.prototype.indexOf;
	else indexOf = function(o) {
		var i;
		for (i = 0; i < this.length; ++i) if (this[i] === o) return i;
		return -1;
	};
	addFormatToken("M", ["MM", 2], "Mo", function() {
		return this.month() + 1;
	});
	addFormatToken("MMM", 0, 0, function(format) {
		return this.localeData().monthsShort(this, format);
	});
	addFormatToken("MMMM", 0, 0, function(format) {
		return this.localeData().months(this, format);
	});
	addRegexToken("M", match1to2, match1to2NoLeadingZero);
	addRegexToken("MM", match1to2, match2);
	addRegexToken("MMM", function(isStrict, locale) {
		return locale.monthsShortRegex(isStrict);
	});
	addRegexToken("MMMM", function(isStrict, locale) {
		return locale.monthsRegex(isStrict);
	});
	addParseToken(["M", "MM"], function(input, array) {
		array[MONTH] = toInt(input) - 1;
	});
	addParseToken(["MMM", "MMMM"], function(input, array, config, token) {
		var month = config._locale.monthsParse(input, token, config._strict);
		if (month != null) array[MONTH] = month;
		else getParsingFlags(config).invalidMonth = input;
	});
	defaultLocaleMonths = "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), defaultLocaleMonthsShort = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, defaultMonthsShortRegex = matchWord, defaultMonthsRegex = matchWord;
	addFormatToken("w", ["ww", 2], "wo", "week");
	addFormatToken("W", ["WW", 2], "Wo", "isoWeek");
	addRegexToken("w", match1to2, match1to2NoLeadingZero);
	addRegexToken("ww", match1to2, match2);
	addRegexToken("W", match1to2, match1to2NoLeadingZero);
	addRegexToken("WW", match1to2, match2);
	addWeekParseToken([
		"w",
		"ww",
		"W",
		"WW"
	], function(input, week, config, token) {
		week[token.substr(0, 1)] = toInt(input);
	});
	defaultLocaleWeek = {
		dow: 0,
		doy: 6
	};
	addFormatToken("d", 0, "do", "day");
	addFormatToken("dd", 0, 0, function(format) {
		return this.localeData().weekdaysMin(this, format);
	});
	addFormatToken("ddd", 0, 0, function(format) {
		return this.localeData().weekdaysShort(this, format);
	});
	addFormatToken("dddd", 0, 0, function(format) {
		return this.localeData().weekdays(this, format);
	});
	addFormatToken("e", 0, 0, "weekday");
	addFormatToken("E", 0, 0, "isoWeekday");
	addRegexToken("d", match1to2);
	addRegexToken("e", match1to2);
	addRegexToken("E", match1to2);
	addRegexToken("dd", function(isStrict, locale) {
		return locale.weekdaysMinRegex(isStrict);
	});
	addRegexToken("ddd", function(isStrict, locale) {
		return locale.weekdaysShortRegex(isStrict);
	});
	addRegexToken("dddd", function(isStrict, locale) {
		return locale.weekdaysRegex(isStrict);
	});
	addWeekParseToken([
		"dd",
		"ddd",
		"dddd"
	], function(input, week, config, token) {
		var weekday = config._locale.weekdaysParse(input, token, config._strict);
		if (weekday != null) week.d = weekday;
		else getParsingFlags(config).invalidWeekday = input;
	});
	addWeekParseToken([
		"d",
		"e",
		"E"
	], function(input, week, config, token) {
		week[token] = toInt(input);
	});
	defaultLocaleWeekdays = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), defaultLocaleWeekdaysShort = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), defaultLocaleWeekdaysMin = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), defaultWeekdaysRegex = matchWord, defaultWeekdaysShortRegex = matchWord, defaultWeekdaysMinRegex = matchWord;
	addFormatToken("H", ["HH", 2], 0, "hour");
	addFormatToken("h", ["hh", 2], 0, hFormat);
	addFormatToken("k", ["kk", 2], 0, kFormat);
	addFormatToken("hmm", 0, 0, function() {
		return "" + hFormat.apply(this) + zeroFill(this.minutes(), 2);
	});
	addFormatToken("hmmss", 0, 0, function() {
		return "" + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);
	});
	addFormatToken("Hmm", 0, 0, function() {
		return "" + this.hours() + zeroFill(this.minutes(), 2);
	});
	addFormatToken("Hmmss", 0, 0, function() {
		return "" + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);
	});
	meridiem("a", true);
	meridiem("A", false);
	addRegexToken("a", matchMeridiem);
	addRegexToken("A", matchMeridiem);
	addRegexToken("H", match1to2, match1to2HasZero);
	addRegexToken("h", match1to2, match1to2NoLeadingZero);
	addRegexToken("k", match1to2, match1to2NoLeadingZero);
	addRegexToken("HH", match1to2, match2);
	addRegexToken("hh", match1to2, match2);
	addRegexToken("kk", match1to2, match2);
	addRegexToken("hmm", match3to4);
	addRegexToken("hmmss", match5to6);
	addRegexToken("Hmm", match3to4);
	addRegexToken("Hmmss", match5to6);
	addParseToken(["H", "HH"], HOUR);
	addParseToken(["k", "kk"], function(input, array, config) {
		var kInput = toInt(input);
		array[HOUR] = kInput === 24 ? 0 : kInput;
	});
	addParseToken(["a", "A"], function(input, array, config) {
		config._isPm = config._locale.isPM(input);
		config._meridiem = input;
	});
	addParseToken(["h", "hh"], function(input, array, config) {
		array[HOUR] = toInt(input);
		getParsingFlags(config).bigHour = true;
	});
	addParseToken("hmm", function(input, array, config) {
		var pos = input.length - 2;
		array[HOUR] = toInt(input.substr(0, pos));
		array[MINUTE] = toInt(input.substr(pos));
		getParsingFlags(config).bigHour = true;
	});
	addParseToken("hmmss", function(input, array, config) {
		var pos1 = input.length - 4, pos2 = input.length - 2;
		array[HOUR] = toInt(input.substr(0, pos1));
		array[MINUTE] = toInt(input.substr(pos1, 2));
		array[SECOND] = toInt(input.substr(pos2));
		getParsingFlags(config).bigHour = true;
	});
	addParseToken("Hmm", function(input, array, config) {
		var pos = input.length - 2;
		array[HOUR] = toInt(input.substr(0, pos));
		array[MINUTE] = toInt(input.substr(pos));
	});
	addParseToken("Hmmss", function(input, array, config) {
		var pos1 = input.length - 4, pos2 = input.length - 2;
		array[HOUR] = toInt(input.substr(0, pos1));
		array[MINUTE] = toInt(input.substr(pos1, 2));
		array[SECOND] = toInt(input.substr(pos2));
	});
	defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i, getSetHour = makeGetSet("Hours", true);
	baseConfig = {
		calendar: defaultCalendar,
		longDateFormat: defaultLongDateFormat,
		invalidDate: defaultInvalidDate,
		ordinal: defaultOrdinal,
		dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
		relativeTime: defaultRelativeTime,
		months: defaultLocaleMonths,
		monthsShort: defaultLocaleMonthsShort,
		week: defaultLocaleWeek,
		weekdays: defaultLocaleWeekdays,
		weekdaysMin: defaultLocaleWeekdaysMin,
		weekdaysShort: defaultLocaleWeekdaysShort,
		meridiemParse: defaultLocaleMeridiemParse
	};
	locales = {}, localeFamilies = {};
	extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, tzRegex = /Z|[+-]\d\d(?::?\d\d)?/, isoDates = [
		["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/],
		["YYYY-MM-DD", /\d{4}-\d\d-\d\d/],
		["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/],
		[
			"GGGG-[W]WW",
			/\d{4}-W\d\d/,
			false
		],
		["YYYY-DDD", /\d{4}-\d{3}/],
		[
			"YYYY-MM",
			/\d{4}-\d\d/,
			false
		],
		["YYYYYYMMDD", /[+-]\d{10}/],
		["YYYYMMDD", /\d{8}/],
		["GGGG[W]WWE", /\d{4}W\d{3}/],
		[
			"GGGG[W]WW",
			/\d{4}W\d{2}/,
			false
		],
		["YYYYDDD", /\d{7}/],
		[
			"YYYYMM",
			/\d{6}/,
			false
		],
		[
			"YYYY",
			/\d{4}/,
			false
		]
	], isoTimes = [
		["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/],
		["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/],
		["HH:mm:ss", /\d\d:\d\d:\d\d/],
		["HH:mm", /\d\d:\d\d/],
		["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/],
		["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/],
		["HHmmss", /\d\d\d\d\d\d/],
		["HHmm", /\d\d\d\d/],
		["HH", /\d\d/]
	], aspNetJsonRegex = /^\/?Date\((-?\d+)/i, rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, obsOffsets = {
		UT: 0,
		GMT: 0,
		EDT: -240,
		EST: -300,
		CDT: -300,
		CST: -360,
		MDT: -360,
		MST: -420,
		PDT: -420,
		PST: -480
	};
	hooks.createFromInputFallback = deprecate("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.", function(config) {
		config._d = /* @__PURE__ */ new Date(config._i + (config._useUTC ? " UTC" : ""));
	});
	hooks.ISO_8601 = function() {};
	hooks.RFC_2822 = function() {};
	prototypeMin = deprecate("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/", function() {
		var other = createLocal.apply(null, arguments);
		if (this.isValid() && other.isValid()) return other < this ? this : other;
		else return createInvalid();
	}), prototypeMax = deprecate("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/", function() {
		var other = createLocal.apply(null, arguments);
		if (this.isValid() && other.isValid()) return other > this ? this : other;
		else return createInvalid();
	});
	now = function() {
		return Date.now ? Date.now() : +/* @__PURE__ */ new Date();
	};
	ordering = [
		"year",
		"quarter",
		"month",
		"week",
		"day",
		"hour",
		"minute",
		"second",
		"millisecond"
	];
	offset("Z", ":");
	offset("ZZ", "");
	addRegexToken("Z", matchShortOffset);
	addRegexToken("ZZ", matchShortOffset);
	addParseToken(["Z", "ZZ"], function(input, array, config) {
		config._useUTC = true;
		config._tzm = offsetFromString(matchShortOffset, input);
	});
	chunkOffset = /([\+\-]|\d\d)/gi;
	hooks.updateOffset = function() {};
	aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
	createDuration.fn = Duration.prototype;
	createDuration.invalid = createInvalid$1;
	add = createAdder(1, "add"), subtract = createAdder(-1, "subtract");
	hooks.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ";
	hooks.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]";
	lang = deprecate("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.", function(key) {
		if (key === void 0) return this.localeData();
		else return this.locale(key);
	});
	MS_PER_SECOND = 1e3, MS_PER_MINUTE = 60 * MS_PER_SECOND, MS_PER_HOUR = 60 * MS_PER_MINUTE, MS_PER_400_YEARS = 146097 * 24 * MS_PER_HOUR;
	addFormatToken("N", 0, 0, "eraAbbr");
	addFormatToken("NN", 0, 0, "eraAbbr");
	addFormatToken("NNN", 0, 0, "eraAbbr");
	addFormatToken("NNNN", 0, 0, "eraName");
	addFormatToken("NNNNN", 0, 0, "eraNarrow");
	addFormatToken("y", ["y", 1], "yo", "eraYear");
	addFormatToken("y", ["yy", 2], 0, "eraYear");
	addFormatToken("y", ["yyy", 3], 0, "eraYear");
	addFormatToken("y", ["yyyy", 4], 0, "eraYear");
	addRegexToken("N", matchEraAbbr);
	addRegexToken("NN", matchEraAbbr);
	addRegexToken("NNN", matchEraAbbr);
	addRegexToken("NNNN", matchEraName);
	addRegexToken("NNNNN", matchEraNarrow);
	addParseToken([
		"N",
		"NN",
		"NNN",
		"NNNN",
		"NNNNN"
	], function(input, array, config, token) {
		var era = config._locale.erasParse(input, token, config._strict);
		if (era) getParsingFlags(config).era = era;
		else getParsingFlags(config).invalidEra = input;
	});
	addRegexToken("y", matchUnsigned);
	addRegexToken("yy", matchUnsigned);
	addRegexToken("yyy", matchUnsigned);
	addRegexToken("yyyy", matchUnsigned);
	addRegexToken("yo", matchEraYearOrdinal);
	addParseToken([
		"y",
		"yy",
		"yyy",
		"yyyy"
	], YEAR);
	addParseToken(["yo"], function(input, array, config, token) {
		var match;
		if (config._locale._eraYearOrdinalRegex) match = input.match(config._locale._eraYearOrdinalRegex);
		if (config._locale.eraYearOrdinalParse) array[YEAR] = config._locale.eraYearOrdinalParse(input, match);
		else array[YEAR] = parseInt(input, 10);
	});
	addFormatToken(0, ["gg", 2], 0, function() {
		return this.weekYear() % 100;
	});
	addFormatToken(0, ["GG", 2], 0, function() {
		return this.isoWeekYear() % 100;
	});
	addWeekYearFormatToken("gggg", "weekYear");
	addWeekYearFormatToken("ggggg", "weekYear");
	addWeekYearFormatToken("GGGG", "isoWeekYear");
	addWeekYearFormatToken("GGGGG", "isoWeekYear");
	addRegexToken("G", matchSigned);
	addRegexToken("g", matchSigned);
	addRegexToken("GG", match1to2, match2);
	addRegexToken("gg", match1to2, match2);
	addRegexToken("GGGG", match1to4, match4);
	addRegexToken("gggg", match1to4, match4);
	addRegexToken("GGGGG", match1to6, match6);
	addRegexToken("ggggg", match1to6, match6);
	addWeekParseToken([
		"gggg",
		"ggggg",
		"GGGG",
		"GGGGG"
	], function(input, week, config, token) {
		week[token.substr(0, 2)] = toInt(input);
	});
	addWeekParseToken(["gg", "GG"], function(input, week, config, token) {
		week[token] = hooks.parseTwoDigitYear(input);
	});
	addFormatToken("Q", 0, "Qo", "quarter");
	addRegexToken("Q", match1);
	addParseToken("Q", function(input, array) {
		array[MONTH] = (toInt(input) - 1) * 3;
	});
	addFormatToken("D", ["DD", 2], "Do", "date");
	addRegexToken("D", match1to2, match1to2NoLeadingZero);
	addRegexToken("DD", match1to2, match2);
	addRegexToken("Do", function(isStrict, locale) {
		return isStrict ? locale._dayOfMonthOrdinalParse || locale._ordinalParse : locale._dayOfMonthOrdinalParseLenient;
	});
	addParseToken(["D", "DD"], DATE);
	addParseToken("Do", function(input, array) {
		array[DATE] = toInt(input.match(match1to2)[0]);
	});
	getSetDayOfMonth = makeGetSet("Date", true);
	addFormatToken("DDD", ["DDDD", 3], "DDDo", "dayOfYear");
	addRegexToken("DDD", match1to3);
	addRegexToken("DDDD", match3);
	addParseToken(["DDD", "DDDD"], function(input, array, config) {
		config._dayOfYear = toInt(input);
	});
	addFormatToken("m", ["mm", 2], 0, "minute");
	addRegexToken("m", match1to2, match1to2HasZero);
	addRegexToken("mm", match1to2, match2);
	addParseToken(["m", "mm"], MINUTE);
	getSetMinute = makeGetSet("Minutes", false);
	addFormatToken("s", ["ss", 2], 0, "second");
	addRegexToken("s", match1to2, match1to2HasZero);
	addRegexToken("ss", match1to2, match2);
	addParseToken(["s", "ss"], SECOND);
	getSetSecond = makeGetSet("Seconds", false);
	addFormatToken("S", 0, 0, function() {
		return ~~(this.millisecond() / 100);
	});
	addFormatToken(0, ["SS", 2], 0, function() {
		return ~~(this.millisecond() / 10);
	});
	addFormatToken(0, ["SSS", 3], 0, "millisecond");
	addFormatToken(0, ["SSSS", 4], 0, function() {
		return this.millisecond() * 10;
	});
	addFormatToken(0, ["SSSSS", 5], 0, function() {
		return this.millisecond() * 100;
	});
	addFormatToken(0, ["SSSSSS", 6], 0, function() {
		return this.millisecond() * 1e3;
	});
	addFormatToken(0, ["SSSSSSS", 7], 0, function() {
		return this.millisecond() * 1e4;
	});
	addFormatToken(0, ["SSSSSSSS", 8], 0, function() {
		return this.millisecond() * 1e5;
	});
	addFormatToken(0, ["SSSSSSSSS", 9], 0, function() {
		return this.millisecond() * 1e6;
	});
	addRegexToken("S", match1to3, match1);
	addRegexToken("SS", match1to3, match2);
	addRegexToken("SSS", match1to3, match3);
	for (token = "SSSS"; token.length <= 9; token += "S") addRegexToken(token, matchUnsigned);
	for (token = "S"; token.length <= 9; token += "S") addParseToken(token, parseMs);
	getSetMillisecond = makeGetSet("Milliseconds", false);
	addFormatToken("z", 0, 0, "zoneAbbr");
	addFormatToken("zz", 0, 0, "zoneName");
	proto = Moment.prototype;
	proto.add = add;
	proto.calendar = calendar$1;
	proto.clone = clone;
	proto.diff = diff;
	proto.endOf = endOf;
	proto.format = format;
	proto.from = from;
	proto.fromNow = fromNow;
	proto.to = to;
	proto.toNow = toNow;
	proto.get = stringGet;
	proto.invalidAt = invalidAt;
	proto.isAfter = isAfter;
	proto.isBefore = isBefore;
	proto.isBetween = isBetween;
	proto.isSame = isSame;
	proto.isSameOrAfter = isSameOrAfter;
	proto.isSameOrBefore = isSameOrBefore;
	proto.isValid = isValid$2;
	proto.lang = lang;
	proto.locale = locale;
	proto.localeData = localeData;
	proto.max = prototypeMax;
	proto.min = prototypeMin;
	proto.parsingFlags = parsingFlags;
	proto.set = stringSet;
	proto.startOf = startOf;
	proto.subtract = subtract;
	proto.toArray = toArray;
	proto.toObject = toObject;
	proto.toDate = toDate;
	proto.toISOString = toISOString;
	proto.inspect = inspect;
	if (typeof Symbol !== "undefined" && Symbol.for != null) proto[Symbol.for("nodejs.util.inspect.custom")] = function() {
		return "Moment<" + this.format() + ">";
	};
	proto.toJSON = toJSON;
	proto.toString = toString;
	proto.unix = unix;
	proto.valueOf = valueOf;
	proto.creationData = creationData;
	proto.eraName = getEraName;
	proto.eraNarrow = getEraNarrow;
	proto.eraAbbr = getEraAbbr;
	proto.eraYear = getEraYear;
	proto.year = getSetYear;
	proto.isLeapYear = getIsLeapYear;
	proto.weekYear = getSetWeekYear;
	proto.isoWeekYear = getSetISOWeekYear;
	proto.quarter = proto.quarters = getSetQuarter;
	proto.month = getSetMonth;
	proto.daysInMonth = getDaysInMonth;
	proto.week = proto.weeks = getSetWeek;
	proto.isoWeek = proto.isoWeeks = getSetISOWeek;
	proto.weeksInYear = getWeeksInYear;
	proto.weeksInWeekYear = getWeeksInWeekYear;
	proto.isoWeeksInYear = getISOWeeksInYear;
	proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
	proto.date = getSetDayOfMonth;
	proto.day = proto.days = getSetDayOfWeek;
	proto.weekday = getSetLocaleDayOfWeek;
	proto.isoWeekday = getSetISODayOfWeek;
	proto.dayOfYear = getSetDayOfYear;
	proto.hour = proto.hours = getSetHour;
	proto.minute = proto.minutes = getSetMinute;
	proto.second = proto.seconds = getSetSecond;
	proto.millisecond = proto.milliseconds = getSetMillisecond;
	proto.utcOffset = getSetOffset;
	proto.utc = setOffsetToUTC;
	proto.local = setOffsetToLocal;
	proto.parseZone = setOffsetToParsedOffset;
	proto.hasAlignedHourOffset = hasAlignedHourOffset;
	proto.isDST = isDaylightSavingTime;
	proto.isLocal = isLocal;
	proto.isUtcOffset = isUtcOffset;
	proto.isUtc = isUtc;
	proto.isUTC = isUtc;
	proto.zoneAbbr = getZoneAbbr;
	proto.zoneName = getZoneName;
	proto.dates = deprecate("dates accessor is deprecated. Use date instead.", getSetDayOfMonth);
	proto.months = deprecate("months accessor is deprecated. Use month instead", getSetMonth);
	proto.years = deprecate("years accessor is deprecated. Use year instead", getSetYear);
	proto.zone = deprecate("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/", getSetZone);
	proto.isDSTShifted = deprecate("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information", isDaylightSavingTimeShifted);
	proto$1 = Locale.prototype;
	proto$1.calendar = calendar;
	proto$1.longDateFormat = longDateFormat;
	proto$1.invalidDate = invalidDate;
	proto$1.ordinal = ordinal;
	proto$1.preparse = preParsePostFormat;
	proto$1.postformat = preParsePostFormat;
	proto$1.relativeTime = relativeTime;
	proto$1.pastFuture = pastFuture;
	proto$1.set = set;
	proto$1.eras = localeEras;
	proto$1.erasParse = localeErasParse;
	proto$1.erasConvertYear = localeErasConvertYear;
	proto$1.erasAbbrRegex = erasAbbrRegex;
	proto$1.erasNameRegex = erasNameRegex;
	proto$1.erasNarrowRegex = erasNarrowRegex;
	proto$1.months = localeMonths;
	proto$1.monthsShort = localeMonthsShort;
	proto$1.monthsParse = localeMonthsParse;
	proto$1.monthsRegex = monthsRegex;
	proto$1.monthsShortRegex = monthsShortRegex;
	proto$1.week = localeWeek;
	proto$1.firstDayOfYear = localeFirstDayOfYear;
	proto$1.firstDayOfWeek = localeFirstDayOfWeek;
	proto$1.weekdays = localeWeekdays;
	proto$1.weekdaysMin = localeWeekdaysMin;
	proto$1.weekdaysShort = localeWeekdaysShort;
	proto$1.weekdaysParse = localeWeekdaysParse;
	proto$1.weekdaysRegex = weekdaysRegex;
	proto$1.weekdaysShortRegex = weekdaysShortRegex;
	proto$1.weekdaysMinRegex = weekdaysMinRegex;
	proto$1.isPM = localeIsPM;
	proto$1.meridiem = localeMeridiem;
	getSetGlobalLocale("en", {
		eras: [{
			since: "0001-01-01",
			until: Infinity,
			offset: 1,
			name: "Anno Domini",
			narrow: "AD",
			abbr: "AD"
		}, {
			since: "0000-12-31",
			until: -Infinity,
			offset: 1,
			name: "Before Christ",
			narrow: "BC",
			abbr: "BC"
		}],
		dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
		ordinal: function(number) {
			var b = number % 10;
			return number + (toInt(number % 100 / 10) === 1 ? "th" : b === 1 ? "st" : b === 2 ? "nd" : b === 3 ? "rd" : "th");
		}
	});
	hooks.lang = deprecate("moment.lang is deprecated. Use moment.locale instead.", getSetGlobalLocale);
	hooks.langData = deprecate("moment.langData is deprecated. Use moment.localeData instead.", getLocale);
	mathAbs = Math.abs;
	asMilliseconds = makeAs("ms"), asSeconds = makeAs("s"), asMinutes = makeAs("m"), asHours = makeAs("h"), asDays = makeAs("d"), asWeeks = makeAs("w"), asMonths = makeAs("M"), asQuarters = makeAs("Q"), asYears = makeAs("y"), valueOf$1 = asMilliseconds;
	milliseconds = makeGetter("milliseconds"), seconds = makeGetter("seconds"), minutes = makeGetter("minutes"), hours = makeGetter("hours"), days = makeGetter("days"), months = makeGetter("months"), years = makeGetter("years");
	round = Math.round, thresholds = {
		ss: 44,
		s: 45,
		m: 45,
		h: 22,
		d: 26,
		w: null,
		M: 11
	};
	abs$1 = Math.abs;
	proto$2 = Duration.prototype;
	proto$2.isValid = isValid$1;
	proto$2.abs = abs;
	proto$2.add = add$1;
	proto$2.subtract = subtract$1;
	proto$2.as = as;
	proto$2.asMilliseconds = asMilliseconds;
	proto$2.asSeconds = asSeconds;
	proto$2.asMinutes = asMinutes;
	proto$2.asHours = asHours;
	proto$2.asDays = asDays;
	proto$2.asWeeks = asWeeks;
	proto$2.asMonths = asMonths;
	proto$2.asQuarters = asQuarters;
	proto$2.asYears = asYears;
	proto$2.valueOf = valueOf$1;
	proto$2._bubble = bubble;
	proto$2.clone = clone$1;
	proto$2.get = get$2;
	proto$2.milliseconds = milliseconds;
	proto$2.seconds = seconds;
	proto$2.minutes = minutes;
	proto$2.hours = hours;
	proto$2.days = days;
	proto$2.weeks = weeks;
	proto$2.months = months;
	proto$2.years = years;
	proto$2.humanize = humanize;
	proto$2.toISOString = toISOString$1;
	proto$2.toString = toISOString$1;
	proto$2.toJSON = toISOString$1;
	proto$2.locale = locale;
	proto$2.localeData = localeData;
	proto$2.toIsoString = deprecate("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)", toISOString$1);
	proto$2.lang = lang;
	addFormatToken("X", 0, 0, "unix");
	addFormatToken("x", 0, 0, "valueOf");
	addRegexToken("x", matchSigned);
	addRegexToken("X", matchTimestamp);
	addParseToken("X", function(input, array, config) {
		config._d = /* @__PURE__ */ new Date(parseFloat(input) * 1e3);
	});
	addParseToken("x", function(input, array, config) {
		config._d = new Date(toInt(input));
	});
	//! moment.js
	hooks.version = "2.30.1";
	setHookCallback(createLocal);
	hooks.fn = proto;
	hooks.min = min;
	hooks.max = max;
	hooks.now = now;
	hooks.utc = createUTC;
	hooks.unix = createUnix;
	hooks.months = listMonths;
	hooks.isDate = isDate;
	hooks.locale = getSetGlobalLocale;
	hooks.invalid = createInvalid;
	hooks.duration = createDuration;
	hooks.isMoment = isMoment;
	hooks.weekdays = listWeekdays;
	hooks.parseZone = createInZone;
	hooks.localeData = getLocale;
	hooks.isDuration = isDuration;
	hooks.monthsShort = listMonthsShort;
	hooks.weekdaysMin = listWeekdaysMin;
	hooks.defineLocale = defineLocale;
	hooks.updateLocale = updateLocale;
	hooks.locales = listLocales;
	hooks.weekdaysShort = listWeekdaysShort;
	hooks.normalizeUnits = normalizeUnits;
	hooks.relativeTimeRounding = getSetRelativeTimeRounding;
	hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
	hooks.calendarFormat = getCalendarFormat;
	hooks.prototype = proto;
	hooks.HTML5_FMT = {
		DATETIME_LOCAL: "YYYY-MM-DDTHH:mm",
		DATETIME_LOCAL_SECONDS: "YYYY-MM-DDTHH:mm:ss",
		DATETIME_LOCAL_MS: "YYYY-MM-DDTHH:mm:ss.SSS",
		DATE: "YYYY-MM-DD",
		TIME: "HH:mm",
		TIME_SECONDS: "HH:mm:ss",
		TIME_MS: "HH:mm:ss.SSS",
		WEEK: "GGGG-[W]WW",
		MONTH: "YYYY-MM"
	};
}));
//#endregion
//#region ../../node_modules/pikaday/css/pikaday.css
var import_pikaday = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
	/*!
	* Pikaday
	*
	* Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/Pikaday/Pikaday
	*/
	(function(root, factory) {
		"use strict";
		var moment;
		if (typeof exports === "object") {
			try {
				moment = (init_moment(), __toCommonJS(moment_exports));
			} catch (e) {}
			module.exports = factory(moment);
		} else if (typeof define === "function" && define.amd) define(function(req) {
			var id = "moment";
			try {
				moment = req(id);
			} catch (e) {}
			return factory(moment);
		});
		else root.Pikaday = factory(root.moment);
	})(exports, function(moment) {
		"use strict";
		/**
		* feature detection and helper functions
		*/
		var hasMoment = typeof moment === "function", hasEventListeners = !!window.addEventListener, document = window.document, sto = window.setTimeout, addEvent = function(el, e, callback, capture) {
			if (hasEventListeners) el.addEventListener(e, callback, !!capture);
			else el.attachEvent("on" + e, callback);
		}, removeEvent = function(el, e, callback, capture) {
			if (hasEventListeners) el.removeEventListener(e, callback, !!capture);
			else el.detachEvent("on" + e, callback);
		}, trim = function(str) {
			return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, "");
		}, hasClass = function(el, cn) {
			return (" " + el.className + " ").indexOf(" " + cn + " ") !== -1;
		}, addClass = function(el, cn) {
			if (!hasClass(el, cn)) el.className = el.className === "" ? cn : el.className + " " + cn;
		}, removeClass = function(el, cn) {
			el.className = trim((" " + el.className + " ").replace(" " + cn + " ", " "));
		}, isArray = function(obj) {
			return /Array/.test(Object.prototype.toString.call(obj));
		}, isDate = function(obj) {
			return /Date/.test(Object.prototype.toString.call(obj)) && !isNaN(obj.getTime());
		}, isWeekend = function(date) {
			var day = date.getDay();
			return day === 0 || day === 6;
		}, isLeapYear = function(year) {
			return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
		}, getDaysInMonth = function(year, month) {
			return [
				31,
				isLeapYear(year) ? 29 : 28,
				31,
				30,
				31,
				30,
				31,
				31,
				30,
				31,
				30,
				31
			][month];
		}, setToStartOfDay = function(date) {
			if (isDate(date)) date.setHours(0, 0, 0, 0);
		}, compareDates = function(a, b) {
			return a.getTime() === b.getTime();
		}, extend = function(to, from, overwrite) {
			var prop, hasProp;
			for (prop in from) {
				hasProp = to[prop] !== void 0;
				if (hasProp && typeof from[prop] === "object" && from[prop] !== null && from[prop].nodeName === void 0) if (isDate(from[prop])) {
					if (overwrite) to[prop] = new Date(from[prop].getTime());
				} else if (isArray(from[prop])) {
					if (overwrite) to[prop] = from[prop].slice(0);
				} else to[prop] = extend({}, from[prop], overwrite);
				else if (overwrite || !hasProp) to[prop] = from[prop];
			}
			return to;
		}, fireEvent = function(el, eventName, data) {
			var ev;
			if (document.createEvent) {
				ev = document.createEvent("HTMLEvents");
				ev.initEvent(eventName, true, false);
				ev = extend(ev, data);
				el.dispatchEvent(ev);
			} else if (document.createEventObject) {
				ev = document.createEventObject();
				ev = extend(ev, data);
				el.fireEvent("on" + eventName, ev);
			}
		}, adjustCalendar = function(calendar) {
			if (calendar.month < 0) {
				calendar.year -= Math.ceil(Math.abs(calendar.month) / 12);
				calendar.month += 12;
			}
			if (calendar.month > 11) {
				calendar.year += Math.floor(Math.abs(calendar.month) / 12);
				calendar.month -= 12;
			}
			return calendar;
		}, defaults = {
			field: null,
			bound: void 0,
			ariaLabel: "Use the arrow keys to pick a date",
			position: "bottom left",
			reposition: true,
			format: "YYYY-MM-DD",
			toString: null,
			parse: null,
			defaultDate: null,
			setDefaultDate: false,
			firstDay: 0,
			firstWeekOfYearMinDays: 4,
			formatStrict: false,
			minDate: null,
			maxDate: null,
			yearRange: 10,
			showWeekNumber: false,
			pickWholeWeek: false,
			minYear: 0,
			maxYear: 9999,
			minMonth: void 0,
			maxMonth: void 0,
			startRange: null,
			endRange: null,
			isRTL: false,
			yearSuffix: "",
			showMonthAfterYear: false,
			showDaysInNextAndPreviousMonths: false,
			enableSelectionDaysInNextAndPreviousMonths: false,
			numberOfMonths: 1,
			mainCalendar: "left",
			container: void 0,
			blurFieldOnSelect: true,
			i18n: {
				previousMonth: "Previous Month",
				nextMonth: "Next Month",
				months: [
					"January",
					"February",
					"March",
					"April",
					"May",
					"June",
					"July",
					"August",
					"September",
					"October",
					"November",
					"December"
				],
				weekdays: [
					"Sunday",
					"Monday",
					"Tuesday",
					"Wednesday",
					"Thursday",
					"Friday",
					"Saturday"
				],
				weekdaysShort: [
					"Sun",
					"Mon",
					"Tue",
					"Wed",
					"Thu",
					"Fri",
					"Sat"
				]
			},
			theme: null,
			events: [],
			onSelect: null,
			onOpen: null,
			onClose: null,
			onDraw: null,
			keyboardInput: true
		}, renderDayName = function(opts, day, abbr) {
			day += opts.firstDay;
			while (day >= 7) day -= 7;
			return abbr ? opts.i18n.weekdaysShort[day] : opts.i18n.weekdays[day];
		}, renderDay = function(opts) {
			var arr = [];
			var ariaSelected = "false";
			if (opts.isEmpty) if (opts.showDaysInNextAndPreviousMonths) {
				arr.push("is-outside-current-month");
				if (!opts.enableSelectionDaysInNextAndPreviousMonths) arr.push("is-selection-disabled");
			} else return "<td class=\"is-empty\"></td>";
			if (opts.isDisabled) arr.push("is-disabled");
			if (opts.isToday) arr.push("is-today");
			if (opts.isSelected) {
				arr.push("is-selected");
				ariaSelected = "true";
			}
			if (opts.hasEvent) arr.push("has-event");
			if (opts.isInRange) arr.push("is-inrange");
			if (opts.isStartRange) arr.push("is-startrange");
			if (opts.isEndRange) arr.push("is-endrange");
			return "<td data-day=\"" + opts.day + "\" class=\"" + arr.join(" ") + "\" aria-selected=\"" + ariaSelected + "\"><button class=\"pika-button pika-day\" type=\"button\" data-pika-year=\"" + opts.year + "\" data-pika-month=\"" + opts.month + "\" data-pika-day=\"" + opts.day + "\">" + opts.day + "</button></td>";
		}, isoWeek = function(date, firstWeekOfYearMinDays) {
			date.setHours(0, 0, 0, 0);
			var yearDay = date.getDate(), weekDay = date.getDay(), dayInFirstWeek = firstWeekOfYearMinDays, dayShift = dayInFirstWeek - 1, daysPerWeek = 7, prevWeekDay = function(day) {
				return (day + daysPerWeek - 1) % daysPerWeek;
			};
			date.setDate(yearDay + dayShift - prevWeekDay(weekDay));
			var jan4th = new Date(date.getFullYear(), 0, dayInFirstWeek), daysBetween = (date.getTime() - jan4th.getTime()) / (1440 * 60 * 1e3);
			return 1 + Math.round((daysBetween - dayShift + prevWeekDay(jan4th.getDay())) / daysPerWeek);
		}, renderWeek = function(d, m, y, firstWeekOfYearMinDays) {
			var date = new Date(y, m, d);
			return "<td class=\"pika-week\">" + (hasMoment ? moment(date).isoWeek() : isoWeek(date, firstWeekOfYearMinDays)) + "</td>";
		}, renderRow = function(days, isRTL, pickWholeWeek, isRowSelected) {
			return "<tr class=\"pika-row" + (pickWholeWeek ? " pick-whole-week" : "") + (isRowSelected ? " is-selected" : "") + "\">" + (isRTL ? days.reverse() : days).join("") + "</tr>";
		}, renderBody = function(rows) {
			return "<tbody>" + rows.join("") + "</tbody>";
		}, renderHead = function(opts) {
			var i, arr = [];
			if (opts.showWeekNumber) arr.push("<th></th>");
			for (i = 0; i < 7; i++) arr.push("<th scope=\"col\"><abbr title=\"" + renderDayName(opts, i) + "\">" + renderDayName(opts, i, true) + "</abbr></th>");
			return "<thead><tr>" + (opts.isRTL ? arr.reverse() : arr).join("") + "</tr></thead>";
		}, renderTitle = function(instance, c, year, month, refYear, randId) {
			var i, j, arr, opts = instance._o, isMinYear = year === opts.minYear, isMaxYear = year === opts.maxYear, html = "<div id=\"" + randId + "\" class=\"pika-title\" role=\"heading\" aria-live=\"assertive\">", monthHtml, yearHtml, prev = true, next = true;
			for (arr = [], i = 0; i < 12; i++) arr.push("<option value=\"" + (year === refYear ? i - c : 12 + i - c) + "\"" + (i === month ? " selected=\"selected\"" : "") + (isMinYear && i < opts.minMonth || isMaxYear && i > opts.maxMonth ? " disabled=\"disabled\"" : "") + ">" + opts.i18n.months[i] + "</option>");
			monthHtml = "<div class=\"pika-label\">" + opts.i18n.months[month] + "<select class=\"pika-select pika-select-month\" tabindex=\"-1\">" + arr.join("") + "</select></div>";
			if (isArray(opts.yearRange)) {
				i = opts.yearRange[0];
				j = opts.yearRange[1] + 1;
			} else {
				i = year - opts.yearRange;
				j = 1 + year + opts.yearRange;
			}
			for (arr = []; i < j && i <= opts.maxYear; i++) if (i >= opts.minYear) arr.push("<option value=\"" + i + "\"" + (i === year ? " selected=\"selected\"" : "") + ">" + i + "</option>");
			yearHtml = "<div class=\"pika-label\">" + year + opts.yearSuffix + "<select class=\"pika-select pika-select-year\" tabindex=\"-1\">" + arr.join("") + "</select></div>";
			if (opts.showMonthAfterYear) html += yearHtml + monthHtml;
			else html += monthHtml + yearHtml;
			if (isMinYear && (month === 0 || opts.minMonth >= month)) prev = false;
			if (isMaxYear && (month === 11 || opts.maxMonth <= month)) next = false;
			if (c === 0) html += "<button class=\"pika-prev" + (prev ? "" : " is-disabled") + "\" type=\"button\">" + opts.i18n.previousMonth + "</button>";
			if (c === instance._o.numberOfMonths - 1) html += "<button class=\"pika-next" + (next ? "" : " is-disabled") + "\" type=\"button\">" + opts.i18n.nextMonth + "</button>";
			return html += "</div>";
		}, renderTable = function(opts, data, randId) {
			return "<table cellpadding=\"0\" cellspacing=\"0\" class=\"pika-table\" role=\"grid\" aria-labelledby=\"" + randId + "\">" + renderHead(opts) + renderBody(data) + "</table>";
		}, Pikaday = function(options) {
			var self = this, opts = self.config(options);
			self._onMouseDown = function(e) {
				if (!self._v) return;
				e = e || window.event;
				var target = e.target || e.srcElement;
				if (!target) return;
				if (!hasClass(target, "is-disabled")) {
					if (hasClass(target, "pika-button") && !hasClass(target, "is-empty") && !hasClass(target.parentNode, "is-disabled")) {
						self.setDate(new Date(target.getAttribute("data-pika-year"), target.getAttribute("data-pika-month"), target.getAttribute("data-pika-day")));
						if (opts.bound) sto(function() {
							self.hide();
							if (opts.blurFieldOnSelect && opts.field) opts.field.blur();
						}, 100);
					} else if (hasClass(target, "pika-prev")) self.prevMonth();
					else if (hasClass(target, "pika-next")) self.nextMonth();
				}
				if (!hasClass(target, "pika-select")) if (e.preventDefault) e.preventDefault();
				else {
					e.returnValue = false;
					return false;
				}
				else self._c = true;
			};
			self._onChange = function(e) {
				e = e || window.event;
				var target = e.target || e.srcElement;
				if (!target) return;
				if (hasClass(target, "pika-select-month")) self.gotoMonth(target.value);
				else if (hasClass(target, "pika-select-year")) self.gotoYear(target.value);
			};
			self._onKeyChange = function(e) {
				e = e || window.event;
				if (self.isVisible()) switch (e.keyCode) {
					case 13:
					case 27:
						if (opts.field) opts.field.blur();
						break;
					case 37:
						self.adjustDate("subtract", 1);
						break;
					case 38:
						self.adjustDate("subtract", 7);
						break;
					case 39:
						self.adjustDate("add", 1);
						break;
					case 40:
						self.adjustDate("add", 7);
						break;
					case 8:
					case 46:
						self.setDate(null);
						break;
				}
			};
			self._parseFieldValue = function() {
				if (opts.parse) return opts.parse(opts.field.value, opts.format);
				else if (hasMoment) {
					var date = moment(opts.field.value, opts.format, opts.formatStrict);
					return date && date.isValid() ? date.toDate() : null;
				} else return new Date(Date.parse(opts.field.value));
			};
			self._onInputChange = function(e) {
				var date;
				if (e.firedBy === self) return;
				date = self._parseFieldValue();
				if (isDate(date)) self.setDate(date);
				if (!self._v) self.show();
			};
			self._onInputFocus = function() {
				self.show();
			};
			self._onInputClick = function() {
				self.show();
			};
			self._onInputBlur = function() {
				var pEl = document.activeElement;
				do
					if (hasClass(pEl, "pika-single")) return;
				while (pEl = pEl.parentNode);
				if (!self._c) self._b = sto(function() {
					self.hide();
				}, 50);
				self._c = false;
			};
			self._onClick = function(e) {
				e = e || window.event;
				var target = e.target || e.srcElement, pEl = target;
				if (!target) return;
				if (!hasEventListeners && hasClass(target, "pika-select")) {
					if (!target.onchange) {
						target.setAttribute("onchange", "return;");
						addEvent(target, "change", self._onChange);
					}
				}
				do
					if (hasClass(pEl, "pika-single") || pEl === opts.trigger) return;
				while (pEl = pEl.parentNode);
				if (self._v && target !== opts.trigger && pEl !== opts.trigger) self.hide();
			};
			self.el = document.createElement("div");
			self.el.className = "pika-single" + (opts.isRTL ? " is-rtl" : "") + (opts.theme ? " " + opts.theme : "");
			addEvent(self.el, "mousedown", self._onMouseDown, true);
			addEvent(self.el, "touchend", self._onMouseDown, true);
			addEvent(self.el, "change", self._onChange);
			if (opts.keyboardInput) addEvent(document, "keydown", self._onKeyChange);
			if (opts.field) {
				if (opts.container) opts.container.appendChild(self.el);
				else if (opts.bound) document.body.appendChild(self.el);
				else opts.field.parentNode.insertBefore(self.el, opts.field.nextSibling);
				addEvent(opts.field, "change", self._onInputChange);
				if (!opts.defaultDate) {
					opts.defaultDate = self._parseFieldValue();
					opts.setDefaultDate = true;
				}
			}
			var defDate = opts.defaultDate;
			if (isDate(defDate)) if (opts.setDefaultDate) self.setDate(defDate, true);
			else self.gotoDate(defDate);
			else self.gotoDate(/* @__PURE__ */ new Date());
			if (opts.bound) {
				this.hide();
				self.el.className += " is-bound";
				addEvent(opts.trigger, "click", self._onInputClick);
				addEvent(opts.trigger, "focus", self._onInputFocus);
				addEvent(opts.trigger, "blur", self._onInputBlur);
			} else this.show();
		};
		/**
		* public Pikaday API
		*/
		Pikaday.prototype = {
			config: function(options) {
				if (!this._o) this._o = extend({}, defaults, true);
				var opts = extend(this._o, options, true);
				opts.isRTL = !!opts.isRTL;
				opts.field = opts.field && opts.field.nodeName ? opts.field : null;
				opts.theme = typeof opts.theme === "string" && opts.theme ? opts.theme : null;
				opts.bound = !!(opts.bound !== void 0 ? opts.field && opts.bound : opts.field);
				opts.trigger = opts.trigger && opts.trigger.nodeName ? opts.trigger : opts.field;
				opts.disableWeekends = !!opts.disableWeekends;
				opts.disableDayFn = typeof opts.disableDayFn === "function" ? opts.disableDayFn : null;
				var nom = parseInt(opts.numberOfMonths, 10) || 1;
				opts.numberOfMonths = nom > 4 ? 4 : nom;
				if (!isDate(opts.minDate)) opts.minDate = false;
				if (!isDate(opts.maxDate)) opts.maxDate = false;
				if (opts.minDate && opts.maxDate && opts.maxDate < opts.minDate) opts.maxDate = opts.minDate = false;
				if (opts.minDate) this.setMinDate(opts.minDate);
				if (opts.maxDate) this.setMaxDate(opts.maxDate);
				if (isArray(opts.yearRange)) {
					var fallback = (/* @__PURE__ */ new Date()).getFullYear() - 10;
					opts.yearRange[0] = parseInt(opts.yearRange[0], 10) || fallback;
					opts.yearRange[1] = parseInt(opts.yearRange[1], 10) || fallback;
				} else {
					opts.yearRange = Math.abs(parseInt(opts.yearRange, 10)) || defaults.yearRange;
					if (opts.yearRange > 100) opts.yearRange = 100;
				}
				return opts;
			},
			toString: function(format) {
				format = format || this._o.format;
				if (!isDate(this._d)) return "";
				if (this._o.toString) return this._o.toString(this._d, format);
				if (hasMoment) return moment(this._d).format(format);
				return this._d.toDateString();
			},
			getMoment: function() {
				return hasMoment ? moment(this._d) : null;
			},
			setMoment: function(date, preventOnSelect) {
				if (hasMoment && moment.isMoment(date)) this.setDate(date.toDate(), preventOnSelect);
			},
			getDate: function() {
				return isDate(this._d) ? new Date(this._d.getTime()) : null;
			},
			setDate: function(date, preventOnSelect) {
				if (!date) {
					this._d = null;
					if (this._o.field) {
						this._o.field.value = "";
						fireEvent(this._o.field, "change", { firedBy: this });
					}
					return this.draw();
				}
				if (typeof date === "string") date = new Date(Date.parse(date));
				if (!isDate(date)) return;
				var min = this._o.minDate, max = this._o.maxDate;
				if (isDate(min) && date < min) date = min;
				else if (isDate(max) && date > max) date = max;
				this._d = new Date(date.getTime());
				setToStartOfDay(this._d);
				this.gotoDate(this._d);
				if (this._o.field) {
					this._o.field.value = this.toString();
					fireEvent(this._o.field, "change", { firedBy: this });
				}
				if (!preventOnSelect && typeof this._o.onSelect === "function") this._o.onSelect.call(this, this.getDate());
			},
			clear: function() {
				this.setDate(null);
			},
			gotoDate: function(date) {
				var newCalendar = true;
				if (!isDate(date)) return;
				if (this.calendars) {
					var firstVisibleDate = new Date(this.calendars[0].year, this.calendars[0].month, 1), lastVisibleDate = new Date(this.calendars[this.calendars.length - 1].year, this.calendars[this.calendars.length - 1].month, 1), visibleDate = date.getTime();
					lastVisibleDate.setMonth(lastVisibleDate.getMonth() + 1);
					lastVisibleDate.setDate(lastVisibleDate.getDate() - 1);
					newCalendar = visibleDate < firstVisibleDate.getTime() || lastVisibleDate.getTime() < visibleDate;
				}
				if (newCalendar) {
					this.calendars = [{
						month: date.getMonth(),
						year: date.getFullYear()
					}];
					if (this._o.mainCalendar === "right") this.calendars[0].month += 1 - this._o.numberOfMonths;
				}
				this.adjustCalendars();
			},
			adjustDate: function(sign, days) {
				var day = this.getDate() || /* @__PURE__ */ new Date();
				var difference = parseInt(days) * 24 * 60 * 60 * 1e3;
				var newDay;
				if (sign === "add") newDay = new Date(day.valueOf() + difference);
				else if (sign === "subtract") newDay = new Date(day.valueOf() - difference);
				this.setDate(newDay);
			},
			adjustCalendars: function() {
				this.calendars[0] = adjustCalendar(this.calendars[0]);
				for (var c = 1; c < this._o.numberOfMonths; c++) this.calendars[c] = adjustCalendar({
					month: this.calendars[0].month + c,
					year: this.calendars[0].year
				});
				this.draw();
			},
			gotoToday: function() {
				this.gotoDate(/* @__PURE__ */ new Date());
			},
			gotoMonth: function(month) {
				if (!isNaN(month)) {
					this.calendars[0].month = parseInt(month, 10);
					this.adjustCalendars();
				}
			},
			nextMonth: function() {
				this.calendars[0].month++;
				this.adjustCalendars();
			},
			prevMonth: function() {
				this.calendars[0].month--;
				this.adjustCalendars();
			},
			gotoYear: function(year) {
				if (!isNaN(year)) {
					this.calendars[0].year = parseInt(year, 10);
					this.adjustCalendars();
				}
			},
			setMinDate: function(value) {
				if (value instanceof Date) {
					setToStartOfDay(value);
					this._o.minDate = value;
					this._o.minYear = value.getFullYear();
					this._o.minMonth = value.getMonth();
				} else {
					this._o.minDate = defaults.minDate;
					this._o.minYear = defaults.minYear;
					this._o.minMonth = defaults.minMonth;
					this._o.startRange = defaults.startRange;
				}
				this.draw();
			},
			setMaxDate: function(value) {
				if (value instanceof Date) {
					setToStartOfDay(value);
					this._o.maxDate = value;
					this._o.maxYear = value.getFullYear();
					this._o.maxMonth = value.getMonth();
				} else {
					this._o.maxDate = defaults.maxDate;
					this._o.maxYear = defaults.maxYear;
					this._o.maxMonth = defaults.maxMonth;
					this._o.endRange = defaults.endRange;
				}
				this.draw();
			},
			setStartRange: function(value) {
				this._o.startRange = value;
			},
			setEndRange: function(value) {
				this._o.endRange = value;
			},
			draw: function(force) {
				if (!this._v && !force) return;
				var opts = this._o, minYear = opts.minYear, maxYear = opts.maxYear, minMonth = opts.minMonth, maxMonth = opts.maxMonth, html = "", randId;
				if (this._y <= minYear) {
					this._y = minYear;
					if (!isNaN(minMonth) && this._m < minMonth) this._m = minMonth;
				}
				if (this._y >= maxYear) {
					this._y = maxYear;
					if (!isNaN(maxMonth) && this._m > maxMonth) this._m = maxMonth;
				}
				for (var c = 0; c < opts.numberOfMonths; c++) {
					randId = "pika-title-" + Math.random().toString(36).replace(/[^a-z]+/g, "").substr(0, 2);
					html += "<div class=\"pika-lendar\">" + renderTitle(this, c, this.calendars[c].year, this.calendars[c].month, this.calendars[0].year, randId) + this.render(this.calendars[c].year, this.calendars[c].month, randId) + "</div>";
				}
				this.el.innerHTML = html;
				if (opts.bound) {
					if (opts.field.type !== "hidden") sto(function() {
						opts.trigger.focus();
					}, 1);
				}
				if (typeof this._o.onDraw === "function") this._o.onDraw(this);
				if (opts.bound) opts.field.setAttribute("aria-label", opts.ariaLabel);
			},
			adjustPosition: function() {
				var field, pEl, width, height, viewportWidth, viewportHeight, scrollTop, left, top, clientRect, leftAligned, bottomAligned;
				if (this._o.container) return;
				this.el.style.position = "absolute";
				field = this._o.trigger;
				pEl = field;
				width = this.el.offsetWidth;
				height = this.el.offsetHeight;
				viewportWidth = window.innerWidth || document.documentElement.clientWidth;
				viewportHeight = window.innerHeight || document.documentElement.clientHeight;
				scrollTop = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;
				leftAligned = true;
				bottomAligned = true;
				if (typeof field.getBoundingClientRect === "function") {
					clientRect = field.getBoundingClientRect();
					left = clientRect.left + window.pageXOffset;
					top = clientRect.bottom + window.pageYOffset;
				} else {
					left = pEl.offsetLeft;
					top = pEl.offsetTop + pEl.offsetHeight;
					while (pEl = pEl.offsetParent) {
						left += pEl.offsetLeft;
						top += pEl.offsetTop;
					}
				}
				if (this._o.reposition && left + width > viewportWidth || this._o.position.indexOf("right") > -1 && left - width + field.offsetWidth > 0) {
					left = left - width + field.offsetWidth;
					leftAligned = false;
				}
				if (this._o.reposition && top + height > viewportHeight + scrollTop || this._o.position.indexOf("top") > -1 && top - height - field.offsetHeight > 0) {
					top = top - height - field.offsetHeight;
					bottomAligned = false;
				}
				this.el.style.left = left + "px";
				this.el.style.top = top + "px";
				addClass(this.el, leftAligned ? "left-aligned" : "right-aligned");
				addClass(this.el, bottomAligned ? "bottom-aligned" : "top-aligned");
				removeClass(this.el, !leftAligned ? "left-aligned" : "right-aligned");
				removeClass(this.el, !bottomAligned ? "bottom-aligned" : "top-aligned");
			},
			render: function(year, month, randId) {
				var opts = this._o, now = /* @__PURE__ */ new Date(), days = getDaysInMonth(year, month), before = new Date(year, month, 1).getDay(), data = [], row = [];
				setToStartOfDay(now);
				if (opts.firstDay > 0) {
					before -= opts.firstDay;
					if (before < 0) before += 7;
				}
				var previousMonth = month === 0 ? 11 : month - 1, nextMonth = month === 11 ? 0 : month + 1, yearOfPreviousMonth = month === 0 ? year - 1 : year, yearOfNextMonth = month === 11 ? year + 1 : year, daysInPreviousMonth = getDaysInMonth(yearOfPreviousMonth, previousMonth);
				var cells = days + before, after = cells;
				while (after > 7) after -= 7;
				cells += 7 - after;
				var isWeekSelected = false;
				for (var i = 0, r = 0; i < cells; i++) {
					var day = new Date(year, month, 1 + (i - before)), isSelected = isDate(this._d) ? compareDates(day, this._d) : false, isToday = compareDates(day, now), hasEvent = opts.events.indexOf(day.toDateString()) !== -1 ? true : false, isEmpty = i < before || i >= days + before, dayNumber = 1 + (i - before), monthNumber = month, yearNumber = year, isStartRange = opts.startRange && compareDates(opts.startRange, day), isEndRange = opts.endRange && compareDates(opts.endRange, day), isInRange = opts.startRange && opts.endRange && opts.startRange < day && day < opts.endRange, isDisabled = opts.minDate && day < opts.minDate || opts.maxDate && day > opts.maxDate || opts.disableWeekends && isWeekend(day) || opts.disableDayFn && opts.disableDayFn(day);
					if (isEmpty) if (i < before) {
						dayNumber = daysInPreviousMonth + dayNumber;
						monthNumber = previousMonth;
						yearNumber = yearOfPreviousMonth;
					} else {
						dayNumber = dayNumber - days;
						monthNumber = nextMonth;
						yearNumber = yearOfNextMonth;
					}
					var dayConfig = {
						day: dayNumber,
						month: monthNumber,
						year: yearNumber,
						hasEvent,
						isSelected,
						isToday,
						isDisabled,
						isEmpty,
						isStartRange,
						isEndRange,
						isInRange,
						showDaysInNextAndPreviousMonths: opts.showDaysInNextAndPreviousMonths,
						enableSelectionDaysInNextAndPreviousMonths: opts.enableSelectionDaysInNextAndPreviousMonths
					};
					if (opts.pickWholeWeek && isSelected) isWeekSelected = true;
					row.push(renderDay(dayConfig));
					if (++r === 7) {
						if (opts.showWeekNumber) row.unshift(renderWeek(i - before, month, year, opts.firstWeekOfYearMinDays));
						data.push(renderRow(row, opts.isRTL, opts.pickWholeWeek, isWeekSelected));
						row = [];
						r = 0;
						isWeekSelected = false;
					}
				}
				return renderTable(opts, data, randId);
			},
			isVisible: function() {
				return this._v;
			},
			show: function() {
				if (!this.isVisible()) {
					this._v = true;
					this.draw();
					removeClass(this.el, "is-hidden");
					if (this._o.bound) {
						addEvent(document, "click", this._onClick);
						this.adjustPosition();
					}
					if (typeof this._o.onOpen === "function") this._o.onOpen.call(this);
				}
			},
			hide: function() {
				var v = this._v;
				if (v !== false) {
					if (this._o.bound) removeEvent(document, "click", this._onClick);
					if (!this._o.container) {
						this.el.style.position = "static";
						this.el.style.left = "auto";
						this.el.style.top = "auto";
					}
					addClass(this.el, "is-hidden");
					this._v = false;
					if (v !== void 0 && typeof this._o.onClose === "function") this._o.onClose.call(this);
				}
			},
			destroy: function() {
				var opts = this._o;
				this.hide();
				removeEvent(this.el, "mousedown", this._onMouseDown, true);
				removeEvent(this.el, "touchend", this._onMouseDown, true);
				removeEvent(this.el, "change", this._onChange);
				if (opts.keyboardInput) removeEvent(document, "keydown", this._onKeyChange);
				if (opts.field) {
					removeEvent(opts.field, "change", this._onInputChange);
					if (opts.bound) {
						removeEvent(opts.trigger, "click", this._onInputClick);
						removeEvent(opts.trigger, "focus", this._onInputFocus);
						removeEvent(opts.trigger, "blur", this._onInputBlur);
					}
				}
				if (this.el.parentNode) this.el.parentNode.removeChild(this.el);
			}
		};
		return Pikaday;
	});
})))());
//#endregion
//#region src/hooks/useMergedRefs.ts
function useMergedRefs(...refs) {
	return (0, import_react.useCallback)((value) => {
		[...refs].forEach((ref) => {
			if (typeof ref === "function") ref(value);
			else if (ref != null) ref.current = value;
		});
	}, [refs]);
}
//#endregion
//#region src/components/select/DateSelect.tsx
var pickerStyles = {
	"& .pika-single.actual-date-picker": {
		color: theme.calendarText,
		background: theme.calendarBackground,
		border: "none",
		boxShadow: "0 0px 4px rgba(0, 0, 0, .25)",
		borderRadius: 4
	},
	"& .actual-date-picker": {
		"& .pika-lendar": {
			float: "none",
			width: "auto"
		},
		"& .pika-label": { backgroundColor: theme.calendarBackground },
		"& .pika-prev": { backgroundImage: `url(/static/img/DateSelect.left.DwzhSAZH.png)` },
		"& .pika-next": { backgroundImage: `url(/static/img/DateSelect.right.CXg-2iZj.png)` },
		"& .pika-table th": {
			color: theme.calendarItemText,
			"& abbr": { textDecoration: "none" }
		},
		"& .pika-button": {
			backgroundColor: theme.calendarItemBackground,
			color: theme.calendarItemText
		},
		"& .is-today .pika-button": { textDecoration: "underline" },
		"& .is-selected .pika-button": {
			backgroundColor: theme.calendarSelectedBackground,
			boxShadow: "none"
		}
	}
};
function createPikadayLocale(dateFnsLocale) {
	return {
		previousMonth: "Previous",
		nextMonth: "Next",
		months: Array.from({ length: 12 }, (_, i) => format$4(new Date(2023, i, 1), "MMMM", { locale: dateFnsLocale })),
		weekdays: Array.from({ length: 7 }, (_, i) => format$4(new Date(2023, 0, i + 1), "EEEE", { locale: dateFnsLocale })),
		weekdaysShort: Array.from({ length: 7 }, (_, i) => format$4(new Date(2023, 0, i + 1), "EEE", { locale: dateFnsLocale }).slice(0, 3))
	};
}
var DatePicker = (0, import_react.forwardRef)((t0, ref) => {
	const $ = (0, import_compiler_runtime.c)(17);
	const { value, firstDayOfWeekIdx, dateFormat, onUpdate, onSelect } = t0;
	const locale = useLocale();
	const picker = (0, import_react.useRef)(null);
	const mountPoint = (0, import_react.useRef)(null);
	const onUpdateEffect = (0, import_react.useEffectEvent)(onUpdate);
	let t1;
	if ($[0] !== onUpdateEffect) {
		t1 = () => ({ handleInputKeyDown(e) {
			const currentDate$0 = picker.current?.getDate();
			if (!currentDate$0) return;
			let newDate = null;
			bb14: switch (e.key) {
				case "ArrowLeft":
					e.preventDefault();
					newDate = subDays$1(currentDate$0, 1);
					break bb14;
				case "ArrowUp":
					e.preventDefault();
					newDate = subDays$1(currentDate$0, 7);
					break bb14;
				case "ArrowRight":
					e.preventDefault();
					newDate = addDays$1(currentDate$0, 1);
					break bb14;
				case "ArrowDown":
					e.preventDefault();
					newDate = addDays$1(currentDate$0, 7);
					break bb14;
				default:
			}
			if (newDate) {
				picker.current?.setDate(newDate, true);
				onUpdateEffect?.(newDate);
			}
		} });
		$[0] = onUpdateEffect;
		$[1] = t1;
	} else t1 = $[1];
	let t2;
	if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = [];
		$[2] = t2;
	} else t2 = $[2];
	(0, import_react.useImperativeHandle)(ref, t1, t2);
	let t3;
	if ($[3] !== dateFormat || $[4] !== firstDayOfWeekIdx || $[5] !== locale || $[6] !== onSelect || $[7] !== value) {
		t3 = () => {
			const pikadayLocale = createPikadayLocale(locale);
			return new import_pikaday.default({
				theme: "actual-date-picker",
				keyboardInput: false,
				firstDay: parseInt(firstDayOfWeekIdx),
				defaultDate: value ? parse$5(value, dateFormat, currentDate()) : currentDate(),
				setDefaultDate: true,
				toString(date) {
					return format$4(date, dateFormat);
				},
				parse(dateString) {
					return parse$5(dateString, dateFormat, /* @__PURE__ */ new Date());
				},
				onSelect,
				i18n: pikadayLocale
			});
		};
		$[3] = dateFormat;
		$[4] = firstDayOfWeekIdx;
		$[5] = locale;
		$[6] = onSelect;
		$[7] = value;
		$[8] = t3;
	} else t3 = $[8];
	const initPikaday = (0, import_react.useEffectEvent)(t3);
	let t4;
	if ($[9] !== initPikaday) {
		t4 = () => {
			picker.current = initPikaday();
			mountPoint.current?.appendChild(picker.current.el);
			return () => {
				picker.current?.destroy();
			};
		};
		$[9] = initPikaday;
		$[10] = t4;
	} else t4 = $[10];
	let t5;
	if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
		t5 = [];
		$[11] = t5;
	} else t5 = $[11];
	(0, import_react.useLayoutEffect)(t4, t5);
	let t6;
	let t7;
	if ($[12] !== dateFormat || $[13] !== value) {
		t6 = () => {
			if (value) picker.current?.setDate(parse$5(value, dateFormat, /* @__PURE__ */ new Date()), true);
		};
		t7 = [value, dateFormat];
		$[12] = dateFormat;
		$[13] = value;
		$[14] = t6;
		$[15] = t7;
	} else {
		t6 = $[14];
		t7 = $[15];
	}
	(0, import_react.useEffect)(t6, t7);
	let t8;
	if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			className: css([pickerStyles, { flex: 1 }]),
			innerRef: mountPoint
		});
		$[16] = t8;
	} else t8 = $[16];
	return t8;
});
DatePicker.displayName = "DatePicker";
function defaultShouldSaveFromKey(e) {
	return e.key === "Enter";
}
function DateSelectDesktop(t0) {
	const $ = (0, import_compiler_runtime.c)(78);
	const { id, containerProps, inputProps, value: defaultValue, isOpen, embedded, dateFormat: t1, openOnFocus: t2, ref, shouldSaveFromKey: t3, clearOnBlur: t4, onUpdate, onSelect } = t0;
	const dateFormat = t1 === void 0 ? "yyyy-MM-dd" : t1;
	const openOnFocus = t2 === void 0 ? true : t2;
	const shouldSaveFromKey = t3 === void 0 ? defaultShouldSaveFromKey : t3;
	const clearOnBlur = t4 === void 0 ? true : t4;
	let t5;
	if ($[0] !== dateFormat || $[1] !== defaultValue) {
		bb0: {
			if (defaultValue) {
				const date = parseISO(defaultValue);
				if (isValid$3(date)) {
					t5 = format$4(date, dateFormat);
					break bb0;
				}
			}
			t5 = "";
		}
		$[0] = dateFormat;
		$[1] = defaultValue;
		$[2] = t5;
	} else t5 = $[2];
	const parsedDefaultValue = t5;
	const picker = (0, import_react.useRef)(null);
	const [value, setValue] = (0, import_react.useState)(parsedDefaultValue);
	const [open, setOpen] = (0, import_react.useState)(embedded || isOpen || false);
	const innerRef = (0, import_react.useRef)(null);
	const mergedRef = useMergedRefs(innerRef, ref);
	const [selectedValue, setSelectedValue] = (0, import_react.useState)(value);
	const [_firstDayOfWeekIdx] = useSyncedPref("firstDayOfWeekIdx");
	const firstDayOfWeekIdx = _firstDayOfWeekIdx || "0";
	let t6;
	let t7;
	if ($[3] !== parsedDefaultValue) {
		t6 = () => setValue(parsedDefaultValue);
		t7 = [parsedDefaultValue];
		$[3] = parsedDefaultValue;
		$[4] = t6;
		$[5] = t7;
	} else {
		t6 = $[4];
		t7 = $[5];
	}
	(0, import_react.useEffect)(t6, t7);
	let t8;
	if ($[6] !== dateFormat || $[7] !== onUpdate) {
		t8 = (newValue) => {
			if (getDayMonthRegex(dateFormat).test(newValue)) {
				const test = parse$5(newValue, getDayMonthFormat(dateFormat), /* @__PURE__ */ new Date());
				if (isValid$3(test)) {
					onUpdate?.(format$4(test, "yyyy-MM-dd"));
					setSelectedValue(format$4(test, dateFormat));
				}
			} else if (getShortYearRegex(dateFormat).test(newValue)) {
				const test_0 = parse$5(newValue, getShortYearFormat(dateFormat), /* @__PURE__ */ new Date());
				if (isValid$3(test_0)) {
					onUpdate?.(format$4(test_0, "yyyy-MM-dd"));
					setSelectedValue(format$4(test_0, dateFormat));
				}
			} else {
				const test_1 = parse$5(newValue, dateFormat, /* @__PURE__ */ new Date());
				if (isValid$3(test_1)) {
					const date_0 = format$4(test_1, "yyyy-MM-dd");
					onUpdate?.(date_0);
					setSelectedValue(newValue);
				}
			}
		};
		$[6] = dateFormat;
		$[7] = onUpdate;
		$[8] = t8;
	} else t8 = $[8];
	const onUpdateEffect = (0, import_react.useEffectEvent)(t8);
	let t9;
	if ($[9] !== onUpdateEffect || $[10] !== value) {
		t9 = () => {
			onUpdateEffect(value);
		};
		$[9] = onUpdateEffect;
		$[10] = value;
		$[11] = t9;
	} else t9 = $[11];
	let t10;
	if ($[12] !== value) {
		t10 = [value];
		$[12] = value;
		$[13] = t10;
	} else t10 = $[13];
	(0, import_react.useEffect)(t9, t10);
	let t11;
	if ($[14] !== dateFormat || $[15] !== defaultValue || $[16] !== embedded || $[17] !== inputProps || $[18] !== onSelect || $[19] !== onUpdate || $[20] !== open || $[21] !== parsedDefaultValue || $[22] !== selectedValue || $[23] !== shouldSaveFromKey || $[24] !== value) {
		t11 = function onKeyDown(e) {
			if ([
				"ArrowLeft",
				"ArrowRight",
				"ArrowUp",
				"ArrowDown"
			].includes(e.key) && !e.shiftKey && !e.metaKey && !e.altKey && open) picker.current?.handleInputKeyDown(e);
			else if (e.key === "Escape") {
				setValue(parsedDefaultValue);
				setSelectedValue(parsedDefaultValue);
				if (parsedDefaultValue === value) {
					if (open) {
						if (!embedded) e.stopPropagation();
						setOpen(false);
					}
				} else {
					setOpen(true);
					onUpdate?.(defaultValue);
				}
			} else if (shouldSaveFromKey(e)) {
				if (selectedValue) {
					setValue(selectedValue);
					onSelect(format$4(parse$5(selectedValue, dateFormat, /* @__PURE__ */ new Date()), "yyyy-MM-dd"));
				}
				setOpen(false);
				if (open && e.key === "Enter") {
					e.stopPropagation();
					e.preventDefault();
				}
				const { onKeyDown } = inputProps || {};
				onKeyDown?.(e);
			} else if (!open) {
				setOpen(true);
				if (innerRef.current) innerRef.current.setSelectionRange(0, 1e4);
			}
		};
		$[14] = dateFormat;
		$[15] = defaultValue;
		$[16] = embedded;
		$[17] = inputProps;
		$[18] = onSelect;
		$[19] = onUpdate;
		$[20] = open;
		$[21] = parsedDefaultValue;
		$[22] = selectedValue;
		$[23] = shouldSaveFromKey;
		$[24] = value;
		$[25] = t11;
	} else t11 = $[25];
	const onKeyDown_0 = t11;
	let t12;
	if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
		t12 = function onChange(e_0) {
			setValue(e_0.target.value);
		};
		$[26] = t12;
	} else t12 = $[26];
	const onChange = t12;
	let t13;
	if ($[27] !== clearOnBlur || $[28] !== containerProps || $[29] !== dateFormat || $[30] !== embedded || $[31] !== firstDayOfWeekIdx || $[32] !== id || $[33] !== inputProps || $[34] !== mergedRef || $[35] !== onKeyDown_0 || $[36] !== onSelect || $[37] !== onUpdate || $[38] !== open || $[39] !== openOnFocus || $[40] !== selectedValue || $[41] !== value) {
		const maybeWrapTooltip = (content) => {
			if (embedded) return open ? content : null;
			return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Popover, {
				triggerRef: innerRef,
				placement: "bottom start",
				offset: 2,
				isOpen: open,
				isNonModal: true,
				onOpenChange: () => setOpen(false),
				style: {
					...styles.popover,
					minWidth: 225
				},
				"data-testid": "date-select-tooltip",
				children: content
			});
		};
		let t14;
		if ($[43] !== embedded) {
			t14 = () => {
				if (!embedded) setOpen(true);
			};
			$[43] = embedded;
			$[44] = t14;
		} else t14 = $[44];
		let t15;
		if ($[45] !== embedded || $[46] !== inputProps || $[47] !== openOnFocus) {
			t15 = (e_1) => {
				if (!embedded && openOnFocus) setOpen(true);
				inputProps?.onFocus?.(e_1);
			};
			$[45] = embedded;
			$[46] = inputProps;
			$[47] = openOnFocus;
			$[48] = t15;
		} else t15 = $[48];
		let t16;
		if ($[49] !== clearOnBlur || $[50] !== dateFormat || $[51] !== embedded || $[52] !== inputProps || $[53] !== onSelect || $[54] !== selectedValue || $[55] !== value) {
			t16 = (e_2) => {
				if (!embedded) setOpen(false);
				inputProps?.onBlur?.(e_2);
				if (clearOnBlur) if (value === "") {
					if (selectedValue) {
						setValue(selectedValue);
						const date_2 = parse$5(selectedValue, dateFormat, /* @__PURE__ */ new Date());
						if (date_2 instanceof Date && !isNaN(date_2.valueOf())) onSelect(format$4(date_2, "yyyy-MM-dd"));
					}
				} else {
					setValue(selectedValue || "");
					const date_3 = parse$5(selectedValue, dateFormat, /* @__PURE__ */ new Date());
					if (date_3 instanceof Date && !isNaN(date_3.valueOf())) onSelect(format$4(date_3, "yyyy-MM-dd"));
				}
			};
			$[49] = clearOnBlur;
			$[50] = dateFormat;
			$[51] = embedded;
			$[52] = inputProps;
			$[53] = onSelect;
			$[54] = selectedValue;
			$[55] = value;
			$[56] = t16;
		} else t16 = $[56];
		let t17;
		if ($[57] !== id || $[58] !== inputProps || $[59] !== mergedRef || $[60] !== onKeyDown_0 || $[61] !== t14 || $[62] !== t15 || $[63] !== t16 || $[64] !== value) {
			t17 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
				id,
				...inputProps,
				ref: mergedRef,
				value,
				onPointerUp: t14,
				onKeyDown: onKeyDown_0,
				onChange,
				onFocus: t15,
				onBlur: t16
			});
			$[57] = id;
			$[58] = inputProps;
			$[59] = mergedRef;
			$[60] = onKeyDown_0;
			$[61] = t14;
			$[62] = t15;
			$[63] = t16;
			$[64] = value;
			$[65] = t17;
		} else t17 = $[65];
		let t18;
		if ($[66] !== dateFormat || $[67] !== onUpdate) {
			t18 = (date_4) => {
				setSelectedValue(format$4(date_4, dateFormat));
				onUpdate?.(format$4(date_4, "yyyy-MM-dd"));
			};
			$[66] = dateFormat;
			$[67] = onUpdate;
			$[68] = t18;
		} else t18 = $[68];
		let t19;
		if ($[69] !== dateFormat || $[70] !== onSelect) {
			t19 = (date_5) => {
				setValue(format$4(date_5, dateFormat));
				onSelect(format$4(date_5, "yyyy-MM-dd"));
				setOpen(false);
			};
			$[69] = dateFormat;
			$[70] = onSelect;
			$[71] = t19;
		} else t19 = $[71];
		let t20;
		if ($[72] !== dateFormat || $[73] !== firstDayOfWeekIdx || $[74] !== selectedValue || $[75] !== t18 || $[76] !== t19) {
			t20 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DatePicker, {
				ref: picker,
				value: selectedValue,
				firstDayOfWeekIdx,
				dateFormat,
				onUpdate: t18,
				onSelect: t19
			});
			$[72] = dateFormat;
			$[73] = firstDayOfWeekIdx;
			$[74] = selectedValue;
			$[75] = t18;
			$[76] = t19;
			$[77] = t20;
		} else t20 = $[77];
		t13 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			...containerProps,
			children: [t17, maybeWrapTooltip(t20)]
		});
		$[27] = clearOnBlur;
		$[28] = containerProps;
		$[29] = dateFormat;
		$[30] = embedded;
		$[31] = firstDayOfWeekIdx;
		$[32] = id;
		$[33] = inputProps;
		$[34] = mergedRef;
		$[35] = onKeyDown_0;
		$[36] = onSelect;
		$[37] = onUpdate;
		$[38] = open;
		$[39] = openOnFocus;
		$[40] = selectedValue;
		$[41] = value;
		$[42] = t13;
	} else t13 = $[42];
	return t13;
}
function DateSelectMobile(props) {
	const $ = (0, import_compiler_runtime.c)(8);
	const t0 = props.value ?? "";
	let t1;
	if ($[0] !== props) {
		t1 = (event) => {
			props.onSelect(event.target.value);
		};
		$[0] = props;
		$[1] = t1;
	} else t1 = $[1];
	let t2;
	if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = { height: 28 };
		$[2] = t2;
	} else t2 = $[2];
	let t3;
	if ($[3] !== props.id || $[4] !== props.inputProps || $[5] !== t0 || $[6] !== t1) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputField, {
			id: props.id,
			type: "date",
			value: t0,
			onChange: t1,
			style: t2,
			...props.inputProps
		});
		$[3] = props.id;
		$[4] = props.inputProps;
		$[5] = t0;
		$[6] = t1;
		$[7] = t3;
	} else t3 = $[7];
	return t3;
}
function DateSelect(props) {
	const $ = (0, import_compiler_runtime.c)(4);
	const { isNarrowWidth } = useResponsive();
	if (isNarrowWidth) {
		let t0;
		if ($[0] !== props) {
			t0 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DateSelectMobile, { ...props });
			$[0] = props;
			$[1] = t0;
		} else t0 = $[1];
		return t0;
	}
	let t0;
	if ($[2] !== props) {
		t0 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DateSelectDesktop, { ...props });
		$[2] = props;
		$[3] = t0;
	} else t0 = $[3];
	return t0;
}
//#endregion
//#region src/hooks/useDisplayPayee.tsx
var DisplayPayeeContext = (0, import_react.createContext)(null);
function DisplayPayeeProvider(t0) {
	const $ = (0, import_compiler_runtime.c)(29);
	const { transactions, children } = t0;
	const { t } = useTranslation();
	let t1;
	if ($[0] !== transactions) {
		t1 = q$1("transactions").filter({ parent_id: { $oneof: transactions.map(_temp$7) } }).select("*");
		$[0] = transactions;
		$[1] = t1;
	} else t1 = $[1];
	const subtransactionsQuery = t1;
	const t2 = transactions.length * 5;
	let t3;
	if ($[2] !== t2) {
		t3 = { pageSize: t2 };
		$[2] = t2;
		$[3] = t3;
	} else t3 = $[3];
	let t4;
	if ($[4] !== subtransactionsQuery || $[5] !== t3) {
		t4 = {
			query: subtransactionsQuery,
			options: t3
		};
		$[4] = subtransactionsQuery;
		$[5] = t3;
		$[6] = t4;
	} else t4 = $[6];
	const { transactions: t5 } = useTransactions(t4);
	let t6;
	if ($[7] !== t5) {
		t6 = t5 === void 0 ? [] : t5;
		$[7] = t5;
		$[8] = t6;
	} else t6 = $[8];
	const allSubtransactions = t6;
	const { data: t7 } = useAccounts();
	let t8;
	if ($[9] !== t7) {
		t8 = t7 === void 0 ? [] : t7;
		$[9] = t7;
		$[10] = t8;
	} else t8 = $[10];
	const accounts = t8;
	const { data: t9 } = usePayeesById();
	let t10;
	if ($[11] !== t9) {
		t10 = t9 === void 0 ? {} : t9;
		$[11] = t9;
		$[12] = t10;
	} else t10 = $[12];
	const payeesById = t10;
	let t11;
	if ($[13] !== accounts || $[14] !== allSubtransactions || $[15] !== payeesById || $[16] !== t || $[17] !== transactions) {
		let t12;
		if ($[19] !== accounts || $[20] !== allSubtransactions || $[21] !== payeesById || $[22] !== t) {
			t12 = (acc, transaction) => {
				const subtransactions = allSubtransactions.filter((st) => st.parent_id === transaction.id);
				if (subtransactions.length === 0) {
					acc[transaction.id] = getPrettyPayee({
						t,
						transaction,
						payee: payeesById[transaction?.payee || ""],
						transferAccount: accounts.find((a) => a.id === payeesById[transaction?.payee || ""]?.transfer_acct)
					});
					return acc;
				}
				const { counts: counts_0, mostCommonPayeeTransaction } = subtransactions.reduce(_temp2$5, {
					counts: {},
					maxCount: 0,
					mostCommonPayeeTransaction: null
				}) || {};
				if (!mostCommonPayeeTransaction) {
					acc[transaction.id] = t("Split (no payee)");
					return acc;
				}
				const mostCommonPayee = payeesById[mostCommonPayeeTransaction.payee || ""];
				if (!mostCommonPayee) {
					acc[transaction.id] = t("Split (no payee)");
					return acc;
				}
				const numDistinctPayees = Object.keys(counts_0).length;
				acc[transaction.id] = getPrettyPayee({
					t,
					transaction: mostCommonPayeeTransaction,
					payee: mostCommonPayee,
					transferAccount: accounts.find((a_0) => a_0.id === payeesById[mostCommonPayeeTransaction.payee || ""]?.transfer_acct),
					numHiddenPayees: numDistinctPayees - 1
				});
				return acc;
			};
			$[19] = accounts;
			$[20] = allSubtransactions;
			$[21] = payeesById;
			$[22] = t;
			$[23] = t12;
		} else t12 = $[23];
		t11 = transactions.reduce(t12, {});
		$[13] = accounts;
		$[14] = allSubtransactions;
		$[15] = payeesById;
		$[16] = t;
		$[17] = transactions;
		$[18] = t11;
	} else t11 = $[18];
	const displayPayees = t11;
	let t12;
	if ($[24] !== displayPayees) {
		t12 = { displayPayees };
		$[24] = displayPayees;
		$[25] = t12;
	} else t12 = $[25];
	let t13;
	if ($[26] !== children || $[27] !== t12) {
		t13 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DisplayPayeeContext.Provider, {
			value: t12,
			children
		});
		$[26] = children;
		$[27] = t12;
		$[28] = t13;
	} else t13 = $[28];
	return t13;
}
function _temp2$5(t0, sub) {
	const { counts, ...result } = t0;
	if (sub.payee) {
		counts[sub.payee] = (counts[sub.payee] || 0) + 1;
		if (counts[sub.payee] > result.maxCount) return {
			counts,
			maxCount: counts[sub.payee],
			mostCommonPayeeTransaction: sub
		};
	}
	return {
		counts,
		...result
	};
}
function _temp$7(t_0) {
	return t_0.id;
}
function useDisplayPayee(t0) {
	const { transaction } = t0;
	const context = (0, import_react.useContext)(DisplayPayeeContext);
	if (!context) throw new Error("useDisplayPayee must be used within a DisplayPayeeContextProvider.");
	const { displayPayees } = context;
	return transaction ? displayPayees[transaction.id] || "" : "";
}
function getPrettyPayee({ t, transaction, payee, transferAccount, numHiddenPayees = 0 }) {
	if (!transaction) return "";
	const formatPayeeName = (payeeName) => numHiddenPayees > 0 ? `${payeeName} ${t("(+{{numHiddenPayees}} more)", { numHiddenPayees })}` : payeeName;
	const { payee: payeeId } = transaction;
	if (transferAccount) return formatPayeeName(transferAccount.name);
	else if (payee) return formatPayeeName(payee.name);
	else if (payeeId && payeeId.startsWith("new:")) return formatPayeeName(payeeId.slice(4));
	return "";
}
//#endregion
//#region src/hooks/usePrevious.ts
function usePrevious(value) {
	const ref = (0, import_react.useRef)(void 0);
	(0, import_react.useEffect)(() => {
		ref.current = value;
	}, [value]);
	return ref.current;
}
//#endregion
//#region src/hooks/useSplitsExpanded.tsx
var SplitsExpandedContext = (0, import_react.createContext)({
	state: {
		mode: "collapse",
		ids: /* @__PURE__ */ new Set(),
		transitionId: null
	},
	dispatch: () => {
		throw new Error("Unitialised context method called: dispatch");
	}
});
function useSplitsExpanded() {
	const $ = (0, import_compiler_runtime.c)(5);
	const data = (0, import_react.useContext)(SplitsExpandedContext);
	let t0;
	if ($[0] !== data) {
		t0 = (id) => data.state.mode === "collapse" ? !data.state.ids.has(id) : data.state.ids.has(id);
		$[0] = data;
		$[1] = t0;
	} else t0 = $[1];
	let t1;
	if ($[2] !== data || $[3] !== t0) {
		t1 = {
			...data,
			isExpanded: t0
		};
		$[2] = data;
		$[3] = t0;
		$[4] = t1;
	} else t1 = $[4];
	return t1;
}
function SplitsExpandedProvider({ children, initialMode = "expand" }) {
	const previousState = (0, import_react.useRef)(null);
	const [state_0, dispatch] = (0, import_react.useReducer)((state, action) => {
		switch (action.type) {
			case "toggle-split": {
				const ids_1 = new Set([...state.ids]);
				const { id: id_1 } = action;
				if (ids_1.has(id_1)) ids_1.delete(id_1);
				else ids_1.add(id_1);
				return {
					...state,
					ids: ids_1
				};
			}
			case "open-split": {
				const ids_0 = new Set([...state.ids]);
				const { id: id_0 } = action;
				if (state.mode === "collapse") ids_0.delete(id_0);
				else ids_0.add(id_0);
				return {
					...state,
					ids: ids_0
				};
			}
			case "close-splits": {
				const ids = new Set([...state.ids]);
				action.ids.forEach((id) => {
					if (state.mode === "collapse") ids.add(id);
					else ids.delete(id);
				});
				return {
					...state,
					ids
				};
			}
			case "set-mode": return {
				...state,
				mode: action.mode,
				ids: /* @__PURE__ */ new Set(),
				transitionId: null
			};
			case "switch-mode":
				if (state.transitionId != null) return state;
				return {
					...state,
					mode: state.mode === "expand" ? "collapse" : "expand",
					transitionId: action.id,
					ids: /* @__PURE__ */ new Set()
				};
			case "finish-switch-mode": return {
				...state,
				transitionId: null
			};
			default: throw new Error("Unrecognized action");
		}
	}, previousState.current || {
		ids: /* @__PURE__ */ new Set(),
		mode: initialMode,
		transitionId: null
	});
	(0, import_react.useEffect)(() => {
		if (state_0.transitionId != null) setTimeout(() => {
			dispatch({ type: "finish-switch-mode" });
		}, 250);
	}, [state_0.transitionId]);
	(0, import_react.useEffect)(() => {
		if (state_0.transitionId == null) previousState.current = state_0;
	}, [state_0]);
	const value = (0, import_react.useMemo)(() => ({
		state: state_0,
		dispatch
	}), [state_0, dispatch]);
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SplitsExpandedContext.Provider, {
		value,
		children
	});
}
//#endregion
//#region ../loot-core/src/shared/environment.ts
init_build_shims();
function isPreviewEnvironment() {
	return String(process$1.env.REACT_APP_NETLIFY) === "true";
}
function isDevelopmentEnvironment() {
	return false;
}
function isNonProductionEnvironment() {
	return isPreviewEnvironment() || isDevelopmentEnvironment();
}
function isElectron() {
	if (typeof navigator !== "undefined" && navigator.userAgent.indexOf("Electron") >= 0) return true;
	return false;
}
//#endregion
//#region src/notes/linkParser.ts
var MARKDOWN_LINK_REGEX = /\[([^\]]+)\]\(([^)]+)\)/;
var FULL_URL_REGEX = /https?:\/\/[^\s]+/;
var WWW_URL_REGEX = /www\.[^\s]+/;
var UNIX_PATH_REGEX = /^\/[^\s/]+\/[^\s]*$/;
var WINDOWS_PATH_REGEX = /^[A-Z]:\\(?:[^\s\\]+\\)*[^\s\\]+$/i;
var TRAILING_PUNCTUATION_REGEX = /[.,;:!?)\]"']+$/;
/**
* Strips trailing punctuation from a URL
*/
function stripTrailingPunctuation(url) {
	return url.replace(TRAILING_PUNCTUATION_REGEX, "");
}
/**
* Normalizes a URL by adding protocol if missing
*/
function normalizeUrl(rawUrl) {
	if (rawUrl.startsWith("http://") || rawUrl.startsWith("https://")) return rawUrl;
	if (rawUrl.startsWith("www.")) return `https://${rawUrl}`;
	if (rawUrl.startsWith("/") || /^[A-Z]:\\/i.test(rawUrl)) return `file://${rawUrl}`;
	return rawUrl;
}
/**
* Parses a single word for hashtags (existing logic from NotesTagFormatter)
* Returns segments for tags found in the word
*/
function parseTagsInWord(word) {
	const segments = [];
	if (!word.includes("#") || word.length <= 1) return [{
		type: "text",
		content: word
	}];
	let lastEmptyTag = -1;
	word.split("#").forEach((tag, ti) => {
		if (ti === 0) {
			if (tag) segments.push({
				type: "text",
				content: tag
			});
			return;
		}
		if (!tag) {
			lastEmptyTag = ti;
			segments.push({
				type: "text",
				content: "#"
			});
			return;
		}
		if (lastEmptyTag === ti - 1) {
			segments.push({
				type: "text",
				content: `${tag}`
			});
			return;
		}
		lastEmptyTag = -1;
		const validTag = `#${tag}`;
		segments.push({
			type: "tag",
			content: validTag,
			tag
		});
	});
	return segments;
}
/**
* Parses notes string into segments of text, tags, and links
*/
function parseNotes(notes) {
	if (!notes) return [];
	const segments = [];
	let remaining = notes;
	while (remaining.length > 0) {
		const markdownMatch = remaining.match(MARKDOWN_LINK_REGEX);
		if (markdownMatch && markdownMatch.index !== void 0) {
			if (markdownMatch.index > 0) {
				const textBefore = remaining.slice(0, markdownMatch.index);
				segments.push(...parseTextWithTags(textBefore));
			}
			const [fullMatch, displayText, url] = markdownMatch;
			const isFilePath = url.startsWith("/") || /^[A-Z]:\\/i.test(url) || url.startsWith("file://");
			segments.push({
				type: "link",
				content: fullMatch,
				displayText,
				url,
				isFilePath
			});
			remaining = remaining.slice(markdownMatch.index + fullMatch.length);
			continue;
		}
		const urlMatch = remaining.match(FULL_URL_REGEX);
		if (urlMatch && urlMatch.index !== void 0) {
			if (urlMatch.index > 0) {
				const textBefore = remaining.slice(0, urlMatch.index);
				segments.push(...parseTextWithTags(textBefore));
			}
			const rawUrl = urlMatch[0];
			const url = stripTrailingPunctuation(rawUrl);
			segments.push({
				type: "link",
				content: url,
				displayText: url,
				url,
				isFilePath: false
			});
			remaining = remaining.slice(urlMatch.index + url.length);
			continue;
		}
		const wwwMatch = remaining.match(WWW_URL_REGEX);
		if (wwwMatch && wwwMatch.index !== void 0) {
			if (wwwMatch.index > 0) {
				const textBefore = remaining.slice(0, wwwMatch.index);
				segments.push(...parseTextWithTags(textBefore));
			}
			const rawUrl = wwwMatch[0];
			const url = stripTrailingPunctuation(rawUrl);
			segments.push({
				type: "link",
				content: url,
				displayText: url,
				url,
				isFilePath: false
			});
			remaining = remaining.slice(wwwMatch.index + url.length);
			continue;
		}
		segments.push(...parseTextWithTags(remaining));
		break;
	}
	return segments;
}
/**
* Parses text that may contain hashtags and file paths
*/
function parseTextWithTags(text) {
	const segments = [];
	const words = text.split(/(\s+)/);
	for (const word of words) {
		if (/^\s+$/.test(word)) {
			segments.push({
				type: "text",
				content: word
			});
			continue;
		}
		if (UNIX_PATH_REGEX.test(word) || WINDOWS_PATH_REGEX.test(word)) {
			segments.push({
				type: "link",
				content: word,
				displayText: word,
				url: word,
				isFilePath: true
			});
			continue;
		}
		if (word.includes("#") && word.length > 1) {
			segments.push(...parseTagsInWord(word));
			continue;
		}
		if (word) segments.push({
			type: "text",
			content: word
		});
	}
	return segments;
}
//#endregion
//#region src/notes/DesktopLinkedNotes.tsx
function DesktopLinkedNotes(t0) {
	const $ = (0, import_compiler_runtime.c)(12);
	const { displayText, url, separator, isFilePath } = t0;
	const dispatch = useDispatch();
	const { t } = useTranslation();
	let t1;
	if ($[0] !== dispatch || $[1] !== isFilePath || $[2] !== t || $[3] !== url) {
		t1 = async (e) => {
			e.stopPropagation();
			e.preventDefault();
			if (isFilePath) if (isElectron()) window.Actual?.openInFileManager(url);
			else {
				await navigator.clipboard.writeText(url);
				dispatch(addNotification({ notification: {
					type: "message",
					message: t("File path copied to clipboard")
				} }));
			}
			else {
				const normalizedUrl = normalizeUrl(url);
				window.Actual?.openURLInBrowser(normalizedUrl);
			}
		};
		$[0] = dispatch;
		$[1] = isFilePath;
		$[2] = t;
		$[3] = url;
		$[4] = t1;
	} else t1 = $[4];
	const handleClick = t1;
	let t2;
	if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = {
			color: theme.pageTextLink,
			textDecoration: "underline",
			cursor: "pointer",
			"&:hover": { color: theme.pageTextLinkLight }
		};
		$[5] = t2;
	} else t2 = $[5];
	let t3;
	if ($[6] !== displayText || $[7] !== handleClick) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
			variant: "text",
			onClick: handleClick,
			style: t2,
			children: displayText
		});
		$[6] = displayText;
		$[7] = handleClick;
		$[8] = t3;
	} else t3 = $[8];
	let t4;
	if ($[9] !== separator || $[10] !== t3) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [t3, separator] });
		$[9] = separator;
		$[10] = t3;
		$[11] = t4;
	} else t4 = $[11];
	return t4;
}
//#endregion
//#region src/notes/DesktopTaggedNotes.tsx
function DesktopTaggedNotes(t0) {
	const $ = (0, import_compiler_runtime.c)(14);
	const { content, onPress, tag, separator } = t0;
	const getTagCSS = useTagCSS();
	let t1;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = { display: "inline" };
		$[0] = t1;
	} else t1 = $[0];
	let t2;
	if ($[1] !== getTagCSS || $[2] !== tag) {
		t2 = getTagCSS(tag);
		$[1] = getTagCSS;
		$[2] = tag;
		$[3] = t2;
	} else t2 = $[3];
	let t3;
	if ($[4] !== content || $[5] !== onPress) {
		t3 = () => {
			onPress?.(content);
		};
		$[4] = content;
		$[5] = onPress;
		$[6] = t3;
	} else t3 = $[6];
	let t4;
	if ($[7] !== content || $[8] !== t2 || $[9] !== t3) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
			variant: "bare",
			className: t2,
			onPress: t3,
			children: content
		});
		$[7] = content;
		$[8] = t2;
		$[9] = t3;
		$[10] = t4;
	} else t4 = $[10];
	let t5;
	if ($[11] !== separator || $[12] !== t4) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t1,
			children: [t4, separator]
		});
		$[11] = separator;
		$[12] = t4;
		$[13] = t5;
	} else t5 = $[13];
	return t5;
}
//#endregion
//#region src/notes/MobileLinkedNotes.tsx
var linkStyles = css({
	color: theme.pageTextLink,
	textDecoration: "underline"
});
function MobileLinkedNotes(t0) {
	const $ = (0, import_compiler_runtime.c)(11);
	const { displayText, url, separator, isFilePath } = t0;
	const dispatch = useDispatch();
	const { t } = useTranslation();
	let t1;
	if ($[0] !== dispatch || $[1] !== isFilePath || $[2] !== t || $[3] !== url) {
		t1 = async () => {
			if (isFilePath) if (isElectron()) window.Actual?.openInFileManager(url);
			else {
				await navigator.clipboard.writeText(url);
				dispatch(addNotification({ notification: {
					type: "message",
					message: t("File path copied to clipboard")
				} }));
			}
			else {
				const normalizedUrl = normalizeUrl(url);
				window.Actual?.openURLInBrowser(normalizedUrl);
			}
		};
		$[0] = dispatch;
		$[1] = isFilePath;
		$[2] = t;
		$[3] = url;
		$[4] = t1;
	} else t1 = $[4];
	const handleClick = t1;
	let t2;
	if ($[5] !== displayText || $[6] !== handleClick) {
		t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
			className: linkStyles,
			onClick: handleClick,
			children: displayText
		});
		$[5] = displayText;
		$[6] = handleClick;
		$[7] = t2;
	} else t2 = $[7];
	let t3;
	if ($[8] !== separator || $[9] !== t2) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [t2, separator] });
		$[8] = separator;
		$[9] = t2;
		$[10] = t3;
	} else t3 = $[10];
	return t3;
}
//#endregion
//#region src/notes/MobileTaggedNotes.tsx
function MobileTaggedNotes(t0) {
	const $ = (0, import_compiler_runtime.c)(9);
	const { content, tag, separator } = t0;
	const getTagCSS = useTagCSS();
	let t1;
	if ($[0] !== getTagCSS || $[1] !== tag) {
		t1 = getTagCSS(tag, { compact: true });
		$[0] = getTagCSS;
		$[1] = tag;
		$[2] = t1;
	} else t1 = $[2];
	let t2;
	if ($[3] !== content || $[4] !== t1) {
		t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
			className: t1,
			children: content
		});
		$[3] = content;
		$[4] = t1;
		$[5] = t2;
	} else t2 = $[5];
	let t3;
	if ($[6] !== separator || $[7] !== t2) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [t2, separator] });
		$[6] = separator;
		$[7] = t2;
		$[8] = t3;
	} else t3 = $[8];
	return t3;
}
//#endregion
//#region src/notes/NotesTagFormatter.tsx
function NotesTagFormatter(t0) {
	const $ = (0, import_compiler_runtime.c)(6);
	const { notes, onNotesTagClick } = t0;
	const { isNarrowWidth } = useResponsive();
	let t1;
	if ($[0] !== isNarrowWidth || $[1] !== notes || $[2] !== onNotesTagClick) {
		const segments = parseNotes(notes);
		t1 = segments.map((segment, index) => {
			const isLast = index === segments.length - 1;
			const nextSegment = segments[index + 1];
			const separator = isLast || nextSegment?.type === "text" && /^\s/.test(nextSegment.content) ? "" : " ";
			switch (segment.type) {
				case "text": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children: segment.content }, index);
				case "tag":
					if (isNarrowWidth) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MobileTaggedNotes, {
						content: segment.content,
						tag: segment.tag,
						separator
					}, index);
					return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DesktopTaggedNotes, {
						onPress: onNotesTagClick,
						content: segment.content,
						tag: segment.tag,
						separator
					}, index);
				case "link":
					if (isNarrowWidth) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MobileLinkedNotes, {
						displayText: segment.displayText,
						url: segment.url,
						separator,
						isFilePath: segment.isFilePath
					}, index);
					return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DesktopLinkedNotes, {
						displayText: segment.displayText,
						url: segment.url,
						separator,
						isFilePath: segment.isFilePath
					}, index);
				default: return null;
			}
		});
		$[0] = isNarrowWidth;
		$[1] = notes;
		$[2] = onNotesTagClick;
		$[3] = t1;
	} else t1 = $[3];
	let t2;
	if ($[4] !== t1) {
		t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: t1 });
		$[4] = t1;
		$[5] = t2;
	} else t2 = $[5];
	return t2;
}
//#endregion
//#region src/components/transactions/table/utils.ts
function serializeTransaction$1(transaction, showZeroInDeposit) {
	const { amount, date: originalDate } = transaction;
	let debit = amount < 0 ? -amount : null;
	let credit = amount > 0 ? amount : null;
	if (amount === 0) if (showZeroInDeposit) credit = 0;
	else debit = 0;
	let date = originalDate;
	if (!isValid$3(parseISO(date))) {
		console.error(`Date '${date}' is not valid.`);
		date = null;
	}
	return {
		...transaction,
		date,
		debit: debit != null ? integerToCurrencyWithDecimal(debit) : "",
		credit: credit != null ? integerToCurrencyWithDecimal(credit) : ""
	};
}
function deserializeTransaction(transaction, originalTransaction) {
	const { debit, credit, date: originalDate, ...realTransaction } = transaction;
	let amount;
	if (debit !== "") {
		const parsed = evalArithmetic(debit, null);
		amount = parsed != null ? -parsed : null;
	} else amount = evalArithmetic(credit, null);
	amount = amount != null ? amountToInteger(amount) : originalTransaction.amount;
	let date = originalDate;
	if (date == null) date = originalTransaction.date || currentDay();
	return {
		...realTransaction,
		date,
		amount
	};
}
function isLastChild(transactions, index) {
	const trans = transactions[index];
	return trans && trans.is_child && (transactions[index + 1] == null || transactions[index + 1].parent_id !== trans.parent_id);
}
function selectAscDesc(field, ascDesc, clicked, defaultAscDesc = "asc") {
	return field === clicked ? ascDesc === "asc" ? "desc" : "asc" : defaultAscDesc;
}
function makeTemporaryTransactions(currentAccountId, currentCategoryId, lastDate) {
	return [{
		id: "temp",
		date: lastDate || currentDay(),
		account: currentAccountId || null,
		category: currentCategoryId || void 0,
		cleared: false,
		amount: null
	}];
}
//#endregion
//#region src/components/transactions/TransactionMenu.tsx
function TransactionMenu(t0) {
	const $ = (0, import_compiler_runtime.c)(66);
	let closeMenu;
	let getTransaction;
	let onCreateRule;
	let onDelete;
	let onDuplicate;
	let onLinkSchedule;
	let onMakeAsNonSplitTransactions;
	let onScheduleAction;
	let onUnlinkSchedule;
	let props;
	let transaction;
	if ($[0] !== t0) {
		({transaction, getTransaction, onDuplicate, onDelete, onLinkSchedule, onUnlinkSchedule, onCreateRule, onScheduleAction, onMakeAsNonSplitTransactions, closeMenu, ...props} = t0);
		$[0] = t0;
		$[1] = closeMenu;
		$[2] = getTransaction;
		$[3] = onCreateRule;
		$[4] = onDelete;
		$[5] = onDuplicate;
		$[6] = onLinkSchedule;
		$[7] = onMakeAsNonSplitTransactions;
		$[8] = onScheduleAction;
		$[9] = onUnlinkSchedule;
		$[10] = props;
		$[11] = transaction;
	} else {
		closeMenu = $[1];
		getTransaction = $[2];
		onCreateRule = $[3];
		onDelete = $[4];
		onDuplicate = $[5];
		onLinkSchedule = $[6];
		onMakeAsNonSplitTransactions = $[7];
		onScheduleAction = $[8];
		onUnlinkSchedule = $[9];
		props = $[10];
		transaction = $[11];
	}
	const { t } = useTranslation();
	const dispatch = useDispatch();
	const selectedItems = useSelectedItems();
	let t1;
	if ($[12] !== selectedItems || $[13] !== transaction) {
		t1 = selectedItems && selectedItems.size > 0 ? selectedItems : [transaction.id];
		$[12] = selectedItems;
		$[13] = transaction;
		$[14] = t1;
	} else t1 = $[14];
	const ids = t1;
	let t2;
	if ($[15] !== ids) {
		t2 = Array.from(new Set(ids));
		$[15] = ids;
		$[16] = t2;
	} else t2 = $[16];
	const selectedIds = t2;
	let t3;
	if ($[17] !== selectedIds) {
		t3 = selectedIds.filter(_temp$6).map(_temp2$4);
		$[17] = selectedIds;
		$[18] = t3;
	} else t3 = $[18];
	const scheduleIds = t3;
	let t4;
	if ($[19] !== scheduleIds) {
		t4 = q$1("schedules").filter({ id: { $oneof: scheduleIds } }).select("*");
		$[19] = scheduleIds;
		$[20] = t4;
	} else t4 = $[20];
	const scheduleQuery = t4;
	let t5;
	if ($[21] !== scheduleQuery) {
		t5 = { query: scheduleQuery };
		$[21] = scheduleQuery;
		$[22] = t5;
	} else t5 = $[22];
	const { schedules: selectedSchedules } = useSchedules(t5);
	const items = selectedIds;
	let t6;
	if ($[23] !== items) {
		t6 = items.find(_temp3$2);
		$[23] = items;
		$[24] = t6;
	} else t6 = $[24];
	const t7 = !!t6;
	let t8;
	if ($[25] !== items) {
		t8 = items.find(_temp4$1);
		$[25] = items;
		$[26] = t8;
	} else t8 = $[26];
	const t9 = !!t8;
	let t10;
	if ($[27] !== t7 || $[28] !== t9) {
		t10 = {
			preview: t7,
			trans: t9
		};
		$[27] = t7;
		$[28] = t9;
		$[29] = t10;
	} else t10 = $[29];
	const types = t10;
	const ambiguousDuplication = selectedIds.map((id_3) => getTransaction(id_3)).some(_temp5$1);
	let t11;
	if ($[30] !== getTransaction || $[31] !== selectedIds || $[32] !== types.preview) {
		t11 = !types.preview && selectedIds.every((id_4) => {
			const t_0 = getTransaction(id_4);
			return t_0 && t_0.schedule;
		});
		$[30] = getTransaction;
		$[31] = selectedIds;
		$[32] = types.preview;
		$[33] = t11;
	} else t11 = $[33];
	const linked = t11;
	let t12;
	if ($[34] !== selectedSchedules) {
		t12 = selectedSchedules.filter(_temp6);
		$[34] = selectedSchedules;
		$[35] = t12;
	} else t12 = $[35];
	const canBeSkipped = t12.length === selectedSchedules.length;
	let t13;
	if ($[36] !== selectedSchedules) {
		t13 = selectedSchedules.filter(_temp7);
		$[36] = selectedSchedules;
		$[37] = t13;
	} else t13 = $[37];
	const canBeCompleted = t13.length === selectedSchedules.length;
	let t14;
	bb0: {
		if (selectedIds.length === 0 || types.preview) {
			t14 = false;
			break bb0;
		}
		const transactions_0 = selectedIds.map((id_5) => getTransaction(id_5));
		const areNoReconciledTransactions = transactions_0.every(_temp8);
		const areAllSplitTransactions = transactions_0.every(_temp9);
		t14 = areNoReconciledTransactions && areAllSplitTransactions;
	}
	const canUnsplitTransactions = t14;
	let t15;
	if ($[38] !== dispatch || $[39] !== getTransaction || $[40] !== selectedIds[0]) {
		t15 = function onViewSchedule() {
			const firstId = selectedIds[0];
			let scheduleId;
			if (isPreviewId(firstId)) scheduleId = firstId.split("/")[1];
			else {
				const trans = getTransaction(firstId);
				scheduleId = trans && trans.schedule;
			}
			if (scheduleId) dispatch(pushModal({ modal: {
				name: "schedule-edit",
				options: { id: scheduleId }
			} }));
		};
		$[38] = dispatch;
		$[39] = getTransaction;
		$[40] = selectedIds[0];
		$[41] = t15;
	} else t15 = $[41];
	const onViewSchedule = t15;
	let t16;
	if ($[42] !== closeMenu || $[43] !== onCreateRule || $[44] !== onDelete || $[45] !== onDuplicate || $[46] !== onLinkSchedule || $[47] !== onMakeAsNonSplitTransactions || $[48] !== onScheduleAction || $[49] !== onUnlinkSchedule || $[50] !== onViewSchedule || $[51] !== selectedIds) {
		t16 = (name) => {
			bb97: switch (name) {
				case "duplicate":
					onDuplicate(selectedIds);
					break bb97;
				case "delete":
					onDelete(selectedIds);
					break bb97;
				case "unsplit-transactions":
					onMakeAsNonSplitTransactions(selectedIds);
					break bb97;
				case "post-transaction":
				case "post-transaction-today":
				case "skip":
				case "complete":
					onScheduleAction(name, selectedIds);
					break bb97;
				case "view-schedule":
					onViewSchedule();
					break bb97;
				case "link-schedule":
					onLinkSchedule(selectedIds);
					break bb97;
				case "unlink-schedule":
					onUnlinkSchedule(selectedIds);
					break bb97;
				case "create-rule":
					onCreateRule(selectedIds);
					break bb97;
				default: throw new Error(`Unrecognized menu option: ${name}`);
			}
			closeMenu();
		};
		$[42] = closeMenu;
		$[43] = onCreateRule;
		$[44] = onDelete;
		$[45] = onDuplicate;
		$[46] = onLinkSchedule;
		$[47] = onMakeAsNonSplitTransactions;
		$[48] = onScheduleAction;
		$[49] = onUnlinkSchedule;
		$[50] = onViewSchedule;
		$[51] = selectedIds;
		$[52] = t16;
	} else t16 = $[52];
	let t17;
	if ($[53] !== ambiguousDuplication || $[54] !== canBeCompleted || $[55] !== canBeSkipped || $[56] !== canUnsplitTransactions || $[57] !== linked || $[58] !== selectedIds.length || $[59] !== t || $[60] !== types.trans) {
		t17 = [...!types.trans ? [
			...selectedIds.length === 1 ? [{
				name: "view-schedule",
				text: t("View schedule")
			}] : [],
			{
				name: "post-transaction",
				text: t("Post transaction")
			},
			{
				name: "post-transaction-today",
				text: t("Post transaction today")
			},
			...canBeSkipped ? [{
				name: "skip",
				text: t("Skip next scheduled date")
			}] : [],
			...canBeCompleted ? [{
				name: "complete",
				text: t("Mark as completed")
			}] : []
		] : [
			...ambiguousDuplication ? [] : [{
				name: "duplicate",
				text: t("Duplicate")
			}],
			{
				name: "delete",
				text: t("Delete")
			},
			...linked ? [...selectedIds.length === 1 ? [{
				name: "view-schedule",
				text: t("View schedule")
			}] : [], {
				name: "unlink-schedule",
				text: t("Unlink schedule")
			}] : [{
				name: "link-schedule",
				text: t("Link schedule")
			}, {
				name: "create-rule",
				text: t("Create rule")
			}],
			...canUnsplitTransactions ? [{
				name: "unsplit-transactions",
				text: t("Unsplit {{count}} transactions", { count: selectedIds.length })
			}] : []
		]];
		$[53] = ambiguousDuplication;
		$[54] = canBeCompleted;
		$[55] = canBeSkipped;
		$[56] = canUnsplitTransactions;
		$[57] = linked;
		$[58] = selectedIds.length;
		$[59] = t;
		$[60] = types.trans;
		$[61] = t17;
	} else t17 = $[61];
	let t18;
	if ($[62] !== props || $[63] !== t16 || $[64] !== t17) {
		t18 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Menu, {
			...props,
			onMenuSelect: t16,
			items: t17
		});
		$[62] = props;
		$[63] = t16;
		$[64] = t17;
		$[65] = t18;
	} else t18 = $[65];
	return t18;
}
function _temp9(tx_1) {
	return tx_1 && (tx_1.is_parent || tx_1.is_child);
}
function _temp8(tx_0) {
	return tx_0 && !tx_0.reconciled;
}
function _temp7(s_0) {
	const { date: dateCond_0 } = extractScheduleConds(s_0._conditions);
	return !scheduleIsRecurring(dateCond_0);
}
function _temp6(s) {
	const { date: dateCond } = extractScheduleConds(s._conditions);
	return scheduleIsRecurring(dateCond);
}
function _temp5$1(tx) {
	return tx && tx.is_child;
}
function _temp4$1(id_2) {
	return !isPreviewId(id_2);
}
function _temp3$2(id_1) {
	return isPreviewId(id_1);
}
function _temp2$4(id_0) {
	return id_0.split("/")[1];
}
function _temp$6(id) {
	return isPreviewId(id);
}
//#endregion
//#region src/components/transactions/TransactionsTable.tsx
var TransactionHeader = (0, import_react.memo)((t0) => {
	const $ = (0, import_compiler_runtime.c)(96);
	const { hasSelected, showAccount, showCategory, showBalance, showCleared, scrollWidth, onSort, ascDesc, field, showSelection } = t0;
	const dispatchSelected = useSelectedDispatch();
	const { t } = useTranslation();
	let t1;
	if ($[0] !== dispatchSelected) {
		t1 = () => dispatchSelected({ type: "select-all" });
		$[0] = dispatchSelected;
		$[1] = t1;
	} else t1 = $[1];
	let t2;
	if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = {
			preventDefault: true,
			scopes: ["app"]
		};
		$[2] = t2;
	} else t2 = $[2];
	let t3;
	if ($[3] !== dispatchSelected) {
		t3 = [dispatchSelected];
		$[3] = dispatchSelected;
		$[4] = t3;
	} else t3 = $[4];
	fe("ctrl+a, cmd+a, meta+a", t1, t2, t3);
	const t4 = `${5 + (scrollWidth ?? 0)}px`;
	let t5;
	if ($[5] !== t4) {
		t5 = {
			fontWeight: 300,
			zIndex: 200,
			color: theme.tableHeaderText,
			backgroundColor: theme.tableHeaderBackground,
			paddingRight: t4,
			borderTopWidth: 1,
			borderBottomWidth: 1,
			borderColor: theme.tableBorder
		};
		$[5] = t4;
		$[6] = t5;
	} else t5 = $[6];
	let t6;
	if ($[7] !== dispatchSelected || $[8] !== hasSelected || $[9] !== showSelection) {
		t6 = showSelection && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectCell, {
			exposed: true,
			focused: false,
			selected: hasSelected,
			width: 20,
			style: {
				borderTopWidth: 0,
				borderBottomWidth: 0
			},
			icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgSubtract, {
				width: 6,
				height: 6
			}),
			onSelect: (e) => dispatchSelected({
				type: "select-all",
				isRangeSelect: e.shiftKey
			})
		});
		$[7] = dispatchSelected;
		$[8] = hasSelected;
		$[9] = showSelection;
		$[10] = t6;
	} else t6 = $[10];
	let t7;
	if ($[11] !== showSelection) {
		t7 = !showSelection && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Field, { style: {
			width: "20px",
			border: 0
		} });
		$[11] = showSelection;
		$[12] = t7;
	} else t7 = $[12];
	let t8;
	if ($[13] !== t) {
		t8 = t("Date");
		$[13] = t;
		$[14] = t8;
	} else t8 = $[14];
	const t9 = field === "date" ? ascDesc : "clickable";
	let t10;
	if ($[15] !== ascDesc || $[16] !== field || $[17] !== onSort) {
		t10 = () => onSort("date", selectAscDesc(field, ascDesc, "date", "desc"));
		$[15] = ascDesc;
		$[16] = field;
		$[17] = onSort;
		$[18] = t10;
	} else t10 = $[18];
	let t11;
	if ($[19] !== t10 || $[20] !== t8 || $[21] !== t9) {
		t11 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HeaderCell, {
			value: t8,
			width: 110,
			alignItems: "flex",
			marginLeft: -5,
			id: "date",
			icon: t9,
			onClick: t10
		});
		$[19] = t10;
		$[20] = t8;
		$[21] = t9;
		$[22] = t11;
	} else t11 = $[22];
	let t12;
	if ($[23] !== ascDesc || $[24] !== field || $[25] !== onSort || $[26] !== showAccount || $[27] !== t) {
		t12 = showAccount && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HeaderCell, {
			value: t("Account"),
			width: "flex",
			alignItems: "flex",
			marginLeft: -5,
			id: "account",
			icon: field === "account" ? ascDesc : "clickable",
			onClick: () => onSort("account", selectAscDesc(field, ascDesc, "account", "asc"))
		});
		$[23] = ascDesc;
		$[24] = field;
		$[25] = onSort;
		$[26] = showAccount;
		$[27] = t;
		$[28] = t12;
	} else t12 = $[28];
	let t13;
	if ($[29] !== t) {
		t13 = t("Payee");
		$[29] = t;
		$[30] = t13;
	} else t13 = $[30];
	const t14 = field === "payee" ? ascDesc : "clickable";
	let t15;
	if ($[31] !== ascDesc || $[32] !== field || $[33] !== onSort) {
		t15 = () => onSort("payee", selectAscDesc(field, ascDesc, "payee", "asc"));
		$[31] = ascDesc;
		$[32] = field;
		$[33] = onSort;
		$[34] = t15;
	} else t15 = $[34];
	let t16;
	if ($[35] !== t13 || $[36] !== t14 || $[37] !== t15) {
		t16 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HeaderCell, {
			value: t13,
			width: "flex",
			alignItems: "flex",
			marginLeft: -5,
			id: "payee",
			icon: t14,
			onClick: t15
		});
		$[35] = t13;
		$[36] = t14;
		$[37] = t15;
		$[38] = t16;
	} else t16 = $[38];
	let t17;
	if ($[39] !== t) {
		t17 = t("Notes");
		$[39] = t;
		$[40] = t17;
	} else t17 = $[40];
	const t18 = field === "notes" ? ascDesc : "clickable";
	let t19;
	if ($[41] !== ascDesc || $[42] !== field || $[43] !== onSort) {
		t19 = () => onSort("notes", selectAscDesc(field, ascDesc, "notes", "asc"));
		$[41] = ascDesc;
		$[42] = field;
		$[43] = onSort;
		$[44] = t19;
	} else t19 = $[44];
	let t20;
	if ($[45] !== t17 || $[46] !== t18 || $[47] !== t19) {
		t20 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HeaderCell, {
			value: t17,
			width: "flex",
			alignItems: "flex",
			marginLeft: -5,
			id: "notes",
			icon: t18,
			onClick: t19
		});
		$[45] = t17;
		$[46] = t18;
		$[47] = t19;
		$[48] = t20;
	} else t20 = $[48];
	let t21;
	if ($[49] !== ascDesc || $[50] !== field || $[51] !== onSort || $[52] !== showCategory || $[53] !== t) {
		t21 = showCategory && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HeaderCell, {
			value: t("Category"),
			width: "flex",
			alignItems: "flex",
			marginLeft: -5,
			id: "category",
			icon: field === "category" ? ascDesc : "clickable",
			onClick: () => onSort("category", selectAscDesc(field, ascDesc, "category", "asc"))
		});
		$[49] = ascDesc;
		$[50] = field;
		$[51] = onSort;
		$[52] = showCategory;
		$[53] = t;
		$[54] = t21;
	} else t21 = $[54];
	let t22;
	if ($[55] !== t) {
		t22 = t("Payment");
		$[55] = t;
		$[56] = t22;
	} else t22 = $[56];
	const t23 = field === "payment" ? ascDesc : "clickable";
	let t24;
	if ($[57] !== ascDesc || $[58] !== field || $[59] !== onSort) {
		t24 = () => onSort("payment", selectAscDesc(field, ascDesc, "payment", "asc"));
		$[57] = ascDesc;
		$[58] = field;
		$[59] = onSort;
		$[60] = t24;
	} else t24 = $[60];
	let t25;
	if ($[61] !== t22 || $[62] !== t23 || $[63] !== t24) {
		t25 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HeaderCell, {
			value: t22,
			width: 100,
			alignItems: "flex-end",
			marginRight: -5,
			id: "payment",
			icon: t23,
			onClick: t24
		});
		$[61] = t22;
		$[62] = t23;
		$[63] = t24;
		$[64] = t25;
	} else t25 = $[64];
	let t26;
	if ($[65] !== t) {
		t26 = t("Deposit");
		$[65] = t;
		$[66] = t26;
	} else t26 = $[66];
	const t27 = field === "deposit" ? ascDesc : "clickable";
	let t28;
	if ($[67] !== ascDesc || $[68] !== field || $[69] !== onSort) {
		t28 = () => onSort("deposit", selectAscDesc(field, ascDesc, "deposit", "desc"));
		$[67] = ascDesc;
		$[68] = field;
		$[69] = onSort;
		$[70] = t28;
	} else t28 = $[70];
	let t29;
	if ($[71] !== t26 || $[72] !== t27 || $[73] !== t28) {
		t29 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HeaderCell, {
			value: t26,
			width: 100,
			alignItems: "flex-end",
			marginRight: -5,
			id: "deposit",
			icon: t27,
			onClick: t28
		});
		$[71] = t26;
		$[72] = t27;
		$[73] = t28;
		$[74] = t29;
	} else t29 = $[74];
	let t30;
	if ($[75] !== showBalance || $[76] !== t) {
		t30 = showBalance && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HeaderCell, {
			value: t("Balance"),
			width: 103,
			alignItems: "flex-end",
			marginRight: -5,
			id: "balance"
		});
		$[75] = showBalance;
		$[76] = t;
		$[77] = t30;
	} else t30 = $[77];
	let t31;
	if ($[78] !== ascDesc || $[79] !== field || $[80] !== onSort || $[81] !== showCleared) {
		t31 = showCleared && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HeaderCell, {
			value: "✓",
			width: 38,
			alignItems: "center",
			id: "cleared",
			icon: field === "cleared" ? ascDesc : "clickable",
			onClick: () => {
				onSort("cleared", selectAscDesc(field, ascDesc, "cleared", "asc"));
			}
		});
		$[78] = ascDesc;
		$[79] = field;
		$[80] = onSort;
		$[81] = showCleared;
		$[82] = t31;
	} else t31 = $[82];
	let t32;
	if ($[83] !== t11 || $[84] !== t12 || $[85] !== t16 || $[86] !== t20 || $[87] !== t21 || $[88] !== t25 || $[89] !== t29 || $[90] !== t30 || $[91] !== t31 || $[92] !== t5 || $[93] !== t6 || $[94] !== t7) {
		t32 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Row, {
			style: t5,
			children: [
				t6,
				t7,
				t11,
				t12,
				t16,
				t20,
				t21,
				t25,
				t29,
				t30,
				t31
			]
		});
		$[83] = t11;
		$[84] = t12;
		$[85] = t16;
		$[86] = t20;
		$[87] = t21;
		$[88] = t25;
		$[89] = t29;
		$[90] = t30;
		$[91] = t31;
		$[92] = t5;
		$[93] = t6;
		$[94] = t7;
		$[95] = t32;
	} else t32 = $[95];
	return t32;
});
TransactionHeader.displayName = "TransactionHeader";
function StatusCell(t0) {
	const $ = (0, import_compiler_runtime.c)(54);
	const { id, focused, selected, status, isChild, isPreview, onEdit, onUpdate } = t0;
	const isClearedField = status === "cleared" || status === "reconciled" || status == null;
	let T0;
	let T1;
	let t1;
	let t10;
	let t11;
	let t2;
	let t3;
	let t4;
	let t5;
	let t6;
	let t7;
	let t8;
	let t9;
	if ($[0] !== focused || $[1] !== id || $[2] !== isChild || $[3] !== isClearedField || $[4] !== isPreview || $[5] !== onEdit || $[6] !== onUpdate || $[7] !== selected || $[8] !== status) {
		const statusProps = getStatusProps(status);
		const statusColor = status === "cleared" ? theme.noticeTextLight : status === "reconciled" ? theme.noticeTextLight : status === "missed" ? theme.errorText : status === "due" ? theme.warningText : selected ? theme.pageTextLinkLight : theme.pageTextSubdued;
		let t12;
		if ($[22] !== isClearedField || $[23] !== onUpdate || $[24] !== status) {
			t12 = function onSelect() {
				if (isClearedField) onUpdate("cleared", !(status === "cleared"));
			};
			$[22] = isClearedField;
			$[23] = onUpdate;
			$[24] = status;
			$[25] = t12;
		} else t12 = $[25];
		const onSelect = t12;
		T1 = Cell;
		t6 = "cleared";
		t7 = 38;
		t8 = "center";
		t9 = focused;
		if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
			t10 = { padding: 1 };
			$[26] = t10;
		} else t10 = $[26];
		t11 = true;
		T0 = CellButton;
		let t13;
		if ($[27] !== isPreview) {
			t13 = { ...isPreview ? { boxShadow: "none" } : {
				border: "1px solid " + theme.formInputBorderSelected,
				boxShadow: "0 1px 2px " + theme.formInputBorderSelected
			} };
			$[27] = isPreview;
			$[28] = t13;
		} else t13 = $[28];
		const t14 = isClearedField ? "pointer" : "default";
		let t15;
		if ($[29] !== isChild) {
			t15 = isChild && { visibility: "hidden" };
			$[29] = isChild;
			$[30] = t15;
		} else t15 = $[30];
		if ($[31] !== t13 || $[32] !== t14 || $[33] !== t15) {
			t1 = {
				padding: 3,
				backgroundColor: "transparent",
				border: "1px solid transparent",
				borderRadius: 50,
				":focus": t13,
				cursor: t14,
				...t15
			};
			$[31] = t13;
			$[32] = t14;
			$[33] = t15;
			$[34] = t1;
		} else t1 = $[34];
		t2 = isPreview || isChild;
		if ($[35] !== id || $[36] !== onEdit) {
			t3 = () => onEdit(id, "cleared");
			$[35] = id;
			$[36] = onEdit;
			$[37] = t3;
		} else t3 = $[37];
		t4 = onSelect;
		t5 = (0, import_react.createElement)(statusProps.Icon, { style: {
			width: 13,
			height: 13,
			color: statusColor,
			marginTop: status === "due" ? -1 : 0
		} });
		$[0] = focused;
		$[1] = id;
		$[2] = isChild;
		$[3] = isClearedField;
		$[4] = isPreview;
		$[5] = onEdit;
		$[6] = onUpdate;
		$[7] = selected;
		$[8] = status;
		$[9] = T0;
		$[10] = T1;
		$[11] = t1;
		$[12] = t10;
		$[13] = t11;
		$[14] = t2;
		$[15] = t3;
		$[16] = t4;
		$[17] = t5;
		$[18] = t6;
		$[19] = t7;
		$[20] = t8;
		$[21] = t9;
	} else {
		T0 = $[9];
		T1 = $[10];
		t1 = $[11];
		t10 = $[12];
		t11 = $[13];
		t2 = $[14];
		t3 = $[15];
		t4 = $[16];
		t5 = $[17];
		t6 = $[18];
		t7 = $[19];
		t8 = $[20];
		t9 = $[21];
	}
	let t12;
	if ($[38] !== T0 || $[39] !== t1 || $[40] !== t2 || $[41] !== t3 || $[42] !== t4 || $[43] !== t5) {
		t12 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(T0, {
			style: t1,
			disabled: t2,
			onEdit: t3,
			onSelect: t4,
			children: t5
		});
		$[38] = T0;
		$[39] = t1;
		$[40] = t2;
		$[41] = t3;
		$[42] = t4;
		$[43] = t5;
		$[44] = t12;
	} else t12 = $[44];
	let t13;
	if ($[45] !== T1 || $[46] !== t10 || $[47] !== t11 || $[48] !== t12 || $[49] !== t6 || $[50] !== t7 || $[51] !== t8 || $[52] !== t9) {
		t13 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(T1, {
			name: t6,
			width: t7,
			alignItems: t8,
			focused: t9,
			style: t10,
			plain: t11,
			children: t12
		});
		$[45] = T1;
		$[46] = t10;
		$[47] = t11;
		$[48] = t12;
		$[49] = t6;
		$[50] = t7;
		$[51] = t8;
		$[52] = t9;
		$[53] = t13;
	} else t13 = $[53];
	return t13;
}
function HeaderCell(t0) {
	const $ = (0, import_compiler_runtime.c)(14);
	const { value, id, width, alignItems, marginLeft, marginRight, icon, onClick } = t0;
	let t1;
	if ($[0] !== marginLeft || $[1] !== marginRight) {
		t1 = {
			whiteSpace: "nowrap",
			overflow: "hidden",
			textOverflow: "ellipsis",
			color: theme.tableHeaderText,
			fontWeight: 300,
			marginLeft,
			marginRight
		};
		$[0] = marginLeft;
		$[1] = marginRight;
		$[2] = t1;
	} else t1 = $[2];
	const style = t1;
	let t2;
	if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = {
			borderTopWidth: 0,
			borderBottomWidth: 0
		};
		$[3] = t2;
	} else t2 = $[3];
	let t3;
	if ($[4] !== icon || $[5] !== onClick || $[6] !== style) {
		t3 = (t4) => {
			const { value: cellValue } = t4;
			return onClick ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button, {
				variant: "bare",
				onPress: onClick,
				style,
				children: [
					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(UnexposedCellContent, { value: cellValue }),
					icon === "asc" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgArrowDown, {
						width: 10,
						height: 10,
						style: { marginLeft: 5 }
					}),
					icon === "desc" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgArrowUp, {
						width: 10,
						height: 10,
						style: { marginLeft: 5 }
					})
				]
			}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
				style,
				children: cellValue
			});
		};
		$[4] = icon;
		$[5] = onClick;
		$[6] = style;
		$[7] = t3;
	} else t3 = $[7];
	let t4;
	if ($[8] !== alignItems || $[9] !== id || $[10] !== t3 || $[11] !== value || $[12] !== width) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CustomCell, {
			width,
			name: id,
			alignItems,
			value,
			style: t2,
			unexposedContent: t3
		});
		$[8] = alignItems;
		$[9] = id;
		$[10] = t3;
		$[11] = value;
		$[12] = width;
		$[13] = t4;
	} else t4 = $[13];
	return t4;
}
function PayeeCell(t0) {
	const $ = (0, import_compiler_runtime.c)(22);
	const { id, payee, focused, payees, accounts, transferAccountsByTransaction, valueStyle, transaction, importedPayee, isPreview, onEdit, onUpdate, onCreatePayee, onManagePayees, onNavigateToTransferAccount, onNavigateToSchedule } = t0;
	const isCreatingPayee = (0, import_react.useRef)(false);
	const { t } = useTranslation();
	const dispatch = useDispatch();
	const transferAccount = transferAccountsByTransaction[transaction.id];
	let t1;
	if ($[0] !== transaction) {
		t1 = { transaction };
		$[0] = transaction;
		$[1] = t1;
	} else t1 = $[1];
	const displayPayee = useDisplayPayee(t1);
	let t2;
	if ($[2] !== accounts || $[3] !== dispatch || $[4] !== displayPayee || $[5] !== focused || $[6] !== id || $[7] !== importedPayee || $[8] !== isPreview || $[9] !== onCreatePayee || $[10] !== onEdit || $[11] !== onManagePayees || $[12] !== onNavigateToSchedule || $[13] !== onNavigateToTransferAccount || $[14] !== onUpdate || $[15] !== payee?.id || $[16] !== payees || $[17] !== t || $[18] !== transaction || $[19] !== transferAccount || $[20] !== valueStyle) {
		t2 = transaction.is_parent ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Cell, {
			name: "payee",
			width: "flex",
			focused,
			style: { padding: 0 },
			plain: true,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CellButton, {
				bare: true,
				style: {
					alignSelf: "stretch",
					borderRadius: 4,
					border: "1px solid transparent",
					":hover": isPreview ? {} : { border: "1px solid " + theme.buttonNormalBorder }
				},
				disabled: isPreview,
				onSelect: () => dispatch(pushModal({ modal: {
					name: "payee-autocomplete",
					options: { onSelect: (payeeId) => {
						onUpdate("payee", payeeId);
					} }
				} })),
				children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
					style: {
						flexDirection: "row",
						alignItems: "center",
						alignSelf: "stretch",
						borderRadius: 4,
						flex: 1,
						padding: 4,
						color: theme.pageTextSubdued
					},
					children: [
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PayeeIcons, {
							transaction,
							transferAccount,
							onNavigateToTransferAccount,
							onNavigateToSchedule
						}),
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgSplit, { style: {
							color: "inherit",
							width: 14,
							height: 14,
							marginRight: 5,
							flexShrink: 0
						} }),
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
							style: {
								fontStyle: "italic",
								fontWeight: 300,
								userSelect: "none",
								overflow: "hidden",
								textOverflow: "ellipsis",
								whiteSpace: "nowrap",
								minWidth: 0,
								borderBottom: importedPayee ? `1px dashed ${theme.pageTextSubdued}` : "none"
							},
							children: importedPayee ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tooltip, {
								content: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
									style: { padding: 10 },
									children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
										style: { fontWeight: "bold" },
										children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Imported Payee" })
									}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
										style: { fontWeight: "normal" },
										children: importedPayee
									})]
								}),
								style: {
									...styles.tooltip,
									borderRadius: "0px 5px 5px 0px"
								},
								placement: "bottom",
								triggerProps: { delay: 750 },
								children: displayPayee
							}) : displayPayee
						})
					]
				})
			})
		}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CustomCell, {
			width: "flex",
			name: "payee",
			textAlign: "flex",
			value: payee?.id,
			valueStyle,
			exposed: focused,
			onExpose: (name) => !isPreview && onEdit(id, name),
			onUpdate: async (value) => {
				onUpdate("payee", value);
				if (value && value.startsWith("new:") && !isCreatingPayee.current) {
					isCreatingPayee.current = true;
					onUpdate("payee", await onCreatePayee(value.slice(4)) ?? void 0);
					isCreatingPayee.current = false;
				}
			},
			formatter: () => {
				if (!displayPayee && isPreview) return t("(No payee)");
				return displayPayee;
			},
			unexposedContent: (props) => {
				const payeeName = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UnexposedCellContent, {
					...props,
					style: importedPayee ? { borderBottom: `1px dashed ${theme.pageTextSubdued}` } : {}
				});
				return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PayeeIcons, {
					transaction,
					transferAccount,
					onNavigateToTransferAccount,
					onNavigateToSchedule
				}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
					style: {
						overflow: "hidden",
						textOverflow: "ellipsis",
						display: "flex",
						alignItems: "center"
					},
					children: importedPayee ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tooltip, {
						content: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
							style: { padding: 10 },
							children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
								style: { fontWeight: "bold" },
								children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Imported Payee" })
							}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
								style: { fontWeight: "normal" },
								children: importedPayee
							})]
						}),
						style: {
							...styles.tooltip,
							borderRadius: "0px 5px 5px 0px"
						},
						placement: "bottom",
						triggerProps: { delay: 750 },
						children: payeeName
					}) : payeeName
				})] });
			},
			children: (t3) => {
				const { onBlur, onKeyDown, onUpdate: onUpdate_0, onSave, shouldSaveFromKey, inputStyle } = t3;
				return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PayeeAutocomplete, {
					payees,
					accounts,
					value: payee?.id ?? null,
					shouldSaveFromKey,
					inputProps: {
						onBlur,
						onKeyDown,
						style: inputStyle
					},
					showManagePayees: true,
					clearOnBlur: false,
					focused: true,
					onUpdate: (_, value_0) => onUpdate_0?.(value_0),
					onSelect: onSave,
					onManagePayees: () => onManagePayees(payee?.id)
				});
			}
		});
		$[2] = accounts;
		$[3] = dispatch;
		$[4] = displayPayee;
		$[5] = focused;
		$[6] = id;
		$[7] = importedPayee;
		$[8] = isPreview;
		$[9] = onCreatePayee;
		$[10] = onEdit;
		$[11] = onManagePayees;
		$[12] = onNavigateToSchedule;
		$[13] = onNavigateToTransferAccount;
		$[14] = onUpdate;
		$[15] = payee?.id;
		$[16] = payees;
		$[17] = t;
		$[18] = transaction;
		$[19] = transferAccount;
		$[20] = valueStyle;
		$[21] = t2;
	} else t2 = $[21];
	return t2;
}
var payeeIconButtonStyle = {
	marginLeft: -5,
	marginRight: 2,
	width: 23,
	height: 23,
	color: "inherit"
};
var scheduleIconStyle = {
	width: 13,
	height: 13
};
var transferIconStyle = {
	width: 10,
	height: 10
};
function PayeeIcons(t0) {
	const $ = (0, import_compiler_runtime.c)(20);
	const { transaction, transferAccount, onNavigateToTransferAccount, onNavigateToSchedule } = t0;
	const { t } = useTranslation();
	const scheduleId = transaction.schedule;
	const { isLoading, schedules: t1 } = useCachedSchedules();
	let t2;
	if ($[0] !== t1) {
		t2 = t1 === void 0 ? [] : t1;
		$[0] = t1;
		$[1] = t2;
	} else t2 = $[1];
	const schedules = t2;
	if (isLoading) return null;
	let t3;
	if ($[2] !== scheduleId || $[3] !== schedules) {
		t3 = scheduleId ? schedules.find((s) => s.id === scheduleId) : null;
		$[2] = scheduleId;
		$[3] = schedules;
		$[4] = t3;
	} else t3 = $[4];
	const schedule = t3;
	if (schedule == null && transferAccount == null) return null;
	const recurring = schedule && schedule._date && typeof schedule._date === "object" && !!schedule._date.frequency;
	const isDeposit = transaction.amount > 0;
	let t4;
	if ($[5] !== onNavigateToSchedule || $[6] !== recurring || $[7] !== schedule || $[8] !== scheduleId || $[9] !== t) {
		t4 = schedule && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
			variant: "bare",
			"data-testid": "schedule-icon",
			"aria-label": t("See schedule details"),
			style: payeeIconButtonStyle,
			onPress: () => {
				if (scheduleId) onNavigateToSchedule(scheduleId);
			},
			children: recurring ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgArrowsSynchronize, { style: scheduleIconStyle }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgCalendar3, { style: scheduleIconStyle })
		});
		$[5] = onNavigateToSchedule;
		$[6] = recurring;
		$[7] = schedule;
		$[8] = scheduleId;
		$[9] = t;
		$[10] = t4;
	} else t4 = $[10];
	let t5;
	if ($[11] !== isDeposit || $[12] !== onNavigateToTransferAccount || $[13] !== t || $[14] !== transaction.id || $[15] !== transferAccount) {
		t5 = transferAccount && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
			variant: "bare",
			"data-testid": "transfer-icon",
			"aria-label": t("See transfer account"),
			style: payeeIconButtonStyle,
			onPress: () => {
				if (!isTemporaryId(transaction.id)) onNavigateToTransferAccount(transferAccount.id);
			},
			children: isDeposit ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgLeftArrow2, { style: transferIconStyle }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgRightArrow2, { style: transferIconStyle })
		});
		$[11] = isDeposit;
		$[12] = onNavigateToTransferAccount;
		$[13] = t;
		$[14] = transaction.id;
		$[15] = transferAccount;
		$[16] = t5;
	} else t5 = $[16];
	let t6;
	if ($[17] !== t4 || $[18] !== t5) {
		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [t4, t5] });
		$[17] = t4;
		$[18] = t5;
		$[19] = t6;
	} else t6 = $[19];
	return t6;
}
var Transaction = (0, import_react.memo)(function Transaction({ allTransactions, transaction: originalTransaction, subtransactions, transferAccountsByTransaction, editing, showAccount, showBalance, showCleared, showZeroInDeposit, style, selected, highlighted, added, matched, expanded, focusedField, categoryGroups, payees, accounts, balance, dateFormat = "MM/dd/yyyy", hideFraction, onSave, onEdit, onDelete, onBatchDelete, onBatchDuplicate, onBatchLinkSchedule, onBatchUnlinkSchedule, onCreateRule, onScheduleAction, onMakeAsNonSplitTransactions, onSplit, onManagePayees, onCreatePayee, onToggleSplit, onNavigateToTransferAccount, onNavigateToSchedule, onNotesTagClick, splitError, listContainerRef, showSelection, allowSplitTransaction, showHiddenCategories, canDrag = false, draggedDate, draggedId, draggedParentId, siblingCount = 0, prevRowDate, nextRowDate, sortField, ascDesc, onDragChange, onDrop, index }) {
	const { t } = useTranslation();
	const dispatch = useDispatch();
	const dispatchSelected = useSelectedDispatch();
	const triggerRef = (0, import_react.useRef)(null);
	const [prevShowZero, setPrevShowZero] = (0, import_react.useState)(showZeroInDeposit);
	const [prevTransaction, setPrevTransaction] = (0, import_react.useState)(originalTransaction);
	const [transaction, setTransaction] = (0, import_react.useState)(() => serializeTransaction$1(originalTransaction, showZeroInDeposit));
	const isPreview = isPreviewId(transaction.id);
	if (originalTransaction !== prevTransaction || showZeroInDeposit !== prevShowZero) {
		setTransaction(serializeTransaction$1(originalTransaction, showZeroInDeposit));
		setPrevTransaction(originalTransaction);
		setPrevShowZero(showZeroInDeposit);
	}
	const [showReconciliationWarning, setShowReconciliationWarning] = (0, import_react.useState)(false);
	const onUpdate = async (name, value) => {
		if (transaction[name] !== value) {
			const isReconciledField = name === "credit" || name === "debit" || name === "payee" || name === "account" || name === "date";
			if (transaction.reconciled === true && isReconciledField) {
				if (showReconciliationWarning === false) {
					setShowReconciliationWarning(true);
					dispatch(pushModal({ modal: {
						name: "confirm-transaction-edit",
						options: {
							onCancel: () => {
								setShowReconciliationWarning(false);
							},
							onConfirm: () => {
								setShowReconciliationWarning(false);
								onUpdateAfterConfirm(name, value);
							},
							confirmReason: "editReconciled"
						}
					} }));
				}
			} else if (isReconciledField && transaction.transfer_id && showReconciliationWarning === false) {
				const { data } = await aqlQuery(q$1("transactions").filter({
					id: transaction.transfer_id,
					reconciled: true
				}).select("id"));
				if (data.length > 0) {
					setShowReconciliationWarning(true);
					dispatch(pushModal({ modal: {
						name: "confirm-transaction-edit",
						options: {
							onCancel: () => {
								setShowReconciliationWarning(false);
							},
							onConfirm: () => {
								setShowReconciliationWarning(false);
								onUpdateAfterConfirm(name, value);
							},
							confirmReason: "batchEditWithReconciledTransfer"
						}
					} }));
				} else onUpdateAfterConfirm(name, value);
			} else onUpdateAfterConfirm(name, value);
		}
		if (name === "cleared" && transaction.reconciled) dispatch(pushModal({ modal: {
			name: "confirm-transaction-edit",
			options: {
				onConfirm: () => {
					onUpdateAfterConfirm("reconciled", false);
				},
				confirmReason: "unlockReconciled"
			}
		} }));
	};
	const onUpdateAfterConfirm = (name_0, value_0) => {
		const newTransaction = {
			...transaction,
			[name_0]: value_0
		};
		if (name_0 === "notes" && value_0 === "" && transaction.notes == null) return;
		if (name_0 === "account" && value_0 && typeof value_0 === "string" && getAccountsById(accounts)[value_0].offbudget) newTransaction.category = void 0;
		if (name_0 === "credit") newTransaction["debit"] = "";
		else if (name_0 === "debit") newTransaction["credit"] = "";
		else {
			newTransaction["debit"] = "";
			newTransaction["credit"] = "";
		}
		if (name_0 === "account" && transaction.account !== value_0) newTransaction.reconciled = false;
		if (name_0 === "payee" && value_0 && value_0?.startsWith("new:")) setTransaction(newTransaction);
		else {
			const deserialized = deserializeTransaction(newTransaction, originalTransaction);
			setTransaction(serializeTransaction$1(deserialized, showZeroInDeposit));
			onSave(deserialized, subtransactions, ["credit", "debit"].includes(name_0) ? "amount" : name_0);
		}
	};
	const { id, amount, debit, credit, payee: payeeId, imported_payee: importedPayee, notes, date, account: accountId, category: categoryId, cleared, reconciled, forceUpcoming, is_parent: isParent, _unmatched = false } = transaction;
	const { schedules = [] } = useCachedSchedules();
	const schedule = transaction.schedule ? schedules.find((s) => s.id === transaction.schedule) : null;
	const previewStatus = forceUpcoming ? "upcoming" : categoryId;
	const payee = payees && payeeId && getPayeesById(payees)[payeeId] || void 0;
	const account = accounts && accountId && getAccountsById(accounts)[accountId];
	const isChild = transaction.is_child;
	const transferAcct = isTemporaryId(id) && payee?.transfer_acct ? getAccountsById(accounts)[payee.transfer_acct] : transferAccountsByTransaction[id];
	const isBudgetTransfer = transferAcct && transferAcct.offbudget === 0;
	const isOffBudget = account && account.offbudget === 1;
	const valueStyle = added ? { fontWeight: 600 } : null;
	const backgroundFocus = focusedField === "select";
	const amountStyle = hideFraction ? { letterSpacing: -.5 } : null;
	const runningBalance = !isTemporaryId(id) ? balance : balance + amount;
	(0, import_react.useEffect)(() => {
		if (!splitError) return;
		const id_0 = setTimeout(() => {
			window.dispatchEvent(new Event("resize"));
		}, 1);
		return () => clearTimeout(id_0);
	}, [splitError, allTransactions]);
	const { setMenuOpen, menuOpen, handleContextMenu, position } = useContextMenu();
	const isChildTransaction = transaction.is_child;
	const parentId = transaction.parent_id;
	const isOnlyTransactionOnDate = isChildTransaction ? siblingCount <= 1 : prevRowDate !== transaction.date && nextRowDate !== transaction.date;
	const previewRef = (0, import_react.useRef)(null);
	const { dragRef, dragProps } = useDrag({
		item: originalTransaction,
		type: "transaction",
		canDrag: canDrag && !isPreview && !isOnlyTransactionOnDate && (!editing || focusedField === "select" || focusedField === "cleared"),
		onDragChange,
		preview: previewRef
	});
	const safeOnDrop = isPreview ? void 0 : isChildTransaction ? isChildTransaction && draggedParentId === parentId ? onDrop : void 0 : onDrop;
	const { dropRef, dropProps, dropPos } = useDrop({
		types: "transaction",
		id: transaction.id,
		onDrop: safeOnDrop
	});
	const rowRef = useMergedRefs(triggerRef, dragRef);
	const isValidDropTarget = (0, import_react.useMemo)(() => {
		if (isPreview) return false;
		if (draggedParentId) {
			if (!isChildTransaction || draggedParentId !== parentId) return false;
			return dropPos != null;
		}
		if (isChildTransaction) return false;
		if (!draggedDate) return false;
		if (sortField && sortField !== "date") return false;
		if (isParent && dropPos === "after") return false;
		if (transaction.date === draggedDate) return true;
		if (!dropPos) return false;
		const isAscending = sortField === "date" && ascDesc === "asc";
		const neighborDate = dropPos === "before" ? prevRowDate : nextRowDate;
		return isValidBoundaryDrop(dropPos, transaction.date, draggedDate, neighborDate ?? null, isAscending);
	}, [
		draggedDate,
		draggedParentId,
		parentId,
		isChildTransaction,
		isPreview,
		sortField,
		isParent,
		dropPos,
		transaction.date,
		ascDesc,
		prevRowDate,
		nextRowDate
	]);
	const isBeingDragged = draggedId != null && (draggedId === transaction.id || draggedId === transaction.parent_id);
	const showDropHighlight = Boolean(dropPos && isValidDropTarget && !isBeingDragged);
	return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
		innerRef: dropRef,
		...dropProps,
		style: { position: "relative" },
		children: [
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropHighlight, { pos: showDropHighlight ? dropPos : null }),
			/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Row, {
				ref: rowRef,
				...dragProps,
				style: {
					backgroundColor: selected ? theme.tableRowBackgroundHighlight : backgroundFocus ? theme.tableRowBackgroundHover : index % 2 === 0 ? theme.tableBackground : theme.tableRowBackgroundAlternate,
					":hover": !(backgroundFocus || selected) && { backgroundColor: theme.tableRowBackgroundHover },
					"& .hover-visible": { opacity: 0 },
					":hover .hover-visible": { opacity: 1 },
					...highlighted || selected ? { color: theme.tableRowBackgroundHighlightText } : { color: theme.tableText },
					...style,
					...isPreview && {
						color: theme.tableTextInactive,
						fontStyle: "italic"
					},
					..._unmatched && { opacity: .5 },
					...isBeingDragged && { opacity: .5 }
				},
				onContextMenu: handleContextMenu,
				children: [
					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Popover, {
						triggerRef,
						placement: "bottom start",
						isOpen: menuOpen,
						onOpenChange: (isOpen) => {
							if (!isOpen) setMenuOpen(false);
						},
						...position,
						style: {
							width: 200,
							margin: 1
						},
						isNonModal: false,
						children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TransactionMenu, {
							transaction,
							getTransaction: (id_1) => allTransactions?.find((t_0) => t_0.id === id_1),
							onDelete: (ids) => onBatchDelete?.(ids),
							onDuplicate: (ids_0) => onBatchDuplicate?.(ids_0),
							onLinkSchedule: (ids_1) => onBatchLinkSchedule?.(ids_1),
							onUnlinkSchedule: (ids_2) => onBatchUnlinkSchedule?.(ids_2),
							onCreateRule: (ids_3) => onCreateRule?.(ids_3),
							onScheduleAction: (name_1, ids_4) => onScheduleAction?.(name_1, ids_4),
							onMakeAsNonSplitTransactions: (ids_5) => onMakeAsNonSplitTransactions?.(ids_5),
							closeMenu: () => setMenuOpen(false)
						})
					}),
					splitError && listContainerRef?.current && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Popover, {
						triggerRef,
						isOpen: true,
						isNonModal: true,
						style: {
							width: "max-content",
							maxWidth: "none",
							minWidth: 375,
							padding: 5
						},
						shouldFlip: false,
						placement: "bottom end",
						UNSTABLE_portalContainer: listContainerRef.current,
						children: splitError
					}),
					isChild && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Field, {
						width: 110,
						style: {
							width: 110,
							backgroundColor: theme.tableRowBackgroundHover,
							border: 0
						}
					}),
					isChild && showAccount && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Field, { style: {
						flex: 1,
						backgroundColor: theme.tableRowBackgroundHover,
						border: 0
					} }),
					isTemporaryId(transaction.id) ? isChild ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DeleteCell, {
						onDelete: () => onDelete && onDelete(transaction.id),
						exposed: editing,
						style: {
							...isChild && { borderLeftWidth: 1 },
							lineHeight: 0
						}
					}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Cell, { width: 20 }) : isPreview && isChild || !showSelection ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Cell, { width: 20 }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectCell, {
						exposed: true,
						buttonProps: { className: selected || editing ? void 0 : "hover-visible" },
						focused: focusedField === "select",
						onSelect: (e) => {
							dispatchSelected({
								type: "select",
								id: transaction.id,
								isRangeSelect: e.shiftKey
							});
						},
						onEdit: () => onEdit(id, "select"),
						selected,
						style: { ...isChild && { borderLeftWidth: 1 } },
						value: matched ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgHyperlink2, { style: {
							width: 13,
							height: 13,
							color: "inherit"
						} }) : void 0
					}),
					!isChild && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CustomCell, {
						name: "date",
						width: 110,
						textAlign: "flex",
						exposed: focusedField === "date",
						value: date,
						valueStyle,
						formatter: (date_0) => date_0 ? format$4(parseISO(date_0), dateFormat) : "",
						onExpose: (name_2) => !isPreview && onEdit(id, name_2),
						onUpdate: (value_1) => {
							onUpdate("date", value_1);
						},
						children: ({ onBlur, onKeyDown, onUpdate: onUpdate_0, onSave: onSave_0, shouldSaveFromKey, inputStyle }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DateSelect, {
							value: date || "",
							dateFormat,
							inputProps: {
								onBlur,
								onKeyDown,
								style: inputStyle
							},
							shouldSaveFromKey,
							clearOnBlur: true,
							onUpdate: onUpdate_0,
							onSelect: onSave_0
						})
					}),
					!isChild && showAccount && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CustomCell, {
						name: "account",
						width: "flex",
						textAlign: "flex",
						value: accountId,
						formatter: (acctId) => {
							const acct = acctId && getAccountsById(accounts)[acctId];
							if (acct) return acct.name;
							return "";
						},
						valueStyle,
						exposed: focusedField === "account",
						onExpose: (name_3) => !isPreview && onEdit(id, name_3),
						onUpdate: async (value_2) => {
							if (value_2) onUpdate("account", value_2);
						},
						children: ({ onBlur: onBlur_0, onKeyDown: onKeyDown_0, onUpdate: onUpdate_1, onSave: onSave_1, shouldSaveFromKey: shouldSaveFromKey_0, inputStyle: inputStyle_0 }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccountAutocomplete, {
							includeClosedAccounts: false,
							value: accountId,
							shouldSaveFromKey: shouldSaveFromKey_0,
							clearOnBlur: false,
							focused: true,
							inputProps: {
								onBlur: onBlur_0,
								onKeyDown: onKeyDown_0,
								style: inputStyle_0
							},
							onUpdate: onUpdate_1,
							onSelect: onSave_1
						})
					}),
					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PayeeCell, {
						id,
						payee,
						focused: focusedField === "payee",
						accounts: accounts.filter((account_0) => account_0.id !== accountId),
						payees: payees.filter((payee_0) => !payee_0.transfer_acct || payee_0.transfer_acct !== accountId),
						valueStyle,
						transaction,
						transferAccountsByTransaction,
						importedPayee,
						isPreview,
						onEdit,
						onUpdate,
						onCreatePayee,
						onManagePayees,
						onNavigateToTransferAccount,
						onNavigateToSchedule
					}),
					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(NotesCell, {
						note: notes ?? "",
						scheduleNote: isPreview ? schedule?.name : null,
						focused: focusedField === "notes",
						onClickTag: onNotesTagClick,
						onUpdate: (value_3) => {
							onUpdate("notes", value_3?.trim());
						},
						onExpose: (name_4) => !isPreview && onEdit(id, name_4)
					}),
					isPreview && !isChild || isParent ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Cell, {
						name: "category",
						width: "flex",
						focused: focusedField === "category",
						style: {
							padding: 0,
							flexDirection: "row",
							alignItems: "center",
							justifyContent: "flex-start",
							height: "100%"
						},
						plain: true,
						children: [isPreview && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
							style: {
								color: previewStatus === "missed" ? theme.errorText : previewStatus === "due" ? theme.warningText : selected ? theme.formLabelText : theme.upcomingText,
								backgroundColor: previewStatus === "missed" ? theme.errorBackground : previewStatus === "due" ? theme.warningBackground : selected ? theme.formLabelBackground : theme.upcomingBackground,
								margin: "0 5px",
								padding: "3px 7px",
								borderRadius: 4,
								overflow: "hidden",
								textOverflow: "ellipsis",
								display: "inline-block",
								whiteSpace: "nowrap"
							},
							children: titleFirst(getStatusLabel(previewStatus ?? ""))
						}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CellButton, {
							bare: true,
							style: {
								borderRadius: 4,
								border: "1px solid transparent",
								":hover": { border: "1px solid " + theme.buttonNormalBorder }
							},
							disabled: isTemporaryId(transaction.id),
							onEdit: () => !isPreview && onEdit(id, "category"),
							onSelect: () => onToggleSplit(id),
							children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
								style: {
									flexDirection: "row",
									alignItems: "center",
									alignSelf: "stretch",
									borderRadius: 4,
									flex: 1,
									padding: 4,
									color: theme.pageTextSubdued
								},
								children: [isParent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgCheveronDown, { style: {
									color: "inherit",
									width: 14,
									height: 14,
									transition: "transform .08s",
									transform: expanded ? "rotateZ(0)" : "rotateZ(-90deg)"
								} }), !isPreview && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
									style: {
										fontStyle: "italic",
										fontWeight: 300,
										userSelect: "none"
									},
									children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Split" })
								})]
							})
						})]
					}) : isBudgetTransfer || isOffBudget ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputCell, {
						name: "category",
						width: "flex",
						exposed: focusedField === "category",
						focused: focusedField === "category",
						onExpose: (name_5) => onEdit(id, name_5),
						value: isOffBudget ? t("Off budget") : isBudgetTransfer ? categoryId != null ? t("Needs Repair") : t("Transfer") : "",
						valueStyle,
						style: {
							fontStyle: "italic",
							color: theme.pageTextSubdued,
							fontWeight: 300
						},
						inputProps: {
							readOnly: true,
							style: { fontStyle: "italic" }
						}
					}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CustomCell, {
						name: "category",
						width: "flex",
						textAlign: "flex",
						value: categoryId,
						formatter: (value_4) => value_4 ? getCategoriesById(categoryGroups)[value_4]?.name ?? "" : transaction.id ? t("Categorize") : "",
						exposed: focusedField === "category",
						onExpose: (name_6) => !isPreview && onEdit(id, name_6),
						valueStyle: !categoryId ? {
							fontStyle: "italic",
							fontWeight: 300,
							color: theme.formInputTextHighlight
						} : valueStyle,
						onUpdate: async (value_5) => {
							if (value_5 === "split") onSplit(transaction.id);
							else onUpdate("category", value_5);
						},
						children: ({ onBlur: onBlur_1, onKeyDown: onKeyDown_1, onUpdate: onUpdate_2, onSave: onSave_2, shouldSaveFromKey: shouldSaveFromKey_1, inputStyle: inputStyle_1 }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetNameProvider, {
							name: sheetForMonth(monthFromDate(transaction.date)),
							children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CategoryAutocomplete, {
								categoryGroups,
								value: categoryId ?? null,
								focused: true,
								clearOnBlur: false,
								showSplitOption: !isChild && !isParent && allowSplitTransaction,
								shouldSaveFromKey: shouldSaveFromKey_1,
								inputProps: {
									onBlur: onBlur_1,
									onKeyDown: onKeyDown_1,
									style: inputStyle_1
								},
								onUpdate: onUpdate_2,
								onSelect: onSave_2,
								showHiddenCategories
							})
						})
					}),
					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputCell, {
						type: "input",
						width: 100,
						name: "debit",
						exposed: focusedField === "debit",
						focused: focusedField === "debit",
						value: debit === "" && credit === "" ? amountToCurrency(0) : debit,
						formatter: (value_6) => value_6 ? amountToCurrency(currencyToAmount(value_6) || 0) : "",
						valueStyle,
						textAlign: "right",
						title: debit,
						onExpose: (name_7) => !isPreview && onEdit(id, name_7),
						style: {
							...isParent && { fontStyle: "italic" },
							...styles.tnum,
							...amountStyle
						},
						inputProps: {
							value: debit === "" && credit === "" ? amountToCurrency(0) : debit,
							onUpdate: onUpdate.bind(null, "debit"),
							"data-1p-ignore": true
						},
						privacyFilter: { activationFilters: [!isTemporaryId(transaction.id)] }
					}),
					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputCell, {
						type: "input",
						width: 100,
						name: "credit",
						exposed: focusedField === "credit",
						focused: focusedField === "credit",
						value: credit,
						formatter: (value_7) => value_7 ? amountToCurrency(currencyToAmount(value_7) || 0) : "",
						valueStyle,
						textAlign: "right",
						title: credit,
						onExpose: (name_8) => !isPreview && onEdit(id, name_8),
						style: {
							...isParent && { fontStyle: "italic" },
							...styles.tnum,
							...amountStyle
						},
						inputProps: {
							value: credit,
							onUpdate: onUpdate.bind(null, "credit"),
							"data-1p-ignore": true
						},
						privacyFilter: { activationFilters: [!isTemporaryId(transaction.id)] }
					}),
					showBalance && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Cell, {
						name: "balance",
						value: runningBalance == null || isChild || isTemporaryId(id) ? "" : integerToCurrency(runningBalance),
						valueStyle: { color: runningBalance < 0 ? theme.numberNegative : theme.numberPositive },
						style: {
							...styles.tnum,
							...amountStyle
						},
						width: 103,
						textAlign: "right",
						privacyFilter: true
					}),
					showCleared && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusCell, {
						id,
						focused: focusedField === "cleared",
						selected,
						isPreview,
						status: isPreview ? previewStatus : reconciled ? "reconciled" : cleared ? "cleared" : null,
						isChild,
						onEdit,
						onUpdate
					}),
					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Cell, { width: 5 })
				]
			}),
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)($ad0e3f3d9c50e4ba$export$905ab40ac2179daa, {
				ref: previewRef,
				children: () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
					style: {
						backgroundColor: theme.tableBackground,
						borderRadius: 4,
						padding: "8px 16px",
						boxShadow: "0 2px 8px rgba(0, 0, 0, 0.3)",
						width: "50vw",
						minWidth: 500,
						flexDirection: "row",
						alignItems: "center",
						border: "1px solid " + theme.tableBorder,
						opacity: .8
					},
					children: [
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
							style: {
								color: theme.tableText,
								width: "10%"
							},
							children: date ? format$4(parseISO(date), dateFormat) : ""
						}),
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
							style: {
								fontWeight: 500,
								color: theme.tableText,
								width: "50%",
								paddingLeft: 16,
								overflow: "hidden",
								textOverflow: "ellipsis",
								whiteSpace: "nowrap"
							},
							children: payee?.name || importedPayee || /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "No payee" })
						}),
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
							style: {
								color: isParent ? theme.tableTextSubdued : theme.tableText,
								fontStyle: isParent ? "italic" : void 0,
								width: "30%",
								paddingLeft: 16,
								overflow: "hidden",
								textOverflow: "ellipsis",
								whiteSpace: "nowrap"
							},
							children: isParent ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Trans, { children: [
								"Split (",
								{ count: subtransactions?.length ?? 0 },
								")"
							] }) : categoryId ? getCategoriesById(categoryGroups)[categoryId]?.name ?? "" : ""
						}),
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
							style: {
								color: theme.tableText,
								width: "10%",
								paddingLeft: 16,
								textAlign: "right"
							},
							children: integerToCurrency(amount)
						})
					]
				})
			})
		]
	});
});
function NotesCell(t0) {
	const $ = (0, import_compiler_runtime.c)(22);
	const { note, scheduleNote, focused, onUpdate, onClickTag, onExpose } = t0;
	const [inputValue, setInputValue] = (0, import_react.useState)(note);
	let t1;
	let t2;
	if ($[0] !== note) {
		t1 = () => {
			setInputValue(note);
		};
		t2 = [note, setInputValue];
		$[0] = note;
		$[1] = t1;
		$[2] = t2;
	} else {
		t1 = $[1];
		t2 = $[2];
	}
	(0, import_react.useEffect)(t1, t2);
	let t3;
	if ($[3] !== inputValue || $[4] !== note || $[5] !== onUpdate) {
		t3 = function onKeyDown(e) {
			if (e.key === "Enter" || e.key === "Tab") onUpdate(inputValue);
			else if (e.key === "Escape") setInputValue(note);
		};
		$[3] = inputValue;
		$[4] = note;
		$[5] = onUpdate;
		$[6] = t3;
	} else t3 = $[6];
	const onKeyDown = t3;
	const displayedNote = note || scheduleNote || "";
	let t4;
	if ($[7] !== onClickTag) {
		t4 = (value) => NotesTagFormatter({
			notes: value,
			onNotesTagClick: onClickTag
		});
		$[7] = onClickTag;
		$[8] = t4;
	} else t4 = $[8];
	let t5;
	let t6;
	if ($[9] !== inputValue || $[10] !== onUpdate) {
		t5 = () => onUpdate(inputValue);
		t6 = (t7) => {
			const { inputStyle, onKeyDown: onKeyDown_0, onBlur } = t7;
			return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TagAutocomplete, {
				inputValue,
				setInputValue,
				inputStyle,
				onBlur,
				onKeyDown: onKeyDown_0,
				onUpdate
			});
		};
		$[9] = inputValue;
		$[10] = onUpdate;
		$[11] = t5;
		$[12] = t6;
	} else {
		t5 = $[11];
		t6 = $[12];
	}
	let t7;
	if ($[13] !== displayedNote || $[14] !== focused || $[15] !== onExpose || $[16] !== onKeyDown || $[17] !== onUpdate || $[18] !== t4 || $[19] !== t5 || $[20] !== t6) {
		t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CustomCell, {
			width: "flex",
			name: "notes",
			value: displayedNote,
			formatter: t4,
			focused,
			exposed: focused,
			onExpose,
			onUpdate,
			onKeyDown,
			onBlur: t5,
			children: t6
		});
		$[13] = displayedNote;
		$[14] = focused;
		$[15] = onExpose;
		$[16] = onKeyDown;
		$[17] = onUpdate;
		$[18] = t4;
		$[19] = t5;
		$[20] = t6;
		$[21] = t7;
	} else t7 = $[21];
	return t7;
}
function TransactionError(t0) {
	const $ = (0, import_compiler_runtime.c)(22);
	const { error, isDeposit, onAddSplit, onDistributeRemainder, style } = t0;
	bb0: switch (error.type) {
		case "SplitTransactionError":
			if (error.version === 1) {
				let t1;
				if ($[0] !== style) {
					t1 = {
						flexDirection: "row",
						alignItems: "center",
						padding: "0 5px",
						gap: 5,
						...style
					};
					$[0] = style;
					$[1] = t1;
				} else t1 = $[1];
				let t2;
				let t3;
				if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
					t2 = { whiteSpace: "nowrap" };
					t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Amount left:" });
					$[2] = t2;
					$[3] = t3;
				} else {
					t2 = $[2];
					t3 = $[3];
				}
				let t4;
				if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
					t4 = { fontWeight: 500 };
					$[4] = t4;
				} else t4 = $[4];
				const t5 = isDeposit ? error.difference : -error.difference;
				let t6;
				if ($[5] !== t5) {
					t6 = integerToCurrency(t5);
					$[5] = t5;
					$[6] = t6;
				} else t6 = $[6];
				let t7;
				if ($[7] !== t6) {
					t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
						style: t2,
						children: [
							t3,
							" ",
							/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
								style: t4,
								children: t6
							})
						]
					});
					$[7] = t6;
					$[8] = t7;
				} else t7 = $[8];
				let t8;
				if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
					t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, { style: { flex: 1 } });
					$[9] = t8;
				} else t8 = $[9];
				let t9;
				if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
					t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Distribute" });
					$[10] = t9;
				} else t9 = $[10];
				let t10;
				if ($[11] !== onDistributeRemainder) {
					t10 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
						variant: "normal",
						onPress: onDistributeRemainder,
						"data-testid": "distribute-split-button",
						children: t9
					});
					$[11] = onDistributeRemainder;
					$[12] = t10;
				} else t10 = $[12];
				let t11;
				if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
					t11 = { padding: "4px 10px" };
					$[13] = t11;
				} else t11 = $[13];
				let t12;
				if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
					t12 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Add Split" });
					$[14] = t12;
				} else t12 = $[14];
				let t13;
				if ($[15] !== onAddSplit) {
					t13 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
						variant: "primary",
						style: t11,
						onPress: onAddSplit,
						"data-testid": "add-split-button",
						children: t12
					});
					$[15] = onAddSplit;
					$[16] = t13;
				} else t13 = $[16];
				let t14;
				if ($[17] !== t1 || $[18] !== t10 || $[19] !== t13 || $[20] !== t7) {
					t14 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
						style: t1,
						"data-testid": "transaction-error",
						children: [
							t7,
							t8,
							t10,
							t13
						]
					});
					$[17] = t1;
					$[18] = t10;
					$[19] = t13;
					$[20] = t7;
					$[21] = t14;
				} else t14 = $[21];
				return t14;
			}
			break bb0;
		default: return null;
	}
}
function NewTransaction(t0) {
	const $ = (0, import_compiler_runtime.c)(84);
	const { transactions, accounts, categoryGroups, payees, transferAccountsByTransaction, editingTransaction, focusedField, showAccount, showBalance, showCleared, dateFormat, hideFraction, onClose, onSplit, onToggleSplit, onEdit, onDelete, onSave, onAdd, onAddAndClose, onAddSplit, onDistributeRemainder, onManagePayees, onCreatePayee, onNavigateToTransferAccount, onNavigateToSchedule, onNotesTagClick, balance, showHiddenCategories } = t0;
	const error = transactions[0].error;
	const isDeposit = transactions[0].amount > 0;
	let t1;
	if ($[0] !== transactions) {
		let t2;
		if ($[2] !== transactions[0].id) {
			t2 = (t) => t.parent_id === transactions[0].id;
			$[2] = transactions[0].id;
			$[3] = t2;
		} else t2 = $[3];
		t1 = transactions.filter(t2);
		$[0] = transactions;
		$[1] = t1;
	} else t1 = $[1];
	const childTransactions = t1;
	const addButtonRef = (0, import_react.useRef)(null);
	useProperFocus(addButtonRef, focusedField === "add");
	const cancelButtonRef = (0, import_react.useRef)(null);
	useProperFocus(cancelButtonRef, focusedField === "cancel");
	let t2;
	if ($[4] !== onAdd || $[5] !== onAddAndClose) {
		t2 = (e) => {
			if (e.ctrlKey || e.metaKey) onAddAndClose();
			else onAdd();
		};
		$[4] = onAdd;
		$[5] = onAddAndClose;
		$[6] = t2;
	} else t2 = $[6];
	const handleAddClick = t2;
	let t3;
	if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
		t3 = {
			borderBottom: "1px solid " + theme.tableBorderHover,
			paddingBottom: 6,
			backgroundColor: theme.tableBackground
		};
		$[7] = t3;
	} else t3 = $[7];
	let t4;
	if ($[8] !== onClose) {
		t4 = (e_0) => {
			if (e_0.key === "Escape") onClose();
		};
		$[8] = onClose;
		$[9] = t4;
	} else t4 = $[9];
	let t5;
	if ($[10] !== accounts || $[11] !== balance || $[12] !== categoryGroups || $[13] !== childTransactions || $[14] !== dateFormat || $[15] !== editingTransaction || $[16] !== focusedField || $[17] !== hideFraction || $[18] !== isDeposit || $[19] !== onCreatePayee || $[20] !== onDelete || $[21] !== onEdit || $[22] !== onManagePayees || $[23] !== onNavigateToSchedule || $[24] !== onNavigateToTransferAccount || $[25] !== onNotesTagClick || $[26] !== onSave || $[27] !== onSplit || $[28] !== onToggleSplit || $[29] !== payees || $[30] !== showAccount || $[31] !== showBalance || $[32] !== showCleared || $[33] !== showHiddenCategories || $[34] !== transactions || $[35] !== transferAccountsByTransaction) {
		let t6;
		if ($[37] !== accounts || $[38] !== balance || $[39] !== categoryGroups || $[40] !== childTransactions || $[41] !== dateFormat || $[42] !== editingTransaction || $[43] !== focusedField || $[44] !== hideFraction || $[45] !== isDeposit || $[46] !== onCreatePayee || $[47] !== onDelete || $[48] !== onEdit || $[49] !== onManagePayees || $[50] !== onNavigateToSchedule || $[51] !== onNavigateToTransferAccount || $[52] !== onNotesTagClick || $[53] !== onSave || $[54] !== onSplit || $[55] !== onToggleSplit || $[56] !== payees || $[57] !== showAccount || $[58] !== showBalance || $[59] !== showCleared || $[60] !== showHiddenCategories || $[61] !== transferAccountsByTransaction) {
			t6 = (transaction, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Transaction, {
				index,
				editing: editingTransaction === transaction.id,
				transaction,
				subtransactions: transaction.is_parent ? childTransactions : null,
				transferAccountsByTransaction,
				showAccount,
				showBalance,
				showCleared,
				focusedField: editingTransaction === transaction.id ? focusedField : void 0,
				showZeroInDeposit: isDeposit,
				accounts,
				categoryGroups,
				payees,
				dateFormat,
				hideFraction: !!hideFraction,
				expanded: true,
				onEdit,
				onSave,
				onSplit,
				onToggleSplit,
				onDelete,
				onManagePayees,
				onCreatePayee,
				style: { marginTop: -1 },
				onNavigateToTransferAccount,
				onNavigateToSchedule,
				onNotesTagClick,
				balance: balance ?? 0,
				showSelection: true,
				allowSplitTransaction: true,
				showHiddenCategories
			}, transaction.id);
			$[37] = accounts;
			$[38] = balance;
			$[39] = categoryGroups;
			$[40] = childTransactions;
			$[41] = dateFormat;
			$[42] = editingTransaction;
			$[43] = focusedField;
			$[44] = hideFraction;
			$[45] = isDeposit;
			$[46] = onCreatePayee;
			$[47] = onDelete;
			$[48] = onEdit;
			$[49] = onManagePayees;
			$[50] = onNavigateToSchedule;
			$[51] = onNavigateToTransferAccount;
			$[52] = onNotesTagClick;
			$[53] = onSave;
			$[54] = onSplit;
			$[55] = onToggleSplit;
			$[56] = payees;
			$[57] = showAccount;
			$[58] = showBalance;
			$[59] = showCleared;
			$[60] = showHiddenCategories;
			$[61] = transferAccountsByTransaction;
			$[62] = t6;
		} else t6 = $[62];
		t5 = transactions.map(t6);
		$[10] = accounts;
		$[11] = balance;
		$[12] = categoryGroups;
		$[13] = childTransactions;
		$[14] = dateFormat;
		$[15] = editingTransaction;
		$[16] = focusedField;
		$[17] = hideFraction;
		$[18] = isDeposit;
		$[19] = onCreatePayee;
		$[20] = onDelete;
		$[21] = onEdit;
		$[22] = onManagePayees;
		$[23] = onNavigateToSchedule;
		$[24] = onNavigateToTransferAccount;
		$[25] = onNotesTagClick;
		$[26] = onSave;
		$[27] = onSplit;
		$[28] = onToggleSplit;
		$[29] = payees;
		$[30] = showAccount;
		$[31] = showBalance;
		$[32] = showCleared;
		$[33] = showHiddenCategories;
		$[34] = transactions;
		$[35] = transferAccountsByTransaction;
		$[36] = t5;
	} else t5 = $[36];
	let t6;
	if ($[63] === Symbol.for("react.memo_cache_sentinel")) {
		t6 = {
			flexDirection: "row",
			alignItems: "center",
			justifyContent: "flex-end",
			marginTop: 6,
			marginRight: 20
		};
		$[63] = t6;
	} else t6 = $[63];
	let t7;
	if ($[64] === Symbol.for("react.memo_cache_sentinel")) {
		t7 = {
			marginRight: 10,
			padding: "4px 10px"
		};
		$[64] = t7;
	} else t7 = $[64];
	let t8;
	if ($[65] !== onClose) {
		t8 = () => onClose();
		$[65] = onClose;
		$[66] = t8;
	} else t8 = $[66];
	let t9;
	if ($[67] === Symbol.for("react.memo_cache_sentinel")) {
		t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Cancel" });
		$[67] = t9;
	} else t9 = $[67];
	let t10;
	if ($[68] !== t8) {
		t10 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
			style: t7,
			onPress: t8,
			"data-testid": "cancel-button",
			ref: cancelButtonRef,
			children: t9
		});
		$[68] = t8;
		$[69] = t10;
	} else t10 = $[69];
	let t11;
	if ($[70] !== error || $[71] !== handleAddClick || $[72] !== isDeposit || $[73] !== onAddSplit || $[74] !== onDistributeRemainder || $[75] !== transactions[0].id) {
		t11 = error ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TransactionError, {
			error,
			isDeposit,
			onAddSplit: () => onAddSplit(transactions[0].id),
			onDistributeRemainder: () => onDistributeRemainder(transactions[0].id)
		}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
			variant: "primary",
			style: { padding: "4px 10px" },
			onPress: handleAddClick,
			"data-testid": "add-button",
			ref: addButtonRef,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Add" })
		});
		$[70] = error;
		$[71] = handleAddClick;
		$[72] = isDeposit;
		$[73] = onAddSplit;
		$[74] = onDistributeRemainder;
		$[75] = transactions[0].id;
		$[76] = t11;
	} else t11 = $[76];
	let t12;
	if ($[77] !== t10 || $[78] !== t11) {
		t12 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t6,
			children: [t10, t11]
		});
		$[77] = t10;
		$[78] = t11;
		$[79] = t12;
	} else t12 = $[79];
	let t13;
	if ($[80] !== t12 || $[81] !== t4 || $[82] !== t5) {
		t13 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t3,
			"data-testid": "new-transaction",
			onKeyDown: t4,
			children: [t5, t12]
		});
		$[80] = t12;
		$[81] = t4;
		$[82] = t5;
		$[83] = t13;
	} else t13 = $[83];
	return t13;
}
function TransactionTableInner(t0) {
	const $ = (0, import_compiler_runtime.c)(87);
	let listContainerRef;
	let newNavigator;
	let props;
	let renderEmpty;
	let showHiddenCategories;
	let t1;
	let tableNavigator;
	let tableRef;
	if ($[0] !== t0) {
		({tableNavigator, tableRef, listContainerRef, dateFormat: t1, newNavigator, renderEmpty, showHiddenCategories, ...props} = t0);
		$[0] = t0;
		$[1] = listContainerRef;
		$[2] = newNavigator;
		$[3] = props;
		$[4] = renderEmpty;
		$[5] = showHiddenCategories;
		$[6] = t1;
		$[7] = tableNavigator;
		$[8] = tableRef;
	} else {
		listContainerRef = $[1];
		newNavigator = $[2];
		props = $[3];
		renderEmpty = $[4];
		showHiddenCategories = $[5];
		t1 = $[6];
		tableNavigator = $[7];
		tableRef = $[8];
	}
	const dateFormat = t1 === void 0 ? "MM/dd/yyyy" : t1;
	let t2;
	if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = (0, import_react.createRef)();
		$[9] = t2;
	} else t2 = $[9];
	const containerRef = t2;
	const isAddingPrev = usePrevious(props.isAdding);
	const [scrollWidth, setScrollWidth] = (0, import_react.useState)(0);
	let t3;
	if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
		t3 = function saveScrollWidth(parent, child) {
			const width = parent > 0 && child > 0 && parent - child;
			setScrollWidth(!width ? 0 : width);
		};
		$[10] = t3;
	} else t3 = $[10];
	const saveScrollWidth = t3;
	const { onCloseAddTransaction: onCloseAddTransactionProp, onNavigateToTransferAccount: onNavigateToTransferAccountProp, onNavigateToSchedule: onNavigateToScheduleProp, onNotesTagClick: onNotesTagClickProp } = props;
	let t4;
	if ($[11] !== onCloseAddTransactionProp || $[12] !== onNavigateToTransferAccountProp) {
		t4 = (accountId) => {
			onCloseAddTransactionProp();
			onNavigateToTransferAccountProp(accountId);
		};
		$[11] = onCloseAddTransactionProp;
		$[12] = onNavigateToTransferAccountProp;
		$[13] = t4;
	} else t4 = $[13];
	const onNavigateToTransferAccount = t4;
	let t5;
	if ($[14] !== onCloseAddTransactionProp || $[15] !== onNavigateToScheduleProp) {
		t5 = (scheduleId) => {
			onCloseAddTransactionProp();
			onNavigateToScheduleProp(scheduleId);
		};
		$[14] = onCloseAddTransactionProp;
		$[15] = onNavigateToScheduleProp;
		$[16] = t5;
	} else t5 = $[16];
	const onNavigateToSchedule = t5;
	let t6;
	if ($[17] !== onCloseAddTransactionProp || $[18] !== onNotesTagClickProp) {
		t6 = (noteTag) => {
			onCloseAddTransactionProp();
			onNotesTagClickProp(noteTag);
		};
		$[17] = onCloseAddTransactionProp;
		$[18] = onNotesTagClickProp;
		$[19] = t6;
	} else t6 = $[19];
	const onNotesTagClick = t6;
	let t7;
	let t8;
	if ($[20] !== isAddingPrev || $[21] !== newNavigator || $[22] !== props.isAdding) {
		t7 = () => {
			if (!isAddingPrev && props.isAdding) newNavigator.onEdit("temp", "date");
		};
		t8 = [
			isAddingPrev,
			props.isAdding,
			newNavigator
		];
		$[20] = isAddingPrev;
		$[21] = newNavigator;
		$[22] = props.isAdding;
		$[23] = t7;
		$[24] = t8;
	} else {
		t7 = $[23];
		t8 = $[24];
	}
	(0, import_react.useEffect)(t7, t8);
	let t9;
	if ($[25] !== props.showReconciled || $[26] !== props.transactions) {
		t9 = props.showReconciled ? props.transactions : props.transactions.filter(_temp$5);
		$[25] = props.showReconciled;
		$[26] = props.transactions;
		$[27] = t9;
	} else t9 = $[27];
	const transactionsToRender = t9;
	let t10;
	if ($[28] !== dateFormat || $[29] !== listContainerRef || $[30] !== onNavigateToSchedule || $[31] !== onNavigateToTransferAccount || $[32] !== onNotesTagClick || $[33] !== props || $[34] !== showHiddenCategories || $[35] !== tableNavigator.focusedField || $[36] !== tableNavigator.onEdit || $[37] !== transactionsToRender) {
		t10 = (t11) => {
			const { item, index, editing } = t11;
			const { transactions, selectedItems, accounts, categoryGroups, payees, showCleared, showAccount, showBalances, balances, hideFraction, isNew, isMatched, isExpanded, showSelection, allowSplitTransaction } = props;
			const trans = item;
			const selected = selectedItems.has(trans.id);
			const parent_0 = trans.parent_id && props.transactionMap.get(trans.parent_id);
			const isChildDeposit = parent_0 ? parent_0.amount > 0 : void 0;
			const expanded = isExpanded && isExpanded((parent_0 || trans).id);
			const error = expanded ? parent_0 && parent_0.error || trans.error : trans.error;
			const hasSplitError = (trans.is_parent || trans.is_child) && (!expanded || isLastChild(transactions, index)) && error && error.type === "SplitTransactionError";
			const childTransactions = trans.is_parent ? props.transactionsByParent[trans.id] : null;
			const siblingCount = trans.is_child && trans.parent_id ? props.transactionsByParent[trans.parent_id]?.length ?? 0 : 0;
			const findPrevReorderableDate = () => {
				for (let i = index - 1; i >= 0; i--) {
					const row = transactionsToRender[i];
					if (row && !row.is_child && !isPreviewId(row.id)) return row.date ?? null;
				}
				return null;
			};
			const findNextReorderableDate = () => {
				for (let i_0 = index + 1; i_0 < transactionsToRender.length; i_0++) {
					const row_0 = transactionsToRender[i_0];
					if (row_0 && !row_0.is_child && !isPreviewId(row_0.id)) return row_0.date ?? null;
				}
				return null;
			};
			const prevRowDate = findPrevReorderableDate();
			const nextRowDate = findNextReorderableDate();
			return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Transaction, {
				allTransactions: props.transactions,
				editing,
				transaction: trans,
				transferAccountsByTransaction: props.transferAccountsByTransaction,
				subtransactions: childTransactions,
				showAccount,
				showBalance: showBalances,
				showCleared,
				selected,
				highlighted: false,
				added: isNew?.(trans.id),
				expanded: isExpanded?.(trans.id),
				matched: isMatched?.(trans.id),
				showZeroInDeposit: isChildDeposit,
				balance: balances?.[trans.id] ?? 0,
				focusedField: editing ? tableNavigator.focusedField : void 0,
				accounts,
				categoryGroups,
				payees,
				dateFormat,
				hideFraction,
				onEdit: tableNavigator.onEdit,
				onSave: props.onSave,
				onDelete: props.onDelete,
				onBatchDelete: props.onBatchDelete,
				onBatchDuplicate: props.onBatchDuplicate,
				onBatchLinkSchedule: props.onBatchLinkSchedule,
				onBatchUnlinkSchedule: props.onBatchUnlinkSchedule,
				onCreateRule: props.onCreateRule,
				onScheduleAction: props.onScheduleAction,
				onMakeAsNonSplitTransactions: props.onMakeAsNonSplitTransactions,
				onSplit: props.onSplit,
				onManagePayees: props.onManagePayees,
				onCreatePayee: props.onCreatePayee,
				onToggleSplit: props.onToggleSplit,
				onNavigateToTransferAccount,
				onNavigateToSchedule,
				onNotesTagClick,
				splitError: hasSplitError && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TransactionError, {
					error,
					isDeposit: !!isChildDeposit,
					onAddSplit: () => props.onAddSplit(trans.id),
					onDistributeRemainder: () => props.onDistributeRemainder(trans.id)
				}),
				listContainerRef,
				showSelection,
				allowSplitTransaction,
				showHiddenCategories,
				canDrag: props.canDrag,
				draggedId: props.draggedId,
				draggedParentId: props.draggedParentId,
				draggedDate: props.draggedDate,
				siblingCount,
				prevRowDate,
				nextRowDate,
				sortField: props.sortField,
				ascDesc: props.ascDesc,
				onDragChange: props.onDragChange,
				onDrop: props.onDrop,
				index
			});
		};
		$[28] = dateFormat;
		$[29] = listContainerRef;
		$[30] = onNavigateToSchedule;
		$[31] = onNavigateToTransferAccount;
		$[32] = onNotesTagClick;
		$[33] = props;
		$[34] = showHiddenCategories;
		$[35] = tableNavigator.focusedField;
		$[36] = tableNavigator.onEdit;
		$[37] = transactionsToRender;
		$[38] = t10;
	} else t10 = $[38];
	const renderRow = t10;
	let t11;
	if ($[39] !== props.style) {
		t11 = {
			flex: 1,
			cursor: "default",
			...props.style
		};
		$[39] = props.style;
		$[40] = t11;
	} else t11 = $[40];
	const t12 = props.selectedItems.size > 0;
	let t13;
	if ($[41] !== props.ascDesc || $[42] !== props.onSort || $[43] !== props.showAccount || $[44] !== props.showBalances || $[45] !== props.showCategory || $[46] !== props.showCleared || $[47] !== props.showSelection || $[48] !== props.sortField || $[49] !== scrollWidth || $[50] !== t12) {
		t13 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TransactionHeader, {
			hasSelected: t12,
			showAccount: props.showAccount,
			showCategory: props.showCategory,
			showBalance: props.showBalances,
			showCleared: props.showCleared,
			scrollWidth,
			onSort: props.onSort,
			ascDesc: props.ascDesc,
			field: props.sortField,
			showSelection: props.showSelection
		});
		$[41] = props.ascDesc;
		$[42] = props.onSort;
		$[43] = props.showAccount;
		$[44] = props.showBalances;
		$[45] = props.showCategory;
		$[46] = props.showCleared;
		$[47] = props.showSelection;
		$[48] = props.sortField;
		$[49] = scrollWidth;
		$[50] = t12;
		$[51] = t13;
	} else t13 = $[51];
	let t14;
	if ($[52] !== dateFormat || $[53] !== newNavigator || $[54] !== onNavigateToSchedule || $[55] !== onNavigateToTransferAccount || $[56] !== onNotesTagClick || $[57] !== props || $[58] !== showHiddenCategories) {
		t14 = props.isAdding && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			...newNavigator.getNavigatorProps({ onKeyDown: (e) => props.onCheckNewEnter(e) }),
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NewTransaction, {
				transactions: props.newTransactions,
				transferAccountsByTransaction: props.transferAccountsByTransaction,
				editingTransaction: newNavigator.editingId,
				focusedField: newNavigator.focusedField,
				accounts: props.accounts,
				categoryGroups: props.categoryGroups,
				payees: props.payees || [],
				showAccount: props.showAccount,
				showBalance: props.showBalances,
				showCleared: props.showCleared,
				dateFormat,
				hideFraction: props.hideFraction,
				onClose: props.onCloseAddTransaction,
				onAdd: props.onAddTemporary,
				onAddAndClose: props.onAddAndCloseTemporary,
				onAddSplit: props.onAddSplit,
				onToggleSplit: props.onToggleSplit,
				onSplit: props.onSplit,
				onEdit: newNavigator.onEdit,
				onSave: props.onSave,
				onDelete: props.onDelete,
				onManagePayees: props.onManagePayees,
				onCreatePayee: props.onCreatePayee,
				onNavigateToTransferAccount,
				onNavigateToSchedule,
				onNotesTagClick,
				onDistributeRemainder: props.onDistributeRemainder,
				showHiddenCategories
			})
		});
		$[52] = dateFormat;
		$[53] = newNavigator;
		$[54] = onNavigateToSchedule;
		$[55] = onNavigateToTransferAccount;
		$[56] = onNotesTagClick;
		$[57] = props;
		$[58] = showHiddenCategories;
		$[59] = t14;
	} else t14 = $[59];
	let t15;
	if ($[60] !== t13 || $[61] !== t14) {
		t15 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, { children: [t13, t14] });
		$[60] = t13;
		$[61] = t14;
		$[62] = t15;
	} else t15 = $[62];
	let t16;
	if ($[63] === Symbol.for("react.memo_cache_sentinel")) {
		t16 = {
			flex: 1,
			overflow: "hidden"
		};
		$[63] = t16;
	} else t16 = $[63];
	let t17;
	if ($[64] !== props.selectedItems) {
		t17 = (id) => props.selectedItems.has(id);
		$[64] = props.selectedItems;
		$[65] = t17;
	} else t17 = $[65];
	let t18;
	if ($[66] !== props) {
		t18 = (e_0) => props.onCheckEnter(e_0);
		$[66] = props;
		$[67] = t18;
	} else t18 = $[67];
	let t19;
	if ($[68] !== listContainerRef || $[69] !== props.loadMoreTransactions || $[70] !== renderEmpty || $[71] !== renderRow || $[72] !== t17 || $[73] !== t18 || $[74] !== tableNavigator || $[75] !== tableRef || $[76] !== transactionsToRender) {
		t19 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Table, {
			navigator: tableNavigator,
			ref: tableRef,
			listContainerRef,
			items: transactionsToRender,
			renderItem: renderRow,
			renderEmpty,
			loadMore: props.loadMoreTransactions,
			isSelected: t17,
			onKeyDown: t18,
			saveScrollWidth
		});
		$[68] = listContainerRef;
		$[69] = props.loadMoreTransactions;
		$[70] = renderEmpty;
		$[71] = renderRow;
		$[72] = t17;
		$[73] = t18;
		$[74] = tableNavigator;
		$[75] = tableRef;
		$[76] = transactionsToRender;
		$[77] = t19;
	} else t19 = $[77];
	let t20;
	if ($[78] !== props.isAdding) {
		t20 = props.isAdding && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: {
			position: "absolute",
			top: -20,
			left: 0,
			right: 0,
			height: 20,
			backgroundColor: theme.errorText,
			boxShadow: "0 0 6px rgba(0, 0, 0, .20)"
		} }, "shadow");
		$[78] = props.isAdding;
		$[79] = t20;
	} else t20 = $[79];
	let t21;
	if ($[80] !== t19 || $[81] !== t20) {
		t21 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t16,
			"data-testid": "transaction-table",
			children: [t19, t20]
		});
		$[80] = t19;
		$[81] = t20;
		$[82] = t21;
	} else t21 = $[82];
	let t22;
	if ($[83] !== t11 || $[84] !== t15 || $[85] !== t21) {
		t22 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			innerRef: containerRef,
			style: t11,
			children: [t15, t21]
		});
		$[83] = t11;
		$[84] = t15;
		$[85] = t21;
		$[86] = t22;
	} else t22 = $[86];
	return t22;
}
function _temp$5(t) {
	return !t.reconciled;
}
var TransactionTable = (0, import_react.forwardRef)((props, ref) => {
	const { t } = useTranslation();
	const dispatch = useDispatch();
	const [showHiddenCategories] = useLocalPref("budget.showHiddenCategories");
	const [newTransactions, setNewTransactions] = (0, import_react.useState)([]);
	const [prevIsAdding, setPrevIsAdding] = (0, import_react.useState)(false);
	const splitsExpanded = useSplitsExpanded();
	const splitsExpandedDispatch = splitsExpanded.dispatch;
	const prevSplitsExpanded = (0, import_react.useRef)(null);
	const [draggedId, setDraggedId] = (0, import_react.useState)(null);
	const [draggedDate, setDraggedDate] = (0, import_react.useState)(null);
	const [draggedParentId, setDraggedParentId] = (0, import_react.useState)(null);
	const canDrag = (0, import_react.useMemo)(() => (!props.sortField || props.sortField === "date") && !props.isFiltered && props.onReorder != null, [
		props.sortField,
		props.isFiltered,
		props.onReorder
	]);
	const onDragChange = (0, import_react.useCallback)((drag) => {
		if (drag.state === "start-preview") {
			setDraggedId(drag.item?.id ?? null);
			setDraggedDate(drag.item?.date ?? null);
			setDraggedParentId(drag.item?.parent_id ?? null);
		} else if (drag.state === "end") {
			setDraggedId(null);
			setDraggedDate(null);
			setDraggedParentId(null);
		}
	}, []);
	const { onReorder } = props;
	const onDrop = (0, import_react.useCallback)((id, dropPos, targetId) => {
		if (id === targetId) return;
		onReorder?.(id, dropPos, targetId);
	}, [onReorder]);
	const tableRef = (0, import_react.useRef)(null);
	const listContainerRef = (0, import_react.useRef)(null);
	const mergedRef = useMergedRefs(tableRef, ref);
	const transactionsWithExpandedSplits = (0, import_react.useMemo)(() => {
		let result;
		if (splitsExpanded.state.transitionId != null) {
			const index = props.transactions.findIndex((t_0) => t_0.id === splitsExpanded.state.transitionId);
			result = props.transactions.filter((t_1, idx) => {
				if (t_1.parent_id) {
					if (idx >= index) return splitsExpanded.isExpanded(t_1.parent_id);
					else if (prevSplitsExpanded.current) return prevSplitsExpanded.current.isExpanded(t_1.parent_id);
				}
				return true;
			});
		} else {
			if (prevSplitsExpanded.current && prevSplitsExpanded.current.state.transitionId != null) {
				tableRef.current?.anchor();
				tableRef.current?.setRowAnimation(false);
			}
			prevSplitsExpanded.current = splitsExpanded;
			result = props.transactions.filter((t_2) => {
				if (t_2.parent_id) return splitsExpanded.isExpanded(t_2.parent_id);
				return true;
			});
		}
		prevSplitsExpanded.current = splitsExpanded;
		return result;
	}, [props.transactions, splitsExpanded]);
	const transactionMap = (0, import_react.useMemo)(() => {
		return new Map(transactionsWithExpandedSplits.map((trans) => [trans.id, trans]));
	}, [transactionsWithExpandedSplits]);
	const transactionsByParent = (0, import_react.useMemo)(() => {
		return props.transactions.reduce((acc, trans_0) => {
			if (trans_0.is_child && trans_0.parent_id) acc[trans_0.parent_id] = [...acc[trans_0.parent_id] ?? [], trans_0];
			return acc;
		}, {});
	}, [props.transactions]);
	const transferAccountsByTransaction = (0, import_react.useMemo)(() => {
		if (!props.accounts) return {};
		const accounts = getAccountsById(props.accounts);
		const payees = getPayeesById(props.payees);
		return Object.fromEntries(props.transactions.map((t_3) => {
			if (!props.accounts) return [t_3.id, null];
			const payee = t_3.payee && payees[t_3.payee] || void 0;
			const transferAccount = payee?.transfer_acct && accounts[payee.transfer_acct];
			return [t_3.id, transferAccount || null];
		}));
	}, [
		props.transactions,
		props.payees,
		props.accounts
	]);
	const hasPrevSplitsExpanded = prevSplitsExpanded.current;
	(0, import_react.useEffect)(() => {
		if (tableRef.current?.isAnchored()) {
			tableRef.current.unanchor();
			tableRef.current.setRowAnimation(true);
		}
	}, [hasPrevSplitsExpanded]);
	const newNavigator = useTableNavigator(newTransactions ?? [], getFieldsNewTransaction);
	const tableNavigator = useTableNavigator(transactionsWithExpandedSplits, getFieldsTableTransaction);
	const shouldAdd = (0, import_react.useRef)(false);
	const shouldAddAndClose = (0, import_react.useRef)(false);
	const latestState = (0, import_react.useRef)({
		newTransactions: newTransactions ?? [],
		newNavigator,
		tableNavigator,
		transactions: []
	});
	const savePending = (0, import_react.useRef)(false);
	const afterSaveFunc = (0, import_react.useRef)(null);
	const [_, forceRerender] = (0, import_react.useState)({});
	const selectedItems = useSelectedItems();
	latestState.current = {
		newTransactions: newTransactions ?? [],
		newNavigator,
		tableNavigator,
		transactions: props.transactions
	};
	if (prevIsAdding !== props.isAdding) {
		if (!prevIsAdding && props.isAdding) setNewTransactions(makeTemporaryTransactions(props.currentAccountId, props.currentCategoryId));
		setPrevIsAdding(props.isAdding);
	}
	if (shouldAdd.current || shouldAddAndClose.current) {
		if (newTransactions?.[0] && newTransactions[0].account == null) {
			dispatch(addNotification({ notification: {
				type: "error",
				message: t("Account is a required field")
			} }));
			newNavigator.onEdit("temp", "account");
		} else {
			const transactions = latestState.current.newTransactions;
			if (shouldAddAndClose.current) {
				props.onAdd(transactions);
				props.onCloseAddTransaction();
			} else {
				const lastDate = transactions.length > 0 ? transactions[0].date : null;
				setNewTransactions(makeTemporaryTransactions(props.currentAccountId, props.currentCategoryId, lastDate));
				newNavigator.onEdit("temp", "date");
				props.onAdd(transactions);
			}
		}
		shouldAdd.current = false;
		shouldAddAndClose.current = false;
	}
	(0, import_react.useEffect)(() => {
		if (savePending.current && afterSaveFunc.current) {
			const func = afterSaveFunc.current;
			afterSaveFunc.current = null;
			savePending.current = false;
			func();
		} else savePending.current = false;
	}, [
		newTransactions,
		props,
		props.transactions
	]);
	function getFieldsNewTransaction(item) {
		return getFields(item, [
			"select",
			"date",
			"account",
			"payee",
			"notes",
			"category",
			"debit",
			"credit",
			"cleared",
			"cancel",
			"add"
		]);
	}
	function getFieldsTableTransaction(item_0) {
		return getFields(item_0, [
			"select",
			"date",
			"account",
			"payee",
			"notes",
			"category",
			"debit",
			"credit",
			"cleared"
		]);
	}
	function getFields(item_1, fields_1) {
		fields_1 = item_1?.is_child ? [
			"select",
			"payee",
			"notes",
			"category",
			"debit",
			"credit"
		] : fields_1.filter((f) => (props.showAccount || f !== "account") && (props.showCategory || f !== "category"));
		if (item_1?.id && isPreviewId(item_1.id)) fields_1 = ["select"];
		if (item_1?.id && isTemporaryId(item_1.id)) fields_1 = fields_1.slice(1);
		return fields_1;
	}
	function afterSave(func_0) {
		if (savePending.current) afterSaveFunc.current = func_0;
		else func_0();
	}
	function onCheckNewEnter(e) {
		if (e.key === "Enter") {
			if (e.metaKey || e.ctrlKey) {
				e.preventDefault();
				e.stopPropagation();
				afterSave(() => {
					shouldAddAndClose.current = true;
					forceRerender({});
				});
			} else if (!e.shiftKey) {
				function getLastTransaction(state) {
					const { newTransactions: newTransactions_0 } = state.current;
					return newTransactions_0[newTransactions_0.length - 1];
				}
				if (newNavigator.editingId === getLastTransaction(latestState).id) e.stopPropagation();
				afterSave(() => {
					const lastTransaction = getLastTransaction(latestState);
					const isSplit = lastTransaction.parent_id || lastTransaction.is_parent;
					if (latestState.current.newTransactions[0].error && newNavigator.editingId === lastTransaction.id) onAddSplit(lastTransaction.id);
					else if (newNavigator.editingId === lastTransaction.id && (!isSplit || !lastTransaction.error)) onAddTemporary();
				});
			}
		}
	}
	function onCheckEnter(e_0) {
		if (e_0.key === "Enter" && !e_0.shiftKey) {
			const { editingId: id_0, focusedField } = tableNavigator;
			afterSave(() => {
				const transactions_0 = latestState.current.transactions;
				const idx_0 = transactions_0.findIndex((t_4) => t_4.id === id_0);
				const parent = transactions_0.find((t_5) => t_5.id === transactions_0[idx_0]?.parent_id);
				if (isLastChild(transactions_0, idx_0) && parent && parent.error && focusedField !== "select") {
					e_0.stopPropagation();
					onAddSplit(id_0);
				}
			});
		}
	}
	const onAddTemporary = (0, import_react.useCallback)(() => {
		afterSave(() => {
			shouldAdd.current = true;
			forceRerender({});
		});
	}, []);
	const onAddAndCloseTemporary = (0, import_react.useCallback)(() => {
		afterSave(() => {
			shouldAddAndClose.current = true;
			forceRerender({});
		});
	}, []);
	const { onSave: onSaveProp, onApplyRules: onApplyRulesProp, onBatchDelete: onBatchDeleteProp, onBatchDuplicate: onBatchDuplicateProp, onBatchLinkSchedule: onBatchLinkScheduleProp, onBatchUnlinkSchedule: onBatchUnlinkScheduleProp, onCreateRule: onCreateRuleProp, onScheduleAction: onScheduleActionProp, onMakeAsNonSplitTransactions: onMakeAsNonSplitTransactionsProp, onSplit: onSplitProp } = props;
	const onSave = (0, import_react.useCallback)(async (transaction, subtransactions = null, updatedFieldName = null) => {
		savePending.current = true;
		let groupedTransaction = subtransactions ? groupTransaction([transaction, ...subtransactions]) : transaction;
		if (isTemporaryId(transaction.id)) {
			if (onApplyRulesProp) groupedTransaction = await onApplyRulesProp(groupedTransaction, updatedFieldName);
			const newTrans = latestState.current.newTransactions;
			setNewTransactions(ungroupTransactions(updateTransaction(newTrans, groupedTransaction).data));
		} else onSaveProp(groupedTransaction);
	}, [onSaveProp, onApplyRulesProp]);
	const onDelete = (0, import_react.useCallback)((id_1) => {
		if (isTemporaryId(id_1)) {
			const newTrans_0 = latestState.current.newTransactions;
			if (id_1 === newTrans_0[0].id) return;
			setNewTransactions(deleteTransaction(newTrans_0, id_1).data);
		}
	}, []);
	const onBatchDelete = (0, import_react.useCallback)((ids) => {
		onBatchDeleteProp(ids);
	}, [onBatchDeleteProp]);
	const onBatchDuplicate = (0, import_react.useCallback)((ids_0) => {
		onBatchDuplicateProp(ids_0);
	}, [onBatchDuplicateProp]);
	const onBatchLinkSchedule = (0, import_react.useCallback)((ids_1) => {
		onBatchLinkScheduleProp(ids_1);
	}, [onBatchLinkScheduleProp]);
	const onBatchUnlinkSchedule = (0, import_react.useCallback)((ids_2) => {
		onBatchUnlinkScheduleProp(ids_2);
	}, [onBatchUnlinkScheduleProp]);
	const onCreateRule = (0, import_react.useCallback)((ids_3) => {
		onCreateRuleProp(ids_3);
	}, [onCreateRuleProp]);
	const onScheduleAction = (0, import_react.useCallback)((action, ids_4) => {
		onScheduleActionProp(action, ids_4);
	}, [onScheduleActionProp]);
	const onMakeAsNonSplitTransactions = (0, import_react.useCallback)((ids_5) => {
		onMakeAsNonSplitTransactionsProp(ids_5);
	}, [onMakeAsNonSplitTransactionsProp]);
	const onSplit = (0, import_react.useMemo)(() => {
		return (id_2) => {
			if (isTemporaryId(id_2)) {
				const { newNavigator: newNavigator_0 } = latestState.current;
				const newTrans_1 = latestState.current.newTransactions;
				const { data, diff } = splitTransaction(newTrans_1, id_2);
				setNewTransactions(data);
				if (newTrans_1[0].amount === null) newNavigator_0.onEdit(newTrans_1[0].id, "debit");
				else newNavigator_0.onEdit(diff.added[0].id, latestState.current.newNavigator.focusedField);
			} else {
				const trans_1 = latestState.current.transactions.find((t_6) => t_6.id === id_2);
				const newId = onSplitProp(id_2);
				if (!trans_1) return;
				splitsExpandedDispatch({
					type: "open-split",
					id: trans_1.id
				});
				const { tableNavigator: tableNavigator_0 } = latestState.current;
				if (trans_1.amount === null) tableNavigator_0.onEdit(trans_1.id, "debit");
				else tableNavigator_0.onEdit(newId, tableNavigator_0.focusedField);
			}
		};
	}, [onSplitProp, splitsExpandedDispatch]);
	const { onAddSplit: onAddSplitProp } = props;
	const onAddSplit = (0, import_react.useCallback)((id_3) => {
		const { tableNavigator: tableNavigator_1, newNavigator: newNavigator_1, newTransactions: newTrans_2 } = latestState.current;
		if (isTemporaryId(id_3)) {
			const { data: data_0, diff: diff_0 } = addSplitTransaction(newTrans_2, id_3);
			setNewTransactions(data_0);
			newNavigator_1.onEdit(diff_0.added[0].id, latestState.current.newNavigator.focusedField);
		} else {
			const newId_0 = onAddSplitProp(id_3);
			tableNavigator_1.onEdit(newId_0, latestState.current.tableNavigator.focusedField);
		}
	}, [onAddSplitProp]);
	const onDistributeRemainder = (0, import_react.useCallback)(async (id_4) => {
		const { transactions: transactions_1, newNavigator: newNavigator_2, tableNavigator: tableNavigator_2, newTransactions: newTransactions_1 } = latestState.current;
		const targetTransactions = isTemporaryId(id_4) ? newTransactions_1 : transactions_1;
		const transaction_0 = targetTransactions.find((t_7) => t_7.id === id_4);
		const parentTransaction = transaction_0?.is_parent ? transaction_0 : targetTransactions.find((t_8) => t_8.id === transaction_0?.parent_id);
		const siblingTransactions = targetTransactions.filter((t_9) => t_9.parent_id && t_9.parent_id === (transaction_0?.is_parent ? transaction_0?.id : transaction_0?.parent_id));
		const emptyTransactions = siblingTransactions.filter((t_10) => t_10.amount === 0);
		if (!parentTransaction) {
			console.error("Parent transaction not found for transaction", transaction_0);
			return;
		}
		const remainingAmount = parentTransaction.amount - siblingTransactions.reduce((acc_0, t_11) => acc_0 + t_11.amount, 0);
		let amounts = [];
		if (emptyTransactions.length > 0) {
			const amountPerTransaction = Math.floor(remainingAmount / emptyTransactions.length);
			let remainingCents = remainingAmount - amountPerTransaction * emptyTransactions.length;
			amounts = new Array(emptyTransactions.length).fill(amountPerTransaction);
			for (const [amountIndex] of amounts.entries()) {
				if (remainingCents === 0) break;
				amounts[amountIndex] += 1;
				remainingCents--;
			}
			if (isTemporaryId(id_4)) newNavigator_2.onEdit(null);
			else tableNavigator_2.onEdit(null);
			for (const [transactionIndex, transaction_1] of emptyTransactions.entries()) await onSave({
				...transaction_1,
				amount: amounts[transactionIndex]
			});
		} else if (emptyTransactions.length === 0 && siblingTransactions.length > 0) {
			const siblingTotal = siblingTransactions.reduce((acc_1, t_12) => acc_1 + t_12.amount, 0);
			const siblingProportions = siblingTransactions.map((t_13) => t_13.amount / siblingTotal);
			for (const [transactionIndex_0, transaction_2] of siblingTransactions.entries()) amounts[transactionIndex_0] = Math.floor(siblingProportions[transactionIndex_0] * remainingAmount) + transaction_2.amount;
			let remainingCents_0 = parentTransaction.amount - amounts.reduce((acc_2, a) => acc_2 + a, 0);
			let amountIndex_0 = 0;
			while (remainingCents_0 !== 0) {
				amountIndex_0 = amountIndex_0 % amounts.length;
				if (remainingCents_0 > 0) {
					amounts[amountIndex_0] += 1;
					remainingCents_0--;
				} else {
					amounts[amountIndex_0] -= 1;
					remainingCents_0++;
				}
				amountIndex_0++;
			}
			if (isTemporaryId(id_4)) newNavigator_2.onEdit(null);
			else tableNavigator_2.onEdit(null);
			for (const [transactionIndex_1, transaction_3] of siblingTransactions.entries()) await onSave({
				...transaction_3,
				amount: amounts[transactionIndex_1]
			});
		}
	}, [onSave]);
	function onCloseAddTransaction() {
		setNewTransactions(makeTemporaryTransactions(props.currentAccountId, props.currentCategoryId));
		props.onCloseAddTransaction();
	}
	const onToggleSplit = (0, import_react.useCallback)((id_5) => splitsExpandedDispatch({
		type: "toggle-split",
		id: id_5
	}), [splitsExpandedDispatch]);
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DisplayPayeeProvider, {
		transactions: (0, import_react.useMemo)(() => [...props.transactions, ...newTransactions], [props.transactions, newTransactions]),
		children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SchedulesProvider, {
			query: (0, import_react.useMemo)(() => q$1("schedules").select("*"), []),
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TransactionTableInner, {
				tableRef: mergedRef,
				listContainerRef,
				...props,
				transactions: transactionsWithExpandedSplits,
				transactionMap,
				transactionsByParent,
				transferAccountsByTransaction,
				selectedItems,
				isExpanded: splitsExpanded.isExpanded,
				onSave,
				onDelete,
				onBatchDelete,
				onBatchDuplicate,
				onBatchLinkSchedule,
				onBatchUnlinkSchedule,
				onCreateRule,
				onScheduleAction,
				onMakeAsNonSplitTransactions,
				onSplit,
				onCheckNewEnter,
				onCheckEnter,
				onAddTemporary,
				onAddAndCloseTemporary,
				onAddSplit,
				onDistributeRemainder,
				onCloseAddTransaction,
				onToggleSplit,
				newTransactions: newTransactions ?? [],
				tableNavigator,
				newNavigator,
				showSelection: props.showSelection,
				allowSplitTransaction: props.allowSplitTransaction,
				showHiddenCategories,
				canDrag,
				draggedId,
				draggedParentId,
				draggedDate,
				onDragChange,
				onDrop
			})
		})
	});
});
TransactionTable.displayName = "TransactionTable";
var getCategoriesById = memoizeOne((categoryGroups) => {
	const res = {};
	categoryGroups?.forEach((group) => {
		group.categories?.forEach((cat) => {
			res[cat.id] = cat;
		});
	});
	return res;
});
//#endregion
//#region src/components/transactions/TransactionList.tsx
async function saveDiff(diff, learnCategories) {
	const remoteUpdates = await send("transactions-batch-update", {
		...diff,
		learnCategories
	});
	if (remoteUpdates && remoteUpdates.updated.length > 0) return { updates: remoteUpdates };
	return {};
}
async function saveDiffAndApply(diff, changes, onChange, learnCategories) {
	const remoteDiff = await saveDiff(diff, learnCategories);
	onChange(applyTransactionDiff(changes.newTransaction, remoteDiff), applyChanges(remoteDiff, changes.data));
}
async function createSingleTimeScheduleFromTransaction(transaction) {
	const conditions = [{
		op: "is",
		field: "date",
		value: transaction.date
	}];
	const actions = [];
	[
		"amount",
		"payee",
		"account"
	].forEach((field) => {
		const value = transaction[field];
		if (value != null && value !== "") conditions.push({
			op: "is",
			field,
			value
		});
	});
	if (transaction.is_parent && transaction.subtransactions) {
		if (transaction.notes) actions.push({
			op: "set",
			field: "notes",
			value: transaction.notes,
			options: { splitIndex: 0 }
		});
		transaction.subtransactions.forEach((split, index) => {
			const splitIndex = index + 1;
			if (split.amount != null) actions.push({
				op: "set-split-amount",
				value: split.amount,
				options: {
					splitIndex,
					method: "fixed-amount"
				}
			});
			if (split.category) actions.push({
				op: "set",
				field: "category",
				value: split.category,
				options: { splitIndex }
			});
			if (split.notes) actions.push({
				op: "set",
				field: "notes",
				value: split.notes,
				options: { splitIndex }
			});
		});
	} else {
		if (transaction.category) actions.push({
			op: "set",
			field: "category",
			value: transaction.category
		});
		if (transaction.notes) actions.push({
			op: "set",
			field: "notes",
			value: transaction.notes
		});
	}
	const scheduleId = await send("schedule/create", {
		conditions,
		schedule: {
			posts_transaction: true,
			name: `Auto-created future transaction (${format$2(transaction.date, "MMM dd, yyyy")}) - ${Date.now()}`
		}
	});
	if (actions.length > 0) {
		const ruleId = (await send("query", q$1("schedules").filter({ id: scheduleId }).select("rule").serialize()))?.data?.[0]?.rule;
		if (ruleId) {
			const rule = await send("rule-get", { id: ruleId });
			if (rule) {
				const linkScheduleActions = rule.actions.filter((a) => a.op === "link-schedule");
				await send("rule-update", {
					...rule,
					actions: [...linkScheduleActions, ...actions]
				});
			}
		}
	}
	return scheduleId;
}
function isFutureTransaction(transaction) {
	const today = currentDay();
	return transaction.date > today;
}
function calculateFutureTransactionInfo(transaction, upcomingLength) {
	const today = currentDay();
	const upcomingDays = getUpcomingDays(upcomingLength, today);
	const daysUntilTransaction = differenceInCalendarDays(transaction.date, today);
	return {
		isBeyondWindow: daysUntilTransaction > upcomingDays,
		daysUntilTransaction,
		upcomingDays
	};
}
function TransactionList(t0) {
	const $ = (0, import_compiler_runtime.c)(86);
	const { tableRef, transactions, allTransactions, loadMoreTransactions, account, accounts, category, categoryGroups, payees, balances, showBalances, showReconciled, showCleared, showAccount, isAdding, isNew, isMatched, isFiltered, allowReorder: t1, dateFormat, hideFraction, renderEmpty, onSort, sortField, ascDesc, onChange, onRefetch, onCloseAddTransaction, onCreatePayee, onApplyFilter, showSelection: t2, allowSplitTransaction: t3, onBatchDelete, onBatchDuplicate, onBatchLinkSchedule, onBatchUnlinkSchedule, onCreateRule, onScheduleAction, onMakeAsNonSplitTransactions } = t0;
	const allowReorder = t1 === void 0 ? true : t1;
	const showSelection = t2 === void 0 ? true : t2;
	const allowSplitTransaction = t3 === void 0 ? true : t3;
	const { t } = useTranslation();
	const dispatch = useDispatch();
	const navigate = useNavigate();
	const [t4] = useSyncedPref("learn-categories");
	const isLearnCategoriesEnabled = String(t4 === void 0 ? "true" : t4) === "true";
	const [t5] = useSyncedPref("upcomingScheduledTransactionLength");
	const upcomingLength = t5 === void 0 ? "7" : t5;
	let t6;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t6 = [];
		$[0] = t6;
	} else t6 = $[0];
	const transactionsLatest = (0, import_react.useRef)(t6);
	let t7;
	let t8;
	if ($[1] !== transactions) {
		t7 = () => {
			transactionsLatest.current = transactions;
		};
		t8 = [transactions];
		$[1] = transactions;
		$[2] = t7;
		$[3] = t8;
	} else {
		t7 = $[2];
		t8 = $[3];
	}
	(0, import_react.useLayoutEffect)(t7, t8);
	let t9;
	if ($[4] !== dispatch || $[5] !== onRefetch || $[6] !== t || $[7] !== upcomingLength) {
		t9 = (transaction, onConfirm, onCancel) => {
			dispatch(pushModal({ modal: {
				name: "convert-to-schedule",
				options: {
					...calculateFutureTransactionInfo(transaction, upcomingLength),
					onConfirm: async () => {
						await onConfirm();
						dispatch(addNotification({ notification: {
							type: "message",
							message: t("Schedule created successfully")
						} }));
						onRefetch();
					},
					onCancel: async () => {
						await onCancel();
						onRefetch();
					}
				}
			} }));
		};
		$[4] = dispatch;
		$[5] = onRefetch;
		$[6] = t;
		$[7] = upcomingLength;
		$[8] = t9;
	} else t9 = $[8];
	const promptToConvertToSchedule = t9;
	let t10;
	if ($[9] !== isLearnCategoriesEnabled || $[10] !== onRefetch || $[11] !== promptToConvertToSchedule) {
		t10 = async (newTransactions) => {
			newTransactions = realizeTempTransactions(newTransactions);
			const parentTransaction = newTransactions.find(_temp$4);
			const isLinkedToSchedule = !!parentTransaction?.schedule;
			if (parentTransaction && isFutureTransaction(parentTransaction) && !isLinkedToSchedule) {
				const transactionWithSubtransactions = {
					...parentTransaction,
					subtransactions: newTransactions.filter((t_1) => t_1.is_child && t_1.parent_id === parentTransaction.id)
				};
				promptToConvertToSchedule(transactionWithSubtransactions, async () => {
					await createSingleTimeScheduleFromTransaction(transactionWithSubtransactions);
				}, async () => {
					await saveDiff({ added: newTransactions }, isLearnCategoriesEnabled);
				});
				return;
			}
			await saveDiff({ added: newTransactions }, isLearnCategoriesEnabled);
			onRefetch();
		};
		$[9] = isLearnCategoriesEnabled;
		$[10] = onRefetch;
		$[11] = promptToConvertToSchedule;
		$[12] = t10;
	} else t10 = $[12];
	const onAdd = t10;
	let t11;
	if ($[13] !== isLearnCategoriesEnabled || $[14] !== onChange || $[15] !== onRefetch || $[16] !== promptToConvertToSchedule) {
		t11 = async (transaction_0) => {
			const saveTransaction = async () => {
				const changes = updateTransaction(transactionsLatest.current, transaction_0);
				transactionsLatest.current = changes.data;
				if (changes.diff.updated.length > 0) if (!!changes.diff.updated[0].date) {
					changes.diff.updated[0].sort_order = Date.now();
					await saveDiff(changes.diff, isLearnCategoriesEnabled);
					onRefetch();
				} else {
					onChange(changes.newTransaction, changes.data);
					saveDiffAndApply(changes.diff, changes, onChange, isLearnCategoriesEnabled);
				}
			};
			const isLinkedToSchedule_0 = !!transaction_0.schedule;
			if (isFutureTransaction(transaction_0) && !isLinkedToSchedule_0) {
				const originalTransaction = transactionsLatest.current.find((t_2) => t_2.id === transaction_0.id);
				if (!originalTransaction || originalTransaction.date !== transaction_0.date || !originalTransaction) {
					promptToConvertToSchedule(transaction_0, async () => {
						if (transaction_0.id && !transaction_0.id.startsWith("temp")) await send("transaction-delete", { id: transaction_0.id });
						await createSingleTimeScheduleFromTransaction(transaction_0);
					}, saveTransaction);
					return;
				}
			}
			await saveTransaction();
		};
		$[13] = isLearnCategoriesEnabled;
		$[14] = onChange;
		$[15] = onRefetch;
		$[16] = promptToConvertToSchedule;
		$[17] = t11;
	} else t11 = $[17];
	const onSave = t11;
	let t12;
	if ($[18] !== isLearnCategoriesEnabled || $[19] !== onChange) {
		t12 = (id) => {
			const changes_0 = addSplitTransaction(transactionsLatest.current, id);
			onChange(changes_0.newTransaction, changes_0.data);
			saveDiffAndApply(changes_0.diff, changes_0, onChange, isLearnCategoriesEnabled);
			return changes_0.diff.added[0].id;
		};
		$[18] = isLearnCategoriesEnabled;
		$[19] = onChange;
		$[20] = t12;
	} else t12 = $[20];
	const onAddSplit = t12;
	let t13;
	if ($[21] !== isLearnCategoriesEnabled || $[22] !== onChange) {
		t13 = (id_0) => {
			const changes_1 = splitTransaction(transactionsLatest.current, id_0);
			onChange(changes_1.newTransaction, changes_1.data);
			saveDiffAndApply(changes_1.diff, changes_1, onChange, isLearnCategoriesEnabled);
			return changes_1.diff.added[0].id;
		};
		$[21] = isLearnCategoriesEnabled;
		$[22] = onChange;
		$[23] = t13;
	} else t13 = $[23];
	const onSplit = t13;
	let t14;
	if ($[24] !== dispatch) {
		t14 = async (transaction_1, t15) => {
			const updatedFieldName = t15 === void 0 ? null : t15;
			const afterRules = await send("rules-run", { transaction: transaction_1 });
			if (afterRules._ruleErrors && afterRules._ruleErrors.length > 0) dispatch(addNotification({ notification: {
				type: "error",
				message: `Formula errors in rules:\n${afterRules._ruleErrors.join("\n")}`,
				sticky: true
			} }));
			const diff = getChangedValues(transaction_1, afterRules);
			const newTransaction = { ...transaction_1 };
			if (diff) {
				Object.keys(diff).forEach((field) => {
					if (newTransaction[field] == null || newTransaction[field] === "" || newTransaction[field] === 0 || newTransaction[field] === false) newTransaction[field] = diff[field];
				});
				if (transaction_1.is_parent && diff.subtransactions !== void 0 && updatedFieldName !== null) newTransaction.subtransactions = diff.subtransactions.map((st, idx) => ({
					...newTransaction.subtransactions?.[idx] || st,
					...st[updatedFieldName] != null && { [updatedFieldName]: st[updatedFieldName] }
				}));
			}
			return newTransaction;
		};
		$[24] = dispatch;
		$[25] = t14;
	} else t14 = $[25];
	const onApplyRules = t14;
	let t15;
	if ($[26] !== navigate) {
		t15 = (id_1) => {
			navigate("/payees", id_1 ? { state: { selectedPayee: id_1 } } : void 0);
		};
		$[26] = navigate;
		$[27] = t15;
	} else t15 = $[27];
	const onManagePayees = t15;
	let t16;
	if ($[28] !== navigate) {
		t16 = (accountId) => {
			navigate(`/accounts/${accountId}`);
		};
		$[28] = navigate;
		$[29] = t16;
	} else t16 = $[29];
	const onNavigateToTransferAccount = t16;
	let t17;
	if ($[30] !== dispatch) {
		t17 = (scheduleId) => {
			dispatch(pushModal({ modal: {
				name: "schedule-edit",
				options: { id: scheduleId }
			} }));
		};
		$[30] = dispatch;
		$[31] = t17;
	} else t17 = $[31];
	const onNavigateToSchedule = t17;
	let t18;
	if ($[32] !== onApplyFilter) {
		t18 = (tag) => {
			onApplyFilter({
				field: "notes",
				op: "hasTags",
				value: tag,
				type: "string"
			});
		};
		$[32] = onApplyFilter;
		$[33] = t18;
	} else t18 = $[33];
	const onNotesTagClick = t18;
	let t19;
	if ($[34] !== allTransactions || $[35] !== ascDesc || $[36] !== isFiltered || $[37] !== onRefetch || $[38] !== sortField) {
		t19 = async (id_2, dropPos, targetId) => {
			if (sortField && sortField !== "date" || isFiltered) return;
			if (id_2 === targetId) return;
			const draggedTrans = allTransactions.find((t_3) => t_3.id === id_2);
			if (!draggedTrans) return;
			if (draggedTrans.is_child && draggedTrans.parent_id) {
				const siblings = allTransactions.filter((t_4) => t_4.parent_id === draggedTrans.parent_id && !isPreviewId(t_4.id));
				const targetTransIdx = siblings.findIndex((t_5) => t_5.id === targetId);
				if (targetTransIdx === -1) return;
				let apiTargetId;
				if (dropPos === "after") apiTargetId = targetId;
				else {
					const aboveIdx = targetTransIdx - 1;
					apiTargetId = aboveIdx >= 0 ? siblings[aboveIdx].id : null;
				}
				await send("transaction-move", {
					id: id_2,
					accountId: draggedTrans.account,
					targetId: apiTargetId
				});
				onRefetch();
				return;
			}
			const reorderable = allTransactions.filter(_temp2$3);
			const transIdx = reorderable.findIndex((t_7) => t_7.id === id_2);
			const targetTransIdx_0 = reorderable.findIndex((t_8) => t_8.id === targetId);
			if (transIdx === -1 || targetTransIdx_0 === -1) return;
			const trans = reorderable[transIdx];
			const targetTrans = reorderable[targetTransIdx_0];
			const isAscending = sortField === "date" && ascDesc === "asc";
			let isValidDrop = targetTrans.date === trans.date;
			if (!isValidDrop) {
				const neighborIdx = dropPos === "before" ? targetTransIdx_0 - 1 : targetTransIdx_0 + 1;
				const neighborTrans = neighborIdx >= 0 && neighborIdx < reorderable.length ? reorderable[neighborIdx] : null;
				isValidDrop = isValidBoundaryDrop(dropPos, targetTrans.date, trans.date, neighborTrans?.date ?? null, isAscending);
			}
			if (!isValidDrop) return;
			let apiTargetId_0;
			if (dropPos === "after") {
				if (targetTrans.is_parent) return;
				apiTargetId_0 = targetTrans.date === trans.date ? targetId : null;
			} else {
				const aboveIdx_0 = targetTransIdx_0 - 1;
				const aboveTrans = aboveIdx_0 >= 0 ? reorderable[aboveIdx_0] : null;
				if (aboveTrans?.is_parent) apiTargetId_0 = aboveTrans.date === trans.date ? aboveTrans.id : null;
				else apiTargetId_0 = aboveTrans && aboveTrans.date === trans.date ? aboveTrans.id : null;
			}
			await send("transaction-move", {
				id: id_2,
				accountId: trans.account,
				targetId: apiTargetId_0
			});
			onRefetch();
		};
		$[34] = allTransactions;
		$[35] = ascDesc;
		$[36] = isFiltered;
		$[37] = onRefetch;
		$[38] = sortField;
		$[39] = t19;
	} else t19 = $[39];
	const onReorder = t19;
	const t20 = account && account.id;
	const t21 = category && category.id;
	let t22;
	if ($[40] === Symbol.for("react.memo_cache_sentinel")) {
		t22 = { backgroundColor: theme.tableBackground };
		$[40] = t22;
	} else t22 = $[40];
	const t23 = allowReorder ? onReorder : void 0;
	let t24;
	if ($[41] !== accounts || $[42] !== allTransactions || $[43] !== allowSplitTransaction || $[44] !== ascDesc || $[45] !== balances || $[46] !== categoryGroups || $[47] !== dateFormat || $[48] !== hideFraction || $[49] !== isAdding || $[50] !== isFiltered || $[51] !== isMatched || $[52] !== isNew || $[53] !== loadMoreTransactions || $[54] !== onAdd || $[55] !== onAddSplit || $[56] !== onApplyRules || $[57] !== onBatchDelete || $[58] !== onBatchDuplicate || $[59] !== onBatchLinkSchedule || $[60] !== onBatchUnlinkSchedule || $[61] !== onCloseAddTransaction || $[62] !== onCreatePayee || $[63] !== onCreateRule || $[64] !== onMakeAsNonSplitTransactions || $[65] !== onManagePayees || $[66] !== onNavigateToSchedule || $[67] !== onNavigateToTransferAccount || $[68] !== onNotesTagClick || $[69] !== onSave || $[70] !== onScheduleAction || $[71] !== onSort || $[72] !== onSplit || $[73] !== payees || $[74] !== renderEmpty || $[75] !== showAccount || $[76] !== showBalances || $[77] !== showCleared || $[78] !== showReconciled || $[79] !== showSelection || $[80] !== sortField || $[81] !== t20 || $[82] !== t21 || $[83] !== t23 || $[84] !== tableRef) {
		t24 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(m$1, {
			FallbackComponent: FeatureErrorFallback,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TransactionTable, {
				ref: tableRef,
				transactions: allTransactions,
				loadMoreTransactions,
				accounts,
				categoryGroups,
				payees,
				balances,
				showBalances,
				showReconciled,
				showCleared,
				showAccount,
				showCategory: true,
				currentAccountId: t20,
				currentCategoryId: t21,
				isAdding,
				isNew,
				isMatched,
				dateFormat,
				hideFraction,
				renderEmpty,
				onSave,
				onApplyRules,
				onSplit,
				onCloseAddTransaction,
				onAdd,
				onAddSplit,
				onManagePayees,
				onCreatePayee,
				style: t22,
				onNavigateToTransferAccount,
				onNavigateToSchedule,
				onNotesTagClick,
				onSort,
				sortField,
				ascDesc,
				isFiltered,
				onReorder: t23,
				onBatchDelete,
				onBatchDuplicate,
				onBatchLinkSchedule,
				onBatchUnlinkSchedule,
				onCreateRule,
				onScheduleAction,
				onMakeAsNonSplitTransactions,
				showSelection,
				allowSplitTransaction
			})
		});
		$[41] = accounts;
		$[42] = allTransactions;
		$[43] = allowSplitTransaction;
		$[44] = ascDesc;
		$[45] = balances;
		$[46] = categoryGroups;
		$[47] = dateFormat;
		$[48] = hideFraction;
		$[49] = isAdding;
		$[50] = isFiltered;
		$[51] = isMatched;
		$[52] = isNew;
		$[53] = loadMoreTransactions;
		$[54] = onAdd;
		$[55] = onAddSplit;
		$[56] = onApplyRules;
		$[57] = onBatchDelete;
		$[58] = onBatchDuplicate;
		$[59] = onBatchLinkSchedule;
		$[60] = onBatchUnlinkSchedule;
		$[61] = onCloseAddTransaction;
		$[62] = onCreatePayee;
		$[63] = onCreateRule;
		$[64] = onMakeAsNonSplitTransactions;
		$[65] = onManagePayees;
		$[66] = onNavigateToSchedule;
		$[67] = onNavigateToTransferAccount;
		$[68] = onNotesTagClick;
		$[69] = onSave;
		$[70] = onScheduleAction;
		$[71] = onSort;
		$[72] = onSplit;
		$[73] = payees;
		$[74] = renderEmpty;
		$[75] = showAccount;
		$[76] = showBalances;
		$[77] = showCleared;
		$[78] = showReconciled;
		$[79] = showSelection;
		$[80] = sortField;
		$[81] = t20;
		$[82] = t21;
		$[83] = t23;
		$[84] = tableRef;
		$[85] = t24;
	} else t24 = $[85];
	return t24;
}
function _temp2$3(t_6) {
	return !t_6.is_child && !isPreviewId(t_6.id);
}
function _temp$4(t_0) {
	return !t_0.is_child;
}
//#endregion
//#region src/components/util/AmountInput.tsx
function AmountInput({ id, ref, value: initialValue, zeroSign = "-", sign, onFocus, onBlur, onChangeValue, onUpdate, onEnter, style, inputStyle, inputClassName, focused, disabled = false, autoDecimals = false }) {
	const { t } = useTranslation();
	const format = useFormat();
	const [symbol, setSymbol] = (0, import_react.useState)(() => {
		if (sign) return sign;
		return initialValue === 0 ? zeroSign : initialValue > 0 ? "+" : "-";
	});
	const [isFocused, setIsFocused] = (0, import_react.useState)(focused ?? false);
	const getDisplayValue = (0, import_react.useCallback)((value, isEditing) => {
		const absoluteValue = Math.abs(value || 0);
		return isEditing ? format.forEdit(absoluteValue) : format(absoluteValue, "financial");
	}, [format]);
	const [value_0, setValue] = (0, import_react.useState)(getDisplayValue(initialValue, false));
	(0, import_react.useEffect)(() => setValue(getDisplayValue(initialValue, isFocused)), [
		initialValue,
		isFocused,
		getDisplayValue
	]);
	const buttonRef = (0, import_react.useRef)(null);
	const innerRef = (0, import_react.useRef)(null);
	const mergedRef = useMergedRefs(ref, innerRef);
	(0, import_react.useEffect)(() => {
		if (focused) innerRef.current?.focus();
	}, [focused]);
	(0, import_react.useEffect)(() => {
		if (sign) setSymbol(sign);
	}, [sign]);
	const getAmount = (0, import_react.useCallback)(() => {
		const signedValued = symbol === "-" ? symbol + value_0 : value_0;
		return format.fromEdit(signedValued, 0);
	}, [
		symbol,
		value_0,
		format
	]);
	(0, import_react.useEffect)(() => {
		if (innerRef.current) innerRef.current.getCurrentAmount = () => getAmount();
	}, [getAmount]);
	function onSwitch() {
		if (sign) return;
		const amount = getAmount();
		if (amount === 0) setSymbol(symbol === "+" ? "-" : "+");
		fireUpdate(amount * -1);
	}
	function onInputTextChange(val) {
		let newText = val;
		if (autoDecimals) {
			const digits = val.replace(/\D/g, "");
			if (digits === "") newText = "";
			else {
				const intValue = parseInt(digits, 10);
				newText = format.forEdit(intValue);
			}
		}
		setValue(newText || "");
		onChangeValue?.(newText);
	}
	function fireUpdate(amount_0) {
		onUpdate?.(amount_0);
		if (sign) setSymbol(sign);
		else if (amount_0 > 0) setSymbol("+");
		else if (amount_0 < 0) setSymbol("-");
		setValue(format(Math.abs(amount_0), "financial"));
	}
	function onInputAmountBlur(e) {
		if (!innerRef.current?.contains(e.relatedTarget)) fireUpdate(getAmount());
		onBlur?.(e);
	}
	return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
		style: {
			...baseInputStyle,
			padding: 0,
			flexDirection: "row",
			flex: 1,
			alignItems: "stretch",
			...style,
			...isFocused && { boxShadow: "0 0 0 1px " + theme.formInputShadowSelected }
		},
		children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button, {
			variant: "bare",
			isDisabled: disabled || !!sign,
			"aria-label": symbol === "-" ? t("Make positive") : t("Make negative"),
			style: { padding: "0 7px" },
			onPress: onSwitch,
			ref: buttonRef,
			children: [symbol === "-" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgSubtract$1, { style: {
				width: 8,
				height: 8,
				color: "inherit"
			} }), symbol === "+" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgAdd, { style: {
				width: 8,
				height: 8,
				color: "inherit"
			} })]
		}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
			id,
			ref: mergedRef,
			inputMode: "decimal",
			value: value_0,
			disabled,
			style: {
				...inputStyle,
				...styles.tnum
			},
			className: cx(css({
				width: "100%",
				flex: 1,
				"&, &[data-focused], &[data-hovered]": {
					border: 0,
					backgroundColor: "transparent",
					boxShadow: "none",
					color: "inherit"
				}
			}), inputClassName),
			onFocus: (e_0) => {
				setIsFocused(true);
				setValue(format.forEdit(Math.abs(initialValue ?? 0)));
				setTimeout(() => innerRef.current?.select(), 0);
				onFocus?.(e_0);
			},
			onBlur: (e_1) => {
				setIsFocused(false);
				onInputAmountBlur(e_1);
			},
			onEnter: (_, e_2) => {
				const amount_2 = getAmount();
				fireUpdate(amount_2);
				onEnter?.(e_2, amount_2);
			},
			onChangeValue: onInputTextChange
		})]
	});
}
function BetweenAmountInput(t0) {
	const $ = (0, import_compiler_runtime.c)(24);
	const { defaultValue, onChange } = t0;
	const { t } = useTranslation();
	const [num1, setNum1] = (0, import_react.useState)(defaultValue.num1);
	const [num2, setNum2] = (0, import_react.useState)(defaultValue.num2);
	let t1;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = {
			flexDirection: "row",
			alignItems: "center"
		};
		$[0] = t1;
	} else t1 = $[0];
	let t2;
	if ($[1] !== num2 || $[2] !== onChange) {
		t2 = (value) => {
			setNum1(value);
			onChange({
				num1: value,
				num2
			});
		};
		$[1] = num2;
		$[2] = onChange;
		$[3] = t2;
	} else t2 = $[3];
	let t3;
	if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
		t3 = { color: theme.formInputText };
		$[4] = t3;
	} else t3 = $[4];
	let t4;
	if ($[5] !== num1 || $[6] !== t2) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AmountInput, {
			value: num1,
			onUpdate: t2,
			style: t3
		});
		$[5] = num1;
		$[6] = t2;
		$[7] = t4;
	} else t4 = $[7];
	let t5;
	if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
		t5 = { margin: "0 5px" };
		$[8] = t5;
	} else t5 = $[8];
	let t6;
	if ($[9] !== t) {
		t6 = t("and");
		$[9] = t;
		$[10] = t6;
	} else t6 = $[10];
	let t7;
	if ($[11] !== t6) {
		t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t5,
			children: t6
		});
		$[11] = t6;
		$[12] = t7;
	} else t7 = $[12];
	let t8;
	if ($[13] !== num1 || $[14] !== onChange) {
		t8 = (value_0) => {
			setNum2(value_0);
			onChange({
				num1,
				num2: value_0
			});
		};
		$[13] = num1;
		$[14] = onChange;
		$[15] = t8;
	} else t8 = $[15];
	let t9;
	if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
		t9 = { color: theme.formInputText };
		$[16] = t9;
	} else t9 = $[16];
	let t10;
	if ($[17] !== num2 || $[18] !== t8) {
		t10 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AmountInput, {
			value: num2,
			onUpdate: t8,
			style: t9
		});
		$[17] = num2;
		$[18] = t8;
		$[19] = t10;
	} else t10 = $[19];
	let t11;
	if ($[20] !== t10 || $[21] !== t4 || $[22] !== t7) {
		t11 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t1,
			children: [
				t4,
				t7,
				t10
			]
		});
		$[20] = t10;
		$[21] = t4;
		$[22] = t7;
		$[23] = t11;
	} else t11 = $[23];
	return t11;
}
//#endregion
//#region src/hooks/useDateFormat.ts
function useDateFormat() {
	const [dateFormat] = useSyncedPref("dateFormat");
	return dateFormat;
}
//#endregion
//#region src/hooks/usePayee.ts
function usePayee(id) {
	return useQuery$1({
		...payeeQueries.list(),
		select: (payees) => payees.find((p) => p.id === id),
		enabled: !!id
	});
}
//#endregion
//#region src/components/util/DisplayId.tsx
function DisplayId(t0) {
	const $ = (0, import_compiler_runtime.c)(4);
	const { type, id, noneColor: t1 } = t0;
	const noneColor = t1 === void 0 ? theme.pageTextSubdued : t1;
	let t2;
	if ($[0] !== id || $[1] !== noneColor || $[2] !== type) {
		t2 = type === "accounts" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccountDisplayId, {
			id,
			noneColor
		}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PayeeDisplayId, {
			id,
			noneColor
		});
		$[0] = id;
		$[1] = noneColor;
		$[2] = type;
		$[3] = t2;
	} else t2 = $[3];
	return t2;
}
function AccountDisplayId(t0) {
	const $ = (0, import_compiler_runtime.c)(13);
	const { id, noneColor } = t0;
	const { t } = useTranslation();
	const account = useAccount(id);
	let t1;
	if ($[0] !== account || $[1] !== noneColor) {
		t1 = account == null ? { color: noneColor } : null;
		$[0] = account;
		$[1] = noneColor;
		$[2] = t1;
	} else t1 = $[2];
	let t2;
	if ($[3] !== account || $[4] !== t) {
		t2 = account ? account.name : t("None");
		$[3] = account;
		$[4] = t;
		$[5] = t2;
	} else t2 = $[5];
	let t3;
	if ($[6] !== account || $[7] !== t) {
		t3 = account ? account.name : t("None");
		$[6] = account;
		$[7] = t;
		$[8] = t3;
	} else t3 = $[8];
	let t4;
	if ($[9] !== t1 || $[10] !== t2 || $[11] !== t3) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
			style: t1,
			title: t2,
			children: t3
		});
		$[9] = t1;
		$[10] = t2;
		$[11] = t3;
		$[12] = t4;
	} else t4 = $[12];
	return t4;
}
function PayeeDisplayId(t0) {
	const $ = (0, import_compiler_runtime.c)(13);
	const { id, noneColor } = t0;
	const { t } = useTranslation();
	const { data: payee } = usePayee(id);
	let t1;
	if ($[0] !== noneColor || $[1] !== payee) {
		t1 = payee == null ? { color: noneColor } : null;
		$[0] = noneColor;
		$[1] = payee;
		$[2] = t1;
	} else t1 = $[2];
	let t2;
	if ($[3] !== payee || $[4] !== t) {
		t2 = payee ? payee.name : t("None");
		$[3] = payee;
		$[4] = t;
		$[5] = t2;
	} else t2 = $[5];
	let t3;
	if ($[6] !== payee || $[7] !== t) {
		t3 = payee ? payee.name : t("None");
		$[6] = payee;
		$[7] = t;
		$[8] = t3;
	} else t3 = $[8];
	let t4;
	if ($[9] !== t1 || $[10] !== t2 || $[11] !== t3) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextOneLine, {
			style: t1,
			title: t2,
			children: t3
		});
		$[9] = t1;
		$[10] = t2;
		$[11] = t3;
		$[12] = t4;
	} else t4 = $[12];
	return t4;
}
//#endregion
//#region ../loot-core/src/shared/transfer.ts
function validForTransfer(fromTransaction, toTransaction) {
	if ([fromTransaction, toTransaction].every((tran) => tran.transfer_id == null) && fromTransaction.account !== toTransaction.account && fromTransaction.amount + toTransaction.amount === 0) return true;
	return false;
}
//#endregion
//#region src/hooks/useTransactionBatchActions.ts
function useTransactionBatchActions() {
	const dispatch = useDispatch();
	const { t } = useTranslation();
	const onBatchEdit = async ({ name, ids, onSuccess }) => {
		const { data } = await aqlQuery(q$1("transactions").filter({ id: { $oneof: ids } }).select("*").options({ splits: "grouped" }));
		const transactions = ungroupTransactions(data);
		const onChange = async (name, value, mode) => {
			let transactionsToChange = transactions;
			value = value === null ? "" : value;
			const changes = {
				added: [],
				deleted: [],
				updated: []
			};
			if (name === "cleared") value = !!transactionsToChange.find((t) => !t.cleared);
			const idSet = new Set(ids);
			transactionsToChange.forEach((trans) => {
				if (name === "cleared" && trans.reconciled) return;
				if (!idSet.has(trans.id)) return;
				let valueToSet = value;
				if (name === "notes") {
					if (mode === "prepend") valueToSet = trans.notes === null ? value : `${String(value)}${trans.notes}`;
					else if (mode === "append") valueToSet = trans.notes === null ? value : `${trans.notes}${String(value)}`;
					else if (mode === "replace") valueToSet = value;
					else if (mode === "findAndReplace" && typeof value === "object" && "useRegex" in value) valueToSet = applyFindReplace(trans.notes, value.find, value.replace, value.useRegex);
				}
				const transaction = {
					...trans,
					[name]: valueToSet
				};
				if (name === "account" && trans.account !== value) transaction.reconciled = false;
				const { diff } = updateTransaction(transactionsToChange, transaction);
				transactionsToChange = applyChanges(diff, transactionsToChange);
				changes.deleted = changes.deleted ? changes.deleted.concat(diff.deleted) : diff.deleted;
				changes.updated = changes.updated ? changes.updated.concat(diff.updated) : diff.updated;
				changes.added = changes.added ? changes.added.concat(diff.added) : diff.added;
			});
			await send("transactions-batch-update", changes);
			onSuccess?.(ids, name, value, mode);
		};
		const pushPayeeAutocompleteModal = () => {
			dispatch(pushModal({ modal: {
				name: "payee-autocomplete",
				options: { onSelect: (payeeId) => onChange(name, payeeId) }
			} }));
		};
		const pushAccountAutocompleteModal = () => {
			dispatch(pushModal({ modal: {
				name: "account-autocomplete",
				options: { onSelect: (accountId) => onChange(name, accountId) }
			} }));
		};
		const pushEditField = () => {
			if (name !== "date" && name !== "amount" && name !== "notes") return;
			dispatch(pushModal({ modal: {
				name: "edit-field",
				options: {
					name,
					onSubmit: (name, value, mode) => onChange(name, value, mode)
				}
			} }));
		};
		const pushCategoryAutocompleteModal = () => {
			const transactionMonth = transactions[0]?.date ? monthFromDate(transactions[0]?.date) : null;
			dispatch(pushModal({ modal: {
				name: "category-autocomplete",
				options: {
					month: transactionMonth && transactions.every((t) => monthFromDate(t.date) === transactionMonth) ? transactionMonth : void 0,
					showNoneOption: true,
					onSelect: (categoryId) => onChange(name, categoryId)
				}
			} }));
		};
		const openFieldEditor = () => {
			if (name === "cleared") onChange("cleared", null);
			else if (name === "category") pushCategoryAutocompleteModal();
			else if (name === "payee") pushPayeeAutocompleteModal();
			else if (name === "account") pushAccountAutocompleteModal();
			else pushEditField();
		};
		if (name === "amount" || name === "payee" || name === "account" || name === "date") await checkForReconciledTransactions(ids, "batchEditWithReconciled", openFieldEditor);
		else openFieldEditor();
	};
	const onBatchDuplicate = async ({ ids, onSuccess }) => {
		const onConfirmDuplicate = async (ids) => {
			const { data } = await aqlQuery(q$1("transactions").filter({ id: { $oneof: ids } }).select("*").options({ splits: "grouped" }));
			await send("transactions-batch-update", { added: data.reduce((newTransactions, trans) => {
				return newTransactions.concat(realizeTempTransactions(ungroupTransaction(trans)).map((t) => ({
					...t,
					cleared: false,
					reconciled: false
				})));
			}, []) });
			onSuccess?.(ids);
		};
		await onConfirmDuplicate(ids);
	};
	const onBatchDelete = async ({ ids, onSuccess }) => {
		const onConfirmDelete = (ids) => {
			dispatch(pushModal({ modal: {
				name: "confirm-delete",
				options: {
					message: ids.length > 1 ? t("Are you sure you want to delete these {{count}} transactions?", { count: ids.length }) : t("Are you sure you want to delete the transaction?"),
					onConfirm: async () => {
						const { data } = await aqlQuery(q$1("transactions").filter({ id: { $oneof: ids } }).select("*").options({ splits: "grouped" }));
						let transactions = ungroupTransactions(data);
						const idSet = new Set(ids);
						const changes = {
							added: [],
							deleted: [],
							updated: []
						};
						transactions.forEach((trans) => {
							const parentId = trans.parent_id;
							if (!idSet.has(trans.id) || parentId && idSet.has(parentId)) return;
							const { diff } = deleteTransaction(transactions, trans.id);
							transactions = applyChanges(diff, transactions);
							changes.deleted = diff.deleted ? changes.deleted.concat(diff.deleted) : diff.deleted;
							changes.updated = diff.updated ? changes.updated.concat(diff.updated) : diff.updated;
						});
						await send("transactions-batch-update", changes);
						onSuccess?.(ids);
					}
				}
			} }));
		};
		await checkForReconciledTransactions(ids, "batchDeleteWithReconciled", onConfirmDelete);
	};
	const onBatchLinkSchedule = async ({ ids, account, onSuccess }) => {
		const { data: transactions } = await aqlQuery(q$1("transactions").filter({ id: { $oneof: ids } }).select("*").options({ splits: "grouped" }));
		dispatch(pushModal({ modal: {
			name: "schedule-link",
			options: {
				transactionIds: ids,
				getTransaction: (id) => transactions.find((t) => t.id === id),
				accountName: account?.name ?? "",
				onScheduleLinked: (schedule) => {
					onSuccess?.(ids, schedule);
				}
			}
		} }));
	};
	const onBatchUnlinkSchedule = async ({ ids, onSuccess }) => {
		await send("transactions-batch-update", { updated: ids.map((id) => ({
			id,
			schedule: null
		})) });
		onSuccess?.(ids);
	};
	const transferReasonMap = {
		batchDeleteWithReconciled: "batchDeleteWithReconciledTransfer",
		batchEditWithReconciled: "batchEditWithReconciledTransfer"
	};
	const checkForReconciledTransactions = async (ids, confirmReason, onConfirm) => {
		const { data } = await aqlQuery(q$1("transactions").filter({
			id: { $oneof: ids },
			reconciled: true
		}).select("*").options({ splits: "grouped" }));
		if (ungroupTransactions(data).length > 0) {
			dispatch(pushModal({ modal: {
				name: "confirm-transaction-edit",
				options: {
					onConfirm: () => {
						onConfirm(ids);
					},
					confirmReason
				}
			} }));
			return;
		}
		const { data: selectedData } = await aqlQuery(q$1("transactions").filter({ id: { $oneof: ids } }).select(["transfer_id"]));
		const transferIds = selectedData.map((t) => t.transfer_id).filter((id) => id != null);
		if (transferIds.length > 0) {
			const { data: reconciledTransfers } = await aqlQuery(q$1("transactions").filter({
				id: { $oneof: transferIds },
				reconciled: true
			}).select("*"));
			if (reconciledTransfers.length > 0) {
				dispatch(pushModal({ modal: {
					name: "confirm-transaction-edit",
					options: {
						onConfirm: () => {
							onConfirm(ids);
						},
						confirmReason: transferReasonMap[confirmReason]
					}
				} }));
				return;
			}
		}
		onConfirm(ids);
	};
	const onSetTransfer = async (ids, payees, onSuccess) => {
		const onConfirmTransfer = async (ids) => {
			const { data: transactions } = await aqlQuery(q$1("transactions").filter({ id: { $oneof: ids } }).select("*"));
			const [fromTrans, toTrans] = transactions;
			if (transactions.length === 2 && validForTransfer(fromTrans, toTrans)) {
				const fromPayee = payees.find((p) => p.transfer_acct === fromTrans.account);
				const toPayee = payees.find((p) => p.transfer_acct === toTrans.account);
				await send("transactions-batch-update", {
					updated: [{
						...fromTrans,
						category: null,
						payee: toPayee?.id,
						transfer_id: toTrans.id
					}, {
						...toTrans,
						category: null,
						payee: fromPayee?.id,
						transfer_id: fromTrans.id
					}],
					runTransfers: false
				});
			}
			onSuccess?.(ids);
		};
		await checkForReconciledTransactions(ids, "batchEditWithReconciled", onConfirmTransfer);
	};
	const onMerge = async (ids, onSuccess) => {
		await send("transactions-merge", ids.map((id) => ({ id })));
		onSuccess();
	};
	return {
		onBatchEdit,
		onBatchDuplicate,
		onBatchDelete,
		onBatchLinkSchedule,
		onBatchUnlinkSchedule,
		onSetTransfer,
		onMerge
	};
}
//#endregion
//#region src/hooks/useTransactionFilters.ts
function toJS(rows) {
	return rows.map((row) => {
		return {
			...row.fields,
			id: row.id,
			name: row.name,
			tombstone: row.tombstone,
			conditionsOp: row.conditions_op,
			conditions: row.conditions
		};
	});
}
function useTransactionFilters() {
	const { data } = useQuery(() => q$1("transaction_filters").select("*"), []);
	return (0, import_react.useMemo)(() => toJS(data ? [...data] : []).sort((a, b) => a.name.trim().localeCompare(b.name.trim(), void 0, { ignorePunctuation: true })), [data]);
}
//#endregion
//#region src/components/autocomplete/CategoryGroupAutocomplete.tsx
function CategoryGroupList(t0) {
	const $ = (0, import_compiler_runtime.c)(25);
	const { items, getItemProps, highlightedIndex, embedded, footer, renderCategoryGroupItem: t1, showHiddenItems } = t0;
	const renderCategoryGroupItem = t1 === void 0 ? defaultRenderCategoryItem : t1;
	let t2;
	if ($[0] !== items) {
		t2 = items.reduce(_temp$3, []);
		$[0] = items;
		$[1] = t2;
	} else t2 = $[1];
	const categoryGroups = t2;
	let t3;
	if ($[2] !== embedded) {
		t3 = !embedded && { maxHeight: 175 };
		$[2] = embedded;
		$[3] = t3;
	} else t3 = $[3];
	let t4;
	if ($[4] !== t3) {
		t4 = {
			overflowY: "auto",
			willChange: "transform",
			padding: "5px 0",
			...t3
		};
		$[4] = t3;
		$[5] = t4;
	} else t4 = $[5];
	let t5;
	if ($[6] !== categoryGroups || $[7] !== embedded || $[8] !== getItemProps || $[9] !== highlightedIndex || $[10] !== renderCategoryGroupItem || $[11] !== showHiddenItems) {
		let t6;
		if ($[13] !== embedded || $[14] !== getItemProps || $[15] !== highlightedIndex || $[16] !== renderCategoryGroupItem || $[17] !== showHiddenItems) {
			t6 = (item_0) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children: renderCategoryGroupItem({
				...getItemProps ? getItemProps({ item: item_0 }) : {},
				item: item_0,
				highlighted: highlightedIndex === item_0.highlightedIndex,
				embedded,
				style: { ...showHiddenItems && item_0.hidden && { color: theme.pageTextSubdued } }
			}) }, item_0.id);
			$[13] = embedded;
			$[14] = getItemProps;
			$[15] = highlightedIndex;
			$[16] = renderCategoryGroupItem;
			$[17] = showHiddenItems;
			$[18] = t6;
		} else t6 = $[18];
		t5 = categoryGroups.map(t6);
		$[6] = categoryGroups;
		$[7] = embedded;
		$[8] = getItemProps;
		$[9] = highlightedIndex;
		$[10] = renderCategoryGroupItem;
		$[11] = showHiddenItems;
		$[12] = t5;
	} else t5 = $[12];
	let t6;
	if ($[19] !== t4 || $[20] !== t5) {
		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t4,
			children: t5
		});
		$[19] = t4;
		$[20] = t5;
		$[21] = t6;
	} else t6 = $[21];
	let t7;
	if ($[22] !== footer || $[23] !== t6) {
		t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, { children: [t6, footer] });
		$[22] = footer;
		$[23] = t6;
		$[24] = t7;
	} else t7 = $[24];
	return t7;
}
function _temp$3(acc, item, index) {
	const itemWithIndex = {
		...item,
		highlightedIndex: index
	};
	acc.push(itemWithIndex);
	return acc;
}
function CategoryGroupAutocomplete(t0) {
	const $ = (0, import_compiler_runtime.c)(21);
	let categoryGroups;
	let closeOnBlur;
	let embedded;
	let props;
	let renderCategoryGroupItem;
	let showHiddenCategories;
	if ($[0] !== t0) {
		({categoryGroups, embedded, closeOnBlur, renderCategoryGroupItem, showHiddenCategories, ...props} = t0);
		$[0] = t0;
		$[1] = categoryGroups;
		$[2] = closeOnBlur;
		$[3] = embedded;
		$[4] = props;
		$[5] = renderCategoryGroupItem;
		$[6] = showHiddenCategories;
	} else {
		categoryGroups = $[1];
		closeOnBlur = $[2];
		embedded = $[3];
		props = $[4];
		renderCategoryGroupItem = $[5];
		showHiddenCategories = $[6];
	}
	const { data: t1 } = useCategories();
	let t2;
	if ($[7] !== t1) {
		t2 = t1 === void 0 ? { grouped: [] } : t1;
		$[7] = t1;
		$[8] = t2;
	} else t2 = $[8];
	const { grouped: defaultCategoryGroups } = t2;
	let t3;
	bb0: {
		const allSuggestions = categoryGroups || defaultCategoryGroups;
		if (!showHiddenCategories) {
			let t4;
			if ($[9] !== allSuggestions) {
				t4 = allSuggestions.filter(_temp2$2);
				$[9] = allSuggestions;
				$[10] = t4;
			} else t4 = $[10];
			t3 = t4;
			break bb0;
		}
		t3 = allSuggestions;
	}
	const categoryGroupSuggestions = t3;
	let t4;
	if ($[11] !== embedded || $[12] !== renderCategoryGroupItem || $[13] !== showHiddenCategories) {
		t4 = (items, getItemProps, highlightedIndex) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CategoryGroupList, {
			items,
			embedded,
			getItemProps,
			highlightedIndex,
			renderCategoryGroupItem,
			showHiddenItems: showHiddenCategories
		});
		$[11] = embedded;
		$[12] = renderCategoryGroupItem;
		$[13] = showHiddenCategories;
		$[14] = t4;
	} else t4 = $[14];
	let t5;
	if ($[15] !== categoryGroupSuggestions || $[16] !== closeOnBlur || $[17] !== embedded || $[18] !== props || $[19] !== t4) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Autocomplete, {
			strict: true,
			highlightFirst: true,
			embedded,
			closeOnBlur,
			suggestions: categoryGroupSuggestions,
			renderItems: t4,
			...props
		});
		$[15] = categoryGroupSuggestions;
		$[16] = closeOnBlur;
		$[17] = embedded;
		$[18] = props;
		$[19] = t4;
		$[20] = t5;
	} else t5 = $[20];
	return t5;
}
function _temp2$2(suggestion) {
	return !suggestion.hidden;
}
function CategoryGroupItem(t0) {
	const $ = (0, import_compiler_runtime.c)(27);
	let className;
	let embedded;
	let highlighted;
	let item;
	let props;
	let style;
	if ($[0] !== t0) {
		({item, className, style, highlighted, embedded, ...props} = t0);
		$[0] = t0;
		$[1] = className;
		$[2] = embedded;
		$[3] = highlighted;
		$[4] = item;
		$[5] = props;
		$[6] = style;
	} else {
		className = $[1];
		embedded = $[2];
		highlighted = $[3];
		item = $[4];
		props = $[5];
		style = $[6];
	}
	const { t } = useTranslation();
	const { isNarrowWidth } = useResponsive();
	let t1;
	let t2;
	let t3;
	if ($[7] !== className || $[8] !== embedded || $[9] !== highlighted || $[10] !== isNarrowWidth || $[11] !== style) {
		const narrowStyle = isNarrowWidth ? {
			...styles.mobileMenuItem,
			borderRadius: 0,
			borderTop: `1px solid ${theme.pillBorder}`
		} : {};
		t1 = "button";
		t2 = style;
		t3 = cx(className, css({
			backgroundColor: highlighted ? theme.menuAutoCompleteBackgroundHover : "transparent",
			color: highlighted ? theme.menuAutoCompleteItemTextHover : theme.menuAutoCompleteItemText,
			padding: 4,
			paddingLeft: 20,
			borderRadius: embedded ? 4 : 0,
			border: "none",
			font: "inherit",
			...narrowStyle
		}));
		$[7] = className;
		$[8] = embedded;
		$[9] = highlighted;
		$[10] = isNarrowWidth;
		$[11] = style;
		$[12] = t1;
		$[13] = t2;
		$[14] = t3;
	} else {
		t1 = $[12];
		t2 = $[13];
		t3 = $[14];
	}
	const t4 = `${item.name}-category-group-item`;
	const t5 = highlighted || void 0;
	let t6;
	if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
		t6 = {
			flexDirection: "row",
			justifyContent: "space-between"
		};
		$[15] = t6;
	} else t6 = $[15];
	const t7 = item.hidden ? " " + t("(hidden)") : "";
	let t8;
	if ($[16] !== item.name || $[17] !== t7) {
		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t6,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TextOneLine, { children: [item.name, t7] })
		});
		$[16] = item.name;
		$[17] = t7;
		$[18] = t8;
	} else t8 = $[18];
	let t9;
	if ($[19] !== props || $[20] !== t1 || $[21] !== t2 || $[22] !== t3 || $[23] !== t4 || $[24] !== t5 || $[25] !== t8) {
		t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
			type: t1,
			style: t2,
			className: t3,
			"data-testid": t4,
			"data-highlighted": t5,
			...props,
			children: t8
		});
		$[19] = props;
		$[20] = t1;
		$[21] = t2;
		$[22] = t3;
		$[23] = t4;
		$[24] = t5;
		$[25] = t8;
		$[26] = t9;
	} else t9 = $[26];
	return t9;
}
function defaultRenderCategoryItem(props) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CategoryGroupItem, { ...props });
}
//#endregion
//#region src/components/autocomplete/FilterList.tsx
function FilterList(t0) {
	const $ = (0, import_compiler_runtime.c)(21);
	const { items, getItemProps, highlightedIndex, embedded } = t0;
	const { t } = useTranslation();
	let t1;
	if ($[0] !== embedded) {
		t1 = !embedded && { maxHeight: 175 };
		$[0] = embedded;
		$[1] = t1;
	} else t1 = $[1];
	let t2;
	if ($[2] !== t1) {
		t2 = {
			overflow: "auto",
			padding: "5px 0",
			...t1
		};
		$[2] = t1;
		$[3] = t2;
	} else t2 = $[3];
	let t3;
	if ($[4] !== t) {
		t3 = t("Saved Filters");
		$[4] = t;
		$[5] = t3;
	} else t3 = $[5];
	let t4;
	if ($[6] !== t3) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ItemHeader, {
			title: t3,
			type: "filter"
		});
		$[6] = t3;
		$[7] = t4;
	} else t4 = $[7];
	let t5;
	if ($[8] !== embedded || $[9] !== getItemProps || $[10] !== highlightedIndex || $[11] !== items) {
		let t6;
		if ($[13] !== embedded || $[14] !== getItemProps || $[15] !== highlightedIndex) {
			t6 = (item, idx) => [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
				...getItemProps ? getItemProps({ item }) : null,
				style: {
					backgroundColor: highlightedIndex === idx ? theme.menuAutoCompleteBackgroundHover : "transparent",
					padding: 4,
					paddingLeft: 20,
					borderRadius: embedded ? 4 : 0
				},
				"data-testid": `${item.name}-filter-item`,
				"data-highlighted": highlightedIndex === idx || void 0,
				children: item.name
			}, item.id)];
			$[13] = embedded;
			$[14] = getItemProps;
			$[15] = highlightedIndex;
			$[16] = t6;
		} else t6 = $[16];
		t5 = items.map(t6);
		$[8] = embedded;
		$[9] = getItemProps;
		$[10] = highlightedIndex;
		$[11] = items;
		$[12] = t5;
	} else t5 = $[12];
	let t6;
	if ($[17] !== t2 || $[18] !== t4 || $[19] !== t5) {
		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t2,
			children: [t4, t5]
		}) });
		$[17] = t2;
		$[18] = t4;
		$[19] = t5;
		$[20] = t6;
	} else t6 = $[20];
	return t6;
}
//#endregion
//#region src/components/autocomplete/FilterAutocomplete.tsx
function FilterAutocomplete(t0) {
	const $ = (0, import_compiler_runtime.c)(10);
	let embedded;
	let props;
	if ($[0] !== t0) {
		({embedded, ...props} = t0);
		$[0] = t0;
		$[1] = embedded;
		$[2] = props;
	} else {
		embedded = $[1];
		props = $[2];
	}
	const filters = useTransactionFilters() || [];
	let t1;
	if ($[3] !== embedded) {
		t1 = (items, getItemProps, highlightedIndex) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FilterList, {
			items,
			getItemProps,
			highlightedIndex,
			embedded
		});
		$[3] = embedded;
		$[4] = t1;
	} else t1 = $[4];
	let t2;
	if ($[5] !== embedded || $[6] !== filters || $[7] !== props || $[8] !== t1) {
		t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Autocomplete, {
			strict: true,
			highlightFirst: true,
			embedded,
			suggestions: filters,
			renderItems: t1,
			...props
		});
		$[5] = embedded;
		$[6] = filters;
		$[7] = props;
		$[8] = t1;
		$[9] = t2;
	} else t2 = $[9];
	return t2;
}
//#endregion
//#region src/components/autocomplete/ReportList.tsx
function ReportList(t0) {
	const $ = (0, import_compiler_runtime.c)(21);
	const { items, getItemProps, highlightedIndex, embedded } = t0;
	const { t } = useTranslation();
	let t1;
	if ($[0] !== embedded) {
		t1 = !embedded && { maxHeight: 175 };
		$[0] = embedded;
		$[1] = t1;
	} else t1 = $[1];
	let t2;
	if ($[2] !== t1) {
		t2 = {
			overflow: "auto",
			padding: "5px 0",
			...t1
		};
		$[2] = t1;
		$[3] = t2;
	} else t2 = $[3];
	let t3;
	if ($[4] !== t) {
		t3 = t("Saved Reports");
		$[4] = t;
		$[5] = t3;
	} else t3 = $[5];
	let t4;
	if ($[6] !== t3) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ItemHeader, { title: t3 });
		$[6] = t3;
		$[7] = t4;
	} else t4 = $[7];
	let t5;
	if ($[8] !== embedded || $[9] !== getItemProps || $[10] !== highlightedIndex || $[11] !== items) {
		let t6;
		if ($[13] !== embedded || $[14] !== getItemProps || $[15] !== highlightedIndex) {
			t6 = (item, idx) => [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
				...getItemProps ? getItemProps({ item }) : null,
				style: {
					backgroundColor: highlightedIndex === idx ? theme.menuAutoCompleteBackgroundHover : "transparent",
					padding: 4,
					paddingLeft: 20,
					borderRadius: embedded ? 4 : 0
				},
				"data-highlighted": highlightedIndex === idx || void 0,
				children: item.name
			}, item.id)];
			$[13] = embedded;
			$[14] = getItemProps;
			$[15] = highlightedIndex;
			$[16] = t6;
		} else t6 = $[16];
		t5 = items.map(t6);
		$[8] = embedded;
		$[9] = getItemProps;
		$[10] = highlightedIndex;
		$[11] = items;
		$[12] = t5;
	} else t5 = $[12];
	let t6;
	if ($[17] !== t2 || $[18] !== t4 || $[19] !== t5) {
		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t2,
			children: [t4, t5]
		}) });
		$[17] = t2;
		$[18] = t4;
		$[19] = t5;
		$[20] = t6;
	} else t6 = $[20];
	return t6;
}
//#endregion
//#region src/components/autocomplete/ReportAutocomplete.tsx
function ReportAutocomplete(t0) {
	const $ = (0, import_compiler_runtime.c)(12);
	let embedded;
	let props;
	if ($[0] !== t0) {
		({embedded, ...props} = t0);
		$[0] = t0;
		$[1] = embedded;
		$[2] = props;
	} else {
		embedded = $[1];
		props = $[2];
	}
	const { data: t1 } = useReports();
	let t2;
	if ($[3] !== t1) {
		t2 = t1 === void 0 ? [] : t1;
		$[3] = t1;
		$[4] = t2;
	} else t2 = $[4];
	const reports = t2;
	let t3;
	if ($[5] !== embedded) {
		t3 = (items, getItemProps, highlightedIndex) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ReportList, {
			items,
			getItemProps,
			highlightedIndex,
			embedded
		});
		$[5] = embedded;
		$[6] = t3;
	} else t3 = $[6];
	let t4;
	if ($[7] !== embedded || $[8] !== props || $[9] !== reports || $[10] !== t3) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Autocomplete, {
			strict: true,
			highlightFirst: true,
			embedded,
			suggestions: reports,
			renderItems: t3,
			...props
		});
		$[7] = embedded;
		$[8] = props;
		$[9] = reports;
		$[10] = t3;
		$[11] = t4;
	} else t4 = $[11];
	return t4;
}
//#endregion
//#region src/components/select/RecurringSchedulePicker.tsx
var MAX_DAY_OF_WEEK_INTERVAL = 5;
function useFrequencyOptions() {
	const $ = (0, import_compiler_runtime.c)(23);
	const { t } = useTranslation();
	let t0;
	if ($[0] !== t) {
		t0 = t("Days");
		$[0] = t;
		$[1] = t0;
	} else t0 = $[1];
	let t1;
	if ($[2] !== t0) {
		t1 = {
			id: "daily",
			name: t0
		};
		$[2] = t0;
		$[3] = t1;
	} else t1 = $[3];
	let t2;
	if ($[4] !== t) {
		t2 = t("Weeks");
		$[4] = t;
		$[5] = t2;
	} else t2 = $[5];
	let t3;
	if ($[6] !== t2) {
		t3 = {
			id: "weekly",
			name: t2
		};
		$[6] = t2;
		$[7] = t3;
	} else t3 = $[7];
	let t4;
	if ($[8] !== t) {
		t4 = t("Months");
		$[8] = t;
		$[9] = t4;
	} else t4 = $[9];
	let t5;
	if ($[10] !== t4) {
		t5 = {
			id: "monthly",
			name: t4
		};
		$[10] = t4;
		$[11] = t5;
	} else t5 = $[11];
	let t6;
	if ($[12] !== t) {
		t6 = t("Years");
		$[12] = t;
		$[13] = t6;
	} else t6 = $[13];
	let t7;
	if ($[14] !== t6) {
		t7 = {
			id: "yearly",
			name: t6
		};
		$[14] = t6;
		$[15] = t7;
	} else t7 = $[15];
	let t8;
	if ($[16] !== t1 || $[17] !== t3 || $[18] !== t5 || $[19] !== t7) {
		t8 = [
			t1,
			t3,
			t5,
			t7
		];
		$[16] = t1;
		$[17] = t3;
		$[18] = t5;
		$[19] = t7;
		$[20] = t8;
	} else t8 = $[20];
	const FREQUENCY_OPTIONS = t8;
	let t9;
	if ($[21] !== FREQUENCY_OPTIONS) {
		t9 = { FREQUENCY_OPTIONS };
		$[21] = FREQUENCY_OPTIONS;
		$[22] = t9;
	} else t9 = $[22];
	return t9;
}
var DAY_OF_MONTH_OPTIONS = [...Array(31).keys()].map((day) => day + 1);
function useDayOfWeekOptions() {
	const $ = (0, import_compiler_runtime.c)(38);
	const { t } = useTranslation();
	let t0;
	if ($[0] !== t) {
		t0 = t("Sunday");
		$[0] = t;
		$[1] = t0;
	} else t0 = $[1];
	let t1;
	if ($[2] !== t0) {
		t1 = {
			id: "SU",
			name: t0
		};
		$[2] = t0;
		$[3] = t1;
	} else t1 = $[3];
	let t2;
	if ($[4] !== t) {
		t2 = t("Monday");
		$[4] = t;
		$[5] = t2;
	} else t2 = $[5];
	let t3;
	if ($[6] !== t2) {
		t3 = {
			id: "MO",
			name: t2
		};
		$[6] = t2;
		$[7] = t3;
	} else t3 = $[7];
	let t4;
	if ($[8] !== t) {
		t4 = t("Tuesday");
		$[8] = t;
		$[9] = t4;
	} else t4 = $[9];
	let t5;
	if ($[10] !== t4) {
		t5 = {
			id: "TU",
			name: t4
		};
		$[10] = t4;
		$[11] = t5;
	} else t5 = $[11];
	let t6;
	if ($[12] !== t) {
		t6 = t("Wednesday");
		$[12] = t;
		$[13] = t6;
	} else t6 = $[13];
	let t7;
	if ($[14] !== t6) {
		t7 = {
			id: "WE",
			name: t6
		};
		$[14] = t6;
		$[15] = t7;
	} else t7 = $[15];
	let t8;
	if ($[16] !== t) {
		t8 = t("Thursday");
		$[16] = t;
		$[17] = t8;
	} else t8 = $[17];
	let t9;
	if ($[18] !== t8) {
		t9 = {
			id: "TH",
			name: t8
		};
		$[18] = t8;
		$[19] = t9;
	} else t9 = $[19];
	let t10;
	if ($[20] !== t) {
		t10 = t("Friday");
		$[20] = t;
		$[21] = t10;
	} else t10 = $[21];
	let t11;
	if ($[22] !== t10) {
		t11 = {
			id: "FR",
			name: t10
		};
		$[22] = t10;
		$[23] = t11;
	} else t11 = $[23];
	let t12;
	if ($[24] !== t) {
		t12 = t("Saturday");
		$[24] = t;
		$[25] = t12;
	} else t12 = $[25];
	let t13;
	if ($[26] !== t12) {
		t13 = {
			id: "SA",
			name: t12
		};
		$[26] = t12;
		$[27] = t13;
	} else t13 = $[27];
	let t14;
	if ($[28] !== t1 || $[29] !== t11 || $[30] !== t13 || $[31] !== t3 || $[32] !== t5 || $[33] !== t7 || $[34] !== t9) {
		t14 = [
			t1,
			t3,
			t5,
			t7,
			t9,
			t11,
			t13
		];
		$[28] = t1;
		$[29] = t11;
		$[30] = t13;
		$[31] = t3;
		$[32] = t5;
		$[33] = t7;
		$[34] = t9;
		$[35] = t14;
	} else t14 = $[35];
	const DAY_OF_WEEK_OPTIONS = t14;
	let t15;
	if ($[36] !== DAY_OF_WEEK_OPTIONS) {
		t15 = { DAY_OF_WEEK_OPTIONS };
		$[36] = DAY_OF_WEEK_OPTIONS;
		$[37] = t15;
	} else t15 = $[37];
	return t15;
}
function parsePatternValue(value) {
	if (value === "last") return -1;
	return Number(value);
}
function parseConfig(config) {
	return {
		start: currentDay(),
		interval: 1,
		frequency: "monthly",
		patterns: [createMonthlyRecurrence(currentDay())],
		skipWeekend: false,
		weekendSolveMode: "before",
		endMode: "never",
		endOccurrences: 1,
		endDate: currentDay(),
		...config
	};
}
function unparseConfig(parsed) {
	return {
		...parsed,
		interval: validInterval(parsed.interval),
		endOccurrences: validInterval(parsed.endOccurrences)
	};
}
function createMonthlyRecurrence(startDate) {
	return {
		value: parseInt(format$2(startDate, "d")),
		type: "day"
	};
}
function boundedRecurrence({ field, value, recurrence }) {
	if (field === "value" && recurrence.type !== "day" && value > MAX_DAY_OF_WEEK_INTERVAL || field === "type" && value !== "day" && recurrence.value > MAX_DAY_OF_WEEK_INTERVAL) return {
		[field]: value,
		value: MAX_DAY_OF_WEEK_INTERVAL
	};
	return { [field]: value };
}
function reducer(state, action) {
	switch (action.type) {
		case "replace-config": return {
			...state,
			config: action.config
		};
		case "change-field": return {
			...state,
			config: {
				...state.config,
				[action.field]: action.value,
				patterns: state.config.frequency !== "monthly" ? [] : state.config.patterns
			}
		};
		case "update-recurrence": return {
			...state,
			config: {
				...state.config,
				patterns: state.config.patterns.map((p) => p === action.recurrence ? {
					...action.recurrence,
					...boundedRecurrence(action)
				} : p)
			}
		};
		case "add-recurrence": return {
			...state,
			config: {
				...state.config,
				patterns: [...state.config.patterns || [], createMonthlyRecurrence(state.config.start)]
			}
		};
		case "remove-recurrence": return {
			...state,
			config: {
				...state.config,
				patterns: state.config.patterns.filter((p) => p !== action.recurrence)
			}
		};
		case "set-skip-weekend": return {
			...state,
			config: {
				...state.config,
				skipWeekend: action.skipWeekend
			}
		};
		case "set-weekend-solve": return {
			...state,
			config: {
				...state.config,
				weekendSolveMode: action.value
			}
		};
		default: return state;
	}
}
function SchedulePreview(t0) {
	const $ = (0, import_compiler_runtime.c)(15);
	const { previewDates } = t0;
	const locale = useLocale();
	const t1 = useDateFormat() || "MM/dd/yyyy";
	let content;
	let t2;
	if ($[0] !== locale || $[1] !== previewDates || $[2] !== t1) {
		t2 = Symbol.for("react.early_return_sentinel");
		bb0: {
			const dateFormat = t1.replace("MM", "M").replace("dd", "d");
			if (!previewDates) {
				t2 = null;
				break bb0;
			}
			if (typeof previewDates === "string") {
				let t3;
				if ($[5] !== previewDates) {
					t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: previewDates });
					$[5] = previewDates;
					$[6] = t3;
				} else t3 = $[6];
				content = t3;
			} else {
				let t3;
				if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
					t3 = { width: "100%" };
					$[7] = t3;
				} else t3 = $[7];
				let t4;
				if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
					t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
						style: { fontWeight: 600 },
						children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Upcoming dates" })
					});
					$[8] = t4;
				} else t4 = $[8];
				let t5;
				if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
					t5 = { marginTop: 10 };
					$[9] = t5;
				} else t5 = $[9];
				const t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SpaceBetween, {
					gap: 20,
					style: t5,
					children: previewDates.map((d, idx) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
						style: { flex: 1 },
						children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: format$2(d, dateFormat, locale) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: format$2(d, "EEEE", locale) })]
					}, idx))
				});
				let t7;
				if ($[10] !== t6) {
					t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
						style: t3,
						children: [t4, t6]
					});
					$[10] = t6;
					$[11] = t7;
				} else t7 = $[11];
				content = t7;
			}
		}
		$[0] = locale;
		$[1] = previewDates;
		$[2] = t1;
		$[3] = content;
		$[4] = t2;
	} else {
		content = $[3];
		t2 = $[4];
	}
	if (t2 !== Symbol.for("react.early_return_sentinel")) return t2;
	let t3;
	if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
		t3 = {
			marginTop: 15,
			color: theme.tableText,
			alignItems: "flex-start"
		};
		$[12] = t3;
	} else t3 = $[12];
	let t4;
	if ($[13] !== content) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SpaceBetween, {
			direction: "vertical",
			gap: 5,
			style: t3,
			children: content
		});
		$[13] = content;
		$[14] = t4;
	} else t4 = $[14];
	return t4;
}
function validInterval(interval) {
	const intInterval = Number(interval);
	return Number.isInteger(intInterval) && intInterval > 0 ? intInterval : 1;
}
function MonthlyPatterns(t0) {
	const $ = (0, import_compiler_runtime.c)(12);
	const { config, dispatch } = t0;
	const { t } = useTranslation();
	const { DAY_OF_WEEK_OPTIONS } = useDayOfWeekOptions();
	let t1;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = { marginTop: 10 };
		$[0] = t1;
	} else t1 = $[0];
	let t2;
	if ($[1] !== DAY_OF_WEEK_OPTIONS || $[2] !== config.patterns || $[3] !== dispatch || $[4] !== t) {
		let t3;
		if ($[6] !== DAY_OF_WEEK_OPTIONS || $[7] !== dispatch || $[8] !== t) {
			t3 = (recurrence, idx) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
				style: {
					display: "flex",
					flexDirection: "row",
					width: "100%"
				},
				children: [
					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Select, {
						options: [
							[-1, t("Last")],
							Menu.line,
							...DAY_OF_MONTH_OPTIONS.map(_temp$2)
						],
						value: recurrence.value,
						onChange: (value) => dispatch({
							type: "update-recurrence",
							recurrence,
							field: "value",
							value: parsePatternValue(value)
						}),
						style: {
							flex: 1,
							marginRight: 10
						}
					}),
					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Select, {
						options: [
							["day", t("Day")],
							Menu.line,
							...DAY_OF_WEEK_OPTIONS.map(_temp2$1)
						],
						value: recurrence.type,
						onChange: (value_0) => {
							dispatch({
								type: "update-recurrence",
								recurrence,
								field: "type",
								value: value_0
							});
						},
						style: {
							flex: 1,
							marginRight: 10
						}
					}),
					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
						variant: "bare",
						"aria-label": t("Remove recurrence"),
						style: { padding: 7 },
						onPress: () => dispatch({
							type: "remove-recurrence",
							recurrence
						}),
						children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgSubtract$2, { style: {
							width: 8,
							height: 8
						} })
					}),
					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
						variant: "bare",
						"aria-label": t("Add recurrence"),
						style: {
							padding: 7,
							marginLeft: 5
						},
						onPress: () => dispatch({ type: "add-recurrence" }),
						children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgAdd$1, { style: {
							width: 10,
							height: 10
						} })
					})
				]
			}, idx);
			$[6] = DAY_OF_WEEK_OPTIONS;
			$[7] = dispatch;
			$[8] = t;
			$[9] = t3;
		} else t3 = $[9];
		t2 = config.patterns.map(t3);
		$[1] = DAY_OF_WEEK_OPTIONS;
		$[2] = config.patterns;
		$[3] = dispatch;
		$[4] = t;
		$[5] = t2;
	} else t2 = $[5];
	let t3;
	if ($[10] !== t2) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SpaceBetween, {
			direction: "vertical",
			gap: 10,
			style: t1,
			children: t2
		});
		$[10] = t2;
		$[11] = t3;
	} else t3 = $[11];
	return t3;
}
function _temp2$1(opt_0) {
	return [opt_0.id, opt_0.name];
}
function _temp$2(opt) {
	return [opt, String(opt)];
}
function RecurringScheduleTooltip(t0) {
	const $ = (0, import_compiler_runtime.c)(135);
	const { config: currentConfig, onClose, onSave } = t0;
	const { t } = useTranslation();
	const [previewDates, setPreviewDates] = (0, import_react.useState)(null);
	const { FREQUENCY_OPTIONS } = useFrequencyOptions();
	let t1;
	if ($[0] !== currentConfig) {
		t1 = parseConfig(currentConfig);
		$[0] = currentConfig;
		$[1] = t1;
	} else t1 = $[1];
	let t2;
	if ($[2] !== t1) {
		t2 = { config: t1 };
		$[2] = t1;
		$[3] = t2;
	} else t2 = $[3];
	const [state, dispatch] = (0, import_react.useReducer)(reducer, t2);
	let t3;
	if ($[4] !== state.config) {
		t3 = state.config.hasOwnProperty("skipWeekend") ? state.config.skipWeekend : false;
		$[4] = state.config;
		$[5] = t3;
	} else t3 = $[5];
	const skipWeekend = t3;
	const dateFormat = useDateFormat() || "MM/dd/yyyy";
	let t4;
	let t5;
	if ($[6] !== currentConfig) {
		t4 = () => {
			dispatch({
				type: "replace-config",
				config: parseConfig(currentConfig)
			});
		};
		t5 = [currentConfig];
		$[6] = currentConfig;
		$[7] = t4;
		$[8] = t5;
	} else {
		t4 = $[7];
		t5 = $[8];
	}
	(0, import_react.useEffect)(t4, t5);
	const { config } = state;
	let t6;
	if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
		t6 = (field, value) => dispatch({
			type: "change-field",
			field,
			value
		});
		$[9] = t6;
	} else t6 = $[9];
	const updateField = t6;
	let t7;
	let t8;
	if ($[10] !== config || $[11] !== t) {
		t7 = () => {
			(async function run() {
				const { data, error } = await sendCatch("schedule/get-upcoming-dates", {
					config: unparseConfig(config),
					count: 4
				});
				setPreviewDates(error ? t("Invalid rule") : data);
			})();
		};
		t8 = [config, t];
		$[10] = config;
		$[11] = t;
		$[12] = t7;
		$[13] = t8;
	} else {
		t7 = $[12];
		t8 = $[13];
	}
	(0, import_react.useEffect)(t7, t8);
	if (previewDates == null) return null;
	let t9;
	if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
		t9 = {
			display: "flex",
			alignItems: "center",
			gap: 5
		};
		$[14] = t9;
	} else t9 = $[14];
	let t10;
	if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
		t10 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", {
			htmlFor: "start",
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "From" })
		});
		$[15] = t10;
	} else t10 = $[15];
	let t11;
	if ($[16] !== t) {
		t11 = t("Start Date");
		$[16] = t;
		$[17] = t11;
	} else t11 = $[17];
	let t12;
	if ($[18] !== t11) {
		t12 = { placeholder: t11 };
		$[18] = t11;
		$[19] = t12;
	} else t12 = $[19];
	let t13;
	let t14;
	if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
		t13 = (value_0) => updateField("start", value_0);
		t14 = { style: { width: 100 } };
		$[20] = t13;
		$[21] = t14;
	} else {
		t13 = $[20];
		t14 = $[21];
	}
	let t15;
	if ($[22] !== config.start || $[23] !== dateFormat || $[24] !== t12) {
		t15 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InitialFocus, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DateSelect, {
			id: "start",
			inputProps: t12,
			value: config.start,
			onSelect: t13,
			containerProps: t14,
			dateFormat
		}) });
		$[22] = config.start;
		$[23] = dateFormat;
		$[24] = t12;
		$[25] = t15;
	} else t15 = $[25];
	let t16;
	if ($[26] !== t) {
		t16 = t("indefinitely");
		$[26] = t;
		$[27] = t16;
	} else t16 = $[27];
	let t17;
	if ($[28] !== t16) {
		t17 = ["never", t16];
		$[28] = t16;
		$[29] = t17;
	} else t17 = $[29];
	let t18;
	if ($[30] !== t) {
		t18 = t("for");
		$[30] = t;
		$[31] = t18;
	} else t18 = $[31];
	let t19;
	if ($[32] !== t18) {
		t19 = ["after_n_occurrences", t18];
		$[32] = t18;
		$[33] = t19;
	} else t19 = $[33];
	let t20;
	if ($[34] !== t) {
		t20 = t("until");
		$[34] = t;
		$[35] = t20;
	} else t20 = $[35];
	let t21;
	if ($[36] !== t20) {
		t21 = ["on_date", t20];
		$[36] = t20;
		$[37] = t21;
	} else t21 = $[37];
	let t22;
	if ($[38] !== t17 || $[39] !== t19 || $[40] !== t21) {
		t22 = [
			t17,
			t19,
			t21
		];
		$[38] = t17;
		$[39] = t19;
		$[40] = t21;
		$[41] = t22;
	} else t22 = $[41];
	let t23;
	if ($[42] === Symbol.for("react.memo_cache_sentinel")) {
		t23 = (value_1) => updateField("endMode", value_1);
		$[42] = t23;
	} else t23 = $[42];
	let t24;
	if ($[43] !== config.endMode || $[44] !== t22) {
		t24 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Select, {
			id: "repeat_end_dropdown",
			options: t22,
			value: config.endMode,
			onChange: t23
		});
		$[43] = config.endMode;
		$[44] = t22;
		$[45] = t24;
	} else t24 = $[45];
	let t25;
	if ($[46] !== config.endMode || $[47] !== config.endOccurrences) {
		t25 = config.endMode === "after_n_occurrences" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
			id: "end_occurrences",
			style: { width: 40 },
			type: "number",
			min: 1,
			onChangeValue: (value_2) => updateField("endOccurrences", value_2),
			defaultValue: config.endOccurrences || 1
		}), config.endOccurrences === "1" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "occurrence" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "occurrences" })] });
		$[46] = config.endMode;
		$[47] = config.endOccurrences;
		$[48] = t25;
	} else t25 = $[48];
	let t26;
	if ($[49] !== config.endDate || $[50] !== config.endMode || $[51] !== dateFormat || $[52] !== t) {
		t26 = config.endMode === "on_date" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DateSelect, {
			id: "end_date",
			inputProps: { placeholder: t("End Date") },
			value: config.endDate,
			onSelect: (value_3) => updateField("endDate", value_3),
			containerProps: { style: { width: 100 } },
			dateFormat
		});
		$[49] = config.endDate;
		$[50] = config.endMode;
		$[51] = dateFormat;
		$[52] = t;
		$[53] = t26;
	} else t26 = $[53];
	let t27;
	if ($[54] !== t15 || $[55] !== t24 || $[56] !== t25 || $[57] !== t26) {
		t27 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
			style: t9,
			children: [
				t10,
				t15,
				t24,
				t25,
				t26
			]
		});
		$[54] = t15;
		$[55] = t24;
		$[56] = t25;
		$[57] = t26;
		$[58] = t27;
	} else t27 = $[58];
	let t28;
	if ($[59] === Symbol.for("react.memo_cache_sentinel")) {
		t28 = { marginTop: 10 };
		$[59] = t28;
	} else t28 = $[59];
	let t29;
	if ($[60] === Symbol.for("react.memo_cache_sentinel")) {
		t29 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
			style: { whiteSpace: "nowrap" },
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Repeat every" })
		});
		$[60] = t29;
	} else t29 = $[60];
	const t30 = `${String(config.interval || 1).length + 4}ch`;
	let t31;
	if ($[61] !== t30) {
		t31 = {
			minWidth: "7ch",
			width: t30,
			maxWidth: "12ch"
		};
		$[61] = t30;
		$[62] = t31;
	} else t31 = $[62];
	let t32;
	if ($[63] === Symbol.for("react.memo_cache_sentinel")) {
		t32 = (value_4) => updateField("interval", value_4);
		$[63] = t32;
	} else t32 = $[63];
	const t33 = config.interval || 1;
	let t34;
	if ($[64] !== t31 || $[65] !== t33) {
		t34 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
			id: "interval",
			style: t31,
			type: "number",
			min: 1,
			onChangeValue: t32,
			defaultValue: t33
		});
		$[64] = t31;
		$[65] = t33;
		$[66] = t34;
	} else t34 = $[66];
	let t35;
	if ($[67] !== FREQUENCY_OPTIONS) {
		t35 = FREQUENCY_OPTIONS.map(_temp3$1);
		$[67] = FREQUENCY_OPTIONS;
		$[68] = t35;
	} else t35 = $[68];
	let t36;
	if ($[69] === Symbol.for("react.memo_cache_sentinel")) {
		t36 = (value_5) => updateField("frequency", value_5);
		$[69] = t36;
	} else t36 = $[69];
	let t37;
	if ($[70] !== config.frequency || $[71] !== t35) {
		t37 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Select, {
			options: t35,
			value: config.frequency,
			onChange: t36
		});
		$[70] = config.frequency;
		$[71] = t35;
		$[72] = t37;
	} else t37 = $[72];
	let t38;
	if ($[73] !== config.frequency || $[74] !== config.patterns) {
		t38 = config.frequency === "monthly" && (config.patterns == null || config.patterns.length === 0) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
			style: { backgroundColor: theme.tableBackground },
			onPress: () => dispatch({ type: "add-recurrence" }),
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Add specific days" })
		}) : null;
		$[73] = config.frequency;
		$[74] = config.patterns;
		$[75] = t38;
	} else t38 = $[75];
	let t39;
	if ($[76] !== t34 || $[77] !== t37 || $[78] !== t38) {
		t39 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SpaceBetween, {
			style: t28,
			gap: 5,
			children: [
				t29,
				t34,
				t37,
				t38
			]
		});
		$[76] = t34;
		$[77] = t37;
		$[78] = t38;
		$[79] = t39;
	} else t39 = $[79];
	let t40;
	if ($[80] !== config) {
		t40 = config.frequency === "monthly" && config.patterns && config.patterns.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MonthlyPatterns, {
			config,
			dispatch
		});
		$[80] = config;
		$[81] = t40;
	} else t40 = $[81];
	let t41;
	if ($[82] === Symbol.for("react.memo_cache_sentinel")) {
		t41 = {
			marginTop: 5,
			alignItems: "flex-start"
		};
		$[82] = t41;
	} else t41 = $[82];
	let t42;
	if ($[83] === Symbol.for("react.memo_cache_sentinel")) {
		t42 = {
			marginTop: 5,
			flex: 1,
			flexDirection: "row",
			alignItems: "center",
			userSelect: "none"
		};
		$[83] = t42;
	} else t42 = $[83];
	let t43;
	if ($[84] === Symbol.for("react.memo_cache_sentinel")) {
		t43 = (e) => {
			dispatch({
				type: "set-skip-weekend",
				skipWeekend: e.target.checked
			});
		};
		$[84] = t43;
	} else t43 = $[84];
	let t44;
	if ($[85] !== skipWeekend) {
		t44 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Checkbox, {
			id: "form_skipwe",
			checked: skipWeekend,
			onChange: t43
		});
		$[85] = skipWeekend;
		$[86] = t44;
	} else t44 = $[86];
	let t45;
	if ($[87] === Symbol.for("react.memo_cache_sentinel")) {
		t45 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", {
			htmlFor: "form_skipwe",
			style: {
				userSelect: "none",
				marginRight: 5
			},
			children: ["Move schedule", " "]
		});
		$[87] = t45;
	} else t45 = $[87];
	let t46;
	if ($[88] !== t) {
		t46 = t("before");
		$[88] = t;
		$[89] = t46;
	} else t46 = $[89];
	let t47;
	if ($[90] !== t46) {
		t47 = ["before", t46];
		$[90] = t46;
		$[91] = t47;
	} else t47 = $[91];
	let t48;
	if ($[92] !== t) {
		t48 = t("after");
		$[92] = t;
		$[93] = t48;
	} else t48 = $[93];
	let t49;
	if ($[94] !== t48) {
		t49 = ["after", t48];
		$[94] = t48;
		$[95] = t49;
	} else t49 = $[95];
	let t50;
	if ($[96] !== t47 || $[97] !== t49) {
		t50 = [t47, t49];
		$[96] = t47;
		$[97] = t49;
		$[98] = t50;
	} else t50 = $[98];
	let t51;
	if ($[99] === Symbol.for("react.memo_cache_sentinel")) {
		t51 = (value_6) => dispatch({
			type: "set-weekend-solve",
			value: value_6
		});
		$[99] = t51;
	} else t51 = $[99];
	const t52 = !skipWeekend;
	let t53;
	if ($[100] !== state.config.weekendSolveMode || $[101] !== t50 || $[102] !== t52) {
		t53 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Select, {
			id: "solve_dropdown",
			options: t50,
			value: state.config.weekendSolveMode,
			onChange: t51,
			disabled: t52
		});
		$[100] = state.config.weekendSolveMode;
		$[101] = t50;
		$[102] = t52;
		$[103] = t53;
	} else t53 = $[103];
	let t54;
	if ($[104] === Symbol.for("react.memo_cache_sentinel")) {
		t54 = {
			userSelect: "none",
			marginLeft: 5
		};
		$[104] = t54;
	} else t54 = $[104];
	let t55;
	if ($[105] === Symbol.for("react.memo_cache_sentinel")) {
		t55 = { beforeOrAfter: "" };
		$[105] = t55;
	} else t55 = $[105];
	let t56;
	if ($[106] === Symbol.for("react.memo_cache_sentinel")) {
		t56 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", {
			htmlFor: "solve_dropdown",
			style: t54,
			children: [
				" ",
				t55,
				" weekend"
			]
		});
		$[106] = t56;
	} else t56 = $[106];
	let t57;
	if ($[107] !== t53) {
		t57 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Trans, { children: [
			t45,
			t53,
			t56
		] });
		$[107] = t53;
		$[108] = t57;
	} else t57 = $[108];
	let t58;
	if ($[109] !== t44 || $[110] !== t57) {
		t58 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SpaceBetween, {
			direction: "vertical",
			style: t41,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
				style: t42,
				children: [t44, t57]
			})
		});
		$[109] = t44;
		$[110] = t57;
		$[111] = t58;
	} else t58 = $[111];
	let t59;
	if ($[112] !== previewDates) {
		t59 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SchedulePreview, { previewDates });
		$[112] = previewDates;
		$[113] = t59;
	} else t59 = $[113];
	let t60;
	if ($[114] === Symbol.for("react.memo_cache_sentinel")) {
		t60 = {
			display: "flex",
			marginTop: 15,
			justifyContent: "flex-end"
		};
		$[114] = t60;
	} else t60 = $[114];
	let t61;
	if ($[115] === Symbol.for("react.memo_cache_sentinel")) {
		t61 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Cancel" });
		$[115] = t61;
	} else t61 = $[115];
	let t62;
	if ($[116] !== onClose) {
		t62 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
			onPress: onClose,
			children: t61
		});
		$[116] = onClose;
		$[117] = t62;
	} else t62 = $[117];
	let t63;
	if ($[118] !== config || $[119] !== onSave) {
		t63 = () => onSave(unparseConfig(config));
		$[118] = config;
		$[119] = onSave;
		$[120] = t63;
	} else t63 = $[120];
	let t64;
	let t65;
	if ($[121] === Symbol.for("react.memo_cache_sentinel")) {
		t64 = { marginLeft: 10 };
		t65 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Apply" });
		$[121] = t64;
		$[122] = t65;
	} else {
		t64 = $[121];
		t65 = $[122];
	}
	let t66;
	if ($[123] !== t63) {
		t66 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
			variant: "primary",
			onPress: t63,
			style: t64,
			children: t65
		});
		$[123] = t63;
		$[124] = t66;
	} else t66 = $[124];
	let t67;
	if ($[125] !== t62 || $[126] !== t66) {
		t67 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
			style: t60,
			children: [t62, t66]
		});
		$[125] = t62;
		$[126] = t66;
		$[127] = t67;
	} else t67 = $[127];
	let t68;
	if ($[128] !== t27 || $[129] !== t39 || $[130] !== t40 || $[131] !== t58 || $[132] !== t59 || $[133] !== t67) {
		t68 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
			t27,
			t39,
			t40,
			t58,
			t59,
			t67
		] });
		$[128] = t27;
		$[129] = t39;
		$[130] = t40;
		$[131] = t58;
		$[132] = t59;
		$[133] = t67;
		$[134] = t68;
	} else t68 = $[134];
	return t68;
}
function _temp3$1(opt) {
	return [opt.id, opt.name];
}
function RecurringSchedulePicker(t0) {
	const $ = (0, import_compiler_runtime.c)(27);
	const { value, buttonStyle, onChange } = t0;
	const { t } = useTranslation();
	const { isNarrowWidth } = useResponsive();
	const triggerRef = (0, import_react.useRef)(null);
	const [isOpen, setIsOpen] = (0, import_react.useState)(false);
	const dateFormat = useDateFormat() || "MM/dd/yyyy";
	const locale = useLocale();
	let t1;
	if ($[0] !== onChange) {
		t1 = function onSave(config) {
			onChange(config);
			setIsOpen(false);
		};
		$[0] = onChange;
		$[1] = t1;
	} else t1 = $[1];
	const onSave = t1;
	let t2;
	if ($[2] !== dateFormat || $[3] !== locale || $[4] !== value) {
		t2 = getRecurringDescription(value, dateFormat, locale);
		$[2] = dateFormat;
		$[3] = locale;
		$[4] = value;
		$[5] = t2;
	} else t2 = $[5];
	const recurringDescription = t2;
	let t3;
	if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
		t3 = () => setIsOpen(false);
		$[6] = t3;
	} else t3 = $[6];
	let t4;
	if ($[7] !== onSave || $[8] !== value) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RecurringScheduleTooltip, {
			config: value,
			onClose: t3,
			onSave
		});
		$[7] = onSave;
		$[8] = value;
		$[9] = t4;
	} else t4 = $[9];
	const tooltip = t4;
	let t5;
	if ($[10] !== buttonStyle) {
		t5 = {
			textAlign: "left",
			...buttonStyle
		};
		$[10] = buttonStyle;
		$[11] = t5;
	} else t5 = $[11];
	let t6;
	if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
		t6 = () => setIsOpen(true);
		$[12] = t6;
	} else t6 = $[12];
	let t7;
	if ($[13] !== recurringDescription || $[14] !== t || $[15] !== value) {
		t7 = value ? recurringDescription : t("No recurring date");
		$[13] = recurringDescription;
		$[14] = t;
		$[15] = value;
		$[16] = t7;
	} else t7 = $[16];
	let t8;
	if ($[17] !== t5 || $[18] !== t7) {
		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
			ref: triggerRef,
			style: t5,
			onPress: t6,
			children: t7
		});
		$[17] = t5;
		$[18] = t7;
		$[19] = t8;
	} else t8 = $[19];
	let t9;
	if ($[20] !== isNarrowWidth || $[21] !== isOpen || $[22] !== tooltip) {
		t9 = isNarrowWidth ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Modal, {
			name: "recurring-schedule-picker",
			isOpen,
			onClose: () => setIsOpen(false),
			children: tooltip
		}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Popover, {
			triggerRef,
			style: {
				padding: 10,
				minWidth: 380,
				width: "auto",
				maxWidth: "100%"
			},
			placement: "bottom start",
			isOpen,
			onOpenChange: () => setIsOpen(false),
			children: tooltip
		});
		$[20] = isNarrowWidth;
		$[21] = isOpen;
		$[22] = tooltip;
		$[23] = t9;
	} else t9 = $[23];
	let t10;
	if ($[24] !== t8 || $[25] !== t9) {
		t10 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, { children: [t8, t9] });
		$[24] = t8;
		$[25] = t9;
		$[26] = t10;
	} else t10 = $[26];
	return t10;
}
//#endregion
//#region src/components/util/PercentInput.tsx
var clampToPercent = (value, max) => Math.max(Math.min(value, max), 0);
function PercentInput(t0) {
	const $ = (0, import_compiler_runtime.c)(37);
	const { id, inputRef, value: t1, onFocus, onBlur, onChangeValue, onUpdatePercent, style, focused, disabled: t2, max: t3 } = t0;
	const initialValue = t1 === void 0 ? 0 : t1;
	const disabled = t2 === void 0 ? false : t2;
	const max = t3 === void 0 ? 100 : t3;
	const format = useFormat();
	let t4;
	if ($[0] !== format || $[1] !== initialValue || $[2] !== max) {
		t4 = () => format(clampToPercent(initialValue, max), "percentage");
		$[0] = format;
		$[1] = initialValue;
		$[2] = max;
		$[3] = t4;
	} else t4 = $[3];
	const [value, setValue] = (0, import_react.useState)(t4);
	let t5;
	let t6;
	if ($[4] !== format || $[5] !== initialValue || $[6] !== max || $[7] !== onUpdatePercent) {
		t5 = () => {
			const clampedInitialValue = clampToPercent(initialValue, max);
			if (clampedInitialValue !== initialValue) {
				setValue(format(clampedInitialValue, "percentage"));
				onUpdatePercent?.(clampedInitialValue);
			}
		};
		t6 = [
			initialValue,
			max,
			onUpdatePercent,
			format
		];
		$[4] = format;
		$[5] = initialValue;
		$[6] = max;
		$[7] = onUpdatePercent;
		$[8] = t5;
		$[9] = t6;
	} else {
		t5 = $[8];
		t6 = $[9];
	}
	(0, import_react.useEffect)(t5, t6);
	const ref = (0, import_react.useRef)(null);
	const mergedRef = useMergedRefs(inputRef, ref);
	let t7;
	let t8;
	if ($[10] !== focused) {
		t7 = () => {
			if (focused) ref.current?.focus();
		};
		t8 = [focused];
		$[10] = focused;
		$[11] = t7;
		$[12] = t8;
	} else {
		t7 = $[11];
		t8 = $[12];
	}
	(0, import_react.useEffect)(t7, t8);
	let t9;
	if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
		t9 = function onSelectionChange() {
			if (!ref.current) return;
			const selectionStart = ref.current.selectionStart;
			if (selectionStart === ref.current.selectionEnd && selectionStart !== null && selectionStart >= ref.current.value.length) ref.current.setSelectionRange(ref.current.value.length - 1, ref.current.value.length - 1);
		};
		$[13] = t9;
	} else t9 = $[13];
	const onSelectionChange = t9;
	let t10;
	if ($[14] !== format || $[15] !== onChangeValue) {
		t10 = function onInputTextChange(val) {
			const number = val.replace(/[^0-9.]/g, "");
			setValue(number ? format(number, "percentage") : "");
			onChangeValue?.(number);
		};
		$[14] = format;
		$[15] = onChangeValue;
		$[16] = t10;
	} else t10 = $[16];
	const onInputTextChange = t10;
	let t11;
	if ($[17] !== max || $[18] !== onInputTextChange || $[19] !== onUpdatePercent || $[20] !== value) {
		t11 = function fireUpdate() {
			const clampedValue = clampToPercent(evalArithmetic(value.replace("%", ""), 0) ?? 0, max);
			onUpdatePercent?.(clampedValue);
			onInputTextChange(String(clampedValue));
		};
		$[17] = max;
		$[18] = onInputTextChange;
		$[19] = onUpdatePercent;
		$[20] = value;
		$[21] = t11;
	} else t11 = $[21];
	const fireUpdate = t11;
	let t12;
	if ($[22] !== fireUpdate || $[23] !== onBlur) {
		t12 = function onInputAmountBlur(e) {
			if (!ref.current?.contains(e.relatedTarget)) fireUpdate();
			onBlur?.(e);
		};
		$[22] = fireUpdate;
		$[23] = onBlur;
		$[24] = t12;
	} else t12 = $[24];
	const onInputAmountBlur = t12;
	let t13;
	if ($[25] !== style) {
		t13 = {
			flex: 1,
			alignItems: "stretch",
			...style
		};
		$[25] = style;
		$[26] = t13;
	} else t13 = $[26];
	let t14;
	if ($[27] !== disabled || $[28] !== fireUpdate || $[29] !== id || $[30] !== mergedRef || $[31] !== onFocus || $[32] !== onInputAmountBlur || $[33] !== onInputTextChange || $[34] !== t13 || $[35] !== value) {
		t14 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
			id,
			ref: mergedRef,
			inputMode: "decimal",
			value,
			disabled,
			style: t13,
			onEnter: fireUpdate,
			onChangeValue: onInputTextChange,
			onBlur: onInputAmountBlur,
			onFocus,
			onSelect: onSelectionChange
		});
		$[27] = disabled;
		$[28] = fireUpdate;
		$[29] = id;
		$[30] = mergedRef;
		$[31] = onFocus;
		$[32] = onInputAmountBlur;
		$[33] = onInputTextChange;
		$[34] = t13;
		$[35] = value;
		$[36] = t14;
	} else t14 = $[36];
	return t14;
}
//#endregion
//#region src/components/util/GenericInput.tsx
var GenericInput = (t0) => {
	const $ = (0, import_compiler_runtime.c)(174);
	let inputStyle;
	let props;
	let ref;
	let style;
	if ($[0] !== t0) {
		({ref, style, inputStyle, ...props} = t0);
		$[0] = t0;
		$[1] = inputStyle;
		$[2] = props;
		$[3] = ref;
		$[4] = style;
	} else {
		inputStyle = $[1];
		props = $[2];
		ref = $[3];
		style = $[4];
	}
	const dispatch = useDispatch();
	const { isNarrowWidth } = useResponsive();
	const { t } = useTranslation();
	const { data: t1 } = useCategories();
	let t2;
	if ($[5] !== t1) {
		t2 = t1 === void 0 ? { grouped: [] } : t1;
		$[5] = t1;
		$[6] = t2;
	} else t2 = $[6];
	const { grouped: categoryGroups } = t2;
	const dateFormat = useDateFormat() || "MM/dd/yyyy";
	let content = null;
	bb0: switch (props.type) {
		case "id": {
			const showPlaceholder = props.multi ? props.value.length === 0 : true;
			let t3;
			if ($[7] !== props.multi || $[8] !== props.onChange || $[9] !== props.value) {
				t3 = props.multi === true ? {
					type: "multi",
					value: props.value,
					onSelect: props.onChange
				} : {
					type: "single",
					value: props.value,
					onSelect: props.onChange
				};
				$[7] = props.multi;
				$[8] = props.onChange;
				$[9] = props.value;
				$[10] = t3;
			} else t3 = $[10];
			const multiProps = t3;
			bb1: switch (props.field) {
				case "payee": {
					const t4 = !isNarrowWidth;
					let t5;
					if ($[11] !== showPlaceholder || $[12] !== t) {
						t5 = showPlaceholder ? { placeholder: t("nothing") } : null;
						$[11] = showPlaceholder;
						$[12] = t;
						$[13] = t5;
					} else t5 = $[13];
					let t6;
					if ($[14] !== dispatch || $[15] !== isNarrowWidth || $[16] !== props) {
						t6 = () => {
							if (!isNarrowWidth) return;
							dispatch(pushModal({ modal: {
								name: "payee-autocomplete",
								options: { onSelect: (newValue_3) => {
									if (props.multi === true) {
										props.onChange([...props.value, newValue_3]);
										return;
									}
									props.onChange(newValue_3);
								} }
							} }));
						};
						$[14] = dispatch;
						$[15] = isNarrowWidth;
						$[16] = props;
						$[17] = t6;
					} else t6 = $[17];
					let t7;
					if ($[18] !== ref || $[19] !== t5 || $[20] !== t6) {
						t7 = {
							ref,
							...t5,
							onClick: t6
						};
						$[18] = ref;
						$[19] = t5;
						$[20] = t6;
						$[21] = t7;
					} else t7 = $[21];
					let t8;
					if ($[22] !== isNarrowWidth || $[23] !== multiProps || $[24] !== t4 || $[25] !== t7) {
						t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PayeeAutocomplete, {
							...multiProps,
							showMakeTransfer: false,
							openOnFocus: t4,
							updateOnValueChange: isNarrowWidth,
							inputProps: t7
						});
						$[22] = isNarrowWidth;
						$[23] = multiProps;
						$[24] = t4;
						$[25] = t7;
						$[26] = t8;
					} else t8 = $[26];
					content = t8;
					break bb1;
				}
				case "account":
					bb2: switch (props.op) {
						case "onBudget":
						case "offBudget":
							content = null;
							break bb2;
						default: {
							const t4 = !isNarrowWidth;
							let t5;
							if ($[27] !== showPlaceholder || $[28] !== t) {
								t5 = showPlaceholder ? { placeholder: t("nothing") } : null;
								$[27] = showPlaceholder;
								$[28] = t;
								$[29] = t5;
							} else t5 = $[29];
							let t6;
							if ($[30] !== dispatch || $[31] !== isNarrowWidth || $[32] !== props) {
								t6 = () => {
									if (!isNarrowWidth) return;
									dispatch(pushModal({ modal: {
										name: "account-autocomplete",
										options: {
											onSelect: (newValue_2) => {
												if (props.multi === true) {
													props.onChange([...props.value, newValue_2]);
													return;
												}
												props.onChange(newValue_2);
											},
											hiddenAccounts: props.multi === true ? props.value : void 0
										}
									} }));
								};
								$[30] = dispatch;
								$[31] = isNarrowWidth;
								$[32] = props;
								$[33] = t6;
							} else t6 = $[33];
							let t7;
							if ($[34] !== ref || $[35] !== t5 || $[36] !== t6) {
								t7 = {
									ref,
									...t5,
									onClick: t6
								};
								$[34] = ref;
								$[35] = t5;
								$[36] = t6;
								$[37] = t7;
							} else t7 = $[37];
							let t8;
							if ($[38] !== isNarrowWidth || $[39] !== multiProps || $[40] !== t4 || $[41] !== t7) {
								t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccountAutocomplete, {
									...multiProps,
									openOnFocus: t4,
									updateOnValueChange: isNarrowWidth,
									inputProps: t7
								});
								$[38] = isNarrowWidth;
								$[39] = multiProps;
								$[40] = t4;
								$[41] = t7;
								$[42] = t8;
							} else t8 = $[42];
							content = t8;
						}
					}
					break bb1;
				case "category": {
					const t4 = !isNarrowWidth;
					let t5;
					if ($[43] !== showPlaceholder || $[44] !== t) {
						t5 = showPlaceholder ? { placeholder: t("nothing") } : null;
						$[43] = showPlaceholder;
						$[44] = t;
						$[45] = t5;
					} else t5 = $[45];
					let t6;
					if ($[46] !== dispatch || $[47] !== isNarrowWidth || $[48] !== props) {
						t6 = () => {
							if (!isNarrowWidth) return;
							dispatch(pushModal({ modal: {
								name: "category-autocomplete",
								options: { onSelect: (newValue_1) => {
									if (newValue_1 === null) return;
									if (props.multi === true) {
										props.onChange([...props.value, newValue_1]);
										return;
									}
									props.onChange(newValue_1);
								} }
							} }));
						};
						$[46] = dispatch;
						$[47] = isNarrowWidth;
						$[48] = props;
						$[49] = t6;
					} else t6 = $[49];
					let t7;
					if ($[50] !== ref || $[51] !== t5 || $[52] !== t6) {
						t7 = {
							ref,
							...t5,
							onClick: t6
						};
						$[50] = ref;
						$[51] = t5;
						$[52] = t6;
						$[53] = t7;
					} else t7 = $[53];
					let t8;
					if ($[54] !== categoryGroups || $[55] !== isNarrowWidth || $[56] !== multiProps || $[57] !== t4 || $[58] !== t7) {
						t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CategoryAutocomplete, {
							...multiProps,
							categoryGroups,
							openOnFocus: t4,
							updateOnValueChange: isNarrowWidth,
							showHiddenCategories: true,
							inputProps: t7
						});
						$[54] = categoryGroups;
						$[55] = isNarrowWidth;
						$[56] = multiProps;
						$[57] = t4;
						$[58] = t7;
						$[59] = t8;
					} else t8 = $[59];
					content = t8;
					break bb1;
				}
				case "category_group": {
					const t4 = !isNarrowWidth;
					let t5;
					if ($[60] !== showPlaceholder || $[61] !== t) {
						t5 = showPlaceholder ? { placeholder: t("nothing") } : null;
						$[60] = showPlaceholder;
						$[61] = t;
						$[62] = t5;
					} else t5 = $[62];
					let t6;
					if ($[63] !== dispatch || $[64] !== isNarrowWidth || $[65] !== props) {
						t6 = () => {
							if (!isNarrowWidth) return;
							dispatch(pushModal({ modal: {
								name: "category-group-autocomplete",
								options: { onSelect: (newValue_0) => {
									if (props.multi === true) {
										props.onChange([...props.value, newValue_0]);
										return;
									}
									props.onChange(newValue_0);
								} }
							} }));
						};
						$[63] = dispatch;
						$[64] = isNarrowWidth;
						$[65] = props;
						$[66] = t6;
					} else t6 = $[66];
					let t7;
					if ($[67] !== ref || $[68] !== t5 || $[69] !== t6) {
						t7 = {
							ref,
							...t5,
							onClick: t6
						};
						$[67] = ref;
						$[68] = t5;
						$[69] = t6;
						$[70] = t7;
					} else t7 = $[70];
					let t8;
					if ($[71] !== categoryGroups || $[72] !== isNarrowWidth || $[73] !== multiProps || $[74] !== t4 || $[75] !== t7) {
						t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CategoryGroupAutocomplete, {
							...multiProps,
							categoryGroups,
							openOnFocus: t4,
							updateOnValueChange: isNarrowWidth,
							showHiddenCategories: true,
							inputProps: t7
						});
						$[71] = categoryGroups;
						$[72] = isNarrowWidth;
						$[73] = multiProps;
						$[74] = t4;
						$[75] = t7;
						$[76] = t8;
					} else t8 = $[76];
					content = t8;
					break bb1;
				}
				default:
			}
			break bb0;
		}
		case "saved": {
			const showSavedPlaceholder = props.multi ? props.value.length === 0 : true;
			let t3;
			if ($[77] !== props.multi || $[78] !== props.onChange || $[79] !== props.value) {
				t3 = props.multi === true ? {
					type: "multi",
					value: props.value,
					onSelect: props.onChange
				} : {
					type: "single",
					value: props.value,
					onSelect: props.onChange
				};
				$[77] = props.multi;
				$[78] = props.onChange;
				$[79] = props.value;
				$[80] = t3;
			} else t3 = $[80];
			const savedMultiProps = t3;
			bb3: switch (props.field) {
				case "saved": {
					let t4;
					if ($[81] !== showSavedPlaceholder || $[82] !== t) {
						t4 = showSavedPlaceholder ? { placeholder: t("nothing") } : null;
						$[81] = showSavedPlaceholder;
						$[82] = t;
						$[83] = t4;
					} else t4 = $[83];
					let t5;
					if ($[84] !== ref || $[85] !== t4) {
						t5 = {
							ref,
							...t4
						};
						$[84] = ref;
						$[85] = t4;
						$[86] = t5;
					} else t5 = $[86];
					let t6;
					if ($[87] !== savedMultiProps || $[88] !== t5) {
						t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FilterAutocomplete, {
							...savedMultiProps,
							openOnFocus: true,
							inputProps: t5
						});
						$[87] = savedMultiProps;
						$[88] = t5;
						$[89] = t6;
					} else t6 = $[89];
					content = t6;
					break bb3;
				}
				case "report": {
					let t4;
					if ($[90] !== showSavedPlaceholder || $[91] !== t) {
						t4 = showSavedPlaceholder ? { placeholder: t("nothing") } : null;
						$[90] = showSavedPlaceholder;
						$[91] = t;
						$[92] = t4;
					} else t4 = $[92];
					let t5;
					if ($[93] !== ref || $[94] !== t4) {
						t5 = {
							ref,
							...t4
						};
						$[93] = ref;
						$[94] = t4;
						$[95] = t5;
					} else t5 = $[95];
					let t6;
					if ($[96] !== savedMultiProps || $[97] !== t5) {
						t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ReportAutocomplete, {
							...savedMultiProps,
							openOnFocus: true,
							inputProps: t5
						});
						$[96] = savedMultiProps;
						$[97] = t5;
						$[98] = t6;
					} else t6 = $[98];
					content = t6;
					break bb3;
				}
				default:
			}
			break bb0;
		}
		case "date":
			bb4: switch (props.field) {
				case "month": {
					const t3 = props.value || "";
					let t4;
					if ($[99] !== dateFormat) {
						t4 = getMonthYearFormat(dateFormat).toLowerCase();
						$[99] = dateFormat;
						$[100] = t4;
					} else t4 = $[100];
					let t5;
					if ($[101] !== props.onChange || $[102] !== ref || $[103] !== t3 || $[104] !== t4) {
						t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
							ref,
							value: t3,
							placeholder: t4,
							onChangeValue: props.onChange
						});
						$[101] = props.onChange;
						$[102] = ref;
						$[103] = t3;
						$[104] = t4;
						$[105] = t5;
					} else t5 = $[105];
					content = t5;
					break bb4;
				}
				case "year": {
					const t3 = props.value || "";
					let t4;
					if ($[106] !== t) {
						t4 = t("yyyy");
						$[106] = t;
						$[107] = t4;
					} else t4 = $[107];
					let t5;
					if ($[108] !== props.onChange || $[109] !== ref || $[110] !== t3 || $[111] !== t4) {
						t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
							ref,
							value: t3,
							placeholder: t4,
							onChangeValue: props.onChange
						});
						$[108] = props.onChange;
						$[109] = ref;
						$[110] = t3;
						$[111] = t4;
						$[112] = t5;
					} else t5 = $[112];
					content = t5;
					break bb4;
				}
				default: if (typeof props.value !== "string") {
					let t3;
					if ($[113] === Symbol.for("react.memo_cache_sentinel")) {
						t3 = { justifyContent: "flex-start" };
						$[113] = t3;
					} else t3 = $[113];
					let t4;
					if ($[114] !== props.onChange || $[115] !== props.value) {
						t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RecurringSchedulePicker, {
							value: props.value,
							buttonStyle: t3,
							onChange: props.onChange
						});
						$[114] = props.onChange;
						$[115] = props.value;
						$[116] = t4;
					} else t4 = $[116];
					content = t4;
				} else {
					const t3 = props.value;
					let t4;
					if ($[117] !== dateFormat) {
						t4 = dateFormat.toLowerCase();
						$[117] = dateFormat;
						$[118] = t4;
					} else t4 = $[118];
					let t5;
					if ($[119] !== t4) {
						t5 = { placeholder: t4 };
						$[119] = t4;
						$[120] = t5;
					} else t5 = $[120];
					let t6;
					if ($[121] !== dateFormat || $[122] !== props.onChange || $[123] !== props.value || $[124] !== ref || $[125] !== t5) {
						t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DateSelect, {
							ref,
							value: t3,
							dateFormat,
							openOnFocus: false,
							inputProps: t5,
							onSelect: props.onChange
						});
						$[121] = dateFormat;
						$[122] = props.onChange;
						$[123] = props.value;
						$[124] = ref;
						$[125] = t5;
						$[126] = t6;
					} else t6 = $[126];
					content = t6;
				}
			}
			break bb0;
		case "boolean": {
			const t3 = props.value;
			const t4 = String(props.value);
			let t5;
			if ($[127] !== props) {
				t5 = () => props.onChange(!props.value);
				$[127] = props;
				$[128] = t5;
			} else t5 = $[128];
			let t6;
			if ($[129] !== props.value || $[130] !== t4 || $[131] !== t5) {
				t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Checkbox, {
					checked: t3,
					value: t4,
					onChange: t5
				});
				$[129] = props.value;
				$[130] = t4;
				$[131] = t5;
				$[132] = t6;
			} else t6 = $[132];
			content = t6;
			break bb0;
		}
		case "number":
			bb5: switch (props.numberFormatType) {
				case "currency": {
					const t3 = props.options?.inflow || props.options?.outflow ? "+" : void 0;
					let t4;
					if ($[133] !== inputStyle || $[134] !== props.onChange || $[135] !== props.value || $[136] !== ref || $[137] !== t3) {
						t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AmountInput, {
							ref,
							value: props.value,
							onUpdate: props.onChange,
							sign: t3,
							inputStyle
						});
						$[133] = inputStyle;
						$[134] = props.onChange;
						$[135] = props.value;
						$[136] = ref;
						$[137] = t3;
						$[138] = t4;
					} else t4 = $[138];
					content = t4;
					break bb5;
				}
				case "percentage": {
					let t3;
					if ($[139] !== inputStyle || $[140] !== props.onChange || $[141] !== props.value || $[142] !== ref) {
						t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PercentInput, {
							inputRef: ref,
							value: props.value,
							onUpdatePercent: props.onChange,
							style: inputStyle
						});
						$[139] = inputStyle;
						$[140] = props.onChange;
						$[141] = props.value;
						$[142] = ref;
						$[143] = t3;
					} else t3 = $[143];
					content = t3;
					break bb5;
				}
				default: {
					const t3 = props.value || "";
					let t4;
					if ($[144] !== t) {
						t4 = t("nothing");
						$[144] = t;
						$[145] = t4;
					} else t4 = $[145];
					let t5;
					if ($[146] !== props) {
						t5 = (newValue) => props.onChange(Number(newValue));
						$[146] = props;
						$[147] = t5;
					} else t5 = $[147];
					let t6;
					if ($[148] !== inputStyle || $[149] !== ref || $[150] !== t3 || $[151] !== t4 || $[152] !== t5) {
						t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
							ref,
							value: t3,
							placeholder: t4,
							onChangeValue: t5,
							style: inputStyle
						});
						$[148] = inputStyle;
						$[149] = ref;
						$[150] = t3;
						$[151] = t4;
						$[152] = t5;
						$[153] = t6;
					} else t6 = $[153];
					content = t6;
				}
			}
			break bb0;
		default: if (props.multi === true) {
			let t3;
			if ($[154] === Symbol.for("react.memo_cache_sentinel")) {
				t3 = [];
				$[154] = t3;
			} else t3 = $[154];
			let t4;
			if ($[155] !== ref) {
				t4 = { ref };
				$[155] = ref;
				$[156] = t4;
			} else t4 = $[156];
			let t5;
			if ($[157] !== props.onChange || $[158] !== props.value || $[159] !== t4) {
				t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Autocomplete, {
					type: "multi",
					suggestions: t3,
					value: props.value,
					inputProps: t4,
					onSelect: props.onChange
				});
				$[157] = props.onChange;
				$[158] = props.value;
				$[159] = t4;
				$[160] = t5;
			} else t5 = $[160];
			content = t5;
		} else {
			const t3 = props.value || "";
			let t4;
			if ($[161] !== t) {
				t4 = t("nothing");
				$[161] = t;
				$[162] = t4;
			} else t4 = $[162];
			let t5;
			if ($[163] !== inputStyle || $[164] !== props.onChange || $[165] !== ref || $[166] !== t3 || $[167] !== t4) {
				t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
					ref,
					value: t3,
					placeholder: t4,
					onChangeValue: props.onChange,
					style: inputStyle
				});
				$[163] = inputStyle;
				$[164] = props.onChange;
				$[165] = ref;
				$[166] = t3;
				$[167] = t4;
				$[168] = t5;
			} else t5 = $[168];
			content = t5;
		}
	}
	let t3;
	if ($[169] !== style) {
		t3 = {
			flex: 1,
			...style
		};
		$[169] = style;
		$[170] = t3;
	} else t3 = $[170];
	let t4;
	if ($[171] !== content || $[172] !== t3) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t3,
			children: content
		});
		$[171] = content;
		$[172] = t3;
		$[173] = t4;
	} else t4 = $[173];
	return t4;
};
//#endregion
//#region src/hooks/useCategory.ts
function useCategory(id) {
	return useQuery$1({
		...categoryQueries.list(),
		select: (data) => data.list.find((c) => c.id === id),
		enabled: !!id
	});
}
//#endregion
//#region src/components/transactions/SimpleTransactionsTable.tsx
function serializeTransaction(transaction, dateFormat) {
	let { date } = transaction;
	if (!isValid$3(parseISO(date))) date = currentDay();
	return {
		...transaction,
		date: format$4(parseISO(date), dateFormat)
	};
}
function TransactionRow(t0) {
	const $ = (0, import_compiler_runtime.c)(35);
	const { transaction, fields, selected, format, index } = t0;
	const { t } = useTranslation();
	const { data: category } = useCategory(transaction.category);
	const account = useAccount(transaction.account);
	const dispatchSelected = useSelectedDispatch();
	const t1 = selected ? theme.tableRowBackgroundHighlight : index % 2 === 0 ? theme.tableBackground : theme.tableRowBackgroundAlternate;
	let t2;
	if ($[0] !== t1) {
		t2 = {
			color: theme.tableText,
			backgroundColor: t1
		};
		$[0] = t1;
		$[1] = t2;
	} else t2 = $[1];
	let t3;
	if ($[2] !== dispatchSelected || $[3] !== transaction.id) {
		t3 = (e) => {
			dispatchSelected({
				type: "select",
				id: transaction.id,
				isRangeSelect: e.shiftKey
			});
		};
		$[2] = dispatchSelected;
		$[3] = transaction.id;
		$[4] = t3;
	} else t3 = $[4];
	let t4;
	if ($[5] !== selected || $[6] !== t3) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectCell, {
			exposed: true,
			focused: false,
			onSelect: t3,
			selected
		});
		$[5] = selected;
		$[6] = t3;
		$[7] = t4;
	} else t4 = $[7];
	let t5;
	if ($[8] !== account?.name || $[9] !== category?.name || $[10] !== fields || $[11] !== format || $[12] !== t || $[13] !== transaction.amount || $[14] !== transaction.date || $[15] !== transaction.imported_payee || $[16] !== transaction.notes || $[17] !== transaction.payee || $[18] !== transaction.schedule) {
		let t6;
		if ($[20] !== account?.name || $[21] !== category?.name || $[22] !== format || $[23] !== t || $[24] !== transaction.amount || $[25] !== transaction.date || $[26] !== transaction.imported_payee || $[27] !== transaction.notes || $[28] !== transaction.payee || $[29] !== transaction.schedule) {
			t6 = (field, i) => {
				switch (field) {
					case "date": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Field, {
						width: 100,
						children: transaction.date
					}, i);
					case "imported_payee": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Field, {
						width: "flex",
						title: transaction.imported_payee,
						children: transaction.imported_payee
					}, i);
					case "payee": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Cell, {
						width: "flex",
						exposed: true,
						style: {
							flexDirection: "row",
							alignItems: "center",
							justifyContent: "flex-start"
						},
						children: () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [transaction.schedule && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgArrowsSynchronize, { style: {
							width: 13,
							height: 13,
							margin: "0 5px"
						} }), transaction.payee && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DisplayId, {
							type: "payees",
							id: transaction.payee
						})] })
					}, i);
					case "category": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Field, {
						width: "flex",
						title: category?.name,
						children: category?.name || ""
					}, i);
					case "account": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Field, {
						width: "flex",
						title: account?.name || t("No account"),
						children: account?.name || t("No account")
					}, i);
					case "notes": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Field, {
						width: "flex",
						title: transaction.notes,
						children: transaction.notes
					}, i);
					case "amount": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Field, {
						width: 75,
						style: { textAlign: "right" },
						children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FinancialText, { children: format(transaction.amount, "financial") })
					}, i);
					default: return null;
				}
			};
			$[20] = account?.name;
			$[21] = category?.name;
			$[22] = format;
			$[23] = t;
			$[24] = transaction.amount;
			$[25] = transaction.date;
			$[26] = transaction.imported_payee;
			$[27] = transaction.notes;
			$[28] = transaction.payee;
			$[29] = transaction.schedule;
			$[30] = t6;
		} else t6 = $[30];
		t5 = fields.map(t6);
		$[8] = account?.name;
		$[9] = category?.name;
		$[10] = fields;
		$[11] = format;
		$[12] = t;
		$[13] = transaction.amount;
		$[14] = transaction.date;
		$[15] = transaction.imported_payee;
		$[16] = transaction.notes;
		$[17] = transaction.payee;
		$[18] = transaction.schedule;
		$[19] = t5;
	} else t5 = $[19];
	let t6;
	if ($[31] !== t2 || $[32] !== t4 || $[33] !== t5) {
		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Row, {
			style: t2,
			children: [t4, t5]
		});
		$[31] = t2;
		$[32] = t4;
		$[33] = t5;
		$[34] = t6;
	} else t6 = $[34];
	return t6;
}
function SimpleTransactionsTable(t0) {
	const $ = (0, import_compiler_runtime.c)(27);
	const { transactions, renderEmpty, fields: t1, style } = t0;
	let t2;
	if ($[0] !== t1) {
		t2 = t1 === void 0 ? [
			"date",
			"payee",
			"amount"
		] : t1;
		$[0] = t1;
		$[1] = t2;
	} else t2 = $[1];
	const fields = t2;
	const format = useFormat();
	const dateFormat = useDateFormat() || "MM/dd/yyyy";
	const selectedItems = useSelectedItems();
	const dispatchSelected = useSelectedDispatch();
	const memoFields = fields;
	let t3;
	if ($[2] !== dateFormat || $[3] !== transactions) {
		let t4;
		if ($[5] !== dateFormat) {
			t4 = (trans) => serializeTransaction(trans, dateFormat);
			$[5] = dateFormat;
			$[6] = t4;
		} else t4 = $[6];
		t3 = transactions.map(t4);
		$[2] = dateFormat;
		$[3] = transactions;
		$[4] = t3;
	} else t3 = $[4];
	const serializedTransactions = t3;
	let t4;
	if ($[7] !== format || $[8] !== memoFields || $[9] !== selectedItems) {
		t4 = (t5) => {
			const { item, index } = t5;
			return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TransactionRow, {
				transaction: item,
				fields: memoFields,
				selected: selectedItems && selectedItems.has(item.id),
				format,
				index
			});
		};
		$[7] = format;
		$[8] = memoFields;
		$[9] = selectedItems;
		$[10] = t4;
	} else t4 = $[10];
	const renderItem = t4;
	const t5 = selectedItems.size > 0;
	let t6;
	if ($[11] !== dispatchSelected) {
		t6 = (e) => dispatchSelected({
			type: "select-all",
			isRangeSelect: e.shiftKey
		});
		$[11] = dispatchSelected;
		$[12] = t6;
	} else t6 = $[12];
	let t7;
	if ($[13] !== t5 || $[14] !== t6) {
		t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectCell, {
			exposed: true,
			focused: false,
			selected: t5,
			width: 20,
			onSelect: t6
		});
		$[13] = t5;
		$[14] = t6;
		$[15] = t7;
	} else t7 = $[15];
	let t8;
	if ($[16] !== fields) {
		t8 = fields.map(_temp$1);
		$[16] = fields;
		$[17] = t8;
	} else t8 = $[17];
	let t9;
	if ($[18] !== t7 || $[19] !== t8) {
		t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [t7, t8] });
		$[18] = t7;
		$[19] = t8;
		$[20] = t9;
	} else t9 = $[20];
	let t10;
	if ($[21] !== renderEmpty || $[22] !== renderItem || $[23] !== serializedTransactions || $[24] !== style || $[25] !== t9) {
		t10 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Table, {
			style,
			backgroundColor: theme.tableBackground,
			items: serializedTransactions,
			renderEmpty,
			headers: t9,
			renderItem
		});
		$[21] = renderEmpty;
		$[22] = renderItem;
		$[23] = serializedTransactions;
		$[24] = style;
		$[25] = t9;
		$[26] = t10;
	} else t10 = $[26];
	return t10;
}
function _temp$1(field, i) {
	switch (field) {
		case "date": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Field, {
			width: 100,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Date" })
		}, i);
		case "imported_payee": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Field, {
			width: "flex",
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Imported payee" })
		}, i);
		case "payee": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Field, {
			width: "flex",
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Payee" })
		}, i);
		case "category": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Field, {
			width: "flex",
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Category" })
		}, i);
		case "account": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Field, {
			width: "flex",
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Account" })
		}, i);
		case "notes": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Field, {
			width: "flex",
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Notes" })
		}, i);
		case "amount": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Field, {
			width: 75,
			style: { textAlign: "right" },
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Amount" })
		}, i);
		default: return null;
	}
}
//#endregion
//#region src/components/rules/FormulaActionEditor.tsx
var FormulaEditor = (0, import_react.lazy)(() => __vitePreload(() => import("./FormulaEditor.0HQ2ATyO.chunk.js").then((module) => ({ default: module.FormulaEditor })), __vite__mapDeps([0,1,2,3])));
function FormulaActionEditor(t0) {
	const $ = (0, import_compiler_runtime.c)(13);
	const { value, onChange, disabled: t1 } = t0;
	const disabled = t1 === void 0 ? false : t1;
	let t2;
	if ($[0] !== onChange) {
		t2 = (newValue) => {
			onChange(newValue.replace(/[\r\n]+/g, " "));
		};
		$[0] = onChange;
		$[1] = t2;
	} else t2 = $[1];
	const handleChange = t2;
	const t3 = disabled ? theme.formInputBackgroundSelection : theme.tableBackground;
	const t4 = disabled ? .6 : 1;
	let t5;
	if ($[2] !== t3 || $[3] !== t4) {
		t5 = {
			flex: 1,
			border: `1px solid ${theme.formInputBorder}`,
			borderRadius: 4,
			overflow: "visible",
			backgroundColor: t3,
			opacity: t4
		};
		$[2] = t3;
		$[3] = t4;
		$[4] = t5;
	} else t5 = $[4];
	let t6;
	if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { height: 32 } });
		$[5] = t6;
	} else t6 = $[5];
	let t7;
	if ($[6] !== disabled || $[7] !== handleChange || $[8] !== value) {
		t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Suspense, {
			fallback: t6,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormulaEditor, {
				value,
				onChange: handleChange,
				mode: "transaction",
				disabled,
				singleLine: true,
				showLineNumbers: false
			})
		});
		$[6] = disabled;
		$[7] = handleChange;
		$[8] = value;
		$[9] = t7;
	} else t7 = $[9];
	let t8;
	if ($[10] !== t5 || $[11] !== t7) {
		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t5,
			children: t7
		});
		$[10] = t5;
		$[11] = t7;
		$[12] = t8;
	} else t8 = $[12];
	return t8;
}
//#endregion
//#region src/components/rules/RuleEditor.tsx
function updateValue(array, value, update) {
	return array.map((v) => v === value ? update() : v);
}
function applyErrors(array, errorsArray) {
	return array.map((item, i) => {
		return {
			...item,
			error: errorsArray[i]
		};
	});
}
function getTransactionFields(conditions, actions) {
	const fields = ["date"];
	if (conditions.find((c) => c.field === "imported_payee")) fields.push("imported_payee");
	fields.push("payee");
	if (actions.find((a) => a.field === "category")) fields.push("category");
	else if (actions.length > 0 && ![
		"payee",
		"date",
		"amount"
	].includes(actions[0].field)) fields.push(actions[0].field);
	fields.push("amount");
	return fields;
}
function FieldSelect(t0) {
	const $ = (0, import_compiler_runtime.c)(8);
	const { fields, style, value, onChange } = t0;
	let t1;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = css({
			color: theme.pageTextPositive,
			"&[data-hovered]": { color: theme.pageTextPositive }
		});
		$[0] = t1;
	} else t1 = $[0];
	let t2;
	if ($[1] !== fields || $[2] !== onChange || $[3] !== value) {
		t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Select, {
			bare: true,
			options: fields,
			value,
			onChange,
			className: t1
		});
		$[1] = fields;
		$[2] = onChange;
		$[3] = value;
		$[4] = t2;
	} else t2 = $[4];
	let t3;
	if ($[5] !== style || $[6] !== t2) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style,
			"data-testid": "field-select",
			children: t2
		});
		$[5] = style;
		$[6] = t2;
		$[7] = t3;
	} else t3 = $[7];
	return t3;
}
function OpSelect(t0) {
	const $ = (0, import_compiler_runtime.c)(16);
	const { ops, type, style, value, formatOp: t1, onChange } = t0;
	const formatOp = t1 === void 0 ? friendlyOp : t1;
	let options;
	if ($[0] !== formatOp || $[1] !== ops || $[2] !== type) {
		let t2;
		if ($[4] !== type) {
			t2 = (op) => type === "id" ? ![
				"contains",
				"matches",
				"doesNotContain",
				"hasTags"
			].includes(op) : true;
			$[4] = type;
			$[5] = t2;
		} else t2 = $[5];
		let t3;
		if ($[6] !== formatOp || $[7] !== type) {
			t3 = (op_0) => [op_0, formatOp(op_0, type)];
			$[6] = formatOp;
			$[7] = type;
			$[8] = t3;
		} else t3 = $[8];
		options = ops.filter(t2).map(t3);
		if (type === "string" || type === "id") options.splice(Math.ceil(options.length / 2), 0, Menu.line);
		$[0] = formatOp;
		$[1] = ops;
		$[2] = type;
		$[3] = options;
	} else options = $[3];
	const opOptions = options;
	let t2;
	if ($[9] !== onChange) {
		t2 = (value_0) => onChange("op", value_0);
		$[9] = onChange;
		$[10] = t2;
	} else t2 = $[10];
	let t3;
	if ($[11] !== opOptions || $[12] !== style || $[13] !== t2 || $[14] !== value) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			"data-testid": "op-select",
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Select, {
				bare: true,
				options: opOptions,
				value,
				onChange: t2,
				style
			})
		});
		$[11] = opOptions;
		$[12] = style;
		$[13] = t2;
		$[14] = value;
		$[15] = t3;
	} else t3 = $[15];
	return t3;
}
function SplitAmountMethodSelect(t0) {
	const $ = (0, import_compiler_runtime.c)(11);
	const { options, style, value, onChange } = t0;
	let t1;
	if ($[0] !== style) {
		t1 = {
			color: theme.pageTextPositive,
			...style
		};
		$[0] = style;
		$[1] = t1;
	} else t1 = $[1];
	let t2;
	if ($[2] !== onChange) {
		t2 = (value_0) => onChange("method", value_0);
		$[2] = onChange;
		$[3] = t2;
	} else t2 = $[3];
	let t3;
	if ($[4] !== options || $[5] !== t2 || $[6] !== value) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Select, {
			bare: true,
			options,
			value,
			onChange: t2
		});
		$[4] = options;
		$[5] = t2;
		$[6] = value;
		$[7] = t3;
	} else t3 = $[7];
	let t4;
	if ($[8] !== t1 || $[9] !== t3) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t1,
			"data-testid": "field-select",
			children: t3
		});
		$[8] = t1;
		$[9] = t3;
		$[10] = t4;
	} else t4 = $[10];
	return t4;
}
function EditorButtons(t0) {
	const $ = (0, import_compiler_runtime.c)(9);
	const { onAdd, onDelete } = t0;
	const { t } = useTranslation();
	let t1;
	if ($[0] !== onDelete || $[1] !== t) {
		t1 = onDelete && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
			variant: "bare",
			onPress: onDelete,
			style: { padding: 7 },
			"aria-label": t("Delete entry"),
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgSubtract$2, { style: {
				width: 8,
				height: 8,
				color: "inherit"
			} })
		});
		$[0] = onDelete;
		$[1] = t;
		$[2] = t1;
	} else t1 = $[2];
	let t2;
	if ($[3] !== onAdd || $[4] !== t) {
		t2 = onAdd && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
			variant: "bare",
			onPress: onAdd,
			style: { padding: 7 },
			"aria-label": t("Add entry"),
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgAdd$1, { style: {
				width: 10,
				height: 10,
				color: "inherit"
			} })
		});
		$[3] = onAdd;
		$[4] = t;
		$[5] = t2;
	} else t2 = $[5];
	let t3;
	if ($[6] !== t1 || $[7] !== t2) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [t1, t2] });
		$[6] = t1;
		$[7] = t2;
		$[8] = t3;
	} else t3 = $[8];
	return t3;
}
function FieldError(t0) {
	const $ = (0, import_compiler_runtime.c)(5);
	const { type } = t0;
	let t1;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = {
			fontSize: 12,
			textAlign: "center",
			color: theme.errorText,
			marginBottom: 5
		};
		$[0] = t1;
	} else t1 = $[0];
	let t2;
	if ($[1] !== type) {
		t2 = getFieldError(type);
		$[1] = type;
		$[2] = t2;
	} else t2 = $[2];
	let t3;
	if ($[3] !== t2) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
			style: t1,
			children: t2
		});
		$[3] = t2;
		$[4] = t3;
	} else t3 = $[4];
	return t3;
}
function Editor(t0) {
	const $ = (0, import_compiler_runtime.c)(9);
	const { error, style, children } = t0;
	let t1;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = { alignItems: "center" };
		$[0] = t1;
	} else t1 = $[0];
	let t2;
	if ($[1] !== children) {
		t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SpaceBetween, {
			gap: 5,
			style: t1,
			children
		});
		$[1] = children;
		$[2] = t2;
	} else t2 = $[2];
	let t3;
	if ($[3] !== error) {
		t3 = error && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FieldError, { type: error });
		$[3] = error;
		$[4] = t3;
	} else t3 = $[4];
	let t4;
	if ($[5] !== style || $[6] !== t2 || $[7] !== t3) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style,
			"data-testid": "editor-row",
			children: [t2, t3]
		});
		$[5] = style;
		$[6] = t2;
		$[7] = t3;
		$[8] = t4;
	} else t4 = $[8];
	return t4;
}
function ConditionEditor(t0) {
	const $ = (0, import_compiler_runtime.c)(40);
	const { ops, condition, editorStyle, isSchedule, onChange, onDelete, onAdd } = t0;
	const { field: originalField, op, value, type, options, error, inputKey } = condition;
	let retValue;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		retValue = [...conditionFields];
		if (retValue && retValue.length > 0) retValue.forEach(_temp);
		$[0] = retValue;
	} else retValue = $[0];
	const translatedConditions = retValue;
	let field_0 = originalField;
	if (field_0 === "amount" && options) {
		if (options.inflow) field_0 = "amount-inflow";
		else if (options.outflow) field_0 = "amount-outflow";
	}
	let valueEditor;
	if (type === "number" && op === "isbetween") {
		let t1;
		if ($[1] !== onChange) {
			t1 = (v) => onChange("value", v);
			$[1] = onChange;
			$[2] = t1;
		} else t1 = $[2];
		let t2;
		if ($[3] !== inputKey || $[4] !== t1 || $[5] !== value) {
			t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BetweenAmountInput, {
				defaultValue: value,
				onChange: t1
			}, inputKey);
			$[3] = inputKey;
			$[4] = t1;
			$[5] = value;
			$[6] = t2;
		} else t2 = $[6];
		valueEditor = t2;
	} else {
		const t1 = value ?? "";
		const t2 = op === "oneOf" || op === "notOneOf";
		let t3;
		if ($[7] !== onChange) {
			t3 = (v_0) => onChange("value", v_0);
			$[7] = onChange;
			$[8] = t3;
		} else t3 = $[8];
		let t4;
		if ($[9] !== field_0 || $[10] !== inputKey || $[11] !== op || $[12] !== t1 || $[13] !== t2 || $[14] !== t3 || $[15] !== type) {
			t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GenericInput, {
				field: field_0,
				type,
				value: t1,
				op,
				multi: t2,
				onChange: t3,
				numberFormatType: "currency"
			}, inputKey);
			$[9] = field_0;
			$[10] = inputKey;
			$[11] = op;
			$[12] = t1;
			$[13] = t2;
			$[14] = t3;
			$[15] = type;
			$[16] = t4;
		} else t4 = $[16];
		valueEditor = t4;
	}
	let t1;
	if ($[17] !== onChange) {
		t1 = (value_0) => onChange("field", value_0);
		$[17] = onChange;
		$[18] = t1;
	} else t1 = $[18];
	let t2;
	if ($[19] !== field_0 || $[20] !== t1) {
		t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FieldSelect, {
			fields: translatedConditions,
			value: field_0,
			onChange: t1
		});
		$[19] = field_0;
		$[20] = t1;
		$[21] = t2;
	} else t2 = $[21];
	let t3;
	if ($[22] !== onChange || $[23] !== op || $[24] !== ops || $[25] !== type) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OpSelect, {
			ops,
			value: op,
			type,
			onChange
		});
		$[22] = onChange;
		$[23] = op;
		$[24] = ops;
		$[25] = type;
		$[26] = t3;
	} else t3 = $[26];
	let t4;
	if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
		t4 = {
			flex: 1,
			minWidth: 80
		};
		$[27] = t4;
	} else t4 = $[27];
	let t5;
	if ($[28] !== valueEditor) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t4,
			children: valueEditor
		});
		$[28] = valueEditor;
		$[29] = t5;
	} else t5 = $[29];
	const t6 = isSchedule && field_0 === "date" ? null : onDelete;
	let t7;
	if ($[30] !== onAdd || $[31] !== t6) {
		t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SpaceBetween, {
			direction: "horizontal",
			gap: 0,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EditorButtons, {
				onAdd,
				onDelete: t6
			})
		});
		$[30] = onAdd;
		$[31] = t6;
		$[32] = t7;
	} else t7 = $[32];
	let t8;
	if ($[33] !== editorStyle || $[34] !== error || $[35] !== t2 || $[36] !== t3 || $[37] !== t5 || $[38] !== t7) {
		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Editor, {
			style: editorStyle,
			error,
			children: [
				t2,
				t3,
				t5,
				t7
			]
		});
		$[33] = editorStyle;
		$[34] = error;
		$[35] = t2;
		$[36] = t3;
		$[37] = t5;
		$[38] = t7;
		$[39] = t8;
	} else t8 = $[39];
	return t8;
}
function _temp(field) {
	field[1] = mapField(field[0]);
}
function formatAmount(amount, format) {
	if (!amount) return format(0, "financial");
	else if (typeof amount === "number") return format(amount, "financial");
	else return `${format(amount.num1, "financial")} to ${format(amount.num2, "financial")}`;
}
function ScheduleDescription(t0) {
	const $ = (0, import_compiler_runtime.c)(41);
	const { id } = t0;
	const { isNarrowWidth } = useResponsive();
	const dateFormat = useDateFormat() || "MM/dd/yyyy";
	const format = useFormat();
	let t1;
	if ($[0] !== id) {
		t1 = q$1("schedules").filter({ id }).select("*");
		$[0] = id;
		$[1] = t1;
	} else t1 = $[1];
	const scheduleQuery = t1;
	let t2;
	if ($[2] !== scheduleQuery) {
		t2 = { query: scheduleQuery };
		$[2] = scheduleQuery;
		$[3] = t2;
	} else t2 = $[3];
	const { schedules, statusLabels, isLoading: isSchedulesLoading } = useSchedules(t2);
	if (isSchedulesLoading) return null;
	const [schedule] = schedules;
	if (schedule && schedules.length === 0) {
		let t3;
		if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
			t3 = { flex: 1 };
			$[4] = t3;
		} else t3 = $[4];
		let t4;
		if ($[5] !== id) {
			t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
				style: t3,
				children: id
			});
			$[5] = id;
			$[6] = t4;
		} else t4 = $[6];
		return t4;
	}
	let t3;
	if ($[7] !== schedule.id || $[8] !== statusLabels) {
		t3 = statusLabels.get(schedule.id);
		$[7] = schedule.id;
		$[8] = statusLabels;
		$[9] = t3;
	} else t3 = $[9];
	const status = t3;
	let t4;
	if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
		t4 = {
			flex: 1,
			flexDirection: "row",
			alignItems: "center",
			justifyContent: "space-between"
		};
		$[10] = t4;
	} else t4 = $[10];
	let t5;
	if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
		t5 = { marginRight: 15 };
		$[11] = t5;
	} else t5 = $[11];
	let t6;
	let t7;
	if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
		t6 = { flexWrap: "nowrap" };
		t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Payee:" });
		$[12] = t6;
		$[13] = t7;
	} else {
		t6 = $[12];
		t7 = $[13];
	}
	let t8;
	if ($[14] !== schedule._payee) {
		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SpaceBetween, {
			gap: 5,
			style: t6,
			children: [t7, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DisplayId, {
				type: "payees",
				id: schedule._payee,
				noneColor: theme.pageTextLight
			})]
		});
		$[14] = schedule._payee;
		$[15] = t8;
	} else t8 = $[15];
	let t10;
	let t11;
	let t9;
	if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
		t9 = { flexShrink: 0 };
		t10 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: " — " });
		t11 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Amount:" });
		$[16] = t10;
		$[17] = t11;
		$[18] = t9;
	} else {
		t10 = $[16];
		t11 = $[17];
		t9 = $[18];
	}
	let t12;
	if ($[19] !== format || $[20] !== schedule._amount) {
		t12 = formatAmount(schedule._amount, format);
		$[19] = format;
		$[20] = schedule._amount;
		$[21] = t12;
	} else t12 = $[21];
	let t13;
	if ($[22] !== t12) {
		t13 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
			style: t9,
			children: [
				t10,
				t11,
				" ",
				/* @__PURE__ */ (0, import_jsx_runtime.jsx)(FinancialText, { children: t12 })
			]
		});
		$[22] = t12;
		$[23] = t13;
	} else t13 = $[23];
	let t14;
	let t15;
	if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
		t14 = { flexShrink: 0 };
		t15 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: " — " });
		$[24] = t14;
		$[25] = t15;
	} else {
		t14 = $[24];
		t15 = $[25];
	}
	let t16;
	if ($[26] !== dateFormat || $[27] !== schedule.next_date) {
		t16 = format$2(schedule.next_date, dateFormat);
		$[26] = dateFormat;
		$[27] = schedule.next_date;
		$[28] = t16;
	} else t16 = $[28];
	let t17;
	if ($[29] !== t16) {
		t17 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
			style: t14,
			children: [t15, /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Trans, { children: ["Next: ", { month: t16 }] })]
		});
		$[29] = t16;
		$[30] = t17;
	} else t17 = $[30];
	let t18;
	if ($[31] !== t13 || $[32] !== t17 || $[33] !== t8) {
		t18 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SpaceBetween, {
			gap: 5,
			style: t5,
			children: [
				t8,
				t13,
				t17
			]
		});
		$[31] = t13;
		$[32] = t17;
		$[33] = t8;
		$[34] = t18;
	} else t18 = $[34];
	let t19;
	if ($[35] !== isNarrowWidth || $[36] !== status) {
		t19 = !isNarrowWidth && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusBadge, { status });
		$[35] = isNarrowWidth;
		$[36] = status;
		$[37] = t19;
	} else t19 = $[37];
	let t20;
	if ($[38] !== t18 || $[39] !== t19) {
		t20 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t4,
			children: [t18, t19]
		});
		$[38] = t18;
		$[39] = t19;
		$[40] = t20;
	} else t20 = $[40];
	return t20;
}
function getActionFields() {
	return [
		"category",
		"payee",
		"payee_name",
		"notes",
		"cleared",
		"account",
		"date",
		"amount"
	].map((field) => [field, mapField(field)]);
}
var parentOnlyFields = [
	"amount",
	"cleared",
	"account",
	"date"
];
function getSplitActionFields() {
	return getActionFields().filter(([field]) => !parentOnlyFields.includes(field));
}
function getAllocationMethodOptions(isFormulaEnabled = false) {
	return Object.entries(getAllocationMethods(isFormulaEnabled));
}
function ActionEditor(t0) {
	const $ = (0, import_compiler_runtime.c)(32);
	const { action, editorStyle, onChange, onDelete, onAdd } = t0;
	const { t } = useTranslation();
	const { field, op, value, type, error, inputKey: t1, options } = action;
	const inputKey = t1 === void 0 ? "initial" : t1;
	const templated = options?.template !== void 0;
	const hasFormula = options?.formula !== void 0;
	const actionTemplating = useFeatureFlag("actionTemplating");
	const formulaMode = useFeatureFlag("formulaMode");
	const isTemplatingEnabled = actionTemplating || templated;
	const isFormulaEnabled = formulaMode || hasFormula;
	let t2;
	if ($[0] !== actionTemplating || $[1] !== field || $[2] !== formulaMode || $[3] !== options?.splitIndex) {
		let t3;
		if ($[5] !== actionTemplating || $[6] !== field || $[7] !== formulaMode) {
			t3 = (t4) => {
				const [s] = t4;
				return actionTemplating || formulaMode || !s.includes("_name") || field === s;
			};
			$[5] = actionTemplating;
			$[6] = field;
			$[7] = formulaMode;
			$[8] = t3;
		} else t3 = $[8];
		t2 = (options?.splitIndex ? getSplitActionFields() : getActionFields()).filter(t3);
		$[0] = actionTemplating;
		$[1] = field;
		$[2] = formulaMode;
		$[3] = options?.splitIndex;
		$[4] = t2;
	} else t2 = $[4];
	const fields = t2;
	let t3;
	if ($[9] !== field || $[10] !== fields || $[11] !== hasFormula || $[12] !== inputKey || $[13] !== isFormulaEnabled || $[14] !== isTemplatingEnabled || $[15] !== onChange || $[16] !== op || $[17] !== options || $[18] !== t || $[19] !== templated || $[20] !== type || $[21] !== value) {
		t3 = op === "set" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)(OpSelect, {
				ops: [
					"set",
					"prepend-notes",
					"append-notes",
					"delete-transaction"
				],
				value: op,
				onChange
			}),
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)(FieldSelect, {
				fields,
				value: field,
				onChange: (value_0) => onChange("field", value_0)
			}),
			/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
				style: { flex: 1 },
				children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
					style: { flex: 1 },
					children: hasFormula ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormulaActionEditor, {
						value: options?.formula || "",
						onChange: (v) => onChange("formula", v, { formula: true })
					}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GenericInput, {
						field,
						type: templated ? "string" : type,
						op,
						value: options?.template ?? value,
						onChange: (v_0) => onChange("value", v_0),
						numberFormatType: "currency",
						inputStyle: { height: 30 }
					}, inputKey)
				}), templated && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
					style: {
						...styles.smallText,
						color: theme.warningText,
						marginTop: 3
					},
					children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Templating is deprecated and will be removed in a future release. Switch this action to a formula instead." })
				})]
			}),
			isFormulaEnabled && [
				"payee",
				"category",
				"account"
			].indexOf(field) === -1 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
				variant: "bare",
				isDisabled: templated,
				style: {
					padding: 5,
					backgroundColor: hasFormula ? theme.buttonPrimaryBackground : void 0,
					height: 24,
					width: 24
				},
				"aria-label": hasFormula ? t("Disable formula") : t("Enable formula"),
				onPress: () => hasFormula ? onChange("formula", void 0) : onChange("formula", options.formula || value || "="),
				children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
					style: {
						fontSize: 14,
						fontFamily: "serif",
						textAlign: "center"
					},
					children: "ƒ"
				})
			}),
			isTemplatingEnabled && [
				"payee",
				"category",
				"account"
			].indexOf(field) === -1 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
				variant: "bare",
				isDisabled: hasFormula,
				style: {
					padding: 5,
					backgroundColor: templated ? theme.buttonPrimaryBackground : void 0
				},
				"aria-label": templated ? t("Disable templating") : t("Enable templating"),
				onPress: () => onChange("template", !templated),
				children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgCode, { style: {
					width: 12,
					height: 12,
					color: "inherit"
				} })
			})
		] }) : op === "set-split-amount" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
				style: {
					padding: "5px 10px",
					lineHeight: "1em",
					flexShrink: 0
				},
				children: t("allocate")
			}),
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SplitAmountMethodSelect, {
				options: getAllocationMethodOptions(isFormulaEnabled),
				value: options.method,
				onChange
			}),
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
				style: {
					flex: 1,
					minWidth: options.method === "fixed-percent" ? 45 : 70
				},
				children: options.method === "formula" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormulaActionEditor, {
					value: options?.formula || "=",
					onChange: (v_1) => onChange("formula", v_1, { formula: true })
				}) : options.method !== "remainder" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GenericInput, {
					field,
					op,
					type: "number",
					numberFormatType: options.method === "fixed-percent" ? "percentage" : "currency",
					value,
					onChange: (v_2) => onChange("value", v_2)
				}, inputKey) : null
			}),
			options.method === "formula" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
				style: {
					padding: 5,
					backgroundColor: theme.buttonPrimaryBackground,
					height: 24,
					width: 24,
					display: "flex",
					alignItems: "center",
					justifyContent: "center",
					borderRadius: 4
				},
				"aria-label": t("Formula mode indicator"),
				role: "img",
				children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
					style: {
						fontSize: 14,
						fontFamily: "serif",
						textAlign: "center"
					},
					children: "ƒ"
				})
			})
		] }) : op === "link-schedule" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: {
				padding: "5px 10px",
				color: theme.pageTextPositive
			},
			children: friendlyOp(op)
		}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScheduleDescription, { id: value || null })] }) : op === "prepend-notes" || op === "append-notes" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(OpSelect, {
			ops: [
				"set",
				"prepend-notes",
				"append-notes",
				"delete-transaction"
			],
			value: op,
			onChange
		}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: { flex: 1 },
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GenericInput, {
				field,
				type: "string",
				op,
				value,
				onChange: (v_3) => onChange("value", v_3)
			}, inputKey)
		})] }) : op === "delete-transaction" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OpSelect, {
			ops: [
				"set",
				"prepend-notes",
				"append-notes",
				"delete-transaction"
			],
			value: op,
			onChange
		}) : null;
		$[9] = field;
		$[10] = fields;
		$[11] = hasFormula;
		$[12] = inputKey;
		$[13] = isFormulaEnabled;
		$[14] = isTemplatingEnabled;
		$[15] = onChange;
		$[16] = op;
		$[17] = options;
		$[18] = t;
		$[19] = templated;
		$[20] = type;
		$[21] = value;
		$[22] = t3;
	} else t3 = $[22];
	let t4;
	if ($[23] !== onAdd || $[24] !== onDelete || $[25] !== op) {
		t4 = op !== "delete-transaction" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SpaceBetween, {
			gap: 0,
			style: { flexShrink: 0 },
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EditorButtons, {
				onAdd,
				onDelete: (op === "set" || op === "prepend-notes" || op === "append-notes") && onDelete
			})
		});
		$[23] = onAdd;
		$[24] = onDelete;
		$[25] = op;
		$[26] = t4;
	} else t4 = $[26];
	let t5;
	if ($[27] !== editorStyle || $[28] !== error || $[29] !== t3 || $[30] !== t4) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Editor, {
			style: editorStyle,
			error,
			children: [t3, t4]
		});
		$[27] = editorStyle;
		$[28] = error;
		$[29] = t3;
		$[30] = t4;
		$[31] = t5;
	} else t5 = $[31];
	return t5;
}
function StageInfo() {
	const $ = (0, import_compiler_runtime.c)(4);
	let t0;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t0 = {
			position: "relative",
			marginLeft: 5
		};
		$[0] = t0;
	} else t0 = $[0];
	let t1;
	if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "The stage of a rule allows you to force a specific order. Pre rules always run first, and post rules always run last. Within each stage rules are automatically ordered from least to most specific." });
		$[1] = t1;
	} else t1 = $[1];
	let t2;
	if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = {
			...styles.tooltip,
			padding: 10,
			color: theme.pageTextLight,
			maxWidth: 450,
			lineHeight: 1.5
		};
		$[2] = t2;
	} else t2 = $[2];
	let t3;
	if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t0,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tooltip, {
				content: t1,
				placement: "bottom start",
				style: t2,
				children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgInformationOutline, { style: {
					width: 11,
					height: 11,
					color: theme.pageTextLight
				} })
			})
		});
		$[3] = t3;
	} else t3 = $[3];
	return t3;
}
function StageButton(t0) {
	const $ = (0, import_compiler_runtime.c)(9);
	const { selected, children, style, onSelect } = t0;
	let t1;
	if ($[0] !== selected) {
		t1 = selected && {
			backgroundColor: theme.pillBackgroundSelected,
			":hover": { backgroundColor: theme.pillBackgroundSelected }
		};
		$[0] = selected;
		$[1] = t1;
	} else t1 = $[1];
	let t2;
	if ($[2] !== style || $[3] !== t1) {
		t2 = {
			fontSize: "inherit",
			...t1,
			...style
		};
		$[2] = style;
		$[3] = t1;
		$[4] = t2;
	} else t2 = $[4];
	let t3;
	if ($[5] !== children || $[6] !== onSelect || $[7] !== t2) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
			variant: "bare",
			style: t2,
			onPress: onSelect,
			children
		});
		$[5] = children;
		$[6] = onSelect;
		$[7] = t2;
		$[8] = t3;
	} else t3 = $[8];
	return t3;
}
function newInput(item) {
	return {
		...item,
		inputKey: v4()
	};
}
function ConditionsList(t0) {
	const $ = (0, import_compiler_runtime.c)(20);
	const { conditionsOp, conditions, editorStyle, isSchedule, onChangeConditions } = t0;
	let t1;
	if ($[0] !== conditions || $[1] !== conditionsOp || $[2] !== onChangeConditions) {
		t1 = function addCondition(index) {
			if (conditionFields && conditionFields.length > 0) conditionFields.forEach(_temp2);
			let fields = conditionFields.map(_temp3).filter(_temp4);
			if (conditions.length && conditionsOp === "or") fields = [conditions[0].field];
			else fields = fields.filter((f_1) => !conditions.some((c) => c.field.includes(f_1) || f_1.includes(c.field)));
			const field_0 = fields[0] || "payee";
			const copy = [...conditions];
			copy.splice(index + 1, 0, {
				type: FIELD_TYPES.get(field_0),
				field: field_0,
				op: "is",
				value: null,
				inputKey: v4()
			});
			onChangeConditions(copy);
		};
		$[0] = conditions;
		$[1] = conditionsOp;
		$[2] = onChangeConditions;
		$[3] = t1;
	} else t1 = $[3];
	const addCondition = t1;
	let t2;
	if ($[4] !== addCondition) {
		t2 = function addInitialCondition() {
			addCondition(-1);
		};
		$[4] = addCondition;
		$[5] = t2;
	} else t2 = $[5];
	const addInitialCondition = t2;
	let t3;
	if ($[6] !== conditions || $[7] !== onChangeConditions) {
		t3 = function removeCondition(cond) {
			onChangeConditions(conditions.filter((c_0) => c_0 !== cond));
		};
		$[6] = conditions;
		$[7] = onChangeConditions;
		$[8] = t3;
	} else t3 = $[8];
	const removeCondition = t3;
	let t4;
	if ($[9] !== conditions || $[10] !== onChangeConditions) {
		t4 = function updateCondition(cond_0, field_1, value) {
			onChangeConditions(updateValue(conditions, cond_0, () => {
				if (field_1 === "field") {
					const newCond = { field: value };
					if (value === "amount-inflow") {
						newCond.field = "amount";
						newCond.options = { inflow: true };
					} else if (value === "amount-outflow") {
						newCond.field = "amount";
						newCond.options = { outflow: true };
					}
					newCond.type = FIELD_TYPES.get(newCond.field);
					const prevType = FIELD_TYPES.get(cond_0.field);
					if ((prevType === "string" || prevType === "number") && prevType === newCond.type && cond_0.op !== "isbetween" && isValidOp(newCond.field, cond_0.op)) {
						newCond.op = cond_0.op;
						return newInput(makeValue(cond_0.value, newCond));
					} else {
						newCond.op = getValidOps(newCond.field)[0];
						return newInput(makeValue(null, newCond));
					}
				} else if (field_1 === "op") {
					const op = value;
					if (cond_0.op !== "oneOf" && cond_0.op !== "notOneOf" && (op === "oneOf" || op === "notOneOf")) return newInput(makeValue(cond_0.value != null ? [cond_0.value] : [], {
						...cond_0,
						op: value
					}));
					else if ((cond_0.op === "oneOf" || cond_0.op === "notOneOf") && op !== "oneOf" && op !== "notOneOf") return newInput(makeValue(cond_0.value.length > 0 ? cond_0.value[0] : null, {
						...cond_0,
						op: value
					}));
					else if (cond_0.op !== "isbetween" && op === "isbetween") return makeValue({
						num1: cond_0.value,
						num2: cond_0.value
					}, {
						...cond_0,
						op: value
					});
					else if (cond_0.op === "isbetween" && op !== "isbetween") return makeValue(cond_0.value.num1 || 0, {
						...cond_0,
						op: value
					});
					else return {
						...cond_0,
						op: value
					};
				} else if (field_1 === "value") return makeValue(value, cond_0);
				return cond_0;
			}));
		};
		$[9] = conditions;
		$[10] = onChangeConditions;
		$[11] = t4;
	} else t4 = $[11];
	const updateCondition = t4;
	let t5;
	if ($[12] !== addCondition || $[13] !== addInitialCondition || $[14] !== conditions || $[15] !== editorStyle || $[16] !== isSchedule || $[17] !== removeCondition || $[18] !== updateCondition) {
		t5 = conditions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
			style: { alignSelf: "flex-start" },
			onPress: addInitialCondition,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Add condition" })
		}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SpaceBetween, {
			direction: "vertical",
			gap: 10,
			"data-testid": "condition-list",
			children: conditions.map((cond_1, i) => {
				let ops = getValidOps(cond_1.field);
				if (cond_1.type === "date" && cond_1.value && cond_1.value.frequency) ops = ["is", "isapprox"];
				else if (cond_1.options && (cond_1.options.inflow || cond_1.options.outflow)) ops = ops.filter(_temp5);
				return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
					style: { width: "100%" },
					children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ConditionEditor, {
						editorStyle,
						ops,
						condition: cond_1,
						isSchedule,
						onChange: (name, value_0) => {
							updateCondition(cond_1, name, value_0);
						},
						onDelete: () => removeCondition(cond_1),
						onAdd: () => addCondition(i)
					})
				}, i);
			})
		});
		$[12] = addCondition;
		$[13] = addInitialCondition;
		$[14] = conditions;
		$[15] = editorStyle;
		$[16] = isSchedule;
		$[17] = removeCondition;
		$[18] = updateCondition;
		$[19] = t5;
	} else t5 = $[19];
	return t5;
}
function _temp5(op_0) {
	return op_0 !== "isbetween";
}
function _temp4(f_0) {
	return f_0 !== "amount-inflow" && f_0 !== "amount-outflow";
}
function _temp3(f) {
	return f[0];
}
function _temp2(field) {
	field[1] = mapField(field[0]);
}
var getActions = (splits) => splits.flatMap((s) => s.actions);
var getUnparsedActions = (splits) => getActions(splits).map(unparse);
var conditionFields = [
	"imported_payee",
	"account",
	"category",
	"category_group",
	"date",
	"payee",
	"notes",
	"amount"
].map((field) => [field, mapField(field)]).concat([["amount-inflow", mapField("amount", { inflow: true })], ["amount-outflow", mapField("amount", { outflow: true })]]);
function RuleEditor({ rule: defaultRule, onSave: originalOnSave = void 0, onDelete, onCancel, style }) {
	const { t } = useTranslation();
	const [conditions, setConditions] = (0, import_react.useState)(defaultRule.conditions.map(parse$2).map((c) => ({
		...c,
		inputKey: v4()
	})));
	const [actionSplits, setActionSplits] = (0, import_react.useState)(() => {
		return defaultRule.actions.map(parse$2).reduce((acc, action) => {
			const splitIndex = action.options?.splitIndex ?? 0;
			acc[splitIndex] = acc[splitIndex] ?? {
				id: v4(),
				actions: []
			};
			acc[splitIndex].actions.push({
				...action,
				inputKey: v4()
			});
			return acc;
		}, [{
			id: v4(),
			actions: []
		}]);
	});
	const [stage, setStage] = (0, import_react.useState)(defaultRule.stage);
	const [conditionsOp, setConditionsOp] = (0, import_react.useState)(defaultRule.conditionsOp);
	const [transactions, setTransactions] = (0, import_react.useState)([]);
	const dispatch = useDispatch();
	const scrollableEl = (0, import_react.useRef)(void 0);
	const isSchedule = getActions(actionSplits).some((action_0) => action_0.op === "link-schedule");
	(0, import_react.useEffect)(() => {
		disableUndo();
		return () => enableUndo();
	}, [dispatch]);
	(0, import_react.useEffect)(() => {
		if (scrollableEl.current) {
			const el = scrollableEl.current;
			const top = el.scrollTop;
			el.scrollTop = top + 1;
			el.scrollTop = top;
		}
		async function run() {
			const { filters } = await send("make-filters-from-conditions", { conditions: conditions.map(unparse) });
			if (filters.length > 0) {
				const conditionsOpKey = conditionsOp === "or" ? "$or" : "$and";
				const parentOnlyCondition = actionSplits.length > 1 ? { is_child: false } : {};
				const { data: transactions_0 } = await aqlQuery(q$1("transactions").filter({
					[conditionsOpKey]: filters,
					...parentOnlyCondition
				}).select("*"));
				setTransactions(transactions_0);
			} else setTransactions([]);
		}
		run();
	}, [
		actionSplits,
		conditions,
		conditionsOp
	]);
	const selectedInst = useSelected("transactions", transactions, []);
	function addInitialAction() {
		addActionToSplitAfterIndex(0, -1);
	}
	function addActionToSplitAfterIndex(splitIndex_0, actionIndex) {
		let newAction;
		if (splitIndex_0 && !actionSplits[splitIndex_0]?.actions?.length) {
			actionSplits[splitIndex_0] = {
				id: v4(),
				actions: []
			};
			newAction = {
				op: "set-split-amount",
				options: {
					method: "remainder",
					splitIndex: splitIndex_0
				},
				value: null,
				inputKey: v4()
			};
		} else {
			let fields = (splitIndex_0 === 0 ? getActionFields() : getSplitActionFields()).map((f) => f[0]);
			for (const action_1 of actionSplits[splitIndex_0].actions) fields = fields.filter((f_0) => f_0 !== action_1.field);
			const field = fields[0] || "category";
			newAction = {
				type: FIELD_TYPES.get(field),
				field,
				op: "set",
				value: "",
				options: { splitIndex: splitIndex_0 },
				inputKey: v4()
			};
		}
		const actionsCopy = [...actionSplits[splitIndex_0].actions];
		actionsCopy.splice(actionIndex + 1, 0, newAction);
		const copy = [...actionSplits];
		copy[splitIndex_0] = {
			...actionSplits[splitIndex_0],
			actions: actionsCopy
		};
		setActionSplits(copy);
	}
	function onChangeAction(action_2, field_0, value, extraOptions) {
		setActionSplits(actionSplits.map(({ id, actions }) => ({
			id,
			actions: updateValue(actions, action_2, () => {
				const a = { ...action_2 };
				if (field_0 === "method") a.options = {
					...a.options,
					method: value
				};
				else if (field_0 === "template") if (value) a.options = {
					...a.options,
					template: a.value
				};
				else {
					a.options = {
						...a.options,
						template: void 0
					};
					if (a.type !== "string") a.value = null;
				}
				else if (field_0 === "formula") if (value === void 0) {
					a.options = {
						...a.options,
						formula: void 0
					};
					if (a.type !== "string") a.value = null;
				} else a.options = {
					...a.options,
					formula: String(value)
				};
				else {
					if (extraOptions?.formula && a.options?.formula !== void 0) a.options = {
						...a.options,
						formula: value
					};
					else if (a.options?.template !== void 0) a.options = {
						...a.options,
						template: value
					};
					else a[field_0] = value;
					if (field_0 === "field") {
						a.type = FIELD_TYPES.get(a.field);
						a.value = value === "date" ? "" : null;
						a.options = {
							...a.options,
							template: void 0,
							formula: void 0
						};
						return newInput(a);
					} else if (field_0 === "op") {
						a.value = null;
						a.inputKey = "" + Math.random();
						a.options = {
							...a.options,
							template: void 0
						};
						return newInput(a);
					}
				}
				return a;
			})
		})));
	}
	function onChangeStage(stage_0) {
		setStage(stage_0);
	}
	function onChangeConditionsOp(value_0) {
		setConditionsOp(value_0);
	}
	function onRemoveAction(action_3) {
		setActionSplits((splits) => splits.map(({ id: id_0, actions: actions_0 }) => ({
			id: id_0,
			actions: actions_0.filter((a_0) => a_0 !== action_3)
		})));
	}
	function onRemoveSplit(splitIndexToRemove) {
		setActionSplits((splits_0) => {
			const copy_0 = [];
			splits_0.forEach(({ id: id_1 }, index) => {
				if (index === splitIndexToRemove) return;
				copy_0.push({
					id: id_1,
					actions: []
				});
			});
			getActions(splits_0).forEach((action_4) => {
				const currentSplitIndex = action_4.options?.splitIndex ?? 0;
				if (currentSplitIndex === splitIndexToRemove) return;
				const newSplitIndex = currentSplitIndex > splitIndexToRemove ? currentSplitIndex - 1 : currentSplitIndex;
				copy_0[newSplitIndex].actions.push({
					...action_4,
					options: {
						...action_4.options,
						splitIndex: newSplitIndex
					}
				});
			});
			return copy_0;
		});
	}
	function onApply() {
		send("rule-apply-actions", {
			transactions: transactions.filter(({ id: id_2 }) => selectedInst.items.has(id_2)),
			actions: getUnparsedActions(actionSplits)
		}).then((content) => {
			content.errors.forEach((error) => {
				dispatch(addNotification({ notification: {
					type: "error",
					message: error
				} }));
			});
			setActionSplits([...actionSplits]);
		});
	}
	async function onSave() {
		const rule = {
			...defaultRule,
			stage,
			conditionsOp,
			conditions: conditions.map(unparse),
			actions: getUnparsedActions(actionSplits)
		};
		const { error: error_0, id: newId } = await send(rule.id ? "rule-update" : "rule-add", rule);
		if (error_0) {
			if (error_0.conditionErrors) setConditions(applyErrors(conditions, error_0.conditionErrors));
			if (error_0.actionErrors) {
				let usedErrorIdx = 0;
				setActionSplits(actionSplits.map((item) => ({
					...item,
					actions: item.actions.map((action_5) => ({
						...action_5,
						error: error_0.actionErrors[usedErrorIdx++] ?? null
					}))
				})));
			}
		} else {
			if (newId) rule.id = newId;
			originalOnSave?.(rule);
		}
	}
	const showSplitButton = actionSplits.length > 0;
	return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
		style,
		children: [
			/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
				style: {
					flexDirection: "row",
					alignItems: "center",
					marginBottom: 15,
					padding: "0 20px"
				},
				children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
					style: { marginRight: 15 },
					children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Stage of rule:" })
				}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SpaceBetween, {
					gap: 5,
					style: { alignItems: "center" },
					children: [
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)(StageButton, {
							selected: stage === "pre",
							onSelect: () => onChangeStage("pre"),
							children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Pre" })
						}),
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)(StageButton, {
							selected: stage === null,
							onSelect: () => onChangeStage(null),
							children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Default" })
						}),
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)(StageButton, {
							selected: stage === "post",
							onSelect: () => onChangeStage("post"),
							children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Post" })
						}),
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)(StageInfo, {})
					]
				})]
			}),
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
				innerRef: scrollableEl,
				style: {
					borderBottom: "1px solid " + theme.tableBorder,
					padding: "0 20px 20px 20px",
					overflow: "auto",
					maxHeight: "calc(100% - 300px)",
					minHeight: 100,
					position: "relative",
					zIndex: 2
				},
				children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
					style: { flexShrink: 0 },
					children: [
						/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
							style: { marginBottom: 30 },
							children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
								style: { marginBottom: 15 },
								children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Trans, { children: [
									"If",
									" ",
									/* @__PURE__ */ (0, import_jsx_runtime.jsx)(FieldSelect, {
										"data-testid": "conditions-op",
										style: { display: "inline-flex" },
										fields: [["and", t("all")], ["or", t("any")]],
										value: conditionsOp,
										onChange: onChangeConditionsOp
									}),
									{ allOrAny: "" },
									" of these conditions match:"
								] })
							}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ConditionsList, {
								conditionsOp,
								conditions,
								editorStyle: styles.editorPill,
								isSchedule,
								onChangeConditions: (conds) => setConditions(conds)
							})]
						}),
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
							style: { marginBottom: 15 },
							children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Then apply these actions:" })
						}),
						/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
							style: { flex: 1 },
							children: [
								actionSplits.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
									style: { alignSelf: "flex-start" },
									onPress: addInitialAction,
									children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Add action" })
								}),
								/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SpaceBetween, {
									direction: "vertical",
									gap: 10,
									"data-testid": "action-split-list",
									children: actionSplits.map(({ id: id_3, actions: actions_1 }, splitIndex_1) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
										style: { width: "100%" },
										nativeStyle: actionSplits.length > 1 ? {
											borderColor: theme.tableBorder,
											borderWidth: "1px",
											borderRadius: "5px",
											padding: "5px"
										} : {},
										children: [
											actionSplits.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SpaceBetween, {
												gap: 5,
												style: { justifyContent: "space-between" },
												children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
													style: {
														...styles.smallText,
														marginBottom: "10px"
													},
													children: splitIndex_1 === 0 ? t("Apply to all") : `${t("Split")} ${splitIndex_1}`
												}), splitIndex_1 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
													variant: "bare",
													onPress: () => onRemoveSplit(splitIndex_1),
													style: {
														width: 20,
														height: 20
													},
													"aria-label": t("Delete split"),
													children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgDelete, { style: {
														width: 8,
														height: 8,
														color: "inherit"
													} })
												})]
											}),
											/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SpaceBetween, {
												direction: "vertical",
												gap: 10,
												"data-testid": "action-list",
												children: actions_1.map((action_6, actionIndex_0) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
													style: { width: "100%" },
													children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionEditor, {
														action: action_6,
														editorStyle: styles.editorPill,
														onChange: (name, value_1, extraOptions_0) => onChangeAction(action_6, name, value_1, extraOptions_0),
														onDelete: () => onRemoveAction(action_6),
														onAdd: () => addActionToSplitAfterIndex(splitIndex_1, actionIndex_0)
													})
												}, actionIndex_0))
											}),
											actions_1.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
												style: {
													alignSelf: "flex-start",
													marginTop: 5
												},
												onPress: () => addActionToSplitAfterIndex(splitIndex_1, -1),
												children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Add action" })
											})
										]
									}, id_3))
								}),
								showSplitButton && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
									style: {
										alignSelf: "flex-start",
										marginTop: 15
									},
									onPress: () => {
										addActionToSplitAfterIndex(actionSplits.length, -1);
									},
									"data-testid": "add-split-transactions",
									children: actionSplits.length > 1 ? t("Add another split") : t("Split into multiple transactions")
								})
							]
						})
					]
				})
			}),
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectedProvider, {
				instance: selectedInst,
				children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
					style: {
						padding: "20px",
						flex: 1,
						position: "relative",
						zIndex: 1
					},
					children: [
						/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SpaceBetween, {
							gap: 5,
							style: {
								flexDirection: "row",
								flexWrap: "nowrap",
								justifyContent: "space-between",
								marginBottom: 12
							},
							children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
								style: {
									color: theme.pageTextLight,
									marginBottom: 0
								},
								children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "This rule applies to these transactions:" })
							}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button, {
								isDisabled: selectedInst.items.size === 0,
								onPress: onApply,
								children: [
									/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Apply actions" }),
									" (",
									selectedInst.items.size,
									")"
								]
							})]
						}),
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SimpleTransactionsTable, {
							transactions,
							fields: getTransactionFields(conditions, getActions(actionSplits)),
							style: {
								border: "1px solid " + theme.tableBorder,
								borderRadius: "6px 6px 0 0"
							}
						}),
						/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SpaceBetween, {
							style: {
								marginTop: 20,
								justifyContent: onDelete ? "space-between" : "flex-end"
							},
							children: [onDelete && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
								onPress: onDelete,
								children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Delete" })
							}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SpaceBetween, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
								onPress: onCancel,
								children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Cancel" })
							}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
								variant: "primary",
								onPress: onSave,
								children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Save" })
							})] })]
						})
					]
				})
			})
		]
	});
}
//#endregion
//#region src/components/rules/Value.tsx
function Value({ value, field, valueIsRaw, inline = false, data: dataProp, describe = (x) => x.name, style }) {
	const { t } = useTranslation();
	const format = useFormat();
	const dateFormat = useDateFormat() || "MM/dd/yyyy";
	const { data: payees } = usePayees();
	const { data: { list: categories, grouped: categoryGroups } = {
		list: [],
		grouped: []
	} } = useCategories();
	const { data: accounts = [] } = useAccounts();
	const valueStyle = {
		color: theme.pageTextPositive,
		...style
	};
	const ValueText = field === "amount" ? FinancialText : Text;
	const locale = useLocale();
	function getData() {
		if (dataProp) return dataProp;
		switch (field) {
			case "payee": return payees;
			case "category": return categories;
			case "category_group": return categoryGroups;
			case "account": return accounts;
			default: return [];
		}
	}
	const data = getData();
	const [expanded, setExpanded] = (0, import_react.useState)(false);
	function onExpand(e) {
		e.preventDefault();
		setExpanded(true);
	}
	function formatValue(value_0) {
		if (value_0 == null || value_0 === "") return t("(nothing)");
		else if (typeof value_0 === "boolean") return value_0 ? "true" : "false";
		else switch (field) {
			case "amount":
			case "amount-inflow":
			case "amount-outflow": return format(value_0, "financial");
			case "date":
				if (value_0) {
					if (value_0.frequency) return getRecurringDescription(value_0, dateFormat, locale);
					return format$4(parseISO(value_0), dateFormat);
				}
				return null;
			case "month": return value_0 ? format$4(parseISO(value_0), getMonthYearFormat(dateFormat)) : null;
			case "year": return value_0 ? format$4(parseISO(value_0), "yyyy") : null;
			case "notes":
			case "imported_payee":
			case "payee_name": return value_0;
			case "payee":
			case "category":
			case "category_group":
			case "account":
			case "rule":
				if (valueIsRaw) return value_0;
				if (data && Array.isArray(data)) {
					const item_0 = data.find((item) => item.id === value_0);
					if (item_0) return describe(item_0);
					else return t("(deleted)");
				}
				return "…";
			default: throw new Error(`Unknown field ${String(field)}`);
		}
	}
	if (Array.isArray(value)) {
		if (value.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ValueText, {
			style: valueStyle,
			children: "(empty)"
		});
		else if (value.length === 1) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { children: [
			"[",
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ValueText, {
				style: valueStyle,
				children: formatValue(value[0])
			}),
			"]"
		] });
		let displayed = value;
		if (!expanded && value.length > 4) displayed = value.slice(0, 3);
		const numHidden = value.length - displayed.length;
		return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
			style: { color: theme.tableText },
			children: [
				"[",
				displayed.map((v, i) => {
					const text = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ValueText, {
						style: valueStyle,
						children: formatValue(v)
					});
					let spacing;
					if (inline) spacing = i !== 0 ? " " : "";
					else spacing = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [i === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}), "\xA0\xA0"] });
					return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { children: [
						spacing,
						text,
						i === value.length - 1 ? "" : ",",
						!inline && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {})
					] }, i);
				}),
				numHidden > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
					style: valueStyle,
					children: [
						"\xA0\xA0",
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
							variant: "text",
							onClick: onExpand,
							style: valueStyle,
							children: t("{{num}} more items...", { num: numHidden })
						}),
						!inline && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {})
					]
				}),
				"]"
			]
		});
	} else if (value && value.num1 != null && value.num2 != null) {
		const { num1, num2 } = value;
		return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { children: [
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ValueText, {
				style: valueStyle,
				children: formatValue(num1)
			}),
			" ",
			t("and"),
			" ",
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ValueText, {
				style: valueStyle,
				children: formatValue(num2)
			})
		] });
	} else return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ValueText, {
		style: valueStyle,
		children: formatValue(value)
	});
}
//#endregion
//#region ../loot-core/src/shared/merge.ts
function validForMerge(transactionA, transactionB) {
	return !validForMergeExplanation(transactionA, transactionB);
}
function validForMergeExplanation(transactionA, transactionB) {
	if (!transactionA || !transactionB) return "One of the provided transactions does not exist";
	if (transactionA.account !== transactionB.account) return "Cannot merge transactions from different accounts";
	if (transactionA.amount !== transactionB.amount) return "Cannot merge transactions with different amounts";
	if (transactionA.transfer_id && transactionB.transfer_id && transactionA.payee !== transactionB.payee) return "Cannot merge transfers to different accounts";
	return "";
}
//#endregion
export { BudgetSummary as $, SvgCloudCheck as $a, $9446cca9a3875146$export$7d15b64cf5a3a4c4 as $c, SvgCheck as $i, useDeleteCategoryGroupMutation as $l, envelopeBudget as $n, baseInputStyle as $o, reportQueries as $r, $7252cd45fc48c07c$export$72cb63bdda528276 as $s, describeSchedule as $t, DateSelect as A, SvgPin as Aa, $f645667febf57a63$export$4c014de7c8940b4c as Ac, Menu as Ai, $4e85f108e88277b8$export$265015d6dc85bf21 as Al, useSyncServerStatus as An, require_isObjectLike as Ao, getYearEnd as Ar, $612b8eb6cb90e02d$export$d188a835a7bc5783 as As, useNotes as At, useSetMultiuserEnabled as Au, PayeeAutocomplete as B, SvgInformationOutline as Ba, $5b160d28a433310d$export$c17fa47878dc55b6 as Bc, SvgPencilWriteAlternate as Bi, config as Bl, ToggleField as Bn, SectionLabel as Bo, parseDate as Br, $ad0e3f3d9c50e4ba$export$905ab40ac2179daa as Bs, makeAmountGrey as Bt, format$4 as Bu, isDevelopmentEnvironment as C, SvgTag as Ca, $f7dceffc5ad7768b$export$4e328f61c538687f as Cc, useSelectedItems as Ci, $d4ee10de306f2510$export$b4f377a2b6254582 as Cl, mapField as Cn, MobilePageHeaderSlot as Co, getDayMonthFormat as Cr, $eed445e0843c11d0$export$a11e76429ed99b4 as Cs, Notes as Ct, useAvailableLoginMethods as Cu, useSplitsExpanded as D, SvgRefresh as Da, $6179b936705e76d3$export$ae780daf29e6d456 as Dc, currencies as Di, $bdb11010cef70236$export$b4cc09c592e8fdb8 as Dl, calculateDistance as Dn, useScrollListener as Do, getMonthYearFormat as Dr, $72a5793c14baf454$export$8b251419efc915eb as Ds, remarkGfm as Dt, useServerURL as Du, SplitsExpandedProvider as E, SvgReports as Ea, $8a26561d2877236e$export$c24ed0104d07eab9 as Ec, useSyncedPref as Ei, $ff5963eb1fccf552$export$e08e3b67e392101e as El, HyperFormula as En, ScrollProvider as Eo, getMonthEnd as Er, $c8a5a149f625efcf$export$758399f318e6385a as Es, sequentialNewlinesPlugin as Et, useRefreshLoginMethods as Eu, useTags as F, SvgList as Fa, $507fabe10e71c6fb$export$b9b3dfddab17db27 as Fc, SvgUncheckAll as Fi, $4e85f108e88277b8$export$b0d3ecf7112093a7 as Fl, useTransactions as Fn, require_isObject as Fo, isValidYearMonth as Fr, $e72dd72e1c76a225$export$2f645645f7bca764 as Fs, addToBeBudgetedGroup as Ft, subDays$1 as Fu, CategoryAutocomplete as G, SvgExclamationOutline as Ga, $64fa3d84918910a7$export$29f1550f4b0d4415 as Gc, SvgMoonStars as Gi, hasHiddenScrollbars as Gl, accountBalance as Gn, ModalHeader as Go, subDays as Gr, $67560de7c78cb232$export$403bc76cbf68cf60 as Gs, MonthsContext as Gt, startOfWeek as Gu, usePayeesById as H, SvgFilter as Ha, $319e236875307eab$export$a9b970dcc4ae71a9 as Hc, SvgNotesPaper as Hi, useSpring as Hl, CellValue as Hn, Modal as Ho, prevYear as Hr, $224594fe3e57ff1e$export$62447ad3d2ec7da6 as Hs, prewarmMonth as Ht, isValid$3 as Hu, tagQueries as I, SvgListBullet as Ia, $f6c31cce2adf654f$export$45712eceda6fad21 as Ic, SvgSun as Ii, $4e85f108e88277b8$export$ebe63fadcdce34ed as Il, Select as In, useLocalPref as Io, lastDayOfMonth as Ir, $e72dd72e1c76a225$export$ba9d38c0f1bf2b36 as Is, findSortDown as It, parse$5 as Iu, ExpenseGroupMonth as J, SvgCreditCard as Ja, $64fa3d84918910a7$export$c245e6201fed2f75 as Jc, SvgInformationCircle as Ji, useMetadataPref as Jl, allAccountBalance as Jn, AutoTextSize as Jo, weekFromDate as Jr, $67560de7c78cb232$export$c28d9fb4a54e471a as Js, AccountAutocomplete as Jt, infiniteQueryBehavior as Ju, BudgetTotalsMonth as K, SvgEquals as Ka, $64fa3d84918910a7$export$4d86445c2cf5e3 as Kc, SvgLockClosed as Ki, SpreadsheetProvider as Kl, accountBalanceCleared as Kn, ModalTitle as Ko, subMonths as Kr, $67560de7c78cb232$export$418e185dd3f1b968 as Ks, MonthsProvider as Kt, addMonths$1 as Ku, useCursorPosition as L, SvgLightBulb as La, $325a3faab7a68acd$export$a16aca283550c30d as Lc, SvgSearchAlternate as Li, AnimatedLoading as Ll, FieldLabel as Ln, Checkbox as Lo, monthFromDate as Lr, $514c0188e459b4c0$export$9afb8bc826b033ea as Ls, findSortUp as Lt, setDay as Lu, StatusBadge as M, SvgMoneyBag as Ma, $3ad3f6e1647bc98d$export$80f3e147d781571c as Mc, q as Mi, $4e85f108e88277b8$export$698f465ec27e93df as Ml, useAccount as Mn, require__Symbol as Mo, isAfter$1 as Mr, $612b8eb6cb90e02d$export$f55761759794cf55 as Ms, liveQuery as Mt, useOnVisible as Mu, useTagCSS as N, SvgLockOpen as Na, $507fabe10e71c6fb$export$8397ddfc504fdb9a as Nc, SvgViewShow as Ni, $4e85f108e88277b8$export$717b2c0a523a0b53 as Nl, calculateRunningBalancesBottomUp as Nn, require__root as No, isBefore$1 as Nr, $3985021b0ad6602f$export$37fb8590cf2c088c as Ns, BalanceWithCarryover as Nt, subMonths$1 as Nu, DisplayPayeeProvider as O, SvgQueue as Oa, $9ab94262bd0047c7$export$420e68273165f4ec as Oc, getCurrency as Oi, $bdb11010cef70236$export$f680877a34711e37 as Ol, MOBILE_NAV_HEIGHT as On, require_debounce as Oo, getWeekEnd as Or, $612b8eb6cb90e02d$export$62ed72bc21f6b8a6 as Os, rehypeExternalLinks as Ot, useServerVersion as Ou, useFilteredTags as P, SvgLocation as Pa, $507fabe10e71c6fb$export$98e20ec92f614cfe as Pc, SvgViewHide as Pi, $4e85f108e88277b8$export$b085522c77523c51 as Pl, calculateRunningBalancesTopDown as Pn, require__freeGlobal as Po, isCurrentMonth as Pr, $d3e0e05bdfcf66bd$export$a7fed597f4b8afd8 as Ps, CarryoverIndicator as Pt, parseISO as Pu, useEnvelopeSheetValue as Q, SvgCloudDownload as Qa, $64fa3d84918910a7$export$fabf2dc03a41866e as Qc, SvgCloudUnknown as Qi, useCreateCategoryMutation as Ql, closedAccountBalance as Qn, ResponsiveInput as Qo, dashboardQueries as Qr, $7252cd45fc48c07c$export$70936501603e6c57 as Qs, computeSchedulePreviewTransactions as Qt, useRefEventListener as R, SvgLibrary as Ra, $fca6afa0e843324b$export$f12b703ca79dfbb1 as Rc, SvgRemove as Ri, Block as Rl, InputField as Rn, FormField as Ro, months_exports as Rr, $d2b4bc8c273e7be6$export$24d547caef80ccd1 as Rs, getScrollbarWidth as Rt, isAfter$2 as Ru, NotesTagFormatter as S, SvgTime as Sa, $5c3e21d68f1c4674$export$a966af930f325cab as Sc, useSelectedDispatch as Si, $d4ee10de306f2510$export$4282f70798064fe0 as Sl, makeValue as Sn, MobilePageHeaderProvider as So, getDay as Sr, $eed445e0843c11d0$export$7c5906fe4f1f2af2 as Ss, NotesButton as St, ServerProvider as Su, isNonProductionEnvironment as T, SvgShare as Ta, $9bf71ea28793e738$export$2d6ec8fc375ceafa as Tc, useFormat as Ti, $d4ee10de306f2510$export$e58f029f0fbfdb29 as Tl, unparse as Tn, PageHeader as To, getMonth as Tr, $1d5b8b8664671ef2$export$c9549807523555e0 as Ts, remarkBreaks as Tt, useMultiuserEnabled as Tu, useNearbyPayees as U, SvgFileDouble as Ua, $319e236875307eab$export$d10ae4f68404609a as Uc, SvgNotesPaperText as Ui, useTransition as Ul, CellValueText as Un, ModalButtons as Uo, rangeInclusive as Ur, $8253ed7ece74b463$export$7941f8aafa4b6021 as Us, removeCategoriesFromGroups as Ut, addWeeks$1 as Uu, usePayees as V, SvgFlag as Va, $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 as Vc, SvgPencil1 as Vi, to$1 as Vl, Tooltip as Vn, MODAL_Z_INDEX as Vo, prevMonth as Vr, $5c06e4929e123553$export$ccdee5eaf73cf661 as Vs, prewarmAllMonths as Vt, startOfMonth as Vu, useLocationPermission as W, SvgExclamationSolid as Wa, $64fa3d84918910a7$export$2881499e37b75b9a as Wc, SvgNavigationMenu as Wi, useNavigate as Wl, FinancialText as Wn, ModalCloseButton as Wo, sheetForMonth as Wr, $865c2eb7c00a83f1$exports as Ws, separateGroups as Wt, differenceInCalendarDays$1 as Wu, IncomeGroupMonth as X, SvgCog as Xa, $64fa3d84918910a7$export$df3a06d6289f983e as Xc, SvgDownloadThickBottom as Xi, useBudgetActions as Xl, categoryBalanceCleared as Xn, BigInput as Xo, yearRangeInclusive as Xr, $7252cd45fc48c07c$export$49bac5d6d4b352ea as Xs, require_prop_types as Xt, q$1 as Xu, IncomeCategoryMonth as Y, SvgCopy as Ya, $64fa3d84918910a7$export$c62b8e45d58ddad9 as Yc, SvgHelp as Yi, useIsTestEnv as Yl, categoryBalance as Yn, TextOneLine as Yo, weekRangeInclusive as Yr, $7252cd45fc48c07c$export$3093291712f09a77 as Ys, Autocomplete as Yt, getPrimaryOrderBy as Yu, IncomeHeaderMonth as Z, SvgCode as Za, $64fa3d84918910a7$export$ef03459518577ad4 as Zc, SvgDownAndRightArrow as Zi, useCreateCategoryGroupMutation as Zl, categoryBalanceUncleared as Zn, Input as Zo, useReports as Zr, $7252cd45fc48c07c$export$6ca6700462636d0b as Zs, getNormalisedString as Zt, useDateFormat as _, SvgWallet as _a, $c5a24bc478652b5f$export$1005530eda016c13 as _c, useSheetValue as _i, $c87311424ea30a05$export$a11b0059900ceec8 as _l, deserializeField as _n, SvgArrowThickDown as _o, dayRangeInclusive as _r, Button as _s, useCategoryScheduleGoalTemplates as _t, useSearchParams as _u, RuleEditor as a, SvgArrowsShrink3 as aa, $7252cd45fc48c07c$export$e1d41611756c6326 as ac, InputCell as ai, $2f04cbc44ee30ce0$export$c826860796309d1b as al, scheduleIsRecurring as an, SvgChart as ao, transactions as ar, SvgExpandArrow as as, EnvelopeBudgetProvider as at, useSaveCategoryGroupMutation as au, TransactionList as b, SvgTuning as ba, $880e95eb8b93ba9a$export$ecf600387e221c37 as bc, SelectedProviderWithItems as bi, $3ef42575df84b30b$export$9d1611c77c2fe928 as bl, getFieldError as bn, SvgAdd as bo, firstDayOfMonth as br, $de32f1b87079253c$export$3ddf2d174ce01153 as bs, getSchedulesQuery as bt, k$1 as bu, GenericInput as c, SvgArrowButtonSingleLeft1 as ca, $7135fc7d473fd974$export$4feb769f8ddf26c5 as cc, SelectedItemsButton as ci, $62d8ded9296f3872$export$cfa2225e87938781 as cl, isPreviewId as cn, SvgChartArea as co, addDays as cr, SvgLogo as cs, useCategories as ct, View as cu, CategoryGroupAutocomplete as d, SvgArrowButtonDown1 as da, $e1995378a142960e$export$bf788dd355e3a401 as dc, TableHeader as di, $8ae05eaa5c114e9c$export$7f54fc3180508a52 as dl, realizeTempTransactions as dn, SvgCalculator as do, currentDate as dr, useHover as ds, useUndo as dt, Navigate as du, SvgCheckCircle1 as ea, $7252cd45fc48c07c$export$78bf638634500fa5 as ec, aqlQuery as ei, $9446cca9a3875146$export$b6268554fba451f as el, extractScheduleConds as en, SvgClose as eo, offBudgetAccountBalance as er, SvgSplit as es, ToBudgetMenu as et, useDeleteCategoryMutation as eu, useTransactionFilters as f, SvgAlertTriangle as fa, $e1995378a142960e$export$fb8073518f34e6ec as fc, TableWithNavigator as fi, $df56164dff5785e2$export$4338b53315abf666 as fl, splitTransaction as fn, SvgBookmark as fo, currentDay as fr, useToggle as fs, redo as ft, Route as fu, usePayee as g, SvgCloseParenthesis as ga, $e5be200c675c3b3a$export$fc1a364ae1f3ff10 as gc, FixedSizeList as gi, $c87311424ea30a05$export$78551043582a6a98 as gl, FIELD_TYPES as gn, SvgArrowThickRight as go, dayFromDate as gr, Text as gs, useLocale as gt, useParams as gu, DisplayId as h, SvgOpenParenthesis as ha, $e5be200c675c3b3a$export$a763b9476acd3eb as hc, usePrivacyMode as hi, $c87311424ea30a05$export$186c6964ca17d99 as hl, updateTransaction as hn, SvgArrowThickUp as ho, currentYear as hr, Link as hs, useCategoryScheduleGoalTemplateIndicator as ht, useLocation as hu, OpSelect as i, SvgArrowsSynchronize as ia, $7252cd45fc48c07c$export$dfdf5deeaf27473f as ic, Field as ii, $a5fa973c1850dd36$export$ccaea96c28e8b9e7 as il, getUpcomingDays as in, SvgCheveronDown as io, uncategorizedCount as ir, SvgLeftArrow2 as is, BudgetMonthMenu as it, useReorderCategoryMutation as iu, useMergedRefs as j, SvgPiggyBank as ja, $a1ea59d68270f0dd$export$f8168d8dd8fd66e6 as jc, Toggle as ji, $4e85f108e88277b8$export$44644b8a16031b5b as jl, useDrag$1 as jn, require__baseGetTag as jo, getYearStart as jr, $612b8eb6cb90e02d$export$d1e8e3fbb7461f6 as js, LiveQuery as jt, useSetServerURL as ju, useDisplayPayee as k, SvgQuestion as ka, $f1ab8c75478c6f73$export$3351871ee4b288b8 as kc, Popover as ki, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c as kl, MobileNavTabs as kn, require_isSymbol as ko, getYear as kr, $612b8eb6cb90e02d$export$971707d8a129a1f7 as ks, Markdown as kt, useSetLoginMethods as ku, PercentInput as l, SvgArrowButtonRight1 as la, $7135fc7d473fd974$export$a164736487e3f0ae as lc, SheetCell as li, $cc38e7bd3fc7b213$export$2bb74740c4e19def as ll, makeAsNonChildTransactions as ln, SvgCamera as lo, addMonths as lr, useResponsive as ls, useCategoriesById as lt, viewStyles as lu, validForTransfer as m, SvgSum as ma, $23b9f4fcf0fe224b$export$fd11f34e1d07f134 as mc, PrivacyFilter as mi, $ea8dcbcb9ea1b556$export$bdc77b0c0a3a85d6 as ml, ungroupTransactions as mn, SvgArrowThinLeft as mo, currentWeek as mr, SpaceBetween as ms, useContextMenu as mt, useHref as mu, Value as n, SvgCalendar as na, $7252cd45fc48c07c$export$990fced5dfac2637 as nc, CellButton as ni, $458b0a5536c1a7cf$export$40bfa8c7b0832715 as nl, getScheduledAmount as nn, SvgCheveronRight as no, trackingBudget as nr, SvgSubtract$2 as ns, TotalsList as nt, useMoveCategoryMutation as nu, SimpleTransactionsTable as o, SvgArrowsExpand3 as oa, $7252cd45fc48c07c$export$f2be18a910c0caa6 as oc, Row as oi, $e9faafb641e167db$export$90fc3a17d93f704c as ol, addSplitTransaction as on, SvgChartPie as oo, transactionsSearch as or, SvgDelete as os, BudgetMenu as ot, useSaveCategoryMutation as ou, useTransactionBatchActions as p, SvgSystem as pa, $23b9f4fcf0fe224b$export$8258a0665a675899 as pc, useTableNavigator as pi, $03deb23ff14920c4$export$4eaf04e54aa8eed6 as pl, ungroupTransaction as pn, SvgArrowThinRight as po, currentMonth as pr, useModalState as ps, undo as pt, Routes as pu, ExpenseCategoryMonth as q, SvgDotsHorizontalTriple as qa, $64fa3d84918910a7$export$9d4c57ee4c6ffdd8 as qc, SvgKey as qi, useSpreadsheet as ql, accountBalanceUncleared as qn, FeatureErrorFallback as qo, subWeeks as qr, $67560de7c78cb232$export$aef80212ac99c003 as qs, useFeatureFlag as qt, addDays$1 as qu, FieldSelect as r, SvgCalendar3 as ra, $7252cd45fc48c07c$export$dac8db29d42db9a1 as rc, CustomCell as ri, $cdc5a6778b766db2$export$a9d04c5684123369 as rl, getStatusLabel as rn, SvgCheveronLeft as ro, uncategorizedBalance as rr, SvgRightArrow2 as rs, AlignedText as rt, useReorderCategoryGroupMutation as ru, useCategory as s, SvgArrowButtonUp1 as sa, $7135fc7d473fd974$export$2dbbd341daed716d as sc, SelectCell as si, $ef06256079686ba0$export$f8aeda7b10753fa1 as sl, deleteTransaction as sn, SvgChartBar as so, uncategorizedTransactions as sr, SvgAdd$1 as ss, InitialFocus as st, categoryQueries as su, validForMerge as t, SvgCheckAll as ta, $7252cd45fc48c07c$export$7e397efd01d3db27 as tc, Cell as ti, $9446cca9a3875146$export$cb6e0bb50bc19463 as tl, getRecurringDescription as tn, SvgCheveronUp as to, onBudgetAccountBalance as tr, SvgMerge as ts, ToBudgetAmount as tt, useMoveCategoryGroupMutation as tu, RecurringSchedulePicker as u, SvgArrowButtonLeft1 as ua, $e1995378a142960e$export$18af5c7a9e9b3664 as uc, Table as ui, $9daab02d461809db$export$683480f191c0e3ea as ul, makeChild as un, SvgCalendar$1 as uo, addWeeks as ur, useDebounceCallback as us, BalanceMenu as ut, BrowserRouter as uu, AmountInput as v, SvgUser as va, $982254629710d113$export$b95089534ab7c1fd as vc, SheetNameProvider as vi, $c87311424ea30a05$export$fedb369cb70207f1 as vl, friendlyOp as vn, SvgArrowLeft as vo, differenceInCalendarDays as vr, ButtonWithLoading as vs, SchedulesProvider as vt, de$1 as vu, isElectron as w, SvgStoreFront as wa, $9bf71ea28793e738$export$20e40289641fbbb6 as wc, useProperFocus as wi, $d4ee10de306f2510$export$cd4e5573fbe2b576 as wl, translateRuleStage as wn, Page as wo, getDayMonthRegex as wr, $eed445e0843c11d0$export$dca12b0bb56e4fc as ws, markdownBaseStyles as wt, useLoginMethod as wu, createSingleTimeScheduleFromTransaction as x, SvgTrash as xa, $d191a55c9702f145$export$8467354a121f1b9f as xc, useSelected as xi, clsx as xl, getValidOps as xn, MobilePageHeader as xo, format$2 as xr, $eed445e0843c11d0$export$41f133550aa26f48 as xs, useSchedules as xt, m$1 as xu, BetweenAmountInput as y, SvgUserGroup as ya, $2a25aae57d74318e$export$a05409b8bb224a5a as yc, SelectedProvider as yi, $65484d02dcb7eb3e$export$457c3d6518dd4c6f as yl, getAllocationMethods as yn, SvgArrowDown as yo, differenceInCalendarMonths as yr, $de32f1b87079253c$export$2e1e1122cf0cba88 as ys, useCachedSchedules as yt, fe as yu, useCurrentWordRange as z, SvgLayers as za, $6db58dc88e78b024$export$2f817fcdc4b89ae0 as zc, SvgRefreshArrow as zi, animated as zl, TapField as zn, FormLabel as zo, nextMonth as zr, $01b77f81d0f07f68$export$75b6ee27786ba447 as zs, makeAmountFullStyle as zt, getDay$1 as zu };

//# sourceMappingURL=merge.C77XY6IK.chunk.js.map