@konnectio/core
Version:
Konnectio Core Frontend Integration.
1,579 lines • 69.6 kB
JavaScript
import { d as Te, ag as It, ah as Wt, W as ae, h as le, b as I, e as Z, i as Ge, F as jt, a as Se, q as we, K as Ne, ac as Vt, n as Ie, $ as qt, r as Me, m as Gt, U as Yt, w as ve, f as ut, t as Ut, J as ft, ai as Xt, a3 as Kt, a4 as Zt } from "./mitt-CWSmi8M-.js";
const Jt = ["top", "right", "bottom", "left"], Ye = ["start", "end"], Ue = /* @__PURE__ */ Jt.reduce((e, t) => e.concat(t, t + "-" + Ye[0], t + "-" + Ye[1]), []), de = Math.min, K = Math.max, Qt = {
left: "right",
right: "left",
bottom: "top",
top: "bottom"
}, eo = {
start: "end",
end: "start"
};
function Re(e, t, o) {
return K(e, de(t, o));
}
function Q(e, t) {
return typeof e == "function" ? e(t) : e;
}
function E(e) {
return e.split("-")[0];
}
function k(e) {
return e.split("-")[1];
}
function mt(e) {
return e === "x" ? "y" : "x";
}
function We(e) {
return e === "y" ? "height" : "width";
}
function J(e) {
return ["top", "bottom"].includes(E(e)) ? "y" : "x";
}
function je(e) {
return mt(J(e));
}
function gt(e, t, o) {
o === void 0 && (o = !1);
const i = k(e), n = je(e), s = We(n);
let r = n === "x" ? i === (o ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
return t.reference[s] > t.floating[s] && (r = $e(r)), [r, $e(r)];
}
function to(e) {
const t = $e(e);
return [ye(e), t, ye(t)];
}
function ye(e) {
return e.replace(/start|end/g, (t) => eo[t]);
}
function oo(e, t, o) {
const i = ["left", "right"], n = ["right", "left"], s = ["top", "bottom"], r = ["bottom", "top"];
switch (e) {
case "top":
case "bottom":
return o ? t ? n : i : t ? i : n;
case "left":
case "right":
return t ? s : r;
default:
return [];
}
}
function io(e, t, o, i) {
const n = k(e);
let s = oo(E(e), o === "start", i);
return n && (s = s.map((r) => r + "-" + n), t && (s = s.concat(s.map(ye)))), s;
}
function $e(e) {
return e.replace(/left|right|bottom|top/g, (t) => Qt[t]);
}
function no(e) {
return {
top: 0,
right: 0,
bottom: 0,
left: 0,
...e
};
}
function wt(e) {
return typeof e != "number" ? no(e) : {
top: e,
right: e,
bottom: e,
left: e
};
}
function ie(e) {
const {
x: t,
y: o,
width: i,
height: n
} = e;
return {
width: i,
height: n,
top: o,
left: t,
right: t + i,
bottom: o + n,
x: t,
y: o
};
}
function Xe(e, t, o) {
let {
reference: i,
floating: n
} = e;
const s = J(t), r = je(t), a = We(r), l = E(t), d = s === "y", c = i.x + i.width / 2 - n.width / 2, p = i.y + i.height / 2 - n.height / 2, u = i[a] / 2 - n[a] / 2;
let h;
switch (l) {
case "top":
h = {
x: c,
y: i.y - n.height
};
break;
case "bottom":
h = {
x: c,
y: i.y + i.height
};
break;
case "right":
h = {
x: i.x + i.width,
y: p
};
break;
case "left":
h = {
x: i.x - n.width,
y: p
};
break;
default:
h = {
x: i.x,
y: i.y
};
}
switch (k(t)) {
case "start":
h[r] -= u * (o && d ? -1 : 1);
break;
case "end":
h[r] += u * (o && d ? -1 : 1);
break;
}
return h;
}
const so = async (e, t, o) => {
const {
placement: i = "bottom",
strategy: n = "absolute",
middleware: s = [],
platform: r
} = o, a = s.filter(Boolean), l = await (r.isRTL == null ? void 0 : r.isRTL(t));
let d = await r.getElementRects({
reference: e,
floating: t,
strategy: n
}), {
x: c,
y: p
} = Xe(d, i, l), u = i, h = {}, f = 0;
for (let m = 0; m < a.length; m++) {
const {
name: w,
fn: g
} = a[m], {
x: v,
y: $,
data: b,
reset: _
} = await g({
x: c,
y: p,
initialPlacement: i,
placement: u,
strategy: n,
middlewareData: h,
rects: d,
platform: r,
elements: {
reference: e,
floating: t
}
});
c = v ?? c, p = $ ?? p, h = {
...h,
[w]: {
...h[w],
...b
}
}, _ && f <= 50 && (f++, typeof _ == "object" && (_.placement && (u = _.placement), _.rects && (d = _.rects === !0 ? await r.getElementRects({
reference: e,
floating: t,
strategy: n
}) : _.rects), {
x: c,
y: p
} = Xe(d, u, l)), m = -1);
}
return {
x: c,
y: p,
placement: u,
strategy: n,
middlewareData: h
};
};
async function Pe(e, t) {
var o;
t === void 0 && (t = {});
const {
x: i,
y: n,
platform: s,
rects: r,
elements: a,
strategy: l
} = e, {
boundary: d = "clippingAncestors",
rootBoundary: c = "viewport",
elementContext: p = "floating",
altBoundary: u = !1,
padding: h = 0
} = Q(t, e), f = wt(h), w = a[u ? p === "floating" ? "reference" : "floating" : p], g = ie(await s.getClippingRect({
element: (o = await (s.isElement == null ? void 0 : s.isElement(w))) == null || o ? w : w.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(a.floating)),
boundary: d,
rootBoundary: c,
strategy: l
})), v = p === "floating" ? {
x: i,
y: n,
width: r.floating.width,
height: r.floating.height
} : r.reference, $ = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a.floating)), b = await (s.isElement == null ? void 0 : s.isElement($)) ? await (s.getScale == null ? void 0 : s.getScale($)) || {
x: 1,
y: 1
} : {
x: 1,
y: 1
}, _ = ie(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
elements: a,
rect: v,
offsetParent: $,
strategy: l
}) : v);
return {
top: (g.top - _.top + f.top) / b.y,
bottom: (_.bottom - g.bottom + f.bottom) / b.y,
left: (g.left - _.left + f.left) / b.x,
right: (_.right - g.right + f.right) / b.x
};
}
const ro = (e) => ({
name: "arrow",
options: e,
async fn(t) {
const {
x: o,
y: i,
placement: n,
rects: s,
platform: r,
elements: a,
middlewareData: l
} = t, {
element: d,
padding: c = 0
} = Q(e, t) || {};
if (d == null)
return {};
const p = wt(c), u = {
x: o,
y: i
}, h = je(n), f = We(h), m = await r.getDimensions(d), w = h === "y", g = w ? "top" : "left", v = w ? "bottom" : "right", $ = w ? "clientHeight" : "clientWidth", b = s.reference[f] + s.reference[h] - u[h] - s.floating[f], _ = u[h] - s.reference[h], z = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(d));
let S = z ? z[$] : 0;
(!S || !await (r.isElement == null ? void 0 : r.isElement(z))) && (S = a.floating[$] || s.floating[f]);
const L = b / 2 - _ / 2, A = S / 2 - m[f] / 2 - 1, x = de(p[g], A), P = de(p[v], A), C = x, M = S - m[f] - P, T = S / 2 - m[f] / 2 + L, ee = Re(C, T, M), F = !l.arrow && k(n) != null && T !== ee && s.reference[f] / 2 - (T < C ? x : P) - m[f] / 2 < 0, R = F ? T < C ? T - C : T - M : 0;
return {
[h]: u[h] + R,
data: {
[h]: ee,
centerOffset: T - ee - R,
...F && {
alignmentOffset: R
}
},
reset: F
};
}
});
function ao(e, t, o) {
return (e ? [...o.filter((n) => k(n) === e), ...o.filter((n) => k(n) !== e)] : o.filter((n) => E(n) === n)).filter((n) => e ? k(n) === e || (t ? ye(n) !== n : !1) : !0);
}
const lo = function(e) {
return e === void 0 && (e = {}), {
name: "autoPlacement",
options: e,
async fn(t) {
var o, i, n;
const {
rects: s,
middlewareData: r,
placement: a,
platform: l,
elements: d
} = t, {
crossAxis: c = !1,
alignment: p,
allowedPlacements: u = Ue,
autoAlignment: h = !0,
...f
} = Q(e, t), m = p !== void 0 || u === Ue ? ao(p || null, h, u) : u, w = await Pe(t, f), g = ((o = r.autoPlacement) == null ? void 0 : o.index) || 0, v = m[g];
if (v == null)
return {};
const $ = gt(v, s, await (l.isRTL == null ? void 0 : l.isRTL(d.floating)));
if (a !== v)
return {
reset: {
placement: m[0]
}
};
const b = [w[E(v)], w[$[0]], w[$[1]]], _ = [...((i = r.autoPlacement) == null ? void 0 : i.overflows) || [], {
placement: v,
overflows: b
}], z = m[g + 1];
if (z)
return {
data: {
index: g + 1,
overflows: _
},
reset: {
placement: z
}
};
const S = _.map((x) => {
const P = k(x.placement);
return [x.placement, P && c ? (
// Check along the mainAxis and main crossAxis side.
x.overflows.slice(0, 2).reduce((C, M) => C + M, 0)
) : (
// Check only the mainAxis.
x.overflows[0]
), x.overflows];
}).sort((x, P) => x[1] - P[1]), A = ((n = S.filter((x) => x[2].slice(
0,
// Aligned placements should not check their opposite crossAxis
// side.
k(x[0]) ? 2 : 3
).every((P) => P <= 0))[0]) == null ? void 0 : n[0]) || S[0][0];
return A !== a ? {
data: {
index: g + 1,
overflows: _
},
reset: {
placement: A
}
} : {};
}
};
}, po = function(e) {
return e === void 0 && (e = {}), {
name: "flip",
options: e,
async fn(t) {
var o, i;
const {
placement: n,
middlewareData: s,
rects: r,
initialPlacement: a,
platform: l,
elements: d
} = t, {
mainAxis: c = !0,
crossAxis: p = !0,
fallbackPlacements: u,
fallbackStrategy: h = "bestFit",
fallbackAxisSideDirection: f = "none",
flipAlignment: m = !0,
...w
} = Q(e, t);
if ((o = s.arrow) != null && o.alignmentOffset)
return {};
const g = E(n), v = J(a), $ = E(a) === a, b = await (l.isRTL == null ? void 0 : l.isRTL(d.floating)), _ = u || ($ || !m ? [$e(a)] : to(a)), z = f !== "none";
!u && z && _.push(...io(a, m, f, b));
const S = [a, ..._], L = await Pe(t, w), A = [];
let x = ((i = s.flip) == null ? void 0 : i.overflows) || [];
if (c && A.push(L[g]), p) {
const T = gt(n, r, b);
A.push(L[T[0]], L[T[1]]);
}
if (x = [...x, {
placement: n,
overflows: A
}], !A.every((T) => T <= 0)) {
var P, C;
const T = (((P = s.flip) == null ? void 0 : P.index) || 0) + 1, ee = S[T];
if (ee)
return {
data: {
index: T,
overflows: x
},
reset: {
placement: ee
}
};
let F = (C = x.filter((R) => R.overflows[0] <= 0).sort((R, W) => R.overflows[1] - W.overflows[1])[0]) == null ? void 0 : C.placement;
if (!F)
switch (h) {
case "bestFit": {
var M;
const R = (M = x.filter((W) => {
if (z) {
const j = J(W.placement);
return j === v || // Create a bias to the `y` side axis due to horizontal
// reading directions favoring greater width.
j === "y";
}
return !0;
}).map((W) => [W.placement, W.overflows.filter((j) => j > 0).reduce((j, Ft) => j + Ft, 0)]).sort((W, j) => W[1] - j[1])[0]) == null ? void 0 : M[0];
R && (F = R);
break;
}
case "initialPlacement":
F = a;
break;
}
if (n !== F)
return {
reset: {
placement: F
}
};
}
return {};
}
};
};
async function co(e, t) {
const {
placement: o,
platform: i,
elements: n
} = e, s = await (i.isRTL == null ? void 0 : i.isRTL(n.floating)), r = E(o), a = k(o), l = J(o) === "y", d = ["left", "top"].includes(r) ? -1 : 1, c = s && l ? -1 : 1, p = Q(t, e);
let {
mainAxis: u,
crossAxis: h,
alignmentAxis: f
} = typeof p == "number" ? {
mainAxis: p,
crossAxis: 0,
alignmentAxis: null
} : {
mainAxis: p.mainAxis || 0,
crossAxis: p.crossAxis || 0,
alignmentAxis: p.alignmentAxis
};
return a && typeof f == "number" && (h = a === "end" ? f * -1 : f), l ? {
x: h * c,
y: u * d
} : {
x: u * d,
y: h * c
};
}
const ho = function(e) {
return e === void 0 && (e = 0), {
name: "offset",
options: e,
async fn(t) {
var o, i;
const {
x: n,
y: s,
placement: r,
middlewareData: a
} = t, l = await co(t, e);
return r === ((o = a.offset) == null ? void 0 : o.placement) && (i = a.arrow) != null && i.alignmentOffset ? {} : {
x: n + l.x,
y: s + l.y,
data: {
...l,
placement: r
}
};
}
};
}, uo = function(e) {
return e === void 0 && (e = {}), {
name: "shift",
options: e,
async fn(t) {
const {
x: o,
y: i,
placement: n
} = t, {
mainAxis: s = !0,
crossAxis: r = !1,
limiter: a = {
fn: (w) => {
let {
x: g,
y: v
} = w;
return {
x: g,
y: v
};
}
},
...l
} = Q(e, t), d = {
x: o,
y: i
}, c = await Pe(t, l), p = J(E(n)), u = mt(p);
let h = d[u], f = d[p];
if (s) {
const w = u === "y" ? "top" : "left", g = u === "y" ? "bottom" : "right", v = h + c[w], $ = h - c[g];
h = Re(v, h, $);
}
if (r) {
const w = p === "y" ? "top" : "left", g = p === "y" ? "bottom" : "right", v = f + c[w], $ = f - c[g];
f = Re(v, f, $);
}
const m = a.fn({
...t,
[u]: h,
[p]: f
});
return {
...m,
data: {
x: m.x - o,
y: m.y - i,
enabled: {
[u]: s,
[p]: r
}
}
};
}
};
}, fo = function(e) {
return e === void 0 && (e = {}), {
name: "size",
options: e,
async fn(t) {
var o, i;
const {
placement: n,
rects: s,
platform: r,
elements: a
} = t, {
apply: l = () => {
},
...d
} = Q(e, t), c = await Pe(t, d), p = E(n), u = k(n), h = J(n) === "y", {
width: f,
height: m
} = s.floating;
let w, g;
p === "top" || p === "bottom" ? (w = p, g = u === (await (r.isRTL == null ? void 0 : r.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (g = p, w = u === "end" ? "top" : "bottom");
const v = m - c.top - c.bottom, $ = f - c.left - c.right, b = de(m - c[w], v), _ = de(f - c[g], $), z = !t.middlewareData.shift;
let S = b, L = _;
if ((o = t.middlewareData.shift) != null && o.enabled.x && (L = $), (i = t.middlewareData.shift) != null && i.enabled.y && (S = v), z && !u) {
const x = K(c.left, 0), P = K(c.right, 0), C = K(c.top, 0), M = K(c.bottom, 0);
h ? L = f - 2 * (x !== 0 || P !== 0 ? x + P : K(c.left, c.right)) : S = m - 2 * (C !== 0 || M !== 0 ? C + M : K(c.top, c.bottom));
}
await l({
...t,
availableWidth: L,
availableHeight: S
});
const A = await r.getDimensions(a.floating);
return f !== A.width || m !== A.height ? {
reset: {
rects: !0
}
} : {};
}
};
};
function O(e) {
var t;
return ((t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
}
function B(e) {
return O(e).getComputedStyle(e);
}
const Ke = Math.min, ne = Math.max, _e = Math.round;
function vt(e) {
const t = B(e);
let o = parseFloat(t.width), i = parseFloat(t.height);
const n = e.offsetWidth, s = e.offsetHeight, r = _e(o) !== n || _e(i) !== s;
return r && (o = n, i = s), { width: o, height: i, fallback: r };
}
function U(e) {
return $t(e) ? (e.nodeName || "").toLowerCase() : "";
}
let fe;
function yt() {
if (fe) return fe;
const e = navigator.userAgentData;
return e && Array.isArray(e.brands) ? (fe = e.brands.map((t) => t.brand + "/" + t.version).join(" "), fe) : navigator.userAgent;
}
function D(e) {
return e instanceof O(e).HTMLElement;
}
function G(e) {
return e instanceof O(e).Element;
}
function $t(e) {
return e instanceof O(e).Node;
}
function Ze(e) {
return typeof ShadowRoot > "u" ? !1 : e instanceof O(e).ShadowRoot || e instanceof ShadowRoot;
}
function Ae(e) {
const { overflow: t, overflowX: o, overflowY: i, display: n } = B(e);
return /auto|scroll|overlay|hidden|clip/.test(t + i + o) && !["inline", "contents"].includes(n);
}
function mo(e) {
return ["table", "td", "th"].includes(U(e));
}
function Be(e) {
const t = /firefox/i.test(yt()), o = B(e), i = o.backdropFilter || o.WebkitBackdropFilter;
return o.transform !== "none" || o.perspective !== "none" || !!i && i !== "none" || t && o.willChange === "filter" || t && !!o.filter && o.filter !== "none" || ["transform", "perspective"].some((n) => o.willChange.includes(n)) || ["paint", "layout", "strict", "content"].some((n) => {
const s = o.contain;
return s != null && s.includes(n);
});
}
function _t() {
return !/^((?!chrome|android).)*safari/i.test(yt());
}
function Ve(e) {
return ["html", "body", "#document"].includes(U(e));
}
function xt(e) {
return G(e) ? e : e.contextElement;
}
const bt = { x: 1, y: 1 };
function te(e) {
const t = xt(e);
if (!D(t)) return bt;
const o = t.getBoundingClientRect(), { width: i, height: n, fallback: s } = vt(t);
let r = (s ? _e(o.width) : o.width) / i, a = (s ? _e(o.height) : o.height) / n;
return r && Number.isFinite(r) || (r = 1), a && Number.isFinite(a) || (a = 1), { x: r, y: a };
}
function pe(e, t, o, i) {
var n, s;
t === void 0 && (t = !1), o === void 0 && (o = !1);
const r = e.getBoundingClientRect(), a = xt(e);
let l = bt;
t && (i ? G(i) && (l = te(i)) : l = te(e));
const d = a ? O(a) : window, c = !_t() && o;
let p = (r.left + (c && ((n = d.visualViewport) == null ? void 0 : n.offsetLeft) || 0)) / l.x, u = (r.top + (c && ((s = d.visualViewport) == null ? void 0 : s.offsetTop) || 0)) / l.y, h = r.width / l.x, f = r.height / l.y;
if (a) {
const m = O(a), w = i && G(i) ? O(i) : i;
let g = m.frameElement;
for (; g && i && w !== m; ) {
const v = te(g), $ = g.getBoundingClientRect(), b = getComputedStyle(g);
$.x += (g.clientLeft + parseFloat(b.paddingLeft)) * v.x, $.y += (g.clientTop + parseFloat(b.paddingTop)) * v.y, p *= v.x, u *= v.y, h *= v.x, f *= v.y, p += $.x, u += $.y, g = O(g).frameElement;
}
}
return { width: h, height: f, top: u, right: p + h, bottom: u + f, left: p, x: p, y: u };
}
function Y(e) {
return (($t(e) ? e.ownerDocument : e.document) || window.document).documentElement;
}
function Ce(e) {
return G(e) ? { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop } : { scrollLeft: e.pageXOffset, scrollTop: e.pageYOffset };
}
function Tt(e) {
return pe(Y(e)).left + Ce(e).scrollLeft;
}
function ce(e) {
if (U(e) === "html") return e;
const t = e.assignedSlot || e.parentNode || Ze(e) && e.host || Y(e);
return Ze(t) ? t.host : t;
}
function St(e) {
const t = ce(e);
return Ve(t) ? t.ownerDocument.body : D(t) && Ae(t) ? t : St(t);
}
function xe(e, t) {
var o;
t === void 0 && (t = []);
const i = St(e), n = i === ((o = e.ownerDocument) == null ? void 0 : o.body), s = O(i);
return n ? t.concat(s, s.visualViewport || [], Ae(i) ? i : []) : t.concat(i, xe(i));
}
function Je(e, t, o) {
return t === "viewport" ? ie(function(i, n) {
const s = O(i), r = Y(i), a = s.visualViewport;
let l = r.clientWidth, d = r.clientHeight, c = 0, p = 0;
if (a) {
l = a.width, d = a.height;
const u = _t();
(u || !u && n === "fixed") && (c = a.offsetLeft, p = a.offsetTop);
}
return { width: l, height: d, x: c, y: p };
}(e, o)) : G(t) ? ie(function(i, n) {
const s = pe(i, !0, n === "fixed"), r = s.top + i.clientTop, a = s.left + i.clientLeft, l = D(i) ? te(i) : { x: 1, y: 1 };
return { width: i.clientWidth * l.x, height: i.clientHeight * l.y, x: a * l.x, y: r * l.y };
}(t, o)) : ie(function(i) {
const n = Y(i), s = Ce(i), r = i.ownerDocument.body, a = ne(n.scrollWidth, n.clientWidth, r.scrollWidth, r.clientWidth), l = ne(n.scrollHeight, n.clientHeight, r.scrollHeight, r.clientHeight);
let d = -s.scrollLeft + Tt(i);
const c = -s.scrollTop;
return B(r).direction === "rtl" && (d += ne(n.clientWidth, r.clientWidth) - a), { width: a, height: l, x: d, y: c };
}(Y(e)));
}
function Qe(e) {
return D(e) && B(e).position !== "fixed" ? e.offsetParent : null;
}
function et(e) {
const t = O(e);
let o = Qe(e);
for (; o && mo(o) && B(o).position === "static"; ) o = Qe(o);
return o && (U(o) === "html" || U(o) === "body" && B(o).position === "static" && !Be(o)) ? t : o || function(i) {
let n = ce(i);
for (; D(n) && !Ve(n); ) {
if (Be(n)) return n;
n = ce(n);
}
return null;
}(e) || t;
}
function go(e, t, o) {
const i = D(t), n = Y(t), s = pe(e, !0, o === "fixed", t);
let r = { scrollLeft: 0, scrollTop: 0 };
const a = { x: 0, y: 0 };
if (i || !i && o !== "fixed") if ((U(t) !== "body" || Ae(n)) && (r = Ce(t)), D(t)) {
const l = pe(t, !0);
a.x = l.x + t.clientLeft, a.y = l.y + t.clientTop;
} else n && (a.x = Tt(n));
return { x: s.left + r.scrollLeft - a.x, y: s.top + r.scrollTop - a.y, width: s.width, height: s.height };
}
const wo = { getClippingRect: function(e) {
let { element: t, boundary: o, rootBoundary: i, strategy: n } = e;
const s = o === "clippingAncestors" ? function(d, c) {
const p = c.get(d);
if (p) return p;
let u = xe(d).filter((w) => G(w) && U(w) !== "body"), h = null;
const f = B(d).position === "fixed";
let m = f ? ce(d) : d;
for (; G(m) && !Ve(m); ) {
const w = B(m), g = Be(m);
(f ? g || h : g || w.position !== "static" || !h || !["absolute", "fixed"].includes(h.position)) ? h = w : u = u.filter((v) => v !== m), m = ce(m);
}
return c.set(d, u), u;
}(t, this._c) : [].concat(o), r = [...s, i], a = r[0], l = r.reduce((d, c) => {
const p = Je(t, c, n);
return d.top = ne(p.top, d.top), d.right = Ke(p.right, d.right), d.bottom = Ke(p.bottom, d.bottom), d.left = ne(p.left, d.left), d;
}, Je(t, a, n));
return { width: l.right - l.left, height: l.bottom - l.top, x: l.left, y: l.top };
}, convertOffsetParentRelativeRectToViewportRelativeRect: function(e) {
let { rect: t, offsetParent: o, strategy: i } = e;
const n = D(o), s = Y(o);
if (o === s) return t;
let r = { scrollLeft: 0, scrollTop: 0 }, a = { x: 1, y: 1 };
const l = { x: 0, y: 0 };
if ((n || !n && i !== "fixed") && ((U(o) !== "body" || Ae(s)) && (r = Ce(o)), D(o))) {
const d = pe(o);
a = te(o), l.x = d.x + o.clientLeft, l.y = d.y + o.clientTop;
}
return { width: t.width * a.x, height: t.height * a.y, x: t.x * a.x - r.scrollLeft * a.x + l.x, y: t.y * a.y - r.scrollTop * a.y + l.y };
}, isElement: G, getDimensions: function(e) {
return D(e) ? vt(e) : e.getBoundingClientRect();
}, getOffsetParent: et, getDocumentElement: Y, getScale: te, async getElementRects(e) {
let { reference: t, floating: o, strategy: i } = e;
const n = this.getOffsetParent || et, s = this.getDimensions;
return { reference: go(t, await n(o), i), floating: { x: 0, y: 0, ...await s(o) } };
}, getClientRects: (e) => Array.from(e.getClientRects()), isRTL: (e) => B(e).direction === "rtl" }, vo = (e, t, o) => {
const i = /* @__PURE__ */ new Map(), n = { platform: wo, ...o }, s = { ...n.platform, _c: i };
return so(e, t, { ...n, platform: s });
};
function Pt(e, t) {
for (const o in t)
Object.prototype.hasOwnProperty.call(t, o) && (typeof t[o] == "object" && e[o] ? Pt(e[o], t[o]) : e[o] = t[o]);
}
const H = {
// Disable popper components
disabled: !1,
// Default position offset along main axis (px)
distance: 5,
// Default position offset along cross axis (px)
skidding: 0,
// Default container where the tooltip will be appended
container: "body",
// Element used to compute position and size boundaries
boundary: void 0,
// Skip delay & CSS transitions when another popper is shown, so that the popper appear to instanly move to the new position.
instantMove: !1,
// Auto destroy tooltip DOM nodes (ms)
disposeTimeout: 150,
// Triggers on the popper itself
popperTriggers: [],
// Positioning strategy
strategy: "absolute",
// Prevent overflow
preventOverflow: !0,
// Flip to the opposite placement if needed
flip: !0,
// Shift on the cross axis to prevent the popper from overflowing
shift: !0,
// Overflow padding (px)
overflowPadding: 0,
// Arrow padding (px)
arrowPadding: 0,
// Compute arrow overflow (useful to hide it)
arrowOverflow: !0,
/**
* By default, compute autohide on 'click'.
*/
autoHideOnMousedown: !1,
// Themes
themes: {
tooltip: {
// Default tooltip placement relative to target element
placement: "top",
// Default events that trigger the tooltip
triggers: ["hover", "focus", "touch"],
// Close tooltip on click on tooltip target
hideTriggers: (e) => [...e, "click"],
// Delay (ms)
delay: {
show: 200,
hide: 0
},
// Update popper on content resize
handleResize: !1,
// Enable HTML content in directive
html: !1,
// Displayed when tooltip content is loading
loadingContent: "..."
},
dropdown: {
// Default dropdown placement relative to target element
placement: "bottom",
// Default events that trigger the dropdown
triggers: ["click"],
// Delay (ms)
delay: 0,
// Update popper on content resize
handleResize: !0,
// Hide on clock outside
autoHide: !0
},
menu: {
$extend: "dropdown",
triggers: ["hover", "focus"],
popperTriggers: ["hover"],
delay: {
show: 0,
hide: 400
}
}
}
};
function he(e, t) {
let o = H.themes[e] || {}, i;
do
i = o[t], typeof i > "u" ? o.$extend ? o = H.themes[o.$extend] || {} : (o = null, i = H[t]) : o = null;
while (o);
return i;
}
function yo(e) {
const t = [e];
let o = H.themes[e] || {};
do
o.$extend && !o.$resetCss ? (t.push(o.$extend), o = H.themes[o.$extend] || {}) : o = null;
while (o);
return t.map((i) => `v-popper--theme-${i}`);
}
function tt(e) {
const t = [e];
let o = H.themes[e] || {};
do
o.$extend ? (t.push(o.$extend), o = H.themes[o.$extend] || {}) : o = null;
while (o);
return t;
}
let oe = !1;
if (typeof window < "u") {
oe = !1;
try {
const e = Object.defineProperty({}, "passive", {
get() {
oe = !0;
}
});
window.addEventListener("test", null, e);
} catch {
}
}
let At = !1;
typeof window < "u" && typeof navigator < "u" && (At = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream);
const Ct = ["auto", "top", "bottom", "left", "right"].reduce((e, t) => e.concat([
t,
`${t}-start`,
`${t}-end`
]), []), ot = {
hover: "mouseenter",
focus: "focus",
click: "click",
touch: "touchstart",
pointer: "pointerdown"
}, it = {
hover: "mouseleave",
focus: "blur",
click: "click",
touch: "touchend",
pointer: "pointerup"
};
function nt(e, t) {
const o = e.indexOf(t);
o !== -1 && e.splice(o, 1);
}
function ke() {
return new Promise((e) => requestAnimationFrame(() => {
requestAnimationFrame(e);
}));
}
const N = [];
let X = null;
const st = {};
function rt(e) {
let t = st[e];
return t || (t = st[e] = []), t;
}
let De = function() {
};
typeof window < "u" && (De = window.Element);
function y(e) {
return function(t) {
return he(t.theme, e);
};
}
const He = "__floating-vue__popper", Ot = () => Te({
name: "VPopper",
provide() {
return {
[He]: {
parentPopper: this
}
};
},
inject: {
[He]: { default: null }
},
props: {
theme: {
type: String,
required: !0
},
targetNodes: {
type: Function,
required: !0
},
referenceNode: {
type: Function,
default: null
},
popperNode: {
type: Function,
required: !0
},
shown: {
type: Boolean,
default: !1
},
showGroup: {
type: String,
default: null
},
// eslint-disable-next-line vue/require-prop-types
ariaId: {
default: null
},
disabled: {
type: Boolean,
default: y("disabled")
},
positioningDisabled: {
type: Boolean,
default: y("positioningDisabled")
},
placement: {
type: String,
default: y("placement"),
validator: (e) => Ct.includes(e)
},
delay: {
type: [String, Number, Object],
default: y("delay")
},
distance: {
type: [Number, String],
default: y("distance")
},
skidding: {
type: [Number, String],
default: y("skidding")
},
triggers: {
type: Array,
default: y("triggers")
},
showTriggers: {
type: [Array, Function],
default: y("showTriggers")
},
hideTriggers: {
type: [Array, Function],
default: y("hideTriggers")
},
popperTriggers: {
type: Array,
default: y("popperTriggers")
},
popperShowTriggers: {
type: [Array, Function],
default: y("popperShowTriggers")
},
popperHideTriggers: {
type: [Array, Function],
default: y("popperHideTriggers")
},
container: {
type: [String, Object, De, Boolean],
default: y("container")
},
boundary: {
type: [String, De],
default: y("boundary")
},
strategy: {
type: String,
validator: (e) => ["absolute", "fixed"].includes(e),
default: y("strategy")
},
autoHide: {
type: [Boolean, Function],
default: y("autoHide")
},
handleResize: {
type: Boolean,
default: y("handleResize")
},
instantMove: {
type: Boolean,
default: y("instantMove")
},
eagerMount: {
type: Boolean,
default: y("eagerMount")
},
popperClass: {
type: [String, Array, Object],
default: y("popperClass")
},
computeTransformOrigin: {
type: Boolean,
default: y("computeTransformOrigin")
},
/**
* @deprecated
*/
autoMinSize: {
type: Boolean,
default: y("autoMinSize")
},
autoSize: {
type: [Boolean, String],
default: y("autoSize")
},
/**
* @deprecated
*/
autoMaxSize: {
type: Boolean,
default: y("autoMaxSize")
},
autoBoundaryMaxSize: {
type: Boolean,
default: y("autoBoundaryMaxSize")
},
preventOverflow: {
type: Boolean,
default: y("preventOverflow")
},
overflowPadding: {
type: [Number, String],
default: y("overflowPadding")
},
arrowPadding: {
type: [Number, String],
default: y("arrowPadding")
},
arrowOverflow: {
type: Boolean,
default: y("arrowOverflow")
},
flip: {
type: Boolean,
default: y("flip")
},
shift: {
type: Boolean,
default: y("shift")
},
shiftCrossAxis: {
type: Boolean,
default: y("shiftCrossAxis")
},
noAutoFocus: {
type: Boolean,
default: y("noAutoFocus")
},
disposeTimeout: {
type: Number,
default: y("disposeTimeout")
}
},
emits: {
show: () => !0,
hide: () => !0,
"update:shown": (e) => !0,
"apply-show": () => !0,
"apply-hide": () => !0,
"close-group": () => !0,
"close-directive": () => !0,
"auto-hide": () => !0,
resize: () => !0
},
data() {
return {
isShown: !1,
isMounted: !1,
skipTransition: !1,
classes: {
showFrom: !1,
showTo: !1,
hideFrom: !1,
hideTo: !0
},
result: {
x: 0,
y: 0,
placement: "",
strategy: this.strategy,
arrow: {
x: 0,
y: 0,
centerOffset: 0
},
transformOrigin: null
},
randomId: `popper_${[Math.random(), Date.now()].map((e) => e.toString(36).substring(2, 10)).join("_")}`,
shownChildren: /* @__PURE__ */ new Set(),
lastAutoHide: !0,
pendingHide: !1,
containsGlobalTarget: !1,
isDisposed: !0,
mouseDownContains: !1
};
},
computed: {
popperId() {
return this.ariaId != null ? this.ariaId : this.randomId;
},
shouldMountContent() {
return this.eagerMount || this.isMounted;
},
slotData() {
return {
popperId: this.popperId,
isShown: this.isShown,
shouldMountContent: this.shouldMountContent,
skipTransition: this.skipTransition,
autoHide: typeof this.autoHide == "function" ? this.lastAutoHide : this.autoHide,
show: this.show,
hide: this.hide,
handleResize: this.handleResize,
onResize: this.onResize,
classes: {
...this.classes,
popperClass: this.popperClass
},
result: this.positioningDisabled ? null : this.result,
attrs: this.$attrs
};
},
parentPopper() {
var e;
return (e = this[He]) == null ? void 0 : e.parentPopper;
},
hasPopperShowTriggerHover() {
var e, t;
return ((e = this.popperTriggers) == null ? void 0 : e.includes("hover")) || ((t = this.popperShowTriggers) == null ? void 0 : t.includes("hover"));
}
},
watch: {
shown: "$_autoShowHide",
disabled(e) {
e ? this.dispose() : this.init();
},
async container() {
this.isShown && (this.$_ensureTeleport(), await this.$_computePosition());
},
triggers: {
handler: "$_refreshListeners",
deep: !0
},
positioningDisabled: "$_refreshListeners",
...[
"placement",
"distance",
"skidding",
"boundary",
"strategy",
"overflowPadding",
"arrowPadding",
"preventOverflow",
"shift",
"shiftCrossAxis",
"flip"
].reduce((e, t) => (e[t] = "$_computePosition", e), {})
},
created() {
this.autoMinSize && console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'), this.autoMaxSize && console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.");
},
mounted() {
this.init(), this.$_detachPopperNode();
},
activated() {
this.$_autoShowHide();
},
deactivated() {
this.hide();
},
beforeUnmount() {
this.dispose();
},
methods: {
show({ event: e = null, skipDelay: t = !1, force: o = !1 } = {}) {
var i, n;
(i = this.parentPopper) != null && i.lockedChild && this.parentPopper.lockedChild !== this || (this.pendingHide = !1, (o || !this.disabled) && (((n = this.parentPopper) == null ? void 0 : n.lockedChild) === this && (this.parentPopper.lockedChild = null), this.$_scheduleShow(e, t), this.$emit("show"), this.$_showFrameLocked = !0, requestAnimationFrame(() => {
this.$_showFrameLocked = !1;
})), this.$emit("update:shown", !0));
},
hide({ event: e = null, skipDelay: t = !1 } = {}) {
var o;
if (!this.$_hideInProgress) {
if (this.shownChildren.size > 0) {
this.pendingHide = !0;
return;
}
if (this.hasPopperShowTriggerHover && this.$_isAimingPopper()) {
this.parentPopper && (this.parentPopper.lockedChild = this, clearTimeout(this.parentPopper.lockedChildTimer), this.parentPopper.lockedChildTimer = setTimeout(() => {
this.parentPopper.lockedChild === this && (this.parentPopper.lockedChild.hide({ skipDelay: t }), this.parentPopper.lockedChild = null);
}, 1e3));
return;
}
((o = this.parentPopper) == null ? void 0 : o.lockedChild) === this && (this.parentPopper.lockedChild = null), this.pendingHide = !1, this.$_scheduleHide(e, t), this.$emit("hide"), this.$emit("update:shown", !1);
}
},
init() {
var e;
this.isDisposed && (this.isDisposed = !1, this.isMounted = !1, this.$_events = [], this.$_preventShow = !1, this.$_referenceNode = ((e = this.referenceNode) == null ? void 0 : e.call(this)) ?? this.$el, this.$_targetNodes = this.targetNodes().filter((t) => t.nodeType === t.ELEMENT_NODE), this.$_popperNode = this.popperNode(), this.$_innerNode = this.$_popperNode.querySelector(".v-popper__inner"), this.$_arrowNode = this.$_popperNode.querySelector(".v-popper__arrow-container"), this.$_swapTargetAttrs("title", "data-original-title"), this.$_detachPopperNode(), this.triggers.length && this.$_addEventListeners(), this.shown && this.show());
},
dispose() {
this.isDisposed || (this.isDisposed = !0, this.$_removeEventListeners(), this.hide({ skipDelay: !0 }), this.$_detachPopperNode(), this.isMounted = !1, this.isShown = !1, this.$_updateParentShownChildren(!1), this.$_swapTargetAttrs("data-original-title", "title"));
},
async onResize() {
this.isShown && (await this.$_computePosition(), this.$emit("resize"));
},
async $_computePosition() {
if (this.isDisposed || this.positioningDisabled)
return;
const e = {
strategy: this.strategy,
middleware: []
};
(this.distance || this.skidding) && e.middleware.push(ho({
mainAxis: this.distance,
crossAxis: this.skidding
}));
const t = this.placement.startsWith("auto");
if (t ? e.middleware.push(lo({
alignment: this.placement.split("-")[1] ?? ""
})) : e.placement = this.placement, this.preventOverflow && (this.shift && e.middleware.push(uo({
padding: this.overflowPadding,
boundary: this.boundary,
crossAxis: this.shiftCrossAxis
})), !t && this.flip && e.middleware.push(po({
padding: this.overflowPadding,
boundary: this.boundary
}))), e.middleware.push(ro({
element: this.$_arrowNode,
padding: this.arrowPadding
})), this.arrowOverflow && e.middleware.push({
name: "arrowOverflow",
fn: ({ placement: i, rects: n, middlewareData: s }) => {
let r;
const { centerOffset: a } = s.arrow;
return i.startsWith("top") || i.startsWith("bottom") ? r = Math.abs(a) > n.reference.width / 2 : r = Math.abs(a) > n.reference.height / 2, {
data: {
overflow: r
}
};
}
}), this.autoMinSize || this.autoSize) {
const i = this.autoSize ? this.autoSize : this.autoMinSize ? "min" : null;
e.middleware.push({
name: "autoSize",
fn: ({ rects: n, placement: s, middlewareData: r }) => {
var a;
if ((a = r.autoSize) != null && a.skip)
return {};
let l, d;
return s.startsWith("top") || s.startsWith("bottom") ? l = n.reference.width : d = n.reference.height, this.$_innerNode.style[i === "min" ? "minWidth" : i === "max" ? "maxWidth" : "width"] = l != null ? `${l}px` : null, this.$_innerNode.style[i === "min" ? "minHeight" : i === "max" ? "maxHeight" : "height"] = d != null ? `${d}px` : null, {
data: {
skip: !0
},
reset: {
rects: !0
}
};
}
});
}
(this.autoMaxSize || this.autoBoundaryMaxSize) && (this.$_innerNode.style.maxWidth = null, this.$_innerNode.style.maxHeight = null, e.middleware.push(fo({
boundary: this.boundary,
padding: this.overflowPadding,
apply: ({ availableWidth: i, availableHeight: n }) => {
this.$_innerNode.style.maxWidth = i != null ? `${i}px` : null, this.$_innerNode.style.maxHeight = n != null ? `${n}px` : null;
}
})));
const o = await vo(this.$_referenceNode, this.$_popperNode, e);
Object.assign(this.result, {
x: o.x,
y: o.y,
placement: o.placement,
strategy: o.strategy,
arrow: {
...o.middlewareData.arrow,
...o.middlewareData.arrowOverflow
}
});
},
$_scheduleShow(e, t = !1) {
if (this.$_updateParentShownChildren(!0), this.$_hideInProgress = !1, clearTimeout(this.$_scheduleTimer), X && this.instantMove && X.instantMove && X !== this.parentPopper) {
X.$_applyHide(!0), this.$_applyShow(!0);
return;
}
t ? this.$_applyShow() : this.$_scheduleTimer = setTimeout(this.$_applyShow.bind(this), this.$_computeDelay("show"));
},
$_scheduleHide(e, t = !1) {
if (this.shownChildren.size > 0) {
this.pendingHide = !0;
return;
}
this.$_updateParentShownChildren(!1), this.$_hideInProgress = !0, clearTimeout(this.$_scheduleTimer), this.isShown && (X = this), t ? this.$_applyHide() : this.$_scheduleTimer = setTimeout(this.$_applyHide.bind(this), this.$_computeDelay("hide"));
},
$_computeDelay(e) {
const t = this.delay;
return parseInt(t && t[e] || t || 0);
},
async $_applyShow(e = !1) {
clearTimeout(this.$_disposeTimer), clearTimeout(this.$_scheduleTimer), this.skipTransition = e, !this.isShown && (this.$_ensureTeleport(), await ke(), await this.$_computePosition(), await this.$_applyShowEffect(), this.positioningDisabled || this.$_registerEventListeners([
...xe(this.$_referenceNode),
...xe(this.$_popperNode)
], "scroll", () => {
this.$_computePosition();
}));
},
async $_applyShowEffect() {
if (this.$_hideInProgress)
return;
if (this.computeTransformOrigin) {
const t = this.$_referenceNode.getBoundingClientRect(), o = this.$_popperNode.querySelector(".v-popper__wrapper"), i = o.parentNode.getBoundingClientRect(), n = t.x + t.width / 2 - (i.left + o.offsetLeft), s = t.y + t.height / 2 - (i.top + o.offsetTop);
this.result.transformOrigin = `${n}px ${s}px`;
}
this.isShown = !0, this.$_applyAttrsToTarget({
"aria-describedby": this.popperId,
"data-popper-shown": ""
});
const e = this.showGroup;
if (e) {
let t;
for (let o = 0; o < N.length; o++)
t = N[o], t.showGroup !== e && (t.hide(), t.$emit("close-group"));
}
N.push(this), document.body.classList.add("v-popper--some-open");
for (const t of tt(this.theme))
rt(t).push(this), document.body.classList.add(`v-popper--some-open--${t}`);
this.$emit("apply-show"), this.classes.showFrom = !0, this.classes.showTo = !1, this.classes.hideFrom = !1, this.classes.hideTo = !1, await ke(), this.classes.showFrom = !1, this.classes.showTo = !0, this.noAutoFocus || this.$_popperNode.focus();
},
async $_applyHide(e = !1) {
if (this.shownChildren.size > 0) {
this.pendingHide = !0, this.$_hideInProgress = !1;
return;
}
if (clearTimeout(this.$_scheduleTimer), !this.isShown)
return;
this.skipTransition = e, nt(N, this), N.length === 0 && document.body.classList.remove("v-popper--some-open");
for (const o of tt(this.theme)) {
const i = rt(o);
nt(i, this), i.length === 0 && document.body.classList.remove(`v-popper--some-open--${o}`);
}
X === this && (X = null), this.isShown = !1, this.$_applyAttrsToTarget({
"aria-describedby": void 0,
"data-popper-shown": void 0
}), clearTimeout(this.$_disposeTimer);
const t = this.disposeTimeout;
t !== null && (this.$_disposeTimer = setTimeout(() => {
this.$_popperNode && (this.$_detachPopperNode(), this.isMounted = !1);
}, t)), this.$_removeEventListeners("scroll"), this.$emit("apply-hide"), this.classes.showFrom = !1, this.classes.showTo = !1, this.classes.hideFrom = !0, this.classes.hideTo = !1, await ke(), this.classes.hideFrom = !1, this.classes.hideTo = !0;
},
$_autoShowHide() {
this.shown ? this.show() : this.hide();
},
$_ensureTeleport() {
if (this.isDisposed)
return;
let e = this.container;
if (typeof e == "string" ? e = window.document.querySelector(e) : e === !1 && (e = this.$_targetNodes[0].parentNode), !e)
throw new Error("No container for popover: " + this.container);
e.appendChild(this.$_popperNode), this.isMounted = !0;
},
$_addEventListeners() {
const e = (o) => {
this.isShown && !this.$_hideInProgress || (o.usedByTooltip = !0, !this.$_preventShow && this.show({ event: o }));
};
this.$_registerTriggerListeners(this.$_targetNodes, ot, this.triggers, this.showTriggers, e), this.$_registerTriggerListeners([this.$_popperNode], ot, this.popperTriggers, this.popperShowTriggers, e);
const t = (o) => {
o.usedByTooltip || this.hide({ event: o });
};
this.$_registerTriggerListeners(this.$_targetNodes, it, this.triggers, this.hideTriggers, t), this.$_registerTriggerListeners([this.$_popperNode], it, this.popperTriggers, this.popperHideTriggers, t);
},
$_registerEventListeners(e, t, o) {
this.$_events.push({ targetNodes: e, eventType: t, handler: o }), e.forEach((i) => i.addEventListener(t, o, oe ? {
passive: !0
} : void 0));
},
$_registerTriggerListeners(e, t, o, i, n) {
let s = o;
i != null && (s = typeof i == "function" ? i(s) : i), s.forEach((r) => {
const a = t[r];
a && this.$_registerEventListeners(e, a, n);
});
},
$_removeEventListeners(e) {
const t = [];
this.$_events.forEach((o) => {
const { targetNodes: i, eventType: n, handler: s } = o;
!e || e === n ? i.forEach((r) => r.removeEventListener(n, s)) : t.push(o);
}), this.$_events = t;
},
$_refreshListeners() {
this.isDisposed || (this.$_removeEventListeners(), this.$_addEventListeners());
},
$_handleGlobalClose(e, t = !1) {
this.$_showFrameLocked || (this.hide({ event: e }), e.closePopover ? this.$emit("close-directive") : this.$emit("auto-hide"), t && (this.$_preventShow = !0, setTimeout(() => {
this.$_preventShow = !1;
}, 300)));
},
$_detachPopperNode() {
this.$_popperNode.parentNode && this.$_popperNode.parentNode.removeChild(this.$_popperNode);
},
$_swapTargetAttrs(e, t) {
for (const o of this.$_targetNodes) {
const i = o.getAttribute(e);
i && (o.removeAttribute(e), o.setAttribute(t, i));
}
},
$_applyAttrsToTarget(e) {
for (const t of this.$_targetNodes)
for (const o in e) {
const i = e[o];
i == null ? t.removeAttribute(o) : t.setAttribute(o, i);
}
},
$_updateParentShownChildren(e) {
let t = this.parentPopper;
for (; t; )
e ? t.shownChildren.add(this.randomId) : (t.shownChildren.delete(this.randomId), t.pendingHide && t.hide()), t = t.parentPopper;
},
$_isAimingPopper() {
const e = this.$_referenceNode.getBoundingClientRect();
if (se >= e.left && se <= e.right && re >= e.top && re <= e.bottom) {
const t = this.$_popperNode.getBoundingClientRect(), o = se - V, i = re - q, n = t.left + t.width / 2 - V + (t.top + t.height / 2) - q + t.width + t.height, s = V + o * n, r = q + i * n;
return me(V, q, s, r, t.left, t.top, t.left, t.bottom) || // Left edge
me(V, q, s, r, t.left, t.top, t.right, t.top) || // Top edge
me(V, q, s, r, t.right, t.top, t.right, t.bottom) || // Right edge
me(V, q, s, r, t.left, t.bottom, t.right, t.bottom);
}
return !1;
}
},
render() {
return this.$slots.default(this.slotData);
}
});
if (typeof document < "u" && typeof window < "u") {
if (At) {
const e = oe ? {
passive: !0,
capture: !0
} : !0;
document.addEventListener("touchstart", (t) => at(t, !0), e), document.addEventListener("touchend", (t) => lt(t, !0), e);
} else
window.addEventListener("mousedown", (e) => at(e, !1), !0), window.addEventListener("click", (e) => lt(e, !1), !0);
window.addEventListener("resize", _o);
}
function at(e, t) {
if (H.autoHideOnMousedown)
zt(e, t);
else
for (let o = 0; o < N.length; o++) {
const i = N[o];
try {
i.mouseDownContains = i.popperNode().contains(e.target);
} catch {
}
}
}
function lt(e, t) {
H.autoHideOnMousedown || zt(e, t);
}
function zt(e, t) {
const o = {};
for (let i = N.length - 1; i >= 0; i--) {
const n = N[i];
try {
const s = n.containsGlobalTarget = n.mouseDownContains || n.popperNode().contains(e.target);
n.pendingHide = !1, requestAnimationFrame(() => {
if (n.pendingHide = !1, !o[n.randomId] && dt(n, s, e)) {
if (n.$_handleGlobalClose(e, t), !e.closeAllPopover && e.closePopover && s) {
let a = n.parentPopper;
for (; a; )
o[a.randomId] = !0, a = a.parentPopper;
return;
}
let r = n.parentPopper;
for (; r && dt(r, r.containsGlobalTarget, e); )
r.$_handleGlobalClose(e, t), r = r.parentPopper;
}
});
} catch {
}
}
}
function dt(e, t, o) {
return o.closeAllPopover || o.closePopover && t || $o(e, o) && !t;
}
function $o(e, t) {
if (typeof e.autoHide == "function") {
const o = e.autoHide(t);
return e.lastAutoHide = o, o;
}
return e.autoHide;
}
function _o() {
for (let e = 0; e < N.length; e++)
N[e].$_computePosition();
}
let V = 0, q = 0, se = 0, re = 0;
typeof window < "u" &&