@marimo-team/islands 0.23.7-dev47 → 0.23.7-dev48

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 (27) hide show
  1. package/dist/{chat-ui-CufH8sfF.js → chat-ui-D8ZxPNTR.js} +3 -3
  2. package/dist/{code-visibility-C4KEMmUK.js → code-visibility-An0P9cL_.js} +1265 -935
  3. package/dist/{glide-data-editor-BK9s_dqy.js → glide-data-editor-DucgdjRo.js} +1 -1
  4. package/dist/{html-to-image-DxWM1HVj.js → html-to-image-DaPPaVDP.js} +1 -1
  5. package/dist/{input-Cc1Vvw9A.js → input-D4kjoQUB.js} +2 -0
  6. package/dist/main.js +8 -8
  7. package/dist/{process-output-DBYxXdrN.js → process-output-n0RJTxcC.js} +1 -1
  8. package/dist/{reveal-component-Dx7r_prC.js → reveal-component-B23qYh6r.js} +3 -3
  9. package/dist/style.css +1 -1
  10. package/package.json +1 -1
  11. package/src/components/data-table/__tests__/column-header.test.ts +3 -1
  12. package/src/components/data-table/__tests__/column-header.test.tsx +203 -0
  13. package/src/components/data-table/__tests__/filter-by-values-picker.test.tsx +112 -0
  14. package/src/components/data-table/__tests__/filter-pill-editor.test.tsx +175 -0
  15. package/src/components/data-table/__tests__/filters.test.ts +112 -36
  16. package/src/components/data-table/column-header.tsx +210 -157
  17. package/src/components/data-table/filter-by-values-picker.tsx +70 -9
  18. package/src/components/data-table/filter-pill-editor.tsx +289 -144
  19. package/src/components/data-table/filter-pills.tsx +49 -8
  20. package/src/components/data-table/filters.ts +131 -36
  21. package/src/components/data-table/header-items.tsx +8 -1
  22. package/src/components/data-table/operator-labels.ts +25 -0
  23. package/src/components/data-table/regex-input.tsx +61 -0
  24. package/src/components/ui/combobox.tsx +3 -2
  25. package/src/components/ui/number-field.tsx +2 -0
  26. package/src/plugins/impl/data-frames/forms/__tests__/__snapshots__/form.test.tsx.snap +24 -24
  27. package/src/plugins/impl/data-frames/schema.ts +4 -1
@@ -6,13 +6,13 @@ import { _ as Logger, c as Objects, g as cn, h as Events, m as useComposedRefs,
6
6
  import { t as require_react } from "./react-DA-nE2FX.js";
7
7
  import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
8
8
  import { n as Copy, r as toast, t as copyToClipboard } from "./copy-DLf4aN7I.js";
9
- import { $ as useCellActions, $t as getTracebackInfo, A as ChevronRightIcon, An as Minus, C as AccordionContent, En as Trash2, Ft as jotaiJsonStorage, Hn as esm_default, I as base64ToUint8Array, In as ExternalLink, Jt as useRequestClient, Kt as getRequestClient, Lt as PluralWord, M as PinLeftIcon, Mt as useChromeActions, N as PinRightIcon, O as CheckIcon, Pn as FileText, Pt as adaptForLocalStorage, Qt as extractAllTracebackInfo, R as extractBase64FromDataURL, S as Accordion, St as Checkbox, T as AccordionTrigger, Tn as Wrench, Un as import_lib, V as renderHTML, Vn as Braces, Y as notebookAtom, Zt as elementContainsMarimoCellFile, _n as atomWithStorage, _t as getCellDomProps, at as AnsiUp, bn as Close$1, c as Popover, cn as SCRATCH_CELL_ID, ct as kioskModeAtom, d as PopoverTrigger, dt as outputIsLoading, et as useCellIds, g as getDatasourceContext, gt as DATA_CELL_ID, hn as jsonToTSV, ht as sanitizeHtml, j as DotFilledIcon, jn as LoaderCircle, kn as NotebookPen, kt as goToCellLine, l as PopoverClose$1, lt as useInstallAllowed, m as useExpandedOutput, mn as jsonToMarkdown, n as MarkdownRenderer, nn as filenameAtom, on as CellOutputId, pn as jsonParseWithSpecialChar, q as getCellEditorView, s as Spinner, sn as HTMLCellId, t as toPng, tt as useCellNames, u as PopoverContent, ut as viewStateAtom, vt as displayCellName, w as AccordionItem, z as isDataURLString, zn as CircleX, zt as DATA_TYPE_ICON, __tla as __tla_0 } from "./html-to-image-DxWM1HVj.js";
9
+ import { $ as useCellActions, $t as getTracebackInfo, A as ChevronRightIcon, An as Minus, C as AccordionContent, En as Trash2, Ft as jotaiJsonStorage, Hn as esm_default, I as base64ToUint8Array, In as ExternalLink, Jt as useRequestClient, Kt as getRequestClient, Lt as PluralWord, M as PinLeftIcon, Mt as useChromeActions, N as PinRightIcon, O as CheckIcon, Pn as FileText, Pt as adaptForLocalStorage, Qt as extractAllTracebackInfo, R as extractBase64FromDataURL, S as Accordion, St as Checkbox, T as AccordionTrigger, Tn as Wrench, Un as import_lib, V as renderHTML, Vn as Braces, Y as notebookAtom, Zt as elementContainsMarimoCellFile, _n as atomWithStorage, _t as getCellDomProps, at as AnsiUp, bn as Close$1, c as Popover, cn as SCRATCH_CELL_ID, ct as kioskModeAtom, d as PopoverTrigger, dt as outputIsLoading, et as useCellIds, g as getDatasourceContext, gt as DATA_CELL_ID, hn as jsonToTSV, ht as sanitizeHtml, j as DotFilledIcon, jn as LoaderCircle, kn as NotebookPen, kt as goToCellLine, l as PopoverClose$1, lt as useInstallAllowed, m as useExpandedOutput, mn as jsonToMarkdown, n as MarkdownRenderer, nn as filenameAtom, on as CellOutputId, pn as jsonParseWithSpecialChar, q as getCellEditorView, s as Spinner, sn as HTMLCellId, t as toPng, tt as useCellNames, u as PopoverContent, ut as viewStateAtom, vt as displayCellName, w as AccordionItem, z as isDataURLString, zn as CircleX, zt as DATA_TYPE_ICON, __tla as __tla_0 } from "./html-to-image-DaPPaVDP.js";
10
10
  import { o as useSize, u as createLucideIcon } from "./dist-D3ZI9nhS.js";
11
11
  import { i as createReducerAndAtoms, r as Badge } from "./useLifecycle-BF6-z62y.js";
12
12
  import { a as ListFilter, i as Table$1, o as ChartPie, t as $896ba0a80a8f4d36$export$85fd5fdf27bacc79 } from "./useDateFormatter-B_9k85Ex.js";
13
13
  import { t as Check } from "./check-BcUIXnUT.js";
14
- import { C as $a916eb452884faea$export$b7a616150fdb9f44, F as X, L as ChevronDown, M as usePrevious$1, N as useDirection, S as logNever, T as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, _ as menuItemVariants, b as menuSubTriggerVariants, c as SelectSeparator, g as menuControlVariants, h as menuControlCheckVariants, i as SelectContent, l as SelectTrigger, m as menuContentCommon, n as capitalize, o as SelectItem, p as MENU_ITEM_DISABLED, r as Select, t as Strings, u as SelectValue, v as menuLabelVariants, x as assertNever, y as menuSeparatorVariants } from "./strings-BiIhGaI8.js";
15
- import { $t as Portal, G as marked, Gt as Anchor2, Jt as Content2$1, Kt as Arrow2, Qt as Label, Xt as Item2$2, Yt as Group, Zt as ItemIndicator, _ as DropdownMenuSub, a as NumberField, an as SubContent, b as DropdownMenuTrigger, c as prettyNumber, cn as Item, d as DropdownMenuContent, dn as Search, en as RadioGroup$2, fn as Circle, g as DropdownMenuSeparator, h as DropdownMenuPortal, in as Sub, l as prettyScientificNumber, ln as Root$2, m as DropdownMenuLabel, nn as Root3, o as maxFractionalDigits, on as SubTrigger, p as DropdownMenuItem, pn as ChevronRight, qt as CheckboxItem, r as Input, rn as Separator$1, s as prettyEngineeringNumber, sn as createMenuScope, tn as RadioItem, u as DropdownMenu, un as createRovingFocusGroupScope, v as DropdownMenuSubContent, y as DropdownMenuSubTrigger } from "./input-Cc1Vvw9A.js";
14
+ import { C as $a916eb452884faea$export$b7a616150fdb9f44, F as X, L as ChevronDown, M as usePrevious$1, N as useDirection, S as logNever, T as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, _ as menuItemVariants, b as menuSubTriggerVariants, g as menuControlVariants, h as menuControlCheckVariants, i as SelectContent, l as SelectTrigger, m as menuContentCommon, o as SelectItem, p as MENU_ITEM_DISABLED, r as Select, t as Strings, u as SelectValue, v as menuLabelVariants, x as assertNever, y as menuSeparatorVariants } from "./strings-BiIhGaI8.js";
15
+ import { $t as Portal, G as marked, Gt as Anchor2, Jt as Content2$1, Kt as Arrow2, Qt as Label, Xt as Item2$2, Yt as Group, Zt as ItemIndicator, _ as DropdownMenuSub, a as NumberField, an as SubContent, b as DropdownMenuTrigger, c as prettyNumber, cn as Item, d as DropdownMenuContent, dn as Search, en as RadioGroup$2, fn as Circle, g as DropdownMenuSeparator, h as DropdownMenuPortal, in as Sub, l as prettyScientificNumber, ln as Root$2, m as DropdownMenuLabel, nn as Root3, o as maxFractionalDigits, on as SubTrigger, p as DropdownMenuItem, pn as ChevronRight, qt as CheckboxItem, r as Input, rn as Separator$1, s as prettyEngineeringNumber, sn as createMenuScope, tn as RadioItem, u as DropdownMenu, un as createRovingFocusGroupScope, v as DropdownMenuSubContent, y as DropdownMenuSubTrigger } from "./input-D4kjoQUB.js";
16
16
  import { _ as isWasm, a as millisecondsInMinute, c as asRemoteURL, d as isStaticNotebook, i as millisecondsInHour, n as constructFrom, o as millisecondsInSecond, p as isUrl, r as millisecondsInDay, s as millisecondsInWeek, t as toDate } from "./toDate-CJWlVNGD.js";
17
17
  import { n as clsx_default } from "./clsx-CyyyQ8Ue.js";
18
18
  import { t as require_react_dom } from "./react-dom-BWRJ_g_k.js";
@@ -5653,9 +5653,9 @@ Defaulting to \`null\`.`;
5653
5653
  t,
5654
5654
  i.name
5655
5655
  ]), null;
5656
- }), import_compiler_runtime$51 = require_compiler_runtime();
5656
+ }), import_compiler_runtime$52 = require_compiler_runtime();
5657
5657
  EmotionCacheProvider = (e) => {
5658
- let t = (0, import_compiler_runtime$51.c)(6), { container: n, children: i } = e, a;
5658
+ let t = (0, import_compiler_runtime$52.c)(6), { container: n, children: i } = e, a;
5659
5659
  bb0: {
5660
5660
  if (!n) {
5661
5661
  let e3;
@@ -6059,7 +6059,7 @@ Defaulting to \`null\`.`;
6059
6059
  return (!n || Object.keys(n).length === 0) && delete e2[t2], e2;
6060
6060
  }, t);
6061
6061
  }
6062
- function capitalize$1(e) {
6062
+ function capitalize(e) {
6063
6063
  if (typeof e != "string") throw Error(formatMuiErrorMessage(7));
6064
6064
  return e.charAt(0).toUpperCase() + e.slice(1);
6065
6065
  }
@@ -6081,7 +6081,7 @@ Defaulting to \`null\`.`;
6081
6081
  let o2 = e2[t], s = e2.theme, c = getPath(s, i) || {};
6082
6082
  return handleBreakpoints(e2, o2, (e3) => {
6083
6083
  let i2 = getStyleValue$1(c, a, e3);
6084
- return e3 === i2 && typeof e3 == "string" && (i2 = getStyleValue$1(c, a, `${t}${e3 === "default" ? "" : capitalize$1(e3)}`, e3)), n === false ? i2 : {
6084
+ return e3 === i2 && typeof e3 == "string" && (i2 = getStyleValue$1(c, a, `${t}${e3 === "default" ? "" : capitalize(e3)}`, e3)), n === false ? i2 : {
6085
6085
  [n]: i2
6086
6086
  };
6087
6087
  });
@@ -6669,7 +6669,7 @@ Defaulting to \`null\`.`;
6669
6669
  let h = getPath(n, c) || {};
6670
6670
  return f ? f(a) : handleBreakpoints(a, t2, (t3) => {
6671
6671
  let n2 = getStyleValue$1(h, d, t3);
6672
- return t3 === n2 && typeof t3 == "string" && (n2 = getStyleValue$1(h, d, `${e2}${t3 === "default" ? "" : capitalize$1(t3)}`, t3)), s === false ? n2 : {
6672
+ return t3 === n2 && typeof t3 == "string" && (n2 = getStyleValue$1(h, d, `${e2}${t3 === "default" ? "" : capitalize(t3)}`, t3)), s === false ? n2 : {
6673
6673
  [s]: n2
6674
6674
  };
6675
6675
  });
@@ -7568,33 +7568,33 @@ try {
7568
7568
  }, f = import_react.createContext(void 0), h = () => import_react.useContext(f) || d, _ = {}, v = {};
7569
7569
  function y(e2) {
7570
7570
  var _a2, _b, _c, _d;
7571
- let { children: d2, theme: h2, modeStorageKey: y2 = i, colorSchemeStorageKey: S2 = a, disableTransitionOnChange: w2 = o, storageManager: E, storageWindow: O = typeof window > "u" ? void 0 : window, documentNode: A = typeof document > "u" ? void 0 : document, colorSchemeNode: M = typeof document > "u" ? void 0 : document.documentElement, disableNestedContext: I = false, disableStyleSheetGeneration: z = false, defaultMode: U = "system", noSsr: K } = e2, q = import_react.useRef(false), J = useTheme$2(), Q = import_react.useContext(f), EN = !!Q && !I, $ = import_react.useMemo(() => h2 || (typeof n == "function" ? n() : n), [
7571
+ let { children: d2, theme: h2, modeStorageKey: y2 = i, colorSchemeStorageKey: S2 = a, disableTransitionOnChange: w2 = o, storageManager: E, storageWindow: O = typeof window > "u" ? void 0 : window, documentNode: A = typeof document > "u" ? void 0 : document, colorSchemeNode: M = typeof document > "u" ? void 0 : document.documentElement, disableNestedContext: I = false, disableStyleSheetGeneration: z = false, defaultMode: U = "system", noSsr: K } = e2, q = import_react.useRef(false), J = useTheme$2(), Q = import_react.useContext(f), UN = !!Q && !I, $ = import_react.useMemo(() => h2 || (typeof n == "function" ? n() : n), [
7572
7572
  h2
7573
- ]), DN = $[t], ON = DN || $, { colorSchemes: kN = _, components: AN = v, cssVarPrefix: jN } = ON, MN = Object.keys(kN).filter((e3) => !!kN[e3]).join(","), NN = import_react.useMemo(() => MN.split(","), [
7574
- MN
7575
- ]), PN = typeof s == "string" ? s : s.light, FN = typeof s == "string" ? s : s.dark, { mode: IN, setMode: LN, systemMode: RN, lightColorScheme: zN, darkColorScheme: BN, colorScheme: VN, setColorScheme: HN } = useCurrentColorScheme({
7576
- supportedColorSchemes: NN,
7577
- defaultLightColorScheme: PN,
7578
- defaultDarkColorScheme: FN,
7573
+ ]), WN = $[t], GN = WN || $, { colorSchemes: KN = _, components: qN = v, cssVarPrefix: JN } = GN, YN = Object.keys(KN).filter((e3) => !!KN[e3]).join(","), XN = import_react.useMemo(() => YN.split(","), [
7574
+ YN
7575
+ ]), ZN = typeof s == "string" ? s : s.light, QN = typeof s == "string" ? s : s.dark, { mode: $N, setMode: eP, systemMode: tP, lightColorScheme: nP, darkColorScheme: rP, colorScheme: iP, setColorScheme: aP } = useCurrentColorScheme({
7576
+ supportedColorSchemes: XN,
7577
+ defaultLightColorScheme: ZN,
7578
+ defaultDarkColorScheme: QN,
7579
7579
  modeStorageKey: y2,
7580
7580
  colorSchemeStorageKey: S2,
7581
- defaultMode: kN[PN] && kN[FN] ? U : ((_b = (_a2 = kN[ON.defaultColorScheme]) == null ? void 0 : _a2.palette) == null ? void 0 : _b.mode) || ((_c = ON.palette) == null ? void 0 : _c.mode),
7581
+ defaultMode: KN[ZN] && KN[QN] ? U : ((_b = (_a2 = KN[GN.defaultColorScheme]) == null ? void 0 : _a2.palette) == null ? void 0 : _b.mode) || ((_c = GN.palette) == null ? void 0 : _c.mode),
7582
7582
  storageManager: E,
7583
7583
  storageWindow: O,
7584
7584
  noSsr: K
7585
- }), UN = IN, WN = VN;
7586
- EN && (UN = Q.mode, WN = Q.colorScheme);
7587
- let GN = import_react.useMemo(() => {
7585
+ }), oP = $N, sP = iP;
7586
+ UN && (oP = Q.mode, sP = Q.colorScheme);
7587
+ let cP = import_react.useMemo(() => {
7588
7588
  var _a3;
7589
- let e3 = WN || ON.defaultColorScheme, t2 = ((_a3 = ON.generateThemeVars) == null ? void 0 : _a3.call(ON)) || ON.vars, n2 = {
7590
- ...ON,
7591
- components: AN,
7592
- colorSchemes: kN,
7593
- cssVarPrefix: jN,
7589
+ let e3 = sP || GN.defaultColorScheme, t2 = ((_a3 = GN.generateThemeVars) == null ? void 0 : _a3.call(GN)) || GN.vars, n2 = {
7590
+ ...GN,
7591
+ components: qN,
7592
+ colorSchemes: KN,
7593
+ cssVarPrefix: JN,
7594
7594
  vars: t2
7595
7595
  };
7596
7596
  if (typeof n2.generateSpacing == "function" && (n2.spacing = n2.generateSpacing()), e3) {
7597
- let t3 = kN[e3];
7597
+ let t3 = KN[e3];
7598
7598
  t3 && typeof t3 == "object" && Object.keys(t3).forEach((e4) => {
7599
7599
  t3[e4] && typeof t3[e4] == "object" ? n2[e4] = {
7600
7600
  ...n2[e4],
@@ -7604,31 +7604,31 @@ try {
7604
7604
  }
7605
7605
  return c ? c(n2) : n2;
7606
7606
  }, [
7607
- ON,
7608
- WN,
7609
- AN,
7610
- kN,
7611
- jN
7612
- ]), KN = ON.colorSchemeSelector;
7607
+ GN,
7608
+ sP,
7609
+ qN,
7610
+ KN,
7611
+ JN
7612
+ ]), lP = GN.colorSchemeSelector;
7613
7613
  useEnhancedEffect_default(() => {
7614
- if (WN && M && KN && KN !== "media") {
7615
- let e3 = KN, t2 = KN;
7616
- if (e3 === "class" && (t2 = ".%s"), e3 === "data" && (t2 = "[data-%s]"), (e3 == null ? void 0 : e3.startsWith("data-")) && !e3.includes("%s") && (t2 = `[${e3}="%s"]`), t2.startsWith(".")) M.classList.remove(...NN.map((e4) => t2.substring(1).replace("%s", e4))), M.classList.add(t2.substring(1).replace("%s", WN));
7614
+ if (sP && M && lP && lP !== "media") {
7615
+ let e3 = lP, t2 = lP;
7616
+ if (e3 === "class" && (t2 = ".%s"), e3 === "data" && (t2 = "[data-%s]"), (e3 == null ? void 0 : e3.startsWith("data-")) && !e3.includes("%s") && (t2 = `[${e3}="%s"]`), t2.startsWith(".")) M.classList.remove(...XN.map((e4) => t2.substring(1).replace("%s", e4))), M.classList.add(t2.substring(1).replace("%s", sP));
7617
7617
  else {
7618
- let e4 = t2.replace("%s", WN).match(/\[([^\]]+)\]/);
7618
+ let e4 = t2.replace("%s", sP).match(/\[([^\]]+)\]/);
7619
7619
  if (e4) {
7620
7620
  let [t3, n2] = e4[1].split("=");
7621
- n2 || NN.forEach((e5) => {
7622
- M.removeAttribute(t3.replace(WN, e5));
7621
+ n2 || XN.forEach((e5) => {
7622
+ M.removeAttribute(t3.replace(sP, e5));
7623
7623
  }), M.setAttribute(t3, n2 ? n2.replace(/"|'/g, "") : "");
7624
- } else M.setAttribute(t2, WN);
7624
+ } else M.setAttribute(t2, sP);
7625
7625
  }
7626
7626
  }
7627
7627
  }, [
7628
- WN,
7629
- KN,
7628
+ sP,
7629
+ lP,
7630
7630
  M,
7631
- NN
7631
+ XN
7632
7632
  ]), import_react.useEffect(() => {
7633
7633
  let e3;
7634
7634
  if (w2 && q.current && A) {
@@ -7641,48 +7641,48 @@ try {
7641
7641
  clearTimeout(e3);
7642
7642
  };
7643
7643
  }, [
7644
- WN,
7644
+ sP,
7645
7645
  w2,
7646
7646
  A
7647
7647
  ]), import_react.useEffect(() => (q.current = true, () => {
7648
7648
  q.current = false;
7649
7649
  }), []);
7650
- let qN = import_react.useMemo(() => ({
7651
- allColorSchemes: NN,
7652
- colorScheme: WN,
7653
- darkColorScheme: BN,
7654
- lightColorScheme: zN,
7655
- mode: UN,
7656
- setColorScheme: HN,
7657
- setMode: LN,
7658
- systemMode: RN
7650
+ let uP = import_react.useMemo(() => ({
7651
+ allColorSchemes: XN,
7652
+ colorScheme: sP,
7653
+ darkColorScheme: rP,
7654
+ lightColorScheme: nP,
7655
+ mode: oP,
7656
+ setColorScheme: aP,
7657
+ setMode: eP,
7658
+ systemMode: tP
7659
7659
  }), [
7660
- NN,
7661
- WN,
7662
- BN,
7663
- zN,
7664
- UN,
7665
- HN,
7666
- LN,
7667
- RN,
7668
- GN.colorSchemeSelector
7669
- ]), JN = true;
7670
- (z || ON.cssVariables === false || EN && (J == null ? void 0 : J.cssVarPrefix) === jN) && (JN = false);
7671
- let YN = (0, import_jsx_runtime.jsxs)(import_react.Fragment, {
7660
+ XN,
7661
+ sP,
7662
+ rP,
7663
+ nP,
7664
+ oP,
7665
+ aP,
7666
+ eP,
7667
+ tP,
7668
+ cP.colorSchemeSelector
7669
+ ]), dP = true;
7670
+ (z || GN.cssVariables === false || UN && (J == null ? void 0 : J.cssVarPrefix) === JN) && (dP = false);
7671
+ let fP = (0, import_jsx_runtime.jsxs)(import_react.Fragment, {
7672
7672
  children: [
7673
7673
  (0, import_jsx_runtime.jsx)(ThemeProvider_default, {
7674
- themeId: DN ? t : void 0,
7675
- theme: GN,
7674
+ themeId: WN ? t : void 0,
7675
+ theme: cP,
7676
7676
  children: d2
7677
7677
  }),
7678
- JN && (0, import_jsx_runtime.jsx)(GlobalStyles$1, {
7679
- styles: ((_d = GN.generateStyleSheets) == null ? void 0 : _d.call(GN)) || []
7678
+ dP && (0, import_jsx_runtime.jsx)(GlobalStyles$1, {
7679
+ styles: ((_d = cP.generateStyleSheets) == null ? void 0 : _d.call(cP)) || []
7680
7680
  })
7681
7681
  ]
7682
7682
  });
7683
- return EN ? YN : (0, import_jsx_runtime.jsx)(f.Provider, {
7684
- value: qN,
7685
- children: YN
7683
+ return UN ? fP : (0, import_jsx_runtime.jsx)(f.Provider, {
7684
+ value: uP,
7685
+ children: fP
7686
7686
  });
7687
7687
  }
7688
7688
  let S = typeof s == "string" ? s : s.light, w = typeof s == "string" ? s : s.dark;
@@ -8561,7 +8561,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
8561
8561
  ...t
8562
8562
  });
8563
8563
  }
8564
- var capitalize_default = capitalize$1;
8564
+ var capitalize_default = capitalize;
8565
8565
  function GlobalStyles(e) {
8566
8566
  return (0, import_jsx_runtime.jsx)(GlobalStyles_default$1, {
8567
8567
  ...e,
@@ -9182,10 +9182,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
9182
9182
  let n = useDefaultProps({
9183
9183
  props: e,
9184
9184
  name: "MuiInputBase"
9185
- }), { "aria-describedby": i, autoComplete: a, autoFocus: o, className: s, color: c, components: d = {}, componentsProps: f = {}, defaultValue: h, disabled: _, disableInjectingGlobalStyles: v, endAdornment: y, error: S, fullWidth: w = false, id: E, inputComponent: O = "input", inputProps: A = {}, inputRef: M, margin: I, maxRows: z, minRows: U, multiline: K = false, name: q, onBlur: J, onChange: Q, onClick: EN, onFocus: $, onKeyDown: DN, onKeyUp: ON, placeholder: kN, readOnly: AN, renderSuffix: jN, rows: MN, size: NN, slotProps: PN = {}, slots: FN = {}, startAdornment: IN, type: LN = "text", value: RN, ...zN } = n, BN = A.value == null ? RN : A.value, { current: VN } = import_react.useRef(BN != null), HN = import_react.useRef(), UN = import_react.useCallback((e2) => {
9186
- }, []), WN = useForkRef_default(HN, M, A.ref, UN), [GN, KN] = import_react.useState(false), qN = useFormControl(), JN = formControlState({
9185
+ }), { "aria-describedby": i, autoComplete: a, autoFocus: o, className: s, color: c, components: d = {}, componentsProps: f = {}, defaultValue: h, disabled: _, disableInjectingGlobalStyles: v, endAdornment: y, error: S, fullWidth: w = false, id: E, inputComponent: O = "input", inputProps: A = {}, inputRef: M, margin: I, maxRows: z, minRows: U, multiline: K = false, name: q, onBlur: J, onChange: Q, onClick: UN, onFocus: $, onKeyDown: WN, onKeyUp: GN, placeholder: KN, readOnly: qN, renderSuffix: JN, rows: YN, size: XN, slotProps: ZN = {}, slots: QN = {}, startAdornment: $N, type: eP = "text", value: tP, ...nP } = n, rP = A.value == null ? tP : A.value, { current: iP } = import_react.useRef(rP != null), aP = import_react.useRef(), oP = import_react.useCallback((e2) => {
9186
+ }, []), sP = useForkRef_default(aP, M, A.ref, oP), [cP, lP] = import_react.useState(false), uP = useFormControl(), dP = formControlState({
9187
9187
  props: n,
9188
- muiFormControl: qN,
9188
+ muiFormControl: uP,
9189
9189
  states: [
9190
9190
  "color",
9191
9191
  "disabled",
@@ -9196,145 +9196,145 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
9196
9196
  "filled"
9197
9197
  ]
9198
9198
  });
9199
- JN.focused = qN ? qN.focused : GN, import_react.useEffect(() => {
9200
- !qN && _ && GN && (KN(false), J && J());
9199
+ dP.focused = uP ? uP.focused : cP, import_react.useEffect(() => {
9200
+ !uP && _ && cP && (lP(false), J && J());
9201
9201
  }, [
9202
- qN,
9202
+ uP,
9203
9203
  _,
9204
- GN,
9204
+ cP,
9205
9205
  J
9206
9206
  ]);
9207
- let YN = qN && qN.onFilled, XN = qN && qN.onEmpty, ZN = import_react.useCallback((e2) => {
9208
- isFilled(e2) ? YN && YN() : XN && XN();
9207
+ let fP = uP && uP.onFilled, pP = uP && uP.onEmpty, mP = import_react.useCallback((e2) => {
9208
+ isFilled(e2) ? fP && fP() : pP && pP();
9209
9209
  }, [
9210
- YN,
9211
- XN
9210
+ fP,
9211
+ pP
9212
9212
  ]);
9213
9213
  useEnhancedEffect_default$1(() => {
9214
- VN && ZN({
9215
- value: BN
9214
+ iP && mP({
9215
+ value: rP
9216
9216
  });
9217
9217
  }, [
9218
- BN,
9219
- ZN,
9220
- VN
9218
+ rP,
9219
+ mP,
9220
+ iP
9221
9221
  ]);
9222
- let QN = (e2) => {
9223
- $ && $(e2), A.onFocus && A.onFocus(e2), qN && qN.onFocus ? qN.onFocus(e2) : KN(true);
9224
- }, $N = (e2) => {
9225
- J && J(e2), A.onBlur && A.onBlur(e2), qN && qN.onBlur ? qN.onBlur(e2) : KN(false);
9226
- }, eP = (e2, ...t2) => {
9227
- if (!VN) {
9228
- let t3 = e2.target || HN.current;
9222
+ let hP = (e2) => {
9223
+ $ && $(e2), A.onFocus && A.onFocus(e2), uP && uP.onFocus ? uP.onFocus(e2) : lP(true);
9224
+ }, gP = (e2) => {
9225
+ J && J(e2), A.onBlur && A.onBlur(e2), uP && uP.onBlur ? uP.onBlur(e2) : lP(false);
9226
+ }, _P = (e2, ...t2) => {
9227
+ if (!iP) {
9228
+ let t3 = e2.target || aP.current;
9229
9229
  if (t3 == null) throw Error(formatMuiErrorMessage(1));
9230
- ZN({
9230
+ mP({
9231
9231
  value: t3.value
9232
9232
  });
9233
9233
  }
9234
9234
  A.onChange && A.onChange(e2, ...t2), Q && Q(e2, ...t2);
9235
9235
  };
9236
9236
  import_react.useEffect(() => {
9237
- ZN(HN.current);
9237
+ mP(aP.current);
9238
9238
  }, []);
9239
- let tP = (e2) => {
9240
- HN.current && e2.currentTarget === e2.target && HN.current.focus(), EN && EN(e2);
9241
- }, nP = O, rP = A;
9242
- K && nP === "input" && (rP = MN ? {
9239
+ let vP = (e2) => {
9240
+ aP.current && e2.currentTarget === e2.target && aP.current.focus(), UN && UN(e2);
9241
+ }, yP = O, bP = A;
9242
+ K && yP === "input" && (bP = YN ? {
9243
9243
  type: void 0,
9244
- minRows: MN,
9245
- maxRows: MN,
9246
- ...rP
9244
+ minRows: YN,
9245
+ maxRows: YN,
9246
+ ...bP
9247
9247
  } : {
9248
9248
  type: void 0,
9249
9249
  maxRows: z,
9250
9250
  minRows: U,
9251
- ...rP
9252
- }, nP = TextareaAutosize_default);
9253
- let iP = (e2) => {
9254
- ZN(e2.animationName === "mui-auto-fill-cancel" ? HN.current : {
9251
+ ...bP
9252
+ }, yP = TextareaAutosize_default);
9253
+ let xP = (e2) => {
9254
+ mP(e2.animationName === "mui-auto-fill-cancel" ? aP.current : {
9255
9255
  value: "x"
9256
9256
  });
9257
9257
  };
9258
9258
  import_react.useEffect(() => {
9259
- qN && qN.setAdornedStart(!!IN);
9259
+ uP && uP.setAdornedStart(!!$N);
9260
9260
  }, [
9261
- qN,
9262
- IN
9261
+ uP,
9262
+ $N
9263
9263
  ]);
9264
- let aP = {
9264
+ let SP = {
9265
9265
  ...n,
9266
- color: JN.color || "primary",
9267
- disabled: JN.disabled,
9266
+ color: dP.color || "primary",
9267
+ disabled: dP.disabled,
9268
9268
  endAdornment: y,
9269
- error: JN.error,
9270
- focused: JN.focused,
9271
- formControl: qN,
9269
+ error: dP.error,
9270
+ focused: dP.focused,
9271
+ formControl: uP,
9272
9272
  fullWidth: w,
9273
- hiddenLabel: JN.hiddenLabel,
9273
+ hiddenLabel: dP.hiddenLabel,
9274
9274
  multiline: K,
9275
- size: JN.size,
9276
- startAdornment: IN,
9277
- type: LN
9278
- }, oP = useUtilityClasses(aP), sP = FN.root || d.Root || InputBaseRoot, cP = PN.root || f.root || {}, lP = FN.input || d.Input || InputBaseInput;
9279
- return rP = {
9280
- ...rP,
9281
- ...PN.input ?? f.input
9275
+ size: dP.size,
9276
+ startAdornment: $N,
9277
+ type: eP
9278
+ }, CP = useUtilityClasses(SP), wP = QN.root || d.Root || InputBaseRoot, TP = ZN.root || f.root || {}, EP = QN.input || d.Input || InputBaseInput;
9279
+ return bP = {
9280
+ ...bP,
9281
+ ...ZN.input ?? f.input
9282
9282
  }, (0, import_jsx_runtime.jsxs)(import_react.Fragment, {
9283
9283
  children: [
9284
9284
  !v && typeof InputGlobalStyles == "function" && (_InputGlobalStyles || (_InputGlobalStyles = (0, import_jsx_runtime.jsx)(InputGlobalStyles, {}))),
9285
- (0, import_jsx_runtime.jsxs)(sP, {
9286
- ...cP,
9285
+ (0, import_jsx_runtime.jsxs)(wP, {
9286
+ ...TP,
9287
9287
  ref: t,
9288
- onClick: tP,
9289
- ...zN,
9290
- ...!isHostComponent_default(sP) && {
9288
+ onClick: vP,
9289
+ ...nP,
9290
+ ...!isHostComponent_default(wP) && {
9291
9291
  ownerState: {
9292
- ...aP,
9293
- ...cP.ownerState
9292
+ ...SP,
9293
+ ...TP.ownerState
9294
9294
  }
9295
9295
  },
9296
- className: clsx_default(oP.root, cP.className, s, AN && "MuiInputBase-readOnly"),
9296
+ className: clsx_default(CP.root, TP.className, s, qN && "MuiInputBase-readOnly"),
9297
9297
  children: [
9298
- IN,
9298
+ $N,
9299
9299
  (0, import_jsx_runtime.jsx)(FormControlContext_default.Provider, {
9300
9300
  value: null,
9301
- children: (0, import_jsx_runtime.jsx)(lP, {
9302
- "aria-invalid": JN.error,
9301
+ children: (0, import_jsx_runtime.jsx)(EP, {
9302
+ "aria-invalid": dP.error,
9303
9303
  "aria-describedby": i,
9304
9304
  autoComplete: a,
9305
9305
  autoFocus: o,
9306
9306
  defaultValue: h,
9307
- disabled: JN.disabled,
9307
+ disabled: dP.disabled,
9308
9308
  id: E,
9309
- onAnimationStart: iP,
9309
+ onAnimationStart: xP,
9310
9310
  name: q,
9311
- placeholder: kN,
9312
- readOnly: AN,
9313
- required: JN.required,
9314
- rows: MN,
9315
- value: BN,
9316
- onKeyDown: DN,
9317
- onKeyUp: ON,
9318
- type: LN,
9319
- ...rP,
9320
- ...!isHostComponent_default(lP) && {
9321
- as: nP,
9311
+ placeholder: KN,
9312
+ readOnly: qN,
9313
+ required: dP.required,
9314
+ rows: YN,
9315
+ value: rP,
9316
+ onKeyDown: WN,
9317
+ onKeyUp: GN,
9318
+ type: eP,
9319
+ ...bP,
9320
+ ...!isHostComponent_default(EP) && {
9321
+ as: yP,
9322
9322
  ownerState: {
9323
- ...aP,
9324
- ...rP.ownerState
9323
+ ...SP,
9324
+ ...bP.ownerState
9325
9325
  }
9326
9326
  },
9327
- ref: WN,
9328
- className: clsx_default(oP.input, rP.className, AN && "MuiInputBase-readOnly"),
9329
- onBlur: $N,
9330
- onChange: eP,
9331
- onFocus: QN
9327
+ ref: sP,
9328
+ className: clsx_default(CP.input, bP.className, qN && "MuiInputBase-readOnly"),
9329
+ onBlur: gP,
9330
+ onChange: _P,
9331
+ onFocus: hP
9332
9332
  })
9333
9333
  }),
9334
9334
  y,
9335
- jN ? jN({
9336
- ...JN,
9337
- startAdornment: IN
9335
+ JN ? JN({
9336
+ ...dP,
9337
+ startAdornment: $N
9338
9338
  }) : null
9339
9339
  ]
9340
9340
  })
@@ -10410,30 +10410,30 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
10410
10410
  M,
10411
10411
  i,
10412
10412
  a
10413
- ]), z = useJsonViewerStore((e2) => e2.setHover), U = useJsonViewerStore((e2) => e2.value), [K, q] = useInspect(i, t, a), [J, Q] = (0, import_react.useState)(false), EN = useJsonViewerStore((e2) => e2.onChange), $ = useTextColor(), DN = useJsonViewerStore((e2) => e2.colorspace.base0C), ON = useJsonViewerStore((e2) => e2.colorspace.base0A), kN = useJsonViewerStore((e2) => e2.displayComma), AN = useJsonViewerStore((e2) => e2.quotesOnKeys), jN = useJsonViewerStore((e2) => e2.rootName), MN = U === t, NN = Number.isInteger(Number(A)), PN = useJsonViewerStore((e2) => e2.enableAdd), FN = useJsonViewerStore((e2) => e2.onAdd), IN = (0, import_react.useMemo)(() => !FN || a !== void 0 || PN === false || v === false ? false : typeof PN == "function" ? !!PN(i, t) : !!(Array.isArray(t) || isPlainObject(t)), [
10414
- FN,
10413
+ ]), z = useJsonViewerStore((e2) => e2.setHover), U = useJsonViewerStore((e2) => e2.value), [K, q] = useInspect(i, t, a), [J, Q] = (0, import_react.useState)(false), UN = useJsonViewerStore((e2) => e2.onChange), $ = useTextColor(), WN = useJsonViewerStore((e2) => e2.colorspace.base0C), GN = useJsonViewerStore((e2) => e2.colorspace.base0A), KN = useJsonViewerStore((e2) => e2.displayComma), qN = useJsonViewerStore((e2) => e2.quotesOnKeys), JN = useJsonViewerStore((e2) => e2.rootName), YN = U === t, XN = Number.isInteger(Number(A)), ZN = useJsonViewerStore((e2) => e2.enableAdd), QN = useJsonViewerStore((e2) => e2.onAdd), $N = (0, import_react.useMemo)(() => !QN || a !== void 0 || ZN === false || v === false ? false : typeof ZN == "function" ? !!ZN(i, t) : !!(Array.isArray(t) || isPlainObject(t)), [
10414
+ QN,
10415
10415
  a,
10416
10416
  i,
10417
- PN,
10417
+ ZN,
10418
10418
  v,
10419
10419
  t
10420
- ]), LN = useJsonViewerStore((e2) => e2.enableDelete), RN = useJsonViewerStore((e2) => e2.onDelete), zN = (0, import_react.useMemo)(() => !RN || a !== void 0 || MN || LN === false || v === false ? false : typeof LN == "function" ? !!LN(i, t) : LN, [
10421
- RN,
10420
+ ]), eP = useJsonViewerStore((e2) => e2.enableDelete), tP = useJsonViewerStore((e2) => e2.onDelete), nP = (0, import_react.useMemo)(() => !tP || a !== void 0 || YN || eP === false || v === false ? false : typeof eP == "function" ? !!eP(i, t) : eP, [
10421
+ tP,
10422
10422
  a,
10423
- MN,
10423
+ YN,
10424
10424
  i,
10425
- LN,
10425
+ eP,
10426
10426
  v,
10427
10427
  t
10428
- ]), BN = useJsonViewerStore((e2) => e2.enableClipboard), { copy: VN, copied: HN } = useClipboard(), UN = useJsonViewerStore((e2) => e2.highlightUpdates), WN = (0, import_react.useMemo)(() => !UN || n === void 0 ? false : typeof t == typeof n ? typeof t == "number" ? isNaN(t) && isNaN(n) ? false : t !== n : Array.isArray(t) === Array.isArray(n) ? typeof t == "object" || typeof t == "function" ? false : t !== n : true : true, [
10429
- UN,
10428
+ ]), rP = useJsonViewerStore((e2) => e2.enableClipboard), { copy: iP, copied: aP } = useClipboard(), oP = useJsonViewerStore((e2) => e2.highlightUpdates), sP = (0, import_react.useMemo)(() => !oP || n === void 0 ? false : typeof t == typeof n ? typeof t == "number" ? isNaN(t) && isNaN(n) ? false : t !== n : Array.isArray(t) === Array.isArray(n) ? typeof t == "object" || typeof t == "function" ? false : t !== n : true : true, [
10429
+ oP,
10430
10430
  n,
10431
10431
  t
10432
- ]), GN = (0, import_react.useRef)();
10432
+ ]), cP = (0, import_react.useRef)();
10433
10433
  (0, import_react.useEffect)(() => {
10434
- GN.current && WN && "animate" in GN.current && GN.current.animate([
10434
+ cP.current && sP && "animate" in cP.current && cP.current.animate([
10435
10435
  {
10436
- backgroundColor: ON
10436
+ backgroundColor: GN
10437
10437
  },
10438
10438
  {
10439
10439
  backgroundColor: ""
@@ -10443,40 +10443,40 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
10443
10443
  easing: "ease-in"
10444
10444
  });
10445
10445
  }, [
10446
- ON,
10447
- WN,
10446
+ GN,
10447
+ sP,
10448
10448
  n,
10449
10449
  t
10450
10450
  ]);
10451
- let KN = (0, import_react.useCallback)((e2) => {
10451
+ let lP = (0, import_react.useCallback)((e2) => {
10452
10452
  e2.preventDefault(), h && E(h(t)), Q(true);
10453
10453
  }, [
10454
10454
  h,
10455
10455
  t
10456
- ]), qN = (0, import_react.useCallback)(() => {
10456
+ ]), uP = (0, import_react.useCallback)(() => {
10457
10457
  Q(false), E("");
10458
10458
  }, [
10459
10459
  Q,
10460
10460
  E
10461
- ]), JN = (0, import_react.useCallback)((e2) => {
10461
+ ]), dP = (0, import_react.useCallback)((e2) => {
10462
10462
  if (Q(false), _) try {
10463
- EN(i, t, _(e2));
10463
+ UN(i, t, _(e2));
10464
10464
  } catch {
10465
10465
  }
10466
10466
  }, [
10467
10467
  Q,
10468
10468
  _,
10469
- EN,
10469
+ UN,
10470
10470
  i,
10471
10471
  t
10472
- ]), YN = (0, import_react.useMemo)(() => J ? (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
10472
+ ]), fP = (0, import_react.useMemo)(() => J ? (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
10473
10473
  children: [
10474
10474
  (0, import_jsx_runtime.jsx)(IconBox, {
10475
10475
  children: (0, import_jsx_runtime.jsx)(CloseIcon, {
10476
10476
  sx: {
10477
10477
  fontSize: ".8rem"
10478
10478
  },
10479
- onClick: qN
10479
+ onClick: uP
10480
10480
  })
10481
10481
  }),
10482
10482
  (0, import_jsx_runtime.jsx)(IconBox, {
@@ -10484,22 +10484,22 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
10484
10484
  sx: {
10485
10485
  fontSize: ".8rem"
10486
10486
  },
10487
- onClick: () => JN(w)
10487
+ onClick: () => dP(w)
10488
10488
  })
10489
10489
  })
10490
10490
  ]
10491
10491
  }) : (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
10492
10492
  children: [
10493
- BN && (0, import_jsx_runtime.jsx)(IconBox, {
10493
+ rP && (0, import_jsx_runtime.jsx)(IconBox, {
10494
10494
  onClick: (e2) => {
10495
10495
  e2.preventDefault();
10496
10496
  try {
10497
- VN(i, t, copyString);
10497
+ iP(i, t, copyString);
10498
10498
  } catch (e3) {
10499
10499
  console.error(e3);
10500
10500
  }
10501
10501
  },
10502
- children: HN ? (0, import_jsx_runtime.jsx)(CheckIcon$1, {
10502
+ children: aP ? (0, import_jsx_runtime.jsx)(CheckIcon$1, {
10503
10503
  sx: {
10504
10504
  fontSize: ".8rem"
10505
10505
  }
@@ -10510,16 +10510,16 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
10510
10510
  })
10511
10511
  }),
10512
10512
  f && S && h && _ && (0, import_jsx_runtime.jsx)(IconBox, {
10513
- onClick: KN,
10513
+ onClick: lP,
10514
10514
  children: (0, import_jsx_runtime.jsx)(EditIcon, {
10515
10515
  sx: {
10516
10516
  fontSize: ".8rem"
10517
10517
  }
10518
10518
  })
10519
10519
  }),
10520
- IN && (0, import_jsx_runtime.jsx)(IconBox, {
10520
+ $N && (0, import_jsx_runtime.jsx)(IconBox, {
10521
10521
  onClick: (e2) => {
10522
- e2.preventDefault(), FN == null ? void 0 : FN(i);
10522
+ e2.preventDefault(), QN == null ? void 0 : QN(i);
10523
10523
  },
10524
10524
  children: (0, import_jsx_runtime.jsx)(AddBoxIcon, {
10525
10525
  sx: {
@@ -10527,9 +10527,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
10527
10527
  }
10528
10528
  })
10529
10529
  }),
10530
- zN && (0, import_jsx_runtime.jsx)(IconBox, {
10530
+ nP && (0, import_jsx_runtime.jsx)(IconBox, {
10531
10531
  onClick: (e2) => {
10532
- e2.preventDefault(), RN == null ? void 0 : RN(i, t);
10532
+ e2.preventDefault(), tP == null ? void 0 : tP(i, t);
10533
10533
  },
10534
10534
  children: (0, import_jsx_runtime.jsx)(DeleteIcon, {
10535
10535
  sx: {
@@ -10542,24 +10542,24 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
10542
10542
  f,
10543
10543
  h,
10544
10544
  _,
10545
- HN,
10546
- VN,
10545
+ aP,
10546
+ iP,
10547
10547
  S,
10548
10548
  J,
10549
- BN,
10550
- IN,
10551
- zN,
10549
+ rP,
10550
+ $N,
10551
+ nP,
10552
10552
  w,
10553
10553
  i,
10554
10554
  t,
10555
- FN,
10556
- RN,
10557
- KN,
10558
- qN,
10559
- JN
10560
- ]), XN = (0, import_react.useMemo)(() => getValueSize(t) === 0, [
10555
+ QN,
10556
+ tP,
10557
+ lP,
10558
+ uP,
10559
+ dP
10560
+ ]), pP = (0, import_react.useMemo)(() => getValueSize(t) === 0, [
10561
10561
  t
10562
- ]), ZN = !XN && !!(c && d), QN = useJsonViewerStore((e2) => e2.keyRenderer), $N = (0, import_react.useMemo)(() => ({
10562
+ ]), mP = !pP && !!(c && d), hP = useJsonViewerStore((e2) => e2.keyRenderer), gP = (0, import_react.useMemo)(() => ({
10563
10563
  path: i,
10564
10564
  inspect: K,
10565
10565
  setInspect: q,
@@ -10596,13 +10596,13 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
10596
10596
  opacity: 0.8
10597
10597
  },
10598
10598
  onClick: (0, import_react.useCallback)((e2) => {
10599
- e2.isDefaultPrevented() || XN || q((e3) => !e3);
10599
+ e2.isDefaultPrevented() || pP || q((e3) => !e3);
10600
10600
  }, [
10601
- XN,
10601
+ pP,
10602
10602
  q
10603
10603
  ]),
10604
10604
  children: [
10605
- ZN ? K ? (0, import_jsx_runtime.jsx)(ExpandMoreIcon, {
10605
+ mP ? K ? (0, import_jsx_runtime.jsx)(ExpandMoreIcon, {
10606
10606
  className: "data-key-toggle-expanded",
10607
10607
  sx: {
10608
10608
  fontSize: ".8rem",
@@ -10620,27 +10620,27 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
10620
10620
  }
10621
10621
  }) : null,
10622
10622
  (0, import_jsx_runtime.jsx)(Box_default, {
10623
- ref: GN,
10623
+ ref: cP,
10624
10624
  className: "data-key-key",
10625
10625
  component: "span",
10626
- children: MN && O === 0 ? jN === false ? null : AN ? (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
10626
+ children: YN && O === 0 ? JN === false ? null : qN ? (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
10627
10627
  children: [
10628
10628
  '"',
10629
- jN,
10629
+ JN,
10630
10630
  '"'
10631
10631
  ]
10632
10632
  }) : (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
10633
- children: jN
10634
- }) : QN.when($N) ? (0, import_jsx_runtime.jsx)(QN, {
10635
- ...$N
10636
- }) : a === void 0 && (NN ? (0, import_jsx_runtime.jsx)(Box_default, {
10633
+ children: JN
10634
+ }) : hP.when(gP) ? (0, import_jsx_runtime.jsx)(hP, {
10635
+ ...gP
10636
+ }) : a === void 0 && (XN ? (0, import_jsx_runtime.jsx)(Box_default, {
10637
10637
  component: "span",
10638
10638
  style: {
10639
- color: DN,
10640
- userSelect: NN ? "none" : "auto"
10639
+ color: WN,
10640
+ userSelect: XN ? "none" : "auto"
10641
10641
  },
10642
10642
  children: A
10643
- }) : AN ? (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
10643
+ }) : qN ? (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
10644
10644
  children: [
10645
10645
  '"',
10646
10646
  A,
@@ -10650,7 +10650,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
10650
10650
  children: A
10651
10651
  }))
10652
10652
  }),
10653
- MN ? jN !== false && (0, import_jsx_runtime.jsx)(DataBox, {
10653
+ YN ? JN !== false && (0, import_jsx_runtime.jsx)(DataBox, {
10654
10654
  className: "data-key-colon",
10655
10655
  sx: {
10656
10656
  mr: 0.5
@@ -10663,38 +10663,38 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
10663
10663
  ".data-key-key:empty + &": {
10664
10664
  display: "none"
10665
10665
  },
10666
- userSelect: NN ? "none" : "auto"
10666
+ userSelect: XN ? "none" : "auto"
10667
10667
  },
10668
10668
  children: ":"
10669
10669
  }),
10670
10670
  c && (0, import_jsx_runtime.jsx)(c, {
10671
- ...$N
10671
+ ...gP
10672
10672
  }),
10673
- I && ZN && K && YN
10673
+ I && mP && K && fP
10674
10674
  ]
10675
10675
  }),
10676
10676
  J && S ? f && (0, import_jsx_runtime.jsx)(f, {
10677
10677
  path: i,
10678
10678
  value: w,
10679
10679
  setValue: E,
10680
- abortEditing: qN,
10681
- commitEditing: JN
10680
+ abortEditing: uP,
10681
+ commitEditing: dP
10682
10682
  }) : s ? (0, import_jsx_runtime.jsx)(s, {
10683
- ...$N
10683
+ ...gP
10684
10684
  }) : (0, import_jsx_runtime.jsx)(Box_default, {
10685
10685
  component: "span",
10686
10686
  className: "data-value-fallback",
10687
10687
  children: `fallback: ${t}`
10688
10688
  }),
10689
10689
  d && (0, import_jsx_runtime.jsx)(d, {
10690
- ...$N
10690
+ ...gP
10691
10691
  }),
10692
- !o && kN && (0, import_jsx_runtime.jsx)(DataBox, {
10692
+ !o && KN && (0, import_jsx_runtime.jsx)(DataBox, {
10693
10693
  children: ","
10694
10694
  }),
10695
- I && ZN && !K && YN,
10696
- I && !ZN && YN,
10697
- !I && J && YN
10695
+ I && mP && !K && fP,
10696
+ I && !mP && fP,
10697
+ !I && J && fP
10698
10698
  ]
10699
10699
  });
10700
10700
  }, query = "(prefers-color-scheme: dark)";
@@ -10823,9 +10823,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
10823
10823
  })
10824
10824
  })
10825
10825
  });
10826
- }, import_compiler_runtime$50 = require_compiler_runtime();
10826
+ }, import_compiler_runtime$51 = require_compiler_runtime();
10827
10827
  HtmlOutput = (0, import_react.memo)((e) => {
10828
- let t = (0, import_compiler_runtime$50.c)(10), { html: n, inline: i, className: o, alwaysSanitizeHtml: s } = e, c = i === void 0 ? false : i;
10828
+ let t = (0, import_compiler_runtime$51.c)(10), { html: n, inline: i, className: o, alwaysSanitizeHtml: s } = e, c = i === void 0 ? false : i;
10829
10829
  if (!n) return null;
10830
10830
  let d = !c, f;
10831
10831
  t[0] !== o || t[1] !== c || t[2] !== d ? (f = cn(o, {
@@ -10844,9 +10844,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
10844
10844
  }), t[7] = f, t[8] = h, t[9] = _) : _ = t[9], _;
10845
10845
  });
10846
10846
  HtmlOutput.displayName = "HtmlOutput";
10847
- var import_compiler_runtime$49 = require_compiler_runtime();
10847
+ var import_compiler_runtime$50 = require_compiler_runtime();
10848
10848
  const ImageOutput = (e) => {
10849
- let t = (0, import_compiler_runtime$49.c)(8), { src: n, alt: i, width: a, height: o, className: s } = e, c = i === void 0 ? "" : i, d;
10849
+ let t = (0, import_compiler_runtime$50.c)(8), { src: n, alt: i, width: a, height: o, className: s } = e, c = i === void 0 ? "" : i, d;
10850
10850
  t[0] !== c || t[1] !== o || t[2] !== n || t[3] !== a ? (d = (0, import_jsx_runtime.jsx)("img", {
10851
10851
  src: n,
10852
10852
  alt: c,
@@ -10859,9 +10859,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
10859
10859
  children: d
10860
10860
  }), t[5] = s, t[6] = d, t[7] = f) : f = t[7], f;
10861
10861
  };
10862
- var import_compiler_runtime$48 = require_compiler_runtime();
10862
+ var import_compiler_runtime$49 = require_compiler_runtime();
10863
10863
  Kbd = (e) => {
10864
- let t = (0, import_compiler_runtime$48.c)(5), n;
10864
+ let t = (0, import_compiler_runtime$49.c)(5), n;
10865
10865
  t[0] === e.className ? n = t[1] : (n = clsx_default(e.className, "rounded-md bg-muted/40 px-2 text-[0.75rem] font-prose center border border-foreground/20 text-muted-foreground block whitespace-nowrap"), t[0] = e.className, t[1] = n);
10866
10866
  let i;
10867
10867
  return t[2] !== e.children || t[3] !== n ? (i = (0, import_jsx_runtime.jsx)("kbd", {
@@ -10869,9 +10869,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
10869
10869
  children: e.children
10870
10870
  }), t[2] = e.children, t[3] = n, t[4] = i) : i = t[4], i;
10871
10871
  };
10872
- var import_compiler_runtime$47 = require_compiler_runtime();
10872
+ var import_compiler_runtime$48 = require_compiler_runtime();
10873
10873
  const ExternalLink$1 = (e) => {
10874
- let t = (0, import_compiler_runtime$47.c)(3), { href: n, children: i } = e, a;
10874
+ let t = (0, import_compiler_runtime$48.c)(3), { href: n, children: i } = e, a;
10875
10875
  return t[0] !== i || t[1] !== n ? (a = (0, import_jsx_runtime.jsx)("a", {
10876
10876
  href: n,
10877
10877
  target: "_blank",
@@ -11042,17 +11042,17 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
11042
11042
  os: "os",
11043
11043
  re: "re",
11044
11044
  sys: "sys"
11045
- }, import_compiler_runtime$46 = require_compiler_runtime(), fixModeAtom = atomWithStorage("marimo:ai-autofix-mode", "autofix", jotaiJsonStorage);
11045
+ }, import_compiler_runtime$47 = require_compiler_runtime(), fixModeAtom = atomWithStorage("marimo:ai-autofix-mode", "autofix", jotaiJsonStorage);
11046
11046
  function useFixMode() {
11047
- let e = (0, import_compiler_runtime$46.c)(3), [t, n] = useAtom(fixModeAtom), i;
11047
+ let e = (0, import_compiler_runtime$47.c)(3), [t, n] = useAtom(fixModeAtom), i;
11048
11048
  return e[0] !== t || e[1] !== n ? (i = {
11049
11049
  fixMode: t,
11050
11050
  setFixMode: n
11051
11051
  }, e[0] = t, e[1] = n, e[2] = i) : i = e[2], i;
11052
11052
  }
11053
- var import_compiler_runtime$45 = require_compiler_runtime();
11053
+ var import_compiler_runtime$46 = require_compiler_runtime();
11054
11054
  const AutoFixButton = (e) => {
11055
- let t = (0, import_compiler_runtime$45.c)(21), { errors: n, cellId: i, className: o } = e, s = useStore(), { createNewCell: c } = useCellActions(), d = useAtomValue(aiEnabledAtom), h;
11055
+ let t = (0, import_compiler_runtime$46.c)(21), { errors: n, cellId: i, className: o } = e, s = useStore(), { createNewCell: c } = useCellActions(), d = useAtomValue(aiEnabledAtom), h;
11056
11056
  if (t[0] !== d || t[1] !== n) {
11057
11057
  let e2;
11058
11058
  t[3] === d ? e2 = t[4] : (e2 = (e3) => getAutoFixes(e3, {
@@ -11113,7 +11113,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
11113
11113
  };
11114
11114
  var PromptIcon = Sparkles, AutofixIcon = Wrench, PromptTitle = "Suggest a prompt", AutofixTitle = "Fix with AI";
11115
11115
  const AIFixButton = (e) => {
11116
- let t = (0, import_compiler_runtime$45.c)(21), { tooltip: n, openPrompt: i, applyAutofix: a } = e, { fixMode: o, setFixMode: s } = useFixMode(), c = o === "prompt" ? i : a, d;
11116
+ let t = (0, import_compiler_runtime$46.c)(21), { tooltip: n, openPrompt: i, applyAutofix: a } = e, { fixMode: o, setFixMode: s } = useFixMode(), c = o === "prompt" ? i : a, d;
11117
11117
  t[0] === o ? d = t[1] : (d = o === "prompt" ? (0, import_jsx_runtime.jsx)(PromptIcon, {
11118
11118
  className: "h-3 w-3 mr-2 mb-0.5"
11119
11119
  }) : (0, import_jsx_runtime.jsx)(AutofixIcon, {
@@ -11182,7 +11182,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
11182
11182
  }), t[18] = O, t[19] = v, t[20] = A) : A = t[20], A;
11183
11183
  };
11184
11184
  var AiModeItem = (e) => {
11185
- let t = (0, import_compiler_runtime$45.c)(12), { mode: n } = e, i;
11185
+ let t = (0, import_compiler_runtime$46.c)(12), { mode: n } = e, i;
11186
11186
  t[0] === n ? i = t[1] : (i = n === "prompt" ? (0, import_jsx_runtime.jsx)(PromptIcon, {
11187
11187
  className: "h-4 w-4"
11188
11188
  }) : (0, import_jsx_runtime.jsx)(AutofixIcon, {
@@ -11219,9 +11219,9 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
11219
11219
  function useFilename() {
11220
11220
  return useAtomValue(filenameAtom);
11221
11221
  }
11222
- var import_compiler_runtime$43 = require_compiler_runtime();
11222
+ var import_compiler_runtime$44 = require_compiler_runtime();
11223
11223
  const CellLink = (e) => {
11224
- let t = (0, import_compiler_runtime$43.c)(12), { className: n, cellId: i, variant: o, onClick: s, formatCellName: c, skipScroll: d } = e, f = useCellNames()[i] ?? "", h = useCellIds().inOrderIds.indexOf(i), { showCellIfHidden: _ } = useCellActions(), v = c ?? _temp$6, y;
11224
+ let t = (0, import_compiler_runtime$44.c)(12), { className: n, cellId: i, variant: o, onClick: s, formatCellName: c, skipScroll: d } = e, f = useCellNames()[i] ?? "", h = useCellIds().inOrderIds.indexOf(i), { showCellIfHidden: _ } = useCellActions(), v = c ?? _temp$6, y;
11225
11225
  t[0] === n ? y = t[1] : (y = cn("inline-block cursor-pointer text-link hover:underline", n), t[0] = n, t[1] = y);
11226
11226
  let S;
11227
11227
  t[2] !== i || t[3] !== s || t[4] !== _ || t[5] !== d || t[6] !== o ? (S = (e2) => {
@@ -11241,13 +11241,13 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
11241
11241
  children: w
11242
11242
  }), t[8] = y, t[9] = S, t[10] = w, t[11] = O) : O = t[11], O;
11243
11243
  }, CellLinkError = (e) => {
11244
- let t = (0, import_compiler_runtime$43.c)(2), n;
11244
+ let t = (0, import_compiler_runtime$44.c)(2), n;
11245
11245
  return t[0] === e ? n = t[1] : (n = (0, import_jsx_runtime.jsx)(CellLink, {
11246
11246
  ...e,
11247
11247
  variant: "destructive"
11248
11248
  }), t[0] = e, t[1] = n), n;
11249
11249
  }, CellLinkTraceback = (e) => {
11250
- let t = (0, import_compiler_runtime$43.c)(10), { cellId: n, lineNumber: i } = e, a = useFilename(), o;
11250
+ let t = (0, import_compiler_runtime$44.c)(10), { cellId: n, lineNumber: i } = e, a = useFilename(), o;
11251
11251
  t[0] !== n || t[1] !== i ? (o = () => goToCellLine(n, i), t[0] = n, t[1] = i, t[2] = o) : o = t[2];
11252
11252
  let s;
11253
11253
  t[3] !== n || t[4] !== a ? (s = (e2) => n === "__scratch__" ? "scratch" : `marimo://${a || "untitled"}#cell=${e2}`, t[3] = n, t[4] = a, t[5] = s) : s = t[5];
@@ -11344,7 +11344,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
11344
11344
  value: e2
11345
11345
  });
11346
11346
  }
11347
- var import_compiler_runtime$42 = require_compiler_runtime(), ansiUp = new AnsiUp();
11347
+ var import_compiler_runtime$43 = require_compiler_runtime(), ansiUp = new AnsiUp();
11348
11348
  const cleanAnsiCodes = (e) => {
11349
11349
  let t = RegExp("\x1B\\[[0-9;]*m", "g");
11350
11350
  return e.replaceAll(t, "");
@@ -11412,7 +11412,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
11412
11412
  });
11413
11413
  }
11414
11414
  var InstallPackageLink = (e) => {
11415
- let t = (0, import_compiler_runtime$42.c)(6), { packages: n, children: i } = e, { handleInstallPackages: a } = useInstallPackages(), o;
11415
+ let t = (0, import_compiler_runtime$43.c)(6), { packages: n, children: i } = e, { handleInstallPackages: a } = useInstallPackages(), o;
11416
11416
  t[0] !== a || t[1] !== n ? (o = (e2) => {
11417
11417
  a(n), e2.preventDefault();
11418
11418
  }, t[0] = a, t[1] = n, t[2] = o) : o = t[2];
@@ -11485,15 +11485,15 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
11485
11485
  })
11486
11486
  });
11487
11487
  RenderTextWithLinks = (e) => {
11488
- let t = (0, import_compiler_runtime$42.c)(4), { text: n } = e, i;
11488
+ let t = (0, import_compiler_runtime$43.c)(4), { text: n } = e, i;
11489
11489
  t[0] === n ? i = t[1] : (i = renderTextWithReplacers(n, composeReplacers(pipInstallReplacer, urlReplacer)), t[0] = n, t[1] = i);
11490
11490
  let a = i, o;
11491
11491
  return t[2] === a ? o = t[3] : (o = (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
11492
11492
  children: a
11493
11493
  }), t[2] = a, t[3] = o), o;
11494
11494
  };
11495
- var import_compiler_runtime$41 = require_compiler_runtime(), Tip = (e) => {
11496
- let t = (0, import_compiler_runtime$41.c)(10), n = e.title ?? "Tip", i;
11495
+ var import_compiler_runtime$42 = require_compiler_runtime(), Tip = (e) => {
11496
+ let t = (0, import_compiler_runtime$42.c)(10), n = e.title ?? "Tip", i;
11497
11497
  t[0] === n ? i = t[1] : (i = (0, import_jsx_runtime.jsx)(AccordionTrigger, {
11498
11498
  className: "pt-2 pb-2 font-normal",
11499
11499
  children: n
@@ -11521,7 +11521,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
11521
11521
  }), t[7] = e.className, t[8] = o, t[9] = s) : s = t[9], s;
11522
11522
  };
11523
11523
  const MarimoErrorOutput = (e) => {
11524
- let t = (0, import_compiler_runtime$41.c)(31), { errors: n, cellId: i, className: o } = e, s = useChromeActions(), c = "This cell wasn't run because it has errors", d = "destructive", h = "text-error";
11524
+ let t = (0, import_compiler_runtime$42.c)(31), { errors: n, cellId: i, className: o } = e, s = useChromeActions(), c = "This cell wasn't run because it has errors", d = "destructive", h = "text-error";
11525
11525
  if (n.some(_temp$5)) c = "Interrupted";
11526
11526
  else if (n.some(_temp2$3)) c = "An internal error occurred";
11527
11527
  else if (n.some(_temp3$2)) c = "Ancestor prevented from running", d = "default", h = "text-secondary-foreground";
@@ -11535,18 +11535,18 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
11535
11535
  }
11536
11536
  let _, v, y, S, w, E;
11537
11537
  if (t[2] !== d || t[3] !== i || t[4] !== s || t[5] !== o || t[6] !== n || t[7] !== h || t[8] !== c) {
11538
- let e2 = n.filter(_temp7), O2 = n.filter(_temp8), A2 = n.filter(_temp9), M = n.filter(_temp0), I = n.filter(_temp1), z = n.filter(_temp10), U = n.filter(_temp11), K = n.filter(_temp12), q = n.filter(_temp13), J = n.filter(_temp14), Q = n.filter(_temp15), EN = n.filter(_temp16), $ = n.filter(_temp17), DN;
11539
- t[15] === s ? DN = t[16] : (DN = () => {
11538
+ let e2 = n.filter(_temp7), O2 = n.filter(_temp8), A2 = n.filter(_temp9), M = n.filter(_temp0), I = n.filter(_temp1), z = n.filter(_temp10), U = n.filter(_temp11), K = n.filter(_temp12), q = n.filter(_temp13), J = n.filter(_temp14), Q = n.filter(_temp15), UN = n.filter(_temp16), $ = n.filter(_temp17), WN;
11539
+ t[15] === s ? WN = t[16] : (WN = () => {
11540
11540
  s.openApplication("scratchpad");
11541
- }, t[15] = s, t[16] = DN);
11542
- let ON = DN, kN = () => {
11541
+ }, t[15] = s, t[16] = WN);
11542
+ let GN = WN, KN = () => {
11543
11543
  let t2 = [];
11544
- if (Q.length > 0 || EN.length > 0) {
11544
+ if (Q.length > 0 || UN.length > 0) {
11545
11545
  let e3 = Q.some(_temp18), n2 = !e3 && Q.some(_temp19);
11546
11546
  t2.push((0, import_jsx_runtime.jsxs)("div", {
11547
11547
  children: [
11548
11548
  Q.map(_temp20),
11549
- EN.map(_temp21),
11549
+ UN.map(_temp21),
11550
11550
  e3 && (0, import_jsx_runtime.jsxs)(Button, {
11551
11551
  size: "xs",
11552
11552
  variant: "outline",
@@ -11578,7 +11578,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
11578
11578
  i && (0, import_jsx_runtime.jsx)(AutoFixButton, {
11579
11579
  errors: [
11580
11580
  ...Q,
11581
- ...EN
11581
+ ...UN
11582
11582
  ],
11583
11583
  cellId: i
11584
11584
  })
@@ -11739,7 +11739,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
11739
11739
  size: "xs",
11740
11740
  variant: "link",
11741
11741
  className: "my-2 font-normal mx-0 px-0",
11742
- onClick: ON,
11742
+ onClick: GN,
11743
11743
  children: [
11744
11744
  (0, import_jsx_runtime.jsx)(NotebookPen, {
11745
11745
  className: "h-3"
@@ -11864,13 +11864,13 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
11864
11864
  })
11865
11865
  ]
11866
11866
  }, "sql-errors")), t2;
11867
- }, AN = `font-code font-medium tracking-wide ${h}`, jN;
11868
- t[17] !== AN || t[18] !== c ? (jN = (0, import_jsx_runtime.jsx)(AlertTitle, {
11869
- className: AN,
11867
+ }, qN = `font-code font-medium tracking-wide ${h}`, JN;
11868
+ t[17] !== qN || t[18] !== c ? (JN = (0, import_jsx_runtime.jsx)(AlertTitle, {
11869
+ className: qN,
11870
11870
  children: c
11871
- }), t[17] = AN, t[18] = c, t[19] = jN) : jN = t[19];
11872
- let MN = jN;
11873
- _ = Alert, S = d, t[20] === o ? w = t[21] : (w = cn("border-none font-code text-sm text-[0.84375rem] px-0 text-muted-foreground normal [&:has(svg)]:pl-0 space-y-4", o), t[20] = o, t[21] = w), E = MN, v = "flex flex-col gap-8", y = kN(), t[2] = d, t[3] = i, t[4] = s, t[5] = o, t[6] = n, t[7] = h, t[8] = c, t[9] = _, t[10] = v, t[11] = y, t[12] = S, t[13] = w, t[14] = E;
11871
+ }), t[17] = qN, t[18] = c, t[19] = JN) : JN = t[19];
11872
+ let YN = JN;
11873
+ _ = Alert, S = d, t[20] === o ? w = t[21] : (w = cn("border-none font-code text-sm text-[0.84375rem] px-0 text-muted-foreground normal [&:has(svg)]:pl-0 space-y-4", o), t[20] = o, t[21] = w), E = YN, v = "flex flex-col gap-8", y = KN(), t[2] = d, t[3] = i, t[4] = s, t[5] = o, t[6] = n, t[7] = h, t[8] = c, t[9] = _, t[10] = v, t[11] = y, t[12] = S, t[13] = w, t[14] = E;
11874
11874
  } else _ = t[9], v = t[10], y = t[11], S = t[12], w = t[13], E = t[14];
11875
11875
  let O;
11876
11876
  t[22] !== v || t[23] !== y ? (O = (0, import_jsx_runtime.jsx)("div", {
@@ -12198,9 +12198,9 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
12198
12198
  })
12199
12199
  }, `sql-error-${t}`);
12200
12200
  }
12201
- var import_compiler_runtime$40 = require_compiler_runtime();
12201
+ var import_compiler_runtime$41 = require_compiler_runtime();
12202
12202
  const TextOutput = (e) => {
12203
- let t = (0, import_compiler_runtime$40.c)(13), { text: n, channel: i, wrapText: o } = e, s = i === "stdout" || i === "stderr", c;
12203
+ let t = (0, import_compiler_runtime$41.c)(13), { text: n, channel: i, wrapText: o } = e, s = i === "stdout" || i === "stderr", c;
12204
12204
  t[0] === o ? c = t[1] : (c = (e2) => (0, import_jsx_runtime.jsx)("span", {
12205
12205
  className: o ? "whitespace-pre-wrap break-words" : "whitespace-pre",
12206
12206
  children: (0, import_jsx_runtime.jsx)(RenderTextWithLinks, {
@@ -12217,17 +12217,17 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
12217
12217
  children: v
12218
12218
  }), t[10] = _, t[11] = v, t[12] = y) : y = t[12], y;
12219
12219
  };
12220
- var import_compiler_runtime$39 = require_compiler_runtime();
12220
+ var import_compiler_runtime$40 = require_compiler_runtime();
12221
12221
  const VideoOutput = (e) => {
12222
- let t = (0, import_compiler_runtime$39.c)(3), { src: n, className: i } = e, a;
12222
+ let t = (0, import_compiler_runtime$40.c)(3), { src: n, className: i } = e, a;
12223
12223
  return t[0] !== i || t[1] !== n ? (a = (0, import_jsx_runtime.jsx)("iframe", {
12224
12224
  className: i,
12225
12225
  src: n
12226
12226
  }), t[0] = i, t[1] = n, t[2] = a) : a = t[2], a;
12227
12227
  };
12228
- var import_compiler_runtime$38 = require_compiler_runtime();
12228
+ var import_compiler_runtime$39 = require_compiler_runtime();
12229
12229
  useOverflowDetection = function(e, t) {
12230
- let n = (0, import_compiler_runtime$38.c)(4), i = t === void 0 ? true : t, [a, o] = (0, import_react.useState)(false), s, c;
12230
+ let n = (0, import_compiler_runtime$39.c)(4), i = t === void 0 ? true : t, [a, o] = (0, import_react.useState)(false), s, c;
12231
12231
  return n[0] !== i || n[1] !== e ? (s = () => {
12232
12232
  let t2 = e.current;
12233
12233
  if (!t2 || !i) return;
@@ -12324,9 +12324,9 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
12324
12324
  LazyVegaEmbed = import_react.lazy(() => import("./react-vega-Cavbrg4l.js").then((e) => ({
12325
12325
  default: e.VegaEmbed
12326
12326
  })));
12327
- var import_compiler_runtime$37 = require_compiler_runtime();
12327
+ var import_compiler_runtime$38 = require_compiler_runtime();
12328
12328
  ChartLoadingState = () => {
12329
- let e = (0, import_compiler_runtime$37.c)(1), t;
12329
+ let e = (0, import_compiler_runtime$38.c)(1), t;
12330
12330
  return e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t = (0, import_jsx_runtime.jsxs)("div", {
12331
12331
  className: "flex items-center gap-2 justify-center",
12332
12332
  children: [
@@ -12341,7 +12341,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
12341
12341
  }), e[0] = t) : t = e[0], t;
12342
12342
  };
12343
12343
  ChartErrorState = (e) => {
12344
- let t = (0, import_compiler_runtime$37.c)(2), { error: n } = e, i;
12344
+ let t = (0, import_compiler_runtime$38.c)(2), { error: n } = e, i;
12345
12345
  return t[0] === n ? i = t[1] : (i = (0, import_jsx_runtime.jsx)("div", {
12346
12346
  className: "flex items-center justify-center",
12347
12347
  children: (0, import_jsx_runtime.jsx)(ErrorBanner, {
@@ -12350,7 +12350,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
12350
12350
  }), t[0] = n, t[1] = i), i;
12351
12351
  };
12352
12352
  ChartInfoState = (e) => {
12353
- let t = (0, import_compiler_runtime$37.c)(8), { children: n, className: i } = e, o;
12353
+ let t = (0, import_compiler_runtime$38.c)(8), { children: n, className: i } = e, o;
12354
12354
  t[0] === i ? o = t[1] : (o = cn("flex flex-col items-center justify-center gap-4", i), t[0] = i, t[1] = o);
12355
12355
  let s;
12356
12356
  t[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = (0, import_jsx_runtime.jsx)(ChartPie, {
@@ -12370,11 +12370,11 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
12370
12370
  ]
12371
12371
  }), t[5] = o, t[6] = c, t[7] = d) : d = t[7], d;
12372
12372
  };
12373
- let import_compiler_runtime$36;
12374
- import_compiler_runtime$36 = require_compiler_runtime();
12373
+ let import_compiler_runtime$37;
12374
+ import_compiler_runtime$37 = require_compiler_runtime();
12375
12375
  Tabs = Root2;
12376
12376
  TabsList = import_react.forwardRef((e, t) => {
12377
- let n = (0, import_compiler_runtime$36.c)(9), i, o;
12377
+ let n = (0, import_compiler_runtime$37.c)(9), i, o;
12378
12378
  n[0] === e ? (i = n[1], o = n[2]) : ({ className: i, ...o } = e, n[0] = e, n[1] = i, n[2] = o);
12379
12379
  let s;
12380
12380
  n[3] === i ? s = n[4] : (s = cn("inline-flex max-h-14 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground", i), n[3] = i, n[4] = s);
@@ -12387,7 +12387,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
12387
12387
  });
12388
12388
  TabsList.displayName = List.displayName;
12389
12389
  TabsTrigger = import_react.forwardRef((e, t) => {
12390
- let n = (0, import_compiler_runtime$36.c)(9), i, o;
12390
+ let n = (0, import_compiler_runtime$37.c)(9), i, o;
12391
12391
  n[0] === e ? (i = n[1], o = n[2]) : ({ className: i, ...o } = e, n[0] = e, n[1] = i, n[2] = o);
12392
12392
  let s;
12393
12393
  n[3] === i ? s = n[4] : (s = cn("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-hidden focus-visible:ring-1 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", i), n[3] = i, n[4] = s);
@@ -12400,7 +12400,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
12400
12400
  });
12401
12401
  TabsTrigger.displayName = Trigger.displayName;
12402
12402
  TabsContent = import_react.forwardRef((e, t) => {
12403
- let n = (0, import_compiler_runtime$36.c)(9), i, o;
12403
+ let n = (0, import_compiler_runtime$37.c)(9), i, o;
12404
12404
  n[0] === e ? (i = n[1], o = n[2]) : ({ className: i, ...o } = e, n[0] = e, n[1] = i, n[2] = o);
12405
12405
  let s;
12406
12406
  n[3] === i ? s = n[4] : (s = cn("mt-2 ring-offset-background focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2", i), n[3] = i, n[4] = s);
@@ -12412,9 +12412,9 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
12412
12412
  }), n[5] = o, n[6] = t, n[7] = s, n[8] = c) : c = n[8], c;
12413
12413
  });
12414
12414
  TabsContent.displayName = Content.displayName;
12415
- var import_compiler_runtime$35 = require_compiler_runtime();
12415
+ var import_compiler_runtime$36 = require_compiler_runtime();
12416
12416
  const WithLocale = (e) => {
12417
- let t = (0, import_compiler_runtime$35.c)(3), { children: n } = e, { locale: i } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(), a;
12417
+ let t = (0, import_compiler_runtime$36.c)(3), { children: n } = e, { locale: i } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(), a;
12418
12418
  return t[0] !== n || t[1] !== i ? (a = n(i), t[0] = n, t[1] = i, t[2] = a) : a = t[2], a;
12419
12419
  };
12420
12420
  function tzName(e, t, n = "long") {
@@ -12625,9 +12625,9 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
12625
12625
  return n;
12626
12626
  }
12627
12627
  };
12628
- var import_compiler_runtime$34 = require_compiler_runtime();
12628
+ var import_compiler_runtime$35 = require_compiler_runtime();
12629
12629
  const DraggablePopover = (e) => {
12630
- let t = (0, import_compiler_runtime$34.c)(25), n, i, a;
12630
+ let t = (0, import_compiler_runtime$35.c)(25), n, i, a;
12631
12631
  t[0] === e ? (n = t[1], i = t[2], a = t[3]) : ({ children: n, className: i, ...a } = e, t[0] = e, t[1] = n, t[2] = i, t[3] = a);
12632
12632
  let o;
12633
12633
  t[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = {
@@ -12692,7 +12692,50 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
12692
12692
  A
12693
12693
  ]
12694
12694
  }), t[22] = a, t[23] = A, t[24] = M) : M = t[24], M;
12695
- }, Sets = {
12695
+ };
12696
+ var import_compiler_runtime$34 = require_compiler_runtime();
12697
+ const RegexInput = import_react.forwardRef((e, t) => {
12698
+ let n = (0, import_compiler_runtime$34.c)(18), { id: i, value: o, onChange: s, onKeyDown: c, placeholder: d, className: f, autoFocus: h, "aria-label": _ } = e, v = d === void 0 ? "pattern" : d, y;
12699
+ n[0] === f ? y = n[1] : (y = cn("flex items-stretch h-6 mb-1 rounded-sm border border-input bg-background shadow-xs-solid focus-within:shadow-md-solid focus-within:ring-1 focus-within:ring-ring focus-within:border-primary", f), n[0] = f, n[1] = y);
12700
+ let S;
12701
+ n[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = (0, import_jsx_runtime.jsx)(Slash, {}), n[2] = S) : S = n[2];
12702
+ let w;
12703
+ n[3] === s ? w = n[4] : (w = (e2) => s(e2.target.value), n[3] = s, n[4] = w);
12704
+ let E;
12705
+ n[5] !== _ || n[6] !== h || n[7] !== i || n[8] !== c || n[9] !== v || n[10] !== t || n[11] !== w || n[12] !== o ? (E = (0, import_jsx_runtime.jsx)(Input, {
12706
+ ref: t,
12707
+ id: i,
12708
+ type: "text",
12709
+ value: o,
12710
+ onChange: w,
12711
+ onKeyDown: c,
12712
+ placeholder: v,
12713
+ autoFocus: h,
12714
+ "aria-label": _,
12715
+ rootClassName: "flex-1 min-w-0",
12716
+ className: "border-0 mb-0 h-full shadow-none! hover:shadow-none! focus-visible:shadow-none! focus-visible:ring-0 focus-visible:border-0 rounded-none bg-transparent"
12717
+ }), n[5] = _, n[6] = h, n[7] = i, n[8] = c, n[9] = v, n[10] = t, n[11] = w, n[12] = o, n[13] = E) : E = n[13];
12718
+ let O;
12719
+ n[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (O = (0, import_jsx_runtime.jsx)(Slash, {}), n[14] = O) : O = n[14];
12720
+ let A;
12721
+ return n[15] !== y || n[16] !== E ? (A = (0, import_jsx_runtime.jsxs)("div", {
12722
+ className: y,
12723
+ children: [
12724
+ S,
12725
+ E,
12726
+ O
12727
+ ]
12728
+ }), n[15] = y, n[16] = E, n[17] = A) : A = n[17], A;
12729
+ });
12730
+ RegexInput.displayName = "RegexInput";
12731
+ var Slash = () => {
12732
+ let e = (0, import_compiler_runtime$34.c)(1), t;
12733
+ return e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t = (0, import_jsx_runtime.jsx)("span", {
12734
+ className: "px-1.5 flex items-center text-muted-foreground font-code text-sm select-none",
12735
+ children: "/"
12736
+ }), e[0] = t) : t = e[0], t;
12737
+ };
12738
+ const Sets = {
12696
12739
  merge(...e) {
12697
12740
  let t = /* @__PURE__ */ new Set();
12698
12741
  for (let n of e) for (let e2 of n) t.add(e2);
@@ -12857,7 +12900,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
12857
12900
  }, [
12858
12901
  h
12859
12902
  ]), k(() => {
12860
- U(6, DN);
12903
+ U(6, WN);
12861
12904
  }, []);
12862
12905
  let K = import_react.useMemo(() => ({
12863
12906
  subscribe: (e2) => (s.current.add(e2), () => s.current.delete(e2)),
@@ -12866,7 +12909,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
12866
12909
  var _a2;
12867
12910
  var a2, o2, s2;
12868
12911
  if (!Object.is(n.current[e2], t2)) {
12869
- if (n.current[e2] = t2, e2 === "search") $(), Q(), U(1, EN);
12912
+ if (n.current[e2] = t2, e2 === "search") $(), Q(), U(1, UN);
12870
12913
  else if (e2 === "value") {
12871
12914
  if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
12872
12915
  let e3 = document.getElementById(I);
@@ -12874,8 +12917,8 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
12874
12917
  }
12875
12918
  if (U(7, () => {
12876
12919
  var _a3;
12877
- n.current.selectedItemId = (_a3 = ON()) == null ? void 0 : _a3.id, K.emit();
12878
- }), i2 || U(5, DN), ((_a2 = c.current) == null ? void 0 : _a2.value) !== void 0) {
12920
+ n.current.selectedItemId = (_a3 = GN()) == null ? void 0 : _a3.id, K.emit();
12921
+ }), i2 || U(5, WN), ((_a2 = c.current) == null ? void 0 : _a2.value) !== void 0) {
12879
12922
  let e3 = t2 ?? "";
12880
12923
  (s2 = (o2 = c.current).onValueChange) == null || s2.call(o2, e3);
12881
12924
  return;
@@ -12900,12 +12943,12 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
12900
12943
  item: (e2, t2) => (i.current.add(e2), t2 && (a.current.has(t2) ? a.current.get(t2).add(e2) : a.current.set(t2, /* @__PURE__ */ new Set([
12901
12944
  e2
12902
12945
  ]))), U(3, () => {
12903
- $(), Q(), n.current.value || EN(), K.emit();
12946
+ $(), Q(), n.current.value || UN(), K.emit();
12904
12947
  }), () => {
12905
12948
  o.current.delete(e2), i.current.delete(e2), n.current.filtered.items.delete(e2);
12906
- let t3 = ON();
12949
+ let t3 = GN();
12907
12950
  U(4, () => {
12908
- $(), (t3 == null ? void 0 : t3.getAttribute("id")) === e2 && EN(), K.emit();
12951
+ $(), (t3 == null ? void 0 : t3.getAttribute("id")) === e2 && UN(), K.emit();
12909
12952
  });
12910
12953
  }),
12911
12954
  group: (e2) => (a.current.has(e2) || a.current.set(e2, /* @__PURE__ */ new Set()), () => {
@@ -12938,7 +12981,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
12938
12981
  ]);
12939
12982
  });
12940
12983
  let i2 = z.current;
12941
- kN().sort((t3, n2) => {
12984
+ KN().sort((t3, n2) => {
12942
12985
  let i3 = t3.getAttribute("id"), a2 = n2.getAttribute("id");
12943
12986
  return (e2.get(a2) ?? 0) - (e2.get(i3) ?? 0);
12944
12987
  }).forEach((e3) => {
@@ -12950,9 +12993,9 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
12950
12993
  t3 == null ? void 0 : t3.parentElement.appendChild(t3);
12951
12994
  });
12952
12995
  }
12953
- function EN() {
12996
+ function UN() {
12954
12997
  var _a2;
12955
- let e2 = (_a2 = kN().find((e3) => e3.getAttribute("aria-disabled") !== "true")) == null ? void 0 : _a2.getAttribute(T);
12998
+ let e2 = (_a2 = KN().find((e3) => e3.getAttribute("aria-disabled") !== "true")) == null ? void 0 : _a2.getAttribute(T);
12956
12999
  K.setState("value", e2 || void 0);
12957
13000
  }
12958
13001
  function $() {
@@ -12973,43 +13016,43 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
12973
13016
  }
12974
13017
  n.current.filtered.count = e2;
12975
13018
  }
12976
- function DN() {
13019
+ function WN() {
12977
13020
  var _a2, _b;
12978
13021
  var e2;
12979
- let t2 = ON();
13022
+ let t2 = GN();
12980
13023
  t2 && (((_a2 = t2.parentElement) == null ? void 0 : _a2.firstChild) === t2 && ((e2 = (_b = t2.closest(N$1)) == null ? void 0 : _b.querySelector(be)) == null || e2.scrollIntoView({
12981
13024
  block: "nearest"
12982
13025
  })), t2.scrollIntoView({
12983
13026
  block: "nearest"
12984
13027
  }));
12985
13028
  }
12986
- function ON() {
13029
+ function GN() {
12987
13030
  var _a2;
12988
13031
  return (_a2 = z.current) == null ? void 0 : _a2.querySelector(`${le}[aria-selected="true"]`);
12989
13032
  }
12990
- function kN() {
13033
+ function KN() {
12991
13034
  var _a2;
12992
13035
  return Array.from(((_a2 = z.current) == null ? void 0 : _a2.querySelectorAll(ce$1)) || []);
12993
13036
  }
12994
- function AN(e2) {
12995
- let t2 = kN()[e2];
13037
+ function qN(e2) {
13038
+ let t2 = KN()[e2];
12996
13039
  t2 && K.setState("value", t2.getAttribute(T));
12997
13040
  }
12998
- function jN(e2) {
13041
+ function JN(e2) {
12999
13042
  var t2;
13000
- let n2 = ON(), i2 = kN(), a2 = i2.findIndex((e3) => e3 === n2), o2 = i2[a2 + e2];
13043
+ let n2 = GN(), i2 = KN(), a2 = i2.findIndex((e3) => e3 === n2), o2 = i2[a2 + e2];
13001
13044
  (t2 = c.current) != null && t2.loop && (o2 = a2 + e2 < 0 ? i2[i2.length - 1] : a2 + e2 === i2.length ? i2[0] : i2[a2 + e2]), o2 && K.setState("value", o2.getAttribute(T));
13002
13045
  }
13003
- function MN(e2) {
13046
+ function YN(e2) {
13004
13047
  var _a2;
13005
- let t2 = (_a2 = ON()) == null ? void 0 : _a2.closest(N$1), n2;
13048
+ let t2 = (_a2 = GN()) == null ? void 0 : _a2.closest(N$1), n2;
13006
13049
  for (; t2 && !n2; ) t2 = e2 > 0 ? we(t2, N$1) : De(t2, N$1), n2 = t2 == null ? void 0 : t2.querySelector(ce$1);
13007
- n2 ? K.setState("value", n2.getAttribute(T)) : jN(e2);
13050
+ n2 ? K.setState("value", n2.getAttribute(T)) : JN(e2);
13008
13051
  }
13009
- let NN = () => AN(kN().length - 1), PN = (e2) => {
13010
- e2.preventDefault(), e2.metaKey ? NN() : e2.altKey ? MN(1) : jN(1);
13011
- }, FN = (e2) => {
13012
- e2.preventDefault(), e2.metaKey ? AN(0) : e2.altKey ? MN(-1) : jN(-1);
13052
+ let XN = () => qN(KN().length - 1), ZN = (e2) => {
13053
+ e2.preventDefault(), e2.metaKey ? XN() : e2.altKey ? YN(1) : JN(1);
13054
+ }, QN = (e2) => {
13055
+ e2.preventDefault(), e2.metaKey ? qN(0) : e2.altKey ? YN(-1) : JN(-1);
13013
13056
  };
13014
13057
  return import_react.createElement(Primitive.div, {
13015
13058
  ref: t,
@@ -13023,27 +13066,27 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
13023
13066
  if (!(e2.defaultPrevented || n2)) switch (e2.key) {
13024
13067
  case "n":
13025
13068
  case "j":
13026
- E && e2.ctrlKey && PN(e2);
13069
+ E && e2.ctrlKey && ZN(e2);
13027
13070
  break;
13028
13071
  case "ArrowDown":
13029
- PN(e2);
13072
+ ZN(e2);
13030
13073
  break;
13031
13074
  case "p":
13032
13075
  case "k":
13033
- E && e2.ctrlKey && FN(e2);
13076
+ E && e2.ctrlKey && QN(e2);
13034
13077
  break;
13035
13078
  case "ArrowUp":
13036
- FN(e2);
13079
+ QN(e2);
13037
13080
  break;
13038
13081
  case "Home":
13039
- e2.preventDefault(), AN(0);
13082
+ e2.preventDefault(), qN(0);
13040
13083
  break;
13041
13084
  case "End":
13042
- e2.preventDefault(), NN();
13085
+ e2.preventDefault(), XN();
13043
13086
  break;
13044
13087
  case "Enter": {
13045
13088
  e2.preventDefault();
13046
- let t3 = ON();
13089
+ let t3 = GN();
13047
13090
  if (t3) {
13048
13091
  let e3 = new Event(Z);
13049
13092
  t3.dispatchEvent(e3);
@@ -13711,30 +13754,31 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
13711
13754
  }
13712
13755
  }
13713
13756
  var TOP_K_ROWS = 30;
13714
- const FilterByValuesPicker = ({ column: e, calculateTopKRows: t, chosenValues: n, onChange: i }) => {
13715
- let [o, s] = (0, import_react.useState)(false), c = (0, import_react.useMemo)(() => new Set(n), [
13757
+ const FilterByValuesPicker = ({ column: e, calculateTopKRows: t, chosenValues: n, onChange: i, creatable: o = false }) => {
13758
+ let [s, c] = (0, import_react.useState)(false), d = (0, import_react.useMemo)(() => new Set(n), [
13716
13759
  n
13717
- ]), d = (0, import_react.useMemo)(() => c.size === 0 ? "Select values\u2026" : `[${[
13718
- ...c
13760
+ ]), h = (0, import_react.useMemo)(() => d.size === 0 ? "Select values\u2026" : `[${[
13761
+ ...d
13719
13762
  ].map((e2) => stringifyUnknownValue({
13720
13763
  value: e2
13721
13764
  })).join(", ")}]`, [
13722
- c
13765
+ d
13723
13766
  ]);
13724
13767
  return (0, import_jsx_runtime.jsxs)(Popover, {
13725
- open: o,
13726
- onOpenChange: s,
13768
+ open: s,
13769
+ onOpenChange: c,
13727
13770
  children: [
13728
13771
  (0, import_jsx_runtime.jsx)(PopoverTrigger, {
13729
13772
  asChild: true,
13730
13773
  children: (0, import_jsx_runtime.jsxs)(Button, {
13774
+ type: "button",
13731
13775
  variant: "outline",
13732
13776
  size: "xs",
13733
13777
  className: "h-6 mb-1 w-full justify-between font-normal",
13734
13778
  children: [
13735
13779
  (0, import_jsx_runtime.jsx)("span", {
13736
- className: cn("truncate", c.size === 0 && "text-muted-foreground"),
13737
- children: d
13780
+ className: cn("truncate", d.size === 0 && "text-muted-foreground"),
13781
+ children: h
13738
13782
  }),
13739
13783
  (0, import_jsx_runtime.jsx)(ChevronDown, {
13740
13784
  className: "h-4 w-4 opacity-50 shrink-0"
@@ -13747,73 +13791,101 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
13747
13791
  children: (0, import_jsx_runtime.jsx)(FilterByValuesList, {
13748
13792
  column: e,
13749
13793
  calculateTopKRows: t,
13750
- chosenValues: c,
13751
- onChange: i
13794
+ chosenValues: d,
13795
+ onChange: i,
13796
+ creatable: o
13752
13797
  })
13753
13798
  })
13754
13799
  ]
13755
13800
  });
13756
- }, FilterByValuesList = ({ column: e, calculateTopKRows: t, chosenValues: i, onChange: a }) => {
13757
- let [o, s] = (0, import_react.useState)(""), { data: c, isPending: d, error: f } = useAsyncData(async () => t ? (await t({
13801
+ }, FilterByValuesList = ({ column: e, calculateTopKRows: t, chosenValues: i, onChange: a, creatable: o = false }) => {
13802
+ let [s, c] = (0, import_react.useState)(""), { data: d, isPending: f, error: h } = useAsyncData(async () => t ? (await t({
13758
13803
  column: e.id,
13759
13804
  k: TOP_K_ROWS
13760
13805
  })).data : null, [
13761
13806
  t,
13762
13807
  e.id
13763
- ]), h = (0, import_react.useMemo)(() => {
13764
- if (!c) return [];
13808
+ ]), _ = (0, import_react.useMemo)(() => {
13809
+ if (!d) return [];
13765
13810
  try {
13766
- return c.filter(([e2, t2]) => {
13811
+ return d.filter(([e2, t2]) => {
13767
13812
  if (e2 === void 0) return false;
13768
13813
  let n = String(e2);
13769
- return smartMatch(o, n) || n.toLowerCase().includes(o.toLowerCase());
13814
+ return smartMatch(s, n) || n.toLowerCase().includes(s.toLowerCase());
13770
13815
  });
13771
13816
  } catch (e2) {
13772
13817
  return Logger.error("Error filtering data", e2), [];
13773
13818
  }
13774
13819
  }, [
13775
- c,
13776
- o
13777
- ]), _ = (e2) => {
13820
+ d,
13821
+ s
13822
+ ]), v = (0, import_react.useMemo)(() => {
13823
+ let e2 = new Set(_.map(([e3]) => e3)), t2 = [];
13824
+ for (let n of i) {
13825
+ if (e2.has(n)) continue;
13826
+ let i2 = String(n);
13827
+ (s.length === 0 || smartMatch(s, i2) || i2.toLowerCase().includes(s.toLowerCase())) && t2.push([
13828
+ n,
13829
+ void 0
13830
+ ]);
13831
+ }
13832
+ return [
13833
+ ..._,
13834
+ ...t2
13835
+ ];
13836
+ }, [
13837
+ _,
13838
+ i,
13839
+ s
13840
+ ]), y = (e2) => {
13778
13841
  a([
13779
13842
  ...Sets.toggle(i, e2)
13780
13843
  ]);
13781
- }, v = h.length > 0 && h.every(([e2]) => i.has(e2)), y = v ? true : i.size > 0 ? "indeterminate" : false;
13782
- return d ? (0, import_jsx_runtime.jsx)(Spinner, {
13844
+ }, S = s.trim(), w = o && S !== "" && !v.some(([e2]) => String(e2) === S), E = () => {
13845
+ w && (a([
13846
+ ...i,
13847
+ S
13848
+ ]), c(""));
13849
+ }, O = v.length > 0 && v.every(([e2]) => i.has(e2)), A = O ? true : i.size > 0 ? "indeterminate" : false;
13850
+ return f ? (0, import_jsx_runtime.jsx)(Spinner, {
13783
13851
  size: "medium",
13784
13852
  className: "mx-auto mt-12 mb-10"
13785
- }) : f ? (0, import_jsx_runtime.jsx)(ErrorBanner, {
13786
- error: f,
13853
+ }) : h ? (0, import_jsx_runtime.jsx)(ErrorBanner, {
13854
+ error: h,
13787
13855
  className: "my-10 mx-4"
13788
- }) : c ? (0, import_jsx_runtime.jsxs)(Command, {
13856
+ }) : d ? (0, import_jsx_runtime.jsxs)(Command, {
13789
13857
  className: "text-sm outline-hidden",
13790
13858
  shouldFilter: false,
13791
13859
  children: [
13792
13860
  (0, import_jsx_runtime.jsx)(CommandInput, {
13793
- placeholder: `Search among the top ${c.length} values`,
13861
+ placeholder: o ? "Search or add a value\u2026" : `Search among the top ${d.length} values`,
13794
13862
  autoFocus: true,
13795
- onValueChange: (e2) => s(e2.trim())
13863
+ value: s,
13864
+ onValueChange: c,
13865
+ onKeyDown: (e2) => {
13866
+ e2.key === "Enter" && w && (e2.preventDefault(), E());
13867
+ }
13796
13868
  }),
13797
13869
  (0, import_jsx_runtime.jsx)(CommandEmpty, {
13798
13870
  children: "No results found."
13799
13871
  }),
13800
13872
  (0, import_jsx_runtime.jsxs)(CommandList, {
13801
13873
  children: [
13802
- h.length > 0 && (0, import_jsx_runtime.jsxs)(CommandItem, {
13874
+ v.length > 0 && (0, import_jsx_runtime.jsxs)(CommandItem, {
13803
13875
  value: "__select-all__",
13804
13876
  className: "border-b rounded-none px-3",
13805
13877
  onSelect: () => {
13806
- if (!c) return;
13878
+ if (!d) return;
13807
13879
  let e2 = new Set(i);
13808
- if (v) for (let [t2] of h) e2.delete(t2);
13809
- else for (let [t2] of h) e2.add(t2);
13880
+ if (O) for (let [t2] of v) e2.delete(t2);
13881
+ else for (let [t2] of v) e2.add(t2);
13810
13882
  a([
13811
13883
  ...e2
13812
13884
  ]);
13813
13885
  },
13814
13886
  children: [
13815
13887
  (0, import_jsx_runtime.jsx)(Checkbox, {
13816
- checked: y,
13888
+ checked: A,
13817
13889
  "aria-label": "Select all",
13818
13890
  className: "mr-3 h-3.5 w-3.5"
13819
13891
  }),
@@ -13827,7 +13899,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
13827
13899
  })
13828
13900
  ]
13829
13901
  }),
13830
- h.map(([t2, n]) => {
13902
+ v.map(([t2, n]) => {
13831
13903
  var _a2;
13832
13904
  let a2 = i.has(t2), o2 = stringifyUnknownValue({
13833
13905
  value: t2
@@ -13835,7 +13907,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
13835
13907
  return (0, import_jsx_runtime.jsxs)(CommandItem, {
13836
13908
  value: o2,
13837
13909
  className: "not-last:border-b rounded-none px-3",
13838
- onSelect: () => _(t2),
13910
+ onSelect: () => y(t2),
13839
13911
  children: [
13840
13912
  (0, import_jsx_runtime.jsx)(Checkbox, {
13841
13913
  checked: a2,
@@ -13850,14 +13922,24 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
13850
13922
  }),
13851
13923
  (0, import_jsx_runtime.jsx)("span", {
13852
13924
  className: "ml-3",
13853
- children: n
13925
+ children: n === void 0 ? "\u2014" : n
13854
13926
  })
13855
13927
  ]
13856
13928
  }, o2);
13929
+ }),
13930
+ w && (0, import_jsx_runtime.jsxs)(CommandItem, {
13931
+ value: `__create__:${S}`,
13932
+ className: "border-t rounded-none px-3 italic",
13933
+ onSelect: E,
13934
+ children: [
13935
+ '+ Add "',
13936
+ S,
13937
+ '"'
13938
+ ]
13857
13939
  })
13858
13940
  ]
13859
13941
  }),
13860
- c.length === TOP_K_ROWS && (0, import_jsx_runtime.jsxs)("span", {
13942
+ d.length === TOP_K_ROWS && (0, import_jsx_runtime.jsxs)("span", {
13861
13943
  className: "text-xs text-muted-foreground py-1.5 text-center",
13862
13944
  children: [
13863
13945
  "Only showing the top ",
@@ -13870,7 +13952,57 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
13870
13952
  className: "py-6 px-4 text-sm text-muted-foreground text-center",
13871
13953
  children: "No values available"
13872
13954
  });
13873
- }, Filter = {
13955
+ }, OPERATOR_LABELS = {
13956
+ "==": "Equals",
13957
+ "!=": "Doesn't equal",
13958
+ ">": "Greater than",
13959
+ ">=": "Greater than or equal",
13960
+ "<": "Less than",
13961
+ "<=": "Less than or equal",
13962
+ between: "Between",
13963
+ contains: "Contains",
13964
+ equals: "Equals",
13965
+ does_not_equal: "Doesn't equal",
13966
+ starts_with: "Starts with",
13967
+ ends_with: "Ends with",
13968
+ regex: "Matches regex",
13969
+ in: "Is in",
13970
+ not_in: "Not in",
13971
+ is_empty: "Is empty",
13972
+ is_true: "Is true",
13973
+ is_false: "Is false",
13974
+ is_null: "Is null",
13975
+ is_not_null: "Is not null"
13976
+ }, NULLISH_OPS = [
13977
+ "is_null",
13978
+ "is_not_null"
13979
+ ], MEMBERSHIP_OPS = [
13980
+ "in",
13981
+ "not_in"
13982
+ ], NUMBER_COMPARISON_OPS = [
13983
+ "==",
13984
+ "!=",
13985
+ ">",
13986
+ ">=",
13987
+ "<",
13988
+ "<="
13989
+ ], TEXT_SCALAR_OPS = [
13990
+ "contains",
13991
+ "equals",
13992
+ "does_not_equal",
13993
+ "regex",
13994
+ "starts_with",
13995
+ "ends_with"
13996
+ ], NUMBER_OPS = [
13997
+ "between",
13998
+ ...NUMBER_COMPARISON_OPS,
13999
+ ...NULLISH_OPS
14000
+ ], TEXT_OPS = [
14001
+ ...TEXT_SCALAR_OPS,
14002
+ ...MEMBERSHIP_OPS,
14003
+ "is_empty",
14004
+ ...NULLISH_OPS
14005
+ ], Filter = {
13874
14006
  number(e) {
13875
14007
  return {
13876
14008
  type: "number",
@@ -13914,45 +14046,94 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
13914
14046
  };
13915
14047
  }
13916
14048
  };
14049
+ function isNullishFilter(e) {
14050
+ return e.operator === "is_null" || e.operator === "is_not_null";
14051
+ }
13917
14052
  function filterToFilterCondition(e, t) {
13918
14053
  if (!t) return [];
13919
14054
  let i = e;
13920
- if (t.operator === "is_null" || t.operator === "is_not_null") return [
14055
+ if (isNullishFilter(t)) return [
13921
14056
  {
13922
14057
  column_id: i,
13923
14058
  operator: t.operator,
13924
- value: void 0,
13925
14059
  type: "condition",
13926
14060
  negate: false
13927
14061
  }
13928
14062
  ];
13929
14063
  switch (t.type) {
13930
- case "number": {
13931
- let e2 = [];
13932
- return t.min !== void 0 && e2.push({
13933
- column_id: i,
13934
- operator: ">=",
13935
- value: t.min,
13936
- type: "condition",
13937
- negate: false
13938
- }), t.max !== void 0 && e2.push({
13939
- column_id: i,
13940
- operator: "<=",
13941
- value: t.max,
13942
- type: "condition",
13943
- negate: false
13944
- }), e2;
13945
- }
14064
+ case "number":
14065
+ switch (t.operator) {
14066
+ case "between":
14067
+ return [
14068
+ {
14069
+ column_id: i,
14070
+ operator: "between",
14071
+ value: {
14072
+ min: t.min,
14073
+ max: t.max
14074
+ },
14075
+ type: "condition",
14076
+ negate: false
14077
+ }
14078
+ ];
14079
+ case "==":
14080
+ case "!=":
14081
+ case ">":
14082
+ case ">=":
14083
+ case "<":
14084
+ case "<=":
14085
+ return [
14086
+ {
14087
+ column_id: i,
14088
+ operator: t.operator,
14089
+ value: t.value,
14090
+ type: "condition",
14091
+ negate: false
14092
+ }
14093
+ ];
14094
+ default:
14095
+ assertNever(t);
14096
+ }
13946
14097
  case "text":
13947
- return [
13948
- {
13949
- column_id: i,
13950
- operator: t.operator,
13951
- value: t.text,
13952
- type: "condition",
13953
- negate: false
13954
- }
13955
- ];
14098
+ switch (t.operator) {
14099
+ case "contains":
14100
+ case "equals":
14101
+ case "does_not_equal":
14102
+ case "regex":
14103
+ case "starts_with":
14104
+ case "ends_with":
14105
+ return [
14106
+ {
14107
+ column_id: i,
14108
+ operator: t.operator,
14109
+ value: t.text,
14110
+ type: "condition",
14111
+ negate: false
14112
+ }
14113
+ ];
14114
+ case "in":
14115
+ case "not_in":
14116
+ return [
14117
+ {
14118
+ column_id: i,
14119
+ operator: t.operator,
14120
+ value: t.values,
14121
+ type: "condition",
14122
+ negate: false
14123
+ }
14124
+ ];
14125
+ case "is_empty":
14126
+ return [
14127
+ {
14128
+ column_id: i,
14129
+ operator: "is_empty",
14130
+ type: "condition",
14131
+ negate: false
14132
+ }
14133
+ ];
14134
+ default:
14135
+ assertNever(t);
14136
+ }
13956
14137
  case "datetime": {
13957
14138
  let e2 = [];
13958
14139
  return t.min !== void 0 && e2.push({
@@ -14006,7 +14187,6 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
14006
14187
  {
14007
14188
  column_id: i,
14008
14189
  operator: "is_true",
14009
- value: void 0,
14010
14190
  type: "condition",
14011
14191
  negate: false
14012
14192
  }
@@ -14014,7 +14194,6 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
14014
14194
  {
14015
14195
  column_id: i,
14016
14196
  operator: "is_false",
14017
- value: void 0,
14018
14197
  type: "condition",
14019
14198
  negate: false
14020
14199
  }
@@ -16319,30 +16498,31 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
16319
16498
  });
16320
16499
  }
16321
16500
  const FilterButtons = (e) => {
16322
- let t = (0, import_compiler_runtime$30.c)(8), { onApply: n, onClear: i, clearButtonDisabled: a } = e, o;
16323
- t[0] === n ? o = t[1] : (o = (0, import_jsx_runtime.jsx)(Button, {
16501
+ let t = (0, import_compiler_runtime$30.c)(9), { onApply: n, onClear: i, clearButtonDisabled: a, applyButtonDisabled: o } = e, s;
16502
+ t[0] !== o || t[1] !== n ? (s = (0, import_jsx_runtime.jsx)(Button, {
16324
16503
  variant: "link",
16325
16504
  size: "sm",
16326
16505
  onClick: n,
16506
+ disabled: o,
16327
16507
  children: "Apply"
16328
- }), t[0] = n, t[1] = o);
16329
- let s;
16330
- t[2] !== a || t[3] !== i ? (s = (0, import_jsx_runtime.jsx)(Button, {
16508
+ }), t[0] = o, t[1] = n, t[2] = s) : s = t[2];
16509
+ let c;
16510
+ t[3] !== a || t[4] !== i ? (c = (0, import_jsx_runtime.jsx)(Button, {
16331
16511
  variant: "linkDestructive",
16332
16512
  size: "sm",
16333
16513
  className: "",
16334
16514
  onClick: i,
16335
16515
  disabled: a,
16336
16516
  children: "Clear"
16337
- }), t[2] = a, t[3] = i, t[4] = s) : s = t[4];
16338
- let c;
16339
- return t[5] !== o || t[6] !== s ? (c = (0, import_jsx_runtime.jsxs)("div", {
16517
+ }), t[3] = a, t[4] = i, t[5] = c) : c = t[5];
16518
+ let d;
16519
+ return t[6] !== s || t[7] !== c ? (d = (0, import_jsx_runtime.jsxs)("div", {
16340
16520
  className: "flex gap-2 px-2 justify-between",
16341
16521
  children: [
16342
- o,
16343
- s
16522
+ s,
16523
+ c
16344
16524
  ]
16345
- }), t[5] = o, t[6] = s, t[7] = c) : c = t[7], c;
16525
+ }), t[6] = s, t[7] = c, t[8] = d) : d = t[8], d;
16346
16526
  }, DataTableColumnHeader = ({ column: e, header: t, subheader: n, justify: i, className: o, calculateTopKRows: s, table: c }) => {
16347
16527
  let [d, f] = (0, import_react.useState)(false), { locale: h } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
16348
16528
  if (!t) return null;
@@ -16406,7 +16586,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
16406
16586
  renderColumnWrapping(e),
16407
16587
  renderFormatOptions(e, h),
16408
16588
  (0, import_jsx_runtime.jsx)(DropdownMenuSeparator, {}),
16409
- renderMenuItemFilter(e),
16589
+ renderMenuItemFilter(e, s),
16410
16590
  renderFilterByValues(e, f),
16411
16591
  _ && (0, import_jsx_runtime.jsx)(ClearFilterMenuItem, {
16412
16592
  column: e
@@ -16441,12 +16621,12 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
16441
16621
  children: renderSortFilterIcon(e)
16442
16622
  });
16443
16623
  };
16444
- function renderMenuItemFilter(e) {
16624
+ function renderMenuItemFilter(e, t) {
16445
16625
  var _a2;
16446
16626
  if (!e.getCanFilter()) return null;
16447
- let t = (_a2 = e.columnDef.meta) == null ? void 0 : _a2.filterType;
16448
- if (!t) return null;
16449
- let n = (0, import_jsx_runtime.jsxs)(DropdownMenuSubTrigger, {
16627
+ let n = (_a2 = e.columnDef.meta) == null ? void 0 : _a2.filterType;
16628
+ if (!n) return null;
16629
+ let i = (0, import_jsx_runtime.jsxs)(DropdownMenuSubTrigger, {
16450
16630
  children: [
16451
16631
  (0, import_jsx_runtime.jsx)(Funnel, {
16452
16632
  className: "mo-dropdown-icon"
@@ -16454,9 +16634,9 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
16454
16634
  "Filter"
16455
16635
  ]
16456
16636
  });
16457
- return t === "boolean" ? (0, import_jsx_runtime.jsxs)(DropdownMenuSub, {
16637
+ return n === "boolean" ? (0, import_jsx_runtime.jsxs)(DropdownMenuSub, {
16458
16638
  children: [
16459
- n,
16639
+ i,
16460
16640
  (0, import_jsx_runtime.jsx)(DropdownMenuPortal, {
16461
16641
  children: (0, import_jsx_runtime.jsx)(DropdownMenuSubContent, {
16462
16642
  children: (0, import_jsx_runtime.jsx)(BooleanFilter, {
@@ -16465,69 +16645,47 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
16465
16645
  })
16466
16646
  })
16467
16647
  ]
16468
- }) : t === "text" ? (0, import_jsx_runtime.jsxs)(DropdownMenuSub, {
16648
+ }) : n === "text" ? (0, import_jsx_runtime.jsxs)(DropdownMenuSub, {
16469
16649
  children: [
16470
- n,
16650
+ i,
16471
16651
  (0, import_jsx_runtime.jsx)(DropdownMenuPortal, {
16472
16652
  children: (0, import_jsx_runtime.jsx)(DropdownMenuSubContent, {
16473
- children: (0, import_jsx_runtime.jsx)(TextFilter, {
16474
- column: e
16653
+ children: (0, import_jsx_runtime.jsx)(TextFilterMenu, {
16654
+ column: e,
16655
+ calculateTopKRows: t
16475
16656
  })
16476
16657
  })
16477
16658
  })
16478
16659
  ]
16479
- }) : t === "number" ? (0, import_jsx_runtime.jsxs)(DropdownMenuSub, {
16660
+ }) : n === "number" ? (0, import_jsx_runtime.jsxs)(DropdownMenuSub, {
16480
16661
  children: [
16481
- n,
16662
+ i,
16482
16663
  (0, import_jsx_runtime.jsx)(DropdownMenuPortal, {
16483
16664
  children: (0, import_jsx_runtime.jsx)(DropdownMenuSubContent, {
16484
- children: (0, import_jsx_runtime.jsx)(NumberRangeFilter, {
16665
+ children: (0, import_jsx_runtime.jsx)(NumberFilterMenu, {
16485
16666
  column: e
16486
16667
  })
16487
16668
  })
16488
16669
  })
16489
16670
  ]
16490
- }) : (t === "select" || t === "time" || t === "datetime" || t === "date" || logNever(t), null);
16491
- }
16492
- var NULL_FILTER_OPERATORS = {
16493
- is_null: "is_null",
16494
- is_not_null: "is_not_null"
16495
- }, NullFilter = ({ column: e, defaultItem: t, operator: n, setOperator: i }) => {
16496
- let o = (t2) => {
16497
- i(t2), (t2 === "is_null" || t2 === "is_not_null") && e.setFilterValue(Filter.text({
16498
- operator: t2
16499
- }));
16500
- };
16501
- return (0, import_jsx_runtime.jsxs)(Select, {
16502
- value: n,
16503
- onValueChange: (e2) => o(e2),
16504
- children: [
16505
- (0, import_jsx_runtime.jsx)(SelectTrigger, {
16506
- className: cn("border-border shadow-none! ring-0! w-full mb-0.5", (n === "is_null" || n === "is_not_null") && "mb-2"),
16507
- children: (0, import_jsx_runtime.jsx)(SelectValue, {
16508
- defaultValue: n
16509
- })
16510
- }),
16511
- (0, import_jsx_runtime.jsxs)(SelectContent, {
16512
- children: [
16513
- t && (0, import_jsx_runtime.jsx)(SelectItem, {
16514
- value: t,
16515
- children: capitalize(t)
16516
- }),
16517
- (0, import_jsx_runtime.jsx)(SelectSeparator, {}),
16518
- (0, import_jsx_runtime.jsx)(SelectItem, {
16519
- value: NULL_FILTER_OPERATORS.is_null,
16520
- children: "Is null"
16521
- }),
16522
- (0, import_jsx_runtime.jsx)(SelectItem, {
16523
- value: NULL_FILTER_OPERATORS.is_not_null,
16524
- children: "Is not null"
16525
- })
16526
- ]
16527
- })
16528
- ]
16529
- });
16530
- }, BooleanFilter = ({ column: e }) => (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
16671
+ }) : (n === "select" || n === "time" || n === "datetime" || n === "date" || logNever(n), null);
16672
+ }
16673
+ var OperatorSelect = ({ operator: e, options: t, onChange: n }) => (0, import_jsx_runtime.jsxs)(Select, {
16674
+ value: e,
16675
+ onValueChange: (e2) => n(e2),
16676
+ children: [
16677
+ (0, import_jsx_runtime.jsx)(SelectTrigger, {
16678
+ className: "border-border shadow-none! ring-0! w-full mb-0.5",
16679
+ children: (0, import_jsx_runtime.jsx)(SelectValue, {})
16680
+ }),
16681
+ (0, import_jsx_runtime.jsx)(SelectContent, {
16682
+ children: t.map((e2) => (0, import_jsx_runtime.jsx)(SelectItem, {
16683
+ value: e2,
16684
+ children: OPERATOR_LABELS[e2]
16685
+ }, e2))
16686
+ })
16687
+ ]
16688
+ }), BooleanFilter = ({ column: e }) => (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
16531
16689
  children: [
16532
16690
  (0, import_jsx_runtime.jsx)(DropdownMenuItem, {
16533
16691
  onClick: () => e.setFilterValue(Filter.boolean({
@@ -16557,121 +16715,145 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
16557
16715
  children: "Is not null"
16558
16716
  })
16559
16717
  ]
16560
- }), NumberRangeFilter = ({ column: e }) => {
16561
- let t = e.getFilterValue(), n = t !== void 0, [i, a] = (0, import_react.useState)((t == null ? void 0 : t.operator) ?? "between"), [o, s] = (0, import_react.useState)(t == null ? void 0 : t.min), [c, d] = (0, import_react.useState)(t == null ? void 0 : t.max), f = (0, import_react.useRef)(null), h = (0, import_react.useRef)(null), _ = (t2 = {}) => {
16562
- e.setFilterValue(Filter.number({
16563
- min: t2.min ?? o,
16564
- max: t2.max ?? c,
16565
- operator: i === "between" ? void 0 : i
16718
+ }), NUMBER_COMPARISON_SET$1 = new Set(NUMBER_COMPARISON_OPS), isNumberComparisonOp$1 = (e) => NUMBER_COMPARISON_SET$1.has(e), isNumberComparisonFilter = (e) => isNumberComparisonOp$1(e.operator);
16719
+ const NumberFilterMenu = ({ column: e }) => {
16720
+ let t = e.getFilterValue(), n = t !== void 0, [i, a] = (0, import_react.useState)((t == null ? void 0 : t.operator) ?? "between"), [o, s] = (0, import_react.useState)((t == null ? void 0 : t.operator) === "between" ? t.min : void 0), [c, d] = (0, import_react.useState)((t == null ? void 0 : t.operator) === "between" ? t.max : void 0), [f, h] = (0, import_react.useState)(t !== void 0 && isNumberComparisonFilter(t) ? t.value : void 0), _ = isNumberComparisonOp$1(i), v = i === "is_null" || i === "is_not_null", y = i === "between" && (o === void 0 || c === void 0) || _ && f === void 0, S = () => {
16721
+ if (v) {
16722
+ e.setFilterValue(Filter.number({
16723
+ operator: i
16724
+ }));
16725
+ return;
16726
+ }
16727
+ if (i === "between" && o !== void 0 && c !== void 0) {
16728
+ e.setFilterValue(Filter.number({
16729
+ operator: "between",
16730
+ min: o,
16731
+ max: c
16732
+ }));
16733
+ return;
16734
+ }
16735
+ _ && f !== void 0 && e.setFilterValue(Filter.number({
16736
+ operator: i,
16737
+ value: f
16566
16738
  }));
16739
+ }, w = () => {
16740
+ s(void 0), d(void 0), h(void 0), e.setFilterValue(void 0);
16567
16741
  };
16568
16742
  return (0, import_jsx_runtime.jsxs)("div", {
16569
16743
  className: "flex flex-col gap-1 pt-3 px-2",
16570
16744
  children: [
16571
- (0, import_jsx_runtime.jsx)(NullFilter, {
16572
- column: e,
16573
- defaultItem: "between",
16745
+ (0, import_jsx_runtime.jsx)(OperatorSelect, {
16574
16746
  operator: i,
16575
- setOperator: a
16747
+ options: NUMBER_OPS,
16748
+ onChange: (e2) => {
16749
+ a(e2);
16750
+ }
16576
16751
  }),
16577
- i === "between" && (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
16752
+ i === "between" && (0, import_jsx_runtime.jsxs)("div", {
16753
+ className: "flex gap-1 items-center",
16578
16754
  children: [
16579
- (0, import_jsx_runtime.jsxs)("div", {
16580
- className: "flex gap-1 items-center",
16581
- children: [
16582
- (0, import_jsx_runtime.jsx)(NumberField, {
16583
- ref: f,
16584
- value: o,
16585
- onChange: (e2) => s(e2),
16586
- "aria-label": "min",
16587
- placeholder: "min",
16588
- onKeyDown: (e2) => {
16589
- var _a2;
16590
- e2.key === "Enter" && _({
16591
- min: Number.parseFloat(e2.currentTarget.value)
16592
- }), e2.key === "Tab" && ((_a2 = h.current) == null ? void 0 : _a2.focus());
16593
- },
16594
- className: "shadow-none! border-border hover:shadow-none!"
16595
- }),
16596
- (0, import_jsx_runtime.jsx)(Minus, {
16597
- className: "h-5 w-5 text-muted-foreground"
16598
- }),
16599
- (0, import_jsx_runtime.jsx)(NumberField, {
16600
- ref: h,
16601
- value: c,
16602
- onChange: (e2) => d(e2),
16603
- "aria-label": "max",
16604
- onKeyDown: (e2) => {
16605
- var _a2;
16606
- e2.key === "Enter" && _({
16607
- max: Number.parseFloat(e2.currentTarget.value)
16608
- }), e2.key === "Tab" && ((_a2 = f.current) == null ? void 0 : _a2.focus());
16609
- },
16610
- placeholder: "max",
16611
- className: "shadow-none! border-border hover:shadow-none!"
16612
- })
16613
- ]
16755
+ (0, import_jsx_runtime.jsx)(NumberField, {
16756
+ value: o,
16757
+ onChange: s,
16758
+ "aria-label": "min",
16759
+ placeholder: "min",
16760
+ className: "shadow-none! border-border hover:shadow-none!"
16614
16761
  }),
16615
- (0, import_jsx_runtime.jsx)(FilterButtons, {
16616
- onApply: _,
16617
- onClear: () => {
16618
- s(void 0), d(void 0), e.setFilterValue(void 0);
16619
- },
16620
- clearButtonDisabled: !n
16762
+ (0, import_jsx_runtime.jsx)(Minus, {
16763
+ className: "h-5 w-5 text-muted-foreground"
16764
+ }),
16765
+ (0, import_jsx_runtime.jsx)(NumberField, {
16766
+ value: c,
16767
+ onChange: d,
16768
+ "aria-label": "max",
16769
+ placeholder: "max",
16770
+ className: "shadow-none! border-border hover:shadow-none!"
16621
16771
  })
16622
16772
  ]
16773
+ }),
16774
+ _ && (0, import_jsx_runtime.jsx)(NumberField, {
16775
+ value: f,
16776
+ onChange: h,
16777
+ "aria-label": "value",
16778
+ placeholder: "value",
16779
+ className: "shadow-none! border-border hover:shadow-none!"
16780
+ }),
16781
+ (0, import_jsx_runtime.jsx)(FilterButtons, {
16782
+ onApply: S,
16783
+ onClear: w,
16784
+ clearButtonDisabled: !n,
16785
+ applyButtonDisabled: y
16623
16786
  })
16624
16787
  ]
16625
16788
  });
16626
- }, TextFilter = ({ column: e }) => {
16627
- let t = e.getFilterValue(), n = t !== void 0, [i, a] = (0, import_react.useState)((t == null ? void 0 : t.text) ?? ""), [o, s] = (0, import_react.useState)((t == null ? void 0 : t.operator) ?? "contains"), c = () => {
16628
- if (o !== "contains") {
16789
+ };
16790
+ var TEXT_SCALAR_SET$1 = new Set(TEXT_SCALAR_OPS), isTextScalarOp$1 = (e) => TEXT_SCALAR_SET$1.has(e);
16791
+ const TextFilterMenu = ({ column: e, calculateTopKRows: t }) => {
16792
+ let n = e.getFilterValue(), i = n !== void 0, [a, o] = (0, import_react.useState)((n == null ? void 0 : n.operator) ?? "contains"), [s, c] = (0, import_react.useState)(n && "text" in n ? n.text : ""), [d, f] = (0, import_react.useState)(n && "values" in n ? [
16793
+ ...n.values
16794
+ ] : []), h = isTextScalarOp$1(a), _ = a === "in" || a === "not_in", v = a === "is_null" || a === "is_not_null" || a === "is_empty", y = h && s === "" || _ && d.length === 0, S = () => {
16795
+ if (v) {
16629
16796
  e.setFilterValue(Filter.text({
16630
- operator: o
16797
+ operator: a
16631
16798
  }));
16632
16799
  return;
16633
16800
  }
16634
- if (i === "") {
16635
- e.setFilterValue(void 0);
16801
+ if (h && s !== "") {
16802
+ e.setFilterValue(Filter.text({
16803
+ operator: a,
16804
+ text: s
16805
+ }));
16636
16806
  return;
16637
16807
  }
16638
- e.setFilterValue(Filter.text({
16639
- text: i,
16640
- operator: o
16808
+ _ && d.length > 0 && e.setFilterValue(Filter.text({
16809
+ operator: a,
16810
+ values: d
16641
16811
  }));
16642
16812
  };
16643
16813
  return (0, import_jsx_runtime.jsxs)("div", {
16644
16814
  className: "flex flex-col gap-1 pt-3 px-2",
16645
16815
  children: [
16646
- (0, import_jsx_runtime.jsx)(NullFilter, {
16816
+ (0, import_jsx_runtime.jsx)(OperatorSelect, {
16817
+ operator: a,
16818
+ options: TEXT_OPS,
16819
+ onChange: (e2) => {
16820
+ o(e2);
16821
+ }
16822
+ }),
16823
+ h && a === "regex" && (0, import_jsx_runtime.jsx)(RegexInput, {
16824
+ value: s,
16825
+ onChange: c,
16826
+ onKeyDown: (e2) => {
16827
+ e2.stopPropagation(), e2.key === "Enter" && S();
16828
+ }
16829
+ }),
16830
+ h && a !== "regex" && (0, import_jsx_runtime.jsx)(Input, {
16831
+ type: "text",
16832
+ icon: (0, import_jsx_runtime.jsx)(TextAlignStart, {
16833
+ className: "h-3 w-3 text-muted-foreground mb-1"
16834
+ }),
16835
+ value: s,
16836
+ onChange: (e2) => c(e2.target.value),
16837
+ placeholder: "Text...",
16838
+ onKeyDown: (e2) => {
16839
+ e2.stopPropagation(), e2.key === "Enter" && S();
16840
+ },
16841
+ className: "shadow-none! border-border hover:shadow-none!"
16842
+ }),
16843
+ _ && (0, import_jsx_runtime.jsx)(FilterByValuesList, {
16647
16844
  column: e,
16648
- defaultItem: "contains",
16649
- operator: o,
16650
- setOperator: s
16845
+ calculateTopKRows: t,
16846
+ chosenValues: new Set(d),
16847
+ onChange: (e2) => f(e2.map(String)),
16848
+ creatable: true
16651
16849
  }),
16652
- o === "contains" && (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
16653
- children: [
16654
- (0, import_jsx_runtime.jsx)(Input, {
16655
- type: "text",
16656
- icon: (0, import_jsx_runtime.jsx)(TextAlignStart, {
16657
- className: "h-3 w-3 text-muted-foreground mb-1"
16658
- }),
16659
- value: i ?? "",
16660
- onChange: (e2) => a(e2.target.value),
16661
- placeholder: "Text...",
16662
- onKeyDown: (e2) => {
16663
- e2.key === "Enter" && c();
16664
- },
16665
- className: "shadow-none! border-border hover:shadow-none!"
16666
- }),
16667
- (0, import_jsx_runtime.jsx)(FilterButtons, {
16668
- onApply: c,
16669
- onClear: () => {
16670
- a(""), e.setFilterValue(void 0);
16671
- },
16672
- clearButtonDisabled: !n
16673
- })
16674
- ]
16850
+ (0, import_jsx_runtime.jsx)(FilterButtons, {
16851
+ onApply: S,
16852
+ onClear: () => {
16853
+ c(""), f([]), e.setFilterValue(void 0);
16854
+ },
16855
+ clearButtonDisabled: !i,
16856
+ applyButtonDisabled: y
16675
16857
  })
16676
16858
  ]
16677
16859
  });
@@ -19033,7 +19215,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
19033
19215
  function PanelWithForwardedRef({ children: e, className: t = "", collapsedSize: n, collapsible: i, defaultSize: a, forwardedRef: o, id: s, maxSize: c, minSize: d, onCollapse: f, onExpand: h, onResize: _, order: v, style: y, tagName: S = "div", ...w }) {
19034
19216
  let E = (0, import_react.useContext)(PanelGroupContext);
19035
19217
  if (E === null) throw Error("Panel components must be rendered within a PanelGroup container");
19036
- let { collapsePanel: O, expandPanel: A, getPanelSize: M, getPanelStyle: I, groupId: z, isPanelCollapsed: U, reevaluatePanelConstraints: K, registerPanel: q, resizePanel: J, unregisterPanel: Q } = E, EN = useUniqueId(s), $ = (0, import_react.useRef)({
19218
+ let { collapsePanel: O, expandPanel: A, getPanelSize: M, getPanelStyle: I, groupId: z, isPanelCollapsed: U, reevaluatePanelConstraints: K, registerPanel: q, resizePanel: J, unregisterPanel: Q } = E, UN = useUniqueId(s), $ = (0, import_react.useRef)({
19037
19219
  callbacks: {
19038
19220
  onCollapse: f,
19039
19221
  onExpand: h,
@@ -19046,7 +19228,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
19046
19228
  maxSize: c,
19047
19229
  minSize: d
19048
19230
  },
19049
- id: EN,
19231
+ id: UN,
19050
19232
  idIsFromProps: s !== void 0,
19051
19233
  order: v
19052
19234
  });
@@ -19056,7 +19238,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
19056
19238
  let { callbacks: e2, constraints: t2 } = $.current, o2 = {
19057
19239
  ...t2
19058
19240
  };
19059
- $.current.id = EN, $.current.idIsFromProps = s !== void 0, $.current.order = v, e2.onCollapse = f, e2.onExpand = h, e2.onResize = _, t2.collapsedSize = n, t2.collapsible = i, t2.defaultSize = a, t2.maxSize = c, t2.minSize = d, (o2.collapsedSize !== t2.collapsedSize || o2.collapsible !== t2.collapsible || o2.maxSize !== t2.maxSize || o2.minSize !== t2.minSize) && K($.current, o2);
19241
+ $.current.id = UN, $.current.idIsFromProps = s !== void 0, $.current.order = v, e2.onCollapse = f, e2.onExpand = h, e2.onResize = _, t2.collapsedSize = n, t2.collapsible = i, t2.defaultSize = a, t2.maxSize = c, t2.minSize = d, (o2.collapsedSize !== t2.collapsedSize || o2.collapsible !== t2.collapsible || o2.maxSize !== t2.maxSize || o2.minSize !== t2.minSize) && K($.current, o2);
19060
19242
  }), useIsomorphicLayoutEffect$1(() => {
19061
19243
  let e2 = $.current;
19062
19244
  return q(e2), () => {
@@ -19064,7 +19246,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
19064
19246
  };
19065
19247
  }, [
19066
19248
  v,
19067
- EN,
19249
+ UN,
19068
19250
  q,
19069
19251
  Q
19070
19252
  ]), (0, import_react.useImperativeHandle)(o, () => ({
@@ -19075,7 +19257,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
19075
19257
  A($.current, e2);
19076
19258
  },
19077
19259
  getId() {
19078
- return EN;
19260
+ return UN;
19079
19261
  },
19080
19262
  getSize() {
19081
19263
  return M($.current);
@@ -19094,24 +19276,24 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
19094
19276
  A,
19095
19277
  M,
19096
19278
  U,
19097
- EN,
19279
+ UN,
19098
19280
  J
19099
19281
  ]);
19100
- let DN = I($.current, a);
19282
+ let WN = I($.current, a);
19101
19283
  return (0, import_react.createElement)(S, {
19102
19284
  ...w,
19103
19285
  children: e,
19104
19286
  className: t,
19105
- id: EN,
19287
+ id: UN,
19106
19288
  style: {
19107
- ...DN,
19289
+ ...WN,
19108
19290
  ...y
19109
19291
  },
19110
19292
  [DATA_ATTRIBUTES.groupId]: z,
19111
19293
  [DATA_ATTRIBUTES.panel]: "",
19112
19294
  [DATA_ATTRIBUTES.panelCollapsible]: i || void 0,
19113
- [DATA_ATTRIBUTES.panelId]: EN,
19114
- [DATA_ATTRIBUTES.panelSize]: parseFloat("" + DN.flexGrow).toFixed(1)
19295
+ [DATA_ATTRIBUTES.panelId]: UN,
19296
+ [DATA_ATTRIBUTES.panelSize]: parseFloat("" + WN.flexGrow).toFixed(1)
19115
19297
  });
19116
19298
  }
19117
19299
  var Panel = (0, import_react.forwardRef)((e, t) => (0, import_react.createElement)(PanelWithForwardedRef, {
@@ -19884,7 +20066,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
19884
20066
  }, []), Q = (0, import_react.useCallback)((e2) => {
19885
20067
  let { layout: t2, panelDataArray: n2 } = K.current, { panelSize: i2 } = panelDataHelper(n2, e2, t2);
19886
20068
  return assert(i2 != null, `Panel size not found for panel "${e2.id}"`), i2;
19887
- }, []), EN = (0, import_react.useCallback)((e2, t2) => {
20069
+ }, []), UN = (0, import_react.useCallback)((e2, t2) => {
19888
20070
  let { panelDataArray: n2 } = K.current;
19889
20071
  return computePanelFlexBoxStyle({
19890
20072
  defaultSize: t2,
@@ -19899,10 +20081,10 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
19899
20081
  ]), $ = (0, import_react.useCallback)((e2) => {
19900
20082
  let { layout: t2, panelDataArray: n2 } = K.current, { collapsedSize: i2 = 0, collapsible: a2, panelSize: o2 } = panelDataHelper(n2, e2, t2);
19901
20083
  return assert(o2 != null, `Panel size not found for panel "${e2.id}"`), a2 === true && fuzzyNumbersEqual$1(o2, i2);
19902
- }, []), DN = (0, import_react.useCallback)((e2) => {
20084
+ }, []), WN = (0, import_react.useCallback)((e2) => {
19903
20085
  let { layout: t2, panelDataArray: n2 } = K.current, { collapsedSize: i2 = 0, collapsible: a2, panelSize: o2 } = panelDataHelper(n2, e2, t2);
19904
20086
  return assert(o2 != null, `Panel size not found for panel "${e2.id}"`), !a2 || fuzzyCompareNumbers(o2, i2) > 0;
19905
- }, []), ON = (0, import_react.useCallback)((e2) => {
20087
+ }, []), GN = (0, import_react.useCallback)((e2) => {
19906
20088
  let { panelDataArray: t2 } = K.current;
19907
20089
  t2.push(e2), t2.sort((e3, t3) => {
19908
20090
  let n2 = e3.order, i2 = t3.order;
@@ -19934,7 +20116,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
19934
20116
  e2.layout = [];
19935
20117
  };
19936
20118
  }, []);
19937
- let kN = (0, import_react.useCallback)((e2) => {
20119
+ let KN = (0, import_react.useCallback)((e2) => {
19938
20120
  let t2 = false, n2 = y.current;
19939
20121
  return n2 && window.getComputedStyle(n2, null).getPropertyValue("direction") === "rtl" && (t2 = true), function(n3) {
19940
20122
  n3.preventDefault();
@@ -19952,7 +20134,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
19952
20134
  }), I2 = !compareLayouts(f2, A2);
19953
20135
  (isPointerEvent(n3) || isMouseEvent(n3)) && z.current != S2 && (z.current = S2, !I2 && S2 !== 0 ? w2 ? reportConstraintsViolation(e2, S2 < 0 ? EXCEEDED_HORIZONTAL_MIN : EXCEEDED_HORIZONTAL_MAX) : reportConstraintsViolation(e2, S2 < 0 ? EXCEEDED_VERTICAL_MIN : EXCEEDED_VERTICAL_MAX) : reportConstraintsViolation(e2, 0)), I2 && (O(A2), K.current.layout = A2, d2 && d2(A2), callPanelCallbacks(h2, A2, M.current));
19954
20136
  };
19955
- }, []), AN = (0, import_react.useCallback)((e2, t2) => {
20137
+ }, []), qN = (0, import_react.useCallback)((e2, t2) => {
19956
20138
  let { onLayout: n2 } = U.current, { layout: i2, panelDataArray: a2 } = K.current, o2 = a2.map((e3) => e3.constraints), { panelSize: s2, pivotIndices: c2 } = panelDataHelper(a2, e2, i2);
19957
20139
  assert(s2 != null, `Panel size not found for panel "${e2.id}"`);
19958
20140
  let d2 = adjustLayoutByDelta({
@@ -19964,12 +20146,12 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
19964
20146
  trigger: "imperative-api"
19965
20147
  });
19966
20148
  compareLayouts(i2, d2) || (O(d2), K.current.layout = d2, n2 && n2(d2), callPanelCallbacks(a2, d2, M.current));
19967
- }, []), jN = (0, import_react.useCallback)((e2, t2) => {
20149
+ }, []), JN = (0, import_react.useCallback)((e2, t2) => {
19968
20150
  let { layout: n2, panelDataArray: i2 } = K.current, { collapsedSize: a2 = 0, collapsible: o2 } = t2, { collapsedSize: s2 = 0, collapsible: c2, maxSize: d2 = 100, minSize: f2 = 0 } = e2.constraints, { panelSize: h2 } = panelDataHelper(i2, e2, n2);
19969
- h2 != null && (o2 && c2 && fuzzyNumbersEqual$1(h2, a2) ? fuzzyNumbersEqual$1(a2, s2) || AN(e2, s2) : h2 < f2 ? AN(e2, f2) : h2 > d2 && AN(e2, d2));
20151
+ h2 != null && (o2 && c2 && fuzzyNumbersEqual$1(h2, a2) ? fuzzyNumbersEqual$1(a2, s2) || qN(e2, s2) : h2 < f2 ? qN(e2, f2) : h2 > d2 && qN(e2, d2));
19970
20152
  }, [
19971
- AN
19972
- ]), MN = (0, import_react.useCallback)((e2, t2) => {
20153
+ qN
20154
+ ]), YN = (0, import_react.useCallback)((e2, t2) => {
19973
20155
  let { direction: n2 } = U.current, { layout: i2 } = K.current;
19974
20156
  if (!y.current) return;
19975
20157
  let a2 = getResizeHandleElement(e2, y.current);
@@ -19981,30 +20163,30 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
19981
20163
  initialCursorPosition: o2,
19982
20164
  initialLayout: i2
19983
20165
  });
19984
- }, []), NN = (0, import_react.useCallback)(() => {
20166
+ }, []), XN = (0, import_react.useCallback)(() => {
19985
20167
  w(null);
19986
- }, []), PN = (0, import_react.useCallback)((e2) => {
20168
+ }, []), ZN = (0, import_react.useCallback)((e2) => {
19987
20169
  let { panelDataArray: t2 } = K.current, n2 = findPanelDataIndex(t2, e2);
19988
20170
  n2 >= 0 && (t2.splice(n2, 1), delete M.current[e2.id], K.current.panelDataArrayChanged = true, A());
19989
20171
  }, [
19990
20172
  A
19991
- ]), FN = (0, import_react.useMemo)(() => ({
20173
+ ]), QN = (0, import_react.useMemo)(() => ({
19992
20174
  collapsePanel: q,
19993
20175
  direction: i,
19994
20176
  dragState: S,
19995
20177
  expandPanel: J,
19996
20178
  getPanelSize: Q,
19997
- getPanelStyle: EN,
20179
+ getPanelStyle: UN,
19998
20180
  groupId: v,
19999
20181
  isPanelCollapsed: $,
20000
- isPanelExpanded: DN,
20001
- reevaluatePanelConstraints: jN,
20002
- registerPanel: ON,
20003
- registerResizeHandle: kN,
20004
- resizePanel: AN,
20005
- startDragging: MN,
20006
- stopDragging: NN,
20007
- unregisterPanel: PN,
20182
+ isPanelExpanded: WN,
20183
+ reevaluatePanelConstraints: JN,
20184
+ registerPanel: GN,
20185
+ registerResizeHandle: KN,
20186
+ resizePanel: qN,
20187
+ startDragging: YN,
20188
+ stopDragging: XN,
20189
+ unregisterPanel: ZN,
20008
20190
  panelGroupElement: y.current
20009
20191
  }), [
20010
20192
  q,
@@ -20012,18 +20194,18 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
20012
20194
  i,
20013
20195
  J,
20014
20196
  Q,
20015
- EN,
20197
+ UN,
20016
20198
  v,
20017
20199
  $,
20018
- DN,
20019
- jN,
20020
- ON,
20021
- kN,
20022
- AN,
20023
- MN,
20024
- NN,
20025
- PN
20026
- ]), IN = {
20200
+ WN,
20201
+ JN,
20202
+ GN,
20203
+ KN,
20204
+ qN,
20205
+ YN,
20206
+ XN,
20207
+ ZN
20208
+ ]), $N = {
20027
20209
  display: "flex",
20028
20210
  flexDirection: i === "horizontal" ? "row" : "column",
20029
20211
  height: "100%",
@@ -20031,7 +20213,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
20031
20213
  width: "100%"
20032
20214
  };
20033
20215
  return (0, import_react.createElement)(PanelGroupContext.Provider, {
20034
- value: FN
20216
+ value: QN
20035
20217
  }, (0, import_react.createElement)(h, {
20036
20218
  ..._,
20037
20219
  children: t,
@@ -20039,7 +20221,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
20039
20221
  id: o,
20040
20222
  ref: y,
20041
20223
  style: {
20042
- ...IN,
20224
+ ...$N,
20043
20225
  ...f
20044
20226
  },
20045
20227
  [DATA_ATTRIBUTES.group]: "",
@@ -20116,31 +20298,31 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
20116
20298
  });
20117
20299
  let O = (0, import_react.useContext)(PanelGroupContext);
20118
20300
  if (O === null) throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");
20119
- let { direction: A, groupId: M, registerResizeHandle: I, startDragging: z, stopDragging: U, panelGroupElement: K } = O, q = useUniqueId(a), [J, Q] = (0, import_react.useState)("inactive"), [EN, $] = (0, import_react.useState)(false), [DN, ON] = (0, import_react.useState)(null), kN = (0, import_react.useRef)({
20301
+ let { direction: A, groupId: M, registerResizeHandle: I, startDragging: z, stopDragging: U, panelGroupElement: K } = O, q = useUniqueId(a), [J, Q] = (0, import_react.useState)("inactive"), [UN, $] = (0, import_react.useState)(false), [WN, GN] = (0, import_react.useState)(null), KN = (0, import_react.useRef)({
20120
20302
  state: J
20121
20303
  });
20122
20304
  useIsomorphicLayoutEffect$1(() => {
20123
- kN.current.state = J;
20305
+ KN.current.state = J;
20124
20306
  }), (0, import_react.useEffect)(() => {
20125
- if (n) ON(null);
20307
+ if (n) GN(null);
20126
20308
  else {
20127
20309
  let e2 = I(q);
20128
- ON(() => e2);
20310
+ GN(() => e2);
20129
20311
  }
20130
20312
  }, [
20131
20313
  n,
20132
20314
  q,
20133
20315
  I
20134
20316
  ]);
20135
- let AN = (i == null ? void 0 : i.coarse) ?? 15, jN = (i == null ? void 0 : i.fine) ?? 5;
20317
+ let qN = (i == null ? void 0 : i.coarse) ?? 15, JN = (i == null ? void 0 : i.fine) ?? 5;
20136
20318
  (0, import_react.useEffect)(() => {
20137
- if (n || DN == null) return;
20319
+ if (n || WN == null) return;
20138
20320
  let e2 = w.current;
20139
20321
  assert(e2, "Element ref not attached");
20140
20322
  let t2 = false;
20141
20323
  return registerResizeHandle(q, e2, A, {
20142
- coarse: AN,
20143
- fine: jN
20324
+ coarse: qN,
20325
+ fine: JN
20144
20326
  }, (e3, n2, i2) => {
20145
20327
  if (!n2) {
20146
20328
  Q("inactive");
@@ -20154,8 +20336,8 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
20154
20336
  break;
20155
20337
  }
20156
20338
  case "move": {
20157
- let { state: e4 } = kN.current;
20158
- t2 = true, e4 !== "drag" && Q("hover"), assert(i2, 'Expected event to be defined for "move" action'), DN(i2);
20339
+ let { state: e4 } = KN.current;
20340
+ t2 = true, e4 !== "drag" && Q("hover"), assert(i2, 'Expected event to be defined for "move" action'), WN(i2);
20159
20341
  break;
20160
20342
  }
20161
20343
  case "up": {
@@ -20167,22 +20349,22 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
20167
20349
  }
20168
20350
  });
20169
20351
  }, [
20170
- AN,
20352
+ qN,
20171
20353
  A,
20172
20354
  n,
20173
- jN,
20355
+ JN,
20174
20356
  I,
20175
20357
  q,
20176
- DN,
20358
+ WN,
20177
20359
  z,
20178
20360
  U
20179
20361
  ]), useWindowSplitterResizeHandlerBehavior({
20180
20362
  disabled: n,
20181
20363
  handleId: q,
20182
- resizeHandler: DN,
20364
+ resizeHandler: WN,
20183
20365
  panelGroupElement: K
20184
20366
  });
20185
- let MN = {
20367
+ let YN = {
20186
20368
  touchAction: "none",
20187
20369
  userSelect: "none"
20188
20370
  };
@@ -20200,14 +20382,14 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
20200
20382
  ref: w,
20201
20383
  role: "separator",
20202
20384
  style: {
20203
- ...MN,
20385
+ ...YN,
20204
20386
  ..._
20205
20387
  },
20206
20388
  tabIndex: v,
20207
20389
  [DATA_ATTRIBUTES.groupDirection]: A,
20208
20390
  [DATA_ATTRIBUTES.groupId]: M,
20209
20391
  [DATA_ATTRIBUTES.resizeHandle]: "",
20210
- [DATA_ATTRIBUTES.resizeHandleActive]: J === "drag" ? "pointer" : EN ? "keyboard" : void 0,
20392
+ [DATA_ATTRIBUTES.resizeHandleActive]: J === "drag" ? "pointer" : UN ? "keyboard" : void 0,
20211
20393
  [DATA_ATTRIBUTES.resizeHandleEnabled]: !n,
20212
20394
  [DATA_ATTRIBUTES.resizeHandleId]: q,
20213
20395
  [DATA_ATTRIBUTES.resizeHandleState]: J
@@ -20374,147 +20556,148 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
20374
20556
  Combobox = (e) => {
20375
20557
  let t = (0, import_compiler_runtime$21.c)(96), n, i, o, s, c, d, f, h, _, v, y, S, w, E, O, A, M, I, z, U, K, q;
20376
20558
  t[0] === e ? (n = t[1], i = t[2], o = t[3], s = t[4], c = t[5], d = t[6], f = t[7], h = t[8], _ = t[9], v = t[10], y = t[11], S = t[12], w = t[13], E = t[14], O = t[15], A = t[16], M = t[17], I = t[18], z = t[19], U = t[20], K = t[21], q = t[22]) : ({ children: n, displayValue: d, className: o, placeholder: E, value: q, defaultValue: c, onValueChange: S, multiple: M, shouldFilter: I, filterFn: f, open: w, defaultOpen: s, onOpenChange: v, inputPlaceholder: z, search: A, onSearchChange: y, emptyState: U, chips: K, chipsClassName: i, keepPopoverOpenOnSelect: _, id: h, ...O } = e, t[0] = e, t[1] = n, t[2] = i, t[3] = o, t[4] = s, t[5] = c, t[6] = d, t[7] = f, t[8] = h, t[9] = _, t[10] = v, t[11] = y, t[12] = S, t[13] = w, t[14] = E, t[15] = O, t[16] = A, t[17] = M, t[18] = I, t[19] = z, t[20] = U, t[21] = K, t[22] = q);
20377
- let J = M === void 0 ? false : M, Q = I === void 0 ? true : I, EN = z === void 0 ? "Search..." : z, $ = U === void 0 ? "Nothing found." : U, DN = K === void 0 ? false : K, ON = s ?? false, kN;
20378
- t[23] !== v || t[24] !== w || t[25] !== ON ? (kN = {
20559
+ let J = M === void 0 ? false : M, Q = I === void 0 ? true : I, UN = z === void 0 ? "Search..." : z, $ = U === void 0 ? "Nothing found." : U, WN = K === void 0 ? false : K, GN = s ?? false, KN;
20560
+ t[23] !== v || t[24] !== w || t[25] !== GN ? (KN = {
20379
20561
  prop: w,
20380
- defaultProp: ON,
20562
+ defaultProp: GN,
20381
20563
  onChange: v
20382
- }, t[23] = v, t[24] = w, t[25] = ON, t[26] = kN) : kN = t[26];
20383
- let [AN, jN] = useControllableState(kN), MN = AN === void 0 ? false : AN, NN;
20384
- t[27] === S ? NN = t[28] : (NN = (e2) => {
20564
+ }, t[23] = v, t[24] = w, t[25] = GN, t[26] = KN) : KN = t[26];
20565
+ let [qN, JN] = useControllableState(KN), YN = qN === void 0 ? false : qN, XN;
20566
+ t[27] === S ? XN = t[28] : (XN = (e2) => {
20385
20567
  S == null ? void 0 : S(e2);
20386
- }, t[27] = S, t[28] = NN);
20387
- let PN;
20388
- t[29] !== c || t[30] !== NN || t[31] !== q ? (PN = {
20568
+ }, t[27] = S, t[28] = XN);
20569
+ let ZN;
20570
+ t[29] !== c || t[30] !== XN || t[31] !== q ? (ZN = {
20389
20571
  prop: q,
20390
20572
  defaultProp: c,
20391
- onChange: NN
20392
- }, t[29] = c, t[30] = NN, t[31] = q, t[32] = PN) : PN = t[32];
20393
- let [FN, IN] = useControllableState(PN), LN;
20394
- t[33] === FN ? LN = t[34] : (LN = (e2) => Array.isArray(FN) ? FN.includes(e2) : FN === e2, t[33] = FN, t[34] = LN);
20395
- let RN = LN, zN;
20396
- t[35] !== _ || t[36] !== J || t[37] !== jN || t[38] !== IN || t[39] !== FN ? (zN = (e2) => {
20573
+ onChange: XN
20574
+ }, t[29] = c, t[30] = XN, t[31] = q, t[32] = ZN) : ZN = t[32];
20575
+ let [QN, $N] = useControllableState(ZN), eP;
20576
+ t[33] === QN ? eP = t[34] : (eP = (e2) => Array.isArray(QN) ? QN.includes(e2) : QN === e2, t[33] = QN, t[34] = eP);
20577
+ let tP = eP, nP;
20578
+ t[35] !== _ || t[36] !== J || t[37] !== JN || t[38] !== $N || t[39] !== QN ? (nP = (e2) => {
20397
20579
  let t2 = e2;
20398
- if (J) if (Array.isArray(FN)) if (FN.includes(t2)) {
20399
- let n2 = FN.filter((t3) => t3 !== e2);
20580
+ if (J) if (Array.isArray(QN)) if (QN.includes(t2)) {
20581
+ let n2 = QN.filter((t3) => t3 !== e2);
20400
20582
  t2 = n2.length > 0 ? n2 : [];
20401
20583
  } else t2 = [
20402
- ...FN,
20584
+ ...QN,
20403
20585
  t2
20404
20586
  ];
20405
20587
  else t2 = [
20406
20588
  t2
20407
20589
  ];
20408
- else FN === e2 && (t2 = null);
20409
- IN(t2), (_ ?? J) || jN(false);
20410
- }, t[35] = _, t[36] = J, t[37] = jN, t[38] = IN, t[39] = FN, t[40] = zN) : zN = t[40];
20411
- let BN = zN, VN;
20412
- t[41] !== DN || t[42] !== d || t[43] !== J || t[44] !== E || t[45] !== FN ? (VN = () => J && DN && E ? E : FN == null ? E ?? "--" : Array.isArray(FN) ? FN.length === 0 ? E ?? "--" : FN.length === 1 && d !== void 0 ? d(FN[0]) : `${FN.length} selected` : d === void 0 ? E ?? "--" : d(FN), t[41] = DN, t[42] = d, t[43] = J, t[44] = E, t[45] = FN, t[46] = VN) : VN = t[46];
20413
- let HN = VN, UN;
20414
- t[47] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (UN = cn("relative"), t[47] = UN) : UN = t[47];
20415
- let WN;
20416
- t[48] === o ? WN = t[49] : (WN = cn("flex h-6 w-fit mb-1 shadow-xs-solid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-sm-solid focus:outline-hidden focus:ring-1 focus:ring-ring focus:border-primary focus:shadow-md-solid disabled:cursor-not-allowed disabled:opacity-50", o), t[48] = o, t[49] = WN);
20417
- let GN;
20418
- t[50] === HN ? GN = t[51] : (GN = HN(), t[50] = HN, t[51] = GN);
20419
- let KN;
20420
- t[52] === GN ? KN = t[53] : (KN = (0, import_jsx_runtime.jsx)("span", {
20590
+ else QN === e2 && (t2 = null);
20591
+ $N(t2), (_ ?? J) || JN(false);
20592
+ }, t[35] = _, t[36] = J, t[37] = JN, t[38] = $N, t[39] = QN, t[40] = nP) : nP = t[40];
20593
+ let rP = nP, iP;
20594
+ t[41] !== WN || t[42] !== d || t[43] !== J || t[44] !== E || t[45] !== QN ? (iP = () => J && WN && E ? E : QN == null ? E ?? "--" : Array.isArray(QN) ? QN.length === 0 ? E ?? "--" : QN.length === 1 && d !== void 0 ? d(QN[0]) : `${QN.length} selected` : d === void 0 ? E ?? "--" : d(QN), t[41] = WN, t[42] = d, t[43] = J, t[44] = E, t[45] = QN, t[46] = iP) : iP = t[46];
20595
+ let aP = iP, oP;
20596
+ t[47] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (oP = cn("relative"), t[47] = oP) : oP = t[47];
20597
+ let sP;
20598
+ t[48] === o ? sP = t[49] : (sP = cn("flex h-6 w-fit mb-1 shadow-xs-solid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-sm-solid focus:outline-hidden focus:ring-1 focus:ring-ring focus:border-primary focus:shadow-md-solid disabled:cursor-not-allowed disabled:opacity-50", o), t[48] = o, t[49] = sP);
20599
+ let cP;
20600
+ t[50] === aP ? cP = t[51] : (cP = aP(), t[50] = aP, t[51] = cP);
20601
+ let lP;
20602
+ t[52] === cP ? lP = t[53] : (lP = (0, import_jsx_runtime.jsx)("span", {
20421
20603
  className: "truncate flex-1 min-w-0",
20422
- children: GN
20423
- }), t[52] = GN, t[53] = KN);
20424
- let qN;
20425
- t[54] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (qN = (0, import_jsx_runtime.jsx)(ChevronDown, {
20604
+ children: cP
20605
+ }), t[52] = cP, t[53] = lP);
20606
+ let uP;
20607
+ t[54] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (uP = (0, import_jsx_runtime.jsx)(ChevronDown, {
20426
20608
  className: "ml-3 w-4 h-4 opacity-50 shrink-0"
20427
- }), t[54] = qN) : qN = t[54];
20428
- let YN;
20429
- t[55] !== h || t[56] !== MN || t[57] !== WN || t[58] !== KN ? (YN = (0, import_jsx_runtime.jsx)(PopoverTrigger, {
20609
+ }), t[54] = uP) : uP = t[54];
20610
+ let fP;
20611
+ t[55] !== h || t[56] !== YN || t[57] !== sP || t[58] !== lP ? (fP = (0, import_jsx_runtime.jsx)(PopoverTrigger, {
20430
20612
  asChild: true,
20431
- children: (0, import_jsx_runtime.jsxs)("div", {
20613
+ children: (0, import_jsx_runtime.jsxs)("button", {
20432
20614
  id: h,
20433
- className: WN,
20434
- "aria-expanded": MN,
20615
+ type: "button",
20616
+ className: sP,
20617
+ "aria-expanded": YN,
20435
20618
  children: [
20436
- KN,
20437
- qN
20619
+ lP,
20620
+ uP
20438
20621
  ]
20439
20622
  })
20440
- }), t[55] = h, t[56] = MN, t[57] = WN, t[58] = KN, t[59] = YN) : YN = t[59];
20441
- let XN;
20442
- t[60] !== EN || t[61] !== y || t[62] !== A ? (XN = (0, import_jsx_runtime.jsx)(CommandInput, {
20443
- placeholder: EN,
20623
+ }), t[55] = h, t[56] = YN, t[57] = sP, t[58] = lP, t[59] = fP) : fP = t[59];
20624
+ let pP;
20625
+ t[60] !== UN || t[61] !== y || t[62] !== A ? (pP = (0, import_jsx_runtime.jsx)(CommandInput, {
20626
+ placeholder: UN,
20444
20627
  rootClassName: "px-1 h-8",
20445
20628
  autoFocus: true,
20446
20629
  value: A,
20447
20630
  onValueChange: y
20448
- }), t[60] = EN, t[61] = y, t[62] = A, t[63] = XN) : XN = t[63];
20449
- let QN;
20450
- t[64] === $ ? QN = t[65] : (QN = (0, import_jsx_runtime.jsx)(CommandEmpty, {
20631
+ }), t[60] = UN, t[61] = y, t[62] = A, t[63] = pP) : pP = t[63];
20632
+ let hP;
20633
+ t[64] === $ ? hP = t[65] : (hP = (0, import_jsx_runtime.jsx)(CommandEmpty, {
20451
20634
  children: $
20452
- }), t[64] = $, t[65] = QN);
20453
- let $N;
20454
- t[66] !== BN || t[67] !== RN ? ($N = {
20455
- isSelected: RN,
20456
- onSelect: BN
20457
- }, t[66] = BN, t[67] = RN, t[68] = $N) : $N = t[68];
20458
- let eP;
20459
- t[69] !== n || t[70] !== $N ? (eP = (0, import_jsx_runtime.jsx)(ComboboxContext, {
20460
- value: $N,
20635
+ }), t[64] = $, t[65] = hP);
20636
+ let gP;
20637
+ t[66] !== rP || t[67] !== tP ? (gP = {
20638
+ isSelected: tP,
20639
+ onSelect: rP
20640
+ }, t[66] = rP, t[67] = tP, t[68] = gP) : gP = t[68];
20641
+ let _P;
20642
+ t[69] !== n || t[70] !== gP ? (_P = (0, import_jsx_runtime.jsx)(ComboboxContext, {
20643
+ value: gP,
20461
20644
  children: n
20462
- }), t[69] = n, t[70] = $N, t[71] = eP) : eP = t[71];
20463
- let tP;
20464
- t[72] !== QN || t[73] !== eP ? (tP = (0, import_jsx_runtime.jsxs)(CommandList, {
20645
+ }), t[69] = n, t[70] = gP, t[71] = _P) : _P = t[71];
20646
+ let vP;
20647
+ t[72] !== hP || t[73] !== _P ? (vP = (0, import_jsx_runtime.jsxs)(CommandList, {
20465
20648
  className: "max-h-60 py-.5",
20466
20649
  children: [
20467
- QN,
20468
- eP
20650
+ hP,
20651
+ _P
20469
20652
  ]
20470
- }), t[72] = QN, t[73] = eP, t[74] = tP) : tP = t[74];
20471
- let nP;
20472
- t[75] !== f || t[76] !== Q || t[77] !== XN || t[78] !== tP ? (nP = (0, import_jsx_runtime.jsx)(PopoverContent, {
20653
+ }), t[72] = hP, t[73] = _P, t[74] = vP) : vP = t[74];
20654
+ let yP;
20655
+ t[75] !== f || t[76] !== Q || t[77] !== pP || t[78] !== vP ? (yP = (0, import_jsx_runtime.jsx)(PopoverContent, {
20473
20656
  className: "w-full min-w-(--radix-popover-trigger-width) p-0",
20474
20657
  align: "start",
20475
20658
  children: (0, import_jsx_runtime.jsxs)(Command, {
20476
20659
  filter: f,
20477
20660
  shouldFilter: Q,
20478
20661
  children: [
20479
- XN,
20480
- tP
20662
+ pP,
20663
+ vP
20481
20664
  ]
20482
20665
  })
20483
- }), t[75] = f, t[76] = Q, t[77] = XN, t[78] = tP, t[79] = nP) : nP = t[79];
20484
- let rP;
20485
- t[80] !== MN || t[81] !== jN || t[82] !== YN || t[83] !== nP ? (rP = (0, import_jsx_runtime.jsxs)(Popover, {
20486
- open: MN,
20487
- onOpenChange: jN,
20666
+ }), t[75] = f, t[76] = Q, t[77] = pP, t[78] = vP, t[79] = yP) : yP = t[79];
20667
+ let bP;
20668
+ t[80] !== YN || t[81] !== JN || t[82] !== fP || t[83] !== yP ? (bP = (0, import_jsx_runtime.jsxs)(Popover, {
20669
+ open: YN,
20670
+ onOpenChange: JN,
20488
20671
  children: [
20489
- YN,
20490
- nP
20672
+ fP,
20673
+ yP
20491
20674
  ]
20492
- }), t[80] = MN, t[81] = jN, t[82] = YN, t[83] = nP, t[84] = rP) : rP = t[84];
20493
- let iP;
20494
- t[85] !== DN || t[86] !== i || t[87] !== d || t[88] !== BN || t[89] !== J || t[90] !== FN ? (iP = J && DN && (0, import_jsx_runtime.jsx)("div", {
20675
+ }), t[80] = YN, t[81] = JN, t[82] = fP, t[83] = yP, t[84] = bP) : bP = t[84];
20676
+ let xP;
20677
+ t[85] !== WN || t[86] !== i || t[87] !== d || t[88] !== rP || t[89] !== J || t[90] !== QN ? (xP = J && WN && (0, import_jsx_runtime.jsx)("div", {
20495
20678
  className: cn("flex flex-col gap-1 items-start", i),
20496
- children: Array.isArray(FN) && FN.map((e2) => e2 == null ? null : (0, import_jsx_runtime.jsxs)(Badge, {
20679
+ children: Array.isArray(QN) && QN.map((e2) => e2 == null ? null : (0, import_jsx_runtime.jsxs)(Badge, {
20497
20680
  variant: "secondary",
20498
20681
  children: [
20499
20682
  (d == null ? void 0 : d(e2)) ?? String(e2),
20500
20683
  (0, import_jsx_runtime.jsx)(CircleX, {
20501
20684
  onClick: () => {
20502
- BN(e2);
20685
+ rP(e2);
20503
20686
  },
20504
20687
  className: "w-3 h-3 opacity-50 hover:opacity-100 ml-1 cursor-pointer"
20505
20688
  })
20506
20689
  ]
20507
20690
  }, String(e2)))
20508
- }), t[85] = DN, t[86] = i, t[87] = d, t[88] = BN, t[89] = J, t[90] = FN, t[91] = iP) : iP = t[91];
20509
- let aP;
20510
- return t[92] !== O || t[93] !== rP || t[94] !== iP ? (aP = (0, import_jsx_runtime.jsxs)("div", {
20511
- className: UN,
20691
+ }), t[85] = WN, t[86] = i, t[87] = d, t[88] = rP, t[89] = J, t[90] = QN, t[91] = xP) : xP = t[91];
20692
+ let SP;
20693
+ return t[92] !== O || t[93] !== bP || t[94] !== xP ? (SP = (0, import_jsx_runtime.jsxs)("div", {
20694
+ className: oP,
20512
20695
  ...O,
20513
20696
  children: [
20514
- rP,
20515
- iP
20697
+ bP,
20698
+ xP
20516
20699
  ]
20517
- }), t[92] = O, t[93] = rP, t[94] = iP, t[95] = aP) : aP = t[95], aP;
20700
+ }), t[92] = O, t[93] = bP, t[94] = xP, t[95] = SP) : SP = t[95], SP;
20518
20701
  };
20519
20702
  ComboboxItem = import_react.forwardRef((e, t) => {
20520
20703
  let n = (0, import_compiler_runtime$21.c)(17), { children: i, className: o, value: s, onSelect: c, disabled: d } = e, f = typeof s == "object" && "value" in s ? s.value : String(s), h = import_react.use(ComboboxContext), _;
@@ -20543,75 +20726,57 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
20543
20726
  });
20544
20727
  ComboboxItem.displayName = "ComboboxItem";
20545
20728
  var OPERATORS_BY_TYPE = {
20546
- number: [
20547
- "between",
20548
- "is_null",
20549
- "is_not_null"
20550
- ],
20551
- text: [
20552
- "contains",
20553
- "is_null",
20554
- "is_not_null"
20555
- ],
20729
+ number: NUMBER_OPS,
20730
+ text: TEXT_OPS,
20556
20731
  boolean: [
20557
20732
  "is_true",
20558
20733
  "is_false",
20559
20734
  "is_null",
20560
20735
  "is_not_null"
20561
20736
  ],
20562
- select: [
20563
- "in",
20564
- "not_in"
20565
- ]
20737
+ select: MEMBERSHIP_OPS
20566
20738
  }, DEFAULT_OPERATOR = {
20567
20739
  number: "between",
20568
20740
  text: "contains",
20569
20741
  boolean: "is_true",
20570
20742
  select: "in"
20571
- }, OPERATOR_LABELS = {
20572
- between: "Between",
20573
- contains: "Contains",
20574
- is_true: "Is true",
20575
- is_false: "Is false",
20576
- is_null: "Is null",
20577
- is_not_null: "Is not null",
20578
- in: "Is in",
20579
- not_in: "Not in"
20580
20743
  }, OPERATORS_WITHOUT_VALUE = /* @__PURE__ */ new Set([
20581
20744
  "is_true",
20582
20745
  "is_false",
20583
20746
  "is_null",
20584
- "is_not_null"
20585
- ]);
20747
+ "is_not_null",
20748
+ "is_empty"
20749
+ ]), NUMBER_COMPARISON_SET = new Set(NUMBER_COMPARISON_OPS), TEXT_SCALAR_SET = new Set(TEXT_SCALAR_OPS), isNumberComparisonOp = (e) => NUMBER_COMPARISON_SET.has(e), isTextScalarOp = (e) => TEXT_SCALAR_SET.has(e);
20586
20750
  const FilterPillEditor = ({ snapshot: e, table: t, calculateTopKRows: n, onClose: i }) => {
20587
- let a = (0, import_react.useId)(), o = (0, import_react.useId)(), s = (0, import_react.useId)(), c = getEditableType(e.value), d = getUiOperator(e.value), h = toDraftValue(e.value), [_, v] = (0, import_react.useState)(e.columnId), [y, S] = (0, import_react.useState)(c), [w, E] = (0, import_react.useState)(d), [O, A] = (0, import_react.useState)(h), M = t.getAllColumns().filter((e2) => {
20751
+ let a = (0, import_react.useId)(), o = (0, import_react.useId)(), s = (0, import_react.useId)(), c = getEditableType(e.value), d = e.value.operator, h = toDraftValue(e.value), [_, v] = (0, import_react.useState)(e.columnId), [y, S] = (0, import_react.useState)(c), [w, E] = (0, import_react.useState)(d), [O, A] = (0, import_react.useState)(h), M = t.getAllColumns().filter((e2) => {
20588
20752
  var _a2;
20589
20753
  let t2 = (_a2 = e2.columnDef.meta) == null ? void 0 : _a2.filterType;
20590
20754
  return t2 === "number" || t2 === "text" || t2 === "boolean" || t2 === "select";
20591
20755
  }), I = (t2) => {
20592
- t2.id === e.columnId && t2.type === c && t2.operator === d && A(h);
20756
+ t2.id === e.columnId && t2.operator === d && A(h);
20593
20757
  }, U = (e2) => {
20594
20758
  var _a2, _b;
20595
20759
  if (!e2) return;
20596
20760
  let n2 = ((_b = (_a2 = t.getColumn(e2)) == null ? void 0 : _a2.columnDef.meta) == null ? void 0 : _b.filterType) ?? "text", i2 = w;
20597
- n2 !== y && (i2 = DEFAULT_OPERATOR[n2], S(n2), E(i2), A({})), v(e2), I({
20761
+ n2 !== y && (i2 = DEFAULT_OPERATOR[n2], S(n2), E(i2), A(emptyDraftFor(n2, i2))), v(e2), I({
20598
20762
  id: e2,
20599
- type: n2,
20600
20763
  operator: i2
20601
20764
  });
20602
20765
  }, K = (e2) => {
20603
- E(e2), I({
20766
+ E(e2);
20767
+ let t2 = emptyDraftFor(y, e2);
20768
+ t2.kind !== O.kind && A(t2), I({
20604
20769
  id: _,
20605
- type: y,
20606
20770
  operator: e2
20607
20771
  });
20608
- }, q = () => {
20609
- let n2 = buildFilterValue({
20610
- type: y,
20611
- operator: w,
20612
- draft: O
20613
- });
20614
- n2 && (t.setColumnFilters((t2) => {
20772
+ }, q = buildFilterValue({
20773
+ type: y,
20774
+ operator: w,
20775
+ draft: O
20776
+ }), J = q === void 0, Q = J ? getMissingValueMessage(y, w) : "Apply filter", UN = () => {
20777
+ if (!q) return;
20778
+ let n2 = q;
20779
+ t.setColumnFilters((t2) => {
20615
20780
  let i2 = /* @__PURE__ */ new Set([
20616
20781
  e.columnId,
20617
20782
  _
@@ -20623,12 +20788,22 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
20623
20788
  value: n2
20624
20789
  }
20625
20790
  ];
20626
- }), i());
20627
- }, J = () => {
20791
+ }), i();
20792
+ }, $ = () => {
20628
20793
  t.setColumnFilters((t2) => t2.filter((t3) => t3.id !== e.columnId)), i();
20629
- }, Q = !OPERATORS_WITHOUT_VALUE.has(w);
20630
- return (0, import_jsx_runtime.jsxs)("div", {
20794
+ }, WN = !OPERATORS_WITHOUT_VALUE.has(w), GN = OPERATORS_BY_TYPE[y], KN = (0, import_react.useRef)(null), qN = (0, import_react.useRef)(null);
20795
+ return (0, import_react.useEffect)(() => {
20796
+ var _a2, _b;
20797
+ let e2 = (_a2 = KN.current) == null ? void 0 : _a2.querySelector('input, [role="combobox"], button');
20798
+ e2 ? e2.focus() : (_b = qN.current) == null ? void 0 : _b.focus();
20799
+ }, [
20800
+ y,
20801
+ w
20802
+ ]), (0, import_jsx_runtime.jsxs)("form", {
20631
20803
  className: "flex flex-row gap-4 items-end p-3",
20804
+ onSubmit: (e2) => {
20805
+ e2.preventDefault(), UN();
20806
+ },
20632
20807
  children: [
20633
20808
  (0, import_jsx_runtime.jsxs)("div", {
20634
20809
  className: "flex flex-col gap-1",
@@ -20665,21 +20840,23 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
20665
20840
  onValueChange: (e2) => K(e2),
20666
20841
  children: [
20667
20842
  (0, import_jsx_runtime.jsx)(SelectTrigger, {
20843
+ ref: qN,
20668
20844
  id: o,
20669
20845
  className: "h-6 mb-1 bg-transparent",
20670
20846
  children: (0, import_jsx_runtime.jsx)(SelectValue, {})
20671
20847
  }),
20672
20848
  (0, import_jsx_runtime.jsx)(SelectContent, {
20673
- children: OPERATORS_BY_TYPE[y].map((e2) => (0, import_jsx_runtime.jsx)(SelectItem, {
20849
+ children: GN.map((e2) => (0, import_jsx_runtime.jsx)(SelectItem, {
20674
20850
  value: e2,
20675
20851
  children: OPERATOR_LABELS[e2]
20676
20852
  }, e2))
20677
20853
  })
20678
20854
  ]
20679
- })
20855
+ }, y)
20680
20856
  ]
20681
20857
  }),
20682
- Q && (0, import_jsx_runtime.jsxs)("div", {
20858
+ WN && (0, import_jsx_runtime.jsxs)("div", {
20859
+ ref: KN,
20683
20860
  className: "flex flex-col gap-1",
20684
20861
  children: [
20685
20862
  (0, import_jsx_runtime.jsx)("label", {
@@ -20690,6 +20867,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
20690
20867
  (0, import_jsx_runtime.jsx)(ValueSlot, {
20691
20868
  id: s,
20692
20869
  type: y,
20870
+ operator: w,
20693
20871
  value: O,
20694
20872
  onChange: A,
20695
20873
  column: t.getColumn(_) ?? null,
@@ -20701,17 +20879,20 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
20701
20879
  className: "flex gap-1 mb-1",
20702
20880
  children: [
20703
20881
  (0, import_jsx_runtime.jsx)(Tooltip, {
20704
- content: "Apply filter",
20705
- children: (0, import_jsx_runtime.jsx)(Button, {
20706
- type: "button",
20707
- size: "icon",
20708
- variant: "ghost",
20709
- className: "rounded-full text-primary hover:text-primary hover:bg-primary/10",
20710
- onClick: q,
20711
- "aria-label": "Apply filter",
20712
- children: (0, import_jsx_runtime.jsx)(Check, {
20713
- className: "h-3.5 w-3.5",
20714
- "aria-hidden": true
20882
+ content: Q,
20883
+ children: (0, import_jsx_runtime.jsx)("span", {
20884
+ className: "inline-flex",
20885
+ children: (0, import_jsx_runtime.jsx)(Button, {
20886
+ type: "submit",
20887
+ size: "icon",
20888
+ variant: "ghost",
20889
+ disabled: J,
20890
+ className: "rounded-full text-primary hover:text-primary hover:bg-primary/10",
20891
+ "aria-label": "Apply filter",
20892
+ children: (0, import_jsx_runtime.jsx)(Check, {
20893
+ className: "h-3.5 w-3.5",
20894
+ "aria-hidden": true
20895
+ })
20715
20896
  })
20716
20897
  })
20717
20898
  }),
@@ -20737,7 +20918,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
20737
20918
  size: "icon",
20738
20919
  variant: "ghost",
20739
20920
  className: "rounded-full text-destructive hover:text-destructive hover:bg-destructive/10",
20740
- onClick: J,
20921
+ onClick: $,
20741
20922
  "aria-label": "Remove filter",
20742
20923
  children: (0, import_jsx_runtime.jsx)(Trash2, {
20743
20924
  className: "h-3.5 w-3.5",
@@ -20750,101 +20931,214 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
20750
20931
  ]
20751
20932
  });
20752
20933
  };
20753
- var ValueSlot = ({ id: e, type: t, value: n, onChange: i, column: a, calculateTopKRows: o }) => t === "number" ? (0, import_jsx_runtime.jsxs)("div", {
20754
- className: "flex gap-1 items-center w-48",
20755
- children: [
20756
- (0, import_jsx_runtime.jsx)(NumberField, {
20757
- id: e,
20758
- value: n.min,
20759
- onChange: (e2) => i({
20760
- ...n,
20761
- min: e2
20762
- }),
20763
- "aria-label": "min",
20764
- placeholder: "min",
20765
- className: "border-input flex-1 min-w-0"
20766
- }),
20767
- (0, import_jsx_runtime.jsx)(Minus, {
20768
- className: "h-5 w-5 text-muted-foreground shrink-0"
20934
+ var ValueSlot = ({ id: e, type: t, operator: n, value: i, onChange: a, column: o, calculateTopKRows: s }) => {
20935
+ if (t === "number" && n === "between") {
20936
+ let t2 = i.kind === "between" ? i : {
20937
+ kind: "between"
20938
+ };
20939
+ return (0, import_jsx_runtime.jsxs)("div", {
20940
+ className: "flex gap-1 items-center w-44",
20941
+ children: [
20942
+ (0, import_jsx_runtime.jsx)(NumberField, {
20943
+ id: e,
20944
+ value: t2.min,
20945
+ onChange: (e2) => a({
20946
+ kind: "between",
20947
+ min: e2,
20948
+ max: t2.max
20949
+ }),
20950
+ "aria-label": "min",
20951
+ placeholder: "min",
20952
+ className: "border-input flex-1 min-w-0"
20953
+ }),
20954
+ (0, import_jsx_runtime.jsx)(Minus, {
20955
+ className: "h-5 w-5 text-muted-foreground shrink-0"
20956
+ }),
20957
+ (0, import_jsx_runtime.jsx)(NumberField, {
20958
+ value: t2.max,
20959
+ onChange: (e2) => a({
20960
+ kind: "between",
20961
+ min: t2.min,
20962
+ max: e2
20963
+ }),
20964
+ "aria-label": "max",
20965
+ placeholder: "max",
20966
+ className: "border-input flex-1 min-w-0"
20967
+ })
20968
+ ]
20969
+ });
20970
+ }
20971
+ if (t === "number" && isNumberComparisonOp(n)) return (0, import_jsx_runtime.jsx)(NumberField, {
20972
+ id: e,
20973
+ value: (i.kind === "single-number" ? i : {
20974
+ kind: "single-number"
20975
+ }).value,
20976
+ onChange: (e2) => a({
20977
+ kind: "single-number",
20978
+ value: e2
20769
20979
  }),
20770
- (0, import_jsx_runtime.jsx)(NumberField, {
20771
- value: n.max,
20772
- onChange: (e2) => i({
20773
- ...n,
20774
- max: e2
20980
+ "aria-label": "value",
20981
+ placeholder: "value",
20982
+ className: "border-input w-24 min-w-0"
20983
+ });
20984
+ if (t === "text" && (n === "in" || n === "not_in") && o) return (0, import_jsx_runtime.jsx)("div", {
20985
+ className: "w-48",
20986
+ children: (0, import_jsx_runtime.jsx)(FilterByValuesPicker, {
20987
+ column: o,
20988
+ calculateTopKRows: s,
20989
+ chosenValues: (i.kind === "multi-text" ? i : {
20990
+ kind: "multi-text"
20991
+ }).values ?? [],
20992
+ onChange: (e2) => a({
20993
+ kind: "multi-text",
20994
+ values: e2.map(String)
20775
20995
  }),
20776
- "aria-label": "max",
20777
- placeholder: "max",
20778
- className: "border-input flex-1 min-w-0"
20996
+ creatable: true
20779
20997
  })
20780
- ]
20781
- }) : t === "text" ? (0, import_jsx_runtime.jsx)(Input, {
20782
- id: e,
20783
- type: "text",
20784
- value: n.text ?? "",
20785
- onChange: (e2) => i({
20786
- ...n,
20787
- text: e2.target.value
20788
- }),
20789
- placeholder: "Text\u2026",
20790
- className: "border-input min-w-0"
20791
- }) : t === "select" && a ? (0, import_jsx_runtime.jsx)("div", {
20792
- className: "flex w-48",
20793
- children: (0, import_jsx_runtime.jsx)(FilterByValuesPicker, {
20794
- column: a,
20795
- calculateTopKRows: o,
20796
- chosenValues: n.options ?? [],
20797
- onChange: (e2) => i({
20798
- ...n,
20799
- options: e2
20998
+ });
20999
+ if (t === "text" && isTextScalarOp(n)) {
21000
+ let t2 = i.kind === "single-text" ? i : {
21001
+ kind: "single-text"
21002
+ };
21003
+ return n === "regex" ? (0, import_jsx_runtime.jsx)(RegexInput, {
21004
+ id: e,
21005
+ value: t2.text ?? "",
21006
+ onChange: (e2) => a({
21007
+ kind: "single-text",
21008
+ text: e2
21009
+ }),
21010
+ className: "w-40"
21011
+ }) : (0, import_jsx_runtime.jsx)(Input, {
21012
+ id: e,
21013
+ type: "text",
21014
+ value: t2.text ?? "",
21015
+ onChange: (e2) => a({
21016
+ kind: "single-text",
21017
+ text: e2.target.value
21018
+ }),
21019
+ placeholder: "Text\u2026",
21020
+ className: "border-input w-40 min-w-0"
21021
+ });
21022
+ }
21023
+ return t === "select" && o ? (0, import_jsx_runtime.jsx)("div", {
21024
+ className: "flex w-48",
21025
+ children: (0, import_jsx_runtime.jsx)(FilterByValuesPicker, {
21026
+ column: o,
21027
+ calculateTopKRows: s,
21028
+ chosenValues: (i.kind === "options" ? i : {
21029
+ kind: "options"
21030
+ }).options ?? [],
21031
+ onChange: (e2) => a({
21032
+ kind: "options",
21033
+ options: e2
21034
+ })
20800
21035
  })
20801
- })
20802
- }) : null;
21036
+ }) : null;
21037
+ };
20803
21038
  function getEditableType(e) {
20804
21039
  return e.type === "number" ? "number" : e.type === "text" ? "text" : e.type === "boolean" ? "boolean" : e.type === "select" ? "select" : "text";
20805
21040
  }
20806
- function getUiOperator(e) {
20807
- return e.operator === "is_null" ? "is_null" : e.operator === "is_not_null" ? "is_not_null" : e.type === "number" ? "between" : e.type === "text" ? "contains" : e.type === "boolean" ? e.value ? "is_true" : "is_false" : e.type === "select" ? e.operator === "not_in" ? "not_in" : "in" : "contains";
20808
- }
20809
21041
  function toDraftValue(e) {
20810
- return e.type === "number" ? {
20811
- min: e.min,
20812
- max: e.max
20813
- } : e.type === "text" ? {
20814
- text: e.text
20815
- } : e.type === "select" ? {
21042
+ if (e.type === "number") switch (e.operator) {
21043
+ case "between":
21044
+ return {
21045
+ kind: "between",
21046
+ min: e.min,
21047
+ max: e.max
21048
+ };
21049
+ case "is_null":
21050
+ case "is_not_null":
21051
+ return {
21052
+ kind: "none"
21053
+ };
21054
+ default:
21055
+ return {
21056
+ kind: "single-number",
21057
+ value: e.value
21058
+ };
21059
+ }
21060
+ if (e.type === "text") switch (e.operator) {
21061
+ case "in":
21062
+ case "not_in":
21063
+ return {
21064
+ kind: "multi-text",
21065
+ values: [
21066
+ ...e.values
21067
+ ]
21068
+ };
21069
+ case "is_null":
21070
+ case "is_not_null":
21071
+ case "is_empty":
21072
+ return {
21073
+ kind: "none"
21074
+ };
21075
+ default:
21076
+ return {
21077
+ kind: "single-text",
21078
+ text: e.text
21079
+ };
21080
+ }
21081
+ return e.type === "select" ? {
21082
+ kind: "options",
20816
21083
  options: [
20817
21084
  ...e.options
20818
21085
  ]
20819
- } : {};
21086
+ } : {
21087
+ kind: "none"
21088
+ };
21089
+ }
21090
+ function emptyDraftFor(e, t) {
21091
+ return OPERATORS_WITHOUT_VALUE.has(t) ? {
21092
+ kind: "none"
21093
+ } : e === "number" ? t === "between" ? {
21094
+ kind: "between"
21095
+ } : {
21096
+ kind: "single-number"
21097
+ } : e === "text" ? t === "in" || t === "not_in" ? {
21098
+ kind: "multi-text",
21099
+ values: []
21100
+ } : {
21101
+ kind: "single-text"
21102
+ } : e === "select" ? {
21103
+ kind: "options",
21104
+ options: []
21105
+ } : {
21106
+ kind: "none"
21107
+ };
21108
+ }
21109
+ function getMissingValueMessage(e, t) {
21110
+ return e === "number" && t === "between" ? "Min and max are required" : e === "text" && (t === "in" || t === "not_in") ? "Pick at least one value" : "Value is required";
20820
21111
  }
20821
21112
  function buildFilterValue({ type: e, operator: t, draft: n }) {
20822
- if (t === "is_null" || t === "is_not_null") {
20823
- let n2 = t;
20824
- return e === "number" ? Filter.number({
20825
- operator: n2
20826
- }) : e === "boolean" ? Filter.boolean({
20827
- operator: n2
20828
- }) : Filter.text({
20829
- operator: n2
20830
- });
20831
- }
20832
- if (e === "number") return n.min === void 0 && n.max === void 0 ? void 0 : Filter.number({
21113
+ if (e === "number") return t === "is_null" || t === "is_not_null" ? Filter.number({
21114
+ operator: t
21115
+ }) : t === "between" ? n.kind !== "between" || n.min === void 0 || n.max === void 0 ? void 0 : Filter.number({
21116
+ operator: "between",
20833
21117
  min: n.min,
20834
21118
  max: n.max
21119
+ }) : !isNumberComparisonOp(t) || n.kind !== "single-number" || n.value === void 0 ? void 0 : Filter.number({
21120
+ operator: t,
21121
+ value: n.value
21122
+ });
21123
+ if (e === "text") return t === "is_null" || t === "is_not_null" || t === "is_empty" ? Filter.text({
21124
+ operator: t
21125
+ }) : t === "in" || t === "not_in" ? n.kind !== "multi-text" || !n.values || n.values.length === 0 ? void 0 : Filter.text({
21126
+ operator: t,
21127
+ values: n.values
21128
+ }) : !isTextScalarOp(t) || n.kind !== "single-text" || !n.text ? void 0 : Filter.text({
21129
+ operator: t,
21130
+ text: n.text
20835
21131
  });
20836
- if (e === "text") return n.text ? Filter.text({
20837
- text: n.text,
20838
- operator: "contains"
20839
- }) : void 0;
20840
21132
  if (e === "boolean") return t === "is_true" ? Filter.boolean({
20841
21133
  value: true,
20842
21134
  operator: "is_true"
20843
21135
  }) : t === "is_false" ? Filter.boolean({
20844
21136
  value: false,
20845
21137
  operator: "is_false"
21138
+ }) : t === "is_null" || t === "is_not_null" ? Filter.boolean({
21139
+ operator: t
20846
21140
  }) : void 0;
20847
- if (e === "select") return !n.options || n.options.length === 0 ? void 0 : Filter.select({
21141
+ if (e === "select") return n.kind !== "options" || !n.options || n.options.length === 0 ? void 0 : Filter.select({
20848
21142
  options: n.options,
20849
21143
  operator: t === "not_in" ? "not_in" : "in"
20850
21144
  });
@@ -20969,10 +21263,50 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
20969
21263
  if (e.operator === "is_not_null") return {
20970
21264
  operator: "is not null"
20971
21265
  };
20972
- if (e.type === "number") return formatMinMax(e.min, e.max);
20973
- if (e.type === "date") return formatMinMax((_a2 = e.min) == null ? void 0 : _a2.toISOString(), (_b = e.max) == null ? void 0 : _b.toISOString());
20974
- if (e.type === "time") return formatMinMax(e.min ? t.format(e.min) : void 0, e.max ? t.format(e.max) : void 0);
20975
- if (e.type === "datetime") return formatMinMax((_c = e.min) == null ? void 0 : _c.toISOString(), (_d = e.max) == null ? void 0 : _d.toISOString());
21266
+ if (e.type === "number") switch (e.operator) {
21267
+ case "between":
21268
+ return {
21269
+ operator: OPERATOR_LABELS.between.toLowerCase(),
21270
+ value: `${e.min} - ${e.max}`
21271
+ };
21272
+ case "==":
21273
+ case "!=":
21274
+ case ">":
21275
+ case ">=":
21276
+ case "<":
21277
+ case "<=":
21278
+ return {
21279
+ operator: e.operator,
21280
+ value: String(e.value)
21281
+ };
21282
+ }
21283
+ if (e.type === "text") switch (e.operator) {
21284
+ case "in":
21285
+ case "not_in": {
21286
+ let t2 = e.values.map((e2) => `"${e2}"`);
21287
+ return {
21288
+ operator: e.operator === "in" ? "is in" : "not in",
21289
+ value: `[${t2.join(", ")}]`
21290
+ };
21291
+ }
21292
+ case "is_empty":
21293
+ return {
21294
+ operator: "is empty"
21295
+ };
21296
+ case "contains":
21297
+ case "equals":
21298
+ case "does_not_equal":
21299
+ case "regex":
21300
+ case "starts_with":
21301
+ case "ends_with":
21302
+ return {
21303
+ operator: OPERATOR_LABELS[e.operator].toLowerCase(),
21304
+ value: `"${e.text}"`
21305
+ };
21306
+ }
21307
+ if (e.type === "date") return formatMinMaxLegacy((_a2 = e.min) == null ? void 0 : _a2.toISOString(), (_b = e.max) == null ? void 0 : _b.toISOString());
21308
+ if (e.type === "time") return formatMinMaxLegacy(e.min ? t.format(e.min) : void 0, e.max ? t.format(e.max) : void 0);
21309
+ if (e.type === "datetime") return formatMinMaxLegacy((_c = e.min) == null ? void 0 : _c.toISOString(), (_d = e.max) == null ? void 0 : _d.toISOString());
20976
21310
  if (e.type === "boolean") return {
20977
21311
  operator: `is ${e.value ? "True" : "False"}`
20978
21312
  };
@@ -20985,14 +21319,10 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
20985
21319
  value: `[${t2.join(", ")}]`
20986
21320
  };
20987
21321
  }
20988
- if (e.type === "text") return {
20989
- operator: "contains",
20990
- value: `"${e.text}"`
20991
- };
20992
21322
  logNever(e);
20993
21323
  }
20994
21324
  }
20995
- function formatMinMax(e, t) {
21325
+ function formatMinMaxLegacy(e, t) {
20996
21326
  if (!(e === void 0 && t === void 0)) return e === t ? {
20997
21327
  operator: "==",
20998
21328
  value: String(e)
@@ -23647,7 +23977,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
23647
23977
  filename: i2.filename
23648
23978
  };
23649
23979
  }, t[6] = e, t[7] = E);
23650
- let O = E, A, M, I, z, U, K, q, J, Q, EN, $, DN, ON;
23980
+ let O = E, A, M, I, z, U, K, q, J, Q, UN, $, WN, GN;
23651
23981
  if (t[8] !== y || t[9] !== c || t[10] !== n || t[11] !== i || t[12] !== (s == null ? void 0 : s.unavailableMessage) || t[13] !== O) {
23652
23982
  let e2 = async (t2) => {
23653
23983
  let n2 = labelForDownloadFormat(t2);
@@ -23715,10 +24045,10 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
23715
24045
  content: d2,
23716
24046
  open: f,
23717
24047
  children: v2
23718
- }), t[33] = d2, t[34] = f, t[35] = v2, t[36] = J) : J = t[36], A = DropdownMenuContent, Q = "bottom", EN = "print:hidden", t[37] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = (0, import_jsx_runtime.jsx)(DropdownMenuLabel, {
24048
+ }), t[33] = d2, t[34] = f, t[35] = v2, t[36] = J) : J = t[36], A = DropdownMenuContent, Q = "bottom", UN = "print:hidden", t[37] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = (0, import_jsx_runtime.jsx)(DropdownMenuLabel, {
23719
24049
  className: "text-xs text-muted-foreground",
23720
24050
  children: "Download"
23721
- }), t[37] = $) : $ = t[37], DN = downloadOptions.map((t2) => (0, import_jsx_runtime.jsxs)(DropdownMenuItem, {
24051
+ }), t[37] = $) : $ = t[37], WN = downloadOptions.map((t2) => (0, import_jsx_runtime.jsxs)(DropdownMenuItem, {
23722
24052
  onSelect: () => {
23723
24053
  e2(t2.format);
23724
24054
  },
@@ -23739,10 +24069,10 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
23739
24069
  ]
23740
24070
  })
23741
24071
  ]
23742
- }, t2.label)), t[38] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ON = (0, import_jsx_runtime.jsx)(DropdownMenuSeparator, {}), I = (0, import_jsx_runtime.jsx)(DropdownMenuLabel, {
24072
+ }, t2.label)), t[38] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (GN = (0, import_jsx_runtime.jsx)(DropdownMenuSeparator, {}), I = (0, import_jsx_runtime.jsx)(DropdownMenuLabel, {
23743
24073
  className: "text-xs text-muted-foreground",
23744
24074
  children: "Copy to clipboard"
23745
- }), t[38] = I, t[39] = ON) : (I = t[38], ON = t[39]), z = copyOptions.map((e3) => (0, import_jsx_runtime.jsxs)(DropdownMenuItem, {
24075
+ }), t[38] = I, t[39] = GN) : (I = t[38], GN = t[39]), z = copyOptions.map((e3) => (0, import_jsx_runtime.jsxs)(DropdownMenuItem, {
23746
24076
  onSelect: async () => {
23747
24077
  try {
23748
24078
  await a(e3.format);
@@ -23771,30 +24101,30 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
23771
24101
  ]
23772
24102
  })
23773
24103
  ]
23774
- }, e3.label)), t[8] = y, t[9] = c, t[10] = n, t[11] = i, t[12] = s == null ? void 0 : s.unavailableMessage, t[13] = O, t[14] = A, t[15] = M, t[16] = I, t[17] = z, t[18] = U, t[19] = K, t[20] = q, t[21] = J, t[22] = Q, t[23] = EN, t[24] = $, t[25] = DN, t[26] = ON;
23775
- } else A = t[14], M = t[15], I = t[16], z = t[17], U = t[18], K = t[19], q = t[20], J = t[21], Q = t[22], EN = t[23], $ = t[24], DN = t[25], ON = t[26];
23776
- let kN;
23777
- t[40] !== A || t[41] !== I || t[42] !== z || t[43] !== Q || t[44] !== EN || t[45] !== $ || t[46] !== DN || t[47] !== ON ? (kN = (0, import_jsx_runtime.jsxs)(A, {
24104
+ }, e3.label)), t[8] = y, t[9] = c, t[10] = n, t[11] = i, t[12] = s == null ? void 0 : s.unavailableMessage, t[13] = O, t[14] = A, t[15] = M, t[16] = I, t[17] = z, t[18] = U, t[19] = K, t[20] = q, t[21] = J, t[22] = Q, t[23] = UN, t[24] = $, t[25] = WN, t[26] = GN;
24105
+ } else A = t[14], M = t[15], I = t[16], z = t[17], U = t[18], K = t[19], q = t[20], J = t[21], Q = t[22], UN = t[23], $ = t[24], WN = t[25], GN = t[26];
24106
+ let KN;
24107
+ t[40] !== A || t[41] !== I || t[42] !== z || t[43] !== Q || t[44] !== UN || t[45] !== $ || t[46] !== WN || t[47] !== GN ? (KN = (0, import_jsx_runtime.jsxs)(A, {
23778
24108
  side: Q,
23779
- className: EN,
24109
+ className: UN,
23780
24110
  children: [
23781
24111
  $,
23782
- DN,
23783
- ON,
24112
+ WN,
24113
+ GN,
23784
24114
  I,
23785
24115
  z
23786
24116
  ]
23787
- }), t[40] = A, t[41] = I, t[42] = z, t[43] = Q, t[44] = EN, t[45] = $, t[46] = DN, t[47] = ON, t[48] = kN) : kN = t[48];
23788
- let AN;
23789
- return t[49] !== M || t[50] !== U || t[51] !== K || t[52] !== q || t[53] !== J || t[54] !== kN ? (AN = (0, import_jsx_runtime.jsxs)(M, {
24117
+ }), t[40] = A, t[41] = I, t[42] = z, t[43] = Q, t[44] = UN, t[45] = $, t[46] = WN, t[47] = GN, t[48] = KN) : KN = t[48];
24118
+ let qN;
24119
+ return t[49] !== M || t[50] !== U || t[51] !== K || t[52] !== q || t[53] !== J || t[54] !== KN ? (qN = (0, import_jsx_runtime.jsxs)(M, {
23790
24120
  modal: U,
23791
24121
  open: K,
23792
24122
  onOpenChange: q,
23793
24123
  children: [
23794
24124
  J,
23795
- kN
24125
+ KN
23796
24126
  ]
23797
- }), t[49] = M, t[50] = U, t[51] = K, t[52] = q, t[53] = J, t[54] = kN, t[55] = AN) : AN = t[55], AN;
24127
+ }), t[49] = M, t[50] = U, t[51] = K, t[52] = q, t[53] = J, t[54] = KN, t[55] = qN) : qN = t[55], qN;
23798
24128
  };
23799
24129
  function fetchJson(e) {
23800
24130
  return fetchText(e).then(jsonParseWithSpecialChar);
@@ -23886,22 +24216,22 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
23886
24216
  ]
23887
24217
  }) : null;
23888
24218
  };
23889
- DataTable = (0, import_react.memo)(({ wrapperClassName: e, className: t, maxHeight: n, columns: i, data: o, rawData: s, selection: c, totalColumns: d, totalRows: f, sizeBytes: h, manualSorting: _ = false, sorting: v, setSorting: y, rowSelection: S, cellSelection: w, cellStyling: E, hoverTemplate: O, cellHoverTexts: A, paginationState: M, setPaginationState: I, downloadAs: z, manualPagination: U = false, pagination: K = false, onRowSelectionChange: q, onCellSelectionChange: J, getRowIds: Q, enableSearch: EN = false, searchQuery: $, onSearchQueryChange: DN, showFilters: ON = false, filters: kN, onFiltersChange: AN, calculateTopKRows: jN, reloading: MN, freezeColumnsLeft: NN, freezeColumnsRight: PN, toggleDisplayHeader: FN, showChartBuilder: IN, isChartBuilderOpen: LN, showPageSizeSelector: RN, showTableExplorer: zN, togglePanel: BN, isPanelOpen: VN, isAnyPanelOpen: HN, viewedRowIdx: UN, onViewedRowChange: WN }) => {
23890
- let [GN, KN] = import_react.useState(false), { locale: qN } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(), { columnPinning: JN, setColumnPinning: YN } = useColumnPinning(NN, PN);
24219
+ DataTable = (0, import_react.memo)(({ wrapperClassName: e, className: t, maxHeight: n, columns: i, data: o, rawData: s, selection: c, totalColumns: d, totalRows: f, sizeBytes: h, manualSorting: _ = false, sorting: v, setSorting: y, rowSelection: S, cellSelection: w, cellStyling: E, hoverTemplate: O, cellHoverTexts: A, paginationState: M, setPaginationState: I, downloadAs: z, manualPagination: U = false, pagination: K = false, onRowSelectionChange: q, onCellSelectionChange: J, getRowIds: Q, enableSearch: UN = false, searchQuery: $, onSearchQueryChange: WN, showFilters: GN = false, filters: KN, onFiltersChange: qN, calculateTopKRows: JN, reloading: YN, freezeColumnsLeft: XN, freezeColumnsRight: ZN, toggleDisplayHeader: QN, showChartBuilder: $N, isChartBuilderOpen: eP, showPageSizeSelector: tP, showTableExplorer: nP, togglePanel: rP, isPanelOpen: iP, isAnyPanelOpen: aP, viewedRowIdx: oP, onViewedRowChange: sP }) => {
24220
+ let [cP, lP] = import_react.useState(false), { locale: uP } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(), { columnPinning: dP, setColumnPinning: fP } = useColumnPinning(XN, ZN);
23891
24221
  import_react.useEffect(() => {
23892
24222
  let e2;
23893
- return MN ? e2 = setTimeout(() => {
23894
- KN(true);
23895
- }, 300) : KN(false), () => {
24223
+ return YN ? e2 = setTimeout(() => {
24224
+ lP(true);
24225
+ }, 300) : lP(false), () => {
23896
24226
  e2 && clearTimeout(e2);
23897
24227
  };
23898
24228
  }, [
23899
- MN
24229
+ YN
23900
24230
  ]);
23901
- function XN(e2, t2) {
24231
+ function pP(e2, t2) {
23902
24232
  return M ? t2 + (U ? M.pageIndex * M.pageSize : 0) : t2;
23903
24233
  }
23904
- let ZN = useReactTable({
24234
+ let mP = useReactTable({
23905
24235
  _features: [
23906
24236
  ColumnPinning,
23907
24237
  ColumnWrappingFeature,
@@ -23925,11 +24255,11 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
23925
24255
  getRowId: (e2, t2) => {
23926
24256
  let n2 = getStableRowId(e2);
23927
24257
  if (n2) return n2;
23928
- let i2 = XN(e2, t2);
24258
+ let i2 = pP(e2, t2);
23929
24259
  return String(i2);
23930
24260
  }
23931
24261
  } : {},
23932
- locale: qN,
24262
+ locale: uP,
23933
24263
  manualPagination: U,
23934
24264
  getPaginationRowModel: getPaginationRowModel(),
23935
24265
  ...y ? {
@@ -23939,21 +24269,21 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
23939
24269
  enableMultiSort: true,
23940
24270
  getSortedRowModel: getSortedRowModel(),
23941
24271
  manualFiltering: true,
23942
- enableColumnFilters: ON,
24272
+ enableColumnFilters: GN,
23943
24273
  getFilteredRowModel: getFilteredRowModel(),
23944
- onColumnFiltersChange: AN,
24274
+ onColumnFiltersChange: qN,
23945
24275
  onRowSelectionChange: q,
23946
24276
  onCellSelectionChange: J,
23947
24277
  enableCellSelection: c === "single-cell" || c === "multi-cell",
23948
24278
  enableMultiCellSelection: c === "multi-cell",
23949
- onColumnPinningChange: YN,
24279
+ onColumnPinningChange: fP,
23950
24280
  enableFocusRow: true,
23951
- onFocusRowChange: WN,
24281
+ onFocusRowChange: sP,
23952
24282
  state: {
23953
24283
  ...v ? {
23954
24284
  sorting: v
23955
24285
  } : {},
23956
- columnFilters: kN,
24286
+ columnFilters: KN,
23957
24287
  ...M ? {
23958
24288
  pagination: M
23959
24289
  } : K && !M ? {} : {
@@ -23965,21 +24295,21 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
23965
24295
  rowSelection: S ?? {},
23966
24296
  cellSelection: w ?? [],
23967
24297
  cellStyling: E,
23968
- columnPinning: JN,
24298
+ columnPinning: dP,
23969
24299
  cellHoverTemplate: O,
23970
24300
  cellHoverTexts: A ?? {}
23971
24301
  }
23972
- }), QN = (VN == null ? void 0 : VN(PANEL_TYPES.ROW_VIEWER)) ?? false, $N = !K && o.length > 100, eP = useScrollContainerHeight({
24302
+ }), hP = (iP == null ? void 0 : iP(PANEL_TYPES.ROW_VIEWER)) ?? false, gP = !K && o.length > 100, _P = useScrollContainerHeight({
23973
24303
  maxHeight: n,
23974
- virtualize: $N
24304
+ virtualize: gP
23975
24305
  });
23976
24306
  return (0, import_jsx_runtime.jsxs)("div", {
23977
24307
  className: cn(e, "flex flex-col space-y-1"),
23978
24308
  children: [
23979
24309
  (0, import_jsx_runtime.jsx)(FilterPills, {
23980
- filters: kN,
23981
- table: ZN,
23982
- calculateTopKRows: jN
24310
+ filters: KN,
24311
+ table: mP,
24312
+ calculateTopKRows: JN
23983
24313
  }),
23984
24314
  (0, import_jsx_runtime.jsx)(CellSelectionProvider, {
23985
24315
  children: (0, import_jsx_runtime.jsxs)("div", {
@@ -23987,34 +24317,34 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
23987
24317
  className: cn(t || "rounded-md border overflow-hidden"),
23988
24318
  children: [
23989
24319
  (0, import_jsx_runtime.jsx)(TableTopBar, {
23990
- enableSearch: EN,
24320
+ enableSearch: UN,
23991
24321
  searchQuery: $,
23992
- onSearchQueryChange: DN,
23993
- reloading: MN,
23994
- showChartBuilder: IN,
23995
- isChartBuilderOpen: LN,
23996
- toggleDisplayHeader: FN,
23997
- showTableExplorer: zN,
23998
- togglePanel: BN,
23999
- isAnyPanelOpen: HN,
24322
+ onSearchQueryChange: WN,
24323
+ reloading: YN,
24324
+ showChartBuilder: $N,
24325
+ isChartBuilderOpen: eP,
24326
+ toggleDisplayHeader: QN,
24327
+ showTableExplorer: nP,
24328
+ togglePanel: rP,
24329
+ isAnyPanelOpen: aP,
24000
24330
  downloadAs: z,
24001
24331
  sizeBytes: h
24002
24332
  }),
24003
24333
  (0, import_jsx_runtime.jsxs)(Table, {
24004
24334
  className: cn("relative", i.length <= 4 ? "w-auto" : "w-full"),
24005
- ref: eP,
24335
+ ref: _P,
24006
24336
  children: [
24007
- GN && (0, import_jsx_runtime.jsx)("thead", {
24337
+ cP && (0, import_jsx_runtime.jsx)("thead", {
24008
24338
  className: "absolute top-0 left-0 h-[3px] w-1/2 bg-primary animate-slide"
24009
24339
  }),
24010
- renderTableHeader(ZN, $N || !!n),
24340
+ renderTableHeader(mP, gP || !!n),
24011
24341
  (0, import_jsx_runtime.jsx)(DataTableBody, {
24012
- table: ZN,
24342
+ table: mP,
24013
24343
  columns: i,
24014
- rowViewerPanelOpen: QN,
24015
- getRowIndex: XN,
24016
- viewedRowIdx: UN,
24017
- virtualize: $N
24344
+ rowViewerPanelOpen: hP,
24345
+ getRowIndex: pP,
24346
+ viewedRowIdx: oP,
24347
+ virtualize: gP
24018
24348
  })
24019
24349
  ]
24020
24350
  }),
@@ -24025,10 +24355,10 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
24025
24355
  pagination: K,
24026
24356
  selection: c,
24027
24357
  onRowSelectionChange: q,
24028
- table: ZN,
24358
+ table: mP,
24029
24359
  getRowIds: Q,
24030
- showPageSizeSelector: RN,
24031
- tableLoading: MN
24360
+ showPageSizeSelector: tP,
24361
+ tableLoading: YN
24032
24362
  })
24033
24363
  ]
24034
24364
  })
@@ -24116,69 +24446,69 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
24116
24446
  ${_}`,
24117
24447
  triggerImmediately: e2
24118
24448
  });
24119
- }, [q, Q] = _.split(":", 2), $ = d ? KEY : "", DN;
24120
- t[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (DN = () => h(_temp$3), t[10] = DN) : DN = t[10];
24121
- let ON = d ? "rotate-180" : "rotate-0", kN;
24122
- t[11] === ON ? kN = t[12] : (kN = cn("h-4 w-4 text-muted-foreground transition-transform duration-200 shrink-0", ON), t[11] = ON, t[12] = kN);
24123
- let AN;
24124
- t[13] === kN ? AN = t[14] : (AN = (0, import_jsx_runtime.jsx)(ChevronDown, {
24125
- className: kN
24126
- }), t[13] = kN, t[14] = AN);
24127
- let jN = q || "Error", MN;
24128
- t[15] === jN ? MN = t[16] : (MN = (0, import_jsx_runtime.jsxs)("span", {
24449
+ }, [q, Q] = _.split(":", 2), $ = d ? KEY : "", WN;
24450
+ t[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (WN = () => h(_temp$3), t[10] = WN) : WN = t[10];
24451
+ let GN = d ? "rotate-180" : "rotate-0", KN;
24452
+ t[11] === GN ? KN = t[12] : (KN = cn("h-4 w-4 text-muted-foreground transition-transform duration-200 shrink-0", GN), t[11] = GN, t[12] = KN);
24453
+ let qN;
24454
+ t[13] === KN ? qN = t[14] : (qN = (0, import_jsx_runtime.jsx)(ChevronDown, {
24455
+ className: KN
24456
+ }), t[13] = KN, t[14] = qN);
24457
+ let JN = q || "Error", YN;
24458
+ t[15] === JN ? YN = t[16] : (YN = (0, import_jsx_runtime.jsxs)("span", {
24129
24459
  className: "text-destructive",
24130
24460
  children: [
24131
- jN,
24461
+ JN,
24132
24462
  ":"
24133
24463
  ]
24134
- }), t[15] = jN, t[16] = MN);
24135
- let PN;
24136
- t[17] !== Q || t[18] !== MN ? (PN = (0, import_jsx_runtime.jsxs)("div", {
24464
+ }), t[15] = JN, t[16] = YN);
24465
+ let ZN;
24466
+ t[17] !== Q || t[18] !== YN ? (ZN = (0, import_jsx_runtime.jsxs)("div", {
24137
24467
  className: "text-sm inline font-mono",
24138
24468
  children: [
24139
- MN,
24469
+ YN,
24140
24470
  " ",
24141
24471
  Q
24142
24472
  ]
24143
- }), t[17] = Q, t[18] = MN, t[19] = PN) : PN = t[19];
24144
- let IN;
24145
- t[20] !== PN || t[21] !== AN ? (IN = (0, import_jsx_runtime.jsxs)("div", {
24473
+ }), t[17] = Q, t[18] = YN, t[19] = ZN) : ZN = t[19];
24474
+ let $N;
24475
+ t[20] !== ZN || t[21] !== qN ? ($N = (0, import_jsx_runtime.jsxs)("div", {
24146
24476
  className: "flex gap-2 h-10 px-2 hover:bg-muted rounded-sm select-none items-center cursor-pointer transition-all",
24147
- onClick: DN,
24477
+ onClick: WN,
24148
24478
  children: [
24149
- AN,
24150
- PN
24479
+ qN,
24480
+ ZN
24151
24481
  ]
24152
- }), t[20] = PN, t[21] = AN, t[22] = IN) : IN = t[22];
24153
- let LN;
24154
- t[23] === c ? LN = t[24] : (LN = (0, import_jsx_runtime.jsx)(AccordionContent, {
24482
+ }), t[20] = ZN, t[21] = qN, t[22] = $N) : $N = t[22];
24483
+ let eP;
24484
+ t[23] === c ? eP = t[24] : (eP = (0, import_jsx_runtime.jsx)(AccordionContent, {
24155
24485
  className: "text-muted-foreground px-4 pt-2 text-xs overflow-auto",
24156
24486
  children: c
24157
- }), t[23] = c, t[24] = LN);
24158
- let RN;
24159
- t[25] !== IN || t[26] !== LN ? (RN = (0, import_jsx_runtime.jsxs)(AccordionItem, {
24487
+ }), t[23] = c, t[24] = eP);
24488
+ let tP;
24489
+ t[25] !== $N || t[26] !== eP ? (tP = (0, import_jsx_runtime.jsxs)(AccordionItem, {
24160
24490
  value: KEY,
24161
24491
  className: "border-none",
24162
24492
  children: [
24163
- IN,
24164
- LN
24493
+ $N,
24494
+ eP
24165
24495
  ]
24166
- }), t[25] = IN, t[26] = LN, t[27] = RN) : RN = t[27];
24167
- let zN;
24168
- t[28] !== RN || t[29] !== $ ? (zN = (0, import_jsx_runtime.jsx)(Accordion, {
24496
+ }), t[25] = $N, t[26] = eP, t[27] = tP) : tP = t[27];
24497
+ let nP;
24498
+ t[28] !== tP || t[29] !== $ ? (nP = (0, import_jsx_runtime.jsx)(Accordion, {
24169
24499
  type: "single",
24170
24500
  collapsible: true,
24171
24501
  value: $,
24172
- children: RN
24173
- }), t[28] = RN, t[29] = $, t[30] = zN) : zN = t[30];
24174
- let VN;
24175
- t[31] !== K || t[32] !== z ? (VN = z && (0, import_jsx_runtime.jsx)(AIFixButton, {
24502
+ children: tP
24503
+ }), t[28] = tP, t[29] = $, t[30] = nP) : nP = t[30];
24504
+ let iP;
24505
+ t[31] !== K || t[32] !== z ? (iP = z && (0, import_jsx_runtime.jsx)(AIFixButton, {
24176
24506
  tooltip: "Fix with AI",
24177
24507
  openPrompt: () => K(false),
24178
24508
  applyAutofix: () => K(true)
24179
- }), t[31] = K, t[32] = z, t[33] = VN) : VN = t[33];
24180
- let HN;
24181
- t[34] !== A || t[35] !== E ? (HN = A && (0, import_jsx_runtime.jsx)(Tooltip, {
24509
+ }), t[31] = K, t[32] = z, t[33] = iP) : iP = t[33];
24510
+ let aP;
24511
+ t[34] !== A || t[35] !== E ? (aP = A && (0, import_jsx_runtime.jsx)(Tooltip, {
24182
24512
  content: "Attach pdb to the exception point.",
24183
24513
  children: (0, import_jsx_runtime.jsxs)(Button, {
24184
24514
  size: "xs",
@@ -24195,9 +24525,9 @@ ${_}`,
24195
24525
  "Launch debugger"
24196
24526
  ]
24197
24527
  })
24198
- }), t[34] = A, t[35] = E, t[36] = HN) : HN = t[36];
24199
- let UN;
24200
- t[37] !== _ || t[38] !== i ? (UN = U && (0, import_jsx_runtime.jsxs)(DropdownMenu, {
24528
+ }), t[34] = A, t[35] = E, t[36] = aP) : aP = t[36];
24529
+ let oP;
24530
+ t[37] !== _ || t[38] !== i ? (oP = U && (0, import_jsx_runtime.jsxs)(DropdownMenu, {
24201
24531
  children: [
24202
24532
  (0, import_jsx_runtime.jsx)(DropdownMenuTrigger, {
24203
24533
  asChild: true,
@@ -24265,24 +24595,24 @@ ${_}`,
24265
24595
  ]
24266
24596
  })
24267
24597
  ]
24268
- }), t[37] = _, t[38] = i, t[39] = UN) : UN = t[39];
24269
- let WN;
24270
- t[40] !== VN || t[41] !== HN || t[42] !== UN ? (WN = (0, import_jsx_runtime.jsxs)("div", {
24598
+ }), t[37] = _, t[38] = i, t[39] = oP) : oP = t[39];
24599
+ let sP;
24600
+ t[40] !== iP || t[41] !== aP || t[42] !== oP ? (sP = (0, import_jsx_runtime.jsxs)("div", {
24271
24601
  className: "flex gap-2",
24272
24602
  children: [
24273
- VN,
24274
- HN,
24275
- UN
24603
+ iP,
24604
+ aP,
24605
+ oP
24276
24606
  ]
24277
- }), t[40] = VN, t[41] = HN, t[42] = UN, t[43] = WN) : WN = t[43];
24278
- let GN;
24279
- return t[44] !== zN || t[45] !== WN ? (GN = (0, import_jsx_runtime.jsxs)("div", {
24607
+ }), t[40] = iP, t[41] = aP, t[42] = oP, t[43] = sP) : sP = t[43];
24608
+ let cP;
24609
+ return t[44] !== nP || t[45] !== sP ? (cP = (0, import_jsx_runtime.jsxs)("div", {
24280
24610
  className: "flex flex-col gap-2 min-w-full w-fit",
24281
24611
  children: [
24282
- zN,
24283
- WN
24612
+ nP,
24613
+ sP
24284
24614
  ]
24285
- }), t[44] = zN, t[45] = WN, t[46] = GN) : GN = t[46], GN;
24615
+ }), t[44] = nP, t[45] = sP, t[46] = cP) : cP = t[46], cP;
24286
24616
  };
24287
24617
  function lastLine(e) {
24288
24618
  var _a2, _b;
@@ -25668,7 +25998,7 @@ ${_}`,
25668
25998
  return Logger.warn("Failed to get version from mount config"), null;
25669
25999
  }
25670
26000
  }
25671
- marimoVersionAtom = atom(getVersionFromMountConfig() || "0.23.7-dev47");
26001
+ marimoVersionAtom = atom(getVersionFromMountConfig() || "0.23.7-dev48");
25672
26002
  showCodeInRunModeAtom = atom(true);
25673
26003
  atom(null);
25674
26004
  var import_compiler_runtime = require_compiler_runtime();