@blocknote/shadcn 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/LICENSE +373 -0
  2. package/dist/blocknote-shadcn.js +1881 -0
  3. package/dist/blocknote-shadcn.js.map +1 -0
  4. package/dist/blocknote-shadcn.umd.cjs +28 -0
  5. package/dist/blocknote-shadcn.umd.cjs.map +1 -0
  6. package/dist/style.css +1 -0
  7. package/dist/webpack-stats.json +1 -0
  8. package/package.json +104 -0
  9. package/src/ShadCNComponentsContext.tsx +39 -0
  10. package/src/components/ui/badge.tsx +36 -0
  11. package/src/components/ui/button.tsx +56 -0
  12. package/src/components/ui/card.tsx +86 -0
  13. package/src/components/ui/dropdown-menu.tsx +195 -0
  14. package/src/components/ui/form.tsx +176 -0
  15. package/src/components/ui/input.tsx +24 -0
  16. package/src/components/ui/label.tsx +24 -0
  17. package/src/components/ui/popover.tsx +29 -0
  18. package/src/components/ui/select.tsx +152 -0
  19. package/src/components/ui/tabs.tsx +53 -0
  20. package/src/components/ui/toggle.tsx +43 -0
  21. package/src/components/ui/tooltip.tsx +28 -0
  22. package/src/form/Form.tsx +21 -0
  23. package/src/form/TextInput.tsx +61 -0
  24. package/src/index.tsx +122 -0
  25. package/src/lib/utils.ts +6 -0
  26. package/src/menu/Menu.tsx +212 -0
  27. package/src/panel/Panel.tsx +54 -0
  28. package/src/panel/PanelButton.tsx +27 -0
  29. package/src/panel/PanelFileInput.tsx +27 -0
  30. package/src/panel/PanelTab.tsx +25 -0
  31. package/src/panel/PanelTextInput.tsx +29 -0
  32. package/src/popover/popover.tsx +69 -0
  33. package/src/sideMenu/SideMenu.tsx +18 -0
  34. package/src/sideMenu/SideMenuButton.tsx +45 -0
  35. package/src/style.css +109 -0
  36. package/src/suggestionMenu/SuggestionMenu.tsx +28 -0
  37. package/src/suggestionMenu/SuggestionMenuEmptyItem.tsx +26 -0
  38. package/src/suggestionMenu/SuggestionMenuItem.tsx +47 -0
  39. package/src/suggestionMenu/SuggestionMenuLabel.tsx +22 -0
  40. package/src/suggestionMenu/SuggestionMenuLoader.tsx +18 -0
  41. package/src/tableHandle/TableHandle.tsx +43 -0
  42. package/src/toolbar/Toolbar.tsx +153 -0
  43. package/types/src/ShadCNComponentsContext.d.ts +56 -0
  44. package/types/src/components/ui/badge.d.ts +9 -0
  45. package/types/src/components/ui/button.d.ts +11 -0
  46. package/types/src/components/ui/card.d.ts +8 -0
  47. package/types/src/components/ui/dropdown-menu.d.ts +27 -0
  48. package/types/src/components/ui/form.d.ts +23 -0
  49. package/types/src/components/ui/input.d.ts +4 -0
  50. package/types/src/components/ui/label.d.ts +5 -0
  51. package/types/src/components/ui/popover.d.ts +6 -0
  52. package/types/src/components/ui/select.d.ts +13 -0
  53. package/types/src/components/ui/tabs.d.ts +7 -0
  54. package/types/src/components/ui/toggle.d.ts +12 -0
  55. package/types/src/components/ui/tooltip.d.ts +7 -0
  56. package/types/src/form/Form.d.ts +2 -0
  57. package/types/src/form/TextInput.d.ts +13 -0
  58. package/types/src/index.d.ts +12 -0
  59. package/types/src/lib/utils.d.ts +2 -0
  60. package/types/src/menu/Menu.d.ts +24 -0
  61. package/types/src/panel/Panel.d.ts +12 -0
  62. package/types/src/panel/PanelButton.d.ts +11 -0
  63. package/types/src/panel/PanelFileInput.d.ts +7 -0
  64. package/types/src/panel/PanelTab.d.ts +5 -0
  65. package/types/src/panel/PanelTextInput.d.ts +8 -0
  66. package/types/src/popover/popover.d.ts +11 -0
  67. package/types/src/sideMenu/SideMenu.d.ts +5 -0
  68. package/types/src/sideMenu/SideMenuButton.d.ts +15 -0
  69. package/types/src/suggestionMenu/SuggestionMenu.d.ts +6 -0
  70. package/types/src/suggestionMenu/SuggestionMenuEmptyItem.d.ts +5 -0
  71. package/types/src/suggestionMenu/SuggestionMenuItem.d.ts +8 -0
  72. package/types/src/suggestionMenu/SuggestionMenuLabel.d.ts +5 -0
  73. package/types/src/suggestionMenu/SuggestionMenuLoader.d.ts +5 -0
  74. package/types/src/tableHandle/TableHandle.d.ts +14 -0
  75. package/types/src/toolbar/Toolbar.d.ts +25 -0
@@ -0,0 +1,1881 @@
1
+ import * as p from "react";
2
+ import $e, { createContext as vr, useContext as br, forwardRef as N, useMemo as We } from "react";
3
+ import { ComponentsContext as xr, BlockNoteViewRaw as hr } from "@blocknote/react";
4
+ import { cva as Q } from "class-variance-authority";
5
+ import { clsx as yr } from "clsx";
6
+ import { twMerge as Cr } from "tailwind-merge";
7
+ import { Slot as Ye } from "@radix-ui/react-slot";
8
+ import * as w from "@radix-ui/react-dropdown-menu";
9
+ import { ChevronRight as Ue, Check as Ge, Circle as jr, ChevronDown as qe, ChevronUp as wr } from "lucide-react";
10
+ import { useFormContext as Nr, FormProvider as Sr, Controller as Tr, useForm as Rr } from "react-hook-form";
11
+ import * as He from "@radix-ui/react-label";
12
+ import * as ee from "@radix-ui/react-popover";
13
+ import * as T from "@radix-ui/react-select";
14
+ import * as L from "@radix-ui/react-tabs";
15
+ import * as Je from "@radix-ui/react-toggle";
16
+ import * as G from "@radix-ui/react-tooltip";
17
+ import { assertEmpty as j } from "@blocknote/core";
18
+ var de = { exports: {} }, Y = {};
19
+ /**
20
+ * @license React
21
+ * react-jsx-runtime.production.min.js
22
+ *
23
+ * Copyright (c) Facebook, Inc. and its affiliates.
24
+ *
25
+ * This source code is licensed under the MIT license found in the
26
+ * LICENSE file in the root directory of this source tree.
27
+ */
28
+ var Be;
29
+ function _r() {
30
+ if (Be)
31
+ return Y;
32
+ Be = 1;
33
+ var r = $e, t = Symbol.for("react.element"), o = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, i = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
34
+ function u(x, m, g) {
35
+ var b, _ = {}, P = null, B = null;
36
+ g !== void 0 && (P = "" + g), m.key !== void 0 && (P = "" + m.key), m.ref !== void 0 && (B = m.ref);
37
+ for (b in m)
38
+ a.call(m, b) && !d.hasOwnProperty(b) && (_[b] = m[b]);
39
+ if (x && x.defaultProps)
40
+ for (b in m = x.defaultProps, m)
41
+ _[b] === void 0 && (_[b] = m[b]);
42
+ return { $$typeof: t, type: x, key: P, ref: B, props: _, _owner: i.current };
43
+ }
44
+ return Y.Fragment = o, Y.jsx = u, Y.jsxs = u, Y;
45
+ }
46
+ var U = {};
47
+ /**
48
+ * @license React
49
+ * react-jsx-runtime.development.js
50
+ *
51
+ * Copyright (c) Facebook, Inc. and its affiliates.
52
+ *
53
+ * This source code is licensed under the MIT license found in the
54
+ * LICENSE file in the root directory of this source tree.
55
+ */
56
+ var ze;
57
+ function Er() {
58
+ return ze || (ze = 1, process.env.NODE_ENV !== "production" && function() {
59
+ var r = $e, t = Symbol.for("react.element"), o = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), x = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), B = Symbol.for("react.offscreen"), me = Symbol.iterator, Ft = "@@iterator";
60
+ function kt(e) {
61
+ if (e === null || typeof e != "object")
62
+ return null;
63
+ var s = me && e[me] || e[Ft];
64
+ return typeof s == "function" ? s : null;
65
+ }
66
+ var z = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
67
+ function D(e) {
68
+ {
69
+ for (var s = arguments.length, l = new Array(s > 1 ? s - 1 : 0), f = 1; f < s; f++)
70
+ l[f - 1] = arguments[f];
71
+ Lt("error", e, l);
72
+ }
73
+ }
74
+ function Lt(e, s, l) {
75
+ {
76
+ var f = z.ReactDebugCurrentFrame, y = f.getStackAddendum();
77
+ y !== "" && (s += "%s", l = l.concat([y]));
78
+ var C = l.map(function(h) {
79
+ return String(h);
80
+ });
81
+ C.unshift("Warning: " + s), Function.prototype.apply.call(console[e], console, C);
82
+ }
83
+ }
84
+ var Bt = !1, zt = !1, Vt = !1, At = !1, $t = !1, pe;
85
+ pe = Symbol.for("react.module.reference");
86
+ function Wt(e) {
87
+ return !!(typeof e == "string" || typeof e == "function" || e === a || e === d || $t || e === i || e === g || e === b || At || e === B || Bt || zt || Vt || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === _ || e.$$typeof === u || e.$$typeof === x || e.$$typeof === m || // This needs to include all possible module reference object
88
+ // types supported by any Flight configuration anywhere since
89
+ // we don't know which Flight build this will end up being used
90
+ // with.
91
+ e.$$typeof === pe || e.getModuleId !== void 0));
92
+ }
93
+ function Yt(e, s, l) {
94
+ var f = e.displayName;
95
+ if (f)
96
+ return f;
97
+ var y = s.displayName || s.name || "";
98
+ return y !== "" ? l + "(" + y + ")" : l;
99
+ }
100
+ function ge(e) {
101
+ return e.displayName || "Context";
102
+ }
103
+ function I(e) {
104
+ if (e == null)
105
+ return null;
106
+ if (typeof e.tag == "number" && D("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
107
+ return e.displayName || e.name || null;
108
+ if (typeof e == "string")
109
+ return e;
110
+ switch (e) {
111
+ case a:
112
+ return "Fragment";
113
+ case o:
114
+ return "Portal";
115
+ case d:
116
+ return "Profiler";
117
+ case i:
118
+ return "StrictMode";
119
+ case g:
120
+ return "Suspense";
121
+ case b:
122
+ return "SuspenseList";
123
+ }
124
+ if (typeof e == "object")
125
+ switch (e.$$typeof) {
126
+ case x:
127
+ var s = e;
128
+ return ge(s) + ".Consumer";
129
+ case u:
130
+ var l = e;
131
+ return ge(l._context) + ".Provider";
132
+ case m:
133
+ return Yt(e, e.render, "ForwardRef");
134
+ case _:
135
+ var f = e.displayName || null;
136
+ return f !== null ? f : I(e.type) || "Memo";
137
+ case P: {
138
+ var y = e, C = y._payload, h = y._init;
139
+ try {
140
+ return I(h(C));
141
+ } catch {
142
+ return null;
143
+ }
144
+ }
145
+ }
146
+ return null;
147
+ }
148
+ var k = Object.assign, $ = 0, ve, be, xe, he, ye, Ce, je;
149
+ function we() {
150
+ }
151
+ we.__reactDisabledLog = !0;
152
+ function Ut() {
153
+ {
154
+ if ($ === 0) {
155
+ ve = console.log, be = console.info, xe = console.warn, he = console.error, ye = console.group, Ce = console.groupCollapsed, je = console.groupEnd;
156
+ var e = {
157
+ configurable: !0,
158
+ enumerable: !0,
159
+ value: we,
160
+ writable: !0
161
+ };
162
+ Object.defineProperties(console, {
163
+ info: e,
164
+ log: e,
165
+ warn: e,
166
+ error: e,
167
+ group: e,
168
+ groupCollapsed: e,
169
+ groupEnd: e
170
+ });
171
+ }
172
+ $++;
173
+ }
174
+ }
175
+ function Gt() {
176
+ {
177
+ if ($--, $ === 0) {
178
+ var e = {
179
+ configurable: !0,
180
+ enumerable: !0,
181
+ writable: !0
182
+ };
183
+ Object.defineProperties(console, {
184
+ log: k({}, e, {
185
+ value: ve
186
+ }),
187
+ info: k({}, e, {
188
+ value: be
189
+ }),
190
+ warn: k({}, e, {
191
+ value: xe
192
+ }),
193
+ error: k({}, e, {
194
+ value: he
195
+ }),
196
+ group: k({}, e, {
197
+ value: ye
198
+ }),
199
+ groupCollapsed: k({}, e, {
200
+ value: Ce
201
+ }),
202
+ groupEnd: k({}, e, {
203
+ value: je
204
+ })
205
+ });
206
+ }
207
+ $ < 0 && D("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
208
+ }
209
+ }
210
+ var te = z.ReactCurrentDispatcher, re;
211
+ function H(e, s, l) {
212
+ {
213
+ if (re === void 0)
214
+ try {
215
+ throw Error();
216
+ } catch (y) {
217
+ var f = y.stack.trim().match(/\n( *(at )?)/);
218
+ re = f && f[1] || "";
219
+ }
220
+ return `
221
+ ` + re + e;
222
+ }
223
+ }
224
+ var oe = !1, J;
225
+ {
226
+ var qt = typeof WeakMap == "function" ? WeakMap : Map;
227
+ J = new qt();
228
+ }
229
+ function Ne(e, s) {
230
+ if (!e || oe)
231
+ return "";
232
+ {
233
+ var l = J.get(e);
234
+ if (l !== void 0)
235
+ return l;
236
+ }
237
+ var f;
238
+ oe = !0;
239
+ var y = Error.prepareStackTrace;
240
+ Error.prepareStackTrace = void 0;
241
+ var C;
242
+ C = te.current, te.current = null, Ut();
243
+ try {
244
+ if (s) {
245
+ var h = function() {
246
+ throw Error();
247
+ };
248
+ if (Object.defineProperty(h.prototype, "props", {
249
+ set: function() {
250
+ throw Error();
251
+ }
252
+ }), typeof Reflect == "object" && Reflect.construct) {
253
+ try {
254
+ Reflect.construct(h, []);
255
+ } catch (F) {
256
+ f = F;
257
+ }
258
+ Reflect.construct(e, [], h);
259
+ } else {
260
+ try {
261
+ h.call();
262
+ } catch (F) {
263
+ f = F;
264
+ }
265
+ e.call(h.prototype);
266
+ }
267
+ } else {
268
+ try {
269
+ throw Error();
270
+ } catch (F) {
271
+ f = F;
272
+ }
273
+ e();
274
+ }
275
+ } catch (F) {
276
+ if (F && f && typeof F.stack == "string") {
277
+ for (var v = F.stack.split(`
278
+ `), M = f.stack.split(`
279
+ `), S = v.length - 1, E = M.length - 1; S >= 1 && E >= 0 && v[S] !== M[E]; )
280
+ E--;
281
+ for (; S >= 1 && E >= 0; S--, E--)
282
+ if (v[S] !== M[E]) {
283
+ if (S !== 1 || E !== 1)
284
+ do
285
+ if (S--, E--, E < 0 || v[S] !== M[E]) {
286
+ var O = `
287
+ ` + v[S].replace(" at new ", " at ");
288
+ return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && J.set(e, O), O;
289
+ }
290
+ while (S >= 1 && E >= 0);
291
+ break;
292
+ }
293
+ }
294
+ } finally {
295
+ oe = !1, te.current = C, Gt(), Error.prepareStackTrace = y;
296
+ }
297
+ var A = e ? e.displayName || e.name : "", Le = A ? H(A) : "";
298
+ return typeof e == "function" && J.set(e, Le), Le;
299
+ }
300
+ function Ht(e, s, l) {
301
+ return Ne(e, !1);
302
+ }
303
+ function Jt(e) {
304
+ var s = e.prototype;
305
+ return !!(s && s.isReactComponent);
306
+ }
307
+ function K(e, s, l) {
308
+ if (e == null)
309
+ return "";
310
+ if (typeof e == "function")
311
+ return Ne(e, Jt(e));
312
+ if (typeof e == "string")
313
+ return H(e);
314
+ switch (e) {
315
+ case g:
316
+ return H("Suspense");
317
+ case b:
318
+ return H("SuspenseList");
319
+ }
320
+ if (typeof e == "object")
321
+ switch (e.$$typeof) {
322
+ case m:
323
+ return Ht(e.render);
324
+ case _:
325
+ return K(e.type, s, l);
326
+ case P: {
327
+ var f = e, y = f._payload, C = f._init;
328
+ try {
329
+ return K(C(y), s, l);
330
+ } catch {
331
+ }
332
+ }
333
+ }
334
+ return "";
335
+ }
336
+ var X = Object.prototype.hasOwnProperty, Se = {}, Te = z.ReactDebugCurrentFrame;
337
+ function Z(e) {
338
+ if (e) {
339
+ var s = e._owner, l = K(e.type, e._source, s ? s.type : null);
340
+ Te.setExtraStackFrame(l);
341
+ } else
342
+ Te.setExtraStackFrame(null);
343
+ }
344
+ function Kt(e, s, l, f, y) {
345
+ {
346
+ var C = Function.call.bind(X);
347
+ for (var h in e)
348
+ if (C(e, h)) {
349
+ var v = void 0;
350
+ try {
351
+ if (typeof e[h] != "function") {
352
+ var M = Error((f || "React class") + ": " + l + " type `" + h + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[h] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
353
+ throw M.name = "Invariant Violation", M;
354
+ }
355
+ v = e[h](s, h, f, l, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
356
+ } catch (S) {
357
+ v = S;
358
+ }
359
+ v && !(v instanceof Error) && (Z(y), D("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", f || "React class", l, h, typeof v), Z(null)), v instanceof Error && !(v.message in Se) && (Se[v.message] = !0, Z(y), D("Failed %s type: %s", l, v.message), Z(null));
360
+ }
361
+ }
362
+ }
363
+ var Xt = Array.isArray;
364
+ function ne(e) {
365
+ return Xt(e);
366
+ }
367
+ function Zt(e) {
368
+ {
369
+ var s = typeof Symbol == "function" && Symbol.toStringTag, l = s && e[Symbol.toStringTag] || e.constructor.name || "Object";
370
+ return l;
371
+ }
372
+ }
373
+ function Qt(e) {
374
+ try {
375
+ return Re(e), !1;
376
+ } catch {
377
+ return !0;
378
+ }
379
+ }
380
+ function Re(e) {
381
+ return "" + e;
382
+ }
383
+ function _e(e) {
384
+ if (Qt(e))
385
+ return D("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Zt(e)), Re(e);
386
+ }
387
+ var W = z.ReactCurrentOwner, er = {
388
+ key: !0,
389
+ ref: !0,
390
+ __self: !0,
391
+ __source: !0
392
+ }, Ee, Pe, ae;
393
+ ae = {};
394
+ function tr(e) {
395
+ if (X.call(e, "ref")) {
396
+ var s = Object.getOwnPropertyDescriptor(e, "ref").get;
397
+ if (s && s.isReactWarning)
398
+ return !1;
399
+ }
400
+ return e.ref !== void 0;
401
+ }
402
+ function rr(e) {
403
+ if (X.call(e, "key")) {
404
+ var s = Object.getOwnPropertyDescriptor(e, "key").get;
405
+ if (s && s.isReactWarning)
406
+ return !1;
407
+ }
408
+ return e.key !== void 0;
409
+ }
410
+ function or(e, s) {
411
+ if (typeof e.ref == "string" && W.current && s && W.current.stateNode !== s) {
412
+ var l = I(W.current.type);
413
+ ae[l] || (D('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', I(W.current.type), e.ref), ae[l] = !0);
414
+ }
415
+ }
416
+ function nr(e, s) {
417
+ {
418
+ var l = function() {
419
+ Ee || (Ee = !0, D("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", s));
420
+ };
421
+ l.isReactWarning = !0, Object.defineProperty(e, "key", {
422
+ get: l,
423
+ configurable: !0
424
+ });
425
+ }
426
+ }
427
+ function ar(e, s) {
428
+ {
429
+ var l = function() {
430
+ Pe || (Pe = !0, D("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", s));
431
+ };
432
+ l.isReactWarning = !0, Object.defineProperty(e, "ref", {
433
+ get: l,
434
+ configurable: !0
435
+ });
436
+ }
437
+ }
438
+ var sr = function(e, s, l, f, y, C, h) {
439
+ var v = {
440
+ // This tag allows us to uniquely identify this as a React Element
441
+ $$typeof: t,
442
+ // Built-in properties that belong on the element
443
+ type: e,
444
+ key: s,
445
+ ref: l,
446
+ props: h,
447
+ // Record the component responsible for creating this element.
448
+ _owner: C
449
+ };
450
+ return v._store = {}, Object.defineProperty(v._store, "validated", {
451
+ configurable: !1,
452
+ enumerable: !1,
453
+ writable: !0,
454
+ value: !1
455
+ }), Object.defineProperty(v, "_self", {
456
+ configurable: !1,
457
+ enumerable: !1,
458
+ writable: !1,
459
+ value: f
460
+ }), Object.defineProperty(v, "_source", {
461
+ configurable: !1,
462
+ enumerable: !1,
463
+ writable: !1,
464
+ value: y
465
+ }), Object.freeze && (Object.freeze(v.props), Object.freeze(v)), v;
466
+ };
467
+ function ir(e, s, l, f, y) {
468
+ {
469
+ var C, h = {}, v = null, M = null;
470
+ l !== void 0 && (_e(l), v = "" + l), rr(s) && (_e(s.key), v = "" + s.key), tr(s) && (M = s.ref, or(s, y));
471
+ for (C in s)
472
+ X.call(s, C) && !er.hasOwnProperty(C) && (h[C] = s[C]);
473
+ if (e && e.defaultProps) {
474
+ var S = e.defaultProps;
475
+ for (C in S)
476
+ h[C] === void 0 && (h[C] = S[C]);
477
+ }
478
+ if (v || M) {
479
+ var E = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
480
+ v && nr(h, E), M && ar(h, E);
481
+ }
482
+ return sr(e, v, M, y, f, W.current, h);
483
+ }
484
+ }
485
+ var se = z.ReactCurrentOwner, De = z.ReactDebugCurrentFrame;
486
+ function V(e) {
487
+ if (e) {
488
+ var s = e._owner, l = K(e.type, e._source, s ? s.type : null);
489
+ De.setExtraStackFrame(l);
490
+ } else
491
+ De.setExtraStackFrame(null);
492
+ }
493
+ var ie;
494
+ ie = !1;
495
+ function le(e) {
496
+ return typeof e == "object" && e !== null && e.$$typeof === t;
497
+ }
498
+ function Me() {
499
+ {
500
+ if (se.current) {
501
+ var e = I(se.current.type);
502
+ if (e)
503
+ return `
504
+
505
+ Check the render method of \`` + e + "`.";
506
+ }
507
+ return "";
508
+ }
509
+ }
510
+ function lr(e) {
511
+ {
512
+ if (e !== void 0) {
513
+ var s = e.fileName.replace(/^.*[\\\/]/, ""), l = e.lineNumber;
514
+ return `
515
+
516
+ Check your code at ` + s + ":" + l + ".";
517
+ }
518
+ return "";
519
+ }
520
+ }
521
+ var Oe = {};
522
+ function dr(e) {
523
+ {
524
+ var s = Me();
525
+ if (!s) {
526
+ var l = typeof e == "string" ? e : e.displayName || e.name;
527
+ l && (s = `
528
+
529
+ Check the top-level render call using <` + l + ">.");
530
+ }
531
+ return s;
532
+ }
533
+ }
534
+ function Ie(e, s) {
535
+ {
536
+ if (!e._store || e._store.validated || e.key != null)
537
+ return;
538
+ e._store.validated = !0;
539
+ var l = dr(s);
540
+ if (Oe[l])
541
+ return;
542
+ Oe[l] = !0;
543
+ var f = "";
544
+ e && e._owner && e._owner !== se.current && (f = " It was passed a child from " + I(e._owner.type) + "."), V(e), D('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', l, f), V(null);
545
+ }
546
+ }
547
+ function Fe(e, s) {
548
+ {
549
+ if (typeof e != "object")
550
+ return;
551
+ if (ne(e))
552
+ for (var l = 0; l < e.length; l++) {
553
+ var f = e[l];
554
+ le(f) && Ie(f, s);
555
+ }
556
+ else if (le(e))
557
+ e._store && (e._store.validated = !0);
558
+ else if (e) {
559
+ var y = kt(e);
560
+ if (typeof y == "function" && y !== e.entries)
561
+ for (var C = y.call(e), h; !(h = C.next()).done; )
562
+ le(h.value) && Ie(h.value, s);
563
+ }
564
+ }
565
+ }
566
+ function cr(e) {
567
+ {
568
+ var s = e.type;
569
+ if (s == null || typeof s == "string")
570
+ return;
571
+ var l;
572
+ if (typeof s == "function")
573
+ l = s.propTypes;
574
+ else if (typeof s == "object" && (s.$$typeof === m || // Note: Memo only checks outer props here.
575
+ // Inner props are checked in the reconciler.
576
+ s.$$typeof === _))
577
+ l = s.propTypes;
578
+ else
579
+ return;
580
+ if (l) {
581
+ var f = I(s);
582
+ Kt(l, e.props, "prop", f, e);
583
+ } else if (s.PropTypes !== void 0 && !ie) {
584
+ ie = !0;
585
+ var y = I(s);
586
+ D("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", y || "Unknown");
587
+ }
588
+ typeof s.getDefaultProps == "function" && !s.getDefaultProps.isReactClassApproved && D("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
589
+ }
590
+ }
591
+ function ur(e) {
592
+ {
593
+ for (var s = Object.keys(e.props), l = 0; l < s.length; l++) {
594
+ var f = s[l];
595
+ if (f !== "children" && f !== "key") {
596
+ V(e), D("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", f), V(null);
597
+ break;
598
+ }
599
+ }
600
+ e.ref !== null && (V(e), D("Invalid attribute `ref` supplied to `React.Fragment`."), V(null));
601
+ }
602
+ }
603
+ function ke(e, s, l, f, y, C) {
604
+ {
605
+ var h = Wt(e);
606
+ if (!h) {
607
+ var v = "";
608
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (v += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
609
+ var M = lr(y);
610
+ M ? v += M : v += Me();
611
+ var S;
612
+ e === null ? S = "null" : ne(e) ? S = "array" : e !== void 0 && e.$$typeof === t ? (S = "<" + (I(e.type) || "Unknown") + " />", v = " Did you accidentally export a JSX literal instead of a component?") : S = typeof e, D("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", S, v);
613
+ }
614
+ var E = ir(e, s, l, y, C);
615
+ if (E == null)
616
+ return E;
617
+ if (h) {
618
+ var O = s.children;
619
+ if (O !== void 0)
620
+ if (f)
621
+ if (ne(O)) {
622
+ for (var A = 0; A < O.length; A++)
623
+ Fe(O[A], e);
624
+ Object.freeze && Object.freeze(O);
625
+ } else
626
+ D("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
627
+ else
628
+ Fe(O, e);
629
+ }
630
+ return e === a ? ur(E) : cr(E), E;
631
+ }
632
+ }
633
+ function fr(e, s, l) {
634
+ return ke(e, s, l, !0);
635
+ }
636
+ function mr(e, s, l) {
637
+ return ke(e, s, l, !1);
638
+ }
639
+ var pr = mr, gr = fr;
640
+ U.Fragment = a, U.jsx = pr, U.jsxs = gr;
641
+ }()), U;
642
+ }
643
+ process.env.NODE_ENV === "production" ? de.exports = _r() : de.exports = Er();
644
+ var n = de.exports;
645
+ function c(...r) {
646
+ return Cr(yr(r));
647
+ }
648
+ const Ke = Q(
649
+ "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
650
+ {
651
+ variants: {
652
+ variant: {
653
+ default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
654
+ secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
655
+ destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
656
+ outline: "text-foreground"
657
+ }
658
+ },
659
+ defaultVariants: {
660
+ variant: "default"
661
+ }
662
+ }
663
+ );
664
+ function Pr({ className: r, variant: t, ...o }) {
665
+ return /* @__PURE__ */ n.jsx("div", { className: c(Ke({ variant: t }), r), ...o });
666
+ }
667
+ const Dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
668
+ __proto__: null,
669
+ Badge: Pr,
670
+ badgeVariants: Ke
671
+ }, Symbol.toStringTag, { value: "Module" })), Xe = Q(
672
+ "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
673
+ {
674
+ variants: {
675
+ variant: {
676
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
677
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
678
+ outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
679
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
680
+ ghost: "hover:bg-accent hover:text-accent-foreground",
681
+ link: "text-primary underline-offset-4 hover:underline"
682
+ },
683
+ size: {
684
+ default: "h-10 px-4 py-2",
685
+ sm: "h-9 rounded-md px-3",
686
+ lg: "h-11 rounded-md px-8",
687
+ icon: "h-10 w-10"
688
+ }
689
+ },
690
+ defaultVariants: {
691
+ variant: "default",
692
+ size: "default"
693
+ }
694
+ }
695
+ ), Ze = p.forwardRef(
696
+ ({ className: r, variant: t, size: o, asChild: a = !1, ...i }, d) => {
697
+ const u = a ? Ye : "button";
698
+ return /* @__PURE__ */ n.jsx(
699
+ u,
700
+ {
701
+ className: c(Xe({ variant: t, size: o, className: r })),
702
+ ref: d,
703
+ ...i
704
+ }
705
+ );
706
+ }
707
+ );
708
+ Ze.displayName = "Button";
709
+ const Mr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
710
+ __proto__: null,
711
+ Button: Ze,
712
+ buttonVariants: Xe
713
+ }, Symbol.toStringTag, { value: "Module" })), Qe = p.forwardRef(({ className: r, ...t }, o) => /* @__PURE__ */ n.jsx(
714
+ "div",
715
+ {
716
+ ref: o,
717
+ className: c(
718
+ "rounded-lg border bg-card text-card-foreground shadow-sm",
719
+ r
720
+ ),
721
+ ...t
722
+ }
723
+ ));
724
+ Qe.displayName = "Card";
725
+ const et = p.forwardRef(({ className: r, ...t }, o) => /* @__PURE__ */ n.jsx(
726
+ "div",
727
+ {
728
+ ref: o,
729
+ className: c("flex flex-col space-y-1.5 p-6", r),
730
+ ...t
731
+ }
732
+ ));
733
+ et.displayName = "CardHeader";
734
+ const tt = p.forwardRef(({ className: r, ...t }, o) => /* @__PURE__ */ n.jsx(
735
+ "h3",
736
+ {
737
+ ref: o,
738
+ className: c(
739
+ "text-2xl font-semibold leading-none tracking-tight",
740
+ r
741
+ ),
742
+ ...t
743
+ }
744
+ ));
745
+ tt.displayName = "CardTitle";
746
+ const rt = p.forwardRef(({ className: r, ...t }, o) => /* @__PURE__ */ n.jsx(
747
+ "p",
748
+ {
749
+ ref: o,
750
+ className: c("text-sm text-muted-foreground", r),
751
+ ...t
752
+ }
753
+ ));
754
+ rt.displayName = "CardDescription";
755
+ const ot = p.forwardRef(({ className: r, ...t }, o) => /* @__PURE__ */ n.jsx("div", { ref: o, className: c("p-6 pt-0", r), ...t }));
756
+ ot.displayName = "CardContent";
757
+ const nt = p.forwardRef(({ className: r, ...t }, o) => /* @__PURE__ */ n.jsx(
758
+ "div",
759
+ {
760
+ ref: o,
761
+ className: c("flex items-center p-6 pt-0", r),
762
+ ...t
763
+ }
764
+ ));
765
+ nt.displayName = "CardFooter";
766
+ const Or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
767
+ __proto__: null,
768
+ Card: Qe,
769
+ CardContent: ot,
770
+ CardDescription: rt,
771
+ CardFooter: nt,
772
+ CardHeader: et,
773
+ CardTitle: tt
774
+ }, Symbol.toStringTag, { value: "Module" })), Ir = w.Root, Fr = w.Trigger, kr = w.Group, Lr = w.Portal, Br = w.Sub, zr = w.RadioGroup, at = p.forwardRef(({ className: r, inset: t, children: o, ...a }, i) => /* @__PURE__ */ n.jsxs(
775
+ w.SubTrigger,
776
+ {
777
+ ref: i,
778
+ className: c(
779
+ "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
780
+ t && "pl-8",
781
+ r
782
+ ),
783
+ ...a,
784
+ children: [
785
+ o,
786
+ /* @__PURE__ */ n.jsx(Ue, { className: "ml-auto h-4 w-4" })
787
+ ]
788
+ }
789
+ ));
790
+ at.displayName = w.SubTrigger.displayName;
791
+ const st = p.forwardRef(({ className: r, ...t }, o) => /* @__PURE__ */ n.jsx(
792
+ w.SubContent,
793
+ {
794
+ ref: o,
795
+ className: c(
796
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
797
+ r
798
+ ),
799
+ ...t
800
+ }
801
+ ));
802
+ st.displayName = w.SubContent.displayName;
803
+ const it = p.forwardRef(({ className: r, sideOffset: t = 4, ...o }, a) => (
804
+ // <DropdownMenuPrimitive.Portal>
805
+ /* @__PURE__ */ n.jsx(
806
+ w.Content,
807
+ {
808
+ ref: a,
809
+ sideOffset: t,
810
+ className: c(
811
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
812
+ r
813
+ ),
814
+ ...o
815
+ }
816
+ )
817
+ ));
818
+ it.displayName = w.Content.displayName;
819
+ const lt = p.forwardRef(({ className: r, inset: t, ...o }, a) => /* @__PURE__ */ n.jsx(
820
+ w.Item,
821
+ {
822
+ ref: a,
823
+ className: c(
824
+ "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
825
+ t && "pl-8",
826
+ r
827
+ ),
828
+ ...o
829
+ }
830
+ ));
831
+ lt.displayName = w.Item.displayName;
832
+ const dt = p.forwardRef(({ className: r, children: t, checked: o, ...a }, i) => /* @__PURE__ */ n.jsxs(
833
+ w.CheckboxItem,
834
+ {
835
+ ref: i,
836
+ className: c(
837
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
838
+ r
839
+ ),
840
+ checked: o,
841
+ ...a,
842
+ children: [
843
+ /* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(w.ItemIndicator, { children: /* @__PURE__ */ n.jsx(Ge, { className: "h-4 w-4" }) }) }),
844
+ t
845
+ ]
846
+ }
847
+ ));
848
+ dt.displayName = w.CheckboxItem.displayName;
849
+ const ct = p.forwardRef(({ className: r, children: t, ...o }, a) => /* @__PURE__ */ n.jsxs(
850
+ w.RadioItem,
851
+ {
852
+ ref: a,
853
+ className: c(
854
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
855
+ r
856
+ ),
857
+ ...o,
858
+ children: [
859
+ /* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(w.ItemIndicator, { children: /* @__PURE__ */ n.jsx(jr, { className: "h-2 w-2 fill-current" }) }) }),
860
+ t
861
+ ]
862
+ }
863
+ ));
864
+ ct.displayName = w.RadioItem.displayName;
865
+ const ut = p.forwardRef(({ className: r, inset: t, ...o }, a) => /* @__PURE__ */ n.jsx(
866
+ w.Label,
867
+ {
868
+ ref: a,
869
+ className: c(
870
+ "px-2 py-1.5 text-sm font-semibold",
871
+ t && "pl-8",
872
+ r
873
+ ),
874
+ ...o
875
+ }
876
+ ));
877
+ ut.displayName = w.Label.displayName;
878
+ const ft = p.forwardRef(({ className: r, ...t }, o) => /* @__PURE__ */ n.jsx(
879
+ w.Separator,
880
+ {
881
+ ref: o,
882
+ className: c("-mx-1 my-1 h-px bg-muted", r),
883
+ ...t
884
+ }
885
+ ));
886
+ ft.displayName = w.Separator.displayName;
887
+ const mt = ({
888
+ className: r,
889
+ ...t
890
+ }) => /* @__PURE__ */ n.jsx(
891
+ "span",
892
+ {
893
+ className: c("ml-auto text-xs tracking-widest opacity-60", r),
894
+ ...t
895
+ }
896
+ );
897
+ mt.displayName = "DropdownMenuShortcut";
898
+ const Vr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
899
+ __proto__: null,
900
+ DropdownMenu: Ir,
901
+ DropdownMenuCheckboxItem: dt,
902
+ DropdownMenuContent: it,
903
+ DropdownMenuGroup: kr,
904
+ DropdownMenuItem: lt,
905
+ DropdownMenuLabel: ut,
906
+ DropdownMenuPortal: Lr,
907
+ DropdownMenuRadioGroup: zr,
908
+ DropdownMenuRadioItem: ct,
909
+ DropdownMenuSeparator: ft,
910
+ DropdownMenuShortcut: mt,
911
+ DropdownMenuSub: Br,
912
+ DropdownMenuSubContent: st,
913
+ DropdownMenuSubTrigger: at,
914
+ DropdownMenuTrigger: Fr
915
+ }, Symbol.toStringTag, { value: "Module" })), Ar = Q(
916
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
917
+ ), ce = p.forwardRef(({ className: r, ...t }, o) => /* @__PURE__ */ n.jsx(
918
+ He.Root,
919
+ {
920
+ ref: o,
921
+ className: c(Ar(), r),
922
+ ...t
923
+ }
924
+ ));
925
+ ce.displayName = He.Root.displayName;
926
+ const $r = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
927
+ __proto__: null,
928
+ Label: ce
929
+ }, Symbol.toStringTag, { value: "Module" })), Wr = Sr, pt = p.createContext(
930
+ {}
931
+ ), Yr = ({
932
+ ...r
933
+ }) => /* @__PURE__ */ n.jsx(pt.Provider, { value: { name: r.name }, children: /* @__PURE__ */ n.jsx(Tr, { ...r }) }), q = () => {
934
+ const r = p.useContext(pt), t = p.useContext(gt), { getFieldState: o, formState: a } = Nr(), i = o(r.name, a);
935
+ if (!r)
936
+ throw new Error("useFormField should be used within <FormField>");
937
+ const { id: d } = t;
938
+ return {
939
+ id: d,
940
+ name: r.name,
941
+ formItemId: `${d}-form-item`,
942
+ formDescriptionId: `${d}-form-item-description`,
943
+ formMessageId: `${d}-form-item-message`,
944
+ ...i
945
+ };
946
+ }, gt = p.createContext(
947
+ {}
948
+ ), vt = p.forwardRef(({ className: r, ...t }, o) => {
949
+ const a = p.useId();
950
+ return /* @__PURE__ */ n.jsx(gt.Provider, { value: { id: a }, children: /* @__PURE__ */ n.jsx("div", { ref: o, className: c("space-y-2", r), ...t }) });
951
+ });
952
+ vt.displayName = "FormItem";
953
+ const bt = p.forwardRef(({ className: r, ...t }, o) => {
954
+ const { error: a, formItemId: i } = q();
955
+ return /* @__PURE__ */ n.jsx(
956
+ ce,
957
+ {
958
+ ref: o,
959
+ className: c(a && "text-destructive", r),
960
+ htmlFor: i,
961
+ ...t
962
+ }
963
+ );
964
+ });
965
+ bt.displayName = "FormLabel";
966
+ const xt = p.forwardRef(({ ...r }, t) => {
967
+ const { error: o, formItemId: a, formDescriptionId: i, formMessageId: d } = q();
968
+ return /* @__PURE__ */ n.jsx(
969
+ Ye,
970
+ {
971
+ ref: t,
972
+ id: a,
973
+ "aria-describedby": o ? `${i} ${d}` : `${i}`,
974
+ "aria-invalid": !!o,
975
+ ...r
976
+ }
977
+ );
978
+ });
979
+ xt.displayName = "FormControl";
980
+ const ht = p.forwardRef(({ className: r, ...t }, o) => {
981
+ const { formDescriptionId: a } = q();
982
+ return /* @__PURE__ */ n.jsx(
983
+ "p",
984
+ {
985
+ ref: o,
986
+ id: a,
987
+ className: c("text-sm text-muted-foreground", r),
988
+ ...t
989
+ }
990
+ );
991
+ });
992
+ ht.displayName = "FormDescription";
993
+ const yt = p.forwardRef(({ className: r, children: t, ...o }, a) => {
994
+ const { error: i, formMessageId: d } = q(), u = i ? String(i == null ? void 0 : i.message) : t;
995
+ return u ? /* @__PURE__ */ n.jsx(
996
+ "p",
997
+ {
998
+ ref: a,
999
+ id: d,
1000
+ className: c("text-sm font-medium text-destructive", r),
1001
+ ...o,
1002
+ children: u
1003
+ }
1004
+ ) : null;
1005
+ });
1006
+ yt.displayName = "FormMessage";
1007
+ const Ur = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1008
+ __proto__: null,
1009
+ Form: Wr,
1010
+ FormControl: xt,
1011
+ FormDescription: ht,
1012
+ FormField: Yr,
1013
+ FormItem: vt,
1014
+ FormLabel: bt,
1015
+ FormMessage: yt,
1016
+ useFormField: q
1017
+ }, Symbol.toStringTag, { value: "Module" })), Ct = p.forwardRef(
1018
+ ({ className: r, type: t, ...o }, a) => /* @__PURE__ */ n.jsx(
1019
+ "input",
1020
+ {
1021
+ type: t,
1022
+ className: c(
1023
+ "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
1024
+ r
1025
+ ),
1026
+ ref: a,
1027
+ ...o
1028
+ }
1029
+ )
1030
+ );
1031
+ Ct.displayName = "Input";
1032
+ const Gr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1033
+ __proto__: null,
1034
+ Input: Ct
1035
+ }, Symbol.toStringTag, { value: "Module" })), qr = ee.Root, Hr = ee.Trigger, jt = p.forwardRef(({ className: r, align: t = "center", sideOffset: o = 4, ...a }, i) => (
1036
+ // <PopoverPrimitive.Portal>
1037
+ /* @__PURE__ */ n.jsx(
1038
+ ee.Content,
1039
+ {
1040
+ ref: i,
1041
+ align: t,
1042
+ sideOffset: o,
1043
+ className: c(
1044
+ "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1045
+ r
1046
+ ),
1047
+ ...a
1048
+ }
1049
+ )
1050
+ ));
1051
+ jt.displayName = ee.Content.displayName;
1052
+ const Jr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1053
+ __proto__: null,
1054
+ Popover: qr,
1055
+ PopoverContent: jt,
1056
+ PopoverTrigger: Hr
1057
+ }, Symbol.toStringTag, { value: "Module" })), Kr = T.Root, Xr = T.Group, Zr = T.Value, wt = p.forwardRef(({ className: r, children: t, ...o }, a) => /* @__PURE__ */ n.jsxs(
1058
+ T.Trigger,
1059
+ {
1060
+ ref: a,
1061
+ className: c(
1062
+ "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
1063
+ r
1064
+ ),
1065
+ ...o,
1066
+ children: [
1067
+ t,
1068
+ /* @__PURE__ */ n.jsx(T.Icon, { asChild: !0, children: /* @__PURE__ */ n.jsx(qe, { className: "h-4 w-4 opacity-50" }) })
1069
+ ]
1070
+ }
1071
+ ));
1072
+ wt.displayName = T.Trigger.displayName;
1073
+ const ue = p.forwardRef(({ className: r, ...t }, o) => /* @__PURE__ */ n.jsx(
1074
+ T.ScrollUpButton,
1075
+ {
1076
+ ref: o,
1077
+ className: c(
1078
+ "flex cursor-default items-center justify-center py-1",
1079
+ r
1080
+ ),
1081
+ ...t,
1082
+ children: /* @__PURE__ */ n.jsx(wr, { className: "h-4 w-4" })
1083
+ }
1084
+ ));
1085
+ ue.displayName = T.ScrollUpButton.displayName;
1086
+ const fe = p.forwardRef(({ className: r, ...t }, o) => /* @__PURE__ */ n.jsx(
1087
+ T.ScrollDownButton,
1088
+ {
1089
+ ref: o,
1090
+ className: c(
1091
+ "flex cursor-default items-center justify-center py-1",
1092
+ r
1093
+ ),
1094
+ ...t,
1095
+ children: /* @__PURE__ */ n.jsx(qe, { className: "h-4 w-4" })
1096
+ }
1097
+ ));
1098
+ fe.displayName = T.ScrollDownButton.displayName;
1099
+ const Nt = p.forwardRef(({ className: r, children: t, position: o = "popper", ...a }, i) => (
1100
+ // <SelectPrimitive.Portal>
1101
+ /* @__PURE__ */ n.jsxs(
1102
+ T.Content,
1103
+ {
1104
+ ref: i,
1105
+ className: c(
1106
+ "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1107
+ o === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
1108
+ r
1109
+ ),
1110
+ position: o,
1111
+ ...a,
1112
+ children: [
1113
+ /* @__PURE__ */ n.jsx(ue, {}),
1114
+ /* @__PURE__ */ n.jsx(
1115
+ T.Viewport,
1116
+ {
1117
+ className: c(
1118
+ "p-1",
1119
+ o === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
1120
+ ),
1121
+ children: t
1122
+ }
1123
+ ),
1124
+ /* @__PURE__ */ n.jsx(fe, {})
1125
+ ]
1126
+ }
1127
+ )
1128
+ ));
1129
+ Nt.displayName = T.Content.displayName;
1130
+ const St = p.forwardRef(({ className: r, ...t }, o) => /* @__PURE__ */ n.jsx(
1131
+ T.Label,
1132
+ {
1133
+ ref: o,
1134
+ className: c("py-1.5 pl-8 pr-2 text-sm font-semibold", r),
1135
+ ...t
1136
+ }
1137
+ ));
1138
+ St.displayName = T.Label.displayName;
1139
+ const Tt = p.forwardRef(({ className: r, children: t, ...o }, a) => /* @__PURE__ */ n.jsxs(
1140
+ T.Item,
1141
+ {
1142
+ ref: a,
1143
+ className: c(
1144
+ "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1145
+ r
1146
+ ),
1147
+ ...o,
1148
+ children: [
1149
+ /* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(T.ItemIndicator, { children: /* @__PURE__ */ n.jsx(Ge, { className: "h-4 w-4" }) }) }),
1150
+ /* @__PURE__ */ n.jsx(T.ItemText, { children: t })
1151
+ ]
1152
+ }
1153
+ ));
1154
+ Tt.displayName = T.Item.displayName;
1155
+ const Rt = p.forwardRef(({ className: r, ...t }, o) => /* @__PURE__ */ n.jsx(
1156
+ T.Separator,
1157
+ {
1158
+ ref: o,
1159
+ className: c("-mx-1 my-1 h-px bg-muted", r),
1160
+ ...t
1161
+ }
1162
+ ));
1163
+ Rt.displayName = T.Separator.displayName;
1164
+ const Qr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1165
+ __proto__: null,
1166
+ Select: Kr,
1167
+ SelectContent: Nt,
1168
+ SelectGroup: Xr,
1169
+ SelectItem: Tt,
1170
+ SelectLabel: St,
1171
+ SelectScrollDownButton: fe,
1172
+ SelectScrollUpButton: ue,
1173
+ SelectSeparator: Rt,
1174
+ SelectTrigger: wt,
1175
+ SelectValue: Zr
1176
+ }, Symbol.toStringTag, { value: "Module" })), eo = L.Root, _t = p.forwardRef(({ className: r, ...t }, o) => /* @__PURE__ */ n.jsx(
1177
+ L.List,
1178
+ {
1179
+ ref: o,
1180
+ className: c(
1181
+ "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
1182
+ r
1183
+ ),
1184
+ ...t
1185
+ }
1186
+ ));
1187
+ _t.displayName = L.List.displayName;
1188
+ const Et = p.forwardRef(({ className: r, ...t }, o) => /* @__PURE__ */ n.jsx(
1189
+ L.Trigger,
1190
+ {
1191
+ ref: o,
1192
+ className: c(
1193
+ "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
1194
+ r
1195
+ ),
1196
+ ...t
1197
+ }
1198
+ ));
1199
+ Et.displayName = L.Trigger.displayName;
1200
+ const Pt = p.forwardRef(({ className: r, ...t }, o) => /* @__PURE__ */ n.jsx(
1201
+ L.Content,
1202
+ {
1203
+ ref: o,
1204
+ className: c(
1205
+ "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
1206
+ r
1207
+ ),
1208
+ ...t
1209
+ }
1210
+ ));
1211
+ Pt.displayName = L.Content.displayName;
1212
+ const to = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1213
+ __proto__: null,
1214
+ Tabs: eo,
1215
+ TabsContent: Pt,
1216
+ TabsList: _t,
1217
+ TabsTrigger: Et
1218
+ }, Symbol.toStringTag, { value: "Module" })), Dt = Q(
1219
+ "inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
1220
+ {
1221
+ variants: {
1222
+ variant: {
1223
+ default: "bg-transparent",
1224
+ outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
1225
+ },
1226
+ size: {
1227
+ default: "h-10 px-3",
1228
+ sm: "h-9 px-2.5",
1229
+ lg: "h-11 px-5"
1230
+ }
1231
+ },
1232
+ defaultVariants: {
1233
+ variant: "default",
1234
+ size: "default"
1235
+ }
1236
+ }
1237
+ ), Mt = p.forwardRef(({ className: r, variant: t, size: o, ...a }, i) => /* @__PURE__ */ n.jsx(
1238
+ Je.Root,
1239
+ {
1240
+ ref: i,
1241
+ className: c(Dt({ variant: t, size: o, className: r })),
1242
+ ...a
1243
+ }
1244
+ ));
1245
+ Mt.displayName = Je.Root.displayName;
1246
+ const ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1247
+ __proto__: null,
1248
+ Toggle: Mt,
1249
+ toggleVariants: Dt
1250
+ }, Symbol.toStringTag, { value: "Module" })), oo = G.Provider, no = G.Root, ao = G.Trigger, Ot = p.forwardRef(({ className: r, sideOffset: t = 4, ...o }, a) => /* @__PURE__ */ n.jsx(
1251
+ G.Content,
1252
+ {
1253
+ ref: a,
1254
+ sideOffset: t,
1255
+ className: c(
1256
+ "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1257
+ r
1258
+ ),
1259
+ ...o
1260
+ }
1261
+ ));
1262
+ Ot.displayName = G.Content.displayName;
1263
+ const so = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1264
+ __proto__: null,
1265
+ Tooltip: no,
1266
+ TooltipContent: Ot,
1267
+ TooltipProvider: oo,
1268
+ TooltipTrigger: ao
1269
+ }, Symbol.toStringTag, { value: "Module" })), io = {
1270
+ Badge: Dr,
1271
+ Button: Mr,
1272
+ Card: Or,
1273
+ DropdownMenu: Vr,
1274
+ Form: Ur,
1275
+ Input: Gr,
1276
+ Label: $r,
1277
+ Popover: Jr,
1278
+ Select: Qr,
1279
+ Tabs: to,
1280
+ Toggle: ro,
1281
+ Tooltip: so
1282
+ }, It = vr(void 0);
1283
+ function R() {
1284
+ return br(It);
1285
+ }
1286
+ const lo = (r) => {
1287
+ const { children: t, ...o } = r;
1288
+ j(o);
1289
+ const a = R(), i = Rr();
1290
+ return /* @__PURE__ */ n.jsx(a.Form.Form, { ...i, children: t });
1291
+ }, co = (r) => N((t, o) => /* @__PURE__ */ n.jsx(
1292
+ r,
1293
+ {
1294
+ onPointerDown: (a) => {
1295
+ a.nativeEvent.fakeEvent || (a.ctrlKey = !0);
1296
+ },
1297
+ onPointerUp: (a) => {
1298
+ const i = new PointerEvent("pointerdown", a.nativeEvent);
1299
+ i.fakeEvent = !0, a.target.dispatchEvent(i);
1300
+ },
1301
+ ...t,
1302
+ ref: o
1303
+ }
1304
+ )), uo = (r) => {
1305
+ const {
1306
+ children: t,
1307
+ onOpenChange: o,
1308
+ position: a,
1309
+ // Unused
1310
+ sub: i,
1311
+ ...d
1312
+ } = r;
1313
+ j(d);
1314
+ const u = R();
1315
+ return i ? /* @__PURE__ */ n.jsx(
1316
+ u.DropdownMenu.DropdownMenuSub,
1317
+ {
1318
+ onOpenChange: o,
1319
+ children: t
1320
+ }
1321
+ ) : /* @__PURE__ */ n.jsx(u.DropdownMenu.DropdownMenu, { onOpenChange: o, children: t });
1322
+ }, fo = (r) => {
1323
+ const { children: t, sub: o, ...a } = r;
1324
+ j(a);
1325
+ const i = R(), d = We(
1326
+ () => co(
1327
+ i.DropdownMenu.DropdownMenuTrigger
1328
+ ),
1329
+ [i.DropdownMenu.DropdownMenuTrigger]
1330
+ );
1331
+ return o ? /* @__PURE__ */ n.jsx(i.DropdownMenu.DropdownMenuSubTrigger, { children: t }) : /* @__PURE__ */ n.jsx(d, { asChild: !0, ...a, children: t });
1332
+ }, mo = N((r, t) => {
1333
+ const { className: o, children: a, sub: i, ...d } = r;
1334
+ j(d);
1335
+ const u = R();
1336
+ return i ? /* @__PURE__ */ n.jsx(
1337
+ u.DropdownMenu.DropdownMenuSubContent,
1338
+ {
1339
+ className: o,
1340
+ ref: t,
1341
+ children: a
1342
+ }
1343
+ ) : /* @__PURE__ */ n.jsx(
1344
+ u.DropdownMenu.DropdownMenuContent,
1345
+ {
1346
+ className: o,
1347
+ ref: t,
1348
+ children: a
1349
+ }
1350
+ );
1351
+ }), po = N((r, t) => {
1352
+ const { className: o, children: a, icon: i, checked: d, subTrigger: u, onClick: x, ...m } = r;
1353
+ j(m);
1354
+ const g = R();
1355
+ return u ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1356
+ i,
1357
+ a
1358
+ ] }) : d !== void 0 ? /* @__PURE__ */ n.jsxs(
1359
+ g.DropdownMenu.DropdownMenuCheckboxItem,
1360
+ {
1361
+ className: c(o, "gap-1"),
1362
+ ref: t,
1363
+ checked: d,
1364
+ onClick: x,
1365
+ ...m,
1366
+ children: [
1367
+ i,
1368
+ a
1369
+ ]
1370
+ }
1371
+ ) : /* @__PURE__ */ n.jsxs(
1372
+ g.DropdownMenu.DropdownMenuItem,
1373
+ {
1374
+ className: o,
1375
+ ref: t,
1376
+ onClick: x,
1377
+ ...m,
1378
+ children: [
1379
+ i,
1380
+ a,
1381
+ u && /* @__PURE__ */ n.jsx(Ue, { className: "ml-auto h-4 w-4" })
1382
+ ]
1383
+ }
1384
+ );
1385
+ }), go = N((r, t) => {
1386
+ const { className: o, ...a } = r;
1387
+ j(a);
1388
+ const i = R();
1389
+ return /* @__PURE__ */ n.jsx(
1390
+ i.DropdownMenu.DropdownMenuSeparator,
1391
+ {
1392
+ className: o,
1393
+ ref: t
1394
+ }
1395
+ );
1396
+ }), vo = N((r, t) => {
1397
+ const { className: o, children: a, ...i } = r;
1398
+ j(i);
1399
+ const d = R();
1400
+ return /* @__PURE__ */ n.jsx(
1401
+ d.DropdownMenu.DropdownMenuLabel,
1402
+ {
1403
+ className: o,
1404
+ ref: t,
1405
+ children: a
1406
+ }
1407
+ );
1408
+ }), bo = N((r, t) => {
1409
+ const {
1410
+ className: o,
1411
+ tabs: a,
1412
+ defaultOpenTab: i,
1413
+ openTab: d,
1414
+ setOpenTab: u,
1415
+ loading: x,
1416
+ // TODO: implement loader
1417
+ ...m
1418
+ } = r;
1419
+ j(m);
1420
+ const g = R();
1421
+ return /* @__PURE__ */ n.jsxs(
1422
+ g.Tabs.Tabs,
1423
+ {
1424
+ className: c(o, "bg-popover p-2 rounded-lg"),
1425
+ ref: t,
1426
+ value: d,
1427
+ defaultValue: i,
1428
+ onValueChange: u,
1429
+ children: [
1430
+ /* @__PURE__ */ n.jsx(g.Tabs.TabsList, { children: a.map((b) => /* @__PURE__ */ n.jsx(g.Tabs.TabsTrigger, { value: b.name, children: b.name }, b.name)) }),
1431
+ a.map((b) => /* @__PURE__ */ n.jsx(g.Tabs.TabsContent, { value: b.name, children: /* @__PURE__ */ n.jsx(g.Card.Card, { children: /* @__PURE__ */ n.jsx(g.Card.CardContent, { className: "p-4", children: b.tabPanel }) }) }, b.name))
1432
+ ]
1433
+ }
1434
+ );
1435
+ }), xo = N((r, t) => {
1436
+ const { className: o, children: a, onClick: i, label: d, ...u } = r;
1437
+ j(u);
1438
+ const x = R();
1439
+ return /* @__PURE__ */ n.jsx(
1440
+ x.Button.Button,
1441
+ {
1442
+ type: "submit",
1443
+ className: o,
1444
+ "aria-label": d,
1445
+ ref: t,
1446
+ onClick: i,
1447
+ children: a
1448
+ }
1449
+ );
1450
+ }), ho = N((r, t) => {
1451
+ const { className: o, value: a, placeholder: i, onChange: d, ...u } = r;
1452
+ j(u);
1453
+ const x = R();
1454
+ return /* @__PURE__ */ n.jsx(
1455
+ x.Input.Input,
1456
+ {
1457
+ type: "file",
1458
+ className: o,
1459
+ ref: t,
1460
+ value: a ? a.name : void 0,
1461
+ onChange: async (m) => d == null ? void 0 : d(m.target.files[0]),
1462
+ placeholder: i
1463
+ }
1464
+ );
1465
+ }), yo = N((r, t) => {
1466
+ const { className: o, children: a, ...i } = r;
1467
+ return j(i), /* @__PURE__ */ n.jsx(
1468
+ "div",
1469
+ {
1470
+ className: c(
1471
+ o,
1472
+ "flex flex-col gap-2 items-start justify-center"
1473
+ ),
1474
+ ref: t,
1475
+ children: a
1476
+ }
1477
+ );
1478
+ }), Co = N((r, t) => {
1479
+ const { className: o, value: a, placeholder: i, onKeyDown: d, onChange: u, ...x } = r;
1480
+ j(x);
1481
+ const m = R();
1482
+ return /* @__PURE__ */ n.jsx(
1483
+ m.Input.Input,
1484
+ {
1485
+ "data-test": "embed-input",
1486
+ className: c(o, "w-80"),
1487
+ ref: t,
1488
+ value: a,
1489
+ placeholder: i,
1490
+ onKeyDown: d,
1491
+ onChange: u
1492
+ }
1493
+ );
1494
+ }), jo = (r) => {
1495
+ const {
1496
+ children: t,
1497
+ opened: o,
1498
+ position: a,
1499
+ // unused
1500
+ ...i
1501
+ } = r;
1502
+ j(i);
1503
+ const d = R();
1504
+ return /* @__PURE__ */ n.jsx(d.Popover.Popover, { open: o, children: t });
1505
+ }, wo = N(
1506
+ (r, t) => {
1507
+ const { children: o, ...a } = r;
1508
+ j(a);
1509
+ const i = R();
1510
+ return /* @__PURE__ */ n.jsx(i.Popover.PopoverTrigger, { ref: t, asChild: !0, children: o });
1511
+ }
1512
+ ), No = N((r, t) => {
1513
+ const { className: o, variant: a, children: i, ...d } = r;
1514
+ j(d);
1515
+ const u = R();
1516
+ return /* @__PURE__ */ n.jsx(
1517
+ u.Popover.PopoverContent,
1518
+ {
1519
+ sideOffset: 8,
1520
+ className: c(
1521
+ o,
1522
+ "flex flex-col gap-2",
1523
+ a === "panel-popover" ? "p-0 border-none shadow-none max-w-none w-fit" : ""
1524
+ ),
1525
+ ref: t,
1526
+ children: i
1527
+ }
1528
+ );
1529
+ }), So = N((r, t) => {
1530
+ const { className: o, children: a, ...i } = r;
1531
+ return j(i), /* @__PURE__ */ n.jsx("div", { className: o, ref: t, children: a });
1532
+ }), To = N((r, t) => {
1533
+ const {
1534
+ className: o,
1535
+ children: a,
1536
+ icon: i,
1537
+ onClick: d,
1538
+ onDragEnd: u,
1539
+ onDragStart: x,
1540
+ draggable: m,
1541
+ label: g,
1542
+ ...b
1543
+ } = r;
1544
+ j(b, !1);
1545
+ const _ = R();
1546
+ return /* @__PURE__ */ n.jsxs(
1547
+ _.Button.Button,
1548
+ {
1549
+ variant: "ghost",
1550
+ className: c(o, "text-gray-400"),
1551
+ ref: t,
1552
+ "aria-label": g,
1553
+ onClick: d,
1554
+ onDragStart: x,
1555
+ onDragEnd: u,
1556
+ draggable: m,
1557
+ ...b,
1558
+ children: [
1559
+ i,
1560
+ a
1561
+ ]
1562
+ }
1563
+ );
1564
+ }), Ro = N((r, t) => {
1565
+ const { className: o, children: a, id: i, ...d } = r;
1566
+ return j(d), /* @__PURE__ */ n.jsx(
1567
+ "div",
1568
+ {
1569
+ id: i,
1570
+ role: "listbox",
1571
+ className: c(
1572
+ "z-50 min-w-[8rem] overflow-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1573
+ o
1574
+ ),
1575
+ ref: t,
1576
+ children: a
1577
+ }
1578
+ );
1579
+ }), _o = N((r, t) => {
1580
+ const { className: o, children: a, ...i } = r;
1581
+ return j(i), /* @__PURE__ */ n.jsx(
1582
+ "div",
1583
+ {
1584
+ className: c(
1585
+ "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1586
+ o
1587
+ ),
1588
+ ref: t,
1589
+ children: /* @__PURE__ */ n.jsx("div", { children: a })
1590
+ }
1591
+ );
1592
+ }), Eo = N((r, t) => {
1593
+ const o = R(), { className: a, item: i, isSelected: d, onClick: u, id: x, ...m } = r;
1594
+ return j(m), /* @__PURE__ */ n.jsxs(
1595
+ "div",
1596
+ {
1597
+ className: c(
1598
+ "relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1599
+ a
1600
+ ),
1601
+ ref: t,
1602
+ id: x,
1603
+ onClick: u,
1604
+ role: "option",
1605
+ "aria-selected": d || void 0,
1606
+ children: [
1607
+ i.icon && /* @__PURE__ */ n.jsx("div", { className: "p-3", "data-position": "left", children: i.icon }),
1608
+ /* @__PURE__ */ n.jsxs("div", { className: "flex-1", children: [
1609
+ /* @__PURE__ */ n.jsx("div", { className: "text-base", children: i.title }),
1610
+ /* @__PURE__ */ n.jsx("div", { className: "text-xs", children: i.subtext })
1611
+ ] }),
1612
+ i.badge && /* @__PURE__ */ n.jsx("div", { "data-position": "right", className: "text-xs", children: /* @__PURE__ */ n.jsx(o.Badge.Badge, { variant: "secondary", children: i.badge }) })
1613
+ ]
1614
+ }
1615
+ );
1616
+ }), Po = N((r, t) => {
1617
+ const { className: o, children: a, ...i } = r;
1618
+ return j(i), /* @__PURE__ */ n.jsx(
1619
+ "div",
1620
+ {
1621
+ className: c("px-2 py-1.5 text-sm font-semibold", o),
1622
+ ref: t,
1623
+ children: a
1624
+ }
1625
+ );
1626
+ }), Do = N((r, t) => {
1627
+ const { className: o, children: a, ...i } = r;
1628
+ return j(i), /* @__PURE__ */ n.jsx("div", { className: o, ref: t, children: a });
1629
+ }), Mo = N((r, t) => {
1630
+ const {
1631
+ className: o,
1632
+ children: a,
1633
+ draggable: i,
1634
+ onDragStart: d,
1635
+ onDragEnd: u,
1636
+ style: x,
1637
+ label: m,
1638
+ ...g
1639
+ } = r;
1640
+ j(g, !1);
1641
+ const b = R();
1642
+ return /* @__PURE__ */ n.jsx(
1643
+ b.Button.Button,
1644
+ {
1645
+ variant: "ghost",
1646
+ className: c(o, "p-0 h-fit w-fit text-gray-400"),
1647
+ ref: t,
1648
+ "aria-label": m,
1649
+ draggable: i,
1650
+ onDragStart: d,
1651
+ onDragEnd: u,
1652
+ style: x,
1653
+ ...g,
1654
+ children: a
1655
+ }
1656
+ );
1657
+ }), Oo = N(
1658
+ (r) => {
1659
+ const {
1660
+ className: t,
1661
+ name: o,
1662
+ label: a,
1663
+ icon: i,
1664
+ // TODO: implement
1665
+ value: d,
1666
+ autoFocus: u,
1667
+ placeholder: x,
1668
+ onKeyDown: m,
1669
+ onChange: g,
1670
+ onSubmit: b,
1671
+ ..._
1672
+ } = r;
1673
+ j(_);
1674
+ const P = R();
1675
+ return a ? /* @__PURE__ */ n.jsxs("div", { children: [
1676
+ /* @__PURE__ */ n.jsx(P.Label.Label, { htmlFor: a, children: a }),
1677
+ /* @__PURE__ */ n.jsx(
1678
+ P.Input.Input,
1679
+ {
1680
+ className: t,
1681
+ id: a,
1682
+ name: o,
1683
+ autoFocus: u,
1684
+ placeholder: x,
1685
+ value: d,
1686
+ onKeyDown: m,
1687
+ onChange: g,
1688
+ onSubmit: b
1689
+ }
1690
+ )
1691
+ ] }) : /* @__PURE__ */ n.jsx(
1692
+ P.Input.Input,
1693
+ {
1694
+ "aria-label": o,
1695
+ name: o,
1696
+ autoFocus: u,
1697
+ placeholder: x,
1698
+ value: d,
1699
+ onKeyDown: m,
1700
+ onChange: g,
1701
+ onSubmit: b
1702
+ }
1703
+ );
1704
+ }
1705
+ ), Ve = N(
1706
+ (r, t) => {
1707
+ const { className: o, children: a, onMouseEnter: i, onMouseLeave: d, ...u } = r;
1708
+ j(u);
1709
+ const x = R();
1710
+ return /* @__PURE__ */ n.jsx(x.Tooltip.TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ n.jsx(
1711
+ "div",
1712
+ {
1713
+ className: c(
1714
+ o,
1715
+ "flex gap-1 p-1 bg-popover text-popover-foreground border rounded-lg shadow-md"
1716
+ ),
1717
+ ref: t,
1718
+ onMouseEnter: i,
1719
+ onMouseLeave: d,
1720
+ children: a
1721
+ }
1722
+ ) });
1723
+ }
1724
+ ), Ae = N(
1725
+ (r, t) => {
1726
+ const {
1727
+ className: o,
1728
+ children: a,
1729
+ mainTooltip: i,
1730
+ secondaryTooltip: d,
1731
+ icon: u,
1732
+ isSelected: x,
1733
+ isDisabled: m,
1734
+ onClick: g,
1735
+ label: b,
1736
+ ..._
1737
+ } = r;
1738
+ j(_, !1);
1739
+ const P = R(), B = x === void 0 ? /* @__PURE__ */ n.jsxs(
1740
+ P.Button.Button,
1741
+ {
1742
+ className: o,
1743
+ variant: "ghost",
1744
+ disabled: m,
1745
+ onClick: g,
1746
+ ref: t,
1747
+ "aria-label": b,
1748
+ ..._,
1749
+ children: [
1750
+ u,
1751
+ a
1752
+ ]
1753
+ }
1754
+ ) : /* @__PURE__ */ n.jsxs(
1755
+ P.Toggle.Toggle,
1756
+ {
1757
+ className: c(
1758
+ o,
1759
+ "data-[state=open]:bg-accent data-[state=closed]:text-accent-foreground"
1760
+ ),
1761
+ "aria-label": b,
1762
+ onClick: g,
1763
+ pressed: x,
1764
+ disabled: m,
1765
+ "data-state": x ? "on" : "off",
1766
+ "data-disabled": m,
1767
+ ref: t,
1768
+ ..._,
1769
+ children: [
1770
+ u,
1771
+ a
1772
+ ]
1773
+ }
1774
+ );
1775
+ return /* @__PURE__ */ n.jsxs(P.Tooltip.Tooltip, { children: [
1776
+ /* @__PURE__ */ n.jsx(P.Tooltip.TooltipTrigger, { asChild: !0, children: B }),
1777
+ /* @__PURE__ */ n.jsxs(
1778
+ P.Tooltip.TooltipContent,
1779
+ {
1780
+ className: "flex flex-col items-center",
1781
+ children: [
1782
+ /* @__PURE__ */ n.jsx("span", { children: i }),
1783
+ d && /* @__PURE__ */ n.jsx("span", { children: d })
1784
+ ]
1785
+ }
1786
+ )
1787
+ ] });
1788
+ }
1789
+ ), Io = N((r, t) => {
1790
+ const { className: o, items: a, isDisabled: i, ...d } = r;
1791
+ j(d);
1792
+ const u = R(), x = (g) => /* @__PURE__ */ n.jsxs("div", { className: "flex gap-1 items-center", children: [
1793
+ g.icon,
1794
+ g.text
1795
+ ] }), m = a.filter((g) => g.isSelected)[0];
1796
+ return m ? /* @__PURE__ */ n.jsxs(
1797
+ u.Select.Select,
1798
+ {
1799
+ value: m.text,
1800
+ onValueChange: (g) => {
1801
+ var b, _;
1802
+ return (_ = (b = a.find((P) => P.text === g)).onClick) == null ? void 0 : _.call(b);
1803
+ },
1804
+ disabled: i,
1805
+ children: [
1806
+ /* @__PURE__ */ n.jsx(u.Select.SelectTrigger, { className: "border-none", children: /* @__PURE__ */ n.jsx(u.Select.SelectValue, {}) }),
1807
+ /* @__PURE__ */ n.jsx(u.Select.SelectContent, { className: o, ref: t, children: a.map((g) => /* @__PURE__ */ n.jsx(
1808
+ u.Select.SelectItem,
1809
+ {
1810
+ disabled: g.isDisabled,
1811
+ value: g.text,
1812
+ children: /* @__PURE__ */ n.jsx(x, { ...g })
1813
+ },
1814
+ g.text
1815
+ )) })
1816
+ ]
1817
+ }
1818
+ ) : null;
1819
+ });
1820
+ const Fo = {
1821
+ FormattingToolbar: {
1822
+ Root: Ve,
1823
+ Button: Ae,
1824
+ Select: Io
1825
+ },
1826
+ ImagePanel: {
1827
+ Root: bo,
1828
+ Button: xo,
1829
+ FileInput: ho,
1830
+ TabPanel: yo,
1831
+ TextInput: Co
1832
+ },
1833
+ LinkToolbar: {
1834
+ Root: Ve,
1835
+ Button: Ae
1836
+ },
1837
+ SideMenu: {
1838
+ Root: So,
1839
+ Button: To
1840
+ },
1841
+ SuggestionMenu: {
1842
+ Root: Ro,
1843
+ Item: Eo,
1844
+ EmptyItem: _o,
1845
+ Label: Po,
1846
+ Loader: Do
1847
+ },
1848
+ TableHandle: {
1849
+ Root: Mo
1850
+ },
1851
+ Generic: {
1852
+ Form: {
1853
+ Root: lo,
1854
+ TextInput: Oo
1855
+ },
1856
+ Menu: {
1857
+ Root: uo,
1858
+ Trigger: fo,
1859
+ Dropdown: mo,
1860
+ Divider: go,
1861
+ Label: vo,
1862
+ Item: po
1863
+ },
1864
+ Popover: {
1865
+ Root: jo,
1866
+ Trigger: wo,
1867
+ Content: No
1868
+ }
1869
+ }
1870
+ }, Uo = (r) => {
1871
+ const { shadCNComponents: t, ...o } = r, a = We(() => ({
1872
+ ...t,
1873
+ ...io
1874
+ }), [t]);
1875
+ return /* @__PURE__ */ n.jsx(It.Provider, { value: a, children: /* @__PURE__ */ n.jsx(xr.Provider, { value: Fo, children: /* @__PURE__ */ n.jsx(hr, { ...o }) }) });
1876
+ };
1877
+ export {
1878
+ Uo as BlockNoteView,
1879
+ Fo as components
1880
+ };
1881
+ //# sourceMappingURL=blocknote-shadcn.js.map