glyphx 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import * as i from "react";
2
- import De, { useEffect as Te, useState as vn, useRef as It } from "react";
3
- import * as pn from "react-dom";
4
- import mn from "react-dom";
5
- function hn(e) {
2
+ import De, { useEffect as Te, useState as mn, useRef as Dt, memo as hn } from "react";
3
+ import * as gn from "react-dom";
4
+ import yn from "react-dom";
5
+ function bn(e) {
6
6
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
7
7
  }
8
- var Me = { exports: {} }, Ae = {};
8
+ var Me = { exports: {} }, Ie = {};
9
9
  var vt;
10
- function gn() {
11
- if (vt) return Ae;
10
+ function En() {
11
+ if (vt) return Ie;
12
12
  vt = 1;
13
13
  var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
14
14
  function n(r, o, a) {
@@ -26,11 +26,11 @@ function gn() {
26
26
  props: a
27
27
  };
28
28
  }
29
- return Ae.Fragment = t, Ae.jsx = n, Ae.jsxs = n, Ae;
29
+ return Ie.Fragment = t, Ie.jsx = n, Ie.jsxs = n, Ie;
30
30
  }
31
- var Ie = {};
31
+ var Ae = {};
32
32
  var pt;
33
- function yn() {
33
+ function xn() {
34
34
  return pt || (pt = 1, process.env.NODE_ENV !== "production" && (function() {
35
35
  function e(f) {
36
36
  if (f == null) return null;
@@ -46,7 +46,7 @@ function yn() {
46
46
  return "StrictMode";
47
47
  case X:
48
48
  return "Suspense";
49
- case A:
49
+ case I:
50
50
  return "SuspenseList";
51
51
  case ie:
52
52
  return "Activity";
@@ -57,7 +57,7 @@ function yn() {
57
57
  ), f.$$typeof) {
58
58
  case g:
59
59
  return "Portal";
60
- case B:
60
+ case $:
61
61
  return f.displayName || "Context";
62
62
  case M:
63
63
  return (f._context.displayName || "Context") + ".Consumer";
@@ -87,11 +87,11 @@ function yn() {
87
87
  }
88
88
  if (P) {
89
89
  P = console;
90
- var U = P.error, l = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
90
+ var U = P.error, u = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
91
91
  return U.call(
92
92
  P,
93
93
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
94
- l
94
+ u
95
95
  ), t(f);
96
96
  }
97
97
  }
@@ -122,7 +122,7 @@ function yn() {
122
122
  }
123
123
  function s(f, P) {
124
124
  function U() {
125
- le || (le = !0, console.error(
125
+ ue || (ue = !0, console.error(
126
126
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
127
127
  P
128
128
  ));
@@ -138,14 +138,14 @@ function yn() {
138
138
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
139
139
  )), f = this.props.ref, f !== void 0 ? f : null;
140
140
  }
141
- function d(f, P, U, l, u, v) {
141
+ function d(f, P, U, u, l, v) {
142
142
  var p = U.ref;
143
143
  return f = {
144
- $$typeof: $,
144
+ $$typeof: B,
145
145
  type: f,
146
146
  key: P,
147
147
  props: U,
148
- _owner: l
148
+ _owner: u
149
149
  }, (p !== void 0 ? p : null) !== null ? Object.defineProperty(f, "ref", {
150
150
  enumerable: !1,
151
151
  get: h
@@ -163,7 +163,7 @@ function yn() {
163
163
  configurable: !1,
164
164
  enumerable: !1,
165
165
  writable: !0,
166
- value: u
166
+ value: l
167
167
  }), Object.defineProperty(f, "_debugTask", {
168
168
  configurable: !1,
169
169
  enumerable: !1,
@@ -171,13 +171,13 @@ function yn() {
171
171
  value: v
172
172
  }), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
173
173
  }
174
- function E(f, P, U, l, u, v) {
174
+ function E(f, P, U, u, l, v) {
175
175
  var p = P.children;
176
176
  if (p !== void 0)
177
- if (l)
177
+ if (u)
178
178
  if (pe(p)) {
179
- for (l = 0; l < p.length; l++)
180
- y(p[l]);
179
+ for (u = 0; u < p.length; u++)
180
+ y(p[u]);
181
181
  Object.freeze && Object.freeze(p);
182
182
  } else
183
183
  console.error(
@@ -189,18 +189,18 @@ function yn() {
189
189
  var w = Object.keys(P).filter(function(m) {
190
190
  return m !== "key";
191
191
  });
192
- l = 0 < w.length ? "{key: someKey, " + w.join(": ..., ") + ": ...}" : "{key: someKey}", H[p + l] || (w = 0 < w.length ? "{" + w.join(": ..., ") + ": ...}" : "{}", console.error(
192
+ u = 0 < w.length ? "{key: someKey, " + w.join(": ..., ") + ": ...}" : "{key: someKey}", H[p + u] || (w = 0 < w.length ? "{" + w.join(": ..., ") + ": ...}" : "{}", console.error(
193
193
  `A props object containing a "key" prop is being spread into JSX:
194
194
  let props = %s;
195
195
  <%s {...props} />
196
196
  React keys must be passed directly to JSX without using spread:
197
197
  let props = %s;
198
198
  <%s key={someKey} {...props} />`,
199
- l,
199
+ u,
200
200
  p,
201
201
  w,
202
202
  p
203
- ), H[p + l] = !0);
203
+ ), H[p + u] = !0);
204
204
  }
205
205
  if (p = null, U !== void 0 && (n(U), p = "" + U), c(P) && (n(P.key), p = "" + P.key), "key" in P) {
206
206
  U = {};
@@ -215,7 +215,7 @@ React keys must be passed directly to JSX without using spread:
215
215
  p,
216
216
  U,
217
217
  o(),
218
- u,
218
+ l,
219
219
  v
220
220
  );
221
221
  }
@@ -223,9 +223,9 @@ React keys must be passed directly to JSX without using spread:
223
223
  C(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === ne && (f._payload.status === "fulfilled" ? C(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
224
224
  }
225
225
  function C(f) {
226
- return typeof f == "object" && f !== null && f.$$typeof === $;
226
+ return typeof f == "object" && f !== null && f.$$typeof === B;
227
227
  }
228
- var _ = De, $ = /* @__PURE__ */ Symbol.for("react.transitional.element"), g = /* @__PURE__ */ Symbol.for("react.portal"), R = /* @__PURE__ */ Symbol.for("react.fragment"), T = /* @__PURE__ */ Symbol.for("react.strict_mode"), j = /* @__PURE__ */ Symbol.for("react.profiler"), M = /* @__PURE__ */ Symbol.for("react.consumer"), B = /* @__PURE__ */ Symbol.for("react.context"), Y = /* @__PURE__ */ Symbol.for("react.forward_ref"), X = /* @__PURE__ */ Symbol.for("react.suspense"), A = /* @__PURE__ */ Symbol.for("react.suspense_list"), G = /* @__PURE__ */ Symbol.for("react.memo"), ne = /* @__PURE__ */ Symbol.for("react.lazy"), ie = /* @__PURE__ */ Symbol.for("react.activity"), Z = /* @__PURE__ */ Symbol.for("react.client.reference"), oe = _.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Se = Object.prototype.hasOwnProperty, pe = Array.isArray, me = console.createTask ? console.createTask : function() {
228
+ var _ = De, B = /* @__PURE__ */ Symbol.for("react.transitional.element"), g = /* @__PURE__ */ Symbol.for("react.portal"), R = /* @__PURE__ */ Symbol.for("react.fragment"), T = /* @__PURE__ */ Symbol.for("react.strict_mode"), j = /* @__PURE__ */ Symbol.for("react.profiler"), M = /* @__PURE__ */ Symbol.for("react.consumer"), $ = /* @__PURE__ */ Symbol.for("react.context"), Y = /* @__PURE__ */ Symbol.for("react.forward_ref"), X = /* @__PURE__ */ Symbol.for("react.suspense"), I = /* @__PURE__ */ Symbol.for("react.suspense_list"), G = /* @__PURE__ */ Symbol.for("react.memo"), ne = /* @__PURE__ */ Symbol.for("react.lazy"), ie = /* @__PURE__ */ Symbol.for("react.activity"), Z = /* @__PURE__ */ Symbol.for("react.client.reference"), oe = _.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Se = Object.prototype.hasOwnProperty, pe = Array.isArray, me = console.createTask ? console.createTask : function() {
229
229
  return null;
230
230
  };
231
231
  _ = {
@@ -233,38 +233,38 @@ React keys must be passed directly to JSX without using spread:
233
233
  return f();
234
234
  }
235
235
  };
236
- var le, _e = {}, J = _.react_stack_bottom_frame.bind(
236
+ var ue, _e = {}, J = _.react_stack_bottom_frame.bind(
237
237
  _,
238
238
  a
239
239
  )(), Ce = me(r(a)), H = {};
240
- Ie.Fragment = R, Ie.jsx = function(f, P, U) {
241
- var l = 1e4 > oe.recentlyCreatedOwnerStacks++;
240
+ Ae.Fragment = R, Ae.jsx = function(f, P, U) {
241
+ var u = 1e4 > oe.recentlyCreatedOwnerStacks++;
242
242
  return E(
243
243
  f,
244
244
  P,
245
245
  U,
246
246
  !1,
247
- l ? Error("react-stack-top-frame") : J,
248
- l ? me(r(f)) : Ce
247
+ u ? Error("react-stack-top-frame") : J,
248
+ u ? me(r(f)) : Ce
249
249
  );
250
- }, Ie.jsxs = function(f, P, U) {
251
- var l = 1e4 > oe.recentlyCreatedOwnerStacks++;
250
+ }, Ae.jsxs = function(f, P, U) {
251
+ var u = 1e4 > oe.recentlyCreatedOwnerStacks++;
252
252
  return E(
253
253
  f,
254
254
  P,
255
255
  U,
256
256
  !0,
257
- l ? Error("react-stack-top-frame") : J,
258
- l ? me(r(f)) : Ce
257
+ u ? Error("react-stack-top-frame") : J,
258
+ u ? me(r(f)) : Ce
259
259
  );
260
260
  };
261
- })()), Ie;
261
+ })()), Ae;
262
262
  }
263
263
  var mt;
264
- function bn() {
265
- return mt || (mt = 1, process.env.NODE_ENV === "production" ? Me.exports = gn() : Me.exports = yn()), Me.exports;
264
+ function wn() {
265
+ return mt || (mt = 1, process.env.NODE_ENV === "production" ? Me.exports = En() : Me.exports = xn()), Me.exports;
266
266
  }
267
- var b = bn();
267
+ var b = wn();
268
268
  const ht = (e) => {
269
269
  let t;
270
270
  const n = /* @__PURE__ */ new Set(), r = (d, E) => {
@@ -275,8 +275,8 @@ const ht = (e) => {
275
275
  }
276
276
  }, o = () => t, s = { setState: r, getState: o, getInitialState: () => h, subscribe: (d) => (n.add(d), () => n.delete(d)) }, h = t = e(r, o, s);
277
277
  return s;
278
- }, En = ((e) => e ? ht(e) : ht), xn = (e) => e;
279
- function wn(e, t = xn) {
278
+ }, Sn = ((e) => e ? ht(e) : ht), _n = (e) => e;
279
+ function Cn(e, t = _n) {
280
280
  const n = De.useSyncExternalStore(
281
281
  e.subscribe,
282
282
  De.useCallback(() => t(e.getState()), [e, t]),
@@ -285,48 +285,52 @@ function wn(e, t = xn) {
285
285
  return De.useDebugValue(n), n;
286
286
  }
287
287
  const gt = (e) => {
288
- const t = En(e), n = (r) => wn(t, r);
288
+ const t = Sn(e), n = (r) => Cn(t, r);
289
289
  return Object.assign(n, t), n;
290
- }, Sn = ((e) => e ? gt(e) : gt);
291
- function _n(e) {
290
+ }, Rn = ((e) => e ? gt(e) : gt);
291
+ function Nn(e) {
292
292
  return e.map((t) => {
293
- const n = [t.title, t.subtitle, ...t.keywords ?? []];
293
+ const n = [t.title, t.subtitle, ...t.keywords ?? []].filter(
294
+ (r) => !!r
295
+ );
294
296
  return {
295
297
  ...t,
296
- searchText: n.join(" ").toLowerCase()
298
+ searchText: n.join(" ").toLowerCase(),
299
+ titleLength: t.title.toLowerCase().length,
300
+ subtitleLength: t.subtitle?.toLowerCase().length ?? 0
297
301
  };
298
302
  });
299
303
  }
300
- var ze = { exports: {} }, Cn = ze.exports, yt;
301
- function Rn() {
304
+ var ze = { exports: {} }, Pn = ze.exports, yt;
305
+ function On() {
302
306
  return yt || (yt = 1, (function(e) {
303
307
  ((t, n) => {
304
308
  e.exports ? e.exports = n() : t.fuzzysort = n();
305
- })(Cn, (t) => {
306
- var n = (l, u) => {
307
- if (!l || !u) return H;
308
- var v = $(l);
309
- le(u) || (u = _(u));
309
+ })(Pn, (t) => {
310
+ var n = (u, l) => {
311
+ if (!u || !l) return H;
312
+ var v = B(u);
313
+ ue(l) || (l = _(l));
310
314
  var p = v.bitflags;
311
- return (p & u._bitflags) !== p ? H : R(v, u);
312
- }, r = (l, u, v) => {
313
- if (!l) return v?.all ? g(u, v) : Ce;
314
- var p = $(l), w = p.bitflags, x = p.containsSpace, m = y(v?.threshold || 0), N = v?.limit || _e, S = 0, k = 0, I = u.length;
315
+ return (p & l._bitflags) !== p ? H : R(v, l);
316
+ }, r = (u, l, v) => {
317
+ if (!u) return v?.all ? g(l, v) : Ce;
318
+ var p = B(u), w = p.bitflags, x = p.containsSpace, m = y(v?.threshold || 0), N = v?.limit || _e, S = 0, k = 0, A = l.length;
315
319
  function ae(Ee) {
316
320
  S < N ? (U.add(Ee), ++S) : (++k, Ee._score > U.peek()._score && U.replaceTop(Ee));
317
321
  }
318
322
  if (v?.key)
319
- for (var Q = v.key, L = 0; L < I; ++L) {
320
- var re = u[L], F = me(re, Q);
321
- if (F && (le(F) || (F = _(F)), (w & F._bitflags) === w)) {
323
+ for (var Q = v.key, L = 0; L < A; ++L) {
324
+ var re = l[L], F = me(re, Q);
325
+ if (F && (ue(F) || (F = _(F)), (w & F._bitflags) === w)) {
322
326
  var z = R(p, F);
323
327
  z !== H && (z._score < m || (z.obj = re, ae(z)));
324
328
  }
325
329
  }
326
330
  else if (v?.keys) {
327
331
  var he = v.keys, ce = he.length;
328
- e: for (var L = 0; L < I; ++L) {
329
- var re = u[L];
332
+ e: for (var L = 0; L < A; ++L) {
333
+ var re = l[L];
330
334
  {
331
335
  for (var ee = 0, D = 0; D < ce; ++D) {
332
336
  var Q = he[D], F = me(re, Q);
@@ -334,7 +338,7 @@ function Rn() {
334
338
  Se[D] = f;
335
339
  continue;
336
340
  }
337
- le(F) || (F = _(F)), Se[D] = F, ee |= F._bitflags;
341
+ ue(F) || (F = _(F)), Se[D] = F, ee |= F._bitflags;
338
342
  }
339
343
  if ((w & ee) !== w) continue;
340
344
  }
@@ -399,9 +403,9 @@ function Rn() {
399
403
  K < m || ae(se);
400
404
  }
401
405
  } else
402
- for (var L = 0; L < I; ++L) {
403
- var F = u[L];
404
- if (F && (le(F) || (F = _(F)), (w & F._bitflags) === w)) {
406
+ for (var L = 0; L < A; ++L) {
407
+ var F = l[L];
408
+ if (F && (ue(F) || (F = _(F)), (w & F._bitflags) === w)) {
405
409
  var z = R(p, F);
406
410
  z !== H && (z._score < m || ae(z));
407
411
  }
@@ -409,59 +413,59 @@ function Rn() {
409
413
  if (S === 0) return Ce;
410
414
  for (var ge = new Array(S), L = S - 1; L >= 0; --L) ge[L] = U.poll();
411
415
  return ge.total = S + k, ge;
412
- }, o = (l, u = "<b>", v = "</b>") => {
413
- for (var p = typeof u == "function" ? u : void 0, w = l.target, x = w.length, m = l.indexes, N = "", S = 0, k = 0, I = !1, ae = [], Q = 0; Q < x; ++Q) {
416
+ }, o = (u, l = "<b>", v = "</b>") => {
417
+ for (var p = typeof l == "function" ? l : void 0, w = u.target, x = w.length, m = u.indexes, N = "", S = 0, k = 0, A = !1, ae = [], Q = 0; Q < x; ++Q) {
414
418
  var L = w[Q];
415
419
  if (m[k] === Q) {
416
- if (++k, I || (I = !0, p ? (ae.push(N), N = "") : N += u), k === m.length) {
420
+ if (++k, A || (A = !0, p ? (ae.push(N), N = "") : N += l), k === m.length) {
417
421
  p ? (N += L, ae.push(p(N, S++)), N = "", ae.push(w.substr(Q + 1))) : N += L + v + w.substr(Q + 1);
418
422
  break;
419
423
  }
420
424
  } else
421
- I && (I = !1, p ? (ae.push(p(N, S++)), N = "") : N += v);
425
+ A && (A = !1, p ? (ae.push(p(N, S++)), N = "") : N += v);
422
426
  N += L;
423
427
  }
424
428
  return p ? ae : N;
425
- }, a = (l) => {
426
- typeof l == "number" ? l = "" + l : typeof l != "string" && (l = "");
427
- var u = M(l);
428
- return d(l, { _targetLower: u._lower, _targetLowerCodes: u.lowerCodes, _bitflags: u.bitflags });
429
+ }, a = (u) => {
430
+ typeof u == "number" ? u = "" + u : typeof u != "string" && (u = "");
431
+ var l = M(u);
432
+ return d(u, { _targetLower: l._lower, _targetLowerCodes: l.lowerCodes, _bitflags: l.bitflags });
429
433
  }, c = () => {
430
- X.clear(), A.clear();
434
+ X.clear(), I.clear();
431
435
  };
432
436
  class s {
433
437
  get indexes() {
434
- return this._indexes.slice(0, this._indexes.len).sort((u, v) => u - v);
438
+ return this._indexes.slice(0, this._indexes.len).sort((l, v) => l - v);
435
439
  }
436
- set indexes(u) {
437
- return this._indexes = u;
440
+ set indexes(l) {
441
+ return this._indexes = l;
438
442
  }
439
- highlight(u, v) {
440
- return o(this, u, v);
443
+ highlight(l, v) {
444
+ return o(this, l, v);
441
445
  }
442
446
  get score() {
443
447
  return E(this._score);
444
448
  }
445
- set score(u) {
446
- this._score = y(u);
449
+ set score(l) {
450
+ this._score = y(l);
447
451
  }
448
452
  }
449
453
  class h extends Array {
450
454
  get score() {
451
455
  return E(this._score);
452
456
  }
453
- set score(u) {
454
- this._score = y(u);
457
+ set score(l) {
458
+ this._score = y(l);
455
459
  }
456
460
  }
457
- var d = (l, u) => {
461
+ var d = (u, l) => {
458
462
  const v = new s();
459
- return v.target = l, v.obj = u.obj ?? H, v._score = u._score ?? J, v._indexes = u._indexes ?? [], v._targetLower = u._targetLower ?? "", v._targetLowerCodes = u._targetLowerCodes ?? H, v._nextBeginningIndexes = u._nextBeginningIndexes ?? H, v._bitflags = u._bitflags ?? 0, v;
460
- }, E = (l) => l === J ? 0 : l > 1 ? l : Math.E ** (((-l + 1) ** 0.04307 - 1) * -2), y = (l) => l === 0 ? J : l > 1 ? l : 1 - Math.pow(Math.log(l) / -2 + 1, 1 / 0.04307), C = (l) => {
461
- typeof l == "number" ? l = "" + l : typeof l != "string" && (l = ""), l = l.trim();
462
- var u = M(l), v = [];
463
- if (u.containsSpace) {
464
- var p = l.split(/\s+/);
463
+ return v.target = u, v.obj = l.obj ?? H, v._score = l._score ?? J, v._indexes = l._indexes ?? [], v._targetLower = l._targetLower ?? "", v._targetLowerCodes = l._targetLowerCodes ?? H, v._nextBeginningIndexes = l._nextBeginningIndexes ?? H, v._bitflags = l._bitflags ?? 0, v;
464
+ }, E = (u) => u === J ? 0 : u > 1 ? u : Math.E ** (((-u + 1) ** 0.04307 - 1) * -2), y = (u) => u === 0 ? J : u > 1 ? u : 1 - Math.pow(Math.log(u) / -2 + 1, 1 / 0.04307), C = (u) => {
465
+ typeof u == "number" ? u = "" + u : typeof u != "string" && (u = ""), u = u.trim();
466
+ var l = M(u), v = [];
467
+ if (l.containsSpace) {
468
+ var p = u.split(/\s+/);
465
469
  p = [...new Set(p)];
466
470
  for (var w = 0; w < p.length; w++)
467
471
  if (p[w] !== "") {
@@ -469,82 +473,82 @@ function Rn() {
469
473
  v.push({ lowerCodes: x.lowerCodes, _lower: p[w].toLowerCase(), containsSpace: !1 });
470
474
  }
471
475
  }
472
- return { lowerCodes: u.lowerCodes, _lower: u._lower, containsSpace: u.containsSpace, bitflags: u.bitflags, spaceSearches: v };
473
- }, _ = (l) => {
474
- if (l.length > 999) return a(l);
475
- var u = X.get(l);
476
- return u !== void 0 || (u = a(l), X.set(l, u)), u;
477
- }, $ = (l) => {
478
- if (l.length > 999) return C(l);
479
- var u = A.get(l);
480
- return u !== void 0 || (u = C(l), A.set(l, u)), u;
481
- }, g = (l, u) => {
476
+ return { lowerCodes: l.lowerCodes, _lower: l._lower, containsSpace: l.containsSpace, bitflags: l.bitflags, spaceSearches: v };
477
+ }, _ = (u) => {
478
+ if (u.length > 999) return a(u);
479
+ var l = X.get(u);
480
+ return l !== void 0 || (l = a(u), X.set(u, l)), l;
481
+ }, B = (u) => {
482
+ if (u.length > 999) return C(u);
483
+ var l = I.get(u);
484
+ return l !== void 0 || (l = C(u), I.set(u, l)), l;
485
+ }, g = (u, l) => {
482
486
  var v = [];
483
- v.total = l.length;
484
- var p = u?.limit || _e;
485
- if (u?.key)
486
- for (var w = 0; w < l.length; w++) {
487
- var x = l[w], m = me(x, u.key);
487
+ v.total = u.length;
488
+ var p = l?.limit || _e;
489
+ if (l?.key)
490
+ for (var w = 0; w < u.length; w++) {
491
+ var x = u[w], m = me(x, l.key);
488
492
  if (m != H) {
489
- le(m) || (m = _(m));
493
+ ue(m) || (m = _(m));
490
494
  var N = d(m.target, { _score: m._score, obj: x });
491
495
  if (v.push(N), v.length >= p) return v;
492
496
  }
493
497
  }
494
- else if (u?.keys)
495
- for (var w = 0; w < l.length; w++) {
496
- for (var x = l[w], S = new h(u.keys.length), k = u.keys.length - 1; k >= 0; --k) {
497
- var m = me(x, u.keys[k]);
498
+ else if (l?.keys)
499
+ for (var w = 0; w < u.length; w++) {
500
+ for (var x = u[w], S = new h(l.keys.length), k = l.keys.length - 1; k >= 0; --k) {
501
+ var m = me(x, l.keys[k]);
498
502
  if (!m) {
499
503
  S[k] = f;
500
504
  continue;
501
505
  }
502
- le(m) || (m = _(m)), m._score = J, m._indexes.len = 0, S[k] = m;
506
+ ue(m) || (m = _(m)), m._score = J, m._indexes.len = 0, S[k] = m;
503
507
  }
504
508
  if (S.obj = x, S._score = J, v.push(S), v.length >= p) return v;
505
509
  }
506
510
  else
507
- for (var w = 0; w < l.length; w++) {
508
- var m = l[w];
509
- if (m != H && (le(m) || (m = _(m)), m._score = J, m._indexes.len = 0, v.push(m), v.length >= p))
511
+ for (var w = 0; w < u.length; w++) {
512
+ var m = u[w];
513
+ if (m != H && (ue(m) || (m = _(m)), m._score = J, m._indexes.len = 0, v.push(m), v.length >= p))
510
514
  return v;
511
515
  }
512
516
  return v;
513
- }, R = (l, u, v = !1, p = !1) => {
514
- if (v === !1 && l.containsSpace) return T(l, u, p);
515
- for (var w = l._lower, x = l.lowerCodes, m = x[0], N = u._targetLowerCodes, S = x.length, k = N.length, L = 0, I = 0, ae = 0; ; ) {
516
- var Q = m === N[I];
517
+ }, R = (u, l, v = !1, p = !1) => {
518
+ if (v === !1 && u.containsSpace) return T(u, l, p);
519
+ for (var w = u._lower, x = u.lowerCodes, m = x[0], N = l._targetLowerCodes, S = x.length, k = N.length, L = 0, A = 0, ae = 0; ; ) {
520
+ var Q = m === N[A];
517
521
  if (Q) {
518
- if (G[ae++] = I, ++L, L === S) break;
522
+ if (G[ae++] = A, ++L, L === S) break;
519
523
  m = x[L];
520
524
  }
521
- if (++I, I >= k) return H;
525
+ if (++A, A >= k) return H;
522
526
  }
523
- var L = 0, re = !1, F = 0, z = u._nextBeginningIndexes;
524
- z === H && (z = u._nextBeginningIndexes = Y(u.target)), I = G[0] === 0 ? 0 : z[G[0] - 1];
527
+ var L = 0, re = !1, F = 0, z = l._nextBeginningIndexes;
528
+ z === H && (z = l._nextBeginningIndexes = Y(l.target)), A = G[0] === 0 ? 0 : z[G[0] - 1];
525
529
  var he = 0;
526
- if (I !== k) for (; ; )
527
- if (I >= k) {
530
+ if (A !== k) for (; ; )
531
+ if (A >= k) {
528
532
  if (L <= 0 || (++he, he > 200)) break;
529
533
  --L;
530
534
  var ce = ne[--F];
531
- I = z[ce];
535
+ A = z[ce];
532
536
  } else {
533
- var Q = x[L] === N[I];
537
+ var Q = x[L] === N[A];
534
538
  if (Q) {
535
- if (ne[F++] = I, ++L, L === S) {
539
+ if (ne[F++] = A, ++L, L === S) {
536
540
  re = !0;
537
541
  break;
538
542
  }
539
- ++I;
543
+ ++A;
540
544
  } else
541
- I = z[I];
545
+ A = z[A];
542
546
  }
543
- var ee = S <= 1 ? -1 : u._targetLower.indexOf(w, G[0]), D = !!~ee, q = D ? ee === 0 || u._nextBeginningIndexes[ee - 1] === ee : !1;
547
+ var ee = S <= 1 ? -1 : l._targetLower.indexOf(w, G[0]), D = !!~ee, q = D ? ee === 0 || l._nextBeginningIndexes[ee - 1] === ee : !1;
544
548
  if (D && !q) {
545
549
  for (var O = 0; O < z.length; O = z[O])
546
550
  if (!(O <= ee)) {
547
- for (var se = 0; se < S && x[se] === u._targetLowerCodes[O + se]; se++) ;
551
+ for (var se = 0; se < S && x[se] === l._targetLowerCodes[O + se]; se++) ;
548
552
  if (se === S) {
549
553
  ee = O, q = !0;
550
554
  break;
@@ -554,8 +558,8 @@ function Rn() {
554
558
  var K = (W) => {
555
559
  for (var V = 0, dt = 0, de = 1; de < S; ++de)
556
560
  W[de] - W[de - 1] !== 1 && (V -= W[de], ++dt);
557
- var dn = W[S - 1] - W[0] - (S - 1);
558
- if (V -= (12 + dn) * dt, W[0] !== 0 && (V -= W[0] * W[0] * 0.2), !re)
561
+ var pn = W[S - 1] - W[0] - (S - 1);
562
+ if (V -= (12 + pn) * dt, W[0] !== 0 && (V -= W[0] * W[0] * 0.2), !re)
559
563
  V *= 1e3;
560
564
  else {
561
565
  for (var Ze = 1, de = z[0]; de < k; de = z[de]) ++Ze;
@@ -573,22 +577,22 @@ function Rn() {
573
577
  if (D) for (var O = 0; O < S; ++O) G[O] = ee + O;
574
578
  var ge = G, Ee = K(ge);
575
579
  }
576
- u._score = Ee;
577
- for (var O = 0; O < S; ++O) u._indexes[O] = ge[O];
578
- u._indexes.len = S;
580
+ l._score = Ee;
581
+ for (var O = 0; O < S; ++O) l._indexes[O] = ge[O];
582
+ l._indexes.len = S;
579
583
  const je = new s();
580
- return je.target = u.target, je._score = u._score, je._indexes = u._indexes, je;
581
- }, T = (l, u, v) => {
582
- for (var p = /* @__PURE__ */ new Set(), w = 0, x = H, m = 0, N = l.spaceSearches, S = N.length, k = 0, I = () => {
583
- for (let q = k - 1; q >= 0; q--) u._nextBeginningIndexes[ie[q * 2 + 0]] = ie[q * 2 + 1];
584
+ return je.target = l.target, je._score = l._score, je._indexes = l._indexes, je;
585
+ }, T = (u, l, v) => {
586
+ for (var p = /* @__PURE__ */ new Set(), w = 0, x = H, m = 0, N = u.spaceSearches, S = N.length, k = 0, A = () => {
587
+ for (let q = k - 1; q >= 0; q--) l._nextBeginningIndexes[ie[q * 2 + 0]] = ie[q * 2 + 1];
584
588
  }, ae = !1, D = 0; D < S; ++D) {
585
589
  oe[D] = J;
586
590
  var Q = N[D];
587
- if (x = R(Q, u), v) {
591
+ if (x = R(Q, l), v) {
588
592
  if (x === H) continue;
589
593
  ae = !0;
590
594
  } else if (x === H)
591
- return I(), H;
595
+ return A(), H;
592
596
  var L = D === S - 1;
593
597
  if (!L) {
594
598
  var re = x._indexes, F = !0;
@@ -598,19 +602,19 @@ function Rn() {
598
602
  break;
599
603
  }
600
604
  if (F) {
601
- var z = re[re.len - 1] + 1, he = u._nextBeginningIndexes[z - 1];
602
- for (let O = z - 1; O >= 0 && he === u._nextBeginningIndexes[O]; O--)
603
- u._nextBeginningIndexes[O] = z, ie[k * 2 + 0] = O, ie[k * 2 + 1] = he, k++;
605
+ var z = re[re.len - 1] + 1, he = l._nextBeginningIndexes[z - 1];
606
+ for (let O = z - 1; O >= 0 && he === l._nextBeginningIndexes[O]; O--)
607
+ l._nextBeginningIndexes[O] = z, ie[k * 2 + 0] = O, ie[k * 2 + 1] = he, k++;
604
608
  }
605
609
  }
606
610
  w += x._score / S, oe[D] = x._score / S, x._indexes[0] < m && (w -= (m - x._indexes[0]) * 2), m = x._indexes[0];
607
611
  for (var ce = 0; ce < x._indexes.len; ++ce) p.add(x._indexes[ce]);
608
612
  }
609
613
  if (v && !ae) return H;
610
- I();
614
+ A();
611
615
  var ee = R(
612
- l,
613
616
  u,
617
+ l,
614
618
  /*allowSpaces=*/
615
619
  !0
616
620
  );
@@ -620,13 +624,13 @@ function Rn() {
620
624
  oe[D] = ee._score / S;
621
625
  return ee;
622
626
  }
623
- v && (x = u), x._score = w;
627
+ v && (x = l), x._score = w;
624
628
  var D = 0;
625
629
  for (let q of p) x._indexes[D++] = q;
626
630
  return x._indexes.len = D, x;
627
- }, j = (l) => l.replace(new RegExp("\\p{Script=Latin}+", "gu"), (u) => u.normalize("NFD")).replace(/[\u0300-\u036f]/g, ""), M = (l) => {
628
- l = j(l);
629
- for (var u = l.length, v = l.toLowerCase(), p = [], w = 0, x = !1, m = 0; m < u; ++m) {
631
+ }, j = (u) => u.replace(new RegExp("\\p{Script=Latin}+", "gu"), (l) => l.normalize("NFD")).replace(/[\u0300-\u036f]/g, ""), M = (u) => {
632
+ u = j(u);
633
+ for (var l = u.length, v = u.toLowerCase(), p = [], w = 0, x = !1, m = 0; m < l; ++m) {
630
634
  var N = p[m] = v.charCodeAt(m);
631
635
  if (N === 32) {
632
636
  x = !0;
@@ -636,78 +640,93 @@ function Rn() {
636
640
  w |= 1 << S;
637
641
  }
638
642
  return { lowerCodes: p, bitflags: w, containsSpace: x, _lower: v };
639
- }, B = (l) => {
640
- for (var u = l.length, v = [], p = 0, w = !1, x = !1, m = 0; m < u; ++m) {
641
- var N = l.charCodeAt(m), S = N >= 65 && N <= 90, k = S || N >= 97 && N <= 122 || N >= 48 && N <= 57, I = S && !w || !x || !k;
642
- w = S, x = k, I && (v[p++] = m);
643
+ }, $ = (u) => {
644
+ for (var l = u.length, v = [], p = 0, w = !1, x = !1, m = 0; m < l; ++m) {
645
+ var N = u.charCodeAt(m), S = N >= 65 && N <= 90, k = S || N >= 97 && N <= 122 || N >= 48 && N <= 57, A = S && !w || !x || !k;
646
+ w = S, x = k, A && (v[p++] = m);
643
647
  }
644
648
  return v;
645
- }, Y = (l) => {
646
- l = j(l);
647
- for (var u = l.length, v = B(l), p = [], w = v[0], x = 0, m = 0; m < u; ++m)
648
- w > m ? p[m] = w : (w = v[++x], p[m] = w === void 0 ? u : w);
649
+ }, Y = (u) => {
650
+ u = j(u);
651
+ for (var l = u.length, v = $(u), p = [], w = v[0], x = 0, m = 0; m < l; ++m)
652
+ w > m ? p[m] = w : (w = v[++x], p[m] = w === void 0 ? l : w);
649
653
  return p;
650
- }, X = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Map(), G = [], ne = [], ie = [], Z = [], oe = [], Se = [], pe = [], me = (l, u) => {
651
- var v = l[u];
654
+ }, X = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new Map(), G = [], ne = [], ie = [], Z = [], oe = [], Se = [], pe = [], me = (u, l) => {
655
+ var v = u[l];
652
656
  if (v !== void 0) return v;
653
- if (typeof u == "function") return u(l);
654
- var p = u;
655
- Array.isArray(u) || (p = u.split("."));
656
- for (var w = p.length, x = -1; l && ++x < w; ) l = l[p[x]];
657
- return l;
658
- }, le = (l) => typeof l == "object" && typeof l._bitflags == "number", _e = 1 / 0, J = -_e, Ce = [];
657
+ if (typeof l == "function") return l(u);
658
+ var p = l;
659
+ Array.isArray(l) || (p = l.split("."));
660
+ for (var w = p.length, x = -1; u && ++x < w; ) u = u[p[x]];
661
+ return u;
662
+ }, ue = (u) => typeof u == "object" && typeof u._bitflags == "number", _e = 1 / 0, J = -_e, Ce = [];
659
663
  Ce.total = 0;
660
- var H = null, f = a(""), P = (l) => {
661
- var u = [], v = 0, p = {}, w = (x) => {
662
- for (var m = 0, N = u[m], S = 1; S < v; ) {
664
+ var H = null, f = a(""), P = (u) => {
665
+ var l = [], v = 0, p = {}, w = (x) => {
666
+ for (var m = 0, N = l[m], S = 1; S < v; ) {
663
667
  var k = S + 1;
664
- m = S, k < v && u[k]._score < u[S]._score && (m = k), u[m - 1 >> 1] = u[m], S = 1 + (m << 1);
668
+ m = S, k < v && l[k]._score < l[S]._score && (m = k), l[m - 1 >> 1] = l[m], S = 1 + (m << 1);
665
669
  }
666
- for (var I = m - 1 >> 1; m > 0 && N._score < u[I]._score; I = (m = I) - 1 >> 1) u[m] = u[I];
667
- u[m] = N;
670
+ for (var A = m - 1 >> 1; m > 0 && N._score < l[A]._score; A = (m = A) - 1 >> 1) l[m] = l[A];
671
+ l[m] = N;
668
672
  };
669
673
  return p.add = ((x) => {
670
674
  var m = v;
671
- u[v++] = x;
672
- for (var N = m - 1 >> 1; m > 0 && x._score < u[N]._score; N = (m = N) - 1 >> 1) u[m] = u[N];
673
- u[m] = x;
675
+ l[v++] = x;
676
+ for (var N = m - 1 >> 1; m > 0 && x._score < l[N]._score; N = (m = N) - 1 >> 1) l[m] = l[N];
677
+ l[m] = x;
674
678
  }), p.poll = ((x) => {
675
679
  if (v !== 0) {
676
- var m = u[0];
677
- return u[0] = u[--v], w(), m;
680
+ var m = l[0];
681
+ return l[0] = l[--v], w(), m;
678
682
  }
679
683
  }), p.peek = ((x) => {
680
- if (v !== 0) return u[0];
684
+ if (v !== 0) return l[0];
681
685
  }), p.replaceTop = ((x) => {
682
- u[0] = x, w();
686
+ l[0] = x, w();
683
687
  }), p;
684
688
  }, U = P();
685
689
  return { single: n, go: r, prepare: a, cleanup: c };
686
690
  });
687
691
  })(ze)), ze.exports;
688
692
  }
689
- var Nn = Rn();
690
- const Pn = /* @__PURE__ */ hn(Nn);
691
- function On(e, t) {
692
- return t.trim() ? Pn.go(t, e, {
693
+ var Tn = On();
694
+ const In = /* @__PURE__ */ bn(Tn);
695
+ function An(e, t, n) {
696
+ const r = t + 1, o = r + n, a = [], c = [];
697
+ for (const s of e)
698
+ s < t ? a.push(s) : n > 0 && s >= r && s < o && c.push(s - r);
699
+ return { titleIndexes: a, subtitleIndexes: c };
700
+ }
701
+ function Dn(e, t) {
702
+ return t.trim() ? In.go(t, e, {
693
703
  key: "searchText",
694
704
  threshold: -1e3
695
- }).map((r) => ({
696
- item: r.obj,
697
- indexes: r.indexes
698
- })) : e.map((r) => ({
705
+ }).map((r) => {
706
+ const { titleIndexes: o, subtitleIndexes: a } = An(
707
+ r.indexes,
708
+ r.obj.titleLength,
709
+ r.obj.subtitleLength
710
+ );
711
+ return {
712
+ item: r.obj,
713
+ titleIndexes: o.length > 0 ? o : null,
714
+ subtitleIndexes: a.length > 0 ? a : null
715
+ };
716
+ }) : e.map((r) => ({
699
717
  item: r,
700
- indexes: null
718
+ titleIndexes: null,
719
+ subtitleIndexes: null
701
720
  }));
702
721
  }
703
- async function Tn(e) {
722
+ async function kt(e) {
704
723
  try {
705
724
  await e.run();
706
725
  } catch (t) {
707
726
  console.error(`[command-palette] Command failed: ${e.id}`, t);
708
727
  }
709
728
  }
710
- const te = Sn((e, t) => ({
729
+ const te = Rn((e, t) => ({
711
730
  commands: [],
712
731
  normalized: [],
713
732
  results: [],
@@ -715,19 +734,20 @@ const te = Sn((e, t) => ({
715
734
  isOpen: !1,
716
735
  selectedIndex: 0,
717
736
  registerCommands: (n) => {
718
- const r = _n(n);
737
+ const r = Nn(n);
719
738
  e({
720
739
  commands: n,
721
740
  normalized: r,
722
741
  results: r.map((o) => ({
723
742
  item: o,
724
- indexes: null
743
+ titleIndexes: null,
744
+ subtitleIndexes: null
725
745
  })),
726
746
  selectedIndex: 0
727
747
  });
728
748
  },
729
749
  setQuery: (n) => {
730
- const { normalized: r } = t(), o = On(r, n);
750
+ const { normalized: r } = t(), o = Dn(r, n);
731
751
  e({
732
752
  query: n,
733
753
  results: o,
@@ -748,24 +768,24 @@ const te = Sn((e, t) => ({
748
768
  },
749
769
  selectFirst: () => e({ selectedIndex: 0 }),
750
770
  open: () => e({ isOpen: !0 }),
751
- close: () => e({
771
+ close: () => e((n) => ({
752
772
  isOpen: !1,
753
773
  query: "",
754
- selectedIndex: 0
755
- })
756
- }));
757
- function An(e) {
774
+ selectedIndex: 0,
775
+ results: n.normalized.map((r) => ({
776
+ item: r,
777
+ titleIndexes: null,
778
+ subtitleIndexes: null
779
+ }))
780
+ }))
781
+ })), kn = { key: "p", shift: !0 };
782
+ function Ln(e, t = kn) {
758
783
  Te(() => {
759
- const t = (n) => {
760
- const r = n.key.toLowerCase() === "k";
761
- if (navigator.platform.startsWith("Mac")) {
762
- n.metaKey && r && (n.preventDefault(), e());
763
- return;
764
- }
765
- n.ctrlKey && r && (n.preventDefault(), e());
784
+ const n = (navigator.userAgentData?.platform ?? navigator.platform).toLowerCase().startsWith("mac"), r = (o) => {
785
+ (n ? o.metaKey : o.ctrlKey) && o.key.toLowerCase() === t.key.toLowerCase() && !!o.shiftKey == !!t.shift && !!o.altKey == !!t.alt && (o.preventDefault(), o.stopPropagation(), e());
766
786
  };
767
- return window.addEventListener("keydown", t), () => window.removeEventListener("keydown", t);
768
- }, [e]);
787
+ return window.addEventListener("keydown", r, { capture: !0 }), () => window.removeEventListener("keydown", r, { capture: !0 });
788
+ }, [e, t]);
769
789
  }
770
790
  function be(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
771
791
  return function(o) {
@@ -797,7 +817,7 @@ function ct(...e) {
797
817
  function we(...e) {
798
818
  return i.useCallback(ct(...e), e);
799
819
  }
800
- function In(e, t) {
820
+ function jn(e, t) {
801
821
  const n = i.createContext(t), r = (a) => {
802
822
  const { children: c, ...s } = a, h = i.useMemo(() => s, Object.values(s));
803
823
  return /* @__PURE__ */ b.jsx(n.Provider, { value: h, children: c });
@@ -811,19 +831,19 @@ function In(e, t) {
811
831
  }
812
832
  return [r, o];
813
833
  }
814
- function Dn(e, t = []) {
834
+ function Mn(e, t = []) {
815
835
  let n = [];
816
836
  function r(a, c) {
817
837
  const s = i.createContext(c), h = n.length;
818
838
  n = [...n, c];
819
839
  const d = (y) => {
820
- const { scope: C, children: _, ...$ } = y, g = C?.[e]?.[h] || s, R = i.useMemo(() => $, Object.values($));
840
+ const { scope: C, children: _, ...B } = y, g = C?.[e]?.[h] || s, R = i.useMemo(() => B, Object.values(B));
821
841
  return /* @__PURE__ */ b.jsx(g.Provider, { value: R, children: _ });
822
842
  };
823
843
  d.displayName = a + "Provider";
824
844
  function E(y, C) {
825
- const _ = C?.[e]?.[h] || s, $ = i.useContext(_);
826
- if ($) return $;
845
+ const _ = C?.[e]?.[h] || s, B = i.useContext(_);
846
+ if (B) return B;
827
847
  if (c !== void 0) return c;
828
848
  throw new Error(`\`${y}\` must be used within \`${a}\``);
829
849
  }
@@ -839,9 +859,9 @@ function Dn(e, t = []) {
839
859
  );
840
860
  };
841
861
  };
842
- return o.scopeName = e, [r, kn(o, ...t)];
862
+ return o.scopeName = e, [r, Fn(o, ...t)];
843
863
  }
844
- function kn(...e) {
864
+ function Fn(...e) {
845
865
  const t = e[0];
846
866
  if (e.length === 1) return t;
847
867
  const n = () => {
@@ -860,23 +880,23 @@ function kn(...e) {
860
880
  return n.scopeName = t.scopeName, n;
861
881
  }
862
882
  var ke = globalThis?.document ? i.useLayoutEffect : () => {
863
- }, Ln = i[" useId ".trim().toString()] || (() => {
864
- }), jn = 0;
883
+ }, Wn = i[" useId ".trim().toString()] || (() => {
884
+ }), Bn = 0;
865
885
  function Je(e) {
866
- const [t, n] = i.useState(Ln());
886
+ const [t, n] = i.useState(Wn());
867
887
  return ke(() => {
868
- n((r) => r ?? String(jn++));
888
+ n((r) => r ?? String(Bn++));
869
889
  }, [e]), e || (t ? `radix-${t}` : "");
870
890
  }
871
- var Mn = i[" useInsertionEffect ".trim().toString()] || ke;
872
- function Fn({
891
+ var $n = i[" useInsertionEffect ".trim().toString()] || ke;
892
+ function Un({
873
893
  prop: e,
874
894
  defaultProp: t,
875
895
  onChange: n = () => {
876
896
  },
877
897
  caller: r
878
898
  }) {
879
- const [o, a, c] = Wn({
899
+ const [o, a, c] = zn({
880
900
  defaultProp: t,
881
901
  onChange: n
882
902
  }), s = e !== void 0, h = s ? e : o;
@@ -892,7 +912,7 @@ function Fn({
892
912
  const d = i.useCallback(
893
913
  (E) => {
894
914
  if (s) {
895
- const y = $n(E) ? E(e) : E;
915
+ const y = Vn(E) ? E(e) : E;
896
916
  y !== e && c.current?.(y);
897
917
  } else
898
918
  a(E);
@@ -901,24 +921,24 @@ function Fn({
901
921
  );
902
922
  return [h, d];
903
923
  }
904
- function Wn({
924
+ function zn({
905
925
  defaultProp: e,
906
926
  onChange: t
907
927
  }) {
908
928
  const [n, r] = i.useState(e), o = i.useRef(n), a = i.useRef(t);
909
- return Mn(() => {
929
+ return $n(() => {
910
930
  a.current = t;
911
931
  }, [t]), i.useEffect(() => {
912
932
  o.current !== n && (a.current?.(n), o.current = n);
913
933
  }, [n, o]), [n, r, a];
914
934
  }
915
- function $n(e) {
935
+ function Vn(e) {
916
936
  return typeof e == "function";
917
937
  }
918
938
  // @__NO_SIDE_EFFECTS__
919
- function Dt(e) {
920
- const t = /* @__PURE__ */ Bn(e), n = i.forwardRef((r, o) => {
921
- const { children: a, ...c } = r, s = i.Children.toArray(a), h = s.find(zn);
939
+ function Lt(e) {
940
+ const t = /* @__PURE__ */ Yn(e), n = i.forwardRef((r, o) => {
941
+ const { children: a, ...c } = r, s = i.Children.toArray(a), h = s.find(Gn);
922
942
  if (h) {
923
943
  const d = h.props.children, E = s.map((y) => y === h ? i.Children.count(d) > 1 ? i.Children.only(null) : i.isValidElement(d) ? d.props.children : null : y);
924
944
  return /* @__PURE__ */ b.jsx(t, { ...c, ref: o, children: i.isValidElement(d) ? i.cloneElement(d, void 0, E) : null });
@@ -928,22 +948,22 @@ function Dt(e) {
928
948
  return n.displayName = `${e}.Slot`, n;
929
949
  }
930
950
  // @__NO_SIDE_EFFECTS__
931
- function Bn(e) {
951
+ function Yn(e) {
932
952
  const t = i.forwardRef((n, r) => {
933
953
  const { children: o, ...a } = n;
934
954
  if (i.isValidElement(o)) {
935
- const c = Yn(o), s = Vn(a, o.props);
955
+ const c = Xn(o), s = Kn(a, o.props);
936
956
  return o.type !== i.Fragment && (s.ref = r ? ct(r, c) : c), i.cloneElement(o, s);
937
957
  }
938
958
  return i.Children.count(o) > 1 ? i.Children.only(null) : null;
939
959
  });
940
960
  return t.displayName = `${e}.SlotClone`, t;
941
961
  }
942
- var Un = /* @__PURE__ */ Symbol("radix.slottable");
943
- function zn(e) {
944
- return i.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Un;
962
+ var Hn = /* @__PURE__ */ Symbol("radix.slottable");
963
+ function Gn(e) {
964
+ return i.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Hn;
945
965
  }
946
- function Vn(e, t) {
966
+ function Kn(e, t) {
947
967
  const n = { ...t };
948
968
  for (const r in t) {
949
969
  const o = e[r], a = t[r];
@@ -954,11 +974,11 @@ function Vn(e, t) {
954
974
  }
955
975
  return { ...e, ...n };
956
976
  }
957
- function Yn(e) {
977
+ function Xn(e) {
958
978
  let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
959
979
  return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
960
980
  }
961
- var Hn = [
981
+ var qn = [
962
982
  "a",
963
983
  "button",
964
984
  "div",
@@ -976,15 +996,15 @@ var Hn = [
976
996
  "span",
977
997
  "svg",
978
998
  "ul"
979
- ], ve = Hn.reduce((e, t) => {
980
- const n = /* @__PURE__ */ Dt(`Primitive.${t}`), r = i.forwardRef((o, a) => {
999
+ ], ve = qn.reduce((e, t) => {
1000
+ const n = /* @__PURE__ */ Lt(`Primitive.${t}`), r = i.forwardRef((o, a) => {
981
1001
  const { asChild: c, ...s } = o, h = c ? n : t;
982
1002
  return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ b.jsx(h, { ...s, ref: a });
983
1003
  });
984
1004
  return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
985
1005
  }, {});
986
- function Gn(e, t) {
987
- e && pn.flushSync(() => e.dispatchEvent(t));
1006
+ function Zn(e, t) {
1007
+ e && gn.flushSync(() => e.dispatchEvent(t));
988
1008
  }
989
1009
  function Le(e) {
990
1010
  const t = i.useRef(e);
@@ -992,7 +1012,7 @@ function Le(e) {
992
1012
  t.current = e;
993
1013
  }), i.useMemo(() => (...n) => t.current?.(...n), []);
994
1014
  }
995
- function Kn(e, t = globalThis?.document) {
1015
+ function Jn(e, t = globalThis?.document) {
996
1016
  const n = Le(e);
997
1017
  i.useEffect(() => {
998
1018
  const r = (o) => {
@@ -1001,11 +1021,11 @@ function Kn(e, t = globalThis?.document) {
1001
1021
  return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
1002
1022
  }, [n, t]);
1003
1023
  }
1004
- var Xn = "DismissableLayer", st = "dismissableLayer.update", qn = "dismissableLayer.pointerDownOutside", Zn = "dismissableLayer.focusOutside", Et, kt = i.createContext({
1024
+ var Qn = "DismissableLayer", st = "dismissableLayer.update", er = "dismissableLayer.pointerDownOutside", tr = "dismissableLayer.focusOutside", Et, jt = i.createContext({
1005
1025
  layers: /* @__PURE__ */ new Set(),
1006
1026
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
1007
1027
  branches: /* @__PURE__ */ new Set()
1008
- }), Lt = i.forwardRef(
1028
+ }), Mt = i.forwardRef(
1009
1029
  (e, t) => {
1010
1030
  const {
1011
1031
  disableOutsidePointerEvents: n = !1,
@@ -1015,15 +1035,15 @@ var Xn = "DismissableLayer", st = "dismissableLayer.update", qn = "dismissableLa
1015
1035
  onInteractOutside: c,
1016
1036
  onDismiss: s,
1017
1037
  ...h
1018
- } = e, d = i.useContext(kt), [E, y] = i.useState(null), C = E?.ownerDocument ?? globalThis?.document, [, _] = i.useState({}), $ = we(t, (A) => y(A)), g = Array.from(d.layers), [R] = [...d.layersWithOutsidePointerEventsDisabled].slice(-1), T = g.indexOf(R), j = E ? g.indexOf(E) : -1, M = d.layersWithOutsidePointerEventsDisabled.size > 0, B = j >= T, Y = er((A) => {
1019
- const G = A.target, ne = [...d.branches].some((ie) => ie.contains(G));
1020
- !B || ne || (o?.(A), c?.(A), A.defaultPrevented || s?.());
1021
- }, C), X = tr((A) => {
1022
- const G = A.target;
1023
- [...d.branches].some((ie) => ie.contains(G)) || (a?.(A), c?.(A), A.defaultPrevented || s?.());
1038
+ } = e, d = i.useContext(jt), [E, y] = i.useState(null), C = E?.ownerDocument ?? globalThis?.document, [, _] = i.useState({}), B = we(t, (I) => y(I)), g = Array.from(d.layers), [R] = [...d.layersWithOutsidePointerEventsDisabled].slice(-1), T = g.indexOf(R), j = E ? g.indexOf(E) : -1, M = d.layersWithOutsidePointerEventsDisabled.size > 0, $ = j >= T, Y = or((I) => {
1039
+ const G = I.target, ne = [...d.branches].some((ie) => ie.contains(G));
1040
+ !$ || ne || (o?.(I), c?.(I), I.defaultPrevented || s?.());
1041
+ }, C), X = ar((I) => {
1042
+ const G = I.target;
1043
+ [...d.branches].some((ie) => ie.contains(G)) || (a?.(I), c?.(I), I.defaultPrevented || s?.());
1024
1044
  }, C);
1025
- return Kn((A) => {
1026
- j === d.layers.size - 1 && (r?.(A), !A.defaultPrevented && s && (A.preventDefault(), s()));
1045
+ return Jn((I) => {
1046
+ j === d.layers.size - 1 && (r?.(I), !I.defaultPrevented && s && (I.preventDefault(), s()));
1027
1047
  }, C), i.useEffect(() => {
1028
1048
  if (E)
1029
1049
  return n && (d.layersWithOutsidePointerEventsDisabled.size === 0 && (Et = C.body.style.pointerEvents, C.body.style.pointerEvents = "none"), d.layersWithOutsidePointerEventsDisabled.add(E)), d.layers.add(E), xt(), () => {
@@ -1032,15 +1052,15 @@ var Xn = "DismissableLayer", st = "dismissableLayer.update", qn = "dismissableLa
1032
1052
  }, [E, C, n, d]), i.useEffect(() => () => {
1033
1053
  E && (d.layers.delete(E), d.layersWithOutsidePointerEventsDisabled.delete(E), xt());
1034
1054
  }, [E, d]), i.useEffect(() => {
1035
- const A = () => _({});
1036
- return document.addEventListener(st, A), () => document.removeEventListener(st, A);
1055
+ const I = () => _({});
1056
+ return document.addEventListener(st, I), () => document.removeEventListener(st, I);
1037
1057
  }, []), /* @__PURE__ */ b.jsx(
1038
1058
  ve.div,
1039
1059
  {
1040
1060
  ...h,
1041
- ref: $,
1061
+ ref: B,
1042
1062
  style: {
1043
- pointerEvents: M ? B ? "auto" : "none" : void 0,
1063
+ pointerEvents: M ? $ ? "auto" : "none" : void 0,
1044
1064
  ...e.style
1045
1065
  },
1046
1066
  onFocusCapture: be(e.onFocusCapture, X.onFocusCapture),
@@ -1053,9 +1073,9 @@ var Xn = "DismissableLayer", st = "dismissableLayer.update", qn = "dismissableLa
1053
1073
  );
1054
1074
  }
1055
1075
  );
1056
- Lt.displayName = Xn;
1057
- var Jn = "DismissableLayerBranch", Qn = i.forwardRef((e, t) => {
1058
- const n = i.useContext(kt), r = i.useRef(null), o = we(t, r);
1076
+ Mt.displayName = Qn;
1077
+ var nr = "DismissableLayerBranch", rr = i.forwardRef((e, t) => {
1078
+ const n = i.useContext(jt), r = i.useRef(null), o = we(t, r);
1059
1079
  return i.useEffect(() => {
1060
1080
  const a = r.current;
1061
1081
  if (a)
@@ -1064,16 +1084,16 @@ var Jn = "DismissableLayerBranch", Qn = i.forwardRef((e, t) => {
1064
1084
  };
1065
1085
  }, [n.branches]), /* @__PURE__ */ b.jsx(ve.div, { ...e, ref: o });
1066
1086
  });
1067
- Qn.displayName = Jn;
1068
- function er(e, t = globalThis?.document) {
1087
+ rr.displayName = nr;
1088
+ function or(e, t = globalThis?.document) {
1069
1089
  const n = Le(e), r = i.useRef(!1), o = i.useRef(() => {
1070
1090
  });
1071
1091
  return i.useEffect(() => {
1072
1092
  const a = (s) => {
1073
1093
  if (s.target && !r.current) {
1074
1094
  let h = function() {
1075
- jt(
1076
- qn,
1095
+ Ft(
1096
+ er,
1077
1097
  n,
1078
1098
  d,
1079
1099
  { discrete: !0 }
@@ -1095,11 +1115,11 @@ function er(e, t = globalThis?.document) {
1095
1115
  onPointerDownCapture: () => r.current = !0
1096
1116
  };
1097
1117
  }
1098
- function tr(e, t = globalThis?.document) {
1118
+ function ar(e, t = globalThis?.document) {
1099
1119
  const n = Le(e), r = i.useRef(!1);
1100
1120
  return i.useEffect(() => {
1101
1121
  const o = (a) => {
1102
- a.target && !r.current && jt(Zn, n, { originalEvent: a }, {
1122
+ a.target && !r.current && Ft(tr, n, { originalEvent: a }, {
1103
1123
  discrete: !1
1104
1124
  });
1105
1125
  };
@@ -1113,11 +1133,11 @@ function xt() {
1113
1133
  const e = new CustomEvent(st);
1114
1134
  document.dispatchEvent(e);
1115
1135
  }
1116
- function jt(e, t, n, { discrete: r }) {
1136
+ function Ft(e, t, n, { discrete: r }) {
1117
1137
  const o = n.originalEvent.target, a = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
1118
- t && o.addEventListener(e, t, { once: !0 }), r ? Gn(o, a) : o.dispatchEvent(a);
1138
+ t && o.addEventListener(e, t, { once: !0 }), r ? Zn(o, a) : o.dispatchEvent(a);
1119
1139
  }
1120
- var Qe = "focusScope.autoFocusOnMount", et = "focusScope.autoFocusOnUnmount", wt = { bubbles: !1, cancelable: !0 }, nr = "FocusScope", Mt = i.forwardRef((e, t) => {
1140
+ var Qe = "focusScope.autoFocusOnMount", et = "focusScope.autoFocusOnUnmount", wt = { bubbles: !1, cancelable: !0 }, sr = "FocusScope", Wt = i.forwardRef((e, t) => {
1121
1141
  const {
1122
1142
  loop: n = !1,
1123
1143
  trapped: r = !1,
@@ -1137,12 +1157,12 @@ var Qe = "focusScope.autoFocusOnMount", et = "focusScope.autoFocusOnUnmount", wt
1137
1157
  if (r) {
1138
1158
  let g = function(M) {
1139
1159
  if (_.paused || !s) return;
1140
- const B = M.target;
1141
- s.contains(B) ? y.current = B : ye(y.current, { select: !0 });
1160
+ const $ = M.target;
1161
+ s.contains($) ? y.current = $ : ye(y.current, { select: !0 });
1142
1162
  }, R = function(M) {
1143
1163
  if (_.paused || !s) return;
1144
- const B = M.relatedTarget;
1145
- B !== null && (s.contains(B) || ye(y.current, { select: !0 }));
1164
+ const $ = M.relatedTarget;
1165
+ $ !== null && (s.contains($) || ye(y.current, { select: !0 }));
1146
1166
  }, T = function(M) {
1147
1167
  if (document.activeElement === document.body)
1148
1168
  for (const Y of M)
@@ -1160,7 +1180,7 @@ var Qe = "focusScope.autoFocusOnMount", et = "focusScope.autoFocusOnUnmount", wt
1160
1180
  const g = document.activeElement;
1161
1181
  if (!s.contains(g)) {
1162
1182
  const T = new CustomEvent(Qe, wt);
1163
- s.addEventListener(Qe, d), s.dispatchEvent(T), T.defaultPrevented || (rr(cr(Ft(s)), { select: !0 }), document.activeElement === g && ye(s));
1183
+ s.addEventListener(Qe, d), s.dispatchEvent(T), T.defaultPrevented || (ir(dr(Bt(s)), { select: !0 }), document.activeElement === g && ye(s));
1164
1184
  }
1165
1185
  return () => {
1166
1186
  s.removeEventListener(Qe, d), setTimeout(() => {
@@ -1170,30 +1190,30 @@ var Qe = "focusScope.autoFocusOnMount", et = "focusScope.autoFocusOnUnmount", wt
1170
1190
  };
1171
1191
  }
1172
1192
  }, [s, d, E, _]);
1173
- const $ = i.useCallback(
1193
+ const B = i.useCallback(
1174
1194
  (g) => {
1175
1195
  if (!n && !r || _.paused) return;
1176
1196
  const R = g.key === "Tab" && !g.altKey && !g.ctrlKey && !g.metaKey, T = document.activeElement;
1177
1197
  if (R && T) {
1178
- const j = g.currentTarget, [M, B] = or(j);
1179
- M && B ? !g.shiftKey && T === B ? (g.preventDefault(), n && ye(M, { select: !0 })) : g.shiftKey && T === M && (g.preventDefault(), n && ye(B, { select: !0 })) : T === j && g.preventDefault();
1198
+ const j = g.currentTarget, [M, $] = cr(j);
1199
+ M && $ ? !g.shiftKey && T === $ ? (g.preventDefault(), n && ye(M, { select: !0 })) : g.shiftKey && T === M && (g.preventDefault(), n && ye($, { select: !0 })) : T === j && g.preventDefault();
1180
1200
  }
1181
1201
  },
1182
1202
  [n, r, _.paused]
1183
1203
  );
1184
- return /* @__PURE__ */ b.jsx(ve.div, { tabIndex: -1, ...c, ref: C, onKeyDown: $ });
1204
+ return /* @__PURE__ */ b.jsx(ve.div, { tabIndex: -1, ...c, ref: C, onKeyDown: B });
1185
1205
  });
1186
- Mt.displayName = nr;
1187
- function rr(e, { select: t = !1 } = {}) {
1206
+ Wt.displayName = sr;
1207
+ function ir(e, { select: t = !1 } = {}) {
1188
1208
  const n = document.activeElement;
1189
1209
  for (const r of e)
1190
1210
  if (ye(r, { select: t }), document.activeElement !== n) return;
1191
1211
  }
1192
- function or(e) {
1193
- const t = Ft(e), n = St(t, e), r = St(t.reverse(), e);
1212
+ function cr(e) {
1213
+ const t = Bt(e), n = St(t, e), r = St(t.reverse(), e);
1194
1214
  return [n, r];
1195
1215
  }
1196
- function Ft(e) {
1216
+ function Bt(e) {
1197
1217
  const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
1198
1218
  acceptNode: (r) => {
1199
1219
  const o = r.tagName === "INPUT" && r.type === "hidden";
@@ -1205,9 +1225,9 @@ function Ft(e) {
1205
1225
  }
1206
1226
  function St(e, t) {
1207
1227
  for (const n of e)
1208
- if (!ar(n, { upTo: t })) return n;
1228
+ if (!lr(n, { upTo: t })) return n;
1209
1229
  }
1210
- function ar(e, { upTo: t }) {
1230
+ function lr(e, { upTo: t }) {
1211
1231
  if (getComputedStyle(e).visibility === "hidden") return !0;
1212
1232
  for (; e; ) {
1213
1233
  if (t !== void 0 && e === t) return !1;
@@ -1216,17 +1236,17 @@ function ar(e, { upTo: t }) {
1216
1236
  }
1217
1237
  return !1;
1218
1238
  }
1219
- function sr(e) {
1239
+ function ur(e) {
1220
1240
  return e instanceof HTMLInputElement && "select" in e;
1221
1241
  }
1222
1242
  function ye(e, { select: t = !1 } = {}) {
1223
1243
  if (e && e.focus) {
1224
1244
  const n = document.activeElement;
1225
- e.focus({ preventScroll: !0 }), e !== n && sr(e) && t && e.select();
1245
+ e.focus({ preventScroll: !0 }), e !== n && ur(e) && t && e.select();
1226
1246
  }
1227
1247
  }
1228
- var _t = ir();
1229
- function ir() {
1248
+ var _t = fr();
1249
+ function fr() {
1230
1250
  let e = [];
1231
1251
  return {
1232
1252
  add(t) {
@@ -1242,26 +1262,26 @@ function Ct(e, t) {
1242
1262
  const n = [...e], r = n.indexOf(t);
1243
1263
  return r !== -1 && n.splice(r, 1), n;
1244
1264
  }
1245
- function cr(e) {
1265
+ function dr(e) {
1246
1266
  return e.filter((t) => t.tagName !== "A");
1247
1267
  }
1248
- var ur = "Portal", Wt = i.forwardRef((e, t) => {
1268
+ var vr = "Portal", $t = i.forwardRef((e, t) => {
1249
1269
  const { container: n, ...r } = e, [o, a] = i.useState(!1);
1250
1270
  ke(() => a(!0), []);
1251
1271
  const c = n || o && globalThis?.document?.body;
1252
- return c ? mn.createPortal(/* @__PURE__ */ b.jsx(ve.div, { ...r, ref: t }), c) : null;
1272
+ return c ? yn.createPortal(/* @__PURE__ */ b.jsx(ve.div, { ...r, ref: t }), c) : null;
1253
1273
  });
1254
- Wt.displayName = ur;
1255
- function lr(e, t) {
1274
+ $t.displayName = vr;
1275
+ function pr(e, t) {
1256
1276
  return i.useReducer((n, r) => t[n][r] ?? n, e);
1257
1277
  }
1258
1278
  var Ke = (e) => {
1259
- const { present: t, children: n } = e, r = fr(t), o = typeof n == "function" ? n({ present: r.isPresent }) : i.Children.only(n), a = we(r.ref, dr(o));
1279
+ const { present: t, children: n } = e, r = mr(t), o = typeof n == "function" ? n({ present: r.isPresent }) : i.Children.only(n), a = we(r.ref, hr(o));
1260
1280
  return typeof n == "function" || r.isPresent ? i.cloneElement(o, { ref: a }) : null;
1261
1281
  };
1262
1282
  Ke.displayName = "Presence";
1263
- function fr(e) {
1264
- const [t, n] = i.useState(), r = i.useRef(null), o = i.useRef(e), a = i.useRef("none"), c = e ? "mounted" : "unmounted", [s, h] = lr(c, {
1283
+ function mr(e) {
1284
+ const [t, n] = i.useState(), r = i.useRef(null), o = i.useRef(e), a = i.useRef("none"), c = e ? "mounted" : "unmounted", [s, h] = pr(c, {
1265
1285
  mounted: {
1266
1286
  UNMOUNT: "unmounted",
1267
1287
  ANIMATION_OUT: "unmountSuspended"
@@ -1312,12 +1332,12 @@ function fr(e) {
1312
1332
  function Fe(e) {
1313
1333
  return e?.animationName || "none";
1314
1334
  }
1315
- function dr(e) {
1335
+ function hr(e) {
1316
1336
  let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
1317
1337
  return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
1318
1338
  }
1319
1339
  var tt = 0;
1320
- function vr() {
1340
+ function gr() {
1321
1341
  i.useEffect(() => {
1322
1342
  const e = document.querySelectorAll("[data-radix-focus-guard]");
1323
1343
  return document.body.insertAdjacentElement("afterbegin", e[0] ?? Rt()), document.body.insertAdjacentElement("beforeend", e[1] ?? Rt()), tt++, () => {
@@ -1338,7 +1358,7 @@ var fe = function() {
1338
1358
  return t;
1339
1359
  }, fe.apply(this, arguments);
1340
1360
  };
1341
- function $t(e, t) {
1361
+ function Ut(e, t) {
1342
1362
  var n = {};
1343
1363
  for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
1344
1364
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
@@ -1346,17 +1366,17 @@ function $t(e, t) {
1346
1366
  t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
1347
1367
  return n;
1348
1368
  }
1349
- function pr(e, t, n) {
1369
+ function yr(e, t, n) {
1350
1370
  if (n || arguments.length === 2) for (var r = 0, o = t.length, a; r < o; r++)
1351
1371
  (a || !(r in t)) && (a || (a = Array.prototype.slice.call(t, 0, r)), a[r] = t[r]);
1352
1372
  return e.concat(a || Array.prototype.slice.call(t));
1353
1373
  }
1354
- var Ve = "right-scroll-bar-position", Ye = "width-before-scroll-bar", mr = "with-scroll-bars-hidden", hr = "--removed-body-scroll-bar-size";
1374
+ var Ve = "right-scroll-bar-position", Ye = "width-before-scroll-bar", br = "with-scroll-bars-hidden", Er = "--removed-body-scroll-bar-size";
1355
1375
  function nt(e, t) {
1356
1376
  return typeof e == "function" ? e(t) : e && (e.current = t), e;
1357
1377
  }
1358
- function gr(e, t) {
1359
- var n = vn(function() {
1378
+ function xr(e, t) {
1379
+ var n = mn(function() {
1360
1380
  return {
1361
1381
  // value
1362
1382
  value: e,
@@ -1376,14 +1396,14 @@ function gr(e, t) {
1376
1396
  })[0];
1377
1397
  return n.callback = t, n.facade;
1378
1398
  }
1379
- var yr = typeof window < "u" ? i.useLayoutEffect : i.useEffect, Nt = /* @__PURE__ */ new WeakMap();
1380
- function br(e, t) {
1381
- var n = gr(null, function(r) {
1399
+ var wr = typeof window < "u" ? i.useLayoutEffect : i.useEffect, Nt = /* @__PURE__ */ new WeakMap();
1400
+ function Sr(e, t) {
1401
+ var n = xr(null, function(r) {
1382
1402
  return e.forEach(function(o) {
1383
1403
  return nt(o, r);
1384
1404
  });
1385
1405
  });
1386
- return yr(function() {
1406
+ return wr(function() {
1387
1407
  var r = Nt.get(n);
1388
1408
  if (r) {
1389
1409
  var o = new Set(r), a = new Set(e), c = n.current;
@@ -1396,11 +1416,11 @@ function br(e, t) {
1396
1416
  Nt.set(n, e);
1397
1417
  }, [e]), n;
1398
1418
  }
1399
- function Er(e) {
1419
+ function _r(e) {
1400
1420
  return e;
1401
1421
  }
1402
- function xr(e, t) {
1403
- t === void 0 && (t = Er);
1422
+ function Cr(e, t) {
1423
+ t === void 0 && (t = _r);
1404
1424
  var n = [], r = !1, o = {
1405
1425
  read: function() {
1406
1426
  if (r)
@@ -1454,13 +1474,13 @@ function xr(e, t) {
1454
1474
  };
1455
1475
  return o;
1456
1476
  }
1457
- function wr(e) {
1477
+ function Rr(e) {
1458
1478
  e === void 0 && (e = {});
1459
- var t = xr(null);
1479
+ var t = Cr(null);
1460
1480
  return t.options = fe({ async: !0, ssr: !1 }, e), t;
1461
1481
  }
1462
- var Bt = function(e) {
1463
- var t = e.sideCar, n = $t(e, ["sideCar"]);
1482
+ var zt = function(e) {
1483
+ var t = e.sideCar, n = Ut(e, ["sideCar"]);
1464
1484
  if (!t)
1465
1485
  throw new Error("Sidecar: please provide `sideCar` property to import the right car");
1466
1486
  var r = t.read();
@@ -1468,22 +1488,22 @@ var Bt = function(e) {
1468
1488
  throw new Error("Sidecar medium not found");
1469
1489
  return i.createElement(r, fe({}, n));
1470
1490
  };
1471
- Bt.isSideCarExport = !0;
1472
- function Sr(e, t) {
1473
- return e.useMedium(t), Bt;
1491
+ zt.isSideCarExport = !0;
1492
+ function Nr(e, t) {
1493
+ return e.useMedium(t), zt;
1474
1494
  }
1475
- var Ut = wr(), rt = function() {
1495
+ var Vt = Rr(), rt = function() {
1476
1496
  }, Xe = i.forwardRef(function(e, t) {
1477
1497
  var n = i.useRef(null), r = i.useState({
1478
1498
  onScrollCapture: rt,
1479
1499
  onWheelCapture: rt,
1480
1500
  onTouchMoveCapture: rt
1481
- }), o = r[0], a = r[1], c = e.forwardProps, s = e.children, h = e.className, d = e.removeScrollBar, E = e.enabled, y = e.shards, C = e.sideCar, _ = e.noRelative, $ = e.noIsolation, g = e.inert, R = e.allowPinchZoom, T = e.as, j = T === void 0 ? "div" : T, M = e.gapMode, B = $t(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), Y = C, X = br([n, t]), A = fe(fe({}, B), o);
1501
+ }), o = r[0], a = r[1], c = e.forwardProps, s = e.children, h = e.className, d = e.removeScrollBar, E = e.enabled, y = e.shards, C = e.sideCar, _ = e.noRelative, B = e.noIsolation, g = e.inert, R = e.allowPinchZoom, T = e.as, j = T === void 0 ? "div" : T, M = e.gapMode, $ = Ut(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), Y = C, X = Sr([n, t]), I = fe(fe({}, $), o);
1482
1502
  return i.createElement(
1483
1503
  i.Fragment,
1484
1504
  null,
1485
- E && i.createElement(Y, { sideCar: Ut, removeScrollBar: d, shards: y, noRelative: _, noIsolation: $, inert: g, setCallbacks: a, allowPinchZoom: !!R, lockRef: n, gapMode: M }),
1486
- c ? i.cloneElement(i.Children.only(s), fe(fe({}, A), { ref: X })) : i.createElement(j, fe({}, A, { className: h, ref: X }), s)
1505
+ E && i.createElement(Y, { sideCar: Vt, removeScrollBar: d, shards: y, noRelative: _, noIsolation: B, inert: g, setCallbacks: a, allowPinchZoom: !!R, lockRef: n, gapMode: M }),
1506
+ c ? i.cloneElement(i.Children.only(s), fe(fe({}, I), { ref: X })) : i.createElement(j, fe({}, I, { className: h, ref: X }), s)
1487
1507
  );
1488
1508
  });
1489
1509
  Xe.defaultProps = {
@@ -1495,37 +1515,37 @@ Xe.classNames = {
1495
1515
  fullWidth: Ye,
1496
1516
  zeroRight: Ve
1497
1517
  };
1498
- var _r = function() {
1518
+ var Pr = function() {
1499
1519
  if (typeof __webpack_nonce__ < "u")
1500
1520
  return __webpack_nonce__;
1501
1521
  };
1502
- function Cr() {
1522
+ function Or() {
1503
1523
  if (!document)
1504
1524
  return null;
1505
1525
  var e = document.createElement("style");
1506
1526
  e.type = "text/css";
1507
- var t = _r();
1527
+ var t = Pr();
1508
1528
  return t && e.setAttribute("nonce", t), e;
1509
1529
  }
1510
- function Rr(e, t) {
1530
+ function Tr(e, t) {
1511
1531
  e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
1512
1532
  }
1513
- function Nr(e) {
1533
+ function Ir(e) {
1514
1534
  var t = document.head || document.getElementsByTagName("head")[0];
1515
1535
  t.appendChild(e);
1516
1536
  }
1517
- var Pr = function() {
1537
+ var Ar = function() {
1518
1538
  var e = 0, t = null;
1519
1539
  return {
1520
1540
  add: function(n) {
1521
- e == 0 && (t = Cr()) && (Rr(t, n), Nr(t)), e++;
1541
+ e == 0 && (t = Or()) && (Tr(t, n), Ir(t)), e++;
1522
1542
  },
1523
1543
  remove: function() {
1524
1544
  e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
1525
1545
  }
1526
1546
  };
1527
- }, Or = function() {
1528
- var e = Pr();
1547
+ }, Dr = function() {
1548
+ var e = Ar();
1529
1549
  return function(t, n) {
1530
1550
  i.useEffect(function() {
1531
1551
  return e.add(t), function() {
@@ -1533,36 +1553,36 @@ var Pr = function() {
1533
1553
  };
1534
1554
  }, [t && n]);
1535
1555
  };
1536
- }, zt = function() {
1537
- var e = Or(), t = function(n) {
1556
+ }, Yt = function() {
1557
+ var e = Dr(), t = function(n) {
1538
1558
  var r = n.styles, o = n.dynamic;
1539
1559
  return e(r, o), null;
1540
1560
  };
1541
1561
  return t;
1542
- }, Tr = {
1562
+ }, kr = {
1543
1563
  left: 0,
1544
1564
  top: 0,
1545
1565
  right: 0,
1546
1566
  gap: 0
1547
1567
  }, ot = function(e) {
1548
1568
  return parseInt(e || "", 10) || 0;
1549
- }, Ar = function(e) {
1569
+ }, Lr = function(e) {
1550
1570
  var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
1551
1571
  return [ot(n), ot(r), ot(o)];
1552
- }, Ir = function(e) {
1572
+ }, jr = function(e) {
1553
1573
  if (e === void 0 && (e = "margin"), typeof window > "u")
1554
- return Tr;
1555
- var t = Ar(e), n = document.documentElement.clientWidth, r = window.innerWidth;
1574
+ return kr;
1575
+ var t = Lr(e), n = document.documentElement.clientWidth, r = window.innerWidth;
1556
1576
  return {
1557
1577
  left: t[0],
1558
1578
  top: t[1],
1559
1579
  right: t[2],
1560
1580
  gap: Math.max(0, r - n + t[2] - t[0])
1561
1581
  };
1562
- }, Dr = zt(), Oe = "data-scroll-locked", kr = function(e, t, n, r) {
1582
+ }, Mr = Yt(), Oe = "data-scroll-locked", Fr = function(e, t, n, r) {
1563
1583
  var o = e.left, a = e.top, c = e.right, s = e.gap;
1564
1584
  return n === void 0 && (n = "margin"), `
1565
- .`.concat(mr, ` {
1585
+ .`.concat(br, ` {
1566
1586
  overflow: hidden `).concat(r, `;
1567
1587
  padding-right: `).concat(s, "px ").concat(r, `;
1568
1588
  }
@@ -1600,26 +1620,26 @@ var Pr = function() {
1600
1620
  }
1601
1621
 
1602
1622
  body[`).concat(Oe, `] {
1603
- `).concat(hr, ": ").concat(s, `px;
1623
+ `).concat(Er, ": ").concat(s, `px;
1604
1624
  }
1605
1625
  `);
1606
1626
  }, Pt = function() {
1607
1627
  var e = parseInt(document.body.getAttribute(Oe) || "0", 10);
1608
1628
  return isFinite(e) ? e : 0;
1609
- }, Lr = function() {
1629
+ }, Wr = function() {
1610
1630
  i.useEffect(function() {
1611
1631
  return document.body.setAttribute(Oe, (Pt() + 1).toString()), function() {
1612
1632
  var e = Pt() - 1;
1613
1633
  e <= 0 ? document.body.removeAttribute(Oe) : document.body.setAttribute(Oe, e.toString());
1614
1634
  };
1615
1635
  }, []);
1616
- }, jr = function(e) {
1636
+ }, Br = function(e) {
1617
1637
  var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
1618
- Lr();
1638
+ Wr();
1619
1639
  var a = i.useMemo(function() {
1620
- return Ir(o);
1640
+ return jr(o);
1621
1641
  }, [o]);
1622
- return i.createElement(Dr, { styles: kr(a, !t, o, n ? "" : "!important") });
1642
+ return i.createElement(Mr, { styles: Fr(a, !t, o, n ? "" : "!important") });
1623
1643
  }, it = !1;
1624
1644
  if (typeof window < "u")
1625
1645
  try {
@@ -1632,61 +1652,61 @@ if (typeof window < "u")
1632
1652
  } catch {
1633
1653
  it = !1;
1634
1654
  }
1635
- var Re = it ? { passive: !1 } : !1, Mr = function(e) {
1655
+ var Re = it ? { passive: !1 } : !1, $r = function(e) {
1636
1656
  return e.tagName === "TEXTAREA";
1637
- }, Vt = function(e, t) {
1657
+ }, Ht = function(e, t) {
1638
1658
  if (!(e instanceof Element))
1639
1659
  return !1;
1640
1660
  var n = window.getComputedStyle(e);
1641
1661
  return (
1642
1662
  // not-not-scrollable
1643
1663
  n[t] !== "hidden" && // contains scroll inside self
1644
- !(n.overflowY === n.overflowX && !Mr(e) && n[t] === "visible")
1664
+ !(n.overflowY === n.overflowX && !$r(e) && n[t] === "visible")
1645
1665
  );
1646
- }, Fr = function(e) {
1647
- return Vt(e, "overflowY");
1648
- }, Wr = function(e) {
1649
- return Vt(e, "overflowX");
1666
+ }, Ur = function(e) {
1667
+ return Ht(e, "overflowY");
1668
+ }, zr = function(e) {
1669
+ return Ht(e, "overflowX");
1650
1670
  }, Ot = function(e, t) {
1651
1671
  var n = t.ownerDocument, r = t;
1652
1672
  do {
1653
1673
  typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
1654
- var o = Yt(e, r);
1674
+ var o = Gt(e, r);
1655
1675
  if (o) {
1656
- var a = Ht(e, r), c = a[1], s = a[2];
1676
+ var a = Kt(e, r), c = a[1], s = a[2];
1657
1677
  if (c > s)
1658
1678
  return !0;
1659
1679
  }
1660
1680
  r = r.parentNode;
1661
1681
  } while (r && r !== n.body);
1662
1682
  return !1;
1663
- }, $r = function(e) {
1683
+ }, Vr = function(e) {
1664
1684
  var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
1665
1685
  return [
1666
1686
  t,
1667
1687
  n,
1668
1688
  r
1669
1689
  ];
1670
- }, Br = function(e) {
1690
+ }, Yr = function(e) {
1671
1691
  var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
1672
1692
  return [
1673
1693
  t,
1674
1694
  n,
1675
1695
  r
1676
1696
  ];
1677
- }, Yt = function(e, t) {
1678
- return e === "v" ? Fr(t) : Wr(t);
1679
- }, Ht = function(e, t) {
1680
- return e === "v" ? $r(t) : Br(t);
1681
- }, Ur = function(e, t) {
1697
+ }, Gt = function(e, t) {
1698
+ return e === "v" ? Ur(t) : zr(t);
1699
+ }, Kt = function(e, t) {
1700
+ return e === "v" ? Vr(t) : Yr(t);
1701
+ }, Hr = function(e, t) {
1682
1702
  return e === "h" && t === "rtl" ? -1 : 1;
1683
- }, zr = function(e, t, n, r, o) {
1684
- var a = Ur(e, window.getComputedStyle(t).direction), c = a * r, s = n.target, h = t.contains(s), d = !1, E = c > 0, y = 0, C = 0;
1703
+ }, Gr = function(e, t, n, r, o) {
1704
+ var a = Hr(e, window.getComputedStyle(t).direction), c = a * r, s = n.target, h = t.contains(s), d = !1, E = c > 0, y = 0, C = 0;
1685
1705
  do {
1686
1706
  if (!s)
1687
1707
  break;
1688
- var _ = Ht(e, s), $ = _[0], g = _[1], R = _[2], T = g - R - a * $;
1689
- ($ || T) && Yt(e, s) && (y += T, C += $);
1708
+ var _ = Kt(e, s), B = _[0], g = _[1], R = _[2], T = g - R - a * B;
1709
+ (B || T) && Gt(e, s) && (y += T, C += B);
1690
1710
  var j = s.parentNode;
1691
1711
  s = j && j.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? j.host : j;
1692
1712
  } while (
@@ -1695,28 +1715,28 @@ var Re = it ? { passive: !1 } : !1, Mr = function(e) {
1695
1715
  h && (t.contains(s) || t === s)
1696
1716
  );
1697
1717
  return (E && Math.abs(y) < 1 || !E && Math.abs(C) < 1) && (d = !0), d;
1698
- }, $e = function(e) {
1718
+ }, Be = function(e) {
1699
1719
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
1700
1720
  }, Tt = function(e) {
1701
1721
  return [e.deltaX, e.deltaY];
1702
- }, At = function(e) {
1722
+ }, It = function(e) {
1703
1723
  return e && "current" in e ? e.current : e;
1704
- }, Vr = function(e, t) {
1724
+ }, Kr = function(e, t) {
1705
1725
  return e[0] === t[0] && e[1] === t[1];
1706
- }, Yr = function(e) {
1726
+ }, Xr = function(e) {
1707
1727
  return `
1708
1728
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
1709
1729
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
1710
1730
  `);
1711
- }, Hr = 0, Ne = [];
1712
- function Gr(e) {
1713
- var t = i.useRef([]), n = i.useRef([0, 0]), r = i.useRef(), o = i.useState(Hr++)[0], a = i.useState(zt)[0], c = i.useRef(e);
1731
+ }, qr = 0, Ne = [];
1732
+ function Zr(e) {
1733
+ var t = i.useRef([]), n = i.useRef([0, 0]), r = i.useRef(), o = i.useState(qr++)[0], a = i.useState(Yt)[0], c = i.useRef(e);
1714
1734
  i.useEffect(function() {
1715
1735
  c.current = e;
1716
1736
  }, [e]), i.useEffect(function() {
1717
1737
  if (e.inert) {
1718
1738
  document.body.classList.add("block-interactivity-".concat(o));
1719
- var g = pr([e.lockRef.current], (e.shards || []).map(At), !0).filter(Boolean);
1739
+ var g = yr([e.lockRef.current], (e.shards || []).map(It), !0).filter(Boolean);
1720
1740
  return g.forEach(function(R) {
1721
1741
  return R.classList.add("allow-interactivity-".concat(o));
1722
1742
  }), function() {
@@ -1729,51 +1749,51 @@ function Gr(e) {
1729
1749
  var s = i.useCallback(function(g, R) {
1730
1750
  if ("touches" in g && g.touches.length === 2 || g.type === "wheel" && g.ctrlKey)
1731
1751
  return !c.current.allowPinchZoom;
1732
- var T = $e(g), j = n.current, M = "deltaX" in g ? g.deltaX : j[0] - T[0], B = "deltaY" in g ? g.deltaY : j[1] - T[1], Y, X = g.target, A = Math.abs(M) > Math.abs(B) ? "h" : "v";
1733
- if ("touches" in g && A === "h" && X.type === "range")
1752
+ var T = Be(g), j = n.current, M = "deltaX" in g ? g.deltaX : j[0] - T[0], $ = "deltaY" in g ? g.deltaY : j[1] - T[1], Y, X = g.target, I = Math.abs(M) > Math.abs($) ? "h" : "v";
1753
+ if ("touches" in g && I === "h" && X.type === "range")
1734
1754
  return !1;
1735
1755
  var G = window.getSelection(), ne = G && G.anchorNode, ie = ne ? ne === X || ne.contains(X) : !1;
1736
1756
  if (ie)
1737
1757
  return !1;
1738
- var Z = Ot(A, X);
1758
+ var Z = Ot(I, X);
1739
1759
  if (!Z)
1740
1760
  return !0;
1741
- if (Z ? Y = A : (Y = A === "v" ? "h" : "v", Z = Ot(A, X)), !Z)
1761
+ if (Z ? Y = I : (Y = I === "v" ? "h" : "v", Z = Ot(I, X)), !Z)
1742
1762
  return !1;
1743
- if (!r.current && "changedTouches" in g && (M || B) && (r.current = Y), !Y)
1763
+ if (!r.current && "changedTouches" in g && (M || $) && (r.current = Y), !Y)
1744
1764
  return !0;
1745
1765
  var oe = r.current || Y;
1746
- return zr(oe, R, g, oe === "h" ? M : B);
1766
+ return Gr(oe, R, g, oe === "h" ? M : $);
1747
1767
  }, []), h = i.useCallback(function(g) {
1748
1768
  var R = g;
1749
1769
  if (!(!Ne.length || Ne[Ne.length - 1] !== a)) {
1750
- var T = "deltaY" in R ? Tt(R) : $e(R), j = t.current.filter(function(Y) {
1751
- return Y.name === R.type && (Y.target === R.target || R.target === Y.shadowParent) && Vr(Y.delta, T);
1770
+ var T = "deltaY" in R ? Tt(R) : Be(R), j = t.current.filter(function(Y) {
1771
+ return Y.name === R.type && (Y.target === R.target || R.target === Y.shadowParent) && Kr(Y.delta, T);
1752
1772
  })[0];
1753
1773
  if (j && j.should) {
1754
1774
  R.cancelable && R.preventDefault();
1755
1775
  return;
1756
1776
  }
1757
1777
  if (!j) {
1758
- var M = (c.current.shards || []).map(At).filter(Boolean).filter(function(Y) {
1778
+ var M = (c.current.shards || []).map(It).filter(Boolean).filter(function(Y) {
1759
1779
  return Y.contains(R.target);
1760
- }), B = M.length > 0 ? s(R, M[0]) : !c.current.noIsolation;
1761
- B && R.cancelable && R.preventDefault();
1780
+ }), $ = M.length > 0 ? s(R, M[0]) : !c.current.noIsolation;
1781
+ $ && R.cancelable && R.preventDefault();
1762
1782
  }
1763
1783
  }
1764
1784
  }, []), d = i.useCallback(function(g, R, T, j) {
1765
- var M = { name: g, delta: R, target: T, should: j, shadowParent: Kr(T) };
1785
+ var M = { name: g, delta: R, target: T, should: j, shadowParent: Jr(T) };
1766
1786
  t.current.push(M), setTimeout(function() {
1767
- t.current = t.current.filter(function(B) {
1768
- return B !== M;
1787
+ t.current = t.current.filter(function($) {
1788
+ return $ !== M;
1769
1789
  });
1770
1790
  }, 1);
1771
1791
  }, []), E = i.useCallback(function(g) {
1772
- n.current = $e(g), r.current = void 0;
1792
+ n.current = Be(g), r.current = void 0;
1773
1793
  }, []), y = i.useCallback(function(g) {
1774
1794
  d(g.type, Tt(g), g.target, s(g, e.lockRef.current));
1775
1795
  }, []), C = i.useCallback(function(g) {
1776
- d(g.type, $e(g), g.target, s(g, e.lockRef.current));
1796
+ d(g.type, Be(g), g.target, s(g, e.lockRef.current));
1777
1797
  }, []);
1778
1798
  i.useEffect(function() {
1779
1799
  return Ne.push(a), e.setCallbacks({
@@ -1786,42 +1806,42 @@ function Gr(e) {
1786
1806
  }), document.removeEventListener("wheel", h, Re), document.removeEventListener("touchmove", h, Re), document.removeEventListener("touchstart", E, Re);
1787
1807
  };
1788
1808
  }, []);
1789
- var _ = e.removeScrollBar, $ = e.inert;
1809
+ var _ = e.removeScrollBar, B = e.inert;
1790
1810
  return i.createElement(
1791
1811
  i.Fragment,
1792
1812
  null,
1793
- $ ? i.createElement(a, { styles: Yr(o) }) : null,
1794
- _ ? i.createElement(jr, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
1813
+ B ? i.createElement(a, { styles: Xr(o) }) : null,
1814
+ _ ? i.createElement(Br, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
1795
1815
  );
1796
1816
  }
1797
- function Kr(e) {
1817
+ function Jr(e) {
1798
1818
  for (var t = null; e !== null; )
1799
1819
  e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
1800
1820
  return t;
1801
1821
  }
1802
- const Xr = Sr(Ut, Gr);
1803
- var Gt = i.forwardRef(function(e, t) {
1804
- return i.createElement(Xe, fe({}, e, { ref: t, sideCar: Xr }));
1822
+ const Qr = Nr(Vt, Zr);
1823
+ var Xt = i.forwardRef(function(e, t) {
1824
+ return i.createElement(Xe, fe({}, e, { ref: t, sideCar: Qr }));
1805
1825
  });
1806
- Gt.classNames = Xe.classNames;
1807
- var qr = function(e) {
1826
+ Xt.classNames = Xe.classNames;
1827
+ var eo = function(e) {
1808
1828
  if (typeof document > "u")
1809
1829
  return null;
1810
1830
  var t = Array.isArray(e) ? e[0] : e;
1811
1831
  return t.ownerDocument.body;
1812
- }, Pe = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), Ue = {}, at = 0, Kt = function(e) {
1813
- return e && (e.host || Kt(e.parentNode));
1814
- }, Zr = function(e, t) {
1832
+ }, Pe = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap(), Ue = {}, at = 0, qt = function(e) {
1833
+ return e && (e.host || qt(e.parentNode));
1834
+ }, to = function(e, t) {
1815
1835
  return t.map(function(n) {
1816
1836
  if (e.contains(n))
1817
1837
  return n;
1818
- var r = Kt(n);
1838
+ var r = qt(n);
1819
1839
  return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
1820
1840
  }).filter(function(n) {
1821
1841
  return !!n;
1822
1842
  });
1823
- }, Jr = function(e, t, n, r) {
1824
- var o = Zr(t, Array.isArray(e) ? e : [e]);
1843
+ }, no = function(e, t, n, r) {
1844
+ var o = to(t, Array.isArray(e) ? e : [e]);
1825
1845
  Ue[n] || (Ue[n] = /* @__PURE__ */ new WeakMap());
1826
1846
  var a = Ue[n], c = [], s = /* @__PURE__ */ new Set(), h = new Set(o), d = function(y) {
1827
1847
  !y || s.has(y) || (s.add(y), d(y.parentNode));
@@ -1833,8 +1853,8 @@ var qr = function(e) {
1833
1853
  E(C);
1834
1854
  else
1835
1855
  try {
1836
- var _ = C.getAttribute(r), $ = _ !== null && _ !== "false", g = (Pe.get(C) || 0) + 1, R = (a.get(C) || 0) + 1;
1837
- Pe.set(C, g), a.set(C, R), c.push(C), g === 1 && $ && Be.set(C, !0), R === 1 && C.setAttribute(n, "true"), $ || C.setAttribute(r, "true");
1856
+ var _ = C.getAttribute(r), B = _ !== null && _ !== "false", g = (Pe.get(C) || 0) + 1, R = (a.get(C) || 0) + 1;
1857
+ Pe.set(C, g), a.set(C, R), c.push(C), g === 1 && B && $e.set(C, !0), R === 1 && C.setAttribute(n, "true"), B || C.setAttribute(r, "true");
1838
1858
  } catch (T) {
1839
1859
  console.error("aria-hidden: cannot operate on ", C, T);
1840
1860
  }
@@ -1843,16 +1863,16 @@ var qr = function(e) {
1843
1863
  return E(t), s.clear(), at++, function() {
1844
1864
  c.forEach(function(y) {
1845
1865
  var C = Pe.get(y) - 1, _ = a.get(y) - 1;
1846
- Pe.set(y, C), a.set(y, _), C || (Be.has(y) || y.removeAttribute(r), Be.delete(y)), _ || y.removeAttribute(n);
1847
- }), at--, at || (Pe = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), Ue = {});
1866
+ Pe.set(y, C), a.set(y, _), C || ($e.has(y) || y.removeAttribute(r), $e.delete(y)), _ || y.removeAttribute(n);
1867
+ }), at--, at || (Pe = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap(), Ue = {});
1848
1868
  };
1849
- }, Qr = function(e, t, n) {
1869
+ }, ro = function(e, t, n) {
1850
1870
  n === void 0 && (n = "data-aria-hidden");
1851
- var r = Array.from(Array.isArray(e) ? e : [e]), o = qr(e);
1852
- return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), Jr(r, o, n, "aria-hidden")) : function() {
1871
+ var r = Array.from(Array.isArray(e) ? e : [e]), o = eo(e);
1872
+ return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), no(r, o, n, "aria-hidden")) : function() {
1853
1873
  return null;
1854
1874
  };
1855
- }, qe = "Dialog", [Xt] = Dn(qe), [eo, ue] = Xt(qe), qt = (e) => {
1875
+ }, qe = "Dialog", [Zt] = Mn(qe), [oo, le] = Zt(qe), Jt = (e) => {
1856
1876
  const {
1857
1877
  __scopeDialog: t,
1858
1878
  children: n,
@@ -1860,14 +1880,14 @@ var qr = function(e) {
1860
1880
  defaultOpen: o,
1861
1881
  onOpenChange: a,
1862
1882
  modal: c = !0
1863
- } = e, s = i.useRef(null), h = i.useRef(null), [d, E] = Fn({
1883
+ } = e, s = i.useRef(null), h = i.useRef(null), [d, E] = Un({
1864
1884
  prop: r,
1865
1885
  defaultProp: o ?? !1,
1866
1886
  onChange: a,
1867
1887
  caller: qe
1868
1888
  });
1869
1889
  return /* @__PURE__ */ b.jsx(
1870
- eo,
1890
+ oo,
1871
1891
  {
1872
1892
  scope: t,
1873
1893
  triggerRef: s,
@@ -1883,10 +1903,10 @@ var qr = function(e) {
1883
1903
  }
1884
1904
  );
1885
1905
  };
1886
- qt.displayName = qe;
1887
- var Zt = "DialogTrigger", to = i.forwardRef(
1906
+ Jt.displayName = qe;
1907
+ var Qt = "DialogTrigger", ao = i.forwardRef(
1888
1908
  (e, t) => {
1889
- const { __scopeDialog: n, ...r } = e, o = ue(Zt, n), a = we(t, o.triggerRef);
1909
+ const { __scopeDialog: n, ...r } = e, o = le(Qt, n), a = we(t, o.triggerRef);
1890
1910
  return /* @__PURE__ */ b.jsx(
1891
1911
  ve.button,
1892
1912
  {
@@ -1902,28 +1922,28 @@ var Zt = "DialogTrigger", to = i.forwardRef(
1902
1922
  );
1903
1923
  }
1904
1924
  );
1905
- to.displayName = Zt;
1906
- var ut = "DialogPortal", [no, Jt] = Xt(ut, {
1925
+ ao.displayName = Qt;
1926
+ var lt = "DialogPortal", [so, en] = Zt(lt, {
1907
1927
  forceMount: void 0
1908
- }), Qt = (e) => {
1909
- const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, a = ue(ut, t);
1910
- return /* @__PURE__ */ b.jsx(no, { scope: t, forceMount: n, children: i.Children.map(r, (c) => /* @__PURE__ */ b.jsx(Ke, { present: n || a.open, children: /* @__PURE__ */ b.jsx(Wt, { asChild: !0, container: o, children: c }) })) });
1928
+ }), tn = (e) => {
1929
+ const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, a = le(lt, t);
1930
+ return /* @__PURE__ */ b.jsx(so, { scope: t, forceMount: n, children: i.Children.map(r, (c) => /* @__PURE__ */ b.jsx(Ke, { present: n || a.open, children: /* @__PURE__ */ b.jsx($t, { asChild: !0, container: o, children: c }) })) });
1911
1931
  };
1912
- Qt.displayName = ut;
1913
- var He = "DialogOverlay", en = i.forwardRef(
1932
+ tn.displayName = lt;
1933
+ var He = "DialogOverlay", nn = i.forwardRef(
1914
1934
  (e, t) => {
1915
- const n = Jt(He, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, a = ue(He, e.__scopeDialog);
1916
- return a.modal ? /* @__PURE__ */ b.jsx(Ke, { present: r || a.open, children: /* @__PURE__ */ b.jsx(oo, { ...o, ref: t }) }) : null;
1935
+ const n = en(He, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, a = le(He, e.__scopeDialog);
1936
+ return a.modal ? /* @__PURE__ */ b.jsx(Ke, { present: r || a.open, children: /* @__PURE__ */ b.jsx(co, { ...o, ref: t }) }) : null;
1917
1937
  }
1918
1938
  );
1919
- en.displayName = He;
1920
- var ro = /* @__PURE__ */ Dt("DialogOverlay.RemoveScroll"), oo = i.forwardRef(
1939
+ nn.displayName = He;
1940
+ var io = /* @__PURE__ */ Lt("DialogOverlay.RemoveScroll"), co = i.forwardRef(
1921
1941
  (e, t) => {
1922
- const { __scopeDialog: n, ...r } = e, o = ue(He, n);
1942
+ const { __scopeDialog: n, ...r } = e, o = le(He, n);
1923
1943
  return (
1924
1944
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
1925
1945
  // ie. when `Overlay` and `Content` are siblings
1926
- /* @__PURE__ */ b.jsx(Gt, { as: ro, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ b.jsx(
1946
+ /* @__PURE__ */ b.jsx(Xt, { as: io, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ b.jsx(
1927
1947
  ve.div,
1928
1948
  {
1929
1949
  "data-state": ft(o.open),
@@ -1934,21 +1954,21 @@ var ro = /* @__PURE__ */ Dt("DialogOverlay.RemoveScroll"), oo = i.forwardRef(
1934
1954
  ) })
1935
1955
  );
1936
1956
  }
1937
- ), xe = "DialogContent", tn = i.forwardRef(
1957
+ ), xe = "DialogContent", rn = i.forwardRef(
1938
1958
  (e, t) => {
1939
- const n = Jt(xe, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, a = ue(xe, e.__scopeDialog);
1940
- return /* @__PURE__ */ b.jsx(Ke, { present: r || a.open, children: a.modal ? /* @__PURE__ */ b.jsx(ao, { ...o, ref: t }) : /* @__PURE__ */ b.jsx(so, { ...o, ref: t }) });
1959
+ const n = en(xe, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, a = le(xe, e.__scopeDialog);
1960
+ return /* @__PURE__ */ b.jsx(Ke, { present: r || a.open, children: a.modal ? /* @__PURE__ */ b.jsx(lo, { ...o, ref: t }) : /* @__PURE__ */ b.jsx(uo, { ...o, ref: t }) });
1941
1961
  }
1942
1962
  );
1943
- tn.displayName = xe;
1944
- var ao = i.forwardRef(
1963
+ rn.displayName = xe;
1964
+ var lo = i.forwardRef(
1945
1965
  (e, t) => {
1946
- const n = ue(xe, e.__scopeDialog), r = i.useRef(null), o = we(t, n.contentRef, r);
1966
+ const n = le(xe, e.__scopeDialog), r = i.useRef(null), o = we(t, n.contentRef, r);
1947
1967
  return i.useEffect(() => {
1948
1968
  const a = r.current;
1949
- if (a) return Qr(a);
1969
+ if (a) return ro(a);
1950
1970
  }, []), /* @__PURE__ */ b.jsx(
1951
- nn,
1971
+ on,
1952
1972
  {
1953
1973
  ...e,
1954
1974
  ref: o,
@@ -1968,11 +1988,11 @@ var ao = i.forwardRef(
1968
1988
  }
1969
1989
  );
1970
1990
  }
1971
- ), so = i.forwardRef(
1991
+ ), uo = i.forwardRef(
1972
1992
  (e, t) => {
1973
- const n = ue(xe, e.__scopeDialog), r = i.useRef(!1), o = i.useRef(!1);
1993
+ const n = le(xe, e.__scopeDialog), r = i.useRef(!1), o = i.useRef(!1);
1974
1994
  return /* @__PURE__ */ b.jsx(
1975
- nn,
1995
+ on,
1976
1996
  {
1977
1997
  ...e,
1978
1998
  ref: t,
@@ -1989,12 +2009,12 @@ var ao = i.forwardRef(
1989
2009
  }
1990
2010
  );
1991
2011
  }
1992
- ), nn = i.forwardRef(
2012
+ ), on = i.forwardRef(
1993
2013
  (e, t) => {
1994
- const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, ...c } = e, s = ue(xe, n), h = i.useRef(null), d = we(t, h);
1995
- return vr(), /* @__PURE__ */ b.jsxs(b.Fragment, { children: [
2014
+ const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, ...c } = e, s = le(xe, n), h = i.useRef(null), d = we(t, h);
2015
+ return gr(), /* @__PURE__ */ b.jsxs(b.Fragment, { children: [
1996
2016
  /* @__PURE__ */ b.jsx(
1997
- Mt,
2017
+ Wt,
1998
2018
  {
1999
2019
  asChild: !0,
2000
2020
  loop: !0,
@@ -2002,7 +2022,7 @@ var ao = i.forwardRef(
2002
2022
  onMountAutoFocus: o,
2003
2023
  onUnmountAutoFocus: a,
2004
2024
  children: /* @__PURE__ */ b.jsx(
2005
- Lt,
2025
+ Mt,
2006
2026
  {
2007
2027
  role: "dialog",
2008
2028
  id: s.contentId,
@@ -2017,28 +2037,28 @@ var ao = i.forwardRef(
2017
2037
  }
2018
2038
  ),
2019
2039
  /* @__PURE__ */ b.jsxs(b.Fragment, { children: [
2020
- /* @__PURE__ */ b.jsx(co, { titleId: s.titleId }),
2021
- /* @__PURE__ */ b.jsx(lo, { contentRef: h, descriptionId: s.descriptionId })
2040
+ /* @__PURE__ */ b.jsx(vo, { titleId: s.titleId }),
2041
+ /* @__PURE__ */ b.jsx(mo, { contentRef: h, descriptionId: s.descriptionId })
2022
2042
  ] })
2023
2043
  ] });
2024
2044
  }
2025
- ), lt = "DialogTitle", rn = i.forwardRef(
2045
+ ), ut = "DialogTitle", an = i.forwardRef(
2026
2046
  (e, t) => {
2027
- const { __scopeDialog: n, ...r } = e, o = ue(lt, n);
2047
+ const { __scopeDialog: n, ...r } = e, o = le(ut, n);
2028
2048
  return /* @__PURE__ */ b.jsx(ve.h2, { id: o.titleId, ...r, ref: t });
2029
2049
  }
2030
2050
  );
2031
- rn.displayName = lt;
2032
- var on = "DialogDescription", an = i.forwardRef(
2051
+ an.displayName = ut;
2052
+ var sn = "DialogDescription", cn = i.forwardRef(
2033
2053
  (e, t) => {
2034
- const { __scopeDialog: n, ...r } = e, o = ue(on, n);
2054
+ const { __scopeDialog: n, ...r } = e, o = le(sn, n);
2035
2055
  return /* @__PURE__ */ b.jsx(ve.p, { id: o.descriptionId, ...r, ref: t });
2036
2056
  }
2037
2057
  );
2038
- an.displayName = on;
2039
- var sn = "DialogClose", io = i.forwardRef(
2058
+ cn.displayName = sn;
2059
+ var ln = "DialogClose", fo = i.forwardRef(
2040
2060
  (e, t) => {
2041
- const { __scopeDialog: n, ...r } = e, o = ue(sn, n);
2061
+ const { __scopeDialog: n, ...r } = e, o = le(ln, n);
2042
2062
  return /* @__PURE__ */ b.jsx(
2043
2063
  ve.button,
2044
2064
  {
@@ -2050,16 +2070,16 @@ var sn = "DialogClose", io = i.forwardRef(
2050
2070
  );
2051
2071
  }
2052
2072
  );
2053
- io.displayName = sn;
2073
+ fo.displayName = ln;
2054
2074
  function ft(e) {
2055
2075
  return e ? "open" : "closed";
2056
2076
  }
2057
- var cn = "DialogTitleWarning", [Uo, un] = In(cn, {
2077
+ var un = "DialogTitleWarning", [Ho, fn] = jn(un, {
2058
2078
  contentName: xe,
2059
- titleName: lt,
2079
+ titleName: ut,
2060
2080
  docsSlug: "dialog"
2061
- }), co = ({ titleId: e }) => {
2062
- const t = un(cn), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2081
+ }), vo = ({ titleId: e }) => {
2082
+ const t = fn(un), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2063
2083
 
2064
2084
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
2065
2085
 
@@ -2067,25 +2087,25 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
2067
2087
  return i.useEffect(() => {
2068
2088
  e && (document.getElementById(e) || console.error(n));
2069
2089
  }, [n, e]), null;
2070
- }, uo = "DialogDescriptionWarning", lo = ({ contentRef: e, descriptionId: t }) => {
2071
- const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${un(uo).contentName}}.`;
2090
+ }, po = "DialogDescriptionWarning", mo = ({ contentRef: e, descriptionId: t }) => {
2091
+ const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${fn(po).contentName}}.`;
2072
2092
  return i.useEffect(() => {
2073
2093
  const o = e.current?.getAttribute("aria-describedby");
2074
2094
  t && o && (document.getElementById(t) || console.warn(r));
2075
2095
  }, [r, e, t]), null;
2076
- }, fo = qt, vo = Qt, po = en, mo = tn, ho = rn, go = an, yo = /* @__PURE__ */ Symbol.for("react.lazy"), Ge = i[" use ".trim().toString()];
2077
- function bo(e) {
2096
+ }, ho = Jt, go = tn, yo = nn, bo = rn, Eo = an, xo = cn, wo = /* @__PURE__ */ Symbol.for("react.lazy"), Ge = i[" use ".trim().toString()];
2097
+ function So(e) {
2078
2098
  return typeof e == "object" && e !== null && "then" in e;
2079
2099
  }
2080
- function ln(e) {
2081
- return e != null && typeof e == "object" && "$$typeof" in e && e.$$typeof === yo && "_payload" in e && bo(e._payload);
2100
+ function dn(e) {
2101
+ return e != null && typeof e == "object" && "$$typeof" in e && e.$$typeof === wo && "_payload" in e && So(e._payload);
2082
2102
  }
2083
2103
  // @__NO_SIDE_EFFECTS__
2084
- function Eo(e) {
2085
- const t = /* @__PURE__ */ xo(e), n = i.forwardRef((r, o) => {
2104
+ function _o(e) {
2105
+ const t = /* @__PURE__ */ Co(e), n = i.forwardRef((r, o) => {
2086
2106
  let { children: a, ...c } = r;
2087
- ln(a) && typeof Ge == "function" && (a = Ge(a._payload));
2088
- const s = i.Children.toArray(a), h = s.find(So);
2107
+ dn(a) && typeof Ge == "function" && (a = Ge(a._payload));
2108
+ const s = i.Children.toArray(a), h = s.find(No);
2089
2109
  if (h) {
2090
2110
  const d = h.props.children, E = s.map((y) => y === h ? i.Children.count(d) > 1 ? i.Children.only(null) : i.isValidElement(d) ? d.props.children : null : y);
2091
2111
  return /* @__PURE__ */ b.jsx(t, { ...c, ref: o, children: i.isValidElement(d) ? i.cloneElement(d, void 0, E) : null });
@@ -2095,22 +2115,22 @@ function Eo(e) {
2095
2115
  return n.displayName = `${e}.Slot`, n;
2096
2116
  }
2097
2117
  // @__NO_SIDE_EFFECTS__
2098
- function xo(e) {
2118
+ function Co(e) {
2099
2119
  const t = i.forwardRef((n, r) => {
2100
2120
  let { children: o, ...a } = n;
2101
- if (ln(o) && typeof Ge == "function" && (o = Ge(o._payload)), i.isValidElement(o)) {
2102
- const c = Co(o), s = _o(a, o.props);
2121
+ if (dn(o) && typeof Ge == "function" && (o = Ge(o._payload)), i.isValidElement(o)) {
2122
+ const c = Oo(o), s = Po(a, o.props);
2103
2123
  return o.type !== i.Fragment && (s.ref = r ? ct(r, c) : c), i.cloneElement(o, s);
2104
2124
  }
2105
2125
  return i.Children.count(o) > 1 ? i.Children.only(null) : null;
2106
2126
  });
2107
2127
  return t.displayName = `${e}.SlotClone`, t;
2108
2128
  }
2109
- var wo = /* @__PURE__ */ Symbol("radix.slottable");
2110
- function So(e) {
2111
- return i.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === wo;
2129
+ var Ro = /* @__PURE__ */ Symbol("radix.slottable");
2130
+ function No(e) {
2131
+ return i.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Ro;
2112
2132
  }
2113
- function _o(e, t) {
2133
+ function Po(e, t) {
2114
2134
  const n = { ...t };
2115
2135
  for (const r in t) {
2116
2136
  const o = e[r], a = t[r];
@@ -2121,11 +2141,11 @@ function _o(e, t) {
2121
2141
  }
2122
2142
  return { ...e, ...n };
2123
2143
  }
2124
- function Co(e) {
2144
+ function Oo(e) {
2125
2145
  let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
2126
2146
  return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
2127
2147
  }
2128
- var Ro = [
2148
+ var To = [
2129
2149
  "a",
2130
2150
  "button",
2131
2151
  "div",
@@ -2143,13 +2163,13 @@ var Ro = [
2143
2163
  "span",
2144
2164
  "svg",
2145
2165
  "ul"
2146
- ], No = Ro.reduce((e, t) => {
2147
- const n = /* @__PURE__ */ Eo(`Primitive.${t}`), r = i.forwardRef((o, a) => {
2166
+ ], Io = To.reduce((e, t) => {
2167
+ const n = /* @__PURE__ */ _o(`Primitive.${t}`), r = i.forwardRef((o, a) => {
2148
2168
  const { asChild: c, ...s } = o, h = c ? n : t;
2149
2169
  return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ b.jsx(h, { ...s, ref: a });
2150
2170
  });
2151
2171
  return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
2152
- }, {}), Po = Object.freeze({
2172
+ }, {}), Ao = Object.freeze({
2153
2173
  // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
2154
2174
  position: "absolute",
2155
2175
  border: 0,
@@ -2161,21 +2181,21 @@ var Ro = [
2161
2181
  clip: "rect(0, 0, 0, 0)",
2162
2182
  whiteSpace: "nowrap",
2163
2183
  wordWrap: "normal"
2164
- }), Oo = "VisuallyHidden", fn = i.forwardRef(
2184
+ }), Do = "VisuallyHidden", vn = i.forwardRef(
2165
2185
  (e, t) => /* @__PURE__ */ b.jsx(
2166
- No.span,
2186
+ Io.span,
2167
2187
  {
2168
2188
  ...e,
2169
2189
  ref: t,
2170
- style: { ...Po, ...e.style }
2190
+ style: { ...Ao, ...e.style }
2171
2191
  }
2172
2192
  )
2173
2193
  );
2174
- fn.displayName = Oo;
2175
- var To = fn;
2176
- function Ao({ open: e, onOpenChange: t, children: n }) {
2177
- return /* @__PURE__ */ b.jsx(fo, { open: e, onOpenChange: t, children: /* @__PURE__ */ b.jsxs(vo, { children: [
2178
- /* @__PURE__ */ b.jsx(po, { className: "fixed inset-0 bg-black/30 backdrop-blur-sm" }),
2194
+ vn.displayName = Do;
2195
+ var ko = vn;
2196
+ function Lo({ open: e, onOpenChange: t, children: n }) {
2197
+ return /* @__PURE__ */ b.jsx(ho, { open: e, onOpenChange: t, children: /* @__PURE__ */ b.jsxs(go, { children: [
2198
+ /* @__PURE__ */ b.jsx(yo, { className: "fixed inset-0 bg-black/40" }),
2179
2199
  /* @__PURE__ */ b.jsx(
2180
2200
  "div",
2181
2201
  {
@@ -2188,7 +2208,7 @@ function Ao({ open: e, onOpenChange: t, children: n }) {
2188
2208
  `,
2189
2209
  "data-state": e ? "open" : "closed",
2190
2210
  children: /* @__PURE__ */ b.jsxs(
2191
- mo,
2211
+ bo,
2192
2212
  {
2193
2213
  "aria-describedby": "command-palette-description",
2194
2214
  className: `
@@ -2197,13 +2217,12 @@ function Ao({ open: e, onOpenChange: t, children: n }) {
2197
2217
  border border-[rgb(var(--border))]
2198
2218
  bg-[rgb(var(--glass))]
2199
2219
  text-[rgb(var(--fg))]
2200
- backdrop-blur-xl
2201
2220
  shadow-xl
2202
2221
  `,
2203
2222
  children: [
2204
- /* @__PURE__ */ b.jsxs(To, { children: [
2205
- /* @__PURE__ */ b.jsx(ho, { children: "Command Palette" }),
2206
- /* @__PURE__ */ b.jsx(go, { id: "command-palette-description", children: "Type to search and run commands" })
2223
+ /* @__PURE__ */ b.jsxs(ko, { children: [
2224
+ /* @__PURE__ */ b.jsx(Eo, { children: "Command Palette" }),
2225
+ /* @__PURE__ */ b.jsx(xo, { id: "command-palette-description", children: "Type to search and run commands" })
2207
2226
  ] }),
2208
2227
  n
2209
2228
  ]
@@ -2213,8 +2232,8 @@ function Ao({ open: e, onOpenChange: t, children: n }) {
2213
2232
  )
2214
2233
  ] }) });
2215
2234
  }
2216
- function Io() {
2217
- const e = te((r) => r.query), t = te((r) => r.setQuery), n = It(null);
2235
+ function jo() {
2236
+ const e = te((r) => r.query), t = te((r) => r.setQuery), n = Dt(null);
2218
2237
  return Te(() => {
2219
2238
  const r = requestAnimationFrame(() => {
2220
2239
  n.current?.focus();
@@ -2241,7 +2260,7 @@ function Io() {
2241
2260
  }
2242
2261
  );
2243
2262
  }
2244
- function Do(e) {
2263
+ function Mo(e) {
2245
2264
  const t = /* @__PURE__ */ new Map();
2246
2265
  for (const n of e) {
2247
2266
  const r = n.item.group ?? "Other";
@@ -2252,7 +2271,7 @@ function Do(e) {
2252
2271
  items: r
2253
2272
  }));
2254
2273
  }
2255
- function ko(e, t) {
2274
+ function Fo(e, t) {
2256
2275
  Te(() => {
2257
2276
  t && e.current && e.current.scrollIntoView({
2258
2277
  block: "nearest",
@@ -2260,19 +2279,27 @@ function ko(e, t) {
2260
2279
  });
2261
2280
  }, [t, e]);
2262
2281
  }
2263
- function Lo(e, t) {
2264
- return !t || t.length === 0 ? e : e.split("").map(
2265
- (n, r) => t.includes(r) ? /* @__PURE__ */ b.jsx("span", { className: "text-blue-400", children: n }, r) : /* @__PURE__ */ b.jsx("span", { children: n }, r)
2282
+ function At(e, t) {
2283
+ if (!t || t.length === 0)
2284
+ return e;
2285
+ const n = new Set(t), r = [];
2286
+ for (let o = 0; o < e.length; o++) {
2287
+ const a = n.has(o), c = r[r.length - 1];
2288
+ c && c.highlight === a ? c.text += e[o] : r.push({ text: e[o], highlight: a });
2289
+ }
2290
+ return r.map(
2291
+ (o, a) => o.highlight ? /* @__PURE__ */ b.jsx("span", { className: "text-blue-400", children: o.text }, a) : /* @__PURE__ */ b.jsx("span", { children: o.text }, a)
2266
2292
  );
2267
2293
  }
2268
- function jo({ command: e, matchIndexes: t, index: n }) {
2269
- const r = te((s) => s.close), o = te((s) => s.selectedIndex), a = n === o, c = It(null);
2270
- return ko(c, a), /* @__PURE__ */ b.jsx("li", { children: /* @__PURE__ */ b.jsxs(
2294
+ function Wo({ command: e, titleIndexes: t, subtitleIndexes: n, index: r }) {
2295
+ const o = te((s) => s.close), a = te((s) => s.selectedIndex === r), c = Dt(null);
2296
+ return Fo(c, a), /* @__PURE__ */ b.jsx("li", { children: /* @__PURE__ */ b.jsxs(
2271
2297
  "button",
2272
2298
  {
2273
2299
  ref: c,
2300
+ "aria-label": e.title,
2274
2301
  onClick: async () => {
2275
- await Tn(e), r();
2302
+ await kt(e), o();
2276
2303
  },
2277
2304
  className: `
2278
2305
  flex w-full items-center justify-between
@@ -2280,47 +2307,43 @@ function jo({ command: e, matchIndexes: t, index: n }) {
2280
2307
  ${a ? "bg-zinc-800 text-white" : "text-zinc-100 hover:bg-zinc-800"}
2281
2308
  `,
2282
2309
  children: [
2283
- /* @__PURE__ */ b.jsx("span", { children: Lo(e.title, t) }),
2310
+ /* @__PURE__ */ b.jsxs("span", { className: "flex flex-col", children: [
2311
+ /* @__PURE__ */ b.jsx("span", { children: At(e.title, t) }),
2312
+ e.subtitle && /* @__PURE__ */ b.jsx("span", { className: "text-xs text-[rgb(var(--muted))]", children: At(e.subtitle, n) })
2313
+ ] }),
2284
2314
  e.shortcut && /* @__PURE__ */ b.jsx("span", { className: "text-xs text-zinc-500", children: e.shortcut })
2285
2315
  ]
2286
2316
  }
2287
2317
  ) });
2288
2318
  }
2289
- function Mo() {
2319
+ const Bo = hn(Wo);
2320
+ function $o() {
2290
2321
  const e = te((r) => r.results);
2291
2322
  if (e.length === 0)
2292
2323
  return /* @__PURE__ */ b.jsxs("div", { className: "px-3 py-8 text-center text-sm text-[rgb(var(--muted))]", children: [
2293
2324
  /* @__PURE__ */ b.jsx("p", { children: "No matching commands" }),
2294
2325
  /* @__PURE__ */ b.jsx("p", { className: "mt-1 text-xs", children: "Try a different keyword" })
2295
2326
  ] });
2296
- const t = Do(e);
2327
+ const t = Mo(e);
2297
2328
  let n = 0;
2298
- return /* @__PURE__ */ b.jsx(
2299
- "div",
2300
- {
2301
- className: `max-h-64 overflow-y-auto transition-opacity
2302
- duration-150
2303
- opacity-100
2304
- data-[empty=true]:opacity-60`,
2305
- children: t.map(({ group: r, items: o }) => /* @__PURE__ */ b.jsxs("div", { children: [
2306
- /* @__PURE__ */ b.jsx("div", { className: "px-3 py-2 text-xs font-semibold text-zinc-500", children: r }),
2307
- /* @__PURE__ */ b.jsx("ul", { children: o.map((a) => {
2308
- const c = n++;
2309
- return /* @__PURE__ */ b.jsx(
2310
- jo,
2311
- {
2312
- command: a.item,
2313
- matchIndexes: a.indexes,
2314
- index: c
2315
- },
2316
- a.item.id
2317
- );
2318
- }) })
2319
- ] }, r))
2320
- }
2321
- );
2329
+ return /* @__PURE__ */ b.jsx("div", { className: "max-h-64 overflow-y-auto overscroll-contain [contain:layout_paint] transition-opacity duration-150 opacity-100", children: t.map(({ group: r, items: o }) => /* @__PURE__ */ b.jsxs("div", { children: [
2330
+ /* @__PURE__ */ b.jsx("div", { className: "px-3 py-2 text-xs font-semibold text-zinc-500", children: r }),
2331
+ /* @__PURE__ */ b.jsx("ul", { children: o.map((a) => {
2332
+ const c = n++;
2333
+ return /* @__PURE__ */ b.jsx(
2334
+ Bo,
2335
+ {
2336
+ command: a.item,
2337
+ titleIndexes: a.titleIndexes,
2338
+ subtitleIndexes: a.subtitleIndexes,
2339
+ index: c
2340
+ },
2341
+ a.item.id
2342
+ );
2343
+ }) })
2344
+ ] }, r)) });
2322
2345
  }
2323
- function Fo() {
2346
+ function Uo() {
2324
2347
  const e = te((c) => c.isOpen), t = te((c) => c.close), n = te((c) => c.selectNext), r = te((c) => c.selectPrev), o = te((c) => c.results), a = te((c) => c.selectedIndex);
2325
2348
  Te(() => {
2326
2349
  if (!e) return;
@@ -2335,7 +2358,7 @@ function Fo() {
2335
2358
  case "Enter":
2336
2359
  s.preventDefault();
2337
2360
  const h = o[a];
2338
- h && (h.item.run(), t());
2361
+ h && (kt(h.item), t());
2339
2362
  break;
2340
2363
  case "Escape":
2341
2364
  s.preventDefault(), t();
@@ -2345,10 +2368,10 @@ function Fo() {
2345
2368
  return window.addEventListener("keydown", c), () => window.removeEventListener("keydown", c);
2346
2369
  }, [e, n, r, t, o, a]);
2347
2370
  }
2348
- function Wo({ onOpenChange: e }) {
2371
+ function zo({ onOpenChange: e }) {
2349
2372
  const t = te((r) => r.isOpen), n = te((r) => r.close);
2350
- return Fo(), /* @__PURE__ */ b.jsx(
2351
- Ao,
2373
+ return Uo(), /* @__PURE__ */ b.jsx(
2374
+ Lo,
2352
2375
  {
2353
2376
  open: t,
2354
2377
  onOpenChange: (r) => {
@@ -2370,29 +2393,29 @@ function Wo({ onOpenChange: e }) {
2370
2393
  ]
2371
2394
  }
2372
2395
  ),
2373
- /* @__PURE__ */ b.jsx(Io, {}),
2374
- /* @__PURE__ */ b.jsx(Mo, {})
2396
+ /* @__PURE__ */ b.jsx(jo, {}),
2397
+ /* @__PURE__ */ b.jsx($o, {})
2375
2398
  ] })
2376
2399
  }
2377
2400
  );
2378
2401
  }
2379
- function zo({ commands: e, open: t, onOpenChange: n }) {
2380
- const r = te((c) => c.open), o = te((c) => c.close), a = te((c) => c.registerCommands);
2381
- return An(() => {
2382
- n?.(!0), r();
2383
- }), Te(() => {
2384
- a(e);
2385
- }, [e, a]), Te(() => {
2386
- t !== void 0 && (t ? r() : o());
2387
- }, [t, r, o]), /* @__PURE__ */ b.jsx(
2388
- Wo,
2402
+ function Go({ commands: e, open: t, onOpenChange: n, shortcut: r }) {
2403
+ const o = te((s) => s.open), a = te((s) => s.close), c = te((s) => s.registerCommands);
2404
+ return Ln(() => {
2405
+ n?.(!0), o();
2406
+ }, r), Te(() => {
2407
+ c(e);
2408
+ }, [e, c]), Te(() => {
2409
+ t !== void 0 && (t ? o() : a());
2410
+ }, [t, o, a]), /* @__PURE__ */ b.jsx(
2411
+ zo,
2389
2412
  {
2390
- onOpenChange: (c) => {
2391
- n?.(c), c || o();
2413
+ onOpenChange: (s) => {
2414
+ n?.(s), s || a();
2392
2415
  }
2393
2416
  }
2394
2417
  );
2395
2418
  }
2396
2419
  export {
2397
- zo as GlyphX
2420
+ Go as GlyphX
2398
2421
  };