@marimo-team/islands 0.19.3-dev3 → 0.19.3-dev30

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 (50) hide show
  1. package/dist/{Combination-33P1MEPK.js → Combination-BOmAhdTT.js} +1 -1
  2. package/dist/{ConnectedDataExplorerComponent-BIfUtj_S.js → ConnectedDataExplorerComponent-NOmLZzDZ.js} +5 -5
  3. package/dist/{any-language-editor-Bda9cY1_.js → any-language-editor-vYraVrwE.js} +3 -3
  4. package/dist/{button-BlF-78eJ.js → button-D6ZIdUA3.js} +1 -1
  5. package/dist/{check-DDykH_Yi.js → check-S8ldILuD.js} +1 -1
  6. package/dist/{copy-B5nooU3m.js → copy-ACOJ1BXr.js} +1 -1
  7. package/dist/{error-banner-UH0Nxilf.js → error-banner-BhqH4mGj.js} +2 -2
  8. package/dist/{esm-D197NGQX.js → esm-DOBJQbuy.js} +4 -4
  9. package/dist/{glide-data-editor-Bv8bVIJ9.js → glide-data-editor-CmGweudS.js} +5 -5
  10. package/dist/{label-oKuiQuiM.js → label-BaX2bLJa.js} +4 -4
  11. package/dist/main.js +339 -250
  12. package/dist/{slides-component-CJJp5XN4.js → slides-component-BHWhzwDN.js} +1 -1
  13. package/dist/{spec-hsYzGr6F.js → spec-BY974nhI.js} +3 -3
  14. package/dist/style.css +1 -1
  15. package/dist/{types-DEmfj_i8.js → types-BtvDfOR-.js} +293 -254
  16. package/dist/{useDeepCompareMemoize-1wVjsLov.js → useDeepCompareMemoize-Ci6rXZ_K.js} +2 -2
  17. package/dist/{vega-component-BGTsperM.js → vega-component-7FCbq3L9.js} +4 -4
  18. package/package.json +5 -5
  19. package/src/components/app-config/__tests__/get-dirty-values.test.ts +1 -1
  20. package/src/components/app-config/user-config-form.tsx +1 -1
  21. package/src/components/chat/acp/agent-panel.tsx +56 -43
  22. package/src/components/editor/KernelStartupErrorModal.tsx +101 -0
  23. package/src/components/editor/actions/name-cell-input.tsx +10 -4
  24. package/src/components/editor/chrome/types.ts +2 -4
  25. package/src/components/editor/chrome/wrapper/app-chrome.tsx +55 -58
  26. package/src/components/editor/chrome/wrapper/footer-items/runtime-settings.tsx +150 -96
  27. package/src/components/editor/notebook-cell.tsx +13 -13
  28. package/src/components/editor/renderers/vertical-layout/__tests__/useFocusFirstEditor.test.ts +27 -0
  29. package/src/components/editor/renderers/vertical-layout/useFocusFirstEditor.ts +6 -0
  30. package/src/components/utils/lazy-mount.tsx +29 -8
  31. package/src/core/MarimoApp.tsx +2 -0
  32. package/src/core/cells/cells.ts +1 -4
  33. package/src/core/cells/scrollCellIntoView.ts +3 -2
  34. package/src/core/codemirror/cm.ts +2 -0
  35. package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +123 -0
  36. package/src/core/codemirror/lsp/notebook-lsp.ts +44 -4
  37. package/src/core/codemirror/misc/__tests__/string-braces.test.ts +200 -0
  38. package/src/core/codemirror/misc/string-braces.ts +37 -0
  39. package/src/core/errors/state.ts +7 -1
  40. package/src/core/islands/main.ts +2 -0
  41. package/src/core/kernel/__tests__/handlers.test.ts +2 -2
  42. package/src/core/kernel/state.ts +1 -0
  43. package/src/core/network/__tests__/requests-lazy.test.ts +1 -1
  44. package/src/core/network/requests-lazy.ts +2 -2
  45. package/src/core/websocket/types.ts +1 -0
  46. package/src/core/websocket/useMarimoKernelConnection.tsx +18 -1
  47. package/src/css/app/Cell.css +6 -0
  48. package/src/css/globals.css +2 -0
  49. package/src/plugins/impl/chat/chat-ui.tsx +16 -4
  50. package/src/utils/events.ts +1 -0
package/dist/main.js CHANGED
@@ -4,21 +4,21 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4
4
  import { a as __toCommonJS, n as __esmMin, o as __toDynamicImportESM, r as __export$1, s as __toESM, t as __commonJSMin } from "./chunk-BNovOVIE.js";
5
5
  import { t as require_react } from "./react-DdA8EBol.js";
6
6
  import { t as require_compiler_runtime } from "./compiler-runtime-DHFVbq0b.js";
7
- import { n as Copy, r as toast, t as copyToClipboard } from "./copy-B5nooU3m.js";
7
+ import { n as Copy, r as toast, t as copyToClipboard } from "./copy-ACOJ1BXr.js";
8
8
  import { h as require_cjs$1, i as Go$1, __tla as __tla_0 } from "./chunk-OGVTOU66-RMy3tlM6.js";
9
- import { C as useLayoutEffect2, D as dispatchDiscreteCustomEvent, E as Primitive$1, M as composeEventHandlers, N as createLucideIcon, O as createSlot, S as useId$12, T as useCallbackRef, _ as Arrow, a as __awaiter, b as createPopperScope, c as withSmartCollisionBoundary, d as Root$5, g as Anchor, h as Portal, i as useFocusGuards, j as createContextScope$1, l as isInVscodeExtension, m as Presence, n as hideOthers, o as MAX_HEIGHT_OFFSET, p as useControllableState, r as FocusScope, s as withFullScreenAsRoot, t as Combination_default, u as StyleNamespace, v as Content$3, w as DismissableLayer, x as useSize, y as Root2$6 } from "./Combination-33P1MEPK.js";
10
- import { A as Badge, B as ListFilter, C as DEFAULT_COLOR_SCHEME, D as SCALE_TYPE_DESCRIPTIONS, E as EMPTY_VALUE$1, F as $5a387cc49350e6db$export$722debc0e56fea39, H as ChartPie, I as Type, L as ToggleLeft, M as startCase_default, N as $896ba0a80a8f4d36$export$85fd5fdf27bacc79, O as TIME_UNIT_DESCRIPTIONS, P as $fb18d541ea1ad717$export$ad991b66133851cf, R as Table$1, S as DEFAULT_AGGREGATION, T as DEFAULT_TIME_UNIT, U as ChartColumn, V as Hash, W as Calendar, _ as AGGREGATION_TYPE_DESCRIPTIONS, a as AGGREGATION_FNS$1, b as COLOR_SCHEMES, c as COLOR_BY_FIELDS, d as NONE_VALUE, f as SELECTABLE_DATA_TYPES, g as TIME_UNITS, h as STRING_AGGREGATION_FNS, i as convertDataTypeToSelectable, j as createReducerAndAtoms, k as escapeFieldName, l as COMBINED_TIME_UNITS, m as SORT_TYPES, n as createSpecWithoutData, o as BIN_AGGREGATION, p as SINGLE_TIME_UNITS, r as isFieldSet, s as CHART_TYPES, t as augmentSpecWithData, u as ChartType, v as AGGREGATION_TYPE_ICON, w as DEFAULT_MAX_BINS_FACET, x as COUNT_FIELD, y as CHART_TYPE_ICON, z as SquareFunction } from "./spec-hsYzGr6F.js";
11
- import { t as Check } from "./check-DDykH_Yi.js";
12
- import { A as logNever, B as ChevronDown, C as useDirection, D as useOnUnmount, E as useOnMount, F as $18f2051aff69b9bf$export$a54013f0d02a8f82, I as $b5e257d569688ac6$export$535bd6ca7f90a273, M as $a916eb452884faea$export$b7a616150fdb9f44, O as usePrevious, P as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, R as X, S as Trigger$5, T as clamp$2, _ as menuItemVariants, a as SelectGroup, b as menuSubTriggerVariants, c as SelectSeparator, d as NativeSelect, f as selectStyles, g as menuControlVariants, h as menuControlCheckVariants, i as SelectContent, k as assertNever, l as SelectTrigger, m as menuContentCommon, n as Primitive, o as SelectItem, p as MENU_ITEM_DISABLED, r as Select, s as SelectLabel, t as Label, u as SelectValue, v as menuLabelVariants, w as createCollection, x as Icon, y as menuSeparatorVariants } from "./label-oKuiQuiM.js";
13
- import { $ as $514c0188e459b4c0$export$9afb8bc826b033ea, $t as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, A as ItemIndicator, At as $6db58dc88e78b024$export$2f817fcdc4b89ae0, B as createMenuScope, Bt as $458b0a5536c1a7cf$export$40bfa8c7b0832715, C as DropdownMenuTrigger, Ct as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, D as Content2$3, Dt as $6c7bd7858deea686$export$cd11ab140839f11d, E as CheckboxItem, Et as $701a24aa0da5b062$export$ea18c227d4417cc3, F as Root3, Ft as $507fabe10e71c6fb$export$630ff653c5ada6a9, G as $3985021b0ad6602f$export$37fb8590cf2c088c, Gt as $df56164dff5785e2$export$4338b53315abf666, H as Root$6, Ht as $b4b717babfbb907b$export$bebd5a1431fec25d, I as Separator, It as $f6c31cce2adf654f$export$45712eceda6fad21, J as $a049562f99e7db0e$export$f9c6924e160136d1, Jt as $c87311424ea30a05$export$78551043582a6a98, K as $3985021b0ad6602f$export$f5b8910cec6cf069, Kt as $313b98861ee5dd6c$export$d6875122194c7b44, L as Sub, Lt as _class_private_field_init, M as Portal$2, Mt as $6179b936705e76d3$export$ae780daf29e6d456, N as RadioGroup$2, Nt as $9ab94262bd0047c7$export$420e68273165f4ec, O as Group$1, Ot as $fca6afa0e843324b$export$87b761675e8eaa10, P as RadioItem, Pt as $3ad3f6e1647bc98d$export$80f3e147d781571c, Q as $514c0188e459b4c0$export$5f1af8db9871e1d6, Qt as $7215afc6de606d6b$export$de79e2c695e052f3, R as SubContent, Rt as $ae1eeba8b9eafd08$export$5165eccb35aaadb5, S as DropdownMenuSubTrigger, St as $e5be200c675c3b3a$export$dad6ae84456c676a, T as Arrow2, Tt as $f7dceffc5ad7768b$export$4e328f61c538687f, U as createRovingFocusGroupScope, Ut as $99facab73266f662$export$5add1d006293d136, V as Item$2, Vt as $b4b717babfbb907b$export$4c063cf1350e6fed, W as ErrorBoundary, Wt as $e9faafb641e167db$export$90fc3a17d93f704c, X as $ee014567cb39d3f0$export$f551688fc98f2e09, Xt as $c87311424ea30a05$export$a11b0059900ceec8, Y as $d3e0e05bdfcf66bd$export$c24727297075ec6a, Yt as $c87311424ea30a05$export$9ac100e40613ea10, Z as $ee014567cb39d3f0$export$ff05c3ac10437e03, Zt as $c87311424ea30a05$export$fedb369cb70207f1, _ as DropdownMenuLabel, _n as ChevronRight, _t as $2baaea4c71418dea$export$294aa081a6c6f55d, a as OnBlurredInput, an as $431fbd86ca7dc216$export$b204af158042fbac, at as $64fa3d84918910a7$export$2881499e37b75b9a, b as DropdownMenuSub, bt as $e5be200c675c3b3a$export$a763b9476acd3eb, c as NumberField, cn as $bdb11010cef70236$export$b4cc09c592e8fdb8, ct as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, d as prettyNumber, dn as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, dt as $64fa3d84918910a7$export$ef03459518577ad4, en as $3ef42575df84b30b$export$9d1611c77c2fe928, et as $d2b4bc8c273e7be6$export$24d547caef80ccd1, f as prettyScientificNumber, fn as Trash, ft as $64fa3d84918910a7$export$fabf2dc03a41866e, g as DropdownMenuItem, gn as Circle, gt as $d2e8511e6f209edf$export$e908e06f4b8e3402, h as DropdownMenuGroup, hn as Pencil, ht as capitalize_default, i as Input, in as $f4e2df6bd15f8569$export$98658e8c59125e6a, it as $f39a9eba43920ace$export$b5d7cc18bb8d2b59, j as Label$2, jt as $5b160d28a433310d$export$c17fa47878dc55b6, k as Item2$2, kt as $fca6afa0e843324b$export$f12b703ca79dfbb1, l as maxFractionalDigits, ln as $bdb11010cef70236$export$f680877a34711e37, lt as $64fa3d84918910a7$export$c245e6201fed2f75, m as DropdownMenuContent, mn as Plus, mt as marked, n as DebouncedInput, nn as $d4ee10de306f2510$export$cd4e5573fbe2b576, nt as $01b77f81d0f07f68$export$75b6ee27786ba447, o as useDebounceControlledState, on as $431fbd86ca7dc216$export$f21a1ffae260145a, ot as $64fa3d84918910a7$export$29f1550f4b0d4415, p as DropdownMenu, pn as Search, pt as useNonce, q as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4, qt as $c87311424ea30a05$export$6446a186d09e379e, r as DebouncedNumberInput, rn as $d4ee10de306f2510$export$e58f029f0fbfdb29, rt as $01b77f81d0f07f68$export$b04be29aa201d4f5, s as useDebouncedCallback, sn as $ff5963eb1fccf552$export$e08e3b67e392101e, st as $64fa3d84918910a7$export$4d86445c2cf5e3, t as BulkEdit, tn as $d4ee10de306f2510$export$4282f70798064fe0, tt as $d2b4bc8c273e7be6$export$353f5b6fc5456de1, u as prettyEngineeringNumber, un as $8ae05eaa5c114e9c$export$7f54fc3180508a52, ut as $64fa3d84918910a7$export$c62b8e45d58ddad9, v as DropdownMenuPortal, vt as $e93e671b31057976$export$b8473d3665f3a75a, w as Anchor2, wt as $319e236875307eab$export$a9b970dcc4ae71a9, x as DropdownMenuSubContent, xt as $e5be200c675c3b3a$export$aca958c65c314e6c, y as DropdownMenuSeparator, yt as $e5be200c675c3b3a$export$75ee7c75d68f5b0e, z as SubTrigger, zt as $9446cca9a3875146$export$7d15b64cf5a3a4c4 } from "./types-DEmfj_i8.js";
14
- import { S as CircleQuestionMark, _ as isUrl, a as AlertTitle, b as Deferred, c as constructFrom, d as millisecondsInMinute, f as millisecondsInSecond, g as appendQueryParams, h as getRuntimeManager, i as AlertDescription, l as millisecondsInDay, m as asRemoteURL, n as arrow, o as isValid$1, p as millisecondsInWeek, r as Alert, s as toDate, t as useDeepCompareMemoize, u as millisecondsInHour, v as require_cuid2, x as isWasm, y as waitForConnectionOpen } from "./useDeepCompareMemoize-1wVjsLov.js";
9
+ import { C as useLayoutEffect2, D as dispatchDiscreteCustomEvent, E as Primitive$1, M as composeEventHandlers, N as createLucideIcon, O as createSlot, S as useId$12, T as useCallbackRef, _ as Arrow, a as __awaiter, b as createPopperScope, c as withSmartCollisionBoundary, d as Root$5, g as Anchor, h as Portal, i as useFocusGuards, j as createContextScope$1, l as isInVscodeExtension, m as Presence, n as hideOthers, o as MAX_HEIGHT_OFFSET, p as useControllableState, r as FocusScope, s as withFullScreenAsRoot, t as Combination_default, u as StyleNamespace, v as Content$3, w as DismissableLayer, x as useSize, y as Root2$6 } from "./Combination-BOmAhdTT.js";
10
+ import { A as Badge, B as ListFilter, C as DEFAULT_COLOR_SCHEME, D as SCALE_TYPE_DESCRIPTIONS, E as EMPTY_VALUE$1, F as $5a387cc49350e6db$export$722debc0e56fea39, H as ChartPie, I as Type, L as ToggleLeft, M as startCase_default, N as $896ba0a80a8f4d36$export$85fd5fdf27bacc79, O as TIME_UNIT_DESCRIPTIONS, P as $fb18d541ea1ad717$export$ad991b66133851cf, R as Table$1, S as DEFAULT_AGGREGATION, T as DEFAULT_TIME_UNIT, U as ChartColumn, V as Hash, W as Calendar, _ as AGGREGATION_TYPE_DESCRIPTIONS, a as AGGREGATION_FNS$1, b as COLOR_SCHEMES, c as COLOR_BY_FIELDS, d as NONE_VALUE, f as SELECTABLE_DATA_TYPES, g as TIME_UNITS, h as STRING_AGGREGATION_FNS, i as convertDataTypeToSelectable, j as createReducerAndAtoms, k as escapeFieldName, l as COMBINED_TIME_UNITS, m as SORT_TYPES, n as createSpecWithoutData, o as BIN_AGGREGATION, p as SINGLE_TIME_UNITS, r as isFieldSet, s as CHART_TYPES, t as augmentSpecWithData, u as ChartType, v as AGGREGATION_TYPE_ICON, w as DEFAULT_MAX_BINS_FACET, x as COUNT_FIELD, y as CHART_TYPE_ICON, z as SquareFunction } from "./spec-BY974nhI.js";
11
+ import { t as Check } from "./check-S8ldILuD.js";
12
+ import { A as logNever, B as ChevronDown, C as useDirection, D as useOnUnmount, E as useOnMount, F as $18f2051aff69b9bf$export$a54013f0d02a8f82, I as $b5e257d569688ac6$export$535bd6ca7f90a273, M as $a916eb452884faea$export$b7a616150fdb9f44, O as usePrevious, P as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, R as X, S as Trigger$5, T as clamp$2, _ as menuItemVariants, a as SelectGroup, b as menuSubTriggerVariants, c as SelectSeparator, d as NativeSelect, f as selectStyles, g as menuControlVariants, h as menuControlCheckVariants, i as SelectContent, k as assertNever, l as SelectTrigger, m as menuContentCommon, n as Primitive, o as SelectItem, p as MENU_ITEM_DISABLED, r as Select, s as SelectLabel, t as Label, u as SelectValue, v as menuLabelVariants, w as createCollection, x as Icon, y as menuSeparatorVariants } from "./label-BaX2bLJa.js";
13
+ import { $ as $514c0188e459b4c0$export$9afb8bc826b033ea, $t as $7215afc6de606d6b$export$de79e2c695e052f3, A as ItemIndicator, At as $6db58dc88e78b024$export$2f817fcdc4b89ae0, B as createMenuScope, Bt as $458b0a5536c1a7cf$export$40bfa8c7b0832715, C as DropdownMenuTrigger, Ct as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, D as Content2$3, Dt as $6c7bd7858deea686$export$cd11ab140839f11d, E as CheckboxItem, Et as $701a24aa0da5b062$export$ea18c227d4417cc3, F as Root3, Ft as $507fabe10e71c6fb$export$630ff653c5ada6a9, G as $3985021b0ad6602f$export$37fb8590cf2c088c, Gt as $8ae05eaa5c114e9c$export$7f54fc3180508a52, H as Root$6, Ht as $b4b717babfbb907b$export$bebd5a1431fec25d, I as Separator, It as $f6c31cce2adf654f$export$45712eceda6fad21, J as $a049562f99e7db0e$export$f9c6924e160136d1, Jt as $c87311424ea30a05$export$6446a186d09e379e, K as $3985021b0ad6602f$export$f5b8910cec6cf069, Kt as $df56164dff5785e2$export$4338b53315abf666, L as Sub, Lt as _class_private_field_init, M as Portal$2, Mt as $6179b936705e76d3$export$ae780daf29e6d456, N as RadioGroup$2, Nt as $9ab94262bd0047c7$export$420e68273165f4ec, O as Group$1, Ot as $fca6afa0e843324b$export$87b761675e8eaa10, P as RadioItem, Pt as $3ad3f6e1647bc98d$export$80f3e147d781571c, Q as $514c0188e459b4c0$export$5f1af8db9871e1d6, Qt as $c87311424ea30a05$export$fedb369cb70207f1, R as SubContent, Rt as $ae1eeba8b9eafd08$export$5165eccb35aaadb5, S as DropdownMenuSubTrigger, St as $e5be200c675c3b3a$export$dad6ae84456c676a, T as Arrow2, Tt as $f7dceffc5ad7768b$export$4e328f61c538687f, U as createRovingFocusGroupScope, Ut as $99facab73266f662$export$5add1d006293d136, V as Item$2, Vt as $b4b717babfbb907b$export$4c063cf1350e6fed, W as ErrorBoundary, Wt as $e9faafb641e167db$export$90fc3a17d93f704c, X as $ee014567cb39d3f0$export$f551688fc98f2e09, Xt as $c87311424ea30a05$export$9ac100e40613ea10, Y as $d3e0e05bdfcf66bd$export$c24727297075ec6a, Yt as $c87311424ea30a05$export$78551043582a6a98, Z as $ee014567cb39d3f0$export$ff05c3ac10437e03, Zt as $c87311424ea30a05$export$a11b0059900ceec8, _ as DropdownMenuLabel, _n as ChevronRight, _t as $2baaea4c71418dea$export$294aa081a6c6f55d, a as OnBlurredInput, an as $f4e2df6bd15f8569$export$98658e8c59125e6a, at as $64fa3d84918910a7$export$2881499e37b75b9a, b as DropdownMenuSub, bt as $e5be200c675c3b3a$export$a763b9476acd3eb, c as NumberField, cn as $ff5963eb1fccf552$export$e08e3b67e392101e, ct as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, d as prettyNumber, dn as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, dt as $64fa3d84918910a7$export$ef03459518577ad4, en as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, et as $d2b4bc8c273e7be6$export$24d547caef80ccd1, f as prettyScientificNumber, fn as Trash, ft as $64fa3d84918910a7$export$fabf2dc03a41866e, g as DropdownMenuItem, gn as Circle, gt as $d2e8511e6f209edf$export$e908e06f4b8e3402, h as DropdownMenuGroup, hn as Pencil, ht as capitalize_default, i as Input, in as $d4ee10de306f2510$export$e58f029f0fbfdb29, it as $f39a9eba43920ace$export$b5d7cc18bb8d2b59, j as Label$2, jt as $5b160d28a433310d$export$c17fa47878dc55b6, k as Item2$2, kt as $fca6afa0e843324b$export$f12b703ca79dfbb1, l as maxFractionalDigits, ln as $bdb11010cef70236$export$b4cc09c592e8fdb8, lt as $64fa3d84918910a7$export$c245e6201fed2f75, m as DropdownMenuContent, mn as Plus, mt as marked, n as DebouncedInput, nn as $d4ee10de306f2510$export$4282f70798064fe0, nt as $01b77f81d0f07f68$export$75b6ee27786ba447, o as useDebounceControlledState, on as $431fbd86ca7dc216$export$b204af158042fbac, ot as $64fa3d84918910a7$export$29f1550f4b0d4415, p as DropdownMenu, pn as Search, pt as useNonce, q as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4, qt as $313b98861ee5dd6c$export$d6875122194c7b44, r as DebouncedNumberInput, rn as $d4ee10de306f2510$export$cd4e5573fbe2b576, rt as $01b77f81d0f07f68$export$b04be29aa201d4f5, s as useDebouncedCallback, sn as $431fbd86ca7dc216$export$f21a1ffae260145a, st as $64fa3d84918910a7$export$4d86445c2cf5e3, t as BulkEdit, tn as $3ef42575df84b30b$export$9d1611c77c2fe928, tt as $d2b4bc8c273e7be6$export$353f5b6fc5456de1, u as prettyEngineeringNumber, un as $bdb11010cef70236$export$f680877a34711e37, ut as $64fa3d84918910a7$export$c62b8e45d58ddad9, v as DropdownMenuPortal, vt as $e93e671b31057976$export$b8473d3665f3a75a, w as Anchor2, wt as $319e236875307eab$export$a9b970dcc4ae71a9, x as DropdownMenuSubContent, xt as $e5be200c675c3b3a$export$aca958c65c314e6c, y as DropdownMenuSeparator, yt as $e5be200c675c3b3a$export$75ee7c75d68f5b0e, z as SubTrigger, zt as $9446cca9a3875146$export$7d15b64cf5a3a4c4 } from "./types-BtvDfOR-.js";
14
+ import { S as CircleQuestionMark, _ as isUrl, a as AlertTitle, b as Deferred, c as constructFrom, d as millisecondsInMinute, f as millisecondsInSecond, g as appendQueryParams, h as getRuntimeManager, i as AlertDescription, l as millisecondsInDay, m as asRemoteURL, n as arrow, o as isValid$1, p as millisecondsInWeek, r as Alert, s as toDate, t as useDeepCompareMemoize, u as millisecondsInHour, v as require_cuid2, x as isWasm, y as waitForConnectionOpen } from "./useDeepCompareMemoize-Ci6rXZ_K.js";
15
15
  import { n as clsx_default } from "./clsx-D2KVTYnW.js";
16
- import { a as cva, c as useComposedRefs, l as Events, n as buttonVariants, o as useEventListener, r as Slot$1, s as composeRefs, t as Button, u as cn } from "./button-BlF-78eJ.js";
16
+ import { a as cva, c as useComposedRefs, l as Events, n as buttonVariants, o as useEventListener, r as Slot$1, s as composeRefs, t as Button, u as cn } from "./button-D6ZIdUA3.js";
17
17
  import { c as Functions, i as parseShortcut, l as throwNotImplemented, o as Objects, r as isPlatformMac, s as Logger, t as NOT_SET } from "./hotkeys-C4e3s3sJ.js";
18
18
  import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
19
19
  import { t as require_react_dom } from "./react-dom-DJW8xUDg.js";
20
- import { a as Portal$3, c as prettyError, d as TooltipPortal, f as TooltipProvider, h as TooltipProvider$1, i as Overlay, l as Tooltip, m as TooltipTrigger, n as ErrorBanner, o as Root$7, p as TooltipRoot, r as Content$4, s as CellNotInitializedError, t as Banner, u as TooltipContent } from "./error-banner-UH0Nxilf.js";
21
- import { a as _extends$5, c as setDiagnostics, d as CopyClipboardIcon, i as minimalSetup, l as historyField, o as forEachDiagnostic, r as esm_default, s as linter, t as langs, u as insertTab } from "./esm-D197NGQX.js";
20
+ import { a as Portal$3, c as prettyError, d as TooltipPortal, f as TooltipProvider, h as TooltipProvider$1, i as Overlay, l as Tooltip, m as TooltipTrigger, n as ErrorBanner, o as Root$7, p as TooltipRoot, r as Content$4, s as CellNotInitializedError, t as Banner, u as TooltipContent } from "./error-banner-BhqH4mGj.js";
21
+ import { a as _extends$5, c as setDiagnostics, d as CopyClipboardIcon, i as minimalSetup, l as historyField, o as forEachDiagnostic, r as esm_default, s as linter, t as langs, u as insertTab } from "./esm-DOBJQbuy.js";
22
22
  import { t as purify } from "./purify.es-Brw-U87Q.js";
23
23
  import { C as buildStore, _ as useAtom, a as getResolvedMarimoConfig, b as useStore, c as AppConfigSchema, d as useJotaiEffect, g as Provider, h as useEvent_default, i as autoInstantiateAtom, l as createDeepEqualAtom, m as isEqual_default, n as useTheme, o as localeAtom, p as isIslands, r as aiEnabledAtom, s as useResolvedMarimoConfig, t as resolvedThemeAtom, u as store, v as useAtomValue, w as getBuildingBlocks, x as atom, y as useSetAtom } from "./useTheme-DdLjooMf.js";
24
24
  import { $ as ViewPlugin, At as RangeSet, B as tags$1, Dt as Facet$1, E as getIndentUnit, Et as EditorState, Ft as Text$2, I as syntaxTree, It as Transaction, J as parseMixed, L as unfoldAll, Nt as StateEffect, Pt as StateField, Q as GutterMarker, S as foldInside, Tt as EditorSelection, Y as Decoration, Z as EditorView, _t as showPanel, b as foldAll, bt as Annotation, dt as keymap, et as WidgetType, f as StreamLanguage, kt as Prec, l as LanguageDescription, mt as placeholder, ot as gutter, u as LanguageSupport, ut as hoverTooltip, vt as showTooltip, w as foldNodeProp, wt as Compartment } from "./dist-D7jHtwN8.js";
@@ -5940,35 +5940,34 @@ let __tla = Promise.all([
5940
5940
  }
5941
5941
  var import_react = __toESM(require_react(), 1);
5942
5942
  function $4f58c5f72bcf79f7$export$496315a1608d9602(e, r) {
5943
- let c = (0, import_react.useRef)(true), d = (0, import_react.useRef)(null);
5943
+ let c = (0, import_react.useRef)(true), d = (0, import_react.useRef)(null), f = $8ae05eaa5c114e9c$export$7f54fc3180508a52(e);
5944
5944
  (0, import_react.useEffect)(() => (c.current = true, () => {
5945
5945
  c.current = false;
5946
5946
  }), []), (0, import_react.useEffect)(() => {
5947
- let f = d.current;
5948
- c.current ? c.current = false : (!f || r.some((e2, r2) => !Object.is(e2, f[r2]))) && e(), d.current = r;
5947
+ let e2 = d.current;
5948
+ c.current ? c.current = false : (!e2 || r.some((r2, c2) => !Object.is(r2, e2[c2]))) && f(), d.current = r;
5949
5949
  }, r);
5950
5950
  }
5951
5951
  function $9daab02d461809db$var$hasResizeObserver() {
5952
5952
  return window.ResizeObserver !== void 0;
5953
5953
  }
5954
5954
  function $9daab02d461809db$export$683480f191c0e3ea(e) {
5955
- let { ref: r, box: c, onResize: d } = e;
5955
+ let { ref: r, box: c, onResize: d } = e, f = $8ae05eaa5c114e9c$export$7f54fc3180508a52(d);
5956
5956
  (0, import_react.useEffect)(() => {
5957
5957
  let e2 = r == null ? void 0 : r.current;
5958
5958
  if (e2) if ($9daab02d461809db$var$hasResizeObserver()) {
5959
5959
  let r2 = new window.ResizeObserver((e3) => {
5960
- e3.length && d();
5960
+ e3.length && f();
5961
5961
  });
5962
5962
  return r2.observe(e2, {
5963
5963
  box: c
5964
5964
  }), () => {
5965
5965
  e2 && r2.unobserve(e2);
5966
5966
  };
5967
- } else return window.addEventListener("resize", d, false), () => {
5968
- window.removeEventListener("resize", d, false);
5967
+ } else return window.addEventListener("resize", f, false), () => {
5968
+ window.removeEventListener("resize", f, false);
5969
5969
  };
5970
5970
  }, [
5971
- d,
5972
5971
  r,
5973
5972
  c
5974
5973
  ]);
@@ -6028,11 +6027,8 @@ let __tla = Promise.all([
6028
6027
  };
6029
6028
  }
6030
6029
  function $2f04cbc44ee30ce0$export$53a0910f038337bd(e, r) {
6031
- let c = $2f04cbc44ee30ce0$var$relativeOffset(e, r, "left"), d = $2f04cbc44ee30ce0$var$relativeOffset(e, r, "top"), f = r.offsetWidth, h = r.offsetHeight, _ = e.scrollLeft, v = e.scrollTop, { borderTopWidth: y, borderLeftWidth: S, scrollPaddingTop: w, scrollPaddingRight: E, scrollPaddingBottom: O, scrollPaddingLeft: M } = getComputedStyle(e), { scrollMarginTop: I, scrollMarginRight: z, scrollMarginBottom: G, scrollMarginLeft: q } = getComputedStyle(r), LY = _ + parseInt(S, 10), RY = v + parseInt(y, 10), zY = LY + e.clientWidth, BY = RY + e.clientHeight, VY = parseInt(w, 10) || 0, HY = parseInt(O, 10) || 0, UY = parseInt(E, 10) || 0, WY = parseInt(M, 10) || 0, GY = parseInt(I, 10) || 0, KY = parseInt(G, 10) || 0, qY = parseInt(z, 10) || 0, JY = c - (parseInt(q, 10) || 0), YY = c + f + qY, XY = d - GY, ZY = d + h + KY, QY = _ + parseInt(S, 10) + WY, $Y = zY - UY, eX = v + parseInt(y, 10) + VY, tX = BY - HY;
6032
- (JY > QY || YY < $Y) && (JY <= _ + WY ? _ = JY - parseInt(S, 10) - WY : YY > zY - UY && (_ += YY - zY + UY)), (XY > eX || ZY < tX) && (XY <= RY + VY ? v = XY - parseInt(y, 10) - VY : ZY > BY - HY && (v += ZY - BY + HY)), e.scrollTo({
6033
- left: _,
6034
- top: v
6035
- });
6030
+ let c = $2f04cbc44ee30ce0$var$relativeOffset(e, r, "left"), d = $2f04cbc44ee30ce0$var$relativeOffset(e, r, "top"), f = r.offsetWidth, h = r.offsetHeight, _ = e.scrollLeft, v = e.scrollTop, { borderTopWidth: y, borderLeftWidth: S, scrollPaddingTop: w, scrollPaddingRight: E, scrollPaddingBottom: O, scrollPaddingLeft: M } = getComputedStyle(e), I = _ + parseInt(S, 10), z = v + parseInt(y, 10), G = I + e.clientWidth, q = z + e.clientHeight, LY = parseInt(w, 10) || 0, RY = parseInt(O, 10) || 0, zY = parseInt(E, 10) || 0, BY = parseInt(M, 10) || 0;
6031
+ c <= _ + BY ? _ = c - parseInt(S, 10) - BY : c + f > G - zY && (_ += c + f - G + zY), d <= z + LY ? v = d - parseInt(y, 10) - LY : d + h > q - RY && (v += d + h - q + RY), e.scrollLeft = _, e.scrollTop = v;
6036
6032
  }
6037
6033
  function $2f04cbc44ee30ce0$var$relativeOffset(e, r, c) {
6038
6034
  let d = c === "left" ? "offsetLeft" : "offsetTop", f = 0;
@@ -6047,15 +6043,19 @@ let __tla = Promise.all([
6047
6043
  }
6048
6044
  function $2f04cbc44ee30ce0$export$c826860796309d1b(e, r) {
6049
6045
  if (e && document.contains(e)) {
6050
- let _ = document.scrollingElement || document.documentElement;
6051
- if (window.getComputedStyle(_).overflow !== "hidden" && !$c87311424ea30a05$export$6446a186d09e379e()) {
6046
+ let _ = document.scrollingElement || document.documentElement, v = window.getComputedStyle(_).overflow === "hidden";
6047
+ if (v) {
6048
+ let r2 = $a40c673dc9f6d9c7$export$94ed1c92c7beeb22(e);
6049
+ v || r2.push(_);
6050
+ for (let c2 of r2) $2f04cbc44ee30ce0$export$53a0910f038337bd(c2, e);
6051
+ } else {
6052
6052
  var c;
6053
- let { left: _2, top: v } = e.getBoundingClientRect();
6053
+ let { left: _2, top: v2 } = e.getBoundingClientRect();
6054
6054
  e == null || (c = e.scrollIntoView) == null || c.call(e, {
6055
6055
  block: "nearest"
6056
6056
  });
6057
6057
  let { left: y, top: S } = e.getBoundingClientRect();
6058
- if (Math.abs(_2 - y) > 1 || Math.abs(v - S) > 1) {
6058
+ if (Math.abs(_2 - y) > 1 || Math.abs(v2 - S) > 1) {
6059
6059
  var d, f, h;
6060
6060
  r == null || (f = r.containingElement) == null || (d = f.scrollIntoView) == null || d.call(f, {
6061
6061
  block: "center",
@@ -6064,9 +6064,6 @@ let __tla = Promise.all([
6064
6064
  block: "nearest"
6065
6065
  });
6066
6066
  }
6067
- } else {
6068
- let r2 = $a40c673dc9f6d9c7$export$94ed1c92c7beeb22(e);
6069
- for (let c2 of r2) $2f04cbc44ee30ce0$export$53a0910f038337bd(c2, e);
6070
6067
  }
6071
6068
  }
6072
6069
  }
@@ -6156,9 +6153,7 @@ let __tla = Promise.all([
6156
6153
  }
6157
6154
  }, [
6158
6155
  r,
6159
- d,
6160
- _,
6161
- v
6156
+ d
6162
6157
  ]);
6163
6158
  }
6164
6159
  function $e0b6e0b68ec7f50f$var$isValidEvent(e, r) {
@@ -9070,21 +9065,21 @@ let __tla = Promise.all([
9070
9065
  }, $edcf132a9284368a$var$TOTAL_SIZE = {
9071
9066
  width: "totalWidth",
9072
9067
  height: "totalHeight"
9073
- }, $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE = {}, $edcf132a9284368a$var$visualViewport = typeof document < "u" ? window.visualViewport : null;
9074
- function $edcf132a9284368a$var$getContainerDimensions(e) {
9075
- let r = 0, c = 0, d = 0, f = 0, h = 0, _ = 0, v = {}, y = (($edcf132a9284368a$var$visualViewport == null ? void 0 : $edcf132a9284368a$var$visualViewport.scale) ?? 1) > 1;
9076
- if (e.tagName === "BODY") {
9077
- let y2 = document.documentElement;
9078
- d = y2.clientWidth, f = y2.clientHeight, r = ($edcf132a9284368a$var$visualViewport == null ? void 0 : $edcf132a9284368a$var$visualViewport.width) ?? d, c = ($edcf132a9284368a$var$visualViewport == null ? void 0 : $edcf132a9284368a$var$visualViewport.height) ?? f, v.top = y2.scrollTop || e.scrollTop, v.left = y2.scrollLeft || e.scrollLeft, $edcf132a9284368a$var$visualViewport && (h = $edcf132a9284368a$var$visualViewport.offsetTop, _ = $edcf132a9284368a$var$visualViewport.offsetLeft);
9079
- } else ({ width: r, height: c, top: h, left: _ } = $edcf132a9284368a$var$getOffset(e, false)), v.top = e.scrollTop, v.left = e.scrollLeft, d = r, f = c;
9080
- return $c87311424ea30a05$export$78551043582a6a98() && (e.tagName === "BODY" || e.tagName === "HTML") && y && (v.top = 0, v.left = 0, h = ($edcf132a9284368a$var$visualViewport == null ? void 0 : $edcf132a9284368a$var$visualViewport.pageTop) ?? 0, _ = ($edcf132a9284368a$var$visualViewport == null ? void 0 : $edcf132a9284368a$var$visualViewport.pageLeft) ?? 0), {
9081
- width: r,
9082
- height: c,
9083
- totalWidth: d,
9084
- totalHeight: f,
9085
- scroll: v,
9086
- top: h,
9087
- left: _
9068
+ }, $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE = {}, $edcf132a9284368a$var$getVisualViewport = () => typeof document < "u" ? window.visualViewport : null;
9069
+ function $edcf132a9284368a$var$getContainerDimensions(e, r) {
9070
+ let c = 0, d = 0, f = 0, h = 0, _ = 0, v = 0, y = {}, S = ((r == null ? void 0 : r.scale) ?? 1) > 1;
9071
+ if (e.tagName === "BODY" || e.tagName === "HTML") {
9072
+ let S2 = document.documentElement;
9073
+ f = S2.clientWidth, h = S2.clientHeight, c = (r == null ? void 0 : r.width) ?? f, d = (r == null ? void 0 : r.height) ?? h, y.top = S2.scrollTop || e.scrollTop, y.left = S2.scrollLeft || e.scrollLeft, r && (_ = r.offsetTop, v = r.offsetLeft);
9074
+ } else ({ width: c, height: d, top: _, left: v } = $edcf132a9284368a$var$getOffset(e, false)), y.top = e.scrollTop, y.left = e.scrollLeft, f = c, h = d;
9075
+ return $c87311424ea30a05$export$78551043582a6a98() && (e.tagName === "BODY" || e.tagName === "HTML") && S && (y.top = 0, y.left = 0, _ = (r == null ? void 0 : r.pageTop) ?? 0, v = (r == null ? void 0 : r.pageLeft) ?? 0), {
9076
+ width: c,
9077
+ height: d,
9078
+ totalWidth: f,
9079
+ totalHeight: h,
9080
+ scroll: y,
9081
+ top: _,
9082
+ left: v
9088
9083
  };
9089
9084
  }
9090
9085
  function $edcf132a9284368a$var$getScroll(e) {
@@ -9096,7 +9091,7 @@ let __tla = Promise.all([
9096
9091
  };
9097
9092
  }
9098
9093
  function $edcf132a9284368a$var$getDelta(e, r, c, d, f, h, _) {
9099
- let v = f.scroll[e] ?? 0, y = d[$edcf132a9284368a$var$AXIS_SIZE[e]], S = d.scroll[$edcf132a9284368a$var$AXIS[e]] + h, w = y + d.scroll[$edcf132a9284368a$var$AXIS[e]] - h, E = r - v + _[e] - d[$edcf132a9284368a$var$AXIS[e]], O = r - v + c + _[e] - d[$edcf132a9284368a$var$AXIS[e]];
9094
+ let v = f.scroll[e] ?? 0, y = d[$edcf132a9284368a$var$AXIS_SIZE[e]], S = _[e] + d.scroll[$edcf132a9284368a$var$AXIS[e]] + h, w = _[e] + d.scroll[$edcf132a9284368a$var$AXIS[e]] + y - h, E = r - v + d.scroll[$edcf132a9284368a$var$AXIS[e]] + _[e] - d[$edcf132a9284368a$var$AXIS[e]], O = r - v + c + d.scroll[$edcf132a9284368a$var$AXIS[e]] + _[e] - d[$edcf132a9284368a$var$AXIS[e]];
9100
9095
  return E < S ? S - E : O > w ? Math.max(w - O, S - E) : 0;
9101
9096
  }
9102
9097
  function $edcf132a9284368a$var$getMargins(e) {
@@ -9122,61 +9117,62 @@ let __tla = Promise.all([
9122
9117
  crossSize: _
9123
9118
  }, $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE[e];
9124
9119
  }
9125
- function $edcf132a9284368a$var$computePosition(e, r, c, d, f, h, _, v, y, S) {
9126
- let { placement: w, crossPlacement: E, axis: O, crossAxis: M, size: I, crossSize: z } = d, G = {};
9127
- G[M] = e[M] ?? 0, E === "center" ? G[M] += ((e[z] ?? 0) - (c[z] ?? 0)) / 2 : E !== M && (G[M] += (e[z] ?? 0) - (c[z] ?? 0)), G[M] += h;
9128
- let q = e[M] - c[z] + y + S, LY = e[M] + e[z] - y - S;
9129
- if (G[M] = $9446cca9a3875146$export$7d15b64cf5a3a4c4(G[M], q, LY), w === O) {
9130
- let c2 = v ? _[I] : r[$edcf132a9284368a$var$TOTAL_SIZE[I]];
9131
- G[$edcf132a9284368a$var$FLIPPED_DIRECTION[O]] = Math.floor(c2 - e[O] + f);
9132
- } else G[O] = Math.floor(e[O] + e[I] + f);
9133
- return G;
9134
- }
9135
- function $edcf132a9284368a$var$getMaxHeight(e, r, c, d, f, h, _, v) {
9136
- let y = d ? c.height : r[$edcf132a9284368a$var$TOTAL_SIZE.height], S = e.top == null ? c.top + (y - (e.bottom ?? 0) - _) : c.top + e.top, w = v === "top" ? Math.max(0, S + _ - (r.top + (r.scroll.top ?? 0)) - ((f.top ?? 0) + (f.bottom ?? 0) + h)) : Math.max(0, r.height + r.top + (r.scroll.top ?? 0) - S - ((f.top ?? 0) + (f.bottom ?? 0) + h));
9137
- return Math.min(r.height - h * 2, w);
9138
- }
9139
- function $edcf132a9284368a$var$getAvailableSpace(e, r, c, d, f, h) {
9140
- let { placement: _, axis: v, size: y } = h;
9141
- return _ === v ? Math.max(0, c[v] - e[v] - (e.scroll[v] ?? 0) + r[v] - (d[v] ?? 0) - d[$edcf132a9284368a$var$FLIPPED_DIRECTION[v]] - f) : Math.max(0, e[y] + e[v] + e.scroll[v] - r[v] - c[v] - c[y] - (d[v] ?? 0) - d[$edcf132a9284368a$var$FLIPPED_DIRECTION[v]] - f);
9142
- }
9143
- function $edcf132a9284368a$export$6839422d1f33cee9(e, r, c, d, f, h, _, v, y, S, w, E, O, M, I, z) {
9144
- let G = $edcf132a9284368a$var$parsePlacement(e), { size: q, crossAxis: LY, crossSize: RY, placement: zY, crossPlacement: BY } = G, VY = $edcf132a9284368a$var$computePosition(r, v, c, G, w, E, S, O, I, z), HY = w, UY = $edcf132a9284368a$var$getAvailableSpace(v, S, r, f, h + w, G);
9145
- if (_ && d[q] > UY) {
9146
- let e2 = $edcf132a9284368a$var$parsePlacement(`${$edcf132a9284368a$var$FLIPPED_DIRECTION[zY]} ${BY}`), d2 = $edcf132a9284368a$var$computePosition(r, v, c, e2, w, E, S, O, I, z);
9147
- $edcf132a9284368a$var$getAvailableSpace(v, S, r, f, h + w, e2) > UY && (G = e2, VY = d2, HY = w);
9148
- }
9149
- let WY = "bottom";
9150
- G.axis === "top" ? G.placement === "top" ? WY = "top" : G.placement === "bottom" && (WY = "bottom") : G.crossAxis === "top" && (G.crossPlacement === "top" ? WY = "bottom" : G.crossPlacement === "bottom" && (WY = "top"));
9151
- let GY = $edcf132a9284368a$var$getDelta(LY, VY[LY], c[RY], v, y, h, S);
9152
- VY[LY] += GY;
9153
- let KY = $edcf132a9284368a$var$getMaxHeight(VY, v, S, O, f, h, c.height, WY);
9154
- M && M < KY && (KY = M), c.height = Math.min(c.height, KY), VY = $edcf132a9284368a$var$computePosition(r, v, c, G, HY, E, S, O, I, z), GY = $edcf132a9284368a$var$getDelta(LY, VY[LY], c[RY], v, y, h, S), VY[LY] += GY;
9155
- let qY = {}, JY = r[LY] - VY[LY] - f[$edcf132a9284368a$var$AXIS[LY]], YY = JY + 0.5 * r[RY], XY = I / 2 + z, ZY = $edcf132a9284368a$var$AXIS[LY] === "left" ? (f.left ?? 0) + (f.right ?? 0) : (f.top ?? 0) + (f.bottom ?? 0), QY = c[RY] - ZY - I / 2 - z;
9156
- qY[LY] = $9446cca9a3875146$export$7d15b64cf5a3a4c4($9446cca9a3875146$export$7d15b64cf5a3a4c4(YY, r[LY] + I / 2 - (VY[LY] + f[$edcf132a9284368a$var$AXIS[LY]]), r[LY] + r[RY] - I / 2 - (VY[LY] + f[$edcf132a9284368a$var$AXIS[LY]])), XY, QY), { placement: zY, crossPlacement: BY } = G, I ? JY = qY[LY] : BY === "right" ? JY += r[RY] : BY === "center" && (JY += r[RY] / 2);
9157
- let $Y = zY === "left" || zY === "top" ? c[q] : 0, eX = {
9158
- x: zY === "top" || zY === "bottom" ? JY : $Y,
9159
- y: zY === "left" || zY === "right" ? JY : $Y
9120
+ function $edcf132a9284368a$var$computePosition(e, r, c, d, f, h, _, v, y, S, w) {
9121
+ let { placement: E, crossPlacement: O, axis: M, crossAxis: I, size: z, crossSize: G } = d, q = {};
9122
+ q[I] = e[I] ?? 0, O === "center" ? q[I] += ((e[G] ?? 0) - (c[G] ?? 0)) / 2 : O !== I && (q[I] += (e[G] ?? 0) - (c[G] ?? 0)), q[I] += h;
9123
+ let LY = e[I] - c[G] + y + S, RY = e[I] + e[G] - y - S;
9124
+ if (q[I] = $9446cca9a3875146$export$7d15b64cf5a3a4c4(q[I], LY, RY), E === M) {
9125
+ let r2 = v ? w[z] : w[$edcf132a9284368a$var$TOTAL_SIZE[z]];
9126
+ q[$edcf132a9284368a$var$FLIPPED_DIRECTION[M]] = Math.floor(r2 - e[M] + f);
9127
+ } else q[M] = Math.floor(e[M] + e[z] + f);
9128
+ return q;
9129
+ }
9130
+ function $edcf132a9284368a$var$getMaxHeight(e, r, c, d, f, h, _, v, y, S, w) {
9131
+ let E = (e.top == null ? y[$edcf132a9284368a$var$TOTAL_SIZE.height] - (e.bottom ?? 0) - _ : e.top) - (y.scroll.top ?? 0), O = S ? c.top : 0, M = {
9132
+ top: Math.max(r.top + O, ((w == null ? void 0 : w.offsetTop) ?? r.top) + O),
9133
+ bottom: Math.min(r.top + r.height + O, ((w == null ? void 0 : w.offsetTop) ?? 0) + ((w == null ? void 0 : w.height) ?? 0))
9134
+ };
9135
+ return v === "top" ? Math.max(0, E + _ - M.top - ((f.top ?? 0) + (f.bottom ?? 0) + h)) : Math.max(0, M.bottom - E - ((f.top ?? 0) + (f.bottom ?? 0) + h));
9136
+ }
9137
+ function $edcf132a9284368a$var$getAvailableSpace(e, r, c, d, f, h, _, v) {
9138
+ let { placement: y, axis: S, size: w } = h;
9139
+ return y === S ? Math.max(0, c[S] - (_.scroll[S] ?? 0) - (e[S] + (v ? r[S] : 0)) - (d[S] ?? 0) - d[$edcf132a9284368a$var$FLIPPED_DIRECTION[S]] - f) : Math.max(0, e[w] + e[S] + (v ? r[S] : 0) - c[S] - c[w] + (_.scroll[S] ?? 0) - (d[S] ?? 0) - d[$edcf132a9284368a$var$FLIPPED_DIRECTION[S]] - f);
9140
+ }
9141
+ function $edcf132a9284368a$export$6839422d1f33cee9(e, r, c, d, f, h, _, v, y, S, w, E, O, M, I, z, G, q) {
9142
+ let LY = $edcf132a9284368a$var$parsePlacement(e), { size: RY, crossAxis: zY, crossSize: BY, placement: VY, crossPlacement: HY } = LY, UY = $edcf132a9284368a$var$computePosition(r, v, c, LY, w, E, S, O, I, z, y), WY = w, GY = $edcf132a9284368a$var$getAvailableSpace(v, S, r, f, h + w, LY, y, G);
9143
+ if (_ && c[RY] > GY) {
9144
+ let e2 = $edcf132a9284368a$var$parsePlacement(`${$edcf132a9284368a$var$FLIPPED_DIRECTION[VY]} ${HY}`), d2 = $edcf132a9284368a$var$computePosition(r, v, c, e2, w, E, S, O, I, z, y);
9145
+ $edcf132a9284368a$var$getAvailableSpace(v, S, r, f, h + w, e2, y, G) > GY && (LY = e2, UY = d2, WY = w);
9146
+ }
9147
+ let KY = "bottom";
9148
+ LY.axis === "top" ? LY.placement === "top" ? KY = "top" : LY.placement === "bottom" && (KY = "bottom") : LY.crossAxis === "top" && (LY.crossPlacement === "top" ? KY = "bottom" : LY.crossPlacement === "bottom" && (KY = "top"));
9149
+ let qY = $edcf132a9284368a$var$getDelta(zY, UY[zY], c[BY], v, y, h, S);
9150
+ UY[zY] += qY;
9151
+ let JY = $edcf132a9284368a$var$getMaxHeight(UY, v, S, O, f, h, c.height, KY, y, G, q);
9152
+ M && M < JY && (JY = M), c.height = Math.min(c.height, JY), UY = $edcf132a9284368a$var$computePosition(r, v, c, LY, WY, E, S, O, I, z, y), qY = $edcf132a9284368a$var$getDelta(zY, UY[zY], c[BY], v, y, h, S), UY[zY] += qY;
9153
+ let YY = {}, XY = r[zY] - UY[zY] - f[$edcf132a9284368a$var$AXIS[zY]], ZY = XY + 0.5 * r[BY], QY = I / 2 + z, $Y = $edcf132a9284368a$var$AXIS[zY] === "left" ? (f.left ?? 0) + (f.right ?? 0) : (f.top ?? 0) + (f.bottom ?? 0), eX = c[BY] - $Y - I / 2 - z;
9154
+ YY[zY] = $9446cca9a3875146$export$7d15b64cf5a3a4c4($9446cca9a3875146$export$7d15b64cf5a3a4c4(ZY, r[zY] + I / 2 - (UY[zY] + f[$edcf132a9284368a$var$AXIS[zY]]), r[zY] + r[BY] - I / 2 - (UY[zY] + f[$edcf132a9284368a$var$AXIS[zY]])), QY, eX), { placement: VY, crossPlacement: HY } = LY, I ? XY = YY[zY] : HY === "right" ? XY += r[BY] : HY === "center" && (XY += r[BY] / 2);
9155
+ let tX = VY === "left" || VY === "top" ? c[RY] : 0, nX = {
9156
+ x: VY === "top" || VY === "bottom" ? XY : tX,
9157
+ y: VY === "left" || VY === "right" ? XY : tX
9160
9158
  };
9161
9159
  return {
9162
- position: VY,
9163
- maxHeight: KY,
9164
- arrowOffsetLeft: qY.left,
9165
- arrowOffsetTop: qY.top,
9166
- placement: zY,
9167
- triggerAnchorPoint: eX
9160
+ position: UY,
9161
+ maxHeight: JY,
9162
+ arrowOffsetLeft: YY.left,
9163
+ arrowOffsetTop: YY.top,
9164
+ placement: VY,
9165
+ triggerAnchorPoint: nX
9168
9166
  };
9169
9167
  }
9170
9168
  function $edcf132a9284368a$export$b3ceb0cbf1056d98(e) {
9171
- let { placement: r, targetNode: c, overlayNode: d, scrollNode: f, padding: h, shouldFlip: _, boundaryElement: v, offset: y, crossOffset: S, maxHeight: w, arrowSize: E = 0, arrowBoundaryOffset: O = 0 } = e, M = d instanceof HTMLElement ? $edcf132a9284368a$var$getContainingBlock(d) : document.documentElement, I = M === document.documentElement, z = window.getComputedStyle(M).position, G = !!z && z !== "static", q = I ? $edcf132a9284368a$var$getOffset(c, false) : $edcf132a9284368a$var$getPosition(c, M, false);
9172
- if (!I) {
9169
+ let { placement: r, targetNode: c, overlayNode: d, scrollNode: f, padding: h, shouldFlip: _, boundaryElement: v, offset: y, crossOffset: S, maxHeight: w, arrowSize: E = 0, arrowBoundaryOffset: O = 0 } = e, M = $edcf132a9284368a$var$getVisualViewport(), I = d instanceof HTMLElement ? $edcf132a9284368a$var$getContainingBlock(d) : document.documentElement, z = I === document.documentElement, G = window.getComputedStyle(I).position, q = !!G && G !== "static", LY = z ? $edcf132a9284368a$var$getOffset(c, false) : $edcf132a9284368a$var$getPosition(c, I, false);
9170
+ if (!z) {
9173
9171
  let { marginTop: e2, marginLeft: r2 } = window.getComputedStyle(c);
9174
- q.top += parseInt(e2, 10) || 0, q.left += parseInt(r2, 10) || 0;
9172
+ LY.top += parseInt(e2, 10) || 0, LY.left += parseInt(r2, 10) || 0;
9175
9173
  }
9176
- let LY = $edcf132a9284368a$var$getOffset(d, true), RY = $edcf132a9284368a$var$getMargins(d);
9177
- LY.width += (RY.left ?? 0) + (RY.right ?? 0), LY.height += (RY.top ?? 0) + (RY.bottom ?? 0);
9178
- let zY = $edcf132a9284368a$var$getScroll(f), BY = $edcf132a9284368a$var$getContainerDimensions(v), VY = $edcf132a9284368a$var$getContainerDimensions(M), HY = v.tagName === "BODY" ? $edcf132a9284368a$var$getOffset(M, false) : $edcf132a9284368a$var$getPosition(M, v, false);
9179
- return M.tagName === "HTML" && v.tagName === "BODY" && (VY.scroll.top = 0, VY.scroll.left = 0), $edcf132a9284368a$export$6839422d1f33cee9(r, q, LY, zY, RY, h, _, BY, VY, HY, y, S, G, w, E, O);
9174
+ let RY = $edcf132a9284368a$var$getOffset(d, true), zY = $edcf132a9284368a$var$getMargins(d);
9175
+ return RY.width += (zY.left ?? 0) + (zY.right ?? 0), RY.height += (zY.top ?? 0) + (zY.bottom ?? 0), $edcf132a9284368a$export$6839422d1f33cee9(r, LY, RY, $edcf132a9284368a$var$getScroll(f), zY, h, _, $edcf132a9284368a$var$getContainerDimensions(v, M), $edcf132a9284368a$var$getContainerDimensions(I, M), $edcf132a9284368a$var$getPosition(v, I, false), y, S, q, w, E, O, v.contains(I), M);
9180
9176
  }
9181
9177
  function $edcf132a9284368a$export$4b834cebd9e5cebe(e, r) {
9182
9178
  let { top: c, left: d, width: f, height: h } = e.getBoundingClientRect();
@@ -18583,11 +18579,9 @@ ${JSON.stringify(e2, null, 4)}`);
18583
18579
  }
18584
18580
  ])), f.hoverEnabled && h.push(hoverTooltip((e2, c2) => r == null ? null : r.requestHoverTooltip(e2, offsetToPos(e2.state.doc, c2)), e.hoverConfig)), f.signatureHelpEnabled) {
18585
18581
  h.push(signatureHelpTooltipField);
18586
- let e2 = (e3) => {
18587
- e3.state.field(signatureHelpTooltipField) && e3.dispatch({
18588
- effects: setSignatureHelpTooltip.of(null)
18589
- });
18590
- };
18582
+ let e2 = (e3) => e3.state.field(signatureHelpTooltipField) ? (e3.dispatch({
18583
+ effects: setSignatureHelpTooltip.of(null)
18584
+ }), true) : false;
18591
18585
  h.push(EditorView.domEventHandlers({
18592
18586
  mousedown: (r2, c2) => (e2(c2), false)
18593
18587
  })), h.push(keymap.of([
@@ -18597,7 +18591,7 @@ ${JSON.stringify(e2, null, 4)}`);
18597
18591
  },
18598
18592
  {
18599
18593
  key: "Escape",
18600
- run: (r2) => (e2(r2), true)
18594
+ run: (r2) => e2(r2)
18601
18595
  }
18602
18596
  ])), h.push(EditorView.updateListener.of((c2) => {
18603
18597
  if (!(r && f.signatureActivateOnTyping) || !c2.state.field(signatureHelpTooltipField) || !(c2.selectionSet || c2.docChanged)) return;
@@ -30382,7 +30376,7 @@ ${c.sqlString}
30382
30376
  });
30383
30377
  return c;
30384
30378
  }
30385
- }), import_Transport = require_Transport();
30379
+ });
30386
30380
  function adaptForLocalStorage(e) {
30387
30381
  let r = e.storage || availableStorage;
30388
30382
  return {
@@ -30632,6 +30626,33 @@ ${c.sqlString}
30632
30626
  const documentationAtom = atom({
30633
30627
  documentation: null
30634
30628
  });
30629
+ var reactiveVariableDecoration = Decoration.mark({
30630
+ class: "mo-cm-reactive-reference"
30631
+ });
30632
+ Decoration.mark({
30633
+ class: "mo-cm-reactive-reference-hover"
30634
+ });
30635
+ var updateReactiveVariables = StateEffect.define();
30636
+ const reactiveReferencesField = StateField.define({
30637
+ create() {
30638
+ return {
30639
+ decorations: Decoration.none,
30640
+ ranges: []
30641
+ };
30642
+ },
30643
+ update(e, r) {
30644
+ let c = {
30645
+ decorations: e.decorations.map(r.changes),
30646
+ ranges: e.ranges
30647
+ };
30648
+ for (let e2 of r.effects) e2.is(updateReactiveVariables) && (c = {
30649
+ decorations: Decoration.set(e2.value.map((e3) => reactiveVariableDecoration.range(e3.from, e3.to))),
30650
+ ranges: e2.value
30651
+ });
30652
+ return c;
30653
+ },
30654
+ provide: (e) => EditorView.decorations.from(e, (e2) => e2.decorations)
30655
+ });
30635
30656
  function generateUUID() {
30636
30657
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replaceAll(/[xy]/g, (e) => {
30637
30658
  let r = Math.trunc(Math.random() * 16);
@@ -30725,6 +30746,63 @@ ${c.sqlString}
30725
30746
  if (r) return e.find((e2) => e2.name === r);
30726
30747
  }
30727
30748
  }
30749
+ async function requestDocumentation({ view: e, pos: r, excludeTypes: c }) {
30750
+ var _a2;
30751
+ let d = HTMLCellId.findElement(e.dom);
30752
+ if (!d) return Logger.error("Failed to find active cell."), null;
30753
+ let f = HTMLCellId.parse(d.id), { startToken: h, endToken: _ } = getPositionAtWordBounds(e.state.doc, r), v = ((_a2 = e.state.field(reactiveReferencesField, false)) == null ? void 0 : _a2.ranges.some((e2) => r >= e2.from && r <= e2.to)) ?? false, y = await AUTOCOMPLETER.request({
30754
+ document: e.state.doc.slice(0, _).toString(),
30755
+ cellId: f
30756
+ });
30757
+ if (!y) return "cancelled";
30758
+ let S = e.state.doc.slice(h, _).toString();
30759
+ return Autocompleter.asHoverTooltip({
30760
+ position: _,
30761
+ message: y,
30762
+ exactName: S,
30763
+ excludeTypes: c,
30764
+ showGoToDefinitionHint: v
30765
+ }) ?? null;
30766
+ }
30767
+ function getPositionAtWordBounds(e, r) {
30768
+ let c = r, d = c > 0 ? e.sliceString(c - 1, c) : "", f = c < e.length ? e.sliceString(c, c + 1) : "";
30769
+ d === "(" && f === ")" && --c;
30770
+ let h = c, _ = c;
30771
+ for (; h > 0; ) {
30772
+ let r2 = e.sliceString(h - 1, h);
30773
+ if (!/\w/.test(r2)) break;
30774
+ h--;
30775
+ }
30776
+ for (; _ < e.length; ) {
30777
+ let r2 = e.sliceString(_, _ + 1);
30778
+ if (!/\w/.test(r2)) break;
30779
+ _++;
30780
+ }
30781
+ return {
30782
+ startToken: h,
30783
+ endToken: _
30784
+ };
30785
+ }
30786
+ function isCursorInText(e) {
30787
+ let { head: r } = e.selection.main, c = e.doc.sliceString(r - 1, r);
30788
+ return /\w/.test(c);
30789
+ }
30790
+ var debouncedAutocomplete = debounce_default(async (e, r) => {
30791
+ if (store.get(chromeAtom).selectedPanel !== "documentation") return;
30792
+ let c = await requestDocumentation({
30793
+ view: e,
30794
+ pos: r
30795
+ });
30796
+ c !== "cancelled" && store.set(documentationAtom, {
30797
+ documentation: (c == null ? void 0 : c.html) ?? null
30798
+ });
30799
+ }, 300);
30800
+ EditorView.updateListener.of((e) => {
30801
+ if (e.selectionSet && isCursorInText(e.state)) {
30802
+ let r = e.state.selection.main.head;
30803
+ debouncedAutocomplete(e.view, r);
30804
+ }
30805
+ });
30728
30806
  function goToPosition(e, r) {
30729
30807
  e.focus(), requestAnimationFrame(() => {
30730
30808
  e.dispatch({
@@ -32257,6 +32335,9 @@ ${c.sqlString}
32257
32335
  function isClientWithNotify(e) {
32258
32336
  return "notify" in e;
32259
32337
  }
32338
+ function isPrivateVariable(e) {
32339
+ return e.startsWith("_") && !e.startsWith("__");
32340
+ }
32260
32341
  var Snapshotter = class {
32261
32342
  constructor(e) {
32262
32343
  __publicField(this, "documentVersion", 0);
@@ -32457,10 +32538,15 @@ ${c.sqlString}
32457
32538
  let y = d.getEditsForNewText(v.newText), S = new Map(y.map((e2) => [
32458
32539
  e2.cellId,
32459
32540
  e2.text
32460
- ])), w = this.getNotebookEditors();
32541
+ ])), w = this.getNotebookEditors(), E = w[c], O = false;
32542
+ if (E) {
32543
+ let r2 = E.state.doc.line(e.position.line + 1).from + e.position.character, { startToken: c2, endToken: d2 } = getPositionAtWordBounds(E.state.doc, r2), f2 = E.state.doc.sliceString(c2, d2);
32544
+ O = isPrivateVariable(f2), O && Logger.debug("[lsp] Private variable rename detected, limiting to current cell", f2);
32545
+ }
32461
32546
  for (let [e2, r2] of Objects.entries(w)) {
32462
- let c2 = S.get(e2);
32463
- if (c2 == null) {
32547
+ if (O && e2 !== c) continue;
32548
+ let d2 = S.get(e2);
32549
+ if (d2 == null) {
32464
32550
  Logger.warn("No new code for cell", e2);
32465
32551
  continue;
32466
32552
  }
@@ -32468,7 +32554,7 @@ ${c.sqlString}
32468
32554
  Logger.warn("No view for plugin", e2);
32469
32555
  continue;
32470
32556
  }
32471
- getEditorCodeAsPython(r2) !== c2 && updateEditorCodeFromPython(r2, c2);
32557
+ getEditorCodeAsPython(r2) !== d2 && updateEditorCodeFromPython(r2, d2);
32472
32558
  }
32473
32559
  return {
32474
32560
  ...h,
@@ -32571,7 +32657,7 @@ ${c.sqlString}
32571
32657
  };
32572
32658
  this.client.processNotification = c;
32573
32659
  }
32574
- }, __publicField(_a, "SEEN_CELL_DOCUMENT_URIS", /* @__PURE__ */ new Set()), _a), import_build = require_build(), ReconnectingWebSocketTransport = class extends import_Transport.Transport {
32660
+ }, __publicField(_a, "SEEN_CELL_DOCUMENT_URIS", /* @__PURE__ */ new Set()), _a), import_build = require_build(), import_Transport = require_Transport(), ReconnectingWebSocketTransport = class extends import_Transport.Transport {
32575
32661
  constructor(e) {
32576
32662
  super();
32577
32663
  __publicField(this, "isClosed", false);
@@ -38970,7 +39056,7 @@ ${c.sqlString}
38970
39056
  Logger.warn("scrollCellIntoView: editor not found", e);
38971
39057
  return;
38972
39058
  }
38973
- if (c2.hasFocus) return;
39059
+ if (c2.hasFocus || !document.hasFocus()) return;
38974
39060
  if (retryWithTimeout(() => (c2.focus(), c2.hasFocus), {
38975
39061
  retries: 5,
38976
39062
  delay: 20
@@ -39803,7 +39889,7 @@ ${c.sqlString}
39803
39889
  },
39804
39890
  addSetupCellIfDoesntExist: (e, r) => {
39805
39891
  let { code: c } = r;
39806
- return c ?? (c = "# Initialization code that runs before all other cells"), e.cellIds.setupCellExists() ? {
39892
+ return e.cellIds.setupCellExists() ? {
39807
39893
  ...e,
39808
39894
  scrollKey: SETUP_CELL_ID
39809
39895
  } : {
@@ -41779,7 +41865,7 @@ ${c.sqlString}
41779
41865
  $d34552a7550967e7$exports = {
41780
41866
  rangeOverflow: (e) => `\uAC12\uC740 ${e.maxValue} \uC774\uC804\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.`,
41781
41867
  rangeReversed: "\uC2DC\uC791\uC77C\uC740 \uC885\uB8CC\uC77C \uC774\uC804\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.",
41782
- rangeUnderflow: (e) => `\uAC12\uC740 ${e.minValue} \uC774\uC0C1\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.`,
41868
+ rangeUnderflow: (e) => `\uAC12\uC740 ${e.minValue} \uC774\uD6C4\uC5EC\uC57C \uD569\uB2C8\uB2E4.`,
41783
41869
  unavailableDate: "\uC120\uD0DD\uD55C \uB0A0\uC9DC\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."
41784
41870
  };
41785
41871
  var $8f855bffe63f6eca$exports = {};
@@ -43180,7 +43266,7 @@ ${c.sqlString}
43180
43266
  ...$3ef42575df84b30b$export$9d1611c77c2fe928(v, h),
43181
43267
  ref: r,
43182
43268
  style: d,
43183
- className: f || "react-aria-CalendarGridHeader"
43269
+ className: f ?? "react-aria-CalendarGridHeader"
43184
43270
  }, import_react.createElement("tr", null, _.map((e2, r2) => import_react.cloneElement(c(e2), {
43185
43271
  key: r2
43186
43272
  }))));
@@ -43206,7 +43292,7 @@ ${c.sqlString}
43206
43292
  ...w,
43207
43293
  ref: r,
43208
43294
  style: d,
43209
- className: f || "react-aria-CalendarGridBody"
43295
+ className: f ?? "react-aria-CalendarGridBody"
43210
43296
  }, [
43211
43297
  ...Array(S).keys()
43212
43298
  ].map((e2) => import_react.createElement("tr", {
@@ -43556,7 +43642,9 @@ ${c.sqlString}
43556
43642
  isDisabled: _.isDisabled
43557
43643
  }, _.segments.map((e2, r2) => (0, import_react.cloneElement)(d(e2), {
43558
43644
  key: r2
43559
- }))), import_react.createElement($3985021b0ad6602f$export$f5b8910cec6cf069, null));
43645
+ }))), import_react.createElement($3985021b0ad6602f$export$f5b8910cec6cf069, {
43646
+ className: ""
43647
+ }));
43560
43648
  }), $40825cdb76e74f70$export$336ab7fa954c4b5f = (0, import_react.forwardRef)(function({ segment: e, ...r }, c) {
43561
43649
  let d = (0, import_react.useContext)($40825cdb76e74f70$export$3b08bebcf796eea0), f = (0, import_react.useContext)($40825cdb76e74f70$export$5d8dc44abd10a920), h = d ?? f, _ = $df56164dff5785e2$export$4338b53315abf666(c), { segmentProps: v } = $32489daedd52963e$export$1315d136e6f7581(e, h, _), { focusProps: y, isFocused: S, isFocusVisible: w } = $f7dceffc5ad7768b$export$4e328f61c538687f(), { hoverProps: E, isHovered: O } = $6179b936705e76d3$export$ae780daf29e6d456({
43562
43650
  ...r,
@@ -57949,7 +58037,7 @@ Database schema: ${c}`), (_a3 = r2.aiFix) == null ? void 0 : _a3.setAiCompletion
57949
58037
  hasConsoleOutput: (_ == null ? void 0 : _.consoleOutputs) != null
57950
58038
  };
57951
58039
  }
57952
- const LazyAnyLanguageCodeMirror = (0, import_react.lazy)(() => import("./any-language-editor-Bda9cY1_.js"));
58040
+ const LazyAnyLanguageCodeMirror = (0, import_react.lazy)(() => import("./any-language-editor-vYraVrwE.js"));
57953
58041
  var import_compiler_runtime$112 = require_compiler_runtime(), extensions = [
57954
58042
  EditorView.lineWrapping
57955
58043
  ], SUPPORTED_LANGUAGES = /* @__PURE__ */ new Set([
@@ -71129,22 +71217,24 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71129
71217
  var import_compiler_runtime$86 = require_compiler_runtime();
71130
71218
  const Chatbot = (e) => {
71131
71219
  var _a2;
71132
- let [r, c] = (0, import_react.useState)(""), [d, f] = (0, import_react.useState)(e.config), [h, _] = (0, import_react.useState)(void 0), v = (0, import_react.useRef)(null), y = (0, import_react.useRef)(null), S = (0, import_react.useRef)(null), w = (0, import_react.useRef)(null), E = (0, import_react.useRef)(d);
71133
- E.current = d;
71134
- let O = (0, import_react.useRef)({
71220
+ let [r, c] = (0, import_react.useState)(""), [d, f] = (0, import_react.useState)(e.config), [h, _] = (0, import_react.useState)(e.config), [v, y] = (0, import_react.useState)(void 0), S = (0, import_react.useRef)(null), w = (0, import_react.useRef)(null), E = (0, import_react.useRef)(null), O = (0, import_react.useRef)(null);
71221
+ Object.keys(e.config).some((r2) => e.config[r2] !== h[r2]) && (f(e.config), _(e.config));
71222
+ let M = (0, import_react.useRef)(d);
71223
+ M.current = d;
71224
+ let I = (0, import_react.useRef)({
71135
71225
  backendMessageId: null,
71136
71226
  frontendMessageIndex: null
71137
- }), M = (0, import_react.useRef)(null), { data: I } = useAsyncData(async () => (await e.get_chat_history({})).messages, []), z = e.value.length > 0 ? e.value : I, { messages: G, sendMessage: q, setMessages: LY, status: RY, stop: zY, error: BY, regenerate: VY, clearError: HY } = useChat({
71227
+ }), z = (0, import_react.useRef)(null), { data: G } = useAsyncData(async () => (await e.get_chat_history({})).messages, []), q = e.value.length > 0 ? e.value : G, { messages: LY, sendMessage: RY, setMessages: zY, status: BY, stop: VY, error: HY, regenerate: UY, clearError: WY } = useChat({
71138
71228
  transport: new DefaultChatTransport({
71139
71229
  fetch: async (r2, c2) => {
71140
71230
  if (c2 === void 0) return fetch(r2);
71141
71231
  let d2 = JSON.parse(c2.body), f2 = c2.signal, h2 = {
71142
- max_tokens: E.current.max_tokens,
71143
- temperature: E.current.temperature,
71144
- top_p: E.current.top_p,
71145
- top_k: E.current.top_k,
71146
- frequency_penalty: E.current.frequency_penalty,
71147
- presence_penalty: E.current.presence_penalty
71232
+ max_tokens: M.current.max_tokens,
71233
+ temperature: M.current.temperature,
71234
+ top_p: M.current.top_p,
71235
+ top_k: M.current.top_k,
71236
+ frequency_penalty: M.current.frequency_penalty,
71237
+ presence_penalty: M.current.presence_penalty
71148
71238
  };
71149
71239
  try {
71150
71240
  let r3 = d2.messages.map((e2) => {
@@ -71157,7 +71247,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71157
71247
  if (e.frontendManaged) {
71158
71248
  let c4 = new ReadableStream({
71159
71249
  start(e2) {
71160
- M.current = e2;
71250
+ z.current = e2;
71161
71251
  let r4 = () => {
71162
71252
  try {
71163
71253
  e2.close();
@@ -71166,14 +71256,14 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71166
71256
  error: e3
71167
71257
  });
71168
71258
  }
71169
- M.current = null;
71259
+ z.current = null;
71170
71260
  };
71171
71261
  return f2 == null ? void 0 : f2.addEventListener("abort", r4), () => {
71172
71262
  f2 == null ? void 0 : f2.removeEventListener("abort", r4);
71173
71263
  };
71174
71264
  },
71175
71265
  cancel() {
71176
- M.current = null;
71266
+ z.current = null;
71177
71267
  }
71178
71268
  });
71179
71269
  return e.send_prompt({
@@ -71181,7 +71271,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71181
71271
  config: h2
71182
71272
  }).catch((e2) => {
71183
71273
  var _a3;
71184
- (_a3 = M.current) == null ? void 0 : _a3.error(e2), M.current = null;
71274
+ (_a3 = z.current) == null ? void 0 : _a3.error(e2), z.current = null;
71185
71275
  }), createUIMessageStreamResponse({
71186
71276
  stream: c4
71187
71277
  });
@@ -71190,7 +71280,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71190
71280
  status: 499
71191
71281
  });
71192
71282
  let c3 = Date.now().toString();
71193
- LY((e2) => [
71283
+ zY((e2) => [
71194
71284
  ...e2,
71195
71285
  {
71196
71286
  id: c3,
@@ -71218,7 +71308,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71218
71308
  response: v2
71219
71309
  }), new Response("Internal server error", {
71220
71310
  status: 500
71221
- })) : (O.current.backendMessageId === null && O.current.frontendMessageIndex === null && LY((e2) => {
71311
+ })) : (I.current.backendMessageId === null && I.current.frontendMessageIndex === null && zY((e2) => {
71222
71312
  let r4 = [
71223
71313
  ...e2
71224
71314
  ], d3 = r4.findIndex((e3) => e3.id === c3);
@@ -71233,7 +71323,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71233
71323
  }), r4;
71234
71324
  }), new Response(v2));
71235
71325
  } catch (e2) {
71236
- if (O.current = {
71326
+ if (I.current = {
71237
71327
  backendMessageId: null,
71238
71328
  frontendMessageIndex: null
71239
71329
  }, e2.name === "AbortError") return new Response("Aborted", {
@@ -71246,15 +71336,15 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71246
71336
  }
71247
71337
  }
71248
71338
  }),
71249
- messages: z,
71339
+ messages: q,
71250
71340
  onFinish: (r2) => {
71251
- _(void 0), v.current && (v.current.value = ""), Logger.debug("Finished streaming message:", r2), O.current = {
71341
+ y(void 0), S.current && (S.current.value = ""), Logger.debug("Finished streaming message:", r2), I.current = {
71252
71342
  backendMessageId: null,
71253
71343
  frontendMessageIndex: null
71254
71344
  }, e.frontendManaged && e.setValue(r2.messages);
71255
71345
  },
71256
71346
  onError: (e2) => {
71257
- Logger.error("An error occurred:", e2), O.current = {
71347
+ Logger.error("An error occurred:", e2), I.current = {
71258
71348
  backendMessageId: null,
71259
71349
  frontendMessageIndex: null
71260
71350
  };
@@ -71264,19 +71354,19 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71264
71354
  let c2 = r2.detail.message;
71265
71355
  if (typeof c2 != "object" || !c2 || !("type" in c2) || c2.type !== "stream_chunk") return;
71266
71356
  if (e.frontendManaged) {
71267
- let e2 = M.current;
71357
+ let e2 = z.current;
71268
71358
  if (!e2) return;
71269
71359
  let r3 = c2;
71270
- r3.content && e2.enqueue(r3.content), r3.is_final && (e2.close(), M.current = null);
71360
+ r3.content && e2.enqueue(r3.content), r3.is_final && (e2.close(), z.current = null);
71271
71361
  return;
71272
71362
  }
71273
71363
  let d2 = c2;
71274
- O.current.backendMessageId === null && LY((e2) => {
71364
+ I.current.backendMessageId === null && zY((e2) => {
71275
71365
  let r3 = [
71276
71366
  ...e2
71277
71367
  ];
71278
71368
  for (let e3 = r3.length - 1; e3 >= 0; e3--) if (r3[e3].role === "assistant") {
71279
- O.current = {
71369
+ I.current = {
71280
71370
  backendMessageId: d2.message_id,
71281
71371
  frontendMessageIndex: e3
71282
71372
  };
@@ -71284,8 +71374,8 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71284
71374
  }
71285
71375
  return r3;
71286
71376
  });
71287
- let f2 = O.current.frontendMessageIndex;
71288
- O.current.backendMessageId === d2.message_id && f2 !== null && (LY((e2) => {
71377
+ let f2 = I.current.frontendMessageIndex;
71378
+ I.current.backendMessageId === d2.message_id && f2 !== null && (zY((e2) => {
71289
71379
  let r3 = [
71290
71380
  ...e2
71291
71381
  ], c3 = f2;
@@ -71302,41 +71392,41 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71302
71392
  });
71303
71393
  }
71304
71394
  return r3;
71305
- }), d2.is_final && (O.current = {
71395
+ }), d2.is_final && (I.current = {
71306
71396
  backendMessageId: null,
71307
71397
  frontendMessageIndex: null
71308
71398
  }));
71309
71399
  });
71310
- let UY = RY === "submitted" || RY === "streaming", WY = (r2) => {
71311
- let c2 = G.findIndex((e2) => e2.id === r2);
71400
+ let GY = BY === "submitted" || BY === "streaming", KY = (r2) => {
71401
+ let c2 = LY.findIndex((e2) => e2.id === r2);
71312
71402
  if (c2 !== -1) {
71313
- let d2 = G.filter((e2) => e2.id !== r2);
71403
+ let d2 = LY.filter((e2) => e2.id !== r2);
71314
71404
  e.delete_chat_message({
71315
71405
  index: c2
71316
- }), LY(d2), e.frontendManaged && e.setValue(d2);
71406
+ }), zY(d2), e.frontendManaged && e.setValue(d2);
71317
71407
  }
71318
- }, GY = Array.isArray(e.allowAttachments) && e.allowAttachments.length > 0 || e.allowAttachments === true, KY = {
71408
+ }, qY = Array.isArray(e.allowAttachments) && e.allowAttachments.length > 0 || e.allowAttachments === true, JY = {
71319
71409
  triggerCompletionRegex: /^\/(\w+)?/,
71320
71410
  completions: e.prompts.map((e2) => ({
71321
71411
  label: `/${e2}`,
71322
71412
  displayLabel: e2,
71323
71413
  apply: e2
71324
71414
  }))
71325
- }, qY = e.prompts.length > 0 ? "Type your message here, / for prompts" : "Type your message here...";
71415
+ }, YY = e.prompts.length > 0 ? "Type your message here, / for prompts" : "Type your message here...";
71326
71416
  (0, import_react.useEffect)(() => {
71327
71417
  var _a3;
71328
- (_a3 = w.current) == null ? void 0 : _a3.scrollTo({
71329
- top: w.current.scrollHeight,
71418
+ (_a3 = O.current) == null ? void 0 : _a3.scrollTo({
71419
+ top: O.current.scrollHeight,
71330
71420
  behavior: "smooth"
71331
71421
  });
71332
71422
  }, [
71333
- G.length,
71334
- w
71423
+ LY.length,
71424
+ O
71335
71425
  ]);
71336
- let JY = (_a2 = S.current) == null ? void 0 : _a2.view, YY = () => {
71337
- if (JY) {
71338
- let e2 = JY.state.doc.length;
71339
- JY.dispatch({
71426
+ let XY = (_a2 = E.current) == null ? void 0 : _a2.view, ZY = () => {
71427
+ if (XY) {
71428
+ let e2 = XY.state.doc.length;
71429
+ XY.dispatch({
71340
71430
  changes: {
71341
71431
  from: 0,
71342
71432
  to: e2,
@@ -71357,9 +71447,9 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71357
71447
  children: (0, import_jsx_runtime.jsx)(Button, {
71358
71448
  variant: "text",
71359
71449
  size: "icon",
71360
- disabled: G.length === 0,
71450
+ disabled: LY.length === 0,
71361
71451
  onClick: () => {
71362
- LY([]), e.setValue([]), e.delete_chat_history({}), HY();
71452
+ zY([]), e.setValue([]), e.delete_chat_history({}), WY();
71363
71453
  },
71364
71454
  children: (0, import_jsx_runtime.jsx)(RotateCw, {
71365
71455
  className: "h-3 w-3"
@@ -71368,9 +71458,9 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71368
71458
  }),
71369
71459
  (0, import_jsx_runtime.jsxs)("div", {
71370
71460
  className: "grow overflow-y-auto gap-4 pt-8 pb-4 px-2 flex flex-col",
71371
- ref: w,
71461
+ ref: O,
71372
71462
  children: [
71373
- G.length === 0 && (0, import_jsx_runtime.jsxs)("div", {
71463
+ LY.length === 0 && (0, import_jsx_runtime.jsxs)("div", {
71374
71464
  className: "flex flex-col items-center justify-center h-full text-muted-foreground text-center p-4",
71375
71465
  children: [
71376
71466
  (0, import_jsx_runtime.jsx)(BotMessageSquare, {
@@ -71386,9 +71476,9 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71386
71476
  })
71387
71477
  ]
71388
71478
  }),
71389
- G.map((e2, r2) => {
71479
+ LY.map((e2, r2) => {
71390
71480
  var _a3;
71391
- let c2 = (_a3 = e2.parts) == null ? void 0 : _a3.filter((e3) => e3.type === "text").map((e3) => e3.text).join("\n"), d2 = r2 === G.length - 1;
71481
+ let c2 = (_a3 = e2.parts) == null ? void 0 : _a3.filter((e3) => e3.type === "text").map((e3) => e3.text).join("\n"), d2 = r2 === LY.length - 1;
71392
71482
  return (0, import_jsx_runtime.jsxs)("div", {
71393
71483
  className: cn("flex flex-col group gap-2", e2.role === "user" ? "items-end" : "items-start"),
71394
71484
  children: [
@@ -71396,7 +71486,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71396
71486
  className: `max-w-[80%] p-3 rounded-lg ${e2.role === "user" ? "bg-(--sky-11) text-(--slate-1) whitespace-pre-wrap" : "bg-(--slate-4) text-(--slate-12)"}`,
71397
71487
  children: renderUIMessage({
71398
71488
  message: e2,
71399
- isStreamingReasoning: RY === "streaming",
71489
+ isStreamingReasoning: BY === "streaming",
71400
71490
  isLast: d2
71401
71491
  })
71402
71492
  }),
@@ -71410,7 +71500,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71410
71500
  }),
71411
71501
  (0, import_jsx_runtime.jsx)("button", {
71412
71502
  type: "button",
71413
- onClick: () => WY(e2.id),
71503
+ onClick: () => KY(e2.id),
71414
71504
  className: "text-xs text-(--slate-9) hover:text-(--slate-11)",
71415
71505
  children: (0, import_jsx_runtime.jsx)(Trash2, {
71416
71506
  className: "h-3 w-3 text-(--red-9)"
@@ -71421,7 +71511,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71421
71511
  ]
71422
71512
  }, e2.id);
71423
71513
  }),
71424
- UY && (0, import_jsx_runtime.jsxs)("div", {
71514
+ GY && (0, import_jsx_runtime.jsxs)("div", {
71425
71515
  className: "flex items-center justify-center space-x-2 mb-4",
71426
71516
  children: [
71427
71517
  (0, import_jsx_runtime.jsx)(Spinner, {
@@ -71430,22 +71520,22 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71430
71520
  (0, import_jsx_runtime.jsx)(Button, {
71431
71521
  variant: "link",
71432
71522
  size: "sm",
71433
- onClick: () => zY(),
71523
+ onClick: () => VY(),
71434
71524
  className: "text-(--red-9) hover:text-(--red-11)",
71435
71525
  children: "Stop"
71436
71526
  })
71437
71527
  ]
71438
71528
  }),
71439
- BY && (0, import_jsx_runtime.jsxs)("div", {
71529
+ HY && (0, import_jsx_runtime.jsxs)("div", {
71440
71530
  className: "flex items-center justify-center space-x-2 mb-4",
71441
71531
  children: [
71442
71532
  (0, import_jsx_runtime.jsx)(ErrorBanner, {
71443
- error: BY
71533
+ error: HY
71444
71534
  }),
71445
71535
  (0, import_jsx_runtime.jsx)(Button, {
71446
71536
  variant: "outline",
71447
71537
  size: "sm",
71448
- onClick: () => VY(),
71538
+ onClick: () => UY(),
71449
71539
  children: "Retry"
71450
71540
  })
71451
71541
  ]
@@ -71455,8 +71545,8 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71455
71545
  (0, import_jsx_runtime.jsxs)("form", {
71456
71546
  onSubmit: async (e2) => {
71457
71547
  e2.preventDefault();
71458
- let c2 = h ? await convertToFileUIPart(h) : void 0;
71459
- q({
71548
+ let c2 = v ? await convertToFileUIPart(v) : void 0;
71549
+ RY({
71460
71550
  role: "user",
71461
71551
  parts: [
71462
71552
  {
@@ -71465,9 +71555,9 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71465
71555
  },
71466
71556
  ...c2 ?? []
71467
71557
  ]
71468
- }), YY();
71558
+ }), ZY();
71469
71559
  },
71470
- ref: y,
71560
+ ref: w,
71471
71561
  className: "flex w-full border-t border-(--slate-6) px-2 py-1 items-center",
71472
71562
  children: [
71473
71563
  e.showConfigurationControls && (0, import_jsx_runtime.jsx)(ConfigPopup, {
@@ -71478,52 +71568,52 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71478
71568
  prompts: e.prompts,
71479
71569
  onSelect: (e2) => {
71480
71570
  c(e2), requestAnimationFrame(() => {
71481
- JY == null ? void 0 : JY.focus(), moveToEndOfEditor(JY);
71571
+ XY == null ? void 0 : XY.focus(), moveToEndOfEditor(XY);
71482
71572
  });
71483
71573
  }
71484
71574
  }),
71485
71575
  (0, import_jsx_runtime.jsx)(PromptInput, {
71486
71576
  className: "rounded-sm mr-2",
71487
- placeholder: qY,
71577
+ placeholder: YY,
71488
71578
  value: r,
71489
- inputRef: S,
71579
+ inputRef: E,
71490
71580
  maxHeight: e.maxHeight ? `${e.maxHeight / 2}px` : void 0,
71491
71581
  onChange: c,
71492
71582
  onSubmit: (e2, r2) => {
71493
71583
  var _a3;
71494
- r2.trim() && ((_a3 = y.current) == null ? void 0 : _a3.requestSubmit());
71584
+ r2.trim() && ((_a3 = w.current) == null ? void 0 : _a3.requestSubmit());
71495
71585
  },
71496
71586
  onClose: () => {
71497
71587
  },
71498
- additionalCompletions: KY
71588
+ additionalCompletions: JY
71499
71589
  }),
71500
- h && h.length === 1 && (0, import_jsx_runtime.jsx)("span", {
71501
- title: h[0].name,
71590
+ v && v.length === 1 && (0, import_jsx_runtime.jsx)("span", {
71591
+ title: v[0].name,
71502
71592
  className: "text-sm text-(--slate-11) truncate shrink-0 w-fit max-w-24",
71503
- children: h[0].name
71593
+ children: v[0].name
71504
71594
  }),
71505
- h && h.length > 1 && (0, import_jsx_runtime.jsxs)("span", {
71595
+ v && v.length > 1 && (0, import_jsx_runtime.jsxs)("span", {
71506
71596
  title: [
71507
- ...h
71597
+ ...v
71508
71598
  ].map((e2) => e2.name).join("\n"),
71509
71599
  className: "text-sm text-(--slate-11) truncate shrink-0",
71510
71600
  children: [
71511
- h.length,
71601
+ v.length,
71512
71602
  " files"
71513
71603
  ]
71514
71604
  }),
71515
- h && h.length > 0 && (0, import_jsx_runtime.jsx)(Button, {
71605
+ v && v.length > 0 && (0, import_jsx_runtime.jsx)(Button, {
71516
71606
  type: "button",
71517
71607
  variant: "text",
71518
71608
  size: "sm",
71519
71609
  onClick: () => {
71520
- _(void 0), v.current && (v.current.value = "");
71610
+ y(void 0), S.current && (S.current.value = "");
71521
71611
  },
71522
71612
  children: (0, import_jsx_runtime.jsx)(X, {
71523
71613
  className: "size-3"
71524
71614
  })
71525
71615
  }),
71526
- GY && (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
71616
+ qY && (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
71527
71617
  children: [
71528
71618
  (0, import_jsx_runtime.jsx)(Button, {
71529
71619
  type: "button",
@@ -71531,7 +71621,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71531
71621
  size: "sm",
71532
71622
  onClick: () => {
71533
71623
  var _a3;
71534
- return (_a3 = v.current) == null ? void 0 : _a3.click();
71624
+ return (_a3 = S.current) == null ? void 0 : _a3.click();
71535
71625
  },
71536
71626
  children: (0, import_jsx_runtime.jsx)(Paperclip, {
71537
71627
  className: "h-4"
@@ -71539,12 +71629,12 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71539
71629
  }),
71540
71630
  (0, import_jsx_runtime.jsx)("input", {
71541
71631
  type: "file",
71542
- ref: v,
71632
+ ref: S,
71543
71633
  className: "hidden",
71544
71634
  multiple: true,
71545
71635
  accept: Array.isArray(e.allowAttachments) ? e.allowAttachments.join(",") : void 0,
71546
71636
  onChange: (e2) => {
71547
- e2.target.files && _([
71637
+ e2.target.files && y([
71548
71638
  ...e2.target.files
71549
71639
  ]);
71550
71640
  }
@@ -71553,7 +71643,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71553
71643
  }),
71554
71644
  (0, import_jsx_runtime.jsx)(Button, {
71555
71645
  type: "submit",
71556
- disabled: UY || !r,
71646
+ disabled: GY || !r,
71557
71647
  variant: "outline",
71558
71648
  size: "sm",
71559
71649
  className: "text-(--slate-11)",
@@ -71600,25 +71690,24 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71600
71690
  description: "Penalizes new tokens (-2: favor, 2: avoid)"
71601
71691
  }
71602
71692
  }, ConfigPopup = (e) => {
71603
- let r = (0, import_compiler_runtime$86.c)(16), { config: c, onChange: d } = e, [f, h] = (0, import_react.useState)(c), [_, v] = (0, import_react.useState)(false), y;
71604
- r[0] !== f || r[1] !== d ? (y = (e2, r2) => {
71605
- let c2 = r2 === null || Number.isNaN(r2) ? null : r2;
71606
- if (c2 !== null) {
71607
- let { min: r3, max: d2 } = configDescriptions[e2];
71608
- c2 = Math.max(r3, Math.min(d2, c2));
71609
- }
71610
- let _2 = {
71611
- ...f,
71612
- [e2]: c2
71613
- };
71614
- h(_2), d(_2);
71615
- }, r[0] = f, r[1] = d, r[2] = y) : y = r[2];
71693
+ let r = (0, import_compiler_runtime$86.c)(16), { config: c, onChange: d } = e, [f, h] = (0, import_react.useState)(false), _;
71694
+ r[0] !== c || r[1] !== d ? (_ = (e2, r2) => {
71695
+ let f2 = r2 === null || Number.isNaN(r2) ? null : r2;
71696
+ if (f2 !== null) {
71697
+ let { min: r3, max: c2 } = configDescriptions[e2];
71698
+ f2 = Math.max(r3, Math.min(c2, f2));
71699
+ }
71700
+ d({
71701
+ ...c,
71702
+ [e2]: f2
71703
+ });
71704
+ }, r[0] = c, r[1] = d, r[2] = _) : _ = r[2];
71705
+ let v = _, y;
71706
+ r[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = (e2) => {
71707
+ e2.key === "Enter" && (e2.preventDefault(), h(false));
71708
+ }, r[3] = y) : y = r[3];
71616
71709
  let S = y, w;
71617
- r[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = (e2) => {
71618
- e2.key === "Enter" && (e2.preventDefault(), v(false));
71619
- }, r[3] = w) : w = r[3];
71620
- let E = w, O;
71621
- r[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (O = (0, import_jsx_runtime.jsx)(Tooltip, {
71710
+ r[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = (0, import_jsx_runtime.jsx)(Tooltip, {
71622
71711
  content: "Configuration",
71623
71712
  children: (0, import_jsx_runtime.jsx)(PopoverTrigger, {
71624
71713
  asChild: true,
@@ -71631,16 +71720,16 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71631
71720
  })
71632
71721
  })
71633
71722
  })
71634
- }), r[4] = O) : O = r[4];
71635
- let M;
71636
- r[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = (0, import_jsx_runtime.jsx)("h4", {
71723
+ }), r[4] = w) : w = r[4];
71724
+ let E;
71725
+ r[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = (0, import_jsx_runtime.jsx)("h4", {
71637
71726
  className: "font-bold leading-none",
71638
71727
  children: "Configuration"
71639
- }), r[5] = M) : M = r[5];
71640
- let I;
71641
- if (r[6] !== S || r[7] !== f) {
71728
+ }), r[5] = E) : E = r[5];
71729
+ let O;
71730
+ if (r[6] !== c || r[7] !== v) {
71642
71731
  let e2;
71643
- r[9] === S ? e2 = r[10] : (e2 = (e3) => {
71732
+ r[9] === v ? e2 = r[10] : (e2 = (e3) => {
71644
71733
  let [r2, c2] = e3;
71645
71734
  return (0, import_jsx_runtime.jsxs)("div", {
71646
71735
  className: "grid grid-cols-3 items-center gap-1",
@@ -71671,34 +71760,34 @@ Image URL: ${r.imageUrl}`)), contextToXml({
71671
71760
  minValue: configDescriptions[r2].min,
71672
71761
  maxValue: configDescriptions[r2].max,
71673
71762
  step: configDescriptions[r2].step ?? 1,
71674
- onChange: (e4) => S(r2, e4),
71675
- onKeyDown: E,
71763
+ onChange: (e4) => v(r2, e4),
71764
+ onKeyDown: S,
71676
71765
  className: "col-span-3"
71677
71766
  })
71678
71767
  ]
71679
71768
  }, r2);
71680
- }, r[9] = S, r[10] = e2), I = Objects.entries(f).map(e2), r[6] = S, r[7] = f, r[8] = I;
71681
- } else I = r[8];
71682
- let z;
71683
- r[11] === I ? z = r[12] : (z = (0, import_jsx_runtime.jsx)(PopoverContent, {
71769
+ }, r[9] = v, r[10] = e2), O = Objects.entries(c).map(e2), r[6] = c, r[7] = v, r[8] = O;
71770
+ } else O = r[8];
71771
+ let M;
71772
+ r[11] === O ? M = r[12] : (M = (0, import_jsx_runtime.jsx)(PopoverContent, {
71684
71773
  className: "w-70 border",
71685
71774
  children: (0, import_jsx_runtime.jsxs)("div", {
71686
71775
  className: "grid gap-3",
71687
71776
  children: [
71688
- M,
71689
- I
71777
+ E,
71778
+ O
71690
71779
  ]
71691
71780
  })
71692
- }), r[11] = I, r[12] = z);
71693
- let G;
71694
- return r[13] !== _ || r[14] !== z ? (G = (0, import_jsx_runtime.jsxs)(Popover$1, {
71695
- open: _,
71696
- onOpenChange: v,
71781
+ }), r[11] = O, r[12] = M);
71782
+ let I;
71783
+ return r[13] !== f || r[14] !== M ? (I = (0, import_jsx_runtime.jsxs)(Popover$1, {
71784
+ open: f,
71785
+ onOpenChange: h,
71697
71786
  children: [
71698
- O,
71699
- z
71787
+ w,
71788
+ M
71700
71789
  ]
71701
- }), r[13] = _, r[14] = z, r[15] = G) : G = r[15], G;
71790
+ }), r[13] = f, r[14] = M, r[15] = I) : I = r[15], I;
71702
71791
  }, PromptsPopover = (e) => {
71703
71792
  let r = (0, import_compiler_runtime$86.c)(18), { prompts: c, onSelect: d } = e, [f, h] = (0, import_react.useState)(false), [_, v] = (0, import_react.useState)(""), y;
71704
71793
  r[0] === d ? y = r[1] : (y = (e2) => {
@@ -72009,7 +72098,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
72009
72098
  function getVegaFieldTypes(e) {
72010
72099
  return !e || Object.keys(e).length === 0 ? "auto" : Objects.mapValues(e, (e2) => e2 === "date" || e2 === "time" ? "string" : e2 === "datetime" ? "date" : e2);
72011
72100
  }
72012
- var import_compiler_runtime$84 = require_compiler_runtime(), LazyDataEditor = import_react.lazy(() => import("./glide-data-editor-Bv8bVIJ9.js").then(async (m2) => {
72101
+ var import_compiler_runtime$84 = require_compiler_runtime(), LazyDataEditor = import_react.lazy(() => import("./glide-data-editor-CmGweudS.js").then(async (m2) => {
72013
72102
  await m2.__tla;
72014
72103
  return m2;
72015
72104
  }));
@@ -83667,7 +83756,7 @@ ${c}
83667
83756
  fullWidth: v,
83668
83757
  children: z
83669
83758
  }), r[19] = v, r[20] = y, r[21] = c, r[22] = z, r[23] = G) : G = r[23], G;
83670
- }, LazyDataExplorerComponent = import_react.lazy(() => import("./ConnectedDataExplorerComponent-BIfUtj_S.js"));
83759
+ }, LazyDataExplorerComponent = import_react.lazy(() => import("./ConnectedDataExplorerComponent-NOmLZzDZ.js"));
83671
83760
  const DataExplorerPlugin = createPlugin("marimo-data-explorer").withData(object$1({
83672
83761
  label: string$2().nullish(),
83673
83762
  data: string$2()
@@ -93989,7 +94078,7 @@ ${c}
93989
94078
  return true;
93990
94079
  }
93991
94080
  }
93992
- var LazyVegaComponent = import_react.lazy(() => import("./vega-component-BGTsperM.js")), VegaPlugin = class {
94081
+ var LazyVegaComponent = import_react.lazy(() => import("./vega-component-7FCbq3L9.js")), VegaPlugin = class {
93993
94082
  constructor() {
93994
94083
  __publicField(this, "tagName", "marimo-vega");
93995
94084
  __publicField(this, "validator", object$1({
@@ -94129,7 +94218,7 @@ ${c}
94129
94218
  children: e.children
94130
94219
  });
94131
94220
  }
94132
- }, LazySlidesComponent$1 = import_react.lazy(() => import("./slides-component-CJJp5XN4.js"));
94221
+ }, LazySlidesComponent$1 = import_react.lazy(() => import("./slides-component-BHWhzwDN.js"));
94133
94222
  const DownloadPlugin = createPlugin("marimo-download").withData(object$1({
94134
94223
  data: string$2(),
94135
94224
  disabled: boolean$2().default(false),
@@ -100570,7 +100659,7 @@ Defaulting to \`null\`.`;
100570
100659
  cells: []
100571
100660
  })
100572
100661
  };
100573
- var import_compiler_runtime$8 = require_compiler_runtime(), LazySlidesComponent = import_react.lazy(() => import("./slides-component-CJJp5XN4.js"));
100662
+ var import_compiler_runtime$8 = require_compiler_runtime(), LazySlidesComponent = import_react.lazy(() => import("./slides-component-BHWhzwDN.js"));
100574
100663
  const SlidesLayoutRenderer = (e) => {
100575
100664
  let r = (0, import_compiler_runtime$8.c)(11), { cells: c, mode: d } = e, f = d === "read", h;
100576
100665
  if (r[0] !== c || r[1] !== d) {
@@ -100812,7 +100901,7 @@ Defaulting to \`null\`.`;
100812
100901
  }
100813
100902
  var import_compiler_runtime$6 = require_compiler_runtime();
100814
100903
  const NameCellContentEditable = (e) => {
100815
- let r = (0, import_compiler_runtime$6.c)(13), { value: c, cellId: d, className: f } = e, { updateCellName: h } = useCellActions(), _;
100904
+ let r = (0, import_compiler_runtime$6.c)(12), { value: c, cellId: d, className: f } = e, { updateCellName: h } = useCellActions(), _;
100816
100905
  r[0] !== d || r[1] !== h ? (_ = (e2) => h({
100817
100906
  cellId: d,
100818
100907
  name: e2
@@ -100821,22 +100910,20 @@ Defaulting to \`null\`.`;
100821
100910
  if (isInternalCellName(c)) return null;
100822
100911
  let y = v.focusing ? "" : "text-ellipsis", S;
100823
100912
  r[3] !== f || r[4] !== y ? (S = cn("outline-hidden border hover:border-cyan-500/40 focus:border-cyan-500/40", y, f), r[3] = f, r[4] = y, r[5] = S) : S = r[5];
100824
- let w = v.onChange, E = v.onBlur, O = v.onFocus, M;
100825
- r[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = Events.onEnter(_temp$3), r[6] = M) : M = r[6];
100826
- let I;
100827
- return r[7] !== v.onBlur || r[8] !== v.onChange || r[9] !== v.onFocus || r[10] !== S || r[11] !== c ? (I = (0, import_jsx_runtime.jsx)(Tooltip, {
100913
+ let w;
100914
+ return r[6] !== v.onBlur || r[7] !== v.onChange || r[8] !== v.onFocus || r[9] !== S || r[10] !== c ? (w = (0, import_jsx_runtime.jsx)(Tooltip, {
100828
100915
  content: "Click to rename",
100829
100916
  children: (0, import_jsx_runtime.jsx)("span", {
100830
100917
  className: S,
100831
100918
  contentEditable: true,
100832
100919
  suppressContentEditableWarning: true,
100833
- onChange: w,
100834
- onBlur: E,
100835
- onFocus: O,
100836
- onKeyDown: M,
100920
+ onChange: v.onChange,
100921
+ onBlur: v.onBlur,
100922
+ onFocus: v.onFocus,
100923
+ onKeyDown: _temp$3,
100837
100924
  children: c
100838
100925
  })
100839
- }), r[7] = v.onBlur, r[8] = v.onChange, r[9] = v.onFocus, r[10] = S, r[11] = c, r[12] = I) : I = r[12], I;
100926
+ }), r[6] = v.onBlur, r[7] = v.onChange, r[8] = v.onFocus, r[9] = S, r[10] = c, r[11] = w) : w = r[11], w;
100840
100927
  };
100841
100928
  function useCellNameInput(e, r) {
100842
100929
  let [c, d] = (0, import_react.useState)(e), [f, h] = (0, import_react.useState)(false), _ = (c2) => {
@@ -100867,7 +100954,7 @@ Defaulting to \`null\`.`;
100867
100954
  };
100868
100955
  }
100869
100956
  function _temp$3(e) {
100870
- e.target instanceof HTMLElement && e.target.blur();
100957
+ e.stopPropagation(), e.key === "Enter" && e.target instanceof HTMLElement && e.target.blur();
100871
100958
  }
100872
100959
  var import_compiler_runtime$5 = require_compiler_runtime(), wrapTextAtom = atomWithStorage("marimo:console:wrapText", false, jotaiJsonStorage);
100873
100960
  function useWrapText() {
@@ -101068,7 +101155,7 @@ Defaulting to \`null\`.`;
101068
101155
  return Logger.warn("Failed to get version from mount config"), null;
101069
101156
  }
101070
101157
  }
101071
- const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.19.3-dev3"), showCodeInRunModeAtom = atom(true);
101158
+ const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.19.3-dev30"), showCodeInRunModeAtom = atom(true);
101072
101159
  atom(null);
101073
101160
  var VIRTUAL_FILE_REGEX = /\/@file\/([^\s"&'/]+)\.([\dA-Za-z]+)/g, VirtualFileTracker = class e {
101074
101161
  constructor() {
@@ -102363,6 +102450,8 @@ ${r}
102363
102450
  return;
102364
102451
  case "cache-info":
102365
102452
  return;
102453
+ case "kernel-startup-error":
102454
+ return;
102366
102455
  default:
102367
102456
  logNever(c.data);
102368
102457
  }