//#region node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
var e = [
	"top",
	"right",
	"bottom",
	"left"
], t = ["start", "end"], n = /*#__PURE__*/ e.reduce((e, n) => e.concat(n, n + "-" + t[0], n + "-" + t[1]), []), r = Math.min, i = Math.max, a = Math.round, o = Math.floor, s = (e) => ({
	x: e,
	y: e
}), c = {
	left: "right",
	right: "left",
	bottom: "top",
	top: "bottom"
};
function l(e, t, n) {
	return i(e, r(t, n));
}
function u(e, t) {
	return typeof e == "function" ? e(t) : e;
}
function d(e) {
	return e.split("-")[0];
}
function f(e) {
	return e.split("-")[1];
}
function p(e) {
	return e === "x" ? "y" : "x";
}
function m(e) {
	return e === "y" ? "height" : "width";
}
function h(e) {
	let t = e[0];
	return t === "t" || t === "b" ? "y" : "x";
}
function g(e) {
	return p(h(e));
}
function _(e, t, n) {
	n === void 0 && (n = !1);
	let r = f(e), i = g(e), a = m(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
	return t.reference[a] > t.floating[a] && (o = E(o)), [o, E(o)];
}
function v(e) {
	let t = E(e);
	return [
		y(e),
		t,
		y(t)
	];
}
function y(e) {
	return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
}
var b = ["left", "right"], x = ["right", "left"], S = ["top", "bottom"], C = ["bottom", "top"];
function w(e, t, n) {
	switch (e) {
		case "top":
		case "bottom": return n ? t ? x : b : t ? b : x;
		case "left":
		case "right": return t ? S : C;
		default: return [];
	}
}
function T(e, t, n, r) {
	let i = f(e), a = w(d(e), n === "start", r);
	return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(y)))), a;
}
function E(e) {
	let t = d(e);
	return c[t] + e.slice(t.length);
}
function D(e) {
	return {
		top: 0,
		right: 0,
		bottom: 0,
		left: 0,
		...e
	};
}
function O(e) {
	return typeof e == "number" ? {
		top: e,
		right: e,
		bottom: e,
		left: e
	} : D(e);
}
function k(e) {
	let { x: t, y: n, width: r, height: i } = e;
	return {
		width: r,
		height: i,
		top: n,
		left: t,
		right: t + r,
		bottom: n + i,
		x: t,
		y: n
	};
}
//#endregion
//#region node_modules/@floating-ui/core/dist/floating-ui.core.mjs
function A(e, t, n) {
	let { reference: r, floating: i } = e, a = h(t), o = g(t), s = m(o), c = d(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, p = r.y + r.height / 2 - i.height / 2, _ = r[s] / 2 - i[s] / 2, v;
	switch (c) {
		case "top":
			v = {
				x: u,
				y: r.y - i.height
			};
			break;
		case "bottom":
			v = {
				x: u,
				y: r.y + r.height
			};
			break;
		case "right":
			v = {
				x: r.x + r.width,
				y: p
			};
			break;
		case "left":
			v = {
				x: r.x - i.width,
				y: p
			};
			break;
		default: v = {
			x: r.x,
			y: r.y
		};
	}
	switch (f(t)) {
		case "start":
			v[o] -= _ * (n && l ? -1 : 1);
			break;
		case "end":
			v[o] += _ * (n && l ? -1 : 1);
			break;
	}
	return v;
}
async function j(e, t) {
	t === void 0 && (t = {});
	let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: d = "floating", altBoundary: f = !1, padding: p = 0 } = u(t, e), m = O(p), h = o[f ? d === "floating" ? "reference" : "floating" : d], g = k(await i.getClippingRect({
		element: await (i.isElement == null ? void 0 : i.isElement(h)) ?? !0 ? h : h.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
		boundary: c,
		rootBoundary: l,
		strategy: s
	})), _ = d === "floating" ? {
		x: n,
		y: r,
		width: a.floating.width,
		height: a.floating.height
	} : a.reference, v = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), y = await (i.isElement == null ? void 0 : i.isElement(v)) && await (i.getScale == null ? void 0 : i.getScale(v)) || {
		x: 1,
		y: 1
	}, b = k(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
		elements: o,
		rect: _,
		offsetParent: v,
		strategy: s
	}) : _);
	return {
		top: (g.top - b.top + m.top) / y.y,
		bottom: (b.bottom - g.bottom + m.bottom) / y.y,
		left: (g.left - b.left + m.left) / y.x,
		right: (b.right - g.right + m.right) / y.x
	};
}
var M = 50, ee = async (e, t, n) => {
	let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
		...o,
		detectOverflow: j
	}, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
		reference: e,
		floating: t,
		strategy: i
	}), { x: u, y: d } = A(l, r, c), f = r, p = 0, m = {};
	for (let n = 0; n < a.length; n++) {
		let h = a[n];
		if (!h) continue;
		let { name: g, fn: _ } = h, { x: v, y, data: b, reset: x } = await _({
			x: u,
			y: d,
			initialPlacement: r,
			placement: f,
			strategy: i,
			middlewareData: m,
			rects: l,
			platform: s,
			elements: {
				reference: e,
				floating: t
			}
		});
		u = v ?? u, d = y ?? d, m[g] = {
			...m[g],
			...b
		}, x && p < M && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
			reference: e,
			floating: t,
			strategy: i
		}) : x.rects), {x: u, y: d} = A(l, f, c)), n = -1);
	}
	return {
		x: u,
		y: d,
		placement: f,
		strategy: i,
		middlewareData: m
	};
};
function te(e, t, n) {
	return (e ? [...n.filter((t) => f(t) === e), ...n.filter((t) => f(t) !== e)] : n.filter((e) => d(e) === e)).filter((n) => e ? f(n) === e || (t ? y(n) !== n : !1) : !0);
}
var ne = function(e) {
	return e === void 0 && (e = {}), {
		name: "autoPlacement",
		options: e,
		async fn(t) {
			let { rects: r, middlewareData: i, placement: a, platform: o, elements: s } = t, { crossAxis: c = !1, alignment: l, allowedPlacements: p = n, autoAlignment: m = !0, ...h } = u(e, t), g = l !== void 0 || p === n ? te(l || null, m, p) : p, v = await o.detectOverflow(t, h), y = i.autoPlacement?.index || 0, b = g[y];
			if (b == null) return {};
			let x = _(b, r, await (o.isRTL == null ? void 0 : o.isRTL(s.floating)));
			if (a !== b) return { reset: { placement: g[0] } };
			let S = [
				v[d(b)],
				v[x[0]],
				v[x[1]]
			], C = [...i.autoPlacement?.overflows || [], {
				placement: b,
				overflows: S
			}], w = g[y + 1];
			if (w) return {
				data: {
					index: y + 1,
					overflows: C
				},
				reset: { placement: w }
			};
			let T = C.map((e) => {
				let t = f(e.placement);
				return [
					e.placement,
					t && c ? e.overflows.slice(0, 2).reduce((e, t) => e + t, 0) : e.overflows[0],
					e.overflows
				];
			}).sort((e, t) => e[1] - t[1]), E = T.filter((e) => e[2].slice(0, f(e[0]) ? 2 : 3).every((e) => e <= 0))[0]?.[0] || T[0][0];
			return E === a ? {} : {
				data: {
					index: y + 1,
					overflows: C
				},
				reset: { placement: E }
			};
		}
	};
}, re = function(e) {
	return e === void 0 && (e = {}), {
		name: "flip",
		options: e,
		async fn(t) {
			var n;
			let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: f = !0, fallbackPlacements: p, fallbackStrategy: m = "bestFit", fallbackAxisSideDirection: g = "none", flipAlignment: y = !0, ...b } = u(e, t);
			if ((n = i.arrow) != null && n.alignmentOffset) return {};
			let x = d(r), S = h(o), C = d(o) === o, w = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), D = p || (C || !y ? [E(o)] : v(o)), O = g !== "none";
			!p && O && D.push(...T(o, y, g, w));
			let k = [o, ...D], A = await s.detectOverflow(t, b), j = [], M = i.flip?.overflows || [];
			if (l && j.push(A[x]), f) {
				let e = _(r, a, w);
				j.push(A[e[0]], A[e[1]]);
			}
			if (M = [...M, {
				placement: r,
				overflows: j
			}], !j.every((e) => e <= 0)) {
				let e = (i.flip?.index || 0) + 1, t = k[e];
				if (t && (!(f === "alignment" && S !== h(t)) || M.every((e) => h(e.placement) === S ? e.overflows[0] > 0 : !0))) return {
					data: {
						index: e,
						overflows: M
					},
					reset: { placement: t }
				};
				let n = M.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0]?.placement;
				if (!n) switch (m) {
					case "bestFit": {
						let e = M.filter((e) => {
							if (O) {
								let t = h(e.placement);
								return t === S || t === "y";
							}
							return !0;
						}).map((e) => [e.placement, e.overflows.filter((e) => e > 0).reduce((e, t) => e + t, 0)]).sort((e, t) => e[1] - t[1])[0]?.[0];
						e && (n = e);
						break;
					}
					case "initialPlacement":
						n = o;
						break;
				}
				if (r !== n) return { reset: { placement: n } };
			}
			return {};
		}
	};
}, ie = /*#__PURE__*/ new Set(["left", "top"]);
async function ae(e, t) {
	let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = d(n), s = f(n), c = h(n) === "y", l = ie.has(o) ? -1 : 1, p = a && c ? -1 : 1, m = u(t, e), { mainAxis: g, crossAxis: _, alignmentAxis: v } = typeof m == "number" ? {
		mainAxis: m,
		crossAxis: 0,
		alignmentAxis: null
	} : {
		mainAxis: m.mainAxis || 0,
		crossAxis: m.crossAxis || 0,
		alignmentAxis: m.alignmentAxis
	};
	return s && typeof v == "number" && (_ = s === "end" ? v * -1 : v), c ? {
		x: _ * p,
		y: g * l
	} : {
		x: g * l,
		y: _ * p
	};
}
var oe = function(e) {
	return e === void 0 && (e = 0), {
		name: "offset",
		options: e,
		async fn(t) {
			var n;
			let { x: r, y: i, placement: a, middlewareData: o } = t, s = await ae(t, e);
			return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
				x: r + s.x,
				y: i + s.y,
				data: {
					...s,
					placement: a
				}
			};
		}
	};
}, se = function(e) {
	return e === void 0 && (e = {}), {
		name: "shift",
		options: e,
		async fn(t) {
			let { x: n, y: r, placement: i, platform: a } = t, { mainAxis: o = !0, crossAxis: s = !1, limiter: c = { fn: (e) => {
				let { x: t, y: n } = e;
				return {
					x: t,
					y: n
				};
			} }, ...f } = u(e, t), m = {
				x: n,
				y: r
			}, g = await a.detectOverflow(t, f), _ = h(d(i)), v = p(_), y = m[v], b = m[_];
			if (o) {
				let e = v === "y" ? "top" : "left", t = v === "y" ? "bottom" : "right", n = y + g[e], r = y - g[t];
				y = l(n, y, r);
			}
			if (s) {
				let e = _ === "y" ? "top" : "left", t = _ === "y" ? "bottom" : "right", n = b + g[e], r = b - g[t];
				b = l(n, b, r);
			}
			let x = c.fn({
				...t,
				[v]: y,
				[_]: b
			});
			return {
				...x,
				data: {
					x: x.x - n,
					y: x.y - r,
					enabled: {
						[v]: o,
						[_]: s
					}
				}
			};
		}
	};
};
//#endregion
//#region node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
function N() {
	return typeof window < "u";
}
function P(e) {
	return ce(e) ? (e.nodeName || "").toLowerCase() : "#document";
}
function F(e) {
	var t;
	return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
}
function I(e) {
	return ((ce(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
}
function ce(e) {
	return N() ? e instanceof Node || e instanceof F(e).Node : !1;
}
function L(e) {
	return N() ? e instanceof Element || e instanceof F(e).Element : !1;
}
function R(e) {
	return N() ? e instanceof HTMLElement || e instanceof F(e).HTMLElement : !1;
}
function le(e) {
	return !N() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof F(e).ShadowRoot;
}
function z(e) {
	let { overflow: t, overflowX: n, overflowY: r, display: i } = G(e);
	return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
}
function ue(e) {
	return /^(table|td|th)$/.test(P(e));
}
function B(e) {
	try {
		if (e.matches(":popover-open")) return !0;
	} catch {}
	try {
		return e.matches(":modal");
	} catch {
		return !1;
	}
}
var de = /transform|translate|scale|rotate|perspective|filter/, fe = /paint|layout|strict|content/, V = (e) => !!e && e !== "none", pe;
function H(e) {
	let t = L(e) ? G(e) : e;
	return V(t.transform) || V(t.translate) || V(t.scale) || V(t.rotate) || V(t.perspective) || !U() && (V(t.backdropFilter) || V(t.filter)) || de.test(t.willChange || "") || fe.test(t.contain || "");
}
function me(e) {
	let t = q(e);
	for (; R(t) && !W(t);) {
		if (H(t)) return t;
		if (B(t)) return null;
		t = q(t);
	}
	return null;
}
function U() {
	return pe ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), pe;
}
function W(e) {
	return /^(html|body|#document)$/.test(P(e));
}
function G(e) {
	return F(e).getComputedStyle(e);
}
function K(e) {
	return L(e) ? {
		scrollLeft: e.scrollLeft,
		scrollTop: e.scrollTop
	} : {
		scrollLeft: e.scrollX,
		scrollTop: e.scrollY
	};
}
function q(e) {
	if (P(e) === "html") return e;
	let t = e.assignedSlot || e.parentNode || le(e) && e.host || I(e);
	return le(t) ? t.host : t;
}
function he(e) {
	let t = q(e);
	return W(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : R(t) && z(t) ? t : he(t);
}
function J(e, t, n) {
	t === void 0 && (t = []), n === void 0 && (n = !0);
	let r = he(e), i = r === e.ownerDocument?.body, a = F(r);
	if (i) {
		let e = Y(a);
		return t.concat(a, a.visualViewport || [], z(r) ? r : [], e && n ? J(e) : []);
	} else return t.concat(r, J(r, [], n));
}
function Y(e) {
	return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
}
//#endregion
//#region node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
function ge(e) {
	let t = G(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = R(e), o = i ? e.offsetWidth : n, s = i ? e.offsetHeight : r, c = a(n) !== o || a(r) !== s;
	return c && (n = o, r = s), {
		width: n,
		height: r,
		$: c
	};
}
function X(e) {
	return L(e) ? e : e.contextElement;
}
function Z(e) {
	let t = X(e);
	if (!R(t)) return s(1);
	let n = t.getBoundingClientRect(), { width: r, height: i, $: o } = ge(t), c = (o ? a(n.width) : n.width) / r, l = (o ? a(n.height) : n.height) / i;
	return (!c || !Number.isFinite(c)) && (c = 1), (!l || !Number.isFinite(l)) && (l = 1), {
		x: c,
		y: l
	};
}
var _e = /*#__PURE__*/ s(0);
function ve(e) {
	let t = F(e);
	return !U() || !t.visualViewport ? _e : {
		x: t.visualViewport.offsetLeft,
		y: t.visualViewport.offsetTop
	};
}
function ye(e, t, n) {
	return t === void 0 && (t = !1), !n || t && n !== F(e) ? !1 : t;
}
function Q(e, t, n, r) {
	t === void 0 && (t = !1), n === void 0 && (n = !1);
	let i = e.getBoundingClientRect(), a = X(e), o = s(1);
	t && (r ? L(r) && (o = Z(r)) : o = Z(e));
	let c = ye(a, n, r) ? ve(a) : s(0), l = (i.left + c.x) / o.x, u = (i.top + c.y) / o.y, d = i.width / o.x, f = i.height / o.y;
	if (a) {
		let e = F(a), t = r && L(r) ? F(r) : r, n = e, i = Y(n);
		for (; i && r && t !== n;) {
			let e = Z(i), t = i.getBoundingClientRect(), r = G(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
			l *= e.x, u *= e.y, d *= e.x, f *= e.y, l += a, u += o, n = F(i), i = Y(n);
		}
	}
	return k({
		width: d,
		height: f,
		x: l,
		y: u
	});
}
function $(e, t) {
	let n = K(e).scrollLeft;
	return t ? t.left + n : Q(I(e)).left + n;
}
function be(e, t) {
	let n = e.getBoundingClientRect();
	return {
		x: n.left + t.scrollLeft - $(e, n),
		y: n.top + t.scrollTop
	};
}
function xe(e) {
	let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = I(r), c = t ? B(t.floating) : !1;
	if (r === o || c && a) return n;
	let l = {
		scrollLeft: 0,
		scrollTop: 0
	}, u = s(1), d = s(0), f = R(r);
	if ((f || !f && !a) && ((P(r) !== "body" || z(o)) && (l = K(r)), f)) {
		let e = Q(r);
		u = Z(r), d.x = e.x + r.clientLeft, d.y = e.y + r.clientTop;
	}
	let p = o && !f && !a ? be(o, l) : s(0);
	return {
		width: n.width * u.x,
		height: n.height * u.y,
		x: n.x * u.x - l.scrollLeft * u.x + d.x + p.x,
		y: n.y * u.y - l.scrollTop * u.y + d.y + p.y
	};
}
function Se(e) {
	return Array.from(e.getClientRects());
}
function Ce(e) {
	let t = I(e), n = K(e), r = e.ownerDocument.body, a = i(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), o = i(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight), s = -n.scrollLeft + $(e), c = -n.scrollTop;
	return G(r).direction === "rtl" && (s += i(t.clientWidth, r.clientWidth) - a), {
		width: a,
		height: o,
		x: s,
		y: c
	};
}
var we = 25;
function Te(e, t) {
	let n = F(e), r = I(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
	if (i) {
		a = i.width, o = i.height;
		let e = U();
		(!e || e && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
	}
	let l = $(r);
	if (l <= 0) {
		let e = r.ownerDocument, t = e.body, n = getComputedStyle(t), i = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, o = Math.abs(r.clientWidth - t.clientWidth - i);
		o <= we && (a -= o);
	} else l <= we && (a += l);
	return {
		width: a,
		height: o,
		x: s,
		y: c
	};
}
function Ee(e, t) {
	let n = Q(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = R(e) ? Z(e) : s(1);
	return {
		width: e.clientWidth * a.x,
		height: e.clientHeight * a.y,
		x: i * a.x,
		y: r * a.y
	};
}
function De(e, t, n) {
	let r;
	if (t === "viewport") r = Te(e, n);
	else if (t === "document") r = Ce(I(e));
	else if (L(t)) r = Ee(t, n);
	else {
		let n = ve(e);
		r = {
			x: t.x - n.x,
			y: t.y - n.y,
			width: t.width,
			height: t.height
		};
	}
	return k(r);
}
function Oe(e, t) {
	let n = q(e);
	return n === t || !L(n) || W(n) ? !1 : G(n).position === "fixed" || Oe(n, t);
}
function ke(e, t) {
	let n = t.get(e);
	if (n) return n;
	let r = J(e, [], !1).filter((e) => L(e) && P(e) !== "body"), i = null, a = G(e).position === "fixed", o = a ? q(e) : e;
	for (; L(o) && !W(o);) {
		let t = G(o), n = H(o);
		!n && t.position === "fixed" && (i = null), (a ? !n && !i : !n && t.position === "static" && i && (i.position === "absolute" || i.position === "fixed") || z(o) && !n && Oe(e, o)) ? r = r.filter((e) => e !== o) : i = t, o = q(o);
	}
	return t.set(e, r), r;
}
function Ae(e) {
	let { element: t, boundary: n, rootBoundary: a, strategy: o } = e, s = [...n === "clippingAncestors" ? B(t) ? [] : ke(t, this._c) : [].concat(n), a], c = De(t, s[0], o), l = c.top, u = c.right, d = c.bottom, f = c.left;
	for (let e = 1; e < s.length; e++) {
		let n = De(t, s[e], o);
		l = i(n.top, l), u = r(n.right, u), d = r(n.bottom, d), f = i(n.left, f);
	}
	return {
		width: u - f,
		height: d - l,
		x: f,
		y: l
	};
}
function je(e) {
	let { width: t, height: n } = ge(e);
	return {
		width: t,
		height: n
	};
}
function Me(e, t, n) {
	let r = R(t), i = I(t), a = n === "fixed", o = Q(e, !0, a, t), c = {
		scrollLeft: 0,
		scrollTop: 0
	}, l = s(0);
	function u() {
		l.x = $(i);
	}
	if (r || !r && !a) if ((P(t) !== "body" || z(i)) && (c = K(t)), r) {
		let e = Q(t, !0, a, t);
		l.x = e.x + t.clientLeft, l.y = e.y + t.clientTop;
	} else i && u();
	a && !r && i && u();
	let d = i && !r && !a ? be(i, c) : s(0);
	return {
		x: o.left + c.scrollLeft - l.x - d.x,
		y: o.top + c.scrollTop - l.y - d.y,
		width: o.width,
		height: o.height
	};
}
function Ne(e) {
	return G(e).position === "static";
}
function Pe(e, t) {
	if (!R(e) || G(e).position === "fixed") return null;
	if (t) return t(e);
	let n = e.offsetParent;
	return I(e) === n && (n = n.ownerDocument.body), n;
}
function Fe(e, t) {
	let n = F(e);
	if (B(e)) return n;
	if (!R(e)) {
		let t = q(e);
		for (; t && !W(t);) {
			if (L(t) && !Ne(t)) return t;
			t = q(t);
		}
		return n;
	}
	let r = Pe(e, t);
	for (; r && ue(r) && Ne(r);) r = Pe(r, t);
	return r && W(r) && Ne(r) && !H(r) ? n : r || me(e) || n;
}
var Ie = async function(e) {
	let t = this.getOffsetParent || Fe, n = this.getDimensions, r = await n(e.floating);
	return {
		reference: Me(e.reference, await t(e.floating), e.strategy),
		floating: {
			x: 0,
			y: 0,
			width: r.width,
			height: r.height
		}
	};
};
function Le(e) {
	return G(e).direction === "rtl";
}
var Re = {
	convertOffsetParentRelativeRectToViewportRelativeRect: xe,
	getDocumentElement: I,
	getClippingRect: Ae,
	getOffsetParent: Fe,
	getElementRects: Ie,
	getClientRects: Se,
	getDimensions: je,
	getScale: Z,
	isElement: L,
	isRTL: Le
};
function ze(e, t) {
	return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
}
function Be(e, t) {
	let n = null, a, s = I(e);
	function c() {
		var e;
		clearTimeout(a), (e = n) == null || e.disconnect(), n = null;
	}
	function l(u, d) {
		u === void 0 && (u = !1), d === void 0 && (d = 1), c();
		let f = e.getBoundingClientRect(), { left: p, top: m, width: h, height: g } = f;
		if (u || t(), !h || !g) return;
		let _ = o(m), v = o(s.clientWidth - (p + h)), y = o(s.clientHeight - (m + g)), b = o(p), x = {
			rootMargin: -_ + "px " + -v + "px " + -y + "px " + -b + "px",
			threshold: i(0, r(1, d)) || 1
		}, S = !0;
		function C(t) {
			let n = t[0].intersectionRatio;
			if (n !== d) {
				if (!S) return l();
				n ? l(!1, n) : a = setTimeout(() => {
					l(!1, 1e-7);
				}, 1e3);
			}
			n === 1 && !ze(f, e.getBoundingClientRect()) && l(), S = !1;
		}
		try {
			n = new IntersectionObserver(C, {
				...x,
				root: s.ownerDocument
			});
		} catch {
			n = new IntersectionObserver(C, x);
		}
		n.observe(e);
	}
	return l(!0), c;
}
function Ve(e, t, n, r) {
	r === void 0 && (r = {});
	let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = X(e), u = i || a ? [...l ? J(l) : [], ...t ? J(t) : []] : [];
	u.forEach((e) => {
		i && e.addEventListener("scroll", n, { passive: !0 }), a && e.addEventListener("resize", n);
	});
	let d = l && s ? Be(l, n) : null, f = -1, p = null;
	o && (p = new ResizeObserver((e) => {
		let [r] = e;
		r && r.target === l && p && t && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
			var e;
			(e = p) == null || e.observe(t);
		})), n();
	}), l && !c && p.observe(l), t && p.observe(t));
	let m, h = c ? Q(e) : null;
	c && g();
	function g() {
		let t = Q(e);
		h && !ze(h, t) && n(), h = t, m = requestAnimationFrame(g);
	}
	return n(), () => {
		var e;
		u.forEach((e) => {
			i && e.removeEventListener("scroll", n), a && e.removeEventListener("resize", n);
		}), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
	};
}
var He = oe, Ue = ne, We = se, Ge = re, Ke = (e, t, n) => {
	let r = /* @__PURE__ */ new Map(), i = {
		platform: Re,
		...n
	}, a = {
		...i.platform,
		_c: r
	};
	return ee(e, t, {
		...i,
		platform: a
	});
};
//#endregion
export { He as a, ce as c, Ge as i, Ve as n, We as o, Ke as r, P as s, Ue as t };
