@marimo-team/frontend 0.20.3-dev91 → 0.20.3-dev94

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 (283) hide show
  1. package/dist/assets/{CellStatus-BNSMzQ15.js → CellStatus-DT32GPB2.js} +1 -1
  2. package/dist/assets/{ConnectedDataExplorerComponent-D2meVbtr.js → ConnectedDataExplorerComponent-BJPiMTXX.js} +1 -1
  3. package/dist/assets/{DeferredRequestRegistry-CFO2z1af.js → DeferredRequestRegistry-TekxUirp.js} +1 -1
  4. package/dist/assets/{ImperativeModal-Upm6NvJ2.js → ImperativeModal-MjC9Owmv.js} +1 -1
  5. package/dist/assets/{JsonOutput-DgTX3wDl.js → JsonOutput-uf7OFaDU.js} +3 -3
  6. package/dist/assets/{LazyAnyLanguageCodeMirror-BuxbbXY6.js → LazyAnyLanguageCodeMirror-DIzh1FyL.js} +2 -2
  7. package/dist/assets/{MarimoErrorOutput-BZVbz6Ov.js → MarimoErrorOutput-BJkHPKWK.js} +1 -1
  8. package/dist/assets/{RenderHTML-CzOWRFSs.js → RenderHTML-CjCJ1DT4.js} +1 -1
  9. package/dist/assets/{add-cell-with-ai-YgztdOJ9.js → add-cell-with-ai-DJ9tuL4g.js} +1 -1
  10. package/dist/assets/{add-database-form-VCKMmUc7.js → add-database-form-D06OUuSg.js} +1 -1
  11. package/dist/assets/{agent-panel-ei_1YHUt.js → agent-panel-DYFbOZ0f.js} +1 -1
  12. package/dist/assets/{ai-model-dropdown-D0ZKojfQ.js → ai-model-dropdown-BnQGs6GF.js} +1 -1
  13. package/dist/assets/{alert-dialog-DNI_v2jv.js → alert-dialog-DEeW2awP.js} +1 -1
  14. package/dist/assets/{any-language-editor-Bxqn65d_.js → any-language-editor-gG2nw5Di.js} +1 -1
  15. package/dist/assets/{app-config-button-DTWRRxl9.js → app-config-button-Btys3Cin.js} +1 -1
  16. package/dist/assets/{architectureDiagram-VXUJARFQ-DF8pn-JR.js → architectureDiagram-VXUJARFQ-XoreuVlu.js} +1 -1
  17. package/dist/assets/{blockDiagram-VD42YOAC-CClp2tRD.js → blockDiagram-VD42YOAC-D88a3p2S.js} +1 -1
  18. package/dist/assets/{c4Diagram-YG6GDRKO-Bv7AMEs6.js → c4Diagram-YG6GDRKO-liP4M7aa.js} +1 -1
  19. package/dist/assets/{cache-panel-BSRvQ8Xi.js → cache-panel-BCMChSTr.js} +1 -1
  20. package/dist/assets/{cell-editor-D8xaLLzF.js → cell-editor-BDJGt0PK.js} +1 -1
  21. package/dist/assets/{cell-link-zwx6SduJ.js → cell-link-CiQrWiPA.js} +1 -1
  22. package/dist/assets/{cells-DVXjWBHI.js → cells-DD42bsu7.js} +40 -40
  23. package/dist/assets/channel-8l73B3Du.js +1 -0
  24. package/dist/assets/{chat-display-Yag1t1kP.js → chat-display-DN0dzai8.js} +1 -1
  25. package/dist/assets/{chat-panel-D11UPF0q.js → chat-panel--gsbOxYb.js} +1 -1
  26. package/dist/assets/{chunk-55IACEB6-Du0kncVN.js → chunk-55IACEB6-Bq5hFuyg.js} +1 -1
  27. package/dist/assets/{chunk-5FQGJX7Z-C3tg8qpb.js → chunk-5FQGJX7Z-CKJM3d7z.js} +3 -3
  28. package/dist/assets/{chunk-ABZYJK2D-rCmXyFGD.js → chunk-ABZYJK2D-B_EusRlI.js} +3 -3
  29. package/dist/assets/{chunk-ATLVNIR6-B4WsP60S.js → chunk-ATLVNIR6-YSXtuHxk.js} +1 -1
  30. package/dist/assets/{chunk-B4BG7PRW-YHIN6QRo.js → chunk-B4BG7PRW-4H0bTT06.js} +1 -1
  31. package/dist/assets/{chunk-DI55MBZ5-CD5w52Et.js → chunk-DI55MBZ5-Qa7VdYYC.js} +1 -1
  32. package/dist/assets/{chunk-EXTU4WIE-o13o_Qxz.js → chunk-EXTU4WIE-Dm7JTwJS.js} +1 -1
  33. package/dist/assets/{chunk-JA3XYJ7Z-CF2I5JvU.js → chunk-JA3XYJ7Z-DlWIdoh6.js} +1 -1
  34. package/dist/assets/{chunk-JZLCHNYA-DlwDxl4P.js → chunk-JZLCHNYA-BjCNnsxN.js} +1 -1
  35. package/dist/assets/{chunk-N4CR4FBY-CB2hMUio.js → chunk-N4CR4FBY-DvejWNHh.js} +2 -2
  36. package/dist/assets/{chunk-QN33PNHL-yHnlnYz-.js → chunk-QN33PNHL-D40wYAAe.js} +1 -1
  37. package/dist/assets/{chunk-QXUST7PY-B9vaAb3w.js → chunk-QXUST7PY-CPnoUHx5.js} +1 -1
  38. package/dist/assets/{chunk-S3R3BYOJ-Be_w8zeK.js → chunk-S3R3BYOJ-BXcnEOaZ.js} +1 -1
  39. package/dist/assets/{chunk-TZMSLE5B-BC_ubkRF.js → chunk-TZMSLE5B-B4dWntTK.js} +1 -1
  40. package/dist/assets/classDiagram-2ON5EDUG-DCHm2P5j.js +1 -0
  41. package/dist/assets/classDiagram-v2-WZHVMYZB-BCGAyQvL.js +1 -0
  42. package/dist/assets/{code-block-37QAKDTI-CmvUtTzv.js → code-block-37QAKDTI-DfxyEg-6.js} +1 -1
  43. package/dist/assets/{column-preview-BVNt_bhU.js → column-preview-BtKDi4j6.js} +1 -1
  44. package/dist/assets/{command-COYC8fga.js → command-2Li9iWG_.js} +1 -1
  45. package/dist/assets/{command-palette-BkMYWFHq.js → command-palette-Ce_7Eh4G.js} +1 -1
  46. package/dist/assets/{common-D4iOX1kL.js → common-BOraucV9.js} +1 -1
  47. package/dist/assets/{components-W1WrEQth.js → components-Bl0CtJtz.js} +1 -1
  48. package/dist/assets/{components-kyddrdJc.js → components-Dv0WjPQ-.js} +1 -1
  49. package/dist/assets/{config-vle9v48l.js → config-CBwelk8k.js} +1 -1
  50. package/dist/assets/{context-DAH8i0ik.js → context-CRApIvpB.js} +1 -1
  51. package/dist/assets/{context-aware-panel-D7EEtBgI.js → context-aware-panel-DMHGbB_b.js} +1 -1
  52. package/dist/assets/{copy-icon-Cg5270DP.js → copy-icon-HFU_6E8O.js} +1 -1
  53. package/dist/assets/{cose-bilkent-S5V4N54A-VDjV6QSR.js → cose-bilkent-S5V4N54A-C5YtuUQc.js} +1 -1
  54. package/dist/assets/{dagre-6UL2VRFP-x0HS4zyz.js → dagre-6UL2VRFP-DRNnviF_.js} +1 -1
  55. package/dist/assets/{data-grid-overlay-editor-BHriWEOZ.js → data-grid-overlay-editor-BEE_UOd2.js} +1 -1
  56. package/dist/assets/{datasource-BN9tktls.js → datasource-Cturxb4x.js} +1 -1
  57. package/dist/assets/{dates-BL9QfUQ0.js → dates-_ZWMvHpG.js} +1 -1
  58. package/dist/assets/{dependency-graph-panel-BJgpF5zA.js → dependency-graph-panel-B8UpJDl-.js} +1 -1
  59. package/dist/assets/{diagram-PSM6KHXK-kUTb8eO2.js → diagram-PSM6KHXK-CJ_YTtTV.js} +1 -1
  60. package/dist/assets/{diagram-QEK2KX5R-DQByLP5l.js → diagram-QEK2KX5R-CfHsxOB8.js} +1 -1
  61. package/dist/assets/{diagram-S2PKOQOG-DOblvEcu.js → diagram-S2PKOQOG-C9iLu9In.js} +1 -1
  62. package/dist/assets/{dialog-DxCG9U2G.js → dialog-D_1x0b57.js} +1 -1
  63. package/dist/assets/dist-B8Knp6QM.js +1 -0
  64. package/dist/assets/{dist-BYah04_6.js → dist-BFzRlyBI.js} +1 -1
  65. package/dist/assets/{dist-DRM_TtJV.js → dist-BOEbbZQx.js} +1 -1
  66. package/dist/assets/{dist-pzEKEf2L.js → dist-BfsJ2nor.js} +1 -1
  67. package/dist/assets/{dist-C_2WWLSA.js → dist-C83X_psd.js} +1 -1
  68. package/dist/assets/{dist-Dr0CXDHq.js → dist-CCHC36f2.js} +1 -1
  69. package/dist/assets/{dist-B4cgseU2.js → dist-CFJh28wG.js} +1 -1
  70. package/dist/assets/dist-CHwE2nmM.js +1 -0
  71. package/dist/assets/{dist-DesNQGlP.js → dist-CLFvKo6g.js} +1 -1
  72. package/dist/assets/dist-CX2pe9zu.js +1 -0
  73. package/dist/assets/dist-Cf_g6O8K.js +1 -0
  74. package/dist/assets/{dist-BML9Do7x.js → dist-D-iyTPWR.js} +1 -1
  75. package/dist/assets/dist-D3fVt494.js +1 -0
  76. package/dist/assets/dist-DNtP2rJw.js +1 -0
  77. package/dist/assets/{dist-xJdARuDE.js → dist-DTVn6XkJ.js} +1 -1
  78. package/dist/assets/{dist-CLn8560E.js → dist-DotE4D06.js} +1 -1
  79. package/dist/assets/{dist-BpJ2dYWn.js → dist-DsQvo-tW.js} +1 -1
  80. package/dist/assets/{dist-wVMmgzGW.js → dist-Ojy3l4de.js} +1 -1
  81. package/dist/assets/{dist-B41xAwSI.js → dist-Vc8ZMKz4.js} +1 -1
  82. package/dist/assets/{dist-BRw3dwds.js → dist-VhPaW6Nu.js} +1 -1
  83. package/dist/assets/{dist-OuzXQwz4.js → dist-YWDQ5GDh.js} +1 -1
  84. package/dist/assets/{dist-K049ewAC.js → dist-o3bslLiM.js} +1 -1
  85. package/dist/assets/{documentation-panel-HdWijFZG.js → documentation-panel-BuGA-sMW.js} +1 -1
  86. package/dist/assets/{download-CNypwy8-.js → download-CmObLKP6.js} +1 -1
  87. package/dist/assets/{dropdown-menu-CYyWUG65.js → dropdown-menu-D9u7_h0R.js} +1 -1
  88. package/dist/assets/{edit-page-DXQa188q.js → edit-page-BNA8A6Ux.js} +3 -3
  89. package/dist/assets/{erDiagram-Q2GNP2WA-Ct2OupEK.js → erDiagram-Q2GNP2WA-Ci9jIB40.js} +1 -1
  90. package/dist/assets/{error-banner-AdDcypw3.js → error-banner-DsP3CCH3.js} +1 -1
  91. package/dist/assets/{error-panel-C2tydEs_.js → error-panel-CK2L5ciF.js} +1 -1
  92. package/dist/assets/{es-BLdjaIr6.js → es-DwwU_CO-.js} +1 -1
  93. package/dist/assets/{esm-B2VsGmJs.js → esm-CqpQNGcZ.js} +1 -1
  94. package/dist/assets/{esm-DYDEu0Nq.js → esm-Dm5bJp7V.js} +1 -1
  95. package/dist/assets/{field-DVVr5TG5.js → field-Cgpys-pp.js} +1 -1
  96. package/dist/assets/file-explorer-panel-BeOWee6Z.js +1 -0
  97. package/dist/assets/{floating-outline-CuK2jvVB.js → floating-outline-BPv4P2vV.js} +1 -1
  98. package/dist/assets/{flowDiagram-NV44I4VS-wpL7K6DH.js → flowDiagram-NV44I4VS-CUdl_uoe.js} +1 -1
  99. package/dist/assets/{focus-C2gi0jxY.js → focus-DiPb_hn6.js} +1 -1
  100. package/dist/assets/{form-Il1IxPi6.js → form-ibH0eKd-.js} +1 -1
  101. package/dist/assets/{formats-Bd3u9VU8.js → formats-B4v3ZpGs.js} +1 -1
  102. package/dist/assets/{formatting-CkUjNdR1.js → formatting-BBp_M8-h.js} +1 -1
  103. package/dist/assets/{gallery-page-C-yj0Eu7.js → gallery-page-Dwy7ttw7.js} +1 -1
  104. package/dist/assets/{ganttDiagram-JELNMOA3-D5Mlr72F.js → ganttDiagram-JELNMOA3-D2jWBuvf.js} +1 -1
  105. package/dist/assets/{gitGraphDiagram-V2S2FVAM-Bs5934ce.js → gitGraphDiagram-V2S2FVAM-CkEqRLnD.js} +1 -1
  106. package/dist/assets/{glide-data-editor-DXQ1mmh4.js → glide-data-editor-CfedLJF1.js} +4 -4
  107. package/dist/assets/{globals-BAAGjaoU.js → globals-Dk7VGE85.js} +1 -1
  108. package/dist/assets/{home-page-DgFgEaa-.js → home-page-Bs5_UsFC.js} +1 -1
  109. package/dist/assets/{html-to-image-Din4blht.js → html-to-image-CojwvW9z.js} +1 -1
  110. package/dist/assets/{index-BAp5idqc.js → index-B-ghuCiq.js} +6 -6
  111. package/dist/assets/{infoDiagram-HS3SLOUP-YPnproxq.js → infoDiagram-HS3SLOUP-Cf_pYPyI.js} +1 -1
  112. package/dist/assets/{input-CRB-lq4Q.js → input-B49Srsl9.js} +1 -1
  113. package/dist/assets/{journeyDiagram-XKPGCS4Q-BJEmkxNL.js → journeyDiagram-XKPGCS4Q-DHw_OuoX.js} +1 -1
  114. package/dist/assets/{kanban-definition-3W4ZIXB7-IttQGWmT.js → kanban-definition-3W4ZIXB7-CgJY0dyI.js} +1 -1
  115. package/dist/assets/katex-BalO4WMU.js +1 -0
  116. package/dist/assets/{kiosk-mode-DfDMBGIM.js → kiosk-mode-hbpM_a-j.js} +1 -1
  117. package/dist/assets/{label-CGS9p44y.js → label-OL3StKg2.js} +1 -1
  118. package/dist/assets/{layout-DQyAaEMt.js → layout-D1VtP7GQ.js} +3 -3
  119. package/dist/assets/{linear-14muAAYR.js → linear-S_2Z0W1R.js} +1 -1
  120. package/dist/assets/links-cVjWsr05.js +1 -0
  121. package/dist/assets/{logs-panel-BsriCGgO.js → logs-panel-CDBBW9DI.js} +1 -1
  122. package/dist/assets/{markdown-renderer-BF7gphWI.js → markdown-renderer-YOedNAkc.js} +1 -1
  123. package/dist/assets/{menu-items-uT9t8sb4.js → menu-items-BpKTKw9I.js} +1 -1
  124. package/dist/assets/mermaid-4DMBBIKO-DHX6rzjo.js +1 -0
  125. package/dist/assets/{mermaid-BCpH5igF.js → mermaid-Dq45ZTSR.js} +3 -3
  126. package/dist/assets/{mermaid-parser.core-De30od-H.js → mermaid-parser.core-kXAMYbo2.js} +1 -1
  127. package/dist/assets/{mhchem-CZMI7ljY.js → mhchem-DYHJI636.js} +1 -1
  128. package/dist/assets/{mindmap-definition-VGOIOE7T-BK4Sa2zS.js → mindmap-definition-VGOIOE7T-Dob0y7_P.js} +1 -1
  129. package/dist/assets/{multi-map-CDn9gple.js → multi-map-BHEewz4D.js} +1 -1
  130. package/dist/assets/{name-cell-input-EJb1YnST.js → name-cell-input-HEC8dShQ.js} +1 -1
  131. package/dist/assets/{number-overlay-editor-jNUhpxB8.js → number-overlay-editor-knCMh2M3.js} +1 -1
  132. package/dist/assets/{outline-panel-BpMAMa-v.js → outline-panel-DzWl_avL.js} +1 -1
  133. package/dist/assets/{packages-panel-NCtRLdYv.js → packages-panel-cSLWScXy.js} +1 -1
  134. package/dist/assets/{panels-CeS0F13O.js → panels-903Vandk.js} +1 -1
  135. package/dist/assets/{pieDiagram-ADFJNKIX-C4ilS5I6.js → pieDiagram-ADFJNKIX-CTk6T8fb.js} +1 -1
  136. package/dist/assets/{popover-2GpKY98n.js → popover-C7N9RyXk.js} +1 -1
  137. package/dist/assets/{precisionRound-NX56vp6K.js → precisionRound-CCOoIlcP.js} +1 -1
  138. package/dist/assets/{process-output-DIDEm33D.js → process-output-B2WHFsM0.js} +1 -1
  139. package/dist/assets/{quadrantDiagram-AYHSOK5B-Dxq_lxEA.js → quadrantDiagram-AYHSOK5B-BVdFx5wF.js} +1 -1
  140. package/dist/assets/{react-vega-CQCeziU3.js → react-vega-BYVwP1iN.js} +1 -1
  141. package/dist/assets/react-vega-Dg8Pw8lR.js +1 -0
  142. package/dist/assets/{readonly-python-code-BNPO_MG8.js → readonly-python-code-XphqxCq8.js} +1 -1
  143. package/dist/assets/{renderShortcut-CMdaUbHS.js → renderShortcut-_nl5_jRy.js} +1 -1
  144. package/dist/assets/{request-registry-CZFU9UKb.js → request-registry-D-vPSm0g.js} +1 -1
  145. package/dist/assets/{requirementDiagram-UZGBJVZJ-Cq2R_lhf.js → requirementDiagram-UZGBJVZJ-DY-OcLwF.js} +1 -1
  146. package/dist/assets/{run-page-8S9mxjlL.js → run-page-DzsjMR6O.js} +1 -1
  147. package/dist/assets/{sankeyDiagram-TZEHDZUN-CFLE5Kkb.js → sankeyDiagram-TZEHDZUN-6t9CRTL3.js} +1 -1
  148. package/dist/assets/{scratchpad-panel-DzOWeiXN.js → scratchpad-panel-DA77C7Q0.js} +1 -1
  149. package/dist/assets/{secrets-panel-DLwuup0m.js → secrets-panel-CMZi-lXZ.js} +1 -1
  150. package/dist/assets/{select-DjvQ3a3F.js → select-BRK_BOoG.js} +1 -1
  151. package/dist/assets/{sequenceDiagram-WL72ISMW-Cc0IJa3J.js → sequenceDiagram-WL72ISMW-BjZ_K9eY.js} +1 -1
  152. package/dist/assets/{session-panel-CePZ-Agg.js → session-panel-DwTnfeqw.js} +1 -1
  153. package/dist/assets/{share-XjNIMk98.js → share-BpyH3qLa.js} +1 -1
  154. package/dist/assets/{slides-component-C9jK_EsY.js → slides-component-Bf8iP5zM.js} +1 -1
  155. package/dist/assets/{snippets-panel-DVrjTzrK.js → snippets-panel-CLQT_rb9.js} +1 -1
  156. package/dist/assets/{spec-HU4WDTN0.js → spec-CcvA_Vlj.js} +1 -1
  157. package/dist/assets/{src-lcGySDV2.js → src-Bp_72rVO.js} +1 -1
  158. package/dist/assets/{state-BlC8AgKx.js → state-C5z8LHqe.js} +1 -1
  159. package/dist/assets/{state-ejdaxMKR.js → state-DRCtQIWh.js} +1 -1
  160. package/dist/assets/{state-O2Ife70c.js → state-QwNqaRCk.js} +1 -1
  161. package/dist/assets/{stateDiagram-FKZM4ZOC-CRCzEpDR.js → stateDiagram-FKZM4ZOC-NMBeN6_k.js} +1 -1
  162. package/dist/assets/stateDiagram-v2-4FDKWEC3-wXzPY2i9.js +1 -0
  163. package/dist/assets/stex-BBWVYm-R.js +1 -0
  164. package/dist/assets/{switch-BQaT8a2B.js → switch-CA8la81g.js} +1 -1
  165. package/dist/assets/{terminal-DGowUZf5.js → terminal--Et332AA.js} +1 -1
  166. package/dist/assets/{textarea-BUCOcONS.js → textarea-noyX_YEw.js} +1 -1
  167. package/dist/assets/{time-B0ljjE2H.js → time-CoU4QCVK.js} +1 -1
  168. package/dist/assets/{timeline-definition-IT6M3QCI-D6rghgm9.js → timeline-definition-IT6M3QCI-BGiQZTGi.js} +1 -1
  169. package/dist/assets/{toggle-B6rNJdxn.js → toggle-MO7vjfkt.js} +1 -1
  170. package/dist/assets/{tooltip-BrjpohcK.js → tooltip-CcOqovrC.js} +1 -1
  171. package/dist/assets/{tooltip-D7xdZcKW.js → tooltip-oM-h2ZN1.js} +1 -1
  172. package/dist/assets/{tracing-CgvMG0Rx.js → tracing-Bdx3rdWM.js} +1 -1
  173. package/dist/assets/tracing-panel-BNSSHFIf.js +2 -0
  174. package/dist/assets/{tree-Rwd8OPB8.js → tree-DKsPUdeu.js} +1 -1
  175. package/dist/assets/{types-DmqhedDv.js → types-DYD6UxTH.js} +1 -1
  176. package/dist/assets/{useAddCell-fRfulMRu.js → useAddCell-DVMY6vkv.js} +1 -1
  177. package/dist/assets/{useBoolean-CM4hA6rT.js → useBoolean-Den0ZqeZ.js} +1 -1
  178. package/dist/assets/{useCellActionButton-DLoBXBqS.js → useCellActionButton-HNTLhSrv.js} +1 -1
  179. package/dist/assets/{useDateFormatter-Dm6WIEWp.js → useDateFormatter-DfEfyPT1.js} +1 -1
  180. package/dist/assets/{useDeleteCell-fYxNdCgY.js → useDeleteCell-CrSQfQw4.js} +1 -1
  181. package/dist/assets/{useDependencyPanelTab-D_riCjQR.js → useDependencyPanelTab-BqqmAAW7.js} +1 -1
  182. package/dist/assets/{useInstallPackage-z6g4hGCr.js → useInstallPackage-chfmZzat.js} +1 -1
  183. package/dist/assets/{useNotebookActions-CGdPh6jF.js → useNotebookActions-Bzt5O8Yy.js} +1 -1
  184. package/dist/assets/{useNumberFormatter-Cvi0uMeX.js → useNumberFormatter-DQd-h5xR.js} +1 -1
  185. package/dist/assets/{usePress-C7hs6zHi.js → usePress-DcdVsIfA.js} +1 -1
  186. package/dist/assets/{useSplitCell-CNL377K-.js → useSplitCell-BL-Sir7Y.js} +1 -1
  187. package/dist/assets/{vega-component-CTzeKqN8.js → vega-component-BYA7vCZO.js} +1 -1
  188. package/dist/assets/{vega-loader.browser-xq8miGHn.js → vega-loader.browser-BJ9oKrvH.js} +1 -1
  189. package/dist/assets/{write-secret-modal-BBozIFM7.js → write-secret-modal-CkhGEn3N.js} +1 -1
  190. package/dist/assets/{xychartDiagram-PRI3JC2R-BDYPhsMz.js → xychartDiagram-PRI3JC2R-Cb4TioN6.js} +1 -1
  191. package/dist/assets/youtube-DfMgNU9-.js +1 -0
  192. package/dist/index.html +120 -120
  193. package/package.json +1 -1
  194. package/src/components/storage/components.tsx +2 -0
  195. package/src/core/cells/__tests__/session.test.ts +1 -1
  196. package/src/core/storage/types.ts +2 -1
  197. package/src/plugins/core/__test__/sanitize.test.ts +47 -2
  198. package/src/plugins/core/sanitize.ts +4 -0
  199. package/dist/assets/channel-DwMgVzqb.js +0 -1
  200. package/dist/assets/classDiagram-2ON5EDUG-BPrUysDt.js +0 -1
  201. package/dist/assets/classDiagram-v2-WZHVMYZB-CaQpjPAB.js +0 -1
  202. package/dist/assets/dist-BU9Y5zkF.js +0 -1
  203. package/dist/assets/dist-Bm9ccWW7.js +0 -1
  204. package/dist/assets/dist-C1LPvdNp.js +0 -1
  205. package/dist/assets/dist-CP1qhGjg.js +0 -1
  206. package/dist/assets/dist-Dc5VNM-O.js +0 -1
  207. package/dist/assets/dist-r1Wa9wj4.js +0 -1
  208. package/dist/assets/file-explorer-panel-CEXKN9Bx.js +0 -1
  209. package/dist/assets/katex-BubCv2pM.js +0 -1
  210. package/dist/assets/links-DJ5XP9fV.js +0 -1
  211. package/dist/assets/mermaid-4DMBBIKO-BVr3iHS_.js +0 -1
  212. package/dist/assets/react-vega-C8AEAezO.js +0 -1
  213. package/dist/assets/stateDiagram-v2-4FDKWEC3-BOOdECJI.js +0 -1
  214. package/dist/assets/stex-CruVQx-P.js +0 -1
  215. package/dist/assets/tracing-panel-DsjOn32J.js +0 -2
  216. package/dist/assets/youtube-C6LYzJHy.js +0 -1
  217. /package/dist/assets/{Combination-BM4eSgxb.js → Combination-BioTNpLP.js} +0 -0
  218. /package/dist/assets/{Deferred-CfyqLOPG.js → Deferred-BMfCOLaw.js} +0 -0
  219. /package/dist/assets/{SSRProvider-BkypbMcb.js → SSRProvider-CwqN9FWV.js} +0 -0
  220. /package/dist/assets/{alert-DdNm63Am.js → alert-Bs8tbZo_.js} +0 -0
  221. /package/dist/assets/{azure-B1scLE4v.js → azure-B7oWrJc_.js} +0 -0
  222. /package/dist/assets/{badge-BxfUmJ6M.js → badge-BUFDGZ04.js} +0 -0
  223. /package/dist/assets/{blob-C3EfaMOb.js → blob-DgooIGjS.js} +0 -0
  224. /package/dist/assets/{bundle.esm-cfPbrCwe.js → bundle.esm-_LzfhNmX.js} +0 -0
  225. /package/dist/assets/{card-DBF3HJUb.js → card-WPBELA1S.js} +0 -0
  226. /package/dist/assets/{copy-hG3KkB-h.js → copy-CgddLxfF.js} +0 -0
  227. /package/dist/assets/{defaultLocale-Lfi0pexn.js → defaultLocale-CGfP-Ye3.js} +0 -0
  228. /package/dist/assets/{defaultLocale-DPBdGRrH.js → defaultLocale-CuYNS33t.js} +0 -0
  229. /package/dist/assets/{dist-C_w6Go0g.js → dist-BoFVJhwF.js} +0 -0
  230. /package/dist/assets/{dist-D3d3ioNg.js → dist-C4QdWMCE.js} +0 -0
  231. /package/dist/assets/{dist-DU2EJ7el.js → dist-DgIBu6pZ.js} +0 -0
  232. /package/dist/assets/{dist-4go66rGa.js → dist-WaT7BL5t.js} +0 -0
  233. /package/dist/assets/{dist-CYxfO26e.js → dist-jtXWG2b1.js} +0 -0
  234. /package/dist/assets/{emotion-is-prop-valid.esm-CK2zY6a8.js → emotion-is-prop-valid.esm-lG8j6oqk.js} +0 -0
  235. /package/dist/assets/{empty-state-DFr2pZOz.js → empty-state-BNyDvg_Q.js} +0 -0
  236. /package/dist/assets/{en-US-6llqATF7.js → en-US-k6sS5Nab.js} +0 -0
  237. /package/dist/assets/{errors-iwK4b4VF.js → errors-0IrrdfSG.js} +0 -0
  238. /package/dist/assets/{extends-CeSFM22p.js → extends-B9D0JO9U.js} +0 -0
  239. /package/dist/assets/{icons-CHolxgW2.js → icons-B9sHgc9n.js} +0 -0
  240. /package/dist/assets/{image-DJi6ovcV.js → image-CBwHq93J.js} +0 -0
  241. /package/dist/assets/{isValid-DXCp8eGi.js → isValid-CUXKlcrM.js} +0 -0
  242. /package/dist/assets/{katex-0Z75JF53.js → katex-FSdXOW5Y.js} +0 -0
  243. /package/dist/assets/{kbd-CNdD3jWa.js → kbd-Rn7tWvNg.js} +0 -0
  244. /package/dist/assets/{link-BMKs5Gz_.js → link-BmtFffTv.js} +0 -0
  245. /package/dist/assets/{links-DhyyPCG4.js → links-MkDbmF2p.js} +0 -0
  246. /package/dist/assets/{marimo-icons-B0iaQddz.js → marimo-icons-DcMouEVW.js} +0 -0
  247. /package/dist/assets/{multi-icon-OxLi6M3I.js → multi-icon-BFa-He80.js} +0 -0
  248. /package/dist/assets/{numbers-DD2lH3f-.js → numbers-CPeFd6mm.js} +0 -0
  249. /package/dist/assets/{objectWithoutPropertiesLoose-BkUn3I0-.js → objectWithoutPropertiesLoose-CboCOq4o.js} +0 -0
  250. /package/dist/assets/{ordinal-bISkqI45.js → ordinal-CIZb_ice.js} +0 -0
  251. /package/dist/assets/{panel-context-ICWm_stq.js → panel-context-D8PoMwqS.js} +0 -0
  252. /package/dist/assets/{paths-BVwhPRFT.js → paths-D2lG83Oh.js} +0 -0
  253. /package/dist/assets/{play-Cb6tYyv-.js → play-CkqWG85-.js} +0 -0
  254. /package/dist/assets/{plus-BgyD1fCH.js → plus-C9B_qWUi.js} +0 -0
  255. /package/dist/assets/{preload-helper-y72bE5iF.js → preload-helper-BW0IMuFq.js} +0 -0
  256. /package/dist/assets/{prop-types-B6Y2e__V.js → prop-types-C638SUfx.js} +0 -0
  257. /package/dist/assets/{purify.es-DFAhPV1y.js → purify.es-DTgMcyNc.js} +0 -0
  258. /package/dist/assets/{range-Dk7lXDev.js → range-ClqUI25v.js} +0 -0
  259. /package/dist/assets/{react-resizable-panels.browser.esm-RgA6v8U3.js → react-resizable-panels.browser.esm-DDRqG5ui.js} +0 -0
  260. /package/dist/assets/{refresh-ccw-fkpyyW4C.js → refresh-ccw-B3lGEyQm.js} +0 -0
  261. /package/dist/assets/{refresh-cw-6vegZcuZ.js → refresh-cw-fLeDriQe.js} +0 -0
  262. /package/dist/assets/{requests-KFvRjaaN.js → requests-BtlCsvG4.js} +0 -0
  263. /package/dist/assets/{rotate-ccw-BNlUg6K6.js → rotate-ccw-DgH8qERb.js} +0 -0
  264. /package/dist/assets/{save-BShTD2ty.js → save-C91FTnFa.js} +0 -0
  265. /package/dist/assets/{session-BQVN1Kxg.js → session-Deuv0Lgh.js} +0 -0
  266. /package/dist/assets/{settings-DuNjGb99.js → settings-DRfuuLRT.js} +0 -0
  267. /package/dist/assets/{spinner-Cg6xI4rq.js → spinner-Dt4SmUsI.js} +0 -0
  268. /package/dist/assets/{square-BQ6pR0y3.js → square-DZpWT_hp.js} +0 -0
  269. /package/dist/assets/{square-function-DVqP0HiQ.js → square-function-DEp1ozoA.js} +0 -0
  270. /package/dist/assets/{stex-C6JeW1YI.js → stex-0ac7Aukl.js} +0 -0
  271. /package/dist/assets/{table-BhRziAuf.js → table-FXVKPW36.js} +0 -0
  272. /package/dist/assets/{timer-BEJidwwG.js → timer-CPT_vXom.js} +0 -0
  273. /package/dist/assets/{trash-2-B00-wGoJ.js → trash-2-CrA4LwJ2.js} +0 -0
  274. /package/dist/assets/{trash-CJS9T5-q.js → trash-ZGxZ3QGq.js} +0 -0
  275. /package/dist/assets/{types-un36DD9G.js → types-CswNghXe.js} +0 -0
  276. /package/dist/assets/{use-toast-BtZldTi5.js → use-toast-Hc8CXlvz.js} +0 -0
  277. /package/dist/assets/{useAsyncData-D89z7Kpl.js → useAsyncData-CI3ntihq.js} +0 -0
  278. /package/dist/assets/{useDebounce-PhGkOHyw.js → useDebounce-S9zaMzrr.js} +0 -0
  279. /package/dist/assets/{useDeepCompareMemoize-D1hTncYV.js → useDeepCompareMemoize-yyiB9aJX.js} +0 -0
  280. /package/dist/assets/{useIframeCapabilities-DDClcvJ3.js → useIframeCapabilities-Ba0L-TQN.js} +0 -0
  281. /package/dist/assets/{useTheme-0tqyqYah.js → useTheme-CAolwY4Q.js} +0 -0
  282. /package/dist/assets/{uuid-BukULOeS.js → uuid-ClFZlR7U.js} +0 -0
  283. /package/dist/assets/{workflow-BmruJ2Ti.js → workflow-DgZ_19fF.js} +0 -0
@@ -1,3 +1,3 @@
1
- import{r as Ke,s as ue,t as Or}from"./chunk-LvLJmgfZ.js";import{t as Ir}from"./react-Bj1aDYRI.js";import{t as br}from"./jsx-runtime-CP2fAiZX.js";import{d as Sr}from"./popover-2GpKY98n.js";import{t as Dr}from"./extends-CeSFM22p.js";function he(e,t){return he=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},he(e,t)}function Tr(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,he(e,t)}function Ve(e){if(e===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Er=Or(((e,t)=>{t.exports=function r(n,i){if(n===i)return!0;if(n&&i&&typeof n=="object"&&typeof i=="object"){if(n.constructor!==i.constructor)return!1;var s,o,a;if(Array.isArray(n)){if(s=n.length,s!=i.length)return!1;for(o=s;o--!==0;)if(!r(n[o],i[o]))return!1;return!0}if(n.constructor===RegExp)return n.source===i.source&&n.flags===i.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===i.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===i.toString();if(a=Object.keys(n),s=a.length,s!==Object.keys(i).length)return!1;for(o=s;o--!==0;)if(!Object.prototype.hasOwnProperty.call(i,a[o]))return!1;for(o=s;o--!==0;){var d=a[o];if(!r(n[d],i[d]))return!1}return!0}return n!==n&&i!==i}})),f=ue(Ir(),1);const Ye=(0,f.createContext)({dragDropManager:void 0});function R(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var qe=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),fe=function(){return Math.random().toString(36).substring(7).split("").join(".")},$e={INIT:"@@redux/INIT"+fe(),REPLACE:"@@redux/REPLACE"+fe(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+fe()}};function wr(e){if(typeof e!="object"||!e)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Xe(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw Error(R(0));if(typeof t=="function"&&r===void 0&&(r=t,t=void 0),r!==void 0){if(typeof r!="function")throw Error(R(1));return r(Xe)(e,t)}if(typeof e!="function")throw Error(R(2));var i=e,s=t,o=[],a=o,d=!1;function h(){a===o&&(a=o.slice())}function p(){if(d)throw Error(R(3));return s}function b(l){if(typeof l!="function")throw Error(R(4));if(d)throw Error(R(5));var u=!0;return h(),a.push(l),function(){if(u){if(d)throw Error(R(6));u=!1,h();var g=a.indexOf(l);a.splice(g,1),o=null}}}function I(l){if(!wr(l))throw Error(R(7));if(l.type===void 0)throw Error(R(8));if(d)throw Error(R(9));try{d=!0,s=i(s,l)}finally{d=!1}for(var u=o=a,g=0;g<u.length;g++){var O=u[g];O()}return l}function v(l){if(typeof l!="function")throw Error(R(10));i=l,I({type:$e.REPLACE})}function c(){var l,u=b;return l={subscribe:function(g){if(typeof g!="object"||!g)throw Error(R(11));function O(){g.next&&g.next(p())}return O(),{unsubscribe:u(O)}}},l[qe]=function(){return this},l}return I({type:$e.INIT}),n={dispatch:I,subscribe:b,getState:p,replaceReducer:v},n[qe]=c,n}function y(e,t,...r){if(xr()&&t===void 0)throw Error("invariant requires an error message argument");if(!e){let n;if(t===void 0)n=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let i=0;n=Error(t.replace(/%s/g,function(){return r[i++]})),n.name="Invariant Violation"}throw n.framesToPop=1,n}}function xr(){return typeof process<"u"&&!0}function Cr(e,t,r){return t.split(".").reduce((n,i)=>n&&n[i]?n[i]:r||null,e)}function Nr(e,t){return e.filter(r=>r!==t)}function Je(e){return typeof e=="object"}function Rr(e,t){let r=new Map,n=s=>{r.set(s,r.has(s)?r.get(s)+1:1)};e.forEach(n),t.forEach(n);let i=[];return r.forEach((s,o)=>{s===1&&i.push(o)}),i}function Pr(e,t){return e.filter(r=>t.indexOf(r)>-1)}const ge="dnd-core/INIT_COORDS",J="dnd-core/BEGIN_DRAG",pe="dnd-core/PUBLISH_DRAG_SOURCE",Q="dnd-core/HOVER",Z="dnd-core/DROP",ee="dnd-core/END_DRAG";function Qe(e,t){return{type:ge,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}var jr={type:ge,payload:{clientOffset:null,sourceClientOffset:null}};function _r(e){return function(t=[],r={publishSource:!0}){let{publishSource:n=!0,clientOffset:i,getSourceClientOffset:s}=r,o=e.getMonitor(),a=e.getRegistry();e.dispatch(Qe(i)),Mr(t,o,a);let d=kr(t,o);if(d==null){e.dispatch(jr);return}let h=null;if(i){if(!s)throw Error("getSourceClientOffset must be defined");Ar(s),h=s(d)}e.dispatch(Qe(i,h));let p=a.getSource(d).beginDrag(o,d);if(p!=null)return Lr(p),a.pinSource(d),{type:J,payload:{itemType:a.getSourceType(d),item:p,sourceId:d,clientOffset:i||null,sourceClientOffset:h||null,isSourcePublic:!!n}}}}function Mr(e,t,r){y(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(n){y(r.getSource(n),"Expected sourceIds to be registered.")})}function Ar(e){y(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Lr(e){y(Je(e),"Item must be an object.")}function kr(e,t){let r=null;for(let n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}function Hr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Hr(e,i,r[i])})}return e}function Ur(e){return function(t={}){let r=e.getMonitor(),n=e.getRegistry();Br(r),Gr(r).forEach((i,s)=>{let o={type:Z,payload:{dropResult:Fr({},t,zr(i,s,n,r))}};e.dispatch(o)})}}function Br(e){y(e.isDragging(),"Cannot call drop while not dragging."),y(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function zr(e,t,r,n){let i=r.getTarget(e),s=i?i.drop(n,e):void 0;return Wr(s),s===void 0&&(s=t===0?{}:n.getDropResult()),s}function Wr(e){y(e===void 0||Je(e),"Drop result must either be an object or undefined.")}function Gr(e){let t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Kr(e){return function(){let t=e.getMonitor(),r=e.getRegistry();Vr(t);let n=t.getSourceId();return n!=null&&(r.getSource(n,!0).endDrag(t,n),r.unpinSource()),{type:ee}}}function Vr(e){y(e.isDragging(),"Cannot call endDrag while not dragging.")}function ve(e,t){return t===null?e===null:Array.isArray(e)?e.some(r=>r===t):e===t}function Yr(e){return function(t,{clientOffset:r}={}){qr(t);let n=t.slice(0),i=e.getMonitor(),s=e.getRegistry();return Xr(n,s,i.getItemType()),$r(n,i,s),Jr(n,i,s),{type:Q,payload:{targetIds:n,clientOffset:r||null}}}}function qr(e){y(Array.isArray(e),"Expected targetIds to be an array.")}function $r(e,t,r){y(t.isDragging(),"Cannot call hover while not dragging."),y(!t.didDrop(),"Cannot call hover after drop.");for(let n=0;n<e.length;n++){let i=e[n];y(e.lastIndexOf(i)===n,"Expected targetIds to be unique in the passed array."),y(r.getTarget(i),"Expected targetIds to be registered.")}}function Xr(e,t,r){for(let n=e.length-1;n>=0;n--){let i=e[n];ve(t.getTargetType(i),r)||e.splice(n,1)}}function Jr(e,t,r){e.forEach(function(n){r.getTarget(n).hover(t,n)})}function Qr(e){return function(){if(e.getMonitor().isDragging())return{type:pe}}}function Zr(e){return{beginDrag:_r(e),publishDragSource:Qr(e),hover:Yr(e),drop:Ur(e),endDrag:Kr(e)}}var en=class{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){let e=this,{dispatch:t}=this.store;function r(i){return(...s)=>{let o=i.apply(e,s);o!==void 0&&t(o)}}let n=Zr(this);return Object.keys(n).reduce((i,s)=>{let o=n[s];return i[s]=r(o),i},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{let r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}};function tn(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Ze(e,t){return{x:e.x-t.x,y:e.y-t.y}}function rn(e){let{clientOffset:t,initialClientOffset:r,initialSourceClientOffset:n}=e;return!t||!r||!n?null:Ze(tn(t,n),r)}function nn(e){let{clientOffset:t,initialClientOffset:r}=e;return!t||!r?null:Ze(t,r)}const V=[],me=[];V.__IS_NONE__=!0,me.__IS_ALL__=!0;function sn(e,t){return e===V?!1:e===me||t===void 0?!0:Pr(t,e).length>0}var on=class{subscribeToStateChange(e,t={}){let{handlerIds:r}=t;y(typeof e=="function","listener must be a function."),y(r===void 0||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let n=this.store.getState().stateId;return this.store.subscribe(()=>{let i=this.store.getState(),s=i.stateId;try{s===n||s===n+1&&!sn(i.dirtyHandlerIds,r)||e()}finally{n=s}})}subscribeToOffsetChange(e){y(typeof e=="function","listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{let r=this.store.getState().dragOffset;r!==t&&(t=r,e())})}canDragSource(e){if(!e)return!1;let t=this.registry.getSource(e);return y(t,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;let t=this.registry.getTarget(e);return y(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop()?!1:ve(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;let t=this.registry.getSource(e,!0);return y(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic()||this.registry.getSourceType(e)!==this.getItemType()?!1:t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;let{shallow:r}=t;if(!this.isDragging())return!1;let n=this.registry.getTargetType(e),i=this.getItemType();if(i&&!ve(n,i))return!1;let s=this.getTargetIds();if(!s.length)return!1;let o=s.indexOf(e);return r?o===s.length-1:o>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return rn(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return nn(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}},et=typeof global<"u"?global:self,tt=et.MutationObserver||et.WebKitMutationObserver;function rt(e){return function(){let t=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(t),clearInterval(r),e()}}}function an(e){let t=1,r=new tt(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}const ln=typeof tt=="function"?an:rt;var dn=class{enqueueTask(e){let{queue:t,requestFlush:r}=this;t.length||(r(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{let{queue:e}=this;for(;this.index<e.length;){let t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let r=0,n=e.length-this.index;r<n;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=ln(this.flush),this.requestErrorThrow=rt(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},cn=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}},un=class{create(e){let t=this.freeTasks,r=t.length?t.pop():new cn(this.onError,n=>t[t.length]=n);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}},nt=new dn,hn=new un(nt.registerPendingError);function fn(e){nt.enqueueTask(hn.create(e))}const ye="dnd-core/ADD_SOURCE",Oe="dnd-core/ADD_TARGET",Ie="dnd-core/REMOVE_SOURCE",te="dnd-core/REMOVE_TARGET";function gn(e){return{type:ye,payload:{sourceId:e}}}function pn(e){return{type:Oe,payload:{targetId:e}}}function vn(e){return{type:Ie,payload:{sourceId:e}}}function mn(e){return{type:te,payload:{targetId:e}}}function yn(e){y(typeof e.canDrag=="function","Expected canDrag to be a function."),y(typeof e.beginDrag=="function","Expected beginDrag to be a function."),y(typeof e.endDrag=="function","Expected endDrag to be a function.")}function On(e){y(typeof e.canDrop=="function","Expected canDrop to be a function."),y(typeof e.hover=="function","Expected hover to be a function."),y(typeof e.drop=="function","Expected beginDrag to be a function.")}function be(e,t){if(t&&Array.isArray(e)){e.forEach(r=>be(r,!1));return}y(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var P;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(P||(P={}));var In=0;function bn(){return In++}function Sn(e){let t=bn().toString();switch(e){case P.SOURCE:return`S${t}`;case P.TARGET:return`T${t}`;default:throw Error(`Unknown Handler Role: ${e}`)}}function it(e){switch(e[0]){case"S":return P.SOURCE;case"T":return P.TARGET;default:throw Error(`Cannot parse handler ID: ${e}`)}}function st(e,t){let r=e.entries(),n=!1;do{let{done:i,value:[,s]}=r.next();if(s===t)return!0;n=!!i}while(!n);return!1}var Dn=class{addSource(e,t){be(e),yn(t);let r=this.addHandler(P.SOURCE,e,t);return this.store.dispatch(gn(r)),r}addTarget(e,t){be(e,!0),On(t);let r=this.addHandler(P.TARGET,e,t);return this.store.dispatch(pn(r)),r}containsHandler(e){return st(this.dragSources,e)||st(this.dropTargets,e)}getSource(e,t=!1){return y(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return y(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return y(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return y(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return it(e)===P.SOURCE}isTargetId(e){return it(e)===P.TARGET}removeSource(e){y(this.getSource(e),"Expected an existing source."),this.store.dispatch(vn(e)),fn(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){y(this.getTarget(e),"Expected an existing target."),this.store.dispatch(mn(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){let t=this.getSource(e);y(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){y(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,r){let n=Sn(e);return this.types.set(n,t),e===P.SOURCE?this.dragSources.set(n,r):e===P.TARGET&&this.dropTargets.set(n,r),n}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}};const Tn=(e,t)=>e===t;function En(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function wn(e,t,r=Tn){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!r(e[n],t[n]))return!1;return!0}function xn(e=V,t){switch(t.type){case Q:break;case ye:case Oe:case te:case Ie:return V;case J:case pe:case ee:case Z:default:return me}let{targetIds:r=[],prevTargetIds:n=[]}=t.payload,i=Rr(r,n);if(!(i.length>0||!wn(r,n)))return V;let s=n[n.length-1],o=r[r.length-1];return s!==o&&(s&&i.push(s),o&&i.push(o)),i}function Cn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Cn(e,i,r[i])})}return e}var ot={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Rn(e=ot,t){let{payload:r}=t;switch(t.type){case ge:case J:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case Q:return En(e.clientOffset,r.clientOffset)?e:Nn({},e,{clientOffset:r.clientOffset});case ee:case Z:return ot;default:return e}}function Pn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function U(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Pn(e,i,r[i])})}return e}var jn={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function _n(e=jn,t){let{payload:r}=t;switch(t.type){case J:return U({},e,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case pe:return U({},e,{isSourcePublic:!0});case Q:return U({},e,{targetIds:r.targetIds});case te:return e.targetIds.indexOf(r.targetId)===-1?e:U({},e,{targetIds:Nr(e.targetIds,r.targetId)});case Z:return U({},e,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case ee:return U({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function Mn(e=0,t){switch(t.type){case ye:case Oe:return e+1;case Ie:case te:return e-1;default:return e}}function An(e=0){return e+1}function Ln(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Ln(e,i,r[i])})}return e}function Hn(e={},t){return{dirtyHandlerIds:xn(e.dirtyHandlerIds,{type:t.type,payload:kn({},t.payload,{prevTargetIds:Cr(e,"dragOperation.targetIds",[])})}),dragOffset:Rn(e.dragOffset,t),refCount:Mn(e.refCount,t),dragOperation:_n(e.dragOperation,t),stateId:An(e.stateId)}}function Fn(e,t=void 0,r={},n=!1){let i=Un(n),s=new en(i,new on(i,new Dn(i))),o=e(s,t,r);return s.receiveBackend(o),s}function Un(e){let t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Xe(Hn,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}var m=ue(br(),1);function Bn(e,t){if(e==null)return{};var r=zn(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function zn(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,s;for(s=0;s<n.length;s++)i=n[s],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var at=0,re=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),lt=(0,f.memo)(function(e){var{children:t}=e;let[r,n]=Wn(Bn(e,["children"]));return(0,f.useEffect)(()=>{if(n){let i=dt();return++at,()=>{--at===0&&(i[re]=null)}}},[]),(0,m.jsx)(Ye.Provider,{value:r,children:t})});function Wn(e){return"manager"in e?[{dragDropManager:e.manager},!1]:[Gn(e.backend,e.context,e.options,e.debugMode),!e.context]}function Gn(e,t=dt(),r,n){let i=t;return i[re]||(i[re]={dragDropManager:Fn(e,t,r,n)}),i[re]}function dt(){return typeof global<"u"?global:window}const k=typeof window<"u"?f.useLayoutEffect:f.useEffect;var Kn=ue(Er(),1);function ct(e,t,r){let[n,i]=(0,f.useState)(()=>t(e)),s=(0,f.useCallback)(()=>{let o=t(e);(0,Kn.default)(n,o)||(i(o),r&&r())},[n,e,r]);return k(s),[n,s]}function Vn(e,t,r){let[n,i]=ct(e,t,r);return k(function(){let s=e.getHandlerId();if(s!=null)return e.subscribeToStateChange(i,{handlerIds:[s]})},[e,i]),n}function ut(e,t,r){return Vn(t,e||(()=>({})),()=>r.reconnect())}function ht(e,t){let r=[...t||[]];return t==null&&typeof e!="function"&&r.push(e),(0,f.useMemo)(()=>typeof e=="function"?e():e,r)}function Yn(e){return(0,f.useMemo)(()=>e.hooks.dragSource(),[e])}function qn(e){return(0,f.useMemo)(()=>e.hooks.dragPreview(),[e])}var Se=!1,De=!1,$n=class{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){y(!Se,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Se=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Se=!1}}isDragging(){if(!this.sourceId)return!1;y(!De,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return De=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{De=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}},Te=!1,Xn=class{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;y(!Te,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Te=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Te=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}};function Jn(e,t,r){let n=r.getRegistry(),i=n.addTarget(e,t);return[i,()=>n.removeTarget(i)]}function Qn(e,t,r){let n=r.getRegistry(),i=n.addSource(e,t);return[i,()=>n.removeSource(i)]}function Ee(e,t,r,n){let i=r?r.call(n,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;let s=Object.keys(e),o=Object.keys(t);if(s.length!==o.length)return!1;let a=Object.prototype.hasOwnProperty.bind(t);for(let d=0;d<s.length;d++){let h=s[d];if(!a(h))return!1;let p=e[h],b=t[h];if(i=r?r.call(n,p,b,h):void 0,i===!1||i===void 0&&p!==b)return!1}return!0}function we(e){return typeof e=="object"&&!!e&&Object.prototype.hasOwnProperty.call(e,"current")}function Zn(e){if(typeof e.type=="string")return;let t=e.type.displayName||e.type.name||"the component";throw Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function ei(e){return(t=null,r=null)=>{if(!(0,f.isValidElement)(t)){let i=t;return e(i,r),i}let n=t;return Zn(n),ti(n,r?i=>e(i,r):e)}}function ft(e){let t={};return Object.keys(e).forEach(r=>{let n=e[r];if(r.endsWith("Ref"))t[r]=e[r];else{let i=ei(n);t[r]=()=>i}}),t}function gt(e,t){typeof e=="function"?e(t):e.current=t}function ti(e,t){let r=e.ref;return y(typeof r!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?(0,f.cloneElement)(e,{ref:n=>{gt(r,n),gt(t,n)}}):(0,f.cloneElement)(e,{ref:t})}var ri=class{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){let e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){let e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(e=!1){let t=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),this.handlerId){if(!t){this.lastConnectedDragPreview=t;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!Ee(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Ee(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe=(this.dragSourceUnsubscribe(),void 0))}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=ft({dragSource:(t,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,we(t)?this.dragSourceRef=t:this.dragSourceNode=t,this.reconnectDragSource()},dragPreview:(t,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,we(t)?this.dragPreviewRef=t:this.dragPreviewNode=t,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}},ni=class{get connectTarget(){return this.dropTarget}reconnect(){let e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();let t=this.dropTarget;if(this.handlerId){if(!t){this.lastConnectedDropTarget=t;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!Ee(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget=(this.unsubscribeDropTarget(),void 0))}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=ft({dropTarget:(t,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,we(t)?this.dropTargetRef=t:this.dropTargetNode=t,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}};function A(){let{dragDropManager:e}=(0,f.useContext)(Ye);return y(e!=null,"Expected drag drop context"),e}function ii(e,t){let r=A(),n=(0,f.useMemo)(()=>new ri(r.getBackend()),[r]);return k(()=>(n.dragSourceOptions=e||null,n.reconnect(),()=>n.disconnectDragSource()),[n,e]),k(()=>(n.dragPreviewOptions=t||null,n.reconnect(),()=>n.disconnectDragPreview()),[n,t]),n}function si(){let e=A();return(0,f.useMemo)(()=>new $n(e),[e])}var oi=class{beginDrag(){let e=this.spec,t=this.monitor,r=null;return r=typeof e.item=="object"?e.item:typeof e.item=="function"?e.item(t):{},r??null}canDrag(){let e=this.spec,t=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(t):!0}isDragging(e,t){let r=this.spec,n=this.monitor,{isDragging:i}=r;return i?i(n):t===e.getSourceId()}endDrag(){let e=this.spec,t=this.monitor,r=this.connector,{end:n}=e;n&&n(t.getItem(),t),r.reconnect()}constructor(e,t,r){this.spec=e,this.monitor=t,this.connector=r}};function ai(e,t,r){let n=(0,f.useMemo)(()=>new oi(e,t,r),[t,r]);return(0,f.useEffect)(()=>{n.spec=e},[e]),n}function li(e){return(0,f.useMemo)(()=>{let t=e.type;return y(t!=null,"spec.type must be defined"),t},[e])}function di(e,t,r){let n=A(),i=ai(e,t,r),s=li(e);k(function(){if(s!=null){let[o,a]=Qn(s,i,n);return t.receiveHandlerId(o),r.receiveHandlerId(o),a}},[n,t,r,i,s])}function ci(e,t){let r=ht(e,t);y(!r.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");let n=si(),i=ii(r.options,r.previewOptions);return di(r,n,i),[ut(r.collect,n,i),Yn(i),qn(i)]}function ui(e){let t=A().getMonitor(),[r,n]=ct(t,e);return(0,f.useEffect)(()=>t.subscribeToOffsetChange(n)),(0,f.useEffect)(()=>t.subscribeToStateChange(n)),r}function hi(e){return(0,f.useMemo)(()=>e.hooks.dropTarget(),[e])}function fi(e){let t=A(),r=(0,f.useMemo)(()=>new ni(t.getBackend()),[t]);return k(()=>(r.dropTargetOptions=e||null,r.reconnect(),()=>r.disconnectDropTarget()),[e]),r}function gi(){let e=A();return(0,f.useMemo)(()=>new Xn(e),[e])}function pi(e){let{accept:t}=e;return(0,f.useMemo)(()=>(y(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}var vi=class{canDrop(){let e=this.spec,t=this.monitor;return e.canDrop?e.canDrop(t.getItem(),t):!0}hover(){let e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){let e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}};function mi(e,t){let r=(0,f.useMemo)(()=>new vi(e,t),[t]);return(0,f.useEffect)(()=>{r.spec=e},[e]),r}function yi(e,t,r){let n=A(),i=mi(e,t),s=pi(e);k(function(){let[o,a]=Jn(s,i,n);return t.receiveHandlerId(o),r.receiveHandlerId(o),a},[n,t,i,r,s.map(o=>o.toString()).join("|")])}function pt(e,t){let r=ht(e,t),n=gi(),i=fi(r.options);return yi(r,n,i),[ut(r.collect,n,i),hi(i)]}function vt(e){let t=null;return()=>(t??(t=e()),t)}function Oi(e,t){return e.filter(r=>r!==t)}function Ii(e,t){let r=new Set,n=s=>r.add(s);e.forEach(n),t.forEach(n);let i=[];return r.forEach(s=>i.push(s)),i}var bi=class{enter(e){let t=this.entered.length;return this.entered=Ii(this.entered.filter(r=>this.isNodeInDocument(r)&&(!r.contains||r.contains(e))),[e]),t===0&&this.entered.length>0}leave(e){let t=this.entered.length;return this.entered=Oi(this.entered.filter(this.isNodeInDocument),e),t>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}},Si=class{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){let t={};Object.keys(this.config.exposeProperties).forEach(r=>{let n=this.config.exposeProperties[r];n!=null&&(t[r]={value:n(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}},mt=Ke({FILE:()=>yt,HTML:()=>bt,TEXT:()=>It,URL:()=>Ot},1);const yt="__NATIVE_FILE__",Ot="__NATIVE_URL__",It="__NATIVE_TEXT__",bt="__NATIVE_HTML__";function xe(e,t,r){return t.reduce((n,i)=>n||e.getData(i),"")??r}const Ce={[yt]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[bt]:{exposeProperties:{html:(e,t)=>xe(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[Ot]:{exposeProperties:{urls:(e,t)=>xe(e,t,"").split(`
1
+ import{r as Ke,s as ue,t as Or}from"./chunk-LvLJmgfZ.js";import{t as Ir}from"./react-Bj1aDYRI.js";import{t as br}from"./jsx-runtime-CP2fAiZX.js";import{d as Sr}from"./popover-C7N9RyXk.js";import{t as Dr}from"./extends-B9D0JO9U.js";function he(e,t){return he=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},he(e,t)}function Tr(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,he(e,t)}function Ve(e){if(e===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Er=Or(((e,t)=>{t.exports=function r(n,i){if(n===i)return!0;if(n&&i&&typeof n=="object"&&typeof i=="object"){if(n.constructor!==i.constructor)return!1;var s,o,a;if(Array.isArray(n)){if(s=n.length,s!=i.length)return!1;for(o=s;o--!==0;)if(!r(n[o],i[o]))return!1;return!0}if(n.constructor===RegExp)return n.source===i.source&&n.flags===i.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===i.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===i.toString();if(a=Object.keys(n),s=a.length,s!==Object.keys(i).length)return!1;for(o=s;o--!==0;)if(!Object.prototype.hasOwnProperty.call(i,a[o]))return!1;for(o=s;o--!==0;){var d=a[o];if(!r(n[d],i[d]))return!1}return!0}return n!==n&&i!==i}})),f=ue(Ir(),1);const Ye=(0,f.createContext)({dragDropManager:void 0});function R(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var qe=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),fe=function(){return Math.random().toString(36).substring(7).split("").join(".")},$e={INIT:"@@redux/INIT"+fe(),REPLACE:"@@redux/REPLACE"+fe(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+fe()}};function wr(e){if(typeof e!="object"||!e)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Xe(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw Error(R(0));if(typeof t=="function"&&r===void 0&&(r=t,t=void 0),r!==void 0){if(typeof r!="function")throw Error(R(1));return r(Xe)(e,t)}if(typeof e!="function")throw Error(R(2));var i=e,s=t,o=[],a=o,d=!1;function h(){a===o&&(a=o.slice())}function p(){if(d)throw Error(R(3));return s}function b(l){if(typeof l!="function")throw Error(R(4));if(d)throw Error(R(5));var u=!0;return h(),a.push(l),function(){if(u){if(d)throw Error(R(6));u=!1,h();var g=a.indexOf(l);a.splice(g,1),o=null}}}function I(l){if(!wr(l))throw Error(R(7));if(l.type===void 0)throw Error(R(8));if(d)throw Error(R(9));try{d=!0,s=i(s,l)}finally{d=!1}for(var u=o=a,g=0;g<u.length;g++){var O=u[g];O()}return l}function v(l){if(typeof l!="function")throw Error(R(10));i=l,I({type:$e.REPLACE})}function c(){var l,u=b;return l={subscribe:function(g){if(typeof g!="object"||!g)throw Error(R(11));function O(){g.next&&g.next(p())}return O(),{unsubscribe:u(O)}}},l[qe]=function(){return this},l}return I({type:$e.INIT}),n={dispatch:I,subscribe:b,getState:p,replaceReducer:v},n[qe]=c,n}function y(e,t,...r){if(xr()&&t===void 0)throw Error("invariant requires an error message argument");if(!e){let n;if(t===void 0)n=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let i=0;n=Error(t.replace(/%s/g,function(){return r[i++]})),n.name="Invariant Violation"}throw n.framesToPop=1,n}}function xr(){return typeof process<"u"&&!0}function Cr(e,t,r){return t.split(".").reduce((n,i)=>n&&n[i]?n[i]:r||null,e)}function Nr(e,t){return e.filter(r=>r!==t)}function Je(e){return typeof e=="object"}function Rr(e,t){let r=new Map,n=s=>{r.set(s,r.has(s)?r.get(s)+1:1)};e.forEach(n),t.forEach(n);let i=[];return r.forEach((s,o)=>{s===1&&i.push(o)}),i}function Pr(e,t){return e.filter(r=>t.indexOf(r)>-1)}const ge="dnd-core/INIT_COORDS",J="dnd-core/BEGIN_DRAG",pe="dnd-core/PUBLISH_DRAG_SOURCE",Q="dnd-core/HOVER",Z="dnd-core/DROP",ee="dnd-core/END_DRAG";function Qe(e,t){return{type:ge,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}var jr={type:ge,payload:{clientOffset:null,sourceClientOffset:null}};function _r(e){return function(t=[],r={publishSource:!0}){let{publishSource:n=!0,clientOffset:i,getSourceClientOffset:s}=r,o=e.getMonitor(),a=e.getRegistry();e.dispatch(Qe(i)),Mr(t,o,a);let d=kr(t,o);if(d==null){e.dispatch(jr);return}let h=null;if(i){if(!s)throw Error("getSourceClientOffset must be defined");Ar(s),h=s(d)}e.dispatch(Qe(i,h));let p=a.getSource(d).beginDrag(o,d);if(p!=null)return Lr(p),a.pinSource(d),{type:J,payload:{itemType:a.getSourceType(d),item:p,sourceId:d,clientOffset:i||null,sourceClientOffset:h||null,isSourcePublic:!!n}}}}function Mr(e,t,r){y(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(n){y(r.getSource(n),"Expected sourceIds to be registered.")})}function Ar(e){y(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Lr(e){y(Je(e),"Item must be an object.")}function kr(e,t){let r=null;for(let n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}function Hr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Hr(e,i,r[i])})}return e}function Ur(e){return function(t={}){let r=e.getMonitor(),n=e.getRegistry();Br(r),Gr(r).forEach((i,s)=>{let o={type:Z,payload:{dropResult:Fr({},t,zr(i,s,n,r))}};e.dispatch(o)})}}function Br(e){y(e.isDragging(),"Cannot call drop while not dragging."),y(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function zr(e,t,r,n){let i=r.getTarget(e),s=i?i.drop(n,e):void 0;return Wr(s),s===void 0&&(s=t===0?{}:n.getDropResult()),s}function Wr(e){y(e===void 0||Je(e),"Drop result must either be an object or undefined.")}function Gr(e){let t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Kr(e){return function(){let t=e.getMonitor(),r=e.getRegistry();Vr(t);let n=t.getSourceId();return n!=null&&(r.getSource(n,!0).endDrag(t,n),r.unpinSource()),{type:ee}}}function Vr(e){y(e.isDragging(),"Cannot call endDrag while not dragging.")}function ve(e,t){return t===null?e===null:Array.isArray(e)?e.some(r=>r===t):e===t}function Yr(e){return function(t,{clientOffset:r}={}){qr(t);let n=t.slice(0),i=e.getMonitor(),s=e.getRegistry();return Xr(n,s,i.getItemType()),$r(n,i,s),Jr(n,i,s),{type:Q,payload:{targetIds:n,clientOffset:r||null}}}}function qr(e){y(Array.isArray(e),"Expected targetIds to be an array.")}function $r(e,t,r){y(t.isDragging(),"Cannot call hover while not dragging."),y(!t.didDrop(),"Cannot call hover after drop.");for(let n=0;n<e.length;n++){let i=e[n];y(e.lastIndexOf(i)===n,"Expected targetIds to be unique in the passed array."),y(r.getTarget(i),"Expected targetIds to be registered.")}}function Xr(e,t,r){for(let n=e.length-1;n>=0;n--){let i=e[n];ve(t.getTargetType(i),r)||e.splice(n,1)}}function Jr(e,t,r){e.forEach(function(n){r.getTarget(n).hover(t,n)})}function Qr(e){return function(){if(e.getMonitor().isDragging())return{type:pe}}}function Zr(e){return{beginDrag:_r(e),publishDragSource:Qr(e),hover:Yr(e),drop:Ur(e),endDrag:Kr(e)}}var en=class{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){let e=this,{dispatch:t}=this.store;function r(i){return(...s)=>{let o=i.apply(e,s);o!==void 0&&t(o)}}let n=Zr(this);return Object.keys(n).reduce((i,s)=>{let o=n[s];return i[s]=r(o),i},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{let r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}};function tn(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Ze(e,t){return{x:e.x-t.x,y:e.y-t.y}}function rn(e){let{clientOffset:t,initialClientOffset:r,initialSourceClientOffset:n}=e;return!t||!r||!n?null:Ze(tn(t,n),r)}function nn(e){let{clientOffset:t,initialClientOffset:r}=e;return!t||!r?null:Ze(t,r)}const V=[],me=[];V.__IS_NONE__=!0,me.__IS_ALL__=!0;function sn(e,t){return e===V?!1:e===me||t===void 0?!0:Pr(t,e).length>0}var on=class{subscribeToStateChange(e,t={}){let{handlerIds:r}=t;y(typeof e=="function","listener must be a function."),y(r===void 0||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let n=this.store.getState().stateId;return this.store.subscribe(()=>{let i=this.store.getState(),s=i.stateId;try{s===n||s===n+1&&!sn(i.dirtyHandlerIds,r)||e()}finally{n=s}})}subscribeToOffsetChange(e){y(typeof e=="function","listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{let r=this.store.getState().dragOffset;r!==t&&(t=r,e())})}canDragSource(e){if(!e)return!1;let t=this.registry.getSource(e);return y(t,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;let t=this.registry.getTarget(e);return y(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop()?!1:ve(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;let t=this.registry.getSource(e,!0);return y(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic()||this.registry.getSourceType(e)!==this.getItemType()?!1:t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;let{shallow:r}=t;if(!this.isDragging())return!1;let n=this.registry.getTargetType(e),i=this.getItemType();if(i&&!ve(n,i))return!1;let s=this.getTargetIds();if(!s.length)return!1;let o=s.indexOf(e);return r?o===s.length-1:o>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return rn(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return nn(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}},et=typeof global<"u"?global:self,tt=et.MutationObserver||et.WebKitMutationObserver;function rt(e){return function(){let t=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(t),clearInterval(r),e()}}}function an(e){let t=1,r=new tt(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}const ln=typeof tt=="function"?an:rt;var dn=class{enqueueTask(e){let{queue:t,requestFlush:r}=this;t.length||(r(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{let{queue:e}=this;for(;this.index<e.length;){let t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let r=0,n=e.length-this.index;r<n;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=ln(this.flush),this.requestErrorThrow=rt(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},cn=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}},un=class{create(e){let t=this.freeTasks,r=t.length?t.pop():new cn(this.onError,n=>t[t.length]=n);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}},nt=new dn,hn=new un(nt.registerPendingError);function fn(e){nt.enqueueTask(hn.create(e))}const ye="dnd-core/ADD_SOURCE",Oe="dnd-core/ADD_TARGET",Ie="dnd-core/REMOVE_SOURCE",te="dnd-core/REMOVE_TARGET";function gn(e){return{type:ye,payload:{sourceId:e}}}function pn(e){return{type:Oe,payload:{targetId:e}}}function vn(e){return{type:Ie,payload:{sourceId:e}}}function mn(e){return{type:te,payload:{targetId:e}}}function yn(e){y(typeof e.canDrag=="function","Expected canDrag to be a function."),y(typeof e.beginDrag=="function","Expected beginDrag to be a function."),y(typeof e.endDrag=="function","Expected endDrag to be a function.")}function On(e){y(typeof e.canDrop=="function","Expected canDrop to be a function."),y(typeof e.hover=="function","Expected hover to be a function."),y(typeof e.drop=="function","Expected beginDrag to be a function.")}function be(e,t){if(t&&Array.isArray(e)){e.forEach(r=>be(r,!1));return}y(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var P;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(P||(P={}));var In=0;function bn(){return In++}function Sn(e){let t=bn().toString();switch(e){case P.SOURCE:return`S${t}`;case P.TARGET:return`T${t}`;default:throw Error(`Unknown Handler Role: ${e}`)}}function it(e){switch(e[0]){case"S":return P.SOURCE;case"T":return P.TARGET;default:throw Error(`Cannot parse handler ID: ${e}`)}}function st(e,t){let r=e.entries(),n=!1;do{let{done:i,value:[,s]}=r.next();if(s===t)return!0;n=!!i}while(!n);return!1}var Dn=class{addSource(e,t){be(e),yn(t);let r=this.addHandler(P.SOURCE,e,t);return this.store.dispatch(gn(r)),r}addTarget(e,t){be(e,!0),On(t);let r=this.addHandler(P.TARGET,e,t);return this.store.dispatch(pn(r)),r}containsHandler(e){return st(this.dragSources,e)||st(this.dropTargets,e)}getSource(e,t=!1){return y(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return y(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return y(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return y(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return it(e)===P.SOURCE}isTargetId(e){return it(e)===P.TARGET}removeSource(e){y(this.getSource(e),"Expected an existing source."),this.store.dispatch(vn(e)),fn(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){y(this.getTarget(e),"Expected an existing target."),this.store.dispatch(mn(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){let t=this.getSource(e);y(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){y(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,r){let n=Sn(e);return this.types.set(n,t),e===P.SOURCE?this.dragSources.set(n,r):e===P.TARGET&&this.dropTargets.set(n,r),n}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}};const Tn=(e,t)=>e===t;function En(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function wn(e,t,r=Tn){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!r(e[n],t[n]))return!1;return!0}function xn(e=V,t){switch(t.type){case Q:break;case ye:case Oe:case te:case Ie:return V;case J:case pe:case ee:case Z:default:return me}let{targetIds:r=[],prevTargetIds:n=[]}=t.payload,i=Rr(r,n);if(!(i.length>0||!wn(r,n)))return V;let s=n[n.length-1],o=r[r.length-1];return s!==o&&(s&&i.push(s),o&&i.push(o)),i}function Cn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Cn(e,i,r[i])})}return e}var ot={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Rn(e=ot,t){let{payload:r}=t;switch(t.type){case ge:case J:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case Q:return En(e.clientOffset,r.clientOffset)?e:Nn({},e,{clientOffset:r.clientOffset});case ee:case Z:return ot;default:return e}}function Pn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function U(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Pn(e,i,r[i])})}return e}var jn={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function _n(e=jn,t){let{payload:r}=t;switch(t.type){case J:return U({},e,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case pe:return U({},e,{isSourcePublic:!0});case Q:return U({},e,{targetIds:r.targetIds});case te:return e.targetIds.indexOf(r.targetId)===-1?e:U({},e,{targetIds:Nr(e.targetIds,r.targetId)});case Z:return U({},e,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case ee:return U({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function Mn(e=0,t){switch(t.type){case ye:case Oe:return e+1;case Ie:case te:return e-1;default:return e}}function An(e=0){return e+1}function Ln(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Ln(e,i,r[i])})}return e}function Hn(e={},t){return{dirtyHandlerIds:xn(e.dirtyHandlerIds,{type:t.type,payload:kn({},t.payload,{prevTargetIds:Cr(e,"dragOperation.targetIds",[])})}),dragOffset:Rn(e.dragOffset,t),refCount:Mn(e.refCount,t),dragOperation:_n(e.dragOperation,t),stateId:An(e.stateId)}}function Fn(e,t=void 0,r={},n=!1){let i=Un(n),s=new en(i,new on(i,new Dn(i))),o=e(s,t,r);return s.receiveBackend(o),s}function Un(e){let t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Xe(Hn,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}var m=ue(br(),1);function Bn(e,t){if(e==null)return{};var r=zn(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function zn(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,s;for(s=0;s<n.length;s++)i=n[s],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var at=0,re=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),lt=(0,f.memo)(function(e){var{children:t}=e;let[r,n]=Wn(Bn(e,["children"]));return(0,f.useEffect)(()=>{if(n){let i=dt();return++at,()=>{--at===0&&(i[re]=null)}}},[]),(0,m.jsx)(Ye.Provider,{value:r,children:t})});function Wn(e){return"manager"in e?[{dragDropManager:e.manager},!1]:[Gn(e.backend,e.context,e.options,e.debugMode),!e.context]}function Gn(e,t=dt(),r,n){let i=t;return i[re]||(i[re]={dragDropManager:Fn(e,t,r,n)}),i[re]}function dt(){return typeof global<"u"?global:window}const k=typeof window<"u"?f.useLayoutEffect:f.useEffect;var Kn=ue(Er(),1);function ct(e,t,r){let[n,i]=(0,f.useState)(()=>t(e)),s=(0,f.useCallback)(()=>{let o=t(e);(0,Kn.default)(n,o)||(i(o),r&&r())},[n,e,r]);return k(s),[n,s]}function Vn(e,t,r){let[n,i]=ct(e,t,r);return k(function(){let s=e.getHandlerId();if(s!=null)return e.subscribeToStateChange(i,{handlerIds:[s]})},[e,i]),n}function ut(e,t,r){return Vn(t,e||(()=>({})),()=>r.reconnect())}function ht(e,t){let r=[...t||[]];return t==null&&typeof e!="function"&&r.push(e),(0,f.useMemo)(()=>typeof e=="function"?e():e,r)}function Yn(e){return(0,f.useMemo)(()=>e.hooks.dragSource(),[e])}function qn(e){return(0,f.useMemo)(()=>e.hooks.dragPreview(),[e])}var Se=!1,De=!1,$n=class{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){y(!Se,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Se=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Se=!1}}isDragging(){if(!this.sourceId)return!1;y(!De,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return De=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{De=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}},Te=!1,Xn=class{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;y(!Te,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Te=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Te=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}};function Jn(e,t,r){let n=r.getRegistry(),i=n.addTarget(e,t);return[i,()=>n.removeTarget(i)]}function Qn(e,t,r){let n=r.getRegistry(),i=n.addSource(e,t);return[i,()=>n.removeSource(i)]}function Ee(e,t,r,n){let i=r?r.call(n,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;let s=Object.keys(e),o=Object.keys(t);if(s.length!==o.length)return!1;let a=Object.prototype.hasOwnProperty.bind(t);for(let d=0;d<s.length;d++){let h=s[d];if(!a(h))return!1;let p=e[h],b=t[h];if(i=r?r.call(n,p,b,h):void 0,i===!1||i===void 0&&p!==b)return!1}return!0}function we(e){return typeof e=="object"&&!!e&&Object.prototype.hasOwnProperty.call(e,"current")}function Zn(e){if(typeof e.type=="string")return;let t=e.type.displayName||e.type.name||"the component";throw Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function ei(e){return(t=null,r=null)=>{if(!(0,f.isValidElement)(t)){let i=t;return e(i,r),i}let n=t;return Zn(n),ti(n,r?i=>e(i,r):e)}}function ft(e){let t={};return Object.keys(e).forEach(r=>{let n=e[r];if(r.endsWith("Ref"))t[r]=e[r];else{let i=ei(n);t[r]=()=>i}}),t}function gt(e,t){typeof e=="function"?e(t):e.current=t}function ti(e,t){let r=e.ref;return y(typeof r!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?(0,f.cloneElement)(e,{ref:n=>{gt(r,n),gt(t,n)}}):(0,f.cloneElement)(e,{ref:t})}var ri=class{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){let e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){let e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(e=!1){let t=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),this.handlerId){if(!t){this.lastConnectedDragPreview=t;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!Ee(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Ee(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe=(this.dragSourceUnsubscribe(),void 0))}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=ft({dragSource:(t,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,we(t)?this.dragSourceRef=t:this.dragSourceNode=t,this.reconnectDragSource()},dragPreview:(t,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,we(t)?this.dragPreviewRef=t:this.dragPreviewNode=t,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}},ni=class{get connectTarget(){return this.dropTarget}reconnect(){let e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();let t=this.dropTarget;if(this.handlerId){if(!t){this.lastConnectedDropTarget=t;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!Ee(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget=(this.unsubscribeDropTarget(),void 0))}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=ft({dropTarget:(t,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,we(t)?this.dropTargetRef=t:this.dropTargetNode=t,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}};function A(){let{dragDropManager:e}=(0,f.useContext)(Ye);return y(e!=null,"Expected drag drop context"),e}function ii(e,t){let r=A(),n=(0,f.useMemo)(()=>new ri(r.getBackend()),[r]);return k(()=>(n.dragSourceOptions=e||null,n.reconnect(),()=>n.disconnectDragSource()),[n,e]),k(()=>(n.dragPreviewOptions=t||null,n.reconnect(),()=>n.disconnectDragPreview()),[n,t]),n}function si(){let e=A();return(0,f.useMemo)(()=>new $n(e),[e])}var oi=class{beginDrag(){let e=this.spec,t=this.monitor,r=null;return r=typeof e.item=="object"?e.item:typeof e.item=="function"?e.item(t):{},r??null}canDrag(){let e=this.spec,t=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(t):!0}isDragging(e,t){let r=this.spec,n=this.monitor,{isDragging:i}=r;return i?i(n):t===e.getSourceId()}endDrag(){let e=this.spec,t=this.monitor,r=this.connector,{end:n}=e;n&&n(t.getItem(),t),r.reconnect()}constructor(e,t,r){this.spec=e,this.monitor=t,this.connector=r}};function ai(e,t,r){let n=(0,f.useMemo)(()=>new oi(e,t,r),[t,r]);return(0,f.useEffect)(()=>{n.spec=e},[e]),n}function li(e){return(0,f.useMemo)(()=>{let t=e.type;return y(t!=null,"spec.type must be defined"),t},[e])}function di(e,t,r){let n=A(),i=ai(e,t,r),s=li(e);k(function(){if(s!=null){let[o,a]=Qn(s,i,n);return t.receiveHandlerId(o),r.receiveHandlerId(o),a}},[n,t,r,i,s])}function ci(e,t){let r=ht(e,t);y(!r.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");let n=si(),i=ii(r.options,r.previewOptions);return di(r,n,i),[ut(r.collect,n,i),Yn(i),qn(i)]}function ui(e){let t=A().getMonitor(),[r,n]=ct(t,e);return(0,f.useEffect)(()=>t.subscribeToOffsetChange(n)),(0,f.useEffect)(()=>t.subscribeToStateChange(n)),r}function hi(e){return(0,f.useMemo)(()=>e.hooks.dropTarget(),[e])}function fi(e){let t=A(),r=(0,f.useMemo)(()=>new ni(t.getBackend()),[t]);return k(()=>(r.dropTargetOptions=e||null,r.reconnect(),()=>r.disconnectDropTarget()),[e]),r}function gi(){let e=A();return(0,f.useMemo)(()=>new Xn(e),[e])}function pi(e){let{accept:t}=e;return(0,f.useMemo)(()=>(y(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}var vi=class{canDrop(){let e=this.spec,t=this.monitor;return e.canDrop?e.canDrop(t.getItem(),t):!0}hover(){let e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){let e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}};function mi(e,t){let r=(0,f.useMemo)(()=>new vi(e,t),[t]);return(0,f.useEffect)(()=>{r.spec=e},[e]),r}function yi(e,t,r){let n=A(),i=mi(e,t),s=pi(e);k(function(){let[o,a]=Jn(s,i,n);return t.receiveHandlerId(o),r.receiveHandlerId(o),a},[n,t,i,r,s.map(o=>o.toString()).join("|")])}function pt(e,t){let r=ht(e,t),n=gi(),i=fi(r.options);return yi(r,n,i),[ut(r.collect,n,i),hi(i)]}function vt(e){let t=null;return()=>(t??(t=e()),t)}function Oi(e,t){return e.filter(r=>r!==t)}function Ii(e,t){let r=new Set,n=s=>r.add(s);e.forEach(n),t.forEach(n);let i=[];return r.forEach(s=>i.push(s)),i}var bi=class{enter(e){let t=this.entered.length;return this.entered=Ii(this.entered.filter(r=>this.isNodeInDocument(r)&&(!r.contains||r.contains(e))),[e]),t===0&&this.entered.length>0}leave(e){let t=this.entered.length;return this.entered=Oi(this.entered.filter(this.isNodeInDocument),e),t>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}},Si=class{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){let t={};Object.keys(this.config.exposeProperties).forEach(r=>{let n=this.config.exposeProperties[r];n!=null&&(t[r]={value:n(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}},mt=Ke({FILE:()=>yt,HTML:()=>bt,TEXT:()=>It,URL:()=>Ot},1);const yt="__NATIVE_FILE__",Ot="__NATIVE_URL__",It="__NATIVE_TEXT__",bt="__NATIVE_HTML__";function xe(e,t,r){return t.reduce((n,i)=>n||e.getData(i),"")??r}const Ce={[yt]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[bt]:{exposeProperties:{html:(e,t)=>xe(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[Ot]:{exposeProperties:{urls:(e,t)=>xe(e,t,"").split(`
2
2
  `),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[It]:{exposeProperties:{text:(e,t)=>xe(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function Di(e,t){let r=Ce[e];if(!r)throw Error(`native type ${e} has no configuration`);let n=new Si(r);return n.loadDataTransfer(t),n}function Ne(e){if(!e)return null;let t=Array.prototype.slice.call(e.types||[]);return Object.keys(Ce).filter(r=>{let n=Ce[r];return n!=null&&n.matchesTypes?n.matchesTypes.some(i=>t.indexOf(i)>-1):!1})[0]||null}const Ti=vt(()=>/firefox/i.test(navigator.userAgent)),St=vt(()=>!!window.safari);var Dt=class{interpolate(e){let{xs:t,ys:r,c1s:n,c2s:i,c3s:s}=this,o=t.length-1;if(e===t[o])return r[o];let a=0,d=s.length-1,h;for(;a<=d;){h=Math.floor(.5*(a+d));let I=t[h];if(I<e)a=h+1;else if(I>e)d=h-1;else return r[h]}o=Math.max(0,d);let p=e-t[o],b=p*p;return r[o]+n[o]*p+i[o]*b+s[o]*p*b}constructor(e,t){let{length:r}=e,n=[];for(let v=0;v<r;v++)n.push(v);n.sort((v,c)=>e[v]<e[c]?-1:1);let i=[],s=[],o=[],a,d;for(let v=0;v<r-1;v++)a=e[v+1]-e[v],d=t[v+1]-t[v],s.push(a),i.push(d),o.push(d/a);let h=[o[0]];for(let v=0;v<s.length-1;v++){let c=o[v],l=o[v+1];if(c*l<=0)h.push(0);else{a=s[v];let u=s[v+1],g=a+u;h.push(3*g/((g+u)/c+(g+a)/l))}}h.push(o[o.length-1]);let p=[],b=[],I;for(let v=0;v<h.length-1;v++){I=o[v];let c=h[v],l=1/s[v],u=c+h[v+1]-I-I;p.push((I-c-u)*l),b.push(u*l*l)}this.xs=e,this.ys=t,this.c1s=h,this.c2s=p,this.c3s=b}},Ei=1;function Tt(e){let t=e.nodeType===Ei?e:e.parentElement;if(!t)return null;let{top:r,left:n}=t.getBoundingClientRect();return{x:n,y:r}}function ne(e){return{x:e.clientX,y:e.clientY}}function wi(e){var t;return e.nodeName==="IMG"&&(Ti()||!((t=document.documentElement)!=null&&t.contains(e)))}function xi(e,t,r,n){let i=e?t.width:r,s=e?t.height:n;return St()&&e&&(s/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:s}}function Ci(e,t,r,n,i){let s=wi(t),o=Tt(s?e:t),a={x:r.x-o.x,y:r.y-o.y},{offsetWidth:d,offsetHeight:h}=e,{anchorX:p,anchorY:b}=n,{dragPreviewWidth:I,dragPreviewHeight:v}=xi(s,t,d,h),c=()=>{let D=new Dt([0,.5,1],[a.y,a.y/h*v,a.y+v-h]).interpolate(b);return St()&&s&&(D+=(window.devicePixelRatio-1)*v),D},l=()=>new Dt([0,.5,1],[a.x,a.x/d*I,a.x+I-d]).interpolate(p),{offsetX:u,offsetY:g}=i,O=u===0||u,S=g===0||g;return{x:O?u:l(),y:S?g:c()}}var Ni=class{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;if((e=this.globalContext)!=null&&e.document)return this.globalContext.document;if(this.window)return this.window.document}get rootElement(){var e;return((e=this.optionsArgs)==null?void 0:e.rootElement)||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}};function Ri(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Et(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Ri(e,i,r[i])})}return e}var Pi=class{profile(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)==null?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((t=this.dragOverTargetIds)==null?void 0:t.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){let e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){let e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var t;(t=this.window)==null||t.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,t,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,r){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,r);let n=s=>this.handleDragStart(s,e),i=s=>this.handleSelectStart(s);return t.setAttribute("draggable","true"),t.addEventListener("dragstart",n),t.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",n),t.removeEventListener("selectstart",i),t.setAttribute("draggable","false")}}connectDropTarget(e,t){let r=s=>this.handleDragEnter(s,e),n=s=>this.handleDragOver(s,e),i=s=>this.handleDrop(s,e);return t.addEventListener("dragenter",r),t.addEventListener("dragover",n),t.addEventListener("drop",i),()=>{t.removeEventListener("dragenter",r),t.removeEventListener("dragover",n),t.removeEventListener("drop",i)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){let e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return Et({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){let e=this.monitor.getSourceId();return Et({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}isDraggingNativeItem(){let e=this.monitor.getItemType();return Object.keys(mt).some(t=>mt[t]===e)}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=Di(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout(()=>{var t;return(t=this.rootElement)==null?void 0:t.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)==null||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=n=>{let i=this.sourceNodes.get(n);return i&&Tt(i)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=n=>!!(n&&this.document&&this.document.body&&this.document.body.contains(n)),this.endDragIfSourceWasRemovedFromDOM=()=>{let n=this.currentDragSourceNode;n==null||this.isNodeInDocument(n)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=n=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(n||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=n=>{if(n.defaultPrevented)return;let{dragStartSourceIds:i}=this;this.dragStartSourceIds=null;let s=ne(n);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(i||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:s});let{dataTransfer:o}=n,a=Ne(o);if(this.monitor.isDragging()){if(o&&typeof o.setDragImage=="function"){let h=this.monitor.getSourceId(),p=this.sourceNodes.get(h),b=this.sourcePreviewNodes.get(h)||p;if(b){let{anchorX:I,anchorY:v,offsetX:c,offsetY:l}=this.getCurrentSourcePreviewNodeOptions(),u=Ci(p,b,s,{anchorX:I,anchorY:v},{offsetX:c,offsetY:l});o.setDragImage(b,u.x,u.y)}}try{o==null||o.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(n.target);let{captureDraggingState:d}=this.getCurrentSourcePreviewNodeOptions();d?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(a)this.beginDragNativeItem(a);else{if(o&&!o.types&&(n.target&&!n.target.hasAttribute||!n.target.hasAttribute("draggable")))return;n.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=n=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)==null||i.loadDataTransfer(n.dataTransfer)}if(!this.enterLeaveCounter.enter(n.target)||this.monitor.isDragging())return;let{dataTransfer:s}=n,o=Ne(s);o&&this.beginDragNativeItem(o,s)},this.handleTopDragEnter=n=>{let{dragEnterTargetIds:i}=this;this.dragEnterTargetIds=[],this.monitor.isDragging()&&(this.altKeyPressed=n.altKey,i.length>0&&this.actions.hover(i,{clientOffset:ne(n)}),i.some(s=>this.monitor.canDropOnTarget(s))&&(n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect=this.getCurrentDropEffect())))},this.handleTopDragOverCapture=n=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)==null||i.loadDataTransfer(n.dataTransfer)}},this.handleTopDragOver=n=>{let{dragOverTargetIds:i}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect="none");return}this.altKeyPressed=n.altKey,this.lastClientOffset=ne(n),this.scheduleHover(i),(i||[]).some(s=>this.monitor.canDropOnTarget(s))?(n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?n.preventDefault():(n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=n=>{this.isDraggingNativeItem()&&n.preventDefault(),this.enterLeaveCounter.leave(n.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=n=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var i;n.preventDefault(),(i=this.currentNativeSource)==null||i.loadDataTransfer(n.dataTransfer)}else Ne(n.dataTransfer)&&n.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=n=>{let{dropTargetIds:i}=this;this.dropTargetIds=[],this.actions.hover(i,{clientOffset:ne(n)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=n=>{let i=n.target;typeof i.dragDrop=="function"&&(i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.isContentEditable||(n.preventDefault(),i.dragDrop()))},this.options=new Ni(t,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new bi(this.isNodeInDocument)}},ie;function ji(){return ie||(ie=new Image,ie.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),ie}const wt=function(e,t,r){return new Pi(e,t,r)},xt=(0,f.createContext)(null);function N(){let e=(0,f.useContext)(xt);if(e===null)throw Error("No Tree Api Provided");return e}const Ct=(0,f.createContext)(null);function _i(){let e=(0,f.useContext)(Ct);if(e===null)throw Error("Provide a NodesContext");return e}const Nt=(0,f.createContext)(null);function Mi(){let e=(0,f.useContext)(Nt);if(e===null)throw Error("Provide a DnDContext");return e}const Rt=(0,f.createContext)(0);function Pt(){(0,f.useContext)(Rt)}var Ai=Ke({access:()=>Y,bound:()=>se,dfs:()=>Re,focusNextElement:()=>kt,focusPrevElement:()=>Ht,getInsertIndex:()=>Wt,getInsertParentId:()=>Gt,identify:()=>H,identifyNull:()=>Ut,indexOf:()=>Lt,isClosed:()=>_t,isDescendant:()=>At,isItem:()=>jt,isOpenWithEmptyChildren:()=>Mt,mergeRefs:()=>Fi,noop:()=>Li,safeRun:()=>Bt,waitFor:()=>zt,walk:()=>oe},1);function se(e,t,r){return Math.max(Math.min(e,r),t)}function jt(e){return e&&e.isLeaf}function _t(e){return e&&e.isInternal&&!e.isOpen}function Mt(e){var t;return e&&e.isOpen&&!((t=e.children)!=null&&t.length)}const At=(e,t)=>{let r=e;for(;r;){if(r.id===t.id)return!0;r=r.parent}return!1},Lt=e=>{if(!e.parent)throw Error("Node does not have a parent");return e.parent.children.findIndex(t=>t.id===e.id)};function Li(){}function Re(e,t){if(!e)return null;if(e.id===t)return e;if(e.children)for(let r of e.children){let n=Re(r,t);if(n)return n}return null}function oe(e,t){if(t(e),e.children)for(let r of e.children)oe(r,t)}function kt(e){let t=Ft(e),r;for(let n=0;n<t.length;++n)if(t[n]===e){r=ki(t,n);break}r==null||r.focus()}function Ht(e){let t=Ft(e),r;for(let n=0;n<t.length;++n)if(t[n]===e){r=Hi(t,n);break}r==null||r.focus()}function ki(e,t){return t+1<e.length?e[t+1]:e[0]}function Hi(e,t){return t-1>=0?e[t-1]:e[e.length-1]}function Ft(e){return Array.from(document.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), details:not([disabled]), summary:not(:disabled)')).filter(t=>t===e||!e.contains(t))}function Y(e,t){return typeof t=="boolean"?t:typeof t=="string"?e[t]:t(e)}function Ut(e){return e===null?null:H(e)}function H(e){return typeof e=="string"?e:e.id}function Fi(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}function Bt(e,...t){if(e)return e(...t)}function zt(e){return new Promise((t,r)=>{let n=0;function i(){n+=1,n===100&&r(),e()?t():setTimeout(i,10)}i()})}function Wt(e){var r;let t=e.focusedNode;return t?t.isOpen?0:t.parent?t.childIndex+1:0:((r=e.root.children)==null?void 0:r.length)??0}function Gt(e){let t=e.focusedNode;return t?t.isOpen?t.id:t.parent&&!t.parent.isRoot?t.parent.id:null:null}var Ui={display:"flex",alignItems:"center",zIndex:1},Bi={flex:1,height:"2px",background:"#4B91E2",borderRadius:"1px"},zi={width:"4px",height:"4px",boxShadow:"0 0 0 3px #4B91E2",borderRadius:"50%"};const Wi=f.memo(function({top:e,left:t,indent:r}){let n={position:"absolute",pointerEvents:"none",top:e-2+"px",left:t+"px",right:r+"px"};return(0,m.jsxs)("div",{style:Object.assign(Object.assign({},Ui),n),children:[(0,m.jsx)("div",{style:Object.assign({},zi)}),(0,m.jsx)("div",{style:Object.assign({},Bi)})]})});function Gi({node:e,attrs:t,innerRef:r,children:n}){return(0,m.jsx)("div",Object.assign({},t,{ref:r,onFocus:i=>i.stopPropagation(),onClick:e.handleClick,children:n}))}function Ki(e){return(0,m.jsxs)("div",{ref:e.dragHandle,style:e.style,children:[(0,m.jsx)("span",{onClick:t=>{t.stopPropagation(),e.node.toggle()},children:e.node.isLeaf?"\u{1F333}":e.node.isOpen?"\u{1F5C1}":"\u{1F5C0}"})," ",e.node.isEditing?(0,m.jsx)(Yi,Object.assign({},e)):(0,m.jsx)(Vi,Object.assign({},e))]})}function Vi(e){return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)("span",{children:e.node.data.name})})}function Yi({node:e}){let t=(0,f.useRef)();return(0,f.useEffect)(()=>{var r,n;(r=t.current)==null||r.focus(),(n=t.current)==null||n.select()},[]),(0,m.jsx)("input",{ref:t,defaultValue:e.data.name,onBlur:()=>e.reset(),onKeyDown:r=>{var n;r.key==="Escape"&&e.reset(),r.key==="Enter"&&e.submit(((n=t.current)==null?void 0:n.value)||"")}})}function Pe(e){return{type:"EDIT",id:e}}function qi(e={id:null},t){return t.type==="EDIT"?Object.assign(Object.assign({},e),{id:t.id}):e}function B(e){return{type:"FOCUS",id:e}}function $i(){return{type:"TREE_BLUR"}}function Xi(e={id:null,treeFocused:!1},t){return t.type==="FOCUS"?Object.assign(Object.assign({},e),{id:t.id,treeFocused:!0}):t.type==="TREE_BLUR"?Object.assign(Object.assign({},e),{treeFocused:!1}):e}var Kt=class ur{constructor(t){this.handleClick=r=>{r.metaKey&&!this.tree.props.disableMultiSelection?this.isSelected?this.deselect():this.selectMulti():r.shiftKey&&!this.tree.props.disableMultiSelection?this.selectContiguous():(this.select(),this.activate())},this.tree=t.tree,this.id=t.id,this.data=t.data,this.level=t.level,this.children=t.children,this.parent=t.parent,this.isDraggable=t.isDraggable,this.rowIndex=t.rowIndex}get isRoot(){return this.id===je}get isLeaf(){return!Array.isArray(this.children)}get isInternal(){return!this.isLeaf}get isOpen(){return this.isLeaf?!1:this.tree.isOpen(this.id)}get isClosed(){return this.isLeaf?!1:!this.tree.isOpen(this.id)}get isEditable(){return this.tree.isEditable(this.data)}get isEditing(){return this.tree.editingId===this.id}get isSelected(){return this.tree.isSelected(this.id)}get isOnlySelection(){return this.isSelected&&this.tree.hasOneSelection}get isSelectedStart(){var t;return this.isSelected&&!((t=this.prev)!=null&&t.isSelected)}get isSelectedEnd(){var t;return this.isSelected&&!((t=this.next)!=null&&t.isSelected)}get isFocused(){return this.tree.isFocused(this.id)}get isDragging(){return this.tree.isDragging(this.id)}get willReceiveDrop(){return this.tree.willReceiveDrop(this.id)}get state(){return{isClosed:this.isClosed,isDragging:this.isDragging,isEditing:this.isEditing,isFocused:this.isFocused,isInternal:this.isInternal,isLeaf:this.isLeaf,isOpen:this.isOpen,isSelected:this.isSelected,isSelectedEnd:this.isSelectedEnd,isSelectedStart:this.isSelectedStart,willReceiveDrop:this.willReceiveDrop}}get childIndex(){return this.parent&&this.parent.children?this.parent.children.findIndex(t=>t.id===this.id):-1}get next(){return this.rowIndex===null?null:this.tree.at(this.rowIndex+1)}get prev(){return this.rowIndex===null?null:this.tree.at(this.rowIndex-1)}get nextSibling(){var r;let t=this.childIndex;return((r=this.parent)==null?void 0:r.children[t+1])??null}isAncestorOf(t){if(!t)return!1;let r=t;for(;r;){if(r.id===this.id)return!0;r=r.parent}return!1}select(){this.tree.select(this)}deselect(){this.tree.deselect(this)}selectMulti(){this.tree.selectMulti(this)}selectContiguous(){this.tree.selectContiguous(this)}activate(){this.tree.activate(this)}focus(){this.tree.focus(this)}toggle(){this.tree.toggle(this)}open(){this.tree.open(this)}openParents(){this.tree.openParents(this)}close(){this.tree.close(this)}submit(t){this.tree.submit(this,t)}reset(){this.tree.reset()}clone(){return new ur(Object.assign({},this))}edit(){return this.tree.edit(this)}};const je="__REACT_ARBORIST_INTERNAL_ROOT__";function Vt(e){function t(n,i,s){let o=new Kt({tree:e,data:n,level:i,parent:s,id:e.accessId(n),children:null,isDraggable:e.isDraggable(n),rowIndex:null}),a=e.accessChildren(n);return a&&(o.children=a.map(d=>t(d,i+1,o))),o}let r=new Kt({tree:e,id:je,data:{id:je},level:-1,parent:null,children:null,isDraggable:!0,rowIndex:null});return r.children=(e.props.data??[]).map(n=>t(n,0,r)),r}const _e={open(e,t){return{type:"VISIBILITY_OPEN",id:e,filtered:t}},close(e,t){return{type:"VISIBILITY_CLOSE",id:e,filtered:t}},toggle(e,t){return{type:"VISIBILITY_TOGGLE",id:e,filtered:t}},clear(e){return{type:"VISIBILITY_CLEAR",filtered:e}}};function Yt(e={},t){if(t.type==="VISIBILITY_OPEN")return Object.assign(Object.assign({},e),{[t.id]:!0});if(t.type==="VISIBILITY_CLOSE")return Object.assign(Object.assign({},e),{[t.id]:!1});if(t.type==="VISIBILITY_TOGGLE"){let r=e[t.id];return Object.assign(Object.assign({},e),{[t.id]:!r})}else return t.type==="VISIBILITY_CLEAR"?{}:e}function Ji(e={filtered:{},unfiltered:{}},t){return t.type.startsWith("VISIBILITY")?t.filtered?Object.assign(Object.assign({},e),{filtered:Yt(e.filtered,t)}):Object.assign(Object.assign({},e),{unfiltered:Yt(e.unfiltered,t)}):e}const z=e=>({nodes:{open:{filtered:{},unfiltered:(e==null?void 0:e.initialOpenState)??{}},focus:{id:null,treeFocused:!1},edit:{id:null},drag:{id:null,selectedIds:[],destinationParentId:null,destinationIndex:null},selection:{ids:new Set,anchor:null,mostRecent:null}},dnd:{cursor:{type:"none"},dragId:null,dragIds:[],parentId:null,index:-1}}),j={clear:()=>({type:"SELECTION_CLEAR"}),only:e=>({type:"SELECTION_ONLY",id:H(e)}),add:e=>({type:"SELECTION_ADD",ids:(Array.isArray(e)?e:[e]).map(H)}),remove:e=>({type:"SELECTION_REMOVE",ids:(Array.isArray(e)?e:[e]).map(H)}),set:e=>Object.assign({type:"SELECTION_SET"},e),mostRecent:e=>({type:"SELECTION_MOST_RECENT",id:e===null?null:H(e)}),anchor:e=>({type:"SELECTION_ANCHOR",id:e===null?null:H(e)})};function Qi(e=z().nodes.selection,t){let r=e.ids;switch(t.type){case"SELECTION_CLEAR":return Object.assign(Object.assign({},e),{ids:new Set});case"SELECTION_ONLY":return Object.assign(Object.assign({},e),{ids:new Set([t.id])});case"SELECTION_ADD":return t.ids.length===0?e:(t.ids.forEach(n=>r.add(n)),Object.assign(Object.assign({},e),{ids:new Set(r)}));case"SELECTION_REMOVE":return t.ids.length===0?e:(t.ids.forEach(n=>r.delete(n)),Object.assign(Object.assign({},e),{ids:new Set(r)}));case"SELECTION_SET":return Object.assign(Object.assign({},e),{ids:t.ids,mostRecent:t.mostRecent,anchor:t.anchor});case"SELECTION_MOST_RECENT":return Object.assign(Object.assign({},e),{mostRecent:t.id});case"SELECTION_ANCHOR":return Object.assign(Object.assign({},e),{anchor:t.id});default:return e}}const W={cursor(e){return{type:"DND_CURSOR",cursor:e}},dragStart(e,t){return{type:"DND_DRAG_START",id:e,dragIds:t}},dragEnd(){return{type:"DND_DRAG_END"}},hovering(e,t){return{type:"DND_HOVERING",parentId:e,index:t}}};function Zi(e=z().dnd,t){switch(t.type){case"DND_CURSOR":return Object.assign(Object.assign({},e),{cursor:t.cursor});case"DND_DRAG_START":return Object.assign(Object.assign({},e),{dragId:t.id,dragIds:t.dragIds});case"DND_DRAG_END":return z().dnd;case"DND_HOVERING":return Object.assign(Object.assign({},e),{parentId:t.parentId,index:t.index});default:return e}}var es={position:"fixed",pointerEvents:"none",zIndex:100,left:0,top:0,width:"100%",height:"100%"},ts=e=>{if(!e)return{display:"none"};let{x:t,y:r}=e;return{transform:`translate(${t}px, ${r}px)`}},rs=e=>{if(!e)return{display:"none"};let{x:t,y:r}=e;return{transform:`translate(${t+10}px, ${r+10}px)`}};function qt({offset:e,mouse:t,id:r,dragIds:n,isDragging:i}){return(0,m.jsxs)(ns,{isDragging:i,children:[(0,m.jsx)(is,{offset:e,children:(0,m.jsx)(os,{id:r,dragIds:n})}),(0,m.jsx)(ss,{mouse:t,count:n.length})]})}var ns=(0,f.memo)(function(e){return e.isDragging?(0,m.jsx)("div",{style:es,children:e.children}):null});function is(e){return(0,m.jsx)("div",{className:"row preview",style:ts(e.offset),children:e.children})}function ss(e){let{count:t,mouse:r}=e;return t>1?(0,m.jsx)("div",{className:"selected-count",style:rs(r),children:t}):null}var os=(0,f.memo)(function(e){let t=N(),r=t.get(e.id);return r?(0,m.jsx)(t.renderNode,{preview:!0,node:r,style:{paddingLeft:r.level*t.indent,opacity:.2,background:"transparent"},tree:t}):null}),$t=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function as(e,t){return!!(e===t||$t(e)&&$t(t))}function ls(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!as(e[r],t[r]))return!1;return!0}function ds(e,t){t===void 0&&(t=ls);var r,n=[],i,s=!1;function o(){var a=[...arguments];return s&&r===this&&t(a,n)||(i=e.apply(this,a),s=!0,r=this,n=a),i}return o}var Me=ds,Xt=typeof performance=="object"&&typeof performance.now=="function"?function(){return performance.now()}:function(){return Date.now()};function Jt(e){cancelAnimationFrame(e.id)}function cs(e,t){var r=Xt();function n(){Xt()-r>=t?e.call(null):i.id=requestAnimationFrame(n)}var i={id:requestAnimationFrame(n)};return i}var Ae=-1;function Qt(e){if(e===void 0&&(e=!1),Ae===-1||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(t),Ae=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Ae}var q=null;function Zt(e){if(e===void 0&&(e=!1),q===null||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var n=document.createElement("div"),i=n.style;return i.width="100px",i.height="100px",t.appendChild(n),document.body.appendChild(t),t.scrollLeft>0?q="positive-descending":(t.scrollLeft=1,q=t.scrollLeft===0?"negative":"positive-ascending"),document.body.removeChild(t),q}return q}var us=150,hs=function(e,t){return e};function fs(e){var t,r=e.getItemOffset,n=e.getEstimatedTotalSize,i=e.getItemSize,s=e.getOffsetForIndexAndAlignment,o=e.getStartIndexForOffset,a=e.getStopIndexForStartIndex,d=e.initInstanceProps,h=e.shouldResetStyleCacheOnItemSizeChange,p=e.validateProps;return t=(function(b){Tr(I,b);function I(c){var l=b.call(this,c)||this;return l._instanceProps=d(l.props,Ve(l)),l._outerRef=void 0,l._resetIsScrollingTimeoutId=null,l.state={instance:Ve(l),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof l.props.initialScrollOffset=="number"?l.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},l._callOnItemsRendered=void 0,l._callOnItemsRendered=Me(function(u,g,O,S){return l.props.onItemsRendered({overscanStartIndex:u,overscanStopIndex:g,visibleStartIndex:O,visibleStopIndex:S})}),l._callOnScroll=void 0,l._callOnScroll=Me(function(u,g,O){return l.props.onScroll({scrollDirection:u,scrollOffset:g,scrollUpdateWasRequested:O})}),l._getItemStyle=void 0,l._getItemStyle=function(u){var g=l.props,O=g.direction,S=g.itemSize,D=g.layout,T=l._getItemStyleCache(h&&S,h&&D,h&&O),x;if(T.hasOwnProperty(u))x=T[u];else{var C=r(l.props,u,l._instanceProps),L=i(l.props,u,l._instanceProps),F=O==="horizontal"||D==="horizontal",$=O==="rtl",X=F?C:0;T[u]=x={position:"absolute",left:$?void 0:X,right:$?X:void 0,top:F?0:C,height:F?"100%":L,width:F?L:"100%"}}return x},l._getItemStyleCache=void 0,l._getItemStyleCache=Me(function(u,g,O){return{}}),l._onScrollHorizontal=function(u){var g=u.currentTarget,O=g.clientWidth,S=g.scrollLeft,D=g.scrollWidth;l.setState(function(T){if(T.scrollOffset===S)return null;var x=l.props.direction,C=S;if(x==="rtl")switch(Zt()){case"negative":C=-S;break;case"positive-descending":C=D-O-S;break}return C=Math.max(0,Math.min(C,D-O)),{isScrolling:!0,scrollDirection:T.scrollOffset<C?"forward":"backward",scrollOffset:C,scrollUpdateWasRequested:!1}},l._resetIsScrollingDebounced)},l._onScrollVertical=function(u){var g=u.currentTarget,O=g.clientHeight,S=g.scrollHeight,D=g.scrollTop;l.setState(function(T){if(T.scrollOffset===D)return null;var x=Math.max(0,Math.min(D,S-O));return{isScrolling:!0,scrollDirection:T.scrollOffset<x?"forward":"backward",scrollOffset:x,scrollUpdateWasRequested:!1}},l._resetIsScrollingDebounced)},l._outerRefSetter=function(u){var g=l.props.outerRef;l._outerRef=u,typeof g=="function"?g(u):typeof g=="object"&&g&&g.hasOwnProperty("current")&&(g.current=u)},l._resetIsScrollingDebounced=function(){l._resetIsScrollingTimeoutId!==null&&Jt(l._resetIsScrollingTimeoutId),l._resetIsScrollingTimeoutId=cs(l._resetIsScrolling,us)},l._resetIsScrolling=function(){l._resetIsScrollingTimeoutId=null,l.setState({isScrolling:!1},function(){l._getItemStyleCache(-1,null)})},l}I.getDerivedStateFromProps=function(c,l){return gs(c,l),p(c),null};var v=I.prototype;return v.scrollTo=function(c){c=Math.max(0,c),this.setState(function(l){return l.scrollOffset===c?null:{scrollDirection:l.scrollOffset<c?"forward":"backward",scrollOffset:c,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},v.scrollToItem=function(c,l){l===void 0&&(l="auto");var u=this.props,g=u.itemCount,O=u.layout,S=this.state.scrollOffset;c=Math.max(0,Math.min(c,g-1));var D=0;if(this._outerRef){var T=this._outerRef;D=O==="vertical"?T.scrollWidth>T.clientWidth?Qt():0:T.scrollHeight>T.clientHeight?Qt():0}this.scrollTo(s(this.props,c,l,S,this._instanceProps,D))},v.componentDidMount=function(){var c=this.props,l=c.direction,u=c.initialScrollOffset,g=c.layout;if(typeof u=="number"&&this._outerRef!=null){var O=this._outerRef;l==="horizontal"||g==="horizontal"?O.scrollLeft=u:O.scrollTop=u}this._callPropsCallbacks()},v.componentDidUpdate=function(){var c=this.props,l=c.direction,u=c.layout,g=this.state,O=g.scrollOffset;if(g.scrollUpdateWasRequested&&this._outerRef!=null){var S=this._outerRef;if(l==="horizontal"||u==="horizontal")if(l==="rtl")switch(Zt()){case"negative":S.scrollLeft=-O;break;case"positive-ascending":S.scrollLeft=O;break;default:var D=S.clientWidth;S.scrollLeft=S.scrollWidth-D-O;break}else S.scrollLeft=O;else S.scrollTop=O}this._callPropsCallbacks()},v.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&Jt(this._resetIsScrollingTimeoutId)},v.render=function(){var c=this.props,l=c.children,u=c.className,g=c.direction,O=c.height,S=c.innerRef,D=c.innerElementType,T=c.innerTagName,x=c.itemCount,C=c.itemData,L=c.itemKey,F=L===void 0?hs:L,$=c.layout,X=c.outerElementType,hr=c.outerTagName,fr=c.style,gr=c.useIsScrolling,pr=c.width,Be=this.state.isScrolling,ce=g==="horizontal"||$==="horizontal",vr=ce?this._onScrollHorizontal:this._onScrollVertical,ze=this._getRangeToRender(),mr=ze[0],yr=ze[1],We=[];if(x>0)for(var K=mr;K<=yr;K++)We.push((0,f.createElement)(l,{data:C,key:F(K,C),index:K,isScrolling:gr?Be:void 0,style:this._getItemStyle(K)}));var Ge=n(this.props,this._instanceProps);return(0,f.createElement)(X||hr||"div",{className:u,onScroll:vr,ref:this._outerRefSetter,style:Dr({position:"relative",height:O,width:pr,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:g},fr)},(0,f.createElement)(D||T||"div",{children:We,ref:S,style:{height:ce?"100%":Ge,pointerEvents:Be?"none":void 0,width:ce?Ge:"100%"}}))},v._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"&&this.props.itemCount>0){var c=this._getRangeToRender(),l=c[0],u=c[1],g=c[2],O=c[3];this._callOnItemsRendered(l,u,g,O)}if(typeof this.props.onScroll=="function"){var S=this.state,D=S.scrollDirection,T=S.scrollOffset,x=S.scrollUpdateWasRequested;this._callOnScroll(D,T,x)}},v._getRangeToRender=function(){var c=this.props,l=c.itemCount,u=c.overscanCount,g=this.state,O=g.isScrolling,S=g.scrollDirection,D=g.scrollOffset;if(l===0)return[0,0,0,0];var T=o(this.props,D,this._instanceProps),x=a(this.props,T,D,this._instanceProps),C=!O||S==="backward"?Math.max(1,u):1,L=!O||S==="forward"?Math.max(1,u):1;return[Math.max(0,T-C),Math.max(0,Math.min(l-1,x+L)),T,x]},I})(f.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var gs=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},ps=fs({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,r,n,i,s){var o=e.direction,a=e.height,d=e.itemCount,h=e.itemSize,p=e.layout,b=e.width,I=o==="horizontal"||p==="horizontal"?b:a,v=Math.max(0,d*h-I),c=Math.min(v,t*h),l=Math.max(0,t*h-I+h+s);switch(r==="smart"&&(r=n>=l-I&&n<=c+I?"auto":"center"),r){case"start":return c;case"end":return l;case"center":var u=Math.round(l+(c-l)/2);return u<Math.ceil(I/2)?0:u>v+Math.floor(I/2)?v:u;default:return n>=l&&n<=c?n:n<l?l:c}},getStartIndexForOffset:function(e,t){var r=e.itemCount,n=e.itemSize;return Math.max(0,Math.min(r-1,Math.floor(t/n)))},getStopIndexForStartIndex:function(e,t,r){var n=e.direction,i=e.height,s=e.itemCount,o=e.itemSize,a=e.layout,d=e.width,h=n==="horizontal"||a==="horizontal",p=t*o,b=h?d:i,I=Math.ceil((b+r-p)/o);return Math.max(0,Math.min(s-1,t+I-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});function vs(){let e=N(),t=Mi().cursor;if(!t||t.type!=="line")return null;let r=e.indent,n=e.rowHeight*t.index+(e.props.padding??e.props.paddingTop??0),i=r*t.level,s=e.renderCursor;return(0,m.jsx)(s,{top:n,left:i,indent:r})}var ms=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const ys=(0,f.forwardRef)(function(e,t){let{children:r}=e,n=ms(e,["children"]),i=N();return(0,m.jsxs)("div",Object.assign({ref:t},n,{onClick:s=>{s.currentTarget===s.target&&i.deselectAll()},children:[(0,m.jsx)(Os,{}),r]}))});var Os=()=>{let e=N();return(0,m.jsx)("div",{style:{height:e.visibleNodes.length*e.rowHeight,width:"100%",position:"absolute",left:"0",right:"0"},children:(0,m.jsx)(vs,{})})},Is=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const bs=(0,f.forwardRef)(function(e,t){var{style:r}=e,n=Is(e,["style"]);let i=N(),s=i.props.padding??i.props.paddingTop??0,o=i.props.padding??i.props.paddingBottom??0;return(0,m.jsx)("div",Object.assign({ref:t,style:Object.assign(Object.assign({},r),{height:`${parseFloat(r.height)+s+o}px`})},n))});function Ss(e){let t=N(),r=t.selectedIds,[n,i,s]=ci(()=>({canDrag:()=>e.isDraggable,type:"NODE",item:()=>{let o=t.isSelected(e.id)?Array.from(r):[e.id];return t.dispatch(W.dragStart(e.id,o)),{id:e.id,dragIds:o}},end:()=>{t.hideCursor(),t.dispatch(W.dragEnd())}}),[r,e]);return(0,f.useEffect)(()=>{s(ji())},[s]),i}function Ds(e,t){let r=e.getBoundingClientRect(),n=t.x-Math.round(r.x),i=t.y-Math.round(r.y),s=r.height,o=i<s/2,a=!o,d=s/4,h=i>d&&i<s-d;return{x:n,inTopHalf:o,inBottomHalf:a,inMiddle:h,atTop:!h&&o,atBottom:!h&&a}}function Ts(e,t,r,n){return e?e.isInternal?n.atTop?[t,e]:n.inMiddle?[e,e]:[e,r]:n.inTopHalf?[t,e]:[e,r]:[t,null]}function ae(e,t){return{parentId:e||null,index:t}}function G(e,t){return{type:"line",index:e,level:t}}function Es(e){return{type:"highlight",id:e}}function Le(e,t){var n;let r=e;for(;r.parent&&r.level>t;)r=r.parent;return{parentId:((n=r.parent)==null?void 0:n.id)||null,index:Lt(r)+1}}function er(e){var h;let t=Ds(e.element,e.offset),r=e.indent,n=Math.round(Math.max(0,t.x-r)/r),{node:i,nextNode:s,prevNode:o}=e,[a,d]=Ts(i,o,s,t);if(i&&i.isInternal&&t.inMiddle)return{drop:ae(i.id,null),cursor:Es(i.id)};if(!a)return{drop:ae((h=d==null?void 0:d.parent)==null?void 0:h.id,0),cursor:G(0,0)};if(jt(a)){let p=se(n,(d==null?void 0:d.level)||0,a.level);return{drop:Le(a,p),cursor:G(a.rowIndex+1,p)}}if(_t(a)){let p=se(n,(d==null?void 0:d.level)||0,a.level);return{drop:Le(a,p),cursor:G(a.rowIndex+1,p)}}if(Mt(a)){let p=se(n,0,a.level+1);return p>a.level?{drop:ae(a.id,0),cursor:G(a.rowIndex+1,p)}:{drop:Le(a,p),cursor:G(a.rowIndex+1,p)}}return{drop:ae(a==null?void 0:a.id,0),cursor:G(a.rowIndex+1,a.level+1)}}function ws(e,t){let r=N(),[n,i]=pt(()=>({accept:"NODE",canDrop:()=>r.canDrop(),hover:(s,o)=>{let a=o.getClientOffset();if(!e.current||!a)return;let{cursor:d,drop:h}=er({element:e.current,offset:a,indent:r.indent,node:t,prevNode:t.prev,nextNode:t.next});h&&r.dispatch(W.hovering(h.parentId,h.index)),o.canDrop()?d&&r.showCursor(d):r.hideCursor()},drop:(s,o)=>{if(!o.canDrop())return null;let{parentId:a,index:d,dragIds:h}=r.state.dnd;Bt(r.props.onMove,{dragIds:h,parentId:a==="__REACT_ARBORIST_INTERNAL_ROOT__"?null:a,index:d===null?0:d,dragNodes:r.dragNodes,parentNode:r.get(a)}),r.open(a)}}),[t,e.current,r.props]);return i}function xs(e){let t=N(),r=t.at(e);if(!r)throw Error(`Could not find node for index: ${e}`);return(0,f.useMemo)(()=>{let n=r.clone();return t.visibleNodes[e]=n,n},[...Object.values(r.state),r])}const Cs=f.memo(function({index:e,style:t}){Pt(),_i();let r=N(),n=xs(e),i=(0,f.useRef)(null),s=Ss(n),o=ws(i,n),a=(0,f.useCallback)(c=>{i.current=c,o(c)},[o]),d=r.indent*n.level,h=(0,f.useMemo)(()=>({paddingLeft:d}),[d]),p=(0,f.useMemo)(()=>Object.assign(Object.assign({},t),{top:parseFloat(t.top)+(r.props.padding??r.props.paddingTop??0)}),[t,r.props.padding,r.props.paddingTop]),b={role:"treeitem","aria-level":n.level+1,"aria-selected":n.isSelected,"aria-expanded":n.isOpen,style:p,tabIndex:-1,className:r.props.rowClassName};(0,f.useEffect)(()=>{var c;!n.isEditing&&n.isFocused&&((c=i.current)==null||c.focus({preventScroll:!0}))},[n.isEditing,n.isFocused,i.current]);let I=r.renderNode,v=r.renderRow;return(0,m.jsx)(v,{node:n,innerRef:a,attrs:b,children:(0,m.jsx)(I,{node:n,tree:r,style:h,dragHandle:s})})});var ke="",tr=null;function rr(){Pt();let e=N();return(0,m.jsx)("div",{role:"tree",style:{height:e.height,width:e.width,minHeight:0,minWidth:0},onContextMenu:e.props.onContextMenu,onClick:e.props.onClick,tabIndex:0,onFocus:t=>{t.currentTarget.contains(t.relatedTarget)||e.onFocus()},onBlur:t=>{t.currentTarget.contains(t.relatedTarget)||e.onBlur()},onKeyDown:t=>{var n;if(e.isEditing)return;if(t.key==="Backspace"){if(!e.props.onDelete)return;let i=Array.from(e.selectedIds);if(i.length>1){let s=e.mostRecentNode;for(;s&&s.isSelected;)s=s.nextSibling;s||(s=e.lastNode),e.focus(s,{scroll:!1}),e.delete(Array.from(i))}else{let s=e.focusedNode;if(s){let o=s.nextSibling,a=s.parent;e.focus(o||a,{scroll:!1}),e.delete(s)}}return}if(t.key==="Tab"&&!t.shiftKey){t.preventDefault(),kt(t.currentTarget);return}if(t.key==="Tab"&&t.shiftKey){t.preventDefault(),Ht(t.currentTarget);return}if(t.key==="ArrowDown"){t.preventDefault();let i=e.nextNode;if(t.metaKey){e.select(e.focusedNode),e.activate(e.focusedNode);return}else if(!t.shiftKey||e.props.disableMultiSelection){e.focus(i);return}else{if(!i)return;let s=e.focusedNode;s?s.isSelected?e.selectContiguous(i):e.selectMulti(i):e.focus(e.firstNode);return}}if(t.key==="ArrowUp"){t.preventDefault();let i=e.prevNode;if(!t.shiftKey||e.props.disableMultiSelection){e.focus(i);return}else{if(!i)return;let s=e.focusedNode;s?s.isSelected?e.selectContiguous(i):e.selectMulti(i):e.focus(e.lastNode);return}}if(t.key==="ArrowRight"){let i=e.focusedNode;if(!i)return;i.isInternal&&i.isOpen?e.focus(e.nextNode):i.isInternal&&e.open(i.id);return}if(t.key==="ArrowLeft"){let i=e.focusedNode;if(!i||i.isRoot)return;i.isInternal&&i.isOpen?e.close(i.id):(n=i.parent)!=null&&n.isRoot||e.focus(i.parent);return}if(t.key==="a"&&t.metaKey&&!e.props.disableMultiSelection){t.preventDefault(),e.selectAll();return}if(t.key==="a"&&!t.metaKey&&e.props.onCreate){e.createLeaf();return}if(t.key==="A"&&!t.metaKey){if(!e.props.onCreate)return;e.createInternal();return}if(t.key==="Home"){t.preventDefault(),e.focus(e.firstNode);return}if(t.key==="End"){t.preventDefault(),e.focus(e.lastNode);return}if(t.key==="Enter"){let i=e.focusedNode;if(!i||!i.isEditable||!e.props.onRename)return;setTimeout(()=>{i&&e.edit(i)});return}if(t.key===" "){t.preventDefault();let i=e.focusedNode;if(!i)return;i.isLeaf?(i.select(),i.activate()):i.toggle();return}if(t.key==="*"){let i=e.focusedNode;if(!i)return;e.openSiblings(i);return}if(t.key==="PageUp"){t.preventDefault(),e.pageUp();return}t.key==="PageDown"&&(t.preventDefault(),e.pageDown()),clearTimeout(tr),ke+=t.key,tr=setTimeout(()=>{ke=""},600);let r=e.visibleNodes.find(i=>{let s=i.data.name;return typeof s=="string"?s.toLowerCase().startsWith(ke):!1});r&&e.focus(r.id)},children:(0,m.jsx)(ps,{className:e.props.className,outerRef:e.listEl,itemCount:e.visibleNodes.length,height:e.height,width:e.width,itemSize:e.rowHeight,overscanCount:e.overscanCount,itemKey:t=>{var r;return((r=e.visibleNodes[t])==null?void 0:r.id)||t},outerElementType:ys,innerElementType:bs,onScroll:e.props.onScroll,onItemsRendered:e.onItemsRendered.bind(e),ref:e.list,children:Cs})})}function nr(e){return e.isFiltered?Rs(e.root,e.isMatch.bind(e)):Ns(e.root)}function Ns(e){let t=[];function r(n){var i;n.level>=0&&t.push(n),n.isOpen&&((i=n.children)==null||i.forEach(r))}return r(e),t.forEach(ir),t}function Rs(e,t){let r={},n=[];function i(o){if(!o.isRoot&&t(o)){r[o.id]=!0;let a=o.parent;for(;a;)r[a.id]=!0,a=a.parent}if(o.children)for(let a of o.children)i(a)}function s(o){var a;o.level>=0&&r[o.id]&&n.push(o),o.isOpen&&((a=o.children)==null||a.forEach(s))}return i(e),s(e),n.forEach(ir),n}function ir(e,t){e.rowIndex=t}const sr=e=>e.reduce((t,r,n)=>(t[r.id]=n,t),{});var He=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(p){try{h(n.next(p))}catch(b){o(b)}}function d(p){try{h(n.throw(p))}catch(b){o(b)}}function h(p){p.done?s(p.value):i(p.value).then(a,d)}h((n=n.apply(e,t||[])).next())})},{safeRun:E,identify:M,identifyNull:_}=Ai,Ps=class de{constructor(t,r,n,i){this.store=t,this.props=r,this.list=n,this.listEl=i,this.visibleStartIndex=0,this.visibleStopIndex=0,this.root=Vt(this),this.visibleNodes=nr(this),this.idToIndex=sr(this.visibleNodes)}update(t){this.props=t,this.root=Vt(this),this.visibleNodes=nr(this),this.idToIndex=sr(this.visibleNodes)}dispatch(t){return this.store.dispatch(t)}get state(){return this.store.getState()}get openState(){return this.state.nodes.open.unfiltered}get width(){return this.props.width??300}get height(){return this.props.height??500}get indent(){return this.props.indent??24}get rowHeight(){return this.props.rowHeight??24}get overscanCount(){return this.props.overscanCount??1}get searchTerm(){return(this.props.searchTerm||"").trim()}get matchFn(){let t=this.props.searchMatch??((r,n)=>JSON.stringify(Object.values(r.data)).toLocaleLowerCase().includes(n.toLocaleLowerCase()));return r=>t(r,this.searchTerm)}accessChildren(t){return Y(t,this.props.childrenAccessor||"children")??null}accessId(t){let r=Y(t,this.props.idAccessor||"id");if(!r)throw Error("Data must contain an 'id' property or props.idAccessor must return a string");return r}get firstNode(){return this.visibleNodes[0]??null}get lastNode(){return this.visibleNodes[this.visibleNodes.length-1]??null}get focusedNode(){return this.get(this.state.nodes.focus.id)??null}get mostRecentNode(){return this.get(this.state.nodes.selection.mostRecent)??null}get nextNode(){let t=this.indexOf(this.focusedNode);return t===null?null:this.at(t+1)}get prevNode(){let t=this.indexOf(this.focusedNode);return t===null?null:this.at(t-1)}get(t){return t&&t in this.idToIndex&&this.visibleNodes[this.idToIndex[t]]||null}at(t){return this.visibleNodes[t]||null}nodesBetween(t,r){if(t===null||r===null)return[];let n=this.indexOf(t)??0,i=this.indexOf(r);if(i===null)return[];let s=Math.min(n,i),o=Math.max(n,i);return this.visibleNodes.slice(s,o+1)}indexOf(t){let r=Ut(t);return r?this.idToIndex[r]:null}get editingId(){return this.state.nodes.edit.id}createInternal(){return this.create({type:"internal"})}createLeaf(){return this.create({type:"leaf"})}create(){return He(this,arguments,void 0,function*(t={}){let r=t.parentId===void 0?Gt(this):t.parentId,n=t.index??Wt(this),i=t.type??"leaf",s=yield E(this.props.onCreate,{type:i,parentId:r,index:n,parentNode:this.get(r)});s&&(this.focus(s),setTimeout(()=>{this.edit(s).then(()=>{this.select(s),this.activate(s)})}))})}delete(t){return He(this,void 0,void 0,function*(){if(!t)return;let r=(Array.isArray(t)?t:[t]).map(M),n=r.map(i=>this.get(i)).filter(i=>!!i);yield E(this.props.onDelete,{nodes:n,ids:r})})}edit(t){let r=M(t);return this.resolveEdit({cancelled:!0}),this.scrollTo(r),this.dispatch(Pe(r)),new Promise(n=>{de.editPromise=n})}submit(t,r){return He(this,void 0,void 0,function*(){if(!t)return;let n=M(t);yield E(this.props.onRename,{id:n,name:r,node:this.get(n)}),this.dispatch(Pe(null)),this.resolveEdit({cancelled:!1,value:r}),setTimeout(()=>this.onFocus())})}reset(){this.dispatch(Pe(null)),this.resolveEdit({cancelled:!0}),setTimeout(()=>this.onFocus())}activate(t){let r=this.get(_(t));r&&E(this.props.onActivate,r)}resolveEdit(t){let r=de.editPromise;r&&r(t),de.editPromise=null}get selectedIds(){return this.state.nodes.selection.ids}get selectedNodes(){let t=[];for(let r of Array.from(this.selectedIds)){let n=this.get(r);n&&t.push(n)}return t}focus(t,r={}){t&&(this.props.selectionFollowsFocus?this.select(t):(this.dispatch(B(M(t))),r.scroll!==!1&&this.scrollTo(t),this.focusedNode&&E(this.props.onFocus,this.focusedNode)))}pageUp(){var i;let t=this.visibleStartIndex,r=this.visibleStopIndex-t,n=((i=this.focusedNode)==null?void 0:i.rowIndex)??0;n=n>t?t:Math.max(t-r,0),this.focus(this.at(n))}pageDown(){var s;let t=this.visibleStartIndex,r=this.visibleStopIndex,n=r-t,i=((s=this.focusedNode)==null?void 0:s.rowIndex)??0;i=i<r?r:Math.min(i+n,this.visibleNodes.length-1),this.focus(this.at(i))}select(t,r={}){if(!t)return;let n=r.focus!==!1,i=M(t);n&&this.dispatch(B(i)),this.dispatch(j.only(i)),this.dispatch(j.anchor(i)),this.dispatch(j.mostRecent(i)),this.scrollTo(i,r.align),this.focusedNode&&n&&E(this.props.onFocus,this.focusedNode),E(this.props.onSelect,this.selectedNodes)}deselect(t){if(!t)return;let r=M(t);this.dispatch(j.remove(r)),E(this.props.onSelect,this.selectedNodes)}selectMulti(t){let r=this.get(_(t));r&&(this.dispatch(B(r.id)),this.dispatch(j.add(r.id)),this.dispatch(j.anchor(r.id)),this.dispatch(j.mostRecent(r.id)),this.scrollTo(r),this.focusedNode&&E(this.props.onFocus,this.focusedNode),E(this.props.onSelect,this.selectedNodes))}selectContiguous(t){if(!t)return;let r=M(t),{anchor:n,mostRecent:i}=this.state.nodes.selection;this.dispatch(B(r)),this.dispatch(j.remove(this.nodesBetween(n,i))),this.dispatch(j.add(this.nodesBetween(n,_(r)))),this.dispatch(j.mostRecent(r)),this.scrollTo(r),this.focusedNode&&E(this.props.onFocus,this.focusedNode),E(this.props.onSelect,this.selectedNodes)}deselectAll(){this.setSelection({ids:[],anchor:null,mostRecent:null}),E(this.props.onSelect,this.selectedNodes)}selectAll(){var t;this.setSelection({ids:Object.keys(this.idToIndex),anchor:this.firstNode,mostRecent:this.lastNode}),this.dispatch(B((t=this.lastNode)==null?void 0:t.id)),this.focusedNode&&E(this.props.onFocus,this.focusedNode),E(this.props.onSelect,this.selectedNodes)}setSelection(t){var s;let r=new Set((s=t.ids)==null?void 0:s.map(M)),n=_(t.anchor),i=_(t.mostRecent);this.dispatch(j.set({ids:r,anchor:n,mostRecent:i})),E(this.props.onSelect,this.selectedNodes)}get cursorParentId(){let{cursor:t}=this.state.dnd;return t.type==="highlight"?t.id:null}get cursorOverFolder(){return this.state.dnd.cursor.type==="highlight"}get dragNodes(){return this.state.dnd.dragIds.map(t=>this.get(t)).filter(t=>!!t)}get dragNode(){return this.get(this.state.nodes.drag.id)}get dragDestinationParent(){return this.get(this.state.nodes.drag.destinationParentId)}get dragDestinationIndex(){return this.state.nodes.drag.destinationIndex}canDrop(){if(this.isFiltered)return!1;let t=this.get(this.state.dnd.parentId)??this.root,r=this.dragNodes,n=this.props.disableDrop;for(let i of r)if(!i||!t||i.isInternal&&At(t,i))return!1;return typeof n=="function"?!n({parentNode:t,dragNodes:this.dragNodes,index:this.state.dnd.index||0}):typeof n=="string"?!t.data[n]:typeof n=="boolean"?!n:!0}hideCursor(){this.dispatch(W.cursor({type:"none"}))}showCursor(t){this.dispatch(W.cursor(t))}open(t){let r=_(t);r&&(this.isOpen(r)||(this.dispatch(_e.open(r,this.isFiltered)),E(this.props.onToggle,r)))}close(t){let r=_(t);r&&this.isOpen(r)&&(this.dispatch(_e.close(r,this.isFiltered)),E(this.props.onToggle,r))}toggle(t){let r=_(t);if(r)return this.isOpen(r)?this.close(r):this.open(r)}openParents(t){var i;let r=_(t);if(!r)return;let n=(i=Re(this.root,r))==null?void 0:i.parent;for(;n;)this.open(n.id),n=n.parent}openSiblings(t){let r=t.parent;if(!r)this.toggle(t.id);else if(r.children){let n=t.isOpen;for(let i of r.children)i.isInternal&&(n?this.close(i.id):this.open(i.id));this.scrollTo(this.focusedNode)}}openAll(){oe(this.root,t=>{t.isInternal&&t.open()})}closeAll(){oe(this.root,t=>{t.isInternal&&t.close()})}scrollTo(t,r="smart"){if(!t)return;let n=M(t);return this.openParents(n),zt(()=>n in this.idToIndex).then(()=>{var i;let s=this.idToIndex[n];s!==void 0&&((i=this.list.current)==null||i.scrollToItem(s,r))}).catch(()=>{})}get isEditing(){return this.state.nodes.edit.id!==null}get isFiltered(){var t;return!!((t=this.props.searchTerm)!=null&&t.trim())}get hasFocus(){return this.state.nodes.focus.treeFocused}get hasNoSelection(){return this.state.nodes.selection.ids.size===0}get hasOneSelection(){return this.state.nodes.selection.ids.size===1}get hasMultipleSelections(){return this.state.nodes.selection.ids.size>1}isSelected(t){return t?this.state.nodes.selection.ids.has(t):!1}isOpen(t){if(!t)return!1;if(t==="__REACT_ARBORIST_INTERNAL_ROOT__")return!0;let r=this.props.openByDefault??!0;return this.isFiltered?this.state.nodes.open.filtered[t]??!0:this.state.nodes.open.unfiltered[t]??r}isEditable(t){return!Y(t,this.props.disableEdit||(()=>!1))}isDraggable(t){return!Y(t,this.props.disableDrag||(()=>!1))}isDragging(t){let r=_(t);return r?this.state.nodes.drag.id===r:!1}isFocused(t){return this.hasFocus&&this.state.nodes.focus.id===t}isMatch(t){return this.matchFn(t)}willReceiveDrop(t){let r=_(t);if(!r)return!1;let{destinationParentId:n,destinationIndex:i}=this.state.nodes.drag;return r===n&&i===null}onFocus(){let t=this.focusedNode||this.firstNode;t&&this.dispatch(B(t.id))}onBlur(){this.dispatch($i())}onItemsRendered(t){this.visibleStartIndex=t.visibleStartIndex,this.visibleStopIndex=t.visibleStopIndex}get renderContainer(){return this.props.renderContainer||rr}get renderRow(){return this.props.renderRow||Gi}get renderNode(){return this.props.children||Ki}get renderDragPreview(){return this.props.renderDragPreview||qt}get renderCursor(){return this.props.renderCursor||Wi}};function w(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var or=typeof Symbol=="function"&&Symbol.observable||"@@observable",Fe=()=>Math.random().toString(36).substring(7).split("").join("."),le={INIT:`@@redux/INIT${Fe()}`,REPLACE:`@@redux/REPLACE${Fe()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Fe()}`};function js(e){if(typeof e!="object"||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function ar(e,t,r){if(typeof e!="function")throw Error(w(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw Error(w(0));if(typeof t=="function"&&r===void 0&&(r=t,t=void 0),r!==void 0){if(typeof r!="function")throw Error(w(1));return r(ar)(e,t)}let n=e,i=t,s=new Map,o=s,a=0,d=!1;function h(){o===s&&(o=new Map,s.forEach((l,u)=>{o.set(u,l)}))}function p(){if(d)throw Error(w(3));return i}function b(l){if(typeof l!="function")throw Error(w(4));if(d)throw Error(w(5));let u=!0;h();let g=a++;return o.set(g,l),function(){if(u){if(d)throw Error(w(6));u=!1,h(),o.delete(g),s=null}}}function I(l){if(!js(l))throw Error(w(7));if(l.type===void 0)throw Error(w(8));if(typeof l.type!="string")throw Error(w(17));if(d)throw Error(w(9));try{d=!0,i=n(i,l)}finally{d=!1}return(s=o).forEach(u=>{u()}),l}function v(l){if(typeof l!="function")throw Error(w(10));n=l,I({type:le.REPLACE})}function c(){let l=b;return{subscribe(u){if(typeof u!="object"||!u)throw Error(w(11));function g(){let O=u;O.next&&O.next(p())}return g(),{unsubscribe:l(g)}},[or](){return this}}}return I({type:le.INIT}),{dispatch:I,subscribe:b,getState:p,replaceReducer:v,[or]:c}}function _s(e){Object.keys(e).forEach(t=>{let r=e[t];if(r(void 0,{type:le.INIT})===void 0)throw Error(w(12));if(r(void 0,{type:le.PROBE_UNKNOWN_ACTION()})===void 0)throw Error(w(13))})}function lr(e){let t=Object.keys(e),r={};for(let s=0;s<t.length;s++){let o=t[s];typeof e[o]=="function"&&(r[o]=e[o])}let n=Object.keys(r),i;try{_s(r)}catch(s){i=s}return function(s={},o){if(i)throw i;let a=!1,d={};for(let h=0;h<n.length;h++){let p=n[h],b=r[p],I=s[p],v=b(I,o);if(v===void 0)throw o&&o.type,Error(w(14));d[p]=v,a||(a=v!==I)}return a||(a=n.length!==Object.keys(s).length),a?d:s}}function Ms(e=z().nodes.drag,t){switch(t.type){case"DND_DRAG_START":return Object.assign(Object.assign({},e),{id:t.id,selectedIds:t.dragIds});case"DND_DRAG_END":return Object.assign(Object.assign({},e),{id:null,destinationParentId:null,destinationIndex:null,selectedIds:[]});case"DND_HOVERING":return t.parentId!==e.destinationParentId||t.index!=e.destinationIndex?Object.assign(Object.assign({},e),{destinationParentId:t.parentId,destinationIndex:t.index}):e;default:return e}}const As=lr({nodes:lr({focus:Xi,edit:qi,open:Ji,selection:Qi,drag:Ms}),dnd:Zi});var Ls=Sr(),ks=z();function Hs({treeProps:e,imperativeHandle:t,children:r}){let n=(0,f.useRef)(null),i=(0,f.useRef)(null),s=(0,f.useRef)(ar(As,z(e))),o=(0,Ls.useSyncExternalStore)(s.current.subscribe,s.current.getState,()=>ks),a=(0,f.useMemo)(()=>new Ps(s.current,e,n,i),[]),d=(0,f.useRef)(0);return(0,f.useMemo)(()=>{d.current+=1,a.update(e)},[...Object.values(e),o.nodes.open]),(0,f.useImperativeHandle)(t,()=>a),(0,f.useEffect)(()=>{a.props.selection?a.select(a.props.selection,{focus:!1}):a.deselectAll()},[a.props.selection]),(0,f.useEffect)(()=>{a.props.searchTerm||s.current.dispatch(_e.clear(!0))},[a.props.searchTerm]),(0,m.jsx)(xt.Provider,{value:a,children:(0,m.jsx)(Rt.Provider,{value:d.current,children:(0,m.jsx)(Ct.Provider,{value:o.nodes,children:(0,m.jsx)(Nt.Provider,{value:o.dnd,children:(0,m.jsx)(lt,Object.assign({backend:wt,options:{rootElement:a.props.dndRootElement||void 0}},e.dndManager&&{manager:e.dndManager},{children:r}))})})})})}function Fs(){let e=N(),[,t]=pt(()=>({accept:"NODE",canDrop:(r,n)=>n.isOver({shallow:!0})?e.canDrop():!1,hover:(r,n)=>{if(!n.isOver({shallow:!0}))return;let i=n.getClientOffset();if(!e.listEl.current||!i)return;let{cursor:s,drop:o}=er({element:e.listEl.current,offset:i,indent:e.indent,node:null,prevNode:e.visibleNodes[e.visibleNodes.length-1],nextNode:null});o&&e.dispatch(W.hovering(o.parentId,o.index)),n.canDrop()?s&&e.showCursor(s):e.hideCursor()}}),[e]);t(e.listEl)}function Us(e){return Fs(),e.children}function Bs(){return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(N().props.renderContainer||rr,{})})}function zs(){let e=N(),{offset:t,mouse:r,item:n,isDragging:i}=ui(s=>({offset:s.getSourceClientOffset(),mouse:s.getClientOffset(),item:s.getItem(),isDragging:s.isDragging()}));return(0,m.jsx)(e.props.renderDragPreview||qt,{offset:t,mouse:r,id:(n==null?void 0:n.id)||null,dragIds:(n==null?void 0:n.dragIds)||[],isDragging:i})}var dr=class{constructor(e){this.root=Ws(e)}get data(){var e;return((e=this.root.children)==null?void 0:e.map(t=>t.data))??[]}create(e){let t=e.parentId?this.find(e.parentId):this.root;if(!t)return null;t.addChild(e.data,e.index)}move(e){let t=this.find(e.id),r=e.parentId?this.find(e.parentId):this.root;!t||!r||(r.addChild(t.data,e.index),t.drop())}update(e){let t=this.find(e.id);t&&t.update(e.changes)}drop(e){let t=this.find(e.id);t&&t.drop()}find(e,t=this.root){if(!t)return null;if(t.id===e)return t;if(t.children){for(let r of t.children){let n=this.find(e,r);if(n)return n}return null}return null}};function Ws(e){let t=new cr({id:"ROOT"},null);return t.children=e.map(r=>Ue(r,t)),t}function Ue(e,t){let r=new cr(e,t);return e.children&&(r.children=e.children.map(n=>Ue(n,r))),r}var cr=class{constructor(e,t){this.data=e,this.parent=t,this.id=e.id}hasParent(){return!!this.parent}get childIndex(){return this.hasParent()?this.parent.children.indexOf(this):-1}addChild(e,t){let r=Ue(e,this);this.children=this.children??[],this.children.splice(t,0,r),this.data.children=this.data.children??[],this.data.children.splice(t,0,e)}removeChild(e){var t,r;(t=this.children)==null||t.splice(e,1),(r=this.data.children)==null||r.splice(e,1)}update(e){if(this.hasParent()){let t=this.childIndex;this.parent.addChild(Object.assign(Object.assign({},this.data),e),t),this.drop()}}drop(){this.hasParent()&&this.parent.removeChild(this.childIndex)}},Gs=0;function Ks(e){let[t,r]=(0,f.useState)(e),n=(0,f.useMemo)(()=>new dr(t),[t]);return[t,{onMove:i=>{for(let s of i.dragIds)n.move({id:s,parentId:i.parentId,index:i.index});r(n.data)},onRename:({name:i,id:s})=>{n.update({id:s,changes:{name:i}}),r(n.data)},onCreate:({parentId:i,index:s,type:o})=>{let a={id:`simple-tree-id-${Gs++}`,name:""};return o==="internal"&&(a.children=[]),n.create({parentId:i,index:s,data:a}),r(n.data),a},onDelete:i=>{i.ids.forEach(s=>n.drop({id:s})),r(n.data)}}]}function Vs(e){if(e.initialData&&e.data)throw Error("React Arborist Tree => Provide either a data or initialData prop, but not both.");if(e.initialData&&(e.onCreate||e.onDelete||e.onMove||e.onRename))throw Error(`React Arborist Tree => You passed the initialData prop along with a data handler.
3
3
  Use the data prop if you want to provide your own handlers.`);if(e.initialData){let[t,r]=Ks(e.initialData);return Object.assign(Object.assign(Object.assign({},e),r),{data:t})}else return e}function Ys(e,t){return(0,m.jsxs)(Hs,{treeProps:Vs(e),imperativeHandle:t,children:[(0,m.jsx)(Us,{children:(0,m.jsx)(Bs,{})}),(0,m.jsx)(zs,{})]})}const qs=(0,f.forwardRef)(Ys);export{lt as a,A as i,dr as n,wt as r,qs as t};
@@ -1,4 +1,4 @@
1
- import{ar as o,rr as c}from"./cells-DVXjWBHI.js";import{t}from"./createLucideIcon-BvP5LBIs.js";import{i,n as p,r as d,t as m}from"./file-video-camera-Fa5c_iPb.js";import{t as f}from"./file-DVwc11C3.js";var s=t("file-code",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]),h=t("folder-archive",[["circle",{cx:"15",cy:"19",r:"2",key:"u2pros"}],["path",{d:"M20.9 19.8A2 2 0 0 0 22 18V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h5.1",key:"1jj40k"}],["path",{d:"M15 11v-1",key:"cntcp"}],["path",{d:"M15 17v-2",key:"1279jj"}]]),r=t("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);function u(a){let n=a.split(".").pop();if(n===void 0)return"unknown";switch(n.toLowerCase()){case"py":return"python";case"txt":case"md":case"qmd":return"text";case"png":case"jpg":case"jpeg":case"gif":return"image";case"csv":return"data";case"json":return"json";case"js":case"ts":case"tsx":case"html":case"css":case"toml":case"yaml":case"yml":case"wasm":return"code";case"mp3":case"m4a":case"m4v":case"ogg":case"wav":return"audio";case"mp4":case"webm":case"mkv":return"video";case"pdf":return"pdf";case"zip":case"tar":case"gz":return"zip";default:return"unknown"}}const $={directory:r,python:s,json:i,code:s,text:c,image:p,audio:d,video:m,pdf:s,zip:h,data:o,unknown:f};var e=" ";const v={directory:a=>`os.listdir("${a}")`,python:a=>`with open("${a}", "r") as _f:
1
+ import{ar as o,rr as c}from"./cells-DD42bsu7.js";import{t}from"./createLucideIcon-BvP5LBIs.js";import{i,n as p,r as d,t as m}from"./file-video-camera-Fa5c_iPb.js";import{t as f}from"./file-DVwc11C3.js";var s=t("file-code",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]),h=t("folder-archive",[["circle",{cx:"15",cy:"19",r:"2",key:"u2pros"}],["path",{d:"M20.9 19.8A2 2 0 0 0 22 18V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h5.1",key:"1jj40k"}],["path",{d:"M15 11v-1",key:"cntcp"}],["path",{d:"M15 17v-2",key:"1279jj"}]]),r=t("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);function u(a){let n=a.split(".").pop();if(n===void 0)return"unknown";switch(n.toLowerCase()){case"py":return"python";case"txt":case"md":case"qmd":return"text";case"png":case"jpg":case"jpeg":case"gif":return"image";case"csv":return"data";case"json":return"json";case"js":case"ts":case"tsx":case"html":case"css":case"toml":case"yaml":case"yml":case"wasm":return"code";case"mp3":case"m4a":case"m4v":case"ogg":case"wav":return"audio";case"mp4":case"webm":case"mkv":return"video";case"pdf":return"pdf";case"zip":case"tar":case"gz":return"zip";default:return"unknown"}}const $={directory:r,python:s,json:i,code:s,text:c,image:p,audio:d,video:m,pdf:s,zip:h,data:o,unknown:f};var e=" ";const v={directory:a=>`os.listdir("${a}")`,python:a=>`with open("${a}", "r") as _f:
2
2
  ${e}...
3
3
  `,json:a=>`with open("${a}", "r") as _f:
4
4
  ${e}_data = json.load(_f)
@@ -1 +1 @@
1
- import{u as l}from"./useEvent-WUlsM6MC.js";import{T as s}from"./cells-DVXjWBHI.js";import{t as i}from"./compiler-runtime-B3qBwwSJ.js";import{o as n}from"./utils-CORJ8yYa.js";import{n as f}from"./html-to-image-Din4blht.js";import{o as c}from"./focus-C2gi0jxY.js";var p=i();function u(){let o=(0,p.c)(4),a=l(n),r=c(),{createNewCell:t}=s(),e;return o[0]!==a||o[1]!==t||o[2]!==r?(e=m=>{m.includes("alt")&&f({autoInstantiate:a,createNewCell:t,fromCellId:r}),t({code:m,before:!1,cellId:r??"__end__"})},o[0]=a,o[1]=t,o[2]=r,o[3]=e):e=o[3],e}export{u as t};
1
+ import{u as l}from"./useEvent-WUlsM6MC.js";import{T as s}from"./cells-DD42bsu7.js";import{t as i}from"./compiler-runtime-B3qBwwSJ.js";import{o as n}from"./utils-CORJ8yYa.js";import{n as f}from"./html-to-image-CojwvW9z.js";import{o as c}from"./focus-DiPb_hn6.js";var p=i();function u(){let o=(0,p.c)(4),a=l(n),r=c(),{createNewCell:t}=s(),e;return o[0]!==a||o[1]!==t||o[2]!==r?(e=m=>{m.includes("alt")&&f({autoInstantiate:a,createNewCell:t,fromCellId:r}),t({code:m,before:!1,cellId:r??"__end__"})},o[0]=a,o[1]=t,o[2]=r,o[3]=e):e=o[3],e}export{u as t};
@@ -1 +1 @@
1
- import{s as T}from"./chunk-LvLJmgfZ.js";import{t as N}from"./react-Bj1aDYRI.js";import{t as _}from"./compiler-runtime-B3qBwwSJ.js";import{m as f,u as S}from"./useEventListener-CjXriKgk.js";import{r as k}from"./constants-CdR60lKM.js";import{S as C}from"./config-vle9v48l.js";import{t as F}from"./createLucideIcon-BvP5LBIs.js";import{P as M}from"./usePress-C7hs6zHi.js";var A=F("case-sensitive",[["path",{d:"m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16",key:"d5nyq2"}],["path",{d:"M22 9v7",key:"pvm9v3"}],["path",{d:"M3.304 13h6.392",key:"1q3zxz"}],["circle",{cx:"18.5",cy:"12.5",r:"3.5",key:"z97x68"}]]),R=typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,w=new WeakMap,s=[];function P(t,e){let r=M(t==null?void 0:t[0]),a=e instanceof r.Element?{root:e}:e,l=(a==null?void 0:a.root)??document.body,h=(a==null?void 0:a.shouldUseInert)&&R,m=new Set(t),u=new Set,v=n=>h&&n instanceof r.HTMLElement?n.inert:n.getAttribute("aria-hidden")==="true",o=(n,i)=>{h&&n instanceof r.HTMLElement?n.inert=i:i?n.setAttribute("aria-hidden","true"):(n.removeAttribute("aria-hidden"),n instanceof r.HTMLElement&&(n.inert=!1))},p=n=>{for(let d of n.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))m.add(d);let i=d=>{if(u.has(d)||m.has(d)||d.parentElement&&u.has(d.parentElement)&&d.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let L of m)if(d.contains(L))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},c=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:i}),x=i(n);if(x===NodeFilter.FILTER_ACCEPT&&b(n),x!==NodeFilter.FILTER_REJECT){let d=c.nextNode();for(;d!=null;)b(d),d=c.nextNode()}},b=n=>{let i=w.get(n)??0;v(n)&&i===0||(i===0&&o(n,!0),u.add(n),w.set(n,i+1))};s.length&&s[s.length-1].disconnect(),p(l);let E=new MutationObserver(n=>{for(let i of n)if(i.type==="childList"&&![...m,...u].some(c=>c.contains(i.target)))for(let c of i.addedNodes)(c instanceof HTMLElement||c instanceof SVGElement)&&(c.dataset.liveAnnouncer==="true"||c.dataset.reactAriaTopLayer==="true")?m.add(c):c instanceof Element&&p(c)});E.observe(l,{childList:!0,subtree:!0});let y={visibleNodes:m,hiddenNodes:u,observe(){E.observe(l,{childList:!0,subtree:!0})},disconnect(){E.disconnect()}};return s.push(y),()=>{E.disconnect();for(let n of u){let i=w.get(n);i!=null&&(i===1?(o(n,!1),w.delete(n)):w.set(n,i-1))}y===s[s.length-1]?(s.pop(),s.length&&s[s.length-1].observe()):s.splice(s.indexOf(y),1)}}function H(t){let e=s[s.length-1];if(e&&!e.visibleNodes.has(t))return e.visibleNodes.add(t),()=>{e.visibleNodes.delete(t)}}const I=typeof window<"u"&&window.parent!==window;function K(){new URLSearchParams(window.location.search).has(k.vscode)&&(!I||C()||(f.log("[vscode] Registering VS Code bindings"),W(),D(),q(),z()))}function D(){window.addEventListener("copy",()=>{var t;g({command:"copy",text:((t=window.getSelection())==null?void 0:t.toString())??""})}),window.addEventListener("cut",()=>{var e;let t=((e=window.getSelection())==null?void 0:e.toString())??"";S()&&document.execCommand("insertText",!1,""),g({command:"cut",text:t})}),window.addEventListener("message",async t=>{try{let e=t.data,r=S();switch(e.command){case"paste":if(f.log(`[vscode] Received paste mac=${r}`,e),r){let a=document.activeElement;if(!a){f.warn("[vscode] No active element to paste into"),document.execCommand("insertText",!1,e.text);return}let l=new DataTransfer;l.setData("text/plain",e.text),a.dispatchEvent(new ClipboardEvent("paste",{clipboardData:l}))}else f.log("[vscode] Not pasting on mac");return}}catch(e){f.error("Error in paste message handler",e)}})}function W(){document.addEventListener("keydown",t=>{var e,r;if((t.ctrlKey||t.metaKey)&&t.key==="c"){let a=((e=window.getSelection())==null?void 0:e.toString())??"";f.log("[vscode] Sending copy",a),g({command:"copy",text:a});return}if((t.ctrlKey||t.metaKey)&&t.key==="x"){let a=((r=window.getSelection())==null?void 0:r.toString())??"";S()&&document.execCommand("insertText",!1,""),f.log("[vscode] Sending cut",a),g({command:"cut",text:a});return}if((t.ctrlKey||t.metaKey)&&t.key==="v"){f.log("[vscode] Sending paste"),g({command:"paste"});return}})}function q(){document.addEventListener("click",t=>{let e=t.target;if(e.tagName!=="A")return;let r=e.getAttribute("href");r&&(r.startsWith("http://")||r.startsWith("https://"))&&(t.preventDefault(),g({command:"external_link",url:r}))})}function z(){document.addEventListener("contextmenu",t=>{t.preventDefault(),g({command:"context_menu"})})}function g(t){var e;(e=window.parent)==null||e.postMessage(t,"*")}var O=_(),J=T(N(),1);function U(t){let e=(0,O.c)(6),[r,a]=(0,J.useState)(t),l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=o=>{var p;(p=o==null?void 0:o.stopPropagation)==null||p.call(o),a(!0)},e[0]=l):l=e[0];let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=o=>{var p;(p=o==null?void 0:o.stopPropagation)==null||p.call(o),a(!1)},e[1]=h):h=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=o=>{var p;(p=o==null?void 0:o.stopPropagation)==null||p.call(o),a(V)},e[2]=m):m=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u={setTrue:l,setFalse:h,toggle:m},e[3]=u):u=e[3];let v;return e[4]===r?v=e[5]:(v=[r,u],e[4]=r,e[5]=v),v}function V(t){return!t}export{P as a,H as i,K as n,A as o,g as r,U as t};
1
+ import{s as T}from"./chunk-LvLJmgfZ.js";import{t as N}from"./react-Bj1aDYRI.js";import{t as _}from"./compiler-runtime-B3qBwwSJ.js";import{m as f,u as S}from"./useEventListener-CjXriKgk.js";import{r as k}from"./constants-CdR60lKM.js";import{S as C}from"./config-CBwelk8k.js";import{t as F}from"./createLucideIcon-BvP5LBIs.js";import{P as M}from"./usePress-DcdVsIfA.js";var A=F("case-sensitive",[["path",{d:"m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16",key:"d5nyq2"}],["path",{d:"M22 9v7",key:"pvm9v3"}],["path",{d:"M3.304 13h6.392",key:"1q3zxz"}],["circle",{cx:"18.5",cy:"12.5",r:"3.5",key:"z97x68"}]]),R=typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,w=new WeakMap,s=[];function P(t,e){let r=M(t==null?void 0:t[0]),a=e instanceof r.Element?{root:e}:e,l=(a==null?void 0:a.root)??document.body,h=(a==null?void 0:a.shouldUseInert)&&R,m=new Set(t),u=new Set,v=n=>h&&n instanceof r.HTMLElement?n.inert:n.getAttribute("aria-hidden")==="true",o=(n,i)=>{h&&n instanceof r.HTMLElement?n.inert=i:i?n.setAttribute("aria-hidden","true"):(n.removeAttribute("aria-hidden"),n instanceof r.HTMLElement&&(n.inert=!1))},p=n=>{for(let d of n.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))m.add(d);let i=d=>{if(u.has(d)||m.has(d)||d.parentElement&&u.has(d.parentElement)&&d.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let L of m)if(d.contains(L))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},c=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:i}),x=i(n);if(x===NodeFilter.FILTER_ACCEPT&&b(n),x!==NodeFilter.FILTER_REJECT){let d=c.nextNode();for(;d!=null;)b(d),d=c.nextNode()}},b=n=>{let i=w.get(n)??0;v(n)&&i===0||(i===0&&o(n,!0),u.add(n),w.set(n,i+1))};s.length&&s[s.length-1].disconnect(),p(l);let E=new MutationObserver(n=>{for(let i of n)if(i.type==="childList"&&![...m,...u].some(c=>c.contains(i.target)))for(let c of i.addedNodes)(c instanceof HTMLElement||c instanceof SVGElement)&&(c.dataset.liveAnnouncer==="true"||c.dataset.reactAriaTopLayer==="true")?m.add(c):c instanceof Element&&p(c)});E.observe(l,{childList:!0,subtree:!0});let y={visibleNodes:m,hiddenNodes:u,observe(){E.observe(l,{childList:!0,subtree:!0})},disconnect(){E.disconnect()}};return s.push(y),()=>{E.disconnect();for(let n of u){let i=w.get(n);i!=null&&(i===1?(o(n,!1),w.delete(n)):w.set(n,i-1))}y===s[s.length-1]?(s.pop(),s.length&&s[s.length-1].observe()):s.splice(s.indexOf(y),1)}}function H(t){let e=s[s.length-1];if(e&&!e.visibleNodes.has(t))return e.visibleNodes.add(t),()=>{e.visibleNodes.delete(t)}}const I=typeof window<"u"&&window.parent!==window;function K(){new URLSearchParams(window.location.search).has(k.vscode)&&(!I||C()||(f.log("[vscode] Registering VS Code bindings"),W(),D(),q(),z()))}function D(){window.addEventListener("copy",()=>{var t;g({command:"copy",text:((t=window.getSelection())==null?void 0:t.toString())??""})}),window.addEventListener("cut",()=>{var e;let t=((e=window.getSelection())==null?void 0:e.toString())??"";S()&&document.execCommand("insertText",!1,""),g({command:"cut",text:t})}),window.addEventListener("message",async t=>{try{let e=t.data,r=S();switch(e.command){case"paste":if(f.log(`[vscode] Received paste mac=${r}`,e),r){let a=document.activeElement;if(!a){f.warn("[vscode] No active element to paste into"),document.execCommand("insertText",!1,e.text);return}let l=new DataTransfer;l.setData("text/plain",e.text),a.dispatchEvent(new ClipboardEvent("paste",{clipboardData:l}))}else f.log("[vscode] Not pasting on mac");return}}catch(e){f.error("Error in paste message handler",e)}})}function W(){document.addEventListener("keydown",t=>{var e,r;if((t.ctrlKey||t.metaKey)&&t.key==="c"){let a=((e=window.getSelection())==null?void 0:e.toString())??"";f.log("[vscode] Sending copy",a),g({command:"copy",text:a});return}if((t.ctrlKey||t.metaKey)&&t.key==="x"){let a=((r=window.getSelection())==null?void 0:r.toString())??"";S()&&document.execCommand("insertText",!1,""),f.log("[vscode] Sending cut",a),g({command:"cut",text:a});return}if((t.ctrlKey||t.metaKey)&&t.key==="v"){f.log("[vscode] Sending paste"),g({command:"paste"});return}})}function q(){document.addEventListener("click",t=>{let e=t.target;if(e.tagName!=="A")return;let r=e.getAttribute("href");r&&(r.startsWith("http://")||r.startsWith("https://"))&&(t.preventDefault(),g({command:"external_link",url:r}))})}function z(){document.addEventListener("contextmenu",t=>{t.preventDefault(),g({command:"context_menu"})})}function g(t){var e;(e=window.parent)==null||e.postMessage(t,"*")}var O=_(),J=T(N(),1);function U(t){let e=(0,O.c)(6),[r,a]=(0,J.useState)(t),l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=o=>{var p;(p=o==null?void 0:o.stopPropagation)==null||p.call(o),a(!0)},e[0]=l):l=e[0];let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=o=>{var p;(p=o==null?void 0:o.stopPropagation)==null||p.call(o),a(!1)},e[1]=h):h=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=o=>{var p;(p=o==null?void 0:o.stopPropagation)==null||p.call(o),a(V)},e[2]=m):m=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u={setTrue:l,setFalse:h,toggle:m},e[3]=u):u=e[3];let v;return e[4]===r?v=e[5]:(v=[r,u],e[4]=r,e[5]=v),v}function V(t){return!t}export{P as a,H as i,K as n,A as o,g as r,U as t};
@@ -1 +1 @@
1
- import{s as ae}from"./chunk-LvLJmgfZ.js";import{d as ie,u as x}from"./useEvent-WUlsM6MC.js";import{Bn as de,Fn as ne,T as se,ar as re,cr as ce,ir as he,lt as me,mt as pe,or as ke,v as fe,wt as K,yi as ue}from"./cells-DVXjWBHI.js";import{t as ye}from"./compiler-runtime-B3qBwwSJ.js";import{a as be,o as xe,r as je}from"./utils-CORJ8yYa.js";import{t as ve}from"./jsx-runtime-CP2fAiZX.js";import{r as Ce}from"./requests-DZy_SQ_v.js";import{t as f}from"./createLucideIcon-BvP5LBIs.js";import{n as V,r as G}from"./x-yqLqiq5Q.js";import{a as ge,h as Ie}from"./download-CNypwy8-.js";import{t as we}from"./chevron-right-_z3dkNFy.js";import{t as Q}from"./circle-plus-DfyUnSPr.js";import{t as ze}from"./code-xml-BMv1Dtd2.js";import{t as We}from"./eye-off-DgTL09j7.js";import{t as Me}from"./image-DJi6ovcV.js";import{t as _e}from"./link-BMKs5Gz_.js";import{t as Te}from"./play-Cb6tYyv-.js";import{a as Ae,n as Se}from"./state-ejdaxMKR.js";import{t as Ne}from"./trash-2-B00-wGoJ.js";import{t as Be}from"./use-toast-BtZldTi5.js";import{a as De,c as Re,n as Ee}from"./dialog-DxCG9U2G.js";import{n as He}from"./ImperativeModal-Upm6NvJ2.js";import{t as Oe}from"./copy-hG3KkB-h.js";import{r as F}from"./html-to-image-Din4blht.js";import{t as Pe}from"./label-CGS9p44y.js";import{t as Ue}from"./useDeleteCell-fYxNdCgY.js";import{n as qe,t as Le}from"./icons-CHolxgW2.js";import{n as $}from"./name-cell-input-EJb1YnST.js";import{t as J}from"./multi-icon-OxLi6M3I.js";import{t as Fe}from"./useSplitCell-CNL377K-.js";var X=f("chevrons-down",[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]]),Y=f("chevrons-up",[["path",{d:"m17 11-5-5-5 5",key:"e8nh98"}],["path",{d:"m17 18-5-5-5 5",key:"2avn1x"}]]),Z=f("scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]),Ke=f("text-cursor-input",[["path",{d:"M12 20h-1a2 2 0 0 1-2-2 2 2 0 0 1-2 2H6",key:"1528k5"}],["path",{d:"M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7",key:"13ksps"}],["path",{d:"M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1",key:"1n9rhb"}],["path",{d:"M6 4h1a2 2 0 0 1 2 2 2 2 0 0 1 2-2h1",key:"1mj8rg"}],["path",{d:"M9 6v12",key:"velyjx"}]]),ee=f("zap-off",[["path",{d:"M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317",key:"193nxd"}],["path",{d:"M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773",key:"27a7lr"}],["path",{d:"M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643",key:"1e0qe9"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),le=f("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function Ve(a){let e=new URL(window.location.href);return e.hash=`scrollTo=${encodeURIComponent(a)}`,e.toString()}function Ge(a){var c;let e=(c=a.match(/scrollTo=([^&]+)/))==null?void 0:c[1];return e?decodeURIComponent(e.split("&")[0]):null}function te(a){return a==="_"?!1:!!(a&&a.trim().length>0)}var Qe=ye(),l=ae(ve(),1);function $e(a){let e=(0,Qe.c)(47),{cell:c,closePopover:u}=a,{createNewCell:h,updateCellConfig:n,updateCellName:j,moveCell:p,sendToTop:W,sendToBottom:M,addColumnBreakpoint:_,clearCellOutput:T,markUntouched:A}=se(),S=Fe(),N=pe(c==null?void 0:c.cellId),B=!x(fe),D=Ue(),{openModal:v}=He(),R=ie(Se),E=x(je),y=x(xe),oe=x(me),b=x(be),{saveCellConfig:s}=Ce();if(!c||oe){let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],e[0]=t):t=e[0],t}let{cellId:o,config:i,getEditorView:r,name:m,hasOutput:C,hasConsoleOutput:H,status:O}=c,g;e[1]!==o||e[2]!==i.disabled||e[3]!==s||e[4]!==n?(g=async()=>{let t={disabled:!i.disabled};await s({configs:{[o]:t}}),n({cellId:o,config:t})},e[1]=o,e[2]=i.disabled,e[3]=s,e[4]=n,e[5]=g):g=e[5];let P=g,I;e[6]!==o||e[7]!==i.hide_code||e[8]!==r||e[9]!==s||e[10]!==n?(I=async()=>{let t={hide_code:!i.hide_code};await s({configs:{[o]:t}}),n({cellId:o,config:t});let L=r();L&&(t.hide_code?L.contentDOM.blur():L.focus())},e[6]=o,e[7]=i.hide_code,e[8]=r,e[9]=s,e[10]=n,e[11]=I):I=e[11];let U=I,d=o===ue,w;e[12]===Symbol.for("react.memo_cache_sentinel")?(w=(0,l.jsx)(Te,{size:13,strokeWidth:1.5}),e[12]=w):w=e[12];let q=O==="running"||O==="queued"||O==="disabled-transitively"||i.disabled,k;e[13]===N?k=e[14]:(k=()=>N(),e[13]=N,e[14]=k);let z;return e[15]!==_||e[16]!==E||e[17]!==b||e[18]!==y||e[19]!==B||e[20]!==o||e[21]!==T||e[22]!==u||e[23]!==i.disabled||e[24]!==i.hide_code||e[25]!==h||e[26]!==D||e[27]!==r||e[28]!==H||e[29]!==C||e[30]!==d||e[31]!==A||e[32]!==p||e[33]!==m||e[34]!==v||e[35]!==s||e[36]!==M||e[37]!==W||e[38]!==R||e[39]!==S||e[40]!==q||e[41]!==k||e[42]!==P||e[43]!==U||e[44]!==n||e[45]!==j?(z=[[{icon:w,label:"Run cell",hotkey:"cell.run",hidden:q,redundant:!0,handle:k},{icon:(0,l.jsx)(Ae,{size:13,strokeWidth:1.5}),label:"Refactor with AI",hidden:!E,handle:()=>{R(t=>(t==null?void 0:t.cellId)===o?null:{cellId:o})},hotkey:"cell.aiCompletion"},{icon:(0,l.jsx)(Z,{size:13,strokeWidth:1.5}),label:"Split",hotkey:"cell.splitCell",handle:()=>S({cellId:o})},{icon:(0,l.jsx)(ze,{size:13,strokeWidth:1.5}),label:"Format",hotkey:"cell.format",handle:()=>{let t=r();t&&de({[o]:t})}},{icon:i.hide_code?(0,l.jsx)(he,{size:13,strokeWidth:1.5}):(0,l.jsx)(We,{size:13,strokeWidth:1.5}),label:i.hide_code?"Show code":"Hide code",handle:U,hotkey:"cell.hideCode"},{icon:i.disabled?(0,l.jsx)(ee,{size:13,strokeWidth:1.5}):(0,l.jsx)(le,{size:13,strokeWidth:1.5}),label:i.disabled?"Enable execution":"Disable execution",handle:P,hidden:d}],[{icon:(0,l.jsx)(Le,{}),label:"Convert to Markdown",hotkey:"cell.viewAsMarkdown",handle:async()=>{let t=r();t&&(F({autoInstantiate:y,createNewCell:h}),K(t,{language:"markdown",keepCodeAsIs:!1}),i.hide_code||(await s({configs:{[o]:{hide_code:!0}}}),n({cellId:o,config:{hide_code:!0}}),A({cellId:o})))},hidden:d},{icon:(0,l.jsx)(re,{size:13,strokeWidth:1.5}),label:"Convert to SQL",handle:()=>{let t=r();t&&(F({autoInstantiate:y,createNewCell:h}),K(t,{language:"sql",keepCodeAsIs:!1}))},hidden:d},{icon:(0,l.jsx)(qe,{}),label:"Toggle as Python",handle:()=>{let t=r();t&&(F({autoInstantiate:y,createNewCell:h}),ne(t,"python",{force:!0}))},hidden:d}],[{icon:(0,l.jsxs)(J,{children:[(0,l.jsx)(Q,{size:13,strokeWidth:1.5}),(0,l.jsx)(V,{size:8,strokeWidth:2})]}),label:"Create cell above",hotkey:"cell.createAbove",handle:()=>h({cellId:o,before:!0}),hidden:d,redundant:!0},{icon:(0,l.jsxs)(J,{children:[(0,l.jsx)(Q,{size:13,strokeWidth:1.5}),(0,l.jsx)(G,{size:8,strokeWidth:2})]}),label:"Create cell below",hotkey:"cell.createBelow",handle:()=>h({cellId:o,before:!1}),redundant:!0},{icon:(0,l.jsx)(V,{size:13,strokeWidth:1.5}),label:"Move cell up",hotkey:"cell.moveUp",handle:()=>p({cellId:o,before:!0}),hidden:d},{icon:(0,l.jsx)(G,{size:13,strokeWidth:1.5}),label:"Move cell down",hotkey:"cell.moveDown",handle:()=>p({cellId:o,before:!1}),hidden:d},{icon:(0,l.jsx)(Ie,{size:13,strokeWidth:1.5}),label:"Move cell left",hotkey:"cell.moveLeft",handle:()=>p({cellId:o,direction:"left"}),hidden:b!=="columns"||d},{icon:(0,l.jsx)(we,{size:13,strokeWidth:1.5}),label:"Move cell right",hotkey:"cell.moveRight",handle:()=>p({cellId:o,direction:"right"}),hidden:b!=="columns"||d},{icon:(0,l.jsx)(Y,{size:13,strokeWidth:1.5}),label:"Send to top",hotkey:"cell.sendToTop",handle:()=>W({cellId:o,scroll:!1}),hidden:d},{icon:(0,l.jsx)(X,{size:13,strokeWidth:1.5}),label:"Send to bottom",hotkey:"cell.sendToBottom",handle:()=>M({cellId:o,scroll:!1}),hidden:d},{icon:(0,l.jsx)(ke,{size:13,strokeWidth:1.5}),label:"Break into new column",hotkey:"cell.addColumnBreakpoint",handle:()=>_({cellId:o}),hidden:b!=="columns"||d}],[{icon:(0,l.jsx)(Me,{size:13,strokeWidth:1.5}),label:"Export output as PNG",hidden:!C,handle:()=>ge(o,"result")},{icon:(0,l.jsx)(ce,{size:13,strokeWidth:1.5}),label:"Clear output",hidden:!(C||H),handle:()=>{T({cellId:o})}}],[{icon:(0,l.jsx)(Ke,{size:13,strokeWidth:1.5}),label:"Name",disableClick:!0,handle:Ze,handleHeadless:()=>{v((0,l.jsxs)(Ee,{children:[(0,l.jsx)(De,{children:(0,l.jsx)(Re,{children:"Rename cell"})}),(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)(Pe,{htmlFor:"cell-name",children:"Cell name"}),(0,l.jsx)($,{placeholder:"cell name",value:m,onKeyDown:t=>{t.key==="Enter"&&(t.preventDefault(),t.stopPropagation(),v(null))},onChange:t=>j({cellId:o,name:t})})]})]}))},rightElement:(0,l.jsx)($,{placeholder:"cell name",value:m,onChange:t=>j({cellId:o,name:t}),onEnterKey:()=>u==null?void 0:u()}),hidden:d},{icon:(0,l.jsx)(_e,{size:13,strokeWidth:1.5}),label:"Copy link to cell",disabled:!te(m),tooltip:te(m)?void 0:"Only named cells can be linked to",handle:async()=>{await Oe(Ve(m)),Be({description:"Link copied to clipboard"})}}],[{label:"Delete",hidden:!B,variant:"danger",icon:(0,l.jsx)(Ne,{size:13,strokeWidth:1.5}),handle:()=>{D({cellId:o})}}]].map(Xe).filter(Je),e[15]=_,e[16]=E,e[17]=b,e[18]=y,e[19]=B,e[20]=o,e[21]=T,e[22]=u,e[23]=i.disabled,e[24]=i.hide_code,e[25]=h,e[26]=D,e[27]=r,e[28]=H,e[29]=C,e[30]=d,e[31]=A,e[32]=p,e[33]=m,e[34]=v,e[35]=s,e[36]=M,e[37]=W,e[38]=R,e[39]=S,e[40]=q,e[41]=k,e[42]=P,e[43]=U,e[44]=n,e[45]=j,e[46]=z):z=e[46],z}function Je(a){return a.length>0}function Xe(a){return a.filter(Ye)}function Ye(a){return!a.hidden}function Ze(a){a==null||a.stopPropagation(),a==null||a.preventDefault()}export{Z as a,ee as i,Ge as n,Y as o,le as r,X as s,$e as t};
1
+ import{s as ae}from"./chunk-LvLJmgfZ.js";import{d as ie,u as x}from"./useEvent-WUlsM6MC.js";import{Bn as de,Fn as ne,T as se,ar as re,cr as ce,ir as he,lt as me,mt as pe,or as ke,v as fe,wt as K,yi as ue}from"./cells-DD42bsu7.js";import{t as ye}from"./compiler-runtime-B3qBwwSJ.js";import{a as be,o as xe,r as je}from"./utils-CORJ8yYa.js";import{t as ve}from"./jsx-runtime-CP2fAiZX.js";import{r as Ce}from"./requests-DZy_SQ_v.js";import{t as f}from"./createLucideIcon-BvP5LBIs.js";import{n as V,r as G}from"./x-yqLqiq5Q.js";import{a as ge,h as Ie}from"./download-CmObLKP6.js";import{t as we}from"./chevron-right-_z3dkNFy.js";import{t as Q}from"./circle-plus-DfyUnSPr.js";import{t as ze}from"./code-xml-BMv1Dtd2.js";import{t as We}from"./eye-off-DgTL09j7.js";import{t as Me}from"./image-CBwHq93J.js";import{t as _e}from"./link-BmtFffTv.js";import{t as Te}from"./play-CkqWG85-.js";import{a as Ae,n as Se}from"./state-DRCtQIWh.js";import{t as Ne}from"./trash-2-CrA4LwJ2.js";import{t as Be}from"./use-toast-Hc8CXlvz.js";import{a as De,c as Re,n as Ee}from"./dialog-D_1x0b57.js";import{n as He}from"./ImperativeModal-MjC9Owmv.js";import{t as Oe}from"./copy-CgddLxfF.js";import{r as F}from"./html-to-image-CojwvW9z.js";import{t as Pe}from"./label-OL3StKg2.js";import{t as Ue}from"./useDeleteCell-CrSQfQw4.js";import{n as qe,t as Le}from"./icons-B9sHgc9n.js";import{n as $}from"./name-cell-input-HEC8dShQ.js";import{t as J}from"./multi-icon-BFa-He80.js";import{t as Fe}from"./useSplitCell-BL-Sir7Y.js";var X=f("chevrons-down",[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]]),Y=f("chevrons-up",[["path",{d:"m17 11-5-5-5 5",key:"e8nh98"}],["path",{d:"m17 18-5-5-5 5",key:"2avn1x"}]]),Z=f("scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]),Ke=f("text-cursor-input",[["path",{d:"M12 20h-1a2 2 0 0 1-2-2 2 2 0 0 1-2 2H6",key:"1528k5"}],["path",{d:"M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7",key:"13ksps"}],["path",{d:"M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1",key:"1n9rhb"}],["path",{d:"M6 4h1a2 2 0 0 1 2 2 2 2 0 0 1 2-2h1",key:"1mj8rg"}],["path",{d:"M9 6v12",key:"velyjx"}]]),ee=f("zap-off",[["path",{d:"M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317",key:"193nxd"}],["path",{d:"M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773",key:"27a7lr"}],["path",{d:"M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643",key:"1e0qe9"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),le=f("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function Ve(a){let e=new URL(window.location.href);return e.hash=`scrollTo=${encodeURIComponent(a)}`,e.toString()}function Ge(a){var c;let e=(c=a.match(/scrollTo=([^&]+)/))==null?void 0:c[1];return e?decodeURIComponent(e.split("&")[0]):null}function te(a){return a==="_"?!1:!!(a&&a.trim().length>0)}var Qe=ye(),l=ae(ve(),1);function $e(a){let e=(0,Qe.c)(47),{cell:c,closePopover:u}=a,{createNewCell:h,updateCellConfig:n,updateCellName:j,moveCell:p,sendToTop:W,sendToBottom:M,addColumnBreakpoint:_,clearCellOutput:T,markUntouched:A}=se(),S=Fe(),N=pe(c==null?void 0:c.cellId),B=!x(fe),D=Ue(),{openModal:v}=He(),R=ie(Se),E=x(je),y=x(xe),oe=x(me),b=x(be),{saveCellConfig:s}=Ce();if(!c||oe){let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],e[0]=t):t=e[0],t}let{cellId:o,config:i,getEditorView:r,name:m,hasOutput:C,hasConsoleOutput:H,status:O}=c,g;e[1]!==o||e[2]!==i.disabled||e[3]!==s||e[4]!==n?(g=async()=>{let t={disabled:!i.disabled};await s({configs:{[o]:t}}),n({cellId:o,config:t})},e[1]=o,e[2]=i.disabled,e[3]=s,e[4]=n,e[5]=g):g=e[5];let P=g,I;e[6]!==o||e[7]!==i.hide_code||e[8]!==r||e[9]!==s||e[10]!==n?(I=async()=>{let t={hide_code:!i.hide_code};await s({configs:{[o]:t}}),n({cellId:o,config:t});let L=r();L&&(t.hide_code?L.contentDOM.blur():L.focus())},e[6]=o,e[7]=i.hide_code,e[8]=r,e[9]=s,e[10]=n,e[11]=I):I=e[11];let U=I,d=o===ue,w;e[12]===Symbol.for("react.memo_cache_sentinel")?(w=(0,l.jsx)(Te,{size:13,strokeWidth:1.5}),e[12]=w):w=e[12];let q=O==="running"||O==="queued"||O==="disabled-transitively"||i.disabled,k;e[13]===N?k=e[14]:(k=()=>N(),e[13]=N,e[14]=k);let z;return e[15]!==_||e[16]!==E||e[17]!==b||e[18]!==y||e[19]!==B||e[20]!==o||e[21]!==T||e[22]!==u||e[23]!==i.disabled||e[24]!==i.hide_code||e[25]!==h||e[26]!==D||e[27]!==r||e[28]!==H||e[29]!==C||e[30]!==d||e[31]!==A||e[32]!==p||e[33]!==m||e[34]!==v||e[35]!==s||e[36]!==M||e[37]!==W||e[38]!==R||e[39]!==S||e[40]!==q||e[41]!==k||e[42]!==P||e[43]!==U||e[44]!==n||e[45]!==j?(z=[[{icon:w,label:"Run cell",hotkey:"cell.run",hidden:q,redundant:!0,handle:k},{icon:(0,l.jsx)(Ae,{size:13,strokeWidth:1.5}),label:"Refactor with AI",hidden:!E,handle:()=>{R(t=>(t==null?void 0:t.cellId)===o?null:{cellId:o})},hotkey:"cell.aiCompletion"},{icon:(0,l.jsx)(Z,{size:13,strokeWidth:1.5}),label:"Split",hotkey:"cell.splitCell",handle:()=>S({cellId:o})},{icon:(0,l.jsx)(ze,{size:13,strokeWidth:1.5}),label:"Format",hotkey:"cell.format",handle:()=>{let t=r();t&&de({[o]:t})}},{icon:i.hide_code?(0,l.jsx)(he,{size:13,strokeWidth:1.5}):(0,l.jsx)(We,{size:13,strokeWidth:1.5}),label:i.hide_code?"Show code":"Hide code",handle:U,hotkey:"cell.hideCode"},{icon:i.disabled?(0,l.jsx)(ee,{size:13,strokeWidth:1.5}):(0,l.jsx)(le,{size:13,strokeWidth:1.5}),label:i.disabled?"Enable execution":"Disable execution",handle:P,hidden:d}],[{icon:(0,l.jsx)(Le,{}),label:"Convert to Markdown",hotkey:"cell.viewAsMarkdown",handle:async()=>{let t=r();t&&(F({autoInstantiate:y,createNewCell:h}),K(t,{language:"markdown",keepCodeAsIs:!1}),i.hide_code||(await s({configs:{[o]:{hide_code:!0}}}),n({cellId:o,config:{hide_code:!0}}),A({cellId:o})))},hidden:d},{icon:(0,l.jsx)(re,{size:13,strokeWidth:1.5}),label:"Convert to SQL",handle:()=>{let t=r();t&&(F({autoInstantiate:y,createNewCell:h}),K(t,{language:"sql",keepCodeAsIs:!1}))},hidden:d},{icon:(0,l.jsx)(qe,{}),label:"Toggle as Python",handle:()=>{let t=r();t&&(F({autoInstantiate:y,createNewCell:h}),ne(t,"python",{force:!0}))},hidden:d}],[{icon:(0,l.jsxs)(J,{children:[(0,l.jsx)(Q,{size:13,strokeWidth:1.5}),(0,l.jsx)(V,{size:8,strokeWidth:2})]}),label:"Create cell above",hotkey:"cell.createAbove",handle:()=>h({cellId:o,before:!0}),hidden:d,redundant:!0},{icon:(0,l.jsxs)(J,{children:[(0,l.jsx)(Q,{size:13,strokeWidth:1.5}),(0,l.jsx)(G,{size:8,strokeWidth:2})]}),label:"Create cell below",hotkey:"cell.createBelow",handle:()=>h({cellId:o,before:!1}),redundant:!0},{icon:(0,l.jsx)(V,{size:13,strokeWidth:1.5}),label:"Move cell up",hotkey:"cell.moveUp",handle:()=>p({cellId:o,before:!0}),hidden:d},{icon:(0,l.jsx)(G,{size:13,strokeWidth:1.5}),label:"Move cell down",hotkey:"cell.moveDown",handle:()=>p({cellId:o,before:!1}),hidden:d},{icon:(0,l.jsx)(Ie,{size:13,strokeWidth:1.5}),label:"Move cell left",hotkey:"cell.moveLeft",handle:()=>p({cellId:o,direction:"left"}),hidden:b!=="columns"||d},{icon:(0,l.jsx)(we,{size:13,strokeWidth:1.5}),label:"Move cell right",hotkey:"cell.moveRight",handle:()=>p({cellId:o,direction:"right"}),hidden:b!=="columns"||d},{icon:(0,l.jsx)(Y,{size:13,strokeWidth:1.5}),label:"Send to top",hotkey:"cell.sendToTop",handle:()=>W({cellId:o,scroll:!1}),hidden:d},{icon:(0,l.jsx)(X,{size:13,strokeWidth:1.5}),label:"Send to bottom",hotkey:"cell.sendToBottom",handle:()=>M({cellId:o,scroll:!1}),hidden:d},{icon:(0,l.jsx)(ke,{size:13,strokeWidth:1.5}),label:"Break into new column",hotkey:"cell.addColumnBreakpoint",handle:()=>_({cellId:o}),hidden:b!=="columns"||d}],[{icon:(0,l.jsx)(Me,{size:13,strokeWidth:1.5}),label:"Export output as PNG",hidden:!C,handle:()=>ge(o,"result")},{icon:(0,l.jsx)(ce,{size:13,strokeWidth:1.5}),label:"Clear output",hidden:!(C||H),handle:()=>{T({cellId:o})}}],[{icon:(0,l.jsx)(Ke,{size:13,strokeWidth:1.5}),label:"Name",disableClick:!0,handle:Ze,handleHeadless:()=>{v((0,l.jsxs)(Ee,{children:[(0,l.jsx)(De,{children:(0,l.jsx)(Re,{children:"Rename cell"})}),(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)(Pe,{htmlFor:"cell-name",children:"Cell name"}),(0,l.jsx)($,{placeholder:"cell name",value:m,onKeyDown:t=>{t.key==="Enter"&&(t.preventDefault(),t.stopPropagation(),v(null))},onChange:t=>j({cellId:o,name:t})})]})]}))},rightElement:(0,l.jsx)($,{placeholder:"cell name",value:m,onChange:t=>j({cellId:o,name:t}),onEnterKey:()=>u==null?void 0:u()}),hidden:d},{icon:(0,l.jsx)(_e,{size:13,strokeWidth:1.5}),label:"Copy link to cell",disabled:!te(m),tooltip:te(m)?void 0:"Only named cells can be linked to",handle:async()=>{await Oe(Ve(m)),Be({description:"Link copied to clipboard"})}}],[{label:"Delete",hidden:!B,variant:"danger",icon:(0,l.jsx)(Ne,{size:13,strokeWidth:1.5}),handle:()=>{D({cellId:o})}}]].map(Xe).filter(Je),e[15]=_,e[16]=E,e[17]=b,e[18]=y,e[19]=B,e[20]=o,e[21]=T,e[22]=u,e[23]=i.disabled,e[24]=i.hide_code,e[25]=h,e[26]=D,e[27]=r,e[28]=H,e[29]=C,e[30]=d,e[31]=A,e[32]=p,e[33]=m,e[34]=v,e[35]=s,e[36]=M,e[37]=W,e[38]=R,e[39]=S,e[40]=q,e[41]=k,e[42]=P,e[43]=U,e[44]=n,e[45]=j,e[46]=z):z=e[46],z}function Je(a){return a.length>0}function Xe(a){return a.filter(Ye)}function Ye(a){return!a.hidden}function Ze(a){a==null||a.stopPropagation(),a==null||a.preventDefault()}export{Z as a,ee as i,Ge as n,Y as o,le as r,X as s,$e as t};
@@ -1 +1 @@
1
- import{s as c}from"./chunk-LvLJmgfZ.js";import{t as p}from"./react-Bj1aDYRI.js";import{t as d}from"./context-DAH8i0ik.js";var s=c(p(),1);function i(r,t){let e=(0,s.useRef)(null);return r&&e.current&&t(r,e.current)&&(r=e.current),e.current=r,r}var u=new Map,f=class{format(r){return this.formatter.format(r)}formatToParts(r){return this.formatter.formatToParts(r)}formatRange(r,t){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(r,t);if(t<r)throw RangeError("End date must be >= start date");return`${this.formatter.format(r)} \u2013 ${this.formatter.format(t)}`}formatRangeToParts(r,t){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(r,t);if(t<r)throw RangeError("End date must be >= start date");let e=this.formatter.formatToParts(r),n=this.formatter.formatToParts(t);return[...e.map(o=>({...o,source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...n.map(o=>({...o,source:"endRange"}))]}resolvedOptions(){let r=this.formatter.resolvedOptions();return g()&&(this.resolvedHourCycle||(this.resolvedHourCycle=T(r.locale,this.options)),r.hourCycle=this.resolvedHourCycle,r.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),r.calendar==="ethiopic-amete-alem"&&(r.calendar="ethioaa"),r}constructor(r,t={}){this.formatter=l(r,t),this.options=t}},y={true:{ja:"h11"},false:{}};function l(r,t={}){if(typeof t.hour12=="boolean"&&v()){t={...t};let o=y[String(t.hour12)][r.split("-")[0]],a=t.hour12?"h12":"h23";t.hourCycle=o??a,delete t.hour12}let e=r+(t?Object.entries(t).sort((o,a)=>o[0]<a[0]?-1:1).join():"");if(u.has(e))return u.get(e);let n=new Intl.DateTimeFormat(r,t);return u.set(e,n),n}var h=null;function v(){return h??(h=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),h}var m=null;function g(){return m??(m=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),m}function T(r,t){if(!t.timeStyle&&!t.hour)return;r=r.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),r+=(r.includes("-u-")?"":"-u")+"-nu-latn";let e=l(r,{...t,timeZone:void 0}),n=parseInt(e.formatToParts(new Date(2020,2,3,0)).find(a=>a.type==="hour").value,10),o=parseInt(e.formatToParts(new Date(2020,2,3,23)).find(a=>a.type==="hour").value,10);if(n===0&&o===23)return"h23";if(n===24&&o===23)return"h24";if(n===0&&o===11)return"h11";if(n===12&&o===11)return"h12";throw Error("Unexpected hour cycle result")}function w(r){r=i(r??{},R);let{locale:t}=d();return(0,s.useMemo)(()=>new f(t,r),[t,r])}function R(r,t){if(r===t)return!0;let e=Object.keys(r),n=Object.keys(t);if(e.length!==n.length)return!1;for(let o of e)if(t[o]!==r[o])return!1;return!0}export{f as n,i as r,w as t};
1
+ import{s as c}from"./chunk-LvLJmgfZ.js";import{t as p}from"./react-Bj1aDYRI.js";import{t as d}from"./context-CRApIvpB.js";var s=c(p(),1);function i(r,t){let e=(0,s.useRef)(null);return r&&e.current&&t(r,e.current)&&(r=e.current),e.current=r,r}var u=new Map,f=class{format(r){return this.formatter.format(r)}formatToParts(r){return this.formatter.formatToParts(r)}formatRange(r,t){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(r,t);if(t<r)throw RangeError("End date must be >= start date");return`${this.formatter.format(r)} \u2013 ${this.formatter.format(t)}`}formatRangeToParts(r,t){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(r,t);if(t<r)throw RangeError("End date must be >= start date");let e=this.formatter.formatToParts(r),n=this.formatter.formatToParts(t);return[...e.map(o=>({...o,source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...n.map(o=>({...o,source:"endRange"}))]}resolvedOptions(){let r=this.formatter.resolvedOptions();return g()&&(this.resolvedHourCycle||(this.resolvedHourCycle=T(r.locale,this.options)),r.hourCycle=this.resolvedHourCycle,r.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),r.calendar==="ethiopic-amete-alem"&&(r.calendar="ethioaa"),r}constructor(r,t={}){this.formatter=l(r,t),this.options=t}},y={true:{ja:"h11"},false:{}};function l(r,t={}){if(typeof t.hour12=="boolean"&&v()){t={...t};let o=y[String(t.hour12)][r.split("-")[0]],a=t.hour12?"h12":"h23";t.hourCycle=o??a,delete t.hour12}let e=r+(t?Object.entries(t).sort((o,a)=>o[0]<a[0]?-1:1).join():"");if(u.has(e))return u.get(e);let n=new Intl.DateTimeFormat(r,t);return u.set(e,n),n}var h=null;function v(){return h??(h=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),h}var m=null;function g(){return m??(m=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),m}function T(r,t){if(!t.timeStyle&&!t.hour)return;r=r.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),r+=(r.includes("-u-")?"":"-u")+"-nu-latn";let e=l(r,{...t,timeZone:void 0}),n=parseInt(e.formatToParts(new Date(2020,2,3,0)).find(a=>a.type==="hour").value,10),o=parseInt(e.formatToParts(new Date(2020,2,3,23)).find(a=>a.type==="hour").value,10);if(n===0&&o===23)return"h23";if(n===24&&o===23)return"h24";if(n===0&&o===11)return"h11";if(n===12&&o===11)return"h12";throw Error("Unexpected hour cycle result")}function w(r){r=i(r??{},R);let{locale:t}=d();return(0,s.useMemo)(()=>new f(t,r),[t,r])}function R(r,t){if(r===t)return!0;let e=Object.keys(r),n=Object.keys(t);if(e.length!==n.length)return!1;for(let o of e)if(t[o]!==r[o])return!1;return!0}export{f as n,i as r,w as t};
@@ -1 +1 @@
1
- import{s as v}from"./chunk-LvLJmgfZ.js";import{i as m,n as u}from"./useEvent-WUlsM6MC.js";import{T as p,b as D,v as h}from"./cells-DVXjWBHI.js";import{t as C}from"./compiler-runtime-B3qBwwSJ.js";import{t as I}from"./useEventListener-CjXriKgk.js";import{t as x}from"./jsx-runtime-CP2fAiZX.js";import{t as _}from"./button-BmOH9agK.js";import{r as b}from"./requests-DZy_SQ_v.js";import{t as g}from"./use-toast-BtZldTi5.js";import{n as j}from"./renderShortcut-CMdaUbHS.js";var w=C(),d=v(x(),1);const f=e=>{let t=(0,w.c)(7),l;t[0]===e?l=t[1]:(l=a=>{var s;(a.ctrlKey||a.metaKey)&&a.key==="z"&&(a.preventDefault(),a.stopPropagation(),(s=e.onClick)==null||s.call(e,a))},t[0]=e,t[1]=l);let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r={capture:!0},t[2]=r):r=t[2],I(window,"keydown",l,r);let o=e.children??"Undo",i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=(0,d.jsx)(j,{className:"ml-2",shortcut:"cmd-z"}),t[3]=i):i=t[3];let n;return t[4]!==o||t[5]!==e?(n=(0,d.jsxs)(_,{"data-testid":"undo-button",size:"sm",variant:"outline",...e,children:[o," ",i]}),t[4]=o,t[5]=e,t[6]=n):n=t[6],n};var y=C();function z(){let e=(0,y.c)(4),{deleteCell:t,undoDeleteCell:l}=p(),{sendDeleteCell:r}=b(),o;return e[0]!==t||e[1]!==r||e[2]!==l?(o=i=>{var s;if(m.get(h))return;let{cellId:n}=i,a=(((s=m.get(D).cellData[n])==null?void 0:s.code)??"").trim()==="";if(t({cellId:n}),r({cellId:n}).catch(()=>{l()}),!a){let{dismiss:c}=g({title:"Cell deleted",description:"You can bring it back by clicking undo or through the command palette.",action:(0,d.jsx)(f,{"data-testid":"undo-delete-button",onClick:()=>{l(),k()}})}),k=c}},e[0]=t,e[1]=r,e[2]=l,e[3]=o):o=e[3],u(o)}function K(){let e=(0,y.c)(4),{deleteCell:t,undoDeleteCell:l}=p(),{sendDeleteCell:r}=b(),o;return e[0]!==t||e[1]!==r||e[2]!==l?(o=async i=>{if(m.get(h))return;let{cellIds:n}=i;for(let c of n)await r({cellId:c}).then(()=>{t({cellId:c})});let{dismiss:a}=g({title:"Cells deleted",action:(0,d.jsx)(f,{"data-testid":"undo-delete-button",onClick:()=>{for(let c of n)l();s()}})}),s=a},e[0]=t,e[1]=r,e[2]=l,e[3]=o):o=e[3],u(o)}export{K as n,f as r,z as t};
1
+ import{s as v}from"./chunk-LvLJmgfZ.js";import{i as m,n as u}from"./useEvent-WUlsM6MC.js";import{T as p,b as D,v as h}from"./cells-DD42bsu7.js";import{t as C}from"./compiler-runtime-B3qBwwSJ.js";import{t as I}from"./useEventListener-CjXriKgk.js";import{t as x}from"./jsx-runtime-CP2fAiZX.js";import{t as _}from"./button-BmOH9agK.js";import{r as b}from"./requests-DZy_SQ_v.js";import{t as g}from"./use-toast-Hc8CXlvz.js";import{n as j}from"./renderShortcut-_nl5_jRy.js";var w=C(),d=v(x(),1);const f=e=>{let t=(0,w.c)(7),l;t[0]===e?l=t[1]:(l=a=>{var s;(a.ctrlKey||a.metaKey)&&a.key==="z"&&(a.preventDefault(),a.stopPropagation(),(s=e.onClick)==null||s.call(e,a))},t[0]=e,t[1]=l);let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r={capture:!0},t[2]=r):r=t[2],I(window,"keydown",l,r);let o=e.children??"Undo",i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=(0,d.jsx)(j,{className:"ml-2",shortcut:"cmd-z"}),t[3]=i):i=t[3];let n;return t[4]!==o||t[5]!==e?(n=(0,d.jsxs)(_,{"data-testid":"undo-button",size:"sm",variant:"outline",...e,children:[o," ",i]}),t[4]=o,t[5]=e,t[6]=n):n=t[6],n};var y=C();function z(){let e=(0,y.c)(4),{deleteCell:t,undoDeleteCell:l}=p(),{sendDeleteCell:r}=b(),o;return e[0]!==t||e[1]!==r||e[2]!==l?(o=i=>{var s;if(m.get(h))return;let{cellId:n}=i,a=(((s=m.get(D).cellData[n])==null?void 0:s.code)??"").trim()==="";if(t({cellId:n}),r({cellId:n}).catch(()=>{l()}),!a){let{dismiss:c}=g({title:"Cell deleted",description:"You can bring it back by clicking undo or through the command palette.",action:(0,d.jsx)(f,{"data-testid":"undo-delete-button",onClick:()=>{l(),k()}})}),k=c}},e[0]=t,e[1]=r,e[2]=l,e[3]=o):o=e[3],u(o)}function K(){let e=(0,y.c)(4),{deleteCell:t,undoDeleteCell:l}=p(),{sendDeleteCell:r}=b(),o;return e[0]!==t||e[1]!==r||e[2]!==l?(o=async i=>{if(m.get(h))return;let{cellIds:n}=i;for(let c of n)await r({cellId:c}).then(()=>{t({cellId:c})});let{dismiss:a}=g({title:"Cells deleted",action:(0,d.jsx)(f,{"data-testid":"undo-delete-button",onClick:()=>{for(let c of n)l();s()}})}),s=a},e[0]=t,e[1]=r,e[2]=l,e[3]=o):o=e[3],u(o)}export{K as n,f as r,z as t};
@@ -1 +1 @@
1
- import{s as M}from"./chunk-LvLJmgfZ.js";import{d as X,l as Y,n as V,p as Z,u as $}from"./useEvent-WUlsM6MC.js";import{t as ee}from"./react-Bj1aDYRI.js";import{W as te,kt as re}from"./cells-DVXjWBHI.js";import{t as W}from"./compiler-runtime-B3qBwwSJ.js";import{t as le}from"./jsx-runtime-CP2fAiZX.js";import{t as ae}from"./cn-d_A4rA-x.js";import{t as ne}from"./createLucideIcon-BvP5LBIs.js";import{t as se}from"./useCellActionButton-DLoBXBqS.js";import{a as oe,n as ie,o as ce,t as me}from"./tooltip-D7xdZcKW.js";import{d as de}from"./alert-dialog-DNI_v2jv.js";import{i as B,r as he,t as G}from"./popover-2GpKY98n.js";import{a as pe,c as fe,i as ue,o as xe,r as je,t as be,u as ye}from"./command-COYC8fga.js";import{n as ve}from"./focus-C2gi0jxY.js";import{a as Ne,i as ge}from"./renderShortcut-CMdaUbHS.js";var ke=ne("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),J=W(),h=M(ee(),1),t=M(le(),1);const K=h.memo(h.forwardRef((r,a)=>{let e=(0,J.c)(39),{children:n,showTooltip:c,...m}=r,p=c===void 0?!0:c,[d,I]=(0,h.useState)(!1),N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=()=>I(!1),e[0]=N):N=e[0];let U=N,D=(0,h.useRef)(null),E=se({cell:m,closePopover:U}).map(Ce).filter(_e),P=de(),g;e[1]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{te(()=>{D.current&&D.current.scrollIntoView({behavior:"auto",block:"nearest"})})},e[1]=g):g=e[1];let T=V(g),k;e[2]===T?k=e[3]:(k=s=>{I(o=>{let l=typeof s=="function"?s(o):s;return l&&T(),l})},e[2]=T,e[3]=k);let i=V(k),w;e[4]===i?w=e[5]:(w=()=>({toggle:()=>i(Se)}),e[4]=i,e[5]=w),(0,h.useImperativeHandle)(a,w);let O=he,A=be,F=re(m.cellId),f;e[6]===F?f=e[7]:(f=(0,t.jsx)(pe,{placeholder:"Search actions...",className:"h-6 m-1",...F}),e[6]=F,e[7]=f);let H=ye,u;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsx)(je,{children:"No results"}),e[8]=u):u=e[8];let R=E.map((s,o)=>(0,t.jsxs)(h.Fragment,{children:[(0,t.jsx)(ue,{children:s.map(l=>{let z=(0,t.jsxs)("div",{className:"flex items-center flex-1",children:[l.icon&&(0,t.jsx)("div",{className:"mr-2 w-5 text-muted-foreground",children:l.icon}),(0,t.jsx)("div",{className:"flex-1",children:l.label}),(0,t.jsxs)("div",{className:"shrink-0 text-sm",children:[l.hotkey&&ge(l.hotkey),l.rightElement]})]});return l.tooltip&&(z=(0,t.jsx)(me,{content:l.tooltip,delayDuration:100,children:z})),(0,t.jsx)(xe,{className:ae(l.disabled&&"opacity-50!"),onSelect:()=>{l.disableClick||l.disabled||(l.handle(),I(!1))},variant:l.variant,children:z},l.label)})},o),o<E.length-1&&(0,t.jsx)(fe,{})]},o)),x;e[9]!==H||e[10]!==u||e[11]!==R?(x=(0,t.jsxs)(H,{children:[u,R]}),e[9]=H,e[10]=u,e[11]=R,e[12]=x):x=e[12];let j;e[13]!==A||e[14]!==x||e[15]!==f?(j=(0,t.jsxs)(A,{children:[f,x]}),e[13]=A,e[14]=x,e[15]=f,e[16]=j):j=e[16];let C;e[17]!==O||e[18]!==P||e[19]!==j?(C=(0,t.jsx)(O,{className:"w-[300px] p-0 pt-1 overflow-auto",scrollable:!0,...P,children:j}),e[17]=O,e[18]=P,e[19]=j,e[20]=C):C=e[20];let b=C;if(!p){let s;e[21]===n?s=e[22]:(s=(0,t.jsx)(B,{asChild:!0,children:n}),e[21]=n,e[22]=s);let o;return e[23]!==b||e[24]!==i||e[25]!==d||e[26]!==s?(o=(0,t.jsxs)(G,{open:d,onOpenChange:i,children:[s,b]}),e[23]=b,e[24]=i,e[25]=d,e[26]=s,e[27]=o):o=e[27],o}let _;e[28]===Symbol.for("react.memo_cache_sentinel")?(_=(0,t.jsx)(ie,{tabIndex:-1,children:Ne("cell.cellActions")}),e[28]=_):_=e[28];let q=!d&&_,y;e[29]===n?y=e[30]:(y=(0,t.jsx)(ce,{ref:D,children:(0,t.jsx)(B,{className:"flex",children:n})}),e[29]=n,e[30]=y);let v;e[31]!==q||e[32]!==y?(v=(0,t.jsxs)(oe,{delayDuration:200,disableHoverableContent:!0,children:[q,y]}),e[31]=q,e[32]=y,e[33]=v):v=e[33];let S;return e[34]!==b||e[35]!==i||e[36]!==d||e[37]!==v?(S=(0,t.jsxs)(G,{open:d,onOpenChange:i,children:[v,b]}),e[34]=b,e[35]=i,e[36]=d,e[37]=v,e[38]=S):S=e[38],S})),L=h.memo(r=>{let a=(0,J.c)(5),{children:e,cellId:n}=r,c;a[0]===n?c=a[1]:(c=ve(n),a[0]=n,a[1]=c);let m=$(c);if(!m)return null;let p;return a[2]!==e||a[3]!==m?(p=(0,t.jsx)(K,{showTooltip:!1,...m,children:e}),a[2]=e,a[3]=m,a[4]=p):p=a[4],p});L.displayName="ConnectionCellActionsDropdown";function we(r){return!r.redundant}function Ce(r){return r.filter(we)}function _e(r){return r.length>0}function Se(r){return!r}var Ie=W();const Q=Z("minimap");function De(){let r=(0,Ie.c)(3),[a,e]=Y(Q),n;return r[0]!==a||r[1]!==e?(n={dependencyPanelTab:a,setDependencyPanelTab:e},r[0]=a,r[1]=e,r[2]=n):n=r[2],n}function Pe(){return X(Q)}export{ke as a,L as i,Pe as n,K as r,De as t};
1
+ import{s as M}from"./chunk-LvLJmgfZ.js";import{d as X,l as Y,n as V,p as Z,u as $}from"./useEvent-WUlsM6MC.js";import{t as ee}from"./react-Bj1aDYRI.js";import{W as te,kt as re}from"./cells-DD42bsu7.js";import{t as W}from"./compiler-runtime-B3qBwwSJ.js";import{t as le}from"./jsx-runtime-CP2fAiZX.js";import{t as ae}from"./cn-d_A4rA-x.js";import{t as ne}from"./createLucideIcon-BvP5LBIs.js";import{t as se}from"./useCellActionButton-HNTLhSrv.js";import{a as oe,n as ie,o as ce,t as me}from"./tooltip-oM-h2ZN1.js";import{d as de}from"./alert-dialog-DEeW2awP.js";import{i as B,r as he,t as G}from"./popover-C7N9RyXk.js";import{a as pe,c as fe,i as ue,o as xe,r as je,t as be,u as ye}from"./command-2Li9iWG_.js";import{n as ve}from"./focus-DiPb_hn6.js";import{a as Ne,i as ge}from"./renderShortcut-_nl5_jRy.js";var ke=ne("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),J=W(),h=M(ee(),1),t=M(le(),1);const K=h.memo(h.forwardRef((r,a)=>{let e=(0,J.c)(39),{children:n,showTooltip:c,...m}=r,p=c===void 0?!0:c,[d,I]=(0,h.useState)(!1),N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=()=>I(!1),e[0]=N):N=e[0];let U=N,D=(0,h.useRef)(null),E=se({cell:m,closePopover:U}).map(Ce).filter(_e),P=de(),g;e[1]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{te(()=>{D.current&&D.current.scrollIntoView({behavior:"auto",block:"nearest"})})},e[1]=g):g=e[1];let T=V(g),k;e[2]===T?k=e[3]:(k=s=>{I(o=>{let l=typeof s=="function"?s(o):s;return l&&T(),l})},e[2]=T,e[3]=k);let i=V(k),w;e[4]===i?w=e[5]:(w=()=>({toggle:()=>i(Se)}),e[4]=i,e[5]=w),(0,h.useImperativeHandle)(a,w);let O=he,A=be,F=re(m.cellId),f;e[6]===F?f=e[7]:(f=(0,t.jsx)(pe,{placeholder:"Search actions...",className:"h-6 m-1",...F}),e[6]=F,e[7]=f);let H=ye,u;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsx)(je,{children:"No results"}),e[8]=u):u=e[8];let R=E.map((s,o)=>(0,t.jsxs)(h.Fragment,{children:[(0,t.jsx)(ue,{children:s.map(l=>{let z=(0,t.jsxs)("div",{className:"flex items-center flex-1",children:[l.icon&&(0,t.jsx)("div",{className:"mr-2 w-5 text-muted-foreground",children:l.icon}),(0,t.jsx)("div",{className:"flex-1",children:l.label}),(0,t.jsxs)("div",{className:"shrink-0 text-sm",children:[l.hotkey&&ge(l.hotkey),l.rightElement]})]});return l.tooltip&&(z=(0,t.jsx)(me,{content:l.tooltip,delayDuration:100,children:z})),(0,t.jsx)(xe,{className:ae(l.disabled&&"opacity-50!"),onSelect:()=>{l.disableClick||l.disabled||(l.handle(),I(!1))},variant:l.variant,children:z},l.label)})},o),o<E.length-1&&(0,t.jsx)(fe,{})]},o)),x;e[9]!==H||e[10]!==u||e[11]!==R?(x=(0,t.jsxs)(H,{children:[u,R]}),e[9]=H,e[10]=u,e[11]=R,e[12]=x):x=e[12];let j;e[13]!==A||e[14]!==x||e[15]!==f?(j=(0,t.jsxs)(A,{children:[f,x]}),e[13]=A,e[14]=x,e[15]=f,e[16]=j):j=e[16];let C;e[17]!==O||e[18]!==P||e[19]!==j?(C=(0,t.jsx)(O,{className:"w-[300px] p-0 pt-1 overflow-auto",scrollable:!0,...P,children:j}),e[17]=O,e[18]=P,e[19]=j,e[20]=C):C=e[20];let b=C;if(!p){let s;e[21]===n?s=e[22]:(s=(0,t.jsx)(B,{asChild:!0,children:n}),e[21]=n,e[22]=s);let o;return e[23]!==b||e[24]!==i||e[25]!==d||e[26]!==s?(o=(0,t.jsxs)(G,{open:d,onOpenChange:i,children:[s,b]}),e[23]=b,e[24]=i,e[25]=d,e[26]=s,e[27]=o):o=e[27],o}let _;e[28]===Symbol.for("react.memo_cache_sentinel")?(_=(0,t.jsx)(ie,{tabIndex:-1,children:Ne("cell.cellActions")}),e[28]=_):_=e[28];let q=!d&&_,y;e[29]===n?y=e[30]:(y=(0,t.jsx)(ce,{ref:D,children:(0,t.jsx)(B,{className:"flex",children:n})}),e[29]=n,e[30]=y);let v;e[31]!==q||e[32]!==y?(v=(0,t.jsxs)(oe,{delayDuration:200,disableHoverableContent:!0,children:[q,y]}),e[31]=q,e[32]=y,e[33]=v):v=e[33];let S;return e[34]!==b||e[35]!==i||e[36]!==d||e[37]!==v?(S=(0,t.jsxs)(G,{open:d,onOpenChange:i,children:[v,b]}),e[34]=b,e[35]=i,e[36]=d,e[37]=v,e[38]=S):S=e[38],S})),L=h.memo(r=>{let a=(0,J.c)(5),{children:e,cellId:n}=r,c;a[0]===n?c=a[1]:(c=ve(n),a[0]=n,a[1]=c);let m=$(c);if(!m)return null;let p;return a[2]!==e||a[3]!==m?(p=(0,t.jsx)(K,{showTooltip:!1,...m,children:e}),a[2]=e,a[3]=m,a[4]=p):p=a[4],p});L.displayName="ConnectionCellActionsDropdown";function we(r){return!r.redundant}function Ce(r){return r.filter(we)}function _e(r){return r.length>0}function Se(r){return!r}var Ie=W();const Q=Z("minimap");function De(){let r=(0,Ie.c)(3),[a,e]=Y(Q),n;return r[0]!==a||r[1]!==e?(n={dependencyPanelTab:a,setDependencyPanelTab:e},r[0]=a,r[1]=e,r[2]=n):n=r[2],n}function Pe(){return X(Q)}export{ke as a,L as i,Pe as n,K as r,De as t};
@@ -1 +1 @@
1
- import{s as l}from"./chunk-LvLJmgfZ.js";import{p as x}from"./useEvent-WUlsM6MC.js";import{t as k}from"./react-Bj1aDYRI.js";import{m as v}from"./useEventListener-CjXriKgk.js";import{t as f}from"./jsx-runtime-CP2fAiZX.js";import{r as j}from"./requests-DZy_SQ_v.js";import{t as n}from"./use-toast-BtZldTi5.js";import{t as o}from"./kbd-CNdD3jWa.js";const y=x(null),m="packages-install-input",p=()=>{requestAnimationFrame(()=>{let e=document.getElementById(m);e&&e.focus()})},P=e=>{e.openApplication("packages"),p()};var a=l(f(),1);const g=(e,t)=>{n(t?{title:"Failed to add package",description:t,variant:"danger"}:{title:"Package added",description:(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{children:["The package ",(0,a.jsx)(o,{className:"inline",children:e})," and its dependencies has been added to your environment."]}),(0,a.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:"Some Python packages may require a kernel restart to see changes."})]})})},N=(e,t)=>{n(t?{title:"Failed to upgrade package",description:t,variant:"danger"}:{title:"Package upgraded",description:(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{children:["The package ",(0,a.jsx)(o,{className:"inline",children:e})," has been upgraded."]}),(0,a.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:"Some Python packages may require a kernel restart to see changes."})]})})},q=(e,t)=>{n(t?{title:"Failed to remove package",description:t,variant:"danger"}:{title:"Package removed",description:(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{children:["The package ",(0,a.jsx)(o,{className:"inline",children:e})," has been removed from your environment."]}),(0,a.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:"Some Python packages may require a kernel restart to see changes."})]})})};var F=l(k(),1);function S(){let[e,t]=(0,F.useState)(!1),{addPackage:h}=j();return{loading:e,handleInstallPackages:async(d,r)=>{t(!0);try{for(let[s,i]of d.entries()){let c=await h({package:i});c.success?g(i):g(i,c.error),s<d.length-1&&await new Promise(u=>setTimeout(u,1e3))}r==null||r()}catch(s){v.error(s)}finally{t(!1)}}}}export{p as a,m as i,q as n,P as o,N as r,y as s,S as t};
1
+ import{s as l}from"./chunk-LvLJmgfZ.js";import{p as x}from"./useEvent-WUlsM6MC.js";import{t as k}from"./react-Bj1aDYRI.js";import{m as v}from"./useEventListener-CjXriKgk.js";import{t as f}from"./jsx-runtime-CP2fAiZX.js";import{r as j}from"./requests-DZy_SQ_v.js";import{t as n}from"./use-toast-Hc8CXlvz.js";import{t as o}from"./kbd-Rn7tWvNg.js";const y=x(null),m="packages-install-input",p=()=>{requestAnimationFrame(()=>{let e=document.getElementById(m);e&&e.focus()})},P=e=>{e.openApplication("packages"),p()};var a=l(f(),1);const g=(e,t)=>{n(t?{title:"Failed to add package",description:t,variant:"danger"}:{title:"Package added",description:(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{children:["The package ",(0,a.jsx)(o,{className:"inline",children:e})," and its dependencies has been added to your environment."]}),(0,a.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:"Some Python packages may require a kernel restart to see changes."})]})})},N=(e,t)=>{n(t?{title:"Failed to upgrade package",description:t,variant:"danger"}:{title:"Package upgraded",description:(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{children:["The package ",(0,a.jsx)(o,{className:"inline",children:e})," has been upgraded."]}),(0,a.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:"Some Python packages may require a kernel restart to see changes."})]})})},q=(e,t)=>{n(t?{title:"Failed to remove package",description:t,variant:"danger"}:{title:"Package removed",description:(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{children:["The package ",(0,a.jsx)(o,{className:"inline",children:e})," has been removed from your environment."]}),(0,a.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:"Some Python packages may require a kernel restart to see changes."})]})})};var F=l(k(),1);function S(){let[e,t]=(0,F.useState)(!1),{addPackage:h}=j();return{loading:e,handleInstallPackages:async(d,r)=>{t(!0);try{for(let[s,i]of d.entries()){let c=await h({package:i});c.success?g(i):g(i,c.error),s<d.length-1&&await new Promise(u=>setTimeout(u,1e3))}r==null||r()}catch(s){v.error(s)}finally{t(!1)}}}}export{p as a,m as i,q as n,P as o,N as r,y as s,S as t};