import { i as require_react, n as require_compiler_runtime, r as require_jsx_runtime, t as theme, u as __toESM } from "./theme.mnyG70gE.chunk.js";
import { Ft as useUnlinkAccountMutation, Gt as useDispatch, Kr as send, U as pushModal, ci as t, cr as useQuery, ii as useTranslation, oi as Trans, on as accountQueries, qr as sendCatch, v as styles } from "./extends.CfN_tLZB.chunk.js";
import { A as DateSelect, As as $612b8eb6cb90e02d$export$d188a835a7bc5783, Bn as ToggleField, Cc as $f7dceffc5ad7768b$export$4e328f61c538687f, Cl as $d4ee10de306f2510$export$b4f377a2b6254582, Dc as $6179b936705e76d3$export$ae780daf29e6d456, Dl as $bdb11010cef70236$export$b4cc09c592e8fdb8, Ei as useSyncedPref, El as $ff5963eb1fccf552$export$e08e3b67e392101e, Es as $c8a5a149f625efcf$export$758399f318e6385a, Fc as $507fabe10e71c6fb$export$b9b3dfddab17db27, Fl as $4e85f108e88277b8$export$b0d3ecf7112093a7, Fn as useTransactions, Fs as $e72dd72e1c76a225$export$2f645645f7bca764, Gc as $64fa3d84918910a7$export$29f1550f4b0d4415, Go as ModalHeader, Hc as $319e236875307eab$export$a9b970dcc4ae71a9, Ho as Modal, In as Select, Is as $e72dd72e1c76a225$export$ba9d38c0f1bf2b36, Ka as SvgEquals, Kc as $64fa3d84918910a7$export$4d86445c2cf5e3, Lc as $325a3faab7a68acd$export$a16aca283550c30d, Lo as Checkbox, Ls as $514c0188e459b4c0$export$9afb8bc826b033ea, Mc as $3ad3f6e1647bc98d$export$80f3e147d781571c, Ml as $4e85f108e88277b8$export$698f465ec27e93df, Mn as useAccount, Mr as isAfter, Ms as $612b8eb6cb90e02d$export$f55761759794cf55, Mt as liveQuery, Ol as $bdb11010cef70236$export$f680877a34711e37, Pc as $507fabe10e71c6fb$export$98e20ec92f614cfe, Pl as $4e85f108e88277b8$export$b085522c77523c51, Rc as $fca6afa0e843324b$export$f12b703ca79dfbb1, Ro as FormField, Rs as $d2b4bc8c273e7be6$export$24d547caef80ccd1, Sc as $5c3e21d68f1c4674$export$a966af930f325cab, Sl as $d4ee10de306f2510$export$4282f70798064fe0, Ss as $eed445e0843c11d0$export$7c5906fe4f1f2af2, Tc as $9bf71ea28793e738$export$2d6ec8fc375ceafa, Tl as $d4ee10de306f2510$export$e58f029f0fbfdb29, Ts as $1d5b8b8664671ef2$export$c9549807523555e0, Vc as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, Vn as Tooltip, Wc as $64fa3d84918910a7$export$2881499e37b75b9a, Wl as useNavigate, Wo as ModalCloseButton, Xc as $64fa3d84918910a7$export$df3a06d6289f983e, Xu as q, Yc as $64fa3d84918910a7$export$c62b8e45d58ddad9, Zo as Input, _ as useDateFormat, _s as Button, _u as useSearchParams, al as $2f04cbc44ee30ce0$export$c826860796309d1b, bc as $880e95eb8b93ba9a$export$ecf600387e221c37, bl as $3ef42575df84b30b$export$9d1611c77c2fe928, c as GenericInput, cc as $7135fc7d473fd974$export$4feb769f8ddf26c5, ci as SelectedItemsButton, cl as $62d8ded9296f3872$export$cfa2225e87938781, cu as View, dc as $e1995378a142960e$export$bf788dd355e3a401, di as TableHeader, dl as $8ae05eaa5c114e9c$export$7f54fc3180508a52, ei as aqlQuery, en as extractScheduleConds, fc as $e1995378a142960e$export$fb8073518f34e6ec, fl as $df56164dff5785e2$export$4338b53315abf666, fr as currentDay, gs as Text, gt as useLocale, gu as useParams, i as OpSelect, il as $a5fa973c1850dd36$export$ccaea96c28e8b9e7, js as $612b8eb6cb90e02d$export$d1e8e3fbb7461f6, ka as SvgQuestion, kl as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, ks as $612b8eb6cb90e02d$export$971707d8a129a1f7, lc as $7135fc7d473fd974$export$a164736487e3f0ae, ls as useResponsive, mc as $23b9f4fcf0fe224b$export$fd11f34e1d07f134, ml as $ea8dcbcb9ea1b556$export$bdc77b0c0a3a85d6, ms as SpaceBetween, nn as getScheduledAmount, o as SimpleTransactionsTable, oi as Row, pc as $23b9f4fcf0fe224b$export$8258a0665a675899, rl as $cdc5a6778b766db2$export$a9d04c5684123369, rs as SvgRightArrow2, sl as $ef06256079686ba0$export$f8aeda7b10753fa1, st as InitialFocus, ti as Cell, u as RecurringSchedulePicker, uc as $e1995378a142960e$export$18af5c7a9e9b3664, v as AmountInput, vc as $982254629710d113$export$b95089534ab7c1fd, wc as $9bf71ea28793e738$export$20e40289641fbbb6, wl as $d4ee10de306f2510$export$cd4e5573fbe2b576, wo as Page, xo as MobilePageHeader, xr as format, y as BetweenAmountInput, yc as $2a25aae57d74318e$export$a05409b8bb224a5a, yi as SelectedProvider, yl as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, zo as FormLabel } from "./merge.C77XY6IK.chunk.js";
import { o as MobileBackButton } from "./TransactionEdit.D3b8cFIw.chunk.js";
//#region ../../node_modules/@react-aria/utils/dist/useUpdateEffect.mjs
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
function $4f58c5f72bcf79f7$export$496315a1608d9602(cb, dependencies) {
	const isInitialMount = (0, import_react.useRef)(true);
	const lastDeps = (0, import_react.useRef)(null);
	let cbEvent = $8ae05eaa5c114e9c$export$7f54fc3180508a52(cb);
	(0, import_react.useEffect)(() => {
		isInitialMount.current = true;
		return () => {
			isInitialMount.current = false;
		};
	}, []);
	(0, import_react.useEffect)(() => {
		let prevDeps = lastDeps.current;
		if (isInitialMount.current) isInitialMount.current = false;
		else if (!prevDeps || dependencies.some((dep, i) => !Object.is(dep, prevDeps[i]))) cbEvent();
		lastDeps.current = dependencies;
	}, dependencies);
}
//#endregion
//#region ../../node_modules/@react-aria/focus/dist/useHasTabbableChild.mjs
function $83013635b024ae3d$export$eac1895992b9f3d6(ref, options) {
	let isDisabled = options === null || options === void 0 ? void 0 : options.isDisabled;
	let [hasTabbableChild, setHasTabbableChild] = (0, import_react.useState)(false);
	$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
		if ((ref === null || ref === void 0 ? void 0 : ref.current) && !isDisabled) {
			let update = () => {
				if (ref.current) setHasTabbableChild(!!$9bf71ea28793e738$export$2d6ec8fc375ceafa(ref.current, { tabbable: true }).nextNode());
			};
			update();
			let observer = new MutationObserver(update);
			observer.observe(ref.current, {
				subtree: true,
				childList: true,
				attributes: true,
				attributeFilter: ["tabIndex", "disabled"]
			});
			return () => {
				observer.disconnect();
			};
		}
	});
	return isDisabled ? false : hasTabbableChild;
}
//#endregion
//#region ../../node_modules/@react-aria/gridlist/dist/utils.mjs
var $ce9b18daab526bbd$export$5b9bb410392e3991 = /* @__PURE__ */ new WeakMap();
function $ce9b18daab526bbd$export$f45c25170b9a99c2(state, key) {
	var _listMap_get;
	let { id } = (_listMap_get = $ce9b18daab526bbd$export$5b9bb410392e3991.get(state)) !== null && _listMap_get !== void 0 ? _listMap_get : {};
	if (!id) throw new Error("Unknown list");
	return `${id}-${$ce9b18daab526bbd$export$e0c709538cb8ae18(key)}`;
}
function $ce9b18daab526bbd$export$e0c709538cb8ae18(key) {
	if (typeof key === "string") return key.replace(/\s*/g, "");
	return "" + key;
}
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/ar-AE.mjs
var $682989befd4f478d$exports = {};
$682989befd4f478d$exports = {
	"deselectedItem": (args) => `${args.item} \u{63A}\u{64A}\u{631} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,
	"longPressToSelect": `\u{627}\u{636}\u{63A}\u{637} \u{645}\u{637}\u{648}\u{644}\u{64B}\u{627} \u{644}\u{644}\u{62F}\u{62E}\u{648}\u{644} \u{625}\u{644}\u{649} \u{648}\u{636}\u{639} \u{627}\u{644}\u{62A}\u{62D}\u{62F}\u{64A}\u{62F}.`,
	"select": `\u{62A}\u{62D}\u{62F}\u{64A}\u{62F}`,
	"selectedAll": `\u{62C}\u{645}\u{64A}\u{639} \u{627}\u{644}\u{639}\u{646}\u{627}\u{635}\u{631} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}\u{629}.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `\u{644}\u{645} \u{64A}\u{62A}\u{645} \u{62A}\u{62D}\u{62F}\u{64A}\u{62F} \u{639}\u{646}\u{627}\u{635}\u{631}`,
		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{635}\u{631} \u{645}\u{62D}\u{62F}\u{62F}`
	})}.`,
	"selectedItem": (args) => `${args.item} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/bg-BG.mjs
var $f7fca02019afd941$exports = {};
$f7fca02019afd941$exports = {
	"deselectedItem": (args) => `${args.item} \u{43D}\u{435} \u{435} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}.`,
	"longPressToSelect": `\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435} \u{438} \u{437}\u{430}\u{434}\u{440}\u{44A}\u{436}\u{442}\u{435} \u{437}\u{430} \u{434}\u{430} \u{432}\u{43B}\u{435}\u{437}\u{435}\u{442}\u{435} \u{432} \u{438}\u{437}\u{431}\u{438}\u{440}\u{430}\u{442}\u{435}\u{43B}\u{435}\u{43D} \u{440}\u{435}\u{436}\u{438}\u{43C}.`,
	"select": `\u{418}\u{437}\u{431}\u{435}\u{440}\u{435}\u{442}\u{435}`,
	"selectedAll": `\u{412}\u{441}\u{438}\u{447}\u{43A}\u{438} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{438} \u{441}\u{430} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438}.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `\u{41D}\u{44F}\u{43C}\u{430} \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}`,
		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}`
	})}.`,
	"selectedItem": (args) => `${args.item} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/cs-CZ.mjs
var $8f86f40be75387f1$exports = {};
$8f86f40be75387f1$exports = {
	"deselectedItem": (args) => `Polo\u{17E}ka ${args.item} nen\xed vybr\xe1na.`,
	"longPressToSelect": `Dlouh\xfdm stisknut\xedm p\u{159}ejdete do re\u{17E}imu v\xfdb\u{11B}ru.`,
	"select": `Vybrat`,
	"selectedAll": `Vybr\xe1ny v\u{161}echny polo\u{17E}ky.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `Nevybr\xe1ny \u{17E}\xe1dn\xe9 polo\u{17E}ky`,
		one: () => `Vybr\xe1na ${formatter.number(args.count)} polo\u{17E}ka`,
		other: () => `Vybr\xe1no ${formatter.number(args.count)} polo\u{17E}ek`
	})}.`,
	"selectedItem": (args) => `Vybr\xe1na polo\u{17E}ka ${args.item}.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/da-DK.mjs
var $db24ba43c8d652ee$exports = {};
$db24ba43c8d652ee$exports = {
	"deselectedItem": (args) => `${args.item} ikke valgt.`,
	"longPressToSelect": `Lav et langt tryk for at aktivere valgtilstand.`,
	"select": `V\xe6lg`,
	"selectedAll": `Alle elementer valgt.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `Ingen elementer valgt`,
		one: () => `${formatter.number(args.count)} element valgt`,
		other: () => `${formatter.number(args.count)} elementer valgt`
	})}.`,
	"selectedItem": (args) => `${args.item} valgt.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/de-DE.mjs
var $f8f1e72c8b5447d6$exports = {};
$f8f1e72c8b5447d6$exports = {
	"deselectedItem": (args) => `${args.item} nicht ausgew\xe4hlt.`,
	"longPressToSelect": `Gedr\xfcckt halten, um Auswahlmodus zu \xf6ffnen.`,
	"select": `Ausw\xe4hlen`,
	"selectedAll": `Alle Elemente ausgew\xe4hlt.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `Keine Elemente ausgew\xe4hlt`,
		one: () => `${formatter.number(args.count)} Element ausgew\xe4hlt`,
		other: () => `${formatter.number(args.count)} Elemente ausgew\xe4hlt`
	})}.`,
	"selectedItem": (args) => `${args.item} ausgew\xe4hlt.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/el-GR.mjs
var $9a73ed2983c3ab0b$exports = {};
$9a73ed2983c3ab0b$exports = {
	"deselectedItem": (args) => `\u{394}\u{3B5}\u{3BD} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} \u{3C4}\u{3BF} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF} ${args.item}.`,
	"longPressToSelect": `\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{3BC}\u{3C0}\u{3B5}\u{3AF}\u{3C4}\u{3B5} \u{3C3}\u{3B5} \u{3BB}\u{3B5}\u{3B9}\u{3C4}\u{3BF}\u{3C5}\u{3C1}\u{3B3}\u{3AF}\u{3B1} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3BF}\u{3B3}\u{3AE}\u{3C2}.`,
	"select": `\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3BF}\u{3B3}\u{3AE}`,
	"selectedAll": `\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B1}\u{3BD} \u{3CC}\u{3BB}\u{3B1} \u{3C4}\u{3B1} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3B1}.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `\u{394}\u{3B5}\u{3BD} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B1}\u{3BD} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3B1}`,
		one: () => `\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} ${formatter.number(args.count)} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF}`,
		other: () => `\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B1}\u{3BD} ${formatter.number(args.count)} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3B1}`
	})}.`,
	"selectedItem": (args) => `\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} \u{3C4}\u{3BF} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF} ${args.item}.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/en-US.mjs
var $583de0b3587601b9$exports = {};
$583de0b3587601b9$exports = {
	"deselectedItem": (args) => `${args.item} not selected.`,
	"select": `Select`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `No items selected`,
		one: () => `${formatter.number(args.count)} item selected`,
		other: () => `${formatter.number(args.count)} items selected`
	})}.`,
	"selectedAll": `All items selected.`,
	"selectedItem": (args) => `${args.item} selected.`,
	"longPressToSelect": `Long press to enter selection mode.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/es-ES.mjs
var $147159c978043442$exports = {};
$147159c978043442$exports = {
	"deselectedItem": (args) => `${args.item} no seleccionado.`,
	"longPressToSelect": `Mantenga pulsado para abrir el modo de selecci\xf3n.`,
	"select": `Seleccionar`,
	"selectedAll": `Todos los elementos seleccionados.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `Ning\xfan elemento seleccionado`,
		one: () => `${formatter.number(args.count)} elemento seleccionado`,
		other: () => `${formatter.number(args.count)} elementos seleccionados`
	})}.`,
	"selectedItem": (args) => `${args.item} seleccionado.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/et-EE.mjs
var $5cbb62c8a19173ac$exports = {};
$5cbb62c8a19173ac$exports = {
	"deselectedItem": (args) => `${args.item} pole valitud.`,
	"longPressToSelect": `Valikure\u{17E}iimi sisenemiseks vajutage pikalt.`,
	"select": `Vali`,
	"selectedAll": `K\xf5ik \xfcksused valitud.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `\xdcksusi pole valitud`,
		one: () => `${formatter.number(args.count)} \xfcksus valitud`,
		other: () => `${formatter.number(args.count)} \xfcksust valitud`
	})}.`,
	"selectedItem": (args) => `${args.item} valitud.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/fi-FI.mjs
var $a33d71dc804cc59e$exports = {};
$a33d71dc804cc59e$exports = {
	"deselectedItem": (args) => `Kohdetta ${args.item} ei valittu.`,
	"longPressToSelect": `Siirry valintatilaan painamalla pitk\xe4\xe4n.`,
	"select": `Valitse`,
	"selectedAll": `Kaikki kohteet valittu.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `Ei yht\xe4\xe4n kohdetta valittu`,
		one: () => `${formatter.number(args.count)} kohde valittu`,
		other: () => `${formatter.number(args.count)} kohdetta valittu`
	})}.`,
	"selectedItem": (args) => `${args.item} valittu.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/fr-FR.mjs
var $92d800447793d084$exports = {};
$92d800447793d084$exports = {
	"deselectedItem": (args) => `${args.item} non s\xe9lectionn\xe9.`,
	"longPressToSelect": `Appuyez de mani\xe8re prolong\xe9e pour passer en mode de s\xe9lection.`,
	"select": `S\xe9lectionner`,
	"selectedAll": `Tous les \xe9l\xe9ments s\xe9lectionn\xe9s.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `Aucun \xe9l\xe9ment s\xe9lectionn\xe9`,
		one: () => `${formatter.number(args.count)} \xe9l\xe9ment s\xe9lectionn\xe9`,
		other: () => `${formatter.number(args.count)} \xe9l\xe9ments s\xe9lectionn\xe9s`
	})}.`,
	"selectedItem": (args) => `${args.item} s\xe9lectionn\xe9.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/he-IL.mjs
var $fe732cdb32124ea8$exports = {};
$fe732cdb32124ea8$exports = {
	"deselectedItem": (args) => `${args.item} \u{5DC}\u{5D0} \u{5E0}\u{5D1}\u{5D7}\u{5E8}.`,
	"longPressToSelect": `\u{5D4}\u{5E7}\u{5E9}\u{5D4} \u{5D0}\u{5E8}\u{5D5}\u{5DB}\u{5D4} \u{5DC}\u{5DB}\u{5E0}\u{5D9}\u{5E1}\u{5D4} \u{5DC}\u{5DE}\u{5E6}\u{5D1} \u{5D1}\u{5D7}\u{5D9}\u{5E8}\u{5D4}.`,
	"select": `\u{5D1}\u{5D7}\u{5E8}`,
	"selectedAll": `\u{5DB}\u{5DC} \u{5D4}\u{5E4}\u{5E8}\u{5D9}\u{5D8}\u{5D9}\u{5DD} \u{5E0}\u{5D1}\u{5D7}\u{5E8}\u{5D5}.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `\u{5DC}\u{5D0} \u{5E0}\u{5D1}\u{5D7}\u{5E8}\u{5D5} \u{5E4}\u{5E8}\u{5D9}\u{5D8}\u{5D9}\u{5DD}`,
		one: () => `\u{5E4}\u{5E8}\u{5D9}\u{5D8} ${formatter.number(args.count)} \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{5E0}\u{5D1}\u{5D7}\u{5E8}\u{5D5}`
	})}.`,
	"selectedItem": (args) => `${args.item} \u{5E0}\u{5D1}\u{5D7}\u{5E8}.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/hr-HR.mjs
var $e41234e934efb4f5$exports = {};
$e41234e934efb4f5$exports = {
	"deselectedItem": (args) => `Stavka ${args.item} nije odabrana.`,
	"longPressToSelect": `Dugo pritisnite za ulazak u na\u{10D}in odabira.`,
	"select": `Odaberite`,
	"selectedAll": `Odabrane su sve stavke.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `Nije odabrana nijedna stavka`,
		one: () => `Odabrana je ${formatter.number(args.count)} stavka`,
		other: () => `Odabrano je ${formatter.number(args.count)} stavki`
	})}.`,
	"selectedItem": (args) => `Stavka ${args.item} je odabrana.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/hu-HU.mjs
var $1b0393182473bf9e$exports = {};
$1b0393182473bf9e$exports = {
	"deselectedItem": (args) => `${args.item} nincs kijel\xf6lve.`,
	"longPressToSelect": `Nyomja hosszan a kijel\xf6l\xe9shez.`,
	"select": `Kijel\xf6l\xe9s`,
	"selectedAll": `Az \xf6sszes elem kijel\xf6lve.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `Egy elem sincs kijel\xf6lve`,
		one: () => `${formatter.number(args.count)} elem kijel\xf6lve`,
		other: () => `${formatter.number(args.count)} elem kijel\xf6lve`
	})}.`,
	"selectedItem": (args) => `${args.item} kijel\xf6lve.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/it-IT.mjs
var $2eed782c1c110ce7$exports = {};
$2eed782c1c110ce7$exports = {
	"deselectedItem": (args) => `${args.item} non selezionato.`,
	"longPressToSelect": `Premi a lungo per passare alla modalit\xe0 di selezione.`,
	"select": `Seleziona`,
	"selectedAll": `Tutti gli elementi selezionati.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `Nessun elemento selezionato`,
		one: () => `${formatter.number(args.count)} elemento selezionato`,
		other: () => `${formatter.number(args.count)} elementi selezionati`
	})}.`,
	"selectedItem": (args) => `${args.item} selezionato.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/ja-JP.mjs
var $8b5d459f86e9b23c$exports = {};
$8b5d459f86e9b23c$exports = {
	"deselectedItem": (args) => `${args.item} \u{304C}\u{9078}\u{629E}\u{3055}\u{308C}\u{3066}\u{3044}\u{307E}\u{305B}\u{3093}\u{3002}`,
	"longPressToSelect": `\u{9577}\u{62BC}\u{3057}\u{3057}\u{3066}\u{9078}\u{629E}\u{30E2}\u{30FC}\u{30C9}\u{3092}\u{958B}\u{304D}\u{307E}\u{3059}\u{3002}`,
	"select": `\u{9078}\u{629E}`,
	"selectedAll": `\u{3059}\u{3079}\u{3066}\u{306E}\u{9805}\u{76EE}\u{3092}\u{9078}\u{629E}\u{3057}\u{307E}\u{3057}\u{305F}\u{3002}`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `\u{9805}\u{76EE}\u{304C}\u{9078}\u{629E}\u{3055}\u{308C}\u{3066}\u{3044}\u{307E}\u{305B}\u{3093}`,
		one: () => `${formatter.number(args.count)} \u{9805}\u{76EE}\u{3092}\u{9078}\u{629E}\u{3057}\u{307E}\u{3057}\u{305F}`,
		other: () => `${formatter.number(args.count)} \u{9805}\u{76EE}\u{3092}\u{9078}\u{629E}\u{3057}\u{307E}\u{3057}\u{305F}`
	})}\u{3002}`,
	"selectedItem": (args) => `${args.item} \u{3092}\u{9078}\u{629E}\u{3057}\u{307E}\u{3057}\u{305F}\u{3002}`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/ko-KR.mjs
var $1949c3ad17295fd4$exports = {};
$1949c3ad17295fd4$exports = {
	"deselectedItem": (args) => `${args.item}\u{C774}(\u{AC00}) \u{C120}\u{D0DD}\u{B418}\u{C9C0} \u{C54A}\u{C558}\u{C2B5}\u{B2C8}\u{B2E4}.`,
	"longPressToSelect": `\u{C120}\u{D0DD} \u{BAA8}\u{B4DC}\u{B85C} \u{B4E4}\u{C5B4}\u{AC00}\u{B824}\u{BA74} \u{AE38}\u{AC8C} \u{B204}\u{B974}\u{C2ED}\u{C2DC}\u{C624}.`,
	"select": `\u{C120}\u{D0DD}`,
	"selectedAll": `\u{BAA8}\u{B4E0} \u{D56D}\u{BAA9}\u{C774} \u{C120}\u{D0DD}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `\u{C120}\u{D0DD}\u{B41C} \u{D56D}\u{BAA9}\u{C774} \u{C5C6}\u{C2B5}\u{B2C8}\u{B2E4}`,
		one: () => `${formatter.number(args.count)}\u{AC1C} \u{D56D}\u{BAA9}\u{C774} \u{C120}\u{D0DD}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}`,
		other: () => `${formatter.number(args.count)}\u{AC1C} \u{D56D}\u{BAA9}\u{C774} \u{C120}\u{D0DD}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}`
	})}.`,
	"selectedItem": (args) => `${args.item}\u{C774}(\u{AC00}) \u{C120}\u{D0DD}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/lt-LT.mjs
var $f5e3df4dc8aa7b54$exports = {};
$f5e3df4dc8aa7b54$exports = {
	"deselectedItem": (args) => `${args.item} nepasirinkta.`,
	"longPressToSelect": `Nor\u{117}dami \u{12F}jungti pasirinkimo re\u{17E}im\u{105}, paspauskite ir palaikykite.`,
	"select": `Pasirinkti`,
	"selectedAll": `Pasirinkti visi elementai.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `Nepasirinktas n\u{117} vienas elementas`,
		one: () => `Pasirinktas ${formatter.number(args.count)} elementas`,
		other: () => `Pasirinkta element\u{173}: ${formatter.number(args.count)}`
	})}.`,
	"selectedItem": (args) => `Pasirinkta: ${args.item}.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/lv-LV.mjs
var $9dd86690a5c2b2c5$exports = {};
$9dd86690a5c2b2c5$exports = {
	"deselectedItem": (args) => `Vienums ${args.item} nav atlas\u{12B}ts.`,
	"longPressToSelect": `Ilgi turiet nospiestu. lai iesl\u{113}gtu atlases re\u{17E}\u{12B}mu.`,
	"select": `Atlas\u{12B}t`,
	"selectedAll": `Atlas\u{12B}ti visi vienumi.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `Nav atlas\u{12B}ts neviens vienums`,
		one: () => `Atlas\u{12B}to vienumu skaits: ${formatter.number(args.count)}`,
		other: () => `Atlas\u{12B}to vienumu skaits: ${formatter.number(args.count)}`
	})}.`,
	"selectedItem": (args) => `Atlas\u{12B}ts vienums ${args.item}.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/nb-NO.mjs
var $843964c3bf9a7d24$exports = {};
$843964c3bf9a7d24$exports = {
	"deselectedItem": (args) => `${args.item} er ikke valgt.`,
	"longPressToSelect": `Bruk et langt trykk for \xe5 g\xe5 inn i valgmodus.`,
	"select": `Velg`,
	"selectedAll": `Alle elementer er valgt.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `Ingen elementer er valgt`,
		one: () => `${formatter.number(args.count)} element er valgt`,
		other: () => `${formatter.number(args.count)} elementer er valgt`
	})}.`,
	"selectedItem": (args) => `${args.item} er valgt.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/nl-NL.mjs
var $73f50e845f9ef3b4$exports = {};
$73f50e845f9ef3b4$exports = {
	"deselectedItem": (args) => `${args.item} niet geselecteerd.`,
	"longPressToSelect": `Druk lang om de selectiemodus te openen.`,
	"select": `Selecteren`,
	"selectedAll": `Alle items geselecteerd.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `Geen items geselecteerd`,
		one: () => `${formatter.number(args.count)} item geselecteerd`,
		other: () => `${formatter.number(args.count)} items geselecteerd`
	})}.`,
	"selectedItem": (args) => `${args.item} geselecteerd.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/pl-PL.mjs
var $87f92a7e077514b2$exports = {};
$87f92a7e077514b2$exports = {
	"deselectedItem": (args) => `Nie zaznaczono ${args.item}.`,
	"longPressToSelect": `Naci\u{15B}nij i przytrzymaj, aby wej\u{15B}\u{107} do trybu wyboru.`,
	"select": `Zaznacz`,
	"selectedAll": `Wszystkie zaznaczone elementy.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `Nie zaznaczono \u{17C}adnych element\xf3w`,
		one: () => `${formatter.number(args.count)} zaznaczony element`,
		other: () => `${formatter.number(args.count)} zaznaczonych element\xf3w`
	})}.`,
	"selectedItem": (args) => `Zaznaczono ${args.item}.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/pt-BR.mjs
var $c28c98d58ee9ff6f$exports = {};
$c28c98d58ee9ff6f$exports = {
	"deselectedItem": (args) => `${args.item} n\xe3o selecionado.`,
	"longPressToSelect": `Mantenha pressionado para entrar no modo de sele\xe7\xe3o.`,
	"select": `Selecionar`,
	"selectedAll": `Todos os itens selecionados.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `Nenhum item selecionado`,
		one: () => `${formatter.number(args.count)} item selecionado`,
		other: () => `${formatter.number(args.count)} itens selecionados`
	})}.`,
	"selectedItem": (args) => `${args.item} selecionado.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/pt-PT.mjs
var $b6b1503b17b2254d$exports = {};
$b6b1503b17b2254d$exports = {
	"deselectedItem": (args) => `${args.item} n\xe3o selecionado.`,
	"longPressToSelect": `Prima continuamente para entrar no modo de sele\xe7\xe3o.`,
	"select": `Selecionar`,
	"selectedAll": `Todos os itens selecionados.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `Nenhum item selecionado`,
		one: () => `${formatter.number(args.count)} item selecionado`,
		other: () => `${formatter.number(args.count)} itens selecionados`
	})}.`,
	"selectedItem": (args) => `${args.item} selecionado.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/ro-RO.mjs
var $8bdaeb71e50c3e1a$exports = {};
$8bdaeb71e50c3e1a$exports = {
	"deselectedItem": (args) => `${args.item} neselectat.`,
	"longPressToSelect": `Ap\u{103}sa\u{21B}i lung pentru a intra \xeen modul de selectare.`,
	"select": `Selectare`,
	"selectedAll": `Toate elementele selectate.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `Niciun element selectat`,
		one: () => `${formatter.number(args.count)} element selectat`,
		other: () => `${formatter.number(args.count)} elemente selectate`
	})}.`,
	"selectedItem": (args) => `${args.item} selectat.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/ru-RU.mjs
var $ec2b852dd7c3d1f2$exports = {};
$ec2b852dd7c3d1f2$exports = {
	"deselectedItem": (args) => `${args.item} \u{43D}\u{435} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`,
	"longPressToSelect": `\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{432}\u{445}\u{43E}\u{434}\u{430} \u{432} \u{440}\u{435}\u{436}\u{438}\u{43C} \u{432}\u{44B}\u{431}\u{43E}\u{440}\u{430}.`,
	"select": `\u{412}\u{44B}\u{431}\u{440}\u{430}\u{442}\u{44C}`,
	"selectedAll": `\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{44B} \u{432}\u{441}\u{435} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{44B}.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `\u{41D}\u{435}\u{442} \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}`,
		one: () => `${formatter.number(args.count)} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}`,
		other: () => `${formatter.number(args.count)} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{43E}\u{432} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E}`
	})}.`,
	"selectedItem": (args) => `${args.item} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/sk-SK.mjs
var $79e6d900d6a4f82d$exports = {};
$79e6d900d6a4f82d$exports = {
	"deselectedItem": (args) => `Nevybrat\xe9 polo\u{17E}ky: ${args.item}.`,
	"longPressToSelect": `Dlh\u{161}\xedm stla\u{10D}en\xedm prejdite do re\u{17E}imu v\xfdberu.`,
	"select": `Vybra\u{165}`,
	"selectedAll": `V\u{161}etky vybrat\xe9 polo\u{17E}ky.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `\u{17D}iadne vybrat\xe9 polo\u{17E}ky`,
		one: () => `${formatter.number(args.count)} vybrat\xe1 polo\u{17E}ka`,
		other: () => `Po\u{10D}et vybrat\xfdch polo\u{17E}iek:${formatter.number(args.count)}`
	})}.`,
	"selectedItem": (args) => `Vybrat\xe9 polo\u{17E}ky: ${args.item}.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/sl-SI.mjs
var $f4c1f0d5d4d03d80$exports = {};
$f4c1f0d5d4d03d80$exports = {
	"deselectedItem": (args) => `Element ${args.item} ni izbran.`,
	"longPressToSelect": `Za izbirni na\u{10D}in pritisnite in dlje \u{10D}asa dr\u{17E}ite.`,
	"select": `Izberite`,
	"selectedAll": `Vsi elementi so izbrani.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `Noben element ni izbran`,
		one: () => `${formatter.number(args.count)} element je izbran`,
		other: () => `${formatter.number(args.count)} elementov je izbranih`
	})}.`,
	"selectedItem": (args) => `Element ${args.item} je izbran.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/sr-SP.mjs
var $46252cd87269b10b$exports = {};
$46252cd87269b10b$exports = {
	"deselectedItem": (args) => `${args.item} nije izabrano.`,
	"longPressToSelect": `Dugo pritisnite za ulazak u re\u{17E}im biranja.`,
	"select": `Izaberite`,
	"selectedAll": `Izabrane su sve stavke.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `Nije izabrana nijedna stavka`,
		one: () => `Izabrana je ${formatter.number(args.count)} stavka`,
		other: () => `Izabrano je ${formatter.number(args.count)} stavki`
	})}.`,
	"selectedItem": (args) => `${args.item} je izabrano.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/sv-SE.mjs
var $d4d5d8dab362555c$exports = {};
$d4d5d8dab362555c$exports = {
	"deselectedItem": (args) => `${args.item} ej markerat.`,
	"longPressToSelect": `Tryck l\xe4nge n\xe4r du vill \xf6ppna v\xe4ljarl\xe4ge.`,
	"select": `Markera`,
	"selectedAll": `Alla markerade objekt.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `Inga markerade objekt`,
		one: () => `${formatter.number(args.count)} markerat objekt`,
		other: () => `${formatter.number(args.count)} markerade objekt`
	})}.`,
	"selectedItem": (args) => `${args.item} markerat.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/tr-TR.mjs
var $3d55d1f97c377e83$exports = {};
$3d55d1f97c377e83$exports = {
	"deselectedItem": (args) => `${args.item} se\xe7ilmedi.`,
	"longPressToSelect": `Se\xe7im moduna girmek i\xe7in uzun bas\u{131}n.`,
	"select": `Se\xe7`,
	"selectedAll": `T\xfcm \xf6geler se\xe7ildi.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `Hi\xe7bir \xf6ge se\xe7ilmedi`,
		one: () => `${formatter.number(args.count)} \xf6ge se\xe7ildi`,
		other: () => `${formatter.number(args.count)} \xf6ge se\xe7ildi`
	})}.`,
	"selectedItem": (args) => `${args.item} se\xe7ildi.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/uk-UA.mjs
var $5368512f1c703a3f$exports = {};
$5368512f1c703a3f$exports = {
	"deselectedItem": (args) => `${args.item} \u{43D}\u{435} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`,
	"longPressToSelect": `\u{412}\u{438}\u{43A}\u{43E}\u{43D}\u{430}\u{439}\u{442}\u{435} \u{434}\u{43E}\u{432}\u{433}\u{435} \u{43D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{43D}\u{43D}\u{44F}, \u{449}\u{43E}\u{431} \u{43F}\u{435}\u{440}\u{435}\u{439}\u{442}\u{438} \u{432} \u{440}\u{435}\u{436}\u{438}\u{43C} \u{432}\u{438}\u{431}\u{43E}\u{440}\u{443}.`,
	"select": `\u{412}\u{438}\u{431}\u{440}\u{430}\u{442}\u{438}`,
	"selectedAll": `\u{423}\u{441}\u{456} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{438} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `\u{416}\u{43E}\u{434}\u{43D}\u{438}\u{445} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{456}\u{432} \u{43D}\u{435} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E}`,
		one: () => `${formatter.number(args.count)} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E}`,
		other: () => `\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{456}\u{432}: ${formatter.number(args.count)}`
	})}.`,
	"selectedItem": (args) => `${args.item} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/zh-CN.mjs
var $f1316b1074463583$exports = {};
$f1316b1074463583$exports = {
	"deselectedItem": (args) => `\u{672A}\u{9009}\u{62E9} ${args.item}\u{3002}`,
	"longPressToSelect": `\u{957F}\u{6309}\u{4EE5}\u{8FDB}\u{5165}\u{9009}\u{62E9}\u{6A21}\u{5F0F}\u{3002}`,
	"select": `\u{9009}\u{62E9}`,
	"selectedAll": `\u{5DF2}\u{9009}\u{62E9}\u{6240}\u{6709}\u{9879}\u{76EE}\u{3002}`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `\u{672A}\u{9009}\u{62E9}\u{9879}\u{76EE}`,
		one: () => `\u{5DF2}\u{9009}\u{62E9} ${formatter.number(args.count)} \u{4E2A}\u{9879}\u{76EE}`,
		other: () => `\u{5DF2}\u{9009}\u{62E9} ${formatter.number(args.count)} \u{4E2A}\u{9879}\u{76EE}`
	})}\u{3002}`,
	"selectedItem": (args) => `\u{5DF2}\u{9009}\u{62E9} ${args.item}\u{3002}`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/zh-TW.mjs
var $7e60654723031b6f$exports = {};
$7e60654723031b6f$exports = {
	"deselectedItem": (args) => `\u{672A}\u{9078}\u{53D6}\u{300C}${args.item}\u{300D}\u{3002}`,
	"longPressToSelect": `\u{9577}\u{6309}\u{4EE5}\u{9032}\u{5165}\u{9078}\u{64C7}\u{6A21}\u{5F0F}\u{3002}`,
	"select": `\u{9078}\u{53D6}`,
	"selectedAll": `\u{5DF2}\u{9078}\u{53D6}\u{6240}\u{6709}\u{9805}\u{76EE}\u{3002}`,
	"selectedCount": (args, formatter) => `${formatter.plural(args.count, {
		"=0": `\u{672A}\u{9078}\u{53D6}\u{4EFB}\u{4F55}\u{9805}\u{76EE}`,
		one: () => `\u{5DF2}\u{9078}\u{53D6} ${formatter.number(args.count)} \u{500B}\u{9805}\u{76EE}`,
		other: () => `\u{5DF2}\u{9078}\u{53D6} ${formatter.number(args.count)} \u{500B}\u{9805}\u{76EE}`
	})}\u{3002}`,
	"selectedItem": (args) => `\u{5DF2}\u{9078}\u{53D6}\u{300C}${args.item}\u{300D}\u{3002}`
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/intlStrings.mjs
var $835c96616a7cb4f9$exports = {};
$835c96616a7cb4f9$exports = {
	"ar-AE": $682989befd4f478d$exports,
	"bg-BG": $f7fca02019afd941$exports,
	"cs-CZ": $8f86f40be75387f1$exports,
	"da-DK": $db24ba43c8d652ee$exports,
	"de-DE": $f8f1e72c8b5447d6$exports,
	"el-GR": $9a73ed2983c3ab0b$exports,
	"en-US": $583de0b3587601b9$exports,
	"es-ES": $147159c978043442$exports,
	"et-EE": $5cbb62c8a19173ac$exports,
	"fi-FI": $a33d71dc804cc59e$exports,
	"fr-FR": $92d800447793d084$exports,
	"he-IL": $fe732cdb32124ea8$exports,
	"hr-HR": $e41234e934efb4f5$exports,
	"hu-HU": $1b0393182473bf9e$exports,
	"it-IT": $2eed782c1c110ce7$exports,
	"ja-JP": $8b5d459f86e9b23c$exports,
	"ko-KR": $1949c3ad17295fd4$exports,
	"lt-LT": $f5e3df4dc8aa7b54$exports,
	"lv-LV": $9dd86690a5c2b2c5$exports,
	"nb-NO": $843964c3bf9a7d24$exports,
	"nl-NL": $73f50e845f9ef3b4$exports,
	"pl-PL": $87f92a7e077514b2$exports,
	"pt-BR": $c28c98d58ee9ff6f$exports,
	"pt-PT": $b6b1503b17b2254d$exports,
	"ro-RO": $8bdaeb71e50c3e1a$exports,
	"ru-RU": $ec2b852dd7c3d1f2$exports,
	"sk-SK": $79e6d900d6a4f82d$exports,
	"sl-SI": $f4c1f0d5d4d03d80$exports,
	"sr-SP": $46252cd87269b10b$exports,
	"sv-SE": $d4d5d8dab362555c$exports,
	"tr-TR": $3d55d1f97c377e83$exports,
	"uk-UA": $5368512f1c703a3f$exports,
	"zh-CN": $f1316b1074463583$exports,
	"zh-TW": $7e60654723031b6f$exports
};
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/useGridSelectionAnnouncement.mjs
function $parcel$interopDefault$2(a) {
	return a && a.__esModule ? a.default : a;
}
function $92599c3fd427b763$export$137e594ef3218a10(props, state) {
	let { getRowText = (key) => {
		var _state_collection_getTextValue, _state_collection, _state_collection_getItem;
		var _state_collection_getTextValue1;
		return (_state_collection_getTextValue1 = (_state_collection_getTextValue = (_state_collection = state.collection).getTextValue) === null || _state_collection_getTextValue === void 0 ? void 0 : _state_collection_getTextValue.call(_state_collection, key)) !== null && _state_collection_getTextValue1 !== void 0 ? _state_collection_getTextValue1 : (_state_collection_getItem = state.collection.getItem(key)) === null || _state_collection_getItem === void 0 ? void 0 : _state_collection_getItem.textValue;
	} } = props;
	let stringFormatter = $fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault$2($835c96616a7cb4f9$exports), "@react-aria/grid");
	let selection = state.selectionManager.rawSelection;
	let lastSelection = (0, import_react.useRef)(selection);
	let announceSelectionChange = (0, import_react.useCallback)(() => {
		var _lastSelection_current;
		if (!state.selectionManager.isFocused || selection === lastSelection.current) {
			lastSelection.current = selection;
			return;
		}
		let addedKeys = $92599c3fd427b763$var$diffSelection(selection, lastSelection.current);
		let removedKeys = $92599c3fd427b763$var$diffSelection(lastSelection.current, selection);
		let isReplace = state.selectionManager.selectionBehavior === "replace";
		let messages = [];
		if (state.selectionManager.selectedKeys.size === 1 && isReplace) {
			let firstKey = state.selectionManager.selectedKeys.keys().next().value;
			if (firstKey != null && state.collection.getItem(firstKey)) {
				let currentSelectionText = getRowText(firstKey);
				if (currentSelectionText) messages.push(stringFormatter.format("selectedItem", { item: currentSelectionText }));
			}
		} else if (addedKeys.size === 1 && removedKeys.size === 0) {
			let firstKey = addedKeys.keys().next().value;
			if (firstKey != null) {
				let addedText = getRowText(firstKey);
				if (addedText) messages.push(stringFormatter.format("selectedItem", { item: addedText }));
			}
		} else if (removedKeys.size === 1 && addedKeys.size === 0) {
			let firstKey = removedKeys.keys().next().value;
			if (firstKey != null && state.collection.getItem(firstKey)) {
				let removedText = getRowText(firstKey);
				if (removedText) messages.push(stringFormatter.format("deselectedItem", { item: removedText }));
			}
		}
		if (state.selectionManager.selectionMode === "multiple") {
			if (messages.length === 0 || selection === "all" || selection.size > 1 || lastSelection.current === "all" || ((_lastSelection_current = lastSelection.current) === null || _lastSelection_current === void 0 ? void 0 : _lastSelection_current.size) > 1) messages.push(selection === "all" ? stringFormatter.format("selectedAll") : stringFormatter.format("selectedCount", { count: selection.size }));
		}
		if (messages.length > 0) $319e236875307eab$export$a9b970dcc4ae71a9(messages.join(" "));
		lastSelection.current = selection;
	}, [
		selection,
		state.selectionManager.selectedKeys,
		state.selectionManager.isFocused,
		state.selectionManager.selectionBehavior,
		state.selectionManager.selectionMode,
		state.collection,
		getRowText,
		stringFormatter
	]);
	$4f58c5f72bcf79f7$export$496315a1608d9602(() => {
		if (state.selectionManager.isFocused) announceSelectionChange();
		else {
			let raf = requestAnimationFrame(announceSelectionChange);
			return () => cancelAnimationFrame(raf);
		}
	}, [selection, state.selectionManager.isFocused]);
}
function $92599c3fd427b763$var$diffSelection(a, b) {
	let res = /* @__PURE__ */ new Set();
	if (a === "all" || b === "all") return res;
	for (let key of a.keys()) if (!b.has(key)) res.add(key);
	return res;
}
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/useHighlightSelectionDescription.mjs
function $parcel$interopDefault$1(a) {
	return a && a.__esModule ? a.default : a;
}
function $5b9b5b5723db6ae1$export$be42ebdab07ae4c2(props) {
	let stringFormatter = $fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault$1($835c96616a7cb4f9$exports), "@react-aria/grid");
	let modality = $507fabe10e71c6fb$export$98e20ec92f614cfe();
	let shouldLongPress = (modality === "pointer" || modality === "virtual" || modality == null) && typeof window !== "undefined" && "ontouchstart" in window;
	return $ef06256079686ba0$export$f8aeda7b10753fa1((0, import_react.useMemo)(() => {
		let selectionMode = props.selectionManager.selectionMode;
		let selectionBehavior = props.selectionManager.selectionBehavior;
		let message;
		if (shouldLongPress) message = stringFormatter.format("longPressToSelect");
		return selectionBehavior === "replace" && selectionMode !== "none" && props.hasItemActions ? message : void 0;
	}, [
		props.selectionManager.selectionMode,
		props.selectionManager.selectionBehavior,
		props.hasItemActions,
		stringFormatter,
		shouldLongPress
	]));
}
//#endregion
//#region ../../node_modules/@react-aria/grid/dist/useGridSelectionCheckbox.mjs
function $parcel$interopDefault(a) {
	return a && a.__esModule ? a.default : a;
}
function $7cb39d07f245a780$export$70e2eed1a92976ad(props, state) {
	let { key } = props;
	let manager = state.selectionManager;
	let checkboxId = $bdb11010cef70236$export$f680877a34711e37();
	let isDisabled = !state.selectionManager.canSelectItem(key);
	let isSelected = state.selectionManager.isSelected(key);
	let onChange = () => manager.toggleSelection(key);
	return { checkboxProps: {
		id: checkboxId,
		"aria-label": $fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault($835c96616a7cb4f9$exports), "@react-aria/grid").format("select"),
		isSelected,
		isDisabled,
		onChange
	} };
}
//#endregion
//#region ../../node_modules/@react-aria/gridlist/dist/useGridList.mjs
function $f47efb0c3a859cf2$export$664f9155035607eb(props, state, ref) {
	let { isVirtualized, keyboardDelegate, layoutDelegate, onAction, disallowTypeAhead, linkBehavior = "action", keyboardNavigationBehavior = "arrow", escapeKeyBehavior = "clearSelection", shouldSelectOnPressUp } = props;
	if (!props["aria-label"] && !props["aria-labelledby"]) console.warn("An aria-label or aria-labelledby prop is required for accessibility.");
	let { listProps } = $982254629710d113$export$b95089534ab7c1fd({
		selectionManager: state.selectionManager,
		collection: state.collection,
		disabledKeys: state.disabledKeys,
		ref,
		keyboardDelegate,
		layoutDelegate,
		isVirtualized,
		selectOnFocus: state.selectionManager.selectionBehavior === "replace",
		shouldFocusWrap: props.shouldFocusWrap,
		linkBehavior,
		disallowTypeAhead,
		autoFocus: props.autoFocus,
		escapeKeyBehavior
	});
	let id = $bdb11010cef70236$export$f680877a34711e37(props.id);
	$ce9b18daab526bbd$export$5b9bb410392e3991.set(state, {
		id,
		onAction,
		linkBehavior,
		keyboardNavigationBehavior,
		shouldSelectOnPressUp
	});
	let descriptionProps = $5b9b5b5723db6ae1$export$be42ebdab07ae4c2({
		selectionManager: state.selectionManager,
		hasItemActions: !!onAction
	});
	let hasTabbableChild = $83013635b024ae3d$export$eac1895992b9f3d6(ref, { isDisabled: state.collection.size !== 0 });
	let gridProps = $3ef42575df84b30b$export$9d1611c77c2fe928($65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, { labelable: true }), {
		role: "grid",
		id,
		"aria-multiselectable": state.selectionManager.selectionMode === "multiple" ? "true" : void 0
	}, state.collection.size === 0 ? { tabIndex: hasTabbableChild ? -1 : 0 } : listProps, descriptionProps);
	if (isVirtualized) {
		gridProps["aria-rowcount"] = state.collection.size;
		gridProps["aria-colcount"] = 1;
	}
	$92599c3fd427b763$export$137e594ef3218a10({}, state);
	return { gridProps };
}
//#endregion
//#region ../../node_modules/@react-aria/gridlist/dist/useGridListItem.mjs
var $4e8b0456ef72939f$var$EXPANSION_KEYS = {
	"expand": {
		ltr: "ArrowRight",
		rtl: "ArrowLeft"
	},
	"collapse": {
		ltr: "ArrowLeft",
		rtl: "ArrowRight"
	}
};
function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
	var _node_props, _node_props1;
	let { node, isVirtualized } = props;
	let { direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
	let { onAction, linkBehavior, keyboardNavigationBehavior, shouldSelectOnPressUp } = $ce9b18daab526bbd$export$5b9bb410392e3991.get(state);
	let descriptionId = $bdb11010cef70236$export$b4cc09c592e8fdb8();
	let keyWhenFocused = (0, import_react.useRef)(null);
	let focus = () => {
		if (ref.current !== null && (keyWhenFocused.current != null && node.key !== keyWhenFocused.current || !$d4ee10de306f2510$export$b4f377a2b6254582(ref.current))) $3ad3f6e1647bc98d$export$80f3e147d781571c(ref.current);
	};
	let treeGridRowProps = {};
	let hasChildRows = props.hasChildItems;
	let hasLink = state.selectionManager.isLink(node.key);
	if (node != null && "expandedKeys" in state) {
		var _state_collection_getChildren, _state_collection;
		let children = (_state_collection_getChildren = (_state_collection = state.collection).getChildren) === null || _state_collection_getChildren === void 0 ? void 0 : _state_collection_getChildren.call(_state_collection, node.key);
		hasChildRows = hasChildRows || [...children !== null && children !== void 0 ? children : []].length > 1;
		if (onAction == null && !hasLink && state.selectionManager.selectionMode === "none" && hasChildRows) onAction = () => state.toggleKey(node.key);
		let isExpanded = hasChildRows ? state.expandedKeys.has(node.key) : void 0;
		let setSize = 1;
		let index = node.index;
		if (node.level >= 0 && (node === null || node === void 0 ? void 0 : node.parentKey) != null) {
			let parent = state.collection.getItem(node.parentKey);
			if (parent) {
				let siblings = $4e8b0456ef72939f$var$getDirectChildren(parent, state.collection);
				setSize = [...siblings].filter((row) => row.type === "item").length;
				if (index > 0 && siblings[0].type !== "item") index -= 1;
			}
		} else setSize = [...state.collection].filter((row) => row.level === 0 && row.type === "item").length;
		treeGridRowProps = {
			"aria-expanded": isExpanded,
			"aria-level": node.level + 1,
			"aria-posinset": index + 1,
			"aria-setsize": setSize
		};
	}
	let { itemProps, ...itemStates } = $880e95eb8b93ba9a$export$ecf600387e221c37({
		selectionManager: state.selectionManager,
		key: node.key,
		ref,
		isVirtualized,
		shouldSelectOnPressUp: props.shouldSelectOnPressUp || shouldSelectOnPressUp,
		onAction: onAction || ((_node_props = node.props) === null || _node_props === void 0 ? void 0 : _node_props.onAction) ? $ff5963eb1fccf552$export$e08e3b67e392101e((_node_props1 = node.props) === null || _node_props1 === void 0 ? void 0 : _node_props1.onAction, onAction ? () => onAction(node.key) : void 0) : void 0,
		focus,
		linkBehavior
	});
	let onKeyDownCapture = (e) => {
		let activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576();
		if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e)) || !ref.current || !activeElement) return;
		let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(ref.current);
		walker.currentNode = activeElement;
		if ("expandedKeys" in state && activeElement === ref.current) {
			if (e.key === $4e8b0456ef72939f$var$EXPANSION_KEYS["expand"][direction] && state.selectionManager.focusedKey === node.key && hasChildRows && !state.expandedKeys.has(node.key)) {
				state.toggleKey(node.key);
				e.stopPropagation();
				return;
			} else if (e.key === $4e8b0456ef72939f$var$EXPANSION_KEYS["collapse"][direction] && state.selectionManager.focusedKey === node.key && hasChildRows && state.expandedKeys.has(node.key)) {
				state.toggleKey(node.key);
				e.stopPropagation();
				return;
			}
		}
		switch (e.key) {
			case "ArrowLeft":
				if (keyboardNavigationBehavior === "arrow") {
					let focusable = direction === "rtl" ? walker.nextNode() : walker.previousNode();
					if (focusable) {
						e.preventDefault();
						e.stopPropagation();
						$3ad3f6e1647bc98d$export$80f3e147d781571c(focusable);
						$2f04cbc44ee30ce0$export$c826860796309d1b(focusable, { containingElement: $62d8ded9296f3872$export$cfa2225e87938781(ref.current) });
					} else {
						e.preventDefault();
						e.stopPropagation();
						if (direction === "rtl") {
							$3ad3f6e1647bc98d$export$80f3e147d781571c(ref.current);
							$2f04cbc44ee30ce0$export$c826860796309d1b(ref.current, { containingElement: $62d8ded9296f3872$export$cfa2225e87938781(ref.current) });
						} else {
							walker.currentNode = ref.current;
							let lastElement = $4e8b0456ef72939f$var$last(walker);
							if (lastElement) {
								$3ad3f6e1647bc98d$export$80f3e147d781571c(lastElement);
								$2f04cbc44ee30ce0$export$c826860796309d1b(lastElement, { containingElement: $62d8ded9296f3872$export$cfa2225e87938781(ref.current) });
							}
						}
					}
				}
				break;
			case "ArrowRight":
				if (keyboardNavigationBehavior === "arrow") {
					let focusable = direction === "rtl" ? walker.previousNode() : walker.nextNode();
					if (focusable) {
						e.preventDefault();
						e.stopPropagation();
						$3ad3f6e1647bc98d$export$80f3e147d781571c(focusable);
						$2f04cbc44ee30ce0$export$c826860796309d1b(focusable, { containingElement: $62d8ded9296f3872$export$cfa2225e87938781(ref.current) });
					} else {
						e.preventDefault();
						e.stopPropagation();
						if (direction === "ltr") {
							$3ad3f6e1647bc98d$export$80f3e147d781571c(ref.current);
							$2f04cbc44ee30ce0$export$c826860796309d1b(ref.current, { containingElement: $62d8ded9296f3872$export$cfa2225e87938781(ref.current) });
						} else {
							walker.currentNode = ref.current;
							let lastElement = $4e8b0456ef72939f$var$last(walker);
							if (lastElement) {
								$3ad3f6e1647bc98d$export$80f3e147d781571c(lastElement);
								$2f04cbc44ee30ce0$export$c826860796309d1b(lastElement, { containingElement: $62d8ded9296f3872$export$cfa2225e87938781(ref.current) });
							}
						}
					}
				}
				break;
			case "ArrowUp":
			case "ArrowDown":
				if (!e.altKey && $d4ee10de306f2510$export$4282f70798064fe0(ref.current, $d4ee10de306f2510$export$e58f029f0fbfdb29(e))) {
					var _ref_current_parentElement;
					e.stopPropagation();
					e.preventDefault();
					(_ref_current_parentElement = ref.current.parentElement) === null || _ref_current_parentElement === void 0 || _ref_current_parentElement.dispatchEvent(new KeyboardEvent(e.nativeEvent.type, e.nativeEvent));
				}
				break;
		}
	};
	let onFocus = (e) => {
		keyWhenFocused.current = node.key;
		if ($d4ee10de306f2510$export$e58f029f0fbfdb29(e) !== ref.current) {
			if (!$507fabe10e71c6fb$export$b9b3dfddab17db27()) state.selectionManager.setFocusedKey(node.key);
			return;
		}
	};
	let onKeyDown = (e) => {
		let activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576();
		if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e)) || !ref.current || !activeElement) return;
		switch (e.key) {
			case "Tab": if (keyboardNavigationBehavior === "tab") {
				let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(ref.current, { tabbable: true });
				walker.currentNode = activeElement;
				if (e.shiftKey ? walker.previousNode() : walker.nextNode()) e.stopPropagation();
			}
		}
	};
	let syntheticLinkProps = $ea8dcbcb9ea1b556$export$bdc77b0c0a3a85d6(node.props);
	let rowProps = $3ef42575df84b30b$export$9d1611c77c2fe928(itemProps, itemStates.hasAction ? syntheticLinkProps : {}, {
		role: "row",
		onKeyDownCapture,
		onKeyDown,
		onFocus,
		"aria-label": node["aria-label"] || node.textValue || void 0,
		"aria-selected": state.selectionManager.canSelectItem(node.key) ? state.selectionManager.isSelected(node.key) : void 0,
		"aria-disabled": state.selectionManager.isDisabled(node.key) || void 0,
		"aria-labelledby": descriptionId && (node["aria-label"] || node.textValue) ? `${$ce9b18daab526bbd$export$f45c25170b9a99c2(state, node.key)} ${descriptionId}` : void 0,
		id: $ce9b18daab526bbd$export$f45c25170b9a99c2(state, node.key)
	});
	if (isVirtualized) {
		let { collection } = state;
		rowProps["aria-rowindex"] = [...collection].find((node) => node.type === "section") ? [...collection.getKeys()].filter((key) => {
			var _collection_getItem;
			return ((_collection_getItem = collection.getItem(key)) === null || _collection_getItem === void 0 ? void 0 : _collection_getItem.type) !== "section";
		}).findIndex((key) => key === node.key) + 1 : node.index + 1;
	}
	let gridCellProps = {
		role: "gridcell",
		"aria-colindex": 1
	};
	return {
		rowProps: { ...$3ef42575df84b30b$export$9d1611c77c2fe928(rowProps, treeGridRowProps) },
		gridCellProps,
		descriptionProps: { id: descriptionId },
		...itemStates
	};
}
function $4e8b0456ef72939f$var$last(walker) {
	let next = null;
	let last = null;
	do {
		last = walker.lastChild();
		if (last) next = last;
	} while (last);
	return next;
}
function $4e8b0456ef72939f$var$getDirectChildren(parent, collection) {
	var _collection_getChildren;
	let children = (_collection_getChildren = collection.getChildren) === null || _collection_getChildren === void 0 ? void 0 : _collection_getChildren.call(collection, parent.key);
	let childArray = children ? Array.from(children) : [];
	let node = childArray.length > 0 ? childArray[0] : null;
	let siblings = [];
	while (node) {
		siblings.push(node);
		node = node.nextKey != null ? collection.getItem(node.nextKey) : null;
	}
	return siblings;
}
//#endregion
//#region ../../node_modules/@react-aria/gridlist/dist/useGridListSelectionCheckbox.mjs
function $e52ffc04a4adbd52$export$e29f2573fabbf7b9(props, state) {
	let { key } = props;
	const { checkboxProps } = $7cb39d07f245a780$export$70e2eed1a92976ad(props, state);
	return { checkboxProps: {
		...checkboxProps,
		"aria-labelledby": `${checkboxProps.id} ${$ce9b18daab526bbd$export$f45c25170b9a99c2(state, key)}`
	} };
}
//#endregion
//#region ../../node_modules/react-aria-components/dist/GridList.mjs
var $72e60046c03fbe42$export$54fe942636b6416d = /* @__PURE__ */ (0, import_react.createContext)(null);
var $72e60046c03fbe42$export$a7bfbda1311ca015 = /* @__PURE__ */ (0, import_react.forwardRef)(function GridList(props, ref) {
	[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $72e60046c03fbe42$export$54fe942636b6416d);
	return /* @__PURE__ */ import_react.createElement($e1995378a142960e$export$bf788dd355e3a401, { content: /* @__PURE__ */ import_react.createElement($e1995378a142960e$export$fb8073518f34e6ec, props) }, (collection) => /* @__PURE__ */ import_react.createElement($72e60046c03fbe42$var$GridListInner, {
		props,
		collection,
		gridListRef: ref
	}));
});
function $72e60046c03fbe42$var$GridListInner({ props, collection, gridListRef: ref }) {
	[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $4e85f108e88277b8$export$b0d3ecf7112093a7);
	let { shouldUseVirtualFocus, filter, disallowTypeAhead, ...DOMCollectionProps } = props;
	let { dragAndDropHooks, keyboardNavigationBehavior = "arrow", layout = "stack" } = props;
	let { CollectionRoot, isVirtualized, layoutDelegate, dropTargetDelegate: ctxDropTargetDelegate } = (0, import_react.useContext)($7135fc7d473fd974$export$4feb769f8ddf26c5);
	let filteredState = $e72dd72e1c76a225$export$ba9d38c0f1bf2b36($e72dd72e1c76a225$export$2f645645f7bca764({
		...DOMCollectionProps,
		collection,
		children: void 0,
		layoutDelegate
	}), filter);
	let collator = $325a3faab7a68acd$export$a16aca283550c30d({
		usage: "search",
		sensitivity: "base"
	});
	let { disabledBehavior, disabledKeys } = filteredState.selectionManager;
	let { direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
	let keyboardDelegate = (0, import_react.useMemo)(() => new $2a25aae57d74318e$export$a05409b8bb224a5a({
		collection: filteredState.collection,
		collator,
		ref,
		disabledKeys,
		disabledBehavior,
		layoutDelegate,
		layout,
		direction
	}), [
		filteredState.collection,
		ref,
		layout,
		disabledKeys,
		disabledBehavior,
		layoutDelegate,
		collator,
		direction
	]);
	let { gridProps } = $f47efb0c3a859cf2$export$664f9155035607eb({
		...DOMCollectionProps,
		keyboardDelegate,
		keyboardNavigationBehavior: layout === "grid" ? "tab" : keyboardNavigationBehavior,
		isVirtualized,
		shouldSelectOnPressUp: props.shouldSelectOnPressUp,
		disallowTypeAhead
	}, filteredState, ref);
	let selectionManager = filteredState.selectionManager;
	let isListDraggable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDraggableCollectionState);
	let isListDroppable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDroppableCollectionState);
	(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: filteredState.collection,
			selectionManager,
			preview: dragAndDropHooks.renderDragPreview ? preview : void 0
		});
		dragAndDropHooks.useDraggableCollection({}, dragState, ref);
		let DragPreview = dragAndDropHooks.DragPreview;
		dragPreview = dragAndDropHooks.renderDragPreview ? /* @__PURE__ */ import_react.createElement(DragPreview, { ref: preview }, dragAndDropHooks.renderDragPreview) : null;
	}
	if (isListDroppable && dragAndDropHooks) {
		dropState = dragAndDropHooks.useDroppableCollectionState({
			collection: filteredState.collection,
			selectionManager
		});
		let keyboardDelegate = new $2a25aae57d74318e$export$a05409b8bb224a5a({
			collection: filteredState.collection,
			disabledKeys: selectionManager.disabledKeys,
			disabledBehavior: selectionManager.disabledBehavior,
			ref
		});
		let dropTargetDelegate = dragAndDropHooks.dropTargetDelegate || ctxDropTargetDelegate || new dragAndDropHooks.ListDropTargetDelegate(collection, ref, {
			layout,
			direction
		});
		droppableCollection = dragAndDropHooks.useDroppableCollection({
			keyboardDelegate,
			dropTargetDelegate
		}, dropState, ref);
		isRootDropTarget = dropState.isDropTarget({ type: "root" });
	}
	let { focusProps, isFocused, isFocusVisible } = $f7dceffc5ad7768b$export$4e328f61c538687f();
	let isEmpty = filteredState.collection.size === 0;
	let renderValues = {
		isDropTarget: isRootDropTarget,
		isEmpty,
		isFocused,
		isFocusVisible,
		layout,
		state: filteredState
	};
	let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
		...props,
		children: void 0,
		defaultClassName: "react-aria-GridList",
		values: renderValues
	});
	let emptyState = null;
	let emptyStatePropOverrides = null;
	if (isEmpty && props.renderEmptyState) {
		let content = props.renderEmptyState(renderValues);
		emptyState = /* @__PURE__ */ import_react.createElement("div", {
			role: "row",
			"aria-rowindex": 1,
			style: { display: "contents" }
		}, /* @__PURE__ */ import_react.createElement("div", {
			role: "gridcell",
			style: { display: "contents" }
		}, content));
	}
	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, gridProps, focusProps, droppableCollection === null || droppableCollection === void 0 ? void 0 : droppableCollection.collectionProps, emptyStatePropOverrides),
		ref,
		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": layout
	}, /* @__PURE__ */ import_react.createElement($64fa3d84918910a7$export$2881499e37b75b9a, { values: [
		[$eed445e0843c11d0$export$7c5906fe4f1f2af2, filteredState],
		[$612b8eb6cb90e02d$export$d188a835a7bc5783, {
			dragAndDropHooks,
			dragState,
			dropState
		}],
		[$612b8eb6cb90e02d$export$f55761759794cf55, { render: $72e60046c03fbe42$var$GridListDropIndicatorWrapper }]
	] }, isListDroppable && /* @__PURE__ */ import_react.createElement($72e60046c03fbe42$var$RootDropIndicator, null), /* @__PURE__ */ import_react.createElement($c8a5a149f625efcf$export$758399f318e6385a, null, /* @__PURE__ */ import_react.createElement(CollectionRoot, {
		collection: filteredState.collection,
		scrollRef: ref,
		persistedKeys: $612b8eb6cb90e02d$export$d1e8e3fbb7461f6(selectionManager, dragAndDropHooks, dropState),
		renderDropIndicator: $612b8eb6cb90e02d$export$971707d8a129a1f7(dragAndDropHooks, dropState)
	}))), emptyState, dragPreview));
}
var $72e60046c03fbe42$export$e96fc9a8407faa6b = /* @__PURE__ */ $e1995378a142960e$export$18af5c7a9e9b3664($23b9f4fcf0fe224b$export$fd11f34e1d07f134, function GridListItem(props, forwardedRef, item) {
	let state = (0, import_react.useContext)($eed445e0843c11d0$export$7c5906fe4f1f2af2);
	let { dragAndDropHooks, dragState, dropState } = (0, import_react.useContext)($612b8eb6cb90e02d$export$d188a835a7bc5783);
	let ref = $df56164dff5785e2$export$4338b53315abf666(forwardedRef);
	let { isVirtualized } = (0, import_react.useContext)($7135fc7d473fd974$export$4feb769f8ddf26c5);
	let { rowProps, gridCellProps, descriptionProps, ...states } = $4e8b0456ef72939f$export$9610e69494fadfd2({
		node: item,
		shouldSelectOnPressUp: !!dragState,
		isVirtualized
	}, 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 { isFocusVisible, focusProps } = $f7dceffc5ad7768b$export$4e328f61c538687f();
	let { checkboxProps } = $e52ffc04a4adbd52$export$e29f2573fabbf7b9({ key: item.key }, state);
	let buttonProps = state.selectionManager.disabledBehavior === "all" && states.isDisabled ? { isDisabled: true } : {};
	let draggableItem = null;
	if (dragState && dragAndDropHooks) draggableItem = dragAndDropHooks.useDraggableItem({
		key: item.key,
		hasDragButton: true
	}, dragState);
	let dropIndicator = null;
	let dropIndicatorRef = (0, import_react.useRef)(null);
	let { visuallyHiddenProps } = $5c3e21d68f1c4674$export$a966af930f325cab();
	if (dropState && dragAndDropHooks) dropIndicator = dragAndDropHooks.useDropIndicator({ target: {
		type: "item",
		key: item.key,
		dropPosition: "on"
	} }, dropState, dropIndicatorRef);
	let isDragging = dragState && dragState.isDragging(item.key);
	let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
		...props,
		id: void 0,
		children: item.rendered,
		defaultClassName: "react-aria-GridListItem",
		values: {
			...states,
			isHovered,
			isFocusVisible,
			selectionMode: state.selectionManager.selectionMode,
			selectionBehavior: state.selectionManager.selectionBehavior,
			allowsDragging: !!dragState,
			isDragging,
			isDropTarget: dropIndicator === null || dropIndicator === void 0 ? void 0 : dropIndicator.isDropTarget,
			id: item.key,
			state
		}
	});
	let dragButtonRef = (0, import_react.useRef)(null);
	(0, import_react.useEffect)(() => {
		if (dragState && !dragButtonRef.current) console.warn("Draggable items in a GridList must contain a <Button slot=\"drag\"> element so that keyboard and screen reader users can drag them.");
	}, []);
	(0, import_react.useEffect)(() => {
		if (!item.textValue && false);
	}, [item.textValue]);
	let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, { global: true });
	delete DOMProps.id;
	delete DOMProps.onClick;
	return /* @__PURE__ */ import_react.createElement(import_react.Fragment, null, dropIndicator && !dropIndicator.isHidden && /* @__PURE__ */ import_react.createElement("div", {
		role: "row",
		style: { position: "absolute" }
	}, /* @__PURE__ */ import_react.createElement("div", { role: "gridcell" }, /* @__PURE__ */ import_react.createElement("div", {
		role: "button",
		...visuallyHiddenProps,
		...dropIndicator === null || dropIndicator === void 0 ? void 0 : dropIndicator.dropIndicatorProps,
		ref: dropIndicatorRef
	}))), /* @__PURE__ */ import_react.createElement($64fa3d84918910a7$export$df3a06d6289f983e.div, {
		...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, rowProps, focusProps, hoverProps, draggableItem === null || draggableItem === void 0 ? void 0 : draggableItem.dragProps),
		ref,
		"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": isFocusVisible || void 0,
		"data-pressed": states.isPressed || void 0,
		"data-allows-dragging": !!dragState || void 0,
		"data-dragging": isDragging || void 0,
		"data-drop-target": (dropIndicator === null || dropIndicator === void 0 ? void 0 : dropIndicator.isDropTarget) || void 0,
		"data-selection-mode": state.selectionManager.selectionMode === "none" ? void 0 : state.selectionManager.selectionMode
	}, /* @__PURE__ */ import_react.createElement("div", {
		...gridCellProps,
		style: { display: "contents" }
	}, /* @__PURE__ */ import_react.createElement($64fa3d84918910a7$export$2881499e37b75b9a, { values: [
		[$4e85f108e88277b8$export$b085522c77523c51, { slots: {
			[$64fa3d84918910a7$export$c62b8e45d58ddad9]: {},
			selection: checkboxProps
		} }],
		[$d2b4bc8c273e7be6$export$24d547caef80ccd1, { slots: {
			[$64fa3d84918910a7$export$c62b8e45d58ddad9]: buttonProps,
			drag: {
				...draggableItem === null || draggableItem === void 0 ? void 0 : draggableItem.dragButtonProps,
				ref: dragButtonRef,
				style: { pointerEvents: "none" }
			}
		} }],
		[$514c0188e459b4c0$export$9afb8bc826b033ea, { slots: {
			[$64fa3d84918910a7$export$c62b8e45d58ddad9]: {},
			description: descriptionProps
		} }],
		[$7135fc7d473fd974$export$4feb769f8ddf26c5, $7135fc7d473fd974$export$a164736487e3f0ae],
		[$eed445e0843c11d0$export$7c5906fe4f1f2af2, null],
		[$4e85f108e88277b8$export$b0d3ecf7112093a7, null],
		[$4e85f108e88277b8$export$698f465ec27e93df, null],
		[$1d5b8b8664671ef2$export$c9549807523555e0, { isSelected: states.isSelected }]
	] }, renderProps.children))));
});
function $72e60046c03fbe42$var$GridListDropIndicatorWrapper(props, ref) {
	ref = $df56164dff5785e2$export$4338b53315abf666(ref);
	let { dragAndDropHooks, dropState } = (0, import_react.useContext)($612b8eb6cb90e02d$export$d188a835a7bc5783);
	let buttonRef = (0, import_react.useRef)(null);
	let { dropIndicatorProps, isHidden, isDropTarget } = dragAndDropHooks.useDropIndicator(props, dropState, buttonRef);
	if (isHidden) return null;
	return /* @__PURE__ */ import_react.createElement($72e60046c03fbe42$var$GridListDropIndicatorForwardRef, {
		...props,
		dropIndicatorProps,
		isDropTarget,
		buttonRef,
		ref
	});
}
function $72e60046c03fbe42$var$GridListDropIndicator(props, ref) {
	let { dropIndicatorProps, isDropTarget, buttonRef, ...otherProps } = props;
	let { visuallyHiddenProps } = $5c3e21d68f1c4674$export$a966af930f325cab();
	let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
		...otherProps,
		defaultClassName: "react-aria-DropIndicator",
		values: { isDropTarget }
	});
	return /* @__PURE__ */ import_react.createElement($64fa3d84918910a7$export$df3a06d6289f983e.div, {
		...renderProps,
		role: "row",
		ref,
		"data-drop-target": isDropTarget || void 0
	}, /* @__PURE__ */ import_react.createElement("div", { role: "gridcell" }, /* @__PURE__ */ import_react.createElement("div", {
		...visuallyHiddenProps,
		role: "button",
		...dropIndicatorProps,
		ref: buttonRef
	}), renderProps.children));
}
var $72e60046c03fbe42$var$GridListDropIndicatorForwardRef = /* @__PURE__ */ (0, import_react.forwardRef)($72e60046c03fbe42$var$GridListDropIndicator);
function $72e60046c03fbe42$var$RootDropIndicator() {
	let { dragAndDropHooks, dropState } = (0, import_react.useContext)($612b8eb6cb90e02d$export$d188a835a7bc5783);
	let ref = (0, import_react.useRef)(null);
	let { dropIndicatorProps } = dragAndDropHooks.useDropIndicator({ target: { type: "root" } }, dropState, ref);
	let isDropTarget = dropState.isDropTarget({ type: "root" });
	let { visuallyHiddenProps } = $5c3e21d68f1c4674$export$a966af930f325cab();
	if (!isDropTarget && dropIndicatorProps["aria-hidden"]) return null;
	return /* @__PURE__ */ import_react.createElement("div", {
		role: "row",
		"aria-hidden": dropIndicatorProps["aria-hidden"],
		style: { position: "absolute" }
	}, /* @__PURE__ */ import_react.createElement("div", { role: "gridcell" }, /* @__PURE__ */ import_react.createElement("div", {
		role: "button",
		...visuallyHiddenProps,
		...dropIndicatorProps,
		ref
	})));
}
$e1995378a142960e$export$18af5c7a9e9b3664($23b9f4fcf0fe224b$export$8258a0665a675899, function GridListLoadingIndicator(props, ref, item) {
	let state = (0, import_react.useContext)($eed445e0843c11d0$export$7c5906fe4f1f2af2);
	let { isVirtualized } = (0, import_react.useContext)($7135fc7d473fd974$export$4feb769f8ddf26c5);
	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-GridListLoadingIndicator",
		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, {
		...renderProps,
		...$65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, { global: true }),
		role: "row",
		ref
	}, /* @__PURE__ */ import_react.createElement("div", {
		"aria-colindex": isVirtualized ? 1 : void 0,
		role: "gridcell"
	}, renderProps.children)));
});
//#endregion
//#region src/hooks/useUrlParam.ts
/**
* Hook to get and set a specific URL search parameter value
*/
function useUrlParam(name) {
	const [searchParams, setSearchParams] = useSearchParams();
	const setParam = (0, import_react.useCallback)((value, opts) => {
		setSearchParams((prev) => {
			const next = new URLSearchParams(prev);
			if (value == null || value === "") next.delete(name);
			else next.set(name, value);
			return next;
		}, opts);
	}, [name, setSearchParams]);
	return [searchParams.get(name), setParam];
}
//#endregion
//#region src/components/forms/LabeledCheckbox.tsx
var import_compiler_runtime = require_compiler_runtime();
var import_jsx_runtime = require_jsx_runtime();
function LabeledCheckbox(t0) {
	const $ = (0, import_compiler_runtime.c)(17);
	const { id, checked, disabled, onChange, children, style } = t0;
	let t1;
	if ($[0] !== style) {
		t1 = {
			flex: 1,
			flexDirection: "row",
			alignItems: "center",
			userSelect: "none",
			minHeight: 28,
			...style
		};
		$[0] = style;
		$[1] = t1;
	} else t1 = $[1];
	let t2;
	if ($[2] !== checked || $[3] !== disabled || $[4] !== id || $[5] !== onChange) {
		t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Checkbox, {
			id,
			checked,
			disabled,
			onChange
		});
		$[2] = checked;
		$[3] = disabled;
		$[4] = id;
		$[5] = onChange;
		$[6] = t2;
	} else t2 = $[6];
	const t3 = disabled ? theme.pageTextSubdued : void 0;
	let t4;
	if ($[7] !== t3) {
		t4 = {
			userSelect: "none",
			color: t3
		};
		$[7] = t3;
		$[8] = t4;
	} else t4 = $[8];
	let t5;
	if ($[9] !== children || $[10] !== id || $[11] !== t4) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", {
			htmlFor: id,
			style: t4,
			children
		});
		$[9] = children;
		$[10] = id;
		$[11] = t4;
		$[12] = t5;
	} else t5 = $[12];
	let t6;
	if ($[13] !== t1 || $[14] !== t2 || $[15] !== t5) {
		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t1,
			children: [t2, t5]
		});
		$[13] = t1;
		$[14] = t2;
		$[15] = t5;
		$[16] = t6;
	} else t6 = $[16];
	return t6;
}
//#endregion
//#region src/components/banksync/BankSyncCheckboxOptions.tsx
function CheckboxOption(t0) {
	const $ = (0, import_compiler_runtime.c)(17);
	const { id, checked, onChange, disabled, helpMode: t1, children } = t0;
	if ((t1 === void 0 ? "desktop" : t1) === "mobile") {
		let t2;
		if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
			t2 = {
				marginBottom: 5,
				justifyContent: "space-between",
				width: "100%"
			};
			$[0] = t2;
		} else t2 = $[0];
		let t3;
		if ($[1] !== children) {
			t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children });
			$[1] = children;
			$[2] = t3;
		} else t3 = $[2];
		let t4;
		if ($[3] !== checked || $[4] !== disabled || $[5] !== id || $[6] !== onChange) {
			t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleField, {
				id,
				isOn: checked,
				onToggle: onChange,
				isDisabled: disabled
			});
			$[3] = checked;
			$[4] = disabled;
			$[5] = id;
			$[6] = onChange;
			$[7] = t4;
		} else t4 = $[7];
		let t5;
		if ($[8] !== t3 || $[9] !== t4) {
			t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SpaceBetween, {
				style: t2,
				children: [t3, t4]
			});
			$[8] = t3;
			$[9] = t4;
			$[10] = t5;
		} else t5 = $[10];
		return t5;
	}
	let t2;
	if ($[11] !== checked || $[12] !== children || $[13] !== disabled || $[14] !== id || $[15] !== onChange) {
		t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LabeledCheckbox, {
			id,
			checked,
			onChange,
			disabled,
			children
		});
		$[11] = checked;
		$[12] = children;
		$[13] = disabled;
		$[14] = id;
		$[15] = onChange;
		$[16] = t2;
	} else t2 = $[16];
	return t2;
}
function CheckboxOptionWithHelp(t0) {
	const $ = (0, import_compiler_runtime.c)(44);
	const { id, checked, onChange, disabled, helpText, helpMode, children } = t0;
	const { t } = useTranslation();
	const [showHelp, setShowHelp] = (0, import_react.useState)(false);
	if (helpMode === "desktop") {
		let t1;
		if ($[0] !== children) {
			t1 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children });
			$[0] = children;
			$[1] = t1;
		} else t1 = $[1];
		let t2;
		if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
			t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgQuestion, {
				height: 12,
				width: 12,
				cursor: "pointer"
			});
			$[2] = t2;
		} else t2 = $[2];
		let t3;
		if ($[3] !== t1) {
			t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SpaceBetween, {
				gap: 5,
				children: [t1, t2]
			});
			$[3] = t1;
			$[4] = t3;
		} else t3 = $[4];
		let t4;
		if ($[5] !== helpText || $[6] !== t3) {
			t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tooltip, {
				content: helpText,
				children: t3
			});
			$[5] = helpText;
			$[6] = t3;
			$[7] = t4;
		} else t4 = $[7];
		let t5;
		if ($[8] !== checked || $[9] !== disabled || $[10] !== id || $[11] !== onChange || $[12] !== t4) {
			t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LabeledCheckbox, {
				id,
				checked,
				onChange,
				disabled,
				children: t4
			});
			$[8] = checked;
			$[9] = disabled;
			$[10] = id;
			$[11] = onChange;
			$[12] = t4;
			$[13] = t5;
		} else t5 = $[13];
		return t5;
	}
	let t1;
	if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = {
			marginBottom: 5,
			width: "100%"
		};
		$[14] = t1;
	} else t1 = $[14];
	let t2;
	if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = {
			justifyContent: "space-between",
			width: "100%"
		};
		$[15] = t2;
	} else t2 = $[15];
	let t3;
	if ($[16] !== children) {
		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children });
		$[16] = children;
		$[17] = t3;
	} else t3 = $[17];
	let t4;
	if ($[18] !== t) {
		t4 = t("Help");
		$[18] = t;
		$[19] = t4;
	} else t4 = $[19];
	let t5;
	if ($[20] !== showHelp) {
		t5 = () => setShowHelp(!showHelp);
		$[20] = showHelp;
		$[21] = t5;
	} else t5 = $[21];
	let t6;
	let t7;
	if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
		t6 = {
			padding: 0,
			height: "auto",
			minHeight: "auto"
		};
		t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgQuestion, {
			height: 12,
			width: 12
		});
		$[22] = t6;
		$[23] = t7;
	} else {
		t6 = $[22];
		t7 = $[23];
	}
	let t8;
	if ($[24] !== t4 || $[25] !== t5) {
		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
			variant: "bare",
			"aria-label": t4,
			onPress: t5,
			style: t6,
			children: t7
		});
		$[24] = t4;
		$[25] = t5;
		$[26] = t8;
	} else t8 = $[26];
	let t9;
	if ($[27] !== t3 || $[28] !== t8) {
		t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SpaceBetween, {
			gap: 5,
			children: [t3, t8]
		});
		$[27] = t3;
		$[28] = t8;
		$[29] = t9;
	} else t9 = $[29];
	let t10;
	if ($[30] !== checked || $[31] !== disabled || $[32] !== id || $[33] !== onChange) {
		t10 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleField, {
			id,
			isOn: checked,
			onToggle: onChange,
			isDisabled: disabled
		});
		$[30] = checked;
		$[31] = disabled;
		$[32] = id;
		$[33] = onChange;
		$[34] = t10;
	} else t10 = $[34];
	let t11;
	if ($[35] !== t10 || $[36] !== t9) {
		t11 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SpaceBetween, {
			style: t2,
			children: [t9, t10]
		});
		$[35] = t10;
		$[36] = t9;
		$[37] = t11;
	} else t11 = $[37];
	let t12;
	if ($[38] !== helpText || $[39] !== showHelp) {
		t12 = showHelp && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
			style: {
				fontSize: 13,
				color: theme.pageTextSubdued
			},
			children: helpText
		});
		$[38] = helpText;
		$[39] = showHelp;
		$[40] = t12;
	} else t12 = $[40];
	let t13;
	if ($[41] !== t11 || $[42] !== t12) {
		t13 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SpaceBetween, {
			direction: "vertical",
			gap: 5,
			style: t1,
			children: [t11, t12]
		});
		$[41] = t11;
		$[42] = t12;
		$[43] = t13;
	} else t13 = $[43];
	return t13;
}
function BankSyncCheckboxOptions(t0) {
	const $ = (0, import_compiler_runtime.c)(59);
	const { importPending, setImportPending, importNotes, setImportNotes, reimportDeleted, setReimportDeleted, importTransactions, setImportTransactions, updateDates, setUpdateDates, helpMode: t1 } = t0;
	const helpMode = t1 === void 0 ? "desktop" : t1;
	const { t } = useTranslation();
	let t2;
	if ($[0] !== importPending || $[1] !== setImportPending) {
		t2 = () => setImportPending(!importPending);
		$[0] = importPending;
		$[1] = setImportPending;
		$[2] = t2;
	} else t2 = $[2];
	const t3 = !importTransactions;
	let t4;
	if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Import pending transactions" });
		$[3] = t4;
	} else t4 = $[3];
	let t5;
	if ($[4] !== helpMode || $[5] !== importPending || $[6] !== t2 || $[7] !== t3) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxOption, {
			id: "form_pending",
			checked: importPending,
			onChange: t2,
			disabled: t3,
			helpMode,
			children: t4
		});
		$[4] = helpMode;
		$[5] = importPending;
		$[6] = t2;
		$[7] = t3;
		$[8] = t5;
	} else t5 = $[8];
	let t6;
	if ($[9] !== importNotes || $[10] !== setImportNotes) {
		t6 = () => setImportNotes(!importNotes);
		$[9] = importNotes;
		$[10] = setImportNotes;
		$[11] = t6;
	} else t6 = $[11];
	const t7 = !importTransactions;
	let t8;
	if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Import transaction notes" });
		$[12] = t8;
	} else t8 = $[12];
	let t9;
	if ($[13] !== helpMode || $[14] !== importNotes || $[15] !== t6 || $[16] !== t7) {
		t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxOption, {
			id: "form_notes",
			checked: importNotes,
			onChange: t6,
			disabled: t7,
			helpMode,
			children: t8
		});
		$[13] = helpMode;
		$[14] = importNotes;
		$[15] = t6;
		$[16] = t7;
		$[17] = t9;
	} else t9 = $[17];
	let t10;
	if ($[18] !== reimportDeleted || $[19] !== setReimportDeleted) {
		t10 = () => setReimportDeleted(!reimportDeleted);
		$[18] = reimportDeleted;
		$[19] = setReimportDeleted;
		$[20] = t10;
	} else t10 = $[20];
	const t11 = !importTransactions;
	let t12;
	if ($[21] !== t) {
		t12 = t("By default imported transactions that you delete will be re-imported with the next bank sync operation. To disable this behaviour - untick this box.");
		$[21] = t;
		$[22] = t12;
	} else t12 = $[22];
	let t13;
	if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
		t13 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Reimport deleted transactions" });
		$[23] = t13;
	} else t13 = $[23];
	let t14;
	if ($[24] !== helpMode || $[25] !== reimportDeleted || $[26] !== t10 || $[27] !== t11 || $[28] !== t12) {
		t14 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxOptionWithHelp, {
			id: "form_reimport_deleted",
			checked: reimportDeleted,
			onChange: t10,
			disabled: t11,
			helpText: t12,
			helpMode,
			children: t13
		});
		$[24] = helpMode;
		$[25] = reimportDeleted;
		$[26] = t10;
		$[27] = t11;
		$[28] = t12;
		$[29] = t14;
	} else t14 = $[29];
	let t15;
	if ($[30] !== setUpdateDates || $[31] !== updateDates) {
		t15 = () => setUpdateDates(!updateDates);
		$[30] = setUpdateDates;
		$[31] = updateDates;
		$[32] = t15;
	} else t15 = $[32];
	const t16 = !importTransactions;
	let t17;
	if ($[33] !== t) {
		t17 = t("By enabling this, the transaction date will be overwritten by the one provided by the bank.");
		$[33] = t;
		$[34] = t17;
	} else t17 = $[34];
	let t18;
	if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
		t18 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Update Dates" });
		$[35] = t18;
	} else t18 = $[35];
	let t19;
	if ($[36] !== helpMode || $[37] !== t15 || $[38] !== t16 || $[39] !== t17 || $[40] !== updateDates) {
		t19 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxOptionWithHelp, {
			id: "form_update_dates",
			checked: updateDates,
			onChange: t15,
			disabled: t16,
			helpText: t17,
			helpMode,
			children: t18
		});
		$[36] = helpMode;
		$[37] = t15;
		$[38] = t16;
		$[39] = t17;
		$[40] = updateDates;
		$[41] = t19;
	} else t19 = $[41];
	const t20 = !importTransactions;
	let t21;
	if ($[42] !== importTransactions || $[43] !== setImportTransactions) {
		t21 = () => setImportTransactions(!importTransactions);
		$[42] = importTransactions;
		$[43] = setImportTransactions;
		$[44] = t21;
	} else t21 = $[44];
	let t22;
	if ($[45] !== t) {
		t22 = t("Selecting this option will disable importing transactions and only import the account balance for use in reconciliation");
		$[45] = t;
		$[46] = t22;
	} else t22 = $[46];
	let t23;
	if ($[47] === Symbol.for("react.memo_cache_sentinel")) {
		t23 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Investment Account" });
		$[47] = t23;
	} else t23 = $[47];
	let t24;
	if ($[48] !== helpMode || $[49] !== t20 || $[50] !== t21 || $[51] !== t22) {
		t24 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxOptionWithHelp, {
			id: "form_import_transactions",
			checked: t20,
			onChange: t21,
			helpText: t22,
			helpMode,
			children: t23
		});
		$[48] = helpMode;
		$[49] = t20;
		$[50] = t21;
		$[51] = t22;
		$[52] = t24;
	} else t24 = $[52];
	let t25;
	if ($[53] !== t14 || $[54] !== t19 || $[55] !== t24 || $[56] !== t5 || $[57] !== t9) {
		t25 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
			t5,
			t9,
			t14,
			t19,
			t24
		] });
		$[53] = t14;
		$[54] = t19;
		$[55] = t24;
		$[56] = t5;
		$[57] = t9;
		$[58] = t25;
	} else t25 = $[58];
	return t25;
}
//#endregion
//#region src/components/banksync/FieldMapping.tsx
var useTransactionDirectionOptions = () => {
	const $ = (0, import_compiler_runtime.c)(11);
	const { t } = useTranslation();
	let t0;
	if ($[0] !== t) {
		t0 = t("Payment");
		$[0] = t;
		$[1] = t0;
	} else t0 = $[1];
	let t1;
	if ($[2] !== t0) {
		t1 = {
			value: "payment",
			label: t0
		};
		$[2] = t0;
		$[3] = t1;
	} else t1 = $[3];
	let t2;
	if ($[4] !== t) {
		t2 = t("Deposit");
		$[4] = t;
		$[5] = t2;
	} else t2 = $[5];
	let t3;
	if ($[6] !== t2) {
		t3 = {
			value: "deposit",
			label: t2
		};
		$[6] = t2;
		$[7] = t3;
	} else t3 = $[7];
	let t4;
	if ($[8] !== t1 || $[9] !== t3) {
		t4 = { transactionDirectionOptions: [t1, t3] };
		$[8] = t1;
		$[9] = t3;
		$[10] = t4;
	} else t4 = $[10];
	return t4;
};
function FieldMapping(t0) {
	const $ = (0, import_compiler_runtime.c)(35);
	const { transactionDirection, setTransactionDirection, fields, mapping, setMapping, isMobile: t1 } = t0;
	const isMobile = t1 === void 0 ? false : t1;
	const { t } = useTranslation();
	const { transactionDirectionOptions } = useTransactionDirectionOptions();
	const iconSpacing = isMobile ? 8 : 20;
	const iconPadding = isMobile ? 8 : 6;
	let t2;
	if ($[0] !== fields) {
		t2 = Math.max(...fields.flatMap(_temp2));
		$[0] = fields;
		$[1] = t2;
	} else t2 = $[1];
	const calculatedSelectWidth = t2;
	let t3;
	if ($[2] !== fields || $[3] !== isMobile) {
		t3 = isMobile ? Math.max(50, ...fields.map(_temp3)) : Math.max(75, ...fields.map(_temp4));
		$[2] = fields;
		$[3] = isMobile;
		$[4] = t3;
	} else t3 = $[4];
	const calculatedActualFieldWidth = t3;
	const arrowCellWidth = 15 + iconSpacing + iconPadding;
	const equalsCellWidth = 12 + iconSpacing + iconPadding;
	let t4;
	if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
		t4 = {
			height: "100%",
			border: 0
		};
		$[5] = t4;
	} else t4 = $[5];
	const commonCellStyle = t4;
	let t5;
	if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
		t5 = { ...commonCellStyle };
		$[6] = t5;
	} else t5 = $[6];
	const iconCellStyle = t5;
	const t6 = isMobile ? "10ch" : "30ch";
	const t7 = isMobile ? "15ch" : "50ch";
	let t8;
	if ($[7] !== t6 || $[8] !== t7) {
		t8 = {
			minWidth: t6,
			maxWidth: t7
		};
		$[7] = t6;
		$[8] = t7;
		$[9] = t8;
	} else t8 = $[9];
	const selectStyle = t8;
	let t9;
	if ($[10] !== t) {
		t9 = t("Transaction direction");
		$[10] = t;
		$[11] = t9;
	} else t9 = $[11];
	let t10;
	if ($[12] !== transactionDirectionOptions) {
		t10 = transactionDirectionOptions.map(_temp5);
		$[12] = transactionDirectionOptions;
		$[13] = t10;
	} else t10 = $[13];
	let t11;
	if ($[14] !== setTransactionDirection) {
		t11 = (newValue) => setTransactionDirection(newValue);
		$[14] = setTransactionDirection;
		$[15] = t11;
	} else t11 = $[15];
	let t12;
	if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
		t12 = {
			width: "25%",
			margin: "1em 0",
			minWidth: "100px"
		};
		$[16] = t12;
	} else t12 = $[16];
	let t13;
	if ($[17] !== t10 || $[18] !== t11 || $[19] !== t9 || $[20] !== transactionDirection) {
		t13 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Select, {
			"aria-label": t9,
			options: t10,
			value: transactionDirection,
			onChange: t11,
			style: t12
		});
		$[17] = t10;
		$[18] = t11;
		$[19] = t9;
		$[20] = transactionDirection;
		$[21] = t13;
	} else t13 = $[21];
	let t14;
	if ($[22] !== arrowCellWidth || $[23] !== calculatedActualFieldWidth || $[24] !== calculatedSelectWidth || $[25] !== equalsCellWidth || $[26] !== fields || $[27] !== mapping || $[28] !== selectStyle || $[29] !== setMapping || $[30] !== t) {
		t14 = fields.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
			style: { margin: "1em 0 .5em 0" },
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "No transactions found with mappable fields, accounts must have been synced at least once for this function to be available." })
		}) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: styles.tableContainer,
			children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TableHeader, { children: [
				/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Cell, {
					width: calculatedActualFieldWidth,
					style: { paddingLeft: "10px" },
					plain: true,
					children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
						style: {
							whiteSpace: "nowrap",
							fontSize: 13,
							fontWeight: 500
						},
						children: calculatedActualFieldWidth > 70 ? t("Actual field") : "Actual"
					})
				}),
				/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Cell, {
					value: "",
					width: arrowCellWidth,
					style: { padding: 0 }
				}),
				/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Cell, {
					value: t("Bank field"),
					width: calculatedSelectWidth,
					style: {
						paddingLeft: 0,
						...selectStyle
					}
				}),
				/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Cell, {
					value: "",
					width: equalsCellWidth,
					style: { padding: 0 }
				}),
				/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Cell, {
					value: t("Example"),
					width: "flex",
					style: { paddingLeft: 0 }
				})
			] }), fields.map((field_3) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Row, {
				style: {
					fontSize: 13,
					backgroundColor: theme.tableBackground,
					display: "flex",
					alignItems: "center",
					minHeight: "40px",
					borderTop: "1px solid " + theme.tableBorder
				},
				collapsed: true,
				children: [
					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Cell, {
						width: calculatedActualFieldWidth,
						style: {
							...commonCellStyle,
							paddingLeft: "10px"
						},
						plain: true,
						children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
							style: {
								whiteSpace: "nowrap",
								fontSize: 13
							},
							children: field_3.actualField
						})
					}),
					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Cell, {
						width: arrowCellWidth,
						style: iconCellStyle,
						plain: true,
						children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
							style: {
								flex: 1,
								justifyContent: "center",
								alignItems: "center"
							},
							children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgRightArrow2, { style: {
								width: 15,
								height: 15,
								color: theme.tableText
							} })
						})
					}),
					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Cell, {
						width: calculatedSelectWidth,
						style: {
							...iconCellStyle,
							...selectStyle
						},
						plain: true,
						children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Select, {
							"aria-label": t("Synced field to map to {{field}}", { field: field_3.actualField }),
							options: field_3.syncFields.map(_temp6),
							value: mapping.get(field_3.actualField),
							style: { width: "100%" },
							onChange: (newValue_0) => {
								if (newValue_0) setMapping(field_3.actualField, newValue_0);
							}
						})
					}),
					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Cell, {
						width: equalsCellWidth,
						style: iconCellStyle,
						plain: true,
						children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
							style: {
								flex: 1,
								justifyContent: "center",
								alignItems: "center"
							},
							children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgEquals, { style: {
								width: 12,
								height: 12,
								color: theme.tableText
							} })
						})
					}),
					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Cell, {
						value: field_3.syncFields.find((f) => f.field === mapping.get(field_3.actualField))?.example,
						width: "flex",
						style: {
							...commonCellStyle,
							paddingLeft: 0
						}
					})
				]
			}, field_3.actualField))]
		});
		$[22] = arrowCellWidth;
		$[23] = calculatedActualFieldWidth;
		$[24] = calculatedSelectWidth;
		$[25] = equalsCellWidth;
		$[26] = fields;
		$[27] = mapping;
		$[28] = selectStyle;
		$[29] = setMapping;
		$[30] = t;
		$[31] = t14;
	} else t14 = $[31];
	let t15;
	if ($[32] !== t13 || $[33] !== t14) {
		t15 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [t13, t14] });
		$[32] = t13;
		$[33] = t14;
		$[34] = t15;
	} else t15 = $[34];
	return t15;
}
function _temp6(t0) {
	const { field: field_4 } = t0;
	return [field_4, field_4];
}
function _temp5(x) {
	return [x.value, x.label];
}
function _temp4(field_2) {
	return field_2.actualField.length * 8 + 20;
}
function _temp3(field_1) {
	return field_1.actualField.length * 8 + 20;
}
function _temp2(field) {
	return field.syncFields.map(_temp$1);
}
function _temp$1(t0) {
	const { field: field_0 } = t0;
	return field_0.length * 8 + 30;
}
//#endregion
//#region ../loot-core/src/server/util/custom-sync-mapping.ts
var mappingsToString = (mapping) => JSON.stringify(Object.fromEntries([...mapping.entries()].map(([key, value]) => [key, Object.fromEntries(value)])));
var mappingsFromString = (str) => {
	try {
		const parsed = JSON.parse(str);
		if (typeof parsed !== "object" || parsed === null) throw new Error("Invalid mapping format");
		return new Map(Object.entries(parsed).map(([key, value]) => [key, new Map(Object.entries(value))]));
	} catch (e) {
		const message = e instanceof Error ? e.message : e;
		throw new Error(`Failed to parse mapping: ${String(message)}`);
	}
};
var defaultMappings = new Map([["payment", new Map([
	["date", "date"],
	["payee", "payeeName"],
	["notes", "notes"]
])], ["deposit", new Map([
	["date", "date"],
	["payee", "payeeName"],
	["notes", "notes"]
])]]);
//#endregion
//#region src/components/banksync/EditSyncAccount.tsx
var mappableFields = [
	{
		actualField: "date",
		syncFields: [
			"date",
			"bookingDate",
			"valueDate",
			"postedDate",
			"transactedDate",
			"booking_date",
			"value_date",
			"transaction_date"
		]
	},
	{
		actualField: "payee",
		syncFields: [
			"payeeName",
			"creditorName",
			"debtorName",
			"remittanceInformationUnstructured",
			"remittanceInformationUnstructuredArrayString",
			"remittanceInformationStructured",
			"remittanceInformationStructuredArrayString",
			"additionalInformation",
			"paymentData.payer.accountNumber",
			"paymentData.payer.documentNumber.value",
			"paymentData.payer.name",
			"paymentData.receiver.accountNumber",
			"paymentData.receiver.documentNumber.value",
			"paymentData.receiver.name",
			"merchant.name",
			"merchant.businessName",
			"merchant.cnpj",
			"creditor.name",
			"debtor.name",
			"account_servicer.name"
		]
	},
	{
		actualField: "notes",
		syncFields: [
			"notes",
			"remittanceInformationUnstructured",
			"remittanceInformationUnstructuredArrayString",
			"remittanceInformationStructured",
			"remittanceInformationStructuredArrayString",
			"additionalInformation",
			"category",
			"paymentData.payer.accountNumber",
			"paymentData.payer.documentNumber.value",
			"paymentData.payer.name",
			"paymentData.receiver.accountNumber",
			"paymentData.receiver.documentNumber.value",
			"paymentData.receiver.name",
			"merchant.name",
			"merchant.businessName",
			"merchant.cnpj",
			"entry_reference",
			"transaction_id"
		]
	}
];
function getByPath(obj, path) {
	if (obj == null) return;
	const keys = path.split(".");
	let current = obj;
	for (const key of keys) {
		if (current == null || typeof current !== "object") return;
		current = current[key];
	}
	return current;
}
var getFields = (transaction) => mappableFields.map((field) => ({
	actualField: field.actualField,
	syncFields: field.syncFields.map((syncField) => {
		const value = getByPath(transaction, syncField);
		return value !== void 0 ? {
			field: syncField,
			example: String(value)
		} : null;
	}).filter((item) => item !== null)
}));
function EditSyncAccount(t0) {
	const $ = (0, import_compiler_runtime.c)(31);
	const { account } = t0;
	const { t } = useTranslation();
	const dispatch = useDispatch();
	const { transactionDirection, setTransactionDirection, importPending, setImportPending, importNotes, setImportNotes, reimportDeleted, setReimportDeleted, importTransactions, setImportTransactions, updateDates, setUpdateDates, mappings, setMapping, fields, saveSettings } = useBankSyncAccountSettings(account.id);
	let t1;
	if ($[0] !== saveSettings) {
		t1 = async (close) => {
			saveSettings();
			close();
		};
		$[0] = saveSettings;
		$[1] = t1;
	} else t1 = $[1];
	const onSave = t1;
	const unlinkAccount = useUnlinkAccountMutation();
	let t2;
	if ($[2] !== account.id || $[3] !== account.name || $[4] !== dispatch || $[5] !== unlinkAccount) {
		t2 = async (close_0) => {
			dispatch(pushModal({ modal: {
				name: "confirm-unlink-account",
				options: {
					accountName: account.name,
					isViewBankSyncSettings: true,
					onUnlink: () => {
						unlinkAccount.mutate({ id: account.id }, { onSuccess: close_0 });
					}
				}
			} }));
		};
		$[2] = account.id;
		$[3] = account.name;
		$[4] = dispatch;
		$[5] = unlinkAccount;
		$[6] = t2;
	} else t2 = $[6];
	const onUnlink = t2;
	const potentiallyTruncatedAccountName = account.name.length > 30 ? account.name.slice(0, 30) + "..." : account.name;
	let t3;
	if ($[7] !== mappings || $[8] !== transactionDirection) {
		t3 = mappings.get(transactionDirection) ?? /* @__PURE__ */ new Map();
		$[7] = mappings;
		$[8] = transactionDirection;
		$[9] = t3;
	} else t3 = $[9];
	const mapping = t3;
	let t4;
	if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
		t4 = { style: { width: 800 } };
		$[10] = t4;
	} else t4 = $[10];
	let t5;
	if ($[11] !== fields || $[12] !== importNotes || $[13] !== importPending || $[14] !== importTransactions || $[15] !== mapping || $[16] !== onSave || $[17] !== onUnlink || $[18] !== potentiallyTruncatedAccountName || $[19] !== reimportDeleted || $[20] !== setImportNotes || $[21] !== setImportPending || $[22] !== setImportTransactions || $[23] !== setMapping || $[24] !== setReimportDeleted || $[25] !== setTransactionDirection || $[26] !== setUpdateDates || $[27] !== t || $[28] !== transactionDirection || $[29] !== updateDates) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Modal, {
			name: "synced-account-edit",
			containerProps: t4,
			children: (t6) => {
				const { state } = t6;
				return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ModalHeader, {
						title: t("{{accountName}} bank sync settings", { accountName: potentiallyTruncatedAccountName }),
						rightContent: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ModalCloseButton, { onPress: () => state.close() })
					}),
					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
						style: { fontSize: 15 },
						children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Field mapping" })
					}),
					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(FieldMapping, {
						transactionDirection,
						setTransactionDirection,
						fields,
						mapping,
						setMapping
					}),
					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
						style: {
							fontSize: 15,
							margin: "1em 0 .5em 0"
						},
						children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Options" })
					}),
					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BankSyncCheckboxOptions, {
						importPending,
						setImportPending,
						importNotes,
						setImportNotes,
						reimportDeleted,
						setReimportDeleted,
						importTransactions,
						setImportTransactions,
						updateDates,
						setUpdateDates,
						helpMode: "desktop"
					}),
					/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
						style: {
							display: "flex",
							flexDirection: "row",
							alignItems: "center",
							justifyContent: "space-between",
							marginTop: 20
						},
						children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
							style: { color: theme.errorText },
							onPress: () => {
								onUnlink(() => state.close());
							},
							children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Unlink account" })
						}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SpaceBetween, {
							gap: 10,
							children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
								onPress: () => state.close(),
								children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Cancel" })
							}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
								variant: "primary",
								onPress: () => {
									onSave(() => state.close());
								},
								children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Save" })
							})]
						})]
					})
				] });
			}
		});
		$[11] = fields;
		$[12] = importNotes;
		$[13] = importPending;
		$[14] = importTransactions;
		$[15] = mapping;
		$[16] = onSave;
		$[17] = onUnlink;
		$[18] = potentiallyTruncatedAccountName;
		$[19] = reimportDeleted;
		$[20] = setImportNotes;
		$[21] = setImportPending;
		$[22] = setImportTransactions;
		$[23] = setMapping;
		$[24] = setReimportDeleted;
		$[25] = setTransactionDirection;
		$[26] = setUpdateDates;
		$[27] = t;
		$[28] = transactionDirection;
		$[29] = updateDates;
		$[30] = t5;
	} else t5 = $[30];
	return t5;
}
//#endregion
//#region src/components/banksync/useBankSyncAccountSettings.ts
function useBankSyncAccountSettings(accountId) {
	const [savedMappings = mappingsToString(defaultMappings), setSavedMappings] = useSyncedPref(`custom-sync-mappings-${accountId}`);
	const [savedImportNotes = true, setSavedImportNotes] = useSyncedPref(`sync-import-notes-${accountId}`);
	const [savedImportPending = true, setSavedImportPending] = useSyncedPref(`sync-import-pending-${accountId}`);
	const [savedReimportDeleted = true, setSavedReimportDeleted] = useSyncedPref(`sync-reimport-deleted-${accountId}`);
	const [savedImportTransactions = true, setSavedImportTransactions] = useSyncedPref(`sync-import-transactions-${accountId}`);
	const [savedUpdateDates = false, setSavedUpdateDates] = useSyncedPref(`sync-update-dates-${accountId}`);
	const [transactionDirection, setTransactionDirection] = (0, import_react.useState)("payment");
	const [importPending, setImportPending] = (0, import_react.useState)(String(savedImportPending) === "true");
	const [importNotes, setImportNotes] = (0, import_react.useState)(String(savedImportNotes) === "true");
	const [reimportDeleted, setReimportDeleted] = (0, import_react.useState)(String(savedReimportDeleted) === "true");
	const [mappings, setMappings] = (0, import_react.useState)(mappingsFromString(savedMappings));
	const [importTransactions, setImportTransactions] = (0, import_react.useState)(String(savedImportTransactions) === "true");
	const [updateDates, setUpdateDates] = (0, import_react.useState)(String(savedUpdateDates) === "true");
	const { transactions } = useTransactions({ query: q("transactions").filter({
		account: accountId,
		amount: transactionDirection === "payment" ? { $lte: 0 } : { $gt: 0 },
		raw_synced_data: { $ne: null }
	}).options({ splits: "none" }).select("*") });
	const data = transactions?.[0]?.raw_synced_data;
	let exampleTransaction;
	if (data) try {
		exampleTransaction = JSON.parse(data);
	} catch (error) {
		console.error("Failed to parse transaction data:", error);
	}
	const fields = exampleTransaction ? getFields(exampleTransaction) : [];
	const saveSettings = () => {
		setSavedMappings(mappingsToString(mappings));
		setSavedImportPending(String(importPending));
		setSavedImportNotes(String(importNotes));
		setSavedReimportDeleted(String(reimportDeleted));
		setSavedImportTransactions(String(importTransactions));
		setSavedUpdateDates(String(updateDates));
	};
	const setMapping = (field, value) => {
		setMappings((prev) => {
			const updated = new Map(prev);
			const directionMap = updated.get(transactionDirection);
			if (directionMap) {
				const newDirectionMap = new Map(directionMap);
				newDirectionMap.set(field, value);
				updated.set(transactionDirection, newDirectionMap);
			}
			return updated;
		});
	};
	return {
		transactionDirection,
		setTransactionDirection,
		importPending,
		setImportPending,
		importNotes,
		setImportNotes,
		reimportDeleted,
		setReimportDeleted,
		importTransactions,
		setImportTransactions,
		updateDates,
		setUpdateDates,
		mappings,
		setMapping,
		exampleTransaction,
		fields,
		saveSettings
	};
}
//#endregion
//#region src/components/mobile/banksync/MobileBankSyncAccountEditPage.tsx
function MobileBankSyncAccountEditPage() {
	const $ = (0, import_compiler_runtime.c)(78);
	const { t } = useTranslation();
	const navigate = useNavigate();
	const dispatch = useDispatch();
	const { accountId } = useParams();
	const account = useAccount(accountId);
	const { transactionDirection, setTransactionDirection, importPending, setImportPending, importNotes, setImportNotes, reimportDeleted, setReimportDeleted, importTransactions, setImportTransactions, updateDates, setUpdateDates, mappings, setMapping, fields, saveSettings } = useBankSyncAccountSettings(accountId);
	let t0;
	if ($[0] !== navigate) {
		t0 = () => {
			navigate("/bank-sync");
		};
		$[0] = navigate;
		$[1] = t0;
	} else t0 = $[1];
	const handleCancel = t0;
	let t1;
	if ($[2] !== navigate || $[3] !== saveSettings) {
		t1 = async () => {
			saveSettings();
			navigate("/bank-sync");
		};
		$[2] = navigate;
		$[3] = saveSettings;
		$[4] = t1;
	} else t1 = $[4];
	const handleSave = t1;
	const unlinkAccount = useUnlinkAccountMutation();
	let t2;
	if ($[5] !== account?.name || $[6] !== accountId || $[7] !== dispatch || $[8] !== navigate || $[9] !== unlinkAccount) {
		t2 = () => {
			dispatch(pushModal({ modal: {
				name: "confirm-unlink-account",
				options: {
					accountName: account?.name || "",
					isViewBankSyncSettings: true,
					onUnlink: () => {
						if (accountId) unlinkAccount.mutate({ id: accountId }, { onSuccess: () => navigate("/bank-sync") });
					}
				}
			} }));
		};
		$[5] = account?.name;
		$[6] = accountId;
		$[7] = dispatch;
		$[8] = navigate;
		$[9] = unlinkAccount;
		$[10] = t2;
	} else t2 = $[10];
	const handleUnlink = t2;
	if (!account) {
		let t3;
		if ($[11] !== t) {
			t3 = t("Account not found");
			$[11] = t;
			$[12] = t3;
		} else t3 = $[12];
		let t4;
		if ($[13] !== handleCancel) {
			t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MobileBackButton, { onPress: handleCancel });
			$[13] = handleCancel;
			$[14] = t4;
		} else t4 = $[14];
		let t5;
		if ($[15] !== t3 || $[16] !== t4) {
			t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MobilePageHeader, {
				title: t3,
				leftContent: t4
			});
			$[15] = t3;
			$[16] = t4;
			$[17] = t5;
		} else t5 = $[17];
		let t6;
		if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
			t6 = {
				flex: 1,
				backgroundColor: theme.mobilePageBackground,
				justifyContent: "center",
				alignItems: "center"
			};
			$[18] = t6;
		} else t6 = $[18];
		let t7;
		if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
			t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
				style: t6,
				children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Account not found" }) })
			});
			$[19] = t7;
		} else t7 = $[19];
		let t8;
		if ($[20] !== t5) {
			t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Page, {
				header: t5,
				padding: 0,
				children: t7
			});
			$[20] = t5;
			$[21] = t8;
		} else t8 = $[21];
		return t8;
	}
	let t3;
	if ($[22] !== mappings || $[23] !== transactionDirection) {
		t3 = mappings.get(transactionDirection) ?? /* @__PURE__ */ new Map();
		$[22] = mappings;
		$[23] = transactionDirection;
		$[24] = t3;
	} else t3 = $[24];
	const mapping = t3;
	let t4;
	if ($[25] !== handleCancel) {
		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MobileBackButton, { onPress: handleCancel });
		$[25] = handleCancel;
		$[26] = t4;
	} else t4 = $[26];
	let t5;
	if ($[27] !== account.name || $[28] !== t4) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MobilePageHeader, {
			title: account.name,
			leftContent: t4
		});
		$[27] = account.name;
		$[28] = t4;
		$[29] = t5;
	} else t5 = $[29];
	let t6;
	if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
		t6 = {
			flex: 1,
			backgroundColor: theme.mobilePageBackground
		};
		$[30] = t6;
	} else t6 = $[30];
	let t7;
	if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
		t7 = {
			flex: 1,
			overflow: "auto"
		};
		$[31] = t7;
	} else t7 = $[31];
	let t8;
	if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
		t8 = { padding: 16 };
		$[32] = t8;
	} else t8 = $[32];
	let t9;
	if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
		t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
			style: {
				fontSize: 15,
				marginBottom: 10
			},
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Field mapping" })
		});
		$[33] = t9;
	} else t9 = $[33];
	let t10;
	if ($[34] !== fields || $[35] !== mapping || $[36] !== setMapping || $[37] !== setTransactionDirection || $[38] !== transactionDirection) {
		t10 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FieldMapping, {
			transactionDirection,
			setTransactionDirection,
			fields,
			mapping,
			setMapping,
			isMobile: true
		});
		$[34] = fields;
		$[35] = mapping;
		$[36] = setMapping;
		$[37] = setTransactionDirection;
		$[38] = transactionDirection;
		$[39] = t10;
	} else t10 = $[39];
	let t11;
	if ($[40] === Symbol.for("react.memo_cache_sentinel")) {
		t11 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
			style: {
				fontSize: 15,
				marginTop: 20,
				marginBottom: 10
			},
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Options" })
		});
		$[40] = t11;
	} else t11 = $[40];
	let t12;
	if ($[41] !== importNotes || $[42] !== importPending || $[43] !== importTransactions || $[44] !== reimportDeleted || $[45] !== setImportNotes || $[46] !== setImportPending || $[47] !== setImportTransactions || $[48] !== setReimportDeleted || $[49] !== setUpdateDates || $[50] !== updateDates) {
		t12 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BankSyncCheckboxOptions, {
			importPending,
			setImportPending,
			importNotes,
			setImportNotes,
			reimportDeleted,
			setReimportDeleted,
			importTransactions,
			setImportTransactions,
			updateDates,
			setUpdateDates,
			helpMode: "mobile"
		});
		$[41] = importNotes;
		$[42] = importPending;
		$[43] = importTransactions;
		$[44] = reimportDeleted;
		$[45] = setImportNotes;
		$[46] = setImportPending;
		$[47] = setImportTransactions;
		$[48] = setReimportDeleted;
		$[49] = setUpdateDates;
		$[50] = updateDates;
		$[51] = t12;
	} else t12 = $[51];
	let t13;
	if ($[52] !== t10 || $[53] !== t12) {
		t13 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t7,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
				style: t8,
				children: [
					t9,
					t10,
					t11,
					t12
				]
			})
		});
		$[52] = t10;
		$[53] = t12;
		$[54] = t13;
	} else t13 = $[54];
	let t14;
	if ($[55] === Symbol.for("react.memo_cache_sentinel")) {
		t14 = {
			padding: 16,
			paddingTop: 12,
			borderTop: `1px solid ${theme.tableBorder}`,
			backgroundColor: theme.mobilePageBackground,
			display: "flex",
			flexDirection: "row",
			justifyContent: "space-between",
			alignItems: "center"
		};
		$[55] = t14;
	} else t14 = $[55];
	let t15;
	if ($[56] === Symbol.for("react.memo_cache_sentinel")) {
		t15 = { color: theme.errorText };
		$[56] = t15;
	} else t15 = $[56];
	let t16;
	if ($[57] === Symbol.for("react.memo_cache_sentinel")) {
		t16 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Unlink account" });
		$[57] = t16;
	} else t16 = $[57];
	let t17;
	if ($[58] !== handleUnlink) {
		t17 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
			style: t15,
			onPress: handleUnlink,
			children: t16
		});
		$[58] = handleUnlink;
		$[59] = t17;
	} else t17 = $[59];
	let t18;
	if ($[60] === Symbol.for("react.memo_cache_sentinel")) {
		t18 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Cancel" });
		$[60] = t18;
	} else t18 = $[60];
	let t19;
	if ($[61] !== handleCancel) {
		t19 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
			onPress: handleCancel,
			children: t18
		});
		$[61] = handleCancel;
		$[62] = t19;
	} else t19 = $[62];
	let t20;
	if ($[63] === Symbol.for("react.memo_cache_sentinel")) {
		t20 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Save" });
		$[63] = t20;
	} else t20 = $[63];
	let t21;
	if ($[64] !== handleSave) {
		t21 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
			variant: "primary",
			onPress: handleSave,
			children: t20
		});
		$[64] = handleSave;
		$[65] = t21;
	} else t21 = $[65];
	let t22;
	if ($[66] !== t19 || $[67] !== t21) {
		t22 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SpaceBetween, {
			gap: 10,
			children: [t19, t21]
		});
		$[66] = t19;
		$[67] = t21;
		$[68] = t22;
	} else t22 = $[68];
	let t23;
	if ($[69] !== t17 || $[70] !== t22) {
		t23 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t14,
			children: [t17, t22]
		});
		$[69] = t17;
		$[70] = t22;
		$[71] = t23;
	} else t23 = $[71];
	let t24;
	if ($[72] !== t13 || $[73] !== t23) {
		t24 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t6,
			children: [t13, t23]
		});
		$[72] = t13;
		$[73] = t23;
		$[74] = t24;
	} else t24 = $[74];
	let t25;
	if ($[75] !== t24 || $[76] !== t5) {
		t25 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Page, {
			header: t5,
			padding: 0,
			children: t24
		});
		$[75] = t24;
		$[76] = t5;
		$[77] = t25;
	} else t25 = $[77];
	return t25;
}
//#endregion
//#region ../component-library/src/Label.tsx
var Label = (0, import_react.forwardRef)(({ title, style }, ref) => {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
		ref,
		style: {
			...styles.text,
			color: theme.tableRowHeaderText,
			textAlign: "right",
			fontSize: 14,
			marginBottom: 2,
			...style
		},
		children: title
	});
});
Label.displayName = "Label";
//#endregion
//#region src/hooks/useOffBudgetAccounts.ts
function useOffBudgetAccounts() {
	return useQuery(accountQueries.listOffBudget());
}
//#endregion
//#region src/hooks/useOnBudgetAccounts.ts
function useOnBudgetAccounts() {
	return useQuery(accountQueries.listOnBudget());
}
//#endregion
//#region src/components/schedules/schedule-edit-utils.ts
function updateScheduleConditions(schedule, fields) {
	const conds = extractScheduleConds(schedule._conditions);
	const updateCond = (cond, op, field, value) => {
		if (cond) return {
			...cond,
			value
		};
		if (value != null || field === "payee") return {
			op,
			field,
			value
		};
		return null;
	};
	if (fields.date == null) return {
		error: t("Date is required"),
		conditions: []
	};
	if (fields.amount == null) return {
		error: t("A valid amount is required"),
		conditions: []
	};
	return { conditions: [
		updateCond(conds.payee, "is", "payee", fields.payee),
		updateCond(conds.account, "is", "account", fields.account),
		updateCond(conds.date, "isapprox", "date", fields.date),
		{
			op: fields.amountOp || "isapprox",
			field: "amount",
			value: fields.amount
		}
	].filter((val) => !!val) };
}
//#endregion
//#region src/hooks/useScheduleEdit.ts
function createScheduleEditReducer(useGetScheduledAmount = false) {
	return (state, action) => {
		switch (action.type) {
			case "set-schedule": {
				const schedule = action.schedule;
				const conds = extractScheduleConds(schedule._conditions);
				const condsSet = new Set(Object.values(conds));
				const isCustom = !!(schedule._conditions?.find((c) => !condsSet.has(c)) || schedule._actions?.find((a) => a.op !== "link-schedule"));
				return {
					...state,
					schedule: action.schedule,
					isCustom,
					fields: {
						payee: schedule._payee ?? null,
						account: schedule._account ?? null,
						amount: schedule._amount || 0,
						amountOp: schedule._amountOp || "isapprox",
						date: schedule._date ?? null,
						posts_transaction: action.schedule.posts_transaction ?? false,
						custom_upcoming_length: action.schedule.custom_upcoming_length ?? null,
						name: schedule.name ?? null
					}
				};
			}
			case "set-field": {
				if (!(action.field in state.fields)) throw new Error("Unknown field: " + action.field);
				const fields = { [action.field]: action.value };
				if (action.field === "amountOp" && action.value !== state.fields.amountOp) {
					if (action.value === "isbetween") if (useGetScheduledAmount) {
						const num = getScheduledAmount(state.fields.amount);
						fields.amount = {
							num1: num,
							num2: num
						};
					} else fields.amount = typeof state.fields.amount === "number" ? {
						num1: state.fields.amount,
						num2: state.fields.amount
					} : {
						num1: 0,
						num2: 0
					};
					else if (state.fields.amountOp === "isbetween") if (useGetScheduledAmount) fields.amount = getScheduledAmount(state.fields.amount);
					else fields.amount = typeof state.fields.amount === "number" ? state.fields.amount : state.fields.amount?.num1;
				}
				return {
					...state,
					fields: {
						...state.fields,
						...fields
					}
				};
			}
			case "set-transactions": {
				const transactions = action.transactions;
				if (action.transactionId && transactions) transactions.sort((a, b) => (action.transactionId === b.id ? 1 : 0) - (action.transactionId === a.id ? 1 : 0));
				return {
					...state,
					transactions
				};
			}
			case "set-repeats": {
				if (!action.repeats) return {
					...state,
					fields: {
						...state.fields,
						date: currentDay()
					}
				};
				const date = {
					start: currentDay(),
					frequency: "monthly",
					patterns: [],
					skipWeekend: false,
					weekendSolveMode: "after",
					endMode: "never",
					endOccurrences: 1,
					endDate: currentDay()
				};
				return {
					...state,
					fields: {
						...state.fields,
						date
					}
				};
			}
			case "set-upcoming-dates": return {
				...state,
				upcomingDates: action.dates
			};
			case "form-error": return {
				...state,
				error: action.error
			};
			case "switch-transactions": return {
				...state,
				transactionsMode: action.mode
			};
			default: throw new Error("Unknown action");
		}
	};
}
function useScheduleEdit({ scheduleId, adding, initialSchedule, transactionId, useGetScheduledAmount = false }) {
	const reducer = createScheduleEditReducer(useGetScheduledAmount);
	const [isLoading, setIsLoading] = (0, import_react.useState)(false);
	const [state, dispatch] = (0, import_react.useReducer)(reducer, {
		schedule: null,
		upcomingDates: null,
		error: null,
		fields: {
			payee: null,
			account: null,
			amount: null,
			amountOp: null,
			date: null,
			posts_transaction: false,
			custom_upcoming_length: null,
			name: null
		},
		transactions: [],
		transactionsMode: adding ? "matched" : "linked"
	});
	async function loadSchedule() {
		if (!scheduleId) return null;
		setIsLoading(true);
		const { data } = await aqlQuery(q("schedules").filter({ id: scheduleId }).select("*"));
		setIsLoading(false);
		return data[0];
	}
	const setSchedule = (0, import_react.useEffectEvent)(async () => {
		if (adding) {
			if (initialSchedule) dispatch({
				type: "set-schedule",
				schedule: initialSchedule
			});
			return;
		}
		const schedule = await loadSchedule();
		if (schedule && state.schedule == null) dispatch({
			type: "set-schedule",
			schedule
		});
	});
	(0, import_react.useEffect)(() => {
		setSchedule();
	}, []);
	(0, import_react.useEffect)(() => {
		async function run() {
			const date = state.fields.date;
			if (date === null) {
				dispatch({
					type: "set-upcoming-dates",
					dates: null
				});
				return;
			}
			if (typeof date === "string") {
				const today = currentDay();
				if (date === today || isAfter(date, today)) dispatch({
					type: "set-upcoming-dates",
					dates: [date]
				});
				else dispatch({
					type: "set-upcoming-dates",
					dates: null
				});
				return;
			}
			const { data } = await sendCatch("schedule/get-upcoming-dates", {
				config: date,
				count: 3
			});
			dispatch({
				type: "set-upcoming-dates",
				dates: data
			});
		}
		run();
	}, [state.fields.date]);
	(0, import_react.useEffect)(() => {
		if (state.schedule && state.schedule.id && state.transactionsMode === "linked") return liveQuery(q("transactions").filter({ schedule: state.schedule.id }).select("*").options({ splits: "all" }), { onData: (data) => dispatch({
			type: "set-transactions",
			transactions: data,
			transactionId
		}) }).unsubscribe;
	}, [
		state.schedule,
		state.transactionsMode,
		transactionId
	]);
	(0, import_react.useEffect)(() => {
		let current = true;
		let unsubscribe;
		if (state.schedule && state.transactionsMode === "matched") {
			const updated = updateScheduleConditions(state.schedule, state.fields);
			if ("error" in updated) {
				dispatch({
					type: "form-error",
					error: updated.error
				});
				return;
			}
			send("make-filters-from-conditions", { conditions: (updated.conditions || []).map((cond) => {
				const typedCond = cond;
				if (typedCond.field === "description") return {
					...typedCond,
					field: "payee"
				};
				else if (typedCond.field === "acct") return {
					...typedCond,
					field: "account"
				};
				return typedCond;
			}) }).then(({ filters }) => {
				if (current) unsubscribe = liveQuery(q("transactions").filter({ $and: filters }).select("*").options({ splits: "all" }), { onData: (data) => dispatch({
					type: "set-transactions",
					transactions: data,
					transactionId
				}) }).unsubscribe;
			});
		}
		return () => {
			current = false;
			if (unsubscribe) unsubscribe();
		};
	}, [
		state.schedule,
		state.transactionsMode,
		state.fields,
		transactionId
	]);
	return {
		state,
		dispatch,
		loadSchedule,
		isLoading
	};
}
//#endregion
//#region src/components/schedules/CustomUpcomingLength.tsx
function CustomUpcomingLength(t0) {
	const $ = (0, import_compiler_runtime.c)(43);
	const { onChange, tempValue } = t0;
	const { t } = useTranslation();
	let t1;
	if ($[0] !== t) {
		t1 = t("Days");
		$[0] = t;
		$[1] = t1;
	} else t1 = $[1];
	let t2;
	if ($[2] !== t1) {
		t2 = {
			value: "day",
			label: t1
		};
		$[2] = t1;
		$[3] = t2;
	} else t2 = $[3];
	let t3;
	if ($[4] !== t) {
		t3 = t("Weeks");
		$[4] = t;
		$[5] = t3;
	} else t3 = $[5];
	let t4;
	if ($[6] !== t3) {
		t4 = {
			value: "week",
			label: t3
		};
		$[6] = t3;
		$[7] = t4;
	} else t4 = $[7];
	let t5;
	if ($[8] !== t) {
		t5 = t("Months");
		$[8] = t;
		$[9] = t5;
	} else t5 = $[9];
	let t6;
	if ($[10] !== t5) {
		t6 = {
			value: "month",
			label: t5
		};
		$[10] = t5;
		$[11] = t6;
	} else t6 = $[11];
	let t7;
	if ($[12] !== t) {
		t7 = t("Years");
		$[12] = t;
		$[13] = t7;
	} else t7 = $[13];
	let t8;
	if ($[14] !== t7) {
		t8 = {
			value: "year",
			label: t7
		};
		$[14] = t7;
		$[15] = t8;
	} else t8 = $[15];
	let t9;
	if ($[16] !== t2 || $[17] !== t4 || $[18] !== t6 || $[19] !== t8) {
		t9 = [
			t2,
			t4,
			t6,
			t8
		];
		$[16] = t2;
		$[17] = t4;
		$[18] = t6;
		$[19] = t8;
		$[20] = t9;
	} else t9 = $[20];
	const options = t9;
	let timePeriod;
	if (tempValue === "custom") {
		let t10;
		if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
			t10 = ["1", "day"];
			$[21] = t10;
		} else t10 = $[21];
		timePeriod = t10;
	} else {
		let t10;
		if ($[22] !== tempValue) {
			t10 = tempValue.split("-");
			$[22] = tempValue;
			$[23] = t10;
		} else t10 = $[23];
		timePeriod = t10;
	}
	const [numValue, setNumValue] = (0, import_react.useState)(parseInt(timePeriod[0]));
	const [unit, setUnit] = (0, import_react.useState)(timePeriod[1]);
	let t10;
	let t11;
	if ($[24] !== numValue || $[25] !== onChange || $[26] !== unit) {
		t10 = () => {
			onChange(`${numValue}-${unit}`);
		};
		t11 = [
			numValue,
			onChange,
			unit
		];
		$[24] = numValue;
		$[25] = onChange;
		$[26] = unit;
		$[27] = t10;
		$[28] = t11;
	} else {
		t10 = $[27];
		t11 = $[28];
	}
	(0, import_react.useEffect)(t10, t11);
	let t12;
	if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
		t12 = {
			display: "flex",
			alignItems: "center",
			gap: 5,
			marginTop: 10
		};
		$[29] = t12;
	} else t12 = $[29];
	let t13;
	if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
		t13 = { width: 40 };
		$[30] = t13;
	} else t13 = $[30];
	let t14;
	if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
		t14 = (value) => setNumValue(parseInt(value));
		$[31] = t14;
	} else t14 = $[31];
	const t15 = numValue || 1;
	let t16;
	if ($[32] !== t15) {
		t16 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
			id: "length",
			style: t13,
			type: "number",
			min: 1,
			onChangeValue: t14,
			defaultValue: t15
		});
		$[32] = t15;
		$[33] = t16;
	} else t16 = $[33];
	let t17;
	if ($[34] !== options) {
		t17 = options.map(_temp);
		$[34] = options;
		$[35] = t17;
	} else t17 = $[35];
	let t18;
	if ($[36] === Symbol.for("react.memo_cache_sentinel")) {
		t18 = (newValue) => setUnit(newValue);
		$[36] = t18;
	} else t18 = $[36];
	let t19;
	if ($[37] !== t17 || $[38] !== unit) {
		t19 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Select, {
			options: t17,
			value: unit,
			onChange: t18
		});
		$[37] = t17;
		$[38] = unit;
		$[39] = t19;
	} else t19 = $[39];
	let t20;
	if ($[40] !== t16 || $[41] !== t19) {
		t20 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
			style: t12,
			children: [t16, t19]
		});
		$[40] = t16;
		$[41] = t19;
		$[42] = t20;
	} else t20 = $[42];
	return t20;
}
function _temp(x) {
	return [x.value, x.label];
}
//#endregion
//#region src/components/schedules/ScheduleEditForm.tsx
function ScheduleEditForm(t0) {
	const $ = (0, import_compiler_runtime.c)(230);
	const { fields, dispatch, upcomingDates, repeats, schedule, adding, isCustom, onEditRule, transactions, transactionsMode, error, selectedInst, onSwitchTransactions, onLinkTransactions, onUnlinkTransactions } = t0;
	const locale = useLocale();
	const { t } = useTranslation();
	const dateFormat = useDateFormat() || "MM/dd/yyyy";
	const { isNarrowWidth } = useResponsive();
	let t1;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = {
			display: "block",
			overflow: "scroll",
			padding: 10
		};
		$[0] = t1;
	} else t1 = $[0];
	let t2;
	if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = { marginTop: 10 };
		$[1] = t2;
	} else t2 = $[1];
	let t3;
	if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
		t3 = { flex: 1 };
		$[2] = t3;
	} else t3 = $[2];
	let t4;
	if ($[3] !== t) {
		t4 = t("Schedule Name");
		$[3] = t;
		$[4] = t4;
	} else t4 = $[4];
	let t5;
	if ($[5] !== t4) {
		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormLabel, {
			title: t4,
			htmlFor: "name-field"
		});
		$[5] = t4;
		$[6] = t5;
	} else t5 = $[6];
	const t6 = fields.name;
	let t7;
	if ($[7] !== t) {
		t7 = t("nothing");
		$[7] = t;
		$[8] = t7;
	} else t7 = $[8];
	let t8;
	if ($[9] !== dispatch) {
		t8 = (e) => {
			dispatch({
				type: "set-field",
				field: "name",
				value: e
			});
		};
		$[9] = dispatch;
		$[10] = t8;
	} else t8 = $[10];
	let t9;
	if ($[11] !== fields.name || $[12] !== t7 || $[13] !== t8) {
		t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InitialFocus, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
			id: "name-field",
			value: t6,
			placeholder: t7,
			onChangeValue: t8
		}) });
		$[11] = fields.name;
		$[12] = t7;
		$[13] = t8;
		$[14] = t9;
	} else t9 = $[14];
	let t10;
	if ($[15] !== t5 || $[16] !== t9) {
		t10 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SpaceBetween, {
			style: t2,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(FormField, {
				style: t3,
				children: [t5, t9]
			})
		});
		$[15] = t5;
		$[16] = t9;
		$[17] = t10;
	} else t10 = $[17];
	const t11 = isNarrowWidth ? "grid" : "flex";
	let t12;
	if ($[18] !== t11) {
		t12 = {
			marginTop: 20,
			display: t11,
			gridTemplateColumns: "1fr 1fr"
		};
		$[18] = t11;
		$[19] = t12;
	} else t12 = $[19];
	let t13;
	if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
		t13 = { flex: 1 };
		$[20] = t13;
	} else t13 = $[20];
	let t14;
	if ($[21] !== t) {
		t14 = t("Payee");
		$[21] = t;
		$[22] = t14;
	} else t14 = $[22];
	let t15;
	if ($[23] !== t14) {
		t15 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormLabel, {
			title: t14,
			id: "payee-label",
			htmlFor: "payee-field"
		});
		$[23] = t14;
		$[24] = t15;
	} else t15 = $[24];
	const t16 = fields.payee || "";
	let t17;
	if ($[25] !== dispatch) {
		t17 = (id) => dispatch({
			type: "set-field",
			field: "payee",
			value: id
		});
		$[25] = dispatch;
		$[26] = t17;
	} else t17 = $[26];
	let t18;
	if ($[27] !== t16 || $[28] !== t17) {
		t18 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GenericInput, {
			type: "id",
			field: "payee",
			value: t16,
			onChange: t17
		});
		$[27] = t16;
		$[28] = t17;
		$[29] = t18;
	} else t18 = $[29];
	let t19;
	if ($[30] !== t15 || $[31] !== t18) {
		t19 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(FormField, {
			style: t13,
			children: [t15, t18]
		});
		$[30] = t15;
		$[31] = t18;
		$[32] = t19;
	} else t19 = $[32];
	let t20;
	if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
		t20 = { flex: 1 };
		$[33] = t20;
	} else t20 = $[33];
	let t21;
	if ($[34] !== t) {
		t21 = t("Account");
		$[34] = t;
		$[35] = t21;
	} else t21 = $[35];
	let t22;
	if ($[36] !== t21) {
		t22 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormLabel, {
			title: t21,
			id: "account-label",
			htmlFor: "account-field"
		});
		$[36] = t21;
		$[37] = t22;
	} else t22 = $[37];
	const t23 = fields.account || "";
	let t24;
	if ($[38] !== dispatch) {
		t24 = (id_0) => dispatch({
			type: "set-field",
			field: "account",
			value: id_0
		});
		$[38] = dispatch;
		$[39] = t24;
	} else t24 = $[39];
	let t25;
	if ($[40] !== t23 || $[41] !== t24) {
		t25 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GenericInput, {
			type: "id",
			field: "account",
			value: t23,
			onChange: t24
		});
		$[40] = t23;
		$[41] = t24;
		$[42] = t25;
	} else t25 = $[42];
	let t26;
	if ($[43] !== t22 || $[44] !== t25) {
		t26 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(FormField, {
			style: t20,
			children: [t22, t25]
		});
		$[43] = t22;
		$[44] = t25;
		$[45] = t26;
	} else t26 = $[45];
	let t27;
	if ($[46] === Symbol.for("react.memo_cache_sentinel")) {
		t27 = {
			flex: 1,
			gridColumn: "1 / -1"
		};
		$[46] = t27;
	} else t27 = $[46];
	let t28;
	if ($[47] === Symbol.for("react.memo_cache_sentinel")) {
		t28 = {
			marginBottom: 3,
			alignItems: "center"
		};
		$[47] = t28;
	} else t28 = $[47];
	let t29;
	if ($[48] !== t) {
		t29 = t("Amount");
		$[48] = t;
		$[49] = t29;
	} else t29 = $[49];
	let t30;
	if ($[50] === Symbol.for("react.memo_cache_sentinel")) {
		t30 = {
			margin: 0,
			flex: 1
		};
		$[50] = t30;
	} else t30 = $[50];
	let t31;
	if ($[51] !== t29) {
		t31 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormLabel, {
			title: t29,
			htmlFor: "amount-field",
			style: t30
		});
		$[51] = t29;
		$[52] = t31;
	} else t31 = $[52];
	let t32;
	if ($[53] === Symbol.for("react.memo_cache_sentinel")) {
		t32 = [
			"isapprox",
			"is",
			"isbetween"
		];
		$[53] = t32;
	} else t32 = $[53];
	const t33 = fields.amountOp;
	let t34;
	if ($[54] !== t) {
		t34 = (op) => {
			switch (op) {
				case "is": return t("is exactly");
				case "isapprox": return t("is approximately");
				case "isbetween": return t("is between");
				default: throw new Error("Invalid op for select: " + op);
			}
		};
		$[54] = t;
		$[55] = t34;
	} else t34 = $[55];
	let t35;
	if ($[56] === Symbol.for("react.memo_cache_sentinel")) {
		t35 = {
			padding: "0 10px",
			color: theme.pageTextLight,
			fontSize: 12
		};
		$[56] = t35;
	} else t35 = $[56];
	let t36;
	if ($[57] !== dispatch) {
		t36 = (_, op_0) => dispatch({
			type: "set-field",
			field: "amountOp",
			value: op_0
		});
		$[57] = dispatch;
		$[58] = t36;
	} else t36 = $[58];
	let t37;
	if ($[59] !== t33 || $[60] !== t34 || $[61] !== t36) {
		t37 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OpSelect, {
			ops: t32,
			value: t33,
			formatOp: t34,
			style: t35,
			onChange: t36
		});
		$[59] = t33;
		$[60] = t34;
		$[61] = t36;
		$[62] = t37;
	} else t37 = $[62];
	let t38;
	if ($[63] !== t31 || $[64] !== t37) {
		t38 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SpaceBetween, {
			style: t28,
			children: [t31, t37]
		});
		$[63] = t31;
		$[64] = t37;
		$[65] = t38;
	} else t38 = $[65];
	let t39;
	if ($[66] !== dispatch || $[67] !== fields.amount || $[68] !== fields.amountOp) {
		t39 = fields.amountOp === "isbetween" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BetweenAmountInput, {
			defaultValue: fields.amount,
			onChange: (value) => dispatch({
				type: "set-field",
				field: "amount",
				value
			})
		}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AmountInput, {
			id: "amount-field",
			value: fields.amount,
			onUpdate: (value_0) => dispatch({
				type: "set-field",
				field: "amount",
				value: value_0
			})
		});
		$[66] = dispatch;
		$[67] = fields.amount;
		$[68] = fields.amountOp;
		$[69] = t39;
	} else t39 = $[69];
	let t40;
	if ($[70] !== t38 || $[71] !== t39) {
		t40 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(FormField, {
			style: t27,
			children: [t38, t39]
		});
		$[70] = t38;
		$[71] = t39;
		$[72] = t40;
	} else t40 = $[72];
	let t41;
	if ($[73] !== t12 || $[74] !== t19 || $[75] !== t26 || $[76] !== t40) {
		t41 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SpaceBetween, {
			style: t12,
			children: [
				t19,
				t26,
				t40
			]
		});
		$[73] = t12;
		$[74] = t19;
		$[75] = t26;
		$[76] = t40;
		$[77] = t41;
	} else t41 = $[77];
	let t42;
	if ($[78] === Symbol.for("react.memo_cache_sentinel")) {
		t42 = { marginTop: 20 };
		$[78] = t42;
	} else t42 = $[78];
	let t43;
	if ($[79] !== t) {
		t43 = t("Date");
		$[79] = t;
		$[80] = t43;
	} else t43 = $[80];
	let t44;
	if ($[81] !== t43) {
		t44 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t42,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormLabel, { title: t43 })
		});
		$[81] = t43;
		$[82] = t44;
	} else t44 = $[82];
	let t45;
	if ($[83] === Symbol.for("react.memo_cache_sentinel")) {
		t45 = {
			alignItems: "flex-start",
			justifyContent: "space-between"
		};
		$[83] = t45;
	} else t45 = $[83];
	let t46;
	if ($[84] === Symbol.for("react.memo_cache_sentinel")) {
		t46 = { width: "13.44rem" };
		$[84] = t46;
	} else t46 = $[84];
	let t47;
	if ($[85] !== dateFormat || $[86] !== dispatch || $[87] !== fields.date || $[88] !== repeats) {
		t47 = repeats ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RecurringSchedulePicker, {
			value: fields.date,
			onChange: (value_1) => dispatch({
				type: "set-field",
				field: "date",
				value: value_1
			})
		}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DateSelect, {
			value: fields.date,
			onSelect: (date) => dispatch({
				type: "set-field",
				field: "date",
				value: date
			}),
			dateFormat
		});
		$[85] = dateFormat;
		$[86] = dispatch;
		$[87] = fields.date;
		$[88] = repeats;
		$[89] = t47;
	} else t47 = $[89];
	let t48;
	if ($[90] !== dateFormat || $[91] !== locale || $[92] !== upcomingDates) {
		t48 = upcomingDates && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: {
				fontSize: 13,
				marginTop: 20
			},
			children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
				style: {
					color: theme.pageTextLight,
					fontWeight: 600
				},
				children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Upcoming dates" })
			}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SpaceBetween, {
				direction: "vertical",
				gap: 5,
				style: {
					marginTop: 10,
					color: theme.pageTextLight,
					alignItems: "flex-start"
				},
				children: upcomingDates.map((date_0) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, { children: format(date_0, `${dateFormat} EEEE`, locale) }, date_0))
			})]
		});
		$[90] = dateFormat;
		$[91] = locale;
		$[92] = upcomingDates;
		$[93] = t48;
	} else t48 = $[93];
	let t49;
	if ($[94] !== t47 || $[95] !== t48) {
		t49 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t46,
			children: [t47, t48]
		});
		$[94] = t47;
		$[95] = t48;
		$[96] = t49;
	} else t49 = $[96];
	let t50;
	if ($[97] === Symbol.for("react.memo_cache_sentinel")) {
		t50 = {
			marginTop: 5,
			flexDirection: "row",
			alignItems: "center",
			userSelect: "none"
		};
		$[97] = t50;
	} else t50 = $[97];
	let t51;
	if ($[98] !== dispatch) {
		t51 = (e_0) => {
			dispatch({
				type: "set-repeats",
				repeats: e_0.target.checked
			});
		};
		$[98] = dispatch;
		$[99] = t51;
	} else t51 = $[99];
	let t52;
	if ($[100] !== repeats || $[101] !== t51) {
		t52 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Checkbox, {
			id: "form_repeats",
			checked: repeats,
			onChange: t51
		});
		$[100] = repeats;
		$[101] = t51;
		$[102] = t52;
	} else t52 = $[102];
	let t53;
	if ($[103] === Symbol.for("react.memo_cache_sentinel")) {
		t53 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", {
			htmlFor: "form_repeats",
			style: { userSelect: "none" },
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Repeats" })
		});
		$[103] = t53;
	} else t53 = $[103];
	let t54;
	if ($[104] !== t52) {
		t54 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t50,
			children: [t52, t53]
		});
		$[104] = t52;
		$[105] = t54;
	} else t54 = $[105];
	let t55;
	if ($[106] !== t49 || $[107] !== t54) {
		t55 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SpaceBetween, {
			style: t45,
			children: [t49, t54]
		});
		$[106] = t49;
		$[107] = t54;
		$[108] = t55;
	} else t55 = $[108];
	const t56 = isNarrowWidth ? "grid" : "flex";
	let t57;
	if ($[109] !== t56) {
		t57 = {
			marginTop: 20,
			display: t56,
			gridTemplateColumns: "1fr 1fr"
		};
		$[109] = t56;
		$[110] = t57;
	} else t57 = $[110];
	let t58;
	if ($[111] === Symbol.for("react.memo_cache_sentinel")) {
		t58 = { flex: 1 };
		$[111] = t58;
	} else t58 = $[111];
	let t59;
	if ($[112] !== t) {
		t59 = t("Upcoming length");
		$[112] = t;
		$[113] = t59;
	} else t59 = $[113];
	let t60;
	if ($[114] !== t59) {
		t60 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormLabel, {
			title: t59,
			htmlFor: "upcoming-length-field"
		});
		$[114] = t59;
		$[115] = t60;
	} else t60 = $[115];
	let t61;
	if ($[116] === Symbol.for("react.memo_cache_sentinel")) {
		t61 = [
			"1",
			"7",
			"14",
			"oneMonth",
			"currentMonth"
		];
		$[116] = t61;
	} else t61 = $[116];
	const presetValues = t61;
	const isPreset = fields.custom_upcoming_length != null && presetValues.includes(fields.custom_upcoming_length);
	const isCustomValue = fields.custom_upcoming_length != null && !isPreset;
	const isValidCustomFormat = fields.custom_upcoming_length != null && /^[1-9]\d*-(day|week|month|year)$/.test(fields.custom_upcoming_length);
	const safeCustomValue = isCustomValue && isValidCustomFormat ? fields.custom_upcoming_length : "1-day";
	let t62;
	if ($[117] !== t) {
		t62 = t("Use global default");
		$[117] = t;
		$[118] = t62;
	} else t62 = $[118];
	let t63;
	if ($[119] !== t62) {
		t63 = ["", t62];
		$[119] = t62;
		$[120] = t63;
	} else t63 = $[120];
	let t64;
	if ($[121] !== t) {
		t64 = t("1 day");
		$[121] = t;
		$[122] = t64;
	} else t64 = $[122];
	let t65;
	if ($[123] !== t64) {
		t65 = ["1", t64];
		$[123] = t64;
		$[124] = t65;
	} else t65 = $[124];
	let t66;
	if ($[125] !== t) {
		t66 = t("1 week");
		$[125] = t;
		$[126] = t66;
	} else t66 = $[126];
	let t67;
	if ($[127] !== t66) {
		t67 = ["7", t66];
		$[127] = t66;
		$[128] = t67;
	} else t67 = $[128];
	let t68;
	if ($[129] !== t) {
		t68 = t("2 weeks");
		$[129] = t;
		$[130] = t68;
	} else t68 = $[130];
	let t69;
	if ($[131] !== t68) {
		t69 = ["14", t68];
		$[131] = t68;
		$[132] = t69;
	} else t69 = $[132];
	let t70;
	if ($[133] !== t) {
		t70 = t("1 month");
		$[133] = t;
		$[134] = t70;
	} else t70 = $[134];
	let t71;
	if ($[135] !== t70) {
		t71 = ["oneMonth", t70];
		$[135] = t70;
		$[136] = t71;
	} else t71 = $[136];
	let t72;
	if ($[137] !== t) {
		t72 = t("End of the current month");
		$[137] = t;
		$[138] = t72;
	} else t72 = $[138];
	let t73;
	if ($[139] !== t72) {
		t73 = ["currentMonth", t72];
		$[139] = t72;
		$[140] = t73;
	} else t73 = $[140];
	let t74;
	if ($[141] !== t) {
		t74 = t("Custom length");
		$[141] = t;
		$[142] = t74;
	} else t74 = $[142];
	let t75;
	if ($[143] !== t74) {
		t75 = ["custom", t74];
		$[143] = t74;
		$[144] = t75;
	} else t75 = $[144];
	let t76;
	if ($[145] !== t63 || $[146] !== t65 || $[147] !== t67 || $[148] !== t69 || $[149] !== t71 || $[150] !== t73 || $[151] !== t75) {
		t76 = [
			t63,
			t65,
			t67,
			t69,
			t71,
			t73,
			t75
		];
		$[145] = t63;
		$[146] = t65;
		$[147] = t67;
		$[148] = t69;
		$[149] = t71;
		$[150] = t73;
		$[151] = t75;
		$[152] = t76;
	} else t76 = $[152];
	const t77 = fields.custom_upcoming_length == null ? "" : isPreset ? fields.custom_upcoming_length : "custom";
	let t78;
	if ($[153] !== dispatch) {
		t78 = (value_2) => {
			dispatch({
				type: "set-field",
				field: "custom_upcoming_length",
				value: value_2 === "" ? null : value_2 === "custom" ? "1-day" : value_2
			});
		};
		$[153] = dispatch;
		$[154] = t78;
	} else t78 = $[154];
	let t79;
	if ($[155] !== t76 || $[156] !== t77 || $[157] !== t78) {
		t79 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Select, {
			id: "upcoming-length-field",
			options: t76,
			value: t77,
			onChange: t78
		});
		$[155] = t76;
		$[156] = t77;
		$[157] = t78;
		$[158] = t79;
	} else t79 = $[158];
	let t80;
	if ($[159] !== dispatch || $[160] !== isCustomValue || $[161] !== safeCustomValue) {
		t80 = isCustomValue && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CustomUpcomingLength, {
			tempValue: safeCustomValue,
			onChange: (value_3) => {
				dispatch({
					type: "set-field",
					field: "custom_upcoming_length",
					value: value_3
				});
			}
		});
		$[159] = dispatch;
		$[160] = isCustomValue;
		$[161] = safeCustomValue;
		$[162] = t80;
	} else t80 = $[162];
	let t81;
	if ($[163] !== t79 || $[164] !== t80) {
		t81 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [t79, t80] });
		$[163] = t79;
		$[164] = t80;
		$[165] = t81;
	} else t81 = $[165];
	const t82 = t81;
	let t83;
	if ($[166] === Symbol.for("react.memo_cache_sentinel")) {
		t83 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
			style: {
				color: theme.pageTextLight,
				fontSize: 12,
				marginTop: 3
			},
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "How far in advance this schedule appears as upcoming" })
		});
		$[166] = t83;
	} else t83 = $[166];
	let t84;
	if ($[167] !== t60 || $[168] !== t82) {
		t84 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(FormField, {
			style: t58,
			children: [
				t60,
				t82,
				t83
			]
		});
		$[167] = t60;
		$[168] = t82;
		$[169] = t84;
	} else t84 = $[169];
	let t85;
	let t86;
	if ($[170] === Symbol.for("react.memo_cache_sentinel")) {
		t85 = { flex: 1 };
		t86 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormLabel, { title: " " });
		$[170] = t85;
		$[171] = t86;
	} else {
		t85 = $[170];
		t86 = $[171];
	}
	let t87;
	if ($[172] === Symbol.for("react.memo_cache_sentinel")) {
		t87 = {
			flexDirection: "row",
			alignItems: "center",
			userSelect: "none",
			minHeight: 28
		};
		$[172] = t87;
	} else t87 = $[172];
	let t88;
	if ($[173] !== dispatch) {
		t88 = (e_1) => {
			dispatch({
				type: "set-field",
				field: "posts_transaction",
				value: e_1.target.checked
			});
		};
		$[173] = dispatch;
		$[174] = t88;
	} else t88 = $[174];
	let t89;
	if ($[175] !== fields.posts_transaction || $[176] !== t88) {
		t89 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Checkbox, {
			id: "form_posts_transaction",
			checked: fields.posts_transaction,
			onChange: t88
		});
		$[175] = fields.posts_transaction;
		$[176] = t88;
		$[177] = t89;
	} else t89 = $[177];
	let t90;
	if ($[178] === Symbol.for("react.memo_cache_sentinel")) {
		t90 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", {
			htmlFor: "form_posts_transaction",
			style: { userSelect: "none" },
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Automatically add transaction" })
		});
		$[178] = t90;
	} else t90 = $[178];
	let t91;
	if ($[179] !== t89) {
		t91 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t87,
			children: [t89, t90]
		});
		$[179] = t89;
		$[180] = t91;
	} else t91 = $[180];
	let t92;
	if ($[181] === Symbol.for("react.memo_cache_sentinel")) {
		t92 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
			style: {
				color: theme.pageTextLight,
				fontSize: 12,
				marginTop: 3
			},
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Automatically create transactions in the specified account" })
		});
		$[181] = t92;
	} else t92 = $[181];
	let t93;
	if ($[182] !== t91) {
		t93 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(FormField, {
			style: t85,
			children: [
				t86,
				t91,
				t92
			]
		});
		$[182] = t91;
		$[183] = t93;
	} else t93 = $[183];
	let t94;
	if ($[184] !== t57 || $[185] !== t84 || $[186] !== t93) {
		t94 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SpaceBetween, {
			style: t57,
			children: [t84, t93]
		});
		$[184] = t57;
		$[185] = t84;
		$[186] = t93;
		$[187] = t94;
	} else t94 = $[187];
	let t95;
	if ($[188] === Symbol.for("react.memo_cache_sentinel")) {
		t95 = { marginTop: 10 };
		$[188] = t95;
	} else t95 = $[188];
	let t96;
	if ($[189] !== adding || $[190] !== isCustom || $[191] !== onEditRule || $[192] !== schedule) {
		t96 = !adding && schedule.rule && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SpaceBetween, {
			style: {
				marginTop: 10,
				alignItems: "center"
			},
			children: [isCustom && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
				style: {
					color: theme.pageTextLight,
					fontSize: 13,
					textAlign: "right",
					width: 350
				},
				children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "This schedule has custom conditions and actions" })
			}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
				onPress: () => onEditRule(schedule.rule),
				children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Edit as rule" })
			})]
		});
		$[189] = adding;
		$[190] = isCustom;
		$[191] = onEditRule;
		$[192] = schedule;
		$[193] = t96;
	} else t96 = $[193];
	let t97;
	if ($[194] !== t96) {
		t97 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SpaceBetween, {
			gap: 5,
			direction: "vertical",
			align: "end",
			style: t95,
			children: t96
		});
		$[194] = t96;
		$[195] = t97;
	} else t97 = $[195];
	let t98;
	if ($[196] !== t10 || $[197] !== t41 || $[198] !== t44 || $[199] !== t55 || $[200] !== t94 || $[201] !== t97) {
		t98 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: t1,
			children: [
				t10,
				t41,
				t44,
				t55,
				t94,
				t97
			]
		});
		$[196] = t10;
		$[197] = t41;
		$[198] = t44;
		$[199] = t55;
		$[200] = t94;
		$[201] = t97;
		$[202] = t98;
	} else t98 = $[202];
	let t99;
	if ($[203] === Symbol.for("react.memo_cache_sentinel")) {
		t99 = {
			padding: 10,
			minHeight: "30vh",
			borderTop: `1px solid ${theme.tableBorder}`
		};
		$[203] = t99;
	} else t99 = $[203];
	let t100;
	if ($[204] !== adding || $[205] !== onLinkTransactions || $[206] !== onSwitchTransactions || $[207] !== onUnlinkTransactions || $[208] !== schedule || $[209] !== t || $[210] !== transactionsMode) {
		t100 = adding ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: {
				flexDirection: "row",
				padding: "5px 0"
			},
			children: [
				/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
					style: { color: theme.pageTextLight },
					children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "These transactions match this schedule:" })
				}),
				/* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, { style: { flex: 1 } }),
				/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
					style: { color: theme.pageTextLight },
					children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Select transactions to link on save" })
				})
			]
		}) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(View, {
			style: {
				flexDirection: "row",
				alignItems: "center"
			},
			children: [
				/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
					variant: "bare",
					style: {
						color: transactionsMode === "linked" ? theme.pageTextLink : theme.pageTextSubdued,
						marginRight: 10,
						fontSize: 14
					},
					onPress: () => onSwitchTransactions("linked"),
					children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Linked transactions" })
				}),
				" ",
				/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
					variant: "bare",
					style: {
						color: transactionsMode === "matched" ? theme.pageTextLink : theme.pageTextSubdued,
						fontSize: 14
					},
					onPress: () => onSwitchTransactions("matched"),
					children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trans, { children: "Find matching transactions" })
				}),
				/* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, { style: { flex: 1 } }),
				/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectedItemsButton, {
					id: "transactions",
					name: (count) => t("{{count}} transactions", { count }),
					items: transactionsMode === "linked" ? [{
						name: "unlink",
						text: t("Unlink from schedule")
					}] : [{
						name: "link",
						text: t("Link to schedule")
					}],
					onSelect: (name, ids) => {
						bb143: switch (name) {
							case "link":
								onLinkTransactions(ids, schedule.id);
								break bb143;
							case "unlink":
								onUnlinkTransactions(ids);
								break bb143;
							default:
						}
					}
				})
			]
		});
		$[204] = adding;
		$[205] = onLinkTransactions;
		$[206] = onSwitchTransactions;
		$[207] = onUnlinkTransactions;
		$[208] = schedule;
		$[209] = t;
		$[210] = transactionsMode;
		$[211] = t100;
	} else t100 = $[211];
	let t101;
	if ($[212] !== error || $[213] !== transactionsMode) {
		t101 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NoTransactionsMessage, {
			error,
			transactionsMode
		});
		$[212] = error;
		$[213] = transactionsMode;
		$[214] = t101;
	} else t101 = $[214];
	let t102;
	let t103;
	if ($[215] === Symbol.for("react.memo_cache_sentinel")) {
		t102 = [
			"date",
			"payee",
			"notes",
			"amount"
		];
		t103 = {
			...styles.tableContainer,
			marginTop: 5,
			maxHeight: 200
		};
		$[215] = t102;
		$[216] = t103;
	} else {
		t102 = $[215];
		t103 = $[216];
	}
	let t104;
	if ($[217] !== t101 || $[218] !== transactions) {
		t104 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SimpleTransactionsTable, {
			renderEmpty: t101,
			transactions,
			fields: t102,
			style: t103
		});
		$[217] = t101;
		$[218] = transactions;
		$[219] = t104;
	} else t104 = $[219];
	let t105;
	if ($[220] !== selectedInst || $[221] !== t100 || $[222] !== t104) {
		t105 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t99,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SelectedProvider, {
				instance: selectedInst,
				children: [t100, t104]
			})
		});
		$[220] = selectedInst;
		$[221] = t100;
		$[222] = t104;
		$[223] = t105;
	} else t105 = $[223];
	let t106;
	if ($[224] !== error) {
		t106 = error && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
			style: {
				color: theme.errorText,
				marginTop: 10
			},
			children: error
		});
		$[224] = error;
		$[225] = t106;
	} else t106 = $[225];
	let t107;
	if ($[226] !== t105 || $[227] !== t106 || $[228] !== t98) {
		t107 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
			t98,
			t105,
			t106
		] });
		$[226] = t105;
		$[227] = t106;
		$[228] = t98;
		$[229] = t107;
	} else t107 = $[229];
	return t107;
}
function NoTransactionsMessage(props) {
	const $ = (0, import_compiler_runtime.c)(7);
	const { t } = useTranslation();
	let t0;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t0 = {
			padding: 20,
			color: theme.pageTextLight,
			textAlign: "center"
		};
		$[0] = t0;
	} else t0 = $[0];
	let t1;
	if ($[1] !== props.error || $[2] !== props.transactionsMode || $[3] !== t) {
		t1 = props.error ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
			style: { color: theme.errorText },
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Trans, { children: ["Could not search: ", { errorReason: props.error }] })
		}) : props.transactionsMode === "matched" ? t("No matching transactions") : t("No linked transactions");
		$[1] = props.error;
		$[2] = props.transactionsMode;
		$[3] = t;
		$[4] = t1;
	} else t1 = $[4];
	let t2;
	if ($[5] !== t1) {
		t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(View, {
			style: t0,
			children: t1
		});
		$[5] = t1;
		$[6] = t2;
	} else t2 = $[6];
	return t2;
}
//#endregion
export { useOnBudgetAccounts as a, MobileBankSyncAccountEditPage as c, useUrlParam as d, $72e60046c03fbe42$export$a7bfbda1311ca015 as f, updateScheduleConditions as i, EditSyncAccount as l, CustomUpcomingLength as n, useOffBudgetAccounts as o, $72e60046c03fbe42$export$e96fc9a8407faa6b as p, useScheduleEdit as r, Label as s, ScheduleEditForm as t, LabeledCheckbox as u };

//# sourceMappingURL=ScheduleEditForm.DVZwyX6V.chunk.js.map