mimir-ui-kit 1.35.0 → 1.35.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,34 +1,35 @@
1
- import { jsx as Q, jsxs as Xe, Fragment as ut } from "react/jsx-runtime";
2
- import { c as de } from "../../index-DIxK0V-G.js";
1
+ import { jsx as Q, jsxs as Fe, Fragment as $t } from "react/jsx-runtime";
2
+ import { c as fe } from "../../index-DIxK0V-G.js";
3
3
  import * as E from "react";
4
- import j, { useReducer as ln, useMemo as q, useSyncExternalStore as Wn, useId as Ue, useEffect as oe, useCallback as He, useRef as Y, useLayoutEffect as an, createContext as ve, useContext as ae, useState as ue, Fragment as rt, createRef as Bn, forwardRef as jn } from "react";
5
- import { ESelectSearchSize as Le } from "./constants.js";
4
+ import j, { useReducer as ln, useMemo as K, useSyncExternalStore as Wn, useId as Ye, useEffect as oe, useCallback as Ve, useRef as Y, useLayoutEffect as an, createContext as ve, useContext as ce, useState as ae, Fragment as rt, createRef as Bn, forwardRef as jn } from "react";
5
+ import { ESelectSearchSize as we } from "./constants.js";
6
6
  import { Icon as Lt } from "../../icons/Icon.js";
7
- import { I as Ft } from "../../Input-DGr0q5AJ.js";
8
- import { EInputVariant as Un, EInputSize as ft } from "../Input/constants.js";
9
- import { n as U, u as St, d as Me, s as Ae, o as A, p as cn, t as Yn, e as ze, W as be, y as Oe, T as Kn, H as xe, M as Nt, a as Te, $ as un, b as fn, D as Ot, c as X } from "../../keyboard-B0lm_zyn.js";
10
- import * as Ve from "react-dom";
11
- import { flushSync as ye, createPortal as qn } from "react-dom";
12
- import { w as Gn } from "../../use-active-press-86hajhdd.js";
13
- import { u as Jn } from "../../use-by-comparator-CVuf9KBq.js";
14
- import { K as Xn, a as Qn, b as Zn, T as eo, z as to, j as no, u as oo, I as Ct, G as io } from "../../label-y3ANLTNC.js";
15
- import { A as ro, h as so, f as lo, _ as ao } from "../../focus-management-XwV-9qkO.js";
16
- import { T as co } from "../../use-resolve-button-type-BAxjHhds.js";
17
- import { c as uo, i as et, u as fo, V as po, A as mo } from "../../open-closed-Cy6VDfYc.js";
18
- import { r as ho } from "../../bugs-diTMAGNw.js";
19
- import '../../assets/SelectSearch.css';function Fe(e, n, t) {
7
+ import { Button as Un } from "../Button/Button.js";
8
+ import { I as Ft } from "../../Input-B-gKQ9FT.js";
9
+ import { EInputVariant as Yn, EInputSize as ut } from "../Input/constants.js";
10
+ import { n as U, u as Rt, d as _e, s as Pe, o as _, p as cn, t as qn, e as ze, W as be, y as Ce, T as Kn, H as xe, M as Nt, a as Ie, $ as un, b as dn, D as St, c as X } from "../../keyboard-B0lm_zyn.js";
11
+ import * as We from "react-dom";
12
+ import { flushSync as Ee, createPortal as Gn } from "react-dom";
13
+ import { w as Jn } from "../../use-active-press-86hajhdd.js";
14
+ import { u as Xn } from "../../use-by-comparator-CVuf9KBq.js";
15
+ import { K as Qn, a as Zn, b as eo, T as to, z as no, j as oo, u as io, I as Ot, G as ro } from "../../label-y3ANLTNC.js";
16
+ import { A as so, h as lo, f as ao, _ as co } from "../../focus-management-XwV-9qkO.js";
17
+ import { T as uo } from "../../use-resolve-button-type-BAxjHhds.js";
18
+ import { c as fo, i as et, u as po, V as mo, A as ho } from "../../open-closed-Cy6VDfYc.js";
19
+ import { r as go } from "../../bugs-diTMAGNw.js";
20
+ import '../../assets/SelectSearch.css';function Ne(e, n, t) {
20
21
  let o = t.initialDeps ?? [], i;
21
22
  return () => {
22
23
  var r, l, s, a;
23
- let f;
24
- t.key && ((r = t.debug) != null && r.call(t)) && (f = Date.now());
24
+ let d;
25
+ t.key && ((r = t.debug) != null && r.call(t)) && (d = Date.now());
25
26
  const u = e();
26
27
  if (!(u.length !== o.length || u.some((c, m) => o[m] !== c)))
27
28
  return i;
28
29
  o = u;
29
30
  let g;
30
31
  if (t.key && ((l = t.debug) != null && l.call(t)) && (g = Date.now()), i = n(...u), t.key && ((s = t.debug) != null && s.call(t))) {
31
- const c = Math.round((Date.now() - f) * 100) / 100, m = Math.round((Date.now() - g) * 100) / 100, p = m / 16, h = (v, w) => {
32
+ const c = Math.round((Date.now() - d) * 100) / 100, m = Math.round((Date.now() - g) * 100) / 100, p = m / 16, h = (v, w) => {
32
33
  for (v = String(v); v.length < w; )
33
34
  v = " " + v;
34
35
  return v;
@@ -53,17 +54,17 @@ function dt(e, n) {
53
54
  throw new Error("Unexpected undefined");
54
55
  return e;
55
56
  }
56
- const go = (e, n) => Math.abs(e - n) < 1, vo = (e, n, t) => {
57
+ const vo = (e, n) => Math.abs(e - n) < 1, bo = (e, n, t) => {
57
58
  let o;
58
59
  return function(...i) {
59
60
  e.clearTimeout(o), o = e.setTimeout(() => n.apply(this, i), t);
60
61
  };
61
- }, bo = (e) => e, xo = (e) => {
62
+ }, xo = (e) => e, wo = (e) => {
62
63
  const n = Math.max(e.startIndex - e.overscan, 0), t = Math.min(e.endIndex + e.overscan, e.count - 1), o = [];
63
64
  for (let i = n; i <= t; i++)
64
65
  o.push(i);
65
66
  return o;
66
- }, wo = (e, n) => {
67
+ }, yo = (e, n) => {
67
68
  const t = e.scrollElement;
68
69
  if (!t)
69
70
  return;
@@ -91,9 +92,9 @@ const go = (e, n) => Math.abs(e - n) < 1, vo = (e, n, t) => {
91
92
  return r.observe(t, { box: "border-box" }), () => {
92
93
  r.unobserve(t);
93
94
  };
94
- }, zt = {
95
+ }, kt = {
95
96
  passive: !0
96
- }, yo = typeof window > "u" ? !0 : "onscrollend" in window, Eo = (e, n) => {
97
+ }, Eo = typeof window > "u" ? !0 : "onscrollend" in window, Ro = (e, n) => {
97
98
  const t = e.scrollElement;
98
99
  if (!t)
99
100
  return;
@@ -101,20 +102,20 @@ const go = (e, n) => Math.abs(e - n) < 1, vo = (e, n, t) => {
101
102
  if (!o)
102
103
  return;
103
104
  let i = 0;
104
- const r = yo ? () => {
105
- } : vo(
105
+ const r = Eo ? () => {
106
+ } : bo(
106
107
  o,
107
108
  () => {
108
109
  n(i, !1);
109
110
  },
110
111
  e.options.isScrollingResetDelay
111
- ), l = (f) => () => {
112
- i = t[e.options.horizontal ? "scrollLeft" : "scrollTop"], r(), n(i, f);
112
+ ), l = (d) => () => {
113
+ i = t[e.options.horizontal ? "scrollLeft" : "scrollTop"], r(), n(i, d);
113
114
  }, s = l(!0), a = l(!1);
114
- return a(), t.addEventListener("scroll", s, zt), t.addEventListener("scrollend", a, zt), () => {
115
+ return a(), t.addEventListener("scroll", s, kt), t.addEventListener("scrollend", a, kt), () => {
115
116
  t.removeEventListener("scroll", s), t.removeEventListener("scrollend", a);
116
117
  };
117
- }, Ro = (e, n, t) => {
118
+ }, So = (e, n, t) => {
118
119
  if (n != null && n.borderBoxSize) {
119
120
  const o = n.borderBoxSize[0];
120
121
  if (o)
@@ -125,7 +126,7 @@ const go = (e, n) => Math.abs(e - n) < 1, vo = (e, n, t) => {
125
126
  return Math.round(
126
127
  e.getBoundingClientRect()[t.options.horizontal ? "width" : "height"]
127
128
  );
128
- }, So = (e, {
129
+ }, Oo = (e, {
129
130
  adjustments: n = 0,
130
131
  behavior: t
131
132
  }, o) => {
@@ -136,7 +137,7 @@ const go = (e, n) => Math.abs(e - n) < 1, vo = (e, n, t) => {
136
137
  behavior: t
137
138
  });
138
139
  };
139
- class Oo {
140
+ class Co {
140
141
  constructor(n) {
141
142
  this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.scrollToIndexTimeoutId = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
142
143
  let t = null;
@@ -171,11 +172,11 @@ class Oo {
171
172
  scrollPaddingStart: 0,
172
173
  scrollPaddingEnd: 0,
173
174
  horizontal: !1,
174
- getItemKey: bo,
175
- rangeExtractor: xo,
175
+ getItemKey: xo,
176
+ rangeExtractor: wo,
176
177
  onChange: () => {
177
178
  },
178
- measureElement: Ro,
179
+ measureElement: So,
179
180
  initialRect: { width: 0, height: 0 },
180
181
  scrollMargin: 0,
181
182
  gap: 0,
@@ -233,7 +234,7 @@ class Oo {
233
234
  break;
234
235
  }
235
236
  return r.size === this.options.lanes ? Array.from(r.values()).sort((l, s) => l.end === s.end ? l.index - s.index : l.end - s.end)[0] : void 0;
236
- }, this.getMeasurementOptions = Fe(
237
+ }, this.getMeasurementOptions = Ne(
237
238
  () => [
238
239
  this.options.count,
239
240
  this.options.paddingStart,
@@ -251,34 +252,34 @@ class Oo {
251
252
  {
252
253
  key: !1
253
254
  }
254
- ), this.getMeasurements = Fe(
255
+ ), this.getMeasurements = Ne(
255
256
  () => [this.getMeasurementOptions(), this.itemSizeCache],
256
257
  ({ count: t, paddingStart: o, scrollMargin: i, getItemKey: r, enabled: l }, s) => {
257
258
  var a;
258
259
  if (!l)
259
260
  return this.measurementsCache = [], this.itemSizeCache.clear(), [];
260
- this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((d) => {
261
- this.itemSizeCache.set(d.key, d.size);
261
+ this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((f) => {
262
+ this.itemSizeCache.set(f.key, f.size);
262
263
  }));
263
- const f = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
264
+ const d = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
264
265
  this.pendingMeasuredCacheIndexes = [];
265
- const u = this.measurementsCache.slice(0, f);
266
- for (let d = f; d < t; d++) {
267
- let g = (a = this.measurementsCache[d]) == null ? void 0 : a.measureElement;
266
+ const u = this.measurementsCache.slice(0, d);
267
+ for (let f = d; f < t; f++) {
268
+ let g = (a = this.measurementsCache[f]) == null ? void 0 : a.measureElement;
268
269
  g || (g = (x) => {
269
- const y = r(d), S = this.elementsCache.get(y);
270
+ const y = r(f), O = this.elementsCache.get(y);
270
271
  if (!x) {
271
- S && (this.observer.unobserve(S), this.elementsCache.delete(y));
272
+ O && (this.observer.unobserve(O), this.elementsCache.delete(y));
272
273
  return;
273
274
  }
274
- S !== x && (S && this.observer.unobserve(S), this.observer.observe(x), this.elementsCache.set(y, x)), x.isConnected && this.resizeItem(
275
- d,
275
+ O !== x && (O && this.observer.unobserve(O), this.observer.observe(x), this.elementsCache.set(y, x)), x.isConnected && this.resizeItem(
276
+ f,
276
277
  this.options.measureElement(x, void 0, this)
277
278
  );
278
279
  });
279
- const c = r(d), m = this.options.lanes === 1 ? u[d - 1] : this.getFurthestMeasurement(u, d), p = m ? m.end + this.options.gap : o + i, h = s.get(c), v = typeof h == "number" ? h : this.options.estimateSize(d), w = p + v, b = m ? m.lane : d % this.options.lanes;
280
- u[d] = {
281
- index: d,
280
+ const c = r(f), m = this.options.lanes === 1 ? u[f - 1] : this.getFurthestMeasurement(u, f), p = m ? m.end + this.options.gap : o + i, h = s.get(c), v = typeof h == "number" ? h : this.options.estimateSize(f), w = p + v, b = m ? m.lane : f % this.options.lanes;
281
+ u[f] = {
282
+ index: f,
282
283
  start: p,
283
284
  size: v,
284
285
  end: w,
@@ -293,9 +294,9 @@ class Oo {
293
294
  key: process.env.NODE_ENV !== "production" && "getMeasurements",
294
295
  debug: () => this.options.debug
295
296
  }
296
- ), this.calculateRange = Fe(
297
+ ), this.calculateRange = Ne(
297
298
  () => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],
298
- (t, o, i) => this.range = t.length > 0 && o > 0 ? Co({
299
+ (t, o, i) => this.range = t.length > 0 && o > 0 ? To({
299
300
  measurements: t,
300
301
  outerSize: o,
301
302
  scrollOffset: i
@@ -304,7 +305,7 @@ class Oo {
304
305
  key: process.env.NODE_ENV !== "production" && "calculateRange",
305
306
  debug: () => this.options.debug
306
307
  }
307
- ), this.getIndexes = Fe(
308
+ ), this.getIndexes = Ne(
308
309
  () => [
309
310
  this.options.rangeExtractor,
310
311
  this.calculateRange(),
@@ -347,7 +348,7 @@ class Oo {
347
348
  })), this.pendingMeasuredCacheIndexes.push(i.index), this.itemSizeCache = new Map(this.itemSizeCache.set(i.key, o)), this.notify(!0, !1));
348
349
  }, this.measureElement = (t) => {
349
350
  t && this._measureElement(t, void 0);
350
- }, this.getVirtualItems = Fe(
351
+ }, this.getVirtualItems = Ne(
351
352
  () => [this.getIndexes(), this.getMeasurements()],
352
353
  (t, o) => {
353
354
  const i = [];
@@ -365,7 +366,7 @@ class Oo {
365
366
  const o = this.getMeasurements();
366
367
  if (o.length !== 0)
367
368
  return dt(
368
- o[dn(
369
+ o[fn(
369
370
  0,
370
371
  o.length - 1,
371
372
  (i) => dt(o[i]).start,
@@ -412,10 +413,10 @@ class Oo {
412
413
  if (this.scrollToIndexTimeoutId = null, this.elementsCache.has(
413
414
  this.options.getItemKey(t)
414
415
  )) {
415
- const [f] = dt(
416
+ const [d] = dt(
416
417
  this.getOffsetForIndex(t, s)
417
418
  );
418
- go(f, this.getScrollOffset()) || this.scrollToIndex(t, { align: s, behavior: i });
419
+ vo(d, this.getScrollOffset()) || this.scrollToIndex(t, { align: s, behavior: i });
419
420
  } else
420
421
  this.scrollToIndex(t, { align: s, behavior: i });
421
422
  }));
@@ -444,7 +445,7 @@ class Oo {
444
445
  }, this.setOptions(n);
445
446
  }
446
447
  }
447
- const dn = (e, n, t, o) => {
448
+ const fn = (e, n, t, o) => {
448
449
  for (; e <= n; ) {
449
450
  const i = (e + n) / 2 | 0, r = t(i);
450
451
  if (r < o)
@@ -456,45 +457,45 @@ const dn = (e, n, t, o) => {
456
457
  }
457
458
  return e > 0 ? e - 1 : 0;
458
459
  };
459
- function Co({
460
+ function To({
460
461
  measurements: e,
461
462
  outerSize: n,
462
463
  scrollOffset: t
463
464
  }) {
464
- const o = e.length - 1, r = dn(0, o, (s) => e[s].start, t);
465
+ const o = e.length - 1, r = fn(0, o, (s) => e[s].start, t);
465
466
  let l = r;
466
467
  for (; l < o && e[l].end < t + n; )
467
468
  l++;
468
469
  return { startIndex: r, endIndex: l };
469
470
  }
470
- const To = typeof document < "u" ? E.useLayoutEffect : E.useEffect;
471
- function Io(e) {
471
+ const Io = typeof document < "u" ? E.useLayoutEffect : E.useEffect;
472
+ function Mo(e) {
472
473
  const n = E.useReducer(() => ({}), {})[1], t = {
473
474
  ...e,
474
475
  onChange: (i, r) => {
475
476
  var l;
476
- r ? ye(n) : n(), (l = e.onChange) == null || l.call(e, i, r);
477
+ r ? Ee(n) : n(), (l = e.onChange) == null || l.call(e, i, r);
477
478
  }
478
479
  }, [o] = E.useState(
479
- () => new Oo(t)
480
+ () => new Co(t)
480
481
  );
481
- return o.setOptions(t), E.useEffect(() => o._didMount(), []), To(() => o._willUpdate()), o;
482
+ return o.setOptions(t), E.useEffect(() => o._didMount(), []), Io(() => o._willUpdate()), o;
482
483
  }
483
- function Mo(e) {
484
- return Io({
485
- observeElementRect: wo,
486
- observeElementOffset: Eo,
487
- scrollToFn: So,
484
+ function _o(e) {
485
+ return Mo({
486
+ observeElementRect: yo,
487
+ observeElementOffset: Ro,
488
+ scrollToFn: Oo,
488
489
  ...e
489
490
  });
490
491
  }
491
- function Po(e) {
492
+ function Ao(e) {
492
493
  if (e === null) return { width: 0, height: 0 };
493
494
  let { width: n, height: t } = e.getBoundingClientRect();
494
495
  return { width: n, height: t };
495
496
  }
496
- function kt(e, n = !1) {
497
- let t = e === null ? null : "current" in e ? e.current : e, [o, i] = ln(() => ({}), {}), r = q(() => Po(t), [t, o]);
497
+ function zt(e, n = !1) {
498
+ let t = e === null ? null : "current" in e ? e.current : e, [o, i] = ln(() => ({}), {}), r = K(() => Ao(t), [t, o]);
498
499
  return U(() => {
499
500
  if (!t) return;
500
501
  let l = new ResizeObserver(i);
@@ -503,7 +504,7 @@ function kt(e, n = !1) {
503
504
  };
504
505
  }, [t]), n ? { width: `${r.width}px`, height: `${r.height}px` } : r;
505
506
  }
506
- let Ao = class extends Map {
507
+ let Po = class extends Map {
507
508
  constructor(n) {
508
509
  super(), this.factory = n;
509
510
  }
@@ -526,7 +527,7 @@ function pn(e, n) {
526
527
  function mn(e) {
527
528
  return Wn(e.subscribe, e.getSnapshot, e.getSnapshot);
528
529
  }
529
- let _o = new Ao(() => pn(() => [], { ADD(e) {
530
+ let Do = new Po(() => pn(() => [], { ADD(e) {
530
531
  return this.includes(e) ? this : [...this, e];
531
532
  }, REMOVE(e) {
532
533
  let n = this.indexOf(e);
@@ -534,50 +535,50 @@ let _o = new Ao(() => pn(() => [], { ADD(e) {
534
535
  let t = this.slice();
535
536
  return t.splice(n, 1), t;
536
537
  } }));
537
- function Tt(e, n) {
538
- let t = _o.get(n), o = Ue(), i = mn(t);
538
+ function Ct(e, n) {
539
+ let t = Do.get(n), o = Ye(), i = mn(t);
539
540
  if (U(() => {
540
541
  if (e) return t.dispatch("ADD", o), () => t.dispatch("REMOVE", o);
541
542
  }, [t, e]), !e) return !1;
542
543
  let r = i.indexOf(o), l = i.length;
543
544
  return r === -1 && (r = l, l += 1), r === l - 1;
544
545
  }
545
- let bt = /* @__PURE__ */ new Map(), ke = /* @__PURE__ */ new Map();
546
+ let vt = /* @__PURE__ */ new Map(), He = /* @__PURE__ */ new Map();
546
547
  function Ht(e) {
547
548
  var n;
548
- let t = (n = ke.get(e)) != null ? n : 0;
549
- return ke.set(e, t + 1), t !== 0 ? () => Vt(e) : (bt.set(e, { "aria-hidden": e.getAttribute("aria-hidden"), inert: e.inert }), e.setAttribute("aria-hidden", "true"), e.inert = !0, () => Vt(e));
549
+ let t = (n = He.get(e)) != null ? n : 0;
550
+ return He.set(e, t + 1), t !== 0 ? () => Vt(e) : (vt.set(e, { "aria-hidden": e.getAttribute("aria-hidden"), inert: e.inert }), e.setAttribute("aria-hidden", "true"), e.inert = !0, () => Vt(e));
550
551
  }
551
552
  function Vt(e) {
552
553
  var n;
553
- let t = (n = ke.get(e)) != null ? n : 1;
554
- if (t === 1 ? ke.delete(e) : ke.set(e, t - 1), t !== 1) return;
555
- let o = bt.get(e);
556
- o && (o["aria-hidden"] === null ? e.removeAttribute("aria-hidden") : e.setAttribute("aria-hidden", o["aria-hidden"]), e.inert = o.inert, bt.delete(e));
554
+ let t = (n = He.get(e)) != null ? n : 1;
555
+ if (t === 1 ? He.delete(e) : He.set(e, t - 1), t !== 1) return;
556
+ let o = vt.get(e);
557
+ o && (o["aria-hidden"] === null ? e.removeAttribute("aria-hidden") : e.setAttribute("aria-hidden", o["aria-hidden"]), e.inert = o.inert, vt.delete(e));
557
558
  }
558
- function Do(e, { allowed: n, disallowed: t } = {}) {
559
- let o = Tt(e, "inert-others");
559
+ function $o(e, { allowed: n, disallowed: t } = {}) {
560
+ let o = Ct(e, "inert-others");
560
561
  U(() => {
561
562
  var i, r;
562
563
  if (!o) return;
563
- let l = Me();
564
+ let l = _e();
564
565
  for (let a of (i = t == null ? void 0 : t()) != null ? i : []) a && l.add(Ht(a));
565
566
  let s = (r = n == null ? void 0 : n()) != null ? r : [];
566
567
  for (let a of s) {
567
568
  if (!a) continue;
568
- let f = St(a);
569
- if (!f) continue;
569
+ let d = Rt(a);
570
+ if (!d) continue;
570
571
  let u = a.parentElement;
571
- for (; u && u !== f.body; ) {
572
- for (let d of u.children) s.some((g) => d.contains(g)) || l.add(Ht(d));
572
+ for (; u && u !== d.body; ) {
573
+ for (let f of u.children) s.some((g) => f.contains(g)) || l.add(Ht(f));
573
574
  u = u.parentElement;
574
575
  }
575
576
  }
576
577
  return l.dispose;
577
578
  }, [o, n, t]);
578
579
  }
579
- function $o(e, n, t) {
580
- let o = Ae((i) => {
580
+ function Lo(e, n, t) {
581
+ let o = Pe((i) => {
581
582
  let r = i.getBoundingClientRect();
582
583
  r.x === 0 && r.y === 0 && r.width === 0 && r.height === 0 && t();
583
584
  });
@@ -585,7 +586,7 @@ function $o(e, n, t) {
585
586
  if (!e) return;
586
587
  let i = n === null ? null : n instanceof HTMLElement ? n : n.current;
587
588
  if (!i) return;
588
- let r = Me();
589
+ let r = _e();
589
590
  if (typeof ResizeObserver < "u") {
590
591
  let l = new ResizeObserver(() => o.current(i));
591
592
  l.observe(i), r.add(() => l.disconnect());
@@ -600,14 +601,14 @@ function $o(e, n, t) {
600
601
  function hn() {
601
602
  return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
602
603
  }
603
- function Lo() {
604
+ function Fo() {
604
605
  return /Android/gi.test(window.navigator.userAgent);
605
606
  }
606
607
  function gn() {
607
- return hn() || Lo();
608
+ return hn() || Fo();
608
609
  }
609
- function Ne(e, n, t, o) {
610
- let i = Ae(t);
610
+ function ke(e, n, t, o) {
611
+ let i = Pe(t);
611
612
  oe(() => {
612
613
  if (!e) return;
613
614
  function r(l) {
@@ -616,8 +617,8 @@ function Ne(e, n, t, o) {
616
617
  return document.addEventListener(n, r, o), () => document.removeEventListener(n, r, o);
617
618
  }, [e, n, o]);
618
619
  }
619
- function Fo(e, n, t, o) {
620
- let i = Ae(t);
620
+ function No(e, n, t, o) {
621
+ let i = Pe(t);
621
622
  oe(() => {
622
623
  if (!e) return;
623
624
  function r(l) {
@@ -627,43 +628,43 @@ function Fo(e, n, t, o) {
627
628
  }, [e, n, o]);
628
629
  }
629
630
  const Wt = 30;
630
- function No(e, n, t) {
631
- let o = Tt(e, "outside-click"), i = Ae(t), r = He(function(a, f) {
631
+ function ko(e, n, t) {
632
+ let o = Ct(e, "outside-click"), i = Pe(t), r = Ve(function(a, d) {
632
633
  if (a.defaultPrevented) return;
633
- let u = f(a);
634
+ let u = d(a);
634
635
  if (u === null || !u.getRootNode().contains(u) || !u.isConnected) return;
635
- let d = function g(c) {
636
+ let f = function g(c) {
636
637
  return typeof c == "function" ? g(c()) : Array.isArray(c) || c instanceof Set ? c : [c];
637
638
  }(n);
638
- for (let g of d) {
639
+ for (let g of f) {
639
640
  if (g === null) continue;
640
641
  let c = g instanceof HTMLElement ? g : g.current;
641
642
  if (c != null && c.contains(u) || a.composed && a.composedPath().includes(c)) return;
642
643
  }
643
- return !ro(u, so.Loose) && u.tabIndex !== -1 && a.preventDefault(), i.current(a, u);
644
+ return !so(u, lo.Loose) && u.tabIndex !== -1 && a.preventDefault(), i.current(a, u);
644
645
  }, [i]), l = Y(null);
645
- Ne(o, "pointerdown", (a) => {
646
- var f, u;
647
- l.current = ((u = (f = a.composedPath) == null ? void 0 : f.call(a)) == null ? void 0 : u[0]) || a.target;
648
- }, !0), Ne(o, "mousedown", (a) => {
649
- var f, u;
650
- l.current = ((u = (f = a.composedPath) == null ? void 0 : f.call(a)) == null ? void 0 : u[0]) || a.target;
651
- }, !0), Ne(o, "click", (a) => {
646
+ ke(o, "pointerdown", (a) => {
647
+ var d, u;
648
+ l.current = ((u = (d = a.composedPath) == null ? void 0 : d.call(a)) == null ? void 0 : u[0]) || a.target;
649
+ }, !0), ke(o, "mousedown", (a) => {
650
+ var d, u;
651
+ l.current = ((u = (d = a.composedPath) == null ? void 0 : d.call(a)) == null ? void 0 : u[0]) || a.target;
652
+ }, !0), ke(o, "click", (a) => {
652
653
  gn() || l.current && (r(a, () => l.current), l.current = null);
653
654
  }, !0);
654
655
  let s = Y({ x: 0, y: 0 });
655
- Ne(o, "touchstart", (a) => {
656
+ ke(o, "touchstart", (a) => {
656
657
  s.current.x = a.touches[0].clientX, s.current.y = a.touches[0].clientY;
657
- }, !0), Ne(o, "touchend", (a) => {
658
- let f = { x: a.changedTouches[0].clientX, y: a.changedTouches[0].clientY };
659
- if (!(Math.abs(f.x - s.current.x) >= Wt || Math.abs(f.y - s.current.y) >= Wt)) return r(a, () => a.target instanceof HTMLElement ? a.target : null);
660
- }, !0), Fo(o, "blur", (a) => r(a, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
658
+ }, !0), ke(o, "touchend", (a) => {
659
+ let d = { x: a.changedTouches[0].clientX, y: a.changedTouches[0].clientY };
660
+ if (!(Math.abs(d.x - s.current.x) >= Wt || Math.abs(d.y - s.current.y) >= Wt)) return r(a, () => a.target instanceof HTMLElement ? a.target : null);
661
+ }, !0), No(o, "blur", (a) => r(a, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
661
662
  }
662
663
  function st(...e) {
663
- return q(() => St(...e), [...e]);
664
+ return K(() => Rt(...e), [...e]);
664
665
  }
665
666
  function zo(e, n, t, o) {
666
- let i = Ae(t);
667
+ let i = Pe(t);
667
668
  oe(() => {
668
669
  e = e ?? window;
669
670
  function r(l) {
@@ -677,7 +678,7 @@ function vn(e) {
677
678
  return zo(e.current, "blur", (t) => {
678
679
  let o = t.target;
679
680
  o instanceof HTMLInputElement && (n.current = { value: o.value, selectionStart: o.selectionStart, selectionEnd: o.selectionEnd });
680
- }), A(() => {
681
+ }), _(() => {
681
682
  let t = e.current;
682
683
  if (document.activeElement !== t && t instanceof HTMLInputElement && t.isConnected) {
683
684
  if (t.focus({ preventScroll: !0 }), t.value !== n.current.value) t.setSelectionRange(t.value.length, t.value.length);
@@ -689,7 +690,7 @@ function vn(e) {
689
690
  }
690
691
  });
691
692
  }
692
- function ko() {
693
+ function Ho() {
693
694
  let e;
694
695
  return { before({ doc: n }) {
695
696
  var t;
@@ -700,7 +701,7 @@ function ko() {
700
701
  t.style(o, "paddingRight", `${r}px`);
701
702
  } };
702
703
  }
703
- function Ho() {
704
+ function Vo() {
704
705
  return hn() ? { before({ doc: e, d: n, meta: t }) {
705
706
  function o(i) {
706
707
  return t.containers.flatMap((r) => r()).some((r) => r.contains(i));
@@ -708,7 +709,7 @@ function Ho() {
708
709
  n.microTask(() => {
709
710
  var i;
710
711
  if (window.getComputedStyle(e.documentElement).scrollBehavior !== "auto") {
711
- let s = Me();
712
+ let s = _e();
712
713
  s.style(e.documentElement, "scrollBehavior", "auto"), n.add(() => n.microTask(() => s.dispose()));
713
714
  }
714
715
  let r = (i = window.scrollY) != null ? i : window.pageYOffset, l = null;
@@ -716,7 +717,7 @@ function Ho() {
716
717
  if (s.target instanceof HTMLElement) try {
717
718
  let a = s.target.closest("a");
718
719
  if (!a) return;
719
- let { hash: f } = new URL(a.href), u = e.querySelector(f);
720
+ let { hash: d } = new URL(a.href), u = e.querySelector(d);
720
721
  u && !o(u) && (l = u);
721
722
  } catch {
722
723
  }
@@ -743,48 +744,48 @@ function Ho() {
743
744
  });
744
745
  } } : {};
745
746
  }
746
- function Vo() {
747
+ function Wo() {
747
748
  return { before({ doc: e, d: n }) {
748
749
  n.style(e.documentElement, "overflow", "hidden");
749
750
  } };
750
751
  }
751
- function Wo(e) {
752
+ function Bo(e) {
752
753
  let n = {};
753
754
  for (let t of e) Object.assign(n, t(n));
754
755
  return n;
755
756
  }
756
- let Ee = pn(() => /* @__PURE__ */ new Map(), { PUSH(e, n) {
757
+ let Re = pn(() => /* @__PURE__ */ new Map(), { PUSH(e, n) {
757
758
  var t;
758
- let o = (t = this.get(e)) != null ? t : { doc: e, count: 0, d: Me(), meta: /* @__PURE__ */ new Set() };
759
+ let o = (t = this.get(e)) != null ? t : { doc: e, count: 0, d: _e(), meta: /* @__PURE__ */ new Set() };
759
760
  return o.count++, o.meta.add(n), this.set(e, o), this;
760
761
  }, POP(e, n) {
761
762
  let t = this.get(e);
762
763
  return t && (t.count--, t.meta.delete(n)), this;
763
764
  }, SCROLL_PREVENT({ doc: e, d: n, meta: t }) {
764
- let o = { doc: e, d: n, meta: Wo(t) }, i = [Ho(), ko(), Vo()];
765
+ let o = { doc: e, d: n, meta: Bo(t) }, i = [Vo(), Ho(), Wo()];
765
766
  i.forEach(({ before: r }) => r == null ? void 0 : r(o)), i.forEach(({ after: r }) => r == null ? void 0 : r(o));
766
767
  }, SCROLL_ALLOW({ d: e }) {
767
768
  e.dispose();
768
769
  }, TEARDOWN({ doc: e }) {
769
770
  this.delete(e);
770
771
  } });
771
- Ee.subscribe(() => {
772
- let e = Ee.getSnapshot(), n = /* @__PURE__ */ new Map();
772
+ Re.subscribe(() => {
773
+ let e = Re.getSnapshot(), n = /* @__PURE__ */ new Map();
773
774
  for (let [t] of e) n.set(t, t.documentElement.style.overflow);
774
775
  for (let t of e.values()) {
775
776
  let o = n.get(t.doc) === "hidden", i = t.count !== 0;
776
- (i && !o || !i && o) && Ee.dispatch(t.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", t), t.count === 0 && Ee.dispatch("TEARDOWN", t);
777
+ (i && !o || !i && o) && Re.dispatch(t.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", t), t.count === 0 && Re.dispatch("TEARDOWN", t);
777
778
  }
778
779
  });
779
- function Bo(e, n, t = () => ({ containers: [] })) {
780
- let o = mn(Ee), i = n ? o.get(n) : void 0, r = i ? i.count > 0 : !1;
780
+ function jo(e, n, t = () => ({ containers: [] })) {
781
+ let o = mn(Re), i = n ? o.get(n) : void 0, r = i ? i.count > 0 : !1;
781
782
  return U(() => {
782
- if (!(!n || !e)) return Ee.dispatch("PUSH", n, t), () => Ee.dispatch("POP", n, t);
783
+ if (!(!n || !e)) return Re.dispatch("PUSH", n, t), () => Re.dispatch("POP", n, t);
783
784
  }, [e, n]), r;
784
785
  }
785
- function jo(e, n, t = () => [document.body]) {
786
- let o = Tt(e, "scroll-lock");
787
- Bo(o, n, (i) => {
786
+ function Uo(e, n, t = () => [document.body]) {
787
+ let o = Ct(e, "scroll-lock");
788
+ jo(o, n, (i) => {
788
789
  var r;
789
790
  return { containers: [...(r = i.containers) != null ? r : [], t] };
790
791
  });
@@ -792,7 +793,7 @@ function jo(e, n, t = () => [document.body]) {
792
793
  function Bt(e) {
793
794
  return [e.screenX, e.screenY];
794
795
  }
795
- function Uo() {
796
+ function Yo() {
796
797
  let e = Y([-1, -1]);
797
798
  return { wasMoved(n) {
798
799
  let t = Bt(n);
@@ -801,20 +802,20 @@ function Uo() {
801
802
  e.current = Bt(n);
802
803
  } };
803
804
  }
804
- function Yo(e, { container: n, accept: t, walk: o }) {
805
+ function qo(e, { container: n, accept: t, walk: o }) {
805
806
  let i = Y(t), r = Y(o);
806
807
  oe(() => {
807
808
  i.current = t, r.current = o;
808
809
  }, [t, o]), U(() => {
809
810
  if (!n || !e) return;
810
- let l = St(n);
811
+ let l = Rt(n);
811
812
  if (!l) return;
812
- let s = i.current, a = r.current, f = Object.assign((d) => s(d), { acceptNode: s }), u = l.createTreeWalker(n, NodeFilter.SHOW_ELEMENT, f, !1);
813
+ let s = i.current, a = r.current, d = Object.assign((f) => s(f), { acceptNode: s }), u = l.createTreeWalker(n, NodeFilter.SHOW_ELEMENT, d, !1);
813
814
  for (; u.nextNode(); ) a(u.currentNode);
814
815
  }, [n, e, i, r]);
815
816
  }
816
817
  function jt(e, n) {
817
- let t = Y([]), o = A(e);
818
+ let t = Y([]), o = _(e);
818
819
  oe(() => {
819
820
  let i = [...t.current];
820
821
  for (let [r, l] of n.entries()) if (t.current[r] !== l) {
@@ -823,14 +824,14 @@ function jt(e, n) {
823
824
  }
824
825
  }, [o, ...n]);
825
826
  }
826
- function _e(e) {
827
+ function De(e) {
827
828
  return bn(e) ? (e.nodeName || "").toLowerCase() : "#document";
828
829
  }
829
830
  function ee(e) {
830
831
  var n;
831
832
  return (e == null || (n = e.ownerDocument) == null ? void 0 : n.defaultView) || window;
832
833
  }
833
- function fe(e) {
834
+ function de(e) {
834
835
  var n;
835
836
  return (n = (bn(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : n.documentElement;
836
837
  }
@@ -840,13 +841,13 @@ function bn(e) {
840
841
  function G(e) {
841
842
  return e instanceof Element || e instanceof ee(e).Element;
842
843
  }
843
- function ce(e) {
844
+ function ue(e) {
844
845
  return e instanceof HTMLElement || e instanceof ee(e).HTMLElement;
845
846
  }
846
847
  function Ut(e) {
847
848
  return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof ee(e).ShadowRoot;
848
849
  }
849
- function Ye(e) {
850
+ function qe(e) {
850
851
  const {
851
852
  overflow: n,
852
853
  overflowX: t,
@@ -856,7 +857,7 @@ function Ye(e) {
856
857
  return /auto|scroll|overlay|hidden|clip/.test(n + o + t) && !["inline", "contents"].includes(i);
857
858
  }
858
859
  function Ko(e) {
859
- return ["table", "td", "th"].includes(_e(e));
860
+ return ["table", "td", "th"].includes(De(e));
860
861
  }
861
862
  function lt(e) {
862
863
  return [":popover-open", ":modal"].some((n) => {
@@ -867,26 +868,26 @@ function lt(e) {
867
868
  }
868
869
  });
869
870
  }
870
- function It(e) {
871
- const n = Mt(), t = re(e);
871
+ function Tt(e) {
872
+ const n = It(), t = re(e);
872
873
  return t.transform !== "none" || t.perspective !== "none" || (t.containerType ? t.containerType !== "normal" : !1) || !n && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !n && (t.filter ? t.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((o) => (t.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (t.contain || "").includes(o));
873
874
  }
874
- function qo(e) {
875
+ function Go(e) {
875
876
  let n = me(e);
876
- for (; ce(n) && !Pe(n); ) {
877
+ for (; ue(n) && !Ae(n); ) {
877
878
  if (lt(n))
878
879
  return null;
879
- if (It(n))
880
+ if (Tt(n))
880
881
  return n;
881
882
  n = me(n);
882
883
  }
883
884
  return null;
884
885
  }
885
- function Mt() {
886
+ function It() {
886
887
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
887
888
  }
888
- function Pe(e) {
889
- return ["html", "body", "#document"].includes(_e(e));
889
+ function Ae(e) {
890
+ return ["html", "body", "#document"].includes(De(e));
890
891
  }
891
892
  function re(e) {
892
893
  return ee(e).getComputedStyle(e);
@@ -901,28 +902,28 @@ function at(e) {
901
902
  };
902
903
  }
903
904
  function me(e) {
904
- if (_e(e) === "html")
905
+ if (De(e) === "html")
905
906
  return e;
906
907
  const n = (
907
908
  // Step into the shadow DOM of the parent of a slotted node.
908
909
  e.assignedSlot || // DOM Element detected.
909
910
  e.parentNode || // ShadowRoot detected.
910
911
  Ut(e) && e.host || // Fallback.
911
- fe(e)
912
+ de(e)
912
913
  );
913
914
  return Ut(n) ? n.host : n;
914
915
  }
915
916
  function xn(e) {
916
917
  const n = me(e);
917
- return Pe(n) ? e.ownerDocument ? e.ownerDocument.body : e.body : ce(n) && Ye(n) ? n : xn(n);
918
+ return Ae(n) ? e.ownerDocument ? e.ownerDocument.body : e.body : ue(n) && qe(n) ? n : xn(n);
918
919
  }
919
- function We(e, n, t) {
920
+ function Be(e, n, t) {
920
921
  var o;
921
922
  n === void 0 && (n = []), t === void 0 && (t = !0);
922
923
  const i = xn(e), r = i === ((o = e.ownerDocument) == null ? void 0 : o.body), l = ee(i);
923
- return r ? n.concat(l, l.visualViewport || [], Ye(i) ? i : [], l.frameElement && t ? We(l.frameElement) : []) : n.concat(i, We(i, [], t));
924
+ return r ? n.concat(l, l.visualViewport || [], qe(i) ? i : [], l.frameElement && t ? Be(l.frameElement) : []) : n.concat(i, Be(i, [], t));
924
925
  }
925
- function Go() {
926
+ function Jo() {
926
927
  const e = navigator.userAgentData;
927
928
  return e && Array.isArray(e.brands) ? e.brands.map((n) => {
928
929
  let {
@@ -935,19 +936,19 @@ function Go() {
935
936
  const pe = Math.min, Z = Math.max, tt = Math.round, Qe = Math.floor, he = (e) => ({
936
937
  x: e,
937
938
  y: e
938
- }), Jo = {
939
+ }), Xo = {
939
940
  left: "right",
940
941
  right: "left",
941
942
  bottom: "top",
942
943
  top: "bottom"
943
- }, Xo = {
944
+ }, Qo = {
944
945
  start: "end",
945
946
  end: "start"
946
947
  };
947
948
  function Yt(e, n, t) {
948
949
  return Z(e, pe(n, t));
949
950
  }
950
- function De(e, n) {
951
+ function $e(e, n) {
951
952
  return typeof e == "function" ? e(n) : e;
952
953
  }
953
954
  function ge(e) {
@@ -962,26 +963,26 @@ function wn(e) {
962
963
  function yn(e) {
963
964
  return e === "y" ? "height" : "width";
964
965
  }
965
- function Re(e) {
966
+ function Se(e) {
966
967
  return ["top", "bottom"].includes(ge(e)) ? "y" : "x";
967
968
  }
968
969
  function En(e) {
969
- return wn(Re(e));
970
+ return wn(Se(e));
970
971
  }
971
- function Qo(e, n, t) {
972
+ function Zo(e, n, t) {
972
973
  t === void 0 && (t = !1);
973
974
  const o = Ke(e), i = En(e), r = yn(i);
974
975
  let l = i === "x" ? o === (t ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
975
976
  return n.reference[r] > n.floating[r] && (l = nt(l)), [l, nt(l)];
976
977
  }
977
- function Zo(e) {
978
+ function ei(e) {
978
979
  const n = nt(e);
979
- return [xt(e), n, xt(n)];
980
+ return [bt(e), n, bt(n)];
980
981
  }
981
- function xt(e) {
982
- return e.replace(/start|end/g, (n) => Xo[n]);
982
+ function bt(e) {
983
+ return e.replace(/start|end/g, (n) => Qo[n]);
983
984
  }
984
- function ei(e, n, t) {
985
+ function ti(e, n, t) {
985
986
  const o = ["left", "right"], i = ["right", "left"], r = ["top", "bottom"], l = ["bottom", "top"];
986
987
  switch (e) {
987
988
  case "top":
@@ -994,15 +995,15 @@ function ei(e, n, t) {
994
995
  return [];
995
996
  }
996
997
  }
997
- function ti(e, n, t, o) {
998
+ function ni(e, n, t, o) {
998
999
  const i = Ke(e);
999
- let r = ei(ge(e), t === "start", o);
1000
- return i && (r = r.map((l) => l + "-" + i), n && (r = r.concat(r.map(xt)))), r;
1000
+ let r = ti(ge(e), t === "start", o);
1001
+ return i && (r = r.map((l) => l + "-" + i), n && (r = r.concat(r.map(bt)))), r;
1001
1002
  }
1002
1003
  function nt(e) {
1003
- return e.replace(/left|right|bottom|top/g, (n) => Jo[n]);
1004
+ return e.replace(/left|right|bottom|top/g, (n) => Xo[n]);
1004
1005
  }
1005
- function ni(e) {
1006
+ function oi(e) {
1006
1007
  return {
1007
1008
  top: 0,
1008
1009
  right: 0,
@@ -1011,8 +1012,8 @@ function ni(e) {
1011
1012
  ...e
1012
1013
  };
1013
1014
  }
1014
- function oi(e) {
1015
- return typeof e != "number" ? ni(e) : {
1015
+ function ii(e) {
1016
+ return typeof e != "number" ? oi(e) : {
1016
1017
  top: e,
1017
1018
  right: e,
1018
1019
  bottom: e,
@@ -1037,12 +1038,12 @@ function ot(e) {
1037
1038
  y: t
1038
1039
  };
1039
1040
  }
1040
- function Kt(e, n, t) {
1041
+ function qt(e, n, t) {
1041
1042
  let {
1042
1043
  reference: o,
1043
1044
  floating: i
1044
1045
  } = e;
1045
- const r = Re(n), l = En(n), s = yn(l), a = ge(n), f = r === "y", u = o.x + o.width / 2 - i.width / 2, d = o.y + o.height / 2 - i.height / 2, g = o[s] / 2 - i[s] / 2;
1046
+ const r = Se(n), l = En(n), s = yn(l), a = ge(n), d = r === "y", u = o.x + o.width / 2 - i.width / 2, f = o.y + o.height / 2 - i.height / 2, g = o[s] / 2 - i[s] / 2;
1046
1047
  let c;
1047
1048
  switch (a) {
1048
1049
  case "top":
@@ -1060,13 +1061,13 @@ function Kt(e, n, t) {
1060
1061
  case "right":
1061
1062
  c = {
1062
1063
  x: o.x + o.width,
1063
- y: d
1064
+ y: f
1064
1065
  };
1065
1066
  break;
1066
1067
  case "left":
1067
1068
  c = {
1068
1069
  x: o.x - i.width,
1069
- y: d
1070
+ y: f
1070
1071
  };
1071
1072
  break;
1072
1073
  default:
@@ -1077,29 +1078,29 @@ function Kt(e, n, t) {
1077
1078
  }
1078
1079
  switch (Ke(n)) {
1079
1080
  case "start":
1080
- c[l] -= g * (t && f ? -1 : 1);
1081
+ c[l] -= g * (t && d ? -1 : 1);
1081
1082
  break;
1082
1083
  case "end":
1083
- c[l] += g * (t && f ? -1 : 1);
1084
+ c[l] += g * (t && d ? -1 : 1);
1084
1085
  break;
1085
1086
  }
1086
1087
  return c;
1087
1088
  }
1088
- const ii = async (e, n, t) => {
1089
+ const ri = async (e, n, t) => {
1089
1090
  const {
1090
1091
  placement: o = "bottom",
1091
1092
  strategy: i = "absolute",
1092
1093
  middleware: r = [],
1093
1094
  platform: l
1094
1095
  } = t, s = r.filter(Boolean), a = await (l.isRTL == null ? void 0 : l.isRTL(n));
1095
- let f = await l.getElementRects({
1096
+ let d = await l.getElementRects({
1096
1097
  reference: e,
1097
1098
  floating: n,
1098
1099
  strategy: i
1099
1100
  }), {
1100
1101
  x: u,
1101
- y: d
1102
- } = Kt(f, o, a), g = o, c = {}, m = 0;
1102
+ y: f
1103
+ } = qt(d, o, a), g = o, c = {}, m = 0;
1103
1104
  for (let p = 0; p < s.length; p++) {
1104
1105
  const {
1105
1106
  name: h,
@@ -1111,36 +1112,36 @@ const ii = async (e, n, t) => {
1111
1112
  reset: y
1112
1113
  } = await v({
1113
1114
  x: u,
1114
- y: d,
1115
+ y: f,
1115
1116
  initialPlacement: o,
1116
1117
  placement: g,
1117
1118
  strategy: i,
1118
1119
  middlewareData: c,
1119
- rects: f,
1120
+ rects: d,
1120
1121
  platform: l,
1121
1122
  elements: {
1122
1123
  reference: e,
1123
1124
  floating: n
1124
1125
  }
1125
1126
  });
1126
- u = w ?? u, d = b ?? d, c = {
1127
+ u = w ?? u, f = b ?? f, c = {
1127
1128
  ...c,
1128
1129
  [h]: {
1129
1130
  ...c[h],
1130
1131
  ...x
1131
1132
  }
1132
- }, y && m <= 50 && (m++, typeof y == "object" && (y.placement && (g = y.placement), y.rects && (f = y.rects === !0 ? await l.getElementRects({
1133
+ }, y && m <= 50 && (m++, typeof y == "object" && (y.placement && (g = y.placement), y.rects && (d = y.rects === !0 ? await l.getElementRects({
1133
1134
  reference: e,
1134
1135
  floating: n,
1135
1136
  strategy: i
1136
1137
  }) : y.rects), {
1137
1138
  x: u,
1138
- y: d
1139
- } = Kt(f, g, a)), p = -1);
1139
+ y: f
1140
+ } = qt(d, g, a)), p = -1);
1140
1141
  }
1141
1142
  return {
1142
1143
  x: u,
1143
- y: d,
1144
+ y: f,
1144
1145
  placement: g,
1145
1146
  strategy: i,
1146
1147
  middlewareData: c
@@ -1157,17 +1158,17 @@ async function ct(e, n) {
1157
1158
  elements: s,
1158
1159
  strategy: a
1159
1160
  } = e, {
1160
- boundary: f = "clippingAncestors",
1161
+ boundary: d = "clippingAncestors",
1161
1162
  rootBoundary: u = "viewport",
1162
- elementContext: d = "floating",
1163
+ elementContext: f = "floating",
1163
1164
  altBoundary: g = !1,
1164
1165
  padding: c = 0
1165
- } = De(n, e), m = oi(c), h = s[g ? d === "floating" ? "reference" : "floating" : d], v = ot(await r.getClippingRect({
1166
+ } = $e(n, e), m = ii(c), h = s[g ? f === "floating" ? "reference" : "floating" : f], v = ot(await r.getClippingRect({
1166
1167
  element: (t = await (r.isElement == null ? void 0 : r.isElement(h))) == null || t ? h : h.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(s.floating)),
1167
- boundary: f,
1168
+ boundary: d,
1168
1169
  rootBoundary: u,
1169
1170
  strategy: a
1170
- })), w = d === "floating" ? {
1171
+ })), w = f === "floating" ? {
1171
1172
  x: o,
1172
1173
  y: i,
1173
1174
  width: l.floating.width,
@@ -1191,7 +1192,7 @@ async function ct(e, n) {
1191
1192
  right: (y.right - v.right + m.right) / x.x
1192
1193
  };
1193
1194
  }
1194
- const ri = function(e) {
1195
+ const si = function(e) {
1195
1196
  return e === void 0 && (e = {}), {
1196
1197
  name: "flip",
1197
1198
  options: e,
@@ -1203,56 +1204,56 @@ const ri = function(e) {
1203
1204
  rects: l,
1204
1205
  initialPlacement: s,
1205
1206
  platform: a,
1206
- elements: f
1207
+ elements: d
1207
1208
  } = n, {
1208
1209
  mainAxis: u = !0,
1209
- crossAxis: d = !0,
1210
+ crossAxis: f = !0,
1210
1211
  fallbackPlacements: g,
1211
1212
  fallbackStrategy: c = "bestFit",
1212
1213
  fallbackAxisSideDirection: m = "none",
1213
1214
  flipAlignment: p = !0,
1214
1215
  ...h
1215
- } = De(e, n);
1216
+ } = $e(e, n);
1216
1217
  if ((t = r.arrow) != null && t.alignmentOffset)
1217
1218
  return {};
1218
- const v = ge(i), w = Re(s), b = ge(s) === s, x = await (a.isRTL == null ? void 0 : a.isRTL(f.floating)), y = g || (b || !p ? [nt(s)] : Zo(s)), S = m !== "none";
1219
- !g && S && y.push(...ti(s, p, m, x));
1220
- const O = [s, ...y], D = await ct(n, h), N = [];
1221
- let M = ((o = r.flip) == null ? void 0 : o.overflows) || [];
1222
- if (u && N.push(D[v]), d) {
1223
- const P = Qo(i, l, x);
1224
- N.push(D[P[0]], D[P[1]]);
1219
+ const v = ge(i), w = Se(s), b = ge(s) === s, x = await (a.isRTL == null ? void 0 : a.isRTL(d.floating)), y = g || (b || !p ? [nt(s)] : ei(s)), O = m !== "none";
1220
+ !g && O && y.push(...ni(s, p, m, x));
1221
+ const C = [s, ...y], $ = await ct(n, h), N = [];
1222
+ let F = ((o = r.flip) == null ? void 0 : o.overflows) || [];
1223
+ if (u && N.push($[v]), f) {
1224
+ const S = Zo(i, l, x);
1225
+ N.push($[S[0]], $[S[1]]);
1225
1226
  }
1226
- if (M = [...M, {
1227
+ if (F = [...F, {
1227
1228
  placement: i,
1228
1229
  overflows: N
1229
- }], !N.every((P) => P <= 0)) {
1230
- var T, $;
1231
- const P = (((T = r.flip) == null ? void 0 : T.index) || 0) + 1, L = O[P];
1230
+ }], !N.every((S) => S <= 0)) {
1231
+ var D, k;
1232
+ const S = (((D = r.flip) == null ? void 0 : D.index) || 0) + 1, L = C[S];
1232
1233
  if (L)
1233
1234
  return {
1234
1235
  data: {
1235
- index: P,
1236
- overflows: M
1236
+ index: S,
1237
+ overflows: F
1237
1238
  },
1238
1239
  reset: {
1239
1240
  placement: L
1240
1241
  }
1241
1242
  };
1242
- let V = ($ = M.filter((R) => R.overflows[0] <= 0).sort((R, k) => R.overflows[1] - k.overflows[1])[0]) == null ? void 0 : $.placement;
1243
+ let V = (k = F.filter((R) => R.overflows[0] <= 0).sort((R, z) => R.overflows[1] - z.overflows[1])[0]) == null ? void 0 : k.placement;
1243
1244
  if (!V)
1244
1245
  switch (c) {
1245
1246
  case "bestFit": {
1246
- var z;
1247
- const R = (z = M.filter((k) => {
1248
- if (S) {
1249
- const I = Re(k.placement);
1250
- return I === w || // Create a bias to the `y` side axis due to horizontal
1247
+ var I;
1248
+ const R = (I = F.filter((z) => {
1249
+ if (O) {
1250
+ const M = Se(z.placement);
1251
+ return M === w || // Create a bias to the `y` side axis due to horizontal
1251
1252
  // reading directions favoring greater width.
1252
- I === "y";
1253
+ M === "y";
1253
1254
  }
1254
1255
  return !0;
1255
- }).map((k) => [k.placement, k.overflows.filter((I) => I > 0).reduce((I, te) => I + te, 0)]).sort((k, I) => k[1] - I[1])[0]) == null ? void 0 : z[0];
1256
+ }).map((z) => [z.placement, z.overflows.filter((M) => M > 0).reduce((M, te) => M + te, 0)]).sort((z, M) => z[1] - M[1])[0]) == null ? void 0 : I[0];
1256
1257
  R && (V = R);
1257
1258
  break;
1258
1259
  }
@@ -1271,35 +1272,35 @@ const ri = function(e) {
1271
1272
  }
1272
1273
  };
1273
1274
  };
1274
- async function si(e, n) {
1275
+ async function li(e, n) {
1275
1276
  const {
1276
1277
  placement: t,
1277
1278
  platform: o,
1278
1279
  elements: i
1279
- } = e, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), l = ge(t), s = Ke(t), a = Re(t) === "y", f = ["left", "top"].includes(l) ? -1 : 1, u = r && a ? -1 : 1, d = De(n, e);
1280
+ } = e, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), l = ge(t), s = Ke(t), a = Se(t) === "y", d = ["left", "top"].includes(l) ? -1 : 1, u = r && a ? -1 : 1, f = $e(n, e);
1280
1281
  let {
1281
1282
  mainAxis: g,
1282
1283
  crossAxis: c,
1283
1284
  alignmentAxis: m
1284
- } = typeof d == "number" ? {
1285
- mainAxis: d,
1285
+ } = typeof f == "number" ? {
1286
+ mainAxis: f,
1286
1287
  crossAxis: 0,
1287
1288
  alignmentAxis: null
1288
1289
  } : {
1289
1290
  mainAxis: 0,
1290
1291
  crossAxis: 0,
1291
1292
  alignmentAxis: null,
1292
- ...d
1293
+ ...f
1293
1294
  };
1294
1295
  return s && typeof m == "number" && (c = s === "end" ? m * -1 : m), a ? {
1295
1296
  x: c * u,
1296
- y: g * f
1297
+ y: g * d
1297
1298
  } : {
1298
- x: g * f,
1299
+ x: g * d,
1299
1300
  y: c * u
1300
1301
  };
1301
1302
  }
1302
- const li = function(e) {
1303
+ const ai = function(e) {
1303
1304
  return e === void 0 && (e = 0), {
1304
1305
  name: "offset",
1305
1306
  options: e,
@@ -1310,7 +1311,7 @@ const li = function(e) {
1310
1311
  y: r,
1311
1312
  placement: l,
1312
1313
  middlewareData: s
1313
- } = n, a = await si(n, e);
1314
+ } = n, a = await li(n, e);
1314
1315
  return l === ((t = s.offset) == null ? void 0 : t.placement) && (o = s.arrow) != null && o.alignmentOffset ? {} : {
1315
1316
  x: i + a.x,
1316
1317
  y: r + a.y,
@@ -1321,7 +1322,7 @@ const li = function(e) {
1321
1322
  };
1322
1323
  }
1323
1324
  };
1324
- }, ai = function(e) {
1325
+ }, ci = function(e) {
1325
1326
  return e === void 0 && (e = {}), {
1326
1327
  name: "shift",
1327
1328
  options: e,
@@ -1346,23 +1347,23 @@ const li = function(e) {
1346
1347
  }
1347
1348
  },
1348
1349
  ...a
1349
- } = De(e, n), f = {
1350
+ } = $e(e, n), d = {
1350
1351
  x: t,
1351
1352
  y: o
1352
- }, u = await ct(n, a), d = Re(ge(i)), g = wn(d);
1353
- let c = f[g], m = f[d];
1353
+ }, u = await ct(n, a), f = Se(ge(i)), g = wn(f);
1354
+ let c = d[g], m = d[f];
1354
1355
  if (r) {
1355
1356
  const h = g === "y" ? "top" : "left", v = g === "y" ? "bottom" : "right", w = c + u[h], b = c - u[v];
1356
1357
  c = Yt(w, c, b);
1357
1358
  }
1358
1359
  if (l) {
1359
- const h = d === "y" ? "top" : "left", v = d === "y" ? "bottom" : "right", w = m + u[h], b = m - u[v];
1360
+ const h = f === "y" ? "top" : "left", v = f === "y" ? "bottom" : "right", w = m + u[h], b = m - u[v];
1360
1361
  m = Yt(w, m, b);
1361
1362
  }
1362
1363
  const p = s.fn({
1363
1364
  ...n,
1364
1365
  [g]: c,
1365
- [d]: m
1366
+ [f]: m
1366
1367
  });
1367
1368
  return {
1368
1369
  ...p,
@@ -1373,7 +1374,7 @@ const li = function(e) {
1373
1374
  };
1374
1375
  }
1375
1376
  };
1376
- }, ci = function(e) {
1377
+ }, ui = function(e) {
1377
1378
  return e === void 0 && (e = {}), {
1378
1379
  name: "size",
1379
1380
  options: e,
@@ -1387,25 +1388,25 @@ const li = function(e) {
1387
1388
  apply: l = () => {
1388
1389
  },
1389
1390
  ...s
1390
- } = De(e, n), a = await ct(n, s), f = ge(t), u = Ke(t), d = Re(t) === "y", {
1391
+ } = $e(e, n), a = await ct(n, s), d = ge(t), u = Ke(t), f = Se(t) === "y", {
1391
1392
  width: g,
1392
1393
  height: c
1393
1394
  } = o.floating;
1394
1395
  let m, p;
1395
- f === "top" || f === "bottom" ? (m = f, p = u === (await (i.isRTL == null ? void 0 : i.isRTL(r.floating)) ? "start" : "end") ? "left" : "right") : (p = f, m = u === "end" ? "top" : "bottom");
1396
+ d === "top" || d === "bottom" ? (m = d, p = u === (await (i.isRTL == null ? void 0 : i.isRTL(r.floating)) ? "start" : "end") ? "left" : "right") : (p = d, m = u === "end" ? "top" : "bottom");
1396
1397
  const h = c - a.top - a.bottom, v = g - a.left - a.right, w = pe(c - a[m], h), b = pe(g - a[p], v), x = !n.middlewareData.shift;
1397
- let y = w, S = b;
1398
- if (d ? S = u || x ? pe(b, v) : v : y = u || x ? pe(w, h) : h, x && !u) {
1399
- const D = Z(a.left, 0), N = Z(a.right, 0), M = Z(a.top, 0), T = Z(a.bottom, 0);
1400
- d ? S = g - 2 * (D !== 0 || N !== 0 ? D + N : Z(a.left, a.right)) : y = c - 2 * (M !== 0 || T !== 0 ? M + T : Z(a.top, a.bottom));
1398
+ let y = w, O = b;
1399
+ if (f ? O = u || x ? pe(b, v) : v : y = u || x ? pe(w, h) : h, x && !u) {
1400
+ const $ = Z(a.left, 0), N = Z(a.right, 0), F = Z(a.top, 0), D = Z(a.bottom, 0);
1401
+ f ? O = g - 2 * ($ !== 0 || N !== 0 ? $ + N : Z(a.left, a.right)) : y = c - 2 * (F !== 0 || D !== 0 ? F + D : Z(a.top, a.bottom));
1401
1402
  }
1402
1403
  await l({
1403
1404
  ...n,
1404
- availableWidth: S,
1405
+ availableWidth: O,
1405
1406
  availableHeight: y
1406
1407
  });
1407
- const O = await i.getDimensions(r.floating);
1408
- return g !== O.width || c !== O.height ? {
1408
+ const C = await i.getDimensions(r.floating);
1409
+ return g !== C.width || c !== C.height ? {
1409
1410
  reset: {
1410
1411
  rects: !0
1411
1412
  }
@@ -1416,19 +1417,19 @@ const li = function(e) {
1416
1417
  function Rn(e) {
1417
1418
  const n = re(e);
1418
1419
  let t = parseFloat(n.width) || 0, o = parseFloat(n.height) || 0;
1419
- const i = ce(e), r = i ? e.offsetWidth : t, l = i ? e.offsetHeight : o, s = tt(t) !== r || tt(o) !== l;
1420
+ const i = ue(e), r = i ? e.offsetWidth : t, l = i ? e.offsetHeight : o, s = tt(t) !== r || tt(o) !== l;
1420
1421
  return s && (t = r, o = l), {
1421
1422
  width: t,
1422
1423
  height: o,
1423
1424
  $: s
1424
1425
  };
1425
1426
  }
1426
- function Pt(e) {
1427
+ function Mt(e) {
1427
1428
  return G(e) ? e : e.contextElement;
1428
1429
  }
1429
- function Ie(e) {
1430
- const n = Pt(e);
1431
- if (!ce(n))
1430
+ function Me(e) {
1431
+ const n = Mt(e);
1432
+ if (!ue(n))
1432
1433
  return he(1);
1433
1434
  const t = n.getBoundingClientRect(), {
1434
1435
  width: o,
@@ -1441,10 +1442,10 @@ function Ie(e) {
1441
1442
  y: s
1442
1443
  };
1443
1444
  }
1444
- const ui = /* @__PURE__ */ he(0);
1445
+ const di = /* @__PURE__ */ he(0);
1445
1446
  function Sn(e) {
1446
1447
  const n = ee(e);
1447
- return !Mt() || !n.visualViewport ? ui : {
1448
+ return !It() || !n.visualViewport ? di : {
1448
1449
  x: n.visualViewport.offsetLeft,
1449
1450
  y: n.visualViewport.offsetTop
1450
1451
  };
@@ -1452,62 +1453,62 @@ function Sn(e) {
1452
1453
  function fi(e, n, t) {
1453
1454
  return n === void 0 && (n = !1), !t || n && t !== ee(e) ? !1 : n;
1454
1455
  }
1455
- function Se(e, n, t, o) {
1456
+ function Oe(e, n, t, o) {
1456
1457
  n === void 0 && (n = !1), t === void 0 && (t = !1);
1457
- const i = e.getBoundingClientRect(), r = Pt(e);
1458
+ const i = e.getBoundingClientRect(), r = Mt(e);
1458
1459
  let l = he(1);
1459
- n && (o ? G(o) && (l = Ie(o)) : l = Ie(e));
1460
+ n && (o ? G(o) && (l = Me(o)) : l = Me(e));
1460
1461
  const s = fi(r, t, o) ? Sn(r) : he(0);
1461
- let a = (i.left + s.x) / l.x, f = (i.top + s.y) / l.y, u = i.width / l.x, d = i.height / l.y;
1462
+ let a = (i.left + s.x) / l.x, d = (i.top + s.y) / l.y, u = i.width / l.x, f = i.height / l.y;
1462
1463
  if (r) {
1463
1464
  const g = ee(r), c = o && G(o) ? ee(o) : o;
1464
1465
  let m = g, p = m.frameElement;
1465
1466
  for (; p && o && c !== m; ) {
1466
- const h = Ie(p), v = p.getBoundingClientRect(), w = re(p), b = v.left + (p.clientLeft + parseFloat(w.paddingLeft)) * h.x, x = v.top + (p.clientTop + parseFloat(w.paddingTop)) * h.y;
1467
- a *= h.x, f *= h.y, u *= h.x, d *= h.y, a += b, f += x, m = ee(p), p = m.frameElement;
1467
+ const h = Me(p), v = p.getBoundingClientRect(), w = re(p), b = v.left + (p.clientLeft + parseFloat(w.paddingLeft)) * h.x, x = v.top + (p.clientTop + parseFloat(w.paddingTop)) * h.y;
1468
+ a *= h.x, d *= h.y, u *= h.x, f *= h.y, a += b, d += x, m = ee(p), p = m.frameElement;
1468
1469
  }
1469
1470
  }
1470
1471
  return ot({
1471
1472
  width: u,
1472
- height: d,
1473
+ height: f,
1473
1474
  x: a,
1474
- y: f
1475
+ y: d
1475
1476
  });
1476
1477
  }
1477
- function di(e) {
1478
+ function pi(e) {
1478
1479
  let {
1479
1480
  elements: n,
1480
1481
  rect: t,
1481
1482
  offsetParent: o,
1482
1483
  strategy: i
1483
1484
  } = e;
1484
- const r = i === "fixed", l = fe(o), s = n ? lt(n.floating) : !1;
1485
+ const r = i === "fixed", l = de(o), s = n ? lt(n.floating) : !1;
1485
1486
  if (o === l || s && r)
1486
1487
  return t;
1487
1488
  let a = {
1488
1489
  scrollLeft: 0,
1489
1490
  scrollTop: 0
1490
- }, f = he(1);
1491
- const u = he(0), d = ce(o);
1492
- if ((d || !d && !r) && ((_e(o) !== "body" || Ye(l)) && (a = at(o)), ce(o))) {
1493
- const g = Se(o);
1494
- f = Ie(o), u.x = g.x + o.clientLeft, u.y = g.y + o.clientTop;
1491
+ }, d = he(1);
1492
+ const u = he(0), f = ue(o);
1493
+ if ((f || !f && !r) && ((De(o) !== "body" || qe(l)) && (a = at(o)), ue(o))) {
1494
+ const g = Oe(o);
1495
+ d = Me(o), u.x = g.x + o.clientLeft, u.y = g.y + o.clientTop;
1495
1496
  }
1496
1497
  return {
1497
- width: t.width * f.x,
1498
- height: t.height * f.y,
1499
- x: t.x * f.x - a.scrollLeft * f.x + u.x,
1500
- y: t.y * f.y - a.scrollTop * f.y + u.y
1498
+ width: t.width * d.x,
1499
+ height: t.height * d.y,
1500
+ x: t.x * d.x - a.scrollLeft * d.x + u.x,
1501
+ y: t.y * d.y - a.scrollTop * d.y + u.y
1501
1502
  };
1502
1503
  }
1503
- function pi(e) {
1504
+ function mi(e) {
1504
1505
  return Array.from(e.getClientRects());
1505
1506
  }
1506
1507
  function On(e) {
1507
- return Se(fe(e)).left + at(e).scrollLeft;
1508
+ return Oe(de(e)).left + at(e).scrollLeft;
1508
1509
  }
1509
- function mi(e) {
1510
- const n = fe(e), t = at(e), o = e.ownerDocument.body, i = Z(n.scrollWidth, n.clientWidth, o.scrollWidth, o.clientWidth), r = Z(n.scrollHeight, n.clientHeight, o.scrollHeight, o.clientHeight);
1510
+ function hi(e) {
1511
+ const n = de(e), t = at(e), o = e.ownerDocument.body, i = Z(n.scrollWidth, n.clientWidth, o.scrollWidth, o.clientWidth), r = Z(n.scrollHeight, n.clientHeight, o.scrollHeight, o.clientHeight);
1511
1512
  let l = -t.scrollLeft + On(e);
1512
1513
  const s = -t.scrollTop;
1513
1514
  return re(o).direction === "rtl" && (l += Z(n.clientWidth, o.clientWidth) - i), {
@@ -1517,13 +1518,13 @@ function mi(e) {
1517
1518
  y: s
1518
1519
  };
1519
1520
  }
1520
- function hi(e, n) {
1521
- const t = ee(e), o = fe(e), i = t.visualViewport;
1521
+ function gi(e, n) {
1522
+ const t = ee(e), o = de(e), i = t.visualViewport;
1522
1523
  let r = o.clientWidth, l = o.clientHeight, s = 0, a = 0;
1523
1524
  if (i) {
1524
1525
  r = i.width, l = i.height;
1525
- const f = Mt();
1526
- (!f || f && n === "fixed") && (s = i.offsetLeft, a = i.offsetTop);
1526
+ const d = It();
1527
+ (!d || d && n === "fixed") && (s = i.offsetLeft, a = i.offsetTop);
1527
1528
  }
1528
1529
  return {
1529
1530
  width: r,
@@ -1532,23 +1533,23 @@ function hi(e, n) {
1532
1533
  y: a
1533
1534
  };
1534
1535
  }
1535
- function gi(e, n) {
1536
- const t = Se(e, !0, n === "fixed"), o = t.top + e.clientTop, i = t.left + e.clientLeft, r = ce(e) ? Ie(e) : he(1), l = e.clientWidth * r.x, s = e.clientHeight * r.y, a = i * r.x, f = o * r.y;
1536
+ function vi(e, n) {
1537
+ const t = Oe(e, !0, n === "fixed"), o = t.top + e.clientTop, i = t.left + e.clientLeft, r = ue(e) ? Me(e) : he(1), l = e.clientWidth * r.x, s = e.clientHeight * r.y, a = i * r.x, d = o * r.y;
1537
1538
  return {
1538
1539
  width: l,
1539
1540
  height: s,
1540
1541
  x: a,
1541
- y: f
1542
+ y: d
1542
1543
  };
1543
1544
  }
1544
- function qt(e, n, t) {
1545
+ function Kt(e, n, t) {
1545
1546
  let o;
1546
1547
  if (n === "viewport")
1547
- o = hi(e, t);
1548
+ o = gi(e, t);
1548
1549
  else if (n === "document")
1549
- o = mi(fe(e));
1550
+ o = hi(de(e));
1550
1551
  else if (G(n))
1551
- o = gi(n, t);
1552
+ o = vi(n, t);
1552
1553
  else {
1553
1554
  const i = Sn(e);
1554
1555
  o = {
@@ -1561,32 +1562,32 @@ function qt(e, n, t) {
1561
1562
  }
1562
1563
  function Cn(e, n) {
1563
1564
  const t = me(e);
1564
- return t === n || !G(t) || Pe(t) ? !1 : re(t).position === "fixed" || Cn(t, n);
1565
+ return t === n || !G(t) || Ae(t) ? !1 : re(t).position === "fixed" || Cn(t, n);
1565
1566
  }
1566
- function vi(e, n) {
1567
+ function bi(e, n) {
1567
1568
  const t = n.get(e);
1568
1569
  if (t)
1569
1570
  return t;
1570
- let o = We(e, [], !1).filter((s) => G(s) && _e(s) !== "body"), i = null;
1571
+ let o = Be(e, [], !1).filter((s) => G(s) && De(s) !== "body"), i = null;
1571
1572
  const r = re(e).position === "fixed";
1572
1573
  let l = r ? me(e) : e;
1573
- for (; G(l) && !Pe(l); ) {
1574
- const s = re(l), a = It(l);
1575
- !a && s.position === "fixed" && (i = null), (r ? !a && !i : !a && s.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || Ye(l) && !a && Cn(e, l)) ? o = o.filter((u) => u !== l) : i = s, l = me(l);
1574
+ for (; G(l) && !Ae(l); ) {
1575
+ const s = re(l), a = Tt(l);
1576
+ !a && s.position === "fixed" && (i = null), (r ? !a && !i : !a && s.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || qe(l) && !a && Cn(e, l)) ? o = o.filter((u) => u !== l) : i = s, l = me(l);
1576
1577
  }
1577
1578
  return n.set(e, o), o;
1578
1579
  }
1579
- function bi(e) {
1580
+ function xi(e) {
1580
1581
  let {
1581
1582
  element: n,
1582
1583
  boundary: t,
1583
1584
  rootBoundary: o,
1584
1585
  strategy: i
1585
1586
  } = e;
1586
- const l = [...t === "clippingAncestors" ? lt(n) ? [] : vi(n, this._c) : [].concat(t), o], s = l[0], a = l.reduce((f, u) => {
1587
- const d = qt(n, u, i);
1588
- return f.top = Z(d.top, f.top), f.right = pe(d.right, f.right), f.bottom = pe(d.bottom, f.bottom), f.left = Z(d.left, f.left), f;
1589
- }, qt(n, s, i));
1587
+ const l = [...t === "clippingAncestors" ? lt(n) ? [] : bi(n, this._c) : [].concat(t), o], s = l[0], a = l.reduce((d, u) => {
1588
+ const f = Kt(n, u, i);
1589
+ return d.top = Z(f.top, d.top), d.right = pe(f.right, d.right), d.bottom = pe(f.bottom, d.bottom), d.left = Z(f.left, d.left), d;
1590
+ }, Kt(n, s, i));
1590
1591
  return {
1591
1592
  width: a.right - a.left,
1592
1593
  height: a.bottom - a.top,
@@ -1594,7 +1595,7 @@ function bi(e) {
1594
1595
  y: a.top
1595
1596
  };
1596
1597
  }
1597
- function xi(e) {
1598
+ function wi(e) {
1598
1599
  const {
1599
1600
  width: n,
1600
1601
  height: t
@@ -1604,54 +1605,54 @@ function xi(e) {
1604
1605
  height: t
1605
1606
  };
1606
1607
  }
1607
- function wi(e, n, t) {
1608
- const o = ce(n), i = fe(n), r = t === "fixed", l = Se(e, !0, r, n);
1608
+ function yi(e, n, t) {
1609
+ const o = ue(n), i = de(n), r = t === "fixed", l = Oe(e, !0, r, n);
1609
1610
  let s = {
1610
1611
  scrollLeft: 0,
1611
1612
  scrollTop: 0
1612
1613
  };
1613
1614
  const a = he(0);
1614
1615
  if (o || !o && !r)
1615
- if ((_e(n) !== "body" || Ye(i)) && (s = at(n)), o) {
1616
- const d = Se(n, !0, r, n);
1617
- a.x = d.x + n.clientLeft, a.y = d.y + n.clientTop;
1616
+ if ((De(n) !== "body" || qe(i)) && (s = at(n)), o) {
1617
+ const f = Oe(n, !0, r, n);
1618
+ a.x = f.x + n.clientLeft, a.y = f.y + n.clientTop;
1618
1619
  } else i && (a.x = On(i));
1619
- const f = l.left + s.scrollLeft - a.x, u = l.top + s.scrollTop - a.y;
1620
+ const d = l.left + s.scrollLeft - a.x, u = l.top + s.scrollTop - a.y;
1620
1621
  return {
1621
- x: f,
1622
+ x: d,
1622
1623
  y: u,
1623
1624
  width: l.width,
1624
1625
  height: l.height
1625
1626
  };
1626
1627
  }
1627
- function pt(e) {
1628
+ function ft(e) {
1628
1629
  return re(e).position === "static";
1629
1630
  }
1630
1631
  function Gt(e, n) {
1631
- return !ce(e) || re(e).position === "fixed" ? null : n ? n(e) : e.offsetParent;
1632
+ return !ue(e) || re(e).position === "fixed" ? null : n ? n(e) : e.offsetParent;
1632
1633
  }
1633
1634
  function Tn(e, n) {
1634
1635
  const t = ee(e);
1635
1636
  if (lt(e))
1636
1637
  return t;
1637
- if (!ce(e)) {
1638
+ if (!ue(e)) {
1638
1639
  let i = me(e);
1639
- for (; i && !Pe(i); ) {
1640
- if (G(i) && !pt(i))
1640
+ for (; i && !Ae(i); ) {
1641
+ if (G(i) && !ft(i))
1641
1642
  return i;
1642
1643
  i = me(i);
1643
1644
  }
1644
1645
  return t;
1645
1646
  }
1646
1647
  let o = Gt(e, n);
1647
- for (; o && Ko(o) && pt(o); )
1648
+ for (; o && Ko(o) && ft(o); )
1648
1649
  o = Gt(o, n);
1649
- return o && Pe(o) && pt(o) && !It(o) ? t : o || qo(e) || t;
1650
+ return o && Ae(o) && ft(o) && !Tt(o) ? t : o || Go(e) || t;
1650
1651
  }
1651
- const yi = async function(e) {
1652
+ const Ei = async function(e) {
1652
1653
  const n = this.getOffsetParent || Tn, t = this.getDimensions, o = await t(e.floating);
1653
1654
  return {
1654
- reference: wi(e.reference, await n(e.floating), e.strategy),
1655
+ reference: yi(e.reference, await n(e.floating), e.strategy),
1655
1656
  floating: {
1656
1657
  x: 0,
1657
1658
  y: 0,
@@ -1660,24 +1661,24 @@ const yi = async function(e) {
1660
1661
  }
1661
1662
  };
1662
1663
  };
1663
- function Ei(e) {
1664
+ function Ri(e) {
1664
1665
  return re(e).direction === "rtl";
1665
1666
  }
1666
- const Ri = {
1667
- convertOffsetParentRelativeRectToViewportRelativeRect: di,
1668
- getDocumentElement: fe,
1669
- getClippingRect: bi,
1667
+ const Si = {
1668
+ convertOffsetParentRelativeRectToViewportRelativeRect: pi,
1669
+ getDocumentElement: de,
1670
+ getClippingRect: xi,
1670
1671
  getOffsetParent: Tn,
1671
- getElementRects: yi,
1672
- getClientRects: pi,
1673
- getDimensions: xi,
1674
- getScale: Ie,
1672
+ getElementRects: Ei,
1673
+ getClientRects: mi,
1674
+ getDimensions: wi,
1675
+ getScale: Me,
1675
1676
  isElement: G,
1676
- isRTL: Ei
1677
+ isRTL: Ri
1677
1678
  };
1678
- function Si(e, n) {
1679
+ function Oi(e, n) {
1679
1680
  let t = null, o;
1680
- const i = fe(e);
1681
+ const i = de(e);
1681
1682
  function r() {
1682
1683
  var s;
1683
1684
  clearTimeout(o), (s = t) == null || s.disconnect(), t = null;
@@ -1685,24 +1686,24 @@ function Si(e, n) {
1685
1686
  function l(s, a) {
1686
1687
  s === void 0 && (s = !1), a === void 0 && (a = 1), r();
1687
1688
  const {
1688
- left: f,
1689
+ left: d,
1689
1690
  top: u,
1690
- width: d,
1691
+ width: f,
1691
1692
  height: g
1692
1693
  } = e.getBoundingClientRect();
1693
- if (s || n(), !d || !g)
1694
+ if (s || n(), !f || !g)
1694
1695
  return;
1695
- const c = Qe(u), m = Qe(i.clientWidth - (f + d)), p = Qe(i.clientHeight - (u + g)), h = Qe(f), w = {
1696
+ const c = Qe(u), m = Qe(i.clientWidth - (d + f)), p = Qe(i.clientHeight - (u + g)), h = Qe(d), w = {
1696
1697
  rootMargin: -c + "px " + -m + "px " + -p + "px " + -h + "px",
1697
1698
  threshold: Z(0, pe(1, a)) || 1
1698
1699
  };
1699
1700
  let b = !0;
1700
1701
  function x(y) {
1701
- const S = y[0].intersectionRatio;
1702
- if (S !== a) {
1702
+ const O = y[0].intersectionRatio;
1703
+ if (O !== a) {
1703
1704
  if (!b)
1704
1705
  return l();
1705
- S ? l(!1, S) : o = setTimeout(() => {
1706
+ O ? l(!1, O) : o = setTimeout(() => {
1706
1707
  l(!1, 1e-7);
1707
1708
  }, 1e3);
1708
1709
  }
@@ -1721,7 +1722,7 @@ function Si(e, n) {
1721
1722
  }
1722
1723
  return l(!0), r;
1723
1724
  }
1724
- function Oi(e, n, t, o) {
1725
+ function Ci(e, n, t, o) {
1725
1726
  o === void 0 && (o = {});
1726
1727
  const {
1727
1728
  ancestorScroll: i = !0,
@@ -1729,43 +1730,43 @@ function Oi(e, n, t, o) {
1729
1730
  elementResize: l = typeof ResizeObserver == "function",
1730
1731
  layoutShift: s = typeof IntersectionObserver == "function",
1731
1732
  animationFrame: a = !1
1732
- } = o, f = Pt(e), u = i || r ? [...f ? We(f) : [], ...We(n)] : [];
1733
+ } = o, d = Mt(e), u = i || r ? [...d ? Be(d) : [], ...Be(n)] : [];
1733
1734
  u.forEach((v) => {
1734
1735
  i && v.addEventListener("scroll", t, {
1735
1736
  passive: !0
1736
1737
  }), r && v.addEventListener("resize", t);
1737
1738
  });
1738
- const d = f && s ? Si(f, t) : null;
1739
+ const f = d && s ? Oi(d, t) : null;
1739
1740
  let g = -1, c = null;
1740
1741
  l && (c = new ResizeObserver((v) => {
1741
1742
  let [w] = v;
1742
- w && w.target === f && c && (c.unobserve(n), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
1743
+ w && w.target === d && c && (c.unobserve(n), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
1743
1744
  var b;
1744
1745
  (b = c) == null || b.observe(n);
1745
1746
  })), t();
1746
- }), f && !a && c.observe(f), c.observe(n));
1747
- let m, p = a ? Se(e) : null;
1747
+ }), d && !a && c.observe(d), c.observe(n));
1748
+ let m, p = a ? Oe(e) : null;
1748
1749
  a && h();
1749
1750
  function h() {
1750
- const v = Se(e);
1751
+ const v = Oe(e);
1751
1752
  p && (v.x !== p.x || v.y !== p.y || v.width !== p.width || v.height !== p.height) && t(), p = v, m = requestAnimationFrame(h);
1752
1753
  }
1753
1754
  return t(), () => {
1754
1755
  var v;
1755
1756
  u.forEach((w) => {
1756
1757
  i && w.removeEventListener("scroll", t), r && w.removeEventListener("resize", t);
1757
- }), d == null || d(), (v = c) == null || v.disconnect(), c = null, a && cancelAnimationFrame(m);
1758
+ }), f == null || f(), (v = c) == null || v.disconnect(), c = null, a && cancelAnimationFrame(m);
1758
1759
  };
1759
1760
  }
1760
- const mt = ct, Ci = li, Ti = ai, Ii = ri, Mi = ci, Pi = (e, n, t) => {
1761
+ const pt = ct, Ti = ai, Ii = ci, Mi = si, _i = ui, Ai = (e, n, t) => {
1761
1762
  const o = /* @__PURE__ */ new Map(), i = {
1762
- platform: Ri,
1763
+ platform: Si,
1763
1764
  ...t
1764
1765
  }, r = {
1765
1766
  ...i.platform,
1766
1767
  _c: o
1767
1768
  };
1768
- return ii(e, n, {
1769
+ return ri(e, n, {
1769
1770
  ...i,
1770
1771
  platform: r
1771
1772
  });
@@ -1814,7 +1815,7 @@ function Xt(e) {
1814
1815
  n.current = e;
1815
1816
  }), n;
1816
1817
  }
1817
- function Ai(e) {
1818
+ function Pi(e) {
1818
1819
  e === void 0 && (e = {});
1819
1820
  const {
1820
1821
  placement: n = "bottom",
@@ -1827,8 +1828,8 @@ function Ai(e) {
1827
1828
  } = {},
1828
1829
  transform: s = !0,
1829
1830
  whileElementsMounted: a,
1830
- open: f
1831
- } = e, [u, d] = E.useState({
1831
+ open: d
1832
+ } = e, [u, f] = E.useState({
1832
1833
  x: 0,
1833
1834
  y: 0,
1834
1835
  strategy: t,
@@ -1838,46 +1839,46 @@ function Ai(e) {
1838
1839
  }), [g, c] = E.useState(o);
1839
1840
  it(g, o) || c(o);
1840
1841
  const [m, p] = E.useState(null), [h, v] = E.useState(null), w = E.useCallback((R) => {
1841
- R !== S.current && (S.current = R, p(R));
1842
+ R !== O.current && (O.current = R, p(R));
1842
1843
  }, []), b = E.useCallback((R) => {
1843
- R !== O.current && (O.current = R, v(R));
1844
- }, []), x = r || m, y = l || h, S = E.useRef(null), O = E.useRef(null), D = E.useRef(u), N = a != null, M = Xt(a), T = Xt(i), $ = E.useCallback(() => {
1845
- if (!S.current || !O.current)
1844
+ R !== C.current && (C.current = R, v(R));
1845
+ }, []), x = r || m, y = l || h, O = E.useRef(null), C = E.useRef(null), $ = E.useRef(u), N = a != null, F = Xt(a), D = Xt(i), k = E.useCallback(() => {
1846
+ if (!O.current || !C.current)
1846
1847
  return;
1847
1848
  const R = {
1848
1849
  placement: n,
1849
1850
  strategy: t,
1850
1851
  middleware: g
1851
1852
  };
1852
- T.current && (R.platform = T.current), Pi(S.current, O.current, R).then((k) => {
1853
- const I = {
1854
- ...k,
1853
+ D.current && (R.platform = D.current), Ai(O.current, C.current, R).then((z) => {
1854
+ const M = {
1855
+ ...z,
1855
1856
  isPositioned: !0
1856
1857
  };
1857
- z.current && !it(D.current, I) && (D.current = I, Ve.flushSync(() => {
1858
- d(I);
1858
+ I.current && !it($.current, M) && ($.current = M, We.flushSync(() => {
1859
+ f(M);
1859
1860
  }));
1860
1861
  });
1861
- }, [g, n, t, T]);
1862
+ }, [g, n, t, D]);
1862
1863
  Ze(() => {
1863
- f === !1 && D.current.isPositioned && (D.current.isPositioned = !1, d((R) => ({
1864
+ d === !1 && $.current.isPositioned && ($.current.isPositioned = !1, f((R) => ({
1864
1865
  ...R,
1865
1866
  isPositioned: !1
1866
1867
  })));
1867
- }, [f]);
1868
- const z = E.useRef(!1);
1869
- Ze(() => (z.current = !0, () => {
1870
- z.current = !1;
1868
+ }, [d]);
1869
+ const I = E.useRef(!1);
1870
+ Ze(() => (I.current = !0, () => {
1871
+ I.current = !1;
1871
1872
  }), []), Ze(() => {
1872
- if (x && (S.current = x), y && (O.current = y), x && y) {
1873
- if (M.current)
1874
- return M.current(x, y, $);
1875
- $();
1873
+ if (x && (O.current = x), y && (C.current = y), x && y) {
1874
+ if (F.current)
1875
+ return F.current(x, y, k);
1876
+ k();
1876
1877
  }
1877
- }, [x, y, $, M, N]);
1878
- const P = E.useMemo(() => ({
1879
- reference: S,
1880
- floating: O,
1878
+ }, [x, y, k, F, N]);
1879
+ const S = E.useMemo(() => ({
1880
+ reference: O,
1881
+ floating: C,
1881
1882
  setReference: w,
1882
1883
  setFloating: b
1883
1884
  }), [w, b]), L = E.useMemo(() => ({
@@ -1891,31 +1892,28 @@ function Ai(e) {
1891
1892
  };
1892
1893
  if (!L.floating)
1893
1894
  return R;
1894
- const k = Jt(L.floating, u.x), I = Jt(L.floating, u.y);
1895
+ const z = Jt(L.floating, u.x), M = Jt(L.floating, u.y);
1895
1896
  return s ? {
1896
1897
  ...R,
1897
- transform: "translate(" + k + "px, " + I + "px)",
1898
+ transform: "translate(" + z + "px, " + M + "px)",
1898
1899
  ...In(L.floating) >= 1.5 && {
1899
1900
  willChange: "transform"
1900
1901
  }
1901
1902
  } : {
1902
1903
  position: t,
1903
- left: k,
1904
- top: I
1904
+ left: z,
1905
+ top: M
1905
1906
  };
1906
1907
  }, [t, s, L.floating, u.x, u.y]);
1907
1908
  return E.useMemo(() => ({
1908
1909
  ...u,
1909
- update: $,
1910
- refs: P,
1910
+ update: k,
1911
+ refs: S,
1911
1912
  elements: L,
1912
1913
  floatingStyles: V
1913
- }), [u, $, P, L, V]);
1914
+ }), [u, k, S, L, V]);
1914
1915
  }
1915
1916
  const Mn = (e, n) => ({
1916
- ...Ci(e),
1917
- options: [e, n]
1918
- }), _i = (e, n) => ({
1919
1917
  ...Ti(e),
1920
1918
  options: [e, n]
1921
1919
  }), Di = (e, n) => ({
@@ -1924,15 +1922,18 @@ const Mn = (e, n) => ({
1924
1922
  }), $i = (e, n) => ({
1925
1923
  ...Mi(e),
1926
1924
  options: [e, n]
1927
- }), Pn = {
1925
+ }), Li = (e, n) => ({
1926
+ ..._i(e),
1927
+ options: [e, n]
1928
+ }), _n = {
1928
1929
  ...E
1929
- }, Li = Pn.useInsertionEffect, Fi = Li || ((e) => e());
1930
+ }, Fi = _n.useInsertionEffect, Ni = Fi || ((e) => e());
1930
1931
  function An(e) {
1931
1932
  const n = E.useRef(() => {
1932
1933
  if (process.env.NODE_ENV !== "production")
1933
1934
  throw new Error("Cannot call an event handler while rendering.");
1934
1935
  });
1935
- return Fi(() => {
1936
+ return Ni(() => {
1936
1937
  n.current = e;
1937
1938
  }), E.useCallback(function() {
1938
1939
  for (var t = arguments.length, o = new Array(t), i = 0; i < t; i++)
@@ -1940,43 +1941,43 @@ function An(e) {
1940
1941
  return n.current == null ? void 0 : n.current(...o);
1941
1942
  }, []);
1942
1943
  }
1943
- var wt = typeof document < "u" ? an : oe;
1944
- let Qt = !1, Ni = 0;
1944
+ var xt = typeof document < "u" ? an : oe;
1945
+ let Qt = !1, ki = 0;
1945
1946
  const Zt = () => (
1946
1947
  // Ensure the id is unique with multiple independent versions of Floating UI
1947
1948
  // on <React 18
1948
- "floating-ui-" + Math.random().toString(36).slice(2, 6) + Ni++
1949
+ "floating-ui-" + Math.random().toString(36).slice(2, 6) + ki++
1949
1950
  );
1950
1951
  function zi() {
1951
1952
  const [e, n] = E.useState(() => Qt ? Zt() : void 0);
1952
- return wt(() => {
1953
+ return xt(() => {
1953
1954
  e == null && n(Zt());
1954
1955
  }, []), E.useEffect(() => {
1955
1956
  Qt = !0;
1956
1957
  }, []), e;
1957
1958
  }
1958
- const ki = Pn.useId, Hi = ki || zi;
1959
- let Be;
1960
- process.env.NODE_ENV !== "production" && (Be = /* @__PURE__ */ new Set());
1961
- function Vi() {
1959
+ const Hi = _n.useId, Vi = Hi || zi;
1960
+ let je;
1961
+ process.env.NODE_ENV !== "production" && (je = /* @__PURE__ */ new Set());
1962
+ function Wi() {
1962
1963
  for (var e, n = arguments.length, t = new Array(n), o = 0; o < n; o++)
1963
1964
  t[o] = arguments[o];
1964
1965
  const i = "Floating UI: " + t.join(" ");
1965
- if (!((e = Be) != null && e.has(i))) {
1966
+ if (!((e = je) != null && e.has(i))) {
1966
1967
  var r;
1967
- (r = Be) == null || r.add(i), console.warn(i);
1968
+ (r = je) == null || r.add(i), console.warn(i);
1968
1969
  }
1969
1970
  }
1970
- function Wi() {
1971
+ function Bi() {
1971
1972
  for (var e, n = arguments.length, t = new Array(n), o = 0; o < n; o++)
1972
1973
  t[o] = arguments[o];
1973
1974
  const i = "Floating UI: " + t.join(" ");
1974
- if (!((e = Be) != null && e.has(i))) {
1975
+ if (!((e = je) != null && e.has(i))) {
1975
1976
  var r;
1976
- (r = Be) == null || r.add(i), console.error(i);
1977
+ (r = je) == null || r.add(i), console.error(i);
1977
1978
  }
1978
1979
  }
1979
- function Bi() {
1980
+ function ji() {
1980
1981
  const e = /* @__PURE__ */ new Map();
1981
1982
  return {
1982
1983
  emit(n, t) {
@@ -1992,29 +1993,29 @@ function Bi() {
1992
1993
  }
1993
1994
  };
1994
1995
  }
1995
- const ji = /* @__PURE__ */ E.createContext(null), Ui = /* @__PURE__ */ E.createContext(null), Yi = () => {
1996
+ const Ui = /* @__PURE__ */ E.createContext(null), Yi = /* @__PURE__ */ E.createContext(null), qi = () => {
1996
1997
  var e;
1997
- return ((e = E.useContext(ji)) == null ? void 0 : e.id) || null;
1998
- }, Ki = () => E.useContext(Ui);
1999
- function qi(e) {
1998
+ return ((e = E.useContext(Ui)) == null ? void 0 : e.id) || null;
1999
+ }, Ki = () => E.useContext(Yi);
2000
+ function Gi(e) {
2000
2001
  const {
2001
2002
  open: n = !1,
2002
2003
  onOpenChange: t,
2003
2004
  elements: o
2004
- } = e, i = Hi(), r = E.useRef({}), [l] = E.useState(() => Bi()), s = Yi() != null;
2005
+ } = e, i = Vi(), r = E.useRef({}), [l] = E.useState(() => ji()), s = qi() != null;
2005
2006
  if (process.env.NODE_ENV !== "production") {
2006
2007
  const c = o.reference;
2007
- c && !G(c) && Wi("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
2008
+ c && !G(c) && Bi("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
2008
2009
  }
2009
- const [a, f] = E.useState(o.reference), u = An((c, m, p) => {
2010
+ const [a, d] = E.useState(o.reference), u = An((c, m, p) => {
2010
2011
  r.current.openEvent = c ? m : void 0, l.emit("openchange", {
2011
2012
  open: c,
2012
2013
  event: m,
2013
2014
  reason: p,
2014
2015
  nested: s
2015
2016
  }), t == null || t(c, m, p);
2016
- }), d = E.useMemo(() => ({
2017
- setPositionReference: f
2017
+ }), f = E.useMemo(() => ({
2018
+ setPositionReference: d
2018
2019
  }), []), g = E.useMemo(() => ({
2019
2020
  reference: a || o.reference || null,
2020
2021
  floating: o.floating || null,
@@ -2027,25 +2028,25 @@ function qi(e) {
2027
2028
  elements: g,
2028
2029
  events: l,
2029
2030
  floatingId: i,
2030
- refs: d
2031
- }), [n, u, g, l, i, d]);
2031
+ refs: f
2032
+ }), [n, u, g, l, i, f]);
2032
2033
  }
2033
- function Gi(e) {
2034
+ function Ji(e) {
2034
2035
  e === void 0 && (e = {});
2035
2036
  const {
2036
2037
  nodeId: n
2037
- } = e, t = qi({
2038
+ } = e, t = Gi({
2038
2039
  ...e,
2039
2040
  elements: {
2040
2041
  reference: null,
2041
2042
  floating: null,
2042
2043
  ...e.elements
2043
2044
  }
2044
- }), o = e.rootContext || t, i = o.elements, [r, l] = E.useState(null), [s, a] = E.useState(null), u = (i == null ? void 0 : i.reference) || r, d = E.useRef(null), g = Ki();
2045
- wt(() => {
2046
- u && (d.current = u);
2045
+ }), o = e.rootContext || t, i = o.elements, [r, l] = E.useState(null), [s, a] = E.useState(null), u = (i == null ? void 0 : i.reference) || r, f = E.useRef(null), g = Ki();
2046
+ xt(() => {
2047
+ u && (f.current = u);
2047
2048
  }, [u]);
2048
- const c = Ai({
2049
+ const c = Pi({
2049
2050
  ...e,
2050
2051
  elements: {
2051
2052
  ...i,
@@ -2060,7 +2061,7 @@ function Gi(e) {
2060
2061
  } : b;
2061
2062
  a(x), c.refs.setReference(x);
2062
2063
  }, [c.refs]), p = E.useCallback((b) => {
2063
- (G(b) || b === null) && (d.current = b, l(b)), (G(c.refs.reference.current) || c.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
2064
+ (G(b) || b === null) && (f.current = b, l(b)), (G(c.refs.reference.current) || c.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
2064
2065
  // `null` to support `positionReference` + an unstable `reference`
2065
2066
  // callback ref.
2066
2067
  b !== null && !G(b)) && c.refs.setReference(b);
@@ -2068,7 +2069,7 @@ function Gi(e) {
2068
2069
  ...c.refs,
2069
2070
  setReference: p,
2070
2071
  setPositionReference: m,
2071
- domReference: d
2072
+ domReference: f
2072
2073
  }), [c.refs, p, m]), v = E.useMemo(() => ({
2073
2074
  ...c.elements,
2074
2075
  domReference: u
@@ -2079,7 +2080,7 @@ function Gi(e) {
2079
2080
  elements: v,
2080
2081
  nodeId: n
2081
2082
  }), [c, h, v, n, o]);
2082
- return wt(() => {
2083
+ return xt(() => {
2083
2084
  o.dataRef.current.floatingContext = w;
2084
2085
  const b = g == null ? void 0 : g.nodesRef.current.find((x) => x.id === n);
2085
2086
  b && (b.context = w);
@@ -2091,7 +2092,7 @@ function Gi(e) {
2091
2092
  }), [c, h, v, w]);
2092
2093
  }
2093
2094
  const en = "active", tn = "selected";
2094
- function ht(e, n, t) {
2095
+ function mt(e, n, t) {
2095
2096
  const o = /* @__PURE__ */ new Map(), i = t === "item";
2096
2097
  let r = e;
2097
2098
  if (i && e) {
@@ -2111,34 +2112,34 @@ function ht(e, n, t) {
2111
2112
  const s = l ? l[t] : null;
2112
2113
  return typeof s == "function" ? e ? s(e) : null : s;
2113
2114
  }).concat(e).reduce((l, s) => (s && Object.entries(s).forEach((a) => {
2114
- let [f, u] = a;
2115
- if (!(i && [en, tn].includes(f)))
2116
- if (f.indexOf("on") === 0) {
2117
- if (o.has(f) || o.set(f, []), typeof u == "function") {
2118
- var d;
2119
- (d = o.get(f)) == null || d.push(u), l[f] = function() {
2115
+ let [d, u] = a;
2116
+ if (!(i && [en, tn].includes(d)))
2117
+ if (d.indexOf("on") === 0) {
2118
+ if (o.has(d) || o.set(d, []), typeof u == "function") {
2119
+ var f;
2120
+ (f = o.get(d)) == null || f.push(u), l[d] = function() {
2120
2121
  for (var g, c = arguments.length, m = new Array(c), p = 0; p < c; p++)
2121
2122
  m[p] = arguments[p];
2122
- return (g = o.get(f)) == null ? void 0 : g.map((h) => h(...m)).find((h) => h !== void 0);
2123
+ return (g = o.get(d)) == null ? void 0 : g.map((h) => h(...m)).find((h) => h !== void 0);
2123
2124
  };
2124
2125
  }
2125
2126
  } else
2126
- l[f] = u;
2127
+ l[d] = u;
2127
2128
  }), l), {})
2128
2129
  };
2129
2130
  }
2130
- function Ji(e) {
2131
+ function Xi(e) {
2131
2132
  e === void 0 && (e = []);
2132
2133
  const n = e.map((s) => s == null ? void 0 : s.reference), t = e.map((s) => s == null ? void 0 : s.floating), o = e.map((s) => s == null ? void 0 : s.item), i = E.useCallback(
2133
- (s) => ht(s, e, "reference"),
2134
+ (s) => mt(s, e, "reference"),
2134
2135
  // eslint-disable-next-line react-hooks/exhaustive-deps
2135
2136
  n
2136
2137
  ), r = E.useCallback(
2137
- (s) => ht(s, e, "floating"),
2138
+ (s) => mt(s, e, "floating"),
2138
2139
  // eslint-disable-next-line react-hooks/exhaustive-deps
2139
2140
  t
2140
2141
  ), l = E.useCallback(
2141
- (s) => ht(s, e, "item"),
2142
+ (s) => mt(s, e, "item"),
2142
2143
  // eslint-disable-next-line react-hooks/exhaustive-deps
2143
2144
  o
2144
2145
  );
@@ -2160,7 +2161,7 @@ function nn(e, n) {
2160
2161
  }
2161
2162
  };
2162
2163
  }
2163
- const Xi = (e) => ({
2164
+ const Qi = (e) => ({
2164
2165
  name: "inner",
2165
2166
  options: e,
2166
2167
  async fn(n) {
@@ -2172,24 +2173,24 @@ const Xi = (e) => ({
2172
2173
  index: l = 0,
2173
2174
  minItemsVisible: s = 4,
2174
2175
  referenceOverflowThreshold: a = 0,
2175
- scrollRef: f,
2176
+ scrollRef: d,
2176
2177
  ...u
2177
- } = De(e, n), {
2178
- rects: d,
2178
+ } = $e(e, n), {
2179
+ rects: f,
2179
2180
  elements: {
2180
2181
  floating: g
2181
2182
  }
2182
2183
  } = n, c = t.current[l];
2183
- if (process.env.NODE_ENV !== "production" && (n.placement.startsWith("bottom") || Vi('`placement` side must be "bottom" when using the `inner`', "middleware.")), !c)
2184
+ if (process.env.NODE_ENV !== "production" && (n.placement.startsWith("bottom") || Wi('`placement` side must be "bottom" when using the `inner`', "middleware.")), !c)
2184
2185
  return {};
2185
2186
  const m = {
2186
2187
  ...n,
2187
- ...await Mn(-c.offsetTop - g.clientTop - d.reference.height / 2 - c.offsetHeight / 2 - r).fn(n)
2188
- }, p = (f == null ? void 0 : f.current) || g, h = await mt(nn(m, p.scrollHeight), u), v = await mt(m, {
2188
+ ...await Mn(-c.offsetTop - g.clientTop - f.reference.height / 2 - c.offsetHeight / 2 - r).fn(n)
2189
+ }, p = (d == null ? void 0 : d.current) || g, h = await pt(nn(m, p.scrollHeight), u), v = await pt(m, {
2189
2190
  ...u,
2190
2191
  elementContext: "reference"
2191
2192
  }), w = Math.max(0, h.top), b = m.y + w, x = Math.max(0, p.scrollHeight - w - Math.max(0, h.bottom));
2192
- return p.style.maxHeight = x + "px", p.scrollTop = w, i && (p.offsetHeight < c.offsetHeight * Math.min(s, t.current.length - 1) - 1 || v.top >= -a || v.bottom >= -a ? Ve.flushSync(() => i(!0)) : Ve.flushSync(() => i(!1))), o && (o.current = await mt(nn({
2193
+ return p.style.maxHeight = x + "px", p.scrollTop = w, i && (p.offsetHeight < c.offsetHeight * Math.min(s, t.current.length - 1) - 1 || v.top >= -a || v.bottom >= -a ? We.flushSync(() => i(!0)) : We.flushSync(() => i(!1))), o && (o.current = await pt(nn({
2193
2194
  ...m,
2194
2195
  y: b
2195
2196
  }, p.offsetHeight), u)), {
@@ -2197,7 +2198,7 @@ const Xi = (e) => ({
2197
2198
  };
2198
2199
  }
2199
2200
  });
2200
- function Qi(e, n) {
2201
+ function Zi(e, n) {
2201
2202
  const {
2202
2203
  open: t,
2203
2204
  elements: o
@@ -2206,43 +2207,43 @@ function Qi(e, n) {
2206
2207
  overflowRef: r,
2207
2208
  scrollRef: l,
2208
2209
  onChange: s
2209
- } = n, a = An(s), f = E.useRef(!1), u = E.useRef(null), d = E.useRef(null);
2210
+ } = n, a = An(s), d = E.useRef(!1), u = E.useRef(null), f = E.useRef(null);
2210
2211
  E.useEffect(() => {
2211
2212
  if (!i) return;
2212
2213
  function c(p) {
2213
2214
  if (p.ctrlKey || !m || r.current == null)
2214
2215
  return;
2215
2216
  const h = p.deltaY, v = r.current.top >= -0.5, w = r.current.bottom >= -0.5, b = m.scrollHeight - m.clientHeight, x = h < 0 ? -1 : 1, y = h < 0 ? "max" : "min";
2216
- m.scrollHeight <= m.clientHeight || (!v && h > 0 || !w && h < 0 ? (p.preventDefault(), Ve.flushSync(() => {
2217
- a((S) => S + Math[y](h, b * x));
2218
- })) : /firefox/i.test(Go()) && (m.scrollTop += h));
2217
+ m.scrollHeight <= m.clientHeight || (!v && h > 0 || !w && h < 0 ? (p.preventDefault(), We.flushSync(() => {
2218
+ a((O) => O + Math[y](h, b * x));
2219
+ })) : /firefox/i.test(Jo()) && (m.scrollTop += h));
2219
2220
  }
2220
2221
  const m = (l == null ? void 0 : l.current) || o.floating;
2221
2222
  if (t && m)
2222
2223
  return m.addEventListener("wheel", c), requestAnimationFrame(() => {
2223
- u.current = m.scrollTop, r.current != null && (d.current = {
2224
+ u.current = m.scrollTop, r.current != null && (f.current = {
2224
2225
  ...r.current
2225
2226
  });
2226
2227
  }), () => {
2227
- u.current = null, d.current = null, m.removeEventListener("wheel", c);
2228
+ u.current = null, f.current = null, m.removeEventListener("wheel", c);
2228
2229
  };
2229
2230
  }, [i, t, o.floating, r, l, a]);
2230
2231
  const g = E.useMemo(() => ({
2231
2232
  onKeyDown() {
2232
- f.current = !0;
2233
+ d.current = !0;
2233
2234
  },
2234
2235
  onWheel() {
2235
- f.current = !1;
2236
+ d.current = !1;
2236
2237
  },
2237
2238
  onPointerMove() {
2238
- f.current = !1;
2239
+ d.current = !1;
2239
2240
  },
2240
2241
  onScroll() {
2241
2242
  const c = (l == null ? void 0 : l.current) || o.floating;
2242
- if (!(!r.current || !c || !f.current)) {
2243
+ if (!(!r.current || !c || !d.current)) {
2243
2244
  if (u.current !== null) {
2244
2245
  const m = c.scrollTop - u.current;
2245
- (r.current.bottom < -0.5 && m < -1 || r.current.top < -0.5 && m > 1) && Ve.flushSync(() => a((p) => p + m));
2246
+ (r.current.bottom < -0.5 && m < -1 || r.current.top < -0.5 && m > 1) && We.flushSync(() => a((p) => p + m));
2246
2247
  }
2247
2248
  requestAnimationFrame(() => {
2248
2249
  u.current = c.scrollTop;
@@ -2254,67 +2255,67 @@ function Qi(e, n) {
2254
2255
  floating: g
2255
2256
  } : {}, [i, g]);
2256
2257
  }
2257
- let qe = ve({ styles: void 0, setReference: () => {
2258
+ let Ge = ve({ styles: void 0, setReference: () => {
2258
2259
  }, setFloating: () => {
2259
2260
  }, getReferenceProps: () => ({}), getFloatingProps: () => ({}), slot: {} });
2260
- qe.displayName = "FloatingContext";
2261
- let At = ve(null);
2262
- At.displayName = "PlacementContext";
2263
- function Zi(e) {
2264
- return q(() => e ? typeof e == "string" ? { to: e } : e : null, [e]);
2265
- }
2266
- function er() {
2267
- return ae(qe).setReference;
2261
+ Ge.displayName = "FloatingContext";
2262
+ let _t = ve(null);
2263
+ _t.displayName = "PlacementContext";
2264
+ function er(e) {
2265
+ return K(() => e ? typeof e == "string" ? { to: e } : e : null, [e]);
2268
2266
  }
2269
2267
  function tr() {
2270
- let { getFloatingProps: e, slot: n } = ae(qe);
2271
- return He((...t) => Object.assign({}, e(...t), { "data-anchor": n.anchor }), [e, n]);
2268
+ return ce(Ge).setReference;
2269
+ }
2270
+ function nr() {
2271
+ let { getFloatingProps: e, slot: n } = ce(Ge);
2272
+ return Ve((...t) => Object.assign({}, e(...t), { "data-anchor": n.anchor }), [e, n]);
2272
2273
  }
2273
- function nr(e = null) {
2274
+ function or(e = null) {
2274
2275
  e === !1 && (e = null), typeof e == "string" && (e = { to: e });
2275
- let n = ae(At), t = q(() => e, [JSON.stringify(e, typeof HTMLElement < "u" ? (i, r) => r instanceof HTMLElement ? r.outerHTML : r : void 0)]);
2276
+ let n = ce(_t), t = K(() => e, [JSON.stringify(e, typeof HTMLElement < "u" ? (i, r) => r instanceof HTMLElement ? r.outerHTML : r : void 0)]);
2276
2277
  U(() => {
2277
2278
  n == null || n(t ?? null);
2278
2279
  }, [n, t]);
2279
- let o = ae(qe);
2280
- return q(() => [o.setFloating, e ? o.styles : {}], [o.setFloating, e, o.styles]);
2280
+ let o = ce(Ge);
2281
+ return K(() => [o.setFloating, e ? o.styles : {}], [o.setFloating, e, o.styles]);
2281
2282
  }
2282
2283
  let on = 4;
2283
- function or({ children: e, enabled: n = !0 }) {
2284
- let [t, o] = ue(null), [i, r] = ue(0), l = Y(null), [s, a] = ue(null);
2285
- ir(s);
2286
- let f = n && t !== null && s !== null, { to: u = "bottom", gap: d = 0, offset: g = 0, padding: c = 0, inner: m } = rr(t, s), [p, h = "center"] = u.split(" ");
2284
+ function ir({ children: e, enabled: n = !0 }) {
2285
+ let [t, o] = ae(null), [i, r] = ae(0), l = Y(null), [s, a] = ae(null);
2286
+ rr(s);
2287
+ let d = n && t !== null && s !== null, { to: u = "bottom", gap: f = 0, offset: g = 0, padding: c = 0, inner: m } = sr(t, s), [p, h = "center"] = u.split(" ");
2287
2288
  U(() => {
2288
- f && r(0);
2289
- }, [f]);
2290
- let { refs: v, floatingStyles: w, context: b } = Gi({ open: f, placement: p === "selection" ? h === "center" ? "bottom" : `bottom-${h}` : h === "center" ? `${p}` : `${p}-${h}`, strategy: "absolute", transform: !1, middleware: [Mn({ mainAxis: p === "selection" ? 0 : d, crossAxis: g }), _i({ padding: c }), p !== "selection" && Di({ padding: c }), p === "selection" && m ? Xi({ ...m, padding: c, overflowRef: l, offset: i, minItemsVisible: on, referenceOverflowThreshold: c, onFallbackChange(T) {
2291
- var $, z;
2292
- if (!T) return;
2293
- let P = b.elements.floating;
2294
- if (!P) return;
2295
- let L = parseFloat(getComputedStyle(P).scrollPaddingBottom) || 0, V = Math.min(on, P.childElementCount), R = 0, k = 0;
2296
- for (let I of (z = ($ = b.elements.floating) == null ? void 0 : $.childNodes) != null ? z : []) if (I instanceof HTMLElement) {
2297
- let te = I.offsetTop, Ce = te + I.clientHeight + L, C = P.scrollTop, J = C + P.clientHeight;
2298
- if (te >= C && Ce <= J) V--;
2289
+ d && r(0);
2290
+ }, [d]);
2291
+ let { refs: v, floatingStyles: w, context: b } = Ji({ open: d, placement: p === "selection" ? h === "center" ? "bottom" : `bottom-${h}` : h === "center" ? `${p}` : `${p}-${h}`, strategy: "absolute", transform: !1, middleware: [Mn({ mainAxis: p === "selection" ? 0 : f, crossAxis: g }), Di({ padding: c }), p !== "selection" && $i({ padding: c }), p === "selection" && m ? Qi({ ...m, padding: c, overflowRef: l, offset: i, minItemsVisible: on, referenceOverflowThreshold: c, onFallbackChange(D) {
2292
+ var k, I;
2293
+ if (!D) return;
2294
+ let S = b.elements.floating;
2295
+ if (!S) return;
2296
+ let L = parseFloat(getComputedStyle(S).scrollPaddingBottom) || 0, V = Math.min(on, S.childElementCount), R = 0, z = 0;
2297
+ for (let M of (I = (k = b.elements.floating) == null ? void 0 : k.childNodes) != null ? I : []) if (M instanceof HTMLElement) {
2298
+ let te = M.offsetTop, Te = te + M.clientHeight + L, T = S.scrollTop, J = T + S.clientHeight;
2299
+ if (te >= T && Te <= J) V--;
2299
2300
  else {
2300
- k = Math.max(0, Math.min(Ce, J) - Math.max(te, C)), R = I.clientHeight;
2301
+ z = Math.max(0, Math.min(Te, J) - Math.max(te, T)), R = M.clientHeight;
2301
2302
  break;
2302
2303
  }
2303
2304
  }
2304
- V >= 1 && r((I) => {
2305
- let te = R * V - k + L;
2306
- return I >= te ? I : te;
2305
+ V >= 1 && r((M) => {
2306
+ let te = R * V - z + L;
2307
+ return M >= te ? M : te;
2307
2308
  });
2308
- } }) : null, $i({ padding: c, apply({ availableWidth: T, availableHeight: $, elements: z }) {
2309
- Object.assign(z.floating.style, { overflow: "auto", maxWidth: `${T}px`, maxHeight: `min(var(--anchor-max-height, 100vh), ${$}px)` });
2310
- } })].filter(Boolean), whileElementsMounted: Oi }), [x = p, y = h] = b.placement.split("-");
2309
+ } }) : null, Li({ padding: c, apply({ availableWidth: D, availableHeight: k, elements: I }) {
2310
+ Object.assign(I.floating.style, { overflow: "auto", maxWidth: `${D}px`, maxHeight: `min(var(--anchor-max-height, 100vh), ${k}px)` });
2311
+ } })].filter(Boolean), whileElementsMounted: Ci }), [x = p, y = h] = b.placement.split("-");
2311
2312
  p === "selection" && (x = "selection");
2312
- let S = q(() => ({ anchor: [x, y].filter(Boolean).join(" ") }), [x, y]), O = Qi(b, { overflowRef: l, onChange: r }), { getReferenceProps: D, getFloatingProps: N } = Ji([O]), M = A((T) => {
2313
- a(T), v.setFloating(T);
2313
+ let O = K(() => ({ anchor: [x, y].filter(Boolean).join(" ") }), [x, y]), C = Zi(b, { overflowRef: l, onChange: r }), { getReferenceProps: $, getFloatingProps: N } = Xi([C]), F = _((D) => {
2314
+ a(D), v.setFloating(D);
2314
2315
  });
2315
- return E.createElement(At.Provider, { value: o }, E.createElement(qe.Provider, { value: { setFloating: M, setReference: v.setReference, styles: w, getReferenceProps: D, getFloatingProps: N, slot: S } }, e));
2316
+ return E.createElement(_t.Provider, { value: o }, E.createElement(Ge.Provider, { value: { setFloating: F, setReference: v.setReference, styles: w, getReferenceProps: $, getFloatingProps: N, slot: O } }, e));
2316
2317
  }
2317
- function ir(e) {
2318
+ function rr(e) {
2318
2319
  U(() => {
2319
2320
  if (!e) return;
2320
2321
  let n = new MutationObserver(() => {
@@ -2328,54 +2329,54 @@ function ir(e) {
2328
2329
  };
2329
2330
  }, [e]);
2330
2331
  }
2331
- function rr(e, n) {
2332
+ function sr(e, n) {
2332
2333
  var t, o, i;
2333
- let r = gt((t = e == null ? void 0 : e.gap) != null ? t : "var(--anchor-gap, 0)", n), l = gt((o = e == null ? void 0 : e.offset) != null ? o : "var(--anchor-offset, 0)", n), s = gt((i = e == null ? void 0 : e.padding) != null ? i : "var(--anchor-padding, 0)", n);
2334
+ let r = ht((t = e == null ? void 0 : e.gap) != null ? t : "var(--anchor-gap, 0)", n), l = ht((o = e == null ? void 0 : e.offset) != null ? o : "var(--anchor-offset, 0)", n), s = ht((i = e == null ? void 0 : e.padding) != null ? i : "var(--anchor-padding, 0)", n);
2334
2335
  return { ...e, gap: r, offset: l, padding: s };
2335
2336
  }
2336
- function gt(e, n, t = void 0) {
2337
- let o = cn(), i = A((a, f) => {
2337
+ function ht(e, n, t = void 0) {
2338
+ let o = cn(), i = _((a, d) => {
2338
2339
  if (a == null) return [t, null];
2339
2340
  if (typeof a == "number") return [a, null];
2340
2341
  if (typeof a == "string") {
2341
- if (!f) return [t, null];
2342
- let u = rn(a, f);
2343
- return [u, (d) => {
2344
- let g = _n(a);
2342
+ if (!d) return [t, null];
2343
+ let u = rn(a, d);
2344
+ return [u, (f) => {
2345
+ let g = Pn(a);
2345
2346
  {
2346
- let c = g.map((m) => window.getComputedStyle(f).getPropertyValue(m));
2347
+ let c = g.map((m) => window.getComputedStyle(d).getPropertyValue(m));
2347
2348
  o.requestAnimationFrame(function m() {
2348
2349
  o.nextFrame(m);
2349
2350
  let p = !1;
2350
2351
  for (let [v, w] of g.entries()) {
2351
- let b = window.getComputedStyle(f).getPropertyValue(w);
2352
+ let b = window.getComputedStyle(d).getPropertyValue(w);
2352
2353
  if (c[v] !== b) {
2353
2354
  c[v] = b, p = !0;
2354
2355
  break;
2355
2356
  }
2356
2357
  }
2357
2358
  if (!p) return;
2358
- let h = rn(a, f);
2359
- u !== h && (d(h), u = h);
2359
+ let h = rn(a, d);
2360
+ u !== h && (f(h), u = h);
2360
2361
  });
2361
2362
  }
2362
2363
  return o.dispose;
2363
2364
  }];
2364
2365
  }
2365
2366
  return [t, null];
2366
- }), r = q(() => i(e, n)[0], [e, n]), [l = r, s] = ue();
2367
+ }), r = K(() => i(e, n)[0], [e, n]), [l = r, s] = ae();
2367
2368
  return U(() => {
2368
- let [a, f] = i(e, n);
2369
- if (s(a), !!f) return f(s);
2369
+ let [a, d] = i(e, n);
2370
+ if (s(a), !!d) return d(s);
2370
2371
  }, [e, n]), l;
2371
2372
  }
2372
- function _n(e) {
2373
+ function Pn(e) {
2373
2374
  let n = /var\((.*)\)/.exec(e);
2374
2375
  if (n) {
2375
2376
  let t = n[1].indexOf(",");
2376
2377
  if (t === -1) return [n[1]];
2377
2378
  let o = n[1].slice(0, t).trim(), i = n[1].slice(t + 1).trim();
2378
- return i ? [o, ..._n(i)] : [o];
2379
+ return i ? [o, ...Pn(i)] : [o];
2379
2380
  }
2380
2381
  return [];
2381
2382
  }
@@ -2385,30 +2386,30 @@ function rn(e, n) {
2385
2386
  let o = parseFloat(window.getComputedStyle(t).marginTop) || 0;
2386
2387
  return n.removeChild(t), o;
2387
2388
  }
2388
- function sr({ children: e, freeze: n }) {
2389
- let t = yt(n, e);
2389
+ function lr({ children: e, freeze: n }) {
2390
+ let t = wt(n, e);
2390
2391
  return j.createElement(j.Fragment, null, t);
2391
2392
  }
2392
- function yt(e, n) {
2393
- let [t, o] = ue(n);
2393
+ function wt(e, n) {
2394
+ let [t, o] = ae(n);
2394
2395
  return !e && t !== n && o(n), e ? t : n;
2395
2396
  }
2396
- function lr(e) {
2397
+ function ar(e) {
2397
2398
  function n() {
2398
2399
  document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", n));
2399
2400
  }
2400
2401
  typeof window < "u" && typeof document < "u" && (document.addEventListener("DOMContentLoaded", n), n());
2401
2402
  }
2402
- let we = [];
2403
- lr(() => {
2403
+ let ye = [];
2404
+ ar(() => {
2404
2405
  function e(n) {
2405
- if (!(n.target instanceof HTMLElement) || n.target === document.body || we[0] === n.target) return;
2406
+ if (!(n.target instanceof HTMLElement) || n.target === document.body || ye[0] === n.target) return;
2406
2407
  let t = n.target;
2407
- t = t.closest(lo), we.unshift(t ?? n.target), we = we.filter((o) => o != null && o.isConnected), we.splice(10);
2408
+ t = t.closest(ao), ye.unshift(t ?? n.target), ye = ye.filter((o) => o != null && o.isConnected), ye.splice(10);
2408
2409
  }
2409
2410
  window.addEventListener("click", e, { capture: !0 }), window.addEventListener("mousedown", e, { capture: !0 }), window.addEventListener("focus", e, { capture: !0 }), document.body.addEventListener("click", e, { capture: !0 }), document.body.addEventListener("mousedown", e, { capture: !0 }), document.body.addEventListener("focus", e, { capture: !0 });
2410
2411
  });
2411
- function ar(e) {
2412
+ function cr(e) {
2412
2413
  throw new Error("Unexpected object: " + e);
2413
2414
  }
2414
2415
  var B = ((e) => (e[e.First = 0] = "First", e[e.Previous = 1] = "Previous", e[e.Next = 2] = "Next", e[e.Last = 3] = "Last", e[e.Specific = 4] = "Specific", e[e.Nothing = 5] = "Nothing", e))(B || {});
@@ -2441,35 +2442,35 @@ function sn(e, n) {
2441
2442
  case 5:
2442
2443
  return null;
2443
2444
  default:
2444
- ar(e);
2445
+ cr(e);
2445
2446
  }
2446
2447
  }
2447
- var _t = ((e) => (e[e.Left = 0] = "Left", e[e.Right = 2] = "Right", e))(_t || {});
2448
- function cr(e) {
2449
- let n = A(e), t = Y(!1);
2448
+ var At = ((e) => (e[e.Left = 0] = "Left", e[e.Right = 2] = "Right", e))(At || {});
2449
+ function ur(e) {
2450
+ let n = _(e), t = Y(!1);
2450
2451
  oe(() => (t.current = !1, () => {
2451
- t.current = !0, Yn(() => {
2452
+ t.current = !0, qn(() => {
2452
2453
  t.current && n();
2453
2454
  });
2454
2455
  }), [n]);
2455
2456
  }
2456
- function ur() {
2457
+ function dr() {
2457
2458
  let e = typeof document > "u";
2458
2459
  return "useSyncExternalStore" in E ? ((n) => n.useSyncExternalStore)(E)(() => () => {
2459
2460
  }, () => !1, () => !e) : !1;
2460
2461
  }
2461
2462
  function fr() {
2462
- let e = ur(), [n, t] = E.useState(ze.isHandoffComplete);
2463
+ let e = dr(), [n, t] = E.useState(ze.isHandoffComplete);
2463
2464
  return n && ze.isHandoffComplete === !1 && t(!1), E.useEffect(() => {
2464
2465
  n !== !0 && t(!0);
2465
2466
  }, [n]), E.useEffect(() => ze.handoff(), []), e ? !1 : n;
2466
2467
  }
2467
- let dr = ve(!1);
2468
- function pr() {
2469
- return ae(dr);
2468
+ let pr = ve(!1);
2469
+ function mr() {
2470
+ return ce(pr);
2470
2471
  }
2471
- function mr(e) {
2472
- let n = pr(), t = ae($n), o = st(e), [i, r] = ue(() => {
2472
+ function hr(e) {
2473
+ let n = mr(), t = ce($n), o = st(e), [i, r] = ae(() => {
2473
2474
  var l;
2474
2475
  if (!n && t !== null) return (l = t.current) != null ? l : null;
2475
2476
  if (ze.isServer) return null;
@@ -2485,38 +2486,38 @@ function mr(e) {
2485
2486
  n || t !== null && r(t.current);
2486
2487
  }, [t, r, n]), i;
2487
2488
  }
2488
- let Dn = rt, hr = be(function(e, n) {
2489
- let t = e, o = Y(null), i = Oe(Kn((u) => {
2489
+ let Dn = rt, gr = be(function(e, n) {
2490
+ let t = e, o = Y(null), i = Ce(Kn((u) => {
2490
2491
  o.current = u;
2491
- }), n), r = st(o), l = mr(o), [s] = ue(() => {
2492
+ }), n), r = st(o), l = hr(o), [s] = ae(() => {
2492
2493
  var u;
2493
2494
  return ze.isServer ? null : (u = r == null ? void 0 : r.createElement("div")) != null ? u : null;
2494
- }), a = ae(xr), f = fr();
2495
+ }), a = ce(wr), d = fr();
2495
2496
  return U(() => {
2496
2497
  !l || !s || l.contains(s) || (s.setAttribute("data-headlessui-portal", ""), l.appendChild(s));
2497
2498
  }, [l, s]), U(() => {
2498
2499
  if (s && a) return a.register(s);
2499
- }, [a, s]), cr(() => {
2500
+ }, [a, s]), ur(() => {
2500
2501
  var u;
2501
2502
  !l || !s || (s instanceof Node && l.contains(s) && l.removeChild(s), l.childNodes.length <= 0 && ((u = l.parentElement) == null || u.removeChild(l)));
2502
- }), f ? !l || !s ? null : qn(xe({ ourProps: { ref: i }, theirProps: t, slot: {}, defaultTag: Dn, name: "Portal" }), s) : null;
2503
+ }), d ? !l || !s ? null : Gn(xe({ ourProps: { ref: i }, theirProps: t, slot: {}, defaultTag: Dn, name: "Portal" }), s) : null;
2503
2504
  });
2504
- function gr(e, n) {
2505
- let t = Oe(n), { enabled: o = !0, ...i } = e;
2506
- return o ? j.createElement(hr, { ...i, ref: t }) : xe({ ourProps: { ref: t }, theirProps: i, slot: {}, defaultTag: Dn, name: "Portal" });
2507
- }
2508
- let vr = rt, $n = ve(null);
2509
- function br(e, n) {
2510
- let { target: t, ...o } = e, i = { ref: Oe(n) };
2511
- return j.createElement($n.Provider, { value: t }, xe({ ourProps: i, theirProps: o, defaultTag: vr, name: "Popover.Group" }));
2512
- }
2513
- let xr = ve(null), wr = be(gr), yr = be(br), Er = Object.assign(wr, { Group: yr });
2514
- var Rr = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Rr || {}), Sr = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(Sr || {}), Or = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Focus = 1] = "Focus", e[e.Other = 2] = "Other", e))(Or || {}), Cr = ((e) => (e[e.OpenCombobox = 0] = "OpenCombobox", e[e.CloseCombobox = 1] = "CloseCombobox", e[e.GoToOption = 2] = "GoToOption", e[e.SetTyping = 3] = "SetTyping", e[e.RegisterOption = 4] = "RegisterOption", e[e.UnregisterOption = 5] = "UnregisterOption", e[e.SetActivationTrigger = 6] = "SetActivationTrigger", e[e.UpdateVirtualConfiguration = 7] = "UpdateVirtualConfiguration", e))(Cr || {});
2515
- function vt(e, n = (t) => t) {
2516
- let t = e.activeOptionIndex !== null ? e.options[e.activeOptionIndex] : null, o = n(e.options.slice()), i = o.length > 0 && o[0].dataRef.current.order !== null ? o.sort((l, s) => l.dataRef.current.order - s.dataRef.current.order) : ao(o, (l) => l.dataRef.current.domRef.current), r = t ? i.indexOf(t) : null;
2505
+ function vr(e, n) {
2506
+ let t = Ce(n), { enabled: o = !0, ...i } = e;
2507
+ return o ? j.createElement(gr, { ...i, ref: t }) : xe({ ourProps: { ref: t }, theirProps: i, slot: {}, defaultTag: Dn, name: "Portal" });
2508
+ }
2509
+ let br = rt, $n = ve(null);
2510
+ function xr(e, n) {
2511
+ let { target: t, ...o } = e, i = { ref: Ce(n) };
2512
+ return j.createElement($n.Provider, { value: t }, xe({ ourProps: i, theirProps: o, defaultTag: br, name: "Popover.Group" }));
2513
+ }
2514
+ let wr = ve(null), yr = be(vr), Er = be(xr), Rr = Object.assign(yr, { Group: Er });
2515
+ var Sr = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Sr || {}), Or = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(Or || {}), Cr = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Focus = 1] = "Focus", e[e.Other = 2] = "Other", e))(Cr || {}), Tr = ((e) => (e[e.OpenCombobox = 0] = "OpenCombobox", e[e.CloseCombobox = 1] = "CloseCombobox", e[e.GoToOption = 2] = "GoToOption", e[e.SetTyping = 3] = "SetTyping", e[e.RegisterOption = 4] = "RegisterOption", e[e.UnregisterOption = 5] = "UnregisterOption", e[e.SetActivationTrigger = 6] = "SetActivationTrigger", e[e.UpdateVirtualConfiguration = 7] = "UpdateVirtualConfiguration", e))(Tr || {});
2516
+ function gt(e, n = (t) => t) {
2517
+ let t = e.activeOptionIndex !== null ? e.options[e.activeOptionIndex] : null, o = n(e.options.slice()), i = o.length > 0 && o[0].dataRef.current.order !== null ? o.sort((l, s) => l.dataRef.current.order - s.dataRef.current.order) : co(o, (l) => l.dataRef.current.domRef.current), r = t ? i.indexOf(t) : null;
2517
2518
  return r === -1 && (r = null), { options: i, activeOptionIndex: r };
2518
2519
  }
2519
- let Tr = { 1(e) {
2520
+ let Ir = { 1(e) {
2520
2521
  var n;
2521
2522
  return (n = e.dataRef.current) != null && n.disabled || e.comboboxState === 1 ? e : { ...e, activeOptionIndex: null, comboboxState: 1, isTyping: !1, activationTrigger: 2, __demoMode: !1 };
2522
2523
  }, 0(e) {
@@ -2533,32 +2534,32 @@ let Tr = { 1(e) {
2533
2534
  var t, o, i, r, l;
2534
2535
  if ((t = e.dataRef.current) != null && t.disabled || (o = e.dataRef.current) != null && o.optionsRef.current && !((i = e.dataRef.current) != null && i.optionsPropsRef.current.static) && e.comboboxState === 1) return e;
2535
2536
  if (e.virtual) {
2536
- let { options: u, disabled: d } = e.virtual, g = n.focus === B.Specific ? n.idx : sn(n, { resolveItems: () => u, resolveActiveIndex: () => {
2537
+ let { options: u, disabled: f } = e.virtual, g = n.focus === B.Specific ? n.idx : sn(n, { resolveItems: () => u, resolveActiveIndex: () => {
2537
2538
  var m, p;
2538
- return (p = (m = e.activeOptionIndex) != null ? m : u.findIndex((h) => !d(h))) != null ? p : null;
2539
- }, resolveDisabled: d, resolveId() {
2539
+ return (p = (m = e.activeOptionIndex) != null ? m : u.findIndex((h) => !f(h))) != null ? p : null;
2540
+ }, resolveDisabled: f, resolveId() {
2540
2541
  throw new Error("Function not implemented.");
2541
2542
  } }), c = (r = n.trigger) != null ? r : 2;
2542
2543
  return e.activeOptionIndex === g && e.activationTrigger === c ? e : { ...e, activeOptionIndex: g, activationTrigger: c, isTyping: !1, __demoMode: !1 };
2543
2544
  }
2544
- let s = vt(e);
2545
+ let s = gt(e);
2545
2546
  if (s.activeOptionIndex === null) {
2546
- let u = s.options.findIndex((d) => !d.dataRef.current.disabled);
2547
+ let u = s.options.findIndex((f) => !f.dataRef.current.disabled);
2547
2548
  u !== -1 && (s.activeOptionIndex = u);
2548
2549
  }
2549
- let a = n.focus === B.Specific ? n.idx : sn(n, { resolveItems: () => s.options, resolveActiveIndex: () => s.activeOptionIndex, resolveId: (u) => u.id, resolveDisabled: (u) => u.dataRef.current.disabled }), f = (l = n.trigger) != null ? l : 2;
2550
- return e.activeOptionIndex === a && e.activationTrigger === f ? e : { ...e, ...s, isTyping: !1, activeOptionIndex: a, activationTrigger: f, __demoMode: !1 };
2550
+ let a = n.focus === B.Specific ? n.idx : sn(n, { resolveItems: () => s.options, resolveActiveIndex: () => s.activeOptionIndex, resolveId: (u) => u.id, resolveDisabled: (u) => u.dataRef.current.disabled }), d = (l = n.trigger) != null ? l : 2;
2551
+ return e.activeOptionIndex === a && e.activationTrigger === d ? e : { ...e, ...s, isTyping: !1, activeOptionIndex: a, activationTrigger: d, __demoMode: !1 };
2551
2552
  }, 4: (e, n) => {
2552
2553
  var t, o, i;
2553
2554
  if ((t = e.dataRef.current) != null && t.virtual) return { ...e, options: [...e.options, n.payload] };
2554
- let r = n.payload, l = vt(e, (a) => (a.push(r), a));
2555
+ let r = n.payload, l = gt(e, (a) => (a.push(r), a));
2555
2556
  e.activeOptionIndex === null && (o = e.dataRef.current) != null && o.isSelected(n.payload.dataRef.current.value) && (l.activeOptionIndex = l.options.indexOf(r));
2556
2557
  let s = { ...e, ...l, activationTrigger: 2 };
2557
2558
  return (i = e.dataRef.current) != null && i.__demoMode && e.dataRef.current.value === void 0 && (s.activeOptionIndex = 0), s;
2558
2559
  }, 5: (e, n) => {
2559
2560
  var t;
2560
2561
  if ((t = e.dataRef.current) != null && t.virtual) return { ...e, options: e.options.filter((i) => i.id !== n.id) };
2561
- let o = vt(e, (i) => {
2562
+ let o = gt(e, (i) => {
2562
2563
  let r = i.findIndex((l) => l.id === n.id);
2563
2564
  return r !== -1 && i.splice(r, 1), i;
2564
2565
  });
@@ -2573,488 +2574,518 @@ let Tr = { 1(e) {
2573
2574
  r !== -1 ? i = r : i = null;
2574
2575
  }
2575
2576
  return { ...e, activeOptionIndex: i, virtual: { options: n.options, disabled: (o = n.disabled) != null ? o : () => !1 } };
2576
- } }, Dt = ve(null);
2577
- Dt.displayName = "ComboboxActionsContext";
2578
- function Ge(e) {
2579
- let n = ae(Dt);
2577
+ } }, Pt = ve(null);
2578
+ Pt.displayName = "ComboboxActionsContext";
2579
+ function Je(e) {
2580
+ let n = ce(Pt);
2580
2581
  if (n === null) {
2581
2582
  let t = new Error(`<${e} /> is missing a parent <Combobox /> component.`);
2582
- throw Error.captureStackTrace && Error.captureStackTrace(t, Ge), t;
2583
+ throw Error.captureStackTrace && Error.captureStackTrace(t, Je), t;
2583
2584
  }
2584
2585
  return n;
2585
2586
  }
2586
2587
  let Ln = ve(null);
2587
- function Ir(e) {
2588
- let n = $e("VirtualProvider"), { options: t } = n.virtual, [o, i] = q(() => {
2589
- let f = n.optionsRef.current;
2590
- if (!f) return [0, 0];
2591
- let u = window.getComputedStyle(f);
2588
+ function Mr(e) {
2589
+ let n = Le("VirtualProvider"), { options: t } = n.virtual, [o, i] = K(() => {
2590
+ let d = n.optionsRef.current;
2591
+ if (!d) return [0, 0];
2592
+ let u = window.getComputedStyle(d);
2592
2593
  return [parseFloat(u.paddingBlockStart || u.paddingTop), parseFloat(u.paddingBlockEnd || u.paddingBottom)];
2593
- }, [n.optionsRef.current]), r = Mo({ enabled: t.length !== 0, scrollPaddingStart: o, scrollPaddingEnd: i, count: t.length, estimateSize() {
2594
+ }, [n.optionsRef.current]), r = _o({ enabled: t.length !== 0, scrollPaddingStart: o, scrollPaddingEnd: i, count: t.length, estimateSize() {
2594
2595
  return 40;
2595
2596
  }, getScrollElement() {
2596
- var f;
2597
- return (f = n.optionsRef.current) != null ? f : null;
2598
- }, overscan: 12 }), [l, s] = ue(0);
2597
+ var d;
2598
+ return (d = n.optionsRef.current) != null ? d : null;
2599
+ }, overscan: 12 }), [l, s] = ae(0);
2599
2600
  U(() => {
2600
- s((f) => f + 1);
2601
+ s((d) => d + 1);
2601
2602
  }, [t]);
2602
2603
  let a = r.getVirtualItems();
2603
- return a.length === 0 ? null : j.createElement(Ln.Provider, { value: r }, j.createElement("div", { style: { position: "relative", width: "100%", height: `${r.getTotalSize()}px` }, ref: (f) => {
2604
- if (f) {
2604
+ return a.length === 0 ? null : j.createElement(Ln.Provider, { value: r }, j.createElement("div", { style: { position: "relative", width: "100%", height: `${r.getTotalSize()}px` }, ref: (d) => {
2605
+ if (d) {
2605
2606
  if (typeof process < "u" && process.env.JEST_WORKER_ID !== void 0 || n.activationTrigger === 0) return;
2606
2607
  n.activeOptionIndex !== null && t.length > n.activeOptionIndex && r.scrollToIndex(n.activeOptionIndex);
2607
2608
  }
2608
- } }, a.map((f) => {
2609
+ } }, a.map((d) => {
2609
2610
  var u;
2610
- return j.createElement(rt, { key: f.key }, j.cloneElement((u = e.children) == null ? void 0 : u.call(e, { ...e.slot, option: t[f.index] }), { key: `${l}-${f.key}`, "data-index": f.index, "aria-setsize": t.length, "aria-posinset": f.index + 1, style: { position: "absolute", top: 0, left: 0, transform: `translateY(${f.start}px)`, overflowAnchor: "none" } }));
2611
+ return j.createElement(rt, { key: d.key }, j.cloneElement((u = e.children) == null ? void 0 : u.call(e, { ...e.slot, option: t[d.index] }), { key: `${l}-${d.key}`, "data-index": d.index, "aria-setsize": t.length, "aria-posinset": d.index + 1, style: { position: "absolute", top: 0, left: 0, transform: `translateY(${d.start}px)`, overflowAnchor: "none" } }));
2611
2612
  })));
2612
2613
  }
2613
- let je = ve(null);
2614
- je.displayName = "ComboboxDataContext";
2615
- function $e(e) {
2616
- let n = ae(je);
2614
+ let Ue = ve(null);
2615
+ Ue.displayName = "ComboboxDataContext";
2616
+ function Le(e) {
2617
+ let n = ce(Ue);
2617
2618
  if (n === null) {
2618
2619
  let t = new Error(`<${e} /> is missing a parent <Combobox /> component.`);
2619
- throw Error.captureStackTrace && Error.captureStackTrace(t, $e), t;
2620
+ throw Error.captureStackTrace && Error.captureStackTrace(t, Le), t;
2620
2621
  }
2621
2622
  return n;
2622
2623
  }
2623
- function Mr(e, n) {
2624
- return Te(n.type, Tr, e, n);
2624
+ function _r(e, n) {
2625
+ return Ie(n.type, Ir, e, n);
2625
2626
  }
2626
- let Pr = rt;
2627
- function Ar(e, n) {
2627
+ let Ar = rt;
2628
+ function Pr(e, n) {
2628
2629
  var t, o;
2629
- let i = Qn(), { value: r, defaultValue: l, onChange: s, form: a, name: f, by: u, disabled: d = i || !1, onClose: g, __demoMode: c = !1, multiple: m = !1, immediate: p = !1, virtual: h = null, nullable: v, ...w } = e, b = Zn(l), [x = m ? [] : void 0, y] = eo(r, s, b), [S, O] = ln(Mr, { dataRef: Bn(), comboboxState: c ? 0 : 1, isTyping: !1, options: [], virtual: h ? { options: h.options, disabled: (t = h.disabled) != null ? t : () => !1 } : null, activeOptionIndex: null, activationTrigger: 2, __demoMode: c }), D = Y(!1), N = Y({ static: !1, hold: !1 }), M = Y(null), T = Y(null), $ = Y(null), z = Jn(u), P = A((_) => h ? u === null ? h.options.indexOf(_) : h.options.findIndex((H) => z(H, _)) : S.options.findIndex((H) => z(H.dataRef.current.value, _))), L = He((_) => Te(R.mode, { 1: () => x.some((H) => z(H, _)), 0: () => z(x, _) }), [x]), V = A((_) => S.activeOptionIndex === P(_)), R = q(() => ({ ...S, immediate: p, optionsPropsRef: N, inputRef: M, buttonRef: T, optionsRef: $, value: x, defaultValue: b, disabled: d, mode: m ? 1 : 0, virtual: h ? S.virtual : null, get activeOptionIndex() {
2630
- if (D.current && S.activeOptionIndex === null && (h ? h.options.length > 0 : S.options.length > 0)) {
2630
+ let i = Zn(), { value: r, defaultValue: l, onChange: s, form: a, name: d, by: u, disabled: f = i || !1, onClose: g, __demoMode: c = !1, multiple: m = !1, immediate: p = !1, virtual: h = null, nullable: v, ...w } = e, b = eo(l), [x = m ? [] : void 0, y] = to(r, s, b), [O, C] = ln(_r, { dataRef: Bn(), comboboxState: c ? 0 : 1, isTyping: !1, options: [], virtual: h ? { options: h.options, disabled: (t = h.disabled) != null ? t : () => !1 } : null, activeOptionIndex: null, activationTrigger: 2, __demoMode: c }), $ = Y(!1), N = Y({ static: !1, hold: !1 }), F = Y(null), D = Y(null), k = Y(null), I = Xn(u), S = _((A) => h ? u === null ? h.options.indexOf(A) : h.options.findIndex((H) => I(H, A)) : O.options.findIndex((H) => I(H.dataRef.current.value, A))), L = Ve((A) => Ie(R.mode, { 1: () => x.some((H) => I(H, A)), 0: () => I(x, A) }), [x]), V = _((A) => O.activeOptionIndex === S(A)), R = K(() => ({ ...O, immediate: p, optionsPropsRef: N, inputRef: F, buttonRef: D, optionsRef: k, value: x, defaultValue: b, disabled: f, mode: m ? 1 : 0, virtual: h ? O.virtual : null, get activeOptionIndex() {
2631
+ if ($.current && O.activeOptionIndex === null && (h ? h.options.length > 0 : O.options.length > 0)) {
2631
2632
  if (h) {
2632
2633
  let H = h.options.findIndex((le) => {
2633
- var Je, $t;
2634
- return !(($t = (Je = h.disabled) == null ? void 0 : Je.call(h, le)) != null && $t);
2634
+ var Xe, Dt;
2635
+ return !((Dt = (Xe = h.disabled) == null ? void 0 : Xe.call(h, le)) != null && Dt);
2635
2636
  });
2636
2637
  if (H !== -1) return H;
2637
2638
  }
2638
- let _ = S.options.findIndex((H) => !H.dataRef.current.disabled);
2639
- if (_ !== -1) return _;
2639
+ let A = O.options.findIndex((H) => !H.dataRef.current.disabled);
2640
+ if (A !== -1) return A;
2640
2641
  }
2641
- return S.activeOptionIndex;
2642
- }, calculateIndex: P, compare: z, isSelected: L, isActive: V }), [x, b, d, m, c, S, h]);
2642
+ return O.activeOptionIndex;
2643
+ }, calculateIndex: S, compare: I, isSelected: L, isActive: V }), [x, b, f, m, c, O, h]);
2643
2644
  U(() => {
2644
- var _;
2645
- h && O({ type: 7, options: h.options, disabled: (_ = h.disabled) != null ? _ : null });
2645
+ var A;
2646
+ h && C({ type: 7, options: h.options, disabled: (A = h.disabled) != null ? A : null });
2646
2647
  }, [h, h == null ? void 0 : h.options, h == null ? void 0 : h.disabled]), U(() => {
2647
- S.dataRef.current = R;
2648
+ O.dataRef.current = R;
2648
2649
  }, [R]);
2649
- let k = R.comboboxState === 0;
2650
- No(k, [R.buttonRef, R.inputRef, R.optionsRef], () => se.closeCombobox());
2651
- let I = q(() => {
2652
- var _, H, le;
2653
- return { open: R.comboboxState === 0, disabled: d, activeIndex: R.activeOptionIndex, activeOption: R.activeOptionIndex === null ? null : R.virtual ? R.virtual.options[(_ = R.activeOptionIndex) != null ? _ : 0] : (le = (H = R.options[R.activeOptionIndex]) == null ? void 0 : H.dataRef.current.value) != null ? le : null, value: x };
2654
- }, [R, d, x]), te = A(() => {
2650
+ let z = R.comboboxState === 0;
2651
+ ko(z, [R.buttonRef, R.inputRef, R.optionsRef], () => se.closeCombobox());
2652
+ let M = K(() => {
2653
+ var A, H, le;
2654
+ return { open: R.comboboxState === 0, disabled: f, activeIndex: R.activeOptionIndex, activeOption: R.activeOptionIndex === null ? null : R.virtual ? R.virtual.options[(A = R.activeOptionIndex) != null ? A : 0] : (le = (H = R.options[R.activeOptionIndex]) == null ? void 0 : H.dataRef.current.value) != null ? le : null, value: x };
2655
+ }, [R, f, x]), te = _(() => {
2655
2656
  if (R.activeOptionIndex !== null) {
2656
2657
  if (se.setIsTyping(!1), R.virtual) W(R.virtual.options[R.activeOptionIndex]);
2657
2658
  else {
2658
- let { dataRef: _ } = R.options[R.activeOptionIndex];
2659
- W(_.current.value);
2659
+ let { dataRef: A } = R.options[R.activeOptionIndex];
2660
+ W(A.current.value);
2660
2661
  }
2661
2662
  se.goToOption(B.Specific, R.activeOptionIndex);
2662
2663
  }
2663
- }), Ce = A(() => {
2664
- O({ type: 0 }), D.current = !0;
2665
- }), C = A(() => {
2666
- O({ type: 1 }), D.current = !1, g == null || g();
2667
- }), J = A((_) => {
2668
- O({ type: 3, isTyping: _ });
2669
- }), K = A((_, H, le) => (D.current = !1, _ === B.Specific ? O({ type: 2, focus: B.Specific, idx: H, trigger: le }) : O({ type: 2, focus: _, trigger: le }))), ie = A((_, H) => (O({ type: 4, payload: { id: _, dataRef: H } }), () => {
2670
- R.isActive(H.current.value) && (D.current = !0), O({ type: 5, id: _ });
2671
- })), W = A((_) => Te(R.mode, { 0() {
2672
- return y == null ? void 0 : y(_);
2664
+ }), Te = _(() => {
2665
+ C({ type: 0 }), $.current = !0;
2666
+ }), T = _(() => {
2667
+ C({ type: 1 }), $.current = !1, g == null || g();
2668
+ }), J = _((A) => {
2669
+ C({ type: 3, isTyping: A });
2670
+ }), q = _((A, H, le) => ($.current = !1, A === B.Specific ? C({ type: 2, focus: B.Specific, idx: H, trigger: le }) : C({ type: 2, focus: A, trigger: le }))), ie = _((A, H) => (C({ type: 4, payload: { id: A, dataRef: H } }), () => {
2671
+ R.isActive(H.current.value) && ($.current = !0), C({ type: 5, id: A });
2672
+ })), W = _((A) => Ie(R.mode, { 0() {
2673
+ return y == null ? void 0 : y(A);
2673
2674
  }, 1() {
2674
- let H = R.value.slice(), le = H.findIndex((Je) => z(Je, _));
2675
- return le === -1 ? H.push(_) : H.splice(le, 1), y == null ? void 0 : y(H);
2676
- } })), ne = A((_) => {
2677
- O({ type: 6, trigger: _ });
2678
- }), se = q(() => ({ onChange: W, registerOption: ie, goToOption: K, setIsTyping: J, closeCombobox: C, openCombobox: Ce, setActivationTrigger: ne, selectActiveOption: te }), []), [zn, kn] = to(), Hn = n === null ? {} : { ref: n }, Vn = He(() => {
2675
+ let H = R.value.slice(), le = H.findIndex((Xe) => I(Xe, A));
2676
+ return le === -1 ? H.push(A) : H.splice(le, 1), y == null ? void 0 : y(H);
2677
+ } })), ne = _((A) => {
2678
+ C({ type: 6, trigger: A });
2679
+ }), se = K(() => ({ onChange: W, registerOption: ie, goToOption: q, setIsTyping: J, closeCombobox: T, openCombobox: Te, setActivationTrigger: ne, selectActiveOption: te }), []), [kn, zn] = no(), Hn = n === null ? {} : { ref: n }, Vn = Ve(() => {
2679
2680
  if (b !== void 0) return y == null ? void 0 : y(b);
2680
2681
  }, [y, b]);
2681
- return j.createElement(kn, { value: zn, props: { htmlFor: (o = R.inputRef.current) == null ? void 0 : o.id }, slot: { open: R.comboboxState === 0, disabled: d } }, j.createElement(or, null, j.createElement(Dt.Provider, { value: se }, j.createElement(je.Provider, { value: R }, j.createElement(uo, { value: Te(R.comboboxState, { 0: et.Open, 1: et.Closed }) }, f != null && j.createElement(no, { disabled: d, data: x != null ? { [f]: x } : {}, form: a, onReset: Vn }), xe({ ourProps: Hn, theirProps: w, slot: I, defaultTag: Pr, name: "Combobox" }))))));
2682
+ return j.createElement(zn, { value: kn, props: { htmlFor: (o = R.inputRef.current) == null ? void 0 : o.id }, slot: { open: R.comboboxState === 0, disabled: f } }, j.createElement(ir, null, j.createElement(Pt.Provider, { value: se }, j.createElement(Ue.Provider, { value: R }, j.createElement(fo, { value: Ie(R.comboboxState, { 0: et.Open, 1: et.Closed }) }, d != null && j.createElement(oo, { disabled: f, data: x != null ? { [d]: x } : {}, form: a, onReset: Vn }), xe({ ourProps: Hn, theirProps: w, slot: M, defaultTag: Ar, name: "Combobox" }))))));
2682
2683
  }
2683
- let _r = "input";
2684
- function Dr(e, n) {
2684
+ let Dr = "input";
2685
+ function $r(e, n) {
2685
2686
  var t, o, i, r, l;
2686
- let s = $e("Combobox.Input"), a = Ge("Combobox.Input"), f = Ue(), u = oo(), { id: d = u || `headlessui-combobox-input-${f}`, onChange: g, displayValue: c, disabled: m = s.disabled || !1, autoFocus: p = !1, type: h = "text", ...v } = e, w = Oe(s.inputRef, n, er()), b = st(s.inputRef), x = cn(), y = A(() => {
2687
+ let s = Le("Combobox.Input"), a = Je("Combobox.Input"), d = Ye(), u = io(), { id: f = u || `headlessui-combobox-input-${d}`, onChange: g, displayValue: c, disabled: m = s.disabled || !1, autoFocus: p = !1, type: h = "text", ...v } = e, w = Ce(s.inputRef, n, tr()), b = st(s.inputRef), x = cn(), y = _(() => {
2687
2688
  a.onChange(null), s.optionsRef.current && (s.optionsRef.current.scrollTop = 0), a.goToOption(B.Nothing);
2688
- }), S = q(() => {
2689
- var C;
2690
- return typeof c == "function" && s.value !== void 0 ? (C = c(s.value)) != null ? C : "" : typeof s.value == "string" ? s.value : "";
2689
+ }), O = K(() => {
2690
+ var T;
2691
+ return typeof c == "function" && s.value !== void 0 ? (T = c(s.value)) != null ? T : "" : typeof s.value == "string" ? s.value : "";
2691
2692
  }, [s.value, c]);
2692
- jt(([C, J], [K, ie]) => {
2693
+ jt(([T, J], [q, ie]) => {
2693
2694
  if (s.isTyping) return;
2694
2695
  let W = s.inputRef.current;
2695
- W && ((ie === 0 && J === 1 || C !== K) && (W.value = C), requestAnimationFrame(() => {
2696
+ W && ((ie === 0 && J === 1 || T !== q) && (W.value = T), requestAnimationFrame(() => {
2696
2697
  if (s.isTyping || !W || (b == null ? void 0 : b.activeElement) !== W) return;
2697
2698
  let { selectionStart: ne, selectionEnd: se } = W;
2698
2699
  Math.abs((se ?? 0) - (ne ?? 0)) === 0 && ne === 0 && W.setSelectionRange(W.value.length, W.value.length);
2699
2700
  }));
2700
- }, [S, s.comboboxState, b, s.isTyping]), jt(([C], [J]) => {
2701
- if (C === 0 && J === 1) {
2701
+ }, [O, s.comboboxState, b, s.isTyping]), jt(([T], [J]) => {
2702
+ if (T === 0 && J === 1) {
2702
2703
  if (s.isTyping) return;
2703
- let K = s.inputRef.current;
2704
- if (!K) return;
2705
- let ie = K.value, { selectionStart: W, selectionEnd: ne, selectionDirection: se } = K;
2706
- K.value = "", K.value = ie, se !== null ? K.setSelectionRange(W, ne, se) : K.setSelectionRange(W, ne);
2704
+ let q = s.inputRef.current;
2705
+ if (!q) return;
2706
+ let ie = q.value, { selectionStart: W, selectionEnd: ne, selectionDirection: se } = q;
2707
+ q.value = "", q.value = ie, se !== null ? q.setSelectionRange(W, ne, se) : q.setSelectionRange(W, ne);
2707
2708
  }
2708
2709
  }, [s.comboboxState]);
2709
- let O = Y(!1), D = A(() => {
2710
- O.current = !0;
2711
- }), N = A(() => {
2710
+ let C = Y(!1), $ = _(() => {
2711
+ C.current = !0;
2712
+ }), N = _(() => {
2712
2713
  x.nextFrame(() => {
2713
- O.current = !1;
2714
+ C.current = !1;
2714
2715
  });
2715
- }), M = A((C) => {
2716
- switch (a.setIsTyping(!0), C.key) {
2716
+ }), F = _((T) => {
2717
+ switch (a.setIsTyping(!0), T.key) {
2717
2718
  case X.Enter:
2718
- if (s.comboboxState !== 0 || O.current) return;
2719
- if (C.preventDefault(), C.stopPropagation(), s.activeOptionIndex === null) {
2719
+ if (s.comboboxState !== 0 || C.current) return;
2720
+ if (T.preventDefault(), T.stopPropagation(), s.activeOptionIndex === null) {
2720
2721
  a.closeCombobox();
2721
2722
  return;
2722
2723
  }
2723
2724
  a.selectActiveOption(), s.mode === 0 && a.closeCombobox();
2724
2725
  break;
2725
2726
  case X.ArrowDown:
2726
- return C.preventDefault(), C.stopPropagation(), Te(s.comboboxState, { 0: () => a.goToOption(B.Next), 1: () => a.openCombobox() });
2727
+ return T.preventDefault(), T.stopPropagation(), Ie(s.comboboxState, { 0: () => a.goToOption(B.Next), 1: () => a.openCombobox() });
2727
2728
  case X.ArrowUp:
2728
- return C.preventDefault(), C.stopPropagation(), Te(s.comboboxState, { 0: () => a.goToOption(B.Previous), 1: () => {
2729
- ye(() => a.openCombobox()), s.value || a.goToOption(B.Last);
2729
+ return T.preventDefault(), T.stopPropagation(), Ie(s.comboboxState, { 0: () => a.goToOption(B.Previous), 1: () => {
2730
+ Ee(() => a.openCombobox()), s.value || a.goToOption(B.Last);
2730
2731
  } });
2731
2732
  case X.Home:
2732
- if (C.shiftKey) break;
2733
- return C.preventDefault(), C.stopPropagation(), a.goToOption(B.First);
2733
+ if (T.shiftKey) break;
2734
+ return T.preventDefault(), T.stopPropagation(), a.goToOption(B.First);
2734
2735
  case X.PageUp:
2735
- return C.preventDefault(), C.stopPropagation(), a.goToOption(B.First);
2736
+ return T.preventDefault(), T.stopPropagation(), a.goToOption(B.First);
2736
2737
  case X.End:
2737
- if (C.shiftKey) break;
2738
- return C.preventDefault(), C.stopPropagation(), a.goToOption(B.Last);
2738
+ if (T.shiftKey) break;
2739
+ return T.preventDefault(), T.stopPropagation(), a.goToOption(B.Last);
2739
2740
  case X.PageDown:
2740
- return C.preventDefault(), C.stopPropagation(), a.goToOption(B.Last);
2741
+ return T.preventDefault(), T.stopPropagation(), a.goToOption(B.Last);
2741
2742
  case X.Escape:
2742
- return s.comboboxState !== 0 ? void 0 : (C.preventDefault(), s.optionsRef.current && !s.optionsPropsRef.current.static && C.stopPropagation(), s.mode === 0 && s.value === null && y(), a.closeCombobox());
2743
+ return s.comboboxState !== 0 ? void 0 : (T.preventDefault(), s.optionsRef.current && !s.optionsPropsRef.current.static && T.stopPropagation(), s.mode === 0 && s.value === null && y(), a.closeCombobox());
2743
2744
  case X.Tab:
2744
2745
  if (s.comboboxState !== 0) return;
2745
2746
  s.mode === 0 && s.activationTrigger !== 1 && a.selectActiveOption(), a.closeCombobox();
2746
2747
  break;
2747
2748
  }
2748
- }), T = A((C) => {
2749
- g == null || g(C), s.mode === 0 && C.target.value === "" && y(), a.openCombobox();
2750
- }), $ = A((C) => {
2751
- var J, K, ie;
2752
- let W = (J = C.relatedTarget) != null ? J : we.find((ne) => ne !== C.currentTarget);
2753
- if (!((K = s.optionsRef.current) != null && K.contains(W)) && !((ie = s.buttonRef.current) != null && ie.contains(W)) && s.comboboxState === 0) return C.preventDefault(), s.mode === 0 && s.value === null && y(), a.closeCombobox();
2754
- }), z = A((C) => {
2755
- var J, K, ie;
2756
- let W = (J = C.relatedTarget) != null ? J : we.find((ne) => ne !== C.currentTarget);
2757
- (K = s.buttonRef.current) != null && K.contains(W) || (ie = s.optionsRef.current) != null && ie.contains(W) || s.disabled || s.immediate && s.comboboxState !== 0 && x.microTask(() => {
2758
- ye(() => a.openCombobox()), a.setActivationTrigger(1);
2749
+ }), D = _((T) => {
2750
+ g == null || g(T), s.mode === 0 && T.target.value === "" && y(), a.openCombobox();
2751
+ }), k = _((T) => {
2752
+ var J, q, ie;
2753
+ let W = (J = T.relatedTarget) != null ? J : ye.find((ne) => ne !== T.currentTarget);
2754
+ if (!((q = s.optionsRef.current) != null && q.contains(W)) && !((ie = s.buttonRef.current) != null && ie.contains(W)) && s.comboboxState === 0) return T.preventDefault(), s.mode === 0 && s.value === null && y(), a.closeCombobox();
2755
+ }), I = _((T) => {
2756
+ var J, q, ie;
2757
+ let W = (J = T.relatedTarget) != null ? J : ye.find((ne) => ne !== T.currentTarget);
2758
+ (q = s.buttonRef.current) != null && q.contains(W) || (ie = s.optionsRef.current) != null && ie.contains(W) || s.disabled || s.immediate && s.comboboxState !== 0 && x.microTask(() => {
2759
+ Ee(() => a.openCombobox()), a.setActivationTrigger(1);
2759
2760
  });
2760
- }), P = Ct(), L = io(), { isFocused: V, focusProps: R } = un({ autoFocus: p }), { isHovered: k, hoverProps: I } = fn({ isDisabled: m }), te = q(() => ({ open: s.comboboxState === 0, disabled: m, hover: k, focus: V, autofocus: p }), [s, k, V, p, m]), Ce = Ot({ ref: w, id: d, role: "combobox", type: h, "aria-controls": (t = s.optionsRef.current) == null ? void 0 : t.id, "aria-expanded": s.comboboxState === 0, "aria-activedescendant": s.activeOptionIndex === null ? void 0 : s.virtual ? (o = s.options.find((C) => !C.dataRef.current.disabled && s.compare(C.dataRef.current.value, s.virtual.options[s.activeOptionIndex]))) == null ? void 0 : o.id : (i = s.options[s.activeOptionIndex]) == null ? void 0 : i.id, "aria-labelledby": P, "aria-describedby": L, "aria-autocomplete": "list", defaultValue: (l = (r = e.defaultValue) != null ? r : s.defaultValue !== void 0 ? c == null ? void 0 : c(s.defaultValue) : null) != null ? l : s.defaultValue, disabled: m || void 0, autoFocus: p, onCompositionStart: D, onCompositionEnd: N, onKeyDown: M, onChange: T, onFocus: z, onBlur: $ }, R, I);
2761
- return xe({ ourProps: Ce, theirProps: v, slot: te, defaultTag: _r, name: "Combobox.Input" });
2761
+ }), S = Ot(), L = ro(), { isFocused: V, focusProps: R } = un({ autoFocus: p }), { isHovered: z, hoverProps: M } = dn({ isDisabled: m }), te = K(() => ({ open: s.comboboxState === 0, disabled: m, hover: z, focus: V, autofocus: p }), [s, z, V, p, m]), Te = St({ ref: w, id: f, role: "combobox", type: h, "aria-controls": (t = s.optionsRef.current) == null ? void 0 : t.id, "aria-expanded": s.comboboxState === 0, "aria-activedescendant": s.activeOptionIndex === null ? void 0 : s.virtual ? (o = s.options.find((T) => !T.dataRef.current.disabled && s.compare(T.dataRef.current.value, s.virtual.options[s.activeOptionIndex]))) == null ? void 0 : o.id : (i = s.options[s.activeOptionIndex]) == null ? void 0 : i.id, "aria-labelledby": S, "aria-describedby": L, "aria-autocomplete": "list", defaultValue: (l = (r = e.defaultValue) != null ? r : s.defaultValue !== void 0 ? c == null ? void 0 : c(s.defaultValue) : null) != null ? l : s.defaultValue, disabled: m || void 0, autoFocus: p, onCompositionStart: $, onCompositionEnd: N, onKeyDown: F, onChange: D, onFocus: I, onBlur: k }, R, M);
2762
+ return xe({ ourProps: Te, theirProps: v, slot: te, defaultTag: Dr, name: "Combobox.Input" });
2762
2763
  }
2763
- let $r = "button";
2764
- function Lr(e, n) {
2764
+ let Lr = "button";
2765
+ function Fr(e, n) {
2765
2766
  var t;
2766
- let o = $e("Combobox.Button"), i = Ge("Combobox.Button"), r = Oe(o.buttonRef, n), l = Ue(), { id: s = `headlessui-combobox-button-${l}`, disabled: a = o.disabled || !1, autoFocus: f = !1, ...u } = e, d = vn(o.inputRef), g = A((O) => {
2767
- switch (O.key) {
2767
+ let o = Le("Combobox.Button"), i = Je("Combobox.Button"), r = Ce(o.buttonRef, n), l = Ye(), { id: s = `headlessui-combobox-button-${l}`, disabled: a = o.disabled || !1, autoFocus: d = !1, ...u } = e, f = vn(o.inputRef), g = _((C) => {
2768
+ switch (C.key) {
2768
2769
  case X.Space:
2769
2770
  case X.Enter:
2770
- O.preventDefault(), O.stopPropagation(), o.comboboxState === 1 && ye(() => i.openCombobox()), d();
2771
+ C.preventDefault(), C.stopPropagation(), o.comboboxState === 1 && Ee(() => i.openCombobox()), f();
2771
2772
  return;
2772
2773
  case X.ArrowDown:
2773
- O.preventDefault(), O.stopPropagation(), o.comboboxState === 1 && (ye(() => i.openCombobox()), o.value || i.goToOption(B.First)), d();
2774
+ C.preventDefault(), C.stopPropagation(), o.comboboxState === 1 && (Ee(() => i.openCombobox()), o.value || i.goToOption(B.First)), f();
2774
2775
  return;
2775
2776
  case X.ArrowUp:
2776
- O.preventDefault(), O.stopPropagation(), o.comboboxState === 1 && (ye(() => i.openCombobox()), o.value || i.goToOption(B.Last)), d();
2777
+ C.preventDefault(), C.stopPropagation(), o.comboboxState === 1 && (Ee(() => i.openCombobox()), o.value || i.goToOption(B.Last)), f();
2777
2778
  return;
2778
2779
  case X.Escape:
2779
2780
  if (o.comboboxState !== 0) return;
2780
- O.preventDefault(), o.optionsRef.current && !o.optionsPropsRef.current.static && O.stopPropagation(), ye(() => i.closeCombobox()), d();
2781
+ C.preventDefault(), o.optionsRef.current && !o.optionsPropsRef.current.static && C.stopPropagation(), Ee(() => i.closeCombobox()), f();
2781
2782
  return;
2782
2783
  default:
2783
2784
  return;
2784
2785
  }
2785
- }), c = A((O) => {
2786
- O.preventDefault(), !ho(O.currentTarget) && (O.button === _t.Left && (o.comboboxState === 0 ? i.closeCombobox() : i.openCombobox()), d());
2787
- }), m = Ct([s]), { isFocusVisible: p, focusProps: h } = un({ autoFocus: f }), { isHovered: v, hoverProps: w } = fn({ isDisabled: a }), { pressed: b, pressProps: x } = Gn({ disabled: a }), y = q(() => ({ open: o.comboboxState === 0, active: b || o.comboboxState === 0, disabled: a, value: o.value, hover: v, focus: p }), [o, v, p, b, a]), S = Ot({ ref: r, id: s, type: co(e, o.buttonRef), tabIndex: -1, "aria-haspopup": "listbox", "aria-controls": (t = o.optionsRef.current) == null ? void 0 : t.id, "aria-expanded": o.comboboxState === 0, "aria-labelledby": m, disabled: a || void 0, autoFocus: f, onMouseDown: c, onKeyDown: g }, h, w, x);
2788
- return xe({ ourProps: S, theirProps: u, slot: y, defaultTag: $r, name: "Combobox.Button" });
2786
+ }), c = _((C) => {
2787
+ C.preventDefault(), !go(C.currentTarget) && (C.button === At.Left && (o.comboboxState === 0 ? i.closeCombobox() : i.openCombobox()), f());
2788
+ }), m = Ot([s]), { isFocusVisible: p, focusProps: h } = un({ autoFocus: d }), { isHovered: v, hoverProps: w } = dn({ isDisabled: a }), { pressed: b, pressProps: x } = Jn({ disabled: a }), y = K(() => ({ open: o.comboboxState === 0, active: b || o.comboboxState === 0, disabled: a, value: o.value, hover: v, focus: p }), [o, v, p, b, a]), O = St({ ref: r, id: s, type: uo(e, o.buttonRef), tabIndex: -1, "aria-haspopup": "listbox", "aria-controls": (t = o.optionsRef.current) == null ? void 0 : t.id, "aria-expanded": o.comboboxState === 0, "aria-labelledby": m, disabled: a || void 0, autoFocus: d, onMouseDown: c, onKeyDown: g }, h, w, x);
2789
+ return xe({ ourProps: O, theirProps: u, slot: y, defaultTag: Lr, name: "Combobox.Button" });
2789
2790
  }
2790
- let Fr = "div", Nr = Nt.RenderStrategy | Nt.Static;
2791
+ let Nr = "div", kr = Nt.RenderStrategy | Nt.Static;
2791
2792
  function zr(e, n) {
2792
2793
  var t, o, i;
2793
- let r = Ue(), { id: l = `headlessui-combobox-options-${r}`, hold: s = !1, anchor: a, portal: f = !1, modal: u = !0, transition: d = !1, ...g } = e, c = $e("Combobox.Options"), m = Ge("Combobox.Options"), p = Zi(a);
2794
- p && (f = !0);
2795
- let [h, v] = nr(p), w = tr(), b = Oe(c.optionsRef, n, p ? h : null), x = st(c.optionsRef), y = fo(), [S, O] = po(d, c.optionsRef, y !== null ? (y & et.Open) === et.Open : c.comboboxState === 0);
2796
- $o(S, c.inputRef, m.closeCombobox);
2797
- let D = c.__demoMode ? !1 : u && c.comboboxState === 0;
2798
- jo(D, x);
2794
+ let r = Ye(), { id: l = `headlessui-combobox-options-${r}`, hold: s = !1, anchor: a, portal: d = !1, modal: u = !0, transition: f = !1, ...g } = e, c = Le("Combobox.Options"), m = Je("Combobox.Options"), p = er(a);
2795
+ p && (d = !0);
2796
+ let [h, v] = or(p), w = nr(), b = Ce(c.optionsRef, n, p ? h : null), x = st(c.optionsRef), y = po(), [O, C] = mo(f, c.optionsRef, y !== null ? (y & et.Open) === et.Open : c.comboboxState === 0);
2797
+ Lo(O, c.inputRef, m.closeCombobox);
2798
+ let $ = c.__demoMode ? !1 : u && c.comboboxState === 0;
2799
+ Uo($, x);
2799
2800
  let N = c.__demoMode ? !1 : u && c.comboboxState === 0;
2800
- Do(N, { allowed: A(() => [c.inputRef.current, c.buttonRef.current, c.optionsRef.current]) }), U(() => {
2801
- var I;
2802
- c.optionsPropsRef.current.static = (I = e.static) != null ? I : !1;
2801
+ $o(N, { allowed: _(() => [c.inputRef.current, c.buttonRef.current, c.optionsRef.current]) }), U(() => {
2802
+ var M;
2803
+ c.optionsPropsRef.current.static = (M = e.static) != null ? M : !1;
2803
2804
  }, [c.optionsPropsRef, e.static]), U(() => {
2804
2805
  c.optionsPropsRef.current.hold = s;
2805
- }, [c.optionsPropsRef, s]), Yo(c.comboboxState === 0, { container: c.optionsRef.current, accept(I) {
2806
- return I.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : I.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
2807
- }, walk(I) {
2808
- I.setAttribute("role", "none");
2806
+ }, [c.optionsPropsRef, s]), qo(c.comboboxState === 0, { container: c.optionsRef.current, accept(M) {
2807
+ return M.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : M.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
2808
+ }, walk(M) {
2809
+ M.setAttribute("role", "none");
2809
2810
  } });
2810
- let M = Ct([(t = c.buttonRef.current) == null ? void 0 : t.id]), T = q(() => ({ open: c.comboboxState === 0, option: void 0 }), [c.comboboxState]), $ = A(() => {
2811
+ let F = Ot([(t = c.buttonRef.current) == null ? void 0 : t.id]), D = K(() => ({ open: c.comboboxState === 0, option: void 0 }), [c.comboboxState]), k = _(() => {
2811
2812
  m.setActivationTrigger(0);
2812
- }), z = A((I) => {
2813
- I.preventDefault(), m.setActivationTrigger(0);
2814
- }), P = Ot(p ? w() : {}, { "aria-labelledby": M, role: "listbox", "aria-multiselectable": c.mode === 1 ? !0 : void 0, id: l, ref: b, style: { ...g.style, ...v, "--input-width": kt(c.inputRef, !0).width, "--button-width": kt(c.buttonRef, !0).width }, onWheel: c.activationTrigger === 0 ? void 0 : $, onMouseDown: z, ...mo(O) }), L = S && c.comboboxState === 1, V = yt(L, (o = c.virtual) == null ? void 0 : o.options), R = yt(L, c.value), k = A((I) => c.compare(R, I));
2813
+ }), I = _((M) => {
2814
+ M.preventDefault(), m.setActivationTrigger(0);
2815
+ }), S = St(p ? w() : {}, { "aria-labelledby": F, role: "listbox", "aria-multiselectable": c.mode === 1 ? !0 : void 0, id: l, ref: b, style: { ...g.style, ...v, "--input-width": zt(c.inputRef, !0).width, "--button-width": zt(c.buttonRef, !0).width }, onWheel: c.activationTrigger === 0 ? void 0 : k, onMouseDown: I, ...ho(C) }), L = O && c.comboboxState === 1, V = wt(L, (o = c.virtual) == null ? void 0 : o.options), R = wt(L, c.value), z = _((M) => c.compare(R, M));
2815
2816
  if (c.virtual) {
2816
2817
  if (V === void 0) throw new Error("Missing `options` in virtual mode");
2817
- Object.assign(g, { children: j.createElement(je.Provider, { value: V !== c.virtual.options ? { ...c, virtual: { ...c.virtual, options: V } } : c }, j.createElement(Ir, { slot: T }, g.children)) });
2818
+ Object.assign(g, { children: j.createElement(Ue.Provider, { value: V !== c.virtual.options ? { ...c, virtual: { ...c.virtual, options: V } } : c }, j.createElement(Mr, { slot: D }, g.children)) });
2818
2819
  }
2819
- return j.createElement(Er, { enabled: f ? e.static || S : !1 }, j.createElement(je.Provider, { value: c.mode === 1 ? c : { ...c, isSelected: k } }, xe({ ourProps: P, theirProps: { ...g, children: j.createElement(sr, { freeze: L }, typeof g.children == "function" ? (i = g.children) == null ? void 0 : i.call(g, T) : g.children) }, slot: T, defaultTag: Fr, features: Nr, visible: S, name: "Combobox.Options" })));
2820
+ return j.createElement(Rr, { enabled: d ? e.static || O : !1 }, j.createElement(Ue.Provider, { value: c.mode === 1 ? c : { ...c, isSelected: z } }, xe({ ourProps: S, theirProps: { ...g, children: j.createElement(lr, { freeze: L }, typeof g.children == "function" ? (i = g.children) == null ? void 0 : i.call(g, D) : g.children) }, slot: D, defaultTag: Nr, features: kr, visible: O, name: "Combobox.Options" })));
2820
2821
  }
2821
- let kr = "div";
2822
- function Hr(e, n) {
2822
+ let Hr = "div";
2823
+ function Vr(e, n) {
2823
2824
  var t, o, i, r;
2824
- let l = $e("Combobox.Option"), s = Ge("Combobox.Option"), a = Ue(), { id: f = `headlessui-combobox-option-${a}`, value: u, disabled: d = (i = (o = (t = l.virtual) == null ? void 0 : t.disabled) == null ? void 0 : o.call(t, u)) != null ? i : !1, order: g = null, ...c } = e, m = vn(l.inputRef), p = l.virtual ? l.activeOptionIndex === l.calculateIndex(u) : l.activeOptionIndex === null ? !1 : ((r = l.options[l.activeOptionIndex]) == null ? void 0 : r.id) === f, h = l.isSelected(u), v = Y(null), w = Ae({ disabled: d, value: u, domRef: v, order: g }), b = ae(Ln), x = Oe(n, v, b ? b.measureElement : null), y = A(() => {
2825
+ let l = Le("Combobox.Option"), s = Je("Combobox.Option"), a = Ye(), { id: d = `headlessui-combobox-option-${a}`, value: u, disabled: f = (i = (o = (t = l.virtual) == null ? void 0 : t.disabled) == null ? void 0 : o.call(t, u)) != null ? i : !1, order: g = null, ...c } = e, m = vn(l.inputRef), p = l.virtual ? l.activeOptionIndex === l.calculateIndex(u) : l.activeOptionIndex === null ? !1 : ((r = l.options[l.activeOptionIndex]) == null ? void 0 : r.id) === d, h = l.isSelected(u), v = Y(null), w = Pe({ disabled: f, value: u, domRef: v, order: g }), b = ce(Ln), x = Ce(n, v, b ? b.measureElement : null), y = _(() => {
2825
2826
  s.setIsTyping(!1), s.onChange(u);
2826
2827
  });
2827
- U(() => s.registerOption(f, w), [w, f]);
2828
- let S = Y(!(l.virtual || l.__demoMode));
2828
+ U(() => s.registerOption(d, w), [w, d]);
2829
+ let O = Y(!(l.virtual || l.__demoMode));
2829
2830
  U(() => {
2830
- if (!l.virtual && !l.__demoMode) return Me().requestAnimationFrame(() => {
2831
- S.current = !0;
2831
+ if (!l.virtual && !l.__demoMode) return _e().requestAnimationFrame(() => {
2832
+ O.current = !0;
2832
2833
  });
2833
2834
  }, [l.virtual, l.__demoMode]), U(() => {
2834
- if (S.current && l.comboboxState === 0 && p && l.activationTrigger !== 0) return Me().requestAnimationFrame(() => {
2835
- var P, L;
2836
- (L = (P = v.current) == null ? void 0 : P.scrollIntoView) == null || L.call(P, { block: "nearest" });
2835
+ if (O.current && l.comboboxState === 0 && p && l.activationTrigger !== 0) return _e().requestAnimationFrame(() => {
2836
+ var S, L;
2837
+ (L = (S = v.current) == null ? void 0 : S.scrollIntoView) == null || L.call(S, { block: "nearest" });
2837
2838
  });
2838
2839
  }, [v, p, l.comboboxState, l.activationTrigger, l.activeOptionIndex]);
2839
- let O = A((P) => {
2840
- P.preventDefault(), P.button === _t.Left && (d || (y(), gn() || requestAnimationFrame(() => m()), l.mode === 0 && s.closeCombobox()));
2841
- }), D = A(() => {
2842
- if (d) return s.goToOption(B.Nothing);
2843
- let P = l.calculateIndex(u);
2844
- s.goToOption(B.Specific, P);
2845
- }), N = Uo(), M = A((P) => N.update(P)), T = A((P) => {
2846
- if (!N.wasMoved(P) || d || p) return;
2840
+ let C = _((S) => {
2841
+ S.preventDefault(), S.button === At.Left && (f || (y(), gn() || requestAnimationFrame(() => m()), l.mode === 0 && s.closeCombobox()));
2842
+ }), $ = _(() => {
2843
+ if (f) return s.goToOption(B.Nothing);
2844
+ let S = l.calculateIndex(u);
2845
+ s.goToOption(B.Specific, S);
2846
+ }), N = Yo(), F = _((S) => N.update(S)), D = _((S) => {
2847
+ if (!N.wasMoved(S) || f || p) return;
2847
2848
  let L = l.calculateIndex(u);
2848
2849
  s.goToOption(B.Specific, L, 0);
2849
- }), $ = A((P) => {
2850
- N.wasMoved(P) && (d || p && (l.optionsPropsRef.current.hold || s.goToOption(B.Nothing)));
2851
- }), z = q(() => ({ active: p, focus: p, selected: h, disabled: d }), [p, h, d]);
2852
- return xe({ ourProps: { id: f, ref: x, role: "option", tabIndex: d === !0 ? void 0 : -1, "aria-disabled": d === !0 ? !0 : void 0, "aria-selected": h, disabled: void 0, onMouseDown: O, onFocus: D, onPointerEnter: M, onMouseEnter: M, onPointerMove: T, onMouseMove: T, onPointerLeave: $, onMouseLeave: $ }, theirProps: c, slot: z, defaultTag: kr, name: "Combobox.Option" });
2853
- }
2854
- let Vr = be(Ar), Et = be(Lr), Rt = be(Dr), Wr = Xn, Fn = be(zr), Nn = be(Hr), Br = Object.assign(Vr, { Input: Rt, Button: Et, Label: Wr, Options: Fn, Option: Nn });
2855
- const jr = "_disabled_a63ul_5", Ur = "_container_a63ul_9", Yr = "_full_a63ul_22", Kr = "_button_a63ul_34", qr = "_options_a63ul_52", Gr = "_top_a63ul_63", Jr = "_bottom_a63ul_68", Xr = "_m_a63ul_95", Qr = "_l_a63ul_108", Zr = "_option_a63ul_52", F = {
2856
- "select-search": "_select-search_a63ul_2",
2857
- disabled: jr,
2858
- container: Ur,
2859
- "container-open": "_container-open_a63ul_18",
2860
- full: Yr,
2861
- "selected-icon": "_selected-icon_a63ul_26",
2862
- "selector-icon-open": "_selector-icon-open_a63ul_30",
2850
+ }), k = _((S) => {
2851
+ N.wasMoved(S) && (f || p && (l.optionsPropsRef.current.hold || s.goToOption(B.Nothing)));
2852
+ }), I = K(() => ({ active: p, focus: p, selected: h, disabled: f }), [p, h, f]);
2853
+ return xe({ ourProps: { id: d, ref: x, role: "option", tabIndex: f === !0 ? void 0 : -1, "aria-disabled": f === !0 ? !0 : void 0, "aria-selected": h, disabled: void 0, onMouseDown: C, onFocus: $, onPointerEnter: F, onMouseEnter: F, onPointerMove: D, onMouseMove: D, onPointerLeave: k, onMouseLeave: k }, theirProps: c, slot: I, defaultTag: Hr, name: "Combobox.Option" });
2854
+ }
2855
+ let Wr = be(Pr), yt = be(Fr), Et = be($r), Br = Qn, Fn = be(zr), Nn = be(Vr), jr = Object.assign(Wr, { Input: Et, Button: yt, Label: Br, Options: Fn, Option: Nn });
2856
+ const Ur = "_disabled_7p4d9_5", Yr = "_container_7p4d9_9", qr = "_full_7p4d9_22", Kr = "_button_7p4d9_34", Gr = "_options_7p4d9_48", Jr = "_top_7p4d9_59", Xr = "_bottom_7p4d9_64", Qr = "_m_7p4d9_91", Zr = "_l_7p4d9_105", es = "_option_7p4d9_48", ts = "_clear_7p4d9_154", P = {
2857
+ "select-search": "_select-search_7p4d9_2",
2858
+ disabled: Ur,
2859
+ container: Yr,
2860
+ "container-open": "_container-open_7p4d9_18",
2861
+ full: qr,
2862
+ "selected-icon": "_selected-icon_7p4d9_26",
2863
+ "selector-icon-open": "_selector-icon-open_7p4d9_30",
2863
2864
  button: Kr,
2864
- "selector-icon": "_selector-icon_a63ul_30",
2865
- options: qr,
2866
- top: Gr,
2867
- bottom: Jr,
2868
- "no-options": "_no-options_a63ul_89",
2869
- m: Xr,
2870
- l: Qr,
2871
- "custom-input-class": "_custom-input-class_a63ul_121",
2872
- option: Zr,
2873
- "option-active": "_option-active_a63ul_137",
2874
- "option-inner": "_option-inner_a63ul_140"
2875
- }, vs = jn(
2865
+ "selector-icon": "_selector-icon_7p4d9_30",
2866
+ options: Gr,
2867
+ top: Jr,
2868
+ bottom: Xr,
2869
+ "no-options": "_no-options_7p4d9_85",
2870
+ m: Qr,
2871
+ l: Zr,
2872
+ "custom-input-class": "_custom-input-class_7p4d9_119",
2873
+ option: es,
2874
+ "option-active": "_option-active_7p4d9_135",
2875
+ "option-inner": "_option-inner_7p4d9_138",
2876
+ "right-slot": "_right-slot_7p4d9_145",
2877
+ "required-mark": "_required-mark_7p4d9_149",
2878
+ clear: ts
2879
+ }, ws = jn(
2876
2880
  (e, n) => {
2877
2881
  const {
2878
2882
  placeholder: t,
2879
- size: o = Le.L,
2883
+ size: o = we.L,
2880
2884
  value: i,
2881
2885
  onChange: r,
2882
2886
  full: l,
2883
2887
  showArrow: s = !0,
2884
2888
  items: a = [],
2885
- classNameOption: f,
2889
+ classNameOption: d,
2886
2890
  displayValue: u = "name",
2887
- filterOnSearch: d = !0,
2891
+ filterOnSearch: f = !0,
2888
2892
  onSearch: g,
2889
- variant: c = Un.DefaultGray,
2893
+ variant: c = Yn.DefaultGray,
2890
2894
  menuPlacement: m = "bottom",
2891
2895
  disabled: p = !1,
2892
2896
  searchProps: h,
2893
2897
  withClearButton: v = !1,
2894
2898
  disableInput: w = !1
2895
- } = e, b = String((i == null ? void 0 : i[u]) || ""), [x, y] = ue(b), S = (M) => {
2896
- switch (M) {
2897
- case Le.M:
2898
- return ft.M;
2899
- case Le.L:
2900
- return ft.L;
2899
+ } = e, b = String((i == null ? void 0 : i[u]) || ""), [x, y] = ae(b), [O, C] = ae(i), $ = (I) => {
2900
+ switch (I) {
2901
+ case we.M:
2902
+ return ut.M;
2903
+ case we.L:
2904
+ return ut.L;
2901
2905
  default:
2902
- return ft.M;
2906
+ return ut.M;
2903
2907
  }
2904
- }, O = q(() => !d || i && (i.id || i.name) ? a : x.trim().toLowerCase() ? a.filter(
2905
- (M) => M.name.toLowerCase().includes(x.toLowerCase())
2906
- ) : a, [x, a, i, d]), D = (M) => {
2907
- M ? (y(M.name), r == null || r(M)) : (y(""), r == null || r({ id: "", name: "" }));
2908
- }, N = He(
2909
- (M) => {
2908
+ }, N = K(() => !f || i && (i.id || i.name) ? a : x.trim().toLowerCase() ? a.filter(
2909
+ (I) => I.name.toLowerCase().includes(x.toLowerCase())
2910
+ ) : a, [x, a, i, f]), F = (I) => {
2911
+ I ? (y(I.name), C(I), r == null || r(I)) : (y(""), C(null), r == null || r({ id: "", name: "" }));
2912
+ }, D = Ve(
2913
+ (I) => {
2910
2914
  if (w) return;
2911
- const T = M.target.value;
2912
- y(T), g == null || g(T), !T && i && (r == null || r({ id: "", name: "" }));
2915
+ const S = I.target.value;
2916
+ y(S), g == null || g(S), !S && i && (r == null || r({ id: "", name: "" }));
2913
2917
  },
2914
2918
  [w, r, g, i]
2915
- );
2919
+ ), k = () => {
2920
+ y(""), C(null), r == null || r({ id: "", name: "" });
2921
+ };
2916
2922
  return oe(() => {
2917
2923
  y(b);
2918
2924
  }, [b]), /* @__PURE__ */ Q(
2919
- Br,
2925
+ jr,
2920
2926
  {
2921
2927
  as: "div",
2922
- value: i,
2923
- className: de(F["select-search"], {
2924
- [F.full]: l,
2925
- [F.disabled]: p
2928
+ value: O,
2929
+ className: fe(P["select-search"], {
2930
+ [P.full]: l,
2931
+ [P.disabled]: p
2926
2932
  }),
2927
- onChange: D,
2933
+ onChange: F,
2928
2934
  ref: n,
2929
2935
  disabled: p,
2930
- virtual: { options: O },
2931
- children: ({ open: M }) => /* @__PURE__ */ Xe(ut, { children: [
2932
- /* @__PURE__ */ Xe(
2936
+ virtual: { options: N },
2937
+ children: ({ open: I }) => /* @__PURE__ */ Fe($t, { children: [
2938
+ /* @__PURE__ */ Fe(
2933
2939
  "div",
2934
2940
  {
2935
- className: de(F.container, F[o], {
2936
- [F["container-open"]]: M
2941
+ className: fe(P.container, P[o], {
2942
+ [P["container-open"]]: I
2937
2943
  }),
2938
2944
  children: [
2939
- w && /* @__PURE__ */ Q(Et, { disabled: p, style: { width: "100%" }, children: /* @__PURE__ */ Q(
2940
- Rt,
2945
+ w && /* @__PURE__ */ Fe("div", { style: { position: "relative", width: "100%" }, children: [
2946
+ /* @__PURE__ */ Q(yt, { disabled: p, style: { width: "100%" }, children: /* @__PURE__ */ Q(
2947
+ Et,
2948
+ {
2949
+ as: Ft,
2950
+ label: t,
2951
+ size: $(o),
2952
+ className: P["custom-input-class"],
2953
+ onChange: D,
2954
+ value: x,
2955
+ disabled: p,
2956
+ variant: c,
2957
+ rightSlotClassName: P["right-slot"],
2958
+ requiredMarkClassName: P["required-mark"],
2959
+ "data-testid": "select-search-input",
2960
+ onFocus: (S) => {
2961
+ w && S.target.blur();
2962
+ },
2963
+ rightAddon: {
2964
+ addonType: "icon",
2965
+ addonContent: I ? o === we.M ? "DropdownArrowUp16px" : "DropdownArrowUp24px" : o === we.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px"
2966
+ },
2967
+ ...h
2968
+ }
2969
+ ) }),
2970
+ v && x && /* @__PURE__ */ Q(
2971
+ Un,
2972
+ {
2973
+ tabIndex: -1,
2974
+ className: P.clear,
2975
+ isIconButton: !0,
2976
+ iconName: "Close16px",
2977
+ size: "m-s",
2978
+ clear: !0,
2979
+ disabled: p,
2980
+ variant: "secondary-gray",
2981
+ onClick: (S) => {
2982
+ S.stopPropagation(), k();
2983
+ },
2984
+ "data-testid": "clear-button"
2985
+ }
2986
+ )
2987
+ ] }),
2988
+ !w && /* @__PURE__ */ Q(
2989
+ Et,
2941
2990
  {
2942
2991
  as: Ft,
2943
2992
  label: t,
2944
- size: S(o),
2945
- className: F["custom-input-class"],
2946
- onChange: N,
2993
+ size: $(o),
2994
+ className: P["custom-input-class"],
2995
+ onChange: D,
2947
2996
  value: x,
2948
2997
  disabled: p,
2949
2998
  variant: c,
2950
2999
  withClearButton: v,
3000
+ rightSlotClassName: P["right-slot"],
3001
+ requiredMarkClassName: P["required-mark"],
2951
3002
  "data-testid": "select-search-input",
2952
- onFocus: (T) => {
2953
- w && T.target.blur();
2954
- },
2955
3003
  rightAddon: {
2956
- addonType: "icon",
2957
- addonContent: M ? "DropdownArrowUp16px" : "DropdownArrowBottom16px"
3004
+ addonType: "react-node",
3005
+ addonContent: s && /* @__PURE__ */ Q(
3006
+ yt,
3007
+ {
3008
+ className: fe(P.button, {
3009
+ [P.disabled]: p
3010
+ }),
3011
+ disabled: p,
3012
+ children: /* @__PURE__ */ Q(
3013
+ Lt,
3014
+ {
3015
+ iconName: o == we.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
3016
+ className: fe(P["selector-icon"], {
3017
+ [P["selector-icon-open"]]: I
3018
+ })
3019
+ }
3020
+ )
3021
+ }
3022
+ )
2958
3023
  },
2959
- ...h
2960
- }
2961
- ) }),
2962
- !w && /* @__PURE__ */ Q(
2963
- Rt,
2964
- {
2965
- as: Ft,
2966
- label: t,
2967
- size: S(o),
2968
- className: F["custom-input-class"],
2969
- onChange: N,
2970
- value: x,
2971
- disabled: p,
2972
- variant: c,
2973
- withClearButton: v,
2974
- "data-testid": "select-search-input",
2975
- onFocus: (T) => {
2976
- w && T.target.blur();
3024
+ onFocus: (S) => {
3025
+ w && S.target.blur();
2977
3026
  },
2978
3027
  ...h
2979
3028
  }
2980
- ),
2981
- s && !w && /* @__PURE__ */ Q(
2982
- Et,
2983
- {
2984
- className: de(F.button, {
2985
- [F.disabled]: p
2986
- }),
2987
- disabled: p,
2988
- children: /* @__PURE__ */ Q(
2989
- Lt,
2990
- {
2991
- iconName: o == Le.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
2992
- className: de(F["selector-icon"], {
2993
- [F["selector-icon-open"]]: M
2994
- })
2995
- }
2996
- )
2997
- }
2998
3029
  )
2999
3030
  ]
3000
3031
  }
3001
3032
  ),
3002
- M && /* @__PURE__ */ Q(ut, { children: a.length ? O.length ? /* @__PURE__ */ Q(
3033
+ I && /* @__PURE__ */ Q($t, { children: a.length ? N.length ? /* @__PURE__ */ Q(
3003
3034
  Fn,
3004
3035
  {
3005
3036
  "data-testid": "select-search-options",
3006
- className: de(
3007
- F.options,
3008
- F[o],
3009
- F[m]
3037
+ className: fe(
3038
+ P.options,
3039
+ P[o],
3040
+ P[m]
3010
3041
  ),
3011
- children: ({ option: T }) => /* @__PURE__ */ Q(
3042
+ children: ({ option: S }) => /* @__PURE__ */ Fe(
3012
3043
  Nn,
3013
3044
  {
3014
- value: T,
3015
- className: ({ focus: $ }) => de(
3016
- F.option,
3017
- f,
3018
- o && F[o],
3045
+ value: S,
3046
+ className: ({ focus: L }) => fe(
3047
+ P.option,
3048
+ d,
3049
+ o && P[o],
3019
3050
  {
3020
- [F["option-active"]]: $
3051
+ [P["option-active"]]: L
3021
3052
  }
3022
3053
  ),
3023
- "data-testid": `select-search-option-${T.id}`,
3024
- children: ({ selected: $ }) => /* @__PURE__ */ Xe(ut, { children: [
3025
- /* @__PURE__ */ Xe("div", { className: F["option-inner"], children: [
3026
- T.name,
3027
- T.bottom && /* @__PURE__ */ Q("div", { children: T.bottom })
3054
+ "data-testid": `select-search-option-${S.id}`,
3055
+ children: [
3056
+ /* @__PURE__ */ Fe("div", { className: P["option-inner"], children: [
3057
+ S.name,
3058
+ S.bottom && /* @__PURE__ */ Q("div", { children: S.bottom })
3028
3059
  ] }),
3029
- $ && /* @__PURE__ */ Q(
3060
+ O && O.id === S.id && /* @__PURE__ */ Q(
3030
3061
  Lt,
3031
3062
  {
3032
- iconName: o === Le.M ? "Done16px" : "Done24px",
3033
- className: F["selected-icon"]
3063
+ iconName: o === we.M ? "Done16px" : "Done24px",
3064
+ className: P["selected-icon"]
3034
3065
  }
3035
3066
  )
3036
- ] })
3067
+ ]
3037
3068
  },
3038
- T.id
3069
+ S.id
3039
3070
  )
3040
3071
  }
3041
3072
  ) : /* @__PURE__ */ Q(
3042
3073
  "div",
3043
3074
  {
3044
- className: de(
3045
- F.options,
3046
- F[o],
3047
- F["no-options"]
3075
+ className: fe(
3076
+ P.options,
3077
+ P[o],
3078
+ P["no-options"]
3048
3079
  ),
3049
3080
  children: "Ничего не найдено"
3050
3081
  }
3051
3082
  ) : /* @__PURE__ */ Q(
3052
3083
  "div",
3053
3084
  {
3054
- className: de(
3055
- F.options,
3056
- F[o],
3057
- F["no-options"]
3085
+ className: fe(
3086
+ P.options,
3087
+ P[o],
3088
+ P["no-options"]
3058
3089
  ),
3059
3090
  children: "Нет данных"
3060
3091
  }
@@ -3065,5 +3096,5 @@ const jr = "_disabled_a63ul_5", Ur = "_container_a63ul_9", Yr = "_full_a63ul_22"
3065
3096
  }
3066
3097
  );
3067
3098
  export {
3068
- vs as SelectSearch
3099
+ ws as SelectSearch
3069
3100
  };