import { t as e } from "./dist-CTlQcJNK.js";
import * as t from "react";
import { jsx as n } from "react/jsx-runtime";
//#region node_modules/@radix-ui/react-slot/dist/index.mjs
var r = Symbol.for("react.lazy"), i = t.use;
function a(e) {
	return typeof e == "object" && !!e && "then" in e;
}
function o(e) {
	return typeof e == "object" && !!e && "$$typeof" in e && e.$$typeof === r && "_payload" in e && a(e._payload);
}
/* @__NO_SIDE_EFFECTS__ */
function s(e) {
	let r = /* @__PURE__ */ l(e), a = t.forwardRef((e, a) => {
		let { children: s, ...c } = e;
		o(s) && typeof i == "function" && (s = i(s._payload));
		let l = t.Children.toArray(s), u = l.find(d);
		if (u) {
			let e = u.props.children, i = l.map((n) => n === u ? t.Children.count(e) > 1 ? t.Children.only(null) : t.isValidElement(e) ? e.props.children : null : n);
			return /* @__PURE__ */ n(r, {
				...c,
				ref: a,
				children: t.isValidElement(e) ? t.cloneElement(e, void 0, i) : null
			});
		}
		return /* @__PURE__ */ n(r, {
			...c,
			ref: a,
			children: s
		});
	});
	return a.displayName = `${e}.Slot`, a;
}
var c = /* @__PURE__ */ s("Slot");
/* @__NO_SIDE_EFFECTS__ */
function l(n) {
	let r = t.forwardRef((n, r) => {
		let { children: a, ...s } = n;
		if (o(a) && typeof i == "function" && (a = i(a._payload)), t.isValidElement(a)) {
			let n = p(a), i = f(s, a.props);
			return a.type !== t.Fragment && (i.ref = r ? e(r, n) : n), t.cloneElement(a, i);
		}
		return t.Children.count(a) > 1 ? t.Children.only(null) : null;
	});
	return r.displayName = `${n}.SlotClone`, r;
}
var u = Symbol("radix.slottable");
function d(e) {
	return t.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === u;
}
function f(e, t) {
	let n = { ...t };
	for (let r in t) {
		let i = e[r], a = t[r];
		/^on[A-Z]/.test(r) ? i && a ? n[r] = (...e) => {
			let t = a(...e);
			return i(...e), t;
		} : i && (n[r] = i) : r === "style" ? n[r] = {
			...i,
			...a
		} : r === "className" && (n[r] = [i, a].filter(Boolean).join(" "));
	}
	return {
		...e,
		...n
	};
}
function p(e) {
	let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
	return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
}
//#endregion
export { s as n, c as t };

//# sourceMappingURL=dist-D0fg6pif.js.map