@marimo-team/islands 0.25.3-dev419 → 0.25.3-dev420

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 (78) hide show
  1. package/dist/{ConnectedDataExplorerComponent-DU3_5kY8.js → ConnectedDataExplorerComponent-CoEU9snz.js} +9 -9
  2. package/dist/{ErrorBoundary-QucJ8UcH.js → ErrorBoundary-OkPCZwqd.js} +6 -6
  3. package/dist/{abnfDiagram-VCTEODGH-B8K0jAls.js → abnfDiagram-VCTEODGH-RbfxpmIE.js} +2 -2
  4. package/dist/{any-language-editor-B4_DB75O.js → any-language-editor-CvTbmCdJ.js} +2 -2
  5. package/dist/{architectureDiagram-5GKGNRK7-CvIQmetx.js → architectureDiagram-5GKGNRK7-DzzNVRo4.js} +1 -1
  6. package/dist/{assertNever-mSPR3shX.js → assertNever-ChGm2jYv.js} +13 -13
  7. package/dist/{chat-ui-B_RJOYcP.js → chat-ui-DxD-0lMF.js} +42 -42
  8. package/dist/{check-Cy7tgHcN.js → check-BHRB6N0I.js} +1 -1
  9. package/dist/{chunk-IMKFNOWR-BAjKQ-DW.js → chunk-IMKFNOWR-1Zy6M_oP.js} +1 -1
  10. package/dist/{chunk-SHT3W25Y-ZNgk9609.js → chunk-SHT3W25Y-yAttqZEk.js} +1 -1
  11. package/dist/{chunk-SVP7TREG-C-eCzAlq.js → chunk-SVP7TREG-MKJpuJHR.js} +1 -1
  12. package/dist/{chunk-TICWLB2K-B6K_lMGd.js → chunk-TICWLB2K-BOC0OebH.js} +1 -1
  13. package/dist/{classDiagram-ZZMXUADV-WvEzff6_.js → classDiagram-ZZMXUADV-BOlD7kH9.js} +2 -2
  14. package/dist/{classDiagram-v2-VYDZK3BY-C6jq882I.js → classDiagram-v2-VYDZK3BY-C3p3seuT.js} +2 -2
  15. package/dist/{code-visibility-DvjOxSCU.js → code-visibility-Cjmof3go.js} +18 -18
  16. package/dist/{common-KGFvhdv7.js → common-IWr3ajS6.js} +190 -190
  17. package/dist/{config-B8EcwkGB.js → config-EJnOxh0i.js} +15 -15
  18. package/dist/{copy-icon-BJpgGeTC.js → copy-icon-CeOpTht4.js} +2 -2
  19. package/dist/{createReducer-sm4RC5mJ.js → createReducer-BJJ0K5Tu.js} +5 -5
  20. package/dist/{cynefinDiagram-5FMLGOSQ-D803PUnc.js → cynefinDiagram-5FMLGOSQ-BKnxm64C.js} +1 -1
  21. package/dist/{dagre-GXQ25YYZ-C-aJg32d.js → dagre-GXQ25YYZ-COBTexAI.js} +1 -1
  22. package/dist/{data-grid-overlay-editor-7Dtv34Jd.js → data-grid-overlay-editor-CJ4s7ulW.js} +1 -1
  23. package/dist/{diagram-S7CK7UJ4-BLVxtHnY.js → diagram-S7CK7UJ4-Dyt3J6ek.js} +1 -1
  24. package/dist/{diagram-UQ7AKVKN-Beh5Pbg6.js → diagram-UQ7AKVKN-CJCsT4fA.js} +1 -1
  25. package/dist/{diagram-VX7I27RA-CULTkxM5.js → diagram-VX7I27RA-BboxCtbh.js} +1 -1
  26. package/dist/{diagram-Z3DM3KII-BMCLEP1m.js → diagram-Z3DM3KII-DfRWWQ5t.js} +1 -1
  27. package/dist/{dialog-B6nQQBnz.js → dialog-B8vU2hHC.js} +19 -19
  28. package/dist/{dropdown-menu-DjX80o4Y.js → dropdown-menu-DzhAnAhr.js} +710 -710
  29. package/dist/{ebnfDiagram-PWID7BFC-C1nrF9vr.js → ebnfDiagram-PWID7BFC-DYxwv-nl.js} +2 -2
  30. package/dist/{erDiagram-RLTQ6QDP-DdyMtJ9L.js → erDiagram-RLTQ6QDP-D9e5WUw7.js} +1 -1
  31. package/dist/{error-banner-B_inJFwt.js → error-banner-BRkKwvku.js} +58 -58
  32. package/dist/{error-entries-PI7-JXTO.js → error-entries-BNzYy3Ci.js} +199 -199
  33. package/dist/{feedback-button-K8GaXx54.js → feedback-button-CNlw0PFL.js} +7 -8
  34. package/dist/{flowDiagram-HODETNUW-bvV00CVg.js → flowDiagram-HODETNUW-tt7EepxX.js} +2 -2
  35. package/dist/{formats-CHMpl6QC.js → formats-HRSqKdFt.js} +1 -1
  36. package/dist/{glide-data-editor-DOTyVaei.js → glide-data-editor-SsDU5p2r.js} +11 -11
  37. package/dist/{glide-utils-BRuD_rZU.js → glide-utils-BzjESEmr.js} +2 -2
  38. package/dist/{globals-BXqXiOgm.js → globals-BET0Lqsh.js} +3 -3
  39. package/dist/{html-to-image-DRDPLn_a.js → html-to-image-CO_NVoKY.js} +4364 -4364
  40. package/dist/{infoDiagram-27XIBGKW-CJP3yC0n.js → infoDiagram-27XIBGKW-CpQH_joy.js} +1 -1
  41. package/dist/{ishikawaDiagram-5VMMS53U-C1pLHIdi.js → ishikawaDiagram-5VMMS53U-d-it4xqm.js} +1 -1
  42. package/dist/{kanban-definition-UXKFOSKX-NdrIJPqy.js → kanban-definition-UXKFOSKX-DItpqTFY.js} +1 -1
  43. package/dist/main.js +1303 -1303
  44. package/dist/{mermaid-BocCIdw6.js → mermaid-BugOVfeH.js} +34 -34
  45. package/dist/{mindmap-definition-YA3MSWOX-Vl1SDmoX.js → mindmap-definition-YA3MSWOX-D6IpF-_J.js} +1 -1
  46. package/dist/{number-overlay-editor-C5pRNGgM.js → number-overlay-editor-CQB7RHTl.js} +1 -1
  47. package/dist/{pegDiagram-XKGWAZYB-B8WAtwHg.js → pegDiagram-XKGWAZYB-CXUu3QwE.js} +2 -2
  48. package/dist/{pencil-DM3KeZSc.js → pencil-DWRFEz2B.js} +1 -1
  49. package/dist/{pieDiagram-E7YTZNPT-3UwTA4Ji.js → pieDiagram-E7YTZNPT-DoUJF0yj.js} +1 -1
  50. package/dist/{process-output-Dox_yeXz.js → process-output-CznNfcKe.js} +4 -4
  51. package/dist/{railroadDiagram-O6MQD6OU-C3w0QQqv.js → railroadDiagram-O6MQD6OU-BsGDhtLL.js} +2 -2
  52. package/dist/{requirementDiagram-BXWQKSXE-XfIlHoUh.js → requirementDiagram-BXWQKSXE-BHW0qW2Z.js} +1 -1
  53. package/dist/{reveal-component-CxH2xcwO.js → reveal-component-C1RY2hz7.js} +8 -8
  54. package/dist/{select-C9YSRW_M.js → select-Brvb-RwP.js} +114 -114
  55. package/dist/{sequenceDiagram-WJ2MYXX4-lwpyGn1v.js → sequenceDiagram-WJ2MYXX4-DpgYJzLl.js} +1 -1
  56. package/dist/{spec-VVUHPhhG.js → spec-BWpscSQi.js} +4 -4
  57. package/dist/{stateDiagram-D77RDMKH-DYBi4cqk.js → stateDiagram-D77RDMKH-Btf1jiYb.js} +2 -2
  58. package/dist/{stateDiagram-v2-MP3YSRHH-DNc3nkzs.js → stateDiagram-v2-MP3YSRHH-DN9FyEf3.js} +2 -2
  59. package/dist/static-state-BhCfPRoz.js +68 -0
  60. package/dist/{swimlanes-42K2YHIH-DhzVHdX1.js → swimlanes-42K2YHIH-2l_tR9qL.js} +1 -1
  61. package/dist/{swimlanesDiagram-VR7AAH4N-Cok6zuub.js → swimlanesDiagram-VR7AAH4N-BAkmv8kE.js} +2 -2
  62. package/dist/{timeline-definition-24CTP7MA-IlEStAoK.js → timeline-definition-24CTP7MA-AxSxEOhx.js} +1 -1
  63. package/dist/{toast-BP9h0yJZ.js → toast-DOWc3HtU.js} +106 -106
  64. package/dist/{tooltip-DY2U4Rke.js → tooltip-DsQZP310.js} +57 -57
  65. package/dist/{use-restore-focus-Mex26exl.js → use-restore-focus-CTa7IRP6.js} +584 -550
  66. package/dist/{useDateFormatter-L6M4ljVG.js → useDateFormatter-CRuBYwR6.js} +2 -2
  67. package/dist/{useDeepCompareMemoize-MdvXCwAP.js → useDeepCompareMemoize-B2RNcTmn.js} +1 -1
  68. package/dist/{useLifecycle-CDeB28JV.js → useLifecycle-Bw0JtmoB.js} +1 -1
  69. package/dist/{vega-component-CIkkx4lH.js → vega-component-BV9sYHhU.js} +6 -6
  70. package/dist/{vennDiagram-4TSXK5OY-3XmjJpX3.js → vennDiagram-4TSXK5OY-oHztO7MH.js} +1 -1
  71. package/dist/{wardleyDiagram-VM6X3IG4-CLQU2FaC.js → wardleyDiagram-VM6X3IG4-DWeEjZSc.js} +1 -1
  72. package/dist/{xychartDiagram-S5SC5T6Z-ZYCgWrwe.js → xychartDiagram-S5SC5T6Z-ESBlsY9i.js} +1 -1
  73. package/package.json +1 -1
  74. package/src/core/constants.ts +6 -0
  75. package/src/core/runtime/__tests__/runtime.test.ts +3 -1
  76. package/src/theme/__tests__/useTheme.test.ts +38 -9
  77. package/src/theme/useTheme.ts +16 -1
  78. package/dist/static-state-Ccv-89qp.js +0 -90
@@ -2,19 +2,19 @@ import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
2
2
  import { g as t, h as n, p as r } from "./button-qQhINE7z.js";
3
3
  import { t as i } from "./react-Bgs_wQh3.js";
4
4
  import { t as a } from "./compiler-runtime-C5KHtL5D.js";
5
- import { i as o } from "./copy-icon-BJpgGeTC.js";
6
- import { f as s, h as c } from "./tooltip-DY2U4Rke.js";
7
- import { t as l } from "./check-Cy7tgHcN.js";
8
- import { n as u, r as d } from "./assertNever-mSPR3shX.js";
5
+ import { i as o } from "./copy-icon-CeOpTht4.js";
6
+ import { f as s, h as c } from "./tooltip-DsQZP310.js";
7
+ import { t as l } from "./check-BHRB6N0I.js";
8
+ import { n as u, r as d } from "./assertNever-ChGm2jYv.js";
9
9
  import { t as f } from "./jsx-runtime-D8btoEHk.js";
10
- import { At as p, Et as m, Lt as h, Pt as g, St as _, Tt as v, _t as y, bt as b, cn as x, f as S, fn as ee, jt as te, kt as ne, ln as re, pn as ie, un as ae, vt as C, xt as oe } from "./use-restore-focus-Mex26exl.js";
11
- import { n as se } from "./toast-BP9h0yJZ.js";
10
+ import { Bt as p, Ct as m, Lt as h, Mt as g, Nt as _, Ot as v, Pt as y, Tt as b, bt as x, dn as S, f as ee, fn as te, gn as ne, hn as re, kt as ie, pn as ae, wt as oe, xt as C } from "./use-restore-focus-CTa7IRP6.js";
11
+ import { n as se } from "./toast-DOWc3HtU.js";
12
12
  import { t as ce } from "./objects-DCmMvZtn.js";
13
13
  import { t as w } from "./invariant-DLmrl-hA.js";
14
14
  import { t as le } from "./purify.es-DmnrIjg4.js";
15
- import { t as ue } from "./createReducer-sm4RC5mJ.js";
15
+ import { t as ue } from "./createReducer-BJJ0K5Tu.js";
16
16
  import { H as de, N as fe, P as pe, _ as me } from "./dist-D92tYjLc.js";
17
- import { _ as he, a as ge, i as _e, l as ve, p as ye } from "./static-state-Ccv-89qp.js";
17
+ import { a as he, i as ge, l as _e, m as ve, u as ye } from "./static-state-BhCfPRoz.js";
18
18
  import { t as be } from "./capabilities-DKqMqBzm.js";
19
19
  var xe = c("external-link", [
20
20
  ["path", {
@@ -35,9 +35,9 @@ var xe = c("external-link", [
35
35
  }]]), T = /* @__PURE__ */ e(i(), 1), E = f(), Ce = Object.defineProperty, D = (e, t) => Ce(e, "name", {
36
36
  value: t,
37
37
  configurable: !0
38
- }), we = "Checkbox", [Te, Ee] = ee(we), [De, Oe] = Te(we);
38
+ }), we = "Checkbox", [Te, Ee] = re(we), [De, Oe] = Te(we);
39
39
  function ke(e) {
40
- let { __scopeCheckbox: t, checked: n, children: r, defaultChecked: i, disabled: a, form: o, name: s, onCheckedChange: c, required: l, value: u = "on", internal_do_not_use_render: d } = e, [f, p] = re({
40
+ let { __scopeCheckbox: t, checked: n, children: r, defaultChecked: i, disabled: a, form: o, name: s, onCheckedChange: c, required: l, value: u = "on", internal_do_not_use_render: d } = e, [f, p] = te({
41
41
  prop: n,
42
42
  defaultProp: i ?? !1,
43
43
  onChange: c,
@@ -74,7 +74,7 @@ var Ae = "CheckboxTrigger", je = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ D(
74
74
  let t = /* @__PURE__ */ D(() => f(_.current), "reset");
75
75
  return e.addEventListener("reset", t), () => e.removeEventListener("reset", t);
76
76
  }
77
- }, [o, f]), /* @__PURE__ */ (0, E.jsx)(ie.button, {
77
+ }, [o, f]), /* @__PURE__ */ (0, E.jsx)(ne.button, {
78
78
  type: "button",
79
79
  role: "checkbox",
80
80
  "aria-checked": O(l) ? "mixed" : l,
@@ -116,9 +116,9 @@ var Ae = "CheckboxTrigger", je = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ D(
116
116
  });
117
117
  }, "Checkbox")), Ne = "CheckboxIndicator", Pe = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ D(function(e, t) {
118
118
  let { __scopeCheckbox: n, forceMount: r, ...i } = e, a = Oe(Ne, n);
119
- return /* @__PURE__ */ (0, E.jsx)(x, {
119
+ return /* @__PURE__ */ (0, E.jsx)(S, {
120
120
  present: r || O(a.checked) || a.checked === !0,
121
- children: /* @__PURE__ */ (0, E.jsx)(ie.span, {
121
+ children: /* @__PURE__ */ (0, E.jsx)(ne.span, {
122
122
  "data-state": Re(a.checked),
123
123
  "data-disabled": a.disabled ? "" : void 0,
124
124
  ...i,
@@ -152,7 +152,7 @@ var Ae = "CheckboxTrigger", je = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ D(
152
152
  o
153
153
  ]);
154
154
  let ee = T.useRef(!O(c) && c);
155
- return /* @__PURE__ */ (0, E.jsx)(ie.input, {
155
+ return /* @__PURE__ */ (0, E.jsx)(ne.input, {
156
156
  type: "checkbox",
157
157
  "aria-hidden": !0,
158
158
  defaultChecked: l ?? ee.current,
@@ -557,80 +557,80 @@ function Tt(e) {
557
557
  }
558
558
  //#endregion
559
559
  //#region src/core/executions/atoms.ts
560
- var M = {
560
+ var Et = {
561
561
  runs: /* @__PURE__ */ new Map(),
562
562
  executions: /* @__PURE__ */ new Map(),
563
563
  latest: /* @__PURE__ */ new Map(),
564
564
  results: /* @__PURE__ */ new Map(),
565
565
  scratch: null
566
- }, Et = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new Map(), Dt = /* @__PURE__ */ new Set(), Ot = /* @__PURE__ */ new Set(), kt = /* @__PURE__ */ new Set(), At = /* @__PURE__ */ new Map(), P = h(null), jt = h(null);
567
- function Mt(e, t, n, r) {
566
+ }, Dt = /* @__PURE__ */ new Map(), M = /* @__PURE__ */ new Map(), Ot = /* @__PURE__ */ new Set(), kt = /* @__PURE__ */ new Set(), At = /* @__PURE__ */ new Set(), jt = /* @__PURE__ */ new Map(), N = p(null), Mt = p(null);
567
+ function Nt(e, t, n, r) {
568
568
  return e !== null && e.notebook.replica === t && e.notebook.id === n ? e.value : r;
569
569
  }
570
- function Nt(e) {
571
- let t = e.get(_), n = t === null ? null : e.get(t.notebookAtom);
570
+ function Pt(e) {
571
+ let t = e.get(b), n = t === null ? null : e.get(t.notebookAtom);
572
572
  return t === null || n === null ? null : {
573
573
  replica: t,
574
574
  id: n.id
575
575
  };
576
576
  }
577
- function Pt(e, t) {
578
- let n = Nt(e);
577
+ function Ft(e, t) {
578
+ let n = Pt(e);
579
579
  return n === null ? null : {
580
580
  notebook: n,
581
581
  value: t
582
582
  };
583
583
  }
584
- function Ft(e, t) {
585
- let n = e.get(_);
584
+ function It(e, t) {
585
+ let n = e.get(b);
586
586
  if (n !== t.notebook.replica) return !1;
587
587
  let r = e.get(n.notebookAtom);
588
588
  return r === null || r.id === t.notebook.id;
589
589
  }
590
- var It = h((e) => {
591
- let t = e(_), n = t === null ? null : e(t.notebookAtom)?.id ?? null, r = Mt(e(P), t, n, Dt);
592
- return r.size === 0 ? Ot : new Set([...r].flatMap((e) => e.cells));
593
- }), F = h((e) => {
594
- let t = e(_), n = t === null ? null : e(t.notebookAtom)?.id ?? null, r = t === null ? null : e(t.shownDocumentAtom);
590
+ var Lt = p((e) => {
591
+ let t = e(b), n = t === null ? null : e(t.notebookAtom)?.id ?? null, r = Nt(e(N), t, n, Ot);
592
+ return r.size === 0 ? kt : new Set([...r].flatMap((e) => e.cells));
593
+ }), P = p((e) => {
594
+ let t = e(b), n = t === null ? null : e(t.notebookAtom)?.id ?? null, r = t === null ? null : e(t.shownDocumentAtom);
595
595
  return {
596
- executions: t === null ? M : e(t.executionsAtom),
597
- results: t === null ? Et : e(t.resultsAtom),
598
- cells: r?.cells ?? N,
599
- requested: e(It),
600
- blocked: Mt(e(jt), t, n, kt),
596
+ executions: t === null ? Et : e(t.executionsAtom),
597
+ results: t === null ? Dt : e(t.resultsAtom),
598
+ cells: r?.cells ?? M,
599
+ requested: e(Lt),
600
+ blocked: Nt(e(Mt), t, n, At),
601
601
  runtimeId: t === null ? null : e(t.runtimeAtom)?.id ?? null
602
602
  };
603
- }), Lt = h((e) => {
604
- let t = e(_), n = t === null ? null : e(t.shownDocumentAtom);
603
+ }), Rt = p((e) => {
604
+ let t = e(b), n = t === null ? null : e(t.shownDocumentAtom);
605
605
  return t === null || n === null ? {
606
- cells: N,
607
- executions: M,
608
- results: Et
606
+ cells: M,
607
+ executions: Et,
608
+ results: Dt
609
609
  } : {
610
610
  cells: n.cells,
611
611
  executions: e(t.executionsAtom),
612
612
  results: e(t.resultsAtom)
613
613
  };
614
- }), Rt = h((e) => $e(e(Lt))), zt = h(null), Bt = h((e) => {
615
- let t = e(_), n = t === null ? null : e(t.shownDocumentAtom);
614
+ }), zt = p((e) => $e(e(Rt))), Bt = p(null), Vt = p((e) => {
615
+ let t = e(b), n = t === null ? null : e(t.shownDocumentAtom);
616
616
  return t === null || n === null ? null : {
617
617
  replica: t,
618
618
  id: n.revision.notebook_id
619
619
  };
620
- }), Vt = h((e) => {
621
- let t = e(_), n = e(Bt)?.id ?? null;
620
+ }), Ht = p((e) => {
621
+ let t = e(b), n = e(Vt)?.id ?? null;
622
622
  return {
623
- executions: t === null ? M : e(t.executionsAtom),
624
- results: t === null ? Et : e(t.resultsAtom),
625
- cleared: Mt(e(zt), t, n, At),
626
- cells: t === null ? N : e(t.documentAtom)?.cells ?? N
623
+ executions: t === null ? Et : e(t.executionsAtom),
624
+ results: t === null ? Dt : e(t.resultsAtom),
625
+ cleared: Nt(e(Bt), t, n, jt),
626
+ cells: t === null ? M : e(t.documentAtom)?.cells ?? M
627
627
  };
628
- }), Ht = h((e) => ht(e(Vt))), I = v((e) => ne(Ht, (t) => t.get(e) ?? null, te)), L = v((e) => h((t) => qe(t(I(e)))));
629
- function Ut(e) {
630
- I.remove(e), L.remove(e);
628
+ }), Ut = p((e) => ht(e(Ht))), F = v((e) => g(Ut, (t) => t.get(e) ?? null, y)), I = v((e) => p((t) => qe(t(F(e)))));
629
+ function Wt(e) {
630
+ F.remove(e), I.remove(e);
631
631
  }
632
- function Wt(e, t) {
633
- let n = e.get(Vt), r = new Map(n.cleared);
632
+ function Gt(e, t) {
633
+ let n = e.get(Ht), r = new Map(n.cleared);
634
634
  for (let e of t) {
635
635
  let t = ft(n, e);
636
636
  t?.record.outcome != null && r.set(e, {
@@ -638,19 +638,19 @@ function Wt(e, t) {
638
638
  version: t.outputVersion
639
639
  });
640
640
  }
641
- let i = e.get(Bt);
642
- e.set(zt, i === null ? null : {
641
+ let i = e.get(Vt);
642
+ e.set(Bt, i === null ? null : {
643
643
  notebook: i,
644
644
  value: r
645
645
  });
646
646
  }
647
- var Gt = h((e) => {
648
- let t = e(_);
647
+ var Kt = p((e) => {
648
+ let t = e(b);
649
649
  return t === null ? null : e(t.runtimeAtom)?.status ?? null;
650
650
  });
651
- h((e) => wt(e(F).executions)), h((e) => Tt(e(F)));
652
- var Kt = h((e) => {
653
- let t = e(_);
651
+ p((e) => wt(e(P).executions)), p((e) => Tt(e(P)));
652
+ var qt = p((e) => {
653
+ let t = e(b);
654
654
  if (t === null) return { refused: "No notebook is connected" };
655
655
  if (e(t.connectionAtom).state === k.CLOSED) return { refused: "The notebook is disconnected" };
656
656
  if (e(t.notebookAtom) === null) return "waiting";
@@ -662,67 +662,67 @@ var Kt = h((e) => {
662
662
  default: return "waiting";
663
663
  }
664
664
  });
665
- function qt(e) {
665
+ function Jt(e) {
666
666
  return new Promise((t, n) => {
667
- let r = e.sub(Kt, i);
667
+ let r = e.sub(qt, i);
668
668
  function i() {
669
- let i = e.get(Kt);
669
+ let i = e.get(qt);
670
670
  i !== "waiting" && (r(), i === "running" ? t() : n(Error(i.refused)));
671
671
  }
672
672
  i();
673
673
  });
674
674
  }
675
- function Jt(e, t) {
676
- let n = Nt(e);
675
+ function Yt(e, t) {
676
+ let n = Pt(e);
677
677
  if (n === null) return null;
678
678
  let r = {
679
679
  notebook: n,
680
680
  cells: [...t]
681
- }, i = e.get(P), a = i !== null && i.notebook.replica === n.replica && i.notebook.id === n.id ? i.value : Dt;
682
- return e.set(P, {
681
+ }, i = e.get(N), a = i !== null && i.notebook.replica === n.replica && i.notebook.id === n.id ? i.value : Ot;
682
+ return e.set(N, {
683
683
  notebook: n,
684
684
  value: new Set(a).add(r)
685
685
  }), r;
686
686
  }
687
- function Yt(e, t) {
688
- let n = e.get(P);
687
+ function Xt(e, t) {
688
+ let n = e.get(N);
689
689
  if (n === null || !n.value.has(t)) return;
690
690
  let r = new Set(n.value);
691
- r.delete(t), e.set(P, {
691
+ r.delete(t), e.set(N, {
692
692
  notebook: n.notebook,
693
693
  value: r
694
694
  });
695
695
  }
696
- function Xt(e, t, n) {
696
+ function Zt(e, t, n) {
697
697
  let { replica: r } = t.notebook, i = e.sub(r.executionsAtom, a);
698
698
  function a() {
699
- (!Ft(e, t) || e.get(r.executionsAtom).runs.has(n.id)) && (i(), Yt(e, t));
699
+ (!It(e, t) || e.get(r.executionsAtom).runs.has(n.id)) && (i(), Xt(e, t));
700
700
  }
701
701
  a();
702
702
  }
703
- function Zt(e, t, n) {
704
- let r = e.get(F).blocked;
703
+ function Qt(e, t, n) {
704
+ let r = e.get(P).blocked;
705
705
  if (r.has(t) === n) return;
706
706
  let i = new Set(r);
707
- n ? i.add(t) : i.delete(t), e.set(jt, Pt(e, i));
707
+ n ? i.add(t) : i.delete(t), e.set(Mt, Ft(e, i));
708
708
  }
709
- function Qt(e, t) {
710
- t.status != null && Zt(e, t.cell_id, t.status === "disabled-transitively");
709
+ function $t(e, t) {
710
+ t.status != null && Qt(e, t.cell_id, t.status === "disabled-transitively");
711
711
  }
712
712
  //#endregion
713
713
  //#region src/core/codemirror/editing/commands.ts
714
- var $t = a();
715
- function en(e) {
714
+ var en = a();
715
+ function tn(e) {
716
716
  return (t) => {
717
717
  let n = !1;
718
718
  for (let r of t) r && (n = e(r) || n);
719
719
  return n;
720
720
  };
721
721
  }
722
- var tn = en(me), nn = en(pe);
722
+ var nn = tn(me), rn = tn(pe);
723
723
  //#endregion
724
724
  //#region src/utils/schedule-task.ts
725
- function rn() {
725
+ function an() {
726
726
  let e = globalThis.scheduler;
727
727
  if (typeof e?.postTask == "function") return (t) => {
728
728
  e.postTask(t, { priority: "user-visible" }).catch((e) => {
@@ -743,10 +743,10 @@ function rn() {
743
743
  setTimeout(e, 0);
744
744
  };
745
745
  }
746
- var an = rn();
746
+ var on = an();
747
747
  //#endregion
748
748
  //#region src/core/codemirror/editor-mount-scheduler.ts
749
- function on(e = an) {
749
+ function sn(e = on) {
750
750
  let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = !1;
751
751
  function i() {
752
752
  r || t.size === 0 || (r = !0, e(o));
@@ -789,21 +789,21 @@ function on(e = an) {
789
789
  }
790
790
  };
791
791
  }
792
- var sn = on();
792
+ var cn = sn();
793
793
  //#endregion
794
794
  //#region src/core/mime.ts
795
- function cn(e) {
795
+ function ln(e) {
796
796
  return e === "application/vnd.marimo+error";
797
797
  }
798
- function ln(e) {
798
+ function un(e) {
799
799
  return e === "application/vnd.marimo+traceback";
800
800
  }
801
- function R(e) {
802
- return cn(e) || ln(e);
801
+ function L(e) {
802
+ return ln(e) || un(e);
803
803
  }
804
804
  //#endregion
805
805
  //#region src/components/editor/output/ansi-reduce.ts
806
- var un = class e {
806
+ var dn = class e {
807
807
  lines = [""];
808
808
  cursor = {
809
809
  row: 0,
@@ -892,7 +892,7 @@ var un = class e {
892
892
  render() {
893
893
  return this.lines.join("\n");
894
894
  }
895
- }, dn = class {
895
+ }, fn = class {
896
896
  ESC_REGEX = new RegExp(String.raw`\u001B(?:\[[0-9;]*[A-Za-z]|\([0-9A-Za-z])`, "gu");
897
897
  parse(e) {
898
898
  let t = [], n = 0;
@@ -911,9 +911,9 @@ var un = class e {
911
911
  value: e.slice(n)
912
912
  }), t;
913
913
  }
914
- }, fn = class {
915
- parser = new dn();
916
- buffer = new un();
914
+ }, pn = class {
915
+ parser = new fn();
916
+ buffer = new dn();
917
917
  reduce(e) {
918
918
  return this.reset(), this.append(e), this.render();
919
919
  }
@@ -929,7 +929,7 @@ var un = class e {
929
929
  for (let e of t) e.type === "text" ? this.processText(e.value) : this.buffer.handleEscape(e.value);
930
930
  }
931
931
  reset() {
932
- this.buffer = new un();
932
+ this.buffer = new dn();
933
933
  }
934
934
  render() {
935
935
  return this.buffer.render();
@@ -972,20 +972,20 @@ var un = class e {
972
972
  for (let t of e) t >= " " && (n += t);
973
973
  return n;
974
974
  }
975
- }, z = class e {
975
+ }, R = class e {
976
976
  mimetype;
977
977
  channel;
978
978
  timestamp;
979
979
  code;
980
980
  id;
981
981
  input_id;
982
- ansiReducer = new fn();
982
+ ansiReducer = new pn();
983
983
  _data;
984
984
  get data() {
985
985
  return this._data;
986
986
  }
987
987
  static create(t) {
988
- let n = new fn();
988
+ let n = new pn();
989
989
  return n.append(t.data), new e({
990
990
  mimetype: t.mimetype,
991
991
  channel: t.channel,
@@ -1022,28 +1022,28 @@ var un = class e {
1022
1022
  };
1023
1023
  //#endregion
1024
1024
  //#region src/core/cells/collapseConsoleOutputs.tsx
1025
- function pn(e, t = 5e3) {
1025
+ function mn(e, t = 5e3) {
1026
1026
  let n = [...e];
1027
- if (n.length < 2) return vn(n.map(hn), t);
1027
+ if (n.length < 2) return yn(n.map(gn), t);
1028
1028
  let r = n[n.length - 1], i = n[n.length - 2];
1029
- return mn(r, i) && (_n(r), _n(i), n[n.length - 2] = gn(i, r), n.pop()), vn(n, t);
1029
+ return hn(r, i) && (vn(r), vn(i), n[n.length - 2] = _n(i, r), n.pop()), yn(n, t);
1030
1030
  }
1031
- function mn(e, t) {
1031
+ function hn(e, t) {
1032
1032
  let n = e.mimetype === "text/plain" && t.mimetype === "text/plain";
1033
1033
  if (!n) return !1;
1034
1034
  let r = e.channel === t.channel, i = e.channel !== "stdin";
1035
1035
  return n && r && i;
1036
1036
  }
1037
- function hn(e) {
1038
- return e instanceof z ? e : typeof e.data == "string" ? z.create(e) : e;
1037
+ function gn(e) {
1038
+ return e instanceof R ? e : typeof e.data == "string" ? R.create(e) : e;
1039
1039
  }
1040
- function gn(e, t) {
1041
- return e instanceof z ? e.appendData(t.data) : z.create(e).appendData(t.data);
1040
+ function _n(e, t) {
1041
+ return e instanceof R ? e.appendData(t.data) : R.create(e).appendData(t.data);
1042
1042
  }
1043
- function _n(e) {
1043
+ function vn(e) {
1044
1044
  w(typeof e.data == "string", "expected string output");
1045
1045
  }
1046
- function vn(e, t) {
1046
+ function yn(e, t) {
1047
1047
  let n = 0, r;
1048
1048
  for (r = e.length - 1; r >= 0 && n < t; r--) {
1049
1049
  let t = e[r];
@@ -1073,16 +1073,16 @@ function vn(e, t) {
1073
1073
  }
1074
1074
  //#endregion
1075
1075
  //#region src/core/cells/cell.ts
1076
- function yn(e) {
1076
+ function bn(e) {
1077
1077
  return (e.at(-1)?.id ?? 0) + 1;
1078
1078
  }
1079
- function bn(e) {
1079
+ function xn(e) {
1080
1080
  return e == null || e.mimetype !== "application/vnd.marimo+error" || !Array.isArray(e.data) ? [] : e.data.map((e) => e.type);
1081
1081
  }
1082
- function xn(e, t) {
1082
+ function Sn(e, t) {
1083
1083
  let n = { ...e };
1084
1084
  t.status === "queued" && (n.debuggerActive = !1), t.serialization !== void 0 && (n.serialization = t.serialization);
1085
- let r = bn(t.output).includes("interruption"), i = e.consoleOutputs;
1085
+ let r = xn(t.output).includes("interruption"), i = e.consoleOutputs;
1086
1086
  (r || t.status === "idle") && (n.debuggerActive = !1, i = i.map((e) => e.channel === "stdin" ? {
1087
1087
  channel: e.channel,
1088
1088
  mimetype: e.mimetype,
@@ -1093,26 +1093,26 @@ function xn(e, t) {
1093
1093
  response: e.response ?? ""
1094
1094
  } : e));
1095
1095
  let a = t.console;
1096
- a != null && (i = pn(Array.isArray(a) ? a.map((e, t) => ({
1096
+ a != null && (i = mn(Array.isArray(a) ? a.map((e, t) => ({
1097
1097
  ...e,
1098
1098
  id: t + 1
1099
1099
  })) : [...i, {
1100
1100
  ...a,
1101
- id: yn(i)
1101
+ id: bn(i)
1102
1102
  }])), n.consoleOutputs = i;
1103
1103
  let o = [t.console].flat().filter(Boolean).filter((e) => e.channel === "pdb");
1104
1104
  return o.length > 0 && o.some((e) => e.data === "start") && (n.debuggerActive = !0), n;
1105
1105
  }
1106
- function Sn(e) {
1106
+ function Cn(e) {
1107
1107
  return e === "running" || e === "queued";
1108
1108
  }
1109
- function Cn(e, t, n) {
1109
+ function wn(e, t, n) {
1110
1110
  let { status: r, outcome: i, rendered: a } = e;
1111
- return Sn(r) ? !(r === "running" && a) : n && t.sourceChanged ? !0 : i !== "interrupted" && t.inputsChanged;
1111
+ return Cn(r) ? !(r === "running" && a) : n && t.sourceChanged ? !0 : i !== "interrupted" && t.inputsChanged;
1112
1112
  }
1113
1113
  //#endregion
1114
1114
  //#region src/core/cells/columns.ts
1115
- function wn(e) {
1115
+ function Tn(e) {
1116
1116
  let t = /* @__PURE__ */ new Map(), n = 0;
1117
1117
  for (let r of e.order) {
1118
1118
  let i = e.cells.get(r)?.config.column;
@@ -1120,9 +1120,9 @@ function wn(e) {
1120
1120
  }
1121
1121
  return t;
1122
1122
  }
1123
- function Tn(e) {
1123
+ function En(e) {
1124
1124
  let t = [[]];
1125
- for (let [n, r] of wn(e)) {
1125
+ for (let [n, r] of Tn(e)) {
1126
1126
  for (; t.length <= r;) t.push([]);
1127
1127
  t[r].push(n);
1128
1128
  }
@@ -1130,16 +1130,16 @@ function Tn(e) {
1130
1130
  }
1131
1131
  //#endregion
1132
1132
  //#region src/core/dom/ui-element-constants.ts
1133
- var En = "object-id", Dn = "random-id", On = "abcdefghijklmnopqrstuvwxyz", kn = On + On.toUpperCase(), An = /* @__PURE__ */ new Set(), B = "__scratch__", jn = "setup", Mn = { create() {
1133
+ var Dn = "object-id", On = "random-id", kn = "abcdefghijklmnopqrstuvwxyz", An = kn + kn.toUpperCase(), jn = /* @__PURE__ */ new Set(), z = "__scratch__", Mn = "setup", Nn = { create() {
1134
1134
  let e = 0, t;
1135
1135
  do {
1136
1136
  let n = "";
1137
- for (let e = 0; e < 4; e++) n += kn[Math.floor(Math.random() * 52)];
1137
+ for (let e = 0; e < 4; e++) n += An[Math.floor(Math.random() * 52)];
1138
1138
  t = n, e++;
1139
- } while (An.has(t) && e < 100);
1139
+ } while (jn.has(t) && e < 100);
1140
1140
  if (e >= 100) throw Error("Failed to generate unique CellId after 100 attempts");
1141
- return An.add(t), t;
1142
- } }, V = {
1141
+ return jn.add(t), t;
1142
+ } }, B = {
1143
1143
  create(e) {
1144
1144
  return w(e != null, "cellId is required"), `cell-${e}`;
1145
1145
  },
@@ -1152,7 +1152,7 @@ var En = "object-id", Dn = "random-id", On = "abcdefghijklmnopqrstuvwxyz", kn =
1152
1152
  findElementThroughShadowDOMs(e) {
1153
1153
  let t = e;
1154
1154
  for (; t;) {
1155
- let e = V.findElement(t);
1155
+ let e = B.findElement(t);
1156
1156
  if (e) return e;
1157
1157
  let n = t.getRootNode();
1158
1158
  if (t = n instanceof ShadowRoot ? n.host : t.parentElement, t === n) break;
@@ -1160,33 +1160,33 @@ var En = "object-id", Dn = "random-id", On = "abcdefghijklmnopqrstuvwxyz", kn =
1160
1160
  return null;
1161
1161
  }
1162
1162
  };
1163
- function Nn(e) {
1164
- let t = null, n = V.findElementThroughShadowDOMs(e);
1165
- return n && (t = V.parse(n.id)), t;
1163
+ function Pn(e) {
1164
+ let t = null, n = B.findElementThroughShadowDOMs(e);
1165
+ return n && (t = B.parse(n.id)), t;
1166
1166
  }
1167
- var Pn = {
1167
+ var V = {
1168
1168
  parse(e) {
1169
- return e.getAttribute(En);
1169
+ return e.getAttribute(Dn);
1170
1170
  },
1171
1171
  parseOrThrow(e) {
1172
- let t = Pn.parse(e);
1172
+ let t = V.parse(e);
1173
1173
  return w(t, "<marimo-ui-element/> missing object-id attribute"), t;
1174
1174
  }
1175
1175
  }, Fn = { create(e) {
1176
1176
  return `output-${e}`;
1177
- } }, In = h(/* @__PURE__ */ new Set()), H = h([]), U = h([]);
1177
+ } }, In = p(/* @__PURE__ */ new Set()), H = p([]), U = p([]);
1178
1178
  function Ln() {
1179
- return `column-${Mn.create()}`;
1179
+ return `column-${Nn.create()}`;
1180
1180
  }
1181
- var Rn = h(null, (e, t, n) => {
1182
- let r = Tn(n).length, i = e(H);
1181
+ var Rn = p(null, (e, t, n) => {
1182
+ let r = En(n).length, i = e(H);
1183
1183
  if (i.length === r) return;
1184
1184
  let a = e(U), o = [...i, ...a].slice(0, r);
1185
1185
  for (; o.length < r;) o.push(Ln());
1186
1186
  t(H, o), t(U, a.slice(Math.max(0, r - i.length)));
1187
1187
  });
1188
1188
  function zn(e, t, n) {
1189
- return [...(e === null ? [[]] : Tn(e)).map((e, n) => ({
1189
+ return [...(e === null ? [[]] : En(e)).map((e, n) => ({
1190
1190
  id: t[n] ?? `column-${n}`,
1191
1191
  ids: e
1192
1192
  })), ...n.map((e) => ({
@@ -1214,10 +1214,10 @@ function Vn(e, t, n) {
1214
1214
  };
1215
1215
  }) };
1216
1216
  }
1217
- var Hn = h((e) => {
1217
+ var Hn = p((e) => {
1218
1218
  let t = e(oe), n = t === null ? null : e(t.documentAtom), r = e(Gi);
1219
1219
  return Vn(zn(n, e(H), e(U)), (e) => r[e] ?? null, e(In));
1220
- }), Un = () => g(Hn), Wn = h((e) => e(Hn).columns.length);
1220
+ }), Un = () => h(Hn), Wn = p((e) => e(Hn).columns.length);
1221
1221
  function Gn(e, t) {
1222
1222
  return e.columns.find((e) => e.id === t);
1223
1223
  }
@@ -1291,7 +1291,7 @@ function rr(e) {
1291
1291
  //#endregion
1292
1292
  //#region src/core/cells/document.ts
1293
1293
  function ir(e, t) {
1294
- let n = t.code ?? e.code, r = te(e.config, t.config) ? e.config : nr(t.config);
1294
+ let n = t.code ?? e.code, r = y(e.config, t.config) ? e.config : nr(t.config);
1295
1295
  return n === e.code && t.name === e.name && r === e.config ? e : n === e.code ? {
1296
1296
  ...e,
1297
1297
  name: t.name,
@@ -1304,7 +1304,7 @@ function ir(e, t) {
1304
1304
  };
1305
1305
  }
1306
1306
  function ar(e, t) {
1307
- let n = te(t.order, e.cellIds) ? e.cellIds : [...t.order], { cellData: r, cellRuntime: i, cellHandles: a } = e;
1307
+ let n = y(t.order, e.cellIds) ? e.cellIds : [...t.order], { cellData: r, cellRuntime: i, cellHandles: a } = e;
1308
1308
  for (let o of n) {
1309
1309
  let n = t.cells.get(o), s = e.cellData[o];
1310
1310
  if (n === void 0) continue;
@@ -1358,18 +1358,18 @@ async function sr() {
1358
1358
  }
1359
1359
  //#endregion
1360
1360
  //#region src/core/cells/editor.ts
1361
- var W = h(/* @__PURE__ */ new Set());
1361
+ var W = p(/* @__PURE__ */ new Set());
1362
1362
  function cr(e, t, n) {
1363
1363
  return !!e && !t.has(n);
1364
1364
  }
1365
- h(null, (e, t, { cellId: n }) => {
1365
+ p(null, (e, t, { cellId: n }) => {
1366
1366
  t(W, (e) => /* @__PURE__ */ new Set([...e, n]));
1367
- }), h(null, (e, t, { cellId: n }) => e(W).has(n) ? (t(W, (e) => {
1367
+ }), p(null, (e, t, { cellId: n }) => e(W).has(n) ? (t(W, (e) => {
1368
1368
  let t = new Set(e);
1369
1369
  return t.delete(n), t;
1370
1370
  }), !0) : !1);
1371
- var lr = h(/* @__PURE__ */ new Map());
1372
- h(null, (e, t, { cellId: n }) => {
1371
+ var lr = p(/* @__PURE__ */ new Map());
1372
+ p(null, (e, t, { cellId: n }) => {
1373
1373
  t(lr, (e) => {
1374
1374
  let t = new Map(e);
1375
1375
  return t.delete(n), t;
@@ -1767,7 +1767,7 @@ function yr(e) {
1767
1767
  }
1768
1768
  //#endregion
1769
1769
  //#region src/core/errors/traceback-atom.ts
1770
- var br = h(null);
1770
+ var br = p(null);
1771
1771
  //#endregion
1772
1772
  //#region src/core/cells/logs.ts
1773
1773
  function xr(e) {
@@ -1799,7 +1799,7 @@ function Cr(e) {
1799
1799
  }
1800
1800
  }
1801
1801
  }
1802
- if (t.forEach(wr.log), n.length === 0 && R(e.output?.mimetype) && Array.isArray(e.output.data)) {
1802
+ if (t.forEach(wr.log), n.length === 0 && L(e.output?.mimetype) && Array.isArray(e.output.data)) {
1803
1803
  e.output.data.forEach((t) => {
1804
1804
  wr.log({
1805
1805
  level: "stderr",
@@ -1811,7 +1811,7 @@ function Cr(e) {
1811
1811
  message: JSON.stringify(t)
1812
1812
  });
1813
1813
  });
1814
- let t = e.output.data.filter((e) => "type" in e && e.type === "exception" || e.type === "internal"), n = C.get(_e) === "read";
1814
+ let t = e.output.data.filter((e) => "type" in e && e.type === "exception" || e.type === "internal"), n = C.get(ge) === "read";
1815
1815
  if (t.length > 0 && !Sr && n) {
1816
1816
  Sr = !0;
1817
1817
  let e = t.find((e) => e.traceback);
@@ -1856,7 +1856,7 @@ function Tr(e) {
1856
1856
  //#endregion
1857
1857
  //#region src/components/editor/navigation/focus-utils.ts
1858
1858
  function Er(e, n) {
1859
- let r = document.getElementById(V.create(e));
1859
+ let r = document.getElementById(B.create(e));
1860
1860
  r ? Or(r, n) : t.warn(`[CellFocusManager] focusCell: element not found: ${e}`);
1861
1861
  }
1862
1862
  function Dr() {
@@ -1939,14 +1939,14 @@ function Br({ errored: e, stopped: t }) {
1939
1939
  };
1940
1940
  }
1941
1941
  function Vr({ errored: e, interrupted: t, stopped: n, output: r, showErrorTracebacks: i }) {
1942
- let a = R(r?.mimetype), o = i && a && Array.isArray(r?.data) && r.data.some((e) => e.type === "exception" && "traceback" in e && e.traceback);
1942
+ let a = L(r?.mimetype), o = i && a && Array.isArray(r?.data) && r.data.some((e) => e.type === "exception" && "traceback" in e && e.traceback);
1943
1943
  return (e || t || n || a) && !o;
1944
1944
  }
1945
1945
  //#endregion
1946
1946
  //#region src/core/network/requests.ts
1947
- var Hr = h(null);
1947
+ var Hr = p(null);
1948
1948
  function Ur() {
1949
- let e = g(Hr);
1949
+ let e = h(Hr);
1950
1950
  return w(e, "useRequestClient() requires setting requestClientAtom."), e;
1951
1951
  }
1952
1952
  function Wr() {
@@ -2073,26 +2073,26 @@ function si(e) {
2073
2073
  return ce.mapValues(e.dataset, (e) => typeof e == "string" ? oi(e) : e);
2074
2074
  }
2075
2075
  function ci(e, t) {
2076
- let n = e.parentElement ? Pn.parse(e.parentElement) : void 0;
2076
+ let n = e.parentElement ? V.parse(e.parentElement) : void 0;
2077
2077
  return n && t.has(n) ? t.lookupValue(n) : oi(e.dataset.initialValue);
2078
2078
  }
2079
2079
  function li() {
2080
- if (S()) return document.title || null;
2081
- if (he()) {
2080
+ if (ee()) return document.title || null;
2081
+ if (ve()) {
2082
2082
  let e = ai.getFilename();
2083
2083
  if (e) return e;
2084
2084
  }
2085
2085
  let e = document.querySelector("marimo-filename");
2086
- ve(e, "marimo-filename tag not found");
2086
+ _e(e, "marimo-filename tag not found");
2087
2087
  let t = e.innerHTML;
2088
2088
  return t.length === 0 ? null : t;
2089
2089
  }
2090
2090
  //#endregion
2091
2091
  //#region src/core/saving/file-state.ts
2092
- var q = h(li());
2093
- h(null);
2094
- var ui = h(null);
2095
- h(void 0);
2092
+ var q = p(li());
2093
+ p(null);
2094
+ var ui = p(null);
2095
+ p(void 0);
2096
2096
  //#endregion
2097
2097
  //#region src/utils/storage/typed.ts
2098
2098
  var di = class {
@@ -2435,25 +2435,25 @@ function Oi(e, t) {
2435
2435
  }
2436
2436
  //#endregion
2437
2437
  //#region src/core/network/connection.ts
2438
- var Z = h({ state: k.NOT_STARTED });
2439
- m(null, (e, t) => t === null ? null : {
2438
+ var Z = p({ state: k.NOT_STARTED });
2439
+ ie(null, (e, t) => t === null ? null : {
2440
2440
  phase: t.phase,
2441
2441
  logs: t.log_mode === "append" && e?.phase === t.phase ? e.logs + t.logs : t.logs
2442
2442
  });
2443
2443
  function ki() {
2444
- return b(Z, (e) => e.state === k.OPEN);
2444
+ return m(Z, (e) => e.state === k.OPEN);
2445
2445
  }
2446
2446
  function Ai() {
2447
- return ge() ? ki() : Promise.resolve();
2447
+ return he() ? ki() : Promise.resolve();
2448
2448
  }
2449
- h((e) => e(Z).state === k.CONNECTING), h((e) => e(Z).state === k.OPEN), h((e) => {
2449
+ p((e) => e(Z).state === k.CONNECTING), p((e) => e(Z).state === k.OPEN), p((e) => {
2450
2450
  let t = e(Z);
2451
2451
  return t.state === k.OPEN || t.state === k.NOT_STARTED;
2452
- }), h((e) => e(Z).state === k.CLOSED);
2452
+ }), p((e) => e(Z).state === k.CLOSED);
2453
2453
  //#endregion
2454
2454
  //#region src/components/ui/checkbox.tsx
2455
2455
  var ji = T.forwardRef((e, t) => {
2456
- let r = (0, $t.c)(13), i, a;
2456
+ let r = (0, en.c)(13), i, a;
2457
2457
  r[0] === e ? (i = r[1], a = r[2]) : ({className: i, ...a} = e, r[0] = e, r[1] = i, r[2] = a);
2458
2458
  let o;
2459
2459
  r[3] === i ? o = r[4] : (o = n("flex items-center justify-center peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground", i), r[3] = i, r[4] = o);
@@ -2477,13 +2477,13 @@ ji.displayName = Me.displayName;
2477
2477
  //#region src/core/cells/scrollCellIntoView.ts
2478
2478
  function Mi({ cellId: e, cell: n, isCodeHidden: r, codeFocus: i, variableName: a }) {
2479
2479
  if (!n) return;
2480
- let o = document.getElementById(V.create(e));
2480
+ let o = document.getElementById(B.create(e));
2481
2481
  if (!o) t.warn("scrollCellIntoView: element not found");
2482
2482
  else if (Dr()) Or(o);
2483
2483
  else {
2484
2484
  if (r) Or(o);
2485
2485
  else {
2486
- sn.promote(e);
2486
+ cn.promote(e);
2487
2487
  let r = n.current?.editorView;
2488
2488
  if (!r) {
2489
2489
  t.warn("scrollCellIntoView: editor not found", e);
@@ -2525,7 +2525,7 @@ function Pi() {
2525
2525
  });
2526
2526
  }
2527
2527
  function Fi(e) {
2528
- let t = document.getElementById(V.create(e));
2528
+ let t = document.getElementById(B.create(e));
2529
2529
  return t?.scrollIntoView({
2530
2530
  behavior: "smooth",
2531
2531
  block: "center"
@@ -2543,18 +2543,18 @@ function Ii(e) {
2543
2543
  return {
2544
2544
  ...e,
2545
2545
  cellData: {
2546
- [B]: tr({
2547
- id: B,
2546
+ [z]: tr({
2547
+ id: z,
2548
2548
  config: t
2549
2549
  }),
2550
2550
  ...e.cellData
2551
2551
  },
2552
2552
  cellRuntime: {
2553
- [B]: rr(),
2553
+ [z]: rr(),
2554
2554
  ...e.cellRuntime
2555
2555
  },
2556
2556
  cellHandles: {
2557
- [B]: (0, T.createRef)(),
2557
+ [z]: (0, T.createRef)(),
2558
2558
  ...e.cellHandles
2559
2559
  }
2560
2560
  };
@@ -2583,7 +2583,7 @@ var { reducer: Ri, createActions: zi, useActions: Bi, valueAtom: Q } = ue(Li, {
2583
2583
  let n = t.cell_id, r = Hi({
2584
2584
  state: e,
2585
2585
  cellId: n,
2586
- cellReducer: (e) => xn(e, t)
2586
+ cellReducer: (e) => Sn(e, t)
2587
2587
  });
2588
2588
  return {
2589
2589
  ...r,
@@ -2622,8 +2622,8 @@ var { reducer: Ri, createActions: zi, useActions: Bi, valueAtom: Q } = ue(Li, {
2622
2622
  });
2623
2623
  },
2624
2624
  resetCellRuntimes: (e) => {
2625
- let t = he(), n = { ...e.cellRuntime };
2626
- for (let r of [...e.cellIds, B]) {
2625
+ let t = ve(), n = { ...e.cellRuntime };
2626
+ for (let r of [...e.cellIds, z]) {
2627
2627
  let i = e.cellRuntime[r];
2628
2628
  n[r] = t && i !== void 0 && i.consoleOutputs.length > 0 ? i : rr();
2629
2629
  }
@@ -2647,8 +2647,8 @@ var { reducer: Ri, createActions: zi, useActions: Bi, valueAtom: Q } = ue(Li, {
2647
2647
  scrollKey: null
2648
2648
  };
2649
2649
  },
2650
- foldAll: (e) => (tn(Object.values(e.cellHandles).map((e) => e.current?.editorView)), e),
2651
- unfoldAll: (e) => (nn(Object.values(e.cellHandles).map((e) => e.current?.editorView)), e),
2650
+ foldAll: (e) => (nn(Object.values(e.cellHandles).map((e) => e.current?.editorView)), e),
2651
+ unfoldAll: (e) => (rn(Object.values(e.cellHandles).map((e) => e.current?.editorView)), e),
2652
2652
  clearLogs: (e) => ({
2653
2653
  ...e,
2654
2654
  cellLogs: []
@@ -2681,13 +2681,13 @@ function Hi({ state: e, cellId: n, cellReducer: r }) {
2681
2681
  }
2682
2682
  var Ui = zi((e) => {
2683
2683
  C.set(Q, (t) => Ri(t, e));
2684
- }).addLogs, $ = h((e) => e(Q).cellIds);
2685
- h((e) => e($).length === 1), h((e) => Mr(e(Q)).length > 0), h((e) => Nr(e(Q)).length > 0), h((e) => Pr(e(Q))), h((e) => Fr(e(Q))), h((e) => Ar(e(Q), e(F), e(Rt)));
2686
- var Wi = h((e) => {
2684
+ }).addLogs, $ = p((e) => e(Q).cellIds);
2685
+ p((e) => e($).length === 1), p((e) => Mr(e(Q)).length > 0), p((e) => Nr(e(Q)).length > 0), p((e) => Pr(e(Q))), p((e) => Fr(e(Q))), p((e) => Ar(e(Q), e(P), e(zt)));
2686
+ var Wi = p((e) => {
2687
2687
  let { cellIds: t, cellData: n } = e(Q);
2688
2688
  return t.map((t) => {
2689
- let r = e(I(t)), { name: i } = n[t];
2690
- if (r !== null && R(r.mimetype)) {
2689
+ let r = e(F(t)), { name: i } = n[t];
2690
+ if (r !== null && L(r.mimetype)) {
2691
2691
  w(Array.isArray(r.data), "Expected array data");
2692
2692
  let e = r.data.filter((e) => !e.type.includes("ancestor"));
2693
2693
  if (e.length > 0) return {
@@ -2701,45 +2701,45 @@ var Wi = h((e) => {
2701
2701
  }
2702
2702
  return null;
2703
2703
  }).filter(Boolean);
2704
- }), Gi = y(h((e) => {
2704
+ }), Gi = x(p((e) => {
2705
2705
  let t = {};
2706
2706
  for (let n of e($)) {
2707
- let r = e(L(n));
2707
+ let r = e(I(n));
2708
2708
  r !== null && r.items.length > 0 && (t[n] = r);
2709
2709
  }
2710
2710
  return t;
2711
- })), Ki = h((e) => Ke(e($).map((t) => e(L(t)))));
2712
- h((e) => e(Wi).length);
2713
- var qi = y(h((e) => {
2711
+ })), Ki = p((e) => Ke(e($).map((t) => e(I(t)))));
2712
+ p((e) => e(Wi).length);
2713
+ var qi = x(p((e) => {
2714
2714
  let { cellIds: t, cellData: n } = e(Q);
2715
2715
  return ce.fromEntries(t.map((e) => [e, n[e]?.name]));
2716
2716
  }));
2717
- h((e) => e(Q).scrollKey);
2718
- var Ji = () => g($), Yi = () => g(qi), Xi = () => C.get(Q), Zi = () => C.get(Q).cellIds, Qi = () => {
2717
+ p((e) => e(Q).scrollKey);
2718
+ var Ji = () => h($), Yi = () => h(qi), Xi = () => C.get(Q), Zi = () => C.get(Q).cellIds, Qi = () => {
2719
2719
  let { cellIds: e, cellData: t } = C.get(Q);
2720
2720
  return e.map((e) => t[e]?.name).filter(Boolean);
2721
2721
  };
2722
- p(ne(Q, (e) => e.cellIds.map((t) => e.cellData[t]))), h((e) => e(Q).cellIds.length > 0);
2723
- var $i = v((e) => h((t) => t(Q).cellData[e])), ea = v((e) => h((t) => t(Q).cellRuntime[e])), ta = v((e) => h((t) => t(Q).cellHandles[e]));
2722
+ _(g(Q, (e) => e.cellIds.map((t) => e.cellData[t]))), p((e) => e(Q).cellIds.length > 0);
2723
+ var $i = v((e) => p((t) => t(Q).cellData[e])), ea = v((e) => p((t) => t(Q).cellRuntime[e])), ta = v((e) => p((t) => t(Q).cellHandles[e]));
2724
2724
  function na(e) {
2725
- $i.remove(e), ea.remove(e), ta.remove(e), Ut(e);
2725
+ $i.remove(e), ea.remove(e), ta.remove(e), Wt(e);
2726
2726
  }
2727
2727
  var ra = (e) => {
2728
2728
  let { cellHandles: t } = C.get(Q);
2729
2729
  return t[e].current?.editorView;
2730
- }, ia = (e) => (sn.promote(e), ra(e));
2730
+ }, ia = (e) => (cn.promote(e), ra(e));
2731
2731
  function aa() {
2732
2732
  return Bi();
2733
2733
  }
2734
2734
  //#endregion
2735
2735
  //#region src/core/errors/error-entries.ts
2736
2736
  function oa(e) {
2737
- if (cn(e.mimetype)) {
2737
+ if (ln(e.mimetype)) {
2738
2738
  if (!Array.isArray(e.data)) return null;
2739
2739
  let t = e.data.filter((e) => !e.type.includes("ancestor"));
2740
2740
  return t.length === 0 ? null : { errorData: t };
2741
2741
  }
2742
- return ln(e.mimetype) ? typeof e.data != "string" || e.data.length === 0 ? null : {
2742
+ return un(e.mimetype) ? typeof e.data != "string" || e.data.length === 0 ? null : {
2743
2743
  errorData: [],
2744
2744
  tracebackHtml: e.data
2745
2745
  } : null;
@@ -2748,7 +2748,7 @@ function sa(e) {
2748
2748
  return e.some((e) => "traceback" in e && e.traceback);
2749
2749
  }
2750
2750
  function ca(e) {
2751
- let t = e?.find((e) => ln(e.mimetype));
2751
+ let t = e?.find((e) => un(e.mimetype));
2752
2752
  if (t && typeof t.data == "string" && t.data.length !== 0) return t.data;
2753
2753
  }
2754
2754
  function la(e, t) {
@@ -2758,8 +2758,8 @@ function la(e, t) {
2758
2758
  function ua(e) {
2759
2759
  let { cellIds: t, cellRuntime: n, cellData: r } = e.get(Q), i = [];
2760
2760
  for (let [a, o] of t.entries()) {
2761
- let t = e.get(I(o));
2762
- if (t === null || !R(t.mimetype)) continue;
2761
+ let t = e.get(F(o));
2762
+ if (t === null || !L(t.mimetype)) continue;
2763
2763
  let s = oa(t);
2764
2764
  if (!s) continue;
2765
2765
  let c = $n(r[o].name, a), l = t.code ?? r[o].code;
@@ -2785,4 +2785,4 @@ function pa(e) {
2785
2785
  return e.tracebackHtml && t.push(K(e.tracebackHtml)), e.errorData.length > 0 && t.push(e.errorData.map(fa).join("\n\n")), t.join("\n\n");
2786
2786
  }
2787
2787
  //#endregion
2788
- export { K as $, Se as $t, Oi as A, Dn as At, ei as B, Wt as Bt, Ni as C, Fn as Ct, Z as D, Pn as Dt, ji as E, jn as Et, q as F, F as Ft, Hr as G, qt as Gt, Qr as H, Qt as Ht, ui as I, Rt as It, jr as J, Xe as Jt, Ur as K, Yt as Kt, oi as L, L as Lt, pi as M, Sn as Mt, di as N, Cn as Nt, ki as O, Nn as Ot, fi as P, Xt as Pt, yr as Q, Be as Qt, si as R, I as Rt, Mi as S, Mn as St, Pi as T, B as Tt, qr as U, Jt as Ut, ti as V, Ft as Vt, Wr as W, Gt as Wt, Vr as X, Je as Xt, Br as Y, k as Yt, Er as Z, Ge as Zt, Ri as _, Jn as _t, Ui as a, or as at, Yi as b, Wn as bt, zi as c, er as ct, Qi as d, H as dt, xe as en, fr as et, Zi as f, Kn as ft, Ki as g, Yn as gt, Q as h, qn as ht, ua as i, sr as it, hi as j, wn as jt, Ai as k, En as kt, ia as l, Zn as lt, Li as m, Gn as mt, pa as n, lr as nt, $i as o, $n as ot, Xi as p, U as pt, Rr as q, St as qt, fa as r, W as rt, $ as s, Qn as st, da as t, cr as tt, ra as u, In as ut, na as v, Hn as vt, Fi as w, V as wt, aa as x, Un as xt, Ji as y, Ln as yt, ci as z, Vt as zt };
2788
+ export { K as $, Se as $t, Oi as A, On as At, ei as B, Gt as Bt, Ni as C, Fn as Ct, Z as D, V as Dt, ji as E, Mn as Et, q as F, P as Ft, Hr as G, Jt as Gt, Qr as H, $t as Ht, ui as I, zt as It, jr as J, Xe as Jt, Ur as K, Xt as Kt, oi as L, I as Lt, pi as M, Cn as Mt, di as N, wn as Nt, ki as O, Pn as Ot, fi as P, Zt as Pt, yr as Q, Be as Qt, si as R, F as Rt, Mi as S, Nn as St, Pi as T, z as Tt, qr as U, Yt as Ut, ti as V, It as Vt, Wr as W, Kt as Wt, Vr as X, Je as Xt, Br as Y, k as Yt, Er as Z, Ge as Zt, Ri as _, Jn as _t, Ui as a, or as at, Yi as b, Wn as bt, zi as c, er as ct, Qi as d, H as dt, xe as en, fr as et, Zi as f, Kn as ft, Ki as g, Yn as gt, Q as h, qn as ht, ua as i, sr as it, hi as j, Tn as jt, Ai as k, Dn as kt, ia as l, Zn as lt, Li as m, Gn as mt, pa as n, lr as nt, $i as o, $n as ot, Xi as p, U as pt, Rr as q, St as qt, fa as r, W as rt, $ as s, Qn as st, da as t, cr as tt, ra as u, In as ut, na as v, Hn as vt, Fi as w, B as wt, aa as x, Un as xt, Ji as y, Ln as yt, ci as z, Ht as zt };