(globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["object" == typeof document ? document.currentScript : void 0, {
488511: e => {
"use strict";
e.s({
clamp: () => c,
createCoords: () => a,
evaluate: () => u,
floor: () => l,
getAlignment: () => m,
getAlignmentAxis: () => w,
getAlignmentSides: () => y,
getAxisLength: () => p,
getExpandedPlacements: () => x,
getOppositeAlignmentPlacement: () => v,
getOppositeAxis: () => g,
getOppositeAxisPlacements: () => b,
getOppositePlacement: () => A,
getPaddingObject: () => S,
getSide: () => d,
getSideAxis: () => h,
max: () => r,
min: () => i,
placements: () => n,
rectToClientRect: () => E,
round: () => o,
sides: () => t
});
let t = ["top", "right", "bottom", "left"],
n = t.reduce((e, t) => e.concat(t, t + "-start", t + "-end"), []),
i = Math.min,
r = Math.max,
o = Math.round,
l = Math.floor,
a = e => ({
x: e,
y: e
}),
s = {
left: "right",
right: "left",
bottom: "top",
top: "bottom"
},
f = {
start: "end",
end: "start"
};
function c(e, t, n) {
return r(e, i(t, n))
}
function u(e, t) {
return "function" == typeof e ? e(t) : e
}
function d(e) {
return e.split("-")[0]
}
function m(e) {
return e.split("-")[1]
}
function g(e) {
return "x" === e ? "y" : "x"
}
function p(e) {
return "y" === e ? "height" : "width"
}
function h(e) {
return ["top", "bottom"].includes(d(e)) ? "y" : "x"
}
function w(e) {
return g(h(e))
}
function y(e, t, n) {
void 0 === n && (n = !1);
let i = m(e),
r = w(e),
o = p(r),
l = "x" === r ? i === (n ? "end" : "start") ? "right" : "left" : "start" === i ? "bottom" : "top";
return t.reference[o] > t.floating[o] && (l = A(l)), [l, A(l)]
}
function x(e) {
let t = A(e);
return [v(e), t, v(t)]
}
function v(e) {
return e.replace(/start|end/g, e => f[e])
}
function b(e, t, n, i) {
let r = m(e),
o = function(e, t, n) {
let i = ["left", "right"],
r = ["right", "left"];
switch (e) {
case "top":
case "bottom":
if (n) return t ? r : i;
return t ? i : r;
case "left":
case "right":
return t ? ["top", "bottom"] : ["bottom", "top"];
default:
return []
}
}(d(e), "start" === n, i);
return r && (o = o.map(e => e + "-" + r), t && (o = o.concat(o.map(v)))), o
}
function A(e) {
return e.replace(/left|right|bottom|top/g, e => s[e])
}
function S(e) {
return "number" != typeof e ? {
top: 0,
right: 0,
bottom: 0,
left: 0,
...e
} : {
top: e,
right: e,
bottom: e,
left: e
}
}
function E(e) {
let {
x: t,
y: n,
width: i,
height: r
} = e;
return {
width: i,
height: r,
top: n,
left: t,
right: t + i,
bottom: n + r,
x: t,
y: n
}
}
},
838757: e => {
"use strict";
e.s({
arrow: () => o,
autoPlacement: () => l,
computePosition: () => i,
detectOverflow: () => r,
flip: () => a,
hide: () => c,
inline: () => d,
limitShift: () => h,
offset: () => g,
shift: () => p,
size: () => w
});
var t = e.i(488511);
function n(e, n, i) {
let r, {
reference: o,
floating: l
} = e,
a = (0, t.getSideAxis)(n),
s = (0, t.getAlignmentAxis)(n),
f = (0, t.getAxisLength)(s),
c = (0, t.getSide)(n),
u = "y" === a,
d = o.x + o.width / 2 - l.width / 2,
m = o.y + o.height / 2 - l.height / 2,
g = o[f] / 2 - l[f] / 2;
switch (c) {
case "top":
r = {
x: d,
y: o.y - l.height
};
break;
case "bottom":
r = {
x: d,
y: o.y + o.height
};
break;
case "right":
r = {
x: o.x + o.width,
y: m
};
break;
case "left":
r = {
x: o.x - l.width,
y: m
};
break;
default:
r = {
x: o.x,
y: o.y
}
}
switch ((0, t.getAlignment)(n)) {
case "start":
r[s] -= g * (i && u ? -1 : 1);
break;
case "end":
r[s] += g * (i && u ? -1 : 1)
}
return r
}
let i = async (e, t, i) => {
let {
placement: r = "bottom",
strategy: o = "absolute",
middleware: l = [],
platform: a
} = i, s = l.filter(Boolean), f = await (null == a.isRTL ? void 0 : a.isRTL(t)), c = await a.getElementRects({
reference: e,
floating: t,
strategy: o
}), {
x: u,
y: d
} = n(c, r, f), m = r, g = {}, p = 0;
for (let i = 0; i < s.length; i++) {
let {
name: l,
fn: h
} = s[i], {
x: w,
y: y,
data: x,
reset: v
} = await h({
x: u,
y: d,
initialPlacement: r,
placement: m,
strategy: o,
middlewareData: g,
rects: c,
platform: a,
elements: {
reference: e,
floating: t
}
});
u = null != w ? w : u, d = null != y ? y : d, g = {
...g,
[l]: {
...g[l],
...x
}
}, v && p <= 50 && (p++, "object" == typeof v && (v.placement && (m = v.placement), v.rects && (c = !0 === v.rects ? await a.getElementRects({
reference: e,
floating: t,
strategy: o
}) : v.rects), {
x: u,
y: d
} = n(c, m, f)), i = -1)
}
return {
x: u,
y: d,
placement: m,
strategy: o,
middlewareData: g
}
};
async function r(e, n) {
var i;
void 0 === n && (n = {});
let {
x: r,
y: o,
platform: l,
rects: a,
elements: s,
strategy: f
} = e, {
boundary: c = "clippingAncestors",
rootBoundary: u = "viewport",
elementContext: d = "floating",
altBoundary: m = !1,
padding: g = 0
} = (0, t.evaluate)(n, e), p = (0, t.getPaddingObject)(g), h = s[m ? "floating" === d ? "reference" : "floating" : d], w = (0, t.rectToClientRect)(await l.getClippingRect({
element: null == (i = await (null == l.isElement ? void 0 : l.isElement(h))) || i ? h : h.contextElement || await (null == l.getDocumentElement ? void 0 : l.getDocumentElement(s.floating)),
boundary: c,
rootBoundary: u,
strategy: f
})), y = "floating" === d ? {
x: r,
y: o,
width: a.floating.width,
height: a.floating.height
} : a.reference, x = await (null == l.getOffsetParent ? void 0 : l.getOffsetParent(s.floating)), v = await (null == l.isElement ? void 0 : l.isElement(x)) && await (null == l.getScale ? void 0 : l.getScale(x)) || {
x: 1,
y: 1
}, b = (0, t.rectToClientRect)(l.convertOffsetParentRelativeRectToViewportRelativeRect ? await l.convertOffsetParentRelativeRectToViewportRelativeRect({
elements: s,
rect: y,
offsetParent: x,
strategy: f
}) : y);
return {
top: (w.top - b.top + p.top) / v.y,
bottom: (b.bottom - w.bottom + p.bottom) / v.y,
left: (w.left - b.left + p.left) / v.x,
right: (b.right - w.right + p.right) / v.x
}
}
let o = e => ({
name: "arrow",
options: e,
async fn(n) {
let {
x: i,
y: r,
placement: o,
rects: l,
platform: a,
elements: s,
middlewareData: f
} = n, {
element: c,
padding: u = 0
} = (0, t.evaluate)(e, n) || {};
if (null == c) return {};
let d = (0, t.getPaddingObject)(u),
m = {
x: i,
y: r
},
g = (0, t.getAlignmentAxis)(o),
p = (0, t.getAxisLength)(g),
h = await a.getDimensions(c),
w = "y" === g,
y = w ? "clientHeight" : "clientWidth",
x = l.reference[p] + l.reference[g] - m[g] - l.floating[p],
v = m[g] - l.reference[g],
b = await (null == a.getOffsetParent ? void 0 : a.getOffsetParent(c)),
A = b ? b[y] : 0;
A && await (null == a.isElement ? void 0 : a.isElement(b)) || (A = s.floating[y] || l.floating[p]);
let S = A / 2 - h[p] / 2 - 1,
E = (0, t.min)(d[w ? "top" : "left"], S),
R = (0, t.min)(d[w ? "bottom" : "right"], S),
C = A - h[p] - R,
T = A / 2 - h[p] / 2 + (x / 2 - v / 2),
P = (0, t.clamp)(E, T, C),
L = !f.arrow && null != (0, t.getAlignment)(o) && T !== P && l.reference[p] / 2 - (T < E ? E : R) - h[p] / 2 < 0,
O = L ? T < E ? T - E : T - C : 0;
return {
[g]: m[g] + O,
data: {
[g]: P,
centerOffset: T - P - O,
...L && {
alignmentOffset: O
}
},
reset: L
}
}
}),
l = function(e) {
return void 0 === e && (e = {}), {
name: "autoPlacement",
options: e,
async fn(n) {
var i, o, l, a;
let {
rects: s,
middlewareData: f,
placement: c,
platform: u,
elements: d
} = n, {
crossAxis: m = !1,
alignment: g,
allowedPlacements: p = t.placements,
autoAlignment: h = !0,
...w
} = (0, t.evaluate)(e, n), y = void 0 !== g || p === t.placements ? ((a = g || null) ? [...p.filter(e => (0, t.getAlignment)(e) === a), ...p.filter(e => (0, t.getAlignment)(e) !== a)] : p.filter(e => (0, t.getSide)(e) === e)).filter(e => !a || (0, t.getAlignment)(e) === a || !!h && (0, t.getOppositeAlignmentPlacement)(e) !== e) : p, x = await r(n, w), v = (null == (i = f.autoPlacement) ? void 0 : i.index) || 0, b = y[v];
if (null == b) return {};
let A = (0, t.getAlignmentSides)(b, s, await (null == u.isRTL ? void 0 : u.isRTL(d.floating)));
if (c !== b) return {
reset: {
placement: y[0]
}
};
let S = [x[(0, t.getSide)(b)], x[A[0]], x[A[1]]],
E = [...(null == (o = f.autoPlacement) ? void 0 : o.overflows) || [], {
placement: b,
overflows: S
}],
R = y[v + 1];
if (R) return {
data: {
index: v + 1,
overflows: E
},
reset: {
placement: R
}
};
let C = E.map(e => {
let n = (0, t.getAlignment)(e.placement);
return [e.placement, n && m ? e.overflows.slice(0, 2).reduce((e, t) => e + t, 0) : e.overflows[0], e.overflows]
}).sort((e, t) => e[1] - t[1]),
T = (null == (l = C.filter(e => e[2].slice(0, (0, t.getAlignment)(e[0]) ? 2 : 3).every(e => e <= 0))[0]) ? void 0 : l[0]) || C[0][0];
return T !== c ? {
data: {
index: v + 1,
overflows: E
},
reset: {
placement: T
}
} : {}
}
}
},
a = function(e) {
return void 0 === e && (e = {}), {
name: "flip",
options: e,
async fn(n) {
var i, o, l, a, s;
let {
placement: f,
middlewareData: c,
rects: u,
initialPlacement: d,
platform: m,
elements: g
} = n, {
mainAxis: p = !0,
crossAxis: h = !0,
fallbackPlacements: w,
fallbackStrategy: y = "bestFit",
fallbackAxisSideDirection: x = "none",
flipAlignment: v = !0,
...b
} = (0, t.evaluate)(e, n);
if (null != (i = c.arrow) && i.alignmentOffset) return {};
let A = (0, t.getSide)(f),
S = (0, t.getSideAxis)(d),
E = (0, t.getSide)(d) === d,
R = await (null == m.isRTL ? void 0 : m.isRTL(g.floating)),
C = w || (E || !v ? [(0, t.getOppositePlacement)(d)] : (0, t.getExpandedPlacements)(d)),
T = "none" !== x;
!w && T && C.push(...(0, t.getOppositeAxisPlacements)(d, v, x, R));
let P = [d, ...C],
L = await r(n, b),
O = [],
N = (null == (o = c.flip) ? void 0 : o.overflows) || [];
if (p && O.push(L[A]), h) {
let e = (0, t.getAlignmentSides)(f, u, R);
O.push(L[e[0]], L[e[1]])
}
if (N = [...N, {
placement: f,
overflows: O
}], !O.every(e => e <= 0)) {
let e = ((null == (l = c.flip) ? void 0 : l.index) || 0) + 1,
n = P[e];
if (n) return {
data: {
index: e,
overflows: N
},
reset: {
placement: n
}
};
let i = null == (a = N.filter(e => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0]) ? void 0 : a.placement;
if (!i) switch (y) {
case "bestFit": {
let e = null == (s = N.filter(e => {
if (T) {
let n = (0, t.getSideAxis)(e.placement);
return n === S || "y" === n
}
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]) ? void 0 : s[0];
e && (i = e);
break
}
case "initialPlacement":
i = d
}
if (f !== i) return {
reset: {
placement: i
}
}
}
return {}
}
}
};
function s(e, t) {
return {
top: e.top - t.height,
right: e.right - t.width,
bottom: e.bottom - t.height,
left: e.left - t.width
}
}
function f(e) {
return t.sides.some(t => e[t] >= 0)
}
let c = function(e) {
return void 0 === e && (e = {}), {
name: "hide",
options: e,
async fn(n) {
let {
rects: i
} = n, {
strategy: o = "referenceHidden",
...l
} = (0, t.evaluate)(e, n);
switch (o) {
case "referenceHidden": {
let e = s(await r(n, {
...l,
elementContext: "reference"
}), i.reference);
return {
data: {
referenceHiddenOffsets: e,
referenceHidden: f(e)
}
}
}
case "escaped": {
let e = s(await r(n, {
...l,
altBoundary: !0
}), i.floating);
return {
data: {
escapedOffsets: e,
escaped: f(e)
}
}
}
default:
return {}
}
}
}
};
function u(e) {
let n = (0, t.min)(...e.map(e => e.left)),
i = (0, t.min)(...e.map(e => e.top));
return {
x: n,
y: i,
width: (0, t.max)(...e.map(e => e.right)) - n,
height: (0, t.max)(...e.map(e => e.bottom)) - i
}
}
let d = function(e) {
return void 0 === e && (e = {}), {
name: "inline",
options: e,
async fn(n) {
let {
placement: i,
elements: r,
rects: o,
platform: l,
strategy: a
} = n, {
padding: s = 2,
x: f,
y: c
} = (0, t.evaluate)(e, n), d = Array.from(await (null == l.getClientRects ? void 0 : l.getClientRects(r.reference)) || []), m = function(e) {
let n = e.slice().sort((e, t) => e.y - t.y),
i = [],
r = null;
for (let e = 0; e < n.length; e++) {
let t = n[e];
!r || t.y - r.y > r.height / 2 ? i.push([t]) : i[i.length - 1].push(t), r = t
}
return i.map(e => (0, t.rectToClientRect)(u(e)))
}(d), g = (0, t.rectToClientRect)(u(d)), p = (0, t.getPaddingObject)(s), h = await l.getElementRects({
reference: {
getBoundingClientRect: function() {
if (2 === m.length && m[0].left > m[1].right && null != f && null != c) return m.find(e => f > e.left - p.left && f < e.right + p.right && c > e.top - p.top && c < e.bottom + p.bottom) || g;
if (m.length >= 2) {
if ("y" === (0, t.getSideAxis)(i)) {
let e = m[0],
n = m[m.length - 1],
r = "top" === (0, t.getSide)(i),
o = e.top,
l = n.bottom,
a = r ? e.left : n.left,
s = r ? e.right : n.right;
return {
top: o,
bottom: l,
left: a,
right: s,
width: s - a,
height: l - o,
x: a,
y: o
}
}
let e = "left" === (0, t.getSide)(i),
n = (0, t.max)(...m.map(e => e.right)),
r = (0, t.min)(...m.map(e => e.left)),
o = m.filter(t => e ? t.left === r : t.right === n),
l = o[0].top,
a = o[o.length - 1].bottom;
return {
top: l,
bottom: a,
left: r,
right: n,
width: n - r,
height: a - l,
x: r,
y: l
}
}
return g
}
},
floating: r.floating,
strategy: a
});
return o.reference.x !== h.reference.x || o.reference.y !== h.reference.y || o.reference.width !== h.reference.width || o.reference.height !== h.reference.height ? {
reset: {
rects: h
}
} : {}
}
}
};
async function m(e, n) {
let {
placement: i,
platform: r,
elements: o
} = e, l = await (null == r.isRTL ? void 0 : r.isRTL(o.floating)), a = (0, t.getSide)(i), s = (0, t.getAlignment)(i), f = "y" === (0, t.getSideAxis)(i), c = ["left", "top"].includes(a) ? -1 : 1, u = l && f ? -1 : 1, d = (0, t.evaluate)(n, e), {
mainAxis: m,
crossAxis: g,
alignmentAxis: p
} = "number" == typeof d ? {
mainAxis: d,
crossAxis: 0,
alignmentAxis: null
} : {
mainAxis: d.mainAxis || 0,
crossAxis: d.crossAxis || 0,
alignmentAxis: d.alignmentAxis
};
return s && "number" == typeof p && (g = "end" === s ? -1 * p : p), f ? {
x: g * u,
y: m * c
} : {
x: m * c,
y: g * u
}
}
let g = function(e) {
return void 0 === e && (e = 0), {
name: "offset",
options: e,
async fn(t) {
var n, i;
let {
x: r,
y: o,
placement: l,
middlewareData: a
} = t, s = await m(t, e);
return l === (null == (n = a.offset) ? void 0 : n.placement) && null != (i = a.arrow) && i.alignmentOffset ? {} : {
x: r + s.x,
y: o + s.y,
data: {
...s,
placement: l
}
}
}
}
},
p = function(e) {
return void 0 === e && (e = {}), {
name: "shift",
options: e,
async fn(n) {
let {
x: i,
y: o,
placement: l
} = n, {
mainAxis: a = !0,
crossAxis: s = !1,
limiter: f = {
fn: e => {
let {
x: t,
y: n
} = e;
return {
x: t,
y: n
}
}
},
...c
} = (0, t.evaluate)(e, n), u = {
x: i,
y: o
}, d = await r(n, c), m = (0, t.getSideAxis)((0, t.getSide)(l)), g = (0, t.getOppositeAxis)(m), p = u[g], h = u[m];
if (a) {
let e = "y" === g ? "top" : "left",
n = "y" === g ? "bottom" : "right",
i = p + d[e],
r = p - d[n];
p = (0, t.clamp)(i, p, r)
}
if (s) {
let e = "y" === m ? "top" : "left",
n = "y" === m ? "bottom" : "right",
i = h + d[e],
r = h - d[n];
h = (0, t.clamp)(i, h, r)
}
let w = f.fn({
...n,
[g]: p,
[m]: h
});
return {
...w,
data: {
x: w.x - i,
y: w.y - o,
enabled: {
[g]: a,
[m]: s
}
}
}
}
}
},
h = function(e) {
return void 0 === e && (e = {}), {
options: e,
fn(n) {
let {
x: i,
y: r,
placement: o,
rects: l,
middlewareData: a
} = n, {
offset: s = 0,
mainAxis: f = !0,
crossAxis: c = !0
} = (0, t.evaluate)(e, n), u = {
x: i,
y: r
}, d = (0, t.getSideAxis)(o), m = (0, t.getOppositeAxis)(d), g = u[m], p = u[d], h = (0, t.evaluate)(s, n), w = "number" == typeof h ? {
mainAxis: h,
crossAxis: 0
} : {
mainAxis: 0,
crossAxis: 0,
...h
};
if (f) {
let e = "y" === m ? "height" : "width",
t = l.reference[m] - l.floating[e] + w.mainAxis,
n = l.reference[m] + l.reference[e] - w.mainAxis;
g < t ? g = t : g > n && (g = n)
}
if (c) {
var y, x;
let e = "y" === m ? "width" : "height",
n = ["top", "left"].includes((0, t.getSide)(o)),
i = l.reference[d] - l.floating[e] + (n && (null == (y = a.offset) ? void 0 : y[d]) || 0) + (n ? 0 : w.crossAxis),
r = l.reference[d] + l.reference[e] + (n ? 0 : (null == (x = a.offset) ? void 0 : x[d]) || 0) - (n ? w.crossAxis : 0);
p < i ? p = i : p > r && (p = r)
}
return {
[m]: g,
[d]: p
}
}
}
},
w = function(e) {
return void 0 === e && (e = {}), {
name: "size",
options: e,
async fn(n) {
var i, o;
let l, a, {
placement: s,
rects: f,
platform: c,
elements: u
} = n,
{
apply: d = () => {},
...m
} = (0, t.evaluate)(e, n),
g = await r(n, m),
p = (0, t.getSide)(s),
h = (0, t.getAlignment)(s),
w = "y" === (0, t.getSideAxis)(s),
{
width: y,
height: x
} = f.floating;
"top" === p || "bottom" === p ? (l = p, a = h === (await (null == c.isRTL ? void 0 : c.isRTL(u.floating)) ? "start" : "end") ? "left" : "right") : (a = p, l = "end" === h ? "top" : "bottom");
let v = x - g.top - g.bottom,
b = y - g.left - g.right,
A = (0, t.min)(x - g[l], v),
S = (0, t.min)(y - g[a], b),
E = !n.middlewareData.shift,
R = A,
C = S;
if (null != (i = n.middlewareData.shift) && i.enabled.x && (C = b), null != (o = n.middlewareData.shift) && o.enabled.y && (R = v), E && !h) {
let e = (0, t.max)(g.left, 0),
n = (0, t.max)(g.right, 0),
i = (0, t.max)(g.top, 0),
r = (0, t.max)(g.bottom, 0);
w ? C = y - 2 * (0 !== e || 0 !== n ? e + n : (0, t.max)(g.left, g.right)) : R = x - 2 * (0 !== i || 0 !== r ? i + r : (0, t.max)(g.top, g.bottom))
}
await d({
...n,
availableWidth: C,
availableHeight: R
});
let T = await c.getDimensions(u.floating);
return y !== T.width || x !== T.height ? {
reset: {
rects: !0
}
} : {}
}
}
}
},
158783: e => {
"use strict";
function t() {
return "undefined" != typeof window
}
function n(e) {
return o(e) ? (e.nodeName || "").toLowerCase() : "#document"
}
function i(e) {
var t;
return (null == e || null == (t = e.ownerDocument) ? void 0 : t.defaultView) || window
}
function r(e) {
var t;
return null == (t = (o(e) ? e.ownerDocument : e.document) || window.document) ? void 0 : t.documentElement
}
function o(e) {
return !!t() && (e instanceof Node || e instanceof i(e).Node)
}
function l(e) {
return !!t() && (e instanceof Element || e instanceof i(e).Element)
}
function a(e) {
return !!t() && (e instanceof HTMLElement || e instanceof i(e).HTMLElement)
}
function s(e) {
return !!t() && "undefined" != typeof ShadowRoot && (e instanceof ShadowRoot || e instanceof i(e).ShadowRoot)
}
function f(e) {
let {
overflow: t,
overflowX: n,
overflowY: i,
display: r
} = h(e);
return /auto|scroll|overlay|hidden|clip/.test(t + i + n) && !["inline", "contents"].includes(r)
}
function c(e) {
return ["table", "td", "th"].includes(n(e))
}
function u(e) {
return [":popover-open", ":modal"].some(t => {
try {
return e.matches(t)
} catch (e) {
return !1
}
})
}
function d(e) {
let t = g(),
n = l(e) ? h(e) : e;
return ["transform", "translate", "scale", "rotate", "perspective"].some(e => !!n[e] && "none" !== n[e]) || !!n.containerType && "normal" !== n.containerType || !t && !!n.backdropFilter && "none" !== n.backdropFilter || !t && !!n.filter && "none" !== n.filter || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some(e => (n.willChange || "").includes(e)) || ["paint", "layout", "strict", "content"].some(e => (n.contain || "").includes(e))
}
function m(e) {
let t = y(e);
for (; a(t) && !p(t);) {
if (d(t)) return t;
if (u(t)) break;
t = y(t)
}
return null
}
function g() {
return "undefined" != typeof CSS && !!CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")
}
function p(e) {
return ["html", "body", "#document"].includes(n(e))
}
function h(e) {
return i(e).getComputedStyle(e)
}
function w(e) {
return l(e) ? {
scrollLeft: e.scrollLeft,
scrollTop: e.scrollTop
} : {
scrollLeft: e.scrollX,
scrollTop: e.scrollY
}
}
function y(e) {
if ("html" === n(e)) return e;
let t = e.assignedSlot || e.parentNode || s(e) && e.host || r(e);
return s(t) ? t.host : t
}
function x(e) {
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null
}
e.s({
getComputedStyle: () => h,
getContainingBlock: () => m,
getDocumentElement: () => r,
getFrameElement: () => x,
getNodeName: () => n,
getNodeScroll: () => w,
getOverflowAncestors: () => function e(t, n, r) {
var o;
void 0 === n && (n = []), void 0 === r && (r = !0);
let l = function e(t) {
let n = y(t);
return p(n) ? t.ownerDocument ? t.ownerDocument.body : t.body : a(n) && f(n) ? n : e(n)
}(t),
s = l === (null == (o = t.ownerDocument) ? void 0 : o.body),
c = i(l);
if (s) {
let t = x(c);
return n.concat(c, c.visualViewport || [], f(l) ? l : [], t && r ? e(t) : [])
}
return n.concat(l, e(l, [], r))
},
getParentNode: () => y,
getWindow: () => i,
isContainingBlock: () => d,
isElement: () => l,
isHTMLElement: () => a,
isLastTraversableNode: () => p,
isOverflowElement: () => f,
isTableElement: () => c,
isTopLayer: () => u,
isWebKit: () => g
})
},
718315: e => {
"use strict";
e.s({
arrow: () => C,
autoPlacement: () => b,
autoUpdate: () => x,
computePosition: () => L,
flip: () => S,
hide: () => R,
inline: () => T,
limitShift: () => P,
offset: () => v,
shift: () => A,
size: () => E
});
var t = e.i(488511),
n = e.i(838757),
i = e.i(158783);
function r(e) {
let n = (0, i.getComputedStyle)(e),
r = parseFloat(n.width) || 0,
o = parseFloat(n.height) || 0,
l = (0, i.isHTMLElement)(e),
a = l ? e.offsetWidth : r,
s = l ? e.offsetHeight : o,
f = (0, t.round)(r) !== a || (0, t.round)(o) !== s;
return f && (r = a, o = s), {
width: r,
height: o,
$: f
}
}
function o(e) {
return (0, i.isElement)(e) ? e : e.contextElement
}
function l(e) {
let n = o(e);
if (!(0, i.isHTMLElement)(n)) return (0, t.createCoords)(1);
let l = n.getBoundingClientRect(),
{
width: a,
height: s,
$: f
} = r(n),
c = (f ? (0, t.round)(l.width) : l.width) / a,
u = (f ? (0, t.round)(l.height) : l.height) / s;
return c && Number.isFinite(c) || (c = 1), u && Number.isFinite(u) || (u = 1), {
x: c,
y: u
}
}
let a = (0, t.createCoords)(0);
function s(e) {
let t = (0, i.getWindow)(e);
return (0, i.isWebKit)() && t.visualViewport ? {
x: t.visualViewport.offsetLeft,
y: t.visualViewport.offsetTop
} : a
}
function f(e, n, r, a) {
var f;
void 0 === n && (n = !1), void 0 === r && (r = !1);
let c = e.getBoundingClientRect(),
u = o(e),
d = (0, t.createCoords)(1);
n && (a ? (0, i.isElement)(a) && (d = l(a)) : d = l(e));
let m = (void 0 === (f = r) && (f = !1), a && (!f || a === (0, i.getWindow)(u)) && f) ? s(u) : (0, t.createCoords)(0),
g = (c.left + m.x) / d.x,
p = (c.top + m.y) / d.y,
h = c.width / d.x,
w = c.height / d.y;
if (u) {
let e = (0, i.getWindow)(u),
t = a && (0, i.isElement)(a) ? (0, i.getWindow)(a) : a,
n = e,
r = (0, i.getFrameElement)(n);
for (; r && a && t !== n;) {
let e = l(r),
t = r.getBoundingClientRect(),
o = (0, i.getComputedStyle)(r),
a = t.left + (r.clientLeft + parseFloat(o.paddingLeft)) * e.x,
s = t.top + (r.clientTop + parseFloat(o.paddingTop)) * e.y;
g *= e.x, p *= e.y, h *= e.x, w *= e.y, g += a, p += s, n = (0, i.getWindow)(r), r = (0, i.getFrameElement)(n)
}
}
return (0, t.rectToClientRect)({
width: h,
height: w,
x: g,
y: p
})
}
function c(e, t) {
let n = (0, i.getNodeScroll)(e).scrollLeft;
return t ? t.left + n : f((0, i.getDocumentElement)(e)).left + n
}
function u(e, t, n) {
void 0 === n && (n = !1);
let i = e.getBoundingClientRect();
return {
x: i.left + t.scrollLeft - (n ? 0 : c(e, i)),
y: i.top + t.scrollTop
}
}
function d(e, n, r) {
let o;
if ("viewport" === n) o = function(e, t) {
let n = (0, i.getWindow)(e),
r = (0, i.getDocumentElement)(e),
o = n.visualViewport,
l = r.clientWidth,
a = r.clientHeight,
s = 0,
f = 0;
if (o) {
l = o.width, a = o.height;
let e = (0, i.isWebKit)();
(!e || e && "fixed" === t) && (s = o.offsetLeft, f = o.offsetTop)
}
return {
width: l,
height: a,
x: s,
y: f
}
}(e, r);
else if ("document" === n) o = function(e) {
let n = (0, i.getDocumentElement)(e),
r = (0, i.getNodeScroll)(e),
o = e.ownerDocument.body,
l = (0, t.max)(n.scrollWidth, n.clientWidth, o.scrollWidth, o.clientWidth),
a = (0, t.max)(n.scrollHeight, n.clientHeight, o.scrollHeight, o.clientHeight),
s = -r.scrollLeft + c(e),
f = -r.scrollTop;
return "rtl" === (0, i.getComputedStyle)(o).direction && (s += (0, t.max)(n.clientWidth, o.clientWidth) - l), {
width: l,
height: a,
x: s,
y: f
}
}((0, i.getDocumentElement)(e));
else if ((0, i.isElement)(n)) o = function(e, n) {
let r = f(e, !0, "fixed" === n),
o = r.top + e.clientTop,
a = r.left + e.clientLeft,
s = (0, i.isHTMLElement)(e) ? l(e) : (0, t.createCoords)(1),
c = e.clientWidth * s.x,
u = e.clientHeight * s.y;
return {
width: c,
height: u,
x: a * s.x,
y: o * s.y
}
}(n, r);
else {
let t = s(e);
o = {
x: n.x - t.x,
y: n.y - t.y,
width: n.width,
height: n.height
}
}
return (0, t.rectToClientRect)(o)
}
function m(e) {
return "static" === (0, i.getComputedStyle)(e).position
}
function g(e, t) {
if (!(0, i.isHTMLElement)(e) || "fixed" === (0, i.getComputedStyle)(e).position) return null;
if (t) return t(e);
let n = e.offsetParent;
return (0, i.getDocumentElement)(e) === n && (n = n.ownerDocument.body), n
}
function p(e, t) {
let n = (0, i.getWindow)(e);
if ((0, i.isTopLayer)(e)) return n;
if (!(0, i.isHTMLElement)(e)) {
let t = (0, i.getParentNode)(e);
for (; t && !(0, i.isLastTraversableNode)(t);) {
if ((0, i.isElement)(t) && !m(t)) return t;
t = (0, i.getParentNode)(t)
}
return n
}
let r = g(e, t);
for (; r && (0, i.isTableElement)(r) && m(r);) r = g(r, t);
return r && (0, i.isLastTraversableNode)(r) && m(r) && !(0, i.isContainingBlock)(r) ? n : r || (0, i.getContainingBlock)(e) || n
}
let h = async function(e) {
let n = this.getOffsetParent || p,
r = this.getDimensions,
o = await r(e.floating);
return {
reference: function(e, n, r) {
let o = (0, i.isHTMLElement)(n),
l = (0, i.getDocumentElement)(n),
a = "fixed" === r,
s = f(e, !0, a, n),
d = {
scrollLeft: 0,
scrollTop: 0
},
m = (0, t.createCoords)(0);
if (o || !o && !a)
if (("body" !== (0, i.getNodeName)(n) || (0, i.isOverflowElement)(l)) && (d = (0, i.getNodeScroll)(n)), o) {
let e = f(n, !0, a, n);
m.x = e.x + n.clientLeft, m.y = e.y + n.clientTop
} else l && (m.x = c(l));
let g = !l || o || a ? (0, t.createCoords)(0) : u(l, d);
return {
x: s.left + d.scrollLeft - m.x - g.x,
y: s.top + d.scrollTop - m.y - g.y,
width: s.width,
height: s.height
}
}(e.reference, await n(e.floating), e.strategy),
floating: {
x: 0,
y: 0,
width: o.width,
height: o.height
}
}
}, w = {
convertOffsetParentRelativeRectToViewportRelativeRect: function(e) {
let {
elements: n,
rect: r,
offsetParent: o,
strategy: a
} = e, s = "fixed" === a, c = (0, i.getDocumentElement)(o), d = !!n && (0, i.isTopLayer)(n.floating);
if (o === c || d && s) return r;
let m = {
scrollLeft: 0,
scrollTop: 0
},
g = (0, t.createCoords)(1),
p = (0, t.createCoords)(0),
h = (0, i.isHTMLElement)(o);
if ((h || !h && !s) && (("body" !== (0, i.getNodeName)(o) || (0, i.isOverflowElement)(c)) && (m = (0, i.getNodeScroll)(o)), (0, i.isHTMLElement)(o))) {
let e = f(o);
g = l(o), p.x = e.x + o.clientLeft, p.y = e.y + o.clientTop
}
let w = !c || h || s ? (0, t.createCoords)(0) : u(c, m, !0);
return {
width: r.width * g.x,
height: r.height * g.y,
x: r.x * g.x - m.scrollLeft * g.x + p.x + w.x,
y: r.y * g.y - m.scrollTop * g.y + p.y + w.y
}
},
getDocumentElement: i.getDocumentElement,
getClippingRect: function(e) {
let {
element: n,
boundary: r,
rootBoundary: o,
strategy: l
} = e, a = [..."clippingAncestors" === r ? (0, i.isTopLayer)(n) ? [] : function(e, t) {
let n = t.get(e);
if (n) return n;
let r = (0, i.getOverflowAncestors)(e, [], !1).filter(e => (0, i.isElement)(e) && "body" !== (0, i.getNodeName)(e)),
o = null,
l = "fixed" === (0, i.getComputedStyle)(e).position,
a = l ? (0, i.getParentNode)(e) : e;
for (;
(0, i.isElement)(a) && !(0, i.isLastTraversableNode)(a);) {
let t = (0, i.getComputedStyle)(a),
n = (0, i.isContainingBlock)(a);
n || "fixed" !== t.position || (o = null), (l ? !n && !o : !n && "static" === t.position && !!o && ["absolute", "fixed"].includes(o.position) || (0, i.isOverflowElement)(a) && !n && function e(t, n) {
let r = (0, i.getParentNode)(t);
return !(r === n || !(0, i.isElement)(r) || (0, i.isLastTraversableNode)(r)) && ("fixed" === (0, i.getComputedStyle)(r).position || e(r, n))
}(e, a)) ? r = r.filter(e => e !== a) : o = t, a = (0, i.getParentNode)(a)
}
return t.set(e, r), r
}(n, this._c) : [].concat(r), o], s = a[0], f = a.reduce((e, i) => {
let r = d(n, i, l);
return e.top = (0, t.max)(r.top, e.top), e.right = (0, t.min)(r.right, e.right), e.bottom = (0, t.min)(r.bottom, e.bottom), e.left = (0, t.max)(r.left, e.left), e
}, d(n, s, l));
return {
width: f.right - f.left,
height: f.bottom - f.top,
x: f.left,
y: f.top
}
},
getOffsetParent: p,
getElementRects: h,
getClientRects: function(e) {
return Array.from(e.getClientRects())
},
getDimensions: function(e) {
let {
width: t,
height: n
} = r(e);
return {
width: t,
height: n
}
},
getScale: l,
isElement: i.isElement,
isRTL: function(e) {
return "rtl" === (0, i.getComputedStyle)(e).direction
}
};
function y(e, t) {
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height
}
function x(e, n, r, l) {
let a;
void 0 === l && (l = {});
let {
ancestorScroll: s = !0,
ancestorResize: c = !0,
elementResize: u = "function" == typeof ResizeObserver,
layoutShift: d = "function" == typeof IntersectionObserver,
animationFrame: m = !1
} = l, g = o(e), p = s || c ? [...g ? (0, i.getOverflowAncestors)(g) : [], ...(0, i.getOverflowAncestors)(n)] : [];
p.forEach(e => {
s && e.addEventListener("scroll", r, {
passive: !0
}), c && e.addEventListener("resize", r)
});
let h = g && d ? function(e, n) {
let r, o = null,
l = (0, i.getDocumentElement)(e);
function a() {
var e;
clearTimeout(r), null == (e = o) || e.disconnect(), o = null
}
return ! function i(s, f) {
void 0 === s && (s = !1), void 0 === f && (f = 1), a();
let c = e.getBoundingClientRect(),
{
left: u,
top: d,
width: m,
height: g
} = c;
if (s || n(), !m || !g) return;
let p = (0, t.floor)(d),
h = (0, t.floor)(l.clientWidth - (u + m)),
w = {
rootMargin: -p + "px " + -h + "px " + -(0, t.floor)(l.clientHeight - (d + g)) + "px " + -(0, t.floor)(u) + "px",
threshold: (0, t.max)(0, (0, t.min)(1, f)) || 1
},
x = !0;
function v(t) {
let n = t[0].intersectionRatio;
if (n !== f) {
if (!x) return i();
n ? i(!1, n) : r = setTimeout(() => {
i(!1, 1e-7)
}, 1e3)
}
1 !== n || y(c, e.getBoundingClientRect()) || i(), x = !1
}
try {
o = new IntersectionObserver(v, {
...w,
root: l.ownerDocument
})
} catch (e) {
o = new IntersectionObserver(v, w)
}
o.observe(e)
}(!0), a
}(g, r) : null,
w = -1,
x = null;
u && (x = new ResizeObserver(e => {
let [t] = e;
t && t.target === g && x && (x.unobserve(n), cancelAnimationFrame(w), w = requestAnimationFrame(() => {
var e;
null == (e = x) || e.observe(n)
})), r()
}), g && !m && x.observe(g), x.observe(n));
let v = m ? f(e) : null;
return m && function t() {
let n = f(e);
v && !y(v, n) && r(), v = n, a = requestAnimationFrame(t)
}(), r(), () => {
var e;
p.forEach(e => {
s && e.removeEventListener("scroll", r), c && e.removeEventListener("resize", r)
}), null == h || h(), null == (e = x) || e.disconnect(), x = null, m && cancelAnimationFrame(a)
}
}
n.detectOverflow;
let v = n.offset,
b = n.autoPlacement,
A = n.shift,
S = n.flip,
E = n.size,
R = n.hide,
C = n.arrow,
T = n.inline,
P = n.limitShift,
L = (e, t, i) => {
let r = new Map,
o = {
platform: w,
...i
},
l = {
...o.platform,
_c: r
};
return (0, n.computePosition)(e, t, {
...o,
platform: l
})
}
},
647592: e => {
"use strict";
e.s({
arrow: () => h,
flip: () => m,
hide: () => p,
limitShift: () => d,
offset: () => c,
shift: () => u,
size: () => g,
useFloating: () => f
});
var t = e.i(718315),
n = e.i(378469),
i = e.i(564166),
r = "undefined" != typeof document ? n.useLayoutEffect : n.useEffect;
function o(e, t) {
let n, i, r;
if (e === t) return !0;
if (typeof e != typeof t) return !1;
if ("function" == typeof e && e.toString() === t.toString()) return !0;
if (e && t && "object" == typeof e) {
if (Array.isArray(e)) {
if ((n = e.length) !== t.length) return !1;
for (i = n; 0 != i--;)
if (!o(e[i], t[i])) return !1;
return !0
}
if ((n = (r = Object.keys(e)).length) !== Object.keys(t).length) return !1;
for (i = n; 0 != i--;)
if (!({}).hasOwnProperty.call(t, r[i])) return !1;
for (i = n; 0 != i--;) {
let n = r[i];
if (("_owner" !== n || !e.$$typeof) && !o(e[n], t[n])) return !1
}
return !0
}
return e != e && t != t
}
function l(e) {
return "undefined" == typeof window ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1
}
function a(e, t) {
let n = l(e);
return Math.round(t * n) / n
}
function s(e) {
let t = (0, n.useRef)(e);
return r(() => {
t.current = e
}), t
}
function f(e) {
void 0 === e && (e = {});
let {
placement: f = "bottom",
strategy: c = "absolute",
middleware: u = [],
platform: d,
elements: {
reference: m,
floating: g
} = {},
transform: p = !0,
whileElementsMounted: h,
open: w
} = e, [y, x] = (0, n.useState)({
x: 0,
y: 0,
strategy: c,
placement: f,
middlewareData: {},
isPositioned: !1
}), [v, b] = (0, n.useState)(u);
o(v, u) || b(u);
let [A, S] = (0, n.useState)(null), [E, R] = (0, n.useState)(null), C = (0, n.useCallback)(e => {
e !== O.current && (O.current = e, S(e))
}, []), T = (0, n.useCallback)(e => {
e !== N.current && (N.current = e, R(e))
}, []), P = m || A, L = g || E, O = (0, n.useRef)(null), N = (0, n.useRef)(null), H = (0, n.useRef)(y), D = null != h, W = s(h), k = s(d), M = s(w), z = (0, n.useCallback)(() => {
if (!O.current || !N.current) return;
let e = {
placement: f,
strategy: c,
middleware: v
};
k.current && (e.platform = k.current), (0, t.computePosition)(O.current, N.current, e).then(e => {
let t = {
...e,
isPositioned: !1 !== M.current
};
F.current && !o(H.current, t) && (H.current = t, (0, i.flushSync)(() => {
x(t)
}))
})
}, [v, f, c, k, M]);
r(() => {
!1 === w && H.current.isPositioned && (H.current.isPositioned = !1, x(e => ({
...e,
isPositioned: !1
})))
}, [w]);
let F = (0, n.useRef)(!1);
r(() => (F.current = !0, () => {
F.current = !1
}), []), r(() => {
if (P && (O.current = P), L && (N.current = L), P && L) {
if (W.current) return W.current(P, L, z);
z()
}
}, [P, L, z, W, D]);
let j = (0, n.useMemo)(() => ({
reference: O,
floating: N,
setReference: C,
setFloating: T
}), [C, T]),
B = (0, n.useMemo)(() => ({
reference: P,
floating: L
}), [P, L]),
$ = (0, n.useMemo)(() => {
let e = {
position: c,
left: 0,
top: 0
};
if (!B.floating) return e;
let t = a(B.floating, y.x),
n = a(B.floating, y.y);
return p ? {
...e,
transform: "translate(" + t + "px, " + n + "px)",
...l(B.floating) >= 1.5 && {
willChange: "transform"
}
} : {
position: c,
left: t,
top: n
}
}, [c, p, B.floating, y.x, y.y]);
return (0, n.useMemo)(() => ({
...y,
update: z,
refs: j,
elements: B,
floatingStyles: $
}), [y, z, j, B, $])
}
let c = (e, n) => ({
...(0, t.offset)(e),
options: [e, n]
}),
u = (e, n) => ({
...(0, t.shift)(e),
options: [e, n]
}),
d = (e, n) => ({
...(0, t.limitShift)(e),
options: [e, n]
}),
m = (e, n) => ({
...(0, t.flip)(e),
options: [e, n]
}),
g = (e, n) => ({
...(0, t.size)(e),
options: [e, n]
}),
p = (e, n) => ({
...(0, t.hide)(e),
options: [e, n]
}),
h = (e, n) => ({
...(e => ({
name: "arrow",
options: e,
fn(n) {
let {
element: i,
padding: r
} = "function" == typeof e ? e(n) : e;
return i && ({}).hasOwnProperty.call(i, "current") ? null != i.current ? (0, t.arrow)({
element: i.current,
padding: r
}).fn(n) : {} : i ? (0, t.arrow)({
element: i,
padding: r
}).fn(n) : {}
}
}))(e),
options: [e, n]
})
},
986367: e => {
"use strict";
e.s({
Root: () => o
});
var t = e.i(378469),
n = e.i(645488),
i = e.i(892988),
r = (0, t.forwardRef)((e, t) => {
let {
children: r,
width: o = 10,
height: l = 5,
...a
} = e;
return (0, i.jsx)(n.Primitive.svg, {
...a,
ref: t,
width: o,
height: l,
viewBox: "0 0 30 10",
preserveAspectRatio: "none",
children: e.asChild ? r : (0, i.jsx)("polygon", {
points: "0,0 30,0 15,10"
})
})
});
r.displayName = "Arrow";
var o = r
},
394745: e => {
"use strict";
e.s({
useSize: () => i
});
var t = e.i(378469),
n = e.i(823749);
function i(e) {
let [i, r] = (0, t.useState)(void 0);
return (0, n.useLayoutEffect)(() => {
if (e) {
r({
width: e.offsetWidth,
height: e.offsetHeight
});
let t = new ResizeObserver(t => {
let n, i;
if (!Array.isArray(t) || !t.length) return;
let o = t[0];
if ("borderBoxSize" in o) {
let e = o.borderBoxSize,
t = Array.isArray(e) ? e[0] : e;
n = t.inlineSize, i = t.blockSize
} else n = e.offsetWidth, i = e.offsetHeight;
r({
width: n,
height: i
})
});
return t.observe(e, {
box: "border-box"
}), () => t.unobserve(e)
}
r(void 0)
}, [e]), i
}
},
189987: e => {
"use strict";
e.s({
Anchor: () => N,
Arrow: () => D,
Content: () => H,
Root: () => O,
createPopperScope: () => g
});
var t = e.i(378469),
n = e.i(647592),
i = e.i(718315),
r = e.i(986367),
o = e.i(199933),
l = e.i(150924),
a = e.i(645488),
s = e.i(82535),
f = e.i(823749),
c = e.i(394745),
u = e.i(892988),
d = "Popper",
[m, g] = (0, l.createContextScope)(d),
[p, h] = m(d),
w = e => {
let {
__scopePopper: n,
children: i
} = e, [r, o] = (0, t.useState)(null);
return (0, u.jsx)(p, {
scope: n,
anchor: r,
onAnchorChange: o,
children: i
})
};
w.displayName = d;
var y = "PopperAnchor",
x = (0, t.forwardRef)((e, n) => {
let {
__scopePopper: i,
virtualRef: r,
...l
} = e, s = h(y, i), f = (0, t.useRef)(null), c = (0, o.useComposedRefs)(n, f);
return (0, t.useEffect)(() => {
s.onAnchorChange(r?.current || f.current)
}), r ? null : (0, u.jsx)(a.Primitive.div, {
...l,
ref: c
})
});
x.displayName = y;
var v = "PopperContent",
[b, A] = m(v),
S = (0, t.forwardRef)((e, r) => {
let {
__scopePopper: l,
side: d = "bottom",
sideOffset: m = 0,
align: g = "center",
alignOffset: p = 0,
arrowPadding: w = 0,
avoidCollisions: y = !0,
collisionBoundary: x = [],
collisionPadding: A = 0,
sticky: S = "partial",
hideWhenDetached: E = !1,
updatePositionStrategy: R = "optimized",
onPlaced: C,
...O
} = e, N = h(v, l), [H, D] = (0, t.useState)(null), W = (0, o.useComposedRefs)(r, e => D(e)), [k, M] = (0, t.useState)(null), z = (0, c.useSize)(k), F = z?.width ?? 0, j = z?.height ?? 0, B = "number" == typeof A ? A : {
top: 0,
right: 0,
bottom: 0,
left: 0,
...A
}, $ = Array.isArray(x) ? x : [x], V = $.length > 0, I = {
padding: B,
boundary: $.filter(T),
altBoundary: V
}, {
refs: K,
floatingStyles: Y,
placement: U,
isPositioned: X,
middlewareData: _
} = (0, n.useFloating)({
strategy: "fixed",
placement: d + ("center" !== g ? "-" + g : ""),
whileElementsMounted: (...e) => (0, i.autoUpdate)(...e, {
animationFrame: "always" === R
}),
elements: {
reference: N.anchor
},
middleware: [(0, n.offset)({
mainAxis: m + j,
alignmentAxis: p
}), y && (0, n.shift)({
mainAxis: !0,
crossAxis: !1,
limiter: "partial" === S ? (0, n.limitShift)() : void 0,
...I
}), y && (0, n.flip)({
...I
}), (0, n.size)({
...I,
apply: ({
elements: e,
rects: t,
availableWidth: n,
availableHeight: i
}) => {
let {
width: r,
height: o
} = t.reference, l = e.floating.style;
l.setProperty("--radix-popper-available-width", `${n}px`), l.setProperty("--radix-popper-available-height", `${i}px`), l.setProperty("--radix-popper-anchor-width", `${r}px`), l.setProperty("--radix-popper-anchor-height", `${o}px`)
}
}), k && (0, n.arrow)({
element: k,
padding: w
}), P({
arrowWidth: F,
arrowHeight: j
}), E && (0, n.hide)({
strategy: "referenceHidden",
...I
})]
}), [q, G] = L(U), J = (0, s.useCallbackRef)(C);
(0, f.useLayoutEffect)(() => {
X && J?.()
}, [X, J]);
let Q = _.arrow?.x,
Z = _.arrow?.y,
ee = _.arrow?.centerOffset !== 0,
[et, en] = (0, t.useState)();
return (0, f.useLayoutEffect)(() => {
H && en(window.getComputedStyle(H).zIndex)
}, [H]), (0, u.jsx)("div", {
ref: K.setFloating,
"data-radix-popper-content-wrapper": "",
style: {
...Y,
transform: X ? Y.transform : "translate(0, -200%)",
minWidth: "max-content",
zIndex: et,
"--radix-popper-transform-origin": [_.transformOrigin?.x, _.transformOrigin?.y].join(" "),
..._.hide?.referenceHidden && {
visibility: "hidden",
pointerEvents: "none"
}
},
dir: e.dir,
children: (0, u.jsx)(b, {
scope: l,
placedSide: q,
onArrowChange: M,
arrowX: Q,
arrowY: Z,
shouldHideArrow: ee,
children: (0, u.jsx)(a.Primitive.div, {
"data-side": q,
"data-align": G,
...O,
ref: W,
style: {
...O.style,
animation: X ? void 0 : "none"
}
})
})
})
});
S.displayName = v;
var E = "PopperArrow",
R = {
top: "bottom",
right: "left",
bottom: "top",
left: "right"
},
C = (0, t.forwardRef)(function(e, t) {
let {
__scopePopper: n,
...i
} = e, o = A(E, n), l = R[o.placedSide];
return (0, u.jsx)("span", {
ref: o.onArrowChange,
style: {
position: "absolute",
left: o.arrowX,
top: o.arrowY,
[l]: 0,
transformOrigin: {
top: "",
right: "0 0",
bottom: "center 0",
left: "100% 0"
} [o.placedSide],
transform: {
top: "translateY(100%)",
right: "translateY(50%) rotate(90deg) translateX(-50%)",
bottom: "rotate(180deg)",
left: "translateY(50%) rotate(-90deg) translateX(50%)"
} [o.placedSide],
visibility: o.shouldHideArrow ? "hidden" : void 0
},
children: (0, u.jsx)(r.Root, {
...i,
ref: t,
style: {
...i.style,
display: "block"
}
})
})
});
function T(e) {
return null !== e
}
C.displayName = E;
var P = e => ({
name: "transformOrigin",
options: e,
fn(t) {
let {
placement: n,
rects: i,
middlewareData: r
} = t, o = r.arrow?.centerOffset !== 0, l = o ? 0 : e.arrowWidth, a = o ? 0 : e.arrowHeight, [s, f] = L(n), c = {
start: "0%",
center: "50%",
end: "100%"
} [f], u = (r.arrow?.x ?? 0) + l / 2, d = (r.arrow?.y ?? 0) + a / 2, m = "", g = "";
return "bottom" === s ? (m = o ? c : `${u}px`, g = `${-a}px`) : "top" === s ? (m = o ? c : `${u}px`, g = `${i.floating.height+a}px`) : "right" === s ? (m = `${-a}px`, g = o ? c : `${d}px`) : "left" === s && (m = `${i.floating.width+a}px`, g = o ? c : `${d}px`), {
data: {
x: m,
y: g
}
}
}
});
function L(e) {
let [t, n = "center"] = e.split("-");
return [t, n]
}
var O = w,
N = x,
H = S,
D = C
}
}]);