@prefecthq/prefect-design
Version:
A collection of low-level Vue components.
1,782 lines (1,781 loc) • 2.42 MB
JavaScript
import * as ch from "vue";
import { computed as M, ref as z, shallowRef as sv, watch as tt, getCurrentScope as _f, onScopeDispose as zl, shallowReadonly as xl, unref as y, defineComponent as W, toRefs as Mr, createBlock as G, openBlock as c, withCtx as N, renderSlot as I, withKeys as ui, onMounted as xt, createVNode as ne, mergeProps as oe, toHandlers as oE, normalizeProps as ve, guardReactiveProps as we, resolveDynamicComponent as Gr, nextTick as Ct, createCommentVNode as le, getCurrentInstance as po, toRef as pf, camelize as lv, watchSyncEffect as iE, withModifiers as xa, createTextVNode as Ne, withDirectives as ur, vShow as Ll, toDisplayString as ye, isRef as mf, normalizeStyle as Yr, toHandlerKey as sE, inject as Ui, provide as Zl, h as Vt, readonly as ql, watchEffect as pn, Teleport as Rd, useSlots as zr, createElementBlock as _, Fragment as Qe, renderList as Ye, markRaw as cv, onUnmounted as Zr, Comment as uv, cloneVNode as lE, reactive as Dr, mergeDefaults as dv, watchPostEffect as cE, effectScope as _v, customRef as uE, onBeforeUnmount as pv, onBeforeUpdate as dE, onUpdated as _E, useAttrs as h0, toValue as Vr, createElementVNode as d, resolveComponent as ht, Transition as v0, createStaticVNode as mi, normalizeClass as Oe, createSlots as mn, TransitionGroup as mv, vModelCheckbox as gv, vModelText as fl, vModelSelect as pE, mergeModels as E0, useModel as Ni, KeepAlive as mE, onErrorCaptured as gE, vModelRadio as fE, useCssVars as hE, createApp as vE } from "vue";
import { useRouter as fv, useRoute as hv } from "vue-router";
const EE = ["top", "right", "bottom", "left"], lo = Math.min, pa = Math.max, t0 = Math.round, Bd = Math.floor, Mi = (t) => ({
x: t,
y: t
}), bE = {
left: "right",
right: "left",
bottom: "top",
top: "bottom"
}, SE = {
start: "end",
end: "start"
};
function F2(t, n, a) {
return pa(t, lo(n, a));
}
function _i(t, n) {
return typeof t == "function" ? t(n) : t;
}
function pi(t) {
return t.split("-")[0];
}
function Wl(t) {
return t.split("-")[1];
}
function gf(t) {
return t === "x" ? "y" : "x";
}
function ff(t) {
return t === "y" ? "height" : "width";
}
function Di(t) {
return ["top", "bottom"].includes(pi(t)) ? "y" : "x";
}
function hf(t) {
return gf(Di(t));
}
function wE(t, n, a) {
a === void 0 && (a = !1);
const i = Wl(t), s = hf(t), u = ff(s);
let p = s === "x" ? i === (a ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
return n.reference[u] > n.floating[u] && (p = n0(p)), [p, n0(p)];
}
function yE(t) {
const n = n0(t);
return [U2(t), n, U2(n)];
}
function U2(t) {
return t.replace(/start|end/g, (n) => SE[n]);
}
function TE(t, n, a) {
const i = ["left", "right"], s = ["right", "left"], u = ["top", "bottom"], p = ["bottom", "top"];
switch (t) {
case "top":
case "bottom":
return a ? n ? s : i : n ? i : s;
case "left":
case "right":
return n ? u : p;
default:
return [];
}
}
function CE(t, n, a, i) {
const s = Wl(t);
let u = TE(pi(t), a === "start", i);
return s && (u = u.map((p) => p + "-" + s), n && (u = u.concat(u.map(U2)))), u;
}
function n0(t) {
return t.replace(/left|right|bottom|top/g, (n) => bE[n]);
}
function xE(t) {
return {
top: 0,
right: 0,
bottom: 0,
left: 0,
...t
};
}
function vv(t) {
return typeof t != "number" ? xE(t) : {
top: t,
right: t,
bottom: t,
left: t
};
}
function r0(t) {
const {
x: n,
y: a,
width: i,
height: s
} = t;
return {
width: i,
height: s,
top: a,
left: n,
right: n + i,
bottom: a + s,
x: n,
y: a
};
}
function uh(t, n, a) {
let {
reference: i,
floating: s
} = t;
const u = Di(n), p = hf(n), g = ff(p), E = pi(n), h = u === "y", f = i.x + i.width / 2 - s.width / 2, b = i.y + i.height / 2 - s.height / 2, w = i[g] / 2 - s[g] / 2;
let x;
switch (E) {
case "top":
x = {
x: f,
y: i.y - s.height
};
break;
case "bottom":
x = {
x: f,
y: i.y + i.height
};
break;
case "right":
x = {
x: i.x + i.width,
y: b
};
break;
case "left":
x = {
x: i.x - s.width,
y: b
};
break;
default:
x = {
x: i.x,
y: i.y
};
}
switch (Wl(n)) {
case "start":
x[p] -= w * (a && h ? -1 : 1);
break;
case "end":
x[p] += w * (a && h ? -1 : 1);
break;
}
return x;
}
const AE = async (t, n, a) => {
const {
placement: i = "bottom",
strategy: s = "absolute",
middleware: u = [],
platform: p
} = a, g = u.filter(Boolean), E = await (p.isRTL == null ? void 0 : p.isRTL(n));
let h = await p.getElementRects({
reference: t,
floating: n,
strategy: s
}), {
x: f,
y: b
} = uh(h, i, E), w = i, x = {}, A = 0;
for (let D = 0; D < g.length; D++) {
const {
name: L,
fn: $
} = g[D], {
x: q,
y: P,
data: k,
reset: U
} = await $({
x: f,
y: b,
initialPlacement: i,
placement: w,
strategy: s,
middlewareData: x,
rects: h,
platform: p,
elements: {
reference: t,
floating: n
}
});
f = q ?? f, b = P ?? b, x = {
...x,
[L]: {
...x[L],
...k
}
}, U && A <= 50 && (A++, typeof U == "object" && (U.placement && (w = U.placement), U.rects && (h = U.rects === !0 ? await p.getElementRects({
reference: t,
floating: n,
strategy: s
}) : U.rects), {
x: f,
y: b
} = uh(h, w, E)), D = -1);
}
return {
x: f,
y: b,
placement: w,
strategy: s,
middlewareData: x
};
};
async function yd(t, n) {
var a;
n === void 0 && (n = {});
const {
x: i,
y: s,
platform: u,
rects: p,
elements: g,
strategy: E
} = t, {
boundary: h = "clippingAncestors",
rootBoundary: f = "viewport",
elementContext: b = "floating",
altBoundary: w = !1,
padding: x = 0
} = _i(n, t), A = vv(x), L = g[w ? b === "floating" ? "reference" : "floating" : b], $ = r0(await u.getClippingRect({
element: (a = await (u.isElement == null ? void 0 : u.isElement(L))) == null || a ? L : L.contextElement || await (u.getDocumentElement == null ? void 0 : u.getDocumentElement(g.floating)),
boundary: h,
rootBoundary: f,
strategy: E
})), q = b === "floating" ? {
x: i,
y: s,
width: p.floating.width,
height: p.floating.height
} : p.reference, P = await (u.getOffsetParent == null ? void 0 : u.getOffsetParent(g.floating)), k = await (u.isElement == null ? void 0 : u.isElement(P)) ? await (u.getScale == null ? void 0 : u.getScale(P)) || {
x: 1,
y: 1
} : {
x: 1,
y: 1
}, U = r0(u.convertOffsetParentRelativeRectToViewportRelativeRect ? await u.convertOffsetParentRelativeRectToViewportRelativeRect({
elements: g,
rect: q,
offsetParent: P,
strategy: E
}) : q);
return {
top: ($.top - U.top + A.top) / k.y,
bottom: (U.bottom - $.bottom + A.bottom) / k.y,
left: ($.left - U.left + A.left) / k.x,
right: (U.right - $.right + A.right) / k.x
};
}
const RE = (t) => ({
name: "arrow",
options: t,
async fn(n) {
const {
x: a,
y: i,
placement: s,
rects: u,
platform: p,
elements: g,
middlewareData: E
} = n, {
element: h,
padding: f = 0
} = _i(t, n) || {};
if (h == null)
return {};
const b = vv(f), w = {
x: a,
y: i
}, x = hf(s), A = ff(x), D = await p.getDimensions(h), L = x === "y", $ = L ? "top" : "left", q = L ? "bottom" : "right", P = L ? "clientHeight" : "clientWidth", k = u.reference[A] + u.reference[x] - w[x] - u.floating[A], U = w[x] - u.reference[x], Z = await (p.getOffsetParent == null ? void 0 : p.getOffsetParent(h));
let ee = Z ? Z[P] : 0;
(!ee || !await (p.isElement == null ? void 0 : p.isElement(Z))) && (ee = g.floating[P] || u.floating[A]);
const X = k / 2 - U / 2, re = ee / 2 - D[A] / 2 - 1, Q = lo(b[$], re), ce = lo(b[q], re), me = Q, Se = ee - D[A] - ce, Le = ee / 2 - D[A] / 2 + X, qe = F2(me, Le, Se), _t = !E.arrow && Wl(s) != null && Le !== qe && u.reference[A] / 2 - (Le < me ? Q : ce) - D[A] / 2 < 0, ot = _t ? Le < me ? Le - me : Le - Se : 0;
return {
[x]: w[x] + ot,
data: {
[x]: qe,
centerOffset: Le - qe - ot,
..._t && {
alignmentOffset: ot
}
},
reset: _t
};
}
}), OE = function(t) {
return t === void 0 && (t = {}), {
name: "flip",
options: t,
async fn(n) {
var a, i;
const {
placement: s,
middlewareData: u,
rects: p,
initialPlacement: g,
platform: E,
elements: h
} = n, {
mainAxis: f = !0,
crossAxis: b = !0,
fallbackPlacements: w,
fallbackStrategy: x = "bestFit",
fallbackAxisSideDirection: A = "none",
flipAlignment: D = !0,
...L
} = _i(t, n);
if ((a = u.arrow) != null && a.alignmentOffset)
return {};
const $ = pi(s), q = Di(g), P = pi(g) === g, k = await (E.isRTL == null ? void 0 : E.isRTL(h.floating)), U = w || (P || !D ? [n0(g)] : yE(g)), Z = A !== "none";
!w && Z && U.push(...CE(g, D, A, k));
const ee = [g, ...U], X = await yd(n, L), re = [];
let Q = ((i = u.flip) == null ? void 0 : i.overflows) || [];
if (f && re.push(X[$]), b) {
const Le = wE(s, p, k);
re.push(X[Le[0]], X[Le[1]]);
}
if (Q = [...Q, {
placement: s,
overflows: re
}], !re.every((Le) => Le <= 0)) {
var ce, me;
const Le = (((ce = u.flip) == null ? void 0 : ce.index) || 0) + 1, qe = ee[Le];
if (qe)
return {
data: {
index: Le,
overflows: Q
},
reset: {
placement: qe
}
};
let _t = (me = Q.filter((ot) => ot.overflows[0] <= 0).sort((ot, st) => ot.overflows[1] - st.overflows[1])[0]) == null ? void 0 : me.placement;
if (!_t)
switch (x) {
case "bestFit": {
var Se;
const ot = (Se = Q.filter((st) => {
if (Z) {
const Me = Di(st.placement);
return Me === q || // Create a bias to the `y` side axis due to horizontal
// reading directions favoring greater width.
Me === "y";
}
return !0;
}).map((st) => [st.placement, st.overflows.filter((Me) => Me > 0).reduce((Me, je) => Me + je, 0)]).sort((st, Me) => st[1] - Me[1])[0]) == null ? void 0 : Se[0];
ot && (_t = ot);
break;
}
case "initialPlacement":
_t = g;
break;
}
if (s !== _t)
return {
reset: {
placement: _t
}
};
}
return {};
}
};
};
function dh(t, n) {
return {
top: t.top - n.height,
right: t.right - n.width,
bottom: t.bottom - n.height,
left: t.left - n.width
};
}
function _h(t) {
return EE.some((n) => t[n] >= 0);
}
const IE = function(t) {
return t === void 0 && (t = {}), {
name: "hide",
options: t,
async fn(n) {
const {
rects: a
} = n, {
strategy: i = "referenceHidden",
...s
} = _i(t, n);
switch (i) {
case "referenceHidden": {
const u = await yd(n, {
...s,
elementContext: "reference"
}), p = dh(u, a.reference);
return {
data: {
referenceHiddenOffsets: p,
referenceHidden: _h(p)
}
};
}
case "escaped": {
const u = await yd(n, {
...s,
altBoundary: !0
}), p = dh(u, a.floating);
return {
data: {
escapedOffsets: p,
escaped: _h(p)
}
};
}
default:
return {};
}
}
};
};
async function NE(t, n) {
const {
placement: a,
platform: i,
elements: s
} = t, u = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), p = pi(a), g = Wl(a), E = Di(a) === "y", h = ["left", "top"].includes(p) ? -1 : 1, f = u && E ? -1 : 1, b = _i(n, t);
let {
mainAxis: w,
crossAxis: x,
alignmentAxis: A
} = typeof b == "number" ? {
mainAxis: b,
crossAxis: 0,
alignmentAxis: null
} : {
mainAxis: 0,
crossAxis: 0,
alignmentAxis: null,
...b
};
return g && typeof A == "number" && (x = g === "end" ? A * -1 : A), E ? {
x: x * f,
y: w * h
} : {
x: w * h,
y: x * f
};
}
const ME = function(t) {
return t === void 0 && (t = 0), {
name: "offset",
options: t,
async fn(n) {
var a, i;
const {
x: s,
y: u,
placement: p,
middlewareData: g
} = n, E = await NE(n, t);
return p === ((a = g.offset) == null ? void 0 : a.placement) && (i = g.arrow) != null && i.alignmentOffset ? {} : {
x: s + E.x,
y: u + E.y,
data: {
...E,
placement: p
}
};
}
};
}, DE = function(t) {
return t === void 0 && (t = {}), {
name: "shift",
options: t,
async fn(n) {
const {
x: a,
y: i,
placement: s
} = n, {
mainAxis: u = !0,
crossAxis: p = !1,
limiter: g = {
fn: (L) => {
let {
x: $,
y: q
} = L;
return {
x: $,
y: q
};
}
},
...E
} = _i(t, n), h = {
x: a,
y: i
}, f = await yd(n, E), b = Di(pi(s)), w = gf(b);
let x = h[w], A = h[b];
if (u) {
const L = w === "y" ? "top" : "left", $ = w === "y" ? "bottom" : "right", q = x + f[L], P = x - f[$];
x = F2(q, x, P);
}
if (p) {
const L = b === "y" ? "top" : "left", $ = b === "y" ? "bottom" : "right", q = A + f[L], P = A - f[$];
A = F2(q, A, P);
}
const D = g.fn({
...n,
[w]: x,
[b]: A
});
return {
...D,
data: {
x: D.x - a,
y: D.y - i
}
};
}
};
}, kE = function(t) {
return t === void 0 && (t = {}), {
options: t,
fn(n) {
const {
x: a,
y: i,
placement: s,
rects: u,
middlewareData: p
} = n, {
offset: g = 0,
mainAxis: E = !0,
crossAxis: h = !0
} = _i(t, n), f = {
x: a,
y: i
}, b = Di(s), w = gf(b);
let x = f[w], A = f[b];
const D = _i(g, n), L = typeof D == "number" ? {
mainAxis: D,
crossAxis: 0
} : {
mainAxis: 0,
crossAxis: 0,
...D
};
if (E) {
const P = w === "y" ? "height" : "width", k = u.reference[w] - u.floating[P] + L.mainAxis, U = u.reference[w] + u.reference[P] - L.mainAxis;
x < k ? x = k : x > U && (x = U);
}
if (h) {
var $, q;
const P = w === "y" ? "width" : "height", k = ["top", "left"].includes(pi(s)), U = u.reference[b] - u.floating[P] + (k && (($ = p.offset) == null ? void 0 : $[b]) || 0) + (k ? 0 : L.crossAxis), Z = u.reference[b] + u.reference[P] + (k ? 0 : ((q = p.offset) == null ? void 0 : q[b]) || 0) - (k ? L.crossAxis : 0);
A < U ? A = U : A > Z && (A = Z);
}
return {
[w]: x,
[b]: A
};
}
};
}, LE = function(t) {
return t === void 0 && (t = {}), {
name: "size",
options: t,
async fn(n) {
const {
placement: a,
rects: i,
platform: s,
elements: u
} = n, {
apply: p = () => {
},
...g
} = _i(t, n), E = await yd(n, g), h = pi(a), f = Wl(a), b = Di(a) === "y", {
width: w,
height: x
} = i.floating;
let A, D;
h === "top" || h === "bottom" ? (A = h, D = f === (await (s.isRTL == null ? void 0 : s.isRTL(u.floating)) ? "start" : "end") ? "left" : "right") : (D = h, A = f === "end" ? "top" : "bottom");
const L = x - E.top - E.bottom, $ = w - E.left - E.right, q = lo(x - E[A], L), P = lo(w - E[D], $), k = !n.middlewareData.shift;
let U = q, Z = P;
if (b ? Z = f || k ? lo(P, $) : $ : U = f || k ? lo(q, L) : L, k && !f) {
const X = pa(E.left, 0), re = pa(E.right, 0), Q = pa(E.top, 0), ce = pa(E.bottom, 0);
b ? Z = w - 2 * (X !== 0 || re !== 0 ? X + re : pa(E.left, E.right)) : U = x - 2 * (Q !== 0 || ce !== 0 ? Q + ce : pa(E.top, E.bottom));
}
await p({
...n,
availableWidth: Z,
availableHeight: U
});
const ee = await s.getDimensions(u.floating);
return w !== ee.width || x !== ee.height ? {
reset: {
rects: !0
}
} : {};
}
};
};
function hl(t) {
return vf(t) ? (t.nodeName || "").toLowerCase() : "#document";
}
function ga(t) {
var n;
return (t == null || (n = t.ownerDocument) == null ? void 0 : n.defaultView) || window;
}
function gi(t) {
var n;
return (n = (vf(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : n.documentElement;
}
function vf(t) {
return t instanceof Node || t instanceof ga(t).Node;
}
function co(t) {
return t instanceof Element || t instanceof ga(t).Element;
}
function uo(t) {
return t instanceof HTMLElement || t instanceof ga(t).HTMLElement;
}
function ph(t) {
return typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof ga(t).ShadowRoot;
}
function Od(t) {
const {
overflow: n,
overflowX: a,
overflowY: i,
display: s
} = Ka(t);
return /auto|scroll|overlay|hidden|clip/.test(n + i + a) && !["inline", "contents"].includes(s);
}
function PE(t) {
return ["table", "td", "th"].includes(hl(t));
}
function b0(t) {
return [":popover-open", ":modal"].some((n) => {
try {
return t.matches(n);
} catch {
return !1;
}
});
}
function Ef(t) {
const n = bf(), a = Ka(t);
return a.transform !== "none" || a.perspective !== "none" || (a.containerType ? a.containerType !== "normal" : !1) || !n && (a.backdropFilter ? a.backdropFilter !== "none" : !1) || !n && (a.filter ? a.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((i) => (a.willChange || "").includes(i)) || ["paint", "layout", "strict", "content"].some((i) => (a.contain || "").includes(i));
}
function BE(t) {
let n = ki(t);
for (; uo(n) && !Pl(n); ) {
if (b0(n))
return null;
if (Ef(n))
return n;
n = ki(n);
}
return null;
}
function bf() {
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
}
function Pl(t) {
return ["html", "body", "#document"].includes(hl(t));
}
function Ka(t) {
return ga(t).getComputedStyle(t);
}
function S0(t) {
return co(t) ? {
scrollLeft: t.scrollLeft,
scrollTop: t.scrollTop
} : {
scrollLeft: t.scrollX,
scrollTop: t.scrollY
};
}
function ki(t) {
if (hl(t) === "html")
return t;
const n = (
// Step into the shadow DOM of the parent of a slotted node.
t.assignedSlot || // DOM Element detected.
t.parentNode || // ShadowRoot detected.
ph(t) && t.host || // Fallback.
gi(t)
);
return ph(n) ? n.host : n;
}
function Ev(t) {
const n = ki(t);
return Pl(n) ? t.ownerDocument ? t.ownerDocument.body : t.body : uo(n) && Od(n) ? n : Ev(n);
}
function Td(t, n, a) {
var i;
n === void 0 && (n = []), a === void 0 && (a = !0);
const s = Ev(t), u = s === ((i = t.ownerDocument) == null ? void 0 : i.body), p = ga(s);
return u ? n.concat(p, p.visualViewport || [], Od(s) ? s : [], p.frameElement && a ? Td(p.frameElement) : []) : n.concat(s, Td(s, [], a));
}
function bv(t) {
const n = Ka(t);
let a = parseFloat(n.width) || 0, i = parseFloat(n.height) || 0;
const s = uo(t), u = s ? t.offsetWidth : a, p = s ? t.offsetHeight : i, g = t0(a) !== u || t0(i) !== p;
return g && (a = u, i = p), {
width: a,
height: i,
$: g
};
}
function Sf(t) {
return co(t) ? t : t.contextElement;
}
function Dl(t) {
const n = Sf(t);
if (!uo(n))
return Mi(1);
const a = n.getBoundingClientRect(), {
width: i,
height: s,
$: u
} = bv(n);
let p = (u ? t0(a.width) : a.width) / i, g = (u ? t0(a.height) : a.height) / s;
return (!p || !Number.isFinite(p)) && (p = 1), (!g || !Number.isFinite(g)) && (g = 1), {
x: p,
y: g
};
}
const FE = /* @__PURE__ */ Mi(0);
function Sv(t) {
const n = ga(t);
return !bf() || !n.visualViewport ? FE : {
x: n.visualViewport.offsetLeft,
y: n.visualViewport.offsetTop
};
}
function UE(t, n, a) {
return n === void 0 && (n = !1), !a || n && a !== ga(t) ? !1 : n;
}
function dl(t, n, a, i) {
n === void 0 && (n = !1), a === void 0 && (a = !1);
const s = t.getBoundingClientRect(), u = Sf(t);
let p = Mi(1);
n && (i ? co(i) && (p = Dl(i)) : p = Dl(t));
const g = UE(u, a, i) ? Sv(u) : Mi(0);
let E = (s.left + g.x) / p.x, h = (s.top + g.y) / p.y, f = s.width / p.x, b = s.height / p.y;
if (u) {
const w = ga(u), x = i && co(i) ? ga(i) : i;
let A = w, D = A.frameElement;
for (; D && i && x !== A; ) {
const L = Dl(D), $ = D.getBoundingClientRect(), q = Ka(D), P = $.left + (D.clientLeft + parseFloat(q.paddingLeft)) * L.x, k = $.top + (D.clientTop + parseFloat(q.paddingTop)) * L.y;
E *= L.x, h *= L.y, f *= L.x, b *= L.y, E += P, h += k, A = ga(D), D = A.frameElement;
}
}
return r0({
width: f,
height: b,
x: E,
y: h
});
}
function $E(t) {
let {
elements: n,
rect: a,
offsetParent: i,
strategy: s
} = t;
const u = s === "fixed", p = gi(i), g = n ? b0(n.floating) : !1;
if (i === p || g && u)
return a;
let E = {
scrollLeft: 0,
scrollTop: 0
}, h = Mi(1);
const f = Mi(0), b = uo(i);
if ((b || !b && !u) && ((hl(i) !== "body" || Od(p)) && (E = S0(i)), uo(i))) {
const w = dl(i);
h = Dl(i), f.x = w.x + i.clientLeft, f.y = w.y + i.clientTop;
}
return {
width: a.width * h.x,
height: a.height * h.y,
x: a.x * h.x - E.scrollLeft * h.x + f.x,
y: a.y * h.y - E.scrollTop * h.y + f.y
};
}
function VE(t) {
return Array.from(t.getClientRects());
}
function wv(t) {
return dl(gi(t)).left + S0(t).scrollLeft;
}
function HE(t) {
const n = gi(t), a = S0(t), i = t.ownerDocument.body, s = pa(n.scrollWidth, n.clientWidth, i.scrollWidth, i.clientWidth), u = pa(n.scrollHeight, n.clientHeight, i.scrollHeight, i.clientHeight);
let p = -a.scrollLeft + wv(t);
const g = -a.scrollTop;
return Ka(i).direction === "rtl" && (p += pa(n.clientWidth, i.clientWidth) - s), {
width: s,
height: u,
x: p,
y: g
};
}
function GE(t, n) {
const a = ga(t), i = gi(t), s = a.visualViewport;
let u = i.clientWidth, p = i.clientHeight, g = 0, E = 0;
if (s) {
u = s.width, p = s.height;
const h = bf();
(!h || h && n === "fixed") && (g = s.offsetLeft, E = s.offsetTop);
}
return {
width: u,
height: p,
x: g,
y: E
};
}
function YE(t, n) {
const a = dl(t, !0, n === "fixed"), i = a.top + t.clientTop, s = a.left + t.clientLeft, u = uo(t) ? Dl(t) : Mi(1), p = t.clientWidth * u.x, g = t.clientHeight * u.y, E = s * u.x, h = i * u.y;
return {
width: p,
height: g,
x: E,
y: h
};
}
function mh(t, n, a) {
let i;
if (n === "viewport")
i = GE(t, a);
else if (n === "document")
i = HE(gi(t));
else if (co(n))
i = YE(n, a);
else {
const s = Sv(t);
i = {
...n,
x: n.x - s.x,
y: n.y - s.y
};
}
return r0(i);
}
function yv(t, n) {
const a = ki(t);
return a === n || !co(a) || Pl(a) ? !1 : Ka(a).position === "fixed" || yv(a, n);
}
function zE(t, n) {
const a = n.get(t);
if (a)
return a;
let i = Td(t, [], !1).filter((g) => co(g) && hl(g) !== "body"), s = null;
const u = Ka(t).position === "fixed";
let p = u ? ki(t) : t;
for (; co(p) && !Pl(p); ) {
const g = Ka(p), E = Ef(p);
!E && g.position === "fixed" && (s = null), (u ? !E && !s : !E && g.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || Od(p) && !E && yv(t, p)) ? i = i.filter((f) => f !== p) : s = g, p = ki(p);
}
return n.set(t, i), i;
}
function ZE(t) {
let {
element: n,
boundary: a,
rootBoundary: i,
strategy: s
} = t;
const p = [...a === "clippingAncestors" ? b0(n) ? [] : zE(n, this._c) : [].concat(a), i], g = p[0], E = p.reduce((h, f) => {
const b = mh(n, f, s);
return h.top = pa(b.top, h.top), h.right = lo(b.right, h.right), h.bottom = lo(b.bottom, h.bottom), h.left = pa(b.left, h.left), h;
}, mh(n, g, s));
return {
width: E.right - E.left,
height: E.bottom - E.top,
x: E.left,
y: E.top
};
}
function qE(t) {
const {
width: n,
height: a
} = bv(t);
return {
width: n,
height: a
};
}
function WE(t, n, a) {
const i = uo(n), s = gi(n), u = a === "fixed", p = dl(t, !0, u, n);
let g = {
scrollLeft: 0,
scrollTop: 0
};
const E = Mi(0);
if (i || !i && !u)
if ((hl(n) !== "body" || Od(s)) && (g = S0(n)), i) {
const b = dl(n, !0, u, n);
E.x = b.x + n.clientLeft, E.y = b.y + n.clientTop;
} else s && (E.x = wv(s));
const h = p.left + g.scrollLeft - E.x, f = p.top + g.scrollTop - E.y;
return {
x: h,
y: f,
width: p.width,
height: p.height
};
}
function m2(t) {
return Ka(t).position === "static";
}
function gh(t, n) {
return !uo(t) || Ka(t).position === "fixed" ? null : n ? n(t) : t.offsetParent;
}
function Tv(t, n) {
const a = ga(t);
if (b0(t))
return a;
if (!uo(t)) {
let s = ki(t);
for (; s && !Pl(s); ) {
if (co(s) && !m2(s))
return s;
s = ki(s);
}
return a;
}
let i = gh(t, n);
for (; i && PE(i) && m2(i); )
i = gh(i, n);
return i && Pl(i) && m2(i) && !Ef(i) ? a : i || BE(t) || a;
}
const jE = async function(t) {
const n = this.getOffsetParent || Tv, a = this.getDimensions, i = await a(t.floating);
return {
reference: WE(t.reference, await n(t.floating), t.strategy),
floating: {
x: 0,
y: 0,
width: i.width,
height: i.height
}
};
};
function KE(t) {
return Ka(t).direction === "rtl";
}
const QE = {
convertOffsetParentRelativeRectToViewportRelativeRect: $E,
getDocumentElement: gi,
getClippingRect: ZE,
getOffsetParent: Tv,
getElementRects: jE,
getClientRects: VE,
getDimensions: qE,
getScale: Dl,
isElement: co,
isRTL: KE
};
function XE(t, n) {
let a = null, i;
const s = gi(t);
function u() {
var g;
clearTimeout(i), (g = a) == null || g.disconnect(), a = null;
}
function p(g, E) {
g === void 0 && (g = !1), E === void 0 && (E = 1), u();
const {
left: h,
top: f,
width: b,
height: w
} = t.getBoundingClientRect();
if (g || n(), !b || !w)
return;
const x = Bd(f), A = Bd(s.clientWidth - (h + b)), D = Bd(s.clientHeight - (f + w)), L = Bd(h), q = {
rootMargin: -x + "px " + -A + "px " + -D + "px " + -L + "px",
threshold: pa(0, lo(1, E)) || 1
};
let P = !0;
function k(U) {
const Z = U[0].intersectionRatio;
if (Z !== E) {
if (!P)
return p();
Z ? p(!1, Z) : i = setTimeout(() => {
p(!1, 1e-7);
}, 1e3);
}
P = !1;
}
try {
a = new IntersectionObserver(k, {
...q,
// Handle <iframe>s
root: s.ownerDocument
});
} catch {
a = new IntersectionObserver(k, q);
}
a.observe(t);
}
return p(!0), u;
}
function JE(t, n, a, i) {
i === void 0 && (i = {});
const {
ancestorScroll: s = !0,
ancestorResize: u = !0,
elementResize: p = typeof ResizeObserver == "function",
layoutShift: g = typeof IntersectionObserver == "function",
animationFrame: E = !1
} = i, h = Sf(t), f = s || u ? [...h ? Td(h) : [], ...Td(n)] : [];
f.forEach(($) => {
s && $.addEventListener("scroll", a, {
passive: !0
}), u && $.addEventListener("resize", a);
});
const b = h && g ? XE(h, a) : null;
let w = -1, x = null;
p && (x = new ResizeObserver(($) => {
let [q] = $;
q && q.target === h && x && (x.unobserve(n), cancelAnimationFrame(w), w = requestAnimationFrame(() => {
var P;
(P = x) == null || P.observe(n);
})), a();
}), h && !E && x.observe(h), x.observe(n));
let A, D = E ? dl(t) : null;
E && L();
function L() {
const $ = dl(t);
D && ($.x !== D.x || $.y !== D.y || $.width !== D.width || $.height !== D.height) && a(), D = $, A = requestAnimationFrame(L);
}
return a(), () => {
var $;
f.forEach((q) => {
s && q.removeEventListener("scroll", a), u && q.removeEventListener("resize", a);
}), b?.(), ($ = x) == null || $.disconnect(), x = null, E && cancelAnimationFrame(A);
};
}
const eb = ME, tb = DE, fh = OE, nb = LE, rb = IE, ab = RE, ob = kE, ib = (t, n, a) => {
const i = /* @__PURE__ */ new Map(), s = {
platform: QE,
...a
}, u = {
...s.platform,
_c: i
};
return AE(t, n, {
...s,
platform: u
});
};
function sb(t) {
return t != null && typeof t == "object" && "$el" in t;
}
function $2(t) {
if (sb(t)) {
const n = t.$el;
return vf(n) && hl(n) === "#comment" ? null : n;
}
return t;
}
function Il(t) {
return typeof t == "function" ? t() : y(t);
}
function lb(t) {
return {
name: "arrow",
options: t,
fn(n) {
const a = $2(Il(t.element));
return a == null ? {} : ab({
element: a,
padding: t.padding
}).fn(n);
}
};
}
function Cv(t) {
return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
}
function hh(t, n) {
const a = Cv(t);
return Math.round(n * a) / a;
}
function cb(t, n, a) {
a === void 0 && (a = {});
const i = a.whileElementsMounted, s = M(() => {
var ee;
return (ee = Il(a.open)) != null ? ee : !0;
}), u = M(() => Il(a.middleware)), p = M(() => {
var ee;
return (ee = Il(a.placement)) != null ? ee : "bottom";
}), g = M(() => {
var ee;
return (ee = Il(a.strategy)) != null ? ee : "absolute";
}), E = M(() => {
var ee;
return (ee = Il(a.transform)) != null ? ee : !0;
}), h = M(() => $2(t.value)), f = M(() => $2(n.value)), b = z(0), w = z(0), x = z(g.value), A = z(p.value), D = sv({}), L = z(!1), $ = M(() => {
const ee = {
position: x.value,
left: "0",
top: "0"
};
if (!f.value)
return ee;
const X = hh(f.value, b.value), re = hh(f.value, w.value);
return E.value ? {
...ee,
transform: "translate(" + X + "px, " + re + "px)",
...Cv(f.value) >= 1.5 && {
willChange: "transform"
}
} : {
position: x.value,
left: X + "px",
top: re + "px"
};
});
let q;
function P() {
h.value == null || f.value == null || ib(h.value, f.value, {
middleware: u.value,
placement: p.value,
strategy: g.value
}).then((ee) => {
b.value = ee.x, w.value = ee.y, x.value = ee.strategy, A.value = ee.placement, D.value = ee.middlewareData, L.value = !0;
});
}
function k() {
typeof q == "function" && (q(), q = void 0);
}
function U() {
if (k(), i === void 0) {
P();
return;
}
if (h.value != null && f.value != null) {
q = i(h.value, f.value, P);
return;
}
}
function Z() {
s.value || (L.value = !1);
}
return tt([u, p, g], P, {
flush: "sync"
}), tt([h, f], U, {
flush: "sync"
}), tt(s, Z, {
flush: "sync"
}), _f() && zl(k), {
x: xl(b),
y: xl(w),
strategy: xl(x),
placement: xl(A),
middlewareData: xl(D),
isPositioned: xl(L),
floatingStyles: $,
update: P
};
}
function kn(t, n) {
const a = typeof t == "string" && !n ? `${t}Context` : n, i = Symbol(a);
return [(s) => {
const u = Ui(i, s);
if (u || u === null)
return u;
throw new Error(
`Injection \`${i.toString()}\` not found. Component must be used within ${Array.isArray(t) ? `one of the following components: ${t.join(
", "
)}` : `\`${t}\``}`
);
}, (s) => (Zl(i, s), s)];
}
function wf(t, n, a) {
const i = a.originalEvent.target, s = new CustomEvent(t, {
bubbles: !1,
cancelable: !0,
detail: a
});
n && i.addEventListener(t, n, { once: !0 }), i.dispatchEvent(s);
}
function ub(t) {
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
}
var db = function t(n, a) {
if (n === a) return !0;
if (n && a && typeof n == "object" && typeof a == "object") {
if (n.constructor !== a.constructor) return !1;
var i, s, u;
if (Array.isArray(n)) {
if (i = n.length, i != a.length) return !1;
for (s = i; s-- !== 0; )
if (!t(n[s], a[s])) return !1;
return !0;
}
if (n.constructor === RegExp) return n.source === a.source && n.flags === a.flags;
if (n.valueOf !== Object.prototype.valueOf) return n.valueOf() === a.valueOf();
if (n.toString !== Object.prototype.toString) return n.toString() === a.toString();
if (u = Object.keys(n), i = u.length, i !== Object.keys(a).length) return !1;
for (s = i; s-- !== 0; )
if (!Object.prototype.hasOwnProperty.call(a, u[s])) return !1;
for (s = i; s-- !== 0; ) {
var p = u[s];
if (!t(n[p], a[p])) return !1;
}
return !0;
}
return n !== n && a !== a;
};
const ll = /* @__PURE__ */ ub(db);
function g2(t) {
return t == null;
}
function _b(t, n) {
var a;
const i = sv();
return pn(() => {
i.value = t();
}, {
...n,
flush: (a = void 0) != null ? a : "sync"
}), ql(i);
}
function jl(t) {
return _f() ? (zl(t), !0) : !1;
}
function pb() {
const t = /* @__PURE__ */ new Set(), n = (a) => {
t.delete(a);
};
return {
on: (a) => {
t.add(a);
const i = () => n(a);
return jl(i), {
off: i
};
},
off: n,
trigger: (...a) => Promise.all(Array.from(t).map((i) => i(...a)))
};
}
function mb(t) {
let n = !1, a;
const i = _v(!0);
return (...s) => (n || (a = i.run(() => t(...s)), n = !0), a);
}
function xv(t) {
let n = 0, a, i;
const s = () => {
n -= 1, i && n <= 0 && (i.stop(), a = void 0, i = void 0);
};
return (...u) => (n += 1, a || (i = _v(!0), a = i.run(() => t(...u))), jl(s), a);
}
function di(t) {
return typeof t == "function" ? t() : y(t);
}
const fi = typeof window < "u" && typeof document < "u";
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
const gb = (t) => typeof t < "u", fb = (t) => t != null, hb = Object.prototype.toString, vb = (t) => hb.call(t) === "[object Object]", Eb = () => {
}, vh = /* @__PURE__ */ bb();
function bb() {
var t, n;
return fi && ((t = window?.navigator) == null ? void 0 : t.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((n = window?.navigator) == null ? void 0 : n.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
}
function Sb(t) {
return po();
}
function Av(t, n = 1e4) {
return uE((a, i) => {
let s = di(t), u;
const p = () => setTimeout(() => {
s = di(t), i();
}, di(n));
return jl(() => {
clearTimeout(u);
}), {
get() {
return a(), s;
},
set(g) {
s = g, i(), clearTimeout(u), u = p();
}
};
});
}
function wb(t, n) {
Sb() && pv(t, n);
}
function Rv(t, n, a = {}) {
const {
immediate: i = !0
} = a, s = z(!1);
let u = null;
function p() {
u && (clearTimeout(u), u = null);
}
function g() {
s.value = !1, p();
}
function E(...h) {
p(), s.value = !0, u = setTimeout(() => {
s.value = !1, u = null, t(...h);
}, di(n));
}
return i && (s.value = !0, fi && E()), jl(g), {
isPending: ql(s),
start: E,
stop: g
};
}
function hi(t) {
var n;
const a = di(t);
return (n = a?.$el) != null ? n : a;
}
const w0 = fi ? window : void 0;
function Bl(...t) {
let n, a, i, s;
if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([a, i, s] = t, n = w0) : [n, a, i, s] = t, !n)
return Eb;
Array.isArray(a) || (a = [a]), Array.isArray(i) || (i = [i]);
const u = [], p = () => {
u.forEach((f) => f()), u.length = 0;
}, g = (f, b, w, x) => (f.addEventListener(b, w, x), () => f.removeEventListener(b, w, x)), E = tt(
() => [hi(n), di(s)],
([f, b]) => {
if (p(), !f)
return;
const w = vb(b) ? { ...b } : b;
u.push(
...a.flatMap((x) => i.map((A) => g(f, x, A, w)))
);
},
{ immediate: !0, flush: "post" }
), h = () => {
E(), p();
};
return jl(h), h;
}
function yb(t) {
return typeof t == "function" ? t : typeof t == "string" ? (n) => n.key === t : Array.isArray(t) ? (n) => t.includes(n.key) : () => !0;
}
function Tb(...t) {
let n, a, i = {};
t.length === 3 ? (n = t[0], a = t[1], i = t[2]) : t.length === 2 ? typeof t[1] == "object" ? (n = !0, a = t[0], i = t[1]) : (n = t[0], a = t[1]) : (n = !0, a = t[0]);
const {
target: s = w0,
eventName: u = "keydown",
passive: p = !1,
dedupe: g = !1
} = i, E = yb(n);
return Bl(s, u, (h) => {
h.repeat && di(g) || E(h) && a(h);
}, p);
}
function Ov() {
const t = z(!1), n = po();
return n && xt(() => {
t.value = !0;
}, n), t;
}
function Cb(t) {
const n = Ov();
return M(() => (n.value, !!t()));
}
function xb(t, n, a = {}) {
const { window: i = w0, ...s } = a;
let u;
const p = Cb(() => i && "MutationObserver" in i), g = () => {
u && (u.disconnect(), u = void 0);
}, E = M(() => {
const w = di(t), x = (Array.isArray(w) ? w : [w]).map(hi).filter(fb);
return new Set(x);
}), h = tt(
() => E.value,
(w) => {
g(), p.value && w.size && (u = new MutationObserver(n), w.forEach((x) => u.observe(x, s)));
},
{ immediate: !0, flush: "post" }
), f = () => u?.takeRecords(), b = () => {
g(), h();
};
return jl(b), {
isSupported: p,
stop: b,
takeRecords: f
};
}
function Ab(t) {
return JSON.parse(JSON.stringify(t));
}
function ma(t, n, a, i = {}) {
var s, u, p;
const {
clone: g = !1,
passive: E = !1,
eventName: h,
deep: f = !1,
defaultValue: b,
shouldEmit: w
} = i, x = po(), A = a || x?.emit || ((s = x?.$emit) == null ? void 0 : s.bind(x)) || ((p = (u = x?.proxy) == null ? void 0 : u.$emit) == null ? void 0 : p.bind(x?.proxy));
let D = h;
n || (n = "modelValue"), D = D || `update:${n.toString()}`;
const L = (P) => g ? typeof g == "function" ? g(P) : Ab(P) : P, $ = () => gb(t[n]) ? L(t[n]) : b, q = (P) => {
w ? w(P) && A(D, P) : A(D, P);
};
if (E) {
const P = $(), k = z(P);
let U = !1;
return tt(
() => t[n],
(Z) => {
U || (U = !0, k.value = L(Z), Ct(() => U = !1));
}
), tt(
k,
(Z) => {
!U && (Z !== t[n] || f) && q(Z);
},
{ deep: f }
), k;
} else
return M({
get() {
return $();
},
set(P) {
q(P);
}
});
}
function yf(t) {
return t ? t.flatMap((n) => n.type === Qe ? yf(n.children) : [n]) : [];
}
function Hr() {
let t = document.activeElement;
if (t == null)
return null;
for (; t != null && t.shadowRoot != null && t.shadowRoot.activeElement != null; )
t = t.shadowRoot.activeElement;
return t;
}
const Rb = ["INPUT", "TEXTAREA"];
function Iv(t, n, a, i = {}) {
if (!n || i.enableIgnoredElement && Rb.includes(n.nodeName))
return null;
const {
arrowKeyOptions: s = "both",
attributeName: u = "[data-radix-vue-collection-item]",
itemsArray: p = [],
loop: g = !0,
dir: E = "ltr",
preventScroll: h = !0,
focus: f = !1
} = i, [b, w, x, A, D, L] = [
t.key === "ArrowRight",
t.key === "ArrowLeft",
t.key === "ArrowUp",
t.key === "ArrowDown",
t.key === "Home",
t.key === "End"
], $ = x || A, q = b || w;
if (!D && !L && (!$ && !q || s === "vertical" && q || s === "horizontal" && $))
return null;
const P = a ? Array.from(a.querySelectorAll(u)) : p;
if (!P.length)
return null;
h && t.preventDefault();
let k = null;
return q || $ ? k = Nv(P, n, {
goForward: $ ? A : E === "ltr" ? b : w,
loop: g
}) : D ? k = P.at(0) || null : L && (k = P.at(-1) || null), f && k?.focus(), k;
}
function Nv(t, n, a, i = t.length) {
if (--i === 0)
return null;
const s = t.indexOf(n), u = a.goForward ? s + 1 : s - 1;
if (!a.loop && (u < 0 || u >= t.length))
return null;
const p = (u + t.length) % t.length, g = t[p];
return g ? g.hasAttribute("disabled") && g.getAttribute("disabled") !== "false" ? Nv(
t,
g,
a,
i
) : g : null;
}
function f2(t) {
if (t === null || typeof t != "object")
return !1;
const n = Object.getPrototypeOf(t);
return n !== null && n !== Object.prototype && Object.getPrototypeOf(n) !== null || Symbol.iterator in t ? !1 : Symbol.toStringTag in t ? Object.prototype.toString.call(t) === "[object Module]" : !0;
}
function V2(t, n, a = ".", i) {
if (!f2(n))
return V2(t, {}, a);
const s = Object.assign({}, n);
for (const u in t) {
if (u === "__proto__" || u === "constructor")
continue;
const p = t[u];
p != null && (Array.isArray(p) && Array.isArray(s[u]) ? s[u] = [...p, ...s[u]] : f2(p) && f2(s[u]) ? s[u] = V2(
p,
s[u],
(a ? `${a}.` : "") + u.toString()
) : s[u] = p);
}
return s;
}
function Ob(t) {
return (...n) => (
// eslint-disable-next-line unicorn/no-array-reduce
n.reduce((a, i) => V2(a, i, ""), {})
);
}
const Ib = Ob(), [Tf] = kn("ConfigProvider");
let Nb = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", Mb = (t = 21) => {
let n = "", a = t;
for (; a--; )
n += Nb[Math.random() * 64 | 0];
return n;
};
const Db = xv(() => {
const t = z(/* @__PURE__ */ new Map()), n = z(), a = M(() => {
for (const p of t.value.values())
if (p)
return !0;
return !1;
}), i = Tf({
scrollBody: z(!0)
});
let s = null;
const u = () => {
document.body.style.paddingRight = "", document.body.style.marginRight = "", document.body.style.pointerEvents = "", document.body.style.removeProperty("--scrollbar-width"), document.body.style.overflow = n.value ?? "", vh && s?.(), n.value = void 0;
};
return tt(a, (p, g) => {
var E;
if (!fi)
return;
if (!p) {
g && u();
return;
}
n.value === void 0 && (n.value = document.body.style.overflow);
const h = window.innerWidth - document.documentElement.clientWidth, f = { padding: h, margin: 0 }, b = (E = i.scrollBody) != null && E.value ? typeof i.scrollBody.value == "object" ? Ib({
padding: i.scrollBody.value.padding === !0 ? h : i.scrollBody.value.padding,
margin: i.scrollBody.value.margin === !0 ? h : i.scrollBody.value.margin
}, f) : f : { padding: 0, margin: 0 };
h > 0 && (document.body.style.paddingRight = typeof b.padding == "number" ? `${b.padding}px` : String(b.padding), document.body.style.marginRight = typeof b.margin == "number" ? `${b.margin}px` : String(b.margin), document.body.style.setProperty("--scrollbar-width", `${h}px`), document.body.style.overflow = "hidden"), vh && (s = Bl(
document,
"touchmove",
(w) => kb(w),
{ passive: !1 }
)), Ct(() => {
document.body.style.pointerEvents = "none", document.body.style.overflow = "hidden";
});
}, { immediate: !0, flush: "sync" }), t;
});
function Cf(t) {
const n = Mb(6), a = Db();
a.value.set(n, t ?? !1);
const i = M({
get: () => a.value.get(n) ?? !1,
set: (s) => a.value.set(n, s)
});
return wb(() => {
a.value.delete(n);
}), i;
}
function Mv(t) {
const n = window.getComputedStyle(t);
if (n.overflowX === "scroll" || n.overflowY === "scroll" || n.overflowX === "auto" && t.clientWidth < t.scrollWidth || n.overflowY === "auto" && t.clientHeight < t.scrollHeight)
return !0;
{
const a = t.parentNode;
return !(a instanceof Element) || a.tagName === "BODY" ? !1 : Mv(a);
}
}
function kb(t) {
const n = t || window.event, a = n.target;
return a instanceof Element && Mv(a) ? !1 : n.touches.length > 1 ? !0 : (n.preventDefault && n.cancelable && n.preventDefault(), !1);
}
const Lb = "data-radix-vue-collection-item";
function Pb(t, n = Lb) {
const a = Symbol();
return { createCollection: (i) => {
const s = z([]);
function u() {
const p = hi(i);
return p ? s.value = Array.from(
p.querySelectorAll(`[${n}]:not([data-disabled])`)
) : s.value = [];
}
return dE(() => {
s.value = [];
}), xt(u), _E(u), tt(() => i?.value, u, { immediate: !0 }), Zl(a, s), s;
}, injectCollection: () => Ui(a, z([])) };
}
function Kl(t) {
const n = Tf({
dir: z("ltr")
});
return M(() => {
var a;
return t?.value || ((a = n.dir) == null ? void 0 : a.value) || "ltr";
});
}
function Id(t) {
const n = po(), a = n?.type.emits, i = {};
return a != null && a.length || console.warn(
`No emitted event found. Please check component: ${n?.type.__name}`
), a?.forEach((s) => {
i[sE(lv(s))] = (...u) => t(s, ...u);
}), i;
}
let h2 = 0;
function Bb() {
pn((t) => {
if (!fi)
return;
const n = document.querySelectorAll("[data-radix-focus-guard]");
document.body.insertAdjacentElement(
"afterbegin",
n[0] ?? Eh()
), document.body.insertAdjacentElement(
"beforeend",
n[1] ?? Eh()
), h2++, t(() => {
h2 === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((a) => a.remove()), h2--;
});
});
}
function Eh() {
const t = document.createElement("span");
return t.setAttribute("data-radix-focus-guard", ""), t.tabIndex = 0, t.style.outline = "none", t.style.opacity = "0", t.style.position = "fixed", t.style.pointerEvents = "none", t;
}
function Fb(t) {
return M(() => {
var n;
return di(t) ? !!((n = hi(t)) != null && n.closest("form")) : !0;
});
}
function vl(t) {
const n = po(), a = Object.keys(n?.type.props ?? {}).reduce((s, u) => {
const p = (n?.type.props[u]).default;
return p !== void 0 && (s[u] = p), s;
}, {}), i = pf(t);
return M(() => {
const s = {}, u = n?.vnode.props ?? {};
return Object.keys(u).forEach((p) => {
s[lv(p)] = u[p];
}), Object.keys({ ...a, ...s }).reduce((p, g) => (i.value[g] !== void 0 && (p[g] = i.value[g]), p), {});
});
}
function Wn(t, n) {
const a = vl(t), i = n ? Id(n) : {};
return M(() => ({
...a.value,
...i
}));
}
function Ze() {
const t = po(), n = z(), a = M(() => {
var p, g;
return ["#text", "#comment"].includes((p = n.value) == null ? void 0 : p.$el.nodeName) ? (g = n.value) == null ? void 0 : g.$el.nextElementSibling : hi(n);
}), i = Object.assign({}, t.exposed), s = {};
for (const p in t.props)
Object.defineProperty(s, p, {
enumerable: !0,
configurable: !0,
get: () => t.props[p]
});
if (Object.keys(i).length > 0)
for (const p in i)
Object.defineProperty(s, p, {
enumerable: !0,
configurable: !0,
get: () => i[p]
});
Object.defineProperty(s, "$el", {
enumerable: !0,
configurable: !0,
get: () => t.vnode.el
}), t.exposed = s;
function u(p) {
n.value = p, p && (Object.defineProperty(s, "$el", {
enumerable: !0,
configurable: !0,
get: () => p instanceof Element ? p : p.$el
}), t.exposed = s);
}
return { forwardRef: u, currentRef: n, currentElement: a };
}
function Ub(t, n) {
const a = Av(!1, 300), i = z(null), s = pb();
function u() {
i.value = null, a.value = !1;
}
function p(g, E) {
const h = g.currentTarget, f = { x: g.clientX, y: g.clientY }, b = $b(f, h.getBoundingClientRect()), w = Vb(f, b), x = Hb(E.getBoundingClientRect()), A = Yb([...w, ...x]);
i.value = A, a.value = !0;
}
return pn((g) => {
if (t.value && n.value) {
const E = (f) => p(f, n.value), h = (f) => p(f, t.value);
t.value.addEventListener("pointerleave", E), n.value.addEventListener("pointerleave", h), g(() => {
var f, b;
(f = t.value) == null || f.removeEventListener("pointerleave", E), (b = n.value) == null || b.removeEventListener("pointerleave", h);
});
}
}), pn((g) => {
var E;
if (i.value) {
const h = (f) => {
var b, w;
if (!i.value)
return;
const x = f.target, A = { x: f.clientX, y: f.clientY }, D = ((b = t.value) == null ? void 0 : b.contains(x)) || ((w = n.value) == null ? void 0 : w.contains(x)), L = !Gb(A, i.value), $ = !!x.closest("[data-grace-area-trigger]");
D ? u() : (L || $) && (u(), s.trigger());
};
(E = t.value) == null || E.ownerDocument.addEventListener("pointermove", h), g(() => {
var f;
return (f = t.value) == null ? void 0 : f.ownerDocument.removeEventListener("pointermove", h);
});
}
}), {
isPointerInTransit: a,
onPointerExit: s.on
};
}
function $b(t, n) {
const a = Math.abs(n.top - t.y), i = Math.abs(n.bottom - t.y), s = Math.abs(n.right - t.x), u = Math.abs(n.left - t.x);
switch (Math.min(a, i, s, u)) {
case u:
return "left";
case s:
return "right";
case a:
return "top";
case i:
return "bottom";
default:
throw new Error("unreachable");
}
}
function Vb(t, n, a = 5) {
const i = [];
switch (n) {
case "top":
i.push(
{ x: t.x - a, y: t.y + a },
{ x: t.x + a, y: t.y + a }
);
break;
case "bottom":
i.push(