@marimo-team/frontend 0.23.14-dev16 → 0.23.14-dev19

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 (215) hide show
  1. package/dist/assets/{CellStatus-BT8TMjJf.js → CellStatus-B3d9WY2x.js} +1 -1
  2. package/dist/assets/{ConnectedDataExplorerComponent-CPK3MAGu.js → ConnectedDataExplorerComponent-DW5uWN70.js} +1 -1
  3. package/dist/assets/{JsonOutput-B3xvHnzm.js → JsonOutput-C3c9GGaV.js} +17 -17
  4. package/dist/assets/{LazyAnyLanguageCodeMirror-BsVlAJyX.js → LazyAnyLanguageCodeMirror-DpraoNlO.js} +2 -2
  5. package/dist/assets/{MarimoErrorOutput-DhPWAkt7.js → MarimoErrorOutput-D07aAGkQ.js} +4 -4
  6. package/dist/assets/{RenderHTML-CfDAJrQ1.js → RenderHTML-v15QgtRg.js} +1 -1
  7. package/dist/assets/{RunButton-BTIcs3L6.js → RunButton-Bz4eaTJM.js} +1 -1
  8. package/dist/assets/{add-cell-with-ai-BUw5F2ZZ.js → add-cell-with-ai-wau9Yzcj.js} +9 -9
  9. package/dist/assets/{add-connection-dialog-eFUDnHSy.js → add-connection-dialog-_KCPEn7U.js} +6 -6
  10. package/dist/assets/{agent-panel-BGCbua1N.js → agent-panel-Bn9AgwJH.js} +5 -5
  11. package/dist/assets/{ai-model-dropdown-Btglrejh.js → ai-model-dropdown-BeZrAec-.js} +3 -3
  12. package/dist/assets/{app-config-button-DeX5gOlx.js → app-config-button-BG9ONWMU.js} +1 -1
  13. package/dist/assets/{arc-CTRjCaaq.js → arc-DUSwcTI9.js} +1 -1
  14. package/dist/assets/{architecture-7HQA4BMR-DljvQDeQ.js → architecture-7HQA4BMR-BKC1aYPh.js} +1 -1
  15. package/dist/assets/{architectureDiagram-VXUJARFQ-BzaOHnYF.js → architectureDiagram-VXUJARFQ-9zNZOBwF.js} +1 -1
  16. package/dist/assets/{blockDiagram-VD42YOAC-BSpIbX3f.js → blockDiagram-VD42YOAC-CoeffysX.js} +1 -1
  17. package/dist/assets/{c4Diagram-YG6GDRKO-zpESnYoT.js → c4Diagram-YG6GDRKO-HRtHHrnC.js} +1 -1
  18. package/dist/assets/{cell-editor-_AISMwze.js → cell-editor-24ykqaHj.js} +10 -10
  19. package/dist/assets/cell-link-exzcyUhT.js +1 -0
  20. package/dist/assets/{cells-B7YKR2ed.js → cells-DENsmH9t.js} +48 -48
  21. package/dist/assets/channel-xkFudYwF.js +1 -0
  22. package/dist/assets/{chat-display-CyQVogf3.js → chat-display-CcL_dydg.js} +1 -1
  23. package/dist/assets/{chat-panel-Bs6edc8Z.js → chat-panel-CA-2-S1C.js} +2 -2
  24. package/dist/assets/{chat-ui-CZ_aWD6G.js → chat-ui-DQeA0_b5.js} +1 -1
  25. package/dist/assets/{chunk-4BX2VUAB-Dg4heQa6.js → chunk-4BX2VUAB-B9eTC_as.js} +1 -1
  26. package/dist/assets/chunk-55IACEB6-RaPtcg4Z.js +1 -0
  27. package/dist/assets/{chunk-5FQGJX7Z-DcW-_LxK.js → chunk-5FQGJX7Z-OScactr4.js} +2 -2
  28. package/dist/assets/{chunk-ABZYJK2D-B-yriO93.js → chunk-ABZYJK2D-BahEojQ2.js} +3 -3
  29. package/dist/assets/{chunk-ATLVNIR6-CATEdUsI.js → chunk-ATLVNIR6-x_ij98gB.js} +1 -1
  30. package/dist/assets/{chunk-B4BG7PRW-tMC-dXvv.js → chunk-B4BG7PRW-CNWrrwyq.js} +1 -1
  31. package/dist/assets/{chunk-CVBHYZKI-BX0N_ipT.js → chunk-CVBHYZKI-BmNXddyI.js} +1 -1
  32. package/dist/assets/{chunk-DI55MBZ5-RdSDpuir.js → chunk-DI55MBZ5-DLtrYKQl.js} +1 -1
  33. package/dist/assets/{chunk-EXTU4WIE-FS4Kb2Ql.js → chunk-EXTU4WIE-BosqMJS0.js} +1 -1
  34. package/dist/assets/{chunk-FMBD7UC4-DBAmwXnH.js → chunk-FMBD7UC4-CXkgki2e.js} +1 -1
  35. package/dist/assets/{chunk-HN2XXSSU-ujlBpRMF.js → chunk-HN2XXSSU-BstCPYtG.js} +1 -1
  36. package/dist/assets/{chunk-JA3XYJ7Z-BC4z3QJN.js → chunk-JA3XYJ7Z-BGpTu7cp.js} +1 -1
  37. package/dist/assets/{chunk-JZLCHNYA-BS06EXEs.js → chunk-JZLCHNYA-B5kB1fLQ.js} +1 -1
  38. package/dist/assets/{chunk-MI3HLSF2-D9JXkg6-.js → chunk-MI3HLSF2-BceZdyTR.js} +1 -1
  39. package/dist/assets/{chunk-N4CR4FBY-sFNBk2qj.js → chunk-N4CR4FBY-BBG_uFjb.js} +2 -2
  40. package/dist/assets/{chunk-QN33PNHL-CaxJ41FN.js → chunk-QN33PNHL-CVHu8q7d.js} +1 -1
  41. package/dist/assets/{chunk-QXUST7PY-BGAG3yNG.js → chunk-QXUST7PY-CFthKhW0.js} +1 -1
  42. package/dist/assets/{chunk-QZHKN3VN-DNJQmmTY.js → chunk-QZHKN3VN-B9NOrYv5.js} +1 -1
  43. package/dist/assets/{chunk-S3R3BYOJ-BPuj-dI4.js → chunk-S3R3BYOJ-C_f67nz1.js} +1 -1
  44. package/dist/assets/{chunk-TZMSLE5B-BWxINAhr.js → chunk-TZMSLE5B-HjU3PlWB.js} +1 -1
  45. package/dist/assets/classDiagram-2ON5EDUG-BijpneZJ.js +1 -0
  46. package/dist/assets/classDiagram-v2-WZHVMYZB-DcBY2KJt.js +1 -0
  47. package/dist/assets/{code-block-37QAKDTI-BCJE7Shx.js → code-block-37QAKDTI-DhYEpctq.js} +1 -1
  48. package/dist/assets/{column-preview-CRLyhWfr.js → column-preview-BPgYXdDd.js} +1 -1
  49. package/dist/assets/{command-palette-CURV9AtB.js → command-palette-WlkKgdrI.js} +1 -1
  50. package/dist/assets/{common-DDyT57dI.js → common-DdBQICbD.js} +1 -1
  51. package/dist/assets/components-DinLkTiR.js +1 -0
  52. package/dist/assets/{cose-bilkent-S5V4N54A-Cjkn-03D.js → cose-bilkent-S5V4N54A-BfoWxM7A.js} +1 -1
  53. package/dist/assets/{dagre-6UL2VRFP-CEUvYTNq.js → dagre-6UL2VRFP-D9JPUp6S.js} +1 -1
  54. package/dist/assets/{data-grid-overlay-editor-DcJUwxxA.js → data-grid-overlay-editor-D6dQiwlE.js} +1 -1
  55. package/dist/assets/{datasource-C-Uv-baE.js → datasource-BCOYpQ69.js} +2 -2
  56. package/dist/assets/{dependency-graph-panel-DOCY2alr.js → dependency-graph-panel-nYHPHFU4.js} +4 -4
  57. package/dist/assets/{diagram-PSM6KHXK-BRMqKZ3Y.js → diagram-PSM6KHXK-B0tUabrq.js} +1 -1
  58. package/dist/assets/{diagram-QEK2KX5R-D-44zwne.js → diagram-QEK2KX5R-Cw9uF9O2.js} +1 -1
  59. package/dist/assets/{diagram-S2PKOQOG-DK107xzi.js → diagram-S2PKOQOG-CQ2c8wZv.js} +1 -1
  60. package/dist/assets/{dist-BGm7LoFj.js → dist-C62CI8Os.js} +1 -1
  61. package/dist/assets/{documentation-panel-DtZhWfdL.js → documentation-panel-Dw9tYBNf.js} +1 -1
  62. package/dist/assets/{download-DiInTgPW.js → download-4NoBestd.js} +4 -4
  63. package/dist/assets/{edit-page-Cd-kRjle.js → edit-page-CAfBRrHn.js} +6 -6
  64. package/dist/assets/{erDiagram-Q2GNP2WA-Cs21rwzF.js → erDiagram-Q2GNP2WA-x4InYUc5.js} +1 -1
  65. package/dist/assets/{error-panel-DNOuz0b6.js → error-panel-Ddr_mbqR.js} +1 -1
  66. package/dist/assets/{file-explorer-panel-BDDhE9ga.js → file-explorer-panel-DhpN8_pR.js} +3 -3
  67. package/dist/assets/{file-icons-vH3s-ZLt.js → file-icons-BFLcd4J7.js} +1 -1
  68. package/dist/assets/{file-name-input-B6h96HOr.js → file-name-input-x53prQQ6.js} +1 -1
  69. package/dist/assets/{floating-outline-DHsNGe6F.js → floating-outline--OlHG_yX.js} +1 -1
  70. package/dist/assets/{flowDiagram-NV44I4VS-DenT4mQj.js → flowDiagram-NV44I4VS-D6dpsSFe.js} +1 -1
  71. package/dist/assets/{focus-M6_Axyyu.js → focus-CZUEQpxX.js} +1 -1
  72. package/dist/assets/{form-DLyKzVpg.js → form-CJ3pB1ow.js} +2 -2
  73. package/dist/assets/{ganttDiagram-JELNMOA3-DhLVgBRa.js → ganttDiagram-JELNMOA3-CiHe5iIm.js} +1 -1
  74. package/dist/assets/{gitGraph-G5XIXVHT-alvKgR_6.js → gitGraph-G5XIXVHT-DR6EWL-x.js} +1 -1
  75. package/dist/assets/{gitGraphDiagram-V2S2FVAM-CaLy1ghU.js → gitGraphDiagram-V2S2FVAM-DYyxaqXO.js} +1 -1
  76. package/dist/assets/{glide-data-editor-DieDRYCU.js → glide-data-editor-4W6CSDdU.js} +4 -4
  77. package/dist/assets/{home-page-Dd_LvpzP.js → home-page-pH8-XovY.js} +2 -2
  78. package/dist/assets/{hooks-Dcm9QPMI.js → hooks-BqjZMbeu.js} +1 -1
  79. package/dist/assets/{html-to-image-C_aIFrkD.js → html-to-image-B6eCuh-2.js} +2 -2
  80. package/dist/assets/index-CNmQbGXF.js +38 -0
  81. package/dist/assets/{info-VBDWY6EO-UTGHU79q.js → info-VBDWY6EO-CB7fium3.js} +1 -1
  82. package/dist/assets/{infoDiagram-HS3SLOUP-BNlTRowz.js → infoDiagram-HS3SLOUP-BvAjf34S.js} +1 -1
  83. package/dist/assets/{journeyDiagram-XKPGCS4Q-C6bWCP1E.js → journeyDiagram-XKPGCS4Q-DH75OGJw.js} +1 -1
  84. package/dist/assets/{kanban-definition-3W4ZIXB7-DhhNzrDn.js → kanban-definition-3W4ZIXB7-DHdmqfgQ.js} +1 -1
  85. package/dist/assets/katex-CByyX_jt.js +1 -0
  86. package/dist/assets/{kiosk-mode-DzVyPYQb.js → kiosk-mode-BBfHxqEx.js} +1 -1
  87. package/dist/assets/{layout-Cy69mJ4R.js → layout-DLJQyOOv.js} +5 -5
  88. package/dist/assets/{line-BtYBewh-.js → line-BKm-YkCh.js} +1 -1
  89. package/dist/assets/{linear-HSKpWh7o.js → linear-BD0d4-bn.js} +1 -1
  90. package/dist/assets/{logs-panel-WBLhqVkp.js → logs-panel-BBGNeMzu.js} +1 -1
  91. package/dist/assets/{markdown-renderer-C-Xg_eay.js → markdown-renderer-CcLl4-oB.js} +3 -3
  92. package/dist/assets/{mermaid-4DMBBIKO-DHhkolAx.js → mermaid-4DMBBIKO-Bc5nhxrT.js} +1 -1
  93. package/dist/assets/{mermaid-CTy-neNU.js → mermaid-BrXxldo6.js} +3 -3
  94. package/dist/assets/{mermaid-parser.core-D1juWnVV.js → mermaid-parser.core-Chxpj4sw.js} +2 -2
  95. package/dist/assets/{mhchem-DYFmc51f.js → mhchem-CkxmpjZ8.js} +1 -1
  96. package/dist/assets/{mindmap-definition-VGOIOE7T-DrvmAuTR.js → mindmap-definition-VGOIOE7T-DFjySly4.js} +1 -1
  97. package/dist/assets/{name-cell-input-DEi5F7_C.js → name-cell-input-CNq9BTL7.js} +1 -1
  98. package/dist/assets/{number-overlay-editor-BNjcKmLy.js → number-overlay-editor-sLAx_eGw.js} +1 -1
  99. package/dist/assets/{ordinal-DwWQqd-e.js → ordinal-BEKpVWu-.js} +1 -1
  100. package/dist/assets/{outline-panel-CJESf04f.js → outline-panel-CnGBTEs0.js} +1 -1
  101. package/dist/assets/{packages-panel-e9Ouyai7.js → packages-panel-B17awHIF.js} +1 -1
  102. package/dist/assets/{packet-DYOGHKS2-Bk4m0Yky.js → packet-DYOGHKS2-DfGBb0Dd.js} +1 -1
  103. package/dist/assets/{panels-D1nMzvUE.js → panels-P8wFgP-8.js} +1 -1
  104. package/dist/assets/{pie-VRWISCQL-BH6BYH7k.js → pie-VRWISCQL-BUcldHEm.js} +1 -1
  105. package/dist/assets/{pieDiagram-ADFJNKIX-DTXuGc2V.js → pieDiagram-ADFJNKIX-Cqy3gKwK.js} +1 -1
  106. package/dist/assets/{process-output-Ddc2OA4L.js → process-output-BGcDSQBk.js} +1 -1
  107. package/dist/assets/{quadrantDiagram-AYHSOK5B-CK0jUhwV.js → quadrantDiagram-AYHSOK5B-B3qlPKHh.js} +1 -1
  108. package/dist/assets/{radar-ZZBFDIW7-CfegKZj0.js → radar-ZZBFDIW7-DALEitfL.js} +1 -1
  109. package/dist/assets/{radio-group-CGYJUACh.js → radio-group-B8OldelF.js} +1 -1
  110. package/dist/assets/{react-vega-CpYoOIw9.js → react-vega-BVvkE5O4.js} +1 -1
  111. package/dist/assets/{react-vega-9vyn19ym.js → react-vega-DJIihc-q.js} +1 -1
  112. package/dist/assets/readonly-code-display-bvftv2Nk.js +1 -0
  113. package/dist/assets/readonly-python-code-CoFR55Yt.js +1 -0
  114. package/dist/assets/{requirementDiagram-UZGBJVZJ-DG38oyvw.js → requirementDiagram-UZGBJVZJ-C1PyB1kO.js} +1 -1
  115. package/dist/assets/{reveal-component-Bd93re9J.js → reveal-component-CfBFUsP0.js} +83 -83
  116. package/dist/assets/{run-page-CHEVBMSK.js → run-page-CFoRuGGY.js} +1 -1
  117. package/dist/assets/{sankeyDiagram-TZEHDZUN-Cd7_NFq5.js → sankeyDiagram-TZEHDZUN-CWokPFKQ.js} +1 -1
  118. package/dist/assets/{scratchpad-panel-Yk9GKgbH.js → scratchpad-panel-DdKvJKy4.js} +1 -1
  119. package/dist/assets/{sequenceDiagram-WL72ISMW-CWr987NA.js → sequenceDiagram-WL72ISMW-Bt2iqyTe.js} +1 -1
  120. package/dist/assets/session-panel-D5OQ5JSm.js +1 -0
  121. package/dist/assets/snippets-panel-DvfXacKM.js +1 -0
  122. package/dist/assets/{state-IsXJNpya.js → state-CQn0dE8X.js} +2 -2
  123. package/dist/assets/{state-RefguD27.js → state-LM4pQmYL.js} +1 -1
  124. package/dist/assets/{stateDiagram-FKZM4ZOC-BpTv_tx4.js → stateDiagram-FKZM4ZOC-Cu-QGXei.js} +1 -1
  125. package/dist/assets/stateDiagram-v2-4FDKWEC3-C_watzL2.js +1 -0
  126. package/dist/assets/{step-vPM7ouyU.js → step-B5y1YzZ4.js} +1 -1
  127. package/dist/assets/{textarea-BYXnNYSr.js → textarea-Tswrj-fB.js} +1 -1
  128. package/dist/assets/{time-C7q-M_gT.js → time-jEmAyVx0.js} +1 -1
  129. package/dist/assets/{timeline-definition-IT6M3QCI-Cp331KPt.js → timeline-definition-IT6M3QCI-DbqS7JT0.js} +1 -1
  130. package/dist/assets/{tracing-DRF9vr86.js → tracing-BMvzhCBv.js} +1 -1
  131. package/dist/assets/{tracing-panel-DSEex5R-.js → tracing-panel-DJF6cCQK.js} +2 -2
  132. package/dist/assets/{tree-actions-CRyQHv6h.js → tree-actions-Bnmh7YGo.js} +1 -1
  133. package/dist/assets/{treemap-GDKQZRPO-goW30S_N.js → treemap-GDKQZRPO-DD4LlMfm.js} +1 -1
  134. package/dist/assets/{useCellActionButton-BjcJ6BLJ.js → useCellActionButton-ibDHNca0.js} +1 -1
  135. package/dist/assets/{useDeleteCell-CXhTb-Wb.js → useDeleteCell-DwNTIWuB.js} +1 -1
  136. package/dist/assets/{useDependencyPanelTab-KYGByius.js → useDependencyPanelTab-BH_Eu2Kq.js} +1 -1
  137. package/dist/assets/{useNotebookActions-D1WisUZZ.js → useNotebookActions-BmO8IOgN.js} +1 -1
  138. package/dist/assets/useRunCells-CTpvxsqp.js +1 -0
  139. package/dist/assets/{useSplitCell-xGqWTYfJ.js → useSplitCell-CFO4Cg5B.js} +1 -1
  140. package/dist/assets/{vega-component-CSuDG35y.js → vega-component-CFO7fSts.js} +1 -1
  141. package/dist/assets/{xychartDiagram-PRI3JC2R-BOmaIn_W.js → xychartDiagram-PRI3JC2R-BbSJBns5.js} +1 -1
  142. package/dist/index.html +24 -24
  143. package/package.json +1 -1
  144. package/src/components/data-table/__tests__/column-explorer.test.tsx +25 -0
  145. package/src/components/data-table/__tests__/column-visibility-dropdown.test.tsx +60 -3
  146. package/src/components/data-table/column-explorer-panel/column-explorer.tsx +33 -12
  147. package/src/components/data-table/column-visibility-dropdown.tsx +15 -0
  148. package/src/components/editor/chrome/panels/snippets-panel.tsx +3 -3
  149. package/src/components/editor/code/readonly-python-code.tsx +16 -2
  150. package/src/components/editor/renderers/vertical-layout/__tests__/vertical-layout.test.ts +1 -27
  151. package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +2 -19
  152. package/src/components/slides/slide-cell-view.tsx +7 -6
  153. package/src/core/cells/__tests__/readonly-code-display.test.ts +46 -0
  154. package/src/core/cells/readonly-code-display.ts +35 -0
  155. package/dist/assets/cell-link-DO4acQD0.js +0 -1
  156. package/dist/assets/channel-Dc6EzpN1.js +0 -1
  157. package/dist/assets/chunk-55IACEB6-DwfSZW8J.js +0 -1
  158. package/dist/assets/classDiagram-2ON5EDUG-A9VH2ZvK.js +0 -1
  159. package/dist/assets/classDiagram-v2-WZHVMYZB-BbiRaNB_.js +0 -1
  160. package/dist/assets/components-CCxUdXt3.js +0 -1
  161. package/dist/assets/index-CB7HgmZd.js +0 -38
  162. package/dist/assets/katex-BGtenqy0.js +0 -1
  163. package/dist/assets/readonly-python-code--4cKIEDx.js +0 -1
  164. package/dist/assets/session-panel-BoVyS6Gh.js +0 -1
  165. package/dist/assets/snippets-panel-mvC03mlx.js +0 -1
  166. package/dist/assets/stateDiagram-v2-4FDKWEC3-DS3lRH0h.js +0 -1
  167. package/dist/assets/useRunCells-BQPsvZjd.js +0 -1
  168. package/src/components/editor/chrome/panels/__tests__/snippet-display.test.ts +0 -22
  169. package/src/components/editor/chrome/panels/snippet-display.ts +0 -27
  170. /package/dist/assets/{ImageComparisonComponent-DzDQ-fB3.js → ImageComparisonComponent-BHNx9yIG.js} +0 -0
  171. /package/dist/assets/{Plot-BIdakfet.js → Plot-BB9gg44K.js} +0 -0
  172. /package/dist/assets/{any-language-editor-DDxRKC6m.js → any-language-editor-DK1OP6YO.js} +0 -0
  173. /package/dist/assets/{array-9XpbrfQ5.js → array-CEZNxKGf.js} +0 -0
  174. /package/dist/assets/{asterisk-Dykb_Qas.js → asterisk-Bjb62jej.js} +0 -0
  175. /package/dist/assets/{chunk-4F5CHEZ2-DbI0qf2O.js → chunk-4F5CHEZ2-DMnTTluO.js} +0 -0
  176. /package/dist/assets/{chunk-B2363JML-CfyMMqBA.js → chunk-B2363JML-Dku8Kg6Q.js} +0 -0
  177. /package/dist/assets/{chunk-DR5Q36YT-DOSR70sR.js → chunk-DR5Q36YT-SM9ZwAOv.js} +0 -0
  178. /package/dist/assets/{chunk-FRFDVMJY-BtfMQArq.js → chunk-FRFDVMJY-W8ieZ4T6.js} +0 -0
  179. /package/dist/assets/{chunk-PL6DKKU2-B4f42Ygg.js → chunk-PL6DKKU2-B2NeQSoB.js} +0 -0
  180. /package/dist/assets/{chunk-SJTYNZTY-Bry6rjvq.js → chunk-SJTYNZTY-KfBChqO5.js} +0 -0
  181. /package/dist/assets/{chunk-TQ3KTPDO-DCNP-V-Z.js → chunk-TQ3KTPDO-BMxqKE6C.js} +0 -0
  182. /package/dist/assets/{chunk-UMXZTB3W-Df715oKn.js → chunk-UMXZTB3W-BUDrzDik.js} +0 -0
  183. /package/dist/assets/{click-outside-container-gHk0jCel.js → click-outside-container-CagwJLiG.js} +0 -0
  184. /package/dist/assets/{colors-D952IYju.js → colors-Dm6L93c7.js} +0 -0
  185. /package/dist/assets/{common-keywords-sop6vXJR.js → common-keywords-D_14jCw0.js} +0 -0
  186. /package/dist/assets/{cytoscape.esm-BncNfFt_.js → cytoscape.esm-DHwdGdKb.js} +0 -0
  187. /package/dist/assets/{dist-BjCIGEdQ.js → dist-COnmrAVZ.js} +0 -0
  188. /package/dist/assets/{dist-Cuy9Ob0Q.js → dist-CVIPALxj.js} +0 -0
  189. /package/dist/assets/{dist-CncFhr17.js → dist-DXfXSpct.js} +0 -0
  190. /package/dist/assets/{dockerfile-F2QaEmLo.js → dockerfile-BLAGVcyS.js} +0 -0
  191. /package/dist/assets/{duckdb-keywords-CEWQs1NJ.js → duckdb-keywords-CSySeB8R.js} +0 -0
  192. /package/dist/assets/{ebnf-BoS8ZFT2.js → ebnf-KJaLpQez.js} +0 -0
  193. /package/dist/assets/{esm-BLlysR8g.js → esm-D8Ai_4yn.js} +0 -0
  194. /package/dist/assets/{fcl-JwfU5Rr4.js → fcl-Cf241iHu.js} +0 -0
  195. /package/dist/assets/{gallery-page-Bn_fmsuf.js → gallery-page-fefqSCry.js} +0 -0
  196. /package/dist/assets/{http-BSf7msSy.js → http-_roNBajA.js} +0 -0
  197. /package/dist/assets/{init-DZ5TV86b.js → init-BpLL1fe9.js} +0 -0
  198. /package/dist/assets/{katex-CUvM6AOy.js → katex-C5COVNYq.js} +0 -0
  199. /package/dist/assets/{math-BkqINfbU.js → math-CpvW-dlE.js} +0 -0
  200. /package/dist/assets/{nginx-CNcs7tVC.js → nginx-Dfd7l9Sj.js} +0 -0
  201. /package/dist/assets/{node-sql-parser-BkK4FGDp.js → node-sql-parser-DfWMhh1q.js} +0 -0
  202. /package/dist/assets/{path-MXGY7b8Y.js → path-DtYs9Dst.js} +0 -0
  203. /package/dist/assets/{runs-BR6uJHTx.js → runs-ChtaccFx.js} +0 -0
  204. /package/dist/assets/{secrets-panel-COMUo7PI.js → secrets-panel-BKTGqClq.js} +0 -0
  205. /package/dist/assets/{solr-B928KjNx.js → solr-CJeCgAfj.js} +0 -0
  206. /package/dist/assets/{spreadsheet-CAG48M_e.js → spreadsheet-BYYvgLKe.js} +0 -0
  207. /package/dist/assets/{sql-nk70rjN1.js → sql-B5I6FC3m.js} +0 -0
  208. /package/dist/assets/{src-BRLtyMKi.js → src-CW27-Kjl.js} +0 -0
  209. /package/dist/assets/{swiper-component-1EtQU4BG.js → swiper-component-1Qq8v34u.js} +0 -0
  210. /package/dist/assets/{terminal-xHf6SFNC.js → terminal-C6zSX_Fp.js} +0 -0
  211. /package/dist/assets/{tiddlywiki-BiHxc-2_.js → tiddlywiki-hmNzZkq6.js} +0 -0
  212. /package/dist/assets/{tiki-Cwip62d7.js → tiki-BL1SzuSx.js} +0 -0
  213. /package/dist/assets/{treemap-BY_mNGmB.js → treemap-qinQgXo1.js} +0 -0
  214. /package/dist/assets/{types-BLEgJ92v.js → types-D4wsSrXa.js} +0 -0
  215. /package/dist/assets/{web-vitals-V-8mt_c9.js → web-vitals-B8i8c08M.js} +0 -0
@@ -1 +1 @@
1
- import{t as A}from"./dagre-BKdop7db.js";import{t as G}from"./graphlib-21XjDWoS.js";import"./purify.es-DfJp_of2.js";import{u as H}from"./src-CvyFXpBy.js";import{_ as O}from"./step-vPM7ouyU.js";import{t as P}from"./line-BtYBewh-.js";import{g as R}from"./chunk-S3R3BYOJ-BPuj-dI4.js";import{n as m,r as B}from"./src-BRLtyMKi.js";import{E as U,b as t,c as C,s as v}from"./chunk-ABZYJK2D-B-yriO93.js";import"./chunk-HN2XXSSU-ujlBpRMF.js";import"./chunk-CVBHYZKI-BX0N_ipT.js";import"./chunk-ATLVNIR6-CATEdUsI.js";import"./dist-BjCIGEdQ.js";import"./chunk-JA3XYJ7Z-BC4z3QJN.js";import"./chunk-JZLCHNYA-BS06EXEs.js";import"./chunk-QXUST7PY-BGAG3yNG.js";import"./chunk-N4CR4FBY-sFNBk2qj.js";import"./chunk-55IACEB6-DwfSZW8J.js";import"./chunk-QN33PNHL-CaxJ41FN.js";import{i as I,n as W,t as M}from"./chunk-DI55MBZ5-RdSDpuir.js";var F=m(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),J=m(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),_=m((e,i)=>{let o=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),s=o.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",s.width+2*t().state.padding).attr("height",s.height+2*t().state.padding).attr("rx",t().state.radius),o},"drawSimpleState"),j=m((e,i)=>{let o=m(function(g,f,S){let b=g.append("tspan").attr("x",2*t().state.padding).text(f);S||b.attr("dy",t().state.textHeight)},"addTspan"),s=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),d=s.height,x=e.append("text").attr("x",t().state.padding).attr("y",d+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description"),c=!0,a=!0;i.descriptions.forEach(function(g){c||(o(x,g,a),a=!1),c=!1});let n=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+d+t().state.dividerMargin/2).attr("y2",t().state.padding+d+t().state.dividerMargin/2).attr("class","descr-divider"),h=x.node().getBBox(),p=Math.max(h.width,s.width);return n.attr("x2",p+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",p+2*t().state.padding).attr("height",h.height+d+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),Y=m((e,i,o)=>{let s=t().state.padding,d=2*t().state.padding,x=e.node().getBBox(),c=x.width,a=x.x,n=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),h=n.node().getBBox().width+d,p=Math.max(h,c);p===c&&(p+=d);let g,f=e.node().getBBox();i.doc,g=a-s,h>c&&(g=(c-p)/2+s),Math.abs(a-f.x)<s&&h>c&&(g=a-(h-c)/2);let S=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",g).attr("y",S).attr("class",o?"alt-composit":"composit").attr("width",p).attr("height",f.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),n.attr("x",g+s),h<=c&&n.attr("x",a+(p-d)/2-h/2+s),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",p).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",p).attr("height",f.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),$=m(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),X=m((e,i)=>{let o=t().state.forkWidth,s=t().state.forkHeight;if(i.parentId){let d=o;o=s,s=d}return e.append("rect").style("stroke","black").style("fill","black").attr("width",o).attr("height",s).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),q=m((e,i,o,s)=>{let d=0,x=s.append("text");x.style("text-anchor","start"),x.attr("class","noteText");let c=e.replace(/\r\n/g,"<br/>");c=c.replace(/\n/g,"<br/>");let a=c.split(v.lineBreakRegex),n=1.25*t().state.noteMargin;for(let h of a){let p=h.trim();if(p.length>0){let g=x.append("tspan");if(g.text(p),n===0){let f=g.node().getBBox();n+=f.height}d+=n,g.attr("x",i+t().state.noteMargin),g.attr("y",o+d+1.25*t().state.noteMargin)}}return{textWidth:x.node().getBBox().width,textHeight:d}},"_drawLongText"),Z=m((e,i)=>{i.attr("class","state-note");let o=i.append("rect").attr("x",0).attr("y",t().state.padding),{textWidth:s,textHeight:d}=q(e,0,0,i.append("g"));return o.attr("height",d+2*t().state.noteMargin),o.attr("width",s+t().state.noteMargin*2),o},"drawNote"),T=m(function(e,i){let o=i.id,s={id:o,label:i.id,width:0,height:0},d=e.append("g").attr("id",o).attr("class","stateGroup");i.type==="start"&&F(d),i.type==="end"&&$(d),(i.type==="fork"||i.type==="join")&&X(d,i),i.type==="note"&&Z(i.note.text,d),i.type==="divider"&&J(d),i.type==="default"&&i.descriptions.length===0&&_(d,i),i.type==="default"&&i.descriptions.length>0&&j(d,i);let x=d.node().getBBox();return s.width=x.width+2*t().state.padding,s.height=x.height+2*t().state.padding,s},"drawState"),D=0,K=m(function(e,i,o){let s=m(function(n){switch(n){case M.relationType.AGGREGATION:return"aggregation";case M.relationType.EXTENSION:return"extension";case M.relationType.COMPOSITION:return"composition";case M.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(n=>!Number.isNaN(n.y));let d=i.points,x=P().x(function(n){return n.x}).y(function(n){return n.y}).curve(O),c=e.append("path").attr("d",x(d)).attr("id","edge"+D).attr("class","transition"),a="";if(t().state.arrowMarkerAbsolute&&(a=U(!0)),c.attr("marker-end","url("+a+"#"+s(M.relationType.DEPENDENCY)+"End)"),o.title!==void 0){let n=e.append("g").attr("class","stateLabel"),{x:h,y:p}=R.calcLabelPosition(i.points),g=v.getRows(o.title),f=0,S=[],b=0,N=0;for(let u=0;u<=g.length;u++){let l=n.append("text").attr("text-anchor","middle").text(g[u]).attr("x",h).attr("y",p+f),y=l.node().getBBox();b=Math.max(b,y.width),N=Math.min(N,y.x),B.info(y.x,h,p+f),f===0&&(f=l.node().getBBox().height,B.info("Title height",f,p)),S.push(l)}let k=f*g.length;if(g.length>1){let u=(g.length-1)*f*.5;S.forEach((l,y)=>l.attr("y",p+y*f-u)),k=f*g.length}let r=n.node().getBBox();n.insert("rect",":first-child").attr("class","box").attr("x",h-b/2-t().state.padding/2).attr("y",p-k/2-t().state.padding/2-3.5).attr("width",b+t().state.padding).attr("height",k+t().state.padding),B.info(r)}D++},"drawEdge"),w,z={},Q=m(function(){},"setConf"),V=m(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),tt=m(function(e,i,o,s){w=t().state;let d=t().securityLevel,x;d==="sandbox"&&(x=H("#i"+i));let c=H(d==="sandbox"?x.nodes()[0].contentDocument.body:"body"),a=d==="sandbox"?x.nodes()[0].contentDocument:document;B.debug("Rendering diagram "+e);let n=c.select(`[id='${i}']`);V(n),L(s.db.getRootDoc(),n,void 0,!1,c,a,s);let h=w.padding,p=n.node().getBBox(),g=p.width+h*2,f=p.height+h*2;C(n,f,g*1.75,w.useMaxWidth),n.attr("viewBox",`${p.x-w.padding} ${p.y-w.padding} `+g+" "+f)},"draw"),et=m(e=>e?e.length*w.fontSizeFactor:1,"getLabelWidth"),L=m((e,i,o,s,d,x,c)=>{let a=new G({compound:!0,multigraph:!0}),n,h=!0;for(n=0;n<e.length;n++)if(e[n].stmt==="relation"){h=!1;break}o?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:h?1:w.edgeLengthFactor,nodeSep:h?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:h?1:w.edgeLengthFactor,nodeSep:h?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});let p=c.db.getStates(),g=c.db.getRelations(),f=Object.keys(p);for(let r of f){let u=p[r];o&&(u.parentId=o);let l;if(u.doc){let y=i.append("g").attr("id",u.id).attr("class","stateGroup");l=L(u.doc,y,u.id,!s,d,x,c);{y=Y(y,u,s);let E=y.node().getBBox();l.width=E.width,l.height=E.height+w.padding/2,z[u.id]={y:w.compositTitleSize}}}else l=T(i,u,a);if(u.note){let y=T(i,{descriptions:[],id:u.id+"-note",note:u.note,type:"note"},a);u.note.position==="left of"?(a.setNode(l.id+"-note",y),a.setNode(l.id,l)):(a.setNode(l.id,l),a.setNode(l.id+"-note",y)),a.setParent(l.id,l.id+"-group"),a.setParent(l.id+"-note",l.id+"-group")}else a.setNode(l.id,l)}B.debug("Count=",a.nodeCount(),a);let S=0;g.forEach(function(r){S++,B.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:et(r.title),height:w.labelHeight*v.getRows(r.title).length,labelpos:"c"},"id"+S)}),A(a),B.debug("Graph after layout",a.nodes());let b=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(B.warn("Node "+r+": "+JSON.stringify(a.node(r))),d.select("#"+b.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(z[r]?z[r].y:0)-a.node(r).height/2)+" )"),d.select("#"+b.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),x.querySelectorAll("#"+b.id+" #"+r+" .divider").forEach(u=>{let l=u.parentElement,y=0,E=0;l&&(l.parentElement&&(y=l.parentElement.getBBox().width),E=parseInt(l.getAttribute("data-x-shift"),10),Number.isNaN(E)&&(E=0)),u.setAttribute("x1",0-E+8),u.setAttribute("x2",y-E-8)})):B.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let N=b.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(B.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),K(i,a.edge(r),a.edge(r).relation))}),N=b.getBBox();let k={id:o||"root",label:o||"root",width:0,height:0};return k.width=N.width+2*w.padding,k.height=N.height+2*w.padding,B.debug("Doc rendered",k,a),k},"renderDoc"),at={parser:W,get db(){return new M(1)},renderer:{setConf:Q,draw:tt},styles:I,init:m(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{at as diagram};
1
+ import{t as A}from"./dagre-BKdop7db.js";import{t as G}from"./graphlib-21XjDWoS.js";import"./purify.es-DfJp_of2.js";import{u as H}from"./src-CvyFXpBy.js";import{_ as O}from"./step-B5y1YzZ4.js";import{t as P}from"./line-BKm-YkCh.js";import{g as R}from"./chunk-S3R3BYOJ-C_f67nz1.js";import{n as m,r as B}from"./src-CW27-Kjl.js";import{E as U,b as t,c as C,s as v}from"./chunk-ABZYJK2D-BahEojQ2.js";import"./chunk-HN2XXSSU-BstCPYtG.js";import"./chunk-CVBHYZKI-BmNXddyI.js";import"./chunk-ATLVNIR6-x_ij98gB.js";import"./dist-COnmrAVZ.js";import"./chunk-JA3XYJ7Z-BGpTu7cp.js";import"./chunk-JZLCHNYA-B5kB1fLQ.js";import"./chunk-QXUST7PY-CFthKhW0.js";import"./chunk-N4CR4FBY-BBG_uFjb.js";import"./chunk-55IACEB6-RaPtcg4Z.js";import"./chunk-QN33PNHL-CVHu8q7d.js";import{i as I,n as W,t as M}from"./chunk-DI55MBZ5-DLtrYKQl.js";var F=m(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),J=m(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),_=m((e,i)=>{let o=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),s=o.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",s.width+2*t().state.padding).attr("height",s.height+2*t().state.padding).attr("rx",t().state.radius),o},"drawSimpleState"),j=m((e,i)=>{let o=m(function(g,f,S){let b=g.append("tspan").attr("x",2*t().state.padding).text(f);S||b.attr("dy",t().state.textHeight)},"addTspan"),s=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),d=s.height,x=e.append("text").attr("x",t().state.padding).attr("y",d+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description"),c=!0,a=!0;i.descriptions.forEach(function(g){c||(o(x,g,a),a=!1),c=!1});let n=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+d+t().state.dividerMargin/2).attr("y2",t().state.padding+d+t().state.dividerMargin/2).attr("class","descr-divider"),h=x.node().getBBox(),p=Math.max(h.width,s.width);return n.attr("x2",p+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",p+2*t().state.padding).attr("height",h.height+d+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),Y=m((e,i,o)=>{let s=t().state.padding,d=2*t().state.padding,x=e.node().getBBox(),c=x.width,a=x.x,n=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),h=n.node().getBBox().width+d,p=Math.max(h,c);p===c&&(p+=d);let g,f=e.node().getBBox();i.doc,g=a-s,h>c&&(g=(c-p)/2+s),Math.abs(a-f.x)<s&&h>c&&(g=a-(h-c)/2);let S=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",g).attr("y",S).attr("class",o?"alt-composit":"composit").attr("width",p).attr("height",f.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),n.attr("x",g+s),h<=c&&n.attr("x",a+(p-d)/2-h/2+s),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",p).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",p).attr("height",f.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),$=m(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),X=m((e,i)=>{let o=t().state.forkWidth,s=t().state.forkHeight;if(i.parentId){let d=o;o=s,s=d}return e.append("rect").style("stroke","black").style("fill","black").attr("width",o).attr("height",s).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),q=m((e,i,o,s)=>{let d=0,x=s.append("text");x.style("text-anchor","start"),x.attr("class","noteText");let c=e.replace(/\r\n/g,"<br/>");c=c.replace(/\n/g,"<br/>");let a=c.split(v.lineBreakRegex),n=1.25*t().state.noteMargin;for(let h of a){let p=h.trim();if(p.length>0){let g=x.append("tspan");if(g.text(p),n===0){let f=g.node().getBBox();n+=f.height}d+=n,g.attr("x",i+t().state.noteMargin),g.attr("y",o+d+1.25*t().state.noteMargin)}}return{textWidth:x.node().getBBox().width,textHeight:d}},"_drawLongText"),Z=m((e,i)=>{i.attr("class","state-note");let o=i.append("rect").attr("x",0).attr("y",t().state.padding),{textWidth:s,textHeight:d}=q(e,0,0,i.append("g"));return o.attr("height",d+2*t().state.noteMargin),o.attr("width",s+t().state.noteMargin*2),o},"drawNote"),T=m(function(e,i){let o=i.id,s={id:o,label:i.id,width:0,height:0},d=e.append("g").attr("id",o).attr("class","stateGroup");i.type==="start"&&F(d),i.type==="end"&&$(d),(i.type==="fork"||i.type==="join")&&X(d,i),i.type==="note"&&Z(i.note.text,d),i.type==="divider"&&J(d),i.type==="default"&&i.descriptions.length===0&&_(d,i),i.type==="default"&&i.descriptions.length>0&&j(d,i);let x=d.node().getBBox();return s.width=x.width+2*t().state.padding,s.height=x.height+2*t().state.padding,s},"drawState"),D=0,K=m(function(e,i,o){let s=m(function(n){switch(n){case M.relationType.AGGREGATION:return"aggregation";case M.relationType.EXTENSION:return"extension";case M.relationType.COMPOSITION:return"composition";case M.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(n=>!Number.isNaN(n.y));let d=i.points,x=P().x(function(n){return n.x}).y(function(n){return n.y}).curve(O),c=e.append("path").attr("d",x(d)).attr("id","edge"+D).attr("class","transition"),a="";if(t().state.arrowMarkerAbsolute&&(a=U(!0)),c.attr("marker-end","url("+a+"#"+s(M.relationType.DEPENDENCY)+"End)"),o.title!==void 0){let n=e.append("g").attr("class","stateLabel"),{x:h,y:p}=R.calcLabelPosition(i.points),g=v.getRows(o.title),f=0,S=[],b=0,N=0;for(let u=0;u<=g.length;u++){let l=n.append("text").attr("text-anchor","middle").text(g[u]).attr("x",h).attr("y",p+f),y=l.node().getBBox();b=Math.max(b,y.width),N=Math.min(N,y.x),B.info(y.x,h,p+f),f===0&&(f=l.node().getBBox().height,B.info("Title height",f,p)),S.push(l)}let k=f*g.length;if(g.length>1){let u=(g.length-1)*f*.5;S.forEach((l,y)=>l.attr("y",p+y*f-u)),k=f*g.length}let r=n.node().getBBox();n.insert("rect",":first-child").attr("class","box").attr("x",h-b/2-t().state.padding/2).attr("y",p-k/2-t().state.padding/2-3.5).attr("width",b+t().state.padding).attr("height",k+t().state.padding),B.info(r)}D++},"drawEdge"),w,z={},Q=m(function(){},"setConf"),V=m(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),tt=m(function(e,i,o,s){w=t().state;let d=t().securityLevel,x;d==="sandbox"&&(x=H("#i"+i));let c=H(d==="sandbox"?x.nodes()[0].contentDocument.body:"body"),a=d==="sandbox"?x.nodes()[0].contentDocument:document;B.debug("Rendering diagram "+e);let n=c.select(`[id='${i}']`);V(n),L(s.db.getRootDoc(),n,void 0,!1,c,a,s);let h=w.padding,p=n.node().getBBox(),g=p.width+h*2,f=p.height+h*2;C(n,f,g*1.75,w.useMaxWidth),n.attr("viewBox",`${p.x-w.padding} ${p.y-w.padding} `+g+" "+f)},"draw"),et=m(e=>e?e.length*w.fontSizeFactor:1,"getLabelWidth"),L=m((e,i,o,s,d,x,c)=>{let a=new G({compound:!0,multigraph:!0}),n,h=!0;for(n=0;n<e.length;n++)if(e[n].stmt==="relation"){h=!1;break}o?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:h?1:w.edgeLengthFactor,nodeSep:h?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:h?1:w.edgeLengthFactor,nodeSep:h?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});let p=c.db.getStates(),g=c.db.getRelations(),f=Object.keys(p);for(let r of f){let u=p[r];o&&(u.parentId=o);let l;if(u.doc){let y=i.append("g").attr("id",u.id).attr("class","stateGroup");l=L(u.doc,y,u.id,!s,d,x,c);{y=Y(y,u,s);let E=y.node().getBBox();l.width=E.width,l.height=E.height+w.padding/2,z[u.id]={y:w.compositTitleSize}}}else l=T(i,u,a);if(u.note){let y=T(i,{descriptions:[],id:u.id+"-note",note:u.note,type:"note"},a);u.note.position==="left of"?(a.setNode(l.id+"-note",y),a.setNode(l.id,l)):(a.setNode(l.id,l),a.setNode(l.id+"-note",y)),a.setParent(l.id,l.id+"-group"),a.setParent(l.id+"-note",l.id+"-group")}else a.setNode(l.id,l)}B.debug("Count=",a.nodeCount(),a);let S=0;g.forEach(function(r){S++,B.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:et(r.title),height:w.labelHeight*v.getRows(r.title).length,labelpos:"c"},"id"+S)}),A(a),B.debug("Graph after layout",a.nodes());let b=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(B.warn("Node "+r+": "+JSON.stringify(a.node(r))),d.select("#"+b.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(z[r]?z[r].y:0)-a.node(r).height/2)+" )"),d.select("#"+b.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),x.querySelectorAll("#"+b.id+" #"+r+" .divider").forEach(u=>{let l=u.parentElement,y=0,E=0;l&&(l.parentElement&&(y=l.parentElement.getBBox().width),E=parseInt(l.getAttribute("data-x-shift"),10),Number.isNaN(E)&&(E=0)),u.setAttribute("x1",0-E+8),u.setAttribute("x2",y-E-8)})):B.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let N=b.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(B.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),K(i,a.edge(r),a.edge(r).relation))}),N=b.getBBox();let k={id:o||"root",label:o||"root",width:0,height:0};return k.width=N.width+2*w.padding,k.height=N.height+2*w.padding,B.debug("Doc rendered",k,a),k},"renderDoc"),at={parser:W,get db(){return new M(1)},renderer:{setConf:Q,draw:tt},styles:I,init:m(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{at as diagram};
@@ -0,0 +1 @@
1
+ import"./purify.es-DfJp_of2.js";import"./src-CvyFXpBy.js";import"./chunk-S3R3BYOJ-C_f67nz1.js";import{n as t}from"./src-CW27-Kjl.js";import"./chunk-ABZYJK2D-BahEojQ2.js";import"./chunk-HN2XXSSU-BstCPYtG.js";import"./chunk-CVBHYZKI-BmNXddyI.js";import"./chunk-ATLVNIR6-x_ij98gB.js";import"./dist-COnmrAVZ.js";import"./chunk-JA3XYJ7Z-BGpTu7cp.js";import"./chunk-JZLCHNYA-B5kB1fLQ.js";import"./chunk-QXUST7PY-CFthKhW0.js";import"./chunk-N4CR4FBY-BBG_uFjb.js";import"./chunk-55IACEB6-RaPtcg4Z.js";import"./chunk-QN33PNHL-CVHu8q7d.js";import{i,n as o,r as m,t as p}from"./chunk-DI55MBZ5-DLtrYKQl.js";var a={parser:o,get db(){return new p(2)},renderer:m,styles:i,init:t(r=>{r.state||(r.state={}),r.state.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{a as diagram};
@@ -1 +1 @@
1
- import"./math-BkqINfbU.js";function d(t){this._context=t}d.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._context.lineTo(t,i);break}}};function D(t){return new d(t)}function e(){}function r(t,i,s){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+s)/6)}function l(t){this._context=t}l.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:r(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:r(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function F(t){return new l(t)}function w(t){this._context=t}w.prototype={areaStart:e,areaEnd:e,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:r(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function H(t){return new w(t)}function E(t){this._context=t}E.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var s=(this._x0+4*this._x1+t)/6,_=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(s,_):this._context.moveTo(s,_);break;case 3:this._point=4;default:r(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function I(t){return new E(t)}function S(t,i){this._basis=new l(t),this._beta=i}S.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,i=this._y,s=t.length-1;if(s>0)for(var _=t[0],h=i[0],n=t[s]-_,o=i[s]-h,a=-1,c;++a<=s;)c=a/s,this._basis.point(this._beta*t[a]+(1-this._beta)*(_+c*n),this._beta*i[a]+(1-this._beta)*(h+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,i){this._x.push(+t),this._y.push(+i)}};var L=(function t(i){function s(_){return i===1?new l(_):new S(_,i)}return s.beta=function(_){return t(+_)},s})(.85);function x(t,i,s){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-i),t._y2+t._k*(t._y1-s),t._x2,t._y2)}function p(t,i){this._context=t,this._k=(1-i)/6}p.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:x(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;default:x(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var R=(function t(i){function s(_){return new p(_,i)}return s.tension=function(_){return t(+_)},s})(0);function f(t,i){this._context=t,this._k=(1-i)/6}f.prototype={areaStart:e,areaEnd:e,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:x(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var U=(function t(i){function s(_){return new f(_,i)}return s.tension=function(_){return t(+_)},s})(0);function b(t,i){this._context=t,this._k=(1-i)/6}b.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:x(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var V=(function t(i){function s(_){return new b(_,i)}return s.tension=function(_){return t(+_)},s})(0);function k(t,i,s){var _=t._x1,h=t._y1,n=t._x2,o=t._y2;if(t._l01_a>1e-12){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);_=(_*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,h=(h*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>1e-12){var v=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,N=3*t._l23_a*(t._l23_a+t._l12_a);n=(n*v+t._x1*t._l23_2a-i*t._l12_2a)/N,o=(o*v+t._y1*t._l23_2a-s*t._l12_2a)/N}t._context.bezierCurveTo(_,h,n,o,t._x2,t._y2)}function m(t,i){this._context=t,this._alpha=i}m.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var s=this._x2-t,_=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=(s*s+_*_)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;default:k(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var W=(function t(i){function s(_){return i?new m(_,i):new p(_,0)}return s.alpha=function(_){return t(+_)},s})(.5);function P(t,i){this._context=t,this._alpha=i}P.prototype={areaStart:e,areaEnd:e,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(t,i){if(t=+t,i=+i,this._point){var s=this._x2-t,_=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=(s*s+_*_)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:k(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var G=(function t(i){function s(_){return i?new P(_,i):new f(_,0)}return s.alpha=function(_){return t(+_)},s})(.5);function z(t,i){this._context=t,this._alpha=i}z.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var s=this._x2-t,_=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=(s*s+_*_)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:k(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var J=(function t(i){function s(_){return i?new z(_,i):new b(_,0)}return s.alpha=function(_){return t(+_)},s})(.5);function C(t){this._context=t}C.prototype={areaStart:e,areaEnd:e,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,i){t=+t,i=+i,this._point?this._context.lineTo(t,i):(this._point=1,this._context.moveTo(t,i))}};function K(t){return new C(t)}function M(t){return t<0?-1:1}function g(t,i,s){var _=t._x1-t._x0,h=i-t._x1,n=(t._y1-t._y0)/(_||h<0&&-0),o=(s-t._y1)/(h||_<0&&-0),a=(n*h+o*_)/(_+h);return(M(n)+M(o))*Math.min(Math.abs(n),Math.abs(o),.5*Math.abs(a))||0}function A(t,i){var s=t._x1-t._x0;return s?(3*(t._y1-t._y0)/s-i)/2:i}function T(t,i,s){var _=t._x0,h=t._y0,n=t._x1,o=t._y1,a=(n-_)/3;t._context.bezierCurveTo(_+a,h+a*i,n-a,o-a*s,n,o)}function u(t){this._context=t}u.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:T(this,this._t0,A(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){var s=NaN;if(t=+t,i=+i,!(t===this._x1&&i===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,T(this,A(this,s=g(this,t,i)),s);break;default:T(this,this._t0,s=g(this,t,i));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=s}}};function q(t){this._context=new j(t)}(q.prototype=Object.create(u.prototype)).point=function(t,i){u.prototype.point.call(this,i,t)};function j(t){this._context=t}j.prototype={moveTo:function(t,i){this._context.moveTo(i,t)},closePath:function(){this._context.closePath()},lineTo:function(t,i){this._context.lineTo(i,t)},bezierCurveTo:function(t,i,s,_,h,n){this._context.bezierCurveTo(i,t,_,s,n,h)}};function Q(t){return new u(t)}function X(t){return new q(t)}function O(t){this._context=t}O.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,i=this._y,s=t.length;if(s)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),s===2)this._context.lineTo(t[1],i[1]);else for(var _=B(t),h=B(i),n=0,o=1;o<s;++n,++o)this._context.bezierCurveTo(_[0][n],h[0][n],_[1][n],h[1][n],t[o],i[o]);(this._line||this._line!==0&&s===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,i){this._x.push(+t),this._y.push(+i)}};function B(t){var i,s=t.length-1,_,h=Array(s),n=Array(s),o=Array(s);for(h[0]=0,n[0]=2,o[0]=t[0]+2*t[1],i=1;i<s-1;++i)h[i]=1,n[i]=4,o[i]=4*t[i]+2*t[i+1];for(h[s-1]=2,n[s-1]=7,o[s-1]=8*t[s-1]+t[s],i=1;i<s;++i)_=h[i]/n[i-1],n[i]-=_,o[i]-=_*o[i-1];for(h[s-1]=o[s-1]/n[s-1],i=s-2;i>=0;--i)h[i]=(o[i]-h[i+1])/n[i];for(n[s-1]=(t[s]+h[s-1])/2,i=0;i<s-1;++i)n[i]=2*t[i+1]-h[i+1];return[h,n]}function Y(t){return new O(t)}function y(t,i){this._context=t,this._t=i}y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var s=this._x*(1-this._t)+t*this._t;this._context.lineTo(s,this._y),this._context.lineTo(s,i)}break}this._x=t,this._y=i}};function Z(t){return new y(t,.5)}function $(t){return new y(t,0)}function tt(t){return new y(t,1)}export{F as _,Q as a,J as c,V as d,U as f,H as g,I as h,Y as i,G as l,L as m,$ as n,X as o,R as p,Z as r,K as s,tt as t,W as u,D as v};
1
+ import"./math-CpvW-dlE.js";function d(t){this._context=t}d.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._context.lineTo(t,i);break}}};function D(t){return new d(t)}function e(){}function r(t,i,s){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+s)/6)}function l(t){this._context=t}l.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:r(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:r(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function F(t){return new l(t)}function w(t){this._context=t}w.prototype={areaStart:e,areaEnd:e,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:r(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function H(t){return new w(t)}function E(t){this._context=t}E.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var s=(this._x0+4*this._x1+t)/6,_=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(s,_):this._context.moveTo(s,_);break;case 3:this._point=4;default:r(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function I(t){return new E(t)}function S(t,i){this._basis=new l(t),this._beta=i}S.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,i=this._y,s=t.length-1;if(s>0)for(var _=t[0],h=i[0],n=t[s]-_,o=i[s]-h,a=-1,c;++a<=s;)c=a/s,this._basis.point(this._beta*t[a]+(1-this._beta)*(_+c*n),this._beta*i[a]+(1-this._beta)*(h+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,i){this._x.push(+t),this._y.push(+i)}};var L=(function t(i){function s(_){return i===1?new l(_):new S(_,i)}return s.beta=function(_){return t(+_)},s})(.85);function x(t,i,s){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-i),t._y2+t._k*(t._y1-s),t._x2,t._y2)}function p(t,i){this._context=t,this._k=(1-i)/6}p.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:x(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;default:x(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var R=(function t(i){function s(_){return new p(_,i)}return s.tension=function(_){return t(+_)},s})(0);function f(t,i){this._context=t,this._k=(1-i)/6}f.prototype={areaStart:e,areaEnd:e,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:x(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var U=(function t(i){function s(_){return new f(_,i)}return s.tension=function(_){return t(+_)},s})(0);function b(t,i){this._context=t,this._k=(1-i)/6}b.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:x(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var V=(function t(i){function s(_){return new b(_,i)}return s.tension=function(_){return t(+_)},s})(0);function k(t,i,s){var _=t._x1,h=t._y1,n=t._x2,o=t._y2;if(t._l01_a>1e-12){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);_=(_*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,h=(h*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>1e-12){var v=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,N=3*t._l23_a*(t._l23_a+t._l12_a);n=(n*v+t._x1*t._l23_2a-i*t._l12_2a)/N,o=(o*v+t._y1*t._l23_2a-s*t._l12_2a)/N}t._context.bezierCurveTo(_,h,n,o,t._x2,t._y2)}function m(t,i){this._context=t,this._alpha=i}m.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var s=this._x2-t,_=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=(s*s+_*_)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;default:k(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var W=(function t(i){function s(_){return i?new m(_,i):new p(_,0)}return s.alpha=function(_){return t(+_)},s})(.5);function P(t,i){this._context=t,this._alpha=i}P.prototype={areaStart:e,areaEnd:e,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(t,i){if(t=+t,i=+i,this._point){var s=this._x2-t,_=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=(s*s+_*_)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:k(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var G=(function t(i){function s(_){return i?new P(_,i):new f(_,0)}return s.alpha=function(_){return t(+_)},s})(.5);function z(t,i){this._context=t,this._alpha=i}z.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var s=this._x2-t,_=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=(s*s+_*_)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:k(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var J=(function t(i){function s(_){return i?new z(_,i):new b(_,0)}return s.alpha=function(_){return t(+_)},s})(.5);function C(t){this._context=t}C.prototype={areaStart:e,areaEnd:e,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,i){t=+t,i=+i,this._point?this._context.lineTo(t,i):(this._point=1,this._context.moveTo(t,i))}};function K(t){return new C(t)}function M(t){return t<0?-1:1}function g(t,i,s){var _=t._x1-t._x0,h=i-t._x1,n=(t._y1-t._y0)/(_||h<0&&-0),o=(s-t._y1)/(h||_<0&&-0),a=(n*h+o*_)/(_+h);return(M(n)+M(o))*Math.min(Math.abs(n),Math.abs(o),.5*Math.abs(a))||0}function A(t,i){var s=t._x1-t._x0;return s?(3*(t._y1-t._y0)/s-i)/2:i}function T(t,i,s){var _=t._x0,h=t._y0,n=t._x1,o=t._y1,a=(n-_)/3;t._context.bezierCurveTo(_+a,h+a*i,n-a,o-a*s,n,o)}function u(t){this._context=t}u.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:T(this,this._t0,A(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){var s=NaN;if(t=+t,i=+i,!(t===this._x1&&i===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,T(this,A(this,s=g(this,t,i)),s);break;default:T(this,this._t0,s=g(this,t,i));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=s}}};function q(t){this._context=new j(t)}(q.prototype=Object.create(u.prototype)).point=function(t,i){u.prototype.point.call(this,i,t)};function j(t){this._context=t}j.prototype={moveTo:function(t,i){this._context.moveTo(i,t)},closePath:function(){this._context.closePath()},lineTo:function(t,i){this._context.lineTo(i,t)},bezierCurveTo:function(t,i,s,_,h,n){this._context.bezierCurveTo(i,t,_,s,n,h)}};function Q(t){return new u(t)}function X(t){return new q(t)}function O(t){this._context=t}O.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,i=this._y,s=t.length;if(s)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),s===2)this._context.lineTo(t[1],i[1]);else for(var _=B(t),h=B(i),n=0,o=1;o<s;++n,++o)this._context.bezierCurveTo(_[0][n],h[0][n],_[1][n],h[1][n],t[o],i[o]);(this._line||this._line!==0&&s===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,i){this._x.push(+t),this._y.push(+i)}};function B(t){var i,s=t.length-1,_,h=Array(s),n=Array(s),o=Array(s);for(h[0]=0,n[0]=2,o[0]=t[0]+2*t[1],i=1;i<s-1;++i)h[i]=1,n[i]=4,o[i]=4*t[i]+2*t[i+1];for(h[s-1]=2,n[s-1]=7,o[s-1]=8*t[s-1]+t[s],i=1;i<s;++i)_=h[i]/n[i-1],n[i]-=_,o[i]-=_*o[i-1];for(h[s-1]=o[s-1]/n[s-1],i=s-2;i>=0;--i)h[i]=(o[i]-h[i+1])/n[i];for(n[s-1]=(t[s]+h[s-1])/2,i=0;i<s-1;++i)n[i]=2*t[i+1]-h[i+1];return[h,n]}function Y(t){return new O(t)}function y(t,i){this._context=t,this._t=i}y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var s=this._x*(1-this._t)+t*this._t;this._context.lineTo(s,this._y),this._context.lineTo(s,i)}break}this._x=t,this._y=i}};function Z(t){return new y(t,.5)}function $(t){return new y(t,0)}function tt(t){return new y(t,1)}export{F as _,Q as a,J as c,V as d,U as f,H as g,I as h,Y as i,G as l,L as m,$ as n,X as o,R as p,Z as r,K as s,tt as t,W as u,D as v};
@@ -1 +1 @@
1
- import{s as cr}from"./chunk-LvLJmgfZ.js";import{t as lt}from"./react-Bj1aDYRI.js";import{Tr as nt}from"./cells-B7YKR2ed.js";import{G as ut,K as ot,q as dt}from"./zod-H_cgTO0M.js";import{t as mr}from"./compiler-runtime-B3qBwwSJ.js";import{n as ft}from"./useEventListener-BakX-tnw.js";import{t as de}from"./cn-X2M2usMq.js";import{t as ct}from"./jsx-runtime-PbYoItBR.js";import{y as mt}from"./fullscreen-BXI8V5i6.js";import{t as yt}from"./label-CFvCMYuj.js";import{t as gt}from"./tooltip-CgQpRVyN.js";import{r as pt}from"./button-BF7GSjhW.js";import{t as vt}from"./createLucideIcon-BTp1tQDO.js";import{t as ht}from"./useDebounce-CpLI2dsc.js";var bt=vt("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]),x=cr(lt(),1),pe=r=>r.type==="checkbox",le=r=>r instanceof Date,q=r=>r==null,yr=r=>typeof r=="object",O=r=>!q(r)&&!Array.isArray(r)&&yr(r)&&!le(r),gr=r=>O(r)&&r.target?pe(r.target)?r.target.checked:r.target.value:r,_t=r=>r.substring(0,r.search(/\.\d+(\.|$)/))||r,pr=(r,a)=>r.has(_t(a)),xt=r=>{let a=r.constructor&&r.constructor.prototype;return O(a)&&a.hasOwnProperty("isPrototypeOf")},Te=typeof window<"u"&&window.HTMLElement!==void 0&&typeof document<"u";function B(r){let a,e=Array.isArray(r),t=typeof FileList<"u"?r instanceof FileList:!1;if(r instanceof Date)a=new Date(r);else if(r instanceof Set)a=new Set(r);else if(!(Te&&(r instanceof Blob||t))&&(e||O(r)))if(a=e?[]:{},!e&&!xt(r))a=r;else for(let s in r)r.hasOwnProperty(s)&&(a[s]=B(r[s]));else return r;return a}var ve=r=>Array.isArray(r)?r.filter(Boolean):[],E=r=>r===void 0,m=(r,a,e)=>{if(!a||!O(r))return e;let t=ve(a.split(/[,[\].]+?/)).reduce((s,l)=>q(s)?s:s[l],r);return E(t)||t===r?E(r[a])?e:r[a]:t},G=r=>typeof r=="boolean",Me=r=>/^\w*$/.test(r),vr=r=>ve(r.replace(/["|']|\]/g,"").split(/\.|\[/)),D=(r,a,e)=>{let t=-1,s=Me(a)?[a]:vr(a),l=s.length,n=l-1;for(;++t<l;){let o=s[t],f=e;if(t!==n){let c=r[o];f=O(c)||Array.isArray(c)?c:isNaN(+s[t+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;r[o]=f,r=r[o]}return r},Fe={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},J={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ee={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},hr=x.createContext(null),ne=()=>x.useContext(hr),br=r=>{let{children:a,...e}=r;return x.createElement(hr.Provider,{value:e},a)},_r=(r,a,e,t=!0)=>{let s={defaultValues:a._defaultValues};for(let l in r)Object.defineProperty(s,l,{get:()=>{let n=l;return a._proxyFormState[n]!==J.all&&(a._proxyFormState[n]=!t||J.all),e&&(e[n]=!0),r[n]}});return s},$=r=>O(r)&&!Object.keys(r).length,xr=(r,a,e,t)=>{e(r);let{name:s,...l}=r;return $(l)||Object.keys(l).length>=Object.keys(a).length||Object.keys(l).find(n=>a[n]===(!t||J.all))},H=r=>Array.isArray(r)?r:[r],Vr=(r,a,e)=>!r||!a||r===a||H(r).some(t=>t&&(e?t===a:t.startsWith(a)||a.startsWith(t)));function Se(r){let a=x.useRef(r);a.current=r,x.useEffect(()=>{let e=!r.disabled&&a.current.subject&&a.current.subject.subscribe({next:a.current.next});return()=>{e&&e.unsubscribe()}},[r.disabled])}function Vt(r){let a=ne(),{control:e=a.control,disabled:t,name:s,exact:l}=r||{},[n,o]=x.useState(e._formState),f=x.useRef(!0),c=x.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),b=x.useRef(s);return b.current=s,Se({disabled:t,next:_=>f.current&&Vr(b.current,_.name,l)&&xr(_,c.current,e._updateFormState)&&o({...e._formState,..._}),subject:e._subjects.state}),x.useEffect(()=>(f.current=!0,c.current.isValid&&e._updateValid(!0),()=>{f.current=!1}),[e]),x.useMemo(()=>_r(n,e,c.current,!1),[n,e])}var Z=r=>typeof r=="string",Ar=(r,a,e,t,s)=>Z(r)?(t&&a.watch.add(r),m(e,r,s)):Array.isArray(r)?r.map(l=>(t&&a.watch.add(l),m(e,l))):(t&&(a.watchAll=!0),e);function Fr(r){let a=ne(),{control:e=a.control,name:t,defaultValue:s,disabled:l,exact:n}=r||{},o=x.useRef(t);o.current=t,Se({disabled:l,subject:e._subjects.values,next:b=>{Vr(o.current,b.name,n)&&c(B(Ar(o.current,e._names,b.values||e._formValues,!1,s)))}});let[f,c]=x.useState(e._getWatch(t,s));return x.useEffect(()=>e._removeUnmounted()),f}function At(r){let a=ne(),{name:e,disabled:t,control:s=a.control,shouldUnregister:l}=r,n=pr(s._names.array,e),o=Fr({control:s,name:e,defaultValue:m(s._formValues,e,m(s._defaultValues,e,r.defaultValue)),exact:!0}),f=Vt({control:s,name:e,exact:!0}),c=x.useRef(s.register(e,{...r.rules,value:o,...G(r.disabled)?{disabled:r.disabled}:{}})),b=x.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!m(f.errors,e)},isDirty:{enumerable:!0,get:()=>!!m(f.dirtyFields,e)},isTouched:{enumerable:!0,get:()=>!!m(f.touchedFields,e)},isValidating:{enumerable:!0,get:()=>!!m(f.validatingFields,e)},error:{enumerable:!0,get:()=>m(f.errors,e)}}),[f,e]),_=x.useMemo(()=>({name:e,value:o,...G(t)||f.disabled?{disabled:f.disabled||t}:{},onChange:N=>c.current.onChange({target:{value:gr(N),name:e},type:Fe.CHANGE}),onBlur:()=>c.current.onBlur({target:{value:m(s._formValues,e),name:e},type:Fe.BLUR}),ref:N=>{let k=m(s._fields,e);k&&N&&(k._f.ref={focus:()=>N.focus(),select:()=>N.select(),setCustomValidity:v=>N.setCustomValidity(v),reportValidity:()=>N.reportValidity()})}}),[e,s._formValues,t,f.disabled,o,s._fields]);return x.useEffect(()=>{let N=s._options.shouldUnregister||l,k=(v,h)=>{let A=m(s._fields,v);A&&A._f&&(A._f.mount=h)};if(k(e,!0),N){let v=B(m(s._options.defaultValues,e));D(s._defaultValues,e,v),E(m(s._formValues,e))&&D(s._formValues,e,v)}return!n&&s.register(e),()=>{(n?N&&!s._state.action:N)?s.unregister(e):k(e,!1)}},[e,s,n,l]),x.useEffect(()=>{s._updateDisabledField({disabled:t,fields:s._fields,name:e})},[t,e,s]),x.useMemo(()=>({field:_,formState:f,fieldState:b}),[_,f,b])}var Ft=r=>r.render(At(r)),Be=(r,a,e,t,s)=>a?{...e[r],types:{...e[r]&&e[r].types?e[r].types:{},[t]:s||!0}}:{},ae=()=>{let r=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,a=>{let e=(Math.random()*16+r)%16|0;return(a=="x"?e:e&3|8).toString(16)})},Le=(r,a,e={})=>e.shouldFocus||E(e.shouldFocus)?e.focusName||`${r}.${E(e.focusIndex)?a:e.focusIndex}.`:"",he=r=>({isOnSubmit:!r||r===J.onSubmit,isOnBlur:r===J.onBlur,isOnChange:r===J.onChange,isOnAll:r===J.all,isOnTouch:r===J.onTouched}),Re=(r,a,e)=>!e&&(a.watchAll||a.watch.has(r)||[...a.watch].some(t=>r.startsWith(t)&&/^\.\w+/.test(r.slice(t.length)))),fe=(r,a,e,t)=>{for(let s of e||Object.keys(r)){let l=m(r,s);if(l){let{_f:n,...o}=l;if(n){if(n.refs&&n.refs[0]&&a(n.refs[0],s)&&!t||n.ref&&a(n.ref,n.name)&&!t)return!0;if(fe(o,a))break}else if(O(o)&&fe(o,a))break}}},Sr=(r,a,e)=>{let t=H(m(r,e));return D(t,"root",a[e]),D(r,e,t),r},Ie=r=>r.type==="file",Q=r=>typeof r=="function",we=r=>{if(!Te)return!1;let a=r?r.ownerDocument:0;return r instanceof(a&&a.defaultView?a.defaultView.HTMLElement:HTMLElement)},ke=r=>Z(r),Pe=r=>r.type==="radio",De=r=>r instanceof RegExp,wr={value:!1,isValid:!1},kr={value:!0,isValid:!0},Dr=r=>{if(Array.isArray(r)){if(r.length>1){let a=r.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:a,isValid:!!a.length}}return r[0].checked&&!r[0].disabled?r[0].attributes&&!E(r[0].attributes.value)?E(r[0].value)||r[0].value===""?kr:{value:r[0].value,isValid:!0}:kr:wr}return wr},jr={isValid:!1,value:null},Nr=r=>Array.isArray(r)?r.reduce((a,e)=>e&&e.checked&&!e.disabled?{isValid:!0,value:e.value}:a,jr):jr;function Cr(r,a,e="validate"){if(ke(r)||Array.isArray(r)&&r.every(ke)||G(r)&&!r)return{type:e,message:ke(r)?r:"",ref:a}}var ce=r=>O(r)&&!De(r)?r:{value:r,message:""},qe=async(r,a,e,t,s,l)=>{let{ref:n,refs:o,required:f,maxLength:c,minLength:b,min:_,max:N,pattern:k,validate:v,name:h,valueAsNumber:A,mount:j}=r._f,w=m(e,h);if(!j||a.has(h))return{};let W=o?o[0]:n,X=F=>{s&&W.reportValidity&&(W.setCustomValidity(G(F)?"":F||""),W.reportValidity())},T={},ue=Pe(n),Ve=pe(n),ie=ue||Ve,oe=(A||Ie(n))&&E(n.value)&&E(w)||we(n)&&n.value===""||w===""||Array.isArray(w)&&!w.length,z=Be.bind(null,h,t,T),Ae=(F,C,M,R=ee.maxLength,Y=ee.minLength)=>{let K=F?C:M;T[h]={type:F?R:Y,message:K,ref:n,...z(F?R:Y,K)}};if(l?!Array.isArray(w)||!w.length:f&&(!ie&&(oe||q(w))||G(w)&&!w||Ve&&!Dr(o).isValid||ue&&!Nr(o).isValid)){let{value:F,message:C}=ke(f)?{value:!!f,message:f}:ce(f);if(F&&(T[h]={type:ee.required,message:C,ref:W,...z(ee.required,C)},!t))return X(C),T}if(!oe&&(!q(_)||!q(N))){let F,C,M=ce(N),R=ce(_);if(!q(w)&&!isNaN(w)){let Y=n.valueAsNumber||w&&+w;q(M.value)||(F=Y>M.value),q(R.value)||(C=Y<R.value)}else{let Y=n.valueAsDate||new Date(w),K=ge=>new Date(new Date().toDateString()+" "+ge),me=n.type=="time",ye=n.type=="week";Z(M.value)&&w&&(F=me?K(w)>K(M.value):ye?w>M.value:Y>new Date(M.value)),Z(R.value)&&w&&(C=me?K(w)<K(R.value):ye?w<R.value:Y<new Date(R.value))}if((F||C)&&(Ae(!!F,M.message,R.message,ee.max,ee.min),!t))return X(T[h].message),T}if((c||b)&&!oe&&(Z(w)||l&&Array.isArray(w))){let F=ce(c),C=ce(b),M=!q(F.value)&&w.length>+F.value,R=!q(C.value)&&w.length<+C.value;if((M||R)&&(Ae(M,F.message,C.message),!t))return X(T[h].message),T}if(k&&!oe&&Z(w)){let{value:F,message:C}=ce(k);if(De(F)&&!w.match(F)&&(T[h]={type:ee.pattern,message:C,ref:n,...z(ee.pattern,C)},!t))return X(C),T}if(v){if(Q(v)){let F=Cr(await v(w,e),W);if(F&&(T[h]={...F,...z(ee.validate,F.message)},!t))return X(F.message),T}else if(O(v)){let F={};for(let C in v){if(!$(F)&&!t)break;let M=Cr(await v[C](w,e),W,C);M&&(F={...M,...z(C,M.message)},X(M.message),t&&(T[h]=F))}if(!$(F)&&(T[h]={ref:W,...F},!t))return T}}return X(!0),T},$e=(r,a)=>[...r,...H(a)],He=r=>Array.isArray(r)?r.map(()=>{}):void 0;function We(r,a,e){return[...r.slice(0,a),...H(e),...r.slice(a)]}var ze=(r,a,e)=>Array.isArray(r)?(E(r[e])&&(r[e]=void 0),r.splice(e,0,r.splice(a,1)[0]),r):[],Ke=(r,a)=>[...H(a),...H(r)];function St(r,a){let e=0,t=[...r];for(let s of a)t.splice(s-e,1),e++;return ve(t).length?t:[]}var Ge=(r,a)=>E(a)?[]:St(r,H(a).sort((e,t)=>e-t)),Je=(r,a,e)=>{[r[a],r[e]]=[r[e],r[a]]};function wt(r,a){let e=a.slice(0,-1).length,t=0;for(;t<e;)r=E(r)?t++:r[a[t++]];return r}function kt(r){for(let a in r)if(r.hasOwnProperty(a)&&!E(r[a]))return!1;return!0}function U(r,a){let e=Array.isArray(a)?a:Me(a)?[a]:vr(a),t=e.length===1?r:wt(r,e),s=e.length-1,l=e[s];return t&&delete t[l],s!==0&&(O(t)&&$(t)||Array.isArray(t)&&kt(t))&&U(r,e.slice(0,-1)),r}var Er=(r,a,e)=>(r[a]=e,r);function Dt(r){let a=ne(),{control:e=a.control,name:t,keyName:s="id",shouldUnregister:l,rules:n}=r,[o,f]=x.useState(e._getFieldArray(t)),c=x.useRef(e._getFieldArray(t).map(ae)),b=x.useRef(o),_=x.useRef(t),N=x.useRef(!1);_.current=t,b.current=o,e._names.array.add(t),n&&e.register(t,n),Se({next:({values:v,name:h})=>{if(h===_.current||!h){let A=m(v,_.current);Array.isArray(A)&&(f(A),c.current=A.map(ae))}},subject:e._subjects.array});let k=x.useCallback(v=>{N.current=!0,e._updateFieldArray(t,v)},[e,t]);return x.useEffect(()=>{if(e._state.action=!1,Re(t,e._names)&&e._subjects.state.next({...e._formState}),N.current&&(!he(e._options.mode).isOnSubmit||e._formState.isSubmitted))if(e._options.resolver)e._executeSchema([t]).then(v=>{let h=m(v.errors,t),A=m(e._formState.errors,t);(A?!h&&A.type||h&&(A.type!==h.type||A.message!==h.message):h&&h.type)&&(h?D(e._formState.errors,t,h):U(e._formState.errors,t),e._subjects.state.next({errors:e._formState.errors}))});else{let v=m(e._fields,t);v&&v._f&&!(he(e._options.reValidateMode).isOnSubmit&&he(e._options.mode).isOnSubmit)&&qe(v,e._names.disabled,e._formValues,e._options.criteriaMode===J.all,e._options.shouldUseNativeValidation,!0).then(h=>!$(h)&&e._subjects.state.next({errors:Sr(e._formState.errors,h,t)}))}e._subjects.values.next({name:t,values:{...e._formValues}}),e._names.focus&&fe(e._fields,(v,h)=>{if(e._names.focus&&h.startsWith(e._names.focus)&&v.focus)return v.focus(),1}),e._names.focus="",e._updateValid(),N.current=!1},[o,t,e]),x.useEffect(()=>(!m(e._formValues,t)&&e._updateFieldArray(t),()=>{(e._options.shouldUnregister||l)&&e.unregister(t)}),[t,e,s,l]),{swap:x.useCallback((v,h)=>{let A=e._getFieldArray(t);Je(A,v,h),Je(c.current,v,h),k(A),f(A),e._updateFieldArray(t,A,Je,{argA:v,argB:h},!1)},[k,t,e]),move:x.useCallback((v,h)=>{let A=e._getFieldArray(t);ze(A,v,h),ze(c.current,v,h),k(A),f(A),e._updateFieldArray(t,A,ze,{argA:v,argB:h},!1)},[k,t,e]),prepend:x.useCallback((v,h)=>{let A=H(B(v)),j=Ke(e._getFieldArray(t),A);e._names.focus=Le(t,0,h),c.current=Ke(c.current,A.map(ae)),k(j),f(j),e._updateFieldArray(t,j,Ke,{argA:He(v)})},[k,t,e]),append:x.useCallback((v,h)=>{let A=H(B(v)),j=$e(e._getFieldArray(t),A);e._names.focus=Le(t,j.length-1,h),c.current=$e(c.current,A.map(ae)),k(j),f(j),e._updateFieldArray(t,j,$e,{argA:He(v)})},[k,t,e]),remove:x.useCallback(v=>{let h=Ge(e._getFieldArray(t),v);c.current=Ge(c.current,v),k(h),f(h),!Array.isArray(m(e._fields,t))&&D(e._fields,t,void 0),e._updateFieldArray(t,h,Ge,{argA:v})},[k,t,e]),insert:x.useCallback((v,h,A)=>{let j=H(B(h)),w=We(e._getFieldArray(t),v,j);e._names.focus=Le(t,v,A),c.current=We(c.current,v,j.map(ae)),k(w),f(w),e._updateFieldArray(t,w,We,{argA:v,argB:He(h)})},[k,t,e]),update:x.useCallback((v,h)=>{let A=B(h),j=Er(e._getFieldArray(t),v,A);c.current=[...j].map((w,W)=>!w||W===v?ae():c.current[W]),k(j),f([...j]),e._updateFieldArray(t,j,Er,{argA:v,argB:A},!0,!1)},[k,t,e]),replace:x.useCallback(v=>{let h=H(B(v));c.current=h.map(ae),k([...h]),f([...h]),e._updateFieldArray(t,[...h],A=>A,{},!0,!1)},[k,t,e]),fields:x.useMemo(()=>o.map((v,h)=>({...v,[s]:c.current[h]||ae()})),[o,s])}}var Ye=()=>{let r=[];return{get observers(){return r},next:a=>{for(let e of r)e.next&&e.next(a)},subscribe:a=>(r.push(a),{unsubscribe:()=>{r=r.filter(e=>e!==a)}}),unsubscribe:()=>{r=[]}}},Ze=r=>q(r)||!yr(r);function se(r,a){if(Ze(r)||Ze(a))return r===a;if(le(r)&&le(a))return r.getTime()===a.getTime();let e=Object.keys(r),t=Object.keys(a);if(e.length!==t.length)return!1;for(let s of e){let l=r[s];if(!t.includes(s))return!1;if(s!=="ref"){let n=a[s];if(le(l)&&le(n)||O(l)&&O(n)||Array.isArray(l)&&Array.isArray(n)?!se(l,n):l!==n)return!1}}return!0}var Or=r=>r.type==="select-multiple",jt=r=>Pe(r)||pe(r),Qe=r=>we(r)&&r.isConnected,Ur=r=>{for(let a in r)if(Q(r[a]))return!0;return!1};function je(r,a={}){let e=Array.isArray(r);if(O(r)||e)for(let t in r)Array.isArray(r[t])||O(r[t])&&!Ur(r[t])?(a[t]=Array.isArray(r[t])?[]:{},je(r[t],a[t])):q(r[t])||(a[t]=!0);return a}function Tr(r,a,e){let t=Array.isArray(r);if(O(r)||t)for(let s in r)Array.isArray(r[s])||O(r[s])&&!Ur(r[s])?E(a)||Ze(e[s])?e[s]=Array.isArray(r[s])?je(r[s],[]):{...je(r[s])}:Tr(r[s],q(a)?{}:a[s],e[s]):e[s]=!se(r[s],a[s]);return e}var be=(r,a)=>Tr(r,a,je(a)),Mr=(r,{valueAsNumber:a,valueAsDate:e,setValueAs:t})=>E(r)?r:a?r===""?NaN:r&&+r:e&&Z(r)?new Date(r):t?t(r):r;function Xe(r){let a=r.ref;return Ie(a)?a.files:Pe(a)?Nr(r.refs).value:Or(a)?[...a.selectedOptions].map(({value:e})=>e):pe(a)?Dr(r.refs).value:Mr(E(a.value)?r.ref.value:a.value,r)}var Nt=(r,a,e,t)=>{let s={};for(let l of r){let n=m(a,l);n&&D(s,l,n._f)}return{criteriaMode:e,names:[...r],fields:s,shouldUseNativeValidation:t}},_e=r=>E(r)?r:De(r)?r.source:O(r)?De(r.value)?r.value.source:r.value:r,Br="AsyncFunction",Ct=r=>!!r&&!!r.validate&&!!(Q(r.validate)&&r.validate.constructor.name===Br||O(r.validate)&&Object.values(r.validate).find(a=>a.constructor.name===Br)),Et=r=>r.mount&&(r.required||r.min||r.max||r.maxLength||r.minLength||r.pattern||r.validate);function Lr(r,a,e){let t=m(r,e);if(t||Me(e))return{error:t,name:e};let s=e.split(".");for(;s.length;){let l=s.join("."),n=m(a,l),o=m(r,l);if(n&&!Array.isArray(n)&&e!==l)return{name:e};if(o&&o.type)return{name:l,error:o};s.pop()}return{name:e}}var Ot=(r,a,e,t,s)=>s.isOnAll?!1:!e&&s.isOnTouch?!(a||r):(e?t.isOnBlur:s.isOnBlur)?!r:(e?t.isOnChange:s.isOnChange)?r:!0,Ut=(r,a)=>!ve(m(r,a)).length&&U(r,a),Tt={mode:J.onSubmit,reValidateMode:J.onChange,shouldFocusError:!0};function Mt(r={}){let a={...Tt,...r},e={submitCount:0,isDirty:!1,isLoading:Q(a.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:a.errors||{},disabled:a.disabled||!1},t={},s=(O(a.defaultValues)||O(a.values))&&B(a.defaultValues||a.values)||{},l=a.shouldUnregister?{}:B(s),n={action:!1,mount:!1,watch:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},f,c=0,b={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},_={values:Ye(),array:Ye(),state:Ye()},N=he(a.mode),k=he(a.reValidateMode),v=a.criteriaMode===J.all,h=i=>u=>{clearTimeout(c),c=setTimeout(i,u)},A=async i=>{if(!a.disabled&&(b.isValid||i)){let u=a.resolver?$((await ie()).errors):await z(t,!0);u!==e.isValid&&_.state.next({isValid:u})}},j=(i,u)=>{!a.disabled&&(b.isValidating||b.validatingFields)&&((i||Array.from(o.mount)).forEach(d=>{d&&(u?D(e.validatingFields,d,u):U(e.validatingFields,d))}),_.state.next({validatingFields:e.validatingFields,isValidating:!$(e.validatingFields)}))},w=(i,u=[],d,p,g=!0,y=!0)=>{if(p&&d&&!a.disabled){if(n.action=!0,y&&Array.isArray(m(t,i))){let V=d(m(t,i),p.argA,p.argB);g&&D(t,i,V)}if(y&&Array.isArray(m(e.errors,i))){let V=d(m(e.errors,i),p.argA,p.argB);g&&D(e.errors,i,V),Ut(e.errors,i)}if(b.touchedFields&&y&&Array.isArray(m(e.touchedFields,i))){let V=d(m(e.touchedFields,i),p.argA,p.argB);g&&D(e.touchedFields,i,V)}b.dirtyFields&&(e.dirtyFields=be(s,l)),_.state.next({name:i,isDirty:F(i,u),dirtyFields:e.dirtyFields,errors:e.errors,isValid:e.isValid})}else D(l,i,u)},W=(i,u)=>{D(e.errors,i,u),_.state.next({errors:e.errors})},X=i=>{e.errors=i,_.state.next({errors:e.errors,isValid:!1})},T=(i,u,d,p)=>{let g=m(t,i);if(g){let y=m(l,i,E(d)?m(s,i):d);E(y)||p&&p.defaultChecked||u?D(l,i,u?y:Xe(g._f)):R(i,y),n.mount&&A()}},ue=(i,u,d,p,g)=>{let y=!1,V=!1,S={name:i};if(!a.disabled){let I=!!(m(t,i)&&m(t,i)._f&&m(t,i)._f.disabled);if(!d||p){b.isDirty&&(V=e.isDirty,e.isDirty=S.isDirty=F(),y=V!==S.isDirty);let L=I||se(m(s,i),u);V=!!(!I&&m(e.dirtyFields,i)),L||I?U(e.dirtyFields,i):D(e.dirtyFields,i,!0),S.dirtyFields=e.dirtyFields,y||(y=b.dirtyFields&&V!==!L)}if(d){let L=m(e.touchedFields,i);L||(D(e.touchedFields,i,d),S.touchedFields=e.touchedFields,y||(y=b.touchedFields&&L!==d))}y&&g&&_.state.next(S)}return y?S:{}},Ve=(i,u,d,p)=>{let g=m(e.errors,i),y=b.isValid&&G(u)&&e.isValid!==u;if(a.delayError&&d?(f=h(()=>W(i,d)),f(a.delayError)):(clearTimeout(c),f=null,d?D(e.errors,i,d):U(e.errors,i)),(d?!se(g,d):g)||!$(p)||y){let V={...p,...y&&G(u)?{isValid:u}:{},errors:e.errors,name:i};e={...e,...V},_.state.next(V)}},ie=async i=>{j(i,!0);let u=await a.resolver(l,a.context,Nt(i||o.mount,t,a.criteriaMode,a.shouldUseNativeValidation));return j(i),u},oe=async i=>{let{errors:u}=await ie(i);if(i)for(let d of i){let p=m(u,d);p?D(e.errors,d,p):U(e.errors,d)}else e.errors=u;return u},z=async(i,u,d={valid:!0})=>{for(let p in i){let g=i[p];if(g){let{_f:y,...V}=g;if(y){let S=o.array.has(y.name),I=g._f&&Ct(g._f);I&&b.validatingFields&&j([p],!0);let L=await qe(g,o.disabled,l,v,a.shouldUseNativeValidation&&!u,S);if(I&&b.validatingFields&&j([p]),L[y.name]&&(d.valid=!1,u))break;!u&&(m(L,y.name)?S?Sr(e.errors,L,y.name):D(e.errors,y.name,L[y.name]):U(e.errors,y.name))}!$(V)&&await z(V,u,d)}}return d.valid},Ae=()=>{for(let i of o.unMount){let u=m(t,i);u&&(u._f.refs?u._f.refs.every(d=>!Qe(d)):!Qe(u._f.ref))&&Ce(i)}o.unMount=new Set},F=(i,u)=>!a.disabled&&(i&&u&&D(l,i,u),!se(tr(),s)),C=(i,u,d)=>Ar(i,o,{...n.mount?l:E(u)?s:Z(i)?{[i]:u}:u},d,u),M=i=>ve(m(n.mount?l:s,i,a.shouldUnregister?m(s,i,[]):[])),R=(i,u,d={})=>{let p=m(t,i),g=u;if(p){let y=p._f;y&&(!y.disabled&&D(l,i,Mr(u,y)),g=we(y.ref)&&q(u)?"":u,Or(y.ref)?[...y.ref.options].forEach(V=>V.selected=g.includes(V.value)):y.refs?pe(y.ref)?y.refs.length>1?y.refs.forEach(V=>(!V.defaultChecked||!V.disabled)&&(V.checked=Array.isArray(g)?!!g.find(S=>S===V.value):g===V.value)):y.refs[0]&&(y.refs[0].checked=!!g):y.refs.forEach(V=>V.checked=V.value===g):Ie(y.ref)?y.ref.value="":(y.ref.value=g,y.ref.type||_.values.next({name:i,values:{...l}})))}(d.shouldDirty||d.shouldTouch)&&ue(i,g,d.shouldTouch,d.shouldDirty,!0),d.shouldValidate&&ge(i)},Y=(i,u,d)=>{for(let p in u){let g=u[p],y=`${i}.${p}`,V=m(t,y);(o.array.has(i)||O(g)||V&&!V._f)&&!le(g)?Y(y,g,d):R(y,g,d)}},K=(i,u,d={})=>{let p=m(t,i),g=o.array.has(i),y=B(u);D(l,i,y),g?(_.array.next({name:i,values:{...l}}),(b.isDirty||b.dirtyFields)&&d.shouldDirty&&_.state.next({name:i,dirtyFields:be(s,l),isDirty:F(i,y)})):p&&!p._f&&!q(y)?Y(i,y,d):R(i,y,d),Re(i,o)&&_.state.next({...e}),_.values.next({name:n.mount?i:void 0,values:{...l}})},me=async i=>{n.mount=!0;let u=i.target,d=u.name,p=!0,g=m(t,d),y=()=>u.type?Xe(g._f):gr(i),V=S=>{p=Number.isNaN(S)||le(S)&&isNaN(S.getTime())||se(S,m(l,d,S))};if(g){let S,I,L=y(),te=i.type===Fe.BLUR||i.type===Fe.FOCUS_OUT,at=!Et(g._f)&&!a.resolver&&!m(e.errors,d)&&!g._f.deps||Ot(te,m(e.touchedFields,d),e.isSubmitted,k,N),Oe=Re(d,o,te);D(l,d,L),te?(g._f.onBlur&&g._f.onBlur(i),f&&f(0)):g._f.onChange&&g._f.onChange(i);let Ue=ue(d,L,te,!1),st=!$(Ue)||Oe;if(!te&&_.values.next({name:d,type:i.type,values:{...l}}),at)return b.isValid&&(a.mode==="onBlur"&&te?A():te||A()),st&&_.state.next({name:d,...Oe?{}:Ue});if(!te&&Oe&&_.state.next({...e}),a.resolver){let{errors:dr}=await ie([d]);if(V(L),p){let it=Lr(e.errors,t,d),fr=Lr(dr,t,it.name||d);S=fr.error,d=fr.name,I=$(dr)}}else j([d],!0),S=(await qe(g,o.disabled,l,v,a.shouldUseNativeValidation))[d],j([d]),V(L),p&&(S?I=!1:b.isValid&&(I=await z(t,!0)));p&&(g._f.deps&&ge(g._f.deps),Ve(d,I,S,Ue))}},ye=(i,u)=>{if(m(e.errors,u)&&i.focus)return i.focus(),1},ge=async(i,u={})=>{let d,p,g=H(i);if(a.resolver){let y=await oe(E(i)?i:g);d=$(y),p=i?!g.some(V=>m(y,V)):d}else i?(p=(await Promise.all(g.map(async y=>{let V=m(t,y);return await z(V&&V._f?{[y]:V}:V)}))).every(Boolean),!(!p&&!e.isValid)&&A()):p=d=await z(t);return _.state.next({...!Z(i)||b.isValid&&d!==e.isValid?{}:{name:i},...a.resolver||!i?{isValid:d}:{},errors:e.errors}),u.shouldFocus&&!p&&fe(t,ye,i?g:o.mount),p},tr=i=>{let u={...n.mount?l:s};return E(i)?u:Z(i)?m(u,i):i.map(d=>m(u,d))},ar=(i,u)=>({invalid:!!m((u||e).errors,i),isDirty:!!m((u||e).dirtyFields,i),error:m((u||e).errors,i),isValidating:!!m(e.validatingFields,i),isTouched:!!m((u||e).touchedFields,i)}),Xr=i=>{i&&H(i).forEach(u=>U(e.errors,u)),_.state.next({errors:i?e.errors:{}})},sr=(i,u,d)=>{let p=(m(t,i,{_f:{}})._f||{}).ref,{ref:g,message:y,type:V,...S}=m(e.errors,i)||{};D(e.errors,i,{...S,...u,ref:p}),_.state.next({name:i,errors:e.errors,isValid:!1}),d&&d.shouldFocus&&p&&p.focus&&p.focus()},et=(i,u)=>Q(i)?_.values.subscribe({next:d=>i(C(void 0,u),d)}):C(i,u,!0),Ce=(i,u={})=>{for(let d of i?H(i):o.mount)o.mount.delete(d),o.array.delete(d),u.keepValue||(U(t,d),U(l,d)),!u.keepError&&U(e.errors,d),!u.keepDirty&&U(e.dirtyFields,d),!u.keepTouched&&U(e.touchedFields,d),!u.keepIsValidating&&U(e.validatingFields,d),!a.shouldUnregister&&!u.keepDefaultValue&&U(s,d);_.values.next({values:{...l}}),_.state.next({...e,...u.keepDirty?{isDirty:F()}:{}}),!u.keepIsValid&&A()},ir=({disabled:i,name:u,field:d,fields:p})=>{(G(i)&&n.mount||i||o.disabled.has(u))&&(i?o.disabled.add(u):o.disabled.delete(u),ue(u,Xe(d?d._f:m(p,u)._f),!1,!1,!0))},Ee=(i,u={})=>{let d=m(t,i),p=G(u.disabled)||G(a.disabled);return D(t,i,{...d||{},_f:{...d&&d._f?d._f:{ref:{name:i}},name:i,mount:!0,...u}}),o.mount.add(i),d?ir({field:d,disabled:G(u.disabled)?u.disabled:a.disabled,name:i}):T(i,!0,u.value),{...p?{disabled:u.disabled||a.disabled}:{},...a.progressive?{required:!!u.required,min:_e(u.min),max:_e(u.max),minLength:_e(u.minLength),maxLength:_e(u.maxLength),pattern:_e(u.pattern)}:{},name:i,onChange:me,onBlur:me,ref:g=>{if(g){Ee(i,u),d=m(t,i);let y=E(g.value)&&g.querySelectorAll&&g.querySelectorAll("input,select,textarea")[0]||g,V=jt(y),S=d._f.refs||[];if(V?S.find(I=>I===y):y===d._f.ref)return;D(t,i,{_f:{...d._f,...V?{refs:[...S.filter(Qe),y,...Array.isArray(m(s,i))?[{}]:[]],ref:{type:y.type,name:i}}:{ref:y}}}),T(i,!1,void 0,y)}else d=m(t,i,{}),d._f&&(d._f.mount=!1),(a.shouldUnregister||u.shouldUnregister)&&!(pr(o.array,i)&&n.action)&&o.unMount.add(i)}}},lr=()=>a.shouldFocusError&&fe(t,ye,o.mount),rt=i=>{G(i)&&(_.state.next({disabled:i}),fe(t,(u,d)=>{let p=m(t,d);p&&(u.disabled=p._f.disabled||i,Array.isArray(p._f.refs)&&p._f.refs.forEach(g=>{g.disabled=p._f.disabled||i}))},0,!1))},nr=(i,u)=>async d=>{let p;d&&(d.preventDefault&&d.preventDefault(),d.persist&&d.persist());let g=B(l);if(o.disabled.size)for(let y of o.disabled)D(g,y,void 0);if(_.state.next({isSubmitting:!0}),a.resolver){let{errors:y,values:V}=await ie();e.errors=y,g=V}else await z(t);if(U(e.errors,"root"),$(e.errors)){_.state.next({errors:{}});try{await i(g,d)}catch(y){p=y}}else u&&await u({...e.errors},d),lr(),setTimeout(lr);if(_.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:$(e.errors)&&!p,submitCount:e.submitCount+1,errors:e.errors}),p)throw p},tt=(i,u={})=>{m(t,i)&&(E(u.defaultValue)?K(i,B(m(s,i))):(K(i,u.defaultValue),D(s,i,B(u.defaultValue))),u.keepTouched||U(e.touchedFields,i),u.keepDirty||(U(e.dirtyFields,i),e.isDirty=u.defaultValue?F(i,B(m(s,i))):F()),u.keepError||(U(e.errors,i),b.isValid&&A()),_.state.next({...e}))},ur=(i,u={})=>{let d=i?B(i):s,p=B(d),g=$(i),y=g?s:p;if(u.keepDefaultValues||(s=d),!u.keepValues){if(u.keepDirtyValues){let V=new Set([...o.mount,...Object.keys(be(s,l))]);for(let S of Array.from(V))m(e.dirtyFields,S)?D(y,S,m(l,S)):K(S,m(y,S))}else{if(Te&&E(i))for(let V of o.mount){let S=m(t,V);if(S&&S._f){let I=Array.isArray(S._f.refs)?S._f.refs[0]:S._f.ref;if(we(I)){let L=I.closest("form");if(L){L.reset();break}}}}t={}}l=a.shouldUnregister?u.keepDefaultValues?B(s):{}:B(y),_.array.next({values:{...y}}),_.values.next({values:{...y}})}o={mount:u.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},n.mount=!b.isValid||!!u.keepIsValid||!!u.keepDirtyValues,n.watch=!!a.shouldUnregister,_.state.next({submitCount:u.keepSubmitCount?e.submitCount:0,isDirty:g?!1:u.keepDirty?e.isDirty:!!(u.keepDefaultValues&&!se(i,s)),isSubmitted:u.keepIsSubmitted?e.isSubmitted:!1,dirtyFields:g?{}:u.keepDirtyValues?u.keepDefaultValues&&l?be(s,l):e.dirtyFields:u.keepDefaultValues&&i?be(s,i):u.keepDirty?e.dirtyFields:{},touchedFields:u.keepTouched?e.touchedFields:{},errors:u.keepErrors?e.errors:{},isSubmitSuccessful:u.keepIsSubmitSuccessful?e.isSubmitSuccessful:!1,isSubmitting:!1})},or=(i,u)=>ur(Q(i)?i(l):i,u);return{control:{register:Ee,unregister:Ce,getFieldState:ar,handleSubmit:nr,setError:sr,_executeSchema:ie,_getWatch:C,_getDirty:F,_updateValid:A,_removeUnmounted:Ae,_updateFieldArray:w,_updateDisabledField:ir,_getFieldArray:M,_reset:ur,_resetDefaultValues:()=>Q(a.defaultValues)&&a.defaultValues().then(i=>{or(i,a.resetOptions),_.state.next({isLoading:!1})}),_updateFormState:i=>{e={...e,...i}},_disableForm:rt,_subjects:_,_proxyFormState:b,_setErrors:X,get _fields(){return t},get _formValues(){return l},get _state(){return n},set _state(i){n=i},get _defaultValues(){return s},get _names(){return o},set _names(i){o=i},get _formState(){return e},set _formState(i){e=i},get _options(){return a},set _options(i){a={...a,...i}}},trigger:ge,register:Ee,handleSubmit:nr,watch:et,setValue:K,getValues:tr,reset:or,resetField:tt,clearErrors:Xr,unregister:Ce,setError:sr,setFocus:(i,u={})=>{let d=m(t,i),p=d&&d._f;if(p){let g=p.refs?p.refs[0]:p.ref;g.focus&&(g.focus(),u.shouldSelect&&Q(g.select)&&g.select())}},getFieldState:ar}}function Bt(r={}){let a=x.useRef(void 0),e=x.useRef(void 0),[t,s]=x.useState({isDirty:!1,isValidating:!1,isLoading:Q(r.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1,defaultValues:Q(r.defaultValues)?void 0:r.defaultValues});a.current||(a.current={...Mt(r),formState:t});let l=a.current.control;return l._options=r,Se({subject:l._subjects.state,next:n=>{xr(n,l._proxyFormState,l._updateFormState,!0)&&s({...l._formState})}}),x.useEffect(()=>l._disableForm(r.disabled),[l,r.disabled]),x.useEffect(()=>{if(l._proxyFormState.isDirty){let n=l._getDirty();n!==t.isDirty&&l._subjects.state.next({isDirty:n})}},[l,t.isDirty]),x.useEffect(()=>{r.values&&!se(r.values,e.current)?(l._reset(r.values,l._options.resetOptions),e.current=r.values,s(n=>({...n}))):l._resetDefaultValues()},[r.values,l]),x.useEffect(()=>{r.errors&&l._setErrors(r.errors)},[r.errors,l]),x.useEffect(()=>{l._state.mount||(l._updateValid(),l._state.mount=!0),l._state.watch&&(l._state.watch=!1,l._subjects.state.next({...l._formState})),l._removeUnmounted()}),x.useEffect(()=>{r.shouldUnregister&&l._subjects.values.next({values:l._getWatch()})},[r.shouldUnregister,l]),a.current.formState=_r(t,l),a.current}var Rr=(r,a,e)=>{if(r&&"reportValidity"in r){let t=m(e,a);r.setCustomValidity(t&&t.message||""),r.reportValidity()}},er=(r,a)=>{for(let e in a.fields){let t=a.fields[e];t&&t.ref&&"reportValidity"in t.ref?Rr(t.ref,e,r):t&&t.refs&&t.refs.forEach(s=>Rr(s,e,r))}},Ir=(r,a)=>{a.shouldUseNativeValidation&&er(r,a);let e={};for(let t in r){let s=m(a.fields,t),l=Object.assign(r[t]||{},{ref:s&&s.ref});if(Lt(a.names||Object.keys(r),t)){let n=Object.assign({},m(e,t));D(n,"root",l),D(e,t,n)}else D(e,t,l)}return e},Lt=(r,a)=>{let e=Pr(a);return r.some(t=>Pr(t).match(`^${e}\\.\\d+`))};function Pr(r){return r.replace(/\]|\[/g,"")}function qr(r,a){try{var e=r()}catch(t){return a(t)}return e&&e.then?e.then(void 0,a):e}function Rt(r,a){for(var e={};r.length;){var t=r[0],s=t.code,l=t.message,n=t.path.join(".");if(!e[n])if("unionErrors"in t){var o=t.unionErrors[0].errors[0];e[n]={message:o.message,type:o.code}}else e[n]={message:l,type:s};if("unionErrors"in t&&t.unionErrors.forEach(function(b){return b.errors.forEach(function(_){return r.push(_)})}),a){var f=e[n].types,c=f&&f[t.code];e[n]=Be(n,a,e,s,c?[].concat(c,t.message):t.message)}r.shift()}return e}function It(r,a){for(var e={};r.length;){var t=r[0],s=t.code,l=t.message,n=t.path.join(".");if(!e[n])if(t.code==="invalid_union"&&t.errors.length>0){var o=t.errors[0][0];e[n]={message:o.message,type:o.code}}else e[n]={message:l,type:s};if(t.code==="invalid_union"&&t.errors.forEach(function(b){return b.forEach(function(_){return r.push(_)})}),a){var f=e[n].types,c=f&&f[t.code];e[n]=Be(n,a,e,s,c?[].concat(c,t.message):t.message)}r.shift()}return e}function Pt(r,a,e){if(e===void 0&&(e={}),(function(t){return"_def"in t&&typeof t._def=="object"&&"typeName"in t._def})(r))return function(t,s,l){try{return Promise.resolve(qr(function(){return Promise.resolve(r[e.mode==="sync"?"parse":"parseAsync"](t,a)).then(function(n){return l.shouldUseNativeValidation&&er({},l),{errors:{},values:e.raw?Object.assign({},t):n}})},function(n){if((function(o){return Array.isArray(o==null?void 0:o.issues)})(n))return{values:{},errors:Ir(Rt(n.errors,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw n}))}catch(n){return Promise.reject(n)}};if((function(t){return"_zod"in t&&typeof t._zod=="object"})(r))return function(t,s,l){try{return Promise.resolve(qr(function(){return Promise.resolve((e.mode==="sync"?ut:ot)(r,t,a)).then(function(n){return l.shouldUseNativeValidation&&er({},l),{errors:{},values:e.raw?Object.assign({},t):n}})},function(n){if((function(o){return o instanceof dt})(n))return{values:{},errors:Ir(It(n.issues,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw n}))}catch(n){return Promise.reject(n)}};throw Error("Invalid input: not a Zod schema")}var re=mr(),P=cr(ct(),1),qt=br;const $t=()=>{let r=(0,re.c)(4),a=ne().formState.errors;if(Object.keys(a).length===0)return null;let e;r[0]===a?e=r[1]:(e=Object.values(a).map(Wt).filter(Boolean),r[0]=a,r[1]=e);let t=e.join(", "),s;return r[2]===t?s=r[3]:(s=(0,P.jsx)("div",{className:"text-destructive p-2 rounded-md bg-red-500/10",children:t}),r[2]=t,r[3]=s),s};var $r=x.createContext({}),Ht=r=>{let a=(0,re.c)(10),e;a[0]===r?e=a[1]:({...e}=r,a[0]=r,a[1]=e);let t;a[2]===e.name?t=a[3]:(t={name:e.name},a[2]=e.name,a[3]=t);let s;a[4]===e?s=a[5]:(s=(0,P.jsx)(Ft,{...e}),a[4]=e,a[5]=s);let l;return a[6]!==e.name||a[7]!==t||a[8]!==s?(l=(0,P.jsx)($r,{value:t,children:s},e.name),a[6]=e.name,a[7]=t,a[8]=s,a[9]=l):l=a[9],l},xe=()=>{let r=(0,re.c)(11),a=x.use($r),e=x.use(Hr),{getFieldState:t,formState:s}=ne(),l;r[0]!==a.name||r[1]!==s||r[2]!==t?(l=t(a.name,s),r[0]=a.name,r[1]=s,r[2]=t,r[3]=l):l=r[3];let n=l;if(!a)throw Error("useFormField should be used within <FormField>");let{id:o}=e,f=`${o}-form-item`,c=`${o}-form-item-description`,b=`${o}-form-item-message`,_;return r[4]!==a.name||r[5]!==n||r[6]!==o||r[7]!==f||r[8]!==c||r[9]!==b?(_={id:o,name:a.name,formItemId:f,formDescriptionId:c,formMessageId:b,...n},r[4]=a.name,r[5]=n,r[6]=o,r[7]=f,r[8]=c,r[9]=b,r[10]=_):_=r[10],_},Hr=x.createContext({}),Wr=x.forwardRef((r,a)=>{let e=(0,re.c)(14),t,s;e[0]===r?(t=e[1],s=e[2]):({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s);let l=x.useId(),n;e[3]===l?n=e[4]:(n={id:l},e[3]=l,e[4]=n);let o;e[5]===t?o=e[6]:(o=de("flex flex-col gap-1",t),e[5]=t,e[6]=o);let f;e[7]!==s||e[8]!==a||e[9]!==o?(f=(0,P.jsx)("div",{ref:a,className:o,...s}),e[7]=s,e[8]=a,e[9]=o,e[10]=f):f=e[10];let c;return e[11]!==n||e[12]!==f?(c=(0,P.jsx)(Hr,{value:n,children:f}),e[11]=n,e[12]=f,e[13]=c):c=e[13],c});Wr.displayName="FormItem";var zr=x.forwardRef((r,a)=>{let e=(0,re.c)(11),t,s;e[0]===r?(t=e[1],s=e[2]):({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s);let{error:l,formItemId:n}=xe();if(!s.children)return;let o=l&&"text-destructive",f;e[3]!==t||e[4]!==o?(f=de(o,t),e[3]=t,e[4]=o,e[5]=f):f=e[5];let c;return e[6]!==n||e[7]!==s||e[8]!==a||e[9]!==f?(c=(0,P.jsx)(yt,{ref:a,className:f,htmlFor:n,...s}),e[6]=n,e[7]=s,e[8]=a,e[9]=f,e[10]=c):c=e[10],c});zr.displayName="FormLabel";var Kr=x.forwardRef((r,a)=>{let e=(0,re.c)(8),t;e[0]===r?t=e[1]:({...t}=r,e[0]=r,e[1]=t);let{error:s,formItemId:l,formDescriptionId:n,formMessageId:o}=xe(),f=s?`${n} ${o}`:n,c=!!s,b;return e[2]!==l||e[3]!==t||e[4]!==a||e[5]!==f||e[6]!==c?(b=(0,P.jsx)(ft,{ref:a,id:l,"aria-describedby":f,"aria-invalid":c,...t}),e[2]=l,e[3]=t,e[4]=a,e[5]=f,e[6]=c,e[7]=b):b=e[7],b});Kr.displayName="FormControl";var Gr=x.forwardRef((r,a)=>{let e=(0,re.c)(10),t,s;e[0]===r?(t=e[1],s=e[2]):({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s);let{formDescriptionId:l}=xe();if(!s.children)return null;let n;e[3]===t?n=e[4]:(n=de("text-sm text-muted-foreground",t),e[3]=t,e[4]=n);let o;return e[5]!==l||e[6]!==s||e[7]!==a||e[8]!==n?(o=(0,P.jsx)("p",{ref:a,id:l,className:n,...s}),e[5]=l,e[6]=s,e[7]=a,e[8]=n,e[9]=o):o=e[9],o});Gr.displayName="FormDescription";var Jr=x.forwardRef((r,a)=>{let e=(0,re.c)(12),t,s,l;e[0]===r?(t=e[1],s=e[2],l=e[3]):({className:s,children:t,...l}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l);let{error:n,formMessageId:o}=xe(),f=n!=null&&n.message?String(n==null?void 0:n.message):t;if(!f)return null;let c;e[4]===s?c=e[5]:(c=de("text-xs font-medium text-destructive",s),e[4]=s,e[5]=c);let b;return e[6]!==f||e[7]!==o||e[8]!==l||e[9]!==a||e[10]!==c?(b=(0,P.jsx)("p",{ref:a,id:o,className:c,...l,children:f}),e[6]=f,e[7]=o,e[8]=l,e[9]=a,e[10]=c,e[11]=b):b=e[11],b});Jr.displayName="FormMessage";var Yr=r=>{let a=(0,re.c)(7),{className:e}=r,{error:t}=xe(),s=t!=null&&t.message?String(t==null?void 0:t.message):null;if(!s)return null;let l;a[0]===e?l=a[1]:(l=de("stroke-[1.8px]",e),a[0]=e,a[1]=l);let n;a[2]===l?n=a[3]:(n=(0,P.jsx)(nt,{className:l}),a[2]=l,a[3]=n);let o;return a[4]!==s||a[5]!==n?(o=(0,P.jsx)(gt,{content:s,children:n}),a[4]=s,a[5]=n,a[6]=o):o=a[6],o};Yr.displayName="FormMessageTooltip";function Wt(r){return r==null?void 0:r.message}var rr=mr(),Ne=x.forwardRef((r,a)=>{let e=(0,rr.c)(16),t,s,l;e[0]===r?(t=e[1],s=e[2],l=e[3]):({className:s,bottomAdornment:t,...l}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l);let n;e[4]===s?n=e[5]:(n=de("shadow-xs-solid hover:shadow-sm-solid disabled:shadow-xs-solid focus-visible:shadow-md-solid","flex w-full mb-1 rounded-sm border border-input bg-background px-3 py-2 text-sm font-code ring-offset-background placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:border-accent disabled:cursor-not-allowed disabled:opacity-50 min-h-6",s),e[4]=s,e[5]=n);let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o=pt.stopPropagation(),e[6]=o):o=e[6];let f;e[7]!==l||e[8]!==a||e[9]!==n?(f=(0,P.jsx)("textarea",{className:n,onClick:o,ref:a,...l}),e[7]=l,e[8]=a,e[9]=n,e[10]=f):f=e[10];let c;e[11]===t?c=e[12]:(c=t&&(0,P.jsx)("div",{className:"absolute right-0 bottom-1 flex items-center pr-[6px] pointer-events-none text-muted-foreground h-6",children:t}),e[11]=t,e[12]=c);let b;return e[13]!==f||e[14]!==c?(b=(0,P.jsxs)("div",{className:"relative",children:[f,c]}),e[13]=f,e[14]=c,e[15]=b):b=e[15],b});Ne.displayName="Textarea";const Zr=x.forwardRef((r,a)=>{let e=(0,rr.c)(16),t,s,l;e[0]===r?(t=e[1],s=e[2],l=e[3]):({className:t,onValueChange:s,...l}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l);let n;e[4]!==s||e[5]!==l.delay||e[6]!==l.value?(n={initialValue:l.value,delay:l.delay,onChange:s},e[4]=s,e[5]=l.delay,e[6]=l.value,e[7]=n):n=e[7];let{value:o,onChange:f}=ht(n),c;e[8]===f?c=e[9]:(c=_=>f(_.target.value),e[8]=f,e[9]=c);let b;return e[10]!==t||e[11]!==l||e[12]!==a||e[13]!==c||e[14]!==o?(b=(0,P.jsx)(Ne,{ref:a,className:t,...l,onChange:c,value:o}),e[10]=t,e[11]=l,e[12]=a,e[13]=c,e[14]=o,e[15]=b):b=e[15],b});Zr.displayName="DebouncedTextarea";const Qr=x.forwardRef((r,a)=>{let e=(0,rr.c)(23),t,s,l;e[0]===r?(t=e[1],s=e[2],l=e[3]):({className:t,onValueChange:s,...l}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l);let[n,o]=x.useState(l.value),f;e[4]!==n||e[5]!==s||e[6]!==l.value?(f={prop:l.value,defaultProp:n,onChange:s},e[4]=n,e[5]=s,e[6]=l.value,e[7]=f):f=e[7];let[c,b]=mt(f),_,N;e[8]===c?(_=e[9],N=e[10]):(_=()=>{o(c||"")},N=[c],e[8]=c,e[9]=_,e[10]=N),x.useEffect(_,N);let k;e[11]===Symbol.for("react.memo_cache_sentinel")?(k=j=>o(j.target.value),e[11]=k):k=e[11];let v,h;e[12]!==n||e[13]!==b?(v=()=>b(n),h=j=>{j.ctrlKey&&j.key==="Enter"&&(j.preventDefault(),b(n))},e[12]=n,e[13]=b,e[14]=v,e[15]=h):(v=e[14],h=e[15]);let A;return e[16]!==t||e[17]!==n||e[18]!==l||e[19]!==a||e[20]!==v||e[21]!==h?(A=(0,P.jsx)(Ne,{ref:a,className:t,...l,value:n,onChange:k,onBlur:v,onKeyDown:h}),e[16]=t,e[17]=n,e[18]=l,e[19]=a,e[20]=v,e[21]=h,e[22]=A):A=e[22],A});Qr.displayName="OnBlurredTextarea";export{ne as _,Kr as a,Ht as c,Jr as d,Yr as f,Bt as g,Dt as h,qt as i,Wr as l,br as m,Qr as n,Gr as o,Pt as p,Ne as r,$t as s,Zr as t,zr as u,Fr as v,bt as y};
1
+ import{s as cr}from"./chunk-LvLJmgfZ.js";import{t as lt}from"./react-Bj1aDYRI.js";import{wr as nt}from"./cells-DENsmH9t.js";import{G as ut,K as ot,q as dt}from"./zod-H_cgTO0M.js";import{t as mr}from"./compiler-runtime-B3qBwwSJ.js";import{n as ft}from"./useEventListener-BakX-tnw.js";import{t as de}from"./cn-X2M2usMq.js";import{t as ct}from"./jsx-runtime-PbYoItBR.js";import{y as mt}from"./fullscreen-BXI8V5i6.js";import{t as yt}from"./label-CFvCMYuj.js";import{t as gt}from"./tooltip-CgQpRVyN.js";import{r as pt}from"./button-BF7GSjhW.js";import{t as vt}from"./createLucideIcon-BTp1tQDO.js";import{t as ht}from"./useDebounce-CpLI2dsc.js";var bt=vt("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]),x=cr(lt(),1),pe=r=>r.type==="checkbox",le=r=>r instanceof Date,q=r=>r==null,yr=r=>typeof r=="object",O=r=>!q(r)&&!Array.isArray(r)&&yr(r)&&!le(r),gr=r=>O(r)&&r.target?pe(r.target)?r.target.checked:r.target.value:r,_t=r=>r.substring(0,r.search(/\.\d+(\.|$)/))||r,pr=(r,a)=>r.has(_t(a)),xt=r=>{let a=r.constructor&&r.constructor.prototype;return O(a)&&a.hasOwnProperty("isPrototypeOf")},Te=typeof window<"u"&&window.HTMLElement!==void 0&&typeof document<"u";function B(r){let a,e=Array.isArray(r),t=typeof FileList<"u"?r instanceof FileList:!1;if(r instanceof Date)a=new Date(r);else if(r instanceof Set)a=new Set(r);else if(!(Te&&(r instanceof Blob||t))&&(e||O(r)))if(a=e?[]:{},!e&&!xt(r))a=r;else for(let s in r)r.hasOwnProperty(s)&&(a[s]=B(r[s]));else return r;return a}var ve=r=>Array.isArray(r)?r.filter(Boolean):[],E=r=>r===void 0,m=(r,a,e)=>{if(!a||!O(r))return e;let t=ve(a.split(/[,[\].]+?/)).reduce((s,l)=>q(s)?s:s[l],r);return E(t)||t===r?E(r[a])?e:r[a]:t},G=r=>typeof r=="boolean",Me=r=>/^\w*$/.test(r),vr=r=>ve(r.replace(/["|']|\]/g,"").split(/\.|\[/)),D=(r,a,e)=>{let t=-1,s=Me(a)?[a]:vr(a),l=s.length,n=l-1;for(;++t<l;){let o=s[t],f=e;if(t!==n){let c=r[o];f=O(c)||Array.isArray(c)?c:isNaN(+s[t+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;r[o]=f,r=r[o]}return r},Fe={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},J={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ee={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},hr=x.createContext(null),ne=()=>x.useContext(hr),br=r=>{let{children:a,...e}=r;return x.createElement(hr.Provider,{value:e},a)},_r=(r,a,e,t=!0)=>{let s={defaultValues:a._defaultValues};for(let l in r)Object.defineProperty(s,l,{get:()=>{let n=l;return a._proxyFormState[n]!==J.all&&(a._proxyFormState[n]=!t||J.all),e&&(e[n]=!0),r[n]}});return s},$=r=>O(r)&&!Object.keys(r).length,xr=(r,a,e,t)=>{e(r);let{name:s,...l}=r;return $(l)||Object.keys(l).length>=Object.keys(a).length||Object.keys(l).find(n=>a[n]===(!t||J.all))},H=r=>Array.isArray(r)?r:[r],Vr=(r,a,e)=>!r||!a||r===a||H(r).some(t=>t&&(e?t===a:t.startsWith(a)||a.startsWith(t)));function Se(r){let a=x.useRef(r);a.current=r,x.useEffect(()=>{let e=!r.disabled&&a.current.subject&&a.current.subject.subscribe({next:a.current.next});return()=>{e&&e.unsubscribe()}},[r.disabled])}function Vt(r){let a=ne(),{control:e=a.control,disabled:t,name:s,exact:l}=r||{},[n,o]=x.useState(e._formState),f=x.useRef(!0),c=x.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),b=x.useRef(s);return b.current=s,Se({disabled:t,next:_=>f.current&&Vr(b.current,_.name,l)&&xr(_,c.current,e._updateFormState)&&o({...e._formState,..._}),subject:e._subjects.state}),x.useEffect(()=>(f.current=!0,c.current.isValid&&e._updateValid(!0),()=>{f.current=!1}),[e]),x.useMemo(()=>_r(n,e,c.current,!1),[n,e])}var Z=r=>typeof r=="string",Ar=(r,a,e,t,s)=>Z(r)?(t&&a.watch.add(r),m(e,r,s)):Array.isArray(r)?r.map(l=>(t&&a.watch.add(l),m(e,l))):(t&&(a.watchAll=!0),e);function Fr(r){let a=ne(),{control:e=a.control,name:t,defaultValue:s,disabled:l,exact:n}=r||{},o=x.useRef(t);o.current=t,Se({disabled:l,subject:e._subjects.values,next:b=>{Vr(o.current,b.name,n)&&c(B(Ar(o.current,e._names,b.values||e._formValues,!1,s)))}});let[f,c]=x.useState(e._getWatch(t,s));return x.useEffect(()=>e._removeUnmounted()),f}function At(r){let a=ne(),{name:e,disabled:t,control:s=a.control,shouldUnregister:l}=r,n=pr(s._names.array,e),o=Fr({control:s,name:e,defaultValue:m(s._formValues,e,m(s._defaultValues,e,r.defaultValue)),exact:!0}),f=Vt({control:s,name:e,exact:!0}),c=x.useRef(s.register(e,{...r.rules,value:o,...G(r.disabled)?{disabled:r.disabled}:{}})),b=x.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!m(f.errors,e)},isDirty:{enumerable:!0,get:()=>!!m(f.dirtyFields,e)},isTouched:{enumerable:!0,get:()=>!!m(f.touchedFields,e)},isValidating:{enumerable:!0,get:()=>!!m(f.validatingFields,e)},error:{enumerable:!0,get:()=>m(f.errors,e)}}),[f,e]),_=x.useMemo(()=>({name:e,value:o,...G(t)||f.disabled?{disabled:f.disabled||t}:{},onChange:N=>c.current.onChange({target:{value:gr(N),name:e},type:Fe.CHANGE}),onBlur:()=>c.current.onBlur({target:{value:m(s._formValues,e),name:e},type:Fe.BLUR}),ref:N=>{let k=m(s._fields,e);k&&N&&(k._f.ref={focus:()=>N.focus(),select:()=>N.select(),setCustomValidity:v=>N.setCustomValidity(v),reportValidity:()=>N.reportValidity()})}}),[e,s._formValues,t,f.disabled,o,s._fields]);return x.useEffect(()=>{let N=s._options.shouldUnregister||l,k=(v,h)=>{let A=m(s._fields,v);A&&A._f&&(A._f.mount=h)};if(k(e,!0),N){let v=B(m(s._options.defaultValues,e));D(s._defaultValues,e,v),E(m(s._formValues,e))&&D(s._formValues,e,v)}return!n&&s.register(e),()=>{(n?N&&!s._state.action:N)?s.unregister(e):k(e,!1)}},[e,s,n,l]),x.useEffect(()=>{s._updateDisabledField({disabled:t,fields:s._fields,name:e})},[t,e,s]),x.useMemo(()=>({field:_,formState:f,fieldState:b}),[_,f,b])}var Ft=r=>r.render(At(r)),Be=(r,a,e,t,s)=>a?{...e[r],types:{...e[r]&&e[r].types?e[r].types:{},[t]:s||!0}}:{},ae=()=>{let r=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,a=>{let e=(Math.random()*16+r)%16|0;return(a=="x"?e:e&3|8).toString(16)})},Le=(r,a,e={})=>e.shouldFocus||E(e.shouldFocus)?e.focusName||`${r}.${E(e.focusIndex)?a:e.focusIndex}.`:"",he=r=>({isOnSubmit:!r||r===J.onSubmit,isOnBlur:r===J.onBlur,isOnChange:r===J.onChange,isOnAll:r===J.all,isOnTouch:r===J.onTouched}),Re=(r,a,e)=>!e&&(a.watchAll||a.watch.has(r)||[...a.watch].some(t=>r.startsWith(t)&&/^\.\w+/.test(r.slice(t.length)))),fe=(r,a,e,t)=>{for(let s of e||Object.keys(r)){let l=m(r,s);if(l){let{_f:n,...o}=l;if(n){if(n.refs&&n.refs[0]&&a(n.refs[0],s)&&!t||n.ref&&a(n.ref,n.name)&&!t)return!0;if(fe(o,a))break}else if(O(o)&&fe(o,a))break}}},Sr=(r,a,e)=>{let t=H(m(r,e));return D(t,"root",a[e]),D(r,e,t),r},Ie=r=>r.type==="file",Q=r=>typeof r=="function",we=r=>{if(!Te)return!1;let a=r?r.ownerDocument:0;return r instanceof(a&&a.defaultView?a.defaultView.HTMLElement:HTMLElement)},ke=r=>Z(r),Pe=r=>r.type==="radio",De=r=>r instanceof RegExp,wr={value:!1,isValid:!1},kr={value:!0,isValid:!0},Dr=r=>{if(Array.isArray(r)){if(r.length>1){let a=r.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:a,isValid:!!a.length}}return r[0].checked&&!r[0].disabled?r[0].attributes&&!E(r[0].attributes.value)?E(r[0].value)||r[0].value===""?kr:{value:r[0].value,isValid:!0}:kr:wr}return wr},jr={isValid:!1,value:null},Nr=r=>Array.isArray(r)?r.reduce((a,e)=>e&&e.checked&&!e.disabled?{isValid:!0,value:e.value}:a,jr):jr;function Cr(r,a,e="validate"){if(ke(r)||Array.isArray(r)&&r.every(ke)||G(r)&&!r)return{type:e,message:ke(r)?r:"",ref:a}}var ce=r=>O(r)&&!De(r)?r:{value:r,message:""},qe=async(r,a,e,t,s,l)=>{let{ref:n,refs:o,required:f,maxLength:c,minLength:b,min:_,max:N,pattern:k,validate:v,name:h,valueAsNumber:A,mount:j}=r._f,w=m(e,h);if(!j||a.has(h))return{};let W=o?o[0]:n,X=F=>{s&&W.reportValidity&&(W.setCustomValidity(G(F)?"":F||""),W.reportValidity())},T={},ue=Pe(n),Ve=pe(n),ie=ue||Ve,oe=(A||Ie(n))&&E(n.value)&&E(w)||we(n)&&n.value===""||w===""||Array.isArray(w)&&!w.length,z=Be.bind(null,h,t,T),Ae=(F,C,M,R=ee.maxLength,Y=ee.minLength)=>{let K=F?C:M;T[h]={type:F?R:Y,message:K,ref:n,...z(F?R:Y,K)}};if(l?!Array.isArray(w)||!w.length:f&&(!ie&&(oe||q(w))||G(w)&&!w||Ve&&!Dr(o).isValid||ue&&!Nr(o).isValid)){let{value:F,message:C}=ke(f)?{value:!!f,message:f}:ce(f);if(F&&(T[h]={type:ee.required,message:C,ref:W,...z(ee.required,C)},!t))return X(C),T}if(!oe&&(!q(_)||!q(N))){let F,C,M=ce(N),R=ce(_);if(!q(w)&&!isNaN(w)){let Y=n.valueAsNumber||w&&+w;q(M.value)||(F=Y>M.value),q(R.value)||(C=Y<R.value)}else{let Y=n.valueAsDate||new Date(w),K=ge=>new Date(new Date().toDateString()+" "+ge),me=n.type=="time",ye=n.type=="week";Z(M.value)&&w&&(F=me?K(w)>K(M.value):ye?w>M.value:Y>new Date(M.value)),Z(R.value)&&w&&(C=me?K(w)<K(R.value):ye?w<R.value:Y<new Date(R.value))}if((F||C)&&(Ae(!!F,M.message,R.message,ee.max,ee.min),!t))return X(T[h].message),T}if((c||b)&&!oe&&(Z(w)||l&&Array.isArray(w))){let F=ce(c),C=ce(b),M=!q(F.value)&&w.length>+F.value,R=!q(C.value)&&w.length<+C.value;if((M||R)&&(Ae(M,F.message,C.message),!t))return X(T[h].message),T}if(k&&!oe&&Z(w)){let{value:F,message:C}=ce(k);if(De(F)&&!w.match(F)&&(T[h]={type:ee.pattern,message:C,ref:n,...z(ee.pattern,C)},!t))return X(C),T}if(v){if(Q(v)){let F=Cr(await v(w,e),W);if(F&&(T[h]={...F,...z(ee.validate,F.message)},!t))return X(F.message),T}else if(O(v)){let F={};for(let C in v){if(!$(F)&&!t)break;let M=Cr(await v[C](w,e),W,C);M&&(F={...M,...z(C,M.message)},X(M.message),t&&(T[h]=F))}if(!$(F)&&(T[h]={ref:W,...F},!t))return T}}return X(!0),T},$e=(r,a)=>[...r,...H(a)],He=r=>Array.isArray(r)?r.map(()=>{}):void 0;function We(r,a,e){return[...r.slice(0,a),...H(e),...r.slice(a)]}var ze=(r,a,e)=>Array.isArray(r)?(E(r[e])&&(r[e]=void 0),r.splice(e,0,r.splice(a,1)[0]),r):[],Ke=(r,a)=>[...H(a),...H(r)];function St(r,a){let e=0,t=[...r];for(let s of a)t.splice(s-e,1),e++;return ve(t).length?t:[]}var Ge=(r,a)=>E(a)?[]:St(r,H(a).sort((e,t)=>e-t)),Je=(r,a,e)=>{[r[a],r[e]]=[r[e],r[a]]};function wt(r,a){let e=a.slice(0,-1).length,t=0;for(;t<e;)r=E(r)?t++:r[a[t++]];return r}function kt(r){for(let a in r)if(r.hasOwnProperty(a)&&!E(r[a]))return!1;return!0}function U(r,a){let e=Array.isArray(a)?a:Me(a)?[a]:vr(a),t=e.length===1?r:wt(r,e),s=e.length-1,l=e[s];return t&&delete t[l],s!==0&&(O(t)&&$(t)||Array.isArray(t)&&kt(t))&&U(r,e.slice(0,-1)),r}var Er=(r,a,e)=>(r[a]=e,r);function Dt(r){let a=ne(),{control:e=a.control,name:t,keyName:s="id",shouldUnregister:l,rules:n}=r,[o,f]=x.useState(e._getFieldArray(t)),c=x.useRef(e._getFieldArray(t).map(ae)),b=x.useRef(o),_=x.useRef(t),N=x.useRef(!1);_.current=t,b.current=o,e._names.array.add(t),n&&e.register(t,n),Se({next:({values:v,name:h})=>{if(h===_.current||!h){let A=m(v,_.current);Array.isArray(A)&&(f(A),c.current=A.map(ae))}},subject:e._subjects.array});let k=x.useCallback(v=>{N.current=!0,e._updateFieldArray(t,v)},[e,t]);return x.useEffect(()=>{if(e._state.action=!1,Re(t,e._names)&&e._subjects.state.next({...e._formState}),N.current&&(!he(e._options.mode).isOnSubmit||e._formState.isSubmitted))if(e._options.resolver)e._executeSchema([t]).then(v=>{let h=m(v.errors,t),A=m(e._formState.errors,t);(A?!h&&A.type||h&&(A.type!==h.type||A.message!==h.message):h&&h.type)&&(h?D(e._formState.errors,t,h):U(e._formState.errors,t),e._subjects.state.next({errors:e._formState.errors}))});else{let v=m(e._fields,t);v&&v._f&&!(he(e._options.reValidateMode).isOnSubmit&&he(e._options.mode).isOnSubmit)&&qe(v,e._names.disabled,e._formValues,e._options.criteriaMode===J.all,e._options.shouldUseNativeValidation,!0).then(h=>!$(h)&&e._subjects.state.next({errors:Sr(e._formState.errors,h,t)}))}e._subjects.values.next({name:t,values:{...e._formValues}}),e._names.focus&&fe(e._fields,(v,h)=>{if(e._names.focus&&h.startsWith(e._names.focus)&&v.focus)return v.focus(),1}),e._names.focus="",e._updateValid(),N.current=!1},[o,t,e]),x.useEffect(()=>(!m(e._formValues,t)&&e._updateFieldArray(t),()=>{(e._options.shouldUnregister||l)&&e.unregister(t)}),[t,e,s,l]),{swap:x.useCallback((v,h)=>{let A=e._getFieldArray(t);Je(A,v,h),Je(c.current,v,h),k(A),f(A),e._updateFieldArray(t,A,Je,{argA:v,argB:h},!1)},[k,t,e]),move:x.useCallback((v,h)=>{let A=e._getFieldArray(t);ze(A,v,h),ze(c.current,v,h),k(A),f(A),e._updateFieldArray(t,A,ze,{argA:v,argB:h},!1)},[k,t,e]),prepend:x.useCallback((v,h)=>{let A=H(B(v)),j=Ke(e._getFieldArray(t),A);e._names.focus=Le(t,0,h),c.current=Ke(c.current,A.map(ae)),k(j),f(j),e._updateFieldArray(t,j,Ke,{argA:He(v)})},[k,t,e]),append:x.useCallback((v,h)=>{let A=H(B(v)),j=$e(e._getFieldArray(t),A);e._names.focus=Le(t,j.length-1,h),c.current=$e(c.current,A.map(ae)),k(j),f(j),e._updateFieldArray(t,j,$e,{argA:He(v)})},[k,t,e]),remove:x.useCallback(v=>{let h=Ge(e._getFieldArray(t),v);c.current=Ge(c.current,v),k(h),f(h),!Array.isArray(m(e._fields,t))&&D(e._fields,t,void 0),e._updateFieldArray(t,h,Ge,{argA:v})},[k,t,e]),insert:x.useCallback((v,h,A)=>{let j=H(B(h)),w=We(e._getFieldArray(t),v,j);e._names.focus=Le(t,v,A),c.current=We(c.current,v,j.map(ae)),k(w),f(w),e._updateFieldArray(t,w,We,{argA:v,argB:He(h)})},[k,t,e]),update:x.useCallback((v,h)=>{let A=B(h),j=Er(e._getFieldArray(t),v,A);c.current=[...j].map((w,W)=>!w||W===v?ae():c.current[W]),k(j),f([...j]),e._updateFieldArray(t,j,Er,{argA:v,argB:A},!0,!1)},[k,t,e]),replace:x.useCallback(v=>{let h=H(B(v));c.current=h.map(ae),k([...h]),f([...h]),e._updateFieldArray(t,[...h],A=>A,{},!0,!1)},[k,t,e]),fields:x.useMemo(()=>o.map((v,h)=>({...v,[s]:c.current[h]||ae()})),[o,s])}}var Ye=()=>{let r=[];return{get observers(){return r},next:a=>{for(let e of r)e.next&&e.next(a)},subscribe:a=>(r.push(a),{unsubscribe:()=>{r=r.filter(e=>e!==a)}}),unsubscribe:()=>{r=[]}}},Ze=r=>q(r)||!yr(r);function se(r,a){if(Ze(r)||Ze(a))return r===a;if(le(r)&&le(a))return r.getTime()===a.getTime();let e=Object.keys(r),t=Object.keys(a);if(e.length!==t.length)return!1;for(let s of e){let l=r[s];if(!t.includes(s))return!1;if(s!=="ref"){let n=a[s];if(le(l)&&le(n)||O(l)&&O(n)||Array.isArray(l)&&Array.isArray(n)?!se(l,n):l!==n)return!1}}return!0}var Or=r=>r.type==="select-multiple",jt=r=>Pe(r)||pe(r),Qe=r=>we(r)&&r.isConnected,Ur=r=>{for(let a in r)if(Q(r[a]))return!0;return!1};function je(r,a={}){let e=Array.isArray(r);if(O(r)||e)for(let t in r)Array.isArray(r[t])||O(r[t])&&!Ur(r[t])?(a[t]=Array.isArray(r[t])?[]:{},je(r[t],a[t])):q(r[t])||(a[t]=!0);return a}function Tr(r,a,e){let t=Array.isArray(r);if(O(r)||t)for(let s in r)Array.isArray(r[s])||O(r[s])&&!Ur(r[s])?E(a)||Ze(e[s])?e[s]=Array.isArray(r[s])?je(r[s],[]):{...je(r[s])}:Tr(r[s],q(a)?{}:a[s],e[s]):e[s]=!se(r[s],a[s]);return e}var be=(r,a)=>Tr(r,a,je(a)),Mr=(r,{valueAsNumber:a,valueAsDate:e,setValueAs:t})=>E(r)?r:a?r===""?NaN:r&&+r:e&&Z(r)?new Date(r):t?t(r):r;function Xe(r){let a=r.ref;return Ie(a)?a.files:Pe(a)?Nr(r.refs).value:Or(a)?[...a.selectedOptions].map(({value:e})=>e):pe(a)?Dr(r.refs).value:Mr(E(a.value)?r.ref.value:a.value,r)}var Nt=(r,a,e,t)=>{let s={};for(let l of r){let n=m(a,l);n&&D(s,l,n._f)}return{criteriaMode:e,names:[...r],fields:s,shouldUseNativeValidation:t}},_e=r=>E(r)?r:De(r)?r.source:O(r)?De(r.value)?r.value.source:r.value:r,Br="AsyncFunction",Ct=r=>!!r&&!!r.validate&&!!(Q(r.validate)&&r.validate.constructor.name===Br||O(r.validate)&&Object.values(r.validate).find(a=>a.constructor.name===Br)),Et=r=>r.mount&&(r.required||r.min||r.max||r.maxLength||r.minLength||r.pattern||r.validate);function Lr(r,a,e){let t=m(r,e);if(t||Me(e))return{error:t,name:e};let s=e.split(".");for(;s.length;){let l=s.join("."),n=m(a,l),o=m(r,l);if(n&&!Array.isArray(n)&&e!==l)return{name:e};if(o&&o.type)return{name:l,error:o};s.pop()}return{name:e}}var Ot=(r,a,e,t,s)=>s.isOnAll?!1:!e&&s.isOnTouch?!(a||r):(e?t.isOnBlur:s.isOnBlur)?!r:(e?t.isOnChange:s.isOnChange)?r:!0,Ut=(r,a)=>!ve(m(r,a)).length&&U(r,a),Tt={mode:J.onSubmit,reValidateMode:J.onChange,shouldFocusError:!0};function Mt(r={}){let a={...Tt,...r},e={submitCount:0,isDirty:!1,isLoading:Q(a.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:a.errors||{},disabled:a.disabled||!1},t={},s=(O(a.defaultValues)||O(a.values))&&B(a.defaultValues||a.values)||{},l=a.shouldUnregister?{}:B(s),n={action:!1,mount:!1,watch:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},f,c=0,b={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},_={values:Ye(),array:Ye(),state:Ye()},N=he(a.mode),k=he(a.reValidateMode),v=a.criteriaMode===J.all,h=i=>u=>{clearTimeout(c),c=setTimeout(i,u)},A=async i=>{if(!a.disabled&&(b.isValid||i)){let u=a.resolver?$((await ie()).errors):await z(t,!0);u!==e.isValid&&_.state.next({isValid:u})}},j=(i,u)=>{!a.disabled&&(b.isValidating||b.validatingFields)&&((i||Array.from(o.mount)).forEach(d=>{d&&(u?D(e.validatingFields,d,u):U(e.validatingFields,d))}),_.state.next({validatingFields:e.validatingFields,isValidating:!$(e.validatingFields)}))},w=(i,u=[],d,p,g=!0,y=!0)=>{if(p&&d&&!a.disabled){if(n.action=!0,y&&Array.isArray(m(t,i))){let V=d(m(t,i),p.argA,p.argB);g&&D(t,i,V)}if(y&&Array.isArray(m(e.errors,i))){let V=d(m(e.errors,i),p.argA,p.argB);g&&D(e.errors,i,V),Ut(e.errors,i)}if(b.touchedFields&&y&&Array.isArray(m(e.touchedFields,i))){let V=d(m(e.touchedFields,i),p.argA,p.argB);g&&D(e.touchedFields,i,V)}b.dirtyFields&&(e.dirtyFields=be(s,l)),_.state.next({name:i,isDirty:F(i,u),dirtyFields:e.dirtyFields,errors:e.errors,isValid:e.isValid})}else D(l,i,u)},W=(i,u)=>{D(e.errors,i,u),_.state.next({errors:e.errors})},X=i=>{e.errors=i,_.state.next({errors:e.errors,isValid:!1})},T=(i,u,d,p)=>{let g=m(t,i);if(g){let y=m(l,i,E(d)?m(s,i):d);E(y)||p&&p.defaultChecked||u?D(l,i,u?y:Xe(g._f)):R(i,y),n.mount&&A()}},ue=(i,u,d,p,g)=>{let y=!1,V=!1,S={name:i};if(!a.disabled){let I=!!(m(t,i)&&m(t,i)._f&&m(t,i)._f.disabled);if(!d||p){b.isDirty&&(V=e.isDirty,e.isDirty=S.isDirty=F(),y=V!==S.isDirty);let L=I||se(m(s,i),u);V=!!(!I&&m(e.dirtyFields,i)),L||I?U(e.dirtyFields,i):D(e.dirtyFields,i,!0),S.dirtyFields=e.dirtyFields,y||(y=b.dirtyFields&&V!==!L)}if(d){let L=m(e.touchedFields,i);L||(D(e.touchedFields,i,d),S.touchedFields=e.touchedFields,y||(y=b.touchedFields&&L!==d))}y&&g&&_.state.next(S)}return y?S:{}},Ve=(i,u,d,p)=>{let g=m(e.errors,i),y=b.isValid&&G(u)&&e.isValid!==u;if(a.delayError&&d?(f=h(()=>W(i,d)),f(a.delayError)):(clearTimeout(c),f=null,d?D(e.errors,i,d):U(e.errors,i)),(d?!se(g,d):g)||!$(p)||y){let V={...p,...y&&G(u)?{isValid:u}:{},errors:e.errors,name:i};e={...e,...V},_.state.next(V)}},ie=async i=>{j(i,!0);let u=await a.resolver(l,a.context,Nt(i||o.mount,t,a.criteriaMode,a.shouldUseNativeValidation));return j(i),u},oe=async i=>{let{errors:u}=await ie(i);if(i)for(let d of i){let p=m(u,d);p?D(e.errors,d,p):U(e.errors,d)}else e.errors=u;return u},z=async(i,u,d={valid:!0})=>{for(let p in i){let g=i[p];if(g){let{_f:y,...V}=g;if(y){let S=o.array.has(y.name),I=g._f&&Ct(g._f);I&&b.validatingFields&&j([p],!0);let L=await qe(g,o.disabled,l,v,a.shouldUseNativeValidation&&!u,S);if(I&&b.validatingFields&&j([p]),L[y.name]&&(d.valid=!1,u))break;!u&&(m(L,y.name)?S?Sr(e.errors,L,y.name):D(e.errors,y.name,L[y.name]):U(e.errors,y.name))}!$(V)&&await z(V,u,d)}}return d.valid},Ae=()=>{for(let i of o.unMount){let u=m(t,i);u&&(u._f.refs?u._f.refs.every(d=>!Qe(d)):!Qe(u._f.ref))&&Ce(i)}o.unMount=new Set},F=(i,u)=>!a.disabled&&(i&&u&&D(l,i,u),!se(tr(),s)),C=(i,u,d)=>Ar(i,o,{...n.mount?l:E(u)?s:Z(i)?{[i]:u}:u},d,u),M=i=>ve(m(n.mount?l:s,i,a.shouldUnregister?m(s,i,[]):[])),R=(i,u,d={})=>{let p=m(t,i),g=u;if(p){let y=p._f;y&&(!y.disabled&&D(l,i,Mr(u,y)),g=we(y.ref)&&q(u)?"":u,Or(y.ref)?[...y.ref.options].forEach(V=>V.selected=g.includes(V.value)):y.refs?pe(y.ref)?y.refs.length>1?y.refs.forEach(V=>(!V.defaultChecked||!V.disabled)&&(V.checked=Array.isArray(g)?!!g.find(S=>S===V.value):g===V.value)):y.refs[0]&&(y.refs[0].checked=!!g):y.refs.forEach(V=>V.checked=V.value===g):Ie(y.ref)?y.ref.value="":(y.ref.value=g,y.ref.type||_.values.next({name:i,values:{...l}})))}(d.shouldDirty||d.shouldTouch)&&ue(i,g,d.shouldTouch,d.shouldDirty,!0),d.shouldValidate&&ge(i)},Y=(i,u,d)=>{for(let p in u){let g=u[p],y=`${i}.${p}`,V=m(t,y);(o.array.has(i)||O(g)||V&&!V._f)&&!le(g)?Y(y,g,d):R(y,g,d)}},K=(i,u,d={})=>{let p=m(t,i),g=o.array.has(i),y=B(u);D(l,i,y),g?(_.array.next({name:i,values:{...l}}),(b.isDirty||b.dirtyFields)&&d.shouldDirty&&_.state.next({name:i,dirtyFields:be(s,l),isDirty:F(i,y)})):p&&!p._f&&!q(y)?Y(i,y,d):R(i,y,d),Re(i,o)&&_.state.next({...e}),_.values.next({name:n.mount?i:void 0,values:{...l}})},me=async i=>{n.mount=!0;let u=i.target,d=u.name,p=!0,g=m(t,d),y=()=>u.type?Xe(g._f):gr(i),V=S=>{p=Number.isNaN(S)||le(S)&&isNaN(S.getTime())||se(S,m(l,d,S))};if(g){let S,I,L=y(),te=i.type===Fe.BLUR||i.type===Fe.FOCUS_OUT,at=!Et(g._f)&&!a.resolver&&!m(e.errors,d)&&!g._f.deps||Ot(te,m(e.touchedFields,d),e.isSubmitted,k,N),Oe=Re(d,o,te);D(l,d,L),te?(g._f.onBlur&&g._f.onBlur(i),f&&f(0)):g._f.onChange&&g._f.onChange(i);let Ue=ue(d,L,te,!1),st=!$(Ue)||Oe;if(!te&&_.values.next({name:d,type:i.type,values:{...l}}),at)return b.isValid&&(a.mode==="onBlur"&&te?A():te||A()),st&&_.state.next({name:d,...Oe?{}:Ue});if(!te&&Oe&&_.state.next({...e}),a.resolver){let{errors:dr}=await ie([d]);if(V(L),p){let it=Lr(e.errors,t,d),fr=Lr(dr,t,it.name||d);S=fr.error,d=fr.name,I=$(dr)}}else j([d],!0),S=(await qe(g,o.disabled,l,v,a.shouldUseNativeValidation))[d],j([d]),V(L),p&&(S?I=!1:b.isValid&&(I=await z(t,!0)));p&&(g._f.deps&&ge(g._f.deps),Ve(d,I,S,Ue))}},ye=(i,u)=>{if(m(e.errors,u)&&i.focus)return i.focus(),1},ge=async(i,u={})=>{let d,p,g=H(i);if(a.resolver){let y=await oe(E(i)?i:g);d=$(y),p=i?!g.some(V=>m(y,V)):d}else i?(p=(await Promise.all(g.map(async y=>{let V=m(t,y);return await z(V&&V._f?{[y]:V}:V)}))).every(Boolean),!(!p&&!e.isValid)&&A()):p=d=await z(t);return _.state.next({...!Z(i)||b.isValid&&d!==e.isValid?{}:{name:i},...a.resolver||!i?{isValid:d}:{},errors:e.errors}),u.shouldFocus&&!p&&fe(t,ye,i?g:o.mount),p},tr=i=>{let u={...n.mount?l:s};return E(i)?u:Z(i)?m(u,i):i.map(d=>m(u,d))},ar=(i,u)=>({invalid:!!m((u||e).errors,i),isDirty:!!m((u||e).dirtyFields,i),error:m((u||e).errors,i),isValidating:!!m(e.validatingFields,i),isTouched:!!m((u||e).touchedFields,i)}),Xr=i=>{i&&H(i).forEach(u=>U(e.errors,u)),_.state.next({errors:i?e.errors:{}})},sr=(i,u,d)=>{let p=(m(t,i,{_f:{}})._f||{}).ref,{ref:g,message:y,type:V,...S}=m(e.errors,i)||{};D(e.errors,i,{...S,...u,ref:p}),_.state.next({name:i,errors:e.errors,isValid:!1}),d&&d.shouldFocus&&p&&p.focus&&p.focus()},et=(i,u)=>Q(i)?_.values.subscribe({next:d=>i(C(void 0,u),d)}):C(i,u,!0),Ce=(i,u={})=>{for(let d of i?H(i):o.mount)o.mount.delete(d),o.array.delete(d),u.keepValue||(U(t,d),U(l,d)),!u.keepError&&U(e.errors,d),!u.keepDirty&&U(e.dirtyFields,d),!u.keepTouched&&U(e.touchedFields,d),!u.keepIsValidating&&U(e.validatingFields,d),!a.shouldUnregister&&!u.keepDefaultValue&&U(s,d);_.values.next({values:{...l}}),_.state.next({...e,...u.keepDirty?{isDirty:F()}:{}}),!u.keepIsValid&&A()},ir=({disabled:i,name:u,field:d,fields:p})=>{(G(i)&&n.mount||i||o.disabled.has(u))&&(i?o.disabled.add(u):o.disabled.delete(u),ue(u,Xe(d?d._f:m(p,u)._f),!1,!1,!0))},Ee=(i,u={})=>{let d=m(t,i),p=G(u.disabled)||G(a.disabled);return D(t,i,{...d||{},_f:{...d&&d._f?d._f:{ref:{name:i}},name:i,mount:!0,...u}}),o.mount.add(i),d?ir({field:d,disabled:G(u.disabled)?u.disabled:a.disabled,name:i}):T(i,!0,u.value),{...p?{disabled:u.disabled||a.disabled}:{},...a.progressive?{required:!!u.required,min:_e(u.min),max:_e(u.max),minLength:_e(u.minLength),maxLength:_e(u.maxLength),pattern:_e(u.pattern)}:{},name:i,onChange:me,onBlur:me,ref:g=>{if(g){Ee(i,u),d=m(t,i);let y=E(g.value)&&g.querySelectorAll&&g.querySelectorAll("input,select,textarea")[0]||g,V=jt(y),S=d._f.refs||[];if(V?S.find(I=>I===y):y===d._f.ref)return;D(t,i,{_f:{...d._f,...V?{refs:[...S.filter(Qe),y,...Array.isArray(m(s,i))?[{}]:[]],ref:{type:y.type,name:i}}:{ref:y}}}),T(i,!1,void 0,y)}else d=m(t,i,{}),d._f&&(d._f.mount=!1),(a.shouldUnregister||u.shouldUnregister)&&!(pr(o.array,i)&&n.action)&&o.unMount.add(i)}}},lr=()=>a.shouldFocusError&&fe(t,ye,o.mount),rt=i=>{G(i)&&(_.state.next({disabled:i}),fe(t,(u,d)=>{let p=m(t,d);p&&(u.disabled=p._f.disabled||i,Array.isArray(p._f.refs)&&p._f.refs.forEach(g=>{g.disabled=p._f.disabled||i}))},0,!1))},nr=(i,u)=>async d=>{let p;d&&(d.preventDefault&&d.preventDefault(),d.persist&&d.persist());let g=B(l);if(o.disabled.size)for(let y of o.disabled)D(g,y,void 0);if(_.state.next({isSubmitting:!0}),a.resolver){let{errors:y,values:V}=await ie();e.errors=y,g=V}else await z(t);if(U(e.errors,"root"),$(e.errors)){_.state.next({errors:{}});try{await i(g,d)}catch(y){p=y}}else u&&await u({...e.errors},d),lr(),setTimeout(lr);if(_.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:$(e.errors)&&!p,submitCount:e.submitCount+1,errors:e.errors}),p)throw p},tt=(i,u={})=>{m(t,i)&&(E(u.defaultValue)?K(i,B(m(s,i))):(K(i,u.defaultValue),D(s,i,B(u.defaultValue))),u.keepTouched||U(e.touchedFields,i),u.keepDirty||(U(e.dirtyFields,i),e.isDirty=u.defaultValue?F(i,B(m(s,i))):F()),u.keepError||(U(e.errors,i),b.isValid&&A()),_.state.next({...e}))},ur=(i,u={})=>{let d=i?B(i):s,p=B(d),g=$(i),y=g?s:p;if(u.keepDefaultValues||(s=d),!u.keepValues){if(u.keepDirtyValues){let V=new Set([...o.mount,...Object.keys(be(s,l))]);for(let S of Array.from(V))m(e.dirtyFields,S)?D(y,S,m(l,S)):K(S,m(y,S))}else{if(Te&&E(i))for(let V of o.mount){let S=m(t,V);if(S&&S._f){let I=Array.isArray(S._f.refs)?S._f.refs[0]:S._f.ref;if(we(I)){let L=I.closest("form");if(L){L.reset();break}}}}t={}}l=a.shouldUnregister?u.keepDefaultValues?B(s):{}:B(y),_.array.next({values:{...y}}),_.values.next({values:{...y}})}o={mount:u.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},n.mount=!b.isValid||!!u.keepIsValid||!!u.keepDirtyValues,n.watch=!!a.shouldUnregister,_.state.next({submitCount:u.keepSubmitCount?e.submitCount:0,isDirty:g?!1:u.keepDirty?e.isDirty:!!(u.keepDefaultValues&&!se(i,s)),isSubmitted:u.keepIsSubmitted?e.isSubmitted:!1,dirtyFields:g?{}:u.keepDirtyValues?u.keepDefaultValues&&l?be(s,l):e.dirtyFields:u.keepDefaultValues&&i?be(s,i):u.keepDirty?e.dirtyFields:{},touchedFields:u.keepTouched?e.touchedFields:{},errors:u.keepErrors?e.errors:{},isSubmitSuccessful:u.keepIsSubmitSuccessful?e.isSubmitSuccessful:!1,isSubmitting:!1})},or=(i,u)=>ur(Q(i)?i(l):i,u);return{control:{register:Ee,unregister:Ce,getFieldState:ar,handleSubmit:nr,setError:sr,_executeSchema:ie,_getWatch:C,_getDirty:F,_updateValid:A,_removeUnmounted:Ae,_updateFieldArray:w,_updateDisabledField:ir,_getFieldArray:M,_reset:ur,_resetDefaultValues:()=>Q(a.defaultValues)&&a.defaultValues().then(i=>{or(i,a.resetOptions),_.state.next({isLoading:!1})}),_updateFormState:i=>{e={...e,...i}},_disableForm:rt,_subjects:_,_proxyFormState:b,_setErrors:X,get _fields(){return t},get _formValues(){return l},get _state(){return n},set _state(i){n=i},get _defaultValues(){return s},get _names(){return o},set _names(i){o=i},get _formState(){return e},set _formState(i){e=i},get _options(){return a},set _options(i){a={...a,...i}}},trigger:ge,register:Ee,handleSubmit:nr,watch:et,setValue:K,getValues:tr,reset:or,resetField:tt,clearErrors:Xr,unregister:Ce,setError:sr,setFocus:(i,u={})=>{let d=m(t,i),p=d&&d._f;if(p){let g=p.refs?p.refs[0]:p.ref;g.focus&&(g.focus(),u.shouldSelect&&Q(g.select)&&g.select())}},getFieldState:ar}}function Bt(r={}){let a=x.useRef(void 0),e=x.useRef(void 0),[t,s]=x.useState({isDirty:!1,isValidating:!1,isLoading:Q(r.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1,defaultValues:Q(r.defaultValues)?void 0:r.defaultValues});a.current||(a.current={...Mt(r),formState:t});let l=a.current.control;return l._options=r,Se({subject:l._subjects.state,next:n=>{xr(n,l._proxyFormState,l._updateFormState,!0)&&s({...l._formState})}}),x.useEffect(()=>l._disableForm(r.disabled),[l,r.disabled]),x.useEffect(()=>{if(l._proxyFormState.isDirty){let n=l._getDirty();n!==t.isDirty&&l._subjects.state.next({isDirty:n})}},[l,t.isDirty]),x.useEffect(()=>{r.values&&!se(r.values,e.current)?(l._reset(r.values,l._options.resetOptions),e.current=r.values,s(n=>({...n}))):l._resetDefaultValues()},[r.values,l]),x.useEffect(()=>{r.errors&&l._setErrors(r.errors)},[r.errors,l]),x.useEffect(()=>{l._state.mount||(l._updateValid(),l._state.mount=!0),l._state.watch&&(l._state.watch=!1,l._subjects.state.next({...l._formState})),l._removeUnmounted()}),x.useEffect(()=>{r.shouldUnregister&&l._subjects.values.next({values:l._getWatch()})},[r.shouldUnregister,l]),a.current.formState=_r(t,l),a.current}var Rr=(r,a,e)=>{if(r&&"reportValidity"in r){let t=m(e,a);r.setCustomValidity(t&&t.message||""),r.reportValidity()}},er=(r,a)=>{for(let e in a.fields){let t=a.fields[e];t&&t.ref&&"reportValidity"in t.ref?Rr(t.ref,e,r):t&&t.refs&&t.refs.forEach(s=>Rr(s,e,r))}},Ir=(r,a)=>{a.shouldUseNativeValidation&&er(r,a);let e={};for(let t in r){let s=m(a.fields,t),l=Object.assign(r[t]||{},{ref:s&&s.ref});if(Lt(a.names||Object.keys(r),t)){let n=Object.assign({},m(e,t));D(n,"root",l),D(e,t,n)}else D(e,t,l)}return e},Lt=(r,a)=>{let e=Pr(a);return r.some(t=>Pr(t).match(`^${e}\\.\\d+`))};function Pr(r){return r.replace(/\]|\[/g,"")}function qr(r,a){try{var e=r()}catch(t){return a(t)}return e&&e.then?e.then(void 0,a):e}function Rt(r,a){for(var e={};r.length;){var t=r[0],s=t.code,l=t.message,n=t.path.join(".");if(!e[n])if("unionErrors"in t){var o=t.unionErrors[0].errors[0];e[n]={message:o.message,type:o.code}}else e[n]={message:l,type:s};if("unionErrors"in t&&t.unionErrors.forEach(function(b){return b.errors.forEach(function(_){return r.push(_)})}),a){var f=e[n].types,c=f&&f[t.code];e[n]=Be(n,a,e,s,c?[].concat(c,t.message):t.message)}r.shift()}return e}function It(r,a){for(var e={};r.length;){var t=r[0],s=t.code,l=t.message,n=t.path.join(".");if(!e[n])if(t.code==="invalid_union"&&t.errors.length>0){var o=t.errors[0][0];e[n]={message:o.message,type:o.code}}else e[n]={message:l,type:s};if(t.code==="invalid_union"&&t.errors.forEach(function(b){return b.forEach(function(_){return r.push(_)})}),a){var f=e[n].types,c=f&&f[t.code];e[n]=Be(n,a,e,s,c?[].concat(c,t.message):t.message)}r.shift()}return e}function Pt(r,a,e){if(e===void 0&&(e={}),(function(t){return"_def"in t&&typeof t._def=="object"&&"typeName"in t._def})(r))return function(t,s,l){try{return Promise.resolve(qr(function(){return Promise.resolve(r[e.mode==="sync"?"parse":"parseAsync"](t,a)).then(function(n){return l.shouldUseNativeValidation&&er({},l),{errors:{},values:e.raw?Object.assign({},t):n}})},function(n){if((function(o){return Array.isArray(o==null?void 0:o.issues)})(n))return{values:{},errors:Ir(Rt(n.errors,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw n}))}catch(n){return Promise.reject(n)}};if((function(t){return"_zod"in t&&typeof t._zod=="object"})(r))return function(t,s,l){try{return Promise.resolve(qr(function(){return Promise.resolve((e.mode==="sync"?ut:ot)(r,t,a)).then(function(n){return l.shouldUseNativeValidation&&er({},l),{errors:{},values:e.raw?Object.assign({},t):n}})},function(n){if((function(o){return o instanceof dt})(n))return{values:{},errors:Ir(It(n.issues,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw n}))}catch(n){return Promise.reject(n)}};throw Error("Invalid input: not a Zod schema")}var re=mr(),P=cr(ct(),1),qt=br;const $t=()=>{let r=(0,re.c)(4),a=ne().formState.errors;if(Object.keys(a).length===0)return null;let e;r[0]===a?e=r[1]:(e=Object.values(a).map(Wt).filter(Boolean),r[0]=a,r[1]=e);let t=e.join(", "),s;return r[2]===t?s=r[3]:(s=(0,P.jsx)("div",{className:"text-destructive p-2 rounded-md bg-red-500/10",children:t}),r[2]=t,r[3]=s),s};var $r=x.createContext({}),Ht=r=>{let a=(0,re.c)(10),e;a[0]===r?e=a[1]:({...e}=r,a[0]=r,a[1]=e);let t;a[2]===e.name?t=a[3]:(t={name:e.name},a[2]=e.name,a[3]=t);let s;a[4]===e?s=a[5]:(s=(0,P.jsx)(Ft,{...e}),a[4]=e,a[5]=s);let l;return a[6]!==e.name||a[7]!==t||a[8]!==s?(l=(0,P.jsx)($r,{value:t,children:s},e.name),a[6]=e.name,a[7]=t,a[8]=s,a[9]=l):l=a[9],l},xe=()=>{let r=(0,re.c)(11),a=x.use($r),e=x.use(Hr),{getFieldState:t,formState:s}=ne(),l;r[0]!==a.name||r[1]!==s||r[2]!==t?(l=t(a.name,s),r[0]=a.name,r[1]=s,r[2]=t,r[3]=l):l=r[3];let n=l;if(!a)throw Error("useFormField should be used within <FormField>");let{id:o}=e,f=`${o}-form-item`,c=`${o}-form-item-description`,b=`${o}-form-item-message`,_;return r[4]!==a.name||r[5]!==n||r[6]!==o||r[7]!==f||r[8]!==c||r[9]!==b?(_={id:o,name:a.name,formItemId:f,formDescriptionId:c,formMessageId:b,...n},r[4]=a.name,r[5]=n,r[6]=o,r[7]=f,r[8]=c,r[9]=b,r[10]=_):_=r[10],_},Hr=x.createContext({}),Wr=x.forwardRef((r,a)=>{let e=(0,re.c)(14),t,s;e[0]===r?(t=e[1],s=e[2]):({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s);let l=x.useId(),n;e[3]===l?n=e[4]:(n={id:l},e[3]=l,e[4]=n);let o;e[5]===t?o=e[6]:(o=de("flex flex-col gap-1",t),e[5]=t,e[6]=o);let f;e[7]!==s||e[8]!==a||e[9]!==o?(f=(0,P.jsx)("div",{ref:a,className:o,...s}),e[7]=s,e[8]=a,e[9]=o,e[10]=f):f=e[10];let c;return e[11]!==n||e[12]!==f?(c=(0,P.jsx)(Hr,{value:n,children:f}),e[11]=n,e[12]=f,e[13]=c):c=e[13],c});Wr.displayName="FormItem";var zr=x.forwardRef((r,a)=>{let e=(0,re.c)(11),t,s;e[0]===r?(t=e[1],s=e[2]):({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s);let{error:l,formItemId:n}=xe();if(!s.children)return;let o=l&&"text-destructive",f;e[3]!==t||e[4]!==o?(f=de(o,t),e[3]=t,e[4]=o,e[5]=f):f=e[5];let c;return e[6]!==n||e[7]!==s||e[8]!==a||e[9]!==f?(c=(0,P.jsx)(yt,{ref:a,className:f,htmlFor:n,...s}),e[6]=n,e[7]=s,e[8]=a,e[9]=f,e[10]=c):c=e[10],c});zr.displayName="FormLabel";var Kr=x.forwardRef((r,a)=>{let e=(0,re.c)(8),t;e[0]===r?t=e[1]:({...t}=r,e[0]=r,e[1]=t);let{error:s,formItemId:l,formDescriptionId:n,formMessageId:o}=xe(),f=s?`${n} ${o}`:n,c=!!s,b;return e[2]!==l||e[3]!==t||e[4]!==a||e[5]!==f||e[6]!==c?(b=(0,P.jsx)(ft,{ref:a,id:l,"aria-describedby":f,"aria-invalid":c,...t}),e[2]=l,e[3]=t,e[4]=a,e[5]=f,e[6]=c,e[7]=b):b=e[7],b});Kr.displayName="FormControl";var Gr=x.forwardRef((r,a)=>{let e=(0,re.c)(10),t,s;e[0]===r?(t=e[1],s=e[2]):({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s);let{formDescriptionId:l}=xe();if(!s.children)return null;let n;e[3]===t?n=e[4]:(n=de("text-sm text-muted-foreground",t),e[3]=t,e[4]=n);let o;return e[5]!==l||e[6]!==s||e[7]!==a||e[8]!==n?(o=(0,P.jsx)("p",{ref:a,id:l,className:n,...s}),e[5]=l,e[6]=s,e[7]=a,e[8]=n,e[9]=o):o=e[9],o});Gr.displayName="FormDescription";var Jr=x.forwardRef((r,a)=>{let e=(0,re.c)(12),t,s,l;e[0]===r?(t=e[1],s=e[2],l=e[3]):({className:s,children:t,...l}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l);let{error:n,formMessageId:o}=xe(),f=n!=null&&n.message?String(n==null?void 0:n.message):t;if(!f)return null;let c;e[4]===s?c=e[5]:(c=de("text-xs font-medium text-destructive",s),e[4]=s,e[5]=c);let b;return e[6]!==f||e[7]!==o||e[8]!==l||e[9]!==a||e[10]!==c?(b=(0,P.jsx)("p",{ref:a,id:o,className:c,...l,children:f}),e[6]=f,e[7]=o,e[8]=l,e[9]=a,e[10]=c,e[11]=b):b=e[11],b});Jr.displayName="FormMessage";var Yr=r=>{let a=(0,re.c)(7),{className:e}=r,{error:t}=xe(),s=t!=null&&t.message?String(t==null?void 0:t.message):null;if(!s)return null;let l;a[0]===e?l=a[1]:(l=de("stroke-[1.8px]",e),a[0]=e,a[1]=l);let n;a[2]===l?n=a[3]:(n=(0,P.jsx)(nt,{className:l}),a[2]=l,a[3]=n);let o;return a[4]!==s||a[5]!==n?(o=(0,P.jsx)(gt,{content:s,children:n}),a[4]=s,a[5]=n,a[6]=o):o=a[6],o};Yr.displayName="FormMessageTooltip";function Wt(r){return r==null?void 0:r.message}var rr=mr(),Ne=x.forwardRef((r,a)=>{let e=(0,rr.c)(16),t,s,l;e[0]===r?(t=e[1],s=e[2],l=e[3]):({className:s,bottomAdornment:t,...l}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l);let n;e[4]===s?n=e[5]:(n=de("shadow-xs-solid hover:shadow-sm-solid disabled:shadow-xs-solid focus-visible:shadow-md-solid","flex w-full mb-1 rounded-sm border border-input bg-background px-3 py-2 text-sm font-code ring-offset-background placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:border-accent disabled:cursor-not-allowed disabled:opacity-50 min-h-6",s),e[4]=s,e[5]=n);let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o=pt.stopPropagation(),e[6]=o):o=e[6];let f;e[7]!==l||e[8]!==a||e[9]!==n?(f=(0,P.jsx)("textarea",{className:n,onClick:o,ref:a,...l}),e[7]=l,e[8]=a,e[9]=n,e[10]=f):f=e[10];let c;e[11]===t?c=e[12]:(c=t&&(0,P.jsx)("div",{className:"absolute right-0 bottom-1 flex items-center pr-[6px] pointer-events-none text-muted-foreground h-6",children:t}),e[11]=t,e[12]=c);let b;return e[13]!==f||e[14]!==c?(b=(0,P.jsxs)("div",{className:"relative",children:[f,c]}),e[13]=f,e[14]=c,e[15]=b):b=e[15],b});Ne.displayName="Textarea";const Zr=x.forwardRef((r,a)=>{let e=(0,rr.c)(16),t,s,l;e[0]===r?(t=e[1],s=e[2],l=e[3]):({className:t,onValueChange:s,...l}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l);let n;e[4]!==s||e[5]!==l.delay||e[6]!==l.value?(n={initialValue:l.value,delay:l.delay,onChange:s},e[4]=s,e[5]=l.delay,e[6]=l.value,e[7]=n):n=e[7];let{value:o,onChange:f}=ht(n),c;e[8]===f?c=e[9]:(c=_=>f(_.target.value),e[8]=f,e[9]=c);let b;return e[10]!==t||e[11]!==l||e[12]!==a||e[13]!==c||e[14]!==o?(b=(0,P.jsx)(Ne,{ref:a,className:t,...l,onChange:c,value:o}),e[10]=t,e[11]=l,e[12]=a,e[13]=c,e[14]=o,e[15]=b):b=e[15],b});Zr.displayName="DebouncedTextarea";const Qr=x.forwardRef((r,a)=>{let e=(0,rr.c)(23),t,s,l;e[0]===r?(t=e[1],s=e[2],l=e[3]):({className:t,onValueChange:s,...l}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l);let[n,o]=x.useState(l.value),f;e[4]!==n||e[5]!==s||e[6]!==l.value?(f={prop:l.value,defaultProp:n,onChange:s},e[4]=n,e[5]=s,e[6]=l.value,e[7]=f):f=e[7];let[c,b]=mt(f),_,N;e[8]===c?(_=e[9],N=e[10]):(_=()=>{o(c||"")},N=[c],e[8]=c,e[9]=_,e[10]=N),x.useEffect(_,N);let k;e[11]===Symbol.for("react.memo_cache_sentinel")?(k=j=>o(j.target.value),e[11]=k):k=e[11];let v,h;e[12]!==n||e[13]!==b?(v=()=>b(n),h=j=>{j.ctrlKey&&j.key==="Enter"&&(j.preventDefault(),b(n))},e[12]=n,e[13]=b,e[14]=v,e[15]=h):(v=e[14],h=e[15]);let A;return e[16]!==t||e[17]!==n||e[18]!==l||e[19]!==a||e[20]!==v||e[21]!==h?(A=(0,P.jsx)(Ne,{ref:a,className:t,...l,value:n,onChange:k,onBlur:v,onKeyDown:h}),e[16]=t,e[17]=n,e[18]=l,e[19]=a,e[20]=v,e[21]=h,e[22]=A):A=e[22],A});Qr.displayName="OnBlurredTextarea";export{ne as _,Kr as a,Ht as c,Jr as d,Yr as f,Bt as g,Dt as h,qt as i,Wr as l,br as m,Qr as n,Gr as o,Pt as p,Ne as r,$t as s,Zr as t,zr as u,Fr as v,bt as y};
@@ -1 +1 @@
1
- import{a as _,s as q}from"./precisionRound-BOmLQIKI.js";import{a as z,i as G}from"./linear-HSKpWh7o.js";import{A as D,C as d,D as w,E as A,M as k,N as H,O as x,S as J,T as y,_ as K,c as C,j as Q,k as I,l as U,o as j,p as E,s as V,t as W,v as F,w as X,x as L,y as Z}from"./defaultLocale-DK1MWd7f.js";import{n as $}from"./init-DZ5TV86b.js";function nn(r,u){let o;if(u===void 0)for(let t of r)t!=null&&(o<t||o===void 0&&t>=t)&&(o=t);else{let t=-1;for(let a of r)(a=u(a,++t,r))!=null&&(o<a||o===void 0&&a>=a)&&(o=a)}return o}function rn(r,u){let o;if(u===void 0)for(let t of r)t!=null&&(o>t||o===void 0&&t>=t)&&(o=t);else{let t=-1;for(let a of r)(a=u(a,++t,r))!=null&&(o>a||o===void 0&&a>=a)&&(o=a)}return o}function N(r,u,o,t,a,f){let e=[[y,1,D],[y,5,5*D],[y,15,15*D],[y,30,30*D],[f,1,x],[f,5,5*x],[f,15,15*x],[f,30,30*x],[a,1,w],[a,3,3*w],[a,6,6*w],[a,12,12*w],[t,1,A],[t,2,2*A],[o,1,Q],[u,1,I],[u,3,3*I],[r,1,k]];function h(s,i,m){let l=i<s;l&&([s,i]=[i,s]);let c=m&&typeof m.range=="function"?m:p(s,i,m),g=c?c.range(s,+i+1):[];return l?g.reverse():g}function p(s,i,m){let l=Math.abs(i-s)/m,c=q(([,,b])=>b).right(e,l);if(c===e.length)return r.every(_(s/k,i/k,m));if(c===0)return H.every(Math.max(_(s,i,m),1));let[g,M]=e[l/e[c-1][2]<e[c][2]/l?c-1:c];return g.every(M)}return[h,p]}var[tn,an]=N(V,U,K,Z,J,X),[on,sn]=N(j,C,E,F,L,d);function O(r,u){r=r.slice();var o=0,t=r.length-1,a=r[o],f=r[t],e;return f<a&&(e=o,o=t,t=e,e=a,a=f,f=e),r[o]=u.floor(a),r[t]=u.ceil(f),r}function un(r){return new Date(r)}function en(r){return r instanceof Date?+r:+new Date(+r)}function S(r,u,o,t,a,f,e,h,p,s){var i=G(),m=i.invert,l=i.domain,c=s(".%L"),g=s(":%S"),M=s("%I:%M"),b=s("%I %p"),T=s("%a %d"),B=s("%b %d"),P=s("%B"),R=s("%Y");function Y(n){return(p(n)<n?c:h(n)<n?g:e(n)<n?M:f(n)<n?b:t(n)<n?a(n)<n?T:B:o(n)<n?P:R)(n)}return i.invert=function(n){return new Date(m(n))},i.domain=function(n){return arguments.length?l(Array.from(n,en)):l().map(un)},i.ticks=function(n){var v=l();return r(v[0],v[v.length-1],n??10)},i.tickFormat=function(n,v){return v==null?Y:s(v)},i.nice=function(n){var v=l();return(!n||typeof n.range!="function")&&(n=u(v[0],v[v.length-1],n??10)),n?l(O(v,n)):i},i.copy=function(){return z(i,S(r,u,o,t,a,f,e,h,p,s))},i}function fn(){return $.apply(S(on,sn,j,C,E,F,L,d,y,W).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}export{tn as a,an as i,fn as n,rn as o,O as r,nn as s,S as t};
1
+ import{a as _,s as q}from"./precisionRound-BOmLQIKI.js";import{a as z,i as G}from"./linear-BD0d4-bn.js";import{A as D,C as d,D as w,E as A,M as k,N as H,O as x,S as J,T as y,_ as K,c as C,j as Q,k as I,l as U,o as j,p as E,s as V,t as W,v as F,w as X,x as L,y as Z}from"./defaultLocale-DK1MWd7f.js";import{n as $}from"./init-BpLL1fe9.js";function nn(r,u){let o;if(u===void 0)for(let t of r)t!=null&&(o<t||o===void 0&&t>=t)&&(o=t);else{let t=-1;for(let a of r)(a=u(a,++t,r))!=null&&(o<a||o===void 0&&a>=a)&&(o=a)}return o}function rn(r,u){let o;if(u===void 0)for(let t of r)t!=null&&(o>t||o===void 0&&t>=t)&&(o=t);else{let t=-1;for(let a of r)(a=u(a,++t,r))!=null&&(o>a||o===void 0&&a>=a)&&(o=a)}return o}function N(r,u,o,t,a,f){let e=[[y,1,D],[y,5,5*D],[y,15,15*D],[y,30,30*D],[f,1,x],[f,5,5*x],[f,15,15*x],[f,30,30*x],[a,1,w],[a,3,3*w],[a,6,6*w],[a,12,12*w],[t,1,A],[t,2,2*A],[o,1,Q],[u,1,I],[u,3,3*I],[r,1,k]];function h(s,i,m){let l=i<s;l&&([s,i]=[i,s]);let c=m&&typeof m.range=="function"?m:p(s,i,m),g=c?c.range(s,+i+1):[];return l?g.reverse():g}function p(s,i,m){let l=Math.abs(i-s)/m,c=q(([,,b])=>b).right(e,l);if(c===e.length)return r.every(_(s/k,i/k,m));if(c===0)return H.every(Math.max(_(s,i,m),1));let[g,M]=e[l/e[c-1][2]<e[c][2]/l?c-1:c];return g.every(M)}return[h,p]}var[tn,an]=N(V,U,K,Z,J,X),[on,sn]=N(j,C,E,F,L,d);function O(r,u){r=r.slice();var o=0,t=r.length-1,a=r[o],f=r[t],e;return f<a&&(e=o,o=t,t=e,e=a,a=f,f=e),r[o]=u.floor(a),r[t]=u.ceil(f),r}function un(r){return new Date(r)}function en(r){return r instanceof Date?+r:+new Date(+r)}function S(r,u,o,t,a,f,e,h,p,s){var i=G(),m=i.invert,l=i.domain,c=s(".%L"),g=s(":%S"),M=s("%I:%M"),b=s("%I %p"),T=s("%a %d"),B=s("%b %d"),P=s("%B"),R=s("%Y");function Y(n){return(p(n)<n?c:h(n)<n?g:e(n)<n?M:f(n)<n?b:t(n)<n?a(n)<n?T:B:o(n)<n?P:R)(n)}return i.invert=function(n){return new Date(m(n))},i.domain=function(n){return arguments.length?l(Array.from(n,en)):l().map(un)},i.ticks=function(n){var v=l();return r(v[0],v[v.length-1],n??10)},i.tickFormat=function(n,v){return v==null?Y:s(v)},i.nice=function(n){var v=l();return(!n||typeof n.range!="function")&&(n=u(v[0],v[v.length-1],n??10)),n?l(O(v,n)):i},i.copy=function(){return z(i,S(r,u,o,t,a,f,e,h,p,s))},i}function fn(){return $.apply(S(on,sn,j,C,E,F,L,d,y,W).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}export{tn as a,an as i,fn as n,rn as o,O as r,nn as s,S as t};
@@ -1,4 +1,4 @@
1
- import"./purify.es-DfJp_of2.js";import{u as X}from"./src-CvyFXpBy.js";import{t as it}from"./arc-CTRjCaaq.js";import{n as s,r as S,t as xt}from"./src-BRLtyMKi.js";import{G as bt,Q as kt,X as _t,Z as vt,a as wt,b as St,o as $t}from"./chunk-ABZYJK2D-B-yriO93.js";var Y=(function(){var i=s(function(r,h,o,d){for(o||(o={}),d=r.length;d--;o[r[d]]=h);return o},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],a=[1,10],n=[1,11],l=[1,12],u=[1,13],g=[1,16],p=[1,17],m={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:s(function(r,h,o,d,y,c,v){var f=c.length-1;switch(y){case 1:return c[f-1];case 2:this.$=[];break;case 3:c[f-1].push(c[f]),this.$=c[f-1];break;case 4:case 5:this.$=c[f];break;case 6:case 7:this.$=[];break;case 8:d.getCommonDb().setDiagramTitle(c[f].substr(6)),this.$=c[f].substr(6);break;case 9:this.$=c[f].trim(),d.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=c[f].trim(),d.getCommonDb().setAccDescription(this.$);break;case 12:d.addSection(c[f].substr(8)),this.$=c[f].substr(8);break;case 15:d.addTask(c[f],0,""),this.$=c[f];break;case 16:d.addEvent(c[f].substr(2)),this.$=c[f];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},i(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:a,14:n,16:l,17:u,18:14,19:15,20:g,21:p},i(t,[2,7],{1:[2,1]}),i(t,[2,3]),{9:18,11:e,12:a,14:n,16:l,17:u,18:14,19:15,20:g,21:p},i(t,[2,5]),i(t,[2,6]),i(t,[2,8]),{13:[1,19]},{15:[1,20]},i(t,[2,11]),i(t,[2,12]),i(t,[2,13]),i(t,[2,14]),i(t,[2,15]),i(t,[2,16]),i(t,[2,4]),i(t,[2,9]),i(t,[2,10])],defaultActions:{},parseError:s(function(r,h){if(h.recoverable)this.trace(r);else{var o=Error(r);throw o.hash=h,o}},"parseError"),parse:s(function(r){var h=this,o=[0],d=[],y=[null],c=[],v=this.table,f="",M=0,N=0,A=0,B=2,F=1,W=c.slice.call(arguments,1),b=Object.create(this.lexer),w={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(w.yy[k]=this.yy[k]);b.setInput(r,w.yy),w.yy.lexer=b,w.yy.parser=this,b.yylloc===void 0&&(b.yylloc={});var I=b.yylloc;c.push(I);var C=b.options&&b.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function L(E){o.length-=2*E,y.length-=E,c.length-=E}s(L,"popStack");function O(){var E=d.pop()||b.lex()||F;return typeof E!="number"&&(E instanceof Array&&(d=E,E=d.pop()),E=h.symbols_[E]||E),E}s(O,"lex");for(var _,q,P,$,U,R={},D,T,tt,V;;){if(P=o[o.length-1],this.defaultActions[P]?$=this.defaultActions[P]:(_??(_=O()),$=v[P]&&v[P][_]),$===void 0||!$.length||!$[0]){var et="";for(D in V=[],v[P])this.terminals_[D]&&D>B&&V.push("'"+this.terminals_[D]+"'");et=b.showPosition?"Parse error on line "+(M+1)+`:
1
+ import"./purify.es-DfJp_of2.js";import{u as X}from"./src-CvyFXpBy.js";import{t as it}from"./arc-DUSwcTI9.js";import{n as s,r as S,t as xt}from"./src-CW27-Kjl.js";import{G as bt,Q as kt,X as _t,Z as vt,a as wt,b as St,o as $t}from"./chunk-ABZYJK2D-BahEojQ2.js";var Y=(function(){var i=s(function(r,h,o,d){for(o||(o={}),d=r.length;d--;o[r[d]]=h);return o},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],a=[1,10],n=[1,11],l=[1,12],u=[1,13],g=[1,16],p=[1,17],m={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:s(function(r,h,o,d,y,c,v){var f=c.length-1;switch(y){case 1:return c[f-1];case 2:this.$=[];break;case 3:c[f-1].push(c[f]),this.$=c[f-1];break;case 4:case 5:this.$=c[f];break;case 6:case 7:this.$=[];break;case 8:d.getCommonDb().setDiagramTitle(c[f].substr(6)),this.$=c[f].substr(6);break;case 9:this.$=c[f].trim(),d.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=c[f].trim(),d.getCommonDb().setAccDescription(this.$);break;case 12:d.addSection(c[f].substr(8)),this.$=c[f].substr(8);break;case 15:d.addTask(c[f],0,""),this.$=c[f];break;case 16:d.addEvent(c[f].substr(2)),this.$=c[f];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},i(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:a,14:n,16:l,17:u,18:14,19:15,20:g,21:p},i(t,[2,7],{1:[2,1]}),i(t,[2,3]),{9:18,11:e,12:a,14:n,16:l,17:u,18:14,19:15,20:g,21:p},i(t,[2,5]),i(t,[2,6]),i(t,[2,8]),{13:[1,19]},{15:[1,20]},i(t,[2,11]),i(t,[2,12]),i(t,[2,13]),i(t,[2,14]),i(t,[2,15]),i(t,[2,16]),i(t,[2,4]),i(t,[2,9]),i(t,[2,10])],defaultActions:{},parseError:s(function(r,h){if(h.recoverable)this.trace(r);else{var o=Error(r);throw o.hash=h,o}},"parseError"),parse:s(function(r){var h=this,o=[0],d=[],y=[null],c=[],v=this.table,f="",M=0,N=0,A=0,B=2,F=1,W=c.slice.call(arguments,1),b=Object.create(this.lexer),w={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(w.yy[k]=this.yy[k]);b.setInput(r,w.yy),w.yy.lexer=b,w.yy.parser=this,b.yylloc===void 0&&(b.yylloc={});var I=b.yylloc;c.push(I);var C=b.options&&b.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function L(E){o.length-=2*E,y.length-=E,c.length-=E}s(L,"popStack");function O(){var E=d.pop()||b.lex()||F;return typeof E!="number"&&(E instanceof Array&&(d=E,E=d.pop()),E=h.symbols_[E]||E),E}s(O,"lex");for(var _,q,P,$,U,R={},D,T,tt,V;;){if(P=o[o.length-1],this.defaultActions[P]?$=this.defaultActions[P]:(_??(_=O()),$=v[P]&&v[P][_]),$===void 0||!$.length||!$[0]){var et="";for(D in V=[],v[P])this.terminals_[D]&&D>B&&V.push("'"+this.terminals_[D]+"'");et=b.showPosition?"Parse error on line "+(M+1)+`:
2
2
  `+b.showPosition()+`
3
3
  Expecting `+V.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(M+1)+": Unexpected "+(_==F?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(et,{text:b.match,token:this.terminals_[_]||_,line:b.yylineno,loc:I,expected:V})}if($[0]instanceof Array&&$.length>1)throw Error("Parse Error: multiple actions possible at state: "+P+", token: "+_);switch($[0]){case 1:o.push(_),y.push(b.yytext),c.push(b.yylloc),o.push($[1]),_=null,q?(_=q,q=null):(N=b.yyleng,f=b.yytext,M=b.yylineno,I=b.yylloc,A>0&&A--);break;case 2:if(T=this.productions_[$[1]][1],R.$=y[y.length-T],R._$={first_line:c[c.length-(T||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(T||1)].first_column,last_column:c[c.length-1].last_column},C&&(R._$.range=[c[c.length-(T||1)].range[0],c[c.length-1].range[1]]),U=this.performAction.apply(R,[f,N,M,w.yy,$[1],y,c].concat(W)),U!==void 0)return U;T&&(o=o.slice(0,-1*T*2),y=y.slice(0,-1*T),c=c.slice(0,-1*T)),o.push(this.productions_[$[1]][0]),y.push(R.$),c.push(R._$),tt=v[o[o.length-2]][o[o.length-1]],o.push(tt);break;case 3:return!0}}return!0},"parse")};m.lexer=(function(){return{EOF:1,parseError:s(function(r,h){if(this.yy.parser)this.yy.parser.parseError(r,h);else throw Error(r)},"parseError"),setInput:s(function(r,h){return this.yy=h||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var r=this._input[0];return this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r,r.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s(function(r){var h=r.length,o=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1&&(this.yylineno-=o.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===d.length?this.yylloc.first_column:0)+d[d.length-o.length].length-o[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var r=this.pastInput(),h=Array(r.length+1).join("-");return r+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{s as q}from"./chunk-LvLJmgfZ.js";import{d as Z,p as ee,u as A}from"./useEvent-D91BmmQi.js";import{t as te}from"./react-Bj1aDYRI.js";import{Ar as re,J as F,M as le,wr as se}from"./cells-B7YKR2ed.js";import"./react-dom-CSu739Rf.js";import{t as ae}from"./compiler-runtime-B3qBwwSJ.js";import{t as ie}from"./cn-X2M2usMq.js";import{t as ne}from"./jsx-runtime-PbYoItBR.js";import"./fullscreen-BXI8V5i6.js";import{t as L}from"./tooltip-CgQpRVyN.js";import"./dist-Dez1I5M9.js";import"./cjs-DXo9vDEJ.js";import"./main-DmhaVp6Y.js";import"./useNonce-0SWz6w4W.js";import{t as oe}from"./createLucideIcon-BTp1tQDO.js";import{r as de}from"./x-9vLEgLY6.js";import{t as ce}from"./chevron-right-C7RH0Nc7.js";import{t as me}from"./circle-check-Q2N68uwG.js";import{t as pe}from"./circle-play-BvVg4iiT.js";import"./dist-DblYTes5.js";import"./dist-D-2yWcX9.js";import"./dist-CNKFZCiw.js";import"./dist-ZjSH4Z6x.js";import"./dist-BtrqKtvn.js";import"./session-CsT5Gg9j.js";import{r as ue}from"./useTheme-D_ZbTTJw.js";import"./purify.es-DfJp_of2.js";import{n as he,r as U}from"./CellStatus-BT8TMjJf.js";import"./vega-loader.browser-CZV6_g2i.js";import{r as fe,t as xe}from"./react-vega-9vyn19ym.js";import"./defaultLocale-OkOxlkkM.js";import"./defaultLocale-DK1MWd7f.js";import{t as ve}from"./cell-link-DO4acQD0.js";import{n as ge,r as je,t as J}from"./react-resizable-panels.browser.esm-Ce2ksurd.js";import{t as ye}from"./bundle.esm-D544r2Sr.js";import{t as Ie}from"./empty-state-QmmE2oN4.js";import"./multi-icon-CTvmuLdL.js";import{r as Se}from"./panel-context-DC1vAeB3.js";import{t as be}from"./clear-button-DhIdI0ng.js";import{n as Ne,t as we}from"./runs-BR6uJHTx.js";var ke=oe("circle-ellipsis",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M7 12h.01",key:"eqddd0"}]]),H=ae(),C=q(te(),1);const V="hoveredCellId",Y="cellHover";var Re="cellNum",G="cell",O="startTimestamp",K="endTimestamp",Q="status";function Te(t,e,r,a){let i="hoursminutessecondsmilliseconds";return{$schema:"https://vega.github.io/schema/vega-lite/v6.json",background:a==="dark"?"black":void 0,mark:{type:"bar",cornerRadius:2},params:[{name:V,bind:{element:`#${e}`}},{name:Y,select:{type:"point",on:"mouseover",fields:[G],clear:"mouseout"}}],height:{step:r==="sideBySide"?26:21},encoding:{y:{field:Re,scale:{paddingInner:.2},sort:{field:"sortPriority"},title:"cell",axis:r==="sideBySide"?null:void 0},x:{field:O,type:"temporal",axis:{orient:"top",title:null}},x2:{field:K,type:"temporal"},tooltip:[{field:O,type:"temporal",timeUnit:i,title:"Start"},{field:K,type:"temporal",timeUnit:i,title:"End"}],size:{value:{expr:`${V} == toString(datum.${G}) ? 19.5 : 18`}},color:{field:Q,scale:{domain:["success","error"],range:["#37BE5F","red"]},legend:null}},data:{values:t},transform:[{calculate:`datum.${Q} === 'queued' ? 9999999999999 : datum.${O}`,as:"sortPriority"}],config:{view:{stroke:"transparent"}}}}function W(t){try{let e=new Date(t*1e3);return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")} ${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}:${String(e.getSeconds()).padStart(2,"0")}.${String(e.getMilliseconds()).padStart(3,"0")}`}catch{return""}}var l=q(ne(),1),X=ee(new Map);const Ee=()=>{let t=(0,H.c)(34),{runIds:e,runMap:r}=A(we),a=A(X),{clearRuns:i}=Ne(),{theme:n}=ue(),[s,k]=(0,C.useState)("above"),N=Se(),c;t[0]===s?c=t[1]:(c=()=>{k(s==="above"?"sideBySide":"above")},t[0]=s,t[1]=c);let m=c;if(e.length===0){let p;return t[2]===Symbol.for("react.memo_cache_sentinel")?(p=(0,l.jsx)(Ie,{title:"No traces",description:(0,l.jsx)("span",{children:"Cells that have ran will appear here."}),icon:(0,l.jsx)(re,{})}),t[2]=p):p=t[2],p}let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=(0,l.jsx)("label",{htmlFor:"chartPosition",className:"text-xs",children:"Inline chart"}),t[3]=u):u=t[3];let y=s==="sideBySide",o;t[4]!==y||t[5]!==m?(o=(0,l.jsxs)("div",{className:"flex flex-row gap-1 items-center",children:[u,(0,l.jsx)("input",{type:"checkbox",name:"chartPosition","data-testid":"chartPosition",onClick:m,defaultChecked:y,className:"h-3 cursor-pointer"})]}),t[4]=y,t[5]=m,t[6]=o):o=t[6];let h;t[7]===i?h=t[8]:(h=(0,l.jsx)(be,{dataTestId:"clear-traces-button",onClick:i}),t[7]=i,t[8]=h);let v;t[9]!==o||t[10]!==h?(v=(0,l.jsxs)("div",{className:"flex flex-row justify-start gap-3",children:[o,h]}),t[9]=o,t[10]=h,t[11]=v):v=t[11];let g;if(t[12]!==s||t[13]!==a||t[14]!==e||t[15]!==r||t[16]!==n){let p;t[18]!==s||t[19]!==a||t[20]!==r||t[21]!==n?(p=(E,P)=>{let T=r.get(E);return T?(0,l.jsx)(Me,{run:T,isExpanded:a.get(T.runId),isMostRecentRun:P===0,chartPosition:s,theme:n},T.runId):null},t[18]=s,t[19]=a,t[20]=r,t[21]=n,t[22]=p):p=t[22],g=e.map(p),t[12]=s,t[13]=a,t[14]=e,t[15]=r,t[16]=n,t[17]=g}else g=t[17];let j;t[23]===g?j=t[24]:(j=(0,l.jsx)("div",{className:"flex flex-col gap-3",children:g}),t[23]=g,t[24]=j);let w;t[25]!==v||t[26]!==j?(w=(0,l.jsxs)("div",{className:"py-1 px-2 overflow-y-scroll h-full",children:[v,j]}),t[25]=v,t[26]=j,t[27]=w):w=t[27];let f=w;if(N==="sidebar")return f;let x;t[28]===f?x=t[29]:(x=(0,l.jsx)(J,{defaultSize:50,minSize:30,maxSize:80,children:f}),t[28]=f,t[29]=x);let d;t[30]===Symbol.for("react.memo_cache_sentinel")?(d=(0,l.jsx)(je,{className:"w-1 bg-border hover:bg-primary/50 transition-colors"}),t[30]=d):d=t[30];let I;t[31]===Symbol.for("react.memo_cache_sentinel")?(I=(0,l.jsx)(J,{defaultSize:50,children:(0,l.jsx)("div",{})}),t[31]=I):I=t[31];let S;return t[32]===x?S=t[33]:(S=(0,l.jsxs)(ge,{direction:"horizontal",className:"h-full",children:[x,d,I]}),t[32]=x,t[33]=S),S};var Me=({run:t,isMostRecentRun:e,chartPosition:r,isExpanded:a,theme:i})=>{let n=Z(X);a??(a=e);let s=()=>{n(c=>{let m=new Map(c);return m.set(t.runId,!a),m})},k=(0,l.jsx)(a?de:ce,{height:16,className:"inline"}),N=(0,l.jsxs)("span",{className:"text-sm cursor-pointer",onClick:s,children:["Run - ",F(t.runStartTime),k]});return a?(0,l.jsx)(_e,{run:t,chartPosition:r,theme:i,title:N},t.runId):(0,l.jsx)("div",{className:"flex flex-col",children:(0,l.jsx)("pre",{className:"font-mono font-semibold",children:N})},t.runId)},_e=t=>{let e=(0,H.c)(40),{run:r,chartPosition:a,theme:i,title:n}=t,[s,k]=(0,C.useState)(),N=(0,C.useRef)(null),{ref:c,width:m}=ye(),u=m===void 0?300:m,y=le(),o,h;if(e[0]!==y||e[1]!==a||e[2]!==r.cellRuns||e[3]!==r.runId||e[4]!==i){let R=[...r.cellRuns.values()].map(b=>{let M=b.elapsedTime??0;return{cell:b.cellId,cellNum:y.inOrderIds.indexOf(b.cellId),startTimestamp:W(b.startTime),endTimestamp:W(b.startTime+M),elapsedTime:U(M*1e3),status:b.status}});o=`hiddenInputElement-${r.runId}`,h=fe(Te(R,o,a,i)),e[0]=y,e[1]=a,e[2]=r.cellRuns,e[3]=r.runId,e[4]=i,e[5]=o,e[6]=h}else o=e[5],h=e[6];let v=h.spec,g=i==="dark"?"dark":void 0,j=u-50,w=a==="above"?120:100,f;e[7]!==g||e[8]!==j||e[9]!==w?(f={theme:g,width:j,height:w,actions:!1,mode:"vega",renderer:"canvas"},e[7]=g,e[8]=j,e[9]=w,e[10]=f):f=e[10];let x;e[11]!==f||e[12]!==v?(x={ref:N,spec:v,options:f},e[11]=f,e[12]=v,e[13]=x):x=e[13];let d=xe(x),I;e[14]===(d==null?void 0:d.view)?I=e[15]:(I=()=>{let R=[{signalName:Y,handler:(b,M)=>{var z;k(((z=M.cell)==null?void 0:z[0])??void 0??null)}}];return R.forEach(b=>{let{signalName:M,handler:z}=b;d==null||d.view.addSignalListener(M,z)}),()=>{R.forEach(b=>{let{signalName:M,handler:z}=b;d==null||d.view.removeSignalListener(M,z)})}},e[14]=d==null?void 0:d.view,e[15]=I);let S;e[16]===d?S=e[17]:(S=[d],e[16]=d,e[17]=S),(0,C.useEffect)(I,S);let p;e[18]!==o||e[19]!==s||e[20]!==r?(p=(0,l.jsx)($e,{run:r,hoveredCellId:s,hiddenInputElementId:o}),e[18]=o,e[19]=s,e[20]=r,e[21]=p):p=e[21];let E=p,P=a==="sideBySide"?"-mt-0.5 flex-1":"",T;e[22]===Symbol.for("react.memo_cache_sentinel")?(T=(0,l.jsx)(C.Suspense,{children:(0,l.jsx)("div",{ref:N})}),e[22]=T):T=e[22];let B;e[23]!==c||e[24]!==P?(B=(0,l.jsx)("div",{className:P,ref:c,children:T}),e[23]=c,e[24]=P,e[25]=B):B=e[25];let _=B;if(a==="above"){let R;e[26]!==_||e[27]!==n||e[28]!==E?(R=(0,l.jsxs)("pre",{className:"font-mono font-semibold",children:[n,_,E]}),e[26]=_,e[27]=n,e[28]=E,e[29]=R):R=e[29];let b;return e[30]!==r.runId||e[31]!==R?(b=(0,l.jsx)("div",{className:"flex flex-col",children:R},r.runId),e[30]=r.runId,e[31]=R,e[32]=b):b=e[32],b}let $;e[33]!==n||e[34]!==E?($=(0,l.jsxs)("pre",{className:"font-mono font-semibold",children:[n,E]}),e[33]=n,e[34]=E,e[35]=$):$=e[35];let D;return e[36]!==_||e[37]!==r.runId||e[38]!==$?(D=(0,l.jsxs)("div",{className:"flex flex-row",children:[$,_]},r.runId),e[36]=_,e[37]=r.runId,e[38]=$,e[39]=D):D=e[39],D},$e=t=>{let e=(0,H.c)(12),{run:r,hoveredCellId:a,hiddenInputElementId:i}=t,n=(0,C.useRef)(null),s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o=>{n.current&&(n.current.value=String(o),n.current.dispatchEvent(new Event("input",{bubbles:!0})))},e[0]=s):s=e[0];let k=s,N=a||"",c;e[1]!==i||e[2]!==N?(c=(0,l.jsx)("input",{type:"text",id:i,defaultValue:N,hidden:!0,ref:n}),e[1]=i,e[2]=N,e[3]=c):c=e[3];let m;e[4]===r.cellRuns?m=e[5]:(m=[...r.cellRuns.values()],e[4]=r.cellRuns,e[5]=m);let u;e[6]!==a||e[7]!==m?(u=m.map(o=>(0,l.jsx)(Ce,{cellRun:o,hovered:o.cellId===a,dispatchHoverEvent:k},o.cellId)),e[6]=a,e[7]=m,e[8]=u):u=e[8];let y;return e[9]!==c||e[10]!==u?(y=(0,l.jsxs)("div",{className:"text-xs mt-0.5 ml-3 flex flex-col gap-0.5",children:[c,u]}),e[9]=c,e[10]=u,e[11]=y):y=e[11],y},ze={success:(0,l.jsx)(me,{color:"green",size:14}),running:(0,l.jsx)(pe,{color:"var(--blue-10)",size:14}),error:(0,l.jsx)(se,{color:"red",size:14}),queued:(0,l.jsx)(ke,{color:"grey",size:14})},Ce=t=>{let e=(0,H.c)(39),{cellRun:r,hovered:a,dispatchHoverEvent:i}=t,n;e[0]===r.elapsedTime?n=e[1]:(n=r.elapsedTime?U(r.elapsedTime*1e3):"-",e[0]=r.elapsedTime,e[1]=n);let s=n,k;e[2]!==r.elapsedTime||e[3]!==s?(k=r.elapsedTime?(0,l.jsxs)("span",{children:["This cell took ",(0,l.jsx)(he,{elapsedTime:s})," to run"]}):(0,l.jsx)("span",{children:"This cell has not been run"}),e[2]=r.elapsedTime,e[3]=s,e[4]=k):k=e[4];let N=k,c;e[5]!==r.cellId||e[6]!==i?(c=()=>{i(r.cellId)},e[5]=r.cellId,e[6]=i,e[7]=c):c=e[7];let m=c,u;e[8]===i?u=e[9]:(u=()=>{i(null)},e[8]=i,e[9]=u);let y=u,o=a&&"bg-(--gray-3) opacity-100",h;e[10]===o?h=e[11]:(h=ie("flex flex-row gap-2 py-1 px-1 opacity-70 hover:bg-(--gray-3) hover:opacity-100",o),e[10]=o,e[11]=h);let v;e[12]===r.startTime?v=e[13]:(v=F(r.startTime),e[12]=r.startTime,e[13]=v);let g;e[14]===v?g=e[15]:(g=(0,l.jsxs)("span",{className:"text-(--gray-10) dark:text-(--gray-11)",children:["[",v,"]"]}),e[14]=v,e[15]=g);let j;e[16]===r.cellId?j=e[17]:(j=(0,l.jsxs)("span",{className:"text-(--gray-10) w-16 overflow-hidden",children:["(",(0,l.jsx)(ve,{cellId:r.cellId}),")"]}),e[16]=r.cellId,e[17]=j);let w;e[18]===r.code?w=e[19]:(w=(0,l.jsx)("span",{className:"w-40 truncate -ml-1",children:r.code}),e[18]=r.code,e[19]=w);let f;e[20]===s?f=e[21]:(f=(0,l.jsx)("span",{className:"text-(--gray-10) dark:text-(--gray-11)",children:s}),e[20]=s,e[21]=f);let x;e[22]!==N||e[23]!==f?(x=(0,l.jsx)(L,{content:N,children:f}),e[22]=N,e[23]=f,e[24]=x):x=e[24];let d=ze[r.status],I;e[25]!==r.status||e[26]!==d?(I=(0,l.jsx)(L,{content:r.status,children:d}),e[25]=r.status,e[26]=d,e[27]=I):I=e[27];let S;e[28]!==x||e[29]!==I?(S=(0,l.jsxs)("div",{className:"flex flex-row gap-1 w-16 justify-end -ml-2",children:[x,I]}),e[28]=x,e[29]=I,e[30]=S):S=e[30];let p;return e[31]!==m||e[32]!==y||e[33]!==w||e[34]!==S||e[35]!==h||e[36]!==g||e[37]!==j?(p=(0,l.jsxs)("div",{className:h,onMouseEnter:m,onMouseLeave:y,children:[g,j,w,S]}),e[31]=m,e[32]=y,e[33]=w,e[34]=S,e[35]=h,e[36]=g,e[37]=j,e[38]=p):p=e[38],p};export{Ee as Tracing};
1
+ import{s as q}from"./chunk-LvLJmgfZ.js";import{d as Z,p as ee,u as F}from"./useEvent-D91BmmQi.js";import{t as te}from"./react-Bj1aDYRI.js";import{Cr as re,J as L,M as le,kr as se}from"./cells-DENsmH9t.js";import"./react-dom-CSu739Rf.js";import{t as ae}from"./compiler-runtime-B3qBwwSJ.js";import{t as ie}from"./cn-X2M2usMq.js";import{t as ne}from"./jsx-runtime-PbYoItBR.js";import"./fullscreen-BXI8V5i6.js";import{t as A}from"./tooltip-CgQpRVyN.js";import"./dist-Dez1I5M9.js";import"./cjs-DXo9vDEJ.js";import"./main-DmhaVp6Y.js";import"./useNonce-0SWz6w4W.js";import{t as oe}from"./createLucideIcon-BTp1tQDO.js";import{r as de}from"./x-9vLEgLY6.js";import{t as ce}from"./chevron-right-C7RH0Nc7.js";import{t as me}from"./circle-check-Q2N68uwG.js";import{t as pe}from"./circle-play-BvVg4iiT.js";import"./dist-DblYTes5.js";import"./dist-D-2yWcX9.js";import"./dist-CNKFZCiw.js";import"./dist-ZjSH4Z6x.js";import"./dist-BtrqKtvn.js";import"./session-CsT5Gg9j.js";import{r as ue}from"./useTheme-D_ZbTTJw.js";import"./purify.es-DfJp_of2.js";import{n as he,r as U}from"./CellStatus-B3d9WY2x.js";import"./vega-loader.browser-CZV6_g2i.js";import{r as fe,t as xe}from"./react-vega-DJIihc-q.js";import"./defaultLocale-OkOxlkkM.js";import"./defaultLocale-DK1MWd7f.js";import{t as ve}from"./cell-link-exzcyUhT.js";import{n as ge,r as je,t as J}from"./react-resizable-panels.browser.esm-Ce2ksurd.js";import{t as ye}from"./bundle.esm-D544r2Sr.js";import{t as Ie}from"./empty-state-QmmE2oN4.js";import"./multi-icon-CTvmuLdL.js";import{r as Se}from"./panel-context-DC1vAeB3.js";import{t as be}from"./clear-button-DhIdI0ng.js";import{n as Ne,t as we}from"./runs-ChtaccFx.js";var ke=oe("circle-ellipsis",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M7 12h.01",key:"eqddd0"}]]),H=ae(),C=q(te(),1);const V="hoveredCellId",Y="cellHover";var Re="cellNum",G="cell",O="startTimestamp",K="endTimestamp",Q="status";function Te(t,e,r,a){let i="hoursminutessecondsmilliseconds";return{$schema:"https://vega.github.io/schema/vega-lite/v6.json",background:a==="dark"?"black":void 0,mark:{type:"bar",cornerRadius:2},params:[{name:V,bind:{element:`#${e}`}},{name:Y,select:{type:"point",on:"mouseover",fields:[G],clear:"mouseout"}}],height:{step:r==="sideBySide"?26:21},encoding:{y:{field:Re,scale:{paddingInner:.2},sort:{field:"sortPriority"},title:"cell",axis:r==="sideBySide"?null:void 0},x:{field:O,type:"temporal",axis:{orient:"top",title:null}},x2:{field:K,type:"temporal"},tooltip:[{field:O,type:"temporal",timeUnit:i,title:"Start"},{field:K,type:"temporal",timeUnit:i,title:"End"}],size:{value:{expr:`${V} == toString(datum.${G}) ? 19.5 : 18`}},color:{field:Q,scale:{domain:["success","error"],range:["#37BE5F","red"]},legend:null}},data:{values:t},transform:[{calculate:`datum.${Q} === 'queued' ? 9999999999999 : datum.${O}`,as:"sortPriority"}],config:{view:{stroke:"transparent"}}}}function W(t){try{let e=new Date(t*1e3);return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")} ${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}:${String(e.getSeconds()).padStart(2,"0")}.${String(e.getMilliseconds()).padStart(3,"0")}`}catch{return""}}var l=q(ne(),1),X=ee(new Map);const Ee=()=>{let t=(0,H.c)(34),{runIds:e,runMap:r}=F(we),a=F(X),{clearRuns:i}=Ne(),{theme:n}=ue(),[s,k]=(0,C.useState)("above"),N=Se(),c;t[0]===s?c=t[1]:(c=()=>{k(s==="above"?"sideBySide":"above")},t[0]=s,t[1]=c);let m=c;if(e.length===0){let p;return t[2]===Symbol.for("react.memo_cache_sentinel")?(p=(0,l.jsx)(Ie,{title:"No traces",description:(0,l.jsx)("span",{children:"Cells that have ran will appear here."}),icon:(0,l.jsx)(se,{})}),t[2]=p):p=t[2],p}let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=(0,l.jsx)("label",{htmlFor:"chartPosition",className:"text-xs",children:"Inline chart"}),t[3]=u):u=t[3];let y=s==="sideBySide",o;t[4]!==y||t[5]!==m?(o=(0,l.jsxs)("div",{className:"flex flex-row gap-1 items-center",children:[u,(0,l.jsx)("input",{type:"checkbox",name:"chartPosition","data-testid":"chartPosition",onClick:m,defaultChecked:y,className:"h-3 cursor-pointer"})]}),t[4]=y,t[5]=m,t[6]=o):o=t[6];let h;t[7]===i?h=t[8]:(h=(0,l.jsx)(be,{dataTestId:"clear-traces-button",onClick:i}),t[7]=i,t[8]=h);let v;t[9]!==o||t[10]!==h?(v=(0,l.jsxs)("div",{className:"flex flex-row justify-start gap-3",children:[o,h]}),t[9]=o,t[10]=h,t[11]=v):v=t[11];let g;if(t[12]!==s||t[13]!==a||t[14]!==e||t[15]!==r||t[16]!==n){let p;t[18]!==s||t[19]!==a||t[20]!==r||t[21]!==n?(p=(E,P)=>{let T=r.get(E);return T?(0,l.jsx)(Me,{run:T,isExpanded:a.get(T.runId),isMostRecentRun:P===0,chartPosition:s,theme:n},T.runId):null},t[18]=s,t[19]=a,t[20]=r,t[21]=n,t[22]=p):p=t[22],g=e.map(p),t[12]=s,t[13]=a,t[14]=e,t[15]=r,t[16]=n,t[17]=g}else g=t[17];let j;t[23]===g?j=t[24]:(j=(0,l.jsx)("div",{className:"flex flex-col gap-3",children:g}),t[23]=g,t[24]=j);let w;t[25]!==v||t[26]!==j?(w=(0,l.jsxs)("div",{className:"py-1 px-2 overflow-y-scroll h-full",children:[v,j]}),t[25]=v,t[26]=j,t[27]=w):w=t[27];let f=w;if(N==="sidebar")return f;let x;t[28]===f?x=t[29]:(x=(0,l.jsx)(J,{defaultSize:50,minSize:30,maxSize:80,children:f}),t[28]=f,t[29]=x);let d;t[30]===Symbol.for("react.memo_cache_sentinel")?(d=(0,l.jsx)(je,{className:"w-1 bg-border hover:bg-primary/50 transition-colors"}),t[30]=d):d=t[30];let I;t[31]===Symbol.for("react.memo_cache_sentinel")?(I=(0,l.jsx)(J,{defaultSize:50,children:(0,l.jsx)("div",{})}),t[31]=I):I=t[31];let S;return t[32]===x?S=t[33]:(S=(0,l.jsxs)(ge,{direction:"horizontal",className:"h-full",children:[x,d,I]}),t[32]=x,t[33]=S),S};var Me=({run:t,isMostRecentRun:e,chartPosition:r,isExpanded:a,theme:i})=>{let n=Z(X);a??(a=e);let s=()=>{n(c=>{let m=new Map(c);return m.set(t.runId,!a),m})},k=(0,l.jsx)(a?de:ce,{height:16,className:"inline"}),N=(0,l.jsxs)("span",{className:"text-sm cursor-pointer",onClick:s,children:["Run - ",L(t.runStartTime),k]});return a?(0,l.jsx)(_e,{run:t,chartPosition:r,theme:i,title:N},t.runId):(0,l.jsx)("div",{className:"flex flex-col",children:(0,l.jsx)("pre",{className:"font-mono font-semibold",children:N})},t.runId)},_e=t=>{let e=(0,H.c)(40),{run:r,chartPosition:a,theme:i,title:n}=t,[s,k]=(0,C.useState)(),N=(0,C.useRef)(null),{ref:c,width:m}=ye(),u=m===void 0?300:m,y=le(),o,h;if(e[0]!==y||e[1]!==a||e[2]!==r.cellRuns||e[3]!==r.runId||e[4]!==i){let R=[...r.cellRuns.values()].map(b=>{let M=b.elapsedTime??0;return{cell:b.cellId,cellNum:y.inOrderIds.indexOf(b.cellId),startTimestamp:W(b.startTime),endTimestamp:W(b.startTime+M),elapsedTime:U(M*1e3),status:b.status}});o=`hiddenInputElement-${r.runId}`,h=fe(Te(R,o,a,i)),e[0]=y,e[1]=a,e[2]=r.cellRuns,e[3]=r.runId,e[4]=i,e[5]=o,e[6]=h}else o=e[5],h=e[6];let v=h.spec,g=i==="dark"?"dark":void 0,j=u-50,w=a==="above"?120:100,f;e[7]!==g||e[8]!==j||e[9]!==w?(f={theme:g,width:j,height:w,actions:!1,mode:"vega",renderer:"canvas"},e[7]=g,e[8]=j,e[9]=w,e[10]=f):f=e[10];let x;e[11]!==f||e[12]!==v?(x={ref:N,spec:v,options:f},e[11]=f,e[12]=v,e[13]=x):x=e[13];let d=xe(x),I;e[14]===(d==null?void 0:d.view)?I=e[15]:(I=()=>{let R=[{signalName:Y,handler:(b,M)=>{var z;k(((z=M.cell)==null?void 0:z[0])??void 0??null)}}];return R.forEach(b=>{let{signalName:M,handler:z}=b;d==null||d.view.addSignalListener(M,z)}),()=>{R.forEach(b=>{let{signalName:M,handler:z}=b;d==null||d.view.removeSignalListener(M,z)})}},e[14]=d==null?void 0:d.view,e[15]=I);let S;e[16]===d?S=e[17]:(S=[d],e[16]=d,e[17]=S),(0,C.useEffect)(I,S);let p;e[18]!==o||e[19]!==s||e[20]!==r?(p=(0,l.jsx)($e,{run:r,hoveredCellId:s,hiddenInputElementId:o}),e[18]=o,e[19]=s,e[20]=r,e[21]=p):p=e[21];let E=p,P=a==="sideBySide"?"-mt-0.5 flex-1":"",T;e[22]===Symbol.for("react.memo_cache_sentinel")?(T=(0,l.jsx)(C.Suspense,{children:(0,l.jsx)("div",{ref:N})}),e[22]=T):T=e[22];let B;e[23]!==c||e[24]!==P?(B=(0,l.jsx)("div",{className:P,ref:c,children:T}),e[23]=c,e[24]=P,e[25]=B):B=e[25];let _=B;if(a==="above"){let R;e[26]!==_||e[27]!==n||e[28]!==E?(R=(0,l.jsxs)("pre",{className:"font-mono font-semibold",children:[n,_,E]}),e[26]=_,e[27]=n,e[28]=E,e[29]=R):R=e[29];let b;return e[30]!==r.runId||e[31]!==R?(b=(0,l.jsx)("div",{className:"flex flex-col",children:R},r.runId),e[30]=r.runId,e[31]=R,e[32]=b):b=e[32],b}let $;e[33]!==n||e[34]!==E?($=(0,l.jsxs)("pre",{className:"font-mono font-semibold",children:[n,E]}),e[33]=n,e[34]=E,e[35]=$):$=e[35];let D;return e[36]!==_||e[37]!==r.runId||e[38]!==$?(D=(0,l.jsxs)("div",{className:"flex flex-row",children:[$,_]},r.runId),e[36]=_,e[37]=r.runId,e[38]=$,e[39]=D):D=e[39],D},$e=t=>{let e=(0,H.c)(12),{run:r,hoveredCellId:a,hiddenInputElementId:i}=t,n=(0,C.useRef)(null),s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o=>{n.current&&(n.current.value=String(o),n.current.dispatchEvent(new Event("input",{bubbles:!0})))},e[0]=s):s=e[0];let k=s,N=a||"",c;e[1]!==i||e[2]!==N?(c=(0,l.jsx)("input",{type:"text",id:i,defaultValue:N,hidden:!0,ref:n}),e[1]=i,e[2]=N,e[3]=c):c=e[3];let m;e[4]===r.cellRuns?m=e[5]:(m=[...r.cellRuns.values()],e[4]=r.cellRuns,e[5]=m);let u;e[6]!==a||e[7]!==m?(u=m.map(o=>(0,l.jsx)(Ce,{cellRun:o,hovered:o.cellId===a,dispatchHoverEvent:k},o.cellId)),e[6]=a,e[7]=m,e[8]=u):u=e[8];let y;return e[9]!==c||e[10]!==u?(y=(0,l.jsxs)("div",{className:"text-xs mt-0.5 ml-3 flex flex-col gap-0.5",children:[c,u]}),e[9]=c,e[10]=u,e[11]=y):y=e[11],y},ze={success:(0,l.jsx)(me,{color:"green",size:14}),running:(0,l.jsx)(pe,{color:"var(--blue-10)",size:14}),error:(0,l.jsx)(re,{color:"red",size:14}),queued:(0,l.jsx)(ke,{color:"grey",size:14})},Ce=t=>{let e=(0,H.c)(39),{cellRun:r,hovered:a,dispatchHoverEvent:i}=t,n;e[0]===r.elapsedTime?n=e[1]:(n=r.elapsedTime?U(r.elapsedTime*1e3):"-",e[0]=r.elapsedTime,e[1]=n);let s=n,k;e[2]!==r.elapsedTime||e[3]!==s?(k=r.elapsedTime?(0,l.jsxs)("span",{children:["This cell took ",(0,l.jsx)(he,{elapsedTime:s})," to run"]}):(0,l.jsx)("span",{children:"This cell has not been run"}),e[2]=r.elapsedTime,e[3]=s,e[4]=k):k=e[4];let N=k,c;e[5]!==r.cellId||e[6]!==i?(c=()=>{i(r.cellId)},e[5]=r.cellId,e[6]=i,e[7]=c):c=e[7];let m=c,u;e[8]===i?u=e[9]:(u=()=>{i(null)},e[8]=i,e[9]=u);let y=u,o=a&&"bg-(--gray-3) opacity-100",h;e[10]===o?h=e[11]:(h=ie("flex flex-row gap-2 py-1 px-1 opacity-70 hover:bg-(--gray-3) hover:opacity-100",o),e[10]=o,e[11]=h);let v;e[12]===r.startTime?v=e[13]:(v=L(r.startTime),e[12]=r.startTime,e[13]=v);let g;e[14]===v?g=e[15]:(g=(0,l.jsxs)("span",{className:"text-(--gray-10) dark:text-(--gray-11)",children:["[",v,"]"]}),e[14]=v,e[15]=g);let j;e[16]===r.cellId?j=e[17]:(j=(0,l.jsxs)("span",{className:"text-(--gray-10) w-16 overflow-hidden",children:["(",(0,l.jsx)(ve,{cellId:r.cellId}),")"]}),e[16]=r.cellId,e[17]=j);let w;e[18]===r.code?w=e[19]:(w=(0,l.jsx)("span",{className:"w-40 truncate -ml-1",children:r.code}),e[18]=r.code,e[19]=w);let f;e[20]===s?f=e[21]:(f=(0,l.jsx)("span",{className:"text-(--gray-10) dark:text-(--gray-11)",children:s}),e[20]=s,e[21]=f);let x;e[22]!==N||e[23]!==f?(x=(0,l.jsx)(A,{content:N,children:f}),e[22]=N,e[23]=f,e[24]=x):x=e[24];let d=ze[r.status],I;e[25]!==r.status||e[26]!==d?(I=(0,l.jsx)(A,{content:r.status,children:d}),e[25]=r.status,e[26]=d,e[27]=I):I=e[27];let S;e[28]!==x||e[29]!==I?(S=(0,l.jsxs)("div",{className:"flex flex-row gap-1 w-16 justify-end -ml-2",children:[x,I]}),e[28]=x,e[29]=I,e[30]=S):S=e[30];let p;return e[31]!==m||e[32]!==y||e[33]!==w||e[34]!==S||e[35]!==h||e[36]!==g||e[37]!==j?(p=(0,l.jsxs)("div",{className:h,onMouseEnter:m,onMouseLeave:y,children:[g,j,w,S]}),e[31]=m,e[32]=y,e[33]=w,e[34]=S,e[35]=h,e[36]=g,e[37]=j,e[38]=p):p=e[38],p};export{Ee as Tracing};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./tracing-DRF9vr86.js","./clear-button-DhIdI0ng.js","./cn-X2M2usMq.js","./clsx-BtEcuwwV.js","./compiler-runtime-B3qBwwSJ.js","./react-Bj1aDYRI.js","./chunk-LvLJmgfZ.js","./jsx-runtime-PbYoItBR.js","./cells-B7YKR2ed.js","./preload-helper-BW0IMuFq.js","./badge-6yGCqY1Z.js","./button-BF7GSjhW.js","./useEventListener-BakX-tnw.js","./fullscreen-BXI8V5i6.js","./react-dom-CSu739Rf.js","./menu-items-CQMqwayA.js","./select-Cjly7tmx.js","./dist-DCqDlsgq.js","./check-DQmqoJgr.js","./createLucideIcon-BTp1tQDO.js","./x-9vLEgLY6.js","./tooltip-CgQpRVyN.js","./use-toast-kCNiuc-_.js","./utils-Dev6I_Kv.js","./useEvent-D91BmmQi.js","./invariant-C2E8KCbD.js","./merge-_9WLTEyt.js","./_baseFor-DKD1r8uL.js","./isObject-DvLSfCY5.js","./zod-H_cgTO0M.js","./DeferredRequestRegistry-RuL7NV1n.js","./Deferred-BMfCOLaw.js","./uuid-ClFZlR7U.js","./config-3clPIEB9.js","./constants-B9JJ72XE.js","./session-CsT5Gg9j.js","./requests-KshNNAOp.js","./useLifecycle-Baf35rp4.js","./useNonce-0SWz6w4W.js","./useTheme-D_ZbTTJw.js","./arrays-DWxvyYxP.js","./strings-DvZlHYnD.js","./capabilities-CjNGDxxx.js","./once-CXj_gH7S.js","./createReducer-3wF4dU7I.js","./paths-DhuNSnZ_.js","./dist-B0WqBUnf.js","./dist-Dez1I5M9.js","./dist-CwfKvuyQ.js","./dist-DblYTes5.js","./dist-D-2yWcX9.js","./dist-CNKFZCiw.js","./dist-ZjSH4Z6x.js","./dist-BtrqKtvn.js","./dist-CfGDksO-.js","./stex-0ac7Aukl.js","./toDate-DCE7d2fN.js","./purify.es-DfJp_of2.js","./cjs-DXo9vDEJ.js","./debounce-OiXznToA.js","./now-CsYTPAhW.js","./isSymbol-BT6B8Bon.js","./database-zap-DIlSqcdp.js","./main-DmhaVp6Y.js","./cells-BVzo2MHf.css","./CellStatus-BT8TMjJf.js","./multi-icon-CTvmuLdL.js","./multi-icon-CW3_9bja.css","./useDateFormatter-CAlTJ8HV.js","./context-C2Ie4tn_.js","./SSRProvider-DX2edArU.js","./en-US-BXNio91F.js","./ban-CttLZK8l.js","./ellipsis-D0iYysLh.js","./refresh-cw-C9FftltI.js","./workflow-f8flhcJ1.js","./CellStatus-2Psjnl5F.css","./empty-state-QmmE2oN4.js","./panel-context-DC1vAeB3.js","./cell-link-DO4acQD0.js","./ImperativeModal-B62Q6S9l.js","./alert-dialog-CC0gG4Av.js","./dialog-DkJmIrsG.js","./input-DB2LiTiQ.js","./useDebounce-CpLI2dsc.js","./numbers-_ry1Nlla.js","./useNumberFormatter-CuxZh3Bq.js","./usePress-BSFUeqnS.js","./runs-BR6uJHTx.js","./react-vega-9vyn19ym.js","./precisionRound-BOmLQIKI.js","./defaultLocale-OkOxlkkM.js","./linear-HSKpWh7o.js","./timer-B6DpdVnC.js","./init-DZ5TV86b.js","./time-C7q-M_gT.js","./defaultLocale-DK1MWd7f.js","./range-DNqFcYmr.js","./vega-loader.browser-CZV6_g2i.js","./treemap-BY_mNGmB.js","./path-MXGY7b8Y.js","./colors-D952IYju.js","./ordinal-DwWQqd-e.js","./arc-CTRjCaaq.js","./math-BkqINfbU.js","./array-9XpbrfQ5.js","./step-vPM7ouyU.js","./line-BtYBewh-.js","./chevron-right-C7RH0Nc7.js","./circle-check-Q2N68uwG.js","./circle-play-BvVg4iiT.js","./react-resizable-panels.browser.esm-Ce2ksurd.js","./bundle.esm-D544r2Sr.js"])))=>i.map(i=>d[i]);
2
- import{s as m}from"./chunk-LvLJmgfZ.js";import{t as i}from"./react-Bj1aDYRI.js";import{t as n}from"./compiler-runtime-B3qBwwSJ.js";import{t as f}from"./jsx-runtime-PbYoItBR.js";import{t as _}from"./spinner-BbI9qk88.js";import{t as p}from"./preload-helper-BW0IMuFq.js";let c,u=(async()=>{let a,l,r,o,s;a=n(),l=m(i(),1),r=m(f(),1),o=l.lazy(()=>p(()=>import("./tracing-DRF9vr86.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112]),import.meta.url).then(t=>({default:t.Tracing}))),c=()=>{let t=(0,a.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)(l.Suspense,{fallback:(0,r.jsx)(s,{}),children:(0,r.jsx)(o,{})}),t[0]=e):e=t[0],e},s=()=>{let t=(0,a.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)("div",{className:"flex flex-col items-center justify-center h-full",children:(0,r.jsx)(_,{})}),t[0]=e):e=t[0],e}})();export{u as __tla,c as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./tracing-BMvzhCBv.js","./clear-button-DhIdI0ng.js","./cn-X2M2usMq.js","./clsx-BtEcuwwV.js","./compiler-runtime-B3qBwwSJ.js","./react-Bj1aDYRI.js","./chunk-LvLJmgfZ.js","./jsx-runtime-PbYoItBR.js","./cells-DENsmH9t.js","./preload-helper-BW0IMuFq.js","./badge-6yGCqY1Z.js","./button-BF7GSjhW.js","./useEventListener-BakX-tnw.js","./fullscreen-BXI8V5i6.js","./react-dom-CSu739Rf.js","./menu-items-CQMqwayA.js","./select-Cjly7tmx.js","./dist-DCqDlsgq.js","./check-DQmqoJgr.js","./createLucideIcon-BTp1tQDO.js","./x-9vLEgLY6.js","./tooltip-CgQpRVyN.js","./use-toast-kCNiuc-_.js","./utils-Dev6I_Kv.js","./useEvent-D91BmmQi.js","./invariant-C2E8KCbD.js","./merge-_9WLTEyt.js","./_baseFor-DKD1r8uL.js","./isObject-DvLSfCY5.js","./zod-H_cgTO0M.js","./DeferredRequestRegistry-RuL7NV1n.js","./Deferred-BMfCOLaw.js","./uuid-ClFZlR7U.js","./config-3clPIEB9.js","./constants-B9JJ72XE.js","./session-CsT5Gg9j.js","./requests-KshNNAOp.js","./useLifecycle-Baf35rp4.js","./useNonce-0SWz6w4W.js","./useTheme-D_ZbTTJw.js","./arrays-DWxvyYxP.js","./strings-DvZlHYnD.js","./capabilities-CjNGDxxx.js","./once-CXj_gH7S.js","./createReducer-3wF4dU7I.js","./paths-DhuNSnZ_.js","./dist-B0WqBUnf.js","./dist-Dez1I5M9.js","./dist-CwfKvuyQ.js","./dist-DblYTes5.js","./dist-D-2yWcX9.js","./dist-CNKFZCiw.js","./dist-ZjSH4Z6x.js","./dist-BtrqKtvn.js","./dist-CfGDksO-.js","./stex-0ac7Aukl.js","./toDate-DCE7d2fN.js","./purify.es-DfJp_of2.js","./cjs-DXo9vDEJ.js","./debounce-OiXznToA.js","./now-CsYTPAhW.js","./isSymbol-BT6B8Bon.js","./database-zap-DIlSqcdp.js","./main-DmhaVp6Y.js","./cells-BVzo2MHf.css","./CellStatus-B3d9WY2x.js","./multi-icon-CTvmuLdL.js","./multi-icon-CW3_9bja.css","./useDateFormatter-CAlTJ8HV.js","./context-C2Ie4tn_.js","./SSRProvider-DX2edArU.js","./en-US-BXNio91F.js","./ban-CttLZK8l.js","./ellipsis-D0iYysLh.js","./refresh-cw-C9FftltI.js","./workflow-f8flhcJ1.js","./CellStatus-2Psjnl5F.css","./empty-state-QmmE2oN4.js","./panel-context-DC1vAeB3.js","./cell-link-exzcyUhT.js","./ImperativeModal-B62Q6S9l.js","./alert-dialog-CC0gG4Av.js","./dialog-DkJmIrsG.js","./input-DB2LiTiQ.js","./useDebounce-CpLI2dsc.js","./numbers-_ry1Nlla.js","./useNumberFormatter-CuxZh3Bq.js","./usePress-BSFUeqnS.js","./runs-ChtaccFx.js","./react-vega-DJIihc-q.js","./precisionRound-BOmLQIKI.js","./defaultLocale-OkOxlkkM.js","./linear-BD0d4-bn.js","./timer-B6DpdVnC.js","./init-BpLL1fe9.js","./time-jEmAyVx0.js","./defaultLocale-DK1MWd7f.js","./range-DNqFcYmr.js","./vega-loader.browser-CZV6_g2i.js","./treemap-qinQgXo1.js","./path-DtYs9Dst.js","./colors-Dm6L93c7.js","./ordinal-BEKpVWu-.js","./arc-DUSwcTI9.js","./math-CpvW-dlE.js","./array-CEZNxKGf.js","./step-B5y1YzZ4.js","./line-BKm-YkCh.js","./chevron-right-C7RH0Nc7.js","./circle-check-Q2N68uwG.js","./circle-play-BvVg4iiT.js","./react-resizable-panels.browser.esm-Ce2ksurd.js","./bundle.esm-D544r2Sr.js"])))=>i.map(i=>d[i]);
2
+ import{s as m}from"./chunk-LvLJmgfZ.js";import{t as i}from"./react-Bj1aDYRI.js";import{t as n}from"./compiler-runtime-B3qBwwSJ.js";import{t as f}from"./jsx-runtime-PbYoItBR.js";import{t as _}from"./spinner-BbI9qk88.js";import{t as p}from"./preload-helper-BW0IMuFq.js";let c,u=(async()=>{let a,l,r,o,s;a=n(),l=m(i(),1),r=m(f(),1),o=l.lazy(()=>p(()=>import("./tracing-BMvzhCBv.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112]),import.meta.url).then(t=>({default:t.Tracing}))),c=()=>{let t=(0,a.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)(l.Suspense,{fallback:(0,r.jsx)(s,{}),children:(0,r.jsx)(o,{})}),t[0]=e):e=t[0],e},s=()=>{let t=(0,a.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)("div",{className:"flex flex-col items-center justify-center h-full",children:(0,r.jsx)(_,{})}),t[0]=e):e=t[0],e}})();export{u as __tla,c as default};
@@ -1 +1 @@
1
- import{s as b}from"./chunk-LvLJmgfZ.js";import{t as z}from"./react-Bj1aDYRI.js";import{br as S}from"./cells-B7YKR2ed.js";import{t as T}from"./compiler-runtime-B3qBwwSJ.js";import{_}from"./useEventListener-BakX-tnw.js";import{t as x}from"./cn-X2M2usMq.js";import{t as B}from"./jsx-runtime-PbYoItBR.js";import{t as M}from"./tooltip-CgQpRVyN.js";import{t as k}from"./button-BF7GSjhW.js";import{t as V}from"./createLucideIcon-BTp1tQDO.js";import{t as P}from"./chevron-right-C7RH0Nc7.js";import{n as R,t as A}from"./eye-off-DI0EQXw0.js";import{t as D}from"./refresh-cw-C9FftltI.js";var E=V("chevrons-down-up",[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]]);const j={keyBy(o,t){let e=new Map,a=new Set;for(let s of o){let r=t(s);e.has(r)&&a.add(r),e.set(r,s)}return a.size>0&&_.trace(`Duplicate keys: ${[...a].join(", ")}`),e},collect(o,t,e){return j.mapValues(j.keyBy(o,t),e)},filterMap(o,t){let e=new Map;for(let[a,s]of o)t(s,a)&&e.set(a,s);return e},mapValues(o,t){let e=new Map;for(let[a,s]of o)e.set(a,t(s,a));return e}};var v=T(),C=b(z(),1),m=b(B(),1);const I=o=>{let t=(0,v.c)(5),{isExpanded:e,className:a}=o,s=e&&"rotate-90",r;t[0]!==a||t[1]!==s?(r=x("shrink-0 transition-transform",s,a),t[0]=a,t[1]=s,t[2]=r):r=t[2];let i;return t[3]===r?i=t[4]:(i=(0,m.jsx)(P,{className:r}),t[3]=r,t[4]=i),i},$=({onClick:o,tooltip:t="Refresh",className:e,iconClassName:a})=>{let[s,r]=(0,C.useState)(!1);return(0,m.jsx)(M,{content:t,children:(0,m.jsx)(k,{variant:"text",size:"xs",className:e,onClick:(0,C.useCallback)(async i=>{r(!0);let l=new Promise(n=>setTimeout(n,500));try{await Promise.all([o(i),l])}finally{r(!1)}},[o]),children:(0,m.jsx)(D,{className:x("h-4 w-4",a,s&&"animate-[spin_0.5s]")})})})},q=o=>{let t=(0,v.c)(15),{isVisible:e,onToggle:a,showTooltip:s,hideTooltip:r,size:i,className:l,iconClassName:n,"data-testid":c}=o,u=i===void 0?"xs":i,y=e?S:A,w=e?r:s,N=e&&"text-primary",p;t[0]!==n||t[1]!==N?(p=x("h-4 w-4",N,n),t[0]=n,t[1]=N,t[2]=p):p=t[2];let f;t[3]!==y||t[4]!==p?(f=(0,m.jsx)(y,{className:p}),t[3]=y,t[4]=p,t[5]=f):f=t[5];let d;t[6]!==l||t[7]!==c||t[8]!==a||t[9]!==u||t[10]!==f?(d=(0,m.jsx)(k,{"data-testid":c,variant:"text",size:u,className:l,onClick:a,children:f}),t[6]=l,t[7]=c,t[8]=a,t[9]=u,t[10]=f,t[11]=d):d=t[11];let h;return t[12]!==w||t[13]!==d?(h=(0,m.jsx)(M,{content:w,children:d}),t[12]=w,t[13]=d,t[14]=h):h=t[14],h},g=C.forwardRef((o,t)=>{let e=(0,v.c)(15),a,s,r;e[0]===o?(a=e[1],s=e[2],r=e[3]):({className:a,iconClassName:s,...r}=o,e[0]=o,e[1]=a,e[2]=s,e[3]=r);let i;e[4]===a?i=e[5]:(i=x("mb-0 opacity-0 group-hover:opacity-100 transition-opacity",a),e[4]=a,e[5]=i);let l;e[6]===s?l=e[7]:(l=x("w-4 h-4",s),e[6]=s,e[7]=l);let n;e[8]===l?n=e[9]:(n=(0,m.jsx)(R,{className:l}),e[8]=l,e[9]=n);let c;return e[10]!==r||e[11]!==t||e[12]!==i||e[13]!==n?(c=(0,m.jsx)(k,{ref:t,variant:"text",tabIndex:-1,size:"xs",className:i,"aria-label":"More options",...r,children:n}),e[10]=r,e[11]=t,e[12]=i,e[13]=n,e[14]=c):c=e[14],c});g.displayName="MoreActionsButton";const F="h-3.5 w-3.5 mr-2";export{q as a,I as i,g as n,j as o,$ as r,E as s,F as t};
1
+ import{s as b}from"./chunk-LvLJmgfZ.js";import{t as z}from"./react-Bj1aDYRI.js";import{yr as S}from"./cells-DENsmH9t.js";import{t as T}from"./compiler-runtime-B3qBwwSJ.js";import{_}from"./useEventListener-BakX-tnw.js";import{t as x}from"./cn-X2M2usMq.js";import{t as B}from"./jsx-runtime-PbYoItBR.js";import{t as M}from"./tooltip-CgQpRVyN.js";import{t as k}from"./button-BF7GSjhW.js";import{t as V}from"./createLucideIcon-BTp1tQDO.js";import{t as P}from"./chevron-right-C7RH0Nc7.js";import{n as R,t as A}from"./eye-off-DI0EQXw0.js";import{t as D}from"./refresh-cw-C9FftltI.js";var E=V("chevrons-down-up",[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]]);const j={keyBy(o,t){let e=new Map,a=new Set;for(let s of o){let r=t(s);e.has(r)&&a.add(r),e.set(r,s)}return a.size>0&&_.trace(`Duplicate keys: ${[...a].join(", ")}`),e},collect(o,t,e){return j.mapValues(j.keyBy(o,t),e)},filterMap(o,t){let e=new Map;for(let[a,s]of o)t(s,a)&&e.set(a,s);return e},mapValues(o,t){let e=new Map;for(let[a,s]of o)e.set(a,t(s,a));return e}};var v=T(),C=b(z(),1),m=b(B(),1);const I=o=>{let t=(0,v.c)(5),{isExpanded:e,className:a}=o,s=e&&"rotate-90",r;t[0]!==a||t[1]!==s?(r=x("shrink-0 transition-transform",s,a),t[0]=a,t[1]=s,t[2]=r):r=t[2];let i;return t[3]===r?i=t[4]:(i=(0,m.jsx)(P,{className:r}),t[3]=r,t[4]=i),i},$=({onClick:o,tooltip:t="Refresh",className:e,iconClassName:a})=>{let[s,r]=(0,C.useState)(!1);return(0,m.jsx)(M,{content:t,children:(0,m.jsx)(k,{variant:"text",size:"xs",className:e,onClick:(0,C.useCallback)(async i=>{r(!0);let l=new Promise(n=>setTimeout(n,500));try{await Promise.all([o(i),l])}finally{r(!1)}},[o]),children:(0,m.jsx)(D,{className:x("h-4 w-4",a,s&&"animate-[spin_0.5s]")})})})},q=o=>{let t=(0,v.c)(15),{isVisible:e,onToggle:a,showTooltip:s,hideTooltip:r,size:i,className:l,iconClassName:n,"data-testid":c}=o,u=i===void 0?"xs":i,y=e?S:A,w=e?r:s,N=e&&"text-primary",p;t[0]!==n||t[1]!==N?(p=x("h-4 w-4",N,n),t[0]=n,t[1]=N,t[2]=p):p=t[2];let f;t[3]!==y||t[4]!==p?(f=(0,m.jsx)(y,{className:p}),t[3]=y,t[4]=p,t[5]=f):f=t[5];let d;t[6]!==l||t[7]!==c||t[8]!==a||t[9]!==u||t[10]!==f?(d=(0,m.jsx)(k,{"data-testid":c,variant:"text",size:u,className:l,onClick:a,children:f}),t[6]=l,t[7]=c,t[8]=a,t[9]=u,t[10]=f,t[11]=d):d=t[11];let h;return t[12]!==w||t[13]!==d?(h=(0,m.jsx)(M,{content:w,children:d}),t[12]=w,t[13]=d,t[14]=h):h=t[14],h},g=C.forwardRef((o,t)=>{let e=(0,v.c)(15),a,s,r;e[0]===o?(a=e[1],s=e[2],r=e[3]):({className:a,iconClassName:s,...r}=o,e[0]=o,e[1]=a,e[2]=s,e[3]=r);let i;e[4]===a?i=e[5]:(i=x("mb-0 opacity-0 group-hover:opacity-100 transition-opacity",a),e[4]=a,e[5]=i);let l;e[6]===s?l=e[7]:(l=x("w-4 h-4",s),e[6]=s,e[7]=l);let n;e[8]===l?n=e[9]:(n=(0,m.jsx)(R,{className:l}),e[8]=l,e[9]=n);let c;return e[10]!==r||e[11]!==t||e[12]!==i||e[13]!==n?(c=(0,m.jsx)(k,{ref:t,variant:"text",tabIndex:-1,size:"xs",className:i,"aria-label":"More options",...r,children:n}),e[10]=r,e[11]=t,e[12]=i,e[13]=n,e[14]=c):c=e[14],c});g.displayName="MoreActionsButton";const F="h-3.5 w-3.5 mr-2";export{q as a,I as i,g as n,j as o,$ as r,E as s,F as t};
@@ -1 +1 @@
1
- import"./chunk-TCCFYFTB-Cq0Vz6d2.js";import"./main-DmhaVp6Y.js";import{n as e}from"./chunk-B2363JML-CfyMMqBA.js";export{e as createTreemapServices};
1
+ import"./chunk-TCCFYFTB-Cq0Vz6d2.js";import"./main-DmhaVp6Y.js";import{n as e}from"./chunk-B2363JML-Dku8Kg6Q.js";export{e as createTreemapServices};
@@ -1 +1 @@
1
- import{s as ae}from"./chunk-LvLJmgfZ.js";import{d as ie,u as b}from"./useEvent-D91BmmQi.js";import{At as F,D as de,Hn as ne,Sr as se,Un as re,br as ce,ct as he,qi as me,tr as pe,v as ke,wr as fe,xr as ue}from"./cells-B7YKR2ed.js";import{t as ye}from"./compiler-runtime-B3qBwwSJ.js";import{c as be,i as xe,s as je}from"./utils-Dev6I_Kv.js";import{t as ve}from"./jsx-runtime-PbYoItBR.js";import{t as we}from"./label-CFvCMYuj.js";import{a as Ce,h as Ie}from"./download-DiInTgPW.js";import{r as ge}from"./requests-KshNNAOp.js";import{t as f}from"./createLucideIcon-BTp1tQDO.js";import{n as Q,r as V}from"./x-9vLEgLY6.js";import{t as ze}from"./chevron-right-C7RH0Nc7.js";import{t as G}from"./circle-plus-BIy1BGHw.js";import{t as We}from"./code-xml-tqeFGeKJ.js";import{t as Me}from"./eye-off-DI0EQXw0.js";import{t as _e}from"./image-BzUcK6ho.js";import{t as Se}from"./link-e5mRDDOC.js";import{i as Ae,t as De}from"./useDeleteCell-CXhTb-Wb.js";import{t as Te}from"./sparkles-COaEc8Qn.js";import{t as He}from"./trash-2-CqTUwVuU.js";import{t as Ne}from"./use-toast-kCNiuc-_.js";import{n as Re}from"./copy-D8MtpXgN.js";import{i as qe}from"./useRunCells-BQPsvZjd.js";import{a as Be,c as Ee,n as Le}from"./dialog-DkJmIrsG.js";import{n as Ue}from"./ImperativeModal-B62Q6S9l.js";import{n as Oe}from"./state-RefguD27.js";import{r as K}from"./html-to-image-C_aIFrkD.js";import{n as Pe,t as Fe}from"./icons-avFV3lBF.js";import{n as Z}from"./name-cell-input-DEi5F7_C.js";import{t as $}from"./multi-icon-CTvmuLdL.js";import{t as Qe}from"./useSplitCell-xGqWTYfJ.js";var J=f("chevrons-down",[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]]),X=f("chevrons-up",[["path",{d:"m17 11-5-5-5 5",key:"e8nh98"}],["path",{d:"m17 18-5-5-5 5",key:"2avn1x"}]]),Y=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"}]]),Ve=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 Ge(a){let e=new URL(window.location.href);return e.hash=`scrollTo=${encodeURIComponent(a)}`,e.toString()}function Ke(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 Ze=ye(),l=ae(ve(),1);function $e(a){let e=(0,Ze.c)(47),{cell:c,closePopover:u}=a,{createNewCell:m,updateCellConfig:s,updateCellName:x,moveCell:p,sendToTop:W,sendToBottom:M,addColumnBreakpoint:_,clearCellOutput:S,markUntouched:A}=de(),D=Qe(),T=qe(c==null?void 0:c.cellId),H=!b(ke),N=De(),{openModal:j}=Ue(),R=ie(Oe),q=b(xe),v=b(be),oe=b(he),y=b(je),{saveCellConfig:r}=ge();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:n,name:h,hasOutput:w,hasConsoleOutput:B,status:E}=c,C;e[1]!==o||e[2]!==i.disabled||e[3]!==r||e[4]!==s?(C=async()=>{let t={disabled:!i.disabled};await r({configs:{[o]:t}}),s({cellId:o,config:t})},e[1]=o,e[2]=i.disabled,e[3]=r,e[4]=s,e[5]=C):C=e[5];let L=C,I;e[6]!==o||e[7]!==i.hide_code||e[8]!==n||e[9]!==r||e[10]!==s?(I=async()=>{let t={hide_code:!i.hide_code};await r({configs:{[o]:t}}),s({cellId:o,config:t});let P=n();P&&(t.hide_code?P.contentDOM.blur():P.focus())},e[6]=o,e[7]=i.hide_code,e[8]=n,e[9]=r,e[10]=s,e[11]=I):I=e[11];let U=I,d=o===me,g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=(0,l.jsx)(Ae,{size:13,strokeWidth:1.5}),e[12]=g):g=e[12];let O=E==="running"||E==="queued"||E==="disabled-transitively"||i.disabled,k;e[13]===T?k=e[14]:(k=()=>T(),e[13]=T,e[14]=k);let z;return e[15]!==_||e[16]!==q||e[17]!==y||e[18]!==v||e[19]!==H||e[20]!==o||e[21]!==S||e[22]!==u||e[23]!==i.disabled||e[24]!==i.hide_code||e[25]!==m||e[26]!==N||e[27]!==n||e[28]!==B||e[29]!==w||e[30]!==d||e[31]!==A||e[32]!==p||e[33]!==h||e[34]!==j||e[35]!==r||e[36]!==M||e[37]!==W||e[38]!==R||e[39]!==D||e[40]!==O||e[41]!==k||e[42]!==L||e[43]!==U||e[44]!==s||e[45]!==x?(z=[[{icon:g,label:"Run cell",hotkey:"cell.run",hidden:O,redundant:!0,handle:k},{icon:(0,l.jsx)(Te,{size:13,strokeWidth:1.5}),label:"Refactor with AI",hidden:!q,handle:()=>{R(t=>(t==null?void 0:t.cellId)===o?null:{cellId:o})},hotkey:"cell.aiCompletion"},{icon:(0,l.jsx)(Y,{size:13,strokeWidth:1.5}),label:"Split",hotkey:"cell.splitCell",handle:()=>D({cellId:o})},{icon:(0,l.jsx)(We,{size:13,strokeWidth:1.5}),label:"Format",hotkey:"cell.format",handle:()=>{let t=n();t&&pe({[o]:t})}},{icon:i.hide_code?(0,l.jsx)(ce,{size:13,strokeWidth:1.5}):(0,l.jsx)(Me,{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:L,hidden:d}],[{icon:(0,l.jsx)(Fe,{}),label:"Convert to Markdown",hotkey:"cell.viewAsMarkdown",handle:async()=>{let t=n();t&&(K({autoInstantiate:v,createNewCell:m}),F(t,{language:"markdown",keepCodeAsIs:!1}),i.hide_code||(await r({configs:{[o]:{hide_code:!0}}}),s({cellId:o,config:{hide_code:!0}}),A({cellId:o})))},hidden:d},ne(n())==="sql"?{icon:(0,l.jsx)(Pe,{}),label:"View as Python",hotkey:"cell.viewAsSQL",handle:()=>{let t=n();t&&re(t,"python",{force:!0})},hidden:d}:{icon:(0,l.jsx)(ue,{size:13,strokeWidth:1.5}),label:"Convert to SQL",hotkey:"cell.viewAsSQL",handle:()=>{let t=n();t&&(K({autoInstantiate:v,createNewCell:m}),F(t,{language:"sql",keepCodeAsIs:!1}))},hidden:d}],[{icon:(0,l.jsxs)($,{children:[(0,l.jsx)(G,{size:13,strokeWidth:1.5}),(0,l.jsx)(Q,{size:8,strokeWidth:2})]}),label:"Create cell above",hotkey:"cell.createAbove",handle:()=>m({cellId:o,before:!0}),hidden:d,redundant:!0},{icon:(0,l.jsxs)($,{children:[(0,l.jsx)(G,{size:13,strokeWidth:1.5}),(0,l.jsx)(V,{size:8,strokeWidth:2})]}),label:"Create cell below",hotkey:"cell.createBelow",handle:()=>m({cellId:o,before:!1}),redundant:!0},{icon:(0,l.jsx)(Q,{size:13,strokeWidth:1.5}),label:"Move cell up",hotkey:"cell.moveUp",handle:()=>p({cellId:o,before:!0}),hidden:d},{icon:(0,l.jsx)(V,{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:y!=="columns"||d},{icon:(0,l.jsx)(ze,{size:13,strokeWidth:1.5}),label:"Move cell right",hotkey:"cell.moveRight",handle:()=>p({cellId:o,direction:"right"}),hidden:y!=="columns"||d},{icon:(0,l.jsx)(X,{size:13,strokeWidth:1.5}),label:"Send to top",hotkey:"cell.sendToTop",handle:()=>W({cellId:o,scroll:!1}),hidden:d},{icon:(0,l.jsx)(J,{size:13,strokeWidth:1.5}),label:"Send to bottom",hotkey:"cell.sendToBottom",handle:()=>M({cellId:o,scroll:!1}),hidden:d},{icon:(0,l.jsx)(se,{size:13,strokeWidth:1.5}),label:"Break into new column",hotkey:"cell.addColumnBreakpoint",handle:()=>_({cellId:o}),hidden:y!=="columns"||d}],[{icon:(0,l.jsx)(_e,{size:13,strokeWidth:1.5}),label:"Export output as PNG",hidden:!w,handle:()=>Ce(o,"result")},{icon:(0,l.jsx)(fe,{size:13,strokeWidth:1.5}),label:"Clear output",hidden:!(w||B),handle:()=>{S({cellId:o})}}],[{icon:(0,l.jsx)(Ve,{size:13,strokeWidth:1.5}),label:"Name",disableClick:!0,handle:el,handleHeadless:()=>{j((0,l.jsxs)(Le,{children:[(0,l.jsx)(Be,{children:(0,l.jsx)(Ee,{children:"Rename cell"})}),(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)(we,{htmlFor:"cell-name",children:"Cell name"}),(0,l.jsx)(Z,{placeholder:"cell name",value:h,onKeyDown:t=>{t.key==="Enter"&&(t.preventDefault(),t.stopPropagation(),j(null))},onChange:t=>x({cellId:o,name:t})})]})]}))},rightElement:(0,l.jsx)(Z,{placeholder:"cell name",value:h,onChange:t=>x({cellId:o,name:t}),onEnterKey:()=>u==null?void 0:u()}),hidden:d},{icon:(0,l.jsx)(Se,{size:13,strokeWidth:1.5}),label:"Copy link to cell",disabled:!te(h),tooltip:te(h)?void 0:"Only named cells can be linked to",handle:async()=>{await Re(Ge(h)),Ne({description:"Link copied to clipboard"})}}],[{label:"Delete",hidden:!H,variant:"danger",icon:(0,l.jsx)(He,{size:13,strokeWidth:1.5}),handle:()=>{N({cellId:o})}}]].map(Xe).filter(Je),e[15]=_,e[16]=q,e[17]=y,e[18]=v,e[19]=H,e[20]=o,e[21]=S,e[22]=u,e[23]=i.disabled,e[24]=i.hide_code,e[25]=m,e[26]=N,e[27]=n,e[28]=B,e[29]=w,e[30]=d,e[31]=A,e[32]=p,e[33]=h,e[34]=j,e[35]=r,e[36]=M,e[37]=W,e[38]=R,e[39]=D,e[40]=O,e[41]=k,e[42]=L,e[43]=U,e[44]=s,e[45]=x,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 el(a){a==null||a.stopPropagation(),a==null||a.preventDefault()}export{Y as a,ee as i,Ke as n,X as o,le as r,J as s,$e as t};
1
+ import{s as ae}from"./chunk-LvLJmgfZ.js";import{d as ie,u as b}from"./useEvent-D91BmmQi.js";import{Cr as de,D as ne,Hn as se,Ki as re,Vn as ce,br as he,ct as me,er as pe,kt as F,v as ke,xr as fe,yr as ue}from"./cells-DENsmH9t.js";import{t as ye}from"./compiler-runtime-B3qBwwSJ.js";import{c as be,i as xe,s as je}from"./utils-Dev6I_Kv.js";import{t as ve}from"./jsx-runtime-PbYoItBR.js";import{t as Ce}from"./label-CFvCMYuj.js";import{a as we,h as ge}from"./download-4NoBestd.js";import{r as Ie}from"./requests-KshNNAOp.js";import{t as f}from"./createLucideIcon-BTp1tQDO.js";import{n as V,r as K}from"./x-9vLEgLY6.js";import{t as ze}from"./chevron-right-C7RH0Nc7.js";import{t as Q}from"./circle-plus-BIy1BGHw.js";import{t as We}from"./code-xml-tqeFGeKJ.js";import{t as Me}from"./eye-off-DI0EQXw0.js";import{t as _e}from"./image-BzUcK6ho.js";import{t as Se}from"./link-e5mRDDOC.js";import{i as Ae,t as De}from"./useDeleteCell-DwNTIWuB.js";import{t as Te}from"./sparkles-COaEc8Qn.js";import{t as He}from"./trash-2-CqTUwVuU.js";import{t as Ne}from"./use-toast-kCNiuc-_.js";import{n as Re}from"./copy-D8MtpXgN.js";import{i as Be}from"./useRunCells-CTpvxsqp.js";import{a as Ee,c as Le,n as qe}from"./dialog-DkJmIrsG.js";import{n as Oe}from"./ImperativeModal-B62Q6S9l.js";import{n as Pe}from"./state-LM4pQmYL.js";import{r as G}from"./html-to-image-B6eCuh-2.js";import{n as Ue,t as Fe}from"./icons-avFV3lBF.js";import{n as X}from"./name-cell-input-CNq9BTL7.js";import{t as $}from"./multi-icon-CTvmuLdL.js";import{t as Ve}from"./useSplitCell-CFO4Cg5B.js";var J=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 Qe(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 Xe=ye(),l=ae(ve(),1);function $e(a){let e=(0,Xe.c)(47),{cell:c,closePopover:u}=a,{createNewCell:m,updateCellConfig:s,updateCellName:x,moveCell:p,sendToTop:W,sendToBottom:M,addColumnBreakpoint:_,clearCellOutput:S,markUntouched:A}=ne(),D=Ve(),T=Be(c==null?void 0:c.cellId),H=!b(ke),N=De(),{openModal:j}=Oe(),R=ie(Pe),B=b(xe),v=b(be),oe=b(me),y=b(je),{saveCellConfig:r}=Ie();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:n,name:h,hasOutput:C,hasConsoleOutput:E,status:L}=c,w;e[1]!==o||e[2]!==i.disabled||e[3]!==r||e[4]!==s?(w=async()=>{let t={disabled:!i.disabled};await r({configs:{[o]:t}}),s({cellId:o,config:t})},e[1]=o,e[2]=i.disabled,e[3]=r,e[4]=s,e[5]=w):w=e[5];let q=w,g;e[6]!==o||e[7]!==i.hide_code||e[8]!==n||e[9]!==r||e[10]!==s?(g=async()=>{let t={hide_code:!i.hide_code};await r({configs:{[o]:t}}),s({cellId:o,config:t});let U=n();U&&(t.hide_code?U.contentDOM.blur():U.focus())},e[6]=o,e[7]=i.hide_code,e[8]=n,e[9]=r,e[10]=s,e[11]=g):g=e[11];let O=g,d=o===re,I;e[12]===Symbol.for("react.memo_cache_sentinel")?(I=(0,l.jsx)(Ae,{size:13,strokeWidth:1.5}),e[12]=I):I=e[12];let P=L==="running"||L==="queued"||L==="disabled-transitively"||i.disabled,k;e[13]===T?k=e[14]:(k=()=>T(),e[13]=T,e[14]=k);let z;return e[15]!==_||e[16]!==B||e[17]!==y||e[18]!==v||e[19]!==H||e[20]!==o||e[21]!==S||e[22]!==u||e[23]!==i.disabled||e[24]!==i.hide_code||e[25]!==m||e[26]!==N||e[27]!==n||e[28]!==E||e[29]!==C||e[30]!==d||e[31]!==A||e[32]!==p||e[33]!==h||e[34]!==j||e[35]!==r||e[36]!==M||e[37]!==W||e[38]!==R||e[39]!==D||e[40]!==P||e[41]!==k||e[42]!==q||e[43]!==O||e[44]!==s||e[45]!==x?(z=[[{icon:I,label:"Run cell",hotkey:"cell.run",hidden:P,redundant:!0,handle:k},{icon:(0,l.jsx)(Te,{size:13,strokeWidth:1.5}),label:"Refactor with AI",hidden:!B,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:()=>D({cellId:o})},{icon:(0,l.jsx)(We,{size:13,strokeWidth:1.5}),label:"Format",hotkey:"cell.format",handle:()=>{let t=n();t&&pe({[o]:t})}},{icon:i.hide_code?(0,l.jsx)(ue,{size:13,strokeWidth:1.5}):(0,l.jsx)(Me,{size:13,strokeWidth:1.5}),label:i.hide_code?"Show code":"Hide code",handle:O,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:q,hidden:d}],[{icon:(0,l.jsx)(Fe,{}),label:"Convert to Markdown",hotkey:"cell.viewAsMarkdown",handle:async()=>{let t=n();t&&(G({autoInstantiate:v,createNewCell:m}),F(t,{language:"markdown",keepCodeAsIs:!1}),i.hide_code||(await r({configs:{[o]:{hide_code:!0}}}),s({cellId:o,config:{hide_code:!0}}),A({cellId:o})))},hidden:d},ce(n())==="sql"?{icon:(0,l.jsx)(Ue,{}),label:"View as Python",hotkey:"cell.viewAsSQL",handle:()=>{let t=n();t&&se(t,"python",{force:!0})},hidden:d}:{icon:(0,l.jsx)(he,{size:13,strokeWidth:1.5}),label:"Convert to SQL",hotkey:"cell.viewAsSQL",handle:()=>{let t=n();t&&(G({autoInstantiate:v,createNewCell:m}),F(t,{language:"sql",keepCodeAsIs:!1}))},hidden:d}],[{icon:(0,l.jsxs)($,{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:()=>m({cellId:o,before:!0}),hidden:d,redundant:!0},{icon:(0,l.jsxs)($,{children:[(0,l.jsx)(Q,{size:13,strokeWidth:1.5}),(0,l.jsx)(K,{size:8,strokeWidth:2})]}),label:"Create cell below",hotkey:"cell.createBelow",handle:()=>m({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)(K,{size:13,strokeWidth:1.5}),label:"Move cell down",hotkey:"cell.moveDown",handle:()=>p({cellId:o,before:!1}),hidden:d},{icon:(0,l.jsx)(ge,{size:13,strokeWidth:1.5}),label:"Move cell left",hotkey:"cell.moveLeft",handle:()=>p({cellId:o,direction:"left"}),hidden:y!=="columns"||d},{icon:(0,l.jsx)(ze,{size:13,strokeWidth:1.5}),label:"Move cell right",hotkey:"cell.moveRight",handle:()=>p({cellId:o,direction:"right"}),hidden:y!=="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)(J,{size:13,strokeWidth:1.5}),label:"Send to bottom",hotkey:"cell.sendToBottom",handle:()=>M({cellId:o,scroll:!1}),hidden:d},{icon:(0,l.jsx)(fe,{size:13,strokeWidth:1.5}),label:"Break into new column",hotkey:"cell.addColumnBreakpoint",handle:()=>_({cellId:o}),hidden:y!=="columns"||d}],[{icon:(0,l.jsx)(_e,{size:13,strokeWidth:1.5}),label:"Export output as PNG",hidden:!C,handle:()=>we(o,"result")},{icon:(0,l.jsx)(de,{size:13,strokeWidth:1.5}),label:"Clear output",hidden:!(C||E),handle:()=>{S({cellId:o})}}],[{icon:(0,l.jsx)(Ke,{size:13,strokeWidth:1.5}),label:"Name",disableClick:!0,handle:el,handleHeadless:()=>{j((0,l.jsxs)(qe,{children:[(0,l.jsx)(Ee,{children:(0,l.jsx)(Le,{children:"Rename cell"})}),(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)(Ce,{htmlFor:"cell-name",children:"Cell name"}),(0,l.jsx)(X,{placeholder:"cell name",value:h,onKeyDown:t=>{t.key==="Enter"&&(t.preventDefault(),t.stopPropagation(),j(null))},onChange:t=>x({cellId:o,name:t})})]})]}))},rightElement:(0,l.jsx)(X,{placeholder:"cell name",value:h,onChange:t=>x({cellId:o,name:t}),onEnterKey:()=>u==null?void 0:u()}),hidden:d},{icon:(0,l.jsx)(Se,{size:13,strokeWidth:1.5}),label:"Copy link to cell",disabled:!te(h),tooltip:te(h)?void 0:"Only named cells can be linked to",handle:async()=>{await Re(Qe(h)),Ne({description:"Link copied to clipboard"})}}],[{label:"Delete",hidden:!H,variant:"danger",icon:(0,l.jsx)(He,{size:13,strokeWidth:1.5}),handle:()=>{N({cellId:o})}}]].map(Ye).filter(Je),e[15]=_,e[16]=B,e[17]=y,e[18]=v,e[19]=H,e[20]=o,e[21]=S,e[22]=u,e[23]=i.disabled,e[24]=i.hide_code,e[25]=m,e[26]=N,e[27]=n,e[28]=E,e[29]=C,e[30]=d,e[31]=A,e[32]=p,e[33]=h,e[34]=j,e[35]=r,e[36]=M,e[37]=W,e[38]=R,e[39]=D,e[40]=P,e[41]=k,e[42]=q,e[43]=O,e[44]=s,e[45]=x,e[46]=z):z=e[46],z}function Je(a){return a.length>0}function Ye(a){return a.filter(Ze)}function Ze(a){return!a.hidden}function el(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,J as s,$e as t};