//#region src/internal/utils/events.ts
function e(e) {
	e?.preventDefault(), e?.stopPropagation();
}
function t(e, t, n = {}) {
	let r = new MutationObserver((e) => {
		for (let r of e) r.type === "childList" && t(r), n.attributes && r.type === "attributes" && t(r);
	});
	return r.observe(e, {
		childList: !0,
		...n
	}), r;
}
function n(e, t) {
	let n = !0;
	return (...r) => {
		n && (e(...r), n = !1, setTimeout(() => n = !0, t));
	};
}
function r(e, t = 0) {
	let n;
	return (...r) => {
		/* istanbul ignore next */
		clearTimeout(n), n = setTimeout(() => {
			e(...r);
		}, t);
	};
}
//#endregion
export { r as debounce, t as onChildListMutation, e as stopEvent, n as throttle };

//# sourceMappingURL=events.js.map