@marimo-team/frontend 0.17.7 → 0.17.8

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 (856) hide show
  1. package/dist/assets/CellStatus-DPXKKvLP.js +1 -0
  2. package/dist/assets/Combination-CJczP3q7.js +41 -0
  3. package/dist/assets/ConnectedDataExplorerComponent-CrybKOL3.js +1 -0
  4. package/dist/assets/ConsoleOutput-BwPQWTZk.js +4 -0
  5. package/dist/assets/ErrorBoundary-Bu1xrDr8.js +1 -0
  6. package/dist/assets/ImageComparisonComponent-8Ap5uC96.js +1 -0
  7. package/dist/assets/ImperativeModal-kroC_7ut.js +1 -0
  8. package/dist/assets/Inputs-BbLBkwsf.js +1 -0
  9. package/dist/assets/LazyAnyLanguageCodeMirror-C5EeHVjE.js +2 -0
  10. package/dist/assets/MarimoErrorOutput-CkZl2oHu.js +9 -0
  11. package/dist/assets/Output-bwodJiCi.js +142 -0
  12. package/dist/assets/RenderHTML-DII6L-pL.js +1 -0
  13. package/dist/assets/SSRProvider-3gFeNiun.js +1 -0
  14. package/dist/assets/TinyCode-DJQhIrSL.js +1 -0
  15. package/dist/assets/VisuallyHidden-BhVlvbgE.js +1 -0
  16. package/dist/assets/__vite-browser-external-CuxDRaqz.js +1 -0
  17. package/dist/assets/__vite-browser-external-D9FJ-Z-a.js +1 -0
  18. package/dist/assets/activity-BNdjhxvI.js +1 -0
  19. package/dist/assets/add-cell-with-ai-B5g8vtHB.js +81 -0
  20. package/dist/assets/add-database-form-B0YECN2g.js +111 -0
  21. package/dist/assets/add-missing-import-CgnlhMvv.js +1 -0
  22. package/dist/assets/agent-panel-BYnzVe0R.js +287 -0
  23. package/dist/assets/ai-model-dropdown-BuNmF2aO.js +2 -0
  24. package/dist/assets/alert-DZiaW65G.js +1 -0
  25. package/dist/assets/alert-dialog-DkIHCxse.js +11 -0
  26. package/dist/assets/any-language-editor-B7W68S9J.js +3 -0
  27. package/dist/assets/api-B8WZp3pa.js +1 -0
  28. package/dist/assets/apl-DiFyycVh.js +1 -0
  29. package/dist/assets/app-config-button-BnK3MhdN.js +1 -0
  30. package/dist/assets/arc-b6bpmWtg.js +1 -0
  31. package/dist/assets/architecture-O4VJ6CD3-D5UQoxsD.js +1 -0
  32. package/dist/assets/architectureDiagram-W76B3OCA-1_iwowZU.js +36 -0
  33. package/dist/assets/arrow-left-qLn5JMUD.js +1 -0
  34. package/dist/assets/asciiarmor-BAWhqgpM.js +1 -0
  35. package/dist/assets/asn1-CtTMtM_b.js +1 -0
  36. package/dist/assets/badge-DrRlgkPx.js +1 -0
  37. package/dist/assets/between-horizontal-start-DDhAeomy.js +1 -0
  38. package/dist/assets/blockDiagram-QIGZ2CNN-DCAPq0ef.js +122 -0
  39. package/dist/assets/brainfuck-D-g39Tsa.js +1 -0
  40. package/dist/assets/bundle.esm-CC-LjhS-.js +1 -0
  41. package/dist/assets/button-DCB7VoVL.js +1 -0
  42. package/dist/assets/c4Diagram-FPNF74CW-4lagj5hx.js +10 -0
  43. package/dist/assets/cache-panel-BLbtgeIs.js +1 -0
  44. package/dist/assets/capabilities-MLRWIHmO.js +1 -0
  45. package/dist/assets/cell-actions-CwdXjy3R.js +1 -0
  46. package/dist/assets/cell-editor-D0N0SRM2.js +23 -0
  47. package/dist/assets/cell-link-CGc-QK-U.js +1 -0
  48. package/dist/assets/cells-CAMtfgeb.js +143 -0
  49. package/dist/assets/channel-BPB6RU50.js +1 -0
  50. package/dist/assets/chart-no-axes-column-C14EHesU.js +1 -0
  51. package/dist/assets/chat-components-BFOUN3AU.js +4 -0
  52. package/dist/assets/chat-panel-B_haFrpw.js +3 -0
  53. package/dist/assets/check-DqnGmZZE.js +1 -0
  54. package/dist/assets/chevron-right-Bu29x-gp.js +1 -0
  55. package/dist/assets/chunk-3AY6CYHV-DcvWgaJi.js +7 -0
  56. package/dist/assets/chunk-4BX2VUAB-CvXXOeUJ.js +1 -0
  57. package/dist/assets/chunk-55IACEB6-BD22fxS8.js +1 -0
  58. package/dist/assets/chunk-6OXUPJBA-D35vZZTe.js +2 -0
  59. package/dist/assets/chunk-7GE3RBXV-Ds_00JTJ.js +1 -0
  60. package/dist/assets/chunk-ABZYJK2D-4pv2vB7F.js +80 -0
  61. package/dist/assets/chunk-BN7GFLIU-B1gloQOG.js +1 -0
  62. package/dist/assets/chunk-CVBHYZKI-SXlNTOC2.js +1 -0
  63. package/dist/assets/chunk-CXMOBAN2-I90XR5Ox.js +54 -0
  64. package/dist/assets/chunk-EXTU4WIE-C6pnnksK.js +1 -0
  65. package/dist/assets/chunk-FMBD7UC4-CDBZqENA.js +15 -0
  66. package/dist/assets/chunk-JA3XYJ7Z-B2fvRAXr.js +11 -0
  67. package/dist/assets/chunk-JEIROHC2-CnPazemR.js +1 -0
  68. package/dist/assets/chunk-K7UQS3LO-CHpuNy1n.js +165 -0
  69. package/dist/assets/chunk-KMC2YHZD-B3DMNOXh.js +1 -0
  70. package/dist/assets/chunk-QN33PNHL-smsGJyAL.js +1 -0
  71. package/dist/assets/chunk-QYVHNE3D-BzVwaz8x.js +1 -0
  72. package/dist/assets/chunk-QZHKN3VN-tC69h88k.js +1 -0
  73. package/dist/assets/chunk-S3R3BYOJ-Oudh3LU4.js +2 -0
  74. package/dist/assets/chunk-T44TD3VJ-BZiyoqMg.js +1 -0
  75. package/dist/assets/chunk-TVAH2DTR-Cpequ-Jj.js +220 -0
  76. package/dist/assets/chunk-TZMSLE5B-DjoDt_XA.js +1 -0
  77. package/dist/assets/chunk-WFRQ32O7-CbRYDoKx.js +1 -0
  78. package/dist/assets/chunk-WFWHJNB7-CsCaphr8.js +1 -0
  79. package/dist/assets/chunk-XRWGC2XP-yBfdbqfJ.js +1 -0
  80. package/dist/assets/chunk-ZPAFE4SF-Di6HadFg.js +32 -0
  81. package/dist/assets/circle-check-CBK5T4zt.js +1 -0
  82. package/dist/assets/circle-play-CeluX0l1.js +1 -0
  83. package/dist/assets/circle-plus-gt8rkr_9.js +1 -0
  84. package/dist/assets/circle-x-65ujNh_O.js +1 -0
  85. package/dist/assets/classDiagram-KNZD7YFC-BnNfNWns.js +1 -0
  86. package/dist/assets/classDiagram-v2-RKCZMP56-Clk73TSx.js +1 -0
  87. package/dist/assets/clear-button-BVzc0Myi.js +1 -0
  88. package/dist/assets/click-outside-container-C6DEV18a.js +1 -0
  89. package/dist/assets/client-DwlQbzrX.js +2 -0
  90. package/dist/assets/clike-Del1aM7V.js +1 -0
  91. package/dist/assets/clipboard-paste-BBZtk4_E.js +1 -0
  92. package/dist/assets/clojure-DmTswoFG.js +1 -0
  93. package/dist/assets/cmake-DAoCuUDE.js +1 -0
  94. package/dist/assets/cobol-BE9N6AQ-.js +1 -0
  95. package/dist/assets/coffeescript-BRP8S7ZW.js +1 -0
  96. package/dist/assets/column-preview-CEDUFvMb.js +1 -0
  97. package/dist/assets/command-CgWi9W7A.js +1 -0
  98. package/dist/assets/command-palette-ChAq8XO9.js +1 -0
  99. package/dist/assets/common-CO0-iaVr.js +1 -0
  100. package/dist/assets/commonlisp-BS8oQjGE.js +1 -0
  101. package/dist/assets/compiler-runtime-bbSa6V1W.js +1 -0
  102. package/dist/assets/config-DOzlN8_n.js +1 -0
  103. package/dist/assets/connection-DOETP_K0.js +1 -0
  104. package/dist/assets/context-By5V2JVn.js +1 -0
  105. package/dist/assets/copy-4VJP-N0g.js +1 -0
  106. package/dist/assets/copy-icon-DFLZbTfh.js +1 -0
  107. package/dist/assets/copy-zuiMeyCQ.js +1 -0
  108. package/dist/assets/cose-bilkent-S5V4N54A-B9AnQXpu.js +1 -0
  109. package/dist/assets/createLucideIcon-DbfgBYhq.js +1 -0
  110. package/dist/assets/createReducer-CTvsuJZY.js +1 -0
  111. package/dist/assets/crystal-CRDMNjDv.js +1 -0
  112. package/dist/assets/css-us97Iddy.js +1 -0
  113. package/dist/assets/cypher-CBH6XzVc.js +1 -0
  114. package/dist/assets/cytoscape.esm-Cim8wi13.js +321 -0
  115. package/dist/assets/d-CKwQ35PI.js +1 -0
  116. package/dist/assets/dagre-5GWH7T2D-DWxayQuB.js +4 -0
  117. package/dist/assets/data-grid-overlay-editor-CAOCvAeu.js +1 -0
  118. package/dist/assets/database-zap-90vKfRkX.js +1 -0
  119. package/dist/assets/datasources-panel-BhiR0CNG.js +1 -0
  120. package/dist/assets/dependency-graph-panel-bUxgpxDE.js +4 -0
  121. package/dist/assets/diagram-N5W7TBWH-D3ZhjCs3.js +24 -0
  122. package/dist/assets/diagram-QEK2KX5R-Cb35QTLr.js +43 -0
  123. package/dist/assets/diagram-S2PKOQOG-CIOc0Udk.js +24 -0
  124. package/dist/assets/dialog-DZWinI5N.js +1 -0
  125. package/dist/assets/diff-BtPrcYlV.js +1 -0
  126. package/dist/assets/dist--8e9VGsl.js +1 -0
  127. package/dist/assets/dist-0FJpM7wG.js +1 -0
  128. package/dist/assets/dist-2rBXr-aS.js +1 -0
  129. package/dist/assets/dist-4GQeuWFQ.js +1 -0
  130. package/dist/assets/dist-B1wJF59y.js +1 -0
  131. package/dist/assets/dist-BFSjfL-I.js +2 -0
  132. package/dist/assets/dist-BGeFWVD6.js +1 -0
  133. package/dist/assets/dist-BGgBzoiO.js +1 -0
  134. package/dist/assets/dist-BN-1z8mm.js +1 -0
  135. package/dist/assets/dist-BUfDRi87.js +1 -0
  136. package/dist/assets/dist-BdkKJ3G3.js +1 -0
  137. package/dist/assets/dist-BrS3KFEl.js +1 -0
  138. package/dist/assets/dist-Bu5OuYeo.js +1 -0
  139. package/dist/assets/dist-BuEd4VGV.js +1 -0
  140. package/dist/assets/dist-Bw_ceTOd.js +1 -0
  141. package/dist/assets/dist-C6GW8SWp.js +13 -0
  142. package/dist/assets/dist-CAFoFFJF.js +1 -0
  143. package/dist/assets/dist-CIThMDB8.js +1 -0
  144. package/dist/assets/dist-CJIkd1DM.js +1 -0
  145. package/dist/assets/dist-CNZQfa8W.js +1 -0
  146. package/dist/assets/dist-COUwO6Q6.js +1 -0
  147. package/dist/assets/dist-CXTAKsYC.js +1 -0
  148. package/dist/assets/dist-CZkQ2hcE.js +1 -0
  149. package/dist/assets/dist-CbT0RiD0.js +260 -0
  150. package/dist/assets/dist-Cl7otIMy.js +3 -0
  151. package/dist/assets/dist-CmEn1nMp.js +1 -0
  152. package/dist/assets/dist-Cn3C5h2V.js +1 -0
  153. package/dist/assets/dist-CoVfzd-4.js +1 -0
  154. package/dist/assets/dist-CrvuMM2L.js +1 -0
  155. package/dist/assets/dist-CvIoRIOp.js +2 -0
  156. package/dist/assets/dist-CzaCAuEN.js +1 -0
  157. package/dist/assets/dist-D4dFcbt8.js +7 -0
  158. package/dist/assets/dist-D5QNAo1x.js +1 -0
  159. package/dist/assets/dist-D84pVwY7.js +1 -0
  160. package/dist/assets/dist-DFOg0cu_.js +1 -0
  161. package/dist/assets/dist-DOLcWI7m.js +1 -0
  162. package/dist/assets/dist-DSJ2ZFEM.js +1 -0
  163. package/dist/assets/dist-DXvMjqJ4.js +1 -0
  164. package/dist/assets/dist-DZAt7AHl.js +1 -0
  165. package/dist/assets/dist-DrAMGx2E.js +6 -0
  166. package/dist/assets/dist-Ducx4jqX.js +1 -0
  167. package/dist/assets/dist-DvTgOH5F.js +13 -0
  168. package/dist/assets/dist-ORyWvZpp.js +1 -0
  169. package/dist/assets/dist-SXxUBTmG.js +1 -0
  170. package/dist/assets/dist-USFTKxJR.js +1 -0
  171. package/dist/assets/dist-YP2XXp1Z.js +3 -0
  172. package/dist/assets/dist-_GzJQFYT.js +1 -0
  173. package/dist/assets/dist-rxj5KoqT.js +1 -0
  174. package/dist/assets/dockerfile-fDdOK3ov.js +1 -0
  175. package/dist/assets/documentation-panel-DDZFqk2y.js +1 -0
  176. package/dist/assets/download-BYnrx3yk.js +1 -0
  177. package/dist/assets/download-C81Fxkfa.js +2 -0
  178. package/dist/assets/dropdown-menu-k3cvSs56.js +1 -0
  179. package/dist/assets/dtd-BNqeF3HB.js +1 -0
  180. package/dist/assets/dylan-C2KE_ARv.js +1 -0
  181. package/dist/assets/ecl-CLD3EYom.js +1 -0
  182. package/dist/assets/edit-page-B50Sqg43.js +12 -0
  183. package/dist/assets/eiffel-C3QxGicN.js +1 -0
  184. package/dist/assets/ellipsis-mCYmaIQe.js +1 -0
  185. package/dist/assets/ellipsis-vertical-GzpLMS30.js +1 -0
  186. package/dist/assets/elm-Dc9b15sa.js +1 -0
  187. package/dist/assets/empty-state-Dfk0qult.js +1 -0
  188. package/dist/assets/en-US-Cok_jNd9.js +1 -0
  189. package/dist/assets/erDiagram-AWTI2OKA-D8ge3j7Z.js +60 -0
  190. package/dist/assets/erlang-59AUz-n0.js +1 -0
  191. package/dist/assets/error-banner-B98iBZZ2.js +1 -0
  192. package/dist/assets/error-panel-ChSJzsqJ.js +1 -0
  193. package/dist/assets/es-Bve1w9dd.js +5 -0
  194. package/dist/assets/esm-BJLcBgU0.js +1 -0
  195. package/dist/assets/esm-DXZXojh_.js +1 -0
  196. package/dist/assets/eye-off-DNEZNQI7.js +1 -0
  197. package/dist/assets/factor-B2ESt4eh.js +1 -0
  198. package/dist/assets/factor-DIE032fN.js +1 -0
  199. package/dist/assets/field-D6TVJZGU.js +1 -0
  200. package/dist/assets/file-DU2hKpP7.js +1 -0
  201. package/dist/assets/file-explorer-panel-D1u7ZSov.js +1 -0
  202. package/dist/assets/file-plus-2-C6zNvKzj.js +1 -0
  203. package/dist/assets/file-text-KeEJTZsk.js +1 -0
  204. package/dist/assets/file-video-camera-Bt4f7oOT.js +1 -0
  205. package/dist/assets/floating-outline-DJ1FXuVN.js +1 -0
  206. package/dist/assets/flowDiagram-PVAE7QVJ-C8c0HQqL.js +162 -0
  207. package/dist/assets/focus-Bg0Cm8D6.js +1 -0
  208. package/dist/assets/form-CAATHPdC.js +2 -0
  209. package/dist/assets/form-x7Qa7Rrh.js +1 -0
  210. package/dist/assets/formats-Dmio8FVx.js +1 -0
  211. package/dist/assets/forth-DjCo7dIs.js +1 -0
  212. package/dist/assets/fortran-CZmOENAN.js +1 -0
  213. package/dist/assets/ganttDiagram-OWAHRB6G-BYhkRcPP.js +267 -0
  214. package/dist/assets/gas-SoBzL_Tr.js +1 -0
  215. package/dist/assets/gherkin-DLggx8YE.js +1 -0
  216. package/dist/assets/gitGraph-ZV4HHKMB-DxnUFMI1.js +1 -0
  217. package/dist/assets/gitGraphDiagram-NY62KEGX-CCC74nFs.js +65 -0
  218. package/dist/assets/glide-data-editor-BiQxT1mz.js +132 -0
  219. package/dist/assets/globals-DlvGFwxH.js +1 -0
  220. package/dist/assets/globe-DW6c4--m.js +1 -0
  221. package/dist/assets/groovy-9IQPpZra.js +1 -0
  222. package/dist/assets/haskell-CgXYOX9c.js +1 -0
  223. package/dist/assets/haxe-aSjlIDiq.js +1 -0
  224. package/dist/assets/home-page-Ow0eLqO9.js +4 -0
  225. package/dist/assets/icons-DVWpV4I_.js +1 -0
  226. package/dist/assets/idl-BADcUAqn.js +1 -0
  227. package/dist/assets/image-DVFLPjWH.js +1 -0
  228. package/dist/assets/index-CYOH-TAt.css +2 -0
  229. package/dist/assets/index-DUlb-6KU.js +44 -0
  230. package/dist/assets/info-63CPKGFF-CGz90yJ6.js +1 -0
  231. package/dist/assets/infoDiagram-STP46IZ2-e1r2QvWV.js +2 -0
  232. package/dist/assets/input-lkQFhlrZ.js +1 -0
  233. package/dist/assets/isValid-BhOWABEg.js +1 -0
  234. package/dist/assets/javascript-C7hPrwf3.js +1 -0
  235. package/dist/assets/jotai-C7U7c6dd.js +1 -0
  236. package/dist/assets/journeyDiagram-BIP6EPQ6-l_zOcPgv.js +139 -0
  237. package/dist/assets/kanban-definition-6OIFK2YF-DCaGC54T.js +89 -0
  238. package/dist/assets/katex-CmcM9wns.js +1 -0
  239. package/dist/assets/kbd-BEZA_QXE.js +1 -0
  240. package/dist/assets/key-CaC9xuXQ.js +1 -0
  241. package/dist/assets/kiosk-mode-DIAVlB9d.js +1 -0
  242. package/dist/assets/label-BnC8-64i.js +1 -0
  243. package/dist/assets/layout-BITT6czF.js +4 -0
  244. package/dist/assets/lazy-NLnLn6Pi.js +2 -0
  245. package/dist/assets/line-BCUKzinT.js +1 -0
  246. package/dist/assets/linear-B0yoSdze.js +1 -0
  247. package/dist/assets/link-CWX-dQ90.js +1 -0
  248. package/dist/assets/links-Cd3tV5IK.js +1 -0
  249. package/dist/assets/links-Lztpt8X-.js +1 -0
  250. package/dist/assets/logs-panel-D8uwhqvR.js +1 -0
  251. package/dist/assets/loro_wasm_bg-C1LA9JRY.js +1 -0
  252. package/dist/assets/maps-B9m998ly.js +1 -0
  253. package/dist/assets/menu-items-CKlDAcIy.js +1 -0
  254. package/dist/assets/mermaid-CEnPf8cP.js +1 -0
  255. package/dist/assets/mermaid-parser.core-1z0w_R7X.js +4 -0
  256. package/dist/assets/mermaid.core-B_mKPVgh.js +11 -0
  257. package/dist/assets/mermaid.core-P1tMYu0J.js +1 -0
  258. package/dist/assets/mhchem-BxE_4AeM.js +1 -0
  259. package/dist/assets/mindmap-definition-Q6HEUPPD-BOzcEjkC.js +68 -0
  260. package/dist/assets/mllike-CvMT7BHA.js +1 -0
  261. package/dist/assets/mode-BAOMKXFj.js +1 -0
  262. package/dist/assets/multi-icon-DgSEPrIf.js +1 -0
  263. package/dist/assets/multi-map-CMSc8wqP.js +1 -0
  264. package/dist/assets/name-cell-input-kfZkR5qv.js +1 -0
  265. package/dist/assets/nsis-Bu9c7jg8.js +1 -0
  266. package/dist/assets/nsis-z1VCt9tx.js +1 -0
  267. package/dist/assets/number-overlay-editor-4hcbz-Xy.js +9 -0
  268. package/dist/assets/numbers-BrVMv_xq.js +1 -0
  269. package/dist/assets/ordinal-B3kMb9G4.js +1 -0
  270. package/dist/assets/outline-panel-PgZ3OoWh.js +1 -0
  271. package/dist/assets/packages-panel-w4yEg0ed.js +1 -0
  272. package/dist/assets/packet-HUATNLJX-CG6ZWPeY.js +1 -0
  273. package/dist/assets/panels-Cs4PsVT4.js +1 -0
  274. package/dist/assets/pie-WTHONI2E-DySJN2Hx.js +1 -0
  275. package/dist/assets/pieDiagram-ADFJNKIX-Cyw5_yhH.js +30 -0
  276. package/dist/assets/plug-DZNnmiy1.js +1 -0
  277. package/dist/assets/plus-VNKMcdhl.js +1 -0
  278. package/dist/assets/popover-ieUH9gue.js +1 -0
  279. package/dist/assets/precisionRound-JPbfj2M2.js +1 -0
  280. package/dist/assets/pug-CaaLw7eE.js +1 -0
  281. package/dist/assets/pug-i6atkyz7.js +1 -0
  282. package/dist/assets/purify.es-BNe8OHFA.js +2 -0
  283. package/dist/assets/python-01S0WAiq.js +1 -0
  284. package/dist/assets/quadrantDiagram-LMRXKWRM-r1syOKnp.js +7 -0
  285. package/dist/assets/radar-NJJJXTRR-CgK-l6zu.js +1 -0
  286. package/dist/assets/react-dom-BjyRIiB0.js +1 -0
  287. package/dist/assets/react-plotly-z6K2kWRZ.js +4030 -0
  288. package/dist/assets/react-vega-BQZ6J9sh.js +190 -0
  289. package/dist/assets/react-vega-C-rZsP2h.js +1 -0
  290. package/dist/assets/readonly-python-code-B1LohqR_.js +1 -0
  291. package/dist/assets/refresh-ccw-Dmg0YI4-.js +1 -0
  292. package/dist/assets/refresh-cw-z53rVhjq.js +1 -0
  293. package/dist/assets/renderShortcut-Cp1zXREV.js +1 -0
  294. package/dist/assets/request-registry-C9ZqbErC.js +1 -0
  295. package/dist/assets/requests-CftYh9v2.js +1 -0
  296. package/dist/assets/requests-hYqt4rnB.js +1 -0
  297. package/dist/assets/requirementDiagram-4UW4RH46-TZbgexkl.js +64 -0
  298. package/dist/assets/run-page-DQq6Ubq2.js +1 -0
  299. package/dist/assets/runs-DJSbp-nt.js +1 -0
  300. package/dist/assets/sankeyDiagram-GR3RE2ED-DOAaeXih.js +10 -0
  301. package/dist/assets/save-Dxp7SN8k.js +1 -0
  302. package/dist/assets/save-worker-1SpfMMps.js +58 -0
  303. package/dist/assets/scratchpad-panel-BHyTMkB-.js +1 -0
  304. package/dist/assets/secrets-panel-aLSYHai4.js +1 -0
  305. package/dist/assets/select-E33nSIDn.js +1 -0
  306. package/dist/assets/send-DjnZs47z.js +1 -0
  307. package/dist/assets/sequenceDiagram-C3RYC4MD-DR5X4rBt.js +145 -0
  308. package/dist/assets/settings-Dt7V2Blo.js +1 -0
  309. package/dist/assets/share-Cyx6Ke3B.js +1 -0
  310. package/dist/assets/shim-DuR5ZJNr.js +1 -0
  311. package/dist/assets/slides-component-ZimwIaSa.js +1 -0
  312. package/dist/assets/snippets-panel-q84abuax.js +1 -0
  313. package/dist/assets/spec-D64rpvwX.js +1 -0
  314. package/dist/assets/spinner-CM1AwwT-.js +1 -0
  315. package/dist/assets/square-C2sucLEB.js +1 -0
  316. package/dist/assets/square-function-C7Ij9TAd.js +1 -0
  317. package/dist/assets/square-terminal-DcEZ9Ivs.js +1 -0
  318. package/dist/assets/src-FiBAYfGy.js +1 -0
  319. package/dist/assets/state-CtYWaPuR.js +1 -0
  320. package/dist/assets/state-DLUXyYyB.js +1 -0
  321. package/dist/assets/state-dWjslxDZ.js +1 -0
  322. package/dist/assets/stateDiagram-KXAO66HF-DvUJNAH4.js +1 -0
  323. package/dist/assets/stateDiagram-v2-UMBNRL4Z-BBB1Z0py.js +1 -0
  324. package/dist/assets/step-DgNh0Im1.js +1 -0
  325. package/dist/assets/strings-jhyl_xMu.js +2 -0
  326. package/dist/assets/switch-DBfU9QHL.js +1 -0
  327. package/dist/assets/table-CTK995oK.js +1 -0
  328. package/dist/assets/table-Ny605LgF.js +1 -0
  329. package/dist/assets/tabs-DvBunSCS.js +1 -0
  330. package/dist/assets/terminal-BYIts0Wd.js +10 -0
  331. package/dist/assets/text-search-BtXNkEHU.js +1 -0
  332. package/dist/assets/textarea-faXBMy_c.js +1 -0
  333. package/dist/assets/time-B11NhaT8.js +1 -0
  334. package/dist/assets/timeline-definition-XQNQX7LJ-Dmpxcd08.js +61 -0
  335. package/dist/assets/toDate-CbcWqY6f.js +1 -0
  336. package/dist/assets/toggle-6a-IWcUo.js +1 -0
  337. package/dist/assets/tooltip-CyyA9NKX.js +61 -0
  338. package/dist/assets/tooltip-QlUG_0sW.js +1 -0
  339. package/dist/assets/tracing-panel-BNnuwoJ6.js +2 -0
  340. package/dist/assets/tracing-wtfV19jS.js +1 -0
  341. package/dist/assets/trash-2-BsccpX3E.js +1 -0
  342. package/dist/assets/trash-C8_hvhi2.js +1 -0
  343. package/dist/assets/tree-ThjH84Vh.js +11 -0
  344. package/dist/assets/treemap-75Q7IDZK-Chid_ihL.js +1 -0
  345. package/dist/assets/triangle-alert-DoSv9yQr.js +1 -0
  346. package/dist/assets/type-CnQq0uaD.js +1 -0
  347. package/dist/assets/types-BfF9hgo8.js +1 -0
  348. package/dist/assets/types-CKcqkReK.js +17 -0
  349. package/dist/assets/use-toast-BBrPeu2N.js +1 -0
  350. package/dist/assets/useAddCell-C5hu4Wun.js +1 -0
  351. package/dist/assets/useAsyncData-BIQYiPhO.js +1 -0
  352. package/dist/assets/useBoolean-Do2iSPXV.js +1 -0
  353. package/dist/assets/useCellActionButton-l2j8uD5l.js +1 -0
  354. package/dist/assets/useDateFormatter-DHQNk42q.js +1 -0
  355. package/dist/assets/useDebounce-Dc646H0x.js +1 -0
  356. package/dist/assets/useDeepCompareMemoize-DVzR9zu0.js +1 -0
  357. package/dist/assets/useDeleteCell-yV4YK-xy.js +1 -0
  358. package/dist/assets/useEvent-mw3fc-le.js +1 -0
  359. package/dist/assets/useEventListener-DVwjxFkt.js +1 -0
  360. package/dist/assets/useHotkey-VwOksnmL.js +1 -0
  361. package/dist/assets/useIframeCapabilities-CRfeZulz.js +1 -0
  362. package/dist/assets/useInstallPackage-CX-LUKF-.js +1 -0
  363. package/dist/assets/useInterval-DcwlGTe6.js +1 -0
  364. package/dist/assets/useLifecycle-DiLWmtpP.js +1 -0
  365. package/dist/assets/useNonce-CElEIK4R.js +1 -0
  366. package/dist/assets/useNotebookActions-DLx3Fygp.js +1 -0
  367. package/dist/assets/useNumberFormatter-BFHkt56k.js +1 -0
  368. package/dist/assets/usePress-CqxmpITG.js +7 -0
  369. package/dist/assets/useRunCells-DSf9mKXo.js +1 -0
  370. package/dist/assets/useSplitCell-CPKZi1bG.js +1 -0
  371. package/dist/assets/useTheme-Dsb69ewj.js +1 -0
  372. package/dist/assets/utilities.esm-BUZA9ZNB.js +3 -0
  373. package/dist/assets/utils-BPcfRUDE.js +1 -0
  374. package/dist/assets/variable-panel-DyYTOTCM.js +1 -0
  375. package/dist/assets/vega-component-vMEXqPyr.js +1 -0
  376. package/dist/assets/vega-loader.browser-BJKnSXO3.js +6 -0
  377. package/dist/assets/worker-DFkS7cAN.js +101 -0
  378. package/dist/assets/workflow-CgyFQnIM.js +1 -0
  379. package/dist/assets/write-secret-modal-zRnaYcIL.js +1 -0
  380. package/dist/assets/ws-BNjYz4sN.js +22 -0
  381. package/dist/assets/xychartDiagram-6GGTOJPD-CC5m3Qr2.js +7 -0
  382. package/dist/assets/youtube-BEn_4a_V.js +1 -0
  383. package/dist/index.html +204 -204
  384. package/package.json +13 -13
  385. package/src/__mocks__/notebook.ts +1 -1
  386. package/src/components/app-config/ai-config.tsx +1 -0
  387. package/src/components/data-table/charts/charts.tsx +49 -4
  388. package/src/components/data-table/columns.tsx +15 -0
  389. package/src/components/data-table/download-actions.tsx +4 -1
  390. package/src/components/editor/Output.tsx +37 -7
  391. package/src/components/editor/chrome/panels/write-secret-modal.tsx +1 -1
  392. package/src/components/editor/chrome/wrapper/app-chrome.tsx +9 -18
  393. package/src/components/editor/file-tree/file-viewer.tsx +35 -6
  394. package/src/components/editor/output/MarimoErrorOutput.tsx +42 -17
  395. package/src/components/editor/output/__tests__/ansi-reduce.test.ts +560 -0
  396. package/src/components/editor/output/ansi-reduce.ts +392 -0
  397. package/src/components/pages/run-page.tsx +1 -6
  398. package/src/components/ui/alert.tsx +2 -0
  399. package/src/components/ui/query-param-preserving-link.tsx +3 -0
  400. package/src/core/cells/__tests__/cells.test.ts +23 -16
  401. package/src/core/cells/__tests__/collapseConsoleOutputs.test.ts +398 -1
  402. package/src/core/cells/cell.ts +6 -7
  403. package/src/core/cells/collapseConsoleOutputs.tsx +35 -45
  404. package/src/core/export/hooks.ts +4 -3
  405. package/src/core/static/__tests__/virtual-file-tracker.test.ts +42 -0
  406. package/src/core/static/virtual-file-tracker.ts +1 -1
  407. package/src/plugins/impl/DataTablePlugin.tsx +2 -0
  408. package/src/plugins/impl/FileBrowserPlugin.tsx +30 -5
  409. package/src/utils/__tests__/json-parser.test.ts +50 -9
  410. package/src/utils/json/json-parser.ts +22 -2
  411. package/dist/assets/CellStatus-CJ5BnF-2.js +0 -1
  412. package/dist/assets/Combination-BjaZc6gK.js +0 -41
  413. package/dist/assets/ConnectedDataExplorerComponent-BiJPD-um.js +0 -1
  414. package/dist/assets/ConsoleOutput-BJP_UIwR.js +0 -4
  415. package/dist/assets/ErrorBoundary-_uEOjNWh.js +0 -1
  416. package/dist/assets/ImageComparisonComponent-WABs9NdN.js +0 -1
  417. package/dist/assets/ImperativeModal-C4fZHLKz.js +0 -1
  418. package/dist/assets/Inputs-237ZzRAb.js +0 -1
  419. package/dist/assets/LazyAnyLanguageCodeMirror-BovGLUi6.js +0 -2
  420. package/dist/assets/MarimoErrorOutput-BATnwNYX.js +0 -9
  421. package/dist/assets/Output-DWmT-7NV.js +0 -142
  422. package/dist/assets/RenderHTML-DTLkV9Uh.js +0 -1
  423. package/dist/assets/SSRProvider-B8x7qo1c.js +0 -1
  424. package/dist/assets/TinyCode-GLDQZf34.js +0 -1
  425. package/dist/assets/VisuallyHidden-DqOWapbP.js +0 -1
  426. package/dist/assets/__vite-browser-external-BJyYPVNm.js +0 -1
  427. package/dist/assets/__vite-browser-external-D_SJt3Xu.js +0 -1
  428. package/dist/assets/activity-DdWPIGQX.js +0 -1
  429. package/dist/assets/add-cell-with-ai-Bf3hYYIu.js +0 -77
  430. package/dist/assets/add-database-form-D9ltJYvM.js +0 -111
  431. package/dist/assets/add-missing-import-Bc1Nj8aC.js +0 -1
  432. package/dist/assets/agent-panel-CPGu8Erd.js +0 -287
  433. package/dist/assets/ai-model-dropdown-CvhbTHha.js +0 -2
  434. package/dist/assets/alert-BqjCH_7t.js +0 -1
  435. package/dist/assets/alert-dialog-8EwWlboa.js +0 -11
  436. package/dist/assets/any-language-editor-I1TeVFID.js +0 -3
  437. package/dist/assets/api-YJHlT7KM.js +0 -1
  438. package/dist/assets/apl-C8IztUHV.js +0 -1
  439. package/dist/assets/app-config-button-B-Faif0q.js +0 -1
  440. package/dist/assets/arc-tAqWLv-B.js +0 -1
  441. package/dist/assets/architecture-O4VJ6CD3-BA-L7b4v.js +0 -1
  442. package/dist/assets/architectureDiagram-W76B3OCA-5dGU5TQs.js +0 -36
  443. package/dist/assets/arrow-left-C_-paiHG.js +0 -1
  444. package/dist/assets/asciiarmor-DYFmjXYU.js +0 -1
  445. package/dist/assets/asn1-Cfc8H1Ev.js +0 -1
  446. package/dist/assets/badge-Jfhpc30N.js +0 -1
  447. package/dist/assets/between-horizontal-start-CC0exyFi.js +0 -1
  448. package/dist/assets/blockDiagram-QIGZ2CNN-CxEhKvDB.js +0 -122
  449. package/dist/assets/brainfuck-JvCPN9qf.js +0 -1
  450. package/dist/assets/bundle.esm-BEDtDq85.js +0 -1
  451. package/dist/assets/button-ZC2axIBq.js +0 -1
  452. package/dist/assets/c4Diagram-FPNF74CW-BV6AZZEM.js +0 -10
  453. package/dist/assets/cache-panel-ClGFjnuH.js +0 -1
  454. package/dist/assets/capabilities-srilPYuF.js +0 -1
  455. package/dist/assets/cell-actions-DDza1yZz.js +0 -1
  456. package/dist/assets/cell-editor-4oTwitxm.js +0 -23
  457. package/dist/assets/cell-link-D75IV6D1.js +0 -1
  458. package/dist/assets/cells-A69p56PE.js +0 -141
  459. package/dist/assets/channel-CYaFLAI3.js +0 -1
  460. package/dist/assets/chart-no-axes-column-DYZiSI6e.js +0 -1
  461. package/dist/assets/chat-components-C2ryFVKe.js +0 -4
  462. package/dist/assets/chat-panel-CjjOlUPZ.js +0 -3
  463. package/dist/assets/check-CuBLr6Cm.js +0 -1
  464. package/dist/assets/chevron-right-BV0VfNbL.js +0 -1
  465. package/dist/assets/chunk-3AY6CYHV-CGvUwVix.js +0 -7
  466. package/dist/assets/chunk-4BX2VUAB-CEk5Yddb.js +0 -1
  467. package/dist/assets/chunk-55IACEB6-DkQ-sTvr.js +0 -1
  468. package/dist/assets/chunk-6OXUPJBA-C8TM1_vW.js +0 -2
  469. package/dist/assets/chunk-7GE3RBXV-H12zLBKj.js +0 -1
  470. package/dist/assets/chunk-ABZYJK2D-Cm5Mq_1V.js +0 -80
  471. package/dist/assets/chunk-BN7GFLIU-B2OO_dsW.js +0 -1
  472. package/dist/assets/chunk-CVBHYZKI-CMFQpulc.js +0 -1
  473. package/dist/assets/chunk-CXMOBAN2-7ndVTSz1.js +0 -54
  474. package/dist/assets/chunk-EXTU4WIE-DUVoiM8z.js +0 -1
  475. package/dist/assets/chunk-FMBD7UC4-CmHQ0YbI.js +0 -15
  476. package/dist/assets/chunk-JA3XYJ7Z-D3VjadO-.js +0 -11
  477. package/dist/assets/chunk-JEIROHC2-DJ3tpwJA.js +0 -1
  478. package/dist/assets/chunk-K7UQS3LO-Dv8pkZsr.js +0 -165
  479. package/dist/assets/chunk-KMC2YHZD-aZ_clHHw.js +0 -1
  480. package/dist/assets/chunk-QN33PNHL-kpDAjAtU.js +0 -1
  481. package/dist/assets/chunk-QYVHNE3D-D8NpnEYd.js +0 -1
  482. package/dist/assets/chunk-QZHKN3VN-B7PBWDfB.js +0 -1
  483. package/dist/assets/chunk-S3R3BYOJ-BW8g0Zog.js +0 -2
  484. package/dist/assets/chunk-T44TD3VJ-ob7Tm16D.js +0 -1
  485. package/dist/assets/chunk-TVAH2DTR-CG4Xr_vq.js +0 -220
  486. package/dist/assets/chunk-TZMSLE5B-B4Mtcg_D.js +0 -1
  487. package/dist/assets/chunk-WFRQ32O7-DaR0-qal.js +0 -1
  488. package/dist/assets/chunk-WFWHJNB7-BdOad_I6.js +0 -1
  489. package/dist/assets/chunk-XRWGC2XP-bK3mWGs8.js +0 -1
  490. package/dist/assets/chunk-ZPAFE4SF--QJ9WeVC.js +0 -36
  491. package/dist/assets/circle-check-BjYuTjAK.js +0 -1
  492. package/dist/assets/circle-play-BwTqLQdh.js +0 -1
  493. package/dist/assets/circle-plus-a4tnn8hI.js +0 -1
  494. package/dist/assets/circle-x-Dm9uA-wT.js +0 -1
  495. package/dist/assets/classDiagram-KNZD7YFC-Dd-A0E6y.js +0 -1
  496. package/dist/assets/classDiagram-v2-RKCZMP56-z-Bnr2ps.js +0 -1
  497. package/dist/assets/clear-button-B9Kao2Ra.js +0 -1
  498. package/dist/assets/click-outside-container-D--uGE-1.js +0 -1
  499. package/dist/assets/client-CtbBEHVn.js +0 -2
  500. package/dist/assets/clike-BZaAHvVH.js +0 -1
  501. package/dist/assets/clipboard-paste-BLsIEx19.js +0 -1
  502. package/dist/assets/clojure-BSAKKQkc.js +0 -1
  503. package/dist/assets/cmake-BseABbbj.js +0 -1
  504. package/dist/assets/cobol-BGW4k037.js +0 -1
  505. package/dist/assets/coffeescript-C208hoAn.js +0 -1
  506. package/dist/assets/column-preview-WPlkULp9.js +0 -1
  507. package/dist/assets/command-Dlk4i3l7.js +0 -1
  508. package/dist/assets/command-palette-4W9o2iPI.js +0 -1
  509. package/dist/assets/common-CoBkdbNK.js +0 -1
  510. package/dist/assets/commonlisp-BIQQ1lKt.js +0 -1
  511. package/dist/assets/compiler-runtime-Cr9loedd.js +0 -1
  512. package/dist/assets/config-C6qInAhC.js +0 -1
  513. package/dist/assets/connection-Bs4SQ_vu.js +0 -1
  514. package/dist/assets/context-CcLKJeA2.js +0 -1
  515. package/dist/assets/copy-Dy_tLkL8.js +0 -1
  516. package/dist/assets/copy-LsxoSTiV.js +0 -1
  517. package/dist/assets/copy-icon-CE7wmMnS.js +0 -1
  518. package/dist/assets/cose-bilkent-S5V4N54A--pmwFpj9.js +0 -1
  519. package/dist/assets/createLucideIcon-CNVopWor.js +0 -6
  520. package/dist/assets/createReducer-CeLhipaI.js +0 -1
  521. package/dist/assets/crystal-DCEDH3ZU.js +0 -1
  522. package/dist/assets/css-Dibnw1Cg.js +0 -1
  523. package/dist/assets/cypher-DJc3_Mb6.js +0 -1
  524. package/dist/assets/cytoscape.esm-iv-4upz4.js +0 -325
  525. package/dist/assets/d-512gkUMN.js +0 -1
  526. package/dist/assets/dagre-5GWH7T2D-CgiaNo9T.js +0 -4
  527. package/dist/assets/data-grid-overlay-editor-x2IZajht.js +0 -1
  528. package/dist/assets/database-zap-CCB1mGaP.js +0 -1
  529. package/dist/assets/datasources-panel-CQJ_xth2.js +0 -1
  530. package/dist/assets/dependency-graph-panel-CoeP9rzE.js +0 -4
  531. package/dist/assets/diagram-N5W7TBWH-DTy9MJII.js +0 -24
  532. package/dist/assets/diagram-QEK2KX5R-DjOP6gtV.js +0 -43
  533. package/dist/assets/diagram-S2PKOQOG-C_ZX_NyS.js +0 -24
  534. package/dist/assets/dialog-BfhgTWm1.js +0 -1
  535. package/dist/assets/diff-BSd0dkd6.js +0 -1
  536. package/dist/assets/dist--UfXdLiW.js +0 -1
  537. package/dist/assets/dist-8_YHxBVW.js +0 -1
  538. package/dist/assets/dist-B0B_Xnwd.js +0 -1
  539. package/dist/assets/dist-BCDo28Nu.js +0 -1
  540. package/dist/assets/dist-BXsTBu5U.js +0 -1
  541. package/dist/assets/dist-BcgNLefj.js +0 -1
  542. package/dist/assets/dist-BcppZLnk.js +0 -1
  543. package/dist/assets/dist-BjGT2Oog.js +0 -1
  544. package/dist/assets/dist-BkzQhIvQ.js +0 -1
  545. package/dist/assets/dist-C14Sk-Bd.js +0 -6
  546. package/dist/assets/dist-C7a7PPDV.js +0 -1
  547. package/dist/assets/dist-C9Pig92i.js +0 -1
  548. package/dist/assets/dist-CB99JjHy.js +0 -1
  549. package/dist/assets/dist-CGXP1wxK.js +0 -1
  550. package/dist/assets/dist-CMHCymvx.js +0 -7
  551. package/dist/assets/dist-CPUmJw_F.js +0 -1
  552. package/dist/assets/dist-CXL8T4lt.js +0 -1
  553. package/dist/assets/dist-CZtlXGHc.js +0 -3
  554. package/dist/assets/dist-CbvGwhr0.js +0 -2
  555. package/dist/assets/dist-Cc4LX4VW.js +0 -1
  556. package/dist/assets/dist-Cf7ieNCu.js +0 -1
  557. package/dist/assets/dist-ChBFqf3d.js +0 -1
  558. package/dist/assets/dist-ColdUi54.js +0 -1
  559. package/dist/assets/dist-Cq5s066k.js +0 -1
  560. package/dist/assets/dist-CtrBG6dK.js +0 -1
  561. package/dist/assets/dist-D-JTXier.js +0 -1
  562. package/dist/assets/dist-DE0uRLJL.js +0 -1
  563. package/dist/assets/dist-DJV2CjUA.js +0 -1
  564. package/dist/assets/dist-DM2w8f7r.js +0 -1
  565. package/dist/assets/dist-DMn_q1Eh.js +0 -1
  566. package/dist/assets/dist-DPVK6wJ-.js +0 -1
  567. package/dist/assets/dist-DRTi9ht4.js +0 -1
  568. package/dist/assets/dist-DTIHGyk9.js +0 -1
  569. package/dist/assets/dist-DcDuMWp5.js +0 -13
  570. package/dist/assets/dist-DlH6tuAC.js +0 -1
  571. package/dist/assets/dist-Dp1bFraz.js +0 -1
  572. package/dist/assets/dist-DuCOj_GR.js +0 -1
  573. package/dist/assets/dist-GE2AwHvG.js +0 -1
  574. package/dist/assets/dist-GHMC1DDU.js +0 -1
  575. package/dist/assets/dist-MHIqsPCF.js +0 -13
  576. package/dist/assets/dist-Oad1venD.js +0 -2
  577. package/dist/assets/dist-__vbIzp1.js +0 -260
  578. package/dist/assets/dist-j2I9I0a7.js +0 -1
  579. package/dist/assets/dist-nhBdVy6b.js +0 -1
  580. package/dist/assets/dist-o-4-WxUj.js +0 -1
  581. package/dist/assets/dist-ta4iJSan.js +0 -1
  582. package/dist/assets/dist-vBG1bGij.js +0 -3
  583. package/dist/assets/dockerfile-BUQq43xK.js +0 -1
  584. package/dist/assets/documentation-panel-D-JV0cpO.js +0 -1
  585. package/dist/assets/download-ByFIcaoi.js +0 -2
  586. package/dist/assets/download-ptuQ0M1w.js +0 -1
  587. package/dist/assets/dropdown-menu-uN_XMhZm.js +0 -1
  588. package/dist/assets/dtd-CfC4g15q.js +0 -1
  589. package/dist/assets/dylan-CCWaDx6W.js +0 -1
  590. package/dist/assets/ecl-48jJnqW6.js +0 -1
  591. package/dist/assets/edit-page-2tBABnJo.js +0 -12
  592. package/dist/assets/eiffel-KeAY_tfp.js +0 -1
  593. package/dist/assets/ellipsis-BgenFu2j.js +0 -1
  594. package/dist/assets/ellipsis-vertical-D4kjq0HQ.js +0 -1
  595. package/dist/assets/elm-6ttzFDzl.js +0 -1
  596. package/dist/assets/empty-state-DTECRwMh.js +0 -1
  597. package/dist/assets/en-US-D2gH55FJ.js +0 -1
  598. package/dist/assets/erDiagram-AWTI2OKA-BhuG3Zob.js +0 -60
  599. package/dist/assets/erlang-B81tzdld.js +0 -1
  600. package/dist/assets/error-banner-DoSAS3iD.js +0 -1
  601. package/dist/assets/error-panel-DV7lr4JL.js +0 -1
  602. package/dist/assets/es-vLBD1nBl.js +0 -5
  603. package/dist/assets/esm-B3nKz9z-.js +0 -1
  604. package/dist/assets/esm-DtCFmQ1n.js +0 -1
  605. package/dist/assets/eye-off-_Bp7Ir5E.js +0 -1
  606. package/dist/assets/factor-CsqObdFm.js +0 -1
  607. package/dist/assets/factor-DhbRkYZ5.js +0 -1
  608. package/dist/assets/field-CaHPDBhq.js +0 -1
  609. package/dist/assets/file-Cz8xVTWu.js +0 -1
  610. package/dist/assets/file-explorer-panel-CPQDFtpj.js +0 -1
  611. package/dist/assets/file-plus-2-SQa07cq2.js +0 -1
  612. package/dist/assets/file-text-CFgIi1A4.js +0 -1
  613. package/dist/assets/file-video-camera-DJUITpag.js +0 -1
  614. package/dist/assets/floating-outline-1_-JOoBX.js +0 -1
  615. package/dist/assets/flowDiagram-PVAE7QVJ-ChyCNRpp.js +0 -162
  616. package/dist/assets/focus-BaSDCTOl.js +0 -1
  617. package/dist/assets/form-CaSJmn0I.js +0 -1
  618. package/dist/assets/form-DaO98mWt.js +0 -2
  619. package/dist/assets/formats-BN93kMCb.js +0 -1
  620. package/dist/assets/forth-CQqhzzpN.js +0 -1
  621. package/dist/assets/fortran-CDldiiXx.js +0 -1
  622. package/dist/assets/ganttDiagram-OWAHRB6G-DvugH8E5.js +0 -267
  623. package/dist/assets/gas-Db3M7m4F.js +0 -1
  624. package/dist/assets/gherkin-CdoWQypz.js +0 -1
  625. package/dist/assets/gitGraph-ZV4HHKMB-ZSfPRi38.js +0 -1
  626. package/dist/assets/gitGraphDiagram-NY62KEGX--4NNxjip.js +0 -65
  627. package/dist/assets/glide-data-editor-Bkx-E5b2.js +0 -132
  628. package/dist/assets/globals-Dp5TPAWC.js +0 -1
  629. package/dist/assets/globe-mi3m-i9B.js +0 -1
  630. package/dist/assets/groovy-DOqC0xtQ.js +0 -1
  631. package/dist/assets/haskell-CUXnT_9K.js +0 -1
  632. package/dist/assets/haxe-C2WjsaV6.js +0 -1
  633. package/dist/assets/home-page-BhB8MZrH.js +0 -4
  634. package/dist/assets/icons-DaFojEUL.js +0 -1
  635. package/dist/assets/idl-pJdLdBWn.js +0 -1
  636. package/dist/assets/image-DW_EcY4T.js +0 -1
  637. package/dist/assets/index-BXqkmYCF.js +0 -44
  638. package/dist/assets/index-BmcO-QYJ.css +0 -2
  639. package/dist/assets/info-63CPKGFF-Bd3YpYFu.js +0 -1
  640. package/dist/assets/infoDiagram-STP46IZ2-2g5NTHp_.js +0 -2
  641. package/dist/assets/input-BNb8K99m.js +0 -1
  642. package/dist/assets/isValid-BJSfXqfd.js +0 -1
  643. package/dist/assets/javascript-DE5LhuW5.js +0 -1
  644. package/dist/assets/jinja2-BIbcpWyF.js +0 -1
  645. package/dist/assets/jinja2-DZTBdZHU.js +0 -1
  646. package/dist/assets/jotai-BTnrNcC1.js +0 -1
  647. package/dist/assets/journeyDiagram-BIP6EPQ6-DjdU63y1.js +0 -139
  648. package/dist/assets/kanban-definition-6OIFK2YF-DeCdxrC0.js +0 -89
  649. package/dist/assets/katex-CMd6pbfG.js +0 -1
  650. package/dist/assets/kbd-DbVT085u.js +0 -1
  651. package/dist/assets/key-Cx1qY8eM.js +0 -1
  652. package/dist/assets/kiosk-mode-Cw6z28XS.js +0 -1
  653. package/dist/assets/label-Dcu3RhQ4.js +0 -1
  654. package/dist/assets/layout-sf56kneH.js +0 -4
  655. package/dist/assets/lazy-oPCv0nK8.js +0 -2
  656. package/dist/assets/line-DorFmRYv.js +0 -1
  657. package/dist/assets/linear-CPlUB2Oz.js +0 -1
  658. package/dist/assets/link-BFkQTs0I.js +0 -1
  659. package/dist/assets/links-CMl0qG9J.js +0 -1
  660. package/dist/assets/links-uXibXl2j.js +0 -1
  661. package/dist/assets/logs-panel-DsJnG9V6.js +0 -1
  662. package/dist/assets/loro_wasm_bg-cCDMQ_Gu.js +0 -1
  663. package/dist/assets/maps-B1z3jt-a.js +0 -1
  664. package/dist/assets/menu-items-DwOFR2Zi.js +0 -1
  665. package/dist/assets/mermaid-D_qr_rHI.js +0 -1
  666. package/dist/assets/mermaid-parser.core-NXSENIcQ.js +0 -4
  667. package/dist/assets/mermaid.core-Cge03puN.js +0 -1
  668. package/dist/assets/mermaid.core-mcEAuawO.js +0 -11
  669. package/dist/assets/mhchem-DNnsXr4C.js +0 -1
  670. package/dist/assets/mindmap-definition-Q6HEUPPD-Da_059Wn.js +0 -68
  671. package/dist/assets/mllike-kwEb_VdR.js +0 -1
  672. package/dist/assets/mode-Bq6LjPC-.js +0 -1
  673. package/dist/assets/multi-icon-Dgzg2G90.js +0 -1
  674. package/dist/assets/multi-map-D9JaQ_m6.js +0 -1
  675. package/dist/assets/name-cell-input-DND1MD7b.js +0 -1
  676. package/dist/assets/nsis-B-5miwZp.js +0 -1
  677. package/dist/assets/nsis-znELVT3h.js +0 -1
  678. package/dist/assets/number-overlay-editor-7APxtkWt.js +0 -9
  679. package/dist/assets/numbers-CTSqyVyD.js +0 -1
  680. package/dist/assets/ordinal-Dd9FQufD.js +0 -1
  681. package/dist/assets/outline-panel-C9yH5I9w.js +0 -1
  682. package/dist/assets/packages-panel-BPiwOYBi.js +0 -1
  683. package/dist/assets/packet-HUATNLJX-sz1oFfYu.js +0 -1
  684. package/dist/assets/pie-WTHONI2E-C0bj5Jbu.js +0 -1
  685. package/dist/assets/pieDiagram-ADFJNKIX-DiHtCIiJ.js +0 -30
  686. package/dist/assets/plug-BTyO2pk-.js +0 -1
  687. package/dist/assets/plus-CRGccegF.js +0 -1
  688. package/dist/assets/popover-F0Sfc1dn.js +0 -1
  689. package/dist/assets/precisionRound-Qxa8hC2h.js +0 -1
  690. package/dist/assets/pug-CloLgaX6.js +0 -1
  691. package/dist/assets/pug-DUVdXXqU.js +0 -1
  692. package/dist/assets/purify.es-CPMOFAIu.js +0 -2
  693. package/dist/assets/python-BoGSLipj.js +0 -1
  694. package/dist/assets/quadrantDiagram-LMRXKWRM-DxicdQmH.js +0 -7
  695. package/dist/assets/radar-NJJJXTRR-BIKsYvRT.js +0 -1
  696. package/dist/assets/react-dom-D6bRRS5R.js +0 -1
  697. package/dist/assets/react-plotly-Bg7bY4cj.js +0 -4066
  698. package/dist/assets/react-vega-CRwVRb9c.js +0 -194
  699. package/dist/assets/react-vega-CYoD34Uk.js +0 -1
  700. package/dist/assets/readonly-python-code-B4MS39iL.js +0 -1
  701. package/dist/assets/refresh-ccw-Dg4gNnPm.js +0 -1
  702. package/dist/assets/refresh-cw-Duwwh0cP.js +0 -1
  703. package/dist/assets/renderShortcut-DJmsjON-.js +0 -1
  704. package/dist/assets/request-registry-k13VJQbm.js +0 -1
  705. package/dist/assets/requests-BACZP_uj.js +0 -1
  706. package/dist/assets/requests-BZ9D3oC1.js +0 -1
  707. package/dist/assets/requirementDiagram-4UW4RH46-DvqbriSU.js +0 -64
  708. package/dist/assets/run-page-iDx4MSjp.js +0 -1
  709. package/dist/assets/runs-Cc1E9Ytb.js +0 -1
  710. package/dist/assets/sankeyDiagram-GR3RE2ED-B7imli8w.js +0 -10
  711. package/dist/assets/save-M3l4CifW.js +0 -1
  712. package/dist/assets/save-worker-Bn51_kZE.js +0 -58
  713. package/dist/assets/scratchpad-panel-C_xpdU9y.js +0 -1
  714. package/dist/assets/secrets-panel-Bzd6Mi0U.js +0 -1
  715. package/dist/assets/select-5fcaZwou.js +0 -1
  716. package/dist/assets/send-CTRovYct.js +0 -1
  717. package/dist/assets/sequenceDiagram-C3RYC4MD-D3QreZOB.js +0 -145
  718. package/dist/assets/settings-p8vTgdrN.js +0 -1
  719. package/dist/assets/share-8z32Sr0F.js +0 -1
  720. package/dist/assets/shim-Cc3VMan6.js +0 -1
  721. package/dist/assets/slides-component-BT4-csZq.js +0 -1
  722. package/dist/assets/snippets-panel-BNdYY1W6.js +0 -1
  723. package/dist/assets/spec-C5SzKl5N.js +0 -1
  724. package/dist/assets/spinner-CuquyDWA.js +0 -1
  725. package/dist/assets/square-CYRwTwZO.js +0 -1
  726. package/dist/assets/square-function-sjebOKTF.js +0 -1
  727. package/dist/assets/square-terminal-CpNRLkoY.js +0 -1
  728. package/dist/assets/src-BwH0YUPh.js +0 -1
  729. package/dist/assets/state-BfH78XJJ.js +0 -1
  730. package/dist/assets/state-Cm3cZhI-.js +0 -1
  731. package/dist/assets/state-JZFfOGr9.js +0 -1
  732. package/dist/assets/stateDiagram-KXAO66HF-C4A-1CGX.js +0 -1
  733. package/dist/assets/stateDiagram-v2-UMBNRL4Z-Ya_YeL_T.js +0 -1
  734. package/dist/assets/step-BDtirdXu.js +0 -1
  735. package/dist/assets/storage-DNJOpVBd.js +0 -1
  736. package/dist/assets/strings-DHsDEFo-.js +0 -2
  737. package/dist/assets/switch-4s4187gV.js +0 -1
  738. package/dist/assets/table-C2gUjtJV.js +0 -1
  739. package/dist/assets/table-DU76OrPF.js +0 -1
  740. package/dist/assets/tabs-l9npw3ob.js +0 -1
  741. package/dist/assets/terminal-NtPz9Wz1.js +0 -10
  742. package/dist/assets/text-search-IpK7VCPx.js +0 -1
  743. package/dist/assets/textarea-DeG5mMSH.js +0 -1
  744. package/dist/assets/time-4HenLWop.js +0 -1
  745. package/dist/assets/timeline-definition-XQNQX7LJ-DgMQvm3R.js +0 -61
  746. package/dist/assets/toDate-C3oOx2yr.js +0 -1
  747. package/dist/assets/toggle-DlfY8wql.js +0 -1
  748. package/dist/assets/tooltip-BFMRXuzR.js +0 -61
  749. package/dist/assets/tooltip-BHnVWzH0.js +0 -1
  750. package/dist/assets/tracing-DOTFVxLy.js +0 -1
  751. package/dist/assets/tracing-panel-DBh_LItF.js +0 -2
  752. package/dist/assets/trash-2-BPux4_UF.js +0 -1
  753. package/dist/assets/trash-CRcefzxk.js +0 -1
  754. package/dist/assets/tree-CN8xDCJX.js +0 -11
  755. package/dist/assets/treemap-75Q7IDZK-Bao34u2H.js +0 -1
  756. package/dist/assets/type-o43RKOcp.js +0 -1
  757. package/dist/assets/types-Bh2kSb2q.js +0 -17
  758. package/dist/assets/types-CHAkS4Oz.js +0 -1
  759. package/dist/assets/use-toast-midBZAtS.js +0 -1
  760. package/dist/assets/useAddCell-CREgcbTt.js +0 -1
  761. package/dist/assets/useAsyncData-CngUoIwV.js +0 -1
  762. package/dist/assets/useBoolean-CpaqzlKu.js +0 -1
  763. package/dist/assets/useCellActionButton-BIG30Gtv.js +0 -1
  764. package/dist/assets/useDateFormatter-CPDTrKqK.js +0 -1
  765. package/dist/assets/useDebounce-DzG_89QJ.js +0 -1
  766. package/dist/assets/useDeepCompareMemoize-DiJVYA6I.js +0 -1
  767. package/dist/assets/useDeleteCell-CEsjHDdl.js +0 -1
  768. package/dist/assets/useEvent-CRDKqG3C.js +0 -1
  769. package/dist/assets/useEventListener-D1FLsfmf.js +0 -1
  770. package/dist/assets/useHotkey-NDxGNWnW.js +0 -1
  771. package/dist/assets/useIframeCapabilities-DXQ78nsN.js +0 -1
  772. package/dist/assets/useInstallPackage-I3kefbOO.js +0 -1
  773. package/dist/assets/useInterval-D5tVoshg.js +0 -1
  774. package/dist/assets/useLifecycle-DogGOXPh.js +0 -1
  775. package/dist/assets/useNonce-VIoWEX5z.js +0 -1
  776. package/dist/assets/useNotebookActions-BqA-N7b_.js +0 -1
  777. package/dist/assets/useNumberFormatter-F8R3LBxf.js +0 -1
  778. package/dist/assets/usePress-BO20vkQb.js +0 -7
  779. package/dist/assets/useRunCells-BLpH_l8E.js +0 -1
  780. package/dist/assets/useSplitCell-xUizPIKw.js +0 -1
  781. package/dist/assets/useTheme-Biy2QI0v.js +0 -1
  782. package/dist/assets/utilities.esm-Bjl8-mRM.js +0 -3
  783. package/dist/assets/utils-DEDX0RLo.js +0 -1
  784. package/dist/assets/variable-panel-91Oy0ioR.js +0 -1
  785. package/dist/assets/vega-component-DiS0PwuN.js +0 -1
  786. package/dist/assets/vega-loader.browser-D2m26-DP.js +0 -6
  787. package/dist/assets/worker-CUYGINRG.js +0 -101
  788. package/dist/assets/workflow-D14sQBPI.js +0 -1
  789. package/dist/assets/write-secret-modal-8_TgMfIA.js +0 -1
  790. package/dist/assets/ws-DBqs0vJU.js +0 -27
  791. package/dist/assets/xychartDiagram-6GGTOJPD-DReRhuio.js +0 -7
  792. package/dist/assets/youtube-CYW7gZLB.js +0 -1
  793. /package/dist/assets/{apl-BGS-6pM9.js → apl-CAJ5Afpm.js} +0 -0
  794. /package/dist/assets/{array-4wub28GG.js → array-DAkwBc1M.js} +0 -0
  795. /package/dist/assets/{asciiarmor-CbQH35y7.js → asciiarmor-B3glo3Hy.js} +0 -0
  796. /package/dist/assets/{asn1-P7HrFGaM.js → asn1-iaUkdUJn.js} +0 -0
  797. /package/dist/assets/{blob-ISoY06EG.js → blob-BgGJeXvG.js} +0 -0
  798. /package/dist/assets/{brainfuck-CSxeyQc4.js → brainfuck-C1Bv_mwK.js} +0 -0
  799. /package/dist/assets/{chunk-4KMFLZZN-ezSWKPWV.js → chunk-4KMFLZZN-Btk-7pZW.js} +0 -0
  800. /package/dist/assets/{chunk-57QY23SG-C65JnZtK.js → chunk-57QY23SG-CNHrXEp-.js} +0 -0
  801. /package/dist/assets/{clike-Bg9duJDo.js → clike-BEDWkorR.js} +0 -0
  802. /package/dist/assets/{clojure-B94DOmFw.js → clojure-g07QXTjj.js} +0 -0
  803. /package/dist/assets/{cmake-DQEKyMNG.js → cmake-DnTqIimN.js} +0 -0
  804. /package/dist/assets/{cn-ZXtYmczU.js → cn-BaXqCYqP.js} +0 -0
  805. /package/dist/assets/{cobol-CY4gVoPW.js → cobol-BKtG7u9D.js} +0 -0
  806. /package/dist/assets/{coffeescript-BwWb96Ts.js → coffeescript-D5EX_wGl.js} +0 -0
  807. /package/dist/assets/{colors-xHoM1JAe.js → colors-vEZNI1u9.js} +0 -0
  808. /package/dist/assets/{commonlisp-Cq_n1sF6.js → commonlisp-QBdsjaTi.js} +0 -0
  809. /package/dist/assets/{constants-ClC7lqCE.js → constants-BjxvUqyK.js} +0 -0
  810. /package/dist/assets/{crystal-BLTq7Sqq.js → crystal-B0kV858U.js} +0 -0
  811. /package/dist/assets/{css-CmDcdojQ.js → css-lnqtDlV_.js} +0 -0
  812. /package/dist/assets/{cypher-ByytCYVx.js → cypher-B_ciRc6O.js} +0 -0
  813. /package/dist/assets/{d-xLFRg71F.js → d-sGSUUdz9.js} +0 -0
  814. /package/dist/assets/{dagre-DzeXZWsr.js → dagre-DlsQLQOP.js} +0 -0
  815. /package/dist/assets/{defaultLocale-YmL2k7Vp.js → defaultLocale-D-ie3mwB.js} +0 -0
  816. /package/dist/assets/{defaultLocale-zQltfbSS.js → defaultLocale-DzEPn_Ia.js} +0 -0
  817. /package/dist/assets/{diff-VF6GbDch.js → diff-okFUO1eS.js} +0 -0
  818. /package/dist/assets/{dist-DiomJpDg.js → dist-Bi0uUSZq.js} +0 -0
  819. /package/dist/assets/{dist-DBrqGLzW.js → dist-D4J1GeSh.js} +0 -0
  820. /package/dist/assets/{dtd-D8qb8bJW.js → dtd-Covqp7FW.js} +0 -0
  821. /package/dist/assets/{dylan-CIkom9X4.js → dylan-Bf_wFnkY.js} +0 -0
  822. /package/dist/assets/{ecl-8wcmTiom.js → ecl-BON4bJzJ.js} +0 -0
  823. /package/dist/assets/{eiffel-D2ZBcT03.js → eiffel-CWbinnR3.js} +0 -0
  824. /package/dist/assets/{elm-Cpg3TnMc.js → elm-DKVclpIr.js} +0 -0
  825. /package/dist/assets/{emotion-is-prop-valid.esm-OoyWz_0l.js → emotion-is-prop-valid.esm-DY_d0mBI.js} +0 -0
  826. /package/dist/assets/{erlang-B4A2pXCG.js → erlang-D7Lapqoo.js} +0 -0
  827. /package/dist/assets/{extends-dwNt6GDg.js → extends-BADOB1Xm.js} +0 -0
  828. /package/dist/assets/{forth-C5F1F4pC.js → forth-CCfEYbe1.js} +0 -0
  829. /package/dist/assets/{fortran-D7Gl3Tli.js → fortran-ph1UcBiZ.js} +0 -0
  830. /package/dist/assets/{gas-BS2f8qHc.js → gas-BwHh1zIK.js} +0 -0
  831. /package/dist/assets/{gherkin-CVZcskwU.js → gherkin-a-S-92sq.js} +0 -0
  832. /package/dist/assets/{groovy-BhQsBMwW.js → groovy-W6xB3OYy.js} +0 -0
  833. /package/dist/assets/{haskell-BPbxlKgK.js → haskell-DCE9UteQ.js} +0 -0
  834. /package/dist/assets/{haxe-TKSAmiMf.js → haxe-CLcQehNU.js} +0 -0
  835. /package/dist/assets/{hotkeys-ClCtr3_I.js → hotkeys-jCLisiwR.js} +0 -0
  836. /package/dist/assets/{icon-32x32-YsJOs0Ms.js → icon-32x32-BbDKn-R9.js} +0 -0
  837. /package/dist/assets/{idl-DFgQu5Ek.js → idl-VKcM9gU6.js} +0 -0
  838. /package/dist/assets/{init-D34LU3qG.js → init-F9jkgvKE.js} +0 -0
  839. /package/dist/assets/{javascript-dAA8UGkz.js → javascript-3wn7R2v8.js} +0 -0
  840. /package/dist/assets/{jsx-runtime-mwDPpfh_.js → jsx-runtime-DmpivWpf.js} +0 -0
  841. /package/dist/assets/{katex-CkJcqOLL.js → katex-vhOJuooG.js} +0 -0
  842. /package/dist/assets/{loro_wasm_bg-CfNzVF4q.js → loro_wasm_bg-CnDIZbF4.js} +0 -0
  843. /package/dist/assets/{math-B-uM5inP.js → math-C9UoZaXa.js} +0 -0
  844. /package/dist/assets/{mllike-ClozcVVR.js → mllike-BBifUJsv.js} +0 -0
  845. /package/dist/assets/{objectWithoutPropertiesLoose-COpOcp6W.js → objectWithoutPropertiesLoose-BhduYW5j.js} +0 -0
  846. /package/dist/assets/{storage-DT9nZQTa.css → panels-DT9nZQTa.css} +0 -0
  847. /package/dist/assets/{path-CXR-wni1.js → path-C9KI-dzZ.js} +0 -0
  848. /package/dist/assets/{prop-types-Dr_68tMt.js → prop-types-DVt2dPhq.js} +0 -0
  849. /package/dist/assets/{python-Bwt6zAaD.js → python-Dt99D71K.js} +0 -0
  850. /package/dist/assets/{range-Dwpz5kHq.js → range-D-BEpYZE.js} +0 -0
  851. /package/dist/assets/{react-BcIddLXZ.js → react-cj45iF1i.js} +0 -0
  852. /package/dist/assets/{simple-mode-BrL6eoj-.js → simple-mode-NsCUKpko.js} +0 -0
  853. /package/dist/assets/{src-BuVGraFB.js → src-Ci62OB0C.js} +0 -0
  854. /package/dist/assets/{timer-CTpu0Fa6.js → timer-DTwym5Fp.js} +0 -0
  855. /package/dist/assets/{treemap-C6-dXGkc.js → treemap-Bw2ef0_x.js} +0 -0
  856. /package/dist/assets/{types-CmDbpUqg.js → types-idb4QoTQ.js} +0 -0
@@ -0,0 +1,143 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./esm-C2Rj-Fx5.js","./chunk-DZLz74EQ.js","./dist-DOLcWI7m.js","./dist-0FJpM7wG.js","./dist-C6GW8SWp.js","./dist-CvIoRIOp.js","./dist-DFOg0cu_.js","./dist-B1wJF59y.js","./dist-_GzJQFYT.js","./dist-BrS3KFEl.js","./dist-BN-1z8mm.js","./dist-D4dFcbt8.js","./dist-Ducx4jqX.js","./dist-CZkQ2hcE.js","./dist-DvTgOH5F.js","./dist-DSJ2ZFEM.js","./dist-CzaCAuEN.js","./dist-DXvMjqJ4.js","./dist-CNZQfa8W.js","./dist-BGeFWVD6.js","./dist-CrvuMM2L.js","./dist-CmEn1nMp.js","./dist-DZAt7AHl.js","./dist-BGgBzoiO.js","./dist-Bu5OuYeo.js","./dist-BdkKJ3G3.js","./dist-DrAMGx2E.js","./dist-CIThMDB8.js","./dist--8e9VGsl.js","./dist-ORyWvZpp.js","./dist-YP2XXp1Z.js","./dist-CoVfzd-4.js","./dist-SXxUBTmG.js","./dist-USFTKxJR.js","./dist-D84pVwY7.js","./dist-CAFoFFJF.js","./dist-BUfDRi87.js","./dist-rxj5KoqT.js","./dist-CJIkd1DM.js","./dist-BuEd4VGV.js","./dist-D5QNAo1x.js","./apl-DiFyycVh.js","./apl-CAJ5Afpm.js","./asciiarmor-BAWhqgpM.js","./asciiarmor-B3glo3Hy.js","./asn1-CtTMtM_b.js","./asn1-iaUkdUJn.js","./brainfuck-D-g39Tsa.js","./brainfuck-C1Bv_mwK.js","./cobol-BE9N6AQ-.js","./cobol-BKtG7u9D.js","./clike-Del1aM7V.js","./clike-BEDWkorR.js","./clojure-DmTswoFG.js","./clojure-g07QXTjj.js","./css-us97Iddy.js","./css-lnqtDlV_.js","./cmake-DAoCuUDE.js","./cmake-DnTqIimN.js","./coffeescript-BRP8S7ZW.js","./coffeescript-D5EX_wGl.js","./commonlisp-BS8oQjGE.js","./commonlisp-QBdsjaTi.js","./cypher-CBH6XzVc.js","./cypher-B_ciRc6O.js","./python-01S0WAiq.js","./python-Dt99D71K.js","./crystal-CRDMNjDv.js","./crystal-B0kV858U.js","./d-CKwQ35PI.js","./d-sGSUUdz9.js","./diff-BtPrcYlV.js","./diff-okFUO1eS.js","./dockerfile-fDdOK3ov.js","./simple-mode-NsCUKpko.js","./dtd-BNqeF3HB.js","./dtd-Covqp7FW.js","./dylan-C2KE_ARv.js","./dylan-Bf_wFnkY.js","./ecl-CLD3EYom.js","./ecl-BON4bJzJ.js","./eiffel-C3QxGicN.js","./eiffel-CWbinnR3.js","./elm-Dc9b15sa.js","./elm-DKVclpIr.js","./erlang-59AUz-n0.js","./erlang-D7Lapqoo.js","./factor-DIE032fN.js","./factor-B2ESt4eh.js","./forth-DjCo7dIs.js","./forth-CCfEYbe1.js","./fortran-CZmOENAN.js","./fortran-ph1UcBiZ.js","./mllike-CvMT7BHA.js","./mllike-BBifUJsv.js","./gas-SoBzL_Tr.js","./gas-BwHh1zIK.js","./gherkin-DLggx8YE.js","./gherkin-a-S-92sq.js","./groovy-9IQPpZra.js","./groovy-W6xB3OYy.js","./haskell-CgXYOX9c.js","./haskell-DCE9UteQ.js","./haxe-aSjlIDiq.js","./haxe-CLcQehNU.js","./idl-BADcUAqn.js","./idl-VKcM9gU6.js","./javascript-C7hPrwf3.js","./javascript-3wn7R2v8.js","./julia-a7zMt5wv.js","./julia-CfdFJG3K.js","./livescript-j-7zvE-f.js","./livescript-FcXY3DYa.js","./lua-Boa5MbAE.js","./lua-Co6rjiMf.js","./mirc-eoWtBNF4.js","./mirc-DIfBuSAc.js","./mathematica-DrlhlKh7.js","./mathematica-yb42KhnJ.js","./modelica-DvH5IG0f.js","./modelica-DfSVZeoi.js","./mumps-Bgv8ZZE2.js","./mumps-Zs7zFruB.js","./mbox-qGC4Me6y.js","./mbox-Kdy3h0JS.js","./nsis-Bu9c7jg8.js","./nsis-z1VCt9tx.js","./ntriples-C_eoIPVj.js","./ntriples-BZ-Gx5MV.js","./octave-Cp326Tnr.js","./octave-DbhnFGQl.js","./oz-P3zQThfI.js","./oz-C8cfEyhB.js","./pascal-ChBp5QsG.js","./pascal-DjQLfZxE.js","./perl-DVu2vTnC.js","./perl-BbHwsgL1.js","./pig-C2M_eRDK.js","./pig-siFNrhhJ.js","./powershell-Cd99QpKb.js","./powershell-DtGrdgtc.js","./properties-B3jdvg-S.js","./properties-ThqBcpfC.js","./protobuf-CDBL19Ok.js","./protobuf-RiYv9VfD.js","./pug-i6atkyz7.js","./pug-CaaLw7eE.js","./puppet-BddZVZ4W.js","./puppet-U5CQLRYv.js","./q-D4fWFvp7.js","./q-DIhdXtBp.js","./r-g-cCSFrQ.js","./r-CWawXx6U.js","./rpm-Cn6Ok7uQ.js","./rpm-CNr8ALvx.js","./ruby-r02uzJua.js","./ruby-DskfS84U.js","./sas-CxKloHOq.js","./sas-C2b2tSOH.js","./scheme-D2xXaQid.js","./scheme-Cmmcrp64.js","./shell-wb-SF4Wf.js","./shell-Dyv1aCg9.js","./sieve-BqFItYR4.js","./sieve-B_dGzCIS.js","./smalltalk-wuEIo73w.js","./smalltalk-intFzbz6.js","./sparql-DsPZfRy0.js","./sparql-BX1c9HJU.js","./stylus-Dyubhej8.js","./stylus-X6xt1FMB.js","./swift-DWswqE1h.js","./swift-BYNJXGdg.js","./stex-DmRWBIEV.js","./stex-xveX5l_T.js","./verilog-E7U5dQM4.js","./verilog-C9TzcLDl.js","./tcl-DcLIZx0q.js","./tcl-BaybuQuE.js","./textile-Bn63vpkT.js","./textile-77KFAyfi.js","./toml-Cag-OSI0.js","./toml-D6E8t1IG.js","./troff-BLP-dKOV.js","./troff-BfktZMhT.js","./ttcn-ASRN_mcT.js","./ttcn-DOlRqUFL.js","./ttcn-cfg-rYn6yS-U.js","./ttcn-cfg-CstA0KVC.js","./turtle-DydgtKRb.js","./turtle-Cx-tHjh2.js","./webidl-DPKos6mg.js","./webidl-DmZw40AA.js","./vb-DAcDE385.js","./vb-DerFRxqu.js","./vbscript-B8QiQA8v.js","./vbscript-BPEY3B7J.js","./velocity-D3gjTLEW.js","./velocity-B-lFP8Gk.js","./vhdl-CoYZowGK.js","./vhdl-v8a_uH2H.js","./xquery-CGPHrOWI.js","./xquery-BrIWpdRx.js","./yacas-DLUYkKeB.js","./yacas-ofPECLUx.js","./z80-D3UUC8BX.js","./z80-DrGVKC-O.js","./mscgen-DYT1s_hB.js","./mscgen-BCcB4vmY.js","./dist-4GQeuWFQ.js","./dist-CXTAKsYC.js","./dist-2rBXr-aS.js"])))=>i.map(i=>d[i]);
2
+ var cT=Object.defineProperty;var uT=(Pi,Fr,yo)=>Fr in Pi?cT(Pi,Fr,{enumerable:!0,configurable:!0,writable:!0,value:yo}):Pi[Fr]=yo;var Te=(Pi,Fr,yo)=>uT(Pi,typeof Fr!="symbol"?Fr+"":Fr,yo);import{a as uu,n as Vb,r as dT,s as Kt,t as ke}from"./chunk-DZLz74EQ.js";import{a as fT,c as Un,d as Be,n as ct,o as $b,s as Wb,t as pT}from"./jotai-C7U7c6dd.js";import{t as du}from"./react-cj45iF1i.js";import{t as mT}from"./react-dom-BjyRIiB0.js";import{A as hT,E as Ub,F as Kb,P as gT,V as yT,w as vT,z as bT}from"./zod-U2NFpcFA.js";import{t as zr}from"./compiler-runtime-bbSa6V1W.js";import{f as wT}from"./_Uint8Array-D5Z9rM2X.js";import{t as _T}from"./_arrayMap-DQI2GUNb.js";import{t as xT}from"./toInteger-Bor4StOs.js";import{d as kT,t as CT}from"./isArrayLikeObject-DKyJYtr8.js";import{u as ST}from"./_baseIsEqual-CVFfFJm2.js";import{t as ET}from"./_baseProperty-c4IQJQis.js";import{t as Qb}from"./debounce-BUM2losY.js";import{a as ei,o as TT,u as Pe}from"./hotkeys-jCLisiwR.js";import{t as En}from"./invariant-D5a0EE05.js";import{d as Zp,t as RT}from"./utils-BPcfRUDE.js";import{g as DT,r as OT}from"./config-DOzlN8_n.js";import{o as Gb}from"./useEventListener-DVwjxFkt.js";import{t as PT}from"./jsx-runtime-DmpivWpf.js";import{t as fu}from"./cn-BaXqCYqP.js";import{t as Jb}from"./button-DCB7VoVL.js";import{Bt as Xb,C as NT,D as MT,Dt as em,Et as is,F as Yb,Gt as na,H as LT,It as pu,Jt as os,K as mu,Kt as hu,Lt as dn,R as Zb,Rt as gu,S as AT,T as e2,Ut as t2,V as n2,Vt as yu,b as r2,bt as ra,ct as IT,et as i2,f as o2,ft as jT,k as qT,l as ce,nt as zT,ot as ia,p as FT,qt as oa,rt as Tn,tt as Ti,u as a2,wt as s2,yt as l2,zt as Sl}from"./dist-C6GW8SWp.js";import{C as BT,O as HT,T as VT,_ as $T,a as WT,b as UT,d as KT,f as QT,g as GT,i as c2,m as JT,o as XT,p as YT,t as ZT,u as tm,w as eR,x as tR,y as nR}from"./dist-BFSjfL-I.js";import{a as u2,i as rR,n as ti,o as d2,p as nm,s as El}from"./once-C5bmD4W5.js";import{t as iR}from"./capabilities-MLRWIHmO.js";import{t as oR}from"./cjs-Ck8KMDI1.js";import{t as Tl}from"./createReducer-CTvsuJZY.js";import{t as Ri}from"./requests-CftYh9v2.js";import{t as ue}from"./preload-helper-BnutJmlU.js";import{d as f2,l as p2,n as aR,o as m2,p as sR,r as vu}from"./dist-0FJpM7wG.js";import{a as h2,s as lR}from"./dist-DrAMGx2E.js";import{a as cR,i as rm,n as uR,r as g2,t as dR}from"./dist-YP2XXp1Z.js";import{n as fR}from"./stex-xveX5l_T.js";import{n as bu,t as pR}from"./key-CaC9xuXQ.js";import{t as wu}from"./use-toast-BBrPeu2N.js";import{i as im,r as om}from"./main-ChjX94eX.js";import{t as y2}from"./marked.esm-BV7g2d65.js";import{a as mR,s as ni,t as Rl}from"./connection-DOETP_K0.js";import{a as hR,c as gR,d as yR,f as v2,i as vR,l as bR,n as wR,o as am,r as _R,s as sm,t as xR,u as kR}from"./dist-CvIoRIOp.js";import{i as Dl,t as CR}from"./useLifecycle-DiLWmtpP.js";import{t as qn}from"./createLucideIcon-DbfgBYhq.js";import{i as SR,n as ER,r as lm,t as TR}from"./type-CnQq0uaD.js";import{t as RR}from"./check-DqnGmZZE.js";import{a as DR,c as OR,i as cm,m as PR,n as NR,o as b2,r as MR,s as LR,t as AR}from"./select-E33nSIDn.js";import{t as IR,u as jR}from"./toDate-CbcWqY6f.js";import{t as lr}from"./badge-DrRlgkPx.js";import{C as qR,g as um,v as zR,x as w2,y as FR}from"./Combination-CJczP3q7.js";import{l as BR}from"./dist-Cn3C5h2V.js";import{i as HR,t as dm}from"./tooltip-QlUG_0sW.js";import{t as VR}from"./useNonce-CElEIK4R.js";let fm,Ol,_2,x2,Di,Pl,as,k2,C2,_u,S2,E2,T2,xu,R2,D2,O2,zn,aa,P2,N2,ss,pm,Cr,mm,fo,hm,gm,M2,ym,L2,vm,ku,bm,sa,Sr,Cu,A2,I2,j2,q2,z2,wm,F2,Su,Eu,B2,H2,cr,V2,$2,W2,U2,_m,K2,Q2,G2,xm,J2,X2,Y2,Tu,Z2,km,Cm,Sm,Em,Tm,ew,Rm,Ru,ls,tw,nw,Du,rw,Ou,iw,Dm,ow,la,Om,Pm,aw,sw,Nm,Pu,lw,Nu,cw,Mu,Mm,uw,Lu,dw,fw,Au,po,pw,mw,Iu,Nl,hw,ju,Lm,gw,qu,zu,Am,yw,vw,Im,bw,mo,ww,_w,xw,jm,kw,Fu,Cw,Sw,Oi,Ew,ri,Tw,Ml,ca,qm,Rw,Bu,zm,Hu,Dw,ii,Fm,ur,Vu,Ow,Bm,Er,Pw,Ll,$u,Hm,Nw,Mw,Wu,Uu,Vm,$m,Wm,Lw,Aw,Ku,Iw,Al,Qu,Um,Dt,jw,qw,Km,zw,Gu,Ju,ho,Xu,Qm,Fw,Bw,Hw,Vw,$w,ua,Ww,Uw,Kw,Gm,Jm,Qw,cs,Yu,us,Gw,Il,Zu,Jw,Xw,Xm,go,ed,Yw,Ym,ds,jl,Zw,ql,Zm,e_,mt,eh,zl,t_,n_,r_,dr,th,$R=(async()=>{var zi,sf,So;let Pi,Fr,yo,ih;Pi=ke((e=>{function n(oe,le){var K=oe.length;oe.push(le);e:for(;0<K;){var Ae=K-1>>>1,Qe=oe[Ae];if(0<s(Qe,le))oe[Ae]=le,oe[K]=Qe,K=Ae;else break e}}function i(oe){return oe.length===0?null:oe[0]}function a(oe){if(oe.length===0)return null;var le=oe[0],K=oe.pop();if(K!==le){oe[0]=K;e:for(var Ae=0,Qe=oe.length,ut=Qe>>>1;Ae<ut;){var Fe=2*(Ae+1)-1,We=oe[Fe],De=Fe+1,Ne=oe[De];if(0>s(We,K))De<Qe&&0>s(Ne,We)?(oe[Ae]=Ne,oe[De]=K,Ae=De):(oe[Ae]=We,oe[Fe]=K,Ae=Fe);else if(De<Qe&&0>s(Ne,K))oe[Ae]=Ne,oe[De]=K,Ae=De;else break e}}return le}function s(oe,le){var K=oe.sortIndex-le.sortIndex;return K===0?oe.id-le.id:K}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var f=Date,p=f.now();e.unstable_now=function(){return f.now()-p}}var h=[],v=[],w=1,_=null,C=3,E=!1,R=!1,L=!1,H=!1,W=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function G(oe){for(var le=i(v);le!==null;){if(le.callback===null)a(v);else if(le.startTime<=oe)a(v),le.sortIndex=le.expirationTime,n(h,le);else break;le=i(v)}}function he(oe){if(L=!1,G(oe),!R)if(i(h)!==null)R=!0,N||(N=!0,Z());else{var le=i(v);le!==null&&re(he,le.startTime-oe)}}var N=!1,j=-1,V=5,de=-1;function pe(){return H?!0:!(e.unstable_now()-de<V)}function xe(){if(H=!1,N){var oe=e.unstable_now();de=oe;var le=!0;try{e:{R=!1,L&&(L=!1,U(j),j=-1),E=!0;var K=C;try{t:{for(G(oe),_=i(h);_!==null&&!(_.expirationTime>oe&&pe());){var Ae=_.callback;if(typeof Ae=="function"){_.callback=null,C=_.priorityLevel;var Qe=Ae(_.expirationTime<=oe);if(oe=e.unstable_now(),typeof Qe=="function"){_.callback=Qe,G(oe),le=!0;break t}_===i(h)&&a(h),G(oe)}else a(h);_=i(h)}if(_!==null)le=!0;else{var ut=i(v);ut!==null&&re(he,ut.startTime-oe),le=!1}}break e}finally{_=null,C=K,E=!1}le=void 0}}finally{le?Z():N=!1}}}var Z;if(typeof A=="function")Z=function(){A(xe)};else if(typeof MessageChannel<"u"){var be=new MessageChannel,Ee=be.port2;be.port1.onmessage=xe,Z=function(){Ee.postMessage(null)}}else Z=function(){W(xe,0)};function re(oe,le){j=W(function(){oe(e.unstable_now())},le)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(oe){oe.callback=null},e.unstable_forceFrameRate=function(oe){0>oe||125<oe?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<oe?Math.floor(1e3/oe):5},e.unstable_getCurrentPriorityLevel=function(){return C},e.unstable_next=function(oe){switch(C){case 1:case 2:case 3:var le=3;break;default:le=C}var K=C;C=le;try{return oe()}finally{C=K}},e.unstable_requestPaint=function(){H=!0},e.unstable_runWithPriority=function(oe,le){switch(oe){case 1:case 2:case 3:case 4:case 5:break;default:oe=3}var K=C;C=oe;try{return le()}finally{C=K}},e.unstable_scheduleCallback=function(oe,le,K){var Ae=e.unstable_now();switch(typeof K=="object"&&K?(K=K.delay,K=typeof K=="number"&&0<K?Ae+K:Ae):K=Ae,oe){case 1:var Qe=-1;break;case 2:Qe=250;break;case 5:Qe=1073741823;break;case 4:Qe=1e4;break;default:Qe=5e3}return Qe=K+Qe,oe={id:w++,callback:le,priorityLevel:oe,startTime:K,expirationTime:Qe,sortIndex:-1},K>Ae?(oe.sortIndex=K,n(v,oe),i(h)===null&&oe===i(v)&&(L?(U(j),j=-1):L=!0,re(he,K-Ae))):(oe.sortIndex=Qe,n(h,oe),R||E||(R=!0,N||(N=!0,Z()))),oe},e.unstable_shouldYield=pe,e.unstable_wrapCallback=function(oe){var le=C;return function(){var K=C;C=le;try{return oe.apply(this,arguments)}finally{C=K}}}})),Fr=ke(((e,n)=>{n.exports=Pi()})),yo=ke((e=>{var n=Fr(),i=du(),a=mT();function s(t){var r="https://react.dev/errors/"+t;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)r+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function f(t){var r=t,o=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,r.flags&4098&&(o=r.return),t=r.return;while(t)}return r.tag===3?o:null}function p(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function h(t){if(f(t)!==t)throw Error(s(188))}function v(t){var r=t.alternate;if(!r){if(r=f(t),r===null)throw Error(s(188));return r===t?t:null}for(var o=t,l=r;;){var d=o.return;if(d===null)break;var g=d.alternate;if(g===null){if(l=d.return,l!==null){o=l;continue}break}if(d.child===g.child){for(g=d.child;g;){if(g===o)return h(d),t;if(g===l)return h(d),r;g=g.sibling}throw Error(s(188))}if(o.return!==l.return)o=d,l=g;else{for(var S=!1,D=d.child;D;){if(D===o){S=!0,o=d,l=g;break}if(D===l){S=!0,l=d,o=g;break}D=D.sibling}if(!S){for(D=g.child;D;){if(D===o){S=!0,o=g,l=d;break}if(D===l){S=!0,l=g,o=d;break}D=D.sibling}if(!S)throw Error(s(189))}}if(o.alternate!==l)throw Error(s(190))}if(o.tag!==3)throw Error(s(188));return o.stateNode.current===o?t:r}function w(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=w(t),r!==null)return r;t=t.sibling}return null}var _=Object.assign,C=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),L=Symbol.for("react.fragment"),H=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),U=Symbol.for("react.provider"),A=Symbol.for("react.consumer"),G=Symbol.for("react.context"),he=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),de=Symbol.for("react.lazy"),pe=Symbol.for("react.activity"),xe=Symbol.for("react.memo_cache_sentinel"),Z=Symbol.iterator;function be(t){return typeof t!="object"||!t?null:(t=Z&&t[Z]||t["@@iterator"],typeof t=="function"?t:null)}var Ee=Symbol.for("react.client.reference");function re(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Ee?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case L:return"Fragment";case W:return"Profiler";case H:return"StrictMode";case N:return"Suspense";case j:return"SuspenseList";case pe:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case R:return"Portal";case G:return(t.displayName||"Context")+".Provider";case A:return(t._context.displayName||"Context")+".Consumer";case he:var r=t.render;return t=t.displayName,t||(t=(t=r.displayName||r.name||"",t===""?"ForwardRef":"ForwardRef("+t+")")),t;case V:return r=t.displayName||null,r===null?re(t.type)||"Memo":r;case de:r=t._payload,t=t._init;try{return re(t(r))}catch{}}return null}var oe=Array.isArray,le=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ae={pending:!1,data:null,method:null,action:null},Qe=[],ut=-1;function Fe(t){return{current:t}}function We(t){0>ut||(t.current=Qe[ut],Qe[ut]=null,ut--)}function De(t,r){ut++,Qe[ut]=t.current,t.current=r}var Ne=Fe(null),mn=Fe(null),It=Fe(null),Dn=Fe(null);function sn(t,r){switch(De(It,r),De(mn,t),De(Ne,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?bb(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=bb(r),t=wb(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}We(Ne),De(Ne,t)}function Ue(){We(Ne),We(mn),We(It)}function tn(t){t.memoizedState!==null&&De(Dn,t);var r=Ne.current,o=wb(r,t.type);r!==o&&(De(mn,t),De(Ne,o))}function gt(t){mn.current===t&&(We(Ne),We(mn)),Dn.current===t&&(We(Dn),wl._currentValue=Ae)}var hn=Object.prototype.hasOwnProperty,Xn=n.unstable_scheduleCallback,kt=n.unstable_cancelCallback,ai=n.unstable_shouldYield,gn=n.unstable_requestPaint,yn=n.unstable_now,Ln=n.unstable_getCurrentPriorityLevel,Pr=n.unstable_ImmediatePriority,An=n.unstable_UserBlockingPriority,nn=n.unstable_NormalPriority,Fi=n.unstable_LowPriority,$r=n.unstable_IdlePriority,Nr=n.log,si=n.unstable_setDisableYieldValue,Ht=null,Qt=null;function yt(t){if(typeof Nr=="function"&&si(t),Qt&&typeof Qt.setStrictMode=="function")try{Qt.setStrictMode(Ht,t)}catch{}}var Ft=Math.clz32?Math.clz32:Bi,Ct=Math.log,li=Math.LN2;function Bi(t){return t>>>=0,t===0?32:31-(Ct(t)/li|0)|0}var Mr=256,fr=4194304;function Ge(t){var r=t&42;if(r!==0)return r;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Vt(t,r,o){var l=t.pendingLanes;if(l===0)return 0;var d=0,g=t.suspendedLanes,S=t.pingedLanes;t=t.warmLanes;var D=l&134217727;return D===0?(D=l&~g,D===0?S===0?o||(o=l&~t,o!==0&&(d=Ge(o))):d=Ge(S):d=Ge(D)):(l=D&~g,l===0?(S&=D,S===0?o||(o=D&~t,o!==0&&(d=Ge(o))):d=Ge(S)):d=Ge(l)),d===0?0:r!==0&&r!==d&&(r&g)===0&&(g=d&-d,o=r&-r,g>=o||g===32&&o&4194048)?r:d}function st(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function vt(t,r){switch(t){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function On(){var t=Mr;return Mr<<=1,!(Mr&4194048)&&(Mr=256),t}function Wr(){var t=fr;return fr<<=1,!(fr&62914560)&&(fr=4194304),t}function St(t){for(var r=[],o=0;31>o;o++)r.push(t);return r}function Yn(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Ur(t,r,o,l,d,g){var S=t.pendingLanes;t.pendingLanes=o,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=o,t.entangledLanes&=o,t.errorRecoveryDisabledLanes&=o,t.shellSuspendCounter=0;var D=t.entanglements,F=t.expirationTimes,te=t.hiddenUpdates;for(o=S&~o;0<o;){var fe=31-Ft(o),ve=1<<fe;D[fe]=0,F[fe]=-1;var ie=te[fe];if(ie!==null)for(te[fe]=null,fe=0;fe<ie.length;fe++){var se=ie[fe];se!==null&&(se.lane&=-536870913)}o&=~ve}l!==0&&ci(t,l,0),g!==0&&d===0&&t.tag!==0&&(t.suspendedLanes|=g&~(S&~r))}function ci(t,r,o){t.pendingLanes|=r,t.suspendedLanes&=~r;var l=31-Ft(r);t.entangledLanes|=r,t.entanglements[l]=t.entanglements[l]|1073741824|o&4194090}function In(t,r){var o=t.entangledLanes|=r;for(t=t.entanglements;o;){var l=31-Ft(o),d=1<<l;d&r|t[l]&r&&(t[l]|=r),o&=~d}}function Bn(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Kr(t){return t&=-t,2<t?8<t?t&134217727?32:268435456:8:2}function ui(){var t=K.p;return t===0?(t=window.event,t===void 0?32:jb(t.type)):t}function Zn(t,r){var o=K.p;try{return K.p=t,r()}finally{K.p=o}}var Pn=Math.random().toString(36).slice(2),bt="__reactFiber$"+Pn,jt="__reactProps$"+Pn,P="__reactContainer$"+Pn,Je="__reactEvents$"+Pn,q="__reactListeners$"+Pn,ee="__reactHandles$"+Pn,ye="__reactResources$"+Pn,Ce="__reactMarker$"+Pn;function ft(t){delete t[bt],delete t[jt],delete t[Je],delete t[q],delete t[ee]}function tt(t){var r=t[bt];if(r)return r;for(var o=t.parentNode;o;){if(r=o[P]||o[bt]){if(o=r.alternate,r.child!==null||o!==null&&o.child!==null)for(t=Cb(t);t!==null;){if(o=t[bt])return o;t=Cb(t)}return r}t=o,o=t.parentNode}return null}function it(t){if(t=t[bt]||t[P]){var r=t.tag;if(r===5||r===6||r===13||r===26||r===27||r===3)return t}return null}function wt(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(s(33))}function $e(t){var r=t[ye];return r||(r=t[ye]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function He(t){t[Ce]=!0}var ot=new Set,ht={};function $t(t,r){er(t,r),er(t+"Capture",r)}function er(t,r){for(ht[t]=r,t=0;t<r.length;t++)ot.add(r[t])}var xs=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),pr={},tc={};function nc(t){return hn.call(tc,t)?!0:hn.call(pr,t)?!1:xs.test(t)?tc[t]=!0:(pr[t]=!0,!1)}function Eo(t,r,o){if(nc(r))if(o===null)t.removeAttribute(r);else{switch(typeof o){case"undefined":case"function":case"symbol":t.removeAttribute(r);return;case"boolean":var l=r.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(r);return}}t.setAttribute(r,""+o)}}function Ta(t,r,o){if(o===null)t.removeAttribute(r);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttribute(r,""+o)}}function mr(t,r,o,l){if(l===null)t.removeAttribute(o);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(o);return}t.setAttributeNS(r,o,""+l)}}var ks,rc;function vn(t){if(ks===void 0)try{throw Error()}catch(o){var r=o.stack.trim().match(/\n( *(at )?)/);ks=r&&r[1]||"",rc=-1<o.stack.indexOf(`
3
+ at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
4
+ `+ks+t+rc}var Cs=!1;function Ss(t,r){if(!t||Cs)return"";Cs=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(r){var ve=function(){throw Error()};if(Object.defineProperty(ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ve,[])}catch(se){var ie=se}Reflect.construct(t,[],ve)}else{try{ve.call()}catch(se){ie=se}t.call(ve.prototype)}}else{try{throw Error()}catch(se){ie=se}(ve=t())&&typeof ve.catch=="function"&&ve.catch(function(){})}}catch(se){if(se&&ie&&typeof se.stack=="string")return[se.stack,ie.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=l.DetermineComponentFrameRoot(),S=g[0],D=g[1];if(S&&D){var F=S.split(`
5
+ `),te=D.split(`
6
+ `);for(d=l=0;l<F.length&&!F[l].includes("DetermineComponentFrameRoot");)l++;for(;d<te.length&&!te[d].includes("DetermineComponentFrameRoot");)d++;if(l===F.length||d===te.length)for(l=F.length-1,d=te.length-1;1<=l&&0<=d&&F[l]!==te[d];)d--;for(;1<=l&&0<=d;l--,d--)if(F[l]!==te[d]){if(l!==1||d!==1)do if(l--,d--,0>d||F[l]!==te[d]){var fe=`
7
+ `+F[l].replace(" at new "," at ");return t.displayName&&fe.includes("<anonymous>")&&(fe=fe.replace("<anonymous>",t.displayName)),fe}while(1<=l&&0<=d);break}}}finally{Cs=!1,Error.prepareStackTrace=o}return(o=t?t.displayName||t.name:"")?vn(o):""}function ic(t){switch(t.tag){case 26:case 27:case 5:return vn(t.type);case 16:return vn("Lazy");case 13:return vn("Suspense");case 19:return vn("SuspenseList");case 0:case 15:return Ss(t.type,!1);case 11:return Ss(t.type.render,!1);case 1:return Ss(t.type,!0);case 31:return vn("Activity");default:return""}}function Es(t){try{var r="";do r+=ic(t),t=t.return;while(t);return r}catch(o){return`
8
+ Error generating stack: `+o.message+`
9
+ `+o.stack}}function Hn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Ts(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function lf(t){var r=Ts(t)?"checked":"value",o=Object.getOwnPropertyDescriptor(t.constructor.prototype,r),l=""+t[r];if(!t.hasOwnProperty(r)&&o!==void 0&&typeof o.get=="function"&&typeof o.set=="function"){var d=o.get,g=o.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return d.call(this)},set:function(S){l=""+S,g.call(this,S)}}),Object.defineProperty(t,r,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(S){l=""+S},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function To(t){t._valueTracker||(t._valueTracker=lf(t))}function oc(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var o=r.getValue(),l="";return t&&(l=Ts(t)?t.checked?"true":"false":t.value),t=l,t===o?!1:(r.setValue(t),!0)}function Ro(t){if(t||(t=typeof document<"u"?document:void 0),t===void 0)return null;try{return t.activeElement||t.body}catch{return t.body}}var tr=/[\n"\\]/g;function Ve(t){return t.replace(tr,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Rs(t,r,o,l,d,g,S,D){t.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?t.type=S:t.removeAttribute("type"),r==null?S!=="submit"&&S!=="reset"||t.removeAttribute("value"):S==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+Hn(r)):t.value!==""+Hn(r)&&(t.value=""+Hn(r)),r==null?o==null?l!=null&&t.removeAttribute("value"):Ds(t,S,Hn(o)):Ds(t,S,Hn(r)),d==null&&g!=null&&(t.defaultChecked=!!g),d!=null&&(t.checked=d&&typeof d!="function"&&typeof d!="symbol"),D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?t.name=""+Hn(D):t.removeAttribute("name")}function Do(t,r,o,l,d,g,S,D){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.type=g),r!=null||o!=null){if(!(g!=="submit"&&g!=="reset"||r!=null))return;o=o==null?"":""+Hn(o),r=r==null?o:""+Hn(r),D||r===t.value||(t.value=r),t.defaultValue=r}l??(l=d),l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=D?t.checked:!!l,t.defaultChecked=!!l,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(t.name=S)}function Ds(t,r,o){r==="number"&&Ro(t.ownerDocument)===t||t.defaultValue===""+o||(t.defaultValue=""+o)}function hr(t,r,o,l){if(t=t.options,r){r={};for(var d=0;d<o.length;d++)r["$"+o[d]]=!0;for(o=0;o<t.length;o++)d=r.hasOwnProperty("$"+t[o].value),t[o].selected!==d&&(t[o].selected=d),d&&l&&(t[o].defaultSelected=!0)}else{for(o=""+Hn(o),r=null,d=0;d<t.length;d++){if(t[d].value===o){t[d].selected=!0,l&&(t[d].defaultSelected=!0);return}r!==null||t[d].disabled||(r=t[d])}r!==null&&(r.selected=!0)}}function ac(t,r,o){if(r!=null&&(r=""+Hn(r),r!==t.value&&(t.value=r),o==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=o==null?"":""+Hn(o)}function Hi(t,r,o,l){if(r==null){if(l!=null){if(o!=null)throw Error(s(92));if(oe(l)){if(1<l.length)throw Error(s(93));l=l[0]}o=l}o??(o=""),r=o}o=Hn(r),t.defaultValue=o,l=t.textContent,l===o&&l!==""&&l!==null&&(t.value=l)}function Qr(t,r){if(r){var o=t.firstChild;if(o&&o===t.lastChild&&o.nodeType===3){o.nodeValue=r;return}}t.textContent=r}var sc=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function lc(t,r,o){var l=r.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?l?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":l?t.setProperty(r,o):typeof o!="number"||o===0||sc.has(r)?r==="float"?t.cssFloat=o:t[r]=(""+o).trim():t[r]=o+"px"}function di(t,r,o){if(r!=null&&typeof r!="object")throw Error(s(62));if(t=t.style,o!=null){for(var l in o)!o.hasOwnProperty(l)||r!=null&&r.hasOwnProperty(l)||(l.indexOf("--")===0?t.setProperty(l,""):l==="float"?t.cssFloat="":t[l]="");for(var d in r)l=r[d],r.hasOwnProperty(d)&&o[d]!==l&&lc(t,d,l)}else for(var g in r)r.hasOwnProperty(g)&&lc(t,g,r[g])}function Os(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ps=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Ra=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Oo(t){return Ra.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}var Ns=null;function Da(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Gt=null,Vi=null;function Lr(t){var r=it(t);if(r&&(t=r.stateNode)){var o=t[jt]||null;e:switch(t=r.stateNode,r.type){case"input":if(Rs(t,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),r=o.name,o.type==="radio"&&r!=null){for(o=t;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+Ve(""+r)+'"][type="radio"]'),r=0;r<o.length;r++){var l=o[r];if(l!==t&&l.form===t.form){var d=l[jt]||null;if(!d)throw Error(s(90));Rs(l,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(r=0;r<o.length;r++)l=o[r],l.form===t.form&&oc(l)}break e;case"textarea":ac(t,o.value,o.defaultValue);break e;case"select":r=o.value,r!=null&&hr(t,!!o.multiple,r,!1)}}}var Po=!1;function cc(t,r,o){if(Po)return t(r,o);Po=!0;try{return t(r)}finally{if(Po=!1,(Gt!==null||Vi!==null)&&($c(),Gt&&(r=Gt,t=Vi,Vi=Gt=null,Lr(r),t)))for(r=0;r<t.length;r++)Lr(t[r])}}function No(t,r){var o=t.stateNode;if(o===null)return null;var l=o[jt]||null;if(l===null)return null;o=l[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;break e;default:t=!1}if(t)return null;if(o&&typeof o!="function")throw Error(s(231,r,typeof o));return o}var Ar=!(typeof window>"u"||window.document===void 0||window.document.createElement===void 0),Ms=!1;if(Ar)try{var Mo={};Object.defineProperty(Mo,"passive",{get:function(){Ms=!0}}),window.addEventListener("test",Mo,Mo),window.removeEventListener("test",Mo,Mo)}catch{Ms=!1}var Gr=null,Ls=null,Lo=null;function As(){if(Lo)return Lo;var t,r=Ls,o=r.length,l,d="value"in Gr?Gr.value:Gr.textContent,g=d.length;for(t=0;t<o&&r[t]===d[t];t++);var S=o-t;for(l=1;l<=S&&r[o-l]===d[g-l];l++);return Lo=d.slice(t,1<l?1-l:void 0)}function Ao(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function Io(){return!0}function Is(){return!1}function xn(t){function r(o,l,d,g,S){for(var D in this._reactName=o,this._targetInst=d,this.type=l,this.nativeEvent=g,this.target=S,this.currentTarget=null,t)t.hasOwnProperty(D)&&(o=t[D],this[D]=o?o(g):g[D]);return this.isDefaultPrevented=(g.defaultPrevented==null?g.returnValue===!1:g.defaultPrevented)?Io:Is,this.isPropagationStopped=Is,this}return _(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Io)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Io)},persist:function(){},isPersistent:Io}),r}var Jr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$i=xn(Jr),jo=_({},Jr,{view:0,detail:0}),u=xn(jo),m,y,b,x=_({},jo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:we,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==b&&(b&&t.type==="mousemove"?(m=t.screenX-b.screenX,y=t.screenY-b.screenY):y=m=0,b=t),m)},movementY:function(t){return"movementY"in t?t.movementY:y}}),k=xn(x),T=xn(_({},x,{dataTransfer:0})),O=xn(_({},jo,{relatedTarget:0})),M=xn(_({},Jr,{animationName:0,elapsedTime:0,pseudoElement:0})),z=xn(_({},Jr,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}})),I=xn(_({},Jr,{data:0})),ae={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ne={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},J={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function X(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=J[t])?!!r[t]:!1}function we(){return X}var _e=xn(_({},jo,{key:function(t){if(t.key){var r=ae[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=Ao(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?ne[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:we,charCode:function(t){return t.type==="keypress"?Ao(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Ao(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}})),je=xn(_({},x,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Se=xn(_({},jo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:we})),Ie=xn(_({},Jr,{propertyName:0,elapsedTime:0,pseudoElement:0})),lt=xn(_({},x,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0})),Xe=xn(_({},Jr,{newState:0,oldState:0})),Ot=[9,13,27,32],Pt=Ar&&"CompositionEvent"in window,ze=null;Ar&&"documentMode"in document&&(ze=document.documentMode);var Ke=Ar&&"TextEvent"in window&&!ze,Jt=Ar&&(!Pt||ze&&8<ze&&11>=ze),Xt=" ",ln=!1;function qo(t,r){switch(t){case"keyup":return Ot.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uc(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Wi=!1;function js(t,r){switch(t){case"compositionend":return uc(r);case"keypress":return r.which===32?(ln=!0,Xt):null;case"textInput":return t=r.data,t===Xt&&ln?null:t;default:return null}}function ME(t,r){if(Wi)return t==="compositionend"||!Pt&&qo(t,r)?(t=As(),Lo=Ls=Gr=null,Wi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Jt&&r.locale!=="ko"?null:r.data;default:return null}}var LE={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ay(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!LE[t.type]:r==="textarea"}function Iy(t,r,o,l){Gt?Vi?Vi.push(l):Vi=[l]:Gt=l,r=Jc(r,"onChange"),0<r.length&&(o=new $i("onChange","change",null,o,l),t.push({event:o,listeners:r}))}var qs=null,zs=null;function AE(t){pb(t,0)}function dc(t){if(oc(wt(t)))return t}function jy(t,r){if(t==="change")return r}var qy=!1;if(Ar){var cf;if(Ar){var uf="oninput"in document;if(!uf){var zy=document.createElement("div");zy.setAttribute("oninput","return;"),uf=typeof zy.oninput=="function"}cf=uf}else cf=!1;qy=cf&&(!document.documentMode||9<document.documentMode)}function Fy(){qs&&(qs.detachEvent("onpropertychange",By),zs=qs=null)}function By(t){if(t.propertyName==="value"&&dc(zs)){var r=[];Iy(r,zs,t,Da(t)),cc(AE,r)}}function IE(t,r,o){t==="focusin"?(Fy(),qs=r,zs=o,qs.attachEvent("onpropertychange",By)):t==="focusout"&&Fy()}function jE(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return dc(zs)}function qE(t,r){if(t==="click")return dc(r)}function zE(t,r){if(t==="input"||t==="change")return dc(r)}function FE(t,r){return t===r&&(t!==0||1/t==1/r)||t!==t&&r!==r}var nr=typeof Object.is=="function"?Object.is:FE;function Fs(t,r){if(nr(t,r))return!0;if(typeof t!="object"||!t||typeof r!="object"||!r)return!1;var o=Object.keys(t),l=Object.keys(r);if(o.length!==l.length)return!1;for(l=0;l<o.length;l++){var d=o[l];if(!hn.call(r,d)||!nr(t[d],r[d]))return!1}return!0}function Hy(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Vy(t,r){var o=Hy(t);t=0;for(var l;o;){if(o.nodeType===3){if(l=t+o.textContent.length,t<=r&&l>=r)return{node:o,offset:r-t};t=l}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Hy(o)}}function $y(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?$y(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function Wy(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=Ro(t.document);r instanceof t.HTMLIFrameElement;){try{var o=typeof r.contentWindow.location.href=="string"}catch{o=!1}if(o)t=r.contentWindow;else break;r=Ro(t.document)}return r}function df(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}var BE=Ar&&"documentMode"in document&&11>=document.documentMode,Oa=null,ff=null,Bs=null,pf=!1;function Uy(t,r,o){var l=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;pf||Oa==null||Oa!==Ro(l)||(l=Oa,"selectionStart"in l&&df(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Bs&&Fs(Bs,l)||(Bs=l,l=Jc(ff,"onSelect"),0<l.length&&(r=new $i("onSelect","select",null,r,o),t.push({event:r,listeners:l}),r.target=Oa)))}function zo(t,r){var o={};return o[t.toLowerCase()]=r.toLowerCase(),o["Webkit"+t]="webkit"+r,o["Moz"+t]="moz"+r,o}var Pa={animationend:zo("Animation","AnimationEnd"),animationiteration:zo("Animation","AnimationIteration"),animationstart:zo("Animation","AnimationStart"),transitionrun:zo("Transition","TransitionRun"),transitionstart:zo("Transition","TransitionStart"),transitioncancel:zo("Transition","TransitionCancel"),transitionend:zo("Transition","TransitionEnd")},mf={},Ky={};Ar&&(Ky=document.createElement("div").style,"AnimationEvent"in window||(delete Pa.animationend.animation,delete Pa.animationiteration.animation,delete Pa.animationstart.animation),"TransitionEvent"in window||delete Pa.transitionend.transition);function Fo(t){if(mf[t])return mf[t];if(!Pa[t])return t;var r=Pa[t],o;for(o in r)if(r.hasOwnProperty(o)&&o in Ky)return mf[t]=r[o];return t}var Qy=Fo("animationend"),Gy=Fo("animationiteration"),Jy=Fo("animationstart"),HE=Fo("transitionrun"),VE=Fo("transitionstart"),$E=Fo("transitioncancel"),Xy=Fo("transitionend"),Yy=new Map,hf="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");hf.push("scrollEnd");function Ir(t,r){Yy.set(t,r),$t(r,[t])}var Zy=new WeakMap;function gr(t,r){if(typeof t=="object"&&t){var o=Zy.get(t);return o===void 0?(r={value:t,source:r,stack:Es(r)},Zy.set(t,r),r):o}return{value:t,source:r,stack:Es(r)}}var yr=[],Na=0,gf=0;function fc(){for(var t=Na,r=gf=Na=0;r<t;){var o=yr[r];yr[r++]=null;var l=yr[r];yr[r++]=null;var d=yr[r];yr[r++]=null;var g=yr[r];if(yr[r++]=null,l!==null&&d!==null){var S=l.pending;S===null?d.next=d:(d.next=S.next,S.next=d),l.pending=d}g!==0&&ev(o,d,g)}}function pc(t,r,o,l){yr[Na++]=t,yr[Na++]=r,yr[Na++]=o,yr[Na++]=l,gf|=l,t.lanes|=l,t=t.alternate,t!==null&&(t.lanes|=l)}function yf(t,r,o,l){return pc(t,r,o,l),mc(t)}function Ma(t,r){return pc(t,null,null,r),mc(t)}function ev(t,r,o){t.lanes|=o;var l=t.alternate;l!==null&&(l.lanes|=o);for(var d=!1,g=t.return;g!==null;)g.childLanes|=o,l=g.alternate,l!==null&&(l.childLanes|=o),g.tag===22&&(t=g.stateNode,t===null||t._visibility&1||(d=!0)),t=g,g=g.return;return t.tag===3?(g=t.stateNode,d&&r!==null&&(d=31-Ft(o),t=g.hiddenUpdates,l=t[d],l===null?t[d]=[r]:l.push(r),r.lane=o|536870912),g):null}function mc(t){if(50<fl)throw fl=0,kp=null,Error(s(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var La={};function WE(t,r,o,l){this.tag=t,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rr(t,r,o,l){return new WE(t,r,o,l)}function vf(t){return t=t.prototype,!(!t||!t.isReactComponent)}function fi(t,r){var o=t.alternate;return o===null?(o=rr(t.tag,r,t.key,t.mode),o.elementType=t.elementType,o.type=t.type,o.stateNode=t.stateNode,o.alternate=t,t.alternate=o):(o.pendingProps=r,o.type=t.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=t.flags&65011712,o.childLanes=t.childLanes,o.lanes=t.lanes,o.child=t.child,o.memoizedProps=t.memoizedProps,o.memoizedState=t.memoizedState,o.updateQueue=t.updateQueue,r=t.dependencies,o.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},o.sibling=t.sibling,o.index=t.index,o.ref=t.ref,o.refCleanup=t.refCleanup,o}function tv(t,r){t.flags&=65011714;var o=t.alternate;return o===null?(t.childLanes=0,t.lanes=r,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=o.childLanes,t.lanes=o.lanes,t.child=o.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=o.memoizedProps,t.memoizedState=o.memoizedState,t.updateQueue=o.updateQueue,t.type=o.type,r=o.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function hc(t,r,o,l,d,g){var S=0;if(l=t,typeof t=="function")vf(t)&&(S=1);else if(typeof t=="string")S=Q3(t,o,Ne.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case pe:return t=rr(31,o,r,d),t.elementType=pe,t.lanes=g,t;case L:return Bo(o.children,d,g,r);case H:S=8,d|=24;break;case W:return t=rr(12,o,r,d|2),t.elementType=W,t.lanes=g,t;case N:return t=rr(13,o,r,d),t.elementType=N,t.lanes=g,t;case j:return t=rr(19,o,r,d),t.elementType=j,t.lanes=g,t;default:if(typeof t=="object"&&t)switch(t.$$typeof){case U:case G:S=10;break e;case A:S=9;break e;case he:S=11;break e;case V:S=14;break e;case de:S=16,l=null;break e}S=29,o=Error(s(130,t===null?"null":typeof t,"")),l=null}return r=rr(S,o,r,d),r.elementType=t,r.type=l,r.lanes=g,r}function Bo(t,r,o,l){return t=rr(7,t,l,r),t.lanes=o,t}function bf(t,r,o){return t=rr(6,t,null,r),t.lanes=o,t}function wf(t,r,o){return r=rr(4,t.children===null?[]:t.children,t.key,r),r.lanes=o,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var Aa=[],Ia=0,gc=null,yc=0,vr=[],br=0,Ho=null,pi=1,mi="";function Vo(t,r){Aa[Ia++]=yc,Aa[Ia++]=gc,gc=t,yc=r}function nv(t,r,o){vr[br++]=pi,vr[br++]=mi,vr[br++]=Ho,Ho=t;var l=pi;t=mi;var d=32-Ft(l)-1;l&=~(1<<d),o+=1;var g=32-Ft(r)+d;if(30<g){var S=d-d%5;g=(l&(1<<S)-1).toString(32),l>>=S,d-=S,pi=1<<32-Ft(r)+d|o<<d|l,mi=g+t}else pi=1<<g|o<<d|l,mi=t}function _f(t){t.return!==null&&(Vo(t,1),nv(t,1,0))}function xf(t){for(;t===gc;)gc=Aa[--Ia],Aa[Ia]=null,yc=Aa[--Ia],Aa[Ia]=null;for(;t===Ho;)Ho=vr[--br],vr[br]=null,mi=vr[--br],vr[br]=null,pi=vr[--br],vr[br]=null}var jn=null,Wt=null,pt=!1,$o=null,Xr=!1,kf=Error(s(519));function Wo(t){throw $s(gr(Error(s(418,"")),t)),kf}function rv(t){var r=t.stateNode,o=t.type,l=t.memoizedProps;switch(r[bt]=t,r[jt]=l,o){case"dialog":rt("cancel",r),rt("close",r);break;case"iframe":case"object":case"embed":rt("load",r);break;case"video":case"audio":for(o=0;o<ml.length;o++)rt(ml[o],r);break;case"source":rt("error",r);break;case"img":case"image":case"link":rt("error",r),rt("load",r);break;case"details":rt("toggle",r);break;case"input":rt("invalid",r),Do(r,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0),To(r);break;case"select":rt("invalid",r);break;case"textarea":rt("invalid",r),Hi(r,l.value,l.defaultValue,l.children),To(r)}o=l.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||r.textContent===""+o||l.suppressHydrationWarning===!0||vb(r.textContent,o)?(l.popover!=null&&(rt("beforetoggle",r),rt("toggle",r)),l.onScroll!=null&&rt("scroll",r),l.onScrollEnd!=null&&rt("scrollend",r),l.onClick!=null&&(r.onclick=Xc),r=!0):r=!1,r||Wo(t)}function iv(t){for(jn=t.return;jn;)switch(jn.tag){case 5:case 13:Xr=!1;return;case 27:case 3:Xr=!0;return;default:jn=jn.return}}function Hs(t){if(t!==jn)return!1;if(!pt)return iv(t),pt=!0,!1;var r=t.tag,o;if((o=r!==3&&r!==27)&&((o=r===5)&&(o=t.type,o=!(o!=="form"&&o!=="button")||qp(t.type,t.memoizedProps)),o=!o),o&&Wt&&Wo(t),iv(t),r===13){if(t=t.memoizedState,t=t===null?null:t.dehydrated,!t)throw Error(s(317));e:{for(t=t.nextSibling,r=0;t;){if(t.nodeType===8)if(o=t.data,o==="/$"){if(r===0){Wt=qr(t.nextSibling);break e}r--}else o!=="$"&&o!=="$!"&&o!=="$?"||r++;t=t.nextSibling}Wt=null}}else r===27?(r=Wt,oo(t.type)?(t=Hp,Hp=null,Wt=t):Wt=r):Wt=jn?qr(t.stateNode.nextSibling):null;return!0}function Vs(){Wt=jn=null,pt=!1}function ov(){var t=$o;return t!==null&&(Wn===null?Wn=t:Wn.push.apply(Wn,t),$o=null),t}function $s(t){$o===null?$o=[t]:$o.push(t)}var Cf=Fe(null),Uo=null,hi=null;function Ui(t,r,o){De(Cf,r._currentValue),r._currentValue=o}function gi(t){t._currentValue=Cf.current,We(Cf)}function Sf(t,r,o){for(;t!==null;){var l=t.alternate;if((t.childLanes&r)===r?l!==null&&(l.childLanes&r)!==r&&(l.childLanes|=r):(t.childLanes|=r,l!==null&&(l.childLanes|=r)),t===o)break;t=t.return}}function Ef(t,r,o,l){var d=t.child;for(d!==null&&(d.return=t);d!==null;){var g=d.dependencies;if(g!==null){var S=d.child;g=g.firstContext;e:for(;g!==null;){var D=g;g=d;for(var F=0;F<r.length;F++)if(D.context===r[F]){g.lanes|=o,D=g.alternate,D!==null&&(D.lanes|=o),Sf(g.return,o,t),l||(S=null);break e}g=D.next}}else if(d.tag===18){if(S=d.return,S===null)throw Error(s(341));S.lanes|=o,g=S.alternate,g!==null&&(g.lanes|=o),Sf(S,o,t),S=null}else S=d.child;if(S!==null)S.return=d;else for(S=d;S!==null;){if(S===t){S=null;break}if(d=S.sibling,d!==null){d.return=S.return,S=d;break}S=S.return}d=S}}function Ws(t,r,o,l){t=null;for(var d=r,g=!1;d!==null;){if(!g){if(d.flags&524288)g=!0;else if(d.flags&262144)break}if(d.tag===10){var S=d.alternate;if(S===null)throw Error(s(387));if(S=S.memoizedProps,S!==null){var D=d.type;nr(d.pendingProps.value,S.value)||(t===null?t=[D]:t.push(D))}}else if(d===Dn.current){if(S=d.alternate,S===null)throw Error(s(387));S.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(t===null?t=[wl]:t.push(wl))}d=d.return}t!==null&&Ef(r,t,o,l),r.flags|=262144}function vc(t){for(t=t.firstContext;t!==null;){if(!nr(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Ko(t){Uo=t,hi=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Nn(t){return av(Uo,t)}function bc(t,r){return Uo===null&&Ko(t),av(t,r)}function av(t,r){var o=r._currentValue;if(r={context:r,memoizedValue:o,next:null},hi===null){if(t===null)throw Error(s(308));hi=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else hi=hi.next=r;return o}var UE=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(o,l){t.push(l)}};this.abort=function(){r.aborted=!0,t.forEach(function(o){return o()})}},KE=n.unstable_scheduleCallback,QE=n.unstable_NormalPriority,cn={$$typeof:G,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Tf(){return{controller:new UE,data:new Map,refCount:0}}function Us(t){t.refCount--,t.refCount===0&&KE(QE,function(){t.controller.abort()})}var Ks=null,Rf=0,ja=0,qa=null;function GE(t,r){if(Ks===null){var o=Ks=[];Rf=0,ja=Op(),qa={status:"pending",value:void 0,then:function(l){o.push(l)}}}return Rf++,r.then(sv,sv),r}function sv(){if(--Rf===0&&Ks!==null){qa!==null&&(qa.status="fulfilled");var t=Ks;Ks=null,ja=0,qa=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function JE(t,r){var o=[],l={status:"pending",value:null,reason:null,then:function(d){o.push(d)}};return t.then(function(){l.status="fulfilled",l.value=r;for(var d=0;d<o.length;d++)(0,o[d])(r)},function(d){for(l.status="rejected",l.reason=d,d=0;d<o.length;d++)(0,o[d])(void 0)}),l}var lv=le.S;le.S=function(t,r){typeof r=="object"&&r&&typeof r.then=="function"&&GE(t,r),lv!==null&&lv(t,r)};var Qo=Fe(null);function Df(){var t=Qo.current;return t===null?Lt.pooledCache:t}function wc(t,r){r===null?De(Qo,Qo.current):De(Qo,r.pool)}function cv(){var t=Df();return t===null?null:{parent:cn._currentValue,pool:t}}var Qs=Error(s(460)),uv=Error(s(474)),_c=Error(s(542)),Of={then:function(){}};function dv(t){return t=t.status,t==="fulfilled"||t==="rejected"}function xc(){}function fv(t,r,o){switch(o=t[o],o===void 0?t.push(r):o!==r&&(r.then(xc,xc),r=o),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,mv(t),t;default:if(typeof r.status=="string")r.then(xc,xc);else{if(t=Lt,t!==null&&100<t.shellSuspendCounter)throw Error(s(482));t=r,t.status="pending",t.then(function(l){if(r.status==="pending"){var d=r;d.status="fulfilled",d.value=l}},function(l){if(r.status==="pending"){var d=r;d.status="rejected",d.reason=l}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,mv(t),t}throw Gs=r,Qs}}var Gs=null;function pv(){if(Gs===null)throw Error(s(459));var t=Gs;return Gs=null,t}function mv(t){if(t===Qs||t===_c)throw Error(s(483))}var Ki=!1;function Pf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Nf(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Go(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Jo(t,r,o){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,_t&2){var d=l.pending;return d===null?r.next=r:(r.next=d.next,d.next=r),l.pending=r,r=mc(t),ev(t,null,o),r}return pc(t,l,r,o),mc(t)}function Js(t,r,o){if(r=r.updateQueue,r!==null&&(r=r.shared,o&4194048)){var l=r.lanes;l&=t.pendingLanes,o|=l,r.lanes=o,In(t,o)}}function Mf(t,r){var o=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,o===l)){var d=null,g=null;if(o=o.firstBaseUpdate,o!==null){do{var S={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};g===null?d=g=S:g=g.next=S,o=o.next}while(o!==null);g===null?d=g=r:g=g.next=r}else d=g=r;o={baseState:l.baseState,firstBaseUpdate:d,lastBaseUpdate:g,shared:l.shared,callbacks:l.callbacks},t.updateQueue=o;return}t=o.lastBaseUpdate,t===null?o.firstBaseUpdate=r:t.next=r,o.lastBaseUpdate=r}var Lf=!1;function Xs(){if(Lf){var t=qa;if(t!==null)throw t}}function Ys(t,r,o,l){Lf=!1;var d=t.updateQueue;Ki=!1;var g=d.firstBaseUpdate,S=d.lastBaseUpdate,D=d.shared.pending;if(D!==null){d.shared.pending=null;var F=D,te=F.next;F.next=null,S===null?g=te:S.next=te,S=F;var fe=t.alternate;fe!==null&&(fe=fe.updateQueue,D=fe.lastBaseUpdate,D!==S&&(D===null?fe.firstBaseUpdate=te:D.next=te,fe.lastBaseUpdate=F))}if(g!==null){var ve=d.baseState;S=0,fe=te=F=null,D=g;do{var ie=D.lane&-536870913,se=ie!==D.lane;if(se?(at&ie)===ie:(l&ie)===ie){ie!==0&&ie===ja&&(Lf=!0),fe!==null&&(fe=fe.next={lane:0,tag:D.tag,payload:D.payload,callback:null,next:null});e:{var qe=t,Me=D;ie=r;var Rt=o;switch(Me.tag){case 1:if(qe=Me.payload,typeof qe=="function"){ve=qe.call(Rt,ve,ie);break e}ve=qe;break e;case 3:qe.flags=qe.flags&-65537|128;case 0:if(qe=Me.payload,ie=typeof qe=="function"?qe.call(Rt,ve,ie):qe,ie==null)break e;ve=_({},ve,ie);break e;case 2:Ki=!0}}ie=D.callback,ie!==null&&(t.flags|=64,se&&(t.flags|=8192),se=d.callbacks,se===null?d.callbacks=[ie]:se.push(ie))}else se={lane:ie,tag:D.tag,payload:D.payload,callback:D.callback,next:null},fe===null?(te=fe=se,F=ve):fe=fe.next=se,S|=ie;if(D=D.next,D===null){if(D=d.shared.pending,D===null)break;se=D,D=se.next,se.next=null,d.lastBaseUpdate=se,d.shared.pending=null}}while(!0);fe===null&&(F=ve),d.baseState=F,d.firstBaseUpdate=te,d.lastBaseUpdate=fe,g===null&&(d.shared.lanes=0),to|=S,t.lanes=S,t.memoizedState=ve}}function hv(t,r){if(typeof t!="function")throw Error(s(191,t));t.call(r)}function gv(t,r){var o=t.callbacks;if(o!==null)for(t.callbacks=null,t=0;t<o.length;t++)hv(o[t],r)}var za=Fe(null),kc=Fe(0);function yv(t,r){t=Ci,De(kc,t),De(za,r),Ci=t|r.baseLanes}function Af(){De(kc,Ci),De(za,za.current)}function If(){Ci=kc.current,We(za),We(kc)}var Qi=0,Ye=null,Et=null,rn=null,Cc=!1,Fa=!1,Xo=!1,Sc=0,Zs=0,Ba=null,XE=0;function Yt(){throw Error(s(321))}function jf(t,r){if(r===null)return!1;for(var o=0;o<r.length&&o<t.length;o++)if(!nr(t[o],r[o]))return!1;return!0}function qf(t,r,o,l,d,g){return Qi=g,Ye=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,le.H=t===null||t.memoizedState===null?e1:t1,Xo=!1,g=o(l,d),Xo=!1,Fa&&(g=bv(r,o,l,d)),vv(t),g}function vv(t){le.H=Pc;var r=Et!==null&&Et.next!==null;if(Qi=0,rn=Et=Ye=null,Cc=!1,Zs=0,Ba=null,r)throw Error(s(300));t===null||bn||(t=t.dependencies,t!==null&&vc(t)&&(bn=!0))}function bv(t,r,o,l){Ye=t;var d=0;do{if(Fa&&(Ba=null),Zs=0,Fa=!1,25<=d)throw Error(s(301));if(d+=1,rn=Et=null,t.updateQueue!=null){var g=t.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}le.H=i3,g=r(o,l)}while(Fa);return g}function YE(){var t=le.H,r=t.useState()[0];return r=typeof r.then=="function"?el(r):r,t=t.useState()[0],(Et===null?null:Et.memoizedState)!==t&&(Ye.flags|=1024),r}function zf(){var t=Sc!==0;return Sc=0,t}function Ff(t,r,o){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~o}function Bf(t){if(Cc){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}Cc=!1}Qi=0,rn=Et=Ye=null,Fa=!1,Zs=Sc=0,Ba=null}function Vn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rn===null?Ye.memoizedState=rn=t:rn=rn.next=t,rn}function on(){if(Et===null){var t=Ye.alternate;t=t===null?null:t.memoizedState}else t=Et.next;var r=rn===null?Ye.memoizedState:rn.next;if(r!==null)rn=r,Et=t;else{if(t===null)throw Ye.alternate===null?Error(s(467)):Error(s(310));Et=t,t={memoizedState:Et.memoizedState,baseState:Et.baseState,baseQueue:Et.baseQueue,queue:Et.queue,next:null},rn===null?Ye.memoizedState=rn=t:rn=rn.next=t}return rn}function Hf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function el(t){var r=Zs;return Zs+=1,Ba===null&&(Ba=[]),t=fv(Ba,t,r),r=Ye,(rn===null?r.memoizedState:rn.next)===null&&(r=r.alternate,le.H=r===null||r.memoizedState===null?e1:t1),t}function Ec(t){if(typeof t=="object"&&t){if(typeof t.then=="function")return el(t);if(t.$$typeof===G)return Nn(t)}throw Error(s(438,String(t)))}function Vf(t){var r=null,o=Ye.updateQueue;if(o!==null&&(r=o.memoCache),r==null){var l=Ye.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(r={data:l.data.map(function(d){return d.slice()}),index:0})))}if(r??(r={data:[],index:0}),o===null&&(o=Hf(),Ye.updateQueue=o),o.memoCache=r,o=r.data[r.index],o===void 0)for(o=r.data[r.index]=Array(t),l=0;l<t;l++)o[l]=xe;return r.index++,o}function yi(t,r){return typeof r=="function"?r(t):r}function Tc(t){return $f(on(),Et,t)}function $f(t,r,o){var l=t.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=o;var d=t.baseQueue,g=l.pending;if(g!==null){if(d!==null){var S=d.next;d.next=g.next,g.next=S}r.baseQueue=d=g,l.pending=null}if(g=t.baseState,d===null)t.memoizedState=g;else{r=d.next;var D=S=null,F=null,te=r,fe=!1;do{var ve=te.lane&-536870913;if(ve===te.lane?(Qi&ve)===ve:(at&ve)===ve){var ie=te.revertLane;if(ie===0)F!==null&&(F=F.next={lane:0,revertLane:0,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),ve===ja&&(fe=!0);else if((Qi&ie)===ie){te=te.next,ie===ja&&(fe=!0);continue}else ve={lane:0,revertLane:te.revertLane,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},F===null?(D=F=ve,S=g):F=F.next=ve,Ye.lanes|=ie,to|=ie;ve=te.action,Xo&&o(g,ve),g=te.hasEagerState?te.eagerState:o(g,ve)}else ie={lane:ve,revertLane:te.revertLane,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},F===null?(D=F=ie,S=g):F=F.next=ie,Ye.lanes|=ve,to|=ve;te=te.next}while(te!==null&&te!==r);if(F===null?S=g:F.next=D,!nr(g,t.memoizedState)&&(bn=!0,fe&&(o=qa,o!==null)))throw o;t.memoizedState=g,t.baseState=S,t.baseQueue=F,l.lastRenderedState=g}return d===null&&(l.lanes=0),[t.memoizedState,l.dispatch]}function Wf(t){var r=on(),o=r.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=t;var l=o.dispatch,d=o.pending,g=r.memoizedState;if(d!==null){o.pending=null;var S=d=d.next;do g=t(g,S.action),S=S.next;while(S!==d);nr(g,r.memoizedState)||(bn=!0),r.memoizedState=g,r.baseQueue===null&&(r.baseState=g),o.lastRenderedState=g}return[g,l]}function wv(t,r,o){var l=Ye,d=on(),g=pt;if(g){if(o===void 0)throw Error(s(407));o=o()}else o=r();var S=!nr((Et||d).memoizedState,o);if(S&&(d.memoizedState=o,bn=!0),d=d.queue,tl(2048,8,kv.bind(null,l,d,t),[t]),d.getSnapshot!==r||S||rn!==null&&rn.memoizedState.tag&1){if(l.flags|=2048,Ha(9,Rc(),xv.bind(null,l,d,o,r),null),Lt===null)throw Error(s(349));g||Qi&124||_v(l,r,o)}return o}function _v(t,r,o){t.flags|=16384,t={getSnapshot:r,value:o},r=Ye.updateQueue,r===null?(r=Hf(),Ye.updateQueue=r,r.stores=[t]):(o=r.stores,o===null?r.stores=[t]:o.push(t))}function xv(t,r,o,l){r.value=o,r.getSnapshot=l,Cv(r)&&Sv(t)}function kv(t,r,o){return o(function(){Cv(r)&&Sv(t)})}function Cv(t){var r=t.getSnapshot;t=t.value;try{var o=r();return!nr(t,o)}catch{return!0}}function Sv(t){var r=Ma(t,2);r!==null&&sr(r,t,2)}function Uf(t){var r=Vn();if(typeof t=="function"){var o=t;if(t=o(),Xo){yt(!0);try{o()}finally{yt(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:yi,lastRenderedState:t},r}function Ev(t,r,o,l){return t.baseState=o,$f(t,Et,typeof l=="function"?l:yi)}function ZE(t,r,o,l,d){if(Oc(t))throw Error(s(485));if(t=r.action,t!==null){var g={payload:d,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){g.listeners.push(S)}};le.T===null?g.isTransition=!1:o(!0),l(g),o=r.pending,o===null?(g.next=r.pending=g,Tv(r,g)):(g.next=o.next,r.pending=o.next=g)}}function Tv(t,r){var o=r.action,l=r.payload,d=t.state;if(r.isTransition){var g=le.T,S={};le.T=S;try{var D=o(d,l),F=le.S;F!==null&&F(S,D),Rv(t,r,D)}catch(te){Kf(t,r,te)}finally{le.T=g}}else try{g=o(d,l),Rv(t,r,g)}catch(te){Kf(t,r,te)}}function Rv(t,r,o){typeof o=="object"&&o&&typeof o.then=="function"?o.then(function(l){Dv(t,r,l)},function(l){return Kf(t,r,l)}):Dv(t,r,o)}function Dv(t,r,o){r.status="fulfilled",r.value=o,Ov(r),t.state=o,r=t.pending,r!==null&&(o=r.next,o===r?t.pending=null:(o=o.next,r.next=o,Tv(t,o)))}function Kf(t,r,o){var l=t.pending;if(t.pending=null,l!==null){l=l.next;do r.status="rejected",r.reason=o,Ov(r),r=r.next;while(r!==l)}t.action=null}function Ov(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function Pv(t,r){return r}function Nv(t,r){if(pt){var o=Lt.formState;if(o!==null){e:{var l=Ye;if(pt){if(Wt){t:{for(var d=Wt,g=Xr;d.nodeType!==8;){if(!g){d=null;break t}if(d=qr(d.nextSibling),d===null){d=null;break t}}g=d.data,d=g==="F!"||g==="F"?d:null}if(d){Wt=qr(d.nextSibling),l=d.data==="F!";break e}}Wo(l)}l=!1}l&&(r=o[0])}}return o=Vn(),o.memoizedState=o.baseState=r,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pv,lastRenderedState:r},o.queue=l,o=Xv.bind(null,Ye,l),l.dispatch=o,l=Uf(!1),g=Yf.bind(null,Ye,!1,l.queue),l=Vn(),d={state:r,dispatch:null,action:t,pending:null},l.queue=d,o=ZE.bind(null,Ye,d,g,o),d.dispatch=o,l.memoizedState=t,[r,o,!1]}function Mv(t){return Lv(on(),Et,t)}function Lv(t,r,o){if(r=$f(t,r,Pv)[0],t=Tc(yi)[0],typeof r=="object"&&r&&typeof r.then=="function")try{var l=el(r)}catch(S){throw S===Qs?_c:S}else l=r;r=on();var d=r.queue,g=d.dispatch;return o!==r.memoizedState&&(Ye.flags|=2048,Ha(9,Rc(),e3.bind(null,d,o),null)),[l,g,t]}function e3(t,r){t.action=r}function Av(t){var r=on(),o=Et;if(o!==null)return Lv(r,o,t);on(),r=r.memoizedState,o=on();var l=o.queue.dispatch;return o.memoizedState=t,[r,l,!1]}function Ha(t,r,o,l){return t={tag:t,create:o,deps:l,inst:r,next:null},r=Ye.updateQueue,r===null&&(r=Hf(),Ye.updateQueue=r),o=r.lastEffect,o===null?r.lastEffect=t.next=t:(l=o.next,o.next=t,t.next=l,r.lastEffect=t),t}function Rc(){return{destroy:void 0,resource:void 0}}function Iv(){return on().memoizedState}function Dc(t,r,o,l){var d=Vn();l=l===void 0?null:l,Ye.flags|=t,d.memoizedState=Ha(1|r,Rc(),o,l)}function tl(t,r,o,l){var d=on();l=l===void 0?null:l;var g=d.memoizedState.inst;Et!==null&&l!==null&&jf(l,Et.memoizedState.deps)?d.memoizedState=Ha(r,g,o,l):(Ye.flags|=t,d.memoizedState=Ha(1|r,g,o,l))}function jv(t,r){Dc(8390656,8,t,r)}function qv(t,r){tl(2048,8,t,r)}function zv(t,r){return tl(4,2,t,r)}function Fv(t,r){return tl(4,4,t,r)}function Bv(t,r){if(typeof r=="function"){t=t();var o=r(t);return function(){typeof o=="function"?o():r(null)}}if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function Hv(t,r,o){o=o==null?null:o.concat([t]),tl(4,4,Bv.bind(null,r,t),o)}function Qf(){}function Vv(t,r){var o=on();r=r===void 0?null:r;var l=o.memoizedState;return r!==null&&jf(r,l[1])?l[0]:(o.memoizedState=[t,r],t)}function $v(t,r){var o=on();r=r===void 0?null:r;var l=o.memoizedState;if(r!==null&&jf(r,l[1]))return l[0];if(l=t(),Xo){yt(!0);try{t()}finally{yt(!1)}}return o.memoizedState=[l,r],l}function Gf(t,r,o){return o===void 0||Qi&1073741824?t.memoizedState=r:(t.memoizedState=o,t=$1(),Ye.lanes|=t,to|=t,o)}function Wv(t,r,o,l){return nr(o,r)?o:za.current===null?Qi&42?(t=$1(),Ye.lanes|=t,to|=t,r):(bn=!0,t.memoizedState=o):(t=Gf(t,o,l),nr(t,r)||(bn=!0),t)}function Uv(t,r,o,l,d){var g=K.p;K.p=g!==0&&8>g?g:8;var S=le.T,D={};le.T=D,Yf(t,!1,r,o);try{var F=d(),te=le.S;te!==null&&te(D,F),typeof F=="object"&&F&&typeof F.then=="function"?nl(t,r,JE(F,l),xr(t)):nl(t,r,l,xr(t))}catch(fe){nl(t,r,{then:function(){},status:"rejected",reason:fe},xr())}finally{K.p=g,le.T=S}}function t3(){}function Jf(t,r,o,l){if(t.tag!==5)throw Error(s(476));var d=Kv(t).queue;Uv(t,d,r,Ae,o===null?t3:function(){return Qv(t),o(l)})}function Kv(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:Ae,baseState:Ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yi,lastRenderedState:Ae},next:null};var o={};return r.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yi,lastRenderedState:o},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function Qv(t){var r=Kv(t).next.queue;nl(t,r,{},xr())}function Xf(){return Nn(wl)}function Gv(){return on().memoizedState}function Jv(){return on().memoizedState}function n3(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var o=xr();t=Go(o);var l=Jo(r,t,o);l!==null&&(sr(l,r,o),Js(l,r,o)),r={cache:Tf()},t.payload=r;return}r=r.return}}function r3(t,r,o){var l=xr();o={lane:l,revertLane:0,action:o,hasEagerState:!1,eagerState:null,next:null},Oc(t)?Yv(r,o):(o=yf(t,r,o,l),o!==null&&(sr(o,t,l),Zv(o,r,l)))}function Xv(t,r,o){nl(t,r,o,xr())}function nl(t,r,o,l){var d={lane:l,revertLane:0,action:o,hasEagerState:!1,eagerState:null,next:null};if(Oc(t))Yv(r,d);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=r.lastRenderedReducer,g!==null))try{var S=r.lastRenderedState,D=g(S,o);if(d.hasEagerState=!0,d.eagerState=D,nr(D,S))return pc(t,r,d,0),Lt===null&&fc(),!1}catch{}if(o=yf(t,r,d,l),o!==null)return sr(o,t,l),Zv(o,r,l),!0}return!1}function Yf(t,r,o,l){if(l={lane:2,revertLane:Op(),action:l,hasEagerState:!1,eagerState:null,next:null},Oc(t)){if(r)throw Error(s(479))}else r=yf(t,o,l,2),r!==null&&sr(r,t,2)}function Oc(t){var r=t.alternate;return t===Ye||r!==null&&r===Ye}function Yv(t,r){Fa=Cc=!0;var o=t.pending;o===null?r.next=r:(r.next=o.next,o.next=r),t.pending=r}function Zv(t,r,o){if(o&4194048){var l=r.lanes;l&=t.pendingLanes,o|=l,r.lanes=o,In(t,o)}}var Pc={readContext:Nn,use:Ec,useCallback:Yt,useContext:Yt,useEffect:Yt,useImperativeHandle:Yt,useLayoutEffect:Yt,useInsertionEffect:Yt,useMemo:Yt,useReducer:Yt,useRef:Yt,useState:Yt,useDebugValue:Yt,useDeferredValue:Yt,useTransition:Yt,useSyncExternalStore:Yt,useId:Yt,useHostTransitionStatus:Yt,useFormState:Yt,useActionState:Yt,useOptimistic:Yt,useMemoCache:Yt,useCacheRefresh:Yt},e1={readContext:Nn,use:Ec,useCallback:function(t,r){return Vn().memoizedState=[t,r===void 0?null:r],t},useContext:Nn,useEffect:jv,useImperativeHandle:function(t,r,o){o=o==null?null:o.concat([t]),Dc(4194308,4,Bv.bind(null,r,t),o)},useLayoutEffect:function(t,r){return Dc(4194308,4,t,r)},useInsertionEffect:function(t,r){Dc(4,2,t,r)},useMemo:function(t,r){var o=Vn();r=r===void 0?null:r;var l=t();if(Xo){yt(!0);try{t()}finally{yt(!1)}}return o.memoizedState=[l,r],l},useReducer:function(t,r,o){var l=Vn();if(o!==void 0){var d=o(r);if(Xo){yt(!0);try{o(r)}finally{yt(!1)}}}else d=r;return l.memoizedState=l.baseState=d,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:d},l.queue=t,t=t.dispatch=r3.bind(null,Ye,t),[l.memoizedState,t]},useRef:function(t){var r=Vn();return t={current:t},r.memoizedState=t},useState:function(t){t=Uf(t);var r=t.queue,o=Xv.bind(null,Ye,r);return r.dispatch=o,[t.memoizedState,o]},useDebugValue:Qf,useDeferredValue:function(t,r){return Gf(Vn(),t,r)},useTransition:function(){var t=Uf(!1);return t=Uv.bind(null,Ye,t.queue,!0,!1),Vn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,o){var l=Ye,d=Vn();if(pt){if(o===void 0)throw Error(s(407));o=o()}else{if(o=r(),Lt===null)throw Error(s(349));at&124||_v(l,r,o)}d.memoizedState=o;var g={value:o,getSnapshot:r};return d.queue=g,jv(kv.bind(null,l,g,t),[t]),l.flags|=2048,Ha(9,Rc(),xv.bind(null,l,g,o,r),null),o},useId:function(){var t=Vn(),r=Lt.identifierPrefix;if(pt){var o=mi,l=pi;o=(l&~(1<<32-Ft(l)-1)).toString(32)+o,r="\xAB"+r+"R"+o,o=Sc++,0<o&&(r+="H"+o.toString(32)),r+="\xBB"}else o=XE++,r="\xAB"+r+"r"+o.toString(32)+"\xBB";return t.memoizedState=r},useHostTransitionStatus:Xf,useFormState:Nv,useActionState:Nv,useOptimistic:function(t){var r=Vn();r.memoizedState=r.baseState=t;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=o,r=Yf.bind(null,Ye,!0,o),o.dispatch=r,[t,r]},useMemoCache:Vf,useCacheRefresh:function(){return Vn().memoizedState=n3.bind(null,Ye)}},t1={readContext:Nn,use:Ec,useCallback:Vv,useContext:Nn,useEffect:qv,useImperativeHandle:Hv,useInsertionEffect:zv,useLayoutEffect:Fv,useMemo:$v,useReducer:Tc,useRef:Iv,useState:function(){return Tc(yi)},useDebugValue:Qf,useDeferredValue:function(t,r){return Wv(on(),Et.memoizedState,t,r)},useTransition:function(){var t=Tc(yi)[0],r=on().memoizedState;return[typeof t=="boolean"?t:el(t),r]},useSyncExternalStore:wv,useId:Gv,useHostTransitionStatus:Xf,useFormState:Mv,useActionState:Mv,useOptimistic:function(t,r){return Ev(on(),Et,t,r)},useMemoCache:Vf,useCacheRefresh:Jv},i3={readContext:Nn,use:Ec,useCallback:Vv,useContext:Nn,useEffect:qv,useImperativeHandle:Hv,useInsertionEffect:zv,useLayoutEffect:Fv,useMemo:$v,useReducer:Wf,useRef:Iv,useState:function(){return Wf(yi)},useDebugValue:Qf,useDeferredValue:function(t,r){var o=on();return Et===null?Gf(o,t,r):Wv(o,Et.memoizedState,t,r)},useTransition:function(){var t=Wf(yi)[0],r=on().memoizedState;return[typeof t=="boolean"?t:el(t),r]},useSyncExternalStore:wv,useId:Gv,useHostTransitionStatus:Xf,useFormState:Av,useActionState:Av,useOptimistic:function(t,r){var o=on();return Et===null?(o.baseState=t,[t,o.queue.dispatch]):Ev(o,Et,t,r)},useMemoCache:Vf,useCacheRefresh:Jv},Va=null,rl=0;function Nc(t){var r=rl;return rl+=1,Va===null&&(Va=[]),fv(Va,t,r)}function il(t,r){r=r.props.ref,t.ref=r===void 0?null:r}function Mc(t,r){throw r.$$typeof===C?Error(s(525)):(t=Object.prototype.toString.call(r),Error(s(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function n1(t){var r=t._init;return r(t._payload)}function r1(t){function r(Q,$){if(t){var Y=Q.deletions;Y===null?(Q.deletions=[$],Q.flags|=16):Y.push($)}}function o(Q,$){if(!t)return null;for(;$!==null;)r(Q,$),$=$.sibling;return null}function l(Q){for(var $=new Map;Q!==null;)Q.key===null?$.set(Q.index,Q):$.set(Q.key,Q),Q=Q.sibling;return $}function d(Q,$){return Q=fi(Q,$),Q.index=0,Q.sibling=null,Q}function g(Q,$,Y){return Q.index=Y,t?(Y=Q.alternate,Y===null?(Q.flags|=67108866,$):(Y=Y.index,Y<$?(Q.flags|=67108866,$):Y)):(Q.flags|=1048576,$)}function S(Q){return t&&Q.alternate===null&&(Q.flags|=67108866),Q}function D(Q,$,Y,me){return $===null||$.tag!==6?($=bf(Y,Q.mode,me),$.return=Q,$):($=d($,Y),$.return=Q,$)}function F(Q,$,Y,me){var Re=Y.type;return Re===L?fe(Q,$,Y.props.children,me,Y.key):$!==null&&($.elementType===Re||typeof Re=="object"&&Re&&Re.$$typeof===de&&n1(Re)===$.type)?($=d($,Y.props),il($,Y),$.return=Q,$):($=hc(Y.type,Y.key,Y.props,null,Q.mode,me),il($,Y),$.return=Q,$)}function te(Q,$,Y,me){return $===null||$.tag!==4||$.stateNode.containerInfo!==Y.containerInfo||$.stateNode.implementation!==Y.implementation?($=wf(Y,Q.mode,me),$.return=Q,$):($=d($,Y.children||[]),$.return=Q,$)}function fe(Q,$,Y,me,Re){return $===null||$.tag!==7?($=Bo(Y,Q.mode,me,Re),$.return=Q,$):($=d($,Y),$.return=Q,$)}function ve(Q,$,Y){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=bf(""+$,Q.mode,Y),$.return=Q,$;if(typeof $=="object"&&$){switch($.$$typeof){case E:return Y=hc($.type,$.key,$.props,null,Q.mode,Y),il(Y,$),Y.return=Q,Y;case R:return $=wf($,Q.mode,Y),$.return=Q,$;case de:var me=$._init;return $=me($._payload),ve(Q,$,Y)}if(oe($)||be($))return $=Bo($,Q.mode,Y,null),$.return=Q,$;if(typeof $.then=="function")return ve(Q,Nc($),Y);if($.$$typeof===G)return ve(Q,bc(Q,$),Y);Mc(Q,$)}return null}function ie(Q,$,Y,me){var Re=$===null?null:$.key;if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return Re===null?D(Q,$,""+Y,me):null;if(typeof Y=="object"&&Y){switch(Y.$$typeof){case E:return Y.key===Re?F(Q,$,Y,me):null;case R:return Y.key===Re?te(Q,$,Y,me):null;case de:return Re=Y._init,Y=Re(Y._payload),ie(Q,$,Y,me)}if(oe(Y)||be(Y))return Re===null?fe(Q,$,Y,me,null):null;if(typeof Y.then=="function")return ie(Q,$,Nc(Y),me);if(Y.$$typeof===G)return ie(Q,$,bc(Q,Y),me);Mc(Q,Y)}return null}function se(Q,$,Y,me,Re){if(typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint")return Q=Q.get(Y)||null,D($,Q,""+me,Re);if(typeof me=="object"&&me){switch(me.$$typeof){case E:return Q=Q.get(me.key===null?Y:me.key)||null,F($,Q,me,Re);case R:return Q=Q.get(me.key===null?Y:me.key)||null,te($,Q,me,Re);case de:var et=me._init;return me=et(me._payload),se(Q,$,Y,me,Re)}if(oe(me)||be(me))return Q=Q.get(Y)||null,fe($,Q,me,Re,null);if(typeof me.then=="function")return se(Q,$,Y,Nc(me),Re);if(me.$$typeof===G)return se(Q,$,Y,bc($,me),Re);Mc($,me)}return null}function qe(Q,$,Y,me){for(var Re=null,et=null,Oe=$,Le=$=0,_n=null;Oe!==null&&Le<Y.length;Le++){Oe.index>Le?(_n=Oe,Oe=null):_n=Oe.sibling;var dt=ie(Q,Oe,Y[Le],me);if(dt===null){Oe===null&&(Oe=_n);break}t&&Oe&&dt.alternate===null&&r(Q,Oe),$=g(dt,$,Le),et===null?Re=dt:et.sibling=dt,et=dt,Oe=_n}if(Le===Y.length)return o(Q,Oe),pt&&Vo(Q,Le),Re;if(Oe===null){for(;Le<Y.length;Le++)Oe=ve(Q,Y[Le],me),Oe!==null&&($=g(Oe,$,Le),et===null?Re=Oe:et.sibling=Oe,et=Oe);return pt&&Vo(Q,Le),Re}for(Oe=l(Oe);Le<Y.length;Le++)_n=se(Oe,Q,Le,Y[Le],me),_n!==null&&(t&&_n.alternate!==null&&Oe.delete(_n.key===null?Le:_n.key),$=g(_n,$,Le),et===null?Re=_n:et.sibling=_n,et=_n);return t&&Oe.forEach(function(uo){return r(Q,uo)}),pt&&Vo(Q,Le),Re}function Me(Q,$,Y,me){if(Y==null)throw Error(s(151));for(var Re=null,et=null,Oe=$,Le=$=0,_n=null,dt=Y.next();Oe!==null&&!dt.done;Le++,dt=Y.next()){Oe.index>Le?(_n=Oe,Oe=null):_n=Oe.sibling;var uo=ie(Q,Oe,dt.value,me);if(uo===null){Oe===null&&(Oe=_n);break}t&&Oe&&uo.alternate===null&&r(Q,Oe),$=g(uo,$,Le),et===null?Re=uo:et.sibling=uo,et=uo,Oe=_n}if(dt.done)return o(Q,Oe),pt&&Vo(Q,Le),Re;if(Oe===null){for(;!dt.done;Le++,dt=Y.next())dt=ve(Q,dt.value,me),dt!==null&&($=g(dt,$,Le),et===null?Re=dt:et.sibling=dt,et=dt);return pt&&Vo(Q,Le),Re}for(Oe=l(Oe);!dt.done;Le++,dt=Y.next())dt=se(Oe,Q,Le,dt.value,me),dt!==null&&(t&&dt.alternate!==null&&Oe.delete(dt.key===null?Le:dt.key),$=g(dt,$,Le),et===null?Re=dt:et.sibling=dt,et=dt);return t&&Oe.forEach(function(lT){return r(Q,lT)}),pt&&Vo(Q,Le),Re}function Rt(Q,$,Y,me){if(typeof Y=="object"&&Y&&Y.type===L&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y){switch(Y.$$typeof){case E:e:{for(var Re=Y.key;$!==null;){if($.key===Re){if(Re=Y.type,Re===L){if($.tag===7){o(Q,$.sibling),me=d($,Y.props.children),me.return=Q,Q=me;break e}}else if($.elementType===Re||typeof Re=="object"&&Re&&Re.$$typeof===de&&n1(Re)===$.type){o(Q,$.sibling),me=d($,Y.props),il(me,Y),me.return=Q,Q=me;break e}o(Q,$);break}else r(Q,$);$=$.sibling}Y.type===L?(me=Bo(Y.props.children,Q.mode,me,Y.key),me.return=Q,Q=me):(me=hc(Y.type,Y.key,Y.props,null,Q.mode,me),il(me,Y),me.return=Q,Q=me)}return S(Q);case R:e:{for(Re=Y.key;$!==null;){if($.key===Re)if($.tag===4&&$.stateNode.containerInfo===Y.containerInfo&&$.stateNode.implementation===Y.implementation){o(Q,$.sibling),me=d($,Y.children||[]),me.return=Q,Q=me;break e}else{o(Q,$);break}else r(Q,$);$=$.sibling}me=wf(Y,Q.mode,me),me.return=Q,Q=me}return S(Q);case de:return Re=Y._init,Y=Re(Y._payload),Rt(Q,$,Y,me)}if(oe(Y))return qe(Q,$,Y,me);if(be(Y)){if(Re=be(Y),typeof Re!="function")throw Error(s(150));return Y=Re.call(Y),Me(Q,$,Y,me)}if(typeof Y.then=="function")return Rt(Q,$,Nc(Y),me);if(Y.$$typeof===G)return Rt(Q,$,bc(Q,Y),me);Mc(Q,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,$!==null&&$.tag===6?(o(Q,$.sibling),me=d($,Y),me.return=Q,Q=me):(o(Q,$),me=bf(Y,Q.mode,me),me.return=Q,Q=me),S(Q)):o(Q,$)}return function(Q,$,Y,me){try{rl=0;var Re=Rt(Q,$,Y,me);return Va=null,Re}catch(Oe){if(Oe===Qs||Oe===_c)throw Oe;var et=rr(29,Oe,null,Q.mode);return et.lanes=me,et.return=Q,et}}}var $a=r1(!0),i1=r1(!1),wr=Fe(null),vi=null;function Gi(t){var r=t.alternate;De(un,un.current&1),De(wr,t),vi===null&&(r===null||za.current!==null||r.memoizedState!==null)&&(vi=t)}function o1(t){if(t.tag===22){if(De(un,un.current),De(wr,t),vi===null){var r=t.alternate;r!==null&&r.memoizedState!==null&&(vi=t)}}else Ji(t)}function Ji(){De(un,un.current),De(wr,wr.current)}function bi(t){We(wr),vi===t&&(vi=null),We(un)}var un=Fe(0);function Lc(t){for(var r=t;r!==null;){if(r.tag===13){var o=r.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||Bp(o)))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if(r.flags&128)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}function Zf(t,r,o,l){r=t.memoizedState,o=o(l,r),o=o==null?r:_({},r,o),t.memoizedState=o,t.lanes===0&&(t.updateQueue.baseState=o)}var ep={enqueueSetState:function(t,r,o){t=t._reactInternals;var l=xr(),d=Go(l);d.payload=r,o!=null&&(d.callback=o),r=Jo(t,d,l),r!==null&&(sr(r,t,l),Js(r,t,l))},enqueueReplaceState:function(t,r,o){t=t._reactInternals;var l=xr(),d=Go(l);d.tag=1,d.payload=r,o!=null&&(d.callback=o),r=Jo(t,d,l),r!==null&&(sr(r,t,l),Js(r,t,l))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var o=xr(),l=Go(o);l.tag=2,r!=null&&(l.callback=r),r=Jo(t,l,o),r!==null&&(sr(r,t,o),Js(r,t,o))}};function a1(t,r,o,l,d,g,S){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(l,g,S):r.prototype&&r.prototype.isPureReactComponent?!Fs(o,l)||!Fs(d,g):!0}function s1(t,r,o,l){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(o,l),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(o,l),r.state!==t&&ep.enqueueReplaceState(r,r.state,null)}function Yo(t,r){var o=r;if("ref"in r)for(var l in o={},r)l!=="ref"&&(o[l]=r[l]);if(t=t.defaultProps)for(var d in o===r&&(o=_({},o)),t)o[d]===void 0&&(o[d]=t[d]);return o}var Ac=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function o3(t){Ac(t)}function a3(t){console.error(t)}function s3(t){Ac(t)}function Ic(t,r){try{var o=t.onUncaughtError;o(r.value,{componentStack:r.stack})}catch(l){setTimeout(function(){throw l})}}function l1(t,r,o){try{var l=t.onCaughtError;l(o.value,{componentStack:o.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function tp(t,r,o){return o=Go(o),o.tag=3,o.payload={element:null},o.callback=function(){Ic(t,r)},o}function c1(t){return t=Go(t),t.tag=3,t}function u1(t,r,o,l){var d=o.type.getDerivedStateFromError;if(typeof d=="function"){var g=l.value;t.payload=function(){return d(g)},t.callback=function(){l1(r,o,l)}}var S=o.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(t.callback=function(){l1(r,o,l),typeof d!="function"&&(no===null?no=new Set([this]):no.add(this));var D=l.stack;this.componentDidCatch(l.value,{componentStack:D===null?"":D})})}function l3(t,r,o,l,d){if(o.flags|=32768,typeof l=="object"&&l&&typeof l.then=="function"){if(r=o.alternate,r!==null&&Ws(r,o,d,!0),o=wr.current,o!==null){switch(o.tag){case 13:return vi===null?Sp():o.alternate===null&&Ut===0&&(Ut=3),o.flags&=-257,o.flags|=65536,o.lanes=d,l===Of?o.flags|=16384:(r=o.updateQueue,r===null?o.updateQueue=new Set([l]):r.add(l),Tp(t,l,d)),!1;case 22:return o.flags|=65536,l===Of?o.flags|=16384:(r=o.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([l])},o.updateQueue=r):(o=r.retryQueue,o===null?r.retryQueue=new Set([l]):o.add(l)),Tp(t,l,d)),!1}throw Error(s(435,o.tag))}return Tp(t,l,d),Sp(),!1}if(pt)return r=wr.current,r===null?(l!==kf&&(r=Error(s(423),{cause:l}),$s(gr(r,o))),t=t.current.alternate,t.flags|=65536,d&=-d,t.lanes|=d,l=gr(l,o),d=tp(t.stateNode,l,d),Mf(t,d),Ut!==4&&(Ut=2)):(!(r.flags&65536)&&(r.flags|=256),r.flags|=65536,r.lanes=d,l!==kf&&(t=Error(s(422),{cause:l}),$s(gr(t,o)))),!1;var g=Error(s(520),{cause:l});if(g=gr(g,o),dl===null?dl=[g]:dl.push(g),Ut!==4&&(Ut=2),r===null)return!0;l=gr(l,o),o=r;do{switch(o.tag){case 3:return o.flags|=65536,t=d&-d,o.lanes|=t,t=tp(o.stateNode,l,t),Mf(o,t),!1;case 1:if(r=o.type,g=o.stateNode,!(o.flags&128)&&(typeof r.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(no===null||!no.has(g))))return o.flags|=65536,d&=-d,o.lanes|=d,d=c1(d),u1(d,t,o,l),Mf(o,d),!1}o=o.return}while(o!==null);return!1}var d1=Error(s(461)),bn=!1;function kn(t,r,o,l){r.child=t===null?i1(r,null,o,l):$a(r,t.child,o,l)}function f1(t,r,o,l,d){o=o.render;var g=r.ref;if("ref"in l){var S={};for(var D in l)D!=="ref"&&(S[D]=l[D])}else S=l;return Ko(r),l=qf(t,r,o,S,g,d),D=zf(),t!==null&&!bn?(Ff(t,r,d),wi(t,r,d)):(pt&&D&&_f(r),r.flags|=1,kn(t,r,l,d),r.child)}function p1(t,r,o,l,d){if(t===null){var g=o.type;return typeof g=="function"&&!vf(g)&&g.defaultProps===void 0&&o.compare===null?(r.tag=15,r.type=g,m1(t,r,g,l,d)):(t=hc(o.type,null,l,r,r.mode,d),t.ref=r.ref,t.return=r,r.child=t)}if(g=t.child,!cp(t,d)){var S=g.memoizedProps;if(o=o.compare,o=o===null?Fs:o,o(S,l)&&t.ref===r.ref)return wi(t,r,d)}return r.flags|=1,t=fi(g,l),t.ref=r.ref,t.return=r,r.child=t}function m1(t,r,o,l,d){if(t!==null){var g=t.memoizedProps;if(Fs(g,l)&&t.ref===r.ref)if(bn=!1,r.pendingProps=l=g,cp(t,d))t.flags&131072&&(bn=!0);else return r.lanes=t.lanes,wi(t,r,d)}return np(t,r,o,l,d)}function h1(t,r,o){var l=r.pendingProps,d=l.children,g=t===null?null:t.memoizedState;if(l.mode==="hidden"){if(r.flags&128){if(l=g===null?o:g.baseLanes|o,t!==null){for(d=r.child=t.child,g=0;d!==null;)g=g|d.lanes|d.childLanes,d=d.sibling;r.childLanes=g&~l}else r.childLanes=0,r.child=null;return g1(t,r,l,o)}if(o&536870912)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&wc(r,g===null?null:g.cachePool),g===null?Af():yv(r,g),o1(r);else return r.lanes=r.childLanes=536870912,g1(t,r,g===null?o:g.baseLanes|o,o)}else g===null?(t!==null&&wc(r,null),Af(),Ji(r)):(wc(r,g.cachePool),yv(r,g),Ji(r),r.memoizedState=null);return kn(t,r,d,o),r.child}function g1(t,r,o,l){var d=Df();return d=d===null?null:{parent:cn._currentValue,pool:d},r.memoizedState={baseLanes:o,cachePool:d},t!==null&&wc(r,null),Af(),o1(r),t!==null&&Ws(t,r,l,!0),null}function jc(t,r){var o=r.ref;if(o===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(s(284));(t===null||t.ref!==o)&&(r.flags|=4194816)}}function np(t,r,o,l,d){return Ko(r),o=qf(t,r,o,l,void 0,d),l=zf(),t!==null&&!bn?(Ff(t,r,d),wi(t,r,d)):(pt&&l&&_f(r),r.flags|=1,kn(t,r,o,d),r.child)}function y1(t,r,o,l,d,g){return Ko(r),r.updateQueue=null,o=bv(r,l,o,d),vv(t),l=zf(),t!==null&&!bn?(Ff(t,r,g),wi(t,r,g)):(pt&&l&&_f(r),r.flags|=1,kn(t,r,o,g),r.child)}function v1(t,r,o,l,d){if(Ko(r),r.stateNode===null){var g=La,S=o.contextType;typeof S=="object"&&S&&(g=Nn(S)),g=new o(l,g),r.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=ep,r.stateNode=g,g._reactInternals=r,g=r.stateNode,g.props=l,g.state=r.memoizedState,g.refs={},Pf(r),S=o.contextType,g.context=typeof S=="object"&&S?Nn(S):La,g.state=r.memoizedState,S=o.getDerivedStateFromProps,typeof S=="function"&&(Zf(r,o,S,l),g.state=r.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(S=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),S!==g.state&&ep.enqueueReplaceState(g,g.state,null),Ys(r,l,g,d),Xs(),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308),l=!0}else if(t===null){g=r.stateNode;var D=r.memoizedProps,F=Yo(o,D);g.props=F;var te=g.context,fe=o.contextType;S=La,typeof fe=="object"&&fe&&(S=Nn(fe));var ve=o.getDerivedStateFromProps;fe=typeof ve=="function"||typeof g.getSnapshotBeforeUpdate=="function",D=r.pendingProps!==D,fe||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(D||te!==S)&&s1(r,g,l,S),Ki=!1;var ie=r.memoizedState;g.state=ie,Ys(r,l,g,d),Xs(),te=r.memoizedState,D||ie!==te||Ki?(typeof ve=="function"&&(Zf(r,o,ve,l),te=r.memoizedState),(F=Ki||a1(r,o,F,l,ie,te,S))?(fe||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(r.flags|=4194308)):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=l,r.memoizedState=te),g.props=l,g.state=te,g.context=S,l=F):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),l=!1)}else{g=r.stateNode,Nf(t,r),S=r.memoizedProps,fe=Yo(o,S),g.props=fe,ve=r.pendingProps,ie=g.context,te=o.contextType,F=La,typeof te=="object"&&te&&(F=Nn(te)),D=o.getDerivedStateFromProps,(te=typeof D=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(S!==ve||ie!==F)&&s1(r,g,l,F),Ki=!1,ie=r.memoizedState,g.state=ie,Ys(r,l,g,d),Xs();var se=r.memoizedState;S!==ve||ie!==se||Ki||t!==null&&t.dependencies!==null&&vc(t.dependencies)?(typeof D=="function"&&(Zf(r,o,D,l),se=r.memoizedState),(fe=Ki||a1(r,o,fe,l,ie,se,F)||t!==null&&t.dependencies!==null&&vc(t.dependencies))?(te||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(l,se,F),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(l,se,F)),typeof g.componentDidUpdate=="function"&&(r.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof g.componentDidUpdate!="function"||S===t.memoizedProps&&ie===t.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&ie===t.memoizedState||(r.flags|=1024),r.memoizedProps=l,r.memoizedState=se),g.props=l,g.state=se,g.context=F,l=fe):(typeof g.componentDidUpdate!="function"||S===t.memoizedProps&&ie===t.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&ie===t.memoizedState||(r.flags|=1024),l=!1)}return g=l,jc(t,r),l=(r.flags&128)!=0,g||l?(g=r.stateNode,o=l&&typeof o.getDerivedStateFromError!="function"?null:g.render(),r.flags|=1,t!==null&&l?(r.child=$a(r,t.child,null,d),r.child=$a(r,null,o,d)):kn(t,r,o,d),r.memoizedState=g.state,t=r.child):t=wi(t,r,d),t}function b1(t,r,o,l){return Vs(),r.flags|=256,kn(t,r,o,l),r.child}var rp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ip(t){return{baseLanes:t,cachePool:cv()}}function op(t,r,o){return t=t===null?0:t.childLanes&~o,r&&(t|=_r),t}function w1(t,r,o){var l=r.pendingProps,d=!1,g=(r.flags&128)!=0,S;if((S=g)||(S=t!==null&&t.memoizedState===null?!1:(un.current&2)!=0),S&&(d=!0,r.flags&=-129),S=(r.flags&32)!=0,r.flags&=-33,t===null){if(pt){if(d?Gi(r):Ji(r),pt){var D=Wt,F;if(F=D){e:{for(F=D,D=Xr;F.nodeType!==8;){if(!D){D=null;break e}if(F=qr(F.nextSibling),F===null){D=null;break e}}D=F}D===null?F=!1:(r.memoizedState={dehydrated:D,treeContext:Ho===null?null:{id:pi,overflow:mi},retryLane:536870912,hydrationErrors:null},F=rr(18,null,null,0),F.stateNode=D,F.return=r,r.child=F,jn=r,Wt=null,F=!0)}F||Wo(r)}if(D=r.memoizedState,D!==null&&(D=D.dehydrated,D!==null))return Bp(D)?r.lanes=32:r.lanes=536870912,null;bi(r)}return D=l.children,l=l.fallback,d?(Ji(r),d=r.mode,D=qc({mode:"hidden",children:D},d),l=Bo(l,d,o,null),D.return=r,l.return=r,D.sibling=l,r.child=D,d=r.child,d.memoizedState=ip(o),d.childLanes=op(t,S,o),r.memoizedState=rp,l):(Gi(r),ap(r,D))}if(F=t.memoizedState,F!==null&&(D=F.dehydrated,D!==null)){if(g)r.flags&256?(Gi(r),r.flags&=-257,r=sp(t,r,o)):r.memoizedState===null?(Ji(r),d=l.fallback,D=r.mode,l=qc({mode:"visible",children:l.children},D),d=Bo(d,D,o,null),d.flags|=2,l.return=r,d.return=r,l.sibling=d,r.child=l,$a(r,t.child,null,o),l=r.child,l.memoizedState=ip(o),l.childLanes=op(t,S,o),r.memoizedState=rp,r=d):(Ji(r),r.child=t.child,r.flags|=128,r=null);else if(Gi(r),Bp(D)){if(S=D.nextSibling&&D.nextSibling.dataset,S)var te=S.dgst;S=te,l=Error(s(419)),l.stack="",l.digest=S,$s({value:l,source:null,stack:null}),r=sp(t,r,o)}else if(bn||Ws(t,r,o,!1),S=(o&t.childLanes)!==0,bn||S){if(S=Lt,S!==null&&(l=o&-o,l=l&42?1:Bn(l),l=(l&(S.suspendedLanes|o))===0?l:0,l!==0&&l!==F.retryLane))throw F.retryLane=l,Ma(t,l),sr(S,t,l),d1;D.data==="$?"||Sp(),r=sp(t,r,o)}else D.data==="$?"?(r.flags|=192,r.child=t.child,r=null):(t=F.treeContext,Wt=qr(D.nextSibling),jn=r,pt=!0,$o=null,Xr=!1,t!==null&&(vr[br++]=pi,vr[br++]=mi,vr[br++]=Ho,pi=t.id,mi=t.overflow,Ho=r),r=ap(r,l.children),r.flags|=4096);return r}return d?(Ji(r),d=l.fallback,D=r.mode,F=t.child,te=F.sibling,l=fi(F,{mode:"hidden",children:l.children}),l.subtreeFlags=F.subtreeFlags&65011712,te===null?(d=Bo(d,D,o,null),d.flags|=2):d=fi(te,d),d.return=r,l.return=r,l.sibling=d,r.child=l,l=d,d=r.child,D=t.child.memoizedState,D===null?D=ip(o):(F=D.cachePool,F===null?F=cv():(te=cn._currentValue,F=F.parent===te?F:{parent:te,pool:te}),D={baseLanes:D.baseLanes|o,cachePool:F}),d.memoizedState=D,d.childLanes=op(t,S,o),r.memoizedState=rp,l):(Gi(r),o=t.child,t=o.sibling,o=fi(o,{mode:"visible",children:l.children}),o.return=r,o.sibling=null,t!==null&&(S=r.deletions,S===null?(r.deletions=[t],r.flags|=16):S.push(t)),r.child=o,r.memoizedState=null,o)}function ap(t,r){return r=qc({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function qc(t,r){return t=rr(22,t,null,r),t.lanes=0,t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},t}function sp(t,r,o){return $a(r,t.child,null,o),t=ap(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function _1(t,r,o){t.lanes|=r;var l=t.alternate;l!==null&&(l.lanes|=r),Sf(t.return,r,o)}function lp(t,r,o,l,d){var g=t.memoizedState;g===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:l,tail:o,tailMode:d}:(g.isBackwards=r,g.rendering=null,g.renderingStartTime=0,g.last=l,g.tail=o,g.tailMode=d)}function x1(t,r,o){var l=r.pendingProps,d=l.revealOrder,g=l.tail;if(kn(t,r,l.children,o),l=un.current,l&2)l=l&1|2,r.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&_1(t,o,r);else if(t.tag===19)_1(t,o,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}l&=1}switch(De(un,l),d){case"forwards":for(o=r.child,d=null;o!==null;)t=o.alternate,t!==null&&Lc(t)===null&&(d=o),o=o.sibling;o=d,o===null?(d=r.child,r.child=null):(d=o.sibling,o.sibling=null),lp(r,!1,d,o,g);break;case"backwards":for(o=null,d=r.child,r.child=null;d!==null;){if(t=d.alternate,t!==null&&Lc(t)===null){r.child=d;break}t=d.sibling,d.sibling=o,o=d,d=t}lp(r,!0,o,null,g);break;case"together":lp(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function wi(t,r,o){if(t!==null&&(r.dependencies=t.dependencies),to|=r.lanes,(o&r.childLanes)===0)if(t!==null){if(Ws(t,r,o,!1),(o&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(s(153));if(r.child!==null){for(t=r.child,o=fi(t,t.pendingProps),r.child=o,o.return=r;t.sibling!==null;)t=t.sibling,o=o.sibling=fi(t,t.pendingProps),o.return=r;o.sibling=null}return r.child}function cp(t,r){return(t.lanes&r)===0?(t=t.dependencies,!!(t!==null&&vc(t))):!0}function c3(t,r,o){switch(r.tag){case 3:sn(r,r.stateNode.containerInfo),Ui(r,cn,t.memoizedState.cache),Vs();break;case 27:case 5:tn(r);break;case 4:sn(r,r.stateNode.containerInfo);break;case 10:Ui(r,r.type,r.memoizedProps.value);break;case 13:var l=r.memoizedState;if(l!==null)return l.dehydrated===null?(o&r.child.childLanes)===0?(Gi(r),t=wi(t,r,o),t===null?null:t.sibling):w1(t,r,o):(Gi(r),r.flags|=128,null);Gi(r);break;case 19:var d=(t.flags&128)!=0;if(l=(o&r.childLanes)!==0,l||(l=(Ws(t,r,o,!1),(o&r.childLanes)!==0)),d){if(l)return x1(t,r,o);r.flags|=128}if(d=r.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),De(un,un.current),l)break;return null;case 22:case 23:return r.lanes=0,h1(t,r,o);case 24:Ui(r,cn,t.memoizedState.cache)}return wi(t,r,o)}function k1(t,r,o){if(t!==null)if(t.memoizedProps!==r.pendingProps)bn=!0;else{if(!cp(t,o)&&!(r.flags&128))return bn=!1,c3(t,r,o);bn=!!(t.flags&131072)}else bn=!1,pt&&r.flags&1048576&&nv(r,yc,r.index);switch(r.lanes=0,r.tag){case 16:e:{t=r.pendingProps;var l=r.elementType,d=l._init;if(l=d(l._payload),r.type=l,typeof l=="function")vf(l)?(t=Yo(l,t),r.tag=1,r=v1(null,r,l,t,o)):(r.tag=0,r=np(null,r,l,t,o));else{if(l!=null){if(d=l.$$typeof,d===he){r.tag=11,r=f1(null,r,l,t,o);break e}else if(d===V){r.tag=14,r=p1(null,r,l,t,o);break e}}throw r=re(l)||l,Error(s(306,r,""))}}return r;case 0:return np(t,r,r.type,r.pendingProps,o);case 1:return l=r.type,d=Yo(l,r.pendingProps),v1(t,r,l,d,o);case 3:e:{if(sn(r,r.stateNode.containerInfo),t===null)throw Error(s(387));l=r.pendingProps;var g=r.memoizedState;d=g.element,Nf(t,r),Ys(r,l,null,o);var S=r.memoizedState;if(l=S.cache,Ui(r,cn,l),l!==g.cache&&Ef(r,[cn],o,!0),Xs(),l=S.element,g.isDehydrated)if(g={element:l,isDehydrated:!1,cache:S.cache},r.updateQueue.baseState=g,r.memoizedState=g,r.flags&256){r=b1(t,r,l,o);break e}else if(l!==d){d=gr(Error(s(424)),r),$s(d),r=b1(t,r,l,o);break e}else{switch(t=r.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(Wt=qr(t.firstChild),jn=r,pt=!0,$o=null,Xr=!0,o=i1(r,null,l,o),r.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(Vs(),l===d){r=wi(t,r,o);break e}kn(t,r,l,o)}r=r.child}return r;case 26:return jc(t,r),t===null?(o=Rb(r.type,null,r.pendingProps,null))?r.memoizedState=o:pt||(o=r.type,t=r.pendingProps,l=Yc(It.current).createElement(o),l[bt]=r,l[jt]=t,Sn(l,o,t),He(l),r.stateNode=l):r.memoizedState=Rb(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return tn(r),t===null&&pt&&(l=r.stateNode=Sb(r.type,r.pendingProps,It.current),jn=r,Xr=!0,d=Wt,oo(r.type)?(Hp=d,Wt=qr(l.firstChild)):Wt=d),kn(t,r,r.pendingProps.children,o),jc(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&pt&&((d=l=Wt)&&(l=A3(l,r.type,r.pendingProps,Xr),l===null?d=!1:(r.stateNode=l,jn=r,Wt=qr(l.firstChild),Xr=!1,d=!0)),d||Wo(r)),tn(r),d=r.type,g=r.pendingProps,S=t===null?null:t.memoizedProps,l=g.children,qp(d,g)?l=null:S!==null&&qp(d,S)&&(r.flags|=32),r.memoizedState!==null&&(d=qf(t,r,YE,null,null,o),wl._currentValue=d),jc(t,r),kn(t,r,l,o),r.child;case 6:return t===null&&pt&&((t=o=Wt)&&(o=I3(o,r.pendingProps,Xr),o===null?t=!1:(r.stateNode=o,jn=r,Wt=null,t=!0)),t||Wo(r)),null;case 13:return w1(t,r,o);case 4:return sn(r,r.stateNode.containerInfo),l=r.pendingProps,t===null?r.child=$a(r,null,l,o):kn(t,r,l,o),r.child;case 11:return f1(t,r,r.type,r.pendingProps,o);case 7:return kn(t,r,r.pendingProps,o),r.child;case 8:return kn(t,r,r.pendingProps.children,o),r.child;case 12:return kn(t,r,r.pendingProps.children,o),r.child;case 10:return l=r.pendingProps,Ui(r,r.type,l.value),kn(t,r,l.children,o),r.child;case 9:return d=r.type._context,l=r.pendingProps.children,Ko(r),d=Nn(d),l=l(d),r.flags|=1,kn(t,r,l,o),r.child;case 14:return p1(t,r,r.type,r.pendingProps,o);case 15:return m1(t,r,r.type,r.pendingProps,o);case 19:return x1(t,r,o);case 31:return l=r.pendingProps,o=r.mode,l={mode:l.mode,children:l.children},t===null?(o=qc(l,o),o.ref=r.ref,r.child=o,o.return=r,r=o):(o=fi(t.child,l),o.ref=r.ref,r.child=o,o.return=r,r=o),r;case 22:return h1(t,r,o);case 24:return Ko(r),l=Nn(cn),t===null?(d=Df(),d===null&&(d=Lt,g=Tf(),d.pooledCache=g,g.refCount++,g!==null&&(d.pooledCacheLanes|=o),d=g),r.memoizedState={parent:l,cache:d},Pf(r),Ui(r,cn,d)):((t.lanes&o)!==0&&(Nf(t,r),Ys(r,null,null,o),Xs()),d=t.memoizedState,g=r.memoizedState,d.parent===l?(l=g.cache,Ui(r,cn,l),l!==d.cache&&Ef(r,[cn],o,!0)):(d={parent:l,cache:l},r.memoizedState=d,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=d),Ui(r,cn,l))),kn(t,r,r.pendingProps.children,o),r.child;case 29:throw r.pendingProps}throw Error(s(156,r.tag))}function _i(t){t.flags|=4}function C1(t,r){if(r.type!=="stylesheet"||r.state.loading&4)t.flags&=-16777217;else if(t.flags|=16777216,!Mb(r)){if(r=wr.current,r!==null&&((at&4194048)===at?vi!==null:(at&62914560)!==at&&!(at&536870912)||r!==vi))throw Gs=Of,uv;t.flags|=8192}}function zc(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag===22?536870912:Wr(),t.lanes|=r,Qa|=r)}function ol(t,r){if(!pt)switch(t.tailMode){case"hidden":r=t.tail;for(var o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?t.tail=null:o.sibling=null;break;case"collapsed":o=t.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null}}function Bt(t){var r=t.alternate!==null&&t.alternate.child===t.child,o=0,l=0;if(r)for(var d=t.child;d!==null;)o|=d.lanes|d.childLanes,l|=d.subtreeFlags&65011712,l|=d.flags&65011712,d.return=t,d=d.sibling;else for(d=t.child;d!==null;)o|=d.lanes|d.childLanes,l|=d.subtreeFlags,l|=d.flags,d.return=t,d=d.sibling;return t.subtreeFlags|=l,t.childLanes=o,r}function u3(t,r,o){var l=r.pendingProps;switch(xf(r),r.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bt(r),null;case 1:return Bt(r),null;case 3:return o=r.stateNode,l=null,t!==null&&(l=t.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),gi(cn),Ue(),o.pendingContext&&(o.pendingContext=(o.context=o.pendingContext,null)),(t===null||t.child===null)&&(Hs(r)?_i(r):t===null||t.memoizedState.isDehydrated&&!(r.flags&256)||(r.flags|=1024,ov())),Bt(r),null;case 26:return o=r.memoizedState,t===null?(_i(r),o===null?(Bt(r),r.flags&=-16777217):(Bt(r),C1(r,o))):o?o===t.memoizedState?(Bt(r),r.flags&=-16777217):(_i(r),Bt(r),C1(r,o)):(t.memoizedProps!==l&&_i(r),Bt(r),r.flags&=-16777217),null;case 27:gt(r),o=It.current;var d=r.type;if(t!==null&&r.stateNode!=null)t.memoizedProps!==l&&_i(r);else{if(!l){if(r.stateNode===null)throw Error(s(166));return Bt(r),null}t=Ne.current,Hs(r)?rv(r,t):(t=Sb(d,l,o),r.stateNode=t,_i(r))}return Bt(r),null;case 5:if(gt(r),o=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==l&&_i(r);else{if(!l){if(r.stateNode===null)throw Error(s(166));return Bt(r),null}if(t=Ne.current,Hs(r))rv(r,t);else{switch(d=Yc(It.current),t){case 1:t=d.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:t=d.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":t=d.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":t=d.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":t=d.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof l.is=="string"?d.createElement("select",{is:l.is}):d.createElement("select"),l.multiple?t.multiple=!0:l.size&&(t.size=l.size);break;default:t=typeof l.is=="string"?d.createElement(o,{is:l.is}):d.createElement(o)}}t[bt]=r,t[jt]=l;e:for(d=r.child;d!==null;){if(d.tag===5||d.tag===6)t.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===r)break e;for(;d.sibling===null;){if(d.return===null||d.return===r)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}r.stateNode=t;e:switch(Sn(t,o,l),o){case"button":case"input":case"select":case"textarea":t=!!l.autoFocus;break e;case"img":t=!0;break e;default:t=!1}t&&_i(r)}}return Bt(r),r.flags&=-16777217,null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==l&&_i(r);else{if(typeof l!="string"&&r.stateNode===null)throw Error(s(166));if(t=It.current,Hs(r)){if(t=r.stateNode,o=r.memoizedProps,l=null,d=jn,d!==null)switch(d.tag){case 27:case 5:l=d.memoizedProps}t[bt]=r,t=!!(t.nodeValue===o||l!==null&&l.suppressHydrationWarning===!0||vb(t.nodeValue,o)),t||Wo(r)}else t=Yc(t).createTextNode(l),t[bt]=r,r.stateNode=t}return Bt(r),null;case 13:if(l=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(d=Hs(r),l!==null&&l.dehydrated!==null){if(t===null){if(!d)throw Error(s(318));if(d=r.memoizedState,d=d===null?null:d.dehydrated,!d)throw Error(s(317));d[bt]=r}else Vs(),!(r.flags&128)&&(r.memoizedState=null),r.flags|=4;Bt(r),d=!1}else d=ov(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=d),d=!0;if(!d)return r.flags&256?(bi(r),r):(bi(r),null)}if(bi(r),r.flags&128)return r.lanes=o,r;if(o=l!==null,t=t!==null&&t.memoizedState!==null,o){l=r.child,d=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(d=l.alternate.memoizedState.cachePool.pool);var g=null;l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),g!==d&&(l.flags|=2048)}return o!==t&&o&&(r.child.flags|=8192),zc(r,r.updateQueue),Bt(r),null;case 4:return Ue(),t===null&&mb(r.stateNode.containerInfo),Bt(r),null;case 10:return gi(r.type),Bt(r),null;case 19:if(We(un),d=r.memoizedState,d===null)return Bt(r),null;if(l=(r.flags&128)!=0,g=d.rendering,g===null)if(l)ol(d,!1);else{if(Ut!==0||t!==null&&t.flags&128)for(t=r.child;t!==null;){if(g=Lc(t),g!==null){for(r.flags|=128,ol(d,!1),t=g.updateQueue,r.updateQueue=t,zc(r,t),r.subtreeFlags=0,t=o,o=r.child;o!==null;)tv(o,t),o=o.sibling;return De(un,un.current&1|2),r.child}t=t.sibling}d.tail!==null&&yn()>Hc&&(r.flags|=128,l=!0,ol(d,!1),r.lanes=4194304)}else{if(!l)if(t=Lc(g),t!==null){if(r.flags|=128,l=!0,t=t.updateQueue,r.updateQueue=t,zc(r,t),ol(d,!0),d.tail===null&&d.tailMode==="hidden"&&!g.alternate&&!pt)return Bt(r),null}else 2*yn()-d.renderingStartTime>Hc&&o!==536870912&&(r.flags|=128,l=!0,ol(d,!1),r.lanes=4194304);d.isBackwards?(g.sibling=r.child,r.child=g):(t=d.last,t===null?r.child=g:t.sibling=g,d.last=g)}return d.tail===null?(Bt(r),null):(r=d.tail,d.rendering=r,d.tail=r.sibling,d.renderingStartTime=yn(),r.sibling=null,t=un.current,De(un,l?t&1|2:t&1),r);case 22:case 23:return bi(r),If(),l=r.memoizedState!==null,t===null?l&&(r.flags|=8192):t.memoizedState!==null!==l&&(r.flags|=8192),l?o&536870912&&!(r.flags&128)&&(Bt(r),r.subtreeFlags&6&&(r.flags|=8192)):Bt(r),o=r.updateQueue,o!==null&&zc(r,o.retryQueue),o=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),l=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),l!==o&&(r.flags|=2048),t!==null&&We(Qo),null;case 24:return o=null,t!==null&&(o=t.memoizedState.cache),r.memoizedState.cache!==o&&(r.flags|=2048),gi(cn),Bt(r),null;case 25:return null;case 30:return null}throw Error(s(156,r.tag))}function d3(t,r){switch(xf(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return gi(cn),Ue(),t=r.flags,t&65536&&!(t&128)?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return gt(r),null;case 13:if(bi(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(s(340));Vs()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return We(un),null;case 4:return Ue(),null;case 10:return gi(r.type),null;case 22:case 23:return bi(r),If(),t!==null&&We(Qo),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return gi(cn),null;case 25:return null;default:return null}}function S1(t,r){switch(xf(r),r.tag){case 3:gi(cn),Ue();break;case 26:case 27:case 5:gt(r);break;case 4:Ue();break;case 13:bi(r);break;case 19:We(un);break;case 10:gi(r.type);break;case 22:case 23:bi(r),If(),t!==null&&We(Qo);break;case 24:gi(cn)}}function al(t,r){try{var o=r.updateQueue,l=o===null?null:o.lastEffect;if(l!==null){var d=l.next;o=d;do{if((o.tag&t)===t){l=void 0;var g=o.create,S=o.inst;l=g(),S.destroy=l}o=o.next}while(o!==d)}}catch(D){Nt(r,r.return,D)}}function Xi(t,r,o){try{var l=r.updateQueue,d=l===null?null:l.lastEffect;if(d!==null){var g=d.next;l=g;do{if((l.tag&t)===t){var S=l.inst,D=S.destroy;if(D!==void 0){S.destroy=void 0,d=r;var F=o,te=D;try{te()}catch(fe){Nt(d,F,fe)}}}l=l.next}while(l!==g)}}catch(fe){Nt(r,r.return,fe)}}function E1(t){var r=t.updateQueue;if(r!==null){var o=t.stateNode;try{gv(r,o)}catch(l){Nt(t,t.return,l)}}}function T1(t,r,o){o.props=Yo(t.type,t.memoizedProps),o.state=t.memoizedState;try{o.componentWillUnmount()}catch(l){Nt(t,r,l)}}function sl(t,r){try{var o=t.ref;if(o!==null){switch(t.tag){case 26:case 27:case 5:var l=t.stateNode;break;case 30:l=t.stateNode;break;default:l=t.stateNode}typeof o=="function"?t.refCleanup=o(l):o.current=l}}catch(d){Nt(t,r,d)}}function Yr(t,r){var o=t.ref,l=t.refCleanup;if(o!==null)if(typeof l=="function")try{l()}catch(d){Nt(t,r,d)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(d){Nt(t,r,d)}else o.current=null}function R1(t){var r=t.type,o=t.memoizedProps,l=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":o.autoFocus&&l.focus();break e;case"img":o.src?l.src=o.src:o.srcSet&&(l.srcset=o.srcSet)}}catch(d){Nt(t,t.return,d)}}function up(t,r,o){try{var l=t.stateNode;O3(l,t.type,o,r),l[jt]=r}catch(d){Nt(t,t.return,d)}}function D1(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&oo(t.type)||t.tag===4}function dp(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||D1(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&oo(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function fp(t,r,o){var l=t.tag;if(l===5||l===6)t=t.stateNode,r?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(t,r):(r=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,r.appendChild(t),o=o._reactRootContainer,o!=null||r.onclick!==null||(r.onclick=Xc));else if(l!==4&&(l===27&&oo(t.type)&&(o=t.stateNode,r=null),t=t.child,t!==null))for(fp(t,r,o),t=t.sibling;t!==null;)fp(t,r,o),t=t.sibling}function Fc(t,r,o){var l=t.tag;if(l===5||l===6)t=t.stateNode,r?o.insertBefore(t,r):o.appendChild(t);else if(l!==4&&(l===27&&oo(t.type)&&(o=t.stateNode),t=t.child,t!==null))for(Fc(t,r,o),t=t.sibling;t!==null;)Fc(t,r,o),t=t.sibling}function O1(t){var r=t.stateNode,o=t.memoizedProps;try{for(var l=t.type,d=r.attributes;d.length;)r.removeAttributeNode(d[0]);Sn(r,l,o),r[bt]=t,r[jt]=o}catch(g){Nt(t,t.return,g)}}var xi=!1,Zt=!1,pp=!1,P1=typeof WeakSet=="function"?WeakSet:Set,wn=null;function f3(t,r){if(t=t.containerInfo,Ip=iu,t=Wy(t),df(t)){if("selectionStart"in t)var o={start:t.selectionStart,end:t.selectionEnd};else e:{o=(o=t.ownerDocument)&&o.defaultView||window;var l=o.getSelection&&o.getSelection();if(l&&l.rangeCount!==0){o=l.anchorNode;var d=l.anchorOffset,g=l.focusNode;l=l.focusOffset;try{o.nodeType,g.nodeType}catch{o=null;break e}var S=0,D=-1,F=-1,te=0,fe=0,ve=t,ie=null;t:for(;;){for(var se;ve!==o||d!==0&&ve.nodeType!==3||(D=S+d),ve!==g||l!==0&&ve.nodeType!==3||(F=S+l),ve.nodeType===3&&(S+=ve.nodeValue.length),(se=ve.firstChild)!==null;)ie=ve,ve=se;for(;;){if(ve===t)break t;if(ie===o&&++te===d&&(D=S),ie===g&&++fe===l&&(F=S),(se=ve.nextSibling)!==null)break;ve=ie,ie=ve.parentNode}ve=se}o=D===-1||F===-1?null:{start:D,end:F}}else o=null}o||(o={start:0,end:0})}else o=null;for(jp={focusedElem:t,selectionRange:o},iu=!1,wn=r;wn!==null;)if(r=wn,t=r.child,r.subtreeFlags&1024&&t!==null)t.return=r,wn=t;else for(;wn!==null;){switch(r=wn,g=r.alternate,t=r.flags,r.tag){case 0:break;case 11:case 15:break;case 1:if(t&1024&&g!==null){t=void 0,o=r,d=g.memoizedProps,g=g.memoizedState,l=o.stateNode;try{var qe=Yo(o.type,d,o.elementType===o.type);t=l.getSnapshotBeforeUpdate(qe,g),l.__reactInternalSnapshotBeforeUpdate=t}catch(Me){Nt(o,o.return,Me)}}break;case 3:if(t&1024){if(t=r.stateNode.containerInfo,o=t.nodeType,o===9)Fp(t);else if(o===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Fp(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(t&1024)throw Error(s(163))}if(t=r.sibling,t!==null){t.return=r.return,wn=t;break}wn=r.return}}function N1(t,r,o){var l=o.flags;switch(o.tag){case 0:case 11:case 15:Yi(t,o),l&4&&al(5,o);break;case 1:if(Yi(t,o),l&4)if(t=o.stateNode,r===null)try{t.componentDidMount()}catch(S){Nt(o,o.return,S)}else{var d=Yo(o.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(d,r,t.__reactInternalSnapshotBeforeUpdate)}catch(S){Nt(o,o.return,S)}}l&64&&E1(o),l&512&&sl(o,o.return);break;case 3:if(Yi(t,o),l&64&&(t=o.updateQueue,t!==null)){if(r=null,o.child!==null)switch(o.child.tag){case 27:case 5:r=o.child.stateNode;break;case 1:r=o.child.stateNode}try{gv(t,r)}catch(S){Nt(o,o.return,S)}}break;case 27:r===null&&l&4&&O1(o);case 26:case 5:Yi(t,o),r===null&&l&4&&R1(o),l&512&&sl(o,o.return);break;case 12:Yi(t,o);break;case 13:Yi(t,o),l&4&&A1(t,o),l&64&&(t=o.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(o=_3.bind(null,o),j3(t,o))));break;case 22:if(l=o.memoizedState!==null||xi,!l){r=r!==null&&r.memoizedState!==null||Zt,d=xi;var g=Zt;xi=l,(Zt=r)&&!g?Zi(t,o,(o.subtreeFlags&8772)!=0):Yi(t,o),xi=d,Zt=g}break;case 30:break;default:Yi(t,o)}}function M1(t){var r=t.alternate;r!==null&&(t.alternate=null,M1(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&ft(r)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var zt=null,$n=!1;function ki(t,r,o){for(o=o.child;o!==null;)L1(t,r,o),o=o.sibling}function L1(t,r,o){if(Qt&&typeof Qt.onCommitFiberUnmount=="function")try{Qt.onCommitFiberUnmount(Ht,o)}catch{}switch(o.tag){case 26:Zt||Yr(o,r),ki(t,r,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:Zt||Yr(o,r);var l=zt,d=$n;oo(o.type)&&(zt=o.stateNode,$n=!1),ki(t,r,o),gl(o.stateNode),zt=l,$n=d;break;case 5:Zt||Yr(o,r);case 6:if(l=zt,d=$n,zt=null,ki(t,r,o),zt=l,$n=d,zt!==null)if($n)try{(zt.nodeType===9?zt.body:zt.nodeName==="HTML"?zt.ownerDocument.body:zt).removeChild(o.stateNode)}catch(g){Nt(o,r,g)}else try{zt.removeChild(o.stateNode)}catch(g){Nt(o,r,g)}break;case 18:zt!==null&&($n?(t=zt,kb(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,o.stateNode),Cl(t)):kb(zt,o.stateNode));break;case 4:l=zt,d=$n,zt=o.stateNode.containerInfo,$n=!0,ki(t,r,o),zt=l,$n=d;break;case 0:case 11:case 14:case 15:Zt||Xi(2,o,r),Zt||Xi(4,o,r),ki(t,r,o);break;case 1:Zt||(Yr(o,r),l=o.stateNode,typeof l.componentWillUnmount=="function"&&T1(o,r,l)),ki(t,r,o);break;case 21:ki(t,r,o);break;case 22:Zt=(l=Zt)||o.memoizedState!==null,ki(t,r,o),Zt=l;break;default:ki(t,r,o)}}function A1(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Cl(t)}catch(o){Nt(r,r.return,o)}}function p3(t){switch(t.tag){case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new P1),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new P1),r;default:throw Error(s(435,t.tag))}}function mp(t,r){var o=p3(t);r.forEach(function(l){var d=x3.bind(null,t,l);o.has(l)||(o.add(l),l.then(d,d))})}function ir(t,r){var o=r.deletions;if(o!==null)for(var l=0;l<o.length;l++){var d=o[l],g=t,S=r,D=S;e:for(;D!==null;){switch(D.tag){case 27:if(oo(D.type)){zt=D.stateNode,$n=!1;break e}break;case 5:zt=D.stateNode,$n=!1;break e;case 3:case 4:zt=D.stateNode.containerInfo,$n=!0;break e}D=D.return}if(zt===null)throw Error(s(160));L1(g,S,d),zt=null,$n=!1,g=d.alternate,g!==null&&(g.return=null),d.return=null}if(r.subtreeFlags&13878)for(r=r.child;r!==null;)I1(r,t),r=r.sibling}var jr=null;function I1(t,r){var o=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:ir(r,t),or(t),l&4&&(Xi(3,t,t.return),al(3,t),Xi(5,t,t.return));break;case 1:ir(r,t),or(t),l&512&&(Zt||o===null||Yr(o,o.return)),l&64&&xi&&(t=t.updateQueue,t!==null&&(l=t.callbacks,l!==null&&(o=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=o===null?l:o.concat(l))));break;case 26:var d=jr;if(ir(r,t),or(t),l&512&&(Zt||o===null||Yr(o,o.return)),l&4){var g=o===null?null:o.memoizedState;if(l=t.memoizedState,o===null)if(l===null)if(t.stateNode===null){e:{l=t.type,o=t.memoizedProps,d=d.ownerDocument||d;t:switch(l){case"title":g=d.getElementsByTagName("title")[0],(!g||g[Ce]||g[bt]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=d.createElement(l),d.head.insertBefore(g,d.querySelector("head > title"))),Sn(g,l,o),g[bt]=t,He(g),l=g;break e;case"link":var S=Pb("link","href",d).get(l+(o.href||""));if(S){for(var D=0;D<S.length;D++)if(g=S[D],g.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&g.getAttribute("rel")===(o.rel==null?null:o.rel)&&g.getAttribute("title")===(o.title==null?null:o.title)&&g.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){S.splice(D,1);break t}}g=d.createElement(l),Sn(g,l,o),d.head.appendChild(g);break;case"meta":if(S=Pb("meta","content",d).get(l+(o.content||""))){for(D=0;D<S.length;D++)if(g=S[D],g.getAttribute("content")===(o.content==null?null:""+o.content)&&g.getAttribute("name")===(o.name==null?null:o.name)&&g.getAttribute("property")===(o.property==null?null:o.property)&&g.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&g.getAttribute("charset")===(o.charSet==null?null:o.charSet)){S.splice(D,1);break t}}g=d.createElement(l),Sn(g,l,o),d.head.appendChild(g);break;default:throw Error(s(468,l))}g[bt]=t,He(g),l=g}t.stateNode=l}else Nb(d,t.type,t.stateNode);else t.stateNode=Ob(d,l,t.memoizedProps);else g===l?l===null&&t.stateNode!==null&&up(t,t.memoizedProps,o.memoizedProps):(g===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):g.count--,l===null?Nb(d,t.type,t.stateNode):Ob(d,l,t.memoizedProps))}break;case 27:ir(r,t),or(t),l&512&&(Zt||o===null||Yr(o,o.return)),o!==null&&l&4&&up(t,t.memoizedProps,o.memoizedProps);break;case 5:if(ir(r,t),or(t),l&512&&(Zt||o===null||Yr(o,o.return)),t.flags&32){d=t.stateNode;try{Qr(d,"")}catch(se){Nt(t,t.return,se)}}l&4&&t.stateNode!=null&&(d=t.memoizedProps,up(t,d,o===null?d:o.memoizedProps)),l&1024&&(pp=!0);break;case 6:if(ir(r,t),or(t),l&4){if(t.stateNode===null)throw Error(s(162));l=t.memoizedProps,o=t.stateNode;try{o.nodeValue=l}catch(se){Nt(t,t.return,se)}}break;case 3:if(tu=null,d=jr,jr=Zc(r.containerInfo),ir(r,t),jr=d,or(t),l&4&&o!==null&&o.memoizedState.isDehydrated)try{Cl(r.containerInfo)}catch(se){Nt(t,t.return,se)}pp&&(pp=!1,j1(t));break;case 4:l=jr,jr=Zc(t.stateNode.containerInfo),ir(r,t),or(t),jr=l;break;case 12:ir(r,t),or(t);break;case 13:ir(r,t),or(t),t.child.flags&8192&&t.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(wp=yn()),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,mp(t,l)));break;case 22:d=t.memoizedState!==null;var F=o!==null&&o.memoizedState!==null,te=xi,fe=Zt;if(xi=te||d,Zt=fe||F,ir(r,t),Zt=fe,xi=te,or(t),l&8192)e:for(r=t.stateNode,r._visibility=d?r._visibility&-2:r._visibility|1,d&&(o===null||F||xi||Zt||Zo(t)),o=null,r=t;;){if(r.tag===5||r.tag===26){if(o===null){F=o=r;try{if(g=F.stateNode,d)S=g.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{D=F.stateNode;var ve=F.memoizedProps.style,ie=ve!=null&&ve.hasOwnProperty("display")?ve.display:null;D.style.display=ie==null||typeof ie=="boolean"?"":(""+ie).trim()}}catch(se){Nt(F,F.return,se)}}}else if(r.tag===6){if(o===null){F=r;try{F.stateNode.nodeValue=d?"":F.memoizedProps}catch(se){Nt(F,F.return,se)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===t)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;o===r&&(o=null),r=r.return}o===r&&(o=null),r.sibling.return=r.return,r=r.sibling}l&4&&(l=t.updateQueue,l!==null&&(o=l.retryQueue,o!==null&&(l.retryQueue=null,mp(t,o))));break;case 19:ir(r,t),or(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,mp(t,l)));break;case 30:break;case 21:break;default:ir(r,t),or(t)}}function or(t){var r=t.flags;if(r&2){try{for(var o,l=t.return;l!==null;){if(D1(l)){o=l;break}l=l.return}if(o==null)throw Error(s(160));switch(o.tag){case 27:var d=o.stateNode;Fc(t,dp(t),d);break;case 5:var g=o.stateNode;o.flags&32&&(Qr(g,""),o.flags&=-33),Fc(t,dp(t),g);break;case 3:case 4:var S=o.stateNode.containerInfo;fp(t,dp(t),S);break;default:throw Error(s(161))}}catch(D){Nt(t,t.return,D)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function j1(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;j1(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),t=t.sibling}}function Yi(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)N1(t,r.alternate,r),r=r.sibling}function Zo(t){for(t=t.child;t!==null;){var r=t;switch(r.tag){case 0:case 11:case 14:case 15:Xi(4,r,r.return),Zo(r);break;case 1:Yr(r,r.return);var o=r.stateNode;typeof o.componentWillUnmount=="function"&&T1(r,r.return,o),Zo(r);break;case 27:gl(r.stateNode);case 26:case 5:Yr(r,r.return),Zo(r);break;case 22:r.memoizedState===null&&Zo(r);break;case 30:Zo(r);break;default:Zo(r)}t=t.sibling}}function Zi(t,r,o){for(o&&(o=(r.subtreeFlags&8772)!=0),r=r.child;r!==null;){var l=r.alternate,d=t,g=r,S=g.flags;switch(g.tag){case 0:case 11:case 15:Zi(d,g,o),al(4,g);break;case 1:if(Zi(d,g,o),l=g,d=l.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(te){Nt(l,l.return,te)}if(l=g,d=l.updateQueue,d!==null){var D=l.stateNode;try{var F=d.shared.hiddenCallbacks;if(F!==null)for(d.shared.hiddenCallbacks=null,d=0;d<F.length;d++)hv(F[d],D)}catch(te){Nt(l,l.return,te)}}o&&S&64&&E1(g),sl(g,g.return);break;case 27:O1(g);case 26:case 5:Zi(d,g,o),o&&l===null&&S&4&&R1(g),sl(g,g.return);break;case 12:Zi(d,g,o);break;case 13:Zi(d,g,o),o&&S&4&&A1(d,g);break;case 22:g.memoizedState===null&&Zi(d,g,o),sl(g,g.return);break;case 30:break;default:Zi(d,g,o)}r=r.sibling}}function hp(t,r){var o=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),t=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(t=r.memoizedState.cachePool.pool),t!==o&&(t!=null&&t.refCount++,o!=null&&Us(o))}function gp(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&Us(t))}function Zr(t,r,o,l){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)q1(t,r,o,l),r=r.sibling}function q1(t,r,o,l){var d=r.flags;switch(r.tag){case 0:case 11:case 15:Zr(t,r,o,l),d&2048&&al(9,r);break;case 1:Zr(t,r,o,l);break;case 3:Zr(t,r,o,l),d&2048&&(t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&Us(t)));break;case 12:if(d&2048){Zr(t,r,o,l),t=r.stateNode;try{var g=r.memoizedProps,S=g.id,D=g.onPostCommit;typeof D=="function"&&D(S,r.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(F){Nt(r,r.return,F)}}else Zr(t,r,o,l);break;case 13:Zr(t,r,o,l);break;case 23:break;case 22:g=r.stateNode,S=r.alternate,r.memoizedState===null?g._visibility&2?Zr(t,r,o,l):(g._visibility|=2,Wa(t,r,o,l,(r.subtreeFlags&10256)!=0)):g._visibility&2?Zr(t,r,o,l):ll(t,r),d&2048&&hp(S,r);break;case 24:Zr(t,r,o,l),d&2048&&gp(r.alternate,r);break;default:Zr(t,r,o,l)}}function Wa(t,r,o,l,d){for(d&&(d=(r.subtreeFlags&10256)!=0),r=r.child;r!==null;){var g=t,S=r,D=o,F=l,te=S.flags;switch(S.tag){case 0:case 11:case 15:Wa(g,S,D,F,d),al(8,S);break;case 23:break;case 22:var fe=S.stateNode;S.memoizedState===null?(fe._visibility|=2,Wa(g,S,D,F,d)):fe._visibility&2?Wa(g,S,D,F,d):ll(g,S),d&&te&2048&&hp(S.alternate,S);break;case 24:Wa(g,S,D,F,d),d&&te&2048&&gp(S.alternate,S);break;default:Wa(g,S,D,F,d)}r=r.sibling}}function ll(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var o=t,l=r,d=l.flags;switch(l.tag){case 22:ll(o,l),d&2048&&hp(l.alternate,l);break;case 24:ll(o,l),d&2048&&gp(l.alternate,l);break;default:ll(o,l)}r=r.sibling}}var cl=8192;function Ua(t){if(t.subtreeFlags&cl)for(t=t.child;t!==null;)z1(t),t=t.sibling}function z1(t){switch(t.tag){case 26:Ua(t),t.flags&cl&&t.memoizedState!==null&&J3(jr,t.memoizedState,t.memoizedProps);break;case 5:Ua(t);break;case 3:case 4:var r=jr;jr=Zc(t.stateNode.containerInfo),Ua(t),jr=r;break;case 22:t.memoizedState===null&&(r=t.alternate,r!==null&&r.memoizedState!==null?(r=cl,cl=16777216,Ua(t),cl=r):Ua(t));break;default:Ua(t)}}function F1(t){var r=t.alternate;if(r!==null&&(t=r.child,t!==null)){r.child=null;do r=t.sibling,t.sibling=null,t=r;while(t!==null)}}function ul(t){var r=t.deletions;if(t.flags&16){if(r!==null)for(var o=0;o<r.length;o++){var l=r[o];wn=l,H1(l,t)}F1(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)B1(t),t=t.sibling}function B1(t){switch(t.tag){case 0:case 11:case 15:ul(t),t.flags&2048&&Xi(9,t,t.return);break;case 3:ul(t);break;case 12:ul(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,Bc(t)):ul(t);break;default:ul(t)}}function Bc(t){var r=t.deletions;if(t.flags&16){if(r!==null)for(var o=0;o<r.length;o++){var l=r[o];wn=l,H1(l,t)}F1(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:Xi(8,r,r.return),Bc(r);break;case 22:o=r.stateNode,o._visibility&2&&(o._visibility&=-3,Bc(r));break;default:Bc(r)}t=t.sibling}}function H1(t,r){for(;wn!==null;){var o=wn;switch(o.tag){case 0:case 11:case 15:Xi(8,o,r);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var l=o.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Us(o.memoizedState.cache)}if(l=o.child,l!==null)l.return=o,wn=l;else e:for(o=t;wn!==null;){l=wn;var d=l.sibling,g=l.return;if(M1(l),l===o){wn=null;break e}if(d!==null){d.return=g,wn=d;break e}wn=g}}}var m3={getCacheForType:function(t){var r=Nn(cn),o=r.data.get(t);return o===void 0&&(o=t(),r.data.set(t,o)),o}},h3=typeof WeakMap=="function"?WeakMap:Map,_t=0,Lt=null,nt=null,at=0,xt=0,ar=null,eo=!1,Ka=!1,yp=!1,Ci=0,Ut=0,to=0,ea=0,vp=0,_r=0,Qa=0,dl=null,Wn=null,bp=!1,wp=0,Hc=1/0,Vc=null,no=null,Cn=0,ro=null,Ga=null,Ja=0,_p=0,xp=null,V1=null,fl=0,kp=null;function xr(){if(_t&2&&at!==0)return at&-at;if(le.T!==null){var t=ja;return t===0?Op():t}return ui()}function $1(){_r===0&&(_r=!(at&536870912)||pt?On():536870912);var t=wr.current;return t!==null&&(t.flags|=32),_r}function sr(t,r,o){(t===Lt&&(xt===2||xt===9)||t.cancelPendingCommit!==null)&&(Xa(t,0),io(t,at,_r,!1)),Yn(t,o),(!(_t&2)||t!==Lt)&&(t===Lt&&(!(_t&2)&&(ea|=o),Ut===4&&io(t,at,_r,!1)),Si(t))}function W1(t,r,o){if(_t&6)throw Error(s(327));var l=!o&&(r&124)==0&&(r&t.expiredLanes)===0||st(t,r),d=l?v3(t,r):Ep(t,r,!0),g=l;do{if(d===0){Ka&&!l&&io(t,r,0,!1);break}else{if(o=t.current.alternate,g&&!g3(o)){d=Ep(t,r,!1),g=!1;continue}if(d===2){if(g=r,t.errorRecoveryDisabledLanes&g)var S=0;else S=t.pendingLanes&-536870913,S=S===0?S&536870912?536870912:0:S;if(S!==0){r=S;e:{var D=t;d=dl;var F=D.current.memoizedState.isDehydrated;if(F&&(Xa(D,S).flags|=256),S=Ep(D,S,!1),S!==2){if(yp&&!F){D.errorRecoveryDisabledLanes|=g,ea|=g,d=4;break e}g=Wn,Wn=d,g!==null&&(Wn===null?Wn=g:Wn.push.apply(Wn,g))}d=S}if(g=!1,d!==2)continue}}if(d===1){Xa(t,0),io(t,r,0,!0);break}e:{switch(l=t,g=d,g){case 0:case 1:throw Error(s(345));case 4:if((r&4194048)!==r)break;case 6:io(l,r,_r,!eo);break e;case 2:Wn=null;break;case 3:case 5:break;default:throw Error(s(329))}if((r&62914560)===r&&(d=wp+300-yn(),10<d)){if(io(l,r,_r,!eo),Vt(l,0,!0)!==0)break e;l.timeoutHandle=_b(U1.bind(null,l,o,Wn,Vc,bp,r,_r,ea,Qa,eo,g,2,-0,0),d);break e}U1(l,o,Wn,Vc,bp,r,_r,ea,Qa,eo,g,0,-0,0)}}break}while(!0);Si(t)}function U1(t,r,o,l,d,g,S,D,F,te,fe,ve,ie,se){if(t.timeoutHandle=-1,ve=r.subtreeFlags,(ve&8192||(ve&16785408)==16785408)&&(bl={stylesheets:null,count:0,unsuspend:G3},z1(r),ve=X3(),ve!==null)){t.cancelPendingCommit=ve(Z1.bind(null,t,r,g,o,l,d,S,D,F,fe,1,ie,se)),io(t,g,S,!te);return}Z1(t,r,g,o,l,d,S,D,F)}function g3(t){for(var r=t;;){var o=r.tag;if((o===0||o===11||o===15)&&r.flags&16384&&(o=r.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var l=0;l<o.length;l++){var d=o[l],g=d.getSnapshot;d=d.value;try{if(!nr(g(),d))return!1}catch{return!1}}if(o=r.child,r.subtreeFlags&16384&&o!==null)o.return=r,r=o;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function io(t,r,o,l){r&=~vp,r&=~ea,t.suspendedLanes|=r,t.pingedLanes&=~r,l&&(t.warmLanes|=r),l=t.expirationTimes;for(var d=r;0<d;){var g=31-Ft(d),S=1<<g;l[g]=-1,d&=~S}o!==0&&ci(t,o,r)}function $c(){return _t&6?!0:(pl(0,!1),!1)}function Cp(){if(nt!==null){if(xt===0)var t=nt.return;else t=nt,hi=Uo=null,Bf(t),Va=null,rl=0,t=nt;for(;t!==null;)S1(t.alternate,t),t=t.return;nt=null}}function Xa(t,r){var o=t.timeoutHandle;o!==-1&&(t.timeoutHandle=-1,N3(o)),o=t.cancelPendingCommit,o!==null&&(t.cancelPendingCommit=null,o()),Cp(),Lt=t,nt=o=fi(t.current,null),at=r,xt=0,ar=null,eo=!1,Ka=st(t,r),yp=!1,Qa=_r=vp=ea=to=Ut=0,Wn=dl=null,bp=!1,r&8&&(r|=r&32);var l=t.entangledLanes;if(l!==0)for(t=t.entanglements,l&=r;0<l;){var d=31-Ft(l),g=1<<d;r|=t[d],l&=~g}return Ci=r,fc(),o}function K1(t,r){Ye=null,le.H=Pc,r===Qs||r===_c?(r=pv(),xt=3):r===uv?(r=pv(),xt=4):xt=r===d1?8:typeof r=="object"&&r&&typeof r.then=="function"?6:1,ar=r,nt===null&&(Ut=1,Ic(t,gr(r,t.current)))}function Q1(){var t=le.H;return le.H=Pc,t===null?Pc:t}function G1(){var t=le.A;return le.A=m3,t}function Sp(){Ut=4,eo||(at&4194048)!==at&&wr.current!==null||(Ka=!0),!(to&134217727)&&!(ea&134217727)||Lt===null||io(Lt,at,_r,!1)}function Ep(t,r,o){var l=_t;_t|=2;var d=Q1(),g=G1();(Lt!==t||at!==r)&&(Vc=null,Xa(t,r)),r=!1;var S=Ut;e:do try{if(xt!==0&&nt!==null){var D=nt,F=ar;switch(xt){case 8:Cp(),S=6;break e;case 3:case 2:case 9:case 6:wr.current===null&&(r=!0);var te=xt;if(xt=0,ar=null,Ya(t,D,F,te),o&&Ka){S=0;break e}break;default:te=xt,xt=0,ar=null,Ya(t,D,F,te)}}y3(),S=Ut;break}catch(fe){K1(t,fe)}while(!0);return r&&t.shellSuspendCounter++,hi=Uo=null,_t=l,le.H=d,le.A=g,nt===null&&(Lt=null,at=0,fc()),S}function y3(){for(;nt!==null;)J1(nt)}function v3(t,r){var o=_t;_t|=2;var l=Q1(),d=G1();Lt!==t||at!==r?(Vc=null,Hc=yn()+500,Xa(t,r)):Ka=st(t,r);e:do try{if(xt!==0&&nt!==null){r=nt;var g=ar;t:switch(xt){case 1:xt=0,ar=null,Ya(t,r,g,1);break;case 2:case 9:if(dv(g)){xt=0,ar=null,X1(r);break}r=function(){xt!==2&&xt!==9||Lt!==t||(xt=7),Si(t)},g.then(r,r);break e;case 3:xt=7;break e;case 4:xt=5;break e;case 7:dv(g)?(xt=0,ar=null,X1(r)):(xt=0,ar=null,Ya(t,r,g,7));break;case 5:var S=null;switch(nt.tag){case 26:S=nt.memoizedState;case 5:case 27:var D=nt;if(!S||Mb(S)){xt=0,ar=null;var F=D.sibling;if(F!==null)nt=F;else{var te=D.return;te===null?nt=null:(nt=te,Wc(te))}break t}}xt=0,ar=null,Ya(t,r,g,5);break;case 6:xt=0,ar=null,Ya(t,r,g,6);break;case 8:Cp(),Ut=6;break e;default:throw Error(s(462))}}b3();break}catch(fe){K1(t,fe)}while(!0);return hi=Uo=null,le.H=l,le.A=d,_t=o,nt===null?(Lt=null,at=0,fc(),Ut):0}function b3(){for(;nt!==null&&!ai();)J1(nt)}function J1(t){var r=k1(t.alternate,t,Ci);t.memoizedProps=t.pendingProps,r===null?Wc(t):nt=r}function X1(t){var r=t,o=r.alternate;switch(r.tag){case 15:case 0:r=y1(o,r,r.pendingProps,r.type,void 0,at);break;case 11:r=y1(o,r,r.pendingProps,r.type.render,r.ref,at);break;case 5:Bf(r);default:S1(o,r),r=nt=tv(r,Ci),r=k1(o,r,Ci)}t.memoizedProps=t.pendingProps,r===null?Wc(t):nt=r}function Ya(t,r,o,l){hi=Uo=null,Bf(r),Va=null,rl=0;var d=r.return;try{if(l3(t,d,r,o,at)){Ut=1,Ic(t,gr(o,t.current)),nt=null;return}}catch(g){if(d!==null)throw nt=d,g;Ut=1,Ic(t,gr(o,t.current)),nt=null;return}r.flags&32768?(pt||l===1?t=!0:Ka||at&536870912?t=!1:(eo=t=!0,(l===2||l===9||l===3||l===6)&&(l=wr.current,l!==null&&l.tag===13&&(l.flags|=16384))),Y1(r,t)):Wc(r)}function Wc(t){var r=t;do{if(r.flags&32768){Y1(r,eo);return}t=r.return;var o=u3(r.alternate,r,Ci);if(o!==null){nt=o;return}if(r=r.sibling,r!==null){nt=r;return}nt=r=t}while(r!==null);Ut===0&&(Ut=5)}function Y1(t,r){do{var o=d3(t.alternate,t);if(o!==null){o.flags&=32767,nt=o;return}if(o=t.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!r&&(t=t.sibling,t!==null)){nt=t;return}nt=t=o}while(t!==null);Ut=6,nt=null}function Z1(t,r,o,l,d,g,S,D,F){t.cancelPendingCommit=null;do Uc();while(Cn!==0);if(_t&6)throw Error(s(327));if(r!==null){if(r===t.current)throw Error(s(177));if(g=r.lanes|r.childLanes,g|=gf,Ur(t,o,g,S,D,F),t===Lt&&(nt=Lt=null,at=0),Ga=r,ro=t,Ja=o,_p=g,xp=d,V1=l,r.subtreeFlags&10256||r.flags&10256?(t.callbackNode=null,t.callbackPriority=0,k3(nn,function(){return ib(!0),null})):(t.callbackNode=null,t.callbackPriority=0),l=(r.flags&13878)!=0,r.subtreeFlags&13878||l){l=le.T,le.T=null,d=K.p,K.p=2,S=_t,_t|=4;try{f3(t,r,o)}finally{_t=S,K.p=d,le.T=l}}Cn=1,eb(),tb(),nb()}}function eb(){if(Cn===1){Cn=0;var t=ro,r=Ga,o=(r.flags&13878)!=0;if(r.subtreeFlags&13878||o){o=le.T,le.T=null;var l=K.p;K.p=2;var d=_t;_t|=4;try{I1(r,t);var g=jp,S=Wy(t.containerInfo),D=g.focusedElem,F=g.selectionRange;if(S!==D&&D&&D.ownerDocument&&$y(D.ownerDocument.documentElement,D)){if(F!==null&&df(D)){var te=F.start,fe=F.end;if(fe===void 0&&(fe=te),"selectionStart"in D)D.selectionStart=te,D.selectionEnd=Math.min(fe,D.value.length);else{var ve=D.ownerDocument||document,ie=ve&&ve.defaultView||window;if(ie.getSelection){var se=ie.getSelection(),qe=D.textContent.length,Me=Math.min(F.start,qe),Rt=F.end===void 0?Me:Math.min(F.end,qe);!se.extend&&Me>Rt&&(S=Rt,Rt=Me,Me=S);var Q=Vy(D,Me),$=Vy(D,Rt);if(Q&&$&&(se.rangeCount!==1||se.anchorNode!==Q.node||se.anchorOffset!==Q.offset||se.focusNode!==$.node||se.focusOffset!==$.offset)){var Y=ve.createRange();Y.setStart(Q.node,Q.offset),se.removeAllRanges(),Me>Rt?(se.addRange(Y),se.extend($.node,$.offset)):(Y.setEnd($.node,$.offset),se.addRange(Y))}}}}for(ve=[],se=D;se=se.parentNode;)se.nodeType===1&&ve.push({element:se,left:se.scrollLeft,top:se.scrollTop});for(typeof D.focus=="function"&&D.focus(),D=0;D<ve.length;D++){var me=ve[D];me.element.scrollLeft=me.left,me.element.scrollTop=me.top}}iu=!!Ip,jp=Ip=null}finally{_t=d,K.p=l,le.T=o}}t.current=r,Cn=2}}function tb(){if(Cn===2){Cn=0;var t=ro,r=Ga,o=(r.flags&8772)!=0;if(r.subtreeFlags&8772||o){o=le.T,le.T=null;var l=K.p;K.p=2;var d=_t;_t|=4;try{N1(t,r.alternate,r)}finally{_t=d,K.p=l,le.T=o}}Cn=3}}function nb(){if(Cn===4||Cn===3){Cn=0,gn();var t=ro,r=Ga,o=Ja,l=V1;r.subtreeFlags&10256||r.flags&10256?Cn=5:(Cn=0,Ga=ro=null,rb(t,t.pendingLanes));var d=t.pendingLanes;if(d===0&&(no=null),Kr(o),r=r.stateNode,Qt&&typeof Qt.onCommitFiberRoot=="function")try{Qt.onCommitFiberRoot(Ht,r,void 0,(r.current.flags&128)==128)}catch{}if(l!==null){r=le.T,d=K.p,K.p=2,le.T=null;try{for(var g=t.onRecoverableError,S=0;S<l.length;S++){var D=l[S];g(D.value,{componentStack:D.stack})}}finally{le.T=r,K.p=d}}Ja&3&&Uc(),Si(t),d=t.pendingLanes,o&4194090&&d&42?t===kp?fl++:(fl=0,kp=t):fl=0,pl(0,!1)}}function rb(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,Us(r)))}function Uc(t){return eb(),tb(),nb(),ib(t)}function ib(){if(Cn!==5)return!1;var t=ro,r=_p;_p=0;var o=Kr(Ja),l=le.T,d=K.p;try{K.p=32>o?32:o,le.T=null,o=xp,xp=null;var g=ro,S=Ja;if(Cn=0,Ga=ro=null,Ja=0,_t&6)throw Error(s(331));var D=_t;if(_t|=4,B1(g.current),q1(g,g.current,S,o),_t=D,pl(0,!1),Qt&&typeof Qt.onPostCommitFiberRoot=="function")try{Qt.onPostCommitFiberRoot(Ht,g)}catch{}return!0}finally{K.p=d,le.T=l,rb(t,r)}}function ob(t,r,o){r=gr(o,r),r=tp(t.stateNode,r,2),t=Jo(t,r,2),t!==null&&(Yn(t,2),Si(t))}function Nt(t,r,o){if(t.tag===3)ob(t,t,o);else for(;r!==null;){if(r.tag===3){ob(r,t,o);break}else if(r.tag===1){var l=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(no===null||!no.has(l))){t=gr(o,t),o=c1(2),l=Jo(r,o,2),l!==null&&(u1(o,l,r,t),Yn(l,2),Si(l));break}}r=r.return}}function Tp(t,r,o){var l=t.pingCache;if(l===null){l=t.pingCache=new h3;var d=new Set;l.set(r,d)}else d=l.get(r),d===void 0&&(d=new Set,l.set(r,d));d.has(o)||(yp=!0,d.add(o),t=w3.bind(null,t,r,o),r.then(t,t))}function w3(t,r,o){var l=t.pingCache;l!==null&&l.delete(r),t.pingedLanes|=t.suspendedLanes&o,t.warmLanes&=~o,Lt===t&&(at&o)===o&&(Ut===4||Ut===3&&(at&62914560)===at&&300>yn()-wp?!(_t&2)&&Xa(t,0):vp|=o,Qa===at&&(Qa=0)),Si(t)}function ab(t,r){r===0&&(r=Wr()),t=Ma(t,r),t!==null&&(Yn(t,r),Si(t))}function _3(t){var r=t.memoizedState,o=0;r!==null&&(o=r.retryLane),ab(t,o)}function x3(t,r){var o=0;switch(t.tag){case 13:var l=t.stateNode,d=t.memoizedState;d!==null&&(o=d.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error(s(314))}l!==null&&l.delete(r),ab(t,o)}function k3(t,r){return Xn(t,r)}var Kc=null,Za=null,Rp=!1,Qc=!1,Dp=!1,ta=0;function Si(t){t!==Za&&t.next===null&&(Za===null?Kc=Za=t:Za=Za.next=t),Qc=!0,Rp||(Rp=!0,S3())}function pl(t,r){if(!Dp&&Qc){Dp=!0;do for(var o=!1,l=Kc;l!==null;){if(!r)if(t!==0){var d=l.pendingLanes;if(d===0)var g=0;else{var S=l.suspendedLanes,D=l.pingedLanes;g=(1<<31-Ft(42|t)+1)-1,g&=d&~(S&~D),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(o=!0,ub(l,g))}else g=at,g=Vt(l,l===Lt?g:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),!(g&3)||st(l,g)||(o=!0,ub(l,g));l=l.next}while(o);Dp=!1}}function C3(){sb()}function sb(){Qc=Rp=!1;var t=0;ta!==0&&(P3()&&(t=ta),ta=0);for(var r=yn(),o=null,l=Kc;l!==null;){var d=l.next,g=lb(l,r);g===0?(l.next=null,o===null?Kc=d:o.next=d,d===null&&(Za=o)):(o=l,(t!==0||g&3)&&(Qc=!0)),l=d}pl(t,!1)}function lb(t,r){for(var o=t.suspendedLanes,l=t.pingedLanes,d=t.expirationTimes,g=t.pendingLanes&-62914561;0<g;){var S=31-Ft(g),D=1<<S,F=d[S];F===-1?((D&o)===0||(D&l)!==0)&&(d[S]=vt(D,r)):F<=r&&(t.expiredLanes|=D),g&=~D}if(r=Lt,o=at,o=Vt(t,t===r?o:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l=t.callbackNode,o===0||t===r&&(xt===2||xt===9)||t.cancelPendingCommit!==null)return l!==null&&l!==null&&kt(l),t.callbackNode=null,t.callbackPriority=0;if(!(o&3)||st(t,o)){if(r=o&-o,r===t.callbackPriority)return r;switch(l!==null&&kt(l),Kr(o)){case 2:case 8:o=An;break;case 32:o=nn;break;case 268435456:o=$r;break;default:o=nn}return l=cb.bind(null,t),o=Xn(o,l),t.callbackPriority=r,t.callbackNode=o,r}return l!==null&&l!==null&&kt(l),t.callbackPriority=2,t.callbackNode=null,2}function cb(t,r){if(Cn!==0&&Cn!==5)return t.callbackNode=null,t.callbackPriority=0,null;var o=t.callbackNode;if(Uc(!0)&&t.callbackNode!==o)return null;var l=at;return l=Vt(t,t===Lt?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l===0?null:(W1(t,l,r),lb(t,yn()),t.callbackNode!=null&&t.callbackNode===o?cb.bind(null,t):null)}function ub(t,r){if(Uc())return null;W1(t,r,!0)}function S3(){M3(function(){_t&6?Xn(Pr,C3):sb()})}function Op(){return ta===0&&(ta=On()),ta}function db(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Oo(""+t)}function fb(t,r){var o=r.ownerDocument.createElement("input");return o.name=r.name,o.value=r.value,t.id&&o.setAttribute("form",t.id),r.parentNode.insertBefore(o,r),t=new FormData(t),o.parentNode.removeChild(o),t}function E3(t,r,o,l,d){if(r==="submit"&&o&&o.stateNode===d){var g=db((d[jt]||null).action),S=l.submitter;S&&(r=(r=S[jt]||null)?db(r.formAction):S.getAttribute("formAction"),r!==null&&(g=r,S=null));var D=new $i("action","action",null,l,d);t.push({event:D,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(ta!==0){var F=S?fb(d,S):new FormData(d);Jf(o,{pending:!0,data:F,method:d.method,action:g},null,F)}}else typeof g=="function"&&(D.preventDefault(),F=S?fb(d,S):new FormData(d),Jf(o,{pending:!0,data:F,method:d.method,action:g},g,F))},currentTarget:d}]})}}for(var Pp=0;Pp<hf.length;Pp++){var Np=hf[Pp];Ir(Np.toLowerCase(),"on"+(Np[0].toUpperCase()+Np.slice(1)))}Ir(Qy,"onAnimationEnd"),Ir(Gy,"onAnimationIteration"),Ir(Jy,"onAnimationStart"),Ir("dblclick","onDoubleClick"),Ir("focusin","onFocus"),Ir("focusout","onBlur"),Ir(HE,"onTransitionRun"),Ir(VE,"onTransitionStart"),Ir($E,"onTransitionCancel"),Ir(Xy,"onTransitionEnd"),er("onMouseEnter",["mouseout","mouseover"]),er("onMouseLeave",["mouseout","mouseover"]),er("onPointerEnter",["pointerout","pointerover"]),er("onPointerLeave",["pointerout","pointerover"]),$t("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$t("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$t("onBeforeInput",["compositionend","keypress","textInput","paste"]),$t("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$t("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$t("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ml="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),T3=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ml));function pb(t,r){r=(r&4)!=0;for(var o=0;o<t.length;o++){var l=t[o],d=l.event;l=l.listeners;e:{var g=void 0;if(r)for(var S=l.length-1;0<=S;S--){var D=l[S],F=D.instance,te=D.currentTarget;if(D=D.listener,F!==g&&d.isPropagationStopped())break e;g=D,d.currentTarget=te;try{g(d)}catch(fe){Ac(fe)}d.currentTarget=null,g=F}else for(S=0;S<l.length;S++){if(D=l[S],F=D.instance,te=D.currentTarget,D=D.listener,F!==g&&d.isPropagationStopped())break e;g=D,d.currentTarget=te;try{g(d)}catch(fe){Ac(fe)}d.currentTarget=null,g=F}}}}function rt(t,r){var o=r[Je];o===void 0&&(o=r[Je]=new Set);var l=t+"__bubble";o.has(l)||(hb(r,t,2,!1),o.add(l))}function Mp(t,r,o){var l=0;r&&(l|=4),hb(o,t,l,r)}var Gc="_reactListening"+Math.random().toString(36).slice(2);function mb(t){if(!t[Gc]){t[Gc]=!0,ot.forEach(function(o){o!=="selectionchange"&&(T3.has(o)||Mp(o,!1,t),Mp(o,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[Gc]||(r[Gc]=!0,Mp("selectionchange",!1,r))}}function hb(t,r,o,l){switch(jb(r)){case 2:var d=nT;break;case 8:d=rT;break;default:d=Kp}o=d.bind(null,r,o,t),d=void 0,!Ms||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(d=!0),l?d===void 0?t.addEventListener(r,o,!0):t.addEventListener(r,o,{capture:!0,passive:d}):d===void 0?t.addEventListener(r,o,!1):t.addEventListener(r,o,{passive:d})}function Lp(t,r,o,l,d){var g=l;if(!(r&1)&&!(r&2)&&l!==null)e:for(;;){if(l===null)return;var S=l.tag;if(S===3||S===4){var D=l.stateNode.containerInfo;if(D===d)break;if(S===4)for(S=l.return;S!==null;){var F=S.tag;if((F===3||F===4)&&S.stateNode.containerInfo===d)return;S=S.return}for(;D!==null;){if(S=tt(D),S===null)return;if(F=S.tag,F===5||F===6||F===26||F===27){l=g=S;continue e}D=D.parentNode}}l=l.return}cc(function(){var te=g,fe=Da(o),ve=[];e:{var ie=Yy.get(t);if(ie!==void 0){var se=$i,qe=t;switch(t){case"keypress":if(Ao(o)===0)break e;case"keydown":case"keyup":se=_e;break;case"focusin":qe="focus",se=O;break;case"focusout":qe="blur",se=O;break;case"beforeblur":case"afterblur":se=O;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":se=k;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":se=T;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":se=Se;break;case Qy:case Gy:case Jy:se=M;break;case Xy:se=Ie;break;case"scroll":case"scrollend":se=u;break;case"wheel":se=lt;break;case"copy":case"cut":case"paste":se=z;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":se=je;break;case"toggle":case"beforetoggle":se=Xe}var Me=(r&4)!=0,Rt=!Me&&(t==="scroll"||t==="scrollend"),Q=Me?ie===null?null:ie+"Capture":ie;Me=[];for(var $=te,Y;$!==null;){var me=$;if(Y=me.stateNode,me=me.tag,me!==5&&me!==26&&me!==27||Y===null||Q===null||(me=No($,Q),me!=null&&Me.push(hl($,me,Y))),Rt)break;$=$.return}0<Me.length&&(ie=new se(ie,qe,null,o,fe),ve.push({event:ie,listeners:Me}))}}if(!(r&7)){e:{if(ie=t==="mouseover"||t==="pointerover",se=t==="mouseout"||t==="pointerout",ie&&o!==Ns&&(qe=o.relatedTarget||o.fromElement)&&(tt(qe)||qe[P]))break e;if((se||ie)&&(ie=fe.window===fe?fe:(ie=fe.ownerDocument)?ie.defaultView||ie.parentWindow:window,se?(qe=o.relatedTarget||o.toElement,se=te,qe=qe?tt(qe):null,qe!==null&&(Rt=f(qe),Me=qe.tag,qe!==Rt||Me!==5&&Me!==27&&Me!==6)&&(qe=null)):(se=null,qe=te),se!==qe)){if(Me=k,me="onMouseLeave",Q="onMouseEnter",$="mouse",(t==="pointerout"||t==="pointerover")&&(Me=je,me="onPointerLeave",Q="onPointerEnter",$="pointer"),Rt=se==null?ie:wt(se),Y=qe==null?ie:wt(qe),ie=new Me(me,$+"leave",se,o,fe),ie.target=Rt,ie.relatedTarget=Y,me=null,tt(fe)===te&&(Me=new Me(Q,$+"enter",qe,o,fe),Me.target=Y,Me.relatedTarget=Rt,me=Me),Rt=me,se&&qe)t:{for(Me=se,Q=qe,$=0,Y=Me;Y;Y=es(Y))$++;for(Y=0,me=Q;me;me=es(me))Y++;for(;0<$-Y;)Me=es(Me),$--;for(;0<Y-$;)Q=es(Q),Y--;for(;$--;){if(Me===Q||Q!==null&&Me===Q.alternate)break t;Me=es(Me),Q=es(Q)}Me=null}else Me=null;se!==null&&gb(ve,ie,se,Me,!1),qe!==null&&Rt!==null&&gb(ve,Rt,qe,Me,!0)}}e:{if(ie=te?wt(te):window,se=ie.nodeName&&ie.nodeName.toLowerCase(),se==="select"||se==="input"&&ie.type==="file")var Re=jy;else if(Ay(ie))if(qy)Re=zE;else{Re=jE;var et=IE}else se=ie.nodeName,!se||se.toLowerCase()!=="input"||ie.type!=="checkbox"&&ie.type!=="radio"?te&&Os(te.elementType)&&(Re=jy):Re=qE;if(Re&&(Re=Re(t,te))){Iy(ve,Re,o,fe);break e}et&&et(t,ie,te),t==="focusout"&&te&&ie.type==="number"&&te.memoizedProps.value!=null&&Ds(ie,"number",ie.value)}switch(et=te?wt(te):window,t){case"focusin":(Ay(et)||et.contentEditable==="true")&&(Oa=et,ff=te,Bs=null);break;case"focusout":Bs=ff=Oa=null;break;case"mousedown":pf=!0;break;case"contextmenu":case"mouseup":case"dragend":pf=!1,Uy(ve,o,fe);break;case"selectionchange":if(BE)break;case"keydown":case"keyup":Uy(ve,o,fe)}var Oe;if(Pt)e:{switch(t){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else Wi?qo(t,o)&&(Le="onCompositionEnd"):t==="keydown"&&o.keyCode===229&&(Le="onCompositionStart");Le&&(Jt&&o.locale!=="ko"&&(Wi||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&Wi&&(Oe=As()):(Gr=fe,Ls="value"in Gr?Gr.value:Gr.textContent,Wi=!0)),et=Jc(te,Le),0<et.length&&(Le=new I(Le,t,null,o,fe),ve.push({event:Le,listeners:et}),Oe?Le.data=Oe:(Oe=uc(o),Oe!==null&&(Le.data=Oe)))),(Oe=Ke?js(t,o):ME(t,o))&&(Le=Jc(te,"onBeforeInput"),0<Le.length&&(et=new I("onBeforeInput","beforeinput",null,o,fe),ve.push({event:et,listeners:Le}),et.data=Oe)),E3(ve,t,te,o,fe)}pb(ve,r)})}function hl(t,r,o){return{instance:t,listener:r,currentTarget:o}}function Jc(t,r){for(var o=r+"Capture",l=[];t!==null;){var d=t,g=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||g===null||(d=No(t,o),d!=null&&l.unshift(hl(t,d,g)),d=No(t,r),d!=null&&l.push(hl(t,d,g))),t.tag===3)return l;t=t.return}return[]}function es(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function gb(t,r,o,l,d){for(var g=r._reactName,S=[];o!==null&&o!==l;){var D=o,F=D.alternate,te=D.stateNode;if(D=D.tag,F!==null&&F===l)break;D!==5&&D!==26&&D!==27||te===null||(F=te,d?(te=No(o,g),te!=null&&S.unshift(hl(o,te,F))):d||(te=No(o,g),te!=null&&S.push(hl(o,te,F)))),o=o.return}S.length!==0&&t.push({event:r,listeners:S})}var R3=/\r\n?/g,D3=/\u0000|\uFFFD/g;function yb(t){return(typeof t=="string"?t:""+t).replace(R3,`
10
+ `).replace(D3,"")}function vb(t,r){return r=yb(r),yb(t)===r}function Xc(){}function Tt(t,r,o,l,d,g){switch(o){case"children":typeof l=="string"?r==="body"||r==="textarea"&&l===""||Qr(t,l):(typeof l=="number"||typeof l=="bigint")&&r!=="body"&&Qr(t,""+l);break;case"className":Ta(t,"class",l);break;case"tabIndex":Ta(t,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Ta(t,o,l);break;case"style":di(t,l,g);break;case"data":if(r!=="object"){Ta(t,"data",l);break}case"src":case"href":if(l===""&&(r!=="a"||o!=="href")){t.removeAttribute(o);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(o);break}l=Oo(""+l),t.setAttribute(o,l);break;case"action":case"formAction":if(typeof l=="function"){t.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(o==="formAction"?(r!=="input"&&Tt(t,r,"name",d.name,d,null),Tt(t,r,"formEncType",d.formEncType,d,null),Tt(t,r,"formMethod",d.formMethod,d,null),Tt(t,r,"formTarget",d.formTarget,d,null)):(Tt(t,r,"encType",d.encType,d,null),Tt(t,r,"method",d.method,d,null),Tt(t,r,"target",d.target,d,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(o);break}l=Oo(""+l),t.setAttribute(o,l);break;case"onClick":l!=null&&(t.onclick=Xc);break;case"onScroll":l!=null&&rt("scroll",t);break;case"onScrollEnd":l!=null&&rt("scrollend",t);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(o=l.__html,o!=null){if(d.children!=null)throw Error(s(60));t.innerHTML=o}}break;case"multiple":t.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":t.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){t.removeAttribute("xlink:href");break}o=Oo(""+l),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(o,""+l):t.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(o,""):t.removeAttribute(o);break;case"capture":case"download":l===!0?t.setAttribute(o,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(o,l):t.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?t.setAttribute(o,l):t.removeAttribute(o);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?t.removeAttribute(o):t.setAttribute(o,l);break;case"popover":rt("beforetoggle",t),rt("toggle",t),Eo(t,"popover",l);break;case"xlinkActuate":mr(t,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":mr(t,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":mr(t,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":mr(t,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":mr(t,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":mr(t,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":mr(t,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":mr(t,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":mr(t,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Eo(t,"is",l);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=Ps.get(o)||o,Eo(t,o,l))}}function Ap(t,r,o,l,d,g){switch(o){case"style":di(t,l,g);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(o=l.__html,o!=null){if(d.children!=null)throw Error(s(60));t.innerHTML=o}}break;case"children":typeof l=="string"?Qr(t,l):(typeof l=="number"||typeof l=="bigint")&&Qr(t,""+l);break;case"onScroll":l!=null&&rt("scroll",t);break;case"onScrollEnd":l!=null&&rt("scrollend",t);break;case"onClick":l!=null&&(t.onclick=Xc);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ht.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(d=o.endsWith("Capture"),r=o.slice(2,d?o.length-7:void 0),g=t[jt]||null,g=g==null?null:g[o],typeof g=="function"&&t.removeEventListener(r,g,d),typeof l=="function")){typeof g!="function"&&g!==null&&(o in t?t[o]=null:t.hasAttribute(o)&&t.removeAttribute(o)),t.addEventListener(r,l,d);break e}o in t?t[o]=l:l===!0?t.setAttribute(o,""):Eo(t,o,l)}}}function Sn(t,r,o){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":rt("error",t),rt("load",t);var l=!1,d=!1,g;for(g in o)if(o.hasOwnProperty(g)){var S=o[g];if(S!=null)switch(g){case"src":l=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:Tt(t,r,g,S,o,null)}}d&&Tt(t,r,"srcSet",o.srcSet,o,null),l&&Tt(t,r,"src",o.src,o,null);return;case"input":rt("invalid",t);var D=g=S=d=null,F=null,te=null;for(l in o)if(o.hasOwnProperty(l)){var fe=o[l];if(fe!=null)switch(l){case"name":d=fe;break;case"type":S=fe;break;case"checked":F=fe;break;case"defaultChecked":te=fe;break;case"value":g=fe;break;case"defaultValue":D=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(s(137,r));break;default:Tt(t,r,l,fe,o,null)}}Do(t,g,D,F,te,S,d,!1),To(t);return;case"select":for(d in rt("invalid",t),l=S=g=null,o)if(o.hasOwnProperty(d)&&(D=o[d],D!=null))switch(d){case"value":g=D;break;case"defaultValue":S=D;break;case"multiple":l=D;default:Tt(t,r,d,D,o,null)}r=g,o=S,t.multiple=!!l,r==null?o!=null&&hr(t,!!l,o,!0):hr(t,!!l,r,!1);return;case"textarea":for(S in rt("invalid",t),g=d=l=null,o)if(o.hasOwnProperty(S)&&(D=o[S],D!=null))switch(S){case"value":l=D;break;case"defaultValue":d=D;break;case"children":g=D;break;case"dangerouslySetInnerHTML":if(D!=null)throw Error(s(91));break;default:Tt(t,r,S,D,o,null)}Hi(t,l,d,g),To(t);return;case"option":for(F in o)if(o.hasOwnProperty(F)&&(l=o[F],l!=null))switch(F){case"selected":t.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Tt(t,r,F,l,o,null)}return;case"dialog":rt("beforetoggle",t),rt("toggle",t),rt("cancel",t),rt("close",t);break;case"iframe":case"object":rt("load",t);break;case"video":case"audio":for(l=0;l<ml.length;l++)rt(ml[l],t);break;case"image":rt("error",t),rt("load",t);break;case"details":rt("toggle",t);break;case"embed":case"source":case"link":rt("error",t),rt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(te in o)if(o.hasOwnProperty(te)&&(l=o[te],l!=null))switch(te){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:Tt(t,r,te,l,o,null)}return;default:if(Os(r)){for(fe in o)o.hasOwnProperty(fe)&&(l=o[fe],l!==void 0&&Ap(t,r,fe,l,o,void 0));return}}for(D in o)o.hasOwnProperty(D)&&(l=o[D],l!=null&&Tt(t,r,D,l,o,null))}function O3(t,r,o,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,g=null,S=null,D=null,F=null,te=null,fe=null;for(se in o){var ve=o[se];if(o.hasOwnProperty(se)&&ve!=null)switch(se){case"checked":break;case"value":break;case"defaultValue":F=ve;default:l.hasOwnProperty(se)||Tt(t,r,se,null,l,ve)}}for(var ie in l){var se=l[ie];if(ve=o[ie],l.hasOwnProperty(ie)&&(se!=null||ve!=null))switch(ie){case"type":g=se;break;case"name":d=se;break;case"checked":te=se;break;case"defaultChecked":fe=se;break;case"value":S=se;break;case"defaultValue":D=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(s(137,r));break;default:se!==ve&&Tt(t,r,ie,se,l,ve)}}Rs(t,S,D,F,te,fe,g,d);return;case"select":for(g in se=S=D=ie=null,o)if(F=o[g],o.hasOwnProperty(g)&&F!=null)switch(g){case"value":break;case"multiple":se=F;default:l.hasOwnProperty(g)||Tt(t,r,g,null,l,F)}for(d in l)if(g=l[d],F=o[d],l.hasOwnProperty(d)&&(g!=null||F!=null))switch(d){case"value":ie=g;break;case"defaultValue":D=g;break;case"multiple":S=g;default:g!==F&&Tt(t,r,d,g,l,F)}r=D,o=S,l=se,ie==null?!!l!=!!o&&(r==null?hr(t,!!o,o?[]:"",!1):hr(t,!!o,r,!0)):hr(t,!!o,ie,!1);return;case"textarea":for(D in se=ie=null,o)if(d=o[D],o.hasOwnProperty(D)&&d!=null&&!l.hasOwnProperty(D))switch(D){case"value":break;case"children":break;default:Tt(t,r,D,null,l,d)}for(S in l)if(d=l[S],g=o[S],l.hasOwnProperty(S)&&(d!=null||g!=null))switch(S){case"value":ie=d;break;case"defaultValue":se=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(s(91));break;default:d!==g&&Tt(t,r,S,d,l,g)}ac(t,ie,se);return;case"option":for(var qe in o)if(ie=o[qe],o.hasOwnProperty(qe)&&ie!=null&&!l.hasOwnProperty(qe))switch(qe){case"selected":t.selected=!1;break;default:Tt(t,r,qe,null,l,ie)}for(F in l)if(ie=l[F],se=o[F],l.hasOwnProperty(F)&&ie!==se&&(ie!=null||se!=null))switch(F){case"selected":t.selected=ie&&typeof ie!="function"&&typeof ie!="symbol";break;default:Tt(t,r,F,ie,l,se)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Me in o)ie=o[Me],o.hasOwnProperty(Me)&&ie!=null&&!l.hasOwnProperty(Me)&&Tt(t,r,Me,null,l,ie);for(te in l)if(ie=l[te],se=o[te],l.hasOwnProperty(te)&&ie!==se&&(ie!=null||se!=null))switch(te){case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(s(137,r));break;default:Tt(t,r,te,ie,l,se)}return;default:if(Os(r)){for(var Rt in o)ie=o[Rt],o.hasOwnProperty(Rt)&&ie!==void 0&&!l.hasOwnProperty(Rt)&&Ap(t,r,Rt,void 0,l,ie);for(fe in l)ie=l[fe],se=o[fe],!l.hasOwnProperty(fe)||ie===se||ie===void 0&&se===void 0||Ap(t,r,fe,ie,l,se);return}}for(var Q in o)ie=o[Q],o.hasOwnProperty(Q)&&ie!=null&&!l.hasOwnProperty(Q)&&Tt(t,r,Q,null,l,ie);for(ve in l)ie=l[ve],se=o[ve],!l.hasOwnProperty(ve)||ie===se||ie==null&&se==null||Tt(t,r,ve,ie,l,se)}var Ip=null,jp=null;function Yc(t){return t.nodeType===9?t:t.ownerDocument}function bb(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function wb(t,r){if(t===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&r==="foreignObject"?0:t}function qp(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var zp=null;function P3(){var t=window.event;return t&&t.type==="popstate"?t===zp?!1:(zp=t,!0):(zp=null,!1)}var _b=typeof setTimeout=="function"?setTimeout:void 0,N3=typeof clearTimeout=="function"?clearTimeout:void 0,xb=typeof Promise=="function"?Promise:void 0,M3=typeof queueMicrotask=="function"?queueMicrotask:xb===void 0?_b:function(t){return xb.resolve(null).then(t).catch(L3)};function L3(t){setTimeout(function(){throw t})}function oo(t){return t==="head"}function kb(t,r){var o=r,l=0,d=0;do{var g=o.nextSibling;if(t.removeChild(o),g&&g.nodeType===8)if(o=g.data,o==="/$"){if(0<l&&8>l){o=l;var S=t.ownerDocument;if(o&1&&gl(S.documentElement),o&2&&gl(S.body),o&4)for(o=S.head,gl(o),S=o.firstChild;S;){var D=S.nextSibling,F=S.nodeName;S[Ce]||F==="SCRIPT"||F==="STYLE"||F==="LINK"&&S.rel.toLowerCase()==="stylesheet"||o.removeChild(S),S=D}}if(d===0){t.removeChild(g),Cl(r);return}d--}else o==="$"||o==="$?"||o==="$!"?d++:l=o.charCodeAt(0)-48;else l=0;o=g}while(o);Cl(r)}function Fp(t){var r=t.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var o=r;switch(r=r.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":Fp(o),ft(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}t.removeChild(o)}}function A3(t,r,o,l){for(;t.nodeType===1;){var d=o;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!l&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(l){if(!t[Ce])switch(r){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(g=t.getAttribute("rel"),g==="stylesheet"&&t.hasAttribute("data-precedence")||g!==d.rel||t.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||t.getAttribute("title")!==(d.title==null?null:d.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(g=t.getAttribute("src"),(g!==(d.src==null?null:d.src)||t.getAttribute("type")!==(d.type==null?null:d.type)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&g&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(r==="input"&&t.type==="hidden"){var g=d.name==null?null:""+d.name;if(d.type==="hidden"&&t.getAttribute("name")===g)return t}else return t;if(t=qr(t.nextSibling),t===null)break}return null}function I3(t,r,o){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!o||(t=qr(t.nextSibling),t===null))return null;return t}function Bp(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState==="complete"}function j3(t,r){var o=t.ownerDocument;if(t.data!=="$?"||o.readyState==="complete")r();else{var l=function(){r(),o.removeEventListener("DOMContentLoaded",l)};o.addEventListener("DOMContentLoaded",l),t._reactRetry=l}}function qr(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?"||r==="F!"||r==="F")break;if(r==="/$")return null}}return t}var Hp=null;function Cb(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var o=t.data;if(o==="$"||o==="$!"||o==="$?"){if(r===0)return t;r--}else o==="/$"&&r++}t=t.previousSibling}return null}function Sb(t,r,o){switch(r=Yc(o),t){case"html":if(t=r.documentElement,!t)throw Error(s(452));return t;case"head":if(t=r.head,!t)throw Error(s(453));return t;case"body":if(t=r.body,!t)throw Error(s(454));return t;default:throw Error(s(451))}}function gl(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);ft(t)}var kr=new Map,Eb=new Set;function Zc(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Ei=K.d;K.d={f:q3,r:z3,D:F3,C:B3,L:H3,m:V3,X:W3,S:$3,M:U3};function q3(){var t=Ei.f(),r=$c();return t||r}function z3(t){var r=it(t);r!==null&&r.tag===5&&r.type==="form"?Qv(r):Ei.r(t)}var ts=typeof document>"u"?null:document;function Tb(t,r,o){var l=ts;if(l&&typeof r=="string"&&r){var d=Ve(r);d='link[rel="'+t+'"][href="'+d+'"]',typeof o=="string"&&(d+='[crossorigin="'+o+'"]'),Eb.has(d)||(Eb.add(d),t={rel:t,crossOrigin:o,href:r},l.querySelector(d)===null&&(r=l.createElement("link"),Sn(r,"link",t),He(r),l.head.appendChild(r)))}}function F3(t){Ei.D(t),Tb("dns-prefetch",t,null)}function B3(t,r){Ei.C(t,r),Tb("preconnect",t,r)}function H3(t,r,o){Ei.L(t,r,o);var l=ts;if(l&&t&&r){var d='link[rel="preload"][as="'+Ve(r)+'"]';r==="image"&&o&&o.imageSrcSet?(d+='[imagesrcset="'+Ve(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(d+='[imagesizes="'+Ve(o.imageSizes)+'"]')):d+='[href="'+Ve(t)+'"]';var g=d;switch(r){case"style":g=ns(t);break;case"script":g=rs(t)}kr.has(g)||(t=_({rel:"preload",href:r==="image"&&o&&o.imageSrcSet?void 0:t,as:r},o),kr.set(g,t),l.querySelector(d)!==null||r==="style"&&l.querySelector(yl(g))||r==="script"&&l.querySelector(vl(g))||(r=l.createElement("link"),Sn(r,"link",t),He(r),l.head.appendChild(r)))}}function V3(t,r){Ei.m(t,r);var o=ts;if(o&&t){var l=r&&typeof r.as=="string"?r.as:"script",d='link[rel="modulepreload"][as="'+Ve(l)+'"][href="'+Ve(t)+'"]',g=d;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=rs(t)}if(!kr.has(g)&&(t=_({rel:"modulepreload",href:t},r),kr.set(g,t),o.querySelector(d)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(vl(g)))return}l=o.createElement("link"),Sn(l,"link",t),He(l),o.head.appendChild(l)}}}function $3(t,r,o){Ei.S(t,r,o);var l=ts;if(l&&t){var d=$e(l).hoistableStyles,g=ns(t);r||(r="default");var S=d.get(g);if(!S){var D={loading:0,preload:null};if(S=l.querySelector(yl(g)))D.loading=5;else{t=_({rel:"stylesheet",href:t,"data-precedence":r},o),(o=kr.get(g))&&Vp(t,o);var F=S=l.createElement("link");He(F),Sn(F,"link",t),F._p=new Promise(function(te,fe){F.onload=te,F.onerror=fe}),F.addEventListener("load",function(){D.loading|=1}),F.addEventListener("error",function(){D.loading|=2}),D.loading|=4,eu(S,r,l)}S={type:"stylesheet",instance:S,count:1,state:D},d.set(g,S)}}}function W3(t,r){Ei.X(t,r);var o=ts;if(o&&t){var l=$e(o).hoistableScripts,d=rs(t),g=l.get(d);g||(g=o.querySelector(vl(d)),g||(t=_({src:t,async:!0},r),(r=kr.get(d))&&$p(t,r),g=o.createElement("script"),He(g),Sn(g,"link",t),o.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},l.set(d,g))}}function U3(t,r){Ei.M(t,r);var o=ts;if(o&&t){var l=$e(o).hoistableScripts,d=rs(t),g=l.get(d);g||(g=o.querySelector(vl(d)),g||(t=_({src:t,async:!0,type:"module"},r),(r=kr.get(d))&&$p(t,r),g=o.createElement("script"),He(g),Sn(g,"link",t),o.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},l.set(d,g))}}function Rb(t,r,o,l){var d=(d=It.current)?Zc(d):null;if(!d)throw Error(s(446));switch(t){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(r=ns(o.href),o=$e(d).hoistableStyles,l=o.get(r),l||(l={type:"style",instance:null,count:0,state:null},o.set(r,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){t=ns(o.href);var g=$e(d).hoistableStyles,S=g.get(t);if(S||(d=d.ownerDocument||d,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(t,S),(g=d.querySelector(yl(t)))&&!g._p&&(S.instance=g,S.state.loading=5),kr.has(t)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},kr.set(t,o),g||K3(d,t,o,S.state))),r&&l===null)throw Error(s(528,""));return S}if(r&&l!==null)throw Error(s(529,""));return null;case"script":return r=o.async,o=o.src,typeof o=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=rs(o),o=$e(d).hoistableScripts,l=o.get(r),l||(l={type:"script",instance:null,count:0,state:null},o.set(r,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,t))}}function ns(t){return'href="'+Ve(t)+'"'}function yl(t){return'link[rel="stylesheet"]['+t+"]"}function Db(t){return _({},t,{"data-precedence":t.precedence,precedence:null})}function K3(t,r,o,l){t.querySelector('link[rel="preload"][as="style"]['+r+"]")?l.loading=1:(r=t.createElement("link"),l.preload=r,r.addEventListener("load",function(){return l.loading|=1}),r.addEventListener("error",function(){return l.loading|=2}),Sn(r,"link",o),He(r),t.head.appendChild(r))}function rs(t){return'[src="'+Ve(t)+'"]'}function vl(t){return"script[async]"+t}function Ob(t,r,o){if(r.count++,r.instance===null)switch(r.type){case"style":var l=t.querySelector('style[data-href~="'+Ve(o.href)+'"]');if(l)return r.instance=l,He(l),l;var d=_({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),He(l),Sn(l,"style",d),eu(l,o.precedence,t),r.instance=l;case"stylesheet":d=ns(o.href);var g=t.querySelector(yl(d));if(g)return r.state.loading|=4,r.instance=g,He(g),g;l=Db(o),(d=kr.get(d))&&Vp(l,d),g=(t.ownerDocument||t).createElement("link"),He(g);var S=g;return S._p=new Promise(function(D,F){S.onload=D,S.onerror=F}),Sn(g,"link",l),r.state.loading|=4,eu(g,o.precedence,t),r.instance=g;case"script":return g=rs(o.src),(d=t.querySelector(vl(g)))?(r.instance=d,He(d),d):(l=o,(d=kr.get(g))&&(l=_({},o),$p(l,d)),t=t.ownerDocument||t,d=t.createElement("script"),He(d),Sn(d,"link",l),t.head.appendChild(d),r.instance=d);case"void":return null;default:throw Error(s(443,r.type))}else r.type==="stylesheet"&&!(r.state.loading&4)&&(l=r.instance,r.state.loading|=4,eu(l,o.precedence,t));return r.instance}function eu(t,r,o){for(var l=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=l.length?l[l.length-1]:null,g=d,S=0;S<l.length;S++){var D=l[S];if(D.dataset.precedence===r)g=D;else if(g!==d)break}g?g.parentNode.insertBefore(t,g.nextSibling):(r=o.nodeType===9?o.head:o,r.insertBefore(t,r.firstChild))}function Vp(t,r){t.crossOrigin??(t.crossOrigin=r.crossOrigin),t.referrerPolicy??(t.referrerPolicy=r.referrerPolicy),t.title??(t.title=r.title)}function $p(t,r){t.crossOrigin??(t.crossOrigin=r.crossOrigin),t.referrerPolicy??(t.referrerPolicy=r.referrerPolicy),t.integrity??(t.integrity=r.integrity)}var tu=null;function Pb(t,r,o){if(tu===null){var l=new Map,d=tu=new Map;d.set(o,l)}else d=tu,l=d.get(o),l||(l=new Map,d.set(o,l));if(l.has(t))return l;for(l.set(t,null),o=o.getElementsByTagName(t),d=0;d<o.length;d++){var g=o[d];if(!(g[Ce]||g[bt]||t==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var S=g.getAttribute(r)||"";S=t+S;var D=l.get(S);D?D.push(g):l.set(S,[g])}}return l}function Nb(t,r,o){t=t.ownerDocument||t,t.head.insertBefore(o,r==="title"?t.querySelector("head > title"):null)}function Q3(t,r,o){if(o===1||r.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return t=r.disabled,typeof r.precedence=="string"&&t==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function Mb(t){return!(t.type==="stylesheet"&&!(t.state.loading&3))}var bl=null;function G3(){}function J3(t,r,o){if(bl===null)throw Error(s(475));var l=bl;if(r.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&!(r.state.loading&4)){if(r.instance===null){var d=ns(o.href),g=t.querySelector(yl(d));if(g){t=g._p,typeof t=="object"&&t&&typeof t.then=="function"&&(l.count++,l=nu.bind(l),t.then(l,l)),r.state.loading|=4,r.instance=g,He(g);return}g=t.ownerDocument||t,o=Db(o),(d=kr.get(d))&&Vp(o,d),g=g.createElement("link"),He(g);var S=g;S._p=new Promise(function(D,F){S.onload=D,S.onerror=F}),Sn(g,"link",o),r.instance=g}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(r,t),(t=r.state.preload)&&!(r.state.loading&3)&&(l.count++,r=nu.bind(l),t.addEventListener("load",r),t.addEventListener("error",r))}}function X3(){if(bl===null)throw Error(s(475));var t=bl;return t.stylesheets&&t.count===0&&Wp(t,t.stylesheets),0<t.count?function(r){var o=setTimeout(function(){if(t.stylesheets&&Wp(t,t.stylesheets),t.unsuspend){var l=t.unsuspend;t.unsuspend=null,l()}},6e4);return t.unsuspend=r,function(){t.unsuspend=null,clearTimeout(o)}}:null}function nu(){if(this.count--,this.count===0){if(this.stylesheets)Wp(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var ru=null;function Wp(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,ru=new Map,r.forEach(Y3,t),ru=null,nu.call(t))}function Y3(t,r){if(!(r.state.loading&4)){var o=ru.get(t);if(o)var l=o.get(null);else{o=new Map,ru.set(t,o);for(var d=t.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<d.length;g++){var S=d[g];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(o.set(S.dataset.precedence,S),l=S)}l&&o.set(null,l)}d=r.instance,S=d.getAttribute("data-precedence"),g=o.get(S)||l,g===l&&o.set(null,d),o.set(S,d),this.count++,l=nu.bind(this),d.addEventListener("load",l),d.addEventListener("error",l),g?g.parentNode.insertBefore(d,g.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(d,t.firstChild)),r.state.loading|=4}}var wl={$$typeof:G,Provider:null,Consumer:null,_currentValue:Ae,_currentValue2:Ae,_threadCount:0};function Z3(t,r,o,l,d,g,S,D){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=St(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=St(0),this.hiddenUpdates=St(null),this.identifierPrefix=l,this.onUncaughtError=d,this.onCaughtError=g,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=D,this.incompleteTransitions=new Map}function eT(t,r,o,l,d,g,S,D,F,te,fe,ve){return t=new Z3(t,r,o,S,D,F,te,ve),r=1,g===!0&&(r|=24),g=rr(3,null,null,r),t.current=g,g.stateNode=t,r=Tf(),r.refCount++,t.pooledCache=r,r.refCount++,g.memoizedState={element:l,isDehydrated:o,cache:r},Pf(g),t}function tT(t){return t?(t=La,t):La}function Lb(t,r,o,l,d,g){d=tT(d),l.context===null?l.context=d:l.pendingContext=d,l=Go(r),l.payload={element:o},g=g===void 0?null:g,g!==null&&(l.callback=g),o=Jo(t,l,r),o!==null&&(sr(o,t,r),Js(o,t,r))}function Ab(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var o=t.retryLane;t.retryLane=o!==0&&o<r?o:r}}function Up(t,r){Ab(t,r),(t=t.alternate)&&Ab(t,r)}function Ib(t){if(t.tag===13){var r=Ma(t,67108864);r!==null&&sr(r,t,67108864),Up(t,67108864)}}var iu=!0;function nT(t,r,o,l){var d=le.T;le.T=null;var g=K.p;try{K.p=2,Kp(t,r,o,l)}finally{K.p=g,le.T=d}}function rT(t,r,o,l){var d=le.T;le.T=null;var g=K.p;try{K.p=8,Kp(t,r,o,l)}finally{K.p=g,le.T=d}}function Kp(t,r,o,l){if(iu){var d=Qp(l);if(d===null)Lp(t,r,l,ou,o),qb(t,l);else if(oT(d,t,r,o,l))l.stopPropagation();else if(qb(t,l),r&4&&-1<iT.indexOf(t)){for(;d!==null;){var g=it(d);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var S=Ge(g.pendingLanes);if(S!==0){var D=g;for(D.pendingLanes|=2,D.entangledLanes|=2;S;){var F=1<<31-Ft(S);D.entanglements[1]|=F,S&=~F}Si(g),!(_t&6)&&(Hc=yn()+500,pl(0,!1))}}break;case 13:D=Ma(g,2),D!==null&&sr(D,g,2),$c(),Up(g,2)}if(g=Qp(l),g===null&&Lp(t,r,l,ou,o),g===d)break;d=g}d!==null&&l.stopPropagation()}else Lp(t,r,l,null,o)}}function Qp(t){return t=Da(t),Gp(t)}var ou=null;function Gp(t){if(ou=null,t=tt(t),t!==null){var r=f(t);if(r===null)t=null;else{var o=r.tag;if(o===13){if(t=p(r),t!==null)return t;t=null}else if(o===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null)}}return ou=t,null}function jb(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ln()){case Pr:return 2;case An:return 8;case nn:case Fi:return 32;case $r:return 268435456;default:return 32}default:return 32}}var Jp=!1,ao=null,so=null,lo=null,_l=new Map,xl=new Map,co=[],iT="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function qb(t,r){switch(t){case"focusin":case"focusout":ao=null;break;case"dragenter":case"dragleave":so=null;break;case"mouseover":case"mouseout":lo=null;break;case"pointerover":case"pointerout":_l.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":xl.delete(r.pointerId)}}function kl(t,r,o,l,d,g){return t===null||t.nativeEvent!==g?(t={blockedOn:r,domEventName:o,eventSystemFlags:l,nativeEvent:g,targetContainers:[d]},r!==null&&(r=it(r),r!==null&&Ib(r)),t):(t.eventSystemFlags|=l,r=t.targetContainers,d!==null&&r.indexOf(d)===-1&&r.push(d),t)}function oT(t,r,o,l,d){switch(r){case"focusin":return ao=kl(ao,t,r,o,l,d),!0;case"dragenter":return so=kl(so,t,r,o,l,d),!0;case"mouseover":return lo=kl(lo,t,r,o,l,d),!0;case"pointerover":var g=d.pointerId;return _l.set(g,kl(_l.get(g)||null,t,r,o,l,d)),!0;case"gotpointercapture":return g=d.pointerId,xl.set(g,kl(xl.get(g)||null,t,r,o,l,d)),!0}return!1}function zb(t){var r=tt(t.target);if(r!==null){var o=f(r);if(o!==null){if(r=o.tag,r===13){if(r=p(o),r!==null){t.blockedOn=r,Zn(t.priority,function(){if(o.tag===13){var l=xr();l=Bn(l);var d=Ma(o,l);d!==null&&sr(d,o,l),Up(o,l)}});return}}else if(r===3&&o.stateNode.current.memoizedState.isDehydrated){t.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}t.blockedOn=null}function au(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var o=Qp(t.nativeEvent);if(o===null){o=t.nativeEvent;var l=new o.constructor(o.type,o);Ns=l,o.target.dispatchEvent(l),Ns=null}else return r=it(o),r!==null&&Ib(r),t.blockedOn=o,!1;r.shift()}return!0}function Fb(t,r,o){au(t)&&o.delete(r)}function aT(){Jp=!1,ao!==null&&au(ao)&&(ao=null),so!==null&&au(so)&&(so=null),lo!==null&&au(lo)&&(lo=null),_l.forEach(Fb),xl.forEach(Fb)}function su(t,r){t.blockedOn===r&&(t.blockedOn=null,Jp||(Jp=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,aT)))}var lu=null;function Bb(t){lu!==t&&(lu=t,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){lu===t&&(lu=null);for(var r=0;r<t.length;r+=3){var o=t[r],l=t[r+1],d=t[r+2];if(typeof l!="function"){if(Gp(l||o)===null)continue;break}var g=it(o);g!==null&&(t.splice(r,3),r-=3,Jf(g,{pending:!0,data:d,method:o.method,action:l},l,d))}}))}function Cl(t){function r(F){return su(F,t)}ao!==null&&su(ao,t),so!==null&&su(so,t),lo!==null&&su(lo,t),_l.forEach(r),xl.forEach(r);for(var o=0;o<co.length;o++){var l=co[o];l.blockedOn===t&&(l.blockedOn=null)}for(;0<co.length&&(o=co[0],o.blockedOn===null);)zb(o),o.blockedOn===null&&co.shift();if(o=(t.ownerDocument||t).$$reactFormReplay,o!=null)for(l=0;l<o.length;l+=3){var d=o[l],g=o[l+1],S=d[jt]||null;if(typeof g=="function")S||Bb(o);else if(S){var D=null;if(g&&g.hasAttribute("formAction")){if(d=g,S=g[jt]||null)D=S.formAction;else if(Gp(d)!==null)continue}else D=S.action;typeof D=="function"?o[l+1]=D:(o.splice(l,3),l-=3),Bb(o)}}}function Xp(t){this._internalRoot=t}Yp.prototype.render=Xp.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(s(409));var o=r.current;Lb(o,xr(),t,r,null,null)},Yp.prototype.unmount=Xp.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;Lb(t.current,2,null,t,null,null),$c(),r[P]=null}};function Yp(t){this._internalRoot=t}Yp.prototype.unstable_scheduleHydration=function(t){if(t){var r=ui();t={blockedOn:null,target:t,priority:r};for(var o=0;o<co.length&&r!==0&&r<co[o].priority;o++);co.splice(o,0,t),o===0&&zb(t)}};var Hb=i.version;if(Hb!=="19.1.1")throw Error(s(527,Hb,"19.1.1"));K.findDOMNode=function(t){var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(s(188)):(t=Object.keys(t).join(","),Error(s(268,t)));return t=v(r),t=t===null?null:w(t),t=t===null?null:t.stateNode,t};var sT={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:le,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var cu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cu.isDisabled&&cu.supportsFiber)try{Ht=cu.inject(sT),Qt=cu}catch{}}e.createRoot=function(t,r){if(!c(t))throw Error(s(299));var o=!1,l="",d=o3,g=a3,S=s3,D=null;return r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(l=r.identifierPrefix),r.onUncaughtError!==void 0&&(d=r.onUncaughtError),r.onCaughtError!==void 0&&(g=r.onCaughtError),r.onRecoverableError!==void 0&&(S=r.onRecoverableError),r.unstable_transitionCallbacks!==void 0&&(D=r.unstable_transitionCallbacks)),r=eT(t,1,!1,null,null,o,l,d,g,S,D,null),t[P]=r.current,mb(t),new Xp(r)}})),Su=ke(((e,n)=>{function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(a){console.error(a)}}i(),n.exports=yo()})),ih="Expected a function";function d_(e,n){var i;if(typeof n!="function")throw TypeError(ih);return e=xT(e),function(){return--e>0&&(i=n.apply(this,arguments)),e<=1&&(n=void 0),i}}var f_=d_;function p_(e){return f_(2,e)}let oh;ym=p_,oh=Math.max;function m_(e){if(!(e&&e.length))return[];var n=0;return e=ST(e,function(i){if(CT(i))return n=oh(i.length,n),!0}),wT(n,function(i){return _T(e,ET(i))})}var h_=kT(m_);Mm=function(e,n){if(e==null)throw Error(n||`Expected value but got ${e}`)},BigInt.prototype.toJSON=function(){return JSON.rawJSON(this.toString())},bm=function(e){try{return JSON.parse(e,(n,i)=>rd(i))}catch{}if(e==null||e==="")return{};try{return e??(e=""),e=e.replaceAll(new RegExp(`(?<=\\s|^|\\[|,|:)(NaN|-Infinity|Infinity)(?=(?:[^"'\\\\]*(\\\\.|'([^'\\\\]*\\\\.)*[^'\\\\]*'|"([^"\\\\]*\\\\.)*[^"\\\\]*"))*[^"']*$)`,"g"),'"\u25D0$1\u25D0"'),JSON.parse(e,(n,i)=>typeof i=="string"?i==="\u25D0NaN\u25D0"?NaN:i==="\u25D0Infinity\u25D0"?1/0:i==="\u25D0-Infinity\u25D0"?-1/0:rd(i):rd(i))}catch{return{}}};function g_(e,n){return e==null?"":typeof e=="number"&&!Number.isNaN(e)?e.toLocaleString(n,{useGrouping:!1,maximumFractionDigits:20}):String(e)}aw=function(e,n){if(e.length===0)return"";let i=Object.keys(e[0]),a=e.map(s=>i.map(c=>g_(s[c],n)).join(" "));return`${i.join(" ")}
11
+ ${a.join(`
12
+ `)}`};function rd(e){return typeof e=="object"&&e&&"$bigint"in e&&typeof e.$bigint=="string"?BigInt(e.$bigint):e}var ah="abcdefghijklmnopqrstuvwxyz",sh=ah+ah.toUpperCase(),lh=new Set;ls="__scratch__",dr="setup",fo={create(){let e=0,n;do{let i="";for(let a=0;a<4;a++)i+=sh[Math.floor(Math.random()*sh.length)];n=i,e++}while(lh.has(n)&&e<100);if(e>=100)throw Error("Failed to generate unique CellId after 100 attempts");return lh.add(n),n}},cr={create(e){return En(e!=null,"cellId is required"),`cell-${e}`},parse(e){return e.slice(5)},findElement(e){return e.closest('div[id^="cell-"]')},findElementThroughShadowDOMs(e){let n=e;for(;n;){let i=cr.findElement(n);if(i)return i;let a=n.getRootNode();if(n=a instanceof ShadowRoot?a.host:n.parentElement,n===a)break}return null}},lw=function(e){let n=null,i=cr.findElementThroughShadowDOMs(e);return i&&(n=cr.parse(i.id)),n},_u={parse(e){return e.getAttribute("object-id")},parseOrThrow(e){let n=_u.parse(e);return En(n,"<marimo-ui-element/> missing object-id attribute"),n}},A2={create(e){return`output-${e}`}},Cm=new class{getFilename(){return this.getSearchParam("filename")}setFilename(e){this.setSearchParam("filename",e)}getCodeFromSearchParam(){return this.getSearchParam("code")}getCodeFromHash(){let e=window.location.hash;return e.startsWith("#code/")?e.slice(6):null}setCodeForHash(e){window.location.hash=`#code/${e}`}setSearchParam(e,n){let i=new URL(window.location.href);i.searchParams.set(e,n),window.history.replaceState({},"",i.toString())}getSearchParam(e){return new URL(window.location.href).searchParams.get(e)}},$u=function(e){return bm(e??"")},U2=function(e){return ei.mapValues(e.dataset,n=>typeof n=="string"?$u(n):n)},G2=function(e,n){let i=e.parentElement?_u.parse(e.parentElement):void 0;return i&&n.has(i)?n.lookupValue(i):$u(e.dataset.initialValue)},Pl=function(){if(RT())return document.title||null;if(DT()){let i=Cm.getFilename();if(i)return i}let e=document.querySelector("marimo-filename");Mm(e,"marimo-filename tag not found");let n=e.innerHTML;return n.length===0?null:n};var y_=Symbol("");Y2=function(e,n){return Be(e,function(i,a,s){a(this,n(i(this),s))})};function id(e,n){let i=null,a=new Map,s=new Set,c=p=>{let h;if(n===void 0)h=a.get(p);else for(let[w,_]of a)if(n(w,p)){h=_;break}if(h!==void 0)if(i!=null&&i(h[1],p))c.remove(p);else return h[0];let v=e(p);return a.set(p,[v,Date.now()]),f("CREATE",p,v),v},f=(p,h,v)=>{for(let w of s)w({type:p,param:h,atom:v})};return c.unstable_listen=p=>(s.add(p),()=>{s.delete(p)}),c.getParams=()=>a.keys(),c.remove=p=>{if(n===void 0){if(!a.has(p))return;let[h]=a.get(p);a.delete(p),f("REMOVE",p,h)}else for(let[h,[v]]of a)if(n(h,p)){a.delete(h),f("REMOVE",h,v);break}},c.setShouldRemove=p=>{if(i=p,i)for(let[h,[v,w]]of a)i(w,h)&&(a.delete(h),f("REMOVE",h,v))},c}var od=(e,n,i)=>(n.has(i)?n:n.set(i,e())).get(i),v_=new WeakMap,b_=(e,n,i,a)=>od(e,od(()=>new WeakMap,od(()=>new WeakMap,v_,n),i),a);function w_(e,n,i=Object.is){return b_(()=>{let a=Symbol(),s=([f,p])=>{if(p===a)return n(f);let h=n(f,p);return i(p,h)?p:h},c=Be(f=>{let p=f(c);return s([f(e),p])});return c.init=a,c},e,n,i)}var ch=(e,n,i)=>(n.has(i)?n:n.set(i,e())).get(i),__=new WeakMap,x_=(e,n,i)=>ch(e,ch(()=>new WeakMap,__,n),i),k_={},uh=e=>!!e.write,C_=e=>typeof e=="function";function S_(e,n){return x_(()=>{let i=new WeakMap,a=(f,p)=>{let h=i.get(f);if(h)return h;let v=p&&i.get(p),w=[],_=[];return f.forEach((C,E)=>{let R=n?n(C):E;_[E]=R;let L=v&&v.atomList[v.keyList.indexOf(R)];if(L){w[E]=L;return}let H=W=>{let U=W(s),A=W(e),G=a(A,U==null?void 0:U.arr).keyList.indexOf(R);if(G<0||G>=A.length){let he=f[a(f).keyList.indexOf(R)];if(he)return he;throw Error("splitAtom: index out of bounds for read")}return A[G]};w[E]=uh(e)?Be(H,(W,U,A)=>{let G=W(s),he=W(e),N=a(he,G==null?void 0:G.arr).keyList.indexOf(R);if(N<0||N>=he.length)throw Error("splitAtom: index out of bounds for write");let j=C_(A)?A(he[N]):A;Object.is(he[N],j)||U(e,[...he.slice(0,N),j,...he.slice(N+1)])}):Be(H)}),h=v&&v.keyList.length===_.length&&v.keyList.every((C,E)=>C===_[E])?v:{arr:f,atomList:w,keyList:_},i.set(f,h),h},s=Be(f=>{let p=f(s);return a(f(e),p==null?void 0:p.arr)});s.init=void 0;let c=uh(e)?Be(f=>f(s).atomList,(f,p,h)=>{switch(h.type){case"remove":{let v=f(c).indexOf(h.atom);if(v>=0){let w=f(e);p(e,[...w.slice(0,v),...w.slice(v+1)])}break}case"insert":{let v=h.before?f(c).indexOf(h.before):f(c).length;if(v>=0){let w=f(e);p(e,[...w.slice(0,v),h.value,...w.slice(v)])}break}case"move":{let v=f(c).indexOf(h.atom),w=h.before?f(c).indexOf(h.before):f(c).length;if(v>=0&&w>=0){let _=f(e);v<w?p(e,[..._.slice(0,v),..._.slice(v+1,w),_[v],..._.slice(w)]):p(e,[..._.slice(0,w),_[v],..._.slice(w,v),..._.slice(v+1)])}break}}}):Be(f=>f(s).atomList);return c},e,n||k_)}var dh=e=>typeof(e==null?void 0:e.then)=="function";function fh(e=()=>{try{return window.localStorage}catch{return}},n){var p;let i,a,s={getItem:(h,v)=>{var C;let w=E=>{if(E||(E=""),i!==E){try{a=JSON.parse(E,n==null?void 0:n.reviver)}catch{return v}i=E}return a},_=((C=e())==null?void 0:C.getItem(h))??null;return dh(_)?_.then(w):w(_)},setItem:(h,v)=>{var w;return(w=e())==null?void 0:w.setItem(h,JSON.stringify(v,n==null?void 0:n.replacer))},removeItem:h=>{var v;return(v=e())==null?void 0:v.removeItem(h)}},c=h=>(v,w,_)=>h(v,C=>{let E;try{E=JSON.parse(C||"")}catch{E=_}w(E)}),f;try{f=(p=e())==null?void 0:p.subscribe}catch{}return!f&&typeof window<"u"&&typeof window.addEventListener=="function"&&window.Storage&&(f=(h,v)=>{if(!(e()instanceof window.Storage))return()=>{};let w=_=>{_.storageArea===e()&&_.key===h&&v(_.newValue)};return window.addEventListener("storage",w),()=>{window.removeEventListener("storage",w)}}),f&&(s.subscribe=c(f)),s}var E_=fh();Wu=function(e,n,i=E_,a){let s=Be(a!=null&&a.getOnInit?i.getItem(e,n):n);return s.onMount=c=>{c(i.getItem(e,n));let f;return i.subscribe&&(f=i.subscribe(e,c,n)),f},Be(c=>c(s),(c,f,p)=>{let h=typeof p=="function"?p(c(s)):p;return h===y_?(f(s,n),i.removeItem(e)):dh(h)?h.then(v=>(f(s,v),i.setItem(e,v))):(f(s,h),i.setItem(e,h))})},zn=function(e){let n,i,a;return typeof e=="object"?(n=e.hashFunction,i=e.expiring,a=e.tags):n=e,(s,c,f)=>{if(f.value!=null)f.value=ph(f.value,n,i,a);else if(f.get!=null)f.get=ph(f.get,n,i,a);else throw"Only put a Memoize() decorator on a method or get accessor."}};var ad=new Map;function ph(e,n,i=0,a){let s=Symbol("__memoized_map__");return function(...c){let f;this.hasOwnProperty(s)||Object.defineProperty(this,s,{configurable:!1,enumerable:!1,writable:!1,value:new Map});let p=this[s];if(Array.isArray(a))for(let h of a)ad.has(h)?ad.get(h).push(p):ad.set(h,[p]);if(n||c.length>0||i>0){let h;h=n===!0?c.map(_=>_.toString()).join("!"):n?n.apply(this,c):c[0];let v=`${h}__timestamp`,w=!1;if(i>0)if(!p.has(v))w=!0;else{let _=p.get(v);w=Date.now()-_>i}p.has(h)&&!w?f=p.get(h):(f=e.apply(this,c),p.set(h,f),i>0&&p.set(v,Date.now()))}else{let h=this;p.has(h)?f=p.get(h):(f=e.apply(this,c),p.set(h,f))}return f}}ss=Be(Pl()),ow=Be(void 0);var T_=class{constructor(){Te(this,"store",new Map)}get length(){return this.store.size}clear(){this.store.clear()}getItem(e){return this.store.get(e)||null}key(e){return[...this.store.keys()][e]||null}removeItem(e){this.store.delete(e)}setItem(e,n){this.store.set(e,n)}};function R_(){let{hasLocalStorage:e,hasSessionStorage:n}=iR();return e?window.localStorage:n?window.sessionStorage:new T_}ds=R_();let Ni;rw=class{constructor(e,n=ds){this.defaultValue=e,this.storage=n}get(e){try{let n=this.storage.getItem(e);return n?JSON.parse(n):this.defaultValue}catch{return this.defaultValue}}set(e,n){this.storage.setItem(e,JSON.stringify(n))}remove(e){this.storage.removeItem(e)}},xu=class{constructor(e,n,i=ds){this.schema=e,this.getDefaultValue=n,this.storage=i}get(e){try{let n=this.storage.getItem(e);if(n==null)return this.getDefaultValue();let i=this.schema.safeParse(JSON.parse(n));return i.success?i.data:(Pe.warn("Error parsing zod local storage",i.error),this.getDefaultValue())}catch(n){return Pe.warn("Error getting zod local storage",n),this.getDefaultValue()}}set(e,n){this.storage.setItem(e,JSON.stringify(n))}remove(e){this.storage.removeItem(e)}},Zm=class extends xu{constructor(e,n,i){let a=ct.get(ss);super(n,i),this.filename=a;try{this.unsubscribeFromFilename=ct.sub(ss,()=>{let s=ct.get(ss);this.handleFilenameChange(e,s)})}catch{this.unsubscribeFromFilename=null}}get(e){return super.get(this.createScopedKey(e,this.filename))}set(e,n){super.set(this.createScopedKey(e,this.filename),n)}remove(e){super.remove(this.createScopedKey(e,this.filename))}createScopedKey(e,n){return n?`${e}:${n}`:e}handleFilenameChange(e,n){if(n&&n!==this.filename){let i=this.get(e);this.remove(e),this.filename=n,this.set(e,i)}}dispose(){this.unsubscribeFromFilename&&(this.unsubscribeFromFilename=(this.unsubscribeFromFilename(),null))}},Ni="marimo:notebook-col-sizes";function D_(){return{widths:[]}}var fa=new Zm(Ni,Kb({widths:vT(yT([gT(),hT("contentWidth")]).default("contentWidth"))}),D_);bw={getColumnWidth:e=>fa.get(Ni).widths[e]??"contentWidth",saveColumnWidth:(e,n)=>{let i=fa.get(Ni).widths;if(i[e])i[e]=n;else{for(;i.length<=e;)i.push("contentWidth");i[e]=n}fa.set(Ni,{widths:i})},clearStorage:()=>{fa.remove(Ni)}};function O_(e,n){let i=fa.get(Ni).widths,a=El(i,e,n);fa.set(Ni,{widths:a})}var mh,hh,gh,Tr,yh,vh,bh,wh,Fn,_h,xh,kh,Ch,Sh,Eh,en;function Kn(e,n,i,a,s){var c={};return Object.keys(a).forEach(function(f){c[f]=a[f]}),c.enumerable=!!c.enumerable,c.configurable=!!c.configurable,("value"in c||c.initializer)&&(c.writable=!0),c=i.slice().reverse().reduce(function(f,p){return p(e,n,f)||f},c),s&&c.initializer!==void 0&&(c.value=c.initializer?c.initializer.call(s):void 0,c.initializer=void 0),c.initializer===void 0?(Object.defineProperty(e,n,c),null):c}let vo=(mh=zn(),hh=zn(),gh=zn(),Tr=class{constructor(e,n,i){this.value=e,this.isCollapsed=n,this.children=i}geDescendantCount(){let e=0,n=[...this.children];for(;n.length>0;){let i=n.pop();e++;for(let a=i.children.length-1;a>=0;a--)n.push(i.children[a])}return e}getDescendants(){let e=[],n=[...this.children];for(;n.length>0;){let i=n.pop();e.push(i.value);for(let a=i.children.length-1;a>=0;a--)n.push(i.children[a])}return e}get inOrderIds(){let e=[],n=i=>{e.push(i.value);for(let a of i.children)n(a)};for(let i of this.children)n(i);return e}toString(){return this.isCollapsed?`${this.value} (collapsed)`:String(this.value)}equals(e){return this.value===e.value}},Kn(Tr.prototype,"geDescendantCount",[mh],Object.getOwnPropertyDescriptor(Tr.prototype,"geDescendantCount"),Tr.prototype),Kn(Tr.prototype,"getDescendants",[hh],Object.getOwnPropertyDescriptor(Tr.prototype,"getDescendants"),Tr.prototype),Kn(Tr.prototype,"inOrderIds",[gh],Object.getOwnPropertyDescriptor(Tr.prototype,"inOrderIds"),Tr.prototype),Tr);var P_=0;let pa;pa=(yh=zn(),vh=zn(),bh=zn(),wh=zn(),Fn=class da{constructor(n,i){this.nodes=n,this.id=i}static from(n){let i=`tree_${P_++}`;return new da(n.map(a=>new vo(a,!1,[])),i)}static fromWithPreviousShape(n,i){var c;if(!i)return da.from(n);let a=i.id,s=new da(n.map(f=>new vo(f,!1,[])),a);for(let f of n)if(i.isCollapsed(f)){let p=((c=i._nodeMap.get(f))==null?void 0:c.children)??[];for(let h=p.length-1;h>=0;h--){let v=p[h];if(s._nodeMap.has(v.value)){s=s.collapse(f,v.value);break}}}return s}withNodes(n){return new da(n,this.id)}get topLevelIds(){return this.nodes.map(n=>n.value)}get inOrderIds(){return this.nodes.flatMap(n=>[n.value,...n.inOrderIds])}get idSet(){return new Set(this.inOrderIds)}get length(){return this.nodes.length}get _nodeMap(){let n=new Map;for(let i of this.nodes)n.set(i.value,i);return n}getDescendants(n){let i=this._nodeMap.get(n);return i?i.getDescendants():(Pe.warn(`Node ${n} not found in tree. Valid ids: ${this.topLevelIds}`),[])}isCollapsed(n){let i=this._nodeMap.get(n);return i?i.isCollapsed:(Pe.warn(`Node ${n} not found in tree. Valid ids: ${this.topLevelIds}`),!1)}indexOfOrThrow(n){let i=this.nodes.findIndex(a=>a.value===n);if(i===-1)throw Error(`Node ${n} not found in tree. Valid ids: ${this.topLevelIds}`);return i}slice(n,i){return this.nodes.slice(n,i).map(a=>a.value)}moveToFront(n){let i=this.indexOfOrThrow(n);return this.withNodes(El(this.nodes,i,0))}moveToBack(n){let i=this.indexOfOrThrow(n);return this.withNodes(El(this.nodes,i,this.nodes.length-1))}collapse(n,i){let a=this.nodes.findIndex(h=>h.value===n);if(a===-1)throw Error(`Node ${n} not found in tree. Valid ids: ${this.topLevelIds}`);let s=i===void 0?this.nodes.length:this.nodes.findIndex(h=>h.value===i);if(s===-1)throw Error(`Node ${i} not found in tree`);if(s<a)throw Error(`Node ${i} is before node ${n}`);let c=[...this.nodes],f=c[a];if(f.isCollapsed)throw Error(`Node ${n} is already collapsed`);let p=c.splice(a+1,s-a);return c[a]=new vo(f.value,!0,p),this.withNodes(c)}collapseAll(n){let i=[...this.nodes];if(n.length===0)throw Error("No collapse ranges provided");if(n.length!==i.length)throw Error(`Collapse ranges length ${n.length} does not match tree length ${i.length}`);let a=i.length-1;for(;a>=0;){let s=i[a],c=n[a];if(!s.isCollapsed&&c){let{id:f,until:p}=c;if(f!==s.value)throw Error(`Node ${s.value} does not match collapse range id ${f}`);let h=p===void 0?i.length:i.findIndex(w=>w.value===p);if(h===-1)throw Error(`Node ${p} not found in tree`);if(h<a)throw Error(`Node ${p} is before node ${f}`);let v=i.splice(a+1,h-a);i[a]=new vo(s.value,!0,v),a--}else a--}return this.withNodes(i)}expand(n){let i=this.nodes.findIndex(c=>c.value===n);if(i===-1)throw Error(`Node ${n} not found in tree. Valid ids: ${this.topLevelIds}`);let a=[...this.nodes],s=a[i];if(!s.isCollapsed)throw Error(`Node ${n} is already expanded`);return a[i]=new vo(s.value,!1,[]),a=d2(a,i+1,s.children),this.withNodes(a)}expandAll(){let n=[...this.nodes],i=0;for(;i<n.length;){let a=n[i];a.isCollapsed&&(n[i]=new vo(a.value,!1,[]),n=d2(n,i+1,a.children)),i++}return this.withNodes(n)}move(n,i){return this.withNodes(El(this.nodes,n,i))}at(n){var i;return(i=this.nodes.at(n))==null?void 0:i.value}atOrThrow(n){let i=this.nodes.at(n);if(i===void 0)throw Error(`Node at index ${n} not found in tree`);return i.value}first(){return this.atOrThrow(0)}last(){return this.atOrThrow(this.nodes.length-1)}after(n){let i=this.indexOfOrThrow(n);if(i!==this.nodes.length-1)return this.at(i+1)}before(n){let i=this.indexOfOrThrow(n);if(i!==0)return this.at(i-1)}insert(n,i){return this.withNodes(u2(this.nodes,i,new vo(n,!1,[])))}insertAtEnd(n){return this.insert(n,this.nodes.length)}insertAtStart(n){return this.insert(n,0)}deleteAtIndex(n){let i=this.atOrThrow(n),a=this.withNodes(this.nodes);try{a=a.expand(i)}catch{}return this.withNodes(rR(a.nodes,n))}delete(n){let i=this.indexOfOrThrow(n);return this.deleteAtIndex(i)}getCount(n){var i;return((i=this._nodeMap.get(n))==null?void 0:i.geDescendantCount())??0}findAndExpandDeep(n){let i=this.find(n);if(i.length===0)return this;let a=this.withNodes(this.nodes);for(let s of i)try{a=a.expand(s)}catch{}return a}find(n){function i(a,s){for(let c of a){if(c.value===n)return[...s,n];let f=i(c.children,[...s,c.value]);if(f.length>0)return f}return[]}return i(this.nodes,[])}split(n){let i=this.nodes.findIndex(c=>c.value===n);if(i===-1)throw Error(`Node ${n} not found in tree`);let a=this.nodes.slice(0,i),s=this.nodes.slice(i);return a.length===0?[da.from([]),this.withNodes(s)]:[this.withNodes(a),da.from([]).withNodes(s)]}equals(n){return this.nodes.length===n.nodes.length&&this.nodes.every((i,a)=>i.value===n.nodes[a].value)}toString(){let n=0,i="",a=s=>{for(let c of s)i+=`${" ".repeat(n*2)}${c.toString()}
13
+ `,n+=1,a(c.children),--n};return a(this.nodes),i}},Kn(Fn.prototype,"topLevelIds",[yh],Object.getOwnPropertyDescriptor(Fn.prototype,"topLevelIds"),Fn.prototype),Kn(Fn.prototype,"inOrderIds",[vh],Object.getOwnPropertyDescriptor(Fn.prototype,"inOrderIds"),Fn.prototype),Kn(Fn.prototype,"idSet",[bh],Object.getOwnPropertyDescriptor(Fn.prototype,"idSet"),Fn.prototype),Kn(Fn.prototype,"_nodeMap",[wh],Object.getOwnPropertyDescriptor(Fn.prototype,"_nodeMap"),Fn.prototype),Fn),zl=(_h=zn(),xh=zn(),kh=zn(),Ch=zn(),Sh=zn(),Eh=zn(),en=class Mn{constructor(n){this.columns=n,n.length===0&&(this.columns=[pa.from([])])}static from(n){return new Mn(n.map(i=>pa.from(i)))}static fromWithPreviousShape(n,i){if(!i)return Mn.from([n]);let a=i.getColumns(),s=Array.from({length:a.length},()=>[]),c=0;for(let f of n){let p=a.findIndex(h=>h.idSet.has(f));p===-1?s[c].push(f):(c=p,s[p].push(f))}return new Mn(s.map((f,p)=>pa.fromWithPreviousShape(f,a[p])))}isEmpty(){return this.columns.length===0?!0:this.columns.every(n=>n.nodes.length===0)}static fromIdsAndColumns(n){let i=Math.max(1,...n.map(([,c])=>(c??0)+1)),a=Array.from({length:i},()=>[]),s=0;for(let[c,f]of n)f==null||f<0?a[s].push(c):(a[f].push(c),s=f);return Mn.from(a)}get topLevelIds(){return this.columns.map(n=>n.topLevelIds)}get iterateTopLevelIds(){let n=this.columns;function*i(){for(let a of n)for(let s of a.topLevelIds)yield s}return i()}get inOrderIds(){return this.columns.flatMap(n=>n.inOrderIds)}get colLength(){return this.columns.length}get idLength(){return this.columns.reduce((n,i)=>n+i.nodes.length,0)}get _columnMap(){return new Map(this.columns.map(n=>[n.id,n]))}at(n){return this.columns[n]}get(n){return this._columnMap.get(n)}atOrThrow(n){let i=this.columns[n];if(!i)throw Error(`Column ${n} not found`);return i}hasOnlyOneColumn(){return this.columns.length===1}getColumns(){return this.columns}hasOnlyOneId(){return this.idLength===1}getColumnIds(){return this.columns.map(n=>n.id)}indexOf(n){return this.columns.indexOf(n)}addColumn(n,i=[]){return new Mn(this.columns.flatMap(a=>a.id===n?[a,pa.from(i)]:[a]))}insertBreakpoint(n){let i=this.findWithId(n),[a,s]=i.split(n);return new Mn(this.columns.flatMap(c=>c===i?[a,s].filter(Boolean):[c]))}delete(n){if(this.columns.length<=1)return this;let i=this.indexOfOrThrow(n),a=i===0?1:i-1,s=[...this.columns],c=s[i];return s[a]=c.withNodes([...s[a].nodes,...c.nodes]),s.splice(i,1),new Mn(s)}mergeAllColumns(){if(this.columns.length<=1)return this;let n=this.columns.flatMap(a=>a.nodes),i=this.columns[0];return new Mn([i.withNodes(n)])}moveWithinColumn(n,i,a){return this.transform(n,s=>s.move(i,a))}moveAcrossColumns(n,i,a,s){let c=this.indexOfOrThrow(n),f=this.indexOfOrThrow(a),p=[...this.columns],h=p[c],v=h.nodes.findIndex(C=>C.value===i);if(v===-1)throw Error(`Node ${i} not found in column ${n}`);let w=h.nodes[v];p[c]=h.withNodes(h.nodes.filter((C,E)=>E!==v));let _=p[f];if(s){let C=_.indexOfOrThrow(s);p[f]=_.withNodes(u2(_.nodes,C,w))}else p[f]=_.withNodes([w,..._.nodes]);return new Mn(p)}indexOfOrThrow(n){let i=this.columns.findIndex(a=>a.id===n);if(i===-1)throw Error(`Column ${n} not found. Possible values: ${this.getColumnIds().join(", ")}`);return i}moveColumn(n,i){if(n===i)return this;let a=this.indexOfOrThrow(n),s=i==="_left_"?a-1:i==="_right_"?a+1:this.indexOfOrThrow(i);return O_(a,s),new Mn(El([...this.columns],a,s))}moveToNewColumn(n){let i=this.findWithId(n),a=this.columns.map(c=>c.id===i.id?c.delete(n):c),s=pa.from([n]);return new Mn([...a,s])}findWithId(n){let i=this.columns.find(a=>a.inOrderIds.includes(n));if(!i)throw Pe.log(`Possible values: ${this.columns.map(a=>a.inOrderIds).join(", ")}`),Error(`Cell ${n} not found in any column`);return i}transformWithCellId(n,i){let a=!1,s=this.columns.map(c=>{if(c.inOrderIds.includes(n)){let f=i(c);return c!==f&&(a=!0),f}return c});return a?new Mn(s):this}setupCellExists(){return this.columns.some(n=>n.topLevelIds.includes(dr))}insertId(n,i,a){return this.transform(i,s=>s.insert(n,a))}deleteById(n){return this.transformWithCellId(n,i=>i.delete(n))}compact(){return this.columns.length===1||!this.columns.some(n=>n.nodes.length===0)?this:new Mn(this.columns.filter(n=>n.nodes.length>0))}transform(n,i){let a=this._columnMap.get(n);if(!a)return Pe.warn(`Column ${n} not found`),this;let s=i(a);return a===s?this:new Mn(this.columns.map(c=>c.id===n?s:c))}transformAll(n){let i=!1,a=this.columns.map(s=>{let c=n(s);return s.equals(c)||(i=!0),c});return i?new Mn(a):this}},Kn(en.prototype,"isEmpty",[_h],Object.getOwnPropertyDescriptor(en.prototype,"isEmpty"),en.prototype),Kn(en.prototype,"topLevelIds",[xh],Object.getOwnPropertyDescriptor(en.prototype,"topLevelIds"),en.prototype),Kn(en.prototype,"inOrderIds",[kh],Object.getOwnPropertyDescriptor(en.prototype,"inOrderIds"),en.prototype),Kn(en.prototype,"idLength",[Ch],Object.getOwnPropertyDescriptor(en.prototype,"idLength"),en.prototype),Kn(en.prototype,"_columnMap",[Sh],Object.getOwnPropertyDescriptor(en.prototype,"_columnMap"),en.prototype),Kn(en.prototype,"getColumnIds",[Eh],Object.getOwnPropertyDescriptor(en.prototype,"getColumnIds"),en.prototype),en);let sd,ld,cd,Th,ud,Rh,Dh,Oh,Ph,dd,fd,Nh,pd,md;sd=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var n;(function(a){a.Root="root",a.Text="text",a.Directive="directive",a.Comment="comment",a.Script="script",a.Style="style",a.Tag="tag",a.CDATA="cdata",a.Doctype="doctype"})(n=e.ElementType||(e.ElementType={}));function i(a){return a.type===n.Tag||a.type===n.Script||a.type===n.Style}e.isTag=i,e.Root=n.Root,e.Text=n.Text,e.Directive=n.Directive,e.Comment=n.Comment,e.Script=n.Script,e.Style=n.Style,e.Tag=n.Tag,e.CDATA=n.CDATA,e.Doctype=n.Doctype})),ld=ke((e=>{var n=e&&e.__extends||(function(){var N=function(j,V){return N=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,pe){de.__proto__=pe}||function(de,pe){for(var xe in pe)Object.prototype.hasOwnProperty.call(pe,xe)&&(de[xe]=pe[xe])},N(j,V)};return function(j,V){if(typeof V!="function"&&V!==null)throw TypeError("Class extends value "+String(V)+" is not a constructor or null");N(j,V);function de(){this.constructor=j}j.prototype=V===null?Object.create(V):(de.prototype=V.prototype,new de)}})(),i=e&&e.__assign||function(){return i=Object.assign||function(N){for(var j,V=1,de=arguments.length;V<de;V++)for(var pe in j=arguments[V],j)Object.prototype.hasOwnProperty.call(j,pe)&&(N[pe]=j[pe]);return N},i.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.cloneNode=e.hasChildren=e.isDocument=e.isDirective=e.isComment=e.isText=e.isCDATA=e.isTag=e.Element=e.Document=e.CDATA=e.NodeWithChildren=e.ProcessingInstruction=e.Comment=e.Text=e.DataNode=e.Node=void 0;var a=sd(),s=(function(){function N(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(N.prototype,"parentNode",{get:function(){return this.parent},set:function(j){this.parent=j},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"previousSibling",{get:function(){return this.prev},set:function(j){this.prev=j},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"nextSibling",{get:function(){return this.next},set:function(j){this.next=j},enumerable:!1,configurable:!0}),N.prototype.cloneNode=function(j){return j===void 0&&(j=!1),G(this,j)},N})();e.Node=s;var c=(function(N){n(j,N);function j(V){var de=N.call(this)||this;return de.data=V,de}return Object.defineProperty(j.prototype,"nodeValue",{get:function(){return this.data},set:function(V){this.data=V},enumerable:!1,configurable:!0}),j})(s);e.DataNode=c;var f=(function(N){n(j,N);function j(){var V=N!==null&&N.apply(this,arguments)||this;return V.type=a.ElementType.Text,V}return Object.defineProperty(j.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),j})(c);e.Text=f;var p=(function(N){n(j,N);function j(){var V=N!==null&&N.apply(this,arguments)||this;return V.type=a.ElementType.Comment,V}return Object.defineProperty(j.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),j})(c);e.Comment=p;var h=(function(N){n(j,N);function j(V,de){var pe=N.call(this,de)||this;return pe.name=V,pe.type=a.ElementType.Directive,pe}return Object.defineProperty(j.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),j})(c);e.ProcessingInstruction=h;var v=(function(N){n(j,N);function j(V){var de=N.call(this)||this;return de.children=V,de}return Object.defineProperty(j.prototype,"firstChild",{get:function(){return this.children[0]??null},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"childNodes",{get:function(){return this.children},set:function(V){this.children=V},enumerable:!1,configurable:!0}),j})(s);e.NodeWithChildren=v;var w=(function(N){n(j,N);function j(){var V=N!==null&&N.apply(this,arguments)||this;return V.type=a.ElementType.CDATA,V}return Object.defineProperty(j.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),j})(v);e.CDATA=w;var _=(function(N){n(j,N);function j(){var V=N!==null&&N.apply(this,arguments)||this;return V.type=a.ElementType.Root,V}return Object.defineProperty(j.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),j})(v);e.Document=_;var C=(function(N){n(j,N);function j(V,de,pe,xe){pe===void 0&&(pe=[]),xe===void 0&&(xe=V==="script"?a.ElementType.Script:V==="style"?a.ElementType.Style:a.ElementType.Tag);var Z=N.call(this,pe)||this;return Z.name=V,Z.attribs=de,Z.type=xe,Z}return Object.defineProperty(j.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"tagName",{get:function(){return this.name},set:function(V){this.name=V},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"attributes",{get:function(){var V=this;return Object.keys(this.attribs).map(function(de){var pe,xe;return{name:de,value:V.attribs[de],namespace:(pe=V["x-attribsNamespace"])==null?void 0:pe[de],prefix:(xe=V["x-attribsPrefix"])==null?void 0:xe[de]}})},enumerable:!1,configurable:!0}),j})(v);e.Element=C;function E(N){return(0,a.isTag)(N)}e.isTag=E;function R(N){return N.type===a.ElementType.CDATA}e.isCDATA=R;function L(N){return N.type===a.ElementType.Text}e.isText=L;function H(N){return N.type===a.ElementType.Comment}e.isComment=H;function W(N){return N.type===a.ElementType.Directive}e.isDirective=W;function U(N){return N.type===a.ElementType.Root}e.isDocument=U;function A(N){return Object.prototype.hasOwnProperty.call(N,"children")}e.hasChildren=A;function G(N,j){j===void 0&&(j=!1);var V;if(L(N))V=new f(N.data);else if(H(N))V=new p(N.data);else if(E(N)){var de=j?he(N.children):[],pe=new C(N.name,i({},N.attribs),de);de.forEach(function(Ee){return Ee.parent=pe}),N.namespace!=null&&(pe.namespace=N.namespace),N["x-attribsNamespace"]&&(pe["x-attribsNamespace"]=i({},N["x-attribsNamespace"])),N["x-attribsPrefix"]&&(pe["x-attribsPrefix"]=i({},N["x-attribsPrefix"])),V=pe}else if(R(N)){var de=j?he(N.children):[],xe=new w(de);de.forEach(function(re){return re.parent=xe}),V=xe}else if(U(N)){var de=j?he(N.children):[],Z=new _(de);de.forEach(function(re){return re.parent=Z}),N["x-mode"]&&(Z["x-mode"]=N["x-mode"]),V=Z}else if(W(N)){var be=new h(N.name,N.data);N["x-name"]!=null&&(be["x-name"]=N["x-name"],be["x-publicId"]=N["x-publicId"],be["x-systemId"]=N["x-systemId"]),V=be}else throw Error(`Not implemented yet: ${N.type}`);return V.startIndex=N.startIndex,V.endIndex=N.endIndex,N.sourceCodeLocation!=null&&(V.sourceCodeLocation=N.sourceCodeLocation),V}e.cloneNode=G;function he(N){for(var j=N.map(function(de){return G(de,!0)}),V=1;V<j.length;V++)j[V].prev=j[V-1],j[V-1].next=j[V];return j}})),cd=ke((e=>{var n=e&&e.__createBinding||(Object.create?(function(p,h,v,w){w===void 0&&(w=v);var _=Object.getOwnPropertyDescriptor(h,v);(!_||("get"in _?!h.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return h[v]}}),Object.defineProperty(p,w,_)}):(function(p,h,v,w){w===void 0&&(w=v),p[w]=h[v]})),i=e&&e.__exportStar||function(p,h){for(var v in p)v!=="default"&&!Object.prototype.hasOwnProperty.call(h,v)&&n(h,p,v)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var a=sd(),s=ld();i(ld(),e);var c={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},f=(function(){function p(h,v,w){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof v=="function"&&(w=v,v=c),typeof h=="object"&&(v=h,h=void 0),this.callback=h??null,this.options=v??c,this.elementCB=w??null}return p.prototype.onparserinit=function(h){this.parser=h},p.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},p.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},p.prototype.onerror=function(h){this.handleCallback(h)},p.prototype.onclosetag=function(){this.lastNode=null;var h=this.tagStack.pop();this.options.withEndIndices&&(h.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(h)},p.prototype.onopentag=function(h,v){var w=this.options.xmlMode?a.ElementType.Tag:void 0,_=new s.Element(h,v,void 0,w);this.addNode(_),this.tagStack.push(_)},p.prototype.ontext=function(h){var v=this.lastNode;if(v&&v.type===a.ElementType.Text)v.data+=h,this.options.withEndIndices&&(v.endIndex=this.parser.endIndex);else{var w=new s.Text(h);this.addNode(w),this.lastNode=w}},p.prototype.oncomment=function(h){if(this.lastNode&&this.lastNode.type===a.ElementType.Comment){this.lastNode.data+=h;return}var v=new s.Comment(h);this.addNode(v),this.lastNode=v},p.prototype.oncommentend=function(){this.lastNode=null},p.prototype.oncdatastart=function(){var h=new s.Text(""),v=new s.CDATA([h]);this.addNode(v),h.parent=v,this.lastNode=h},p.prototype.oncdataend=function(){this.lastNode=null},p.prototype.onprocessinginstruction=function(h,v){var w=new s.ProcessingInstruction(h,v);this.addNode(w)},p.prototype.handleCallback=function(h){if(typeof this.callback=="function")this.callback(h,this.dom);else if(h)throw h},p.prototype.addNode=function(h){var v=this.tagStack[this.tagStack.length-1],w=v.children[v.children.length-1];this.options.withStartIndices&&(h.startIndex=this.parser.startIndex),this.options.withEndIndices&&(h.endIndex=this.parser.endIndex),v.children.push(h),w&&(h.prev=w,w.next=h),h.parent=v,this.lastNode=null},p})();e.DomHandler=f,e.default=f})),Th=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=e.CARRIAGE_RETURN_PLACEHOLDER=e.CARRIAGE_RETURN_REGEX=e.CARRIAGE_RETURN=e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES=void 0,e.CASE_SENSITIVE_TAG_NAMES="animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.linearGradient.radialGradient.textPath".split("."),e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES.reduce(function(n,i){return n[i.toLowerCase()]=i,n},{}),e.CARRIAGE_RETURN="\r",e.CARRIAGE_RETURN_REGEX=new RegExp(e.CARRIAGE_RETURN,"g"),e.CARRIAGE_RETURN_PLACEHOLDER=`__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_${Date.now()}__`,e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(e.CARRIAGE_RETURN_PLACEHOLDER,"g")})),ud=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatAttributes=s,e.escapeSpecialCharacters=f,e.revertEscapedCharacters=p,e.formatDOM=h;var n=cd(),i=Th();function a(v){return i.CASE_SENSITIVE_TAG_NAMES_MAP[v]}function s(v){for(var w={},_=0,C=v.length;_<C;_++){var E=v[_];w[E.name]=E.value}return w}function c(v){return v=v.toLowerCase(),a(v)||v}function f(v){return v.replace(i.CARRIAGE_RETURN_REGEX,i.CARRIAGE_RETURN_PLACEHOLDER)}function p(v){return v.replace(i.CARRIAGE_RETURN_PLACEHOLDER_REGEX,i.CARRIAGE_RETURN)}function h(v,w,_){w===void 0&&(w=null);for(var C=[],E,R=0,L=v.length;R<L;R++){var H=v[R];switch(H.nodeType){case 1:var W=c(H.nodeName);E=new n.Element(W,s(H.attributes)),E.children=h(W==="template"?H.content.childNodes:H.childNodes,E);break;case 3:E=new n.Text(p(H.nodeValue));break;case 8:E=new n.Comment(H.nodeValue);break;default:continue}var U=C[R-1]||null;U&&(U.next=E),E.parent=w,E.prev=U,E.next=null,C.push(E)}return _&&(E=new n.ProcessingInstruction(_.substring(0,_.indexOf(" ")).toLowerCase(),_),E.next=C[0]||null,E.parent=w,C.unshift(E),C[1]&&(C[1].prev=C[0])),C}})),Rh=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=H;var n=ud(),i="html",a="head",s="body",c=/<([a-zA-Z]+[0-9]?)/,f=/<head[^]*>/i,p=/<body[^]*>/i,h=function(W,U){throw Error("This browser does not support `document.implementation.createHTMLDocument`")},v=function(W,U){throw Error("This browser does not support `DOMParser.prototype.parseFromString`")},w=typeof window=="object"&&window.DOMParser;if(typeof w=="function"){var _=new w,C="text/html";v=function(W,U){return U&&(W=`<${U}>${W}</${U}>`),_.parseFromString(W,C)},h=v}if(typeof document=="object"&&document.implementation){var E=document.implementation.createHTMLDocument();h=function(W,U){if(U){var A=E.documentElement.querySelector(U);return A&&(A.innerHTML=W),E}return E.documentElement.innerHTML=W,E}}var R=typeof document=="object"&&document.createElement("template"),L;R&&R.content&&(L=function(W){return R.innerHTML=W,R.content.childNodes});function H(W){var U,A;W=(0,n.escapeSpecialCharacters)(W);var G=W.match(c),he=G&&G[1]?G[1].toLowerCase():"";switch(he){case i:var N=v(W);if(!f.test(W)){var V=N.querySelector(a);(U=V==null?void 0:V.parentNode)==null||U.removeChild(V)}if(!p.test(W)){var V=N.querySelector(s);(A=V==null?void 0:V.parentNode)==null||A.removeChild(V)}return N.querySelectorAll(i);case a:case s:var j=h(W).querySelectorAll(he);return p.test(W)&&f.test(W)?j[0].parentNode.childNodes:j;default:if(L)return L(W);var V=h(W,s).querySelector(s);return V.childNodes}}})),Dh=ke((e=>{var n=e&&e.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var i=n(Rh()),a=ud(),s=/<(![a-zA-Z\s]+)>/;function c(f){if(typeof f!="string")throw TypeError("First argument must be a string");if(!f)return[];var p=f.match(s),h=p?p[1]:void 0;return(0,a.formatDOM)((0,i.default)(f),null,h)}})),Oh=ke((e=>{e.SAME=0,e.CAMELCASE=1,e.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}})),Ph=ke((e=>{var n=0,i=1,a=2,s=3,c=4,f=5,p=6;function h(A){return w.hasOwnProperty(A)?w[A]:null}function v(A,G,he,N,j,V,de){this.acceptsBooleans=G===a||G===s||G===c,this.attributeName=N,this.attributeNamespace=j,this.mustUseProperty=he,this.propertyName=A,this.type=G,this.sanitizeURL=V,this.removeEmptyString=de}var w={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(A=>{w[A]=new v(A,n,!1,A,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([A,G])=>{w[A]=new v(A,i,!1,G,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(A=>{w[A]=new v(A,a,!1,A.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(A=>{w[A]=new v(A,a,!1,A,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(A=>{w[A]=new v(A,s,!1,A.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(A=>{w[A]=new v(A,s,!0,A,null,!1,!1)}),["capture","download"].forEach(A=>{w[A]=new v(A,c,!1,A,null,!1,!1)}),["cols","rows","size","span"].forEach(A=>{w[A]=new v(A,p,!1,A,null,!1,!1)}),["rowSpan","start"].forEach(A=>{w[A]=new v(A,f,!1,A.toLowerCase(),null,!1,!1)});var _=/[\-\:]([a-z])/g,C=A=>A[1].toUpperCase();"accent-height.alignment-baseline.arabic-form.baseline-shift.cap-height.clip-path.clip-rule.color-interpolation.color-interpolation-filters.color-profile.color-rendering.dominant-baseline.enable-background.fill-opacity.fill-rule.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.glyph-name.glyph-orientation-horizontal.glyph-orientation-vertical.horiz-adv-x.horiz-origin-x.image-rendering.letter-spacing.lighting-color.marker-end.marker-mid.marker-start.overline-position.overline-thickness.paint-order.panose-1.pointer-events.rendering-intent.shape-rendering.stop-color.stop-opacity.strikethrough-position.strikethrough-thickness.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.text-anchor.text-decoration.text-rendering.underline-position.underline-thickness.unicode-bidi.unicode-range.units-per-em.v-alphabetic.v-hanging.v-ideographic.v-mathematical.vector-effect.vert-adv-y.vert-origin-x.vert-origin-y.word-spacing.writing-mode.xmlns:xlink.x-height".split(".").forEach(A=>{let G=A.replace(_,C);w[G]=new v(G,i,!1,A,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(A=>{let G=A.replace(_,C);w[G]=new v(G,i,!1,A,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(A=>{let G=A.replace(_,C);w[G]=new v(G,i,!1,A,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(A=>{w[A]=new v(A,i,!1,A.toLowerCase(),null,!1,!1)});var E="xlinkHref";w[E]=new v("xlinkHref",i,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(A=>{w[A]=new v(A,i,!1,A.toLowerCase(),null,!0,!0)});var{CAMELCASE:R,SAME:L,possibleStandardNames:H}=Oh(),W=RegExp.prototype.test.bind(RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),U=Object.keys(H).reduce((A,G)=>{let he=H[G];return he===L?A[G]=G:he===R?A[G.toLowerCase()]=G:A[G]=he,A},{});e.BOOLEAN=s,e.BOOLEANISH_STRING=a,e.NUMERIC=f,e.OVERLOADED_BOOLEAN=c,e.POSITIVE_NUMERIC=p,e.RESERVED=n,e.STRING=i,e.getPropertyInfo=h,e.isCustomAttribute=W,e.possibleStandardNames=U})),dd=ke((e=>{var n=e&&e.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(e,"__esModule",{value:!0}),e.returnFirstArg=e.canTextBeChildOfNode=e.ELEMENTS_WITH_NO_TEXT_CHILDREN=e.PRESERVE_CUSTOM_ATTRIBUTES=void 0,e.isCustomComponent=c,e.setStyleProp=p;var i=du(),a=n(oR()),s=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function c(h,v){return h.includes("-")?!s.has(h):!!(v&&typeof v.is=="string")}var f={reactCompat:!0};function p(h,v){if(typeof h=="string"){if(!h.trim()){v.style={};return}try{v.style=(0,a.default)(h,f)}catch{v.style={}}}}e.PRESERVE_CUSTOM_ATTRIBUTES=Number(i.version.split(".")[0])>=16,e.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),e.canTextBeChildOfNode=function(h){return!e.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(h.name)},e.returnFirstArg=function(h){return h}})),fd=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=f;var n=Ph(),i=dd(),a=["checked","value"],s=["input","select","textarea"],c={reset:!0,submit:!0};function f(h,v){h===void 0&&(h={});var w={},_=!!(h.type&&c[h.type]);for(var C in h){var E=h[C];if((0,n.isCustomAttribute)(C)){w[C]=E;continue}var R=C.toLowerCase(),L=p(R);if(L){var H=(0,n.getPropertyInfo)(L);switch(a.includes(L)&&s.includes(v)&&!_&&(L=p("default"+R)),w[L]=E,H&&H.type){case n.BOOLEAN:w[L]=!0;break;case n.OVERLOADED_BOOLEAN:E===""&&(w[L]=!0);break}continue}i.PRESERVE_CUSTOM_ATTRIBUTES&&(w[C]=E)}return(0,i.setStyleProp)(h.style,w),w}function p(h){return n.possibleStandardNames[h]}})),Nh=ke((e=>{var n=e&&e.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=f;var i=du(),a=n(fd()),s=dd(),c={cloneElement:i.cloneElement,createElement:i.createElement,isValidElement:i.isValidElement};function f(h,v){v===void 0&&(v={});for(var w=[],_=typeof v.replace=="function",C=v.transform||s.returnFirstArg,E=v.library||c,R=E.cloneElement,L=E.createElement,H=E.isValidElement,W=h.length,U=0;U<W;U++){var A=h[U];if(_){var G=v.replace(A,U);if(H(G)){W>1&&(G=R(G,{key:G.key||U})),w.push(C(G,A,U));continue}}if(A.type==="text"){var he=!A.data.trim().length;if(he&&A.parent&&!(0,s.canTextBeChildOfNode)(A.parent)||v.trim&&he)continue;w.push(C(A.data,A,U));continue}var N=A,j={};p(N)?((0,s.setStyleProp)(N.attribs.style,N.attribs),j=N.attribs):N.attribs&&(j=(0,a.default)(N.attribs,N.name));var V=void 0;switch(A.type){case"script":case"style":A.children[0]&&(j.dangerouslySetInnerHTML={__html:A.children[0].data});break;case"tag":A.name==="textarea"&&A.children[0]?j.defaultValue=A.children[0].data:A.children&&A.children.length&&(V=f(A.children,v));break;default:continue}W>1&&(j.key=U),w.push(C(L(A.name,j,V),A,U))}return w.length===1?w[0]:w}function p(h){return s.PRESERVE_CUSTOM_ATTRIBUTES&&h.type==="tag"&&(0,s.isCustomComponent)(h.name,h.attribs)}})),pd=ke((e=>{var n=e&&e.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0,e.default=f;var i=n(Dh());e.htmlToDOM=i.default,e.attributesToProps=n(fd()).default;var a=n(Nh());e.domToReact=a.default;var s=cd();Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(e,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return s.Text}});var c={lowerCaseAttributeNames:!1};function f(p,h){if(typeof p!="string")throw TypeError("First argument must be a string");return p?(0,a.default)((0,i.default)(p,(h==null?void 0:h.htmlparser2)||c),h):[]}})),md=Kt(pd(),1),go=Kt(pd(),1),Lm=md.default.default||md.default;let Fl;Fl=(e,n)=>{let[i,...a]=n.split("."),s=(e.attribs.class||"").split(" ");return e.tagName===i&&a.every(c=>s.includes(c))},Iw=e=>{var n;return e&&Fl(e,"span.nb")&&e.firstChild instanceof go.Text&&((n=e.firstChild.nodeValue)==null?void 0:n.includes("__marimo__"))},zm=function(e){var n,i,a;if(e instanceof go.Element&&e.firstChild instanceof go.Text&&Fl(e,"span.nb")){let s=e.next;if(s&&s instanceof go.Text){let c=s.next;if(c&&c instanceof go.Element&&c.firstChild instanceof go.Text&&Fl(c,"span.m")){let f=Number.parseInt(c.firstChild.nodeValue||"0",10);if((n=e.firstChild.nodeValue)!=null&&n.includes("__marimo__")){let p=(i=/__marimo__cell_(\w+)_/.exec(e.firstChild.nodeValue))==null?void 0:i[1];if(p&&f)return{kind:"cell",cellId:p,lineNumber:f}}else{let p=(a=/"(.+?)"/.exec(e.firstChild.nodeValue))==null?void 0:a[1];if(p&&f)return{kind:"file",filePath:p,lineNumber:f}}}}}return null},Fm=function(e){let n=[];return Lm(e,{replace:i=>{let a=zm(i);if(a)return n.push(a),"dummy"}}),n};function Mh(e){return n=>{let i=!1;for(let a of n)a&&(i=e(a)||i);return i}}const N_=Mh(AT),M_=Mh(LT);Xu=function(e,n,i={}){let{preserveCursor:a=!0,effects:s,userEvent:c}=i,f=e.state.doc;if(f.toString()!==n)if(a&&e.hasFocus){let p=e.state.selection.main.head,h=f.lineAt(p),v=h.number,w=p-h.from,_=e.state.update({changes:{from:0,to:f.length,insert:n}}).state.doc,C;if(v<=_.lines){let E=_.line(v),R=E.length;C=E.from+Math.min(w,R)}else C=_.line(_.lines).to;e.dispatch({changes:{from:0,to:f.length,insert:n},selection:{anchor:C},effects:s,userEvent:c})}else e.dispatch({changes:{from:0,to:f.length,insert:n},effects:s,userEvent:c})},ca=function(){return Sl.define({combine:e=>e[0]})};const Lh=ca(),Ah=ca(),hd=ca(),gd=ca(),Ih=ca();Cw=function({completionConfig:e,hotkeys:n,placeholderType:i,lspConfig:a,diagnosticsConfig:s}){return[Lh.of(e),Ah.of(n),hd.of(i),Ih.of({...a,diagnostics:s})]},Zu=new pu;function L_(e){return Object.values(e.cellRuntime).some(n=>n.status==="running")}function A_(e){return Object.values(e.cellRuntime).filter(n=>n.status==="running"||n.status==="queued").length}function I_(e){return Wm(e).length>0}xw=function(e){return e.cellIds.inOrderIds.map(n=>e.cellData[n])};function j_({cellHandles:e}){let n={};for(let[i,a]of ei.entries(e))a.current&&(n[i]=a.current.editorView);return n}Bm=function(e){let{cellIds:n,cellData:i}=e,a=[];for(let s of n.inOrderIds)i[s].config.disabled&&a.push(s);return a},Am=function(e){let{cellIds:n,cellData:i}=e,a=[];for(let s of n.inOrderIds)i[s].config.disabled||a.push(s);return a};function q_(e){return e.history.length>0}zw=function(e,n){let i=e.cellIds.findWithId(n).getDescendants(n);return{stale:i.some(a=>{var s,c;return((s=e.cellRuntime[a])==null?void 0:s.staleInputs)||((c=e.cellData[a])==null?void 0:c.edited)}),errored:i.some(a=>{var s;return(s=e.cellRuntime[a])==null?void 0:s.errored}),runningOrQueued:i.some(a=>{var s,c;return((s=e.cellRuntime[a])==null?void 0:s.status)==="running"||((c=e.cellRuntime[a])==null?void 0:c.status)==="queued"})}},Wm=function(e){let{cellIds:n,cellData:i,cellRuntime:a}=e;return n.inOrderIds.filter(s=>Gm({executionTime:a[s].runElapsedTimeMs??i[s].lastExecutionTime,status:a[s].status,errored:a[s].errored,interrupted:a[s].interrupted,stopped:a[s].stopped})||i[s].edited||a[s].interrupted||a[s].staleInputs&&!(a[s].status==="disabled-transitively"||i[s].config.disabled))},Gm=function({executionTime:e,status:n,errored:i,interrupted:a,stopped:s}){return e===null&&n!=="queued"&&n!=="running"&&!(i||a||s)};let ma;Dt=Sl.define({combine:e=>e[0]}),ua=Sl.define({combine:e=>e[0]}),ma=na.define(),Yu=async function(e){let{sendFormat:n}=Ri(),i=ei.mapValues(e,s=>ri(s)),a=await n({codes:i,lineLength:Zp().formatting.line_length});for(let[s,c]of ei.entries(a.codes)){let f=s,p=i[f],h=e[f];h&&c!==p&&(h.state.facet(Dt).updateCellCode({cellId:f,code:c,formattingChange:!0}),us(h,c))}},Ew=function(){return Yu(j_(Ju()))};async function z_(e){let{formatDialect:n,duckdb:i}=await ue(async()=>{let{formatDialect:v,duckdb:w}=await import("./esm-C2Rj-Fx5.js").then(async _=>(await _.__tla,_));return{formatDialect:v,duckdb:w}},__vite__mapDeps([0,1]),import.meta.url),a=e.state.field(Er),s=qT(e.state);if(a.type!=="sql"){Pe.error("Language adapter is not SQL");return}let c=n(e.state.doc.toString(),{dialect:i,tabWidth:s,useTabs:!1}),f=a.transformIn(c)[0],p=e.state.facet(Dt),h=e.state.facet(gd);p.updateCellCode({cellId:h,code:f,formattingChange:!0}),Xu(e,c,{effects:[ma.of(!0)]})}var F_=Kt(Su(),1),B=Kt(PT(),1);function B_(e,n){let i=document.createElement("div"),a;return{dom:i,mount(){a=(0,F_.createRoot)(i),a.render((0,B.jsx)($b,{store:ct,children:(0,B.jsx)(n,{view:e})}))},update(){a==null||a.render((0,B.jsx)($b,{store:ct,children:(0,B.jsx)(n,{view:e})}))},destroy(){a==null||a.unmount()}}}function ge(e){return new a2(o2.define(e))}function Mi(e){return ue(()=>import("./dist-DOLcWI7m.js").then(async n=>(await n.__tla,n)),__vite__mapDeps([2,3,4,5]),import.meta.url).then(n=>n.sql({dialect:n[e]}))}var H_=[ce.of({name:"C",extensions:["c","h","ino"],load(){return ue(()=>import("./dist-DFOg0cu_.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([6,7,4]),import.meta.url).then(e=>e.cpp())}}),ce.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return ue(()=>import("./dist-DFOg0cu_.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([6,7,4]),import.meta.url).then(e=>e.cpp())}}),ce.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return Mi("Cassandra")}}),ce.of({name:"CSS",extensions:["css"],load(){return ue(()=>import("./dist-_GzJQFYT.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([8,9,4]),import.meta.url).then(e=>e.css())}}),ce.of({name:"Go",extensions:["go"],load(){return ue(()=>import("./dist-BN-1z8mm.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([10,3,4,11]),import.meta.url).then(e=>e.go())}}),ce.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return ue(()=>import("./dist-Ducx4jqX.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([12,3,4,9,13,14]),import.meta.url).then(e=>e.html())}}),ce.of({name:"Java",extensions:["java"],load(){return ue(()=>import("./dist-DSJ2ZFEM.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([15,16,4]),import.meta.url).then(e=>e.java())}}),ce.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return ue(()=>import("./dist-DXvMjqJ4.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([17,3,4,14]),import.meta.url).then(e=>e.javascript())}}),ce.of({name:"Jinja",extensions:["j2","jinja","jinja2"],load(){return ue(()=>import("./dist-CNZQfa8W.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([18,3,4,9,13,14]),import.meta.url).then(e=>e.jinja())}}),ce.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return ue(()=>import("./dist-BGeFWVD6.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([19,20,4]),import.meta.url).then(e=>e.json())}}),ce.of({name:"JSX",extensions:["jsx"],load(){return ue(()=>import("./dist-DXvMjqJ4.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([17,3,4,14]),import.meta.url).then(e=>e.javascript({jsx:!0}))}}),ce.of({name:"LESS",extensions:["less"],load(){return ue(()=>import("./dist-CmEn1nMp.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([21,9,4,22]),import.meta.url).then(e=>e.less())}}),ce.of({name:"Liquid",extensions:["liquid"],load(){return ue(()=>import("./dist-BGgBzoiO.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([23,3,4,9,13,14,24]),import.meta.url).then(e=>e.liquid())}}),ce.of({name:"MariaDB SQL",load(){return Mi("MariaSQL")}}),ce.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return ue(()=>import("./dist-BdkKJ3G3.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([25,3,4,9,13,14,26]),import.meta.url).then(e=>e.markdown())}}),ce.of({name:"MS SQL",load(){return Mi("MSSQL")}}),ce.of({name:"MySQL",load(){return Mi("MySQL")}}),ce.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return ue(()=>import("./dist-CIThMDB8.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([27,3,4,9,13,14,28]),import.meta.url).then(e=>e.php())}}),ce.of({name:"PLSQL",extensions:["pls"],load(){return Mi("PLSQL")}}),ce.of({name:"PostgreSQL",load(){return Mi("PostgreSQL")}}),ce.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return ue(()=>import("./dist-ORyWvZpp.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([29,3,4,30]),import.meta.url).then(e=>e.python())}}),ce.of({name:"Rust",extensions:["rs"],load(){return ue(()=>import("./dist-CoVfzd-4.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([31,32,4]),import.meta.url).then(e=>e.rust())}}),ce.of({name:"Sass",extensions:["sass"],load(){return ue(()=>import("./dist-USFTKxJR.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([33,9,4,34]),import.meta.url).then(e=>e.sass({indented:!0}))}}),ce.of({name:"SCSS",extensions:["scss"],load(){return ue(()=>import("./dist-USFTKxJR.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([33,9,4,34]),import.meta.url).then(e=>e.sass())}}),ce.of({name:"SQL",extensions:["sql"],load(){return Mi("StandardSQL")}}),ce.of({name:"SQLite",load(){return Mi("SQLite")}}),ce.of({name:"TSX",extensions:["tsx"],load(){return ue(()=>import("./dist-DXvMjqJ4.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([17,3,4,14]),import.meta.url).then(e=>e.javascript({jsx:!0,typescript:!0}))}}),ce.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return ue(()=>import("./dist-DXvMjqJ4.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([17,3,4,14]),import.meta.url).then(e=>e.javascript({typescript:!0}))}}),ce.of({name:"WebAssembly",extensions:["wat","wast"],load(){return ue(()=>import("./dist-CAFoFFJF.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([35,36,4]),import.meta.url).then(e=>e.wast())}}),ce.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return ue(()=>import("./dist-rxj5KoqT.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([37,38,4]),import.meta.url).then(e=>e.xml())}}),ce.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return ue(()=>import("./dist-BuEd4VGV.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([39,40,4]),import.meta.url).then(e=>e.yaml())}}),ce.of({name:"APL",extensions:["dyalog","apl"],load(){return ue(()=>import("./apl-DiFyycVh.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([41,42]),import.meta.url).then(e=>ge(e.apl))}}),ce.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return ue(()=>import("./asciiarmor-BAWhqgpM.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([43,44]),import.meta.url).then(e=>ge(e.asciiArmor))}}),ce.of({name:"ASN.1",extensions:["asn","asn1"],load(){return ue(()=>import("./asn1-CtTMtM_b.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([45,46]),import.meta.url).then(e=>ge(e.asn1({})))}}),ce.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return ue(()=>import("./asterisk-BdH-viAa.js").then(async e=>(await e.__tla,e)),[],import.meta.url).then(e=>ge(e.asterisk))}}),ce.of({name:"Brainfuck",extensions:["b","bf"],load(){return ue(()=>import("./brainfuck-D-g39Tsa.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([47,48]),import.meta.url).then(e=>ge(e.brainfuck))}}),ce.of({name:"Cobol",extensions:["cob","cpy"],load(){return ue(()=>import("./cobol-BE9N6AQ-.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([49,50]),import.meta.url).then(e=>ge(e.cobol))}}),ce.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return ue(()=>import("./clike-Del1aM7V.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([51,52]),import.meta.url).then(e=>ge(e.csharp))}}),ce.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return ue(()=>import("./clojure-DmTswoFG.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([53,54]),import.meta.url).then(e=>ge(e.clojure))}}),ce.of({name:"ClojureScript",extensions:["cljs"],load(){return ue(()=>import("./clojure-DmTswoFG.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([53,54]),import.meta.url).then(e=>ge(e.clojure))}}),ce.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return ue(()=>import("./css-us97Iddy.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([55,56]),import.meta.url).then(e=>ge(e.gss))}}),ce.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return ue(()=>import("./cmake-DAoCuUDE.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([57,58]),import.meta.url).then(e=>ge(e.cmake))}}),ce.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return ue(()=>import("./coffeescript-BRP8S7ZW.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([59,60]),import.meta.url).then(e=>ge(e.coffeeScript))}}),ce.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return ue(()=>import("./commonlisp-BS8oQjGE.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([61,62]),import.meta.url).then(e=>ge(e.commonLisp))}}),ce.of({name:"Cypher",extensions:["cyp","cypher"],load(){return ue(()=>import("./cypher-CBH6XzVc.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([63,64]),import.meta.url).then(e=>ge(e.cypher))}}),ce.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return ue(()=>import("./python-01S0WAiq.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([65,66]),import.meta.url).then(e=>ge(e.cython))}}),ce.of({name:"Crystal",extensions:["cr"],load(){return ue(()=>import("./crystal-CRDMNjDv.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([67,68]),import.meta.url).then(e=>ge(e.crystal))}}),ce.of({name:"D",extensions:["d"],load(){return ue(()=>import("./d-CKwQ35PI.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([69,70]),import.meta.url).then(e=>ge(e.d))}}),ce.of({name:"Dart",extensions:["dart"],load(){return ue(()=>import("./clike-Del1aM7V.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([51,52]),import.meta.url).then(e=>ge(e.dart))}}),ce.of({name:"diff",extensions:["diff","patch"],load(){return ue(()=>import("./diff-BtPrcYlV.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([71,72]),import.meta.url).then(e=>ge(e.diff))}}),ce.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return ue(()=>import("./dockerfile-fDdOK3ov.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([73,74]),import.meta.url).then(e=>ge(e.dockerFile))}}),ce.of({name:"DTD",extensions:["dtd"],load(){return ue(()=>import("./dtd-BNqeF3HB.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([75,76]),import.meta.url).then(e=>ge(e.dtd))}}),ce.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return ue(()=>import("./dylan-C2KE_ARv.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([77,78]),import.meta.url).then(e=>ge(e.dylan))}}),ce.of({name:"EBNF",load(){return ue(()=>import("./ebnf-DqMiDFc8.js").then(async e=>(await e.__tla,e)),[],import.meta.url).then(e=>ge(e.ebnf))}}),ce.of({name:"ECL",extensions:["ecl"],load(){return ue(()=>import("./ecl-CLD3EYom.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([79,80]),import.meta.url).then(e=>ge(e.ecl))}}),ce.of({name:"edn",extensions:["edn"],load(){return ue(()=>import("./clojure-DmTswoFG.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([53,54]),import.meta.url).then(e=>ge(e.clojure))}}),ce.of({name:"Eiffel",extensions:["e"],load(){return ue(()=>import("./eiffel-C3QxGicN.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([81,82]),import.meta.url).then(e=>ge(e.eiffel))}}),ce.of({name:"Elm",extensions:["elm"],load(){return ue(()=>import("./elm-Dc9b15sa.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([83,84]),import.meta.url).then(e=>ge(e.elm))}}),ce.of({name:"Erlang",extensions:["erl"],load(){return ue(()=>import("./erlang-59AUz-n0.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([85,86]),import.meta.url).then(e=>ge(e.erlang))}}),ce.of({name:"Esper",load(){return ue(()=>import("./sql-DXG8OgOs.js").then(async e=>(await e.__tla,e)),[],import.meta.url).then(e=>ge(e.esper))}}),ce.of({name:"Factor",extensions:["factor"],load(){return ue(()=>import("./factor-DIE032fN.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([87,88,74]),import.meta.url).then(e=>ge(e.factor))}}),ce.of({name:"FCL",load(){return ue(()=>import("./fcl-Cf-WUHg7.js").then(async e=>(await e.__tla,e)),[],import.meta.url).then(e=>ge(e.fcl))}}),ce.of({name:"Forth",extensions:["forth","fth","4th"],load(){return ue(()=>import("./forth-DjCo7dIs.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([89,90]),import.meta.url).then(e=>ge(e.forth))}}),ce.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return ue(()=>import("./fortran-CZmOENAN.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([91,92]),import.meta.url).then(e=>ge(e.fortran))}}),ce.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return ue(()=>import("./mllike-CvMT7BHA.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([93,94]),import.meta.url).then(e=>ge(e.fSharp))}}),ce.of({name:"Gas",extensions:["s"],load(){return ue(()=>import("./gas-SoBzL_Tr.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([95,96]),import.meta.url).then(e=>ge(e.gas))}}),ce.of({name:"Gherkin",extensions:["feature"],load(){return ue(()=>import("./gherkin-DLggx8YE.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([97,98]),import.meta.url).then(e=>ge(e.gherkin))}}),ce.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return ue(()=>import("./groovy-9IQPpZra.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([99,100]),import.meta.url).then(e=>ge(e.groovy))}}),ce.of({name:"Haskell",extensions:["hs"],load(){return ue(()=>import("./haskell-CgXYOX9c.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([101,102]),import.meta.url).then(e=>ge(e.haskell))}}),ce.of({name:"Haxe",extensions:["hx"],load(){return ue(()=>import("./haxe-aSjlIDiq.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([103,104]),import.meta.url).then(e=>ge(e.haxe))}}),ce.of({name:"HXML",extensions:["hxml"],load(){return ue(()=>import("./haxe-aSjlIDiq.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([103,104]),import.meta.url).then(e=>ge(e.hxml))}}),ce.of({name:"HTTP",load(){return ue(()=>import("./http-C-DFlhhH.js").then(async e=>(await e.__tla,e)),[],import.meta.url).then(e=>ge(e.http))}}),ce.of({name:"IDL",extensions:["pro"],load(){return ue(()=>import("./idl-BADcUAqn.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([105,106]),import.meta.url).then(e=>ge(e.idl))}}),ce.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return ue(()=>import("./javascript-C7hPrwf3.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([107,108]),import.meta.url).then(e=>ge(e.jsonld))}}),ce.of({name:"Julia",extensions:["jl"],load(){return ue(()=>import("./julia-a7zMt5wv.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([109,110]),import.meta.url).then(e=>ge(e.julia))}}),ce.of({name:"Kotlin",extensions:["kt","kts"],load(){return ue(()=>import("./clike-Del1aM7V.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([51,52]),import.meta.url).then(e=>ge(e.kotlin))}}),ce.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return ue(()=>import("./livescript-j-7zvE-f.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([111,112]),import.meta.url).then(e=>ge(e.liveScript))}}),ce.of({name:"Lua",extensions:["lua"],load(){return ue(()=>import("./lua-Boa5MbAE.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([113,114]),import.meta.url).then(e=>ge(e.lua))}}),ce.of({name:"mIRC",extensions:["mrc"],load(){return ue(()=>import("./mirc-eoWtBNF4.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([115,116]),import.meta.url).then(e=>ge(e.mirc))}}),ce.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return ue(()=>import("./mathematica-DrlhlKh7.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([117,118]),import.meta.url).then(e=>ge(e.mathematica))}}),ce.of({name:"Modelica",extensions:["mo"],load(){return ue(()=>import("./modelica-DvH5IG0f.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([119,120]),import.meta.url).then(e=>ge(e.modelica))}}),ce.of({name:"MUMPS",extensions:["mps"],load(){return ue(()=>import("./mumps-Bgv8ZZE2.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([121,122]),import.meta.url).then(e=>ge(e.mumps))}}),ce.of({name:"Mbox",extensions:["mbox"],load(){return ue(()=>import("./mbox-qGC4Me6y.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([123,124]),import.meta.url).then(e=>ge(e.mbox))}}),ce.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return ue(()=>import("./nginx-DN4tv1wm.js").then(async e=>(await e.__tla,e)),[],import.meta.url).then(e=>ge(e.nginx))}}),ce.of({name:"NSIS",extensions:["nsh","nsi"],load(){return ue(()=>import("./nsis-Bu9c7jg8.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([125,126,74]),import.meta.url).then(e=>ge(e.nsis))}}),ce.of({name:"NTriples",extensions:["nt","nq"],load(){return ue(()=>import("./ntriples-C_eoIPVj.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([127,128]),import.meta.url).then(e=>ge(e.ntriples))}}),ce.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return ue(()=>import("./clike-Del1aM7V.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([51,52]),import.meta.url).then(e=>ge(e.objectiveC))}}),ce.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return ue(()=>import("./clike-Del1aM7V.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([51,52]),import.meta.url).then(e=>ge(e.objectiveCpp))}}),ce.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return ue(()=>import("./mllike-CvMT7BHA.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([93,94]),import.meta.url).then(e=>ge(e.oCaml))}}),ce.of({name:"Octave",extensions:["m"],load(){return ue(()=>import("./octave-Cp326Tnr.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([129,130]),import.meta.url).then(e=>ge(e.octave))}}),ce.of({name:"Oz",extensions:["oz"],load(){return ue(()=>import("./oz-P3zQThfI.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([131,132]),import.meta.url).then(e=>ge(e.oz))}}),ce.of({name:"Pascal",extensions:["p","pas"],load(){return ue(()=>import("./pascal-ChBp5QsG.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([133,134]),import.meta.url).then(e=>ge(e.pascal))}}),ce.of({name:"Perl",extensions:["pl","pm"],load(){return ue(()=>import("./perl-DVu2vTnC.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([135,136]),import.meta.url).then(e=>ge(e.perl))}}),ce.of({name:"Pig",extensions:["pig"],load(){return ue(()=>import("./pig-C2M_eRDK.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([137,138]),import.meta.url).then(e=>ge(e.pig))}}),ce.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return ue(()=>import("./powershell-Cd99QpKb.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([139,140]),import.meta.url).then(e=>ge(e.powerShell))}}),ce.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return ue(()=>import("./properties-B3jdvg-S.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([141,142]),import.meta.url).then(e=>ge(e.properties))}}),ce.of({name:"ProtoBuf",extensions:["proto"],load(){return ue(()=>import("./protobuf-CDBL19Ok.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([143,144]),import.meta.url).then(e=>ge(e.protobuf))}}),ce.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return ue(()=>import("./pug-i6atkyz7.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([145,108,146]),import.meta.url).then(e=>ge(e.pug))}}),ce.of({name:"Puppet",extensions:["pp"],load(){return ue(()=>import("./puppet-BddZVZ4W.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([147,148]),import.meta.url).then(e=>ge(e.puppet))}}),ce.of({name:"Q",extensions:["q"],load(){return ue(()=>import("./q-D4fWFvp7.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([149,150]),import.meta.url).then(e=>ge(e.q))}}),ce.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return ue(()=>import("./r-g-cCSFrQ.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([151,152]),import.meta.url).then(e=>ge(e.r))}}),ce.of({name:"RPM Changes",load(){return ue(()=>import("./rpm-Cn6Ok7uQ.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([153,154]),import.meta.url).then(e=>ge(e.rpmChanges))}}),ce.of({name:"RPM Spec",extensions:["spec"],load(){return ue(()=>import("./rpm-Cn6Ok7uQ.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([153,154]),import.meta.url).then(e=>ge(e.rpmSpec))}}),ce.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return ue(()=>import("./ruby-r02uzJua.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([155,156]),import.meta.url).then(e=>ge(e.ruby))}}),ce.of({name:"SAS",extensions:["sas"],load(){return ue(()=>import("./sas-CxKloHOq.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([157,158]),import.meta.url).then(e=>ge(e.sas))}}),ce.of({name:"Scala",extensions:["scala"],load(){return ue(()=>import("./clike-Del1aM7V.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([51,52]),import.meta.url).then(e=>ge(e.scala))}}),ce.of({name:"Scheme",extensions:["scm","ss"],load(){return ue(()=>import("./scheme-D2xXaQid.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([159,160]),import.meta.url).then(e=>ge(e.scheme))}}),ce.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return ue(()=>import("./shell-wb-SF4Wf.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([161,162]),import.meta.url).then(e=>ge(e.shell))}}),ce.of({name:"Sieve",extensions:["siv","sieve"],load(){return ue(()=>import("./sieve-BqFItYR4.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([163,164]),import.meta.url).then(e=>ge(e.sieve))}}),ce.of({name:"Smalltalk",extensions:["st"],load(){return ue(()=>import("./smalltalk-wuEIo73w.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([165,166]),import.meta.url).then(e=>ge(e.smalltalk))}}),ce.of({name:"Solr",load(){return ue(()=>import("./solr-QD_0rVCs.js").then(async e=>(await e.__tla,e)),[],import.meta.url).then(e=>ge(e.solr))}}),ce.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return ue(()=>import("./mllike-CvMT7BHA.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([93,94]),import.meta.url).then(e=>ge(e.sml))}}),ce.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return ue(()=>import("./sparql-DsPZfRy0.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([167,168]),import.meta.url).then(e=>ge(e.sparql))}}),ce.of({name:"Spreadsheet",alias:["excel","formula"],load(){return ue(()=>import("./spreadsheet-BEe5ErZa.js").then(async e=>(await e.__tla,e)),[],import.meta.url).then(e=>ge(e.spreadsheet))}}),ce.of({name:"Squirrel",extensions:["nut"],load(){return ue(()=>import("./clike-Del1aM7V.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([51,52]),import.meta.url).then(e=>ge(e.squirrel))}}),ce.of({name:"Stylus",extensions:["styl"],load(){return ue(()=>import("./stylus-Dyubhej8.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([169,170]),import.meta.url).then(e=>ge(e.stylus))}}),ce.of({name:"Swift",extensions:["swift"],load(){return ue(()=>import("./swift-DWswqE1h.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([171,172]),import.meta.url).then(e=>ge(e.swift))}}),ce.of({name:"sTeX",load(){return ue(()=>import("./stex-DmRWBIEV.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([173,174]),import.meta.url).then(e=>ge(e.stex))}}),ce.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return ue(()=>import("./stex-DmRWBIEV.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([173,174]),import.meta.url).then(e=>ge(e.stex))}}),ce.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return ue(()=>import("./verilog-E7U5dQM4.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([175,176]),import.meta.url).then(e=>ge(e.verilog))}}),ce.of({name:"Tcl",extensions:["tcl"],load(){return ue(()=>import("./tcl-DcLIZx0q.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([177,178]),import.meta.url).then(e=>ge(e.tcl))}}),ce.of({name:"Textile",extensions:["textile"],load(){return ue(()=>import("./textile-Bn63vpkT.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([179,180]),import.meta.url).then(e=>ge(e.textile))}}),ce.of({name:"TiddlyWiki",load(){return ue(()=>import("./tiddlywiki-DgFOwsVP.js").then(async e=>(await e.__tla,e)),[],import.meta.url).then(e=>ge(e.tiddlyWiki))}}),ce.of({name:"Tiki wiki",load(){return ue(()=>import("./tiki-DSpoqS_Q.js").then(async e=>(await e.__tla,e)),[],import.meta.url).then(e=>ge(e.tiki))}}),ce.of({name:"TOML",extensions:["toml"],load(){return ue(()=>import("./toml-Cag-OSI0.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([181,182]),import.meta.url).then(e=>ge(e.toml))}}),ce.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return ue(()=>import("./troff-BLP-dKOV.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([183,184]),import.meta.url).then(e=>ge(e.troff))}}),ce.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return ue(()=>import("./ttcn-ASRN_mcT.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([185,186]),import.meta.url).then(e=>ge(e.ttcn))}}),ce.of({name:"TTCN_CFG",extensions:["cfg"],load(){return ue(()=>import("./ttcn-cfg-rYn6yS-U.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([187,188]),import.meta.url).then(e=>ge(e.ttcnCfg))}}),ce.of({name:"Turtle",extensions:["ttl"],load(){return ue(()=>import("./turtle-DydgtKRb.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([189,190]),import.meta.url).then(e=>ge(e.turtle))}}),ce.of({name:"Web IDL",extensions:["webidl"],load(){return ue(()=>import("./webidl-DPKos6mg.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([191,192]),import.meta.url).then(e=>ge(e.webIDL))}}),ce.of({name:"VB.NET",extensions:["vb"],load(){return ue(()=>import("./vb-DAcDE385.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([193,194]),import.meta.url).then(e=>ge(e.vb))}}),ce.of({name:"VBScript",extensions:["vbs"],load(){return ue(()=>import("./vbscript-B8QiQA8v.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([195,196]),import.meta.url).then(e=>ge(e.vbScript))}}),ce.of({name:"Velocity",extensions:["vtl"],load(){return ue(()=>import("./velocity-D3gjTLEW.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([197,198]),import.meta.url).then(e=>ge(e.velocity))}}),ce.of({name:"Verilog",extensions:["v"],load(){return ue(()=>import("./verilog-E7U5dQM4.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([175,176]),import.meta.url).then(e=>ge(e.verilog))}}),ce.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return ue(()=>import("./vhdl-CoYZowGK.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([199,200]),import.meta.url).then(e=>ge(e.vhdl))}}),ce.of({name:"XQuery",extensions:["xy","xquery","xq","xqm","xqy"],load(){return ue(()=>import("./xquery-CGPHrOWI.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([201,202]),import.meta.url).then(e=>ge(e.xQuery))}}),ce.of({name:"Yacas",extensions:["ys"],load(){return ue(()=>import("./yacas-DLUYkKeB.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([203,204]),import.meta.url).then(e=>ge(e.yacas))}}),ce.of({name:"Z80",extensions:["z80"],load(){return ue(()=>import("./z80-D3UUC8BX.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([205,206]),import.meta.url).then(e=>ge(e.z80))}}),ce.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return ue(()=>import("./mscgen-DYT1s_hB.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([207,208]),import.meta.url).then(e=>ge(e.mscgen))}}),ce.of({name:"X\xF9",extensions:["xu"],load(){return ue(()=>import("./mscgen-DYT1s_hB.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([207,208]),import.meta.url).then(e=>ge(e.xu))}}),ce.of({name:"MsGenny",extensions:["msgenny"],load(){return ue(()=>import("./mscgen-DYT1s_hB.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([207,208]),import.meta.url).then(e=>ge(e.msgenny))}}),ce.of({name:"Vue",extensions:["vue"],load(){return ue(()=>import("./dist-4GQeuWFQ.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([209,3,4,9,13,14,210]),import.meta.url).then(e=>e.vue())}}),ce.of({name:"Angular Template",load(){return ue(()=>import("./dist-2rBXr-aS.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([211,3,4,9,13,14]),import.meta.url).then(e=>e.angular())}})],jh=new WeakMap,V_=/(\n|\r\n?|\u2028|\u2029)/g,$_=/^\s*/,W_=/\S/,U_=Array.prototype.slice,yd=48,qh=57,zh=97,K_=102,Fh=65,Q_=70;Ol=function(e){if(typeof e=="string")return Vh([e])[0];if(typeof e=="function")return function(){let a=U_.call(arguments);return a[0]=Hh(a[0]),e.apply(this,a)};let n=Hh(e),i=Bh(n,0);for(let a=1;a<n.length;a++)i+=arguments[a]+Bh(n,a);return i};function Bh(e,n){let i=e[n];if(i===void 0)throw TypeError(`invalid cooked string at index ${n}`);return i}function Hh(e){let n=jh.get(e);if(n)return n;let i=Vh(e.raw),a=i.map(J_);return Object.defineProperty(a,"raw",{value:Object.freeze(i)}),Object.freeze(a),jh.set(e,a),a}function Vh(e){let n=e.map(s=>s.split(V_)),i;for(let s=0;s<n.length;s++){let c=n[s],f=s===0,p=s+1===n.length;if(f){if(c.length===1||c[0].length>0)throw Error("invalid content on opening line");c[1]=""}if(p){if(c.length===1||W_.test(c[c.length-1]))throw Error("invalid content on closing line");c[c.length-2]="",c[c.length-1]=""}for(let h=2;h<c.length;h+=2){let v=c[h],w=h+1===c.length&&!p,_=$_.exec(v)[0];if(!w&&_.length===v.length){c[h]="";continue}i=G_(_,i)}}let a=i?i.length:0;return n.map(s=>{let c=s[0];for(let f=1;f<s.length;f+=2){let p=s[f],h=s[f+1];c+=p+h.slice(a)}return c})}function G_(e,n){if(n===void 0||e===n)return e;let i=0;for(let a=Math.min(e.length,n.length);i<a&&e[i]===n[i];i++);return e.slice(0,i)}function J_(e){let n="",i=0,a=0;for(;(a=e.indexOf("\\",a))>-1;){if(n+=e.slice(i,a),++a===e.length)return;let s=e[a++];switch(s){case"b":n+="\b";break;case"t":n+=" ";break;case"n":n+=`
14
+ `;break;case"v":n+="\v";break;case"f":n+="\f";break;case"r":n+="\r";break;case"\r":a<e.length&&e[a]===`
15
+ `&&++a;case`
16
+ `:case"\u2028":case"\u2029":break;case"0":if($h(e,a))return;n+="\0";break;case"x":{let c=vd(e,a,a+2);if(c===-1)return;a+=2,n+=String.fromCharCode(c);break}case"u":{let c;if(a<e.length&&e[a]==="{"){let f=e.indexOf("}",++a);if(f===-1)return;c=vd(e,a,f),a=f+1}else c=vd(e,a,a+4),a+=4;if(c===-1||c>1114111)return;n+=String.fromCodePoint(c);break}default:if($h(s,0))return;n+=s}i=a}return n+e.slice(i)}function $h(e,n){let i=e.charCodeAt(n);return i>=yd&&i<=qh}function vd(e,n,i){if(i>=e.length)return-1;let a=0;for(;n<i;n++){let s=X_(e.charCodeAt(n));if(s===-1)return-1;a=a*16+s}return a}function X_(e){return e>=yd&&e<=qh?e-yd:e>=zh&&e<=K_?e-zh+10:e>=Fh&&e<=Q_?e-Fh+10:-1}const Wh=["","f","r","fr","rf"];function Y_(e){try{return Ol(`
17
+ ${e}
18
+ `).trim()}catch{return e}}function Z_(e){return cR.parse(e)}var ex=new Set(["(","[","{",",",")","]","}"]);function tx(e,n){return e.name==="ArgList"?{args:nx(e),kwargs:rx(e,n)}:(console.warn(`Not an ArgList, name: ${e.name}`),{args:[],kwargs:[]})}function nx(e){var a;e.firstChild();let n=[],i=e.name;do if(i=e.name,!ex.has(i)){if(i==="VariableName"&&((a=e.node.nextSibling)==null?void 0:a.name)==="AssignOp"){e.prev();break}n.push(e.node)}while(e.nextSibling());return n}function rx(e,n){let i=[],a=e.name;do if(a=e.name,a==="VariableName"){let s=n.slice(e.from,e.to),c=e.node.nextSibling;if(!c||c.name!=="AssignOp")continue;let f=c.nextSibling;if(!f)continue;let p=n.slice(f.from,f.to).trim();i.push({key:s,value:p})}while(e.nextSibling());return i}function ix(e,n){if(e.name==="String"){let i=n.slice(e.from,e.to);return i.startsWith('r"""')||i.startsWith("r'''")?i.slice(4,-3):i.startsWith('"""')||i.startsWith("'''")?i.slice(3,-3):i.startsWith('r"')||i.startsWith("r'")?i.slice(2,-1):i.slice(1,-1)}if(e.name==="FormatString"){let i=n.slice(e.from,e.to);return i.startsWith('f"""')||i.startsWith("f'''")?i.slice(4,-3):i.startsWith('rf"""')||i.startsWith("rf'''")||i.startsWith('fr"""')||i.startsWith("fr'''")?i.slice(5,-3):i.startsWith('r"""')||i.startsWith("r'''")?i.slice(4,-3):i.startsWith('f"')||i.startsWith("f'")?i.slice(2,-1):i.startsWith('rf"')||i.startsWith("rf'")||i.startsWith('fr"')||i.startsWith("fr'")?i.slice(3,-1):(i.startsWith('r"')||i.startsWith("r'"),i.slice(2,-1))}return null}function ox(e){return e===""?0:e.startsWith('rf"""')||e.startsWith("rf'''")||e.startsWith('fr"""')||e.startsWith("fr'''")?5:e.startsWith('f"""')||e.startsWith("f'''")||e.startsWith('r"""')||e.startsWith("r'''")?4:e.startsWith('"""')||e.startsWith("'''")||e.startsWith("rf'")||e.startsWith('rf"')||e.startsWith("fr'")||e.startsWith('fr"')?3:e.startsWith("f'")||e.startsWith('f"')||e.startsWith("r'")||e.startsWith('r"')?2:e.startsWith("'")||e.startsWith('"')?1:0}function ax(e){let n=[...Wh].sort((i,a)=>a.length-i.length);for(let i of n)if(e.startsWith(i))return[i,e.slice(i.length)];return["",e]}function sx(e,n){return e.replaceAll(`\\${n}`,n)}var lx=[['"""','"""'],["'''","'''"],['"','"'],["'","'"]],cx=Wh.flatMap(e=>lx.map(([n,i])=>[e+n,i])).map(([e,n])=>[e,RegExp(`^mo\\.md\\(\\s*${Uh(e)}(.*)${Uh(n)}\\s*\\)$`,"s")]);function Uh(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var Kh=class{constructor(){Te(this,"type","markdown");Te(this,"defaultCode",`mo.md(r"""
19
+ """)`);Te(this,"defaultMetadata",{quotePrefix:"r"})}static fromMarkdown(e){return`mo.md(r"""
20
+ ${e}
21
+ """)`}transformIn(e){e=e.trim();let n={...this.defaultMetadata};if(e==="")return{code:"",offset:0,metadata:n};for(let[i,a]of cx){let s=e.match(a);if(s){let c=s[1],[f,p]=ax(i);n.quotePrefix=f;let h=sx(c,p),v=e.indexOf(c);return{code:Ol(`
22
+ ${h}
23
+ `).trim(),offset:v,metadata:n}}}return{code:e,offset:0,metadata:n}}transformOut(e,n){e===""&&(e=" ");let{quotePrefix:i}=n,a=e.replaceAll('""',String.raw`"\"`),s=`mo.md(${i}"""
24
+ `;return{code:s+a+`
25
+ """)`,offset:s.length+1}}isSupported(e){if(e=e.trim(),e==="")return!0;if(!e.startsWith("mo.md("))return!1;if(e==="mo.md()")return!0;let n=rm.parser.parse(e),i=[{match:"Script"},{match:"ExpressionStatement"},{match:"CallExpression"},{match:"MemberExpression"},{match:"VariableName"},{match:"."},{match:"PropertyName"},{match:"ArgList"},{match:"("},{match:/String|FormatString/,stop:!0},{match:")"}],a=!0;return n.iterate({enter:s=>{let c=i.shift();if(c===void 0)return a=!1,!1;let f=c.match;return typeof f=="string"?(a&&(a=f===s.name),a&&!c.stop):(f.test(s.name)||(a=!1),a&&!c.stop)}}),a}},ux=class{constructor(){Te(this,"type","python");Te(this,"defaultCode","");Te(this,"defaultMetadata",{})}transformIn(e){return{code:e,offset:0,metadata:{}}}transformOut(e,n){return{code:e,offset:0}}isSupported(e){return!0}},bd="__marimo_duckdb",Qh=class{constructor(){Te(this,"type","sql");Te(this,"defaultMetadata",{dataframeName:"_df",quotePrefix:"f",commentLines:[],showOutput:!0,engine:bd})}get defaultCode(){return'_df = mo.sql(f"""SELECT * FROM """)'}static fromQuery(e){return`_df = mo.sql(f"""${e.trim()}""")`}transformIn(e){e=e.trim();let n={...this.defaultMetadata,commentLines:this.extractCommentLines(e)};if(!this.isSupported(e))return{code:e,offset:0,metadata:n};if(e==="")return{code:"",offset:0,metadata:n};let i=Gh(e);return i?(n.dataframeName=i.dfName,n.showOutput=i.output??!0,n.engine=i.engine??bd,{code:Ol(`
26
+ ${i.sqlString}
27
+ `).trim(),offset:i.startPosition,metadata:n}):{code:e,offset:0,metadata:n}}transformOut(e,n){let{quotePrefix:i,commentLines:a,showOutput:s,engine:c,dataframeName:f}=n,p=`${f} = mo.sql(
28
+ ${i}"""
29
+ `,h=e.replaceAll('"""',String.raw`\"""`),v=`
30
+ """${s?"":`,
31
+ output=False`}${c===bd?"":`,
32
+ engine=${c}`}
33
+ )`;return{code:[...a,p].join(`
34
+ `)+fx(h)+v,offset:p.length+1}}isSupported(e){return e.trim()===""?!0:!e.includes("mo.sql")||e.split("mo.sql").length>2?!1:Gh(e)!==null}extractCommentLines(e){let n=e.split(`
35
+ `),i=[];for(let a of n)if(a!=null&&a.startsWith("#"))i.push(a);else break;return i}};function dx(e){do{if(e.name==="AssignStatement")return e.node;if(e.name!=="Comment")return null}while(e.next());return null}function Gh(e){try{let n=Z_(e).cursor();n.name==="Script"&&n.next();let i=dx(n);if(!i||e.slice(i.to).trim().length>0)return null;let a=null,s=null,c,f,p=0,h=i.cursor();if(h.firstChild(),h.name==="VariableName"&&(a=e.slice(h.from,h.to)),!a)return null;for(;h.next();)if(h.name==="CallExpression"){let v=h.node.cursor(),w=!1;if(v.firstChild(),v.name==="MemberExpression"&&(w=e.slice(v.from,v.to)==="mo.sql"),!w)continue;for(;v.next();)if(v.name==="ArgList"){let{args:_,kwargs:C}=tx(v.node.cursor(),e);_.length===1&&(s=ix(_[0],e),p=_[0].from+ox(e.slice(_[0].from,_[0].to)));for(let{key:E,value:R}of C)switch(E){case"engine":c=R;break;case"output":f=R==="True";break}if(s==="")return{dfName:a,sqlString:"",engine:c,output:f,startPosition:p};break}break}return!a||!s?null:{dfName:a,sqlString:Y_(s),engine:c,output:f,startPosition:p}}catch(n){return console.warn("Failed to parse SQL statement",n),null}}function fx(e){return e.split(`
36
+ `).map(n=>n!=null&&n.trim()?` ${n}`:n).join(`
37
+ `)}function px(e,n){return{get:()=>n.get(e),sub:i=>n.sub(e,()=>i(n.get(e)))}}function mx(e,{offset:n,body:i=window}){let a=(n==null?void 0:n.top)??0,s=(n==null?void 0:n.bottom)??0,c=e.getBoundingClientRect();if(c.top<a){i.scrollBy({top:c.top-a,behavior:"smooth"});return}if(c.bottom>window.innerHeight-s){i.scrollBy({top:c.bottom-window.innerHeight+s,behavior:"smooth"});return}}Iu=function(e){return e?e.state.field(Er).type:"python"};function hx(e,n){return!e||Iu(e)===n?!1:e.state.doc.toString().trim()===""?!0:ur[n].isSupported(ri(e))}Tm=function(e,n,i={}){return!i.force&&!hx(e,n)?!1:(Jm(e,{language:n}),n)};function gx(e){return ra.of([{key:e.getHotkey("cell.format").key,preventDefault:!0,run:n=>(Yu({[n.state.facet(ua)]:n}),!0)},{key:e.getHotkey("cell.viewAsMarkdown").key,preventDefault:!0,run:n=>{let i=Iu(n);if(i!=="markdown"&&i!=="python")return!1;let a=Tm(n,i==="python"?"markdown":"python",{force:!0});return a==="markdown"&&n.state.facet(Dt).afterToggleMarkdown(),a!==!1}}])}dw=function(){return Tn.updateListener.of(e=>{if(e.view.hasFocus&&e.heightChanged&&e.docChanged){if(e.transactions.some(i=>i.effects.some(a=>a.is(ma))))return;let n=e.view.dom.getElementsByClassName("cm-activeLine cm-line");if(n.length===1){let i=n[0],a=document.getElementById("App");En(a,"App not found"),mx(i,{offset:{top:30,bottom:150},body:a})}}})};function yx(){return{}}let vx,bx,Jh;({reducer:vx,createActions:bx,valueAtom:po,useActions:Jh}=Tl(yx,{setVariables:(e,n)=>{let i={...e},a={};for(let s of n)a[s.name]={...i[s.name],...s};return a},addVariables:(e,n)=>{let i={...e};for(let a of n)i[a.name]={...i[a.name],...a};return i},setMetadata:(e,n)=>{let i={...e};for(let{name:a,value:s,dataType:c}of n)i[a]&&(i[a]={...i[a],value:s,dataType:c});return i}})),Bw=()=>Un(po),q2=function(){return Jh()};var wx=Kt(zr(),1),Xh="marimo:sidebar",Yh=new xu(Kb({selectedPanel:bT().optional().transform(e=>e),isSidebarOpen:Ub(),isTerminalOpen:Ub()}),_x);function _x(){return{selectedPanel:"variables",isSidebarOpen:!1,isTerminalOpen:!1}}let xx,kx,Zh;({reducer:xx,createActions:kx,valueAtom:Mu,useActions:Zh}=Tl(()=>Yh.get(Xh),{openApplication:(e,n)=>({...e,selectedPanel:n,isSidebarOpen:!0}),toggleApplication:(e,n)=>({...e,selectedPanel:n,isSidebarOpen:e.isSidebarOpen?e.selectedPanel!==n:!0}),toggleSidebarPanel:e=>({...e,isSidebarOpen:!e.isSidebarOpen}),setIsSidebarOpen:(e,n)=>({...e,isSidebarOpen:n}),toggleTerminal:e=>({...e,isTerminalOpen:!e.isTerminalOpen}),setIsTerminalOpen:(e,n)=>({...e,isTerminalOpen:n})},[(e,n)=>Yh.set(Xh,n)])),F2=()=>{let e=(0,wx.c)(2),n=Un(Mu);if(n.isSidebarOpen)return n;let i;return e[0]===n?i=e[1]:(i={...n,selectedPanel:void 0},e[0]=n,e[1]=i),i},M2=function(){return Zh()},Pm=Be({terminal:!1,pylsp:!1,basedpyright:!1,ty:!1});function Bl(e){return ct.get(Pm)[e]??!1}ku=Be({documentation:null});var e0=new Set(["FunctionDefinition","LambdaExpression","ArrayComprehensionExpression","SetComprehension","DictionaryComprehensionExpression","ComprehensionExpression","ClassDefinition"]);function Cx(e){let n=n2(e.state);if(!n||Tx(n))return[];let i=new Set(Object.keys(e.variables).filter(E=>{let R=e.variables[E];return R.dataType!=="module"&&!R.declaredBy.includes("setup")&&!R.declaredBy.includes(e.cellId)}));if(i.size===0)return[];let a=[],s=new Map,c=new Map,f=new Map;function p(E,R){var G,he,N,j,V,de,pe,xe,Z,be,Ee;let L=E.cursor(),H=L.name,W=L.from,U=e0.has(H),A=R;switch(U&&(A=[...R,W],s.set(W,new Set),c.set(W,H)),H){case"FunctionDefinition":{let re=E.cursor();re.firstChild();do if(re.name==="VariableName"){let le=e.state.doc.sliceString(re.from,re.to),K=R[R.length-1]??-1;s.has(K)||s.set(K,new Set),(G=s.get(K))==null||G.add(le);break}while(re.nextSibling());let oe=E.cursor();oe.firstChild();do if(oe.name==="ParamList"){let le=oe.node.cursor();le.firstChild();do if(le.name==="VariableName"){let K=e.state.doc.sliceString(le.from,le.to);(he=s.get(W))==null||he.add(K)}while(le.nextSibling())}while(oe.nextSibling());break}case"LambdaExpression":{let re=E.cursor();re.firstChild();do if(re.name==="ParamList"){let oe=re.node.cursor();oe.firstChild();do if(oe.name==="VariableName"){let le=e.state.doc.sliceString(oe.from,oe.to);(N=s.get(W))==null||N.add(le)}while(oe.nextSibling())}while(re.nextSibling());break}case"ArrayComprehensionExpression":case"DictionaryComprehensionExpression":case"SetComprehension":case"ComprehensionExpression":{let re=E.cursor();re.firstChild();let oe=!1;do if(re.name==="for")oe=!0;else if(oe&&re.name==="VariableName"){let le=e.state.doc.sliceString(re.from,re.to);(j=s.get(W))==null||j.add(le)}else if(oe&&re.name==="TupleExpression"){let le=re.node.cursor();le.firstChild();do if(le.name==="VariableName"){let K=e.state.doc.sliceString(le.from,le.to);(V=s.get(W))==null||V.add(K)}while(le.nextSibling())}else oe&&re.name==="in"&&(oe=!1);while(re.nextSibling());break}case"ClassDefinition":{let re=E.cursor();re.firstChild();do if(re.name==="VariableName"){let oe=e.state.doc.sliceString(re.from,re.to),le=R[R.length-1]??-1;s.has(le)||s.set(le,new Set),(de=s.get(le))==null||de.add(oe);break}while(re.nextSibling());f.set(W,[]);break}case"AssignStatement":{let re=E.cursor(),oe=[];re.firstChild();do re.name==="AssignOp"&&oe.push(re.from);while(re.nextSibling());let le=oe[oe.length-1],K=E.cursor();K.firstChild();let Ae=A[A.length-1]??-1;do K.from<le&&wd(K,{currentScope:Ae,state:e.state,allDeclarations:s,scopeTypes:c,classLevelDeclarations:f,assignmentPosition:L.to});while(K.nextSibling());break}case"ForStatement":{let re=E.cursor();re.firstChild();let oe=!1;do if(re.name==="for")oe=!0;else if(oe&&re.name==="VariableName"){let le=e.state.doc.sliceString(re.from,re.to),K=A[A.length-1]??-1;s.has(K)||s.set(K,new Set),(pe=s.get(K))==null||pe.add(le)}else oe&&re.name==="in"&&(oe=!1);while(re.nextSibling());break}case"ImportStatement":{let re=E.cursor();re.firstChild();do if(re.name==="VariableName"){let oe=e.state.doc.sliceString(re.from,re.to),le=A[A.length-1]??-1;s.has(le)||s.set(le,new Set),(xe=s.get(le))==null||xe.add(oe)}while(re.nextSibling());break}case"ImportFromStatement":{let re=E.cursor();re.firstChild();let oe=!1;do if(re.name==="import")oe=!0;else if(oe&&re.name==="VariableName"){let le=e.state.doc.sliceString(re.from,re.to),K=A[A.length-1]??-1;s.has(K)||s.set(K,new Set),(Z=s.get(K))==null||Z.add(le)}while(re.nextSibling());break}case"TryStatement":{let re=E.cursor();re.firstChild();let oe=!1;do if(re.name==="as")oe=!0;else if(oe&&re.name==="VariableName"){let le=e.state.doc.sliceString(re.from,re.to),K=A[A.length-1]??-1;s.has(K)||s.set(K,new Set),(be=s.get(K))==null||be.add(le),oe=!1}while(re.nextSibling());break}case"WithStatement":{let re=E.cursor();re.firstChild();let oe=!1;do if(re.name==="as")oe=!0;else if(oe&&re.name==="VariableName"){let le=e.state.doc.sliceString(re.from,re.to),K=A[A.length-1]??-1;s.has(K)||s.set(K,new Set),(Ee=s.get(K))==null||Ee.add(le),oe=!1}while(re.nextSibling());break}}C(L,re=>{p(re,A)})}function h(E,R,L){let H=f.get(R);return H?H.some(([W,U])=>W===E&&U<L):!1}function v(E,R,L){var H,W;for(let U of R)if(c.get(U)==="ClassDefinition"){if(h(E,U,L))return!0}else if((H=s.get(U))!=null&&H.has(E))return!0;return((W=s.get(-1))==null?void 0:W.has(E))??!1}function w(E,R){let L=E.cursor(),H=L.name,W=L.from,U=e0.has(H),A=R;if(U&&(A=[...R,W]),H==="VariableName"){let G=e.state.doc.sliceString(L.from,L.to);_(G,L)&&(v(G,A,L.from)||a.push({from:L.from,to:L.to,variableName:G}))}C(L,G=>{w(G,A)})}function _(E,R){return i.has(E)&&!Sx(R)&&!Ex(R)}function C(E,R){if(E.firstChild())do R(E.node);while(E.nextSibling())}return p(n,[]),w(n,[]),a}function Sx(e){let n=e.node.cursor();if(n.moveTo(e.from),n.parent()&&n.name==="CallExpression"&&n.firstChild())do if(n.name==="ArgList"&&n.firstChild()){do if(n.from===e.from&&n.to===e.to)return n.nextSibling()&&n.name==="AssignOp";while(n.nextSibling());break}while(n.nextSibling());return!1}function Ex(e){let n=e.node.cursor();if(n.parent()&&n.name==="AssignStatement"){let i=n.node.cursor();i.firstChild();let a=-1;do if(i.name==="AssignOp"){a=i.from;break}while(i.nextSibling());return a!==-1&&e.from<a}return!1}function Tx(e){let n=e.cursor();do if(n.name==="\u26A0"||n.type.isError)return!0;while(n.next());return!1}function wd(e,n){var i;switch(e.name){case"VariableName":{let a=n.state.doc.sliceString(e.from,e.to);if(n.currentScope!==-1&&n.scopeTypes.get(n.currentScope)==="ClassDefinition"){let s=n.classLevelDeclarations.get(n.currentScope);s&&s.push([a,n.assignmentPosition])}else n.allDeclarations.has(n.currentScope)||n.allDeclarations.set(n.currentScope,new Set),(i=n.allDeclarations.get(n.currentScope))==null||i.add(a);break}case"TupleExpression":{let a=e.node.cursor();a.firstChild();do wd(a,n);while(a.nextSibling());break}case"ArrayExpression":{let a=e.node.cursor();a.firstChild();do wd(a,n);while(a.nextSibling());break}}}var Rx=Ti.mark({class:"mo-cm-reactive-reference"});r_=Ti.mark({class:"mo-cm-reactive-reference-hover"});var t0=na.define(),Dx=class{constructor(e,n){Te(this,"highlightDebounceMs",300);this.view=e,this.cellId=n,this.scheduleHighlighting=Qb(()=>{this.runHighlighting()},this.highlightDebounceMs),this.variablesUnsubscribe=ct.sub(po,()=>{this.scheduleHighlighting()}),this.scheduleHighlighting()}update(e){(e.docChanged||e.focusChanged)&&this.scheduleHighlighting()}destroy(){this.scheduleHighlighting.cancel(),this.variablesUnsubscribe()}runHighlighting(){let e=Cx({state:this.view.state,cellId:this.cellId,variables:ct.get(po)});e.length>0&&Pe.debug(`Found ${e.length} reactive variables in cell ${this.cellId}`),queueMicrotask(()=>{this.view.dispatch({effects:t0.of(e)})})}};Pu=hu.define({create(){return{decorations:Ti.none,ranges:[]}},update(e,n){let i={decorations:e.decorations.map(n.changes),ranges:e.ranges};for(let a of n.effects)a.is(t0)&&(i={decorations:Ti.set(a.value.map(s=>Rx.range(s.from,s.to))),ranges:a.value});return i},provide:e=>Tn.decorations.from(e,n=>n.decorations)});function Ox(e){return[Pu,ia.define(n=>new Dx(n,e))]}C2=function(e,n){return n?Ox(e):[]};function n0(e,n=!1){if(!e)return null;let i=document.createElement("span");if(i.classList.add("mo-cm-tooltip"),i.classList.add("docs-documentation"),n&&i.classList.add("cm-tooltip-section"),i.style.display="flex",i.style.flexDirection="column",i.style.gap=".8rem",i.innerHTML=e,n){let a=document.createElement("div");a.classList.add("text-xs","text-muted-foreground","font-medium","pt-1","-mt-2","border-t","border-border");let s=document.createElement("kbd");s.className="ml-1 rounded-md bg-muted/40 px-2 text-[0.75rem] font-prose center border border-foreground/20 text-muted-foreground inline whitespace-nowrap",s.textContent=TT()?"\u2318":"Ctrl",a.append(document.createTextNode("Jump to defining cell ")),a.append(s),a.append(document.createTextNode(" + Click")),i.append(a)}return i}Ru=new bu("autocomplete-result",async(e,n)=>{let{sendCodeCompletionRequest:i}=Ri();await i({id:e,...n})});var Px={param:3,property:2};const _d={asCompletionResult(e,n){return{from:e-n.prefix_length,options:n.options.map(i=>({label:i.name,type:i.type,boost:Px[i.type]??1,info:()=>n0(i.completion_info)})),validFor:/^\w*$/}},asHoverTooltip({position:e,message:n,limitToType:i,excludeTypes:a,exactName:s,showGoToDefinitionHint:c=!1}){let f=Nx(n.options,s);if(!f)return;let p=e-n.prefix_length,h=n0(f.completion_info,c);if(h&&!(i&&f.type!==i)&&!(a!=null&&a.includes(f.type)))return{pos:p,html:f.completion_info,end:p+f.name.length,above:!0,create:()=>({dom:h,resize:!1})}}};function Nx(e,n){if(e.length!==0){if(e.length===1)return e[0];if(n)return e.find(i=>i.name===n)}}H2=function(e){var n;return[(n=e==null?void 0:e.pylsp)!=null&&n.enabled&&Bl("pylsp")?[]:l2(async(i,a)=>{let s=await r0({view:i,pos:a,excludeTypes:["tooltip"]});return s===null||s==="cancelled"?null:s},{hideOnChange:!0}),Ax]};async function r0({view:e,pos:n,excludeTypes:i}){var w;let a=cr.findElement(e.dom);if(!a)return Pe.error("Failed to find active cell."),null;let s=cr.parse(a.id),{startToken:c,endToken:f}=i0(e.state.doc,n),p=((w=e.state.field(Pu,!1))==null?void 0:w.ranges.some(_=>n>=_.from&&n<=_.to))??!1,h=await Ru.request({document:e.state.doc.slice(0,f).toString(),cellId:s});if(!h)return"cancelled";let v=e.state.doc.slice(c,f).toString();return _d.asHoverTooltip({position:f,message:h,exactName:v,excludeTypes:i,showGoToDefinitionHint:p})??null}function i0(e,n){let i=n,a=n;for(;i>0;){let s=e.sliceString(i-1,i);if(!/\w/.test(s))break;i--}for(;a<e.length;){let s=e.sliceString(a,a+1);if(!/\w/.test(s))break;a++}return{startToken:i,endToken:a}}function Mx(e){let{head:n}=e.selection.main,i=e.doc.sliceString(n-1,n);return/\w/.test(i)}var Lx=Qb(async(e,n)=>{if(ct.get(Mu).selectedPanel!=="documentation")return;let i=await r0({view:e,pos:n});i!=="cancelled"&&ct.set(ku,{documentation:(i==null?void 0:i.html)??null})},300),Ax=Tn.updateListener.of(e=>{if(e.selectionSet&&Mx(e.state)){let n=e.state.selection.main.head;Lx(e.view,n)}});function o0(e,n){e.focus(),requestAnimationFrame(()=>{e.dispatch({selection:{anchor:n,head:n},effects:Tn.scrollIntoView(n,{y:"center"})})})}Cu=function(e,n){let{state:i}=e,a=n2(i),s=!1,c=0;return a.iterate({enter:f=>{if(s)return!1;if(f.name==="VariableName"&&i.doc.sliceString(f.from,f.to)===n)return c=f.from,s=!0,!1;if(f.name==="Comment"||f.name==="String")return!1}}),s?(o0(e,c),!0):!1};function Ix(e,n){return o0(e,e.state.doc.line(n).from),!0}function jx(e){let{from:n,to:i}=e.selection.main;if(n===i){let{startToken:a,endToken:s}=i0(e.doc,n);return e.doc.sliceString(a,s)}return e.doc.sliceString(n,i)}function qx(e,n){if(!n)return null;let i=e[n];return!i||i.declaredBy.length===0?null:i.declaredBy[0]}function zx(e){return e.startsWith("_")}mm=function(e){let{state:n}=e,i=jx(n);return i?(m2(e),e.dispatch({effects:IT}),km(e,i)):!1},km=function(e,n){let i=Fx(e,n);return i?Cu(i,n):!1},Q2=function(e,n){let i=a0(e);return i?Ix(i,n):!1};function Fx(e,n){if(zx(n))return e;let i=qx(ct.get(po),n);return i?a0(i):null}function a0(e){var n;return((n=ct.get(mt).cellHandles[e].current)==null?void 0:n.editorView)??null}function Bx(e){var n=e.Pos;function i(u,m,y){if(m.line===y.line&&m.ch>=y.ch-1){var b=u.getLine(m.line).charCodeAt(m.ch);55296<=b&&b<=55551&&(y.ch+=1)}return{start:m,end:y}}var a=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"g<Up>",type:"keyToKey",toKeys:"gk"},{keys:"g<Down>",type:"keyToKey",toKeys:"gj"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h"},{keys:"<Del>",type:"keyToKey",toKeys:"x"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"gq",type:"operator",operator:"hardWrap"},{keys:"gw",type:"operator",operator:"hardWrap",operatorArgs:{keepCursor:!0}},{keys:"g?",type:"operator",operator:"rot13"},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-u>",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<register>",type:"action",action:"replayMacro"},{keys:"q<register>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<register>",type:"action",action:"setMark"},{keys:'"<register>',type:"action",action:"setRegister"},{keys:"<C-r><register>",type:"action",action:"insertRegister",context:"insert",isEdit:!0},{keys:"<C-o>",type:"action",action:"oneNormalCommand",context:"insert"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<register>",type:"motion",motion:"textObjectManipulation"},{keys:"i<register>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],s=Object.create(null),c=a.length,f=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"omap",shortName:"om"},{name:"noremap",shortName:"no"},{name:"nnoremap",shortName:"nn"},{name:"vnoremap",shortName:"vn"},{name:"inoremap",shortName:"ino"},{name:"onoremap",shortName:"ono"},{name:"unmap"},{name:"mapclear",shortName:"mapc"},{name:"nmapclear",shortName:"nmapc"},{name:"vmapclear",shortName:"vmapc"},{name:"imapclear",shortName:"imapc"},{name:"omapclear",shortName:"omapc"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"startinsert",shortName:"start"},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"marks",excludeFromCommandHistory:!0},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"delete",shortName:"d"},{name:"join",shortName:"j"},{name:"normal",shortName:"norm"},{name:"global",shortName:"g"}],p=hn("");function h(u){u.setOption("disableInput",!0),u.setOption("showCursorWhenSelecting",!1),e.signal(u,"vim-mode-change",{mode:"normal"}),u.on("cursorActivity",As),le(u),e.on(u.getInputField(),"paste",w(u))}function v(u){u.setOption("disableInput",!1),u.off("cursorActivity",As),e.off(u.getInputField(),"paste",w(u)),u.state.vim=null,Hi&&clearTimeout(Hi)}function w(u){var m=u.state.vim;return m.onPasteFn||(m.onPasteFn=function(){m.insertMode||(u.setCursor(Ct(u.getCursor(),0,1)),Ht.enterInsertMode(u,{},m))}),m.onPasteFn}var _=/[\d]/,C=[e.isWordChar,function(u){return u&&!e.isWordChar(u)&&!/\s/.test(u)}],E=[function(u){return/\S/.test(u)}],R=["<",">"],L=["-",'"',".",":","_","/","+"],H=/^\w$/,W=/^[A-Z]$/;try{W=RegExp("^[\\p{Lu}]$","u")}catch{}function U(u,m){return m>=u.firstLine()&&m<=u.lastLine()}function A(u){return/^[a-z]$/.test(u)}function G(u){return"()[]{}".indexOf(u)!=-1}function he(u){return _.test(u)}function N(u){return W.test(u)}function j(u){return/^\s*$/.test(u)}function V(u){return".?!".indexOf(u)!=-1}function de(u,m){for(var y=0;y<m.length;y++)if(m[y]==u)return!0;return!1}var pe={};function xe(u,m,y,b,x){if(m===void 0&&!x)throw Error("defaultValue is required unless callback is provided");if(y||(y="string"),pe[u]={type:y,defaultValue:m,callback:x},b)for(var k=0;k<b.length;k++)pe[b[k]]=pe[u];m&&Z(u,m)}function Z(u,m,y,b){var x=pe[u];b||(b={});var k=b.scope;if(!x)return Error("Unknown option: "+u);if(x.type=="boolean"){if(m&&m!==!0)return Error("Invalid argument: "+u+"="+m);m!==!1&&(m=!0)}x.callback?(k!=="local"&&x.callback(m,void 0),k!=="global"&&y&&x.callback(m,y)):(k!=="local"&&(x.value=x.type=="boolean"?!!m:m),k!=="global"&&y&&(y.state.vim.options[u]={value:m}))}function be(u,m,y){var b=pe[u];y||(y={});var x=y.scope;if(!b)return Error("Unknown option: "+u);if(b.callback){let k=m&&b.callback(void 0,m);return x!=="global"&&k!==void 0?k:x==="local"?void 0:b.callback()}else return(x!=="global"&&m&&m.state.vim.options[u]||x!=="local"&&b||{}).value}xe("filetype",void 0,"string",["ft"],function(u,m){if(m!==void 0)if(u===void 0){let y=m.getOption("mode");return y=="null"?"":y}else{let y=u==""?"null":u;m.setOption("mode",y)}}),xe("textwidth",80,"number",["tw"],function(u,m){if(m!==void 0){if(u===void 0)return m.getOption("textwidth");var y=Math.round(u);y>1&&m.setOption("textwidth",y)}});var Ee=function(){var u=100,m=-1,y=0,b=0,x=Array(u);function k(M,z,I){var ae=x[m%u];function ne(X){var we=++m%u,_e=x[we];_e&&_e.clear(),x[we]=M.setBookmark(X)}if(ae){var J=ae.find();J&&!Vt(J,z)&&ne(z)}else ne(z);ne(I),y=m,b=m-u+1,b<0&&(b=0)}function T(M,z){m+=z,m>y?m=y:m<b&&(m=b);var I=x[(u+m)%u];if(I&&!I.find()){var ae=z>0?1:-1,ne,J=M.getCursor();do if(m+=ae,I=x[(u+m)%u],I&&(ne=I.find())&&!Vt(J,ne))break;while(m<y&&m>b)}return I}function O(M,z){var I=m,ae=T(M,z);return m=I,ae&&ae.find()}return{cachedCursor:void 0,add:k,find:O,move:T}},re=function(u){return u?{changes:u.changes,expectCursorActivityForChange:u.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};class oe{constructor(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=re()}exitMacroRecordMode(){var m=K.macroModeState;m.onRecordingDone&&m.onRecordingDone(),m.onRecordingDone=void 0,m.isRecording=!1}enterMacroRecordMode(m,y){var b=K.registerController.getRegister(y);if(b){if(b.clear(),this.latestRegister=y,m.openDialog){var x=tr("span",{class:"cm-vim-message"},"recording @"+y);this.onRecordingDone=m.openDialog(x,function(){},{bottom:!0})}this.isRecording=!0}}}function le(u){return u.state.vim||(u.state.vim={inputState:new Xn,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:void 0,sel:{anchor:new n(0,0),head:new n(0,0)},options:{},expectLiteralNext:!1,status:""}),u.state.vim}var K;function Ae(){for(var u in K={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Ee(),macroModeState:new oe,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new Ln({}),searchHistoryController:new Pr,exCommandHistoryController:new Pr},pe){var m=pe[u];m.value=m.defaultValue}}class Qe{constructor(m,y){this.keyName=m,this.key=y.key,this.ctrlKey=y.ctrlKey,this.altKey=y.altKey,this.metaKey=y.metaKey,this.shiftKey=y.shiftKey}}var ut,Fe={enterVimMode:h,leaveVimMode:v,buildKeyMap:function(){},getRegisterController:function(){return K.registerController},resetVimGlobalState_:Ae,getVimGlobalState_:function(){return K},maybeInitVimState_:le,suppressErrorLogging:!1,InsertModeKey:Qe,map:function(u,m,y){Gt.map(u,m,y)},unmap:function(u,m){return Gt.unmap(u,m)},noremap:function(u,m,y){Gt.map(u,m,y,!0)},mapclear:function(u){var m=a.length,y=c,b=a.slice(0,m-y);if(a=a.slice(m-y),u)for(var x=b.length-1;x>=0;x--){var k=b[x];if(u!==k.context)if(k.context)this._mapCommand(k);else{var T=["normal","insert","visual"];for(var O in T)if(T[O]!==u){var M=Object.assign({},k);M.context=T[O],this._mapCommand(M)}}}},langmap:gt,vimKeyFromEvent:tn,setOption:Z,getOption:be,defineOption:xe,defineEx:function(u,m,y){if(!m)m=u;else if(u.indexOf(m)!==0)throw Error('(Vim.defineEx) "'+m+'" is not a prefix of "'+u+'", command not registered');Da[u]=y,Gt.commandMap_[m]={name:u,shortName:m,type:"api"}},handleKey:function(u,m,y){var b=this.findKey(u,m,y);if(typeof b=="function")return b()},multiSelectHandleKey:jo,findKey:function(u,m,y){var b=le(u),x=u;function k(){var I=K.macroModeState;if(I.isRecording){if(m=="q")return I.exitMacroRecordMode(),kt(x),!0;y!="mapping"&&Mo(I,m)}}function T(){if(m=="<Esc>"){if(b.visualMode)Je(x);else if(b.insertMode)Lr(x);else return;return kt(x),!0}}function O(){if(T())return!0;b.inputState.keyBuffer.push(m);var I=b.inputState.keyBuffer.join(""),ae=m.length==1,ne=An.matchCommand(I,a,b.inputState,"insert"),J=b.inputState.changeQueue;if(ne.type=="none")return kt(x),!1;if(ne.type=="partial"){if(ne.expectLiteralNext&&(b.expectLiteralNext=!0),ut&&window.clearTimeout(ut),ut=ae&&window.setTimeout(function(){b.insertMode&&b.inputState.keyBuffer.length&&kt(x)},be("insertModeEscKeysTimeout")),ae){var X=x.listSelections();(!J||J.removed.length!=X.length)&&(J=b.inputState.changeQueue=new ai),J.inserted+=m;for(var we=0;we<X.length;we++){var _e=vt(X[we].anchor,X[we].head),je=On(X[we].anchor,X[we].head),Se=x.getRange(_e,x.state.overwrite?Ct(je,0,1):je);J.removed[we]=(J.removed[we]||"")+Se}}return!ae}else ne.type=="full"&&(b.inputState.keyBuffer.length=0);if(b.expectLiteralNext=!1,ut&&window.clearTimeout(ut),ne.command&&J){for(var X=x.listSelections(),we=0;we<X.length;we++){var Ie=X[we].head;x.replaceRange(J.removed[we]||"",Ct(Ie,0,-J.inserted.length),Ie,"+input")}K.macroModeState.lastInsertModeChanges.changes.pop()}return ne.command||kt(x),ne.command}function M(){if(k()||T())return!0;b.inputState.keyBuffer.push(m);var I=b.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(I))return!0;var ae=/^(\d*)(.*)$/.exec(I);if(!ae)return kt(x),!1;var ne=b.visualMode?"visual":"normal",J=ae[2]||ae[1];b.inputState.operatorShortcut&&b.inputState.operatorShortcut.slice(-1)==J&&(J=b.inputState.operatorShortcut);var X=An.matchCommand(J,a,b.inputState,ne);return X.type=="none"?(kt(x),!1):X.type=="partial"?(X.expectLiteralNext&&(b.expectLiteralNext=!0),!0):X.type=="clear"?(kt(x),!0):(b.expectLiteralNext=!1,b.inputState.keyBuffer.length=0,ae=/^(\d*)(.*)$/.exec(I),ae&&ae[1]&&ae[1]!="0"&&b.inputState.pushRepeatDigit(ae[1]),X.command)}var z=b.insertMode?O():M();if(z===!1)return!b.insertMode&&(m.length===1||e.isMac&&/<A-.>/.test(m))?function(){return!0}:void 0;if(z===!0)return function(){return!0};if(z)return function(){return x.operation(function(){x.curOp.isVimOp=!0;try{if(typeof z!="object")return;z.type=="keyToKey"?It(x,z.toKeys,z):An.processCommand(x,b,z)}catch(I){throw x.state.vim=void 0,le(x),Fe.suppressErrorLogging||console.log(I),I}return!0})}},handleEx:function(u,m){Gt.processCommand(u,m)},defineMotion:Fi,defineAction:Qt,defineOperator:si,mapCommand:Ar,_mapCommand:Po,defineRegister:yn,exitVisualMode:Je,exitInsertMode:Lr},We=[],De=!1,Ne;function mn(u){if(!Ne)throw Error("No prompt to send key to");if(u[0]=="<"){var m=u.toLowerCase().slice(1,-1);if(m=m.split("-").pop()||"",m=="lt")u="<";else if(m=="space")u=" ";else if(m=="cr")u=`
38
+ `;else if(Ue[m]){var y=Ne.value||"",b={key:Ue[m],target:{value:y,selectionEnd:y.length,selectionStart:y.length}};Ne.onKeyDown&&Ne.onKeyDown(b,Ne.value,k),Ne&&Ne.onKeyUp&&Ne.onKeyUp(b,Ne.value,k);return}}if(u==`
39
+ `){var x=Ne;Ne=null,x.onClose&&x.onClose(x.value)}else Ne.value=(Ne.value||"")+u;function k(T){Ne&&(typeof T=="string"?Ne.value=T:Ne=null)}}function It(u,m,y){var b=De;if(y){if(We.indexOf(y)!=-1)return;We.push(y),De=y.noremap!=0}try{for(var x=le(u),k=/<(?:[CSMA]-)*\w+>|./gi,T;T=k.exec(m);){var O=T[0],M=x.insertMode;if(Ne){mn(O);continue}if(!Fe.handleKey(u,O,"mapping")&&M&&x.insertMode){if(O[0]=="<"){var z=O.toLowerCase().slice(1,-1);if(z=z.split("-").pop()||"",z=="lt")O="<";else if(z=="space")O=" ";else if(z=="cr")O=`
40
+ `;else if(Ue.hasOwnProperty(z)){O=Ue[z],xn(u,O);continue}else O=O[0],k.lastIndex=T.index+1}u.replaceSelection(O)}}}finally{if(We.pop(),De=We.length?b:!1,!We.length&&Ne){var I=Ne;Ne=null,Do(u,I)}}}var Dn={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},sn={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},Ue={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(Dn)).forEach(function(u){Ue[(Dn[u]||"").toLowerCase()]=Ue[u.toLowerCase()]=u});function tn(u,m){var k;var y=u.key;if(!sn[y]){y.length>1&&y[0]=="n"&&(y=y.replace("Numpad","")),y=Dn[y]||y;var b="";if(u.ctrlKey&&(b+="C-"),u.altKey&&(b+="A-"),u.metaKey&&(b+="M-"),e.isMac&&b=="A-"&&y.length==1&&(b=b.slice(2)),(b||y.length>1)&&u.shiftKey&&(b+="S-"),m&&!m.expectLiteralNext&&y.length==1){if(p.keymap&&y in p.keymap)(p.remapCtrl!=0||!b)&&(y=p.keymap[y]);else if(y.charCodeAt(0)>128&&!s[y]){var x=((k=u.code)==null?void 0:k.slice(-1))||"";u.shiftKey||(x=x.toLowerCase()),x&&(y=x,!b&&u.altKey&&(b="A-"))}}return b+=y,b.length>1&&(b="<"+b+">"),b}}function gt(u,m){p.string!==u&&(p=hn(u)),p.remapCtrl=m}function hn(u){let m={};if(!u)return{keymap:m,string:""};function y(b){return b.split(/\\?(.)/).filter(Boolean)}return u.split(/((?:[^\\,]|\\.)+),/).map(b=>{if(!b)return;let x=b.split(/((?:[^\\;]|\\.)+);/);if(x.length==3){let k=y(x[1]),T=y(x[2]);if(k.length!==T.length)return;for(let O=0;O<k.length;++O)m[k[O]]=T[O]}else if(x.length==1){let k=y(b);if(k.length%2!=0)return;for(let T=0;T<k.length;T+=2)m[k[T]]=k[T+1]}}),{keymap:m,string:u}}xe("langmap",void 0,"string",["lmap"],function(u,m){if(u===void 0)return p.string;gt(u)});class Xn{constructor(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=void 0,this.changeQueue=null}pushRepeatDigit(m){this.operator?this.motionRepeat=this.motionRepeat.concat(m):this.prefixRepeat=this.prefixRepeat.concat(m)}getRepeat(){var m=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(m=1,this.prefixRepeat.length>0&&(m*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(m*=parseInt(this.motionRepeat.join(""),10))),m}}function kt(u,m){u.state.vim.inputState=new Xn,u.state.vim.expectLiteralNext=!1,e.signal(u,"vim-command-done",m)}function ai(){this.removed=[],this.inserted=""}class gn{constructor(m,y,b){this.clear(),this.keyBuffer=[m||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!y,this.blockwise=!!b}setText(m,y,b){this.keyBuffer=[m||""],this.linewise=!!y,this.blockwise=!!b}pushText(m,y){y&&(this.linewise||this.keyBuffer.push(`
41
+ `),this.linewise=!0),this.keyBuffer.push(m)}pushInsertModeChanges(m){this.insertModeChanges.push(re(m))}pushSearchQuery(m){this.searchQueries.push(m)}clear(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1}toString(){return this.keyBuffer.join("")}}function yn(u,m){var y=K.registerController.registers;if(!u||u.length!=1)throw Error("Register name must be 1 character");if(y[u])throw Error("Register already defined "+u);y[u]=m,L.push(u)}class Ln{constructor(m){this.registers=m,this.unnamedRegister=m['"']=new gn,m["."]=new gn,m[":"]=new gn,m["/"]=new gn,m["+"]=new gn}pushText(m,y,b,x,k){if(m!=="_"){x&&b.charAt(b.length-1)!==`
42
+ `&&(b+=`
43
+ `);var T=this.isValidRegister(m)?this.getRegister(m):null;if(!T||!m){switch(y){case"yank":this.registers[0]=new gn(b,x,k);break;case"delete":case"change":b.indexOf(`
44
+ `)==-1?this.registers["-"]=new gn(b,x):(this.shiftNumericRegisters_(),this.registers[1]=new gn(b,x));break}this.unnamedRegister.setText(b,x,k);return}N(m)?T.pushText(b,x):T.setText(b,x,k),m==="+"&&navigator.clipboard.writeText(b),this.unnamedRegister.setText(T.toString(),x)}}getRegister(m){return this.isValidRegister(m)?(m=m.toLowerCase(),this.registers[m]||(this.registers[m]=new gn),this.registers[m]):this.unnamedRegister}isValidRegister(m){return m&&(de(m,L)||H.test(m))}shiftNumericRegisters_(){for(var m=9;m>=2;m--)this.registers[m]=this.getRegister(""+(m-1))}}class Pr{constructor(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}nextMatch(m,y){var b=this.historyBuffer,x=y?-1:1;this.initialPrefix===null&&(this.initialPrefix=m);for(var k=this.iterator+x;y?k>=0:k<b.length;k+=x)for(var T=b[k],O=0;O<=T.length;O++)if(this.initialPrefix==T.substring(0,O))return this.iterator=k,T;if(k>=b.length)return this.iterator=b.length,this.initialPrefix;if(k<0)return m}pushInput(m){var y=this.historyBuffer.indexOf(m);y>-1&&this.historyBuffer.splice(y,1),m.length&&this.historyBuffer.push(m)}reset(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}}var An={matchCommand:function(u,m,y,b){var x=li(u,m,b,y),k=x.full[0];if(!k)return x.partial.length?{type:"partial",expectLiteralNext:x.partial.length==1&&x.partial[0].keys.slice(-11)=="<character>"}:{type:"none"};if(k.keys.slice(-11)=="<character>"||k.keys.slice(-10)=="<register>"){var T=Mr(u);if(!T||T.length>1)return{type:"clear"};y.selectedCharacter=T}return{type:"full",command:k}},processCommand:function(u,m,y){switch(m.inputState.repeatOverride=y.repeatOverride,y.type){case"motion":this.processMotion(u,m,y);break;case"operator":this.processOperator(u,m,y);break;case"operatorMotion":this.processOperatorMotion(u,m,y);break;case"action":this.processAction(u,m,y);break;case"search":this.processSearch(u,m,y);break;case"ex":case"keyToEx":this.processEx(u,m,y);break}},processMotion:function(u,m,y){m.inputState.motion=y.motion,m.inputState.motionArgs=Ft(y.motionArgs),this.evalInput(u,m)},processOperator:function(u,m,y){var b=m.inputState;if(b.operator)if(b.operator==y.operator){b.motion="expandToLine",b.motionArgs={linewise:!0,repeat:1},this.evalInput(u,m);return}else kt(u);b.operator=y.operator,b.operatorArgs=Ft(y.operatorArgs),y.keys.length>1&&(b.operatorShortcut=y.keys),y.exitVisualBlock&&(m.visualBlock=!1,bt(u)),m.visualMode&&this.evalInput(u,m)},processOperatorMotion:function(u,m,y){var b=m.visualMode,x=Ft(y.operatorMotionArgs);x&&b&&x.visualLine&&(m.visualLine=!0),this.processOperator(u,m,y),b||this.processMotion(u,m,y)},processAction:function(u,m,y){var b=m.inputState,x=b.getRepeat(),k=!!x,T=Ft(y.actionArgs)||{repeat:1};b.selectedCharacter&&(T.selectedCharacter=b.selectedCharacter),y.operator&&this.processOperator(u,m,y),y.motion&&this.processMotion(u,m,y),(y.motion||y.operator)&&this.evalInput(u,m),T.repeat=x||1,T.repeatIsExplicit=k,T.registerName=b.registerName,kt(u),m.lastMotion=null,y.isEdit&&this.recordLastEdit(m,b,y),Ht[y.action](u,T,m)},processSearch:function(u,m,y){if(!u.getSearchCursor)return;var b=y.searchArgs.forward,x=y.searchArgs.wholeWordOnly;vn(u).setReversed(!b);var k=b?"/":"?",T=vn(u).getQuery(),O=u.getScrollInfo(),M="";function z(Se,Ie,lt){K.searchHistoryController.pushInput(Se),K.searchHistoryController.reset();try{hr(u,Se,Ie,lt)}catch{Ve(u,"Invalid regex: "+Se),kt(u);return}An.processMotion(u,m,{keys:"",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:y.searchArgs.toJumplist}})}function I(Se){u.scrollTo(O.left,O.top),z(Se,!0,!0);var Ie=K.macroModeState;Ie.isRecording&&Ls(Ie,Se)}function ae(){return be("pcre")?"(JavaScript regexp: set pcre)":"(Vim regexp: set nopcre)"}function ne(Se,Ie,lt){var Xe=tn(Se),Ot,Pt;Xe=="<Up>"||Xe=="<Down>"?(Ot=Xe=="<Up>",Pt=Se.target?Se.target.selectionEnd:0,Ie=K.searchHistoryController.nextMatch(Ie,Ot)||"",lt(Ie),Pt&&Se.target&&(Se.target.selectionEnd=Se.target.selectionStart=Math.min(Pt,Se.target.value.length))):Xe&&Xe!="<Left>"&&Xe!="<Right>"&&K.searchHistoryController.reset(),M=Ie,J()}function J(){var Se;try{Se=hr(u,M,!0,!0)}catch{}Se?u.scrollIntoView(sc(u,!b,Se),30):(di(u),u.scrollTo(O.left,O.top))}function X(Se,Ie,lt){var Xe=tn(Se);Xe=="<Esc>"||Xe=="<C-c>"||Xe=="<C-[>"||Xe=="<BS>"&&Ie==""?(K.searchHistoryController.pushInput(Ie),K.searchHistoryController.reset(),hr(u,(T==null?void 0:T.source)||""),di(u),u.scrollTo(O.left,O.top),e.e_stop(Se),kt(u),lt(),u.focus()):Xe=="<Up>"||Xe=="<Down>"?e.e_stop(Se):Xe=="<C-u>"&&(e.e_stop(Se),lt(""))}switch(y.searchArgs.querySrc){case"prompt":var we=K.macroModeState;we.isPlaying?z(we.replaySearchQueries.shift()||"",!0,!1):Do(u,{onClose:I,prefix:k,desc:tr("span",{$cursor:"pointer",onmousedown:function(Ie){Ie.preventDefault(),Z("pcre",!be("pcre")),this.textContent=ae(),J()}},ae()),onKeyUp:ne,onKeyDown:X});break;case"wordUnderCursor":var _e=Ce(u,{noSymbol:!0}),je=!0;if(_e||(_e=Ce(u,{noSymbol:!1}),je=!1),!_e){Ve(u,"No word under cursor"),kt(u);return}let Se=u.getLine(_e.start.line).substring(_e.start.ch,_e.end.ch);Se=je&&x?"\\b"+Se+"\\b":Ur(Se),K.jumpList.cachedCursor=u.getCursor(),u.setCursor(_e.start),z(Se,!0,!1);break}},processEx:function(u,m,y){function b(O){K.exCommandHistoryController.pushInput(O),K.exCommandHistoryController.reset(),Gt.processCommand(u,O),u.state.vim&&kt(u),di(u)}function x(O,M,z){var I=tn(O),ae,ne;(I=="<Esc>"||I=="<C-c>"||I=="<C-[>"||I=="<BS>"&&M=="")&&(K.exCommandHistoryController.pushInput(M),K.exCommandHistoryController.reset(),e.e_stop(O),kt(u),di(u),z(),u.focus()),I=="<Up>"||I=="<Down>"?(e.e_stop(O),ae=I=="<Up>",ne=O.target?O.target.selectionEnd:0,M=K.exCommandHistoryController.nextMatch(M,ae)||"",z(M),ne&&O.target&&(O.target.selectionEnd=O.target.selectionStart=Math.min(ne,O.target.value.length))):I=="<C-u>"?(e.e_stop(O),z("")):I&&I!="<Left>"&&I!="<Right>"&&K.exCommandHistoryController.reset()}function k(O,M){var z=new e.StringStream(M),I={};try{if(Gt.parseInput_(u,z,I),I.commandName!="s"){di(u);return}var ae=Gt.matchCommand_(I.commandName);if(!ae||(Gt.parseCommandArgs_(z,I,ae),!I.argString))return;var ne=Ro(I.argString.slice(1),!0,!0);ne&&Qr(u,ne)}catch{}}if(y.type=="keyToEx")Gt.processCommand(u,y.exArgs.input);else{var T={onClose:b,onKeyDown:x,onKeyUp:k,prefix:":"};m.visualMode&&(T.value="'<,'>",T.selectValueOnOpen=!1),Do(u,T)}},evalInput:function(u,m){var y=m.inputState,b=y.motion,x=y.motionArgs||{repeat:1},k=y.operator,T=y.operatorArgs||{},O=y.registerName,M=m.sel,z=Ge(m.visualMode?yt(u,M.head):u.getCursor("head")),I=Ge(m.visualMode?yt(u,M.anchor):u.getCursor("anchor")),ae=Ge(z),ne=Ge(I),J,X,we;if(k&&this.recordLastEdit(m,y),we=y.repeatOverride===void 0?y.getRepeat():y.repeatOverride,we>0&&x.explicitRepeat?x.repeatIsExplicit=!0:(x.noRepeat||!x.explicitRepeat&&we===0)&&(we=1,x.repeatIsExplicit=!1),y.selectedCharacter&&(x.selectedCharacter=T.selectedCharacter=y.selectedCharacter),x.repeat=we,kt(u),b){var _e=nn[b](u,z,x,m,y);if(m.lastMotion=nn[b],!_e)return;if(x.toJumplist){var je=K.jumpList,Se=je.cachedCursor;Se?(tt(u,Se,_e),delete je.cachedCursor):tt(u,z,_e)}_e instanceof Array?(X=_e[0],J=_e[1]):J=_e,J||(J=Ge(z)),m.visualMode?(m.visualBlock&&J.ch===1/0||(J=yt(u,J,ae)),X&&(X=yt(u,X)),X||(X=ne),M.anchor=X,M.head=J,bt(u),pr(u,m,"<",st(X,J)?X:J),pr(u,m,">",st(X,J)?J:X)):k||(J=yt(u,J,ae),u.setCursor(J.line,J.ch))}if(k){if(T.lastSel){X=ne;var Ie=T.lastSel,lt=Math.abs(Ie.head.line-Ie.anchor.line),Xe=Math.abs(Ie.head.ch-Ie.anchor.ch);J=Ie.visualLine?new n(ne.line+lt,ne.ch):Ie.visualBlock?new n(ne.line+lt,ne.ch+Xe):Ie.head.line==Ie.anchor.line?new n(ne.line,ne.ch+Xe):new n(ne.line+lt,ne.ch),m.visualMode=!0,m.visualLine=Ie.visualLine,m.visualBlock=Ie.visualBlock,M=m.sel={anchor:X,head:J},bt(u)}else m.visualMode&&(T.lastSel={anchor:Ge(M.anchor),head:Ge(M.head),visualBlock:m.visualBlock,visualLine:m.visualLine});var Ot,Pt,ze,Ke,Jt;if(m.visualMode){Ot=vt(M.head,M.anchor),Pt=On(M.head,M.anchor),ze=m.visualLine||T.linewise,Ke=m.visualBlock?"block":ze?"line":"char";var Xt=i(u,Ot,Pt);if(Jt=jt(u,{anchor:Xt.start,head:Xt.end},Ke),ze){var ln=Jt.ranges;if(Ke=="block")for(var qo=0;qo<ln.length;qo++)ln[qo].head.ch=St(u,ln[qo].head.line);else Ke=="line"&&(ln[0].head=new n(ln[0].head.line+1,0))}}else{if(Ot=Ge(X||ne),Pt=Ge(J||ae),st(Pt,Ot)){var uc=Ot;Ot=Pt,Pt=uc}ze=x.linewise||T.linewise,ze?ee(u,Ot,Pt):x.forward&&q(u,Ot,Pt),Ke="char";var Wi=!x.inclusive||ze,Xt=i(u,Ot,Pt);Jt=jt(u,{anchor:Xt.start,head:Xt.end},Ke,Wi)}u.setSelections(Jt.ranges,Jt.primary),m.lastMotion=null,T.repeat=we,T.registerName=O,T.linewise=ze;var js=Nr[k](u,T,Jt.ranges,ne,J);m.visualMode&&Je(u,js!=null),js&&u.setCursor(js)}},recordLastEdit:function(u,m,y){var b=K.macroModeState;b.isPlaying||(u.lastEditInputState=m,u.lastEditActionCommand=y,b.lastInsertModeChanges.changes=[],b.lastInsertModeChanges.expectCursorActivityForChange=!1,b.lastInsertModeChanges.visualBlock=u.visualBlock?u.sel.head.line-u.sel.anchor.line:0)}},nn={moveToTopLine:function(u,m,y){var b=Ps(u).top+y.repeat-1;return new n(b,ye(u.getLine(b)))},moveToMiddleLine:function(u){var m=Ps(u),y=Math.floor((m.top+m.bottom)*.5);return new n(y,ye(u.getLine(y)))},moveToBottomLine:function(u,m,y){var b=Ps(u).bottom-y.repeat+1;return new n(b,ye(u.getLine(b)))},expandToLine:function(u,m,y){return new n(m.line+y.repeat-1,1/0)},findNext:function(u,m,y){var b=vn(u),x=b.getQuery();if(x){var k=!y.forward;k=b.isReversed()?!k:k,Qr(u,x);var T=sc(u,k,x,y.repeat);return T||Ve(u,"No match found "+x+(be("pcre")?" (set nopcre to use Vim regexps)":"")),T}},findAndSelectNextInclusive:function(u,m,y,b,x){var k=vn(u),T=k.getQuery();if(T){var O=!y.forward;O=k.isReversed()?!O:O;var M=lc(u,O,T,y.repeat,b);if(M){if(x.operator)return M;var z=M[0],I=new n(M[1].line,M[1].ch-1);if(b.visualMode){(b.visualLine||b.visualBlock)&&(b.visualLine=!1,b.visualBlock=!1,e.signal(u,"vim-mode-change",{mode:"visual",subMode:""}));var ae=b.sel.anchor;if(ae)return k.isReversed()?y.forward?[ae,z]:[ae,I]:y.forward?[ae,I]:[ae,z]}else b.visualMode=!0,b.visualLine=!1,b.visualBlock=!1,e.signal(u,"vim-mode-change",{mode:"visual",subMode:""});return O?[I,z]:[z,I]}}},goToMark:function(u,m,y,b){var x=Ra(u,b,y.selectedCharacter||"");return x?y.linewise?{line:x.line,ch:ye(u.getLine(x.line))}:x:null},moveToOtherHighlightedEnd:function(u,m,y,b){var x=b.sel;return b.visualBlock&&y.sameLine?[yt(u,new n(x.anchor.line,x.head.ch)),yt(u,new n(x.head.line,x.anchor.ch))]:[x.head,x.anchor]},jumpToMark:function(u,m,y,b){for(var x=m,k=0;k<y.repeat;k++){var T=x;for(var O in b.marks)if(A(O)){var M=b.marks[O].find();if(!(y.forward?st(M,T):st(T,M))&&!(y.linewise&&M.line==T.line)){var z=Vt(T,x),I=y.forward?Wr(T,M,x):Wr(x,M,T);(z||I)&&(x=M)}}}return y.linewise&&(x=new n(x.line,ye(u.getLine(x.line)))),x},moveByCharacters:function(u,m,y){var b=m,x=y.repeat,k=y.forward?b.ch+x:b.ch-x;return new n(b.line,k)},moveByLines:function(u,m,y,b){var x=m,k=x.ch;switch(b.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:k=b.lastHPos;break;default:b.lastHPos=k}var T=y.repeat+(y.repeatOffset||0),O=y.forward?x.line+T:x.line-T,M=u.firstLine(),z=u.lastLine(),I=u.findPosV(x,y.forward?T:-T,"line",b.lastHSPos);return(y.forward?I.line>O:I.line<O)&&(O=I.line,k=I.ch),O<M&&x.line==M?this.moveToStartOfLine(u,m,y,b):O>z&&x.line==z?$t(u,m,y,b,!0):(y.toFirstChar&&(k=ye(u.getLine(O)),b.lastHPos=k),b.lastHSPos=u.charCoords(new n(O,k),"div").left,new n(O,k))},moveByDisplayLines:function(u,m,y,b){var x=m;switch(b.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:b.lastHSPos=u.charCoords(x,"div").left}var k=y.repeat,T=u.findPosV(x,y.forward?k:-k,"line",b.lastHSPos);if(T.hitSide)if(y.forward){var O={top:u.charCoords(T,"div").top+8,left:b.lastHSPos};T=u.coordsChar(O,"div")}else{var M=u.charCoords(new n(u.firstLine(),0),"div");M.left=b.lastHSPos,T=u.coordsChar(M,"div")}return b.lastHPos=T.ch,T},moveByPage:function(u,m,y){var b=m,x=y.repeat;return u.findPosV(b,y.forward?x:-x,"page")},moveByParagraph:function(u,m,y){var b=y.forward?1:-1;return nc(u,m,y.repeat,b).start},moveBySentence:function(u,m,y){var b=y.forward?1:-1;return Ta(u,m,y.repeat,b)},moveByScroll:function(u,m,y,b){var x=u.getScrollInfo(),k=null,T=y.repeat;T||(T=x.clientHeight/(2*u.defaultTextHeight()));var O=u.charCoords(m,"local");if(y.repeat=T,k=nn.moveByDisplayLines(u,m,y,b),!k)return null;var M=u.charCoords(k,"local");return u.scrollTo(null,x.top+M.top-O.top),k},moveByWords:function(u,m,y){return ht(u,m,y.repeat,!!y.forward,!!y.wordEnd,!!y.bigWord)},moveTillCharacter:function(u,m,y){var b=y.repeat,x=er(u,b,y.forward,y.selectedCharacter,m),k=y.forward?-1:1;return it(k,y),x?(x.ch+=k,x):null},moveToCharacter:function(u,m,y){var b=y.repeat;return it(0,y),er(u,b,y.forward,y.selectedCharacter,m)||m},moveToSymbol:function(u,m,y){var b=y.repeat;return y.selectedCharacter&&He(u,b,y.forward,y.selectedCharacter)||m},moveToColumn:function(u,m,y,b){var x=y.repeat;return b.lastHPos=x-1,b.lastHSPos=u.charCoords(m,"div").left,xs(u,x)},moveToEol:function(u,m,y,b){return $t(u,m,y,b,!1)},moveToFirstNonWhiteSpaceCharacter:function(u,m){var y=m;return new n(y.line,ye(u.getLine(y.line)))},moveToMatchedSymbol:function(u,m){for(var y=m,b=y.line,x=y.ch,k=u.getLine(b),T;x<k.length;x++)if(T=k.charAt(x),T&&G(T)){var O=u.getTokenTypeAt(new n(b,x+1));if(O!=="string"&&O!=="comment")break}if(x<k.length){var M=T==="<"||T===">"?/[(){}[\]<>]/:/[(){}[\]]/;return u.findMatchingBracket(new n(b,x),{bracketRegex:M}).to}else return y},moveToStartOfLine:function(u,m){return new n(m.line,0)},moveToLineOrEdgeOfDocument:function(u,m,y){var b=y.forward?u.lastLine():u.firstLine();return y.repeatIsExplicit&&(b=y.repeat-u.getOption("firstLineNumber")),new n(b,ye(u.getLine(b)))},moveToStartOfDisplayLine:function(u){return u.execCommand("goLineLeft"),u.getCursor()},moveToEndOfDisplayLine:function(u){u.execCommand("goLineRight");var m=u.getCursor();return m.sticky=="before"&&m.ch--,m},textObjectManipulation:function(u,m,y,b){var x={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},k={"'":!0,'"':!0,"`":!0},T=y.selectedCharacter||"";T=="b"?T="(":T=="B"&&(T="{");var O=!y.textObjectInner,M,z;if(x[T]){if(z=!0,M=mr(u,m,T,O),!M){var I=u.getSearchCursor(RegExp("\\"+T,"g"),m);I.find()&&(M=mr(u,I.from(),T,O))}}else if(k[T])z=!0,M=ks(u,m,T,O);else if(T==="W"||T==="w")for(var ae=y.repeat||1;ae-- >0;){var ne=Ce(u,{inclusive:O,innerWord:!O,bigWord:T==="W",noSymbol:T==="W",multiline:!0},M&&M.end);ne&&(M||(M=ne),M.end=ne.end)}else if(T==="p")if(M=nc(u,m,y.repeat,0,O),y.linewise=!0,b.visualMode)b.visualLine||(b.visualLine=!0);else{var J=b.inputState.operatorArgs;J&&(J.linewise=!0),M.end.line--}else if(T==="t")M=ft(u,m,O);else if(T==="s"){var X=u.getLine(m.line);m.ch>0&&V(X[m.ch])&&--m.ch;var we=Eo(u,m,y.repeat,1,O),_e=Eo(u,m,y.repeat,-1,O);j(u.getLine(_e.line)[_e.ch])&&j(u.getLine(we.line)[we.ch-1])&&(_e={line:_e.line,ch:_e.ch+1}),M={start:_e,end:we}}return M?u.state.vim.visualMode?Pn(u,M.start,M.end,z):[M.start,M.end]:null},repeatLastCharacterSearch:function(u,m,y){var b=K.lastCharacterSearch,x=y.repeat,k=y.forward===b.forward,T=(b.increment?1:0)*(k?-1:1);u.moveH(-T,"char"),y.inclusive=!!k;var O=er(u,x,k,b.selectedCharacter);return O?(O.ch+=T,O):(u.moveH(T,"char"),m)}};function Fi(u,m){nn[u]=m}function $r(u,m){for(var y=[],b=0;b<m;b++)y.push(u);return y}var Nr={change:function(u,m,y){var b,x,k=u.state.vim,T=y[0].anchor,O=y[0].head;if(k.visualMode)if(m.fullLine)O.ch=Number.MAX_VALUE,O.line--,u.setSelection(T,O),x=u.getSelection(),u.replaceSelection(""),b=T;else{x=u.getSelection();var M=$r("",y.length);u.replaceSelections(M),b=vt(y[0].head,y[0].anchor)}else{x=u.getRange(T,O);var z=k.lastEditInputState;if((z==null?void 0:z.motion)=="moveByWords"&&!j(x)){var I=/\s+$/.exec(x);I&&z.motionArgs&&z.motionArgs.forward&&(O=Ct(O,0,-I[0].length),x=x.slice(0,-I[0].length))}m.linewise&&(T=new n(T.line,ye(u.getLine(T.line))),O.line>T.line&&(O=new n(O.line-1,Number.MAX_VALUE))),u.replaceRange("",T,O),b=T}K.registerController.pushText(m.registerName,"change",x,m.linewise,y.length>1),Ht.enterInsertMode(u,{head:b},u.state.vim)},delete:function(u,m,y){var b,x,k=u.state.vim;if(k.visualBlock){x=u.getSelection();var T=$r("",y.length);u.replaceSelections(T),b=vt(y[0].head,y[0].anchor)}else{var O=y[0].anchor,M=y[0].head;m.linewise&&M.line!=u.firstLine()&&O.line==u.lastLine()&&O.line==M.line-1&&(O.line==u.firstLine()?O.ch=0:O=new n(O.line-1,St(u,O.line-1))),x=u.getRange(O,M),u.replaceRange("",O,M),b=O,m.linewise&&(b=nn.moveToFirstNonWhiteSpaceCharacter(u,O))}return K.registerController.pushText(m.registerName,"delete",x,m.linewise,k.visualBlock),yt(u,b)},indent:function(u,m,y){var b=u.state.vim,x=b.visualMode&&m.repeat||1;if(b.visualBlock){for(var k=u.getOption("tabSize"),T=u.getOption("indentWithTabs")?" ":" ".repeat(k),O,M=y.length-1;M>=0;M--)if(O=vt(y[M].anchor,y[M].head),m.indentRight)u.replaceRange(T.repeat(x),O,O);else{for(var z=u.getLine(O.line),I=0,ae=0;ae<x;ae++){var ne=z[O.ch+I];if(ne==" ")I++;else if(ne==" "){I++;for(var J=1;J<T.length&&(ne=z[O.ch+I],ne===" ");J++)I++}else break}u.replaceRange("",O,Ct(O,0,I))}return O}else if(u.indentMore)for(var ae=0;ae<x;ae++)m.indentRight?u.indentMore():u.indentLess();else{var X=y[0].anchor.line,we=b.visualBlock?y[y.length-1].anchor.line:y[0].head.line;m.linewise&&we--;for(var M=X;M<=we;M++)for(var ae=0;ae<x;ae++)u.indentLine(M,m.indentRight)}return nn.moveToFirstNonWhiteSpaceCharacter(u,y[0].anchor)},indentAuto:function(u,m,y){return u.execCommand("indentAuto"),nn.moveToFirstNonWhiteSpaceCharacter(u,y[0].anchor)},hardWrap:function(u,m,y,b){if(u.hardWrap){var x=y[0].anchor.line,k=y[0].head.line;m.linewise&&k--;var T=u.hardWrap({from:x,to:k});return T>x&&m.linewise&&T--,m.keepCursor?b:new n(T,0)}},changeCase:function(u,m,y,b,x){for(var k=u.getSelections(),T=[],O=m.toLower,M=0;M<k.length;M++){var z=k[M],I="";if(O===!0)I=z.toLowerCase();else if(O===!1)I=z.toUpperCase();else for(var ae=0;ae<z.length;ae++){var ne=z.charAt(ae);I+=N(ne)?ne.toLowerCase():ne.toUpperCase()}T.push(I)}return u.replaceSelections(T),m.shouldMoveCursor?x:!u.state.vim.visualMode&&m.linewise&&y[0].anchor.line+1==y[0].head.line?nn.moveToFirstNonWhiteSpaceCharacter(u,b):m.linewise?b:vt(y[0].anchor,y[0].head)},yank:function(u,m,y,b){var x=u.state.vim,k=u.getSelection(),T=x.visualMode?vt(x.sel.anchor,x.sel.head,y[0].head,y[0].anchor):b;return K.registerController.pushText(m.registerName,"yank",k,m.linewise,x.visualBlock),T},rot13:function(u,m,y,b,x){for(var k=u.getSelections(),T=[],O=0;O<k.length;O++){let M=k[O].split("").map(z=>{let I=z.charCodeAt(0);return I>=65&&I<=90?String.fromCharCode(65+(I-65+13)%26):I>=97&&I<=122?String.fromCharCode(97+(I-97+13)%26):z}).join("");T.push(M)}return u.replaceSelections(T),m.shouldMoveCursor?x:!u.state.vim.visualMode&&m.linewise&&y[0].anchor.line+1==y[0].head.line?nn.moveToFirstNonWhiteSpaceCharacter(u,b):m.linewise?b:vt(y[0].anchor,y[0].head)}};function si(u,m){Nr[u]=m}var Ht={jumpListWalk:function(u,m,y){if(!y.visualMode){var b=m.repeat||1,x=m.forward,k=K.jumpList.move(u,x?b:-b),T=k?k.find():void 0;T||(T=u.getCursor()),u.setCursor(T)}},scroll:function(u,m,y){if(!y.visualMode){var b=m.repeat||1,x=u.defaultTextHeight(),k=u.getScrollInfo().top,T=x*b,O=m.forward?k+T:k-T,M=Ge(u.getCursor()),z=u.charCoords(M,"local");if(m.forward)O>z.top?(M.line+=(O-z.top)/x,M.line=Math.ceil(M.line),u.setCursor(M),z=u.charCoords(M,"local"),u.scrollTo(null,z.top)):u.scrollTo(null,O);else{var I=O+u.getScrollInfo().clientHeight;I<z.bottom?(M.line-=(z.bottom-I)/x,M.line=Math.floor(M.line),u.setCursor(M),z=u.charCoords(M,"local"),u.scrollTo(null,z.bottom-u.getScrollInfo().clientHeight)):u.scrollTo(null,O)}}},scrollToCursor:function(u,m){var y=u.getCursor().line,b=u.charCoords(new n(y,0),"local"),x=u.getScrollInfo().clientHeight,k=b.top;switch(m.position){case"center":k=b.bottom-x/2;break;case"bottom":var T=new n(y,u.getLine(y).length-1),O=u.charCoords(T,"local").bottom-k;k=k-x+O;break}u.scrollTo(null,k)},replayMacro:function(u,m,y){var b=m.selectedCharacter||"",x=m.repeat||1,k=K.macroModeState;for(b=="@"?b=k.latestRegister||"":k.latestRegister=b;x--;)Ms(u,y,k,b)},enterMacroRecordMode:function(u,m){var y=K.macroModeState,b=m.selectedCharacter;K.registerController.isValidRegister(b)&&y.enterMacroRecordMode(u,b)},toggleOverwrite:function(u){u.state.overwrite?(u.toggleOverwrite(!1),u.setOption("keyMap","vim-insert"),e.signal(u,"vim-mode-change",{mode:"insert"})):(u.toggleOverwrite(!0),u.setOption("keyMap","vim-replace"),e.signal(u,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(u,m,y){if(!u.getOption("readOnly")){y.insertMode=!0,y.insertModeRepeat=m&&m.repeat||1;var b=m?m.insertAt:null,x=y.sel,k=m.head||u.getCursor("head"),T=u.listSelections().length;if(b=="eol")k=new n(k.line,St(u,k.line));else if(b=="bol")k=new n(k.line,0);else if(b=="charAfter"){var O=i(u,k,Ct(k,0,1));k=O.end}else if(b=="firstNonBlank"){var O=i(u,k,nn.moveToFirstNonWhiteSpaceCharacter(u,k));k=O.end}else if(b=="startOfSelectedArea"){if(!y.visualMode)return;y.visualBlock?(k=new n(Math.min(x.head.line,x.anchor.line),Math.min(x.head.ch,x.anchor.ch)),T=Math.abs(x.head.line-x.anchor.line)+1):k=x.head.line<x.anchor.line?x.head:new n(x.anchor.line,0)}else if(b=="endOfSelectedArea"){if(!y.visualMode)return;y.visualBlock?(k=new n(Math.min(x.head.line,x.anchor.line),Math.max(x.head.ch,x.anchor.ch)+1),T=Math.abs(x.head.line-x.anchor.line)+1):k=x.head.line>=x.anchor.line?Ct(x.head,0,1):new n(x.anchor.line,0)}else if(b=="inplace"){if(y.visualMode)return}else b=="lastEdit"&&(k=Oo(u)||k);u.setOption("disableInput",!1),m&&m.replace?(u.toggleOverwrite(!0),u.setOption("keyMap","vim-replace"),e.signal(u,"vim-mode-change",{mode:"replace"})):(u.toggleOverwrite(!1),u.setOption("keyMap","vim-insert"),e.signal(u,"vim-mode-change",{mode:"insert"})),K.macroModeState.isPlaying||(u.on("change",Lo),y.insertEnd&&y.insertEnd.clear(),y.insertEnd=u.setBookmark(k,{insertLeft:!0}),e.on(u.getInputField(),"keydown",Io)),y.visualMode&&Je(u),Bn(u,k,T)}},toggleVisualMode:function(u,m,y){var b=m.repeat,x=u.getCursor(),k;if(y.visualMode)y.visualLine!=!!m.linewise||y.visualBlock!=!!m.blockwise?(y.visualLine=!!m.linewise,y.visualBlock=!!m.blockwise,e.signal(u,"vim-mode-change",{mode:"visual",subMode:y.visualLine?"linewise":y.visualBlock?"blockwise":""}),bt(u)):Je(u);else{y.visualMode=!0,y.visualLine=!!m.linewise,y.visualBlock=!!m.blockwise,k=yt(u,new n(x.line,x.ch+b-1));var T=i(u,x,k);y.sel={anchor:T.start,head:T.end},e.signal(u,"vim-mode-change",{mode:"visual",subMode:y.visualLine?"linewise":y.visualBlock?"blockwise":""}),bt(u),pr(u,y,"<",vt(x,k)),pr(u,y,">",On(x,k))}},reselectLastSelection:function(u,m,y){var b=y.lastSelection;if(y.visualMode&&Zn(u,y),b){var x=b.anchorMark.find(),k=b.headMark.find();if(!x||!k)return;y.sel={anchor:x,head:k},y.visualMode=!0,y.visualLine=b.visualLine,y.visualBlock=b.visualBlock,bt(u),pr(u,y,"<",vt(x,k)),pr(u,y,">",On(x,k)),e.signal(u,"vim-mode-change",{mode:"visual",subMode:y.visualLine?"linewise":y.visualBlock?"blockwise":""})}},joinLines:function(u,m,y){var b,x;if(y.visualMode){if(b=u.getCursor("anchor"),x=u.getCursor("head"),st(x,b)){var k=x;x=b,b=k}x.ch=St(u,x.line)-1}else{var T=Math.max(m.repeat,2);b=u.getCursor(),x=yt(u,new n(b.line+T-1,1/0))}for(var O=0,M=b.line;M<x.line;M++){O=St(u,b.line);var z="",I=0;if(!m.keepSpaces){var ae=u.getLine(b.line+1);I=ae.search(/\S/),I==-1?I=ae.length:z=" "}u.replaceRange(z,new n(b.line,O),new n(b.line+1,I))}var ne=yt(u,new n(b.line,O));y.visualMode&&Je(u,!1),u.setCursor(ne)},newLineAndEnterInsertMode:function(u,m,y){y.insertMode=!0;var b=Ge(u.getCursor());b.line===u.firstLine()&&!m.after?(u.replaceRange(`
45
+ `,new n(u.firstLine(),0)),u.setCursor(u.firstLine(),0)):(b.line=m.after?b.line:b.line-1,b.ch=St(u,b.line),u.setCursor(b),(e.commands.newlineAndIndentContinueComment||e.commands.newlineAndIndent)(u)),this.enterInsertMode(u,{repeat:m.repeat},y)},paste:function(u,m,y){var b=K.registerController.getRegister(m.registerName);if(m.registerName==="+")navigator.clipboard.readText().then(k=>{this.continuePaste(u,m,y,k,b)});else{var x=b.toString();this.continuePaste(u,m,y,x,b)}},continuePaste:function(u,m,y,b,x){var k=Ge(u.getCursor());if(b){if(m.matchIndent){var T=u.getOption("tabSize"),O=function(Jt){var Xt=Jt.split(" ").length-1,ln=Jt.split(" ").length-1;return Xt*T+ln*1},M=O(u.getLine(u.getCursor().line).match(/^\s*/)[0]),z=b.replace(/\n$/,""),I=b!==z,ae=O(b.match(/^\s*/)[0]),b=z.replace(/^\s*/gm,function(Jt){var Xt=M+(O(Jt)-ae);if(Xt<0)return"";if(u.getOption("indentWithTabs")){var ln=Math.floor(Xt/T);return Array(ln+1).join(" ")}else return Array(Xt+1).join(" ")});b+=I?`
46
+ `:""}m.repeat>1&&(b=Array(m.repeat+1).join(b));var ne=x.linewise,J=x.blockwise,X=J?b.split(`
47
+ `):void 0;if(X){ne&&X.pop();for(var we=0;we<X.length;we++)X[we]=X[we]==""?" ":X[we];k.ch+=m.after?1:0,k.ch=Math.min(St(u,k.line),k.ch)}else ne?y.visualMode?b=y.visualLine?b.slice(0,-1):`
48
+ `+b.slice(0,b.length-1)+`
49
+ `:m.after?(b=`
50
+ `+b.slice(0,b.length-1),k.ch=St(u,k.line)):k.ch=0:k.ch+=m.after?1:0;var _e;if(y.visualMode){y.lastPastedText=b;var je,Se=ui(u),Ie=Se[0],lt=Se[1],Xe=u.getSelection(),Ot=u.listSelections(),Pt=Array(Ot.length).join("1").split("1");y.lastSelection&&(je=y.lastSelection.headMark.find()),K.registerController.unnamedRegister.setText(Xe),J?(u.replaceSelections(Pt),lt=new n(Ie.line+b.length-1,Ie.ch),u.setCursor(Ie),In(u,lt),u.replaceSelections(b),_e=Ie):y.visualBlock?(u.replaceSelections(Pt),u.setCursor(Ie),u.replaceRange(b,Ie,Ie),_e=Ie):(u.replaceRange(b,Ie,lt),_e=u.posFromIndex(u.indexFromPos(Ie)+b.length-1)),je&&(y.lastSelection.headMark=u.setBookmark(je)),ne&&(_e.ch=0)}else if(J&&X){u.setCursor(k);for(var we=0;we<X.length;we++){var ze=k.line+we;ze>u.lastLine()&&u.replaceRange(`
51
+ `,new n(ze,0)),St(u,ze)<k.ch&&ci(u,ze,k.ch)}u.setCursor(k),In(u,new n(k.line+X.length-1,k.ch)),u.replaceSelections(X),_e=k}else if(u.replaceRange(b,k),ne){var ze=m.after?k.line+1:k.line;_e=new n(ze,ye(u.getLine(ze)))}else _e=Ge(k),/\n/.test(b)||(_e.ch+=b.length-(m.after?1:0));y.visualMode&&Je(u,!1),u.setCursor(_e)}},undo:function(u,m){u.operation(function(){fr(u,e.commands.undo,m.repeat)(),u.setCursor(yt(u,u.getCursor("start")))})},redo:function(u,m){fr(u,e.commands.redo,m.repeat)()},setRegister:function(u,m,y){y.inputState.registerName=m.selectedCharacter},insertRegister:function(u,m,y){var b=m.selectedCharacter,x=K.registerController.getRegister(b),k=x&&x.toString();k&&u.replaceSelection(k)},oneNormalCommand:function(u,m,y){Lr(u,!0),y.insertModeReturn=!0,e.on(u,"vim-command-done",function b(){y.visualMode||(y.insertModeReturn&&(y.insertModeReturn=!1,y.insertMode||Ht.enterInsertMode(u,{},y)),e.off(u,"vim-command-done",b))})},setMark:function(u,m,y){var b=m.selectedCharacter;b&&pr(u,y,b,u.getCursor())},replace:function(u,m,y){var b=m.selectedCharacter||"",x=u.getCursor(),k,T,O=u.listSelections();if(y.visualMode)x=u.getCursor("start"),T=u.getCursor("end");else{var M=u.getLine(x.line);k=x.ch+m.repeat,k>M.length&&(k=M.length),T=new n(x.line,k)}var z=i(u,x,T);if(x=z.start,T=z.end,b==`
52
+ `)y.visualMode||u.replaceRange("",x,T),(e.commands.newlineAndIndentContinueComment||e.commands.newlineAndIndent)(u);else{var I=u.getRange(x,T);if(I=I.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,b),I=I.replace(/[^\n]/g,b),y.visualBlock){var ae=Array(u.getOption("tabSize")+1).join(" ");I=u.getSelection(),I=I.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,b);var ne=I.replace(/\t/g,ae).replace(/[^\n]/g,b).split(`
53
+ `);u.replaceSelections(ne)}else u.replaceRange(I,x,T);y.visualMode?(x=st(O[0].anchor,O[0].head)?O[0].anchor:O[0].head,u.setCursor(x),Je(u,!1)):u.setCursor(Ct(T,0,-1))}},incrementNumberToken:function(u,m){for(var y=u.getCursor(),b=u.getLine(y.line),x=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,k,T,O,M;(k=x.exec(b))!==null&&(T=k.index,O=T+k[0].length,!(y.ch<O)););if(!(!m.backtrack&&O<=y.ch)){if(k){var z=k[2]||k[4],I=k[3]||k[5],ae=m.increase?1:-1,ne={"0b":2,0:8,"":10,"0x":16}[z.toLowerCase()];M=(parseInt(k[1]+I,ne)+ae*m.repeat).toString(ne);var J=z?Array(I.length-M.length+1+k[1].length).join("0"):"";M=M.charAt(0)==="-"?"-"+z+J+M.substr(1):z+J+M;var X=new n(y.line,T),we=new n(y.line,O);u.replaceRange(M,X,we)}else return;u.setCursor(new n(y.line,T+M.length-1))}},repeatLastEdit:function(u,m,y){var b=y.lastEditInputState;if(b){var x=m.repeat;x&&m.repeatIsExplicit?b.repeatOverride=x:x=b.repeatOverride||x,Is(u,y,x,!1)}},indent:function(u,m){u.indentLine(u.getCursor().line,m.indentRight)},exitInsertMode:function(u,m){Lr(u)}};function Qt(u,m){Ht[u]=m}function yt(u,m,y){var b=u.state.vim,x=b.insertMode||b.visualMode,k=Math.min(Math.max(u.firstLine(),m.line),u.lastLine()),T=u.getLine(k),O=T.length-1+ +!!x,M=Math.min(Math.max(0,m.ch),O),z=T.charCodeAt(M);if(56320<=z&&z<=57343){var I=1;y&&y.line==k&&y.ch>M&&(I=-1),M+=I,M>O&&(M-=2)}return new n(k,M)}function Ft(u){var m={};for(var y in u)Object.prototype.hasOwnProperty.call(u,y)&&(m[y]=u[y]);return m}function Ct(u,m,y){return typeof m=="object"&&(y=m.ch,m=m.line),new n(u.line+m,u.ch+y)}function li(u,m,y,b){b.operator&&(y="operatorPending");for(var x,k=[],T=[],O=De?m.length-c:0;O<m.length;O++){var M=m[O];y=="insert"&&M.context!="insert"||M.context&&M.context!=y||b.operator&&M.type=="action"||!(x=Bi(u,M.keys))||(x=="partial"&&k.push(M),x=="full"&&T.push(M))}return{partial:k,full:T}}function Bi(u,m){let y=m.slice(-11)=="<character>",b=m.slice(-10)=="<register>";if(y||b){var x=m.length-(y?11:10),k=u.slice(0,x),T=m.slice(0,x);return k==T&&u.length>x?"full":T.indexOf(k)==0?"partial":!1}else return u==m?"full":m.indexOf(u)==0?"partial":!1}function Mr(u){var m=/^.*(<[^>]+>)$/.exec(u),y=m?m[1]:u.slice(-1);if(y.length>1)switch(y){case"<CR>":case"<S-CR>":y=`
54
+ `;break;case"<Space>":case"<S-Space>":y=" ";break;default:y="";break}return y}function fr(u,m,y){return function(){for(var b=0;b<y;b++)m(u)}}function Ge(u){return new n(u.line,u.ch)}function Vt(u,m){return u.ch==m.ch&&u.line==m.line}function st(u,m){return u.line<m.line||u.line==m.line&&u.ch<m.ch}function vt(u,m){return arguments.length>2&&(m=vt.apply(void 0,Array.prototype.slice.call(arguments,1))),st(u,m)?u:m}function On(u,m){return arguments.length>2&&(m=On.apply(void 0,Array.prototype.slice.call(arguments,1))),st(u,m)?m:u}function Wr(u,m,y){var b=st(u,m),x=st(m,y);return b&&x}function St(u,m){return u.getLine(m).length}function Yn(u){return u.trim?u.trim():u.replace(/^\s+|\s+$/g,"")}function Ur(u){return u.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function ci(u,m,y){var b=St(u,m),x=Array(y-b+1).join(" ");u.setCursor(new n(m,b)),u.replaceRange(x,u.getCursor())}function In(u,m){var y=[],b=u.listSelections(),x=Ge(u.clipPos(m)),k=!Vt(m,x),T=Kr(b,u.getCursor("head")),O=Vt(b[T].head,b[T].anchor),M=b.length-1,z=M-T>T?M:0,I=b[z].anchor,ae=Math.min(I.line,x.line),ne=Math.max(I.line,x.line),J=I.ch,X=x.ch,we=b[z].head.ch-J,_e=X-J;we>0&&_e<=0?(J++,k||X--):we<0&&_e>=0?(J--,O||X++):we<0&&_e==-1&&(J--,X++);for(var je=ae;je<=ne;je++){var Se={anchor:new n(je,J),head:new n(je,X)};y.push(Se)}return u.setSelections(y),m.ch=X,I.ch=J,I}function Bn(u,m,y){for(var b=[],x=0;x<y;x++){var k=Ct(m,x,0);b.push({anchor:k,head:k})}u.setSelections(b,0)}function Kr(u,m,y){for(var b=0;b<u.length;b++){var x=Vt(u[b].anchor,m),k=Vt(u[b].head,m);if(x||k)return b}return-1}function ui(u,m){var y=u.listSelections(),b=y[0],x=y[y.length-1];return[st(b.anchor,b.head)?b.anchor:b.head,st(x.anchor,x.head)?x.head:x.anchor]}function Zn(u,m){var y=m.sel.anchor,b=m.sel.head;m.lastPastedText&&(m.lastPastedText=(b=u.posFromIndex(u.indexFromPos(y)+m.lastPastedText.length),void 0)),m.lastSelection={anchorMark:u.setBookmark(y),headMark:u.setBookmark(b),anchor:Ge(y),head:Ge(b),visualMode:m.visualMode,visualLine:m.visualLine,visualBlock:m.visualBlock}}function Pn(u,m,y,b){var x=u.state.vim.sel,k=b?m:x.head,T=b?m:x.anchor,O;return st(y,m)&&(O=y,y=m,m=O),st(k,T)?(k=vt(m,k),T=On(T,y)):(T=vt(m,T),k=On(k,y),k=Ct(k,0,-1),k.ch==-1&&k.line!=u.firstLine()&&(k=new n(k.line-1,St(u,k.line-1)))),[T,k]}function bt(u,m,y){var b=u.state.vim;m||(m=b.sel),y||(y=b.visualLine?"line":b.visualBlock?"block":"char");var x=jt(u,m,y);u.setSelections(x.ranges,x.primary)}function jt(u,m,y,b){var x=Ge(m.head),k=Ge(m.anchor);if(y=="char"){var T=!b&&!st(m.head,m.anchor)?1:0,O=st(m.head,m.anchor)?1:0;return x=Ct(m.head,0,T),k=Ct(m.anchor,0,O),{ranges:[{anchor:k,head:x}],primary:0}}else if(y=="line"){if(st(m.head,m.anchor))x.ch=0,k.ch=St(u,k.line);else{k.ch=0;var M=u.lastLine();x.line>M&&(x.line=M),x.ch=St(u,x.line)}return{ranges:[{anchor:k,head:x}],primary:0}}else if(y=="block"){var z=Math.min(k.line,x.line),I=k.ch,ae=Math.max(k.line,x.line),ne=x.ch;I<ne?ne+=1:I+=1;for(var J=ae-z+1,X=x.line==z?0:J-1,we=[],_e=0;_e<J;_e++)we.push({anchor:new n(z+_e,I),head:new n(z+_e,ne)});return{ranges:we,primary:X}}throw"never happens"}function P(u){var m=u.getCursor("head");return u.getSelection().length==1&&(m=vt(m,u.getCursor("anchor"))),m}function Je(u,m){var y=u.state.vim;m!==!1&&u.setCursor(yt(u,y.sel.head)),Zn(u,y),y.visualMode=!1,y.visualLine=!1,y.visualBlock=!1,y.insertMode||e.signal(u,"vim-mode-change",{mode:"normal"})}function q(u,m,y){var b=u.getRange(m,y);if(/\n\s*$/.test(b)){var x=b.split(`
55
+ `);x.pop();for(var k=x.pop();x.length>0&&k&&j(k);k=x.pop())y.line--,y.ch=0;k?(y.line--,y.ch=St(u,y.line)):y.ch=0}}function ee(u,m,y){m.ch=0,y.ch=0,y.line++}function ye(u){if(!u)return 0;var m=u.search(/\S/);return m==-1?u.length:m}function Ce(u,{inclusive:m,innerWord:y,bigWord:b,noSymbol:x,multiline:k},T){var O=T||P(u),M=u.getLine(O.line),z=M,I=O.line,ae=I,ne=O.ch,J,X=x?C[0]:E[0];if(y&&/\s/.test(M.charAt(ne)))X=function(lt){return/\s/.test(lt)};else{for(;!X(M.charAt(ne));)if(ne++,ne>=M.length){if(!k)return null;ne--,J=ot(u,O,!0,b,!0);break}b?X=E[0]:(X=C[0],X(M.charAt(ne))||(X=C[1]))}for(var we=ne,_e=ne;X(M.charAt(_e))&&_e>=0;)_e--;if(_e++,J)we=J.to,ae=J.line,z=u.getLine(ae),!z&&we==0&&we++;else for(;X(M.charAt(we))&&we<M.length;)we++;if(m){var je=we,Se=O.ch<=_e&&/\s/.test(M.charAt(O.ch));if(!Se)for(;/\s/.test(z.charAt(we))&&we<z.length;)we++;if(je==we||Se){for(var Ie=_e;/\s/.test(M.charAt(_e-1))&&_e>0;)_e--;!_e&&!Se&&(_e=Ie)}}return{start:new n(I,_e),end:new n(ae,we)}}function ft(u,m,y){var b=m;if(!e.findMatchingTag||!e.findEnclosingTag)return{start:b,end:b};var x=e.findMatchingTag(u,m)||e.findEnclosingTag(u,m);return!x||!x.open||!x.close?{start:b,end:b}:y?{start:x.open.from,end:x.close.to}:{start:x.open.to,end:x.close.from}}function tt(u,m,y){Vt(m,y)||K.jumpList.add(u,m,y)}function it(u,m){K.lastCharacterSearch.increment=u,K.lastCharacterSearch.forward=m.forward,K.lastCharacterSearch.selectedCharacter=m.selectedCharacter}var wt={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},$e={bracket:{isComplete:function(u){if(u.nextCh===u.symb){if(u.depth++,u.depth>=1)return!0}else u.nextCh===u.reverseSymb&&u.depth--;return!1}},section:{init:function(u){u.curMoveThrough=!0,u.symb=(u.forward?"]":"[")===u.symb?"{":"}"},isComplete:function(u){return u.index===0&&u.nextCh===u.symb}},comment:{isComplete:function(u){var m=u.lastCh==="*"&&u.nextCh==="/";return u.lastCh=u.nextCh,m}},method:{init:function(u){u.symb=u.symb==="m"?"{":"}",u.reverseSymb=u.symb==="{"?"}":"{"},isComplete:function(u){return u.nextCh===u.symb}},preprocess:{init:function(u){u.index=0},isComplete:function(u){var y;if(u.nextCh==="#"){var m=(y=u.lineText.match(/^#(\w+)/))==null?void 0:y[1];if(m==="endif"){if(u.forward&&u.depth===0)return!0;u.depth++}else if(m==="if"){if(!u.forward&&u.depth===0)return!0;u.depth--}if(m==="else"&&u.depth===0)return!0}return!1}}};function He(u,m,y,b){var x=Ge(u.getCursor()),k=y?1:-1,T=y?u.lineCount():-1,O=x.ch,M=x.line,z=u.getLine(M),I={lineText:z,nextCh:z.charAt(O),lastCh:null,index:O,symb:b,reverseSymb:(y?{")":"(","}":"{"}:{"(":")","{":"}"})[b],forward:y,depth:0,curMoveThrough:!1},ae=wt[b];if(!ae)return x;var ne=$e[ae].init,J=$e[ae].isComplete;for(ne&&ne(I);M!==T&&m;){if(I.index+=k,I.nextCh=I.lineText.charAt(I.index),!I.nextCh){if(M+=k,I.lineText=u.getLine(M)||"",k>0)I.index=0;else{var X=I.lineText.length;I.index=X>0?X-1:0}I.nextCh=I.lineText.charAt(I.index)}J(I)&&(x.line=M,x.ch=I.index,m--)}return I.nextCh||I.curMoveThrough?new n(M,I.index):x}function ot(u,m,y,b,x){var k=m.line,T=m.ch,O=u.getLine(k),M=y?1:-1,z=b?E:C;if(x&&O==""){if(k+=M,O=u.getLine(k),!U(u,k))return null;T=y?0:O.length}for(;;){if(x&&O=="")return{from:0,to:0,line:k};for(var I=M>0?O.length:-1,ae=I,ne=I;T!=I;){for(var J=!1,X=0;X<z.length&&!J;++X)if(z[X](O.charAt(T))){for(ae=T;T!=I&&z[X](O.charAt(T));)T+=M;if(ne=T,J=ae!=ne,ae==m.ch&&k==m.line&&ne==ae+M)continue;return{from:Math.min(ae,ne+1),to:Math.max(ae,ne),line:k}}J||(T+=M)}if(k+=M,!U(u,k))return null;O=u.getLine(k),T=M>0?0:O.length}}function ht(u,m,y,b,x,k){var T=Ge(m),O=[];(b&&!x||!b&&x)&&y++;for(var M=!(b&&x),z=0;z<y;z++){var I=ot(u,m,b,k,M);if(!I){var ae=St(u,u.lastLine());O.push(b?{line:u.lastLine(),from:ae,to:ae}:{line:0,from:0,to:0});break}O.push(I),m=new n(I.line,b?I.to-1:I.from)}var ne=O.length!=y,J=O[0],X=O.pop();return b&&!x?(!ne&&(J.from!=T.ch||J.line!=T.line)&&(X=O.pop()),X&&new n(X.line,X.from)):b&&x?X&&new n(X.line,X.to-1):!b&&x?(!ne&&(J.to!=T.ch||J.line!=T.line)&&(X=O.pop()),X&&new n(X.line,X.to)):X&&new n(X.line,X.from)}function $t(u,m,y,b,x){var k=new n(m.line+y.repeat-1,1/0),T=u.clipPos(k);return T.ch--,x||(b.lastHPos=1/0,b.lastHSPos=u.charCoords(T,"div").left),k}function er(u,m,y,b,x){if(b){for(var k=x||u.getCursor(),T=k.ch,O,M=0;M<m;M++){var z=u.getLine(k.line);if(O=tc(T,z,b,y),O==-1)return;T=O}if(O!=null)return new n(u.getCursor().line,O)}}function xs(u,m){var y=u.getCursor().line;return yt(u,new n(y,m-1))}function pr(u,m,y,b){!de(y,R)&&!H.test(y)||(m.marks[y]&&m.marks[y].clear(),m.marks[y]=u.setBookmark(b))}function tc(u,m,y,b,x){return b?m.indexOf(y,u+1):m.lastIndexOf(y,u-1)}function nc(u,m,y,b,x){var k=m.line,T=u.firstLine(),O=u.lastLine(),M,z,I=k;function ae(_e){return!u.getLine(_e)}function ne(_e,je,Se){return Se?ae(_e)!=ae(_e+je):!ae(_e)&&ae(_e+je)}if(b){for(;T<=I&&I<=O&&y>0;)ne(I,b)&&y--,I+=b;return{start:new n(I,0),end:m}}var J=u.state.vim;if(J.visualLine&&ne(k,1,!0)){var X=J.sel.anchor;ne(X.line,-1,!0)&&(!x||X.line!=k)&&(k+=1)}var we=ae(k);for(I=k;I<=O&&y;I++)ne(I,1,!0)&&(!x||ae(I)!=we)&&y--;for(z=new n(I,0),I>O&&!we?we=!0:x=!1,I=k;I>T&&!((!x||ae(I)==we||I==k)&&ne(I,-1,!0));I--);return M=new n(I,0),{start:M,end:z}}function Eo(u,m,y,b,x){function k(z){z.line!==null&&(z.pos+z.dir<0||z.pos+z.dir>=z.line.length?z.line=null:z.pos+=z.dir)}function T(z,I,ae,ne){var J={line:z.getLine(I),ln:I,pos:ae,dir:ne};if(J.line==="")return{ln:J.ln,pos:J.pos};var X=J.pos;for(k(J);J.line!==null;){if(X=J.pos,V(J.line[J.pos]))if(x){for(k(J);J.line!==null&&j(J.line[J.pos]);)X=J.pos,k(J);return{ln:J.ln,pos:X+1}}else return{ln:J.ln,pos:J.pos+1};k(J)}return{ln:J.ln,pos:X+1}}function O(z,I,ae,ne){var J=z.getLine(I),X={line:J,ln:I,pos:ae,dir:ne};if(X.line==="")return{ln:X.ln,pos:X.pos};var we=X.pos;for(k(X);X.line!==null;){if(!j(X.line[X.pos])&&!V(X.line[X.pos]))we=X.pos;else if(V(X.line[X.pos]))return x&&j(X.line[X.pos+1])?{ln:X.ln,pos:X.pos+1}:{ln:X.ln,pos:we};k(X)}return X.line=J,x&&j(X.line[X.pos])?{ln:X.ln,pos:X.pos}:{ln:X.ln,pos:we}}for(var M={ln:m.line,pos:m.ch};y>0;)M=b<0?O(u,M.ln,M.pos,b):T(u,M.ln,M.pos,b),y--;return new n(M.ln,M.pos)}function Ta(u,m,y,b){function x(M,z){if(z.line!==null)if(z.pos+z.dir<0||z.pos+z.dir>=z.line.length){if(z.ln+=z.dir,!U(M,z.ln)){z.line=null;return}z.line=M.getLine(z.ln),z.pos=z.dir>0?0:z.line.length-1}else z.pos+=z.dir}function k(M,z,I,ae){var _e=M.getLine(z),ne=_e==="",J={line:_e,ln:z,pos:I,dir:ae},X={ln:J.ln,pos:J.pos},we=J.line==="";for(x(M,J);J.line!==null;){if(X.ln=J.ln,X.pos=J.pos,J.line===""&&!we||ne&&J.line!==""&&!j(J.line[J.pos]))return{ln:J.ln,pos:J.pos};V(J.line[J.pos])&&!ne&&(J.pos===J.line.length-1||j(J.line[J.pos+1]))&&(ne=!0),x(M,J)}var _e=M.getLine(X.ln);X.pos=0;for(var je=_e.length-1;je>=0;--je)if(!j(_e[je])){X.pos=je;break}return X}function T(M,z,I,ae){var _e=M.getLine(z),ne={line:_e,ln:z,pos:I,dir:ae},J=ne.ln,X=null,we=ne.line==="";for(x(M,ne);ne.line!==null;){if(ne.line===""&&!we)return X===null?{ln:ne.ln,pos:ne.pos}:{ln:J,pos:X};if(V(ne.line[ne.pos])&&X!==null&&!(ne.ln===J&&ne.pos+1===X))return{ln:J,pos:X};ne.line!==""&&!j(ne.line[ne.pos])&&(we=!1,J=ne.ln,X=ne.pos),x(M,ne)}var _e=M.getLine(J);X=0;for(var je=0;je<_e.length;++je)if(!j(_e[je])){X=je;break}return{ln:J,pos:X}}for(var O={ln:m.line,pos:m.ch};y>0;)O=b<0?T(u,O.ln,O.pos,b):k(u,O.ln,O.pos,b),y--;return new n(O.ln,O.pos)}function mr(u,m,y,b){var x=m,k={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[y],T={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[y],O=u.getLine(x.line).charAt(x.ch)===T?1:0,M=u.scanForBracket(new n(x.line,x.ch+O),-1,void 0,{bracketRegex:k}),z=u.scanForBracket(new n(x.line,x.ch+O),1,void 0,{bracketRegex:k});if(!M||!z)return null;var I=M.pos,ae=z.pos;if(I.line==ae.line&&I.ch>ae.ch||I.line>ae.line){var ne=I;I=ae,ae=ne}return b?ae.ch+=1:I.ch+=1,{start:I,end:ae}}function ks(u,m,y,b){var x=Ge(m),k=u.getLine(x.line).split(""),T,O,M,z,I=k.indexOf(y);if(x.ch<I)x.ch=I;else if(I<x.ch&&k[x.ch]==y){var ae=/string/.test(u.getTokenTypeAt(Ct(m,0,1))),ne=/string/.test(u.getTokenTypeAt(m));ae&&!ne||(O=x.ch,--x.ch)}if(k[x.ch]==y&&!O)T=x.ch+1;else for(M=x.ch;M>-1&&!T;M--)k[M]==y&&(T=M+1);if(T&&!O)for(M=T,z=k.length;M<z&&!O;M++)k[M]==y&&(O=M);return!T||!O?{start:x,end:x}:(b&&(--T,++O),{start:new n(x.line,T),end:new n(x.line,O)})}xe("pcre",!0,"boolean");class rc{constructor(){this.highlightTimeout}getQuery(){return K.query}setQuery(m){K.query=m}getOverlay(){return this.searchOverlay}setOverlay(m){this.searchOverlay=m}isReversed(){return K.isReversed}setReversed(m){K.isReversed=m}getScrollbarAnnotate(){return this.annotate}setScrollbarAnnotate(m){this.annotate=m}}function vn(u){var m=u.state.vim;return m.searchState_||(m.searchState_=new rc)}function Cs(u){return ic(u,"/")}function Ss(u){return Es(u,"/")}function ic(u,m){var y=Es(u,m)||[];if(!y.length)return[];var b=[];if(y[0]===0){for(var x=0;x<y.length;x++)typeof y[x]=="number"&&b.push(u.substring(y[x]+1,y[x+1]));return b}}function Es(u,m){m||(m="/");for(var y=!1,b=[],x=0;x<u.length;x++){var k=u.charAt(x);!y&&k==m&&b.push(x),y=!y&&k=="\\"}return b}function Hn(u){var m={V:"|(){+?*.[$^",M:"|(){+?*.[",m:"|(){+?",v:"<>"},y={">":"(?<=[\\w])(?=[^\\w]|$)","<":"(?<=[^\\w]|^)(?=[\\w])"},b=m.m,x=u.replace(/\\.|[\[|(){+*?.$^<>]/g,function(T){if(T[0]==="\\"){var O=T[1];return O==="}"||b.indexOf(O)!=-1?O:O in m?(b=m[O],""):O in y?y[O]:T}else return b.indexOf(T)==-1?T:y[T]||"\\"+T}),k=x.indexOf("\\zs");return k!=-1&&(x="(?<="+x.slice(0,k)+")"+x.slice(k+3)),k=x.indexOf("\\ze"),k!=-1&&(x=x.slice(0,k)+"(?="+x.slice(k+3)+")"),x}var Ts={"\\n":`
56
+ `,"\\r":"\r","\\t":" "};function lf(u){for(var m=!1,y=[],b=-1;b<u.length;b++){var x=u.charAt(b)||"",k=u.charAt(b+1)||"";Ts[x+k]?(y.push(Ts[x+k]),b++):m?(y.push(x),m=!1):x==="\\"?(m=!0,he(k)||k==="$"?y.push("$"):k!=="/"&&k!=="\\"&&y.push("\\")):(x==="$"&&y.push("$"),y.push(x),k==="/"&&y.push("\\"))}return y.join("")}var To={"\\/":"/","\\\\":"\\","\\n":`
57
+ `,"\\r":"\r","\\t":" ","\\&":"&"};function oc(u){for(var m=new e.StringStream(u),y=[];!m.eol();){for(;m.peek()&&m.peek()!="\\";)y.push(m.next());var b=!1;for(var x in To)if(m.match(x,!0)){b=!0,y.push(To[x]);break}b||y.push(m.next())}return y.join("")}function Ro(u,m,y){K.registerController.getRegister("/").setText(u);var b=Ss(u),x,k;return b.length?(x=u.substring(0,b[0]),k=u.substring(b[0]).indexOf("i")!=-1):x=u,x?(be("pcre")||(x=Hn(x)),y&&(m=/^[^A-Z]*$/.test(x)),new RegExp(x,m||k?"im":"m")):null}function tr(u){typeof u=="string"&&(u=document.createElement(u));for(var m=1;m<arguments.length;m++){var y=arguments[m];if(y)if(typeof y!="object"&&(y=document.createTextNode(y)),y.nodeType)u.appendChild(y);else for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(b[0]==="$"?u.style[b.slice(1)]=y[b]:typeof y[b]=="function"?u[b]=y[b]:u.setAttribute(b,y[b]))}return u}function Ve(u,m,y){var b=tr("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},m);u.openNotification?y?(b=tr("div",{},b,tr("div",{},"Press ENTER or type command to continue")),u.state.closeVimNotification&&u.state.closeVimNotification(),u.state.closeVimNotification=u.openNotification(b,{bottom:!0,duration:0})):u.openNotification(b,{bottom:!0,duration:15e3}):alert(b.innerText)}function Rs(u,m){return tr("div",{$display:"flex",$flex:1},tr("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1,$display:"flex"},u,tr("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$flex:1})),m&&tr("span",{$color:"#888"},m))}function Do(u,m){var x;if(We.length){m.value||(m.value=""),Ne=m;return}var y=Rs(m.prefix,m.desc);if(u.openDialog)u.openDialog(y,m.onClose,{onKeyDown:m.onKeyDown,onKeyUp:m.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:m.value});else{var b="";typeof m.prefix!="string"&&m.prefix&&(b+=m.prefix.textContent),m.desc&&(b+=" "+m.desc),(x=m.onClose)==null||x.call(m,prompt(b,""))}}function Ds(u,m){return u instanceof RegExp&&m instanceof RegExp?u.flags==m.flags&&u.source==m.source:!1}function hr(u,m,y,b){if(m){var x=vn(u),k=Ro(m,!!y,!!b);if(k)return Qr(u,k),Ds(k,x.getQuery())||x.setQuery(k),k}}function ac(u){if(u.source.charAt(0)=="^")var m=!0;return{token:function(y){if(m&&!y.sol()){y.skipToEnd();return}var b=y.match(u,!1);if(b)return b[0].length==0?(y.next(),"searching"):!y.sol()&&(y.backUp(1),!u.exec(y.next()+b[0]))?(y.next(),null):(y.match(u),"searching");for(;!y.eol()&&(y.next(),!y.match(u,!1)););},query:u}}var Hi=0;function Qr(u,m){clearTimeout(Hi);var y=vn(u);y.highlightTimeout=Hi,Hi=setTimeout(function(){if(u.state.vim){var b=vn(u);b.highlightTimeout=void 0;var x=b.getOverlay();(!x||m!=x.query)&&(x&&u.removeOverlay(x),x=ac(m),u.addOverlay(x),u.showMatchesOnScrollbar&&(b.getScrollbarAnnotate()&&b.getScrollbarAnnotate().clear(),b.setScrollbarAnnotate(u.showMatchesOnScrollbar(m))),b.setOverlay(x))}},50)}function sc(u,m,y,b){return u.operation(function(){b===void 0&&(b=1);for(var x=u.getCursor(),k=u.getSearchCursor(y,x),T=0;T<b;T++){var O=k.find(m);if(T==0&&O&&Vt(k.from(),x)){var M=m?k.from():k.to();O=k.find(m),O&&!O[0]&&Vt(k.from(),M)&&u.getLine(M.line).length==M.ch&&(O=k.find(m))}if(!O&&(k=u.getSearchCursor(y,m?new n(u.lastLine()):new n(u.firstLine(),0)),!k.find(m)))return}return k.from()})}function lc(u,m,y,b,x){return u.operation(function(){b===void 0&&(b=1);var k=u.getCursor(),T=u.getSearchCursor(y,k),O=T.find(!m);!x.visualMode&&O&&Vt(T.from(),k)&&T.find(!m);for(var M=0;M<b;M++)if(O=T.find(m),!O&&(T=u.getSearchCursor(y,m?new n(u.lastLine()):new n(u.firstLine(),0)),!T.find(m)))return;var z=T.from(),I=T.to();return z&&I&&[z,I]})}function di(u){var m=vn(u);m.highlightTimeout&&(m.highlightTimeout=(clearTimeout(m.highlightTimeout),void 0)),u.removeOverlay(vn(u).getOverlay()),m.setOverlay(null),m.getScrollbarAnnotate()&&(m.getScrollbarAnnotate().clear(),m.setScrollbarAnnotate(null))}function Os(u,m,y){return typeof u!="number"&&(u=u.line),m instanceof Array?de(u,m):typeof y=="number"?u>=m&&u<=y:u==m}function Ps(u){var m=u.getScrollInfo(),y=6,b=10,x=u.coordsChar({left:0,top:y+m.top},"local"),k=m.clientHeight-b+m.top,T=u.coordsChar({left:0,top:k},"local");return{top:x.line,bottom:T.line}}function Ra(u,m,y){if(y=="'"||y=="`")return K.jumpList.find(u,-1)||new n(0,0);if(y==".")return Oo(u);var b=m.marks[y];return b&&b.find()}function Oo(u){if(u.getLastEditEnd)return u.getLastEditEnd();for(var m=u.doc.history.done,y=m.length;y--;)if(m[y].changes)return Ge(m[y].changes[0].to)}class Ns{constructor(){this.commandMap_,this.buildCommandMap_()}processCommand(m,y,b){var x=this;m.operation(function(){m.curOp&&(m.curOp.isVimOp=!0),x._processCommand(m,y,b)})}_processCommand(m,y,b){var x=m.state.vim,k=K.registerController.getRegister(":"),T=k.toString(),O=new e.StringStream(y);k.setText(y);var M=b||{};M.input=y;try{this.parseInput_(m,O,M)}catch(ae){throw Ve(m,ae+""),ae}x.visualMode&&Je(m);var z,I;if(!M.commandName)M.line!==void 0&&(I="move");else if(z=this.matchCommand_(M.commandName),z){if(I=z.name,z.excludeFromCommandHistory&&k.setText(T),this.parseCommandArgs_(O,M,z),z.type=="exToKey"){It(m,z.toKeys||"",z);return}else if(z.type=="exToEx"){this.processCommand(m,z.toInput||"");return}}if(!I){Ve(m,'Not an editor command ":'+y+'"');return}try{Da[I](m,M),(!z||!z.possiblyAsync)&&M.callback&&M.callback()}catch(ae){throw Ve(m,ae+""),ae}}parseInput_(m,y,b){var k,T;y.eatWhile(":"),y.eat("%")?(b.line=m.firstLine(),b.lineEnd=m.lastLine()):(b.line=this.parseLineSpec_(m,y),b.line!==void 0&&y.eat(",")&&(b.lineEnd=this.parseLineSpec_(m,y))),b.line==null?m.state.vim.visualMode?(b.selectionLine=(k=Ra(m,m.state.vim,"<"))==null?void 0:k.line,b.selectionLineEnd=(T=Ra(m,m.state.vim,">"))==null?void 0:T.line):b.selectionLine=m.getCursor().line:(b.selectionLine=b.line,b.selectionLineEnd=b.lineEnd);var x=y.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return x?b.commandName=x[1]:b.commandName=(y.match(/.*/)||[""])[0],b}parseLineSpec_(m,y){var b=y.match(/^(\d+)/);if(b)return parseInt(b[1],10)-1;switch(y.next()){case".":return this.parseLineSpecOffset_(y,m.getCursor().line);case"$":return this.parseLineSpecOffset_(y,m.lastLine());case"'":var x=y.next()||"",k=Ra(m,m.state.vim,x);if(!k)throw Error("Mark not set");return this.parseLineSpecOffset_(y,k.line);case"-":case"+":return y.backUp(1),this.parseLineSpecOffset_(y,m.getCursor().line);default:y.backUp(1);return}}parseLineSpecOffset_(m,y){var b=m.match(/^([+-])?(\d+)/);if(b){var x=parseInt(b[2],10);b[1]=="-"?y-=x:y+=x}return y}parseCommandArgs_(m,y,b){var T;if(!m.eol()){y.argString=(T=m.match(/.*/))==null?void 0:T[0];var x=b.argDelimiter||/\s+/,k=Yn(y.argString||"").split(x);k.length&&k[0]&&(y.args=k)}}matchCommand_(m){for(var y=m.length;y>0;y--){var b=m.substring(0,y);if(this.commandMap_[b]){var x=this.commandMap_[b];if(x.name.indexOf(m)===0)return x}}}buildCommandMap_(){this.commandMap_={};for(var m=0;m<f.length;m++){var y=f[m],b=y.shortName||y.name;this.commandMap_[b]=y}}map(m,y,b,x){if(m!=":"&&m.charAt(0)==":"){if(b)throw Error("Mode not supported for ex mappings");var k=m.substring(1);y!=":"&&y.charAt(0)==":"?this.commandMap_[k]={name:k,type:"exToEx",toInput:y.substring(1),user:!0}:this.commandMap_[k]={name:k,type:"exToKey",toKeys:y,user:!0}}else{var T={keys:m,type:"keyToKey",toKeys:y,noremap:!!x};b&&(T.context=b),Po(T)}}unmap(m,y){if(m!=":"&&m.charAt(0)==":"){if(y)throw Error("Mode not supported for ex mappings");var b=m.substring(1);if(this.commandMap_[b]&&this.commandMap_[b].user)return delete this.commandMap_[b],!0}else for(var x=m,k=0;k<a.length;k++)if(x==a[k].keys&&a[k].context===y)return a.splice(k,1),No(x),!0}}var Da={colorscheme:function(u,m){if(!m.args||m.args.length<1){Ve(u,u.getOption("theme"));return}u.setOption("theme",m.args[0])},map:function(u,m,y,b){var x=m.args;if(!x||x.length<2){u&&Ve(u,"Invalid mapping: "+m.input);return}Gt.map(x[0],x[1],y,b)},imap:function(u,m){this.map(u,m,"insert")},nmap:function(u,m){this.map(u,m,"normal")},vmap:function(u,m){this.map(u,m,"visual")},omap:function(u,m){this.map(u,m,"operatorPending")},noremap:function(u,m){this.map(u,m,void 0,!0)},inoremap:function(u,m){this.map(u,m,"insert",!0)},nnoremap:function(u,m){this.map(u,m,"normal",!0)},vnoremap:function(u,m){this.map(u,m,"visual",!0)},onoremap:function(u,m){this.map(u,m,"operatorPending",!0)},unmap:function(u,m,y){var b=m.args;(!b||b.length<1||!Gt.unmap(b[0],y))&&u&&Ve(u,"No such mapping: "+m.input)},mapclear:function(u,m){Fe.mapclear()},imapclear:function(u,m){Fe.mapclear("insert")},nmapclear:function(u,m){Fe.mapclear("normal")},vmapclear:function(u,m){Fe.mapclear("visual")},omapclear:function(u,m){Fe.mapclear("operatorPending")},move:function(u,m){An.processCommand(u,u.state.vim,{keys:"",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:m.line+1})},set:function(u,m){var y=m.args,b=m.setCfg||{};if(!y||y.length<1){u&&Ve(u,"Invalid mapping: "+m.input);return}var x=y[0].split("="),k=x.shift()||"",T=x.length>0?x.join("="):void 0,O=!1,M=!1;if(k.charAt(k.length-1)=="?"){if(T)throw Error("Trailing characters: "+m.argString);k=k.substring(0,k.length-1),O=!0}else k.charAt(k.length-1)=="!"&&(k=k.substring(0,k.length-1),M=!0);T===void 0&&k.substring(0,2)=="no"&&(k=k.substring(2),T=!1);var z=pe[k]&&pe[k].type=="boolean";if(z&&(M?T=!be(k,u,b):T??(T=!0)),!z&&T===void 0||O){var I=be(k,u,b);I instanceof Error?Ve(u,I.message):I===!0||I===!1?Ve(u," "+(I?"":"no")+k):Ve(u," "+k+"="+I)}else{var ae=Z(k,T,u,b);ae instanceof Error&&Ve(u,ae.message)}},setlocal:function(u,m){m.setCfg={scope:"local"},this.set(u,m)},setglobal:function(u,m){m.setCfg={scope:"global"},this.set(u,m)},registers:function(u,m){var y=m.args,b=K.registerController.registers,x=`----------Registers----------
58
+
59
+ `;if(y)for(var k=y.join(""),T=0;T<k.length;T++){var O=k.charAt(T);if(K.registerController.isValidRegister(O)){var M=b[O]||new gn;x+='"'+O+" "+M.toString()+`
60
+ `}}else for(var O in b){var z=b[O].toString();z.length&&(x+='"'+O+" "+z+`
61
+ `)}Ve(u,x,!0)},marks:function(u,m){var y=m.args,b=u.state.vim.marks,x=`-----------Marks-----------
62
+ mark line col
63
+
64
+ `;if(y)for(var k=y.join(""),T=0;T<k.length;T++){var O=k.charAt(T),M=b[O]&&b[O].find();M&&(x+=O+" "+M.line+" "+M.ch+`
65
+ `)}else for(var O in b){var M=b[O]&&b[O].find();M&&(x+=O+" "+M.line+" "+M.ch+`
66
+ `)}Ve(u,x,!0)},sort:function(u,m){var y,b,x,k,T;function O(){if(m.argString){var ze=new e.StringStream(m.argString);if(ze.eat("!")&&(y=!0),ze.eol())return;if(!ze.eatSpace())return"Invalid arguments";var Ke=ze.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!Ke||!ze.eol())return"Invalid arguments";if(Ke[1]){b=Ke[1].indexOf("i")!=-1,x=Ke[1].indexOf("u")!=-1;var Jt=Ke[1].indexOf("d")!=-1||Ke[1].indexOf("n")!=-1,Xt=Ke[1].indexOf("x")!=-1,ln=Ke[1].indexOf("o")!=-1;if(Number(Jt)+Number(Xt)+Number(ln)>1)return"Invalid arguments";k=Jt&&"decimal"||Xt&&"hex"||ln&&"octal"}Ke[2]&&(T=new RegExp(Ke[2].substr(1,Ke[2].length-2),b?"i":""))}}var M=O();if(M){Ve(u,M+": "+m.argString);return}var z=m.line||u.firstLine(),I=m.lineEnd||m.line||u.lastLine();if(z==I)return;var ae=new n(z,0),ne=new n(I,St(u,I)),J=u.getRange(ae,ne).split(`
67
+ `),X=k=="decimal"?/(-?)([\d]+)/:k=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:k=="octal"?/([0-7]+)/:null,we=k=="decimal"?10:k=="hex"?16:k=="octal"?8:void 0,_e=[],je=[];if(k||T)for(var Se=0;Se<J.length;Se++){var Ie=T?J[Se].match(T):null;Ie&&Ie[0]!=""?_e.push(Ie):X&&X.exec(J[Se])?_e.push(J[Se]):je.push(J[Se])}else je=J;function lt(ze,Ke){if(y){var Jt=ze;ze=Ke,Ke=Jt}b&&(ze=ze.toLowerCase(),Ke=Ke.toLowerCase());var Xt=X&&X.exec(ze),ln=X&&X.exec(Ke);return!Xt||!ln?ze<Ke?-1:1:parseInt((Xt[1]+Xt[2]).toLowerCase(),we)-parseInt((ln[1]+ln[2]).toLowerCase(),we)}function Xe(ze,Ke){if(y){var Jt=ze;ze=Ke,Ke=Jt}return b&&(ze[0]=ze[0].toLowerCase(),Ke[0]=Ke[0].toLowerCase()),ze[0]<Ke[0]?-1:1}if(_e.sort(T?Xe:lt),T)for(var Se=0;Se<_e.length;Se++)_e[Se]=_e[Se].input;else k||je.sort(lt);if(J=y?_e.concat(je):je.concat(_e),x){var Ot=J,Pt;J=[];for(var Se=0;Se<Ot.length;Se++)Ot[Se]!=Pt&&J.push(Ot[Se]),Pt=Ot[Se]}u.replaceRange(J.join(`
68
+ `),ae,ne)},vglobal:function(u,m){this.global(u,m)},normal:function(u,m){var y=!1,b=m.argString;if(b&&b[0]=="!"&&(b=b.slice(1),y=!0),b=b.trimStart(),!b){Ve(u,"Argument is required.");return}var x=m.line;if(typeof x=="number")for(var k=isNaN(m.lineEnd)?x:m.lineEnd,T=x;T<=k;T++)u.setCursor(T,0),It(u,m.argString.trimStart(),{noremap:y}),u.state.vim.insertMode&&Lr(u,!0);else It(u,m.argString.trimStart(),{noremap:y}),u.state.vim.insertMode&&Lr(u,!0)},global:function(u,m){var y=m.argString;if(!y){Ve(u,"Regular Expression missing from global");return}var b=m.commandName[0]==="v";y[0]==="!"&&m.commandName[0]==="g"&&(b=!0,y=y.slice(1));var x=m.line===void 0?u.firstLine():m.line,k=m.lineEnd||m.line||u.lastLine(),T=Cs(y),O=y,M="";if(T&&T.length&&(O=T[0],M=T.slice(1,T.length).join("/")),O)try{hr(u,O,!0,!0)}catch{Ve(u,"Invalid regex: "+O);return}for(var z=vn(u).getQuery(),I=[],ae=x;ae<=k;ae++){var ne=u.getLine(ae);z.test(ne)!==b&&I.push(M?u.getLineHandle(ae):ne)}if(!M){Ve(u,I.join(`
69
+ `));return}var J=0,X=function(){if(J<I.length){var we=I[J++],_e=u.getLineNumber(we);if(_e==null){X();return}var je=_e+1+M;Gt.processCommand(u,je,{callback:X})}else u.releaseLineHandles&&u.releaseLineHandles()};X()},substitute:function(u,m){if(!u.getSearchCursor)throw Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var y=m.argString,b=y?ic(y,y[0]):[],x="",k="",T,O,M,z=!1,I=!1;if(b&&b.length)x=b[0],be("pcre")&&x!==""&&(x=new RegExp(x).source),k=b[1],k!==void 0&&(k=be("pcre")?oc(k.replace(/([^\\])&/g,"$1$$&")):lf(k),K.lastSubstituteReplacePart=k),T=b[2]?b[2].split(" "):[];else if(y&&y.length){Ve(u,"Substitutions should be of the form :s/pattern/replace/");return}if(T&&(O=T[0],M=parseInt(T[1]),O&&(O.indexOf("c")!=-1&&(z=!0),O.indexOf("g")!=-1&&(I=!0),x=be("pcre")?x+"/"+O:x.replace(/\//g,"\\/")+"/"+O)),x)try{hr(u,x,!0,!0)}catch{Ve(u,"Invalid regex: "+x);return}if(k||(k=K.lastSubstituteReplacePart),k===void 0){Ve(u,"No previous substitute regular expression");return}var ae=vn(u).getQuery(),ne=m.line===void 0?u.getCursor().line:m.line,J=m.lineEnd||ne;ne==u.firstLine()&&J==u.lastLine()&&(J=1/0),M&&(ne=J,J=ne+M-1);var X=yt(u,new n(ne,0)),we=u.getSearchCursor(ae,X);Vi(u,z,I,ne,J,we,ae,k,m.callback)},startinsert:function(u,m){It(u,m.argString=="!"?"A":"i",{})},redo:e.commands.redo,undo:e.commands.undo,write:function(u){e.commands.save?e.commands.save(u):u.save&&u.save()},nohlsearch:function(u){di(u)},yank:function(u){var m=Ge(u.getCursor()).line,y=u.getLine(m);K.registerController.pushText("0","yank",y,!0,!0)},delete:function(u,m){var y=m.selectionLine,b=isNaN(m.selectionLineEnd)?y:m.selectionLineEnd;Nr.delete(u,{linewise:!0},[{anchor:new n(y,0),head:new n(b+1,0)}])},join:function(u,m){var y=m.selectionLine,b=isNaN(m.selectionLineEnd)?y:m.selectionLineEnd;u.setCursor(new n(y,0)),Ht.joinLines(u,{repeat:b-y},u.state.vim)},delmarks:function(u,m){if(!m.argString||!Yn(m.argString)){Ve(u,"Argument required");return}for(var y=u.state.vim,b=new e.StringStream(Yn(m.argString));!b.eol();){b.eatSpace();var x=b.pos;if(!b.match(/[a-zA-Z]/,!1)){Ve(u,"Invalid argument: "+m.argString.substring(x));return}var k=b.next();if(b.match("-",!0)){if(!b.match(/[a-zA-Z]/,!1)){Ve(u,"Invalid argument: "+m.argString.substring(x));return}var T=k,O=b.next();if(T&&O&&A(T)==A(O)){var M=T.charCodeAt(0),z=O.charCodeAt(0);if(M>=z){Ve(u,"Invalid argument: "+m.argString.substring(x));return}for(var I=0;I<=z-M;I++){var ae=String.fromCharCode(M+I);delete y.marks[ae]}}else{Ve(u,"Invalid argument: "+T+"-");return}}else k&&delete y.marks[k]}}},Gt=new Ns;Fe.defineEx("version","ve",u=>{Ve(u,"Codemirror-vim version: 6.3.0")});function Vi(u,m,y,b,x,k,T,O,M){u.state.vim.exMode=!0;var z=!1,I=0,ae,ne,J;function X(){u.operation(function(){for(;!z;)we(),je();Se()})}function we(){var lt="",Xe=k.match||k.pos&&k.pos.match;lt=Xe?O.replace(/\$(\d{1,3}|[$&])/g,function(Pt,ze){if(ze=="$")return"$";if(ze=="&")return Xe[0];for(var Ke=ze;parseInt(Ke)>=Xe.length&&Ke.length>0;)Ke=Ke.slice(0,Ke.length-1);return Ke?Xe[Ke]+ze.slice(Ke.length,ze.length):Pt}):u.getRange(k.from(),k.to()).replace(T,O);var Ot=k.to().line;k.replace(lt),ne=k.to().line,x+=ne-Ot,J=ne<Ot}function _e(){var lt=ae&&Ge(k.to()),Xe=k.findNext();return Xe&&!Xe[0]&&lt&&Vt(k.from(),lt)&&(Xe=k.findNext()),Xe&&I++,Xe}function je(){for(;_e()&&Os(k.from(),b,x);)if(!(!y&&k.from().line==ne&&!J)){u.scrollIntoView(k.from(),30),u.setSelection(k.from(),k.to()),ae=k.from(),z=!1;return}z=!0}function Se(lt){if(lt&&lt(),u.focus(),ae){u.setCursor(ae);var Xe=u.state.vim;Xe.exMode=!1,Xe.lastHPos=Xe.lastHSPos=ae.ch}M?M():z&&Ve(u,(I?"Found "+I+" matches":"No matches found")+" for pattern: "+T+(be("pcre")?" (set nopcre to use Vim regexps)":""))}function Ie(lt,Xe,Ot){switch(e.e_stop(lt),tn(lt)){case"y":we(),je();break;case"n":je();break;case"a":var Pt=M;M=void 0,u.operation(X),M=Pt;break;case"l":we();case"q":case"<Esc>":case"<C-c>":case"<C-[>":Se(Ot);break}return z&&Se(Ot),!0}if(je(),z){Ve(u,"No matches for "+T+(be("pcre")?" (set nopcre to use vim regexps)":""));return}if(!m){X(),M&&M();return}Do(u,{prefix:tr("span","replace with ",tr("strong",O)," (y/n/a/q/l)"),onKeyDown:Ie})}function Lr(u,m){var y=u.state.vim,b=K.macroModeState,x=K.registerController.getRegister("."),k=b.isPlaying,T=b.lastInsertModeChanges;k||(u.off("change",Lo),y.insertEnd&&y.insertEnd.clear(),y.insertEnd=void 0,e.off(u.getInputField(),"keydown",Io)),!k&&y.insertModeRepeat&&y.insertModeRepeat>1&&(Is(u,y,y.insertModeRepeat-1,!0),y.lastEditInputState.repeatOverride=y.insertModeRepeat),delete y.insertModeRepeat,y.insertMode=!1,m||u.setCursor(u.getCursor().line,u.getCursor().ch-1),u.setOption("keyMap","vim"),u.setOption("disableInput",!0),u.toggleOverwrite(!1),x.setText(T.changes.join("")),e.signal(u,"vim-mode-change",{mode:"normal"}),b.isRecording&&Gr(b)}function Po(u){a.unshift(u),u.keys&&cc(u.keys)}function cc(u){u.split(/(<(?:[CSMA]-)*\w+>|.)/i).forEach(function(m){m&&(s[m]||(s[m]=0),s[m]++)})}function No(u){u.split(/(<(?:[CSMA]-)*\w+>|.)/i).forEach(function(m){s[m]&&s[m]--})}function Ar(u,m,y,b,x){var k={keys:u,type:m};for(var T in k[m]=y,k[m+"Args"]=b,x)k[T]=x[T];Po(k)}xe("insertModeEscKeysTimeout",200,"number");function Ms(u,m,y,b){var x=K.registerController.getRegister(b);if(b==":"){x.keyBuffer[0]&&Gt.processCommand(u,x.keyBuffer[0]),y.isPlaying=!1;return}var k=x.keyBuffer,T=0;y.isPlaying=!0,y.replaySearchQueries=x.searchQueries.slice(0);for(var O=0;O<k.length;O++)for(var M=k[O],z,I,ae=/<(?:[CSMA]-)*\w+>|./gi;z=ae.exec(M);)if(I=z[0],Fe.handleKey(u,I,"macro"),m.insertMode){var ne=x.insertModeChanges[T++].changes;K.macroModeState.lastInsertModeChanges.changes=ne,Jr(u,ne,1),Lr(u)}y.isPlaying=!1}function Mo(u,m){if(!u.isPlaying){var y=u.latestRegister,b=K.registerController.getRegister(y);b&&b.pushText(m)}}function Gr(u){if(!u.isPlaying){var m=u.latestRegister,y=K.registerController.getRegister(m);y&&y.pushInsertModeChanges&&y.pushInsertModeChanges(u.lastInsertModeChanges)}}function Ls(u,m){if(!u.isPlaying){var y=u.latestRegister,b=K.registerController.getRegister(y);b&&b.pushSearchQuery&&b.pushSearchQuery(m)}}function Lo(u,m){var y=K.macroModeState,b=y.lastInsertModeChanges;if(!y.isPlaying)for(var x=u.state.vim;m;){if(b.expectCursorActivityForChange=!0,b.ignoreCount>1)b.ignoreCount--;else if(m.origin=="+input"||m.origin=="paste"||m.origin===void 0){var k=u.listSelections().length;k>1&&(b.ignoreCount=k);var T=m.text.join(`
70
+ `);if(b.maybeReset&&(b.maybeReset=(b.changes=[],!1)),T)if(u.state.overwrite&&!/\n/.test(T))b.changes.push([T]);else{if(T.length>1){var O=x&&x.insertEnd&&x.insertEnd.find(),M=u.getCursor();if(O&&O.line==M.line){var z=O.ch-M.ch;z>0&&z<T.length&&(b.changes.push([T,z]),T="")}}T&&b.changes.push(T)}}m=m.next}}function As(u){var x;var m=u.state.vim;if(m.insertMode){var y=K.macroModeState;if(y.isPlaying)return;var b=y.lastInsertModeChanges;b.expectCursorActivityForChange?b.expectCursorActivityForChange=!1:(b.maybeReset=!0,m.insertEnd&&m.insertEnd.clear(),m.insertEnd=u.setBookmark(u.getCursor(),{insertLeft:!0}))}else(x=u.curOp)!=null&&x.isVimOp||Ao(u,m)}function Ao(u,m){var y=u.getCursor("anchor"),b=u.getCursor("head");if(m.visualMode&&!u.somethingSelected()?Je(u,!1):!m.visualMode&&!m.insertMode&&u.somethingSelected()&&(m.visualMode=!0,m.visualLine=!1,e.signal(u,"vim-mode-change",{mode:"visual"})),m.visualMode){var x=st(b,y)?0:-1,k=st(b,y)?-1:0;b=Ct(b,0,x),y=Ct(y,0,k),m.sel={anchor:y,head:b},pr(u,m,"<",vt(b,y)),pr(u,m,">",On(b,y))}else m.insertMode||(m.lastHPos=u.getCursor().ch)}function Io(u){var m=K.macroModeState.lastInsertModeChanges,y=e.keyName?e.keyName(u):u.key;y&&(y.indexOf("Delete")!=-1||y.indexOf("Backspace")!=-1)&&(m.maybeReset&&(m.maybeReset=(m.changes=[],!1)),m.changes.push(new Qe(y,u)))}function Is(u,m,y,b){var x=K.macroModeState;x.isPlaying=!0;var k=m.lastEditActionCommand,T=m.inputState;function O(){k?An.processAction(u,m,k):An.evalInput(u,m)}function M(I){if(x.lastInsertModeChanges.changes.length>0){I=m.lastEditActionCommand?I:1;var ae=x.lastInsertModeChanges;Jr(u,ae.changes,I)}}if(m.inputState=m.lastEditInputState,k&&k.interlaceInsertRepeat)for(var z=0;z<y;z++)O(),M(1);else b||O(),M(y);m.inputState=T,m.insertMode&&!b&&Lr(u),x.isPlaying=!1}function xn(u,m){e.lookupKey(m,"vim-insert",function(y){return typeof y=="string"?e.commands[y](u):y(u),!0})}function Jr(u,m,y){var b=u.getCursor("head"),x=K.macroModeState.lastInsertModeChanges.visualBlock;x&&(Bn(u,b,x+1),y=u.listSelections().length,u.setCursor(b));for(var k=0;k<y;k++){x&&u.setCursor(Ct(b,k,0));for(var T=0;T<m.length;T++){var O=m[T];if(O instanceof Qe)xn(u,O.keyName);else if(typeof O=="string")u.replaceSelection(O);else{var M=u.getCursor(),z=Ct(M,0,O[0].length-(O[1]||0));u.replaceRange(O[0],M,O[1]?M:z),u.setCursor(z)}}}x&&u.setCursor(Ct(b,0,1))}function $i(u){var m=new u.constructor;return Object.keys(u).forEach(function(y){if(y!="insertEnd"){var b=u[y];Array.isArray(b)?b=b.slice():b&&typeof b=="object"&&b.constructor!=Object&&(b=$i(b)),m[y]=b}}),u.sel&&(m.sel={head:u.sel.head&&Ge(u.sel.head),anchor:u.sel.anchor&&Ge(u.sel.anchor)}),m}function jo(u,m,y){var k=le(u),b=u,x=!1,k=Fe.maybeInitVimState_(b),T=k.visualBlock||k.wasInVisualBlock;if(b.state.closeVimNotification){var O=b.state.closeVimNotification;if(b.state.closeVimNotification=null,O(),m=="<CR>")return kt(b),!0}var M=b.isInMultiSelectMode();if(k.wasInVisualBlock&&!M?k.wasInVisualBlock=!1:M&&k.visualBlock&&(k.wasInVisualBlock=!0),m=="<Esc>"&&!k.insertMode&&!k.visualMode&&M&&k.status=="<Esc>")kt(b);else if(T||!M||b.inVirtualSelectionMode)x=Fe.handleKey(b,m,y);else{var z=$i(k),I=k.inputState.changeQueueList||[];b.operation(function(){var ne;b.curOp&&(b.curOp.isVimOp=!0);var ae=0;b.forEachSelection(function(){b.state.vim.inputState.changeQueue=I[ae];var J=b.getCursor("head"),X=b.getCursor("anchor"),we=st(J,X)?0:-1,_e=st(J,X)?-1:0;J=Ct(J,0,we),X=Ct(X,0,_e),b.state.vim.sel.head=J,b.state.vim.sel.anchor=X,x=Fe.handleKey(b,m,y),b.virtualSelection&&(I[ae]=b.state.vim.inputState.changeQueue,b.state.vim=$i(z)),ae++}),(ne=b.curOp)!=null&&ne.cursorActivity&&!x&&(b.curOp.cursorActivity=!1),b.state.vim=k,k.inputState.changeQueueList=I,k.inputState.changeQueue=null},!0)}return x&&!k.visualMode&&!k.insertMode&&k.visualMode!=b.somethingSelected()&&Ao(b,k),x}return Ae(),Fe}function Qn(e,n){var i=n.ch,a=n.line+1;a<1&&(a=1,i=0),a>e.lines&&(a=e.lines,i=Number.MAX_VALUE);var s=e.line(a);return Math.min(s.from+Math.max(0,i),s.to)}function Rr(e,n){let i=e.lineAt(n);return{line:i.number-1,ch:n-i.from}}var Br=class{constructor(e,n){this.line=e,this.ch=n}};function s0(e,n,i){if(e.addEventListener)e.addEventListener(n,i,!1);else{var a=e._handlers||(e._handlers={});a[n]=(a[n]||[]).concat(i)}}function l0(e,n,i){if(e.removeEventListener)e.removeEventListener(n,i,!1);else{var a=e._handlers,s=a&&a[n];if(s){var c=s.indexOf(i);c>-1&&(a[n]=s.slice(0,c).concat(s.slice(c+1)))}}}function c0(e,n,...i){var c;var a=(c=e._handlers)==null?void 0:c[n];if(a)for(var s=0;s<a.length;++s)a[s](...i)}function u0(e,...n){if(e)for(var i=0;i<e.length;++i)e[i](...n)}var xd;try{xd=RegExp("[\\w\\p{Alphabetic}\\p{Number}_]","u")}catch{xd=/[\w]/}function fs(e,n){var i=e.cm6;if(!i.state.readOnly){var a="input.type.compose";if(e.curOp&&(e.curOp.lastChange||(a="input.type.compose.start")),n.annotations)try{n.annotations.some(function(s){s.value=="input"&&(s.value=a)})}catch(s){console.error(s)}else n.userEvent=a;return i.dispatch(n)}}function d0(e,n){var a;e.curOp&&(e.curOp.$changeStart=void 0),(n?HT:VT)(e.cm6);let i=(a=e.curOp)==null?void 0:a.$changeStart;i!=null&&e.cm6.dispatch({selection:{anchor:i}})}var Hx={Left:e=>is(e.cm6,{key:"Left"},"editor"),Right:e=>is(e.cm6,{key:"Right"},"editor"),Up:e=>is(e.cm6,{key:"Up"},"editor"),Down:e=>is(e.cm6,{key:"Down"},"editor"),Backspace:e=>is(e.cm6,{key:"Backspace"},"editor"),Delete:e=>is(e.cm6,{key:"Delete"},"editor")},Ze=class i_{openDialog(n,i,a){return $x(this,n,i,a)}openNotification(n,i){return Vx(this,n,i)}constructor(n){this.state={},this.marks=Object.create(null),this.$mid=0,this.options={},this._handlers={},this.$lastChangeEndOffset=0,this.virtualSelection=null,this.cm6=n,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this)}on(n,i){s0(this,n,i)}off(n,i){l0(this,n,i)}signal(n,i,a){c0(this,n,i,a)}indexFromPos(n){return Qn(this.cm6.state.doc,n)}posFromIndex(n){return Rr(this.cm6.state.doc,n)}foldCode(n){let i=this.cm6,a=i.state.selection.ranges,s=this.cm6.state.doc,c=Qn(s,n),f=dn.create([dn.range(c,c)],0).ranges;i.state.selection.ranges=f,NT(i),i.state.selection.ranges=a}firstLine(){return 0}lastLine(){return this.cm6.state.doc.lines-1}lineCount(){return this.cm6.state.doc.lines}setCursor(n,i){typeof n=="object"&&(i=n.ch,n=n.line);var a=Qn(this.cm6.state.doc,{line:n,ch:i||0});this.cm6.dispatch({selection:{anchor:a}},{scrollIntoView:!this.curOp}),this.curOp&&!this.curOp.isVimOp&&this.onBeforeEndOperation()}getCursor(n){var i=this.cm6.state.selection.main,a=n=="head"||!n?i.head:n=="anchor"?i.anchor:n=="start"?i.from:n=="end"?i.to:null;if(a==null)throw Error("Invalid cursor type");return this.posFromIndex(a)}listSelections(){var n=this.cm6.state.doc;return this.cm6.state.selection.ranges.map(i=>({anchor:Rr(n,i.anchor),head:Rr(n,i.head)}))}setSelections(n,i){var a=this.cm6.state.doc,s=n.map(c=>{var f=Qn(a,c.head),p=Qn(a,c.anchor);return f==p?dn.cursor(f,1):dn.range(p,f)});this.cm6.dispatch({selection:dn.create(s,i)})}setSelection(n,i,a){this.setSelections([{anchor:n,head:i}],0),a&&a.origin=="*mouse"&&this.onBeforeEndOperation()}getLine(n){var i=this.cm6.state.doc;return n<0||n>=i.lines?"":this.cm6.state.doc.line(n+1).text}getLineHandle(n){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{row:n,index:this.indexFromPos(new Br(n,0))}}getLineNumber(n){var i=this.$lineHandleChanges;if(!i)return null;for(var a=n.index,s=0;s<i.length;s++)if(a=i[s].changes.mapPos(a,1,Xb.TrackAfter),a==null)return null;var c=this.posFromIndex(a);return c.ch==0?c.line:null}releaseLineHandles(){this.$lineHandleChanges=void 0}getRange(n,i){var a=this.cm6.state.doc;return this.cm6.state.sliceDoc(Qn(a,n),Qn(a,i))}replaceRange(n,i,a,s){a||(a=i);var c=this.cm6.state.doc,f=Qn(c,i),p=Qn(c,a);fs(this,{changes:{from:f,to:p,insert:n}})}replaceSelection(n){fs(this,this.cm6.state.replaceSelection(n))}replaceSelections(n){var i=this.cm6.state.selection.ranges.map((a,s)=>({from:a.from,to:a.to,insert:n[s]||""}));fs(this,{changes:i})}getSelection(){return this.getSelections().join(`
71
+ `)}getSelections(){var n=this.cm6;return n.state.selection.ranges.map(i=>n.state.sliceDoc(i.from,i.to))}somethingSelected(){return this.cm6.state.selection.ranges.some(n=>!n.empty)}getInputField(){return this.cm6.contentDOM}clipPos(n){var i=this.cm6.state.doc,a=n.ch,s=n.line+1;s<1&&(s=1,a=0),s>i.lines&&(s=i.lines,a=Number.MAX_VALUE);var c=i.line(s);return a=Math.min(Math.max(0,a),c.to-c.from),new Br(s-1,a)}getValue(){return this.cm6.state.doc.toString()}setValue(n){var i=this.cm6;return i.dispatch({changes:{from:0,to:i.state.doc.length,insert:n},selection:dn.range(0,0)})}focus(){return this.cm6.focus()}blur(){return this.cm6.contentDOM.blur()}defaultTextHeight(){return this.cm6.defaultLineHeight}findMatchingBracket(n,i){var a=this.cm6.state,s=Qn(a.doc,n),c=Zb(a,s+1,-1);return c&&c.end||(c=Zb(a,s,1),c&&c.end)?{to:Rr(a.doc,c.end.from)}:{to:void 0}}scanForBracket(n,i,a,s){return Kx(this,n,i,a,s)}indentLine(n,i){i?this.indentMore():this.indentLess()}indentMore(){UT(this.cm6)}indentLess(){nR(this.cm6)}execCommand(n){if(n=="indentAuto")i_.commands.indentAuto(this);else if(n=="goLineLeft")YT(this.cm6);else if(n=="goLineRight"){JT(this.cm6);let i=this.cm6.state,a=i.selection.main.head;a<i.doc.length&&i.sliceDoc(a,a+1)!==`
72
+ `&&KT(this.cm6)}else console.log(n+" is not implemented")}setBookmark(n,i){var a=i!=null&&i.insertLeft?1:-1,s=this.indexFromPos(n);return new Jx(this,s,a)}addOverlay({query:n}){let i=new XT({regexp:!0,search:n.source,caseSensitive:!/i/.test(n.flags)});if(i.valid){i.forVim=!0,this.cm6Query=i;let a=tm.of(i);return this.cm6.dispatch({effects:a}),i}}removeOverlay(n){if(!this.cm6Query)return;this.cm6Query.forVim=!1;let i=tm.of(this.cm6Query);this.cm6.dispatch({effects:i})}getSearchCursor(n,i){var a=this,s=null,c=null,f=!1;i.ch??(i.ch=Number.MAX_VALUE);var p=Qn(a.cm6.state.doc,i),h=n.source.replace(/(\\.|{(?:\d+(?:,\d*)?|,\d+)})|[{}]/g,function(E,R){return R||"\\"+E});function v(E,R=0,L=E.length){return new WT(E,h,{ignoreCase:n.ignoreCase},R,L)}function w(E){var R=a.cm6.state.doc;if(E>R.length)return null;let L=v(R,E).next();return L.done?null:L.value}var _=1e4;function C(E,R){var L=a.cm6.state.doc;for(let H=1;;H++){let W=Math.max(E,R-H*_),U=v(L,W,R),A=null;for(;!U.next().done;)A=U.value;if(A&&(W==E||A.from>W+10))return A;if(W==E)return null}}return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(E){var R=a.cm6.state.doc;return s=E?C(0,s?f?s.to-1:s.from:p):w(s?f?s.to+1:s.to:p),c=s&&{from:Rr(R,s.from),to:Rr(R,s.to),match:s.match},f=s?s.from==s.to:!1,s&&s.match},from:function(){return c==null?void 0:c.from},to:function(){return c==null?void 0:c.to},replace:function(E){s&&(fs(a,{changes:{from:s.from,to:s.to,insert:E}}),s.to=s.from+E.length,c&&(c.to=Rr(a.cm6.state.doc,s.to)))},get match(){return c&&c.match}}}findPosV(n,i,a,s){let{cm6:c}=this,f=c.state.doc,p=a=="page"?c.dom.clientHeight:0,h=Qn(f,n),v=dn.cursor(h,1,void 0,s),w=Math.round(Math.abs(i));for(let C=0;C<w;C++)a=="page"?v=c.moveVertically(v,i>0,p):a=="line"&&(v=c.moveVertically(v,i>0));let _=Rr(f,v.head);return(i<0&&v.head==0&&s!=0&&n.line==0&&n.ch!=0||i>0&&v.head==f.length&&_.ch!=s&&n.line==_.line)&&(_.hitSide=!0),_}charCoords(n,i){var a=this.cm6.contentDOM.getBoundingClientRect(),s=Qn(this.cm6.state.doc,n),c=this.cm6.coordsAtPos(s),f=-a.top;return{left:((c==null?void 0:c.left)||0)-a.left,top:((c==null?void 0:c.top)||0)+f,bottom:((c==null?void 0:c.bottom)||0)+f}}coordsChar(n,i){var a=this.cm6.contentDOM.getBoundingClientRect(),s=this.cm6.posAtCoords({x:n.left+a.left,y:n.top+a.top})||0;return Rr(this.cm6.state.doc,s)}getScrollInfo(){var n=this.cm6.scrollDOM;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight,width:n.scrollWidth,clientHeight:n.clientHeight,clientWidth:n.clientWidth}}scrollTo(n,i){n!=null&&(this.cm6.scrollDOM.scrollLeft=n),i!=null&&(this.cm6.scrollDOM.scrollTop=i)}scrollIntoView(n,i){if(n){var a=this.indexFromPos(n);this.cm6.dispatch({effects:Tn.scrollIntoView(a)})}else this.cm6.dispatch({scrollIntoView:!0,userEvent:"scroll"})}getWrapperElement(){return this.cm6.dom}getMode(){return{name:this.getOption("mode")}}setSize(n,i){this.cm6.dom.style.width=n+4+"px",this.cm6.dom.style.height=i+"px",this.refresh()}refresh(){this.cm6.measure()}destroy(){this.removeOverlay()}getLastEditEnd(){return this.posFromIndex(this.$lastChangeEndOffset)}onChange(n){for(let a in this.$lineHandleChanges&&this.$lineHandleChanges.push(n),this.marks)this.marks[a].update(n.changes);this.virtualSelection&&(this.virtualSelection.ranges=this.virtualSelection.ranges.map(a=>a.map(n.changes)));var i=this.curOp=this.curOp||{};n.changes.iterChanges((a,s,c,f,p)=>{(i.$changeStart==null||i.$changeStart>c)&&(i.$changeStart=c),this.$lastChangeEndOffset=f;var h={text:p.toJSON()};i.lastChange?i.lastChange.next=i.lastChange=h:i.lastChange=i.change=h},!0),i.changeHandlers||(i.changeHandlers=this._handlers.change&&this._handlers.change.slice())}onSelectionChange(){var n=this.curOp=this.curOp||{};n.cursorActivityHandlers||(n.cursorActivityHandlers=this._handlers.cursorActivity&&this._handlers.cursorActivity.slice()),this.curOp.cursorActivity=!0}operation(n,i){this.curOp||(this.curOp={$d:0}),this.curOp.$d++;try{var a=n()}finally{this.curOp&&(this.curOp.$d--,this.curOp.$d||this.onBeforeEndOperation())}return a}onBeforeEndOperation(){var n=this.curOp,i=!1;n&&(n.change&&u0(n.changeHandlers,this,n.change),n&&n.cursorActivity&&(u0(n.cursorActivityHandlers,this,null),n.isVimOp&&(i=!0)),this.curOp=null),i&&this.scrollIntoView()}moveH(n,i){if(i=="char"){var a=this.getCursor();this.setCursor(a.line,a.ch+n)}}setOption(n,i){switch(n){case"keyMap":this.state.keyMap=i;break;case"textwidth":this.state.textwidth=i;break}}getOption(n){switch(n){case"firstLineNumber":return 1;case"tabSize":return this.cm6.state.tabSize||4;case"readOnly":return this.cm6.state.readOnly;case"indentWithTabs":return this.cm6.state.facet(Yb)==" ";case"indentUnit":return this.cm6.state.facet(Yb).length||2;case"textwidth":return this.state.textwidth;case"keyMap":return this.state.keyMap||"vim"}}toggleOverwrite(n){this.state.overwrite=n}getTokenTypeAt(n){var s,c,f;var i=this.indexFromPos(n),a=((f=(c=(s=r2(this.cm6.state,i))==null?void 0:s.resolve(i))==null?void 0:c.type)==null?void 0:f.name)||"";return/comment/i.test(a)?"comment":/string/i.test(a)?"string":""}overWriteSelection(n){var i=this.cm6.state.doc,a=this.cm6.state.selection,s=a.ranges.map(c=>{if(c.empty){var f=c.to<i.length?i.sliceString(c.from,c.to+1):"";if(f&&!/\n/.test(f))return dn.range(c.from,c.to+1)}return c});this.cm6.dispatch({selection:dn.create(s,a.mainIndex)}),this.replaceSelection(n)}isInMultiSelectMode(){return this.cm6.state.selection.ranges.length>1}virtualSelectionMode(){return!!this.virtualSelection}forEachSelection(n){var i=this.cm6.state.selection;this.virtualSelection=dn.create(i.ranges,i.mainIndex);for(var a=0;a<this.virtualSelection.ranges.length;a++){var s=this.virtualSelection.ranges[a];s&&(this.cm6.dispatch({selection:dn.create([s])}),n(),this.virtualSelection.ranges[a]=this.cm6.state.selection.ranges[0])}this.cm6.dispatch({selection:this.virtualSelection}),this.virtualSelection=null}hardWrap(n){return Xx(this,n)}};Ze.isMac=typeof navigator<"u"&&/Mac/.test(navigator.platform),Ze.Pos=Br,Ze.StringStream=FT,Ze.commands={cursorCharLeft:function(e){QT(e.cm6)},redo:function(e){d0(e,!1)},undo:function(e){d0(e,!0)},newlineAndIndent:function(e){BT({state:e.cm6.state,dispatch:n=>fs(e,n)})},indentAuto:function(e){tR(e.cm6)},newlineAndIndentContinueComment:void 0,save:void 0},Ze.isWordChar=function(e){return xd.test(e)},Ze.keys=Hx,Ze.addClass=function(e,n){},Ze.rmClass=function(e,n){},Ze.e_preventDefault=function(e){e.preventDefault()},Ze.e_stop=function(e){var n,i;(n=e==null?void 0:e.stopPropagation)==null||n.call(e),(i=e==null?void 0:e.preventDefault)==null||i.call(e)},Ze.lookupKey=function(e,n,i){var a=Ze.keys[e];!a&&/^Arrow/.test(e)&&(a=Ze.keys[e.slice(5)]),a&&i(a)},Ze.on=s0,Ze.off=l0,Ze.signal=c0,Ze.findMatchingTag=Qx,Ze.findEnclosingTag=Gx,Ze.keyName=void 0;function f0(e,n,i){var a=document.createElement("div");return a.appendChild(n),a}function p0(e,n){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=n}function Vx(e,n,i){p0(e,p);var a=f0(e,n,i&&i.bottom),s=!1,c,f=i&&i.duration!==void 0?i.duration:5e3;function p(){s||(s=!0,clearTimeout(c),a.remove(),h0(e,a))}return a.onclick=function(h){h.preventDefault(),p()},m0(e,a),f&&(c=setTimeout(p,f)),p}function m0(e,n){var i=e.state.dialog;e.state.dialog=n,n.style.flex="1",n&&i!==n&&(i&&i.contains(document.activeElement)&&e.focus(),i&&i.parentElement?i.parentElement.replaceChild(n,i):i&&i.remove(),Ze.signal(e,"dialog"))}function h0(e,n){e.state.dialog==n&&(e.state.dialog=null,Ze.signal(e,"dialog"))}function $x(e,n,i,a){a||(a={}),p0(e,void 0);var s=f0(e,n,a.bottom),c=!1;m0(e,s);function f(h){if(typeof h=="string")p.value=h;else{if(c)return;c=!0,h0(e,s),e.state.dialog||e.focus(),a.onClose&&a.onClose(s)}}var p=s.getElementsByTagName("input")[0];return p&&(a.value&&(p.value=a.value,a.selectValueOnOpen!==!1&&p.select()),a.onInput&&Ze.on(p,"input",function(h){a.onInput(h,p.value,f)}),a.onKeyUp&&Ze.on(p,"keyup",function(h){a.onKeyUp(h,p.value,f)}),Ze.on(p,"keydown",function(h){a&&a.onKeyDown&&a.onKeyDown(h,p.value,f)||(h.keyCode==13&&i&&i(p.value),(h.keyCode==27||a.closeOnEnter!==!1&&h.keyCode==13)&&(p.blur(),Ze.e_stop(h),f()))}),a.closeOnBlur!==!1&&Ze.on(p,"blur",function(){setTimeout(function(){document.activeElement!==p&&f()})}),p.focus()),f}var Wx={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function Ux(e){return e&&e.bracketRegex||/[(){}[\]]/}function Kx(e,n,i,a,s){for(var c=s&&s.maxScanLineLength||1e4,f=s&&s.maxScanLines||1e3,p=[],h=Ux(s),v=i>0?Math.min(n.line+f,e.lastLine()+1):Math.max(e.firstLine()-1,n.line-f),w=n.line;w!=v;w+=i){var _=e.getLine(w);if(_){var C=i>0?0:_.length-1,E=i>0?_.length:-1;if(!(_.length>c))for(w==n.line&&(C=n.ch-(i<0?1:0));C!=E;C+=i){var R=_.charAt(C);if(h.test(R)){var L=Wx[R];if(L&&L.charAt(1)==">"==i>0)p.push(R);else if(p.length)p.pop();else return{pos:new Br(w,C),ch:R}}}}}return w-i==(i>0?e.lastLine():e.firstLine())?!1:null}function Qx(e,n){return null}function Gx(e,n){var c,f,p;var i=e.cm6.state,a=e.indexFromPos(n);a<i.doc.length&&i.sliceDoc(a,a+1)=="<"&&a++;for(var s=((c=r2(i,a))==null?void 0:c.resolve(a))||null;s;){if(((f=s.firstChild)==null?void 0:f.type.name)=="OpenTag"&&((p=s.lastChild)==null?void 0:p.type.name)=="CloseTag")return{open:g0(i.doc,s.firstChild),close:g0(i.doc,s.lastChild)};s=s.parent}}function g0(e,n){return{from:Rr(e,n.from),to:Rr(e,n.to)}}var Jx=class{constructor(e,n,i){this.cm=e,this.id=e.$mid++,this.offset=n,this.assoc=i,e.marks[this.id]=this}clear(){delete this.cm.marks[this.id]}find(){return this.offset==null?null:this.cm.posFromIndex(this.offset)}update(e){this.offset!=null&&(this.offset=e.mapPos(this.offset,this.assoc,Xb.TrackDel))}};function Xx(e,n){var R;for(var i=n.column||e.getOption("textwidth")||80,a=n.allowMerge!=0,s=Math.min(n.from,n.to),c=Math.max(n.from,n.to);s<=c;){var f=e.getLine(s);if(f.length>i){var p=E(f,i,5);if(p){var h=(R=/^\s*/.exec(f))==null?void 0:R[0];e.replaceRange(`
73
+ `+h,new Br(s,p.start),new Br(s,p.end))}c++}else if(a&&/\S/.test(f)&&s!=c){var v=e.getLine(s+1);if(v&&/\S/.test(v)){var w=f.replace(/\s+$/,""),_=v.replace(/^\s+/,""),C=w+" "+_,p=E(C,i,5);p&&p.start>w.length||C.length<i?(e.replaceRange(" ",new Br(s,w.length),new Br(s+1,v.length-_.length)),s--,c--):w.length<f.length&&e.replaceRange("",new Br(s,w.length),new Br(s,f.length))}}s++}return s;function E(L,H,W){if(!(L.length<H)){var U=L.slice(0,H),A=L.slice(H),G=/^(?:(\s+)|(\S+)(\s+))/.exec(A),he=/(?:(\s+)|(\s+)(\S+))$/.exec(U),N=0,j=0;if(he&&!he[2]&&(N=H-he[1].length,j=H),G&&!G[2]&&(N||(N=H),j=H+G[1].length),N)return{start:N,end:j};if(he&&he[2]&&he.index>W)return{start:he.index,end:he.index+he[2].length};if(G&&G[2])return N=H+G[2].length,{start:N,end:N+G[3].length}}}}var kd=jT||(function(){let e={cursorBlinkRate:1200};return function(){return e}})(),Yx=class{constructor(e,n,i,a,s,c,f,p,h,v){this.left=e,this.top=n,this.height=i,this.fontFamily=a,this.fontSize=s,this.fontWeight=c,this.color=f,this.className=p,this.letter=h,this.partial=v}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",e.style.height=this.height+"px",e.style.lineHeight=this.height+"px",e.style.fontFamily=this.fontFamily,e.style.fontSize=this.fontSize,e.style.fontWeight=this.fontWeight,e.style.color=this.partial?"transparent":this.color,e.className=this.className,e.textContent=this.letter}eq(e){return this.left==e.left&&this.top==e.top&&this.height==e.height&&this.fontFamily==e.fontFamily&&this.fontSize==e.fontSize&&this.fontWeight==e.fontWeight&&this.color==e.color&&this.className==e.className&&this.letter==e.letter}},Zx=class{constructor(e,n){this.view=e,this.rangePieces=[],this.cursors=[],this.cm=n,this.measureReq={read:this.readPos.bind(this),write:this.drawSel.bind(this)},this.cursorLayer=e.scrollDOM.appendChild(document.createElement("div")),this.cursorLayer.className="cm-cursorLayer cm-vimCursorLayer",this.cursorLayer.setAttribute("aria-hidden","true"),e.requestMeasure(this.measureReq),this.setBlinkRate()}setBlinkRate(){let e=kd(this.cm.cm6.state).cursorBlinkRate;this.cursorLayer.style.animationDuration=e+"ms"}update(e){(e.selectionSet||e.geometryChanged||e.viewportChanged)&&(this.view.requestMeasure(this.measureReq),this.cursorLayer.style.animationName=this.cursorLayer.style.animationName=="cm-blink"?"cm-blink2":"cm-blink"),ek(e)&&this.setBlinkRate()}scheduleRedraw(){this.view.requestMeasure(this.measureReq)}readPos(){let{state:e}=this.view,n=[];for(let i of e.selection.ranges){let a=i==e.selection.main,s=rk(this.cm,this.view,i,a);s&&n.push(s)}return{cursors:n}}drawSel({cursors:e}){if(e.length!=this.cursors.length||e.some((n,i)=>!n.eq(this.cursors[i]))){let n=this.cursorLayer.children;if(n.length!==e.length){this.cursorLayer.textContent="";for(let i of e)this.cursorLayer.appendChild(i.draw())}else e.forEach((i,a)=>i.adjust(n[a]));this.cursors=e}}destroy(){this.cursorLayer.remove()}};function ek(e){return kd(e.startState)!=kd(e.state)}var tk=yu.highest(Tn.theme({".cm-vimMode .cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-fat-cursor":{position:"absolute",background:"#ff9696",border:"none",whiteSpace:"pre"},"&:not(.cm-focused) .cm-fat-cursor":{background:"none",outline:"solid 1px #ff9696",color:"transparent !important"}}));function nk(e){let n=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==zT.LTR?n.left:n.right-e.scrollDOM.clientWidth)-e.scrollDOM.scrollLeft*e.scaleX,top:n.top-e.scrollDOM.scrollTop*e.scaleY}}function rk(e,n,i,a){var w,_,C;var s;let c=i.head,f=!1,p=1,h=e.state.vim;if(h&&(!h.insertMode||e.state.overwrite)){if(f=!0,h.visualBlock&&!a)return null;i.anchor<i.head&&(c<n.state.doc.length&&n.state.sliceDoc(c,c+1))!=`
74
+ `&&c--,e.state.overwrite?p=.2:h.status&&(p=.5)}if(f){let E=c<n.state.doc.length&&n.state.sliceDoc(c,c+1);E&&/[\uDC00-\uDFFF]/.test(E)&&c>1&&(c--,E=n.state.sliceDoc(c,c+1));let R=n.coordsAtPos(c,1);if(!R)return null;let L=nk(n),H=n.domAtPos(c),W=H?H.node:n.contentDOM;for(W instanceof Text&&H.offset>=W.data.length&&((w=W.parentElement)==null?void 0:w.nextSibling)&&(W=(_=W.parentElement)==null?void 0:_.nextSibling,H={node:W,offset:0});H&&H.node instanceof HTMLElement;)W=H.node,H={node:H.node.childNodes[H.offset],offset:0};if(!(W instanceof HTMLElement)){if(!W.parentNode)return null;W=W.parentNode}let U=getComputedStyle(W),A=R.left,G=(C=(s=n).coordsForChar)==null?void 0:C.call(s,c);if(G&&(A=G.left),!E||E==`
75
+ `||E=="\r")E="\xA0";else if(E==" "){E="\xA0";var v=n.coordsAtPos(c+1,-1);v&&(A=v.left-(v.left-R.left)/parseInt(U.tabSize))}else/[\uD800-\uDBFF]/.test(E)&&c<n.state.doc.length-1&&(E+=n.state.sliceDoc(c+1,c+2));let he=R.bottom-R.top;return new Yx((A-L.left)/n.scaleX,(R.top-L.top+he*(1-p))/n.scaleY,he*p/n.scaleY,U.fontFamily,U.fontSize,U.fontWeight,U.color,a?"cm-fat-cursor cm-cursor-primary":"cm-fat-cursor cm-cursor-secondary",E,p!=1)}else return null}let y0,v0,b0,w0;y0=typeof navigator<"u"&&/linux/i.test(navigator.platform)&&/ Gecko\/\d+/.exec(navigator.userAgent),Di=Bx(Ze),v0=250,b0=Tn.baseTheme({".cm-vimMode .cm-cursorLayer:not(.cm-vimCursorLayer)":{display:"none"},".cm-vim-panel":{padding:"0px 10px",fontFamily:"monospace",minHeight:"1.3em",display:"flex"},".cm-vim-panel input":{border:"none",outline:"none",backgroundColor:"inherit"},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"}}),w0=ia.fromClass(class{constructor(e){this.status="",this.query=null,this.decorations=Ti.none,this.waitForCopy=!1,this.lastKeydown="",this.useNextTextInput=!1,this.compositionText="",this.view=e;let n=this.cm=new Ze(e);Di.enterVimMode(this.cm),this.view.cm=this.cm,this.cm.state.vimPlugin=this,this.blockCursor=new Zx(e,n),this.updateClass(),this.cm.on("vim-command-done",()=>{n.state.vim&&(n.state.vim.status=""),this.blockCursor.scheduleRedraw(),this.updateStatus()}),this.cm.on("vim-mode-change",i=>{n.state.vim&&(n.state.vim.mode=i.mode,i.subMode&&(n.state.vim.mode+=" block"),n.state.vim.status="",this.blockCursor.scheduleRedraw(),this.updateClass(),this.updateStatus())}),this.cm.on("dialog",()=>{this.cm.state.statusbar?this.updateStatus():e.dispatch({effects:_0.of(!!this.cm.state.dialog)})}),this.dom=document.createElement("span"),this.spacer=document.createElement("span"),this.spacer.style.flex="1",this.statusButton=document.createElement("span"),this.statusButton.onclick=i=>{Di.handleKey(this.cm,"<Esc>","user"),this.cm.focus()},this.statusButton.style.cssText="cursor: pointer"}update(e){var n;if((e.viewportChanged||e.docChanged)&&this.query&&this.highlight(this.query),e.docChanged&&this.cm.onChange(e),e.selectionSet&&this.cm.onSelectionChange(),e.viewportChanged,this.cm.curOp&&!this.cm.curOp.isVimOp&&this.cm.onBeforeEndOperation(),e.transactions){for(let i of e.transactions)for(let a of i.effects)if(a.is(tm))if(!((n=a.value)!=null&&n.forVim))this.highlight(null);else{let s=a.value.create();this.highlight(s)}}this.blockCursor.update(e)}updateClass(){let e=this.cm.state;!e.vim||e.vim.insertMode&&!e.overwrite?this.view.scrollDOM.classList.remove("cm-vimMode"):this.view.scrollDOM.classList.add("cm-vimMode")}updateStatus(){let e=this.cm.state.statusbar,n=this.cm.state.vim;if(!e||!n)return;let i=this.cm.state.dialog;if(i)i.parentElement!=e&&(e.textContent="",e.appendChild(i));else{e.textContent="";var a=(n.mode||"normal").toUpperCase();n.insertModeReturn&&(a+="(C-O)"),this.statusButton.textContent=`--${a}--`,e.appendChild(this.statusButton),e.appendChild(this.spacer)}this.dom.textContent=n.status,e.appendChild(this.dom)}destroy(){Di.leaveVimMode(this.cm),this.updateClass(),this.blockCursor.destroy(),delete this.view.cm}highlight(e){if(this.query=e,!e)return this.decorations=Ti.none;let{view:n}=this,i=new t2;for(let a=0,s=n.visibleRanges,c=s.length;a<c;a++){let{from:f,to:p}=s[a];for(;a<c-1&&p>s[a+1].from-2*v0;)p=s[++a].to;e.highlight(n.state,f,p,(h,v)=>{i.add(h,v,ok)})}return this.decorations=i.finish()}handleKey(e,n){let i=this.cm,a=i.state.vim;if(!a)return;let s=Di.vimKeyFromEvent(e,a);if(Ze.signal(this.cm,"inputEvent",{type:"handleKey",key:s}),!s)return;if(s=="<Esc>"&&!a.insertMode&&!a.visualMode&&this.query){let f=a.searchState_;f&&(i.removeOverlay(f.getOverlay()),f.setOverlay(null))}if(s==="<C-c>"&&!Ze.isMac&&i.somethingSelected())return this.waitForCopy=!0,!0;a.status=(a.status||"")+s;let c=Di.multiSelectHandleKey(i,s,"user");return a=Di.maybeInitVimState_(i),!c&&a.insertMode&&i.state.overwrite&&(e.key&&e.key.length==1&&!/\n/.test(e.key)?(c=!0,i.overWriteSelection(e.key)):e.key=="Backspace"&&(c=!0,Ze.commands.cursorCharLeft(i))),c&&(Ze.signal(this.cm,"vim-keypress",s),e.preventDefault(),e.stopPropagation(),this.blockCursor.scheduleRedraw()),this.updateStatus(),!!c}},{eventHandlers:{copy:function(e,n){this.waitForCopy&&(this.waitForCopy=!1,Promise.resolve().then(()=>{var i=this.cm,a=i.state.vim;a&&(a.insertMode?i.setSelection(i.getCursor(),i.getCursor()):i.operation(()=>{i.curOp&&(i.curOp.isVimOp=!0),Di.handleKey(i,"<Esc>","user")}))}))},compositionstart:function(e,n){this.useNextTextInput=!0,Ze.signal(this.cm,"inputEvent",e)},compositionupdate:function(e,n){Ze.signal(this.cm,"inputEvent",e)},compositionend:function(e,n){Ze.signal(this.cm,"inputEvent",e)},keypress:function(e,n){Ze.signal(this.cm,"inputEvent",e),this.lastKeydown=="Dead"&&this.handleKey(e,n)},keydown:function(e,n){Ze.signal(this.cm,"inputEvent",e),this.lastKeydown=e.key,this.lastKeydown=="Unidentified"||this.lastKeydown=="Process"||this.lastKeydown=="Dead"?this.useNextTextInput=!0:(this.useNextTextInput=!1,this.handleKey(e,n))}},provide:()=>[Tn.inputHandler.of((e,n,i,a)=>{var w,_;var s=Ll(e);if(!s)return!1;var c=(w=s.state)==null?void 0:w.vim,f=s.state.vimPlugin;if(c&&!c.insertMode&&!((_=s.curOp)!=null&&_.isVimOp)){if(a==="\0\0")return!0;if(Ze.signal(s,"inputEvent",{type:"text",text:a,from:n,to:i}),a.length==1&&f.useNextTextInput){if(c.expectLiteralNext&&e.composing)return f.compositionText=a,!1;if(f.compositionText){var p=f.compositionText;f.compositionText="";var h=e.state.selection.main.head;if(p===e.state.sliceDoc(h-p.length,h)){var v=s.getCursor();s.replaceRange("",s.posFromIndex(h-p.length),v)}}return f.handleKey({key:a,preventDefault:()=>{},stopPropagation:()=>{}}),ik(e),!0}}return!1})],decorations:e=>e.decorations});function ik(e){var n=e.scrollDOM.parentElement;if(n){if(y0){e.contentDOM.textContent="\0\0",e.contentDOM.dispatchEvent(new CustomEvent("compositionend"));return}var i=e.scrollDOM.nextSibling,a=window.getSelection(),s=a&&{anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset};e.scrollDOM.remove(),n.insertBefore(e.scrollDOM,i);try{s&&a&&(a.setPosition(s.anchorNode,s.anchorOffset),s.focusNode&&a.extend(s.focusNode,s.focusOffset))}catch(c){console.error(c)}e.focus(),e.contentDOM.dispatchEvent(new CustomEvent("compositionend"))}}var ok=Ti.mark({class:"cm-searchMatch"}),_0=na.define(),ak=hu.define({create:()=>!1,update(e,n){for(let i of n.effects)i.is(_0)&&(e=i.value);return e},provide:e=>em.from(e,n=>n?sk:null)});function sk(e){let n=document.createElement("div");n.className="cm-vim-panel";let i=e.cm;return i.state.dialog&&n.appendChild(i.state.dialog),{top:!1,dom:n}}function lk(e){let n=document.createElement("div");n.className="cm-vim-panel";let i=e.cm;return i.state.statusbar=n,i.state.vimPlugin.updateStatus(),{dom:n}}W2=function(e={}){return[b0,w0,tk,e.status?em.of(lk):ak]},Ll=function(e){return e.cm||null},Dm=function(e){let n=e.state.selection.main;return n.from===0&&n.to===0},Ym=function(e,n=!1){let i=e.state.selection.main,a=e.state.doc.length;return n&&i.from===a-1&&i.to===a-1?!0:i.from===a&&i.to===a},X2=function(e){e&&e.dispatch({selection:{anchor:e.state.doc.length,head:e.state.doc.length}})},N2=function(e){var n;return((n=Ll(e))==null?void 0:n.state.vim)!=null},O2=function(e){var i;let n=(i=Ll(e))==null?void 0:i.state.vim;return n?!n.mode&&!n.insertMode&&!n.visualMode?!0:n.mode==="normal":!1},Mw=function(e){e&&e.dispatch({selection:{anchor:0,head:e.state.doc.length}})};function x0(e,n){if(!(n!=null&&n.length))return Ti.none;let i=new t2,a=e.facet(ua),s=n.filter(c=>c.kind==="cell"&&c.cellId===a).sort((c,f)=>c.lineNumber-f.lineNumber);for(let c of s){let f=e.doc.line(c.lineNumber),p=Ti.line({class:"cm-error-line"});i.add(f.from,f.from,p)}return i.finish()}var ck=class{constructor(e,n){this.decorations=x0(e.state,n.get()),this.unsubscribe=n.sub(i=>{let a=this.decorations.size;this.decorations=x0(e.state,i),a!==this.decorations.size&&e.dispatch({userEvent:"marimo.error-decoration-update"})})}update(e){this.decorations=this.decorations.map(e.changes)}destroy(){this.unsubscribe()}};function uk(e){return ia.define(n=>new ck(n,e),{decorations:n=>n.decorations})}function dk(e){return[uk(e),Tn.theme({".cm-error-line":{backgroundColor:"color-mix(in srgb, var(--red-4) 40%, transparent)"},"&.cm-focused .cm-error-line.cm-activeLine":{backgroundColor:"color-mix(in srgb, var(--red-6) 40%, transparent)"}})]}function fk({cellId:e,hotkeys:n}){let i=[];return i.push({key:n.getHotkey("cell.run").key,preventDefault:!0,stopPropagation:!0,run:a=>(a.state.facet(Dt).onRun(),!0)},{key:n.getHotkey("cell.runAndNewBelow").key,preventDefault:!0,stopPropagation:!0,run:a=>{let s=a.state.facet(Dt);return s.onRun(),e==="__scratch__"||(a.contentDOM.blur(),s.moveToNextCell({cellId:e,before:!1})),!0}},{key:n.getHotkey("cell.runAndNewAbove").key,preventDefault:!0,stopPropagation:!0,run:a=>{let s=a.state.facet(Dt);return s.onRun(),e==="__scratch__"||(a.contentDOM.blur(),s.moveToNextCell({cellId:e,before:!0})),!0}},{key:n.getHotkey("cell.aiCompletion").key,preventDefault:!0,stopPropagation:!0,run:a=>(a.state.facet(Dt).aiCellCompletion()&&a.contentDOM.focus(),!0)}),e!=="__scratch__"&&i.push({key:n.getHotkey("cell.goToDefinition").key,preventDefault:!0,stopPropagation:!0,run:a=>(mm(a),!0)},{key:n.getHotkey("cell.delete").key,preventDefault:!0,stopPropagation:!0,run:a=>(a.state.doc.length===0&&a.state.facet(Dt).deleteCell(),!0)},{key:n.getHotkey("cell.moveUp").key,preventDefault:!0,stopPropagation:!0,run:a=>(a.state.facet(Dt).moveCell({cellId:e,before:!0}),!0)},{key:n.getHotkey("cell.moveDown").key,preventDefault:!0,stopPropagation:!0,run:a=>(a.state.facet(Dt).moveCell({cellId:e,before:!1}),!0)},{key:n.getHotkey("cell.moveLeft").key,preventDefault:!0,stopPropagation:!0,run:a=>(a.state.facet(Dt).moveCell({cellId:e,before:!0,direction:"left"}),!0)},{key:n.getHotkey("cell.moveRight").key,preventDefault:!0,stopPropagation:!0,run:a=>(a.state.facet(Dt).moveCell({cellId:e,before:!1,direction:"right"}),!0)},{key:"ArrowUp",preventDefault:!0,stopPropagation:!0,run:a=>p2(a.state)?!1:Dm(a)?(a.state.facet(Dt).moveToNextCell({cellId:e,before:!0,noCreate:!0}),!0):!1},{key:"ArrowDown",preventDefault:!0,stopPropagation:!0,run:a=>p2(a.state)?!1:Ym(a)?(a.state.facet(Dt).moveToNextCell({cellId:e,before:!1,noCreate:!0}),!0):!1},{key:n.getHotkey("cell.focusDown").key,preventDefault:!0,stopPropagation:!0,run:a=>(a.state.facet(Dt).moveToNextCell({cellId:e,before:!1,noCreate:!0}),!0)},{key:n.getHotkey("cell.focusUp").key,preventDefault:!0,stopPropagation:!0,run:a=>(a.state.facet(Dt).moveToNextCell({cellId:e,before:!0,noCreate:!0}),!0)},{key:n.getHotkey("cell.sendToBottom").key,preventDefault:!0,stopPropagation:!0,run:a=>(a.state.facet(Dt).sendToBottom({cellId:e}),!0)},{key:n.getHotkey("cell.sendToTop").key,preventDefault:!0,stopPropagation:!0,run:a=>(a.state.facet(Dt).sendToTop({cellId:e}),!0)},{key:n.getHotkey("cell.createAbove").key,preventDefault:!0,stopPropagation:!0,run:a=>(a.contentDOM.blur(),a.state.facet(Dt).createNewCell({cellId:e,before:!0}),!0)},{key:n.getHotkey("cell.createBelow").key,preventDefault:!0,stopPropagation:!0,run:a=>(a.contentDOM.blur(),a.state.facet(Dt).createNewCell({cellId:e,before:!1}),!0)},{key:n.getHotkey("cell.hideCode").key,preventDefault:!0,stopPropagation:!0,run:a=>{var c;let s=a.state.facet(Dt).toggleHideCode();return m2(a),s?(a.contentDOM.blur(),(c=document.getElementById(cr.create(e)))==null||c.focus()):a.contentDOM.focus(),!0}},{key:n.getHotkey("cell.splitCell").key,preventDefault:!0,stopPropagation:!0,run:a=>{let s=a.state.facet(Dt);return s.splitCell({cellId:e}),s.moveToNextCell&&requestAnimationFrame(()=>{a.contentDOM.blur(),s.moveToNextCell({cellId:e,before:!1})}),!0}}),[yu.high(ra.of(i))]}function pk(e){return[Tn.updateListener.of(n=>{if(n.docChanged){let i=n.transactions.some(f=>f.effects.some(p=>p.is(ma))),a=ri(n.view),s=n.view.state.facet(Dt),c=n.view.state.facet(ua);s.updateCellCode({cellId:c,code:a,formattingChange:i})}}),gx(e)]}function mk({predicate:e}){return Tn.updateListener.of(n=>{n.docChanged&&n.view.hasFocus&&e()&&(n.transactions.some(i=>i.effects.some(a=>a.is(ma)))||n.view.state.facet(Dt).onRun())})}T2=function({cellId:e,hotkeys:n,cellActions:i}){return[Dt.of(i),ua.of(e),fk({cellId:e,hotkeys:n}),pk(n),dk(px(NE(e),ct))]};const k0=async e=>{let n=e.state.doc.sliceString(0,e.pos),i=document.activeElement,a=null;if(i!==null){let f=cr.findElement(i);f!==null&&(a=cr.parse(f.id))}if(a===null)return Pe.error("Failed to find active cell."),null;let s=await Ru.request({document:n,cellId:a});if(!s)return null;let c=_d.asHoverTooltip({position:e.pos,message:s,limitToType:"tooltip"});return c&&ct.set(ku,{documentation:c.html??null}),c?null:_d.asCompletionResult(e.pos,s)};function hk(e){return n=>e.predicate(n.state)?e.completion(n):null}var gk=async e=>{let n=e.matchBefore(/:\w*$/);if(!e.explicit&&!n)return null;let i=await yk();return{from:(n==null?void 0:n.from)??e.pos,options:i,validFor:/^[\w:]*$/}},yk=ti(async()=>{let e=await fetch("https://unpkg.com/emojilib@3.0.11/dist/emoji-en-US.json").then(n=>{if(!n.ok)throw Error("Failed to fetch emoji list");return n.json()}).catch(()=>({}));return Object.entries(e).map(([n,i])=>({shortcode:i[0],label:i.map(a=>`:${a}`).join(" "),emoji:n,displayLabel:`${n} ${i[0].replaceAll("_"," ")}`,apply:n,type:"emoji"}))}),vk=async e=>{let n=e.matchBefore(/::[\w-:]*$/);if(!e.explicit&&!n)return null;let i=await bk();return{from:(n==null?void 0:n.from)??e.pos,options:i,validFor:/^[\w-:]*$/}},bk=ti(async()=>{let e=await fetch("https://unpkg.com/lucide-static@0.452.0/tags.json").then(i=>{if(!i.ok)throw Error("Failed to fetch Lucide icon list");return i.json()}).catch(()=>({})),n=i=>`https://cdn.jsdelivr.net/npm/lucide-static@0.452.0/icons/${i}.svg`;return Object.entries(e).map(([i,a])=>({label:`::${i}`,displayLabel:i,type:"lucide-icon",boost:10,apply:`::lucide:${i}::`,detail:a.join(", "),info:()=>{let s=document.createElement("img");return s.src=n(i),s.style.width="24px",s.style.height="24px",s}}))}),wk=e=>{let n=e.matchBefore(/\\\w*$/);return!e.explicit&&!n?null:{from:(n==null?void 0:n.from)??e.pos,options:_k(),validFor:/^[\w\\]*$/}},_k=ti(()=>[["alpha","\u03B1","Greek small letter alpha"],["beta","\u03B2","Greek small letter beta"],["gamma","\u03B3","Greek small letter gamma"],["delta","\u03B4","Greek small letter delta"],["epsilon","\u03B5","Greek small letter epsilon"],["zeta","\u03B6","Greek small letter zeta"],["eta","\u03B7","Greek small letter eta"],["theta","\u03B8","Greek small letter theta"],["iota","\u03B9","Greek small letter iota"],["kappa","\u03BA","Greek small letter kappa"],["lambda","\u03BB","Greek small letter lambda"],["mu","\u03BC","Greek small letter mu"],["nu","\u03BD","Greek small letter nu"],["xi","\u03BE","Greek small letter xi"],["omicron","\u03BF","Greek small letter omicron"],["pi","\u03C0","Greek small letter pi"],["rho","\u03C1","Greek small letter rho"],["sigma","\u03C3","Greek small letter sigma"],["tau","\u03C4","Greek small letter tau"],["upsilon","\u03C5","Greek small letter upsilon"],["phi","\u03C6","Greek small letter phi"],["chi","\u03C7","Greek small letter chi"],["psi","\u03C8","Greek small letter psi"],["omega","\u03C9","Greek small letter omega"],["Gamma","\u0393","Greek capital letter gamma"],["Delta","\u0394","Greek capital letter delta"],["Theta","\u0398","Greek capital letter theta"],["Lambda","\u039B","Greek capital letter lambda"],["Xi","\u039E","Greek capital letter xi"],["Pi","\u03A0","Greek capital letter pi"],["Sigma","\u03A3","Greek capital letter sigma"],["Phi","\u03A6","Greek capital letter phi"],["Psi","\u03A8","Greek capital letter psi"],["Omega","\u03A9","Greek capital letter omega"],["pm","\xB1","Plus-minus sign"],["mp","\u2213","Minus-plus sign"],["times","\xD7","Multiplication sign"],["div","\xF7","Division sign"],["cdot","\u22C5","Dot operator"],["ast","\u2217","Asterisk operator"],["star","\u22C6","Star operator"],["circ","\u2218","Ring operator"],["bullet","\u2022","Bullet"],["cap","\u2229","Intersection"],["cup","\u222A","Union"],["uplus","\u228E","Multiset union"],["sqcap","\u2293","Square cap"],["sqcup","\u2294","Square cup"],["vee","\u2228","Logical or"],["wedge","\u2227","Logical and"],["setminus","\u2216","Set minus"],["oplus","\u2295","Circled plus"],["ominus","\u2296","Circled minus"],["otimes","\u2297","Circled times"],["oslash","\u2298","Circled division slash"],["odot","\u2299","Circled dot operator"],["leq","\u2264","Less than or equal to"],["geq","\u2265","Greater than or equal to"],["equiv","\u2261","Identical to"],["prec","\u227A","Precedes"],["succ","\u227B","Succeeds"],["sim","\u223C","Tilde operator"],["perp","\u22A5","Up tack"],["mid","\u2223","Divides"],["parallel","\u2225","Parallel to"],["subset","\u2282","Subset of"],["supset","\u2283","Superset of"],["subseteq","\u2286","Subset of or equal to"],["supseteq","\u2287","Superset of or equal to"],["cong","\u2245","Approximately equal to"],["approx","\u2248","Almost equal to"],["neq","\u2260","Not equal to"],["ne","\u2260","Not equal to"],["propto","\u221D","Proportional to"],["leftarrow","\u2190","Leftward arrow"],["rightarrow","\u2192","Rightward arrow"],["Leftarrow","\u21D0","Leftward double arrow"],["Rightarrow","\u21D2","Rightward double arrow"],["leftrightarrow","\u2194","Left right arrow"],["Leftrightarrow","\u21D4","Left right double arrow"],["uparrow","\u2191","Upward arrow"],["downarrow","\u2193","Downward arrow"],["Uparrow","\u21D1","Upward double arrow"],["Downarrow","\u21D3","Downward double arrow"],["infty","\u221E","Infinity"],["nabla","\u2207","Nabla"],["partial","\u2202","Partial differential"],["forall","\u2200","For all"],["exists","\u2203","There exists"],["nexists","\u2204","There does not exist"],["emptyset","\u2205","Empty set"],["in","\u2208","Element of"],["notin","\u2209","Not an element of"],["sum","\u2211","N-ary summation"],["prod","\u220F","N-ary product"],["int","\u222B","Integral"],["oint","\u222E","Contour integral"],["sqrt","\u221A","Square root"],["hbar","\u210F","Planck constant over 2pi"],["ldots","\u2026","Horizontal ellipsis"],["cdots","\u22EF","Midline horizontal ellipsis"],["vdots","\u22EE","Vertical ellipsis"],["ddots","\u22F1","Down right diagonal ellipsis"]].map(([e,n,i])=>({label:`\\${e} ${i}`,displayLabel:e,type:"latex-symbol",boost:10,apply:`\\${e}`,info:()=>{let a=document.createElement("div");return a.textContent=`${n} ${i}`,a},detail:n})));let C0;C0=[gk,vk,wk],Du={isAbsolute:e=>e.startsWith("/")||e.startsWith("\\")||e.startsWith("C:\\"),dirname:e=>ql.guessDeliminator(e).dirname(e),basename:e=>ql.guessDeliminator(e).basename(e),rest:(e,n)=>ql.guessDeliminator(e).rest(e,n),extension:e=>{let n=e.split(".");return n.length===1?"":n.at(-1)??""}},ql=class nh{constructor(n){this.deliminator=n}static guessDeliminator(n){return n.includes("/")?new nh("/"):new nh("\\")}join(...n){return n.filter(Boolean).join(this.deliminator)}basename(n){return n.split(this.deliminator).pop()??""}rest(n,i){let a=n.split(this.deliminator),s=i.split(this.deliminator),c=0;for(;c<a.length&&c<s.length&&a[c]===s[c];++c);return a.slice(c).join(this.deliminator)}dirname(n){let i=n.split(this.deliminator);return i.pop(),i.join(this.deliminator)}};function ha(e){return!e.state.selection.main.empty}function Cd({view:e,selection:n,markup:i}){let a=[],s=!0;for(let c=n.from;c<=n.to;c++)if(!e.state.doc.lineAt(c).text.startsWith(i)){s=!1;break}for(let c=n.from;c<=n.to;){let f=e.state.doc.lineAt(c),p=f.text.startsWith(i);s?a.push({from:f.from,to:f.from+i.length,insert:oa.of([""])}):(p&&a.push({from:f.from,to:f.from+i.length,insert:oa.of([""])}),a.push({from:f.from,insert:oa.of([i])})),c=f.to+1}return a}function Sd({view:e,range:n,markupAfter:i,markupBefore:a}){if(n.empty){let v=e.state.wordAt(n.head);v&&(n=v)}let s=e.state.sliceDoc(n.from-a.length,n.from)===a,c=e.state.sliceDoc(n.to,n.to+i.length)===i,f=[];f.push(s?{from:n.from-a.length,to:n.from,insert:oa.of([""])}:{from:n.from,insert:oa.of(a.split(`
76
+ `))},c?{from:n.to,to:n.to+i.length,insert:oa.of([""])}:{from:n.to,insert:oa.of(i.split(`
77
+ `))});let p=s?-a.length:a.length,h=c?-i.length:i.length;return{changes:f,range:dn.range(n.from+p,n.to+h)}}function xk(e){if(!ha(e))return!1;let n=Cd({view:e,selection:e.state.selection.main,markup:"> "});return n.length>0&&e.dispatch(e.state.update({changes:n,scrollIntoView:!0,userEvent:"input"})),e.focus(),!0}function kk(e){if(!ha(e))return!1;let n=e.state.changeByRange(i=>{if(i.empty){let a=e.state.wordAt(i.head);a&&(i=a)}return Sd({view:e,range:i,markupBefore:"**",markupAfter:"**"})});return e.dispatch(e.state.update(n,{scrollIntoView:!0,annotations:os.userEvent.of("input")})),e.focus(),!0}function S0(e){if(!ha(e))return!1;let n=e.state.changeByRange(i=>{if(i.empty){let s=e.state.wordAt(i.head);s&&(i=s)}let a=e.state.doc.lineAt(i.from).number!==e.state.doc.lineAt(i.to).number;return Sd({view:e,range:i,markupBefore:a?"```\n":"`",markupAfter:a?"\n```":"`"})});return e.dispatch(e.state.update(n,{scrollIntoView:!0,annotations:os.userEvent.of("input")})),e.focus(),!0}function Ck(e){let n=e.state.changeByRange(i=>{if(i.empty){let a=e.state.wordAt(i.head);a&&(i=a)}return Sd({view:e,range:i,markupBefore:"_",markupAfter:"_"})});return e.dispatch(e.state.update(n,{scrollIntoView:!0,annotations:os.userEvent.of("input")})),e.focus(),!0}function E0(e,n="http://"){if(!ha(e))return!1;let i=e.state.changeByRange(s=>{let c=e.state.sliceDoc(s.from,s.to);return{changes:[{from:s.from,to:s.to,insert:`[${c}](${n})`}],range:s}});e.dispatch(e.state.update(i,{scrollIntoView:!0,annotations:os.userEvent.of("input")}));let{to:a}=i.selection.main;try{e.dispatch({selection:dn.create([dn.range(a+3,a+3+n.length),dn.cursor(a+3+n.length)])})}catch{}return e.focus(),!0}eh=async function(e,n){var p;let i=new FileReader,a=await new Promise(h=>{i.onload=()=>h(i.result),i.readAsDataURL(n)}),s;try{if(a.startsWith("data:")){let h=a.split(",")[1],v=prompt("We can save your image as a file. Enter a filename.",n.name),w=n.type.split("/")[1];if(v!==null){v.trim()===""?v=n.name:v.endsWith(`.${w}`)||(v=`${v}.${w}`);let _=ct.get(ss),C=_?Du.dirname(_):null,E=C?`${C}/public`:"public",R=await Ri().sendCreateFileOrFolder({path:E,type:"file",name:v,contents:h});R.success?(s=(p=R.info)==null?void 0:p.path,wu({title:"Image uploaded successfully",description:`We've uploaded your image at ${s}`})):wu({title:"Failed to upload image. Using raw base64 string."})}}}catch{wu({title:"Failed to upload image. Using raw base64 string."})}let c=e.state.changeByRange(h=>{let v=e.state.sliceDoc(h.from,h.to);return{changes:[{from:h.from,to:h.to,insert:`![${v}](${s??a})`}],range:h}});e.dispatch(e.state.update(c,{scrollIntoView:!0,annotations:os.userEvent.of("input")}));let{to:f}=c.selection.main;try{e.dispatch({selection:dn.create([dn.range(f+4,f+4+a.length),dn.cursor(f+4+a.length)])})}catch{}return e.focus(),!0},Im=async function(e,n){let i=await n.text(),a=e.state.changeByRange(s=>({changes:[{from:s.from,to:s.from,insert:i}],range:s}));return e.dispatch(e.state.update(a,{scrollIntoView:!0,annotations:os.userEvent.of("input")})),e.focus(),!0};function Sk(e){if(!ha(e))return!1;let{changes:n}=e.state.changeByRange(i=>({range:i,changes:Cd({view:e,selection:i,markup:e.state.sliceDoc(i.from,i.to+2).startsWith("* ")?"* ":"- "})}));return n.length>0&&e.dispatch(e.state.update({changes:n,scrollIntoView:!0,userEvent:"input"})),e.focus(),!0}function Ek(e){if(!ha(e))return!1;let{changes:n}=e.state.changeByRange(i=>({range:i,changes:Cd({view:e,selection:i,markup:"1. "})}));return n.length>0&&e.dispatch(e.state.update({changes:n,scrollIntoView:!0,userEvent:"input"})),e.focus(),!0}function Tk(e){return[yu.highest(ra.of([{key:e.getHotkey("markdown.bold").key,stopPropagation:!0,run:kk},{key:e.getHotkey("markdown.italic").key,stopPropagation:!0,run:Ck},{key:e.getHotkey("markdown.link").key,stopPropagation:!0,run:n=>E0(n)},{key:e.getHotkey("markdown.orderedList").key,run:Ek},{key:e.getHotkey("markdown.unorderedList").key,run:Sk},{key:e.getHotkey("markdown.blockquote").key,run:xk},{key:e.getHotkey("markdown.code").key,run:S0},{key:"`",run:S0}])),Tn.domEventHandlers({paste:(n,i)=>{var s;if(i.state.selection.main.empty)return!1;let a=(s=n.clipboardData)==null?void 0:s.getData("text/plain");a!=null&&a.startsWith("http")&&(n.preventDefault(),E0(i,a))}}),Tn.domEventHandlers({paste:(n,i)=>{var s;let a=(s=n.clipboardData)==null?void 0:s.files[0];if(!a)return!1;if(a.type.startsWith("image/"))return n.preventDefault(),eh(i,a),!0;if(a.type.startsWith("text/"))return n.preventDefault(),Im(i,a),!0}})]}function Rk(e,n,i=3,a=""){return Object.values(e).flatMap(s=>n.has(s.name)?[]:{label:`${a}${s.name}`,displayLabel:s.name,detail:s.dataType??"",boost:i,type:"variable",apply:`${a}${s.name}`,section:"Variable",info:()=>Xm(s)})}Xm=function(e){let n=document.createElement("div");n.classList.add("mo-cm-tooltip","docs-documentation","min-w-[200px]","flex","flex-col","gap-1","p-2");let i=document.createElement("div");i.classList.add("flex","items-center","gap-2");let a=document.createElement("span");if(a.classList.add("font-bold","text-base"),a.textContent=e.name,i.append(a),e.dataType){let s=document.createElement("span");s.classList.add("text-xs","px-1.5","py-0.5","rounded-full","bg-purple-100","text-purple-800","dark:bg-purple-900","dark:text-purple-200"),s.textContent=e.dataType,i.append(s)}if(n.append(i),e.value){let s=document.createElement("div");s.classList.add("flex","flex-col","gap-1");let c=document.createElement("div");c.classList.add("text-xs","text-muted-foreground"),c.textContent="Value:",s.append(c);let f=document.createElement("div");f.classList.add("text-xs","font-mono","bg-muted","p-2","rounded","overflow-auto","max-h-40"),f.textContent=e.value,s.append(f),n.append(s)}return n};var ga="Python",Ed=123,T0=125,Td=1,Dk={mark:`${ga}Mark`,resolve:ga};function Ok(e,n){return{defineNodes:[{name:ga,style:mu.emphasis},{name:`${ga}Mark`,style:mu.processingInstruction}],parseInline:[{name:ga,parse(i,a,s){return!n()||a!==Ed&&a!==T0||a===Ed&&i.slice(s-1,s)==="{"?-1:i.addDelimiter(Dk,s,s+Td,a===Ed,a===T0)}}],wrap:i2(i=>{if(!n()||i.type.name!==ga)return null;let a=i.from+Td,s=i.to-Td;return a>=s||a<0||s<0?null:{parser:e,overlay:[{from:a,to:s}],extensions:[g2().support]}})}}const Pk=e=>{let n=e.state.doc.sliceString(0,e.pos),i=n.lastIndexOf("{");if(n.at(i-1)==="{"||i===-1||n.indexOf("}",i)>i)return null;let a=e.matchBefore(/\w*$/);if(!a)return null;let s=Rk(ct.get(po),new Set,99);return{from:a.from,options:s,validFor:/^\w*$/}};var Hl="InlineMathDollar",ya="InlineMathBracket",Vl="BlockMathDollar",va="BlockMathBracket",bo={[Hl]:1,[ya]:3,[Vl]:2,[va]:3},Mt={DOLLAR:36,BACKSLASH:92,OPEN_PAREN:40,CLOSE_PAREN:41,OPEN_BRACKET:91,CLOSE_BRACKET:93},ba=Object.keys(bo).reduce((e,n)=>(e[n]={mark:`${n}Mark`,resolve:n},e),{});function Nk(e){let n=[];return Object.keys(bo).forEach(i=>{n.push({name:i,style:mu.emphasis},{name:`${i}Mark`,style:mu.processingInstruction})}),{defineNodes:n,parseInline:[{name:Vl,parse(i,a,s){return a!==Mt.DOLLAR||i.char(s+1)!==Mt.DOLLAR?-1:i.addDelimiter(ba[Vl],s,s+bo[Vl],!0,!0)}},{name:Hl,parse(i,a,s){return a!==Mt.DOLLAR||i.char(s+1)===Mt.DOLLAR?-1:i.addDelimiter(ba[Hl],s,s+bo[Hl],!0,!0)}},{name:ya,before:"Escape",parse(i,a,s){return a!==Mt.BACKSLASH||i.char(s+1)!==Mt.BACKSLASH||![Mt.OPEN_PAREN,Mt.CLOSE_PAREN].includes(i.char(s+2))?-1:i.addDelimiter(ba[ya],s,s+bo[ya],i.char(s+2)===Mt.OPEN_PAREN,i.char(s+2)===Mt.CLOSE_PAREN)}},{name:va,before:"Escape",parse(i,a,s){return a!==Mt.BACKSLASH||i.char(s+1)!==Mt.BACKSLASH||![Mt.OPEN_BRACKET,Mt.CLOSE_BRACKET].includes(i.char(s+2))?-1:i.addDelimiter(ba[va],s,s+bo[va],i.char(s+2)===Mt.OPEN_BRACKET,i.char(s+2)===Mt.CLOSE_BRACKET)}},{name:ya,before:"Escape",parse(i,a,s){return a!==Mt.BACKSLASH||![Mt.OPEN_PAREN,Mt.CLOSE_PAREN].includes(i.char(s+1))?-1:i.addDelimiter(ba[ya],s,s+2,i.char(s+1)===Mt.OPEN_PAREN,i.char(s+1)===Mt.CLOSE_PAREN)}},{name:va,before:"Escape",parse(i,a,s){return a!==Mt.BACKSLASH||![Mt.OPEN_BRACKET,Mt.CLOSE_BRACKET].includes(i.char(s+1))?-1:i.addDelimiter(ba[va],s,s+2,i.char(s+1)===Mt.OPEN_BRACKET,i.char(s+1)===Mt.CLOSE_BRACKET)}}],wrap:i2(i=>{let a=bo[i.type.name];if(a){let s=i.from+a,c=i.to-a;return s>=c||s<0||c<0?null:{parser:e,overlay:[{from:s,to:c}]}}return null})}}Bu=na.define(),ju=na.define(),ii=hu.define({create:()=>({}),update:(e,n)=>{for(let i of n.effects){if(i.is(Bu))return i.value;if(i.is(ju))return{...e,...i.value}}return e}});let Rd,R0,wa,D0,_a,O0;Ku=class{constructor(){Te(this,"parser",new Kh);Te(this,"type","markdown");Te(this,"defaultCode",this.parser.defaultCode);Te(this,"defaultMetadata",this.parser.defaultMetadata)}static fromMarkdown(e){return Kh.fromMarkdown(e)}transformIn(e){let n=this.parser.transformIn(e);return[n.code,n.offset,n.metadata]}transformOut(e,n){let i=this.parser.transformOut(e,n);return[i.code,i.offset]}isSupported(e){return this.parser.isSupported(e)}getExtension(e,n,i,a){let s=h2().language.data,c,f=()=>{var h;if(!c)return!0;let p=c==null?void 0:c.state.field(ii);return p===void 0?!1:((h=p.quotePrefix)==null?void 0:h.includes("f"))??!1};return[ia.define(p=>(c=p,{})),h2({base:lR,codeLanguages:H_,extensions:[Nk(o2.define(fR).parser),Ok(rm.parser,f)]}),Tk(i),C0.map(p=>s.of({autocomplete:p})),g2().language.data.of({autocomplete:hk({completion:k0,predicate:f})}),vu({defaultKeymap:!1,activateOnTyping:!0}),mk({predicate:()=>!f()})]}},Rd=ke(((e,n)=>{var i=typeof Reflect=="object"?Reflect:null,a=i&&typeof i.apply=="function"?i.apply:function(N,j,V){return Function.prototype.apply.call(N,j,V)},s=i&&typeof i.ownKeys=="function"?i.ownKeys:Object.getOwnPropertySymbols?function(N){return Object.getOwnPropertyNames(N).concat(Object.getOwnPropertySymbols(N))}:function(N){return Object.getOwnPropertyNames(N)};function c(N){console&&console.warn&&console.warn(N)}var f=Number.isNaN||function(N){return N!==N};function p(){p.init.call(this)}n.exports=p,n.exports.once=A,p.EventEmitter=p,p.prototype._events=void 0,p.prototype._eventsCount=0,p.prototype._maxListeners=void 0;var h=10;function v(N){if(typeof N!="function")throw TypeError('The "listener" argument must be of type Function. Received type '+typeof N)}Object.defineProperty(p,"defaultMaxListeners",{enumerable:!0,get:function(){return h},set:function(N){if(typeof N!="number"||N<0||f(N))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+N+".");h=N}}),p.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},p.prototype.setMaxListeners=function(N){if(typeof N!="number"||N<0||f(N))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+N+".");return this._maxListeners=N,this};function w(N){return N._maxListeners===void 0?p.defaultMaxListeners:N._maxListeners}p.prototype.getMaxListeners=function(){return w(this)},p.prototype.emit=function(N){for(var j=[],V=1;V<arguments.length;V++)j.push(arguments[V]);var de=N==="error",pe=this._events;if(pe!==void 0)de&&(de=pe.error===void 0);else if(!de)return!1;if(de){var xe;if(j.length>0&&(xe=j[0]),xe instanceof Error)throw xe;var Z=Error("Unhandled error."+(xe?" ("+xe.message+")":""));throw Z.context=xe,Z}var be=pe[N];if(be===void 0)return!1;if(typeof be=="function")a(be,this,j);else for(var Ee=be.length,re=H(be,Ee),V=0;V<Ee;++V)a(re[V],this,j);return!0};function _(N,j,V,de){var pe,xe,Z;if(v(V),xe=N._events,xe===void 0?(xe=N._events=Object.create(null),N._eventsCount=0):(xe.newListener!==void 0&&(N.emit("newListener",j,V.listener?V.listener:V),xe=N._events),Z=xe[j]),Z===void 0)Z=xe[j]=V,++N._eventsCount;else if(typeof Z=="function"?Z=xe[j]=de?[V,Z]:[Z,V]:de?Z.unshift(V):Z.push(V),pe=w(N),pe>0&&Z.length>pe&&!Z.warned){Z.warned=!0;var be=Error("Possible EventEmitter memory leak detected. "+Z.length+" "+String(j)+" listeners added. Use emitter.setMaxListeners() to increase limit");be.name="MaxListenersExceededWarning",be.emitter=N,be.type=j,be.count=Z.length,c(be)}return N}p.prototype.addListener=function(N,j){return _(this,N,j,!1)},p.prototype.on=p.prototype.addListener,p.prototype.prependListener=function(N,j){return _(this,N,j,!0)};function C(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function E(N,j,V){var de={fired:!1,wrapFn:void 0,target:N,type:j,listener:V},pe=C.bind(de);return pe.listener=V,de.wrapFn=pe,pe}p.prototype.once=function(N,j){return v(j),this.on(N,E(this,N,j)),this},p.prototype.prependOnceListener=function(N,j){return v(j),this.prependListener(N,E(this,N,j)),this},p.prototype.removeListener=function(N,j){var V,de,pe,xe,Z;if(v(j),de=this._events,de===void 0||(V=de[N],V===void 0))return this;if(V===j||V.listener===j)--this._eventsCount===0?this._events=Object.create(null):(delete de[N],de.removeListener&&this.emit("removeListener",N,V.listener||j));else if(typeof V!="function"){for(pe=-1,xe=V.length-1;xe>=0;xe--)if(V[xe]===j||V[xe].listener===j){Z=V[xe].listener,pe=xe;break}if(pe<0)return this;pe===0?V.shift():W(V,pe),V.length===1&&(de[N]=V[0]),de.removeListener!==void 0&&this.emit("removeListener",N,Z||j)}return this},p.prototype.off=p.prototype.removeListener,p.prototype.removeAllListeners=function(N){var j,V=this._events,de;if(V===void 0)return this;if(V.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):V[N]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete V[N]),this;if(arguments.length===0){var pe=Object.keys(V),xe;for(de=0;de<pe.length;++de)xe=pe[de],xe!=="removeListener"&&this.removeAllListeners(xe);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(j=V[N],typeof j=="function")this.removeListener(N,j);else if(j!==void 0)for(de=j.length-1;de>=0;de--)this.removeListener(N,j[de]);return this};function R(N,j,V){var de=N._events;if(de===void 0)return[];var pe=de[j];return pe===void 0?[]:typeof pe=="function"?V?[pe.listener||pe]:[pe]:V?U(pe):H(pe,pe.length)}p.prototype.listeners=function(N){return R(this,N,!0)},p.prototype.rawListeners=function(N){return R(this,N,!1)},p.listenerCount=function(N,j){return typeof N.listenerCount=="function"?N.listenerCount(j):L.call(N,j)},p.prototype.listenerCount=L;function L(N){var j=this._events;if(j!==void 0){var V=j[N];if(typeof V=="function")return 1;if(V!==void 0)return V.length}return 0}p.prototype.eventNames=function(){return this._eventsCount>0?s(this._events):[]};function H(N,j){for(var V=Array(j),de=0;de<j;++de)V[de]=N[de];return V}function W(N,j){for(;j+1<N.length;j++)N[j]=N[j+1];N.pop()}function U(N){for(var j=Array(N.length),V=0;V<j.length;++V)j[V]=N[V].listener||N[V];return j}function A(N,j){return new Promise(function(V,de){function pe(Z){N.removeListener(j,xe),de(Z)}function xe(){typeof N.removeListener=="function"&&N.removeListener("error",pe),V([].slice.call(arguments))}he(N,j,xe,{once:!0}),j!=="error"&&G(N,pe,{once:!0})})}function G(N,j,V){typeof N.on=="function"&&he(N,"error",j,V)}function he(N,j,V,de){if(typeof N.on=="function")de.once?N.once(j,V):N.on(j,V);else if(typeof N.addEventListener=="function")N.addEventListener(j,function pe(xe){de.once&&N.removeEventListener(j,pe),V(xe)});else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof N)}})),R0=ke((e=>{var n=e&&e.__awaiter||function(s,c,f,p){function h(v){return v instanceof f?v:new f(function(w){w(v)})}return new(f||(f=Promise))(function(v,w){function _(R){try{E(p.next(R))}catch(L){w(L)}}function C(R){try{E(p.throw(R))}catch(L){w(L)}}function E(R){R.done?v(R.value):h(R.value).then(_,C)}E((p=p.apply(s,c||[])).next())})},i=e&&e.__generator||function(s,c){var f={label:0,sent:function(){if(v[0]&1)throw v[1];return v[1]},trys:[],ops:[]},p,h,v,w;return w={next:_(0),throw:_(1),return:_(2)},typeof Symbol=="function"&&(w[Symbol.iterator]=function(){return this}),w;function _(E){return function(R){return C([E,R])}}function C(E){if(p)throw TypeError("Generator is already executing.");for(;f;)try{if(p=1,h&&(v=E[0]&2?h.return:E[0]?h.throw||((v=h.return)&&v.call(h),0):h.next)&&!(v=v.call(h,E[1])).done)return v;switch(h=0,v&&(E=[E[0]&2,v.value]),E[0]){case 0:case 1:v=E;break;case 4:return f.label++,{value:E[1],done:!1};case 5:f.label++,h=E[1],E=[0];continue;case 7:E=f.ops.pop(),f.trys.pop();continue;default:if(v=f.trys,!(v=v.length>0&&v[v.length-1])&&(E[0]===6||E[0]===2)){f=0;continue}if(E[0]===3&&(!v||E[1]>v[0]&&E[1]<v[3])){f.label=E[1];break}if(E[0]===6&&f.label<v[1]){f.label=v[1],v=E;break}if(v&&f.label<v[2]){f.label=v[2],f.ops.push(E);break}v[2]&&f.ops.pop(),f.trys.pop();continue}E=c.call(s,f)}catch(R){E=[6,R],h=0}finally{p=v=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}};Object.defineProperty(e,"__esModule",{value:!0}),e.defaultNextRequest=void 0;var a=Rd();e.defaultNextRequest=function(){var s=-1;return function(){return++s}},e.default=(function(){function s(c,f){f===void 0&&(f=e.defaultNextRequest()),this.batch=[],this.batchStarted=!1,this.lastId=-1,this.transports=c,this.requests={},this.connectPromise=this.connect(),this.requestChannel=new a.EventEmitter,this.nextID=f}return s.prototype.connect=function(){var c=this;return Promise.all(this.transports.map(function(f){return n(c,void 0,void 0,function(){return i(this,function(p){switch(p.label){case 0:return f.subscribe("error",this.handleError.bind(this)),f.subscribe("notification",this.handleNotification.bind(this)),[4,f.connect()];case 1:return p.sent(),[2]}})})}))},s.prototype.getPrimaryTransport=function(){return this.transports[0]},s.prototype.request=function(c,f,p){return f===void 0&&(f=!1),n(this,void 0,void 0,function(){var h,v,w,_,C=this;return i(this,function(E){return h=this.nextID().toString(),v=f?null:h,w={request:this.makeRequest(c.method,c.params||[],v),internalID:h},this.batchStarted?(_=new Promise(function(R,L){C.batch.push({resolve:R,reject:L,request:w})}),[2,_]):[2,this.getPrimaryTransport().sendData(w,p)]})})},s.prototype.close=function(){this.requestChannel.removeAllListeners(),this.transports.forEach(function(c){c.unsubscribe(),c.close()})},s.prototype.startBatch=function(){this.batchStarted=!0},s.prototype.stopBatch=function(){if(this.batchStarted===!1)throw Error("cannot end that which has never started");if(this.batch.length===0){this.batchStarted=!1;return}this.getPrimaryTransport().sendData(this.batch),this.batch=[],this.batchStarted=!1},s.prototype.makeRequest=function(c,f,p){return p?{jsonrpc:"2.0",id:p,method:c,params:f}:{jsonrpc:"2.0",method:c,params:f}},s.prototype.handleError=function(c){this.requestChannel.emit("error",c)},s.prototype.handleNotification=function(c){this.requestChannel.emit("notification",c)},s})()})),wa=ke((e=>{var n=e&&e.__extends||(function(){var a=function(s,c){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,p){f.__proto__=p}||function(f,p){for(var h in p)p.hasOwnProperty(h)&&(f[h]=p[h])},a(s,c)};return function(s,c){a(s,c);function f(){this.constructor=s}s.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.convertJSONToRPCError=e.JSONRPCError=e.ERR_UNKNOWN=e.ERR_MISSIING_ID=e.ERR_TIMEOUT=void 0,e.ERR_TIMEOUT=7777,e.ERR_MISSIING_ID=7878,e.ERR_UNKNOWN=7979;var i=(function(a){n(s,a);function s(c,f,p){var h=this.constructor,v=a.call(this,c)||this;return v.message=c,v.code=f,v.data=p,Object.setPrototypeOf(v,h.prototype),v}return s})(Error);e.JSONRPCError=i,e.convertJSONToRPCError=function(a){if(a.error){var s=a.error,c=s.message,f=s.code,p=s.data;return new i(c,f,p)}return new i("Unknown error",e.ERR_UNKNOWN,a)}})),D0=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TransportRequestManager=void 0;var n=Rd(),i=wa();e.TransportRequestManager=(function(){function a(){this.pendingRequest={},this.pendingBatchRequest={},this.transportEventChannel=new n.EventEmitter}return a.prototype.addRequest=function(s,c){return this.transportEventChannel.emit("pending",s),s instanceof Array?(this.addBatchReq(s,c),Promise.resolve()):this.addReq(s.internalID,c)},a.prototype.settlePendingRequest=function(s,c){var f=this;s.forEach(function(p){var h=f.pendingRequest[p.internalID];if(delete f.pendingBatchRequest[p.internalID],h!==void 0){if(c){h.reject(c);return}h.resolve(),(p.request.id===null||p.request.id===void 0)&&delete f.pendingRequest[p.internalID]}})},a.prototype.isPendingRequest=function(s){return this.pendingRequest.hasOwnProperty(s)},a.prototype.resolveResponse=function(s,c){c===void 0&&(c=!0);var f=s;try{return f=JSON.parse(s),this.checkJSONRPC(f)===!1?void 0:f instanceof Array?this.resolveBatch(f,c):this.resolveRes(f,c)}catch{var p=new i.JSONRPCError("Bad response format",i.ERR_UNKNOWN,s);return c&&this.transportEventChannel.emit("error",p),p}},a.prototype.addBatchReq=function(s,c){var f=this;return s.forEach(function(p){var h=p.resolve,v=p.reject,w=p.request.internalID;f.pendingBatchRequest[w]=!0,f.pendingRequest[w]={resolve:h,reject:v}}),Promise.resolve()},a.prototype.addReq=function(s,c){var f=this;return new Promise(function(p,h){c!==null&&c&&f.setRequestTimeout(s,c,h),f.pendingRequest[s]={resolve:p,reject:h}})},a.prototype.checkJSONRPC=function(s){var c=[s];return s instanceof Array&&(c=s),c.every(function(f){return f.result!==void 0||f.error!==void 0||f.method!==void 0})},a.prototype.processResult=function(s,c){if(s.error){var f=i.convertJSONToRPCError(s);c.reject(f);return}c.resolve(s.result)},a.prototype.resolveBatch=function(s,c){var f=this,p=s.map(function(h){return f.resolveRes(h,c)}).filter(function(h){return h});if(p.length>0)return p[0]},a.prototype.resolveRes=function(s,c){var f=s.id,p=s.error,h=this.pendingRequest[f];if(h){delete this.pendingRequest[f],this.processResult(s,h),this.transportEventChannel.emit("response",s);return}if(f===void 0&&p===void 0){this.transportEventChannel.emit("notification",s);return}var v;return p&&(v=i.convertJSONToRPCError(s)),c&&p&&v&&this.transportEventChannel.emit("error",v),v},a.prototype.setRequestTimeout=function(s,c,f){var p=this;setTimeout(function(){delete p.pendingRequest[s],f(new i.JSONRPCError("Request timeout request took longer than "+c+" ms to resolve",i.ERR_TIMEOUT))},c)},a})()})),ho=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Transport=void 0;var n=D0();e.Transport=(function(){function i(){this.transportRequestManager=new n.TransportRequestManager,this.transportRequestManager.transportEventChannel.on("error",function(){})}return i.prototype.subscribe=function(a,s){this.transportRequestManager.transportEventChannel.addListener(a,s)},i.prototype.unsubscribe=function(a,s){if(!a)return this.transportRequestManager.transportEventChannel.removeAllListeners();a&&s&&this.transportRequestManager.transportEventChannel.removeListener(a,s)},i.prototype.parseData=function(a){return a instanceof Array?a.map(function(s){return s.request.request}):a.request},i})()})),_a=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getNotifications=e.getBatchRequests=e.isNotification=void 0,e.isNotification=function(n){return n.request.id===void 0||n.request.id===null},e.getBatchRequests=function(n){return n instanceof Array?n.filter(function(i){return i.request.request.id!=null}).map(function(i){return i.request}):[]},e.getNotifications=function(n){return n instanceof Array?n.filter(function(i){return e.isNotification(i.request)}).map(function(i){return i.request}):e.isNotification(n)?[n]:[]}})),O0=ke((e=>{var n=e&&e.__extends||(function(){var c=function(f,p){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,v){h.__proto__=v}||function(h,v){for(var w in v)v.hasOwnProperty(w)&&(h[w]=v[w])},c(f,p)};return function(f,p){c(f,p);function h(){this.constructor=f}f.prototype=p===null?Object.create(p):(h.prototype=p.prototype,new h)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=ho(),a=_a(),s=wa();e.default=(function(c){n(f,c);function f(p,h,v){var w=c.call(this)||this;return w.connection=p,w.reqUri=h,w.resUri=v,w}return f.prototype.connect=function(){var p=this;return this.connection.on(this.resUri,function(h){p.transportRequestManager.resolveResponse(h)}),Promise.resolve()},f.prototype.sendData=function(p,h){h===void 0&&(h=null);var v=this.transportRequestManager.addRequest(p,h),w=a.getNotifications(p),_=this.parseData(p);try{return this.connection.emit(this.reqUri,_),this.transportRequestManager.settlePendingRequest(w),v}catch(E){var C=new s.JSONRPCError(E.message,s.ERR_UNKNOWN,E);return this.transportRequestManager.settlePendingRequest(w,C),Promise.reject(C)}},f.prototype.close=function(){this.connection.removeAllListeners()},f})(i.Transport)}));function Mk(e){return e&&DataView.prototype.isPrototypeOf(e)}function xa(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||e==="")throw TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function Dd(e){return typeof e!="string"&&(e=String(e)),e}function Od(e){var n={next:function(){var i=e.shift();return{done:i===void 0,value:i}}};return Rn.iterable&&(n[Symbol.iterator]=function(){return n}),n}function an(e){this.map={},e instanceof an?e.forEach(function(n,i){this.append(i,n)},this):Array.isArray(e)?e.forEach(function(n){if(n.length!=2)throw TypeError("Headers constructor: expected name/value pair to be length 2, found"+n.length);this.append(n[0],n[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(n){this.append(n,e[n])},this)}function Pd(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(TypeError("Already read"));e.bodyUsed=!0}}function P0(e){return new Promise(function(n,i){e.onload=function(){n(e.result)},e.onerror=function(){i(e.error)}})}function Lk(e){var n=new FileReader,i=P0(n);return n.readAsArrayBuffer(e),i}function Ak(e){var n=new FileReader,i=P0(n),a=/charset=([A-Za-z0-9_-]+)/.exec(e.type),s=a?a[1]:"utf-8";return n.readAsText(e,s),i}function Ik(e){for(var n=new Uint8Array(e),i=Array(n.length),a=0;a<n.length;a++)i[a]=String.fromCharCode(n[a]);return i.join("")}function N0(e){if(e.slice)return e.slice(0);var n=new Uint8Array(e.byteLength);return n.set(new Uint8Array(e)),n.buffer}function M0(){return this.bodyUsed=!1,this._initBody=function(e){this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?typeof e=="string"?this._bodyText=e:Rn.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Rn.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Rn.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Rn.arrayBuffer&&Rn.blob&&Mk(e)?(this._bodyArrayBuffer=N0(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Rn.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||I0(e))?this._bodyArrayBuffer=N0(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof e=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):Rn.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Rn.blob&&(this.blob=function(){var e=Pd(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer)return Pd(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer));if(Rn.blob)return this.blob().then(Lk);throw Error("could not read as ArrayBuffer")},this.text=function(){var e=Pd(this);if(e)return e;if(this._bodyBlob)return Ak(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(Ik(this._bodyArrayBuffer));if(this._bodyFormData)throw Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Rn.formData&&(this.formData=function(){return this.text().then(qk)}),this.json=function(){return this.text().then(JSON.parse)},this}function jk(e){var n=e.toUpperCase();return j0.indexOf(n)>-1?n:e}function wo(e,n){if(!(this instanceof wo))throw TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');n||(n={});var i=n.body;if(e instanceof wo){if(e.bodyUsed)throw TypeError("Already read");this.url=e.url,this.credentials=e.credentials,n.headers||(this.headers=new an(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!i&&e._bodyInit!=null&&(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=n.credentials||this.credentials||"same-origin",(n.headers||!this.headers)&&(this.headers=new an(n.headers)),this.method=jk(n.method||this.method||"GET"),this.mode=n.mode||this.mode||null,this.signal=n.signal||this.signal||(function(){if("AbortController"in fn)return new AbortController().signal})(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&i)throw TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),(this.method==="GET"||this.method==="HEAD")&&(n.cache==="no-store"||n.cache==="no-cache")){var a=/([?&])_=[^&]*/;a.test(this.url)?this.url=this.url.replace(a,"$1_="+new Date().getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+new Date().getTime()}}function qk(e){var n=new FormData;return e.trim().split("&").forEach(function(i){if(i){var a=i.split("="),s=a.shift().replace(/\+/g," "),c=a.join("=").replace(/\+/g," ");n.append(decodeURIComponent(s),decodeURIComponent(c))}}),n}function zk(e){var n=new an;return e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(i){return i.indexOf(`
78
+ `)===0?i.substr(1,i.length):i}).forEach(function(i){var a=i.split(":"),s=a.shift().trim();if(s){var c=a.join(":").trim();try{n.append(s,c)}catch(f){console.warn("Response "+f.message)}}}),n}function Hr(e,n){if(!(this instanceof Hr))throw TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(n||(n={}),this.type="default",this.status=n.status===void 0?200:n.status,this.status<200||this.status>599)throw RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=n.statusText===void 0?"":""+n.statusText,this.headers=new an(n.headers),this.url=n.url||"",this._initBody(e)}function L0(e,n){return new Promise(function(i,a){var s=new wo(e,n);if(s.signal&&s.signal.aborted)return a(new Li("Aborted","AbortError"));var c=new XMLHttpRequest;function f(){c.abort()}c.onload=function(){var v={statusText:c.statusText,headers:zk(c.getAllResponseHeaders()||"")};s.url.indexOf("file://")===0&&(c.status<200||c.status>599)?v.status=200:v.status=c.status,v.url="responseURL"in c?c.responseURL:v.headers.get("X-Request-URL");var w="response"in c?c.response:c.responseText;setTimeout(function(){i(new Hr(w,v))},0)},c.onerror=function(){setTimeout(function(){a(TypeError("Network request failed"))},0)},c.ontimeout=function(){setTimeout(function(){a(TypeError("Network request timed out"))},0)},c.onabort=function(){setTimeout(function(){a(new Li("Aborted","AbortError"))},0)};function p(v){try{return v===""&&fn.location.href?fn.location.href:v}catch{return v}}if(c.open(s.method,p(s.url),!0),s.credentials==="include"?c.withCredentials=!0:s.credentials==="omit"&&(c.withCredentials=!1),"responseType"in c&&(Rn.blob?c.responseType="blob":Rn.arrayBuffer&&(c.responseType="arraybuffer")),n&&typeof n.headers=="object"&&!(n.headers instanceof an||fn.Headers&&n.headers instanceof fn.Headers)){var h=[];Object.getOwnPropertyNames(n.headers).forEach(function(v){h.push(xa(v)),c.setRequestHeader(v,Dd(n.headers[v]))}),s.headers.forEach(function(v,w){h.indexOf(w)===-1&&c.setRequestHeader(w,v)})}else s.headers.forEach(function(v,w){c.setRequestHeader(w,v)});s.signal&&(s.signal.addEventListener("abort",f),c.onreadystatechange=function(){c.readyState===4&&s.signal.removeEventListener("abort",f)}),c.send(s._bodyInit===void 0?null:s._bodyInit)})}let fn,Rn,A0,I0,j0,q0,Li,z0,F0,B0,H0,_o,V0,$0,W0,U0,K0,Q0,ka,Nd,Md,G0,Ai,Ca,$l,J0,Ld,X0,Y0,Z0,eg,Wl,tg,xo,Ad,qt,Ul,ng,rg,ig,og,ag,sg,lg,cg,ug,dg,fg,pg,mg,hg,gg,yg,vg,bg,wg,_g,xg,kg,Cg,Sg;z0=Vb((()=>{fn=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global||{},Rn={searchParams:"URLSearchParams"in fn,iterable:"Symbol"in fn&&"iterator"in Symbol,blob:"FileReader"in fn&&"Blob"in fn&&(function(){try{return new Blob,!0}catch{return!1}})(),formData:"FormData"in fn,arrayBuffer:"ArrayBuffer"in fn},Rn.arrayBuffer&&(A0=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],I0=ArrayBuffer.isView||function(e){return e&&A0.indexOf(Object.prototype.toString.call(e))>-1}),an.prototype.append=function(e,n){e=xa(e),n=Dd(n);var i=this.map[e];this.map[e]=i?i+", "+n:n},an.prototype.delete=function(e){delete this.map[xa(e)]},an.prototype.get=function(e){return e=xa(e),this.has(e)?this.map[e]:null},an.prototype.has=function(e){return this.map.hasOwnProperty(xa(e))},an.prototype.set=function(e,n){this.map[xa(e)]=Dd(n)},an.prototype.forEach=function(e,n){for(var i in this.map)this.map.hasOwnProperty(i)&&e.call(n,this.map[i],i,this)},an.prototype.keys=function(){var e=[];return this.forEach(function(n,i){e.push(i)}),Od(e)},an.prototype.values=function(){var e=[];return this.forEach(function(n){e.push(n)}),Od(e)},an.prototype.entries=function(){var e=[];return this.forEach(function(n,i){e.push([i,n])}),Od(e)},Rn.iterable&&(an.prototype[Symbol.iterator]=an.prototype.entries),j0=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"],wo.prototype.clone=function(){return new wo(this,{body:this._bodyInit})},M0.call(wo.prototype),M0.call(Hr.prototype),Hr.prototype.clone=function(){return new Hr(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new an(this.headers),url:this.url})},Hr.error=function(){var e=new Hr(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e},q0=[301,302,303,307,308],Hr.redirect=function(e,n){if(q0.indexOf(n)===-1)throw RangeError("Invalid status code");return new Hr(null,{status:n,headers:{location:e}})},Li=fn.DOMException;try{new Li}catch{Li=function(e,n){this.message=e,this.name=n,this.stack=Error(e).stack},Li.prototype=Object.create(Error.prototype),Li.prototype.constructor=Li}L0.polyfill=!0,fn.fetch||(fn.fetch=L0,fn.Headers=an,fn.Request=wo,fn.Response=Hr)})),F0=ke(((e,n)=>{z0(),n.exports=self.fetch.bind(self)})),B0=ke((e=>{var n=e&&e.__extends||(function(){var w=function(_,C){return w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,R){E.__proto__=R}||function(E,R){for(var L in R)R.hasOwnProperty(L)&&(E[L]=R[L])},w(_,C)};return function(_,C){w(_,C);function E(){this.constructor=_}_.prototype=C===null?Object.create(C):(E.prototype=C.prototype,new E)}})(),i=e&&e.__awaiter||function(w,_,C,E){function R(L){return L instanceof C?L:new C(function(H){H(L)})}return new(C||(C=Promise))(function(L,H){function W(G){try{A(E.next(G))}catch(he){H(he)}}function U(G){try{A(E.throw(G))}catch(he){H(he)}}function A(G){G.done?L(G.value):R(G.value).then(W,U)}A((E=E.apply(w,_||[])).next())})},a=e&&e.__generator||function(w,_){var C={label:0,sent:function(){if(L[0]&1)throw L[1];return L[1]},trys:[],ops:[]},E,R,L,H;return H={next:W(0),throw:W(1),return:W(2)},typeof Symbol=="function"&&(H[Symbol.iterator]=function(){return this}),H;function W(A){return function(G){return U([A,G])}}function U(A){if(E)throw TypeError("Generator is already executing.");for(;C;)try{if(E=1,R&&(L=A[0]&2?R.return:A[0]?R.throw||((L=R.return)&&L.call(R),0):R.next)&&!(L=L.call(R,A[1])).done)return L;switch(R=0,L&&(A=[A[0]&2,L.value]),A[0]){case 0:case 1:L=A;break;case 4:return C.label++,{value:A[1],done:!1};case 5:C.label++,R=A[1],A=[0];continue;case 7:A=C.ops.pop(),C.trys.pop();continue;default:if(L=C.trys,!(L=L.length>0&&L[L.length-1])&&(A[0]===6||A[0]===2)){C=0;continue}if(A[0]===3&&(!L||A[1]>L[0]&&A[1]<L[3])){C.label=A[1];break}if(A[0]===6&&C.label<L[1]){C.label=L[1],L=A;break}if(L&&C.label<L[2]){C.label=L[2],C.ops.push(A);break}L[2]&&C.ops.pop(),C.trys.pop();continue}A=_.call(w,C)}catch(G){A=[6,G],R=0}finally{E=L=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}},s=e&&e.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(e,"__esModule",{value:!0}),e.HTTPTransport=void 0;var c=s(F0()),f=ho(),p=_a(),h=wa(),v=(function(w){n(_,w);function _(C,E){var R=w.call(this)||this;return R.onlyNotifications=function(L){return L instanceof Array?L.every(function(H){return H.request.request.id===null||H.request.request.id===void 0}):L.request.id===null||L.request.id===void 0},R.uri=C,R.credentials=E&&E.credentials,R.headers=_.setupHeaders(E&&E.headers),R.injectedFetcher=E==null?void 0:E.fetcher,R}return _.prototype.connect=function(){return Promise.resolve()},_.prototype.sendData=function(C,E){return E===void 0&&(E=null),i(this,void 0,void 0,function(){var R,L,H,W,U,A,he,G,he;return a(this,function(N){switch(N.label){case 0:R=this.transportRequestManager.addRequest(C,E),L=p.getNotifications(C),H=p.getBatchRequests(C),W=this.injectedFetcher||c.default,N.label=1;case 1:return N.trys.push([1,4,,5]),[4,W(this.uri,{method:"POST",headers:this.headers,body:JSON.stringify(this.parseData(C)),credentials:this.credentials})];case 2:return U=N.sent(),this.transportRequestManager.settlePendingRequest(L),this.onlyNotifications(C)?[2,Promise.resolve()]:[4,U.text()];case 3:return A=N.sent(),he=this.transportRequestManager.resolveResponse(A),he?(this.transportRequestManager.settlePendingRequest(H,he),[2,Promise.reject(he)]):[3,5];case 4:return G=N.sent(),he=new h.JSONRPCError(G.message,h.ERR_UNKNOWN,G),this.transportRequestManager.settlePendingRequest(L,he),this.transportRequestManager.settlePendingRequest(p.getBatchRequests(C),he),[2,Promise.reject(he)];case 5:return[2,R]}})})},_.prototype.close=function(){},_.setupHeaders=function(C){var E=new Headers(C);return E.set("Content-Type","application/json"),E},_})(f.Transport);e.HTTPTransport=v,e.default=v})),H0=dT({default:()=>V0}),$0=Vb((()=>{_o=null,typeof WebSocket<"u"?_o=WebSocket:typeof MozWebSocket<"u"?_o=MozWebSocket:typeof global<"u"?_o=global.WebSocket||global.MozWebSocket:typeof window<"u"?_o=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(_o=self.WebSocket||self.MozWebSocket),V0=_o})),W0=ke((e=>{var n=e&&e.__extends||(function(){var v=function(w,_){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,E){C.__proto__=E}||function(C,E){for(var R in E)E.hasOwnProperty(R)&&(C[R]=E[R])},v(w,_)};return function(w,_){v(w,_);function C(){this.constructor=w}w.prototype=_===null?Object.create(_):(C.prototype=_.prototype,new C)}})(),i=e&&e.__awaiter||function(v,w,_,C){function E(R){return R instanceof _?R:new _(function(L){L(R)})}return new(_||(_=Promise))(function(R,L){function H(A){try{U(C.next(A))}catch(G){L(G)}}function W(A){try{U(C.throw(A))}catch(G){L(G)}}function U(A){A.done?R(A.value):E(A.value).then(H,W)}U((C=C.apply(v,w||[])).next())})},a=e&&e.__generator||function(v,w){var _={label:0,sent:function(){if(R[0]&1)throw R[1];return R[1]},trys:[],ops:[]},C,E,R,L;return L={next:H(0),throw:H(1),return:H(2)},typeof Symbol=="function"&&(L[Symbol.iterator]=function(){return this}),L;function H(U){return function(A){return W([U,A])}}function W(U){if(C)throw TypeError("Generator is already executing.");for(;_;)try{if(C=1,E&&(R=U[0]&2?E.return:U[0]?E.throw||((R=E.return)&&R.call(E),0):E.next)&&!(R=R.call(E,U[1])).done)return R;switch(E=0,R&&(U=[U[0]&2,R.value]),U[0]){case 0:case 1:R=U;break;case 4:return _.label++,{value:U[1],done:!1};case 5:_.label++,E=U[1],U=[0];continue;case 7:U=_.ops.pop(),_.trys.pop();continue;default:if(R=_.trys,!(R=R.length>0&&R[R.length-1])&&(U[0]===6||U[0]===2)){_=0;continue}if(U[0]===3&&(!R||U[1]>R[0]&&U[1]<R[3])){_.label=U[1];break}if(U[0]===6&&_.label<R[1]){_.label=R[1],R=U;break}if(R&&_.label<R[2]){_.label=R[2],_.ops.push(U);break}R[2]&&_.ops.pop(),_.trys.pop();continue}U=w.call(v,_)}catch(A){U=[6,A],E=0}finally{C=R=0}if(U[0]&5)throw U[1];return{value:U[0]?U[1]:void 0,done:!0}}},s=e&&e.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(e,"__esModule",{value:!0});var c=s(($0(),uu(H0))),f=ho(),p=_a(),h=wa();e.default=(function(v){n(w,v);function w(_){var C=v.call(this)||this;return C.uri=_,C.connection=new c.default(_),C}return w.prototype.connect=function(){var _=this;return new Promise(function(C,E){var R=function(){_.connection.removeEventListener("open",R),C()};_.connection.addEventListener("open",R),_.connection.addEventListener("message",function(L){var H=L.data;_.transportRequestManager.resolveResponse(H)})})},w.prototype.sendData=function(_,C){return C===void 0&&(C=5e3),i(this,void 0,void 0,function(){var E,R,L;return a(this,function(H){E=this.transportRequestManager.addRequest(_,C),R=p.getNotifications(_);try{this.connection.send(JSON.stringify(this.parseData(_))),this.transportRequestManager.settlePendingRequest(R)}catch(W){L=new h.JSONRPCError(W.message,h.ERR_UNKNOWN,W),this.transportRequestManager.settlePendingRequest(R,L),this.transportRequestManager.settlePendingRequest(p.getBatchRequests(_),L),E=Promise.reject(L)}return[2,E]})})},w.prototype.close=function(){this.connection.close()},w})(f.Transport)})),U0=ke((e=>{var n=e&&e.__extends||(function(){var p=function(h,v){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,_){w.__proto__=_}||function(w,_){for(var C in _)_.hasOwnProperty(C)&&(w[C]=_[C])},p(h,v)};return function(h,v){p(h,v);function w(){this.constructor=h}h.prototype=v===null?Object.create(v):(w.prototype=v.prototype,new w)}})(),i=e&&e.__awaiter||function(p,h,v,w){function _(C){return C instanceof v?C:new v(function(E){E(C)})}return new(v||(v=Promise))(function(C,E){function R(W){try{H(w.next(W))}catch(U){E(U)}}function L(W){try{H(w.throw(W))}catch(U){E(U)}}function H(W){W.done?C(W.value):_(W.value).then(R,L)}H((w=w.apply(p,h||[])).next())})},a=e&&e.__generator||function(p,h){var v={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},w,_,C,E;return E={next:R(0),throw:R(1),return:R(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function R(H){return function(W){return L([H,W])}}function L(H){if(w)throw TypeError("Generator is already executing.");for(;v;)try{if(w=1,_&&(C=H[0]&2?_.return:H[0]?_.throw||((C=_.return)&&C.call(_),0):_.next)&&!(C=C.call(_,H[1])).done)return C;switch(_=0,C&&(H=[H[0]&2,C.value]),H[0]){case 0:case 1:C=H;break;case 4:return v.label++,{value:H[1],done:!1};case 5:v.label++,_=H[1],H=[0];continue;case 7:H=v.ops.pop(),v.trys.pop();continue;default:if(C=v.trys,!(C=C.length>0&&C[C.length-1])&&(H[0]===6||H[0]===2)){v=0;continue}if(H[0]===3&&(!C||H[1]>C[0]&&H[1]<C[3])){v.label=H[1];break}if(H[0]===6&&v.label<C[1]){v.label=C[1],C=H;break}if(C&&v.label<C[2]){v.label=C[2],v.ops.push(H);break}C[2]&&v.ops.pop(),v.trys.pop();continue}H=h.call(p,v)}catch(W){H=[6,W],_=0}finally{w=C=0}if(H[0]&5)throw H[1];return{value:H[0]?H[1]:void 0,done:!0}}};Object.defineProperty(e,"__esModule",{value:!0});var s=ho(),c=_a(),f=function(p){var h=400,v=window.screen.height;return window.open(p,"inspector:popup","left=0,top=0,width="+h+",height="+v+",resizable,scrollbars=yes,status=1")};e.default=(function(p){n(h,p);function h(v){var w=p.call(this)||this;return w.messageHandler=function(_){w.transportRequestManager.resolveResponse(JSON.stringify(_.data))},w.uri=v,w.postMessageID="post-message-transport-"+Math.random(),w}return h.prototype.createWindow=function(v){return new Promise(function(w,_){var C=f(v);setTimeout(function(){w(C)},3e3)})},h.prototype.connect=function(){var v=this,w=/^(http|https):\/\/.*$/;return new Promise(function(_,C){return i(v,void 0,void 0,function(){var E;return a(this,function(R){switch(R.label){case 0:return w.test(this.uri)||C(Error("Bad URI")),E=this,[4,this.createWindow(this.uri)];case 1:return E.frame=R.sent(),window.addEventListener("message",this.messageHandler),_(),[2]}})})})},h.prototype.sendData=function(v,w){return w===void 0&&(w=5e3),i(this,void 0,void 0,function(){var _,C;return a(this,function(E){return _=this.transportRequestManager.addRequest(v,null),C=c.getNotifications(v),this.frame&&(this.frame.postMessage(v.request,this.uri),this.transportRequestManager.settlePendingRequest(C)),[2,_]})})},h.prototype.close=function(){this.frame&&(window.removeEventListener("message",this.messageHandler),this.frame.close())},h})(s.Transport)})),K0=ke((e=>{var n=e&&e.__extends||(function(){var f=function(p,h){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,w){v.__proto__=w}||function(v,w){for(var _ in w)w.hasOwnProperty(_)&&(v[_]=w[_])},f(p,h)};return function(p,h){f(p,h);function v(){this.constructor=p}p.prototype=h===null?Object.create(h):(v.prototype=h.prototype,new v)}})(),i=e&&e.__awaiter||function(f,p,h,v){function w(_){return _ instanceof h?_:new h(function(C){C(_)})}return new(h||(h=Promise))(function(_,C){function E(H){try{L(v.next(H))}catch(W){C(W)}}function R(H){try{L(v.throw(H))}catch(W){C(W)}}function L(H){H.done?_(H.value):w(H.value).then(E,R)}L((v=v.apply(f,p||[])).next())})},a=e&&e.__generator||function(f,p){var h={label:0,sent:function(){if(_[0]&1)throw _[1];return _[1]},trys:[],ops:[]},v,w,_,C;return C={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function E(L){return function(H){return R([L,H])}}function R(L){if(v)throw TypeError("Generator is already executing.");for(;h;)try{if(v=1,w&&(_=L[0]&2?w.return:L[0]?w.throw||((_=w.return)&&_.call(w),0):w.next)&&!(_=_.call(w,L[1])).done)return _;switch(w=0,_&&(L=[L[0]&2,_.value]),L[0]){case 0:case 1:_=L;break;case 4:return h.label++,{value:L[1],done:!1};case 5:h.label++,w=L[1],L=[0];continue;case 7:L=h.ops.pop(),h.trys.pop();continue;default:if(_=h.trys,!(_=_.length>0&&_[_.length-1])&&(L[0]===6||L[0]===2)){h=0;continue}if(L[0]===3&&(!_||L[1]>_[0]&&L[1]<_[3])){h.label=L[1];break}if(L[0]===6&&h.label<_[1]){h.label=_[1],_=L;break}if(_&&h.label<_[2]){h.label=_[2],h.ops.push(L);break}_[2]&&h.ops.pop(),h.trys.pop();continue}L=p.call(f,h)}catch(H){L=[6,H],w=0}finally{v=_=0}if(L[0]&5)throw L[1];return{value:L[0]?L[1]:void 0,done:!0}}};Object.defineProperty(e,"__esModule",{value:!0});var s=ho(),c=_a();e.default=(function(f){n(p,f);function p(h){var v=f.call(this)||this;return v.messageHandler=function(w){v.transportRequestManager.resolveResponse(JSON.stringify(w.data))},v.uri=h,v.postMessageID="post-message-transport-"+Math.random(),v}return p.prototype.createWindow=function(h){var v=this;return new Promise(function(w,_){var C,E=document.createElement("iframe");E.setAttribute("id",v.postMessageID),E.setAttribute("width","0px"),E.setAttribute("height","0px"),E.setAttribute("style","visiblity:hidden;border:none;outline:none;"),E.addEventListener("load",function(){w(C)}),E.setAttribute("src",h),window.document.body.appendChild(E),C=E.contentWindow})},p.prototype.connect=function(){var h=this,v=/^(http|https):\/\/.*$/;return new Promise(function(w,_){return i(h,void 0,void 0,function(){var C;return a(this,function(E){switch(E.label){case 0:return v.test(this.uri)||_(Error("Bad URI")),C=this,[4,this.createWindow(this.uri)];case 1:return C.frame=E.sent(),window.addEventListener("message",this.messageHandler),w(),[2]}})})})},p.prototype.sendData=function(h,v){return v===void 0&&(v=5e3),i(this,void 0,void 0,function(){var w,_;return a(this,function(C){return w=this.transportRequestManager.addRequest(h,null),_=c.getNotifications(h),this.frame&&(this.frame.postMessage(h.request,"*"),this.transportRequestManager.settlePendingRequest(_)),[2,w]})})},p.prototype.close=function(){var h;(h=document.getElementById(this.postMessageID))==null||h.remove(),window.removeEventListener("message",this.messageHandler)},p})(s.Transport)})),Q0=ke((e=>{var n=e&&e.__awaiter||function(a,s,c,f){function p(h){return h instanceof c?h:new c(function(v){v(h)})}return new(c||(c=Promise))(function(h,v){function w(E){try{C(f.next(E))}catch(R){v(R)}}function _(E){try{C(f.throw(E))}catch(R){v(R)}}function C(E){E.done?h(E.value):p(E.value).then(w,_)}C((f=f.apply(a,s||[])).next())})},i=e&&e.__generator||function(a,s){var c={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},f,p,h,v;return v={next:w(0),throw:w(1),return:w(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function w(C){return function(E){return _([C,E])}}function _(C){if(f)throw TypeError("Generator is already executing.");for(;c;)try{if(f=1,p&&(h=C[0]&2?p.return:C[0]?p.throw||((h=p.return)&&h.call(p),0):p.next)&&!(h=h.call(p,C[1])).done)return h;switch(p=0,h&&(C=[C[0]&2,h.value]),C[0]){case 0:case 1:h=C;break;case 4:return c.label++,{value:C[1],done:!1};case 5:c.label++,p=C[1],C=[0];continue;case 7:C=c.ops.pop(),c.trys.pop();continue;default:if(h=c.trys,!(h=h.length>0&&h[h.length-1])&&(C[0]===6||C[0]===2)){c=0;continue}if(C[0]===3&&(!h||C[1]>h[0]&&C[1]<h[3])){c.label=C[1];break}if(C[0]===6&&c.label<h[1]){c.label=h[1],h=C;break}if(h&&c.label<h[2]){c.label=h[2],c.ops.push(C);break}h[2]&&c.ops.pop(),c.trys.pop();continue}C=s.call(a,c)}catch(E){C=[6,E],p=0}finally{f=h=0}if(C[0]&5)throw C[1];return{value:C[0]?C[1]:void 0,done:!0}}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=(function(){function a(s){this.requestManager=s}return a.prototype.startBatch=function(){return this.requestManager.startBatch()},a.prototype.stopBatch=function(){return this.requestManager.stopBatch()},a.prototype.request=function(s,c){return n(this,void 0,void 0,function(){return i(this,function(f){switch(f.label){case 0:return this.requestManager.connectPromise?[4,this.requestManager.connectPromise]:[3,2];case 1:f.sent(),f.label=2;case 2:return[2,this.requestManager.request(s,!1,c)]}})})},a.prototype.notify=function(s){return n(this,void 0,void 0,function(){return i(this,function(c){switch(c.label){case 0:return this.requestManager.connectPromise?[4,this.requestManager.connectPromise]:[3,2];case 1:c.sent(),c.label=2;case 2:return[2,this.requestManager.request(s,!0,null)]}})})},a.prototype.onNotification=function(s){this.requestManager.requestChannel.addListener("notification",s)},a.prototype.onError=function(s){this.requestManager.requestChannel.addListener("error",s)},a.prototype.close=function(){this.requestManager.close()},a})()})),Ml=ke((e=>{var n=e&&e.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.PostMessageIframeTransport=e.PostMessageWindowTransport=e.JSONRPCError=e.WebSocketTransport=e.EventEmitterTransport=e.HTTPTransport=e.RequestManager=e.Client=void 0,e.RequestManager=n(R0()).default,e.EventEmitterTransport=n(O0()).default,e.HTTPTransport=n(B0()).default,e.WebSocketTransport=n(W0()).default,e.PostMessageWindowTransport=n(U0()).default,e.PostMessageIframeTransport=n(K0()).default;var i=wa();Object.defineProperty(e,"JSONRPCError",{enumerable:!0,get:function(){return i.JSONRPCError}});var a=n(Q0());e.Client=a.default,e.default=a.default})),ka=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function n(h){return h===!0||h===!1}e.boolean=n;function i(h){return typeof h=="string"||h instanceof String}e.string=i;function a(h){return typeof h=="number"||h instanceof Number}e.number=a;function s(h){return h instanceof Error}e.error=s;function c(h){return typeof h=="function"}e.func=c;function f(h){return Array.isArray(h)}e.array=f;function p(h){return f(h)&&h.every(v=>i(v))}e.stringArray=p})),Nd=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Message=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType=e.RequestType0=e.AbstractMessageSignature=e.ParameterStructures=e.ResponseError=e.ErrorCodes=void 0;var n=ka(),i;(function(f){f.ParseError=-32700,f.InvalidRequest=-32600,f.MethodNotFound=-32601,f.InvalidParams=-32602,f.InternalError=-32603,f.jsonrpcReservedErrorRangeStart=-32099,f.serverErrorStart=-32099,f.MessageWriteError=-32099,f.MessageReadError=-32098,f.PendingResponseRejected=-32097,f.ConnectionInactive=-32096,f.ServerNotInitialized=-32002,f.UnknownErrorCode=-32001,f.jsonrpcReservedErrorRangeEnd=-32e3,f.serverErrorEnd=-32e3})(i||(e.ErrorCodes=i={})),e.ResponseError=class o_ extends Error{constructor(p,h,v){super(h),this.code=n.number(p)?p:i.UnknownErrorCode,this.data=v,Object.setPrototypeOf(this,o_.prototype)}toJson(){let p={code:this.code,message:this.message};return this.data!==void 0&&(p.data=this.data),p}};var a=class td{constructor(p){this.kind=p}static is(p){return p===td.auto||p===td.byName||p===td.byPosition}toString(){return this.kind}};e.ParameterStructures=a,a.auto=new a("auto"),a.byPosition=new a("byPosition"),a.byName=new a("byName");var s=class{constructor(f,p){this.method=f,this.numberOfParams=p}get parameterStructures(){return a.auto}};e.AbstractMessageSignature=s,e.RequestType0=class extends s{constructor(f){super(f,0)}},e.RequestType=class extends s{constructor(f,p=a.auto){super(f,1),this._parameterStructures=p}get parameterStructures(){return this._parameterStructures}},e.RequestType1=class extends s{constructor(f,p=a.auto){super(f,1),this._parameterStructures=p}get parameterStructures(){return this._parameterStructures}},e.RequestType2=class extends s{constructor(f){super(f,2)}},e.RequestType3=class extends s{constructor(f){super(f,3)}},e.RequestType4=class extends s{constructor(f){super(f,4)}},e.RequestType5=class extends s{constructor(f){super(f,5)}},e.RequestType6=class extends s{constructor(f){super(f,6)}},e.RequestType7=class extends s{constructor(f){super(f,7)}},e.RequestType8=class extends s{constructor(f){super(f,8)}},e.RequestType9=class extends s{constructor(f){super(f,9)}},e.NotificationType=class extends s{constructor(f,p=a.auto){super(f,1),this._parameterStructures=p}get parameterStructures(){return this._parameterStructures}},e.NotificationType0=class extends s{constructor(f){super(f,0)}},e.NotificationType1=class extends s{constructor(f,p=a.auto){super(f,1),this._parameterStructures=p}get parameterStructures(){return this._parameterStructures}},e.NotificationType2=class extends s{constructor(f){super(f,2)}},e.NotificationType3=class extends s{constructor(f){super(f,3)}},e.NotificationType4=class extends s{constructor(f){super(f,4)}},e.NotificationType5=class extends s{constructor(f){super(f,5)}},e.NotificationType6=class extends s{constructor(f){super(f,6)}},e.NotificationType7=class extends s{constructor(f){super(f,7)}},e.NotificationType8=class extends s{constructor(f){super(f,8)}},e.NotificationType9=class extends s{constructor(f){super(f,9)}};var c;(function(f){function p(w){let _=w;return _&&n.string(_.method)&&(n.string(_.id)||n.number(_.id))}f.isRequest=p;function h(w){let _=w;return _&&n.string(_.method)&&w.id===void 0}f.isNotification=h;function v(w){let _=w;return _&&(_.result!==void 0||!!_.error)&&(n.string(_.id)||n.number(_.id)||_.id===null)}f.isResponse=v})(c||(e.Message=c={}))})),Md=ke((e=>{var n;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0;var i;(function(s){s.None=0,s.First=1,s.AsOld=s.First,s.Last=2,s.AsNew=s.Last})(i||(e.Touch=i={}));var a=class{constructor(){this[n]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var s;return(s=this._head)==null?void 0:s.value}get last(){var s;return(s=this._tail)==null?void 0:s.value}has(s){return this._map.has(s)}get(s,c=i.None){let f=this._map.get(s);if(f)return c!==i.None&&this.touch(f,c),f.value}set(s,c,f=i.None){let p=this._map.get(s);if(p)p.value=c,f!==i.None&&this.touch(p,f);else{switch(p={key:s,value:c,next:void 0,previous:void 0},f){case i.None:this.addItemLast(p);break;case i.First:this.addItemFirst(p);break;case i.Last:this.addItemLast(p);break;default:this.addItemLast(p);break}this._map.set(s,p),this._size++}return this}delete(s){return!!this.remove(s)}remove(s){let c=this._map.get(s);if(c)return this._map.delete(s),this.removeItem(c),this._size--,c.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw Error("Invalid list");let s=this._head;return this._map.delete(s.key),this.removeItem(s),this._size--,s.value}forEach(s,c){let f=this._state,p=this._head;for(;p;){if(c?s.bind(c)(p.value,p.key,this):s(p.value,p.key,this),this._state!==f)throw Error("LinkedMap got modified during iteration.");p=p.next}}keys(){let s=this._state,c=this._head,f={[Symbol.iterator]:()=>f,next:()=>{if(this._state!==s)throw Error("LinkedMap got modified during iteration.");if(c){let p={value:c.key,done:!1};return c=c.next,p}else return{value:void 0,done:!0}}};return f}values(){let s=this._state,c=this._head,f={[Symbol.iterator]:()=>f,next:()=>{if(this._state!==s)throw Error("LinkedMap got modified during iteration.");if(c){let p={value:c.value,done:!1};return c=c.next,p}else return{value:void 0,done:!0}}};return f}entries(){let s=this._state,c=this._head,f={[Symbol.iterator]:()=>f,next:()=>{if(this._state!==s)throw Error("LinkedMap got modified during iteration.");if(c){let p={value:[c.key,c.value],done:!1};return c=c.next,p}else return{value:void 0,done:!0}}};return f}[(n=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(s){if(s>=this.size)return;if(s===0){this.clear();return}let c=this._head,f=this.size;for(;c&&f>s;)this._map.delete(c.key),c=c.next,f--;this._head=c,this._size=f,c&&(c.previous=void 0),this._state++}addItemFirst(s){if(!this._head&&!this._tail)this._tail=s;else if(this._head)s.next=this._head,this._head.previous=s;else throw Error("Invalid list");this._head=s,this._state++}addItemLast(s){if(!this._head&&!this._tail)this._head=s;else if(this._tail)s.previous=this._tail,this._tail.next=s;else throw Error("Invalid list");this._tail=s,this._state++}removeItem(s){if(s===this._head&&s===this._tail)this._head=void 0,this._tail=void 0;else if(s===this._head){if(!s.next)throw Error("Invalid list");s.next.previous=void 0,this._head=s.next}else if(s===this._tail){if(!s.previous)throw Error("Invalid list");s.previous.next=void 0,this._tail=s.previous}else{let c=s.next,f=s.previous;if(!c||!f)throw Error("Invalid list");c.previous=f,f.next=c}s.next=void 0,s.previous=void 0,this._state++}touch(s,c){if(!this._head||!this._tail)throw Error("Invalid list");if(!(c!==i.First&&c!==i.Last)){if(c===i.First){if(s===this._head)return;let f=s.next,p=s.previous;s===this._tail?(p.next=void 0,this._tail=p):(f.previous=p,p.next=f),s.previous=void 0,s.next=this._head,this._head.previous=s,this._head=s,this._state++}else if(c===i.Last){if(s===this._tail)return;let f=s.next,p=s.previous;s===this._head?(f.previous=void 0,this._head=f):(f.previous=p,p.next=f),s.next=void 0,s.previous=this._tail,this._tail.next=s,this._tail=s,this._state++}}}toJSON(){let s=[];return this.forEach((c,f)=>{s.push([f,c])}),s}fromJSON(s){this.clear();for(let[c,f]of s)this.set(c,f)}};e.LinkedMap=a,e.LRUCache=class extends a{constructor(s,c=1){super(),this._limit=s,this._ratio=Math.min(Math.max(0,c),1)}get limit(){return this._limit}set limit(s){this._limit=s,this.checkTrim()}get ratio(){return this._ratio}set ratio(s){this._ratio=Math.min(Math.max(0,s),1),this.checkTrim()}get(s,c=i.AsNew){return super.get(s,c)}peek(s){return super.get(s,i.None)}set(s,c){return super.set(s,c,i.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}})),G0=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0;var n;(function(i){function a(s){return{dispose:s}}i.create=a})(n||(e.Disposable=n={}))})),Ai=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0});var n;function i(){if(n===void 0)throw Error("No runtime abstraction layer installed");return n}(function(a){function s(c){if(c===void 0)throw Error("No runtime abstraction layer provided");n=c}a.install=s})(i||(i={})),e.default=i})),Ca=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var n=Ai(),i;(function(c){let f={dispose(){}};c.None=function(){return f}})(i||(e.Event=i={}));var a=class{add(c,f=null,p){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(c),this._contexts.push(f),Array.isArray(p)&&p.push({dispose:()=>this.remove(c,f)})}remove(c,f=null){if(!this._callbacks)return;let p=!1;for(let h=0,v=this._callbacks.length;h<v;h++)if(this._callbacks[h]===c)if(this._contexts[h]===f){this._callbacks.splice(h,1),this._contexts.splice(h,1);return}else p=!0;if(p)throw Error("When adding a listener with a context, you should remove it with the same context")}invoke(...c){if(!this._callbacks)return[];let f=[],p=this._callbacks.slice(0),h=this._contexts.slice(0);for(let v=0,w=p.length;v<w;v++)try{f.push(p[v].apply(h[v],c))}catch(_){(0,n.default)().console.error(_)}return f}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},s=class a_{constructor(f){this._options=f}get event(){return this._event||(this._event=(f,p,h)=>{this._callbacks||(this._callbacks=new a),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(f,p);let v={dispose:()=>{this._callbacks&&(this._callbacks.remove(f,p),v.dispose=a_._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(h)&&h.push(v),v}),this._event}fire(f){this._callbacks&&this._callbacks.invoke.call(this._callbacks,f)}dispose(){this._callbacks&&(this._callbacks=(this._callbacks.dispose(),void 0))}};e.Emitter=s,s._noop=function(){}})),$l=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var n=Ai(),i=ka(),a=Ca(),s;(function(p){p.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:a.Event.None}),p.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:a.Event.None});function h(v){let w=v;return w&&(w===p.None||w===p.Cancelled||i.boolean(w.isCancellationRequested)&&!!w.onCancellationRequested)}p.is=h})(s||(e.CancellationToken=s={}));var c=Object.freeze(function(p,h){let v=(0,n.default)().timer.setTimeout(p.bind(h),0);return{dispose(){v.dispose()}}}),f=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?c:(this._emitter||(this._emitter=new a.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter=(this._emitter.dispose(),void 0))}};e.CancellationTokenSource=class{get token(){return this._token||(this._token=new f),this._token}cancel(){this._token?this._token.cancel():this._token=s.Cancelled}dispose(){this._token?this._token instanceof f&&this._token.dispose():this._token=s.None}}})),J0=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var n=$l(),i;(function(c){c.Continue=0,c.Cancelled=1})(i||(i={})),e.SharedArraySenderStrategy=class{constructor(){this.buffers=new Map}enableCancellation(c){if(c.id===null)return;let f=new SharedArrayBuffer(4),p=new Int32Array(f,0,1);p[0]=i.Continue,this.buffers.set(c.id,f),c.$cancellationData=f}async sendCancellation(c,f){let p=this.buffers.get(f);if(p===void 0)return;let h=new Int32Array(p,0,1);Atomics.store(h,0,i.Cancelled)}cleanup(c){this.buffers.delete(c)}dispose(){this.buffers.clear()}};var a=class{constructor(c){this.data=new Int32Array(c,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===i.Cancelled}get onCancellationRequested(){throw Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},s=class{constructor(c){this.token=new a(c)}cancel(){}dispose(){}};e.SharedArrayReceiverStrategy=class{constructor(){this.kind="request"}createCancellationTokenSource(c){let f=c.$cancellationData;return f===void 0?new n.CancellationTokenSource:new s(f)}}})),Ld=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;var n=Ai();e.Semaphore=class{constructor(i=1){if(i<=0)throw Error("Capacity must be greater than 0");this._capacity=i,this._active=0,this._waiting=[]}lock(i){return new Promise((a,s)=>{this._waiting.push({thunk:i,resolve:a,reject:s}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,n.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let i=this._waiting.shift();if(this._active++,this._active>this._capacity)throw Error("To many thunks active");try{let a=i.thunk();a instanceof Promise?a.then(s=>{this._active--,i.resolve(s),this.runNext()},s=>{this._active--,i.reject(s),this.runNext()}):(this._active--,i.resolve(a),this.runNext())}catch(a){this._active--,i.reject(a),this.runNext()}}}})),X0=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var n=Ai(),i=ka(),a=Ca(),s=Ld(),c;(function(h){function v(w){let _=w;return _&&i.func(_.listen)&&i.func(_.dispose)&&i.func(_.onError)&&i.func(_.onClose)&&i.func(_.onPartialMessage)}h.is=v})(c||(e.MessageReader=c={}));var f=class{constructor(){this.errorEmitter=new a.Emitter,this.closeEmitter=new a.Emitter,this.partialMessageEmitter=new a.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(h){this.errorEmitter.fire(this.asError(h))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(h){this.partialMessageEmitter.fire(h)}asError(h){return h instanceof Error?h:Error(`Reader received error. Reason: ${i.string(h.message)?h.message:"unknown"}`)}};e.AbstractMessageReader=f;var p;(function(h){function v(w){let _,C,E=new Map,R,L=new Map;if(w===void 0||typeof w=="string")_=w??"utf-8";else{if(_=w.charset??"utf-8",w.contentDecoder!==void 0&&(C=w.contentDecoder,E.set(C.name,C)),w.contentDecoders!==void 0)for(let H of w.contentDecoders)E.set(H.name,H);if(w.contentTypeDecoder!==void 0&&(R=w.contentTypeDecoder,L.set(R.name,R)),w.contentTypeDecoders!==void 0)for(let H of w.contentTypeDecoders)L.set(H.name,H)}return R===void 0&&(R=(0,n.default)().applicationJson.decoder,L.set(R.name,R)),{charset:_,contentDecoder:C,contentDecoders:E,contentTypeDecoder:R,contentTypeDecoders:L}}h.fromOptions=v})(p||(p={})),e.ReadableStreamMessageReader=class extends f{constructor(h,v){super(),this.readable=h,this.options=p.fromOptions(v),this.buffer=(0,n.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new s.Semaphore(1)}set partialMessageTimeout(h){this._partialMessageTimeout=h}get partialMessageTimeout(){return this._partialMessageTimeout}listen(h){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=h;let v=this.readable.onData(w=>{this.onData(w)});return this.readable.onError(w=>this.fireError(w)),this.readable.onClose(()=>this.fireClose()),v}onData(h){try{for(this.buffer.append(h);;){if(this.nextMessageLength===-1){let w=this.buffer.tryReadHeaders(!0);if(!w)return;let _=w.get("content-length");if(!_){this.fireError(Error(`Header must provide a Content-Length property.
79
+ ${JSON.stringify(Object.fromEntries(w))}`));return}let C=parseInt(_);if(isNaN(C)){this.fireError(Error(`Content-Length value must be a number. Got ${_}`));return}this.nextMessageLength=C}let v=this.buffer.tryReadBody(this.nextMessageLength);if(v===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let w=this.options.contentDecoder===void 0?v:await this.options.contentDecoder.decode(v),_=await this.options.contentTypeDecoder.decode(w,this.options);this.callback(_)}).catch(w=>{this.fireError(w)})}}catch(v){this.fireError(v)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer=(this.partialMessageTimer.dispose(),void 0))}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,n.default)().timer.setTimeout((h,v)=>{this.partialMessageTimer=void 0,h===this.messageToken&&(this.firePartialMessage({messageToken:h,waitingTime:v}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}})),Y0=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;var n=Ai(),i=ka(),a=Ld(),s=Ca(),c="Content-Length: ",f=`\r
80
+ `,p;(function(w){function _(C){let E=C;return E&&i.func(E.dispose)&&i.func(E.onClose)&&i.func(E.onError)&&i.func(E.write)}w.is=_})(p||(e.MessageWriter=p={}));var h=class{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(w,_,C){this.errorEmitter.fire([this.asError(w),_,C])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(w){return w instanceof Error?w:Error(`Writer received error. Reason: ${i.string(w.message)?w.message:"unknown"}`)}};e.AbstractMessageWriter=h;var v;(function(w){function _(C){return C===void 0||typeof C=="string"?{charset:C??"utf-8",contentTypeEncoder:(0,n.default)().applicationJson.encoder}:{charset:C.charset??"utf-8",contentEncoder:C.contentEncoder,contentTypeEncoder:C.contentTypeEncoder??(0,n.default)().applicationJson.encoder}}w.fromOptions=_})(v||(v={})),e.WriteableStreamMessageWriter=class extends h{constructor(w,_){super(),this.writable=w,this.options=v.fromOptions(_),this.errorCount=0,this.writeSemaphore=new a.Semaphore(1),this.writable.onError(C=>this.fireError(C)),this.writable.onClose(()=>this.fireClose())}async write(w){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(w,this.options).then(_=>this.options.contentEncoder===void 0?_:this.options.contentEncoder.encode(_)).then(_=>{let C=[];return C.push(c,_.byteLength.toString(),f),C.push(f),this.doWrite(w,C,_)},_=>{throw this.fireError(_),_}))}async doWrite(w,_,C){try{return await this.writable.write(_.join(""),"ascii"),this.writable.write(C)}catch(E){return this.handleError(E,w),Promise.reject(E)}}handleError(w,_){this.errorCount++,this.fireError(w,_,this.errorCount)}end(){this.writable.end()}}})),Z0=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMessageBuffer=void 0;var n=13,i=10,a=`\r
81
+ `;e.AbstractMessageBuffer=class{constructor(s="utf-8"){this._encoding=s,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(s){let c=typeof s=="string"?this.fromString(s,this._encoding):s;this._chunks.push(c),this._totalLength+=c.byteLength}tryReadHeaders(s=!1){if(this._chunks.length===0)return;let c=0,f=0,p=0,h=0;e:for(;f<this._chunks.length;){let C=this._chunks[f];for(p=0;p<C.length;){switch(C[p]){case n:switch(c){case 0:c=1;break;case 2:c=3;break;default:c=0}break;case i:switch(c){case 1:c=2;break;case 3:c=4,p++;break e;default:c=0}break;default:c=0}p++}h+=C.byteLength,f++}if(c!==4)return;let v=this._read(h+p),w=new Map,_=this.toString(v,"ascii").split(a);if(_.length<2)return w;for(let C=0;C<_.length-2;C++){let E=_[C],R=E.indexOf(":");if(R===-1)throw Error(`Message header must separate key and value using ':'
82
+ ${E}`);let L=E.substr(0,R),H=E.substr(R+1).trim();w.set(s?L.toLowerCase():L,H)}return w}tryReadBody(s){if(!(this._totalLength<s))return this._read(s)}get numberOfBytes(){return this._totalLength}_read(s){if(s===0)return this.emptyBuffer();if(s>this._totalLength)throw Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===s){let p=this._chunks[0];return this._chunks.shift(),this._totalLength-=s,this.asNative(p)}if(this._chunks[0].byteLength>s){let p=this._chunks[0],h=this.asNative(p,s);return this._chunks[0]=p.slice(s),this._totalLength-=s,h}let c=this.allocNative(s),f=0;for(;s>0;){let p=this._chunks[0];if(p.byteLength>s){let h=p.slice(0,s);c.set(h,f),f+=s,this._chunks[0]=p.slice(s),this._totalLength-=s,s-=s}else c.set(p,f),f+=p.byteLength,this._chunks.shift(),this._totalLength-=p.byteLength,s-=p.byteLength}return c}}})),eg=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.ConnectionOptions=e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.RequestCancellationReceiverStrategy=e.IdCancellationReceiverStrategy=e.ConnectionStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=e.NullLogger=e.ProgressType=e.ProgressToken=void 0;var n=Ai(),i=ka(),a=Nd(),s=Md(),c=Ca(),f=$l(),p;(function(Z){Z.type=new a.NotificationType("$/cancelRequest")})(p||(p={}));var h;(function(Z){function be(Ee){return typeof Ee=="string"||typeof Ee=="number"}Z.is=be})(h||(e.ProgressToken=h={}));var v;(function(Z){Z.type=new a.NotificationType("$/progress")})(v||(v={})),e.ProgressType=class{constructor(){}};var w;(function(Z){function be(Ee){return i.func(Ee)}Z.is=be})(w||(w={})),e.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var _;(function(Z){Z[Z.Off=0]="Off",Z[Z.Messages=1]="Messages",Z[Z.Compact=2]="Compact",Z[Z.Verbose=3]="Verbose"})(_||(e.Trace=_={}));var C;(function(Z){Z.Off="off",Z.Messages="messages",Z.Compact="compact",Z.Verbose="verbose"})(C||(e.TraceValues=C={})),(function(Z){function be(re){if(!i.string(re))return Z.Off;switch(re=re.toLowerCase(),re){case"off":return Z.Off;case"messages":return Z.Messages;case"compact":return Z.Compact;case"verbose":return Z.Verbose;default:return Z.Off}}Z.fromString=be;function Ee(re){switch(re){case Z.Off:return"off";case Z.Messages:return"messages";case Z.Compact:return"compact";case Z.Verbose:return"verbose";default:return"off"}}Z.toString=Ee})(_||(e.Trace=_={}));var E;(function(Z){Z.Text="text",Z.JSON="json"})(E||(e.TraceFormat=E={})),(function(Z){function be(Ee){return i.string(Ee)?(Ee=Ee.toLowerCase(),Ee==="json"?Z.JSON:Z.Text):Z.Text}Z.fromString=be})(E||(e.TraceFormat=E={}));var R;(function(Z){Z.type=new a.NotificationType("$/setTrace")})(R||(e.SetTraceNotification=R={}));var L;(function(Z){Z.type=new a.NotificationType("$/logTrace")})(L||(e.LogTraceNotification=L={}));var H;(function(Z){Z[Z.Closed=1]="Closed",Z[Z.Disposed=2]="Disposed",Z[Z.AlreadyListening=3]="AlreadyListening"})(H||(e.ConnectionErrors=H={}));var W=class s_ extends Error{constructor(be,Ee){super(Ee),this.code=be,Object.setPrototypeOf(this,s_.prototype)}};e.ConnectionError=W;var U;(function(Z){function be(Ee){let re=Ee;return re&&i.func(re.cancelUndispatched)}Z.is=be})(U||(e.ConnectionStrategy=U={}));var A;(function(Z){function be(Ee){let re=Ee;return re&&(re.kind===void 0||re.kind==="id")&&i.func(re.createCancellationTokenSource)&&(re.dispose===void 0||i.func(re.dispose))}Z.is=be})(A||(e.IdCancellationReceiverStrategy=A={}));var G;(function(Z){function be(Ee){let re=Ee;return re&&re.kind==="request"&&i.func(re.createCancellationTokenSource)&&(re.dispose===void 0||i.func(re.dispose))}Z.is=be})(G||(e.RequestCancellationReceiverStrategy=G={}));var he;(function(Z){Z.Message=Object.freeze({createCancellationTokenSource(Ee){return new f.CancellationTokenSource}});function be(Ee){return A.is(Ee)||G.is(Ee)}Z.is=be})(he||(e.CancellationReceiverStrategy=he={}));var N;(function(Z){Z.Message=Object.freeze({sendCancellation(Ee,re){return Ee.sendNotification(p.type,{id:re})},cleanup(Ee){}});function be(Ee){let re=Ee;return re&&i.func(re.sendCancellation)&&i.func(re.cleanup)}Z.is=be})(N||(e.CancellationSenderStrategy=N={}));var j;(function(Z){Z.Message=Object.freeze({receiver:he.Message,sender:N.Message});function be(Ee){let re=Ee;return re&&he.is(re.receiver)&&N.is(re.sender)}Z.is=be})(j||(e.CancellationStrategy=j={}));var V;(function(Z){function be(Ee){let re=Ee;return re&&i.func(re.handleMessage)}Z.is=be})(V||(e.MessageStrategy=V={}));var de;(function(Z){function be(Ee){let re=Ee;return re&&(j.is(re.cancellationStrategy)||U.is(re.connectionStrategy)||V.is(re.messageStrategy))}Z.is=be})(de||(e.ConnectionOptions=de={}));var pe;(function(Z){Z[Z.New=1]="New",Z[Z.Listening=2]="Listening",Z[Z.Closed=3]="Closed",Z[Z.Disposed=4]="Disposed"})(pe||(pe={}));function xe(Z,be,Ee,re){let oe=Ee===void 0?e.NullLogger:Ee,le=0,K=0,Ae=0,Qe,ut=new Map,Fe,We=new Map,De=new Map,Ne,mn=new s.LinkedMap,It=new Map,Dn=new Set,sn=new Map,Ue=_.Off,tn=E.Text,gt,hn=pe.New,Xn=new c.Emitter,kt=new c.Emitter,ai=new c.Emitter,gn=new c.Emitter,yn=new c.Emitter,Ln=re&&re.cancellationStrategy?re.cancellationStrategy:j.Message;function Pr(q){if(q===null)throw Error("Can't send requests with id null since the response can't be correlated.");return"req-"+q.toString()}function An(q){return q===null?"res-unknown-"+(++Ae).toString():"res-"+q.toString()}function nn(){return"not-"+(++K).toString()}function Fi(q,ee){a.Message.isRequest(ee)?q.set(Pr(ee.id),ee):a.Message.isResponse(ee)?q.set(An(ee.id),ee):q.set(nn(),ee)}function $r(q){}function Nr(){return hn===pe.Listening}function si(){return hn===pe.Closed}function Ht(){return hn===pe.Disposed}function Qt(){(hn===pe.New||hn===pe.Listening)&&(hn=pe.Closed,kt.fire(void 0))}function yt(q){Xn.fire([q,void 0,void 0])}function Ft(q){Xn.fire(q)}Z.onClose(Qt),Z.onError(yt),be.onClose(Qt),be.onError(Ft);function Ct(){Ne||mn.size===0||(Ne=(0,n.default)().timer.setImmediate(()=>{Ne=void 0,Bi()}))}function li(q){a.Message.isRequest(q)?fr(q):a.Message.isNotification(q)?Vt(q):a.Message.isResponse(q)?Ge(q):st(q)}function Bi(){if(mn.size===0)return;let q=mn.shift();try{let ee=re==null?void 0:re.messageStrategy;V.is(ee)?ee.handleMessage(q,li):li(q)}finally{Ct()}}let Mr=q=>{try{if(a.Message.isNotification(q)&&q.method===p.type.method){let ee=q.params.id,ye=Pr(ee),Ce=mn.get(ye);if(a.Message.isRequest(Ce)){let tt=re==null?void 0:re.connectionStrategy,it=tt&&tt.cancelUndispatched?tt.cancelUndispatched(Ce,$r):void 0;if(it&&(it.error!==void 0||it.result!==void 0)){mn.delete(ye),sn.delete(ee),it.id=Ce.id,St(it,q.method,Date.now()),be.write(it).catch(()=>oe.error("Sending response for canceled message failed."));return}}let ft=sn.get(ee);if(ft!==void 0){ft.cancel(),Ur(q);return}else Dn.add(ee)}Fi(mn,q)}finally{Ct()}};function fr(q){if(Ht())return;function ee($e,He,ot){let ht={jsonrpc:"2.0",id:q.id};$e instanceof a.ResponseError?ht.error=$e.toJson():ht.result=$e===void 0?null:$e,St(ht,He,ot),be.write(ht).catch(()=>oe.error("Sending response failed."))}function ye($e,He,ot){let ht={jsonrpc:"2.0",id:q.id,error:$e.toJson()};St(ht,He,ot),be.write(ht).catch(()=>oe.error("Sending response failed."))}function Ce($e,He,ot){$e===void 0&&($e=null);let ht={jsonrpc:"2.0",id:q.id,result:$e};St(ht,He,ot),be.write(ht).catch(()=>oe.error("Sending response failed."))}Yn(q);let ft=ut.get(q.method),tt,it;ft&&(tt=ft.type,it=ft.handler);let wt=Date.now();if(it||Qe){let $e=q.id??String(Date.now()),He=A.is(Ln.receiver)?Ln.receiver.createCancellationTokenSource($e):Ln.receiver.createCancellationTokenSource(q);q.id!==null&&Dn.has(q.id)&&He.cancel(),q.id!==null&&sn.set($e,He);try{let ot;if(it)if(q.params===void 0){if(tt!==void 0&&tt.numberOfParams!==0){ye(new a.ResponseError(a.ErrorCodes.InvalidParams,`Request ${q.method} defines ${tt.numberOfParams} params but received none.`),q.method,wt);return}ot=it(He.token)}else if(Array.isArray(q.params)){if(tt!==void 0&&tt.parameterStructures===a.ParameterStructures.byName){ye(new a.ResponseError(a.ErrorCodes.InvalidParams,`Request ${q.method} defines parameters by name but received parameters by position`),q.method,wt);return}ot=it(...q.params,He.token)}else{if(tt!==void 0&&tt.parameterStructures===a.ParameterStructures.byPosition){ye(new a.ResponseError(a.ErrorCodes.InvalidParams,`Request ${q.method} defines parameters by position but received parameters by name`),q.method,wt);return}ot=it(q.params,He.token)}else Qe&&(ot=Qe(q.method,q.params,He.token));let ht=ot;ot?ht.then?ht.then($t=>{sn.delete($e),ee($t,q.method,wt)},$t=>{sn.delete($e),$t instanceof a.ResponseError?ye($t,q.method,wt):$t&&i.string($t.message)?ye(new a.ResponseError(a.ErrorCodes.InternalError,`Request ${q.method} failed with message: ${$t.message}`),q.method,wt):ye(new a.ResponseError(a.ErrorCodes.InternalError,`Request ${q.method} failed unexpectedly without providing any details.`),q.method,wt)}):(sn.delete($e),ee(ot,q.method,wt)):(sn.delete($e),Ce(ot,q.method,wt))}catch(ot){sn.delete($e),ot instanceof a.ResponseError?ee(ot,q.method,wt):ot&&i.string(ot.message)?ye(new a.ResponseError(a.ErrorCodes.InternalError,`Request ${q.method} failed with message: ${ot.message}`),q.method,wt):ye(new a.ResponseError(a.ErrorCodes.InternalError,`Request ${q.method} failed unexpectedly without providing any details.`),q.method,wt)}}else ye(new a.ResponseError(a.ErrorCodes.MethodNotFound,`Unhandled method ${q.method}`),q.method,wt)}function Ge(q){if(!Ht())if(q.id===null)q.error?oe.error(`Received response message without id: Error is:
83
+ ${JSON.stringify(q.error,void 0,4)}`):oe.error("Received response message without id. No further error information provided.");else{let ee=q.id,ye=It.get(ee);if(ci(q,ye),ye!==void 0){It.delete(ee);try{if(q.error){let Ce=q.error;ye.reject(new a.ResponseError(Ce.code,Ce.message,Ce.data))}else if(q.result!==void 0)ye.resolve(q.result);else throw Error("Should never happen.")}catch(Ce){Ce.message?oe.error(`Response handler '${ye.method}' failed with message: ${Ce.message}`):oe.error(`Response handler '${ye.method}' failed unexpectedly.`)}}}}function Vt(q){if(Ht())return;let ee,ye;if(q.method===p.type.method){let Ce=q.params.id;Dn.delete(Ce),Ur(q);return}else{let Ce=We.get(q.method);Ce&&(ye=Ce.handler,ee=Ce.type)}if(ye||Fe)try{if(Ur(q),ye)if(q.params===void 0)ee!==void 0&&ee.numberOfParams!==0&&ee.parameterStructures!==a.ParameterStructures.byName&&oe.error(`Notification ${q.method} defines ${ee.numberOfParams} params but received none.`),ye();else if(Array.isArray(q.params)){let Ce=q.params;q.method===v.type.method&&Ce.length===2&&h.is(Ce[0])?ye({token:Ce[0],value:Ce[1]}):(ee!==void 0&&(ee.parameterStructures===a.ParameterStructures.byName&&oe.error(`Notification ${q.method} defines parameters by name but received parameters by position`),ee.numberOfParams!==q.params.length&&oe.error(`Notification ${q.method} defines ${ee.numberOfParams} params but received ${Ce.length} arguments`)),ye(...Ce))}else ee!==void 0&&ee.parameterStructures===a.ParameterStructures.byPosition&&oe.error(`Notification ${q.method} defines parameters by position but received parameters by name`),ye(q.params);else Fe&&Fe(q.method,q.params)}catch(Ce){Ce.message?oe.error(`Notification handler '${q.method}' failed with message: ${Ce.message}`):oe.error(`Notification handler '${q.method}' failed unexpectedly.`)}else ai.fire(q)}function st(q){if(!q){oe.error("Received empty message.");return}oe.error(`Received message which is neither a response nor a notification message:
84
+ ${JSON.stringify(q,null,4)}`);let ee=q;if(i.string(ee.id)||i.number(ee.id)){let ye=ee.id,Ce=It.get(ye);Ce&&Ce.reject(Error("The received response has neither a result nor an error property."))}}function vt(q){if(q!=null)switch(Ue){case _.Verbose:return JSON.stringify(q,null,4);case _.Compact:return JSON.stringify(q);default:return}}function On(q){if(!(Ue===_.Off||!gt))if(tn===E.Text){let ee;(Ue===_.Verbose||Ue===_.Compact)&&q.params&&(ee=`Params: ${vt(q.params)}
85
+
86
+ `),gt.log(`Sending request '${q.method} - (${q.id})'.`,ee)}else In("send-request",q)}function Wr(q){if(!(Ue===_.Off||!gt))if(tn===E.Text){let ee;(Ue===_.Verbose||Ue===_.Compact)&&(ee=q.params?`Params: ${vt(q.params)}
87
+
88
+ `:`No parameters provided.
89
+
90
+ `),gt.log(`Sending notification '${q.method}'.`,ee)}else In("send-notification",q)}function St(q,ee,ye){if(!(Ue===_.Off||!gt))if(tn===E.Text){let Ce;(Ue===_.Verbose||Ue===_.Compact)&&(q.error&&q.error.data?Ce=`Error data: ${vt(q.error.data)}
91
+
92
+ `:q.result?Ce=`Result: ${vt(q.result)}
93
+
94
+ `:q.error===void 0&&(Ce=`No result returned.
95
+
96
+ `)),gt.log(`Sending response '${ee} - (${q.id})'. Processing request took ${Date.now()-ye}ms`,Ce)}else In("send-response",q)}function Yn(q){if(!(Ue===_.Off||!gt))if(tn===E.Text){let ee;(Ue===_.Verbose||Ue===_.Compact)&&q.params&&(ee=`Params: ${vt(q.params)}
97
+
98
+ `),gt.log(`Received request '${q.method} - (${q.id})'.`,ee)}else In("receive-request",q)}function Ur(q){if(!(Ue===_.Off||!gt||q.method===L.type.method))if(tn===E.Text){let ee;(Ue===_.Verbose||Ue===_.Compact)&&(ee=q.params?`Params: ${vt(q.params)}
99
+
100
+ `:`No parameters provided.
101
+
102
+ `),gt.log(`Received notification '${q.method}'.`,ee)}else In("receive-notification",q)}function ci(q,ee){if(!(Ue===_.Off||!gt))if(tn===E.Text){let ye;if((Ue===_.Verbose||Ue===_.Compact)&&(q.error&&q.error.data?ye=`Error data: ${vt(q.error.data)}
103
+
104
+ `:q.result?ye=`Result: ${vt(q.result)}
105
+
106
+ `:q.error===void 0&&(ye=`No result returned.
107
+
108
+ `)),ee){let Ce=q.error?` Request failed: ${q.error.message} (${q.error.code}).`:"";gt.log(`Received response '${ee.method} - (${q.id})' in ${Date.now()-ee.timerStart}ms.${Ce}`,ye)}else gt.log(`Received response ${q.id} without active response promise.`,ye)}else In("receive-response",q)}function In(q,ee){if(!gt||Ue===_.Off)return;let ye={isLSPMessage:!0,type:q,message:ee,timestamp:Date.now()};gt.log(ye)}function Bn(){if(si())throw new W(H.Closed,"Connection is closed.");if(Ht())throw new W(H.Disposed,"Connection is disposed.")}function Kr(){if(Nr())throw new W(H.AlreadyListening,"Connection is already listening")}function ui(){if(!Nr())throw Error("Call listen() first.")}function Zn(q){return q===void 0?null:q}function Pn(q){if(q!==null)return q}function bt(q){return q!=null&&!Array.isArray(q)&&typeof q=="object"}function jt(q,ee){switch(q){case a.ParameterStructures.auto:return bt(ee)?Pn(ee):[Zn(ee)];case a.ParameterStructures.byName:if(!bt(ee))throw Error("Received parameters by name but param is not an object literal.");return Pn(ee);case a.ParameterStructures.byPosition:return[Zn(ee)];default:throw Error(`Unknown parameter structure ${q.toString()}`)}}function P(q,ee){let ye,Ce=q.numberOfParams;switch(Ce){case 0:ye=void 0;break;case 1:ye=jt(q.parameterStructures,ee[0]);break;default:ye=[];for(let ft=0;ft<ee.length&&ft<Ce;ft++)ye.push(Zn(ee[ft]));if(ee.length<Ce)for(let ft=ee.length;ft<Ce;ft++)ye.push(null);break}return ye}let Je={sendNotification:(q,...ee)=>{Bn();let ye,Ce;if(i.string(q)){ye=q;let tt=ee[0],it=0,wt=a.ParameterStructures.auto;a.ParameterStructures.is(tt)&&(it=1,wt=tt);let $e=ee.length,He=$e-it;switch(He){case 0:Ce=void 0;break;case 1:Ce=jt(wt,ee[it]);break;default:if(wt===a.ParameterStructures.byName)throw Error(`Received ${He} parameters for 'by Name' notification parameter structure.`);Ce=ee.slice(it,$e).map(ot=>Zn(ot));break}}else{let tt=ee;ye=q.method,Ce=P(q,tt)}let ft={jsonrpc:"2.0",method:ye,params:Ce};return Wr(ft),be.write(ft).catch(tt=>{throw oe.error("Sending notification failed."),tt})},onNotification:(q,ee)=>{Bn();let ye;return i.func(q)?Fe=q:ee&&(i.string(q)?(ye=q,We.set(q,{type:void 0,handler:ee})):(ye=q.method,We.set(q.method,{type:q,handler:ee}))),{dispose:()=>{ye===void 0?Fe=void 0:We.delete(ye)}}},onProgress:(q,ee,ye)=>{if(De.has(ee))throw Error(`Progress handler for token ${ee} already registered`);return De.set(ee,ye),{dispose:()=>{De.delete(ee)}}},sendProgress:(q,ee,ye)=>Je.sendNotification(v.type,{token:ee,value:ye}),onUnhandledProgress:gn.event,sendRequest:(q,...ee)=>{Bn(),ui();let ye,Ce,ft;if(i.string(q)){ye=q;let $e=ee[0],He=ee[ee.length-1],ot=0,ht=a.ParameterStructures.auto;a.ParameterStructures.is($e)&&(ot=1,ht=$e);let $t=ee.length;f.CancellationToken.is(He)&&(--$t,ft=He);let er=$t-ot;switch(er){case 0:Ce=void 0;break;case 1:Ce=jt(ht,ee[ot]);break;default:if(ht===a.ParameterStructures.byName)throw Error(`Received ${er} parameters for 'by Name' request parameter structure.`);Ce=ee.slice(ot,$t).map(xs=>Zn(xs));break}}else{let $e=ee;ye=q.method,Ce=P(q,$e);let He=q.numberOfParams;ft=f.CancellationToken.is($e[He])?$e[He]:void 0}let tt=le++,it;ft&&(it=ft.onCancellationRequested(()=>{let $e=Ln.sender.sendCancellation(Je,tt);return $e===void 0?(oe.log(`Received no promise from cancellation strategy when cancelling id ${tt}`),Promise.resolve()):$e.catch(()=>{oe.log(`Sending cancellation messages for id ${tt} failed`)})}));let wt={jsonrpc:"2.0",id:tt,method:ye,params:Ce};return On(wt),typeof Ln.sender.enableCancellation=="function"&&Ln.sender.enableCancellation(wt),new Promise(async($e,He)=>{let ot={method:ye,timerStart:Date.now(),resolve:ht=>{$e(ht),Ln.sender.cleanup(tt),it==null||it.dispose()},reject:ht=>{He(ht),Ln.sender.cleanup(tt),it==null||it.dispose()}};try{await be.write(wt),It.set(tt,ot)}catch(ht){throw oe.error("Sending request failed."),ot.reject(new a.ResponseError(a.ErrorCodes.MessageWriteError,ht.message?ht.message:"Unknown reason")),ht}})},onRequest:(q,ee)=>{Bn();let ye=null;return w.is(q)?(ye=void 0,Qe=q):i.string(q)?(ye=null,ee!==void 0&&(ye=q,ut.set(q,{handler:ee,type:void 0}))):ee!==void 0&&(ye=q.method,ut.set(q.method,{type:q,handler:ee})),{dispose:()=>{ye!==null&&(ye===void 0?Qe=void 0:ut.delete(ye))}}},hasPendingResponse:()=>It.size>0,trace:async(q,ee,ye)=>{let Ce=!1,ft=E.Text;ye!==void 0&&(i.boolean(ye)?Ce=ye:(Ce=ye.sendNotification||!1,ft=ye.traceFormat||E.Text)),Ue=q,tn=ft,gt=Ue===_.Off?void 0:ee,Ce&&!si()&&!Ht()&&await Je.sendNotification(R.type,{value:_.toString(q)})},onError:Xn.event,onClose:kt.event,onUnhandledNotification:ai.event,onDispose:yn.event,end:()=>{be.end()},dispose:()=>{if(Ht())return;hn=pe.Disposed,yn.fire(void 0);let q=new a.ResponseError(a.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let ee of It.values())ee.reject(q);It=new Map,sn=new Map,Dn=new Set,mn=new s.LinkedMap,i.func(be.dispose)&&be.dispose(),i.func(Z.dispose)&&Z.dispose()},listen:()=>{Bn(),Kr(),hn=pe.Listening,Z.listen(Mr)},inspect:()=>{(0,n.default)().console.log("inspect")}};return Je.onNotification(L.type,q=>{if(Ue===_.Off||!gt)return;let ee=Ue===_.Verbose||Ue===_.Compact;gt.log(q.message,ee?q.verbose:void 0)}),Je.onNotification(v.type,q=>{let ee=De.get(q.token);ee?ee(q.value):gn.fire(q)}),Je}e.createMessageConnection=xe})),Wl=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressType=e.ProgressToken=e.createMessageConnection=e.NullLogger=e.ConnectionOptions=e.ConnectionStrategy=e.AbstractMessageBuffer=e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=e.CancellationToken=e.CancellationTokenSource=e.Emitter=e.Event=e.Disposable=e.LRUCache=e.Touch=e.LinkedMap=e.ParameterStructures=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.ErrorCodes=e.ResponseError=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType0=e.RequestType=e.Message=e.RAL=void 0,e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=void 0;var n=Nd();Object.defineProperty(e,"Message",{enumerable:!0,get:function(){return n.Message}}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:function(){return n.RequestType}}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:function(){return n.RequestType0}}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:function(){return n.RequestType1}}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:function(){return n.RequestType2}}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:function(){return n.RequestType3}}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:function(){return n.RequestType4}}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:function(){return n.RequestType5}}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:function(){return n.RequestType6}}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:function(){return n.RequestType7}}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:function(){return n.RequestType8}}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:function(){return n.RequestType9}}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:function(){return n.ResponseError}}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:function(){return n.ErrorCodes}}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:function(){return n.NotificationType}}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:function(){return n.NotificationType0}}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:function(){return n.NotificationType1}}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:function(){return n.NotificationType2}}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:function(){return n.NotificationType3}}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:function(){return n.NotificationType4}}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:function(){return n.NotificationType5}}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:function(){return n.NotificationType6}}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:function(){return n.NotificationType7}}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:function(){return n.NotificationType8}}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:function(){return n.NotificationType9}}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:function(){return n.ParameterStructures}});var i=Md();Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:function(){return i.LinkedMap}}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:function(){return i.LRUCache}}),Object.defineProperty(e,"Touch",{enumerable:!0,get:function(){return i.Touch}});var a=G0();Object.defineProperty(e,"Disposable",{enumerable:!0,get:function(){return a.Disposable}});var s=Ca();Object.defineProperty(e,"Event",{enumerable:!0,get:function(){return s.Event}}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:function(){return s.Emitter}});var c=$l();Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:function(){return c.CancellationTokenSource}}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:function(){return c.CancellationToken}});var f=J0();Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return f.SharedArraySenderStrategy}}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return f.SharedArrayReceiverStrategy}});var p=X0();Object.defineProperty(e,"MessageReader",{enumerable:!0,get:function(){return p.MessageReader}}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:function(){return p.AbstractMessageReader}}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return p.ReadableStreamMessageReader}});var h=Y0();Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:function(){return h.MessageWriter}}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:function(){return h.AbstractMessageWriter}}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return h.WriteableStreamMessageWriter}});var v=Z0();Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:function(){return v.AbstractMessageBuffer}});var w=eg();Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:function(){return w.ConnectionStrategy}}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:function(){return w.ConnectionOptions}}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:function(){return w.NullLogger}}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:function(){return w.createMessageConnection}}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:function(){return w.ProgressToken}}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:function(){return w.ProgressType}}),Object.defineProperty(e,"Trace",{enumerable:!0,get:function(){return w.Trace}}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:function(){return w.TraceValues}}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:function(){return w.TraceFormat}}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:function(){return w.SetTraceNotification}}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:function(){return w.LogTraceNotification}}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:function(){return w.ConnectionErrors}}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:function(){return w.ConnectionError}}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return w.CancellationReceiverStrategy}}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:function(){return w.CancellationSenderStrategy}}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:function(){return w.CancellationStrategy}}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:function(){return w.MessageStrategy}}),e.RAL=Ai().default})),tg=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0});var n=Wl(),i=class l_ extends n.AbstractMessageBuffer{constructor(v="utf-8"){super(v),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return l_.emptyBuffer}fromString(v,w){return new TextEncoder().encode(v)}toString(v,w){return w==="ascii"?this.asciiDecoder.decode(v):new TextDecoder(w).decode(v)}asNative(v,w){return w===void 0?v:v.slice(0,w)}allocNative(v){return new Uint8Array(v)}};i.emptyBuffer=new Uint8Array;var a=class{constructor(h){this.socket=h,this._onData=new n.Emitter,this._messageListener=v=>{v.data.arrayBuffer().then(w=>{this._onData.fire(new Uint8Array(w))},()=>{(0,n.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(h){return this.socket.addEventListener("close",h),n.Disposable.create(()=>this.socket.removeEventListener("close",h))}onError(h){return this.socket.addEventListener("error",h),n.Disposable.create(()=>this.socket.removeEventListener("error",h))}onEnd(h){return this.socket.addEventListener("end",h),n.Disposable.create(()=>this.socket.removeEventListener("end",h))}onData(h){return this._onData.event(h)}},s=class{constructor(h){this.socket=h}onClose(h){return this.socket.addEventListener("close",h),n.Disposable.create(()=>this.socket.removeEventListener("close",h))}onError(h){return this.socket.addEventListener("error",h),n.Disposable.create(()=>this.socket.removeEventListener("error",h))}onEnd(h){return this.socket.addEventListener("end",h),n.Disposable.create(()=>this.socket.removeEventListener("end",h))}write(h,v){if(typeof h=="string"){if(v!==void 0&&v!=="utf-8")throw Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${v}`);this.socket.send(h)}else this.socket.send(h);return Promise.resolve()}end(){this.socket.close()}},c=new TextEncoder,f=Object.freeze({messageBuffer:Object.freeze({create:h=>new i(h)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(h,v)=>{if(v.charset!=="utf-8")throw Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${v.charset}`);return Promise.resolve(c.encode(JSON.stringify(h,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(h,v)=>{if(!(h instanceof Uint8Array))throw Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(v.charset).decode(h)))}})}),stream:Object.freeze({asReadableStream:h=>new a(h),asWritableStream:h=>new s(h)}),console,timer:Object.freeze({setTimeout(h,v,...w){let _=setTimeout(h,v,...w);return{dispose:()=>clearTimeout(_)}},setImmediate(h,...v){let w=setTimeout(h,0,...v);return{dispose:()=>clearTimeout(w)}},setInterval(h,v,...w){let _=setInterval(h,v,...w);return{dispose:()=>clearInterval(_)}}})});function p(){return f}(function(h){function v(){n.RAL.install(f)}h.install=v})(p||(p={})),e.default=p})),xo=ke((e=>{var n=e&&e.__createBinding||(Object.create?(function(c,f,p,h){h===void 0&&(h=p);var v=Object.getOwnPropertyDescriptor(f,p);(!v||("get"in v?!f.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return f[p]}}),Object.defineProperty(c,h,v)}):(function(c,f,p,h){h===void 0&&(h=p),c[h]=f[p]})),i=e&&e.__exportStar||function(c,f){for(var p in c)p!=="default"&&!Object.prototype.hasOwnProperty.call(f,p)&&n(f,c,p)};Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.BrowserMessageWriter=e.BrowserMessageReader=void 0,tg().default.install();var a=Wl();i(Wl(),e),e.BrowserMessageReader=class extends a.AbstractMessageReader{constructor(c){super(),this._onData=new a.Emitter,this._messageListener=f=>{this._onData.fire(f.data)},c.addEventListener("error",f=>this.fireError(f)),c.onmessage=this._messageListener}listen(c){return this._onData.event(c)}},e.BrowserMessageWriter=class extends a.AbstractMessageWriter{constructor(c){super(),this.port=c,this.errorCount=0,c.addEventListener("error",f=>this.fireError(f))}write(c){try{return this.port.postMessage(c),Promise.resolve()}catch(f){return this.handleError(f,c),Promise.reject(f)}}handleError(c,f){this.errorCount++,this.fireError(c,f,this.errorCount)}end(){}};function s(c,f,p,h){return p===void 0&&(p=a.NullLogger),a.ConnectionStrategy.is(h)&&(h={connectionStrategy:h}),(0,a.createMessageConnection)(c,f,p,h)}e.createMessageConnection=s})),Ad=ke(((e,n)=>{n.exports=xo()})),qt=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;var n=xo(),i;(function(a){a.clientToServer="clientToServer",a.serverToClient="serverToClient",a.both="both"})(i||(e.MessageDirection=i={})),e.RegistrationType=class{constructor(a){this.method=a}},e.ProtocolRequestType0=class extends n.RequestType0{constructor(a){super(a)}},e.ProtocolRequestType=class extends n.RequestType{constructor(a){super(a,n.ParameterStructures.byName)}},e.ProtocolNotificationType0=class extends n.NotificationType0{constructor(a){super(a)}},e.ProtocolNotificationType=class extends n.NotificationType{constructor(a){super(a,n.ParameterStructures.byName)}}})),Ul=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.objectLiteral=e.typedArray=e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function n(w){return w===!0||w===!1}e.boolean=n;function i(w){return typeof w=="string"||w instanceof String}e.string=i;function a(w){return typeof w=="number"||w instanceof Number}e.number=a;function s(w){return w instanceof Error}e.error=s;function c(w){return typeof w=="function"}e.func=c;function f(w){return Array.isArray(w)}e.array=f;function p(w){return f(w)&&w.every(_=>i(_))}e.stringArray=p;function h(w,_){return Array.isArray(w)&&w.every(_)}e.typedArray=h;function v(w){return typeof w=="object"&&!!w}e.objectLiteral=v})),ng=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationRequest=void 0;var n=qt(),i;(function(a){a.method="textDocument/implementation",a.messageDirection=n.MessageDirection.clientToServer,a.type=new n.ProtocolRequestType(a.method)})(i||(e.ImplementationRequest=i={}))})),rg=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TypeDefinitionRequest=void 0;var n=qt(),i;(function(a){a.method="textDocument/typeDefinition",a.messageDirection=n.MessageDirection.clientToServer,a.type=new n.ProtocolRequestType(a.method)})(i||(e.TypeDefinitionRequest=i={}))})),ig=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;var n=qt(),i;(function(s){s.method="workspace/workspaceFolders",s.messageDirection=n.MessageDirection.serverToClient,s.type=new n.ProtocolRequestType0(s.method)})(i||(e.WorkspaceFoldersRequest=i={}));var a;(function(s){s.method="workspace/didChangeWorkspaceFolders",s.messageDirection=n.MessageDirection.clientToServer,s.type=new n.ProtocolNotificationType(s.method)})(a||(e.DidChangeWorkspaceFoldersNotification=a={}))})),og=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationRequest=void 0;var n=qt(),i;(function(a){a.method="workspace/configuration",a.messageDirection=n.MessageDirection.serverToClient,a.type=new n.ProtocolRequestType(a.method)})(i||(e.ConfigurationRequest=i={}))})),ag=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;var n=qt(),i;(function(s){s.method="textDocument/documentColor",s.messageDirection=n.MessageDirection.clientToServer,s.type=new n.ProtocolRequestType(s.method)})(i||(e.DocumentColorRequest=i={}));var a;(function(s){s.method="textDocument/colorPresentation",s.messageDirection=n.MessageDirection.clientToServer,s.type=new n.ProtocolRequestType(s.method)})(a||(e.ColorPresentationRequest=a={}))})),sg=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;var n=qt(),i;(function(s){s.method="textDocument/foldingRange",s.messageDirection=n.MessageDirection.clientToServer,s.type=new n.ProtocolRequestType(s.method)})(i||(e.FoldingRangeRequest=i={}));var a;(function(s){s.method="workspace/foldingRange/refresh",s.messageDirection=n.MessageDirection.serverToClient,s.type=new n.ProtocolRequestType0(s.method)})(a||(e.FoldingRangeRefreshRequest=a={}))})),lg=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarationRequest=void 0;var n=qt(),i;(function(a){a.method="textDocument/declaration",a.messageDirection=n.MessageDirection.clientToServer,a.type=new n.ProtocolRequestType(a.method)})(i||(e.DeclarationRequest=i={}))})),cg=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRangeRequest=void 0;var n=qt(),i;(function(a){a.method="textDocument/selectionRange",a.messageDirection=n.MessageDirection.clientToServer,a.type=new n.ProtocolRequestType(a.method)})(i||(e.SelectionRangeRequest=i={}))})),ug=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;var n=xo(),i=qt(),a;(function(f){f.type=new n.ProgressType;function p(h){return h===f.type}f.is=p})(a||(e.WorkDoneProgress=a={}));var s;(function(f){f.method="window/workDoneProgress/create",f.messageDirection=i.MessageDirection.serverToClient,f.type=new i.ProtocolRequestType(f.method)})(s||(e.WorkDoneProgressCreateRequest=s={}));var c;(function(f){f.method="window/workDoneProgress/cancel",f.messageDirection=i.MessageDirection.clientToServer,f.type=new i.ProtocolNotificationType(f.method)})(c||(e.WorkDoneProgressCancelNotification=c={}))})),dg=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;var n=qt(),i;(function(c){c.method="textDocument/prepareCallHierarchy",c.messageDirection=n.MessageDirection.clientToServer,c.type=new n.ProtocolRequestType(c.method)})(i||(e.CallHierarchyPrepareRequest=i={}));var a;(function(c){c.method="callHierarchy/incomingCalls",c.messageDirection=n.MessageDirection.clientToServer,c.type=new n.ProtocolRequestType(c.method)})(a||(e.CallHierarchyIncomingCallsRequest=a={}));var s;(function(c){c.method="callHierarchy/outgoingCalls",c.messageDirection=n.MessageDirection.clientToServer,c.type=new n.ProtocolRequestType(c.method)})(s||(e.CallHierarchyOutgoingCallsRequest=s={}))})),fg=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.SemanticTokensRegistrationType=e.TokenFormat=void 0;var n=qt(),i;(function(h){h.Relative="relative"})(i||(e.TokenFormat=i={}));var a;(function(h){h.method="textDocument/semanticTokens",h.type=new n.RegistrationType(h.method)})(a||(e.SemanticTokensRegistrationType=a={}));var s;(function(h){h.method="textDocument/semanticTokens/full",h.messageDirection=n.MessageDirection.clientToServer,h.type=new n.ProtocolRequestType(h.method),h.registrationMethod=a.method})(s||(e.SemanticTokensRequest=s={}));var c;(function(h){h.method="textDocument/semanticTokens/full/delta",h.messageDirection=n.MessageDirection.clientToServer,h.type=new n.ProtocolRequestType(h.method),h.registrationMethod=a.method})(c||(e.SemanticTokensDeltaRequest=c={}));var f;(function(h){h.method="textDocument/semanticTokens/range",h.messageDirection=n.MessageDirection.clientToServer,h.type=new n.ProtocolRequestType(h.method),h.registrationMethod=a.method})(f||(e.SemanticTokensRangeRequest=f={}));var p;(function(h){h.method="workspace/semanticTokens/refresh",h.messageDirection=n.MessageDirection.serverToClient,h.type=new n.ProtocolRequestType0(h.method)})(p||(e.SemanticTokensRefreshRequest=p={}))})),pg=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentRequest=void 0;var n=qt(),i;(function(a){a.method="window/showDocument",a.messageDirection=n.MessageDirection.serverToClient,a.type=new n.ProtocolRequestType(a.method)})(i||(e.ShowDocumentRequest=i={}))})),mg=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeRequest=void 0;var n=qt(),i;(function(a){a.method="textDocument/linkedEditingRange",a.messageDirection=n.MessageDirection.clientToServer,a.type=new n.ProtocolRequestType(a.method)})(i||(e.LinkedEditingRangeRequest=i={}))})),hg=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.DidRenameFilesNotification=e.WillRenameFilesRequest=e.DidCreateFilesNotification=e.WillCreateFilesRequest=e.FileOperationPatternKind=void 0;var n=qt(),i;(function(v){v.file="file",v.folder="folder"})(i||(e.FileOperationPatternKind=i={}));var a;(function(v){v.method="workspace/willCreateFiles",v.messageDirection=n.MessageDirection.clientToServer,v.type=new n.ProtocolRequestType(v.method)})(a||(e.WillCreateFilesRequest=a={}));var s;(function(v){v.method="workspace/didCreateFiles",v.messageDirection=n.MessageDirection.clientToServer,v.type=new n.ProtocolNotificationType(v.method)})(s||(e.DidCreateFilesNotification=s={}));var c;(function(v){v.method="workspace/willRenameFiles",v.messageDirection=n.MessageDirection.clientToServer,v.type=new n.ProtocolRequestType(v.method)})(c||(e.WillRenameFilesRequest=c={}));var f;(function(v){v.method="workspace/didRenameFiles",v.messageDirection=n.MessageDirection.clientToServer,v.type=new n.ProtocolNotificationType(v.method)})(f||(e.DidRenameFilesNotification=f={}));var p;(function(v){v.method="workspace/didDeleteFiles",v.messageDirection=n.MessageDirection.clientToServer,v.type=new n.ProtocolNotificationType(v.method)})(p||(e.DidDeleteFilesNotification=p={}));var h;(function(v){v.method="workspace/willDeleteFiles",v.messageDirection=n.MessageDirection.clientToServer,v.type=new n.ProtocolRequestType(v.method)})(h||(e.WillDeleteFilesRequest=h={}))})),gg=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;var n=qt(),i;(function(c){c.document="document",c.project="project",c.group="group",c.scheme="scheme",c.global="global"})(i||(e.UniquenessLevel=i={}));var a;(function(c){c.$import="import",c.$export="export",c.local="local"})(a||(e.MonikerKind=a={}));var s;(function(c){c.method="textDocument/moniker",c.messageDirection=n.MessageDirection.clientToServer,c.type=new n.ProtocolRequestType(c.method)})(s||(e.MonikerRequest=s={}))})),yg=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;var n=qt(),i;(function(c){c.method="textDocument/prepareTypeHierarchy",c.messageDirection=n.MessageDirection.clientToServer,c.type=new n.ProtocolRequestType(c.method)})(i||(e.TypeHierarchyPrepareRequest=i={}));var a;(function(c){c.method="typeHierarchy/supertypes",c.messageDirection=n.MessageDirection.clientToServer,c.type=new n.ProtocolRequestType(c.method)})(a||(e.TypeHierarchySupertypesRequest=a={}));var s;(function(c){c.method="typeHierarchy/subtypes",c.messageDirection=n.MessageDirection.clientToServer,c.type=new n.ProtocolRequestType(c.method)})(s||(e.TypeHierarchySubtypesRequest=s={}))})),vg=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;var n=qt(),i;(function(s){s.method="textDocument/inlineValue",s.messageDirection=n.MessageDirection.clientToServer,s.type=new n.ProtocolRequestType(s.method)})(i||(e.InlineValueRequest=i={}));var a;(function(s){s.method="workspace/inlineValue/refresh",s.messageDirection=n.MessageDirection.serverToClient,s.type=new n.ProtocolRequestType0(s.method)})(a||(e.InlineValueRefreshRequest=a={}))})),bg=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;var n=qt(),i;(function(c){c.method="textDocument/inlayHint",c.messageDirection=n.MessageDirection.clientToServer,c.type=new n.ProtocolRequestType(c.method)})(i||(e.InlayHintRequest=i={}));var a;(function(c){c.method="inlayHint/resolve",c.messageDirection=n.MessageDirection.clientToServer,c.type=new n.ProtocolRequestType(c.method)})(a||(e.InlayHintResolveRequest=a={}));var s;(function(c){c.method="workspace/inlayHint/refresh",c.messageDirection=n.MessageDirection.serverToClient,c.type=new n.ProtocolRequestType0(c.method)})(s||(e.InlayHintRefreshRequest=s={}))})),wg=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;var n=xo(),i=Ul(),a=qt(),s;(function(v){function w(_){let C=_;return C&&i.boolean(C.retriggerRequest)}v.is=w})(s||(e.DiagnosticServerCancellationData=s={}));var c;(function(v){v.Full="full",v.Unchanged="unchanged"})(c||(e.DocumentDiagnosticReportKind=c={}));var f;(function(v){v.method="textDocument/diagnostic",v.messageDirection=a.MessageDirection.clientToServer,v.type=new a.ProtocolRequestType(v.method),v.partialResult=new n.ProgressType})(f||(e.DocumentDiagnosticRequest=f={}));var p;(function(v){v.method="workspace/diagnostic",v.messageDirection=a.MessageDirection.clientToServer,v.type=new a.ProtocolRequestType(v.method),v.partialResult=new n.ProgressType})(p||(e.WorkspaceDiagnosticRequest=p={}));var h;(function(v){v.method="workspace/diagnostic/refresh",v.messageDirection=a.MessageDirection.serverToClient,v.type=new a.ProtocolRequestType0(v.method)})(h||(e.DiagnosticRefreshRequest=h={}))})),_g=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=void 0;var n=(om(),uu(im)),i=Ul(),a=qt(),s;(function(R){R.Markup=1,R.Code=2;function L(H){return H===1||H===2}R.is=L})(s||(e.NotebookCellKind=s={}));var c;(function(R){function L(U,A){let G={executionOrder:U};return(A===!0||A===!1)&&(G.success=A),G}R.create=L;function H(U){let A=U;return i.objectLiteral(A)&&n.uinteger.is(A.executionOrder)&&(A.success===void 0||i.boolean(A.success))}R.is=H;function W(U,A){return U===A?!0:U==null||A==null?!1:U.executionOrder===A.executionOrder&&U.success===A.success}R.equals=W})(c||(e.ExecutionSummary=c={}));var f;(function(R){function L(A,G){return{kind:A,document:G}}R.create=L;function H(A){let G=A;return i.objectLiteral(G)&&s.is(G.kind)&&n.DocumentUri.is(G.document)&&(G.metadata===void 0||i.objectLiteral(G.metadata))}R.is=H;function W(A,G){let he=new Set;return A.document!==G.document&&he.add("document"),A.kind!==G.kind&&he.add("kind"),A.executionSummary!==G.executionSummary&&he.add("executionSummary"),(A.metadata!==void 0||G.metadata!==void 0)&&!U(A.metadata,G.metadata)&&he.add("metadata"),(A.executionSummary!==void 0||G.executionSummary!==void 0)&&!c.equals(A.executionSummary,G.executionSummary)&&he.add("executionSummary"),he}R.diff=W;function U(A,G){if(A===G)return!0;if(A==null||G==null||typeof A!=typeof G||typeof A!="object")return!1;let he=Array.isArray(A),N=Array.isArray(G);if(he!==N)return!1;if(he&&N){if(A.length!==G.length)return!1;for(let j=0;j<A.length;j++)if(!U(A[j],G[j]))return!1}if(i.objectLiteral(A)&&i.objectLiteral(G)){let j=Object.keys(A),V=Object.keys(G);if(j.length!==V.length||(j.sort(),V.sort(),!U(j,V)))return!1;for(let de=0;de<j.length;de++){let pe=j[de];if(!U(A[pe],G[pe]))return!1}}return!0}})(f||(e.NotebookCell=f={}));var p;(function(R){function L(W,U,A,G){return{uri:W,notebookType:U,version:A,cells:G}}R.create=L;function H(W){let U=W;return i.objectLiteral(U)&&i.string(U.uri)&&n.integer.is(U.version)&&i.typedArray(U.cells,f.is)}R.is=H})(p||(e.NotebookDocument=p={}));var h;(function(R){R.method="notebookDocument/sync",R.messageDirection=a.MessageDirection.clientToServer,R.type=new a.RegistrationType(R.method)})(h||(e.NotebookDocumentSyncRegistrationType=h={}));var v;(function(R){R.method="notebookDocument/didOpen",R.messageDirection=a.MessageDirection.clientToServer,R.type=new a.ProtocolNotificationType(R.method),R.registrationMethod=h.method})(v||(e.DidOpenNotebookDocumentNotification=v={}));var w;(function(R){function L(W){let U=W;return i.objectLiteral(U)&&n.uinteger.is(U.start)&&n.uinteger.is(U.deleteCount)&&(U.cells===void 0||i.typedArray(U.cells,f.is))}R.is=L;function H(W,U,A){let G={start:W,deleteCount:U};return A!==void 0&&(G.cells=A),G}R.create=H})(w||(e.NotebookCellArrayChange=w={}));var _;(function(R){R.method="notebookDocument/didChange",R.messageDirection=a.MessageDirection.clientToServer,R.type=new a.ProtocolNotificationType(R.method),R.registrationMethod=h.method})(_||(e.DidChangeNotebookDocumentNotification=_={}));var C;(function(R){R.method="notebookDocument/didSave",R.messageDirection=a.MessageDirection.clientToServer,R.type=new a.ProtocolNotificationType(R.method),R.registrationMethod=h.method})(C||(e.DidSaveNotebookDocumentNotification=C={}));var E;(function(R){R.method="notebookDocument/didClose",R.messageDirection=a.MessageDirection.clientToServer,R.type=new a.ProtocolNotificationType(R.method),R.registrationMethod=h.method})(E||(e.DidCloseNotebookDocumentNotification=E={}))})),xg=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionRequest=void 0;var n=qt(),i;(function(a){a.method="textDocument/inlineCompletion",a.messageDirection=n.MessageDirection.clientToServer,a.type=new n.ProtocolRequestType(a.method)})(i||(e.InlineCompletionRequest=i={}))})),kg=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceSymbolRequest=e.CodeActionResolveRequest=e.CodeActionRequest=e.DocumentSymbolRequest=e.DocumentHighlightRequest=e.ReferencesRequest=e.DefinitionRequest=e.SignatureHelpRequest=e.SignatureHelpTriggerKind=e.HoverRequest=e.CompletionResolveRequest=e.CompletionRequest=e.CompletionTriggerKind=e.PublishDiagnosticsNotification=e.WatchKind=e.RelativePattern=e.FileChangeType=e.DidChangeWatchedFilesNotification=e.WillSaveTextDocumentWaitUntilRequest=e.WillSaveTextDocumentNotification=e.TextDocumentSaveReason=e.DidSaveTextDocumentNotification=e.DidCloseTextDocumentNotification=e.DidChangeTextDocumentNotification=e.TextDocumentContentChangeEvent=e.DidOpenTextDocumentNotification=e.TextDocumentSyncKind=e.TelemetryEventNotification=e.LogMessageNotification=e.ShowMessageRequest=e.ShowMessageNotification=e.MessageType=e.DidChangeConfigurationNotification=e.ExitNotification=e.ShutdownRequest=e.InitializedNotification=e.InitializeErrorCodes=e.InitializeRequest=e.WorkDoneProgressOptions=e.TextDocumentRegistrationOptions=e.StaticRegistrationOptions=e.PositionEncodingKind=e.FailureHandlingKind=e.ResourceOperationKind=e.UnregistrationRequest=e.RegistrationRequest=e.DocumentSelector=e.NotebookCellTextDocumentFilter=e.NotebookDocumentFilter=e.TextDocumentFilter=void 0,e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.WillRenameFilesRequest=e.DidRenameFilesNotification=e.WillCreateFilesRequest=e.DidCreateFilesNotification=e.FileOperationPatternKind=e.LinkedEditingRangeRequest=e.ShowDocumentRequest=e.SemanticTokensRegistrationType=e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.TokenFormat=e.CallHierarchyPrepareRequest=e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=e.SelectionRangeRequest=e.DeclarationRequest=e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=e.ColorPresentationRequest=e.DocumentColorRequest=e.ConfigurationRequest=e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=e.TypeDefinitionRequest=e.ImplementationRequest=e.ApplyWorkspaceEditRequest=e.ExecuteCommandRequest=e.PrepareRenameRequest=e.RenameRequest=e.PrepareSupportDefaultBehavior=e.DocumentOnTypeFormattingRequest=e.DocumentRangesFormattingRequest=e.DocumentRangeFormattingRequest=e.DocumentFormattingRequest=e.DocumentLinkResolveRequest=e.DocumentLinkRequest=e.CodeLensRefreshRequest=e.CodeLensResolveRequest=e.CodeLensRequest=e.WorkspaceSymbolResolveRequest=void 0,e.InlineCompletionRequest=e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=e.InlineValueRefreshRequest=e.InlineValueRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchySubtypesRequest=e.TypeHierarchyPrepareRequest=void 0;var n=qt(),i=(om(),uu(im)),a=Ul(),s=ng();Object.defineProperty(e,"ImplementationRequest",{enumerable:!0,get:function(){return s.ImplementationRequest}});var c=rg();Object.defineProperty(e,"TypeDefinitionRequest",{enumerable:!0,get:function(){return c.TypeDefinitionRequest}});var f=ig();Object.defineProperty(e,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return f.WorkspaceFoldersRequest}}),Object.defineProperty(e,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return f.DidChangeWorkspaceFoldersNotification}});var p=og();Object.defineProperty(e,"ConfigurationRequest",{enumerable:!0,get:function(){return p.ConfigurationRequest}});var h=ag();Object.defineProperty(e,"DocumentColorRequest",{enumerable:!0,get:function(){return h.DocumentColorRequest}}),Object.defineProperty(e,"ColorPresentationRequest",{enumerable:!0,get:function(){return h.ColorPresentationRequest}});var v=sg();Object.defineProperty(e,"FoldingRangeRequest",{enumerable:!0,get:function(){return v.FoldingRangeRequest}}),Object.defineProperty(e,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return v.FoldingRangeRefreshRequest}});var w=lg();Object.defineProperty(e,"DeclarationRequest",{enumerable:!0,get:function(){return w.DeclarationRequest}});var _=cg();Object.defineProperty(e,"SelectionRangeRequest",{enumerable:!0,get:function(){return _.SelectionRangeRequest}});var C=ug();Object.defineProperty(e,"WorkDoneProgress",{enumerable:!0,get:function(){return C.WorkDoneProgress}}),Object.defineProperty(e,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return C.WorkDoneProgressCreateRequest}}),Object.defineProperty(e,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return C.WorkDoneProgressCancelNotification}});var E=dg();Object.defineProperty(e,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return E.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(e,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return E.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(e,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return E.CallHierarchyPrepareRequest}});var R=fg();Object.defineProperty(e,"TokenFormat",{enumerable:!0,get:function(){return R.TokenFormat}}),Object.defineProperty(e,"SemanticTokensRequest",{enumerable:!0,get:function(){return R.SemanticTokensRequest}}),Object.defineProperty(e,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return R.SemanticTokensDeltaRequest}}),Object.defineProperty(e,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return R.SemanticTokensRangeRequest}}),Object.defineProperty(e,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return R.SemanticTokensRefreshRequest}}),Object.defineProperty(e,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return R.SemanticTokensRegistrationType}});var L=pg();Object.defineProperty(e,"ShowDocumentRequest",{enumerable:!0,get:function(){return L.ShowDocumentRequest}});var H=mg();Object.defineProperty(e,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return H.LinkedEditingRangeRequest}});var W=hg();Object.defineProperty(e,"FileOperationPatternKind",{enumerable:!0,get:function(){return W.FileOperationPatternKind}}),Object.defineProperty(e,"DidCreateFilesNotification",{enumerable:!0,get:function(){return W.DidCreateFilesNotification}}),Object.defineProperty(e,"WillCreateFilesRequest",{enumerable:!0,get:function(){return W.WillCreateFilesRequest}}),Object.defineProperty(e,"DidRenameFilesNotification",{enumerable:!0,get:function(){return W.DidRenameFilesNotification}}),Object.defineProperty(e,"WillRenameFilesRequest",{enumerable:!0,get:function(){return W.WillRenameFilesRequest}}),Object.defineProperty(e,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return W.DidDeleteFilesNotification}}),Object.defineProperty(e,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return W.WillDeleteFilesRequest}});var U=gg();Object.defineProperty(e,"UniquenessLevel",{enumerable:!0,get:function(){return U.UniquenessLevel}}),Object.defineProperty(e,"MonikerKind",{enumerable:!0,get:function(){return U.MonikerKind}}),Object.defineProperty(e,"MonikerRequest",{enumerable:!0,get:function(){return U.MonikerRequest}});var A=yg();Object.defineProperty(e,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return A.TypeHierarchyPrepareRequest}}),Object.defineProperty(e,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return A.TypeHierarchySubtypesRequest}}),Object.defineProperty(e,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return A.TypeHierarchySupertypesRequest}});var G=vg();Object.defineProperty(e,"InlineValueRequest",{enumerable:!0,get:function(){return G.InlineValueRequest}}),Object.defineProperty(e,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return G.InlineValueRefreshRequest}});var he=bg();Object.defineProperty(e,"InlayHintRequest",{enumerable:!0,get:function(){return he.InlayHintRequest}}),Object.defineProperty(e,"InlayHintResolveRequest",{enumerable:!0,get:function(){return he.InlayHintResolveRequest}}),Object.defineProperty(e,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return he.InlayHintRefreshRequest}});var N=wg();Object.defineProperty(e,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return N.DiagnosticServerCancellationData}}),Object.defineProperty(e,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return N.DocumentDiagnosticReportKind}}),Object.defineProperty(e,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return N.DocumentDiagnosticRequest}}),Object.defineProperty(e,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return N.WorkspaceDiagnosticRequest}}),Object.defineProperty(e,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return N.DiagnosticRefreshRequest}});var j=_g();Object.defineProperty(e,"NotebookCellKind",{enumerable:!0,get:function(){return j.NotebookCellKind}}),Object.defineProperty(e,"ExecutionSummary",{enumerable:!0,get:function(){return j.ExecutionSummary}}),Object.defineProperty(e,"NotebookCell",{enumerable:!0,get:function(){return j.NotebookCell}}),Object.defineProperty(e,"NotebookDocument",{enumerable:!0,get:function(){return j.NotebookDocument}}),Object.defineProperty(e,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return j.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(e,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return j.DidOpenNotebookDocumentNotification}}),Object.defineProperty(e,"NotebookCellArrayChange",{enumerable:!0,get:function(){return j.NotebookCellArrayChange}}),Object.defineProperty(e,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return j.DidChangeNotebookDocumentNotification}}),Object.defineProperty(e,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return j.DidSaveNotebookDocumentNotification}}),Object.defineProperty(e,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return j.DidCloseNotebookDocumentNotification}});var V=xg();Object.defineProperty(e,"InlineCompletionRequest",{enumerable:!0,get:function(){return V.InlineCompletionRequest}});var de;(function(P){function Je(q){let ee=q;return a.string(ee)||a.string(ee.language)||a.string(ee.scheme)||a.string(ee.pattern)}P.is=Je})(de||(e.TextDocumentFilter=de={}));var pe;(function(P){function Je(q){let ee=q;return a.objectLiteral(ee)&&(a.string(ee.notebookType)||a.string(ee.scheme)||a.string(ee.pattern))}P.is=Je})(pe||(e.NotebookDocumentFilter=pe={}));var xe;(function(P){function Je(q){let ee=q;return a.objectLiteral(ee)&&(a.string(ee.notebook)||pe.is(ee.notebook))&&(ee.language===void 0||a.string(ee.language))}P.is=Je})(xe||(e.NotebookCellTextDocumentFilter=xe={}));var Z;(function(P){function Je(q){if(!Array.isArray(q))return!1;for(let ee of q)if(!a.string(ee)&&!de.is(ee)&&!xe.is(ee))return!1;return!0}P.is=Je})(Z||(e.DocumentSelector=Z={}));var be;(function(P){P.method="client/registerCapability",P.messageDirection=n.MessageDirection.serverToClient,P.type=new n.ProtocolRequestType(P.method)})(be||(e.RegistrationRequest=be={}));var Ee;(function(P){P.method="client/unregisterCapability",P.messageDirection=n.MessageDirection.serverToClient,P.type=new n.ProtocolRequestType(P.method)})(Ee||(e.UnregistrationRequest=Ee={}));var re;(function(P){P.Create="create",P.Rename="rename",P.Delete="delete"})(re||(e.ResourceOperationKind=re={}));var oe;(function(P){P.Abort="abort",P.Transactional="transactional",P.TextOnlyTransactional="textOnlyTransactional",P.Undo="undo"})(oe||(e.FailureHandlingKind=oe={}));var le;(function(P){P.UTF8="utf-8",P.UTF16="utf-16",P.UTF32="utf-32"})(le||(e.PositionEncodingKind=le={}));var K;(function(P){function Je(q){let ee=q;return ee&&a.string(ee.id)&&ee.id.length>0}P.hasId=Je})(K||(e.StaticRegistrationOptions=K={}));var Ae;(function(P){function Je(q){let ee=q;return ee&&(ee.documentSelector===null||Z.is(ee.documentSelector))}P.is=Je})(Ae||(e.TextDocumentRegistrationOptions=Ae={}));var Qe;(function(P){function Je(ee){let ye=ee;return a.objectLiteral(ye)&&(ye.workDoneProgress===void 0||a.boolean(ye.workDoneProgress))}P.is=Je;function q(ee){let ye=ee;return ye&&a.boolean(ye.workDoneProgress)}P.hasWorkDoneProgress=q})(Qe||(e.WorkDoneProgressOptions=Qe={}));var ut;(function(P){P.method="initialize",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType(P.method)})(ut||(e.InitializeRequest=ut={}));var Fe;(function(P){P.unknownProtocolVersion=1})(Fe||(e.InitializeErrorCodes=Fe={}));var We;(function(P){P.method="initialized",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolNotificationType(P.method)})(We||(e.InitializedNotification=We={}));var De;(function(P){P.method="shutdown",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType0(P.method)})(De||(e.ShutdownRequest=De={}));var Ne;(function(P){P.method="exit",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolNotificationType0(P.method)})(Ne||(e.ExitNotification=Ne={}));var mn;(function(P){P.method="workspace/didChangeConfiguration",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolNotificationType(P.method)})(mn||(e.DidChangeConfigurationNotification=mn={}));var It;(function(P){P.Error=1,P.Warning=2,P.Info=3,P.Log=4,P.Debug=5})(It||(e.MessageType=It={}));var Dn;(function(P){P.method="window/showMessage",P.messageDirection=n.MessageDirection.serverToClient,P.type=new n.ProtocolNotificationType(P.method)})(Dn||(e.ShowMessageNotification=Dn={}));var sn;(function(P){P.method="window/showMessageRequest",P.messageDirection=n.MessageDirection.serverToClient,P.type=new n.ProtocolRequestType(P.method)})(sn||(e.ShowMessageRequest=sn={}));var Ue;(function(P){P.method="window/logMessage",P.messageDirection=n.MessageDirection.serverToClient,P.type=new n.ProtocolNotificationType(P.method)})(Ue||(e.LogMessageNotification=Ue={}));var tn;(function(P){P.method="telemetry/event",P.messageDirection=n.MessageDirection.serverToClient,P.type=new n.ProtocolNotificationType(P.method)})(tn||(e.TelemetryEventNotification=tn={}));var gt;(function(P){P.None=0,P.Full=1,P.Incremental=2})(gt||(e.TextDocumentSyncKind=gt={}));var hn;(function(P){P.method="textDocument/didOpen",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolNotificationType(P.method)})(hn||(e.DidOpenTextDocumentNotification=hn={}));var Xn;(function(P){function Je(ee){let ye=ee;return ye!=null&&typeof ye.text=="string"&&ye.range!==void 0&&(ye.rangeLength===void 0||typeof ye.rangeLength=="number")}P.isIncremental=Je;function q(ee){let ye=ee;return ye!=null&&typeof ye.text=="string"&&ye.range===void 0&&ye.rangeLength===void 0}P.isFull=q})(Xn||(e.TextDocumentContentChangeEvent=Xn={}));var kt;(function(P){P.method="textDocument/didChange",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolNotificationType(P.method)})(kt||(e.DidChangeTextDocumentNotification=kt={}));var ai;(function(P){P.method="textDocument/didClose",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolNotificationType(P.method)})(ai||(e.DidCloseTextDocumentNotification=ai={}));var gn;(function(P){P.method="textDocument/didSave",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolNotificationType(P.method)})(gn||(e.DidSaveTextDocumentNotification=gn={}));var yn;(function(P){P.Manual=1,P.AfterDelay=2,P.FocusOut=3})(yn||(e.TextDocumentSaveReason=yn={}));var Ln;(function(P){P.method="textDocument/willSave",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolNotificationType(P.method)})(Ln||(e.WillSaveTextDocumentNotification=Ln={}));var Pr;(function(P){P.method="textDocument/willSaveWaitUntil",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType(P.method)})(Pr||(e.WillSaveTextDocumentWaitUntilRequest=Pr={}));var An;(function(P){P.method="workspace/didChangeWatchedFiles",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolNotificationType(P.method)})(An||(e.DidChangeWatchedFilesNotification=An={}));var nn;(function(P){P.Created=1,P.Changed=2,P.Deleted=3})(nn||(e.FileChangeType=nn={}));var Fi;(function(P){function Je(q){let ee=q;return a.objectLiteral(ee)&&(i.URI.is(ee.baseUri)||i.WorkspaceFolder.is(ee.baseUri))&&a.string(ee.pattern)}P.is=Je})(Fi||(e.RelativePattern=Fi={}));var $r;(function(P){P.Create=1,P.Change=2,P.Delete=4})($r||(e.WatchKind=$r={}));var Nr;(function(P){P.method="textDocument/publishDiagnostics",P.messageDirection=n.MessageDirection.serverToClient,P.type=new n.ProtocolNotificationType(P.method)})(Nr||(e.PublishDiagnosticsNotification=Nr={}));var si;(function(P){P.Invoked=1,P.TriggerCharacter=2,P.TriggerForIncompleteCompletions=3})(si||(e.CompletionTriggerKind=si={}));var Ht;(function(P){P.method="textDocument/completion",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType(P.method)})(Ht||(e.CompletionRequest=Ht={}));var Qt;(function(P){P.method="completionItem/resolve",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType(P.method)})(Qt||(e.CompletionResolveRequest=Qt={}));var yt;(function(P){P.method="textDocument/hover",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType(P.method)})(yt||(e.HoverRequest=yt={}));var Ft;(function(P){P.Invoked=1,P.TriggerCharacter=2,P.ContentChange=3})(Ft||(e.SignatureHelpTriggerKind=Ft={}));var Ct;(function(P){P.method="textDocument/signatureHelp",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType(P.method)})(Ct||(e.SignatureHelpRequest=Ct={}));var li;(function(P){P.method="textDocument/definition",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType(P.method)})(li||(e.DefinitionRequest=li={}));var Bi;(function(P){P.method="textDocument/references",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType(P.method)})(Bi||(e.ReferencesRequest=Bi={}));var Mr;(function(P){P.method="textDocument/documentHighlight",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType(P.method)})(Mr||(e.DocumentHighlightRequest=Mr={}));var fr;(function(P){P.method="textDocument/documentSymbol",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType(P.method)})(fr||(e.DocumentSymbolRequest=fr={}));var Ge;(function(P){P.method="textDocument/codeAction",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType(P.method)})(Ge||(e.CodeActionRequest=Ge={}));var Vt;(function(P){P.method="codeAction/resolve",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType(P.method)})(Vt||(e.CodeActionResolveRequest=Vt={}));var st;(function(P){P.method="workspace/symbol",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType(P.method)})(st||(e.WorkspaceSymbolRequest=st={}));var vt;(function(P){P.method="workspaceSymbol/resolve",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType(P.method)})(vt||(e.WorkspaceSymbolResolveRequest=vt={}));var On;(function(P){P.method="textDocument/codeLens",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType(P.method)})(On||(e.CodeLensRequest=On={}));var Wr;(function(P){P.method="codeLens/resolve",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType(P.method)})(Wr||(e.CodeLensResolveRequest=Wr={}));var St;(function(P){P.method="workspace/codeLens/refresh",P.messageDirection=n.MessageDirection.serverToClient,P.type=new n.ProtocolRequestType0(P.method)})(St||(e.CodeLensRefreshRequest=St={}));var Yn;(function(P){P.method="textDocument/documentLink",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType(P.method)})(Yn||(e.DocumentLinkRequest=Yn={}));var Ur;(function(P){P.method="documentLink/resolve",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType(P.method)})(Ur||(e.DocumentLinkResolveRequest=Ur={}));var ci;(function(P){P.method="textDocument/formatting",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType(P.method)})(ci||(e.DocumentFormattingRequest=ci={}));var In;(function(P){P.method="textDocument/rangeFormatting",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType(P.method)})(In||(e.DocumentRangeFormattingRequest=In={}));var Bn;(function(P){P.method="textDocument/rangesFormatting",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType(P.method)})(Bn||(e.DocumentRangesFormattingRequest=Bn={}));var Kr;(function(P){P.method="textDocument/onTypeFormatting",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType(P.method)})(Kr||(e.DocumentOnTypeFormattingRequest=Kr={}));var ui;(function(P){P.Identifier=1})(ui||(e.PrepareSupportDefaultBehavior=ui={}));var Zn;(function(P){P.method="textDocument/rename",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType(P.method)})(Zn||(e.RenameRequest=Zn={}));var Pn;(function(P){P.method="textDocument/prepareRename",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType(P.method)})(Pn||(e.PrepareRenameRequest=Pn={}));var bt;(function(P){P.method="workspace/executeCommand",P.messageDirection=n.MessageDirection.clientToServer,P.type=new n.ProtocolRequestType(P.method)})(bt||(e.ExecuteCommandRequest=bt={}));var jt;(function(P){P.method="workspace/applyEdit",P.messageDirection=n.MessageDirection.serverToClient,P.type=new n.ProtocolRequestType("workspace/applyEdit")})(jt||(e.ApplyWorkspaceEditRequest=jt={}))})),Cg=ke((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var n=xo();function i(a,s,c,f){return n.ConnectionStrategy.is(f)&&(f={connectionStrategy:f}),(0,n.createMessageConnection)(a,s,c,f)}e.createProtocolConnection=i})),Sg=ke((e=>{var n=e&&e.__createBinding||(Object.create?(function(c,f,p,h){h===void 0&&(h=p);var v=Object.getOwnPropertyDescriptor(f,p);(!v||("get"in v?!f.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return f[p]}}),Object.defineProperty(c,h,v)}):(function(c,f,p,h){h===void 0&&(h=p),c[h]=f[p]})),i=e&&e.__exportStar||function(c,f){for(var p in c)p!=="default"&&!Object.prototype.hasOwnProperty.call(f,p)&&n(f,c,p)};Object.defineProperty(e,"__esModule",{value:!0}),e.LSPErrorCodes=e.createProtocolConnection=void 0,i(xo(),e),i((om(),uu(im)),e),i(qt(),e),i(kg(),e);var a=Cg();Object.defineProperty(e,"createProtocolConnection",{enumerable:!0,get:function(){return a.createProtocolConnection}});var s;(function(c){c.lspReservedErrorRangeStart=-32899,c.RequestFailed=-32803,c.ServerCancelled=-32802,c.ContentModified=-32801,c.RequestCancelled=-32800,c.lspReservedErrorRangeEnd=-32800})(s||(e.LSPErrorCodes=s={}))})),Fu=ke((e=>{var n=e&&e.__createBinding||(Object.create?(function(c,f,p,h){h===void 0&&(h=p);var v=Object.getOwnPropertyDescriptor(f,p);(!v||("get"in v?!f.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return f[p]}}),Object.defineProperty(c,h,v)}):(function(c,f,p,h){h===void 0&&(h=p),c[h]=f[p]})),i=e&&e.__exportStar||function(c,f){for(var p in c)p!=="default"&&!Object.prototype.hasOwnProperty.call(f,p)&&n(f,c,p)};Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var a=Ad();i(Ad(),e),i(Sg(),e);function s(c,f,p,h){return(0,a.createMessageConnection)(c,f,p,h)}e.createProtocolConnection=s}));function pn(e,n){if(n.line>=e.lines)return n.character===0?e.length:void 0;let i=e.line(n.line+1).from+n.character;if(!(i>e.length))return i}function Dr(e,n){return pn(e,n)||0}function Ii(e,n){let i=e.lineAt(n);return{character:n-i.from,line:i.number-1}}var Kl=new y2.Renderer,Fk=Kl.code;Kl.code=e=>e.text.trim()?Fk.call(Kl,e):"";function Eg(e){return y2(e,{async:!1,gfm:!0,breaks:!0,renderer:Kl})}function Or(e,n=Eg){if(!e)return"";if($k(e)){let i=e.value;return e.kind==="markdown"&&(i=n(i.trim())),i}return Array.isArray(e)?e.map(i=>Or(i,n)).filter(Boolean).join(`
109
+
110
+ `):typeof e=="string"?e:""}function Bk(e){if(e.length===0)return"";if(e.length===1)return e[0]||"";e.sort();let n=e[0]||"",i=e[e.length-1]||"",a=0;for(;a<n.length&&n[a]===i[a];)a++;return n.substring(0,a)}function Hk(e){if(e.length===0)return;let n=Bk(e.map(s=>{var c;return((c=s.textEdit)==null?void 0:c.newText)||s.label}));if(n==="")return;let i=[];for(let s=0;s<n.length;s++){let c=n.slice(0,s+1);if(c.length>0){let f=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");i.push(f)}}let a=i.join("|");return RegExp(`(${a})$`)}function Vk(e){return(e==null?void 0:e.range)!==void 0}function $k(e){return e.kind!==void 0}function Gn(e,n){let i=document.createElement("div");i.className="cm-error-message",i.style.cssText=`
111
+ position: absolute;
112
+ padding: 8px;
113
+ background: #fee;
114
+ border: 1px solid #fcc;
115
+ border-radius: 4px;
116
+ color: #c00;
117
+ font-size: 14px;
118
+ z-index: 100;
119
+ max-width: 300px;
120
+ box-shadow: 0 2px 8px rgba(0,0,0,.15);
121
+ `,i.textContent=n;let a=e.coordsAtPos(e.state.selection.main.head);a&&(i.style.left=`${a.left}px`,i.style.top=`${a.bottom+5}px`),document.body.appendChild(i),setTimeout(()=>{i.style.opacity="0",i.style.transition="opacity 0.2s",setTimeout(()=>i.remove(),200)},3e3)}function Ql(e){if(e==null)return!0;if(Array.isArray(e))return e.length===0||e.every(Ql);if(typeof e=="string")return Tg(e);let n=e.value;return typeof n=="string"?Tg(n):!1}function Tg(e){return e==null?!0:typeof e=="string"?e.trim()===""||/^[\s\n`]*$/.test(e):!1}function Wk(e,n){let i=[];return n.iterChanges((a,s,c,f,p)=>{let h=p.toString();if(a===0&&s===e.length){i.push({text:h});return}let v=Ii(e,a),w=Ii(e,s);i.push({range:{start:v,end:w},text:h})}),i.sort((a,s)=>{if(!a.range)return 1;if(!s.range)return-1;let c=a.range.start.line??-1,f=s.range.start.line??-1;if(c!==f)return f-c;let p=a.range.start.character??-1;return(s.range.start.character??-1)-p}),i}var Uk=Kt(Fu(),1),Kk=Object.fromEntries(Object.entries(Uk.CompletionItemKind).map(([e,n])=>[n,e])),Rg;(function(e){e.PlainText=1,e.Snippet=2})(Rg||(Rg={}));function Qk(e){return e.replaceAll(/\\\\/g,"").replaceAll(/(\$(\d+))/g,(n,i,a)=>"${"+a+"}")}function Gk(e,n){let{detail:i,labelDetails:a,label:s,kind:c,textEdit:f,insertText:p,documentation:h,additionalTextEdits:v,insertTextFormat:w}=e,_={label:s,detail:(a==null?void 0:a.detail)||i,apply(C,E,R,L){if(f&&Vk(f)?C.dispatch(f2(C.state,f.newText,Dr(C.state.doc,f.range.start),Dr(C.state.doc,f.range.end))):p&&w===Rg.Snippet&&n.useSnippetOnCompletion?sR(Qk(p))(C,null,R,L):C.dispatch(f2(C.state,s,R,L)),!v)return;let H=v.sort(({range:{end:W}},{range:{end:U}})=>Dr(C.state.doc,W)<Dr(C.state.doc,U)?1:Dr(C.state.doc,W)>Dr(C.state.doc,U)?-1:0);for(let W of H)C.dispatch(C.state.update({changes:{from:Dr(C.state.doc,W.range.start),to:pn(C.state.doc,W.range.end),insert:W.newText}}))},type:c&&Kk[c].toLowerCase()};return n.hasResolveProvider&&n.resolveItem?_.info=async()=>{var C;try{let E=await((C=n.resolveItem)==null?void 0:C.call(n,e)),R=document.createElement("div");R.classList.add("documentation");let L=(E==null?void 0:E.documentation)||h;return!L||Ql(L)?null:(n.allowHTMLContent?R.innerHTML=Or(L,n.markdownRenderer):R.textContent=Or(L,n.markdownRenderer),R)}catch(E){if(console.error("Failed to resolve completion item:",E),Ql(h))return null;if(h){let R=document.createElement("div");return R.classList.add("documentation"),n.allowHTMLContent?R.innerHTML=Or(h,n.markdownRenderer):R.textContent=Or(h,n.markdownRenderer),R}return null}}:h&&(_.info=()=>{let C=document.createElement("div");return C.classList.add("documentation"),n.allowHTMLContent?C.innerHTML=Or(h,n.markdownRenderer):C.textContent=Or(h,n.markdownRenderer),C}),_}function Jk(e,n,i){let a=[n?Xk(n):Yk,i==="python"?Zk:void 0].filter(Boolean),s=e;if(n){let c=n.toLowerCase();/^\w+$/.test(c)&&(s=s.filter(({label:f,filterText:p})=>(p??f).toLowerCase().startsWith(c)))}for(let c of a)s.sort(c);return s}function Xk(e){return(n,i)=>{let a=n.sortText??n.label,s=i.sortText??i.label;switch(!0){case(a.startsWith(e)&&!s.startsWith(e)):return-1;case(!a.startsWith(e)&&s.startsWith(e)):return 1}return a.localeCompare(s)}}function Yk(e,n){let i=e.sortText??e.label,a=n.sortText??n.label;return i.localeCompare(a)}function Zk(e,n){let i=e.label.endsWith("="),a=n.label.endsWith("=");return i&&!a?-1:!i&&a?1:0}function Dg(e){let n=new Proxy({},{get(){throw Error(e)}});return function(i){return i.at(-1)??n}}const Og=Sl.define({combine:Dg("No document URI provided. Either pass a one into the extension or use documentUri.of().")}),eC=Sl.define({combine:Dg("No language ID provided. Either pass a one into the extension or use languageId.of().")});let Id,Pg;Id=Kt(Ml(),1),Pg=1e4,Il=class{constructor({rootUri:e,workspaceFolders:n,transport:i,initializationOptions:a,capabilities:s,timeout:c=Pg,getWorkspaceConfiguration:f}){Te(this,"ready");Te(this,"capabilities");Te(this,"initializePromise");Te(this,"rootUri");Te(this,"workspaceFolders");Te(this,"timeout");Te(this,"transport");Te(this,"requestManager");Te(this,"client");Te(this,"initializationOptions");Te(this,"clientCapabilities");Te(this,"notificationListeners",new Set);this.rootUri=e,this.workspaceFolders=n,this.transport=i,this.initializationOptions=a,this.clientCapabilities=s,this.timeout=c,this.ready=!1,this.capabilities=null,this.requestManager=new Id.RequestManager([this.transport]),this.client=new Id.Client(this.requestManager),this.client.onNotification(h=>{this.processNotification(h)});let p=this.transport;p!=null&&p.connection&&p.connection.addEventListener("message",h=>{let v=JSON.parse(h.data);v.method==="workspace/configuration"&&f?p.connection.send(JSON.stringify({jsonrpc:"2.0",id:v.id,result:f(v.params)})):v.method&&v.id&&p.connection.send(JSON.stringify({jsonrpc:"2.0",id:v.id,result:null}))}),this.initializePromise=this.initialize()}getInitializationOptions(){let e={textDocument:{hover:{dynamicRegistration:!0,contentFormat:["markdown","plaintext"]},moniker:{},synchronization:{dynamicRegistration:!0,willSave:!1,didSave:!1,willSaveWaitUntil:!1},codeAction:{dynamicRegistration:!0,codeActionLiteralSupport:{codeActionKind:{valueSet:["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},resolveSupport:{properties:["edit"]}},completion:{dynamicRegistration:!0,completionItem:{snippetSupport:!0,commitCharactersSupport:!0,documentationFormat:["markdown","plaintext"],deprecatedSupport:!1,preselectSupport:!1},contextSupport:!1},signatureHelp:{dynamicRegistration:!0,signatureInformation:{documentationFormat:["markdown","plaintext"]}},declaration:{dynamicRegistration:!0,linkSupport:!0},definition:{dynamicRegistration:!0,linkSupport:!0},typeDefinition:{dynamicRegistration:!0,linkSupport:!0},implementation:{dynamicRegistration:!0,linkSupport:!0},rename:{dynamicRegistration:!0,prepareSupport:!0}},workspace:{didChangeConfiguration:{dynamicRegistration:!0}}};return{capabilities:this.clientCapabilities?typeof this.clientCapabilities=="function"?this.clientCapabilities(e):this.clientCapabilities:e,initializationOptions:this.initializationOptions,processId:null,rootUri:this.rootUri,workspaceFolders:this.workspaceFolders}}async initialize(){let{capabilities:e}=await this.request("initialize",this.getInitializationOptions(),this.timeout*3);this.capabilities=e,this.notify("initialized",{}),this.ready=!0}close(){this.client.close()}textDocumentDidOpen(e){return this.notify("textDocument/didOpen",e)}textDocumentDidChange(e){return this.notify("textDocument/didChange",e)}async textDocumentHover(e){return await this.request("textDocument/hover",e,this.timeout)}async textDocumentCompletion(e){return await this.request("textDocument/completion",e,this.timeout)}async completionItemResolve(e){return await this.request("completionItem/resolve",e,this.timeout)}async textDocumentDefinition(e){return await this.request("textDocument/definition",e,this.timeout)}async textDocumentCodeAction(e){return await this.request("textDocument/codeAction",e,this.timeout)}async textDocumentRename(e){return await this.request("textDocument/rename",e,this.timeout)}async textDocumentPrepareRename(e){return await this.request("textDocument/prepareRename",e,this.timeout)}async textDocumentSignatureHelp(e){return await this.request("textDocument/signatureHelp",e,this.timeout)}onNotification(e){return this.notificationListeners.add(e),()=>this.notificationListeners.delete(e)}request(e,n,i){return this.client.request({method:e,params:n},i)}notify(e,n){return this.client.notify({method:e,params:n})}processNotification(e){this.notificationListeners.forEach(n=>n(e))}},Ml();var ji=Kt(Fu(),1),Ng=console.log;function tC(){return String(Date.now()+Math.random())}var nC=class{constructor(e){Te(this,"documentVersion");Te(this,"pluginId");Te(this,"client");Te(this,"documentUri");Te(this,"languageId");Te(this,"view");Te(this,"allowHTMLContent");Te(this,"useSnippetOnCompletion");Te(this,"sendIncrementalChanges");Te(this,"featureOptions");Te(this,"onGoToDefinition");Te(this,"markdownRenderer");Te(this,"disposeListener");Te(this,"lastSeenDiagnosticsVersion",0);let{client:n,documentUri:i,languageId:a,view:s,featureOptions:c,sendIncrementalChanges:f=!0,allowHTMLContent:p=!1,useSnippetOnCompletion:h=!1,onGoToDefinition:v,markdownRenderer:w=Eg}=e;this.documentVersion=0,this.pluginId=tC(),this.client=n,this.documentUri=i,this.languageId=a,this.view=s,this.allowHTMLContent=p,this.useSnippetOnCompletion=h,this.sendIncrementalChanges=f,this.featureOptions=c,this.onGoToDefinition=v,this.markdownRenderer=w,this.disposeListener=n.onNotification(this.processNotification.bind(this)),this.initialize({documentText:this.view.state.doc.toString()})}update({state:e,docChanged:n,startState:{doc:i},changes:a}){n&&(this.sendIncrementalChanges?this.sendChanges(Wk(i,a)):this.sendChanges([{text:e.doc.toString()}]))}destroy(){var e;(e=this.disposeListener)==null||e.call(this)}async initialize({documentText:e}){this.client.initializePromise&&await this.client.initializePromise,await this.client.textDocumentDidOpen({textDocument:{uri:this.documentUri,languageId:this.languageId,text:e,version:this.documentVersion}})}async sendChanges(e){if(this.client.ready)try{await this.client.textDocumentDidChange({textDocument:{uri:this.documentUri,version:++this.documentVersion},contentChanges:e})}catch(n){console.error(n)}}requestDiagnostics(e){this.sendChanges([{text:e.state.doc.toString()}])}async requestHoverTooltip(e,{line:n,character:i}){var v;if(!this.featureOptions.hoverEnabled||!(this.client.ready&&((v=this.client.capabilities)!=null&&v.hoverProvider)))return null;let a=await this.client.textDocumentHover({textDocument:{uri:this.documentUri},position:{line:n,character:i}});if(!a)return null;let{contents:s,range:c}=a,f=pn(e.state.doc,{line:n,character:i}),p;if(c&&(f=pn(e.state.doc,c.start),p=pn(e.state.doc,c.end)),f==null||Ql(s))return null;let h=document.createElement("div");return h.classList.add("documentation","cm-lsp-hover-tooltip"),this.allowHTMLContent?h.innerHTML=Or(s,this.markdownRenderer):h.textContent=Or(s,this.markdownRenderer),{pos:f,end:p,create:w=>({dom:h}),above:!0}}async requestCompletion(e,{line:n,character:i},{triggerKind:a,triggerCharacter:s}){var C;if(!this.featureOptions.completionEnabled||!(this.client.ready&&((C=this.client.capabilities)!=null&&C.completionProvider)))return null;let c=await this.client.textDocumentCompletion({textDocument:{uri:this.documentUri},position:{line:n,character:i},context:{triggerKind:a,triggerCharacter:s}});if(!c)return null;let f="items"in c?c.items:c,p=Hk(f),h=p?e.matchBefore(p):e.matchBefore(/[a-zA-Z0-9]+/),{pos:v}=e,w=Jk(f,h==null?void 0:h.text,this.languageId);h&&(v=h.from);let _=w.map(E=>{var R,L;return Gk(E,{allowHTMLContent:this.allowHTMLContent,useSnippetOnCompletion:this.useSnippetOnCompletion,hasResolveProvider:((L=(R=this.client.capabilities)==null?void 0:R.completionProvider)==null?void 0:L.resolveProvider)??!1,resolveItem:this.client.completionItemResolve.bind(this.client)})});return{from:v,options:_,filter:!1}}async requestDefinition(e,{line:n,character:i}){var w;if(!this.featureOptions.definitionEnabled||!(this.client.ready&&((w=this.client.capabilities)!=null&&w.definitionProvider)))return;let a=await this.client.textDocumentDefinition({textDocument:{uri:this.documentUri},position:{line:n,character:i}});if(!a)return;let s=Array.isArray(a)?a:[a];if(s.length===0)return;let c=s[0];if(!c)return;let f="uri"in c?c.uri:c.targetUri,p="range"in c?c.range:c.targetRange,h=f!==this.documentUri,v={uri:f,range:p,isExternalDocument:h};return h||e.dispatch(e.state.update({selection:{anchor:Dr(e.state.doc,p.start),head:pn(e.state.doc,p.end)}})),this.onGoToDefinition&&this.onGoToDefinition(v),v}processNotification(e){try{switch(e.method){case"textDocument/publishDiagnostics":this.processDiagnostics(e.params)}}catch(n){Ng(n)}}async processDiagnostics(e){if(e.uri!==this.documentUri)return;if(e.version!=null&&e.version>this.lastSeenDiagnosticsVersion&&(this.lastSeenDiagnosticsVersion=e.version,this.clearDiagnostics()),!this.featureOptions.diagnosticsEnabled){this.clearDiagnostics();return}let n={[ji.DiagnosticSeverity.Error]:"error",[ji.DiagnosticSeverity.Warning]:"warning",[ji.DiagnosticSeverity.Information]:"info",[ji.DiagnosticSeverity.Hint]:"info"},i=e.diagnostics.map(async({range:s,message:c,severity:f,code:p,source:h})=>{var w;let v=(w=await this.requestCodeActions(s,[p]))==null?void 0:w.map(_=>{var C;return{name:"command"in _&&typeof _.command=="object"&&((C=_.command)==null?void 0:C.title)||_.title,apply:async()=>{var E;if("edit"in _&&((E=_.edit)!=null&&E.changes)){let R=_.edit.changes[this.documentUri];if(!R)return;for(let L of R)this.view.dispatch(this.view.state.update({changes:{from:Dr(this.view.state.doc,L.range.start),to:pn(this.view.state.doc,L.range.end),insert:L.newText}}))}"command"in _&&_.command&&Ng("Executing command:",_.command)}}});return{from:Dr(this.view.state.doc,s.start),to:Dr(this.view.state.doc,s.end),severity:n[f??ji.DiagnosticSeverity.Error],message:c,renderMessage:()=>{let _=document.createElement("div");return _.innerHTML=this.markdownRenderer(c),_},source:h||this.languageId,markClass:this.pluginId,actions:v}}),a=await Promise.all(i);this.addDiagnostics(a)}addDiagnostics(e){if(e.length===0)return;let n=this.view.state,i=[];ZT(n,c=>(i.push(c),!0));let a=new Set(e.map(c=>c.source).filter(Boolean)),s=e.filter(c=>!a.has(c.source));this.view.dispatch(c2(n,[...s,...e]))}clearDiagnostics(){this.view.dispatch(c2(this.view.state,[]))}async requestCodeActions(e,n){var i;return!this.featureOptions.codeActionsEnabled||!(this.client.ready&&((i=this.client.capabilities)!=null&&i.codeActionProvider))?null:await this.client.textDocumentCodeAction({textDocument:{uri:this.documentUri},range:e,context:{diagnostics:[{range:e,code:n[0],source:this.languageId,message:""}]}})}async requestRename(e,{line:n,character:i}){var a;if(this.featureOptions.renameEnabled){if(!this.client.ready){Gn(e,"Language server not ready");return}if(!((a=this.client.capabilities)!=null&&a.renameProvider)){Gn(e,"Rename not supported by language server");return}try{let s=await this.client.textDocumentPrepareRename({textDocument:{uri:this.documentUri},position:{line:n,character:i}}).catch(()=>this.prepareRenameFallback(e,{line:n,character:i}));if(!s||"defaultBehavior"in s){Gn(e,"Cannot rename this symbol");return}let c=document.createElement("div");c.className="cm-rename-popup",c.style.cssText="position: absolute; padding: 4px; background: white; border: 1px solid #ddd; box-shadow: 0 2px 8px rgba(0,0,0,.15); z-index: 99;";let f=document.createElement("input");f.type="text",f.style.cssText="width: 200px; padding: 4px; border: 1px solid #ddd;";let p="range"in s?s.range:s,h=pn(e.state.doc,p.start);if(h==null)return;let v=pn(e.state.doc,p.end);f.value=e.state.doc.sliceString(h,v),c.appendChild(f);let w=e.coordsAtPos(h);if(!w)return;c.style.left=`${w.left}px`,c.style.top=`${w.bottom+5}px`;let _=async()=>{let E=f.value.trim();if(!E){Gn(e,"New name cannot be empty"),c.remove();return}if(E===f.defaultValue){c.remove();return}try{let R=await this.client.textDocumentRename({textDocument:{uri:this.documentUri},position:{line:n,character:i},newName:E});await this.applyRenameEdit(e,R)}catch(R){Gn(e,`Rename failed: ${R instanceof Error?R.message:"Unknown error"}`)}finally{c.remove()}};f.addEventListener("keydown",E=>{E.key==="Enter"?_():E.key==="Escape"&&c.remove(),E.stopPropagation()});let C=E=>{c.contains(E.target)||(c.remove(),document.removeEventListener("mousedown",C))};document.addEventListener("mousedown",C),document.body.appendChild(c),f.focus(),f.select()}catch(s){Gn(e,`Rename failed: ${s instanceof Error?s.message:"Unknown error"}`)}}}async requestSignatureHelp(e,{line:n,character:i},a=void 0){var s,c;if(!(this.featureOptions.signatureHelpEnabled&&this.client.ready&&((s=this.client.capabilities)!=null&&s.signatureHelpProvider)))return null;try{let f=await this.client.textDocumentSignatureHelp({textDocument:{uri:this.documentUri},position:{line:n,character:i},context:{isRetrigger:!1,triggerKind:1,triggerCharacter:a}});if(!(f!=null&&f.signatures)||f.signatures.length===0)return null;let p=this.createTooltipContainer(),h=f.activeSignature??0,v=f.signatures[h]||f.signatures[0];if(!v)return null;let w=f.activeParameter??v.activeParameter??0,_=this.createSignatureElement(v,w);p.appendChild(_),v.documentation&&p.appendChild(this.createDocumentationElement(v.documentation));let C=(c=v.parameters)==null?void 0:c[w];C!=null&&C.documentation&&p.appendChild(this.createParameterDocElement(C.documentation));let E=pn(e.state.doc,{line:n,character:i});return E==null?null:{pos:E,end:E,create:R=>({dom:p}),above:!1}}catch(f){return console.error("Signature help error:",f),null}}async showSignatureHelpTooltip(e,n,i){let a=await this.requestSignatureHelp(e,Ii(e.state.doc,n),i);if(a){let{pos:s,create:c}=a,f=c(e),p=document.createElement("div");p.className="cm-tooltip cm-signature-tooltip",p.style.position="absolute",p.appendChild(f.dom);let h=e.coordsAtPos(s);if(h){p.style.left=`${h.left}px`,p.style.top=`${h.bottom+5}px`,document.body.appendChild(p),setTimeout(()=>{p.remove()},1e4);let v=()=>{p.remove(),e.dom.removeEventListener("keydown",v),e.dom.removeEventListener("mousedown",v)};e.dom.addEventListener("keydown",v),e.dom.addEventListener("mousedown",v)}}}createTooltipContainer(){let e=document.createElement("div");return e.classList.add("cm-signature-help"),e.style.cssText="padding: 6px; max-width: 400px;",e}createSignatureElement(e,n){let i=document.createElement("div");if(i.classList.add("cm-signature"),i.style.cssText="font-family: monospace; margin-bottom: 4px;",!e.label||typeof e.label!="string")return i.textContent="Signature information unavailable",i;let a=e.label,s=e.parameters||[];if(s.length===0||!s[n])return i.textContent=a,i;let c=s[n].label;return typeof c=="string"?this.allowHTMLContent?i.innerHTML=a.replace(c,`<strong class="cm-signature-active-param">${c}</strong>`):i.textContent=a.replace(c,`\xAB${c}\xBB`):Array.isArray(c)&&c.length===2?this.applyRangeHighlighting(i,a,c[0],c[1]):i.textContent=a,i}applyRangeHighlighting(e,n,i,a){e.textContent="";let s=n.substring(0,i),c=n.substring(i,a),f=n.substring(a);e.appendChild(document.createTextNode(s));let p=document.createElement("span");p.classList.add("cm-signature-active-param"),p.style.cssText="font-weight: bold; text-decoration: underline;",p.textContent=c,e.appendChild(p),e.appendChild(document.createTextNode(f))}createDocumentationElement(e){let n=document.createElement("div");n.classList.add("cm-signature-docs"),n.style.cssText="margin-top: 4px; color: #666;";let i=Or(e,this.markdownRenderer);return this.allowHTMLContent?n.innerHTML=i:n.textContent=i,n}createParameterDocElement(e){let n=document.createElement("div");n.classList.add("cm-parameter-docs"),n.style.cssText="margin-top: 4px; font-style: italic; border-top: 1px solid #eee; padding-top: 4px;";let i=Or(e,this.markdownRenderer);return this.allowHTMLContent?n.innerHTML=i:n.textContent=i,n}prepareRenameFallback(e,{line:n,character:i}){let a=e.state.doc.line(n+1).text,s=/\w+/g,c,f=i,p=i;for(;(c=s.exec(a))!==null;){let h=c.index,v=c.index+c[0].length;if(i>=h&&i<=v){f=h,p=v;break}}return f===i&&p===i?null:{range:{start:{line:n,character:f},end:{line:n,character:p}},placeholder:a.slice(f,p)}}async applyRenameEdit(e,n){if(!n)return Gn(e,"No edit returned from language server"),!1;let i=n.changes??{},a=n.documentChanges??[];if(Object.keys(i).length===0&&a.length===0)return Gn(e,"No changes to apply"),!1;if(a.length>0)for(let s of a){if("textDocument"in s){if(s.textDocument.uri!==this.documentUri){Gn(e,"Multi-file rename not supported yet");continue}let c=s.edits.sort((f,p)=>{let h=pn(e.state.doc,f.range.start);return(pn(e.state.doc,p.range.start)??0)-(h??0)}).map(f=>({from:pn(e.state.doc,f.range.start)??0,to:pn(e.state.doc,f.range.end)??0,insert:f.newText}));return e.dispatch(e.state.update({changes:c})),!0}return Gn(e,"File creation, deletion, or renaming operations not supported yet"),!1}else if(Object.keys(i).length>0)for(let[s,c]of Object.entries(i)){if(s!==this.documentUri){Gn(e,"Multi-file rename not supported yet");continue}let f=c.sort((p,h)=>{let v=pn(e.state.doc,p.range.start);return(pn(e.state.doc,h.range.start)??0)-(v??0)}).map(p=>({from:pn(e.state.doc,p.range.start)??0,to:pn(e.state.doc,p.range.end)??0,insert:p.newText}));e.dispatch(e.state.update({changes:f}))}return!1}};$m=function(e){var f;let n=null,i={rename:"F2",goToDefinition:"F12",signatureHelp:"Mod-Shift-Space",...e.keyboardShortcuts},a=e.client,s={diagnosticsEnabled:!0,hoverEnabled:!0,completionEnabled:!0,definitionEnabled:!0,renameEnabled:!0,codeActionsEnabled:!0,signatureHelpEnabled:!0,signatureActivateOnTyping:!1,...e},c=[ia.define(p=>(n=new nC({client:a,documentUri:e.documentUri??p.state.facet(Og),languageId:e.languageId??p.state.facet(eC),view:p,featureOptions:s,sendIncrementalChanges:e.sendIncrementalChanges,allowHTMLContent:e.allowHTMLContent,useSnippetOnCompletion:e.useSnippetOnCompletion,onGoToDefinition:e.onGoToDefinition,markdownRenderer:e.markdownRenderer}),n))];return c.push(ra.of([{key:i.signatureHelp,run:p=>{if(!(n&&s.signatureHelpEnabled))return!1;let h=p.state.selection.main.head;return n.showSignatureHelpTooltip(p,h),!0}},{key:i.rename,run:p=>{if(!(n&&s.renameEnabled))return!1;let h=p.state.selection.main.head;return n.requestRename(p,Ii(p.state.doc,h)),!0}},{key:i.goToDefinition,run:p=>{if(!(n&&s.definitionEnabled))return!1;let h=p.state.selection.main.head;return n.requestDefinition(p,Ii(p.state.doc,h)).catch(v=>Gn(p,`Go to definition failed: ${v instanceof Error?v.message:"Unknown error"}`)),!0}}])),s.hoverEnabled&&c.push(l2((p,h)=>n==null?null:n.requestHoverTooltip(p,Ii(p.state.doc,h)),e.hoverConfig)),s.signatureHelpEnabled&&c.push(Tn.updateListener.of(async p=>{var E;if(!(n&&p.docChanged)||!((E=n.client.capabilities)!=null&&E.signatureHelpProvider)||!s.signatureActivateOnTyping)return;let h=n.client.capabilities.signatureHelpProvider.triggerCharacters||["(",","],v,w=p.changes,_=!1,C=-1;w.iterChanges((R,L,H,W,U)=>{if(_)return;let A=U.toString();if(A){for(let G of h)if(A.includes(G)){_=!0,C=W,v=G;break}}}),_&&C>=0&&n.showSignatureHelpTooltip(p.view,C,v)})),s.completionEnabled&&c.push(vu({...e.completionConfig,override:[async p=>{var _,C;if(n==null)return null;let{state:h,pos:v}=p,w=rC(p,((C=(_=n.client.capabilities)==null?void 0:_.completionProvider)==null?void 0:C.triggerCharacters)??[],e.completionMatchBefore);return w==null?null:await n.requestCompletion(p,Ii(h.doc,v),w)},...((f=e.completionConfig)==null?void 0:f.override)||[]]})),c.push(Tn.domEventHandlers({click:(p,h)=>{if(s.definitionEnabled&&i.goToDefinition==="ctrlcmd"&&(p.ctrlKey||p.metaKey)){let v=h.posAtCoords({x:p.clientX,y:p.clientY});v&&n&&(n.requestDefinition(h,Ii(h.state.doc,v)).catch(w=>Gn(h,`Go to definition failed: ${w instanceof Error?w.message:"Unknown error"}`)),p.preventDefault())}}})),c};function rC(e,n,i){let{state:a,pos:s,explicit:c}=e,f=a.doc.lineAt(s),p=ji.CompletionTriggerKind.Invoked,h,v=f.text[s-f.from-1]||"",w=n==null?void 0:n.includes(v);return!c&&w&&(p=ji.CompletionTriggerKind.TriggerCharacter,h=v),p===ji.CompletionTriggerKind.Invoked&&!e.matchBefore(i||/(\w+|\w+\.|\/|,)$/)?null:{triggerKind:p,triggerCharacter:h}}function Mg(){return`file://${Pl()??"/__marimo_notebook__.py"}`}function jd(){return`file://${Du.dirname(Pl()??"/")}`}function iC(e){return ei.filter(e,n=>n!==!1&&n!==null)}function Lg(e){let n=e.map(iC);return Object.assign({},...n)}var oC=class{constructor(e){Te(this,"clients",[]);this.clients=e,this.documentUri=Mg()}onNotification(e){let n=[];for(let i of this.clients)n.push(i.onNotification(e));return()=>{for(let i of n)i();return!0}}get clientCapabilities(){return Lg(this.clients.map(e=>{if(e.clientCapabilities)return typeof e.clientCapabilities=="function"?e.clientCapabilities({}):e.clientCapabilities}).filter(e=>e!=null))}get ready(){return this.clients.some(e=>e.ready)}set ready(e){this.clients.forEach(n=>{n.ready=e})}get capabilities(){return Lg(this.clients.map(e=>e.capabilities).filter(e=>e!==null))}set capabilities(e){this.clients.forEach(n=>{n.capabilities=e})}get initializePromise(){return this.clients[0].initializePromise}set initializePromise(e){this.clients.forEach(n=>{n.initializePromise=e})}firstWithCapability(e){return this.clients.find(n=>{var i;return(i=n.capabilities)==null?void 0:i[e]})}clientsWithCapability(e){return this.clients.filter(n=>{var i;return(i=n.capabilities)==null?void 0:i[e]})}async initialize(){await Promise.all(this.clients.map(e=>e.initialize()))}async close(){await Promise.all(this.clients.map(e=>e.close()))}async textDocumentDidChange(e){return await Promise.all(this.clients.map(n=>n.textDocumentDidChange(e))),e}async completionItemResolve(e){let n=this.firstWithCapability("completionProvider");return n?n.completionItemResolve(e):e}async textDocumentCodeAction(e){let n=this.firstWithCapability("codeActionProvider");return n?n.textDocumentCodeAction(e):null}async textDocumentRename(e){let n=this.firstWithCapability("renameProvider");return n?n.textDocumentRename(e):null}async textDocumentPrepareRename(e){let n=this.firstWithCapability("renameProvider");return n?n.textDocumentPrepareRename(e):null}async textDocumentSignatureHelp(e){let n=this.firstWithCapability("signatureHelpProvider");return n?n.textDocumentSignatureHelp(e):null}async textDocumentCompletion(e){let n=this.clientsWithCapability("completionProvider");return aC(await Promise.allSettled(n.map(i=>i.textDocumentCompletion(e))))}async textDocumentDefinition(e){let n=this.firstWithCapability("definitionProvider");return n?n.textDocumentDefinition(e):null}async textDocumentDidOpen(e){return await Promise.all(this.clients.map(n=>n.textDocumentDidOpen(e))),e}async textDocumentHover(e){var n;for(let i of this.clients){if(!((n=i.capabilities)!=null&&n.hoverProvider))continue;let a=await i.textDocumentHover(e);if(a)return a}return{contents:[]}}};function aC(e){let n=[],i=!1;for(let a of e)if(a.status==="fulfilled"){let s=a.value;if(s==null)continue;Array.isArray(s)&&n.push(...s),"items"in s&&(n.push(...s.items),i||(i=s.isIncomplete))}return{items:n,isIncomplete:i}}var Gl=class{constructor(e,n={}){Te(this,"cache",new Map);this.maxSize=e,this.options=n}getOrCreate(e){En(this.options.create,"create function is required");let n=this.cache.get(e);if(n!==void 0)return n;let i=this.options.create(e);return this.cache.set(e,i),i}get(e){let n=this.cache.get(e);return n!==void 0&&(this.cache.delete(e),this.cache.set(e,n)),n}set(e,n){if(this.cache.has(e)&&this.cache.delete(e),this.cache.set(e,n),this.cache.size>this.maxSize){let i=this.cache.keys().next().value;i!==void 0&&this.cache.delete(i)}}keys(){return this.cache.keys()}values(){return this.cache.values()}entries(){return this.cache.entries()}delete(e){this.cache.delete(e)}};_w=function(e){return[...sC(e),e].join(`
122
+ `)};function sC(e){return Vm().map(n=>{let i=ri(n);return i===e?null:i}).filter(Boolean).sort((n,i)=>n.startsWith("import")&&!i.startsWith("import")?-1:!n.startsWith("import")&&i.startsWith("import")?1:0)}var lC=Be(e=>{let n=e(mt);return ei.fromEntries(n.cellIds.inOrderIds.map(i=>{let a=n.cellHandles[i];return[i,a!=null&&a.current?ri(a.current.editorView):""]}))}),cC=Be(e=>e(mt).cellIds.inOrderIds),uC=Be(e=>fC(e(cC),e(po)));const dC=Be(e=>({cellIds:e(uC),codes:e(lC)}));function fC(e,n){var h,v;let i=new Map;e.forEach(w=>i.set(w,[]));let a=new Set(e),s=new Set(e);for(let{declaredBy:w,usedBy:_}of Object.values(n))for(let C of w){a.delete(C);for(let E of _)s.delete(E),E!==C&&((h=i.get(C))==null||h.push(E))}let c=new Map;e.forEach(w=>c.set(w,0)),i.forEach(w=>{w.forEach(_=>{c.set(_,(c.get(_)||0)+1)})});let f=[];c.forEach((w,_)=>{w===0&&f.push(_)});let p=[];for(;f.length>0;){let w=f.shift();if(!w)break;p.push(w),(v=i.get(w))==null||v.forEach(_=>{c.set(_,(c.get(_)||0)-1),c.get(_)===0&&f.push(_)})}return[...p.filter(w=>!a.has(w)),...a]}function pC(e,n){let i=new Map,a=0;e.forEach(f=>{i.set(f,a),a+=n[f].split(`
123
+ `).length});function s(f){return i.has(f)||Pe.warn("[lsp] no cell line offsets for",f),i.get(f)??0}let c=e.map(f=>n[f]).join(`
124
+ `);return{cellIds:e,mergedText:c,transformRange:(f,p)=>Ag(f,s(p)),reverseRange:(f,p)=>Ag(f,-s(p)),isInRange:(f,p)=>{let h=n[p].split(`
125
+ `).length,v=i.get(p)||0,w=f.start.line-v,_=f.end.line-v;return w>=0&&_<h},getEditsForNewText:f=>{let p=f.split(`
126
+ `),h=c.split(`
127
+ `);if(p.length!==h.length)throw Error("Cannot apply rename when there are new lines");let v=[];for(let[w,_]of ei.entries(n)){if(!i.has(w))continue;let C=i.get(w)??0,E=_.split(`
128
+ `).length,R=p.slice(C,C+E);v.push({cellId:w,text:R.join(`
129
+ `)})}return v},transformPosition:(f,p)=>Jl(f,s(p)),reversePosition:(f,p)=>Jl(f,-s(p))}}function Ag(e,n){return{start:Jl(e.start,n),end:Jl(e.end,n)}}function Jl(e,n){return{line:e.line+n,character:e.character}}const Jn={PREFIX:"file:///",of(e){return`${this.PREFIX}${e}`},is(e){return e.startsWith(this.PREFIX)},parse(e){return En(this.is(e),`Invalid cell document URI: ${e}`),e.slice(this.PREFIX.length)}};function Ig(e){return"notify"in e}var mC=class{constructor(e){Te(this,"documentVersion",0);Te(this,"versionToCellNumberAndVersion",new Gl(20));Te(this,"lastSnapshot",null);this.getNotebookCode=e}snapshot(){var i;let e=this.getLens(),n=((i=this.lastSnapshot)==null?void 0:i.mergedText)!==e.mergedText;return n?(this.documentVersion++,this.lastSnapshot=e,{lens:e,didChange:n,version:this.documentVersion}):{lens:e,didChange:n,version:this.documentVersion}}getSnapshot(e){let n=this.versionToCellNumberAndVersion.get(e);if(!n)throw Error(`No snapshot for version ${e}`);return n}getLatestSnapshot(){if(!this.lastSnapshot)throw Error("No snapshots");return{lens:this.lastSnapshot,version:this.documentVersion}}getLens(){let{cellIds:e,codes:n}=this.getNotebookCode();return pC(e,n)}},hC=()=>{let e=Ju().cellHandles;return ei.mapValues(e,n=>{var i;return(i=n.current)==null?void 0:i.editorViewOrNull})},qd=(zi=class{constructor(n,i,a=hC){Te(this,"completionItemCache",new Gl(10));this.documentUri=Mg(),this.getNotebookEditors=a,this.initialSettings=i,this.client=n,this.patchProcessNotification(),this.initializePromise.then(()=>{En(Ig(this.client),"notify is not a method on the client"),this.client.notify("workspace/didChangeConfiguration",{settings:i})}),this.snapshotter=new mC(this.getNotebookCode.bind(this))}onNotification(n){return this.client.onNotification(n)}get ready(){return this.client.ready}set ready(n){this.client.ready=n}get capabilities(){return this.client.capabilities}set capabilities(n){this.client.capabilities=n}get initializePromise(){return this.client.initializePromise}set initializePromise(n){this.client.initializePromise=n}get clientCapabilities(){return this.client.clientCapabilities}async initialize(){await this.client.initialize()}close(){this.client.close()}async resyncAllDocuments(){En(Ig(this.client),"notify is not a method on the client"),await this.client.initialize(),this.client.notify("workspace/didChangeConfiguration",{settings:this.initialSettings});let{lens:n,version:i}=this.snapshotter.snapshot();await this.client.textDocumentDidOpen({textDocument:{languageId:"python",text:n.mergedText,uri:this.documentUri,version:i}}),Pe.log("[lsp] Document re-synchronization complete")}getNotebookCode(){return ct.get(dC)}assertCellDocumentUri(n){En(Jn.is(n),"Execpted URI to be CellDocumentUri")}async textDocumentDidOpen(n){Pe.debug("[lsp] textDocumentDidOpen",n);let i=n.textDocument.uri;this.assertCellDocumentUri(i);let{lens:a,version:s}=this.snapshotter.snapshot();zi.SEEN_CELL_DOCUMENT_URIS.add(i);let c=await this.client.textDocumentDidOpen({textDocument:{languageId:n.textDocument.languageId,text:a.mergedText,uri:this.documentUri,version:s}});return c?{...c,textDocument:{...c.textDocument,text:a.mergedText}}:n}async sync(){let{lens:n,version:i,didChange:a}=this.snapshotter.snapshot();return a?this.client.textDocumentDidChange({textDocument:{uri:this.documentUri,version:i},contentChanges:[{text:n.mergedText}]}):{textDocument:{uri:this.documentUri,version:i},contentChanges:[{text:n.mergedText}]}}async textDocumentDidChange(n){return Pe.debug("[lsp] textDocumentDidChange",n),n.contentChanges.length===1?this.sync():(Pe.warn("[lsp] Unhandled textDocumentDidChange",n),this.client.textDocumentDidChange(n))}async textDocumentDefinition(n){let i=n.textDocument.uri;if(!Jn.is(i))return Pe.warn("Invalid cell document URI",i),null;await this.sync();let{lens:a}=this.snapshotter.getLatestSnapshot(),s=Jn.parse(i);return this.client.textDocumentDefinition({...n,textDocument:{uri:this.documentUri},position:a.transformPosition(n.position,s)})}async textDocumentSignatureHelp(n){let i=n.textDocument.uri;if(!Jn.is(i))return Pe.warn("Invalid cell document URI",i),null;await this.sync();let{lens:a}=this.snapshotter.getLatestSnapshot(),s=Jn.parse(i);return await this.client.textDocumentSignatureHelp({...n,textDocument:{uri:this.documentUri},position:a.transformPosition(n.position,s)})||null}textDocumentCodeAction(n){return Promise.resolve(null)}async textDocumentRename(n){var C;let i=n.textDocument.uri;if(!Jn.is(i))return Pe.warn("Invalid cell document URI",i),null;let a=Jn.parse(i);await this.sync();let{lens:s}=this.snapshotter.getLatestSnapshot(),c=s.transformPosition(n.position,a),f=await this.client.textDocumentRename({...n,textDocument:{uri:this.documentUri},position:c});if(!f)return null;let p=(C=f.documentChanges)==null?void 0:C.flatMap(E=>"edits"in E?E.edits:[]);if(!p||p.length!==1)return Pe.warn("Expected exactly one edit",p),f;let h=p[0];if(!("newText"in h))return Pe.warn("Expected newText in edit",h),f;let v=s.getEditsForNewText(h.newText),w=new Map(v.map(E=>[E.cellId,E.text])),_=this.getNotebookEditors();for(let[E,R]of ei.entries(_)){let L=w.get(E);if(L==null){Pe.warn("No new code for cell",E);continue}if(!R){Pe.warn("No view for plugin",E);continue}R.state.doc.toString()!==L&&R.dispatch({changes:{from:0,to:R.state.doc.length,insert:L}})}return{...f,documentChanges:[{edits:[],textDocument:{uri:i,version:0}}]}}async completionItemResolve(n){let i=JSON.stringify(n),a=this.completionItemCache.get(i);if(a)return a;let s=this.client.completionItemResolve(n);return this.completionItemCache.set(i,s),s}async textDocumentPrepareRename(n){let i=n.textDocument.uri;if(!Jn.is(i))return Pe.warn("Invalid cell document URI",i),null;await this.sync();let{lens:a}=this.snapshotter.getLatestSnapshot(),s=Jn.parse(i);return this.client.textDocumentPrepareRename({...n,textDocument:{uri:this.documentUri},position:a.transformPosition(n.position,s)})}async textDocumentHover(n){Pe.debug("[lsp] textDocumentHover",n),await this.sync();let{lens:i}=this.snapshotter.getLatestSnapshot(),a=Jn.parse(n.textDocument.uri),s=await this.client.textDocumentHover({...n,textDocument:{uri:this.documentUri},position:i.transformPosition(n.position,a)});return s?(typeof s.contents=="object"&&"kind"in s.contents&&(s.contents={kind:"markdown",value:s.contents.value}),s.contents===""?null:(s.range&&(s.range=i.reverseRange(s.range,a)),s)):(Pe.debug("[lsp] no hover result"),s)}async textDocumentCompletion(n){let{lens:i}=this.snapshotter.getLatestSnapshot(),a=Jn.parse(n.textDocument.uri);return this.client.textDocumentCompletion({...n,textDocument:{uri:this.documentUri},position:i.transformPosition(n.position,a)})}patchProcessNotification(){En("processNotification"in this.client,"processNotification is not a method on the client");let n=this.client.processNotification.bind(this.client),i=a=>{if(a.method==="textDocument/publishDiagnostics"){Pe.debug("[lsp] handling diagnostics",a);let s=this.snapshotter.getLatestSnapshot(),c=a.params.diagnostics,{lens:f,version:p}=s,h=new Map;for(let w of c)for(let _ of f.cellIds)if(f.isInRange(w.range,_)){h.has(_)||h.set(_,[]);let C={...w,range:f.reverseRange(w.range,_)};h.get(_).push(C);break}let v=new Set(zi.SEEN_CELL_DOCUMENT_URIS);for(let[w,_]of h.entries()){Pe.debug("[lsp] diagnostics for cell",w,_);let C=Jn.of(w);v.delete(C),n({...a,params:{...a.params,uri:C,version:p,diagnostics:_}})}if(v.size>0){Pe.debug("[lsp] clearing diagnostics",v);for(let w of v)n({method:"textDocument/publishDiagnostics",params:{uri:w,diagnostics:[]}})}return}return n(a)};this.client.processNotification=i}},Te(zi,"SEEN_CELL_DOCUMENT_URIS",new Set),zi),gC=Kt(Ml(),1),yC=Kt(ho(),1),vC=class extends yC.Transport{constructor(n){super();Te(this,"isClosed",!1);Te(this,"hasConnectedBefore",!1);this.options=n,this.delegate=void 0}createDelegate(){if(this.delegate)try{this.delegate.close()}catch(n){Pe.warn("Error closing old WebSocket delegate",n)}return this.delegate=new gC.WebSocketTransport(this.options.getWsUrl()),this.delegate}isDelegateClosedOrClosing(){if(!this.delegate)return!0;let n=this.delegate.connection;return n?n.readyState===WebSocket.CLOSING||n.readyState===WebSocket.CLOSED:!0}async connect(){if(this.isClosed)throw Error("Transport is closed");return this.connectionPromise||(this.connectionPromise=(async()=>{try{this.options.waitForConnection&&await this.options.waitForConnection();let n=this.delegate;(!n||this.isDelegateClosedOrClosing())&&(n=this.createDelegate()),await n.connect(),Pe.log("WebSocket transport connected successfully");let i=this.hasConnectedBefore;this.hasConnectedBefore=!0,i&&this.options.onReconnect&&(Pe.log("Calling onReconnect callback to re-synchronize state"),await this.options.onReconnect())}catch(n){throw Pe.error("WebSocket transport connection failed",n),this.delegate=void 0,n}finally{this.connectionPromise=void 0}})()),this.connectionPromise}close(){var n;this.isClosed=!0,(n=this.delegate)==null||n.close(),this.delegate=void 0,this.connectionPromise=void 0}async sendData(n,i){var a;if(this.isDelegateClosedOrClosing()){Pe.warn("WebSocket is closed or closing, attempting to reconnect");try{await this.connect()}catch(s){throw Pe.error("Failed to reconnect WebSocket",s),s}}return(a=this.delegate)==null?void 0:a.sendData(n,i)}};function zd(e,n){let i=OT();return new vC({getWsUrl:()=>i.getLSPURL(e).toString(),waitForConnection:async()=>{await mR()},onReconnect:n})}Km=function(e){return e===ni.CONNECTING},zu=function(e){return e===ni.OPEN},Kw=function(e){return e===ni.CLOSED||e===ni.CLOSING||e===ni.CONNECTING},Ow=function(e){switch(e){case ni.CLOSED:return"App disconnected";case ni.CONNECTING:return"Connecting to a runtime ...";case ni.CLOSING:return"App disconnecting...";case ni.OPEN:return"";default:return""}};var jg=na.define(),qg=new pu,Fd="marimo-connecting-indicator";function bC(){let e=document.getElementById(Fd);return e||(e=document.createElement("div"),e.id=Fd,e.textContent="Connecting\u2026",e.style.position="fixed",e.style.zIndex="9999",e.style.background="#222",e.style.color="#fff",e.style.padding="2px 8px",e.style.borderRadius="6px",e.style.fontSize="0.9em",e.style.boxShadow="0 2px 8px rgba(0,0,0,0.15)",e.style.pointerEvents="none",e.style.display="none",document.body.append(e)),e}function zg(e,n){let i=bC();i.style.left=`${e}px`,i.style.top=`${n}px`,i.style.display="block",i.textContent="Connecting\u2026"}function Bd(){let e=document.getElementById(Fd);e&&(e.style.display="none")}var Hd=null;$w=function(e){let n=()=>e.get(Rl).state,i=!zu(n()),a=ia.define(s=>{let c=!1,f=s.dom;function p(){let C=s.state.selection.main,E=s.coordsAtPos(C.head);E?zg(E.left+2,E.bottom+2):zg(window.innerWidth/2,window.innerHeight*.1),Hd&&window.clearTimeout(Hd),Hd=window.setTimeout(Bd,1500)}function h(){p()}function v(){c||(c=(f.addEventListener("keydown",h,{capture:!0}),f.addEventListener("paste",h,{capture:!0}),!0))}function w(){c&&(c=(f.removeEventListener("keydown",h,{capture:!0}),f.removeEventListener("paste",h,{capture:!0}),!1))}let _=e.sub(Rl,()=>{e.get(Rl).state===ni.CONNECTING?v():(w(),Bd())});return Km(n())&&v(),{destroy(){w(),_(),Bd()}}});return[qg.of(gu.readOnly.of(i)),gu.transactionExtender.of(s=>{for(let c of s.effects)if(c.is(jg)){let f=c.value;if(f!==i)return i=f,{effects:qg.reconfigure(gu.readOnly.of(f))}}return null}),ia.define(s=>{let c=e.sub(Rl,()=>{let f=!zu(e.get(Rl).state);s.dispatch({effects:jg.of(f)})});return{destroy(){c()}}}),a]};function wC(e){return e.facet(gu.readOnly)}function _C(e){return[s2(e),ra.of([{key:"ArrowRight",preventDefault:!0,run:n=>Fg(n,e)},{key:"Tab",preventDefault:!0,run:n=>Fg(n,e)}])]}function Fg(e,n){if(wC(e.state))return!1;let i=e.state.doc.length;return i===0?(e.dispatch({changes:{from:0,to:i,insert:n},selection:{head:n.length,anchor:n.length}}),!0):!1}function xC(e){let{beforeText:n,linkText:i,afterText:a,onClick:s}=e;return[s2(c=>{let f=document.createElement("span");f.append(document.createTextNode(n));let p=document.createElement("span");return p.textContent=i,p.classList.add("cm-clickable-placeholder"),p.onclick=h=>{h.stopPropagation(),s(c)},f.append(p),f.append(document.createTextNode(a)),f}),Tn.theme({".cm-placeholder":{color:"var(--slate-8)"},".cm-clickable-placeholder":{cursor:"pointer !important",pointerEvents:"auto",color:"var(--slate-9)",textDecoration:"underline",textUnderlineOffset:"0.2em"},".cm-clickable-placeholder:hover":{color:"var(--sky-11)"}})]}var kC=ti(e=>{let n,i={transport:zd("pylsp",async()=>{await(n==null?void 0:n())}),rootUri:jd(),workspaceFolders:[]},a=e==null?void 0:e.pylsp,s=["D100","D103"],c=["W292","E402"],f=["B018","I001"],p={pylsp:{plugins:{marimo_plugin:{enabled:!0},jedi:{auto_import_modules:["numpy"]},jedi_completion:{include_params:!0,resolve_at_most:50},flake8:{enabled:a==null?void 0:a.enable_flake8,extendIgnore:c},pydocstyle:{enabled:a==null?void 0:a.enable_pydocstyle,ignore:s},pylint:{enabled:a==null?void 0:a.enable_pylint},pyflakes:{enabled:a==null?void 0:a.enable_pyflakes},pylsp_mypy:{enabled:a==null?void 0:a.enable_mypy,live_mode:!0},ruff:{enabled:a==null?void 0:a.enable_ruff,extendIgnore:[...c,...s,...f]},signature:{formatter:a!=null&&a.enable_ruff?"ruff":"black",line_length:88}}}},h=new qd(new Il({...i}),p);return n=()=>h.resyncAllDocuments(),h}),CC=ti(e=>{let n,i=new qd(new Il({transport:zd("ty",async()=>{await(n==null?void 0:n())}),rootUri:jd(),workspaceFolders:[],getWorkspaceConfiguration:a=>[{disableLanguageServices:!0}]}),{});return n=()=>i.resyncAllDocuments(),i}),SC=ti(e=>{let n,i=new qd(new Il({transport:zd("basedpyright",async()=>{await(n==null?void 0:n())}),rootUri:jd(),workspaceFolders:[]}),{});return n=()=>i.resyncAllDocuments(),i}),EC=class{constructor(){Te(this,"parser",new ux);Te(this,"type","python");Te(this,"defaultCode",this.parser.defaultCode);Te(this,"defaultMetadata",this.parser.defaultMetadata)}transformIn(e){let n=this.parser.transformIn(e);return[n.code,n.offset,n.metadata]}transformOut(e,n){let i=this.parser.transformOut(e,n);return[i.code,i.offset]}isSupported(e){return this.parser.isSupported(e)}getExtension(e,n,i,a,s){return[(()=>{var h,v,w,_;let c={defaultKeymap:!1,activateOnTyping:n.activate_on_typing,closeOnBlur:!1},f={hideOnChange:!0},p=[];if((h=s==null?void 0:s.pylsp)!=null&&h.enabled&&Bl("pylsp")&&p.push(kC(s)),(v=s==null?void 0:s.ty)!=null&&v.enabled&&Bl("ty")&&p.push(CC(s)),(w=s==null?void 0:s.basedpyright)!=null&&w.enabled&&Bl("basedpyright")&&p.push(SC(s)),p.length>0){let C=p.length===1?p[0]:new oC(p);return[$m({client:C,languageId:"python",allowHTMLContent:!0,useSnippetOnCompletion:!1,hoverConfig:f,completionConfig:c,diagnosticsEnabled:((_=s.diagnostics)==null?void 0:_.enabled)??!1,sendIncrementalChanges:!1,signatureHelpEnabled:!0,signatureActivateOnTyping:!1,keyboardShortcuts:{signatureHelp:i.getHotkey("cell.signatureHelp").key,goToDefinition:i.getHotkey("cell.goToDefinition").key,rename:i.getHotkey("cell.renameSymbol").key},completionMatchBefore:/(\w+|\w+\.|\(|\/|,)$/,onGoToDefinition:E=>{Pe.debug("onGoToDefinition",E),C.documentUri!==E.uri&&Ri().openFile({path:E.uri.replace("file://","")})}}),Og.of(Jn.of(e))]}return vu({...c,override:[k0]})})(),Um(),TC(a)]}};function TC(e){return e==="marimo-import"?yu.highest(_C("import marimo as mo")):e==="ai"?xC({beforeText:"Start coding or ",linkText:"generate",afterText:" with AI.",onClick:n=>{n.state.facet(Dt).aiCellCompletion()}}):[]}var Vd=rm.configure({props:[MT.add({ParenthesizedExpression:e2,ArgList:e2})]});Um=function(){return new a2(Vd,[Vd.data.of({autocomplete:uR}),Vd.data.of({autocomplete:dR})])};function RC(e){return Array.isArray(e)}function DC(e){var s,c,f,p,h,v,w;let n=e.path.join("."),i=((s=e.completion)==null?void 0:s.label)||e.value||e.path[e.path.length-1]||"unknown",a=`<div class="sql-hover-${e.semanticType}">`;switch(a+=`<div class="sql-hover-header"><strong>${i}</strong> <span class="sql-hover-type">${e.semanticType}</span></div>`,e.semanticType){case"database":if(a+=`<div class="sql-hover-description">Database${(c=e.completion)!=null&&c.detail?`: ${e.completion.detail}`:""}</div>`,e.namespace){let _=Xl(e.namespace);_>0&&(a+=`<div class="sql-hover-children">Contains ${_} schema${_===1?"":"s"}</div>`)}break;case"schema":if(a+=`<div class="sql-hover-description">Schema${(f=e.completion)!=null&&f.detail?`: ${e.completion.detail}`:""}</div>`,n&&(a+=`<div class="sql-hover-path"><strong>Path:</strong> <code>${n}</code></div>`),e.namespace){let _=Xl(e.namespace);_>0&&(a+=`<div class="sql-hover-children">Contains ${_} table${_===1?"":"s"}</div>`)}break;case"table":if(a+=`<div class="sql-hover-description">Table${(p=e.completion)!=null&&p.detail?`: ${e.completion.detail}`:""}</div>`,n){let _=e.path;_.length>1&&(a+=`<div class="sql-hover-path"><strong>Schema:</strong> <code>${_.slice(0,-1).join(".")}</code></div>`)}if(e.namespace&&RC(e.namespace)){let _=e.namespace;if(_.length>0){a+=`<div class="sql-hover-columns"><strong>Columns (${_.length}):</strong><br>`;let C=_.slice(0,8).map(E=>typeof E=="string"?E:E.label);a+=C.map(E=>`<code>${E}</code>`).join(", "),_.length>8&&(a+=`, <em>and ${_.length-8} more...</em>`),a+="</div>"}}break;case"column":if(a+=`<div class="sql-hover-description">Column${(h=e.completion)!=null&&h.detail?`: ${e.completion.detail}`:""}</div>`,n){let _=e.path;_.length>1&&(a+=`<div class="sql-hover-path"><strong>Table:</strong> <code>${_.slice(0,-1).join(".")}</code></div>`)}break;default:if(a+=`<div class="sql-hover-description">Namespace${(v=e.completion)!=null&&v.detail?`: ${e.completion.detail}`:""}</div>`,n&&(a+=`<div class="sql-hover-path"><strong>Path:</strong> <code>${n}</code></div>`),e.namespace){let _=Xl(e.namespace);_>0&&(a+=`<div class="sql-hover-children">Contains ${_} item${_===1?"":"s"}</div>`)}break}return(w=e.completion)!=null&&w.info&&typeof e.completion.info=="string"&&(a+=`<div class="sql-hover-info">${e.completion.info}</div>`),a+="</div>",a}function Xl(e){return Array.isArray(e)?e.length:typeof e=="object"&&e?"self"in e&&"children"in e?1+Xl(e.children):Object.keys(e).length:0}function OC(e){let{keyword:n,info:i}=e,a='<div class="sql-hover-keyword">';if(a+=`<div class="sql-hover-header"><strong>${n.toUpperCase()}</strong> <span class="sql-hover-type">keyword</span></div>`,a+=`<div class="sql-hover-description">${i.description}</div>`,i.syntax&&(a+=`<div class="sql-hover-syntax"><strong>Syntax:</strong> <code>${i.syntax}</code></div>`),i.example&&(a+=`<div class="sql-hover-example"><strong>Example:</strong><br><code>${i.example}</code></div>`),i.metadata&&typeof i.metadata=="object"&&Object.keys(i.metadata).length>0){a+='<div class="sql-hover-metadata">';for(let[s,c]of Object.entries(i.metadata))a+=`<span class="sql-hover-tag" title="${s}">${c}</span> `;a+="</div>"}return a+="</div>",a}function PC(e){let{tableName:n,columns:i,metadata:a}=e,s='<div class="sql-hover-table">';if(s+=`<div class="sql-hover-header"><strong>${n}</strong> <span class="sql-hover-type">table</span></div>`,s+=`<div class="sql-hover-description">Table with ${i.length} column${i.length===1?"":"s"}</div>`,i.length>0){s+='<div class="sql-hover-columns"><strong>Columns:</strong><br>';let c=i.slice(0,10);s+=c.map(f=>`<code>${f}</code>`).join(", "),i.length>10&&(s+=`, <em>and ${i.length-10} more...</em>`),s+="</div>"}if(a&&typeof a=="object"&&Object.keys(a).length>0){s+='<div class="sql-hover-metadata">';for(let[c,f]of Object.entries(a))s+=`<span class="sql-hover-tag" title="${c}">${f}</span> `;s+="</div>"}return s+="</div>",s}function NC(e){let{tableName:n,columnName:i,schema:a,metadata:s}=e,c='<div class="sql-hover-column">';c+=`<div class="sql-hover-header"><strong>${i}</strong> <span class="sql-hover-type">column</span></div>`,c+=`<div class="sql-hover-description">Column in table <code>${n}</code></div>`;let f=a[n];if(f&&f.length>1){let p=f.filter(h=>h!==i);if(p.length>0){c+=`<div class="sql-hover-related"><strong>Other columns in ${n}:</strong><br>`;let h=p.slice(0,8);c+=h.map(v=>`<code>${v}</code>`).join(", "),p.length>8&&(c+=`, <em>and ${p.length-8} more...</em>`),c+="</div>"}}if(s&&typeof s=="object"&&Object.keys(s).length>0){c+='<div class="sql-hover-metadata">';for(let[p,h]of Object.entries(s))c+=`<span class="sql-hover-tag" title="${p}">${h}</span> `;c+="</div>"}return c+="</div>",c}const MC={keyword:OC,table:PC,column:NC,namespace:DC};var LC={...am,caseInsensitiveIdentifiers:!0,identifierQuotes:"`"};const Bg=sm.define(LC),Hg=sm.define({charSetCasts:!0,doubleQuotedStrings:!1,unquotedBitLiterals:!0,hashComments:!1,spaceAfterDashes:!1,specialVar:"@?",identifierQuotes:'"',caseInsensitiveIdentifiers:!0,keywords:"percentile_cont row_number rank dense_rank rank_dense percent_rank cume_dist ntile lag lead first_value last_value nth_value !__postfix !~~ !~~* % & && * ** + - ->> / // <-> << <=> <@ >> @ @> Calendar JSON TimeZone ^ ^@ abort abs absolute access access_mode acos acosh action add add_parquet_key admin after age aggregate alias all all_profiling_output allow_community_extensions allow_extensions_metadata_mismatch allow_persistent_secrets allow_unredacted_secrets allow_unsigned_extensions allowed_directories allowed_paths also alter always analyse analyze and anti any any_value apply approx_count_distinct approx_quantile approx_top_k arbitrary arg_max arg_max_null arg_min arg_min_null argmax argmin array array_agg array_aggr array_aggregate array_append array_apply array_cat array_concat array_contains array_cosine_distance array_cosine_similarity array_cross_product array_distance array_distinct array_dot_product array_extract array_filter array_grade_up array_has array_has_all array_has_any array_indexof array_inner_product array_intersect array_length array_negative_dot_product array_negative_inner_product array_pop_back array_pop_front array_position array_prepend array_push_back array_push_front array_reduce array_resize array_reverse array_reverse_sort array_select array_slice array_sort array_to_json array_to_string array_to_string_comma_default array_transform array_unique array_value array_where array_zip arrow_large_buffer_size arrow_lossless_conversion arrow_output_list_view arrow_output_version arrow_scan arrow_scan_dumb as asc ascii asin asinh asof asof_loop_join_threshold assertion assignment asymmetric at atan atan2 atanh attach attribute authorization autoinstall_extension_repository autoinstall_known_extensions autoload_known_extensions avg backward bar base64 before begin between bigint bin binary binary_as_string bit bit_and bit_count bit_length bit_or bit_position bit_xor bitstring bitstring_agg blob bool bool_and bool_or boolean both bpchar by bytea cache call called can_cast_implicitly cardinality cascade cascaded case cast cast_to_type catalog catalog_error_max_schemas cbrt ceil ceiling centuries century chain char char_length character character_length characteristics check checkpoint checkpoint_threshold chr class close cluster coalesce col_description collate collation collations column columns combine comment comments commit committed compression concat concat_ws concurrently configuration conflict connection constant_or_null constraint constraints contains content continue conversion copy copy_database corr cos cosh cost cot count count_if count_star countif covar_pop covar_samp create create_sort_key cross csv cube current current_catalog current_connection_id current_database current_date current_localtime current_localtimestamp current_query current_query_id current_role current_schema current_schemas current_setting current_transaction_id current_user currval cursor custom_extension_repository custom_profiling_settings custom_user_agent cycle damerau_levenshtein data database database_list database_size date date_add date_diff date_part date_sub date_trunc datediff datepart datesub datetime datetrunc day dayname dayofmonth dayofweek dayofyear days deallocate debug_asof_iejoin debug_checkpoint_abort debug_force_external debug_force_no_cross_product debug_skip_checkpoint_on_commit debug_verify_vector debug_window_mode dec decade decades decimal declare decode default default_block_size default_collation default_null_order default_order default_secret_storage defaults deferrable deferred definer degrees delete delimiter delimiters depends desc describe detach dictionary disable disable_checkpoint_on_shutdown disable_logging disable_object_cache disable_optimizer disable_parquet_prefetching disable_print_progress_bar disable_profile disable_profiling disable_progress_bar disable_timestamptz_casts disable_verification disable_verify_external disable_verify_fetch_row disable_verify_parallelism disable_verify_serializer disabled_compression_methods disabled_filesystems disabled_log_types disabled_optimizers discard distinct divide do document domain double drop duckdb_api duckdb_columns duckdb_constraints duckdb_databases duckdb_dependencies duckdb_extensions duckdb_external_file_cache duckdb_functions duckdb_indexes duckdb_keywords duckdb_log_contexts duckdb_logs duckdb_logs_parsed duckdb_memory duckdb_optimizers duckdb_prepared_statements duckdb_schemas duckdb_secret_types duckdb_secrets duckdb_sequences duckdb_settings duckdb_table_sample duckdb_tables duckdb_temporary_files duckdb_types duckdb_variables duckdb_views dynamic_or_filter_threshold each editdist3 element_at else enable enable_checkpoint_on_shutdown enable_external_access enable_external_file_cache enable_fsst_vectors enable_geoparquet_conversion enable_http_logging enable_http_metadata_cache enable_logging enable_macro_dependencies enable_object_cache enable_optimizer enable_print_progress_bar enable_profile enable_profiling enable_progress_bar enable_progress_bar_print enable_verification enable_view_dependencies enabled_log_types encode encoding encrypted end ends_with entropy enum enum_code enum_first enum_last enum_range enum_range_boundary epoch epoch_ms epoch_ns epoch_us equi_width_bins era error errors_as_json escape even event except exclude excluding exclusive execute exists exp explain explain_output export export_state extension extension_directory extension_versions extensions external external_threads extract factorial false family favg fdiv fetch file_search_path filter finalize first flatten float float4 float8 floor fmod following for force force_bitpacking_mode force_checkpoint force_compression foreign format formatReadableDecimalSize formatReadableSize format_bytes format_pg_type format_type forward freeze from from_base64 from_binary from_hex from_json from_json_strict fsum full function functions gamma gcd gen_random_uuid generate_series generate_subscripts generated geomean geometric_mean get_bit get_block_size get_current_time get_current_timestamp getvariable glob global grade_up grant granted greatest greatest_common_divisor group group_concat grouping grouping_id groups guid hamming handler having header hex histogram histogram_exact histogram_values hold home_directory hour hours http_logging_output http_proxy http_proxy_password http_proxy_username hugeint identity ieee_floating_point_ops if ignore ilike ilike_escape immediate immediate_transaction_mode immutable implicit import import_database in in_search_path include including increment index index_scan_max_count index_scan_percentage indexes inet_client_addr inet_client_port inet_server_addr inet_server_port inherit inherits initially inline inner inout input insensitive insert install instead instr int int1 int128 int16 int2 int32 int4 int64 int8 integer integer_division integral intersect interval into invoker is is_histogram_other_bin isfinite isinf isnan isnull isodow isolation isoyear jaccard jaro_similarity jaro_winkler_similarity join json json_array json_array_length json_contains json_deserialize_sql json_each json_execute_serialized_sql json_exists json_extract json_extract_path json_extract_path_text json_extract_string json_group_array json_group_object json_group_structure json_keys json_merge_patch json_object json_pretty json_quote json_serialize_plan json_serialize_sql json_structure json_transform json_transform_strict json_tree json_type json_valid json_value julian kahan_sum key kurtosis kurtosis_pop label lambda lambda_syntax language large last last_day late_materialization_max_rows lateral lcase lcm leading leakproof least least_common_multiple left left_grapheme len length length_grapheme level levenshtein lgamma like like_escape limit list list_aggr list_aggregate list_any_value list_append list_apply list_approx_count_distinct list_avg list_bit_and list_bit_or list_bit_xor list_bool_and list_bool_or list_cat list_concat list_contains list_cosine_distance list_cosine_similarity list_count list_distance list_distinct list_dot_product list_element list_entropy list_extract list_filter list_first list_grade_up list_has list_has_all list_has_any list_histogram list_indexof list_inner_product list_intersect list_kurtosis list_kurtosis_pop list_last list_mad list_max list_median list_min list_mode list_negative_dot_product list_negative_inner_product list_pack list_position list_prepend list_product list_reduce list_resize list_reverse list_reverse_sort list_select list_sem list_skewness list_slice list_sort list_stddev_pop list_stddev_samp list_string_agg list_sum list_transform list_unique list_value list_var_pop list_var_samp list_where list_zip listagg listen ln load local location lock lock_configuration locked log log10 log2 log_query_path logged logging_level logging_mode logging_storage logical long lower lpad ltrim macro mad make_date make_time make_timestamp make_timestamp_ns make_timestamptz map map_concat map_contains map_contains_entry map_contains_value map_entries map_extract map_extract_value map_from_entries map_keys map_to_pg_oid map_values mapping match materialized max max_by max_expression_depth max_memory max_temp_directory_size max_vacuum_tasks maxvalue md5 md5_number md5_number_lower md5_number_upper mean median memory_limit merge_join_threshold metadata_info method microsecond microseconds millennia millennium millisecond milliseconds min min_by minute minutes minvalue mismatches mod mode month monthname months move multiply name names nanosecond national natural nchar nested_loop_join_threshold new next nextafter nextval nfc_normalize no none normalized_interval not not_ilike_escape not_like_escape nothing notify notnull now nowait null null_order nullif nulls numeric nvarchar obj_description object octet_length of off offset oid oids old old_implicit_casting on only operator option options or ord order order_by_non_integer_literal ordered_aggregate_threshold ordinality others out outer over overlaps overlay overriding owned owner pandas_analyze_sample pandas_scan parallel parquet_bloom_probe parquet_file_metadata parquet_kv_metadata parquet_metadata parquet_metadata_cache parquet_scan parquet_schema parse_dirname parse_dirpath parse_duckdb_log_message parse_filename parse_path parser partial partition partitioned partitioned_write_flush_threshold partitioned_write_max_open_files passing password percent perfect_ht_threshold persistent pi pivot pivot_filter_threshold pivot_limit pivot_longer pivot_wider placing plans platform policy position positional pow power pragma pragma_collations pragma_database_size pragma_metadata_info pragma_platform pragma_show pragma_storage_info pragma_table_info pragma_user_agent pragma_version preceding precision prefer_range_joins prefetch_all_parquet_files prefix prepare prepared preserve preserve_identifier_case preserve_insertion_order primary printf prior privileges procedural procedure produce_arrow_string_view product profile_output profiling_mode profiling_output program progress_bar_time publication python_enable_replacements python_map_function python_scan_all_frames qualify quantile quantile_cont quantile_disc quarter quarters query query_table quote radians random range read read_blob read_csv read_csv_auto read_json read_json_auto read_json_objects read_json_objects_auto read_ndjson read_ndjson_auto read_ndjson_objects read_parquet read_text real reassign recheck recursive reduce ref references referencing refresh regexp_escape regexp_extract regexp_extract_all regexp_full_match regexp_matches regexp_replace regexp_split_to_array regexp_split_to_table regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release remap_struct rename repeat repeat_row repeatable replace replica reservoir_quantile reset respect restart restrict returning returns reverse revoke right right_grapheme role rollback rollup round round_even roundbankers row row_to_json rows rpad rtrim rule sample savepoint scalar_subquery_error_on_multiple_rows scheduler_process_partial schema schemas scope scroll search search_path second seconds secret secret_directory security select sem semi seq_scan sequence sequences serializable server session session_user set set_bit setof sets setseed sha1 sha256 share shobj_description short show show_databases show_tables show_tables_expanded sign signbit signed similar simple sin sinh skewness skip smallint snapshot sniff_csv some sorted split split_part sql sqrt stable standalone start starts_with statement statistics stats stddev stddev_pop stddev_samp stdin stdout storage storage_compatibility_version storage_info stored str_split str_split_regex streaming_buffer_size strftime strict string string_agg string_split string_split_regex string_to_array strip strip_accents strlen strpos strptime struct struct_concat struct_extract struct_extract_at struct_insert struct_pack subscription substr substring substring_grapheme subtract suffix sum sum_no_overflow sumkahan summarize summary symmetric sysid system table table_info tables tablesample tablespace tan tanh temp temp_directory template temporary test_all_types test_vector_types text then threads ties time time_bucket timestamp timestamp_ms timestamp_ns timestamp_s timestamp_us timestamptz timetz timetz_byte_comparable timezone timezone_hour timezone_minute tinyint to to_base to_base64 to_binary to_centuries to_days to_decades to_hex to_hours to_json to_microseconds to_millennia to_milliseconds to_minutes to_months to_quarters to_seconds to_timestamp to_weeks to_years today trailing transaction transaction_timestamp transform translate treat trigger trim true trunc truncate truncate_duckdb_logs trusted try_cast try_strptime txid_current type typeof types ubigint ucase uhugeint uint128 uint16 uint32 uint64 uint8 uinteger unbin unbounded uncommitted unencrypted unhex unicode union union_extract union_tag union_value unique unknown unlisten unlogged unnest unpack unpivot unpivot_list until update upper url_decode url_encode use user user_agent username using usmallint utinyint uuid uuid_extract_timestamp uuid_extract_version uuidv4 uuidv7 vacuum valid validate validator value values var_pop var_samp varbinary varchar variable variadic variance varint varying vector_type verbose verify_external verify_fetch_row verify_parallelism verify_serializer version view views virtual volatile wal_autocheckpoint wavg week weekday weekofyear weeks weighted_avg when where which_secret whitespace window with within without work worker_threads wrapper write write_log xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlnamespaces xmlparse xmlpi xmlroot xmlserialize xmltable xor year years yearweek yes zone zstd_min_string_length | || ~ ~~ ~~* ~~~",types:"JSON bigint binary bit bitstring blob bool boolean bpchar bytea char date datetime dec decimal double enum float float4 float8 guid hugeint int int1 int128 int16 int2 int32 int4 int64 int8 integer integral interval list logical long map null numeric nvarchar oid real row short signed smallint string struct text time timestamp timestamp_ms timestamp_ns timestamp_s timestamp_us timestamptz timetz tinyint ubigint uhugeint uint128 uint16 uint32 uint64 uint8 uinteger union usmallint utinyint uuid varbinary varchar varint"});var AC=new Set(["postgresql","postgres","db2","mysql","sqlite","mssql","sqlserver","duckdb","mariadb","cassandra","noql","athena","bigquery","hive","redshift","snowflake","flink","mongodb","oracle","oracledb","timescaledb"]);function $d(e){return AC.has(e)}function Vg(e){let n=e.dialect;if(!$d(n))return ps;switch(n){case"postgresql":case"postgres":return am;case"mysql":return vR;case"sqlite":return gR;case"mssql":case"sqlserver":return wR;case"duckdb":return Hg;case"mariadb":return _R;case"cassandra":return xR;case"oracledb":case"oracle":return hR;case"bigquery":return Bg;case"timescaledb":return am;case"athena":case"db2":case"hive":case"redshift":case"snowflake":case"flink":case"mongodb":case"noql":return Pe.debug("Unsupported dialect",{dialect:n}),ps;default:return Dl(n),ps}}var IC={...bR,caseInsensitiveIdentifiers:!0,identifierQuotes:"'"};let ps;ps=sm.define(IC),Oi="__marimo_duckdb",cs=new Set([Oi]),_2="memory",Nl=function(e){return e===""};var ms={formatTableName:e=>e,formatSelectClause:(e,n)=>`SELECT ${e} FROM ${n} LIMIT 100`};function jC(e){if(e=e.toLowerCase(),!$d(e))return ms;switch(e){case"bigquery":{let n=Bg.spec.identifierQuotes;return{formatTableName:i=>`${n}${i}${n}`,formatSelectClause:ms.formatSelectClause}}case"mssql":case"sqlserver":return{formatTableName:ms.formatTableName,formatSelectClause:(n,i)=>`SELECT TOP 100 ${n} FROM ${i}`};case"timescaledb":case"postgres":case"postgresql":case"duckdb":return{formatTableName:n=>n.split(".").map(i=>`"${i}"`).join("."),formatSelectClause:(n,i)=>`SELECT ${n==="*"?"*":`"${n}"`} FROM ${i} LIMIT 100`};case"db2":case"mysql":case"sqlite":case"mariadb":case"cassandra":case"noql":case"athena":case"hive":case"redshift":case"snowflake":case"flink":case"mongodb":case"oracle":case"oracledb":return ms;default:return Dl(e),ms}}ew=function({table:e,columnName:n,sqlTableContext:i}){if(i){let{engine:a,schema:s,defaultSchema:c,defaultDatabase:f,database:p,dialect:h}=i,v=e.name;Nl(s)?v=p===f?v:`${p}.${v}`:(s!==c&&(v=`${s}.${v}`),p!==f&&(v=`${p}.${v}`));let w=jC(h),_=w.formatTableName(v),C=w.formatSelectClause(n,_);return a==="__marimo_duckdb"?`_df = mo.sql(f"""
130
+ ${C}
131
+ """)`:`_df = mo.sql(f"""
132
+ ${C}
133
+ """, engine=${a})`}return`_df = mo.sql(f'SELECT "${n}" FROM ${e.name} LIMIT 100')`},fw=function(e,n){if(n==="date"||n==="datetime"||n==="time"){if(e==="min")return"Earliest";if(e==="max")return"Latest"}return e};function qC(){return{tables:[],expandedTables:new Set,expandedColumns:new Set,columnsPreviews:new Map}}var{reducer:WR,createActions:UR,valueAtom:$g,useActions:zC}=Tl(qC,{addDatasets:(e,n)=>{let{previewDatasetColumn:i}=Ri();for(let p of n.tables)for(let h of p.columns){let v=`${p.name}:${h.name}`;e.expandedColumns.has(v)&&i({tableName:p.name,columnName:h.name,source:p.source,sourceType:p.source_type})}let a=e.tables;n.clear_channel&&(a=a.filter(p=>p.source!==n.clear_channel));let s=[...n.tables,...a],c=new Set,f=s.filter(p=>{let h=`${p.name}:${p.source}`;return c.has(h)?!1:(c.add(h),!0)}).sort((p,h)=>p.name.localeCompare(h.name));return{...e,tables:f}},filterDatasetsFromVariables:(e,n)=>{let i=new Set(n),a=e.tables.filter(s=>s.variable_name?i.has(s.variable_name):!0);return{...e,tables:a}},toggleTable:(e,n)=>{let i=new Set(e.expandedTables);return i.has(n)?i.delete(n):i.add(n),{...e,expandedTables:i}},toggleColumn:(e,n)=>{let i=`${n.table}:${n.column}`,a=new Set(e.expandedColumns);return a.has(i)?a.delete(i):a.add(i),{...e,expandedColumns:a}},closeAllColumns:e=>({...e,expandedColumns:new Set}),addColumnPreview:(e,n)=>{let i=`${n.table_name}:${n.column_name}`,a=new Map(e.columnsPreviews);return a.set(i,n),{...e,columnsPreviews:a}}});z2=()=>Un($g),Eu=Be(e=>e($g).tables),Hw=Be(new Set),L2=Be(!1),pw=function(){return zC()};var FC=new Map([[Oi,{name:Oi,dialect:"duckdb",source:"duckdb",display_name:"DuckDB (In-Memory)",databases:[]}]]);function BC(){return{latestEngineSelected:Oi,connectionsMap:FC}}let HC,VC;({reducer:HC,createActions:VC,valueAtom:sa,useActions:uw}=Tl(BC,{addDataSourceConnection:(e,n)=>{if(n.connections.length===0)return e;let{latestEngineSelected:i,connectionsMap:a}=e,s=new Map(a);for(let c of n.connections)s.set(c.name,c);return{latestEngineSelected:i,connectionsMap:s}},filterDataSourcesFromVariables:(e,n)=>{let{latestEngineSelected:i,connectionsMap:a}=e,s=new Set(n),c=new Map([...a].filter(([f])=>cs.has(f)?!0:s.has(f)));return{latestEngineSelected:c.has(i)?i:Oi,connectionsMap:c}},clearDataSourceConnections:()=>({latestEngineSelected:Oi,connectionsMap:new Map}),removeDataSourceConnection:(e,n)=>{let{latestEngineSelected:i,connectionsMap:a}=e,s=new Map(a);return s.delete(n),{latestEngineSelected:s.has(i)?i:Oi,connectionsMap:s}},addTableList:(e,n)=>{let{tables:i,sqlTableContext:a}=n,{connectionsMap:s,latestEngineSelected:c}=e,f=a.engine,p=s.get(f);if(!p)return e;let h=new Map(s),v={...p,databases:p.databases.map(w=>w.name===a.database?{...w,schemas:w.schemas.map(_=>_.name===a.schema?{..._,tables:i}:_)}:w)};return h.set(f,v),{latestEngineSelected:c,connectionsMap:h}},addTable:(e,n)=>{let{table:i,sqlTableContext:a}=n,{connectionsMap:s,latestEngineSelected:c}=e,f=a.engine,p=i.name,h=s.get(f);if(!h)return e;let v=new Map(s),w={...h,databases:h.databases.map(_=>_.name===a.database?{..._,schemas:_.schemas.map(C=>{if(C.name!==a.schema)return C;let E=C.tables.length===0?[i]:C.tables.map(R=>R.name===p?i:R);return{...C,tables:E}})}:_)};return v.set(f,w),{latestEngineSelected:c,connectionsMap:v}}})),Nu=Be(e=>e(sa).connectionsMap);function Wg(e){let n=ct.get(sa);n.connectionsMap.has(e)&&ct.set(sa,{...n,latestEngineSelected:e})}S2=Be(e=>{let n=ct.get(Eu),i=e(sa).connectionsMap,a=new Map;for(let s of n)a.set(s.name,s);for(let s of i.values())for(let c of s.databases){let f=c.name===s.default_database||s.databases.length===1;for(let p of c.schemas){let h=p.name===s.default_schema,v=Nl(p.name);for(let w of p.tables){let _;if(_=w.name,v){_=f?w.name:`${c.name}.${w.name}`,a.has(_)?Pe.warn(`Table name collision for ${_}. Skipping.`):a.set(_,w);continue}if(f&&h&&!a.has(_)){a.set(_,w);continue}if(_=`${p.name}.${w.name}`,f&&!a.has(_)){a.set(_,w);continue}_=`${c.name}.${p.name}.${w.name}`,a.has(_)?Pe.warn(`Table name collision for ${_}. Skipping.`):a.set(_,w)}}}return a}),sw=function(e){return e.variable_name?"dataframe":"table"};var $C=class c_{static jsonStringifySortKeys(){return n=>typeof n!="object"||!n?String(n):JSON.stringify(n,Object.keys(n).sort(),2)}constructor(n,i={}){this.delegate=n,this.toKey=i.toKey??c_.jsonStringifySortKeys(),this.cache=new Gl(i.maxSize??128)}request(n){let i=this.toKey(n),a=this.cache.get(i);if(a!==void 0)return a;let s=this.delegate.request(n);return this.cache.set(i,s),s.catch(c=>{throw this.cache.delete(i),c})}resolve(n,i){this.delegate.resolve(n,i)}reject(n,i){this.delegate.reject(n,i)}};V2=new bu("sql-table-preview",async(e,n)=>{await Ri().previewSQLTable({requestId:e,...n})}),tw=new bu("sql-table-list-preview",async(e,n)=>{await Ri().previewSQLTableList({requestId:e,...n})}),th=new $C(new bu("validate-sql",async(e,n)=>{await Ri().validateSQL({requestId:e,...n})}),{maxSize:3});var WC=Kt(zr(),1);let ko;ko=Be(new Map),I2=e=>{let n=(0,WC.c)(3),i=Un(ko),a;return n[0]!==e||n[1]!==i?(a=i.get(e),n[0]=e,n[1]=i,n[2]=a):a=n[2],a};function Ug(e){let n=ct.get(ko),i=new Map(n);i.delete(e),ct.set(ko,i)}function UC(){ct.set(ko,new Map)}function KC({cellId:e,errorMessage:n,dialect:i}){let a=ct.get(ko),s=new Map(a),c=i==="DuckDB"?QC(n):Kg(n);s.set(e,c),ct.set(ko,s)}function QC(e){let{errorType:n,errorMessage:i}=Kg(e),a=i,s,c=i.indexOf("LINE ");return c!==-1&&(s=i.slice(Math.max(0,c)).trim(),a=i.slice(0,Math.max(0,c)).trim()),{errorType:n,errorMessage:a,codeblock:s}}function Kg(e){return{errorType:e.split(":")[0].trim(),errorMessage:e.split(":").slice(1).join(":").trim()}}let Wd,Qg,Ud,Kd;hm=qn("book-marked",[["path",{d:"M10 2v8l3-3 3 3V2",key:"sqw3rj"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]),Sm=qn("braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]),Wd=qn("calendar-clock",[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]),xm=qn("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),_m=qn("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),Qg=qn("cog",[["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["circle",{cx:"12",cy:"12",r:"8",key:"46899m"}]]),Hm=qn("columns-2",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]]),Ud=qn("database-backup",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 12a9 3 0 0 0 5 2.69",key:"1ui2ym"}],["path",{d:"M21 9.3V5",key:"6k6cib"}],["path",{d:"M3 5v14a9 3 0 0 0 6.47 2.88",key:"i62tjy"}],["path",{d:"M12 12v4h4",key:"1bxaet"}],["path",{d:"M13 20a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L12 16",key:"1f4ei9"}]]),as=qn("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),Uu=qn("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),Tu=qn("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),aa=qn("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]),pm=qn("paint-roller",[["rect",{width:"16",height:"6",x:"2",y:"2",rx:"2",key:"jcyz7m"}],["path",{d:"M10 16v-2a2 2 0 0 1 2-2h8a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2",key:"1b9h7c"}],["rect",{width:"4",height:"6",x:"8",y:"16",rx:"1",key:"d6e7yl"}]]),Kd=qn("search-check",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),la=qn("table-2",[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]]),jl=function(e){switch(e){case"duckdb":return"DuckDB";case"motherduck":return"MotherDuck";case"sqlite":return"SQLite";case"postgres":case"postgresql":return"PostgreSQL";case"mysql":return"MySQL";case"mariadb":return"MariaDB";case"mssql":return"Microsoft SQL Server";case"oracle":return"Oracle";case"redshift":return"Amazon Redshift";case"snowflake":return"Snowflake";case"bigquery":return"Google BigQuery";case"clickhouse":return"ClickHouse";case"timeplus":return"Timeplus";case"databricks":return"Databricks";case"db2":return"IBM Db2";case"hive":return"Apache Hive";case"impala":return"Apache Impala";case"presto":return"Presto";case"trino":return"Trino";case"cockroachdb":return"CockroachDB";case"timescaledb":return"TimescaleDB";case"singlestore":return"SingleStore";case"cassandra":return"Apache Cassandra";case"mongodb":return"MongoDB";case"iceberg":return"Apache Iceberg";default:return e}};function Gg(e){let[n,i]=e.split(" ");return i?`${jl(n)} ${i}`:jl(e)}Ou={boolean:ER,date:SR,time:_m,datetime:Wd,temporal:Wd,number:lm,string:TR,integer:lm,unknown:Sm},R2=function(e){switch(e){case"boolean":return"bg-(--orange-4)";case"date":case"time":case"datetime":case"temporal":return"bg-(--grass-4) dark:bg-(--grass-5)";case"number":case"integer":return"bg-(--purple-4)";case"string":return"bg-(--blue-4)";case"unknown":return"bg-(--slate-4) dark:bg-(--slate-6)";default:return Dl(e),"bg-(--slate-4) dark:bg-(--slate-6)"}};let hs,Jg,Qd,Xg,Sa,Yg,Zg,ey,ty,ny,Ea,Vr,Co,oi,Gd;mo=class{constructor(e,n){this.singular=e,this._plural=n}pluralize(e){return e===1?this.singular:this.plural}get plural(){return this._plural??`${this.singular}s`}},e_=class u_{constructor(n){this.words=n}static of(...n){return new u_(n.map(i=>typeof i=="string"?new mo(i):i))}join(n,i){return this.words.map(a=>a.pluralize(i)).join(n)}},hs=Kt(zr(),1),Jg=5,Qd={boolean:"bg-[var(--orange-4)] text-[var(--orange-11)]",date:"bg-[var(--grass-4)] text-[var(--grass-11)]",time:"bg-[var(--grass-4)] text-[var(--grass-11)]",datetime:"bg-[var(--grass-4)] text-[var(--grass-11)]",number:"bg-[var(--purple-4)] text-[var(--purple-11)]",integer:"bg-[var(--purple-4)] text-[var(--purple-11)]",string:"bg-[var(--blue-4)] text-[var(--blue-11)]",unknown:"bg-[var(--slate-4)] text-[var(--slate-11)]"},Xg={local:"bg-[var(--blue-4)] text-[var(--blue-11)]",duckdb:"bg-[var(--amber-4)] text-[var(--amber-11)]",connection:"bg-[var(--green-4)] text-[var(--green-11)]",catalog:"bg-[var(--purple-4)] text-[var(--purple-11)]"},Sa="p-3 min-w-[250px] flex flex-col divide-y",Yg=new mo("column","columns"),Zg=new mo("row","rows"),ey=new mo("schema","schemas"),ty=new mo("table","tables"),ny=new mo("database","databases"),Ea=e=>{let n=(0,hs.c)(6),{icon:i,title:a,badge:s}=e,c;n[0]===a?c=n[1]:(c=(0,B.jsx)("h3",{className:"font-semibold text-sm",children:a}),n[0]=a,n[1]=c);let f;return n[2]!==s||n[3]!==i||n[4]!==c?(f=(0,B.jsxs)("div",{className:"flex items-center gap-2 pb-2",children:[i,c,s]}),n[2]=s,n[3]=i,n[4]=c,n[5]=f):f=n[5],f},Vr=e=>{let n=(0,hs.c)(5),{label:i,value:a}=e,s;n[0]===i?s=n[1]:(s=(0,B.jsxs)("span",{className:"text-[var(--slate-11)]",children:[i,":"]}),n[0]=i,n[1]=s);let c;return n[2]!==s||n[3]!==a?(c=(0,B.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[s,a]}),n[2]=s,n[3]=a,n[4]=c):c=n[4],c},Co=e=>{let n=(0,hs.c)(5),{icon:i,text:a}=e,s;n[0]===a?s=n[1]:(s=(0,B.jsx)("span",{className:"text-xs text-[var(--slate-11)]",children:a}),n[0]=a,n[1]=s);let c;return n[2]!==i||n[3]!==s?(c=(0,B.jsxs)("div",{className:"flex items-center gap-1",children:[i,s]}),n[2]=i,n[3]=s,n[4]=c):c=n[4],c},oi=e=>{let n=(0,hs.c)(15),{title:i,items:a,totalCount:s,limit:c}=e,f=i===void 0?"":i,p=c===void 0?Jg:c;if(a.length===0)return null;let h;n[0]!==a||n[1]!==p?(h=a.slice(0,p),n[0]=a,n[1]=p,n[2]=h):h=n[2];let v=h,w=s>p,_;n[3]===f?_=n[4]:(_=f&&(0,B.jsxs)("h4",{className:"text-xs font-medium text-[var(--slate-11)] mb-2",children:[f,":"]}),n[3]=f,n[4]=_);let C;n[5]!==w||n[6]!==p||n[7]!==s?(C=w&&(0,B.jsxs)("div",{className:"text-xs text-[var(--slate-10)] text-center py-1",children:["... and ",s-p," more"]}),n[5]=w,n[6]=p,n[7]=s,n[8]=C):C=n[8];let E;n[9]!==C||n[10]!==v?(E=(0,B.jsxs)("div",{className:"flex flex-col gap-1 overflow-y-auto",children:[v,C]}),n[9]=C,n[10]=v,n[11]=E):E=n[11];let R;return n[12]!==_||n[13]!==E?(R=(0,B.jsxs)("div",{className:"py-2",children:[_,E]}),n[12]=_,n[13]=E,n[14]=R):R=n[14],R},Gd=e=>Qd[e]||Qd.unknown;const GC=e=>{var f,p;let n=e.type==="view"?(0,B.jsx)(Uu,{className:"w-4 h-4 text-[var(--blue-9)]"}):(0,B.jsx)(la,{className:"w-4 h-4 text-[var(--green-9)]"}),i=(0,B.jsx)(lr,{variant:"secondary",className:`text-xs ${e.type==="view"?"bg-[var(--blue-4)] text-[var(--blue-11)]":"bg-[var(--green-4)] text-[var(--green-11)]"}`,children:e.type}),a=e.columns.map(h=>{let v=Ou[h.type];return(0,B.jsxs)("div",{className:"flex items-center justify-between text-xs rounded",children:[(0,B.jsxs)("div",{className:"flex items-center gap-2",children:[(0,B.jsx)(v,{className:"w-3 h-3 text-[var(--slate-9)]"}),(0,B.jsx)("span",{className:"font-mono",children:h.name})]}),(0,B.jsx)(lr,{variant:"outline",className:`text-xs ${Gd(h.type)}`,children:h.type})]},h.name)}),s=e.primary_keys&&e.primary_keys.length>0,c=e.indexes&&e.indexes.length>0;return(0,B.jsxs)("div",{className:`${Sa} min-w-[300px]`,children:[(0,B.jsx)(Ea,{icon:n,title:e.name,badge:i}),(0,B.jsxs)("div",{className:"flex flex-col gap-2 py-2",children:[(0,B.jsx)(Vr,{label:"Source",value:(0,B.jsx)(lr,{variant:"outline",className:`text-xs ${Xg[e.source_type]}`,children:e.source})}),e.variable_name&&(0,B.jsx)(Vr,{label:"Variable",value:(0,B.jsx)("code",{className:"text-xs bg-[var(--slate-4)] px-1 rounded",children:e.variable_name})}),e.engine&&(0,B.jsx)(Vr,{label:"Engine",value:(0,B.jsx)("code",{className:"text-xs bg-[var(--slate-4)] px-1 rounded",children:e.engine})})]}),(e.num_columns!=null||e.num_rows!=null)&&(0,B.jsxs)("div",{className:"grid grid-cols-2 gap-2 py-2",children:[e.num_columns!=null&&(0,B.jsx)(Co,{icon:(0,B.jsx)(Hm,{className:"w-3 h-3 text-[var(--slate-9)]"}),text:`${e.num_columns} ${Yg.pluralize(e.num_columns)}`}),e.num_rows!=null&&(0,B.jsx)(Co,{icon:(0,B.jsx)(lm,{className:"w-3 h-3 text-[var(--slate-9)]"}),text:`${e.num_rows} ${Zg.pluralize(e.num_rows)}`})]}),e.columns.length===0&&Yl("column"),(s||c)&&(0,B.jsxs)("div",{className:"flex flex-col gap-2 py-2",children:[s&&(0,B.jsxs)("div",{className:"flex flex-row gap-1",children:[(0,B.jsxs)("div",{className:"flex items-center gap-1",children:[(0,B.jsx)(pR,{className:"w-3 h-3 text-[var(--amber-9)]"}),(0,B.jsx)("span",{className:"text-xs font-medium text-[var(--slate-11)]",children:"Primary Keys:"})]}),(f=e.primary_keys)==null?void 0:f.map(h=>(0,B.jsx)(lr,{variant:"outline",className:"text-xs text-[var(--slate-11)]",children:h},h))]}),c&&(0,B.jsxs)("div",{className:"flex flex-row gap-1",children:[(0,B.jsxs)("div",{className:"flex items-center gap-1 mb-1",children:[(0,B.jsx)(hm,{className:"w-3 h-3 text-[var(--purple-9)]"}),(0,B.jsx)("span",{className:"text-xs font-medium text-[var(--slate-11)]",children:"Indexes:"})]}),(p=e.indexes)==null?void 0:p.map(h=>(0,B.jsx)(lr,{variant:"outline",className:"text-xs text-[var(--slate-11)]",children:h},h))]})]}),e.columns.length>0&&(0,B.jsx)(oi,{items:a,totalCount:e.columns.length})]})},JC=e=>{var s;let n=Ou[e.type],i=(0,B.jsx)(lr,{variant:"outline",className:`text-xs ${Gd(e.type)}`,children:e.type}),a=((s=e.sample_values)==null?void 0:s.map((c,f)=>(0,B.jsx)("div",{className:"text-xs bg-[var(--slate-3)] rounded font-mono",children:c==null?"null":String(c)},f)))||[];return(0,B.jsxs)("div",{className:Sa,children:[(0,B.jsx)(Ea,{icon:(0,B.jsx)(n,{className:"w-4 h-4 text-[var(--slate-9)]"}),title:e.name,badge:i}),(0,B.jsxs)("div",{className:"flex flex-col gap-2 mt-2",children:[(0,B.jsx)(Vr,{label:"Type",value:(0,B.jsx)("span",{className:"font-medium",children:e.type})}),(0,B.jsx)(Vr,{label:"External Type",value:(0,B.jsx)("code",{className:"text-xs bg-[var(--slate-4)] px-1 rounded",children:e.external_type})})]}),e.sample_values&&e.sample_values.length>0&&(0,B.jsx)(oi,{title:"Sample Values",items:a,totalCount:e.sample_values.length})]})},XC=e=>{let n=(0,B.jsx)(lr,{variant:"outline",className:"text-xs bg-[var(--blue-4)] text-[var(--blue-11)]",children:e.dialect}),i=e.schemas.map(a=>(0,B.jsxs)("div",{className:"flex items-center justify-between text-xs rounded hover:bg-[var(--slate-3)]",children:[(0,B.jsxs)("div",{className:"flex items-center gap-2",children:[(0,B.jsx)(aa,{className:"w-3 h-3 text-[var(--slate-9)]"}),(0,B.jsx)("span",{children:a.name})]}),(0,B.jsxs)(lr,{variant:"outline",className:"text-xs",children:[a.tables.length," ",ty.pluralize(a.tables.length)]})]},a.name));return(0,B.jsxs)("div",{className:Sa,children:[(0,B.jsx)(Ea,{icon:(0,B.jsx)(as,{className:"w-4 h-4 text-[var(--blue-9)]"}),title:e.name,badge:n}),(0,B.jsxs)("div",{className:"flex flex-col gap-2 py-2",children:[(0,B.jsx)(Vr,{label:"Dialect",value:(0,B.jsx)("span",{className:"font-medium",children:e.dialect})}),e.engine&&(0,B.jsx)(Vr,{label:"Engine",value:(0,B.jsx)("code",{className:"text-xs bg-[var(--slate-4)] px-1 rounded",children:e.engine})})]}),(0,B.jsx)("div",{className:"py-2",children:(0,B.jsx)(Co,{icon:(0,B.jsx)(aa,{className:"w-3 h-3 text-[var(--slate-9)]"}),text:`${e.schemas.length} schema${e.schemas.length===1?"":"s"}`})}),e.schemas.length===0&&Yl("schema"),e.schemas.length>0&&(0,B.jsx)(oi,{title:"Schemas",items:i,totalCount:e.schemas.length})]})},YC=e=>{let n=(0,B.jsx)(lr,{variant:"outline",className:"text-xs bg-[var(--green-4)] text-[var(--green-11)]",children:"Schema"}),i=e.tables.map(a=>(0,B.jsxs)("div",{className:"flex items-center justify-between text-xs rounded hover:bg-[var(--slate-3)]",children:[(0,B.jsxs)("div",{className:"flex items-center gap-2",children:[a.type==="view"?(0,B.jsx)(Uu,{className:"w-3 h-3 text-[var(--blue-9)]"}):(0,B.jsx)(la,{className:"w-3 h-3 text-[var(--green-9)]"}),(0,B.jsx)("span",{children:a.name})]}),(0,B.jsx)(lr,{variant:"outline",className:`text-xs ${a.type==="view"?"bg-[var(--blue-4)] text-[var(--blue-11)]":"bg-[var(--green-4)] text-[var(--green-11)]"}`,children:a.type})]},a.name));return(0,B.jsxs)("div",{className:Sa,children:[(0,B.jsx)(Ea,{icon:(0,B.jsx)(aa,{className:"w-4 h-4 text-[var(--green-9)]"}),title:e.name,badge:n}),(0,B.jsx)("div",{className:"py-2",children:(0,B.jsx)(Co,{icon:(0,B.jsx)(la,{className:"w-3 h-3 text-[var(--slate-9)]"}),text:`${e.tables.length} table${e.tables.length===1?"":"s"}`})}),e.tables.length===0&&Yl("table"),e.tables.length>0&&(0,B.jsx)(oi,{title:"Tables",items:i,totalCount:e.tables.length})]})};var ry=(0,B.jsx)(lr,{variant:"outline",children:"default"}),ZC=8,iy=3;let Yl;t_=(e,n)=>{let i=e.databases.length,a=e.databases.reduce((h,v)=>h+v.schemas.length,0),s=(h,v)=>{if(h.tables.length===0)return null;let w=h.name===e.default_schema&&v,_=[];return a<ZC&&(_=h.tables.slice(0,iy+1).map(C=>(0,B.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[(0,B.jsx)(la,{className:"w-3 h-3 text-[var(--green-9)]"}),(0,B.jsx)("span",{className:"text-xs",children:C.name})]},C.name))),(0,B.jsxs)("div",{children:[(0,B.jsxs)("div",{className:"flex items-center gap-2 text-xs rounded hover:bg-[var(--slate-3)] ml-2",children:[(0,B.jsx)(aa,{className:"w-3 h-3 text-[var(--slate-9)]"}),(0,B.jsx)("span",{children:h.name}),w&&ry,(0,B.jsxs)(lr,{variant:"outline",className:"text-xs ml-auto",children:[h.tables.length," tables"]})]}),(0,B.jsx)(oi,{items:_,totalCount:h.tables.length,limit:iy})]},h.name)},c=e.databases.map(h=>{let v=h.name===e.default_database||e.databases.length===1,w=h.schemas.map(_=>s(_,v));return(0,B.jsxs)("div",{children:[(0,B.jsxs)("div",{className:"flex items-center gap-2",children:[(0,B.jsx)(as,{className:"w-3 h-3 text-[var(--blue-9)]"}),(0,B.jsx)("span",{className:"text-xs",children:h.name}),v&&ry]}),w&&(0,B.jsx)(oi,{items:w,totalCount:h.schemas.length})]},h.name)}),f=e.name;cs.has(e.name)&&(f="In-Memory");let p=n==null?void 0:n.map(h=>(0,B.jsxs)("div",{className:"flex items-center gap-2",children:[(0,B.jsx)(la,{className:"w-3 h-3 text-[var(--blue-9)]"}),(0,B.jsx)("span",{className:"text-xs",children:h.name})]},h.name));return(0,B.jsxs)("div",{className:`${Sa} px-1`,children:[(0,B.jsx)(Ea,{icon:(0,B.jsx)(Qg,{className:"w-4 h-4 text-[var(--purple-9)]"}),title:f}),(0,B.jsxs)("div",{className:"flex flex-col gap-2 py-2",children:[(0,B.jsx)(Vr,{label:"Dialect",value:(0,B.jsx)("span",{className:"font-medium",children:jl(e.dialect)})}),(0,B.jsx)(Vr,{label:"Source",value:(0,B.jsx)(lr,{variant:"outline",className:"text-xs bg-[var(--green-4)] text-[var(--green-11)]",children:e.source})})]}),(0,B.jsxs)("div",{className:"flex flex-row justify-between py-2",children:[(0,B.jsx)(Co,{icon:(0,B.jsx)(as,{className:"w-3 h-3 text-[var(--slate-9)]"}),text:`${i} ${ny.pluralize(i)}`}),(0,B.jsx)(Co,{icon:(0,B.jsx)(aa,{className:"w-3 h-3 text-[var(--slate-9)]"}),text:`${a} ${ey.pluralize(a)}`})]}),i>0&&(0,B.jsx)(oi,{items:c,totalCount:i}),p&&p.length>0&&(0,B.jsx)(oi,{title:"Dataframes",items:p,totalCount:p.length})]})},Yl=e=>(0,B.jsxs)("div",{className:"flex items-start gap-2 mt-3",children:[(0,B.jsx)(Tu,{size:10,className:"mt-1 text-[var(--slate-10)] shrink-0"}),(0,B.jsxs)("span",{className:"text-xs text-[var(--slate-11)]",children:["No ",e," information available.",`
134
+ `,(0,B.jsx)("span",{className:"text-[var(--blue-10)]",children:"Introspect to see more details."})]})]});var Zl=Kt(Su(),1),oy=class{constructor(){Te(this,"schema",{})}addTable(e,n){let i={self:tS({table:n}),children:n.columns.map(a=>eS({column:a}))};return this.setAt([...e,n.name],i),this}addSchema(e,n){let i={self:nS({namespace:n,path:e}),children:{}};return this.setAt(e,i),this}addDatabase(e,n){let i={self:rS({namespace:n,path:e}),children:{}};return this.setAt(e,i),this}setAt(e,n){let i=this.schema;for(let a of e.slice(0,-1))i[a]||(i[a]={children:{}}),i=i[a].children;i[e[e.length-1]]=n}build(){return this.schema}reset(){return this.schema={},this}};function eS(e){return{label:e.column.name,type:"column",info:()=>{let n=document.createElement("div");return(0,Zl.createRoot)(n).render(JC(e.column)),{dom:n}}}}function tS(e){return{label:e.table.name,type:"table",info:()=>{let n=document.createElement("div");return(0,Zl.createRoot)(n).render(GC(e.table)),{dom:n}}}}function nS(e){return{label:e.namespace.name,detail:e.path.join("."),type:"schema",info:()=>{let n=document.createElement("div");return(0,Zl.createRoot)(n).render(YC(e.namespace)),{dom:n}}}}function rS(e){return{label:e.namespace.name,detail:e.path.join("."),type:"database",info:()=>{let n=document.createElement("div");return(0,Zl.createRoot)(n).render(XC(e.namespace)),{dom:n}}}}var iS=Be(e=>{let n=e(Eu),i=new oy;for(let a of n)i.addTable([],a);return i.build()}),oS=class{constructor(){this.cache=new Gl(10,{create:e=>this.getConnectionSchema(e)})}getConnection(e){return ct.get(Nu).get(e)}getConnectionSchema(e){var f;let{default_database:n,databases:i,default_schema:a}=e,s=new oy,c=i.find(p=>p.name===n||i.length===1);if(((f=c??i[0])==null?void 0:f.schemas.some(p=>Nl(p.name)))??!1){for(let p of i){let h=p.name===(c==null?void 0:c.name),v=p.schemas.flatMap(w=>w.tables);s.addDatabase([p.name],p);for(let w of v)h?s.addTable([],w):s.addTable([p.name],w)}return{shouldAddLocalTables:!1,schema:s.build(),defaultSchema:c==null?void 0:c.name}}if(c)for(let p of c.schemas){s.addSchema([p.name],p);for(let h of p.tables)s.addTable([p.name],h)}for(let p of i){s.addDatabase([p.name],p);for(let h of p.schemas){s.addSchema([p.name,h.name],h);for(let v of h.tables)s.addTable([p.name,h.name],v)}}return{shouldAddLocalTables:!0,schema:s.build(),defaultSchema:a??void 0}}getInternalDialect(e){let n=this.getConnection(e);return n?n.dialect:null}getDialect(e){let n=this.getConnection(e);return n?Vg(n):ps}getCompletionSource(e){let n=this.getConnection(e);if(!n)return null;let i=()=>ct.get(iS),a=this.cache.getOrCreate(n);return{dialect:Vg(n),schema:a.shouldAddLocalTables?{...a.schema,...i()}:a.schema,defaultSchema:a.defaultSchema,defaultTable:aS(n)}}};function aS(e){if(e.databases.length!==1)return;let n=e.databases[0];if(n.schemas.length!==1)return;let i=n.schemas[0];if(i.tables.length===1)return i.tables[0].name}const gs=new oS;function ay(e){return e.field(ii)}function sS(){return e=>{let n=ay(e.state).engine,i=gs.getCompletionSource(n);return i&&yR(i)(e)||null}}function lS(){return e=>{let n=ay(e.state).engine,i=gs.getDialect(n);return e.matchBefore(/\.\w*/)?null:kR(i,!0,(a,s)=>({label:a,type:s,info:async()=>{let c=(await cS())[a.toLocaleLowerCase()];if(!c)return null;let f=document.createElement("div");return f.innerHTML=MC.keyword({keyword:a,info:c}),f}}))(e)}}var cS=ti(async()=>{let e=await ue(()=>import("./common-keywords-CHpJ9y0g.js").then(async i=>(await i.__tla,i)),[],import.meta.url),n=await ue(()=>import("./duckdb-keywords-8_5mbBZZ.js").then(async i=>(await i.__tla,i)),[],import.meta.url);return{...e.default.keywords,...n.default.keywords}});gw=function(e){let n=e.storage||ds;return{getItem(i,a){try{let s=n.getItem(i);if(!s)return a;let c=JSON.parse(s);return e.fromSerializable(c)}catch(s){return Pe.warn(`Error getting ${i} from storage`,s),a}},setItem:(i,a)=>{n.setItem(i,JSON.stringify(e.toSerializable(a)))},removeItem:i=>{n.removeItem(i)}}},ed=fh(()=>ds);var uS=Kt(zr(),1),sy=Wu("marimo:notebook-sql-mode","default",ed);function dS(){let e=(0,uS.c)(3),[n,i]=Wb(sy),a;return e[0]!==i||e[1]!==n?(a={sqlMode:n,setSQLMode:i},e[0]=i,e[1]=n,e[2]=a):a=e[2],a}function fS(){return ct.get(sy)}var pS=Hg,ly=new pu;function Jd(){return ct.get(sa).latestEngineSelected}Hu=(sf=class{constructor(){Te(this,"parser",new Qh);Te(this,"type","sql");this.sqlModeEnabled=!0}get defaultMetadata(){return{...this.parser.defaultMetadata,engine:Jd()||"__marimo_duckdb"}}get defaultCode(){let e=Jd();return e&&e!=="__marimo_duckdb"?`_df = mo.sql(f"""SELECT * FROM """, engine=${e})`:this.parser.defaultCode}transformIn(e){this.parser.defaultMetadata.engine=Jd()||"__marimo_duckdb";let n=this.parser.transformIn(e),i=n.metadata;return i.engine&&i.engine!=="__marimo_duckdb"&&Wg(i.engine),[n.code,n.offset,i]}transformOut(e,n){let i=this.parser.transformOut(e,n);return[i.code,i.offset]}isSupported(e){return this.parser.isSupported(e)}getExtension(e,n,i,a,s){let c=[ly.of(v2({dialect:pS})),ra.of([{key:"Tab",run:f=>aR(f)||eR(f),preventDefault:!0}]),vu({defaultKeymap:!1,activateOnTyping:!0,override:[sS(),Pk,lS()]})];return this.sqlModeEnabled&&c.push(vS()),c}},Te(sf,"fromQuery",e=>Qh.fromQuery(e)),sf);function cy(e,n){e.dispatch({effects:ly.reconfigure(v2({dialect:n}))})}function mS(e,n){cy(e,gs.getDialect(n))}function hS(e){let n=uy(e.state).engine;cy(e,gs.getDialect(n))}function uy(e){return e.field(ii)}function gS(e){var i;let n=(i=gs.getInternalDialect(e))==null?void 0:i.toLowerCase();if(!n||!$d(n))return null;switch(n){case"postgresql":case"postgres":return"PostgreSQL";case"db2":return"DB2";case"mysql":return"MySQL";case"sqlite":return"Sqlite";case"mssql":case"sqlserver":return"TransactSQL";case"duckdb":return"DuckDB";case"mariadb":return"MariaDB";case"cassandra":return"Noql";case"athena":return"Athena";case"bigquery":return"BigQuery";case"hive":return"Hive";case"redshift":return"Redshift";case"snowflake":return"Snowflake";case"flink":return"FlinkSQL";case"mongodb":case"noql":return"Noql";case"oracle":case"oracledb":case"timescaledb":return Pe.debug("Unsupported dialect",{dialect:n}),null;default:return Dl(n),null}}var yS=300;function vS(){let e,n=null;return Tn.updateListener.of(i=>{if(!i.docChanged)return;let a=fS();if(a==="default")return;let s=uy(i.state).engine;if(!cs.has(s))return;let c=i.state.doc.toString();e&&window.clearTimeout(e),e=window.setTimeout(async()=>{if(n===c)return;n=c;let f=i.view.state.facet(ua);if(c===""){Ug(f);return}try{let p=gS(s),h=(await bS(c,s,p,a)).validate_result;h!=null&&h.error_message?KC({cellId:f,errorMessage:h.error_message,dialect:p}):Ug(f)}catch(p){Pe.error("Failed to validate SQL",{error:p})}},yS)})}async function bS(e,n,i,a){let s=await th.request({onlyParse:a==="default",engine:n,dialect:i,query:e});if(s.error)throw Error(s.error);return s}var wS=ti(()=>new EC),_S=ti(()=>new Ku),xS=ti(()=>new Hu);ur={get python(){return wS()},get markdown(){return _S()},get sql(){return xS()}};function kS(){return Object.values(ur)}var At=Kt(du(),1),ec="Checkbox",[CS,KR]=qR(ec),[SS,Xd]=CS(ec);function ES(e){let{__scopeCheckbox:n,checked:i,children:a,defaultChecked:s,disabled:c,form:f,name:p,onCheckedChange:h,required:v,value:w="on",internal_do_not_use_render:_}=e,[C,E]=FR({prop:i,defaultProp:s??!1,onChange:h,caller:ec}),[R,L]=At.useState(null),[H,W]=At.useState(null),U=At.useRef(!1),A=R?!!f||!!R.closest("form"):!0,G={checked:C,disabled:c,setChecked:E,control:R,setControl:L,name:p,form:f,value:w,hasConsumerStoppedPropagationRef:U,required:v,defaultChecked:qi(s)?!1:s,isFormControl:A,bubbleInput:H,setBubbleInput:W};return(0,B.jsx)(SS,{scope:n,...G,children:TS(_)?_(G):a})}var dy="CheckboxTrigger",fy=At.forwardRef(({__scopeCheckbox:e,onKeyDown:n,onClick:i,...a},s)=>{let{control:c,value:f,disabled:p,checked:h,required:v,setControl:w,setChecked:_,hasConsumerStoppedPropagationRef:C,isFormControl:E,bubbleInput:R}=Xd(dy,e),L=Gb(s,w),H=At.useRef(h);return At.useEffect(()=>{let W=c==null?void 0:c.form;if(W){let U=()=>_(H.current);return W.addEventListener("reset",U),()=>W.removeEventListener("reset",U)}},[c,_]),(0,B.jsx)(um.button,{type:"button",role:"checkbox","aria-checked":qi(h)?"mixed":h,"aria-required":v,"data-state":yy(h),"data-disabled":p?"":void 0,disabled:p,value:f,...a,ref:L,onKeyDown:w2(n,W=>{W.key==="Enter"&&W.preventDefault()}),onClick:w2(i,W=>{_(U=>qi(U)?!0:!U),R&&E&&(C.current=W.isPropagationStopped(),C.current||W.stopPropagation())})})});fy.displayName=dy;var Yd=At.forwardRef((e,n)=>{let{__scopeCheckbox:i,name:a,checked:s,defaultChecked:c,required:f,disabled:p,value:h,onCheckedChange:v,form:w,..._}=e;return(0,B.jsx)(ES,{__scopeCheckbox:i,checked:s,defaultChecked:c,disabled:p,required:f,onCheckedChange:v,name:a,form:w,value:h,internal_do_not_use_render:({isFormControl:C})=>(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(fy,{..._,ref:n,__scopeCheckbox:i}),C&&(0,B.jsx)(gy,{__scopeCheckbox:i})]})})});Yd.displayName=ec;var py="CheckboxIndicator",my=At.forwardRef((e,n)=>{let{__scopeCheckbox:i,forceMount:a,...s}=e,c=Xd(py,i);return(0,B.jsx)(zR,{present:a||qi(c.checked)||c.checked===!0,children:(0,B.jsx)(um.span,{"data-state":yy(c.checked),"data-disabled":c.disabled?"":void 0,...s,ref:n,style:{pointerEvents:"none",...e.style}})})});my.displayName=py;var hy="CheckboxBubbleInput",gy=At.forwardRef(({__scopeCheckbox:e,...n},i)=>{let{control:a,hasConsumerStoppedPropagationRef:s,checked:c,defaultChecked:f,required:p,disabled:h,name:v,value:w,form:_,bubbleInput:C,setBubbleInput:E}=Xd(hy,e),R=Gb(i,E),L=PR(c),H=BR(a);At.useEffect(()=>{let U=C;if(!U)return;let A=window.HTMLInputElement.prototype,G=Object.getOwnPropertyDescriptor(A,"checked").set,he=!s.current;if(L!==c&&G){let N=new Event("click",{bubbles:he});U.indeterminate=qi(c),G.call(U,qi(c)?!1:c),U.dispatchEvent(N)}},[C,L,c,s]);let W=At.useRef(qi(c)?!1:c);return(0,B.jsx)(um.input,{type:"checkbox","aria-hidden":!0,defaultChecked:f??W.current,required:p,disabled:h,name:v,value:w,form:_,...n,tabIndex:-1,ref:R,style:{...n.style,...H,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});gy.displayName=hy;function TS(e){return typeof e=="function"}function qi(e){return e==="indeterminate"}function yy(e){return qi(e)?"indeterminate":e?"checked":"unchecked"}let vy;vy=Kt(zr(),1),Al=At.forwardRef((e,n)=>{let i=(0,vy.c)(10),a,s;i[0]===e?(a=i[1],s=i[2]):({className:a,...s}=e,i[0]=e,i[1]=a,i[2]=s);let c;i[3]===a?c=i[4]:(c=fu("flex items-center justify-center peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",a),i[3]=a,i[4]=c);let f;i[5]===Symbol.for("react.memo_cache_sentinel")?(f=(0,B.jsx)(my,{className:fu("flex items-center justify-center text-current max-h-[14px] overflow-hidden"),children:(0,B.jsx)(RR,{className:"h-4 w-4"})}),i[5]=f):f=i[5];let p;return i[6]!==s||i[7]!==n||i[8]!==c?(p=(0,B.jsx)(Yd,{ref:n,className:c,...s,children:f}),i[6]=s,i[7]=n,i[8]=c,i[9]=p):p=i[9],p}),Al.displayName=Yd.displayName,Lw="_";var RS=new Set("__*.marimo.app.False.None.True.__peg_parser__.and.as.assert.async.await.break.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.in.is.lambda.nonlocal.not.or.pass.raise.return.try.while.with.yield.None.setup".split("."));Qm=function(e,n=!0){return e=e.trim(),e?(/^\d/.test(e)&&(e=`_${e}`),e=e.replaceAll(/\W/g,"_"),n?e.toLowerCase():e):"_"},Sw=function(e,n){let i=new Set(n),a=e,s=f=>!i.has(f)&&!RS.has(f);if(s(e))return e;let c=1;for(;!s(a);)a=`${e}_${c}`,c++;return a},Jw=function(e,n){return qm(e)?`cell-${n}`:e},qm=function(e){return e?e==="_"||e==="__":!0};var DS=Kt(zr(),1);function OS(e){let n=(0,DS.c)(15),{minWidth:i,padding:a}=e,s=i===void 0?70:i,c=a===void 0?15:a,[f,p]=(0,At.useState)(50),h=(0,At.useRef)(null),v=(0,At.useRef)(null),w;n[0]===c?w=n[1]:(w=N=>{if(v.current&&h.current){let j=v.current;j.style.fontSize=window.getComputedStyle(h.current).fontSize,j.style.fontFamily=window.getComputedStyle(h.current).fontFamily,j.textContent=N;let V=j.offsetWidth;p(V+c)}},n[0]=c,n[1]=w);let _=w,C;n[2]===_?C=n[3]:(C=()=>{var N;_(((N=h.current)==null?void 0:N.value)??"")},n[2]=_,n[3]=C),CR(C);let E;n[4]===_?E=n[5]:(E=N=>{_(N.target.value)},n[4]=_,n[5]=E);let R=`${f}px`,L=`${s}px`,H;n[6]!==R||n[7]!==L?(H={width:R,minWidth:L},n[6]=R,n[7]=L,n[8]=H):H=n[8];let W;n[9]!==E||n[10]!==H?(W={ref:h,type:"text",onChange:E,style:H},n[9]=E,n[10]=H,n[11]=W):W=n[11];let U=W,A;n[12]===Symbol.for("react.memo_cache_sentinel")?(A={ref:v,style:{visibility:"hidden",position:"absolute",whiteSpace:"pre"}},n[12]=A):A=n[12];let G=A,he;return n[13]===U?he=n[14]:(he={inputProps:U,spanProps:G},n[13]=U,n[14]=he),he}var PS=Kt(zr(),1);function NS({currentQuotePrefix:e,checked:n,prefix:i}){let a=e;return n?e===""?a=i:e!=="rf"&&i!==e&&(a="rf"):e===i?a="":e==="rf"&&(a=i==="r"?"f":"r"),a}const MS=()=>{let e=(0,PS.c)(2),n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,B.jsxs)("section",{className:"flex flex-col gap-0.5",children:[(0,B.jsxs)("header",{className:"flex items-center gap-1",children:[(0,B.jsx)("code",{className:"text-xs px-1 py-0.5 bg-(--slate-2) rounded",children:"r"}),(0,B.jsx)("span",{className:"font-semibold",children:"Raw String"})]}),(0,B.jsx)("p",{className:"text-sm text-muted-foreground",children:"Write LaTeX without escaping special characters"}),(0,B.jsx)("pre",{className:"text-xs bg-(--slate-2) p-2 rounded",children:"\\alpha \\beta"})]}),e[0]=n):n=e[0];let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=(0,B.jsxs)("div",{className:"flex flex-col gap-3.5",children:[n,(0,B.jsxs)("section",{className:"flex flex-col gap-0.5",children:[(0,B.jsxs)("header",{className:"flex items-center gap-1",children:[(0,B.jsx)("code",{className:"text-xs px-1 py-0.5 bg-(--slate-2) rounded",children:"f"}),(0,B.jsx)("span",{className:"font-semibold",children:"Format String"})]}),(0,B.jsx)("p",{className:"text-sm text-muted-foreground",children:"Interpolate Python values"}),(0,B.jsxs)("pre",{className:"text-xs bg-(--slate-2) p-2 rounded",children:["Hello ","{name}","! \u{1F601}"]})]})]}),e[1]=i):i=e[1],i};var LS="data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eClickHouse%3c/title%3e%3cpath%20d='M21.333%2010H24v4h-2.667ZM16%201.335h2.667v21.33H16Zm-5.333%200h2.666v21.33h-2.666ZM0%2022.665V1.335h2.667v21.33zm5.333-21.33H8v21.33H5.333Z'/%3e%3c/svg%3e",AS="data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eDatabricks%3c/title%3e%3cpath%20d='M.95%2014.184L12%2020.403l9.919-5.55v2.21L12%2022.662l-10.484-5.96-.565.308v.77L12%2024l11.05-6.218v-4.317l-.515-.309L12%2019.118l-9.867-5.653v-2.21L12%2016.805l11.05-6.218V6.32l-.515-.308L12%2011.974%202.647%206.681%2012%201.388l7.76%204.368.668-.411v-.566L12%200%20.95%206.27v.72L12%2013.207l9.919-5.55v2.26L12%2015.52%201.516%209.56l-.565.308Z'/%3e%3c/svg%3e",IS="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAGcElEQVR4nNxZa2wcVxU+99557M6+vLazj6xjO6+maWVTl0YpLU1DU9KARNqooQhFVYJUqUWgiocqIVRESPlRoEhIqYoqgSiCItqQPkAEKUWQtlGSJtAY00R5mTjZTfze94x3HvdedMdZnKgS6s7O2kk/a7R3xvY933fOd874yhhucCyYAIWA9IOH2r+35/HUnjU96sBC8fAERQLpj0+mXjdeXM6rzy/no88uK6zolHu97EX8p/f/IWHAv38i9bsH+kIPo/ozhAJBgpR9J419je437xb62Zc7n/tcf+gRsebADYQAxLW2N/ApL/vNq4AdA7Ht2/piT4q15fAp1wEYAGEALYA18TzT1TXQ09O75qPuKbWS8NW4Lan27/pM4gWrBIgFnaIDvKZIpPPKt+nlgpMTi0q5PKqoqvZR950XAREZaz/fmHmFOFijwGHkDDu5PKGs1SlQ5gAAQ+S9U9Y/xM+Wy+WxRvaeFwE770z+OBNQbmYWwPlp63BPh3q7XQaCxAi50gP7Tldf87J3ywVszEQ2bumOf5WZAAajeWoDJjYOMM5BCECEw9miefxwduaol/1b2sQdCon/8BOZX3ETYWYiODFhvrNUC6ylFgJqzl27DxV+xD3GaGkFnl6deS4G8mJqAmRrtaGkoqxiJnazPpt9gPNVa3DvqfKrXmO0rAJ3RSLrHojHd4jMMwvBSMn+d1pSVrv37oXdz50Hx79JOXgtQGsqIAEiT8V7djtVzEiQ4w+K+t9uCmn3uNmX5rL/l8ullw5c1g80E6slFXgkuuixJVKw3y5jxEzExnV7pB3k7rr3hZDBiZl3njk+9u1mY/legSgm0cfiXbtcTziYHJmovNEXC99PZzAV41KMzaLtXGBVmaQltWfCdPLNxPNdwFdii58KYykhXM2AO5MGvTSAgw9aLnUx8zlomCxTKdeHdP14s/F8tdAiIie2RpPfAPcPNYAjRumNOwLRLZwL2rPgHAGnCF6aHPuJ5869Cr5WYFs0/S0ZkTDns9SK1BltI/JicYcEcXAX8L5R+vOblanf+hHTNwFtWGr7QiT9BAPklnWoVt5/qxrZILQI7wvyjHPrjKkfeL0y9QID76Pzavhmoa3RzNdkLMcYEKCA4aJtncjIgVs4oFnbCCGASDtRVrw3Uz7sV1xfBKiAlc2RJV+vkz9vWYMZWesTa1ER5vYEgot27YPvjJ/dXGBOwY+44JeAdaHkQxpRU9QVQGDIrPz1FjV+f/3eFcaRFcdKosicsh8x6/ClBzaEu7YLoqJNDUonVKR0UCTuRT9w9wshpAzb+qmcY2b9iFlH0xVow0r81sCiz9azfdCY3rNWSzw8a5/ZZ2ItPv9UmfiFP7Tn0HQFPhlMbuKIyOKkhThjNc4rBCtRJl5jrvO5W4mSY+beMib/4A/tOTQtYCCY2kTdszmHE7X8/tWBTtf7s7S528IYELxcuviMycWZzF80baHVgdT6/00fu3oso7Tdwa5Ypt7Aw5Zx7M1K7pf+UL4WTVWgQwqnQ5LWLexTpfblEFaT7Jrsc3GMLDw7+a9tFDj1j/YcmqpAWkn06yhERaYP6ZdeHtC6tl6deYPx4q7xY5+/YFfP+kf5WniqQELp6J6hNaNdia8s4TCojkmrjOYVHGin7qsLQdYqvb976uijk455yX/ac/AkYNLKZx9Nb/kNQkAsLJNBW9+/Uk3eJzI/ZlUG36qcfv6MXf3nmtjtO/ZO/v27/tOeA/L6iyu0pfdu7/riATF93s0fffq+toGdM5zmJ+ziuRgJpWSEgy/mXlk/Zk2f8ZfytfDcxOeM828XHH04TAIJjOTgDAlIiPNEmgQTw9Xh146UBn/aavLgVUAmkLk5IkdXFh09l62NHloaWblZjFGMONjMrsTUjqV5qzjuP90Pw9MUmrKms/2x276U0pbcO2Hlh9qUzj6GMJiclk/q5/b+Ovfqg+P29LD/dD+MhnsgSMLhnlDvPQVrOrcmfufjF2cuvI0BqVlj5GDBKmQZsJbMe9+BAZP1yU3fF+tloVV3LzSfhtEbXrWhO7Ri3ULz8PwmzoRXfTqr/+ddf+k0Dk8CEGBMOWccmC8H82bgSUAmfNO6S/q5Bc8+eBUQDXWtz1VP36gCMC4xnfPrZFw2/I9uLZi6u2aXs7ZdGWkNpcbQcAU0LX2XYYxeF/YBLwIYs0twndjnY4H/BgAA//95CrBYRwImwgAAAABJRU5ErkJggg==",jS="data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eDuckDB%3c/title%3e%3cpath%20d='M12%200C5.363%200%200%205.363%200%2012s5.363%2012%2012%2012%2012-5.363%2012-12S18.637%200%2012%200zM9.502%207.03a4.974%204.974%200%200%201%204.97%204.97%204.974%204.974%200%200%201-4.97%204.97A4.974%204.974%200%200%201%204.532%2012a4.974%204.974%200%200%201%204.97-4.97zm6.563%203.183h2.351c.98%200%201.787.782%201.787%201.762s-.807%201.789-1.787%201.789h-2.351v-3.551z'/%3e%3c/svg%3e",qS="data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eGoogle%20BigQuery%3c/title%3e%3cpath%20d='M5.676%2010.595h2.052v5.244a5.892%205.892%200%200%201-2.052-2.088v-3.156zm18.179%2010.836a.504.504%200%200%201%200%20.708l-1.716%201.716a.504.504%200%200%201-.708%200l-4.248-4.248a.206.206%200%200%201-.007-.007c-.02-.02-.028-.045-.043-.066a10.736%2010.736%200%200%201-6.334%202.065C4.835%2021.599%200%2016.764%200%2010.799S4.835%200%2010.8%200s10.799%204.835%2010.799%2010.8c0%202.369-.772%204.553-2.066%206.333.025.017.052.028.074.05l4.248%204.248zm-5.028-10.632a8.015%208.015%200%201%200-8.028%208.028h.024a8.016%208.016%200%200%200%208.004-8.028zm-4.86%204.98a6.002%206.002%200%200%200%202.04-2.184v-1.764h-2.04v3.948zm-4.5.948c.442.057.887.08%201.332.072.4.025.8.025%201.2%200V7.692H9.468v9.035z'/%3e%3c/svg%3e",zS=""+new URL("iceberg-COKYXo-A.png",import.meta.url).href,FS="data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eMotherDuck%3c/title%3e%3cg%20transform='scale(0.85)%20translate(0,%202)'%3e%3cpath%20fill='%23ff9538'%20d='M1.71%2015.86s7.45%205.32%207.89%205.59c.44.27%201.08.33%201.64.11.56-.22.98-.71%201.11-1.21s1.85-9.49%201.85-9.49c.02-.12.07-.48-.13-.83-.27-.47-.86-.71-1.38-.57-.42.12-.64.44-.7.55-.09.17-.26.45-.57.7-.24.19-.47.3-.58.34-.96.38-2.02.06-2.61-.72-.38-.48-1.04-.67-1.64-.43-.6.24-.94.84-.89%201.45.11.98-.44%201.94-1.4%202.32-.51.21-1.06.21-1.54.05-.12-.03-.51-.12-.89.09-.48.26-.74.84-.61%201.37.09.39.38.62.48.69z'%20/%3e%3cpath%20fill='%23ff9538'%20d='M14.12%204.21s2.65%208.76%202.83%209.24c.19.48.66.92%201.23%201.09.58.16%201.21.03%201.62-.28.41-.31%207.25-6.39%207.25-6.39.09-.08.35-.34.4-.74.07-.53-.25-1.09-.75-1.29-.4-.16-.78-.04-.89%200-.18.08-.48.2-.88.2-.3.01-.55-.05-.67-.08-.99-.28-1.64-1.18-1.63-2.16-.01-.61-.42-1.17-1.04-1.35-.62-.18-1.26.09-1.59.6-.51.84-1.53%201.27-2.52.99-.53-.15-.96-.48-1.25-.91-.07-.09-.33-.4-.76-.48-.54-.09-1.1.22-1.32.71-.16.37-.08.72-.04.84z'%20/%3e%3c/g%3e%3c/svg%3e",BS="data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eMySQL%3c/title%3e%3cpath%20d='M16.405%205.501c-.115%200-.193.014-.274.033v.013h.014c.054.104.146.18.214.273.054.107.1.214.154.32l.014-.015c.094-.066.14-.172.14-.333-.04-.047-.046-.094-.08-.14-.04-.067-.126-.1-.18-.153zM5.77%2018.695h-.927a50.854%2050.854%200%2000-.27-4.41h-.008l-1.41%204.41H2.45l-1.4-4.41h-.01a72.892%2072.892%200%2000-.195%204.41H0c.055-1.966.192-3.81.41-5.53h1.15l1.335%204.064h.008l1.347-4.064h1.095c.242%202.015.384%203.86.428%205.53zm4.017-4.08c-.378%202.045-.876%203.533-1.492%204.46-.482.716-1.01%201.073-1.583%201.073-.153%200-.34-.046-.566-.138v-.494c.11.017.24.026.386.026.268%200%20.483-.075.647-.222.197-.18.295-.382.295-.605%200-.155-.077-.47-.23-.944L6.23%2014.615h.91l.727%202.36c.164.536.233.91.205%201.123.4-1.064.678-2.227.835-3.483zm12.325%204.08h-2.63v-5.53h.885v4.85h1.745zm-3.32.135l-1.016-.5c.09-.076.177-.158.255-.25.433-.506.648-1.258.648-2.253%200-1.83-.718-2.746-2.155-2.746-.704%200-1.254.232-1.65.697-.43.508-.646%201.256-.646%202.245%200%20.972.19%201.686.574%202.14.35.41.877.615%201.583.615.264%200%20.506-.033.725-.098l1.325.772.36-.622zM15.5%2017.588c-.225-.36-.337-.94-.337-1.736%200-1.393.424-2.09%201.27-2.09.443%200%20.77.167.977.5.224.362.336.936.336%201.723%200%201.404-.424%202.108-1.27%202.108-.445%200-.77-.167-.978-.5zm-1.658-.425c0%20.47-.172.856-.516%201.156-.344.3-.803.45-1.384.45-.543%200-1.064-.172-1.573-.515l.237-.476c.438.22.833.328%201.19.328.332%200%20.593-.073.783-.22a.754.754%200%2000.3-.615c0-.33-.23-.61-.648-.845-.388-.213-1.163-.657-1.163-.657-.422-.307-.632-.636-.632-1.177%200-.45.157-.81.47-1.085.315-.278.72-.415%201.22-.415.512%200%20.98.136%201.4.41l-.213.476a2.726%202.726%200%2000-1.064-.23c-.283%200-.502.068-.654.206a.685.685%200%2000-.248.524c0%20.328.234.61.666.85.393.215%201.187.67%201.187.67.433.305.648.63.648%201.168zm9.382-5.852c-.535-.014-.95.04-1.297.188-.1.04-.26.04-.274.167.055.053.063.14.11.214.08.134.218.313.346.407.14.11.28.216.427.31.26.16.555.255.81.416.145.094.293.213.44.313.073.05.12.14.214.172v-.02c-.046-.06-.06-.147-.105-.214-.067-.067-.134-.127-.2-.193a3.223%203.223%200%2000-.695-.675c-.214-.146-.682-.35-.77-.595l-.013-.014c.146-.013.32-.066.46-.106.227-.06.435-.047.67-.106.106-.027.213-.06.32-.094v-.06c-.12-.12-.21-.283-.334-.395a8.867%208.867%200%2000-1.104-.823c-.21-.134-.476-.22-.697-.334-.08-.04-.214-.06-.26-.127-.12-.146-.19-.34-.275-.514a17.69%2017.69%200%2001-.547-1.163c-.12-.262-.193-.523-.34-.763-.69-1.137-1.437-1.826-2.586-2.5-.247-.14-.543-.2-.856-.274-.167-.008-.334-.02-.5-.027-.11-.047-.216-.174-.31-.235-.38-.24-1.364-.76-1.644-.072-.18.434.267.862.422%201.082.115.153.26.328.34.5.047.116.06.235.107.356.106.294.207.622.347.897.073.14.153.287.247.413.054.073.146.107.167.227-.094.136-.1.334-.154.5-.24.757-.146%201.693.194%202.25.107.166.362.534.703.393.3-.12.234-.5.32-.835.02-.08.007-.133.048-.187v.015c.094.188.188.367.274.555.206.328.566.668.867.895.16.12.287.328.487.402v-.02h-.015c-.043-.058-.1-.086-.154-.133a3.445%203.445%200%2001-.35-.4%208.76%208.76%200%2001-.747-1.218c-.11-.21-.202-.436-.29-.643-.04-.08-.04-.2-.107-.24-.1.146-.247.273-.32.453-.127.288-.14.642-.188%201.01-.027.007-.014%200-.027.014-.214-.052-.287-.274-.367-.46-.2-.475-.233-1.238-.06-1.785.047-.14.247-.582.167-.716-.042-.127-.174-.2-.247-.303a2.478%202.478%200%2001-.24-.427c-.16-.374-.24-.788-.414-1.162-.08-.173-.22-.354-.334-.513-.127-.18-.267-.307-.368-.52-.033-.073-.08-.194-.027-.274.014-.054.042-.075.094-.09.088-.072.335.022.422.062.247.1.455.194.662.334.094.066.195.193.315.226h.14c.214.047.455.014.655.073.355.114.675.28.962.46a5.953%205.953%200%20012.085%202.286c.08.154.115.295.188.455.14.33.313.663.455.982.14.315.275.636.476.897.1.14.502.213.682.286.133.06.34.115.46.188.23.14.454.3.67.454.11.076.443.243.463.378z'/%3e%3c/svg%3e",by=""+new URL("postgresql-q8VEBKGg.svg",import.meta.url).href,HS="data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eAmazon%20Redshift%3c/title%3e%3cpath%20d='M16.639%209.932a.822.822%200%200%201-.822-.82.823.823%200%200%201%201.645%200c0%20.452-.37.82-.823.82m-2.086%204.994a.823.823%200%200%201-.822-.822.822.822%200%200%201%201.645%200%20.822.822%200%200%201-.823.822m-5.004-.833a.822.822%200%201%201%20.002-1.644.822.822%200%200%201-.002%201.644m-2.083%204.578a.823.823%200%200%201-.823-.82.823.823%200%200%201%201.645%200c0%20.452-.37.82-.822.82m9.173-11.236a1.68%201.68%200%200%200-1.68%201.676c0%20.566.285%201.066.718%201.37l-.782%201.982a1.674%201.674%200%200%200-1.923%201.104l-1.753-.398a1.675%201.675%200%200%200-3.348.103c0%20.432.169.823.438%201.12l-.764%201.79c-.028-.001-.053-.008-.08-.008a1.68%201.68%200%200%200-1.68%201.676%201.68%201.68%200%200%200%203.36%200c0-.593-.312-1.112-.778-1.41l.674-1.579c.161.052.33.088.508.088.661%200%201.228-.386%201.502-.94l1.856.42a1.68%201.68%200%200%200%203.327-.325c0-.5-.224-.943-.574-1.25l.822-2.083c.053.005.104.016.157.016a1.68%201.68%200%200%200%201.68-1.676%201.68%201.68%200%200%200-1.68-1.676M12%2023.145c-4.17%200-7.286-1.252-7.286-2.37V4.79C6.14%205.938%209.131%206.547%2012%206.547c2.869%200%205.86-.609%207.286-1.756v15.983c0%201.12-3.116%202.37-7.286%202.37M12%20.856c4.293%200%207.286%201.274%207.286%202.419%200%201.143-2.993%202.418-7.286%202.418-4.293%200-7.286-1.275-7.286-2.418C4.714%202.129%207.707.855%2012%20.855m8.143%202.419C20.143%201.147%2015.947%200%2012%200%208.052%200%203.857%201.147%203.857%203.274l.002.01h-.002v17.49C3.857%2022.87%208.052%2024%2012%2024c3.947%200%208.143-1.13%208.143-3.226V3.284h-.002l.002-.01'/%3e%3c/svg%3e",VS="data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eSnowflake%3c/title%3e%3cpath%20d='M24%203.459c0%20.646-.418%201.18-1.141%201.18-.723%200-1.142-.534-1.142-1.18%200-.647.419-1.18%201.142-1.18.723%200%201.141.533%201.141%201.18zm-.228%200c0-.533-.38-.951-.913-.951s-.913.38-.913.95c0%20.533.38.952.913.952.57%200%20.913-.419.913-.951zm-1.37-.533h.495c.266%200%20.456.152.456.38%200%20.153-.076.229-.19.305l.19.266v.038h-.266l-.19-.266h-.229v.266h-.266zm.495.228h-.229v.267h.229c.114%200%20.152-.038.152-.114.038-.077-.038-.153-.152-.153zM7.602%2012.4c.038-.151.076-.304.076-.456%200-.114-.038-.228-.038-.342-.114-.343-.304-.647-.646-.838l-4.87-2.777c-.685-.38-1.56-.152-1.94.533-.381.685-.153%201.56.532%201.94l2.701%201.56-2.701%201.56c-.685.38-.913%201.256-.533%201.94.38.685%201.256.914%201.94.533l4.832-2.777c.343-.267.571-.533.647-.876zm1.332%202.626c-.266-.038-.57.038-.837.19l-4.832%202.777c-.685.38-.913%201.256-.532%201.94.38.686%201.255.914%201.94.533l2.701-1.56v3.12c0%20.8.647%201.408%201.446%201.408.799%200%201.407-.647%201.407-1.408v-5.592c0-.761-.57-1.37-1.293-1.408zm4.946-6.088c.266.038.57-.038.837-.19l4.832-2.777c.685-.38.913-1.256.532-1.94-.38-.686-1.255-.914-1.94-.533l-2.701%201.56V1.975c0-.799-.647-1.408-1.446-1.408-.799%200-1.446.609-1.446%201.408V7.53c0%20.76.609%201.37%201.332%201.407zM3.265%205.97l4.832%202.777c.266.152.533.19.837.19.723-.038%201.331-.684%201.331-1.407V1.975c0-.799-.646-1.408-1.407-1.408-.799%200-1.446.647-1.446%201.408v3.12l-2.701-1.56c-.685-.38-1.56-.152-1.94.533-.419.646-.19%201.521.494%201.902zm9.093%206.011a.412.412%200%2000-.114-.266l-.57-.571a.346.346%200%2000-.267-.114.412.412%200%2000-.266.114l-.571.57a.411.411%200%2000-.114.267c0%20.076.038.19.114.267l.57.57a.345.345%200%2000.267.114c.076%200%20.19-.038.266-.114l.571-.57a.412.412%200%2000.114-.267zm1.598.533L11.94%2014.53c-.039.038-.153.114-.229.114h-.608a.411.411%200%2001-.267-.114L8.82%2012.514a.408.408%200%2001-.076-.229v-.608c0-.076.038-.19.114-.267l2.016-2.016a.41.41%200%2001.267-.114h.608a.41.41%200%2001.267.114l2.016%202.016a.347.347%200%2001.114.267v.608c-.076.077-.114.19-.19.229zm5.593%205.44l-4.832-2.777c-.266-.152-.57-.19-.837-.152-.723.038-1.332.684-1.332%201.408v5.554c0%20.8.647%201.408%201.408%201.408.799%200%201.446-.647%201.446-1.408v-3.12l2.7%201.56c.686.38%201.561.152%201.941-.533.419-.646.19-1.521-.494-1.94zm2.549-7.533l-2.701%201.56%202.7%201.56c.686.38.914%201.256.533%201.94-.38.685-1.255.913-1.94.533l-4.832-2.778a1.644%201.644%200%2001-.647-.798c-.037-.153-.076-.305-.076-.457%200-.114.039-.228.039-.342.114-.343.342-.647.646-.837l4.832-2.778c.685-.38%201.56-.152%201.94.533.457.609.19%201.484-.494%201.864'/%3e%3c/svg%3e",$S="data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eApache%20Spark%3c/title%3e%3cpath%20d='M10.812%200c-.425.013-.845.215-1.196.605a3.593%203.593%200%2000-.493.722c-.355.667-.425%201.415-.556%202.143a551.9%20551.9%200%2000-.726%204.087c-.027.16-.096.227-.244.273C5.83%208.386%204.06%208.94%202.3%209.514c-.387.125-.773.289-1.114.506-1.042.665-1.196%201.753-.415%202.71.346.422.79.715%201.284.936%201.1.49%202.202.976%203.3%201.47.019.01.036.013.053.019h-.004l1.306.535c0%20.023.002.045%200%20.073-.2%202.03-.39%204.063-.58%206.095-.04.419-.012.831.134%201.23.317.87%201.065%201.148%201.881.701.372-.204.666-.497.937-.818%201.372-1.623%202.746-3.244%204.113-4.872.111-.133.205-.15.363-.098.349.117.697.231%201.045.347h.001c.02.012.045.02.073.03l.142.042c1.248.416%202.68.775%203.929%201.19.4.132.622.164%201.045.098.311-.048.592-.062.828-.236.602-.33.995-.957.988-1.682-.005-.427-.154-.813-.35-1.186-.82-1.556-1.637-3.113-2.461-4.666-.078-.148-.076-.243.037-.375%201.381-1.615%202.756-3.236%204.133-4.855.272-.32.513-.658.653-1.058.308-.878-.09-1.57-1-1.741a2.783%202.783%200%2000-1.235.069c-1.974.521-3.947%201.041-5.918%201.57-.175.047-.26.015-.355-.144a353.08%20353.08%200%2000-2.421-4.018%204.61%204.61%200%2000-.652-.849c-.371-.37-.802-.549-1.227-.536zm.172%203.703a.592.592%200%2001.189.211c.87%201.446%201.742%202.89%202.609%204.338.07.118.135.16.277.121%201.525-.41%203.052-.813%204.579-1.217.367-.098.735-.193%201.103-.289a.399.399%200%2001-.1.2c-1.259%201.48-2.516%202.962-3.779%204.438-.11.13-.12.22-.04.37.937%201.803%201.768%203.309%202.498%204.76l-3.696-1.019c-.538-.18-1.077-.358-1.615-.539-.163-.055-.25-.03-.36.1-1.248%201.488-2.504%202.97-3.759%204.454a.398.398%200%2001-.18.132c.035-.378.068-.757.104-1.136.149-1.572.297-3.144.451-4.716-.03-.318.117-.405-.322-.545-1.493-.593-3.346-1.321-4.816-1.905a.595.595%200%2001.24-.134c1.797-.57%203.595-1.14%205.394-1.705.127-.04.199-.092.211-.233.013-.148.05-.294.076-.441.241-1.363.483-2.726.726-4.088.068-.386.14-.771.21-1.157z'/%3e%3c/svg%3e",WS="data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eSQLite%3c/title%3e%3cpath%20d='M21.678.521c-1.032-.92-2.28-.55-3.513.544a8.71%208.71%200%200%200-.547.535c-2.109%202.237-4.066%206.38-4.674%209.544.237.48.422%201.093.544%201.561a13.044%2013.044%200%200%201%20.164.703s-.019-.071-.096-.296l-.05-.146a1.689%201.689%200%200%200-.033-.08c-.138-.32-.518-.995-.686-1.289-.143.423-.27.818-.376%201.176.484.884.778%202.4.778%202.4s-.025-.099-.147-.442c-.107-.303-.644-1.244-.772-1.464-.217.804-.304%201.346-.226%201.478.152.256.296.698.422%201.186.286%201.1.485%202.44.485%202.44l.017.224a22.41%2022.41%200%200%200%20.056%202.748c.095%201.146.273%202.13.5%202.657l.155-.084c-.334-1.038-.47-2.399-.41-3.967.09-2.398.642-5.29%201.661-8.304%201.723-4.55%204.113-8.201%206.3-9.945-1.993%201.8-4.692%207.63-5.5%209.788-.904%202.416-1.545%204.684-1.931%206.857.666-2.037%202.821-2.912%202.821-2.912s1.057-1.304%202.292-3.166c-.74.169-1.955.458-2.362.629-.6.251-.762.337-.762.337s1.945-1.184%203.613-1.72C21.695%207.9%2024.195%202.767%2021.678.521m-18.573.543A1.842%201.842%200%200%200%201.27%202.9v16.608a1.84%201.84%200%200%200%201.835%201.834h9.418a22.953%2022.953%200%200%201-.052-2.707c-.006-.062-.011-.141-.016-.2a27.01%2027.01%200%200%200-.473-2.378c-.121-.47-.275-.898-.369-1.057-.116-.197-.098-.31-.097-.432%200-.12.015-.245.037-.386a9.98%209.98%200%200%201%20.234-1.045l.217-.028c-.017-.035-.014-.065-.031-.097l-.041-.381a32.8%2032.8%200%200%201%20.382-1.194l.2-.019c-.008-.016-.01-.038-.018-.053l-.043-.316c.63-3.28%202.587-7.443%204.8-9.791.066-.069.133-.128.198-.194Z'/%3e%3c/svg%3e",US="data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eSupabase%3c/title%3e%3cpath%20d='M11.9%201.036c-.015-.986-1.26-1.41-1.874-.637L.764%2012.05C-.33%2013.427.65%2015.455%202.409%2015.455h9.579l.113%207.51c.014.985%201.259%201.408%201.873.636l9.262-11.653c1.093-1.375.113-3.403-1.645-3.403h-9.642z'/%3e%3c/svg%3e",KS="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3c!--%20Generated%20by%20Pixelmator%20Pro%203.6.17%20--%3e%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Option2SymbolB'%3e%3cg%20id='Layer1-2'%3e%3cg%20id='Group'%20opacity='0.4'%3e%3cpath%20id='Path'%20fill='%23d53c97'%20stroke='none'%20d='M%2017.016802%2012.188573%20C%2017.016802%209.607646%2015.86018%207.293022%2014.039526%205.731081%20C%2013.942595%205.70038%2013.844628%205.671406%2013.745972%205.645189%20C%2013.131133%205.809095%2012.54265%206.059378%2011.998103%206.388559%20C%2013.964327%207.575191%2015.281006%209.730104%2015.281006%2012.188573%20C%2015.279476%2014.563734%2014.033739%2016.764488%2011.998103%2017.988243%20C%2012.542634%2018.317537%2013.131119%2018.567936%2013.745972%2018.731958%20C%2013.844628%2018.705742%2013.942595%2018.67642%2014.039526%2018.645721%20C%2015.86018%2017.084126%2017.016802%2014.769501%2017.016802%2012.188573%20Z'/%3e%3cpath%20id='path1'%20fill='%23d53c97'%20stroke='none'%20d='M%2013.897406%205.609659%20L%2013.894991%205.60759%20C%2013.844973%205.619663%2013.7953%205.631737%2013.745972%205.645189%20C%2013.79599%205.631737%2013.847043%205.622078%2013.897406%205.609659%20Z'/%3e%3cpath%20id='path2'%20fill='%23d53c97'%20stroke='none'%20d='M%201.735796%2012.188573%20C%201.735796%209.164728%203.728925%206.59622%206.470945%205.729357%20C%207.554634%204.797861%208.856011%204.155121%2010.254373%203.860756%20C%209.680216%203.740549%209.095179%203.679977%208.508574%203.68%20C%203.816888%203.68%20-0%207.496887%20-0%2012.188573%20C%20-0%2016.880259%203.816888%2020.697147%208.508574%2020.697147%20C%209.0952%2020.697229%209.680255%2020.636539%2010.254373%2020.516048%20C%208.855971%2020.221794%207.554568%2019.579041%206.470945%2018.647446%20C%203.728925%2017.780582%201.735796%2015.213453%201.735796%2012.188573%20Z'/%3e%3cpath%20id='path3'%20fill='%23d53c97'%20stroke='none'%20d='M%2013.745972%2018.731958%20C%2013.7953%2018.745068%2013.844973%2018.757484%2013.894991%2018.769558%20C%2013.894991%2018.769558%2013.896715%2018.769558%2013.897406%2018.767488%20C%2013.847043%2018.754379%2013.79599%2018.745411%2013.745972%2018.731958%20Z'/%3e%3c/g%3e%3cpath%20id='path4'%20fill='%23ff3b65'%20stroke='none'%20d='M%2020.508402%2012.188573%20C%2020.508402%209.606611%2019.351088%207.290262%2017.5294%205.729357%20C%2016.301817%205.342468%2014.989366%205.313629%2013.745972%205.646223%20C%2016.636665%206.418224%2018.772606%209.058484%2018.772606%2012.189609%20C%2018.772606%2015.320732%2016.636665%2017.960991%2013.745972%2018.731958%20C%2014.98947%2019.064316%2016.301983%2019.034998%2017.5294%2018.647446%20C%2019.419907%2017.034296%2020.508638%2014.673781%2020.508402%2012.188573%20Z'/%3e%3cpath%20id='path5'%20fill='%23ff3b65'%20stroke='none'%20d='M%209.962543%2018.647446%20C%207.220525%2017.780582%205.227395%2015.213453%205.227395%2012.188573%20C%205.227395%209.163693%207.220525%206.59622%209.962543%205.729357%20C%2011.046233%204.797861%2012.34761%204.155121%2013.745972%203.860756%20C%2013.171818%203.74053%2012.586779%203.679956%2012.000173%203.68%20C%207.308832%203.68%203.491599%207.496887%203.491599%2012.188573%20C%203.491599%2016.880259%207.308487%2020.697147%2012.000173%2020.697147%20C%2012.586799%2020.697247%2013.171857%2020.636557%2013.745972%2020.516048%20C%2012.34757%2020.221794%2011.046167%2019.579041%209.962543%2018.647446%20Z'/%3e%3cpath%20id='path6'%20fill='%23383838'%20stroke='none'%20d='M%2015.491772%203.68%20C%2010.800431%203.68%206.983198%207.496887%206.983198%2012.188573%20C%206.983198%2016.880259%2010.800086%2020.697147%2015.491772%2020.697147%20C%2020.183456%2020.697147%2024%2016.880259%2024%2012.188573%20C%2024%207.496887%2020.183456%203.68%2015.491772%203.68%20Z%20M%2022.264549%2012.188573%20C%2022.264549%2015.923018%2019.226215%2018.961351%2015.491772%2018.961351%20C%2011.757326%2018.961351%208.718994%2015.923018%208.718994%2012.188573%20C%208.718994%208.454128%2011.757326%205.415796%2015.491772%205.415796%20C%2019.226215%205.415796%2022.264549%208.454128%2022.264549%2012.188573%20Z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",QS=""+new URL("trino-DFsJbQoT.svg",import.meta.url).href,GS=Kt(zr(),1),JS={sqlite:WS,duckdb:jS,motherduck:FS,postgres:by,postgresql:by,mysql:BS,snowflake:VS,databricks:AS,clickhouse:LS,timeplus:KS,bigquery:qS,trino:QS,iceberg:zS,datafusion:IS,pyspark:$S,redshift:HS,supabase:US};jm=e=>{let n=(0,GS.c)(11),{name:i,className:a}=e,s=JS[i.toLowerCase()];if(!s){let p;n[0]===a?p=n[1]:(p=fu("mt-0.5",a),n[0]=a,n[1]=p);let h;return n[2]===p?h=n[3]:(h=(0,B.jsx)(as,{className:p}),n[2]=p,n[3]=h),h}let c;n[4]!==a||n[5]!==s?(c=fu("invert-[.5] dark:invert-[.7]",a,s.endsWith(".png")&&"brightness-100 dark:brightness-100 invert-0 dark:invert-0"),n[4]=a,n[5]=s,n[6]=c):c=n[6];let f;return n[7]!==i||n[8]!==c||n[9]!==s?(f=(0,B.jsx)("img",{src:s,alt:i,className:c}),n[7]=i,n[8]=c,n[9]=s,n[10]=f):f=n[10],f};var Zd=Kt(zr(),1);const XS=e=>{let n=(0,Zd.c)(27),{selectedEngine:i,onChange:a}=e,s=Un(Nu),c=[],f=[];for(let[pe,xe]of s.entries())cs.has(pe)?c.push(xe):f.push(xe);let p=VR(),h=i&&!s.has(i),v;n[0]!==s||n[1]!==a||n[2]!==p?(v=pe=>{if(pe===wy){window.open(_y,"_blank");return}let xe=s.get(pe);xe&&(p(),a(xe.name),Wg(xe.name))},n[0]=s,n[1]=a,n[2]=p,n[3]=v):v=n[3];let w=v,_=nE,C=AR,E;n[4]===Symbol.for("react.memo_cache_sentinel")?(E=(0,B.jsx)(ZS,{children:(0,B.jsx)(OR,{placeholder:"Select an engine"})}),n[4]=E):E=n[4];let R=NR,L=MR,H;n[5]===Symbol.for("react.memo_cache_sentinel")?(H=(0,B.jsx)(DR,{children:"Database connections"}),n[5]=H):H=n[5];let W;n[6]!==h||n[7]!==i?(W=h&&(0,B.jsx)(cm,{value:i,children:(0,B.jsxs)("div",{className:"flex items-center gap-1 opacity-50",children:[(0,B.jsx)(xm,{className:"h-3 w-3"}),(0,B.jsx)("span",{className:"truncate",children:Gg(i)})]})},i),n[6]=h,n[7]=i,n[8]=W):W=n[8];let U=_(f),A=f.length>0&&(0,B.jsx)(b2,{}),G=_(c),he;n[9]===Symbol.for("react.memo_cache_sentinel")?(he=(0,B.jsx)(b2,{}),n[9]=he):he=n[9];let N;n[10]===Symbol.for("react.memo_cache_sentinel")?(N=(0,B.jsx)(cm,{className:"text-muted-foreground",value:wy,children:(0,B.jsxs)("a",{className:"flex items-center gap-1",href:_y,target:"_blank",rel:"noreferrer",children:[(0,B.jsx)(jR,{className:"h-3 w-3"}),(0,B.jsx)("span",{children:"How to add a database connection"})]})}),n[10]=N):N=n[10];let j;n[11]!==L||n[12]!==H||n[13]!==W||n[14]!==U||n[15]!==A||n[16]!==G?(j=(0,B.jsxs)(L,{children:[H,W,U,A,G,he,N]}),n[11]=L,n[12]=H,n[13]=W,n[14]=U,n[15]=A,n[16]=G,n[17]=j):j=n[17];let V;n[18]!==R||n[19]!==j?(V=(0,B.jsx)(R,{children:j}),n[18]=R,n[19]=j,n[20]=V):V=n[20];let de;return n[21]!==C||n[22]!==w||n[23]!==i||n[24]!==V||n[25]!==E?(de=(0,B.jsx)("div",{className:"flex flex-row gap-1 items-center",children:(0,B.jsxs)(C,{value:i,onValueChange:w,children:[E,V]})}),n[21]=C,n[22]=w,n[23]=i,n[24]=V,n[25]=E,n[26]=de):de=n[26],de};var wy="__help__",_y="http://docs.marimo.io/guides/working_with_data/sql/#connecting-to-a-custom-database";const YS=()=>{let e=(0,Zd.c)(16),{sqlMode:n,setSQLMode:i}=dS(),a;e[0]!==i||e[1]!==n?(a=()=>{let E=n==="validate"?"default":"validate";E==="default"&&UC(),i(E)},e[0]=i,e[1]=n,e[2]=a):a=e[2];let s=a,c=rE,f=iE,p;e[3]===n?p=e[4]:(p=f(n),e[3]=n,e[4]=p);let h;e[5]===n?h=e[6]:(h=c(n),e[5]=n,e[6]=h);let v=n==="validate"?"Validate":"Default",w;e[7]===v?w=e[8]:(w=(0,B.jsx)("span",{className:"ml-1",children:v}),e[7]=v,e[8]=w);let _;e[9]!==s||e[10]!==h||e[11]!==w?(_=(0,B.jsxs)(Jb,{variant:"ghost",size:"sm",onClick:s,className:"h-5 px-1.5 text-xs border-border shadow-none hover:bg-accent",children:[h,w]}),e[9]=s,e[10]=h,e[11]=w,e[12]=_):_=e[12];let C;return e[13]!==p||e[14]!==_?(C=(0,B.jsx)("div",{className:"flex flex-row gap-1 items-center",children:(0,B.jsx)(dm,{delayDuration:300,content:p,children:_})}),e[13]=p,e[14]=_,e[15]=C):C=e[15],C};var ZS=e=>{let n=(0,Zd.c)(6),i,a;n[0]===e?(i=n[1],a=n[2]):({children:i,...a}=e,n[0]=e,n[1]=i,n[2]=a);let s;return n[3]!==i||n[4]!==a?(s=(0,B.jsx)(LR,{className:"text-xs border-border shadow-none! ring-0! h-5 px-1.5 hover:bg-accent transition-colors",...a,children:i}),n[3]=i,n[4]=a,n[5]=s):s=n[5],s};function eE(e){return e.source!=="iceberg"}function tE(e){return(0,B.jsx)(cm,{value:e.name,children:(0,B.jsxs)("div",{className:"flex items-center gap-1",children:[(0,B.jsx)(jm,{className:"h-3 w-3",name:e.dialect}),(0,B.jsx)("span",{className:"truncate ml-0.5",children:Gg(e.display_name)})]})},e.name)}function nE(e){return e=e.filter(eE),e.map(tE)}function rE(e){return e==="validate"?(0,B.jsx)(Kd,{className:"h-3 w-3"}):(0,B.jsx)(Ud,{className:"h-3 w-3"})}function iE(e){return e==="validate"?(0,B.jsxs)("div",{className:"text-xs",children:[(0,B.jsxs)("div",{className:"font-semibold mb-1 flex flex-row items-center gap-1",children:[(0,B.jsx)(Kd,{className:"h-3 w-3"}),"Validate Mode"]}),(0,B.jsx)("p",{children:"Queries are validated as you write them"})]}):(0,B.jsxs)("div",{className:"text-xs",children:[(0,B.jsxs)("div",{className:"font-semibold mb-1 flex flex-row items-center gap-1",children:[(0,B.jsx)(Ud,{className:"h-3 w-3"}),"Default Mode"]}),(0,B.jsx)("p",{children:"Standard editing"})]})}var xy=Kt(zr(),1),ky=()=>{let e=(0,xy.c)(1),n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,B.jsx)("div",{className:"h-4 border-r border-border"}),e[0]=n):n=e[0],n};const oE=e=>{let n=(0,xy.c)(98),{view:i}=e,a;n[0]===Symbol.for("react.memo_cache_sentinel")?(a={minWidth:50},n[0]=a):a=n[0];let{spanProps:s,inputProps:c}=OS(a),f;n[1]===i.state?f=n[2]:(f=i.state.field(Er),n[1]=i.state,n[2]=f);let p=f,h;n[3]===Symbol.for("react.memo_cache_sentinel")?(h=(0,B.jsx)("div",{}),n[3]=h):h=n[3];let v=h,w=!1,_;n[4]===i?_=n[5]:(_=L=>{i.dispatch({effects:ju.of(L),changes:{from:0,to:i.state.doc.length,insert:i.state.doc.toString()}})},n[4]=i,n[5]=_);let C=_;if(p instanceof Hu){let L;n[6]===i.state?L=n[7]:(L=i.state.field(ii),n[6]=i.state,n[7]=L);let H=L;w=!0;let W;n[8]===C?W=n[9]:(W=De=>{let Ne=Qm(De.currentTarget.value,!1);De.currentTarget.value=Ne,C({dataframeName:Ne})},n[8]=C,n[9]=W);let U=W,A;n[10]!==C||n[11]!==i?(A=De=>{C({engine:De}),mS(i,De)},n[10]=C,n[11]=i,n[12]=A):A=n[12];let G=A,he;n[13]===Symbol.for("react.memo_cache_sentinel")?(he=(0,B.jsx)("span",{className:"select-none",children:"Output variable: "}),n[13]=he):he=n[13];let N;n[14]===c?N=n[15]:(N=De=>{var Ne;(Ne=c.onChange)==null||Ne.call(c,De)},n[14]=c,n[15]=N);let j;n[16]===U?j=n[17]:(j=De=>{De.key==="Enter"&&De.shiftKey&&U(De)},n[16]=U,n[17]=j);let V;n[18]!==c||n[19]!==H.dataframeName||n[20]!==U||n[21]!==j||n[22]!==N?(V=(0,B.jsx)("input",{...c,defaultValue:H.dataframeName,onChange:N,onBlur:U,onKeyDown:j,className:"min-w-14 w-auto border border-border rounded px-1 focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring"}),n[18]=c,n[19]=H.dataframeName,n[20]=U,n[21]=j,n[22]=N,n[23]=V):V=n[23];let de;n[24]===s?de=n[25]:(de=(0,B.jsx)("span",{...s}),n[24]=s,n[25]=de);let pe;n[26]!==V||n[27]!==de?(pe=(0,B.jsxs)("label",{className:"flex gap-2 items-center",children:[he,V,de]}),n[26]=V,n[27]=de,n[28]=pe):pe=n[28];let xe;n[29]!==H.engine||n[30]!==G?(xe=(0,B.jsx)(XS,{selectedEngine:H.engine,onChange:G}),n[29]=H.engine,n[30]=G,n[31]=xe):xe=n[31];let Z;n[32]===H.engine?Z=n[33]:(Z=H.engine==="__marimo_duckdb"&&(0,B.jsx)(YS,{}),n[32]=H.engine,n[33]=Z);let be;n[34]===i?be=n[35]:(be=async()=>{await z_(i)},n[34]=i,n[35]=be);let Ee;n[36]===Symbol.for("react.memo_cache_sentinel")?(Ee=(0,B.jsx)(pm,{className:"h-3 w-3"}),n[36]=Ee):Ee=n[36];let re;n[37]===be?re=n[38]:(re=(0,B.jsx)(dm,{content:"Format SQL",children:(0,B.jsx)(Jb,{variant:"text",size:"icon",onClick:be,children:Ee})}),n[37]=be,n[38]=re);let oe;n[39]===Symbol.for("react.memo_cache_sentinel")?(oe=(0,B.jsx)(ky,{}),n[39]=oe):oe=n[39];let le;n[40]===C?le=n[41]:(le=De=>{C({showOutput:!De.target.checked})},n[40]=C,n[41]=le);let K=!H.showOutput,Ae;n[42]!==le||n[43]!==K?(Ae=(0,B.jsx)("input",{type:"checkbox",onChange:le,checked:K}),n[42]=le,n[43]=K,n[44]=Ae):Ae=n[44];let Qe;n[45]===Symbol.for("react.memo_cache_sentinel")?(Qe=(0,B.jsx)("span",{className:"select-none",children:"Hide output"}),n[45]=Qe):Qe=n[45];let ut;n[46]===Ae?ut=n[47]:(ut=(0,B.jsxs)("label",{className:"flex items-center gap-2",children:[Ae,Qe]}),n[46]=Ae,n[47]=ut);let Fe;n[48]!==Z||n[49]!==re||n[50]!==ut?(Fe=(0,B.jsxs)("div",{className:"flex items-center gap-2 ml-auto",children:[Z,re,oe,ut]}),n[48]=Z,n[49]=re,n[50]=ut,n[51]=Fe):Fe=n[51];let We;n[52]!==pe||n[53]!==xe||n[54]!==Fe?(We=(0,B.jsxs)("div",{className:"flex flex-1 gap-2 items-center",children:[pe,xe,Fe]}),n[52]=pe,n[53]=xe,n[54]=Fe,n[55]=We):We=n[55],v=We}if(p instanceof Ku){w=!0;let L,H,W,U,A,G,he,N,j,V;if(n[56]!==C||n[57]!==i.state){let{quotePrefix:le}=i.state.field(ii);H=le,H===void 0&&(H="r",C({quotePrefix:H})),V=(K,Ae)=>{typeof Ae=="boolean"&&C({quotePrefix:NS({currentQuotePrefix:H,checked:Ae,prefix:K})})},W="flex flex-row w-full justify-end gap-1.5 items-center",N="flex items-center gap-1.5",n[68]===Symbol.for("react.memo_cache_sentinel")?(j=(0,B.jsx)("span",{children:"r"}),n[68]=j):j=n[68],L=Al,A="Toggle raw string",G="w-3 h-3",he=H.includes("r"),U=K=>{V("r",K)},n[56]=C,n[57]=i.state,n[58]=L,n[59]=H,n[60]=W,n[61]=U,n[62]=A,n[63]=G,n[64]=he,n[65]=N,n[66]=j,n[67]=V}else L=n[58],H=n[59],W=n[60],U=n[61],A=n[62],G=n[63],he=n[64],N=n[65],j=n[66],V=n[67];let de;n[69]!==L||n[70]!==U||n[71]!==A||n[72]!==G||n[73]!==he?(de=(0,B.jsx)(L,{"aria-label":A,className:G,checked:he,onCheckedChange:U}),n[69]=L,n[70]=U,n[71]=A,n[72]=G,n[73]=he,n[74]=de):de=n[74];let pe;n[75]!==de||n[76]!==N||n[77]!==j?(pe=(0,B.jsxs)("div",{className:N,children:[j,de]}),n[75]=de,n[76]=N,n[77]=j,n[78]=pe):pe=n[78];let xe;n[79]===Symbol.for("react.memo_cache_sentinel")?(xe=(0,B.jsx)("span",{children:"f"}),n[79]=xe):xe=n[79];let Z;n[80]===H?Z=n[81]:(Z=H.includes("f"),n[80]=H,n[81]=Z);let be;n[82]===V?be=n[83]:(be=le=>{V("f",le)},n[82]=V,n[83]=be);let Ee;n[84]!==Z||n[85]!==be?(Ee=(0,B.jsxs)("div",{className:"flex items-center gap-1.5",children:[xe,(0,B.jsx)(Al,{"aria-label":"Toggle f-string",className:"w-3 h-3",checked:Z,onCheckedChange:be})]}),n[84]=Z,n[85]=be,n[86]=Ee):Ee=n[86];let re;n[87]===Symbol.for("react.memo_cache_sentinel")?(re=(0,B.jsx)(dm,{content:(0,B.jsx)(MS,{}),children:(0,B.jsx)(Tu,{className:"w-3 h-3"})}),n[87]=re):re=n[87];let oe;n[88]!==W||n[89]!==pe||n[90]!==Ee?(oe=(0,B.jsxs)("div",{className:W,children:[pe,Ee,re]}),n[88]=W,n[89]=pe,n[90]=Ee,n[91]=oe):oe=n[91],v=oe}let E;n[92]===w?E=n[93]:(E=w&&(0,B.jsx)(ky,{}),n[92]=w,n[93]=E);let R;return n[94]!==v||n[95]!==p.type||n[96]!==E?(R=(0,B.jsx)(HR,{children:(0,B.jsxs)("div",{className:"flex justify-between items-center gap-4 pl-2 pt-2",children:[v,E,p.type]})}),n[94]=v,n[95]=p.type,n[96]=E,n[97]=R):R=n[97],R};var ef=new pu;Gu=na.define(),Er=hu.define({create(){return ur.python},update(e,n){for(let i of n.effects)if(i.is(Gu))return i.value;return e},provide:e=>em.from(e,n=>n.type==="python"?null:i=>B_(i,oE))});function aE(){let e=kS(),n=(i,a)=>{let s=e[a%e.length];return s.isSupported(i)?s:n(i,a+1)};return[ra.of([{key:"F4",preventDefault:!0,run:i=>{let a=i.state.field(Er),s=e.findIndex(f=>f.type===a.type),c=n(i.state.doc.toString(),s+1);return a===c?!1:(Cy({view:i,nextLanguage:c,opts:{keepCodeAsIs:!1}}),!0)}}])]}function Cy({view:e,nextLanguage:n,opts:i}){let a=e.state.field(Er),s=e.state.doc.toString(),c=e.state.facet(Lh),f=e.state.facet(Ah),p=e.state.facet(hd),h=e.state.facet(gd),v=e.state.facet(Ih),w=e.state.field(ii),_=e.state.selection.main.head,C;if(i.keepCodeAsIs)C=s,a.type!==n.type&&(w={...n.defaultMetadata});else{let[E,R]=a.transformOut(s,w),[L,H,W]=n.transformIn(E);_+=R,_-=H,_=nm(_,0,L.length),C=L,w=W}e.dispatch({effects:[Gu.of(n),Bu.of(w),ef.reconfigure(n.getExtension(h,c,f,p,v)),Zu.reconfigure([]),ma.of(!0)],changes:i.keepCodeAsIs?void 0:{from:0,to:e.state.doc.length,insert:C},selection:i.keepCodeAsIs?void 0:dn.cursor(_)}),e.dispatch({effects:[Zu.reconfigure([GT()])]}),n.type==="sql"&&hS(e)}jw=function(e){let{placeholderType:n,completionConfig:i,hotkeys:a,cellId:s,lspConfig:c}=e;return[aE(),ef.of(ur.python.getExtension(s,i,a,n,c)),Er,ii]},Ww=function(e){return sE(ri({state:e}).trim())};function sE(e){return e?ur.markdown.isSupported(e)?ur.markdown:ur.sql.isSupported(e)?ur.sql:ur.python:ur.python}Jm=function(e,n){e.state.field(Er).type!==n.language&&Cy({view:e,nextLanguage:ur[n.language],opts:{keepCodeAsIs:n.keepCodeAsIs??!1}})},yw=function(e,{completionConfig:n,hotkeysProvider:i,lspConfig:a}){let s=e.state.field(Er),c=e.state.facet(hd),f=e.state.facet(gd);return ef.reconfigure(s.getExtension(f,n,i,c,a))},ri=function(e,n,i){let a=e.state.field(Er),s=e.state.field(ii),c=e.state.doc.toString();return n===void 0?a.transformOut(c,s)[0]:a.transformOut(c.slice(n,i),s)[0]},us=function(e,n){let[i]=e.state.field(Er).transformIn(n);return Xu(e,i),i};function lE(e){let n=e.state.selection.main.head,i=e.state.doc.toString(),a=i.length>0&&i[n-1]===`
135
+ `,s=i.length>0&&i[n]===`
136
+ `,c=a?n-1:n,f=s?n+1:n;return{beforeCursorCode:ri(e,0,c),afterCursorCode:ri(e,f)}}var cE=["marimo-carousel","marimo-tabs","marimo-accordion"];function uE(e){if(typeof DOMParser>"u")return null;let n=[],i=new DOMParser().parseFromString(e,"text/html").querySelectorAll("h1, h2, h3");for(let a of Array.from(i)){let s=a.textContent;if(cE.some(f=>a.closest(f))||!s)continue;let c=Number.parseInt(a.tagName[1],10);n.push({name:s,level:c,by:Em(a)})}return{items:n}}Em=function(e){let n=e.id;if(n)return{id:n};let i=e.textContent;return{path:`//${e.tagName}[contains(., "${i}")]`}};function dE(e){return{items:e.filter(Boolean).flatMap(n=>n.items)}}fm=function(e){if(e==null||e.mimetype!=="text/html"&&e.mimetype!=="text/markdown"||e.data==null)return null;try{return En(typeof e.data=="string","expected string"),uE(e.data)}catch{return Pe.error("Failed to parse outline"),null}},mw=function(e){return e==null?!1:e.items.some(n=>n.level<=3)};function Sy(e,n){let i=f=>f.items.length===0?7:Math.min(...f.items.map(p=>p.level)),a=n[e];if(a==null||a.items.length===0)return Pe.warn("Failed to find a starting outline"),null;let s=i(a),c=e+1;for(;c<n.length;){let f=n[c];if(f&&i(f)<=s)return[e,c-1];c++}return[e,n.length-1]}Lu=function(e){return e==="application/vnd.marimo+error"||e==="application/vnd.marimo+traceback"};function fE(e,n){if(typeof window>"u")return;let i=`__marimo__${n}`;window[i]&&Pe.warn(`Overwriting existing debug object ${i}`),window[i]=e}var pE={markdown:!0,wasm_layouts:!1,rtc_v2:!1,performant_table_charts:!1,chat_modes:!1,cache_panel:!1,external_agents:!1};Au=function(e){var n,i;return((i=(n=Zp())==null?void 0:n.experimental)==null?void 0:i[e])??pE[e]};function mE(e,n){let i=Zp();i.experimental=i.experimental??{},i.experimental[e]=n,Ri().saveUserConfig({config:i})}j2=({feature:e,children:n})=>Au(e)?n:null,fE(mE,"setFeatureFlag"),Fw=Wu("marimo:rtc:username","",ed),wm=ym(()=>Au("rtc_v2"));let tf,Ey,nf,ys;gm=class nd{static fromMilliseconds(n){return n==null?null:new nd(n)}static fromSeconds(n){return n==null?null:new nd(n*1e3)}static now(){return new nd(Date.now())}constructor(n){this.ms=n}toMilliseconds(){return this.ms}toSeconds(){return this.ms/1e3}},tf=(So=class{constructor(){Te(this,"lines",[""]);Te(this,"cursor",{row:0,col:0})}ensureLine(n){for(;this.lines.length<=n;)this.lines.push("")}moveCursor(n,i){let a=this.cursor.row;this.cursor.row=Math.max(0,this.cursor.row+n),this.cursor.col=Math.max(0,this.cursor.col+i),this.ensureLine(this.cursor.row),n<0&&this.cursor.row<a&&this.lines.splice(this.cursor.row+1)}setCursor(n,i){this.cursor.row=Math.max(0,n),this.cursor.col=Math.max(0,i),this.ensureLine(this.cursor.row)}writeChar(n){this.ensureLine(this.cursor.row);let i=this.lines[this.cursor.row].padEnd(this.cursor.col," ");this.lines[this.cursor.row]=i.slice(0,this.cursor.col)+n+i.slice(this.cursor.col+1),this.cursor.col++}writeString(n){if(n.length===0)return;this.ensureLine(this.cursor.row);let i=this.lines[this.cursor.row].padEnd(this.cursor.col," ");this.lines[this.cursor.row]=i.slice(0,this.cursor.col)+n+i.slice(this.cursor.col+n.length),this.cursor.col+=n.length}control(n){switch(n){case`
137
+ `:this.cursor.row++,this.cursor.col=0,this.ensureLine(this.cursor.row);break;case"\r":this.cursor.col=0;break}}handleEscape(n){let i=So.ESCAPE_REGEX.exec(n);if(!i)return;let a=i[1].split(";").map(s=>s===""?1:Number.parseInt(s,10));switch(i[2]){case"A":this.moveCursor(-a[0],0);break;case"B":this.moveCursor(a[0],0);break;case"C":this.moveCursor(0,a[0]);break;case"D":this.moveCursor(0,-a[0]);break;case"H":this.setCursor(a[0]-1||0,a[1]-1||0);break;case"J":a[0]===2&&(this.lines=[""],this.setCursor(0,0));break;case"K":switch(this.ensureLine(this.cursor.row),a[0]){case 0:this.lines[this.cursor.row]=this.lines[this.cursor.row].slice(0,this.cursor.col);break;case 1:{let s=this.lines[this.cursor.row].length;this.lines[this.cursor.row]=" ".repeat(this.cursor.col)+this.lines[this.cursor.row].slice(this.cursor.col,s);break}case 2:this.lines[this.cursor.row]="";break}break}}render(){return this.lines.join(`
138
+ `)}},Te(So,"ESCAPE_REGEX",/\u001B\[([0-9;]*)([A-DJKH])/u),So),Ey=class{constructor(){Te(this,"ESC_REGEX",/\u001B\[[0-9;]*[A-Za-z]/gu)}parse(e){let n=[],i=0;for(let a of e.matchAll(this.ESC_REGEX)){let s=a.index??0;s>i&&n.push({type:"text",value:e.slice(i,s)}),n.push({type:"escape",value:a[0]}),i=s+a[0].length}return i<e.length&&n.push({type:"text",value:e.slice(i)}),n}},nf=class{constructor(){Te(this,"parser",new Ey);Te(this,"buffer",new tf)}reduce(e){return this.reset(),this.append(e),this.render()}append(e){let n=this.parser.parse(e);if(n.length===1&&n[0].type==="text"){let i=n[0].value;if(!this.hasControlChars(i)){this.buffer.writeString(i);return}}for(let i of n)i.type==="text"?this.processText(i.value):this.buffer.handleEscape(i.value)}reset(){this.buffer=new tf}render(){return this.buffer.render()}hasControlChars(e){for(let n of e)if(n<" ")return!0;return!1}processText(e){let n=0,i=e.length;for(let a=0;a<i;a++){let s=e[a];if(s===`
139
+ `||s==="\r"){if(a>n){let c=e.slice(n,a),f=this.filterControlChars(c);f.length>0&&this.buffer.writeString(f)}this.buffer.control(s),n=a+1}else if(s<" "){if(a>n){let c=e.slice(n,a);c.length>0&&this.buffer.writeString(c)}n=a+1}}if(n<i){let a=e.slice(n),s=this.filterControlChars(a);s.length>0&&this.buffer.writeString(s)}}filterControlChars(e){let n=!1;for(let a of e)if(a<" "){n=!0;break}if(!n)return e;let i="";for(let a of e)a>=" "&&(i+=a);return i}},ys=class rh{constructor(n,i,a,s){Te(this,"ansiReducer",new nf);this.mimetype=n,this.channel=i,this.timestamp=a,this.ansiReducer=s,this._data=this.ansiReducer.render()}get data(){return this._data}static create(n){let i=new nf;return i.append(n.data),new rh(n.mimetype,n.channel,n.timestamp,i)}appendData(n){return this.ansiReducer.append(n),new rh(this.mimetype,this.channel,this.timestamp,this.ansiReducer)}toJSON(){return{mimetype:this.mimetype,channel:this.channel,timestamp:this.timestamp,data:this.data}}};function hE(e,n=5e3){let i=[...e];if(i.length<2)return Ry(i.map(yE),n);let a=i[i.length-1],s=i[i.length-2];return gE(a,s)&&(Ty(a),Ty(s),i[i.length-2]=vE(s,a),i.pop()),Ry(i,n)}function gE(e,n){let i=e.mimetype==="text/plain"&&n.mimetype==="text/plain";if(!i)return!1;let a=e.channel===n.channel,s=e.channel!=="stdin";return i&&a&&s}function yE(e){return e instanceof ys?e:typeof e.data=="string"?ys.create(e):e}function vE(e,n){return e instanceof ys?e.appendData(n.data):ys.create(e).appendData(n.data)}function Ty(e){En(typeof e.data=="string","expected string output")}function Ry(e,n){let i=0,a;for(a=e.length-1;a>=0&&i<n;a--){let p=e[a];p.mimetype==="text/plain"?(En(typeof p.data=="string","expected string"),i+=p.data.split(`
140
+ `).length):i++}if(i<n)return e;let s=a+1,c={channel:"stderr",mimetype:"text/html",data:`<pre>Streaming output truncated to last ${n} lines.
141
+ </pre>`,timestamp:-1},f=e[s];if(f.mimetype==="text/plain"){En(typeof f.data=="string","expected string");let p=f.data.split(`
142
+ `),h=n-(i-p.length);return[c,{...f,data:p.slice(-h).join(`
143
+ `)},...e.slice(s+1)]}return[c,...e.slice(s+1)]}function bE(e,n){let i={...e};switch(n.status){case"queued":i.interrupted=!1,i.errored=!1,i.runElapsedTimeMs=null,i.debuggerActive=!1;break;case"running":i.interrupted=!1,e.stopped&&(i.output=null),i.status==="queued"&&(i.consoleOutputs=[]),i.stopped=!1,i.runStartTimestamp=n.timestamp,i.lastRunStartTimestamp=n.timestamp;break;case"idle":e.runStartTimestamp&&(i.runElapsedTimeMs=gm.fromSeconds((n.timestamp??0)-e.runStartTimestamp).toMilliseconds(),i.runStartTimestamp=null,i.staleInputs=!1),!e.lastRunStartTimestamp&&n.timestamp&&(i.lastRunStartTimestamp=n.timestamp),i.debuggerActive=!1;break;case null:break;case"disabled-transitively":break;case void 0:break;default:Dl(n.status)}i.output=n.output??i.output,i.staleInputs=n.stale_inputs??i.staleInputs,i.status=n.status??i.status,i.serialization=n.serialization;let a=!1;n.output!=null&&n.output.mimetype==="application/vnd.marimo+error"&&((i.status==="queued"||i.status==="running")&&(i.status="idle"),En(Array.isArray(n.output.data),"Expected error output data to be an array"),n.output.data.some(p=>p.type==="interruption")?(i.interrupted=!0,a=!0):n.output.data.some(p=>p.type.includes("ancestor"))?i.stopped=!0:i.errored=!0);let s=e.consoleOutputs;a&&(i.debuggerActive=!1,s=s.map(p=>p.channel==="stdin"?{...p,response:p.response??""}:p));let c=n.console;c!=null&&(s=hE(Array.isArray(c)?c:[...s,c])),i.consoleOutputs=s,i.outline=fm(i.output);let f=[n.console].flat().filter(Boolean).filter(p=>p.channel==="pdb");return f.length>0&&f.some(p=>p.data==="start")&&(i.debuggerActive=!0),i}function wE(e){let n={...e};return e.status!=="disabled-transitively"&&(n.status="queued"),n.interrupted=!1,n.errored=!1,n.runElapsedTimeMs=null,n.debuggerActive=!1,n}Om=function(e){return e==="running"||e==="queued"},cw=function(e,n){let{status:i,output:a,runStartTimestamp:s,interrupted:c,staleInputs:f}=e;if(c)return!1;if(n)return!0;let p=Om(i),h=i==="running"&&a!==null&&s!==null&&(a.timestamp??0)>s;return p&&!h?!0:f};function _E(e,n){return IR(e*1e3,n==null?void 0:n.in)}var Dy=!1;function xE(e){var a;let n=[],i=[e.console].filter(Boolean).flat();for(let s of i)if(s.mimetype==="text/plain"){En(typeof s.data=="string","expected string");let c=s.channel==="stderr"||s.channel==="marimo-error";switch(s.channel){case"stdout":case"stderr":case"marimo-error":n.push({timestamp:s.timestamp||Date.now(),level:c?"stderr":"stdout",message:s.data,cellId:e.cell_id});break;default:break}}if(n.forEach(Oy.log),i.length===0&&Lu((a=e.output)==null?void 0:a.mimetype)&&Array.isArray(e.output.data)){e.output.data.forEach(c=>{Oy.log({level:"stderr",cellId:e.cell_id,timestamp:e.timestamp??0,message:JSON.stringify(c)})});let s=e.output.data.some(c=>c.type==="internal");!Dy&&s&&(Dy=!0,wu({title:"An internal error occurred",description:"See console for details.",className:"text-xs text-background bg-(--red-10) py-2 pl-3 *:flex *:gap-3"}))}return n}var Oy={log:e=>{let n=e.level==="stdout"?"gray":e.level==="stderr"?"red":"orange",i=e.level.toUpperCase();console.log(`%c[${i}]`,`color:${n}; padding:2px 0; border-radius:2px; font-weight:bold`,`[${vm(e.timestamp)}]`,`(${e.cellId}) ${e.message}`)}};vm=function(e){try{return _E(e).toLocaleTimeString(void 0,{hour12:!0,hour:"numeric",minute:"numeric",second:"numeric"})}catch{return""}},k2=function(e,n){var a,s;let i=(s=(a=e.get(mt).cellHandles[n])==null?void 0:a.current)==null?void 0:s.editorView;i?i.focus():Pe.warn(`[CellFocusManager] focusCellEditor: element not found: ${n}`)},n_=function(e){let n=document.getElementById(cr.create(e));n?rf(n):Pe.warn(`[CellFocusManager] focusCell: element not found: ${e}`)},Nm=function(){return document.activeElement instanceof HTMLElement&&document.activeElement.classList.contains("marimo-cell")};function rf(e){try{e.focus()}catch{Pe.warn("[CellFocusManager] element may not be focusable",e)}}Rm=function(e,n){let{retries:i,delay:a,initialDelay:s=0}=n,c=0,f=()=>{if(c<i){try{if(e())return}catch(p){Pe.error(`Error executing function on attempt ${c+1}, retrying`,{error:p})}c++,setTimeout(f,a)}};s>0?setTimeout(f,s):f()};function vs({cellId:e,cell:n,isCodeHidden:i,codeFocus:a,variableName:s}){var f;if(!n)return;let c=document.getElementById(cr.create(e));if(!c){Pe.warn("scrollCellIntoView: element not found");return}if(Nm()){rf(c);return}if(i)rf(c);else{let p=(f=n.current)==null?void 0:f.editorView;if(!p){Pe.warn("scrollCellIntoView: editor not found",e);return}if(p.hasFocus)return;if(Rm(()=>(p.focus(),p.hasFocus),{retries:5,delay:20}),a==="top")p.dispatch({selection:{anchor:0,head:0}});else if(a==="bottom"){let h=p.state.doc.line(p.state.doc.lines);p.dispatch({selection:{anchor:h.from,head:h.from}})}else s&&Cu(p,s)}c.scrollIntoView({behavior:"smooth",block:"nearest"})}B2=function(e){let n=document.getElementById(cr.create(e));if(!n){Pe.warn("scrollCellIntoView: element not found");return}n.classList.add("focus-outline"),setTimeout(()=>{n.classList.remove("focus-outline")},2e3),n.scrollIntoView({behavior:"smooth",block:"center"})};function kE(){let e=document.getElementById("App");e==null||e.scrollTo({top:e.scrollHeight,behavior:"smooth"})}function CE(){var e;(e=document.getElementById("App"))==null||e.scrollTo({top:0,behavior:"smooth"})}Cr=function({id:e,name:n="_",code:i="",lastCodeRun:a=null,lastExecutionTime:s=null,edited:c=!1,config:f,serializedEditorState:p=null}){return{id:e,config:f||{hide_code:!1,disabled:!1,column:null},name:n,code:i,edited:c,lastCodeRun:a,lastExecutionTime:s,serializedEditorState:p}};function SE(e){return{hide_code:!1,disabled:!1,column:null,...e}}Sr=function(e){return{outline:null,output:null,consoleOutputs:[],status:"idle",staleInputs:!1,interrupted:!1,errored:!1,stopped:!1,runElapsedTimeMs:null,runStartTimestamp:null,lastRunStartTimestamp:null,debuggerActive:!1,...e}};var of=Kt(zr(),1);function Py(e){let n={column:0,hide_code:!1,disabled:!1};return{...e,cellData:{[ls]:Cr({id:ls,config:n}),...e.cellData},cellRuntime:{[ls]:Sr(),...e.cellRuntime},cellHandles:{[ls]:(0,At.createRef)(),...e.cellHandles}}}function EE(){return Py({cellIds:zl.from([]),cellData:{},cellRuntime:{},cellHandles:{},history:[],scrollKey:null,cellLogs:[],untouchedNewCells:new Set})}let TE,RE,Ny;({reducer:TE,createActions:RE,useActions:Ny,valueAtom:mt}=Tl(EE,{createNewCell:(e,n)=>{var R;let{cellId:i,before:a,code:s,lastCodeRun:c=null,lastExecutionTime:f=null,autoFocus:p=!0,skipIfCodeExists:h=!1,hideCode:v=!1}=n,w,_;if(h){for(let L of e.cellIds.inOrderIds)if(((R=e.cellData[L])==null?void 0:R.code)===s)return e}if(i==="__end__"){let L=e.cellIds.atOrThrow(0);w=L.id,_=L.length}else if(typeof i=="string"){let L=e.cellIds.findWithId(i);w=L.id,_=L.topLevelIds.indexOf(i)}else if(i.type==="__end__"){let L=e.cellIds.get(i.columnId)||e.cellIds.atOrThrow(0);w=L.id,_=L.length}else throw Error("Invalid cellId");let C=n.newCellId||fo.create(),E=a?_:_+1;return{...e,cellIds:e.cellIds.insertId(C,w,E),cellData:{...e.cellData,[C]:Cr({id:C,code:s,lastCodeRun:c,config:SE({hide_code:v}),lastExecutionTime:f,edited:!!s&&s!==c})},cellRuntime:{...e.cellRuntime,[C]:Sr()},cellHandles:{...e.cellHandles,[C]:(0,At.createRef)()},scrollKey:p?C:null,untouchedNewCells:v?new Set([...e.untouchedNewCells,C]):e.untouchedNewCells}},moveCell:(e,n)=>{let{cellId:i,before:a,direction:s}=n;if(a!==void 0&&s!==void 0&&Pe.warn("Both before and direction specified for moveCell. Ignoring one."),s){let p=e.cellIds.findWithId(i),h=e.cellIds.indexOf(p),v=s==="left"?h-1:h+1,w=e.cellIds.at(v);return w?{...e,cellIds:e.cellIds.moveAcrossColumns(p.id,i,w.id,void 0),scrollKey:i}:e}let c=e.cellIds.findWithId(i),f=c.indexOfOrThrow(i);return a&&f===0?{...e,cellIds:e.cellIds.moveWithinColumn(c.id,f,0),scrollKey:i}:!a&&f===c.length-1?{...e,cellIds:e.cellIds.moveWithinColumn(c.id,f,c.length-1),scrollKey:i}:a?{...e,cellIds:e.cellIds.moveWithinColumn(c.id,f,f-1),scrollKey:i}:{...e,cellIds:e.cellIds.moveWithinColumn(c.id,f,f+1),scrollKey:i}},dropCellOverCell:(e,n)=>{let{cellId:i,overCellId:a}=n,s=e.cellIds.findWithId(i),c=e.cellIds.findWithId(a),f=s.indexOfOrThrow(i),p=c.indexOfOrThrow(a);return s.id===c.id?f===p?e:{...e,cellIds:e.cellIds.moveWithinColumn(s.id,f,p),scrollKey:null}:{...e,cellIds:e.cellIds.moveAcrossColumns(s.id,i,c.id,a),scrollKey:null}},dropCellOverColumn:(e,n)=>{let{cellId:i,columnId:a}=n,s=e.cellIds.findWithId(i);return{...e,cellIds:e.cellIds.moveAcrossColumns(s.id,i,a,void 0)}},dropOverNewColumn:(e,n)=>{let{cellId:i}=n;return{...e,cellIds:e.cellIds.moveToNewColumn(i)}},moveColumn:(e,n)=>n.column===n.overColumn?e:{...e,cellIds:e.cellIds.moveColumn(n.column,n.overColumn)},focusCell:(e,n)=>{let i=e.cellIds.findWithId(n.cellId);if(i.length===0)return e;let{cellId:a,where:s}=n,c=i.indexOfOrThrow(a),f;f=s==="before"?nm(c-1,0,i.length-1):s==="after"?nm(c+1,0,i.length-1):c;let p=i.atOrThrow(f);return vs({cellId:p,cell:e.cellHandles[p],isCodeHidden:bs(e,p),codeFocus:s==="after"?"top":"bottom",variableName:void 0}),e},focusTopCell:e=>{let n=e.cellIds.getColumns().at(0);if(n===void 0||n.length===0)return e;let i=n.first();return vs({cellId:i,cell:e.cellHandles[i],isCodeHidden:bs(e,i),codeFocus:void 0,variableName:void 0}),CE(),e},focusBottomCell:e=>{let n=e.cellIds.getColumns().at(-1);if(n===void 0||n.length===0)return e;let i=n.last();return vs({cellId:i,cell:e.cellHandles[i],isCodeHidden:bs(e,i),codeFocus:void 0,variableName:void 0}),kE(),e},sendToTop:(e,n)=>{let i=e.cellIds.findWithId(n.cellId);if(i.length===0)return e;let{cellId:a,scroll:s=!0}=n,c=i.indexOfOrThrow(a);return c===0?e:{...e,cellIds:e.cellIds.moveWithinColumn(i.id,c,0),scrollKey:s?a:null}},sendToBottom:(e,n)=>{let i=e.cellIds.findWithId(n.cellId);if(i.length===0)return e;let{cellId:a,scroll:s=!0}=n,c=i.indexOfOrThrow(a),f=i.length-1;return c===f?e:{...e,cellIds:e.cellIds.moveWithinColumn(i.id,c,f),scrollKey:s?a:null}},addColumn:(e,n)=>{let i=fo.create();return{...e,cellIds:e.cellIds.addColumn(n.columnId,[i]),cellData:{...e.cellData,[i]:Cr({id:i})},cellRuntime:{...e.cellRuntime,[i]:Sr()},cellHandles:{...e.cellHandles,[i]:(0,At.createRef)()},scrollKey:i}},addColumnBreakpoint:(e,n)=>{let{cellId:i}=n;return e.cellIds.getColumns()[0].inOrderIds[0]===i?e:{...e,cellIds:e.cellIds.insertBreakpoint(i)}},deleteColumn:(e,n)=>{let{columnId:i}=n;return{...e,cellIds:e.cellIds.delete(i)}},mergeAllColumns:e=>({...e,cellIds:e.cellIds.mergeAllColumns()}),compactColumns:e=>({...e,cellIds:e.cellIds.compact()}),deleteCell:(e,n)=>{var h,v;let i=n.cellId;if(e.cellIds.hasOnlyOneId())return e;let a=e.cellIds.findWithId(i),s=a.indexOfOrThrow(i),c=s===0?1:s-1,f=null;a.length>1&&(f=a.atOrThrow(c));let p=(v=(h=e.cellHandles[i].current)==null?void 0:h.editorView)==null?void 0:v.state.toJSON({history:$T});return p.doc=e.cellData[i].code,PE(i),{...e,cellIds:e.cellIds.deleteById(i),history:[...e.history,{name:e.cellData[i].name,serializedEditorState:p,column:a.id,index:s,isSetupCell:i===dr}],scrollKey:f}},undoDeleteCell:e=>{if(e.history.length===0)return e;let{name:n,serializedEditorState:i={doc:""},column:a,index:s,isSetupCell:c}=e.history[e.history.length-1],f=c?dr:fo.create(),p=Cr({id:f,name:n,code:i.doc,edited:i.doc.trim().length>0,serializedEditorState:i});return{...e,cellIds:e.cellIds.insertId(f,a,s),cellData:{...e.cellData,[f]:p},cellRuntime:{...e.cellRuntime,[f]:Sr()},cellHandles:{...e.cellHandles,[f]:(0,At.createRef)()},history:e.history.slice(0,-1)}},clearSerializedEditorState:(e,n)=>{let{cellId:i}=n;return _s({state:e,cellId:i,cellReducer:a=>({...a,serializedEditorState:null})})},updateCellCode:(e,n)=>{let{cellId:i,code:a,formattingChange:s}=n;return e.cellData[i]?_s({state:e,cellId:i,cellReducer:c=>s?{...c,code:a,lastCodeRun:c.edited?c.lastCodeRun:a}:{...c,code:a,edited:a.trim()!==c.lastCodeRun}}):e},updateCellName:(e,n)=>{let{cellId:i,name:a}=n;return _s({state:e,cellId:i,cellReducer:s=>({...s,name:a})})},updateCellConfig:(e,n)=>{let{cellId:i,config:a}=n;return _s({state:e,cellId:i,cellReducer:s=>({...s,config:{...s.config,...a}})})},prepareForRun:(e,n)=>_s({state:ws({state:e,cellId:n.cellId,cellReducer:i=>wE(i)}),cellId:n.cellId,cellReducer:i=>({...i,edited:!1,lastCodeRun:i.code.trim()})}),handleCellMessage:(e,n)=>{let i=n.cell_id,a=ws({state:e,cellId:i,cellReducer:s=>bE(s,n)});return{...a,cellLogs:[...a.cellLogs,...xE(n)]}},setCellIds:(e,n)=>{if(fT(e.cellIds.inOrderIds,n.cellIds))return e;let i={...e.cellData},a={...e.cellRuntime},s={...e.cellHandles};for(let c of n.cellIds)c in e.cellData||(i[c]=Cr({id:c})),c in e.cellRuntime||(a[c]=Sr()),c in e.cellHandles||(s[c]=(0,At.createRef)());return{...e,cellIds:zl.fromWithPreviousShape(n.cellIds,e.cellIds),cellData:i,cellRuntime:a,cellHandles:s}},setCellCodes:(e,n)=>{En(n.codes.length===n.ids.length,"Expected codes and ids to have the same length");let i={...e},a=({cell:s,code:c,cellId:f})=>{if(!s)return Cr({id:f,code:c,lastCodeRun:n.codeIsStale?null:c,edited:n.codeIsStale&&c.trim().length>0});let p=n.codeIsStale?s.lastCodeRun:c,h=p?p.trim()!==c.trim():!!c;if(s.code.trim()===c.trim())return{...s,code:c,edited:h,lastCodeRun:p};if(!wm()){let v=i.cellHandles[f].current;v!=null&&v.editorViewOrNull&&us(v.editorViewOrNull,c)}return{...s,code:c,edited:h,lastCodeRun:p}};for(let[s,c]of h_(n.ids,n.codes))s===void 0||c===void 0||(i={...i,cellData:{...i.cellData,[s]:a({cell:i.cellData[s],code:c,cellId:s})}});return i},setStdinResponse:(e,n)=>{let{cellId:i,response:a,outputIndex:s}=n;return ws({state:e,cellId:i,cellReducer:c=>{let f=[...c.consoleOutputs],p=f[s];return p.channel==="stdin"?(f[s]={channel:"stdin",mimetype:p.mimetype,data:p.data,timestamp:p.timestamp,response:a},{...c,interrupted:!1,consoleOutputs:f}):(Pe.warn("Expected stdin output"),c)}})},setCells:(e,n)=>{let i=Object.fromEntries(n.map(s=>[s.id,s])),a=Object.fromEntries(n.map(s=>[s.id,Sr()]));return Py({...e,cellIds:zl.fromIdsAndColumns(n.map(s=>[s.id,s.config.column])),cellData:i,cellRuntime:a,cellHandles:Object.fromEntries(n.map(s=>[s.id,(0,At.createRef)()]))})},moveToNextCell:(e,n)=>{let{cellId:i,before:a,noCreate:s=!1}=n;if(i==="__scratch__")return e;let c=e.cellIds.findWithId(i),f=c.indexOfOrThrow(i),p=a?f-1:f+1,h=p===c.length,v=p===-1;if(h&&!s){let w=fo.create();return{...e,cellIds:e.cellIds.insertId(w,c.id,p),cellData:{...e.cellData,[w]:Cr({id:w})},cellRuntime:{...e.cellRuntime,[w]:Sr()},cellHandles:{...e.cellHandles,[w]:(0,At.createRef)()},scrollKey:w}}if(v&&!s){let w=fo.create();return{...e,cellIds:e.cellIds.insertId(w,c.id,0),cellData:{...e.cellData,[w]:Cr({id:w})},cellRuntime:{...e.cellRuntime,[w]:Sr()},cellHandles:{...e.cellHandles,[w]:(0,At.createRef)()},scrollKey:w}}if((h||v)&&s)return e;if(p>=0&&p<c.length){let w=c.atOrThrow(p);vs({cellId:w,cell:e.cellHandles[w],isCodeHidden:bs(e,w),codeFocus:a?"bottom":"top",variableName:void 0})}return e},markTouched:(e,n)=>{let{cellId:i}=n;if(e.untouchedNewCells.has(i)){let a=new Set(e.untouchedNewCells);return a.delete(i),{...e,untouchedNewCells:a}}return e},scrollToTarget:e=>{let n=e.scrollKey;if(n===null)return e;let i=e.cellIds.findWithId(n),a=i.indexOfOrThrow(n),s=a===i.length-1?i.last():i.atOrThrow(a);return vs({cellId:s,cell:e.cellHandles[s],isCodeHidden:bs(e,s),codeFocus:void 0,variableName:void 0}),{...e,scrollKey:null}},foldAll:e=>(N_(Object.values(e.cellHandles).map(n=>{var i;return(i=n.current)==null?void 0:i.editorView})),e),unfoldAll:e=>(M_(Object.values(e.cellHandles).map(n=>{var i;return(i=n.current)==null?void 0:i.editorView})),e),clearLogs:e=>({...e,cellLogs:[]}),collapseCell:(e,n)=>{let{cellId:i}=n,a=e.cellIds.findWithId(i),s=a.topLevelIds.map(p=>e.cellRuntime[p].outline),c=Sy(a.indexOfOrThrow(i),s);if(!c)return e;let f=a.atOrThrow(c[1]);return{...e,cellIds:e.cellIds.transformWithCellId(i,p=>p.collapse(i,f)),scrollKey:i}},expandCell:(e,n)=>{let{cellId:i}=n;return{...e,cellIds:e.cellIds.transformWithCellId(i,a=>a.expand(i)),scrollKey:i}},collapseAllCells:e=>({...e,cellIds:e.cellIds.transformAll(n=>{let i=n.topLevelIds.map(h=>e.cellRuntime[h].outline),a=[...n.nodes],s=[],c=[],f=a.length-1;for(;f>=0;){let h=Sy(f,i);if(h){let v=f,w=h[1],_=s.find(R=>R.start<=w&&R.end===w);_&&(w=_.start),s.push({start:v,end:w});let C=n.atOrThrow(v),E=n.atOrThrow(w);c.push({id:C,until:E})}else c.push(null);f--}let p=c.reverse();return n.collapseAll(p)})}),expandAllCells:e=>({...e,cellIds:e.cellIds.transformAll(n=>n.expandAll())}),showCellIfHidden:(e,n)=>{let{cellId:i}=n,a=e.cellIds.findWithId(i),s=a,c=a.findAndExpandDeep(i);return c.equals(s)?e:{...e,cellIds:e.cellIds.transformWithCellId(i,()=>c)}},splitCell:(e,n)=>{var w;let{cellId:i}=n,a=e.cellIds.findWithId(i),s=a.indexOfOrThrow(i),c=e.cellData[i],f=e.cellHandles[i].current;if((f==null?void 0:f.editorView)==null)return e;let{beforeCursorCode:p,afterCursorCode:h}=lE(f.editorView);us(f.editorView,p);let v=fo.create();return{...e,cellIds:e.cellIds.insertId(v,a.id,s+1),cellData:{...e.cellData,[i]:{...c,code:p,edited:!!p&&p.trim()!==((w=c.lastCodeRun)==null?void 0:w.trim())},[v]:Cr({id:v,code:h,edited:!!h})},cellRuntime:{...e.cellRuntime,[i]:{...e.cellRuntime[i],output:null,consoleOutputs:[]},[v]:Sr()},cellHandles:{...e.cellHandles,[v]:(0,At.createRef)()},scrollKey:v}},undoSplitCell:(e,n)=>{var f;let{cellId:i,snapshot:a}=n,s=e.cellData[i],c=e.cellHandles[i].current;return(c==null?void 0:c.editorView)==null?e:(us(c.editorView,a),{...e,cellIds:e.cellIds.transformWithCellId(i,p=>{let h=p.indexOfOrThrow(i)+1;return p.deleteAtIndex(h)}),cellData:{...e.cellData,[i]:{...s,code:a,edited:!!a&&(a==null?void 0:a.trim())!==((f=s.lastCodeRun)==null?void 0:f.trim())}},cellRuntime:{...e.cellRuntime,[i]:{...e.cellRuntime[i],output:null,consoleOutputs:[]}},cellHandles:{...e.cellHandles}})},clearCellOutput:(e,n)=>{let{cellId:i}=n;return ws({state:e,cellId:i,cellReducer:a=>({...a,output:null,consoleOutputs:[]})})},clearCellConsoleOutput:(e,n)=>{let{cellId:i}=n;return ws({state:e,cellId:i,cellReducer:a=>({...a,consoleOutputs:a.consoleOutputs.filter(s=>s.channel==="stdin"&&s.response==null)})})},clearAllCellOutputs:e=>{let n={...e.cellRuntime};for(let i of e.cellIds.inOrderIds)n[i]={...n[i],output:null,consoleOutputs:[]};return{...e,cellRuntime:n}},addSetupCellIfDoesntExist:(e,n)=>{let{code:i}=n;return i??(i="# Initialization code that runs before all other cells"),e.cellIds.setupCellExists()?{...e,scrollKey:dr}:{...e,cellIds:e.cellIds.insertId(dr,e.cellIds.atOrThrow(0).id,0),cellData:{...e.cellData,[dr]:Cr({id:dr,name:dr,code:i,edited:!!i})},cellRuntime:{...e.cellRuntime,[dr]:Sr()},cellHandles:{...e.cellHandles,[dr]:(0,At.createRef)()},scrollKey:dr}}}));function bs(e,n){return!!e.cellData[n].config.hide_code&&!e.untouchedNewCells.has(n)}function ws({state:e,cellId:n,cellReducer:i}){return n in e.cellRuntime?{...e,cellRuntime:{...e.cellRuntime,[n]:i(e.cellRuntime[n])}}:(Pe.warn(`Cell ${n} not found in state`),e)}function _s({state:e,cellId:n,cellReducer:i}){return n in e.cellData?{...e,cellData:{...e.cellData,[n]:i(e.cellData[n])}}:(Pe.warn(`Cell ${n} not found in state`),e)}Gw=function(e){let n=e.cellData,i={column:null};return e.cellIds.getColumns().length>1?e.cellIds.getColumns().flatMap((a,s)=>a.inOrderIds.map((c,f)=>{let p={...i};return f===0&&(p.column=s),{...n[c].config,...p}})):e.cellIds.getColumns().flatMap(a=>a.inOrderIds.map(s=>({...n[s].config,...i})))};let My;qu=Be(e=>e(mt).cellIds),hw=Be(e=>e(qu).hasOnlyOneId()),Dw=Be(e=>Bm(e(mt)).length>0),Rw=Be(e=>Am(e(mt)).length>0),Qw=Be(e=>q_(e(mt))),Xw=Be(e=>I_(e(mt))),Vu=Be(e=>{let{cellIds:n,cellRuntime:i,cellData:a}=e(mt);return n.inOrderIds.map(s=>{var p;let c=i[s],{name:f}=a[s];if(Lu((p=c.output)==null?void 0:p.mimetype)){En(Array.isArray(c.output.data),"Expected array data");let h=c.output.data.filter(v=>!v.type.includes("ancestor"));if(h.length>0)return{output:{...c.output,data:h},cellId:s,cellName:f}}return null}).filter(Boolean)}),Zw=Be(e=>{let{cellIds:n,cellRuntime:i}=e(mt);return dE(n.inOrderIds.map(a=>i[a].outline))}),Vw=Be(e=>e(Vu).length),My=pT(Be(e=>{let{cellIds:n,cellData:i}=e(mt);return ei.fromEntries(n.inOrderIds.map(a=>{var s;return[a,(s=i[a])==null?void 0:s.name]}))}));var DE=Be(e=>e(mt).scrollKey);K2=()=>Un(mt),Nw=()=>Un(qu),Pw=()=>Un(My),D2=()=>Un(Vu),x2=()=>Un(mt).cellLogs,Z2=()=>Un(DE),Ju=()=>ct.get(mt),Tw=()=>{let{cellIds:e,cellData:n}=ct.get(mt);return e.inOrderIds.map(i=>{var a;return(a=n[i])==null?void 0:a.name}).filter(Boolean)};var OE=S_(w_(mt,e=>e.cellIds.inOrderIds.map(n=>e.cellData[n])));P2=()=>Wb(OE),vw=Be(e=>L_(e(mt))),nw=Be(e=>A_(e(mt))),E2=Be(e=>e(mt).cellIds.colLength),Aw=Be(e=>e(mt).cellIds.idLength>0),qw=Be(e=>e(mt).cellIds.getColumnIds()),Qu=id(e=>Be(n=>n(mt).cellData[e]));var af=id(e=>Be(n=>n(mt).cellRuntime[e]));const Ly=id(e=>Be(n=>n(mt).cellHandles[e]));function PE(e){Qu.remove(e),af.remove(e),Ly.remove(e)}iw=e=>{let n=(0,of.c)(2),i;return n[0]===e?i=n[1]:(i=Qu(e),n[0]=e,n[1]=i),Un(i)},$2=e=>{let n=(0,of.c)(2),i;return n[0]===e?i=n[1]:(i=af(e),n[0]=e,n[1]=i),Un(i)},J2=e=>{let n=(0,of.c)(2),i;return n[0]===e?i=n[1]:(i=Ly(e),n[0]=e,n[1]=i),Un(i)},Vm=()=>{let{cellIds:e,cellHandles:n}=ct.get(mt);return e.inOrderIds.map(i=>{var a,s;return(s=(a=n[i])==null?void 0:a.current)==null?void 0:s.editorViewOrNull}).filter(Boolean)},kw=e=>{var i;let{cellHandles:n}=ct.get(mt);return(i=n[e].current)==null?void 0:i.editorView},ww=function(e){let{cellIds:n,cellData:i,cellRuntime:a}=e;return n.getColumns().flatMap(s=>s.topLevelIds.map(c=>({...i[c],...a[c]})))},Uw=function(e){return Be(n=>n(mt).untouchedNewCells.has(e))};function NE(e){let n=af(e);return Be(i=>{let a=i(n);if(!a||a.status==="queued"||a.status==="running")return;let s=[],c=a.consoleOutputs;if(c&&c.length>0){let p=c.find(h=>h.mimetype==="application/vnd.marimo+traceback");if(p){let h=p.data;s.push(...Fm(h))}}let f=a.output;if((f==null?void 0:f.mimetype)==="application/vnd.marimo+error"){let p=f.data;if(Array.isArray(p))for(let h of p)h.type==="syntax"&&h.lineno!=null&&s.push({kind:"cell",cellId:e,lineNumber:h.lineno}),h.type==="import-star"&&h.lineno!=null&&s.push({kind:"cell",cellId:e,lineNumber:h.lineno})}return s.length>0?s:void 0})}Yw=function(){return Ny()}})();export{fm as $,Ol as $n,_2 as $t,x2 as A,Di as An,Pl as Ar,as as At,k2 as B,C2 as Bn,_u as Br,S2 as Bt,E2 as C,T2 as Cn,xu as Cr,R2 as Ct,D2 as D,O2 as Dn,zn as Dr,aa as Dt,P2 as E,N2 as En,ss as Er,pm as Et,Cr as F,mm as Fn,fo as Fr,hm as Ft,gm as G,M2 as Gn,ym as Gr,L2 as Gt,vm as H,ku as Hn,bm as Hr,sa as Ht,Sr as I,Cu as In,A2 as Ir,I2 as It,j2 as J,q2 as Jn,z2 as Jt,wm as K,F2 as Kn,Su as Kr,Eu as Kt,B2 as L,H2 as Ln,cr as Lr,V2 as Lt,$2 as M,W2 as Mn,U2 as Mr,_m as Mt,K2 as N,Q2 as Nn,G2 as Nr,xm as Nt,J2 as O,X2 as On,Y2 as Or,Tu as Ot,Z2 as P,km as Pn,Cm as Pr,Sm as Pt,Em as Q,Tm as Qn,ew as Qt,Rm as R,Ru as Rn,ls as Rr,tw as Rt,nw as S,Du as Sn,rw as Sr,Ou as St,iw as T,Dm as Tn,ow as Tr,la as Tt,Om as U,Pm as Un,aw as Ur,sw as Ut,Nm as V,Pu as Vn,lw as Vr,Nu as Vt,cw as W,Mu as Wn,Mm as Wr,uw as Wt,Lu as X,dw as Xn,fw as Xt,Au as Y,po as Yn,pw as Yt,mw as Z,Iu as Zn,Nl as Zt,hw as _,$R as __tla,ju as _n,Lm as _r,gw as _t,qu as a,zu as an,Am as ar,yw as at,vw as b,Im as bn,bw as br,mo as bt,ww as c,_w as cn,xw as cr,jm as ct,kw as d,Fu as dn,Cw as dr,Sw as dt,Oi as en,Ew as er,ri as et,Tw as f,Ml as fn,ca as fr,qm as ft,Rw as g,Bu as gn,zm as gr,Hu as gt,Dw as h,ii as hn,Fm as hr,ur as ht,Vu as i,Ow as in,Bm as ir,Er as it,Pw as j,Ll as jn,$u as jr,Hm as jt,Nw as k,Mw as kn,Wu as kr,Uu as kt,Vm as l,$m as ln,Wm as lr,Lw as lt,Aw as m,Ku as mn,Iw as mr,Al as mt,Qu as n,Um as nn,Dt as nr,jw as nt,qw as o,Km as on,zw as or,Gu as ot,Ju as p,ho as pn,Xu as pr,Qm as pt,Fw as q,Bw as qn,Hw as qt,Vw as r,$w as rn,ua as rr,Ww as rt,Uw as s,Kw as sn,Gm as sr,Jm as st,Qw as t,cs as tn,Yu as tr,us as tt,Gw as u,Il as un,Zu as ur,Jw as ut,Xw as v,Xm as vn,go as vr,ed as vt,Yw as w,Ym as wn,ds as wr,jl as wt,Zw as x,ql as xn,Zm as xr,e_ as xt,mt as y,eh as yn,zl as yr,t_ as yt,n_ as z,r_ as zn,dr as zr,th as zt};