gitxp 0.0.1

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 (48) hide show
  1. package/.output/nitro.json +17 -0
  2. package/.output/public/assets/index-BGHvBNtP.js +11 -0
  3. package/.output/public/assets/routes-DuE8S6pX.js +60 -0
  4. package/.output/public/assets/styles-D5xbQNYu.css +1 -0
  5. package/.output/server/_chunks/ssr-renderer.mjs +26 -0
  6. package/.output/server/_libs/@floating-ui/core+[...].mjs +671 -0
  7. package/.output/server/_libs/@floating-ui/dom+[...].mjs +649 -0
  8. package/.output/server/_libs/@floating-ui/react-dom+[...].mjs +856 -0
  9. package/.output/server/_libs/@radix-ui/react-arrow+[...].mjs +258 -0
  10. package/.output/server/_libs/@radix-ui/react-dialog+[...].mjs +1862 -0
  11. package/.output/server/_libs/@radix-ui/react-popper+[...].mjs +320 -0
  12. package/.output/server/_libs/@radix-ui/react-tooltip+[...].mjs +534 -0
  13. package/.output/server/_libs/@tanstack/db+[...].mjs +14680 -0
  14. package/.output/server/_libs/@tanstack/react-router+[...].mjs +14563 -0
  15. package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +126 -0
  16. package/.output/server/_libs/@tanstack/router-core+[...].mjs +3636 -0
  17. package/.output/server/_libs/class-variance-authority+clsx.mjs +69 -0
  18. package/.output/server/_libs/cmdk.mjs +504 -0
  19. package/.output/server/_libs/h3+rou3+srvx.mjs +1361 -0
  20. package/.output/server/_libs/h3-v2.mjs +285 -0
  21. package/.output/server/_libs/lucide-react.mjs +158 -0
  22. package/.output/server/_libs/radix-ui__primitive.mjs +44 -0
  23. package/.output/server/_libs/radix-ui__react-context.mjs +108 -0
  24. package/.output/server/_libs/tailwind-merge.mjs +3380 -0
  25. package/.output/server/_libs/tanstack__history.mjs +384 -0
  26. package/.output/server/_libs/tanstack__query-core.mjs +2225 -0
  27. package/.output/server/_libs/tanstack__react-db.mjs +242 -0
  28. package/.output/server/_libs/tanstack__react-query.mjs +140 -0
  29. package/.output/server/_libs/ufo.mjs +64 -0
  30. package/.output/server/_runtime.mjs +35 -0
  31. package/.output/server/_ssr/empty-plugin-adapters-D9UWiqvJ.mjs +5 -0
  32. package/.output/server/_ssr/events-BNrmOvgU.mjs +13 -0
  33. package/.output/server/_ssr/notifications-DUoENv6E.mjs +514 -0
  34. package/.output/server/_ssr/router-DsUHD4bT.mjs +179 -0
  35. package/.output/server/_ssr/routes-DIFfr242.mjs +982 -0
  36. package/.output/server/_ssr/ssr.mjs +1854 -0
  37. package/.output/server/_ssr/start-5Z2QO8AU.mjs +4 -0
  38. package/.output/server/_tanstack-start-manifest_v-CrD0YpZr.mjs +20 -0
  39. package/.output/server/index.mjs +310 -0
  40. package/.output/server/node_modules/tslib/modules/index.js +70 -0
  41. package/.output/server/node_modules/tslib/modules/package.json +3 -0
  42. package/.output/server/node_modules/tslib/package.json +47 -0
  43. package/.output/server/node_modules/tslib/tslib.js +484 -0
  44. package/.output/server/package.json +9 -0
  45. package/LICENSE +21 -0
  46. package/README.md +325 -0
  47. package/bin/gitxp.js +85 -0
  48. package/package.json +92 -0
@@ -0,0 +1,69 @@
1
+ //#region node_modules/clsx/dist/clsx.mjs
2
+ function r(e) {
3
+ var t, f, n = "";
4
+ if ("string" == typeof e || "number" == typeof e) n += e;
5
+ else if ("object" == typeof e) if (Array.isArray(e)) {
6
+ var o = e.length;
7
+ for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
8
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
9
+ return n;
10
+ }
11
+ function clsx() {
12
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
13
+ return n;
14
+ }
15
+ //#endregion
16
+ //#region node_modules/class-variance-authority/dist/index.mjs
17
+ /**
18
+ * Copyright 2022 Joe Bell. All rights reserved.
19
+ *
20
+ * This file is licensed to you under the Apache License, Version 2.0
21
+ * (the "License"); you may not use this file except in compliance with the
22
+ * License. You may obtain a copy of the License at
23
+ *
24
+ * http://www.apache.org/licenses/LICENSE-2.0
25
+ *
26
+ * Unless required by applicable law or agreed to in writing, software
27
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
28
+ * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the
29
+ * License for the specific language governing permissions and limitations under
30
+ * the License.
31
+ */ var falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
32
+ var cx = clsx;
33
+ var cva = (base, config) => (props) => {
34
+ var _config_compoundVariants;
35
+ if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
36
+ const { variants, defaultVariants } = config;
37
+ const getVariantClassNames = Object.keys(variants).map((variant) => {
38
+ const variantProp = props === null || props === void 0 ? void 0 : props[variant];
39
+ const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
40
+ if (variantProp === null) return null;
41
+ const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
42
+ return variants[variant][variantKey];
43
+ });
44
+ const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param) => {
45
+ let [key, value] = param;
46
+ if (value === void 0) return acc;
47
+ acc[key] = value;
48
+ return acc;
49
+ }, {});
50
+ return cx(base, getVariantClassNames, config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param) => {
51
+ let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
52
+ return Object.entries(compoundVariantOptions).every((param) => {
53
+ let [key, value] = param;
54
+ return Array.isArray(value) ? value.includes({
55
+ ...defaultVariants,
56
+ ...propsWithoutUndefined
57
+ }[key]) : {
58
+ ...defaultVariants,
59
+ ...propsWithoutUndefined
60
+ }[key] === value;
61
+ }) ? [
62
+ ...acc,
63
+ cvClass,
64
+ cvClassName
65
+ ] : acc;
66
+ }, []), props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
67
+ };
68
+ //#endregion
69
+ export { clsx as n, cva as t };
@@ -0,0 +1,504 @@
1
+ import { i as __toESM } from "../_runtime.mjs";
2
+ import { u as require_react } from "./@floating-ui/react-dom+[...].mjs";
3
+ import { n as Primitive, s as composeRefs } from "./@radix-ui/react-arrow+[...].mjs";
4
+ import { a as DialogOverlay, d as useId, o as DialogPortal, r as DialogContent, t as Dialog } from "./@radix-ui/react-dialog+[...].mjs";
5
+ //#region node_modules/cmdk/dist/chunk-NZJY6EH4.mjs
6
+ var U = 1;
7
+ var Y$1 = .9;
8
+ var H = .8;
9
+ var J = .17;
10
+ var p = .1;
11
+ var u = .999;
12
+ var $ = .9999;
13
+ var k$1 = .99;
14
+ var m = /[\\\/_+.#"@\[\(\{&]/;
15
+ var B$1 = /[\\\/_+.#"@\[\(\{&]/g;
16
+ var K$1 = /[\s-]/;
17
+ var X = /[\s-]/g;
18
+ function G(_, C, h, P, A, f, O) {
19
+ if (f === C.length) return A === _.length ? U : k$1;
20
+ var T = `${A},${f}`;
21
+ if (O[T] !== void 0) return O[T];
22
+ for (var L = P.charAt(f), c = h.indexOf(L, A), S = 0, E, N, R, M; c >= 0;) E = G(_, C, h, P, c + 1, f + 1, O), E > S && (c === A ? E *= U : m.test(_.charAt(c - 1)) ? (E *= H, R = _.slice(A, c - 1).match(B$1), R && A > 0 && (E *= Math.pow(u, R.length))) : K$1.test(_.charAt(c - 1)) ? (E *= Y$1, M = _.slice(A, c - 1).match(X), M && A > 0 && (E *= Math.pow(u, M.length))) : (E *= J, A > 0 && (E *= Math.pow(u, c - A))), _.charAt(c) !== C.charAt(f) && (E *= $)), (E < p && h.charAt(c - 1) === P.charAt(f + 1) || P.charAt(f + 1) === P.charAt(f) && h.charAt(c - 1) !== P.charAt(f)) && (N = G(_, C, h, P, c + 1, f + 2, O), N * p > E && (E = N * p)), E > S && (S = E), c = h.indexOf(L, c + 1);
23
+ return O[T] = S, S;
24
+ }
25
+ function D(_) {
26
+ return _.toLowerCase().replace(X, " ");
27
+ }
28
+ function W(_, C, h) {
29
+ return _ = h && h.length > 0 ? `${_ + " " + h.join(" ")}` : _, G(_, C, D(_), D(C), 0, 0, {});
30
+ }
31
+ //#endregion
32
+ //#region node_modules/cmdk/dist/index.mjs
33
+ var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
34
+ var N = "[cmdk-group=\"\"]";
35
+ var Y = "[cmdk-group-items=\"\"]";
36
+ var be = "[cmdk-group-heading=\"\"]";
37
+ var le = "[cmdk-item=\"\"]";
38
+ var ce = `${le}:not([aria-disabled="true"])`;
39
+ var Z = "cmdk-item-select";
40
+ var T = "data-value";
41
+ var Re = (r, o, n) => W(r, o, n);
42
+ var ue = import_react.createContext(void 0);
43
+ var K = () => import_react.useContext(ue);
44
+ var de = import_react.createContext(void 0);
45
+ var ee = () => import_react.useContext(de);
46
+ var fe = import_react.createContext(void 0);
47
+ var me = import_react.forwardRef((r, o) => {
48
+ let n = L(() => {
49
+ var e, a;
50
+ return {
51
+ search: "",
52
+ value: (a = (e = r.value) != null ? e : r.defaultValue) != null ? a : "",
53
+ selectedItemId: void 0,
54
+ filtered: {
55
+ count: 0,
56
+ items: /* @__PURE__ */ new Map(),
57
+ groups: /* @__PURE__ */ new Set()
58
+ }
59
+ };
60
+ }), u = L(() => /* @__PURE__ */ new Set()), c = L(() => /* @__PURE__ */ new Map()), d = L(() => /* @__PURE__ */ new Map()), f = L(() => /* @__PURE__ */ new Set()), p = pe(r), { label: b, children: m, value: R, onValueChange: x, filter: C, shouldFilter: S, loop: A, disablePointerSelection: ge = !1, vimBindings: j = !0, ...O } = r, $ = useId(), q = useId(), _ = useId(), I = import_react.useRef(null), v = ke();
61
+ k(() => {
62
+ if (R !== void 0) {
63
+ let e = R.trim();
64
+ n.current.value = e, E.emit();
65
+ }
66
+ }, [R]), k(() => {
67
+ v(6, ne);
68
+ }, []);
69
+ let E = import_react.useMemo(() => ({
70
+ subscribe: (e) => (f.current.add(e), () => f.current.delete(e)),
71
+ snapshot: () => n.current,
72
+ setState: (e, a, s) => {
73
+ var i, l, g, y;
74
+ if (!Object.is(n.current[e], a)) {
75
+ if (n.current[e] = a, e === "search") J(), z(), v(1, W);
76
+ else if (e === "value") {
77
+ if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
78
+ let h = document.getElementById(_);
79
+ h ? h.focus() : (i = document.getElementById($)) == null || i.focus();
80
+ }
81
+ if (v(7, () => {
82
+ var h;
83
+ n.current.selectedItemId = (h = M()) == null ? void 0 : h.id, E.emit();
84
+ }), s || v(5, ne), ((l = p.current) == null ? void 0 : l.value) !== void 0) {
85
+ let h = a != null ? a : "";
86
+ (y = (g = p.current).onValueChange) == null || y.call(g, h);
87
+ return;
88
+ }
89
+ }
90
+ E.emit();
91
+ }
92
+ },
93
+ emit: () => {
94
+ f.current.forEach((e) => e());
95
+ }
96
+ }), []), U = import_react.useMemo(() => ({
97
+ value: (e, a, s) => {
98
+ var i;
99
+ a !== ((i = d.current.get(e)) == null ? void 0 : i.value) && (d.current.set(e, {
100
+ value: a,
101
+ keywords: s
102
+ }), n.current.filtered.items.set(e, te(a, s)), v(2, () => {
103
+ z(), E.emit();
104
+ }));
105
+ },
106
+ item: (e, a) => (u.current.add(e), a && (c.current.has(a) ? c.current.get(a).add(e) : c.current.set(a, /* @__PURE__ */ new Set([e]))), v(3, () => {
107
+ J(), z(), n.current.value || W(), E.emit();
108
+ }), () => {
109
+ d.current.delete(e), u.current.delete(e), n.current.filtered.items.delete(e);
110
+ let s = M();
111
+ v(4, () => {
112
+ J(), (s == null ? void 0 : s.getAttribute("id")) === e && W(), E.emit();
113
+ });
114
+ }),
115
+ group: (e) => (c.current.has(e) || c.current.set(e, /* @__PURE__ */ new Set()), () => {
116
+ d.current.delete(e), c.current.delete(e);
117
+ }),
118
+ filter: () => p.current.shouldFilter,
119
+ label: b || r["aria-label"],
120
+ getDisablePointerSelection: () => p.current.disablePointerSelection,
121
+ listId: $,
122
+ inputId: _,
123
+ labelId: q,
124
+ listInnerRef: I
125
+ }), []);
126
+ function te(e, a) {
127
+ var i, l;
128
+ let s = (l = (i = p.current) == null ? void 0 : i.filter) != null ? l : Re;
129
+ return e ? s(e, n.current.search, a) : 0;
130
+ }
131
+ function z() {
132
+ if (!n.current.search || p.current.shouldFilter === !1) return;
133
+ let e = n.current.filtered.items, a = [];
134
+ n.current.filtered.groups.forEach((i) => {
135
+ let l = c.current.get(i), g = 0;
136
+ l.forEach((y) => {
137
+ let h = e.get(y);
138
+ g = Math.max(h, g);
139
+ }), a.push([i, g]);
140
+ });
141
+ let s = I.current;
142
+ V().sort((i, l) => {
143
+ var h, F;
144
+ let g = i.getAttribute("id"), y = l.getAttribute("id");
145
+ return ((h = e.get(y)) != null ? h : 0) - ((F = e.get(g)) != null ? F : 0);
146
+ }).forEach((i) => {
147
+ let l = i.closest(Y);
148
+ l ? l.appendChild(i.parentElement === l ? i : i.closest(`${Y} > *`)) : s.appendChild(i.parentElement === s ? i : i.closest(`${Y} > *`));
149
+ }), a.sort((i, l) => l[1] - i[1]).forEach((i) => {
150
+ var g;
151
+ let l = (g = I.current) == null ? void 0 : g.querySelector(`${N}[${T}="${encodeURIComponent(i[0])}"]`);
152
+ l?.parentElement.appendChild(l);
153
+ });
154
+ }
155
+ function W() {
156
+ let e = V().find((s) => s.getAttribute("aria-disabled") !== "true"), a = e == null ? void 0 : e.getAttribute(T);
157
+ E.setState("value", a || void 0);
158
+ }
159
+ function J() {
160
+ var a, s, i, l;
161
+ if (!n.current.search || p.current.shouldFilter === !1) {
162
+ n.current.filtered.count = u.current.size;
163
+ return;
164
+ }
165
+ n.current.filtered.groups = /* @__PURE__ */ new Set();
166
+ let e = 0;
167
+ for (let g of u.current) {
168
+ let F = te((s = (a = d.current.get(g)) == null ? void 0 : a.value) != null ? s : "", (l = (i = d.current.get(g)) == null ? void 0 : i.keywords) != null ? l : []);
169
+ n.current.filtered.items.set(g, F), F > 0 && e++;
170
+ }
171
+ for (let [g, y] of c.current) for (let h of y) if (n.current.filtered.items.get(h) > 0) {
172
+ n.current.filtered.groups.add(g);
173
+ break;
174
+ }
175
+ n.current.filtered.count = e;
176
+ }
177
+ function ne() {
178
+ var a, s, i;
179
+ let e = M();
180
+ e && (((a = e.parentElement) == null ? void 0 : a.firstChild) === e && ((i = (s = e.closest(N)) == null ? void 0 : s.querySelector(be)) == null || i.scrollIntoView({ block: "nearest" })), e.scrollIntoView({ block: "nearest" }));
181
+ }
182
+ function M() {
183
+ var e;
184
+ return (e = I.current) == null ? void 0 : e.querySelector(`${le}[aria-selected="true"]`);
185
+ }
186
+ function V() {
187
+ var e;
188
+ return Array.from(((e = I.current) == null ? void 0 : e.querySelectorAll(ce)) || []);
189
+ }
190
+ function X(e) {
191
+ let s = V()[e];
192
+ s && E.setState("value", s.getAttribute(T));
193
+ }
194
+ function Q(e) {
195
+ var g;
196
+ let a = M(), s = V(), i = s.findIndex((y) => y === a), l = s[i + e];
197
+ (g = p.current) != null && g.loop && (l = i + e < 0 ? s[s.length - 1] : i + e === s.length ? s[0] : s[i + e]), l && E.setState("value", l.getAttribute(T));
198
+ }
199
+ function re(e) {
200
+ let a = M(), s = a == null ? void 0 : a.closest(N), i;
201
+ for (; s && !i;) s = e > 0 ? we(s, N) : De(s, N), i = s == null ? void 0 : s.querySelector(ce);
202
+ i ? E.setState("value", i.getAttribute(T)) : Q(e);
203
+ }
204
+ let oe = () => X(V().length - 1), ie = (e) => {
205
+ e.preventDefault(), e.metaKey ? oe() : e.altKey ? re(1) : Q(1);
206
+ }, se = (e) => {
207
+ e.preventDefault(), e.metaKey ? X(0) : e.altKey ? re(-1) : Q(-1);
208
+ };
209
+ return import_react.createElement(Primitive.div, {
210
+ ref: o,
211
+ tabIndex: -1,
212
+ ...O,
213
+ "cmdk-root": "",
214
+ onKeyDown: (e) => {
215
+ var s;
216
+ (s = O.onKeyDown) == null || s.call(O, e);
217
+ let a = e.nativeEvent.isComposing || e.keyCode === 229;
218
+ if (!(e.defaultPrevented || a)) switch (e.key) {
219
+ case "n":
220
+ case "j":
221
+ j && e.ctrlKey && ie(e);
222
+ break;
223
+ case "ArrowDown":
224
+ ie(e);
225
+ break;
226
+ case "p":
227
+ case "k":
228
+ j && e.ctrlKey && se(e);
229
+ break;
230
+ case "ArrowUp":
231
+ se(e);
232
+ break;
233
+ case "Home":
234
+ e.preventDefault(), X(0);
235
+ break;
236
+ case "End":
237
+ e.preventDefault(), oe();
238
+ break;
239
+ case "Enter": {
240
+ e.preventDefault();
241
+ let i = M();
242
+ if (i) {
243
+ let l = new Event(Z);
244
+ i.dispatchEvent(l);
245
+ }
246
+ }
247
+ }
248
+ }
249
+ }, import_react.createElement("label", {
250
+ "cmdk-label": "",
251
+ htmlFor: U.inputId,
252
+ id: U.labelId,
253
+ style: Te
254
+ }, b), B(r, (e) => import_react.createElement(de.Provider, { value: E }, import_react.createElement(ue.Provider, { value: U }, e))));
255
+ });
256
+ var he = import_react.forwardRef((r, o) => {
257
+ var _, I;
258
+ let n = useId(), u = import_react.useRef(null), c = import_react.useContext(fe), d = K(), f = pe(r), p = (I = (_ = f.current) == null ? void 0 : _.forceMount) != null ? I : c == null ? void 0 : c.forceMount;
259
+ k(() => {
260
+ if (!p) return d.item(n, c == null ? void 0 : c.id);
261
+ }, [p]);
262
+ let b = ve(n, u, [
263
+ r.value,
264
+ r.children,
265
+ u
266
+ ], r.keywords), m = ee(), R = P((v) => v.value && v.value === b.current), x = P((v) => p || d.filter() === !1 ? !0 : v.search ? v.filtered.items.get(n) > 0 : !0);
267
+ import_react.useEffect(() => {
268
+ let v = u.current;
269
+ if (!(!v || r.disabled)) return v.addEventListener(Z, C), () => v.removeEventListener(Z, C);
270
+ }, [
271
+ x,
272
+ r.onSelect,
273
+ r.disabled
274
+ ]);
275
+ function C() {
276
+ var v, E;
277
+ S(), (E = (v = f.current).onSelect) == null || E.call(v, b.current);
278
+ }
279
+ function S() {
280
+ m.setState("value", b.current, !0);
281
+ }
282
+ if (!x) return null;
283
+ let { disabled: A, value: ge, onSelect: j, forceMount: O, keywords: $, ...q } = r;
284
+ return import_react.createElement(Primitive.div, {
285
+ ref: composeRefs(u, o),
286
+ ...q,
287
+ id: n,
288
+ "cmdk-item": "",
289
+ role: "option",
290
+ "aria-disabled": !!A,
291
+ "aria-selected": !!R,
292
+ "data-disabled": !!A,
293
+ "data-selected": !!R,
294
+ onPointerMove: A || d.getDisablePointerSelection() ? void 0 : S,
295
+ onClick: A ? void 0 : C
296
+ }, r.children);
297
+ });
298
+ var Ee = import_react.forwardRef((r, o) => {
299
+ let { heading: n, children: u, forceMount: c, ...d } = r, f = useId(), p = import_react.useRef(null), b = import_react.useRef(null), m = useId(), R = K(), x = P((S) => c || R.filter() === !1 ? !0 : S.search ? S.filtered.groups.has(f) : !0);
300
+ k(() => R.group(f), []), ve(f, p, [
301
+ r.value,
302
+ r.heading,
303
+ b
304
+ ]);
305
+ let C = import_react.useMemo(() => ({
306
+ id: f,
307
+ forceMount: c
308
+ }), [c]);
309
+ return import_react.createElement(Primitive.div, {
310
+ ref: composeRefs(p, o),
311
+ ...d,
312
+ "cmdk-group": "",
313
+ role: "presentation",
314
+ hidden: x ? void 0 : !0
315
+ }, n && import_react.createElement("div", {
316
+ ref: b,
317
+ "cmdk-group-heading": "",
318
+ "aria-hidden": !0,
319
+ id: m
320
+ }, n), B(r, (S) => import_react.createElement("div", {
321
+ "cmdk-group-items": "",
322
+ role: "group",
323
+ "aria-labelledby": n ? m : void 0
324
+ }, import_react.createElement(fe.Provider, { value: C }, S))));
325
+ });
326
+ var ye = import_react.forwardRef((r, o) => {
327
+ let { alwaysRender: n, ...u } = r, c = import_react.useRef(null), d = P((f) => !f.search);
328
+ return !n && !d ? null : import_react.createElement(Primitive.div, {
329
+ ref: composeRefs(c, o),
330
+ ...u,
331
+ "cmdk-separator": "",
332
+ role: "separator"
333
+ });
334
+ });
335
+ var Se = import_react.forwardRef((r, o) => {
336
+ let { onValueChange: n, ...u } = r, c = r.value != null, d = ee(), f = P((m) => m.search), p = P((m) => m.selectedItemId), b = K();
337
+ return import_react.useEffect(() => {
338
+ r.value != null && d.setState("search", r.value);
339
+ }, [r.value]), import_react.createElement(Primitive.input, {
340
+ ref: o,
341
+ ...u,
342
+ "cmdk-input": "",
343
+ autoComplete: "off",
344
+ autoCorrect: "off",
345
+ spellCheck: !1,
346
+ "aria-autocomplete": "list",
347
+ role: "combobox",
348
+ "aria-expanded": !0,
349
+ "aria-controls": b.listId,
350
+ "aria-labelledby": b.labelId,
351
+ "aria-activedescendant": p,
352
+ id: b.inputId,
353
+ type: "text",
354
+ value: c ? r.value : f,
355
+ onChange: (m) => {
356
+ c || d.setState("search", m.target.value), n?.(m.target.value);
357
+ }
358
+ });
359
+ });
360
+ var Ce = import_react.forwardRef((r, o) => {
361
+ let { children: n, label: u = "Suggestions", ...c } = r, d = import_react.useRef(null), f = import_react.useRef(null), p = P((m) => m.selectedItemId), b = K();
362
+ return import_react.useEffect(() => {
363
+ if (f.current && d.current) {
364
+ let m = f.current, R = d.current, x, C = new ResizeObserver(() => {
365
+ x = requestAnimationFrame(() => {
366
+ let S = m.offsetHeight;
367
+ R.style.setProperty("--cmdk-list-height", S.toFixed(1) + "px");
368
+ });
369
+ });
370
+ return C.observe(m), () => {
371
+ cancelAnimationFrame(x), C.unobserve(m);
372
+ };
373
+ }
374
+ }, []), import_react.createElement(Primitive.div, {
375
+ ref: composeRefs(d, o),
376
+ ...c,
377
+ "cmdk-list": "",
378
+ role: "listbox",
379
+ tabIndex: -1,
380
+ "aria-activedescendant": p,
381
+ "aria-label": u,
382
+ id: b.listId
383
+ }, B(r, (m) => import_react.createElement("div", {
384
+ ref: composeRefs(f, b.listInnerRef),
385
+ "cmdk-list-sizer": ""
386
+ }, m)));
387
+ });
388
+ var xe = import_react.forwardRef((r, o) => {
389
+ let { open: n, onOpenChange: u, overlayClassName: c, contentClassName: d, container: f, ...p } = r;
390
+ return import_react.createElement(Dialog, {
391
+ open: n,
392
+ onOpenChange: u
393
+ }, import_react.createElement(DialogPortal, { container: f }, import_react.createElement(DialogOverlay, {
394
+ "cmdk-overlay": "",
395
+ className: c
396
+ }), import_react.createElement(DialogContent, {
397
+ "aria-label": r.label,
398
+ "cmdk-dialog": "",
399
+ className: d
400
+ }, import_react.createElement(me, {
401
+ ref: o,
402
+ ...p
403
+ }))));
404
+ });
405
+ var Ie = import_react.forwardRef((r, o) => P((u) => u.filtered.count === 0) ? import_react.createElement(Primitive.div, {
406
+ ref: o,
407
+ ...r,
408
+ "cmdk-empty": "",
409
+ role: "presentation"
410
+ }) : null);
411
+ var Pe = import_react.forwardRef((r, o) => {
412
+ let { progress: n, children: u, label: c = "Loading...", ...d } = r;
413
+ return import_react.createElement(Primitive.div, {
414
+ ref: o,
415
+ ...d,
416
+ "cmdk-loading": "",
417
+ role: "progressbar",
418
+ "aria-valuenow": n,
419
+ "aria-valuemin": 0,
420
+ "aria-valuemax": 100,
421
+ "aria-label": c
422
+ }, B(r, (f) => import_react.createElement("div", { "aria-hidden": !0 }, f)));
423
+ });
424
+ var _e = Object.assign(me, {
425
+ List: Ce,
426
+ Item: he,
427
+ Input: Se,
428
+ Group: Ee,
429
+ Separator: ye,
430
+ Dialog: xe,
431
+ Empty: Ie,
432
+ Loading: Pe
433
+ });
434
+ function we(r, o) {
435
+ let n = r.nextElementSibling;
436
+ for (; n;) {
437
+ if (n.matches(o)) return n;
438
+ n = n.nextElementSibling;
439
+ }
440
+ }
441
+ function De(r, o) {
442
+ let n = r.previousElementSibling;
443
+ for (; n;) {
444
+ if (n.matches(o)) return n;
445
+ n = n.previousElementSibling;
446
+ }
447
+ }
448
+ function pe(r) {
449
+ let o = import_react.useRef(r);
450
+ return k(() => {
451
+ o.current = r;
452
+ }), o;
453
+ }
454
+ var k = typeof window == "undefined" ? import_react.useEffect : import_react.useLayoutEffect;
455
+ function L(r) {
456
+ let o = import_react.useRef();
457
+ return o.current === void 0 && (o.current = r()), o;
458
+ }
459
+ function P(r) {
460
+ let o = ee(), n = () => r(o.snapshot());
461
+ return import_react.useSyncExternalStore(o.subscribe, n, n);
462
+ }
463
+ function ve(r, o, n, u = []) {
464
+ let c = import_react.useRef(), d = K();
465
+ return k(() => {
466
+ var b;
467
+ let f = (() => {
468
+ var m;
469
+ for (let R of n) {
470
+ if (typeof R == "string") return R.trim();
471
+ if (typeof R == "object" && "current" in R) return R.current ? (m = R.current.textContent) == null ? void 0 : m.trim() : c.current;
472
+ }
473
+ })(), p = u.map((m) => m.trim());
474
+ d.value(r, f, p), (b = o.current) == null || b.setAttribute(T, f), c.current = f;
475
+ }), c;
476
+ }
477
+ var ke = () => {
478
+ let [r, o] = import_react.useState(), n = L(() => /* @__PURE__ */ new Map());
479
+ return k(() => {
480
+ n.current.forEach((u) => u()), n.current = /* @__PURE__ */ new Map();
481
+ }, [r]), (u, c) => {
482
+ n.current.set(u, c), o({});
483
+ };
484
+ };
485
+ function Me(r) {
486
+ let o = r.type;
487
+ return typeof o == "function" ? o(r.props) : "render" in o ? o.render(r.props) : r;
488
+ }
489
+ function B({ asChild: r, children: o }, n) {
490
+ return r && import_react.isValidElement(o) ? import_react.cloneElement(Me(o), { ref: o.ref }, n(o.props.children)) : n(o);
491
+ }
492
+ var Te = {
493
+ position: "absolute",
494
+ width: "1px",
495
+ height: "1px",
496
+ padding: "0",
497
+ margin: "-1px",
498
+ overflow: "hidden",
499
+ clip: "rect(0, 0, 0, 0)",
500
+ whiteSpace: "nowrap",
501
+ borderWidth: "0"
502
+ };
503
+ //#endregion
504
+ export { _e as t };