@datalayer/agent-runtimes 1.6.86 → 1.6.88

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 (344) hide show
  1. package/dist-embed/chunks/{AgentDetails-BRhO9qA_.js → AgentDetails-DdSlGfQV.js} +1 -1
  2. package/dist-embed/chunks/{AgentDetailsDialog-DAWAmYS1.js → AgentDetailsDialog-C7rvaKS1.js} +1 -1
  3. package/dist-embed/chunks/{CellSidebarExtension-B_Bqi3Eh.js → CellSidebarExtension-CrgdhbHy.js} +1 -1
  4. package/dist-embed/chunks/{ChatView-eRieNBDa.js → ChatView-Bw7yLD4U.js} +1 -1
  5. package/dist-embed/chunks/{CollapsiblePlugin-DPGnrmLj.js → CollapsiblePlugin-ng8VFSwH.js} +1 -1
  6. package/dist-embed/chunks/{ContextPie-h_II4EDU.js → ContextPie-Duhkymga.js} +1 -1
  7. package/dist-embed/chunks/{DeckComponent-oBh8nbTa.js → DeckComponent-BhyoCP90.js} +2 -2
  8. package/dist-embed/chunks/{DocumentView-C8G8fA7K.js → DocumentView-Dn2adk7S.js} +1 -1
  9. package/dist-embed/chunks/{EphemeralDocument-Bm1w17Zw.js → EphemeralDocument-BiQZswSQ.js} +1 -1
  10. package/dist-embed/chunks/{EphemeralNotebook-jQ7FGCY-.js → EphemeralNotebook-C04wMmoE.js} +1 -1
  11. package/dist-embed/chunks/{ExcalidrawComponent-BgjhoJC3.js → ExcalidrawComponent-GkzKDk_S.js} +1 -1
  12. package/dist-embed/chunks/{ExcalidrawModal-DtdsEiaS.js → ExcalidrawModal-Ct44VSBv.js} +1 -1
  13. package/dist-embed/chunks/{JupyterLexicalExtension-Dr8dgCst.js → JupyterLexicalExtension-BYde4Hzz.js} +8 -8
  14. package/dist-embed/chunks/{KernelVariables-cH-x-Hrc.js → KernelVariables-DvfwDxTX.js} +1 -1
  15. package/dist-embed/chunks/{NotebookToolSurfaces-BcIduPcQ.js → NotebookToolSurfaces-BvKDvb3M.js} +1 -1
  16. package/dist-embed/chunks/{NotebookView-LJ0GBHTQ.js → NotebookView-Wo8VVvUY.js} +1 -1
  17. package/dist-embed/chunks/{Output-Do1CYRIF.js → Output-BmVt4DpZ.js} +1 -1
  18. package/dist-embed/chunks/{SandboxDetailsDialog-DjP6mCWy.js → SandboxDetailsDialog-CCmkIp8x.js} +1 -1
  19. package/dist-embed/chunks/{SchemaForm-1QzMu6Zk.js → SchemaForm-YDAPV6Rb.js} +1 -1
  20. package/dist-embed/chunks/{SheetTabs-DJG69znU.js → SheetTabs-PG3DQn2N.js} +1 -1
  21. package/dist-embed/chunks/{SpreadsheetPreviewView-5marsdKE.js → SpreadsheetPreviewView-CpUuO1Di.js} +1 -1
  22. package/dist-embed/chunks/{SpreadsheetView-CmD-dAjn.js → SpreadsheetView-CsSXGqRw.js} +1 -1
  23. package/dist-embed/chunks/{WidgetVariableView-BQoMV999.js → WidgetVariableView-BBupZR8G.js} +1 -1
  24. package/dist-embed/chunks/{YouTubePlugin-BCHN7vdi.js → YouTubePlugin-BOnLCvAR.js} +1 -1
  25. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-CF8QpiZa.js → abnfDiagram-VCTEODGH-C5V-1V3E.js} +1 -1
  26. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-GnaR64st.js → abnfDiagram-VCTEODGH-CvZ8usho.js} +1 -1
  27. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-BSmEjUJk.js → abnfDiagram-VCTEODGH-DN0kRlog.js} +1 -1
  28. package/dist-embed/chunks/{ar-SA-G6X2FPQ2-4AR7vABL.js → ar-SA-G6X2FPQ2-DloHADQr.js} +1 -1
  29. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-b_EnmOeS.js → architectureDiagram-5GKGNRK7-BeTQQNyc.js} +1 -1
  30. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-ByAYkSMW.js → architectureDiagram-5GKGNRK7-Bwqgkba9.js} +1 -1
  31. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-Cy6c9GhS.js → architectureDiagram-5GKGNRK7-DRfUn2vu.js} +1 -1
  32. package/dist-embed/chunks/{az-AZ-76LH7QW2-DQ2RQ6Bt.js → az-AZ-76LH7QW2-ZZtVb3rf.js} +1 -1
  33. package/dist-embed/chunks/{bg-BG-XCXSNQG7-BRTYabxb.js → bg-BG-XCXSNQG7-9xliuV5e.js} +1 -1
  34. package/dist-embed/chunks/{blockDiagram-868be97b-C6Xxmbgc.js → blockDiagram-868be97b-DQhIB20U.js} +1 -1
  35. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-zXh6gZYF.js → blockDiagram-I7D4REHJ-BjLfxD7u.js} +1 -1
  36. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-BBd_q6Z7.js → blockDiagram-I7D4REHJ-BjW3QpXh.js} +1 -1
  37. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-Clrwi7_Q.js → blockDiagram-I7D4REHJ-DUfJri3_.js} +1 -1
  38. package/dist-embed/chunks/{bn-BD-2XOGV67Q-DJpR_aiV.js → bn-BD-2XOGV67Q-Bhkca3_3.js} +1 -1
  39. package/dist-embed/chunks/{c4Diagram-3f4bdde3-BhBNs69f.js → c4Diagram-3f4bdde3-dS_U3gYR.js} +1 -1
  40. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-BWQ9xHoN.js → c4Diagram-7LVT6UL2-BK8yvli2.js} +1 -1
  41. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-DcCc8HaH.js → c4Diagram-7LVT6UL2-Da5uNT8x.js} +1 -1
  42. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-p14SIG7V.js → c4Diagram-7LVT6UL2-O_rZefrz.js} +1 -1
  43. package/dist-embed/chunks/{ca-ES-6MX7JW3Y-BrHrTXrx.js → ca-ES-6MX7JW3Y-jpG1o3Op.js} +1 -1
  44. package/dist-embed/chunks/{chunk-2Q5K7J3B-BkzWX8eg.js → chunk-2Q5K7J3B-BX9u1bBi.js} +1 -1
  45. package/dist-embed/chunks/{chunk-2Q5K7J3B-CWx-QJ0-.js → chunk-2Q5K7J3B-DiqqlJZw.js} +1 -1
  46. package/dist-embed/chunks/{chunk-2Q5K7J3B-CtmdieBX.js → chunk-2Q5K7J3B-JhdIsXWp.js} +1 -1
  47. package/dist-embed/chunks/{chunk-5VM5RSS4-Ciba-ybC.js → chunk-5VM5RSS4-BbOPwJfe.js} +1 -1
  48. package/dist-embed/chunks/{chunk-5VM5RSS4-C7mbT2Vq.js → chunk-5VM5RSS4-C5X9VB1v.js} +1 -1
  49. package/dist-embed/chunks/{chunk-5VM5RSS4-O8p7luYq.js → chunk-5VM5RSS4-box8kQsT.js} +1 -1
  50. package/dist-embed/chunks/{chunk-F27PBJKO-Bo5boRfj.js → chunk-F27PBJKO-BUeWPnw5.js} +1 -1
  51. package/dist-embed/chunks/{chunk-F27PBJKO-CZHz6AS9.js → chunk-F27PBJKO-CQM02DXR.js} +1 -1
  52. package/dist-embed/chunks/{chunk-F27PBJKO-WqHcL2s0.js → chunk-F27PBJKO-syxUNYMu.js} +1 -1
  53. package/dist-embed/chunks/{chunk-IMKFNOWR-CPdtPffh.js → chunk-IMKFNOWR-B87sc0vl.js} +1 -1
  54. package/dist-embed/chunks/{chunk-IMKFNOWR-BJR6rkFo.js → chunk-IMKFNOWR-CPIe37ka.js} +1 -1
  55. package/dist-embed/chunks/{chunk-IMKFNOWR-Csfu1kFU.js → chunk-IMKFNOWR-rg2BEcj6.js} +1 -1
  56. package/dist-embed/chunks/{chunk-JWPE2WC7-BVXd-ICe.js → chunk-JWPE2WC7-BGdc9-bH.js} +1 -1
  57. package/dist-embed/chunks/{chunk-JWPE2WC7-Cq6Q947j.js → chunk-JWPE2WC7-DXZeG2qg.js} +1 -1
  58. package/dist-embed/chunks/{chunk-JWPE2WC7-Bf4pFlIJ.js → chunk-JWPE2WC7-NvLQtuoq.js} +1 -1
  59. package/dist-embed/chunks/{chunk-POPQ4Y6H-DhNnPwZp.js → chunk-POPQ4Y6H-BgR92oKl.js} +1 -1
  60. package/dist-embed/chunks/{chunk-POPQ4Y6H-s1yt1ZtK.js → chunk-POPQ4Y6H-DWWKSDND.js} +1 -1
  61. package/dist-embed/chunks/{chunk-POPQ4Y6H-B_rWRGt2.js → chunk-POPQ4Y6H-UAJm0Siu.js} +1 -1
  62. package/dist-embed/chunks/{chunk-SVP7TREG-CHN6fclq.js → chunk-SVP7TREG-BE97ZGVE.js} +1 -1
  63. package/dist-embed/chunks/{chunk-SVP7TREG-8oKVa2mm.js → chunk-SVP7TREG-BGHt1HDi.js} +1 -1
  64. package/dist-embed/chunks/{chunk-SVP7TREG-CsFEUe5B.js → chunk-SVP7TREG-lMq3S-u-.js} +1 -1
  65. package/dist-embed/chunks/{chunk-TICWLB2K-CSCMv_QA.js → chunk-TICWLB2K-BdUzhQPw.js} +1 -1
  66. package/dist-embed/chunks/{chunk-TICWLB2K-BsCtCkEM.js → chunk-TICWLB2K-CeH9Mpzc.js} +1 -1
  67. package/dist-embed/chunks/{chunk-TICWLB2K-InZQ5ZEH.js → chunk-TICWLB2K-D6WJ64X6.js} +1 -1
  68. package/dist-embed/chunks/{chunk-XXDRQBXY-z8go8Kjf.js → chunk-XXDRQBXY-B8THsPMh.js} +1 -1
  69. package/dist-embed/chunks/{chunk-XXDRQBXY-Y8pSpMzF.js → chunk-XXDRQBXY-BU32lP3z.js} +1 -1
  70. package/dist-embed/chunks/{chunk-XXDRQBXY-sm2AIgJ5.js → chunk-XXDRQBXY-CjAMT3RS.js} +1 -1
  71. package/dist-embed/chunks/{classDiagram-ZZMXUADV-BjEOw29S.js → classDiagram-ZZMXUADV-Cy9bb-Ja.js} +1 -1
  72. package/dist-embed/chunks/{classDiagram-ZZMXUADV-G9WI_1Zg.js → classDiagram-ZZMXUADV-HBhnoh6h.js} +1 -1
  73. package/dist-embed/chunks/{classDiagram-ZZMXUADV-DJ40c8si.js → classDiagram-ZZMXUADV-dVm_zkxF.js} +1 -1
  74. package/dist-embed/chunks/{classDiagram-f62afe4f-Blm1wT1_.js → classDiagram-f62afe4f-jrNOgtbP.js} +1 -1
  75. package/dist-embed/chunks/{classDiagram-v2-604399ef-DtWqjJhW.js → classDiagram-v2-604399ef-CIao-4MQ.js} +1 -1
  76. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-BjEOw29S.js → classDiagram-v2-VYDZK3BY-Cy9bb-Ja.js} +1 -1
  77. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-G9WI_1Zg.js → classDiagram-v2-VYDZK3BY-HBhnoh6h.js} +1 -1
  78. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-DJ40c8si.js → classDiagram-v2-VYDZK3BY-dVm_zkxF.js} +1 -1
  79. package/dist-embed/chunks/{core-BrYTRvTy.js → core-trN55qc5.js} +1 -1
  80. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-j_7L0NF5.js → cose-bilkent-JH36ORCC-D2gVNaYW.js} +1 -1
  81. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-C73aLaB-.js → cose-bilkent-JH36ORCC-DFWJgtSE.js} +1 -1
  82. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-DCtKiRmD.js → cose-bilkent-JH36ORCC-DGrxjlJ4.js} +1 -1
  83. package/dist-embed/chunks/{createText-aed3d8b3-B0tLexrf.js → createText-aed3d8b3-DoLPKXK1.js} +1 -1
  84. package/dist-embed/chunks/{cs-CZ-2BRQDIVT-CmCt0bDq.js → cs-CZ-2BRQDIVT-BMA1Xu87.js} +1 -1
  85. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-BSwaTAfL.js → cynefinDiagram-5FMLGOSQ-BZ1LtKUy.js} +1 -1
  86. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-DXr1M_CB.js → cynefinDiagram-5FMLGOSQ-DExZ3BYo.js} +1 -1
  87. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-DLyDkFEh.js → cynefinDiagram-5FMLGOSQ-DhFh7Gts.js} +1 -1
  88. package/dist-embed/chunks/{da-DK-5WZEPLOC-Bow4-dps.js → da-DK-5WZEPLOC-smzK_QPz.js} +1 -1
  89. package/dist-embed/chunks/{dagre-GXQ25YYZ-CPu-St26.js → dagre-GXQ25YYZ-4P90jeEC.js} +1 -1
  90. package/dist-embed/chunks/{dagre-GXQ25YYZ-Bfxayyi1.js → dagre-GXQ25YYZ-CQ05bX5J.js} +1 -1
  91. package/dist-embed/chunks/{dagre-GXQ25YYZ-DTWZ8vY1.js → dagre-GXQ25YYZ-MXGi4287.js} +1 -1
  92. package/dist-embed/chunks/{de-DE-XR44H4JA-DOrKYiYP.js → de-DE-XR44H4JA-CfWQxGGf.js} +1 -1
  93. package/dist-embed/chunks/{diagram-S7CK7UJ4-ERKr1j6v.js → diagram-S7CK7UJ4-Ccq8-Zxr.js} +1 -1
  94. package/dist-embed/chunks/{diagram-S7CK7UJ4-Biw5mnoN.js → diagram-S7CK7UJ4-CvR2q_hg.js} +1 -1
  95. package/dist-embed/chunks/{diagram-S7CK7UJ4-ewBgYmRN.js → diagram-S7CK7UJ4-xgW0lqt_.js} +1 -1
  96. package/dist-embed/chunks/{diagram-UQ7AKVKN-B-f2Afei.js → diagram-UQ7AKVKN-Csc8IuSs.js} +1 -1
  97. package/dist-embed/chunks/{diagram-UQ7AKVKN-C-6kzgTn.js → diagram-UQ7AKVKN-D6nWV9sq.js} +1 -1
  98. package/dist-embed/chunks/{diagram-UQ7AKVKN-CGNA7gub.js → diagram-UQ7AKVKN-DM05uJg0.js} +1 -1
  99. package/dist-embed/chunks/{diagram-VSXAHHWV-DRVoe_PH.js → diagram-VSXAHHWV-C0Dte6B4.js} +1 -1
  100. package/dist-embed/chunks/{diagram-VSXAHHWV-7M08zFHc.js → diagram-VSXAHHWV-CBb3q1Lt.js} +1 -1
  101. package/dist-embed/chunks/{diagram-VSXAHHWV-CTQu2IBp.js → diagram-VSXAHHWV-ChcqzpvG.js} +1 -1
  102. package/dist-embed/chunks/{diagram-VX7I27RA-vkcQI8-t.js → diagram-VX7I27RA-D8OyA7LV.js} +1 -1
  103. package/dist-embed/chunks/{diagram-VX7I27RA-DHwSWNj4.js → diagram-VX7I27RA-DA3s85ZI.js} +1 -1
  104. package/dist-embed/chunks/{diagram-VX7I27RA-B_LkfTnq.js → diagram-VX7I27RA-DFBWpFKi.js} +1 -1
  105. package/dist-embed/chunks/{diagram-Z3DM3KII-D0Xt6xwn.js → diagram-Z3DM3KII-CWv5dRb1.js} +1 -1
  106. package/dist-embed/chunks/{diagram-Z3DM3KII-YAo8QSYR.js → diagram-Z3DM3KII-DViUyD1V.js} +1 -1
  107. package/dist-embed/chunks/{diagram-Z3DM3KII-BZ9tmKdd.js → diagram-Z3DM3KII-DpwpLNON.js} +1 -1
  108. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-DN2tb-X8.js → ebnfDiagram-PWID7BFC-CeZcQDV3.js} +1 -1
  109. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-C2oLjL45.js → ebnfDiagram-PWID7BFC-DogBQteX.js} +1 -1
  110. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-Dk5WVIim.js → ebnfDiagram-PWID7BFC-ZbRTmpLY.js} +1 -1
  111. package/dist-embed/chunks/{edges-b2856ca0-BSzU9ga-.js → edges-b2856ca0-D_o-rhcf.js} +1 -1
  112. package/dist-embed/chunks/{el-GR-BZB4AONW-BTtxEAc0.js → el-GR-BZB4AONW-B66N5_hN.js} +1 -1
  113. package/dist-embed/chunks/{erDiagram-5d81789a--wvCe6Ur.js → erDiagram-5d81789a-Fv2KfQrA.js} +1 -1
  114. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-BDw_Db3e.js → erDiagram-RLTQ6QDP-BGg8orkr.js} +1 -1
  115. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-BTXMcY7Y.js → erDiagram-RLTQ6QDP-CmahDLTF.js} +1 -1
  116. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-BsU1EeJN.js → erDiagram-RLTQ6QDP-QI_LQlaL.js} +1 -1
  117. package/dist-embed/chunks/{es-ES-U4NZUMDT-DhrLOB7I.js → es-ES-U4NZUMDT-B9FR_uSt.js} +1 -1
  118. package/dist-embed/chunks/{esm-VjpQWsU9.js → esm--zHizpYG.js} +1 -1
  119. package/dist-embed/chunks/{esm-BFRTiV0k.js → esm-BaCqpqKi.js} +1 -1
  120. package/dist-embed/chunks/{eu-ES-A7QVB2H4-CdpglPNY.js → eu-ES-A7QVB2H4-BOXiXCGc.js} +1 -1
  121. package/dist-embed/chunks/{fa-IR-HGAKTJCU-Ea2hzNvl.js → fa-IR-HGAKTJCU-DZGgNuMT.js} +1 -1
  122. package/dist-embed/chunks/{fi-FI-Z5N7JZ37-D6KBS1-v.js → fi-FI-Z5N7JZ37-CaWIHowf.js} +1 -1
  123. package/dist-embed/chunks/{flowDb-185abca5-CBeP2_ZY.js → flowDb-185abca5-Bme86bTZ.js} +1 -1
  124. package/dist-embed/chunks/{flowDiagram-1629c991-LZzO5ZR8.js → flowDiagram-1629c991-Dgzjtx-J.js} +1 -1
  125. package/dist-embed/chunks/{flowDiagram-HODETNUW-DNjEQlAR.js → flowDiagram-HODETNUW-CgvZqEVs.js} +1 -1
  126. package/dist-embed/chunks/{flowDiagram-HODETNUW-DP1PWdQF.js → flowDiagram-HODETNUW-CmuRDMmw.js} +1 -1
  127. package/dist-embed/chunks/{flowDiagram-HODETNUW-_U05MBMl.js → flowDiagram-HODETNUW-OUrVNdIM.js} +1 -1
  128. package/dist-embed/chunks/{flowDiagram-v2-1d953310-DeqYSBVG.js → flowDiagram-v2-1d953310-C0-FfyAn.js} +1 -1
  129. package/dist-embed/chunks/{flowchart-elk-definition-6df44142-Dg5bSBS4.js → flowchart-elk-definition-6df44142-Cj7Q5rsQ.js} +1 -1
  130. package/dist-embed/chunks/{fr-FR-RHASNOE6-CeDw1EdR.js → fr-FR-RHASNOE6-JbYWEs2C.js} +1 -1
  131. package/dist-embed/chunks/{ganttDiagram-3b0b3873-D9Pr_Kxk.js → ganttDiagram-3b0b3873-11vGPr5M.js} +1 -1
  132. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-Baccn166.js → ganttDiagram-EL5Y4UJY-BKVYCh-L.js} +1 -1
  133. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-DmwhuzrV.js → ganttDiagram-EL5Y4UJY-DjmeWOsd.js} +1 -1
  134. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-Qz5HuyzZ.js → ganttDiagram-EL5Y4UJY-sX30iW6f.js} +1 -1
  135. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-CF5nE-hV.js → gitGraphDiagram-WWUBYQGX-BuldyYGe.js} +1 -1
  136. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-BUlSUrle.js → gitGraphDiagram-WWUBYQGX-CVcSYkDK.js} +1 -1
  137. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-ZgEb3qK-.js → gitGraphDiagram-WWUBYQGX-D5bCd_Fv.js} +1 -1
  138. package/dist-embed/chunks/{gitGraphDiagram-f01e8bc2-BqpGV-_U.js → gitGraphDiagram-f01e8bc2-CWnInLhH.js} +1 -1
  139. package/dist-embed/chunks/{gl-ES-HMX3MZ6V-DK2-uVTg.js → gl-ES-HMX3MZ6V-DHOQCvQH.js} +1 -1
  140. package/dist-embed/chunks/{he-IL-6SHJWFNN-Fk0F_rV-.js → he-IL-6SHJWFNN-T-2jEF-H.js} +1 -1
  141. package/dist-embed/chunks/{hi-IN-IWLTKZ5I-03USmwuM.js → hi-IN-IWLTKZ5I-DnwHC230.js} +1 -1
  142. package/dist-embed/chunks/{hu-HU-A5ZG7DT2-BSbsIqRs.js → hu-HU-A5ZG7DT2-CXi3BH37.js} +1 -1
  143. package/dist-embed/chunks/{id-ID-SAP4L64H-Def1ERB7.js → id-ID-SAP4L64H-CLNAMqbr.js} +1 -1
  144. package/dist-embed/chunks/{index-DrrVr0x3.js → index-5os8HYj-.js} +1 -1
  145. package/dist-embed/chunks/{index-9bae90f3-9T5x-xqi.js → index-9bae90f3-iredpvJb.js} +1 -1
  146. package/dist-embed/chunks/{index-CHu5zo1L.js → index-BeJsO4Vc.js} +1 -1
  147. package/dist-embed/chunks/{index-z8PItpd8.js → index-C5HZB8ue.js} +2 -2
  148. package/dist-embed/chunks/{index-Df2MkvAW.js → index-CLB4KPZs.js} +4 -4
  149. package/dist-embed/chunks/{index-DB6fbGKT.js → index-DqWZNFUh.js} +1 -1
  150. package/dist-embed/chunks/{index-DObGLuCI.js → index-s25RSqvt.js} +4 -4
  151. package/dist-embed/chunks/index.esm-BLnMhA7S.js +1 -0
  152. package/dist-embed/chunks/{index.esm-BA_6VWW2.js → index.esm-CDmg415B.js} +1 -1
  153. package/dist-embed/chunks/{infoDiagram-27XIBGKW-D3fIZzte.js → infoDiagram-27XIBGKW-C5jY9v4i.js} +1 -1
  154. package/dist-embed/chunks/{infoDiagram-27XIBGKW-Cs7bZlH6.js → infoDiagram-27XIBGKW-ZpA0pyod.js} +1 -1
  155. package/dist-embed/chunks/{infoDiagram-27XIBGKW-B4XVsJvC.js → infoDiagram-27XIBGKW-r53wKy7u.js} +1 -1
  156. package/dist-embed/chunks/{infoDiagram-a29d40f1-DkWa9MRC.js → infoDiagram-a29d40f1-Knwr4YPu.js} +1 -1
  157. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-BB-Kv-Mj.js → ishikawaDiagram-5VMMS53U-DZTg3ecD.js} +1 -1
  158. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-BIytcjnR.js → ishikawaDiagram-5VMMS53U-DyyVsa6G.js} +1 -1
  159. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-B6nIkJxX.js → ishikawaDiagram-5VMMS53U-_ZSb2XNA.js} +1 -1
  160. package/dist-embed/chunks/{it-IT-JPQ66NNP-SLcJY1NM.js → it-IT-JPQ66NNP-txSVmIqw.js} +1 -1
  161. package/dist-embed/chunks/{ja-JP-DBVTYXUO-Cc9AUQ4A.js → ja-JP-DBVTYXUO-DOImz4yG.js} +1 -1
  162. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-Bs6ObzT9.js → journeyDiagram-3NMN7TZE-Bc9JVKJo.js} +1 -1
  163. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-DjgUmoWA.js → journeyDiagram-3NMN7TZE-ChyAFriv.js} +1 -1
  164. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-C3yCP95B.js → journeyDiagram-3NMN7TZE-DAnc386V.js} +1 -1
  165. package/dist-embed/chunks/{journeyDiagram-95396277-Dj4xwdzk.js → journeyDiagram-95396277-BebgPn4W.js} +1 -1
  166. package/dist-embed/chunks/{kaa-6HZHGXH3-CzXQn7ER.js → kaa-6HZHGXH3-B2yEdYaM.js} +1 -1
  167. package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-Cd1AWKsn.js → kab-KAB-ZGHBKWFO-sLTnjbMU.js} +1 -1
  168. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-_mcHB773.js → kanban-definition-UXKFOSKX-C2nVULib.js} +1 -1
  169. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-B9DSJpj9.js → kanban-definition-UXKFOSKX-CaaDxJqC.js} +1 -1
  170. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-Chsw2-Nq.js → kanban-definition-UXKFOSKX-Ceyuj1Ce.js} +1 -1
  171. package/dist-embed/chunks/{kk-KZ-P5N5QNE5-CoeOUA0W.js → kk-KZ-P5N5QNE5-BDlGvfGX.js} +1 -1
  172. package/dist-embed/chunks/{km-KH-HSX4SM5Z-Newj9En6.js → km-KH-HSX4SM5Z-CooQACBW.js} +1 -1
  173. package/dist-embed/chunks/{ko-KR-MTYHY66A-B0HPCdz1.js → ko-KR-MTYHY66A-Bj_rlaK_.js} +1 -1
  174. package/dist-embed/chunks/{ku-TR-6OUDTVRD-DGP0qnbh.js → ku-TR-6OUDTVRD-Bj6Ypm8A.js} +1 -1
  175. package/dist-embed/chunks/{layout-DTdkd155.js → layout-BjpOdFu2.js} +1 -1
  176. package/dist-embed/chunks/{layout-D_LOxL0l.js → layout-DQIVAfpO.js} +1 -1
  177. package/dist-embed/chunks/{layout-W4AzWc9F.js → layout-Dqr0Lpzq.js} +1 -1
  178. package/dist-embed/chunks/{lib-CXGDRspZ.js → lib-14GbWfrY.js} +1 -1
  179. package/dist-embed/chunks/{lib-CADgZZ9y.js → lib-4swlpTXy.js} +1 -1
  180. package/dist-embed/chunks/{lib-B8KSw9bH.js → lib-BQq_nDIJ.js} +1 -1
  181. package/dist-embed/chunks/{lib-Y90USIm4.js → lib-B_Y-fFGM.js} +1 -1
  182. package/dist-embed/chunks/{lib-BYzUzQ6H.js → lib-Bi3C17qp.js} +1 -1
  183. package/dist-embed/chunks/{lib-nq0B6NsD.js → lib-BnWPn-3C.js} +1 -1
  184. package/dist-embed/chunks/{lib-CaukawRB.js → lib-CFjofO2V.js} +1 -1
  185. package/dist-embed/chunks/{lib-B8ebpTVD.js → lib-CZdsrJQn.js} +1 -1
  186. package/dist-embed/chunks/{lib-Cn7qCM0u.js → lib-CjtFb8n-.js} +1 -1
  187. package/dist-embed/chunks/{lib-Enno6S7H.js → lib-CxLkAp-u.js} +1 -1
  188. package/dist-embed/chunks/{lib-Coc8tcSm.js → lib-D-SlE5VC.js} +1 -1
  189. package/dist-embed/chunks/{lib-EuT6O3Jf.js → lib-D8GpP3sJ.js} +1 -1
  190. package/dist-embed/chunks/{lib-Bc3R7boK.js → lib-DTFhY99t.js} +1 -1
  191. package/dist-embed/chunks/{lib-DDbDl1bK.js → lib-Df9xZsJQ.js} +1 -1
  192. package/dist-embed/chunks/{lib-CrCTDU2F.js → lib-Dte5toRY.js} +1 -1
  193. package/dist-embed/chunks/{lib-BSeAgx1v.js → lib-RkdqeSxj.js} +1 -1
  194. package/dist-embed/chunks/{lib-YvkJZ6Rp.js → lib-XPaJtC26.js} +1 -1
  195. package/dist-embed/chunks/{lib-CLcIUOT7.js → lib-ZCrl6o8i.js} +1 -1
  196. package/dist-embed/chunks/{lib-DKIJv0vv.js → lib-epJftt6F.js} +1 -1
  197. package/dist-embed/chunks/{lt-LT-XHIRWOB4-BIsLadFj.js → lt-LT-XHIRWOB4-tCy9B-KD.js} +1 -1
  198. package/dist-embed/chunks/{lv-LV-5QDEKY6T-C8HmZZBF.js → lv-LV-5QDEKY6T-D7otgK4T.js} +1 -1
  199. package/dist-embed/chunks/{mermaid.core-Dd-D7tJ4.js → mermaid.core-DMHnDUdQ.js} +4 -4
  200. package/dist-embed/chunks/{mermaid.core-By9AWIOp.js → mermaid.core-DySu4CMa.js} +3 -3
  201. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-Uv7-26v7.js → mindmap-definition-YA3MSWOX-BXfU9jpH.js} +1 -1
  202. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-CmGscTNk.js → mindmap-definition-YA3MSWOX-BxYK9vLg.js} +1 -1
  203. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-CCpwK8vh.js → mindmap-definition-YA3MSWOX-DQSoT62j.js} +1 -1
  204. package/dist-embed/chunks/{mindmap-definition-e4c1d938-aCX0qYqH.js → mindmap-definition-e4c1d938-GSsr5zyA.js} +1 -1
  205. package/dist-embed/chunks/{mr-IN-CRQNXWMA-DKYnEuji.js → mr-IN-CRQNXWMA-C_WuMJ-7.js} +1 -1
  206. package/dist-embed/chunks/{my-MM-5M5IBNSE-MY3GKeMd.js → my-MM-5M5IBNSE-ljxQ9hC9.js} +1 -1
  207. package/dist-embed/chunks/{nb-NO-T6EIAALU-txIp5vuE.js → nb-NO-T6EIAALU-D2s2RIr7.js} +1 -1
  208. package/dist-embed/chunks/{nl-NL-IS3SIHDZ-C6xelwh4.js → nl-NL-IS3SIHDZ-BnT13jFW.js} +1 -1
  209. package/dist-embed/chunks/{nn-NO-6E72VCQL-BFYvN5n1.js → nn-NO-6E72VCQL-obFqc-dJ.js} +1 -1
  210. package/dist-embed/chunks/{oc-FR-POXYY2M6-uGpH7RML.js → oc-FR-POXYY2M6-Dp0fg3-H.js} +1 -1
  211. package/dist-embed/chunks/{pa-IN-N4M65BXN-Cg4Z-vtz.js → pa-IN-N4M65BXN-BefFR002.js} +1 -1
  212. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-DLONs192.js → pegDiagram-XKGWAZYB-FSobI14k.js} +1 -1
  213. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-C1R8Kk6K.js → pegDiagram-XKGWAZYB-GlLsdSxR.js} +1 -1
  214. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-dwQNJiaW.js → pegDiagram-XKGWAZYB-iCCMOEMa.js} +1 -1
  215. package/dist-embed/chunks/{percentages-BXMCSKIN-9RttMFHC.js → percentages-BXMCSKIN-D1a6fCH1.js} +5 -5
  216. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-DiT0kFGb.js → pieDiagram-E7YTZNPT-BLVqNMWJ.js} +1 -1
  217. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-CH60iHt1.js → pieDiagram-E7YTZNPT-CIfzhxTy.js} +1 -1
  218. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-Cm-wzRi8.js → pieDiagram-E7YTZNPT-ffhUIieA.js} +1 -1
  219. package/dist-embed/chunks/{pieDiagram-c941bede-BF587JLB.js → pieDiagram-c941bede-nYu7i5OI.js} +1 -1
  220. package/dist-embed/chunks/{pl-PL-T2D74RX3-Dv_CTL10.js → pl-PL-T2D74RX3-BO36IHPS.js} +1 -1
  221. package/dist-embed/chunks/{plugin-Bvp_HQZg.js → plugin-m2JrXH0S.js} +1 -1
  222. package/dist-embed/chunks/{pt-BR-5N22H2LF-CK-yjA9j.js → pt-BR-5N22H2LF-DeQn8LGc.js} +1 -1
  223. package/dist-embed/chunks/{pt-PT-UZXXM6DQ-DYb7ailg.js → pt-PT-UZXXM6DQ-BY1iT-VW.js} +1 -1
  224. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-mkOZIUHb.js → quadrantDiagram-AXDQQJYC-BE9RPE6m.js} +1 -1
  225. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-B1wf6Zth.js → quadrantDiagram-AXDQQJYC-DbYIZcyN.js} +1 -1
  226. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-DWDtOx8-.js → quadrantDiagram-AXDQQJYC-Dpzqg33f.js} +1 -1
  227. package/dist-embed/chunks/{quadrantDiagram-cf8b8fe0-CE6GwviF.js → quadrantDiagram-cf8b8fe0-nVG6Aygu.js} +1 -1
  228. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-DrkBEH1z.js → railroadDiagram-O6MQD6OU-CEl2l0ZE.js} +1 -1
  229. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-DEB7gRmX.js → railroadDiagram-O6MQD6OU-CwaTW3Mo.js} +1 -1
  230. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-DjA_m2-o.js → railroadDiagram-O6MQD6OU-jikRRl2W.js} +1 -1
  231. package/dist-embed/chunks/{renderer-B_98xkGt.js → renderer-CCsq5PXp.js} +1 -1
  232. package/dist-embed/chunks/{requirementDiagram-53bda41b-BsRjuGBf.js → requirementDiagram-53bda41b-CXGOrv-O.js} +1 -1
  233. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-C8d0kJ1A.js → requirementDiagram-BXWQKSXE-Bd0fV1Bn.js} +1 -1
  234. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-S8WT8VJ1.js → requirementDiagram-BXWQKSXE-ClYVmNTl.js} +1 -1
  235. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-82Ybj2ki.js → requirementDiagram-BXWQKSXE-DEQBP2xS.js} +1 -1
  236. package/dist-embed/chunks/{ro-RO-JPDTUUEW-1Cu9X8j1.js → ro-RO-JPDTUUEW-BJDoWheT.js} +1 -1
  237. package/dist-embed/chunks/{ru-RU-B4JR7IUQ-Bl3rV2YR.js → ru-RU-B4JR7IUQ-tTkTCAO1.js} +1 -1
  238. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-C2LowYxA.js → sankeyDiagram-P5KCCOFB-CLR82118.js} +1 -1
  239. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-CKqSAqcJ.js → sankeyDiagram-P5KCCOFB-CuMdtMPP.js} +1 -1
  240. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-eNBOyfBR.js → sankeyDiagram-P5KCCOFB-DH-uxGJV.js} +1 -1
  241. package/dist-embed/chunks/{sankeyDiagram-c3ef121a-BAS8V2Ov.js → sankeyDiagram-c3ef121a-nnS5nxSr.js} +1 -1
  242. package/dist-embed/chunks/{sequenceDiagram-82a5b84f-BWNvF-m7.js → sequenceDiagram-82a5b84f-BXXPsnTm.js} +1 -1
  243. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-CxH0MlFa.js → sequenceDiagram-WJ2MYXX4-CkWCOxWE.js} +1 -1
  244. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-C_2alFNp.js → sequenceDiagram-WJ2MYXX4-D00NbcmA.js} +1 -1
  245. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-fsR56p6L.js → sequenceDiagram-WJ2MYXX4-VyUqwKEJ.js} +1 -1
  246. package/dist-embed/chunks/{si-LK-N5RQ5JYF-C2t5ES1t.js → si-LK-N5RQ5JYF-D4AT7z9z.js} +1 -1
  247. package/dist-embed/chunks/{sizeCapture-INFHLROL-BCe0IiFV.js → sizeCapture-INFHLROL-B_CNNL_v.js} +1 -1
  248. package/dist-embed/chunks/{sizeCapture-INFHLROL-BsZaIjAU.js → sizeCapture-INFHLROL-_h3QW8w5.js} +1 -1
  249. package/dist-embed/chunks/{sizeCapture-INFHLROL-Y7lBmAj6.js → sizeCapture-INFHLROL-cLmnJm7s.js} +1 -1
  250. package/dist-embed/chunks/{sk-SK-C5VTKIMK-BPwM2QoN.js → sk-SK-C5VTKIMK-zTXKcnhq.js} +1 -1
  251. package/dist-embed/chunks/{sl-SI-NN7IZMDC-BCS7eO-5.js → sl-SI-NN7IZMDC-DrxXPVrt.js} +1 -1
  252. package/dist-embed/chunks/{state-DeMGhTAB.js → state-CGa66Nqd.js} +1 -1
  253. package/dist-embed/chunks/{stateDiagram-43e79a5f-2cuSVith.js → stateDiagram-43e79a5f-CKwOZnPj.js} +1 -1
  254. package/dist-embed/chunks/{stateDiagram-D77RDMKH-DosU0FIz.js → stateDiagram-D77RDMKH-BVJqlFiv.js} +1 -1
  255. package/dist-embed/chunks/{stateDiagram-D77RDMKH-ul2eLf5Q.js → stateDiagram-D77RDMKH-CEvuFuTH.js} +1 -1
  256. package/dist-embed/chunks/{stateDiagram-D77RDMKH-3P7AgNud.js → stateDiagram-D77RDMKH-Ns0E2Xy4.js} +1 -1
  257. package/dist-embed/chunks/{stateDiagram-v2-2041ed4f-Ur2pX7Zl.js → stateDiagram-v2-2041ed4f-Dx6MQIKx.js} +1 -1
  258. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-D0rhfnrW.js → stateDiagram-v2-MP3YSRHH-C_JHNwKt.js} +1 -1
  259. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-BvlJBilq.js → stateDiagram-v2-MP3YSRHH-DXcA38of.js} +1 -1
  260. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-DeEmivLr.js → stateDiagram-v2-MP3YSRHH-ok1qePbZ.js} +1 -1
  261. package/dist-embed/chunks/{styles-455b33cd-DPOVDa0x.js → styles-455b33cd-CyGhxLIv.js} +1 -1
  262. package/dist-embed/chunks/{styles-f932cba9-Dev7yXQc.js → styles-f932cba9-Yfe3P5e2.js} +1 -1
  263. package/dist-embed/chunks/{styles-fcc2142b-70zGEKfV.js → styles-fcc2142b-CoUogcOD.js} +1 -1
  264. package/dist-embed/chunks/{subset-shared.chunk-Cs06OLE4.js → subset-shared.chunk-Ez82ye3f.js} +1 -1
  265. package/dist-embed/chunks/{subset-worker.chunk-C-vXxYep.js → subset-worker.chunk-BJr6TVB9.js} +1 -1
  266. package/dist-embed/chunks/{substates-BuHNVWkx.js → substates-Bs9ZMVGa.js} +1 -1
  267. package/dist-embed/chunks/{sv-SE-XGPEYMSR-sUR_yJ3Z.js → sv-SE-XGPEYMSR-CVuCUAbC.js} +1 -1
  268. package/dist-embed/chunks/{svgDrawCommon-148a3cd9-zokUeLzq.js → svgDrawCommon-148a3cd9-Vfy_vJEN.js} +1 -1
  269. package/dist-embed/chunks/{swimlanes-42K2YHIH-x4BMo9Cs.js → swimlanes-42K2YHIH-BMEa5pc_.js} +1 -1
  270. package/dist-embed/chunks/{swimlanes-42K2YHIH-CIW2hU2l.js → swimlanes-42K2YHIH-CpRw9PHz.js} +1 -1
  271. package/dist-embed/chunks/{swimlanes-42K2YHIH-DOkKP2_2.js → swimlanes-42K2YHIH-DO1ZzP4k.js} +1 -1
  272. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-zOAH82Ya.js → swimlanesDiagram-VR7AAH4N-BCaTTDxJ.js} +1 -1
  273. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-9yw92Xx_.js → swimlanesDiagram-VR7AAH4N-BYKvE-MW.js} +1 -1
  274. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-BlFZ7eQS.js → swimlanesDiagram-VR7AAH4N-BucpGmoC.js} +1 -1
  275. package/dist-embed/chunks/{ta-IN-2NMHFXQM-c1DneC5B.js → ta-IN-2NMHFXQM-BURg7Kc1.js} +1 -1
  276. package/dist-embed/chunks/{th-TH-HPSO5L25-TIsXPiQR.js → th-TH-HPSO5L25-CxVkDzOV.js} +1 -1
  277. package/dist-embed/chunks/{timeline-definition-24CTP7MA-C9Ed6D0K.js → timeline-definition-24CTP7MA-CRpA2xfq.js} +1 -1
  278. package/dist-embed/chunks/{timeline-definition-24CTP7MA-kHlycslq.js → timeline-definition-24CTP7MA-C_RPFzcS.js} +1 -1
  279. package/dist-embed/chunks/{timeline-definition-24CTP7MA-BfM-0614.js → timeline-definition-24CTP7MA-DUJPQe9n.js} +1 -1
  280. package/dist-embed/chunks/{timeline-definition-7545f45a-B4ECAP9Q.js → timeline-definition-7545f45a-BPBA2KPg.js} +1 -1
  281. package/dist-embed/chunks/{tr-TR-DEFEU3FU-Bvb4Ep_L.js → tr-TR-DEFEU3FU-DzMZjlaq.js} +1 -1
  282. package/dist-embed/chunks/{uk-UA-QMV73CPH-BNgdD_2E.js → uk-UA-QMV73CPH-DBHj_NAU.js} +1 -1
  283. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-7gMUaOyw.js → vennDiagram-4TSXK5OY-ByKQXzaL.js} +1 -1
  284. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-Dt9fBhlj.js → vennDiagram-4TSXK5OY-C4cLgb45.js} +1 -1
  285. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-CrE30dtz.js → vennDiagram-4TSXK5OY-CRiS0wYe.js} +1 -1
  286. package/dist-embed/chunks/{vi-VN-M7AON7JQ-T0aYX7Py.js → vi-VN-M7AON7JQ-B8B39qmP.js} +1 -1
  287. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-CsR-8GhP.js → wardleyDiagram-VM6X3IG4-BbgqGTmD.js} +1 -1
  288. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-6HRbbvDt.js → wardleyDiagram-VM6X3IG4-CLayLpj4.js} +1 -1
  289. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-AvAVDPLG.js → wardleyDiagram-VM6X3IG4-CnxCRlDr.js} +1 -1
  290. package/dist-embed/chunks/{xychartDiagram-3f383b91-C09F8RkF.js → xychartDiagram-3f383b91-zh1CmS72.js} +1 -1
  291. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-CkZtbHvK.js → xychartDiagram-S5SC5T6Z-CYJl0Gtl.js} +1 -1
  292. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-VWPR98LV.js → xychartDiagram-S5SC5T6Z-CoRCml5l.js} +1 -1
  293. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-ZZD1fZ1L.js → xychartDiagram-S5SC5T6Z-RhhCg-yn.js} +1 -1
  294. package/dist-embed/chunks/{zh-CN-LNUGB5OW-CpDHeCAz.js → zh-CN-LNUGB5OW-OOkUvmDB.js} +1 -1
  295. package/dist-embed/chunks/{zh-HK-E62DVLB3-B5Kmyhoq.js → zh-HK-E62DVLB3-r2T4uQQz.js} +1 -1
  296. package/dist-embed/chunks/{zh-TW-RAJ6MFWO-D-Gvp4EC.js → zh-TW-RAJ6MFWO-CVJ2FptU.js} +1 -1
  297. package/dist-embed/datalayer-app-main.js +206 -61
  298. package/lib/apps/Application.d.ts +1 -1
  299. package/lib/apps/Application.js +4 -0
  300. package/lib/apps/agentUiPlugins.d.ts +1 -1
  301. package/lib/apps/agentUiPlugins.js +1 -1
  302. package/lib/apps/apps/AppRenderer.d.ts +7 -0
  303. package/lib/apps/apps/AppRenderer.js +21 -2
  304. package/lib/apps/apps/appspec.js +7 -1
  305. package/lib/apps/core/index.d.ts +33 -1
  306. package/lib/apps/core/index.js +15 -0
  307. package/lib/apps/plugins/chat/ChatView.js +3 -0
  308. package/lib/apps/plugins/trip-budget/index.d.ts +1 -1
  309. package/lib/apps/plugins/trip-budget/read.d.ts +1 -1
  310. package/lib/apps/plugins/trip-budget/read.js +1 -1
  311. package/lib/apps/plugins/trip-itinerary/index.d.ts +1 -1
  312. package/lib/apps/plugins/trip-itinerary/read.d.ts +1 -1
  313. package/lib/apps/plugins/trip-itinerary/read.js +1 -1
  314. package/lib/apps/plugins/trip-options/index.d.ts +1 -1
  315. package/lib/apps/plugins/trip-options/read.d.ts +1 -1
  316. package/lib/apps/plugins/trip-options/read.js +1 -1
  317. package/lib/apps/plugins/trip-summary/index.d.ts +1 -1
  318. package/lib/apps/shell/LeftPanel.d.ts +85 -0
  319. package/lib/apps/shell/LeftPanel.js +138 -0
  320. package/lib/apps/shell/LoopWorkspace.js +27 -2
  321. package/lib/apps/shell/index.d.ts +1 -0
  322. package/lib/apps/shell/index.js +1 -0
  323. package/lib/chat/Chat.d.ts +1 -1
  324. package/lib/chat/Chat.js +2 -2
  325. package/lib/chat/assistant/SpeechBalloon.d.ts +4 -2
  326. package/lib/chat/assistant/SpeechBalloon.js +3 -1
  327. package/lib/chat/base/ChatBase.js +2 -1
  328. package/lib/chat/header/ChatHeaderBase.d.ts +7 -1
  329. package/lib/chat/header/ChatHeaderBase.js +2 -2
  330. package/lib/specs/actions.js +2 -2
  331. package/lib/specs/agentPresentations.d.ts +26 -0
  332. package/lib/specs/agentPresentations.js +64 -0
  333. package/lib/specs/agents/agents.d.ts +1 -1
  334. package/lib/specs/agents/agents.js +118 -106
  335. package/lib/specs/apps.d.ts +6 -6
  336. package/lib/specs/apps.js +98 -46
  337. package/lib/specs/appspecSchema.js +7 -0
  338. package/lib/specs/backendTools.js +3 -3
  339. package/lib/specs/mcpServers.js +1 -1
  340. package/lib/types/agentspecs.d.ts +15 -0
  341. package/lib/types/chat.d.ts +12 -0
  342. package/package.json +1 -1
  343. package/scripts/codegen/generate_agents.py +93 -2
  344. package/dist-embed/chunks/index.esm-CjezntnN.js +0 -1
@@ -1,4 +1,4 @@
1
- import{d as V}from"./LexicalToolRegistry-rXaW8uXA.js";import{D as Xl,a as Jl,b as Vl,e as Yl,c as Gl,g as Zl,i as Kl,f as Ql,l as ec,h as tc,j as nc,k as sc,m as oc,n as rc,r as ic,o as ac,p as lc,q as cc,s as uc,t as dc,v as fc,w as pc,x as mc,y as gc,z as hc,u as bc}from"./LexicalToolRegistry-rXaW8uXA.js";import{_ as qt,E as Mn,G as Dn,H as Bn,K as me,M as Wt,O as ot,P as rt,Q as jn,R as Fn,S as Xt,U as Un,V as Jt,W as zn,X as Hn,Y as Vt,Z as Yt,a0 as qn,a1 as Wn,a2 as Xn,a3 as Jn,C as Gt,a4 as Vn,a5 as Zt,a6 as Yn,a7 as Gn,a8 as Ce,a9 as Q,aa as Kt,ab as it,ac as xe,ad as at,ae as Re,af as Zn,ag as Be,ah as Ve,ai as lt,aj as Kn,ak as Ye,al as Qn,am as es,an as ts,ao as Ge,ap as Qt,aq as en,ar as tn,as as Ie,at as ns,au as ss,av as nn,aw as os,ax as Pe,$ as rs,b as is,a as as,c as ls,ay as sn,az as Y,aA as cs,aB as us,aC as Ze,aD as ds,aE as fs,aF as ps,aG as ms,aH as ct,aI as gs,aJ as hs,aK as bs,aL as ys,aM as xs,aN as Es,aO as Oe,aP as Ke,aQ as bt,aR as yt,aS as Ts,aT as Cs,aU as vs,aV as ws,aW as Ss,aX as Ls,aY as _s,aZ as ks,a_ as As,x as on,a$ as Ns,b0 as $s,b1 as Rs,b2 as Is,b3 as Ps,b4 as Os,b5 as Ue,b6 as Ms,b7 as Ds,b8 as Bs,b9 as js,ba as Fs,bb as rn,bc as an,bd as ln,be as cn,j as Us,T as zs,L as Hs,w as qs,k as Ws,l as Xs,D as Js,m as Vs,n as Ys,o as Gs,p as Zs,t as Ks,bf as Qs,s as eo,F as to,u as no,v as so,bg as oo,bh as ro}from"./JupyterLexicalExtension-Dr8dgCst.js";import{bi as xc,bj as Ec,bk as Tc,bl as Cc,bm as vc,bn as wc,bo as Sc,bp as Lc,bq as _c,br as kc,bs as Ac,bt as Nc,bu as $c,bv as Rc,d as Ic,e as Pc,bw as Oc,bx as Mc,B as Dc,by as Bc,A as jc,bz as Fc,bA as Uc,bB as zc,bC as Hc,bD as qc,bE as Wc,bF as Xc,bG as Jc,bH as Vc,bI as Yc,bJ as Gc,bK as Zc,bL as Kc,bM as Qc,bN as eu,bO as tu,bP as nu,f as su,bQ as ou,g as ru,bR as iu,bS as au,bT as lu,bU as cu,bV as uu,q as du,bW as fu,bX as pu,bY as mu,bZ as gu,b_ as hu,b$ as bu,c0 as yu,c1 as xu,c2 as Eu,c3 as Tu,c4 as Cu,c5 as vu,c6 as wu,c7 as Su,c8 as Lu,c9 as _u,ca as ku,cb as Au,cc as Nu,cd as $u,ce as Ru,cf as Iu,cg as Pu,ch as Ou,ci as Mu,cj as Du,I as Bu,ck as ju,cl as Fu,cm as Uu,cn as zu,co as Hu,cp as qu,cq as Wu,cr as Xu,cs as Ju,ct as Vu,cu as Yu,cv as Gu,h as Zu,z as Ku,cw as Qu,cx as ed,cy as td,cz as nd,cA as sd,cB as od,cC as rd,cD as id,cE as ad,cF as ld,cG as cd,J as ud,cH as dd,cI as fd,cJ as pd,cK as md,cL as gd,cM as hd,cN as bd,cO as yd,cP as xd,cQ as Ed,cR as Td,cS as Cd,cT as vd,cU as wd,cV as Sd,cW as Ld,cX as _d,cY as kd,cZ as Ad,c_ as Nd,c$ as $d,d0 as Rd,d1 as Id,d2 as Pd,d3 as Od,d4 as Md,d5 as Dd,d6 as Bd,d7 as jd,d8 as Fd,d9 as Ud,da as zd,db as Hd,dc as qd,dd as Wd,de as Xd,df as Jd,dg as Vd,dh as Yd,di as Gd,dj as Zd,dk as Kd,dl as Qd,dm as ef,dn as tf,dp as nf,dq as sf,dr as of,ds as rf,dt as af,du as lf,dv as cf,dw as uf,dx as df,dy as ff,dz as pf,dA as mf,dB as gf,dC as hf,dD as bf,dE as yf,dF as xf,dG as Ef,dH as Tf,dI as Cf,dJ as vf,dK as wf,dL as Sf,dM as Lf,dN as _f,dO as kf,dP as Af,dQ as Nf,dR as $f,dS as Rf,dT as If,dU as Pf,dV as Of,dW as Mf,dX as Df,dY as Bf,dZ as jf,d_ as Ff,d$ as Uf,e0 as zf,e1 as Hf,e2 as qf,e3 as Wf,e4 as Xf,e5 as Jf,e6 as Vf,e7 as Yf,e8 as Gf,e9 as Zf,ea as Kf,eb as Qf,ec as ep,ed as tp,ee as np,ef as sp,eg as op,eh as rp,ei as ip,ej as ap,ek as lp,el as cp,em as up,en as dp,eo as fp,ep as pp,eq as mp,er as gp,es as hp,et as bp,eu as yp,ev as xp,ew as Ep,ex as Tp,ey as Cp,ez as vp,eA as wp,eB as Sp,eC as Lp,eD as _p,eE as kp,eF as Ap,eG as Np,eH as $p,eI as Rp,eJ as Ip,eK as Pp,eL as Op,eM as Mp,eN as Dp,eO as Bp,eP as jp,eQ as Fp,eR as Up,eS as zp,eT as Hp,eU as qp,eV as Wp,eW as Xp,eX as Jp,r as Vp,eY as Yp,eZ as Gp,e_ as Zp,e$ as Kp,i as Qp,f0 as em,f1 as tm,f2 as nm,f3 as sm,f4 as om,f5 as rm,f6 as im,f7 as am,f8 as lm,f9 as cm,fa as um,fb as dm,fc as fm,fd as pm,fe as mm,ff as gm,fg as hm,fh as bm,fi as ym,fj as xm,fk as Em,fl as Tm,fm as Cm,fn as vm,fo as wm,fp as Sm,fq as Lm,fr as _m,fs as km,ft as Am,fu as Nm,fv as $m}from"./JupyterLexicalExtension-Dr8dgCst.js";import{l$ as io,r as m,j as h,aX as ao,aR as lo,B as co,a$ as ee,m0 as F,m1 as ae,m2 as un,m3 as pe,m4 as z,m5 as uo,m6 as fo,m7 as po,m8 as mo,m9 as j,a_ as ce,ma as Ee,mb as ut,mc as go,md as ho,me as bo,mf as yo,mg as dn,mh as xo,mi as Eo,mj as To,mk as Co,ml as vo,mm as wo,aZ as So,ab as M,c6 as ve,mn as Lo,mo as se,mp as X,mq as ye,mr as _o,ms as ko,mt as Ao,c7 as No,mu as le,c9 as fn,mv as pn,mw as mn,bs as gn,mx as fe,my as $o,mz as Ro,bx as ie,dp as Io,I as Le,f7 as hn,z as Po,y as Oo,cb as Mo,W as Do,mA as Bo,mB as jo,ca as ze,mC as Fo,mD as xt,fD as Uo,fn as zo,T as Ho,mE as Et,mF as qo,mG as Wo,mH as Xo,mI as Tt,mJ as Jo,mK as Vo,aS as Yo,aT as Go,aN as Zo,aY as Ko}from"../datalayer-app-main.js";import{CollapsiblePlugin as Im}from"./CollapsiblePlugin-DPGnrmLj.js";import{u as Qo,N as Ct}from"./usePrimerThemeBridge-BoT73xjq.js";import{u as er}from"./Output-Do1CYRIF.js";import{T as tr}from"./ThemeContext-D9ztCaU3.js";import{a as Om,u as Mm}from"./ThemeContext-D9ztCaU3.js";import{YouTubePlugin as Bm}from"./YouTubePlugin-BCHN7vdi.js";import"./NotebookSkeleton-GSdyJDf_.js";import"./Avatar-DUPBQXVt.js";import"./url-DY3jeuF8.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./StrikethroughIcon-CbiEuPT-.js";import"./VideoIcon-C3wcjUxu.js";import"./ArrowUpIcon-y5enrVH9.js";import"./SortDescIcon-Qif6E10I.js";import"./PaintbrushIcon-CFBHU-3l.js";import"./PrismCss-c7kvMU60.js";import"./index-i9IsP_xD.js";import"./hoverbox-CStlKQWE.js";import"./index--Rl4aMiU.js";import"./index-DrrVr0x3.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-DXPB_0fo.js";import"./d3-color-Jd8hXty2.js";import"./dist-Frc5TvpU.js";import"./index-BaRoLDk0.js";import"./RestartIcon-DvpOf5Mf.js";class nr{registry;_debug;constructor(t,n=!1){this.registry=t,this._debug=n}calculateIndent(t){const n=this.registry.getConfigOrDefault(t.language),s=this.getLeadingWhitespaceCount(t.currentLine);let o=s,r=!1,i=!1,l;for(const a of n.indentTriggers)if(this.matchesIndentRule(t.currentLine,a)){o=s+a.indentAmount,r=!0,l=a.name;break}if(!r){for(const a of n.dedentTriggers)if(this.matchesDedentRule(t.currentLine,a)){i=!0,l=a.name;break}}if(n.customRules){for(const a of n.customRules)if(a.condition(t.currentLine,t)){o=a.apply(o,t);break}}return o=Math.max(0,o),{spaces:o,shouldIndent:r,shouldDedent:i,triggeredRule:l}}getTabString(t){const n=this.registry.getConfigOrDefault(t);return n.useTabs?" ":" ".repeat(n.tabSize)}getTabSize(t){return this.registry.getConfigOrDefault(t).tabSize}calculateOutdent(t,n){const s=this.registry.getConfigOrDefault(n),o=t-s.tabSize;return Math.max(0,o)}getLeadingWhitespaceCount(t){const n=t.match(/^[\t ]*/);if(!n)return 0;const s=n[0];let o=0;for(const r of s)r===" "?o+=4:o+=1;return o}getLeadingWhitespace(t){const n=t.match(/^[\t ]*/);return n?n[0]:""}matchesIndentRule(t,n){switch(n.context){case"line-end":return n.pattern.test(t);case"line-start":return n.pattern.test(t);case"anywhere":return n.pattern.test(t);default:return!1}}matchesDedentRule(t,n){switch(n.context){case"line-start":return n.pattern.test(t);case"anywhere":return n.pattern.test(t);default:return!1}}normalizeIndentation(t,n){const s=this.registry.getConfigOrDefault(n);if(s.useTabs){const o=this.getLeadingWhitespace(t),r=o.length,i=Math.floor(r/s.tabSize),l=r%s.tabSize;return" ".repeat(i)+" ".repeat(l)+t.substring(o.length)}else{const o=this.getLeadingWhitespace(t);return o.replace(/\t/g," ".repeat(s.tabSize)).concat(t.substring(o.length))}}}const sr={language:"python",tabSize:4,useTabs:!1,indentTriggers:[{name:"colon-indent",pattern:/:\s*(#.*)?$/,context:"line-end",indentAmount:4},{name:"continuation-backslash",pattern:/\\\s*(#.*)?$/,context:"line-end",indentAmount:4},{name:"open-bracket",pattern:/[[({]\s*$/,context:"line-end",indentAmount:4}],dedentTriggers:[{name:"flow-control-keywords",pattern:/^\s*(return|break|continue|pass)(\s|$)/,context:"line-start",dedentAmount:4},{name:"raise-keyword",pattern:/^\s*raise(\s|$)/,context:"line-start",dedentAmount:4}],customRules:[{name:"close-bracket-dedent",condition:e=>/^\s*[\])}]/.test(e),apply:e=>Math.max(0,e-4)}]},bn={language:"javascript",tabSize:2,useTabs:!1,indentTriggers:[{name:"open-brace",pattern:/\{\s*(\/\/.*)?$/,context:"line-end",indentAmount:2},{name:"open-bracket",pattern:/\[\s*(\/\/.*)?$/,context:"line-end",indentAmount:2},{name:"open-paren",pattern:/\(\s*(\/\/.*)?$/,context:"line-end",indentAmount:2},{name:"arrow-function",pattern:/=>\s*(\/\/.*)?$/,context:"line-end",indentAmount:2},{name:"ternary-operator",pattern:/\?\s*(\/\/.*)?$/,context:"line-end",indentAmount:2}],dedentTriggers:[{name:"return-statement",pattern:/^\s*return(\s|;)/,context:"line-start",dedentAmount:2},{name:"break-continue",pattern:/^\s*(break|continue)(\s|;)/,context:"line-start",dedentAmount:2},{name:"throw-statement",pattern:/^\s*throw(\s|;)/,context:"line-start",dedentAmount:2}],customRules:[{name:"close-brace-dedent",condition:e=>/^\s*}/.test(e),apply:e=>Math.max(0,e-2)},{name:"close-bracket-dedent",condition:e=>/^\s*\]/.test(e),apply:e=>Math.max(0,e-2)},{name:"close-paren-dedent",condition:e=>/^\s*\)/.test(e),apply:e=>Math.max(0,e-2)},{name:"case-label",condition:e=>/^\s*(case\s+.*:|default:)/.test(e),apply:(e,t)=>e}]},or={...bn,language:"typescript"};class rr{configs;options;constructor(t={}){this.configs=new Map,this.options={defaultLanguage:"python",fallbackTabSize:4,debug:!1,...t},this.registerDefaultLanguages(),t.customConfigs&&t.customConfigs.forEach(n=>this.registerLanguage(n))}registerDefaultLanguages(){this.registerLanguage(sr),this.registerLanguage(bn),this.registerLanguage(or),this.registerAlias("py","python"),this.registerAlias("js","javascript"),this.registerAlias("ts","typescript"),this.registerAlias("jsx","javascript"),this.registerAlias("tsx","typescript")}registerLanguage(t){if(this.configs.has(t.language)){this.options.debug&&console.warn(`[LanguageIndentRegistry] Language '${t.language}' already registered. Use updateConfig() to modify.`);return}this.configs.set(t.language,t)}registerAlias(t,n){const s=this.configs.get(n);s&&this.configs.set(t,s)}getConfig(t){if(!t)return this.getConfig(this.options.defaultLanguage);const n=t.toLowerCase().trim();return this.configs.get(n)}getConfigOrDefault(t){const n=this.getConfig(t);if(n)return n;const s=this.getConfig(this.options.defaultLanguage);return s?(this.options.debug&&console.warn(`[LanguageIndentRegistry] Language '${t}' not found, using default: ${this.options.defaultLanguage}`),s):(this.options.debug&&console.error(`[LanguageIndentRegistry] No config found for '${t}' and default '${this.options.defaultLanguage}' missing!`),this.createFallbackConfig(t||"unknown"))}createFallbackConfig(t){return{language:t,tabSize:this.options.fallbackTabSize||4,useTabs:this.options.preserveTabs||!1,indentTriggers:[],dedentTriggers:[]}}hasLanguage(t){if(!t)return!1;const n=t.toLowerCase().trim();return this.configs.has(n)}updateConfig(t,n){const s=t.toLowerCase().trim(),o=this.configs.get(s);if(!o)return this.options.debug&&console.warn(`[LanguageIndentRegistry] Cannot update '${t}' - not registered`),!1;const r={...o,...n,language:o.language};return this.configs.set(s,r),!0}getRegisteredLanguages(){return Array.from(this.configs.keys())}clear(){this.configs.clear()}reset(){this.clear(),this.registerDefaultLanguages()}}const ir="[Deleted Comment]",Qe=e=>e.uid===e.thread_uid,yn=e=>e.anchor?.mark_id??e.uid,ar=(e,t)=>e.created_at!==t.created_at?e.created_at<t.created_at?-1:1:e.uid<t.uid?-1:e.uid>t.uid?1:0,He=(e,t)=>e!==void 0&&e.updated_at>t.updated_at?e:t,vt=e=>{const{uid:t,handle:n,name:s,agent_uid:o}=e.author;return t?{kind:"user",uid:t,handle:n??null,name:s??null,...o?{agentUid:o}:{}}:Bn(s||n)},lr=e=>({type:"comment",id:e.uid,author:Dn(vt(e)),authorPrincipal:vt(e),content:e.deleted?ir:e.body,deleted:e.deleted,...e.mentions&&e.mentions.length>0?{mentions:e.mentions}:{},timeStamp:Date.parse(e.created_at)});function cr(e){const t=[...e].sort(ar),n=new Map;for(const s of t)Qe(s)||n.set(s.thread_uid,[...n.get(s.thread_uid)??[],s]);return t.filter(s=>Qe(s)&&!s.deleted&&s.status==="open").map(s=>({type:"thread",id:yn(s),quote:s.quote??"",assignee:s.assignee??null,comments:[s,...n.get(s.uid)??[]].map(lr)}))}const wt=e=>e&&e.length>0?{mentions:e}:{};class cl{searchPeople;assignThread;_editor;_backend;_options;_listeners=new Set;_heardDuringReads=new Set;_records=new Map;_comments=[];constructor(t,n,s={}){this._editor=t,this._backend=n,this._options=s;const{searchPeople:o,assign:r}=n;o&&(this.searchPeople=i=>o.call(n,i).catch(l=>{throw this._options.onError?.(l),l})),r&&(this.assignThread=(i,l)=>this._write(()=>r.call(n,this._threadRecord(i).uid,l?.uid??null)))}connect(){const t=this._backend.subscribe({comment:n=>this._heard(n),ready:()=>{this.refresh()}});return this.refresh(),t}async refresh(){const t=new Map;this._heardDuringReads.add(t);try{const n=await this._backend.list(),s=new Map(n.map(o=>[o.uid,o]));for(const[o,r]of t)s.set(o,He(s.get(o),r));this._records=s,this._changed()}catch(n){this._options.onError?.(n)}finally{this._heardDuringReads.delete(t)}}getComments(){return this._comments}addComment(t,n){if(t.type==="thread"){const s=t.id,o=t.comments[0];this._write(()=>this._backend.create({body:o?.content??"",anchor:{mark_id:s},quote:t.quote,...wt(o?.mentions)}),()=>this._unmark(s))}else n!==void 0?this._write(()=>this._backend.create({body:t.content,thread_uid:this._threadRecord(n).uid,...wt(t.mentions)})):this._options.onError?.(new Error("A comment is written in a thread."))}deleteComment(t){this._write(()=>this._backend.delete(t.id))}deleteThread(t){this._write(()=>this._backend.delete(this._threadRecord(t).uid))}resolveThread(t){this._write(()=>this._backend.resolve(this._threadRecord(t).uid))}registerOnChange(t){return this._listeners.add(t),()=>{this._listeners.delete(t)}}_write(t,n){Promise.resolve().then(t).then(s=>this._heard(s),s=>{n?.(),this._options.onError?.(s)})}_threadRecord(t){for(const n of this._records.values())if(Qe(n)&&yn(n)===t.id)return n;throw new Error(`The thread ${t.id} is not one the store read.`)}_heard(t){for(const n of this._heardDuringReads)n.set(t.uid,He(n.get(t.uid),t));this._records.set(t.uid,He(this._records.get(t.uid),t)),this._changed()}_changed(){this._comments=cr(this._records.values());for(const t of this._listeners)t()}_unmark(t){this._editor.update(()=>{for(const{node:n}of io())qt(n)&&n.getIDs().includes(t)&&(n.deleteID(t),n.getIDs().length===0&&Mn(n))})}}const dt=m.createContext(void 0);function ur(){const e=m.useContext(dt);if(!e)throw new Error("useContext must be inside a Provider with a value");return e}const dr=dt.Provider,ul=dt.Consumer,dl=({children:e})=>{const[t,n]=m.useState();return h.jsx(dr,{value:{editor:t,setEditor:n},children:e})};function fl(e){const{useStore:t,children:n}=e,{colorMode:s,resolvedMode:o,themeConfig:r,themeBackground:i,lexicalTheme:l}=Qo(t);return h.jsx(ao,{colorMode:s,theme:r.primerTheme,themeStyles:r.themeStyles,children:h.jsx(lo,{colormode:o,backgroundColor:i,useBaseStyles:!1,children:h.jsx(co,{sx:{"& .editor-shell":{backgroundColor:i,borderRadius:2},"& .editor-container":{backgroundColor:i},"& .editor-inner":{backgroundColor:i},"& .editor-input":{backgroundColor:i},'& [role="toolbar"][aria-label="Editor toolbar"]':{backgroundColor:i}},children:h.jsx(tr.Provider,{value:{theme:l},children:n})})})})}const fr={"\\":"\\textbackslash{}","{":"\\{","}":"\\}",$:"\\$","&":"\\&","#":"\\#","^":"\\^{}",_:"\\_","%":"\\%","~":"\\~{}"};function K(e){return e.replace(/[\\{}$&#^_%~]/g,t=>fr[t]??t)}function ft(e,t,n="{",s="}"){let o=0;for(let r=t;r<e.length;r++){const i=e[r];if(i==="\\"){r++;continue}if(i===n)o++;else if(i===s&&(o--,o===0))return r}return-1}function W(e,t){let n=t;for(;n<e.length&&(e[n]===" "||e[n]===`
1
+ import{d as V}from"./LexicalToolRegistry-rXaW8uXA.js";import{D as Xl,a as Jl,b as Vl,e as Yl,c as Gl,g as Zl,i as Kl,f as Ql,l as ec,h as tc,j as nc,k as sc,m as oc,n as rc,r as ic,o as ac,p as lc,q as cc,s as uc,t as dc,v as fc,w as pc,x as mc,y as gc,z as hc,u as bc}from"./LexicalToolRegistry-rXaW8uXA.js";import{_ as qt,E as Mn,G as Dn,H as Bn,K as me,M as Wt,O as ot,P as rt,Q as jn,R as Fn,S as Xt,U as Un,V as Jt,W as zn,X as Hn,Y as Vt,Z as Yt,a0 as qn,a1 as Wn,a2 as Xn,a3 as Jn,C as Gt,a4 as Vn,a5 as Zt,a6 as Yn,a7 as Gn,a8 as Ce,a9 as Q,aa as Kt,ab as it,ac as xe,ad as at,ae as Re,af as Zn,ag as Be,ah as Ve,ai as lt,aj as Kn,ak as Ye,al as Qn,am as es,an as ts,ao as Ge,ap as Qt,aq as en,ar as tn,as as Ie,at as ns,au as ss,av as nn,aw as os,ax as Pe,$ as rs,b as is,a as as,c as ls,ay as sn,az as Y,aA as cs,aB as us,aC as Ze,aD as ds,aE as fs,aF as ps,aG as ms,aH as ct,aI as gs,aJ as hs,aK as bs,aL as ys,aM as xs,aN as Es,aO as Oe,aP as Ke,aQ as bt,aR as yt,aS as Ts,aT as Cs,aU as vs,aV as ws,aW as Ss,aX as Ls,aY as _s,aZ as ks,a_ as As,x as on,a$ as Ns,b0 as $s,b1 as Rs,b2 as Is,b3 as Ps,b4 as Os,b5 as Ue,b6 as Ms,b7 as Ds,b8 as Bs,b9 as js,ba as Fs,bb as rn,bc as an,bd as ln,be as cn,j as Us,T as zs,L as Hs,w as qs,k as Ws,l as Xs,D as Js,m as Vs,n as Ys,o as Gs,p as Zs,t as Ks,bf as Qs,s as eo,F as to,u as no,v as so,bg as oo,bh as ro}from"./JupyterLexicalExtension-BYde4Hzz.js";import{bi as xc,bj as Ec,bk as Tc,bl as Cc,bm as vc,bn as wc,bo as Sc,bp as Lc,bq as _c,br as kc,bs as Ac,bt as Nc,bu as $c,bv as Rc,d as Ic,e as Pc,bw as Oc,bx as Mc,B as Dc,by as Bc,A as jc,bz as Fc,bA as Uc,bB as zc,bC as Hc,bD as qc,bE as Wc,bF as Xc,bG as Jc,bH as Vc,bI as Yc,bJ as Gc,bK as Zc,bL as Kc,bM as Qc,bN as eu,bO as tu,bP as nu,f as su,bQ as ou,g as ru,bR as iu,bS as au,bT as lu,bU as cu,bV as uu,q as du,bW as fu,bX as pu,bY as mu,bZ as gu,b_ as hu,b$ as bu,c0 as yu,c1 as xu,c2 as Eu,c3 as Tu,c4 as Cu,c5 as vu,c6 as wu,c7 as Su,c8 as Lu,c9 as _u,ca as ku,cb as Au,cc as Nu,cd as $u,ce as Ru,cf as Iu,cg as Pu,ch as Ou,ci as Mu,cj as Du,I as Bu,ck as ju,cl as Fu,cm as Uu,cn as zu,co as Hu,cp as qu,cq as Wu,cr as Xu,cs as Ju,ct as Vu,cu as Yu,cv as Gu,h as Zu,z as Ku,cw as Qu,cx as ed,cy as td,cz as nd,cA as sd,cB as od,cC as rd,cD as id,cE as ad,cF as ld,cG as cd,J as ud,cH as dd,cI as fd,cJ as pd,cK as md,cL as gd,cM as hd,cN as bd,cO as yd,cP as xd,cQ as Ed,cR as Td,cS as Cd,cT as vd,cU as wd,cV as Sd,cW as Ld,cX as _d,cY as kd,cZ as Ad,c_ as Nd,c$ as $d,d0 as Rd,d1 as Id,d2 as Pd,d3 as Od,d4 as Md,d5 as Dd,d6 as Bd,d7 as jd,d8 as Fd,d9 as Ud,da as zd,db as Hd,dc as qd,dd as Wd,de as Xd,df as Jd,dg as Vd,dh as Yd,di as Gd,dj as Zd,dk as Kd,dl as Qd,dm as ef,dn as tf,dp as nf,dq as sf,dr as of,ds as rf,dt as af,du as lf,dv as cf,dw as uf,dx as df,dy as ff,dz as pf,dA as mf,dB as gf,dC as hf,dD as bf,dE as yf,dF as xf,dG as Ef,dH as Tf,dI as Cf,dJ as vf,dK as wf,dL as Sf,dM as Lf,dN as _f,dO as kf,dP as Af,dQ as Nf,dR as $f,dS as Rf,dT as If,dU as Pf,dV as Of,dW as Mf,dX as Df,dY as Bf,dZ as jf,d_ as Ff,d$ as Uf,e0 as zf,e1 as Hf,e2 as qf,e3 as Wf,e4 as Xf,e5 as Jf,e6 as Vf,e7 as Yf,e8 as Gf,e9 as Zf,ea as Kf,eb as Qf,ec as ep,ed as tp,ee as np,ef as sp,eg as op,eh as rp,ei as ip,ej as ap,ek as lp,el as cp,em as up,en as dp,eo as fp,ep as pp,eq as mp,er as gp,es as hp,et as bp,eu as yp,ev as xp,ew as Ep,ex as Tp,ey as Cp,ez as vp,eA as wp,eB as Sp,eC as Lp,eD as _p,eE as kp,eF as Ap,eG as Np,eH as $p,eI as Rp,eJ as Ip,eK as Pp,eL as Op,eM as Mp,eN as Dp,eO as Bp,eP as jp,eQ as Fp,eR as Up,eS as zp,eT as Hp,eU as qp,eV as Wp,eW as Xp,eX as Jp,r as Vp,eY as Yp,eZ as Gp,e_ as Zp,e$ as Kp,i as Qp,f0 as em,f1 as tm,f2 as nm,f3 as sm,f4 as om,f5 as rm,f6 as im,f7 as am,f8 as lm,f9 as cm,fa as um,fb as dm,fc as fm,fd as pm,fe as mm,ff as gm,fg as hm,fh as bm,fi as ym,fj as xm,fk as Em,fl as Tm,fm as Cm,fn as vm,fo as wm,fp as Sm,fq as Lm,fr as _m,fs as km,ft as Am,fu as Nm,fv as $m}from"./JupyterLexicalExtension-BYde4Hzz.js";import{l$ as io,r as m,j as h,aX as ao,aR as lo,B as co,a$ as ee,m0 as F,m1 as ae,m2 as un,m3 as pe,m4 as z,m5 as uo,m6 as fo,m7 as po,m8 as mo,m9 as j,a_ as ce,ma as Ee,mb as ut,mc as go,md as ho,me as bo,mf as yo,mg as dn,mh as xo,mi as Eo,mj as To,mk as Co,ml as vo,mm as wo,aZ as So,ab as M,c6 as ve,mn as Lo,mo as se,mp as X,mq as ye,mr as _o,ms as ko,mt as Ao,c7 as No,mu as le,c9 as fn,mv as pn,mw as mn,bs as gn,mx as fe,my as $o,mz as Ro,bx as ie,dp as Io,I as Le,f7 as hn,z as Po,y as Oo,cb as Mo,W as Do,mA as Bo,mB as jo,ca as ze,mC as Fo,mD as xt,fD as Uo,fn as zo,T as Ho,mE as Et,mF as qo,mG as Wo,mH as Xo,mI as Tt,mJ as Jo,mK as Vo,aS as Yo,aT as Go,aN as Zo,aY as Ko}from"../datalayer-app-main.js";import{CollapsiblePlugin as Im}from"./CollapsiblePlugin-ng8VFSwH.js";import{u as Qo,N as Ct}from"./usePrimerThemeBridge-BoT73xjq.js";import{u as er}from"./Output-BmVt4DpZ.js";import{T as tr}from"./ThemeContext-D9ztCaU3.js";import{a as Om,u as Mm}from"./ThemeContext-D9ztCaU3.js";import{YouTubePlugin as Bm}from"./YouTubePlugin-BOnLCvAR.js";import"./NotebookSkeleton-GSdyJDf_.js";import"./Avatar-DUPBQXVt.js";import"./url-DY3jeuF8.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./StrikethroughIcon-CbiEuPT-.js";import"./VideoIcon-C3wcjUxu.js";import"./ArrowUpIcon-y5enrVH9.js";import"./SortDescIcon-Qif6E10I.js";import"./PaintbrushIcon-CFBHU-3l.js";import"./PrismCss-c7kvMU60.js";import"./index-i9IsP_xD.js";import"./hoverbox-CStlKQWE.js";import"./index--Rl4aMiU.js";import"./index-5os8HYj-.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-DXPB_0fo.js";import"./d3-color-Jd8hXty2.js";import"./dist-Frc5TvpU.js";import"./index-BaRoLDk0.js";import"./RestartIcon-DvpOf5Mf.js";class nr{registry;_debug;constructor(t,n=!1){this.registry=t,this._debug=n}calculateIndent(t){const n=this.registry.getConfigOrDefault(t.language),s=this.getLeadingWhitespaceCount(t.currentLine);let o=s,r=!1,i=!1,l;for(const a of n.indentTriggers)if(this.matchesIndentRule(t.currentLine,a)){o=s+a.indentAmount,r=!0,l=a.name;break}if(!r){for(const a of n.dedentTriggers)if(this.matchesDedentRule(t.currentLine,a)){i=!0,l=a.name;break}}if(n.customRules){for(const a of n.customRules)if(a.condition(t.currentLine,t)){o=a.apply(o,t);break}}return o=Math.max(0,o),{spaces:o,shouldIndent:r,shouldDedent:i,triggeredRule:l}}getTabString(t){const n=this.registry.getConfigOrDefault(t);return n.useTabs?" ":" ".repeat(n.tabSize)}getTabSize(t){return this.registry.getConfigOrDefault(t).tabSize}calculateOutdent(t,n){const s=this.registry.getConfigOrDefault(n),o=t-s.tabSize;return Math.max(0,o)}getLeadingWhitespaceCount(t){const n=t.match(/^[\t ]*/);if(!n)return 0;const s=n[0];let o=0;for(const r of s)r===" "?o+=4:o+=1;return o}getLeadingWhitespace(t){const n=t.match(/^[\t ]*/);return n?n[0]:""}matchesIndentRule(t,n){switch(n.context){case"line-end":return n.pattern.test(t);case"line-start":return n.pattern.test(t);case"anywhere":return n.pattern.test(t);default:return!1}}matchesDedentRule(t,n){switch(n.context){case"line-start":return n.pattern.test(t);case"anywhere":return n.pattern.test(t);default:return!1}}normalizeIndentation(t,n){const s=this.registry.getConfigOrDefault(n);if(s.useTabs){const o=this.getLeadingWhitespace(t),r=o.length,i=Math.floor(r/s.tabSize),l=r%s.tabSize;return" ".repeat(i)+" ".repeat(l)+t.substring(o.length)}else{const o=this.getLeadingWhitespace(t);return o.replace(/\t/g," ".repeat(s.tabSize)).concat(t.substring(o.length))}}}const sr={language:"python",tabSize:4,useTabs:!1,indentTriggers:[{name:"colon-indent",pattern:/:\s*(#.*)?$/,context:"line-end",indentAmount:4},{name:"continuation-backslash",pattern:/\\\s*(#.*)?$/,context:"line-end",indentAmount:4},{name:"open-bracket",pattern:/[[({]\s*$/,context:"line-end",indentAmount:4}],dedentTriggers:[{name:"flow-control-keywords",pattern:/^\s*(return|break|continue|pass)(\s|$)/,context:"line-start",dedentAmount:4},{name:"raise-keyword",pattern:/^\s*raise(\s|$)/,context:"line-start",dedentAmount:4}],customRules:[{name:"close-bracket-dedent",condition:e=>/^\s*[\])}]/.test(e),apply:e=>Math.max(0,e-4)}]},bn={language:"javascript",tabSize:2,useTabs:!1,indentTriggers:[{name:"open-brace",pattern:/\{\s*(\/\/.*)?$/,context:"line-end",indentAmount:2},{name:"open-bracket",pattern:/\[\s*(\/\/.*)?$/,context:"line-end",indentAmount:2},{name:"open-paren",pattern:/\(\s*(\/\/.*)?$/,context:"line-end",indentAmount:2},{name:"arrow-function",pattern:/=>\s*(\/\/.*)?$/,context:"line-end",indentAmount:2},{name:"ternary-operator",pattern:/\?\s*(\/\/.*)?$/,context:"line-end",indentAmount:2}],dedentTriggers:[{name:"return-statement",pattern:/^\s*return(\s|;)/,context:"line-start",dedentAmount:2},{name:"break-continue",pattern:/^\s*(break|continue)(\s|;)/,context:"line-start",dedentAmount:2},{name:"throw-statement",pattern:/^\s*throw(\s|;)/,context:"line-start",dedentAmount:2}],customRules:[{name:"close-brace-dedent",condition:e=>/^\s*}/.test(e),apply:e=>Math.max(0,e-2)},{name:"close-bracket-dedent",condition:e=>/^\s*\]/.test(e),apply:e=>Math.max(0,e-2)},{name:"close-paren-dedent",condition:e=>/^\s*\)/.test(e),apply:e=>Math.max(0,e-2)},{name:"case-label",condition:e=>/^\s*(case\s+.*:|default:)/.test(e),apply:(e,t)=>e}]},or={...bn,language:"typescript"};class rr{configs;options;constructor(t={}){this.configs=new Map,this.options={defaultLanguage:"python",fallbackTabSize:4,debug:!1,...t},this.registerDefaultLanguages(),t.customConfigs&&t.customConfigs.forEach(n=>this.registerLanguage(n))}registerDefaultLanguages(){this.registerLanguage(sr),this.registerLanguage(bn),this.registerLanguage(or),this.registerAlias("py","python"),this.registerAlias("js","javascript"),this.registerAlias("ts","typescript"),this.registerAlias("jsx","javascript"),this.registerAlias("tsx","typescript")}registerLanguage(t){if(this.configs.has(t.language)){this.options.debug&&console.warn(`[LanguageIndentRegistry] Language '${t.language}' already registered. Use updateConfig() to modify.`);return}this.configs.set(t.language,t)}registerAlias(t,n){const s=this.configs.get(n);s&&this.configs.set(t,s)}getConfig(t){if(!t)return this.getConfig(this.options.defaultLanguage);const n=t.toLowerCase().trim();return this.configs.get(n)}getConfigOrDefault(t){const n=this.getConfig(t);if(n)return n;const s=this.getConfig(this.options.defaultLanguage);return s?(this.options.debug&&console.warn(`[LanguageIndentRegistry] Language '${t}' not found, using default: ${this.options.defaultLanguage}`),s):(this.options.debug&&console.error(`[LanguageIndentRegistry] No config found for '${t}' and default '${this.options.defaultLanguage}' missing!`),this.createFallbackConfig(t||"unknown"))}createFallbackConfig(t){return{language:t,tabSize:this.options.fallbackTabSize||4,useTabs:this.options.preserveTabs||!1,indentTriggers:[],dedentTriggers:[]}}hasLanguage(t){if(!t)return!1;const n=t.toLowerCase().trim();return this.configs.has(n)}updateConfig(t,n){const s=t.toLowerCase().trim(),o=this.configs.get(s);if(!o)return this.options.debug&&console.warn(`[LanguageIndentRegistry] Cannot update '${t}' - not registered`),!1;const r={...o,...n,language:o.language};return this.configs.set(s,r),!0}getRegisteredLanguages(){return Array.from(this.configs.keys())}clear(){this.configs.clear()}reset(){this.clear(),this.registerDefaultLanguages()}}const ir="[Deleted Comment]",Qe=e=>e.uid===e.thread_uid,yn=e=>e.anchor?.mark_id??e.uid,ar=(e,t)=>e.created_at!==t.created_at?e.created_at<t.created_at?-1:1:e.uid<t.uid?-1:e.uid>t.uid?1:0,He=(e,t)=>e!==void 0&&e.updated_at>t.updated_at?e:t,vt=e=>{const{uid:t,handle:n,name:s,agent_uid:o}=e.author;return t?{kind:"user",uid:t,handle:n??null,name:s??null,...o?{agentUid:o}:{}}:Bn(s||n)},lr=e=>({type:"comment",id:e.uid,author:Dn(vt(e)),authorPrincipal:vt(e),content:e.deleted?ir:e.body,deleted:e.deleted,...e.mentions&&e.mentions.length>0?{mentions:e.mentions}:{},timeStamp:Date.parse(e.created_at)});function cr(e){const t=[...e].sort(ar),n=new Map;for(const s of t)Qe(s)||n.set(s.thread_uid,[...n.get(s.thread_uid)??[],s]);return t.filter(s=>Qe(s)&&!s.deleted&&s.status==="open").map(s=>({type:"thread",id:yn(s),quote:s.quote??"",assignee:s.assignee??null,comments:[s,...n.get(s.uid)??[]].map(lr)}))}const wt=e=>e&&e.length>0?{mentions:e}:{};class cl{searchPeople;assignThread;_editor;_backend;_options;_listeners=new Set;_heardDuringReads=new Set;_records=new Map;_comments=[];constructor(t,n,s={}){this._editor=t,this._backend=n,this._options=s;const{searchPeople:o,assign:r}=n;o&&(this.searchPeople=i=>o.call(n,i).catch(l=>{throw this._options.onError?.(l),l})),r&&(this.assignThread=(i,l)=>this._write(()=>r.call(n,this._threadRecord(i).uid,l?.uid??null)))}connect(){const t=this._backend.subscribe({comment:n=>this._heard(n),ready:()=>{this.refresh()}});return this.refresh(),t}async refresh(){const t=new Map;this._heardDuringReads.add(t);try{const n=await this._backend.list(),s=new Map(n.map(o=>[o.uid,o]));for(const[o,r]of t)s.set(o,He(s.get(o),r));this._records=s,this._changed()}catch(n){this._options.onError?.(n)}finally{this._heardDuringReads.delete(t)}}getComments(){return this._comments}addComment(t,n){if(t.type==="thread"){const s=t.id,o=t.comments[0];this._write(()=>this._backend.create({body:o?.content??"",anchor:{mark_id:s},quote:t.quote,...wt(o?.mentions)}),()=>this._unmark(s))}else n!==void 0?this._write(()=>this._backend.create({body:t.content,thread_uid:this._threadRecord(n).uid,...wt(t.mentions)})):this._options.onError?.(new Error("A comment is written in a thread."))}deleteComment(t){this._write(()=>this._backend.delete(t.id))}deleteThread(t){this._write(()=>this._backend.delete(this._threadRecord(t).uid))}resolveThread(t){this._write(()=>this._backend.resolve(this._threadRecord(t).uid))}registerOnChange(t){return this._listeners.add(t),()=>{this._listeners.delete(t)}}_write(t,n){Promise.resolve().then(t).then(s=>this._heard(s),s=>{n?.(),this._options.onError?.(s)})}_threadRecord(t){for(const n of this._records.values())if(Qe(n)&&yn(n)===t.id)return n;throw new Error(`The thread ${t.id} is not one the store read.`)}_heard(t){for(const n of this._heardDuringReads)n.set(t.uid,He(n.get(t.uid),t));this._records.set(t.uid,He(this._records.get(t.uid),t)),this._changed()}_changed(){this._comments=cr(this._records.values());for(const t of this._listeners)t()}_unmark(t){this._editor.update(()=>{for(const{node:n}of io())qt(n)&&n.getIDs().includes(t)&&(n.deleteID(t),n.getIDs().length===0&&Mn(n))})}}const dt=m.createContext(void 0);function ur(){const e=m.useContext(dt);if(!e)throw new Error("useContext must be inside a Provider with a value");return e}const dr=dt.Provider,ul=dt.Consumer,dl=({children:e})=>{const[t,n]=m.useState();return h.jsx(dr,{value:{editor:t,setEditor:n},children:e})};function fl(e){const{useStore:t,children:n}=e,{colorMode:s,resolvedMode:o,themeConfig:r,themeBackground:i,lexicalTheme:l}=Qo(t);return h.jsx(ao,{colorMode:s,theme:r.primerTheme,themeStyles:r.themeStyles,children:h.jsx(lo,{colormode:o,backgroundColor:i,useBaseStyles:!1,children:h.jsx(co,{sx:{"& .editor-shell":{backgroundColor:i,borderRadius:2},"& .editor-container":{backgroundColor:i},"& .editor-inner":{backgroundColor:i},"& .editor-input":{backgroundColor:i},'& [role="toolbar"][aria-label="Editor toolbar"]':{backgroundColor:i}},children:h.jsx(tr.Provider,{value:{theme:l},children:n})})})})}const fr={"\\":"\\textbackslash{}","{":"\\{","}":"\\}",$:"\\$","&":"\\&","#":"\\#","^":"\\^{}",_:"\\_","%":"\\%","~":"\\~{}"};function K(e){return e.replace(/[\\{}$&#^_%~]/g,t=>fr[t]??t)}function ft(e,t,n="{",s="}"){let o=0;for(let r=t;r<e.length;r++){const i=e[r];if(i==="\\"){r++;continue}if(i===n)o++;else if(i===s&&(o--,o===0))return r}return-1}function W(e,t){let n=t;for(;n<e.length&&(e[n]===" "||e[n]===`
2
2
  `);)n++;if(e[n]!=="{")return null;const s=ft(e,n);return s===-1?null:{value:e.slice(n+1,s),end:s+1}}function ne(e,t){let n=t;for(;n<e.length&&e[n]===" ";)n++;if(e[n]!=="[")return null;const s=ft(e,n,"[","]");return s===-1?null:{value:e.slice(n+1,s),end:s+1}}function xn(e){return e.split(`
3
3
  `).map(t=>{for(let n=0;n<t.length;n++){if(t[n]==="\\"){n++;continue}if(t[n]==="%")return t.slice(0,n)}return t}).join(`
4
4
  `)}function En(e,t){if(!e)return null;const n=new RegExp(`(?:^|,)\\s*${t}\\s*=\\s*([^,]+)`).exec(e);return n?n[1].trim():null}function oe(e,t,n){const s=[];let o=t;for(let r=0;r<n;r++){const i=W(e,o);if(!i)break;s.push(i.value),o=i.end}return{values:s,end:o}}function pr(e){const t=e.indexOf("\\begin{document}");if(t===-1)return{body:e,preamble:""};const n=t+16,s=e.lastIndexOf("\\end{document}");return{body:s===-1?e.slice(n):e.slice(n,s),preamble:e.slice(0,t)}}function Tn(e){return e.charAt(0).toUpperCase()+e.slice(1)}const mr=new Set(["book","report","memoir","scrbook","scrreprt","amsbook","thesis","mitthesis","phdthesis","bookest"]);function Cn(e,t){return mr.has((e??"").toLowerCase())||t!==void 0&&/(?<!\\)\\chapter\b/.test(t)}const gr={h1:"section",h2:"subsection",h3:"subsubsection",h4:"paragraph",h5:"subparagraph",h6:"subparagraph"},hr={h1:"chapter",h2:"section",h3:"subsection",h4:"subsubsection",h5:"paragraph",h6:"subparagraph"},br={part:"h1",chapter:"h1",section:"h1",subsection:"h2",subsubsection:"h3",paragraph:"h4",subparagraph:"h5"},yr={part:"h1",chapter:"h1",section:"h2",subsection:"h3",subsubsection:"h4",paragraph:"h5",subparagraph:"h6"};function xr(e){return e?{js:"JavaScript",javascript:"JavaScript",ts:"TypeScript",typescript:"TypeScript",py:"Python",python:"Python",sh:"bash",bash:"bash",r:"R",sql:"SQL",c:"C",cpp:"C++",java:"Java",html:"HTML",xml:"XML",json:"JSON",markdown:"Markdown",md:"Markdown"}[e.toLowerCase()]??e:null}function pt(e){return e.replace(/^\n/,"").replace(/\n[ \t]*$/,"")}function Er(e){if(uo(e))return St(e.text);if(fo(e)||po(e)){const t=e.data["text/plain"];return t===void 0?null:St(t)}return mo(e)?e.traceback.join(`
@@ -1,4 +1,4 @@
1
- import{T as $e,q as he,t as ht,r as ce,b as De,g as Je,I as pt,k as gt,a as ze,f as Ge,C as Re,h as Ie}from"./index-i9IsP_xD.js";import{J as M,aB as ee,ch as ie,aE as R,gx as mt,eJ as Ct,fU as bt,cj as me,aK as Te,eh as ft,cl as vt,ei as _t,cf as Ce,iF as yt,r as J,eP as xt,iy as wt,eN as kt,dC as Q,cp as St,iG as v,dN as Ye,dJ as Xe,dO as Ze,fS as Qe,fT as et,eM as Be,aJ as At,aF as tt,aG as ke,iH as Mt,iI as Tt,iA as Bt,k as Y,bh as Et,gp as Nt,aa as Ot,aC as be,gC as G,iJ as ge,aA as le,iK as xe,iL as Z,eG as Pe,iM as jt,iN as Rt,dX as we,dZ as It,d$ as Le,iO as We,dY as Pt,iP as Lt,iQ as Wt,ax as ot,iR as Ht,iS as Ft,eL as Kt,iT as Vt,aD as F,ew as fe,iU as Se,dx as Ut,eE as qt,e3 as $t,iV as Dt,iW as se,iX as nt,ce as pe,dz as Jt,aH as zt,dE as Gt,cr as Yt,gA as Xt,iY as Zt,dS as Qt,dV as eo,iZ as to,dH as oo,i_ as no,i$ as io,ed as lo,ee as so,dy as ro,bg as ao,fl as co}from"../datalayer-app-main.js";import{b as uo,I as it}from"./token-CdPvDaO6.js";import{ToolbarItems as ho}from"./lib-Enno6S7H.js";import{I as po}from"./index-B3Hf3MzW.js";import{I as ve}from"./tokens-C5FWZLTC.js";import{a as lt,I as L,b as st,c as go}from"./tokens-BiQDy_zz.js";import{I as mo,a as rt}from"./tokens-DuSIK5iU.js";import{I as Co}from"./tokens-iGMkLb0v.js";import{f as at,e as bo,c as fo,I as vo,b as _o}from"./index-z8PItpd8.js";import{I as dt}from"./tokens-DfQxPp01.js";import{I as _e}from"./tokens-1h_N3aLM.js";import{a as Ee}from"./tokens-B3Xc25f7.js";import{I as yo}from"./tokens-BoOsoUsu.js";import{I as xo}from"./index--Rl4aMiU.js";import{I as wo}from"./tokens-udK9JDBx.js";import{W as ko,u as He,V as So,I as Ao,a as Mo,b as To,c as Bo}from"./document-Dx9me6Cm.js";import{s as Eo}from"./hover-DpawhsId.js";import{b as No,c as Oo,d as jo}from"./CellSidebarExtension-B_Bqi3Eh.js";import{H as Ro}from"./htmlselect-CIhYGigR.js";import{T as Io,a as Po}from"./model-DrXnd96t.js";import{C as Fe}from"./celltoolbartracker-8YTtJOxD.js";import"./hoverbox-CStlKQWE.js";import"./Output-Do1CYRIF.js";import"./index-DrrVr0x3.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-DXPB_0fo.js";import"./d3-color-Jd8hXty2.js";import"./dist-Frc5TvpU.js";import"./PaintbrushIcon-CFBHU-3l.js";import"./index-BaRoLDk0.js";import"./RestartIcon-DvpOf5Mf.js";import"./NotebookSkeleton-GSdyJDf_.js";import"./Avatar-DUPBQXVt.js";import"./renderer-B_98xkGt.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-jGhuRcP3.js";import"./url-DY3jeuF8.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BoT73xjq.js";import"./index-CShCHnof.js";import"./KernelVariables-cH-x-Hrc.js";import"./index-BWeXDhSd.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-LMslHH3H.js";import"./tokens-UgGv77-l.js";import"./drivecontents-BabrDJge.js";import"./kernel-DWlDRhgJ.js";function Lo(r){const n=s=>{const a=Math.max(s*3.6,.1),l=a*Math.PI/180,p=Math.sin(l)*104,i=Math.cos(l)*-104;return"M 0 0 v -104 A 104 104 1 "+(a<180?1:0)+" 0 "+p.toFixed(4)+" "+i.toFixed(4)+" z"};return M.createElement("div",{className:"jp-Statusbar-ProgressCircle",role:"progressbar","aria-label":r.label||"Unlabelled progress circle","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":r.progress,onClick:r.onClick},M.createElement("svg",{viewBox:"0 0 250 250"},M.createElement("circle",{cx:"125",cy:"125",r:"104",stroke:"var(--jp-inverse-layout-color3)",strokeWidth:"20",fill:"none"}),M.createElement("path",{className:"jp-Statusbar-ProgressCirclePath",transform:"translate(125,125) scale(.9)",d:n(r.progress),fill:"var(--jp-inverse-layout-color3)"})))}const Wo="jp-JSONEditor",ue="jp-mod-error",Ho="jp-JSONEditor-host",Fo="jp-JSONEditor-header";class Ko extends ee{constructor(e){super(),this._dataDirty=!1,this._inputDirty=!1,this._source=null,this._originalValue=ie.emptyObject,this._changeGuard=!1,this.translator=e.translator||R,this._trans=this.translator.load("jupyterlab"),this.addClass(Wo),this.headerNode=document.createElement("div"),this.headerNode.className=Fo,this.revertButtonNode=mt.element({tag:"span",title:this._trans.__("Revert changes to data")}),this.commitButtonNode=Ct.element({tag:"span",title:this._trans.__("Commit changes to data"),marginLeft:"8px"}),this.editorHostNode=document.createElement("div"),this.editorHostNode.className=Ho,this.headerNode.appendChild(this.revertButtonNode),this.headerNode.appendChild(this.commitButtonNode),this.node.appendChild(this.headerNode),this.node.appendChild(this.editorHostNode);const n=new bt.Model({mimeType:"application/json"});n.sharedModel.changed.connect(this._onModelChanged,this),this.model=n,this.editor=e.editorFactory({host:this.editorHostNode,model:n,config:{readOnly:!0}})}get source(){return this._source}set source(e){this._source!==e&&(this._source&&this._source.changed.disconnect(this._onSourceChanged,this),this._source=e,this.editor.setOption("readOnly",e===null),e&&e.changed.connect(this._onSourceChanged,this),this._setValue())}get isDirty(){return this._dataDirty||this._inputDirty}dispose(){var e;this.isDisposed||((e=this.source)===null||e===void 0||e.dispose(),this.model.dispose(),this.editor.dispose(),super.dispose())}handleEvent(e){switch(e.type){case"blur":this._evtBlur(e);break;case"click":this._evtClick(e);break}}onAfterAttach(e){const n=this.editorHostNode;n.addEventListener("blur",this,!0),n.addEventListener("click",this,!0),this.revertButtonNode.hidden=!0,this.commitButtonNode.hidden=!0,this.headerNode.addEventListener("click",this)}onBeforeDetach(e){const n=this.editorHostNode;n.removeEventListener("blur",this,!0),n.removeEventListener("click",this,!0),this.headerNode.removeEventListener("click",this)}_onSourceChanged(e,n){if(!this._changeGuard){if(this._inputDirty||this.editor.hasFocus()){this._dataDirty=!0;return}this._setValue()}}_onModelChanged(e,n){if(n.sourceChange){let s=!0;try{const a=JSON.parse(this.editor.model.sharedModel.getSource());this.removeClass(ue),this._inputDirty=!this._changeGuard&&!ie.deepEqual(a,this._originalValue)}catch{this.addClass(ue),this._inputDirty=!0,s=!1}this.revertButtonNode.hidden=!this._inputDirty,this.commitButtonNode.hidden=!s||!this._inputDirty}}_evtBlur(e){!this._inputDirty&&this._dataDirty&&this._setValue()}_evtClick(e){const n=e.target;this.revertButtonNode.contains(n)?this._setValue():this.commitButtonNode.contains(n)?!this.commitButtonNode.hidden&&!this.hasClass(ue)&&(this._changeGuard=!0,this._mergeContent(),this._changeGuard=!1,this._setValue()):this.editorHostNode.contains(n)&&this.editor.focus()}_mergeContent(){const e=this.editor.model,n=this._originalValue,s=JSON.parse(e.sharedModel.getSource()),a=this.source;if(a){for(const l in s)ie.deepEqual(s[l],n[l]||null)||a.set(l,s[l]);for(const l in n)l in s||a.delete(l)}}_setValue(){this._dataDirty=!1,this._inputDirty=!1,this.revertButtonNode.hidden=!0,this.commitButtonNode.hidden=!0,this.removeClass(ue);const e=this.editor.model,n=this._source?this._source.toJSON():{};if(this._changeGuard=!0,n===void 0)e.sharedModel.setSource(this._trans.__("No data!")),this._originalValue=ie.emptyObject;else{const s=JSON.stringify(n,null,4);e.sharedModel.setSource(s),this._originalValue=n,s.length>1&&s[0]==="{"&&this.editor.setCursorPosition({line:0,column:1})}this._changeGuard=!1,this.commitButtonNode.hidden=!0,this.revertButtonNode.hidden=!0}}class Vo extends M.Component{constructor(e){super(e),this._handleChange=s=>{this.setState({value:s.currentTarget.value})},this._handleSubmit=s=>{var a,l;s.preventDefault();const p=parseInt((l=(a=this._textInput)===null||a===void 0?void 0:a.value)!==null&&l!==void 0?l:"",10);return!isNaN(p)&&isFinite(p)&&1<=p&&p<=this.props.maxCell&&this.props.handleSubmit(p),!1},this._handleFocus=()=>{this.setState({hasFocus:!0})},this._handleBlur=()=>{this.setState({hasFocus:!1})},this._textInput=null;const n=e.translator||R;this._trans=n.load("jupyterlab"),this.state={value:"",hasFocus:!1,textInputId:ft.createDomID()+"-cell-number-input"}}componentDidMount(){var e;(e=this._textInput)===null||e===void 0||e.focus()}render(){return M.createElement("div",{className:"jp-lineFormSearch"},M.createElement("form",{name:"cellNumberForm",onSubmit:this._handleSubmit,noValidate:!0},M.createElement("div",{className:vt("jp-lineFormWrapper","lm-lineForm-wrapper",this.state.hasFocus?"jp-lineFormWrapperFocusWithin":void 0)},M.createElement("input",{type:"number",id:this.state.textInputId,className:"jp-lineFormInput",min:1,max:this.props.maxCell,onChange:this._handleChange,onFocus:this._handleFocus,onBlur:this._handleBlur,value:this.state.value,ref:e=>{this._textInput=e}}),M.createElement("div",{className:"jp-baseLineForm jp-lineFormButtonContainer"},M.createElement(_t.react,{className:"jp-baseLineForm jp-lineFormButtonIcon",elementPosition:"center"}),M.createElement("input",{type:"submit",className:"jp-baseLineForm jp-lineFormButton",value:""}))),M.createElement("label",{className:"jp-lineFormCaption",htmlFor:this.state.textInputId},this._trans.__("Go to cell number between 1 and %1",this.props.maxCell))))}}function Uo(r){const n=(r.translator||R).load("jupyterlab"),s=r.selectionStart>0&&r.selectionStart!==r.selectionEnd?n.__("%1:%2/%3",r.selectionStart,r.selectionEnd,r.totalCells):n.__("Cell %1/%2",r.activeCell,r.totalCells),a=l=>{(l.key==="Enter"||l.key==="Spacebar"||l.key===" ")&&(l.preventDefault(),l.stopPropagation(),r.handleClick())};return M.createElement($e,{role:"button","aria-haspopup":!0,onClick:r.handleClick,source:s,title:n.__("Go to cell…"),tabIndex:0,onKeyDown:a})}class re extends me{constructor(e={}){super(new re.Model),this._popup=null,this.addClass("jp-mod-highlighted"),this._translator=e.translator||R}render(){return this.model===null?null:M.createElement(Uo,{activeCell:this.model.activeCell,selectionStart:this.model.selectionStart,selectionEnd:this.model.selectionEnd,totalCells:this.model.totalCells,translator:this._translator,handleClick:()=>this._handleClick()})}_handleClick(){if(this.model.totalCells<1)return;this._popup&&this._popup.dispose();const e=Te.create(M.createElement(Vo,{handleSubmit:n=>this._handleSubmit(n),maxCell:this.model.totalCells,translator:this._translator}));this._popup=Eo({body:e,anchor:this,align:"right"})}_handleSubmit(e){var n;const s=this.model.notebook;if(!s)return;const a=e-1;s.activeCellIndex=a,s.deselectAll(),s.scrollToItem(a).catch(l=>{console.error("Go to cell",l)}),(n=this._popup)===null||n===void 0||n.dispose(),s.activate()}}(function(r){class e extends Ce{constructor(){super(...arguments),this._activeCell=0,this._selectionStart=0,this._selectionEnd=0,this._totalCells=0,this._notebook=null}get notebook(){return this._notebook}set notebook(s){const a=this._notebook;a&&(a.activeCellChanged.disconnect(this._onChanged,this),a.modelContentChanged.disconnect(this._onChanged,this),a.selectionChanged.disconnect(this._onChanged,this));const l=this._getAllState();this._notebook=s,this._notebook?(this._notebook.activeCellChanged.connect(this._onChanged,this),this._notebook.modelContentChanged.connect(this._onChanged,this),this._notebook.selectionChanged.connect(this._onChanged,this),this._updateStateFromNotebook(this._notebook)):(this._activeCell=0,this._selectionStart=0,this._selectionEnd=0,this._totalCells=0),this._triggerChange(l,this._getAllState())}get activeCell(){return this._activeCell}get selectionStart(){return this._selectionStart}get selectionEnd(){return this._selectionEnd}get totalCells(){return this._totalCells}_onChanged(s){const a=this._getAllState();this._updateStateFromNotebook(s),this._triggerChange(a,this._getAllState())}_updateStateFromNotebook(s){const a=s.activeCellIndex;this._activeCell=a>=0?a+1:0,this._totalCells=s.widgets.length;let l=this._activeCell,p=this._activeCell,i=!1;s.widgets.forEach((u,d)=>{if(!s.isSelectedOrActive(u))return;const g=d+1;if(!i){l=g,p=g,i=!0;return}p=g}),this._selectionStart=i?l:0,this._selectionEnd=i?p:0}_getAllState(){return{activeCell:this._activeCell,selectionStart:this._selectionStart,selectionEnd:this._selectionEnd,totalCells:this._totalCells}}_triggerChange(s,a){(s.activeCell!==a.activeCell||s.selectionStart!==a.selectionStart||s.selectionEnd!==a.selectionEnd||s.totalCells!==a.totalCells)&&this.stateChanged.emit(void 0)}}r.Model=e})(re||(re={}));const qo="jp-Notebook-toolbarCellType",$o="jp-Notebook-toolbarCellTypeDropdown";var Ae;(function(r){function e(g,b){const f=(b||R).load("jupyterlab");function _(){if(g.context.model.readOnly)return tt({title:f.__("Cannot Save"),body:f.__("Document is read-only"),buttons:[ke.okButton()]});g.context.save().then(()=>{if(!g.isDisposed)return g.context.createCheckpoint()})}return yt(Te.create(J.createElement(xt,{signal:g.context.fileChanged},()=>J.createElement(wt,{icon:kt,onClick:_,tooltip:f.__("Save the notebook contents and create checkpoint"),enabled:!!(g&&g.context&&g.context.contentsModel&&g.context.contentsModel.writable)}))))}r.createSaveButton=e;function n(g,b){const f=(b||R).load("jupyterlab");return new Q({icon:St,onClick:()=>{v.insertBelow(g.content)},tooltip:f.__("Insert a cell below")})}r.createInsertButton=n;function s(g,b,f){const _=(b||R).load("jupyterlab");return new Q({icon:Ye,onClick:async()=>{f?.get("useSystemClipboardForCells").composite?await v.cutToSystemClipboard(g.content):v.cut(g.content)},tooltip:_.__("Cut the selected cells")})}r.createCutButton=s;function a(g,b,f){const _=(b||R).load("jupyterlab");return new Q({icon:Xe,onClick:async()=>{f?.get("useSystemClipboardForCells").composite?await v.copyToSystemClipboard(g.content):v.copy(g.content)},tooltip:_.__("Copy the selected cells")})}r.createCopyButton=a;function l(g,b,f){const _=(b||R).load("jupyterlab");return new Q({icon:Ze,onClick:async()=>{f?.get("useSystemClipboardForCells").composite?await v.pasteFromSystemClipboard(g.content):v.paste(g.content)},tooltip:_.__("Paste cells from the clipboard")})}r.createPasteButton=l;function p(g,b,f){const _=(f??R).load("jupyterlab");return new Q({icon:Qe,onClick:()=>{v.runAndAdvance(g.content,g.sessionContext,b,f)},tooltip:_.__("Run the selected cells and advance")})}r.createRunButton=p;function i(g,b,f){const _=(f??R).load("jupyterlab");return new Q({icon:et,onClick:()=>{const y=b??new Be({translator:f});y.restart(g.sessionContext).then(w=>(w&&v.runAll(g.content,g.sessionContext,y,f),w))},tooltip:_.__("Restart the kernel, then re-run the whole notebook")})}r.createRestartRunAllButton=i;function u(g,b){return new Do(g.content,b)}r.createCellTypeItem=u;function d(g,b,f,_){return[{name:"save",widget:e(g,f)},{name:"insert",widget:n(g,f)},{name:"cut",widget:s(g,f,_)},{name:"copy",widget:a(g,f,_)},{name:"paste",widget:l(g,f,_)},{name:"run",widget:p(g,b,f)},{name:"interrupt",widget:he.createInterruptButton(g.sessionContext,f)},{name:"restart",widget:he.createRestartButton(g.sessionContext,b,f)},{name:"restart-and-run",widget:i(g,b,f)},{name:"cellType",widget:u(g,f)},{name:"spacer",widget:At.createSpacerItem()},{name:"kernelName",widget:he.createKernelNameItem(g.sessionContext,b,f)}]}r.getDefaultItems=d})(Ae||(Ae={}));class Do extends Te{constructor(e,n){super(),this.handleChange=s=>{s.target.value!=="-"&&(v.changeCellType(this._notebook,s.target.value),this._notebook.activate())},this.handleKeyDown=s=>{s.key==="Enter"&&this._notebook.activate()},this._trans=(n||R).load("jupyterlab"),this.addClass(qo),this._notebook=e,e.model&&this.update(),e.activeCellChanged.connect(this.update,this),e.selectionChanged.connect(this.update,this)}render(){let e="-";this._notebook.activeCell&&(e=this._notebook.activeCell.model.type);for(const n of this._notebook.widgets)if(this._notebook.isSelectedOrActive(n)&&n.model.type!==e){e="-";break}return J.createElement(Ro,{className:$o,onChange:this.handleChange,onKeyDown:this.handleKeyDown,value:e,"aria-label":this._trans.__("Cell type"),title:this._trans.__("Select the cell type")},J.createElement("option",{value:"-"},"-"),J.createElement("option",{value:"code"},this._trans.__("Code")),J.createElement("option",{value:"markdown"},this._trans.__("Markdown")),J.createElement("option",{value:"raw"},this._trans.__("Raw")))}}function Ke(r){var e;const n=r.translator||R,s=ht(n),a=n.load("jupyterlab"),l=(e=r.displayOption.showJumpToCell)!==null&&e!==void 0?e:!1,p=r.state,i=r.displayOption.showOnToolBar,u=r.displayOption.showProgress,d=i?"down":"up",g=M.createElement("div",null),[b,f]=M.useState(!1);if(M.useEffect(()=>{if(b)return;const j=()=>{f(!0)};return v.executionScheduled.connect(j),()=>{v.executionScheduled.disconnect(j)}},[l,b]),!p)return g;const _=p.kernelStatus,y={alignSelf:"normal",height:"24px"},w=p.totalTime,S=p.scheduledCellNumber||0,o=p.scheduledCell.size||0,t=S-o;let h=100*t/S,C=u?"":"hidden";!u&&h<100&&(h=0);const k=j=>M.createElement(Lo,{progress:j,width:16,height:24,label:a.__("Kernel status")}),A=j=>a.__("Kernel status: %1",j),B=()=>{const j=r.notebook;v.selectLastRunCell(j),j.activeCell&&j.scrollToCell(j.activeCell)},E=(j,K,W)=>M.createElement("div",{className:"jp-Notebook-ExecutionIndicator",title:u?"":A(s[j]),"data-status":j},K,M.createElement("div",{className:`jp-Notebook-ExecutionIndicator-tooltip ${d} ${C}`},M.createElement("span",null," ",A(s[j])," "),W,l&&b&&M.createElement(Bt,{className:"jp-Notebook-ExecutionIndicator-jumpButton",onClick:B,title:a.__("Jump to current or last executed cell")},a.__("Jump to cell"))));if(p.kernelStatus==="connecting"||p.kernelStatus==="disconnected"||p.kernelStatus==="unknown")return E(_,M.createElement(Mt.react,{...y}),[]);if(p.kernelStatus==="starting"||p.kernelStatus==="terminating"||p.kernelStatus==="restarting"||p.kernelStatus==="initializing")return E(_,M.createElement(Tt.react,{...y}),[]);if(p.executionStatus==="busy")return E("busy",k(h),[M.createElement("span",{key:0},a.__("Executed %1/%2 cells",t,S)),M.createElement("span",{key:1},a._n("Elapsed time: %1 second","Elapsed time: %1 seconds",w))]);{const j=p.kernelStatus==="busy"?0:100,K=p.kernelStatus==="busy"||w===0?[]:[M.createElement("span",{key:0},a._n("Executed %1 cell","Executed %1 cells",S)),M.createElement("span",{key:1},a._n("Elapsed time: %1 second","Elapsed time: %1 seconds",w))];return E(p.kernelStatus,k(j),K)}}class X extends me{constructor(e,n=!0){super(new X.Model),this.translator=e||R,this.addClass("jp-mod-highlighted")}dispose(){var e;this.isDisposed||((e=this.model)===null||e===void 0||e.dispose(),super.dispose())}render(){if(this.model===null||!this.model.renderFlag)return M.createElement("div",null);{const e=this.model.currentNotebook;return e?M.createElement(Ke,{displayOption:this.model.displayOption,state:this.model.executionState(e),translator:this.translator,notebook:e}):M.createElement(Ke,{displayOption:this.model.displayOption,state:void 0,translator:this.translator,notebook:void 0})}}}(function(r){class e extends Ce{constructor(){super(),this._notebookExecutionProgress=new WeakMap,this._displayOption={showOnToolBar:!0,showProgress:!0,showJumpToCell:!1},this._renderFlag=!0}attachNotebook(l){var p,i,u,d;if(l&&l.content&&l.context){const g=l.content,b=l.context;if(this._currentNotebook=g,!this._notebookExecutionProgress.has(g)){this._notebookExecutionProgress.set(g,{executionStatus:"idle",kernelStatus:"idle",totalTime:0,interval:0,timeout:0,scheduledCell:new Set,scheduledCellNumber:0,needReset:!0});const f=this._notebookExecutionProgress.get(g),_=o=>{f&&(f.kernelStatus=o.kernelDisplayStatus),this.stateChanged.emit(void 0)};b.statusChanged.connect(_,this);const y=o=>{f&&(f.kernelStatus=o.kernelDisplayStatus),this.stateChanged.emit(void 0)};b.connectionStatusChanged.connect(y,this),b.disposed.connect(o=>{o.connectionStatusChanged.disconnect(y,this),o.statusChanged.disconnect(_,this)},this);const w=(o,t)=>{const h=t.msg,C=h.header.msg_id;if(h.header.msg_type==="execute_request")this._cellScheduledCallback(g,C);else if(Y.KernelMessage.isStatusMsg(h)&&h.content.execution_state==="idle"){const k=h.parent_header.msg_id;this._cellExecutedCallback(g,k)}else Y.KernelMessage.isStatusMsg(h)&&h.content.execution_state==="restarting"?this._restartHandler(g):h.header.msg_type==="execute_input"&&this._startTimer(g)};(i=(p=b.session)===null||p===void 0?void 0:p.kernel)===null||i===void 0||i.anyMessage.connect(w,this),(d=(u=b.session)===null||u===void 0?void 0:u.kernel)===null||d===void 0||d.disposed.connect(o=>o.anyMessage.disconnect(w,this),this);const S=(o,t)=>{f&&(this._resetTime(f),this.stateChanged.emit(void 0),t.newValue&&t.newValue.anyMessage.connect(w,this))};b.kernelChanged.connect(S,this),b.disposed.connect(o=>o.kernelChanged.disconnect(S,this),this)}}}get currentNotebook(){return this._currentNotebook}get displayOption(){return this._displayOption}set displayOption(l){this._displayOption=l}executionState(l){return this._notebookExecutionProgress.get(l)}_scheduleSwitchToIdle(l){window.setTimeout(()=>{l.executionStatus="idle",clearInterval(l.interval),this.stateChanged.emit(void 0)},150),l.timeout=window.setTimeout(()=>{l.needReset=!0},1e3)}_cellExecutedCallback(l,p){const i=this._notebookExecutionProgress.get(l);i&&i.scheduledCell.has(p)&&(i.scheduledCell.delete(p),i.scheduledCell.size===0&&this._scheduleSwitchToIdle(i))}_restartHandler(l){const p=this._notebookExecutionProgress.get(l);p&&(p.scheduledCell.clear(),this._scheduleSwitchToIdle(p))}_startTimer(l){const p=this._notebookExecutionProgress.get(l);p&&(p.scheduledCell.size>0?p.executionStatus!=="busy"&&(p.executionStatus="busy",clearTimeout(p.timeout),this.stateChanged.emit(void 0),p.interval=window.setInterval(()=>{this._tick(p)},1e3)):this._resetTime(p))}_cellScheduledCallback(l,p){const i=this._notebookExecutionProgress.get(l);i&&!i.scheduledCell.has(p)&&(i.needReset&&this._resetTime(i),i.scheduledCell.add(p),i.scheduledCellNumber+=1)}_tick(l){if(this.isDisposed){clearInterval(l.interval),clearTimeout(l.timeout);return}l.totalTime+=1,this.stateChanged.emit(void 0)}_resetTime(l){l.totalTime=0,l.scheduledCellNumber=0,l.executionStatus="idle",l.scheduledCell=new Set,clearTimeout(l.timeout),clearInterval(l.interval),l.needReset=!1}get renderFlag(){return this._renderFlag}updateRenderOption(l){this.displayOption.showOnToolBar&&(l.showOnToolBar?this._renderFlag=!0:this._renderFlag=!1),this.displayOption.showProgress=l.showProgress,this.displayOption.showJumpToCell=l.showJumpToCell,this.stateChanged.emit(void 0)}}r.Model=e;function n(a,l,p){const i=new r(l);return i.model.displayOption={showOnToolBar:!0,showProgress:!0,showJumpToCell:!1},i.model.attachNotebook({content:a.content,context:a.sessionContext}),p&&p.then(u=>{const d=g=>{const b=s(g);b.showJumpToCell&&(g.get("recordTiming").composite||g.set("recordTiming",!0).catch(_=>{console.error("Failed to auto-enable recordTiming:",_.message)})),i.model.updateRenderOption(b)};u.changed.connect(d),d(u),i.disposed.connect(()=>{u.changed.disconnect(d)})}).catch(u=>{console.error(u.message)}),i}r.createExecutionIndicatorItem=n;function s(a){let l=!0,p=!0,i=!1;const u=a.get("kernelStatus").composite;return u&&(l=!u.showOnStatusBar,p=u.showProgress,i=u.showJumpToRecentExecutionButton),{showOnToolBar:l,showProgress:p,showJumpToCell:i}}r.getSettingValue=s})(X||(X={}));function Jo(r){const e=(r.translator||R).load("jupyterlab");return J.createElement($e,{source:e.__("Mode: %1",r.modeNames[r.notebookMode])})}class ae extends me{constructor(e){super(new ae.Model),this.translator=e||R,this._trans=this.translator.load("jupyterlab"),this._modeNames={command:this._trans.__("Command"),edit:this._trans.__("Edit")}}render(){return this.model?(this.node.title=this._trans.__("Notebook is in %1 mode",this._modeNames[this.model.notebookMode]),J.createElement(Jo,{notebookMode:this.model.notebookMode,translator:this.translator,modeNames:this._modeNames})):null}}(function(r){class e extends Ce{constructor(){super(...arguments),this._onChanged=s=>{const a=this._notebookMode;this._notebook?this._notebookMode=s.mode:this._notebookMode="command",this._triggerChange(a,this._notebookMode)},this._notebookMode="command",this._notebook=null}get notebookMode(){return this._notebookMode}set notebook(s){const a=this._notebook;a!==null&&(a.stateChanged.disconnect(this._onChanged,this),a.activeCellChanged.disconnect(this._onChanged,this),a.modelContentChanged.disconnect(this._onChanged,this));const l=this._notebookMode;this._notebook=s,this._notebook===null?this._notebookMode="command":(this._notebookMode=this._notebook.mode,this._notebook.stateChanged.connect(this._onChanged,this),this._notebook.activeCellChanged.connect(this._onChanged,this),this._notebook.modelContentChanged.connect(this._onChanged,this)),this._triggerChange(l,this._notebookMode)}_triggerChange(s,a){s!==a&&this.stateChanged.emit(void 0)}}r.Model=e})(ae||(ae={}));class zo extends ko{constructor(e,n){super(e,n),this.editorWidget=e,this.options=n,this._type="code",this._readyDelegate=new Et,this._editorToCell=new Map,this.editor=e.content,this._cellToEditor=new WeakMap,this.isReady=this.isReady.bind(this),Promise.all([this.widget.context.sessionContext.ready,this.connectionManager.ready]).then(async()=>{await this.initOnceReady(),this._readyDelegate.resolve()}).catch(console.error)}get documentPath(){return this.widget.context.path}get mimeType(){var e;let n,s=this.language_info();return!s||!s.mimetype?n=this.widget.content.codeMimetype:n=s.mimetype,Array.isArray(n)?(e=n[0])!==null&&e!==void 0?e:Nt.defaultMimeType:n}get languageFileExtension(){let e=this.language_info();if(!(!e||!e.file_extension))return e.file_extension.replace(".","")}get wrapperElement(){return this.widget.node}get editors(){if(this.isDisposed)return[];let e=this.widget.content;return this._editorToCell.clear(),e.isDisposed?[]:e.widgets.map(n=>({ceEditor:this._getCellEditor(n),type:n.model.type,value:n.model.sharedModel.getSource()}))}get activeEditor(){return this.editor.activeCell?this._getCellEditor(this.editor.activeCell):void 0}get ready(){return this._readyDelegate.promise}getEditorIndexAt(e){let n=this._getCellAt(e);return this.widget.content.widgets.findIndex(a=>n===a)}getEditorIndex(e){let n=this._editorToCell.get(e);return this.editor.widgets.findIndex(s=>n===s)}getEditorWrapper(e){return this._editorToCell.get(e).node}async onKernelChanged(e,n){if(n.newValue)try{const s=this._languageInfo;await He(this.isReady,-1),await this._updateLanguageInfo();const a=this._languageInfo;s?.name!=a.name||s?.mimetype!=a?.mimetype||s?.file_extension!=a?.file_extension?(console.log(`Changed to ${this._languageInfo.name} kernel, reconnecting`),this.reloadConnection()):console.log("Keeping old LSP connection as the new kernel uses the same language")}catch(s){console.warn(s),this.reloadConnection()}}dispose(){this.isDisposed||(this.widget.context.sessionContext.kernelChanged.disconnect(this.onKernelChanged,this),this.widget.content.activeCellChanged.disconnect(this._activeCellChanged,this),super.dispose(),this._editorToCell.clear(),Ot.clearData(this))}isReady(){var e;return!this.widget.isDisposed&&this.widget.context.isReady&&this.widget.content.isVisible&&this.widget.content.widgets.length>0&&((e=this.widget.context.sessionContext.session)===null||e===void 0?void 0:e.kernel)!=null}async handleCellChange(e,n){let s=[],a=[];const l=this._type;if(n.type==="set"){let p=[],i=[];if(n.newValues.length===n.oldValues.length){for(let u=0;u<n.newValues.length;u++)n.oldValues[u].type===l&&n.newValues[u].type!==l?p.push(n.newValues[u]):n.oldValues[u].type!==l&&n.newValues[u].type===l&&i.push(n.newValues[u]);s=i,a=p}}else n.type=="add"&&(s=n.newValues.filter(p=>p.type===l));(a.length||s.length||n.type==="set"||n.type==="move"||n.type==="remove"||n.type==="clear")&&await this.updateDocuments();for(let p of s){let i=this.widget.content.widgets.find(u=>u.model.id===p.id);if(!i){console.warn(`Widget for added cell with ID: ${p.id} not found!`);continue}this._getCellEditor(i)}}createVirtualDocument(){return new So({language:this.language,foreignCodeExtractors:this.options.foreignCodeExtractorsManager,path:this.documentPath,fileExtension:this.languageFileExtension,standalone:!1,hasLspSupportedFile:!1})}language_info(){return this._languageInfo}async initOnceReady(){await He(this.isReady.bind(this),-1),await this._updateLanguageInfo(),this.initVirtual(),this.connectDocument(this.virtualDocument,!1).catch(console.warn),this.widget.context.sessionContext.kernelChanged.connect(this.onKernelChanged,this),this.widget.content.activeCellChanged.connect(this._activeCellChanged,this),this._connectModelSignals(this.widget),this.editor.modelChanged.connect(e=>{console.warn("Model changed, connecting cell change handler; this is not something we were expecting"),this._connectModelSignals(e)})}_connectModelSignals(e){e.model===null?console.warn(`Model is missing for notebook ${e}, cannot connect cell changed signal!`):e.model.cells.changed.connect(this.handleCellChange,this)}async _updateLanguageInfo(){var e,n,s,a;const l=(a=await((s=(n=(e=this.widget.context.sessionContext)===null||e===void 0?void 0:e.session)===null||n===void 0?void 0:n.kernel)===null||s===void 0?void 0:s.info))===null||a===void 0?void 0:a.language_info;if(l)this._languageInfo=l;else throw new Error("Language info update failed (no session, kernel, or info available)")}_activeCellChanged(e,n){!n||n.model.type!==this._type||this._activeEditorChanged.emit({editor:this._getCellEditor(n)})}_getCellAt(e){let n=this.virtualDocument.getEditorAtVirtualLine(e);return this._editorToCell.get(n)}_getCellEditor(e){if(!this._cellToEditor.has(e)){const n=Object.freeze({getEditor:()=>e.editor,ready:async()=>(await e.ready,e.editor),reveal:async()=>(await this.editor.scrollToCell(e),e.editor)});this._cellToEditor.set(e,n),this._editorToCell.set(n,e),e.disposed.connect(()=>{this._cellToEditor.delete(e),this._editorToCell.delete(n),this._editorRemoved.emit({editor:n})}),this._editorAdded.emit({editor:n})}return this._cellToEditor.get(e)}}class Go extends ee{constructor(){super(),this._items=[],this.layout=new be,this.addClass("jp-RankedPanel")}addWidget(e,n){const s={widget:e,rank:n},a=le.upperBound(this._items,s,Me.itemCmp);le.insert(this._items,a,s),this.layout.insertWidget(a,e)}onChildRemoved(e){const n=le.findFirstIndex(this._items,s=>s.widget===e.child);n!==-1&&le.removeAt(this._items,n)}}class q extends ee{constructor(e){super(),this.addClass("jp-NotebookTools"),this.translator=e.translator||R,this._tools=[],this.layout=new be,this._tracker=e.tracker,this._tracker.currentChanged.connect(this._onActiveNotebookPanelChanged,this),this._tracker.activeCellChanged.connect(this._onActiveCellChanged,this),this._tracker.selectionChanged.connect(this._onSelectionChanged,this),this._onActiveNotebookPanelChanged(),this._onActiveCellChanged(),this._onSelectionChanged()}get activeCell(){return this._tracker.activeCell}get selectedCells(){const e=this._tracker.currentWidget;if(!e)return[];const n=e.content;return n.widgets.filter(s=>n.isSelectedOrActive(s))}get activeNotebookPanel(){return this._tracker.currentWidget}addItem(e){var n;const s=e.tool,a=(n=e.rank)!==null&&n!==void 0?n:100;let l;const p=this._tools.find(i=>i.section===e.section);if(p)l=p.panel;else throw new Error(`The section ${e.section} does not exist`);s.addClass("jp-NotebookTools-tool"),l.addWidget(s,a),s.notebookTools=this,G.sendMessage(s,q.ActiveNotebookPanelMessage),G.sendMessage(s,q.ActiveCellMessage)}addSection(e){var n;const s=e.sectionName,a=e.label||e.sectionName,l=e.tool;let p=(n=e.rank)!==null&&n!==void 0?n:null;const i=new Go;if(i.title.label=a,l&&i.addWidget(l,0),this._tools.push({section:s,panel:i,rank:p}),p!=null)this.layout.insertWidget(p,new ce({widget:i}));else{let u=null;const d=this.layout;for(let g=0;g<d.widgets.length;g++){let b=d.widgets[g];if(b instanceof ce&&b.widget.id==="advancedToolsSection"){u=g;break}}u!==null?this.layout.insertWidget(u,new ce({widget:i})):this.layout.addWidget(new ce({widget:i}))}}_onActiveNotebookPanelChanged(){this._prevActiveNotebookModel&&!this._prevActiveNotebookModel.isDisposed&&this._prevActiveNotebookModel.metadataChanged.disconnect(this._onActiveNotebookPanelMetadataChanged,this);const e=this.activeNotebookPanel&&this.activeNotebookPanel.content?this.activeNotebookPanel.content.model:null;this._prevActiveNotebookModel=e,e&&e.metadataChanged.connect(this._onActiveNotebookPanelMetadataChanged,this);for(const n of this._toolChildren())G.sendMessage(n,q.ActiveNotebookPanelMessage)}_onActiveCellChanged(){this._prevActiveCell&&!this._prevActiveCell.isDisposed&&this._prevActiveCell.metadataChanged.disconnect(this._onActiveCellMetadataChanged,this);const e=this.activeCell?this.activeCell.model:null;this._prevActiveCell=e,e&&e.metadataChanged.connect(this._onActiveCellMetadataChanged,this);for(const n of this._toolChildren())G.sendMessage(n,q.ActiveCellMessage)}_onSelectionChanged(){for(const e of this._toolChildren())G.sendMessage(e,q.SelectionMessage)}_onActiveNotebookPanelMetadataChanged(e,n){const s=new ge.ChangeMessage("activenotebookpanel-metadata-changed",{oldValue:void 0,newValue:void 0,...n});for(const a of this._toolChildren())G.sendMessage(a,s)}_onActiveCellMetadataChanged(e,n){const s=new ge.ChangeMessage("activecell-metadata-changed",{newValue:void 0,oldValue:void 0,...n});for(const a of this._toolChildren())G.sendMessage(a,s)}*_toolChildren(){for(let e of this._tools)yield*e.panel.children()}}(function(r){r.ActiveNotebookPanelMessage=new xe("activenotebookpanel-changed"),r.ActiveCellMessage=new xe("activecell-changed"),r.SelectionMessage=new xe("selection-changed");class e extends ee{dispose(){super.dispose(),this.notebookTools&&(this.notebookTools=null)}processMessage(a){switch(super.processMessage(a),a.type){case"activenotebookpanel-changed":this.onActiveNotebookPanelChanged(a);break;case"activecell-changed":this.onActiveCellChanged(a);break;case"selection-changed":this.onSelectionChanged(a);break;case"activecell-metadata-changed":this.onActiveCellMetadataChanged(a);break;case"activenotebookpanel-metadata-changed":this.onActiveNotebookPanelMetadataChanged(a);break}}onActiveNotebookPanelChanged(a){}onActiveCellChanged(a){}onSelectionChanged(a){}onActiveCellMetadataChanged(a){}onActiveNotebookPanelMetadataChanged(a){}}r.Tool=e;class n extends e{constructor(a){super();const{editorFactory:l}=a;this.addClass("jp-MetadataEditorTool");const p=this.layout=new be;this._editorFactory=l,this._editorLabel=a.label||"Edit Metadata",this.createEditor();const i=new ee({node:document.createElement("label")});i.node.textContent=a.label||"Edit Metadata",p.addWidget(i),p.addWidget(this.editor)}get editor(){return this._editor}onActiveNotebookPanelChanged(a){this.editor.dispose(),this.notebookTools.activeNotebookPanel&&this.createEditor()}createEditor(){this._editor=new Ko({editorFactory:this._editorFactory}),this.editor.title.label=this._editorLabel,this.layout.addWidget(this.editor)}}r.MetadataEditorTool=n})(q||(q={}));var Me;(function(r){function e(n,s){return n.rank-s.rank}r.itemCmp=e})(Me||(Me={}));const Yo=6;var V;(function(r){r[r.Idle=-1]="Idle",r[r.Error=-.5]="Error",r[r.Scheduled=0]="Scheduled",r[r.Running=1]="Running"})(V||(V={}));class Xo extends Po{constructor(e,n,s,a){super(e,a),this.parser=n,this.sanitizer=s,this.configMetadataMap={numberHeaders:["toc-autonumbering","toc/number_sections"],numberingH1:["!toc/skip_h1_title"],baseNumbering:["toc/base_numbering"]},this._runningCells=new Array,this._errorCells=new Array,this._cellToHeadingIndex=new WeakMap,e.context.ready.then(()=>{this.setConfiguration({})}),this.widget.context.model.metadataChanged.connect(this.onMetadataChanged,this),this.widget.content.activeCellChanged.connect(this.onActiveCellChanged,this),v.executionScheduled.connect(this.onExecutionScheduled,this),v.executed.connect(this.onExecuted,this),v.outputCleared.connect(this.onOutputCleared,this),this.headingsChanged.connect(this.onHeadingsChanged,this)}get documentType(){return"notebook"}get isAlwaysActive(){return!0}get supportedOptions(){return["baseNumbering","maximalDepth","numberingH1","numberHeaders","includeOutput","syncCollapseState"]}getCellHeadings(e){const n=new Array;let s=this._cellToHeadingIndex.get(e);if(s!==void 0){const a=this.headings[s];for(n.push(a);this.headings[s-1]&&this.headings[s-1].cellRef===a.cellRef;)s--,n.unshift(this.headings[s])}return n}dispose(){var e,n,s;this.isDisposed||(this.headingsChanged.disconnect(this.onHeadingsChanged,this),(n=(e=this.widget.context)===null||e===void 0?void 0:e.model)===null||n===void 0||n.metadataChanged.disconnect(this.onMetadataChanged,this),(s=this.widget.content)===null||s===void 0||s.activeCellChanged.disconnect(this.onActiveCellChanged,this),v.executionScheduled.disconnect(this.onExecutionScheduled,this),v.executed.disconnect(this.onExecuted,this),v.outputCleared.disconnect(this.onOutputCleared,this),this._runningCells.length=0,this._errorCells.length=0,super.dispose())}setConfiguration(e){const n=this.loadConfigurationFromMetadata();super.setConfiguration({...this.configuration,...n,...e})}toggleCollapse(e){super.toggleCollapse(e),this.updateRunningStatus(this.headings)}async getHeadings(){const e=this.widget.content.widgets,n=new Set(e),s=[],a=new Array,l=new WeakMap;for(let p=0;p<e.length;p++){const i=e[p];switch(i.model.type){case"code":{!this.configuration.syncCollapseState&&this.configuration.includeOutput&&s.push(...Le(await i.getHeadings(),this.configuration,a).map(d=>({...d,cellRef:i,collapsed:!1,isRunning:V.Idle})));break}case"markdown":{const d=Le(await i.getHeadings(),this.configuration,a).map((g,b)=>({...g,cellRef:i,collapsed:!1,isRunning:V.Idle}));if(this.configuration.syncCollapseState&&i.headingCollapsed){const g=Math.min(...d.map(f=>f.level)),b=d.find(f=>f.level===g);b.collapsed=i.headingCollapsed}s.push(...d);break}}s.length>0&&l.set(i,s.length-1)}return this._cellToHeadingIndex=l,this._runningCells=this._runningCells.filter(p=>n.has(p)),this._errorCells=this._errorCells.filter(p=>n.has(p)),this.updateRunningStatus(s),Promise.resolve(s)}isHeadingEqual(e,n){return super.isHeadingEqual(e,n)&&e.cellRef===n.cellRef&&e.isRunning===n.isRunning}loadConfigurationFromMetadata(){const e=this.widget.content.model,n={};if(e)for(const s in this.configMetadataMap){const a=this.configMetadataMap[s];for(const l of a){let p=l;const i=p[0]==="!";i&&(p=p.slice(1));const u=p.split("/");let d=e.getMetadata(u[0]);for(let g=1;g<u.length;g++)d=(d??{})[u[g]];d!==void 0&&(typeof d=="boolean"&&i&&(d=!d),n[s]=d)}}return n}onActiveCellChanged(e,n){const s=this.getCellHeadings(n)[0];this.setActiveHeading(s??null,!1)}onHeadingsChanged(){this.widget.content.activeCell&&this.onActiveCellChanged(this.widget.content,this.widget.content.activeCell)}onExecuted(e,n){this._runningCells.forEach((s,a)=>{var l;if(s===n.cell){this._runningCells.splice(a,1);const p=this._cellToHeadingIndex.get(s);if(p!==void 0){const i=this.headings[p];if(n.success||((l=n.error)===null||l===void 0?void 0:l.errorName)===void 0){i.isRunning=V.Idle;return}i.isRunning=V.Error,this._errorCells.includes(s)||this._errorCells.push(s)}}}),this.updateRunningStatus(this.headings),this.stateChanged.emit()}onExecutionScheduled(e,n){this._runningCells.includes(n.cell)||this._runningCells.push(n.cell),this._errorCells.forEach((s,a)=>{s===n.cell&&this._errorCells.splice(a,1)}),this.updateRunningStatus(this.headings),this.stateChanged.emit()}onOutputCleared(e,n){this._errorCells.forEach((s,a)=>{if(s===n.cell){this._errorCells.splice(a,1);const l=this._cellToHeadingIndex.get(s);if(l!==void 0){const p=this.headings[l];p.isRunning=V.Idle}}}),this.updateRunningStatus(this.headings),this.stateChanged.emit()}onMetadataChanged(){this.setConfiguration({})}updateRunningStatus(e){e.forEach(a=>{a.isRunning=V.Idle}),this._runningCells.forEach((a,l)=>{const p=this._cellToHeadingIndex.get(a);if(p!==void 0){const i=e[p];i.isRunning!==V.Running&&(i.isRunning=l>0?V.Scheduled:V.Running)}}),this._errorCells.forEach((a,l)=>{const p=this._cellToHeadingIndex.get(a);if(p!==void 0){const i=e[p];i.isRunning===V.Idle&&(i.isRunning=V.Error)}});let n=0;for(;n<e.length;){const a=e[n];if(n++,a.collapsed){const l=Math.max(a.isRunning,s(e,a.level));a.dataset={...a.dataset,"data-running":l.toString()}}else a.dataset={...a.dataset,"data-running":a.isRunning.toString()}}function s(a,l){let p=V.Idle;for(;n<a.length;){const i=a[n];if(i.dataset={...i.dataset,"data-running":i.isRunning.toString()},i.level>l)n++,p=Math.max(i.isRunning,p),i.collapsed&&(p=Math.max(p,s(a,i.level)),i.dataset={...i.dataset,"data-running":p.toString()});else break}return p}}}class Zo extends Io{constructor(e,n,s,a){super(e),this.parser=n,this.sanitizer=s,this.commands=a,this._scrollToTop=!0}get scrollToTop(){return this._scrollToTop}set scrollToTop(e){this._scrollToTop=e}_createNew(e,n){const s=new Xo(e,this.parser,this.sanitizer,n);let a=new WeakMap;const l=(_,y)=>{if(y){const w=async h=>{if(!h.inViewport)return;let C=a.get(y);if((!C||!y.cellRef.node.contains(C))&&(await i(h),C=a.get(y)),C)if(this.scrollToTop)C.scrollIntoView({block:"start"}),e.content.outerNode.scrollTop-=Yo;else{const k=e.content.node.getBoundingClientRect(),A=C.getBoundingClientRect();(A.top>k.bottom||A.bottom<k.top)&&C.scrollIntoView({block:"center"})}else console.debug("scrolling to heading: using fallback strategy"),await e.content.scrollToItem(e.content.activeCellIndex,this.scrollToTop?"start":void 0,0)},S=y.cellRef,t=e.content.widgets.indexOf(S);S.model.type=="markdown"&&e.content.mode!="command"&&(e.content.mode="command"),e.content.activeCellIndex=t,S.inViewport?w(S).catch(h=>{console.error(`Fail to scroll to cell to display the required heading (${h}).`)}):e.content.scrollToItem(t,this.scrollToTop?"start":void 0).then(()=>i(S)).then(()=>w(S)).catch(h=>{console.error(`Fail to scroll to cell to display the required heading (${h}).`)})}},p=_=>s.getCellHeadings(_).filter(y=>y.cellRef===_),i=async _=>{var y;const w=p(_),S=(y=this.sanitizer.allowNamedProperties)!==null&&y!==void 0&&y?"id":"data-jupyter-id",o=await Promise.all(w.map(async h=>{const C=await Qo(h,this.parser,this.sanitizer);return C?`h${h.level}[${S}="${CSS.escape(C)}"]`:`h${h.level}`})),t=p(_);t.length!==w.length||t.some((h,C)=>h!==w[C])||(we(_.node),w.forEach((h,C)=>{var k,A;const B=h.outputIndex===void 0?h.cellRef.node:(k=h.cellRef.outputArea.widgets[h.outputIndex])===null||k===void 0?void 0:k.node;a.set(h,B?It(B,o[C],(A=h.prefix)!==null&&A!==void 0?A:""):null)}))},u=_=>{if(this.parser){we(e.content.node),a=new WeakMap;for(const y of e.content.widgets)y instanceof Z&&y.renderedChanged.connect(f);return Promise.all(e.content.widgets.map(y=>i(y)))}},d=(_,y)=>{var w,S,o,t;if(s.configuration.syncCollapseState)if(y!==null){const h=y.cellRef;h.headingCollapsed!==((w=y.collapsed)!==null&&w!==void 0?w:!1)&&(h.headingCollapsed=(S=y.collapsed)!==null&&S!==void 0?S:!1)}else{const h=(t=(o=s.headings[0])===null||o===void 0?void 0:o.collapsed)!==null&&t!==void 0?t:!1;e.content.widgets.forEach(C=>{C instanceof Z&&C.headingInfo.level>=0&&(C.headingCollapsed=h)})}},g=(_,y)=>{if(s.configuration.syncCollapseState){const w=s.getCellHeadings(y)[0];w&&s.toggleCollapse({heading:w,collapsed:y.headingCollapsed})}},b=(_,y)=>{var w;y.inViewport?(w=i(y))===null||w===void 0||w.catch(console.warn):we(y.node)},f=(_,y)=>{y&&i(_).catch(console.warn)};return e.context.ready.then(()=>{var _;(_=u())===null||_===void 0||_.catch(console.warn),s.activeHeadingChanged.connect(l),s.headingsChanged.connect(u),s.collapseChanged.connect(d),e.content.cellCollapsed.connect(g),e.content.cellInViewportChanged.connect(b),e.disposed.connect(()=>{s.activeHeadingChanged.disconnect(l),s.headingsChanged.disconnect(u),s.collapseChanged.disconnect(d),e.content.cellCollapsed.disconnect(g),e.content.cellInViewportChanged.disconnect(b);for(const y of e.content.widgets)y instanceof Z&&y.renderedChanged.disconnect(f)})}),s}getToolbarItems(e){return this.commands?[{name:"select-last-modified-back",widget:new Pe({commands:this.commands,id:"notebook:select-last-modified-cell",args:{toolbar:!0},icon:jt,label:""})},{name:"select-last-modified-forward",widget:new Pe({commands:this.commands,id:"notebook:select-next-modified-cell",args:{toolbar:!0},icon:Rt,label:""})}]:[]}}async function Qo(r,e,n){let s=null;return r.type===We.HeadingType.Markdown?s=await Pt(e,r.raw,r.level,n):r.type===We.HeadingType.HTML&&(s=r.id),s}const en="jp-StatusItem-trust";function tn(r,e){e=e||R;const n=e.load("jupyterlab");return r.trustedCells===r.totalCells?n.__("Notebook trusted: %1 of %2 code cells trusted.",r.trustedCells,r.totalCells):r.activeCellTrusted?n.__("Active cell trusted: %1 of %2 code cells trusted.",r.trustedCells,r.totalCells):n.__("Notebook not trusted: %1 of %2 code cells trusted.",r.trustedCells,r.totalCells)}function on(r){return r.allCellsTrusted?M.createElement(Lt.react,{top:"2px",stylesheet:"statusBar"}):M.createElement(Wt.react,{top:"2px",stylesheet:"statusBar"})}class de extends me{constructor(e){super(new de.Model),this.translator=e||R,this.node.classList.add(en)}render(){if(!this.model)return null;const e=tn(this.model,this.translator);return e!==this.node.title&&(this.node.title=e),M.createElement(on,{allCellsTrusted:this.model.trustedCells===this.model.totalCells,activeCellTrusted:this.model.activeCellTrusted,totalCells:this.model.totalCells,trustedCells:this.model.trustedCells})}}(function(r){class e extends Ce{constructor(){super(...arguments),this._trustedCells=0,this._totalCells=0,this._activeCellTrusted=!1,this._notebook=null}get trustedCells(){return this._trustedCells}get totalCells(){return this._totalCells}get activeCellTrusted(){return this._activeCellTrusted}get notebook(){return this._notebook}set notebook(s){const a=this._notebook;a!==null&&(a.activeCellChanged.disconnect(this._onActiveCellChanged,this),a.modelContentChanged.disconnect(this._onModelChanged,this));const l=this._getAllState();if(this._notebook=s,this._notebook===null)this._trustedCells=0,this._totalCells=0,this._activeCellTrusted=!1;else{this._notebook.activeCellChanged.connect(this._onActiveCellChanged,this),this._notebook.modelContentChanged.connect(this._onModelChanged,this),this._notebook.activeCell?this._activeCellTrusted=this._notebook.activeCell.model.trusted:this._activeCellTrusted=!1;const{total:p,trusted:i}=this._deriveCellTrustState(this._notebook.model);this._totalCells=p,this._trustedCells=i}this._triggerChange(l,this._getAllState())}_onModelChanged(s){const a=this._getAllState(),{total:l,trusted:p}=this._deriveCellTrustState(s.model);this._totalCells=l,this._trustedCells=p,this._triggerChange(a,this._getAllState())}_onActiveCellChanged(s,a){const l=this._getAllState();a?this._activeCellTrusted=a.model.trusted:this._activeCellTrusted=!1,this._triggerChange(l,this._getAllState())}_deriveCellTrustState(s){if(s===null)return{total:0,trusted:0};let a=0,l=0;for(const p of s.cells)p.type==="code"&&(a++,p.trusted&&l++);return{total:a,trusted:l}}_getAllState(){return[this._trustedCells,this._totalCells,this.activeCellTrusted]}_triggerChange(s,a){(s[0]!==a[0]||s[1]!==a[1]||s[2]!==a[2])&&this.stateChanged.emit(void 0)}}r.Model=e})(de||(de={}));const nn=new ot("@jupyterlab/metadataform:IMetadataFormProvider","A service to register new metadata editor widgets."),ln={id:"@jupyterlab/notebook-extension:cell-executor",description:"Provides the notebook cell executor.",autoStart:!0,provides:lt,activate:()=>Object.freeze({runCell:Ht})},sn=new ot("@jupyterlab/logconsole:ILoggerRegistry","A service providing a logger infrastructure."),rn={activate:an,id:"@jupyterlab/notebook-extension:log-output",description:"Adds cell outputs log to the application logger.",requires:[L],optional:[sn],autoStart:!0};function an(r,e,n){if(!n)return;function s(a){function l(p,i,u){if(Y.KernelMessage.isDisplayDataMsg(p)||Y.KernelMessage.isStreamMsg(p)||Y.KernelMessage.isErrorMsg(p)||Y.KernelMessage.isExecuteResultMsg(p)){const d=n.getLogger(a.context.path);d.rendermime=a.content.rendermime;const g={...p.content,output_type:p.header.msg_type};let b=i;(Y.KernelMessage.isErrorMsg(p)||Y.KernelMessage.isStreamMsg(p)&&p.content.name==="stderr")&&(b=u),d.log({type:"output",data:g,level:b})}}a.context.sessionContext.iopubMessage.connect((p,i)=>l(i,"info","info"),a),a.context.sessionContext.unhandledMessage.connect((p,i)=>l(i,"warning","error"),a)}e.forEach(a=>s(a)),e.widgetAdded.connect((a,l)=>s(l))}const dn="jp-ActiveCellTool",cn="jp-ActiveCellTool-Content",un="jp-ActiveCellTool-CellContent";class hn extends q.Tool{constructor(e){super(),this._cellModel=null,this._updateId=0,this._pendingUpdate=!1,this._promptOutdated=!1,this._tracker=e.tracker,this._languages=e.languages,this.addClass(dn),this.layout=new be,this._inputPrompt=new Ft,this.layout.addWidget(this._inputPrompt);const n=document.createElement("div");n.classList.add(cn);const s=n.appendChild(document.createElement("div")),a=s.appendChild(document.createElement("pre"));s.className=un,this._editorEl=a,this.layout.addWidget(new ee({node:n})),this._previewDebouncer=new Kt(()=>this._update(),150),this._tracker.activeCellChanged.connect(this._onActiveCellChanged,this),this._tracker.currentChanged.connect(this._onActiveCellChanged,this),this._onActiveCellChanged()}dispose(){this.isDisposed||(this._tracker.activeCellChanged.disconnect(this._onActiveCellChanged,this),this._tracker.currentChanged.disconnect(this._onActiveCellChanged,this),this._disconnectCellModel(),this._previewDebouncer.dispose(),super.dispose())}render(e){return M.createElement("div",{ref:n=>{!n||this.node.parentElement===n||(n.appendChild(this.node),this._pendingUpdate&&this._update().catch(console.warn))}})}_onActiveCellChanged(){var e,n;const s=(n=(e=this._tracker.activeCell)===null||e===void 0?void 0:e.model)!==null&&n!==void 0?n:null;s!==this._cellModel&&(this._disconnectCellModel(),this._cellModel=s,s&&(s.sharedModel.changed.connect(this._onCellContentChanged,this),s.mimeTypeChanged.connect(this._onCellContentChanged,this)),this._promptOutdated=!0,this._update().catch(console.warn))}_onCellContentChanged(){if(!this.node.isConnected){this._pendingUpdate=!0,this._promptOutdated=!0;return}this._promptOutdated||this._updatePrompt(),this._previewDebouncer.invoke().catch(console.warn)}_disconnectCellModel(){const e=this._cellModel;e&&(e.sharedModel.changed.disconnect(this._onCellContentChanged,this),e.mimeTypeChanged.disconnect(this._onCellContentChanged,this),this._cellModel=null)}_updatePrompt(){var e;const n=this._cellModel;n&&Vt(n)?(this._inputPrompt.executionCount=`${(e=n.executionCount)!==null&&e!==void 0?e:""}`,this._inputPrompt.show()):(this._inputPrompt.executionCount=null,this._inputPrompt.hide())}async _update(){if(!this.node.isConnected){this._pendingUpdate=!0;return}this._pendingUpdate=!1;const e=this._cellModel,n=++this._updateId;if(!e){this._promptOutdated=!1,this._updatePrompt(),this._editorEl.replaceChildren();return}const s=e.sharedModel.getSource(),a=s.indexOf(`
1
+ import{T as $e,q as he,t as ht,r as ce,b as De,g as Je,I as pt,k as gt,a as ze,f as Ge,C as Re,h as Ie}from"./index-i9IsP_xD.js";import{J as M,aB as ee,ch as ie,aE as R,gx as mt,eJ as Ct,fU as bt,cj as me,aK as Te,eh as ft,cl as vt,ei as _t,cf as Ce,iF as yt,r as J,eP as xt,iy as wt,eN as kt,dC as Q,cp as St,iG as v,dN as Ye,dJ as Xe,dO as Ze,fS as Qe,fT as et,eM as Be,aJ as At,aF as tt,aG as ke,iH as Mt,iI as Tt,iA as Bt,k as Y,bh as Et,gp as Nt,aa as Ot,aC as be,gC as G,iJ as ge,aA as le,iK as xe,iL as Z,eG as Pe,iM as jt,iN as Rt,dX as we,dZ as It,d$ as Le,iO as We,dY as Pt,iP as Lt,iQ as Wt,ax as ot,iR as Ht,iS as Ft,eL as Kt,iT as Vt,aD as F,ew as fe,iU as Se,dx as Ut,eE as qt,e3 as $t,iV as Dt,iW as se,iX as nt,ce as pe,dz as Jt,aH as zt,dE as Gt,cr as Yt,gA as Xt,iY as Zt,dS as Qt,dV as eo,iZ as to,dH as oo,i_ as no,i$ as io,ed as lo,ee as so,dy as ro,bg as ao,fl as co}from"../datalayer-app-main.js";import{b as uo,I as it}from"./token-CdPvDaO6.js";import{ToolbarItems as ho}from"./lib-CxLkAp-u.js";import{I as po}from"./index-B3Hf3MzW.js";import{I as ve}from"./tokens-C5FWZLTC.js";import{a as lt,I as L,b as st,c as go}from"./tokens-BiQDy_zz.js";import{I as mo,a as rt}from"./tokens-DuSIK5iU.js";import{I as Co}from"./tokens-iGMkLb0v.js";import{f as at,e as bo,c as fo,I as vo,b as _o}from"./index-C5HZB8ue.js";import{I as dt}from"./tokens-DfQxPp01.js";import{I as _e}from"./tokens-1h_N3aLM.js";import{a as Ee}from"./tokens-B3Xc25f7.js";import{I as yo}from"./tokens-BoOsoUsu.js";import{I as xo}from"./index--Rl4aMiU.js";import{I as wo}from"./tokens-udK9JDBx.js";import{W as ko,u as He,V as So,I as Ao,a as Mo,b as To,c as Bo}from"./document-Dx9me6Cm.js";import{s as Eo}from"./hover-DpawhsId.js";import{b as No,c as Oo,d as jo}from"./CellSidebarExtension-CrgdhbHy.js";import{H as Ro}from"./htmlselect-CIhYGigR.js";import{T as Io,a as Po}from"./model-DrXnd96t.js";import{C as Fe}from"./celltoolbartracker-8YTtJOxD.js";import"./hoverbox-CStlKQWE.js";import"./Output-BmVt4DpZ.js";import"./index-5os8HYj-.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-DXPB_0fo.js";import"./d3-color-Jd8hXty2.js";import"./dist-Frc5TvpU.js";import"./PaintbrushIcon-CFBHU-3l.js";import"./index-BaRoLDk0.js";import"./RestartIcon-DvpOf5Mf.js";import"./NotebookSkeleton-GSdyJDf_.js";import"./Avatar-DUPBQXVt.js";import"./renderer-CCsq5PXp.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-jGhuRcP3.js";import"./url-DY3jeuF8.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BoT73xjq.js";import"./index-CShCHnof.js";import"./KernelVariables-DvfwDxTX.js";import"./index-BWeXDhSd.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-LMslHH3H.js";import"./tokens-UgGv77-l.js";import"./drivecontents-BabrDJge.js";import"./kernel-DWlDRhgJ.js";function Lo(r){const n=s=>{const a=Math.max(s*3.6,.1),l=a*Math.PI/180,p=Math.sin(l)*104,i=Math.cos(l)*-104;return"M 0 0 v -104 A 104 104 1 "+(a<180?1:0)+" 0 "+p.toFixed(4)+" "+i.toFixed(4)+" z"};return M.createElement("div",{className:"jp-Statusbar-ProgressCircle",role:"progressbar","aria-label":r.label||"Unlabelled progress circle","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":r.progress,onClick:r.onClick},M.createElement("svg",{viewBox:"0 0 250 250"},M.createElement("circle",{cx:"125",cy:"125",r:"104",stroke:"var(--jp-inverse-layout-color3)",strokeWidth:"20",fill:"none"}),M.createElement("path",{className:"jp-Statusbar-ProgressCirclePath",transform:"translate(125,125) scale(.9)",d:n(r.progress),fill:"var(--jp-inverse-layout-color3)"})))}const Wo="jp-JSONEditor",ue="jp-mod-error",Ho="jp-JSONEditor-host",Fo="jp-JSONEditor-header";class Ko extends ee{constructor(e){super(),this._dataDirty=!1,this._inputDirty=!1,this._source=null,this._originalValue=ie.emptyObject,this._changeGuard=!1,this.translator=e.translator||R,this._trans=this.translator.load("jupyterlab"),this.addClass(Wo),this.headerNode=document.createElement("div"),this.headerNode.className=Fo,this.revertButtonNode=mt.element({tag:"span",title:this._trans.__("Revert changes to data")}),this.commitButtonNode=Ct.element({tag:"span",title:this._trans.__("Commit changes to data"),marginLeft:"8px"}),this.editorHostNode=document.createElement("div"),this.editorHostNode.className=Ho,this.headerNode.appendChild(this.revertButtonNode),this.headerNode.appendChild(this.commitButtonNode),this.node.appendChild(this.headerNode),this.node.appendChild(this.editorHostNode);const n=new bt.Model({mimeType:"application/json"});n.sharedModel.changed.connect(this._onModelChanged,this),this.model=n,this.editor=e.editorFactory({host:this.editorHostNode,model:n,config:{readOnly:!0}})}get source(){return this._source}set source(e){this._source!==e&&(this._source&&this._source.changed.disconnect(this._onSourceChanged,this),this._source=e,this.editor.setOption("readOnly",e===null),e&&e.changed.connect(this._onSourceChanged,this),this._setValue())}get isDirty(){return this._dataDirty||this._inputDirty}dispose(){var e;this.isDisposed||((e=this.source)===null||e===void 0||e.dispose(),this.model.dispose(),this.editor.dispose(),super.dispose())}handleEvent(e){switch(e.type){case"blur":this._evtBlur(e);break;case"click":this._evtClick(e);break}}onAfterAttach(e){const n=this.editorHostNode;n.addEventListener("blur",this,!0),n.addEventListener("click",this,!0),this.revertButtonNode.hidden=!0,this.commitButtonNode.hidden=!0,this.headerNode.addEventListener("click",this)}onBeforeDetach(e){const n=this.editorHostNode;n.removeEventListener("blur",this,!0),n.removeEventListener("click",this,!0),this.headerNode.removeEventListener("click",this)}_onSourceChanged(e,n){if(!this._changeGuard){if(this._inputDirty||this.editor.hasFocus()){this._dataDirty=!0;return}this._setValue()}}_onModelChanged(e,n){if(n.sourceChange){let s=!0;try{const a=JSON.parse(this.editor.model.sharedModel.getSource());this.removeClass(ue),this._inputDirty=!this._changeGuard&&!ie.deepEqual(a,this._originalValue)}catch{this.addClass(ue),this._inputDirty=!0,s=!1}this.revertButtonNode.hidden=!this._inputDirty,this.commitButtonNode.hidden=!s||!this._inputDirty}}_evtBlur(e){!this._inputDirty&&this._dataDirty&&this._setValue()}_evtClick(e){const n=e.target;this.revertButtonNode.contains(n)?this._setValue():this.commitButtonNode.contains(n)?!this.commitButtonNode.hidden&&!this.hasClass(ue)&&(this._changeGuard=!0,this._mergeContent(),this._changeGuard=!1,this._setValue()):this.editorHostNode.contains(n)&&this.editor.focus()}_mergeContent(){const e=this.editor.model,n=this._originalValue,s=JSON.parse(e.sharedModel.getSource()),a=this.source;if(a){for(const l in s)ie.deepEqual(s[l],n[l]||null)||a.set(l,s[l]);for(const l in n)l in s||a.delete(l)}}_setValue(){this._dataDirty=!1,this._inputDirty=!1,this.revertButtonNode.hidden=!0,this.commitButtonNode.hidden=!0,this.removeClass(ue);const e=this.editor.model,n=this._source?this._source.toJSON():{};if(this._changeGuard=!0,n===void 0)e.sharedModel.setSource(this._trans.__("No data!")),this._originalValue=ie.emptyObject;else{const s=JSON.stringify(n,null,4);e.sharedModel.setSource(s),this._originalValue=n,s.length>1&&s[0]==="{"&&this.editor.setCursorPosition({line:0,column:1})}this._changeGuard=!1,this.commitButtonNode.hidden=!0,this.revertButtonNode.hidden=!0}}class Vo extends M.Component{constructor(e){super(e),this._handleChange=s=>{this.setState({value:s.currentTarget.value})},this._handleSubmit=s=>{var a,l;s.preventDefault();const p=parseInt((l=(a=this._textInput)===null||a===void 0?void 0:a.value)!==null&&l!==void 0?l:"",10);return!isNaN(p)&&isFinite(p)&&1<=p&&p<=this.props.maxCell&&this.props.handleSubmit(p),!1},this._handleFocus=()=>{this.setState({hasFocus:!0})},this._handleBlur=()=>{this.setState({hasFocus:!1})},this._textInput=null;const n=e.translator||R;this._trans=n.load("jupyterlab"),this.state={value:"",hasFocus:!1,textInputId:ft.createDomID()+"-cell-number-input"}}componentDidMount(){var e;(e=this._textInput)===null||e===void 0||e.focus()}render(){return M.createElement("div",{className:"jp-lineFormSearch"},M.createElement("form",{name:"cellNumberForm",onSubmit:this._handleSubmit,noValidate:!0},M.createElement("div",{className:vt("jp-lineFormWrapper","lm-lineForm-wrapper",this.state.hasFocus?"jp-lineFormWrapperFocusWithin":void 0)},M.createElement("input",{type:"number",id:this.state.textInputId,className:"jp-lineFormInput",min:1,max:this.props.maxCell,onChange:this._handleChange,onFocus:this._handleFocus,onBlur:this._handleBlur,value:this.state.value,ref:e=>{this._textInput=e}}),M.createElement("div",{className:"jp-baseLineForm jp-lineFormButtonContainer"},M.createElement(_t.react,{className:"jp-baseLineForm jp-lineFormButtonIcon",elementPosition:"center"}),M.createElement("input",{type:"submit",className:"jp-baseLineForm jp-lineFormButton",value:""}))),M.createElement("label",{className:"jp-lineFormCaption",htmlFor:this.state.textInputId},this._trans.__("Go to cell number between 1 and %1",this.props.maxCell))))}}function Uo(r){const n=(r.translator||R).load("jupyterlab"),s=r.selectionStart>0&&r.selectionStart!==r.selectionEnd?n.__("%1:%2/%3",r.selectionStart,r.selectionEnd,r.totalCells):n.__("Cell %1/%2",r.activeCell,r.totalCells),a=l=>{(l.key==="Enter"||l.key==="Spacebar"||l.key===" ")&&(l.preventDefault(),l.stopPropagation(),r.handleClick())};return M.createElement($e,{role:"button","aria-haspopup":!0,onClick:r.handleClick,source:s,title:n.__("Go to cell…"),tabIndex:0,onKeyDown:a})}class re extends me{constructor(e={}){super(new re.Model),this._popup=null,this.addClass("jp-mod-highlighted"),this._translator=e.translator||R}render(){return this.model===null?null:M.createElement(Uo,{activeCell:this.model.activeCell,selectionStart:this.model.selectionStart,selectionEnd:this.model.selectionEnd,totalCells:this.model.totalCells,translator:this._translator,handleClick:()=>this._handleClick()})}_handleClick(){if(this.model.totalCells<1)return;this._popup&&this._popup.dispose();const e=Te.create(M.createElement(Vo,{handleSubmit:n=>this._handleSubmit(n),maxCell:this.model.totalCells,translator:this._translator}));this._popup=Eo({body:e,anchor:this,align:"right"})}_handleSubmit(e){var n;const s=this.model.notebook;if(!s)return;const a=e-1;s.activeCellIndex=a,s.deselectAll(),s.scrollToItem(a).catch(l=>{console.error("Go to cell",l)}),(n=this._popup)===null||n===void 0||n.dispose(),s.activate()}}(function(r){class e extends Ce{constructor(){super(...arguments),this._activeCell=0,this._selectionStart=0,this._selectionEnd=0,this._totalCells=0,this._notebook=null}get notebook(){return this._notebook}set notebook(s){const a=this._notebook;a&&(a.activeCellChanged.disconnect(this._onChanged,this),a.modelContentChanged.disconnect(this._onChanged,this),a.selectionChanged.disconnect(this._onChanged,this));const l=this._getAllState();this._notebook=s,this._notebook?(this._notebook.activeCellChanged.connect(this._onChanged,this),this._notebook.modelContentChanged.connect(this._onChanged,this),this._notebook.selectionChanged.connect(this._onChanged,this),this._updateStateFromNotebook(this._notebook)):(this._activeCell=0,this._selectionStart=0,this._selectionEnd=0,this._totalCells=0),this._triggerChange(l,this._getAllState())}get activeCell(){return this._activeCell}get selectionStart(){return this._selectionStart}get selectionEnd(){return this._selectionEnd}get totalCells(){return this._totalCells}_onChanged(s){const a=this._getAllState();this._updateStateFromNotebook(s),this._triggerChange(a,this._getAllState())}_updateStateFromNotebook(s){const a=s.activeCellIndex;this._activeCell=a>=0?a+1:0,this._totalCells=s.widgets.length;let l=this._activeCell,p=this._activeCell,i=!1;s.widgets.forEach((u,d)=>{if(!s.isSelectedOrActive(u))return;const g=d+1;if(!i){l=g,p=g,i=!0;return}p=g}),this._selectionStart=i?l:0,this._selectionEnd=i?p:0}_getAllState(){return{activeCell:this._activeCell,selectionStart:this._selectionStart,selectionEnd:this._selectionEnd,totalCells:this._totalCells}}_triggerChange(s,a){(s.activeCell!==a.activeCell||s.selectionStart!==a.selectionStart||s.selectionEnd!==a.selectionEnd||s.totalCells!==a.totalCells)&&this.stateChanged.emit(void 0)}}r.Model=e})(re||(re={}));const qo="jp-Notebook-toolbarCellType",$o="jp-Notebook-toolbarCellTypeDropdown";var Ae;(function(r){function e(g,b){const f=(b||R).load("jupyterlab");function _(){if(g.context.model.readOnly)return tt({title:f.__("Cannot Save"),body:f.__("Document is read-only"),buttons:[ke.okButton()]});g.context.save().then(()=>{if(!g.isDisposed)return g.context.createCheckpoint()})}return yt(Te.create(J.createElement(xt,{signal:g.context.fileChanged},()=>J.createElement(wt,{icon:kt,onClick:_,tooltip:f.__("Save the notebook contents and create checkpoint"),enabled:!!(g&&g.context&&g.context.contentsModel&&g.context.contentsModel.writable)}))))}r.createSaveButton=e;function n(g,b){const f=(b||R).load("jupyterlab");return new Q({icon:St,onClick:()=>{v.insertBelow(g.content)},tooltip:f.__("Insert a cell below")})}r.createInsertButton=n;function s(g,b,f){const _=(b||R).load("jupyterlab");return new Q({icon:Ye,onClick:async()=>{f?.get("useSystemClipboardForCells").composite?await v.cutToSystemClipboard(g.content):v.cut(g.content)},tooltip:_.__("Cut the selected cells")})}r.createCutButton=s;function a(g,b,f){const _=(b||R).load("jupyterlab");return new Q({icon:Xe,onClick:async()=>{f?.get("useSystemClipboardForCells").composite?await v.copyToSystemClipboard(g.content):v.copy(g.content)},tooltip:_.__("Copy the selected cells")})}r.createCopyButton=a;function l(g,b,f){const _=(b||R).load("jupyterlab");return new Q({icon:Ze,onClick:async()=>{f?.get("useSystemClipboardForCells").composite?await v.pasteFromSystemClipboard(g.content):v.paste(g.content)},tooltip:_.__("Paste cells from the clipboard")})}r.createPasteButton=l;function p(g,b,f){const _=(f??R).load("jupyterlab");return new Q({icon:Qe,onClick:()=>{v.runAndAdvance(g.content,g.sessionContext,b,f)},tooltip:_.__("Run the selected cells and advance")})}r.createRunButton=p;function i(g,b,f){const _=(f??R).load("jupyterlab");return new Q({icon:et,onClick:()=>{const y=b??new Be({translator:f});y.restart(g.sessionContext).then(w=>(w&&v.runAll(g.content,g.sessionContext,y,f),w))},tooltip:_.__("Restart the kernel, then re-run the whole notebook")})}r.createRestartRunAllButton=i;function u(g,b){return new Do(g.content,b)}r.createCellTypeItem=u;function d(g,b,f,_){return[{name:"save",widget:e(g,f)},{name:"insert",widget:n(g,f)},{name:"cut",widget:s(g,f,_)},{name:"copy",widget:a(g,f,_)},{name:"paste",widget:l(g,f,_)},{name:"run",widget:p(g,b,f)},{name:"interrupt",widget:he.createInterruptButton(g.sessionContext,f)},{name:"restart",widget:he.createRestartButton(g.sessionContext,b,f)},{name:"restart-and-run",widget:i(g,b,f)},{name:"cellType",widget:u(g,f)},{name:"spacer",widget:At.createSpacerItem()},{name:"kernelName",widget:he.createKernelNameItem(g.sessionContext,b,f)}]}r.getDefaultItems=d})(Ae||(Ae={}));class Do extends Te{constructor(e,n){super(),this.handleChange=s=>{s.target.value!=="-"&&(v.changeCellType(this._notebook,s.target.value),this._notebook.activate())},this.handleKeyDown=s=>{s.key==="Enter"&&this._notebook.activate()},this._trans=(n||R).load("jupyterlab"),this.addClass(qo),this._notebook=e,e.model&&this.update(),e.activeCellChanged.connect(this.update,this),e.selectionChanged.connect(this.update,this)}render(){let e="-";this._notebook.activeCell&&(e=this._notebook.activeCell.model.type);for(const n of this._notebook.widgets)if(this._notebook.isSelectedOrActive(n)&&n.model.type!==e){e="-";break}return J.createElement(Ro,{className:$o,onChange:this.handleChange,onKeyDown:this.handleKeyDown,value:e,"aria-label":this._trans.__("Cell type"),title:this._trans.__("Select the cell type")},J.createElement("option",{value:"-"},"-"),J.createElement("option",{value:"code"},this._trans.__("Code")),J.createElement("option",{value:"markdown"},this._trans.__("Markdown")),J.createElement("option",{value:"raw"},this._trans.__("Raw")))}}function Ke(r){var e;const n=r.translator||R,s=ht(n),a=n.load("jupyterlab"),l=(e=r.displayOption.showJumpToCell)!==null&&e!==void 0?e:!1,p=r.state,i=r.displayOption.showOnToolBar,u=r.displayOption.showProgress,d=i?"down":"up",g=M.createElement("div",null),[b,f]=M.useState(!1);if(M.useEffect(()=>{if(b)return;const j=()=>{f(!0)};return v.executionScheduled.connect(j),()=>{v.executionScheduled.disconnect(j)}},[l,b]),!p)return g;const _=p.kernelStatus,y={alignSelf:"normal",height:"24px"},w=p.totalTime,S=p.scheduledCellNumber||0,o=p.scheduledCell.size||0,t=S-o;let h=100*t/S,C=u?"":"hidden";!u&&h<100&&(h=0);const k=j=>M.createElement(Lo,{progress:j,width:16,height:24,label:a.__("Kernel status")}),A=j=>a.__("Kernel status: %1",j),B=()=>{const j=r.notebook;v.selectLastRunCell(j),j.activeCell&&j.scrollToCell(j.activeCell)},E=(j,K,W)=>M.createElement("div",{className:"jp-Notebook-ExecutionIndicator",title:u?"":A(s[j]),"data-status":j},K,M.createElement("div",{className:`jp-Notebook-ExecutionIndicator-tooltip ${d} ${C}`},M.createElement("span",null," ",A(s[j])," "),W,l&&b&&M.createElement(Bt,{className:"jp-Notebook-ExecutionIndicator-jumpButton",onClick:B,title:a.__("Jump to current or last executed cell")},a.__("Jump to cell"))));if(p.kernelStatus==="connecting"||p.kernelStatus==="disconnected"||p.kernelStatus==="unknown")return E(_,M.createElement(Mt.react,{...y}),[]);if(p.kernelStatus==="starting"||p.kernelStatus==="terminating"||p.kernelStatus==="restarting"||p.kernelStatus==="initializing")return E(_,M.createElement(Tt.react,{...y}),[]);if(p.executionStatus==="busy")return E("busy",k(h),[M.createElement("span",{key:0},a.__("Executed %1/%2 cells",t,S)),M.createElement("span",{key:1},a._n("Elapsed time: %1 second","Elapsed time: %1 seconds",w))]);{const j=p.kernelStatus==="busy"?0:100,K=p.kernelStatus==="busy"||w===0?[]:[M.createElement("span",{key:0},a._n("Executed %1 cell","Executed %1 cells",S)),M.createElement("span",{key:1},a._n("Elapsed time: %1 second","Elapsed time: %1 seconds",w))];return E(p.kernelStatus,k(j),K)}}class X extends me{constructor(e,n=!0){super(new X.Model),this.translator=e||R,this.addClass("jp-mod-highlighted")}dispose(){var e;this.isDisposed||((e=this.model)===null||e===void 0||e.dispose(),super.dispose())}render(){if(this.model===null||!this.model.renderFlag)return M.createElement("div",null);{const e=this.model.currentNotebook;return e?M.createElement(Ke,{displayOption:this.model.displayOption,state:this.model.executionState(e),translator:this.translator,notebook:e}):M.createElement(Ke,{displayOption:this.model.displayOption,state:void 0,translator:this.translator,notebook:void 0})}}}(function(r){class e extends Ce{constructor(){super(),this._notebookExecutionProgress=new WeakMap,this._displayOption={showOnToolBar:!0,showProgress:!0,showJumpToCell:!1},this._renderFlag=!0}attachNotebook(l){var p,i,u,d;if(l&&l.content&&l.context){const g=l.content,b=l.context;if(this._currentNotebook=g,!this._notebookExecutionProgress.has(g)){this._notebookExecutionProgress.set(g,{executionStatus:"idle",kernelStatus:"idle",totalTime:0,interval:0,timeout:0,scheduledCell:new Set,scheduledCellNumber:0,needReset:!0});const f=this._notebookExecutionProgress.get(g),_=o=>{f&&(f.kernelStatus=o.kernelDisplayStatus),this.stateChanged.emit(void 0)};b.statusChanged.connect(_,this);const y=o=>{f&&(f.kernelStatus=o.kernelDisplayStatus),this.stateChanged.emit(void 0)};b.connectionStatusChanged.connect(y,this),b.disposed.connect(o=>{o.connectionStatusChanged.disconnect(y,this),o.statusChanged.disconnect(_,this)},this);const w=(o,t)=>{const h=t.msg,C=h.header.msg_id;if(h.header.msg_type==="execute_request")this._cellScheduledCallback(g,C);else if(Y.KernelMessage.isStatusMsg(h)&&h.content.execution_state==="idle"){const k=h.parent_header.msg_id;this._cellExecutedCallback(g,k)}else Y.KernelMessage.isStatusMsg(h)&&h.content.execution_state==="restarting"?this._restartHandler(g):h.header.msg_type==="execute_input"&&this._startTimer(g)};(i=(p=b.session)===null||p===void 0?void 0:p.kernel)===null||i===void 0||i.anyMessage.connect(w,this),(d=(u=b.session)===null||u===void 0?void 0:u.kernel)===null||d===void 0||d.disposed.connect(o=>o.anyMessage.disconnect(w,this),this);const S=(o,t)=>{f&&(this._resetTime(f),this.stateChanged.emit(void 0),t.newValue&&t.newValue.anyMessage.connect(w,this))};b.kernelChanged.connect(S,this),b.disposed.connect(o=>o.kernelChanged.disconnect(S,this),this)}}}get currentNotebook(){return this._currentNotebook}get displayOption(){return this._displayOption}set displayOption(l){this._displayOption=l}executionState(l){return this._notebookExecutionProgress.get(l)}_scheduleSwitchToIdle(l){window.setTimeout(()=>{l.executionStatus="idle",clearInterval(l.interval),this.stateChanged.emit(void 0)},150),l.timeout=window.setTimeout(()=>{l.needReset=!0},1e3)}_cellExecutedCallback(l,p){const i=this._notebookExecutionProgress.get(l);i&&i.scheduledCell.has(p)&&(i.scheduledCell.delete(p),i.scheduledCell.size===0&&this._scheduleSwitchToIdle(i))}_restartHandler(l){const p=this._notebookExecutionProgress.get(l);p&&(p.scheduledCell.clear(),this._scheduleSwitchToIdle(p))}_startTimer(l){const p=this._notebookExecutionProgress.get(l);p&&(p.scheduledCell.size>0?p.executionStatus!=="busy"&&(p.executionStatus="busy",clearTimeout(p.timeout),this.stateChanged.emit(void 0),p.interval=window.setInterval(()=>{this._tick(p)},1e3)):this._resetTime(p))}_cellScheduledCallback(l,p){const i=this._notebookExecutionProgress.get(l);i&&!i.scheduledCell.has(p)&&(i.needReset&&this._resetTime(i),i.scheduledCell.add(p),i.scheduledCellNumber+=1)}_tick(l){if(this.isDisposed){clearInterval(l.interval),clearTimeout(l.timeout);return}l.totalTime+=1,this.stateChanged.emit(void 0)}_resetTime(l){l.totalTime=0,l.scheduledCellNumber=0,l.executionStatus="idle",l.scheduledCell=new Set,clearTimeout(l.timeout),clearInterval(l.interval),l.needReset=!1}get renderFlag(){return this._renderFlag}updateRenderOption(l){this.displayOption.showOnToolBar&&(l.showOnToolBar?this._renderFlag=!0:this._renderFlag=!1),this.displayOption.showProgress=l.showProgress,this.displayOption.showJumpToCell=l.showJumpToCell,this.stateChanged.emit(void 0)}}r.Model=e;function n(a,l,p){const i=new r(l);return i.model.displayOption={showOnToolBar:!0,showProgress:!0,showJumpToCell:!1},i.model.attachNotebook({content:a.content,context:a.sessionContext}),p&&p.then(u=>{const d=g=>{const b=s(g);b.showJumpToCell&&(g.get("recordTiming").composite||g.set("recordTiming",!0).catch(_=>{console.error("Failed to auto-enable recordTiming:",_.message)})),i.model.updateRenderOption(b)};u.changed.connect(d),d(u),i.disposed.connect(()=>{u.changed.disconnect(d)})}).catch(u=>{console.error(u.message)}),i}r.createExecutionIndicatorItem=n;function s(a){let l=!0,p=!0,i=!1;const u=a.get("kernelStatus").composite;return u&&(l=!u.showOnStatusBar,p=u.showProgress,i=u.showJumpToRecentExecutionButton),{showOnToolBar:l,showProgress:p,showJumpToCell:i}}r.getSettingValue=s})(X||(X={}));function Jo(r){const e=(r.translator||R).load("jupyterlab");return J.createElement($e,{source:e.__("Mode: %1",r.modeNames[r.notebookMode])})}class ae extends me{constructor(e){super(new ae.Model),this.translator=e||R,this._trans=this.translator.load("jupyterlab"),this._modeNames={command:this._trans.__("Command"),edit:this._trans.__("Edit")}}render(){return this.model?(this.node.title=this._trans.__("Notebook is in %1 mode",this._modeNames[this.model.notebookMode]),J.createElement(Jo,{notebookMode:this.model.notebookMode,translator:this.translator,modeNames:this._modeNames})):null}}(function(r){class e extends Ce{constructor(){super(...arguments),this._onChanged=s=>{const a=this._notebookMode;this._notebook?this._notebookMode=s.mode:this._notebookMode="command",this._triggerChange(a,this._notebookMode)},this._notebookMode="command",this._notebook=null}get notebookMode(){return this._notebookMode}set notebook(s){const a=this._notebook;a!==null&&(a.stateChanged.disconnect(this._onChanged,this),a.activeCellChanged.disconnect(this._onChanged,this),a.modelContentChanged.disconnect(this._onChanged,this));const l=this._notebookMode;this._notebook=s,this._notebook===null?this._notebookMode="command":(this._notebookMode=this._notebook.mode,this._notebook.stateChanged.connect(this._onChanged,this),this._notebook.activeCellChanged.connect(this._onChanged,this),this._notebook.modelContentChanged.connect(this._onChanged,this)),this._triggerChange(l,this._notebookMode)}_triggerChange(s,a){s!==a&&this.stateChanged.emit(void 0)}}r.Model=e})(ae||(ae={}));class zo extends ko{constructor(e,n){super(e,n),this.editorWidget=e,this.options=n,this._type="code",this._readyDelegate=new Et,this._editorToCell=new Map,this.editor=e.content,this._cellToEditor=new WeakMap,this.isReady=this.isReady.bind(this),Promise.all([this.widget.context.sessionContext.ready,this.connectionManager.ready]).then(async()=>{await this.initOnceReady(),this._readyDelegate.resolve()}).catch(console.error)}get documentPath(){return this.widget.context.path}get mimeType(){var e;let n,s=this.language_info();return!s||!s.mimetype?n=this.widget.content.codeMimetype:n=s.mimetype,Array.isArray(n)?(e=n[0])!==null&&e!==void 0?e:Nt.defaultMimeType:n}get languageFileExtension(){let e=this.language_info();if(!(!e||!e.file_extension))return e.file_extension.replace(".","")}get wrapperElement(){return this.widget.node}get editors(){if(this.isDisposed)return[];let e=this.widget.content;return this._editorToCell.clear(),e.isDisposed?[]:e.widgets.map(n=>({ceEditor:this._getCellEditor(n),type:n.model.type,value:n.model.sharedModel.getSource()}))}get activeEditor(){return this.editor.activeCell?this._getCellEditor(this.editor.activeCell):void 0}get ready(){return this._readyDelegate.promise}getEditorIndexAt(e){let n=this._getCellAt(e);return this.widget.content.widgets.findIndex(a=>n===a)}getEditorIndex(e){let n=this._editorToCell.get(e);return this.editor.widgets.findIndex(s=>n===s)}getEditorWrapper(e){return this._editorToCell.get(e).node}async onKernelChanged(e,n){if(n.newValue)try{const s=this._languageInfo;await He(this.isReady,-1),await this._updateLanguageInfo();const a=this._languageInfo;s?.name!=a.name||s?.mimetype!=a?.mimetype||s?.file_extension!=a?.file_extension?(console.log(`Changed to ${this._languageInfo.name} kernel, reconnecting`),this.reloadConnection()):console.log("Keeping old LSP connection as the new kernel uses the same language")}catch(s){console.warn(s),this.reloadConnection()}}dispose(){this.isDisposed||(this.widget.context.sessionContext.kernelChanged.disconnect(this.onKernelChanged,this),this.widget.content.activeCellChanged.disconnect(this._activeCellChanged,this),super.dispose(),this._editorToCell.clear(),Ot.clearData(this))}isReady(){var e;return!this.widget.isDisposed&&this.widget.context.isReady&&this.widget.content.isVisible&&this.widget.content.widgets.length>0&&((e=this.widget.context.sessionContext.session)===null||e===void 0?void 0:e.kernel)!=null}async handleCellChange(e,n){let s=[],a=[];const l=this._type;if(n.type==="set"){let p=[],i=[];if(n.newValues.length===n.oldValues.length){for(let u=0;u<n.newValues.length;u++)n.oldValues[u].type===l&&n.newValues[u].type!==l?p.push(n.newValues[u]):n.oldValues[u].type!==l&&n.newValues[u].type===l&&i.push(n.newValues[u]);s=i,a=p}}else n.type=="add"&&(s=n.newValues.filter(p=>p.type===l));(a.length||s.length||n.type==="set"||n.type==="move"||n.type==="remove"||n.type==="clear")&&await this.updateDocuments();for(let p of s){let i=this.widget.content.widgets.find(u=>u.model.id===p.id);if(!i){console.warn(`Widget for added cell with ID: ${p.id} not found!`);continue}this._getCellEditor(i)}}createVirtualDocument(){return new So({language:this.language,foreignCodeExtractors:this.options.foreignCodeExtractorsManager,path:this.documentPath,fileExtension:this.languageFileExtension,standalone:!1,hasLspSupportedFile:!1})}language_info(){return this._languageInfo}async initOnceReady(){await He(this.isReady.bind(this),-1),await this._updateLanguageInfo(),this.initVirtual(),this.connectDocument(this.virtualDocument,!1).catch(console.warn),this.widget.context.sessionContext.kernelChanged.connect(this.onKernelChanged,this),this.widget.content.activeCellChanged.connect(this._activeCellChanged,this),this._connectModelSignals(this.widget),this.editor.modelChanged.connect(e=>{console.warn("Model changed, connecting cell change handler; this is not something we were expecting"),this._connectModelSignals(e)})}_connectModelSignals(e){e.model===null?console.warn(`Model is missing for notebook ${e}, cannot connect cell changed signal!`):e.model.cells.changed.connect(this.handleCellChange,this)}async _updateLanguageInfo(){var e,n,s,a;const l=(a=await((s=(n=(e=this.widget.context.sessionContext)===null||e===void 0?void 0:e.session)===null||n===void 0?void 0:n.kernel)===null||s===void 0?void 0:s.info))===null||a===void 0?void 0:a.language_info;if(l)this._languageInfo=l;else throw new Error("Language info update failed (no session, kernel, or info available)")}_activeCellChanged(e,n){!n||n.model.type!==this._type||this._activeEditorChanged.emit({editor:this._getCellEditor(n)})}_getCellAt(e){let n=this.virtualDocument.getEditorAtVirtualLine(e);return this._editorToCell.get(n)}_getCellEditor(e){if(!this._cellToEditor.has(e)){const n=Object.freeze({getEditor:()=>e.editor,ready:async()=>(await e.ready,e.editor),reveal:async()=>(await this.editor.scrollToCell(e),e.editor)});this._cellToEditor.set(e,n),this._editorToCell.set(n,e),e.disposed.connect(()=>{this._cellToEditor.delete(e),this._editorToCell.delete(n),this._editorRemoved.emit({editor:n})}),this._editorAdded.emit({editor:n})}return this._cellToEditor.get(e)}}class Go extends ee{constructor(){super(),this._items=[],this.layout=new be,this.addClass("jp-RankedPanel")}addWidget(e,n){const s={widget:e,rank:n},a=le.upperBound(this._items,s,Me.itemCmp);le.insert(this._items,a,s),this.layout.insertWidget(a,e)}onChildRemoved(e){const n=le.findFirstIndex(this._items,s=>s.widget===e.child);n!==-1&&le.removeAt(this._items,n)}}class q extends ee{constructor(e){super(),this.addClass("jp-NotebookTools"),this.translator=e.translator||R,this._tools=[],this.layout=new be,this._tracker=e.tracker,this._tracker.currentChanged.connect(this._onActiveNotebookPanelChanged,this),this._tracker.activeCellChanged.connect(this._onActiveCellChanged,this),this._tracker.selectionChanged.connect(this._onSelectionChanged,this),this._onActiveNotebookPanelChanged(),this._onActiveCellChanged(),this._onSelectionChanged()}get activeCell(){return this._tracker.activeCell}get selectedCells(){const e=this._tracker.currentWidget;if(!e)return[];const n=e.content;return n.widgets.filter(s=>n.isSelectedOrActive(s))}get activeNotebookPanel(){return this._tracker.currentWidget}addItem(e){var n;const s=e.tool,a=(n=e.rank)!==null&&n!==void 0?n:100;let l;const p=this._tools.find(i=>i.section===e.section);if(p)l=p.panel;else throw new Error(`The section ${e.section} does not exist`);s.addClass("jp-NotebookTools-tool"),l.addWidget(s,a),s.notebookTools=this,G.sendMessage(s,q.ActiveNotebookPanelMessage),G.sendMessage(s,q.ActiveCellMessage)}addSection(e){var n;const s=e.sectionName,a=e.label||e.sectionName,l=e.tool;let p=(n=e.rank)!==null&&n!==void 0?n:null;const i=new Go;if(i.title.label=a,l&&i.addWidget(l,0),this._tools.push({section:s,panel:i,rank:p}),p!=null)this.layout.insertWidget(p,new ce({widget:i}));else{let u=null;const d=this.layout;for(let g=0;g<d.widgets.length;g++){let b=d.widgets[g];if(b instanceof ce&&b.widget.id==="advancedToolsSection"){u=g;break}}u!==null?this.layout.insertWidget(u,new ce({widget:i})):this.layout.addWidget(new ce({widget:i}))}}_onActiveNotebookPanelChanged(){this._prevActiveNotebookModel&&!this._prevActiveNotebookModel.isDisposed&&this._prevActiveNotebookModel.metadataChanged.disconnect(this._onActiveNotebookPanelMetadataChanged,this);const e=this.activeNotebookPanel&&this.activeNotebookPanel.content?this.activeNotebookPanel.content.model:null;this._prevActiveNotebookModel=e,e&&e.metadataChanged.connect(this._onActiveNotebookPanelMetadataChanged,this);for(const n of this._toolChildren())G.sendMessage(n,q.ActiveNotebookPanelMessage)}_onActiveCellChanged(){this._prevActiveCell&&!this._prevActiveCell.isDisposed&&this._prevActiveCell.metadataChanged.disconnect(this._onActiveCellMetadataChanged,this);const e=this.activeCell?this.activeCell.model:null;this._prevActiveCell=e,e&&e.metadataChanged.connect(this._onActiveCellMetadataChanged,this);for(const n of this._toolChildren())G.sendMessage(n,q.ActiveCellMessage)}_onSelectionChanged(){for(const e of this._toolChildren())G.sendMessage(e,q.SelectionMessage)}_onActiveNotebookPanelMetadataChanged(e,n){const s=new ge.ChangeMessage("activenotebookpanel-metadata-changed",{oldValue:void 0,newValue:void 0,...n});for(const a of this._toolChildren())G.sendMessage(a,s)}_onActiveCellMetadataChanged(e,n){const s=new ge.ChangeMessage("activecell-metadata-changed",{newValue:void 0,oldValue:void 0,...n});for(const a of this._toolChildren())G.sendMessage(a,s)}*_toolChildren(){for(let e of this._tools)yield*e.panel.children()}}(function(r){r.ActiveNotebookPanelMessage=new xe("activenotebookpanel-changed"),r.ActiveCellMessage=new xe("activecell-changed"),r.SelectionMessage=new xe("selection-changed");class e extends ee{dispose(){super.dispose(),this.notebookTools&&(this.notebookTools=null)}processMessage(a){switch(super.processMessage(a),a.type){case"activenotebookpanel-changed":this.onActiveNotebookPanelChanged(a);break;case"activecell-changed":this.onActiveCellChanged(a);break;case"selection-changed":this.onSelectionChanged(a);break;case"activecell-metadata-changed":this.onActiveCellMetadataChanged(a);break;case"activenotebookpanel-metadata-changed":this.onActiveNotebookPanelMetadataChanged(a);break}}onActiveNotebookPanelChanged(a){}onActiveCellChanged(a){}onSelectionChanged(a){}onActiveCellMetadataChanged(a){}onActiveNotebookPanelMetadataChanged(a){}}r.Tool=e;class n extends e{constructor(a){super();const{editorFactory:l}=a;this.addClass("jp-MetadataEditorTool");const p=this.layout=new be;this._editorFactory=l,this._editorLabel=a.label||"Edit Metadata",this.createEditor();const i=new ee({node:document.createElement("label")});i.node.textContent=a.label||"Edit Metadata",p.addWidget(i),p.addWidget(this.editor)}get editor(){return this._editor}onActiveNotebookPanelChanged(a){this.editor.dispose(),this.notebookTools.activeNotebookPanel&&this.createEditor()}createEditor(){this._editor=new Ko({editorFactory:this._editorFactory}),this.editor.title.label=this._editorLabel,this.layout.addWidget(this.editor)}}r.MetadataEditorTool=n})(q||(q={}));var Me;(function(r){function e(n,s){return n.rank-s.rank}r.itemCmp=e})(Me||(Me={}));const Yo=6;var V;(function(r){r[r.Idle=-1]="Idle",r[r.Error=-.5]="Error",r[r.Scheduled=0]="Scheduled",r[r.Running=1]="Running"})(V||(V={}));class Xo extends Po{constructor(e,n,s,a){super(e,a),this.parser=n,this.sanitizer=s,this.configMetadataMap={numberHeaders:["toc-autonumbering","toc/number_sections"],numberingH1:["!toc/skip_h1_title"],baseNumbering:["toc/base_numbering"]},this._runningCells=new Array,this._errorCells=new Array,this._cellToHeadingIndex=new WeakMap,e.context.ready.then(()=>{this.setConfiguration({})}),this.widget.context.model.metadataChanged.connect(this.onMetadataChanged,this),this.widget.content.activeCellChanged.connect(this.onActiveCellChanged,this),v.executionScheduled.connect(this.onExecutionScheduled,this),v.executed.connect(this.onExecuted,this),v.outputCleared.connect(this.onOutputCleared,this),this.headingsChanged.connect(this.onHeadingsChanged,this)}get documentType(){return"notebook"}get isAlwaysActive(){return!0}get supportedOptions(){return["baseNumbering","maximalDepth","numberingH1","numberHeaders","includeOutput","syncCollapseState"]}getCellHeadings(e){const n=new Array;let s=this._cellToHeadingIndex.get(e);if(s!==void 0){const a=this.headings[s];for(n.push(a);this.headings[s-1]&&this.headings[s-1].cellRef===a.cellRef;)s--,n.unshift(this.headings[s])}return n}dispose(){var e,n,s;this.isDisposed||(this.headingsChanged.disconnect(this.onHeadingsChanged,this),(n=(e=this.widget.context)===null||e===void 0?void 0:e.model)===null||n===void 0||n.metadataChanged.disconnect(this.onMetadataChanged,this),(s=this.widget.content)===null||s===void 0||s.activeCellChanged.disconnect(this.onActiveCellChanged,this),v.executionScheduled.disconnect(this.onExecutionScheduled,this),v.executed.disconnect(this.onExecuted,this),v.outputCleared.disconnect(this.onOutputCleared,this),this._runningCells.length=0,this._errorCells.length=0,super.dispose())}setConfiguration(e){const n=this.loadConfigurationFromMetadata();super.setConfiguration({...this.configuration,...n,...e})}toggleCollapse(e){super.toggleCollapse(e),this.updateRunningStatus(this.headings)}async getHeadings(){const e=this.widget.content.widgets,n=new Set(e),s=[],a=new Array,l=new WeakMap;for(let p=0;p<e.length;p++){const i=e[p];switch(i.model.type){case"code":{!this.configuration.syncCollapseState&&this.configuration.includeOutput&&s.push(...Le(await i.getHeadings(),this.configuration,a).map(d=>({...d,cellRef:i,collapsed:!1,isRunning:V.Idle})));break}case"markdown":{const d=Le(await i.getHeadings(),this.configuration,a).map((g,b)=>({...g,cellRef:i,collapsed:!1,isRunning:V.Idle}));if(this.configuration.syncCollapseState&&i.headingCollapsed){const g=Math.min(...d.map(f=>f.level)),b=d.find(f=>f.level===g);b.collapsed=i.headingCollapsed}s.push(...d);break}}s.length>0&&l.set(i,s.length-1)}return this._cellToHeadingIndex=l,this._runningCells=this._runningCells.filter(p=>n.has(p)),this._errorCells=this._errorCells.filter(p=>n.has(p)),this.updateRunningStatus(s),Promise.resolve(s)}isHeadingEqual(e,n){return super.isHeadingEqual(e,n)&&e.cellRef===n.cellRef&&e.isRunning===n.isRunning}loadConfigurationFromMetadata(){const e=this.widget.content.model,n={};if(e)for(const s in this.configMetadataMap){const a=this.configMetadataMap[s];for(const l of a){let p=l;const i=p[0]==="!";i&&(p=p.slice(1));const u=p.split("/");let d=e.getMetadata(u[0]);for(let g=1;g<u.length;g++)d=(d??{})[u[g]];d!==void 0&&(typeof d=="boolean"&&i&&(d=!d),n[s]=d)}}return n}onActiveCellChanged(e,n){const s=this.getCellHeadings(n)[0];this.setActiveHeading(s??null,!1)}onHeadingsChanged(){this.widget.content.activeCell&&this.onActiveCellChanged(this.widget.content,this.widget.content.activeCell)}onExecuted(e,n){this._runningCells.forEach((s,a)=>{var l;if(s===n.cell){this._runningCells.splice(a,1);const p=this._cellToHeadingIndex.get(s);if(p!==void 0){const i=this.headings[p];if(n.success||((l=n.error)===null||l===void 0?void 0:l.errorName)===void 0){i.isRunning=V.Idle;return}i.isRunning=V.Error,this._errorCells.includes(s)||this._errorCells.push(s)}}}),this.updateRunningStatus(this.headings),this.stateChanged.emit()}onExecutionScheduled(e,n){this._runningCells.includes(n.cell)||this._runningCells.push(n.cell),this._errorCells.forEach((s,a)=>{s===n.cell&&this._errorCells.splice(a,1)}),this.updateRunningStatus(this.headings),this.stateChanged.emit()}onOutputCleared(e,n){this._errorCells.forEach((s,a)=>{if(s===n.cell){this._errorCells.splice(a,1);const l=this._cellToHeadingIndex.get(s);if(l!==void 0){const p=this.headings[l];p.isRunning=V.Idle}}}),this.updateRunningStatus(this.headings),this.stateChanged.emit()}onMetadataChanged(){this.setConfiguration({})}updateRunningStatus(e){e.forEach(a=>{a.isRunning=V.Idle}),this._runningCells.forEach((a,l)=>{const p=this._cellToHeadingIndex.get(a);if(p!==void 0){const i=e[p];i.isRunning!==V.Running&&(i.isRunning=l>0?V.Scheduled:V.Running)}}),this._errorCells.forEach((a,l)=>{const p=this._cellToHeadingIndex.get(a);if(p!==void 0){const i=e[p];i.isRunning===V.Idle&&(i.isRunning=V.Error)}});let n=0;for(;n<e.length;){const a=e[n];if(n++,a.collapsed){const l=Math.max(a.isRunning,s(e,a.level));a.dataset={...a.dataset,"data-running":l.toString()}}else a.dataset={...a.dataset,"data-running":a.isRunning.toString()}}function s(a,l){let p=V.Idle;for(;n<a.length;){const i=a[n];if(i.dataset={...i.dataset,"data-running":i.isRunning.toString()},i.level>l)n++,p=Math.max(i.isRunning,p),i.collapsed&&(p=Math.max(p,s(a,i.level)),i.dataset={...i.dataset,"data-running":p.toString()});else break}return p}}}class Zo extends Io{constructor(e,n,s,a){super(e),this.parser=n,this.sanitizer=s,this.commands=a,this._scrollToTop=!0}get scrollToTop(){return this._scrollToTop}set scrollToTop(e){this._scrollToTop=e}_createNew(e,n){const s=new Xo(e,this.parser,this.sanitizer,n);let a=new WeakMap;const l=(_,y)=>{if(y){const w=async h=>{if(!h.inViewport)return;let C=a.get(y);if((!C||!y.cellRef.node.contains(C))&&(await i(h),C=a.get(y)),C)if(this.scrollToTop)C.scrollIntoView({block:"start"}),e.content.outerNode.scrollTop-=Yo;else{const k=e.content.node.getBoundingClientRect(),A=C.getBoundingClientRect();(A.top>k.bottom||A.bottom<k.top)&&C.scrollIntoView({block:"center"})}else console.debug("scrolling to heading: using fallback strategy"),await e.content.scrollToItem(e.content.activeCellIndex,this.scrollToTop?"start":void 0,0)},S=y.cellRef,t=e.content.widgets.indexOf(S);S.model.type=="markdown"&&e.content.mode!="command"&&(e.content.mode="command"),e.content.activeCellIndex=t,S.inViewport?w(S).catch(h=>{console.error(`Fail to scroll to cell to display the required heading (${h}).`)}):e.content.scrollToItem(t,this.scrollToTop?"start":void 0).then(()=>i(S)).then(()=>w(S)).catch(h=>{console.error(`Fail to scroll to cell to display the required heading (${h}).`)})}},p=_=>s.getCellHeadings(_).filter(y=>y.cellRef===_),i=async _=>{var y;const w=p(_),S=(y=this.sanitizer.allowNamedProperties)!==null&&y!==void 0&&y?"id":"data-jupyter-id",o=await Promise.all(w.map(async h=>{const C=await Qo(h,this.parser,this.sanitizer);return C?`h${h.level}[${S}="${CSS.escape(C)}"]`:`h${h.level}`})),t=p(_);t.length!==w.length||t.some((h,C)=>h!==w[C])||(we(_.node),w.forEach((h,C)=>{var k,A;const B=h.outputIndex===void 0?h.cellRef.node:(k=h.cellRef.outputArea.widgets[h.outputIndex])===null||k===void 0?void 0:k.node;a.set(h,B?It(B,o[C],(A=h.prefix)!==null&&A!==void 0?A:""):null)}))},u=_=>{if(this.parser){we(e.content.node),a=new WeakMap;for(const y of e.content.widgets)y instanceof Z&&y.renderedChanged.connect(f);return Promise.all(e.content.widgets.map(y=>i(y)))}},d=(_,y)=>{var w,S,o,t;if(s.configuration.syncCollapseState)if(y!==null){const h=y.cellRef;h.headingCollapsed!==((w=y.collapsed)!==null&&w!==void 0?w:!1)&&(h.headingCollapsed=(S=y.collapsed)!==null&&S!==void 0?S:!1)}else{const h=(t=(o=s.headings[0])===null||o===void 0?void 0:o.collapsed)!==null&&t!==void 0?t:!1;e.content.widgets.forEach(C=>{C instanceof Z&&C.headingInfo.level>=0&&(C.headingCollapsed=h)})}},g=(_,y)=>{if(s.configuration.syncCollapseState){const w=s.getCellHeadings(y)[0];w&&s.toggleCollapse({heading:w,collapsed:y.headingCollapsed})}},b=(_,y)=>{var w;y.inViewport?(w=i(y))===null||w===void 0||w.catch(console.warn):we(y.node)},f=(_,y)=>{y&&i(_).catch(console.warn)};return e.context.ready.then(()=>{var _;(_=u())===null||_===void 0||_.catch(console.warn),s.activeHeadingChanged.connect(l),s.headingsChanged.connect(u),s.collapseChanged.connect(d),e.content.cellCollapsed.connect(g),e.content.cellInViewportChanged.connect(b),e.disposed.connect(()=>{s.activeHeadingChanged.disconnect(l),s.headingsChanged.disconnect(u),s.collapseChanged.disconnect(d),e.content.cellCollapsed.disconnect(g),e.content.cellInViewportChanged.disconnect(b);for(const y of e.content.widgets)y instanceof Z&&y.renderedChanged.disconnect(f)})}),s}getToolbarItems(e){return this.commands?[{name:"select-last-modified-back",widget:new Pe({commands:this.commands,id:"notebook:select-last-modified-cell",args:{toolbar:!0},icon:jt,label:""})},{name:"select-last-modified-forward",widget:new Pe({commands:this.commands,id:"notebook:select-next-modified-cell",args:{toolbar:!0},icon:Rt,label:""})}]:[]}}async function Qo(r,e,n){let s=null;return r.type===We.HeadingType.Markdown?s=await Pt(e,r.raw,r.level,n):r.type===We.HeadingType.HTML&&(s=r.id),s}const en="jp-StatusItem-trust";function tn(r,e){e=e||R;const n=e.load("jupyterlab");return r.trustedCells===r.totalCells?n.__("Notebook trusted: %1 of %2 code cells trusted.",r.trustedCells,r.totalCells):r.activeCellTrusted?n.__("Active cell trusted: %1 of %2 code cells trusted.",r.trustedCells,r.totalCells):n.__("Notebook not trusted: %1 of %2 code cells trusted.",r.trustedCells,r.totalCells)}function on(r){return r.allCellsTrusted?M.createElement(Lt.react,{top:"2px",stylesheet:"statusBar"}):M.createElement(Wt.react,{top:"2px",stylesheet:"statusBar"})}class de extends me{constructor(e){super(new de.Model),this.translator=e||R,this.node.classList.add(en)}render(){if(!this.model)return null;const e=tn(this.model,this.translator);return e!==this.node.title&&(this.node.title=e),M.createElement(on,{allCellsTrusted:this.model.trustedCells===this.model.totalCells,activeCellTrusted:this.model.activeCellTrusted,totalCells:this.model.totalCells,trustedCells:this.model.trustedCells})}}(function(r){class e extends Ce{constructor(){super(...arguments),this._trustedCells=0,this._totalCells=0,this._activeCellTrusted=!1,this._notebook=null}get trustedCells(){return this._trustedCells}get totalCells(){return this._totalCells}get activeCellTrusted(){return this._activeCellTrusted}get notebook(){return this._notebook}set notebook(s){const a=this._notebook;a!==null&&(a.activeCellChanged.disconnect(this._onActiveCellChanged,this),a.modelContentChanged.disconnect(this._onModelChanged,this));const l=this._getAllState();if(this._notebook=s,this._notebook===null)this._trustedCells=0,this._totalCells=0,this._activeCellTrusted=!1;else{this._notebook.activeCellChanged.connect(this._onActiveCellChanged,this),this._notebook.modelContentChanged.connect(this._onModelChanged,this),this._notebook.activeCell?this._activeCellTrusted=this._notebook.activeCell.model.trusted:this._activeCellTrusted=!1;const{total:p,trusted:i}=this._deriveCellTrustState(this._notebook.model);this._totalCells=p,this._trustedCells=i}this._triggerChange(l,this._getAllState())}_onModelChanged(s){const a=this._getAllState(),{total:l,trusted:p}=this._deriveCellTrustState(s.model);this._totalCells=l,this._trustedCells=p,this._triggerChange(a,this._getAllState())}_onActiveCellChanged(s,a){const l=this._getAllState();a?this._activeCellTrusted=a.model.trusted:this._activeCellTrusted=!1,this._triggerChange(l,this._getAllState())}_deriveCellTrustState(s){if(s===null)return{total:0,trusted:0};let a=0,l=0;for(const p of s.cells)p.type==="code"&&(a++,p.trusted&&l++);return{total:a,trusted:l}}_getAllState(){return[this._trustedCells,this._totalCells,this.activeCellTrusted]}_triggerChange(s,a){(s[0]!==a[0]||s[1]!==a[1]||s[2]!==a[2])&&this.stateChanged.emit(void 0)}}r.Model=e})(de||(de={}));const nn=new ot("@jupyterlab/metadataform:IMetadataFormProvider","A service to register new metadata editor widgets."),ln={id:"@jupyterlab/notebook-extension:cell-executor",description:"Provides the notebook cell executor.",autoStart:!0,provides:lt,activate:()=>Object.freeze({runCell:Ht})},sn=new ot("@jupyterlab/logconsole:ILoggerRegistry","A service providing a logger infrastructure."),rn={activate:an,id:"@jupyterlab/notebook-extension:log-output",description:"Adds cell outputs log to the application logger.",requires:[L],optional:[sn],autoStart:!0};function an(r,e,n){if(!n)return;function s(a){function l(p,i,u){if(Y.KernelMessage.isDisplayDataMsg(p)||Y.KernelMessage.isStreamMsg(p)||Y.KernelMessage.isErrorMsg(p)||Y.KernelMessage.isExecuteResultMsg(p)){const d=n.getLogger(a.context.path);d.rendermime=a.content.rendermime;const g={...p.content,output_type:p.header.msg_type};let b=i;(Y.KernelMessage.isErrorMsg(p)||Y.KernelMessage.isStreamMsg(p)&&p.content.name==="stderr")&&(b=u),d.log({type:"output",data:g,level:b})}}a.context.sessionContext.iopubMessage.connect((p,i)=>l(i,"info","info"),a),a.context.sessionContext.unhandledMessage.connect((p,i)=>l(i,"warning","error"),a)}e.forEach(a=>s(a)),e.widgetAdded.connect((a,l)=>s(l))}const dn="jp-ActiveCellTool",cn="jp-ActiveCellTool-Content",un="jp-ActiveCellTool-CellContent";class hn extends q.Tool{constructor(e){super(),this._cellModel=null,this._updateId=0,this._pendingUpdate=!1,this._promptOutdated=!1,this._tracker=e.tracker,this._languages=e.languages,this.addClass(dn),this.layout=new be,this._inputPrompt=new Ft,this.layout.addWidget(this._inputPrompt);const n=document.createElement("div");n.classList.add(cn);const s=n.appendChild(document.createElement("div")),a=s.appendChild(document.createElement("pre"));s.className=un,this._editorEl=a,this.layout.addWidget(new ee({node:n})),this._previewDebouncer=new Kt(()=>this._update(),150),this._tracker.activeCellChanged.connect(this._onActiveCellChanged,this),this._tracker.currentChanged.connect(this._onActiveCellChanged,this),this._onActiveCellChanged()}dispose(){this.isDisposed||(this._tracker.activeCellChanged.disconnect(this._onActiveCellChanged,this),this._tracker.currentChanged.disconnect(this._onActiveCellChanged,this),this._disconnectCellModel(),this._previewDebouncer.dispose(),super.dispose())}render(e){return M.createElement("div",{ref:n=>{!n||this.node.parentElement===n||(n.appendChild(this.node),this._pendingUpdate&&this._update().catch(console.warn))}})}_onActiveCellChanged(){var e,n;const s=(n=(e=this._tracker.activeCell)===null||e===void 0?void 0:e.model)!==null&&n!==void 0?n:null;s!==this._cellModel&&(this._disconnectCellModel(),this._cellModel=s,s&&(s.sharedModel.changed.connect(this._onCellContentChanged,this),s.mimeTypeChanged.connect(this._onCellContentChanged,this)),this._promptOutdated=!0,this._update().catch(console.warn))}_onCellContentChanged(){if(!this.node.isConnected){this._pendingUpdate=!0,this._promptOutdated=!0;return}this._promptOutdated||this._updatePrompt(),this._previewDebouncer.invoke().catch(console.warn)}_disconnectCellModel(){const e=this._cellModel;e&&(e.sharedModel.changed.disconnect(this._onCellContentChanged,this),e.mimeTypeChanged.disconnect(this._onCellContentChanged,this),this._cellModel=null)}_updatePrompt(){var e;const n=this._cellModel;n&&Vt(n)?(this._inputPrompt.executionCount=`${(e=n.executionCount)!==null&&e!==void 0?e:""}`,this._inputPrompt.show()):(this._inputPrompt.executionCount=null,this._inputPrompt.hide())}async _update(){if(!this.node.isConnected){this._pendingUpdate=!0;return}this._pendingUpdate=!1;const e=this._cellModel,n=++this._updateId;if(!e){this._promptOutdated=!1,this._updatePrompt(),this._editorEl.replaceChildren();return}const s=e.sharedModel.getSource(),a=s.indexOf(`
2
2
  `),l=a===-1?s:s.slice(0,a),p=document.createElement("pre");try{await this._languages.highlight(l,this._languages.findByMIME(e.mimeType),p)}catch(u){console.warn(u),p.replaceChildren(document.createTextNode(l))}if(n!==this._updateId)return;this._promptOutdated&&(this._updatePrompt(),this._promptOutdated=!1);const i=document.createDocumentFragment();for(;p.firstChild;)i.appendChild(p.firstChild);this._editorEl.replaceChildren(i)}}const pn="jp-CellMetadataEditor",gn="jp-NotebookMetadataEditor";class mn extends q.MetadataEditorTool{constructor(e){super(e),this._tracker=e.tracker,this.editor.editorHostNode.addEventListener("blur",this.editor,!0),this.editor.editorHostNode.addEventListener("click",this.editor,!0),this.editor.headerNode.addEventListener("click",this.editor)}_onSourceChanged(){var e,n,s;const a=(e=this._tracker.activeCell)===null||e===void 0?void 0:e.model.sharedModel;if(a&&this.editor.source){const l=Object.keys((n=a.metadata)!==null&&n!==void 0?n:{}),p=(s=this.editor.source.toJSON())!==null&&s!==void 0?s:{};a.transact(()=>{l.forEach(i=>a.deleteMetadata(i)),a.setMetadata(p)})}}render(e){var n;const s=this._tracker.activeCell,a=this.editor.source;return this.editor.source=s?new ge({values:s.model.metadata}):null,a?.dispose(),(n=this.editor.source)===null||n===void 0||n.changed.connect(this._onSourceChanged,this),M.createElement("div",{className:pn},M.createElement("div",{ref:l=>l?.appendChild(this.node)}))}}class Cn extends q.MetadataEditorTool{constructor(e){super(e),this._tracker=e.tracker,this.editor.editorHostNode.addEventListener("blur",this.editor,!0),this.editor.editorHostNode.addEventListener("click",this.editor,!0),this.editor.headerNode.addEventListener("click",this.editor)}_onSourceChanged(){var e,n;this.editor.source&&((n=(e=this._tracker.currentWidget)===null||e===void 0?void 0:e.model)===null||n===void 0||n.sharedModel.setMetadata(this.editor.source.toJSON()))}render(e){var n,s;const a=this._tracker.currentWidget,l=this.editor.source;return this.editor.source=a?new ge({values:(n=a.model)===null||n===void 0?void 0:n.metadata}):null,l?.dispose(),(s=this.editor.source)===null||s===void 0||s.changed.connect(this._onSourceChanged,this),M.createElement("div",{className:gn},M.createElement("div",{ref:p=>p?.appendChild(this.node)}))}}var c;(function(r){r.createNew="notebook:create-new",r.interrupt="notebook:interrupt-kernel",r.restart="notebook:restart-kernel",r.restartClear="notebook:restart-clear-output",r.restartAndRunToSelected="notebook:restart-and-run-to-selected",r.restartRunAll="notebook:restart-run-all",r.reconnectToKernel="notebook:reconnect-to-kernel",r.changeKernel="notebook:change-kernel",r.getKernel="notebook:get-kernel",r.createConsole="notebook:create-console",r.createSubshellConsole="notebook:create-subshell-console",r.createOutputView="notebook:create-output-view",r.clearAllOutputs="notebook:clear-all-cell-outputs",r.shutdown="notebook:shutdown-kernel",r.closeAndShutdown="notebook:close-and-shutdown",r.trust="notebook:trust",r.exportToFormat="notebook:export-to-format",r.run="notebook:run-cell",r.runAndAdvance="notebook:run-cell-and-select-next",r.runAndInsert="notebook:run-cell-and-insert-below",r.runInConsole="notebook:run-in-console",r.runAll="notebook:run-all-cells",r.runAllAbove="notebook:run-all-above",r.runAllBelow="notebook:run-all-below",r.renderAllMarkdown="notebook:render-all-markdown",r.toCode="notebook:change-cell-to-code",r.toMarkdown="notebook:change-cell-to-markdown",r.toRaw="notebook:change-cell-to-raw",r.cut="notebook:cut-cell",r.copy="notebook:copy-cell",r.pasteAbove="notebook:paste-cell-above",r.pasteBelow="notebook:paste-cell-below",r.duplicateBelow="notebook:duplicate-below",r.pasteAndReplace="notebook:paste-and-replace-cell",r.moveUp="notebook:move-cell-up",r.moveDown="notebook:move-cell-down",r.clearOutputs="notebook:clear-cell-output",r.deleteCell="notebook:delete-cell",r.insertAbove="notebook:insert-cell-above",r.insertBelow="notebook:insert-cell-below",r.selectAbove="notebook:move-cursor-up",r.selectBelow="notebook:move-cursor-down",r.selectHeadingAboveOrCollapse="notebook:move-cursor-heading-above-or-collapse",r.selectHeadingBelowOrExpand="notebook:move-cursor-heading-below-or-expand",r.insertHeadingAbove="notebook:insert-heading-above",r.insertHeadingBelow="notebook:insert-heading-below",r.extendAbove="notebook:extend-marked-cells-above",r.extendTop="notebook:extend-marked-cells-top",r.extendBelow="notebook:extend-marked-cells-below",r.extendBottom="notebook:extend-marked-cells-bottom",r.selectAll="notebook:select-all",r.deselectAll="notebook:deselect-all",r.editMode="notebook:enter-edit-mode",r.merge="notebook:merge-cells",r.mergeAbove="notebook:merge-cell-above",r.mergeBelow="notebook:merge-cell-below",r.split="notebook:split-cell-at-cursor",r.commandMode="notebook:enter-command-mode",r.toggleAllLines="notebook:toggle-all-cell-line-numbers",r.undoCellAction="notebook:undo-cell-action",r.redoCellAction="notebook:redo-cell-action",r.redo="notebook:redo",r.undo="notebook:undo",r.markdown1="notebook:change-cell-to-heading-1",r.markdown2="notebook:change-cell-to-heading-2",r.markdown3="notebook:change-cell-to-heading-3",r.markdown4="notebook:change-cell-to-heading-4",r.markdown5="notebook:change-cell-to-heading-5",r.markdown6="notebook:change-cell-to-heading-6",r.hideCode="notebook:hide-cell-code",r.showCode="notebook:show-cell-code",r.hideAllCode="notebook:hide-all-cell-code",r.showAllCode="notebook:show-all-cell-code",r.hideOutput="notebook:hide-cell-outputs",r.showOutput="notebook:show-cell-outputs",r.toggleOutput="notebook:toggle-cell-outputs",r.hideAllOutputs="notebook:hide-all-cell-outputs",r.showAllOutputs="notebook:show-all-cell-outputs",r.toggleRenderSideBySideCurrentNotebook="notebook:toggle-render-side-by-side-current",r.setSideBySideRatio="notebook:set-side-by-side-ratio",r.enableOutputScrolling="notebook:enable-output-scrolling",r.disableOutputScrolling="notebook:disable-output-scrolling",r.toggleOutputScrolling="notebook:toggle-output-scrolling",r.selectLastRunCell="notebook:select-last-run-cell",r.selectLastModifiedCell="notebook:select-last-modified-cell",r.selectNextModifiedCell="notebook:select-next-modified-cell",r.replaceSelection="notebook:replace-selection",r.autoClosingBrackets="notebook:toggle-autoclosing-brackets",r.toggleCollapseCmd="notebook:toggle-heading-collapse",r.collapseAllCmd="notebook:collapse-all-headings",r.expandAllCmd="notebook:expand-all-headings",r.copyToClipboard="notebook:copy-to-clipboard",r.invokeCompleter="completer:invoke-notebook",r.selectCompleter="completer:select-notebook",r.tocRunCells="toc:run-cells",r.accessPreviousHistory="notebook:access-previous-history-entry",r.accessNextHistory="notebook:access-next-history-entry",r.virtualScrollbar="notebook:toggle-virtual-scrollbar",r.copySelectedtext="notebook:copy-selected-text",r.pasteText="notebook:paste-text",r.cutSelectedtext="notebook:cut-selected-text"})(c||(c={}));const $="Notebook",bn=["notebook","python","custom"],fn="@jupyterlab/notebook-extension:panel",Ve="jp-NotebookExtension-sideBySideMargins",te={id:"@jupyterlab/notebook-extension:tracker",description:"Provides the notebook widget tracker.",provides:L,requires:[st,uo,lt],optional:[De,mo,Co,at,dt,bo,_e,Je,F,Ee,rt],activate:qn,autoStart:!0},vn={id:"@jupyterlab/notebook-extension:factory",description:"Provides the notebook and cell factory.",provides:Se.IContentFactory,requires:[fe],autoStart:!0,activate:(r,e)=>{const n=e.factoryService.newInlineEditor;return new Se.ContentFactory({editorFactory:n})}},_n={activate:Hn,provides:go,id:"@jupyterlab/notebook-extension:tools",description:"Provides the notebook tools.",autoStart:!0,requires:[L,fe,it,Ut.IStateDB,F],optional:[po]},yn={id:"@jupyterlab/notebook-extension:mode-status",description:"Adds a notebook mode status widget.",autoStart:!0,requires:[L,F],optional:[ve],activate:(r,e,n,s)=>{if(!s)return;const{shell:a}=r,l=new ae(n);e.currentChanged.connect(()=>{const p=e.currentWidget;l.model.notebook=p&&p.content}),s.registerStatusItem("@jupyterlab/notebook-extension:mode-status",{priority:1,item:l,align:"right",rank:4,isActive:()=>!!a.currentWidget&&!!e.currentWidget&&a.currentWidget===e.currentWidget})}},ct={id:"@jupyterlab/notebook-extension:cell-counter-status",description:"Adds a notebook cell counter status widget.",autoStart:!0,requires:[L,F],optional:[ve],activate:(r,e,n,s)=>{if(!s)return;const{shell:a}=r,l=new re({translator:n}),p=()=>{const i=e.currentWidget;l.model.notebook=i&&i.content};e.currentChanged.connect(p),p(),s.registerStatusItem(ct.id,{priority:1,item:l,align:"right",rank:2.5,isActive:()=>!!a.currentWidget&&!!e.currentWidget&&a.currentWidget===e.currentWidget})}},xn={id:"@jupyterlab/notebook-extension:execution-indicator",description:"Adds a notebook execution status widget.",autoStart:!0,requires:[L,fo,F],optional:[ve,_e],activate:(r,e,n,s,a,l)=>{let p,i,u;const d=g=>{var b,f;let{showOnToolBar:_,showProgress:y,showJumpToCell:w}=g;if(_)u&&(n.currentChanged.disconnect(i),u.dispose());else{if(!a)return;p?.model||(p=new X(s),i=(S,o)=>{const{newValue:t}=o;if(t&&e.has(t)){const h=t;p.model.attachNotebook({content:h.content,context:h.sessionContext})}},u=a.registerStatusItem("@jupyterlab/notebook-extension:execution-indicator",{item:p,align:"left",rank:3,isActive:()=>{const S=n.currentWidget;return!!S&&e.has(S)}}),p.model.attachNotebook({content:(b=e.currentWidget)===null||b===void 0?void 0:b.content,context:(f=e.currentWidget)===null||f===void 0?void 0:f.sessionContext}),n.currentChanged.connect(i),p.disposed.connect(()=>{n.currentChanged.disconnect(i)})),p.model.displayOption={showOnToolBar:_,showProgress:y,showJumpToCell:w}}};if(l){const g=l.load(te.id);Promise.all([g,r.restored]).then(([b])=>{d(X.getSettingValue(b)),b.changed.connect(f=>d(X.getSettingValue(f)))}).catch(b=>{console.error(b.message)})}}},wn={id:"@jupyterlab/notebook-extension:export",description:"Adds the export notebook commands.",autoStart:!0,requires:[F,L],optional:[dt,De],activate:(r,e,n,s,a)=>{var l;const p=e.load("jupyterlab"),{commands:i,shell:u}=r,d=r.serviceManager,g=()=>H.isEnabled(u,n);i.addCommand(c.exportToFormat,{label:y=>{if(y.label===void 0)return p.__("Save and Export Notebook to the given `format`.");const w=y.label;return y.isPalette?p.__("Save and Export Notebook: %1",w):w},execute:async y=>{var w,S,o;const t=m(n,u,y);if(!t)return;const{context:h}=t,C=pe.PageConfig.getNotebookVersion(),k=pe.compareVersions(C,[4,0,0])<0&&pe.compareVersions(C,[2,18,0])>=0;let A=!1;if(y.format==="html"&&k){const E=await Ge.getBoolean({title:p.__("Export as HTML"),label:p.__("Sanitize HTML output"),value:!0});if(!E.button.accept)return;A=(w=E.value)!==null&&w!==void 0?w:!1}const B={format:y.format,path:t.context.path,exporterOptions:{download:!0,sanitizeHtml:A}};return h.model.dirty&&!h.model.readOnly&&await h.save(),(o=(S=d.nbconvert).exportAs)===null||o===void 0?void 0:o.call(S,B)},isEnabled:g,describedBy:{args:{type:"object",properties:{format:{type:"string",description:p.__("The export format (e.g., pdf, html, latex)")},label:{type:"string",description:p.__("The label to display for this format")},isPalette:{type:"boolean",description:p.__("Whether the command is called from the command palette")}},required:["format"]}}});let b;s&&(b=(l=s.fileMenu.items.find(y=>{var w;return y.type==="submenu"&&((w=y.submenu)===null||w===void 0?void 0:w.id)==="jp-mainmenu-file-notebookexport"}))===null||l===void 0?void 0:l.submenu);let f=!1;const _=async()=>{if(f)return;n.widgetAdded.disconnect(_),f=!0;const y=await d.nbconvert.getExportFormats(!1);if(!y)return;const w=H.getFormatLabels(e);Object.keys(y).forEach(function(o){const t=o[0].toLocaleUpperCase()+o.slice(1),h=p.__(t),C=w[o]?w[o]:h;let k={format:o,label:C,isPalette:!1};if(bn.indexOf(o)===-1&&(b&&b.addItem({command:c.exportToFormat,args:k}),a)){k={format:o,label:C,isPalette:!0};const A=p.__("Notebook Operations");a.addItem({command:c.exportToFormat,category:A,args:k})}})};n.widgetAdded.connect(_)}},kn={id:"@jupyterlab/notebook-extension:trust-status",description:"Adds the notebook trusted status widget.",autoStart:!0,requires:[L,F],optional:[ve],activate:(r,e,n,s)=>{if(!s)return;const{shell:a}=r,l=new de(n);e.currentChanged.connect(()=>{const p=e.currentWidget;l.model.notebook=p&&p.content}),s.registerStatusItem("@jupyterlab/notebook-extension:trust-status",{item:l,align:"right",rank:3,isActive:()=>!!a.currentWidget&&!!e.currentWidget&&a.currentWidget===e.currentWidget})}},Sn={id:"@jupyterlab/notebook-extension:widget-factory",description:"Provides the notebook widget factory.",provides:st,requires:[Se.IContentFactory,fe,vo,pt],optional:[_e,Je,F],activate:Fn,autoStart:!0},An={id:"@jupyterlab/notebook-extension:cloned-outputs",description:"Adds the clone output feature.",requires:[yo,L,F],optional:[at],activate:Kn,autoStart:!0},Mn={id:"@jupyterlab/notebook-extension:code-console",description:"Adds the notebook code consoles features.",requires:[L,F],activate:Vn,autoStart:!0},Tn={id:"@jupyterlab/notebook-extension:copy-output",description:"Adds the copy cell outputs feature.",activate:Un,requires:[F,L],autoStart:!0},Bn={id:"@jupyterlab/notebook-extension:kernel-status",description:"Adds the notebook kernel status.",activate:(r,e,n)=>{const s=a=>{let l=null;return a&&e.has(a)?a.sessionContext:l};n.addSessionProvider(s)},requires:[L,gt],autoStart:!0},En={id:"@jupyterlab/notebook-extension:cursor-position",description:"Adds the notebook cursor position status.",activate:(r,e,n)=>{let s=null;const a=async l=>{let p=null;if(l!==s){if(s?.content.activeCellChanged.disconnect(n.update),s=null,l&&e.has(l)){l.content.activeCellChanged.connect(n.update);const i=l.content.activeCell;p=null,i&&(await i.ready,p=i.editor),s=l}}else if(l){const i=l.content.activeCell;p=null,i&&(await i.ready,p=i.editor)}return p};n.addEditorProvider(a)},requires:[L,qt],autoStart:!0},Nn={id:"@jupyterlab/notebook-extension:completer",description:"Adds the code completion capability to notebooks.",requires:[L],optional:[xo,F,ze],activate:$n,autoStart:!0},On={id:"@jupyterlab/notebook-extension:search",description:"Adds search capability to notebooks.",requires:[wo],autoStart:!0,activate:(r,e)=>{e.add("jp-notebookSearchProvider",Zt)}},jn={id:"@jupyterlab/notebook-extension:toc",description:"Adds table of content capability to the notebooks",requires:[L,$t,ze],optional:[_o,_e],autoStart:!0,activate:(r,e,n,s,a,l)=>{const p=new Zo(e,a,s,r.commands);n.add(p),l&&Promise.all([r.restored,l.load(te.id)]).then(([i,u])=>{const d=()=>{var g;p.scrollToTop=(g=u.composite.scrollHeadingToTop)!==null&&g!==void 0?g:!0};d(),u.changed.connect(d)}).catch(i=>{console.error("Failed to load notebook table of content settings.",i)})}},Rn={id:"@jupyterlab/notebook-extension:language-server",description:"Adds language server capability to the notebooks.",requires:[L,Ao,Mo,To,Bo],activate:Dn,autoStart:!0},In={id:"@jupyterlab/notebook-extension:update-raw-mimetype",description:"Adds metadata form editor for raw cell mimetype.",autoStart:!0,requires:[L,nn,F],activate:(r,e,n,s)=>{const a=s.load("jupyterlab");let l=!1;async function p(){if(l||!n.get("commonToolsSection"))return;const i=n.get("commonToolsSection").getProperties("/raw_mimetype");if(!i)return;e.widgetAdded.disconnect(p),l=!0;const d=await r.serviceManager.nbconvert.getExportFormats(!1);if(!d)return;const g=Object.keys(d),b=H.getFormatLabels(s);g.forEach(function(f){var _;if(!(((_=i.oneOf)===null||_===void 0?void 0:_.filter(w=>w.const===f).length)>0)){const w=f[0].toLocaleUpperCase()+f.slice(1),S=a.__(w),o=b[f]?b[f]:S,t=d[f].output_mimetype;i.oneOf.push({const:t,title:o})}}),n.get("commonToolsSection").setProperties("/raw_mimetype",i)}e.widgetAdded.connect(p)}},Pn={id:"@jupyterlab/notebook-extension:metadata-editor",description:"Adds metadata form for full metadata editor.",autoStart:!0,requires:[L,fe,Ee],optional:[F],activate:(r,e,n,s,a)=>{const l=g=>n.factoryService.newInlineEditor(g),p=new mn({editorFactory:l,tracker:e,label:"Cell metadata",translator:a}),i={fieldRenderer:g=>p.render(g)};s.addRenderer("@jupyterlab/notebook-extension:metadata-editor.cell-metadata",i);const u=new Cn({editorFactory:l,tracker:e,label:"Notebook metadata",translator:a}),d={fieldRenderer:g=>u.render(g)};s.addRenderer("@jupyterlab/notebook-extension:metadata-editor.notebook-metadata",d)}},Ln={id:"@jupyterlab/notebook-extension:active-cell-tool",description:"Adds active cell field in the metadata editor tab.",autoStart:!0,requires:[L,Ee,it],activate:(r,e,n,s)=>{const a=new hn({tracker:e,languages:s}),l={fieldRenderer:p=>a.render(p)};n.addRenderer("@jupyterlab/notebook-extension:active-cell-tool.renderer",l)}},Wn={id:"@jupyterlab/notebook-extension:open-with-no-kernel",description:'Adds the "Notebook (no kernel)" option to the Open With menu.',requires:[rt],optional:[F],autoStart:!0,activate:(r,e,n)=>{const{tracker:s}=e,a=(n??R).load("jupyterlab"),l=[];function p(i){var u,d;l.forEach(_=>_.dispose()),l.length=0;const g=(d=(u=i.menu.items.find(_=>{var y;return _.type==="submenu"&&((y=_.submenu)===null||y===void 0?void 0:y.id)==="jp-contextmenu-open-with"}))===null||u===void 0?void 0:u.submenu)!==null&&d!==void 0?d:null;if(!g)return;(s.currentWidget?Array.from(s.currentWidget.selectedItems()):[]).some(_=>_.type==="notebook")&&l.push(g.addItem({command:"filebrowser:open",args:{label:a.__("Notebook (no kernel)"),factory:$,kernelPreference:{shouldStart:!1,shouldReuse:!1}}}))}r.contextMenu.opened.connect(p)}},al=[ln,vn,te,xn,wn,_n,ct,yn,kn,Sn,rn,An,Mn,Tn,Bn,En,Nn,On,jn,Rn,In,Pn,Ln,Wn];function Hn(r,e,n,s,a,l,p){const i=l.load("jupyterlab"),u="notebook-tools",d=new q({tracker:e,translator:l}),g=(b,f)=>{switch(f.type){case"activate-request":a.save(u,{open:!0});break;case"after-hide":case"close-request":a.remove(u);break}return!0};return d.title.icon=Jt,d.title.dataset={...d.title.dataset,jpTabLabel:i.__("Notebook Tools")},d.title.caption=i.__("Notebook Tools"),d.id=u,G.installMessageHook(d,g),p&&e.widgetAdded.connect((b,f)=>{p.register(f).render(d)}),d}function Fn(r,e,n,s,a,l,p,i){const u=i??R,d=p??new Be({translator:u}),g=pe.PageConfig.getOption("notebookStartsKernel"),b=g===""||g.toLowerCase()==="true",{commands:f}=r;let _;a.addFactory($,"save",S=>ho.createSaveButton(f,S.context.fileChanged)),a.addFactory($,"cellType",S=>Ae.createCellTypeItem(S,u)),a.addFactory($,"kernelName",S=>he.createKernelNameItem(S.sessionContext,d,u)),a.addFactory($,"executionProgress",S=>{const o=l?.load(te.id),t=X.createExecutionIndicatorItem(S,u,o);return o?.then(h=>{S.disposed.connect(()=>{h.dispose()})}),t}),l&&(_=zt(a,l,$,fn,u));const y=u.load("jupyterlab"),w=new jo({name:$,label:y.__("Notebook"),fileTypes:["notebook"],modelName:"notebook",defaultFor:["notebook"],preferKernel:b,canStartKernel:!0,rendermime:s,contentFactory:e,editorConfig:se.defaultEditorConfig,notebookConfig:se.defaultNotebookConfig,mimeTypeService:n.mimeTypeService,toolbarFactory:_,translator:u});return r.docRegistry.addWidgetFactory(w),w}function Kn(r,e,n,s,a){const l=s.load("jupyterlab"),p=new Gt({namespace:"cloned-outputs"});a&&a.restore(p,{command:c.createOutputView,args:g=>({path:g.content.path,index:g.content.index}),name:g=>`${g.content.path}:${g.content.index}`,when:n.restored});const{commands:i,shell:u}=r,d=()=>H.isEnabledAndSingleSelected(u,n);i.addCommand(c.createOutputView,{label:l.__("Create New View for Cell Output"),execute:async g=>{var b;let f,_;const y=g.path;let w=g.index;if(y&&w!==void 0&&w!==null){if(_=e.findWidget(y,$),!_)return}else{if(_=n.currentWidget,!_)return;f=_.content.activeCell,w=_.content.activeCellIndex}const S=new H.ClonedOutputArea({notebook:_,cell:f,index:w,translator:s}),o=new Yt({content:S});_.context.addSibling(o,{ref:_.id,mode:"split-bottom",type:"Cloned Output"});const t=()=>{p.save(o)};_.context.pathChanged.connect(t),(b=_.context.model)===null||b===void 0||b.cells.changed.connect(t),p.add(o),_.content.disposed.connect(()=>{var h;_.context.pathChanged.disconnect(t),(h=_.context.model)===null||h===void 0||h.cells.changed.disconnect(t),o.dispose()})},isEnabled:d,describedBy:{args:{type:"object",properties:{path:{type:"string",description:l.__("The path to the notebook containing the cell")},index:{type:"number",description:l.__("The index of the cell to create an output view for")}}}}})}function Vn(r,e,n){const s=n.load("jupyterlab"),{commands:a,shell:l}=r,p=()=>H.isEnabled(l,e);a.addCommand(c.createConsole,{label:s.__("New Console for Notebook"),execute:i=>{const u=e.currentWidget;if(u)return H.createConsole(a,u,i.activate)},isEnabled:p,describedBy:{args:{type:"object",properties:{activate:{type:"boolean",description:s.__("Whether to activate the console after creation")}}}}}),a.addCommand(c.createSubshellConsole,{label:s.__("New Subshell Console for Notebook"),execute:i=>{const u=e.currentWidget;if(u)return H.createConsole(a,u,i.activate,!0)},isEnabled:p,isVisible:()=>{var i,u,d;const g=(u=(i=e.currentWidget)===null||i===void 0?void 0:i.context.sessionContext.session)===null||u===void 0?void 0:u.kernel;return(d=g?.supportsSubshells)!==null&&d!==void 0?d:!1},describedBy:{args:{type:"object",properties:{activate:{type:"boolean",description:s.__("Whether to activate the console after creation")}}}}}),a.addCommand(c.runInConsole,{label:s.__("Run Selected Text or Current Line in Console"),execute:async i=>{var u,d;const g=e.currentWidget;if(!g)return;const{context:b,content:f}=g,_=f.activeCell,y=_?.model.metadata,w=b.path;if(!_||_.model.type!=="code")return;let S;const o=_.editor;if(!o)return;const t=o.getSelection(),{start:h,end:C}=t;if(h.column!==C.column||h.line!==C.line){const A=o.getOffsetAt(t.start),B=o.getOffsetAt(t.end);S=o.model.sharedModel.getSource().substring(A,B)}else{const A=o.getCursorPosition(),B=o.model.sharedModel.getSource().split(`
3
3
  `);let E=t.start.line;for(;E<o.lineCount&&!B[E].replace(/\s/g,"").length;)E+=1;let j=E>0,K=0,W=K+1;for(;;){S=B.slice(K,W).join(`
4
4
  `);const oe=await((d=(u=g.context.sessionContext.session)===null||u===void 0?void 0:u.kernel)===null||d===void 0?void 0:d.requestIsComplete({code:S+`
@@ -1,4 +1,4 @@
1
- import{j0 as ge,j1 as oe,j2 as H,j3 as fe,j4 as be,j5 as ne,j6 as ve,j7 as se,j8 as ie,j9 as b,ja as V,jb as C,jc as xe,jd as ye,je as Ce,jf as $e,jg as Te,jh as we,ji as _e,jj as je,jk as Ie,jl as ke,jm as Fe,jn as P,jo as G,jp as J,jq as Se,jr as U,js as q,jt as R,ju as K,jv as Z,jw as O,jx as Ee,jy as Ne,jz as j,jA as Oe,jB as He,jC as y,jD as Q,jE as Ae,jF as Be,jG as I,jH as Ve,jI as De,jJ as Me,jK as Pe,jL as ae,jM as k,jN as Le,jO as p,jP as Re,jQ as le,jR as re,jS as We,r as h,jT as X,jU as A,J as de,jV as ce,cj as ze,bg as Ge,aB as Je,az as Ue,e3 as he,aD as qe,jW as Ke,aE as Ze,cg as Qe,jX as Xe,jY as Ye,jZ as et,j_ as tt,eG as Y,aJ as ot,dC as nt,j$ as st}from"../datalayer-app-main.js";import{S as it,f as at,c as lt,M as rt}from"./index-z8PItpd8.js";import{I as dt}from"./tokens-1h_N3aLM.js";import"./Output-Do1CYRIF.js";import"./index-i9IsP_xD.js";import"./hoverbox-CStlKQWE.js";import"./index--Rl4aMiU.js";import"./index-DrrVr0x3.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-DXPB_0fo.js";import"./d3-color-Jd8hXty2.js";import"./dist-Frc5TvpU.js";import"./PaintbrushIcon-CFBHU-3l.js";import"./index-BaRoLDk0.js";import"./RestartIcon-DvpOf5Mf.js";import"./CellSidebarExtension-B_Bqi3Eh.js";import"./NotebookSkeleton-GSdyJDf_.js";import"./Avatar-DUPBQXVt.js";import"./renderer-B_98xkGt.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-jGhuRcP3.js";import"./url-DY3jeuF8.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BoT73xjq.js";import"./index-CShCHnof.js";import"./KernelVariables-cH-x-Hrc.js";import"./index-BWeXDhSd.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-LMslHH3H.js";import"./tokens-UgGv77-l.js";import"./drivecontents-BabrDJge.js";import"./kernel-DWlDRhgJ.js";const ue=o=>typeof o=="function",ct=()=>null;function ee(o){return o===void 0?ct:ue(o)?o:()=>o}function te(o,t,e){const n=ue(o)?o:()=>o,d=ee(t),m=ee(e);return(r,l)=>n(r,l)?d(r,l):m(r,l)}const ht=(o,t)=>H`
1
+ import{j0 as ge,j1 as oe,j2 as H,j3 as fe,j4 as be,j5 as ne,j6 as ve,j7 as se,j8 as ie,j9 as b,ja as V,jb as C,jc as xe,jd as ye,je as Ce,jf as $e,jg as Te,jh as we,ji as _e,jj as je,jk as Ie,jl as ke,jm as Fe,jn as P,jo as G,jp as J,jq as Se,jr as U,js as q,jt as R,ju as K,jv as Z,jw as O,jx as Ee,jy as Ne,jz as j,jA as Oe,jB as He,jC as y,jD as Q,jE as Ae,jF as Be,jG as I,jH as Ve,jI as De,jJ as Me,jK as Pe,jL as ae,jM as k,jN as Le,jO as p,jP as Re,jQ as le,jR as re,jS as We,r as h,jT as X,jU as A,J as de,jV as ce,cj as ze,bg as Ge,aB as Je,az as Ue,e3 as he,aD as qe,jW as Ke,aE as Ze,cg as Qe,jX as Xe,jY as Ye,jZ as et,j_ as tt,eG as Y,aJ as ot,dC as nt,j$ as st}from"../datalayer-app-main.js";import{S as it,f as at,c as lt,M as rt}from"./index-C5HZB8ue.js";import{I as dt}from"./tokens-1h_N3aLM.js";import"./Output-BmVt4DpZ.js";import"./index-i9IsP_xD.js";import"./hoverbox-CStlKQWE.js";import"./index--Rl4aMiU.js";import"./index-5os8HYj-.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-DXPB_0fo.js";import"./d3-color-Jd8hXty2.js";import"./dist-Frc5TvpU.js";import"./PaintbrushIcon-CFBHU-3l.js";import"./index-BaRoLDk0.js";import"./RestartIcon-DvpOf5Mf.js";import"./CellSidebarExtension-CrgdhbHy.js";import"./NotebookSkeleton-GSdyJDf_.js";import"./Avatar-DUPBQXVt.js";import"./renderer-CCsq5PXp.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-jGhuRcP3.js";import"./url-DY3jeuF8.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BoT73xjq.js";import"./index-CShCHnof.js";import"./KernelVariables-DvfwDxTX.js";import"./index-BWeXDhSd.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-LMslHH3H.js";import"./tokens-UgGv77-l.js";import"./drivecontents-BabrDJge.js";import"./kernel-DWlDRhgJ.js";const ue=o=>typeof o=="function",ct=()=>null;function ee(o){return o===void 0?ct:ue(o)?o:()=>o}function te(o,t,e){const n=ue(o)?o:()=>o,d=ee(t),m=ee(e);return(r,l)=>n(r,l)?d(r,l):m(r,l)}const ht=(o,t)=>H`
2
2
  <template
3
3
  role="treeitem"
4
4
  slot="${e=>e.isNestedItem()?"item":void 0}"