@commentkit/comment-kit 0.6.9 → 0.7.1
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/CHANGELOG.md +63 -4
- package/LICENSE +18 -2
- package/README.md +133 -88
- package/SECURITY.md +48 -0
- package/dist/THIRD_PARTY_NOTICES.txt +284 -0
- package/dist/angular.es.js +25 -12
- package/dist/comment-kit.es.js +25 -13
- package/dist/demo.es.js +148 -70
- package/dist/headless.es.js +3 -3
- package/dist/preact.es.js +3 -3
- package/dist/qwik.es.js +1 -110
- package/dist/qwik.qwik.mjs +114 -0
- package/dist/react.es.js +3 -3
- package/dist/shared/annotation-icons-Dh-bmNYK.js +172 -0
- package/dist/shared/annotation-toolbar-cGC1p-SP.js +1093 -0
- package/dist/shared/attachment-refresh-CzQFXHkL.js +94 -0
- package/dist/shared/{bridge-DRE03N9X.js → bridge-CJoGYngu.js} +6 -3
- package/dist/shared/{button-group-CHfMRXyA.js → button-group-CWdKaOlC.js} +14 -16
- package/dist/shared/capture-colors-CxSLsU5-.js +74 -0
- package/dist/shared/comment-drawing-canvas-DdXlMgbF.js +124 -0
- package/dist/shared/comment-icon-Dg9ZWpz-.js +608 -0
- package/dist/shared/comment-image-lightbox-B7iHjnAz.js +190 -0
- package/dist/shared/comment-images-content-D7YNUgo5.js +214 -0
- package/dist/shared/{comment-kit-core-D0kY00St.js → comment-kit-core-C862uNAm.js} +1371 -853
- package/dist/shared/comment-kit-ui-0vd-DY4S.js +19977 -0
- package/dist/shared/comment-screenshot-annotator-DcaSSuWB.js +151 -0
- package/dist/shared/comment-screenshot-overlay-D_nFoJmM.js +207 -0
- package/dist/shared/{dev-export-panel-BLngcr5q.js → dev-export-panel-pWBlhlse.js} +8 -8
- package/dist/shared/dev-grab-eQ9EgEGY.js +210 -0
- package/dist/shared/dist-De294MVF.js +623 -0
- package/dist/shared/{element-selector-CtFzgHvq.js → element-selector-DC-_XJ0k.js} +350 -305
- package/dist/shared/{icons-BSHCWYO1.js → icons-nzMOLzrm.js} +2 -3
- package/dist/shared/{mount-ui-CVivB_eQ.js → mount-ui-B68j8r6I.js} +4 -4
- package/dist/shared/{pusher-BEl7Qn-8.js → pusher-C1FHQGXV.js} +1 -1
- package/dist/shared/realtime-Diqz7G_y.js +317 -0
- package/dist/shared/realtime-recovery-DJ_adc-H.js +135 -0
- package/dist/shared/{separator-DusFNTs-.js → separator-XDBsaWyw.js} +891 -785
- package/dist/shared/{shadow-root-CmYXiSRR.js → shadow-root-CrO75sED.js} +1 -1
- package/dist/shared/styles-C9Jwvm0Q.js +2 -0
- package/dist/shared/useRender-D1z_X_BY.js +5 -0
- package/dist/shared/{useValueChanged-DQXLia-2.js → useValueChanged-CrzfD8l-.js} +15 -15
- package/dist/shared/{validation-C7QG8j7Z.js → validation-D-8u4M7I.js} +14 -1
- package/dist/shared/{websocket-manager-BTRqNTB7.js → websocket-manager-CFak_YHy.js} +148 -89
- package/dist/solid.es.js +3 -3
- package/dist/svelte.es.js +3 -3
- package/dist/types/adapters/bridge.d.ts +9 -12
- package/dist/types/angular/index.d.ts +15 -5
- package/dist/types/core/api-client.d.ts +24 -18
- package/dist/types/core/comment-kit-core.d.ts +28 -11
- package/dist/types/core/local-demo.d.ts +1 -0
- package/dist/types/core/types.d.ts +103 -0
- package/dist/types/core/websocket-manager.d.ts +12 -0
- package/dist/types/core/write-access.d.ts +9 -0
- package/dist/types/headless.d.ts +1 -1
- package/dist/types/index.d.ts +8 -4
- package/dist/types/qwik/index.d.ts +4 -1
- package/dist/vue.es.js +3 -3
- package/docs/api-reference.md +378 -0
- package/docs/local-demo.md +60 -0
- package/package.json +17 -6
- package/dist/shared/annotation-toolbar-pX17NLmJ.js +0 -1104
- package/dist/shared/clamp-CcFVX0vC.js +0 -55
- package/dist/shared/comment-drawing-canvas-CYu5SwRf.js +0 -126
- package/dist/shared/comment-image-lightbox-0VdAs2iT.js +0 -178
- package/dist/shared/comment-kit-ui-D2j2gvnm.js +0 -16685
- package/dist/shared/comment-screenshot-annotator-BuojwviY.js +0 -137
- package/dist/shared/comment-screenshot-overlay-BZX0Vcb8.js +0 -144
- package/dist/shared/dev-grab-pDAfH2lr.js +0 -203
- package/dist/shared/local-demo-context-BohlYbHt.js +0 -6
- package/dist/shared/realtime-BG_t_ze7.js +0 -281
- package/dist/shared/resolveAriaLabelledBy-CIKpnjNJ.js +0 -669
- package/dist/shared/styles-D_FEJZ9G.js +0 -2
- package/dist/shared/useLabelableId-DGbfdMi_.js +0 -155
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as e, B as t, C as n, D as r, E as i, F as a, I as o, L as s, M as c, N as l, O as u, P as d, S as f, T as p, V as m, _ as h, b as g, c as _, d as v, j as y, k as b, m as x, p as S, u as C, v as w, w as T, x as E, y as D, z as O } from "./button-By0hGrJK.js";
|
|
2
|
-
import {
|
|
2
|
+
import { C as k, D as A, F as j, N as M, O as N, P, S as ee, d as te, i as F, j as I, k as L, l as ne, n as re, p as R, r as z } from "./useValueChanged-CrzfD8l-.js";
|
|
3
3
|
import { i as ie, n as ae } from "./ShadowRootContext-Bv-4aElu.js";
|
|
4
4
|
import * as B from "react";
|
|
5
5
|
import { useDebugValue as V, useEffect as oe, useLayoutEffect as H, useMemo as se, useRef as ce, useSyncExternalStore as le, useSyncExternalStore as U } from "react";
|
|
@@ -63,30 +63,30 @@ function xe() {
|
|
|
63
63
|
}
|
|
64
64
|
var { userAgent: Se, platform: Ce, maxTouchPoints: we } = xe(), Te = Se.toLowerCase(), Ee = Ce.toLowerCase(), G = /^i(os$|p)/.test(Ee) || Ee === "macintel" && we > 1, De = "android", Oe = Ee === De || Te.includes(De), ke = !G && Ee.startsWith("mac");
|
|
65
65
|
Ee.startsWith("win"), !Oe && /^(linux|chrome os)/.test(Ee);
|
|
66
|
-
var Ae = ke || G, je = typeof CSS < "u" && !!CSS.supports?.("-webkit-backdrop-filter:none");
|
|
67
|
-
!je && Te.includes("
|
|
68
|
-
var
|
|
69
|
-
function
|
|
66
|
+
var Ae = ke || G, je = typeof CSS < "u" && !!CSS.supports?.("-webkit-backdrop-filter:none"), Me = !je && Te.includes("firefox");
|
|
67
|
+
!je && Te.includes("chrom");
|
|
68
|
+
var Ne = Ae, Pe = /jsdom|happydom/.test(Te);
|
|
69
|
+
function Fe(e) {
|
|
70
70
|
e.preventDefault(), e.stopPropagation();
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function Ie(e) {
|
|
73
73
|
return "nativeEvent" in e;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function Le(e) {
|
|
76
76
|
return e.pointerType === "" && e.isTrusted ? !0 : Oe && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
return
|
|
78
|
+
function Re(e) {
|
|
79
|
+
return Pe ? !1 : !Oe && e.width === 0 && e.height === 0 || e.type === "pointerdown" && e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse" && (Oe || e.buttons === 0) || e.width < 1 && e.height < 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "touch";
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function ze(e, t) {
|
|
82
82
|
let n = ["mouse", "pen"];
|
|
83
83
|
return t || n.push("", void 0), n.includes(e);
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function Be(e) {
|
|
86
86
|
let t = e.type;
|
|
87
87
|
return t === "click" || t === "mousedown" || t === "keydown" || t === "keyup";
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function Ve(e) {
|
|
90
90
|
let t = e.activeElement;
|
|
91
91
|
for (; t?.shadowRoot?.activeElement != null;) t = t.shadowRoot.activeElement;
|
|
92
92
|
return t;
|
|
@@ -104,7 +104,7 @@ function K(e, t) {
|
|
|
104
104
|
}
|
|
105
105
|
return !1;
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function He(e, t) {
|
|
108
108
|
let n = e;
|
|
109
109
|
for (; n;) {
|
|
110
110
|
if (r(n) && n.matches(t)) return n;
|
|
@@ -112,107 +112,107 @@ function Ve(e, t) {
|
|
|
112
112
|
}
|
|
113
113
|
return null;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function Ue(e) {
|
|
116
116
|
return "composedPath" in e ? e.composedPath()[0] ?? e.target : e.target;
|
|
117
117
|
}
|
|
118
|
-
var
|
|
119
|
-
return e === "starting" ?
|
|
120
|
-
} },
|
|
121
|
-
[
|
|
122
|
-
[
|
|
123
|
-
},
|
|
124
|
-
return e ? st : null;
|
|
125
|
-
} }, pt = { open(e) {
|
|
118
|
+
var We = "data-base-ui-focusable", Ge = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])", Ke = "ArrowLeft", qe = "ArrowRight", Je = "ArrowUp", Ye = "ArrowDown", Xe = "data-starting-style", Ze = "data-ending-style", Qe = { [Xe]: "" }, $e = { [Ze]: "" }, et = { transitionStatus(e) {
|
|
119
|
+
return e === "starting" ? Qe : e === "ending" ? $e : null;
|
|
120
|
+
} }, tt = "data-open", nt = "data-closed", rt = Xe, it = Ze, at = "data-anchor-hidden", ot = "data-popup-open", st = "data-pressed", ct = { [ot]: "" }, lt = {
|
|
121
|
+
[ot]: "",
|
|
122
|
+
[st]: ""
|
|
123
|
+
}, ut = { [tt]: "" }, dt = { [nt]: "" }, ft = { [at]: "" }, pt = { open(e) {
|
|
126
124
|
return e ? ct : null;
|
|
127
|
-
} }, mt = {
|
|
125
|
+
} }, mt = { open(e) {
|
|
126
|
+
return e ? lt : null;
|
|
127
|
+
} }, ht = {
|
|
128
128
|
open(e) {
|
|
129
|
-
return e ?
|
|
129
|
+
return e ? ut : dt;
|
|
130
130
|
},
|
|
131
131
|
anchorHidden(e) {
|
|
132
|
-
return e ?
|
|
132
|
+
return e ? ft : null;
|
|
133
133
|
}
|
|
134
|
-
},
|
|
135
|
-
...
|
|
136
|
-
|
|
137
|
-
},
|
|
138
|
-
function
|
|
134
|
+
}, gt = {
|
|
135
|
+
...ht,
|
|
136
|
+
...et
|
|
137
|
+
}, _t = "data-trigger-disabled";
|
|
138
|
+
function vt(e, t) {
|
|
139
139
|
if (!r(e)) return !1;
|
|
140
140
|
let n = e;
|
|
141
|
-
if (t.hasElement(n)) return !n.hasAttribute(
|
|
142
|
-
for (let [, e] of t.entries()) if (K(e, n)) return !e.hasAttribute(
|
|
141
|
+
if (t.hasElement(n)) return !n.hasAttribute(_t);
|
|
142
|
+
for (let [, e] of t.entries()) if (K(e, n)) return !e.hasAttribute(_t);
|
|
143
143
|
return !1;
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function yt(e, t) {
|
|
146
146
|
if (t == null) return !1;
|
|
147
147
|
if ("composedPath" in e) return e.composedPath().includes(t);
|
|
148
148
|
let n = e;
|
|
149
149
|
return n.target != null && t.contains(n.target);
|
|
150
150
|
}
|
|
151
|
-
function yt(e) {
|
|
152
|
-
return e.matches("html,body");
|
|
153
|
-
}
|
|
154
151
|
function bt(e) {
|
|
155
|
-
return
|
|
152
|
+
return e.matches("html,body");
|
|
156
153
|
}
|
|
157
154
|
function xt(e) {
|
|
158
|
-
return
|
|
155
|
+
return u(e) && e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])");
|
|
159
156
|
}
|
|
160
157
|
function St(e) {
|
|
161
|
-
return e
|
|
158
|
+
return He(e, `button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Ge}`) != null;
|
|
162
159
|
}
|
|
163
160
|
function Ct(e) {
|
|
164
|
-
|
|
161
|
+
return e ? e.getAttribute("role") === "combobox" && xt(e) : !1;
|
|
162
|
+
}
|
|
163
|
+
function wt(e) {
|
|
164
|
+
if (!e || Pe) return !0;
|
|
165
165
|
try {
|
|
166
166
|
return e.matches(":focus-visible");
|
|
167
167
|
} catch {
|
|
168
168
|
return !0;
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function Tt(e) {
|
|
172
172
|
return e ? e.hasAttribute("data-base-ui-focusable") ? e : e.querySelector("[data-base-ui-focusable]") || e : null;
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
return t != null && !
|
|
174
|
+
function Et(e, t) {
|
|
175
|
+
return t != null && !ze(t) ? 0 : typeof e == "function" ? e() : e;
|
|
176
176
|
}
|
|
177
|
-
function
|
|
178
|
-
let r =
|
|
177
|
+
function Dt(e, t, n) {
|
|
178
|
+
let r = Et(e, n);
|
|
179
179
|
return typeof r == "number" ? r : r?.[t];
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function Ot(e) {
|
|
182
182
|
return typeof e == "function" ? e() : e;
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function kt(e, t) {
|
|
185
185
|
return t || e === "click" || e === "mousedown";
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function At(e) {
|
|
188
188
|
return e?.includes("mouse") && e !== "mousedown";
|
|
189
189
|
}
|
|
190
|
-
var
|
|
190
|
+
var jt = /*#__PURE__*/ B.createContext({
|
|
191
191
|
hasProvider: !1,
|
|
192
192
|
timeoutMs: 0,
|
|
193
193
|
delayRef: { current: 0 },
|
|
194
194
|
initialDelayRef: { current: 0 },
|
|
195
|
-
timeout: new
|
|
195
|
+
timeout: new M(),
|
|
196
196
|
currentIdRef: { current: null },
|
|
197
197
|
currentContextRef: { current: null }
|
|
198
198
|
});
|
|
199
|
-
process.env.NODE_ENV !== "production" && (
|
|
200
|
-
function
|
|
199
|
+
process.env.NODE_ENV !== "production" && (jt.displayName = "FloatingDelayGroupContext");
|
|
200
|
+
function Mt(e, t) {
|
|
201
201
|
e.current = t.current;
|
|
202
202
|
}
|
|
203
|
-
function
|
|
204
|
-
let { children: t, delay: n, timeoutMs: r = 0 } = e, i = B.useRef(n), a = B.useRef(n), o = B.useRef(null), c = B.useRef(null), l =
|
|
203
|
+
function Nt(e) {
|
|
204
|
+
let { children: t, delay: n, timeoutMs: r = 0 } = e, i = B.useRef(n), a = B.useRef(n), o = B.useRef(null), c = B.useRef(null), l = P();
|
|
205
205
|
return s(() => {
|
|
206
206
|
a.current = n, o.current ? i.current = {
|
|
207
|
-
open:
|
|
208
|
-
close:
|
|
207
|
+
open: Dt(i.current, "open"),
|
|
208
|
+
close: Dt(n, "close")
|
|
209
209
|
} : i.current = n;
|
|
210
210
|
}, [
|
|
211
211
|
n,
|
|
212
212
|
o,
|
|
213
213
|
i,
|
|
214
214
|
a
|
|
215
|
-
]), /*#__PURE__*/ W(
|
|
215
|
+
]), /*#__PURE__*/ W(jt.Provider, {
|
|
216
216
|
value: B.useMemo(() => ({
|
|
217
217
|
hasProvider: !0,
|
|
218
218
|
delayRef: i,
|
|
@@ -225,8 +225,8 @@ function Mt(e) {
|
|
|
225
225
|
children: t
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
|
-
function
|
|
229
|
-
let { open: n } = t, r = e.useState("floatingId"), { currentIdRef: i, delayRef: a, timeoutMs: o, initialDelayRef: c, currentContextRef: l, hasProvider: u, timeout: d } = B.useContext(
|
|
228
|
+
function Pt(e, t = { open: !1 }) {
|
|
229
|
+
let { open: n } = t, r = e.useState("floatingId"), { currentIdRef: i, delayRef: a, timeoutMs: o, initialDelayRef: c, currentContextRef: l, hasProvider: u, timeout: d } = B.useContext(jt), [f, p] = B.useState(!1), m = B.useRef(n);
|
|
230
230
|
return s(() => {
|
|
231
231
|
m.current = n;
|
|
232
232
|
}, [n]), s(() => {
|
|
@@ -262,8 +262,8 @@ function Nt(e, t = { open: !1 }) {
|
|
|
262
262
|
setIsInstantPhase: p
|
|
263
263
|
}, i.current = r, a.current = {
|
|
264
264
|
open: 0,
|
|
265
|
-
close:
|
|
266
|
-
}, o !== null && o !== r ? (p(!0), t?.setIsInstantPhase(!0), t?.onOpenChange(!1,
|
|
265
|
+
close: Dt(c.current, "close")
|
|
266
|
+
}, o !== null && o !== r ? (p(!0), t?.setIsInstantPhase(!0), t?.onOpenChange(!1, I(ee))) : (p(!1), t?.setIsInstantPhase(!1));
|
|
267
267
|
}, [
|
|
268
268
|
n,
|
|
269
269
|
r,
|
|
@@ -276,7 +276,7 @@ function Nt(e, t = { open: !1 }) {
|
|
|
276
276
|
]), s(() => () => {
|
|
277
277
|
if (i.current === r) {
|
|
278
278
|
if (l.current = null, !m.current) return;
|
|
279
|
-
i.current = null,
|
|
279
|
+
i.current = null, Mt(a, c), d.clear();
|
|
280
280
|
}
|
|
281
281
|
}, [
|
|
282
282
|
l,
|
|
@@ -302,7 +302,7 @@ function q(e, t, n, r) {
|
|
|
302
302
|
e.removeEventListener(t, n, r);
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
|
-
function
|
|
305
|
+
function Ft(...e) {
|
|
306
306
|
return () => {
|
|
307
307
|
for (let t = 0; t < e.length; t += 1) {
|
|
308
308
|
let n = e[t];
|
|
@@ -311,10 +311,10 @@ function Pt(...e) {
|
|
|
311
311
|
};
|
|
312
312
|
}
|
|
313
313
|
function J(e) {
|
|
314
|
-
let t = m(
|
|
314
|
+
let t = m(It, e).current;
|
|
315
315
|
return t.next = e, s(t.effect), t;
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function It(e) {
|
|
318
318
|
let t = {
|
|
319
319
|
current: e,
|
|
320
320
|
next: e,
|
|
@@ -324,7 +324,7 @@ function Ft(e) {
|
|
|
324
324
|
};
|
|
325
325
|
return t;
|
|
326
326
|
}
|
|
327
|
-
var
|
|
327
|
+
var Lt = null, Rt = globalThis.requestAnimationFrame, zt = new class {
|
|
328
328
|
callbacks = [];
|
|
329
329
|
callbacksCount = 0;
|
|
330
330
|
nextId = 1;
|
|
@@ -338,42 +338,42 @@ var It = null, Lt = globalThis.requestAnimationFrame, Rt = new class {
|
|
|
338
338
|
request(e) {
|
|
339
339
|
let t = this.nextId;
|
|
340
340
|
this.nextId += 1, this.callbacks.push(e), this.callbacksCount += 1;
|
|
341
|
-
let n = process.env.NODE_ENV !== "production" &&
|
|
341
|
+
let n = process.env.NODE_ENV !== "production" && Rt !== requestAnimationFrame && (Rt = requestAnimationFrame, !0);
|
|
342
342
|
return (!this.isScheduled || n) && (requestAnimationFrame(this.tick), this.isScheduled = !0), t;
|
|
343
343
|
}
|
|
344
344
|
cancel(e) {
|
|
345
345
|
let t = e - this.startId;
|
|
346
346
|
t < 0 || t >= this.callbacks.length || this.callbacks[t] !== null && (this.callbacks[t] = null, --this.callbacksCount);
|
|
347
347
|
}
|
|
348
|
-
}(),
|
|
348
|
+
}(), Bt = class e {
|
|
349
349
|
static create() {
|
|
350
350
|
return new e();
|
|
351
351
|
}
|
|
352
352
|
static request(e) {
|
|
353
|
-
return
|
|
353
|
+
return zt.request(e);
|
|
354
354
|
}
|
|
355
355
|
static cancel(e) {
|
|
356
|
-
return
|
|
356
|
+
return zt.cancel(e);
|
|
357
357
|
}
|
|
358
|
-
currentId =
|
|
358
|
+
currentId = Lt;
|
|
359
359
|
request(e) {
|
|
360
|
-
this.cancel(), this.currentId =
|
|
361
|
-
this.currentId =
|
|
360
|
+
this.cancel(), this.currentId = zt.request(() => {
|
|
361
|
+
this.currentId = Lt, e();
|
|
362
362
|
});
|
|
363
363
|
}
|
|
364
364
|
cancel = () => {
|
|
365
|
-
this.currentId !==
|
|
365
|
+
this.currentId !== Lt && (zt.cancel(this.currentId), this.currentId = Lt);
|
|
366
366
|
};
|
|
367
367
|
disposeEffect = () => this.cancel;
|
|
368
368
|
};
|
|
369
|
-
function
|
|
370
|
-
let e = m(
|
|
371
|
-
return
|
|
369
|
+
function Vt() {
|
|
370
|
+
let e = m(Bt.create).current;
|
|
371
|
+
return j(e.disposeEffect), e;
|
|
372
372
|
}
|
|
373
373
|
function Y(e) {
|
|
374
374
|
return e?.ownerDocument || document;
|
|
375
375
|
}
|
|
376
|
-
var
|
|
376
|
+
var Ht = {
|
|
377
377
|
clipPath: "inset(50%)",
|
|
378
378
|
overflow: "hidden",
|
|
379
379
|
whiteSpace: "nowrap",
|
|
@@ -382,19 +382,19 @@ var Vt = {
|
|
|
382
382
|
width: 1,
|
|
383
383
|
height: 1,
|
|
384
384
|
margin: -1
|
|
385
|
-
},
|
|
386
|
-
...
|
|
385
|
+
}, Ut = {
|
|
386
|
+
...Ht,
|
|
387
387
|
position: "fixed",
|
|
388
388
|
margin: 0,
|
|
389
389
|
top: 0,
|
|
390
390
|
left: 0
|
|
391
|
-
},
|
|
392
|
-
...
|
|
391
|
+
}, Wt = {
|
|
392
|
+
...Ht,
|
|
393
393
|
position: "absolute"
|
|
394
|
-
},
|
|
394
|
+
}, Gt = /*#__PURE__*/ B.forwardRef(function(e, t) {
|
|
395
395
|
let [n, r] = B.useState();
|
|
396
396
|
s(() => {
|
|
397
|
-
|
|
397
|
+
Ne && je && r("button");
|
|
398
398
|
}, []);
|
|
399
399
|
let i = {
|
|
400
400
|
tabIndex: 0,
|
|
@@ -403,82 +403,82 @@ var Vt = {
|
|
|
403
403
|
return /*#__PURE__*/ W("span", {
|
|
404
404
|
...e,
|
|
405
405
|
ref: t,
|
|
406
|
-
style:
|
|
406
|
+
style: Ut,
|
|
407
407
|
"aria-hidden": !n || void 0,
|
|
408
408
|
...i,
|
|
409
409
|
"data-base-ui-focus-guard": ""
|
|
410
410
|
});
|
|
411
411
|
});
|
|
412
|
-
process.env.NODE_ENV !== "production" && (
|
|
413
|
-
var
|
|
412
|
+
process.env.NODE_ENV !== "production" && (Gt.displayName = "FocusGuard");
|
|
413
|
+
var Kt = Math.min, qt = Math.max, Jt = Math.round, Yt = Math.floor, Xt = (e) => ({
|
|
414
414
|
x: e,
|
|
415
415
|
y: e
|
|
416
|
-
}),
|
|
416
|
+
}), Zt = {
|
|
417
417
|
left: "right",
|
|
418
418
|
right: "left",
|
|
419
419
|
bottom: "top",
|
|
420
420
|
top: "bottom"
|
|
421
421
|
};
|
|
422
|
-
function
|
|
423
|
-
return
|
|
422
|
+
function Qt(e, t, n) {
|
|
423
|
+
return qt(e, Kt(t, n));
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function $t(e, t) {
|
|
426
426
|
return typeof e == "function" ? e(t) : e;
|
|
427
427
|
}
|
|
428
428
|
function X(e) {
|
|
429
429
|
return e.split("-")[0];
|
|
430
430
|
}
|
|
431
|
-
function
|
|
431
|
+
function en(e) {
|
|
432
432
|
return e.split("-")[1];
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function tn(e) {
|
|
435
435
|
return e === "x" ? "y" : "x";
|
|
436
436
|
}
|
|
437
|
-
function
|
|
437
|
+
function nn(e) {
|
|
438
438
|
return e === "y" ? "height" : "width";
|
|
439
439
|
}
|
|
440
|
-
function
|
|
440
|
+
function Z(e) {
|
|
441
441
|
let t = e[0];
|
|
442
442
|
return t === "t" || t === "b" ? "y" : "x";
|
|
443
443
|
}
|
|
444
|
-
function
|
|
445
|
-
return
|
|
444
|
+
function rn(e) {
|
|
445
|
+
return tn(Z(e));
|
|
446
446
|
}
|
|
447
|
-
function
|
|
447
|
+
function an(e, t, n) {
|
|
448
448
|
n === void 0 && (n = !1);
|
|
449
|
-
let r =
|
|
450
|
-
return t.reference[a] > t.floating[a] && (o =
|
|
449
|
+
let r = en(e), i = rn(e), a = nn(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
450
|
+
return t.reference[a] > t.floating[a] && (o = mn(o)), [o, mn(o)];
|
|
451
451
|
}
|
|
452
|
-
function
|
|
453
|
-
let t =
|
|
452
|
+
function on(e) {
|
|
453
|
+
let t = mn(e);
|
|
454
454
|
return [
|
|
455
|
-
|
|
455
|
+
sn(e),
|
|
456
456
|
t,
|
|
457
|
-
|
|
457
|
+
sn(t)
|
|
458
458
|
];
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function sn(e) {
|
|
461
461
|
return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
|
|
462
462
|
}
|
|
463
|
-
var
|
|
464
|
-
function
|
|
463
|
+
var cn = ["left", "right"], ln = ["right", "left"], un = ["top", "bottom"], dn = ["bottom", "top"];
|
|
464
|
+
function fn(e, t, n) {
|
|
465
465
|
switch (e) {
|
|
466
466
|
case "top":
|
|
467
|
-
case "bottom": return n ? t ?
|
|
467
|
+
case "bottom": return n ? t ? ln : cn : t ? cn : ln;
|
|
468
468
|
case "left":
|
|
469
|
-
case "right": return t ?
|
|
469
|
+
case "right": return t ? un : dn;
|
|
470
470
|
default: return [];
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
|
-
function
|
|
474
|
-
let i =
|
|
475
|
-
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(
|
|
473
|
+
function pn(e, t, n, r) {
|
|
474
|
+
let i = en(e), a = fn(X(e), n === "start", r);
|
|
475
|
+
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(sn)))), a;
|
|
476
476
|
}
|
|
477
|
-
function
|
|
477
|
+
function mn(e) {
|
|
478
478
|
let t = X(e);
|
|
479
|
-
return
|
|
479
|
+
return Zt[t] + e.slice(t.length);
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function hn(e) {
|
|
482
482
|
return {
|
|
483
483
|
top: e.top ?? 0,
|
|
484
484
|
right: e.right ?? 0,
|
|
@@ -486,15 +486,15 @@ function pn(e) {
|
|
|
486
486
|
left: e.left ?? 0
|
|
487
487
|
};
|
|
488
488
|
}
|
|
489
|
-
function
|
|
489
|
+
function gn(e) {
|
|
490
490
|
return typeof e == "number" ? {
|
|
491
491
|
top: e,
|
|
492
492
|
right: e,
|
|
493
493
|
bottom: e,
|
|
494
494
|
left: e
|
|
495
|
-
} :
|
|
495
|
+
} : hn(e);
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function _n(e) {
|
|
498
498
|
let { x: t, y: n, width: r, height: i } = e;
|
|
499
499
|
return {
|
|
500
500
|
width: r,
|
|
@@ -507,21 +507,24 @@ function hn(e) {
|
|
|
507
507
|
y: n
|
|
508
508
|
};
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function vn(e, t, n) {
|
|
511
|
+
return Math.floor(e / t) !== n;
|
|
512
|
+
}
|
|
513
|
+
function yn(e, t) {
|
|
511
514
|
return t < 0 || t >= e.length;
|
|
512
515
|
}
|
|
513
|
-
function
|
|
514
|
-
return
|
|
516
|
+
function bn(e, t) {
|
|
517
|
+
return Q(e.current, { disabledIndices: t });
|
|
515
518
|
}
|
|
516
|
-
function
|
|
517
|
-
return
|
|
519
|
+
function xn(e, t) {
|
|
520
|
+
return Q(e.current, {
|
|
518
521
|
decrement: !0,
|
|
519
522
|
startingIndex: e.current.length,
|
|
520
523
|
disabledIndices: t
|
|
521
524
|
});
|
|
522
525
|
}
|
|
523
|
-
function
|
|
524
|
-
let { decrement: r, loopFocus: i, allowEscape: a, disabledIndices: o, minIndex: s, maxIndex: c } = n, l = () =>
|
|
526
|
+
function Sn(e, t, n) {
|
|
527
|
+
let { decrement: r, loopFocus: i, allowEscape: a, disabledIndices: o, minIndex: s, maxIndex: c } = n, l = () => Q(e, {
|
|
525
528
|
startingIndex: t,
|
|
526
529
|
decrement: r,
|
|
527
530
|
disabledIndices: o
|
|
@@ -532,61 +535,164 @@ function yn(e, t, n) {
|
|
|
532
535
|
a && t !== n ? u = -1 : (u = r ? c : s, d = !0);
|
|
533
536
|
} else u = l();
|
|
534
537
|
return {
|
|
535
|
-
index:
|
|
538
|
+
index: yn(e, u) ? -1 : u,
|
|
536
539
|
wrapped: d
|
|
537
540
|
};
|
|
538
541
|
}
|
|
539
|
-
function
|
|
542
|
+
function Q(e, { startingIndex: t = -1, decrement: n = !1, disabledIndices: r, amount: i = 1 } = {}) {
|
|
540
543
|
let a = t;
|
|
541
544
|
do
|
|
542
545
|
a += n ? -i : i;
|
|
543
|
-
while (a >= 0 && a <= e.length - 1 &&
|
|
546
|
+
while (a >= 0 && a <= e.length - 1 && wn(e, a, r));
|
|
544
547
|
return a;
|
|
545
548
|
}
|
|
546
|
-
function
|
|
549
|
+
function Cn(e, { event: t, orientation: n, loopFocus: r, onLoop: i, rtl: a, cols: o, disabledIndices: s, minIndex: c, maxIndex: l, prevIndex: u, stopEvent: d = !1 }) {
|
|
550
|
+
let f = u, p;
|
|
551
|
+
if (t.key === "ArrowUp" ? p = "up" : t.key === "ArrowDown" && (p = "down"), p) {
|
|
552
|
+
let n = [], a = [], m = !1, h = 0;
|
|
553
|
+
{
|
|
554
|
+
let t = null, r = -1;
|
|
555
|
+
e.forEach((e, i) => {
|
|
556
|
+
if (e == null) return;
|
|
557
|
+
h += 1;
|
|
558
|
+
let o = He(e, "[role=\"row\"]");
|
|
559
|
+
o && (m = !0), (o !== t || r === -1) && (t = o, r += 1, n[r] = []), n[r].push(i), a[i] = r;
|
|
560
|
+
});
|
|
561
|
+
}
|
|
562
|
+
let g = !1, _ = 0;
|
|
563
|
+
if (m) for (let e of n) {
|
|
564
|
+
let t = e.length;
|
|
565
|
+
t > _ && (_ = t), t !== o && (g = !0);
|
|
566
|
+
}
|
|
567
|
+
let v = g && h < e.length, y = _ || o, b = (o) => {
|
|
568
|
+
if (!g || u === -1) return;
|
|
569
|
+
let c = a[u];
|
|
570
|
+
if (c == null) return;
|
|
571
|
+
let l = n[c].indexOf(u), d = o === "up" ? -1 : 1;
|
|
572
|
+
for (let o = c + d, f = 0; f < n.length; f += 1, o += d) {
|
|
573
|
+
if (o < 0 || o >= n.length) {
|
|
574
|
+
if (!r || v) return;
|
|
575
|
+
if (o = o < 0 ? n.length - 1 : 0, i) {
|
|
576
|
+
let e = Math.min(l, n[o].length - 1), r = i(t, u, n[o][e] ?? n[o][0]);
|
|
577
|
+
o = a[r] ?? o;
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
let c = n[o];
|
|
581
|
+
for (let t = Math.min(l, c.length - 1); t >= 0; --t) {
|
|
582
|
+
let n = c[t];
|
|
583
|
+
if (!wn(e, n, s)) return n;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
}, x = (t) => {
|
|
587
|
+
if (!v || u === -1) return;
|
|
588
|
+
let n = u % y, i = t === "up" ? -y : y, a = l - l % y, o = Yt(l / y) + 1;
|
|
589
|
+
for (let t = u - n + i, c = 0; c < o; c += 1, t += i) {
|
|
590
|
+
if (t < 0 || t > l) {
|
|
591
|
+
if (!r) return;
|
|
592
|
+
t = t < 0 ? a : 0;
|
|
593
|
+
}
|
|
594
|
+
let i = Math.min(t + y - 1, l);
|
|
595
|
+
for (let r = Math.min(t + n, i); r >= t; --r) if (!wn(e, r, s)) return r;
|
|
596
|
+
}
|
|
597
|
+
};
|
|
598
|
+
d && Fe(t);
|
|
599
|
+
let S = b(p) ?? x(p);
|
|
600
|
+
if (S !== void 0) f = S;
|
|
601
|
+
else if (u === -1) f = p === "up" ? l : c;
|
|
602
|
+
else if (f = Q(e, {
|
|
603
|
+
startingIndex: u,
|
|
604
|
+
amount: y,
|
|
605
|
+
decrement: p === "up",
|
|
606
|
+
disabledIndices: s
|
|
607
|
+
}), r) {
|
|
608
|
+
if (p === "up" && (u - y < c || f < 0)) {
|
|
609
|
+
let e = u % y, n = l % y, r = l - (n - e);
|
|
610
|
+
f = n === e ? l : n > e ? r : r - y, i && (f = i(t, u, f));
|
|
611
|
+
}
|
|
612
|
+
p === "down" && u + y > l && (f = Q(e, {
|
|
613
|
+
startingIndex: u % y - y,
|
|
614
|
+
amount: y,
|
|
615
|
+
disabledIndices: s
|
|
616
|
+
}), i && (f = i(t, u, f)));
|
|
617
|
+
}
|
|
618
|
+
yn(e, f) && (f = u);
|
|
619
|
+
}
|
|
620
|
+
if (n === "both") {
|
|
621
|
+
let n = Yt(u / o);
|
|
622
|
+
t.key === (a ? "ArrowLeft" : "ArrowRight") && (d && Fe(t), u % o === o - 1 ? r && (f = Q(e, {
|
|
623
|
+
startingIndex: u - u % o - 1,
|
|
624
|
+
disabledIndices: s
|
|
625
|
+
}), i && (f = i(t, u, f))) : (f = Q(e, {
|
|
626
|
+
startingIndex: u,
|
|
627
|
+
disabledIndices: s
|
|
628
|
+
}), r && vn(f, o, n) && (f = Q(e, {
|
|
629
|
+
startingIndex: u - u % o - 1,
|
|
630
|
+
disabledIndices: s
|
|
631
|
+
}), i && (f = i(t, u, f)))), vn(f, o, n) && (f = u)), t.key === (a ? "ArrowRight" : "ArrowLeft") && (d && Fe(t), u % o === 0 ? r && (f = Q(e, {
|
|
632
|
+
startingIndex: u + (o - u % o),
|
|
633
|
+
decrement: !0,
|
|
634
|
+
disabledIndices: s
|
|
635
|
+
}), i && (f = i(t, u, f))) : (f = Q(e, {
|
|
636
|
+
startingIndex: u,
|
|
637
|
+
decrement: !0,
|
|
638
|
+
disabledIndices: s
|
|
639
|
+
}), r && vn(f, o, n) && (f = Q(e, {
|
|
640
|
+
startingIndex: u + (o - u % o),
|
|
641
|
+
decrement: !0,
|
|
642
|
+
disabledIndices: s
|
|
643
|
+
}), i && (f = i(t, u, f)))), vn(f, o, n) && (f = u));
|
|
644
|
+
let c = Yt(l / o) === n;
|
|
645
|
+
yn(e, f) && (r && c ? (f = t.key === (a ? "ArrowRight" : "ArrowLeft") ? l : Q(e, {
|
|
646
|
+
startingIndex: u - u % o - 1,
|
|
647
|
+
disabledIndices: s
|
|
648
|
+
}), i && (f = i(t, u, f))) : f = u);
|
|
649
|
+
}
|
|
650
|
+
return f;
|
|
651
|
+
}
|
|
652
|
+
function wn(e, t, n) {
|
|
547
653
|
if (typeof n == "function" ? n(t) : n?.includes(t) ?? !1) return !0;
|
|
548
654
|
let r = e[t];
|
|
549
|
-
return r ? !
|
|
655
|
+
return r ? !En(r) || r.matches(":disabled") ? !0 : !n && (r.hasAttribute("disabled") || r.getAttribute("aria-disabled") === "true") : !1;
|
|
550
656
|
}
|
|
551
|
-
function
|
|
657
|
+
function Tn(e) {
|
|
552
658
|
return e.visibility === "hidden" || e.visibility === "collapse";
|
|
553
659
|
}
|
|
554
|
-
function
|
|
555
|
-
return !e || !e.isConnected || !t ||
|
|
660
|
+
function En(e, t = e ? h(e) : null) {
|
|
661
|
+
return !e || !e.isConnected || !t || Tn(t) ? !1 : typeof e.checkVisibility == "function" ? e.checkVisibility() : t.display !== "none" && t.display !== "contents";
|
|
556
662
|
}
|
|
557
|
-
var
|
|
558
|
-
function
|
|
663
|
+
var Dn = "a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable=\"false\"]),audio[controls],video[controls]";
|
|
664
|
+
function On(e) {
|
|
559
665
|
let t = e.assignedSlot;
|
|
560
666
|
if (t) return t;
|
|
561
667
|
if (e.parentElement) return e.parentElement;
|
|
562
668
|
let n = e.getRootNode();
|
|
563
669
|
return c(n) ? n.host : null;
|
|
564
670
|
}
|
|
565
|
-
function
|
|
671
|
+
function kn(e) {
|
|
566
672
|
for (let t of Array.from(e.children)) if (E(t) === "summary") return t;
|
|
567
673
|
return null;
|
|
568
674
|
}
|
|
569
|
-
function
|
|
570
|
-
let n =
|
|
675
|
+
function An(e, t) {
|
|
676
|
+
let n = kn(t);
|
|
571
677
|
return !!n && (e === n || K(n, e));
|
|
572
678
|
}
|
|
573
|
-
function
|
|
679
|
+
function jn(e) {
|
|
574
680
|
let t = e ? E(e) : "";
|
|
575
|
-
return e != null && e.matches(
|
|
681
|
+
return e != null && e.matches(Dn) && (t !== "summary" || e.parentElement != null && E(e.parentElement) === "details" && kn(e.parentElement) === e) && (t !== "details" || kn(e) == null) && (t !== "input" || e.type !== "hidden");
|
|
576
682
|
}
|
|
577
|
-
function
|
|
578
|
-
if (!
|
|
579
|
-
for (let t = e; t; t =
|
|
683
|
+
function Mn(e) {
|
|
684
|
+
if (!jn(e) || !e.isConnected || e.matches(":disabled")) return !1;
|
|
685
|
+
for (let t = e; t; t = On(t)) {
|
|
580
686
|
let n = t !== e, r = E(t) === "slot";
|
|
581
|
-
if (t.hasAttribute("inert") || n && E(t) === "details" && !t.open && !
|
|
687
|
+
if (t.hasAttribute("inert") || n && E(t) === "details" && !t.open && !An(e, t) || t.hasAttribute("hidden") || !r && !Nn(t, n)) return !1;
|
|
582
688
|
}
|
|
583
689
|
return !0;
|
|
584
690
|
}
|
|
585
|
-
function
|
|
691
|
+
function Nn(e, t) {
|
|
586
692
|
let n = h(e);
|
|
587
|
-
return t ? n.display !== "none" :
|
|
693
|
+
return t ? n.display !== "none" : En(e, n);
|
|
588
694
|
}
|
|
589
|
-
function
|
|
695
|
+
function Pn(e) {
|
|
590
696
|
let t = e.tabIndex;
|
|
591
697
|
if (t < 0) {
|
|
592
698
|
let t = E(e);
|
|
@@ -594,96 +700,96 @@ function jn(e) {
|
|
|
594
700
|
}
|
|
595
701
|
return t;
|
|
596
702
|
}
|
|
597
|
-
function
|
|
703
|
+
function Fn(e) {
|
|
598
704
|
if (E(e) !== "input") return null;
|
|
599
705
|
let t = e;
|
|
600
706
|
return t.type === "radio" && t.name !== "" ? t : null;
|
|
601
707
|
}
|
|
602
|
-
function
|
|
603
|
-
let n =
|
|
708
|
+
function In(e, t) {
|
|
709
|
+
let n = Fn(e);
|
|
604
710
|
if (!n) return !0;
|
|
605
711
|
let r = t.find((e) => {
|
|
606
|
-
let t =
|
|
712
|
+
let t = Fn(e);
|
|
607
713
|
return t?.name === n.name && t.form === n.form && t.checked;
|
|
608
714
|
});
|
|
609
715
|
return r ? r === n : t.find((e) => {
|
|
610
|
-
let t =
|
|
716
|
+
let t = Fn(e);
|
|
611
717
|
return t?.name === n.name && t.form === n.form;
|
|
612
718
|
}) === n;
|
|
613
719
|
}
|
|
614
|
-
function
|
|
720
|
+
function Ln(e) {
|
|
615
721
|
if (u(e) && E(e) === "slot") {
|
|
616
722
|
let t = e.assignedElements({ flatten: !0 });
|
|
617
723
|
if (t.length > 0) return t;
|
|
618
724
|
}
|
|
619
725
|
return u(e) && e.shadowRoot ? Array.from(e.shadowRoot.children) : Array.from(e.children);
|
|
620
726
|
}
|
|
621
|
-
function
|
|
622
|
-
|
|
623
|
-
|
|
727
|
+
function Rn(e, t) {
|
|
728
|
+
Ln(e).forEach((e) => {
|
|
729
|
+
jn(e) && t.push(e), Rn(e, t);
|
|
624
730
|
});
|
|
625
731
|
}
|
|
626
|
-
function
|
|
627
|
-
|
|
628
|
-
u(e) && e.matches(t) && n.push(e),
|
|
732
|
+
function zn(e, t, n) {
|
|
733
|
+
Ln(e).forEach((e) => {
|
|
734
|
+
u(e) && e.matches(t) && n.push(e), zn(e, t, n);
|
|
629
735
|
});
|
|
630
736
|
}
|
|
631
|
-
function
|
|
632
|
-
return
|
|
737
|
+
function Bn(e) {
|
|
738
|
+
return Mn(e) && Pn(e) >= 0;
|
|
633
739
|
}
|
|
634
|
-
function
|
|
740
|
+
function Vn(e) {
|
|
635
741
|
let t = [];
|
|
636
|
-
return
|
|
742
|
+
return Rn(e, t), t.filter(Mn);
|
|
637
743
|
}
|
|
638
|
-
function
|
|
639
|
-
let t =
|
|
640
|
-
return t.filter((e) =>
|
|
744
|
+
function Hn(e) {
|
|
745
|
+
let t = Vn(e);
|
|
746
|
+
return t.filter((e) => Pn(e) >= 0 && In(e, t));
|
|
641
747
|
}
|
|
642
|
-
function
|
|
643
|
-
let n =
|
|
748
|
+
function Un(e, t) {
|
|
749
|
+
let n = Hn(e), r = n.length;
|
|
644
750
|
if (r === 0) return;
|
|
645
|
-
let i =
|
|
751
|
+
let i = Ve(Y(e)), a = n.indexOf(i);
|
|
646
752
|
return n[a === -1 ? t === 1 ? 0 : r - 1 : a + t];
|
|
647
753
|
}
|
|
648
|
-
function
|
|
649
|
-
return
|
|
754
|
+
function Wn(e) {
|
|
755
|
+
return Un(Y(e).body, 1) || e;
|
|
650
756
|
}
|
|
651
|
-
function
|
|
652
|
-
return
|
|
757
|
+
function Gn(e) {
|
|
758
|
+
return Un(Y(e).body, -1) || e;
|
|
653
759
|
}
|
|
654
|
-
function
|
|
760
|
+
function Kn(e, t, n) {
|
|
655
761
|
if (!e) return null;
|
|
656
762
|
let r = [];
|
|
657
|
-
|
|
763
|
+
Rn(Y(e).body, r);
|
|
658
764
|
let i = r.indexOf(e);
|
|
659
765
|
if (i === -1) return null;
|
|
660
|
-
let a = r.filter(
|
|
766
|
+
let a = r.filter(Mn);
|
|
661
767
|
for (let e = 1; e < r.length; e += 1) {
|
|
662
768
|
let o = r[(i + t * e + r.length) % r.length];
|
|
663
|
-
if (!K(n, o) &&
|
|
769
|
+
if (!K(n, o) && Bn(o) && In(o, a)) return o;
|
|
664
770
|
}
|
|
665
771
|
return r[i];
|
|
666
772
|
}
|
|
667
|
-
function
|
|
773
|
+
function qn(e, t) {
|
|
668
774
|
let n = t || e.currentTarget, r = e.relatedTarget;
|
|
669
775
|
return !r || !K(n, r);
|
|
670
776
|
}
|
|
671
|
-
function
|
|
672
|
-
|
|
777
|
+
function Jn(e) {
|
|
778
|
+
Hn(e).forEach((e) => {
|
|
673
779
|
e.dataset.tabindex = e.getAttribute("tabindex") || "", e.setAttribute("tabindex", "-1");
|
|
674
780
|
});
|
|
675
781
|
}
|
|
676
|
-
function
|
|
782
|
+
function Yn(e) {
|
|
677
783
|
let t = [];
|
|
678
|
-
|
|
784
|
+
zn(e, "[data-tabindex]", t), t.forEach((e) => {
|
|
679
785
|
let t = e.dataset.tabindex;
|
|
680
786
|
delete e.dataset.tabindex, t ? e.setAttribute("tabindex", t) : e.removeAttribute("tabindex");
|
|
681
787
|
});
|
|
682
788
|
}
|
|
683
|
-
function
|
|
684
|
-
return e.filter((e) => e.parentId === t).flatMap((t) => [...!n || t.context?.open ? [t] : [], ...
|
|
789
|
+
function Xn(e, t, n = !0) {
|
|
790
|
+
return e.filter((e) => e.parentId === t).flatMap((t) => [...!n || t.context?.open ? [t] : [], ...Xn(e, t.id, n)]);
|
|
685
791
|
}
|
|
686
|
-
function
|
|
792
|
+
function Zn(e, t) {
|
|
687
793
|
let n = [], r = e.find((e) => e.id === t)?.parentId;
|
|
688
794
|
for (; r;) {
|
|
689
795
|
let t = e.find((e) => e.id === r);
|
|
@@ -691,19 +797,19 @@ function Jn(e, t) {
|
|
|
691
797
|
}
|
|
692
798
|
return n;
|
|
693
799
|
}
|
|
694
|
-
function
|
|
800
|
+
function Qn(e) {
|
|
695
801
|
return `data-base-ui-${e}`;
|
|
696
802
|
}
|
|
697
|
-
var
|
|
803
|
+
var $n = { style: { transition: "none" } }, er = "data-base-ui-click-trigger", tr = { fallbackAxisSide: "none" }, nr = { fallbackAxisSide: "end" }, rr = {
|
|
698
804
|
clipPath: "inset(50%)",
|
|
699
805
|
position: "fixed",
|
|
700
806
|
top: 0,
|
|
701
807
|
left: 0
|
|
702
|
-
},
|
|
703
|
-
process.env.NODE_ENV !== "production" && (
|
|
704
|
-
var
|
|
705
|
-
function
|
|
706
|
-
let { ref: n, container: r, componentProps: i = O, elementProps: a } = t, o =
|
|
808
|
+
}, ir = /*#__PURE__*/ B.createContext(null);
|
|
809
|
+
process.env.NODE_ENV !== "production" && (ir.displayName = "PortalContext");
|
|
810
|
+
var ar = () => B.useContext(ir), or = Qn("portal");
|
|
811
|
+
function sr(t = {}) {
|
|
812
|
+
let { ref: n, container: r, componentProps: i = O, elementProps: a } = t, o = z(), c = ar()?.portalNode, [l, u] = B.useState(null), [d, f] = B.useState(null), p = x((e) => {
|
|
707
813
|
e !== null && f(e);
|
|
708
814
|
}), m = B.useRef(null);
|
|
709
815
|
s(() => {
|
|
@@ -718,7 +824,7 @@ function ir(t = {}) {
|
|
|
718
824
|
ref: [n, p],
|
|
719
825
|
props: [{
|
|
720
826
|
id: o,
|
|
721
|
-
[
|
|
827
|
+
[or]: ""
|
|
722
828
|
}, a]
|
|
723
829
|
}), g = l && h ? /*#__PURE__*/ de.createPortal(h, l) : null;
|
|
724
830
|
return {
|
|
@@ -727,8 +833,8 @@ function ir(t = {}) {
|
|
|
727
833
|
subtree: g
|
|
728
834
|
};
|
|
729
835
|
}
|
|
730
|
-
var
|
|
731
|
-
let { render: n, className: r, style: i, children: a, container: o, portalOwnerRole: c, ...l } = e, { node: u, nodeId: d, subtree: f } =
|
|
836
|
+
var cr = /*#__PURE__*/ B.forwardRef(function(e, t) {
|
|
837
|
+
let { render: n, className: r, style: i, children: a, container: o, portalOwnerRole: c, ...l } = e, { node: u, nodeId: d, subtree: f } = sr({
|
|
732
838
|
container: o,
|
|
733
839
|
ref: t,
|
|
734
840
|
componentProps: e,
|
|
@@ -737,11 +843,11 @@ var ar = /*#__PURE__*/ B.forwardRef(function(e, t) {
|
|
|
737
843
|
B.useEffect(() => {
|
|
738
844
|
if (!u || b) return;
|
|
739
845
|
function e(e) {
|
|
740
|
-
u && e.relatedTarget &&
|
|
846
|
+
u && e.relatedTarget && qn(e) && (e.type === "focusin" ? y.current &&= (Yn(u), !1) : (Jn(u), y.current = !0));
|
|
741
847
|
}
|
|
742
|
-
return
|
|
848
|
+
return Ft(q(u, "focusin", e, !0), q(u, "focusout", e, !0));
|
|
743
849
|
}, [u, b]), s(() => {
|
|
744
|
-
u && x === !0 && y.current && (
|
|
850
|
+
u && x === !0 && y.current && (Yn(u), y.current = !1);
|
|
745
851
|
}, [x, u]);
|
|
746
852
|
let C = B.useMemo(() => ({
|
|
747
853
|
beforeOutsideRef: p,
|
|
@@ -751,34 +857,34 @@ var ar = /*#__PURE__*/ B.forwardRef(function(e, t) {
|
|
|
751
857
|
portalNode: u,
|
|
752
858
|
setFocusManagerState: v
|
|
753
859
|
}), [u]);
|
|
754
|
-
return /*#__PURE__*/ ue(B.Fragment, { children: [f, /*#__PURE__*/ ue(
|
|
860
|
+
return /*#__PURE__*/ ue(B.Fragment, { children: [f, /*#__PURE__*/ ue(ir.Provider, {
|
|
755
861
|
value: C,
|
|
756
862
|
children: [
|
|
757
|
-
S && u && /*#__PURE__*/ W(
|
|
863
|
+
S && u && /*#__PURE__*/ W(Gt, {
|
|
758
864
|
"data-type": "outside",
|
|
759
865
|
ref: p,
|
|
760
866
|
onFocus: (e) => {
|
|
761
|
-
|
|
867
|
+
qn(e, u) ? h.current?.focus() : Gn(_ ? _.domReference : null)?.focus();
|
|
762
868
|
}
|
|
763
869
|
}),
|
|
764
870
|
S && u && /*#__PURE__*/ W("span", {
|
|
765
871
|
role: c,
|
|
766
872
|
"aria-owns": d,
|
|
767
|
-
style:
|
|
873
|
+
style: rr
|
|
768
874
|
}),
|
|
769
875
|
u && /*#__PURE__*/ de.createPortal(a, u),
|
|
770
|
-
S && u && /*#__PURE__*/ W(
|
|
876
|
+
S && u && /*#__PURE__*/ W(Gt, {
|
|
771
877
|
"data-type": "outside",
|
|
772
878
|
ref: m,
|
|
773
879
|
onFocus: (e) => {
|
|
774
|
-
|
|
880
|
+
qn(e, u) ? g.current?.focus() : (Wn(_ ? _.domReference : null)?.focus(), _?.closeOnFocusOut && _?.onOpenChange(!1, I("focus-out", e.nativeEvent)));
|
|
775
881
|
}
|
|
776
882
|
})
|
|
777
883
|
]
|
|
778
884
|
})] });
|
|
779
885
|
});
|
|
780
|
-
process.env.NODE_ENV !== "production" && (
|
|
781
|
-
function
|
|
886
|
+
process.env.NODE_ENV !== "production" && (cr.displayName = "FloatingPortal");
|
|
887
|
+
function lr() {
|
|
782
888
|
let e = /* @__PURE__ */ new Map();
|
|
783
889
|
return {
|
|
784
890
|
emit(t, n) {
|
|
@@ -792,9 +898,9 @@ function or() {
|
|
|
792
898
|
}
|
|
793
899
|
};
|
|
794
900
|
}
|
|
795
|
-
var
|
|
901
|
+
var ur = class {
|
|
796
902
|
nodesRef = { current: [] };
|
|
797
|
-
events =
|
|
903
|
+
events = lr();
|
|
798
904
|
addNode(e) {
|
|
799
905
|
this.nodesRef.current.push(e);
|
|
800
906
|
}
|
|
@@ -802,16 +908,16 @@ var sr = class {
|
|
|
802
908
|
let t = this.nodesRef.current.findIndex((t) => t === e);
|
|
803
909
|
t !== -1 && this.nodesRef.current.splice(t, 1);
|
|
804
910
|
}
|
|
805
|
-
},
|
|
806
|
-
process.env.NODE_ENV !== "production" && (
|
|
807
|
-
var
|
|
808
|
-
process.env.NODE_ENV !== "production" && (
|
|
809
|
-
var
|
|
810
|
-
let t = B.useContext(
|
|
911
|
+
}, dr = /*#__PURE__*/ B.createContext(null);
|
|
912
|
+
process.env.NODE_ENV !== "production" && (dr.displayName = "FloatingNodeContext");
|
|
913
|
+
var fr = /*#__PURE__*/ B.createContext(null);
|
|
914
|
+
process.env.NODE_ENV !== "production" && (fr.displayName = "FloatingTreeContext");
|
|
915
|
+
var pr = () => B.useContext(dr)?.id || null, mr = (e) => {
|
|
916
|
+
let t = B.useContext(fr);
|
|
811
917
|
return e ?? t;
|
|
812
918
|
};
|
|
813
|
-
function
|
|
814
|
-
let t =
|
|
919
|
+
function hr(e) {
|
|
920
|
+
let t = z(), n = mr(e), r = pr();
|
|
815
921
|
return s(() => {
|
|
816
922
|
if (!t) return;
|
|
817
923
|
let e = {
|
|
@@ -827,9 +933,9 @@ function fr(e) {
|
|
|
827
933
|
r
|
|
828
934
|
]), t;
|
|
829
935
|
}
|
|
830
|
-
function
|
|
831
|
-
let { children: t, id: n } = e, r =
|
|
832
|
-
return /*#__PURE__*/ W(
|
|
936
|
+
function gr(e) {
|
|
937
|
+
let { children: t, id: n } = e, r = pr();
|
|
938
|
+
return /*#__PURE__*/ W(dr.Provider, {
|
|
833
939
|
value: B.useMemo(() => ({
|
|
834
940
|
id: n,
|
|
835
941
|
parentId: r
|
|
@@ -837,17 +943,17 @@ function pr(e) {
|
|
|
837
943
|
children: t
|
|
838
944
|
});
|
|
839
945
|
}
|
|
840
|
-
function
|
|
841
|
-
let { children: t, externalTree: n } = e, r = m(() => n ?? new
|
|
842
|
-
return /*#__PURE__*/ W(
|
|
946
|
+
function _r(e) {
|
|
947
|
+
let { children: t, externalTree: n } = e, r = m(() => n ?? new ur()).current;
|
|
948
|
+
return /*#__PURE__*/ W(fr.Provider, {
|
|
843
949
|
value: r,
|
|
844
950
|
children: t
|
|
845
951
|
});
|
|
846
952
|
}
|
|
847
|
-
function
|
|
953
|
+
function vr(e) {
|
|
848
954
|
return e == null ? e : "current" in e ? e.current : e;
|
|
849
955
|
}
|
|
850
|
-
function
|
|
956
|
+
function yr(e, t) {
|
|
851
957
|
let n = null, r = null, i = !1;
|
|
852
958
|
return {
|
|
853
959
|
contextElement: e || void 0,
|
|
@@ -871,14 +977,14 @@ function gr(e, t) {
|
|
|
871
977
|
}
|
|
872
978
|
};
|
|
873
979
|
}
|
|
874
|
-
function
|
|
980
|
+
function br(e) {
|
|
875
981
|
return e != null && e.clientX != null;
|
|
876
982
|
}
|
|
877
|
-
function
|
|
983
|
+
function xr(e, t = {}) {
|
|
878
984
|
let { enabled: n = !0, axis: r = "both" } = t, i = e.useState("open"), a = e.useState("floatingElement"), o = e.useState("domReferenceElement"), s = e.context.dataRef, c = B.useRef(!1), l = B.useRef(null), [u, d] = B.useState(), [f, m] = B.useState([]), h = x((t) => {
|
|
879
985
|
e.set("positionReference", t);
|
|
880
986
|
}), g = x((t, n, i) => {
|
|
881
|
-
c.current || (!s.current.openEvent ||
|
|
987
|
+
c.current || (!s.current.openEvent || br(s.current.openEvent)) && e.set("positionReference", yr(i ?? o, {
|
|
882
988
|
x: t,
|
|
883
989
|
y: n,
|
|
884
990
|
axis: r,
|
|
@@ -887,7 +993,7 @@ function vr(e, t = {}) {
|
|
|
887
993
|
}));
|
|
888
994
|
}), _ = x((e) => {
|
|
889
995
|
i ? l.current || (g(e.clientX, e.clientY, e.currentTarget), m([])) : g(e.clientX, e.clientY, e.currentTarget);
|
|
890
|
-
}), v =
|
|
996
|
+
}), v = ze(u) ? a : i;
|
|
891
997
|
B.useEffect(() => {
|
|
892
998
|
if (!n) {
|
|
893
999
|
h(o);
|
|
@@ -899,10 +1005,10 @@ function vr(e, t = {}) {
|
|
|
899
1005
|
}
|
|
900
1006
|
let t = p(a);
|
|
901
1007
|
function r(t) {
|
|
902
|
-
let n =
|
|
1008
|
+
let n = Ue(t);
|
|
903
1009
|
K(a, n) ? e() : g(t.clientX, t.clientY);
|
|
904
1010
|
}
|
|
905
|
-
return !s.current.openEvent ||
|
|
1011
|
+
return !s.current.openEvent || br(s.current.openEvent) ? l.current = q(t, "mousemove", r) : h(o), e;
|
|
906
1012
|
}, [
|
|
907
1013
|
v,
|
|
908
1014
|
n,
|
|
@@ -936,55 +1042,55 @@ function vr(e, t = {}) {
|
|
|
936
1042
|
trigger: y
|
|
937
1043
|
} : {}, [n, y]);
|
|
938
1044
|
}
|
|
939
|
-
function
|
|
1045
|
+
function Sr() {
|
|
940
1046
|
return !1;
|
|
941
1047
|
}
|
|
942
|
-
function
|
|
1048
|
+
function Cr(e) {
|
|
943
1049
|
return {
|
|
944
1050
|
escapeKey: typeof e == "boolean" ? e : e?.escapeKey ?? !1,
|
|
945
1051
|
outsidePress: typeof e == "boolean" ? e : e?.outsidePress ?? !0
|
|
946
1052
|
};
|
|
947
1053
|
}
|
|
948
|
-
function
|
|
949
|
-
let { enabled: n = !0, escapeKey: i = !0, outsidePress: a = !0, outsidePressEvent: o = "sloppy", referencePress: s =
|
|
950
|
-
|
|
1054
|
+
function wr(e, t = {}) {
|
|
1055
|
+
let { enabled: n = !0, escapeKey: i = !0, outsidePress: a = !0, outsidePressEvent: o = "sloppy", referencePress: s = Sr, bubbles: l, externalTree: d } = t, f = e.useState("open"), p = e.useState("floatingElement"), { dataRef: m, events: g } = e.context, _ = mr(d), v = x(typeof a == "function" ? a : () => !1), y = typeof a == "function" ? v : a, S = y !== !1, C = x(() => o), { escapeKey: w, outsidePress: E } = Cr(l), D = B.useRef(!1), O = B.useRef(!1), A = B.useRef(!1), j = B.useRef(!1), N = B.useRef(!1), ee = B.useRef(""), F = B.useRef(null), ne = P(), re = P(), R = P(), z = x(() => {
|
|
1056
|
+
re.clear(), m.current.insideReactTree = !1;
|
|
951
1057
|
}), ie = x((e) => {
|
|
952
1058
|
let t = m.current.floatingContext?.nodeId;
|
|
953
|
-
return (_ ?
|
|
954
|
-
}), ae = x((t) =>
|
|
955
|
-
s() && e.setOpen(!1,
|
|
1059
|
+
return (_ ? Xn(_.nodesRef.current, t) : []).some((t) => t.context?.open && !t.context.dataRef.current[e]);
|
|
1060
|
+
}), ae = x((t) => yt(t, e.select("floatingElement")) || yt(t, e.select("domReferenceElement"))), V = x((t) => {
|
|
1061
|
+
s() && e.setOpen(!1, I(L, t.nativeEvent));
|
|
956
1062
|
}), oe = x((t) => {
|
|
957
1063
|
if (!f || !n || !i || t.key !== "Escape") return;
|
|
958
|
-
let r =
|
|
959
|
-
if (
|
|
960
|
-
let a =
|
|
1064
|
+
let r = Ie(t) ? t.nativeEvent : t;
|
|
1065
|
+
if (N.current || r.isComposing || !w && ie("__escapeKeyBubbles")) return;
|
|
1066
|
+
let a = I(te, r);
|
|
961
1067
|
e.setOpen(!1, a), a.isCanceled || t.preventDefault(), !w && !a.isPropagationAllowed && t.stopPropagation();
|
|
962
1068
|
}), H = x(() => {
|
|
963
|
-
m.current.insideReactTree = !0,
|
|
1069
|
+
m.current.insideReactTree = !0, re.start(0, z);
|
|
964
1070
|
}), se = x((t) => {
|
|
965
1071
|
if (!f || !n || t.button !== 0) return;
|
|
966
|
-
let r =
|
|
1072
|
+
let r = Ue(t.nativeEvent);
|
|
967
1073
|
K(e.select("floatingElement"), r) && (D.current || (D.current = !0, O.current = !1));
|
|
968
1074
|
}), ce = x((e) => {
|
|
969
1075
|
f && n && (e.defaultPrevented || e.nativeEvent.defaultPrevented) && D.current && (O.current = !0);
|
|
970
1076
|
});
|
|
971
1077
|
B.useEffect(() => {
|
|
972
1078
|
function e(e) {
|
|
973
|
-
e.open || (
|
|
1079
|
+
e.open || (j.current = !1);
|
|
974
1080
|
}
|
|
975
1081
|
return g.on("openchange", e), () => {
|
|
976
1082
|
g.off("openchange", e);
|
|
977
1083
|
};
|
|
978
1084
|
}, [g]), B.useEffect(() => z, [z]), B.useEffect(() => {
|
|
979
|
-
if (!f || !n) return f || (
|
|
1085
|
+
if (!f || !n) return f || (j.current = !1, N.current = !1, ee.current = "", F.current = null), z;
|
|
980
1086
|
m.current.__escapeKeyBubbles = w, m.current.__outsidePressBubbles = E;
|
|
981
|
-
let t = new
|
|
1087
|
+
let t = new M(), a = Y(p);
|
|
982
1088
|
function o() {
|
|
983
|
-
|
|
1089
|
+
R.clear(), N.current = !0;
|
|
984
1090
|
}
|
|
985
1091
|
function s() {
|
|
986
|
-
|
|
987
|
-
|
|
1092
|
+
N.current = !0, R.start(je ? 5 : 0, () => {
|
|
1093
|
+
N.current = !1;
|
|
988
1094
|
});
|
|
989
1095
|
}
|
|
990
1096
|
function l() {
|
|
@@ -1004,10 +1110,10 @@ function xr(e, t = {}) {
|
|
|
1004
1110
|
return t === "intentional" && e.type !== "click" || t === "sloppy" && e.type === "click";
|
|
1005
1111
|
}
|
|
1006
1112
|
function x(e) {
|
|
1007
|
-
let t = m.current.floatingContext?.nodeId, n = _ &&
|
|
1113
|
+
let t = m.current.floatingContext?.nodeId, n = _ && Xn(_.nodesRef.current, t).some((t) => yt(e, t.context?.elements.floating));
|
|
1008
1114
|
return ae(e) || n;
|
|
1009
1115
|
}
|
|
1010
|
-
function
|
|
1116
|
+
function P(n) {
|
|
1011
1117
|
if (v(n)) {
|
|
1012
1118
|
n.type !== "click" && !ae(n) && (t.clear(), A.current = !1), z();
|
|
1013
1119
|
return;
|
|
@@ -1016,7 +1122,7 @@ function xr(e, t = {}) {
|
|
|
1016
1122
|
z();
|
|
1017
1123
|
return;
|
|
1018
1124
|
}
|
|
1019
|
-
let i =
|
|
1125
|
+
let i = Ue(n), a = `[${Qn("inert")}]`, o = r(i) ? i.getRootNode() : null, s = Array.from((c(o) ? o : Y(e.select("floatingElement"))).querySelectorAll(a)), l = e.context.triggerElements;
|
|
1020
1126
|
if (i && (l.hasElement(i) || l.hasMatchingElement((e) => K(e, i)))) return;
|
|
1021
1127
|
let d = r(i) ? i : null;
|
|
1022
1128
|
for (; d && !b(d);) {
|
|
@@ -1024,76 +1130,76 @@ function xr(e, t = {}) {
|
|
|
1024
1130
|
if (b(e) || !r(e)) break;
|
|
1025
1131
|
d = e;
|
|
1026
1132
|
}
|
|
1027
|
-
if (!(s.length && r(i) && !
|
|
1133
|
+
if (!(s.length && r(i) && !bt(i) && !K(i, e.select("floatingElement")) && s.every((e) => !K(d, e)))) {
|
|
1028
1134
|
if (u(i) && !("touches" in n)) {
|
|
1029
1135
|
let e = b(i), t = h(i), r = /auto|scroll/, a = e || r.test(t.overflowX), o = e || r.test(t.overflowY), s = a && i.clientWidth > 0 && i.scrollWidth > i.clientWidth, c = o && i.clientHeight > 0 && i.scrollHeight > i.clientHeight, l = t.direction === "rtl", u = c && (l ? n.offsetX <= i.offsetWidth - i.clientWidth : n.offsetX > i.clientWidth), d = s && n.offsetY > i.clientHeight;
|
|
1030
1136
|
if (u || d) return;
|
|
1031
1137
|
}
|
|
1032
1138
|
if (!x(n)) {
|
|
1033
1139
|
if (g() === "intentional") {
|
|
1034
|
-
if (n.detail !== 0 && !
|
|
1140
|
+
if (n.detail !== 0 && !Le(n) && !j.current) return;
|
|
1035
1141
|
if (A.current) {
|
|
1036
1142
|
t.clear(), A.current = !1;
|
|
1037
1143
|
return;
|
|
1038
1144
|
}
|
|
1039
1145
|
}
|
|
1040
|
-
(typeof y != "function" || y(n)) && (ie("__outsidePressBubbles") || (e.setOpen(!1,
|
|
1146
|
+
(typeof y != "function" || y(n)) && (ie("__outsidePressBubbles") || (e.setOpen(!1, I(k, n)), z()));
|
|
1041
1147
|
}
|
|
1042
1148
|
}
|
|
1043
1149
|
}
|
|
1044
|
-
function M(t) {
|
|
1045
|
-
g() === "sloppy" && t.pointerType !== "touch" && e.select("open") && n && !ae(t) && k(t);
|
|
1046
|
-
}
|
|
1047
1150
|
function te(t) {
|
|
1151
|
+
g() === "sloppy" && t.pointerType !== "touch" && e.select("open") && n && !ae(t) && P(t);
|
|
1152
|
+
}
|
|
1153
|
+
function L(t) {
|
|
1048
1154
|
if (g() !== "sloppy" || !e.select("open") || !n || ae(t)) return;
|
|
1049
1155
|
let r = t.touches[0];
|
|
1050
|
-
r && (
|
|
1156
|
+
r && (F.current = {
|
|
1051
1157
|
startTime: Date.now(),
|
|
1052
1158
|
startX: r.clientX,
|
|
1053
1159
|
startY: r.clientY,
|
|
1054
1160
|
dismissOnTouchEnd: !1,
|
|
1055
1161
|
dismissOnMouseDown: !0
|
|
1056
|
-
},
|
|
1057
|
-
|
|
1162
|
+
}, ne.start(1e3, () => {
|
|
1163
|
+
F.current && (F.current.dismissOnTouchEnd = !1, F.current.dismissOnMouseDown = !1);
|
|
1058
1164
|
}));
|
|
1059
1165
|
}
|
|
1060
|
-
function
|
|
1061
|
-
let n =
|
|
1166
|
+
function re(e, t) {
|
|
1167
|
+
let n = Ue(e);
|
|
1062
1168
|
if (!n) return;
|
|
1063
1169
|
let r = q(n, e.type, () => {
|
|
1064
1170
|
t(e), r();
|
|
1065
1171
|
});
|
|
1066
1172
|
}
|
|
1067
1173
|
function B(e) {
|
|
1068
|
-
ee.current = "touch",
|
|
1174
|
+
ee.current = "touch", re(e, L);
|
|
1069
1175
|
}
|
|
1070
1176
|
function V(e) {
|
|
1071
|
-
|
|
1072
|
-
e.type === "pointerdown" ?
|
|
1177
|
+
ne.clear(), e.type === "pointerdown" && (e.button === 0 && (j.current = !0), ee.current = e.pointerType), (e.type !== "mousedown" || !F.current || F.current.dismissOnMouseDown) && re(e, (e) => {
|
|
1178
|
+
e.type === "pointerdown" ? te(e) : P(e);
|
|
1073
1179
|
});
|
|
1074
1180
|
}
|
|
1075
1181
|
function H(e) {
|
|
1076
|
-
if (e.type === "pointercancel" && (
|
|
1182
|
+
if (e.type === "pointercancel" && (j.current = !1), !D.current) return;
|
|
1077
1183
|
let n = O.current;
|
|
1078
1184
|
d(), g() === "intentional" && (e.type === "pointercancel" ? n && l() : x(e) || (n ? l() : (typeof y != "function" || y(e)) && (t.clear(), A.current = !0, z())));
|
|
1079
1185
|
}
|
|
1080
1186
|
function se(e) {
|
|
1081
|
-
if (g() !== "sloppy" || !
|
|
1187
|
+
if (g() !== "sloppy" || !F.current || ae(e)) return;
|
|
1082
1188
|
let t = e.touches[0];
|
|
1083
1189
|
if (!t) return;
|
|
1084
|
-
let n = Math.abs(t.clientX -
|
|
1085
|
-
i > 5 && (
|
|
1190
|
+
let n = Math.abs(t.clientX - F.current.startX), r = Math.abs(t.clientY - F.current.startY), i = Math.sqrt(n * n + r * r);
|
|
1191
|
+
i > 5 && (F.current.dismissOnTouchEnd = !0), i > 10 && (P(e), ne.clear(), F.current = null);
|
|
1086
1192
|
}
|
|
1087
1193
|
function ce(e) {
|
|
1088
|
-
|
|
1194
|
+
re(e, se);
|
|
1089
1195
|
}
|
|
1090
1196
|
function le(e) {
|
|
1091
|
-
g() === "sloppy" &&
|
|
1197
|
+
g() === "sloppy" && F.current && !ae(e) && (F.current.dismissOnTouchEnd && P(e), ne.clear(), F.current = null);
|
|
1092
1198
|
}
|
|
1093
1199
|
function U(e) {
|
|
1094
|
-
|
|
1200
|
+
re(e, le);
|
|
1095
1201
|
}
|
|
1096
|
-
let W =
|
|
1202
|
+
let W = Ft(i && Ft(q(a, "keydown", oe), q(a, "compositionstart", o), q(a, "compositionend", s)), S && Ft(q(a, "click", V, !0), q(a, "pointerdown", V, !0), q(a, "pointerup", H, !0), q(a, "pointercancel", H, !0), q(a, "mousedown", V, !0), q(a, "mouseup", H, !0), q(a, "touchstart", B, {
|
|
1097
1203
|
capture: !0,
|
|
1098
1204
|
passive: !0
|
|
1099
1205
|
}), q(a, "touchmove", ce, {
|
|
@@ -1123,8 +1229,8 @@ function xr(e, t = {}) {
|
|
|
1123
1229
|
ae,
|
|
1124
1230
|
_,
|
|
1125
1231
|
e,
|
|
1126
|
-
|
|
1127
|
-
|
|
1232
|
+
ne,
|
|
1233
|
+
R
|
|
1128
1234
|
]);
|
|
1129
1235
|
let le = B.useMemo(() => ({
|
|
1130
1236
|
onKeyDown: oe,
|
|
@@ -1160,7 +1266,7 @@ function xr(e, t = {}) {
|
|
|
1160
1266
|
U
|
|
1161
1267
|
]);
|
|
1162
1268
|
}
|
|
1163
|
-
function
|
|
1269
|
+
function Tr(e) {
|
|
1164
1270
|
let { popupStore: t, treatPopupAsFloatingElement: n = !1, floatingRootContext: i, floatingId: a, nested: o, onOpenChange: c } = e, l = t.useState("open"), u = t.useState("activeTriggerElement"), d = t.useState(n ? "popupElement" : "positionerElement"), f = c;
|
|
1165
1271
|
return t.useSyncedValue("floatingId", a), s(() => {
|
|
1166
1272
|
let e = {
|
|
@@ -1178,15 +1284,15 @@ function Sr(e) {
|
|
|
1178
1284
|
i
|
|
1179
1285
|
]), i.context.onOpenChange = f, i.context.nested = o, i;
|
|
1180
1286
|
}
|
|
1181
|
-
function
|
|
1287
|
+
function Er(e, t = !1, n = !1, r = !1) {
|
|
1182
1288
|
let [i, a] = B.useState(e && t ? "idle" : void 0), [o, c] = B.useState(e && !r);
|
|
1183
1289
|
return e && !o && (c(!0), a("starting")), !e && o && i !== "ending" && !n && a("ending"), !e && !o && i === "ending" && a(void 0), s(() => {
|
|
1184
1290
|
if (!e && o && i !== "ending" && n) {
|
|
1185
|
-
let e =
|
|
1291
|
+
let e = Bt.request(() => {
|
|
1186
1292
|
a("ending");
|
|
1187
1293
|
});
|
|
1188
1294
|
return () => {
|
|
1189
|
-
|
|
1295
|
+
Bt.cancel(e);
|
|
1190
1296
|
};
|
|
1191
1297
|
}
|
|
1192
1298
|
}, [
|
|
@@ -1196,11 +1302,11 @@ function Cr(e, t = !1, n = !1, r = !1) {
|
|
|
1196
1302
|
n
|
|
1197
1303
|
]), s(() => {
|
|
1198
1304
|
if (!e || t || i === void 0) return;
|
|
1199
|
-
let n =
|
|
1305
|
+
let n = Bt.request(() => {
|
|
1200
1306
|
a(void 0);
|
|
1201
1307
|
});
|
|
1202
1308
|
return () => {
|
|
1203
|
-
|
|
1309
|
+
Bt.cancel(n);
|
|
1204
1310
|
};
|
|
1205
1311
|
}, [
|
|
1206
1312
|
t,
|
|
@@ -1209,11 +1315,11 @@ function Cr(e, t = !1, n = !1, r = !1) {
|
|
|
1209
1315
|
]), s(() => {
|
|
1210
1316
|
if (!e || !t) return;
|
|
1211
1317
|
e && o && i !== "idle" && a("starting");
|
|
1212
|
-
let n =
|
|
1318
|
+
let n = Bt.request(() => {
|
|
1213
1319
|
a("idle");
|
|
1214
1320
|
});
|
|
1215
1321
|
return () => {
|
|
1216
|
-
|
|
1322
|
+
Bt.cancel(n);
|
|
1217
1323
|
};
|
|
1218
1324
|
}, [
|
|
1219
1325
|
t,
|
|
@@ -1226,32 +1332,32 @@ function Cr(e, t = !1, n = !1, r = !1) {
|
|
|
1226
1332
|
transitionStatus: i
|
|
1227
1333
|
};
|
|
1228
1334
|
}
|
|
1229
|
-
function
|
|
1335
|
+
function Dr(e, t) {
|
|
1230
1336
|
return e.getAnimations(t).filter((e) => {
|
|
1231
1337
|
let t = e.effect?.getTiming();
|
|
1232
1338
|
return t?.duration !== Infinity && t?.iterations !== Infinity;
|
|
1233
1339
|
});
|
|
1234
1340
|
}
|
|
1235
|
-
var
|
|
1236
|
-
function
|
|
1237
|
-
if (!
|
|
1341
|
+
var Or = null;
|
|
1342
|
+
function kr(e) {
|
|
1343
|
+
if (!Or) {
|
|
1238
1344
|
let e = [];
|
|
1239
|
-
|
|
1240
|
-
|
|
1345
|
+
Or = e, queueMicrotask(() => {
|
|
1346
|
+
Or = null, de.flushSync(() => {
|
|
1241
1347
|
for (let t of e) t();
|
|
1242
1348
|
});
|
|
1243
1349
|
});
|
|
1244
1350
|
}
|
|
1245
|
-
|
|
1351
|
+
Or.push(e);
|
|
1246
1352
|
}
|
|
1247
|
-
function
|
|
1248
|
-
let i =
|
|
1353
|
+
function Ar(e, n = !1, r = !1) {
|
|
1354
|
+
let i = Vt();
|
|
1249
1355
|
return x((a, o = null) => {
|
|
1250
1356
|
i.cancel();
|
|
1251
|
-
let s =
|
|
1357
|
+
let s = vr(e);
|
|
1252
1358
|
if (s == null) return;
|
|
1253
1359
|
let c = s, l = () => {
|
|
1254
|
-
r ?
|
|
1360
|
+
r ? kr(() => {
|
|
1255
1361
|
o?.aborted || a();
|
|
1256
1362
|
}) : de.flushSync(a);
|
|
1257
1363
|
};
|
|
@@ -1260,14 +1366,14 @@ function Dr(e, n = !1, r = !1) {
|
|
|
1260
1366
|
return;
|
|
1261
1367
|
}
|
|
1262
1368
|
function u() {
|
|
1263
|
-
Promise.all(
|
|
1369
|
+
Promise.all(Dr(c).map((e) => e.finished.then(t))).then(() => {
|
|
1264
1370
|
o?.aborted || l();
|
|
1265
1371
|
}, () => {
|
|
1266
|
-
o?.aborted || (
|
|
1372
|
+
o?.aborted || (Dr(c).some((e) => e.pending || e.playState !== "finished") ? u() : l());
|
|
1267
1373
|
});
|
|
1268
1374
|
}
|
|
1269
1375
|
if (n) {
|
|
1270
|
-
let e =
|
|
1376
|
+
let e = Xe;
|
|
1271
1377
|
if (!c.hasAttribute(e)) {
|
|
1272
1378
|
i.request(u);
|
|
1273
1379
|
return;
|
|
@@ -1282,8 +1388,8 @@ function Dr(e, n = !1, r = !1) {
|
|
|
1282
1388
|
} else i.request(u);
|
|
1283
1389
|
});
|
|
1284
1390
|
}
|
|
1285
|
-
function
|
|
1286
|
-
let { enabled: t = !0, open: n, ref: r, batch: i = !1, onComplete: a } = e, o = x(a), s =
|
|
1391
|
+
function jr(e) {
|
|
1392
|
+
let { enabled: t = !0, open: n, ref: r, batch: i = !1, onComplete: a } = e, o = x(a), s = Ar(r, n, i);
|
|
1287
1393
|
B.useEffect(() => {
|
|
1288
1394
|
if (!t) return;
|
|
1289
1395
|
let e = new AbortController();
|
|
@@ -1297,12 +1403,12 @@ function Or(e) {
|
|
|
1297
1403
|
s
|
|
1298
1404
|
]);
|
|
1299
1405
|
}
|
|
1300
|
-
function
|
|
1301
|
-
let { open: t, ref: n, preventUnmountOnClose: r, setPreventUnmountOnClose: i, onUnmount: a, animateInitialOpen: o } = e, c = x(i), { mounted: l, setMounted: u, transitionStatus: d } =
|
|
1406
|
+
function Mr(e) {
|
|
1407
|
+
let { open: t, ref: n, preventUnmountOnClose: r, setPreventUnmountOnClose: i, onUnmount: a, animateInitialOpen: o } = e, c = x(i), { mounted: l, setMounted: u, transitionStatus: d } = Er(t, !1, !1, o), f = !t && r;
|
|
1302
1408
|
s(() => {
|
|
1303
1409
|
t && c(!1);
|
|
1304
1410
|
}, [t, c]);
|
|
1305
|
-
let p = B.useRef(l), m = B.useRef(!1), h =
|
|
1411
|
+
let p = B.useRef(l), m = B.useRef(!1), h = F(), g = () => {
|
|
1306
1412
|
p.current = !1, u(!1), a();
|
|
1307
1413
|
};
|
|
1308
1414
|
s(() => {
|
|
@@ -1311,7 +1417,7 @@ function kr(e) {
|
|
|
1311
1417
|
let _ = x(() => {
|
|
1312
1418
|
p.current && (t ? (m.current = !0, h()) : g());
|
|
1313
1419
|
});
|
|
1314
|
-
return
|
|
1420
|
+
return jr({
|
|
1315
1421
|
enabled: l && !t && !f,
|
|
1316
1422
|
open: t,
|
|
1317
1423
|
ref: n,
|
|
@@ -1325,16 +1431,16 @@ function kr(e) {
|
|
|
1325
1431
|
forceUnmount: _
|
|
1326
1432
|
};
|
|
1327
1433
|
}
|
|
1328
|
-
var
|
|
1434
|
+
var Nr = {
|
|
1329
1435
|
tabIndex: -1,
|
|
1330
|
-
[
|
|
1436
|
+
[We]: ""
|
|
1331
1437
|
};
|
|
1332
|
-
function
|
|
1438
|
+
function Pr(e) {
|
|
1333
1439
|
return (t) => t !== "touch" || e.current;
|
|
1334
1440
|
}
|
|
1335
|
-
function
|
|
1336
|
-
let n =
|
|
1337
|
-
return
|
|
1441
|
+
function Fr(e, t = !1) {
|
|
1442
|
+
let n = z(), r = pr() != null, i = m(() => e(n, r)).current;
|
|
1443
|
+
return Tr({
|
|
1338
1444
|
popupStore: i,
|
|
1339
1445
|
treatPopupAsFloatingElement: t,
|
|
1340
1446
|
floatingRootContext: i.state.floatingRootContext,
|
|
@@ -1343,14 +1449,14 @@ function Mr(e, t = !1) {
|
|
|
1343
1449
|
onOpenChange: i.setOpen
|
|
1344
1450
|
}), i;
|
|
1345
1451
|
}
|
|
1346
|
-
function
|
|
1452
|
+
function Ir({ handle: e, store: t }) {
|
|
1347
1453
|
return s(() => e.attachStore(t), [e, t]), null;
|
|
1348
1454
|
}
|
|
1349
|
-
function
|
|
1455
|
+
function Lr(e) {
|
|
1350
1456
|
let t = e.context.triggerElements.size;
|
|
1351
1457
|
e.select("open") && e.state.triggerCount !== t && e.set("triggerCount", t);
|
|
1352
1458
|
}
|
|
1353
|
-
function
|
|
1459
|
+
function Rr(e, t) {
|
|
1354
1460
|
let n = B.useRef(null);
|
|
1355
1461
|
return x((r) => {
|
|
1356
1462
|
let i = n.current;
|
|
@@ -1358,16 +1464,16 @@ function Fr(e, t) {
|
|
|
1358
1464
|
if (i.element === r && i.store === t && i.id === e) return;
|
|
1359
1465
|
n.current = null;
|
|
1360
1466
|
let a = i.store;
|
|
1361
|
-
a.context.triggerElements.getById(i.id) === i.element && (a.context.triggerElements.delete(i.id),
|
|
1467
|
+
a.context.triggerElements.getById(i.id) === i.element && (a.context.triggerElements.delete(i.id), Lr(a));
|
|
1362
1468
|
}
|
|
1363
1469
|
r !== null && e !== void 0 && (n.current = {
|
|
1364
1470
|
store: t,
|
|
1365
1471
|
id: e,
|
|
1366
1472
|
element: r
|
|
1367
|
-
}, t.context.triggerElements.add(e, r),
|
|
1473
|
+
}, t.context.triggerElements.add(e, r), Lr(t));
|
|
1368
1474
|
});
|
|
1369
1475
|
}
|
|
1370
|
-
function
|
|
1476
|
+
function zr(e, t, n, r = !1) {
|
|
1371
1477
|
let i = e.preventUnmountingOnClose;
|
|
1372
1478
|
t ? i = !1 : r && (i = !0);
|
|
1373
1479
|
let a = n?.id ?? null, o = e.activeTriggerId, s = e.activeTriggerElement;
|
|
@@ -1379,18 +1485,18 @@ function Ir(e, t, n, r = !1) {
|
|
|
1379
1485
|
openedWithoutTrigger: t ? n == null : e.openedWithoutTrigger
|
|
1380
1486
|
};
|
|
1381
1487
|
}
|
|
1382
|
-
function
|
|
1488
|
+
function Br(e) {
|
|
1383
1489
|
let t = !1;
|
|
1384
1490
|
return e.preventUnmountOnClose = () => {
|
|
1385
1491
|
t = !0;
|
|
1386
1492
|
}, () => t;
|
|
1387
1493
|
}
|
|
1388
|
-
function
|
|
1389
|
-
let i = n.reason, a = i ===
|
|
1494
|
+
function Vr(e, t, n, r = {}) {
|
|
1495
|
+
let i = n.reason, a = i === N, o = t && i === "trigger-focus", s = !t && (i === "trigger-press" || i === "escape-key"), c = Br(n);
|
|
1390
1496
|
if (e.context.onOpenChange?.(t, n), n.isCanceled) return;
|
|
1391
1497
|
r.onBeforeDispatch?.(), e.state.floatingRootContext.dispatchOpenChange(t, n);
|
|
1392
1498
|
let l = () => {
|
|
1393
|
-
let i =
|
|
1499
|
+
let i = zr(e.state, t, n.trigger, c()), l = {
|
|
1394
1500
|
...r.extraState,
|
|
1395
1501
|
...i
|
|
1396
1502
|
};
|
|
@@ -1398,8 +1504,8 @@ function Rr(e, t, n, r = {}) {
|
|
|
1398
1504
|
};
|
|
1399
1505
|
a ? de.flushSync(l) : l();
|
|
1400
1506
|
}
|
|
1401
|
-
function
|
|
1402
|
-
let i = n.useState("isMountedByTrigger", e), a =
|
|
1507
|
+
function Hr(e, t, n, r) {
|
|
1508
|
+
let i = n.useState("isMountedByTrigger", e), a = Rr(e, n), o = x((t) => {
|
|
1403
1509
|
let i = n.select("open"), a = n.select("activeTriggerId");
|
|
1404
1510
|
if (a === e) {
|
|
1405
1511
|
let e = {
|
|
@@ -1441,7 +1547,7 @@ function zr(e, t, n, r) {
|
|
|
1441
1547
|
isMountedByThisTrigger: i
|
|
1442
1548
|
};
|
|
1443
1549
|
}
|
|
1444
|
-
function
|
|
1550
|
+
function Ur(e, t = {}) {
|
|
1445
1551
|
let { closeOnActiveTriggerUnmount: n = !1 } = t, r = B.useRef(null), i = e.useState("open"), a = e.useState("triggerCount"), o = e.useState("activeTriggerId"), c = e.useState("activeTriggerElement");
|
|
1446
1552
|
s(() => {
|
|
1447
1553
|
if (!i) {
|
|
@@ -1471,7 +1577,7 @@ function Br(e, t = {}) {
|
|
|
1471
1577
|
}
|
|
1472
1578
|
(a.triggerCount !== void 0 || a.activeTriggerId !== void 0 || a.activeTriggerElement !== void 0) && e.update(a), s && n && queueMicrotask(() => {
|
|
1473
1579
|
if (e.select("open") && e.select("activeTriggerId") === s && !e.context.triggerElements.getById(s)) {
|
|
1474
|
-
let t =
|
|
1580
|
+
let t = I(ee);
|
|
1475
1581
|
e.setOpen(!1, t), t.isCanceled || e.update({
|
|
1476
1582
|
activeTriggerId: null,
|
|
1477
1583
|
activeTriggerElement: null
|
|
@@ -1487,8 +1593,8 @@ function Br(e, t = {}) {
|
|
|
1487
1593
|
n
|
|
1488
1594
|
]);
|
|
1489
1595
|
}
|
|
1490
|
-
function
|
|
1491
|
-
let { mounted: i, transitionStatus: a, forceUnmount: o } =
|
|
1596
|
+
function Wr(e, t, n, r) {
|
|
1597
|
+
let { mounted: i, transitionStatus: a, forceUnmount: o } = Mr({
|
|
1492
1598
|
open: e,
|
|
1493
1599
|
ref: t.context.popupRef,
|
|
1494
1600
|
preventUnmountOnClose: t.useState("preventUnmountingOnClose"),
|
|
@@ -1511,7 +1617,7 @@ function Vr(e, t, n, r) {
|
|
|
1511
1617
|
transitionStatus: a
|
|
1512
1618
|
};
|
|
1513
1619
|
}
|
|
1514
|
-
function
|
|
1620
|
+
function Gr(e, t) {
|
|
1515
1621
|
e.useSyncedValues(t), s(() => () => {
|
|
1516
1622
|
e.update({
|
|
1517
1623
|
activeTriggerProps: O,
|
|
@@ -1520,24 +1626,24 @@ function Hr(e, t) {
|
|
|
1520
1626
|
});
|
|
1521
1627
|
}, [e]);
|
|
1522
1628
|
}
|
|
1523
|
-
function
|
|
1629
|
+
function Kr(e, t) {
|
|
1524
1630
|
s(() => {
|
|
1525
1631
|
!t && e.state.openMethod !== null && e.set("openMethod", null);
|
|
1526
1632
|
}, [t, e]), s(() => () => {
|
|
1527
1633
|
e.state.openMethod !== null && e.set("openMethod", null);
|
|
1528
1634
|
}, [e]);
|
|
1529
1635
|
}
|
|
1530
|
-
var
|
|
1531
|
-
function
|
|
1532
|
-
|
|
1533
|
-
let t =
|
|
1534
|
-
return t || (t = /* @__PURE__ */ new WeakMap(),
|
|
1636
|
+
var qr;
|
|
1637
|
+
function Jr(e) {
|
|
1638
|
+
qr ??= /* @__PURE__ */ new WeakMap();
|
|
1639
|
+
let t = qr.get(e);
|
|
1640
|
+
return t || (t = /* @__PURE__ */ new WeakMap(), qr.set(e, t)), t;
|
|
1535
1641
|
}
|
|
1536
|
-
var
|
|
1642
|
+
var Yr = class {
|
|
1537
1643
|
idMap = /* @__PURE__ */ new Map();
|
|
1538
1644
|
add(e, t) {
|
|
1539
1645
|
if (process.env.NODE_ENV !== "production") {
|
|
1540
|
-
let n =
|
|
1646
|
+
let n = Jr(this), r = n.get(t);
|
|
1541
1647
|
if (r !== void 0 && r !== e) throw Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.");
|
|
1542
1648
|
let i = this.idMap.get(e);
|
|
1543
1649
|
i !== void 0 && i !== t && n.delete(i), n.set(t, e);
|
|
@@ -1547,7 +1653,7 @@ var Kr = class {
|
|
|
1547
1653
|
delete(e) {
|
|
1548
1654
|
if (process.env.NODE_ENV !== "production") {
|
|
1549
1655
|
let t = this.idMap.get(e);
|
|
1550
|
-
t !== void 0 &&
|
|
1656
|
+
t !== void 0 && qr?.get(this)?.delete(t);
|
|
1551
1657
|
}
|
|
1552
1658
|
this.idMap.delete(e);
|
|
1553
1659
|
}
|
|
@@ -1572,7 +1678,7 @@ var Kr = class {
|
|
|
1572
1678
|
return this.idMap.size;
|
|
1573
1679
|
}
|
|
1574
1680
|
};
|
|
1575
|
-
function
|
|
1681
|
+
function Xr(e, t, n, r, i) {
|
|
1576
1682
|
let a = ce({
|
|
1577
1683
|
hasValue: !1,
|
|
1578
1684
|
value: null
|
|
@@ -1598,11 +1704,11 @@ function qr(e, t, n, r, i) {
|
|
|
1598
1704
|
a.current.hasValue = !0, a.current.value = c;
|
|
1599
1705
|
}, [c]), V(c), c;
|
|
1600
1706
|
}
|
|
1601
|
-
var
|
|
1602
|
-
function
|
|
1603
|
-
return
|
|
1707
|
+
var Zr = S(19) ? ei : ti;
|
|
1708
|
+
function Qr(e, t, n, r, i) {
|
|
1709
|
+
return Zr(e, t, n, r, i);
|
|
1604
1710
|
}
|
|
1605
|
-
function
|
|
1711
|
+
function $r(e, t, n, r, i) {
|
|
1606
1712
|
let a = B.useCallback(() => t(e.getSnapshot(), n, r, i), [
|
|
1607
1713
|
e,
|
|
1608
1714
|
t,
|
|
@@ -1635,9 +1741,9 @@ he({
|
|
|
1635
1741
|
}), U(e.subscribe, e.getSnapshot, e.getSnapshot));
|
|
1636
1742
|
}
|
|
1637
1743
|
});
|
|
1638
|
-
function
|
|
1744
|
+
function ei(e, t, n, r, i) {
|
|
1639
1745
|
let a = me();
|
|
1640
|
-
if (!a) return
|
|
1746
|
+
if (!a) return $r(e, t, n, r, i);
|
|
1641
1747
|
let o = a.syncIndex;
|
|
1642
1748
|
a.syncIndex += 1;
|
|
1643
1749
|
let s;
|
|
@@ -1650,10 +1756,10 @@ function Zr(e, t, n, r, i) {
|
|
|
1650
1756
|
value: t(e.getSnapshot(), n, r, i)
|
|
1651
1757
|
}, a.syncHooks.push(s)), s.value;
|
|
1652
1758
|
}
|
|
1653
|
-
function
|
|
1654
|
-
return
|
|
1759
|
+
function ti(e, t, n, r, i) {
|
|
1760
|
+
return Xr(e.subscribe, e.getSnapshot, e.getSnapshot, (e) => t(e, n, r, i));
|
|
1655
1761
|
}
|
|
1656
|
-
var
|
|
1762
|
+
var ni = class {
|
|
1657
1763
|
static create(e) {
|
|
1658
1764
|
return new this(e);
|
|
1659
1765
|
}
|
|
@@ -1693,9 +1799,9 @@ var $r = class {
|
|
|
1693
1799
|
this.setState(e);
|
|
1694
1800
|
}
|
|
1695
1801
|
use(e, t, n, r) {
|
|
1696
|
-
return
|
|
1802
|
+
return Qr(this, e, t, n, r);
|
|
1697
1803
|
}
|
|
1698
|
-
},
|
|
1804
|
+
}, ri = class extends ni {
|
|
1699
1805
|
constructor(e, t = {}, n) {
|
|
1700
1806
|
super(e), this.context = t, this.selectors = n;
|
|
1701
1807
|
}
|
|
@@ -1757,7 +1863,7 @@ var $r = class {
|
|
|
1757
1863
|
return i(this.state, t, n, r);
|
|
1758
1864
|
}
|
|
1759
1865
|
useState(e, t, n, r) {
|
|
1760
|
-
return B.useDebugValue(e),
|
|
1866
|
+
return B.useDebugValue(e), Qr(this, this.selectors[e], t, n, r);
|
|
1761
1867
|
}
|
|
1762
1868
|
useContextCallback(e, n) {
|
|
1763
1869
|
B.useDebugValue(e);
|
|
@@ -1782,14 +1888,14 @@ var $r = class {
|
|
|
1782
1888
|
}
|
|
1783
1889
|
});
|
|
1784
1890
|
}
|
|
1785
|
-
},
|
|
1891
|
+
}, ii = {
|
|
1786
1892
|
open: (e) => e.open,
|
|
1787
1893
|
transitionStatus: (e) => e.transitionStatus,
|
|
1788
1894
|
domReferenceElement: (e) => e.domReferenceElement,
|
|
1789
1895
|
referenceElement: (e) => e.positionReference ?? e.referenceElement,
|
|
1790
1896
|
floatingElement: (e) => e.floatingElement,
|
|
1791
1897
|
floatingId: (e) => e.floatingId
|
|
1792
|
-
},
|
|
1898
|
+
}, ai = class extends ri {
|
|
1793
1899
|
constructor(e) {
|
|
1794
1900
|
let { syncOnly: t, nested: n, onOpenChange: r, triggerElements: i, ...a } = e;
|
|
1795
1901
|
super({
|
|
@@ -1799,13 +1905,13 @@ var $r = class {
|
|
|
1799
1905
|
}, {
|
|
1800
1906
|
onOpenChange: r,
|
|
1801
1907
|
dataRef: { current: {} },
|
|
1802
|
-
events:
|
|
1908
|
+
events: lr(),
|
|
1803
1909
|
nested: n,
|
|
1804
1910
|
triggerElements: i
|
|
1805
|
-
},
|
|
1911
|
+
}, ii), this.syncOnly = t;
|
|
1806
1912
|
}
|
|
1807
1913
|
syncOpenEvent = (e, t) => {
|
|
1808
|
-
(!e || !this.state.open || t != null &&
|
|
1914
|
+
(!e || !this.state.open || t != null && Be(t)) && (this.context.dataRef.current.openEvent = e ? t : void 0);
|
|
1809
1915
|
};
|
|
1810
1916
|
dispatchOpenChange = (e, t) => {
|
|
1811
1917
|
this.syncOpenEvent(e, t.event);
|
|
@@ -1822,13 +1928,13 @@ var $r = class {
|
|
|
1822
1928
|
this.syncOnly || this.dispatchOpenChange(e, t), this.context.onOpenChange?.(e, t);
|
|
1823
1929
|
};
|
|
1824
1930
|
};
|
|
1825
|
-
function
|
|
1931
|
+
function oi(e, t, n = !1) {
|
|
1826
1932
|
return {
|
|
1827
1933
|
open: !1,
|
|
1828
1934
|
openProp: void 0,
|
|
1829
1935
|
mounted: !1,
|
|
1830
1936
|
transitionStatus: void 0,
|
|
1831
|
-
floatingRootContext: new
|
|
1937
|
+
floatingRootContext: new ai({
|
|
1832
1938
|
open: !1,
|
|
1833
1939
|
transitionStatus: void 0,
|
|
1834
1940
|
floatingElement: null,
|
|
@@ -1854,47 +1960,47 @@ function ri(e, t, n = !1) {
|
|
|
1854
1960
|
popupProps: O
|
|
1855
1961
|
};
|
|
1856
1962
|
}
|
|
1857
|
-
var
|
|
1858
|
-
function
|
|
1859
|
-
return t !== void 0 &&
|
|
1963
|
+
var si = (e) => e.triggerIdProp ?? e.activeTriggerId, ci = (e) => e.openProp ?? e.open, li = (e) => (e.popupElement?.id ?? e.floatingId) || void 0;
|
|
1964
|
+
function ui(e, t) {
|
|
1965
|
+
return t !== void 0 && ci(e) && si(e) === t;
|
|
1860
1966
|
}
|
|
1861
|
-
function
|
|
1862
|
-
return
|
|
1967
|
+
function di(e, t) {
|
|
1968
|
+
return ui(e, t) ? !0 : t !== void 0 && ci(e) && si(e) == null && !e.openedWithoutTrigger && e.triggerCount === 1;
|
|
1863
1969
|
}
|
|
1864
|
-
var
|
|
1865
|
-
open:
|
|
1970
|
+
var fi = {
|
|
1971
|
+
open: ci,
|
|
1866
1972
|
mounted: (e) => e.mounted,
|
|
1867
|
-
transitionStatus: (e) =>
|
|
1973
|
+
transitionStatus: (e) => ci(e) && !e.mounted ? "starting" : e.transitionStatus,
|
|
1868
1974
|
floatingRootContext: (e) => e.floatingRootContext,
|
|
1869
1975
|
triggerCount: (e) => e.triggerCount,
|
|
1870
1976
|
preventUnmountingOnClose: (e) => e.preventUnmountingOnClose,
|
|
1871
1977
|
payload: (e) => e.payload,
|
|
1872
|
-
activeTriggerId:
|
|
1978
|
+
activeTriggerId: si,
|
|
1873
1979
|
activeTriggerElement: (e) => e.mounted ? e.activeTriggerElement : null,
|
|
1874
|
-
popupId:
|
|
1875
|
-
isTriggerActive: (e, t) => t !== void 0 &&
|
|
1876
|
-
isOpenedByTrigger: (e, t) =>
|
|
1877
|
-
isMountedByTrigger: (e, t) => t !== void 0 &&
|
|
1980
|
+
popupId: li,
|
|
1981
|
+
isTriggerActive: (e, t) => t !== void 0 && si(e) === t,
|
|
1982
|
+
isOpenedByTrigger: (e, t) => ui(e, t),
|
|
1983
|
+
isMountedByTrigger: (e, t) => t !== void 0 && si(e) === t && e.mounted,
|
|
1878
1984
|
triggerProps: (e, t) => t ? e.activeTriggerProps : e.inactiveTriggerProps,
|
|
1879
|
-
triggerPopupId: (e, t) =>
|
|
1985
|
+
triggerPopupId: (e, t) => di(e, t) ? li(e) : void 0,
|
|
1880
1986
|
popupProps: (e) => e.popupProps,
|
|
1881
1987
|
popupElement: (e) => e.popupElement,
|
|
1882
1988
|
positionerElement: (e) => e.positionerElement
|
|
1883
1989
|
};
|
|
1884
|
-
function
|
|
1990
|
+
function pi(e) {
|
|
1885
1991
|
let n = B.useCallback((n) => e === void 0 ? t : e.subscribeStore(n), [e]), r = B.useCallback(() => e === void 0 ? void 0 : e.store, [e]);
|
|
1886
1992
|
return U(n, r, () => e?.serverStore);
|
|
1887
1993
|
}
|
|
1888
|
-
var
|
|
1889
|
-
function
|
|
1890
|
-
let { enabled: n = !0, delay: i } = t, { events: a, dataRef: o } = e.context, s = B.useRef(!1), c = B.useRef(null), l = B.useRef(!0), d =
|
|
1994
|
+
var mi = ke && je;
|
|
1995
|
+
function hi(e, t = {}) {
|
|
1996
|
+
let { enabled: n = !0, delay: i } = t, { events: a, dataRef: o } = e.context, s = B.useRef(!1), c = B.useRef(null), l = B.useRef(!0), d = P();
|
|
1891
1997
|
B.useEffect(() => {
|
|
1892
1998
|
let t = e.select("domReferenceElement");
|
|
1893
1999
|
if (!n) return;
|
|
1894
2000
|
let r = p(t);
|
|
1895
2001
|
function i() {
|
|
1896
2002
|
let t = e.select("domReferenceElement");
|
|
1897
|
-
!e.select("open") && u(t) && t ===
|
|
2003
|
+
!e.select("open") && u(t) && t === Ve(Y(t)) && (s.current = !0, c.current = t);
|
|
1898
2004
|
}
|
|
1899
2005
|
function a() {
|
|
1900
2006
|
l.current = !0;
|
|
@@ -1902,7 +2008,7 @@ function fi(e, t = {}) {
|
|
|
1902
2008
|
function o() {
|
|
1903
2009
|
l.current = !1;
|
|
1904
2010
|
}
|
|
1905
|
-
return
|
|
2011
|
+
return Ft(q(r, "blur", i), mi && q(r, "keydown", a, !0), mi && q(r, "pointerdown", o, !0));
|
|
1906
2012
|
}, [e, n]), B.useEffect(() => {
|
|
1907
2013
|
if (!n) return;
|
|
1908
2014
|
function t(t) {
|
|
@@ -1933,23 +2039,23 @@ function fi(e, t = {}) {
|
|
|
1933
2039
|
if (c.current === a) return;
|
|
1934
2040
|
t();
|
|
1935
2041
|
}
|
|
1936
|
-
let o =
|
|
2042
|
+
let o = Ue(n.nativeEvent);
|
|
1937
2043
|
if (r(o)) {
|
|
1938
|
-
if (
|
|
1939
|
-
if (!l.current && !
|
|
1940
|
-
} else if (!
|
|
2044
|
+
if (mi && !n.relatedTarget) {
|
|
2045
|
+
if (!l.current && !xt(o)) return;
|
|
2046
|
+
} else if (!wt(o)) return;
|
|
1941
2047
|
}
|
|
1942
|
-
let u =
|
|
1943
|
-
e.select("open") && u || !i ? e.setOpen(!0,
|
|
1944
|
-
s.current || e.setOpen(!0,
|
|
2048
|
+
let u = vt(n.relatedTarget, e.context.triggerElements), { nativeEvent: f, currentTarget: p } = n;
|
|
2049
|
+
e.select("open") && u || !i ? e.setOpen(!0, I(A, f, p)) : d.start(i, () => {
|
|
2050
|
+
s.current || e.setOpen(!0, I(A, f, p));
|
|
1945
2051
|
});
|
|
1946
2052
|
},
|
|
1947
2053
|
onBlur(n) {
|
|
1948
2054
|
t();
|
|
1949
|
-
let i = n.relatedTarget, a = n.nativeEvent, s = r(i) && i.hasAttribute(
|
|
2055
|
+
let i = n.relatedTarget, a = n.nativeEvent, s = r(i) && i.hasAttribute(Qn("focus-guard")) && i.getAttribute("data-type") === "outside";
|
|
1950
2056
|
d.start(0, () => {
|
|
1951
|
-
let t = e.select("domReferenceElement"), n =
|
|
1952
|
-
(i || n !== t) && (K(o.current.floatingContext?.refs.floating.current, n) || K(t, n) || s ||
|
|
2057
|
+
let t = e.select("domReferenceElement"), n = Ve(Y(t));
|
|
2058
|
+
(i || n !== t) && (K(o.current.floatingContext?.refs.floating.current, n) || K(t, n) || s || vt(i ?? n, e.context.triggerElements) || e.setOpen(!1, I(A, a)));
|
|
1953
2059
|
});
|
|
1954
2060
|
}
|
|
1955
2061
|
};
|
|
@@ -1964,7 +2070,7 @@ function fi(e, t = {}) {
|
|
|
1964
2070
|
trigger: f
|
|
1965
2071
|
} : {}, [n, f]);
|
|
1966
2072
|
}
|
|
1967
|
-
var
|
|
2073
|
+
var gi = class e {
|
|
1968
2074
|
pointerType = void 0;
|
|
1969
2075
|
interactedInside = !1;
|
|
1970
2076
|
handler = void 0;
|
|
@@ -1974,8 +2080,8 @@ var pi = class e {
|
|
|
1974
2080
|
pointerEventsReferenceElement = null;
|
|
1975
2081
|
pointerEventsFloatingElement = null;
|
|
1976
2082
|
restTimeoutPending = !1;
|
|
1977
|
-
openChangeTimeout = new
|
|
1978
|
-
restTimeout = new
|
|
2083
|
+
openChangeTimeout = new M();
|
|
2084
|
+
restTimeout = new M();
|
|
1979
2085
|
handleCloseOptions = void 0;
|
|
1980
2086
|
static create() {
|
|
1981
2087
|
return new e();
|
|
@@ -1984,23 +2090,23 @@ var pi = class e {
|
|
|
1984
2090
|
this.openChangeTimeout.clear(), this.restTimeout.clear();
|
|
1985
2091
|
};
|
|
1986
2092
|
disposeEffect = () => this.dispose;
|
|
1987
|
-
},
|
|
1988
|
-
function
|
|
2093
|
+
}, _i = /* @__PURE__ */ new WeakMap();
|
|
2094
|
+
function vi(e) {
|
|
1989
2095
|
if (!e.performedPointerEventsMutation) return;
|
|
1990
2096
|
let t = e.pointerEventsScopeElement;
|
|
1991
|
-
t &&
|
|
2097
|
+
t && _i.get(t) === e && (e.pointerEventsScopeElement?.style.removeProperty("pointer-events"), e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"), e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"), _i.delete(t)), e.performedPointerEventsMutation = !1, e.pointerEventsScopeElement = null, e.pointerEventsReferenceElement = null, e.pointerEventsFloatingElement = null;
|
|
1992
2098
|
}
|
|
1993
|
-
function
|
|
1994
|
-
let { scopeElement: n, referenceElement: r, floatingElement: i } = t, a =
|
|
1995
|
-
a && a !== e &&
|
|
2099
|
+
function yi(e, t) {
|
|
2100
|
+
let { scopeElement: n, referenceElement: r, floatingElement: i } = t, a = _i.get(n);
|
|
2101
|
+
a && a !== e && vi(a), vi(e), e.performedPointerEventsMutation = !0, e.pointerEventsScopeElement = n, e.pointerEventsReferenceElement = r, e.pointerEventsFloatingElement = i, _i.set(n, e), n.style.pointerEvents = "none", r.style.pointerEvents = "auto", i.style.pointerEvents = "auto";
|
|
1996
2102
|
}
|
|
1997
|
-
function
|
|
1998
|
-
let t = e.context.dataRef.current, n = m(() => t.hoverInteractionState ??
|
|
1999
|
-
return t.hoverInteractionState ||= n,
|
|
2103
|
+
function bi(e) {
|
|
2104
|
+
let t = e.context.dataRef.current, n = m(() => t.hoverInteractionState ?? gi.create()).current;
|
|
2105
|
+
return t.hoverInteractionState ||= n, j(t.hoverInteractionState.disposeEffect), t.hoverInteractionState;
|
|
2000
2106
|
}
|
|
2001
|
-
function
|
|
2002
|
-
let { enabled: n = !0, closeDelay: i = 0, nodeId: a } = t, o = e.useState("open"), c = e.useState("floatingElement"), l = e.useState("domReferenceElement"), { dataRef: u } = e.context, d =
|
|
2003
|
-
|
|
2107
|
+
function xi(e, t = {}) {
|
|
2108
|
+
let { enabled: n = !0, closeDelay: i = 0, nodeId: a } = t, o = e.useState("open"), c = e.useState("floatingElement"), l = e.useState("domReferenceElement"), { dataRef: u } = e.context, d = mr(), f = pr(), p = bi(e), m = P(), h = x(() => kt(u.current.openEvent?.type, p.interactedInside)), g = x(() => At(u.current.openEvent?.type)), _ = x(() => {
|
|
2109
|
+
vi(p);
|
|
2004
2110
|
});
|
|
2005
2111
|
s(() => {
|
|
2006
2112
|
o || (p.pointerType = void 0, p.restTimeoutPending = !1, p.interactedInside = !1, _());
|
|
@@ -2012,8 +2118,8 @@ function vi(e, t = {}) {
|
|
|
2012
2118
|
if (n && o && p.handleCloseOptions?.blockPointerEvents && g() && r(l) && c) {
|
|
2013
2119
|
let e = l, t = c, n = Y(c), r = d?.nodesRef.current.find((e) => e.id === f)?.context?.elements.floating;
|
|
2014
2120
|
r && (r.style.pointerEvents = "");
|
|
2015
|
-
let i = p.pointerEventsScopeElement === t ? null : p.pointerEventsScopeElement, a = r === t ? null : r, o = p.handleCloseOptions?.getScope?.() ?? i ?? a ??
|
|
2016
|
-
return
|
|
2121
|
+
let i = p.pointerEventsScopeElement === t ? null : p.pointerEventsScopeElement, a = r === t ? null : r, o = p.handleCloseOptions?.getScope?.() ?? i ?? a ?? He(e, "[data-rootownerid]") ?? n.body;
|
|
2122
|
+
return yi(p, {
|
|
2017
2123
|
scopeElement: o,
|
|
2018
2124
|
referenceElement: e,
|
|
2019
2125
|
floatingElement: t
|
|
@@ -2034,17 +2140,17 @@ function vi(e, t = {}) {
|
|
|
2034
2140
|
]), B.useEffect(() => {
|
|
2035
2141
|
if (!n) return;
|
|
2036
2142
|
function t() {
|
|
2037
|
-
return !!(d && f &&
|
|
2143
|
+
return !!(d && f && Xn(d.nodesRef.current, f).length > 0);
|
|
2038
2144
|
}
|
|
2039
2145
|
function o(t) {
|
|
2040
|
-
let n =
|
|
2041
|
-
e.setOpen(!1,
|
|
2146
|
+
let n = Dt(i, "close", p.pointerType), r = () => {
|
|
2147
|
+
e.setOpen(!1, I(N, t)), d?.events.emit("floating.closed", t);
|
|
2042
2148
|
};
|
|
2043
2149
|
n ? p.openChangeTimeout.start(n, r) : (p.openChangeTimeout.clear(), r());
|
|
2044
2150
|
}
|
|
2045
2151
|
function s(e) {
|
|
2046
|
-
let t =
|
|
2047
|
-
|
|
2152
|
+
let t = Ue(e);
|
|
2153
|
+
St(t) ? p.interactedInside = He(t, "[aria-haspopup]") != null : p.interactedInside = !1;
|
|
2048
2154
|
}
|
|
2049
2155
|
function l() {
|
|
2050
2156
|
p.openChangeTimeout.clear(), m.clear(), d?.events.off("floating.closed", y), _();
|
|
@@ -2054,17 +2160,17 @@ function vi(e, t = {}) {
|
|
|
2054
2160
|
d.events.on("floating.closed", y);
|
|
2055
2161
|
return;
|
|
2056
2162
|
}
|
|
2057
|
-
if (
|
|
2163
|
+
if (vt(n.relatedTarget, e.context.triggerElements)) return;
|
|
2058
2164
|
let i = u.current.floatingContext?.nodeId ?? a, s = n.relatedTarget;
|
|
2059
|
-
d && i && r(s) &&
|
|
2165
|
+
d && i && r(s) && Xn(d.nodesRef.current, i, !1).some((e) => K(e.context?.elements.floating, s)) || (p.handler ? p.handler(n) : (_(), g() && !h() && o(n)));
|
|
2060
2166
|
}
|
|
2061
2167
|
function y(n) {
|
|
2062
2168
|
d && f && !t() && m.start(0, () => {
|
|
2063
|
-
d.events.off("floating.closed", y), e.setOpen(!1,
|
|
2169
|
+
d.events.off("floating.closed", y), e.setOpen(!1, I(N, n)), d.events.emit("floating.closed", n);
|
|
2064
2170
|
});
|
|
2065
2171
|
}
|
|
2066
2172
|
let b = c;
|
|
2067
|
-
return
|
|
2173
|
+
return Ft(b && q(b, "mouseenter", l), b && q(b, "mouseleave", v), b && q(b, "pointerdown", s, !0), () => {
|
|
2068
2174
|
d?.events.off("floating.closed", y);
|
|
2069
2175
|
});
|
|
2070
2176
|
}, [
|
|
@@ -2083,23 +2189,23 @@ function vi(e, t = {}) {
|
|
|
2083
2189
|
m
|
|
2084
2190
|
]);
|
|
2085
2191
|
}
|
|
2086
|
-
var
|
|
2087
|
-
function
|
|
2088
|
-
let { enabled: n = !0, delay: i = 0, handleClose: a = null, mouseOnly: o = !1, restMs: s = 0, move: c = !0, triggerElementRef: l =
|
|
2192
|
+
var Si = { current: null };
|
|
2193
|
+
function Ci(e, t = {}) {
|
|
2194
|
+
let { enabled: n = !0, delay: i = 0, handleClose: a = null, mouseOnly: o = !1, restMs: s = 0, move: c = !0, triggerElementRef: l = Si, externalTree: u, isActiveTrigger: d = !0, getHandleCloseContext: f, isClosing: p, shouldOpen: m, guardStaleOpen: h = !1 } = t, { dataRef: g, events: _ } = e.context, v = mr(u), y = bi(e), b = B.useRef(!1), S = J(a), C = J(i), w = J(s), T = J(n), E = J(m), D = J(p), O = x(() => kt(g.current.openEvent?.type, y.interactedInside)), k = x(() => E.current?.() !== !1), A = x((t, n, i) => {
|
|
2089
2195
|
let a = e.context.triggerElements;
|
|
2090
2196
|
if (a.hasElement(n)) return !t || !K(t, n);
|
|
2091
2197
|
if (!r(i)) return !1;
|
|
2092
2198
|
let o = i;
|
|
2093
2199
|
return a.hasMatchingElement((e) => K(e, o)) && (!t || !K(t, o));
|
|
2094
|
-
}),
|
|
2200
|
+
}), j = x(() => {
|
|
2095
2201
|
y.handler &&= (Y(e.select("domReferenceElement")).removeEventListener("mousemove", y.handler), void 0);
|
|
2096
|
-
}),
|
|
2097
|
-
|
|
2202
|
+
}), M = x(() => {
|
|
2203
|
+
vi(y);
|
|
2098
2204
|
});
|
|
2099
|
-
return d && (y.handleCloseOptions = a?.__options), B.useEffect(() =>
|
|
2205
|
+
return d && (y.handleCloseOptions = a?.__options), B.useEffect(() => j, [j]), B.useEffect(() => {
|
|
2100
2206
|
if (!n) return;
|
|
2101
2207
|
function e(e) {
|
|
2102
|
-
e.open ? b.current = !1 : (b.current = e.reason ===
|
|
2208
|
+
e.open ? b.current = !1 : (b.current = e.reason === N, j(), y.openChangeTimeout.clear(), y.restTimeout.clear(), y.blockMouseMove = !0, y.restTimeoutPending = !1);
|
|
2103
2209
|
}
|
|
2104
2210
|
return _.on("openchange", e), () => {
|
|
2105
2211
|
_.off("openchange", e);
|
|
@@ -2108,20 +2214,20 @@ function bi(e, t = {}) {
|
|
|
2108
2214
|
n,
|
|
2109
2215
|
_,
|
|
2110
2216
|
y,
|
|
2111
|
-
|
|
2217
|
+
j
|
|
2112
2218
|
]), B.useEffect(() => {
|
|
2113
2219
|
if (!n) return;
|
|
2114
2220
|
function t(t, n = !0) {
|
|
2115
|
-
let r =
|
|
2221
|
+
let r = Dt(C.current, "close", y.pointerType);
|
|
2116
2222
|
r ? y.openChangeTimeout.start(r, () => {
|
|
2117
|
-
e.setOpen(!1,
|
|
2118
|
-
}) : n && (y.openChangeTimeout.clear(), e.setOpen(!1,
|
|
2223
|
+
e.setOpen(!1, I(N, t)), v?.events.emit("floating.closed", t);
|
|
2224
|
+
}) : n && (y.openChangeTimeout.clear(), e.setOpen(!1, I(N, t)), v?.events.emit("floating.closed", t));
|
|
2119
2225
|
}
|
|
2120
2226
|
let i = l.current ?? (d ? e.select("domReferenceElement") : null);
|
|
2121
2227
|
if (!r(i)) return;
|
|
2122
2228
|
function a(t) {
|
|
2123
|
-
if (y.openChangeTimeout.clear(), y.blockMouseMove = !1, o && !
|
|
2124
|
-
let n =
|
|
2229
|
+
if (y.openChangeTimeout.clear(), y.blockMouseMove = !1, o && !ze(y.pointerType)) return;
|
|
2230
|
+
let n = Ot(w.current), i = Dt(C.current, "open", y.pointerType), a = Ue(t), s = t.currentTarget ?? null, c = e.select("domReferenceElement"), l = s;
|
|
2125
2231
|
if (r(a) && !e.context.triggerElements.hasElement(a)) {
|
|
2126
2232
|
for (let t of e.context.triggerElements.elements()) if (K(t, a)) {
|
|
2127
2233
|
l = t;
|
|
@@ -2130,20 +2236,20 @@ function bi(e, t = {}) {
|
|
|
2130
2236
|
}
|
|
2131
2237
|
r(s) && r(c) && !e.context.triggerElements.hasElement(s) && K(s, c) && (l = c);
|
|
2132
2238
|
let u = l != null && A(c, l, a), d = e.select("open"), f = D.current?.() ?? e.select("transitionStatus") === "ending", p = !d && f && b.current, m = !u && r(l) && r(c) && K(c, l) && p, h = n > 0 && !i, g = u && (d || p) || m, _ = !d || u;
|
|
2133
|
-
g ? k() && e.setOpen(!0,
|
|
2134
|
-
_ && k() && e.setOpen(!0,
|
|
2135
|
-
}) : _ && k() && e.setOpen(!0,
|
|
2239
|
+
g ? k() && e.setOpen(!0, I(N, t, l)) : h || (i ? y.openChangeTimeout.start(i, () => {
|
|
2240
|
+
_ && k() && e.setOpen(!0, I(N, t, l));
|
|
2241
|
+
}) : _ && k() && e.setOpen(!0, I(N, t, l)));
|
|
2136
2242
|
}
|
|
2137
2243
|
function s(n) {
|
|
2138
2244
|
if (O()) {
|
|
2139
|
-
|
|
2245
|
+
M();
|
|
2140
2246
|
return;
|
|
2141
2247
|
}
|
|
2142
|
-
|
|
2248
|
+
j();
|
|
2143
2249
|
let r = Y(e.select("domReferenceElement"));
|
|
2144
2250
|
y.restTimeout.clear(), y.restTimeoutPending = !1;
|
|
2145
2251
|
let i = g.current.floatingContext ?? f?.();
|
|
2146
|
-
if (!
|
|
2252
|
+
if (!vt(n.relatedTarget, e.context.triggerElements)) {
|
|
2147
2253
|
if (S.current && i) {
|
|
2148
2254
|
e.select("open") || y.openChangeTimeout.clear();
|
|
2149
2255
|
let a = l.current;
|
|
@@ -2153,7 +2259,7 @@ function bi(e, t = {}) {
|
|
|
2153
2259
|
x: n.clientX,
|
|
2154
2260
|
y: n.clientY,
|
|
2155
2261
|
onClose() {
|
|
2156
|
-
|
|
2262
|
+
M(), j(), T.current && !O() && a === e.select("domReferenceElement") && t(n, !0);
|
|
2157
2263
|
}
|
|
2158
2264
|
}), r.addEventListener("mousemove", y.handler), y.handler(n);
|
|
2159
2265
|
} else (y.pointerType !== "touch" || !K(e.select("floatingElement"), n.relatedTarget)) && t(n);
|
|
@@ -2163,10 +2269,10 @@ function bi(e, t = {}) {
|
|
|
2163
2269
|
K(i, e.relatedTarget) || (y.openChangeTimeout.clear(), y.restTimeout.clear(), y.restTimeoutPending = !1);
|
|
2164
2270
|
}
|
|
2165
2271
|
let p = h ? q(i, "mouseout", u) : void 0;
|
|
2166
|
-
return c ?
|
|
2272
|
+
return c ? Ft(q(i, "mousemove", a, { once: !0 }), q(i, "mouseenter", a), q(i, "mouseleave", s), p) : Ft(q(i, "mouseenter", a), q(i, "mouseleave", s), p);
|
|
2167
2273
|
}, [
|
|
2274
|
+
j,
|
|
2168
2275
|
M,
|
|
2169
|
-
N,
|
|
2170
2276
|
g,
|
|
2171
2277
|
C,
|
|
2172
2278
|
e,
|
|
@@ -2196,25 +2302,25 @@ function bi(e, t = {}) {
|
|
|
2196
2302
|
onPointerEnter: t,
|
|
2197
2303
|
onMouseMove(t) {
|
|
2198
2304
|
let { nativeEvent: n } = t, r = t.currentTarget, i = e.select("domReferenceElement"), a = e.select("open"), s = A(i, r, t.target);
|
|
2199
|
-
if (o && !
|
|
2305
|
+
if (o && !ze(y.pointerType)) return;
|
|
2200
2306
|
if (a && s && y.handleCloseOptions?.blockPointerEvents) {
|
|
2201
2307
|
let t = e.select("floatingElement");
|
|
2202
2308
|
if (t) {
|
|
2203
2309
|
let e = y.handleCloseOptions?.getScope?.() ?? r.ownerDocument.body;
|
|
2204
|
-
|
|
2310
|
+
yi(y, {
|
|
2205
2311
|
scopeElement: e,
|
|
2206
2312
|
referenceElement: r,
|
|
2207
2313
|
floatingElement: t
|
|
2208
2314
|
});
|
|
2209
2315
|
}
|
|
2210
2316
|
}
|
|
2211
|
-
let c =
|
|
2317
|
+
let c = Ot(w.current);
|
|
2212
2318
|
if (a && !s || c === 0 || !s && y.restTimeoutPending && t.movementX ** 2 + t.movementY ** 2 < 2) return;
|
|
2213
2319
|
y.restTimeout.clear();
|
|
2214
2320
|
function l() {
|
|
2215
2321
|
if (y.restTimeoutPending = !1, O()) return;
|
|
2216
2322
|
let t = e.select("open");
|
|
2217
|
-
!y.blockMouseMove && (!t || s) && k() && e.setOpen(!0,
|
|
2323
|
+
!y.blockMouseMove && (!t || s) && k() && e.setOpen(!0, I(N, n, r));
|
|
2218
2324
|
}
|
|
2219
2325
|
y.pointerType === "touch" ? de.flushSync(() => {
|
|
2220
2326
|
l();
|
|
@@ -2232,27 +2338,27 @@ function bi(e, t = {}) {
|
|
|
2232
2338
|
k
|
|
2233
2339
|
]);
|
|
2234
2340
|
}
|
|
2235
|
-
var
|
|
2236
|
-
function
|
|
2341
|
+
var wi = .1, Ti = wi * wi, $ = .5;
|
|
2342
|
+
function Ei(e, t, n, r, i, a) {
|
|
2237
2343
|
return r >= t != a >= t && e <= (i - n) * (t - r) / (a - r) + n;
|
|
2238
2344
|
}
|
|
2239
|
-
function
|
|
2345
|
+
function Di(e, t, n, r, i, a, o, s, c, l) {
|
|
2240
2346
|
let u = !1;
|
|
2241
|
-
return
|
|
2347
|
+
return Ei(e, t, n, r, i, a) && (u = !u), Ei(e, t, i, a, o, s) && (u = !u), Ei(e, t, o, s, c, l) && (u = !u), Ei(e, t, c, l, n, r) && (u = !u), u;
|
|
2242
2348
|
}
|
|
2243
|
-
function
|
|
2349
|
+
function Oi(e, t, n) {
|
|
2244
2350
|
return e >= n.x && e <= n.x + n.width && t >= n.y && t <= n.y + n.height;
|
|
2245
2351
|
}
|
|
2246
|
-
function
|
|
2352
|
+
function ki(e, t, n, r, i, a) {
|
|
2247
2353
|
return e >= Math.min(n, i) && e <= Math.max(n, i) && t >= Math.min(r, a) && t <= Math.max(r, a);
|
|
2248
2354
|
}
|
|
2249
|
-
function
|
|
2250
|
-
let { blockPointerEvents: t = !1 } = e, n = new
|
|
2355
|
+
function Ai(e = {}) {
|
|
2356
|
+
let { blockPointerEvents: t = !1 } = e, n = new M(), i = ({ x: e, y: t, placement: i, elements: a, onClose: o, nodeId: s, tree: c }) => {
|
|
2251
2357
|
let l = i?.split("-")[0], u = !1, d = null, f = null, p = typeof performance < "u" ? performance.now() : 0;
|
|
2252
2358
|
function m(e, t) {
|
|
2253
2359
|
let n = performance.now(), r = n - p;
|
|
2254
2360
|
if (d === null || f === null || r === 0) return d = e, f = t, p = n, !1;
|
|
2255
|
-
let i = e - d, a = t - f, o = i * i + a * a, s = r * r *
|
|
2361
|
+
let i = e - d, a = t - f, o = i * i + a * a, s = r * r * Ti;
|
|
2256
2362
|
return d = e, f = t, p = n, o < s;
|
|
2257
2363
|
}
|
|
2258
2364
|
function h() {
|
|
@@ -2262,7 +2368,7 @@ function Di(e = {}) {
|
|
|
2262
2368
|
n.clear();
|
|
2263
2369
|
let o = a.domReference, d = a.floating;
|
|
2264
2370
|
if (!o || !d || l == null || e == null || t == null) return;
|
|
2265
|
-
let { clientX: f, clientY: p } = i, g =
|
|
2371
|
+
let { clientX: f, clientY: p } = i, g = Ue(i), _ = i.type === "mouseleave", v = K(d, g), y = K(o, g);
|
|
2266
2372
|
if (v && (u = !0, !_)) return;
|
|
2267
2373
|
if (y && (u = !1, !_)) {
|
|
2268
2374
|
u = !0;
|
|
@@ -2270,7 +2376,7 @@ function Di(e = {}) {
|
|
|
2270
2376
|
}
|
|
2271
2377
|
if (_ && r(i.relatedTarget) && K(d, i.relatedTarget)) return;
|
|
2272
2378
|
function b() {
|
|
2273
|
-
return !!(c &&
|
|
2379
|
+
return !!(c && Xn(c.nodesRef.current, s).length > 0);
|
|
2274
2380
|
}
|
|
2275
2381
|
function x() {
|
|
2276
2382
|
b() || h();
|
|
@@ -2284,18 +2390,18 @@ function Di(e = {}) {
|
|
|
2284
2390
|
let M = !1;
|
|
2285
2391
|
switch (l) {
|
|
2286
2392
|
case "top":
|
|
2287
|
-
M =
|
|
2393
|
+
M = ki(f, p, O, S.top + 1, k, C.bottom - 1);
|
|
2288
2394
|
break;
|
|
2289
2395
|
case "bottom":
|
|
2290
|
-
M =
|
|
2396
|
+
M = ki(f, p, O, C.top + 1, k, S.bottom - 1);
|
|
2291
2397
|
break;
|
|
2292
2398
|
case "left":
|
|
2293
|
-
M =
|
|
2399
|
+
M = ki(f, p, C.right - 1, j, S.left + 1, A);
|
|
2294
2400
|
break;
|
|
2295
|
-
case "right": M =
|
|
2401
|
+
case "right": M = ki(f, p, S.right - 1, j, C.left + 1, A);
|
|
2296
2402
|
}
|
|
2297
2403
|
if (M) return;
|
|
2298
|
-
if (u && !
|
|
2404
|
+
if (u && !Oi(f, p, S) || !_ && m(f, p)) {
|
|
2299
2405
|
x();
|
|
2300
2406
|
return;
|
|
2301
2407
|
}
|
|
@@ -2303,22 +2409,22 @@ function Di(e = {}) {
|
|
|
2303
2409
|
switch (l) {
|
|
2304
2410
|
case "top": {
|
|
2305
2411
|
let n = E ? $ / 2 : $ * 4, r = E || w ? e + n : e - n, i = E ? e - n : w ? e + n : e - n, a = t + $ + 1, o = w || E ? C.bottom - $ : C.top, s = w ? E ? C.bottom - $ : C.top : C.bottom - $;
|
|
2306
|
-
N =
|
|
2412
|
+
N = Di(f, p, r, a, i, a, C.left, o, C.right, s);
|
|
2307
2413
|
break;
|
|
2308
2414
|
}
|
|
2309
2415
|
case "bottom": {
|
|
2310
2416
|
let n = E ? $ / 2 : $ * 4, r = E || w ? e + n : e - n, i = E ? e - n : w ? e + n : e - n, a = t - $, o = w || E ? C.top + $ : C.bottom, s = w ? E ? C.top + $ : C.bottom : C.top + $;
|
|
2311
|
-
N =
|
|
2417
|
+
N = Di(f, p, r, a, i, a, C.left, o, C.right, s);
|
|
2312
2418
|
break;
|
|
2313
2419
|
}
|
|
2314
2420
|
case "left": {
|
|
2315
2421
|
let n = D ? $ / 2 : $ * 4, r = D || T ? t + n : t - n, i = D ? t - n : T ? t + n : t - n, a = e + $ + 1, o = T || D ? C.right - $ : C.left, s = T ? D ? C.right - $ : C.left : C.right - $;
|
|
2316
|
-
N =
|
|
2422
|
+
N = Di(f, p, o, C.top, s, C.bottom, a, r, a, i);
|
|
2317
2423
|
break;
|
|
2318
2424
|
}
|
|
2319
2425
|
case "right": {
|
|
2320
2426
|
let n = D ? $ / 2 : $ * 4, r = D || T ? t + n : t - n, i = D ? t - n : T ? t + n : t - n, a = e - $, o = T || D ? C.left + $ : C.right, s = T ? D ? C.left + $ : C.right : C.left + $;
|
|
2321
|
-
N =
|
|
2427
|
+
N = Di(f, p, a, r, a, i, o, C.top, s, C.bottom);
|
|
2322
2428
|
break;
|
|
2323
2429
|
}
|
|
2324
2430
|
}
|
|
@@ -2330,8 +2436,8 @@ function Di(e = {}) {
|
|
|
2330
2436
|
blockPointerEvents: t
|
|
2331
2437
|
}, i;
|
|
2332
2438
|
}
|
|
2333
|
-
function
|
|
2334
|
-
let { reference: r, floating: i } = e, a =
|
|
2439
|
+
function ji(e, t, n) {
|
|
2440
|
+
let { reference: r, floating: i } = e, a = Z(t), o = rn(t), s = nn(o), c = X(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;
|
|
2335
2441
|
switch (c) {
|
|
2336
2442
|
case "top":
|
|
2337
2443
|
p = {
|
|
@@ -2362,12 +2468,12 @@ function Oi(e, t, n) {
|
|
|
2362
2468
|
y: r.y
|
|
2363
2469
|
};
|
|
2364
2470
|
}
|
|
2365
|
-
let m =
|
|
2471
|
+
let m = en(t);
|
|
2366
2472
|
return m && (p[o] += f * (m === "end" ? 1 : -1) * (n && l ? -1 : 1)), p;
|
|
2367
2473
|
}
|
|
2368
|
-
async function
|
|
2474
|
+
async function Mi(e, t) {
|
|
2369
2475
|
t === void 0 && (t = {});
|
|
2370
|
-
let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } =
|
|
2476
|
+
let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = $t(t, e), p = gn(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = _n(await i.getClippingRect({
|
|
2371
2477
|
element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
|
|
2372
2478
|
boundary: c,
|
|
2373
2479
|
rootBoundary: l,
|
|
@@ -2380,7 +2486,7 @@ async function ki(e, t) {
|
|
|
2380
2486
|
} : a.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), v = await (i.isElement == null ? void 0 : i.isElement(_)) && await (i.getScale == null ? void 0 : i.getScale(_)) || {
|
|
2381
2487
|
x: 1,
|
|
2382
2488
|
y: 1
|
|
2383
|
-
}, y =
|
|
2489
|
+
}, y = _n(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
2384
2490
|
elements: o,
|
|
2385
2491
|
rect: g,
|
|
2386
2492
|
offsetParent: _,
|
|
@@ -2393,15 +2499,15 @@ async function ki(e, t) {
|
|
|
2393
2499
|
right: (y.right - h.right + p.right) / v.x
|
|
2394
2500
|
};
|
|
2395
2501
|
}
|
|
2396
|
-
var
|
|
2502
|
+
var Ni = 50, Pi = async (e, t, n) => {
|
|
2397
2503
|
let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
|
|
2398
2504
|
...o,
|
|
2399
|
-
detectOverflow:
|
|
2505
|
+
detectOverflow: Mi
|
|
2400
2506
|
}, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
|
|
2401
2507
|
reference: e,
|
|
2402
2508
|
floating: t,
|
|
2403
2509
|
strategy: i
|
|
2404
|
-
}), { x: u, y: d } =
|
|
2510
|
+
}), { x: u, y: d } = ji(l, r, c), f = r, p = 0, m = {};
|
|
2405
2511
|
for (let n = 0; n < a.length; n++) {
|
|
2406
2512
|
let h = a[n];
|
|
2407
2513
|
if (!h) continue;
|
|
@@ -2422,11 +2528,11 @@ var Ai = 50, ji = async (e, t, n) => {
|
|
|
2422
2528
|
u = v ?? u, d = y ?? d, m[g] = {
|
|
2423
2529
|
...m[g],
|
|
2424
2530
|
...b
|
|
2425
|
-
}, x && p <
|
|
2531
|
+
}, x && p < Ni && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
|
|
2426
2532
|
reference: e,
|
|
2427
2533
|
floating: t,
|
|
2428
2534
|
strategy: i
|
|
2429
|
-
}) : x.rects), {x: u, y: d} =
|
|
2535
|
+
}) : x.rects), {x: u, y: d} = ji(l, f, c)), n = -1);
|
|
2430
2536
|
}
|
|
2431
2537
|
return {
|
|
2432
2538
|
x: u,
|
|
@@ -2435,19 +2541,19 @@ var Ai = 50, ji = async (e, t, n) => {
|
|
|
2435
2541
|
strategy: i,
|
|
2436
2542
|
middlewareData: m
|
|
2437
2543
|
};
|
|
2438
|
-
},
|
|
2544
|
+
}, Fi = function(e) {
|
|
2439
2545
|
return e === void 0 && (e = {}), {
|
|
2440
2546
|
name: "flip",
|
|
2441
2547
|
options: e,
|
|
2442
2548
|
async fn(t) {
|
|
2443
2549
|
var n;
|
|
2444
|
-
let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } =
|
|
2550
|
+
let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = $t(e, t);
|
|
2445
2551
|
if ((n = i.arrow) != null && n.alignmentOffset) return {};
|
|
2446
|
-
let g = X(r), _ =
|
|
2447
|
-
!d && x && b.push(...
|
|
2552
|
+
let g = X(r), _ = Z(o), v = X(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [mn(o)] : on(o)), x = p !== "none";
|
|
2553
|
+
!d && x && b.push(...pn(o, m, p, y));
|
|
2448
2554
|
let S = [o, ...b], C = await s.detectOverflow(t, h), w = [], T = i.flip?.overflows || [];
|
|
2449
2555
|
if (l && w.push(C[g]), u) {
|
|
2450
|
-
let e =
|
|
2556
|
+
let e = an(r, a, y);
|
|
2451
2557
|
w.push(C[e[0]], C[e[1]]);
|
|
2452
2558
|
}
|
|
2453
2559
|
if (T = [...T, {
|
|
@@ -2455,7 +2561,7 @@ var Ai = 50, ji = async (e, t, n) => {
|
|
|
2455
2561
|
overflows: w
|
|
2456
2562
|
}], !w.every((e) => e <= 0)) {
|
|
2457
2563
|
let e = (i.flip?.index || 0) + 1, t = S[e];
|
|
2458
|
-
if (t && (u !== "alignment" || _ ===
|
|
2564
|
+
if (t && (u !== "alignment" || _ === Z(t) || T.every((e) => Z(e.placement) !== _ || e.overflows[0] > 0))) return {
|
|
2459
2565
|
data: {
|
|
2460
2566
|
index: e,
|
|
2461
2567
|
overflows: T
|
|
@@ -2467,7 +2573,7 @@ var Ai = 50, ji = async (e, t, n) => {
|
|
|
2467
2573
|
case "bestFit": {
|
|
2468
2574
|
let e = T.filter((e) => {
|
|
2469
2575
|
if (x) {
|
|
2470
|
-
let t =
|
|
2576
|
+
let t = Z(e.placement);
|
|
2471
2577
|
return t === _ || t === "y";
|
|
2472
2578
|
}
|
|
2473
2579
|
return !0;
|
|
@@ -2482,9 +2588,9 @@ var Ai = 50, ji = async (e, t, n) => {
|
|
|
2482
2588
|
return {};
|
|
2483
2589
|
}
|
|
2484
2590
|
};
|
|
2485
|
-
},
|
|
2486
|
-
async function
|
|
2487
|
-
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = X(n), s =
|
|
2591
|
+
}, Ii = /*#__PURE__*/ new Set(["left", "top"]);
|
|
2592
|
+
async function Li(e, t) {
|
|
2593
|
+
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = X(n), s = en(n), c = Z(n) === "y", l = Ii.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = $t(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
|
|
2488
2594
|
mainAxis: d,
|
|
2489
2595
|
crossAxis: 0,
|
|
2490
2596
|
alignmentAxis: null
|
|
@@ -2501,13 +2607,13 @@ async function Pi(e, t) {
|
|
|
2501
2607
|
y: p * u
|
|
2502
2608
|
};
|
|
2503
2609
|
}
|
|
2504
|
-
var
|
|
2610
|
+
var Ri = function(e) {
|
|
2505
2611
|
return e === void 0 && (e = 0), {
|
|
2506
2612
|
name: "offset",
|
|
2507
2613
|
options: e,
|
|
2508
2614
|
async fn(t) {
|
|
2509
2615
|
var n;
|
|
2510
|
-
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await
|
|
2616
|
+
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await Li(t, e);
|
|
2511
2617
|
return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
|
|
2512
2618
|
x: r + s.x,
|
|
2513
2619
|
y: i + s.y,
|
|
@@ -2518,7 +2624,7 @@ var Fi = function(e) {
|
|
|
2518
2624
|
};
|
|
2519
2625
|
}
|
|
2520
2626
|
};
|
|
2521
|
-
},
|
|
2627
|
+
}, zi = function(e) {
|
|
2522
2628
|
return e === void 0 && (e = {}), {
|
|
2523
2629
|
name: "shift",
|
|
2524
2630
|
options: e,
|
|
@@ -2529,10 +2635,10 @@ var Fi = function(e) {
|
|
|
2529
2635
|
x: t,
|
|
2530
2636
|
y: n
|
|
2531
2637
|
};
|
|
2532
|
-
} }, ...l } =
|
|
2638
|
+
} }, ...l } = $t(e, t), u = {
|
|
2533
2639
|
x: n,
|
|
2534
2640
|
y: r
|
|
2535
|
-
}, d = await a.detectOverflow(t, l), f =
|
|
2641
|
+
}, d = await a.detectOverflow(t, l), f = Z(i), p = tn(f), m = u[p], h = u[f], g = (e, t) => Qt(t + d[e === "y" ? "top" : "left"], t, t - d[e === "y" ? "bottom" : "right"]);
|
|
2536
2642
|
o && (m = g(p, m)), s && (h = g(f, h));
|
|
2537
2643
|
let _ = c.fn({
|
|
2538
2644
|
...t,
|
|
@@ -2552,14 +2658,14 @@ var Fi = function(e) {
|
|
|
2552
2658
|
};
|
|
2553
2659
|
}
|
|
2554
2660
|
};
|
|
2555
|
-
},
|
|
2661
|
+
}, Bi = function(e) {
|
|
2556
2662
|
return e === void 0 && (e = {}), {
|
|
2557
2663
|
options: e,
|
|
2558
2664
|
fn(t) {
|
|
2559
|
-
let { x: n, y: r, placement: i, rects: a, middlewareData: o } = t, { offset: s = 0, mainAxis: c = !0, crossAxis: l = !0 } =
|
|
2665
|
+
let { x: n, y: r, placement: i, rects: a, middlewareData: o } = t, { offset: s = 0, mainAxis: c = !0, crossAxis: l = !0 } = $t(e, t), u = {
|
|
2560
2666
|
x: n,
|
|
2561
2667
|
y: r
|
|
2562
|
-
}, d =
|
|
2668
|
+
}, d = Z(i), f = tn(d), p = u[f], m = u[d], h = $t(s, t), g = typeof h == "number" ? {
|
|
2563
2669
|
mainAxis: h,
|
|
2564
2670
|
crossAxis: 0
|
|
2565
2671
|
} : {
|
|
@@ -2571,7 +2677,7 @@ var Fi = function(e) {
|
|
|
2571
2677
|
p < t ? p = t : p > n && (p = n);
|
|
2572
2678
|
}
|
|
2573
2679
|
if (l) {
|
|
2574
|
-
let e = f === "y" ? "width" : "height", t =
|
|
2680
|
+
let e = f === "y" ? "width" : "height", t = Ii.has(X(i)), n = a.reference[d] - a.floating[e] + (t && o.offset?.[d] || 0) + (t ? 0 : g.crossAxis), r = a.reference[d] + a.reference[e] + (t ? 0 : o.offset?.[d] || 0) - (t ? g.crossAxis : 0);
|
|
2575
2681
|
m < n ? m = n : m > r && (m = r);
|
|
2576
2682
|
}
|
|
2577
2683
|
return {
|
|
@@ -2580,15 +2686,15 @@ var Fi = function(e) {
|
|
|
2580
2686
|
};
|
|
2581
2687
|
}
|
|
2582
2688
|
};
|
|
2583
|
-
},
|
|
2689
|
+
}, Vi = function(e) {
|
|
2584
2690
|
return e === void 0 && (e = {}), {
|
|
2585
2691
|
name: "size",
|
|
2586
2692
|
options: e,
|
|
2587
2693
|
async fn(t) {
|
|
2588
|
-
let { placement: n, rects: r, platform: i, elements: a } = t, { apply: o = () => {}, ...s } =
|
|
2694
|
+
let { placement: n, rects: r, platform: i, elements: a } = t, { apply: o = () => {}, ...s } = $t(e, t), c = await i.detectOverflow(t, s), l = X(n), u = en(n), d = Z(n) === "y", { width: f, height: p } = r.floating, m, h;
|
|
2589
2695
|
l === "top" || l === "bottom" ? (m = l, h = u === (await (i.isRTL == null ? void 0 : i.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (h = l, m = u === "end" ? "top" : "bottom");
|
|
2590
|
-
let g = p - c.top - c.bottom, _ = f - c.left - c.right, v =
|
|
2591
|
-
b != null && b.enabled.x && (C = _), b != null && b.enabled.y && (S = g), x && !u && (d ? C = f - 2 *
|
|
2696
|
+
let g = p - c.top - c.bottom, _ = f - c.left - c.right, v = Kt(p - c[m], g), y = Kt(f - c[h], _), b = t.middlewareData.shift, x = !b, S = v, C = y;
|
|
2697
|
+
b != null && b.enabled.x && (C = _), b != null && b.enabled.y && (S = g), x && !u && (d ? C = f - 2 * qt(c.left, c.right) : S = p - 2 * qt(c.top, c.bottom)), await o({
|
|
2592
2698
|
...t,
|
|
2593
2699
|
availableWidth: C,
|
|
2594
2700
|
availableHeight: S
|
|
@@ -2598,79 +2704,79 @@ var Fi = function(e) {
|
|
|
2598
2704
|
}
|
|
2599
2705
|
};
|
|
2600
2706
|
};
|
|
2601
|
-
function
|
|
2602
|
-
let t = h(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = u(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s =
|
|
2707
|
+
function Hi(e) {
|
|
2708
|
+
let t = h(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = u(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = Jt(n) !== a || Jt(r) !== o;
|
|
2603
2709
|
return s && (n = a, r = o), {
|
|
2604
2710
|
width: n,
|
|
2605
2711
|
height: r,
|
|
2606
2712
|
$: s
|
|
2607
2713
|
};
|
|
2608
2714
|
}
|
|
2609
|
-
function
|
|
2715
|
+
function Ui(e) {
|
|
2610
2716
|
return r(e) ? e : e.contextElement;
|
|
2611
2717
|
}
|
|
2612
|
-
function
|
|
2613
|
-
let t =
|
|
2614
|
-
if (!u(t)) return
|
|
2615
|
-
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } =
|
|
2718
|
+
function Wi(e) {
|
|
2719
|
+
let t = Ui(e);
|
|
2720
|
+
if (!u(t)) return Xt(1);
|
|
2721
|
+
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = Hi(t), o = (a ? Jt(n.width) : n.width) / r, s = (a ? Jt(n.height) : n.height) / i;
|
|
2616
2722
|
return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
2617
2723
|
x: o,
|
|
2618
2724
|
y: s
|
|
2619
2725
|
};
|
|
2620
2726
|
}
|
|
2621
|
-
var
|
|
2622
|
-
function
|
|
2727
|
+
var Gi = /*#__PURE__*/ Xt(0);
|
|
2728
|
+
function Ki(e) {
|
|
2623
2729
|
let t = p(e);
|
|
2624
|
-
return !a() || !t.visualViewport ?
|
|
2730
|
+
return !a() || !t.visualViewport ? Gi : {
|
|
2625
2731
|
x: t.visualViewport.offsetLeft,
|
|
2626
2732
|
y: t.visualViewport.offsetTop
|
|
2627
2733
|
};
|
|
2628
2734
|
}
|
|
2629
|
-
function
|
|
2735
|
+
function qi(e, t, n) {
|
|
2630
2736
|
return t === void 0 && (t = !1), !!n && t && n === p(e);
|
|
2631
2737
|
}
|
|
2632
|
-
function
|
|
2738
|
+
function Ji(e, t, n, i) {
|
|
2633
2739
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
2634
|
-
let a = e.getBoundingClientRect(), o =
|
|
2635
|
-
t && (i ? r(i) && (s =
|
|
2636
|
-
let c =
|
|
2740
|
+
let a = e.getBoundingClientRect(), o = Ui(e), s = Xt(1);
|
|
2741
|
+
t && (i ? r(i) && (s = Wi(i)) : s = Wi(e));
|
|
2742
|
+
let c = qi(o, n, i) ? Ki(o) : Xt(0), l = (a.left + c.x) / s.x, u = (a.top + c.y) / s.y, d = a.width / s.x, f = a.height / s.y;
|
|
2637
2743
|
if (o && i) {
|
|
2638
2744
|
let e = p(o), t = r(i) ? p(i) : i, n = e, a = g(n);
|
|
2639
2745
|
for (; a && t !== n;) {
|
|
2640
|
-
let e =
|
|
2746
|
+
let e = Wi(a), t = a.getBoundingClientRect(), r = h(a), i = t.left + (a.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (a.clientTop + parseFloat(r.paddingTop)) * e.y;
|
|
2641
2747
|
l *= e.x, u *= e.y, d *= e.x, f *= e.y, l += i, u += o, n = p(a), a = g(n);
|
|
2642
2748
|
}
|
|
2643
2749
|
}
|
|
2644
|
-
return
|
|
2750
|
+
return _n({
|
|
2645
2751
|
width: d,
|
|
2646
2752
|
height: f,
|
|
2647
2753
|
x: l,
|
|
2648
2754
|
y: u
|
|
2649
2755
|
});
|
|
2650
2756
|
}
|
|
2651
|
-
function
|
|
2757
|
+
function Yi(e, t) {
|
|
2652
2758
|
let n = f(e).scrollLeft;
|
|
2653
|
-
return t ? t.left + n :
|
|
2759
|
+
return t ? t.left + n : Ji(D(e)).left + n;
|
|
2654
2760
|
}
|
|
2655
|
-
function
|
|
2761
|
+
function Xi(e, t) {
|
|
2656
2762
|
let n = e.getBoundingClientRect();
|
|
2657
2763
|
return {
|
|
2658
|
-
x: n.left + t.scrollLeft -
|
|
2764
|
+
x: n.left + t.scrollLeft - Yi(e, n),
|
|
2659
2765
|
y: n.top + t.scrollTop
|
|
2660
2766
|
};
|
|
2661
2767
|
}
|
|
2662
|
-
function
|
|
2768
|
+
function Zi(e) {
|
|
2663
2769
|
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = D(r), s = t ? d(t.floating) : !1;
|
|
2664
2770
|
if (r === o || s && a) return n;
|
|
2665
2771
|
let c = {
|
|
2666
2772
|
scrollLeft: 0,
|
|
2667
2773
|
scrollTop: 0
|
|
2668
|
-
}, l =
|
|
2774
|
+
}, l = Xt(1), p = Xt(0), m = u(r);
|
|
2669
2775
|
if ((m || !a) && ((E(r) !== "body" || y(o)) && (c = f(r)), m)) {
|
|
2670
|
-
let e =
|
|
2671
|
-
l =
|
|
2776
|
+
let e = Ji(r);
|
|
2777
|
+
l = Wi(r), p.x = e.x + r.clientLeft, p.y = e.y + r.clientTop;
|
|
2672
2778
|
}
|
|
2673
|
-
let h = o && !m && !a ?
|
|
2779
|
+
let h = o && !m && !a ? Xi(o, c) : Xt(0);
|
|
2674
2780
|
return {
|
|
2675
2781
|
width: n.width * l.x,
|
|
2676
2782
|
height: n.height * l.y,
|
|
@@ -2678,29 +2784,29 @@ function Ji(e) {
|
|
|
2678
2784
|
y: n.y * l.y - c.scrollTop * l.y + p.y + h.y
|
|
2679
2785
|
};
|
|
2680
2786
|
}
|
|
2681
|
-
function
|
|
2787
|
+
function Qi(e) {
|
|
2682
2788
|
return e.getClientRects ? Array.from(e.getClientRects()) : [];
|
|
2683
2789
|
}
|
|
2684
|
-
function
|
|
2685
|
-
let t = f(e), n = e.ownerDocument.body, r =
|
|
2686
|
-
return h(n).direction === "rtl" && (a +=
|
|
2790
|
+
function $i(e) {
|
|
2791
|
+
let t = f(e), n = e.ownerDocument.body, r = qt(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = qt(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight), a = -t.scrollLeft + Yi(e), o = -t.scrollTop;
|
|
2792
|
+
return h(n).direction === "rtl" && (a += qt(e.clientWidth, n.clientWidth) - r), {
|
|
2687
2793
|
width: r,
|
|
2688
2794
|
height: i,
|
|
2689
2795
|
x: a,
|
|
2690
2796
|
y: o
|
|
2691
2797
|
};
|
|
2692
2798
|
}
|
|
2693
|
-
var
|
|
2694
|
-
function
|
|
2799
|
+
var ea = 25;
|
|
2800
|
+
function ta(e, t, n) {
|
|
2695
2801
|
n === void 0 && (n = "viewport");
|
|
2696
2802
|
let r = n === "layoutViewport", i = p(e), o = D(e), s = i.visualViewport, c = o.clientWidth, l = o.clientHeight, u = 0, d = 0;
|
|
2697
2803
|
if (s) {
|
|
2698
2804
|
let e = !a() || t === "fixed";
|
|
2699
2805
|
r ? e || (u = -s.offsetLeft, d = -s.offsetTop) : (c = s.width, l = s.height, e && (u = s.offsetLeft, d = s.offsetTop));
|
|
2700
2806
|
}
|
|
2701
|
-
if (
|
|
2807
|
+
if (Yi(o) <= 0) {
|
|
2702
2808
|
let e = o.ownerDocument, t = e.body, n = getComputedStyle(t), r = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, i = Math.abs(o.clientWidth - t.clientWidth - r), a = getComputedStyle(o).scrollbarGutter === "stable both-edges" ? i / 2 : i;
|
|
2703
|
-
a <=
|
|
2809
|
+
a <= ea && (c -= a);
|
|
2704
2810
|
}
|
|
2705
2811
|
return {
|
|
2706
2812
|
width: c,
|
|
@@ -2709,8 +2815,8 @@ function Qi(e, t, n) {
|
|
|
2709
2815
|
y: d
|
|
2710
2816
|
};
|
|
2711
2817
|
}
|
|
2712
|
-
function
|
|
2713
|
-
let n =
|
|
2818
|
+
function na(e, t) {
|
|
2819
|
+
let n = Ji(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = Wi(e);
|
|
2714
2820
|
return {
|
|
2715
2821
|
width: e.clientWidth * a.x,
|
|
2716
2822
|
height: e.clientHeight * a.y,
|
|
@@ -2718,13 +2824,13 @@ function $i(e, t) {
|
|
|
2718
2824
|
y: r * a.y
|
|
2719
2825
|
};
|
|
2720
2826
|
}
|
|
2721
|
-
function
|
|
2827
|
+
function ra(e, t, n) {
|
|
2722
2828
|
let i;
|
|
2723
|
-
if (t === "viewport" || t === "layoutViewport") i =
|
|
2724
|
-
else if (t === "document") i =
|
|
2725
|
-
else if (r(t)) i =
|
|
2829
|
+
if (t === "viewport" || t === "layoutViewport") i = ta(e, n, t);
|
|
2830
|
+
else if (t === "document") i = $i(D(e));
|
|
2831
|
+
else if (r(t)) i = na(t, n);
|
|
2726
2832
|
else {
|
|
2727
|
-
let n =
|
|
2833
|
+
let n = Ki(e);
|
|
2728
2834
|
i = {
|
|
2729
2835
|
x: t.x - n.x,
|
|
2730
2836
|
y: t.y - n.y,
|
|
@@ -2732,9 +2838,9 @@ function ea(e, t, n) {
|
|
|
2732
2838
|
height: t.height
|
|
2733
2839
|
};
|
|
2734
2840
|
}
|
|
2735
|
-
return
|
|
2841
|
+
return _n(i);
|
|
2736
2842
|
}
|
|
2737
|
-
function
|
|
2843
|
+
function ia(e, t) {
|
|
2738
2844
|
let a = t.get(e);
|
|
2739
2845
|
if (a) return a;
|
|
2740
2846
|
let o = n(e, [], !1).filter((e) => r(e) && E(e) !== "body"), s = null, c = h(e).position === "fixed", l = c ? T(e) : e;
|
|
@@ -2744,11 +2850,11 @@ function ta(e, t) {
|
|
|
2744
2850
|
}
|
|
2745
2851
|
return t.set(e, o), o;
|
|
2746
2852
|
}
|
|
2747
|
-
function
|
|
2748
|
-
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? d(t) ? [] :
|
|
2853
|
+
function aa(e) {
|
|
2854
|
+
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? d(t) ? [] : ia(t, this._c) : [].concat(n), r], o = ra(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
|
|
2749
2855
|
for (let e = 1; e < a.length; e++) {
|
|
2750
|
-
let n =
|
|
2751
|
-
s =
|
|
2856
|
+
let n = ra(t, a[e], i);
|
|
2857
|
+
s = qt(n.top, s), c = Kt(n.right, c), l = Kt(n.bottom, l), u = qt(n.left, u);
|
|
2752
2858
|
}
|
|
2753
2859
|
return {
|
|
2754
2860
|
width: c - u,
|
|
@@ -2757,24 +2863,24 @@ function na(e) {
|
|
|
2757
2863
|
y: s
|
|
2758
2864
|
};
|
|
2759
2865
|
}
|
|
2760
|
-
function
|
|
2761
|
-
let { width: t, height: n } =
|
|
2866
|
+
function oa(e) {
|
|
2867
|
+
let { width: t, height: n } = Hi(e);
|
|
2762
2868
|
return {
|
|
2763
2869
|
width: t,
|
|
2764
2870
|
height: n
|
|
2765
2871
|
};
|
|
2766
2872
|
}
|
|
2767
|
-
function
|
|
2768
|
-
let r = u(t), i = D(t), a = n === "fixed", o =
|
|
2873
|
+
function sa(e, t, n) {
|
|
2874
|
+
let r = u(t), i = D(t), a = n === "fixed", o = Ji(e, !0, a, t), s = {
|
|
2769
2875
|
scrollLeft: 0,
|
|
2770
2876
|
scrollTop: 0
|
|
2771
|
-
}, c =
|
|
2877
|
+
}, c = Xt(0);
|
|
2772
2878
|
if ((r || !a) && ((E(t) !== "body" || y(i)) && (s = f(t)), r)) {
|
|
2773
|
-
let e =
|
|
2879
|
+
let e = Ji(t, !0, a, t);
|
|
2774
2880
|
c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
|
|
2775
2881
|
}
|
|
2776
|
-
!r && i && (c.x =
|
|
2777
|
-
let l = i && !r && !a ?
|
|
2882
|
+
!r && i && (c.x = Yi(i));
|
|
2883
|
+
let l = i && !r && !a ? Xi(i, s) : Xt(0);
|
|
2778
2884
|
return {
|
|
2779
2885
|
x: o.left + s.scrollLeft - c.x - l.x,
|
|
2780
2886
|
y: o.top + s.scrollTop - c.y - l.y,
|
|
@@ -2782,34 +2888,34 @@ function ia(e, t, n) {
|
|
|
2782
2888
|
height: o.height
|
|
2783
2889
|
};
|
|
2784
2890
|
}
|
|
2785
|
-
function
|
|
2891
|
+
function ca(e) {
|
|
2786
2892
|
return h(e).position === "static";
|
|
2787
2893
|
}
|
|
2788
|
-
function
|
|
2894
|
+
function la(e, t) {
|
|
2789
2895
|
if (!u(e) || h(e).position === "fixed") return null;
|
|
2790
2896
|
if (t) return t(e);
|
|
2791
2897
|
let n = e.offsetParent;
|
|
2792
2898
|
return D(e) === n && (n = n.ownerDocument.body), n;
|
|
2793
2899
|
}
|
|
2794
|
-
function
|
|
2900
|
+
function ua(e, t) {
|
|
2795
2901
|
let n = p(e);
|
|
2796
2902
|
if (d(e)) return n;
|
|
2797
2903
|
if (!u(e)) {
|
|
2798
2904
|
let t = T(e);
|
|
2799
2905
|
for (; t && !b(t);) {
|
|
2800
|
-
if (r(t) && !
|
|
2906
|
+
if (r(t) && !ca(t)) return t;
|
|
2801
2907
|
t = T(t);
|
|
2802
2908
|
}
|
|
2803
2909
|
return n;
|
|
2804
2910
|
}
|
|
2805
|
-
let a =
|
|
2806
|
-
for (; a && l(a) &&
|
|
2807
|
-
return a && b(a) &&
|
|
2911
|
+
let a = la(e, t);
|
|
2912
|
+
for (; a && l(a) && ca(a);) a = la(a, t);
|
|
2913
|
+
return a && b(a) && ca(a) && !i(a) ? n : a || w(e) || n;
|
|
2808
2914
|
}
|
|
2809
|
-
var
|
|
2810
|
-
let t = this.getOffsetParent ||
|
|
2915
|
+
var da = async function(e) {
|
|
2916
|
+
let t = this.getOffsetParent || ua, n = this.getDimensions, r = await n(e.floating);
|
|
2811
2917
|
return {
|
|
2812
|
-
reference:
|
|
2918
|
+
reference: sa(e.reference, await t(e.floating), e.strategy),
|
|
2813
2919
|
floating: {
|
|
2814
2920
|
x: 0,
|
|
2815
2921
|
y: 0,
|
|
@@ -2818,25 +2924,25 @@ var ca = async function(e) {
|
|
|
2818
2924
|
}
|
|
2819
2925
|
};
|
|
2820
2926
|
};
|
|
2821
|
-
function
|
|
2927
|
+
function fa(e) {
|
|
2822
2928
|
return h(e).direction === "rtl";
|
|
2823
2929
|
}
|
|
2824
|
-
var
|
|
2825
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
2930
|
+
var pa = {
|
|
2931
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Zi,
|
|
2826
2932
|
getDocumentElement: D,
|
|
2827
|
-
getClippingRect:
|
|
2828
|
-
getOffsetParent:
|
|
2829
|
-
getElementRects:
|
|
2830
|
-
getClientRects:
|
|
2831
|
-
getDimensions:
|
|
2832
|
-
getScale:
|
|
2933
|
+
getClippingRect: aa,
|
|
2934
|
+
getOffsetParent: ua,
|
|
2935
|
+
getElementRects: da,
|
|
2936
|
+
getClientRects: Qi,
|
|
2937
|
+
getDimensions: oa,
|
|
2938
|
+
getScale: Wi,
|
|
2833
2939
|
isElement: r,
|
|
2834
|
-
isRTL:
|
|
2940
|
+
isRTL: fa
|
|
2835
2941
|
};
|
|
2836
|
-
function
|
|
2942
|
+
function ma(e, t) {
|
|
2837
2943
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
2838
2944
|
}
|
|
2839
|
-
function
|
|
2945
|
+
function ha(e, t, n) {
|
|
2840
2946
|
let r = null, i, a = D(e);
|
|
2841
2947
|
function o() {
|
|
2842
2948
|
var e;
|
|
@@ -2846,13 +2952,13 @@ function fa(e, t, n) {
|
|
|
2846
2952
|
n === void 0 && (n = !1), c === void 0 && (c = 1), o();
|
|
2847
2953
|
let l = e.getBoundingClientRect(), { left: u, top: d, width: f, height: p } = l;
|
|
2848
2954
|
if (n || t(), !f || !p) return;
|
|
2849
|
-
let m =
|
|
2955
|
+
let m = Yt(d), h = Yt(a.clientWidth - (u + f)), g = Yt(a.clientHeight - (d + p)), _ = Yt(u), v = {
|
|
2850
2956
|
rootMargin: -m + "px " + -h + "px " + -g + "px " + -_ + "px",
|
|
2851
|
-
threshold:
|
|
2957
|
+
threshold: qt(0, Kt(1, c)) || 1
|
|
2852
2958
|
}, y = !0;
|
|
2853
2959
|
function b(t) {
|
|
2854
2960
|
let n = t[0].intersectionRatio;
|
|
2855
|
-
if (!
|
|
2961
|
+
if (!ma(l, e.getBoundingClientRect())) return s();
|
|
2856
2962
|
if (n !== c) {
|
|
2857
2963
|
if (!y) return s();
|
|
2858
2964
|
n ? s(!1, n) : i = setTimeout(() => {
|
|
@@ -2876,13 +2982,13 @@ function fa(e, t, n) {
|
|
|
2876
2982
|
c.removeEventListener("resize", l), o();
|
|
2877
2983
|
};
|
|
2878
2984
|
}
|
|
2879
|
-
function
|
|
2985
|
+
function ga(e, t, r, i) {
|
|
2880
2986
|
i === void 0 && (i = {});
|
|
2881
|
-
let { ancestorScroll: a = !0, ancestorResize: o = !0, elementResize: s = typeof ResizeObserver == "function", layoutShift: c = typeof IntersectionObserver == "function", animationFrame: l = !1 } = i, u =
|
|
2987
|
+
let { ancestorScroll: a = !0, ancestorResize: o = !0, elementResize: s = typeof ResizeObserver == "function", layoutShift: c = typeof IntersectionObserver == "function", animationFrame: l = !1 } = i, u = Ui(e), d = a || o ? [...u ? n(u) : [], ...t ? n(t) : []] : [];
|
|
2882
2988
|
d.forEach((e) => {
|
|
2883
2989
|
a && e.addEventListener("scroll", r), o && e.addEventListener("resize", r);
|
|
2884
2990
|
});
|
|
2885
|
-
let f = u && c ?
|
|
2991
|
+
let f = u && c ? ha(u, r, o) : null, p = -1, m = null;
|
|
2886
2992
|
s && (m = new ResizeObserver((e) => {
|
|
2887
2993
|
let [n] = e;
|
|
2888
2994
|
n && n.target === u && m && t && (m.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
@@ -2890,11 +2996,11 @@ function pa(e, t, r, i) {
|
|
|
2890
2996
|
(e = m) == null || e.observe(t);
|
|
2891
2997
|
})), r();
|
|
2892
2998
|
}), u && !l && m.observe(u), t && m.observe(t));
|
|
2893
|
-
let h, g = l ?
|
|
2999
|
+
let h, g = l ? Ji(e) : null;
|
|
2894
3000
|
l && _();
|
|
2895
3001
|
function _() {
|
|
2896
|
-
let t =
|
|
2897
|
-
g && !
|
|
3002
|
+
let t = Ji(e);
|
|
3003
|
+
g && !ma(g, t) && r(), g = t, h = requestAnimationFrame(_);
|
|
2898
3004
|
}
|
|
2899
3005
|
return r(), () => {
|
|
2900
3006
|
var e;
|
|
@@ -2903,18 +3009,18 @@ function pa(e, t, r, i) {
|
|
|
2903
3009
|
}), f?.(), (e = m) == null || e.disconnect(), m = null, l && cancelAnimationFrame(h);
|
|
2904
3010
|
};
|
|
2905
3011
|
}
|
|
2906
|
-
var
|
|
3012
|
+
var _a = Ri, va = zi, ya = Fi, ba = Vi, xa = Bi, Sa = (e, t, n) => {
|
|
2907
3013
|
let r = /* @__PURE__ */ new Map(), i = n ?? {}, a = {
|
|
2908
|
-
...
|
|
3014
|
+
...pa,
|
|
2909
3015
|
...i.platform,
|
|
2910
3016
|
_c: r
|
|
2911
3017
|
};
|
|
2912
|
-
return
|
|
3018
|
+
return Pi(e, t, {
|
|
2913
3019
|
...i,
|
|
2914
3020
|
platform: a
|
|
2915
3021
|
});
|
|
2916
|
-
},
|
|
2917
|
-
function
|
|
3022
|
+
}, Ca = typeof document < "u" ? H : function() {};
|
|
3023
|
+
function wa(e, t) {
|
|
2918
3024
|
if (e === t) return !0;
|
|
2919
3025
|
if (typeof e != typeof t) return !1;
|
|
2920
3026
|
if (typeof e == "function" && e.toString() === t.toString()) return !0;
|
|
@@ -2922,33 +3028,33 @@ function xa(e, t) {
|
|
|
2922
3028
|
if (e && t && typeof e == "object") {
|
|
2923
3029
|
if (Array.isArray(e)) {
|
|
2924
3030
|
if (n = e.length, n !== t.length) return !1;
|
|
2925
|
-
for (r = n; r-- !== 0;) if (!
|
|
3031
|
+
for (r = n; r-- !== 0;) if (!wa(e[r], t[r])) return !1;
|
|
2926
3032
|
return !0;
|
|
2927
3033
|
}
|
|
2928
3034
|
if (i = Object.keys(e), n = i.length, n !== Object.keys(t).length) return !1;
|
|
2929
3035
|
for (r = n; r-- !== 0;) if (!{}.hasOwnProperty.call(t, i[r])) return !1;
|
|
2930
3036
|
for (r = n; r-- !== 0;) {
|
|
2931
3037
|
let n = i[r];
|
|
2932
|
-
if (!(n === "_owner" && e.$$typeof) && !
|
|
3038
|
+
if (!(n === "_owner" && e.$$typeof) && !wa(e[n], t[n])) return !1;
|
|
2933
3039
|
}
|
|
2934
3040
|
return !0;
|
|
2935
3041
|
}
|
|
2936
3042
|
return e !== e && t !== t;
|
|
2937
3043
|
}
|
|
2938
|
-
function
|
|
3044
|
+
function Ta(e) {
|
|
2939
3045
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
2940
3046
|
}
|
|
2941
|
-
function
|
|
2942
|
-
let n =
|
|
3047
|
+
function Ea(e, t) {
|
|
3048
|
+
let n = Ta(e);
|
|
2943
3049
|
return Math.round(t * n) / n;
|
|
2944
3050
|
}
|
|
2945
|
-
function
|
|
3051
|
+
function Da(e) {
|
|
2946
3052
|
let t = B.useRef(e);
|
|
2947
|
-
return
|
|
3053
|
+
return Ca(() => {
|
|
2948
3054
|
t.current = e;
|
|
2949
3055
|
}), t;
|
|
2950
3056
|
}
|
|
2951
|
-
function
|
|
3057
|
+
function Oa(e) {
|
|
2952
3058
|
e === void 0 && (e = {});
|
|
2953
3059
|
let { placement: t = "bottom", strategy: n = "absolute", middleware: r = [], platform: i, elements: { reference: a, floating: o } = {}, transform: s = !0, whileElementsMounted: c, open: l } = e, [u, d] = B.useState({
|
|
2954
3060
|
x: 0,
|
|
@@ -2958,24 +3064,24 @@ function Ta(e) {
|
|
|
2958
3064
|
middlewareData: {},
|
|
2959
3065
|
isPositioned: !1
|
|
2960
3066
|
}), [f, p] = B.useState(r);
|
|
2961
|
-
|
|
3067
|
+
wa(f, r) || p(r);
|
|
2962
3068
|
let [m, h] = B.useState(null), [g, _] = B.useState(null), v = B.useCallback((e) => {
|
|
2963
3069
|
e !== S.current && (S.current = e, h(e));
|
|
2964
3070
|
}, []), y = B.useCallback((e) => {
|
|
2965
3071
|
e !== C.current && (C.current = e, _(e));
|
|
2966
|
-
}, []), b = a || m, x = o || g, S = B.useRef(null), C = B.useRef(null), w = B.useRef(u), T = c != null, E =
|
|
3072
|
+
}, []), b = a || m, x = o || g, S = B.useRef(null), C = B.useRef(null), w = B.useRef(u), T = c != null, E = Da(c), D = Da(i), O = Da(l), k = B.useCallback(() => {
|
|
2967
3073
|
if (!S.current || !C.current) return;
|
|
2968
3074
|
let e = {
|
|
2969
3075
|
placement: t,
|
|
2970
3076
|
strategy: n,
|
|
2971
3077
|
middleware: f
|
|
2972
3078
|
};
|
|
2973
|
-
D.current && (e.platform = D.current),
|
|
3079
|
+
D.current && (e.platform = D.current), Sa(S.current, C.current, e).then((e) => {
|
|
2974
3080
|
let t = {
|
|
2975
3081
|
...e,
|
|
2976
3082
|
isPositioned: O.current !== !1
|
|
2977
3083
|
};
|
|
2978
|
-
A.current && !
|
|
3084
|
+
A.current && !wa(w.current, t) && (w.current = t, de.flushSync(() => {
|
|
2979
3085
|
d(t);
|
|
2980
3086
|
}));
|
|
2981
3087
|
});
|
|
@@ -2986,16 +3092,16 @@ function Ta(e) {
|
|
|
2986
3092
|
D,
|
|
2987
3093
|
O
|
|
2988
3094
|
]);
|
|
2989
|
-
|
|
3095
|
+
Ca(() => {
|
|
2990
3096
|
l === !1 && w.current.isPositioned && (w.current.isPositioned = !1, d((e) => ({
|
|
2991
3097
|
...e,
|
|
2992
3098
|
isPositioned: !1
|
|
2993
3099
|
})));
|
|
2994
3100
|
}, [l]);
|
|
2995
3101
|
let A = B.useRef(!1);
|
|
2996
|
-
|
|
3102
|
+
Ca(() => (A.current = !0, () => {
|
|
2997
3103
|
A.current = !1;
|
|
2998
|
-
}), []),
|
|
3104
|
+
}), []), Ca(() => {
|
|
2999
3105
|
if (b && (S.current = b), x && (C.current = x), b && x) {
|
|
3000
3106
|
if (E.current) return E.current(b, x, k);
|
|
3001
3107
|
k();
|
|
@@ -3022,11 +3128,11 @@ function Ta(e) {
|
|
|
3022
3128
|
top: 0
|
|
3023
3129
|
};
|
|
3024
3130
|
if (!M.floating) return e;
|
|
3025
|
-
let t =
|
|
3131
|
+
let t = Ea(M.floating, u.x), r = Ea(M.floating, u.y);
|
|
3026
3132
|
return s ? {
|
|
3027
3133
|
...e,
|
|
3028
3134
|
transform: "translate(" + t + "px, " + r + "px)",
|
|
3029
|
-
...
|
|
3135
|
+
...Ta(M.floating) >= 1.5 && { willChange: "transform" }
|
|
3030
3136
|
} : {
|
|
3031
3137
|
position: n,
|
|
3032
3138
|
left: t,
|
|
@@ -3053,39 +3159,39 @@ function Ta(e) {
|
|
|
3053
3159
|
N
|
|
3054
3160
|
]);
|
|
3055
3161
|
}
|
|
3056
|
-
var
|
|
3057
|
-
let n =
|
|
3162
|
+
var ka = (e, t) => {
|
|
3163
|
+
let n = _a(e);
|
|
3058
3164
|
return {
|
|
3059
3165
|
name: n.name,
|
|
3060
3166
|
fn: n.fn,
|
|
3061
3167
|
options: [e, t]
|
|
3062
3168
|
};
|
|
3063
|
-
},
|
|
3064
|
-
let n =
|
|
3169
|
+
}, Aa = (e, t) => {
|
|
3170
|
+
let n = va(e);
|
|
3065
3171
|
return {
|
|
3066
3172
|
name: n.name,
|
|
3067
3173
|
fn: n.fn,
|
|
3068
3174
|
options: [e, t]
|
|
3069
3175
|
};
|
|
3070
|
-
},
|
|
3071
|
-
fn:
|
|
3176
|
+
}, ja = (e, t) => ({
|
|
3177
|
+
fn: xa(e).fn,
|
|
3072
3178
|
options: [e, t]
|
|
3073
|
-
}),
|
|
3074
|
-
let n =
|
|
3179
|
+
}), Ma = (e, t) => {
|
|
3180
|
+
let n = ya(e);
|
|
3075
3181
|
return {
|
|
3076
3182
|
name: n.name,
|
|
3077
3183
|
fn: n.fn,
|
|
3078
3184
|
options: [e, t]
|
|
3079
3185
|
};
|
|
3080
|
-
},
|
|
3081
|
-
let n =
|
|
3186
|
+
}, Na = (e, t) => {
|
|
3187
|
+
let n = ba(e);
|
|
3082
3188
|
return {
|
|
3083
3189
|
name: n.name,
|
|
3084
3190
|
fn: n.fn,
|
|
3085
3191
|
options: [e, t]
|
|
3086
3192
|
};
|
|
3087
|
-
},
|
|
3088
|
-
...
|
|
3193
|
+
}, Pa = {
|
|
3194
|
+
...fi,
|
|
3089
3195
|
disabled: (e) => e.disabled,
|
|
3090
3196
|
instantType: (e) => e.instantType,
|
|
3091
3197
|
isInstantPhase: (e) => e.isInstantPhase,
|
|
@@ -3096,21 +3202,21 @@ var Ea = (e, t) => {
|
|
|
3096
3202
|
appliedTriggerProps: (e, t) => t ? e.activeTriggerProps : void 0,
|
|
3097
3203
|
closeDelay: (e) => e.closeDelay,
|
|
3098
3204
|
adaptiveOrigin: (e) => e.adaptiveOrigin
|
|
3099
|
-
},
|
|
3205
|
+
}, Fa = class extends ri {
|
|
3100
3206
|
constructor(e, t, n) {
|
|
3101
|
-
let r = new
|
|
3102
|
-
super(
|
|
3207
|
+
let r = new Yr();
|
|
3208
|
+
super(Ia(e, r, t, n), La(r), Pa);
|
|
3103
3209
|
}
|
|
3104
3210
|
setOpen = (e, t) => {
|
|
3105
|
-
|
|
3211
|
+
Vr(this, e, t, { extraState: { openChangeReason: t.reason } });
|
|
3106
3212
|
};
|
|
3107
3213
|
cancelPendingOpen(e) {
|
|
3108
|
-
this.state.floatingRootContext.dispatchOpenChange(!1,
|
|
3214
|
+
this.state.floatingRootContext.dispatchOpenChange(!1, I(L, e));
|
|
3109
3215
|
}
|
|
3110
3216
|
};
|
|
3111
|
-
function
|
|
3217
|
+
function Ia(e, t, n, r = !1) {
|
|
3112
3218
|
return {
|
|
3113
|
-
...
|
|
3219
|
+
...oi(t, n, r),
|
|
3114
3220
|
disabled: !1,
|
|
3115
3221
|
instantType: void 0,
|
|
3116
3222
|
isInstantPhase: !1,
|
|
@@ -3123,7 +3229,7 @@ function Na(e, t, n, r = !1) {
|
|
|
3123
3229
|
...e
|
|
3124
3230
|
};
|
|
3125
3231
|
}
|
|
3126
|
-
function
|
|
3232
|
+
function La(e) {
|
|
3127
3233
|
return {
|
|
3128
3234
|
popupRef: /*#__PURE__*/ B.createRef(),
|
|
3129
3235
|
onOpenChange: void 0,
|
|
@@ -3131,8 +3237,8 @@ function Pa(e) {
|
|
|
3131
3237
|
triggerElements: e
|
|
3132
3238
|
};
|
|
3133
3239
|
}
|
|
3134
|
-
var
|
|
3135
|
-
let { disabled: t = !1, defaultOpen: n = !1, open: r, disableHoverablePopup: i = !1, trackCursorAxis: a = "none", actionsRef: o, onOpenChange: c, onOpenChangeComplete: l, handle: u, triggerId: d, defaultTriggerId: f = null, children: p } = e, m =
|
|
3240
|
+
var Ra = ge(function(e) {
|
|
3241
|
+
let { disabled: t = !1, defaultOpen: n = !1, open: r, disableHoverablePopup: i = !1, trackCursorAxis: a = "none", actionsRef: o, onOpenChange: c, onOpenChangeComplete: l, handle: u, triggerId: d, defaultTriggerId: f = null, children: p } = e, m = Fr((e, t) => new Fa({
|
|
3136
3242
|
open: n,
|
|
3137
3243
|
openProp: r,
|
|
3138
3244
|
activeTriggerId: f,
|
|
@@ -3144,10 +3250,10 @@ var Fa = ge(function(e) {
|
|
|
3144
3250
|
trackCursorAxis: a,
|
|
3145
3251
|
disableHoverablePopup: i,
|
|
3146
3252
|
disabled: t
|
|
3147
|
-
}),
|
|
3148
|
-
let { forceUnmount: b, transitionStatus: x } =
|
|
3253
|
+
}), Ur(m, { closeOnActiveTriggerUnmount: !0 });
|
|
3254
|
+
let { forceUnmount: b, transitionStatus: x } = Wr(g, m), S = m.useState("isInstantPhase"), C = m.useState("instantType"), w = m.useState("lastOpenChangeReason"), T = B.useRef(null);
|
|
3149
3255
|
s(() => {
|
|
3150
|
-
h && t && m.setOpen(!1,
|
|
3256
|
+
h && t && m.setOpen(!1, I(ne));
|
|
3151
3257
|
}, [
|
|
3152
3258
|
h,
|
|
3153
3259
|
t,
|
|
@@ -3168,17 +3274,17 @@ var Fa = ge(function(e) {
|
|
|
3168
3274
|
g
|
|
3169
3275
|
]), B.useImperativeHandle(o, () => ({
|
|
3170
3276
|
unmount: b,
|
|
3171
|
-
close: () => m.setOpen(!1,
|
|
3277
|
+
close: () => m.setOpen(!1, I(R))
|
|
3172
3278
|
}), [b, m]);
|
|
3173
3279
|
let E = g || v || !t && a !== "none";
|
|
3174
3280
|
return /*#__PURE__*/ ue(ye.Provider, {
|
|
3175
3281
|
value: m,
|
|
3176
3282
|
children: [
|
|
3177
|
-
u && /*#__PURE__*/ W(
|
|
3283
|
+
u && /*#__PURE__*/ W(Ir, {
|
|
3178
3284
|
handle: u,
|
|
3179
3285
|
store: m
|
|
3180
3286
|
}),
|
|
3181
|
-
E && /*#__PURE__*/ W(
|
|
3287
|
+
E && /*#__PURE__*/ W(za, {
|
|
3182
3288
|
store: m,
|
|
3183
3289
|
disabled: t,
|
|
3184
3290
|
trackCursorAxis: a
|
|
@@ -3187,62 +3293,62 @@ var Fa = ge(function(e) {
|
|
|
3187
3293
|
]
|
|
3188
3294
|
});
|
|
3189
3295
|
});
|
|
3190
|
-
process.env.NODE_ENV !== "production" && (
|
|
3191
|
-
function
|
|
3192
|
-
let r = e.useState("floatingRootContext"), i =
|
|
3296
|
+
process.env.NODE_ENV !== "production" && (Ra.displayName = "TooltipRoot");
|
|
3297
|
+
function za({ store: e, disabled: t, trackCursorAxis: n }) {
|
|
3298
|
+
let r = e.useState("floatingRootContext"), i = wr(r, {
|
|
3193
3299
|
enabled: !t,
|
|
3194
3300
|
referencePress: () => e.select("closeOnClick")
|
|
3195
|
-
}), a =
|
|
3301
|
+
}), a = xr(r, {
|
|
3196
3302
|
enabled: !t && n !== "none",
|
|
3197
3303
|
axis: n === "none" ? void 0 : n
|
|
3198
3304
|
}), o = B.useMemo(() => v(a.reference, i.reference), [a.reference, i.reference]);
|
|
3199
|
-
return
|
|
3305
|
+
return Gr(e, {
|
|
3200
3306
|
activeTriggerProps: o,
|
|
3201
3307
|
inactiveTriggerProps: o,
|
|
3202
3308
|
popupProps: i.floating ?? O
|
|
3203
3309
|
}), null;
|
|
3204
3310
|
}
|
|
3205
|
-
var
|
|
3206
|
-
process.env.NODE_ENV !== "production" && (
|
|
3207
|
-
function
|
|
3208
|
-
return B.useContext(
|
|
3311
|
+
var Ba = /*#__PURE__*/ B.createContext(void 0);
|
|
3312
|
+
process.env.NODE_ENV !== "production" && (Ba.displayName = "TooltipProviderContext");
|
|
3313
|
+
function Va() {
|
|
3314
|
+
return B.useContext(Ba);
|
|
3209
3315
|
}
|
|
3210
|
-
var
|
|
3211
|
-
function
|
|
3212
|
-
let t =
|
|
3316
|
+
var Ha = "data-base-ui-tooltip-trigger";
|
|
3317
|
+
function Ua(e) {
|
|
3318
|
+
let t = Ue(e);
|
|
3213
3319
|
return r(t) ? t : null;
|
|
3214
3320
|
}
|
|
3215
|
-
var
|
|
3216
|
-
let { render: n, className: r, style: i, handle: a, payload: s, disabled: c, delay: l, closeOnClick: u = !0, closeDelay: d, id: f, ...p } = e, m = be(!0), h =
|
|
3321
|
+
var Wa = _e(function(e, t) {
|
|
3322
|
+
let { render: n, className: r, style: i, handle: a, payload: s, disabled: c, delay: l, closeOnClick: u = !0, closeDelay: d, id: f, ...p } = e, m = be(!0), h = pi(a) ?? m;
|
|
3217
3323
|
if (!h) throw Error(process.env.NODE_ENV === "production" ? o(82) : "Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle.");
|
|
3218
|
-
let g =
|
|
3324
|
+
let g = re(f), _ = h.useState("isTriggerActive", g), v = h.useState("isOpenedByTrigger", g), y = h.useState("floatingRootContext"), b = B.useRef(null), x = d ?? 0, { registerTrigger: S, isMountedByThisTrigger: w } = Hr(g, b, h, {
|
|
3219
3325
|
payload: s,
|
|
3220
3326
|
closeOnClick: u,
|
|
3221
3327
|
closeDelay: x
|
|
3222
|
-
}), T =
|
|
3328
|
+
}), T = Va(), { activeIdRef: E, delayRef: D, isInstantPhase: O, hasProvider: k } = Pt(y, { open: v }), A = bi(y);
|
|
3223
3329
|
h.useSyncedValue("isInstantPhase", O);
|
|
3224
|
-
let
|
|
3225
|
-
function
|
|
3226
|
-
return
|
|
3330
|
+
let j = h.useState("disabled"), M = c ?? j, ee = J(M), te = h.useState("trackCursorAxis"), F = h.useState("disableHoverablePopup"), L = B.useRef(!1), ne = P(), R = B.useRef(void 0);
|
|
3331
|
+
function z() {
|
|
3332
|
+
return k && E.current != null ? 0 : l ?? T ?? 600;
|
|
3227
3333
|
}
|
|
3228
3334
|
function ie(e) {
|
|
3229
3335
|
let t = b.current;
|
|
3230
3336
|
if (!t || !e) return !1;
|
|
3231
|
-
let n =
|
|
3337
|
+
let n = He(e, `[${Ha}]`);
|
|
3232
3338
|
return n !== null && n !== t && K(t, n);
|
|
3233
3339
|
}
|
|
3234
3340
|
function ae(e) {
|
|
3235
3341
|
let t = ie(e);
|
|
3236
|
-
return L.current = t, t && (
|
|
3342
|
+
return L.current = t, t && (A.openChangeTimeout.clear(), A.restTimeout.clear(), A.restTimeoutPending = !1, ne.clear()), t;
|
|
3237
3343
|
}
|
|
3238
|
-
let V =
|
|
3239
|
-
enabled: !
|
|
3344
|
+
let V = Ci(y, {
|
|
3345
|
+
enabled: !M,
|
|
3240
3346
|
mouseOnly: !0,
|
|
3241
3347
|
move: !1,
|
|
3242
|
-
handleClose: !
|
|
3243
|
-
restMs:
|
|
3348
|
+
handleClose: !F && te !== "both" ? Ai() : null,
|
|
3349
|
+
restMs: z,
|
|
3244
3350
|
delay() {
|
|
3245
|
-
return d == null &&
|
|
3351
|
+
return d == null && k ? { close: Dt(D.current, "close") } : { close: x };
|
|
3246
3352
|
},
|
|
3247
3353
|
triggerElementRef: b,
|
|
3248
3354
|
isActiveTrigger: _,
|
|
@@ -3250,16 +3356,16 @@ var Va = _e(function(e, t) {
|
|
|
3250
3356
|
shouldOpen() {
|
|
3251
3357
|
return !L.current;
|
|
3252
3358
|
}
|
|
3253
|
-
}), oe =
|
|
3254
|
-
let t = L.current, n =
|
|
3255
|
-
if (r && h.select("open") && h.select("lastOpenChangeReason") === "trigger-hover") h.setOpen(!1,
|
|
3256
|
-
else if (t && !r && a && !ee.current && !h.select("open") && i &&
|
|
3359
|
+
}), oe = hi(y, { enabled: !M }).reference, H = (e) => {
|
|
3360
|
+
let t = L.current, n = Ua(e), r = ae(n), i = b.current, a = i && n && K(i, n);
|
|
3361
|
+
if (r && h.select("open") && h.select("lastOpenChangeReason") === "trigger-hover") h.setOpen(!1, I(N, e));
|
|
3362
|
+
else if (t && !r && a && !ee.current && !h.select("open") && i && ze(R.current)) {
|
|
3257
3363
|
let t = () => {
|
|
3258
|
-
!L.current && !ee.current && !h.select("open") && h.setOpen(!0,
|
|
3259
|
-
}, n =
|
|
3260
|
-
n === 0 ? (
|
|
3364
|
+
!L.current && !ee.current && !h.select("open") && h.setOpen(!0, I(N, e, i));
|
|
3365
|
+
}, n = z();
|
|
3366
|
+
n === 0 ? (ne.clear(), t()) : ne.start(n, t);
|
|
3261
3367
|
}
|
|
3262
|
-
}, se = h.useState("appliedTriggerProps", w ||
|
|
3368
|
+
}, se = h.useState("appliedTriggerProps", w || te !== "none");
|
|
3263
3369
|
return C("button", e, {
|
|
3264
3370
|
state: { open: v },
|
|
3265
3371
|
ref: [
|
|
@@ -3276,39 +3382,39 @@ var Va = _e(function(e, t) {
|
|
|
3276
3382
|
H(e.nativeEvent);
|
|
3277
3383
|
},
|
|
3278
3384
|
onFocus(e) {
|
|
3279
|
-
ie(
|
|
3385
|
+
ie(Ua(e.nativeEvent)) && e.preventBaseUIHandler();
|
|
3280
3386
|
},
|
|
3281
3387
|
onMouseLeave() {
|
|
3282
|
-
L.current = !1,
|
|
3388
|
+
L.current = !1, ne.clear(), R.current = void 0;
|
|
3283
3389
|
},
|
|
3284
3390
|
onPointerEnter(e) {
|
|
3285
|
-
|
|
3391
|
+
R.current = e.pointerType;
|
|
3286
3392
|
},
|
|
3287
3393
|
onPointerDown(e) {
|
|
3288
|
-
|
|
3394
|
+
R.current = e.pointerType, h.set("closeOnClick", u), u && !h.select("open") && h.cancelPendingOpen(e.nativeEvent);
|
|
3289
3395
|
},
|
|
3290
3396
|
onClick(e) {
|
|
3291
3397
|
u && !h.select("open") && h.cancelPendingOpen(e.nativeEvent);
|
|
3292
3398
|
},
|
|
3293
3399
|
id: g,
|
|
3294
|
-
[
|
|
3295
|
-
[
|
|
3400
|
+
[_t]: M ? "" : void 0,
|
|
3401
|
+
[Ha]: M ? void 0 : ""
|
|
3296
3402
|
},
|
|
3297
3403
|
p
|
|
3298
3404
|
],
|
|
3299
|
-
stateAttributesMapping:
|
|
3405
|
+
stateAttributesMapping: pt
|
|
3300
3406
|
});
|
|
3301
3407
|
});
|
|
3302
|
-
process.env.NODE_ENV !== "production" && (
|
|
3303
|
-
var
|
|
3304
|
-
process.env.NODE_ENV !== "production" && (
|
|
3305
|
-
function
|
|
3306
|
-
let e = B.useContext(
|
|
3408
|
+
process.env.NODE_ENV !== "production" && (Wa.displayName = "TooltipTrigger");
|
|
3409
|
+
var Ga = /*#__PURE__*/ B.createContext(void 0);
|
|
3410
|
+
process.env.NODE_ENV !== "production" && (Ga.displayName = "TooltipPortalContext");
|
|
3411
|
+
function Ka() {
|
|
3412
|
+
let e = B.useContext(Ga);
|
|
3307
3413
|
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? o(70) : "Base UI: <Tooltip.Portal> is missing.");
|
|
3308
3414
|
return e;
|
|
3309
3415
|
}
|
|
3310
|
-
var
|
|
3311
|
-
let { children: n, container: r, className: i, render: a, style: o, ...s } = e, { node: c, subtree: l } =
|
|
3416
|
+
var qa = /*#__PURE__*/ B.forwardRef(function(e, t) {
|
|
3417
|
+
let { children: n, container: r, className: i, render: a, style: o, ...s } = e, { node: c, subtree: l } = sr({
|
|
3312
3418
|
container: r,
|
|
3313
3419
|
ref: t,
|
|
3314
3420
|
componentProps: e,
|
|
@@ -3316,27 +3422,27 @@ var Wa = /*#__PURE__*/ B.forwardRef(function(e, t) {
|
|
|
3316
3422
|
});
|
|
3317
3423
|
return !l && !c ? null : /*#__PURE__*/ ue(B.Fragment, { children: [l, c && /*#__PURE__*/ de.createPortal(n, c)] });
|
|
3318
3424
|
});
|
|
3319
|
-
process.env.NODE_ENV !== "production" && (
|
|
3320
|
-
var
|
|
3425
|
+
process.env.NODE_ENV !== "production" && (qa.displayName = "FloatingPortalLite");
|
|
3426
|
+
var Ja = /*#__PURE__*/ B.forwardRef(function(e, t) {
|
|
3321
3427
|
let { keepMounted: n = !1, ...r } = e;
|
|
3322
|
-
return be().useState("mounted") || n ? /*#__PURE__*/ W(
|
|
3428
|
+
return be().useState("mounted") || n ? /*#__PURE__*/ W(Ga.Provider, {
|
|
3323
3429
|
value: n,
|
|
3324
|
-
children: /*#__PURE__*/ W(
|
|
3430
|
+
children: /*#__PURE__*/ W(qa, {
|
|
3325
3431
|
ref: t,
|
|
3326
3432
|
...r
|
|
3327
3433
|
})
|
|
3328
3434
|
}) : null;
|
|
3329
3435
|
});
|
|
3330
|
-
process.env.NODE_ENV !== "production" && (
|
|
3331
|
-
var
|
|
3332
|
-
process.env.NODE_ENV !== "production" && (
|
|
3333
|
-
function
|
|
3334
|
-
let e = B.useContext(
|
|
3436
|
+
process.env.NODE_ENV !== "production" && (Ja.displayName = "TooltipPortal");
|
|
3437
|
+
var Ya = /*#__PURE__*/ B.createContext(void 0);
|
|
3438
|
+
process.env.NODE_ENV !== "production" && (Ya.displayName = "TooltipPositionerContext");
|
|
3439
|
+
function Xa() {
|
|
3440
|
+
let e = B.useContext(Ya);
|
|
3335
3441
|
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? o(71) : "Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>.");
|
|
3336
3442
|
return e;
|
|
3337
3443
|
}
|
|
3338
|
-
function
|
|
3339
|
-
let { nodeId: t, externalTree: n, rootContext: i } = e, a = i.useState("referenceElement"), o = i.useState("floatingElement"), c = i.useState("domReferenceElement"), l = i.useState("open"), u = i.useState("floatingId"), [d, f] = B.useState(null), p = B.useRef(null), m =
|
|
3444
|
+
function Za(e) {
|
|
3445
|
+
let { nodeId: t, externalTree: n, rootContext: i } = e, a = i.useState("referenceElement"), o = i.useState("floatingElement"), c = i.useState("domReferenceElement"), l = i.useState("open"), u = i.useState("floatingId"), [d, f] = B.useState(null), p = B.useRef(null), m = mr(n), h = B.useMemo(() => ({
|
|
3340
3446
|
reference: a,
|
|
3341
3447
|
floating: o,
|
|
3342
3448
|
domReference: c
|
|
@@ -3344,7 +3450,7 @@ function Ja(e) {
|
|
|
3344
3450
|
a,
|
|
3345
3451
|
o,
|
|
3346
3452
|
c
|
|
3347
|
-
]), g =
|
|
3453
|
+
]), g = Oa({
|
|
3348
3454
|
...e,
|
|
3349
3455
|
elements: {
|
|
3350
3456
|
...h,
|
|
@@ -3404,16 +3510,16 @@ function Ja(e) {
|
|
|
3404
3510
|
i
|
|
3405
3511
|
]);
|
|
3406
3512
|
}
|
|
3407
|
-
var
|
|
3513
|
+
var Qa = (e) => ({
|
|
3408
3514
|
name: "arrow",
|
|
3409
3515
|
options: e,
|
|
3410
3516
|
async fn(t) {
|
|
3411
|
-
let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } =
|
|
3517
|
+
let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } = $t(e, t) || {};
|
|
3412
3518
|
if (l == null) return {};
|
|
3413
|
-
let d =
|
|
3519
|
+
let d = gn(u), f = {
|
|
3414
3520
|
x: n,
|
|
3415
3521
|
y: r
|
|
3416
|
-
}, p =
|
|
3522
|
+
}, p = rn(i), m = nn(p), h = await o.getDimensions(l), g = p === "y", _ = g ? "top" : "left", v = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", b = a.reference[m] + a.reference[p] - f[p] - a.floating[m], x = f[p] - a.reference[p], S = s.floating[y] || a.floating[m], C = b / 2 - x / 2, w = S / 2 - h[m] / 2 - 1, T = Math.min(d[_], w), E = Math.min(d[v], w), D = T, O = S - h[m] - E, k = S / 2 - h[m] / 2 + C, A = Qt(D, k, O), j = !c.arrow && en(i) != null && k !== A && a.reference[m] / 2 - (k < D ? T : E) - h[m] / 2 < 0, M = j ? k < D ? k - D : k - O : 0;
|
|
3417
3523
|
return {
|
|
3418
3524
|
[p]: f[p] + M,
|
|
3419
3525
|
data: {
|
|
@@ -3424,24 +3530,24 @@ var Ya = (e) => ({
|
|
|
3424
3530
|
reset: j
|
|
3425
3531
|
};
|
|
3426
3532
|
}
|
|
3427
|
-
}),
|
|
3428
|
-
let { name: n, fn: r } =
|
|
3533
|
+
}), $a = (e, t) => {
|
|
3534
|
+
let { name: n, fn: r } = Qa(e);
|
|
3429
3535
|
return {
|
|
3430
3536
|
name: n,
|
|
3431
3537
|
fn: r,
|
|
3432
3538
|
options: [e, t]
|
|
3433
3539
|
};
|
|
3434
|
-
},
|
|
3540
|
+
}, eo = {
|
|
3435
3541
|
name: "hide",
|
|
3436
3542
|
async fn(e) {
|
|
3437
3543
|
let { width: t, height: n, x: r, y: i } = e.rects.reference, a = t === 0 && n === 0 && r === 0 && i === 0, o = await e.platform.detectOverflow(e, { elementContext: "reference" });
|
|
3438
3544
|
return { data: { referenceHidden: o.top - n >= 0 || o.right - t >= 0 || o.bottom - n >= 0 || o.left - t >= 0 || a } };
|
|
3439
3545
|
}
|
|
3440
|
-
},
|
|
3546
|
+
}, to = {
|
|
3441
3547
|
sideX: "left",
|
|
3442
3548
|
sideY: "top"
|
|
3443
|
-
},
|
|
3444
|
-
function
|
|
3549
|
+
}, no = "--available-width", ro = "--available-height", io = "--anchor-width", ao = "--anchor-height", oo = "--transform-origin", so = no, co = ro;
|
|
3550
|
+
function lo(e, t, n) {
|
|
3445
3551
|
let r = e === "inline-start" || e === "inline-end";
|
|
3446
3552
|
return {
|
|
3447
3553
|
top: "top",
|
|
@@ -3450,11 +3556,11 @@ function oo(e, t, n) {
|
|
|
3450
3556
|
left: r ? n ? "inline-end" : "inline-start" : "left"
|
|
3451
3557
|
}[t];
|
|
3452
3558
|
}
|
|
3453
|
-
function
|
|
3559
|
+
function uo(e, t, n) {
|
|
3454
3560
|
let { rects: r, placement: i } = e;
|
|
3455
3561
|
return {
|
|
3456
|
-
side:
|
|
3457
|
-
align:
|
|
3562
|
+
side: lo(t, X(i), n),
|
|
3563
|
+
align: en(i) || "center",
|
|
3458
3564
|
anchor: {
|
|
3459
3565
|
width: r.reference.width,
|
|
3460
3566
|
height: r.reference.height
|
|
@@ -3465,20 +3571,20 @@ function so(e, t, n) {
|
|
|
3465
3571
|
}
|
|
3466
3572
|
};
|
|
3467
3573
|
}
|
|
3468
|
-
function
|
|
3469
|
-
return
|
|
3574
|
+
function fo(e) {
|
|
3575
|
+
return po(e, Za);
|
|
3470
3576
|
}
|
|
3471
|
-
function
|
|
3472
|
-
let { anchor: n, positionMethod: r = "absolute", side: i = "bottom", sideOffset: a = 0, align: o = "center", alignOffset: c = 0, collisionBoundary: l, collisionPadding: u = 5, sticky: d = !1, arrowPadding: f = 5, disableAnchorTracking: m = !1, inline: h, keepMounted: g = !1, floatingRootContext: _, mounted: v, collisionAvoidance: y, shift: b, nodeId: S, adaptiveOrigin: C, lazyFlip: w = !1, externalTree: T } = e, E = y.side || "flip", D = y.align || "flip", O = y.fallbackAxisSide || "end", k = b?.crossAxis ?? !1, A = b?.rootBoundary, j = typeof n == "function" ? n : void 0, M = x(j), N = j ? M : n, P = J(n), ee = J(v),
|
|
3473
|
-
!v &&
|
|
3474
|
-
let L = w === "placement",
|
|
3577
|
+
function po(e, t) {
|
|
3578
|
+
let { anchor: n, positionMethod: r = "absolute", side: i = "bottom", sideOffset: a = 0, align: o = "center", alignOffset: c = 0, collisionBoundary: l, collisionPadding: u = 5, sticky: d = !1, arrowPadding: f = 5, disableAnchorTracking: m = !1, inline: h, keepMounted: g = !1, floatingRootContext: _, mounted: v, collisionAvoidance: y, shift: b, nodeId: S, adaptiveOrigin: C, lazyFlip: w = !1, externalTree: T } = e, E = y.side || "flip", D = y.align || "flip", O = y.fallbackAxisSide || "end", k = b?.crossAxis ?? !1, A = b?.rootBoundary, j = typeof n == "function" ? n : void 0, M = x(j), N = j ? M : n, P = J(n), ee = J(v), te = ie() === "rtl", [F, I] = B.useState(null);
|
|
3579
|
+
!v && F !== null && I(null);
|
|
3580
|
+
let L = w === "placement", ne = F ? X(F) : null, re = F && L ? en(F) || "center" : null, R = ne || {
|
|
3475
3581
|
top: "top",
|
|
3476
3582
|
right: "right",
|
|
3477
3583
|
bottom: "bottom",
|
|
3478
3584
|
left: "left",
|
|
3479
|
-
"inline-end":
|
|
3480
|
-
"inline-start":
|
|
3481
|
-
}[i],
|
|
3585
|
+
"inline-end": te ? "left" : "right",
|
|
3586
|
+
"inline-start": te ? "right" : "left"
|
|
3587
|
+
}[i], z = re || o, ae = z === "center" ? R : `${R}-${z}`, V = u;
|
|
3482
3588
|
typeof V == "number" ? V = {
|
|
3483
3589
|
top: V,
|
|
3484
3590
|
right: V,
|
|
@@ -3494,8 +3600,8 @@ function lo(e, t) {
|
|
|
3494
3600
|
boundary: l === "clipping-ancestors" ? "clippingAncestors" : l,
|
|
3495
3601
|
padding: V
|
|
3496
3602
|
}, U = B.useRef(null), W = J(a), ue = J(c), de = typeof a == "function" ? 0 : a, fe = typeof c == "function" ? 0 : c, pe = [];
|
|
3497
|
-
h && pe.push(h), pe.push(
|
|
3498
|
-
let t =
|
|
3603
|
+
h && pe.push(h), pe.push(ka((e) => {
|
|
3604
|
+
let t = uo(e, i, te), n = typeof W.current == "function" ? W.current(t) : W.current, r = typeof ue.current == "function" ? ue.current(t) : ue.current;
|
|
3499
3605
|
return {
|
|
3500
3606
|
mainAxis: n,
|
|
3501
3607
|
crossAxis: r,
|
|
@@ -3504,10 +3610,10 @@ function lo(e, t) {
|
|
|
3504
3610
|
}, [
|
|
3505
3611
|
de,
|
|
3506
3612
|
fe,
|
|
3507
|
-
|
|
3613
|
+
te,
|
|
3508
3614
|
i
|
|
3509
3615
|
]));
|
|
3510
|
-
let me = D === "none" && E !== "shift", he = !me && (d || k || E === "shift"), ge = E === "none" ? null :
|
|
3616
|
+
let me = D === "none" && E !== "shift", he = !me && (d || k || E === "shift"), ge = E === "none" ? null : Ma({
|
|
3511
3617
|
...le,
|
|
3512
3618
|
padding: {
|
|
3513
3619
|
top: V.top + 1 + oe,
|
|
@@ -3518,14 +3624,14 @@ function lo(e, t) {
|
|
|
3518
3624
|
mainAxis: !k && E === "flip",
|
|
3519
3625
|
crossAxis: D === "flip" && "alignment",
|
|
3520
3626
|
fallbackAxisSideDirection: O
|
|
3521
|
-
}), _e = me ? null :
|
|
3627
|
+
}), _e = me ? null : Aa({
|
|
3522
3628
|
...le,
|
|
3523
3629
|
rootBoundary: A,
|
|
3524
3630
|
mainAxis: D !== "none",
|
|
3525
3631
|
crossAxis: he,
|
|
3526
|
-
limiter: d || k ? void 0 :
|
|
3632
|
+
limiter: d || k ? void 0 : ja((e) => {
|
|
3527
3633
|
if (!U.current) return {};
|
|
3528
|
-
let { width: t, height: n } = U.current.getBoundingClientRect(), r =
|
|
3634
|
+
let { width: t, height: n } = U.current.getBoundingClientRect(), r = Z(X(e.placement)), i = r === "y" ? t : n, a = r === "y" ? V.left + V.right : V.top + V.bottom;
|
|
3529
3635
|
return { offset: i / 2 + a / 2 };
|
|
3530
3636
|
})
|
|
3531
3637
|
}, [
|
|
@@ -3536,27 +3642,27 @@ function lo(e, t) {
|
|
|
3536
3642
|
V,
|
|
3537
3643
|
D
|
|
3538
3644
|
]);
|
|
3539
|
-
E === "shift" || D === "shift" ||
|
|
3645
|
+
E === "shift" || D === "shift" || z === "center" ? pe.push(_e, ge) : pe.push(ge, _e), pe.push(Na({
|
|
3540
3646
|
...le,
|
|
3541
3647
|
apply({ elements: { floating: e }, availableWidth: t, availableHeight: n, rects: r }) {
|
|
3542
3648
|
if (!ee.current) return;
|
|
3543
3649
|
let i = e.style;
|
|
3544
|
-
i.setProperty(
|
|
3650
|
+
i.setProperty(so, `${t}px`), i.setProperty(co, `${n}px`);
|
|
3545
3651
|
let a = p(e).devicePixelRatio || 1, { x: o, y: s, width: c, height: l } = r.reference, u = (Math.round((o + c) * a) - Math.round(o * a)) / a, d = (Math.round((s + l) * a) - Math.round(s * a)) / a;
|
|
3546
|
-
i.setProperty(
|
|
3652
|
+
i.setProperty(io, `${u}px`), i.setProperty(ao, `${d}px`);
|
|
3547
3653
|
}
|
|
3548
|
-
}),
|
|
3654
|
+
}), $a((e) => ({
|
|
3549
3655
|
element: U.current || Y(e.elements.floating).createElement("div"),
|
|
3550
3656
|
padding: U.current ? f : 0
|
|
3551
3657
|
}), [f]), {
|
|
3552
3658
|
name: "transformOrigin",
|
|
3553
3659
|
fn(e) {
|
|
3554
|
-
let { elements: { floating: t }, middlewareData: n, placement: r, platform: o, rects: s, y: c } = e, l = X(r), u =
|
|
3660
|
+
let { elements: { floating: t }, middlewareData: n, placement: r, platform: o, rects: s, y: c } = e, l = X(r), u = en(r), d = Z(l) === "y", f = U.current, p = typeof a == "function" ? a(uo(e, i, te)) : a, m;
|
|
3555
3661
|
m = !f && u && Math.abs(d ? n.shift?.x || 0 : n.shift?.y || 0) <= 1 ? u === "start" === (d && o.isRTL?.(t) === !0) ? "100%" : "0%" : `${(d ? n.arrow?.x || 0 : n.arrow?.y || 0) + (d ? f?.clientWidth || 0 : f?.clientHeight || 0) / 2}px`;
|
|
3556
3662
|
let h = l === "top" || l === "left" ? `calc(100% + ${p}px)` : `${-p}px`;
|
|
3557
|
-
return he && d && Math.abs(n.shift?.y || 0) > p && (h = `${s.reference.y + s.reference.height / 2 - c}px`), t.style.setProperty(
|
|
3663
|
+
return he && d && Math.abs(n.shift?.y || 0) > p && (h = `${s.reference.y + s.reference.height / 2 - c}px`), t.style.setProperty(oo, d ? `${m} ${h}` : `${h} ${m}`), {};
|
|
3558
3664
|
}
|
|
3559
|
-
},
|
|
3665
|
+
}, eo, C), s(() => {
|
|
3560
3666
|
!v && _ && _.update({
|
|
3561
3667
|
referenceElement: null,
|
|
3562
3668
|
floatingElement: null,
|
|
@@ -3574,10 +3680,10 @@ function lo(e, t) {
|
|
|
3574
3680
|
placement: ae,
|
|
3575
3681
|
middleware: pe,
|
|
3576
3682
|
strategy: r,
|
|
3577
|
-
whileElementsMounted: g ? void 0 : (...e) =>
|
|
3683
|
+
whileElementsMounted: g ? void 0 : (...e) => ga(...e, ve),
|
|
3578
3684
|
nodeId: S,
|
|
3579
3685
|
externalTree: T
|
|
3580
|
-
}), { sideX: Oe, sideY: ke } = Ce.adaptiveOrigin ||
|
|
3686
|
+
}), { sideX: Oe, sideY: ke } = Ce.adaptiveOrigin || to, Ae = G ? r : "fixed", je = B.useMemo(() => {
|
|
3581
3687
|
let e;
|
|
3582
3688
|
return e = G ? C ? {
|
|
3583
3689
|
position: Ae,
|
|
@@ -3590,7 +3696,7 @@ function lo(e, t) {
|
|
|
3590
3696
|
position: Ae,
|
|
3591
3697
|
top: 0,
|
|
3592
3698
|
left: 0
|
|
3593
|
-
}, e[
|
|
3699
|
+
}, e[so] = "100vw", e[co] = "100vh", G || (e.opacity = 0), e;
|
|
3594
3700
|
}, [
|
|
3595
3701
|
C,
|
|
3596
3702
|
Ae,
|
|
@@ -3603,7 +3709,7 @@ function lo(e, t) {
|
|
|
3603
3709
|
]), Me = B.useRef(null);
|
|
3604
3710
|
s(() => {
|
|
3605
3711
|
if (!v) return;
|
|
3606
|
-
let e = P.current, t = typeof e == "function" ? e() : e, n = (
|
|
3712
|
+
let e = P.current, t = typeof e == "function" ? e() : e, n = (mo(t) ? t.current : t) || null;
|
|
3607
3713
|
n !== Me.current && (ye.setPositionReference(n), Me.current = n);
|
|
3608
3714
|
}, [
|
|
3609
3715
|
v,
|
|
@@ -3613,14 +3719,14 @@ function lo(e, t) {
|
|
|
3613
3719
|
]), B.useEffect(() => {
|
|
3614
3720
|
if (!v) return;
|
|
3615
3721
|
let e = P.current;
|
|
3616
|
-
typeof e != "function" &&
|
|
3722
|
+
typeof e != "function" && mo(e) && e.current !== Me.current && (ye.setPositionReference(e.current), Me.current = e.current);
|
|
3617
3723
|
}, [
|
|
3618
3724
|
v,
|
|
3619
3725
|
ye,
|
|
3620
3726
|
N,
|
|
3621
3727
|
P
|
|
3622
3728
|
]), B.useEffect(() => {
|
|
3623
|
-
if (g && v && be.reference && be.floating) return
|
|
3729
|
+
if (g && v && be.reference && be.floating) return ga(be.reference, be.floating, we, ve);
|
|
3624
3730
|
}, [
|
|
3625
3731
|
g,
|
|
3626
3732
|
v,
|
|
@@ -3628,9 +3734,9 @@ function lo(e, t) {
|
|
|
3628
3734
|
we,
|
|
3629
3735
|
ve
|
|
3630
3736
|
]);
|
|
3631
|
-
let Ne = X(Te), Pe =
|
|
3737
|
+
let Ne = X(Te), Pe = lo(i, Ne, te), Fe = en(Te) || "center", Ie = !!Ce.hide?.referenceHidden;
|
|
3632
3738
|
s(() => {
|
|
3633
|
-
w && v && G && (Ne !==
|
|
3739
|
+
w && v && G && (Ne !== R || L && Fe !== z) && I(Te);
|
|
3634
3740
|
}, [
|
|
3635
3741
|
w,
|
|
3636
3742
|
L,
|
|
@@ -3639,8 +3745,8 @@ function lo(e, t) {
|
|
|
3639
3745
|
Te,
|
|
3640
3746
|
Ne,
|
|
3641
3747
|
Fe,
|
|
3642
|
-
|
|
3643
|
-
|
|
3748
|
+
R,
|
|
3749
|
+
z
|
|
3644
3750
|
]);
|
|
3645
3751
|
let Le = B.useMemo(() => ({
|
|
3646
3752
|
position: "absolute",
|
|
@@ -3675,13 +3781,13 @@ function lo(e, t) {
|
|
|
3675
3781
|
we
|
|
3676
3782
|
]);
|
|
3677
3783
|
}
|
|
3678
|
-
function
|
|
3784
|
+
function mo(e) {
|
|
3679
3785
|
return e != null && "current" in e;
|
|
3680
3786
|
}
|
|
3681
|
-
function
|
|
3682
|
-
return e === "starting" ?
|
|
3787
|
+
function ho(e) {
|
|
3788
|
+
return e === "starting" ? $n : O;
|
|
3683
3789
|
}
|
|
3684
|
-
function
|
|
3790
|
+
function go(e, t, { styles: n, transitionStatus: r, props: i, refs: a, hidden: o, inert: s = !1 }) {
|
|
3685
3791
|
let c = { ...n };
|
|
3686
3792
|
return s && (c.pointerEvents = "none"), C("div", e, {
|
|
3687
3793
|
state: t,
|
|
@@ -3692,14 +3798,14 @@ function po(e, t, { styles: n, transitionStatus: r, props: i, refs: a, hidden: o
|
|
|
3692
3798
|
hidden: o,
|
|
3693
3799
|
style: c
|
|
3694
3800
|
},
|
|
3695
|
-
|
|
3801
|
+
ho(r),
|
|
3696
3802
|
i
|
|
3697
3803
|
],
|
|
3698
|
-
stateAttributesMapping:
|
|
3804
|
+
stateAttributesMapping: ht
|
|
3699
3805
|
});
|
|
3700
3806
|
}
|
|
3701
|
-
var
|
|
3702
|
-
let { render: n, className: r, anchor: i, positionMethod: a = "absolute", side: o = "top", align: s = "center", sideOffset: c = 0, alignOffset: l = 0, collisionBoundary: u = "clipping-ancestors", collisionPadding: d = 5, arrowPadding: f = 5, sticky: p = !1, disableAnchorTracking: m = !1, collisionAvoidance: h =
|
|
3807
|
+
var _o = /*#__PURE__*/ B.forwardRef(function(e, t) {
|
|
3808
|
+
let { render: n, className: r, anchor: i, positionMethod: a = "absolute", side: o = "top", align: s = "center", sideOffset: c = 0, alignOffset: l = 0, collisionBoundary: u = "clipping-ancestors", collisionPadding: d = 5, arrowPadding: f = 5, sticky: p = !1, disableAnchorTracking: m = !1, collisionAvoidance: h = nr, style: g, ..._ } = e, v = be(), y = Ka(), b = v.useState("open"), x = v.useState("mounted"), S = v.useState("trackCursorAxis"), C = v.useState("disableHoverablePopup"), w = v.useState("floatingRootContext"), T = v.useState("instantType"), E = v.useState("transitionStatus"), D = fo({
|
|
3703
3809
|
anchor: i,
|
|
3704
3810
|
positionMethod: a,
|
|
3705
3811
|
floatingRootContext: w,
|
|
@@ -3716,7 +3822,7 @@ var mo = /*#__PURE__*/ B.forwardRef(function(e, t) {
|
|
|
3716
3822
|
keepMounted: y,
|
|
3717
3823
|
collisionAvoidance: h,
|
|
3718
3824
|
adaptiveOrigin: v.useState("adaptiveOrigin")
|
|
3719
|
-
}), O =
|
|
3825
|
+
}), O = go(e, B.useMemo(() => ({
|
|
3720
3826
|
open: b,
|
|
3721
3827
|
side: D.side,
|
|
3722
3828
|
align: D.align,
|
|
@@ -3737,21 +3843,21 @@ var mo = /*#__PURE__*/ B.forwardRef(function(e, t) {
|
|
|
3737
3843
|
hidden: !x,
|
|
3738
3844
|
inert: !b || S === "both" || C
|
|
3739
3845
|
});
|
|
3740
|
-
return /*#__PURE__*/ W(
|
|
3846
|
+
return /*#__PURE__*/ W(Ya.Provider, {
|
|
3741
3847
|
value: D,
|
|
3742
3848
|
children: O
|
|
3743
3849
|
});
|
|
3744
3850
|
});
|
|
3745
|
-
process.env.NODE_ENV !== "production" && (
|
|
3746
|
-
var
|
|
3747
|
-
let { render: n, className: r, style: i, ...a } = e, o = be(), { side: s, align: c } =
|
|
3748
|
-
|
|
3851
|
+
process.env.NODE_ENV !== "production" && (_o.displayName = "TooltipPositioner");
|
|
3852
|
+
var vo = /*#__PURE__*/ B.forwardRef(function(e, t) {
|
|
3853
|
+
let { render: n, className: r, style: i, ...a } = e, o = be(), { side: s, align: c } = Xa(), l = o.useState("open"), u = o.useState("instantType"), d = o.useState("transitionStatus"), f = o.useState("popupProps"), p = o.useState("floatingRootContext"), m = o.useState("disabled"), h = o.useState("closeDelay");
|
|
3854
|
+
jr({
|
|
3749
3855
|
open: l,
|
|
3750
3856
|
ref: o.context.popupRef,
|
|
3751
3857
|
onComplete() {
|
|
3752
3858
|
l && o.context.onOpenChangeComplete?.(!0);
|
|
3753
3859
|
}
|
|
3754
|
-
}),
|
|
3860
|
+
}), xi(p, {
|
|
3755
3861
|
enabled: !m,
|
|
3756
3862
|
closeDelay: h
|
|
3757
3863
|
});
|
|
@@ -3770,17 +3876,17 @@ var ho = /*#__PURE__*/ B.forwardRef(function(e, t) {
|
|
|
3770
3876
|
g
|
|
3771
3877
|
],
|
|
3772
3878
|
props: [
|
|
3773
|
-
|
|
3879
|
+
Nr,
|
|
3774
3880
|
f,
|
|
3775
|
-
|
|
3881
|
+
ho(d),
|
|
3776
3882
|
a
|
|
3777
3883
|
],
|
|
3778
|
-
stateAttributesMapping:
|
|
3884
|
+
stateAttributesMapping: gt
|
|
3779
3885
|
});
|
|
3780
3886
|
});
|
|
3781
|
-
process.env.NODE_ENV !== "production" && (
|
|
3782
|
-
var
|
|
3783
|
-
let { render: n, className: r, style: i, ...a } = e, o = be(), { arrowRef: s, side: c, align: l, arrowUncentered: u, arrowStyles: d } =
|
|
3887
|
+
process.env.NODE_ENV !== "production" && (vo.displayName = "TooltipPopup");
|
|
3888
|
+
var yo = /*#__PURE__*/ B.forwardRef(function(e, t) {
|
|
3889
|
+
let { render: n, className: r, style: i, ...a } = e, o = be(), { arrowRef: s, side: c, align: l, arrowUncentered: u, arrowStyles: d } = Xa(), f = {
|
|
3784
3890
|
open: o.useState("open"),
|
|
3785
3891
|
side: c,
|
|
3786
3892
|
align: l,
|
|
@@ -3794,34 +3900,34 @@ var go = /*#__PURE__*/ B.forwardRef(function(e, t) {
|
|
|
3794
3900
|
style: d,
|
|
3795
3901
|
"aria-hidden": !0
|
|
3796
3902
|
}, a],
|
|
3797
|
-
stateAttributesMapping:
|
|
3903
|
+
stateAttributesMapping: ht
|
|
3798
3904
|
});
|
|
3799
3905
|
});
|
|
3800
|
-
process.env.NODE_ENV !== "production" && (
|
|
3801
|
-
var
|
|
3906
|
+
process.env.NODE_ENV !== "production" && (yo.displayName = "TooltipArrow");
|
|
3907
|
+
var bo = function(e) {
|
|
3802
3908
|
let { delay: t, closeDelay: n, timeout: r = 400 } = e, i = B.useMemo(() => ({
|
|
3803
3909
|
open: t,
|
|
3804
3910
|
close: n
|
|
3805
3911
|
}), [t, n]);
|
|
3806
|
-
return /*#__PURE__*/ W(
|
|
3912
|
+
return /*#__PURE__*/ W(Ba.Provider, {
|
|
3807
3913
|
value: t,
|
|
3808
|
-
children: /*#__PURE__*/ W(
|
|
3914
|
+
children: /*#__PURE__*/ W(Nt, {
|
|
3809
3915
|
delay: i,
|
|
3810
3916
|
timeoutMs: r,
|
|
3811
3917
|
children: e.children
|
|
3812
3918
|
})
|
|
3813
3919
|
});
|
|
3814
3920
|
};
|
|
3815
|
-
process.env.NODE_ENV !== "production" && (
|
|
3816
|
-
function
|
|
3817
|
-
return /* @__PURE__ */ W(
|
|
3921
|
+
process.env.NODE_ENV !== "production" && (bo.displayName = "TooltipProvider");
|
|
3922
|
+
function xo({ delay: e = 0, ...t }) {
|
|
3923
|
+
return /* @__PURE__ */ W(bo, {
|
|
3818
3924
|
"data-slot": "tooltip-provider",
|
|
3819
3925
|
delay: e,
|
|
3820
3926
|
...t
|
|
3821
3927
|
});
|
|
3822
3928
|
}
|
|
3823
|
-
var
|
|
3824
|
-
function
|
|
3929
|
+
var So = B.createContext(null);
|
|
3930
|
+
function Co({ open: e, defaultOpen: t = !1, disabled: n, onOpenChange: r, ...i }) {
|
|
3825
3931
|
let a = B.useId(), [o, s] = B.useState(a), [c, l] = B.useState(t), u = B.useMemo(() => ({
|
|
3826
3932
|
id: o,
|
|
3827
3933
|
setId: s,
|
|
@@ -3832,9 +3938,9 @@ function bo({ open: e, defaultOpen: t = !1, disabled: n, onOpenChange: r, ...i }
|
|
|
3832
3938
|
e,
|
|
3833
3939
|
c
|
|
3834
3940
|
]);
|
|
3835
|
-
return /* @__PURE__ */ W(
|
|
3941
|
+
return /* @__PURE__ */ W(So.Provider, {
|
|
3836
3942
|
value: u,
|
|
3837
|
-
children: /* @__PURE__ */ W(
|
|
3943
|
+
children: /* @__PURE__ */ W(Ra, {
|
|
3838
3944
|
"data-slot": "tooltip",
|
|
3839
3945
|
open: e,
|
|
3840
3946
|
defaultOpen: t,
|
|
@@ -3846,49 +3952,49 @@ function bo({ open: e, defaultOpen: t = !1, disabled: n, onOpenChange: r, ...i }
|
|
|
3846
3952
|
})
|
|
3847
3953
|
});
|
|
3848
3954
|
}
|
|
3849
|
-
var
|
|
3955
|
+
var wo = B.forwardRef(function({ "aria-describedby": e, ...t }, n) {
|
|
3850
3956
|
let r = B.useCallback((e) => {
|
|
3851
3957
|
if (typeof n == "function") return n(e);
|
|
3852
3958
|
n && (n.current = e);
|
|
3853
|
-
}, [n]), i = B.useContext(
|
|
3854
|
-
return /* @__PURE__ */ W(
|
|
3959
|
+
}, [n]), i = B.useContext(So), a = [e, i?.open ? i.id : void 0].filter(Boolean).join(" ") || void 0;
|
|
3960
|
+
return /* @__PURE__ */ W(Wa, {
|
|
3855
3961
|
ref: r,
|
|
3856
3962
|
"data-slot": "tooltip-trigger",
|
|
3857
3963
|
"aria-describedby": a,
|
|
3858
3964
|
...t
|
|
3859
3965
|
});
|
|
3860
3966
|
});
|
|
3861
|
-
|
|
3862
|
-
var
|
|
3863
|
-
let l = ae(), u = B.useContext(
|
|
3967
|
+
wo.displayName = "TooltipTrigger";
|
|
3968
|
+
var To = B.forwardRef(function({ className: e, id: t, side: n = "top", sideOffset: r = 4, align: i = "center", alignOffset: a = 0, children: o, ...s }, c) {
|
|
3969
|
+
let l = ae(), u = B.useContext(So), d = B.useId(), f = t ?? u?.id ?? d, p = u?.setId;
|
|
3864
3970
|
return B.useEffect(() => {
|
|
3865
3971
|
p?.(t ?? d);
|
|
3866
3972
|
}, [
|
|
3867
3973
|
t,
|
|
3868
3974
|
d,
|
|
3869
3975
|
p
|
|
3870
|
-
]), /* @__PURE__ */ W(
|
|
3976
|
+
]), /* @__PURE__ */ W(Ja, {
|
|
3871
3977
|
container: l ?? void 0,
|
|
3872
|
-
children: /* @__PURE__ */ W(
|
|
3978
|
+
children: /* @__PURE__ */ W(_o, {
|
|
3873
3979
|
align: i,
|
|
3874
3980
|
alignOffset: a,
|
|
3875
3981
|
side: n,
|
|
3876
3982
|
sideOffset: r,
|
|
3877
3983
|
className: "ck-tooltip-positioner",
|
|
3878
|
-
children: /* @__PURE__ */ ue(
|
|
3984
|
+
children: /* @__PURE__ */ ue(vo, {
|
|
3879
3985
|
ref: c,
|
|
3880
3986
|
"data-slot": "tooltip-content",
|
|
3881
3987
|
id: f,
|
|
3882
3988
|
role: "tooltip",
|
|
3883
3989
|
className: _("ck-tooltip-content", e),
|
|
3884
3990
|
...s,
|
|
3885
|
-
children: [o, /* @__PURE__ */ W(
|
|
3991
|
+
children: [o, /* @__PURE__ */ W(yo, { className: "ck-tooltip-arrow" })]
|
|
3886
3992
|
})
|
|
3887
3993
|
})
|
|
3888
3994
|
});
|
|
3889
3995
|
});
|
|
3890
|
-
|
|
3891
|
-
var
|
|
3996
|
+
To.displayName = "TooltipContent";
|
|
3997
|
+
var Eo = /*#__PURE__*/ B.forwardRef(function(e, t) {
|
|
3892
3998
|
let { className: n, render: r, orientation: i = "horizontal", style: a, ...o } = e;
|
|
3893
3999
|
return C("div", e, {
|
|
3894
4000
|
state: { orientation: i },
|
|
@@ -3899,9 +4005,9 @@ var Co = /*#__PURE__*/ B.forwardRef(function(e, t) {
|
|
|
3899
4005
|
}, o]
|
|
3900
4006
|
});
|
|
3901
4007
|
});
|
|
3902
|
-
process.env.NODE_ENV !== "production" && (
|
|
3903
|
-
var
|
|
3904
|
-
return /* @__PURE__ */ W(
|
|
4008
|
+
process.env.NODE_ENV !== "production" && (Eo.displayName = "Separator");
|
|
4009
|
+
var Do = B.forwardRef(function({ className: e, orientation: t = "horizontal", ...n }, r) {
|
|
4010
|
+
return /* @__PURE__ */ W(Eo, {
|
|
3905
4011
|
ref: r,
|
|
3906
4012
|
"data-slot": "separator",
|
|
3907
4013
|
orientation: t,
|
|
@@ -3911,5 +4017,5 @@ var wo = B.forwardRef(function({ className: e, orientation: t = "horizontal", ..
|
|
|
3911
4017
|
...n
|
|
3912
4018
|
});
|
|
3913
4019
|
});
|
|
3914
|
-
|
|
3915
|
-
export {
|
|
4020
|
+
Do.displayName = "Separator";
|
|
4021
|
+
export { tr as $, K as $t, Wr as A, St as At, Er as B, nt as Bt, Nr as C, Y as Ct, Pr as D, Ft as Dt, Br as E, J as Et, Rr as F, gt as Ft, _r as G, Ze as Gt, wr as H, tt as Ht, Mr as I, mt as It, mr as J, Ke as Jt, hr as K, Xe as Kt, jr as L, pt as Lt, Fr as M, xt as Mt, Kr as N, wt as Nt, zr as O, q as Ot, Hr as P, ht as Pt, er as Q, He as Qt, Ar as R, ot as Rt, Yr as S, Wt as St, Vr as T, Vt as Tt, vr as U, rt as Ut, Tr as V, it as Vt, gr as W, et as Wt, cr as X, Je as Xt, ur as Y, qe as Yt, ar as Z, Ve as Zt, oi as _, yn as _t, xo as a, Pe as an, Wn as at, ri as b, Gt as bt, ho as c, je as cn, qn as ct, pa as d, ke as dn, Q as dt, Ue as en, nr as et, Ai as f, ge as fn, Cn as ft, pi as g, En as gt, hi as h, Sn as ht, To as i, Fe as in, Vn as it, Gr as j, Ct as jt, Ur as k, Tt as kt, fo as l, Oe as ln, Bn as lt, xi as m, bn as mt, Eo as n, Le as nn, Zn as nt, wo as o, Ne as on, Gn as ot, Ci as p, _e as pn, xn as pt, pr as q, Ye as qt, Co as r, Re as rn, Xn as rt, go as s, Me as sn, Kn as st, Do as t, ze as tn, Qn as tt, qa as u, G as un, Hn as ut, fi as v, wn as vt, Ir as w, Bt as wt, U as x, Ut as xt, ai as y, _n as yt, Dr as z, st as zt };
|