likec4 1.59.2 → 1.59.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__app__/src/chunks/AIChat.mjs +118 -123
- package/__app__/src/chunks/LikeC4Styles.mjs +828 -686
- package/__app__/src/chunks/ProjectsOverview.mjs +82 -82
- package/__app__/src/chunks/es.mjs +1 -1
- package/__app__/src/chunks/hooks.mjs +164 -135
- package/__app__/src/chunks/libs/@floating-ui.mjs +649 -335
- package/__app__/src/chunks/libs/@mantine.mjs +2934 -2040
- package/__app__/src/chunks/libs/@tanstack-ai.mjs +28 -28
- package/__app__/src/chunks/libs/@tanstack.mjs +46 -51
- package/__app__/src/chunks/libs/@xstate/react.mjs +59 -40
- package/__app__/src/chunks/libs/@xyflow/react.mjs +535 -448
- package/__app__/src/chunks/libs/bezier-js.mjs +10 -9
- package/__app__/src/chunks/libs/d3.mjs +20 -45
- package/__app__/src/chunks/libs/fast-equals.mjs +62 -50
- package/__app__/src/chunks/libs/framer.mjs +300 -279
- package/__app__/src/chunks/libs/zod.mjs +17 -14
- package/__app__/src/chunks/rolldown-runtime.mjs +2 -2
- package/__app__/src/chunks/styled-system.mjs +2580 -132
- package/__app__/src/main.mjs +24925 -23485
- package/__app__/src/style.css +1 -1
- package/config/schema.json +49 -0
- package/dist/app/render-view-client.css +1 -0
- package/dist/app/render-view-client.js +739 -0
- package/dist/chunks/enableServer.mjs +1 -1
- package/dist/chunks/filenames.mjs +7 -6
- package/dist/chunks/index.d.mts +18 -1
- package/dist/chunks/index2.d.mts +79 -26
- package/dist/chunks/libs/@chevrotain/gast.mjs +1 -1
- package/dist/chunks/libs/@chevrotain/regexp-to-ast.mjs +5 -5
- package/dist/chunks/libs/@chevrotain/types.d.mts +108 -0
- package/dist/chunks/libs/@logtape/logtape.mjs +4 -4
- package/dist/chunks/libs/@lume/kiwi.mjs +1 -1
- package/dist/chunks/libs/birpc.mjs +1 -1
- package/dist/chunks/libs/chevrotain-allstar.mjs +1 -1
- package/dist/chunks/libs/chevrotain.mjs +16 -16
- package/dist/chunks/libs/json5.mjs +3 -3
- package/dist/chunks/libs/langium.d.mts +1777 -16
- package/dist/chunks/libs/langium.mjs +11 -11
- package/dist/chunks/libs/merge-error-cause.mjs +2 -2
- package/dist/chunks/libs/p-queue.mjs +1 -1
- package/dist/chunks/libs/package-manager-detector.mjs +1 -1
- package/dist/chunks/libs/pako.mjs +2 -2
- package/dist/chunks/libs/picomatch.mjs +1 -1
- package/dist/chunks/libs/pretty-ms.mjs +1 -1
- package/dist/chunks/libs/remeda.mjs +1 -1
- package/dist/chunks/libs/ufo.mjs +1 -1
- package/dist/chunks/libs/unstorage.mjs +1 -1
- package/dist/chunks/libs/zod.d.mts +1717 -17
- package/dist/chunks/libs/zod.mjs +4 -4
- package/dist/chunks/node.mjs +68 -57
- package/dist/chunks/rolldown-runtime.mjs +1 -1
- package/dist/chunks/sequence-view.mjs +1 -1
- package/dist/chunks/vite-plugin.mjs +168 -54
- package/dist/cli/index.d.mts +1 -1
- package/dist/cli/index.mjs +291 -165
- package/dist/config/index.d.mts +7 -1
- package/dist/config/index.mjs +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +1 -1
- package/dist/model/index.d.mts +4 -4
- package/dist/vite-plugin/index.d.mts +2 -2
- package/dist/vite-plugin/internal/index.d.mts +72 -35
- package/dist/vite-plugin/internal/index.mjs +125 -44
- package/package.json +47 -47
- package/react/index.d.mts +22767 -1432
- package/react/index.mjs +38152 -32309
- package/vite-plugin-modules.d.ts +21 -1
- package/dist/chunks/dist.mjs +0 -10
- package/dist/chunks/logger.mjs +0 -1
|
@@ -3,7 +3,7 @@ import * as t from "react";
|
|
|
3
3
|
import { useLayoutEffect as n } from "react";
|
|
4
4
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
5
|
import * as i from "react-dom";
|
|
6
|
-
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.
|
|
6
|
+
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
7
7
|
function hasWindow() {
|
|
8
8
|
return typeof window < "u";
|
|
9
9
|
}
|
|
@@ -86,7 +86,7 @@ function getParentNode(e) {
|
|
|
86
86
|
}
|
|
87
87
|
function getNearestOverflowAncestor(e) {
|
|
88
88
|
let t = getParentNode(e);
|
|
89
|
-
return isLastTraversableNode(t) ? e.ownerDocument
|
|
89
|
+
return isLastTraversableNode(t) ? (e.ownerDocument || e).body : isHTMLElement(t) && isOverflowElement(t) ? t : getNearestOverflowAncestor(t);
|
|
90
90
|
}
|
|
91
91
|
function getOverflowAncestors(e, t, n) {
|
|
92
92
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
@@ -94,13 +94,14 @@ function getOverflowAncestors(e, t, n) {
|
|
|
94
94
|
if (i) {
|
|
95
95
|
let e = getFrameElement(a);
|
|
96
96
|
return t.concat(a, a.visualViewport || [], isOverflowElement(r) ? r : [], e && n ? getOverflowAncestors(e) : []);
|
|
97
|
-
}
|
|
97
|
+
}
|
|
98
|
+
return t.concat(r, getOverflowAncestors(r, [], n));
|
|
98
99
|
}
|
|
99
100
|
function getFrameElement(e) {
|
|
100
101
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
101
102
|
}
|
|
102
103
|
//#endregion
|
|
103
|
-
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.
|
|
104
|
+
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
104
105
|
var c = [
|
|
105
106
|
"top",
|
|
106
107
|
"right",
|
|
@@ -176,11 +177,10 @@ function getOppositePlacement(e) {
|
|
|
176
177
|
}
|
|
177
178
|
function expandPaddingObject(e) {
|
|
178
179
|
return {
|
|
179
|
-
top: 0,
|
|
180
|
-
right: 0,
|
|
181
|
-
bottom: 0,
|
|
182
|
-
left: 0
|
|
183
|
-
...e
|
|
180
|
+
top: e.top ?? 0,
|
|
181
|
+
right: e.right ?? 0,
|
|
182
|
+
bottom: e.bottom ?? 0,
|
|
183
|
+
left: e.left ?? 0
|
|
184
184
|
};
|
|
185
185
|
}
|
|
186
186
|
function getPaddingObject(e) {
|
|
@@ -205,7 +205,7 @@ function rectToClientRect(e) {
|
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
207
|
//#endregion
|
|
208
|
-
//#region ../../node_modules/.pnpm/@floating-ui+react@0.27.
|
|
208
|
+
//#region ../../node_modules/.pnpm/@floating-ui+react@0.27.20_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs
|
|
209
209
|
function getPlatform() {
|
|
210
210
|
let e = navigator.userAgentData;
|
|
211
211
|
return e != null && e.platform ? e.platform : navigator.platform;
|
|
@@ -277,7 +277,7 @@ function matchesFocusVisible(e) {
|
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
function getFloatingFocusElement(e) {
|
|
280
|
-
return e ? e.hasAttribute(b) ? e : e.querySelector("[
|
|
280
|
+
return e ? e.hasAttribute(b) ? e : e.querySelector("[" + b + "]") || e : null;
|
|
281
281
|
}
|
|
282
282
|
function getNodeChildren$1(e, t, n) {
|
|
283
283
|
return n === void 0 && (n = !0), e.filter((e) => e.parentId === t && (!n || e.context?.open)).flatMap((t) => [t, ...getNodeChildren$1(e, t.id, n)]);
|
|
@@ -310,7 +310,7 @@ function useEffectEvent$1(e) {
|
|
|
310
310
|
}
|
|
311
311
|
e(useEffectEvent$1, "useEffectEvent");
|
|
312
312
|
//#endregion
|
|
313
|
-
//#region ../../node_modules/.pnpm/@floating-ui+core@1.
|
|
313
|
+
//#region ../../node_modules/.pnpm/@floating-ui+core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
314
314
|
function computeCoordsFromPlacement(e, t, n) {
|
|
315
315
|
let { reference: r, floating: i } = e, a = getSideAxis(t), o = getAlignmentAxis(t), s = getAxisLength(o), c = getSide(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
|
|
316
316
|
switch (c) {
|
|
@@ -343,15 +343,8 @@ function computeCoordsFromPlacement(e, t, n) {
|
|
|
343
343
|
y: r.y
|
|
344
344
|
};
|
|
345
345
|
}
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
p[o] -= f * (n && l ? -1 : 1);
|
|
349
|
-
break;
|
|
350
|
-
case "end":
|
|
351
|
-
p[o] += f * (n && l ? -1 : 1);
|
|
352
|
-
break;
|
|
353
|
-
}
|
|
354
|
-
return p;
|
|
346
|
+
let m = getAlignment(t);
|
|
347
|
+
return m && (p[o] += f * (m === "end" ? 1 : -1) * (n && l ? -1 : 1)), p;
|
|
355
348
|
}
|
|
356
349
|
async function detectOverflow(e, t) {
|
|
357
350
|
t === void 0 && (t = {});
|
|
@@ -434,41 +427,40 @@ var T = 50, E = /* @__PURE__ */ e(async (e, t, n) => {
|
|
|
434
427
|
y: r
|
|
435
428
|
}, m = getAlignmentAxis(i), h = getAxisLength(m), g = await o.getDimensions(l), _ = m === "y", v = _ ? "top" : "left", y = _ ? "bottom" : "right", b = _ ? "clientHeight" : "clientWidth", x = a.reference[h] + a.reference[m] - p[m] - a.floating[h], S = p[m] - a.reference[m], C = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l)), w = C ? C[b] : 0;
|
|
436
429
|
(!w || !await (o.isElement == null ? void 0 : o.isElement(C))) && (w = s.floating[b] || a.floating[h]);
|
|
437
|
-
let T = x / 2 - S / 2, E = w / 2 - g[h] / 2 - 1, D = d(f[v], E), O = d(f[y], E), k =
|
|
430
|
+
let T = x / 2 - S / 2, E = w / 2 - g[h] / 2 - 1, D = d(f[v], E), O = d(f[y], E), k = w - g[h] - O, A = w / 2 - g[h] / 2 + T, j = clamp(D, A, k), M = !c.arrow && getAlignment(i) != null && A !== j && a.reference[h] / 2 - (A < D ? D : O) - g[h] / 2 < 0, N = M ? A < D ? A - D : A - k : 0;
|
|
438
431
|
return {
|
|
439
|
-
[m]: p[m] +
|
|
432
|
+
[m]: p[m] + N,
|
|
440
433
|
data: {
|
|
441
|
-
[m]:
|
|
442
|
-
centerOffset:
|
|
443
|
-
...
|
|
434
|
+
[m]: j,
|
|
435
|
+
centerOffset: A - j - N,
|
|
436
|
+
...M && { alignmentOffset: N }
|
|
444
437
|
},
|
|
445
|
-
reset:
|
|
438
|
+
reset: M
|
|
446
439
|
};
|
|
447
440
|
}
|
|
448
441
|
}), "arrow");
|
|
449
442
|
function getPlacementList(e, t, n) {
|
|
450
|
-
return (e ? [...n.filter((t) => getAlignment(t) === e), ...n.filter((t) => getAlignment(t) !== e)] : n.filter((e) => getSide(e) === e)).filter((n) => e
|
|
443
|
+
return (e ? [...n.filter((t) => getAlignment(t) === e), ...n.filter((t) => getAlignment(t) !== e)] : n.filter((e) => getSide(e) === e)).filter((n) => !e || getAlignment(n) === e || (t ? getOppositeAlignmentPlacement(n) !== n : !1));
|
|
451
444
|
}
|
|
452
445
|
var O = /* @__PURE__ */ e(function(e) {
|
|
453
446
|
return e === void 0 && (e = {}), {
|
|
454
447
|
name: "autoPlacement",
|
|
455
448
|
options: e,
|
|
456
449
|
async fn(t) {
|
|
457
|
-
let { rects: n, middlewareData: r, placement: i, platform: a, elements: o } = t, { crossAxis: s = !1, alignment: c, allowedPlacements: l = u, autoAlignment: d = !0, ...f } = evaluate(e, t), p = c !== void 0 || l === u ? getPlacementList(c || null, d, l) : l, m =
|
|
458
|
-
if (
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
m[_[1]]
|
|
450
|
+
let { rects: n, middlewareData: r, placement: i, platform: a, elements: o } = t, { crossAxis: s = !1, alignment: c, allowedPlacements: l = u, autoAlignment: d = !0, ...f } = evaluate(e, t), p = c !== void 0 || l === u ? getPlacementList(c || null, d, l) : l, m = r.autoPlacement?.index || 0, h = p[m];
|
|
451
|
+
if (h == null) return {};
|
|
452
|
+
if (i !== h) return { reset: { placement: p[0] } };
|
|
453
|
+
let g = await a.detectOverflow(t, f), _ = getAlignmentSides(h, n, await (a.isRTL == null ? void 0 : a.isRTL(o.floating))), v = [
|
|
454
|
+
g[getSide(h)],
|
|
455
|
+
g[_[0]],
|
|
456
|
+
g[_[1]]
|
|
465
457
|
], y = [...r.autoPlacement?.overflows || [], {
|
|
466
|
-
placement:
|
|
458
|
+
placement: h,
|
|
467
459
|
overflows: v
|
|
468
|
-
}], b = p[
|
|
460
|
+
}], b = p[m + 1];
|
|
469
461
|
if (b) return {
|
|
470
462
|
data: {
|
|
471
|
-
index:
|
|
463
|
+
index: m + 1,
|
|
472
464
|
overflows: y
|
|
473
465
|
},
|
|
474
466
|
reset: { placement: b }
|
|
@@ -483,7 +475,7 @@ var O = /* @__PURE__ */ e(function(e) {
|
|
|
483
475
|
}).sort((e, t) => e[1] - t[1]), S = x.filter((e) => e[2].slice(0, getAlignment(e[0]) ? 2 : 3).every((e) => e <= 0))[0]?.[0] || x[0][0];
|
|
484
476
|
return S === i ? {} : {
|
|
485
477
|
data: {
|
|
486
|
-
index:
|
|
478
|
+
index: m + 1,
|
|
487
479
|
overflows: y
|
|
488
480
|
},
|
|
489
481
|
reset: { placement: S }
|
|
@@ -510,7 +502,7 @@ var O = /* @__PURE__ */ e(function(e) {
|
|
|
510
502
|
overflows: w
|
|
511
503
|
}], !w.every((e) => e <= 0)) {
|
|
512
504
|
let e = (i.flip?.index || 0) + 1, t = S[e];
|
|
513
|
-
if (t && (
|
|
505
|
+
if (t && (u !== "alignment" || _ === getSideAxis(t) || T.every((e) => getSideAxis(e.placement) !== _ || e.overflows[0] > 0))) return {
|
|
514
506
|
data: {
|
|
515
507
|
index: e,
|
|
516
508
|
overflows: T
|
|
@@ -530,9 +522,7 @@ var O = /* @__PURE__ */ e(function(e) {
|
|
|
530
522
|
e && (n = e);
|
|
531
523
|
break;
|
|
532
524
|
}
|
|
533
|
-
case "initialPlacement":
|
|
534
|
-
n = o;
|
|
535
|
-
break;
|
|
525
|
+
case "initialPlacement": n = o;
|
|
536
526
|
}
|
|
537
527
|
if (r !== n) return { reset: { placement: n } };
|
|
538
528
|
}
|
|
@@ -605,34 +595,28 @@ var j = /* @__PURE__ */ e(function(e) {
|
|
|
605
595
|
name: "inline",
|
|
606
596
|
options: e,
|
|
607
597
|
async fn(t) {
|
|
608
|
-
let { placement: n, elements: r, rects: i, platform: a, strategy: o } = t, { padding: s = 2, x: c, y: l } = evaluate(e, t), u = Array.from(await (a.getClientRects == null ? void 0 : a.getClientRects(r.reference)) || [])
|
|
598
|
+
let { placement: n, elements: r, rects: i, platform: a, strategy: o } = t, { padding: s = 2, x: c, y: l } = evaluate(e, t), u = Array.from(await (a.getClientRects == null ? void 0 : a.getClientRects(r.reference)) || []);
|
|
599
|
+
if (!u.length) return {};
|
|
600
|
+
let p = getRectsByLine(u), m = rectToClientRect(getBoundingRect(u)), h = getPaddingObject(s);
|
|
609
601
|
function getBoundingClientRect() {
|
|
610
|
-
if (p.length === 2 && p[0].left > p[1].right && c != null && l != null) return p.find((e) => c > e.left - h.left && c < e.right + h.right && l > e.top - h.top && l < e.bottom + h.bottom) || m;
|
|
602
|
+
if (p.length === 2 && (p[0].left > p[1].right || p[1].left > p[0].right) && c != null && l != null) return p.find((e) => c > e.left - h.left && c < e.right + h.right && l > e.top - h.top && l < e.bottom + h.bottom) || m;
|
|
611
603
|
if (p.length >= 2) {
|
|
612
604
|
if (getSideAxis(n) === "y") {
|
|
613
|
-
let e = p[0], t = p[p.length - 1], r = getSide(n) === "top", i = e.top, a = t.bottom, o = r ? e.left : t.left
|
|
614
|
-
return {
|
|
615
|
-
top: i,
|
|
616
|
-
bottom: a,
|
|
617
|
-
left: o,
|
|
618
|
-
right: s,
|
|
619
|
-
width: s - o,
|
|
620
|
-
height: a - i,
|
|
605
|
+
let e = p[0], t = p[p.length - 1], r = getSide(n) === "top", i = e.top, a = t.bottom, o = r ? e.left : t.left;
|
|
606
|
+
return rectToClientRect({
|
|
621
607
|
x: o,
|
|
622
|
-
y: i
|
|
623
|
-
|
|
608
|
+
y: i,
|
|
609
|
+
width: (r ? e.right : t.right) - o,
|
|
610
|
+
height: a - i
|
|
611
|
+
});
|
|
624
612
|
}
|
|
625
|
-
let e = getSide(n) === "left", t = f(...p.map((e) => e.right)), r = d(...p.map((e) => e.left)), i = p.filter((n) => e ? n.left === r : n.right === t), a = i[0].top, o = i[i.length - 1].bottom
|
|
626
|
-
return {
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
height: o - a,
|
|
633
|
-
x: s,
|
|
634
|
-
y: a
|
|
635
|
-
};
|
|
613
|
+
let e = getSide(n) === "left", t = f(...p.map((e) => e.right)), r = d(...p.map((e) => e.left)), i = p.filter((n) => e ? n.left === r : n.right === t), a = i[0].top, o = i[i.length - 1].bottom;
|
|
614
|
+
return rectToClientRect({
|
|
615
|
+
x: r,
|
|
616
|
+
y: a,
|
|
617
|
+
width: t - r,
|
|
618
|
+
height: o - a
|
|
619
|
+
});
|
|
636
620
|
}
|
|
637
621
|
return m;
|
|
638
622
|
}
|
|
@@ -694,15 +678,8 @@ var N = /* @__PURE__ */ e(function(e) {
|
|
|
694
678
|
} }, ...l } = evaluate(e, t), u = {
|
|
695
679
|
x: n,
|
|
696
680
|
y: r
|
|
697
|
-
}, d = await a.detectOverflow(t, l), f = getSideAxis(
|
|
698
|
-
|
|
699
|
-
let e = p === "y" ? "top" : "left", t = p === "y" ? "bottom" : "right", n = m + d[e], r = m - d[t];
|
|
700
|
-
m = clamp(n, m, r);
|
|
701
|
-
}
|
|
702
|
-
if (s) {
|
|
703
|
-
let e = f === "y" ? "top" : "left", t = f === "y" ? "bottom" : "right", n = h + d[e], r = h - d[t];
|
|
704
|
-
h = clamp(n, h, r);
|
|
705
|
-
}
|
|
681
|
+
}, d = await a.detectOverflow(t, l), f = getSideAxis(i), p = getOppositeAxis(f), m = u[p], h = u[f], clampCoord = (e, t) => clamp(t + d[e === "y" ? "top" : "left"], t, t - d[e === "y" ? "bottom" : "right"]);
|
|
682
|
+
o && (m = clampCoord(p, m)), s && (h = clampCoord(f, h));
|
|
706
683
|
let g = c.fn({
|
|
707
684
|
...t,
|
|
708
685
|
[p]: m,
|
|
@@ -732,9 +709,8 @@ var N = /* @__PURE__ */ e(function(e) {
|
|
|
732
709
|
mainAxis: h,
|
|
733
710
|
crossAxis: 0
|
|
734
711
|
} : {
|
|
735
|
-
mainAxis: 0,
|
|
736
|
-
crossAxis: 0
|
|
737
|
-
...h
|
|
712
|
+
mainAxis: h.mainAxis ?? 0,
|
|
713
|
+
crossAxis: h.crossAxis ?? 0
|
|
738
714
|
};
|
|
739
715
|
if (c) {
|
|
740
716
|
let e = f === "y" ? "height" : "width", t = a.reference[f] - a.floating[e] + g.mainAxis, n = a.reference[f] + a.reference[e] - g.mainAxis;
|
|
@@ -750,32 +726,27 @@ var N = /* @__PURE__ */ e(function(e) {
|
|
|
750
726
|
};
|
|
751
727
|
}
|
|
752
728
|
};
|
|
753
|
-
}, "limitShift"),
|
|
729
|
+
}, "limitShift"), I = /* @__PURE__ */ e(function(e) {
|
|
754
730
|
return e === void 0 && (e = {}), {
|
|
755
731
|
name: "size",
|
|
756
732
|
options: e,
|
|
757
733
|
async fn(t) {
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (T = b), (r = t.middlewareData.shift) != null && r.enabled.y && (w = y), C && !p) {
|
|
763
|
-
let e = f(l.left, 0), t = f(l.right, 0), n = f(l.top, 0), r = f(l.bottom, 0);
|
|
764
|
-
m ? T = h - 2 * (e !== 0 || t !== 0 ? e + t : f(l.left, l.right)) : w = g - 2 * (n !== 0 || r !== 0 ? n + r : f(l.top, l.bottom));
|
|
765
|
-
}
|
|
766
|
-
await apply({
|
|
734
|
+
let { placement: n, rects: r, platform: i, elements: a } = t, { apply = () => {}, ...o } = evaluate(e, t), s = await i.detectOverflow(t, o), c = getSide(n), l = getAlignment(n), u = getSideAxis(n) === "y", { width: p, height: m } = r.floating, h, g;
|
|
735
|
+
c === "top" || c === "bottom" ? (h = c, g = l === (await (i.isRTL == null ? void 0 : i.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (g = c, h = l === "end" ? "top" : "bottom");
|
|
736
|
+
let _ = m - s.top - s.bottom, v = p - s.left - s.right, y = d(m - s[h], _), b = d(p - s[g], v), x = t.middlewareData.shift, S = !x, C = y, w = b;
|
|
737
|
+
x != null && x.enabled.x && (w = v), x != null && x.enabled.y && (C = _), S && !l && (u ? w = p - 2 * f(s.left, s.right) : C = m - 2 * f(s.top, s.bottom)), await apply({
|
|
767
738
|
...t,
|
|
768
|
-
availableWidth:
|
|
769
|
-
availableHeight:
|
|
739
|
+
availableWidth: w,
|
|
740
|
+
availableHeight: C
|
|
770
741
|
});
|
|
771
|
-
let
|
|
772
|
-
return
|
|
742
|
+
let T = await i.getDimensions(a.floating);
|
|
743
|
+
return p !== T.width || m !== T.height ? { reset: { rects: !0 } } : {};
|
|
773
744
|
}
|
|
774
745
|
};
|
|
775
746
|
}, "size");
|
|
776
747
|
//#endregion
|
|
777
|
-
//#region ../../node_modules/.pnpm/@floating-ui+dom@1.
|
|
778
|
-
function getCssDimensions(e) {
|
|
748
|
+
//#region ../../node_modules/.pnpm/@floating-ui+dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
749
|
+
function getCssDimensions$1(e) {
|
|
779
750
|
let t = getComputedStyle$1(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = isHTMLElement(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = p(n) !== a || p(r) !== o;
|
|
780
751
|
return s && (n = a, r = o), {
|
|
781
752
|
width: n,
|
|
@@ -783,38 +754,43 @@ function getCssDimensions(e) {
|
|
|
783
754
|
$: s
|
|
784
755
|
};
|
|
785
756
|
}
|
|
786
|
-
|
|
757
|
+
e(getCssDimensions$1, "getCssDimensions");
|
|
758
|
+
function unwrapElement$1(e) {
|
|
787
759
|
return isElement(e) ? e : e.contextElement;
|
|
788
760
|
}
|
|
789
|
-
|
|
790
|
-
|
|
761
|
+
e(unwrapElement$1, "unwrapElement");
|
|
762
|
+
function getScale$1(e) {
|
|
763
|
+
let t = unwrapElement$1(e);
|
|
791
764
|
if (!isHTMLElement(t)) return createCoords(1);
|
|
792
|
-
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = getCssDimensions(t), o = (a ? p(n.width) : n.width) / r, s = (a ? p(n.height) : n.height) / i;
|
|
765
|
+
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = getCssDimensions$1(t), o = (a ? p(n.width) : n.width) / r, s = (a ? p(n.height) : n.height) / i;
|
|
793
766
|
return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
794
767
|
x: o,
|
|
795
768
|
y: s
|
|
796
769
|
};
|
|
797
770
|
}
|
|
798
|
-
|
|
799
|
-
|
|
771
|
+
e(getScale$1, "getScale");
|
|
772
|
+
var ee = /*#__PURE__*/ createCoords(0);
|
|
773
|
+
function getVisualOffsets$1(e) {
|
|
800
774
|
let t = getWindow(e);
|
|
801
|
-
return !isWebKit() || !t.visualViewport ?
|
|
775
|
+
return !isWebKit() || !t.visualViewport ? ee : {
|
|
802
776
|
x: t.visualViewport.offsetLeft,
|
|
803
777
|
y: t.visualViewport.offsetTop
|
|
804
778
|
};
|
|
805
779
|
}
|
|
806
|
-
|
|
807
|
-
|
|
780
|
+
e(getVisualOffsets$1, "getVisualOffsets");
|
|
781
|
+
function shouldAddVisualOffsets$1(e, t, n) {
|
|
782
|
+
return t === void 0 && (t = !1), !!n && t && n === getWindow(e);
|
|
808
783
|
}
|
|
809
|
-
|
|
784
|
+
e(shouldAddVisualOffsets$1, "shouldAddVisualOffsets");
|
|
785
|
+
function getBoundingClientRect$1(e, t, n, r) {
|
|
810
786
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
811
|
-
let i = e.getBoundingClientRect(), a = unwrapElement(e), o = createCoords(1);
|
|
812
|
-
t && (r ? isElement(r) && (o = getScale(r)) : o = getScale(e));
|
|
813
|
-
let s = shouldAddVisualOffsets(a, n, r) ? getVisualOffsets(a) : createCoords(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
|
|
814
|
-
if (a) {
|
|
815
|
-
let e = getWindow(a), t =
|
|
816
|
-
for (; i &&
|
|
817
|
-
let e = getScale(i), t = i.getBoundingClientRect(), r = getComputedStyle$1(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
|
|
787
|
+
let i = e.getBoundingClientRect(), a = unwrapElement$1(e), o = createCoords(1);
|
|
788
|
+
t && (r ? isElement(r) && (o = getScale$1(r)) : o = getScale$1(e));
|
|
789
|
+
let s = shouldAddVisualOffsets$1(a, n, r) ? getVisualOffsets$1(a) : createCoords(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
|
|
790
|
+
if (a && r) {
|
|
791
|
+
let e = getWindow(a), t = isElement(r) ? getWindow(r) : r, n = e, i = getFrameElement(n);
|
|
792
|
+
for (; i && t !== n;) {
|
|
793
|
+
let e = getScale$1(i), t = i.getBoundingClientRect(), r = getComputedStyle$1(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
|
|
818
794
|
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = getWindow(i), i = getFrameElement(n);
|
|
819
795
|
}
|
|
820
796
|
}
|
|
@@ -825,29 +801,32 @@ function getBoundingClientRect(e, t, n, r) {
|
|
|
825
801
|
y: l
|
|
826
802
|
});
|
|
827
803
|
}
|
|
828
|
-
|
|
804
|
+
e(getBoundingClientRect$1, "getBoundingClientRect");
|
|
805
|
+
function getWindowScrollBarX$1(e, t) {
|
|
829
806
|
let n = getNodeScroll(e).scrollLeft;
|
|
830
|
-
return t ? t.left + n : getBoundingClientRect(getDocumentElement(e)).left + n;
|
|
807
|
+
return t ? t.left + n : getBoundingClientRect$1(getDocumentElement(e)).left + n;
|
|
831
808
|
}
|
|
832
|
-
|
|
809
|
+
e(getWindowScrollBarX$1, "getWindowScrollBarX");
|
|
810
|
+
function getHTMLOffset$1(e, t) {
|
|
833
811
|
let n = e.getBoundingClientRect();
|
|
834
812
|
return {
|
|
835
|
-
x: n.left + t.scrollLeft - getWindowScrollBarX(e, n),
|
|
813
|
+
x: n.left + t.scrollLeft - getWindowScrollBarX$1(e, n),
|
|
836
814
|
y: n.top + t.scrollTop
|
|
837
815
|
};
|
|
838
816
|
}
|
|
839
|
-
|
|
817
|
+
e(getHTMLOffset$1, "getHTMLOffset");
|
|
818
|
+
function convertOffsetParentRelativeRectToViewportRelativeRect$1(e) {
|
|
840
819
|
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = getDocumentElement(r), s = t ? isTopLayer(t.floating) : !1;
|
|
841
820
|
if (r === o || s && a) return n;
|
|
842
821
|
let c = {
|
|
843
822
|
scrollLeft: 0,
|
|
844
823
|
scrollTop: 0
|
|
845
824
|
}, l = createCoords(1), u = createCoords(0), d = isHTMLElement(r);
|
|
846
|
-
if ((d || !
|
|
847
|
-
let e = getBoundingClientRect(r);
|
|
848
|
-
l = getScale(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
|
|
825
|
+
if ((d || !a) && ((getNodeName(r) !== "body" || isOverflowElement(o)) && (c = getNodeScroll(r)), d)) {
|
|
826
|
+
let e = getBoundingClientRect$1(r);
|
|
827
|
+
l = getScale$1(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
|
|
849
828
|
}
|
|
850
|
-
let f = o && !d && !a ? getHTMLOffset(o, c) : createCoords(0);
|
|
829
|
+
let f = o && !d && !a ? getHTMLOffset$1(o, c) : createCoords(0);
|
|
851
830
|
return {
|
|
852
831
|
width: n.width * l.x,
|
|
853
832
|
height: n.height * l.y,
|
|
@@ -855,40 +834,43 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(e) {
|
|
|
855
834
|
y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
|
|
856
835
|
};
|
|
857
836
|
}
|
|
858
|
-
|
|
859
|
-
|
|
837
|
+
e(convertOffsetParentRelativeRectToViewportRelativeRect$1, "convertOffsetParentRelativeRectToViewportRelativeRect");
|
|
838
|
+
function getClientRects$1(e) {
|
|
839
|
+
return e.getClientRects ? Array.from(e.getClientRects()) : [];
|
|
860
840
|
}
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
841
|
+
e(getClientRects$1, "getClientRects");
|
|
842
|
+
function getDocumentRect$1(e) {
|
|
843
|
+
let t = getNodeScroll(e), n = e.ownerDocument.body, r = f(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = f(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight), a = -t.scrollLeft + getWindowScrollBarX$1(e), o = -t.scrollTop;
|
|
844
|
+
return getComputedStyle$1(n).direction === "rtl" && (a += f(e.clientWidth, n.clientWidth) - r), {
|
|
845
|
+
width: r,
|
|
846
|
+
height: i,
|
|
847
|
+
x: a,
|
|
848
|
+
y: o
|
|
868
849
|
};
|
|
869
850
|
}
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
851
|
+
e(getDocumentRect$1, "getDocumentRect");
|
|
852
|
+
var L = 25;
|
|
853
|
+
function getViewportRect$1(e, t, n) {
|
|
854
|
+
n === void 0 && (n = "viewport");
|
|
855
|
+
let r = n === "layoutViewport", i = getWindow(e), a = getDocumentElement(e), o = i.visualViewport, s = a.clientWidth, c = a.clientHeight, l = 0, u = 0;
|
|
856
|
+
if (o) {
|
|
857
|
+
let e = !isWebKit() || t === "fixed";
|
|
858
|
+
r ? e || (l = -o.offsetLeft, u = -o.offsetTop) : (s = o.width, c = o.height, e && (l = o.offsetLeft, u = o.offsetTop));
|
|
859
|
+
}
|
|
860
|
+
if (getWindowScrollBarX$1(a) <= 0) {
|
|
861
|
+
let e = a.ownerDocument, t = e.body, n = getComputedStyle(t), r = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, i = Math.abs(a.clientWidth - t.clientWidth - r), o = getComputedStyle(a).scrollbarGutter === "stable both-edges" ? i / 2 : i;
|
|
862
|
+
o <= L && (s -= o);
|
|
877
863
|
}
|
|
878
|
-
let l = getWindowScrollBarX(r);
|
|
879
|
-
if (l <= 0) {
|
|
880
|
-
let e = r.ownerDocument, t = e.body, n = getComputedStyle(t), i = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, o = Math.abs(r.clientWidth - t.clientWidth - i);
|
|
881
|
-
o <= I && (a -= o);
|
|
882
|
-
} else l <= I && (a += l);
|
|
883
864
|
return {
|
|
884
|
-
width:
|
|
885
|
-
height:
|
|
886
|
-
x:
|
|
887
|
-
y:
|
|
865
|
+
width: s,
|
|
866
|
+
height: c,
|
|
867
|
+
x: l,
|
|
868
|
+
y: u
|
|
888
869
|
};
|
|
889
870
|
}
|
|
890
|
-
|
|
891
|
-
|
|
871
|
+
e(getViewportRect$1, "getViewportRect");
|
|
872
|
+
function getInnerBoundingClientRect$1(e, t) {
|
|
873
|
+
let n = getBoundingClientRect$1(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = getScale$1(e);
|
|
892
874
|
return {
|
|
893
875
|
width: e.clientWidth * a.x,
|
|
894
876
|
height: e.clientHeight * a.y,
|
|
@@ -896,13 +878,14 @@ function getInnerBoundingClientRect(e, t) {
|
|
|
896
878
|
y: r * a.y
|
|
897
879
|
};
|
|
898
880
|
}
|
|
899
|
-
|
|
881
|
+
e(getInnerBoundingClientRect$1, "getInnerBoundingClientRect");
|
|
882
|
+
function getClientRectFromClippingAncestor$1(e, t, n) {
|
|
900
883
|
let r;
|
|
901
|
-
if (t === "viewport") r = getViewportRect(e, n);
|
|
902
|
-
else if (t === "document") r = getDocumentRect(getDocumentElement(e));
|
|
903
|
-
else if (isElement(t)) r = getInnerBoundingClientRect(t, n);
|
|
884
|
+
if (t === "viewport" || t === "layoutViewport") r = getViewportRect$1(e, n, t);
|
|
885
|
+
else if (t === "document") r = getDocumentRect$1(getDocumentElement(e));
|
|
886
|
+
else if (isElement(t)) r = getInnerBoundingClientRect$1(t, n);
|
|
904
887
|
else {
|
|
905
|
-
let n = getVisualOffsets(e);
|
|
888
|
+
let n = getVisualOffsets$1(e);
|
|
906
889
|
r = {
|
|
907
890
|
x: t.x - n.x,
|
|
908
891
|
y: t.y - n.y,
|
|
@@ -912,24 +895,22 @@ function getClientRectFromClippingAncestor(e, t, n) {
|
|
|
912
895
|
}
|
|
913
896
|
return rectToClientRect(r);
|
|
914
897
|
}
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
return n === t || !isElement(n) || isLastTraversableNode(n) ? !1 : getComputedStyle$1(n).position === "fixed" || hasFixedPositionAncestor(n, t);
|
|
918
|
-
}
|
|
919
|
-
function getClippingElementAncestors(e, t) {
|
|
898
|
+
e(getClientRectFromClippingAncestor$1, "getClientRectFromClippingAncestor");
|
|
899
|
+
function getClippingElementAncestors$1(e, t) {
|
|
920
900
|
let n = t.get(e);
|
|
921
901
|
if (n) return n;
|
|
922
902
|
let r = getOverflowAncestors(e, [], !1).filter((e) => isElement(e) && getNodeName(e) !== "body"), i = null, a = getComputedStyle$1(e).position === "fixed", o = a ? getParentNode(e) : e;
|
|
923
903
|
for (; isElement(o) && !isLastTraversableNode(o);) {
|
|
924
|
-
let
|
|
925
|
-
!
|
|
904
|
+
let e = getComputedStyle$1(o), t = isContainingBlock(o), n = i ? i.position : a ? "fixed" : "";
|
|
905
|
+
!t && (n === "fixed" || n === "absolute" && e.position === "static") ? r = r.filter((e) => e !== o) : i = e, o = getParentNode(o);
|
|
926
906
|
}
|
|
927
907
|
return t.set(e, r), r;
|
|
928
908
|
}
|
|
929
|
-
|
|
930
|
-
|
|
909
|
+
e(getClippingElementAncestors$1, "getClippingElementAncestors");
|
|
910
|
+
function getClippingRect$1(e) {
|
|
911
|
+
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? isTopLayer(t) ? [] : getClippingElementAncestors$1(t, this._c) : [].concat(n), r], o = getClientRectFromClippingAncestor$1(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
|
|
931
912
|
for (let e = 1; e < a.length; e++) {
|
|
932
|
-
let n = getClientRectFromClippingAncestor(t, a[e], i);
|
|
913
|
+
let n = getClientRectFromClippingAncestor$1(t, a[e], i);
|
|
933
914
|
s = f(n.top, s), c = d(n.right, c), l = d(n.bottom, l), u = f(n.left, u);
|
|
934
915
|
}
|
|
935
916
|
return {
|
|
@@ -939,27 +920,26 @@ function getClippingRect(e) {
|
|
|
939
920
|
y: s
|
|
940
921
|
};
|
|
941
922
|
}
|
|
942
|
-
|
|
943
|
-
|
|
923
|
+
e(getClippingRect$1, "getClippingRect");
|
|
924
|
+
function getDimensions$1(e) {
|
|
925
|
+
let { width: t, height: n } = getCssDimensions$1(e);
|
|
944
926
|
return {
|
|
945
927
|
width: t,
|
|
946
928
|
height: n
|
|
947
929
|
};
|
|
948
930
|
}
|
|
949
|
-
|
|
950
|
-
|
|
931
|
+
e(getDimensions$1, "getDimensions");
|
|
932
|
+
function getRectRelativeToOffsetParent$1(e, t, n) {
|
|
933
|
+
let r = isHTMLElement(t), i = getDocumentElement(t), a = n === "fixed", o = getBoundingClientRect$1(e, !0, a, t), s = {
|
|
951
934
|
scrollLeft: 0,
|
|
952
935
|
scrollTop: 0
|
|
953
936
|
}, c = createCoords(0);
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
}
|
|
957
|
-
if (r || !r && !a) if ((getNodeName(t) !== "body" || isOverflowElement(i)) && (s = getNodeScroll(t)), r) {
|
|
958
|
-
let e = getBoundingClientRect(t, !0, a, t);
|
|
937
|
+
if ((r || !a) && ((getNodeName(t) !== "body" || isOverflowElement(i)) && (s = getNodeScroll(t)), r)) {
|
|
938
|
+
let e = getBoundingClientRect$1(t, !0, a, t);
|
|
959
939
|
c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
|
|
960
|
-
}
|
|
961
|
-
|
|
962
|
-
let l = i && !r && !a ? getHTMLOffset(i, s) : createCoords(0);
|
|
940
|
+
}
|
|
941
|
+
!r && i && (c.x = getWindowScrollBarX$1(i));
|
|
942
|
+
let l = i && !r && !a ? getHTMLOffset$1(i, s) : createCoords(0);
|
|
963
943
|
return {
|
|
964
944
|
x: o.left + s.scrollLeft - c.x - l.x,
|
|
965
945
|
y: o.top + s.scrollTop - c.y - l.y,
|
|
@@ -967,34 +947,38 @@ function getRectRelativeToOffsetParent(e, t, n) {
|
|
|
967
947
|
height: o.height
|
|
968
948
|
};
|
|
969
949
|
}
|
|
970
|
-
|
|
950
|
+
e(getRectRelativeToOffsetParent$1, "getRectRelativeToOffsetParent");
|
|
951
|
+
function isStaticPositioned$1(e) {
|
|
971
952
|
return getComputedStyle$1(e).position === "static";
|
|
972
953
|
}
|
|
973
|
-
|
|
954
|
+
e(isStaticPositioned$1, "isStaticPositioned");
|
|
955
|
+
function getTrueOffsetParent$1(e, t) {
|
|
974
956
|
if (!isHTMLElement(e) || getComputedStyle$1(e).position === "fixed") return null;
|
|
975
957
|
if (t) return t(e);
|
|
976
958
|
let n = e.offsetParent;
|
|
977
959
|
return getDocumentElement(e) === n && (n = n.ownerDocument.body), n;
|
|
978
960
|
}
|
|
979
|
-
|
|
961
|
+
e(getTrueOffsetParent$1, "getTrueOffsetParent");
|
|
962
|
+
function getOffsetParent$1(e, t) {
|
|
980
963
|
let n = getWindow(e);
|
|
981
964
|
if (isTopLayer(e)) return n;
|
|
982
965
|
if (!isHTMLElement(e)) {
|
|
983
966
|
let t = getParentNode(e);
|
|
984
967
|
for (; t && !isLastTraversableNode(t);) {
|
|
985
|
-
if (isElement(t) && !isStaticPositioned(t)) return t;
|
|
968
|
+
if (isElement(t) && !isStaticPositioned$1(t)) return t;
|
|
986
969
|
t = getParentNode(t);
|
|
987
970
|
}
|
|
988
971
|
return n;
|
|
989
972
|
}
|
|
990
|
-
let r = getTrueOffsetParent(e, t);
|
|
991
|
-
for (; r && isTableElement(r) && isStaticPositioned(r);) r = getTrueOffsetParent(r, t);
|
|
992
|
-
return r && isLastTraversableNode(r) && isStaticPositioned(r) && !isContainingBlock(r) ? n : r || getContainingBlock(e) || n;
|
|
973
|
+
let r = getTrueOffsetParent$1(e, t);
|
|
974
|
+
for (; r && isTableElement(r) && isStaticPositioned$1(r);) r = getTrueOffsetParent$1(r, t);
|
|
975
|
+
return r && isLastTraversableNode(r) && isStaticPositioned$1(r) && !isContainingBlock(r) ? n : r || getContainingBlock(e) || n;
|
|
993
976
|
}
|
|
994
|
-
|
|
995
|
-
|
|
977
|
+
e(getOffsetParent$1, "getOffsetParent");
|
|
978
|
+
var te = /* @__PURE__ */ e(async function(e) {
|
|
979
|
+
let t = this.getOffsetParent || getOffsetParent$1, n = this.getDimensions, r = await n(e.floating);
|
|
996
980
|
return {
|
|
997
|
-
reference: getRectRelativeToOffsetParent(e.reference, await t(e.floating), e.strategy),
|
|
981
|
+
reference: getRectRelativeToOffsetParent$1(e.reference, await t(e.floating), e.strategy),
|
|
998
982
|
floating: {
|
|
999
983
|
x: 0,
|
|
1000
984
|
y: 0,
|
|
@@ -1002,68 +986,75 @@ var getElementRects = async function(e) {
|
|
|
1002
986
|
height: r.height
|
|
1003
987
|
}
|
|
1004
988
|
};
|
|
1005
|
-
};
|
|
1006
|
-
function isRTL(e) {
|
|
989
|
+
}, "getElementRects");
|
|
990
|
+
function isRTL$1(e) {
|
|
1007
991
|
return getComputedStyle$1(e).direction === "rtl";
|
|
1008
992
|
}
|
|
993
|
+
e(isRTL$1, "isRTL");
|
|
1009
994
|
var ne = {
|
|
1010
|
-
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
995
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: convertOffsetParentRelativeRectToViewportRelativeRect$1,
|
|
1011
996
|
getDocumentElement,
|
|
1012
|
-
getClippingRect,
|
|
1013
|
-
getOffsetParent,
|
|
1014
|
-
getElementRects,
|
|
1015
|
-
getClientRects,
|
|
1016
|
-
getDimensions,
|
|
1017
|
-
getScale,
|
|
997
|
+
getClippingRect: getClippingRect$1,
|
|
998
|
+
getOffsetParent: getOffsetParent$1,
|
|
999
|
+
getElementRects: te,
|
|
1000
|
+
getClientRects: getClientRects$1,
|
|
1001
|
+
getDimensions: getDimensions$1,
|
|
1002
|
+
getScale: getScale$1,
|
|
1018
1003
|
isElement,
|
|
1019
|
-
isRTL
|
|
1004
|
+
isRTL: isRTL$1
|
|
1020
1005
|
};
|
|
1021
|
-
function rectsAreEqual(e, t) {
|
|
1006
|
+
function rectsAreEqual$1(e, t) {
|
|
1022
1007
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1023
1008
|
}
|
|
1024
|
-
|
|
1025
|
-
|
|
1009
|
+
e(rectsAreEqual$1, "rectsAreEqual");
|
|
1010
|
+
function observeMove$1(e, t, n) {
|
|
1011
|
+
let r = null, i, a = getDocumentElement(e);
|
|
1026
1012
|
function cleanup() {
|
|
1027
1013
|
var e;
|
|
1028
|
-
clearTimeout(
|
|
1014
|
+
clearTimeout(i), (e = r) == null || e.disconnect(), r = null;
|
|
1029
1015
|
}
|
|
1030
|
-
function refresh(
|
|
1031
|
-
|
|
1016
|
+
function refresh(n, o) {
|
|
1017
|
+
n === void 0 && (n = !1), o === void 0 && (o = 1), cleanup();
|
|
1032
1018
|
let s = e.getBoundingClientRect(), { left: c, top: l, width: u, height: p } = s;
|
|
1033
|
-
if (
|
|
1034
|
-
let h = m(l), g = m(
|
|
1019
|
+
if (n || t(), !u || !p) return;
|
|
1020
|
+
let h = m(l), g = m(a.clientWidth - (c + u)), _ = m(a.clientHeight - (l + p)), v = m(c), y = {
|
|
1035
1021
|
rootMargin: -h + "px " + -g + "px " + -_ + "px " + -v + "px",
|
|
1036
1022
|
threshold: f(0, d(1, o)) || 1
|
|
1037
1023
|
}, b = !0;
|
|
1038
1024
|
function handleObserve(t) {
|
|
1039
1025
|
let n = t[0].intersectionRatio;
|
|
1026
|
+
if (!rectsAreEqual$1(s, e.getBoundingClientRect())) return refresh();
|
|
1040
1027
|
if (n !== o) {
|
|
1041
1028
|
if (!b) return refresh();
|
|
1042
|
-
n ? refresh(!1, n) :
|
|
1029
|
+
n ? refresh(!1, n) : i = setTimeout(() => {
|
|
1043
1030
|
refresh(!1, 1e-7);
|
|
1044
1031
|
}, 1e3);
|
|
1045
1032
|
}
|
|
1046
|
-
|
|
1033
|
+
b = !1;
|
|
1047
1034
|
}
|
|
1048
1035
|
try {
|
|
1049
|
-
|
|
1036
|
+
r = new IntersectionObserver(handleObserve, {
|
|
1050
1037
|
...y,
|
|
1051
|
-
root:
|
|
1038
|
+
root: a.ownerDocument
|
|
1052
1039
|
});
|
|
1053
1040
|
} catch {
|
|
1054
|
-
|
|
1041
|
+
r = new IntersectionObserver(handleObserve, y);
|
|
1055
1042
|
}
|
|
1056
|
-
|
|
1043
|
+
r.observe(e);
|
|
1057
1044
|
}
|
|
1058
|
-
|
|
1045
|
+
let o = getWindow(e), handleResize = () => refresh(n);
|
|
1046
|
+
return o.addEventListener("resize", handleResize), refresh(!0), () => {
|
|
1047
|
+
o.removeEventListener("resize", handleResize), cleanup();
|
|
1048
|
+
};
|
|
1059
1049
|
}
|
|
1060
|
-
|
|
1050
|
+
e(observeMove$1, "observeMove");
|
|
1051
|
+
function autoUpdate$1(e, t, n, r) {
|
|
1061
1052
|
r === void 0 && (r = {});
|
|
1062
|
-
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = unwrapElement(e), u = i || a ? [...l ? getOverflowAncestors(l) : [], ...t ? getOverflowAncestors(t) : []] : [];
|
|
1053
|
+
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = unwrapElement$1(e), u = i || a ? [...l ? getOverflowAncestors(l) : [], ...t ? getOverflowAncestors(t) : []] : [];
|
|
1063
1054
|
u.forEach((e) => {
|
|
1064
|
-
i && e.addEventListener("scroll", n
|
|
1055
|
+
i && e.addEventListener("scroll", n), a && e.addEventListener("resize", n);
|
|
1065
1056
|
});
|
|
1066
|
-
let d = l && s ? observeMove(l, n) : null, f = -1, p = null;
|
|
1057
|
+
let d = l && s ? observeMove$1(l, n, a) : null, f = -1, p = null;
|
|
1067
1058
|
o && (p = new ResizeObserver((e) => {
|
|
1068
1059
|
let [r] = e;
|
|
1069
1060
|
r && r.target === l && p && t && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
|
|
@@ -1071,11 +1062,11 @@ function autoUpdate(e, t, n, r) {
|
|
|
1071
1062
|
(e = p) == null || e.observe(t);
|
|
1072
1063
|
})), n();
|
|
1073
1064
|
}), l && !c && p.observe(l), t && p.observe(t));
|
|
1074
|
-
let m, h = c ? getBoundingClientRect(e) : null;
|
|
1065
|
+
let m, h = c ? getBoundingClientRect$1(e) : null;
|
|
1075
1066
|
c && frameLoop();
|
|
1076
1067
|
function frameLoop() {
|
|
1077
|
-
let t = getBoundingClientRect(e);
|
|
1078
|
-
h && !rectsAreEqual(h, t) && n(), h = t, m = requestAnimationFrame(frameLoop);
|
|
1068
|
+
let t = getBoundingClientRect$1(e);
|
|
1069
|
+
h && !rectsAreEqual$1(h, t) && n(), h = t, m = requestAnimationFrame(frameLoop);
|
|
1079
1070
|
}
|
|
1080
1071
|
return n(), () => {
|
|
1081
1072
|
var e;
|
|
@@ -1084,11 +1075,10 @@ function autoUpdate(e, t, n, r) {
|
|
|
1084
1075
|
}), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
|
|
1085
1076
|
};
|
|
1086
1077
|
}
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
...
|
|
1091
|
-
}, a = {
|
|
1078
|
+
e(autoUpdate$1, "autoUpdate");
|
|
1079
|
+
var re = N, ie = P, ae = k, oe = I, se = A, R = D, ce = j, z = F, B = /* @__PURE__ */ e((e, t, n) => {
|
|
1080
|
+
let r = /* @__PURE__ */ new Map(), i = n ?? {}, a = {
|
|
1081
|
+
...ne,
|
|
1092
1082
|
...i.platform,
|
|
1093
1083
|
_c: r
|
|
1094
1084
|
};
|
|
@@ -1096,7 +1086,7 @@ var L = N, R = O, z = P, B = k, V = ee, H = A, U = D, re = j, ie = F, computePos
|
|
|
1096
1086
|
...i,
|
|
1097
1087
|
platform: a
|
|
1098
1088
|
});
|
|
1099
|
-
},
|
|
1089
|
+
}, "computePosition"), V = typeof document < "u" ? n : function noop() {};
|
|
1100
1090
|
function deepEqual(e, t) {
|
|
1101
1091
|
if (e === t) return !0;
|
|
1102
1092
|
if (typeof e != typeof t) return !1;
|
|
@@ -1127,7 +1117,7 @@ function roundByDPR(e, t) {
|
|
|
1127
1117
|
}
|
|
1128
1118
|
function useLatestRef(e) {
|
|
1129
1119
|
let n = t.useRef(e);
|
|
1130
|
-
return
|
|
1120
|
+
return V(() => {
|
|
1131
1121
|
n.current = e;
|
|
1132
1122
|
}), n;
|
|
1133
1123
|
}
|
|
@@ -1153,7 +1143,7 @@ function useFloating$1(e) {
|
|
|
1153
1143
|
strategy: r,
|
|
1154
1144
|
middleware: m
|
|
1155
1145
|
};
|
|
1156
|
-
k.current && (e.platform = k.current),
|
|
1146
|
+
k.current && (e.platform = k.current), B(w.current, T.current, e).then((e) => {
|
|
1157
1147
|
let t = {
|
|
1158
1148
|
...e,
|
|
1159
1149
|
isPositioned: A.current !== !1
|
|
@@ -1169,16 +1159,16 @@ function useFloating$1(e) {
|
|
|
1169
1159
|
k,
|
|
1170
1160
|
A
|
|
1171
1161
|
]);
|
|
1172
|
-
|
|
1162
|
+
V(() => {
|
|
1173
1163
|
d === !1 && E.current.isPositioned && (E.current.isPositioned = !1, p((e) => ({
|
|
1174
1164
|
...e,
|
|
1175
1165
|
isPositioned: !1
|
|
1176
1166
|
})));
|
|
1177
1167
|
}, [d]);
|
|
1178
1168
|
let M = t.useRef(!1);
|
|
1179
|
-
|
|
1169
|
+
V(() => (M.current = !0, () => {
|
|
1180
1170
|
M.current = !1;
|
|
1181
|
-
}), []),
|
|
1171
|
+
}), []), V(() => {
|
|
1182
1172
|
if (S && (w.current = S), C && (T.current = C), S && C) {
|
|
1183
1173
|
if (O.current) return O.current(S, C, j);
|
|
1184
1174
|
j();
|
|
@@ -1246,55 +1236,55 @@ var arrow$1 = (e) => {
|
|
|
1246
1236
|
options: e,
|
|
1247
1237
|
fn(t) {
|
|
1248
1238
|
let { element: n, padding: r } = typeof e == "function" ? e(t) : e;
|
|
1249
|
-
return n && isRef(n) ? n.current == null ? {} :
|
|
1239
|
+
return n && isRef(n) ? n.current == null ? {} : R({
|
|
1250
1240
|
element: n.current,
|
|
1251
1241
|
padding: r
|
|
1252
|
-
}).fn(t) : n ?
|
|
1242
|
+
}).fn(t) : n ? R({
|
|
1253
1243
|
element: n,
|
|
1254
1244
|
padding: r
|
|
1255
1245
|
}).fn(t) : {};
|
|
1256
1246
|
}
|
|
1257
1247
|
};
|
|
1258
|
-
},
|
|
1259
|
-
let n =
|
|
1248
|
+
}, H = /* @__PURE__ */ e((e, t) => {
|
|
1249
|
+
let n = re(e);
|
|
1260
1250
|
return {
|
|
1261
1251
|
name: n.name,
|
|
1262
1252
|
fn: n.fn,
|
|
1263
1253
|
options: [e, t]
|
|
1264
1254
|
};
|
|
1265
|
-
}, shift = (e, t) => {
|
|
1266
|
-
let n =
|
|
1255
|
+
}, "offset"), shift = (e, t) => {
|
|
1256
|
+
let n = ie(e);
|
|
1267
1257
|
return {
|
|
1268
1258
|
name: n.name,
|
|
1269
1259
|
fn: n.fn,
|
|
1270
1260
|
options: [e, t]
|
|
1271
1261
|
};
|
|
1272
1262
|
}, limitShift = (e, t) => ({
|
|
1273
|
-
fn:
|
|
1263
|
+
fn: z(e).fn,
|
|
1274
1264
|
options: [e, t]
|
|
1275
1265
|
}), flip = (e, t) => {
|
|
1276
|
-
let n =
|
|
1266
|
+
let n = ae(e);
|
|
1277
1267
|
return {
|
|
1278
1268
|
name: n.name,
|
|
1279
1269
|
fn: n.fn,
|
|
1280
1270
|
options: [e, t]
|
|
1281
1271
|
};
|
|
1282
|
-
},
|
|
1283
|
-
let n =
|
|
1272
|
+
}, U = /* @__PURE__ */ e((e, t) => {
|
|
1273
|
+
let n = oe(e);
|
|
1284
1274
|
return {
|
|
1285
1275
|
name: n.name,
|
|
1286
1276
|
fn: n.fn,
|
|
1287
1277
|
options: [e, t]
|
|
1288
1278
|
};
|
|
1289
|
-
},
|
|
1290
|
-
let n =
|
|
1279
|
+
}, "size"), W = /* @__PURE__ */ e((e, t) => {
|
|
1280
|
+
let n = se(e);
|
|
1291
1281
|
return {
|
|
1292
1282
|
name: n.name,
|
|
1293
1283
|
fn: n.fn,
|
|
1294
1284
|
options: [e, t]
|
|
1295
1285
|
};
|
|
1296
|
-
}, inline = (e, t) => {
|
|
1297
|
-
let n =
|
|
1286
|
+
}, "hide"), inline = (e, t) => {
|
|
1287
|
+
let n = ce(e);
|
|
1298
1288
|
return {
|
|
1299
1289
|
name: n.name,
|
|
1300
1290
|
fn: n.fn,
|
|
@@ -1309,7 +1299,7 @@ var arrow$1 = (e) => {
|
|
|
1309
1299
|
};
|
|
1310
1300
|
};
|
|
1311
1301
|
//#endregion
|
|
1312
|
-
//#region ../../node_modules/.pnpm/@floating-ui+react@0.27.
|
|
1302
|
+
//#region ../../node_modules/.pnpm/@floating-ui+react@0.27.20_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
1313
1303
|
function useMergeRefs(e) {
|
|
1314
1304
|
let n = t.useRef(void 0), r = t.useCallback((t) => {
|
|
1315
1305
|
let n = e.map((e) => {
|
|
@@ -1333,18 +1323,18 @@ function useMergeRefs(e) {
|
|
|
1333
1323
|
n.current &&= (n.current(), void 0), e != null && (n.current = r(e));
|
|
1334
1324
|
}, e);
|
|
1335
1325
|
}
|
|
1336
|
-
var G = "data-floating-ui-focusable", K = "active", q = "selected",
|
|
1337
|
-
[...
|
|
1338
|
-
var
|
|
1326
|
+
var G = "data-floating-ui-focusable", K = "active", q = "selected", le = "ArrowLeft", ue = "ArrowRight", de = "ArrowUp", fe = "ArrowDown", pe = [le, ue], me = [de, fe];
|
|
1327
|
+
[...pe, ...me];
|
|
1328
|
+
var he = { ...t }, J = !1, ge = 0, genId = () => "floating-ui-" + Math.random().toString(36).slice(2, 6) + ge++;
|
|
1339
1329
|
function useFloatingId() {
|
|
1340
|
-
let [e, n] = t.useState(() =>
|
|
1330
|
+
let [e, n] = t.useState(() => J ? genId() : void 0);
|
|
1341
1331
|
return S(() => {
|
|
1342
1332
|
e ?? n(genId());
|
|
1343
1333
|
}, []), t.useEffect(() => {
|
|
1344
|
-
|
|
1334
|
+
J = !0;
|
|
1345
1335
|
}, []), e;
|
|
1346
1336
|
}
|
|
1347
|
-
var
|
|
1337
|
+
var Y = he.useId || useFloatingId;
|
|
1348
1338
|
function createEventEmitter() {
|
|
1349
1339
|
let e = /* @__PURE__ */ new Map();
|
|
1350
1340
|
return {
|
|
@@ -1361,14 +1351,14 @@ function createEventEmitter() {
|
|
|
1361
1351
|
}
|
|
1362
1352
|
};
|
|
1363
1353
|
}
|
|
1364
|
-
var
|
|
1354
|
+
var _e = /*#__PURE__*/ t.createContext(null), ve = /*#__PURE__*/ t.createContext(null), useFloatingParentNodeId = () => t.useContext(_e)?.id || null, useFloatingTree = () => t.useContext(ve);
|
|
1365
1355
|
function createAttribute(e) {
|
|
1366
1356
|
return "data-floating-ui-" + e;
|
|
1367
1357
|
}
|
|
1368
1358
|
function clearTimeoutIfSet(e) {
|
|
1369
1359
|
e.current !== -1 && (clearTimeout(e.current), e.current = -1);
|
|
1370
1360
|
}
|
|
1371
|
-
var
|
|
1361
|
+
var X = /*#__PURE__*/ createAttribute("safe-polygon");
|
|
1372
1362
|
function getDelay(e, t, n) {
|
|
1373
1363
|
if (n && !isMouseLikePointerType(n)) return 0;
|
|
1374
1364
|
if (typeof e == "number") return e;
|
|
@@ -1422,7 +1412,7 @@ function useHover(e, n) {
|
|
|
1422
1412
|
}), M = useEffectEvent$1(() => {
|
|
1423
1413
|
if (E.current) {
|
|
1424
1414
|
let e = getDocument(s.floating).body;
|
|
1425
|
-
e.style.pointerEvents = "", e.removeAttribute(
|
|
1415
|
+
e.style.pointerEvents = "", e.removeAttribute(X), E.current = !1;
|
|
1426
1416
|
}
|
|
1427
1417
|
}), N = useEffectEvent$1(() => a.current.openEvent ? ["click", "mousedown"].includes(a.current.openEvent.type) : !1);
|
|
1428
1418
|
t.useEffect(() => {
|
|
@@ -1508,7 +1498,7 @@ function useHover(e, n) {
|
|
|
1508
1498
|
if (isElement(s.domReference) && e) {
|
|
1509
1499
|
var t;
|
|
1510
1500
|
let n = getDocument(s.floating).body;
|
|
1511
|
-
n.setAttribute(
|
|
1501
|
+
n.setAttribute(X, "");
|
|
1512
1502
|
let r = s.domReference, i = m == null || (t = m.nodesRef.current.find((e) => e.id === h)) == null || (t = t.context) == null ? void 0 : t.elements.floating;
|
|
1513
1503
|
return i && (i.style.pointerEvents = ""), n.style.pointerEvents = "none", r.style.pointerEvents = "auto", e.style.pointerEvents = "auto", () => {
|
|
1514
1504
|
n.style.pointerEvents = "", r.style.pointerEvents = "", e.style.pointerEvents = "";
|
|
@@ -1549,7 +1539,7 @@ function useHover(e, n) {
|
|
|
1549
1539
|
function handleMouseMove() {
|
|
1550
1540
|
!T.current && !v.current && i(!0, t, "hover");
|
|
1551
1541
|
}
|
|
1552
|
-
d
|
|
1542
|
+
(!d || isMouseLikePointerType(b.current)) && (r || getRestMs(y.current) === 0 || O.current && e.movementX ** 2 + e.movementY ** 2 < 2 || (clearTimeoutIfSet(w), b.current === "touch" ? handleMouseMove() : (O.current = !0, w.current = window.setTimeout(handleMouseMove, getRestMs(y.current)))));
|
|
1553
1543
|
}
|
|
1554
1544
|
};
|
|
1555
1545
|
}, [
|
|
@@ -1561,7 +1551,7 @@ function useHover(e, n) {
|
|
|
1561
1551
|
]);
|
|
1562
1552
|
return t.useMemo(() => c ? { reference: P } : {}, [c, P]);
|
|
1563
1553
|
}
|
|
1564
|
-
var NOOP = () => {},
|
|
1554
|
+
var NOOP = () => {}, Z = /*#__PURE__*/ t.createContext({
|
|
1565
1555
|
delay: 0,
|
|
1566
1556
|
initialDelay: 0,
|
|
1567
1557
|
timeoutMs: 0,
|
|
@@ -1569,7 +1559,7 @@ var NOOP = () => {}, $ = /*#__PURE__*/ t.createContext({
|
|
|
1569
1559
|
setCurrentId: NOOP,
|
|
1570
1560
|
setState: NOOP,
|
|
1571
1561
|
isInstantPhase: !1
|
|
1572
|
-
}), useDelayGroupContext = () => t.useContext(
|
|
1562
|
+
}), useDelayGroupContext = () => t.useContext(Z);
|
|
1573
1563
|
function FloatingDelayGroup(e) {
|
|
1574
1564
|
let { children: n, delay: i, timeoutMs: a = 0 } = e, [o, s] = t.useReducer((e, t) => ({
|
|
1575
1565
|
...e,
|
|
@@ -1585,7 +1575,7 @@ function FloatingDelayGroup(e) {
|
|
|
1585
1575
|
}, []);
|
|
1586
1576
|
return S(() => {
|
|
1587
1577
|
o.currentId ? c.current === null ? c.current = o.currentId : o.isInstantPhase || s({ isInstantPhase: !0 }) : (o.isInstantPhase && s({ isInstantPhase: !1 }), c.current = null);
|
|
1588
|
-
}, [o.currentId, o.isInstantPhase]), /*#__PURE__*/ r(
|
|
1578
|
+
}, [o.currentId, o.isInstantPhase]), /*#__PURE__*/ r(Z.Provider, {
|
|
1589
1579
|
value: t.useMemo(() => ({
|
|
1590
1580
|
...o,
|
|
1591
1581
|
setState: s,
|
|
@@ -1635,7 +1625,7 @@ function useDelayGroup(e, t) {
|
|
|
1635
1625
|
d,
|
|
1636
1626
|
p
|
|
1637
1627
|
]), S(() => {
|
|
1638
|
-
o &&
|
|
1628
|
+
o && u !== NOOP && n && u(s);
|
|
1639
1629
|
}, [
|
|
1640
1630
|
o,
|
|
1641
1631
|
n,
|
|
@@ -1659,11 +1649,11 @@ function contains(e, t) {
|
|
|
1659
1649
|
function getTarget(e) {
|
|
1660
1650
|
return "composedPath" in e ? e.composedPath()[0] : e.target;
|
|
1661
1651
|
}
|
|
1662
|
-
var
|
|
1652
|
+
var ye = {
|
|
1663
1653
|
pointerdown: "onPointerDown",
|
|
1664
1654
|
mousedown: "onMouseDown",
|
|
1665
1655
|
click: "onClick"
|
|
1666
|
-
},
|
|
1656
|
+
}, be = {
|
|
1667
1657
|
pointerdown: "onPointerDownCapture",
|
|
1668
1658
|
mousedown: "onMouseDownCapture",
|
|
1669
1659
|
click: "onClickCapture"
|
|
@@ -1751,7 +1741,7 @@ function useDismiss(e, n) {
|
|
|
1751
1741
|
c && (t.addEventListener("keydown", S ? E : T, S), t.addEventListener("compositionstart", handleCompositionStart), t.addEventListener("compositionend", handleCompositionEnd)), v && t.addEventListener(u, C ? O : D, C);
|
|
1752
1742
|
let n = [];
|
|
1753
1743
|
return p && (isElement(a.domReference) && (n = getOverflowAncestors(a.domReference)), isElement(a.floating) && (n = n.concat(getOverflowAncestors(a.floating))), !isElement(a.reference) && a.reference && a.reference.contextElement && (n = n.concat(getOverflowAncestors(a.reference.contextElement)))), n = n.filter((e) => e !== t.defaultView?.visualViewport), n.forEach((e) => {
|
|
1754
|
-
e.addEventListener("scroll", onScroll
|
|
1744
|
+
e.addEventListener("scroll", onScroll);
|
|
1755
1745
|
}), () => {
|
|
1756
1746
|
c && (t.removeEventListener("keydown", S ? E : T, S), t.removeEventListener("compositionstart", handleCompositionStart), t.removeEventListener("compositionend", handleCompositionEnd)), v && t.removeEventListener(u, C ? O : D, C), n.forEach((e) => {
|
|
1757
1747
|
e.removeEventListener("scroll", onScroll);
|
|
@@ -1785,7 +1775,7 @@ function useDismiss(e, n) {
|
|
|
1785
1775
|
let k = t.useMemo(() => ({
|
|
1786
1776
|
onKeyDown: T,
|
|
1787
1777
|
...d && {
|
|
1788
|
-
[
|
|
1778
|
+
[ye[f]]: (e) => {
|
|
1789
1779
|
i(!1, e.nativeEvent, "reference-press");
|
|
1790
1780
|
},
|
|
1791
1781
|
...f !== "click" && { onClick(e) {
|
|
@@ -1805,7 +1795,7 @@ function useDismiss(e, n) {
|
|
|
1805
1795
|
onKeyDown: T,
|
|
1806
1796
|
onMouseDown: setMouseDownOrUpInside,
|
|
1807
1797
|
onMouseUp: setMouseDownOrUpInside,
|
|
1808
|
-
[
|
|
1798
|
+
[be[u]]: () => {
|
|
1809
1799
|
o.current.insideReactTree = !0;
|
|
1810
1800
|
}
|
|
1811
1801
|
};
|
|
@@ -1824,7 +1814,7 @@ function useDismiss(e, n) {
|
|
|
1824
1814
|
]);
|
|
1825
1815
|
}
|
|
1826
1816
|
function useFloatingRootContext(e) {
|
|
1827
|
-
let { open: n = !1, onOpenChange: r, elements: i } = e, a =
|
|
1817
|
+
let { open: n = !1, onOpenChange: r, elements: i } = e, a = Y(), o = t.useRef({}), [s] = t.useState(() => createEventEmitter()), c = useFloatingParentNodeId() != null, [l, u] = t.useState(i.reference), d = useEffectEvent$1((e, t, n) => {
|
|
1828
1818
|
o.current.openEvent = e ? t : void 0, s.emit("openchange", {
|
|
1829
1819
|
open: e,
|
|
1830
1820
|
event: t,
|
|
@@ -1858,72 +1848,70 @@ function useFloatingRootContext(e) {
|
|
|
1858
1848
|
]);
|
|
1859
1849
|
}
|
|
1860
1850
|
function useFloating(e) {
|
|
1861
|
-
e === void 0
|
|
1862
|
-
|
|
1863
|
-
...e,
|
|
1851
|
+
let { elements: n, ...r } = e === void 0 ? {} : e, { nodeId: i } = r, a = useFloatingRootContext({
|
|
1852
|
+
...r,
|
|
1864
1853
|
elements: {
|
|
1865
|
-
reference: null,
|
|
1866
|
-
floating: null
|
|
1867
|
-
...e.elements
|
|
1854
|
+
reference: n?.reference ?? null,
|
|
1855
|
+
floating: n?.floating ?? null
|
|
1868
1856
|
}
|
|
1869
|
-
}),
|
|
1857
|
+
}), o = r.rootContext || a, s = o.elements, [c, l] = t.useState(null), [u, d] = t.useState(null), f = s?.domReference || c, p = t.useRef(null), m = useFloatingTree();
|
|
1870
1858
|
S(() => {
|
|
1871
|
-
|
|
1872
|
-
}, [
|
|
1873
|
-
let
|
|
1874
|
-
...
|
|
1859
|
+
f && (p.current = f);
|
|
1860
|
+
}, [f]);
|
|
1861
|
+
let h = useFloating$1({
|
|
1862
|
+
...r,
|
|
1875
1863
|
elements: {
|
|
1876
|
-
...
|
|
1877
|
-
...
|
|
1864
|
+
...s,
|
|
1865
|
+
...u && { reference: u }
|
|
1878
1866
|
}
|
|
1879
|
-
}),
|
|
1867
|
+
}), g = t.useCallback((e) => {
|
|
1880
1868
|
let t = isElement(e) ? {
|
|
1881
1869
|
getBoundingClientRect: () => e.getBoundingClientRect(),
|
|
1882
1870
|
getClientRects: () => e.getClientRects(),
|
|
1883
1871
|
contextElement: e
|
|
1884
1872
|
} : e;
|
|
1885
|
-
|
|
1886
|
-
}, [
|
|
1887
|
-
(isElement(e) || e === null) && (
|
|
1888
|
-
}, [
|
|
1889
|
-
...
|
|
1890
|
-
setReference:
|
|
1891
|
-
setPositionReference:
|
|
1892
|
-
domReference:
|
|
1873
|
+
d(t), h.refs.setReference(t);
|
|
1874
|
+
}, [h.refs]), _ = t.useCallback((e) => {
|
|
1875
|
+
(isElement(e) || e === null) && (p.current = e, l(e)), (isElement(h.refs.reference.current) || h.refs.reference.current === null || e !== null && !isElement(e)) && h.refs.setReference(e);
|
|
1876
|
+
}, [h.refs]), v = t.useMemo(() => ({
|
|
1877
|
+
...h.refs,
|
|
1878
|
+
setReference: _,
|
|
1879
|
+
setPositionReference: g,
|
|
1880
|
+
domReference: p
|
|
1893
1881
|
}), [
|
|
1894
|
-
|
|
1895
|
-
h,
|
|
1896
|
-
m
|
|
1897
|
-
]), _ = t.useMemo(() => ({
|
|
1898
|
-
...p.elements,
|
|
1899
|
-
domReference: u
|
|
1900
|
-
}), [p.elements, u]), v = t.useMemo(() => ({
|
|
1901
|
-
...p,
|
|
1902
|
-
...i,
|
|
1903
|
-
refs: g,
|
|
1904
|
-
elements: _,
|
|
1905
|
-
nodeId: n
|
|
1906
|
-
}), [
|
|
1907
|
-
p,
|
|
1908
|
-
g,
|
|
1882
|
+
h.refs,
|
|
1909
1883
|
_,
|
|
1910
|
-
|
|
1911
|
-
|
|
1884
|
+
g
|
|
1885
|
+
]), y = t.useMemo(() => ({
|
|
1886
|
+
...h.elements,
|
|
1887
|
+
domReference: f
|
|
1888
|
+
}), [h.elements, f]), b = t.useMemo(() => ({
|
|
1889
|
+
...h,
|
|
1890
|
+
...o,
|
|
1891
|
+
refs: v,
|
|
1892
|
+
elements: y,
|
|
1893
|
+
nodeId: i
|
|
1894
|
+
}), [
|
|
1895
|
+
h,
|
|
1896
|
+
v,
|
|
1897
|
+
y,
|
|
1898
|
+
i,
|
|
1899
|
+
o
|
|
1912
1900
|
]);
|
|
1913
1901
|
return S(() => {
|
|
1914
|
-
|
|
1915
|
-
let e =
|
|
1916
|
-
e && (e.context =
|
|
1902
|
+
o.dataRef.current.floatingContext = b;
|
|
1903
|
+
let e = m?.nodesRef.current.find((e) => e.id === i);
|
|
1904
|
+
e && (e.context = b);
|
|
1917
1905
|
}), t.useMemo(() => ({
|
|
1918
|
-
...
|
|
1919
|
-
context:
|
|
1920
|
-
refs:
|
|
1921
|
-
elements:
|
|
1906
|
+
...h,
|
|
1907
|
+
context: b,
|
|
1908
|
+
refs: v,
|
|
1909
|
+
elements: y
|
|
1922
1910
|
}), [
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1911
|
+
h,
|
|
1912
|
+
v,
|
|
1913
|
+
y,
|
|
1914
|
+
b
|
|
1927
1915
|
]);
|
|
1928
1916
|
}
|
|
1929
1917
|
function isMacSafari() {
|
|
@@ -1982,7 +1970,7 @@ function useFocus(e, n) {
|
|
|
1982
1970
|
let t = e.relatedTarget, n = e.nativeEvent, r = isElement(t) && t.hasAttribute(createAttribute("focus-guard")) && t.getAttribute("data-type") === "outside";
|
|
1983
1971
|
d.current = window.setTimeout(() => {
|
|
1984
1972
|
let e = activeElement(s.domReference ? s.domReference.ownerDocument : document);
|
|
1985
|
-
|
|
1973
|
+
(t || e !== s.domReference) && (contains$1(o.current.floatingContext?.refs.floating.current, e) || contains$1(s.domReference, e) || r || i(!1, n, "focus"));
|
|
1986
1974
|
});
|
|
1987
1975
|
}
|
|
1988
1976
|
}), [
|
|
@@ -2010,15 +1998,17 @@ function mergeProps(e, t, n) {
|
|
|
2010
1998
|
return typeof r == "function" ? e ? r(e) : null : r;
|
|
2011
1999
|
}).concat(e).reduce((e, t) => (t && Object.entries(t).forEach((t) => {
|
|
2012
2000
|
let [n, a] = t;
|
|
2013
|
-
if (!(i && [K, q].includes(n)))
|
|
2014
|
-
if (
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2001
|
+
if (!(i && [K, q].includes(n))) {
|
|
2002
|
+
if (n.indexOf("on") === 0) {
|
|
2003
|
+
if (r.has(n) || r.set(n, []), typeof a == "function") {
|
|
2004
|
+
var o;
|
|
2005
|
+
(o = r.get(n)) == null || o.push(a), e[n] = function() {
|
|
2006
|
+
var e = [...arguments];
|
|
2007
|
+
return r.get(n)?.map((t) => t(...e)).find((e) => e !== void 0);
|
|
2008
|
+
};
|
|
2009
|
+
}
|
|
2010
|
+
} else e[n] = a;
|
|
2011
|
+
}
|
|
2022
2012
|
}), e), {})
|
|
2023
2013
|
};
|
|
2024
2014
|
}
|
|
@@ -2035,14 +2025,14 @@ function useInteractions(e) {
|
|
|
2035
2025
|
s
|
|
2036
2026
|
]);
|
|
2037
2027
|
}
|
|
2038
|
-
var
|
|
2028
|
+
var xe = /*#__PURE__*/ new Map([
|
|
2039
2029
|
["select", "listbox"],
|
|
2040
2030
|
["combobox", "listbox"],
|
|
2041
2031
|
["label", !1]
|
|
2042
2032
|
]);
|
|
2043
2033
|
function useRole(e, n) {
|
|
2044
2034
|
n === void 0 && (n = {});
|
|
2045
|
-
let { open: r, elements: i, floatingId: a } = e, { enabled: o = !0, role: s = "dialog" } = n, c =
|
|
2035
|
+
let { open: r, elements: i, floatingId: a } = e, { enabled: o = !0, role: s = "dialog" } = n, c = Y(), l = i.domReference?.id || c, u = t.useMemo(() => getFloatingFocusElement(i.floating)?.id || a, [i.floating, a]), d = xe.get(s) ?? s, f = useFloatingParentNodeId() != null, p = t.useMemo(() => d === "tooltip" || s === "label" ? { ["aria-" + (s === "label" ? "labelledby" : "describedby")]: r ? u : void 0 } : {
|
|
2046
2036
|
"aria-expanded": r ? "true" : "false",
|
|
2047
2037
|
"aria-haspopup": d === "alertdialog" ? "dialog" : d,
|
|
2048
2038
|
"aria-controls": r ? u : void 0,
|
|
@@ -2161,14 +2151,12 @@ function safePolygon(e) {
|
|
|
2161
2151
|
[y.left + 1, A]
|
|
2162
2152
|
];
|
|
2163
2153
|
break;
|
|
2164
|
-
case "right":
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
];
|
|
2171
|
-
break;
|
|
2154
|
+
case "right": j = [
|
|
2155
|
+
[y.right - 1, A],
|
|
2156
|
+
[y.right - 1, k],
|
|
2157
|
+
[b.left + 1, k],
|
|
2158
|
+
[b.left + 1, A]
|
|
2159
|
+
];
|
|
2172
2160
|
}
|
|
2173
2161
|
function getPolygon(e) {
|
|
2174
2162
|
let [n, r] = e;
|
|
@@ -2215,4 +2203,330 @@ function safePolygon(e) {
|
|
|
2215
2203
|
return fn.__options = { blockPointerEvents: n }, fn;
|
|
2216
2204
|
}
|
|
2217
2205
|
//#endregion
|
|
2218
|
-
|
|
2206
|
+
//#region ../../node_modules/.pnpm/@floating-ui+dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
2207
|
+
function getCssDimensions(e) {
|
|
2208
|
+
let t = getComputedStyle$1(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = isHTMLElement(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = p(n) !== a || p(r) !== o;
|
|
2209
|
+
return s && (n = a, r = o), {
|
|
2210
|
+
width: n,
|
|
2211
|
+
height: r,
|
|
2212
|
+
$: s
|
|
2213
|
+
};
|
|
2214
|
+
}
|
|
2215
|
+
function unwrapElement(e) {
|
|
2216
|
+
return isElement(e) ? e : e.contextElement;
|
|
2217
|
+
}
|
|
2218
|
+
function getScale(e) {
|
|
2219
|
+
let t = unwrapElement(e);
|
|
2220
|
+
if (!isHTMLElement(t)) return createCoords(1);
|
|
2221
|
+
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = getCssDimensions(t), o = (a ? p(n.width) : n.width) / r, s = (a ? p(n.height) : n.height) / i;
|
|
2222
|
+
return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
2223
|
+
x: o,
|
|
2224
|
+
y: s
|
|
2225
|
+
};
|
|
2226
|
+
}
|
|
2227
|
+
var Se = /*#__PURE__*/ createCoords(0);
|
|
2228
|
+
function getVisualOffsets(e) {
|
|
2229
|
+
let t = getWindow(e);
|
|
2230
|
+
return !isWebKit() || !t.visualViewport ? Se : {
|
|
2231
|
+
x: t.visualViewport.offsetLeft,
|
|
2232
|
+
y: t.visualViewport.offsetTop
|
|
2233
|
+
};
|
|
2234
|
+
}
|
|
2235
|
+
function shouldAddVisualOffsets(e, t, n) {
|
|
2236
|
+
return t === void 0 && (t = !1), !n || t && n !== getWindow(e) ? !1 : t;
|
|
2237
|
+
}
|
|
2238
|
+
function getBoundingClientRect(e, t, n, r) {
|
|
2239
|
+
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
2240
|
+
let i = e.getBoundingClientRect(), a = unwrapElement(e), o = createCoords(1);
|
|
2241
|
+
t && (r ? isElement(r) && (o = getScale(r)) : o = getScale(e));
|
|
2242
|
+
let s = shouldAddVisualOffsets(a, n, r) ? getVisualOffsets(a) : createCoords(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
|
|
2243
|
+
if (a) {
|
|
2244
|
+
let e = getWindow(a), t = r && isElement(r) ? getWindow(r) : r, n = e, i = getFrameElement(n);
|
|
2245
|
+
for (; i && r && t !== n;) {
|
|
2246
|
+
let e = getScale(i), t = i.getBoundingClientRect(), r = getComputedStyle$1(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
|
|
2247
|
+
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = getWindow(i), i = getFrameElement(n);
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
2250
|
+
return rectToClientRect({
|
|
2251
|
+
width: u,
|
|
2252
|
+
height: d,
|
|
2253
|
+
x: c,
|
|
2254
|
+
y: l
|
|
2255
|
+
});
|
|
2256
|
+
}
|
|
2257
|
+
function getWindowScrollBarX(e, t) {
|
|
2258
|
+
let n = getNodeScroll(e).scrollLeft;
|
|
2259
|
+
return t ? t.left + n : getBoundingClientRect(getDocumentElement(e)).left + n;
|
|
2260
|
+
}
|
|
2261
|
+
function getHTMLOffset(e, t) {
|
|
2262
|
+
let n = e.getBoundingClientRect();
|
|
2263
|
+
return {
|
|
2264
|
+
x: n.left + t.scrollLeft - getWindowScrollBarX(e, n),
|
|
2265
|
+
y: n.top + t.scrollTop
|
|
2266
|
+
};
|
|
2267
|
+
}
|
|
2268
|
+
function convertOffsetParentRelativeRectToViewportRelativeRect(e) {
|
|
2269
|
+
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = getDocumentElement(r), s = t ? isTopLayer(t.floating) : !1;
|
|
2270
|
+
if (r === o || s && a) return n;
|
|
2271
|
+
let c = {
|
|
2272
|
+
scrollLeft: 0,
|
|
2273
|
+
scrollTop: 0
|
|
2274
|
+
}, l = createCoords(1), u = createCoords(0), d = isHTMLElement(r);
|
|
2275
|
+
if ((d || !d && !a) && ((getNodeName(r) !== "body" || isOverflowElement(o)) && (c = getNodeScroll(r)), d)) {
|
|
2276
|
+
let e = getBoundingClientRect(r);
|
|
2277
|
+
l = getScale(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
|
|
2278
|
+
}
|
|
2279
|
+
let f = o && !d && !a ? getHTMLOffset(o, c) : createCoords(0);
|
|
2280
|
+
return {
|
|
2281
|
+
width: n.width * l.x,
|
|
2282
|
+
height: n.height * l.y,
|
|
2283
|
+
x: n.x * l.x - c.scrollLeft * l.x + u.x + f.x,
|
|
2284
|
+
y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
|
|
2285
|
+
};
|
|
2286
|
+
}
|
|
2287
|
+
function getClientRects(e) {
|
|
2288
|
+
return Array.from(e.getClientRects());
|
|
2289
|
+
}
|
|
2290
|
+
function getDocumentRect(e) {
|
|
2291
|
+
let t = getDocumentElement(e), n = getNodeScroll(e), r = e.ownerDocument.body, i = f(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = f(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight), o = -n.scrollLeft + getWindowScrollBarX(e), s = -n.scrollTop;
|
|
2292
|
+
return getComputedStyle$1(r).direction === "rtl" && (o += f(t.clientWidth, r.clientWidth) - i), {
|
|
2293
|
+
width: i,
|
|
2294
|
+
height: a,
|
|
2295
|
+
x: o,
|
|
2296
|
+
y: s
|
|
2297
|
+
};
|
|
2298
|
+
}
|
|
2299
|
+
var Q = 25;
|
|
2300
|
+
function getViewportRect(e, t) {
|
|
2301
|
+
let n = getWindow(e), r = getDocumentElement(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
|
|
2302
|
+
if (i) {
|
|
2303
|
+
a = i.width, o = i.height;
|
|
2304
|
+
let e = isWebKit();
|
|
2305
|
+
(!e || e && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
|
|
2306
|
+
}
|
|
2307
|
+
let l = getWindowScrollBarX(r);
|
|
2308
|
+
if (l <= 0) {
|
|
2309
|
+
let e = r.ownerDocument, t = e.body, n = getComputedStyle(t), i = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, o = Math.abs(r.clientWidth - t.clientWidth - i);
|
|
2310
|
+
o <= Q && (a -= o);
|
|
2311
|
+
} else l <= Q && (a += l);
|
|
2312
|
+
return {
|
|
2313
|
+
width: a,
|
|
2314
|
+
height: o,
|
|
2315
|
+
x: s,
|
|
2316
|
+
y: c
|
|
2317
|
+
};
|
|
2318
|
+
}
|
|
2319
|
+
function getInnerBoundingClientRect(e, t) {
|
|
2320
|
+
let n = getBoundingClientRect(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = isHTMLElement(e) ? getScale(e) : createCoords(1);
|
|
2321
|
+
return {
|
|
2322
|
+
width: e.clientWidth * a.x,
|
|
2323
|
+
height: e.clientHeight * a.y,
|
|
2324
|
+
x: i * a.x,
|
|
2325
|
+
y: r * a.y
|
|
2326
|
+
};
|
|
2327
|
+
}
|
|
2328
|
+
function getClientRectFromClippingAncestor(e, t, n) {
|
|
2329
|
+
let r;
|
|
2330
|
+
if (t === "viewport") r = getViewportRect(e, n);
|
|
2331
|
+
else if (t === "document") r = getDocumentRect(getDocumentElement(e));
|
|
2332
|
+
else if (isElement(t)) r = getInnerBoundingClientRect(t, n);
|
|
2333
|
+
else {
|
|
2334
|
+
let n = getVisualOffsets(e);
|
|
2335
|
+
r = {
|
|
2336
|
+
x: t.x - n.x,
|
|
2337
|
+
y: t.y - n.y,
|
|
2338
|
+
width: t.width,
|
|
2339
|
+
height: t.height
|
|
2340
|
+
};
|
|
2341
|
+
}
|
|
2342
|
+
return rectToClientRect(r);
|
|
2343
|
+
}
|
|
2344
|
+
function hasFixedPositionAncestor(e, t) {
|
|
2345
|
+
let n = getParentNode(e);
|
|
2346
|
+
return n === t || !isElement(n) || isLastTraversableNode(n) ? !1 : getComputedStyle$1(n).position === "fixed" || hasFixedPositionAncestor(n, t);
|
|
2347
|
+
}
|
|
2348
|
+
function getClippingElementAncestors(e, t) {
|
|
2349
|
+
let n = t.get(e);
|
|
2350
|
+
if (n) return n;
|
|
2351
|
+
let r = getOverflowAncestors(e, [], !1).filter((e) => isElement(e) && getNodeName(e) !== "body"), i = null, a = getComputedStyle$1(e).position === "fixed", o = a ? getParentNode(e) : e;
|
|
2352
|
+
for (; isElement(o) && !isLastTraversableNode(o);) {
|
|
2353
|
+
let t = getComputedStyle$1(o), n = isContainingBlock(o);
|
|
2354
|
+
!n && t.position === "fixed" && (i = null), (a ? !n && !i : !n && t.position === "static" && i && (i.position === "absolute" || i.position === "fixed") || isOverflowElement(o) && !n && hasFixedPositionAncestor(e, o)) ? r = r.filter((e) => e !== o) : i = t, o = getParentNode(o);
|
|
2355
|
+
}
|
|
2356
|
+
return t.set(e, r), r;
|
|
2357
|
+
}
|
|
2358
|
+
function getClippingRect(e) {
|
|
2359
|
+
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? isTopLayer(t) ? [] : getClippingElementAncestors(t, this._c) : [].concat(n), r], o = getClientRectFromClippingAncestor(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
|
|
2360
|
+
for (let e = 1; e < a.length; e++) {
|
|
2361
|
+
let n = getClientRectFromClippingAncestor(t, a[e], i);
|
|
2362
|
+
s = f(n.top, s), c = d(n.right, c), l = d(n.bottom, l), u = f(n.left, u);
|
|
2363
|
+
}
|
|
2364
|
+
return {
|
|
2365
|
+
width: c - u,
|
|
2366
|
+
height: l - s,
|
|
2367
|
+
x: u,
|
|
2368
|
+
y: s
|
|
2369
|
+
};
|
|
2370
|
+
}
|
|
2371
|
+
function getDimensions(e) {
|
|
2372
|
+
let { width: t, height: n } = getCssDimensions(e);
|
|
2373
|
+
return {
|
|
2374
|
+
width: t,
|
|
2375
|
+
height: n
|
|
2376
|
+
};
|
|
2377
|
+
}
|
|
2378
|
+
function getRectRelativeToOffsetParent(e, t, n) {
|
|
2379
|
+
let r = isHTMLElement(t), i = getDocumentElement(t), a = n === "fixed", o = getBoundingClientRect(e, !0, a, t), s = {
|
|
2380
|
+
scrollLeft: 0,
|
|
2381
|
+
scrollTop: 0
|
|
2382
|
+
}, c = createCoords(0);
|
|
2383
|
+
function setLeftRTLScrollbarOffset() {
|
|
2384
|
+
c.x = getWindowScrollBarX(i);
|
|
2385
|
+
}
|
|
2386
|
+
if (r || !r && !a) {
|
|
2387
|
+
if ((getNodeName(t) !== "body" || isOverflowElement(i)) && (s = getNodeScroll(t)), r) {
|
|
2388
|
+
let e = getBoundingClientRect(t, !0, a, t);
|
|
2389
|
+
c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
|
|
2390
|
+
} else i && setLeftRTLScrollbarOffset();
|
|
2391
|
+
}
|
|
2392
|
+
a && !r && i && setLeftRTLScrollbarOffset();
|
|
2393
|
+
let l = i && !r && !a ? getHTMLOffset(i, s) : createCoords(0);
|
|
2394
|
+
return {
|
|
2395
|
+
x: o.left + s.scrollLeft - c.x - l.x,
|
|
2396
|
+
y: o.top + s.scrollTop - c.y - l.y,
|
|
2397
|
+
width: o.width,
|
|
2398
|
+
height: o.height
|
|
2399
|
+
};
|
|
2400
|
+
}
|
|
2401
|
+
function isStaticPositioned(e) {
|
|
2402
|
+
return getComputedStyle$1(e).position === "static";
|
|
2403
|
+
}
|
|
2404
|
+
function getTrueOffsetParent(e, t) {
|
|
2405
|
+
if (!isHTMLElement(e) || getComputedStyle$1(e).position === "fixed") return null;
|
|
2406
|
+
if (t) return t(e);
|
|
2407
|
+
let n = e.offsetParent;
|
|
2408
|
+
return getDocumentElement(e) === n && (n = n.ownerDocument.body), n;
|
|
2409
|
+
}
|
|
2410
|
+
function getOffsetParent(e, t) {
|
|
2411
|
+
let n = getWindow(e);
|
|
2412
|
+
if (isTopLayer(e)) return n;
|
|
2413
|
+
if (!isHTMLElement(e)) {
|
|
2414
|
+
let t = getParentNode(e);
|
|
2415
|
+
for (; t && !isLastTraversableNode(t);) {
|
|
2416
|
+
if (isElement(t) && !isStaticPositioned(t)) return t;
|
|
2417
|
+
t = getParentNode(t);
|
|
2418
|
+
}
|
|
2419
|
+
return n;
|
|
2420
|
+
}
|
|
2421
|
+
let r = getTrueOffsetParent(e, t);
|
|
2422
|
+
for (; r && isTableElement(r) && isStaticPositioned(r);) r = getTrueOffsetParent(r, t);
|
|
2423
|
+
return r && isLastTraversableNode(r) && isStaticPositioned(r) && !isContainingBlock(r) ? n : r || getContainingBlock(e) || n;
|
|
2424
|
+
}
|
|
2425
|
+
var getElementRects = async function(e) {
|
|
2426
|
+
let t = this.getOffsetParent || getOffsetParent, n = this.getDimensions, r = await n(e.floating);
|
|
2427
|
+
return {
|
|
2428
|
+
reference: getRectRelativeToOffsetParent(e.reference, await t(e.floating), e.strategy),
|
|
2429
|
+
floating: {
|
|
2430
|
+
x: 0,
|
|
2431
|
+
y: 0,
|
|
2432
|
+
width: r.width,
|
|
2433
|
+
height: r.height
|
|
2434
|
+
}
|
|
2435
|
+
};
|
|
2436
|
+
};
|
|
2437
|
+
function isRTL(e) {
|
|
2438
|
+
return getComputedStyle$1(e).direction === "rtl";
|
|
2439
|
+
}
|
|
2440
|
+
var Ce = {
|
|
2441
|
+
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
2442
|
+
getDocumentElement,
|
|
2443
|
+
getClippingRect,
|
|
2444
|
+
getOffsetParent,
|
|
2445
|
+
getElementRects,
|
|
2446
|
+
getClientRects,
|
|
2447
|
+
getDimensions,
|
|
2448
|
+
getScale,
|
|
2449
|
+
isElement,
|
|
2450
|
+
isRTL
|
|
2451
|
+
};
|
|
2452
|
+
function rectsAreEqual(e, t) {
|
|
2453
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
2454
|
+
}
|
|
2455
|
+
function observeMove(e, t) {
|
|
2456
|
+
let n = null, r, i = getDocumentElement(e);
|
|
2457
|
+
function cleanup() {
|
|
2458
|
+
var e;
|
|
2459
|
+
clearTimeout(r), (e = n) == null || e.disconnect(), n = null;
|
|
2460
|
+
}
|
|
2461
|
+
function refresh(a, o) {
|
|
2462
|
+
a === void 0 && (a = !1), o === void 0 && (o = 1), cleanup();
|
|
2463
|
+
let s = e.getBoundingClientRect(), { left: c, top: l, width: u, height: p } = s;
|
|
2464
|
+
if (a || t(), !u || !p) return;
|
|
2465
|
+
let h = m(l), g = m(i.clientWidth - (c + u)), _ = m(i.clientHeight - (l + p)), v = m(c), y = {
|
|
2466
|
+
rootMargin: -h + "px " + -g + "px " + -_ + "px " + -v + "px",
|
|
2467
|
+
threshold: f(0, d(1, o)) || 1
|
|
2468
|
+
}, b = !0;
|
|
2469
|
+
function handleObserve(t) {
|
|
2470
|
+
let n = t[0].intersectionRatio;
|
|
2471
|
+
if (n !== o) {
|
|
2472
|
+
if (!b) return refresh();
|
|
2473
|
+
n ? refresh(!1, n) : r = setTimeout(() => {
|
|
2474
|
+
refresh(!1, 1e-7);
|
|
2475
|
+
}, 1e3);
|
|
2476
|
+
}
|
|
2477
|
+
n === 1 && !rectsAreEqual(s, e.getBoundingClientRect()) && refresh(), b = !1;
|
|
2478
|
+
}
|
|
2479
|
+
try {
|
|
2480
|
+
n = new IntersectionObserver(handleObserve, {
|
|
2481
|
+
...y,
|
|
2482
|
+
root: i.ownerDocument
|
|
2483
|
+
});
|
|
2484
|
+
} catch {
|
|
2485
|
+
n = new IntersectionObserver(handleObserve, y);
|
|
2486
|
+
}
|
|
2487
|
+
n.observe(e);
|
|
2488
|
+
}
|
|
2489
|
+
return refresh(!0), cleanup;
|
|
2490
|
+
}
|
|
2491
|
+
function autoUpdate(e, t, n, r) {
|
|
2492
|
+
r === void 0 && (r = {});
|
|
2493
|
+
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = unwrapElement(e), u = i || a ? [...l ? getOverflowAncestors(l) : [], ...t ? getOverflowAncestors(t) : []] : [];
|
|
2494
|
+
u.forEach((e) => {
|
|
2495
|
+
i && e.addEventListener("scroll", n, { passive: !0 }), a && e.addEventListener("resize", n);
|
|
2496
|
+
});
|
|
2497
|
+
let d = l && s ? observeMove(l, n) : null, f = -1, p = null;
|
|
2498
|
+
o && (p = new ResizeObserver((e) => {
|
|
2499
|
+
let [r] = e;
|
|
2500
|
+
r && r.target === l && p && t && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
|
|
2501
|
+
var e;
|
|
2502
|
+
(e = p) == null || e.observe(t);
|
|
2503
|
+
})), n();
|
|
2504
|
+
}), l && !c && p.observe(l), t && p.observe(t));
|
|
2505
|
+
let m, h = c ? getBoundingClientRect(e) : null;
|
|
2506
|
+
c && frameLoop();
|
|
2507
|
+
function frameLoop() {
|
|
2508
|
+
let t = getBoundingClientRect(e);
|
|
2509
|
+
h && !rectsAreEqual(h, t) && n(), h = t, m = requestAnimationFrame(frameLoop);
|
|
2510
|
+
}
|
|
2511
|
+
return n(), () => {
|
|
2512
|
+
var e;
|
|
2513
|
+
u.forEach((e) => {
|
|
2514
|
+
i && e.removeEventListener("scroll", n), a && e.removeEventListener("resize", n);
|
|
2515
|
+
}), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
|
|
2516
|
+
};
|
|
2517
|
+
}
|
|
2518
|
+
var $ = N, we = O, Te = I, Ee = A, computePosition = (e, t, n) => {
|
|
2519
|
+
let r = /* @__PURE__ */ new Map(), i = {
|
|
2520
|
+
platform: Ce,
|
|
2521
|
+
...n
|
|
2522
|
+
}, a = {
|
|
2523
|
+
...i.platform,
|
|
2524
|
+
_c: r
|
|
2525
|
+
};
|
|
2526
|
+
return E(e, t, {
|
|
2527
|
+
...i,
|
|
2528
|
+
platform: a
|
|
2529
|
+
});
|
|
2530
|
+
};
|
|
2531
|
+
//#endregion
|
|
2532
|
+
export { shift as C, getOverflowAncestors as E, H as S, autoUpdate$1 as T, arrow as _, $ as a, inline as b, safePolygon as c, useFloating as d, useFocus as f, useRole as g, useMergeRefs as h, Ee as i, useDelayGroup as l, useInteractions as m, autoUpdate as n, Te as o, useHover as p, computePosition as r, FloatingDelayGroup as s, we as t, useDismiss as u, flip as v, U as w, limitShift as x, W as y };
|