@odynn/awayz-core 0.6.48 → 0.9.0
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/dist/{Combination-Bx3lWLOq.js → Combination-CrPZjD5u.js} +382 -382
- package/dist/{TripsService-DywrB9bi.js → TripsService-ByimRRRe.js} +1 -1
- package/dist/assets/_styles.css +1 -1
- package/dist/assets/_styles3.css +1 -1
- package/dist/components/Bookings/FlightBooking/FlightBooking.js +1 -1
- package/dist/components/Bookings/HotelBooking/HotelBooking.js +2 -2
- package/dist/components/CashValue/CashValue.js +6 -6
- package/dist/components/CashValue/CashValue.stories.js +7 -7
- package/dist/components/ClientPointsValue/ClientPointsValue.js +50 -0
- package/dist/components/Menu/Menu.js +2 -2
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Wallet/Card/Card.js +2 -2
- package/dist/components/Wallet/Card/Card.stories.js +6 -6
- package/dist/components/index.js +13 -11
- package/dist/hooks/useAwayzAuth/useAwayzAuth.js +4 -4
- package/dist/hooks/useBookingManagement/useBookingManagement.js +5 -5
- package/dist/hooks/useBookingManagement/useBookingManagement.test.js +6 -6
- package/dist/hooks/useFeatureFlags.js +35 -31
- package/dist/hooks/useSearchLimit.js +1 -1
- package/dist/hooks/useTripManagement/useTripManagement.js +6 -6
- package/dist/hooks/useTripManagement/useTripManagement.test.js +7 -7
- package/dist/hooks/useWallet/useWallet.js +5 -5
- package/dist/hooks/useWallet/useWallet.test.js +6 -6
- package/dist/{index-Bt2pq2GP.js → index-C8p5kinH.js} +2 -2
- package/dist/lib/components/ClientPointsValue/ClientPointsValue.d.ts +6 -0
- package/dist/lib/components/index.d.ts +4 -3
- package/dist/lib/hooks/useFeatureFlags.d.ts +8 -3
- package/dist/lib/main.d.ts +1 -0
- package/dist/lib/services/instanceConfig.d.ts +2 -2
- package/dist/main.js +44 -39
- package/dist/{noRetryInstance-Y6wcm2ZM.js → noRetryInstance-oiHCni_Z.js} +4 -4
- package/dist/providers/AwayzProvider.js +8 -8
- package/dist/services/account/AccountService.js +1 -1
- package/dist/services/bookings/BookingService.js +1 -1
- package/dist/services/currency/CurrencyService.js +6 -6
- package/dist/services/features/featureService.js +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/instance.js +1 -1
- package/dist/services/instanceConfig.js +5 -5
- package/dist/services/noRetryInstance.js +1 -1
- package/dist/services/preferences/PreferencesService.js +1 -1
- package/dist/services/rewards/RewardsService.js +1 -1
- package/dist/services/trips/TripsService.js +2 -2
- package/dist/services/wallet/WalletService.js +1 -1
- package/package.json +1 -1
|
@@ -2,37 +2,7 @@ import * as m from "react";
|
|
|
2
2
|
import { useLayoutEffect as Ft, useEffect as It, useState as Wt } from "react";
|
|
3
3
|
import { jsx as se } from "react/jsx-runtime";
|
|
4
4
|
import { r as Bt } from "./index-Cv-wvFlM.js";
|
|
5
|
-
function Hr(e, t
|
|
6
|
-
return function(o) {
|
|
7
|
-
if (e == null || e(o), n === !1 || !o.defaultPrevented)
|
|
8
|
-
return t == null ? void 0 : t(o);
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
function qe(e, t) {
|
|
12
|
-
if (typeof e == "function")
|
|
13
|
-
return e(t);
|
|
14
|
-
e != null && (e.current = t);
|
|
15
|
-
}
|
|
16
|
-
function mt(...e) {
|
|
17
|
-
return (t) => {
|
|
18
|
-
let n = !1;
|
|
19
|
-
const r = e.map((o) => {
|
|
20
|
-
const i = qe(o, t);
|
|
21
|
-
return !n && typeof i == "function" && (n = !0), i;
|
|
22
|
-
});
|
|
23
|
-
if (n)
|
|
24
|
-
return () => {
|
|
25
|
-
for (let o = 0; o < r.length; o++) {
|
|
26
|
-
const i = r[o];
|
|
27
|
-
typeof i == "function" ? i() : qe(e[o], null);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
function ht(...e) {
|
|
33
|
-
return m.useCallback(mt(...e), e);
|
|
34
|
-
}
|
|
35
|
-
function Ur(e, t = []) {
|
|
5
|
+
function Hr(e, t = []) {
|
|
36
6
|
let n = [];
|
|
37
7
|
function r(i, s) {
|
|
38
8
|
const c = m.createContext(s), u = n.length;
|
|
@@ -82,6 +52,45 @@ function _t(...e) {
|
|
|
82
52
|
};
|
|
83
53
|
return n.scopeName = t.scopeName, n;
|
|
84
54
|
}
|
|
55
|
+
function qe(e, t) {
|
|
56
|
+
if (typeof e == "function")
|
|
57
|
+
return e(t);
|
|
58
|
+
e != null && (e.current = t);
|
|
59
|
+
}
|
|
60
|
+
function mt(...e) {
|
|
61
|
+
return (t) => {
|
|
62
|
+
let n = !1;
|
|
63
|
+
const r = e.map((o) => {
|
|
64
|
+
const i = qe(o, t);
|
|
65
|
+
return !n && typeof i == "function" && (n = !0), i;
|
|
66
|
+
});
|
|
67
|
+
if (n)
|
|
68
|
+
return () => {
|
|
69
|
+
for (let o = 0; o < r.length; o++) {
|
|
70
|
+
const i = r[o];
|
|
71
|
+
typeof i == "function" ? i() : qe(e[o], null);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function ht(...e) {
|
|
77
|
+
return m.useCallback(mt(...e), e);
|
|
78
|
+
}
|
|
79
|
+
function Ur(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
80
|
+
return function(o) {
|
|
81
|
+
if (e == null || e(o), n === !1 || !o.defaultPrevented)
|
|
82
|
+
return t == null ? void 0 : t(o);
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
var ae = globalThis != null && globalThis.document ? m.useLayoutEffect : () => {
|
|
86
|
+
}, $t = m[" useId ".trim().toString()] || (() => {
|
|
87
|
+
}), Vt = 0;
|
|
88
|
+
function jr(e) {
|
|
89
|
+
const [t, n] = m.useState($t());
|
|
90
|
+
return ae(() => {
|
|
91
|
+
n((r) => r ?? String(Vt++));
|
|
92
|
+
}, [e]), e || (t ? `radix-${t}` : "");
|
|
93
|
+
}
|
|
85
94
|
function We(e) {
|
|
86
95
|
const t = m.useRef(e);
|
|
87
96
|
return m.useEffect(() => {
|
|
@@ -91,7 +100,7 @@ function We(e) {
|
|
|
91
100
|
return (r = t.current) == null ? void 0 : r.call(t, ...n);
|
|
92
101
|
}, []);
|
|
93
102
|
}
|
|
94
|
-
function
|
|
103
|
+
function Kr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
95
104
|
const n = We(e);
|
|
96
105
|
m.useEffect(() => {
|
|
97
106
|
const r = (o) => {
|
|
@@ -100,24 +109,212 @@ function jr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
100
109
|
return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
|
|
101
110
|
}, [n, t]);
|
|
102
111
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
112
|
+
// @__NO_SIDE_EFFECTS__
|
|
113
|
+
function zt(e) {
|
|
114
|
+
const t = /* @__PURE__ */ Ht(e), n = m.forwardRef((r, o) => {
|
|
115
|
+
const { children: i, ...s } = r, c = m.Children.toArray(i), u = c.find(jt);
|
|
116
|
+
if (u) {
|
|
117
|
+
const a = u.props.children, d = c.map((l) => l === u ? m.Children.count(a) > 1 ? m.Children.only(null) : m.isValidElement(a) ? a.props.children : null : l);
|
|
118
|
+
return /* @__PURE__ */ se(t, { ...s, ref: o, children: m.isValidElement(a) ? m.cloneElement(a, void 0, d) : null });
|
|
119
|
+
}
|
|
120
|
+
return /* @__PURE__ */ se(t, { ...s, ref: o, children: i });
|
|
121
|
+
});
|
|
122
|
+
return n.displayName = `${e}.Slot`, n;
|
|
123
|
+
}
|
|
124
|
+
// @__NO_SIDE_EFFECTS__
|
|
125
|
+
function Ht(e) {
|
|
126
|
+
const t = m.forwardRef((n, r) => {
|
|
127
|
+
const { children: o, ...i } = n;
|
|
128
|
+
if (m.isValidElement(o)) {
|
|
129
|
+
const s = Yt(o), c = Kt(i, o.props);
|
|
130
|
+
return o.type !== m.Fragment && (c.ref = r ? mt(r, s) : s), m.cloneElement(o, c);
|
|
131
|
+
}
|
|
132
|
+
return m.Children.count(o) > 1 ? m.Children.only(null) : null;
|
|
133
|
+
});
|
|
134
|
+
return t.displayName = `${e}.SlotClone`, t;
|
|
135
|
+
}
|
|
136
|
+
var Ut = Symbol("radix.slottable");
|
|
137
|
+
function jt(e) {
|
|
138
|
+
return m.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Ut;
|
|
139
|
+
}
|
|
140
|
+
function Kt(e, t) {
|
|
141
|
+
const n = { ...t };
|
|
142
|
+
for (const r in t) {
|
|
143
|
+
const o = e[r], i = t[r];
|
|
144
|
+
/^on[A-Z]/.test(r) ? o && i ? n[r] = (...c) => {
|
|
145
|
+
const u = i(...c);
|
|
146
|
+
return o(...c), u;
|
|
147
|
+
} : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...i } : r === "className" && (n[r] = [o, i].filter(Boolean).join(" "));
|
|
148
|
+
}
|
|
149
|
+
return { ...e, ...n };
|
|
150
|
+
}
|
|
151
|
+
function Yt(e) {
|
|
152
|
+
var r, o;
|
|
153
|
+
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
154
|
+
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
155
|
+
}
|
|
156
|
+
var Xt = [
|
|
157
|
+
"a",
|
|
158
|
+
"button",
|
|
159
|
+
"div",
|
|
160
|
+
"form",
|
|
161
|
+
"h2",
|
|
162
|
+
"h3",
|
|
163
|
+
"img",
|
|
164
|
+
"input",
|
|
165
|
+
"label",
|
|
166
|
+
"li",
|
|
167
|
+
"nav",
|
|
168
|
+
"ol",
|
|
169
|
+
"p",
|
|
170
|
+
"select",
|
|
171
|
+
"span",
|
|
172
|
+
"svg",
|
|
173
|
+
"ul"
|
|
174
|
+
], qt = Xt.reduce((e, t) => {
|
|
175
|
+
const n = /* @__PURE__ */ zt(`Primitive.${t}`), r = m.forwardRef((o, i) => {
|
|
176
|
+
const { asChild: s, ...c } = o, u = s ? n : t;
|
|
177
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ se(u, { ...c, ref: i });
|
|
178
|
+
});
|
|
179
|
+
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
180
|
+
}, {}), Te = "focusScope.autoFocusOnMount", Me = "focusScope.autoFocusOnUnmount", Ze = { bubbles: !1, cancelable: !0 }, Zt = "FocusScope", Gt = m.forwardRef((e, t) => {
|
|
181
|
+
const {
|
|
182
|
+
loop: n = !1,
|
|
183
|
+
trapped: r = !1,
|
|
184
|
+
onMountAutoFocus: o,
|
|
185
|
+
onUnmountAutoFocus: i,
|
|
186
|
+
...s
|
|
187
|
+
} = e, [c, u] = m.useState(null), a = We(o), d = We(i), l = m.useRef(null), v = ht(t, (f) => u(f)), h = m.useRef({
|
|
188
|
+
paused: !1,
|
|
189
|
+
pause() {
|
|
190
|
+
this.paused = !0;
|
|
191
|
+
},
|
|
192
|
+
resume() {
|
|
193
|
+
this.paused = !1;
|
|
194
|
+
}
|
|
195
|
+
}).current;
|
|
196
|
+
m.useEffect(() => {
|
|
197
|
+
if (r) {
|
|
198
|
+
let f = function(b) {
|
|
199
|
+
if (h.paused || !c) return;
|
|
200
|
+
const x = b.target;
|
|
201
|
+
c.contains(x) ? l.current = x : q(l.current, { select: !0 });
|
|
202
|
+
}, p = function(b) {
|
|
203
|
+
if (h.paused || !c) return;
|
|
204
|
+
const x = b.relatedTarget;
|
|
205
|
+
x !== null && (c.contains(x) || q(l.current, { select: !0 }));
|
|
206
|
+
}, y = function(b) {
|
|
207
|
+
if (document.activeElement === document.body)
|
|
208
|
+
for (const S of b)
|
|
209
|
+
S.removedNodes.length > 0 && q(c);
|
|
210
|
+
};
|
|
211
|
+
document.addEventListener("focusin", f), document.addEventListener("focusout", p);
|
|
212
|
+
const w = new MutationObserver(y);
|
|
213
|
+
return c && w.observe(c, { childList: !0, subtree: !0 }), () => {
|
|
214
|
+
document.removeEventListener("focusin", f), document.removeEventListener("focusout", p), w.disconnect();
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
}, [r, c, h.paused]), m.useEffect(() => {
|
|
218
|
+
if (c) {
|
|
219
|
+
Qe.add(h);
|
|
220
|
+
const f = document.activeElement;
|
|
221
|
+
if (!c.contains(f)) {
|
|
222
|
+
const y = new CustomEvent(Te, Ze);
|
|
223
|
+
c.addEventListener(Te, a), c.dispatchEvent(y), y.defaultPrevented || (Qt(rn(vt(c)), { select: !0 }), document.activeElement === f && q(c));
|
|
224
|
+
}
|
|
225
|
+
return () => {
|
|
226
|
+
c.removeEventListener(Te, a), setTimeout(() => {
|
|
227
|
+
const y = new CustomEvent(Me, Ze);
|
|
228
|
+
c.addEventListener(Me, d), c.dispatchEvent(y), y.defaultPrevented || q(f ?? document.body, { select: !0 }), c.removeEventListener(Me, d), Qe.remove(h);
|
|
229
|
+
}, 0);
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
}, [c, a, d, h]);
|
|
233
|
+
const g = m.useCallback(
|
|
234
|
+
(f) => {
|
|
235
|
+
if (!n && !r || h.paused) return;
|
|
236
|
+
const p = f.key === "Tab" && !f.altKey && !f.ctrlKey && !f.metaKey, y = document.activeElement;
|
|
237
|
+
if (p && y) {
|
|
238
|
+
const w = f.currentTarget, [b, x] = Jt(w);
|
|
239
|
+
b && x ? !f.shiftKey && y === x ? (f.preventDefault(), n && q(b, { select: !0 })) : f.shiftKey && y === b && (f.preventDefault(), n && q(x, { select: !0 })) : y === w && f.preventDefault();
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
[n, r, h.paused]
|
|
243
|
+
);
|
|
244
|
+
return /* @__PURE__ */ se(qt.div, { tabIndex: -1, ...s, ref: v, onKeyDown: g });
|
|
245
|
+
});
|
|
246
|
+
Gt.displayName = Zt;
|
|
247
|
+
function Qt(e, { select: t = !1 } = {}) {
|
|
248
|
+
const n = document.activeElement;
|
|
249
|
+
for (const r of e)
|
|
250
|
+
if (q(r, { select: t }), document.activeElement !== n) return;
|
|
251
|
+
}
|
|
252
|
+
function Jt(e) {
|
|
253
|
+
const t = vt(e), n = Ge(t, e), r = Ge(t.reverse(), e);
|
|
254
|
+
return [n, r];
|
|
255
|
+
}
|
|
256
|
+
function vt(e) {
|
|
257
|
+
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
258
|
+
acceptNode: (r) => {
|
|
259
|
+
const o = r.tagName === "INPUT" && r.type === "hidden";
|
|
260
|
+
return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
for (; n.nextNode(); ) t.push(n.currentNode);
|
|
264
|
+
return t;
|
|
265
|
+
}
|
|
266
|
+
function Ge(e, t) {
|
|
267
|
+
for (const n of e)
|
|
268
|
+
if (!en(n, { upTo: t })) return n;
|
|
269
|
+
}
|
|
270
|
+
function en(e, { upTo: t }) {
|
|
271
|
+
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
272
|
+
for (; e; ) {
|
|
273
|
+
if (t !== void 0 && e === t) return !1;
|
|
274
|
+
if (getComputedStyle(e).display === "none") return !0;
|
|
275
|
+
e = e.parentElement;
|
|
276
|
+
}
|
|
277
|
+
return !1;
|
|
278
|
+
}
|
|
279
|
+
function tn(e) {
|
|
280
|
+
return e instanceof HTMLInputElement && "select" in e;
|
|
111
281
|
}
|
|
112
|
-
|
|
282
|
+
function q(e, { select: t = !1 } = {}) {
|
|
283
|
+
if (e && e.focus) {
|
|
284
|
+
const n = document.activeElement;
|
|
285
|
+
e.focus({ preventScroll: !0 }), e !== n && tn(e) && t && e.select();
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
var Qe = nn();
|
|
289
|
+
function nn() {
|
|
290
|
+
let e = [];
|
|
291
|
+
return {
|
|
292
|
+
add(t) {
|
|
293
|
+
const n = e[0];
|
|
294
|
+
t !== n && (n == null || n.pause()), e = Je(e, t), e.unshift(t);
|
|
295
|
+
},
|
|
296
|
+
remove(t) {
|
|
297
|
+
var n;
|
|
298
|
+
e = Je(e, t), (n = e[0]) == null || n.resume();
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
function Je(e, t) {
|
|
303
|
+
const n = [...e], r = n.indexOf(t);
|
|
304
|
+
return r !== -1 && n.splice(r, 1), n;
|
|
305
|
+
}
|
|
306
|
+
function rn(e) {
|
|
307
|
+
return e.filter((t) => t.tagName !== "A");
|
|
308
|
+
}
|
|
309
|
+
const on = ["top", "right", "bottom", "left"], Z = Math.min, I = Math.max, xe = Math.round, de = Math.floor, H = (e) => ({
|
|
113
310
|
x: e,
|
|
114
311
|
y: e
|
|
115
|
-
}),
|
|
312
|
+
}), cn = {
|
|
116
313
|
left: "right",
|
|
117
314
|
right: "left",
|
|
118
315
|
bottom: "top",
|
|
119
316
|
top: "bottom"
|
|
120
|
-
},
|
|
317
|
+
}, sn = {
|
|
121
318
|
start: "end",
|
|
122
319
|
end: "start"
|
|
123
320
|
};
|
|
@@ -145,20 +342,20 @@ function K(e) {
|
|
|
145
342
|
function Ue(e) {
|
|
146
343
|
return ze(K(e));
|
|
147
344
|
}
|
|
148
|
-
function
|
|
345
|
+
function an(e, t, n) {
|
|
149
346
|
n === void 0 && (n = !1);
|
|
150
347
|
const r = ie(e), o = Ue(e), i = He(o);
|
|
151
348
|
let s = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
152
349
|
return t.reference[i] > t.floating[i] && (s = Se(s)), [s, Se(s)];
|
|
153
350
|
}
|
|
154
|
-
function
|
|
351
|
+
function ln(e) {
|
|
155
352
|
const t = Se(e);
|
|
156
353
|
return [_e(e), t, _e(t)];
|
|
157
354
|
}
|
|
158
355
|
function _e(e) {
|
|
159
|
-
return e.replace(/start|end/g, (t) =>
|
|
356
|
+
return e.replace(/start|end/g, (t) => sn[t]);
|
|
160
357
|
}
|
|
161
|
-
function
|
|
358
|
+
function un(e, t, n) {
|
|
162
359
|
const r = ["left", "right"], o = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
|
|
163
360
|
switch (e) {
|
|
164
361
|
case "top":
|
|
@@ -171,15 +368,15 @@ function Yt(e, t, n) {
|
|
|
171
368
|
return [];
|
|
172
369
|
}
|
|
173
370
|
}
|
|
174
|
-
function
|
|
371
|
+
function fn(e, t, n, r) {
|
|
175
372
|
const o = ie(e);
|
|
176
|
-
let i =
|
|
373
|
+
let i = un(X(e), n === "start", r);
|
|
177
374
|
return o && (i = i.map((s) => s + "-" + o), t && (i = i.concat(i.map(_e)))), i;
|
|
178
375
|
}
|
|
179
376
|
function Se(e) {
|
|
180
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
|
377
|
+
return e.replace(/left|right|bottom|top/g, (t) => cn[t]);
|
|
181
378
|
}
|
|
182
|
-
function
|
|
379
|
+
function dn(e) {
|
|
183
380
|
return {
|
|
184
381
|
top: 0,
|
|
185
382
|
right: 0,
|
|
@@ -188,8 +385,8 @@ function qt(e) {
|
|
|
188
385
|
...e
|
|
189
386
|
};
|
|
190
387
|
}
|
|
191
|
-
function
|
|
192
|
-
return typeof e != "number" ?
|
|
388
|
+
function pt(e) {
|
|
389
|
+
return typeof e != "number" ? dn(e) : {
|
|
193
390
|
top: e,
|
|
194
391
|
right: e,
|
|
195
392
|
bottom: e,
|
|
@@ -214,7 +411,7 @@ function Ee(e) {
|
|
|
214
411
|
y: n
|
|
215
412
|
};
|
|
216
413
|
}
|
|
217
|
-
function
|
|
414
|
+
function et(e, t, n) {
|
|
218
415
|
let {
|
|
219
416
|
reference: r,
|
|
220
417
|
floating: o
|
|
@@ -262,7 +459,7 @@ function Ze(e, t, n) {
|
|
|
262
459
|
}
|
|
263
460
|
return h;
|
|
264
461
|
}
|
|
265
|
-
const
|
|
462
|
+
const mn = async (e, t, n) => {
|
|
266
463
|
const {
|
|
267
464
|
placement: r = "bottom",
|
|
268
465
|
strategy: o = "absolute",
|
|
@@ -276,7 +473,7 @@ const Zt = async (e, t, n) => {
|
|
|
276
473
|
}), {
|
|
277
474
|
x: d,
|
|
278
475
|
y: l
|
|
279
|
-
} =
|
|
476
|
+
} = et(a, r, u), v = r, h = {}, g = 0;
|
|
280
477
|
for (let f = 0; f < c.length; f++) {
|
|
281
478
|
const {
|
|
282
479
|
name: p,
|
|
@@ -313,7 +510,7 @@ const Zt = async (e, t, n) => {
|
|
|
313
510
|
}) : S.rects), {
|
|
314
511
|
x: d,
|
|
315
512
|
y: l
|
|
316
|
-
} =
|
|
513
|
+
} = et(a, v, u)), f = -1);
|
|
317
514
|
}
|
|
318
515
|
return {
|
|
319
516
|
x: d,
|
|
@@ -339,7 +536,7 @@ async function le(e, t) {
|
|
|
339
536
|
elementContext: l = "floating",
|
|
340
537
|
altBoundary: v = !1,
|
|
341
538
|
padding: h = 0
|
|
342
|
-
} = Y(t, e), g =
|
|
539
|
+
} = Y(t, e), g = pt(h), p = c[v ? l === "floating" ? "reference" : "floating" : l], y = Ee(await i.getClippingRect({
|
|
343
540
|
element: (n = await (i.isElement == null ? void 0 : i.isElement(p))) == null || n ? p : p.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
|
|
344
541
|
boundary: a,
|
|
345
542
|
rootBoundary: d,
|
|
@@ -368,7 +565,7 @@ async function le(e, t) {
|
|
|
368
565
|
right: (S.right - y.right + g.right) / x.x
|
|
369
566
|
};
|
|
370
567
|
}
|
|
371
|
-
const
|
|
568
|
+
const hn = (e) => ({
|
|
372
569
|
name: "arrow",
|
|
373
570
|
options: e,
|
|
374
571
|
async fn(t) {
|
|
@@ -386,7 +583,7 @@ const Gt = (e) => ({
|
|
|
386
583
|
} = Y(e, t) || {};
|
|
387
584
|
if (a == null)
|
|
388
585
|
return {};
|
|
389
|
-
const l =
|
|
586
|
+
const l = pt(d), v = {
|
|
390
587
|
x: n,
|
|
391
588
|
y: r
|
|
392
589
|
}, h = Ue(o), g = He(h), f = await s.getDimensions(a), p = h === "y", y = p ? "top" : "left", w = p ? "bottom" : "right", b = p ? "clientHeight" : "clientWidth", x = i.reference[g] + i.reference[h] - v[h] - i.floating[g], S = v[h] - i.reference[h], C = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a));
|
|
@@ -405,7 +602,7 @@ const Gt = (e) => ({
|
|
|
405
602
|
reset: T
|
|
406
603
|
};
|
|
407
604
|
}
|
|
408
|
-
}),
|
|
605
|
+
}), vn = function(e) {
|
|
409
606
|
return e === void 0 && (e = {}), {
|
|
410
607
|
name: "flip",
|
|
411
608
|
options: e,
|
|
@@ -429,12 +626,12 @@ const Gt = (e) => ({
|
|
|
429
626
|
} = Y(e, t);
|
|
430
627
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
431
628
|
return {};
|
|
432
|
-
const y = X(o), w = K(c), b = X(c) === c, x = await (u.isRTL == null ? void 0 : u.isRTL(a.floating)), S = v || (b || !f ? [Se(c)] :
|
|
433
|
-
!v && C && S.push(...
|
|
629
|
+
const y = X(o), w = K(c), b = X(c) === c, x = await (u.isRTL == null ? void 0 : u.isRTL(a.floating)), S = v || (b || !f ? [Se(c)] : ln(c)), C = g !== "none";
|
|
630
|
+
!v && C && S.push(...fn(c, f, g, x));
|
|
434
631
|
const E = [c, ...S], A = await le(t, p), P = [];
|
|
435
632
|
let O = ((r = i.flip) == null ? void 0 : r.overflows) || [];
|
|
436
633
|
if (d && P.push(A[y]), l) {
|
|
437
|
-
const D =
|
|
634
|
+
const D = an(o, s, x);
|
|
438
635
|
P.push(A[D[0]], A[D[1]]);
|
|
439
636
|
}
|
|
440
637
|
if (O = [...O, {
|
|
@@ -489,7 +686,7 @@ const Gt = (e) => ({
|
|
|
489
686
|
}
|
|
490
687
|
};
|
|
491
688
|
};
|
|
492
|
-
function
|
|
689
|
+
function tt(e, t) {
|
|
493
690
|
return {
|
|
494
691
|
top: e.top - t.height,
|
|
495
692
|
right: e.right - t.width,
|
|
@@ -497,10 +694,10 @@ function Ge(e, t) {
|
|
|
497
694
|
left: e.left - t.width
|
|
498
695
|
};
|
|
499
696
|
}
|
|
500
|
-
function
|
|
501
|
-
return
|
|
697
|
+
function nt(e) {
|
|
698
|
+
return on.some((t) => e[t] >= 0);
|
|
502
699
|
}
|
|
503
|
-
const
|
|
700
|
+
const pn = function(e) {
|
|
504
701
|
return e === void 0 && (e = {}), {
|
|
505
702
|
name: "hide",
|
|
506
703
|
options: e,
|
|
@@ -516,11 +713,11 @@ const Jt = function(e) {
|
|
|
516
713
|
const i = await le(t, {
|
|
517
714
|
...o,
|
|
518
715
|
elementContext: "reference"
|
|
519
|
-
}), s =
|
|
716
|
+
}), s = tt(i, n.reference);
|
|
520
717
|
return {
|
|
521
718
|
data: {
|
|
522
719
|
referenceHiddenOffsets: s,
|
|
523
|
-
referenceHidden:
|
|
720
|
+
referenceHidden: nt(s)
|
|
524
721
|
}
|
|
525
722
|
};
|
|
526
723
|
}
|
|
@@ -528,11 +725,11 @@ const Jt = function(e) {
|
|
|
528
725
|
const i = await le(t, {
|
|
529
726
|
...o,
|
|
530
727
|
altBoundary: !0
|
|
531
|
-
}), s =
|
|
728
|
+
}), s = tt(i, n.floating);
|
|
532
729
|
return {
|
|
533
730
|
data: {
|
|
534
731
|
escapedOffsets: s,
|
|
535
|
-
escaped:
|
|
732
|
+
escaped: nt(s)
|
|
536
733
|
}
|
|
537
734
|
};
|
|
538
735
|
}
|
|
@@ -542,7 +739,7 @@ const Jt = function(e) {
|
|
|
542
739
|
}
|
|
543
740
|
};
|
|
544
741
|
};
|
|
545
|
-
async function
|
|
742
|
+
async function gn(e, t) {
|
|
546
743
|
const {
|
|
547
744
|
placement: n,
|
|
548
745
|
platform: r,
|
|
@@ -569,7 +766,7 @@ async function en(e, t) {
|
|
|
569
766
|
y: h * d
|
|
570
767
|
};
|
|
571
768
|
}
|
|
572
|
-
const
|
|
769
|
+
const yn = function(e) {
|
|
573
770
|
return e === void 0 && (e = 0), {
|
|
574
771
|
name: "offset",
|
|
575
772
|
options: e,
|
|
@@ -580,7 +777,7 @@ const tn = function(e) {
|
|
|
580
777
|
y: i,
|
|
581
778
|
placement: s,
|
|
582
779
|
middlewareData: c
|
|
583
|
-
} = t, u = await
|
|
780
|
+
} = t, u = await gn(t, e);
|
|
584
781
|
return s === ((n = c.offset) == null ? void 0 : n.placement) && (r = c.arrow) != null && r.alignmentOffset ? {} : {
|
|
585
782
|
x: o + u.x,
|
|
586
783
|
y: i + u.y,
|
|
@@ -591,7 +788,7 @@ const tn = function(e) {
|
|
|
591
788
|
};
|
|
592
789
|
}
|
|
593
790
|
};
|
|
594
|
-
},
|
|
791
|
+
}, wn = function(e) {
|
|
595
792
|
return e === void 0 && (e = {}), {
|
|
596
793
|
name: "shift",
|
|
597
794
|
options: e,
|
|
@@ -647,7 +844,7 @@ const tn = function(e) {
|
|
|
647
844
|
};
|
|
648
845
|
}
|
|
649
846
|
};
|
|
650
|
-
},
|
|
847
|
+
}, bn = function(e) {
|
|
651
848
|
return e === void 0 && (e = {}), {
|
|
652
849
|
options: e,
|
|
653
850
|
fn(t) {
|
|
@@ -689,7 +886,7 @@ const tn = function(e) {
|
|
|
689
886
|
};
|
|
690
887
|
}
|
|
691
888
|
};
|
|
692
|
-
},
|
|
889
|
+
}, xn = function(e) {
|
|
693
890
|
return e === void 0 && (e = {}), {
|
|
694
891
|
name: "size",
|
|
695
892
|
options: e,
|
|
@@ -734,7 +931,7 @@ function Re() {
|
|
|
734
931
|
return typeof window < "u";
|
|
735
932
|
}
|
|
736
933
|
function ce(e) {
|
|
737
|
-
return
|
|
934
|
+
return gt(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
738
935
|
}
|
|
739
936
|
function W(e) {
|
|
740
937
|
var t;
|
|
@@ -742,9 +939,9 @@ function W(e) {
|
|
|
742
939
|
}
|
|
743
940
|
function j(e) {
|
|
744
941
|
var t;
|
|
745
|
-
return (t = (
|
|
942
|
+
return (t = (gt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
746
943
|
}
|
|
747
|
-
function
|
|
944
|
+
function gt(e) {
|
|
748
945
|
return Re() ? e instanceof Node || e instanceof W(e).Node : !1;
|
|
749
946
|
}
|
|
750
947
|
function $(e) {
|
|
@@ -753,7 +950,7 @@ function $(e) {
|
|
|
753
950
|
function U(e) {
|
|
754
951
|
return Re() ? e instanceof HTMLElement || e instanceof W(e).HTMLElement : !1;
|
|
755
952
|
}
|
|
756
|
-
function
|
|
953
|
+
function rt(e) {
|
|
757
954
|
return !Re() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof W(e).ShadowRoot;
|
|
758
955
|
}
|
|
759
956
|
function fe(e) {
|
|
@@ -765,7 +962,7 @@ function fe(e) {
|
|
|
765
962
|
} = V(e);
|
|
766
963
|
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(o);
|
|
767
964
|
}
|
|
768
|
-
function
|
|
965
|
+
function Sn(e) {
|
|
769
966
|
return ["table", "td", "th"].includes(ce(e));
|
|
770
967
|
}
|
|
771
968
|
function Ae(e) {
|
|
@@ -781,7 +978,7 @@ function je(e) {
|
|
|
781
978
|
const t = Ke(), n = $(e) ? V(e) : e;
|
|
782
979
|
return ["transform", "translate", "scale", "rotate", "perspective"].some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r));
|
|
783
980
|
}
|
|
784
|
-
function
|
|
981
|
+
function En(e) {
|
|
785
982
|
let t = G(e);
|
|
786
983
|
for (; U(t) && !oe(t); ) {
|
|
787
984
|
if (je(t))
|
|
@@ -817,19 +1014,19 @@ function G(e) {
|
|
|
817
1014
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
818
1015
|
e.assignedSlot || // DOM Element detected.
|
|
819
1016
|
e.parentNode || // ShadowRoot detected.
|
|
820
|
-
|
|
1017
|
+
rt(e) && e.host || // Fallback.
|
|
821
1018
|
j(e)
|
|
822
1019
|
);
|
|
823
|
-
return
|
|
1020
|
+
return rt(t) ? t.host : t;
|
|
824
1021
|
}
|
|
825
|
-
function
|
|
1022
|
+
function yt(e) {
|
|
826
1023
|
const t = G(e);
|
|
827
|
-
return oe(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : U(t) && fe(t) ? t :
|
|
1024
|
+
return oe(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : U(t) && fe(t) ? t : yt(t);
|
|
828
1025
|
}
|
|
829
1026
|
function ue(e, t, n) {
|
|
830
1027
|
var r;
|
|
831
1028
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
832
|
-
const o =
|
|
1029
|
+
const o = yt(e), i = o === ((r = e.ownerDocument) == null ? void 0 : r.body), s = W(o);
|
|
833
1030
|
if (i) {
|
|
834
1031
|
const c = $e(s);
|
|
835
1032
|
return t.concat(s, s.visualViewport || [], fe(o) ? o : [], c && n ? ue(c) : []);
|
|
@@ -839,7 +1036,7 @@ function ue(e, t, n) {
|
|
|
839
1036
|
function $e(e) {
|
|
840
1037
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
841
1038
|
}
|
|
842
|
-
function
|
|
1039
|
+
function wt(e) {
|
|
843
1040
|
const t = V(e);
|
|
844
1041
|
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
845
1042
|
const o = U(e), i = o ? e.offsetWidth : n, s = o ? e.offsetHeight : r, c = xe(n) !== i || xe(r) !== s;
|
|
@@ -860,22 +1057,22 @@ function ne(e) {
|
|
|
860
1057
|
width: r,
|
|
861
1058
|
height: o,
|
|
862
1059
|
$: i
|
|
863
|
-
} =
|
|
1060
|
+
} = wt(t);
|
|
864
1061
|
let s = (i ? xe(n.width) : n.width) / r, c = (i ? xe(n.height) : n.height) / o;
|
|
865
1062
|
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
866
1063
|
x: s,
|
|
867
1064
|
y: c
|
|
868
1065
|
};
|
|
869
1066
|
}
|
|
870
|
-
const
|
|
871
|
-
function
|
|
1067
|
+
const Cn = /* @__PURE__ */ H(0);
|
|
1068
|
+
function bt(e) {
|
|
872
1069
|
const t = W(e);
|
|
873
|
-
return !Ke() || !t.visualViewport ?
|
|
1070
|
+
return !Ke() || !t.visualViewport ? Cn : {
|
|
874
1071
|
x: t.visualViewport.offsetLeft,
|
|
875
1072
|
y: t.visualViewport.offsetTop
|
|
876
1073
|
};
|
|
877
1074
|
}
|
|
878
|
-
function
|
|
1075
|
+
function Rn(e, t, n) {
|
|
879
1076
|
return t === void 0 && (t = !1), !n || t && n !== W(e) ? !1 : t;
|
|
880
1077
|
}
|
|
881
1078
|
function Q(e, t, n, r) {
|
|
@@ -883,7 +1080,7 @@ function Q(e, t, n, r) {
|
|
|
883
1080
|
const o = e.getBoundingClientRect(), i = Ye(e);
|
|
884
1081
|
let s = H(1);
|
|
885
1082
|
t && (r ? $(r) && (s = ne(r)) : s = ne(e));
|
|
886
|
-
const c =
|
|
1083
|
+
const c = Rn(i, n, r) ? bt(i) : H(0);
|
|
887
1084
|
let u = (o.left + c.x) / s.x, a = (o.top + c.y) / s.y, d = o.width / s.x, l = o.height / s.y;
|
|
888
1085
|
if (i) {
|
|
889
1086
|
const v = W(i), h = r && $(r) ? W(r) : r;
|
|
@@ -904,7 +1101,7 @@ function Xe(e, t) {
|
|
|
904
1101
|
const n = Oe(e).scrollLeft;
|
|
905
1102
|
return t ? t.left + n : Q(j(e)).left + n;
|
|
906
1103
|
}
|
|
907
|
-
function
|
|
1104
|
+
function xt(e, t, n) {
|
|
908
1105
|
n === void 0 && (n = !1);
|
|
909
1106
|
const r = e.getBoundingClientRect(), o = r.left + t.scrollLeft - (n ? 0 : (
|
|
910
1107
|
// RTL <body> scrollbar.
|
|
@@ -915,7 +1112,7 @@ function bt(e, t, n) {
|
|
|
915
1112
|
y: i
|
|
916
1113
|
};
|
|
917
1114
|
}
|
|
918
|
-
function
|
|
1115
|
+
function An(e) {
|
|
919
1116
|
let {
|
|
920
1117
|
elements: t,
|
|
921
1118
|
rect: n,
|
|
@@ -934,7 +1131,7 @@ function un(e) {
|
|
|
934
1131
|
const h = Q(r);
|
|
935
1132
|
a = ne(r), d.x = h.x + r.clientLeft, d.y = h.y + r.clientTop;
|
|
936
1133
|
}
|
|
937
|
-
const v = s && !l && !i ?
|
|
1134
|
+
const v = s && !l && !i ? xt(s, u, !0) : H(0);
|
|
938
1135
|
return {
|
|
939
1136
|
width: n.width * a.x,
|
|
940
1137
|
height: n.height * a.y,
|
|
@@ -942,10 +1139,10 @@ function un(e) {
|
|
|
942
1139
|
y: n.y * a.y - u.scrollTop * a.y + d.y + v.y
|
|
943
1140
|
};
|
|
944
1141
|
}
|
|
945
|
-
function
|
|
1142
|
+
function On(e) {
|
|
946
1143
|
return Array.from(e.getClientRects());
|
|
947
1144
|
}
|
|
948
|
-
function
|
|
1145
|
+
function Pn(e) {
|
|
949
1146
|
const t = j(e), n = Oe(e), r = e.ownerDocument.body, o = I(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = I(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
950
1147
|
let s = -n.scrollLeft + Xe(e);
|
|
951
1148
|
const c = -n.scrollTop;
|
|
@@ -956,7 +1153,7 @@ function dn(e) {
|
|
|
956
1153
|
y: c
|
|
957
1154
|
};
|
|
958
1155
|
}
|
|
959
|
-
function
|
|
1156
|
+
function Tn(e, t) {
|
|
960
1157
|
const n = W(e), r = j(e), o = n.visualViewport;
|
|
961
1158
|
let i = r.clientWidth, s = r.clientHeight, c = 0, u = 0;
|
|
962
1159
|
if (o) {
|
|
@@ -971,7 +1168,7 @@ function mn(e, t) {
|
|
|
971
1168
|
y: u
|
|
972
1169
|
};
|
|
973
1170
|
}
|
|
974
|
-
function
|
|
1171
|
+
function Mn(e, t) {
|
|
975
1172
|
const n = Q(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = U(e) ? ne(e) : H(1), s = e.clientWidth * i.x, c = e.clientHeight * i.y, u = o * i.x, a = r * i.y;
|
|
976
1173
|
return {
|
|
977
1174
|
width: s,
|
|
@@ -980,16 +1177,16 @@ function hn(e, t) {
|
|
|
980
1177
|
y: a
|
|
981
1178
|
};
|
|
982
1179
|
}
|
|
983
|
-
function
|
|
1180
|
+
function ot(e, t, n) {
|
|
984
1181
|
let r;
|
|
985
1182
|
if (t === "viewport")
|
|
986
|
-
r =
|
|
1183
|
+
r = Tn(e, n);
|
|
987
1184
|
else if (t === "document")
|
|
988
|
-
r =
|
|
1185
|
+
r = Pn(j(e));
|
|
989
1186
|
else if ($(t))
|
|
990
|
-
r =
|
|
1187
|
+
r = Mn(t, n);
|
|
991
1188
|
else {
|
|
992
|
-
const o =
|
|
1189
|
+
const o = bt(e);
|
|
993
1190
|
r = {
|
|
994
1191
|
x: t.x - o.x,
|
|
995
1192
|
y: t.y - o.y,
|
|
@@ -999,11 +1196,11 @@ function et(e, t, n) {
|
|
|
999
1196
|
}
|
|
1000
1197
|
return Ee(r);
|
|
1001
1198
|
}
|
|
1002
|
-
function
|
|
1199
|
+
function St(e, t) {
|
|
1003
1200
|
const n = G(e);
|
|
1004
|
-
return n === t || !$(n) || oe(n) ? !1 : V(n).position === "fixed" ||
|
|
1201
|
+
return n === t || !$(n) || oe(n) ? !1 : V(n).position === "fixed" || St(n, t);
|
|
1005
1202
|
}
|
|
1006
|
-
function
|
|
1203
|
+
function Nn(e, t) {
|
|
1007
1204
|
const n = t.get(e);
|
|
1008
1205
|
if (n)
|
|
1009
1206
|
return n;
|
|
@@ -1012,21 +1209,21 @@ function vn(e, t) {
|
|
|
1012
1209
|
let s = i ? G(e) : e;
|
|
1013
1210
|
for (; $(s) && !oe(s); ) {
|
|
1014
1211
|
const c = V(s), u = je(s);
|
|
1015
|
-
!u && c.position === "fixed" && (o = null), (i ? !u && !o : !u && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || fe(s) && !u &&
|
|
1212
|
+
!u && c.position === "fixed" && (o = null), (i ? !u && !o : !u && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || fe(s) && !u && St(e, s)) ? r = r.filter((d) => d !== s) : o = c, s = G(s);
|
|
1016
1213
|
}
|
|
1017
1214
|
return t.set(e, r), r;
|
|
1018
1215
|
}
|
|
1019
|
-
function
|
|
1216
|
+
function Ln(e) {
|
|
1020
1217
|
let {
|
|
1021
1218
|
element: t,
|
|
1022
1219
|
boundary: n,
|
|
1023
1220
|
rootBoundary: r,
|
|
1024
1221
|
strategy: o
|
|
1025
1222
|
} = e;
|
|
1026
|
-
const s = [...n === "clippingAncestors" ? Ae(t) ? [] :
|
|
1027
|
-
const l =
|
|
1223
|
+
const s = [...n === "clippingAncestors" ? Ae(t) ? [] : Nn(t, this._c) : [].concat(n), r], c = s[0], u = s.reduce((a, d) => {
|
|
1224
|
+
const l = ot(t, d, o);
|
|
1028
1225
|
return a.top = I(l.top, a.top), a.right = Z(l.right, a.right), a.bottom = Z(l.bottom, a.bottom), a.left = I(l.left, a.left), a;
|
|
1029
|
-
},
|
|
1226
|
+
}, ot(t, c, o));
|
|
1030
1227
|
return {
|
|
1031
1228
|
width: u.right - u.left,
|
|
1032
1229
|
height: u.bottom - u.top,
|
|
@@ -1034,17 +1231,17 @@ function pn(e) {
|
|
|
1034
1231
|
y: u.top
|
|
1035
1232
|
};
|
|
1036
1233
|
}
|
|
1037
|
-
function
|
|
1234
|
+
function kn(e) {
|
|
1038
1235
|
const {
|
|
1039
1236
|
width: t,
|
|
1040
1237
|
height: n
|
|
1041
|
-
} =
|
|
1238
|
+
} = wt(e);
|
|
1042
1239
|
return {
|
|
1043
1240
|
width: t,
|
|
1044
1241
|
height: n
|
|
1045
1242
|
};
|
|
1046
1243
|
}
|
|
1047
|
-
function
|
|
1244
|
+
function Dn(e, t, n) {
|
|
1048
1245
|
const r = U(t), o = j(t), i = n === "fixed", s = Q(e, !0, i, t);
|
|
1049
1246
|
let c = {
|
|
1050
1247
|
scrollLeft: 0,
|
|
@@ -1060,7 +1257,7 @@ function yn(e, t, n) {
|
|
|
1060
1257
|
u.x = h.x + t.clientLeft, u.y = h.y + t.clientTop;
|
|
1061
1258
|
} else o && a();
|
|
1062
1259
|
i && !r && o && a();
|
|
1063
|
-
const d = o && !r && !i ?
|
|
1260
|
+
const d = o && !r && !i ? xt(o, c) : H(0), l = s.left + c.scrollLeft - u.x - d.x, v = s.top + c.scrollTop - u.y - d.y;
|
|
1064
1261
|
return {
|
|
1065
1262
|
x: l,
|
|
1066
1263
|
y: v,
|
|
@@ -1068,10 +1265,10 @@ function yn(e, t, n) {
|
|
|
1068
1265
|
height: s.height
|
|
1069
1266
|
};
|
|
1070
1267
|
}
|
|
1071
|
-
function
|
|
1268
|
+
function Ne(e) {
|
|
1072
1269
|
return V(e).position === "static";
|
|
1073
1270
|
}
|
|
1074
|
-
function
|
|
1271
|
+
function it(e, t) {
|
|
1075
1272
|
if (!U(e) || V(e).position === "fixed")
|
|
1076
1273
|
return null;
|
|
1077
1274
|
if (t)
|
|
@@ -1079,28 +1276,28 @@ function tt(e, t) {
|
|
|
1079
1276
|
let n = e.offsetParent;
|
|
1080
1277
|
return j(e) === n && (n = n.ownerDocument.body), n;
|
|
1081
1278
|
}
|
|
1082
|
-
function
|
|
1279
|
+
function Et(e, t) {
|
|
1083
1280
|
const n = W(e);
|
|
1084
1281
|
if (Ae(e))
|
|
1085
1282
|
return n;
|
|
1086
1283
|
if (!U(e)) {
|
|
1087
1284
|
let o = G(e);
|
|
1088
1285
|
for (; o && !oe(o); ) {
|
|
1089
|
-
if ($(o) && !
|
|
1286
|
+
if ($(o) && !Ne(o))
|
|
1090
1287
|
return o;
|
|
1091
1288
|
o = G(o);
|
|
1092
1289
|
}
|
|
1093
1290
|
return n;
|
|
1094
1291
|
}
|
|
1095
|
-
let r =
|
|
1096
|
-
for (; r &&
|
|
1097
|
-
r =
|
|
1098
|
-
return r && oe(r) &&
|
|
1292
|
+
let r = it(e, t);
|
|
1293
|
+
for (; r && Sn(r) && Ne(r); )
|
|
1294
|
+
r = it(r, t);
|
|
1295
|
+
return r && oe(r) && Ne(r) && !je(r) ? n : r || En(e) || n;
|
|
1099
1296
|
}
|
|
1100
|
-
const
|
|
1101
|
-
const t = this.getOffsetParent ||
|
|
1297
|
+
const Fn = async function(e) {
|
|
1298
|
+
const t = this.getOffsetParent || Et, n = this.getDimensions, r = await n(e.floating);
|
|
1102
1299
|
return {
|
|
1103
|
-
reference:
|
|
1300
|
+
reference: Dn(e.reference, await t(e.floating), e.strategy),
|
|
1104
1301
|
floating: {
|
|
1105
1302
|
x: 0,
|
|
1106
1303
|
y: 0,
|
|
@@ -1109,25 +1306,25 @@ const wn = async function(e) {
|
|
|
1109
1306
|
}
|
|
1110
1307
|
};
|
|
1111
1308
|
};
|
|
1112
|
-
function
|
|
1309
|
+
function In(e) {
|
|
1113
1310
|
return V(e).direction === "rtl";
|
|
1114
1311
|
}
|
|
1115
|
-
const
|
|
1116
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1312
|
+
const Wn = {
|
|
1313
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: An,
|
|
1117
1314
|
getDocumentElement: j,
|
|
1118
|
-
getClippingRect:
|
|
1119
|
-
getOffsetParent:
|
|
1120
|
-
getElementRects:
|
|
1121
|
-
getClientRects:
|
|
1122
|
-
getDimensions:
|
|
1315
|
+
getClippingRect: Ln,
|
|
1316
|
+
getOffsetParent: Et,
|
|
1317
|
+
getElementRects: Fn,
|
|
1318
|
+
getClientRects: On,
|
|
1319
|
+
getDimensions: kn,
|
|
1123
1320
|
getScale: ne,
|
|
1124
1321
|
isElement: $,
|
|
1125
|
-
isRTL:
|
|
1322
|
+
isRTL: In
|
|
1126
1323
|
};
|
|
1127
|
-
function
|
|
1324
|
+
function Ct(e, t) {
|
|
1128
1325
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1129
1326
|
}
|
|
1130
|
-
function
|
|
1327
|
+
function Bn(e, t) {
|
|
1131
1328
|
let n = null, r;
|
|
1132
1329
|
const o = j(e);
|
|
1133
1330
|
function i() {
|
|
@@ -1158,7 +1355,7 @@ function Sn(e, t) {
|
|
|
1158
1355
|
s(!1, 1e-7);
|
|
1159
1356
|
}, 1e3);
|
|
1160
1357
|
}
|
|
1161
|
-
E === 1 && !
|
|
1358
|
+
E === 1 && !Ct(a, e.getBoundingClientRect()) && s(), x = !1;
|
|
1162
1359
|
}
|
|
1163
1360
|
try {
|
|
1164
1361
|
n = new IntersectionObserver(S, {
|
|
@@ -1187,7 +1384,7 @@ function Yr(e, t, n, r) {
|
|
|
1187
1384
|
passive: !0
|
|
1188
1385
|
}), i && y.addEventListener("resize", n);
|
|
1189
1386
|
});
|
|
1190
|
-
const l = a && c ?
|
|
1387
|
+
const l = a && c ? Bn(a, n) : null;
|
|
1191
1388
|
let v = -1, h = null;
|
|
1192
1389
|
s && (h = new ResizeObserver((y) => {
|
|
1193
1390
|
let [w] = y;
|
|
@@ -1200,7 +1397,7 @@ function Yr(e, t, n, r) {
|
|
|
1200
1397
|
u && p();
|
|
1201
1398
|
function p() {
|
|
1202
1399
|
const y = Q(e);
|
|
1203
|
-
f && !
|
|
1400
|
+
f && !Ct(f, y) && n(), f = y, g = requestAnimationFrame(p);
|
|
1204
1401
|
}
|
|
1205
1402
|
return n(), () => {
|
|
1206
1403
|
var y;
|
|
@@ -1209,15 +1406,15 @@ function Yr(e, t, n, r) {
|
|
|
1209
1406
|
}), l == null || l(), (y = h) == null || y.disconnect(), h = null, u && cancelAnimationFrame(g);
|
|
1210
1407
|
};
|
|
1211
1408
|
}
|
|
1212
|
-
const
|
|
1409
|
+
const _n = yn, $n = wn, Vn = vn, zn = xn, Hn = pn, ct = hn, Un = bn, jn = (e, t, n) => {
|
|
1213
1410
|
const r = /* @__PURE__ */ new Map(), o = {
|
|
1214
|
-
platform:
|
|
1411
|
+
platform: Wn,
|
|
1215
1412
|
...n
|
|
1216
1413
|
}, i = {
|
|
1217
1414
|
...o.platform,
|
|
1218
1415
|
_c: r
|
|
1219
1416
|
};
|
|
1220
|
-
return
|
|
1417
|
+
return mn(e, t, {
|
|
1221
1418
|
...o,
|
|
1222
1419
|
platform: i
|
|
1223
1420
|
});
|
|
@@ -1253,14 +1450,14 @@ function Ce(e, t) {
|
|
|
1253
1450
|
}
|
|
1254
1451
|
return e !== e && t !== t;
|
|
1255
1452
|
}
|
|
1256
|
-
function
|
|
1453
|
+
function Rt(e) {
|
|
1257
1454
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1258
1455
|
}
|
|
1259
|
-
function
|
|
1260
|
-
const n =
|
|
1456
|
+
function st(e, t) {
|
|
1457
|
+
const n = Rt(e);
|
|
1261
1458
|
return Math.round(t * n) / n;
|
|
1262
1459
|
}
|
|
1263
|
-
function
|
|
1460
|
+
function Le(e) {
|
|
1264
1461
|
const t = m.useRef(e);
|
|
1265
1462
|
return ye(() => {
|
|
1266
1463
|
t.current = e;
|
|
@@ -1293,7 +1490,7 @@ function Xr(e) {
|
|
|
1293
1490
|
R !== C.current && (C.current = R, f(R));
|
|
1294
1491
|
}, []), b = m.useCallback((R) => {
|
|
1295
1492
|
R !== E.current && (E.current = R, y(R));
|
|
1296
|
-
}, []), x = i || g, S = s || p, C = m.useRef(null), E = m.useRef(null), A = m.useRef(d), P = u != null, O =
|
|
1493
|
+
}, []), x = i || g, S = s || p, C = m.useRef(null), E = m.useRef(null), A = m.useRef(d), P = u != null, O = Le(u), B = Le(o), F = Le(a), L = m.useCallback(() => {
|
|
1297
1494
|
if (!C.current || !E.current)
|
|
1298
1495
|
return;
|
|
1299
1496
|
const R = {
|
|
@@ -1301,7 +1498,7 @@ function Xr(e) {
|
|
|
1301
1498
|
strategy: n,
|
|
1302
1499
|
middleware: v
|
|
1303
1500
|
};
|
|
1304
|
-
B.current && (R.platform = B.current),
|
|
1501
|
+
B.current && (R.platform = B.current), jn(C.current, E.current, R).then((M) => {
|
|
1305
1502
|
const N = {
|
|
1306
1503
|
...M,
|
|
1307
1504
|
// The floating element's position may be recomputed while it's closed
|
|
@@ -1347,11 +1544,11 @@ function Xr(e) {
|
|
|
1347
1544
|
};
|
|
1348
1545
|
if (!T.floating)
|
|
1349
1546
|
return R;
|
|
1350
|
-
const M =
|
|
1547
|
+
const M = st(T.floating, d.x), N = st(T.floating, d.y);
|
|
1351
1548
|
return c ? {
|
|
1352
1549
|
...R,
|
|
1353
1550
|
transform: "translate(" + M + "px, " + N + "px)",
|
|
1354
|
-
...
|
|
1551
|
+
...Rt(T.floating) >= 1.5 && {
|
|
1355
1552
|
willChange: "transform"
|
|
1356
1553
|
}
|
|
1357
1554
|
} : {
|
|
@@ -1368,7 +1565,7 @@ function Xr(e) {
|
|
|
1368
1565
|
floatingStyles: _
|
|
1369
1566
|
}), [d, L, D, T, _]);
|
|
1370
1567
|
}
|
|
1371
|
-
const
|
|
1568
|
+
const Kn = (e) => {
|
|
1372
1569
|
function t(n) {
|
|
1373
1570
|
return {}.hasOwnProperty.call(n, "current");
|
|
1374
1571
|
}
|
|
@@ -1380,35 +1577,35 @@ const Mn = (e) => {
|
|
|
1380
1577
|
element: r,
|
|
1381
1578
|
padding: o
|
|
1382
1579
|
} = typeof e == "function" ? e(n) : e;
|
|
1383
|
-
return r && t(r) ? r.current != null ?
|
|
1580
|
+
return r && t(r) ? r.current != null ? ct({
|
|
1384
1581
|
element: r.current,
|
|
1385
1582
|
padding: o
|
|
1386
|
-
}).fn(n) : {} : r ?
|
|
1583
|
+
}).fn(n) : {} : r ? ct({
|
|
1387
1584
|
element: r,
|
|
1388
1585
|
padding: o
|
|
1389
1586
|
}).fn(n) : {};
|
|
1390
1587
|
}
|
|
1391
1588
|
};
|
|
1392
1589
|
}, qr = (e, t) => ({
|
|
1393
|
-
...
|
|
1590
|
+
..._n(e),
|
|
1394
1591
|
options: [e, t]
|
|
1395
1592
|
}), Zr = (e, t) => ({
|
|
1396
|
-
|
|
1593
|
+
...$n(e),
|
|
1397
1594
|
options: [e, t]
|
|
1398
1595
|
}), Gr = (e, t) => ({
|
|
1399
|
-
...
|
|
1596
|
+
...Un(e),
|
|
1400
1597
|
options: [e, t]
|
|
1401
1598
|
}), Qr = (e, t) => ({
|
|
1402
|
-
...
|
|
1599
|
+
...Vn(e),
|
|
1403
1600
|
options: [e, t]
|
|
1404
1601
|
}), Jr = (e, t) => ({
|
|
1405
|
-
...
|
|
1602
|
+
...zn(e),
|
|
1406
1603
|
options: [e, t]
|
|
1407
1604
|
}), eo = (e, t) => ({
|
|
1408
|
-
...
|
|
1605
|
+
...Hn(e),
|
|
1409
1606
|
options: [e, t]
|
|
1410
1607
|
}), to = (e, t) => ({
|
|
1411
|
-
...
|
|
1608
|
+
...Kn(e),
|
|
1412
1609
|
options: [e, t]
|
|
1413
1610
|
});
|
|
1414
1611
|
function no(e) {
|
|
@@ -1433,16 +1630,16 @@ function no(e) {
|
|
|
1433
1630
|
n(void 0);
|
|
1434
1631
|
}, [e]), t;
|
|
1435
1632
|
}
|
|
1436
|
-
function
|
|
1633
|
+
function Yn(e, t) {
|
|
1437
1634
|
return m.useReducer((n, r) => t[n][r] ?? n, e);
|
|
1438
1635
|
}
|
|
1439
|
-
var
|
|
1440
|
-
const { present: t, children: n } = e, r =
|
|
1636
|
+
var Xn = (e) => {
|
|
1637
|
+
const { present: t, children: n } = e, r = qn(t), o = typeof n == "function" ? n({ present: r.isPresent }) : m.Children.only(n), i = ht(r.ref, Zn(o));
|
|
1441
1638
|
return typeof n == "function" || r.isPresent ? m.cloneElement(o, { ref: i }) : null;
|
|
1442
1639
|
};
|
|
1443
|
-
|
|
1444
|
-
function
|
|
1445
|
-
const [t, n] = m.useState(), r = m.useRef(null), o = m.useRef(e), i = m.useRef("none"), s = e ? "mounted" : "unmounted", [c, u] =
|
|
1640
|
+
Xn.displayName = "Presence";
|
|
1641
|
+
function qn(e) {
|
|
1642
|
+
const [t, n] = m.useState(), r = m.useRef(null), o = m.useRef(e), i = m.useRef("none"), s = e ? "mounted" : "unmounted", [c, u] = Yn(s, {
|
|
1446
1643
|
mounted: {
|
|
1447
1644
|
UNMOUNT: "unmounted",
|
|
1448
1645
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -1493,12 +1690,12 @@ function kn(e) {
|
|
|
1493
1690
|
function me(e) {
|
|
1494
1691
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
1495
1692
|
}
|
|
1496
|
-
function
|
|
1693
|
+
function Zn(e) {
|
|
1497
1694
|
var r, o;
|
|
1498
1695
|
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
1499
1696
|
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
1500
1697
|
}
|
|
1501
|
-
var
|
|
1698
|
+
var Gn = m[" useInsertionEffect ".trim().toString()] || ae;
|
|
1502
1699
|
function ro({
|
|
1503
1700
|
prop: e,
|
|
1504
1701
|
defaultProp: t,
|
|
@@ -1506,7 +1703,7 @@ function ro({
|
|
|
1506
1703
|
},
|
|
1507
1704
|
caller: r
|
|
1508
1705
|
}) {
|
|
1509
|
-
const [o, i, s] =
|
|
1706
|
+
const [o, i, s] = Qn({
|
|
1510
1707
|
defaultProp: t,
|
|
1511
1708
|
onChange: n
|
|
1512
1709
|
}), c = e !== void 0, u = c ? e : o;
|
|
@@ -1523,7 +1720,7 @@ function ro({
|
|
|
1523
1720
|
(d) => {
|
|
1524
1721
|
var l;
|
|
1525
1722
|
if (c) {
|
|
1526
|
-
const v =
|
|
1723
|
+
const v = Jn(d) ? d(e) : d;
|
|
1527
1724
|
v !== e && ((l = s.current) == null || l.call(s, v));
|
|
1528
1725
|
} else
|
|
1529
1726
|
i(d);
|
|
@@ -1532,217 +1729,20 @@ function ro({
|
|
|
1532
1729
|
);
|
|
1533
1730
|
return [u, a];
|
|
1534
1731
|
}
|
|
1535
|
-
function
|
|
1732
|
+
function Qn({
|
|
1536
1733
|
defaultProp: e,
|
|
1537
1734
|
onChange: t
|
|
1538
1735
|
}) {
|
|
1539
1736
|
const [n, r] = m.useState(e), o = m.useRef(n), i = m.useRef(t);
|
|
1540
|
-
return
|
|
1737
|
+
return Gn(() => {
|
|
1541
1738
|
i.current = t;
|
|
1542
1739
|
}, [t]), m.useEffect(() => {
|
|
1543
1740
|
var s;
|
|
1544
1741
|
o.current !== n && ((s = i.current) == null || s.call(i, n), o.current = n);
|
|
1545
1742
|
}, [n, o]), [n, r, i];
|
|
1546
1743
|
}
|
|
1547
|
-
function Wn(e) {
|
|
1548
|
-
return typeof e == "function";
|
|
1549
|
-
}
|
|
1550
|
-
// @__NO_SIDE_EFFECTS__
|
|
1551
|
-
function Bn(e) {
|
|
1552
|
-
const t = /* @__PURE__ */ _n(e), n = m.forwardRef((r, o) => {
|
|
1553
|
-
const { children: i, ...s } = r, c = m.Children.toArray(i), u = c.find(Vn);
|
|
1554
|
-
if (u) {
|
|
1555
|
-
const a = u.props.children, d = c.map((l) => l === u ? m.Children.count(a) > 1 ? m.Children.only(null) : m.isValidElement(a) ? a.props.children : null : l);
|
|
1556
|
-
return /* @__PURE__ */ se(t, { ...s, ref: o, children: m.isValidElement(a) ? m.cloneElement(a, void 0, d) : null });
|
|
1557
|
-
}
|
|
1558
|
-
return /* @__PURE__ */ se(t, { ...s, ref: o, children: i });
|
|
1559
|
-
});
|
|
1560
|
-
return n.displayName = `${e}.Slot`, n;
|
|
1561
|
-
}
|
|
1562
|
-
// @__NO_SIDE_EFFECTS__
|
|
1563
|
-
function _n(e) {
|
|
1564
|
-
const t = m.forwardRef((n, r) => {
|
|
1565
|
-
const { children: o, ...i } = n;
|
|
1566
|
-
if (m.isValidElement(o)) {
|
|
1567
|
-
const s = Hn(o), c = zn(i, o.props);
|
|
1568
|
-
return o.type !== m.Fragment && (c.ref = r ? mt(r, s) : s), m.cloneElement(o, c);
|
|
1569
|
-
}
|
|
1570
|
-
return m.Children.count(o) > 1 ? m.Children.only(null) : null;
|
|
1571
|
-
});
|
|
1572
|
-
return t.displayName = `${e}.SlotClone`, t;
|
|
1573
|
-
}
|
|
1574
|
-
var $n = Symbol("radix.slottable");
|
|
1575
|
-
function Vn(e) {
|
|
1576
|
-
return m.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === $n;
|
|
1577
|
-
}
|
|
1578
|
-
function zn(e, t) {
|
|
1579
|
-
const n = { ...t };
|
|
1580
|
-
for (const r in t) {
|
|
1581
|
-
const o = e[r], i = t[r];
|
|
1582
|
-
/^on[A-Z]/.test(r) ? o && i ? n[r] = (...c) => {
|
|
1583
|
-
const u = i(...c);
|
|
1584
|
-
return o(...c), u;
|
|
1585
|
-
} : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...i } : r === "className" && (n[r] = [o, i].filter(Boolean).join(" "));
|
|
1586
|
-
}
|
|
1587
|
-
return { ...e, ...n };
|
|
1588
|
-
}
|
|
1589
|
-
function Hn(e) {
|
|
1590
|
-
var r, o;
|
|
1591
|
-
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
1592
|
-
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
1593
|
-
}
|
|
1594
|
-
var Un = [
|
|
1595
|
-
"a",
|
|
1596
|
-
"button",
|
|
1597
|
-
"div",
|
|
1598
|
-
"form",
|
|
1599
|
-
"h2",
|
|
1600
|
-
"h3",
|
|
1601
|
-
"img",
|
|
1602
|
-
"input",
|
|
1603
|
-
"label",
|
|
1604
|
-
"li",
|
|
1605
|
-
"nav",
|
|
1606
|
-
"ol",
|
|
1607
|
-
"p",
|
|
1608
|
-
"select",
|
|
1609
|
-
"span",
|
|
1610
|
-
"svg",
|
|
1611
|
-
"ul"
|
|
1612
|
-
], jn = Un.reduce((e, t) => {
|
|
1613
|
-
const n = /* @__PURE__ */ Bn(`Primitive.${t}`), r = m.forwardRef((o, i) => {
|
|
1614
|
-
const { asChild: s, ...c } = o, u = s ? n : t;
|
|
1615
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ se(u, { ...c, ref: i });
|
|
1616
|
-
});
|
|
1617
|
-
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
1618
|
-
}, {}), Ne = "focusScope.autoFocusOnMount", Le = "focusScope.autoFocusOnUnmount", ot = { bubbles: !1, cancelable: !0 }, Kn = "FocusScope", Yn = m.forwardRef((e, t) => {
|
|
1619
|
-
const {
|
|
1620
|
-
loop: n = !1,
|
|
1621
|
-
trapped: r = !1,
|
|
1622
|
-
onMountAutoFocus: o,
|
|
1623
|
-
onUnmountAutoFocus: i,
|
|
1624
|
-
...s
|
|
1625
|
-
} = e, [c, u] = m.useState(null), a = We(o), d = We(i), l = m.useRef(null), v = ht(t, (f) => u(f)), h = m.useRef({
|
|
1626
|
-
paused: !1,
|
|
1627
|
-
pause() {
|
|
1628
|
-
this.paused = !0;
|
|
1629
|
-
},
|
|
1630
|
-
resume() {
|
|
1631
|
-
this.paused = !1;
|
|
1632
|
-
}
|
|
1633
|
-
}).current;
|
|
1634
|
-
m.useEffect(() => {
|
|
1635
|
-
if (r) {
|
|
1636
|
-
let f = function(b) {
|
|
1637
|
-
if (h.paused || !c) return;
|
|
1638
|
-
const x = b.target;
|
|
1639
|
-
c.contains(x) ? l.current = x : q(l.current, { select: !0 });
|
|
1640
|
-
}, p = function(b) {
|
|
1641
|
-
if (h.paused || !c) return;
|
|
1642
|
-
const x = b.relatedTarget;
|
|
1643
|
-
x !== null && (c.contains(x) || q(l.current, { select: !0 }));
|
|
1644
|
-
}, y = function(b) {
|
|
1645
|
-
if (document.activeElement === document.body)
|
|
1646
|
-
for (const S of b)
|
|
1647
|
-
S.removedNodes.length > 0 && q(c);
|
|
1648
|
-
};
|
|
1649
|
-
document.addEventListener("focusin", f), document.addEventListener("focusout", p);
|
|
1650
|
-
const w = new MutationObserver(y);
|
|
1651
|
-
return c && w.observe(c, { childList: !0, subtree: !0 }), () => {
|
|
1652
|
-
document.removeEventListener("focusin", f), document.removeEventListener("focusout", p), w.disconnect();
|
|
1653
|
-
};
|
|
1654
|
-
}
|
|
1655
|
-
}, [r, c, h.paused]), m.useEffect(() => {
|
|
1656
|
-
if (c) {
|
|
1657
|
-
ct.add(h);
|
|
1658
|
-
const f = document.activeElement;
|
|
1659
|
-
if (!c.contains(f)) {
|
|
1660
|
-
const y = new CustomEvent(Ne, ot);
|
|
1661
|
-
c.addEventListener(Ne, a), c.dispatchEvent(y), y.defaultPrevented || (Xn(Jn(Rt(c)), { select: !0 }), document.activeElement === f && q(c));
|
|
1662
|
-
}
|
|
1663
|
-
return () => {
|
|
1664
|
-
c.removeEventListener(Ne, a), setTimeout(() => {
|
|
1665
|
-
const y = new CustomEvent(Le, ot);
|
|
1666
|
-
c.addEventListener(Le, d), c.dispatchEvent(y), y.defaultPrevented || q(f ?? document.body, { select: !0 }), c.removeEventListener(Le, d), ct.remove(h);
|
|
1667
|
-
}, 0);
|
|
1668
|
-
};
|
|
1669
|
-
}
|
|
1670
|
-
}, [c, a, d, h]);
|
|
1671
|
-
const g = m.useCallback(
|
|
1672
|
-
(f) => {
|
|
1673
|
-
if (!n && !r || h.paused) return;
|
|
1674
|
-
const p = f.key === "Tab" && !f.altKey && !f.ctrlKey && !f.metaKey, y = document.activeElement;
|
|
1675
|
-
if (p && y) {
|
|
1676
|
-
const w = f.currentTarget, [b, x] = qn(w);
|
|
1677
|
-
b && x ? !f.shiftKey && y === x ? (f.preventDefault(), n && q(b, { select: !0 })) : f.shiftKey && y === b && (f.preventDefault(), n && q(x, { select: !0 })) : y === w && f.preventDefault();
|
|
1678
|
-
}
|
|
1679
|
-
},
|
|
1680
|
-
[n, r, h.paused]
|
|
1681
|
-
);
|
|
1682
|
-
return /* @__PURE__ */ se(jn.div, { tabIndex: -1, ...s, ref: v, onKeyDown: g });
|
|
1683
|
-
});
|
|
1684
|
-
Yn.displayName = Kn;
|
|
1685
|
-
function Xn(e, { select: t = !1 } = {}) {
|
|
1686
|
-
const n = document.activeElement;
|
|
1687
|
-
for (const r of e)
|
|
1688
|
-
if (q(r, { select: t }), document.activeElement !== n) return;
|
|
1689
|
-
}
|
|
1690
|
-
function qn(e) {
|
|
1691
|
-
const t = Rt(e), n = it(t, e), r = it(t.reverse(), e);
|
|
1692
|
-
return [n, r];
|
|
1693
|
-
}
|
|
1694
|
-
function Rt(e) {
|
|
1695
|
-
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
1696
|
-
acceptNode: (r) => {
|
|
1697
|
-
const o = r.tagName === "INPUT" && r.type === "hidden";
|
|
1698
|
-
return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
1699
|
-
}
|
|
1700
|
-
});
|
|
1701
|
-
for (; n.nextNode(); ) t.push(n.currentNode);
|
|
1702
|
-
return t;
|
|
1703
|
-
}
|
|
1704
|
-
function it(e, t) {
|
|
1705
|
-
for (const n of e)
|
|
1706
|
-
if (!Zn(n, { upTo: t })) return n;
|
|
1707
|
-
}
|
|
1708
|
-
function Zn(e, { upTo: t }) {
|
|
1709
|
-
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
1710
|
-
for (; e; ) {
|
|
1711
|
-
if (t !== void 0 && e === t) return !1;
|
|
1712
|
-
if (getComputedStyle(e).display === "none") return !0;
|
|
1713
|
-
e = e.parentElement;
|
|
1714
|
-
}
|
|
1715
|
-
return !1;
|
|
1716
|
-
}
|
|
1717
|
-
function Gn(e) {
|
|
1718
|
-
return e instanceof HTMLInputElement && "select" in e;
|
|
1719
|
-
}
|
|
1720
|
-
function q(e, { select: t = !1 } = {}) {
|
|
1721
|
-
if (e && e.focus) {
|
|
1722
|
-
const n = document.activeElement;
|
|
1723
|
-
e.focus({ preventScroll: !0 }), e !== n && Gn(e) && t && e.select();
|
|
1724
|
-
}
|
|
1725
|
-
}
|
|
1726
|
-
var ct = Qn();
|
|
1727
|
-
function Qn() {
|
|
1728
|
-
let e = [];
|
|
1729
|
-
return {
|
|
1730
|
-
add(t) {
|
|
1731
|
-
const n = e[0];
|
|
1732
|
-
t !== n && (n == null || n.pause()), e = st(e, t), e.unshift(t);
|
|
1733
|
-
},
|
|
1734
|
-
remove(t) {
|
|
1735
|
-
var n;
|
|
1736
|
-
e = st(e, t), (n = e[0]) == null || n.resume();
|
|
1737
|
-
}
|
|
1738
|
-
};
|
|
1739
|
-
}
|
|
1740
|
-
function st(e, t) {
|
|
1741
|
-
const n = [...e], r = n.indexOf(t);
|
|
1742
|
-
return r !== -1 && n.splice(r, 1), n;
|
|
1743
|
-
}
|
|
1744
1744
|
function Jn(e) {
|
|
1745
|
-
return e
|
|
1745
|
+
return typeof e == "function";
|
|
1746
1746
|
}
|
|
1747
1747
|
var er = function(e) {
|
|
1748
1748
|
if (typeof document > "u")
|
|
@@ -2265,13 +2265,13 @@ var _r = m.forwardRef(function(e, t) {
|
|
|
2265
2265
|
});
|
|
2266
2266
|
_r.classNames = Pe.classNames;
|
|
2267
2267
|
export {
|
|
2268
|
-
|
|
2269
|
-
|
|
2268
|
+
Gt as F,
|
|
2269
|
+
Xn as P,
|
|
2270
2270
|
_r as R,
|
|
2271
|
-
|
|
2272
|
-
|
|
2271
|
+
Hr as a,
|
|
2272
|
+
Kr as b,
|
|
2273
2273
|
mt as c,
|
|
2274
|
-
|
|
2274
|
+
Ur as d,
|
|
2275
2275
|
We as e,
|
|
2276
2276
|
no as f,
|
|
2277
2277
|
Xr as g,
|
|
@@ -2283,7 +2283,7 @@ export {
|
|
|
2283
2283
|
Yr as m,
|
|
2284
2284
|
ae as n,
|
|
2285
2285
|
qr as o,
|
|
2286
|
-
|
|
2286
|
+
jr as p,
|
|
2287
2287
|
ro as q,
|
|
2288
2288
|
oo as r,
|
|
2289
2289
|
Zr as s,
|