highsoft-ui 1.0.111 → 1.0.113

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.
Files changed (68) hide show
  1. package/dist/Button-Bbc4vmW_.js +45 -0
  2. package/dist/Container-LAkF4ShX.js +11 -0
  3. package/dist/CookiePolicyModal-BH2uHybE.js +90 -0
  4. package/dist/Footer-DY0QJnxb.js +783 -0
  5. package/dist/GPTInput-DRFGKJ2u.js +66 -0
  6. package/dist/Header-DbSqXuvO.js +383 -0
  7. package/dist/Logo-CZ5LYqub.js +194 -0
  8. package/dist/NewTag-C-3mRyvV.js +26 -0
  9. package/dist/Notification-_vWBqFiA.js +96 -0
  10. package/dist/PrefPanel-DmiRZs1n.js +1548 -0
  11. package/dist/Search-D_fsZ-hm.js +4673 -0
  12. package/dist/clsx-ROFf4vs9.js +16 -0
  13. package/dist/components/Button/index.js +2 -81
  14. package/dist/components/Container/index.js +2 -11
  15. package/dist/components/Footer/CookiePolicyModal.js +2 -9
  16. package/dist/components/Footer/index.js +2 -833
  17. package/dist/components/GPTInput/index.js +2 -86
  18. package/dist/components/Header/index.js +2 -611
  19. package/dist/components/Logo/index.js +2 -255
  20. package/dist/components/NewTag/index.js +2 -54
  21. package/dist/components/Notification/index.js +2 -100
  22. package/dist/components/PrefPanel/index.js +2 -1945
  23. package/dist/components/Search/index.js +2 -9
  24. package/dist/components/ThemeLoader/index.js +6 -34
  25. package/dist/components/icons/Bubble.js +37 -52
  26. package/dist/components/icons/MadeInNorway.js +110 -145
  27. package/dist/components/icons/Plane.js +17 -23
  28. package/dist/dist-0f0-S8_q.js +211 -0
  29. package/dist/dist-CjrKJb_1.js +27 -0
  30. package/dist/es2015-CzBBLWyD.js +1140 -0
  31. package/dist/esm-C1TDRARf.js +479 -0
  32. package/dist/highsoft-ui.css +2 -1
  33. package/dist/main.js +12 -28
  34. package/dist/php-client.js +9 -9
  35. package/dist/php.js +10 -16
  36. package/dist/utils-C4QGLbxr.js +162 -0
  37. package/dist/utils.js +2 -11
  38. package/package.json +14 -8
  39. package/dist/Announcement03-obPaH4LK.js +0 -23
  40. package/dist/Check-Cm4roSEj.js +0 -23
  41. package/dist/CookiePolicyModal-C5FOuvB-.js +0 -82
  42. package/dist/XClose-CCu1vrNS.js +0 -23
  43. package/dist/clsx-OuTLNxxd.js +0 -16
  44. package/dist/extends-hS2Bh-Yp.js +0 -12
  45. package/dist/index-CUCGgBGk.js +0 -5654
  46. package/dist/index-CYz8LhDn.js +0 -1110
  47. package/dist/index-DThcOQDt.js +0 -234
  48. package/dist/index-hYJmp-0x.js +0 -30
  49. package/dist/utils-BKDJp1i0.js +0 -140
  50. /package/dist/{components → lib/components}/Button/index.d.ts +0 -0
  51. /package/dist/{components → lib/components}/Container/index.d.ts +0 -0
  52. /package/dist/{components → lib/components}/Footer/CookiePolicyModal.d.ts +0 -0
  53. /package/dist/{components → lib/components}/Footer/index.d.ts +0 -0
  54. /package/dist/{components → lib/components}/GPTInput/index.d.ts +0 -0
  55. /package/dist/{components → lib/components}/Header/index.d.ts +0 -0
  56. /package/dist/{components → lib/components}/Logo/index.d.ts +0 -0
  57. /package/dist/{components → lib/components}/NewTag/index.d.ts +0 -0
  58. /package/dist/{components → lib/components}/Notification/index.d.ts +0 -0
  59. /package/dist/{components → lib/components}/PrefPanel/index.d.ts +0 -0
  60. /package/dist/{components → lib/components}/Search/index.d.ts +0 -0
  61. /package/dist/{components → lib/components}/ThemeLoader/index.d.ts +0 -0
  62. /package/dist/{components → lib/components}/icons/Bubble.d.ts +0 -0
  63. /package/dist/{components → lib/components}/icons/MadeInNorway.d.ts +0 -0
  64. /package/dist/{components → lib/components}/icons/Plane.d.ts +0 -0
  65. /package/dist/{main.d.ts → lib/main.d.ts} +0 -0
  66. /package/dist/{php-client.d.ts → lib/php-client.d.ts} +0 -0
  67. /package/dist/{php.d.ts → lib/php.d.ts} +0 -0
  68. /package/dist/{utils.d.ts → lib/utils.d.ts} +0 -0
@@ -1,1110 +0,0 @@
1
- import * as a from "react";
2
- import { useState as Le } from "react";
3
- import { jsx as O } from "react/jsx-runtime";
4
- import * as Me from "react-dom";
5
- import De from "react-dom";
6
- function ae(e, t) {
7
- if (typeof e == "function")
8
- return e(t);
9
- e != null && (e.current = t);
10
- }
11
- function Ee(...e) {
12
- return (t) => {
13
- let n = !1;
14
- const r = e.map((o) => {
15
- const c = ae(o, t);
16
- return !n && typeof c == "function" && (n = !0), c;
17
- });
18
- if (n)
19
- return () => {
20
- for (let o = 0; o < r.length; o++) {
21
- const c = r[o];
22
- typeof c == "function" ? c() : ae(e[o], null);
23
- }
24
- };
25
- };
26
- }
27
- function K(...e) {
28
- return a.useCallback(Ee(...e), e);
29
- }
30
- // @__NO_SIDE_EFFECTS__
31
- function Ie(e) {
32
- const t = /* @__PURE__ */ xe(e), n = a.forwardRef((r, o) => {
33
- const { children: c, ...s } = r, i = a.Children.toArray(c), v = i.find(Fe);
34
- if (v) {
35
- const l = v.props.children, d = i.map((f) => f === v ? a.Children.count(l) > 1 ? a.Children.only(null) : a.isValidElement(l) ? l.props.children : null : f);
36
- return /* @__PURE__ */ O(t, { ...s, ref: o, children: a.isValidElement(l) ? a.cloneElement(l, void 0, d) : null });
37
- }
38
- return /* @__PURE__ */ O(t, { ...s, ref: o, children: c });
39
- });
40
- return n.displayName = `${e}.Slot`, n;
41
- }
42
- // @__NO_SIDE_EFFECTS__
43
- function xe(e) {
44
- const t = a.forwardRef((n, r) => {
45
- const { children: o, ...c } = n;
46
- if (a.isValidElement(o)) {
47
- const s = _e(o), i = We(c, o.props);
48
- return o.type !== a.Fragment && (i.ref = r ? Ee(r, s) : s), a.cloneElement(o, i);
49
- }
50
- return a.Children.count(o) > 1 ? a.Children.only(null) : null;
51
- });
52
- return t.displayName = `${e}.SlotClone`, t;
53
- }
54
- var ke = /* @__PURE__ */ Symbol("radix.slottable");
55
- function Fe(e) {
56
- return a.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === ke;
57
- }
58
- function We(e, t) {
59
- const n = { ...t };
60
- for (const r in t) {
61
- const o = e[r], c = t[r];
62
- /^on[A-Z]/.test(r) ? o && c ? n[r] = (...i) => {
63
- const v = c(...i);
64
- return o(...i), v;
65
- } : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...c } : r === "className" && (n[r] = [o, c].filter(Boolean).join(" "));
66
- }
67
- return { ...e, ...n };
68
- }
69
- function _e(e) {
70
- let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
71
- return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
72
- }
73
- var Be = [
74
- "a",
75
- "button",
76
- "div",
77
- "form",
78
- "h2",
79
- "h3",
80
- "img",
81
- "input",
82
- "label",
83
- "li",
84
- "nav",
85
- "ol",
86
- "p",
87
- "select",
88
- "span",
89
- "svg",
90
- "ul"
91
- ], X = Be.reduce((e, t) => {
92
- const n = /* @__PURE__ */ Ie(`Primitive.${t}`), r = a.forwardRef((o, c) => {
93
- const { asChild: s, ...i } = o, v = s ? n : t;
94
- return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ O(v, { ...i, ref: c });
95
- });
96
- return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
97
- }, {});
98
- function Ue(e, t) {
99
- e && Me.flushSync(() => e.dispatchEvent(t));
100
- }
101
- function an(e, t) {
102
- const n = a.createContext(t), r = (c) => {
103
- const { children: s, ...i } = c, v = a.useMemo(() => i, Object.values(i));
104
- return /* @__PURE__ */ O(n.Provider, { value: v, children: s });
105
- };
106
- r.displayName = e + "Provider";
107
- function o(c) {
108
- const s = a.useContext(n);
109
- if (s) return s;
110
- if (t !== void 0) return t;
111
- throw new Error(`\`${c}\` must be used within \`${e}\``);
112
- }
113
- return [r, o];
114
- }
115
- function cn(e, t = []) {
116
- let n = [];
117
- function r(c, s) {
118
- const i = a.createContext(s), v = n.length;
119
- n = [...n, s];
120
- const l = (f) => {
121
- const { scope: m, children: p, ...w } = f, u = m?.[e]?.[v] || i, h = a.useMemo(() => w, Object.values(w));
122
- return /* @__PURE__ */ O(u.Provider, { value: h, children: p });
123
- };
124
- l.displayName = c + "Provider";
125
- function d(f, m) {
126
- const p = m?.[e]?.[v] || i, w = a.useContext(p);
127
- if (w) return w;
128
- if (s !== void 0) return s;
129
- throw new Error(`\`${f}\` must be used within \`${c}\``);
130
- }
131
- return [l, d];
132
- }
133
- const o = () => {
134
- const c = n.map((s) => a.createContext(s));
135
- return function(i) {
136
- const v = i?.[e] || c;
137
- return a.useMemo(
138
- () => ({ [`__scope${e}`]: { ...i, [e]: v } }),
139
- [i, v]
140
- );
141
- };
142
- };
143
- return o.scopeName = e, [r, je(o, ...t)];
144
- }
145
- function je(...e) {
146
- const t = e[0];
147
- if (e.length === 1) return t;
148
- const n = () => {
149
- const r = e.map((o) => ({
150
- useScope: o(),
151
- scopeName: o.scopeName
152
- }));
153
- return function(c) {
154
- const s = r.reduce((i, { useScope: v, scopeName: l }) => {
155
- const f = v(c)[`__scope${l}`];
156
- return { ...i, ...f };
157
- }, {});
158
- return a.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
159
- };
160
- };
161
- return n.scopeName = t.scopeName, n;
162
- }
163
- function z(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
164
- return function(o) {
165
- if (e?.(o), n === !1 || !o.defaultPrevented)
166
- return t?.(o);
167
- };
168
- }
169
- var k = globalThis?.document ? a.useLayoutEffect : () => {
170
- }, $e = a[" useInsertionEffect ".trim().toString()] || k;
171
- function sn({
172
- prop: e,
173
- defaultProp: t,
174
- onChange: n = () => {
175
- },
176
- caller: r
177
- }) {
178
- const [o, c, s] = He({
179
- defaultProp: t,
180
- onChange: n
181
- }), i = e !== void 0, v = i ? e : o;
182
- {
183
- const d = a.useRef(e !== void 0);
184
- a.useEffect(() => {
185
- const f = d.current;
186
- f !== i && console.warn(
187
- `${r} is changing from ${f ? "controlled" : "uncontrolled"} to ${i ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
188
- ), d.current = i;
189
- }, [i, r]);
190
- }
191
- const l = a.useCallback(
192
- (d) => {
193
- if (i) {
194
- const f = Ve(d) ? d(e) : d;
195
- f !== e && s.current?.(f);
196
- } else
197
- c(d);
198
- },
199
- [i, e, c, s]
200
- );
201
- return [v, l];
202
- }
203
- function He({
204
- defaultProp: e,
205
- onChange: t
206
- }) {
207
- const [n, r] = a.useState(e), o = a.useRef(n), c = a.useRef(t);
208
- return $e(() => {
209
- c.current = t;
210
- }, [t]), a.useEffect(() => {
211
- o.current !== n && (c.current?.(n), o.current = n);
212
- }, [n, o]), [n, r, c];
213
- }
214
- function Ve(e) {
215
- return typeof e == "function";
216
- }
217
- function Ke(e, t) {
218
- return a.useReducer((n, r) => t[n][r] ?? n, e);
219
- }
220
- var Xe = (e) => {
221
- const { present: t, children: n } = e, r = Ye(t), o = typeof n == "function" ? n({ present: r.isPresent }) : a.Children.only(n), c = K(r.ref, ze(o));
222
- return typeof n == "function" || r.isPresent ? a.cloneElement(o, { ref: c }) : null;
223
- };
224
- Xe.displayName = "Presence";
225
- function Ye(e) {
226
- const [t, n] = a.useState(), r = a.useRef(null), o = a.useRef(e), c = a.useRef("none"), s = e ? "mounted" : "unmounted", [i, v] = Ke(s, {
227
- mounted: {
228
- UNMOUNT: "unmounted",
229
- ANIMATION_OUT: "unmountSuspended"
230
- },
231
- unmountSuspended: {
232
- MOUNT: "mounted",
233
- ANIMATION_END: "unmounted"
234
- },
235
- unmounted: {
236
- MOUNT: "mounted"
237
- }
238
- });
239
- return a.useEffect(() => {
240
- const l = _(r.current);
241
- c.current = i === "mounted" ? l : "none";
242
- }, [i]), k(() => {
243
- const l = r.current, d = o.current;
244
- if (d !== e) {
245
- const m = c.current, p = _(l);
246
- e ? v("MOUNT") : p === "none" || l?.display === "none" ? v("UNMOUNT") : v(d && m !== p ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
247
- }
248
- }, [e, v]), k(() => {
249
- if (t) {
250
- let l;
251
- const d = t.ownerDocument.defaultView ?? window, f = (p) => {
252
- const u = _(r.current).includes(CSS.escape(p.animationName));
253
- if (p.target === t && u && (v("ANIMATION_END"), !o.current)) {
254
- const h = t.style.animationFillMode;
255
- t.style.animationFillMode = "forwards", l = d.setTimeout(() => {
256
- t.style.animationFillMode === "forwards" && (t.style.animationFillMode = h);
257
- });
258
- }
259
- }, m = (p) => {
260
- p.target === t && (c.current = _(r.current));
261
- };
262
- return t.addEventListener("animationstart", m), t.addEventListener("animationcancel", f), t.addEventListener("animationend", f), () => {
263
- d.clearTimeout(l), t.removeEventListener("animationstart", m), t.removeEventListener("animationcancel", f), t.removeEventListener("animationend", f);
264
- };
265
- } else
266
- v("ANIMATION_END");
267
- }, [t, v]), {
268
- isPresent: ["mounted", "unmountSuspended"].includes(i),
269
- ref: a.useCallback((l) => {
270
- r.current = l ? getComputedStyle(l) : null, n(l);
271
- }, [])
272
- };
273
- }
274
- function _(e) {
275
- return e?.animationName || "none";
276
- }
277
- function ze(e) {
278
- let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
279
- return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
280
- }
281
- var Ge = a[" useId ".trim().toString()] || (() => {
282
- }), Ze = 0;
283
- function un(e) {
284
- const [t, n] = a.useState(Ge());
285
- return k(() => {
286
- n((r) => r ?? String(Ze++));
287
- }, [e]), e || (t ? `radix-${t}` : "");
288
- }
289
- function F(e) {
290
- const t = a.useRef(e);
291
- return a.useEffect(() => {
292
- t.current = e;
293
- }), a.useMemo(() => (...n) => t.current?.(...n), []);
294
- }
295
- function qe(e, t = globalThis?.document) {
296
- const n = F(e);
297
- a.useEffect(() => {
298
- const r = (o) => {
299
- o.key === "Escape" && n(o);
300
- };
301
- return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
302
- }, [n, t]);
303
- }
304
- var Qe = "DismissableLayer", ne = "dismissableLayer.update", Je = "dismissableLayer.pointerDownOutside", et = "dismissableLayer.focusOutside", ie, ge = a.createContext({
305
- layers: /* @__PURE__ */ new Set(),
306
- layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
307
- branches: /* @__PURE__ */ new Set()
308
- }), tt = a.forwardRef(
309
- (e, t) => {
310
- const {
311
- disableOutsidePointerEvents: n = !1,
312
- onEscapeKeyDown: r,
313
- onPointerDownOutside: o,
314
- onFocusOutside: c,
315
- onInteractOutside: s,
316
- onDismiss: i,
317
- ...v
318
- } = e, l = a.useContext(ge), [d, f] = a.useState(null), m = d?.ownerDocument ?? globalThis?.document, [, p] = a.useState({}), w = K(t, (E) => f(E)), u = Array.from(l.layers), [h] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), y = u.indexOf(h), g = d ? u.indexOf(d) : -1, b = l.layersWithOutsidePointerEventsDisabled.size > 0, S = g >= y, C = ot((E) => {
319
- const A = E.target, T = [...l.branches].some((x) => x.contains(A));
320
- !S || T || (o?.(E), s?.(E), E.defaultPrevented || i?.());
321
- }, m), P = at((E) => {
322
- const A = E.target;
323
- [...l.branches].some((x) => x.contains(A)) || (c?.(E), s?.(E), E.defaultPrevented || i?.());
324
- }, m);
325
- return qe((E) => {
326
- g === l.layers.size - 1 && (r?.(E), !E.defaultPrevented && i && (E.preventDefault(), i()));
327
- }, m), a.useEffect(() => {
328
- if (d)
329
- return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (ie = m.body.style.pointerEvents, m.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(d)), l.layers.add(d), ce(), () => {
330
- n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (m.body.style.pointerEvents = ie);
331
- };
332
- }, [d, m, n, l]), a.useEffect(() => () => {
333
- d && (l.layers.delete(d), l.layersWithOutsidePointerEventsDisabled.delete(d), ce());
334
- }, [d, l]), a.useEffect(() => {
335
- const E = () => p({});
336
- return document.addEventListener(ne, E), () => document.removeEventListener(ne, E);
337
- }, []), /* @__PURE__ */ O(
338
- X.div,
339
- {
340
- ...v,
341
- ref: w,
342
- style: {
343
- pointerEvents: b ? S ? "auto" : "none" : void 0,
344
- ...e.style
345
- },
346
- onFocusCapture: z(e.onFocusCapture, P.onFocusCapture),
347
- onBlurCapture: z(e.onBlurCapture, P.onBlurCapture),
348
- onPointerDownCapture: z(
349
- e.onPointerDownCapture,
350
- C.onPointerDownCapture
351
- )
352
- }
353
- );
354
- }
355
- );
356
- tt.displayName = Qe;
357
- var nt = "DismissableLayerBranch", rt = a.forwardRef((e, t) => {
358
- const n = a.useContext(ge), r = a.useRef(null), o = K(t, r);
359
- return a.useEffect(() => {
360
- const c = r.current;
361
- if (c)
362
- return n.branches.add(c), () => {
363
- n.branches.delete(c);
364
- };
365
- }, [n.branches]), /* @__PURE__ */ O(X.div, { ...e, ref: o });
366
- });
367
- rt.displayName = nt;
368
- function ot(e, t = globalThis?.document) {
369
- const n = F(e), r = a.useRef(!1), o = a.useRef(() => {
370
- });
371
- return a.useEffect(() => {
372
- const c = (i) => {
373
- if (i.target && !r.current) {
374
- let v = function() {
375
- be(
376
- Je,
377
- n,
378
- l,
379
- { discrete: !0 }
380
- );
381
- };
382
- const l = { originalEvent: i };
383
- i.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = v, t.addEventListener("click", o.current, { once: !0 })) : v();
384
- } else
385
- t.removeEventListener("click", o.current);
386
- r.current = !1;
387
- }, s = window.setTimeout(() => {
388
- t.addEventListener("pointerdown", c);
389
- }, 0);
390
- return () => {
391
- window.clearTimeout(s), t.removeEventListener("pointerdown", c), t.removeEventListener("click", o.current);
392
- };
393
- }, [t, n]), {
394
- // ensures we check React component tree (not just DOM tree)
395
- onPointerDownCapture: () => r.current = !0
396
- };
397
- }
398
- function at(e, t = globalThis?.document) {
399
- const n = F(e), r = a.useRef(!1);
400
- return a.useEffect(() => {
401
- const o = (c) => {
402
- c.target && !r.current && be(et, n, { originalEvent: c }, {
403
- discrete: !1
404
- });
405
- };
406
- return t.addEventListener("focusin", o), () => t.removeEventListener("focusin", o);
407
- }, [t, n]), {
408
- onFocusCapture: () => r.current = !0,
409
- onBlurCapture: () => r.current = !1
410
- };
411
- }
412
- function ce() {
413
- const e = new CustomEvent(ne);
414
- document.dispatchEvent(e);
415
- }
416
- function be(e, t, n, { discrete: r }) {
417
- const o = n.originalEvent.target, c = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
418
- t && o.addEventListener(e, t, { once: !0 }), r ? Ue(o, c) : o.dispatchEvent(c);
419
- }
420
- var G = "focusScope.autoFocusOnMount", Z = "focusScope.autoFocusOnUnmount", se = { bubbles: !1, cancelable: !0 }, it = "FocusScope", ct = a.forwardRef((e, t) => {
421
- const {
422
- loop: n = !1,
423
- trapped: r = !1,
424
- onMountAutoFocus: o,
425
- onUnmountAutoFocus: c,
426
- ...s
427
- } = e, [i, v] = a.useState(null), l = F(o), d = F(c), f = a.useRef(null), m = K(t, (u) => v(u)), p = a.useRef({
428
- paused: !1,
429
- pause() {
430
- this.paused = !0;
431
- },
432
- resume() {
433
- this.paused = !1;
434
- }
435
- }).current;
436
- a.useEffect(() => {
437
- if (r) {
438
- let u = function(b) {
439
- if (p.paused || !i) return;
440
- const S = b.target;
441
- i.contains(S) ? f.current = S : N(f.current, { select: !0 });
442
- }, h = function(b) {
443
- if (p.paused || !i) return;
444
- const S = b.relatedTarget;
445
- S !== null && (i.contains(S) || N(f.current, { select: !0 }));
446
- }, y = function(b) {
447
- if (document.activeElement === document.body)
448
- for (const C of b)
449
- C.removedNodes.length > 0 && N(i);
450
- };
451
- document.addEventListener("focusin", u), document.addEventListener("focusout", h);
452
- const g = new MutationObserver(y);
453
- return i && g.observe(i, { childList: !0, subtree: !0 }), () => {
454
- document.removeEventListener("focusin", u), document.removeEventListener("focusout", h), g.disconnect();
455
- };
456
- }
457
- }, [r, i, p.paused]), a.useEffect(() => {
458
- if (i) {
459
- le.add(p);
460
- const u = document.activeElement;
461
- if (!i.contains(u)) {
462
- const y = new CustomEvent(G, se);
463
- i.addEventListener(G, l), i.dispatchEvent(y), y.defaultPrevented || (st(vt(Se(i)), { select: !0 }), document.activeElement === u && N(i));
464
- }
465
- return () => {
466
- i.removeEventListener(G, l), setTimeout(() => {
467
- const y = new CustomEvent(Z, se);
468
- i.addEventListener(Z, d), i.dispatchEvent(y), y.defaultPrevented || N(u ?? document.body, { select: !0 }), i.removeEventListener(Z, d), le.remove(p);
469
- }, 0);
470
- };
471
- }
472
- }, [i, l, d, p]);
473
- const w = a.useCallback(
474
- (u) => {
475
- if (!n && !r || p.paused) return;
476
- const h = u.key === "Tab" && !u.altKey && !u.ctrlKey && !u.metaKey, y = document.activeElement;
477
- if (h && y) {
478
- const g = u.currentTarget, [b, S] = ut(g);
479
- b && S ? !u.shiftKey && y === S ? (u.preventDefault(), n && N(b, { select: !0 })) : u.shiftKey && y === b && (u.preventDefault(), n && N(S, { select: !0 })) : y === g && u.preventDefault();
480
- }
481
- },
482
- [n, r, p.paused]
483
- );
484
- return /* @__PURE__ */ O(X.div, { tabIndex: -1, ...s, ref: m, onKeyDown: w });
485
- });
486
- ct.displayName = it;
487
- function st(e, { select: t = !1 } = {}) {
488
- const n = document.activeElement;
489
- for (const r of e)
490
- if (N(r, { select: t }), document.activeElement !== n) return;
491
- }
492
- function ut(e) {
493
- const t = Se(e), n = ue(t, e), r = ue(t.reverse(), e);
494
- return [n, r];
495
- }
496
- function Se(e) {
497
- const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
498
- acceptNode: (r) => {
499
- const o = r.tagName === "INPUT" && r.type === "hidden";
500
- return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
501
- }
502
- });
503
- for (; n.nextNode(); ) t.push(n.currentNode);
504
- return t;
505
- }
506
- function ue(e, t) {
507
- for (const n of e)
508
- if (!lt(n, { upTo: t })) return n;
509
- }
510
- function lt(e, { upTo: t }) {
511
- if (getComputedStyle(e).visibility === "hidden") return !0;
512
- for (; e; ) {
513
- if (t !== void 0 && e === t) return !1;
514
- if (getComputedStyle(e).display === "none") return !0;
515
- e = e.parentElement;
516
- }
517
- return !1;
518
- }
519
- function ft(e) {
520
- return e instanceof HTMLInputElement && "select" in e;
521
- }
522
- function N(e, { select: t = !1 } = {}) {
523
- if (e && e.focus) {
524
- const n = document.activeElement;
525
- e.focus({ preventScroll: !0 }), e !== n && ft(e) && t && e.select();
526
- }
527
- }
528
- var le = dt();
529
- function dt() {
530
- let e = [];
531
- return {
532
- add(t) {
533
- const n = e[0];
534
- t !== n && n?.pause(), e = fe(e, t), e.unshift(t);
535
- },
536
- remove(t) {
537
- e = fe(e, t), e[0]?.resume();
538
- }
539
- };
540
- }
541
- function fe(e, t) {
542
- const n = [...e], r = n.indexOf(t);
543
- return r !== -1 && n.splice(r, 1), n;
544
- }
545
- function vt(e) {
546
- return e.filter((t) => t.tagName !== "A");
547
- }
548
- var mt = "Portal", ht = a.forwardRef((e, t) => {
549
- const { container: n, ...r } = e, [o, c] = a.useState(!1);
550
- k(() => c(!0), []);
551
- const s = n || o && globalThis?.document?.body;
552
- return s ? De.createPortal(/* @__PURE__ */ O(X.div, { ...r, ref: t }), s) : null;
553
- });
554
- ht.displayName = mt;
555
- var q = 0;
556
- function ln() {
557
- a.useEffect(() => {
558
- const e = document.querySelectorAll("[data-radix-focus-guard]");
559
- return document.body.insertAdjacentElement("afterbegin", e[0] ?? de()), document.body.insertAdjacentElement("beforeend", e[1] ?? de()), q++, () => {
560
- q === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), q--;
561
- };
562
- }, []);
563
- }
564
- function de() {
565
- const e = document.createElement("span");
566
- return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
567
- }
568
- var R = function() {
569
- return R = Object.assign || function(t) {
570
- for (var n, r = 1, o = arguments.length; r < o; r++) {
571
- n = arguments[r];
572
- for (var c in n) Object.prototype.hasOwnProperty.call(n, c) && (t[c] = n[c]);
573
- }
574
- return t;
575
- }, R.apply(this, arguments);
576
- };
577
- function we(e, t) {
578
- var n = {};
579
- for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
580
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
581
- for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
582
- t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
583
- return n;
584
- }
585
- function pt(e, t, n) {
586
- if (n || arguments.length === 2) for (var r = 0, o = t.length, c; r < o; r++)
587
- (c || !(r in t)) && (c || (c = Array.prototype.slice.call(t, 0, r)), c[r] = t[r]);
588
- return e.concat(c || Array.prototype.slice.call(t));
589
- }
590
- var H = "right-scroll-bar-position", V = "width-before-scroll-bar", yt = "with-scroll-bars-hidden", Et = "--removed-body-scroll-bar-size";
591
- function Q(e, t) {
592
- return typeof e == "function" ? e(t) : e && (e.current = t), e;
593
- }
594
- function gt(e, t) {
595
- var n = Le(function() {
596
- return {
597
- // value
598
- value: e,
599
- // last callback
600
- callback: t,
601
- // "memoized" public interface
602
- facade: {
603
- get current() {
604
- return n.value;
605
- },
606
- set current(r) {
607
- var o = n.value;
608
- o !== r && (n.value = r, n.callback(r, o));
609
- }
610
- }
611
- };
612
- })[0];
613
- return n.callback = t, n.facade;
614
- }
615
- var bt = typeof window < "u" ? a.useLayoutEffect : a.useEffect, ve = /* @__PURE__ */ new WeakMap();
616
- function St(e, t) {
617
- var n = gt(null, function(r) {
618
- return e.forEach(function(o) {
619
- return Q(o, r);
620
- });
621
- });
622
- return bt(function() {
623
- var r = ve.get(n);
624
- if (r) {
625
- var o = new Set(r), c = new Set(e), s = n.current;
626
- o.forEach(function(i) {
627
- c.has(i) || Q(i, null);
628
- }), c.forEach(function(i) {
629
- o.has(i) || Q(i, s);
630
- });
631
- }
632
- ve.set(n, e);
633
- }, [e]), n;
634
- }
635
- function wt(e) {
636
- return e;
637
- }
638
- function Ct(e, t) {
639
- t === void 0 && (t = wt);
640
- var n = [], r = !1, o = {
641
- read: function() {
642
- if (r)
643
- throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
644
- return n.length ? n[n.length - 1] : e;
645
- },
646
- useMedium: function(c) {
647
- var s = t(c, r);
648
- return n.push(s), function() {
649
- n = n.filter(function(i) {
650
- return i !== s;
651
- });
652
- };
653
- },
654
- assignSyncMedium: function(c) {
655
- for (r = !0; n.length; ) {
656
- var s = n;
657
- n = [], s.forEach(c);
658
- }
659
- n = {
660
- push: function(i) {
661
- return c(i);
662
- },
663
- filter: function() {
664
- return n;
665
- }
666
- };
667
- },
668
- assignMedium: function(c) {
669
- r = !0;
670
- var s = [];
671
- if (n.length) {
672
- var i = n;
673
- n = [], i.forEach(c), s = n;
674
- }
675
- var v = function() {
676
- var d = s;
677
- s = [], d.forEach(c);
678
- }, l = function() {
679
- return Promise.resolve().then(v);
680
- };
681
- l(), n = {
682
- push: function(d) {
683
- s.push(d), l();
684
- },
685
- filter: function(d) {
686
- return s = s.filter(d), n;
687
- }
688
- };
689
- }
690
- };
691
- return o;
692
- }
693
- function Pt(e) {
694
- e === void 0 && (e = {});
695
- var t = Ct(null);
696
- return t.options = R({ async: !0, ssr: !1 }, e), t;
697
- }
698
- var Ce = function(e) {
699
- var t = e.sideCar, n = we(e, ["sideCar"]);
700
- if (!t)
701
- throw new Error("Sidecar: please provide `sideCar` property to import the right car");
702
- var r = t.read();
703
- if (!r)
704
- throw new Error("Sidecar medium not found");
705
- return a.createElement(r, R({}, n));
706
- };
707
- Ce.isSideCarExport = !0;
708
- function Rt(e, t) {
709
- return e.useMedium(t), Ce;
710
- }
711
- var Pe = Pt(), J = function() {
712
- }, Y = a.forwardRef(function(e, t) {
713
- var n = a.useRef(null), r = a.useState({
714
- onScrollCapture: J,
715
- onWheelCapture: J,
716
- onTouchMoveCapture: J
717
- }), o = r[0], c = r[1], s = e.forwardProps, i = e.children, v = e.className, l = e.removeScrollBar, d = e.enabled, f = e.shards, m = e.sideCar, p = e.noRelative, w = e.noIsolation, u = e.inert, h = e.allowPinchZoom, y = e.as, g = y === void 0 ? "div" : y, b = e.gapMode, S = we(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), C = m, P = St([n, t]), E = R(R({}, S), o);
718
- return a.createElement(
719
- a.Fragment,
720
- null,
721
- d && a.createElement(C, { sideCar: Pe, removeScrollBar: l, shards: f, noRelative: p, noIsolation: w, inert: u, setCallbacks: c, allowPinchZoom: !!h, lockRef: n, gapMode: b }),
722
- s ? a.cloneElement(a.Children.only(i), R(R({}, E), { ref: P })) : a.createElement(g, R({}, E, { className: v, ref: P }), i)
723
- );
724
- });
725
- Y.defaultProps = {
726
- enabled: !0,
727
- removeScrollBar: !0,
728
- inert: !1
729
- };
730
- Y.classNames = {
731
- fullWidth: V,
732
- zeroRight: H
733
- };
734
- var Ot = function() {
735
- if (typeof __webpack_nonce__ < "u")
736
- return __webpack_nonce__;
737
- };
738
- function Nt() {
739
- if (!document)
740
- return null;
741
- var e = document.createElement("style");
742
- e.type = "text/css";
743
- var t = Ot();
744
- return t && e.setAttribute("nonce", t), e;
745
- }
746
- function At(e, t) {
747
- e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
748
- }
749
- function Tt(e) {
750
- var t = document.head || document.getElementsByTagName("head")[0];
751
- t.appendChild(e);
752
- }
753
- var Lt = function() {
754
- var e = 0, t = null;
755
- return {
756
- add: function(n) {
757
- e == 0 && (t = Nt()) && (At(t, n), Tt(t)), e++;
758
- },
759
- remove: function() {
760
- e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
761
- }
762
- };
763
- }, Mt = function() {
764
- var e = Lt();
765
- return function(t, n) {
766
- a.useEffect(function() {
767
- return e.add(t), function() {
768
- e.remove();
769
- };
770
- }, [t && n]);
771
- };
772
- }, Re = function() {
773
- var e = Mt(), t = function(n) {
774
- var r = n.styles, o = n.dynamic;
775
- return e(r, o), null;
776
- };
777
- return t;
778
- }, Dt = {
779
- left: 0,
780
- top: 0,
781
- right: 0,
782
- gap: 0
783
- }, ee = function(e) {
784
- return parseInt(e || "", 10) || 0;
785
- }, It = function(e) {
786
- var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
787
- return [ee(n), ee(r), ee(o)];
788
- }, xt = function(e) {
789
- if (e === void 0 && (e = "margin"), typeof window > "u")
790
- return Dt;
791
- var t = It(e), n = document.documentElement.clientWidth, r = window.innerWidth;
792
- return {
793
- left: t[0],
794
- top: t[1],
795
- right: t[2],
796
- gap: Math.max(0, r - n + t[2] - t[0])
797
- };
798
- }, kt = Re(), I = "data-scroll-locked", Ft = function(e, t, n, r) {
799
- var o = e.left, c = e.top, s = e.right, i = e.gap;
800
- return n === void 0 && (n = "margin"), `
801
- .`.concat(yt, ` {
802
- overflow: hidden `).concat(r, `;
803
- padding-right: `).concat(i, "px ").concat(r, `;
804
- }
805
- body[`).concat(I, `] {
806
- overflow: hidden `).concat(r, `;
807
- overscroll-behavior: contain;
808
- `).concat([
809
- t && "position: relative ".concat(r, ";"),
810
- n === "margin" && `
811
- padding-left: `.concat(o, `px;
812
- padding-top: `).concat(c, `px;
813
- padding-right: `).concat(s, `px;
814
- margin-left:0;
815
- margin-top:0;
816
- margin-right: `).concat(i, "px ").concat(r, `;
817
- `),
818
- n === "padding" && "padding-right: ".concat(i, "px ").concat(r, ";")
819
- ].filter(Boolean).join(""), `
820
- }
821
-
822
- .`).concat(H, ` {
823
- right: `).concat(i, "px ").concat(r, `;
824
- }
825
-
826
- .`).concat(V, ` {
827
- margin-right: `).concat(i, "px ").concat(r, `;
828
- }
829
-
830
- .`).concat(H, " .").concat(H, ` {
831
- right: 0 `).concat(r, `;
832
- }
833
-
834
- .`).concat(V, " .").concat(V, ` {
835
- margin-right: 0 `).concat(r, `;
836
- }
837
-
838
- body[`).concat(I, `] {
839
- `).concat(Et, ": ").concat(i, `px;
840
- }
841
- `);
842
- }, me = function() {
843
- var e = parseInt(document.body.getAttribute(I) || "0", 10);
844
- return isFinite(e) ? e : 0;
845
- }, Wt = function() {
846
- a.useEffect(function() {
847
- return document.body.setAttribute(I, (me() + 1).toString()), function() {
848
- var e = me() - 1;
849
- e <= 0 ? document.body.removeAttribute(I) : document.body.setAttribute(I, e.toString());
850
- };
851
- }, []);
852
- }, _t = function(e) {
853
- var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
854
- Wt();
855
- var c = a.useMemo(function() {
856
- return xt(o);
857
- }, [o]);
858
- return a.createElement(kt, { styles: Ft(c, !t, o, n ? "" : "!important") });
859
- }, re = !1;
860
- if (typeof window < "u")
861
- try {
862
- var B = Object.defineProperty({}, "passive", {
863
- get: function() {
864
- return re = !0, !0;
865
- }
866
- });
867
- window.addEventListener("test", B, B), window.removeEventListener("test", B, B);
868
- } catch {
869
- re = !1;
870
- }
871
- var L = re ? { passive: !1 } : !1, Bt = function(e) {
872
- return e.tagName === "TEXTAREA";
873
- }, Oe = function(e, t) {
874
- if (!(e instanceof Element))
875
- return !1;
876
- var n = window.getComputedStyle(e);
877
- return (
878
- // not-not-scrollable
879
- n[t] !== "hidden" && // contains scroll inside self
880
- !(n.overflowY === n.overflowX && !Bt(e) && n[t] === "visible")
881
- );
882
- }, Ut = function(e) {
883
- return Oe(e, "overflowY");
884
- }, jt = function(e) {
885
- return Oe(e, "overflowX");
886
- }, he = function(e, t) {
887
- var n = t.ownerDocument, r = t;
888
- do {
889
- typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
890
- var o = Ne(e, r);
891
- if (o) {
892
- var c = Ae(e, r), s = c[1], i = c[2];
893
- if (s > i)
894
- return !0;
895
- }
896
- r = r.parentNode;
897
- } while (r && r !== n.body);
898
- return !1;
899
- }, $t = function(e) {
900
- var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
901
- return [
902
- t,
903
- n,
904
- r
905
- ];
906
- }, Ht = function(e) {
907
- var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
908
- return [
909
- t,
910
- n,
911
- r
912
- ];
913
- }, Ne = function(e, t) {
914
- return e === "v" ? Ut(t) : jt(t);
915
- }, Ae = function(e, t) {
916
- return e === "v" ? $t(t) : Ht(t);
917
- }, Vt = function(e, t) {
918
- return e === "h" && t === "rtl" ? -1 : 1;
919
- }, Kt = function(e, t, n, r, o) {
920
- var c = Vt(e, window.getComputedStyle(t).direction), s = c * r, i = n.target, v = t.contains(i), l = !1, d = s > 0, f = 0, m = 0;
921
- do {
922
- if (!i)
923
- break;
924
- var p = Ae(e, i), w = p[0], u = p[1], h = p[2], y = u - h - c * w;
925
- (w || y) && Ne(e, i) && (f += y, m += w);
926
- var g = i.parentNode;
927
- i = g && g.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? g.host : g;
928
- } while (
929
- // portaled content
930
- !v && i !== document.body || // self content
931
- v && (t.contains(i) || t === i)
932
- );
933
- return (d && Math.abs(f) < 1 || !d && Math.abs(m) < 1) && (l = !0), l;
934
- }, U = function(e) {
935
- return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
936
- }, pe = function(e) {
937
- return [e.deltaX, e.deltaY];
938
- }, ye = function(e) {
939
- return e && "current" in e ? e.current : e;
940
- }, Xt = function(e, t) {
941
- return e[0] === t[0] && e[1] === t[1];
942
- }, Yt = function(e) {
943
- return `
944
- .block-interactivity-`.concat(e, ` {pointer-events: none;}
945
- .allow-interactivity-`).concat(e, ` {pointer-events: all;}
946
- `);
947
- }, zt = 0, M = [];
948
- function Gt(e) {
949
- var t = a.useRef([]), n = a.useRef([0, 0]), r = a.useRef(), o = a.useState(zt++)[0], c = a.useState(Re)[0], s = a.useRef(e);
950
- a.useEffect(function() {
951
- s.current = e;
952
- }, [e]), a.useEffect(function() {
953
- if (e.inert) {
954
- document.body.classList.add("block-interactivity-".concat(o));
955
- var u = pt([e.lockRef.current], (e.shards || []).map(ye), !0).filter(Boolean);
956
- return u.forEach(function(h) {
957
- return h.classList.add("allow-interactivity-".concat(o));
958
- }), function() {
959
- document.body.classList.remove("block-interactivity-".concat(o)), u.forEach(function(h) {
960
- return h.classList.remove("allow-interactivity-".concat(o));
961
- });
962
- };
963
- }
964
- }, [e.inert, e.lockRef.current, e.shards]);
965
- var i = a.useCallback(function(u, h) {
966
- if ("touches" in u && u.touches.length === 2 || u.type === "wheel" && u.ctrlKey)
967
- return !s.current.allowPinchZoom;
968
- var y = U(u), g = n.current, b = "deltaX" in u ? u.deltaX : g[0] - y[0], S = "deltaY" in u ? u.deltaY : g[1] - y[1], C, P = u.target, E = Math.abs(b) > Math.abs(S) ? "h" : "v";
969
- if ("touches" in u && E === "h" && P.type === "range")
970
- return !1;
971
- var A = window.getSelection(), T = A && A.anchorNode, x = T ? T === P || T.contains(P) : !1;
972
- if (x)
973
- return !1;
974
- var W = he(E, P);
975
- if (!W)
976
- return !0;
977
- if (W ? C = E : (C = E === "v" ? "h" : "v", W = he(E, P)), !W)
978
- return !1;
979
- if (!r.current && "changedTouches" in u && (b || S) && (r.current = C), !C)
980
- return !0;
981
- var oe = r.current || C;
982
- return Kt(oe, h, u, oe === "h" ? b : S);
983
- }, []), v = a.useCallback(function(u) {
984
- var h = u;
985
- if (!(!M.length || M[M.length - 1] !== c)) {
986
- var y = "deltaY" in h ? pe(h) : U(h), g = t.current.filter(function(C) {
987
- return C.name === h.type && (C.target === h.target || h.target === C.shadowParent) && Xt(C.delta, y);
988
- })[0];
989
- if (g && g.should) {
990
- h.cancelable && h.preventDefault();
991
- return;
992
- }
993
- if (!g) {
994
- var b = (s.current.shards || []).map(ye).filter(Boolean).filter(function(C) {
995
- return C.contains(h.target);
996
- }), S = b.length > 0 ? i(h, b[0]) : !s.current.noIsolation;
997
- S && h.cancelable && h.preventDefault();
998
- }
999
- }
1000
- }, []), l = a.useCallback(function(u, h, y, g) {
1001
- var b = { name: u, delta: h, target: y, should: g, shadowParent: Zt(y) };
1002
- t.current.push(b), setTimeout(function() {
1003
- t.current = t.current.filter(function(S) {
1004
- return S !== b;
1005
- });
1006
- }, 1);
1007
- }, []), d = a.useCallback(function(u) {
1008
- n.current = U(u), r.current = void 0;
1009
- }, []), f = a.useCallback(function(u) {
1010
- l(u.type, pe(u), u.target, i(u, e.lockRef.current));
1011
- }, []), m = a.useCallback(function(u) {
1012
- l(u.type, U(u), u.target, i(u, e.lockRef.current));
1013
- }, []);
1014
- a.useEffect(function() {
1015
- return M.push(c), e.setCallbacks({
1016
- onScrollCapture: f,
1017
- onWheelCapture: f,
1018
- onTouchMoveCapture: m
1019
- }), document.addEventListener("wheel", v, L), document.addEventListener("touchmove", v, L), document.addEventListener("touchstart", d, L), function() {
1020
- M = M.filter(function(u) {
1021
- return u !== c;
1022
- }), document.removeEventListener("wheel", v, L), document.removeEventListener("touchmove", v, L), document.removeEventListener("touchstart", d, L);
1023
- };
1024
- }, []);
1025
- var p = e.removeScrollBar, w = e.inert;
1026
- return a.createElement(
1027
- a.Fragment,
1028
- null,
1029
- w ? a.createElement(c, { styles: Yt(o) }) : null,
1030
- p ? a.createElement(_t, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
1031
- );
1032
- }
1033
- function Zt(e) {
1034
- for (var t = null; e !== null; )
1035
- e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
1036
- return t;
1037
- }
1038
- const qt = Rt(Pe, Gt);
1039
- var Qt = a.forwardRef(function(e, t) {
1040
- return a.createElement(Y, R({}, e, { ref: t, sideCar: qt }));
1041
- });
1042
- Qt.classNames = Y.classNames;
1043
- var Jt = function(e) {
1044
- if (typeof document > "u")
1045
- return null;
1046
- var t = Array.isArray(e) ? e[0] : e;
1047
- return t.ownerDocument.body;
1048
- }, D = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), $ = {}, te = 0, Te = function(e) {
1049
- return e && (e.host || Te(e.parentNode));
1050
- }, en = function(e, t) {
1051
- return t.map(function(n) {
1052
- if (e.contains(n))
1053
- return n;
1054
- var r = Te(n);
1055
- return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
1056
- }).filter(function(n) {
1057
- return !!n;
1058
- });
1059
- }, tn = function(e, t, n, r) {
1060
- var o = en(t, Array.isArray(e) ? e : [e]);
1061
- $[n] || ($[n] = /* @__PURE__ */ new WeakMap());
1062
- var c = $[n], s = [], i = /* @__PURE__ */ new Set(), v = new Set(o), l = function(f) {
1063
- !f || i.has(f) || (i.add(f), l(f.parentNode));
1064
- };
1065
- o.forEach(l);
1066
- var d = function(f) {
1067
- !f || v.has(f) || Array.prototype.forEach.call(f.children, function(m) {
1068
- if (i.has(m))
1069
- d(m);
1070
- else
1071
- try {
1072
- var p = m.getAttribute(r), w = p !== null && p !== "false", u = (D.get(m) || 0) + 1, h = (c.get(m) || 0) + 1;
1073
- D.set(m, u), c.set(m, h), s.push(m), u === 1 && w && j.set(m, !0), h === 1 && m.setAttribute(n, "true"), w || m.setAttribute(r, "true");
1074
- } catch (y) {
1075
- console.error("aria-hidden: cannot operate on ", m, y);
1076
- }
1077
- });
1078
- };
1079
- return d(t), i.clear(), te++, function() {
1080
- s.forEach(function(f) {
1081
- var m = D.get(f) - 1, p = c.get(f) - 1;
1082
- D.set(f, m), c.set(f, p), m || (j.has(f) || f.removeAttribute(r), j.delete(f)), p || f.removeAttribute(n);
1083
- }), te--, te || (D = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), $ = {});
1084
- };
1085
- }, fn = function(e, t, n) {
1086
- n === void 0 && (n = "data-aria-hidden");
1087
- var r = Array.from(Array.isArray(e) ? e : [e]), o = Jt(e);
1088
- return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), tn(r, o, n, "aria-hidden")) : function() {
1089
- return null;
1090
- };
1091
- };
1092
- export {
1093
- tt as D,
1094
- ct as F,
1095
- X as P,
1096
- Qt as R,
1097
- Ie as a,
1098
- un as b,
1099
- cn as c,
1100
- z as d,
1101
- sn as e,
1102
- F as f,
1103
- Xe as g,
1104
- k as h,
1105
- ht as i,
1106
- fn as j,
1107
- ln as k,
1108
- an as l,
1109
- K as u
1110
- };