@rinzai/zen 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/zen.js +1031 -1471
  2. package/package.json +12 -10
package/dist/zen.js CHANGED
@@ -1,479 +1,39 @@
1
- import * as M from "react";
2
- import Vt, { useLayoutEffect as Ft, useEffect as Oe, useState as je, useId as $t, useMemo as Ye, useRef as yt } from "react";
3
- import * as Bt from "react-dom";
4
- import { createPortal as Yt, flushSync as Ht } from "react-dom";
5
- var Ee = { exports: {} }, xe = {};
6
- /**
7
- * @license React
8
- * react-jsx-runtime.production.js
9
- *
10
- * Copyright (c) Meta Platforms, Inc. and affiliates.
11
- *
12
- * This source code is licensed under the MIT license found in the
13
- * LICENSE file in the root directory of this source tree.
14
- */
15
- var at;
16
- function Ut() {
17
- if (at) return xe;
18
- at = 1;
19
- var e = Symbol.for("react.transitional.element"), o = Symbol.for("react.fragment");
20
- function t(n, r, s) {
21
- var l = null;
22
- if (s !== void 0 && (l = "" + s), r.key !== void 0 && (l = "" + r.key), "key" in r) {
23
- s = {};
24
- for (var c in r)
25
- c !== "key" && (s[c] = r[c]);
26
- } else s = r;
27
- return r = s.ref, {
28
- $$typeof: e,
29
- type: n,
30
- key: l,
31
- ref: r !== void 0 ? r : null,
32
- props: s
33
- };
34
- }
35
- return xe.Fragment = o, xe.jsx = t, xe.jsxs = t, xe;
36
- }
37
- var ve = {};
38
- /**
39
- * @license React
40
- * react-jsx-runtime.development.js
41
- *
42
- * Copyright (c) Meta Platforms, Inc. and affiliates.
43
- *
44
- * This source code is licensed under the MIT license found in the
45
- * LICENSE file in the root directory of this source tree.
46
- */
47
- var ut;
48
- function qt() {
49
- return ut || (ut = 1, process.env.NODE_ENV !== "production" && function() {
50
- function e(i) {
51
- if (i == null) return null;
52
- if (typeof i == "function")
53
- return i.$$typeof === k ? null : i.displayName || i.name || null;
54
- if (typeof i == "string") return i;
55
- switch (i) {
56
- case j:
57
- return "Fragment";
58
- case S:
59
- return "Portal";
60
- case W:
61
- return "Profiler";
62
- case D:
63
- return "StrictMode";
64
- case Z:
65
- return "Suspense";
66
- case $:
67
- return "SuspenseList";
68
- }
69
- if (typeof i == "object")
70
- switch (typeof i.tag == "number" && console.error(
71
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
72
- ), i.$$typeof) {
73
- case F:
74
- return (i.displayName || "Context") + ".Provider";
75
- case K:
76
- return (i._context.displayName || "Context") + ".Consumer";
77
- case q:
78
- var x = i.render;
79
- return i = i.displayName, i || (i = x.displayName || x.name || "", i = i !== "" ? "ForwardRef(" + i + ")" : "ForwardRef"), i;
80
- case z:
81
- return x = i.displayName || null, x !== null ? x : e(i.type) || "Memo";
82
- case Q:
83
- x = i._payload, i = i._init;
84
- try {
85
- return e(i(x));
86
- } catch {
87
- }
88
- }
89
- return null;
90
- }
91
- function o(i) {
92
- return "" + i;
93
- }
94
- function t(i) {
95
- try {
96
- o(i);
97
- var x = !1;
98
- } catch {
99
- x = !0;
100
- }
101
- if (x) {
102
- x = console;
103
- var v = x.error, T = typeof Symbol == "function" && Symbol.toStringTag && i[Symbol.toStringTag] || i.constructor.name || "Object";
104
- return v.call(
105
- x,
106
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
107
- T
108
- ), o(i);
109
- }
110
- }
111
- function n() {
112
- }
113
- function r() {
114
- if (ge === 0) {
115
- Ke = console.log, Ze = console.info, Qe = console.warn, et = console.error, tt = console.group, nt = console.groupCollapsed, ot = console.groupEnd;
116
- var i = {
117
- configurable: !0,
118
- enumerable: !0,
119
- value: n,
120
- writable: !0
121
- };
122
- Object.defineProperties(console, {
123
- info: i,
124
- log: i,
125
- warn: i,
126
- error: i,
127
- group: i,
128
- groupCollapsed: i,
129
- groupEnd: i
130
- });
131
- }
132
- ge++;
133
- }
134
- function s() {
135
- if (ge--, ge === 0) {
136
- var i = { configurable: !0, enumerable: !0, writable: !0 };
137
- Object.defineProperties(console, {
138
- log: re({}, i, { value: Ke }),
139
- info: re({}, i, { value: Ze }),
140
- warn: re({}, i, { value: Qe }),
141
- error: re({}, i, { value: et }),
142
- group: re({}, i, { value: tt }),
143
- groupCollapsed: re({}, i, { value: nt }),
144
- groupEnd: re({}, i, { value: ot })
145
- });
146
- }
147
- 0 > ge && console.error(
148
- "disabledDepth fell below zero. This is a bug in React. Please file an issue."
149
- );
150
- }
151
- function l(i) {
152
- if (De === void 0)
153
- try {
154
- throw Error();
155
- } catch (v) {
156
- var x = v.stack.trim().match(/\n( *(at )?)/);
157
- De = x && x[1] || "", rt = -1 < v.stack.indexOf(`
158
- at`) ? " (<anonymous>)" : -1 < v.stack.indexOf("@") ? "@unknown:0:0" : "";
159
- }
160
- return `
161
- ` + De + i + rt;
162
- }
163
- function c(i, x) {
164
- if (!i || We) return "";
165
- var v = Ve.get(i);
166
- if (v !== void 0) return v;
167
- We = !0, v = Error.prepareStackTrace, Error.prepareStackTrace = void 0;
168
- var T = null;
169
- T = _.H, _.H = null, r();
170
- try {
171
- var N = {
172
- DetermineComponentFrameRoot: function() {
173
- try {
174
- if (x) {
175
- var ne = function() {
176
- throw Error();
177
- };
178
- if (Object.defineProperty(ne.prototype, "props", {
179
- set: function() {
180
- throw Error();
181
- }
182
- }), typeof Reflect == "object" && Reflect.construct) {
183
- try {
184
- Reflect.construct(ne, []);
185
- } catch (te) {
186
- var ye = te;
187
- }
188
- Reflect.construct(i, [], ne);
189
- } else {
190
- try {
191
- ne.call();
192
- } catch (te) {
193
- ye = te;
194
- }
195
- i.call(ne.prototype);
196
- }
197
- } else {
198
- try {
199
- throw Error();
200
- } catch (te) {
201
- ye = te;
202
- }
203
- (ne = i()) && typeof ne.catch == "function" && ne.catch(function() {
204
- });
205
- }
206
- } catch (te) {
207
- if (te && ye && typeof te.stack == "string")
208
- return [te.stack, ye.stack];
209
- }
210
- return [null, null];
211
- }
212
- };
213
- N.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
214
- var A = Object.getOwnPropertyDescriptor(
215
- N.DetermineComponentFrameRoot,
216
- "name"
217
- );
218
- A && A.configurable && Object.defineProperty(
219
- N.DetermineComponentFrameRoot,
220
- "name",
221
- { value: "DetermineComponentFrameRoot" }
222
- );
223
- var C = N.DetermineComponentFrameRoot(), ee = C[0], ae = C[1];
224
- if (ee && ae) {
225
- var P = ee.split(`
226
- `), se = ae.split(`
227
- `);
228
- for (C = A = 0; A < P.length && !P[A].includes(
229
- "DetermineComponentFrameRoot"
230
- ); )
231
- A++;
232
- for (; C < se.length && !se[C].includes(
233
- "DetermineComponentFrameRoot"
234
- ); )
235
- C++;
236
- if (A === P.length || C === se.length)
237
- for (A = P.length - 1, C = se.length - 1; 1 <= A && 0 <= C && P[A] !== se[C]; )
238
- C--;
239
- for (; 1 <= A && 0 <= C; A--, C--)
240
- if (P[A] !== se[C]) {
241
- if (A !== 1 || C !== 1)
242
- do
243
- if (A--, C--, 0 > C || P[A] !== se[C]) {
244
- var pe = `
245
- ` + P[A].replace(
246
- " at new ",
247
- " at "
248
- );
249
- return i.displayName && pe.includes("<anonymous>") && (pe = pe.replace("<anonymous>", i.displayName)), typeof i == "function" && Ve.set(i, pe), pe;
250
- }
251
- while (1 <= A && 0 <= C);
252
- break;
253
- }
254
- }
255
- } finally {
256
- We = !1, _.H = T, s(), Error.prepareStackTrace = v;
257
- }
258
- return P = (P = i ? i.displayName || i.name : "") ? l(P) : "", typeof i == "function" && Ve.set(i, P), P;
259
- }
260
- function a(i) {
261
- if (i == null) return "";
262
- if (typeof i == "function") {
263
- var x = i.prototype;
264
- return c(
265
- i,
266
- !(!x || !x.isReactComponent)
267
- );
268
- }
269
- if (typeof i == "string") return l(i);
270
- switch (i) {
271
- case Z:
272
- return l("Suspense");
273
- case $:
274
- return l("SuspenseList");
275
- }
276
- if (typeof i == "object")
277
- switch (i.$$typeof) {
278
- case q:
279
- return i = c(i.render, !1), i;
280
- case z:
281
- return a(i.type);
282
- case Q:
283
- x = i._payload, i = i._init;
284
- try {
285
- return a(i(x));
286
- } catch {
287
- }
288
- }
289
- return "";
290
- }
291
- function u() {
292
- var i = _.A;
293
- return i === null ? null : i.getOwner();
294
- }
295
- function f(i) {
296
- if (Y.call(i, "key")) {
297
- var x = Object.getOwnPropertyDescriptor(i, "key").get;
298
- if (x && x.isReactWarning) return !1;
299
- }
300
- return i.key !== void 0;
301
- }
302
- function d(i, x) {
303
- function v() {
304
- st || (st = !0, console.error(
305
- "%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)",
306
- x
307
- ));
308
- }
309
- v.isReactWarning = !0, Object.defineProperty(i, "key", {
310
- get: v,
311
- configurable: !0
312
- });
313
- }
314
- function p() {
315
- var i = e(this.type);
316
- return it[i] || (it[i] = !0, console.error(
317
- "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."
318
- )), i = this.props.ref, i !== void 0 ? i : null;
319
- }
320
- function m(i, x, v, T, N, A) {
321
- return v = A.ref, i = {
322
- $$typeof: R,
323
- type: i,
324
- key: x,
325
- props: A,
326
- _owner: N
327
- }, (v !== void 0 ? v : null) !== null ? Object.defineProperty(i, "ref", {
328
- enumerable: !1,
329
- get: p
330
- }) : Object.defineProperty(i, "ref", { enumerable: !1, value: null }), i._store = {}, Object.defineProperty(i._store, "validated", {
331
- configurable: !1,
332
- enumerable: !1,
333
- writable: !0,
334
- value: 0
335
- }), Object.defineProperty(i, "_debugInfo", {
336
- configurable: !1,
337
- enumerable: !1,
338
- writable: !0,
339
- value: null
340
- }), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
341
- }
342
- function h(i, x, v, T, N, A) {
343
- if (typeof i == "string" || typeof i == "function" || i === j || i === W || i === D || i === Z || i === $ || i === I || typeof i == "object" && i !== null && (i.$$typeof === Q || i.$$typeof === z || i.$$typeof === F || i.$$typeof === K || i.$$typeof === q || i.$$typeof === Dt || i.getModuleId !== void 0)) {
344
- var C = x.children;
345
- if (C !== void 0)
346
- if (T)
347
- if (Le(C)) {
348
- for (T = 0; T < C.length; T++)
349
- b(C[T], i);
350
- Object.freeze && Object.freeze(C);
351
- } else
352
- console.error(
353
- "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
354
- );
355
- else b(C, i);
356
- } else
357
- C = "", (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (C += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), i === null ? T = "null" : Le(i) ? T = "array" : i !== void 0 && i.$$typeof === R ? (T = "<" + (e(i.type) || "Unknown") + " />", C = " Did you accidentally export a JSX literal instead of a component?") : T = typeof i, console.error(
358
- "React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
359
- T,
360
- C
361
- );
362
- if (Y.call(x, "key")) {
363
- C = e(i);
364
- var ee = Object.keys(x).filter(function(P) {
365
- return P !== "key";
366
- });
367
- T = 0 < ee.length ? "{key: someKey, " + ee.join(": ..., ") + ": ...}" : "{key: someKey}", lt[C + T] || (ee = 0 < ee.length ? "{" + ee.join(": ..., ") + ": ...}" : "{}", console.error(
368
- `A props object containing a "key" prop is being spread into JSX:
369
- let props = %s;
370
- <%s {...props} />
371
- React keys must be passed directly to JSX without using spread:
372
- let props = %s;
373
- <%s key={someKey} {...props} />`,
374
- T,
375
- C,
376
- ee,
377
- C
378
- ), lt[C + T] = !0);
379
- }
380
- if (C = null, v !== void 0 && (t(v), C = "" + v), f(x) && (t(x.key), C = "" + x.key), "key" in x) {
381
- v = {};
382
- for (var ae in x)
383
- ae !== "key" && (v[ae] = x[ae]);
384
- } else v = x;
385
- return C && d(
386
- v,
387
- typeof i == "function" ? i.displayName || i.name || "Unknown" : i
388
- ), m(i, C, A, N, u(), v);
389
- }
390
- function b(i, x) {
391
- if (typeof i == "object" && i && i.$$typeof !== Wt) {
392
- if (Le(i))
393
- for (var v = 0; v < i.length; v++) {
394
- var T = i[v];
395
- y(T) && g(T, x);
396
- }
397
- else if (y(i))
398
- i._store && (i._store.validated = 1);
399
- else if (i === null || typeof i != "object" ? v = null : (v = B && i[B] || i["@@iterator"], v = typeof v == "function" ? v : null), typeof v == "function" && v !== i.entries && (v = v.call(i), v !== i))
400
- for (; !(i = v.next()).done; )
401
- y(i.value) && g(i.value, x);
402
- }
403
- }
404
- function y(i) {
405
- return typeof i == "object" && i !== null && i.$$typeof === R;
406
- }
407
- function g(i, x) {
408
- if (i._store && !i._store.validated && i.key == null && (i._store.validated = 1, x = w(x), !ct[x])) {
409
- ct[x] = !0;
410
- var v = "";
411
- i && i._owner != null && i._owner !== u() && (v = null, typeof i._owner.tag == "number" ? v = e(i._owner.type) : typeof i._owner.name == "string" && (v = i._owner.name), v = " It was passed a child from " + v + ".");
412
- var T = _.getCurrentStack;
413
- _.getCurrentStack = function() {
414
- var N = a(i.type);
415
- return T && (N += T() || ""), N;
416
- }, console.error(
417
- 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
418
- x,
419
- v
420
- ), _.getCurrentStack = T;
421
- }
422
- }
423
- function w(i) {
424
- var x = "", v = u();
425
- return v && (v = e(v.type)) && (x = `
426
-
427
- Check the render method of \`` + v + "`."), x || (i = e(i)) && (x = `
428
-
429
- Check the top-level render call using <` + i + ">."), x;
430
- }
431
- var O = Vt, R = Symbol.for("react.transitional.element"), S = Symbol.for("react.portal"), j = Symbol.for("react.fragment"), D = Symbol.for("react.strict_mode"), W = Symbol.for("react.profiler"), K = Symbol.for("react.consumer"), F = Symbol.for("react.context"), q = Symbol.for("react.forward_ref"), Z = Symbol.for("react.suspense"), $ = Symbol.for("react.suspense_list"), z = Symbol.for("react.memo"), Q = Symbol.for("react.lazy"), I = Symbol.for("react.offscreen"), B = Symbol.iterator, k = Symbol.for("react.client.reference"), _ = O.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Y = Object.prototype.hasOwnProperty, re = Object.assign, Dt = Symbol.for("react.client.reference"), Le = Array.isArray, ge = 0, Ke, Ze, Qe, et, tt, nt, ot;
432
- n.__reactDisabledLog = !0;
433
- var De, rt, We = !1, Ve = new (typeof WeakMap == "function" ? WeakMap : Map)(), Wt = Symbol.for("react.client.reference"), st, it = {}, lt = {}, ct = {};
434
- ve.Fragment = j, ve.jsx = function(i, x, v, T, N) {
435
- return h(i, x, v, !1, T, N);
436
- }, ve.jsxs = function(i, x, v, T, N) {
437
- return h(i, x, v, !0, T, N);
438
- };
439
- }()), ve;
440
- }
441
- var ft;
442
- function Xt() {
443
- return ft || (ft = 1, process.env.NODE_ENV === "production" ? Ee.exports = Ut() : Ee.exports = qt()), Ee.exports;
444
- }
445
- var E = Xt();
446
- const L = (...e) => e.reduce((o, t) => t == null || t === !1 ? o : typeof t == "string" || typeof t == "number" ? o + " " + t : Array.isArray(t) ? o + " " + L(...t) : typeof t == "object" ? o + " " + Object.entries(t).reduce((n, [r, s]) => s == null || s === !1 ? n : typeof s == "string" || typeof s == "number" ? n + " " + r + "-" + s : typeof s == "boolean" && s ? n + " " + r : n, "") : o, ""), dt = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Et = (e, o) => (t) => {
447
- var a;
448
- if ((o == null ? void 0 : o.variants) == null) return L(e, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
449
- const { variants: n, defaultVariants: r } = o, s = Object.keys(n).map((u) => {
450
- const f = t == null ? void 0 : t[u], d = r == null ? void 0 : r[u];
451
- if (f === null) return null;
452
- const p = dt(f) || dt(d);
453
- return n[u][p];
454
- }), l = t && Object.entries(t).reduce(
455
- (u, [f, d]) => (d === void 0 || (u[f] = d), u),
1
+ import { jsx as b, jsxs as W, Fragment as Pe } from "react/jsx-runtime";
2
+ import * as C from "react";
3
+ import { useLayoutEffect as tt, useEffect as re, useState as de, useId as nt, useMemo as ve, useRef as Fe } from "react";
4
+ import * as ot from "react-dom";
5
+ import { createPortal as st, flushSync as it } from "react-dom";
6
+ const R = (...e) => e.reduce((o, t) => t == null || t === !1 ? o : typeof t == "string" || typeof t == "number" ? o + " " + t : Array.isArray(t) ? o + " " + R(...t) : typeof t == "object" ? o + " " + Object.entries(t).reduce((n, [s, i]) => i == null || i === !1 ? n : typeof i == "string" || typeof i == "number" ? n + " " + s + "-" + i : typeof i == "boolean" && i ? n + " " + s : n, "") : o, ""), Me = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ve = (e, o) => (t) => {
7
+ var c;
8
+ if ((o == null ? void 0 : o.variants) == null) return R(e, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
9
+ const { variants: n, defaultVariants: s } = o, i = Object.keys(n).map((a) => {
10
+ const u = t == null ? void 0 : t[a], f = s == null ? void 0 : s[a];
11
+ if (u === null) return null;
12
+ const g = Me(u) || Me(f);
13
+ return n[a][g];
14
+ }), r = t && Object.entries(t).reduce(
15
+ (a, [u, f]) => (f === void 0 || (a[u] = f), a),
456
16
  {}
457
- ), c = (a = o == null ? void 0 : o.compoundVariants) == null ? void 0 : a.reduce(
458
- (u, { class: f, className: d, ...p }) => Object.entries(p).every(
459
- ([m, h]) => Array.isArray(h) ? h.includes(
17
+ ), l = (c = o == null ? void 0 : o.compoundVariants) == null ? void 0 : c.reduce(
18
+ (a, { class: u, className: f, ...g }) => Object.entries(g).every(
19
+ ([h, d]) => Array.isArray(d) ? d.includes(
460
20
  {
461
- ...r,
462
- ...l
463
- }[m]
21
+ ...s,
22
+ ...r
23
+ }[h]
464
24
  ) : {
465
- ...r,
466
- ...l
467
- }[m] === h
468
- ) ? [...u, f, d] : u,
25
+ ...s,
26
+ ...r
27
+ }[h] === d
28
+ ) ? [...a, u, f] : a,
469
29
  []
470
30
  );
471
- return L(e, s, c, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
31
+ return R(e, i, l, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
472
32
  };
473
- function Ct({ variant: e, className: o, ...t }) {
474
- return /* @__PURE__ */ E.jsx("span", { ...t, className: Jt({ variant: e, className: o }) });
33
+ function We({ variant: e, className: o, ...t }) {
34
+ return /* @__PURE__ */ b("span", { ...t, className: rt({ variant: e, className: o }) });
475
35
  }
476
- const Jt = Et(
36
+ const rt = Ve(
477
37
  "zen__badge inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors whitespace-nowrap",
478
38
  {
479
39
  variants: {
@@ -489,10 +49,10 @@ const Jt = Et(
489
49
  }
490
50
  }
491
51
  );
492
- function Gt({ className: e, variant: o, size: t, ...n }) {
493
- return /* @__PURE__ */ E.jsx("button", { className: Kt({ variant: o, size: t, className: e }), ...n });
52
+ function lt({ className: e, variant: o, size: t, ...n }) {
53
+ return /* @__PURE__ */ b("button", { className: ct({ variant: o, size: t, className: e }), ...n });
494
54
  }
495
- const Kt = Et(
55
+ const ct = Ve(
496
56
  "zen__button inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
497
57
  {
498
58
  variants: {
@@ -517,77 +77,77 @@ const Kt = Et(
517
77
  size: "default"
518
78
  }
519
79
  }
520
- ), Re = Math.min, ie = Math.max, Te = Math.round, Ce = Math.floor, X = (e) => ({
80
+ ), le = Math.min, H = Math.max, ce = Math.round, se = Math.floor, _ = (e) => ({
521
81
  x: e,
522
82
  y: e
523
- }), Zt = {
83
+ }), at = {
524
84
  left: "right",
525
85
  right: "left",
526
86
  bottom: "top",
527
87
  top: "bottom"
528
- }, Qt = {
88
+ }, ut = {
529
89
  start: "end",
530
90
  end: "start"
531
91
  };
532
- function ht(e, o, t) {
533
- return ie(e, Re(o, t));
92
+ function Te(e, o, t) {
93
+ return H(e, le(o, t));
534
94
  }
535
- function Me(e, o) {
95
+ function he(e, o) {
536
96
  return typeof e == "function" ? e(o) : e;
537
97
  }
538
- function le(e) {
98
+ function U(e) {
539
99
  return e.split("-")[0];
540
100
  }
541
- function Ne(e) {
101
+ function me(e) {
542
102
  return e.split("-")[1];
543
103
  }
544
- function St(e) {
104
+ function Be(e) {
545
105
  return e === "x" ? "y" : "x";
546
106
  }
547
- function Ot(e) {
107
+ function je(e) {
548
108
  return e === "y" ? "height" : "width";
549
109
  }
550
- function de(e) {
551
- return ["top", "bottom"].includes(le(e)) ? "y" : "x";
110
+ function G(e) {
111
+ return ["top", "bottom"].includes(U(e)) ? "y" : "x";
552
112
  }
553
- function Rt(e) {
554
- return St(de(e));
113
+ function $e(e) {
114
+ return Be(G(e));
555
115
  }
556
- function en(e, o, t) {
116
+ function ft(e, o, t) {
557
117
  t === void 0 && (t = !1);
558
- const n = Ne(e), r = Rt(e), s = Ot(r);
559
- let l = r === "x" ? n === (t ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
560
- return o.reference[s] > o.floating[s] && (l = ke(l)), [l, ke(l)];
118
+ const n = me(e), s = $e(e), i = je(s);
119
+ let r = s === "x" ? n === (t ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
120
+ return o.reference[i] > o.floating[i] && (r = ae(r)), [r, ae(r)];
561
121
  }
562
- function tn(e) {
563
- const o = ke(e);
564
- return [He(e), o, He(o)];
122
+ function dt(e) {
123
+ const o = ae(e);
124
+ return [Ee(e), o, Ee(o)];
565
125
  }
566
- function He(e) {
567
- return e.replace(/start|end/g, (o) => Qt[o]);
126
+ function Ee(e) {
127
+ return e.replace(/start|end/g, (o) => ut[o]);
568
128
  }
569
- function nn(e, o, t) {
570
- const n = ["left", "right"], r = ["right", "left"], s = ["top", "bottom"], l = ["bottom", "top"];
129
+ function ht(e, o, t) {
130
+ const n = ["left", "right"], s = ["right", "left"], i = ["top", "bottom"], r = ["bottom", "top"];
571
131
  switch (e) {
572
132
  case "top":
573
133
  case "bottom":
574
- return t ? o ? r : n : o ? n : r;
134
+ return t ? o ? s : n : o ? n : s;
575
135
  case "left":
576
136
  case "right":
577
- return o ? s : l;
137
+ return o ? i : r;
578
138
  default:
579
139
  return [];
580
140
  }
581
141
  }
582
- function on(e, o, t, n) {
583
- const r = Ne(e);
584
- let s = nn(le(e), t === "start", n);
585
- return r && (s = s.map((l) => l + "-" + r), o && (s = s.concat(s.map(He)))), s;
142
+ function mt(e, o, t, n) {
143
+ const s = me(e);
144
+ let i = ht(U(e), t === "start", n);
145
+ return s && (i = i.map((r) => r + "-" + s), o && (i = i.concat(i.map(Ee)))), i;
586
146
  }
587
- function ke(e) {
588
- return e.replace(/left|right|bottom|top/g, (o) => Zt[o]);
147
+ function ae(e) {
148
+ return e.replace(/left|right|bottom|top/g, (o) => at[o]);
589
149
  }
590
- function rn(e) {
150
+ function gt(e) {
591
151
  return {
592
152
  top: 0,
593
153
  right: 0,
@@ -596,259 +156,259 @@ function rn(e) {
596
156
  ...e
597
157
  };
598
158
  }
599
- function sn(e) {
600
- return typeof e != "number" ? rn(e) : {
159
+ function pt(e) {
160
+ return typeof e != "number" ? gt(e) : {
601
161
  top: e,
602
162
  right: e,
603
163
  bottom: e,
604
164
  left: e
605
165
  };
606
166
  }
607
- function Ae(e) {
167
+ function ue(e) {
608
168
  const {
609
169
  x: o,
610
170
  y: t,
611
171
  width: n,
612
- height: r
172
+ height: s
613
173
  } = e;
614
174
  return {
615
175
  width: n,
616
- height: r,
176
+ height: s,
617
177
  top: t,
618
178
  left: o,
619
179
  right: o + n,
620
- bottom: t + r,
180
+ bottom: t + s,
621
181
  x: o,
622
182
  y: t
623
183
  };
624
184
  }
625
- function mt(e, o, t) {
185
+ function Ae(e, o, t) {
626
186
  let {
627
187
  reference: n,
628
- floating: r
188
+ floating: s
629
189
  } = e;
630
- const s = de(o), l = Rt(o), c = Ot(l), a = le(o), u = s === "y", f = n.x + n.width / 2 - r.width / 2, d = n.y + n.height / 2 - r.height / 2, p = n[c] / 2 - r[c] / 2;
631
- let m;
632
- switch (a) {
190
+ const i = G(o), r = $e(o), l = je(r), c = U(o), a = i === "y", u = n.x + n.width / 2 - s.width / 2, f = n.y + n.height / 2 - s.height / 2, g = n[l] / 2 - s[l] / 2;
191
+ let h;
192
+ switch (c) {
633
193
  case "top":
634
- m = {
635
- x: f,
636
- y: n.y - r.height
194
+ h = {
195
+ x: u,
196
+ y: n.y - s.height
637
197
  };
638
198
  break;
639
199
  case "bottom":
640
- m = {
641
- x: f,
200
+ h = {
201
+ x: u,
642
202
  y: n.y + n.height
643
203
  };
644
204
  break;
645
205
  case "right":
646
- m = {
206
+ h = {
647
207
  x: n.x + n.width,
648
- y: d
208
+ y: f
649
209
  };
650
210
  break;
651
211
  case "left":
652
- m = {
653
- x: n.x - r.width,
654
- y: d
212
+ h = {
213
+ x: n.x - s.width,
214
+ y: f
655
215
  };
656
216
  break;
657
217
  default:
658
- m = {
218
+ h = {
659
219
  x: n.x,
660
220
  y: n.y
661
221
  };
662
222
  }
663
- switch (Ne(o)) {
223
+ switch (me(o)) {
664
224
  case "start":
665
- m[l] -= p * (t && u ? -1 : 1);
225
+ h[r] -= g * (t && a ? -1 : 1);
666
226
  break;
667
227
  case "end":
668
- m[l] += p * (t && u ? -1 : 1);
228
+ h[r] += g * (t && a ? -1 : 1);
669
229
  break;
670
230
  }
671
- return m;
231
+ return h;
672
232
  }
673
- const ln = async (e, o, t) => {
233
+ const xt = async (e, o, t) => {
674
234
  const {
675
235
  placement: n = "bottom",
676
- strategy: r = "absolute",
677
- middleware: s = [],
678
- platform: l
679
- } = t, c = s.filter(Boolean), a = await (l.isRTL == null ? void 0 : l.isRTL(o));
680
- let u = await l.getElementRects({
236
+ strategy: s = "absolute",
237
+ middleware: i = [],
238
+ platform: r
239
+ } = t, l = i.filter(Boolean), c = await (r.isRTL == null ? void 0 : r.isRTL(o));
240
+ let a = await r.getElementRects({
681
241
  reference: e,
682
242
  floating: o,
683
- strategy: r
243
+ strategy: s
684
244
  }), {
685
- x: f,
686
- y: d
687
- } = mt(u, n, a), p = n, m = {}, h = 0;
688
- for (let b = 0; b < c.length; b++) {
245
+ x: u,
246
+ y: f
247
+ } = Ae(a, n, c), g = n, h = {}, d = 0;
248
+ for (let p = 0; p < l.length; p++) {
689
249
  const {
690
- name: y,
691
- fn: g
692
- } = c[b], {
693
- x: w,
694
- y: O,
695
- data: R,
696
- reset: S
697
- } = await g({
698
- x: f,
699
- y: d,
250
+ name: w,
251
+ fn: m
252
+ } = l[p], {
253
+ x,
254
+ y: v,
255
+ data: E,
256
+ reset: y
257
+ } = await m({
258
+ x: u,
259
+ y: f,
700
260
  initialPlacement: n,
701
- placement: p,
702
- strategy: r,
703
- middlewareData: m,
704
- rects: u,
705
- platform: l,
261
+ placement: g,
262
+ strategy: s,
263
+ middlewareData: h,
264
+ rects: a,
265
+ platform: r,
706
266
  elements: {
707
267
  reference: e,
708
268
  floating: o
709
269
  }
710
270
  });
711
- f = w ?? f, d = O ?? d, m = {
712
- ...m,
713
- [y]: {
714
- ...m[y],
715
- ...R
271
+ u = x ?? u, f = v ?? f, h = {
272
+ ...h,
273
+ [w]: {
274
+ ...h[w],
275
+ ...E
716
276
  }
717
- }, S && h <= 50 && (h++, typeof S == "object" && (S.placement && (p = S.placement), S.rects && (u = S.rects === !0 ? await l.getElementRects({
277
+ }, y && d <= 50 && (d++, typeof y == "object" && (y.placement && (g = y.placement), y.rects && (a = y.rects === !0 ? await r.getElementRects({
718
278
  reference: e,
719
279
  floating: o,
720
- strategy: r
721
- }) : S.rects), {
722
- x: f,
723
- y: d
724
- } = mt(u, p, a)), b = -1);
280
+ strategy: s
281
+ }) : y.rects), {
282
+ x: u,
283
+ y: f
284
+ } = Ae(a, g, c)), p = -1);
725
285
  }
726
286
  return {
727
- x: f,
728
- y: d,
729
- placement: p,
730
- strategy: r,
731
- middlewareData: m
287
+ x: u,
288
+ y: f,
289
+ placement: g,
290
+ strategy: s,
291
+ middlewareData: h
732
292
  };
733
293
  };
734
- async function Tt(e, o) {
294
+ async function He(e, o) {
735
295
  var t;
736
296
  o === void 0 && (o = {});
737
297
  const {
738
298
  x: n,
739
- y: r,
740
- platform: s,
741
- rects: l,
742
- elements: c,
743
- strategy: a
299
+ y: s,
300
+ platform: i,
301
+ rects: r,
302
+ elements: l,
303
+ strategy: c
744
304
  } = e, {
745
- boundary: u = "clippingAncestors",
746
- rootBoundary: f = "viewport",
747
- elementContext: d = "floating",
748
- altBoundary: p = !1,
749
- padding: m = 0
750
- } = Me(o, e), h = sn(m), y = c[p ? d === "floating" ? "reference" : "floating" : d], g = Ae(await s.getClippingRect({
751
- element: (t = await (s.isElement == null ? void 0 : s.isElement(y))) == null || t ? y : y.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(c.floating)),
752
- boundary: u,
753
- rootBoundary: f,
754
- strategy: a
755
- })), w = d === "floating" ? {
305
+ boundary: a = "clippingAncestors",
306
+ rootBoundary: u = "viewport",
307
+ elementContext: f = "floating",
308
+ altBoundary: g = !1,
309
+ padding: h = 0
310
+ } = he(o, e), d = pt(h), w = l[g ? f === "floating" ? "reference" : "floating" : f], m = ue(await i.getClippingRect({
311
+ element: (t = await (i.isElement == null ? void 0 : i.isElement(w))) == null || t ? w : w.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(l.floating)),
312
+ boundary: a,
313
+ rootBoundary: u,
314
+ strategy: c
315
+ })), x = f === "floating" ? {
756
316
  x: n,
757
- y: r,
758
- width: l.floating.width,
759
- height: l.floating.height
760
- } : l.reference, O = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating)), R = await (s.isElement == null ? void 0 : s.isElement(O)) ? await (s.getScale == null ? void 0 : s.getScale(O)) || {
317
+ y: s,
318
+ width: r.floating.width,
319
+ height: r.floating.height
320
+ } : r.reference, v = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l.floating)), E = await (i.isElement == null ? void 0 : i.isElement(v)) ? await (i.getScale == null ? void 0 : i.getScale(v)) || {
761
321
  x: 1,
762
322
  y: 1
763
323
  } : {
764
324
  x: 1,
765
325
  y: 1
766
- }, S = Ae(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
767
- elements: c,
768
- rect: w,
769
- offsetParent: O,
770
- strategy: a
771
- }) : w);
326
+ }, y = ue(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
327
+ elements: l,
328
+ rect: x,
329
+ offsetParent: v,
330
+ strategy: c
331
+ }) : x);
772
332
  return {
773
- top: (g.top - S.top + h.top) / R.y,
774
- bottom: (S.bottom - g.bottom + h.bottom) / R.y,
775
- left: (g.left - S.left + h.left) / R.x,
776
- right: (S.right - g.right + h.right) / R.x
333
+ top: (m.top - y.top + d.top) / E.y,
334
+ bottom: (y.bottom - m.bottom + d.bottom) / E.y,
335
+ left: (m.left - y.left + d.left) / E.x,
336
+ right: (y.right - m.right + d.right) / E.x
777
337
  };
778
338
  }
779
- const cn = function(e) {
339
+ const wt = function(e) {
780
340
  return e === void 0 && (e = {}), {
781
341
  name: "flip",
782
342
  options: e,
783
343
  async fn(o) {
784
344
  var t, n;
785
345
  const {
786
- placement: r,
787
- middlewareData: s,
788
- rects: l,
789
- initialPlacement: c,
790
- platform: a,
791
- elements: u
346
+ placement: s,
347
+ middlewareData: i,
348
+ rects: r,
349
+ initialPlacement: l,
350
+ platform: c,
351
+ elements: a
792
352
  } = o, {
793
- mainAxis: f = !0,
794
- crossAxis: d = !0,
795
- fallbackPlacements: p,
796
- fallbackStrategy: m = "bestFit",
797
- fallbackAxisSideDirection: h = "none",
798
- flipAlignment: b = !0,
799
- ...y
800
- } = Me(e, o);
801
- if ((t = s.arrow) != null && t.alignmentOffset)
353
+ mainAxis: u = !0,
354
+ crossAxis: f = !0,
355
+ fallbackPlacements: g,
356
+ fallbackStrategy: h = "bestFit",
357
+ fallbackAxisSideDirection: d = "none",
358
+ flipAlignment: p = !0,
359
+ ...w
360
+ } = he(e, o);
361
+ if ((t = i.arrow) != null && t.alignmentOffset)
802
362
  return {};
803
- const g = le(r), w = de(c), O = le(c) === c, R = await (a.isRTL == null ? void 0 : a.isRTL(u.floating)), S = p || (O || !b ? [ke(c)] : tn(c)), j = h !== "none";
804
- !p && j && S.push(...on(c, b, h, R));
805
- const D = [c, ...S], W = await Tt(o, y), K = [];
806
- let F = ((n = s.flip) == null ? void 0 : n.overflows) || [];
807
- if (f && K.push(W[g]), d) {
808
- const z = en(r, l, R);
809
- K.push(W[z[0]], W[z[1]]);
363
+ const m = U(s), x = G(l), v = U(l) === l, E = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), y = g || (v || !p ? [ae(l)] : dt(l)), O = d !== "none";
364
+ !g && O && y.push(...mt(l, p, d, E));
365
+ const A = [l, ...y], z = await He(o, w), Y = [];
366
+ let F = ((n = i.flip) == null ? void 0 : n.overflows) || [];
367
+ if (u && Y.push(z[m]), f) {
368
+ const I = ft(s, r, E);
369
+ Y.push(z[I[0]], z[I[1]]);
810
370
  }
811
371
  if (F = [...F, {
812
- placement: r,
813
- overflows: K
814
- }], !K.every((z) => z <= 0)) {
815
- var q, Z;
816
- const z = (((q = s.flip) == null ? void 0 : q.index) || 0) + 1, Q = D[z];
817
- if (Q)
372
+ placement: s,
373
+ overflows: Y
374
+ }], !Y.every((I) => I <= 0)) {
375
+ var q, ee;
376
+ const I = (((q = i.flip) == null ? void 0 : q.index) || 0) + 1, te = A[I];
377
+ if (te)
818
378
  return {
819
379
  data: {
820
- index: z,
380
+ index: I,
821
381
  overflows: F
822
382
  },
823
383
  reset: {
824
- placement: Q
384
+ placement: te
825
385
  }
826
386
  };
827
- let I = (Z = F.filter((B) => B.overflows[0] <= 0).sort((B, k) => B.overflows[1] - k.overflows[1])[0]) == null ? void 0 : Z.placement;
828
- if (!I)
829
- switch (m) {
387
+ let k = (ee = F.filter((V) => V.overflows[0] <= 0).sort((V, S) => V.overflows[1] - S.overflows[1])[0]) == null ? void 0 : ee.placement;
388
+ if (!k)
389
+ switch (h) {
830
390
  case "bestFit": {
831
- var $;
832
- const B = ($ = F.filter((k) => {
833
- if (j) {
834
- const _ = de(k.placement);
835
- return _ === w || // Create a bias to the `y` side axis due to horizontal
391
+ var B;
392
+ const V = (B = F.filter((S) => {
393
+ if (O) {
394
+ const M = G(S.placement);
395
+ return M === x || // Create a bias to the `y` side axis due to horizontal
836
396
  // reading directions favoring greater width.
837
- _ === "y";
397
+ M === "y";
838
398
  }
839
399
  return !0;
840
- }).map((k) => [k.placement, k.overflows.filter((_) => _ > 0).reduce((_, Y) => _ + Y, 0)]).sort((k, _) => k[1] - _[1])[0]) == null ? void 0 : $[0];
841
- B && (I = B);
400
+ }).map((S) => [S.placement, S.overflows.filter((M) => M > 0).reduce((M, j) => M + j, 0)]).sort((S, M) => S[1] - M[1])[0]) == null ? void 0 : B[0];
401
+ V && (k = V);
842
402
  break;
843
403
  }
844
404
  case "initialPlacement":
845
- I = c;
405
+ k = l;
846
406
  break;
847
407
  }
848
- if (r !== I)
408
+ if (s !== k)
849
409
  return {
850
410
  reset: {
851
- placement: I
411
+ placement: k
852
412
  }
853
413
  };
854
414
  }
@@ -856,56 +416,56 @@ const cn = function(e) {
856
416
  }
857
417
  };
858
418
  };
859
- async function an(e, o) {
419
+ async function yt(e, o) {
860
420
  const {
861
421
  placement: t,
862
422
  platform: n,
863
- elements: r
864
- } = e, s = await (n.isRTL == null ? void 0 : n.isRTL(r.floating)), l = le(t), c = Ne(t), a = de(t) === "y", u = ["left", "top"].includes(l) ? -1 : 1, f = s && a ? -1 : 1, d = Me(o, e);
423
+ elements: s
424
+ } = e, i = await (n.isRTL == null ? void 0 : n.isRTL(s.floating)), r = U(t), l = me(t), c = G(t) === "y", a = ["left", "top"].includes(r) ? -1 : 1, u = i && c ? -1 : 1, f = he(o, e);
865
425
  let {
866
- mainAxis: p,
867
- crossAxis: m,
868
- alignmentAxis: h
869
- } = typeof d == "number" ? {
870
- mainAxis: d,
426
+ mainAxis: g,
427
+ crossAxis: h,
428
+ alignmentAxis: d
429
+ } = typeof f == "number" ? {
430
+ mainAxis: f,
871
431
  crossAxis: 0,
872
432
  alignmentAxis: null
873
433
  } : {
874
- mainAxis: d.mainAxis || 0,
875
- crossAxis: d.crossAxis || 0,
876
- alignmentAxis: d.alignmentAxis
434
+ mainAxis: f.mainAxis || 0,
435
+ crossAxis: f.crossAxis || 0,
436
+ alignmentAxis: f.alignmentAxis
877
437
  };
878
- return c && typeof h == "number" && (m = c === "end" ? h * -1 : h), a ? {
879
- x: m * f,
880
- y: p * u
438
+ return l && typeof d == "number" && (h = l === "end" ? d * -1 : d), c ? {
439
+ x: h * u,
440
+ y: g * a
881
441
  } : {
882
- x: p * u,
883
- y: m * f
442
+ x: g * a,
443
+ y: h * u
884
444
  };
885
445
  }
886
- const un = function(e) {
446
+ const bt = function(e) {
887
447
  return e === void 0 && (e = 0), {
888
448
  name: "offset",
889
449
  options: e,
890
450
  async fn(o) {
891
451
  var t, n;
892
452
  const {
893
- x: r,
894
- y: s,
895
- placement: l,
896
- middlewareData: c
897
- } = o, a = await an(o, e);
898
- return l === ((t = c.offset) == null ? void 0 : t.placement) && (n = c.arrow) != null && n.alignmentOffset ? {} : {
899
- x: r + a.x,
900
- y: s + a.y,
453
+ x: s,
454
+ y: i,
455
+ placement: r,
456
+ middlewareData: l
457
+ } = o, c = await yt(o, e);
458
+ return r === ((t = l.offset) == null ? void 0 : t.placement) && (n = l.arrow) != null && n.alignmentOffset ? {} : {
459
+ x: s + c.x,
460
+ y: i + c.y,
901
461
  data: {
902
- ...a,
903
- placement: l
462
+ ...c,
463
+ placement: r
904
464
  }
905
465
  };
906
466
  }
907
467
  };
908
- }, fn = function(e) {
468
+ }, vt = function(e) {
909
469
  return e === void 0 && (e = {}), {
910
470
  name: "shift",
911
471
  options: e,
@@ -913,94 +473,94 @@ const un = function(e) {
913
473
  const {
914
474
  x: t,
915
475
  y: n,
916
- placement: r
476
+ placement: s
917
477
  } = o, {
918
- mainAxis: s = !0,
919
- crossAxis: l = !1,
920
- limiter: c = {
921
- fn: (y) => {
478
+ mainAxis: i = !0,
479
+ crossAxis: r = !1,
480
+ limiter: l = {
481
+ fn: (w) => {
922
482
  let {
923
- x: g,
924
- y: w
925
- } = y;
483
+ x: m,
484
+ y: x
485
+ } = w;
926
486
  return {
927
- x: g,
928
- y: w
487
+ x: m,
488
+ y: x
929
489
  };
930
490
  }
931
491
  },
932
- ...a
933
- } = Me(e, o), u = {
492
+ ...c
493
+ } = he(e, o), a = {
934
494
  x: t,
935
495
  y: n
936
- }, f = await Tt(o, a), d = de(le(r)), p = St(d);
937
- let m = u[p], h = u[d];
938
- if (s) {
939
- const y = p === "y" ? "top" : "left", g = p === "y" ? "bottom" : "right", w = m + f[y], O = m - f[g];
940
- m = ht(w, m, O);
496
+ }, u = await He(o, c), f = G(U(s)), g = Be(f);
497
+ let h = a[g], d = a[f];
498
+ if (i) {
499
+ const w = g === "y" ? "top" : "left", m = g === "y" ? "bottom" : "right", x = h + u[w], v = h - u[m];
500
+ h = Te(x, h, v);
941
501
  }
942
- if (l) {
943
- const y = d === "y" ? "top" : "left", g = d === "y" ? "bottom" : "right", w = h + f[y], O = h - f[g];
944
- h = ht(w, h, O);
502
+ if (r) {
503
+ const w = f === "y" ? "top" : "left", m = f === "y" ? "bottom" : "right", x = d + u[w], v = d - u[m];
504
+ d = Te(x, d, v);
945
505
  }
946
- const b = c.fn({
506
+ const p = l.fn({
947
507
  ...o,
948
- [p]: m,
949
- [d]: h
508
+ [g]: h,
509
+ [f]: d
950
510
  });
951
511
  return {
952
- ...b,
512
+ ...p,
953
513
  data: {
954
- x: b.x - t,
955
- y: b.y - n,
514
+ x: p.x - t,
515
+ y: p.y - n,
956
516
  enabled: {
957
- [p]: s,
958
- [d]: l
517
+ [g]: i,
518
+ [f]: r
959
519
  }
960
520
  }
961
521
  };
962
522
  }
963
523
  };
964
524
  };
965
- function ze() {
525
+ function ge() {
966
526
  return typeof window < "u";
967
527
  }
968
- function me(e) {
969
- return kt(e) ? (e.nodeName || "").toLowerCase() : "#document";
528
+ function Q(e) {
529
+ return Ue(e) ? (e.nodeName || "").toLowerCase() : "#document";
970
530
  }
971
- function V(e) {
531
+ function T(e) {
972
532
  var o;
973
533
  return (e == null || (o = e.ownerDocument) == null ? void 0 : o.defaultView) || window;
974
534
  }
975
- function G(e) {
535
+ function P(e) {
976
536
  var o;
977
- return (o = (kt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : o.documentElement;
537
+ return (o = (Ue(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : o.documentElement;
978
538
  }
979
- function kt(e) {
980
- return ze() ? e instanceof Node || e instanceof V(e).Node : !1;
539
+ function Ue(e) {
540
+ return ge() ? e instanceof Node || e instanceof T(e).Node : !1;
981
541
  }
982
- function H(e) {
983
- return ze() ? e instanceof Element || e instanceof V(e).Element : !1;
542
+ function N(e) {
543
+ return ge() ? e instanceof Element || e instanceof T(e).Element : !1;
984
544
  }
985
- function J(e) {
986
- return ze() ? e instanceof HTMLElement || e instanceof V(e).HTMLElement : !1;
545
+ function D(e) {
546
+ return ge() ? e instanceof HTMLElement || e instanceof T(e).HTMLElement : !1;
987
547
  }
988
- function gt(e) {
989
- return !ze() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof V(e).ShadowRoot;
548
+ function ze(e) {
549
+ return !ge() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof T(e).ShadowRoot;
990
550
  }
991
- function we(e) {
551
+ function oe(e) {
992
552
  const {
993
553
  overflow: o,
994
554
  overflowX: t,
995
555
  overflowY: n,
996
- display: r
997
- } = U(e);
998
- return /auto|scroll|overlay|hidden|clip/.test(o + n + t) && !["inline", "contents"].includes(r);
556
+ display: s
557
+ } = L(e);
558
+ return /auto|scroll|overlay|hidden|clip/.test(o + n + t) && !["inline", "contents"].includes(s);
999
559
  }
1000
- function dn(e) {
1001
- return ["table", "td", "th"].includes(me(e));
560
+ function Et(e) {
561
+ return ["table", "td", "th"].includes(Q(e));
1002
562
  }
1003
- function Ie(e) {
563
+ function pe(e) {
1004
564
  return [":popover-open", ":modal"].some((o) => {
1005
565
  try {
1006
566
  return e.matches(o);
@@ -1009,32 +569,32 @@ function Ie(e) {
1009
569
  }
1010
570
  });
1011
571
  }
1012
- function qe(e) {
1013
- const o = Xe(), t = H(e) ? U(e) : e;
572
+ function Ce(e) {
573
+ const o = Oe(), t = N(e) ? L(e) : e;
1014
574
  return t.transform !== "none" || t.perspective !== "none" || (t.containerType ? t.containerType !== "normal" : !1) || !o && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !o && (t.filter ? t.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((n) => (t.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (t.contain || "").includes(n));
1015
575
  }
1016
- function hn(e) {
1017
- let o = oe(e);
1018
- for (; J(o) && !he(o); ) {
1019
- if (qe(o))
576
+ function St(e) {
577
+ let o = $(e);
578
+ for (; D(o) && !J(o); ) {
579
+ if (Ce(o))
1020
580
  return o;
1021
- if (Ie(o))
581
+ if (pe(o))
1022
582
  return null;
1023
- o = oe(o);
583
+ o = $(o);
1024
584
  }
1025
585
  return null;
1026
586
  }
1027
- function Xe() {
587
+ function Oe() {
1028
588
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
1029
589
  }
1030
- function he(e) {
1031
- return ["html", "body", "#document"].includes(me(e));
590
+ function J(e) {
591
+ return ["html", "body", "#document"].includes(Q(e));
1032
592
  }
1033
- function U(e) {
1034
- return V(e).getComputedStyle(e);
593
+ function L(e) {
594
+ return T(e).getComputedStyle(e);
1035
595
  }
1036
- function Pe(e) {
1037
- return H(e) ? {
596
+ function xe(e) {
597
+ return N(e) ? {
1038
598
  scrollLeft: e.scrollLeft,
1039
599
  scrollTop: e.scrollTop
1040
600
  } : {
@@ -1042,293 +602,293 @@ function Pe(e) {
1042
602
  scrollTop: e.scrollY
1043
603
  };
1044
604
  }
1045
- function oe(e) {
1046
- if (me(e) === "html")
605
+ function $(e) {
606
+ if (Q(e) === "html")
1047
607
  return e;
1048
608
  const o = (
1049
609
  // Step into the shadow DOM of the parent of a slotted node.
1050
610
  e.assignedSlot || // DOM Element detected.
1051
611
  e.parentNode || // ShadowRoot detected.
1052
- gt(e) && e.host || // Fallback.
1053
- G(e)
612
+ ze(e) && e.host || // Fallback.
613
+ P(e)
1054
614
  );
1055
- return gt(o) ? o.host : o;
615
+ return ze(o) ? o.host : o;
1056
616
  }
1057
- function At(e) {
1058
- const o = oe(e);
1059
- return he(o) ? e.ownerDocument ? e.ownerDocument.body : e.body : J(o) && we(o) ? o : At(o);
617
+ function Ke(e) {
618
+ const o = $(e);
619
+ return J(o) ? e.ownerDocument ? e.ownerDocument.body : e.body : D(o) && oe(o) ? o : Ke(o);
1060
620
  }
1061
- function be(e, o, t) {
621
+ function ne(e, o, t) {
1062
622
  var n;
1063
623
  o === void 0 && (o = []), t === void 0 && (t = !0);
1064
- const r = At(e), s = r === ((n = e.ownerDocument) == null ? void 0 : n.body), l = V(r);
1065
- if (s) {
1066
- const c = Ue(l);
1067
- return o.concat(l, l.visualViewport || [], we(r) ? r : [], c && t ? be(c) : []);
624
+ const s = Ke(e), i = s === ((n = e.ownerDocument) == null ? void 0 : n.body), r = T(s);
625
+ if (i) {
626
+ const l = Se(r);
627
+ return o.concat(r, r.visualViewport || [], oe(s) ? s : [], l && t ? ne(l) : []);
1068
628
  }
1069
- return o.concat(r, be(r, [], t));
629
+ return o.concat(s, ne(s, [], t));
1070
630
  }
1071
- function Ue(e) {
631
+ function Se(e) {
1072
632
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
1073
633
  }
1074
- function _t(e) {
1075
- const o = U(e);
634
+ function Ye(e) {
635
+ const o = L(e);
1076
636
  let t = parseFloat(o.width) || 0, n = parseFloat(o.height) || 0;
1077
- const r = J(e), s = r ? e.offsetWidth : t, l = r ? e.offsetHeight : n, c = Te(t) !== s || Te(n) !== l;
1078
- return c && (t = s, n = l), {
637
+ const s = D(e), i = s ? e.offsetWidth : t, r = s ? e.offsetHeight : n, l = ce(t) !== i || ce(n) !== r;
638
+ return l && (t = i, n = r), {
1079
639
  width: t,
1080
640
  height: n,
1081
- $: c
641
+ $: l
1082
642
  };
1083
643
  }
1084
- function Je(e) {
1085
- return H(e) ? e : e.contextElement;
644
+ function Re(e) {
645
+ return N(e) ? e : e.contextElement;
1086
646
  }
1087
- function fe(e) {
1088
- const o = Je(e);
1089
- if (!J(o))
1090
- return X(1);
647
+ function Z(e) {
648
+ const o = Re(e);
649
+ if (!D(o))
650
+ return _(1);
1091
651
  const t = o.getBoundingClientRect(), {
1092
652
  width: n,
1093
- height: r,
1094
- $: s
1095
- } = _t(o);
1096
- let l = (s ? Te(t.width) : t.width) / n, c = (s ? Te(t.height) : t.height) / r;
1097
- return (!l || !Number.isFinite(l)) && (l = 1), (!c || !Number.isFinite(c)) && (c = 1), {
1098
- x: l,
1099
- y: c
653
+ height: s,
654
+ $: i
655
+ } = Ye(o);
656
+ let r = (i ? ce(t.width) : t.width) / n, l = (i ? ce(t.height) : t.height) / s;
657
+ return (!r || !Number.isFinite(r)) && (r = 1), (!l || !Number.isFinite(l)) && (l = 1), {
658
+ x: r,
659
+ y: l
1100
660
  };
1101
661
  }
1102
- const mn = /* @__PURE__ */ X(0);
1103
- function jt(e) {
1104
- const o = V(e);
1105
- return !Xe() || !o.visualViewport ? mn : {
662
+ const Ct = /* @__PURE__ */ _(0);
663
+ function qe(e) {
664
+ const o = T(e);
665
+ return !Oe() || !o.visualViewport ? Ct : {
1106
666
  x: o.visualViewport.offsetLeft,
1107
667
  y: o.visualViewport.offsetTop
1108
668
  };
1109
669
  }
1110
- function gn(e, o, t) {
1111
- return o === void 0 && (o = !1), !t || o && t !== V(e) ? !1 : o;
670
+ function Ot(e, o, t) {
671
+ return o === void 0 && (o = !1), !t || o && t !== T(e) ? !1 : o;
1112
672
  }
1113
- function ce(e, o, t, n) {
673
+ function K(e, o, t, n) {
1114
674
  o === void 0 && (o = !1), t === void 0 && (t = !1);
1115
- const r = e.getBoundingClientRect(), s = Je(e);
1116
- let l = X(1);
1117
- o && (n ? H(n) && (l = fe(n)) : l = fe(e));
1118
- const c = gn(s, t, n) ? jt(s) : X(0);
1119
- let a = (r.left + c.x) / l.x, u = (r.top + c.y) / l.y, f = r.width / l.x, d = r.height / l.y;
1120
- if (s) {
1121
- const p = V(s), m = n && H(n) ? V(n) : n;
1122
- let h = p, b = Ue(h);
1123
- for (; b && n && m !== h; ) {
1124
- const y = fe(b), g = b.getBoundingClientRect(), w = U(b), O = g.left + (b.clientLeft + parseFloat(w.paddingLeft)) * y.x, R = g.top + (b.clientTop + parseFloat(w.paddingTop)) * y.y;
1125
- a *= y.x, u *= y.y, f *= y.x, d *= y.y, a += O, u += R, h = V(b), b = Ue(h);
675
+ const s = e.getBoundingClientRect(), i = Re(e);
676
+ let r = _(1);
677
+ o && (n ? N(n) && (r = Z(n)) : r = Z(e));
678
+ const l = Ot(i, t, n) ? qe(i) : _(0);
679
+ let c = (s.left + l.x) / r.x, a = (s.top + l.y) / r.y, u = s.width / r.x, f = s.height / r.y;
680
+ if (i) {
681
+ const g = T(i), h = n && N(n) ? T(n) : n;
682
+ let d = g, p = Se(d);
683
+ for (; p && n && h !== d; ) {
684
+ const w = Z(p), m = p.getBoundingClientRect(), x = L(p), v = m.left + (p.clientLeft + parseFloat(x.paddingLeft)) * w.x, E = m.top + (p.clientTop + parseFloat(x.paddingTop)) * w.y;
685
+ c *= w.x, a *= w.y, u *= w.x, f *= w.y, c += v, a += E, d = T(p), p = Se(d);
1126
686
  }
1127
687
  }
1128
- return Ae({
1129
- width: f,
1130
- height: d,
1131
- x: a,
1132
- y: u
688
+ return ue({
689
+ width: u,
690
+ height: f,
691
+ x: c,
692
+ y: a
1133
693
  });
1134
694
  }
1135
- function Ge(e, o) {
1136
- const t = Pe(e).scrollLeft;
1137
- return o ? o.left + t : ce(G(e)).left + t;
695
+ function ke(e, o) {
696
+ const t = xe(e).scrollLeft;
697
+ return o ? o.left + t : K(P(e)).left + t;
1138
698
  }
1139
- function Mt(e, o, t) {
699
+ function Xe(e, o, t) {
1140
700
  t === void 0 && (t = !1);
1141
- const n = e.getBoundingClientRect(), r = n.left + o.scrollLeft - (t ? 0 : (
701
+ const n = e.getBoundingClientRect(), s = n.left + o.scrollLeft - (t ? 0 : (
1142
702
  // RTL <body> scrollbar.
1143
- Ge(e, n)
1144
- )), s = n.top + o.scrollTop;
703
+ ke(e, n)
704
+ )), i = n.top + o.scrollTop;
1145
705
  return {
1146
- x: r,
1147
- y: s
706
+ x: s,
707
+ y: i
1148
708
  };
1149
709
  }
1150
- function pn(e) {
710
+ function Rt(e) {
1151
711
  let {
1152
712
  elements: o,
1153
713
  rect: t,
1154
714
  offsetParent: n,
1155
- strategy: r
715
+ strategy: s
1156
716
  } = e;
1157
- const s = r === "fixed", l = G(n), c = o ? Ie(o.floating) : !1;
1158
- if (n === l || c && s)
717
+ const i = s === "fixed", r = P(n), l = o ? pe(o.floating) : !1;
718
+ if (n === r || l && i)
1159
719
  return t;
1160
- let a = {
720
+ let c = {
1161
721
  scrollLeft: 0,
1162
722
  scrollTop: 0
1163
- }, u = X(1);
1164
- const f = X(0), d = J(n);
1165
- if ((d || !d && !s) && ((me(n) !== "body" || we(l)) && (a = Pe(n)), J(n))) {
1166
- const m = ce(n);
1167
- u = fe(n), f.x = m.x + n.clientLeft, f.y = m.y + n.clientTop;
723
+ }, a = _(1);
724
+ const u = _(0), f = D(n);
725
+ if ((f || !f && !i) && ((Q(n) !== "body" || oe(r)) && (c = xe(n)), D(n))) {
726
+ const h = K(n);
727
+ a = Z(n), u.x = h.x + n.clientLeft, u.y = h.y + n.clientTop;
1168
728
  }
1169
- const p = l && !d && !s ? Mt(l, a, !0) : X(0);
729
+ const g = r && !f && !i ? Xe(r, c, !0) : _(0);
1170
730
  return {
1171
- width: t.width * u.x,
1172
- height: t.height * u.y,
1173
- x: t.x * u.x - a.scrollLeft * u.x + f.x + p.x,
1174
- y: t.y * u.y - a.scrollTop * u.y + f.y + p.y
731
+ width: t.width * a.x,
732
+ height: t.height * a.y,
733
+ x: t.x * a.x - c.scrollLeft * a.x + u.x + g.x,
734
+ y: t.y * a.y - c.scrollTop * a.y + u.y + g.y
1175
735
  };
1176
736
  }
1177
- function xn(e) {
737
+ function kt(e) {
1178
738
  return Array.from(e.getClientRects());
1179
739
  }
1180
- function vn(e) {
1181
- const o = G(e), t = Pe(e), n = e.ownerDocument.body, r = ie(o.scrollWidth, o.clientWidth, n.scrollWidth, n.clientWidth), s = ie(o.scrollHeight, o.clientHeight, n.scrollHeight, n.clientHeight);
1182
- let l = -t.scrollLeft + Ge(e);
1183
- const c = -t.scrollTop;
1184
- return U(n).direction === "rtl" && (l += ie(o.clientWidth, n.clientWidth) - r), {
1185
- width: r,
1186
- height: s,
740
+ function Mt(e) {
741
+ const o = P(e), t = xe(e), n = e.ownerDocument.body, s = H(o.scrollWidth, o.clientWidth, n.scrollWidth, n.clientWidth), i = H(o.scrollHeight, o.clientHeight, n.scrollHeight, n.clientHeight);
742
+ let r = -t.scrollLeft + ke(e);
743
+ const l = -t.scrollTop;
744
+ return L(n).direction === "rtl" && (r += H(o.clientWidth, n.clientWidth) - s), {
745
+ width: s,
746
+ height: i,
747
+ x: r,
748
+ y: l
749
+ };
750
+ }
751
+ function Tt(e, o) {
752
+ const t = T(e), n = P(e), s = t.visualViewport;
753
+ let i = n.clientWidth, r = n.clientHeight, l = 0, c = 0;
754
+ if (s) {
755
+ i = s.width, r = s.height;
756
+ const a = Oe();
757
+ (!a || a && o === "fixed") && (l = s.offsetLeft, c = s.offsetTop);
758
+ }
759
+ return {
760
+ width: i,
761
+ height: r,
1187
762
  x: l,
1188
763
  y: c
1189
764
  };
1190
765
  }
1191
- function bn(e, o) {
1192
- const t = V(e), n = G(e), r = t.visualViewport;
1193
- let s = n.clientWidth, l = n.clientHeight, c = 0, a = 0;
1194
- if (r) {
1195
- s = r.width, l = r.height;
1196
- const u = Xe();
1197
- (!u || u && o === "fixed") && (c = r.offsetLeft, a = r.offsetTop);
1198
- }
766
+ function At(e, o) {
767
+ const t = K(e, !0, o === "fixed"), n = t.top + e.clientTop, s = t.left + e.clientLeft, i = D(e) ? Z(e) : _(1), r = e.clientWidth * i.x, l = e.clientHeight * i.y, c = s * i.x, a = n * i.y;
1199
768
  return {
1200
- width: s,
769
+ width: r,
1201
770
  height: l,
1202
771
  x: c,
1203
772
  y: a
1204
773
  };
1205
774
  }
1206
- function wn(e, o) {
1207
- const t = ce(e, !0, o === "fixed"), n = t.top + e.clientTop, r = t.left + e.clientLeft, s = J(e) ? fe(e) : X(1), l = e.clientWidth * s.x, c = e.clientHeight * s.y, a = r * s.x, u = n * s.y;
1208
- return {
1209
- width: l,
1210
- height: c,
1211
- x: a,
1212
- y: u
1213
- };
1214
- }
1215
- function pt(e, o, t) {
775
+ function Ie(e, o, t) {
1216
776
  let n;
1217
777
  if (o === "viewport")
1218
- n = bn(e, t);
778
+ n = Tt(e, t);
1219
779
  else if (o === "document")
1220
- n = vn(G(e));
1221
- else if (H(o))
1222
- n = wn(o, t);
780
+ n = Mt(P(e));
781
+ else if (N(o))
782
+ n = At(o, t);
1223
783
  else {
1224
- const r = jt(e);
784
+ const s = qe(e);
1225
785
  n = {
1226
- x: o.x - r.x,
1227
- y: o.y - r.y,
786
+ x: o.x - s.x,
787
+ y: o.y - s.y,
1228
788
  width: o.width,
1229
789
  height: o.height
1230
790
  };
1231
791
  }
1232
- return Ae(n);
792
+ return ue(n);
1233
793
  }
1234
- function Nt(e, o) {
1235
- const t = oe(e);
1236
- return t === o || !H(t) || he(t) ? !1 : U(t).position === "fixed" || Nt(t, o);
794
+ function Ze(e, o) {
795
+ const t = $(e);
796
+ return t === o || !N(t) || J(t) ? !1 : L(t).position === "fixed" || Ze(t, o);
1237
797
  }
1238
- function yn(e, o) {
798
+ function zt(e, o) {
1239
799
  const t = o.get(e);
1240
800
  if (t)
1241
801
  return t;
1242
- let n = be(e, [], !1).filter((c) => H(c) && me(c) !== "body"), r = null;
1243
- const s = U(e).position === "fixed";
1244
- let l = s ? oe(e) : e;
1245
- for (; H(l) && !he(l); ) {
1246
- const c = U(l), a = qe(l);
1247
- !a && c.position === "fixed" && (r = null), (s ? !a && !r : !a && c.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || we(l) && !a && Nt(e, l)) ? n = n.filter((f) => f !== l) : r = c, l = oe(l);
802
+ let n = ne(e, [], !1).filter((l) => N(l) && Q(l) !== "body"), s = null;
803
+ const i = L(e).position === "fixed";
804
+ let r = i ? $(e) : e;
805
+ for (; N(r) && !J(r); ) {
806
+ const l = L(r), c = Ce(r);
807
+ !c && l.position === "fixed" && (s = null), (i ? !c && !s : !c && l.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || oe(r) && !c && Ze(e, r)) ? n = n.filter((u) => u !== r) : s = l, r = $(r);
1248
808
  }
1249
809
  return o.set(e, n), n;
1250
810
  }
1251
- function En(e) {
811
+ function It(e) {
1252
812
  let {
1253
813
  element: o,
1254
814
  boundary: t,
1255
815
  rootBoundary: n,
1256
- strategy: r
816
+ strategy: s
1257
817
  } = e;
1258
- const l = [...t === "clippingAncestors" ? Ie(o) ? [] : yn(o, this._c) : [].concat(t), n], c = l[0], a = l.reduce((u, f) => {
1259
- const d = pt(o, f, r);
1260
- return u.top = ie(d.top, u.top), u.right = Re(d.right, u.right), u.bottom = Re(d.bottom, u.bottom), u.left = ie(d.left, u.left), u;
1261
- }, pt(o, c, r));
818
+ const r = [...t === "clippingAncestors" ? pe(o) ? [] : zt(o, this._c) : [].concat(t), n], l = r[0], c = r.reduce((a, u) => {
819
+ const f = Ie(o, u, s);
820
+ return a.top = H(f.top, a.top), a.right = le(f.right, a.right), a.bottom = le(f.bottom, a.bottom), a.left = H(f.left, a.left), a;
821
+ }, Ie(o, l, s));
1262
822
  return {
1263
- width: a.right - a.left,
1264
- height: a.bottom - a.top,
1265
- x: a.left,
1266
- y: a.top
823
+ width: c.right - c.left,
824
+ height: c.bottom - c.top,
825
+ x: c.left,
826
+ y: c.top
1267
827
  };
1268
828
  }
1269
- function Cn(e) {
829
+ function Nt(e) {
1270
830
  const {
1271
831
  width: o,
1272
832
  height: t
1273
- } = _t(e);
833
+ } = Ye(e);
1274
834
  return {
1275
835
  width: o,
1276
836
  height: t
1277
837
  };
1278
838
  }
1279
- function Sn(e, o, t) {
1280
- const n = J(o), r = G(o), s = t === "fixed", l = ce(e, !0, s, o);
1281
- let c = {
839
+ function Lt(e, o, t) {
840
+ const n = D(o), s = P(o), i = t === "fixed", r = K(e, !0, i, o);
841
+ let l = {
1282
842
  scrollLeft: 0,
1283
843
  scrollTop: 0
1284
844
  };
1285
- const a = X(0);
1286
- if (n || !n && !s)
1287
- if ((me(o) !== "body" || we(r)) && (c = Pe(o)), n) {
1288
- const p = ce(o, !0, s, o);
1289
- a.x = p.x + o.clientLeft, a.y = p.y + o.clientTop;
1290
- } else r && (a.x = Ge(r));
1291
- const u = r && !n && !s ? Mt(r, c) : X(0), f = l.left + c.scrollLeft - a.x - u.x, d = l.top + c.scrollTop - a.y - u.y;
845
+ const c = _(0);
846
+ if (n || !n && !i)
847
+ if ((Q(o) !== "body" || oe(s)) && (l = xe(o)), n) {
848
+ const g = K(o, !0, i, o);
849
+ c.x = g.x + o.clientLeft, c.y = g.y + o.clientTop;
850
+ } else s && (c.x = ke(s));
851
+ const a = s && !n && !i ? Xe(s, l) : _(0), u = r.left + l.scrollLeft - c.x - a.x, f = r.top + l.scrollTop - c.y - a.y;
1292
852
  return {
1293
- x: f,
1294
- y: d,
1295
- width: l.width,
1296
- height: l.height
853
+ x: u,
854
+ y: f,
855
+ width: r.width,
856
+ height: r.height
1297
857
  };
1298
858
  }
1299
- function Fe(e) {
1300
- return U(e).position === "static";
859
+ function we(e) {
860
+ return L(e).position === "static";
1301
861
  }
1302
- function xt(e, o) {
1303
- if (!J(e) || U(e).position === "fixed")
862
+ function Ne(e, o) {
863
+ if (!D(e) || L(e).position === "fixed")
1304
864
  return null;
1305
865
  if (o)
1306
866
  return o(e);
1307
867
  let t = e.offsetParent;
1308
- return G(e) === t && (t = t.ownerDocument.body), t;
868
+ return P(e) === t && (t = t.ownerDocument.body), t;
1309
869
  }
1310
- function zt(e, o) {
1311
- const t = V(e);
1312
- if (Ie(e))
870
+ function Ge(e, o) {
871
+ const t = T(e);
872
+ if (pe(e))
1313
873
  return t;
1314
- if (!J(e)) {
1315
- let r = oe(e);
1316
- for (; r && !he(r); ) {
1317
- if (H(r) && !Fe(r))
1318
- return r;
1319
- r = oe(r);
874
+ if (!D(e)) {
875
+ let s = $(e);
876
+ for (; s && !J(s); ) {
877
+ if (N(s) && !we(s))
878
+ return s;
879
+ s = $(s);
1320
880
  }
1321
881
  return t;
1322
882
  }
1323
- let n = xt(e, o);
1324
- for (; n && dn(n) && Fe(n); )
1325
- n = xt(n, o);
1326
- return n && he(n) && Fe(n) && !qe(n) ? t : n || hn(e) || t;
883
+ let n = Ne(e, o);
884
+ for (; n && Et(n) && we(n); )
885
+ n = Ne(n, o);
886
+ return n && J(n) && we(n) && !Ce(n) ? t : n || St(e) || t;
1327
887
  }
1328
- const On = async function(e) {
1329
- const o = this.getOffsetParent || zt, t = this.getDimensions, n = await t(e.floating);
888
+ const _t = async function(e) {
889
+ const o = this.getOffsetParent || Ge, t = this.getDimensions, n = await t(e.floating);
1330
890
  return {
1331
- reference: Sn(e.reference, await o(e.floating), e.strategy),
891
+ reference: Lt(e.reference, await o(e.floating), e.strategy),
1332
892
  floating: {
1333
893
  x: 0,
1334
894
  y: 0,
@@ -1337,273 +897,273 @@ const On = async function(e) {
1337
897
  }
1338
898
  };
1339
899
  };
1340
- function Rn(e) {
1341
- return U(e).direction === "rtl";
1342
- }
1343
- const Tn = {
1344
- convertOffsetParentRelativeRectToViewportRelativeRect: pn,
1345
- getDocumentElement: G,
1346
- getClippingRect: En,
1347
- getOffsetParent: zt,
1348
- getElementRects: On,
1349
- getClientRects: xn,
1350
- getDimensions: Cn,
1351
- getScale: fe,
1352
- isElement: H,
1353
- isRTL: Rn
900
+ function Dt(e) {
901
+ return L(e).direction === "rtl";
902
+ }
903
+ const Pt = {
904
+ convertOffsetParentRelativeRectToViewportRelativeRect: Rt,
905
+ getDocumentElement: P,
906
+ getClippingRect: It,
907
+ getOffsetParent: Ge,
908
+ getElementRects: _t,
909
+ getClientRects: kt,
910
+ getDimensions: Nt,
911
+ getScale: Z,
912
+ isElement: N,
913
+ isRTL: Dt
1354
914
  };
1355
- function kn(e, o) {
915
+ function Ft(e, o) {
1356
916
  let t = null, n;
1357
- const r = G(e);
1358
- function s() {
1359
- var c;
1360
- clearTimeout(n), (c = t) == null || c.disconnect(), t = null;
917
+ const s = P(e);
918
+ function i() {
919
+ var l;
920
+ clearTimeout(n), (l = t) == null || l.disconnect(), t = null;
1361
921
  }
1362
- function l(c, a) {
1363
- c === void 0 && (c = !1), a === void 0 && (a = 1), s();
922
+ function r(l, c) {
923
+ l === void 0 && (l = !1), c === void 0 && (c = 1), i();
1364
924
  const {
1365
- left: u,
1366
- top: f,
1367
- width: d,
1368
- height: p
925
+ left: a,
926
+ top: u,
927
+ width: f,
928
+ height: g
1369
929
  } = e.getBoundingClientRect();
1370
- if (c || o(), !d || !p)
930
+ if (l || o(), !f || !g)
1371
931
  return;
1372
- const m = Ce(f), h = Ce(r.clientWidth - (u + d)), b = Ce(r.clientHeight - (f + p)), y = Ce(u), w = {
1373
- rootMargin: -m + "px " + -h + "px " + -b + "px " + -y + "px",
1374
- threshold: ie(0, Re(1, a)) || 1
932
+ const h = se(u), d = se(s.clientWidth - (a + f)), p = se(s.clientHeight - (u + g)), w = se(a), x = {
933
+ rootMargin: -h + "px " + -d + "px " + -p + "px " + -w + "px",
934
+ threshold: H(0, le(1, c)) || 1
1375
935
  };
1376
- let O = !0;
1377
- function R(S) {
1378
- const j = S[0].intersectionRatio;
1379
- if (j !== a) {
1380
- if (!O)
1381
- return l();
1382
- j ? l(!1, j) : n = setTimeout(() => {
1383
- l(!1, 1e-7);
936
+ let v = !0;
937
+ function E(y) {
938
+ const O = y[0].intersectionRatio;
939
+ if (O !== c) {
940
+ if (!v)
941
+ return r();
942
+ O ? r(!1, O) : n = setTimeout(() => {
943
+ r(!1, 1e-7);
1384
944
  }, 1e3);
1385
945
  }
1386
- O = !1;
946
+ v = !1;
1387
947
  }
1388
948
  try {
1389
- t = new IntersectionObserver(R, {
1390
- ...w,
949
+ t = new IntersectionObserver(E, {
950
+ ...x,
1391
951
  // Handle <iframe>s
1392
- root: r.ownerDocument
952
+ root: s.ownerDocument
1393
953
  });
1394
954
  } catch {
1395
- t = new IntersectionObserver(R, w);
955
+ t = new IntersectionObserver(E, x);
1396
956
  }
1397
957
  t.observe(e);
1398
958
  }
1399
- return l(!0), s;
959
+ return r(!0), i;
1400
960
  }
1401
- function An(e, o, t, n) {
961
+ function Vt(e, o, t, n) {
1402
962
  n === void 0 && (n = {});
1403
963
  const {
1404
- ancestorScroll: r = !0,
1405
- ancestorResize: s = !0,
1406
- elementResize: l = typeof ResizeObserver == "function",
1407
- layoutShift: c = typeof IntersectionObserver == "function",
1408
- animationFrame: a = !1
1409
- } = n, u = Je(e), f = r || s ? [...u ? be(u) : [], ...be(o)] : [];
1410
- f.forEach((g) => {
1411
- r && g.addEventListener("scroll", t, {
964
+ ancestorScroll: s = !0,
965
+ ancestorResize: i = !0,
966
+ elementResize: r = typeof ResizeObserver == "function",
967
+ layoutShift: l = typeof IntersectionObserver == "function",
968
+ animationFrame: c = !1
969
+ } = n, a = Re(e), u = s || i ? [...a ? ne(a) : [], ...ne(o)] : [];
970
+ u.forEach((m) => {
971
+ s && m.addEventListener("scroll", t, {
1412
972
  passive: !0
1413
- }), s && g.addEventListener("resize", t);
973
+ }), i && m.addEventListener("resize", t);
1414
974
  });
1415
- const d = u && c ? kn(u, t) : null;
1416
- let p = -1, m = null;
1417
- l && (m = new ResizeObserver((g) => {
1418
- let [w] = g;
1419
- w && w.target === u && m && (m.unobserve(o), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1420
- var O;
1421
- (O = m) == null || O.observe(o);
975
+ const f = a && l ? Ft(a, t) : null;
976
+ let g = -1, h = null;
977
+ r && (h = new ResizeObserver((m) => {
978
+ let [x] = m;
979
+ x && x.target === a && h && (h.unobserve(o), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
980
+ var v;
981
+ (v = h) == null || v.observe(o);
1422
982
  })), t();
1423
- }), u && !a && m.observe(u), m.observe(o));
1424
- let h, b = a ? ce(e) : null;
1425
- a && y();
1426
- function y() {
1427
- const g = ce(e);
1428
- b && (g.x !== b.x || g.y !== b.y || g.width !== b.width || g.height !== b.height) && t(), b = g, h = requestAnimationFrame(y);
983
+ }), a && !c && h.observe(a), h.observe(o));
984
+ let d, p = c ? K(e) : null;
985
+ c && w();
986
+ function w() {
987
+ const m = K(e);
988
+ p && (m.x !== p.x || m.y !== p.y || m.width !== p.width || m.height !== p.height) && t(), p = m, d = requestAnimationFrame(w);
1429
989
  }
1430
990
  return t(), () => {
1431
- var g;
1432
- f.forEach((w) => {
1433
- r && w.removeEventListener("scroll", t), s && w.removeEventListener("resize", t);
1434
- }), d == null || d(), (g = m) == null || g.disconnect(), m = null, a && cancelAnimationFrame(h);
991
+ var m;
992
+ u.forEach((x) => {
993
+ s && x.removeEventListener("scroll", t), i && x.removeEventListener("resize", t);
994
+ }), f == null || f(), (m = h) == null || m.disconnect(), h = null, c && cancelAnimationFrame(d);
1435
995
  };
1436
996
  }
1437
- const _n = un, jn = fn, Mn = cn, Nn = (e, o, t) => {
1438
- const n = /* @__PURE__ */ new Map(), r = {
1439
- platform: Tn,
997
+ const Wt = bt, Bt = vt, jt = wt, $t = (e, o, t) => {
998
+ const n = /* @__PURE__ */ new Map(), s = {
999
+ platform: Pt,
1440
1000
  ...t
1441
- }, s = {
1442
- ...r.platform,
1001
+ }, i = {
1002
+ ...s.platform,
1443
1003
  _c: n
1444
1004
  };
1445
- return ln(e, o, {
1446
- ...r,
1447
- platform: s
1005
+ return xt(e, o, {
1006
+ ...s,
1007
+ platform: i
1448
1008
  });
1449
1009
  };
1450
- var Se = typeof document < "u" ? Ft : Oe;
1451
- function _e(e, o) {
1010
+ var ie = typeof document < "u" ? tt : re;
1011
+ function fe(e, o) {
1452
1012
  if (e === o)
1453
1013
  return !0;
1454
1014
  if (typeof e != typeof o)
1455
1015
  return !1;
1456
1016
  if (typeof e == "function" && e.toString() === o.toString())
1457
1017
  return !0;
1458
- let t, n, r;
1018
+ let t, n, s;
1459
1019
  if (e && o && typeof e == "object") {
1460
1020
  if (Array.isArray(e)) {
1461
1021
  if (t = e.length, t !== o.length) return !1;
1462
1022
  for (n = t; n-- !== 0; )
1463
- if (!_e(e[n], o[n]))
1023
+ if (!fe(e[n], o[n]))
1464
1024
  return !1;
1465
1025
  return !0;
1466
1026
  }
1467
- if (r = Object.keys(e), t = r.length, t !== Object.keys(o).length)
1027
+ if (s = Object.keys(e), t = s.length, t !== Object.keys(o).length)
1468
1028
  return !1;
1469
1029
  for (n = t; n-- !== 0; )
1470
- if (!{}.hasOwnProperty.call(o, r[n]))
1030
+ if (!{}.hasOwnProperty.call(o, s[n]))
1471
1031
  return !1;
1472
1032
  for (n = t; n-- !== 0; ) {
1473
- const s = r[n];
1474
- if (!(s === "_owner" && e.$$typeof) && !_e(e[s], o[s]))
1033
+ const i = s[n];
1034
+ if (!(i === "_owner" && e.$$typeof) && !fe(e[i], o[i]))
1475
1035
  return !1;
1476
1036
  }
1477
1037
  return !0;
1478
1038
  }
1479
1039
  return e !== e && o !== o;
1480
1040
  }
1481
- function It(e) {
1041
+ function Je(e) {
1482
1042
  return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
1483
1043
  }
1484
- function vt(e, o) {
1485
- const t = It(e);
1044
+ function Le(e, o) {
1045
+ const t = Je(e);
1486
1046
  return Math.round(o * t) / t;
1487
1047
  }
1488
- function $e(e) {
1489
- const o = M.useRef(e);
1490
- return Se(() => {
1048
+ function ye(e) {
1049
+ const o = C.useRef(e);
1050
+ return ie(() => {
1491
1051
  o.current = e;
1492
1052
  }), o;
1493
1053
  }
1494
- function zn(e) {
1054
+ function Ht(e) {
1495
1055
  e === void 0 && (e = {});
1496
1056
  const {
1497
1057
  placement: o = "bottom",
1498
1058
  strategy: t = "absolute",
1499
1059
  middleware: n = [],
1500
- platform: r,
1060
+ platform: s,
1501
1061
  elements: {
1502
- reference: s,
1503
- floating: l
1062
+ reference: i,
1063
+ floating: r
1504
1064
  } = {},
1505
- transform: c = !0,
1506
- whileElementsMounted: a,
1507
- open: u
1508
- } = e, [f, d] = M.useState({
1065
+ transform: l = !0,
1066
+ whileElementsMounted: c,
1067
+ open: a
1068
+ } = e, [u, f] = C.useState({
1509
1069
  x: 0,
1510
1070
  y: 0,
1511
1071
  strategy: t,
1512
1072
  placement: o,
1513
1073
  middlewareData: {},
1514
1074
  isPositioned: !1
1515
- }), [p, m] = M.useState(n);
1516
- _e(p, n) || m(n);
1517
- const [h, b] = M.useState(null), [y, g] = M.useState(null), w = M.useCallback((k) => {
1518
- k !== j.current && (j.current = k, b(k));
1519
- }, []), O = M.useCallback((k) => {
1520
- k !== D.current && (D.current = k, g(k));
1521
- }, []), R = s || h, S = l || y, j = M.useRef(null), D = M.useRef(null), W = M.useRef(f), K = a != null, F = $e(a), q = $e(r), Z = $e(u), $ = M.useCallback(() => {
1522
- if (!j.current || !D.current)
1075
+ }), [g, h] = C.useState(n);
1076
+ fe(g, n) || h(n);
1077
+ const [d, p] = C.useState(null), [w, m] = C.useState(null), x = C.useCallback((S) => {
1078
+ S !== O.current && (O.current = S, p(S));
1079
+ }, []), v = C.useCallback((S) => {
1080
+ S !== A.current && (A.current = S, m(S));
1081
+ }, []), E = i || d, y = r || w, O = C.useRef(null), A = C.useRef(null), z = C.useRef(u), Y = c != null, F = ye(c), q = ye(s), ee = ye(a), B = C.useCallback(() => {
1082
+ if (!O.current || !A.current)
1523
1083
  return;
1524
- const k = {
1084
+ const S = {
1525
1085
  placement: o,
1526
1086
  strategy: t,
1527
- middleware: p
1087
+ middleware: g
1528
1088
  };
1529
- q.current && (k.platform = q.current), Nn(j.current, D.current, k).then((_) => {
1530
- const Y = {
1531
- ..._,
1089
+ q.current && (S.platform = q.current), $t(O.current, A.current, S).then((M) => {
1090
+ const j = {
1091
+ ...M,
1532
1092
  // The floating element's position may be recomputed while it's closed
1533
1093
  // but still mounted (such as when transitioning out). To ensure
1534
1094
  // `isPositioned` will be `false` initially on the next open, avoid
1535
1095
  // setting it to `true` when `open === false` (must be specified).
1536
- isPositioned: Z.current !== !1
1096
+ isPositioned: ee.current !== !1
1537
1097
  };
1538
- z.current && !_e(W.current, Y) && (W.current = Y, Bt.flushSync(() => {
1539
- d(Y);
1098
+ I.current && !fe(z.current, j) && (z.current = j, ot.flushSync(() => {
1099
+ f(j);
1540
1100
  }));
1541
1101
  });
1542
- }, [p, o, t, q, Z]);
1543
- Se(() => {
1544
- u === !1 && W.current.isPositioned && (W.current.isPositioned = !1, d((k) => ({
1545
- ...k,
1102
+ }, [g, o, t, q, ee]);
1103
+ ie(() => {
1104
+ a === !1 && z.current.isPositioned && (z.current.isPositioned = !1, f((S) => ({
1105
+ ...S,
1546
1106
  isPositioned: !1
1547
1107
  })));
1548
- }, [u]);
1549
- const z = M.useRef(!1);
1550
- Se(() => (z.current = !0, () => {
1551
- z.current = !1;
1552
- }), []), Se(() => {
1553
- if (R && (j.current = R), S && (D.current = S), R && S) {
1108
+ }, [a]);
1109
+ const I = C.useRef(!1);
1110
+ ie(() => (I.current = !0, () => {
1111
+ I.current = !1;
1112
+ }), []), ie(() => {
1113
+ if (E && (O.current = E), y && (A.current = y), E && y) {
1554
1114
  if (F.current)
1555
- return F.current(R, S, $);
1556
- $();
1115
+ return F.current(E, y, B);
1116
+ B();
1557
1117
  }
1558
- }, [R, S, $, F, K]);
1559
- const Q = M.useMemo(() => ({
1560
- reference: j,
1561
- floating: D,
1562
- setReference: w,
1563
- setFloating: O
1564
- }), [w, O]), I = M.useMemo(() => ({
1565
- reference: R,
1566
- floating: S
1567
- }), [R, S]), B = M.useMemo(() => {
1568
- const k = {
1118
+ }, [E, y, B, F, Y]);
1119
+ const te = C.useMemo(() => ({
1120
+ reference: O,
1121
+ floating: A,
1122
+ setReference: x,
1123
+ setFloating: v
1124
+ }), [x, v]), k = C.useMemo(() => ({
1125
+ reference: E,
1126
+ floating: y
1127
+ }), [E, y]), V = C.useMemo(() => {
1128
+ const S = {
1569
1129
  position: t,
1570
1130
  left: 0,
1571
1131
  top: 0
1572
1132
  };
1573
- if (!I.floating)
1574
- return k;
1575
- const _ = vt(I.floating, f.x), Y = vt(I.floating, f.y);
1576
- return c ? {
1577
- ...k,
1578
- transform: "translate(" + _ + "px, " + Y + "px)",
1579
- ...It(I.floating) >= 1.5 && {
1133
+ if (!k.floating)
1134
+ return S;
1135
+ const M = Le(k.floating, u.x), j = Le(k.floating, u.y);
1136
+ return l ? {
1137
+ ...S,
1138
+ transform: "translate(" + M + "px, " + j + "px)",
1139
+ ...Je(k.floating) >= 1.5 && {
1580
1140
  willChange: "transform"
1581
1141
  }
1582
1142
  } : {
1583
1143
  position: t,
1584
- left: _,
1585
- top: Y
1144
+ left: M,
1145
+ top: j
1586
1146
  };
1587
- }, [t, c, I.floating, f.x, f.y]);
1588
- return M.useMemo(() => ({
1589
- ...f,
1590
- update: $,
1591
- refs: Q,
1592
- elements: I,
1593
- floatingStyles: B
1594
- }), [f, $, Q, I, B]);
1595
- }
1596
- const In = (e, o) => ({
1597
- ..._n(e),
1147
+ }, [t, l, k.floating, u.x, u.y]);
1148
+ return C.useMemo(() => ({
1149
+ ...u,
1150
+ update: B,
1151
+ refs: te,
1152
+ elements: k,
1153
+ floatingStyles: V
1154
+ }), [u, B, te, k, V]);
1155
+ }
1156
+ const Ut = (e, o) => ({
1157
+ ...Wt(e),
1598
1158
  options: [e, o]
1599
- }), Pn = (e, o) => ({
1600
- ...jn(e),
1159
+ }), Kt = (e, o) => ({
1160
+ ...Bt(e),
1601
1161
  options: [e, o]
1602
- }), Ln = (e, o) => ({
1603
- ...Mn(e),
1162
+ }), Yt = (e, o) => ({
1163
+ ...jt(e),
1604
1164
  options: [e, o]
1605
1165
  });
1606
- function Dn(e, o) {
1166
+ function qt(e, o) {
1607
1167
  return () => {
1608
1168
  if (typeof document > "u")
1609
1169
  return;
@@ -1615,233 +1175,233 @@ function Dn(e, o) {
1615
1175
  };
1616
1176
  };
1617
1177
  }
1618
- function Pt(e) {
1178
+ function Qe(e) {
1619
1179
  const {
1620
1180
  className: o,
1621
1181
  placement: t = "bottom-start",
1622
1182
  trigger: n = "hover",
1623
- content: r,
1624
- children: s,
1625
- onClose: l,
1626
- onOpen: c,
1627
- disabled: a = !1,
1628
- show: u = !1,
1629
- setShow: f,
1630
- role: d = "tooltip"
1631
- } = e, [p, m] = je(u), h = () => f !== void 0 && u !== void 0 ? u : p, b = () => f !== void 0 && u !== void 0 ? f : m, { x: y, y: g, strategy: w, refs: O } = zn({
1632
- open: h(),
1633
- middleware: [In(4), Ln(), Pn()],
1634
- whileElementsMounted: An,
1183
+ content: s,
1184
+ children: i,
1185
+ onClose: r,
1186
+ onOpen: l,
1187
+ disabled: c = !1,
1188
+ show: a = !1,
1189
+ setShow: u,
1190
+ role: f = "tooltip"
1191
+ } = e, [g, h] = de(a), d = () => u !== void 0 && a !== void 0 ? a : g, p = () => u !== void 0 && a !== void 0 ? u : h, { x: w, y: m, strategy: x, refs: v } = Ht({
1192
+ open: d(),
1193
+ middleware: [Ut(4), Yt(), Kt()],
1194
+ whileElementsMounted: Vt,
1635
1195
  placement: t
1636
- }), R = $t();
1637
- return Oe(
1638
- Dn(O.floating, (S) => {
1639
- S && b()(!1);
1196
+ }), E = nt();
1197
+ return re(
1198
+ qt(v.floating, (y) => {
1199
+ y && p()(!1);
1640
1200
  }),
1641
1201
  []
1642
- ), /* @__PURE__ */ E.jsxs(E.Fragment, { children: [
1643
- /* @__PURE__ */ E.jsx(
1202
+ ), /* @__PURE__ */ W(Pe, { children: [
1203
+ /* @__PURE__ */ b(
1644
1204
  "div",
1645
1205
  {
1646
1206
  className: "z-auto block min-w-max",
1647
- id: `zen__popover-${R}`,
1648
- ref: O.setReference,
1649
- onClick: (S) => {
1207
+ id: `zen__popover-${E}`,
1208
+ ref: v.setReference,
1209
+ onClick: (y) => {
1650
1210
  if (n === "click") {
1651
- if (a)
1211
+ if (c)
1652
1212
  return;
1653
- h() ? (b()(!1), l == null || l()) : (b()(!0), c == null || c());
1213
+ d() ? (p()(!1), r == null || r()) : (p()(!0), l == null || l());
1654
1214
  }
1655
- S.stopPropagation();
1215
+ y.stopPropagation();
1656
1216
  },
1657
- role: d,
1658
- children: s
1217
+ role: f,
1218
+ children: i
1659
1219
  }
1660
1220
  ),
1661
- h() && Yt(
1662
- /* @__PURE__ */ E.jsx(
1221
+ d() && st(
1222
+ /* @__PURE__ */ b(
1663
1223
  "div",
1664
1224
  {
1665
- onClick: (S) => S.stopPropagation(),
1225
+ onClick: (y) => y.stopPropagation(),
1666
1226
  role: "tooltip",
1667
- className: L(
1227
+ className: R(
1668
1228
  "zen__popover z-50 w-fit rounded border border-border bg-background shadow-secondary",
1669
1229
  o
1670
1230
  ),
1671
- ref: O.setFloating,
1231
+ ref: v.setFloating,
1672
1232
  style: {
1673
- position: w,
1674
- top: g ?? 0,
1675
- left: y ?? 0
1233
+ position: x,
1234
+ top: m ?? 0,
1235
+ left: w ?? 0
1676
1236
  },
1677
- children: r
1237
+ children: s
1678
1238
  }
1679
1239
  ),
1680
1240
  document.body
1681
1241
  )
1682
1242
  ] });
1683
1243
  }
1684
- function Wn(e) {
1685
- var b, y;
1244
+ function Xt(e) {
1245
+ var p, w;
1686
1246
  const {
1687
1247
  items: o = [],
1688
1248
  children: t,
1689
1249
  moreItemsLabel: n = "",
1690
- parentRef: r,
1691
- data: s,
1692
- estimator: l = (g, w) => w + 30,
1693
- font: c = "12px Inter",
1694
- badgeVariant: a = "secondary",
1695
- badgeStyles: u
1696
- } = e, [f, d] = je({
1250
+ parentRef: s,
1251
+ data: i,
1252
+ estimator: r = (m, x) => x + 30,
1253
+ font: l = "12px Inter",
1254
+ badgeVariant: c = "secondary",
1255
+ badgeStyles: a
1256
+ } = e, [u, f] = de({
1697
1257
  visible: o,
1698
1258
  hidden: []
1699
- }), p = Ye(() => {
1259
+ }), g = ve(() => {
1700
1260
  if (typeof document > "u")
1701
1261
  return null;
1702
- const w = document.createElement("canvas").getContext("2d");
1703
- return w && (w.font = c), w;
1704
- }, []), m = () => {
1705
- const g = r == null ? void 0 : r.current;
1706
- if (!g)
1262
+ const x = document.createElement("canvas").getContext("2d");
1263
+ return x && (x.font = l), x;
1264
+ }, []), h = () => {
1265
+ const m = s == null ? void 0 : s.current;
1266
+ if (!m)
1707
1267
  return;
1708
- const w = g.offsetWidth, O = [], R = [], S = l(n, p.measureText(n).width + 10);
1709
- h == null || h.reduce((j, D, W) => (j + D + S > w - 20 ? R.push(o[W]) : O.push(o[W]), j + D), 0), d({
1710
- visible: O,
1711
- hidden: R
1268
+ const x = m.offsetWidth, v = [], E = [], y = r(n, g.measureText(n).width + 10);
1269
+ d == null || d.reduce((O, A, z) => (O + A + y > x - 20 ? E.push(o[z]) : v.push(o[z]), O + A), 0), f({
1270
+ visible: v,
1271
+ hidden: E
1712
1272
  });
1713
- }, h = Ye(
1714
- () => (o == null ? void 0 : o.map((g) => l(g, p.measureText(g).width))) ?? [],
1273
+ }, d = ve(
1274
+ () => (o == null ? void 0 : o.map((m) => r(m, g.measureText(m).width))) ?? [],
1715
1275
  [o]
1716
1276
  );
1717
- return Oe(() => {
1718
- m();
1719
- }, [o]), Oe(() => {
1720
- if (!(r != null && r.current)) return;
1721
- const g = new ResizeObserver(() => {
1722
- m();
1277
+ return re(() => {
1278
+ h();
1279
+ }, [o]), re(() => {
1280
+ if (!(s != null && s.current)) return;
1281
+ const m = new ResizeObserver(() => {
1282
+ h();
1723
1283
  });
1724
- return g.observe(r.current), () => {
1725
- g.disconnect();
1284
+ return m.observe(s.current), () => {
1285
+ m.disconnect();
1726
1286
  };
1727
- }, [o]), /* @__PURE__ */ E.jsxs(E.Fragment, { children: [
1728
- (b = f.visible) == null ? void 0 : b.map((g, w) => t(g, w, s == null ? void 0 : s[w])),
1729
- ((y = f.hidden) == null ? void 0 : y.length) > 0 && /* @__PURE__ */ E.jsx(
1730
- Pt,
1287
+ }, [o]), /* @__PURE__ */ W(Pe, { children: [
1288
+ (p = u.visible) == null ? void 0 : p.map((m, x) => t(m, x, i == null ? void 0 : i[x])),
1289
+ ((w = u.hidden) == null ? void 0 : w.length) > 0 && /* @__PURE__ */ b(
1290
+ Qe,
1731
1291
  {
1732
1292
  trigger: "click",
1733
- content: /* @__PURE__ */ E.jsx("div", { className: "grid max-h-60 grid-flow-row grid-cols-2 gap-3 overflow-auto p-2", children: f.hidden.map(
1734
- (g, w) => t(
1735
- g,
1736
- f.visible.length + w,
1737
- s == null ? void 0 : s[f.visible.length + w]
1293
+ content: /* @__PURE__ */ b("div", { className: "grid max-h-60 grid-flow-row grid-cols-2 gap-3 overflow-auto p-2", children: u.hidden.map(
1294
+ (m, x) => t(
1295
+ m,
1296
+ u.visible.length + x,
1297
+ i == null ? void 0 : i[u.visible.length + x]
1738
1298
  )
1739
1299
  ) }),
1740
- children: /* @__PURE__ */ E.jsx(Ct, { className: u, variant: a, children: /* @__PURE__ */ E.jsx("p", { children: `+${f.hidden.length} ${n}` }) }, "more_items_button")
1300
+ children: /* @__PURE__ */ b(We, { className: a, variant: c, children: /* @__PURE__ */ b("p", { children: `+${u.hidden.length} ${n}` }) }, "more_items_button")
1741
1301
  }
1742
1302
  )
1743
1303
  ] });
1744
1304
  }
1745
- function ue(e, o, t) {
1746
- let n = t.initialDeps ?? [], r;
1305
+ function X(e, o, t) {
1306
+ let n = t.initialDeps ?? [], s;
1747
1307
  return () => {
1748
- var s, l, c, a;
1749
- let u;
1750
- t.key && ((s = t.debug) != null && s.call(t)) && (u = Date.now());
1751
- const f = e();
1752
- if (!(f.length !== n.length || f.some((m, h) => n[h] !== m)))
1753
- return r;
1754
- n = f;
1755
- let p;
1756
- if (t.key && ((l = t.debug) != null && l.call(t)) && (p = Date.now()), r = o(...f), t.key && ((c = t.debug) != null && c.call(t))) {
1757
- const m = Math.round((Date.now() - u) * 100) / 100, h = Math.round((Date.now() - p) * 100) / 100, b = h / 16, y = (g, w) => {
1758
- for (g = String(g); g.length < w; )
1759
- g = " " + g;
1760
- return g;
1308
+ var i, r, l, c;
1309
+ let a;
1310
+ t.key && ((i = t.debug) != null && i.call(t)) && (a = Date.now());
1311
+ const u = e();
1312
+ if (!(u.length !== n.length || u.some((h, d) => n[d] !== h)))
1313
+ return s;
1314
+ n = u;
1315
+ let g;
1316
+ if (t.key && ((r = t.debug) != null && r.call(t)) && (g = Date.now()), s = o(...u), t.key && ((l = t.debug) != null && l.call(t))) {
1317
+ const h = Math.round((Date.now() - a) * 100) / 100, d = Math.round((Date.now() - g) * 100) / 100, p = d / 16, w = (m, x) => {
1318
+ for (m = String(m); m.length < x; )
1319
+ m = " " + m;
1320
+ return m;
1761
1321
  };
1762
1322
  console.info(
1763
- `%c⏱ ${y(h, 5)} /${y(m, 5)} ms`,
1323
+ `%c⏱ ${w(d, 5)} /${w(h, 5)} ms`,
1764
1324
  `
1765
1325
  font-size: .6rem;
1766
1326
  font-weight: bold;
1767
1327
  color: hsl(${Math.max(
1768
1328
  0,
1769
- Math.min(120 - 120 * b, 120)
1329
+ Math.min(120 - 120 * p, 120)
1770
1330
  )}deg 100% 31%);`,
1771
1331
  t == null ? void 0 : t.key
1772
1332
  );
1773
1333
  }
1774
- return (a = t == null ? void 0 : t.onChange) == null || a.call(t, r), r;
1334
+ return (c = t == null ? void 0 : t.onChange) == null || c.call(t, s), s;
1775
1335
  };
1776
1336
  }
1777
- function Be(e, o) {
1337
+ function be(e, o) {
1778
1338
  if (e === void 0)
1779
1339
  throw new Error("Unexpected undefined");
1780
1340
  return e;
1781
1341
  }
1782
- const Vn = (e, o) => Math.abs(e - o) < 1, Fn = (e, o, t) => {
1342
+ const Zt = (e, o) => Math.abs(e - o) < 1, Gt = (e, o, t) => {
1783
1343
  let n;
1784
- return function(...r) {
1785
- e.clearTimeout(n), n = e.setTimeout(() => o.apply(this, r), t);
1344
+ return function(...s) {
1345
+ e.clearTimeout(n), n = e.setTimeout(() => o.apply(this, s), t);
1786
1346
  };
1787
- }, $n = (e) => e, Bn = (e) => {
1347
+ }, Jt = (e) => e, Qt = (e) => {
1788
1348
  const o = Math.max(e.startIndex - e.overscan, 0), t = Math.min(e.endIndex + e.overscan, e.count - 1), n = [];
1789
- for (let r = o; r <= t; r++)
1790
- n.push(r);
1349
+ for (let s = o; s <= t; s++)
1350
+ n.push(s);
1791
1351
  return n;
1792
- }, Yn = (e, o) => {
1352
+ }, en = (e, o) => {
1793
1353
  const t = e.scrollElement;
1794
1354
  if (!t)
1795
1355
  return;
1796
1356
  const n = e.targetWindow;
1797
1357
  if (!n)
1798
1358
  return;
1799
- const r = (l) => {
1800
- const { width: c, height: a } = l;
1801
- o({ width: Math.round(c), height: Math.round(a) });
1359
+ const s = (r) => {
1360
+ const { width: l, height: c } = r;
1361
+ o({ width: Math.round(l), height: Math.round(c) });
1802
1362
  };
1803
- if (r(t.getBoundingClientRect()), !n.ResizeObserver)
1363
+ if (s(t.getBoundingClientRect()), !n.ResizeObserver)
1804
1364
  return () => {
1805
1365
  };
1806
- const s = new n.ResizeObserver((l) => {
1807
- const c = l[0];
1808
- if (c != null && c.borderBoxSize) {
1809
- const a = c.borderBoxSize[0];
1810
- if (a) {
1811
- r({ width: a.inlineSize, height: a.blockSize });
1366
+ const i = new n.ResizeObserver((r) => {
1367
+ const l = r[0];
1368
+ if (l != null && l.borderBoxSize) {
1369
+ const c = l.borderBoxSize[0];
1370
+ if (c) {
1371
+ s({ width: c.inlineSize, height: c.blockSize });
1812
1372
  return;
1813
1373
  }
1814
1374
  }
1815
- r(t.getBoundingClientRect());
1375
+ s(t.getBoundingClientRect());
1816
1376
  });
1817
- return s.observe(t, { box: "border-box" }), () => {
1818
- s.unobserve(t);
1377
+ return i.observe(t, { box: "border-box" }), () => {
1378
+ i.unobserve(t);
1819
1379
  };
1820
- }, bt = {
1380
+ }, _e = {
1821
1381
  passive: !0
1822
- }, Hn = typeof window > "u" ? !0 : "onscrollend" in window, Un = (e, o) => {
1382
+ }, tn = typeof window > "u" ? !0 : "onscrollend" in window, nn = (e, o) => {
1823
1383
  const t = e.scrollElement;
1824
1384
  if (!t)
1825
1385
  return;
1826
1386
  const n = e.targetWindow;
1827
1387
  if (!n)
1828
1388
  return;
1829
- let r = 0;
1830
- const s = e.options.useScrollendEvent && Hn ? () => {
1831
- } : Fn(
1389
+ let s = 0;
1390
+ const i = e.options.useScrollendEvent && tn ? () => {
1391
+ } : Gt(
1832
1392
  n,
1833
1393
  () => {
1834
- o(r, !1);
1394
+ o(s, !1);
1835
1395
  },
1836
1396
  e.options.isScrollingResetDelay
1837
- ), l = (u) => () => {
1838
- const { horizontal: f, isRtl: d } = e.options;
1839
- r = f ? t.scrollLeft * (d && -1 || 1) : t.scrollTop, s(), o(r, u);
1840
- }, c = l(!0), a = l(!1);
1841
- return a(), t.addEventListener("scroll", c, bt), t.addEventListener("scrollend", a, bt), () => {
1842
- t.removeEventListener("scroll", c), t.removeEventListener("scrollend", a);
1397
+ ), r = (a) => () => {
1398
+ const { horizontal: u, isRtl: f } = e.options;
1399
+ s = u ? t.scrollLeft * (f && -1 || 1) : t.scrollTop, i(), o(s, a);
1400
+ }, l = r(!0), c = r(!1);
1401
+ return c(), t.addEventListener("scroll", l, _e), t.addEventListener("scrollend", c, _e), () => {
1402
+ t.removeEventListener("scroll", l), t.removeEventListener("scrollend", c);
1843
1403
  };
1844
- }, qn = (e, o, t) => {
1404
+ }, on = (e, o, t) => {
1845
1405
  if (o != null && o.borderBoxSize) {
1846
1406
  const n = o.borderBoxSize[0];
1847
1407
  if (n)
@@ -1852,43 +1412,43 @@ const Vn = (e, o) => Math.abs(e - o) < 1, Fn = (e, o, t) => {
1852
1412
  return Math.round(
1853
1413
  e.getBoundingClientRect()[t.options.horizontal ? "width" : "height"]
1854
1414
  );
1855
- }, Xn = (e, {
1415
+ }, sn = (e, {
1856
1416
  adjustments: o = 0,
1857
1417
  behavior: t
1858
1418
  }, n) => {
1859
- var r, s;
1860
- const l = e + o;
1861
- (s = (r = n.scrollElement) == null ? void 0 : r.scrollTo) == null || s.call(r, {
1862
- [n.options.horizontal ? "left" : "top"]: l,
1419
+ var s, i;
1420
+ const r = e + o;
1421
+ (i = (s = n.scrollElement) == null ? void 0 : s.scrollTo) == null || i.call(s, {
1422
+ [n.options.horizontal ? "left" : "top"]: r,
1863
1423
  behavior: t
1864
1424
  });
1865
1425
  };
1866
- class Jn {
1426
+ class rn {
1867
1427
  constructor(o) {
1868
1428
  this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.scrollToIndexTimeoutId = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
1869
1429
  let t = null;
1870
- const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((r) => {
1871
- r.forEach((s) => {
1872
- this._measureElement(s.target, s);
1430
+ const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((s) => {
1431
+ s.forEach((i) => {
1432
+ this._measureElement(i.target, i);
1873
1433
  });
1874
1434
  }));
1875
1435
  return {
1876
1436
  disconnect: () => {
1877
- var r;
1878
- (r = n()) == null || r.disconnect(), t = null;
1879
- },
1880
- observe: (r) => {
1881
1437
  var s;
1882
- return (s = n()) == null ? void 0 : s.observe(r, { box: "border-box" });
1438
+ (s = n()) == null || s.disconnect(), t = null;
1883
1439
  },
1884
- unobserve: (r) => {
1885
- var s;
1886
- return (s = n()) == null ? void 0 : s.unobserve(r);
1440
+ observe: (s) => {
1441
+ var i;
1442
+ return (i = n()) == null ? void 0 : i.observe(s, { box: "border-box" });
1443
+ },
1444
+ unobserve: (s) => {
1445
+ var i;
1446
+ return (i = n()) == null ? void 0 : i.unobserve(s);
1887
1447
  }
1888
1448
  };
1889
1449
  })(), this.range = null, this.setOptions = (t) => {
1890
- Object.entries(t).forEach(([n, r]) => {
1891
- typeof r > "u" && delete t[n];
1450
+ Object.entries(t).forEach(([n, s]) => {
1451
+ typeof s > "u" && delete t[n];
1892
1452
  }), this.options = {
1893
1453
  debug: !1,
1894
1454
  initialOffset: 0,
@@ -1898,11 +1458,11 @@ class Jn {
1898
1458
  scrollPaddingStart: 0,
1899
1459
  scrollPaddingEnd: 0,
1900
1460
  horizontal: !1,
1901
- getItemKey: $n,
1902
- rangeExtractor: Bn,
1461
+ getItemKey: Jt,
1462
+ rangeExtractor: Qt,
1903
1463
  onChange: () => {
1904
1464
  },
1905
- measureElement: qn,
1465
+ measureElement: on,
1906
1466
  initialRect: { width: 0, height: 0 },
1907
1467
  scrollMargin: 0,
1908
1468
  gap: 0,
@@ -1916,9 +1476,9 @@ class Jn {
1916
1476
  ...t
1917
1477
  };
1918
1478
  }, this.notify = (t) => {
1919
- var n, r;
1920
- (r = (n = this.options).onChange) == null || r.call(n, this, t);
1921
- }, this.maybeNotify = ue(
1479
+ var n, s;
1480
+ (s = (n = this.options).onChange) == null || s.call(n, this, t);
1481
+ }, this.maybeNotify = X(
1922
1482
  () => (this.calculateRange(), [
1923
1483
  this.isScrolling,
1924
1484
  this.range ? this.range.startIndex : null,
@@ -1948,35 +1508,35 @@ class Jn {
1948
1508
  this.maybeNotify();
1949
1509
  return;
1950
1510
  }
1951
- this.scrollElement = n, this.scrollElement && "ownerDocument" in this.scrollElement ? this.targetWindow = this.scrollElement.ownerDocument.defaultView : this.targetWindow = ((t = this.scrollElement) == null ? void 0 : t.window) ?? null, this.elementsCache.forEach((r) => {
1952
- this.observer.observe(r);
1511
+ this.scrollElement = n, this.scrollElement && "ownerDocument" in this.scrollElement ? this.targetWindow = this.scrollElement.ownerDocument.defaultView : this.targetWindow = ((t = this.scrollElement) == null ? void 0 : t.window) ?? null, this.elementsCache.forEach((s) => {
1512
+ this.observer.observe(s);
1953
1513
  }), this._scrollToOffset(this.getScrollOffset(), {
1954
1514
  adjustments: void 0,
1955
1515
  behavior: void 0
1956
1516
  }), this.unsubs.push(
1957
- this.options.observeElementRect(this, (r) => {
1958
- this.scrollRect = r, this.maybeNotify();
1517
+ this.options.observeElementRect(this, (s) => {
1518
+ this.scrollRect = s, this.maybeNotify();
1959
1519
  })
1960
1520
  ), this.unsubs.push(
1961
- this.options.observeElementOffset(this, (r, s) => {
1962
- this.scrollAdjustments = 0, this.scrollDirection = s ? this.getScrollOffset() < r ? "forward" : "backward" : null, this.scrollOffset = r, this.isScrolling = s, this.maybeNotify();
1521
+ this.options.observeElementOffset(this, (s, i) => {
1522
+ this.scrollAdjustments = 0, this.scrollDirection = i ? this.getScrollOffset() < s ? "forward" : "backward" : null, this.scrollOffset = s, this.isScrolling = i, this.maybeNotify();
1963
1523
  })
1964
1524
  );
1965
1525
  }
1966
1526
  }, this.getSize = () => this.options.enabled ? (this.scrollRect = this.scrollRect ?? this.options.initialRect, this.scrollRect[this.options.horizontal ? "width" : "height"]) : (this.scrollRect = null, 0), this.getScrollOffset = () => this.options.enabled ? (this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset == "function" ? this.options.initialOffset() : this.options.initialOffset), this.scrollOffset) : (this.scrollOffset = null, 0), this.getFurthestMeasurement = (t, n) => {
1967
- const r = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
1968
- for (let l = n - 1; l >= 0; l--) {
1969
- const c = t[l];
1970
- if (r.has(c.lane))
1527
+ const s = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
1528
+ for (let r = n - 1; r >= 0; r--) {
1529
+ const l = t[r];
1530
+ if (s.has(l.lane))
1971
1531
  continue;
1972
- const a = s.get(
1973
- c.lane
1532
+ const c = i.get(
1533
+ l.lane
1974
1534
  );
1975
- if (a == null || c.end > a.end ? s.set(c.lane, c) : c.end < a.end && r.set(c.lane, !0), r.size === this.options.lanes)
1535
+ if (c == null || l.end > c.end ? i.set(l.lane, l) : l.end < c.end && s.set(l.lane, !0), s.size === this.options.lanes)
1976
1536
  break;
1977
1537
  }
1978
- return s.size === this.options.lanes ? Array.from(s.values()).sort((l, c) => l.end === c.end ? l.index - c.index : l.end - c.end)[0] : void 0;
1979
- }, this.getMeasurementOptions = ue(
1538
+ return i.size === this.options.lanes ? Array.from(i.values()).sort((r, l) => r.end === l.end ? r.index - l.index : r.end - l.end)[0] : void 0;
1539
+ }, this.getMeasurementOptions = X(
1980
1540
  () => [
1981
1541
  this.options.count,
1982
1542
  this.options.paddingStart,
@@ -1984,109 +1544,109 @@ class Jn {
1984
1544
  this.options.getItemKey,
1985
1545
  this.options.enabled
1986
1546
  ],
1987
- (t, n, r, s, l) => (this.pendingMeasuredCacheIndexes = [], {
1547
+ (t, n, s, i, r) => (this.pendingMeasuredCacheIndexes = [], {
1988
1548
  count: t,
1989
1549
  paddingStart: n,
1990
- scrollMargin: r,
1991
- getItemKey: s,
1992
- enabled: l
1550
+ scrollMargin: s,
1551
+ getItemKey: i,
1552
+ enabled: r
1993
1553
  }),
1994
1554
  {
1995
1555
  key: !1
1996
1556
  }
1997
- ), this.getMeasurements = ue(
1557
+ ), this.getMeasurements = X(
1998
1558
  () => [this.getMeasurementOptions(), this.itemSizeCache],
1999
- ({ count: t, paddingStart: n, scrollMargin: r, getItemKey: s, enabled: l }, c) => {
2000
- if (!l)
1559
+ ({ count: t, paddingStart: n, scrollMargin: s, getItemKey: i, enabled: r }, l) => {
1560
+ if (!r)
2001
1561
  return this.measurementsCache = [], this.itemSizeCache.clear(), [];
2002
- this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((f) => {
2003
- this.itemSizeCache.set(f.key, f.size);
1562
+ this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((u) => {
1563
+ this.itemSizeCache.set(u.key, u.size);
2004
1564
  }));
2005
- const a = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
1565
+ const c = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
2006
1566
  this.pendingMeasuredCacheIndexes = [];
2007
- const u = this.measurementsCache.slice(0, a);
2008
- for (let f = a; f < t; f++) {
2009
- const d = s(f), p = this.options.lanes === 1 ? u[f - 1] : this.getFurthestMeasurement(u, f), m = p ? p.end + this.options.gap : n + r, h = c.get(d), b = typeof h == "number" ? h : this.options.estimateSize(f), y = m + b, g = p ? p.lane : f % this.options.lanes;
2010
- u[f] = {
2011
- index: f,
2012
- start: m,
2013
- size: b,
2014
- end: y,
2015
- key: d,
2016
- lane: g
1567
+ const a = this.measurementsCache.slice(0, c);
1568
+ for (let u = c; u < t; u++) {
1569
+ const f = i(u), g = this.options.lanes === 1 ? a[u - 1] : this.getFurthestMeasurement(a, u), h = g ? g.end + this.options.gap : n + s, d = l.get(f), p = typeof d == "number" ? d : this.options.estimateSize(u), w = h + p, m = g ? g.lane : u % this.options.lanes;
1570
+ a[u] = {
1571
+ index: u,
1572
+ start: h,
1573
+ size: p,
1574
+ end: w,
1575
+ key: f,
1576
+ lane: m
2017
1577
  };
2018
1578
  }
2019
- return this.measurementsCache = u, u;
1579
+ return this.measurementsCache = a, a;
2020
1580
  },
2021
1581
  {
2022
1582
  key: process.env.NODE_ENV !== "production" && "getMeasurements",
2023
1583
  debug: () => this.options.debug
2024
1584
  }
2025
- ), this.calculateRange = ue(
1585
+ ), this.calculateRange = X(
2026
1586
  () => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],
2027
- (t, n, r) => this.range = t.length > 0 && n > 0 ? Gn({
1587
+ (t, n, s) => this.range = t.length > 0 && n > 0 ? ln({
2028
1588
  measurements: t,
2029
1589
  outerSize: n,
2030
- scrollOffset: r
1590
+ scrollOffset: s
2031
1591
  }) : null,
2032
1592
  {
2033
1593
  key: process.env.NODE_ENV !== "production" && "calculateRange",
2034
1594
  debug: () => this.options.debug
2035
1595
  }
2036
- ), this.getIndexes = ue(
1596
+ ), this.getIndexes = X(
2037
1597
  () => [
2038
1598
  this.options.rangeExtractor,
2039
1599
  this.calculateRange(),
2040
1600
  this.options.overscan,
2041
1601
  this.options.count
2042
1602
  ],
2043
- (t, n, r, s) => n === null ? [] : t({
1603
+ (t, n, s, i) => n === null ? [] : t({
2044
1604
  startIndex: n.startIndex,
2045
1605
  endIndex: n.endIndex,
2046
- overscan: r,
2047
- count: s
1606
+ overscan: s,
1607
+ count: i
2048
1608
  }),
2049
1609
  {
2050
1610
  key: process.env.NODE_ENV !== "production" && "getIndexes",
2051
1611
  debug: () => this.options.debug
2052
1612
  }
2053
1613
  ), this.indexFromElement = (t) => {
2054
- const n = this.options.indexAttribute, r = t.getAttribute(n);
2055
- return r ? parseInt(r, 10) : (console.warn(
1614
+ const n = this.options.indexAttribute, s = t.getAttribute(n);
1615
+ return s ? parseInt(s, 10) : (console.warn(
2056
1616
  `Missing attribute name '${n}={index}' on measured element.`
2057
1617
  ), -1);
2058
1618
  }, this._measureElement = (t, n) => {
2059
- const r = this.indexFromElement(t), s = this.measurementsCache[r];
2060
- if (!s)
1619
+ const s = this.indexFromElement(t), i = this.measurementsCache[s];
1620
+ if (!i)
2061
1621
  return;
2062
- const l = s.key, c = this.elementsCache.get(l);
2063
- c !== t && (c && this.observer.unobserve(c), this.observer.observe(t), this.elementsCache.set(l, t)), t.isConnected && this.resizeItem(r, this.options.measureElement(t, n, this));
1622
+ const r = i.key, l = this.elementsCache.get(r);
1623
+ l !== t && (l && this.observer.unobserve(l), this.observer.observe(t), this.elementsCache.set(r, t)), t.isConnected && this.resizeItem(s, this.options.measureElement(t, n, this));
2064
1624
  }, this.resizeItem = (t, n) => {
2065
- const r = this.measurementsCache[t];
2066
- if (!r)
1625
+ const s = this.measurementsCache[t];
1626
+ if (!s)
2067
1627
  return;
2068
- const s = this.itemSizeCache.get(r.key) ?? r.size, l = n - s;
2069
- l !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(r, l, this) : r.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", l), this._scrollToOffset(this.getScrollOffset(), {
2070
- adjustments: this.scrollAdjustments += l,
1628
+ const i = this.itemSizeCache.get(s.key) ?? s.size, r = n - i;
1629
+ r !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(s, r, this) : s.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", r), this._scrollToOffset(this.getScrollOffset(), {
1630
+ adjustments: this.scrollAdjustments += r,
2071
1631
  behavior: void 0
2072
- })), this.pendingMeasuredCacheIndexes.push(r.index), this.itemSizeCache = new Map(this.itemSizeCache.set(r.key, n)), this.notify(!1));
1632
+ })), this.pendingMeasuredCacheIndexes.push(s.index), this.itemSizeCache = new Map(this.itemSizeCache.set(s.key, n)), this.notify(!1));
2073
1633
  }, this.measureElement = (t) => {
2074
1634
  if (!t) {
2075
- this.elementsCache.forEach((n, r) => {
2076
- n.isConnected || (this.observer.unobserve(n), this.elementsCache.delete(r));
1635
+ this.elementsCache.forEach((n, s) => {
1636
+ n.isConnected || (this.observer.unobserve(n), this.elementsCache.delete(s));
2077
1637
  });
2078
1638
  return;
2079
1639
  }
2080
1640
  this._measureElement(t, void 0);
2081
- }, this.getVirtualItems = ue(
1641
+ }, this.getVirtualItems = X(
2082
1642
  () => [this.getIndexes(), this.getMeasurements()],
2083
1643
  (t, n) => {
2084
- const r = [];
2085
- for (let s = 0, l = t.length; s < l; s++) {
2086
- const c = t[s], a = n[c];
2087
- r.push(a);
1644
+ const s = [];
1645
+ for (let i = 0, r = t.length; i < r; i++) {
1646
+ const l = t[i], c = n[l];
1647
+ s.push(c);
2088
1648
  }
2089
- return r;
1649
+ return s;
2090
1650
  },
2091
1651
  {
2092
1652
  key: process.env.NODE_ENV !== "production" && "getVirtualItems",
@@ -2095,60 +1655,60 @@ class Jn {
2095
1655
  ), this.getVirtualItemForOffset = (t) => {
2096
1656
  const n = this.getMeasurements();
2097
1657
  if (n.length !== 0)
2098
- return Be(
2099
- n[Lt(
1658
+ return be(
1659
+ n[et(
2100
1660
  0,
2101
1661
  n.length - 1,
2102
- (r) => Be(n[r]).start,
1662
+ (s) => be(n[s]).start,
2103
1663
  t
2104
1664
  )]
2105
1665
  );
2106
1666
  }, this.getOffsetForAlignment = (t, n) => {
2107
- const r = this.getSize(), s = this.getScrollOffset();
2108
- n === "auto" && (t <= s ? n = "start" : t >= s + r ? n = "end" : n = "start"), n === "start" ? t = t : n === "end" ? t = t - r : n === "center" && (t = t - r / 2);
2109
- const l = this.options.horizontal ? "scrollWidth" : "scrollHeight", a = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[l] : this.scrollElement[l] : 0) - r;
2110
- return Math.max(Math.min(a, t), 0);
1667
+ const s = this.getSize(), i = this.getScrollOffset();
1668
+ n === "auto" && (t <= i ? n = "start" : t >= i + s ? n = "end" : n = "start"), n === "start" ? t = t : n === "end" ? t = t - s : n === "center" && (t = t - s / 2);
1669
+ const r = this.options.horizontal ? "scrollWidth" : "scrollHeight", c = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[r] : this.scrollElement[r] : 0) - s;
1670
+ return Math.max(Math.min(c, t), 0);
2111
1671
  }, this.getOffsetForIndex = (t, n = "auto") => {
2112
1672
  t = Math.max(0, Math.min(t, this.options.count - 1));
2113
- const r = this.measurementsCache[t];
2114
- if (!r)
1673
+ const s = this.measurementsCache[t];
1674
+ if (!s)
2115
1675
  return;
2116
- const s = this.getSize(), l = this.getScrollOffset();
1676
+ const i = this.getSize(), r = this.getScrollOffset();
2117
1677
  if (n === "auto")
2118
- if (r.end >= l + s - this.options.scrollPaddingEnd)
1678
+ if (s.end >= r + i - this.options.scrollPaddingEnd)
2119
1679
  n = "end";
2120
- else if (r.start <= l + this.options.scrollPaddingStart)
1680
+ else if (s.start <= r + this.options.scrollPaddingStart)
2121
1681
  n = "start";
2122
1682
  else
2123
- return [l, n];
2124
- const c = n === "end" ? r.end + this.options.scrollPaddingEnd : r.start - this.options.scrollPaddingStart;
2125
- return [this.getOffsetForAlignment(c, n), n];
1683
+ return [r, n];
1684
+ const l = n === "end" ? s.end + this.options.scrollPaddingEnd : s.start - this.options.scrollPaddingStart;
1685
+ return [this.getOffsetForAlignment(l, n), n];
2126
1686
  }, this.isDynamicMode = () => this.elementsCache.size > 0, this.cancelScrollToIndex = () => {
2127
1687
  this.scrollToIndexTimeoutId !== null && this.targetWindow && (this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId), this.scrollToIndexTimeoutId = null);
2128
- }, this.scrollToOffset = (t, { align: n = "start", behavior: r } = {}) => {
2129
- this.cancelScrollToIndex(), r === "smooth" && this.isDynamicMode() && console.warn(
1688
+ }, this.scrollToOffset = (t, { align: n = "start", behavior: s } = {}) => {
1689
+ this.cancelScrollToIndex(), s === "smooth" && this.isDynamicMode() && console.warn(
2130
1690
  "The `smooth` scroll behavior is not fully supported with dynamic size."
2131
1691
  ), this._scrollToOffset(this.getOffsetForAlignment(t, n), {
2132
1692
  adjustments: void 0,
2133
- behavior: r
1693
+ behavior: s
2134
1694
  });
2135
- }, this.scrollToIndex = (t, { align: n = "auto", behavior: r } = {}) => {
2136
- t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(), r === "smooth" && this.isDynamicMode() && console.warn(
1695
+ }, this.scrollToIndex = (t, { align: n = "auto", behavior: s } = {}) => {
1696
+ t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(), s === "smooth" && this.isDynamicMode() && console.warn(
2137
1697
  "The `smooth` scroll behavior is not fully supported with dynamic size."
2138
1698
  );
2139
- const s = this.getOffsetForIndex(t, n);
2140
- if (!s) return;
2141
- const [l, c] = s;
2142
- this._scrollToOffset(l, { adjustments: void 0, behavior: r }), r !== "smooth" && this.isDynamicMode() && this.targetWindow && (this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {
1699
+ const i = this.getOffsetForIndex(t, n);
1700
+ if (!i) return;
1701
+ const [r, l] = i;
1702
+ this._scrollToOffset(r, { adjustments: void 0, behavior: s }), s !== "smooth" && this.isDynamicMode() && this.targetWindow && (this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {
2143
1703
  if (this.scrollToIndexTimeoutId = null, this.elementsCache.has(
2144
1704
  this.options.getItemKey(t)
2145
1705
  )) {
2146
- const [u] = Be(
2147
- this.getOffsetForIndex(t, c)
1706
+ const [a] = be(
1707
+ this.getOffsetForIndex(t, l)
2148
1708
  );
2149
- Vn(u, this.getScrollOffset()) || this.scrollToIndex(t, { align: c, behavior: r });
1709
+ Zt(a, this.getScrollOffset()) || this.scrollToIndex(t, { align: l, behavior: s });
2150
1710
  } else
2151
- this.scrollToIndex(t, { align: c, behavior: r });
1711
+ this.scrollToIndex(t, { align: l, behavior: s });
2152
1712
  }));
2153
1713
  }, this.scrollBy = (t, { behavior: n } = {}) => {
2154
1714
  this.cancelScrollToIndex(), n === "smooth" && this.isDynamicMode() && console.warn(
@@ -2160,69 +1720,69 @@ class Jn {
2160
1720
  }, this.getTotalSize = () => {
2161
1721
  var t;
2162
1722
  const n = this.getMeasurements();
2163
- let r;
2164
- return n.length === 0 ? r = this.options.paddingStart : r = this.options.lanes === 1 ? ((t = n[n.length - 1]) == null ? void 0 : t.end) ?? 0 : Math.max(
2165
- ...n.slice(-this.options.lanes).map((s) => s.end)
1723
+ let s;
1724
+ return n.length === 0 ? s = this.options.paddingStart : s = this.options.lanes === 1 ? ((t = n[n.length - 1]) == null ? void 0 : t.end) ?? 0 : Math.max(
1725
+ ...n.slice(-this.options.lanes).map((i) => i.end)
2166
1726
  ), Math.max(
2167
- r - this.options.scrollMargin + this.options.paddingEnd,
1727
+ s - this.options.scrollMargin + this.options.paddingEnd,
2168
1728
  0
2169
1729
  );
2170
1730
  }, this._scrollToOffset = (t, {
2171
1731
  adjustments: n,
2172
- behavior: r
1732
+ behavior: s
2173
1733
  }) => {
2174
- this.options.scrollToFn(t, { behavior: r, adjustments: n }, this);
1734
+ this.options.scrollToFn(t, { behavior: s, adjustments: n }, this);
2175
1735
  }, this.measure = () => {
2176
1736
  this.itemSizeCache = /* @__PURE__ */ new Map(), this.notify(!1);
2177
1737
  }, this.setOptions(o);
2178
1738
  }
2179
1739
  }
2180
- const Lt = (e, o, t, n) => {
1740
+ const et = (e, o, t, n) => {
2181
1741
  for (; e <= o; ) {
2182
- const r = (e + o) / 2 | 0, s = t(r);
2183
- if (s < n)
2184
- e = r + 1;
2185
- else if (s > n)
2186
- o = r - 1;
1742
+ const s = (e + o) / 2 | 0, i = t(s);
1743
+ if (i < n)
1744
+ e = s + 1;
1745
+ else if (i > n)
1746
+ o = s - 1;
2187
1747
  else
2188
- return r;
1748
+ return s;
2189
1749
  }
2190
1750
  return e > 0 ? e - 1 : 0;
2191
1751
  };
2192
- function Gn({
1752
+ function ln({
2193
1753
  measurements: e,
2194
1754
  outerSize: o,
2195
1755
  scrollOffset: t
2196
1756
  }) {
2197
- const n = e.length - 1, s = Lt(0, n, (c) => e[c].start, t);
2198
- let l = s;
2199
- for (; l < n && e[l].end < t + o; )
2200
- l++;
2201
- return { startIndex: s, endIndex: l };
2202
- }
2203
- const wt = typeof document < "u" ? M.useLayoutEffect : M.useEffect;
2204
- function Kn(e) {
2205
- const o = M.useReducer(() => ({}), {})[1], t = {
1757
+ const n = e.length - 1, i = et(0, n, (l) => e[l].start, t);
1758
+ let r = i;
1759
+ for (; r < n && e[r].end < t + o; )
1760
+ r++;
1761
+ return { startIndex: i, endIndex: r };
1762
+ }
1763
+ const De = typeof document < "u" ? C.useLayoutEffect : C.useEffect;
1764
+ function cn(e) {
1765
+ const o = C.useReducer(() => ({}), {})[1], t = {
2206
1766
  ...e,
2207
- onChange: (r, s) => {
2208
- var l;
2209
- s ? Ht(o) : o(), (l = e.onChange) == null || l.call(e, r, s);
1767
+ onChange: (s, i) => {
1768
+ var r;
1769
+ i ? it(o) : o(), (r = e.onChange) == null || r.call(e, s, i);
2210
1770
  }
2211
- }, [n] = M.useState(
2212
- () => new Jn(t)
1771
+ }, [n] = C.useState(
1772
+ () => new rn(t)
2213
1773
  );
2214
- return n.setOptions(t), wt(() => n._didMount(), []), wt(() => n._willUpdate()), n;
1774
+ return n.setOptions(t), De(() => n._didMount(), []), De(() => n._willUpdate()), n;
2215
1775
  }
2216
- function Zn(e) {
2217
- return Kn({
2218
- observeElementRect: Yn,
2219
- observeElementOffset: Un,
2220
- scrollToFn: Xn,
1776
+ function an(e) {
1777
+ return cn({
1778
+ observeElementRect: en,
1779
+ observeElementOffset: nn,
1780
+ scrollToFn: sn,
2221
1781
  ...e
2222
1782
  });
2223
1783
  }
2224
- function Qn(e) {
2225
- return /* @__PURE__ */ E.jsx(
1784
+ function un(e) {
1785
+ return /* @__PURE__ */ b(
2226
1786
  "svg",
2227
1787
  {
2228
1788
  xmlns: "http://www.w3.org/2000/svg",
@@ -2232,12 +1792,12 @@ function Qn(e) {
2232
1792
  stroke: "currentColor",
2233
1793
  className: "h-6 w-6",
2234
1794
  ...e,
2235
- children: /* @__PURE__ */ E.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m19.5 8.25-7.5 7.5-7.5-7.5" })
1795
+ children: /* @__PURE__ */ b("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m19.5 8.25-7.5 7.5-7.5-7.5" })
2236
1796
  }
2237
1797
  );
2238
1798
  }
2239
- function eo(e) {
2240
- return /* @__PURE__ */ E.jsx(
1799
+ function fn(e) {
1800
+ return /* @__PURE__ */ b(
2241
1801
  "svg",
2242
1802
  {
2243
1803
  xmlns: "http://www.w3.org/2000/svg",
@@ -2247,7 +1807,7 @@ function eo(e) {
2247
1807
  stroke: "currentColor",
2248
1808
  className: "h-6 w-6",
2249
1809
  ...e,
2250
- children: /* @__PURE__ */ E.jsx(
1810
+ children: /* @__PURE__ */ b(
2251
1811
  "path",
2252
1812
  {
2253
1813
  strokeLinecap: "round",
@@ -2258,8 +1818,8 @@ function eo(e) {
2258
1818
  }
2259
1819
  );
2260
1820
  }
2261
- function to(e) {
2262
- return /* @__PURE__ */ E.jsx(
1821
+ function dn(e) {
1822
+ return /* @__PURE__ */ b(
2263
1823
  "svg",
2264
1824
  {
2265
1825
  xmlns: "http://www.w3.org/2000/svg",
@@ -2269,102 +1829,102 @@ function to(e) {
2269
1829
  stroke: "currentColor",
2270
1830
  className: "h-6 w-6",
2271
1831
  ...e,
2272
- children: /* @__PURE__ */ E.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18 18 6M6 6l12 12" })
1832
+ children: /* @__PURE__ */ b("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18 18 6M6 6l12 12" })
2273
1833
  }
2274
1834
  );
2275
1835
  }
2276
- function so(e) {
1836
+ function xn(e) {
2277
1837
  const {
2278
1838
  items: o,
2279
1839
  selected: t,
2280
1840
  className: n,
2281
- onChange: r,
2282
- disabled: s,
2283
- placeholder: l = "Select an Item",
2284
- multiple: c,
2285
- width: a = "215px",
2286
- height: u = "40px",
2287
- mutable: f,
2288
- onAdd: d
2289
- } = e, p = yt(null), [m, h] = je(!1);
2290
- return /* @__PURE__ */ E.jsx(
2291
- Pt,
1841
+ onChange: s,
1842
+ disabled: i,
1843
+ placeholder: r = "Select an Item",
1844
+ multiple: l,
1845
+ width: c = "215px",
1846
+ height: a = "40px",
1847
+ mutable: u,
1848
+ onAdd: f
1849
+ } = e, g = Fe(null), [h, d] = de(!1);
1850
+ return /* @__PURE__ */ b(
1851
+ Qe,
2292
1852
  {
2293
1853
  placement: "bottom",
2294
1854
  trigger: "click",
2295
- show: m,
2296
- setShow: h,
1855
+ show: h,
1856
+ setShow: d,
2297
1857
  role: "combobox",
2298
- disabled: s,
2299
- content: /* @__PURE__ */ E.jsx(
2300
- no,
1858
+ disabled: i,
1859
+ content: /* @__PURE__ */ b(
1860
+ hn,
2301
1861
  {
2302
- ...f ? { mutable: f, onAdd: d } : { mutable: f },
2303
- ...c ? { multiple: c, items: o, onChange: r, selected: t } : { items: o, onChange: r, selected: t },
2304
- width: a
1862
+ ...u ? { mutable: u, onAdd: f } : { mutable: u },
1863
+ ...l ? { multiple: l, items: o, onChange: s, selected: t } : { items: o, onChange: s, selected: t },
1864
+ width: c
2305
1865
  }
2306
1866
  ),
2307
- children: /* @__PURE__ */ E.jsxs(
1867
+ children: /* @__PURE__ */ W(
2308
1868
  "div",
2309
1869
  {
2310
- style: { width: a, height: u },
2311
- className: L(
1870
+ style: { width: c, height: a },
1871
+ className: R(
2312
1872
  "inline-flex grow items-center justify-between rounded border-2 border-input bg-background p-2 transition",
2313
- s ? "cursor-not-allowed bg-muted text-muted" : "cursor-pointer",
2314
- m && "border-primary shadow-sm shadow-ring",
1873
+ i ? "cursor-not-allowed bg-muted text-muted" : "cursor-pointer",
1874
+ h && "border-primary shadow-sm shadow-ring",
2315
1875
  n
2316
1876
  ),
2317
1877
  children: [
2318
- /* @__PURE__ */ E.jsx(
1878
+ /* @__PURE__ */ b(
2319
1879
  "div",
2320
1880
  {
2321
- className: L(
1881
+ className: R(
2322
1882
  "flex max-w-[calc(100%-30px)] flex-none grow items-center gap-1 text-sm",
2323
- s ? "text-muted-foreground" : "text-foreground"
1883
+ i ? "text-muted-foreground" : "text-foreground"
2324
1884
  ),
2325
- ref: p,
2326
- children: c ? /* @__PURE__ */ E.jsx(
2327
- Wn,
1885
+ ref: g,
1886
+ children: l ? /* @__PURE__ */ b(
1887
+ Xt,
2328
1888
  {
2329
- items: t.map((b) => b.text),
1889
+ items: t.map((p) => p.text),
2330
1890
  data: t,
2331
- parentRef: p,
1891
+ parentRef: g,
2332
1892
  badgeVariant: "secondary",
2333
1893
  badgeStyles: "!bg-input h-6 min-w-min gap-2 !bg-input",
2334
- children: (b, y, g) => /* @__PURE__ */ E.jsxs(
2335
- Ct,
1894
+ children: (p, w, m) => /* @__PURE__ */ W(
1895
+ We,
2336
1896
  {
2337
1897
  className: "flex h-6 min-w-min gap-2 !bg-input pr-1",
2338
1898
  variant: "secondary",
2339
1899
  children: [
2340
- b,
2341
- /* @__PURE__ */ E.jsx(
2342
- Gt,
1900
+ p,
1901
+ /* @__PURE__ */ b(
1902
+ lt,
2343
1903
  {
2344
1904
  onClick: () => {
2345
- r(t.filter((w) => w.key !== (g == null ? void 0 : g.key)));
1905
+ s(t.filter((x) => x.key !== (m == null ? void 0 : m.key)));
2346
1906
  },
2347
1907
  variant: "icon",
2348
1908
  size: "icon",
2349
1909
  className: "group bg-muted p-0.5 hover:bg-muted-foreground",
2350
- children: /* @__PURE__ */ E.jsx(to, { className: "size-3 transition duration-300 group-hover:rotate-90 group-hover:text-muted" })
1910
+ children: /* @__PURE__ */ b(dn, { className: "size-3 transition duration-300 group-hover:rotate-90 group-hover:text-muted" })
2351
1911
  }
2352
1912
  )
2353
1913
  ]
2354
1914
  },
2355
- `collapsed_item_${y}`
1915
+ `collapsed_item_${w}`
2356
1916
  )
2357
1917
  }
2358
- ) : t.text ?? l
1918
+ ) : t.text ?? r
2359
1919
  }
2360
1920
  ),
2361
- /* @__PURE__ */ E.jsx(
2362
- Qn,
1921
+ /* @__PURE__ */ b(
1922
+ un,
2363
1923
  {
2364
- className: L(
1924
+ className: R(
2365
1925
  "size-4 rounded-full bg-input p-0.5 transition duration-300 ease-in-out",
2366
- m ? "rotate-180" : "rotate-0",
2367
- s ? "text-muted-foreground" : "text-foreground"
1926
+ h ? "rotate-180" : "rotate-0",
1927
+ i ? "text-muted-foreground" : "text-foreground"
2368
1928
  )
2369
1929
  }
2370
1930
  )
@@ -2374,86 +1934,86 @@ function so(e) {
2374
1934
  }
2375
1935
  );
2376
1936
  }
2377
- function no(e) {
2378
- const { items: o, multiple: t, selected: n, onChange: r, width: s, mutable: l, onAdd: c } = e, [a, u] = je(""), f = yt(null), d = Ye(
2379
- () => o.reduce((h, b) => ((!a.length || b.text.toLowerCase().includes(a.toLowerCase())) && h.push(b), h), []),
2380
- [o, a]
2381
- ), p = Zn({
2382
- count: d.length,
2383
- getScrollElement: () => f.current,
1937
+ function hn(e) {
1938
+ const { items: o, multiple: t, selected: n, onChange: s, width: i, mutable: r, onAdd: l } = e, [c, a] = de(""), u = Fe(null), f = ve(
1939
+ () => o.reduce((d, p) => ((!c.length || p.text.toLowerCase().includes(c.toLowerCase())) && d.push(p), d), []),
1940
+ [o, c]
1941
+ ), g = an({
1942
+ count: f.length,
1943
+ getScrollElement: () => u.current,
2384
1944
  estimateSize: () => 35
2385
- }), m = n instanceof Array ? n.map((h) => h.key) : [n.key];
2386
- return /* @__PURE__ */ E.jsxs(
1945
+ }), h = n instanceof Array ? n.map((d) => d.key) : [n.key];
1946
+ return /* @__PURE__ */ W(
2387
1947
  "div",
2388
1948
  {
2389
1949
  className: "flex flex-col divide-y-2 divide-border overflow-hidden rounded border border-input bg-background",
2390
- style: { width: s },
1950
+ style: { width: i },
2391
1951
  children: [
2392
- /* @__PURE__ */ E.jsxs("div", { className: L("inline-flex grow items-center rounded px-3 py-2"), children: [
2393
- /* @__PURE__ */ E.jsx(eo, { className: "left-3 top-3 mr-2 size-4 text-muted-foreground" }),
2394
- /* @__PURE__ */ E.jsx(
1952
+ /* @__PURE__ */ W("div", { className: R("inline-flex grow items-center rounded px-3 py-2"), children: [
1953
+ /* @__PURE__ */ b(fn, { className: "left-3 top-3 mr-2 size-4 text-muted-foreground" }),
1954
+ /* @__PURE__ */ b(
2395
1955
  "input",
2396
1956
  {
2397
1957
  className: "inline-flex grow bg-transparent text-sm text-foreground outline-none",
2398
1958
  placeholder: "Search",
2399
- value: a,
2400
- onChange: (h) => u(h.target.value)
1959
+ value: c,
1960
+ onChange: (d) => a(d.target.value)
2401
1961
  }
2402
1962
  )
2403
1963
  ] }),
2404
- /* @__PURE__ */ E.jsxs(
1964
+ /* @__PURE__ */ W(
2405
1965
  "ul",
2406
1966
  {
2407
- className: L("max-h-60 grow overflow-auto shadow", "focus:outline-none focus:ring-0"),
2408
- ref: f,
1967
+ className: R("max-h-60 grow overflow-auto shadow", "focus:outline-none focus:ring-0"),
1968
+ ref: u,
2409
1969
  children: [
2410
- /* @__PURE__ */ E.jsx(
1970
+ /* @__PURE__ */ b(
2411
1971
  "div",
2412
1972
  {
2413
1973
  style: {
2414
- height: `${p.getTotalSize()}px`,
1974
+ height: `${g.getTotalSize()}px`,
2415
1975
  width: "100%",
2416
1976
  position: "relative"
2417
1977
  },
2418
- children: p.getVirtualItems().map((h) => /* @__PURE__ */ E.jsx(
1978
+ children: g.getVirtualItems().map((d) => /* @__PURE__ */ b(
2419
1979
  "li",
2420
1980
  {
2421
1981
  style: {
2422
- height: `${h.size}px`,
2423
- transform: `translateY(${h.start}px)`
1982
+ height: `${d.size}px`,
1983
+ transform: `translateY(${d.start}px)`
2424
1984
  },
2425
- className: L(
1985
+ className: R(
2426
1986
  "absolute left-0 top-0 w-full cursor-pointer px-3 py-2 text-sm text-foreground",
2427
- m.includes(d[h.index].key) ? "bg-primary/90 text-primary-foreground" : "transition hover:bg-primary/60"
1987
+ h.includes(f[d.index].key) ? "bg-primary/90 text-primary-foreground" : "transition hover:bg-primary/60"
2428
1988
  ),
2429
1989
  onClick: () => {
2430
- t ? m.includes(d[h.index].key) ? r(
1990
+ t ? h.includes(f[d.index].key) ? s(
2431
1991
  structuredClone(
2432
1992
  n.filter(
2433
- (b) => b.key !== d[h.index].key
1993
+ (p) => p.key !== f[d.index].key
2434
1994
  )
2435
1995
  )
2436
- ) : r(structuredClone([...n, d[h.index]])) : r(d[h.index]);
1996
+ ) : s(structuredClone([...n, f[d.index]])) : s(f[d.index]);
2437
1997
  },
2438
- children: d[h.index].text
1998
+ children: f[d.index].text
2439
1999
  },
2440
- h.key
2000
+ d.key
2441
2001
  ))
2442
2002
  }
2443
2003
  ),
2444
- a.length > 0 && d.length === 0 && (l ? /* @__PURE__ */ E.jsxs(
2004
+ c.length > 0 && f.length === 0 && (r ? /* @__PURE__ */ W(
2445
2005
  "li",
2446
2006
  {
2447
- className: L("px-3 py-2 text-sm text-foreground"),
2007
+ className: R("px-3 py-2 text-sm text-foreground"),
2448
2008
  onClick: () => {
2449
- c({ text: a, key: a }), u("");
2009
+ l({ text: c, key: c }), a("");
2450
2010
  },
2451
2011
  children: [
2452
2012
  "Add ",
2453
- a
2013
+ c
2454
2014
  ]
2455
2015
  }
2456
- ) : /* @__PURE__ */ E.jsx("li", { className: L("cursor-not-allowed px-3 py-2 text-sm text-foreground"), children: "No results found" }))
2016
+ ) : /* @__PURE__ */ b("li", { className: R("cursor-not-allowed px-3 py-2 text-sm text-foreground"), children: "No results found" }))
2457
2017
  ]
2458
2018
  }
2459
2019
  )
@@ -2461,8 +2021,8 @@ function no(e) {
2461
2021
  }
2462
2022
  );
2463
2023
  }
2464
- function io(e) {
2465
- return /* @__PURE__ */ E.jsx(
2024
+ function wn(e) {
2025
+ return /* @__PURE__ */ b(
2466
2026
  "svg",
2467
2027
  {
2468
2028
  xmlns: "http://www.w3.org/2000/svg",
@@ -2472,16 +2032,16 @@ function io(e) {
2472
2032
  stroke: "currentColor",
2473
2033
  className: "h-6 w-6",
2474
2034
  ...e,
2475
- children: /* @__PURE__ */ E.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m4.5 15.75 7.5-7.5 7.5 7.5" })
2035
+ children: /* @__PURE__ */ b("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m4.5 15.75 7.5-7.5 7.5 7.5" })
2476
2036
  }
2477
2037
  );
2478
2038
  }
2479
- function lo(e) {
2039
+ function yn(e) {
2480
2040
  const { className: o, ...t } = e;
2481
- return /* @__PURE__ */ E.jsx(
2041
+ return /* @__PURE__ */ b(
2482
2042
  "input",
2483
2043
  {
2484
- className: L(
2044
+ className: R(
2485
2045
  "h-10 w-full rounded border-2 border-input bg-background px-3 py-2 text-sm text-foreground transition",
2486
2046
  "focus-visible:border-primary focus-visible:shadow-sm focus-visible:shadow-ring focus-visible:outline-none",
2487
2047
  "read-only:cursor-pointer read-only:!border-none read-only:bg-transparent read-only:text-foreground read-only:!shadow-none read-only:!outline-none",
@@ -2493,12 +2053,12 @@ function lo(e) {
2493
2053
  }
2494
2054
  );
2495
2055
  }
2496
- function co(e) {
2497
- const { className: o, checked: t, onChange: n, defaultChecked: r, ...s } = e;
2498
- return /* @__PURE__ */ E.jsxs(
2056
+ function bn(e) {
2057
+ const { className: o, checked: t, onChange: n, defaultChecked: s, ...i } = e;
2058
+ return /* @__PURE__ */ W(
2499
2059
  "div",
2500
2060
  {
2501
- className: L(
2061
+ className: R(
2502
2062
  "rounded-full",
2503
2063
  "h-5 w-10",
2504
2064
  "border border-muted bg-secondary",
@@ -2507,11 +2067,11 @@ function co(e) {
2507
2067
  ),
2508
2068
  onClick: () => n == null ? void 0 : n(!t),
2509
2069
  children: [
2510
- /* @__PURE__ */ E.jsx("input", { type: "hidden", readOnly: !0, ...s, defaultChecked: r, checked: t }),
2511
- /* @__PURE__ */ E.jsx(
2070
+ /* @__PURE__ */ b("input", { type: "hidden", readOnly: !0, ...i, defaultChecked: s, checked: t }),
2071
+ /* @__PURE__ */ b(
2512
2072
  "div",
2513
2073
  {
2514
- className: L(
2074
+ className: R(
2515
2075
  "[animation-timing-function:cubic-bezier(1, 0, 0, 1)] duration-250 h-4 w-4 rounded-full bg-primary transition-all",
2516
2076
  t ? "translate-x-5" : "translate-x-1"
2517
2077
  )
@@ -2522,16 +2082,16 @@ function co(e) {
2522
2082
  );
2523
2083
  }
2524
2084
  export {
2525
- Ct as Badge,
2526
- Gt as Button,
2527
- io as ChevronDown,
2528
- Qn as ChevronUp,
2529
- Wn as Collapse,
2530
- so as Dropdown,
2531
- lo as Input,
2532
- Pt as Popover,
2533
- eo as Search,
2534
- co as Toggle,
2535
- Et as cva,
2536
- L as cx
2085
+ We as Badge,
2086
+ lt as Button,
2087
+ wn as ChevronDown,
2088
+ un as ChevronUp,
2089
+ Xt as Collapse,
2090
+ xn as Dropdown,
2091
+ yn as Input,
2092
+ Qe as Popover,
2093
+ fn as Search,
2094
+ bn as Toggle,
2095
+ Ve as cva,
2096
+ R as cx
2537
2097
  };