@c-rex/components 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.
package/dist/index.js ADDED
@@ -0,0 +1,2919 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ AppSidebar: () => AppSidebar,
34
+ AutoComplete: () => AutoComplete,
35
+ BlogCard: () => BlogCard,
36
+ BlurImage: () => BlurImage,
37
+ Breadcrumb: () => Breadcrumb,
38
+ Empty: () => Empty,
39
+ NavBar: () => NavBar,
40
+ ResultList: () => ResultList,
41
+ SearchStateWrapper: () => SearchStateWrapper
42
+ });
43
+ module.exports = __toCommonJS(index_exports);
44
+
45
+ // src/providers/search-state-wrapper.tsx
46
+ var import_contexts = require("@c-rex/contexts");
47
+ var import_jsx_runtime = require("react/jsx-runtime");
48
+ var SearchStateWrapper = ({
49
+ children,
50
+ filters
51
+ }) => {
52
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_contexts.SearchProvider, { value: { ...filters }, children });
53
+ };
54
+
55
+ // src/blog-card.tsx
56
+ var import_link = __toESM(require("next/link"));
57
+ var import_ui2 = require("@c-rex/ui");
58
+
59
+ // src/blur-image.tsx
60
+ var import_react = require("react");
61
+ var import_image = __toESM(require("next/image"));
62
+ var import_ui = require("@c-rex/ui");
63
+ var import_jsx_runtime2 = require("react/jsx-runtime");
64
+ var BlurImage = (props) => {
65
+ const [isLoading, setLoading] = (0, import_react.useState)(true);
66
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
67
+ import_image.default,
68
+ {
69
+ ...props,
70
+ alt: props.alt,
71
+ className: (0, import_ui.cn)(
72
+ props.className,
73
+ "duration-500 ease-in-out",
74
+ isLoading ? "blur-sm" : "blur-0"
75
+ ),
76
+ onLoad: () => setLoading(false)
77
+ }
78
+ );
79
+ };
80
+
81
+ // src/blog-card.tsx
82
+ var import_jsx_runtime3 = require("react/jsx-runtime");
83
+ var BlogCard = ({
84
+ data,
85
+ priority,
86
+ horizontal = false
87
+ }) => {
88
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
89
+ "article",
90
+ {
91
+ className: (0, import_ui2.cn)(
92
+ "group relative",
93
+ horizontal ? "grid grid-cols-1 gap-3 md:grid-cols-2 md:gap-6" : "flex flex-col space-y-2"
94
+ ),
95
+ children: [
96
+ data.image && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "w-full overflow-hidden rounded-xl border", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
97
+ BlurImage,
98
+ {
99
+ alt: data.title,
100
+ blurDataURL: data.blurDataURL,
101
+ className: (0, import_ui2.cn)(
102
+ "size-full object-cover object-center",
103
+ horizontal ? "lg:h-72" : null
104
+ ),
105
+ width: 800,
106
+ height: 400,
107
+ priority,
108
+ placeholder: "blur",
109
+ src: data.image,
110
+ sizes: "(max-width: 768px) 750px, 600px"
111
+ }
112
+ ) }),
113
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
114
+ "div",
115
+ {
116
+ className: (0, import_ui2.cn)(
117
+ "flex flex-1 flex-col",
118
+ horizontal ? "justify-center" : "justify-between"
119
+ ),
120
+ children: [
121
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "w-full", children: [
122
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h2", { className: "my-1.5 line-clamp-2 font-heading text-2xl", children: data.title }),
123
+ data.description && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "line-clamp-2 text-muted-foreground", children: data.description })
124
+ ] }),
125
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "mt-4 flex items-center space-x-3", children: [
126
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex items-center -space-x-2", children: data.authors && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-sm text-muted-foreground", children: data.authors }) }),
127
+ data.date && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-sm text-muted-foreground", children: data.date })
128
+ ] })
129
+ ]
130
+ }
131
+ ),
132
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_link.default, { href: data.slug, className: "absolute inset-0", target: "_blank", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sr-only", children: "View Article" }) })
133
+ ]
134
+ }
135
+ );
136
+ };
137
+
138
+ // src/result-view/blog.tsx
139
+ var import_jsx_runtime4 = require("react/jsx-runtime");
140
+
141
+ // src/result-view/table.tsx
142
+ var import_ui3 = require("@c-rex/ui");
143
+ var import_jsx_runtime5 = require("react/jsx-runtime");
144
+ var TableView = ({ items }) => {
145
+ const getTitle = (labels) => {
146
+ return labels.map((item) => item.value).join();
147
+ };
148
+ const getIcons = (languages) => {
149
+ return languages.map((lang, index) => {
150
+ const aux = lang.split("-")[1];
151
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { width: 36 }, className: "border me-3", children: aux }, index);
152
+ });
153
+ };
154
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "rounded-md border", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_ui3.Table, { children: [
155
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ui3.TableHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_ui3.TableRow, { children: [
156
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ui3.TableCell, { children: "Title" }),
157
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ui3.TableCell, { children: "Country" })
158
+ ] }) }),
159
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ui3.TableBody, { children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_ui3.TableRow, { children: [
160
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ui3.TableCell, { children: getTitle(item.labels) }),
161
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ui3.TableCell, { children: getIcons(item.languages) })
162
+ ] }, index)) })
163
+ ] }) });
164
+ };
165
+ var table_default = TableView;
166
+
167
+ // ../../node_modules/cmdk/dist/chunk-NZJY6EH4.mjs
168
+ var U = 1;
169
+ var Y = 0.9;
170
+ var H = 0.8;
171
+ var J = 0.17;
172
+ var p = 0.1;
173
+ var u = 0.999;
174
+ var $ = 0.9999;
175
+ var k = 0.99;
176
+ var m = /[\\\/_+.#"@\[\(\{&]/;
177
+ var B = /[\\\/_+.#"@\[\(\{&]/g;
178
+ var K = /[\s-]/;
179
+ var X = /[\s-]/g;
180
+ function G(_, C, h, P2, A, f, O) {
181
+ if (f === C.length) return A === _.length ? U : k;
182
+ var T2 = `${A},${f}`;
183
+ if (O[T2] !== void 0) return O[T2];
184
+ for (var L2 = P2.charAt(f), c = h.indexOf(L2, A), S = 0, E, N2, R, M; c >= 0; ) E = G(_, C, h, P2, 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), R && A > 0 && (E *= Math.pow(u, R.length))) : K.test(_.charAt(c - 1)) ? (E *= Y, 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) === P2.charAt(f + 1) || P2.charAt(f + 1) === P2.charAt(f) && h.charAt(c - 1) !== P2.charAt(f)) && (N2 = G(_, C, h, P2, c + 1, f + 2, O), N2 * p > E && (E = N2 * p)), E > S && (S = E), c = h.indexOf(L2, c + 1);
185
+ return O[T2] = S, S;
186
+ }
187
+ function D(_) {
188
+ return _.toLowerCase().replace(X, " ");
189
+ }
190
+ function W(_, C, h) {
191
+ return _ = h && h.length > 0 ? `${_ + " " + h.join(" ")}` : _, G(_, C, D(_), D(C), 0, 0, {});
192
+ }
193
+
194
+ // ../../node_modules/@radix-ui/react-dialog/dist/index.mjs
195
+ var React23 = __toESM(require("react"), 1);
196
+
197
+ // ../../node_modules/@radix-ui/primitive/dist/index.mjs
198
+ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
199
+ return function handleEvent(event) {
200
+ originalEventHandler?.(event);
201
+ if (checkForDefaultPrevented === false || !event.defaultPrevented) {
202
+ return ourEventHandler?.(event);
203
+ }
204
+ };
205
+ }
206
+
207
+ // ../../node_modules/@radix-ui/react-compose-refs/dist/index.mjs
208
+ var React = __toESM(require("react"), 1);
209
+ function setRef(ref, value) {
210
+ if (typeof ref === "function") {
211
+ return ref(value);
212
+ } else if (ref !== null && ref !== void 0) {
213
+ ref.current = value;
214
+ }
215
+ }
216
+ function composeRefs(...refs) {
217
+ return (node) => {
218
+ let hasCleanup = false;
219
+ const cleanups = refs.map((ref) => {
220
+ const cleanup = setRef(ref, node);
221
+ if (!hasCleanup && typeof cleanup == "function") {
222
+ hasCleanup = true;
223
+ }
224
+ return cleanup;
225
+ });
226
+ if (hasCleanup) {
227
+ return () => {
228
+ for (let i = 0; i < cleanups.length; i++) {
229
+ const cleanup = cleanups[i];
230
+ if (typeof cleanup == "function") {
231
+ cleanup();
232
+ } else {
233
+ setRef(refs[i], null);
234
+ }
235
+ }
236
+ };
237
+ }
238
+ };
239
+ }
240
+ function useComposedRefs(...refs) {
241
+ return React.useCallback(composeRefs(...refs), refs);
242
+ }
243
+
244
+ // ../../node_modules/@radix-ui/react-context/dist/index.mjs
245
+ var React2 = __toESM(require("react"), 1);
246
+ var import_jsx_runtime6 = require("react/jsx-runtime");
247
+ function createContext2(rootComponentName, defaultContext) {
248
+ const Context = React2.createContext(defaultContext);
249
+ const Provider = (props) => {
250
+ const { children, ...context } = props;
251
+ const value = React2.useMemo(() => context, Object.values(context));
252
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Context.Provider, { value, children });
253
+ };
254
+ Provider.displayName = rootComponentName + "Provider";
255
+ function useContext22(consumerName) {
256
+ const context = React2.useContext(Context);
257
+ if (context) return context;
258
+ if (defaultContext !== void 0) return defaultContext;
259
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
260
+ }
261
+ return [Provider, useContext22];
262
+ }
263
+ function createContextScope(scopeName, createContextScopeDeps = []) {
264
+ let defaultContexts = [];
265
+ function createContext32(rootComponentName, defaultContext) {
266
+ const BaseContext = React2.createContext(defaultContext);
267
+ const index = defaultContexts.length;
268
+ defaultContexts = [...defaultContexts, defaultContext];
269
+ const Provider = (props) => {
270
+ const { scope, children, ...context } = props;
271
+ const Context = scope?.[scopeName]?.[index] || BaseContext;
272
+ const value = React2.useMemo(() => context, Object.values(context));
273
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Context.Provider, { value, children });
274
+ };
275
+ Provider.displayName = rootComponentName + "Provider";
276
+ function useContext22(consumerName, scope) {
277
+ const Context = scope?.[scopeName]?.[index] || BaseContext;
278
+ const context = React2.useContext(Context);
279
+ if (context) return context;
280
+ if (defaultContext !== void 0) return defaultContext;
281
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
282
+ }
283
+ return [Provider, useContext22];
284
+ }
285
+ const createScope = () => {
286
+ const scopeContexts = defaultContexts.map((defaultContext) => {
287
+ return React2.createContext(defaultContext);
288
+ });
289
+ return function useScope(scope) {
290
+ const contexts = scope?.[scopeName] || scopeContexts;
291
+ return React2.useMemo(
292
+ () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
293
+ [scope, contexts]
294
+ );
295
+ };
296
+ };
297
+ createScope.scopeName = scopeName;
298
+ return [createContext32, composeContextScopes(createScope, ...createContextScopeDeps)];
299
+ }
300
+ function composeContextScopes(...scopes) {
301
+ const baseScope = scopes[0];
302
+ if (scopes.length === 1) return baseScope;
303
+ const createScope = () => {
304
+ const scopeHooks = scopes.map((createScope2) => ({
305
+ useScope: createScope2(),
306
+ scopeName: createScope2.scopeName
307
+ }));
308
+ return function useComposedScopes(overrideScopes) {
309
+ const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
310
+ const scopeProps = useScope(overrideScopes);
311
+ const currentScope = scopeProps[`__scope${scopeName}`];
312
+ return { ...nextScopes2, ...currentScope };
313
+ }, {});
314
+ return React2.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
315
+ };
316
+ };
317
+ createScope.scopeName = baseScope.scopeName;
318
+ return createScope;
319
+ }
320
+
321
+ // ../../node_modules/@radix-ui/react-id/dist/index.mjs
322
+ var React4 = __toESM(require("react"), 1);
323
+
324
+ // ../../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
325
+ var React3 = __toESM(require("react"), 1);
326
+ var useLayoutEffect2 = globalThis?.document ? React3.useLayoutEffect : () => {
327
+ };
328
+
329
+ // ../../node_modules/@radix-ui/react-id/dist/index.mjs
330
+ var useReactId = React4[" useId ".trim().toString()] || (() => void 0);
331
+ var count = 0;
332
+ function useId(deterministicId) {
333
+ const [id, setId] = React4.useState(useReactId());
334
+ useLayoutEffect2(() => {
335
+ if (!deterministicId) setId((reactId) => reactId ?? String(count++));
336
+ }, [deterministicId]);
337
+ return deterministicId || (id ? `radix-${id}` : "");
338
+ }
339
+
340
+ // ../../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
341
+ var React6 = __toESM(require("react"), 1);
342
+
343
+ // ../../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
344
+ var React5 = __toESM(require("react"), 1);
345
+ function useCallbackRef(callback) {
346
+ const callbackRef = React5.useRef(callback);
347
+ React5.useEffect(() => {
348
+ callbackRef.current = callback;
349
+ });
350
+ return React5.useMemo(() => (...args) => callbackRef.current?.(...args), []);
351
+ }
352
+
353
+ // ../../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
354
+ function useControllableState({
355
+ prop,
356
+ defaultProp,
357
+ onChange = () => {
358
+ }
359
+ }) {
360
+ const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });
361
+ const isControlled = prop !== void 0;
362
+ const value = isControlled ? prop : uncontrolledProp;
363
+ const handleChange = useCallbackRef(onChange);
364
+ const setValue = React6.useCallback(
365
+ (nextValue) => {
366
+ if (isControlled) {
367
+ const setter = nextValue;
368
+ const value2 = typeof nextValue === "function" ? setter(prop) : nextValue;
369
+ if (value2 !== prop) handleChange(value2);
370
+ } else {
371
+ setUncontrolledProp(nextValue);
372
+ }
373
+ },
374
+ [isControlled, prop, setUncontrolledProp, handleChange]
375
+ );
376
+ return [value, setValue];
377
+ }
378
+ function useUncontrolledState({
379
+ defaultProp,
380
+ onChange
381
+ }) {
382
+ const uncontrolledState = React6.useState(defaultProp);
383
+ const [value] = uncontrolledState;
384
+ const prevValueRef = React6.useRef(value);
385
+ const handleChange = useCallbackRef(onChange);
386
+ React6.useEffect(() => {
387
+ if (prevValueRef.current !== value) {
388
+ handleChange(value);
389
+ prevValueRef.current = value;
390
+ }
391
+ }, [value, prevValueRef, handleChange]);
392
+ return uncontrolledState;
393
+ }
394
+
395
+ // ../../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
396
+ var React10 = __toESM(require("react"), 1);
397
+
398
+ // ../../node_modules/@radix-ui/react-primitive/dist/index.mjs
399
+ var React8 = __toESM(require("react"), 1);
400
+ var ReactDOM = __toESM(require("react-dom"), 1);
401
+
402
+ // ../../node_modules/@radix-ui/react-slot/dist/index.mjs
403
+ var React7 = __toESM(require("react"), 1);
404
+ var import_jsx_runtime7 = require("react/jsx-runtime");
405
+ // @__NO_SIDE_EFFECTS__
406
+ function createSlot(ownerName) {
407
+ const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
408
+ const Slot2 = React7.forwardRef((props, forwardedRef) => {
409
+ const { children, ...slotProps } = props;
410
+ const childrenArray = React7.Children.toArray(children);
411
+ const slottable = childrenArray.find(isSlottable);
412
+ if (slottable) {
413
+ const newElement = slottable.props.children;
414
+ const newChildren = childrenArray.map((child) => {
415
+ if (child === slottable) {
416
+ if (React7.Children.count(newElement) > 1) return React7.Children.only(null);
417
+ return React7.isValidElement(newElement) ? newElement.props.children : null;
418
+ } else {
419
+ return child;
420
+ }
421
+ });
422
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React7.isValidElement(newElement) ? React7.cloneElement(newElement, void 0, newChildren) : null });
423
+ }
424
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
425
+ });
426
+ Slot2.displayName = `${ownerName}.Slot`;
427
+ return Slot2;
428
+ }
429
+ // @__NO_SIDE_EFFECTS__
430
+ function createSlotClone(ownerName) {
431
+ const SlotClone = React7.forwardRef((props, forwardedRef) => {
432
+ const { children, ...slotProps } = props;
433
+ if (React7.isValidElement(children)) {
434
+ const childrenRef = getElementRef(children);
435
+ const props2 = mergeProps(slotProps, children.props);
436
+ if (children.type !== React7.Fragment) {
437
+ props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
438
+ }
439
+ return React7.cloneElement(children, props2);
440
+ }
441
+ return React7.Children.count(children) > 1 ? React7.Children.only(null) : null;
442
+ });
443
+ SlotClone.displayName = `${ownerName}.SlotClone`;
444
+ return SlotClone;
445
+ }
446
+ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
447
+ function isSlottable(child) {
448
+ return React7.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
449
+ }
450
+ function mergeProps(slotProps, childProps) {
451
+ const overrideProps = { ...childProps };
452
+ for (const propName in childProps) {
453
+ const slotPropValue = slotProps[propName];
454
+ const childPropValue = childProps[propName];
455
+ const isHandler = /^on[A-Z]/.test(propName);
456
+ if (isHandler) {
457
+ if (slotPropValue && childPropValue) {
458
+ overrideProps[propName] = (...args) => {
459
+ childPropValue(...args);
460
+ slotPropValue(...args);
461
+ };
462
+ } else if (slotPropValue) {
463
+ overrideProps[propName] = slotPropValue;
464
+ }
465
+ } else if (propName === "style") {
466
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
467
+ } else if (propName === "className") {
468
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
469
+ }
470
+ }
471
+ return { ...slotProps, ...overrideProps };
472
+ }
473
+ function getElementRef(element) {
474
+ let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
475
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
476
+ if (mayWarn) {
477
+ return element.ref;
478
+ }
479
+ getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
480
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
481
+ if (mayWarn) {
482
+ return element.props.ref;
483
+ }
484
+ return element.props.ref || element.ref;
485
+ }
486
+
487
+ // ../../node_modules/@radix-ui/react-primitive/dist/index.mjs
488
+ var import_jsx_runtime8 = require("react/jsx-runtime");
489
+ var NODES = [
490
+ "a",
491
+ "button",
492
+ "div",
493
+ "form",
494
+ "h2",
495
+ "h3",
496
+ "img",
497
+ "input",
498
+ "label",
499
+ "li",
500
+ "nav",
501
+ "ol",
502
+ "p",
503
+ "span",
504
+ "svg",
505
+ "ul"
506
+ ];
507
+ var Primitive = NODES.reduce((primitive, node) => {
508
+ const Slot2 = createSlot(`Primitive.${node}`);
509
+ const Node = React8.forwardRef((props, forwardedRef) => {
510
+ const { asChild, ...primitiveProps } = props;
511
+ const Comp = asChild ? Slot2 : node;
512
+ if (typeof window !== "undefined") {
513
+ window[Symbol.for("radix-ui")] = true;
514
+ }
515
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
516
+ });
517
+ Node.displayName = `Primitive.${node}`;
518
+ return { ...primitive, [node]: Node };
519
+ }, {});
520
+ function dispatchDiscreteCustomEvent(target, event) {
521
+ if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
522
+ }
523
+
524
+ // ../../node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
525
+ var React9 = __toESM(require("react"), 1);
526
+ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
527
+ const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
528
+ React9.useEffect(() => {
529
+ const handleKeyDown = (event) => {
530
+ if (event.key === "Escape") {
531
+ onEscapeKeyDown(event);
532
+ }
533
+ };
534
+ ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
535
+ return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
536
+ }, [onEscapeKeyDown, ownerDocument]);
537
+ }
538
+
539
+ // ../../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
540
+ var import_jsx_runtime9 = require("react/jsx-runtime");
541
+ var DISMISSABLE_LAYER_NAME = "DismissableLayer";
542
+ var CONTEXT_UPDATE = "dismissableLayer.update";
543
+ var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
544
+ var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
545
+ var originalBodyPointerEvents;
546
+ var DismissableLayerContext = React10.createContext({
547
+ layers: /* @__PURE__ */ new Set(),
548
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
549
+ branches: /* @__PURE__ */ new Set()
550
+ });
551
+ var DismissableLayer = React10.forwardRef(
552
+ (props, forwardedRef) => {
553
+ const {
554
+ disableOutsidePointerEvents = false,
555
+ onEscapeKeyDown,
556
+ onPointerDownOutside,
557
+ onFocusOutside,
558
+ onInteractOutside,
559
+ onDismiss,
560
+ ...layerProps
561
+ } = props;
562
+ const context = React10.useContext(DismissableLayerContext);
563
+ const [node, setNode] = React10.useState(null);
564
+ const ownerDocument = node?.ownerDocument ?? globalThis?.document;
565
+ const [, force] = React10.useState({});
566
+ const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
567
+ const layers = Array.from(context.layers);
568
+ const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
569
+ const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
570
+ const index = node ? layers.indexOf(node) : -1;
571
+ const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
572
+ const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
573
+ const pointerDownOutside = usePointerDownOutside((event) => {
574
+ const target = event.target;
575
+ const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
576
+ if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
577
+ onPointerDownOutside?.(event);
578
+ onInteractOutside?.(event);
579
+ if (!event.defaultPrevented) onDismiss?.();
580
+ }, ownerDocument);
581
+ const focusOutside = useFocusOutside((event) => {
582
+ const target = event.target;
583
+ const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
584
+ if (isFocusInBranch) return;
585
+ onFocusOutside?.(event);
586
+ onInteractOutside?.(event);
587
+ if (!event.defaultPrevented) onDismiss?.();
588
+ }, ownerDocument);
589
+ useEscapeKeydown((event) => {
590
+ const isHighestLayer = index === context.layers.size - 1;
591
+ if (!isHighestLayer) return;
592
+ onEscapeKeyDown?.(event);
593
+ if (!event.defaultPrevented && onDismiss) {
594
+ event.preventDefault();
595
+ onDismiss();
596
+ }
597
+ }, ownerDocument);
598
+ React10.useEffect(() => {
599
+ if (!node) return;
600
+ if (disableOutsidePointerEvents) {
601
+ if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
602
+ originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
603
+ ownerDocument.body.style.pointerEvents = "none";
604
+ }
605
+ context.layersWithOutsidePointerEventsDisabled.add(node);
606
+ }
607
+ context.layers.add(node);
608
+ dispatchUpdate();
609
+ return () => {
610
+ if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {
611
+ ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
612
+ }
613
+ };
614
+ }, [node, ownerDocument, disableOutsidePointerEvents, context]);
615
+ React10.useEffect(() => {
616
+ return () => {
617
+ if (!node) return;
618
+ context.layers.delete(node);
619
+ context.layersWithOutsidePointerEventsDisabled.delete(node);
620
+ dispatchUpdate();
621
+ };
622
+ }, [node, context]);
623
+ React10.useEffect(() => {
624
+ const handleUpdate = () => force({});
625
+ document.addEventListener(CONTEXT_UPDATE, handleUpdate);
626
+ return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
627
+ }, []);
628
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
629
+ Primitive.div,
630
+ {
631
+ ...layerProps,
632
+ ref: composedRefs,
633
+ style: {
634
+ pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
635
+ ...props.style
636
+ },
637
+ onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
638
+ onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
639
+ onPointerDownCapture: composeEventHandlers(
640
+ props.onPointerDownCapture,
641
+ pointerDownOutside.onPointerDownCapture
642
+ )
643
+ }
644
+ );
645
+ }
646
+ );
647
+ DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
648
+ var BRANCH_NAME = "DismissableLayerBranch";
649
+ var DismissableLayerBranch = React10.forwardRef((props, forwardedRef) => {
650
+ const context = React10.useContext(DismissableLayerContext);
651
+ const ref = React10.useRef(null);
652
+ const composedRefs = useComposedRefs(forwardedRef, ref);
653
+ React10.useEffect(() => {
654
+ const node = ref.current;
655
+ if (node) {
656
+ context.branches.add(node);
657
+ return () => {
658
+ context.branches.delete(node);
659
+ };
660
+ }
661
+ }, [context.branches]);
662
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Primitive.div, { ...props, ref: composedRefs });
663
+ });
664
+ DismissableLayerBranch.displayName = BRANCH_NAME;
665
+ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
666
+ const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
667
+ const isPointerInsideReactTreeRef = React10.useRef(false);
668
+ const handleClickRef = React10.useRef(() => {
669
+ });
670
+ React10.useEffect(() => {
671
+ const handlePointerDown = (event) => {
672
+ if (event.target && !isPointerInsideReactTreeRef.current) {
673
+ let handleAndDispatchPointerDownOutsideEvent2 = function() {
674
+ handleAndDispatchCustomEvent(
675
+ POINTER_DOWN_OUTSIDE,
676
+ handlePointerDownOutside,
677
+ eventDetail,
678
+ { discrete: true }
679
+ );
680
+ };
681
+ var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;
682
+ const eventDetail = { originalEvent: event };
683
+ if (event.pointerType === "touch") {
684
+ ownerDocument.removeEventListener("click", handleClickRef.current);
685
+ handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
686
+ ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
687
+ } else {
688
+ handleAndDispatchPointerDownOutsideEvent2();
689
+ }
690
+ } else {
691
+ ownerDocument.removeEventListener("click", handleClickRef.current);
692
+ }
693
+ isPointerInsideReactTreeRef.current = false;
694
+ };
695
+ const timerId = window.setTimeout(() => {
696
+ ownerDocument.addEventListener("pointerdown", handlePointerDown);
697
+ }, 0);
698
+ return () => {
699
+ window.clearTimeout(timerId);
700
+ ownerDocument.removeEventListener("pointerdown", handlePointerDown);
701
+ ownerDocument.removeEventListener("click", handleClickRef.current);
702
+ };
703
+ }, [ownerDocument, handlePointerDownOutside]);
704
+ return {
705
+ // ensures we check React component tree (not just DOM tree)
706
+ onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
707
+ };
708
+ }
709
+ function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
710
+ const handleFocusOutside = useCallbackRef(onFocusOutside);
711
+ const isFocusInsideReactTreeRef = React10.useRef(false);
712
+ React10.useEffect(() => {
713
+ const handleFocus = (event) => {
714
+ if (event.target && !isFocusInsideReactTreeRef.current) {
715
+ const eventDetail = { originalEvent: event };
716
+ handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
717
+ discrete: false
718
+ });
719
+ }
720
+ };
721
+ ownerDocument.addEventListener("focusin", handleFocus);
722
+ return () => ownerDocument.removeEventListener("focusin", handleFocus);
723
+ }, [ownerDocument, handleFocusOutside]);
724
+ return {
725
+ onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
726
+ onBlurCapture: () => isFocusInsideReactTreeRef.current = false
727
+ };
728
+ }
729
+ function dispatchUpdate() {
730
+ const event = new CustomEvent(CONTEXT_UPDATE);
731
+ document.dispatchEvent(event);
732
+ }
733
+ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
734
+ const target = detail.originalEvent.target;
735
+ const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
736
+ if (handler) target.addEventListener(name, handler, { once: true });
737
+ if (discrete) {
738
+ dispatchDiscreteCustomEvent(target, event);
739
+ } else {
740
+ target.dispatchEvent(event);
741
+ }
742
+ }
743
+
744
+ // ../../node_modules/@radix-ui/react-focus-scope/dist/index.mjs
745
+ var React11 = __toESM(require("react"), 1);
746
+ var import_jsx_runtime10 = require("react/jsx-runtime");
747
+ var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
748
+ var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
749
+ var EVENT_OPTIONS = { bubbles: false, cancelable: true };
750
+ var FOCUS_SCOPE_NAME = "FocusScope";
751
+ var FocusScope = React11.forwardRef((props, forwardedRef) => {
752
+ const {
753
+ loop = false,
754
+ trapped = false,
755
+ onMountAutoFocus: onMountAutoFocusProp,
756
+ onUnmountAutoFocus: onUnmountAutoFocusProp,
757
+ ...scopeProps
758
+ } = props;
759
+ const [container, setContainer] = React11.useState(null);
760
+ const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
761
+ const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
762
+ const lastFocusedElementRef = React11.useRef(null);
763
+ const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
764
+ const focusScope = React11.useRef({
765
+ paused: false,
766
+ pause() {
767
+ this.paused = true;
768
+ },
769
+ resume() {
770
+ this.paused = false;
771
+ }
772
+ }).current;
773
+ React11.useEffect(() => {
774
+ if (trapped) {
775
+ let handleFocusIn2 = function(event) {
776
+ if (focusScope.paused || !container) return;
777
+ const target = event.target;
778
+ if (container.contains(target)) {
779
+ lastFocusedElementRef.current = target;
780
+ } else {
781
+ focus(lastFocusedElementRef.current, { select: true });
782
+ }
783
+ }, handleFocusOut2 = function(event) {
784
+ if (focusScope.paused || !container) return;
785
+ const relatedTarget = event.relatedTarget;
786
+ if (relatedTarget === null) return;
787
+ if (!container.contains(relatedTarget)) {
788
+ focus(lastFocusedElementRef.current, { select: true });
789
+ }
790
+ }, handleMutations2 = function(mutations) {
791
+ const focusedElement = document.activeElement;
792
+ if (focusedElement !== document.body) return;
793
+ for (const mutation of mutations) {
794
+ if (mutation.removedNodes.length > 0) focus(container);
795
+ }
796
+ };
797
+ var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;
798
+ document.addEventListener("focusin", handleFocusIn2);
799
+ document.addEventListener("focusout", handleFocusOut2);
800
+ const mutationObserver = new MutationObserver(handleMutations2);
801
+ if (container) mutationObserver.observe(container, { childList: true, subtree: true });
802
+ return () => {
803
+ document.removeEventListener("focusin", handleFocusIn2);
804
+ document.removeEventListener("focusout", handleFocusOut2);
805
+ mutationObserver.disconnect();
806
+ };
807
+ }
808
+ }, [trapped, container, focusScope.paused]);
809
+ React11.useEffect(() => {
810
+ if (container) {
811
+ focusScopesStack.add(focusScope);
812
+ const previouslyFocusedElement = document.activeElement;
813
+ const hasFocusedCandidate = container.contains(previouslyFocusedElement);
814
+ if (!hasFocusedCandidate) {
815
+ const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
816
+ container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
817
+ container.dispatchEvent(mountEvent);
818
+ if (!mountEvent.defaultPrevented) {
819
+ focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
820
+ if (document.activeElement === previouslyFocusedElement) {
821
+ focus(container);
822
+ }
823
+ }
824
+ }
825
+ return () => {
826
+ container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
827
+ setTimeout(() => {
828
+ const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
829
+ container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
830
+ container.dispatchEvent(unmountEvent);
831
+ if (!unmountEvent.defaultPrevented) {
832
+ focus(previouslyFocusedElement ?? document.body, { select: true });
833
+ }
834
+ container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
835
+ focusScopesStack.remove(focusScope);
836
+ }, 0);
837
+ };
838
+ }
839
+ }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
840
+ const handleKeyDown = React11.useCallback(
841
+ (event) => {
842
+ if (!loop && !trapped) return;
843
+ if (focusScope.paused) return;
844
+ const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
845
+ const focusedElement = document.activeElement;
846
+ if (isTabKey && focusedElement) {
847
+ const container2 = event.currentTarget;
848
+ const [first, last] = getTabbableEdges(container2);
849
+ const hasTabbableElementsInside = first && last;
850
+ if (!hasTabbableElementsInside) {
851
+ if (focusedElement === container2) event.preventDefault();
852
+ } else {
853
+ if (!event.shiftKey && focusedElement === last) {
854
+ event.preventDefault();
855
+ if (loop) focus(first, { select: true });
856
+ } else if (event.shiftKey && focusedElement === first) {
857
+ event.preventDefault();
858
+ if (loop) focus(last, { select: true });
859
+ }
860
+ }
861
+ }
862
+ },
863
+ [loop, trapped, focusScope.paused]
864
+ );
865
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
866
+ });
867
+ FocusScope.displayName = FOCUS_SCOPE_NAME;
868
+ function focusFirst(candidates, { select = false } = {}) {
869
+ const previouslyFocusedElement = document.activeElement;
870
+ for (const candidate of candidates) {
871
+ focus(candidate, { select });
872
+ if (document.activeElement !== previouslyFocusedElement) return;
873
+ }
874
+ }
875
+ function getTabbableEdges(container) {
876
+ const candidates = getTabbableCandidates(container);
877
+ const first = findVisible(candidates, container);
878
+ const last = findVisible(candidates.reverse(), container);
879
+ return [first, last];
880
+ }
881
+ function getTabbableCandidates(container) {
882
+ const nodes = [];
883
+ const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
884
+ acceptNode: (node) => {
885
+ const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
886
+ if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
887
+ return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
888
+ }
889
+ });
890
+ while (walker.nextNode()) nodes.push(walker.currentNode);
891
+ return nodes;
892
+ }
893
+ function findVisible(elements, container) {
894
+ for (const element of elements) {
895
+ if (!isHidden(element, { upTo: container })) return element;
896
+ }
897
+ }
898
+ function isHidden(node, { upTo }) {
899
+ if (getComputedStyle(node).visibility === "hidden") return true;
900
+ while (node) {
901
+ if (upTo !== void 0 && node === upTo) return false;
902
+ if (getComputedStyle(node).display === "none") return true;
903
+ node = node.parentElement;
904
+ }
905
+ return false;
906
+ }
907
+ function isSelectableInput(element) {
908
+ return element instanceof HTMLInputElement && "select" in element;
909
+ }
910
+ function focus(element, { select = false } = {}) {
911
+ if (element && element.focus) {
912
+ const previouslyFocusedElement = document.activeElement;
913
+ element.focus({ preventScroll: true });
914
+ if (element !== previouslyFocusedElement && isSelectableInput(element) && select)
915
+ element.select();
916
+ }
917
+ }
918
+ var focusScopesStack = createFocusScopesStack();
919
+ function createFocusScopesStack() {
920
+ let stack = [];
921
+ return {
922
+ add(focusScope) {
923
+ const activeFocusScope = stack[0];
924
+ if (focusScope !== activeFocusScope) {
925
+ activeFocusScope?.pause();
926
+ }
927
+ stack = arrayRemove(stack, focusScope);
928
+ stack.unshift(focusScope);
929
+ },
930
+ remove(focusScope) {
931
+ stack = arrayRemove(stack, focusScope);
932
+ stack[0]?.resume();
933
+ }
934
+ };
935
+ }
936
+ function arrayRemove(array, item) {
937
+ const updatedArray = [...array];
938
+ const index = updatedArray.indexOf(item);
939
+ if (index !== -1) {
940
+ updatedArray.splice(index, 1);
941
+ }
942
+ return updatedArray;
943
+ }
944
+ function removeLinks(items) {
945
+ return items.filter((item) => item.tagName !== "A");
946
+ }
947
+
948
+ // ../../node_modules/@radix-ui/react-portal/dist/index.mjs
949
+ var React12 = __toESM(require("react"), 1);
950
+ var import_react_dom = __toESM(require("react-dom"), 1);
951
+ var import_jsx_runtime11 = require("react/jsx-runtime");
952
+ var PORTAL_NAME = "Portal";
953
+ var Portal = React12.forwardRef((props, forwardedRef) => {
954
+ const { container: containerProp, ...portalProps } = props;
955
+ const [mounted, setMounted] = React12.useState(false);
956
+ useLayoutEffect2(() => setMounted(true), []);
957
+ const container = containerProp || mounted && globalThis?.document?.body;
958
+ return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
959
+ });
960
+ Portal.displayName = PORTAL_NAME;
961
+
962
+ // ../../node_modules/@radix-ui/react-presence/dist/index.mjs
963
+ var React22 = __toESM(require("react"), 1);
964
+ var React13 = __toESM(require("react"), 1);
965
+ function useStateMachine(initialState, machine) {
966
+ return React13.useReducer((state, event) => {
967
+ const nextState = machine[state][event];
968
+ return nextState ?? state;
969
+ }, initialState);
970
+ }
971
+ var Presence = (props) => {
972
+ const { present, children } = props;
973
+ const presence = usePresence(present);
974
+ const child = typeof children === "function" ? children({ present: presence.isPresent }) : React22.Children.only(children);
975
+ const ref = useComposedRefs(presence.ref, getElementRef2(child));
976
+ const forceMount = typeof children === "function";
977
+ return forceMount || presence.isPresent ? React22.cloneElement(child, { ref }) : null;
978
+ };
979
+ Presence.displayName = "Presence";
980
+ function usePresence(present) {
981
+ const [node, setNode] = React22.useState();
982
+ const stylesRef = React22.useRef({});
983
+ const prevPresentRef = React22.useRef(present);
984
+ const prevAnimationNameRef = React22.useRef("none");
985
+ const initialState = present ? "mounted" : "unmounted";
986
+ const [state, send] = useStateMachine(initialState, {
987
+ mounted: {
988
+ UNMOUNT: "unmounted",
989
+ ANIMATION_OUT: "unmountSuspended"
990
+ },
991
+ unmountSuspended: {
992
+ MOUNT: "mounted",
993
+ ANIMATION_END: "unmounted"
994
+ },
995
+ unmounted: {
996
+ MOUNT: "mounted"
997
+ }
998
+ });
999
+ React22.useEffect(() => {
1000
+ const currentAnimationName = getAnimationName(stylesRef.current);
1001
+ prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
1002
+ }, [state]);
1003
+ useLayoutEffect2(() => {
1004
+ const styles = stylesRef.current;
1005
+ const wasPresent = prevPresentRef.current;
1006
+ const hasPresentChanged = wasPresent !== present;
1007
+ if (hasPresentChanged) {
1008
+ const prevAnimationName = prevAnimationNameRef.current;
1009
+ const currentAnimationName = getAnimationName(styles);
1010
+ if (present) {
1011
+ send("MOUNT");
1012
+ } else if (currentAnimationName === "none" || styles?.display === "none") {
1013
+ send("UNMOUNT");
1014
+ } else {
1015
+ const isAnimating = prevAnimationName !== currentAnimationName;
1016
+ if (wasPresent && isAnimating) {
1017
+ send("ANIMATION_OUT");
1018
+ } else {
1019
+ send("UNMOUNT");
1020
+ }
1021
+ }
1022
+ prevPresentRef.current = present;
1023
+ }
1024
+ }, [present, send]);
1025
+ useLayoutEffect2(() => {
1026
+ if (node) {
1027
+ let timeoutId;
1028
+ const ownerWindow = node.ownerDocument.defaultView ?? window;
1029
+ const handleAnimationEnd = (event) => {
1030
+ const currentAnimationName = getAnimationName(stylesRef.current);
1031
+ const isCurrentAnimation = currentAnimationName.includes(event.animationName);
1032
+ if (event.target === node && isCurrentAnimation) {
1033
+ send("ANIMATION_END");
1034
+ if (!prevPresentRef.current) {
1035
+ const currentFillMode = node.style.animationFillMode;
1036
+ node.style.animationFillMode = "forwards";
1037
+ timeoutId = ownerWindow.setTimeout(() => {
1038
+ if (node.style.animationFillMode === "forwards") {
1039
+ node.style.animationFillMode = currentFillMode;
1040
+ }
1041
+ });
1042
+ }
1043
+ }
1044
+ };
1045
+ const handleAnimationStart = (event) => {
1046
+ if (event.target === node) {
1047
+ prevAnimationNameRef.current = getAnimationName(stylesRef.current);
1048
+ }
1049
+ };
1050
+ node.addEventListener("animationstart", handleAnimationStart);
1051
+ node.addEventListener("animationcancel", handleAnimationEnd);
1052
+ node.addEventListener("animationend", handleAnimationEnd);
1053
+ return () => {
1054
+ ownerWindow.clearTimeout(timeoutId);
1055
+ node.removeEventListener("animationstart", handleAnimationStart);
1056
+ node.removeEventListener("animationcancel", handleAnimationEnd);
1057
+ node.removeEventListener("animationend", handleAnimationEnd);
1058
+ };
1059
+ } else {
1060
+ send("ANIMATION_END");
1061
+ }
1062
+ }, [node, send]);
1063
+ return {
1064
+ isPresent: ["mounted", "unmountSuspended"].includes(state),
1065
+ ref: React22.useCallback((node2) => {
1066
+ if (node2) stylesRef.current = getComputedStyle(node2);
1067
+ setNode(node2);
1068
+ }, [])
1069
+ };
1070
+ }
1071
+ function getAnimationName(styles) {
1072
+ return styles?.animationName || "none";
1073
+ }
1074
+ function getElementRef2(element) {
1075
+ let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
1076
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
1077
+ if (mayWarn) {
1078
+ return element.ref;
1079
+ }
1080
+ getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
1081
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
1082
+ if (mayWarn) {
1083
+ return element.props.ref;
1084
+ }
1085
+ return element.props.ref || element.ref;
1086
+ }
1087
+
1088
+ // ../../node_modules/@radix-ui/react-focus-guards/dist/index.mjs
1089
+ var React14 = __toESM(require("react"), 1);
1090
+ var count2 = 0;
1091
+ function useFocusGuards() {
1092
+ React14.useEffect(() => {
1093
+ const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
1094
+ document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
1095
+ document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
1096
+ count2++;
1097
+ return () => {
1098
+ if (count2 === 1) {
1099
+ document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
1100
+ }
1101
+ count2--;
1102
+ };
1103
+ }, []);
1104
+ }
1105
+ function createFocusGuard() {
1106
+ const element = document.createElement("span");
1107
+ element.setAttribute("data-radix-focus-guard", "");
1108
+ element.tabIndex = 0;
1109
+ element.style.outline = "none";
1110
+ element.style.opacity = "0";
1111
+ element.style.position = "fixed";
1112
+ element.style.pointerEvents = "none";
1113
+ return element;
1114
+ }
1115
+
1116
+ // ../../node_modules/tslib/tslib.es6.mjs
1117
+ var __assign = function() {
1118
+ __assign = Object.assign || function __assign2(t2) {
1119
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
1120
+ s = arguments[i];
1121
+ for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2)) t2[p2] = s[p2];
1122
+ }
1123
+ return t2;
1124
+ };
1125
+ return __assign.apply(this, arguments);
1126
+ };
1127
+ function __rest(s, e) {
1128
+ var t2 = {};
1129
+ for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2) && e.indexOf(p2) < 0)
1130
+ t2[p2] = s[p2];
1131
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
1132
+ for (var i = 0, p2 = Object.getOwnPropertySymbols(s); i < p2.length; i++) {
1133
+ if (e.indexOf(p2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p2[i]))
1134
+ t2[p2[i]] = s[p2[i]];
1135
+ }
1136
+ return t2;
1137
+ }
1138
+ function __spreadArray(to, from, pack) {
1139
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
1140
+ if (ar || !(i in from)) {
1141
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
1142
+ ar[i] = from[i];
1143
+ }
1144
+ }
1145
+ return to.concat(ar || Array.prototype.slice.call(from));
1146
+ }
1147
+
1148
+ // ../../node_modules/react-remove-scroll/dist/es2015/Combination.js
1149
+ var React21 = __toESM(require("react"));
1150
+
1151
+ // ../../node_modules/react-remove-scroll/dist/es2015/UI.js
1152
+ var React17 = __toESM(require("react"));
1153
+
1154
+ // ../../node_modules/react-remove-scroll-bar/dist/es2015/constants.js
1155
+ var zeroRightClassName = "right-scroll-bar-position";
1156
+ var fullWidthClassName = "width-before-scroll-bar";
1157
+ var noScrollbarsClassName = "with-scroll-bars-hidden";
1158
+ var removedBarSizeVariable = "--removed-body-scroll-bar-size";
1159
+
1160
+ // ../../node_modules/use-callback-ref/dist/es2015/assignRef.js
1161
+ function assignRef(ref, value) {
1162
+ if (typeof ref === "function") {
1163
+ ref(value);
1164
+ } else if (ref) {
1165
+ ref.current = value;
1166
+ }
1167
+ return ref;
1168
+ }
1169
+
1170
+ // ../../node_modules/use-callback-ref/dist/es2015/useRef.js
1171
+ var import_react2 = require("react");
1172
+ function useCallbackRef2(initialValue, callback) {
1173
+ var ref = (0, import_react2.useState)(function() {
1174
+ return {
1175
+ // value
1176
+ value: initialValue,
1177
+ // last callback
1178
+ callback,
1179
+ // "memoized" public interface
1180
+ facade: {
1181
+ get current() {
1182
+ return ref.value;
1183
+ },
1184
+ set current(value) {
1185
+ var last = ref.value;
1186
+ if (last !== value) {
1187
+ ref.value = value;
1188
+ ref.callback(value, last);
1189
+ }
1190
+ }
1191
+ }
1192
+ };
1193
+ })[0];
1194
+ ref.callback = callback;
1195
+ return ref.facade;
1196
+ }
1197
+
1198
+ // ../../node_modules/use-callback-ref/dist/es2015/useMergeRef.js
1199
+ var React15 = __toESM(require("react"));
1200
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React15.useLayoutEffect : React15.useEffect;
1201
+ var currentValues = /* @__PURE__ */ new WeakMap();
1202
+ function useMergeRefs(refs, defaultValue) {
1203
+ var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
1204
+ return refs.forEach(function(ref) {
1205
+ return assignRef(ref, newValue);
1206
+ });
1207
+ });
1208
+ useIsomorphicLayoutEffect(function() {
1209
+ var oldValue = currentValues.get(callbackRef);
1210
+ if (oldValue) {
1211
+ var prevRefs_1 = new Set(oldValue);
1212
+ var nextRefs_1 = new Set(refs);
1213
+ var current_1 = callbackRef.current;
1214
+ prevRefs_1.forEach(function(ref) {
1215
+ if (!nextRefs_1.has(ref)) {
1216
+ assignRef(ref, null);
1217
+ }
1218
+ });
1219
+ nextRefs_1.forEach(function(ref) {
1220
+ if (!prevRefs_1.has(ref)) {
1221
+ assignRef(ref, current_1);
1222
+ }
1223
+ });
1224
+ }
1225
+ currentValues.set(callbackRef, refs);
1226
+ }, [refs]);
1227
+ return callbackRef;
1228
+ }
1229
+
1230
+ // ../../node_modules/use-sidecar/dist/es2015/medium.js
1231
+ function ItoI(a) {
1232
+ return a;
1233
+ }
1234
+ function innerCreateMedium(defaults, middleware) {
1235
+ if (middleware === void 0) {
1236
+ middleware = ItoI;
1237
+ }
1238
+ var buffer = [];
1239
+ var assigned = false;
1240
+ var medium = {
1241
+ read: function() {
1242
+ if (assigned) {
1243
+ throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
1244
+ }
1245
+ if (buffer.length) {
1246
+ return buffer[buffer.length - 1];
1247
+ }
1248
+ return defaults;
1249
+ },
1250
+ useMedium: function(data) {
1251
+ var item = middleware(data, assigned);
1252
+ buffer.push(item);
1253
+ return function() {
1254
+ buffer = buffer.filter(function(x) {
1255
+ return x !== item;
1256
+ });
1257
+ };
1258
+ },
1259
+ assignSyncMedium: function(cb) {
1260
+ assigned = true;
1261
+ while (buffer.length) {
1262
+ var cbs = buffer;
1263
+ buffer = [];
1264
+ cbs.forEach(cb);
1265
+ }
1266
+ buffer = {
1267
+ push: function(x) {
1268
+ return cb(x);
1269
+ },
1270
+ filter: function() {
1271
+ return buffer;
1272
+ }
1273
+ };
1274
+ },
1275
+ assignMedium: function(cb) {
1276
+ assigned = true;
1277
+ var pendingQueue = [];
1278
+ if (buffer.length) {
1279
+ var cbs = buffer;
1280
+ buffer = [];
1281
+ cbs.forEach(cb);
1282
+ pendingQueue = buffer;
1283
+ }
1284
+ var executeQueue = function() {
1285
+ var cbs2 = pendingQueue;
1286
+ pendingQueue = [];
1287
+ cbs2.forEach(cb);
1288
+ };
1289
+ var cycle = function() {
1290
+ return Promise.resolve().then(executeQueue);
1291
+ };
1292
+ cycle();
1293
+ buffer = {
1294
+ push: function(x) {
1295
+ pendingQueue.push(x);
1296
+ cycle();
1297
+ },
1298
+ filter: function(filter) {
1299
+ pendingQueue = pendingQueue.filter(filter);
1300
+ return buffer;
1301
+ }
1302
+ };
1303
+ }
1304
+ };
1305
+ return medium;
1306
+ }
1307
+ function createSidecarMedium(options) {
1308
+ if (options === void 0) {
1309
+ options = {};
1310
+ }
1311
+ var medium = innerCreateMedium(null);
1312
+ medium.options = __assign({ async: true, ssr: false }, options);
1313
+ return medium;
1314
+ }
1315
+
1316
+ // ../../node_modules/use-sidecar/dist/es2015/exports.js
1317
+ var React16 = __toESM(require("react"));
1318
+ var SideCar = function(_a) {
1319
+ var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
1320
+ if (!sideCar) {
1321
+ throw new Error("Sidecar: please provide `sideCar` property to import the right car");
1322
+ }
1323
+ var Target = sideCar.read();
1324
+ if (!Target) {
1325
+ throw new Error("Sidecar medium not found");
1326
+ }
1327
+ return React16.createElement(Target, __assign({}, rest));
1328
+ };
1329
+ SideCar.isSideCarExport = true;
1330
+ function exportSidecar(medium, exported) {
1331
+ medium.useMedium(exported);
1332
+ return SideCar;
1333
+ }
1334
+
1335
+ // ../../node_modules/react-remove-scroll/dist/es2015/medium.js
1336
+ var effectCar = createSidecarMedium();
1337
+
1338
+ // ../../node_modules/react-remove-scroll/dist/es2015/UI.js
1339
+ var nothing = function() {
1340
+ return;
1341
+ };
1342
+ var RemoveScroll = React17.forwardRef(function(props, parentRef) {
1343
+ var ref = React17.useRef(null);
1344
+ var _a = React17.useState({
1345
+ onScrollCapture: nothing,
1346
+ onWheelCapture: nothing,
1347
+ onTouchMoveCapture: nothing
1348
+ }), callbacks = _a[0], setCallbacks = _a[1];
1349
+ var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
1350
+ var SideCar2 = sideCar;
1351
+ var containerRef = useMergeRefs([ref, parentRef]);
1352
+ var containerProps = __assign(__assign({}, rest), callbacks);
1353
+ return React17.createElement(
1354
+ React17.Fragment,
1355
+ null,
1356
+ enabled && React17.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
1357
+ forwardProps ? React17.cloneElement(React17.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React17.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
1358
+ );
1359
+ });
1360
+ RemoveScroll.defaultProps = {
1361
+ enabled: true,
1362
+ removeScrollBar: true,
1363
+ inert: false
1364
+ };
1365
+ RemoveScroll.classNames = {
1366
+ fullWidth: fullWidthClassName,
1367
+ zeroRight: zeroRightClassName
1368
+ };
1369
+
1370
+ // ../../node_modules/react-remove-scroll/dist/es2015/SideEffect.js
1371
+ var React20 = __toESM(require("react"));
1372
+
1373
+ // ../../node_modules/react-remove-scroll-bar/dist/es2015/component.js
1374
+ var React19 = __toESM(require("react"));
1375
+
1376
+ // ../../node_modules/react-style-singleton/dist/es2015/hook.js
1377
+ var React18 = __toESM(require("react"));
1378
+
1379
+ // ../../node_modules/get-nonce/dist/es2015/index.js
1380
+ var currentNonce;
1381
+ var getNonce = function() {
1382
+ if (currentNonce) {
1383
+ return currentNonce;
1384
+ }
1385
+ if (typeof __webpack_nonce__ !== "undefined") {
1386
+ return __webpack_nonce__;
1387
+ }
1388
+ return void 0;
1389
+ };
1390
+
1391
+ // ../../node_modules/react-style-singleton/dist/es2015/singleton.js
1392
+ function makeStyleTag() {
1393
+ if (!document)
1394
+ return null;
1395
+ var tag = document.createElement("style");
1396
+ tag.type = "text/css";
1397
+ var nonce = getNonce();
1398
+ if (nonce) {
1399
+ tag.setAttribute("nonce", nonce);
1400
+ }
1401
+ return tag;
1402
+ }
1403
+ function injectStyles(tag, css) {
1404
+ if (tag.styleSheet) {
1405
+ tag.styleSheet.cssText = css;
1406
+ } else {
1407
+ tag.appendChild(document.createTextNode(css));
1408
+ }
1409
+ }
1410
+ function insertStyleTag(tag) {
1411
+ var head = document.head || document.getElementsByTagName("head")[0];
1412
+ head.appendChild(tag);
1413
+ }
1414
+ var stylesheetSingleton = function() {
1415
+ var counter = 0;
1416
+ var stylesheet = null;
1417
+ return {
1418
+ add: function(style) {
1419
+ if (counter == 0) {
1420
+ if (stylesheet = makeStyleTag()) {
1421
+ injectStyles(stylesheet, style);
1422
+ insertStyleTag(stylesheet);
1423
+ }
1424
+ }
1425
+ counter++;
1426
+ },
1427
+ remove: function() {
1428
+ counter--;
1429
+ if (!counter && stylesheet) {
1430
+ stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
1431
+ stylesheet = null;
1432
+ }
1433
+ }
1434
+ };
1435
+ };
1436
+
1437
+ // ../../node_modules/react-style-singleton/dist/es2015/hook.js
1438
+ var styleHookSingleton = function() {
1439
+ var sheet = stylesheetSingleton();
1440
+ return function(styles, isDynamic) {
1441
+ React18.useEffect(function() {
1442
+ sheet.add(styles);
1443
+ return function() {
1444
+ sheet.remove();
1445
+ };
1446
+ }, [styles && isDynamic]);
1447
+ };
1448
+ };
1449
+
1450
+ // ../../node_modules/react-style-singleton/dist/es2015/component.js
1451
+ var styleSingleton = function() {
1452
+ var useStyle = styleHookSingleton();
1453
+ var Sheet = function(_a) {
1454
+ var styles = _a.styles, dynamic = _a.dynamic;
1455
+ useStyle(styles, dynamic);
1456
+ return null;
1457
+ };
1458
+ return Sheet;
1459
+ };
1460
+
1461
+ // ../../node_modules/react-remove-scroll-bar/dist/es2015/utils.js
1462
+ var zeroGap = {
1463
+ left: 0,
1464
+ top: 0,
1465
+ right: 0,
1466
+ gap: 0
1467
+ };
1468
+ var parse = function(x) {
1469
+ return parseInt(x || "", 10) || 0;
1470
+ };
1471
+ var getOffset = function(gapMode) {
1472
+ var cs = window.getComputedStyle(document.body);
1473
+ var left = cs[gapMode === "padding" ? "paddingLeft" : "marginLeft"];
1474
+ var top = cs[gapMode === "padding" ? "paddingTop" : "marginTop"];
1475
+ var right = cs[gapMode === "padding" ? "paddingRight" : "marginRight"];
1476
+ return [parse(left), parse(top), parse(right)];
1477
+ };
1478
+ var getGapWidth = function(gapMode) {
1479
+ if (gapMode === void 0) {
1480
+ gapMode = "margin";
1481
+ }
1482
+ if (typeof window === "undefined") {
1483
+ return zeroGap;
1484
+ }
1485
+ var offsets = getOffset(gapMode);
1486
+ var documentWidth = document.documentElement.clientWidth;
1487
+ var windowWidth = window.innerWidth;
1488
+ return {
1489
+ left: offsets[0],
1490
+ top: offsets[1],
1491
+ right: offsets[2],
1492
+ gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0])
1493
+ };
1494
+ };
1495
+
1496
+ // ../../node_modules/react-remove-scroll-bar/dist/es2015/component.js
1497
+ var Style = styleSingleton();
1498
+ var lockAttribute = "data-scroll-locked";
1499
+ var getStyles = function(_a, allowRelative, gapMode, important) {
1500
+ var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;
1501
+ if (gapMode === void 0) {
1502
+ gapMode = "margin";
1503
+ }
1504
+ return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body[").concat(lockAttribute, "] {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([
1505
+ allowRelative && "position: relative ".concat(important, ";"),
1506
+ gapMode === "margin" && "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "),
1507
+ gapMode === "padding" && "padding-right: ".concat(gap, "px ").concat(important, ";")
1508
+ ].filter(Boolean).join(""), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body[").concat(lockAttribute, "] {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n");
1509
+ };
1510
+ var getCurrentUseCounter = function() {
1511
+ var counter = parseInt(document.body.getAttribute(lockAttribute) || "0", 10);
1512
+ return isFinite(counter) ? counter : 0;
1513
+ };
1514
+ var useLockAttribute = function() {
1515
+ React19.useEffect(function() {
1516
+ document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
1517
+ return function() {
1518
+ var newCounter = getCurrentUseCounter() - 1;
1519
+ if (newCounter <= 0) {
1520
+ document.body.removeAttribute(lockAttribute);
1521
+ } else {
1522
+ document.body.setAttribute(lockAttribute, newCounter.toString());
1523
+ }
1524
+ };
1525
+ }, []);
1526
+ };
1527
+ var RemoveScrollBar = function(_a) {
1528
+ var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
1529
+ useLockAttribute();
1530
+ var gap = React19.useMemo(function() {
1531
+ return getGapWidth(gapMode);
1532
+ }, [gapMode]);
1533
+ return React19.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
1534
+ };
1535
+
1536
+ // ../../node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
1537
+ var passiveSupported = false;
1538
+ if (typeof window !== "undefined") {
1539
+ try {
1540
+ options = Object.defineProperty({}, "passive", {
1541
+ get: function() {
1542
+ passiveSupported = true;
1543
+ return true;
1544
+ }
1545
+ });
1546
+ window.addEventListener("test", options, options);
1547
+ window.removeEventListener("test", options, options);
1548
+ } catch (err) {
1549
+ passiveSupported = false;
1550
+ }
1551
+ }
1552
+ var options;
1553
+ var nonPassive = passiveSupported ? { passive: false } : false;
1554
+
1555
+ // ../../node_modules/react-remove-scroll/dist/es2015/handleScroll.js
1556
+ var alwaysContainsScroll = function(node) {
1557
+ return node.tagName === "TEXTAREA";
1558
+ };
1559
+ var elementCanBeScrolled = function(node, overflow) {
1560
+ if (!(node instanceof Element)) {
1561
+ return false;
1562
+ }
1563
+ var styles = window.getComputedStyle(node);
1564
+ return (
1565
+ // not-not-scrollable
1566
+ styles[overflow] !== "hidden" && // contains scroll inside self
1567
+ !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === "visible")
1568
+ );
1569
+ };
1570
+ var elementCouldBeVScrolled = function(node) {
1571
+ return elementCanBeScrolled(node, "overflowY");
1572
+ };
1573
+ var elementCouldBeHScrolled = function(node) {
1574
+ return elementCanBeScrolled(node, "overflowX");
1575
+ };
1576
+ var locationCouldBeScrolled = function(axis, node) {
1577
+ var ownerDocument = node.ownerDocument;
1578
+ var current = node;
1579
+ do {
1580
+ if (typeof ShadowRoot !== "undefined" && current instanceof ShadowRoot) {
1581
+ current = current.host;
1582
+ }
1583
+ var isScrollable = elementCouldBeScrolled(axis, current);
1584
+ if (isScrollable) {
1585
+ var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];
1586
+ if (scrollHeight > clientHeight) {
1587
+ return true;
1588
+ }
1589
+ }
1590
+ current = current.parentNode;
1591
+ } while (current && current !== ownerDocument.body);
1592
+ return false;
1593
+ };
1594
+ var getVScrollVariables = function(_a) {
1595
+ var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
1596
+ return [
1597
+ scrollTop,
1598
+ scrollHeight,
1599
+ clientHeight
1600
+ ];
1601
+ };
1602
+ var getHScrollVariables = function(_a) {
1603
+ var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
1604
+ return [
1605
+ scrollLeft,
1606
+ scrollWidth,
1607
+ clientWidth
1608
+ ];
1609
+ };
1610
+ var elementCouldBeScrolled = function(axis, node) {
1611
+ return axis === "v" ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
1612
+ };
1613
+ var getScrollVariables = function(axis, node) {
1614
+ return axis === "v" ? getVScrollVariables(node) : getHScrollVariables(node);
1615
+ };
1616
+ var getDirectionFactor = function(axis, direction) {
1617
+ return axis === "h" && direction === "rtl" ? -1 : 1;
1618
+ };
1619
+ var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
1620
+ var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
1621
+ var delta = directionFactor * sourceDelta;
1622
+ var target = event.target;
1623
+ var targetInLock = endTarget.contains(target);
1624
+ var shouldCancelScroll = false;
1625
+ var isDeltaPositive = delta > 0;
1626
+ var availableScroll = 0;
1627
+ var availableScrollTop = 0;
1628
+ do {
1629
+ var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];
1630
+ var elementScroll = scroll_1 - capacity - directionFactor * position;
1631
+ if (position || elementScroll) {
1632
+ if (elementCouldBeScrolled(axis, target)) {
1633
+ availableScroll += elementScroll;
1634
+ availableScrollTop += position;
1635
+ }
1636
+ }
1637
+ if (target instanceof ShadowRoot) {
1638
+ target = target.host;
1639
+ } else {
1640
+ target = target.parentNode;
1641
+ }
1642
+ } while (
1643
+ // portaled content
1644
+ !targetInLock && target !== document.body || // self content
1645
+ targetInLock && (endTarget.contains(target) || endTarget === target)
1646
+ );
1647
+ if (isDeltaPositive && (noOverscroll && Math.abs(availableScroll) < 1 || !noOverscroll && delta > availableScroll)) {
1648
+ shouldCancelScroll = true;
1649
+ } else if (!isDeltaPositive && (noOverscroll && Math.abs(availableScrollTop) < 1 || !noOverscroll && -delta > availableScrollTop)) {
1650
+ shouldCancelScroll = true;
1651
+ }
1652
+ return shouldCancelScroll;
1653
+ };
1654
+
1655
+ // ../../node_modules/react-remove-scroll/dist/es2015/SideEffect.js
1656
+ var getTouchXY = function(event) {
1657
+ return "changedTouches" in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
1658
+ };
1659
+ var getDeltaXY = function(event) {
1660
+ return [event.deltaX, event.deltaY];
1661
+ };
1662
+ var extractRef = function(ref) {
1663
+ return ref && "current" in ref ? ref.current : ref;
1664
+ };
1665
+ var deltaCompare = function(x, y) {
1666
+ return x[0] === y[0] && x[1] === y[1];
1667
+ };
1668
+ var generateStyle = function(id) {
1669
+ return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n");
1670
+ };
1671
+ var idCounter = 0;
1672
+ var lockStack = [];
1673
+ function RemoveScrollSideCar(props) {
1674
+ var shouldPreventQueue = React20.useRef([]);
1675
+ var touchStartRef = React20.useRef([0, 0]);
1676
+ var activeAxis = React20.useRef();
1677
+ var id = React20.useState(idCounter++)[0];
1678
+ var Style2 = React20.useState(styleSingleton)[0];
1679
+ var lastProps = React20.useRef(props);
1680
+ React20.useEffect(function() {
1681
+ lastProps.current = props;
1682
+ }, [props]);
1683
+ React20.useEffect(function() {
1684
+ if (props.inert) {
1685
+ document.body.classList.add("block-interactivity-".concat(id));
1686
+ var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
1687
+ allow_1.forEach(function(el) {
1688
+ return el.classList.add("allow-interactivity-".concat(id));
1689
+ });
1690
+ return function() {
1691
+ document.body.classList.remove("block-interactivity-".concat(id));
1692
+ allow_1.forEach(function(el) {
1693
+ return el.classList.remove("allow-interactivity-".concat(id));
1694
+ });
1695
+ };
1696
+ }
1697
+ return;
1698
+ }, [props.inert, props.lockRef.current, props.shards]);
1699
+ var shouldCancelEvent = React20.useCallback(function(event, parent) {
1700
+ if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) {
1701
+ return !lastProps.current.allowPinchZoom;
1702
+ }
1703
+ var touch = getTouchXY(event);
1704
+ var touchStart = touchStartRef.current;
1705
+ var deltaX = "deltaX" in event ? event.deltaX : touchStart[0] - touch[0];
1706
+ var deltaY = "deltaY" in event ? event.deltaY : touchStart[1] - touch[1];
1707
+ var currentAxis;
1708
+ var target = event.target;
1709
+ var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? "h" : "v";
1710
+ if ("touches" in event && moveDirection === "h" && target.type === "range") {
1711
+ return false;
1712
+ }
1713
+ var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
1714
+ if (!canBeScrolledInMainDirection) {
1715
+ return true;
1716
+ }
1717
+ if (canBeScrolledInMainDirection) {
1718
+ currentAxis = moveDirection;
1719
+ } else {
1720
+ currentAxis = moveDirection === "v" ? "h" : "v";
1721
+ canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
1722
+ }
1723
+ if (!canBeScrolledInMainDirection) {
1724
+ return false;
1725
+ }
1726
+ if (!activeAxis.current && "changedTouches" in event && (deltaX || deltaY)) {
1727
+ activeAxis.current = currentAxis;
1728
+ }
1729
+ if (!currentAxis) {
1730
+ return true;
1731
+ }
1732
+ var cancelingAxis = activeAxis.current || currentAxis;
1733
+ return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
1734
+ }, []);
1735
+ var shouldPrevent = React20.useCallback(function(_event) {
1736
+ var event = _event;
1737
+ if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
1738
+ return;
1739
+ }
1740
+ var delta = "deltaY" in event ? getDeltaXY(event) : getTouchXY(event);
1741
+ var sourceEvent = shouldPreventQueue.current.filter(function(e) {
1742
+ return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta);
1743
+ })[0];
1744
+ if (sourceEvent && sourceEvent.should) {
1745
+ if (event.cancelable) {
1746
+ event.preventDefault();
1747
+ }
1748
+ return;
1749
+ }
1750
+ if (!sourceEvent) {
1751
+ var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function(node) {
1752
+ return node.contains(event.target);
1753
+ });
1754
+ var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
1755
+ if (shouldStop) {
1756
+ if (event.cancelable) {
1757
+ event.preventDefault();
1758
+ }
1759
+ }
1760
+ }
1761
+ }, []);
1762
+ var shouldCancel = React20.useCallback(function(name, delta, target, should) {
1763
+ var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
1764
+ shouldPreventQueue.current.push(event);
1765
+ setTimeout(function() {
1766
+ shouldPreventQueue.current = shouldPreventQueue.current.filter(function(e) {
1767
+ return e !== event;
1768
+ });
1769
+ }, 1);
1770
+ }, []);
1771
+ var scrollTouchStart = React20.useCallback(function(event) {
1772
+ touchStartRef.current = getTouchXY(event);
1773
+ activeAxis.current = void 0;
1774
+ }, []);
1775
+ var scrollWheel = React20.useCallback(function(event) {
1776
+ shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
1777
+ }, []);
1778
+ var scrollTouchMove = React20.useCallback(function(event) {
1779
+ shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
1780
+ }, []);
1781
+ React20.useEffect(function() {
1782
+ lockStack.push(Style2);
1783
+ props.setCallbacks({
1784
+ onScrollCapture: scrollWheel,
1785
+ onWheelCapture: scrollWheel,
1786
+ onTouchMoveCapture: scrollTouchMove
1787
+ });
1788
+ document.addEventListener("wheel", shouldPrevent, nonPassive);
1789
+ document.addEventListener("touchmove", shouldPrevent, nonPassive);
1790
+ document.addEventListener("touchstart", scrollTouchStart, nonPassive);
1791
+ return function() {
1792
+ lockStack = lockStack.filter(function(inst) {
1793
+ return inst !== Style2;
1794
+ });
1795
+ document.removeEventListener("wheel", shouldPrevent, nonPassive);
1796
+ document.removeEventListener("touchmove", shouldPrevent, nonPassive);
1797
+ document.removeEventListener("touchstart", scrollTouchStart, nonPassive);
1798
+ };
1799
+ }, []);
1800
+ var removeScrollBar = props.removeScrollBar, inert = props.inert;
1801
+ return React20.createElement(
1802
+ React20.Fragment,
1803
+ null,
1804
+ inert ? React20.createElement(Style2, { styles: generateStyle(id) }) : null,
1805
+ removeScrollBar ? React20.createElement(RemoveScrollBar, { gapMode: props.gapMode }) : null
1806
+ );
1807
+ }
1808
+ function getOutermostShadowParent(node) {
1809
+ var shadowParent = null;
1810
+ while (node !== null) {
1811
+ if (node instanceof ShadowRoot) {
1812
+ shadowParent = node.host;
1813
+ node = node.host;
1814
+ }
1815
+ node = node.parentNode;
1816
+ }
1817
+ return shadowParent;
1818
+ }
1819
+
1820
+ // ../../node_modules/react-remove-scroll/dist/es2015/sidecar.js
1821
+ var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
1822
+
1823
+ // ../../node_modules/react-remove-scroll/dist/es2015/Combination.js
1824
+ var ReactRemoveScroll = React21.forwardRef(function(props, ref) {
1825
+ return React21.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
1826
+ });
1827
+ ReactRemoveScroll.classNames = RemoveScroll.classNames;
1828
+ var Combination_default = ReactRemoveScroll;
1829
+
1830
+ // ../../node_modules/aria-hidden/dist/es2015/index.js
1831
+ var getDefaultParent = function(originalTarget) {
1832
+ if (typeof document === "undefined") {
1833
+ return null;
1834
+ }
1835
+ var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
1836
+ return sampleTarget.ownerDocument.body;
1837
+ };
1838
+ var counterMap = /* @__PURE__ */ new WeakMap();
1839
+ var uncontrolledNodes = /* @__PURE__ */ new WeakMap();
1840
+ var markerMap = {};
1841
+ var lockCount = 0;
1842
+ var unwrapHost = function(node) {
1843
+ return node && (node.host || unwrapHost(node.parentNode));
1844
+ };
1845
+ var correctTargets = function(parent, targets) {
1846
+ return targets.map(function(target) {
1847
+ if (parent.contains(target)) {
1848
+ return target;
1849
+ }
1850
+ var correctedTarget = unwrapHost(target);
1851
+ if (correctedTarget && parent.contains(correctedTarget)) {
1852
+ return correctedTarget;
1853
+ }
1854
+ console.error("aria-hidden", target, "in not contained inside", parent, ". Doing nothing");
1855
+ return null;
1856
+ }).filter(function(x) {
1857
+ return Boolean(x);
1858
+ });
1859
+ };
1860
+ var applyAttributeToOthers = function(originalTarget, parentNode, markerName, controlAttribute) {
1861
+ var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
1862
+ if (!markerMap[markerName]) {
1863
+ markerMap[markerName] = /* @__PURE__ */ new WeakMap();
1864
+ }
1865
+ var markerCounter = markerMap[markerName];
1866
+ var hiddenNodes = [];
1867
+ var elementsToKeep = /* @__PURE__ */ new Set();
1868
+ var elementsToStop = new Set(targets);
1869
+ var keep = function(el) {
1870
+ if (!el || elementsToKeep.has(el)) {
1871
+ return;
1872
+ }
1873
+ elementsToKeep.add(el);
1874
+ keep(el.parentNode);
1875
+ };
1876
+ targets.forEach(keep);
1877
+ var deep = function(parent) {
1878
+ if (!parent || elementsToStop.has(parent)) {
1879
+ return;
1880
+ }
1881
+ Array.prototype.forEach.call(parent.children, function(node) {
1882
+ if (elementsToKeep.has(node)) {
1883
+ deep(node);
1884
+ } else {
1885
+ try {
1886
+ var attr = node.getAttribute(controlAttribute);
1887
+ var alreadyHidden = attr !== null && attr !== "false";
1888
+ var counterValue = (counterMap.get(node) || 0) + 1;
1889
+ var markerValue = (markerCounter.get(node) || 0) + 1;
1890
+ counterMap.set(node, counterValue);
1891
+ markerCounter.set(node, markerValue);
1892
+ hiddenNodes.push(node);
1893
+ if (counterValue === 1 && alreadyHidden) {
1894
+ uncontrolledNodes.set(node, true);
1895
+ }
1896
+ if (markerValue === 1) {
1897
+ node.setAttribute(markerName, "true");
1898
+ }
1899
+ if (!alreadyHidden) {
1900
+ node.setAttribute(controlAttribute, "true");
1901
+ }
1902
+ } catch (e) {
1903
+ console.error("aria-hidden: cannot operate on ", node, e);
1904
+ }
1905
+ }
1906
+ });
1907
+ };
1908
+ deep(parentNode);
1909
+ elementsToKeep.clear();
1910
+ lockCount++;
1911
+ return function() {
1912
+ hiddenNodes.forEach(function(node) {
1913
+ var counterValue = counterMap.get(node) - 1;
1914
+ var markerValue = markerCounter.get(node) - 1;
1915
+ counterMap.set(node, counterValue);
1916
+ markerCounter.set(node, markerValue);
1917
+ if (!counterValue) {
1918
+ if (!uncontrolledNodes.has(node)) {
1919
+ node.removeAttribute(controlAttribute);
1920
+ }
1921
+ uncontrolledNodes.delete(node);
1922
+ }
1923
+ if (!markerValue) {
1924
+ node.removeAttribute(markerName);
1925
+ }
1926
+ });
1927
+ lockCount--;
1928
+ if (!lockCount) {
1929
+ counterMap = /* @__PURE__ */ new WeakMap();
1930
+ counterMap = /* @__PURE__ */ new WeakMap();
1931
+ uncontrolledNodes = /* @__PURE__ */ new WeakMap();
1932
+ markerMap = {};
1933
+ }
1934
+ };
1935
+ };
1936
+ var hideOthers = function(originalTarget, parentNode, markerName) {
1937
+ if (markerName === void 0) {
1938
+ markerName = "data-aria-hidden";
1939
+ }
1940
+ var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
1941
+ var activeParentNode = parentNode || getDefaultParent(originalTarget);
1942
+ if (!activeParentNode) {
1943
+ return function() {
1944
+ return null;
1945
+ };
1946
+ }
1947
+ targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll("[aria-live]")));
1948
+ return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
1949
+ };
1950
+
1951
+ // ../../node_modules/@radix-ui/react-dialog/dist/index.mjs
1952
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1953
+ var DIALOG_NAME = "Dialog";
1954
+ var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
1955
+ var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
1956
+ var Dialog = (props) => {
1957
+ const {
1958
+ __scopeDialog,
1959
+ children,
1960
+ open: openProp,
1961
+ defaultOpen,
1962
+ onOpenChange,
1963
+ modal = true
1964
+ } = props;
1965
+ const triggerRef = React23.useRef(null);
1966
+ const contentRef = React23.useRef(null);
1967
+ const [open = false, setOpen] = useControllableState({
1968
+ prop: openProp,
1969
+ defaultProp: defaultOpen,
1970
+ onChange: onOpenChange
1971
+ });
1972
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1973
+ DialogProvider,
1974
+ {
1975
+ scope: __scopeDialog,
1976
+ triggerRef,
1977
+ contentRef,
1978
+ contentId: useId(),
1979
+ titleId: useId(),
1980
+ descriptionId: useId(),
1981
+ open,
1982
+ onOpenChange: setOpen,
1983
+ onOpenToggle: React23.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
1984
+ modal,
1985
+ children
1986
+ }
1987
+ );
1988
+ };
1989
+ Dialog.displayName = DIALOG_NAME;
1990
+ var TRIGGER_NAME = "DialogTrigger";
1991
+ var DialogTrigger = React23.forwardRef(
1992
+ (props, forwardedRef) => {
1993
+ const { __scopeDialog, ...triggerProps } = props;
1994
+ const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
1995
+ const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
1996
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1997
+ Primitive.button,
1998
+ {
1999
+ type: "button",
2000
+ "aria-haspopup": "dialog",
2001
+ "aria-expanded": context.open,
2002
+ "aria-controls": context.contentId,
2003
+ "data-state": getState(context.open),
2004
+ ...triggerProps,
2005
+ ref: composedTriggerRef,
2006
+ onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
2007
+ }
2008
+ );
2009
+ }
2010
+ );
2011
+ DialogTrigger.displayName = TRIGGER_NAME;
2012
+ var PORTAL_NAME2 = "DialogPortal";
2013
+ var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME2, {
2014
+ forceMount: void 0
2015
+ });
2016
+ var DialogPortal = (props) => {
2017
+ const { __scopeDialog, forceMount, children, container } = props;
2018
+ const context = useDialogContext(PORTAL_NAME2, __scopeDialog);
2019
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React23.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Portal, { asChild: true, container, children: child }) })) });
2020
+ };
2021
+ DialogPortal.displayName = PORTAL_NAME2;
2022
+ var OVERLAY_NAME = "DialogOverlay";
2023
+ var DialogOverlay = React23.forwardRef(
2024
+ (props, forwardedRef) => {
2025
+ const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
2026
+ const { forceMount = portalContext.forceMount, ...overlayProps } = props;
2027
+ const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
2028
+ return context.modal ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
2029
+ }
2030
+ );
2031
+ DialogOverlay.displayName = OVERLAY_NAME;
2032
+ var Slot = createSlot("DialogOverlay.RemoveScroll");
2033
+ var DialogOverlayImpl = React23.forwardRef(
2034
+ (props, forwardedRef) => {
2035
+ const { __scopeDialog, ...overlayProps } = props;
2036
+ const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
2037
+ return (
2038
+ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
2039
+ // ie. when `Overlay` and `Content` are siblings
2040
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Combination_default, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2041
+ Primitive.div,
2042
+ {
2043
+ "data-state": getState(context.open),
2044
+ ...overlayProps,
2045
+ ref: forwardedRef,
2046
+ style: { pointerEvents: "auto", ...overlayProps.style }
2047
+ }
2048
+ ) })
2049
+ );
2050
+ }
2051
+ );
2052
+ var CONTENT_NAME = "DialogContent";
2053
+ var DialogContent = React23.forwardRef(
2054
+ (props, forwardedRef) => {
2055
+ const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
2056
+ const { forceMount = portalContext.forceMount, ...contentProps } = props;
2057
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
2058
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
2059
+ }
2060
+ );
2061
+ DialogContent.displayName = CONTENT_NAME;
2062
+ var DialogContentModal = React23.forwardRef(
2063
+ (props, forwardedRef) => {
2064
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
2065
+ const contentRef = React23.useRef(null);
2066
+ const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
2067
+ React23.useEffect(() => {
2068
+ const content = contentRef.current;
2069
+ if (content) return hideOthers(content);
2070
+ }, []);
2071
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2072
+ DialogContentImpl,
2073
+ {
2074
+ ...props,
2075
+ ref: composedRefs,
2076
+ trapFocus: context.open,
2077
+ disableOutsidePointerEvents: true,
2078
+ onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
2079
+ event.preventDefault();
2080
+ context.triggerRef.current?.focus();
2081
+ }),
2082
+ onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
2083
+ const originalEvent = event.detail.originalEvent;
2084
+ const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
2085
+ const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
2086
+ if (isRightClick) event.preventDefault();
2087
+ }),
2088
+ onFocusOutside: composeEventHandlers(
2089
+ props.onFocusOutside,
2090
+ (event) => event.preventDefault()
2091
+ )
2092
+ }
2093
+ );
2094
+ }
2095
+ );
2096
+ var DialogContentNonModal = React23.forwardRef(
2097
+ (props, forwardedRef) => {
2098
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
2099
+ const hasInteractedOutsideRef = React23.useRef(false);
2100
+ const hasPointerDownOutsideRef = React23.useRef(false);
2101
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2102
+ DialogContentImpl,
2103
+ {
2104
+ ...props,
2105
+ ref: forwardedRef,
2106
+ trapFocus: false,
2107
+ disableOutsidePointerEvents: false,
2108
+ onCloseAutoFocus: (event) => {
2109
+ props.onCloseAutoFocus?.(event);
2110
+ if (!event.defaultPrevented) {
2111
+ if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
2112
+ event.preventDefault();
2113
+ }
2114
+ hasInteractedOutsideRef.current = false;
2115
+ hasPointerDownOutsideRef.current = false;
2116
+ },
2117
+ onInteractOutside: (event) => {
2118
+ props.onInteractOutside?.(event);
2119
+ if (!event.defaultPrevented) {
2120
+ hasInteractedOutsideRef.current = true;
2121
+ if (event.detail.originalEvent.type === "pointerdown") {
2122
+ hasPointerDownOutsideRef.current = true;
2123
+ }
2124
+ }
2125
+ const target = event.target;
2126
+ const targetIsTrigger = context.triggerRef.current?.contains(target);
2127
+ if (targetIsTrigger) event.preventDefault();
2128
+ if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
2129
+ event.preventDefault();
2130
+ }
2131
+ }
2132
+ }
2133
+ );
2134
+ }
2135
+ );
2136
+ var DialogContentImpl = React23.forwardRef(
2137
+ (props, forwardedRef) => {
2138
+ const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
2139
+ const context = useDialogContext(CONTENT_NAME, __scopeDialog);
2140
+ const contentRef = React23.useRef(null);
2141
+ const composedRefs = useComposedRefs(forwardedRef, contentRef);
2142
+ useFocusGuards();
2143
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
2144
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2145
+ FocusScope,
2146
+ {
2147
+ asChild: true,
2148
+ loop: true,
2149
+ trapped: trapFocus,
2150
+ onMountAutoFocus: onOpenAutoFocus,
2151
+ onUnmountAutoFocus: onCloseAutoFocus,
2152
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2153
+ DismissableLayer,
2154
+ {
2155
+ role: "dialog",
2156
+ id: context.contentId,
2157
+ "aria-describedby": context.descriptionId,
2158
+ "aria-labelledby": context.titleId,
2159
+ "data-state": getState(context.open),
2160
+ ...contentProps,
2161
+ ref: composedRefs,
2162
+ onDismiss: () => context.onOpenChange(false)
2163
+ }
2164
+ )
2165
+ }
2166
+ ),
2167
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
2168
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TitleWarning, { titleId: context.titleId }),
2169
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
2170
+ ] })
2171
+ ] });
2172
+ }
2173
+ );
2174
+ var TITLE_NAME = "DialogTitle";
2175
+ var DialogTitle = React23.forwardRef(
2176
+ (props, forwardedRef) => {
2177
+ const { __scopeDialog, ...titleProps } = props;
2178
+ const context = useDialogContext(TITLE_NAME, __scopeDialog);
2179
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
2180
+ }
2181
+ );
2182
+ DialogTitle.displayName = TITLE_NAME;
2183
+ var DESCRIPTION_NAME = "DialogDescription";
2184
+ var DialogDescription = React23.forwardRef(
2185
+ (props, forwardedRef) => {
2186
+ const { __scopeDialog, ...descriptionProps } = props;
2187
+ const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
2188
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
2189
+ }
2190
+ );
2191
+ DialogDescription.displayName = DESCRIPTION_NAME;
2192
+ var CLOSE_NAME = "DialogClose";
2193
+ var DialogClose = React23.forwardRef(
2194
+ (props, forwardedRef) => {
2195
+ const { __scopeDialog, ...closeProps } = props;
2196
+ const context = useDialogContext(CLOSE_NAME, __scopeDialog);
2197
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2198
+ Primitive.button,
2199
+ {
2200
+ type: "button",
2201
+ ...closeProps,
2202
+ ref: forwardedRef,
2203
+ onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
2204
+ }
2205
+ );
2206
+ }
2207
+ );
2208
+ DialogClose.displayName = CLOSE_NAME;
2209
+ function getState(open) {
2210
+ return open ? "open" : "closed";
2211
+ }
2212
+ var TITLE_WARNING_NAME = "DialogTitleWarning";
2213
+ var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
2214
+ contentName: CONTENT_NAME,
2215
+ titleName: TITLE_NAME,
2216
+ docsSlug: "dialog"
2217
+ });
2218
+ var TitleWarning = ({ titleId }) => {
2219
+ const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
2220
+ const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
2221
+
2222
+ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
2223
+
2224
+ For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
2225
+ React23.useEffect(() => {
2226
+ if (titleId) {
2227
+ const hasTitle = document.getElementById(titleId);
2228
+ if (!hasTitle) console.error(MESSAGE);
2229
+ }
2230
+ }, [MESSAGE, titleId]);
2231
+ return null;
2232
+ };
2233
+ var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
2234
+ var DescriptionWarning = ({ contentRef, descriptionId }) => {
2235
+ const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
2236
+ const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
2237
+ React23.useEffect(() => {
2238
+ const describedById = contentRef.current?.getAttribute("aria-describedby");
2239
+ if (descriptionId && describedById) {
2240
+ const hasDescription = document.getElementById(descriptionId);
2241
+ if (!hasDescription) console.warn(MESSAGE);
2242
+ }
2243
+ }, [MESSAGE, contentRef, descriptionId]);
2244
+ return null;
2245
+ };
2246
+ var Root = Dialog;
2247
+ var Portal2 = DialogPortal;
2248
+ var Overlay = DialogOverlay;
2249
+ var Content = DialogContent;
2250
+
2251
+ // ../../node_modules/cmdk/dist/index.mjs
2252
+ var t = __toESM(require("react"), 1);
2253
+ var N = '[cmdk-group=""]';
2254
+ var Y2 = '[cmdk-group-items=""]';
2255
+ var be = '[cmdk-group-heading=""]';
2256
+ var le = '[cmdk-item=""]';
2257
+ var ce = `${le}:not([aria-disabled="true"])`;
2258
+ var Z = "cmdk-item-select";
2259
+ var T = "data-value";
2260
+ var Re = (r, o, n) => W(r, o, n);
2261
+ var ue = t.createContext(void 0);
2262
+ var K2 = () => t.useContext(ue);
2263
+ var de = t.createContext(void 0);
2264
+ var ee = () => t.useContext(de);
2265
+ var fe = t.createContext(void 0);
2266
+ var me = t.forwardRef((r, o) => {
2267
+ let n = L(() => {
2268
+ var e, a;
2269
+ return { search: "", value: (a = (e = r.value) != null ? e : r.defaultValue) != null ? a : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
2270
+ }), u2 = L(() => /* @__PURE__ */ new Set()), c = L(() => /* @__PURE__ */ new Map()), d = L(() => /* @__PURE__ */ new Map()), f = L(() => /* @__PURE__ */ new Set()), p2 = pe(r), { label: b, children: m2, value: R, onValueChange: x, filter: C, shouldFilter: S, loop: A, disablePointerSelection: ge = false, vimBindings: j = true, ...O } = r, $2 = useId(), q = useId(), _ = useId(), I = t.useRef(null), v = ke();
2271
+ k2(() => {
2272
+ if (R !== void 0) {
2273
+ let e = R.trim();
2274
+ n.current.value = e, E.emit();
2275
+ }
2276
+ }, [R]), k2(() => {
2277
+ v(6, ne);
2278
+ }, []);
2279
+ let E = t.useMemo(() => ({ subscribe: (e) => (f.current.add(e), () => f.current.delete(e)), snapshot: () => n.current, setState: (e, a, s) => {
2280
+ var i, l, g, y;
2281
+ if (!Object.is(n.current[e], a)) {
2282
+ if (n.current[e] = a, e === "search") J2(), z(), v(1, W2);
2283
+ else if (e === "value") {
2284
+ if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
2285
+ let h = document.getElementById(_);
2286
+ h ? h.focus() : (i = document.getElementById($2)) == null || i.focus();
2287
+ }
2288
+ if (v(7, () => {
2289
+ var h;
2290
+ n.current.selectedItemId = (h = M()) == null ? void 0 : h.id, E.emit();
2291
+ }), s || v(5, ne), ((l = p2.current) == null ? void 0 : l.value) !== void 0) {
2292
+ let h = a != null ? a : "";
2293
+ (y = (g = p2.current).onValueChange) == null || y.call(g, h);
2294
+ return;
2295
+ }
2296
+ }
2297
+ E.emit();
2298
+ }
2299
+ }, emit: () => {
2300
+ f.current.forEach((e) => e());
2301
+ } }), []), U2 = t.useMemo(() => ({ value: (e, a, s) => {
2302
+ var i;
2303
+ a !== ((i = d.current.get(e)) == null ? void 0 : i.value) && (d.current.set(e, { value: a, keywords: s }), n.current.filtered.items.set(e, te(a, s)), v(2, () => {
2304
+ z(), E.emit();
2305
+ }));
2306
+ }, item: (e, a) => (u2.current.add(e), a && (c.current.has(a) ? c.current.get(a).add(e) : c.current.set(a, /* @__PURE__ */ new Set([e]))), v(3, () => {
2307
+ J2(), z(), n.current.value || W2(), E.emit();
2308
+ }), () => {
2309
+ d.current.delete(e), u2.current.delete(e), n.current.filtered.items.delete(e);
2310
+ let s = M();
2311
+ v(4, () => {
2312
+ J2(), (s == null ? void 0 : s.getAttribute("id")) === e && W2(), E.emit();
2313
+ });
2314
+ }), group: (e) => (c.current.has(e) || c.current.set(e, /* @__PURE__ */ new Set()), () => {
2315
+ d.current.delete(e), c.current.delete(e);
2316
+ }), filter: () => p2.current.shouldFilter, label: b || r["aria-label"], getDisablePointerSelection: () => p2.current.disablePointerSelection, listId: $2, inputId: _, labelId: q, listInnerRef: I }), []);
2317
+ function te(e, a) {
2318
+ var i, l;
2319
+ let s = (l = (i = p2.current) == null ? void 0 : i.filter) != null ? l : Re;
2320
+ return e ? s(e, n.current.search, a) : 0;
2321
+ }
2322
+ function z() {
2323
+ if (!n.current.search || p2.current.shouldFilter === false) return;
2324
+ let e = n.current.filtered.items, a = [];
2325
+ n.current.filtered.groups.forEach((i) => {
2326
+ let l = c.current.get(i), g = 0;
2327
+ l.forEach((y) => {
2328
+ let h = e.get(y);
2329
+ g = Math.max(h, g);
2330
+ }), a.push([i, g]);
2331
+ });
2332
+ let s = I.current;
2333
+ V().sort((i, l) => {
2334
+ var h, F;
2335
+ let g = i.getAttribute("id"), y = l.getAttribute("id");
2336
+ return ((h = e.get(y)) != null ? h : 0) - ((F = e.get(g)) != null ? F : 0);
2337
+ }).forEach((i) => {
2338
+ let l = i.closest(Y2);
2339
+ l ? l.appendChild(i.parentElement === l ? i : i.closest(`${Y2} > *`)) : s.appendChild(i.parentElement === s ? i : i.closest(`${Y2} > *`));
2340
+ }), a.sort((i, l) => l[1] - i[1]).forEach((i) => {
2341
+ var g;
2342
+ let l = (g = I.current) == null ? void 0 : g.querySelector(`${N}[${T}="${encodeURIComponent(i[0])}"]`);
2343
+ l == null || l.parentElement.appendChild(l);
2344
+ });
2345
+ }
2346
+ function W2() {
2347
+ let e = V().find((s) => s.getAttribute("aria-disabled") !== "true"), a = e == null ? void 0 : e.getAttribute(T);
2348
+ E.setState("value", a || void 0);
2349
+ }
2350
+ function J2() {
2351
+ var a, s, i, l;
2352
+ if (!n.current.search || p2.current.shouldFilter === false) {
2353
+ n.current.filtered.count = u2.current.size;
2354
+ return;
2355
+ }
2356
+ n.current.filtered.groups = /* @__PURE__ */ new Set();
2357
+ let e = 0;
2358
+ for (let g of u2.current) {
2359
+ let y = (s = (a = d.current.get(g)) == null ? void 0 : a.value) != null ? s : "", h = (l = (i = d.current.get(g)) == null ? void 0 : i.keywords) != null ? l : [], F = te(y, h);
2360
+ n.current.filtered.items.set(g, F), F > 0 && e++;
2361
+ }
2362
+ for (let [g, y] of c.current) for (let h of y) if (n.current.filtered.items.get(h) > 0) {
2363
+ n.current.filtered.groups.add(g);
2364
+ break;
2365
+ }
2366
+ n.current.filtered.count = e;
2367
+ }
2368
+ function ne() {
2369
+ var a, s, i;
2370
+ let e = M();
2371
+ 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" }));
2372
+ }
2373
+ function M() {
2374
+ var e;
2375
+ return (e = I.current) == null ? void 0 : e.querySelector(`${le}[aria-selected="true"]`);
2376
+ }
2377
+ function V() {
2378
+ var e;
2379
+ return Array.from(((e = I.current) == null ? void 0 : e.querySelectorAll(ce)) || []);
2380
+ }
2381
+ function X2(e) {
2382
+ let s = V()[e];
2383
+ s && E.setState("value", s.getAttribute(T));
2384
+ }
2385
+ function Q(e) {
2386
+ var g;
2387
+ let a = M(), s = V(), i = s.findIndex((y) => y === a), l = s[i + e];
2388
+ (g = p2.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));
2389
+ }
2390
+ function re(e) {
2391
+ let a = M(), s = a == null ? void 0 : a.closest(N), i;
2392
+ for (; s && !i; ) s = e > 0 ? we(s, N) : De(s, N), i = s == null ? void 0 : s.querySelector(ce);
2393
+ i ? E.setState("value", i.getAttribute(T)) : Q(e);
2394
+ }
2395
+ let oe = () => X2(V().length - 1), ie = (e) => {
2396
+ e.preventDefault(), e.metaKey ? oe() : e.altKey ? re(1) : Q(1);
2397
+ }, se = (e) => {
2398
+ e.preventDefault(), e.metaKey ? X2(0) : e.altKey ? re(-1) : Q(-1);
2399
+ };
2400
+ return t.createElement(Primitive.div, { ref: o, tabIndex: -1, ...O, "cmdk-root": "", onKeyDown: (e) => {
2401
+ var s;
2402
+ (s = O.onKeyDown) == null || s.call(O, e);
2403
+ let a = e.nativeEvent.isComposing || e.keyCode === 229;
2404
+ if (!(e.defaultPrevented || a)) switch (e.key) {
2405
+ case "n":
2406
+ case "j": {
2407
+ j && e.ctrlKey && ie(e);
2408
+ break;
2409
+ }
2410
+ case "ArrowDown": {
2411
+ ie(e);
2412
+ break;
2413
+ }
2414
+ case "p":
2415
+ case "k": {
2416
+ j && e.ctrlKey && se(e);
2417
+ break;
2418
+ }
2419
+ case "ArrowUp": {
2420
+ se(e);
2421
+ break;
2422
+ }
2423
+ case "Home": {
2424
+ e.preventDefault(), X2(0);
2425
+ break;
2426
+ }
2427
+ case "End": {
2428
+ e.preventDefault(), oe();
2429
+ break;
2430
+ }
2431
+ case "Enter": {
2432
+ e.preventDefault();
2433
+ let i = M();
2434
+ if (i) {
2435
+ let l = new Event(Z);
2436
+ i.dispatchEvent(l);
2437
+ }
2438
+ }
2439
+ }
2440
+ } }, t.createElement("label", { "cmdk-label": "", htmlFor: U2.inputId, id: U2.labelId, style: Te }, b), B2(r, (e) => t.createElement(de.Provider, { value: E }, t.createElement(ue.Provider, { value: U2 }, e))));
2441
+ });
2442
+ var he = t.forwardRef((r, o) => {
2443
+ var _, I;
2444
+ let n = useId(), u2 = t.useRef(null), c = t.useContext(fe), d = K2(), f = pe(r), p2 = (I = (_ = f.current) == null ? void 0 : _.forceMount) != null ? I : c == null ? void 0 : c.forceMount;
2445
+ k2(() => {
2446
+ if (!p2) return d.item(n, c == null ? void 0 : c.id);
2447
+ }, [p2]);
2448
+ let b = ve(n, u2, [r.value, r.children, u2], r.keywords), m2 = ee(), R = P((v) => v.value && v.value === b.current), x = P((v) => p2 || d.filter() === false ? true : v.search ? v.filtered.items.get(n) > 0 : true);
2449
+ t.useEffect(() => {
2450
+ let v = u2.current;
2451
+ if (!(!v || r.disabled)) return v.addEventListener(Z, C), () => v.removeEventListener(Z, C);
2452
+ }, [x, r.onSelect, r.disabled]);
2453
+ function C() {
2454
+ var v, E;
2455
+ S(), (E = (v = f.current).onSelect) == null || E.call(v, b.current);
2456
+ }
2457
+ function S() {
2458
+ m2.setState("value", b.current, true);
2459
+ }
2460
+ if (!x) return null;
2461
+ let { disabled: A, value: ge, onSelect: j, forceMount: O, keywords: $2, ...q } = r;
2462
+ return t.createElement(Primitive.div, { ref: composeRefs(u2, o), ...q, id: n, "cmdk-item": "", role: "option", "aria-disabled": !!A, "aria-selected": !!R, "data-disabled": !!A, "data-selected": !!R, onPointerMove: A || d.getDisablePointerSelection() ? void 0 : S, onClick: A ? void 0 : C }, r.children);
2463
+ });
2464
+ var Ee = t.forwardRef((r, o) => {
2465
+ let { heading: n, children: u2, forceMount: c, ...d } = r, f = useId(), p2 = t.useRef(null), b = t.useRef(null), m2 = useId(), R = K2(), x = P((S) => c || R.filter() === false ? true : S.search ? S.filtered.groups.has(f) : true);
2466
+ k2(() => R.group(f), []), ve(f, p2, [r.value, r.heading, b]);
2467
+ let C = t.useMemo(() => ({ id: f, forceMount: c }), [c]);
2468
+ return t.createElement(Primitive.div, { ref: composeRefs(p2, o), ...d, "cmdk-group": "", role: "presentation", hidden: x ? void 0 : true }, n && t.createElement("div", { ref: b, "cmdk-group-heading": "", "aria-hidden": true, id: m2 }, n), B2(r, (S) => t.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? m2 : void 0 }, t.createElement(fe.Provider, { value: C }, S))));
2469
+ });
2470
+ var ye = t.forwardRef((r, o) => {
2471
+ let { alwaysRender: n, ...u2 } = r, c = t.useRef(null), d = P((f) => !f.search);
2472
+ return !n && !d ? null : t.createElement(Primitive.div, { ref: composeRefs(c, o), ...u2, "cmdk-separator": "", role: "separator" });
2473
+ });
2474
+ var Se = t.forwardRef((r, o) => {
2475
+ let { onValueChange: n, ...u2 } = r, c = r.value != null, d = ee(), f = P((m2) => m2.search), p2 = P((m2) => m2.selectedItemId), b = K2();
2476
+ return t.useEffect(() => {
2477
+ r.value != null && d.setState("search", r.value);
2478
+ }, [r.value]), t.createElement(Primitive.input, { ref: o, ...u2, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: false, "aria-autocomplete": "list", role: "combobox", "aria-expanded": true, "aria-controls": b.listId, "aria-labelledby": b.labelId, "aria-activedescendant": p2, id: b.inputId, type: "text", value: c ? r.value : f, onChange: (m2) => {
2479
+ c || d.setState("search", m2.target.value), n == null || n(m2.target.value);
2480
+ } });
2481
+ });
2482
+ var Ce = t.forwardRef((r, o) => {
2483
+ let { children: n, label: u2 = "Suggestions", ...c } = r, d = t.useRef(null), f = t.useRef(null), p2 = P((m2) => m2.selectedItemId), b = K2();
2484
+ return t.useEffect(() => {
2485
+ if (f.current && d.current) {
2486
+ let m2 = f.current, R = d.current, x, C = new ResizeObserver(() => {
2487
+ x = requestAnimationFrame(() => {
2488
+ let S = m2.offsetHeight;
2489
+ R.style.setProperty("--cmdk-list-height", S.toFixed(1) + "px");
2490
+ });
2491
+ });
2492
+ return C.observe(m2), () => {
2493
+ cancelAnimationFrame(x), C.unobserve(m2);
2494
+ };
2495
+ }
2496
+ }, []), t.createElement(Primitive.div, { ref: composeRefs(d, o), ...c, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b.listId }, B2(r, (m2) => t.createElement("div", { ref: composeRefs(f, b.listInnerRef), "cmdk-list-sizer": "" }, m2)));
2497
+ });
2498
+ var xe = t.forwardRef((r, o) => {
2499
+ let { open: n, onOpenChange: u2, overlayClassName: c, contentClassName: d, container: f, ...p2 } = r;
2500
+ return t.createElement(Root, { open: n, onOpenChange: u2 }, t.createElement(Portal2, { container: f }, t.createElement(Overlay, { "cmdk-overlay": "", className: c }), t.createElement(Content, { "aria-label": r.label, "cmdk-dialog": "", className: d }, t.createElement(me, { ref: o, ...p2 }))));
2501
+ });
2502
+ var Ie = t.forwardRef((r, o) => P((u2) => u2.filtered.count === 0) ? t.createElement(Primitive.div, { ref: o, ...r, "cmdk-empty": "", role: "presentation" }) : null);
2503
+ var Pe = t.forwardRef((r, o) => {
2504
+ let { progress: n, children: u2, label: c = "Loading...", ...d } = r;
2505
+ return t.createElement(Primitive.div, { ref: o, ...d, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": c }, B2(r, (f) => t.createElement("div", { "aria-hidden": true }, f)));
2506
+ });
2507
+ var _e = Object.assign(me, { List: Ce, Item: he, Input: Se, Group: Ee, Separator: ye, Dialog: xe, Empty: Ie, Loading: Pe });
2508
+ function we(r, o) {
2509
+ let n = r.nextElementSibling;
2510
+ for (; n; ) {
2511
+ if (n.matches(o)) return n;
2512
+ n = n.nextElementSibling;
2513
+ }
2514
+ }
2515
+ function De(r, o) {
2516
+ let n = r.previousElementSibling;
2517
+ for (; n; ) {
2518
+ if (n.matches(o)) return n;
2519
+ n = n.previousElementSibling;
2520
+ }
2521
+ }
2522
+ function pe(r) {
2523
+ let o = t.useRef(r);
2524
+ return k2(() => {
2525
+ o.current = r;
2526
+ }), o;
2527
+ }
2528
+ var k2 = typeof window == "undefined" ? t.useEffect : t.useLayoutEffect;
2529
+ function L(r) {
2530
+ let o = t.useRef();
2531
+ return o.current === void 0 && (o.current = r()), o;
2532
+ }
2533
+ function P(r) {
2534
+ let o = ee(), n = () => r(o.snapshot());
2535
+ return t.useSyncExternalStore(o.subscribe, n, n);
2536
+ }
2537
+ function ve(r, o, n, u2 = []) {
2538
+ let c = t.useRef(), d = K2();
2539
+ return k2(() => {
2540
+ var b;
2541
+ let f = (() => {
2542
+ var m2;
2543
+ for (let R of n) {
2544
+ if (typeof R == "string") return R.trim();
2545
+ if (typeof R == "object" && "current" in R) return R.current ? (m2 = R.current.textContent) == null ? void 0 : m2.trim() : c.current;
2546
+ }
2547
+ })(), p2 = u2.map((m2) => m2.trim());
2548
+ d.value(r, f, p2), (b = o.current) == null || b.setAttribute(T, f), c.current = f;
2549
+ }), c;
2550
+ }
2551
+ var ke = () => {
2552
+ let [r, o] = t.useState(), n = L(() => /* @__PURE__ */ new Map());
2553
+ return k2(() => {
2554
+ n.current.forEach((u2) => u2()), n.current = /* @__PURE__ */ new Map();
2555
+ }, [r]), (u2, c) => {
2556
+ n.current.set(u2, c), o({});
2557
+ };
2558
+ };
2559
+ function Me(r) {
2560
+ let o = r.type;
2561
+ return typeof o == "function" ? o(r.props) : "render" in o ? o.render(r.props) : r;
2562
+ }
2563
+ function B2({ asChild: r, children: o }, n) {
2564
+ return r && t.isValidElement(o) ? t.cloneElement(Me(o), { ref: o.ref }, n(o.props.children)) : n(o);
2565
+ }
2566
+ var Te = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
2567
+
2568
+ // ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
2569
+ var import_react4 = require("react");
2570
+
2571
+ // ../../node_modules/lucide-react/dist/esm/shared/src/utils.js
2572
+ var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
2573
+ var toCamelCase = (string) => string.replace(
2574
+ /^([A-Z])|[\s-_]+(\w)/g,
2575
+ (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
2576
+ );
2577
+ var toPascalCase = (string) => {
2578
+ const camelCase = toCamelCase(string);
2579
+ return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
2580
+ };
2581
+ var mergeClasses = (...classes) => classes.filter((className, index, array) => {
2582
+ return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
2583
+ }).join(" ").trim();
2584
+
2585
+ // ../../node_modules/lucide-react/dist/esm/Icon.js
2586
+ var import_react3 = require("react");
2587
+
2588
+ // ../../node_modules/lucide-react/dist/esm/defaultAttributes.js
2589
+ var defaultAttributes = {
2590
+ xmlns: "http://www.w3.org/2000/svg",
2591
+ width: 24,
2592
+ height: 24,
2593
+ viewBox: "0 0 24 24",
2594
+ fill: "none",
2595
+ stroke: "currentColor",
2596
+ strokeWidth: 2,
2597
+ strokeLinecap: "round",
2598
+ strokeLinejoin: "round"
2599
+ };
2600
+
2601
+ // ../../node_modules/lucide-react/dist/esm/Icon.js
2602
+ var Icon = (0, import_react3.forwardRef)(
2603
+ ({
2604
+ color = "currentColor",
2605
+ size = 24,
2606
+ strokeWidth = 2,
2607
+ absoluteStrokeWidth,
2608
+ className = "",
2609
+ children,
2610
+ iconNode,
2611
+ ...rest
2612
+ }, ref) => {
2613
+ return (0, import_react3.createElement)(
2614
+ "svg",
2615
+ {
2616
+ ref,
2617
+ ...defaultAttributes,
2618
+ width: size,
2619
+ height: size,
2620
+ stroke: color,
2621
+ strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
2622
+ className: mergeClasses("lucide", className),
2623
+ ...rest
2624
+ },
2625
+ [
2626
+ ...iconNode.map(([tag, attrs]) => (0, import_react3.createElement)(tag, attrs)),
2627
+ ...Array.isArray(children) ? children : [children]
2628
+ ]
2629
+ );
2630
+ }
2631
+ );
2632
+
2633
+ // ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
2634
+ var createLucideIcon = (iconName, iconNode) => {
2635
+ const Component = (0, import_react4.forwardRef)(
2636
+ ({ className, ...props }, ref) => (0, import_react4.createElement)(Icon, {
2637
+ ref,
2638
+ iconNode,
2639
+ className: mergeClasses(
2640
+ `lucide-${toKebabCase(toPascalCase(iconName))}`,
2641
+ `lucide-${iconName}`,
2642
+ className
2643
+ ),
2644
+ ...props
2645
+ })
2646
+ );
2647
+ Component.displayName = toPascalCase(iconName);
2648
+ return Component;
2649
+ };
2650
+
2651
+ // ../../node_modules/lucide-react/dist/esm/icons/check.js
2652
+ var __iconNode = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
2653
+ var Check = createLucideIcon("check", __iconNode);
2654
+
2655
+ // src/autocomplete.tsx
2656
+ var import_react5 = require("react");
2657
+ var import_ui4 = require("@c-rex/ui");
2658
+ var import_jsx_runtime13 = require("react/jsx-runtime");
2659
+ var AutoComplete = ({
2660
+ initialValue,
2661
+ onSearch,
2662
+ onSelect
2663
+ }) => {
2664
+ const [query, setQuery] = (0, import_react5.useState)(initialValue);
2665
+ const [suggestions, setSuggestions] = (0, import_react5.useState)([]);
2666
+ const [open, setOpen] = (0, import_react5.useState)(false);
2667
+ (0, import_react5.useEffect)(() => {
2668
+ const debounceFetch = setTimeout(() => {
2669
+ if (query) {
2670
+ onSearch(query).then(setSuggestions);
2671
+ } else {
2672
+ setSuggestions([]);
2673
+ }
2674
+ }, 300);
2675
+ return () => clearTimeout(debounceFetch);
2676
+ }, [onSearch, query]);
2677
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ui4.Popover, { open, onOpenChange: setOpen, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_ui4.Command, { shouldFilter: false, children: [
2678
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ui4.PopoverAnchor, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2679
+ _e.Input,
2680
+ {
2681
+ asChild: true,
2682
+ value: query,
2683
+ onValueChange: setQuery,
2684
+ onKeyDown: (e) => setOpen(e.key !== "Escape"),
2685
+ onMouseDown: () => setOpen(false),
2686
+ onFocus: () => setOpen(true),
2687
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ui4.Input, {})
2688
+ }
2689
+ ) }),
2690
+ !open && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ui4.CommandList, { "aria-hidden": "true", className: "hidden" }),
2691
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2692
+ import_ui4.PopoverContent,
2693
+ {
2694
+ asChild: true,
2695
+ onOpenAutoFocus: (e) => e.preventDefault(),
2696
+ onInteractOutside: (e) => {
2697
+ if (e.target instanceof Element && e.target.hasAttribute("cmdk-input")) {
2698
+ e.preventDefault();
2699
+ }
2700
+ },
2701
+ className: "w-[--radix-popover-trigger-width] p-0",
2702
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ui4.CommandList, { children: suggestions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ui4.CommandGroup, { children: suggestions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
2703
+ import_ui4.CommandItem,
2704
+ {
2705
+ value: option,
2706
+ onMouseDown: (e) => e.preventDefault(),
2707
+ onSelect: (inputValue) => {
2708
+ setOpen(false);
2709
+ onSelect(inputValue ?? "");
2710
+ },
2711
+ children: [
2712
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Check, { className: "mr-2 h-4 w-4 opacity-0" }),
2713
+ option
2714
+ ]
2715
+ },
2716
+ option
2717
+ )) }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ui4.CommandEmpty, { children: "No suggestions." }) })
2718
+ }
2719
+ )
2720
+ ] }) }) });
2721
+ };
2722
+
2723
+ // src/breadcrumb.tsx
2724
+ var import_ui5 = require("@c-rex/ui");
2725
+ var import_jsx_runtime14 = require("react/jsx-runtime");
2726
+ var Breadcrumb = ({ items, loading }) => {
2727
+ if (!items) {
2728
+ return null;
2729
+ }
2730
+ if (loading) {
2731
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ui5.Breadcrumb, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_ui5.BreadcrumbList, { children: [
2732
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ui5.BreadcrumbItem, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ui5.BreadcrumbPage, { children: "Home" }) }),
2733
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ui5.BreadcrumbSeparator, {}),
2734
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ui5.BreadcrumbItem, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ui5.Skeleton, { className: "w-40 h-6" }) }),
2735
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ui5.BreadcrumbSeparator, {}),
2736
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ui5.BreadcrumbItem, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ui5.Skeleton, { className: "w-40 h-6" }) })
2737
+ ] }) });
2738
+ }
2739
+ const homeItem = {
2740
+ link: "/",
2741
+ label: "Home",
2742
+ id: "home",
2743
+ active: false,
2744
+ children: []
2745
+ };
2746
+ const newItemList = [homeItem, ...items];
2747
+ const renderLink = (showLink, item) => {
2748
+ if (showLink) {
2749
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ui5.BreadcrumbLink, { href: item.link, children: item.label });
2750
+ }
2751
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ui5.BreadcrumbPage, { children: item.label });
2752
+ };
2753
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ui5.Breadcrumb, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ui5.BreadcrumbList, { children: newItemList.map((item, index) => {
2754
+ const isLast = index === newItemList.length - 1;
2755
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
2756
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ui5.BreadcrumbItem, { children: renderLink(!isLast, item) }, `${item.label}-item`),
2757
+ !isLast && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ui5.BreadcrumbSeparator, {}, `${item.label}-separator`)
2758
+ ] });
2759
+ }) }) });
2760
+ };
2761
+
2762
+ // src/empty.tsx
2763
+ var import_ui6 = require("@c-rex/ui");
2764
+ var import_jsx_runtime15 = require("react/jsx-runtime");
2765
+ var Empty = () => {
2766
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_ui6.Alert, { className: "my-2", children: [
2767
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_ui6.AlertTitle, { children: "No results" }),
2768
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_ui6.AlertDescription, { children: "No data available. Please try adjusting your search or filter criteria." })
2769
+ ] });
2770
+ };
2771
+
2772
+ // src/navbar.tsx
2773
+ var import_link2 = __toESM(require("next/link"));
2774
+ var import_ui7 = require("@c-rex/ui");
2775
+ var import_image2 = __toESM(require("next/image"));
2776
+ var import_jsx_runtime16 = require("react/jsx-runtime");
2777
+ var NavBar = () => {
2778
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("header", { className: "sticky top-0 z-40 flex w-full bg-background/60 backdrop-blur-xl transition-all bg-transparent border-b justify-center py-4", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "container flex justify-between", children: [
2779
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex gap-6 md:gap-10", children: [
2780
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_link2.default, { href: "/", className: "flex items-center space-x-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2781
+ import_image2.default,
2782
+ {
2783
+ src: "/img/logo.png",
2784
+ alt: "C-rex Logo",
2785
+ width: 88,
2786
+ height: 50
2787
+ }
2788
+ ) }),
2789
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("nav", { className: "hidden gap-6 md:flex", children: [
2790
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2791
+ import_link2.default,
2792
+ {
2793
+ href: "/blog",
2794
+ prefetch: true,
2795
+ className: "flex items-center text-lg font-medium transition-colors hover:text-foreground/80 sm:text-sm",
2796
+ children: "Blog"
2797
+ }
2798
+ ),
2799
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2800
+ import_link2.default,
2801
+ {
2802
+ href: "#",
2803
+ prefetch: true,
2804
+ className: "flex items-center text-lg font-medium transition-colors hover:text-foreground/80 sm:text-sm",
2805
+ children: "Documentation"
2806
+ }
2807
+ )
2808
+ ] })
2809
+ ] }),
2810
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex items-center space-x-3", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2811
+ import_ui7.Button,
2812
+ {
2813
+ className: "hidden gap-2 px-5 md:flex",
2814
+ variant: "default",
2815
+ size: "sm",
2816
+ rounded: "full",
2817
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Sign In" })
2818
+ }
2819
+ ) })
2820
+ ] }) });
2821
+ };
2822
+
2823
+ // src/result-list.tsx
2824
+ var import_jsx_runtime17 = require("react/jsx-runtime");
2825
+ var ViewComponent = table_default;
2826
+ var ResultList = ({ items }) => {
2827
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, { children: items.length == 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Empty, {}) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ViewComponent, { items }) });
2828
+ };
2829
+
2830
+ // src/sidebar.tsx
2831
+ var import_ui8 = require("@c-rex/ui");
2832
+ var import_jsx_runtime18 = require("react/jsx-runtime");
2833
+ function AppSidebar({ data, loading, ...props }) {
2834
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_ui8.Sidebar, { collapsible: "icon", ...props, className: "top-20", children: [
2835
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui8.SidebarContent, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui8.SidebarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui8.SidebarMenu, { className: "pt-4", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
2836
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui8.Skeleton, { className: "w-auto h-10 mb-2" }),
2837
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui8.Skeleton, { className: "w-auto h-10 mb-2" }),
2838
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui8.Skeleton, { className: "w-auto h-10 mb-2 ml-8" }),
2839
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui8.Skeleton, { className: "w-auto h-10 mb-2 ml-8" }),
2840
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui8.Skeleton, { className: "w-auto h-10 mb-2 ml-8" }),
2841
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui8.Skeleton, { className: "w-auto h-10 mb-2 ml-8" }),
2842
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui8.Skeleton, { className: "w-auto h-10 mb-2" })
2843
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, { children: data.map((item) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_ui8.SidebarMenuItem, { children: [
2844
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui8.SidebarMenuButton, { asChild: true, isActive: item.active, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("a", { href: item.link, title: item.label, children: item.label }) }),
2845
+ item.children?.length ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui8.SidebarMenuSub, { children: item.children.map((item2) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui8.SidebarMenuSubItem, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2846
+ import_ui8.SidebarMenuSubButton,
2847
+ {
2848
+ asChild: true,
2849
+ isActive: item2.active,
2850
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("a", { href: item2.link, title: item2.label, children: item2.label })
2851
+ }
2852
+ ) }, item2.label)) }) : null
2853
+ ] }, item.id)) }) }) }) }),
2854
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui8.SidebarRail, {})
2855
+ ] });
2856
+ }
2857
+ // Annotate the CommonJS export names for ESM import in node:
2858
+ 0 && (module.exports = {
2859
+ AppSidebar,
2860
+ AutoComplete,
2861
+ BlogCard,
2862
+ BlurImage,
2863
+ Breadcrumb,
2864
+ Empty,
2865
+ NavBar,
2866
+ ResultList,
2867
+ SearchStateWrapper
2868
+ });
2869
+ /*! Bundled license information:
2870
+
2871
+ lucide-react/dist/esm/shared/src/utils.js:
2872
+ (**
2873
+ * @license lucide-react v0.486.0 - ISC
2874
+ *
2875
+ * This source code is licensed under the ISC license.
2876
+ * See the LICENSE file in the root directory of this source tree.
2877
+ *)
2878
+
2879
+ lucide-react/dist/esm/defaultAttributes.js:
2880
+ (**
2881
+ * @license lucide-react v0.486.0 - ISC
2882
+ *
2883
+ * This source code is licensed under the ISC license.
2884
+ * See the LICENSE file in the root directory of this source tree.
2885
+ *)
2886
+
2887
+ lucide-react/dist/esm/Icon.js:
2888
+ (**
2889
+ * @license lucide-react v0.486.0 - ISC
2890
+ *
2891
+ * This source code is licensed under the ISC license.
2892
+ * See the LICENSE file in the root directory of this source tree.
2893
+ *)
2894
+
2895
+ lucide-react/dist/esm/createLucideIcon.js:
2896
+ (**
2897
+ * @license lucide-react v0.486.0 - ISC
2898
+ *
2899
+ * This source code is licensed under the ISC license.
2900
+ * See the LICENSE file in the root directory of this source tree.
2901
+ *)
2902
+
2903
+ lucide-react/dist/esm/icons/check.js:
2904
+ (**
2905
+ * @license lucide-react v0.486.0 - ISC
2906
+ *
2907
+ * This source code is licensed under the ISC license.
2908
+ * See the LICENSE file in the root directory of this source tree.
2909
+ *)
2910
+
2911
+ lucide-react/dist/esm/lucide-react.js:
2912
+ (**
2913
+ * @license lucide-react v0.486.0 - ISC
2914
+ *
2915
+ * This source code is licensed under the ISC license.
2916
+ * See the LICENSE file in the root directory of this source tree.
2917
+ *)
2918
+ */
2919
+ //# sourceMappingURL=index.js.map