@marimo-team/frontend 0.14.18-dev8 → 0.15.0

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 (1284) hide show
  1. package/dist/assets/{ConnectedDataExplorerComponent-B6NVG7Fy.js → ConnectedDataExplorerComponent-Bl5fR_87.js} +1 -1
  2. package/dist/assets/{ImageComparisonComponent-3KcZa9Ym.js → ImageComparisonComponent-CRfr-CiC.js} +1 -1
  3. package/dist/assets/{VegaLite-CtkqxS0X.js → VegaLite-Bo_A9ZZm.js} +1 -1
  4. package/dist/assets/{_baseEach-CjvI0y7T.js → _baseEach-CIMlsWNn.js} +1 -1
  5. package/dist/assets/_baseMap-1GEe_WcR.js +1 -0
  6. package/dist/assets/{_baseUniq-Ds9S94xv.js → _baseUniq-CGK6su7v.js} +1 -1
  7. package/dist/assets/{_createAggregator-Bqe-A14O.js → _createAggregator--z161kAx.js} +1 -1
  8. package/dist/assets/{any-language-editor-CGmtjfJH.js → any-language-editor-hSTaStg9.js} +1 -1
  9. package/dist/assets/architectureDiagram-KFL7JDKH-CqrWvX5_.js +36 -0
  10. package/dist/assets/blockDiagram-ZYB65J3Q-CRgdhCYU.js +122 -0
  11. package/dist/assets/{c4Diagram-6F6E4RAY-CvGMgd-R.js → c4Diagram-AAMF2YG6-DUHfB-bk.js} +1 -1
  12. package/dist/assets/channel-D31q3TW_.js +1 -0
  13. package/dist/assets/{chunk-353BL4L5-BJhgRHK-.js → chunk-ANTBXLJU-ZgvmG8Pb.js} +1 -1
  14. package/dist/assets/{chunk-AACKK3MU-tA3KIhd1.js → chunk-FHKO5MBM-B-EzrMTM.js} +1 -1
  15. package/dist/assets/{chunk-E2GYISFI-uWIZ1Jhx.js → chunk-GLLZNHP4-DRBUPzV6.js} +1 -1
  16. package/dist/assets/{chunk-SZ463SBG-DHkdo7UI.js → chunk-JBRWN2VN-vkbXs27X.js} +4 -4
  17. package/dist/assets/{chunk-OW32GOEJ-B-QB95S1.js → chunk-LXBSTHXV-itspTgVu.js} +6 -6
  18. package/dist/assets/{chunk-SKB7J2MH-DPsXY34k.js → chunk-NRVI72HA-gO-7Uy2L.js} +1 -1
  19. package/dist/assets/{chunk-67H74DCK-BWX3D-qq.js → chunk-OMD6QJNC-CwDxph2q.js} +1 -1
  20. package/dist/assets/{chunk-BFAMUDN2-CY30V5X_.js → chunk-WVR4S24B-DkjWv9uk.js} +1 -1
  21. package/dist/assets/{circle-play-DvNUYBOa.js → circle-play-BURxVoHD.js} +1 -1
  22. package/dist/assets/classDiagram-3BZAVTQC-0O2jYKfn.js +1 -0
  23. package/dist/assets/classDiagram-v2-QTMF73CY-0O2jYKfn.js +1 -0
  24. package/dist/assets/clone-DFaYgbfI.js +1 -0
  25. package/dist/assets/common-keywords-Dg3Y2cJS.js +1 -0
  26. package/dist/assets/{compile-yfBBBvDb.js → compile-CQlZ79Z5.js} +1 -1
  27. package/dist/assets/cytoscape.esm-UcEO6FGL.js +325 -0
  28. package/dist/assets/{dagre-JOIXM2OF-CGKrq8GI.js → dagre-2BBEFEWP-DEiqD84H.js} +1 -1
  29. package/dist/assets/{data-grid-overlay-editor-BeUIwx4E.js → data-grid-overlay-editor-CS6yXy6C.js} +1 -1
  30. package/dist/assets/{diagram-VMROVX33-BAO1guE0.js → diagram-4IRLE6MV-ommhV7Ge.js} +1 -1
  31. package/dist/assets/diagram-GUPCWM2R-D09B2kyR.js +24 -0
  32. package/dist/assets/{diagram-ZTM2IBQH-B4LQUmZH.js → diagram-RP2FKANI-D1AZYHbD.js} +1 -1
  33. package/dist/assets/duckdb-keywords-CFYiiNsB.js +1 -0
  34. package/dist/assets/edit-page-DhSV7e13.js +163 -0
  35. package/dist/assets/{erDiagram-3M52JZNH-D3kcrriI.js → erDiagram-HZWUO2LU-Civ5tj0J.js} +1 -1
  36. package/dist/assets/flowDiagram-THRYKUMA--HeKh8ql.js +162 -0
  37. package/dist/assets/ganttDiagram-WV7ZQ7D5-YEcfQSSf.js +267 -0
  38. package/dist/assets/{gitGraphDiagram-GW3U2K7C-Q9Tu2K8y.js → gitGraphDiagram-OJR772UL-DhkURReZ.js} +1 -1
  39. package/dist/assets/{glide-data-editor-ceB8jin-.js → glide-data-editor-CudlNmdp.js} +11 -11
  40. package/dist/assets/{graph-mQaQlEC0.js → graph-CQvdQbxU.js} +1 -1
  41. package/dist/assets/{home-page-DfH28tMw.js → home-page-_l6RVaRB.js} +2 -2
  42. package/dist/assets/{index-DdiulcY3.js → index-3z3sI3MY.js} +1 -1
  43. package/dist/assets/{index-DF_6z97_.js → index-6WfEFtf2.js} +1 -1
  44. package/dist/assets/{index-DZeLh41D.js → index-B9dXZoY1.js} +1 -1
  45. package/dist/assets/{index-ynTLoSgO.js → index-BCdqiRjH.js} +1 -1
  46. package/dist/assets/{index-CoLaKlH0.js → index-BvRQ66y_.js} +1 -1
  47. package/dist/assets/{index-BbKaEGro.js → index-C6CvZyWd.js} +1 -1
  48. package/dist/assets/{index-Cs6LYSt0.js → index-CAtmZMbK.js} +1 -1
  49. package/dist/assets/{index-6r7UeFlf.js → index-CbNkOFUU.js} +1 -1
  50. package/dist/assets/{index-D1qx1y0C.js → index-CqRTe3S2.js} +1 -1
  51. package/dist/assets/index-CrH6PPjG.css +1 -0
  52. package/dist/assets/{index-Bl0C1eEM.js → index-CvLIL6JV.js} +1 -1
  53. package/dist/assets/{index-CKe-VV4U.js → index-D-8oCPO1.js} +1 -1
  54. package/dist/assets/index-D4bXoNM3.js +528 -0
  55. package/dist/assets/{index-BS0ZXaCb.js → index-DMtmziVF.js} +1 -1
  56. package/dist/assets/{index-Cd25JFtC.js → index-DZJOZ8C0.js} +1 -1
  57. package/dist/assets/index-DbsrZX7Q.js +68 -0
  58. package/dist/assets/{index-Bh4jjeua.js → index-DhRZE5tA.js} +1 -1
  59. package/dist/assets/{index-Cz8VHSaF.js → index-Do3KUHEe.js} +1 -1
  60. package/dist/assets/{index-j8KhNyAD.js → index-DvySElQ5.js} +1 -1
  61. package/dist/assets/{index-Bbz-vY_t.js → index-QoqjKBP_.js} +1 -1
  62. package/dist/assets/{index-CbFuBnKK.js → index-nyTtvXGx.js} +1 -1
  63. package/dist/assets/infoDiagram-6WOFNB3A-B7BrcI_a.js +2 -0
  64. package/dist/assets/{journeyDiagram-EWQZEKCU-DHnUk6vv.js → journeyDiagram-FFXJYRFH-CC3RaMZl.js} +4 -4
  65. package/dist/assets/{kanban-definition-ZSS6B67P-G4X25rf5.js → kanban-definition-KOZQBZVT-1Z4QU83I.js} +1 -1
  66. package/dist/assets/{layout-Ovgg_XTL.js → layout-DuQ9W6pS.js} +1 -1
  67. package/dist/assets/{linear-DT2F5lCA.js → linear-BsI0Wmp7.js} +1 -1
  68. package/dist/assets/links-D_cg4TpC.js +17 -0
  69. package/dist/assets/mermaid-D59lkToe.js +211 -0
  70. package/dist/assets/min-DrLfF3uL.js +1 -0
  71. package/dist/assets/{mindmap-definition-6CBA2TL7-DNdqOjtw.js → mindmap-definition-LNHGMQRG-ePnX66wd.js} +1 -1
  72. package/dist/assets/{number-overlay-editor-BNl24tu6.js → number-overlay-editor-CPxl07sM.js} +2 -2
  73. package/dist/assets/pieDiagram-DBDJKBY4-BWYaH6Hi.js +30 -0
  74. package/dist/assets/{quadrantDiagram-2OG54O6I--dNkbIMK.js → quadrantDiagram-YPSRARAO-BwuEJiK-.js} +1 -1
  75. package/dist/assets/{react-plotly-bwK_a_t1.js → react-plotly-eq8YBLKm.js} +1 -1
  76. package/dist/assets/{requirementDiagram-QOLK2EJ7-28ZDvOK8.js → requirementDiagram-EGVEC5DT-B0dO70r7.js} +1 -1
  77. package/dist/assets/{run-page-CJW1v8wr.js → run-page-DP_FNoql.js} +1 -1
  78. package/dist/assets/{sankeyDiagram-4UZDY2LN-XAKiDU7c.js → sankeyDiagram-HRAUVNP4-DlbnyCg4.js} +2 -2
  79. package/dist/assets/{sequenceDiagram-SKLFT4DO-DDCNXI_B.js → sequenceDiagram-WFGC7UMF-BfhFFLfz.js} +6 -6
  80. package/dist/assets/{slides-component-2aF-KcfL.js → slides-component-Bso9rHdK.js} +1 -1
  81. package/dist/assets/sortBy-utaS96Bi.js +1 -0
  82. package/dist/assets/{stateDiagram-MI5ZYTHO-D1_v1n0T.js → stateDiagram-UUKSUZ4H-ByVZAeGw.js} +1 -1
  83. package/dist/assets/stateDiagram-v2-EYPG3UTE-C6PYJGwL.js +1 -0
  84. package/dist/assets/storage-DrvlAZZd.js +26 -0
  85. package/dist/assets/{terminal-BmZY9sKi.js → terminal-CuPjZ1vE.js} +1 -1
  86. package/dist/assets/time-1P0zCPa4.js +1 -0
  87. package/dist/assets/{timeline-definition-MYPXXCX6-BLXFJK2J.js → timeline-definition-3HZDQTIS-BLUL1ZU4.js} +1 -1
  88. package/dist/assets/{tracing-DAOqNENE.js → tracing-BpM0fbsC.js} +2 -2
  89. package/dist/assets/{trash-DJ39k3RZ.js → trash-D5wptdZI.js} +1 -1
  90. package/dist/assets/{treemap-75Q7IDZK-CRVQqKgI.js → treemap-75Q7IDZK-Bh5pVSmo.js} +1 -1
  91. package/dist/assets/{vega-component-C-duuyA7.js → vega-component-tH6bw1Lr.js} +1 -1
  92. package/dist/assets/xychartDiagram-FDP5SA34-qY_Wo73t.js +7 -0
  93. package/dist/index.html +2 -2
  94. package/package.json +11 -6
  95. package/src/README.md +18 -0
  96. package/src/__mocks__/common.ts +160 -0
  97. package/src/__mocks__/notebook.ts +76 -0
  98. package/src/__mocks__/requests.ts +72 -0
  99. package/src/__mocks__/tracebacks.ts +32 -0
  100. package/src/__tests__/CellStatus.test.tsx +263 -0
  101. package/src/__tests__/__snapshots__/CellStatus.test.tsx.snap +523 -0
  102. package/src/__tests__/chat-utils.test.ts +234 -0
  103. package/src/__tests__/lru.test.ts +74 -0
  104. package/src/__tests__/main.test.tsx +174 -0
  105. package/src/__tests__/setup.ts +17 -0
  106. package/src/__tests__/test-helpers.ts +24 -0
  107. package/src/assets/circle-check.ico +0 -0
  108. package/src/assets/circle-play.ico +0 -0
  109. package/src/assets/circle-x.ico +0 -0
  110. package/src/assets/gradient.png +0 -0
  111. package/src/assets/icon-16x16.png +0 -0
  112. package/src/assets/icon-32x32.png +0 -0
  113. package/src/assets/noise.png +0 -0
  114. package/src/components/ai/ai-model-dropdown.tsx +281 -0
  115. package/src/components/ai/ai-provider-icon.tsx +54 -0
  116. package/src/components/app-config/ai-config.tsx +855 -0
  117. package/src/components/app-config/app-config-button.tsx +100 -0
  118. package/src/components/app-config/app-config-form.tsx +307 -0
  119. package/src/components/app-config/common.tsx +48 -0
  120. package/src/components/app-config/constants.ts +13 -0
  121. package/src/components/app-config/incorrect-model-id.tsx +43 -0
  122. package/src/components/app-config/is-overridden.tsx +119 -0
  123. package/src/components/app-config/optional-features.tsx +251 -0
  124. package/src/components/app-config/state.ts +18 -0
  125. package/src/components/app-config/user-config-form.tsx +1361 -0
  126. package/src/components/audio/audio-recorder.tsx +63 -0
  127. package/src/components/buttons/clear-button.tsx +23 -0
  128. package/src/components/buttons/undo-button.tsx +35 -0
  129. package/src/components/chat/chat-panel.tsx +720 -0
  130. package/src/components/chat/markdown-renderer.tsx +217 -0
  131. package/src/components/chat/reasoning-accordion.tsx +50 -0
  132. package/src/components/chat/tool-call-accordion.tsx +118 -0
  133. package/src/components/data-table/SearchBar.tsx +66 -0
  134. package/src/components/data-table/TableActions.tsx +183 -0
  135. package/src/components/data-table/__tests__/__snapshots__/chart-spec-model.test.ts.snap +1079 -0
  136. package/src/components/data-table/__tests__/chart-spec-model.test.ts +707 -0
  137. package/src/components/data-table/__tests__/column_formatting.test.ts +115 -0
  138. package/src/components/data-table/__tests__/columns.test.tsx +341 -0
  139. package/src/components/data-table/__tests__/data-table.test.tsx +60 -0
  140. package/src/components/data-table/__tests__/pagination.test.tsx +152 -0
  141. package/src/components/data-table/__tests__/types.test.ts +44 -0
  142. package/src/components/data-table/__tests__/url-detector.test.tsx +169 -0
  143. package/src/components/data-table/__tests__/useColumnPinning.test.ts +76 -0
  144. package/src/components/data-table/cell-selection/__tests__/feature.test.ts +187 -0
  145. package/src/components/data-table/cell-selection/feature.ts +123 -0
  146. package/src/components/data-table/cell-selection/types.ts +49 -0
  147. package/src/components/data-table/cell-styling/feature.ts +40 -0
  148. package/src/components/data-table/cell-styling/types.ts +26 -0
  149. package/src/components/data-table/charts/README.md +65 -0
  150. package/src/components/data-table/charts/__tests__/__snapshots__/spec-snapshot.test.ts.snap +47 -0
  151. package/src/components/data-table/charts/__tests__/altair-generator.test.ts +425 -0
  152. package/src/components/data-table/charts/__tests__/renderer.test.ts +20 -0
  153. package/src/components/data-table/charts/__tests__/spec-snapshot.test.ts +83 -0
  154. package/src/components/data-table/charts/__tests__/spec.test.ts +997 -0
  155. package/src/components/data-table/charts/__tests__/storage.test.ts +103 -0
  156. package/src/components/data-table/charts/chart-spec/altair-generator.ts +162 -0
  157. package/src/components/data-table/charts/chart-spec/encodings.ts +173 -0
  158. package/src/components/data-table/charts/chart-spec/spec.ts +345 -0
  159. package/src/components/data-table/charts/chart-spec/tooltips.ts +168 -0
  160. package/src/components/data-table/charts/chart-spec/types.ts +77 -0
  161. package/src/components/data-table/charts/charts.tsx +492 -0
  162. package/src/components/data-table/charts/components/chart-items.tsx +369 -0
  163. package/src/components/data-table/charts/components/chart-states.tsx +37 -0
  164. package/src/components/data-table/charts/components/form-fields.tsx +872 -0
  165. package/src/components/data-table/charts/components/layouts.tsx +118 -0
  166. package/src/components/data-table/charts/constants.ts +159 -0
  167. package/src/components/data-table/charts/context.ts +20 -0
  168. package/src/components/data-table/charts/forms/common-chart.tsx +202 -0
  169. package/src/components/data-table/charts/forms/heatmap.tsx +44 -0
  170. package/src/components/data-table/charts/forms/pie.tsx +70 -0
  171. package/src/components/data-table/charts/lazy-chart.tsx +56 -0
  172. package/src/components/data-table/charts/schemas.ts +140 -0
  173. package/src/components/data-table/charts/storage.ts +88 -0
  174. package/src/components/data-table/charts/types.ts +124 -0
  175. package/src/components/data-table/column-explorer-panel/column-explorer.tsx +227 -0
  176. package/src/components/data-table/column-formatting/feature.ts +247 -0
  177. package/src/components/data-table/column-formatting/types.ts +54 -0
  178. package/src/components/data-table/column-header.tsx +672 -0
  179. package/src/components/data-table/column-summary/chart-skeleton.tsx +57 -0
  180. package/src/components/data-table/column-summary/chart-spec-model.tsx +916 -0
  181. package/src/components/data-table/column-summary/column-summary.tsx +166 -0
  182. package/src/components/data-table/column-summary/legacy-chart-spec.ts +242 -0
  183. package/src/components/data-table/column-summary/utils.ts +142 -0
  184. package/src/components/data-table/column-wrapping/feature.ts +62 -0
  185. package/src/components/data-table/column-wrapping/types.ts +29 -0
  186. package/src/components/data-table/columns.tsx +528 -0
  187. package/src/components/data-table/copy-column/feature.ts +27 -0
  188. package/src/components/data-table/copy-column/types.ts +19 -0
  189. package/src/components/data-table/data-table.tsx +298 -0
  190. package/src/components/data-table/date-popover.tsx +146 -0
  191. package/src/components/data-table/download-actions.tsx +186 -0
  192. package/src/components/data-table/filter-pills.tsx +120 -0
  193. package/src/components/data-table/filters.ts +202 -0
  194. package/src/components/data-table/focus-row/feature.ts +41 -0
  195. package/src/components/data-table/focus-row/types.ts +32 -0
  196. package/src/components/data-table/header-items.tsx +295 -0
  197. package/src/components/data-table/hooks/use-column-pinning.ts +51 -0
  198. package/src/components/data-table/hooks/use-panel-ownership.ts +98 -0
  199. package/src/components/data-table/loading-table.tsx +56 -0
  200. package/src/components/data-table/mime-cell.tsx +68 -0
  201. package/src/components/data-table/pagination.tsx +329 -0
  202. package/src/components/data-table/range-focus/__tests__/atoms.test.ts +907 -0
  203. package/src/components/data-table/range-focus/__tests__/utils.test.ts +316 -0
  204. package/src/components/data-table/range-focus/atoms.ts +380 -0
  205. package/src/components/data-table/range-focus/cell-selection-indicator.tsx +37 -0
  206. package/src/components/data-table/range-focus/provider.tsx +13 -0
  207. package/src/components/data-table/range-focus/use-cell-range-selection.ts +119 -0
  208. package/src/components/data-table/range-focus/use-scroll-into-view.ts +46 -0
  209. package/src/components/data-table/range-focus/utils.ts +105 -0
  210. package/src/components/data-table/renderers.tsx +247 -0
  211. package/src/components/data-table/row-viewer-panel/__tests__/filter-rows.test.ts +82 -0
  212. package/src/components/data-table/row-viewer-panel/__tests__/row-viewer.test.tsx +58 -0
  213. package/src/components/data-table/row-viewer-panel/row-viewer.tsx +371 -0
  214. package/src/components/data-table/types.ts +81 -0
  215. package/src/components/data-table/uniformSample.tsx +19 -0
  216. package/src/components/data-table/url-detector.tsx +111 -0
  217. package/src/components/data-table/utils.ts +46 -0
  218. package/src/components/databases/display.tsx +66 -0
  219. package/src/components/databases/engine-variable.tsx +51 -0
  220. package/src/components/databases/icon.tsx +91 -0
  221. package/src/components/databases/icons/clickhouse.svg +1 -0
  222. package/src/components/databases/icons/databricks.svg +1 -0
  223. package/src/components/databases/icons/datafusion.png +0 -0
  224. package/src/components/databases/icons/duckdb.svg +1 -0
  225. package/src/components/databases/icons/googlebigquery.svg +1 -0
  226. package/src/components/databases/icons/iceberg.png +0 -0
  227. package/src/components/databases/icons/motherduck.svg +9 -0
  228. package/src/components/databases/icons/mysql.svg +1 -0
  229. package/src/components/databases/icons/postgresql.svg +1 -0
  230. package/src/components/databases/icons/redshift.svg +1 -0
  231. package/src/components/databases/icons/snowflake.svg +1 -0
  232. package/src/components/databases/icons/spark.svg +1 -0
  233. package/src/components/databases/icons/sqlalchemy.svg +1 -0
  234. package/src/components/databases/icons/sqlite.svg +1 -0
  235. package/src/components/databases/icons/timeplus.svg +17 -0
  236. package/src/components/databases/icons/trino.svg +1 -0
  237. package/src/components/datasets/icons.tsx +55 -0
  238. package/src/components/datasources/__tests__/install-package-button.test.tsx +85 -0
  239. package/src/components/datasources/__tests__/utils.test.ts +171 -0
  240. package/src/components/datasources/column-preview.tsx +269 -0
  241. package/src/components/datasources/components.tsx +100 -0
  242. package/src/components/datasources/datasources.tsx +782 -0
  243. package/src/components/datasources/install-package-button.tsx +46 -0
  244. package/src/components/datasources/utils.ts +62 -0
  245. package/src/components/debug/indicator.tsx +19 -0
  246. package/src/components/debugger/debugger-code.css +3 -0
  247. package/src/components/debugger/debugger-code.tsx +222 -0
  248. package/src/components/dependency-graph/custom-node.tsx +89 -0
  249. package/src/components/dependency-graph/dependency-graph-minimap.tsx +197 -0
  250. package/src/components/dependency-graph/dependency-graph-tree.tsx +181 -0
  251. package/src/components/dependency-graph/dependency-graph.css +17 -0
  252. package/src/components/dependency-graph/dependency-graph.tsx +66 -0
  253. package/src/components/dependency-graph/elements.ts +185 -0
  254. package/src/components/dependency-graph/panels.tsx +279 -0
  255. package/src/components/dependency-graph/types.ts +21 -0
  256. package/src/components/dependency-graph/utils/changes.ts +54 -0
  257. package/src/components/dependency-graph/utils/layout.ts +45 -0
  258. package/src/components/dependency-graph/utils/useFitToViewOnDimensionChange.ts +25 -0
  259. package/src/components/editor/Cell.tsx +1175 -0
  260. package/src/components/editor/Disconnected.tsx +72 -0
  261. package/src/components/editor/Output.tsx +462 -0
  262. package/src/components/editor/RecoveryButton.tsx +161 -0
  263. package/src/components/editor/SortableCell.tsx +161 -0
  264. package/src/components/editor/__tests__/data-attributes.test.tsx +173 -0
  265. package/src/components/editor/__tests__/dynamic-favicon.test.tsx +183 -0
  266. package/src/components/editor/actions/name-cell-input.tsx +137 -0
  267. package/src/components/editor/actions/types.ts +53 -0
  268. package/src/components/editor/actions/useCellActionButton.tsx +422 -0
  269. package/src/components/editor/actions/useConfigActions.tsx +182 -0
  270. package/src/components/editor/actions/useCopyNotebook.tsx +41 -0
  271. package/src/components/editor/actions/useHideAllMarkdownCode.ts +53 -0
  272. package/src/components/editor/actions/useNotebookActions.tsx +556 -0
  273. package/src/components/editor/actions/useRestartKernel.tsx +36 -0
  274. package/src/components/editor/ai/__tests__/completion-utils.test.ts +379 -0
  275. package/src/components/editor/ai/add-cell-with-ai.tsx +428 -0
  276. package/src/components/editor/ai/ai-completion-editor.tsx +261 -0
  277. package/src/components/editor/ai/completion-handlers.tsx +91 -0
  278. package/src/components/editor/ai/completion-utils.ts +95 -0
  279. package/src/components/editor/ai/merge-editor.css +9 -0
  280. package/src/components/editor/alerts/connecting-alert.tsx +46 -0
  281. package/src/components/editor/alerts/floating-alert.tsx +47 -0
  282. package/src/components/editor/alerts/stdin-blocking-alert.tsx +61 -0
  283. package/src/components/editor/app-container.tsx +53 -0
  284. package/src/components/editor/boundary/ErrorBoundary.tsx +41 -0
  285. package/src/components/editor/cell/CellStatus.tsx +371 -0
  286. package/src/components/editor/cell/CreateCellButton.tsx +132 -0
  287. package/src/components/editor/cell/DeleteButton.tsx +58 -0
  288. package/src/components/editor/cell/PendingDeleteConfirmation.tsx +126 -0
  289. package/src/components/editor/cell/RunButton.tsx +109 -0
  290. package/src/components/editor/cell/StopButton.tsx +36 -0
  291. package/src/components/editor/cell/TinyCode.css +10 -0
  292. package/src/components/editor/cell/TinyCode.tsx +53 -0
  293. package/src/components/editor/cell/cell-actions.tsx +185 -0
  294. package/src/components/editor/cell/cell-context-menu.tsx +243 -0
  295. package/src/components/editor/cell/cell-status.css +21 -0
  296. package/src/components/editor/cell/code/cell-editor.tsx +546 -0
  297. package/src/components/editor/cell/code/icons.tsx +31 -0
  298. package/src/components/editor/cell/code/language-toggle.tsx +140 -0
  299. package/src/components/editor/cell/collapse.tsx +100 -0
  300. package/src/components/editor/cell/toolbar.tsx +89 -0
  301. package/src/components/editor/cell/useAddCell.ts +29 -0
  302. package/src/components/editor/cell/useDeleteCell.tsx +89 -0
  303. package/src/components/editor/cell/useRunCells.ts +86 -0
  304. package/src/components/editor/cell/useShouldShowInterrupt.ts +26 -0
  305. package/src/components/editor/cell/useSplitCell.tsx +41 -0
  306. package/src/components/editor/chrome/components/contribute-snippet-button.tsx +138 -0
  307. package/src/components/editor/chrome/components/feedback-button.tsx +105 -0
  308. package/src/components/editor/chrome/panels/__tests__/write-secret-modal.test.ts +43 -0
  309. package/src/components/editor/chrome/panels/constants.ts +2 -0
  310. package/src/components/editor/chrome/panels/context-aware-panel/atoms.ts +28 -0
  311. package/src/components/editor/chrome/panels/context-aware-panel/context-aware-panel.tsx +167 -0
  312. package/src/components/editor/chrome/panels/datasources-panel.tsx +6 -0
  313. package/src/components/editor/chrome/panels/dependency-graph-panel.tsx +23 -0
  314. package/src/components/editor/chrome/panels/documentation-panel.tsx +29 -0
  315. package/src/components/editor/chrome/panels/empty-state.tsx +28 -0
  316. package/src/components/editor/chrome/panels/error-panel.tsx +35 -0
  317. package/src/components/editor/chrome/panels/file-explorer-panel.tsx +33 -0
  318. package/src/components/editor/chrome/panels/logs-panel.tsx +97 -0
  319. package/src/components/editor/chrome/panels/outline/floating-outline.tsx +129 -0
  320. package/src/components/editor/chrome/panels/outline/useActiveOutline.tsx +172 -0
  321. package/src/components/editor/chrome/panels/outline-panel.css +6 -0
  322. package/src/components/editor/chrome/panels/outline-panel.tsx +39 -0
  323. package/src/components/editor/chrome/panels/packages-panel.tsx +635 -0
  324. package/src/components/editor/chrome/panels/packages-state.ts +5 -0
  325. package/src/components/editor/chrome/panels/scratchpad-panel.tsx +8 -0
  326. package/src/components/editor/chrome/panels/secrets-panel.tsx +155 -0
  327. package/src/components/editor/chrome/panels/snippets-panel.css +11 -0
  328. package/src/components/editor/chrome/panels/snippets-panel.tsx +230 -0
  329. package/src/components/editor/chrome/panels/tracing-panel.tsx +28 -0
  330. package/src/components/editor/chrome/panels/variable-panel.tsx +31 -0
  331. package/src/components/editor/chrome/panels/write-secret-modal.tsx +190 -0
  332. package/src/components/editor/chrome/state.ts +102 -0
  333. package/src/components/editor/chrome/types.ts +133 -0
  334. package/src/components/editor/chrome/wrapper/__tests__/minimap-state.test.ts +209 -0
  335. package/src/components/editor/chrome/wrapper/__tests__/storage.test.ts +41 -0
  336. package/src/components/editor/chrome/wrapper/app-chrome.css +22 -0
  337. package/src/components/editor/chrome/wrapper/app-chrome.tsx +256 -0
  338. package/src/components/editor/chrome/wrapper/footer-item.tsx +43 -0
  339. package/src/components/editor/chrome/wrapper/footer-items/ai-status.tsx +47 -0
  340. package/src/components/editor/chrome/wrapper/footer-items/backend-status.tsx +111 -0
  341. package/src/components/editor/chrome/wrapper/footer-items/copilot-status.tsx +125 -0
  342. package/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx +185 -0
  343. package/src/components/editor/chrome/wrapper/footer-items/minimap-status.tsx +21 -0
  344. package/src/components/editor/chrome/wrapper/footer-items/rtc-status.tsx +65 -0
  345. package/src/components/editor/chrome/wrapper/footer-items/runtime-settings.tsx +370 -0
  346. package/src/components/editor/chrome/wrapper/footer.tsx +90 -0
  347. package/src/components/editor/chrome/wrapper/minimap-state.ts +164 -0
  348. package/src/components/editor/chrome/wrapper/minimap.tsx +443 -0
  349. package/src/components/editor/chrome/wrapper/panels.tsx +10 -0
  350. package/src/components/editor/chrome/wrapper/sidebar.tsx +100 -0
  351. package/src/components/editor/chrome/wrapper/storage.ts +56 -0
  352. package/src/components/editor/chrome/wrapper/utils.ts +8 -0
  353. package/src/components/editor/code/readonly-python-code.tsx +160 -0
  354. package/src/components/editor/columns/__tests__/storage.test.ts +104 -0
  355. package/src/components/editor/columns/cell-column.tsx +105 -0
  356. package/src/components/editor/columns/sortable-column.tsx +175 -0
  357. package/src/components/editor/columns/storage.ts +56 -0
  358. package/src/components/editor/common.ts +20 -0
  359. package/src/components/editor/controls/Controls.tsx +225 -0
  360. package/src/components/editor/controls/command-palette-button.tsx +27 -0
  361. package/src/components/editor/controls/command-palette.tsx +210 -0
  362. package/src/components/editor/controls/keyboard-shortcuts.tsx +309 -0
  363. package/src/components/editor/controls/notebook-menu-dropdown.tsx +157 -0
  364. package/src/components/editor/controls/shutdown-button.tsx +70 -0
  365. package/src/components/editor/database/__tests__/__snapshots__/as-code.test.ts.snap +659 -0
  366. package/src/components/editor/database/__tests__/as-code.test.ts +598 -0
  367. package/src/components/editor/database/__tests__/secrets.test.ts +38 -0
  368. package/src/components/editor/database/add-database-form.tsx +395 -0
  369. package/src/components/editor/database/as-code.ts +786 -0
  370. package/src/components/editor/database/form-renderers.tsx +211 -0
  371. package/src/components/editor/database/schemas.ts +485 -0
  372. package/src/components/editor/database/secrets.ts +25 -0
  373. package/src/components/editor/documentation.css +139 -0
  374. package/src/components/editor/dynamic-favicon.tsx +126 -0
  375. package/src/components/editor/errors/auto-fix.tsx +61 -0
  376. package/src/components/editor/file-tree/__tests__/requesting-tree.test.ts +321 -0
  377. package/src/components/editor/file-tree/file-explorer.tsx +679 -0
  378. package/src/components/editor/file-tree/file-viewer.tsx +283 -0
  379. package/src/components/editor/file-tree/renderers.tsx +83 -0
  380. package/src/components/editor/file-tree/requesting-tree.tsx +228 -0
  381. package/src/components/editor/file-tree/state.tsx +26 -0
  382. package/src/components/editor/file-tree/types.ts +118 -0
  383. package/src/components/editor/file-tree/upload.tsx +101 -0
  384. package/src/components/editor/header/app-header.tsx +28 -0
  385. package/src/components/editor/header/filename-form.tsx +27 -0
  386. package/src/components/editor/header/filename-input.css +21 -0
  387. package/src/components/editor/header/filename-input.tsx +244 -0
  388. package/src/components/editor/header/status.tsx +72 -0
  389. package/src/components/editor/inputs/Inputs.css +118 -0
  390. package/src/components/editor/inputs/Inputs.styles.ts +66 -0
  391. package/src/components/editor/inputs/Inputs.tsx +34 -0
  392. package/src/components/editor/kiosk-mode.tsx +25 -0
  393. package/src/components/editor/links/cell-link-list.tsx +74 -0
  394. package/src/components/editor/links/cell-link.tsx +128 -0
  395. package/src/components/editor/navigation/__tests__/clipboard.test.ts +466 -0
  396. package/src/components/editor/navigation/__tests__/navigation.test.ts +1771 -0
  397. package/src/components/editor/navigation/__tests__/selection.test.ts +194 -0
  398. package/src/components/editor/navigation/clipboard.ts +205 -0
  399. package/src/components/editor/navigation/focus-utils.ts +48 -0
  400. package/src/components/editor/navigation/multi-cell-action-toolbar.tsx +499 -0
  401. package/src/components/editor/navigation/navigation.ts +704 -0
  402. package/src/components/editor/navigation/selection.ts +114 -0
  403. package/src/components/editor/navigation/state.ts +5 -0
  404. package/src/components/editor/navigation/vim-bindings.test.ts +109 -0
  405. package/src/components/editor/navigation/vim-bindings.ts +90 -0
  406. package/src/components/editor/notebook-banner.tsx +75 -0
  407. package/src/components/editor/output/CalloutOutput.styles.ts +22 -0
  408. package/src/components/editor/output/CalloutOutput.tsx +19 -0
  409. package/src/components/editor/output/ConsoleOutput.tsx +276 -0
  410. package/src/components/editor/output/EmotionCacheProvider.tsx +32 -0
  411. package/src/components/editor/output/HtmlOutput.tsx +25 -0
  412. package/src/components/editor/output/ImageOutput.tsx +25 -0
  413. package/src/components/editor/output/JsonOutput.tsx +424 -0
  414. package/src/components/editor/output/MarimoErrorOutput.tsx +511 -0
  415. package/src/components/editor/output/MarimoTracebackOutput.tsx +233 -0
  416. package/src/components/editor/output/Outputs.css +102 -0
  417. package/src/components/editor/output/TextOutput.tsx +42 -0
  418. package/src/components/editor/output/VideoOutput.tsx +11 -0
  419. package/src/components/editor/output/__tests__/ansi.test.ts +39 -0
  420. package/src/components/editor/output/__tests__/json-output.test.ts +269 -0
  421. package/src/components/editor/output/__tests__/traceback.test.tsx +105 -0
  422. package/src/components/editor/output/useWrapText.ts +14 -0
  423. package/src/components/editor/package-alert.tsx +596 -0
  424. package/src/components/editor/renderMimeIcon.tsx +38 -0
  425. package/src/components/editor/renderers/CellArray.tsx +352 -0
  426. package/src/components/editor/renderers/cells-renderer.tsx +96 -0
  427. package/src/components/editor/renderers/grid-layout/grid-layout.tsx +650 -0
  428. package/src/components/editor/renderers/grid-layout/plugin.tsx +146 -0
  429. package/src/components/editor/renderers/grid-layout/styles.css +31 -0
  430. package/src/components/editor/renderers/grid-layout/types.ts +89 -0
  431. package/src/components/editor/renderers/layout-select.tsx +86 -0
  432. package/src/components/editor/renderers/plugins.ts +31 -0
  433. package/src/components/editor/renderers/slides-layout/plugin.tsx +31 -0
  434. package/src/components/editor/renderers/slides-layout/slides-layout.tsx +74 -0
  435. package/src/components/editor/renderers/slides-layout/types.ts +12 -0
  436. package/src/components/editor/renderers/types.ts +75 -0
  437. package/src/components/editor/renderers/vertical-layout/__tests__/useDelayVisibility.test.ts +87 -0
  438. package/src/components/editor/renderers/vertical-layout/__tests__/useFocusFirstEditor.test.ts +123 -0
  439. package/src/components/editor/renderers/vertical-layout/__tests__/vertical-layout.test.ts +173 -0
  440. package/src/components/editor/renderers/vertical-layout/sidebar/__tests__/sidebar.test.tsx +56 -0
  441. package/src/components/editor/renderers/vertical-layout/sidebar/sheet-sidebar.tsx +32 -0
  442. package/src/components/editor/renderers/vertical-layout/sidebar/sidebar-slot.tsx +10 -0
  443. package/src/components/editor/renderers/vertical-layout/sidebar/sidebar.css +20 -0
  444. package/src/components/editor/renderers/vertical-layout/sidebar/sidebar.tsx +30 -0
  445. package/src/components/editor/renderers/vertical-layout/sidebar/state.ts +46 -0
  446. package/src/components/editor/renderers/vertical-layout/sidebar/toggle.tsx +25 -0
  447. package/src/components/editor/renderers/vertical-layout/sidebar/wrapped-with-sidebar.tsx +38 -0
  448. package/src/components/editor/renderers/vertical-layout/useDelayVisibility.ts +32 -0
  449. package/src/components/editor/renderers/vertical-layout/useFocusFirstEditor.ts +107 -0
  450. package/src/components/editor/renderers/vertical-layout/vertical-layout-wrapper.tsx +46 -0
  451. package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +451 -0
  452. package/src/components/editor/stdin-blocking-alert.tsx +83 -0
  453. package/src/components/export/export-output-button.tsx +14 -0
  454. package/src/components/find-replace/find-replace.tsx +293 -0
  455. package/src/components/forms/__tests__/form-utils.test.ts +104 -0
  456. package/src/components/forms/form-utils.ts +90 -0
  457. package/src/components/forms/form.tsx +817 -0
  458. package/src/components/forms/options.ts +59 -0
  459. package/src/components/forms/switchable-multi-select.tsx +134 -0
  460. package/src/components/home/components.tsx +189 -0
  461. package/src/components/home/state.ts +30 -0
  462. package/src/components/icons/copy-icon.tsx +59 -0
  463. package/src/components/icons/github-copilot.tsx +17 -0
  464. package/src/components/icons/large-spinner.tsx +39 -0
  465. package/src/components/icons/loading-ellipsis.tsx +46 -0
  466. package/src/components/icons/multi-icon.css +9 -0
  467. package/src/components/icons/multi-icon.tsx +30 -0
  468. package/src/components/icons/spinner.tsx +38 -0
  469. package/src/components/layout/toolbar.tsx +26 -0
  470. package/src/components/modal/ImperativeModal.tsx +187 -0
  471. package/src/components/pages/edit-page.tsx +37 -0
  472. package/src/components/pages/home-page.tsx +514 -0
  473. package/src/components/pages/run-page.tsx +55 -0
  474. package/src/components/scratchpad/scratchpad-history.ts +28 -0
  475. package/src/components/scratchpad/scratchpad.tsx +280 -0
  476. package/src/components/shortcuts/renderShortcut.tsx +208 -0
  477. package/src/components/slides/slides-component.tsx +132 -0
  478. package/src/components/slides/slides.css +100 -0
  479. package/src/components/sort/SortableCellsProvider.tsx +242 -0
  480. package/src/components/static-html/share-modal.tsx +181 -0
  481. package/src/components/static-html/static-banner.tsx +164 -0
  482. package/src/components/terminal/terminal.tsx +110 -0
  483. package/src/components/terminal/xterm.css +3 -0
  484. package/src/components/tracing/tracing-spec.ts +118 -0
  485. package/src/components/tracing/tracing.test.tsx +66 -0
  486. package/src/components/tracing/tracing.tsx +410 -0
  487. package/src/components/ui/accordion.tsx +70 -0
  488. package/src/components/ui/alert-dialog.tsx +176 -0
  489. package/src/components/ui/alert.tsx +64 -0
  490. package/src/components/ui/aria-popover.tsx +43 -0
  491. package/src/components/ui/badge.tsx +41 -0
  492. package/src/components/ui/button.tsx +156 -0
  493. package/src/components/ui/calendar.tsx +231 -0
  494. package/src/components/ui/card.tsx +83 -0
  495. package/src/components/ui/checkbox.tsx +33 -0
  496. package/src/components/ui/combobox.tsx +278 -0
  497. package/src/components/ui/command.tsx +165 -0
  498. package/src/components/ui/context-menu.tsx +193 -0
  499. package/src/components/ui/date-input.tsx +127 -0
  500. package/src/components/ui/date-picker.tsx +188 -0
  501. package/src/components/ui/dialog.tsx +155 -0
  502. package/src/components/ui/draggable-popover.tsx +68 -0
  503. package/src/components/ui/dropdown-menu.tsx +189 -0
  504. package/src/components/ui/field.tsx +90 -0
  505. package/src/components/ui/form.tsx +224 -0
  506. package/src/components/ui/fullscreen.tsx +38 -0
  507. package/src/components/ui/input.tsx +208 -0
  508. package/src/components/ui/kbd.tsx +22 -0
  509. package/src/components/ui/label.tsx +26 -0
  510. package/src/components/ui/links.tsx +23 -0
  511. package/src/components/ui/menu-items.tsx +101 -0
  512. package/src/components/ui/native-select.tsx +39 -0
  513. package/src/components/ui/navigation.tsx +154 -0
  514. package/src/components/ui/number-field.tsx +99 -0
  515. package/src/components/ui/popover.tsx +63 -0
  516. package/src/components/ui/progress.tsx +28 -0
  517. package/src/components/ui/radio-group.tsx +44 -0
  518. package/src/components/ui/range-slider.tsx +102 -0
  519. package/src/components/ui/scroll-area.tsx +47 -0
  520. package/src/components/ui/select.tsx +167 -0
  521. package/src/components/ui/sheet.tsx +143 -0
  522. package/src/components/ui/skeleton.tsx +16 -0
  523. package/src/components/ui/slider.tsx +80 -0
  524. package/src/components/ui/switch.tsx +54 -0
  525. package/src/components/ui/table.tsx +122 -0
  526. package/src/components/ui/tabs.tsx +55 -0
  527. package/src/components/ui/textarea.tsx +104 -0
  528. package/src/components/ui/toast.tsx +133 -0
  529. package/src/components/ui/toaster.tsx +30 -0
  530. package/src/components/ui/toggle.tsx +49 -0
  531. package/src/components/ui/tooltip.tsx +87 -0
  532. package/src/components/ui/typography.tsx +207 -0
  533. package/src/components/ui/use-restore-focus.ts +28 -0
  534. package/src/components/ui/use-toast.ts +224 -0
  535. package/src/components/utils/delay-mount.tsx +81 -0
  536. package/src/components/utils/lazy-mount.tsx +24 -0
  537. package/src/components/variables/common.tsx +37 -0
  538. package/src/components/variables/variables-table.tsx +335 -0
  539. package/src/core/MarimoApp.tsx +103 -0
  540. package/src/core/ai/__tests__/model-registry.test.ts +357 -0
  541. package/src/core/ai/chat-utils.ts +71 -0
  542. package/src/core/ai/config.ts +76 -0
  543. package/src/core/ai/context/__tests__/registry.test.ts +516 -0
  544. package/src/core/ai/context/context.ts +16 -0
  545. package/src/core/ai/context/providers/__tests__/__snapshots__/tables.test.ts.snap +291 -0
  546. package/src/core/ai/context/providers/__tests__/__snapshots__/variable.test.ts.snap +378 -0
  547. package/src/core/ai/context/providers/__tests__/tables.test.ts +271 -0
  548. package/src/core/ai/context/providers/__tests__/variable.test.ts +312 -0
  549. package/src/core/ai/context/providers/common.ts +7 -0
  550. package/src/core/ai/context/providers/tables.ts +208 -0
  551. package/src/core/ai/context/providers/variable.ts +72 -0
  552. package/src/core/ai/context/registry.ts +180 -0
  553. package/src/core/ai/ids/__tests__/ids.test.ts +193 -0
  554. package/src/core/ai/ids/ids.ts +71 -0
  555. package/src/core/ai/model-registry.ts +164 -0
  556. package/src/core/ai/state.ts +58 -0
  557. package/src/core/alerts/state.ts +75 -0
  558. package/src/core/cells/__tests__/__snapshots__/cells.test.ts.snap +1312 -0
  559. package/src/core/cells/__tests__/add-missing-import.test.ts +78 -0
  560. package/src/core/cells/__tests__/cell.test.ts +193 -0
  561. package/src/core/cells/__tests__/cells.test.ts +2664 -0
  562. package/src/core/cells/__tests__/collapseConsoleOutputs.test.ts +239 -0
  563. package/src/core/cells/__tests__/focus.test.ts +271 -0
  564. package/src/core/cells/__tests__/ids.test.ts +90 -0
  565. package/src/core/cells/__tests__/names.test.ts +62 -0
  566. package/src/core/cells/__tests__/pending-delete-service.test.tsx +202 -0
  567. package/src/core/cells/__tests__/runs.test.ts +453 -0
  568. package/src/core/cells/__tests__/session.test.ts +757 -0
  569. package/src/core/cells/__tests__/utils.test.ts +428 -0
  570. package/src/core/cells/actions.ts +21 -0
  571. package/src/core/cells/add-missing-import.ts +114 -0
  572. package/src/core/cells/cell.ts +243 -0
  573. package/src/core/cells/cells.ts +1751 -0
  574. package/src/core/cells/collapseConsoleOutputs.tsx +133 -0
  575. package/src/core/cells/effects.ts +42 -0
  576. package/src/core/cells/focus.ts +128 -0
  577. package/src/core/cells/ids.ts +124 -0
  578. package/src/core/cells/logs.ts +114 -0
  579. package/src/core/cells/names.ts +107 -0
  580. package/src/core/cells/outline.ts +30 -0
  581. package/src/core/cells/outputs.ts +34 -0
  582. package/src/core/cells/pending-delete-service.ts +183 -0
  583. package/src/core/cells/runs.ts +196 -0
  584. package/src/core/cells/scrollCellIntoView.ts +133 -0
  585. package/src/core/cells/session.ts +281 -0
  586. package/src/core/cells/types.ts +128 -0
  587. package/src/core/cells/utils.ts +141 -0
  588. package/src/core/codemirror/__tests__/__snapshots__/setup.test.ts.snap +216 -0
  589. package/src/core/codemirror/__tests__/extensions.test.ts +117 -0
  590. package/src/core/codemirror/__tests__/format.test.ts +227 -0
  591. package/src/core/codemirror/__tests__/setup.test.ts +178 -0
  592. package/src/core/codemirror/ai/request.ts +72 -0
  593. package/src/core/codemirror/ai/resources.ts +90 -0
  594. package/src/core/codemirror/cells/extensions.ts +387 -0
  595. package/src/core/codemirror/cells/state.ts +32 -0
  596. package/src/core/codemirror/cells/traceback-decorations.ts +111 -0
  597. package/src/core/codemirror/cm.ts +272 -0
  598. package/src/core/codemirror/compat/__tests__/jupyter.test.ts +136 -0
  599. package/src/core/codemirror/compat/jupyter.tsx +244 -0
  600. package/src/core/codemirror/completion/Autocompleter.ts +172 -0
  601. package/src/core/codemirror/completion/__tests__/hints.test.ts +84 -0
  602. package/src/core/codemirror/completion/__tests__/keymap.test.ts +44 -0
  603. package/src/core/codemirror/completion/completer.ts +58 -0
  604. package/src/core/codemirror/completion/hints.ts +143 -0
  605. package/src/core/codemirror/completion/keymap.ts +70 -0
  606. package/src/core/codemirror/completion/utils.ts +18 -0
  607. package/src/core/codemirror/completion/variable-completions.ts +100 -0
  608. package/src/core/codemirror/config/extension.ts +63 -0
  609. package/src/core/codemirror/config/types.ts +10 -0
  610. package/src/core/codemirror/copilot/__tests__/copilot.test.ts +260 -0
  611. package/src/core/codemirror/copilot/__tests__/getCodes.test.ts +209 -0
  612. package/src/core/codemirror/copilot/__tests__/trim-utils.test.ts +291 -0
  613. package/src/core/codemirror/copilot/client.ts +123 -0
  614. package/src/core/codemirror/copilot/copilot-config.tsx +285 -0
  615. package/src/core/codemirror/copilot/extension.ts +285 -0
  616. package/src/core/codemirror/copilot/getCodes.ts +130 -0
  617. package/src/core/codemirror/copilot/language-server.ts +255 -0
  618. package/src/core/codemirror/copilot/state.ts +66 -0
  619. package/src/core/codemirror/copilot/trim-utils.ts +33 -0
  620. package/src/core/codemirror/copilot/types.ts +41 -0
  621. package/src/core/codemirror/editing/__tests__/commands.test.ts +106 -0
  622. package/src/core/codemirror/editing/__tests__/debugging.test.ts +193 -0
  623. package/src/core/codemirror/editing/commands.ts +25 -0
  624. package/src/core/codemirror/editing/debugging.ts +58 -0
  625. package/src/core/codemirror/editing/extensions.ts +4 -0
  626. package/src/core/codemirror/extensions.ts +95 -0
  627. package/src/core/codemirror/facet.ts +19 -0
  628. package/src/core/codemirror/find-replace/__tests__/navigate.test.ts +695 -0
  629. package/src/core/codemirror/find-replace/extension.ts +41 -0
  630. package/src/core/codemirror/find-replace/navigate.ts +221 -0
  631. package/src/core/codemirror/find-replace/query.ts +31 -0
  632. package/src/core/codemirror/find-replace/search-highlight.ts +148 -0
  633. package/src/core/codemirror/find-replace/state.ts +167 -0
  634. package/src/core/codemirror/format.ts +120 -0
  635. package/src/core/codemirror/go-to-definition/__tests__/commands.test.ts +205 -0
  636. package/src/core/codemirror/go-to-definition/commands.ts +80 -0
  637. package/src/core/codemirror/go-to-definition/extension.ts +23 -0
  638. package/src/core/codemirror/go-to-definition/underline.ts +223 -0
  639. package/src/core/codemirror/go-to-definition/utils.ts +126 -0
  640. package/src/core/codemirror/keymaps/__tests__/keymaps.test.ts +43 -0
  641. package/src/core/codemirror/keymaps/__tests__/vimrc.test.ts +121 -0
  642. package/src/core/codemirror/keymaps/keymaps.ts +163 -0
  643. package/src/core/codemirror/keymaps/vim.ts +360 -0
  644. package/src/core/codemirror/keymaps/vimrc.ts +149 -0
  645. package/src/core/codemirror/language/LanguageAdapters.ts +23 -0
  646. package/src/core/codemirror/language/__tests__/ast.test.ts +124 -0
  647. package/src/core/codemirror/language/__tests__/extension.test.ts +260 -0
  648. package/src/core/codemirror/language/__tests__/indentOneTab.test.ts +31 -0
  649. package/src/core/codemirror/language/__tests__/markdown.test.ts +495 -0
  650. package/src/core/codemirror/language/__tests__/sql.test.ts +1640 -0
  651. package/src/core/codemirror/language/__tests__/utils.test.ts +166 -0
  652. package/src/core/codemirror/language/commands.ts +59 -0
  653. package/src/core/codemirror/language/embedded/__tests__/embedded-python.test.ts +163 -0
  654. package/src/core/codemirror/language/embedded/embedded-python.ts +131 -0
  655. package/src/core/codemirror/language/embedded/latex.ts +257 -0
  656. package/src/core/codemirror/language/extension.ts +322 -0
  657. package/src/core/codemirror/language/languages/markdown.ts +261 -0
  658. package/src/core/codemirror/language/languages/python.ts +329 -0
  659. package/src/core/codemirror/language/languages/sql/completion-sources.tsx +99 -0
  660. package/src/core/codemirror/language/languages/sql/completion-store.ts +191 -0
  661. package/src/core/codemirror/language/languages/sql/sql.ts +545 -0
  662. package/src/core/codemirror/language/languages/sql/utils.ts +42 -0
  663. package/src/core/codemirror/language/metadata.ts +71 -0
  664. package/src/core/codemirror/language/panel/markdown.tsx +63 -0
  665. package/src/core/codemirror/language/panel/panel.tsx +197 -0
  666. package/src/core/codemirror/language/panel/sql.tsx +132 -0
  667. package/src/core/codemirror/language/types.ts +41 -0
  668. package/src/core/codemirror/language/utils/ast.ts +84 -0
  669. package/src/core/codemirror/language/utils/indentOneTab.ts +9 -0
  670. package/src/core/codemirror/language/utils/quotes.ts +18 -0
  671. package/src/core/codemirror/language/utils.ts +78 -0
  672. package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +860 -0
  673. package/src/core/codemirror/lsp/federated-lsp.ts +235 -0
  674. package/src/core/codemirror/lsp/lens.ts +130 -0
  675. package/src/core/codemirror/lsp/notebook-lsp.ts +604 -0
  676. package/src/core/codemirror/lsp/transports.ts +31 -0
  677. package/src/core/codemirror/lsp/types.ts +55 -0
  678. package/src/core/codemirror/lsp/utils.ts +11 -0
  679. package/src/core/codemirror/markdown/__tests__/commands.test.ts +522 -0
  680. package/src/core/codemirror/markdown/commands.ts +478 -0
  681. package/src/core/codemirror/markdown/completions.ts +273 -0
  682. package/src/core/codemirror/markdown/extension.ts +106 -0
  683. package/src/core/codemirror/misc/__tests__/dnd.test.ts +111 -0
  684. package/src/core/codemirror/misc/__tests__/paste.test.ts +239 -0
  685. package/src/core/codemirror/misc/dnd.ts +48 -0
  686. package/src/core/codemirror/misc/paste.ts +181 -0
  687. package/src/core/codemirror/placeholder/__tests__/extensions.test.ts +132 -0
  688. package/src/core/codemirror/placeholder/extensions.ts +99 -0
  689. package/src/core/codemirror/react-dom/createPanel.tsx +39 -0
  690. package/src/core/codemirror/reactive-references/__tests__/analyzer.test.ts +1222 -0
  691. package/src/core/codemirror/reactive-references/analyzer.ts +608 -0
  692. package/src/core/codemirror/reactive-references/extension.ts +154 -0
  693. package/src/core/codemirror/readonly/__tests__/extension.test.ts +55 -0
  694. package/src/core/codemirror/readonly/extension.ts +187 -0
  695. package/src/core/codemirror/rtc/extension.ts +450 -0
  696. package/src/core/codemirror/rtc/loro/awareness.ts +496 -0
  697. package/src/core/codemirror/rtc/loro/colors.ts +38 -0
  698. package/src/core/codemirror/rtc/loro/sync.ts +159 -0
  699. package/src/core/codemirror/theme/__tests__/light.test.ts +136 -0
  700. package/src/core/codemirror/theme/dark.ts +50 -0
  701. package/src/core/codemirror/theme/light.ts +58 -0
  702. package/src/core/codemirror/types.ts +5 -0
  703. package/src/core/codemirror/utils.ts +103 -0
  704. package/src/core/codemirror/vim/cursor-visibility.ts +58 -0
  705. package/src/core/config/__tests__/config-schema.test.ts +232 -0
  706. package/src/core/config/capabilities.ts +15 -0
  707. package/src/core/config/config-schema.ts +296 -0
  708. package/src/core/config/config.ts +109 -0
  709. package/src/core/config/feature-flag.tsx +62 -0
  710. package/src/core/config/if-capability.tsx +19 -0
  711. package/src/core/config/widths.ts +5 -0
  712. package/src/core/constants.ts +52 -0
  713. package/src/core/datasets/__tests__/all-tables.test.ts +466 -0
  714. package/src/core/datasets/__tests__/data-source.test.ts +461 -0
  715. package/src/core/datasets/data-source-connections.ts +334 -0
  716. package/src/core/datasets/engines.ts +10 -0
  717. package/src/core/datasets/request-registry.ts +34 -0
  718. package/src/core/datasets/state.ts +143 -0
  719. package/src/core/datasets/types.ts +38 -0
  720. package/src/core/debugger/state.ts +10 -0
  721. package/src/core/documentation/state.ts +13 -0
  722. package/src/core/dom/__tests__/htmlUtils.test.ts +22 -0
  723. package/src/core/dom/__tests__/outline.test.ts +370 -0
  724. package/src/core/dom/defineCustomElement.ts +23 -0
  725. package/src/core/dom/events.ts +94 -0
  726. package/src/core/dom/htmlUtils.ts +75 -0
  727. package/src/core/dom/outline.ts +123 -0
  728. package/src/core/dom/ui-element.css +8 -0
  729. package/src/core/dom/ui-element.ts +249 -0
  730. package/src/core/dom/uiregistry.ts +209 -0
  731. package/src/core/edit-app.tsx +189 -0
  732. package/src/core/errors/__tests__/errors.test.ts +62 -0
  733. package/src/core/errors/__tests__/utils.test.ts +108 -0
  734. package/src/core/errors/errors.ts +96 -0
  735. package/src/core/errors/state.ts +44 -0
  736. package/src/core/errors/utils.ts +67 -0
  737. package/src/core/export/hooks.ts +60 -0
  738. package/src/core/functions/FunctionRegistry.ts +18 -0
  739. package/src/core/hotkeys/__tests__/hotkeys.test.ts +74 -0
  740. package/src/core/hotkeys/__tests__/shortcuts.test.ts +166 -0
  741. package/src/core/hotkeys/actions.ts +38 -0
  742. package/src/core/hotkeys/hotkeys.ts +523 -0
  743. package/src/core/hotkeys/shortcuts.ts +146 -0
  744. package/src/core/islands/__tests__/parse.test.ts +89 -0
  745. package/src/core/islands/bridge.ts +196 -0
  746. package/src/core/islands/components/output-wrapper.tsx +154 -0
  747. package/src/core/islands/components/web-components.tsx +120 -0
  748. package/src/core/islands/islands.css +14 -0
  749. package/src/core/islands/main.ts +200 -0
  750. package/src/core/islands/parse.ts +161 -0
  751. package/src/core/islands/state.ts +30 -0
  752. package/src/core/islands/toast.ts +41 -0
  753. package/src/core/islands/utils.ts +5 -0
  754. package/src/core/islands/worker/controller.ts +52 -0
  755. package/src/core/islands/worker/worker.tsx +178 -0
  756. package/src/core/kernel/RuntimeState.ts +94 -0
  757. package/src/core/kernel/__tests__/RuntimeState.test.ts +57 -0
  758. package/src/core/kernel/__tests__/handlers.test.ts +61 -0
  759. package/src/core/kernel/__tests__/session.test.ts +10 -0
  760. package/src/core/kernel/handlers.ts +159 -0
  761. package/src/core/kernel/messages.ts +54 -0
  762. package/src/core/kernel/queryParamHandlers.ts +39 -0
  763. package/src/core/kernel/session.ts +50 -0
  764. package/src/core/layout/layout.ts +99 -0
  765. package/src/core/layout/useTogglePresenting.ts +50 -0
  766. package/src/core/meta/globals.ts +25 -0
  767. package/src/core/meta/state.ts +25 -0
  768. package/src/core/mime.ts +9 -0
  769. package/src/core/mode.ts +80 -0
  770. package/src/core/network/DeferredRequestRegistry.ts +71 -0
  771. package/src/core/network/__tests__/DeferredRequestRegistry.test.ts +37 -0
  772. package/src/core/network/__tests__/api.test.ts +80 -0
  773. package/src/core/network/api.ts +145 -0
  774. package/src/core/network/auth.ts +13 -0
  775. package/src/core/network/connection.ts +33 -0
  776. package/src/core/network/requests-network.ts +398 -0
  777. package/src/core/network/requests-static.ts +88 -0
  778. package/src/core/network/requests-toasting.ts +91 -0
  779. package/src/core/network/requests.ts +24 -0
  780. package/src/core/network/resolve.ts +17 -0
  781. package/src/core/network/types.ts +188 -0
  782. package/src/core/packages/toast-components.tsx +88 -0
  783. package/src/core/packages/useInstallPackage.ts +46 -0
  784. package/src/core/rtc/state.ts +20 -0
  785. package/src/core/run-app.tsx +69 -0
  786. package/src/core/runtime/__tests__/config.test.ts +173 -0
  787. package/src/core/runtime/__tests__/createWsUrl.test.ts +61 -0
  788. package/src/core/runtime/__tests__/runtime.test.ts +603 -0
  789. package/src/core/runtime/config.ts +49 -0
  790. package/src/core/runtime/runtime.ts +277 -0
  791. package/src/core/runtime/types.ts +7 -0
  792. package/src/core/runtime/utils.ts +9 -0
  793. package/src/core/saving/file-state.ts +15 -0
  794. package/src/core/saving/filename.ts +55 -0
  795. package/src/core/saving/save-component.tsx +274 -0
  796. package/src/core/saving/state.ts +51 -0
  797. package/src/core/saving/useAutoSave.ts +68 -0
  798. package/src/core/secrets/request-registry.ts +16 -0
  799. package/src/core/slots/slots.ts +9 -0
  800. package/src/core/state/__tests__/jotai.test.ts +25 -0
  801. package/src/core/state/jotai.ts +69 -0
  802. package/src/core/state/observable.ts +23 -0
  803. package/src/core/static/__tests__/download-html.test.ts +41 -0
  804. package/src/core/static/__tests__/files.test.ts +494 -0
  805. package/src/core/static/__tests__/virtual-file-tracker.test.ts +92 -0
  806. package/src/core/static/download-html.ts +59 -0
  807. package/src/core/static/files.ts +150 -0
  808. package/src/core/static/static-state.ts +19 -0
  809. package/src/core/static/types.ts +8 -0
  810. package/src/core/static/virtual-file-tracker.ts +83 -0
  811. package/src/core/variables/__tests__/state.test.ts +148 -0
  812. package/src/core/variables/state.ts +81 -0
  813. package/src/core/variables/types.ts +22 -0
  814. package/src/core/vscode/vscode-bindings.ts +176 -0
  815. package/src/core/wasm/PyodideLoader.tsx +72 -0
  816. package/src/core/wasm/__tests__/router.test.ts +57 -0
  817. package/src/core/wasm/__tests__/share.test.ts +35 -0
  818. package/src/core/wasm/__tests__/state.test.ts +124 -0
  819. package/src/core/wasm/__tests__/store.test.ts +55 -0
  820. package/src/core/wasm/bridge.ts +622 -0
  821. package/src/core/wasm/router.ts +39 -0
  822. package/src/core/wasm/rpc.ts +32 -0
  823. package/src/core/wasm/share.ts +15 -0
  824. package/src/core/wasm/state.ts +21 -0
  825. package/src/core/wasm/store.ts +122 -0
  826. package/src/core/wasm/utils.ts +12 -0
  827. package/src/core/wasm/worker/bootstrap.ts +223 -0
  828. package/src/core/wasm/worker/constants.ts +2 -0
  829. package/src/core/wasm/worker/fs.ts +90 -0
  830. package/src/core/wasm/worker/getController.ts +16 -0
  831. package/src/core/wasm/worker/getFS.ts +9 -0
  832. package/src/core/wasm/worker/getMarimoWheel.ts +15 -0
  833. package/src/core/wasm/worker/getPyodideVersion.ts +10 -0
  834. package/src/core/wasm/worker/message-buffer.ts +32 -0
  835. package/src/core/wasm/worker/save-worker.ts +107 -0
  836. package/src/core/wasm/worker/tracer.ts +7 -0
  837. package/src/core/wasm/worker/types.ts +97 -0
  838. package/src/core/wasm/worker/worker.ts +375 -0
  839. package/src/core/websocket/StaticWebsocket.ts +61 -0
  840. package/src/core/websocket/connection-utils.ts +59 -0
  841. package/src/core/websocket/types.ts +43 -0
  842. package/src/core/websocket/useMarimoWebSocket.tsx +386 -0
  843. package/src/core/websocket/useWebSocket.tsx +88 -0
  844. package/src/css/admonition.css +127 -0
  845. package/src/css/app/App.css +77 -0
  846. package/src/css/app/Cell.css +433 -0
  847. package/src/css/app/Header.css +25 -0
  848. package/src/css/app/codemirror-completions.css +308 -0
  849. package/src/css/app/codemirror.css +136 -0
  850. package/src/css/app/fonts.css +50 -0
  851. package/src/css/app/print.css +86 -0
  852. package/src/css/app/reset.css +18 -0
  853. package/src/css/codehilite.css +354 -0
  854. package/src/css/common.css +45 -0
  855. package/src/css/globals.css +176 -0
  856. package/src/css/index.css +10 -0
  857. package/src/css/katex-fonts.css +214 -0
  858. package/src/css/katex.min.css +1182 -0
  859. package/src/css/md-tooltip.css +52 -0
  860. package/src/css/md.css +365 -0
  861. package/src/css/progress.css +93 -0
  862. package/src/css/table.css +45 -0
  863. package/src/custom.d.ts +24 -0
  864. package/src/fonts/Fira_Mono/FiraMono-Bold.ttf +0 -0
  865. package/src/fonts/Fira_Mono/FiraMono-Medium.ttf +0 -0
  866. package/src/fonts/Fira_Mono/FiraMono-Regular.ttf +0 -0
  867. package/src/fonts/KaTeX/KaTeX_AMS-Regular.ttf +0 -0
  868. package/src/fonts/KaTeX/KaTeX_AMS-Regular.woff +0 -0
  869. package/src/fonts/KaTeX/KaTeX_AMS-Regular.woff2 +0 -0
  870. package/src/fonts/KaTeX/KaTeX_Caligraphic-Bold.ttf +0 -0
  871. package/src/fonts/KaTeX/KaTeX_Caligraphic-Bold.woff +0 -0
  872. package/src/fonts/KaTeX/KaTeX_Caligraphic-Bold.woff2 +0 -0
  873. package/src/fonts/KaTeX/KaTeX_Caligraphic-Regular.ttf +0 -0
  874. package/src/fonts/KaTeX/KaTeX_Caligraphic-Regular.woff +0 -0
  875. package/src/fonts/KaTeX/KaTeX_Caligraphic-Regular.woff2 +0 -0
  876. package/src/fonts/KaTeX/KaTeX_Fraktur-Bold.ttf +0 -0
  877. package/src/fonts/KaTeX/KaTeX_Fraktur-Bold.woff +0 -0
  878. package/src/fonts/KaTeX/KaTeX_Fraktur-Bold.woff2 +0 -0
  879. package/src/fonts/KaTeX/KaTeX_Fraktur-Regular.ttf +0 -0
  880. package/src/fonts/KaTeX/KaTeX_Fraktur-Regular.woff +0 -0
  881. package/src/fonts/KaTeX/KaTeX_Fraktur-Regular.woff2 +0 -0
  882. package/src/fonts/KaTeX/KaTeX_Main-Bold.ttf +0 -0
  883. package/src/fonts/KaTeX/KaTeX_Main-Bold.woff +0 -0
  884. package/src/fonts/KaTeX/KaTeX_Main-Bold.woff2 +0 -0
  885. package/src/fonts/KaTeX/KaTeX_Main-BoldItalic.ttf +0 -0
  886. package/src/fonts/KaTeX/KaTeX_Main-BoldItalic.woff +0 -0
  887. package/src/fonts/KaTeX/KaTeX_Main-BoldItalic.woff2 +0 -0
  888. package/src/fonts/KaTeX/KaTeX_Main-Italic.ttf +0 -0
  889. package/src/fonts/KaTeX/KaTeX_Main-Italic.woff +0 -0
  890. package/src/fonts/KaTeX/KaTeX_Main-Italic.woff2 +0 -0
  891. package/src/fonts/KaTeX/KaTeX_Main-Regular.ttf +0 -0
  892. package/src/fonts/KaTeX/KaTeX_Main-Regular.woff +0 -0
  893. package/src/fonts/KaTeX/KaTeX_Main-Regular.woff2 +0 -0
  894. package/src/fonts/KaTeX/KaTeX_Math-BoldItalic.ttf +0 -0
  895. package/src/fonts/KaTeX/KaTeX_Math-BoldItalic.woff +0 -0
  896. package/src/fonts/KaTeX/KaTeX_Math-BoldItalic.woff2 +0 -0
  897. package/src/fonts/KaTeX/KaTeX_Math-Italic.ttf +0 -0
  898. package/src/fonts/KaTeX/KaTeX_Math-Italic.woff +0 -0
  899. package/src/fonts/KaTeX/KaTeX_Math-Italic.woff2 +0 -0
  900. package/src/fonts/KaTeX/KaTeX_SansSerif-Bold.ttf +0 -0
  901. package/src/fonts/KaTeX/KaTeX_SansSerif-Bold.woff +0 -0
  902. package/src/fonts/KaTeX/KaTeX_SansSerif-Bold.woff2 +0 -0
  903. package/src/fonts/KaTeX/KaTeX_SansSerif-Italic.ttf +0 -0
  904. package/src/fonts/KaTeX/KaTeX_SansSerif-Italic.woff +0 -0
  905. package/src/fonts/KaTeX/KaTeX_SansSerif-Italic.woff2 +0 -0
  906. package/src/fonts/KaTeX/KaTeX_SansSerif-Regular.ttf +0 -0
  907. package/src/fonts/KaTeX/KaTeX_SansSerif-Regular.woff +0 -0
  908. package/src/fonts/KaTeX/KaTeX_SansSerif-Regular.woff2 +0 -0
  909. package/src/fonts/KaTeX/KaTeX_Script-Regular.ttf +0 -0
  910. package/src/fonts/KaTeX/KaTeX_Script-Regular.woff +0 -0
  911. package/src/fonts/KaTeX/KaTeX_Script-Regular.woff2 +0 -0
  912. package/src/fonts/KaTeX/KaTeX_Size1-Regular.ttf +0 -0
  913. package/src/fonts/KaTeX/KaTeX_Size1-Regular.woff +0 -0
  914. package/src/fonts/KaTeX/KaTeX_Size1-Regular.woff2 +0 -0
  915. package/src/fonts/KaTeX/KaTeX_Size2-Regular.ttf +0 -0
  916. package/src/fonts/KaTeX/KaTeX_Size2-Regular.woff +0 -0
  917. package/src/fonts/KaTeX/KaTeX_Size2-Regular.woff2 +0 -0
  918. package/src/fonts/KaTeX/KaTeX_Size3-Regular.ttf +0 -0
  919. package/src/fonts/KaTeX/KaTeX_Size3-Regular.woff +0 -0
  920. package/src/fonts/KaTeX/KaTeX_Size3-Regular.woff2 +0 -0
  921. package/src/fonts/KaTeX/KaTeX_Size4-Regular.ttf +0 -0
  922. package/src/fonts/KaTeX/KaTeX_Size4-Regular.woff +0 -0
  923. package/src/fonts/KaTeX/KaTeX_Size4-Regular.woff2 +0 -0
  924. package/src/fonts/KaTeX/KaTeX_Typewriter-Regular.ttf +0 -0
  925. package/src/fonts/KaTeX/KaTeX_Typewriter-Regular.woff +0 -0
  926. package/src/fonts/KaTeX/KaTeX_Typewriter-Regular.woff2 +0 -0
  927. package/src/fonts/Lora/Lora-Italic-VariableFont_wght.ttf +0 -0
  928. package/src/fonts/Lora/Lora-VariableFont_wght.ttf +0 -0
  929. package/src/fonts/Lora/static/Lora-Bold.ttf +0 -0
  930. package/src/fonts/Lora/static/Lora-BoldItalic.ttf +0 -0
  931. package/src/fonts/Lora/static/Lora-Italic.ttf +0 -0
  932. package/src/fonts/Lora/static/Lora-Medium.ttf +0 -0
  933. package/src/fonts/Lora/static/Lora-MediumItalic.ttf +0 -0
  934. package/src/fonts/Lora/static/Lora-Regular.ttf +0 -0
  935. package/src/fonts/Lora/static/Lora-SemiBold.ttf +0 -0
  936. package/src/fonts/Lora/static/Lora-SemiBoldItalic.ttf +0 -0
  937. package/src/fonts/PT_Sans/PTSans-Bold.ttf +0 -0
  938. package/src/fonts/PT_Sans/PTSans-BoldItalic.ttf +0 -0
  939. package/src/fonts/PT_Sans/PTSans-Italic.ttf +0 -0
  940. package/src/fonts/PT_Sans/PTSans-Regular.ttf +0 -0
  941. package/src/hooks/__tests__/useBoolean.test.tsx +33 -0
  942. package/src/hooks/__tests__/useDebounce.test.tsx +182 -0
  943. package/src/hooks/__tests__/useEffectSkipFirstRender.test.tsx +42 -0
  944. package/src/hooks/__tests__/useEventListener.test.tsx +148 -0
  945. package/src/hooks/__tests__/useInternalStateWithSync.test.tsx +76 -0
  946. package/src/hooks/__tests__/useInterval.test.tsx +70 -0
  947. package/src/hooks/__tests__/usePackageMetadata.test.tsx +219 -0
  948. package/src/hooks/__tests__/useResizeHandle.test.tsx +240 -0
  949. package/src/hooks/__tests__/useResizeObserver.test.tsx +86 -0
  950. package/src/hooks/__tests__/useTimer.test.tsx +62 -0
  951. package/src/hooks/debug.ts +116 -0
  952. package/src/hooks/useAsyncData.ts +392 -0
  953. package/src/hooks/useAudioRecorder.ts +89 -0
  954. package/src/hooks/useAutoGrowInputProps.ts +56 -0
  955. package/src/hooks/useBoolean.ts +26 -0
  956. package/src/hooks/useCellRenderCount.ts +15 -0
  957. package/src/hooks/useDebounce.ts +95 -0
  958. package/src/hooks/useDeepCompareMemoize.ts +22 -0
  959. package/src/hooks/useEffectSkipFirstRender.ts +24 -0
  960. package/src/hooks/useElapsedTime.ts +25 -0
  961. package/src/hooks/useEvent.ts +2 -0
  962. package/src/hooks/useEventListener.ts +68 -0
  963. package/src/hooks/useHotkey.ts +77 -0
  964. package/src/hooks/useInternalStateWithSync.ts +26 -0
  965. package/src/hooks/useInterval.ts +49 -0
  966. package/src/hooks/useIsDragging.tsx +39 -0
  967. package/src/hooks/useLifecycle.ts +20 -0
  968. package/src/hooks/useLocalStorage.ts +22 -0
  969. package/src/hooks/useNonce.ts +9 -0
  970. package/src/hooks/usePackageMetadata.ts +52 -0
  971. package/src/hooks/useRecentCommands.ts +25 -0
  972. package/src/hooks/useResizeHandle.ts +110 -0
  973. package/src/hooks/useResizeObserver.ts +101 -0
  974. package/src/hooks/useScript.ts +90 -0
  975. package/src/hooks/useSelectAllContent.ts +42 -0
  976. package/src/hooks/useTimer.ts +48 -0
  977. package/src/main.tsx +20 -0
  978. package/src/mount.tsx +331 -0
  979. package/src/plugins/core/BadPlugin.tsx +72 -0
  980. package/src/plugins/core/RenderHTML.tsx +136 -0
  981. package/src/plugins/core/__test__/RenderHTML.test.ts +146 -0
  982. package/src/plugins/core/builder.ts +59 -0
  983. package/src/plugins/core/registerReactComponent.tsx +535 -0
  984. package/src/plugins/core/rpc.ts +55 -0
  985. package/src/plugins/core/sidebar-element.tsx +104 -0
  986. package/src/plugins/impl/ButtonPlugin.tsx +95 -0
  987. package/src/plugins/impl/CheckboxPlugin.tsx +56 -0
  988. package/src/plugins/impl/CodeEditorPlugin.tsx +119 -0
  989. package/src/plugins/impl/DataEditorPlugin.tsx +181 -0
  990. package/src/plugins/impl/DataTablePlugin.tsx +948 -0
  991. package/src/plugins/impl/DatePickerPlugin.tsx +74 -0
  992. package/src/plugins/impl/DateRangePlugin.tsx +82 -0
  993. package/src/plugins/impl/DateTimePickerPlugin.tsx +76 -0
  994. package/src/plugins/impl/DictPlugin.tsx +80 -0
  995. package/src/plugins/impl/DropdownPlugin.tsx +102 -0
  996. package/src/plugins/impl/FileBrowserPlugin.tsx +500 -0
  997. package/src/plugins/impl/FileUploadPlugin.tsx +302 -0
  998. package/src/plugins/impl/FormPlugin.tsx +294 -0
  999. package/src/plugins/impl/MicrophonePlugin.tsx +58 -0
  1000. package/src/plugins/impl/MultiselectPlugin.tsx +207 -0
  1001. package/src/plugins/impl/NumberPlugin.tsx +84 -0
  1002. package/src/plugins/impl/RadioPlugin.tsx +77 -0
  1003. package/src/plugins/impl/RangeSliderPlugin.tsx +163 -0
  1004. package/src/plugins/impl/RefreshPlugin.tsx +158 -0
  1005. package/src/plugins/impl/SearchableSelect.tsx +122 -0
  1006. package/src/plugins/impl/SliderPlugin.tsx +166 -0
  1007. package/src/plugins/impl/SwitchPlugin.tsx +48 -0
  1008. package/src/plugins/impl/TabsPlugin.tsx +83 -0
  1009. package/src/plugins/impl/TextAreaPlugin.tsx +131 -0
  1010. package/src/plugins/impl/TextInputPlugin.tsx +169 -0
  1011. package/src/plugins/impl/__tests__/DateTimePickerPlugin.test.tsx +45 -0
  1012. package/src/plugins/impl/__tests__/DropdownPlugin.test.tsx +178 -0
  1013. package/src/plugins/impl/__tests__/MultiSelectPlugin.test.ts +41 -0
  1014. package/src/plugins/impl/__tests__/NumberPlugin.test.tsx +144 -0
  1015. package/src/plugins/impl/anywidget/AnyWidgetPlugin.tsx +269 -0
  1016. package/src/plugins/impl/anywidget/__tests__/AnyWidgetPlugin.test.tsx +181 -0
  1017. package/src/plugins/impl/anywidget/__tests__/model.test.ts +370 -0
  1018. package/src/plugins/impl/anywidget/model.ts +314 -0
  1019. package/src/plugins/impl/chat/ChatPlugin.tsx +98 -0
  1020. package/src/plugins/impl/chat/chat-ui.tsx +713 -0
  1021. package/src/plugins/impl/chat/types.ts +39 -0
  1022. package/src/plugins/impl/code/LazyAnyLanguageCodeMirror.tsx +6 -0
  1023. package/src/plugins/impl/code/any-language-editor.tsx +68 -0
  1024. package/src/plugins/impl/common/error-banner.tsx +111 -0
  1025. package/src/plugins/impl/common/intent.ts +18 -0
  1026. package/src/plugins/impl/common/labeled.tsx +69 -0
  1027. package/src/plugins/impl/data-editor/__tests__/data-utils.test.ts +876 -0
  1028. package/src/plugins/impl/data-editor/__tests__/glide-utils.test.ts +452 -0
  1029. package/src/plugins/impl/data-editor/components.tsx +179 -0
  1030. package/src/plugins/impl/data-editor/data-utils.ts +123 -0
  1031. package/src/plugins/impl/data-editor/glide-data-editor.tsx +651 -0
  1032. package/src/plugins/impl/data-editor/glide-utils.ts +200 -0
  1033. package/src/plugins/impl/data-editor/themes.ts +49 -0
  1034. package/src/plugins/impl/data-editor/types.ts +44 -0
  1035. package/src/plugins/impl/data-explorer/ConnectedDataExplorerComponent.tsx +268 -0
  1036. package/src/plugins/impl/data-explorer/DataExplorerPlugin.tsx +31 -0
  1037. package/src/plugins/impl/data-explorer/components/column-summary.tsx +174 -0
  1038. package/src/plugins/impl/data-explorer/components/icons.tsx +30 -0
  1039. package/src/plugins/impl/data-explorer/components/query-form.tsx +296 -0
  1040. package/src/plugins/impl/data-explorer/encoding.ts +107 -0
  1041. package/src/plugins/impl/data-explorer/functions/function.ts +83 -0
  1042. package/src/plugins/impl/data-explorer/functions/types.ts +32 -0
  1043. package/src/plugins/impl/data-explorer/marks.ts +21 -0
  1044. package/src/plugins/impl/data-explorer/queries/field-suggestion.ts +65 -0
  1045. package/src/plugins/impl/data-explorer/queries/histograms.ts +41 -0
  1046. package/src/plugins/impl/data-explorer/queries/queries.ts +204 -0
  1047. package/src/plugins/impl/data-explorer/queries/removeUndefined.ts +11 -0
  1048. package/src/plugins/impl/data-explorer/queries/types.ts +54 -0
  1049. package/src/plugins/impl/data-explorer/queries/utils.ts +85 -0
  1050. package/src/plugins/impl/data-explorer/spec.ts +28 -0
  1051. package/src/plugins/impl/data-explorer/state/reducer.ts +92 -0
  1052. package/src/plugins/impl/data-explorer/state/types.ts +28 -0
  1053. package/src/plugins/impl/data-frames/DataFramePlugin.tsx +303 -0
  1054. package/src/plugins/impl/data-frames/forms/__tests__/__snapshots__/form.test.tsx.snap +1600 -0
  1055. package/src/plugins/impl/data-frames/forms/__tests__/form.test.tsx +67 -0
  1056. package/src/plugins/impl/data-frames/forms/context.ts +13 -0
  1057. package/src/plugins/impl/data-frames/forms/datatype-icon.tsx +43 -0
  1058. package/src/plugins/impl/data-frames/forms/renderers.tsx +518 -0
  1059. package/src/plugins/impl/data-frames/panel.tsx +308 -0
  1060. package/src/plugins/impl/data-frames/schema.ts +211 -0
  1061. package/src/plugins/impl/data-frames/types.ts +91 -0
  1062. package/src/plugins/impl/data-frames/utils/__tests__/getUpdatedColumnTypes.test.ts +191 -0
  1063. package/src/plugins/impl/data-frames/utils/__tests__/operators.test.ts +116 -0
  1064. package/src/plugins/impl/data-frames/utils/getUpdatedColumnTypes.ts +67 -0
  1065. package/src/plugins/impl/data-frames/utils/operators.ts +202 -0
  1066. package/src/plugins/impl/image-comparison/ImageComparisonComponent.tsx +39 -0
  1067. package/src/plugins/impl/multiselectFilterFn.tsx +22 -0
  1068. package/src/plugins/impl/panel/PanelPlugin.tsx +266 -0
  1069. package/src/plugins/impl/panel/__tests__/utils.test.ts +119 -0
  1070. package/src/plugins/impl/panel/utils.ts +104 -0
  1071. package/src/plugins/impl/plotly/PlotlyPlugin.tsx +300 -0
  1072. package/src/plugins/impl/plotly/__tests__/parse-from-template.test.ts +73 -0
  1073. package/src/plugins/impl/plotly/mapbox.css +359 -0
  1074. package/src/plugins/impl/plotly/parse-from-template.ts +58 -0
  1075. package/src/plugins/impl/plotly/plotly.css +280 -0
  1076. package/src/plugins/impl/vega/VegaPlugin.tsx +40 -0
  1077. package/src/plugins/impl/vega/__tests__/__snapshots__/make-selectable.test.ts.snap +1210 -0
  1078. package/src/plugins/impl/vega/__tests__/encodings.test.ts +172 -0
  1079. package/src/plugins/impl/vega/__tests__/loader.test.ts +73 -0
  1080. package/src/plugins/impl/vega/__tests__/make-selectable.test.ts +575 -0
  1081. package/src/plugins/impl/vega/__tests__/params.test.ts +52 -0
  1082. package/src/plugins/impl/vega/__tests__/resolve-data.test.ts +236 -0
  1083. package/src/plugins/impl/vega/__tests__/vega.test.ts +603 -0
  1084. package/src/plugins/impl/vega/batched.ts +41 -0
  1085. package/src/plugins/impl/vega/encodings.ts +111 -0
  1086. package/src/plugins/impl/vega/fix-relative-url.ts +15 -0
  1087. package/src/plugins/impl/vega/formats.ts +25 -0
  1088. package/src/plugins/impl/vega/loader.ts +320 -0
  1089. package/src/plugins/impl/vega/make-selectable.ts +248 -0
  1090. package/src/plugins/impl/vega/marks.ts +36 -0
  1091. package/src/plugins/impl/vega/params.ts +192 -0
  1092. package/src/plugins/impl/vega/resolve-data.ts +101 -0
  1093. package/src/plugins/impl/vega/types.ts +32 -0
  1094. package/src/plugins/impl/vega/utils.ts +46 -0
  1095. package/src/plugins/impl/vega/vega-component.tsx +271 -0
  1096. package/src/plugins/impl/vega/vega-loader.ts +53 -0
  1097. package/src/plugins/impl/vega/vega.css +31 -0
  1098. package/src/plugins/layout/AccordionPlugin.tsx +63 -0
  1099. package/src/plugins/layout/CalloutPlugin.tsx +34 -0
  1100. package/src/plugins/layout/DownloadPlugin.tsx +136 -0
  1101. package/src/plugins/layout/ImageComparisonPlugin.tsx +35 -0
  1102. package/src/plugins/layout/JsonOutputPlugin.tsx +47 -0
  1103. package/src/plugins/layout/LazyPlugin.tsx +98 -0
  1104. package/src/plugins/layout/MimeRenderPlugin.tsx +45 -0
  1105. package/src/plugins/layout/NavigationMenuPlugin.tsx +219 -0
  1106. package/src/plugins/layout/ProgressPlugin.tsx +175 -0
  1107. package/src/plugins/layout/RoutesPlugin.tsx +81 -0
  1108. package/src/plugins/layout/StatPlugin.tsx +100 -0
  1109. package/src/plugins/layout/TexPlugin.tsx +102 -0
  1110. package/src/plugins/layout/__test__/ProgressPlugin.test.ts +26 -0
  1111. package/src/plugins/layout/carousel/CarouselPlugin.tsx +48 -0
  1112. package/src/plugins/layout/mermaid/MermaidPlugin.tsx +26 -0
  1113. package/src/plugins/layout/mermaid/mermaid.tsx +94 -0
  1114. package/src/plugins/layout/navigation-menu.css +37 -0
  1115. package/src/plugins/plugins.ts +116 -0
  1116. package/src/plugins/stateless-plugin.ts +29 -0
  1117. package/src/plugins/types.ts +82 -0
  1118. package/src/stories/__fixtures__/vega.ts +225 -0
  1119. package/src/stories/accordion.stories.tsx +100 -0
  1120. package/src/stories/alert-dialog.mdx +42 -0
  1121. package/src/stories/app-chrome.stories.tsx +26 -0
  1122. package/src/stories/button.stories.tsx +90 -0
  1123. package/src/stories/callout.stories.tsx +73 -0
  1124. package/src/stories/cell-status.stories.tsx +145 -0
  1125. package/src/stories/cell.stories.tsx +336 -0
  1126. package/src/stories/checkbox.stories.tsx +44 -0
  1127. package/src/stories/colors.stories.tsx +156 -0
  1128. package/src/stories/combobox.stories.tsx +133 -0
  1129. package/src/stories/context-menu.mdx +23 -0
  1130. package/src/stories/data-explorer.stories.tsx +30 -0
  1131. package/src/stories/data-table.stories.tsx +130 -0
  1132. package/src/stories/dataframe.stories.tsx +46 -0
  1133. package/src/stories/debugger.stories.tsx +34 -0
  1134. package/src/stories/dialog.stories.tsx +80 -0
  1135. package/src/stories/dropdown-menu.mdx +159 -0
  1136. package/src/stories/editor-inputs.stories.tsx +47 -0
  1137. package/src/stories/editor.stories.tsx +91 -0
  1138. package/src/stories/file-upload.stories.tsx +103 -0
  1139. package/src/stories/form-wrapper.stories.tsx +147 -0
  1140. package/src/stories/input.stories.tsx +56 -0
  1141. package/src/stories/label.mdx +9 -0
  1142. package/src/stories/log-viewer.stories.tsx +74 -0
  1143. package/src/stories/number-field.mdx +17 -0
  1144. package/src/stories/number-field.stories.tsx +41 -0
  1145. package/src/stories/progress-component.stories.tsx +74 -0
  1146. package/src/stories/progress.stories.tsx +33 -0
  1147. package/src/stories/radio-group.mdx +54 -0
  1148. package/src/stories/select-native.stories.tsx +49 -0
  1149. package/src/stories/select.stories.tsx +92 -0
  1150. package/src/stories/slider.stories.tsx +27 -0
  1151. package/src/stories/stat.stories.tsx +123 -0
  1152. package/src/stories/switch.mdx +20 -0
  1153. package/src/stories/switchable-multi-select.stories.tsx +31 -0
  1154. package/src/stories/tabs.mdx +59 -0
  1155. package/src/stories/textarea.stories.tsx +58 -0
  1156. package/src/stories/theme.stories.tsx +111 -0
  1157. package/src/stories/tooltip.mdx +32 -0
  1158. package/src/stories/typography.stories.tsx +80 -0
  1159. package/src/stories/variables.stories.tsx +58 -0
  1160. package/src/stories/vega.stories.tsx +57 -0
  1161. package/src/theme/ThemeProvider.tsx +32 -0
  1162. package/src/theme/namespace.tsx +23 -0
  1163. package/src/theme/useTheme.ts +89 -0
  1164. package/src/utils/Deferred.ts +20 -0
  1165. package/src/utils/Logger.ts +91 -0
  1166. package/src/utils/__tests__/Deferred.test.ts +38 -0
  1167. package/src/utils/__tests__/arrays.test.ts +130 -0
  1168. package/src/utils/__tests__/batch-requests.test.ts +60 -0
  1169. package/src/utils/__tests__/blob.test.ts +52 -0
  1170. package/src/utils/__tests__/cell-urls.test.ts +92 -0
  1171. package/src/utils/__tests__/createReducer.test.ts +184 -0
  1172. package/src/utils/__tests__/data-views.test.ts +112 -0
  1173. package/src/utils/__tests__/dates.test.ts +188 -0
  1174. package/src/utils/__tests__/edit-distance.test.ts +302 -0
  1175. package/src/utils/__tests__/errors.test.ts +54 -0
  1176. package/src/utils/__tests__/filenames.test.ts +30 -0
  1177. package/src/utils/__tests__/id-tree.test.ts +1994 -0
  1178. package/src/utils/__tests__/json-parser.test.ts +79 -0
  1179. package/src/utils/__tests__/local-storage.test.ts +77 -0
  1180. package/src/utils/__tests__/lru.test.ts +74 -0
  1181. package/src/utils/__tests__/maps.test.ts +91 -0
  1182. package/src/utils/__tests__/math.test.ts +29 -0
  1183. package/src/utils/__tests__/multi-map.test.ts +295 -0
  1184. package/src/utils/__tests__/numbers.test.ts +76 -0
  1185. package/src/utils/__tests__/path.test.ts +170 -0
  1186. package/src/utils/__tests__/pluralize.test.ts +47 -0
  1187. package/src/utils/__tests__/routes.test.ts +134 -0
  1188. package/src/utils/__tests__/sets.test.ts +41 -0
  1189. package/src/utils/__tests__/shallow-compare.test.ts +55 -0
  1190. package/src/utils/__tests__/strings.test.ts +68 -0
  1191. package/src/utils/__tests__/time.test.ts +61 -0
  1192. package/src/utils/__tests__/timed-cache.test.ts +142 -0
  1193. package/src/utils/__tests__/timeout.test.ts +153 -0
  1194. package/src/utils/__tests__/traceback.test.ts +34 -0
  1195. package/src/utils/__tests__/url.test.ts +100 -0
  1196. package/src/utils/__tests__/urls.test.ts +10 -0
  1197. package/src/utils/__tests__/versions.test.ts +63 -0
  1198. package/src/utils/__tests__/waitForWs.test.ts +76 -0
  1199. package/src/utils/arrays.ts +75 -0
  1200. package/src/utils/assertExists.ts +12 -0
  1201. package/src/utils/assertNever.ts +20 -0
  1202. package/src/utils/batch-requests.ts +28 -0
  1203. package/src/utils/blob.ts +45 -0
  1204. package/src/utils/cell-urls.ts +31 -0
  1205. package/src/utils/cn.ts +8 -0
  1206. package/src/utils/copy.ts +17 -0
  1207. package/src/utils/createReducer.ts +137 -0
  1208. package/src/utils/data-views.ts +54 -0
  1209. package/src/utils/dates.ts +145 -0
  1210. package/src/utils/dereference.ts +10 -0
  1211. package/src/utils/download.ts +47 -0
  1212. package/src/utils/edit-distance.ts +141 -0
  1213. package/src/utils/errors.ts +63 -0
  1214. package/src/utils/events.ts +85 -0
  1215. package/src/utils/fileToBase64.ts +30 -0
  1216. package/src/utils/filenames.ts +29 -0
  1217. package/src/utils/functions.ts +24 -0
  1218. package/src/utils/id-tree.tsx +1032 -0
  1219. package/src/utils/idle.ts +19 -0
  1220. package/src/utils/invariant.ts +37 -0
  1221. package/src/utils/json/__tests__/base64.test.ts +100 -0
  1222. package/src/utils/json/base64.ts +51 -0
  1223. package/src/utils/json/json-parser.ts +65 -0
  1224. package/src/utils/lazy.ts +30 -0
  1225. package/src/utils/links.ts +11 -0
  1226. package/src/utils/localStorage.ts +132 -0
  1227. package/src/utils/lru.ts +68 -0
  1228. package/src/utils/maps.ts +65 -0
  1229. package/src/utils/math.ts +6 -0
  1230. package/src/utils/mergeRefs.ts +14 -0
  1231. package/src/utils/multi-map.ts +71 -0
  1232. package/src/utils/numbers.ts +124 -0
  1233. package/src/utils/objects.ts +105 -0
  1234. package/src/utils/once.ts +17 -0
  1235. package/src/utils/pathUtils.test.ts +113 -0
  1236. package/src/utils/pathUtils.ts +76 -0
  1237. package/src/utils/paths.ts +67 -0
  1238. package/src/utils/pluralize.ts +35 -0
  1239. package/src/utils/python-poet/__tests__/poet.test.ts +286 -0
  1240. package/src/utils/python-poet/poet.ts +196 -0
  1241. package/src/utils/reload-safe.ts +15 -0
  1242. package/src/utils/repl.ts +23 -0
  1243. package/src/utils/routes.ts +36 -0
  1244. package/src/utils/scroll.ts +38 -0
  1245. package/src/utils/sets.ts +30 -0
  1246. package/src/utils/shallow-compare.ts +30 -0
  1247. package/src/utils/staticImplements.ts +7 -0
  1248. package/src/utils/strings.ts +64 -0
  1249. package/src/utils/time.ts +39 -0
  1250. package/src/utils/timed-cache.ts +52 -0
  1251. package/src/utils/timeout.ts +42 -0
  1252. package/src/utils/traceback.ts +104 -0
  1253. package/src/utils/tracer.ts +106 -0
  1254. package/src/utils/typed.ts +17 -0
  1255. package/src/utils/url.ts +12 -0
  1256. package/src/utils/urls.ts +33 -0
  1257. package/src/utils/uuid.ts +8 -0
  1258. package/src/utils/versions.ts +66 -0
  1259. package/src/utils/vitals.ts +30 -0
  1260. package/src/utils/waitForWs.ts +31 -0
  1261. package/dist/assets/_baseMap-DI8H5mdU.js +0 -1
  1262. package/dist/assets/architectureDiagram-SUXI7LT5-BEcV3kj8.js +0 -36
  1263. package/dist/assets/blockDiagram-6J76NXCF-BUxeo5Pp.js +0 -122
  1264. package/dist/assets/channel-BgIIdDsO.js +0 -1
  1265. package/dist/assets/classDiagram-M3E45YP4-CocoijMx.js +0 -1
  1266. package/dist/assets/classDiagram-v2-YAWTLIQI-CocoijMx.js +0 -1
  1267. package/dist/assets/clone-CkywUQE5.js +0 -1
  1268. package/dist/assets/cytoscape.esm-CzSnbbKZ.js +0 -325
  1269. package/dist/assets/diagram-5UYTHUR4-CaEJdB-c.js +0 -24
  1270. package/dist/assets/edit-page-0aVIqkPG.js +0 -163
  1271. package/dist/assets/flowDiagram-KYDEHFYC-COI3Wlzg.js +0 -162
  1272. package/dist/assets/ganttDiagram-EK5VF46D-T8K8LZXH.js +0 -267
  1273. package/dist/assets/index-BlxPam9h.css +0 -1
  1274. package/dist/assets/index-DPzEQsyf.js +0 -518
  1275. package/dist/assets/infoDiagram-LHK5PUON-DIh9EeeW.js +0 -2
  1276. package/dist/assets/links-Co7kZnDQ.js +0 -17
  1277. package/dist/assets/mermaid-sbM5kvPX.js +0 -207
  1278. package/dist/assets/min-ClcSmngt.js +0 -1
  1279. package/dist/assets/pieDiagram-NIOCPIFQ-ClBSTDHM.js +0 -30
  1280. package/dist/assets/sortBy-BPqL9Az6.js +0 -1
  1281. package/dist/assets/stateDiagram-v2-5AN5P6BG-Ch96oS1p.js +0 -1
  1282. package/dist/assets/storage-6bL26f8J.js +0 -26
  1283. package/dist/assets/time--ds3HCGk.js +0 -1
  1284. package/dist/assets/xychartDiagram-H2YORKM3-tbgrOMTu.js +0 -7
@@ -0,0 +1,122 @@
1
+ var ae,se;import{g as ie}from"./chunk-GLLZNHP4-DRBUPzV6.js";import{_ as h,F as Q,d as oe,l as m,y as le,A as ce,c as z,a2 as de,P as he,a3 as q,a4 as Dt,a5 as ge,u as tt,j as ye,a6 as pe,a7 as gt,h as yt,a8 as ue}from"./mermaid-D59lkToe.js";import{c as xe}from"./clone-DFaYgbfI.js";import{s as R}from"./transform-B8bpuzxV.js";import{G as be}from"./graph-CQvdQbxU.js";import{c as fe}from"./channel-D31q3TW_.js";import{l as me,k as we}from"./step-BwsUM5iJ.js";import"./index-D4bXoNM3.js";import"./_baseUniq-CGK6su7v.js";import"./_baseEach-CIMlsWNn.js";import"./timer-BwIYMJWC.js";var pt=function(){var e=h(function(d,u,k,b){for(k=k||{},b=d.length;b--;k[d[b]]=u);return k},"o"),t=[1,15],s=[1,7],i=[1,13],a=[1,14],n=[1,19],r=[1,16],o=[1,17],c=[1,18],p=[8,30],g=[8,10,21,28,29,30,31,39,43,46],x=[1,23],f=[1,24],_=[8,10,15,16,21,28,29,30,31,39,43,46],L=[8,10,15,16,21,27,28,29,30,31,39,43,46],E=[1,49],v={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:h(function(d,u,k,b,w,l,S){var y=l.length-1;switch(w){case 4:b.getLogger().debug("Rule: separator (NL) ");break;case 5:b.getLogger().debug("Rule: separator (Space) ");break;case 6:b.getLogger().debug("Rule: separator (EOF) ");break;case 7:b.getLogger().debug("Rule: hierarchy: ",l[y-1]),b.setHierarchy(l[y-1]);break;case 8:b.getLogger().debug("Stop NL ");break;case 9:b.getLogger().debug("Stop EOF ");break;case 10:b.getLogger().debug("Stop NL2 ");break;case 11:b.getLogger().debug("Stop EOF2 ");break;case 12:b.getLogger().debug("Rule: statement: ",l[y]),typeof l[y].length=="number"?this.$=l[y]:this.$=[l[y]];break;case 13:b.getLogger().debug("Rule: statement #2: ",l[y-1]),this.$=[l[y-1]].concat(l[y]);break;case 14:b.getLogger().debug("Rule: link: ",l[y],d),this.$={edgeTypeStr:l[y],label:""};break;case 15:b.getLogger().debug("Rule: LABEL link: ",l[y-3],l[y-1],l[y]),this.$={edgeTypeStr:l[y],label:l[y-1]};break;case 18:const D=parseInt(l[y]),F=b.generateId();this.$={id:F,type:"space",label:"",width:D,children:[]};break;case 23:b.getLogger().debug("Rule: (nodeStatement link node) ",l[y-2],l[y-1],l[y]," typestr: ",l[y-1].edgeTypeStr);const H=b.edgeStrToEdgeData(l[y-1].edgeTypeStr);this.$=[{id:l[y-2].id,label:l[y-2].label,type:l[y-2].type,directions:l[y-2].directions},{id:l[y-2].id+"-"+l[y].id,start:l[y-2].id,end:l[y].id,label:l[y-1].label,type:"edge",directions:l[y].directions,arrowTypeEnd:H,arrowTypeStart:"arrow_open"},{id:l[y].id,label:l[y].label,type:b.typeStr2Type(l[y].typeStr),directions:l[y].directions}];break;case 24:b.getLogger().debug("Rule: nodeStatement (abc88 node size) ",l[y-1],l[y]),this.$={id:l[y-1].id,label:l[y-1].label,type:b.typeStr2Type(l[y-1].typeStr),directions:l[y-1].directions,widthInColumns:parseInt(l[y],10)};break;case 25:b.getLogger().debug("Rule: nodeStatement (node) ",l[y]),this.$={id:l[y].id,label:l[y].label,type:b.typeStr2Type(l[y].typeStr),directions:l[y].directions,widthInColumns:1};break;case 26:b.getLogger().debug("APA123",this?this:"na"),b.getLogger().debug("COLUMNS: ",l[y]),this.$={type:"column-setting",columns:l[y]==="auto"?-1:parseInt(l[y])};break;case 27:b.getLogger().debug("Rule: id-block statement : ",l[y-2],l[y-1]),b.generateId(),this.$={...l[y-2],type:"composite",children:l[y-1]};break;case 28:b.getLogger().debug("Rule: blockStatement : ",l[y-2],l[y-1],l[y]);const T=b.generateId();this.$={id:T,type:"composite",label:"",children:l[y-1]};break;case 29:b.getLogger().debug("Rule: node (NODE_ID separator): ",l[y]),this.$={id:l[y]};break;case 30:b.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",l[y-1],l[y]),this.$={id:l[y-1],label:l[y].label,typeStr:l[y].typeStr,directions:l[y].directions};break;case 31:b.getLogger().debug("Rule: dirList: ",l[y]),this.$=[l[y]];break;case 32:b.getLogger().debug("Rule: dirList: ",l[y-1],l[y]),this.$=[l[y-1]].concat(l[y]);break;case 33:b.getLogger().debug("Rule: nodeShapeNLabel: ",l[y-2],l[y-1],l[y]),this.$={typeStr:l[y-2]+l[y],label:l[y-1]};break;case 34:b.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",l[y-3],l[y-2]," #3:",l[y-1],l[y]),this.$={typeStr:l[y-3]+l[y],label:l[y-2],directions:l[y-1]};break;case 35:case 36:this.$={type:"classDef",id:l[y-1].trim(),css:l[y].trim()};break;case 37:this.$={type:"applyClass",id:l[y-1].trim(),styleClass:l[y].trim()};break;case 38:this.$={type:"applyStyles",id:l[y-1].trim(),stylesStr:l[y].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:s,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:n,39:r,43:o,46:c},{8:[1,20]},e(p,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:s,28:i,29:a,31:n,39:r,43:o,46:c}),e(g,[2,16],{14:22,15:x,16:f}),e(g,[2,17]),e(g,[2,18]),e(g,[2,19]),e(g,[2,20]),e(g,[2,21]),e(g,[2,22]),e(_,[2,25],{27:[1,25]}),e(g,[2,26]),{19:26,26:12,31:n},{10:t,11:27,13:4,19:5,20:6,21:s,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:n,39:r,43:o,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(L,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(p,[2,13]),{26:35,31:n},{31:[2,14]},{17:[1,36]},e(_,[2,24]),{10:t,11:37,13:4,14:22,15:x,16:f,19:5,20:6,21:s,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:n,39:r,43:o,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(L,[2,30]),{18:[1,43]},{18:[1,44]},e(_,[2,23]),{18:[1,45]},{30:[1,46]},e(g,[2,28]),e(g,[2,35]),e(g,[2,36]),e(g,[2,37]),e(g,[2,38]),{36:[1,47]},{33:48,34:E},{15:[1,50]},e(g,[2,27]),e(L,[2,33]),{38:[1,51]},{33:52,34:E,38:[2,31]},{31:[2,15]},e(L,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:h(function(d,u){if(!u.recoverable){var k=new Error(d);throw k.hash=u,k}this.trace(d)},"parseError"),parse:h(function(d){var u=this,k=[0],b=[],w=[null],l=[],S=this.table,y="",D=0,F=0,H=l.slice.call(arguments,1),T=Object.create(this.lexer),U={yy:{}};for(var Z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Z)&&(U.yy[Z]=this.yy[Z]);T.setInput(d,U.yy),U.yy.lexer=T,U.yy.parser=this,T.yylloc===void 0&&(T.yylloc={});var ht=T.yylloc;l.push(ht);var ne=T.options&&T.options.ranges;function _t(){var W;return typeof(W=b.pop()||T.lex()||1)!="number"&&(W instanceof Array&&(W=(b=W).pop()),W=u.symbols_[W]||W),W}typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,h(function(W){k.length=k.length-2*W,w.length=w.length-W,l.length=l.length-W},"popStack"),h(_t,"lex");for(var M,J,Y,Et,at,G,vt,st,V={};;){if(J=k[k.length-1],this.defaultActions[J]?Y=this.defaultActions[J]:(M==null&&(M=_t()),Y=S[J]&&S[J][M]),Y===void 0||!Y.length||!Y[0]){var $t="";for(at in st=[],S[J])this.terminals_[at]&&at>2&&st.push("'"+this.terminals_[at]+"'");$t=T.showPosition?"Parse error on line "+(D+1)+`:
2
+ `+T.showPosition()+`
3
+ Expecting `+st.join(", ")+", got '"+(this.terminals_[M]||M)+"'":"Parse error on line "+(D+1)+": Unexpected "+(M==1?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError($t,{text:T.match,token:this.terminals_[M]||M,line:T.yylineno,loc:ht,expected:st})}if(Y[0]instanceof Array&&Y.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+M);switch(Y[0]){case 1:k.push(M),w.push(T.yytext),l.push(T.yylloc),k.push(Y[1]),M=null,F=T.yyleng,y=T.yytext,D=T.yylineno,ht=T.yylloc;break;case 2:if(G=this.productions_[Y[1]][1],V.$=w[w.length-G],V._$={first_line:l[l.length-(G||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(G||1)].first_column,last_column:l[l.length-1].last_column},ne&&(V._$.range=[l[l.length-(G||1)].range[0],l[l.length-1].range[1]]),(Et=this.performAction.apply(V,[y,F,D,U.yy,Y[1],w,l].concat(H)))!==void 0)return Et;G&&(k=k.slice(0,-1*G*2),w=w.slice(0,-1*G),l=l.slice(0,-1*G)),k.push(this.productions_[Y[1]][0]),w.push(V.$),l.push(V._$),vt=S[k[k.length-2]][k[k.length-1]],k.push(vt);break;case 3:return!0}}return!0},"parse")},N=function(){return{EOF:1,parseError:h(function(d,u){if(!this.yy.parser)throw new Error(d);this.yy.parser.parseError(d,u)},"parseError"),setInput:h(function(d,u){return this.yy=u||this.yy||{},this._input=d,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:h(function(){var d=this._input[0];return this.yytext+=d,this.yyleng++,this.offset++,this.match+=d,this.matched+=d,d.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),d},"input"),unput:h(function(d){var u=d.length,k=d.split(/(?:\r\n?|\n)/g);this._input=d+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var b=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),k.length-1&&(this.yylineno-=k.length-1);var w=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:k?(k.length===b.length?this.yylloc.first_column:0)+b[b.length-k.length].length-k[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:h(function(d){this.unput(this.match.slice(d))},"less"),pastInput:h(function(){var d=this.matched.substr(0,this.matched.length-this.match.length);return(d.length>20?"...":"")+d.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var d=this.match;return d.length<20&&(d+=this._input.substr(0,20-d.length)),(d.substr(0,20)+(d.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var d=this.pastInput(),u=new Array(d.length+1).join("-");return d+this.upcomingInput()+`
5
+ `+u+"^"},"showPosition"),test_match:h(function(d,u){var k,b,w;if(this.options.backtrack_lexer&&(w={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(w.yylloc.range=this.yylloc.range.slice(0))),(b=d[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+d[0].length},this.yytext+=d[0],this.match+=d[0],this.matches=d,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(d[0].length),this.matched+=d[0],k=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),k)return k;if(this._backtrack){for(var l in w)this[l]=w[l];return!1}return!1},"test_match"),next:h(function(){if(this.done)return this.EOF;var d,u,k,b;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),l=0;l<w.length;l++)if((k=this._input.match(this.rules[w[l]]))&&(!u||k[0].length>u[0].length)){if(u=k,b=l,this.options.backtrack_lexer){if((d=this.test_match(k,w[l]))!==!1)return d;if(this._backtrack){u=!1;continue}return!1}if(!this.options.flex)break}return u?(d=this.test_match(u,w[b]))!==!1&&d:this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:h(function(){var d=this.next();return d||this.lex()},"lex"),begin:h(function(d){this.conditionStack.push(d)},"begin"),popState:h(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:h(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:h(function(d){return(d=this.conditionStack.length-1-Math.abs(d||0))>=0?this.conditionStack[d]:"INITIAL"},"topState"),pushState:h(function(d){this.begin(d)},"pushState"),stateStackSize:h(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:h(function(d,u,k,b){switch(k){case 0:return d.getLogger().debug("Found block-beta"),10;case 1:return d.getLogger().debug("Found id-block"),29;case 2:return d.getLogger().debug("Found block"),10;case 3:d.getLogger().debug(".",u.yytext);break;case 4:d.getLogger().debug("_",u.yytext);break;case 5:return 5;case 6:return u.yytext=-1,28;case 7:return u.yytext=u.yytext.replace(/columns\s+/,""),d.getLogger().debug("COLUMNS (LEX)",u.yytext),28;case 8:case 76:case 77:case 99:this.pushState("md_string");break;case 9:return"MD_STR";case 10:case 34:case 79:this.popState();break;case 11:this.pushState("string");break;case 12:d.getLogger().debug("LEX: POPPING STR:",u.yytext),this.popState();break;case 13:return d.getLogger().debug("LEX: STR end:",u.yytext),"STR";case 14:return u.yytext=u.yytext.replace(/space\:/,""),d.getLogger().debug("SPACE NUM (LEX)",u.yytext),21;case 15:return u.yytext="1",d.getLogger().debug("COLUMNS (LEX)",u.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:case 40:case 41:case 44:return this.popState(),d.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),d.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),d.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),d.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),d.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),d.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),d.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),d.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),d.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),d.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),d.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),d.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return d.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return d.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return d.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return d.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return d.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return d.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return d.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return d.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),d.getLogger().debug("LEX ARR START"),37;case 74:return d.getLogger().debug("Lex: NODE_ID",u.yytext),31;case 75:return d.getLogger().debug("Lex: EOF",u.yytext),8;case 78:return"NODE_DESCR";case 80:d.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:d.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return d.getLogger().debug("LEX: NODE_DESCR:",u.yytext),"NODE_DESCR";case 83:d.getLogger().debug("LEX POPPING"),this.popState();break;case 84:d.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return u.yytext=u.yytext.replace(/^,\s*/,""),d.getLogger().debug("Lex (right): dir:",u.yytext),"DIR";case 86:return u.yytext=u.yytext.replace(/^,\s*/,""),d.getLogger().debug("Lex (left):",u.yytext),"DIR";case 87:return u.yytext=u.yytext.replace(/^,\s*/,""),d.getLogger().debug("Lex (x):",u.yytext),"DIR";case 88:return u.yytext=u.yytext.replace(/^,\s*/,""),d.getLogger().debug("Lex (y):",u.yytext),"DIR";case 89:return u.yytext=u.yytext.replace(/^,\s*/,""),d.getLogger().debug("Lex (up):",u.yytext),"DIR";case 90:return u.yytext=u.yytext.replace(/^,\s*/,""),d.getLogger().debug("Lex (down):",u.yytext),"DIR";case 91:return u.yytext="]>",d.getLogger().debug("Lex (ARROW_DIR end):",u.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return d.getLogger().debug("Lex: LINK","#"+u.yytext+"#"),15;case 93:case 94:case 95:return d.getLogger().debug("Lex: LINK",u.yytext),15;case 96:case 97:case 98:return d.getLogger().debug("Lex: START_LINK",u.yytext),this.pushState("LLABEL"),16;case 100:return d.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),d.getLogger().debug("Lex: LINK","#"+u.yytext+"#"),15;case 102:case 103:return this.popState(),d.getLogger().debug("Lex: LINK",u.yytext),15;case 104:return d.getLogger().debug("Lex: COLON",u.yytext),u.yytext=u.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}}}();function $(){this.yy={}}return v.lexer=N,h($,"Parser"),$.prototype=v,v.Parser=$,new $}();pt.parser=pt;var ke=pt,K=new Map,ut=[],xt=new Map,Tt="color",Ct="fill",Le=z(),nt=new Map,Se=h(e=>ye.sanitizeText(e,Le),"sanitizeText"),_e=h(function(e,t=""){let s=nt.get(e);s||(s={id:e,styles:[],textStyles:[]},nt.set(e,s)),t!=null&&t.split(",").forEach(i=>{const a=i.replace(/([^;]*);/,"$1").trim();if(RegExp(Tt).exec(i)){const n=a.replace(Ct,"bgFill").replace(Tt,Ct);s.textStyles.push(n)}s.styles.push(a)})},"addStyleClass"),Ee=h(function(e,t=""){const s=K.get(e);t!=null&&(s.styles=t.split(","))},"addStyle2Node"),ve=h(function(e,t){e.split(",").forEach(function(s){let i=K.get(s);if(i===void 0){const a=s.trim();i={id:a,type:"na",children:[]},K.set(a,i)}i.classes||(i.classes=[]),i.classes.push(t)})},"setCssClass"),Nt=h((e,t)=>{const s=e.flat(),i=[],a=s.find(r=>(r==null?void 0:r.type)==="column-setting"),n=(a==null?void 0:a.columns)??-1;for(const r of s)if(typeof n=="number"&&n>0&&r.type!=="column-setting"&&typeof r.widthInColumns=="number"&&r.widthInColumns>n&&m.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${n}`),r.label&&(r.label=Se(r.label)),r.type!=="classDef")if(r.type!=="applyClass")if(r.type!=="applyStyles")if(r.type==="column-setting")t.columns=r.columns??-1;else if(r.type==="edge"){const o=(xt.get(r.id)??0)+1;xt.set(r.id,o),r.id=o+"-"+r.id,ut.push(r)}else{r.label||(r.type==="composite"?r.label="":r.label=r.id);const o=K.get(r.id);if(o===void 0?K.set(r.id,r):(r.type!=="na"&&(o.type=r.type),r.label!==r.id&&(o.label=r.label)),r.children&&Nt(r.children,r),r.type==="space"){const c=r.width??1;for(let p=0;p<c;p++){const g=xe(r);g.id=g.id+"-"+p,K.set(g.id,g),i.push(g)}}else o===void 0&&i.push(r)}else r!=null&&r.stylesStr&&Ee(r.id,r==null?void 0:r.stylesStr);else ve(r.id,(r==null?void 0:r.styleClass)??"");else _e(r.id,r.css);t.children=i},"populateBlockDatabase"),bt=[],et={id:"root",type:"composite",children:[],columns:-1},$e=h(()=>{m.debug("Clear called"),le(),et={id:"root",type:"composite",children:[],columns:-1},K=new Map([["root",et]]),bt=[],nt=new Map,ut=[],xt=new Map},"clear");function It(e){switch(m.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return m.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function Bt(e){return m.debug("typeStr2Type",e),e==="=="?"thick":"normal"}function zt(e){switch(e.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}h(It,"typeStr2Type"),h(Bt,"edgeTypeStr2Type"),h(zt,"edgeStrToEdgeData");var Rt=0,De=h(()=>(Rt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Rt),"generateId"),Te=h(e=>{et.children=e,Nt(e,et),bt=et.children},"setHierarchy"),Ce=h(e=>{const t=K.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),Ne=h(()=>[...K.values()],"getBlocksFlat"),Ie=h(()=>bt||[],"getBlocks"),Be=h(()=>ut,"getEdges"),ze=h(e=>K.get(e),"getBlock"),Re=h(e=>{K.set(e.id,e)},"setBlock"),Oe=h(()=>m,"getLogger"),Ae=h(function(){return nt},"getClasses"),Me={getConfig:h(()=>Q().block,"getConfig"),typeStr2Type:It,edgeTypeStr2Type:Bt,edgeStrToEdgeData:zt,getLogger:Oe,getBlocksFlat:Ne,getBlocks:Ie,getEdges:Be,setHierarchy:Te,getBlock:ze,setBlock:Re,getColumns:Ce,getClasses:Ae,clear:$e,generateId:De},it=h((e,t)=>{const s=fe,i=s(e,"r"),a=s(e,"g"),n=s(e,"b");return ce(i,a,n,t)},"fade"),Pe=h(e=>`.label {
7
+ font-family: ${e.fontFamily};
8
+ color: ${e.nodeTextColor||e.textColor};
9
+ }
10
+ .cluster-label text {
11
+ fill: ${e.titleColor};
12
+ }
13
+ .cluster-label span,p {
14
+ color: ${e.titleColor};
15
+ }
16
+
17
+
18
+
19
+ .label text,span,p {
20
+ fill: ${e.nodeTextColor||e.textColor};
21
+ color: ${e.nodeTextColor||e.textColor};
22
+ }
23
+
24
+ .node rect,
25
+ .node circle,
26
+ .node ellipse,
27
+ .node polygon,
28
+ .node path {
29
+ fill: ${e.mainBkg};
30
+ stroke: ${e.nodeBorder};
31
+ stroke-width: 1px;
32
+ }
33
+ .flowchart-label text {
34
+ text-anchor: middle;
35
+ }
36
+ // .flowchart-label .text-outer-tspan {
37
+ // text-anchor: middle;
38
+ // }
39
+ // .flowchart-label .text-inner-tspan {
40
+ // text-anchor: start;
41
+ // }
42
+
43
+ .node .label {
44
+ text-align: center;
45
+ }
46
+ .node.clickable {
47
+ cursor: pointer;
48
+ }
49
+
50
+ .arrowheadPath {
51
+ fill: ${e.arrowheadColor};
52
+ }
53
+
54
+ .edgePath .path {
55
+ stroke: ${e.lineColor};
56
+ stroke-width: 2.0px;
57
+ }
58
+
59
+ .flowchart-link {
60
+ stroke: ${e.lineColor};
61
+ fill: none;
62
+ }
63
+
64
+ .edgeLabel {
65
+ background-color: ${e.edgeLabelBackground};
66
+ rect {
67
+ opacity: 0.5;
68
+ background-color: ${e.edgeLabelBackground};
69
+ fill: ${e.edgeLabelBackground};
70
+ }
71
+ text-align: center;
72
+ }
73
+
74
+ /* For html labels only */
75
+ .labelBkg {
76
+ background-color: ${it(e.edgeLabelBackground,.5)};
77
+ // background-color:
78
+ }
79
+
80
+ .node .cluster {
81
+ // fill: ${it(e.mainBkg,.5)};
82
+ fill: ${it(e.clusterBkg,.5)};
83
+ stroke: ${it(e.clusterBorder,.2)};
84
+ box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
85
+ stroke-width: 1px;
86
+ }
87
+
88
+ .cluster text {
89
+ fill: ${e.titleColor};
90
+ }
91
+
92
+ .cluster span,p {
93
+ color: ${e.titleColor};
94
+ }
95
+ /* .cluster div {
96
+ color: ${e.titleColor};
97
+ } */
98
+
99
+ div.mermaidTooltip {
100
+ position: absolute;
101
+ text-align: center;
102
+ max-width: 200px;
103
+ padding: 2px;
104
+ font-family: ${e.fontFamily};
105
+ font-size: 12px;
106
+ background: ${e.tertiaryColor};
107
+ border: 1px solid ${e.border2};
108
+ border-radius: 2px;
109
+ pointer-events: none;
110
+ z-index: 100;
111
+ }
112
+
113
+ .flowchartTitleText {
114
+ text-anchor: middle;
115
+ font-size: 18px;
116
+ fill: ${e.textColor};
117
+ }
118
+ ${ie()}
119
+ `,"getStyles"),Ye=h((e,t,s,i)=>{t.forEach(a=>{We[a](e,s,i)})},"insertMarkers"),We={extension:h((e,t,s)=>{m.trace("Making markers for ",s),e.append("defs").append("marker").attr("id",s+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",s+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),composition:h((e,t,s)=>{e.append("defs").append("marker").attr("id",s+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",s+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),aggregation:h((e,t,s)=>{e.append("defs").append("marker").attr("id",s+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",s+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),dependency:h((e,t,s)=>{e.append("defs").append("marker").attr("id",s+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",s+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),lollipop:h((e,t,s)=>{e.append("defs").append("marker").attr("id",s+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",s+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),point:h((e,t,s)=>{e.append("marker").attr("id",s+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",s+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),circle:h((e,t,s)=>{e.append("marker").attr("id",s+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",s+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),cross:h((e,t,s)=>{e.append("marker").attr("id",s+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",s+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),barb:h((e,t,s)=>{e.append("defs").append("marker").attr("id",s+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb")},Xe=Ye,B=((se=(ae=z())==null?void 0:ae.block)==null?void 0:se.padding)??8;function Ot(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);return e<0?{px:t,py:0}:e===1?{px:0,py:t}:{px:t%e,py:Math.floor(t/e)}}h(Ot,"calculateBlockPosition");var Fe=h(e=>{let t=0,s=0;for(const i of e.children){const{width:a,height:n,x:r,y:o}=i.size??{width:0,height:0,x:0,y:0};m.debug("getMaxChildSize abc95 child:",i.id,"width:",a,"height:",n,"x:",r,"y:",o,i.type),i.type!=="space"&&(a>t&&(t=a/(e.widthInColumns??1)),n>s&&(s=n))}return{width:t,height:s}},"getMaxChildSize");function ot(e,t,s=0,i=0){var r,o,c,p,g,x,f,_,L,E,v;m.debug("setBlockSizes abc95 (start)",e.id,(r=e==null?void 0:e.size)==null?void 0:r.x,"block width =",e==null?void 0:e.size,"siblingWidth",s),(o=e==null?void 0:e.size)!=null&&o.width||(e.size={width:s,height:i,x:0,y:0});let a=0,n=0;if(((c=e.children)==null?void 0:c.length)>0){for(const l of e.children)ot(l,t);const N=Fe(e);a=N.width,n=N.height,m.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",a,n);for(const l of e.children)l.size&&(m.debug(`abc95 Setting size of children of ${e.id} id=${l.id} ${a} ${n} ${JSON.stringify(l.size)}`),l.size.width=a*(l.widthInColumns??1)+B*((l.widthInColumns??1)-1),l.size.height=n,l.size.x=0,l.size.y=0,m.debug(`abc95 updating size of ${e.id} children child:${l.id} maxWidth:${a} maxHeight:${n}`));for(const l of e.children)ot(l,t,a,n);const $=e.columns??-1;let d=0;for(const l of e.children)d+=l.widthInColumns??1;let u=e.children.length;$>0&&$<d&&(u=$);const k=Math.ceil(d/u);let b=u*(a+B)+B,w=k*(n+B)+B;if(b<s){m.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${s} siblingHeight ${i} width ${b}`),b=s,w=i;const l=(s-u*B-B)/u,S=(i-k*B-B)/k;m.debug("Size indata abc88",e.id,"childWidth",l,"maxWidth",a),m.debug("Size indata abc88",e.id,"childHeight",S,"maxHeight",n),m.debug("Size indata abc88 xSize",u,"padding",B);for(const y of e.children)y.size&&(y.size.width=l,y.size.height=S,y.size.x=0,y.size.y=0)}if(m.debug(`abc95 (finale calc) ${e.id} xSize ${u} ySize ${k} columns ${$}${e.children.length} width=${Math.max(b,((p=e.size)==null?void 0:p.width)||0)}`),b<(((g=e==null?void 0:e.size)==null?void 0:g.width)||0)){b=((x=e==null?void 0:e.size)==null?void 0:x.width)||0;const l=$>0?Math.min(e.children.length,$):e.children.length;if(l>0){const S=(b-l*B-B)/l;m.debug("abc95 (growing to fit) width",e.id,b,(f=e.size)==null?void 0:f.width,S);for(const y of e.children)y.size&&(y.size.width=S)}}e.size={width:b,height:w,x:0,y:0}}m.debug("setBlockSizes abc94 (done)",e.id,(_=e==null?void 0:e.size)==null?void 0:_.x,(L=e==null?void 0:e.size)==null?void 0:L.width,(E=e==null?void 0:e.size)==null?void 0:E.y,(v=e==null?void 0:e.size)==null?void 0:v.height)}function ft(e,t){var i,a,n,r,o,c,p,g,x,f,_,L,E,v,N,$,d;m.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(i=e==null?void 0:e.size)==null?void 0:i.x} y: ${(a=e==null?void 0:e.size)==null?void 0:a.y} width: ${(n=e==null?void 0:e.size)==null?void 0:n.width}`);const s=e.columns??-1;if(m.debug("layoutBlocks columns abc95",e.id,"=>",s,e),e.children&&e.children.length>0){const u=((o=(r=e==null?void 0:e.children[0])==null?void 0:r.size)==null?void 0:o.width)??0,k=e.children.length*u+(e.children.length-1)*B;m.debug("widthOfChildren 88",k,"posX");let b=0;m.debug("abc91 block?.size?.x",e.id,(c=e==null?void 0:e.size)==null?void 0:c.x);let w=(p=e==null?void 0:e.size)!=null&&p.x?((g=e==null?void 0:e.size)==null?void 0:g.x)+(-((x=e==null?void 0:e.size)==null?void 0:x.width)/2||0):-B,l=0;for(const S of e.children){const y=e;if(!S.size)continue;const{width:D,height:F}=S.size,{px:H,py:T}=Ot(s,b);if(T!=l&&(l=T,w=(f=e==null?void 0:e.size)!=null&&f.x?((_=e==null?void 0:e.size)==null?void 0:_.x)+(-((L=e==null?void 0:e.size)==null?void 0:L.width)/2||0):-B,m.debug("New row in layout for block",e.id," and child ",S.id,l)),m.debug(`abc89 layout blocks (child) id: ${S.id} Pos: ${b} (px, py) ${H},${T} (${(E=y==null?void 0:y.size)==null?void 0:E.x},${(v=y==null?void 0:y.size)==null?void 0:v.y}) parent: ${y.id} width: ${D}${B}`),y.size){const Z=D/2;S.size.x=w+B+Z,m.debug(`abc91 layout blocks (calc) px, pyid:${S.id} startingPos=X${w} new startingPosX${S.size.x} ${Z} padding=${B} width=${D} halfWidth=${Z} => x:${S.size.x} y:${S.size.y} ${S.widthInColumns} (width * (child?.w || 1)) / 2 ${D*((S==null?void 0:S.widthInColumns)??1)/2}`),w=S.size.x+Z,S.size.y=y.size.y-y.size.height/2+T*(F+B)+F/2+B,m.debug(`abc88 layout blocks (calc) px, pyid:${S.id}startingPosX${w}${B}${Z}=>x:${S.size.x}y:${S.size.y}${S.widthInColumns}(width * (child?.w || 1)) / 2${D*((S==null?void 0:S.widthInColumns)??1)/2}`)}S.children&&ft(S);let U=(S==null?void 0:S.widthInColumns)??1;s>0&&(U=Math.min(U,s-b%s)),b+=U,m.debug("abc88 columnsPos",S,b)}}m.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${(N=e==null?void 0:e.size)==null?void 0:N.x} y: ${($=e==null?void 0:e.size)==null?void 0:$.y} width: ${(d=e==null?void 0:e.size)==null?void 0:d.width}`)}function mt(e,{minX:t,minY:s,maxX:i,maxY:a}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:n,y:r,width:o,height:c}=e.size;n-o/2<t&&(t=n-o/2),r-c/2<s&&(s=r-c/2),n+o/2>i&&(i=n+o/2),r+c/2>a&&(a=r+c/2)}if(e.children)for(const n of e.children)({minX:t,minY:s,maxX:i,maxY:a}=mt(n,{minX:t,minY:s,maxX:i,maxY:a}));return{minX:t,minY:s,maxX:i,maxY:a}}function At(e){const t=e.getBlock("root");if(!t)return;ot(t,e,0,0),ft(t),m.debug("getBlocks",JSON.stringify(t,null,2));const{minX:s,minY:i,maxX:a,maxY:n}=mt(t);return{x:s,y:i,width:a-s,height:n-i}}function wt(e,t){t&&e.attr("style",t)}function Mt(e,t){const s=R(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),i=s.append("xhtml:div"),a=e.label,n=e.isNode?"nodeLabel":"edgeLabel",r=i.append("span");return r.html(yt(a,t)),wt(r,e.labelStyle),r.attr("class",n),wt(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap"),i.attr("xmlns","http://www.w3.org/1999/xhtml"),s.node()}h(ot,"setBlockSizes"),h(ft,"layoutBlocks"),h(mt,"findBounds"),h(At,"layout"),h(wt,"applyStyle"),h(Mt,"addHtmlLabel");var X=h(async(e,t,s,i)=>{let a=e||"";typeof a=="object"&&(a=a[0]);const n=z();if(q(n.flowchart.htmlLabels))return a=a.replace(/\\n|\n/g,"<br />"),m.debug("vertexText"+a),Mt({isNode:i,label:await pe(gt(a)),labelStyle:t.replace("fill:","color:")},n);{const r=document.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("style",t.replace("color:","fill:"));let o=[];o=typeof a=="string"?a.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(a)?a:[];for(const c of o){const p=document.createElementNS("http://www.w3.org/2000/svg","tspan");p.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),p.setAttribute("dy","1em"),p.setAttribute("x","0"),s?p.setAttribute("class","title-row"):p.setAttribute("class","row"),p.textContent=c.trim(),r.appendChild(p)}return r}},"createLabel"),He=h((e,t,s,i,a)=>{t.arrowTypeStart&&Pt(e,"start",t.arrowTypeStart,s,i,a),t.arrowTypeEnd&&Pt(e,"end",t.arrowTypeEnd,s,i,a)},"addEdgeMarkers"),Ue={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Pt=h((e,t,s,i,a,n)=>{const r=Ue[s];if(!r)return void m.warn(`Unknown arrow type: ${s}`);const o=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${i}#${a}_${n}-${r}${o})`)},"addEdgeMarker"),kt={},A={},Ke=h(async(e,t)=>{const s=z(),i=q(s.flowchart.htmlLabels),a=t.labelType==="markdown"?Dt(e,t.label,{style:t.labelStyle,useHtmlLabels:i,addSvgBackground:!0},s):await X(t.label,t.labelStyle),n=e.insert("g").attr("class","edgeLabel"),r=n.insert("g").attr("class","label");r.node().appendChild(a);let o,c=a.getBBox();if(i){const p=a.children[0],g=R(a);c=p.getBoundingClientRect(),g.attr("width",c.width),g.attr("height",c.height)}if(r.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),kt[t.id]=n,t.width=c.width,t.height=c.height,t.startLabelLeft){const p=await X(t.startLabelLeft,t.labelStyle),g=e.insert("g").attr("class","edgeTerminals"),x=g.insert("g").attr("class","inner");o=x.node().appendChild(p);const f=p.getBBox();x.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),A[t.id]||(A[t.id]={}),A[t.id].startLeft=g,rt(o,t.startLabelLeft)}if(t.startLabelRight){const p=await X(t.startLabelRight,t.labelStyle),g=e.insert("g").attr("class","edgeTerminals"),x=g.insert("g").attr("class","inner");o=g.node().appendChild(p),x.node().appendChild(p);const f=p.getBBox();x.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),A[t.id]||(A[t.id]={}),A[t.id].startRight=g,rt(o,t.startLabelRight)}if(t.endLabelLeft){const p=await X(t.endLabelLeft,t.labelStyle),g=e.insert("g").attr("class","edgeTerminals"),x=g.insert("g").attr("class","inner");o=x.node().appendChild(p);const f=p.getBBox();x.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),g.node().appendChild(p),A[t.id]||(A[t.id]={}),A[t.id].endLeft=g,rt(o,t.endLabelLeft)}if(t.endLabelRight){const p=await X(t.endLabelRight,t.labelStyle),g=e.insert("g").attr("class","edgeTerminals"),x=g.insert("g").attr("class","inner");o=x.node().appendChild(p);const f=p.getBBox();x.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),g.node().appendChild(p),A[t.id]||(A[t.id]={}),A[t.id].endRight=g,rt(o,t.endLabelRight)}return a},"insertEdgeLabel");function rt(e,t){z().flowchart.htmlLabels&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}h(rt,"setTerminalWidth");var je=h((e,t)=>{m.debug("Moving label abc88 ",e.id,e.label,kt[e.id],t);let s=t.updatedPath?t.updatedPath:t.originalPath;const i=z(),{subGraphTitleTotalMargin:a}=ge(i);if(e.label){const n=kt[e.id];let r=e.x,o=e.y;if(s){const c=tt.calcLabelPosition(s);m.debug("Moving label "+e.label+" from (",r,",",o,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(r=c.x,o=c.y)}n.attr("transform",`translate(${r}, ${o+a/2})`)}if(e.startLabelLeft){const n=A[e.id].startLeft;let r=e.x,o=e.y;if(s){const c=tt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",s);r=c.x,o=c.y}n.attr("transform",`translate(${r}, ${o})`)}if(e.startLabelRight){const n=A[e.id].startRight;let r=e.x,o=e.y;if(s){const c=tt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",s);r=c.x,o=c.y}n.attr("transform",`translate(${r}, ${o})`)}if(e.endLabelLeft){const n=A[e.id].endLeft;let r=e.x,o=e.y;if(s){const c=tt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",s);r=c.x,o=c.y}n.attr("transform",`translate(${r}, ${o})`)}if(e.endLabelRight){const n=A[e.id].endRight;let r=e.x,o=e.y;if(s){const c=tt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",s);r=c.x,o=c.y}n.attr("transform",`translate(${r}, ${o})`)}},"positionEdgeLabel"),qe=h((e,t)=>{const s=e.x,i=e.y,a=Math.abs(t.x-s),n=Math.abs(t.y-i),r=e.width/2,o=e.height/2;return a>=r||n>=o},"outsideNode"),Ze=h((e,t,s)=>{m.debug(`intersection calc abc89:
120
+ outsidePoint: ${JSON.stringify(t)}
121
+ insidePoint : ${JSON.stringify(s)}
122
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,a=e.y,n=Math.abs(i-s.x),r=e.width/2;let o=s.x<t.x?r-n:r+n;const c=e.height/2,p=Math.abs(t.y-s.y),g=Math.abs(t.x-s.x);if(Math.abs(a-t.y)*r>Math.abs(i-t.x)*c){let x=s.y<t.y?t.y-c-a:a-c-t.y;o=g*x/p;const f={x:s.x<t.x?s.x+o:s.x-g+o,y:s.y<t.y?s.y+p-x:s.y-p+x};return o===0&&(f.x=t.x,f.y=t.y),g===0&&(f.x=t.x),p===0&&(f.y=t.y),m.debug(`abc89 topp/bott calc, Q ${p}, q ${x}, R ${g}, r ${o}`,f),f}{o=s.x<t.x?t.x-r-i:i-r-t.x;let x=p*o/g,f=s.x<t.x?s.x+g-o:s.x-g+o,_=s.y<t.y?s.y+x:s.y-x;return m.debug(`sides calc abc89, Q ${p}, q ${x}, R ${g}, r ${o}`,{_x:f,_y:_}),o===0&&(f=t.x,_=t.y),g===0&&(f=t.x),p===0&&(_=t.y),{x:f,y:_}}},"intersection"),Yt=h((e,t)=>{m.debug("abc88 cutPathAtIntersect",e,t);let s=[],i=e[0],a=!1;return e.forEach(n=>{if(qe(t,n)||a)i=n,a||s.push(n);else{const r=Ze(t,i,n);let o=!1;s.forEach(c=>{o=o||c.x===r.x&&c.y===r.y}),s.some(c=>c.x===r.x&&c.y===r.y)||s.push(r),a=!0}}),s},"cutPathAtIntersect"),Ge=h(function(e,t,s,i,a,n,r){let o=s.points;m.debug("abc88 InsertEdge: edge=",s,"e=",t);let c=!1;const p=n.node(t.v);var g=n.node(t.w);g!=null&&g.intersect&&(p!=null&&p.intersect)&&(o=o.slice(1,s.points.length-1),o.unshift(p.intersect(o[0])),o.push(g.intersect(o[o.length-1]))),s.toCluster&&(m.debug("to cluster abc88",i[s.toCluster]),o=Yt(s.points,i[s.toCluster].node),c=!0),s.fromCluster&&(m.debug("from cluster abc88",i[s.fromCluster]),o=Yt(o.reverse(),i[s.fromCluster].node).reverse(),c=!0);const x=o.filter(u=>!Number.isNaN(u.y));let f=we;!s.curve||a!=="graph"&&a!=="flowchart"||(f=s.curve);const{x:_,y:L}=de(s),E=me().x(_).y(L).curve(f);let v;switch(s.thickness){case"normal":v="edge-thickness-normal";break;case"thick":case"invisible":v="edge-thickness-thick";break;default:v=""}switch(s.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed"}const N=e.append("path").attr("d",E(x)).attr("id",s.id).attr("class"," "+v+(s.classes?" "+s.classes:"")).attr("style",s.style);let $="";(z().flowchart.arrowMarkerAbsolute||z().state.arrowMarkerAbsolute)&&($=he(!0)),He(N,s,$,r,a);let d={};return c&&(d.updatedPath=o),d.originalPath=s.points,d},"insertEdge"),Je=h(e=>{const t=new Set;for(const s of e)switch(s){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(s)}return t},"expandAndDeduplicateDirections"),Ve=h((e,t,s)=>{const i=Je(e),a=t.height+2*s.padding,n=a/2,r=t.width+2*n+s.padding,o=s.padding/2;return i.has("right")&&i.has("left")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:n,y:0},{x:r/2,y:2*o},{x:r-n,y:0},{x:r,y:0},{x:r,y:-a/3},{x:r+2*o,y:-a/2},{x:r,y:-2*a/3},{x:r,y:-a},{x:r-n,y:-a},{x:r/2,y:-a-2*o},{x:n,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*o,y:-a/2},{x:0,y:-a/3}]:i.has("right")&&i.has("left")&&i.has("up")?[{x:n,y:0},{x:r-n,y:0},{x:r,y:-a/2},{x:r-n,y:-a},{x:n,y:-a},{x:0,y:-a/2}]:i.has("right")&&i.has("left")&&i.has("down")?[{x:0,y:0},{x:n,y:-a},{x:r-n,y:-a},{x:r,y:0}]:i.has("right")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:r,y:-n},{x:r,y:-a+n},{x:0,y:-a}]:i.has("left")&&i.has("up")&&i.has("down")?[{x:r,y:0},{x:0,y:-n},{x:0,y:-a+n},{x:r,y:-a}]:i.has("right")&&i.has("left")?[{x:n,y:0},{x:n,y:-o},{x:r-n,y:-o},{x:r-n,y:0},{x:r,y:-a/2},{x:r-n,y:-a},{x:r-n,y:-a+o},{x:n,y:-a+o},{x:n,y:-a},{x:0,y:-a/2}]:i.has("up")&&i.has("down")?[{x:r/2,y:0},{x:0,y:-o},{x:n,y:-o},{x:n,y:-a+o},{x:0,y:-a+o},{x:r/2,y:-a},{x:r,y:-a+o},{x:r-n,y:-a+o},{x:r-n,y:-o},{x:r,y:-o}]:i.has("right")&&i.has("up")?[{x:0,y:0},{x:r,y:-n},{x:0,y:-a}]:i.has("right")&&i.has("down")?[{x:0,y:0},{x:r,y:0},{x:0,y:-a}]:i.has("left")&&i.has("up")?[{x:r,y:0},{x:0,y:-n},{x:r,y:-a}]:i.has("left")&&i.has("down")?[{x:r,y:0},{x:0,y:0},{x:r,y:-a}]:i.has("right")?[{x:n,y:-o},{x:n,y:-o},{x:r-n,y:-o},{x:r-n,y:0},{x:r,y:-a/2},{x:r-n,y:-a},{x:r-n,y:-a+o},{x:n,y:-a+o},{x:n,y:-a+o}]:i.has("left")?[{x:n,y:0},{x:n,y:-o},{x:r-n,y:-o},{x:r-n,y:-a+o},{x:n,y:-a+o},{x:n,y:-a},{x:0,y:-a/2}]:i.has("up")?[{x:n,y:-o},{x:n,y:-a+o},{x:0,y:-a+o},{x:r/2,y:-a},{x:r,y:-a+o},{x:r-n,y:-a+o},{x:r-n,y:-o}]:i.has("down")?[{x:r/2,y:0},{x:0,y:-o},{x:n,y:-o},{x:n,y:-a+o},{x:r-n,y:-a+o},{x:r-n,y:-o},{x:r,y:-o}]:[{x:0,y:0}]},"getArrowPoints");function Wt(e,t){return e.intersect(t)}h(Wt,"intersectNode");var Qe=Wt;function Xt(e,t,s,i){var a=e.x,n=e.y,r=a-i.x,o=n-i.y,c=Math.sqrt(t*t*o*o+s*s*r*r),p=Math.abs(t*s*r/c);i.x<a&&(p=-p);var g=Math.abs(t*s*o/c);return i.y<n&&(g=-g),{x:a+p,y:n+g}}h(Xt,"intersectEllipse");var Ft=Xt;function Ht(e,t,s){return Ft(e,t,t,s)}h(Ht,"intersectCircle");var tr=Ht;function Ut(e,t,s,i){var a,n,r,o,c,p,g,x,f,_,L,E,v;if(a=t.y-e.y,r=e.x-t.x,c=t.x*e.y-e.x*t.y,f=a*s.x+r*s.y+c,_=a*i.x+r*i.y+c,!(f!==0&&_!==0&&Lt(f,_)||(n=i.y-s.y,o=s.x-i.x,p=i.x*s.y-s.x*i.y,g=n*e.x+o*e.y+p,x=n*t.x+o*t.y+p,g!==0&&x!==0&&Lt(g,x)||(L=a*o-n*r)===0)))return E=Math.abs(L/2),{x:(v=r*p-o*c)<0?(v-E)/L:(v+E)/L,y:(v=n*c-a*p)<0?(v-E)/L:(v+E)/L}}function Lt(e,t){return e*t>0}h(Ut,"intersectLine"),h(Lt,"sameSign");var er=Ut,rr=Kt;function Kt(e,t,s){var i=e.x,a=e.y,n=[],r=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(L){r=Math.min(r,L.x),o=Math.min(o,L.y)}):(r=Math.min(r,t.x),o=Math.min(o,t.y));for(var c=i-e.width/2-r,p=a-e.height/2-o,g=0;g<t.length;g++){var x=t[g],f=t[g<t.length-1?g+1:0],_=er(e,s,{x:c+x.x,y:p+x.y},{x:c+f.x,y:p+f.y});_&&n.push(_)}return n.length?(n.length>1&&n.sort(function(L,E){var v=L.x-s.x,N=L.y-s.y,$=Math.sqrt(v*v+N*N),d=E.x-s.x,u=E.y-s.y,k=Math.sqrt(d*d+u*u);return $<k?-1:$===k?0:1}),n[0]):e}h(Kt,"intersectPolygon");var C={node:Qe,circle:tr,ellipse:Ft,polygon:rr,rect:h((e,t)=>{var s,i,a=e.x,n=e.y,r=t.x-a,o=t.y-n,c=e.width/2,p=e.height/2;return Math.abs(o)*c>Math.abs(r)*p?(o<0&&(p=-p),s=o===0?0:p*r/o,i=p):(r<0&&(c=-c),s=c,i=r===0?0:c*o/r),{x:a+s,y:n+i}},"intersectRect")},O=h(async(e,t,s,i)=>{const a=z();let n;const r=t.useHtmlLabels||q(a.flowchart.htmlLabels);n=s||"node default";const o=e.insert("g").attr("class",n).attr("id",t.domId||t.id),c=o.insert("g").attr("class","label").attr("style",t.labelStyle);let p;p=t.labelText===void 0?"":typeof t.labelText=="string"?t.labelText:t.labelText[0];const g=c.node();let x;x=t.labelType==="markdown"?Dt(c,yt(gt(p),a),{useHtmlLabels:r,width:t.width||a.flowchart.wrappingWidth,classes:"markdown-node-label"},a):g.appendChild(await X(yt(gt(p),a),t.labelStyle,!1,i));let f=x.getBBox();const _=t.padding/2;if(q(a.flowchart.htmlLabels)){const L=x.children[0],E=R(x),v=L.getElementsByTagName("img");if(v){const N=p.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...v].map($=>new Promise(d=>{function u(){if($.style.display="flex",$.style.flexDirection="column",N){const k=a.fontSize?a.fontSize:window.getComputedStyle(document.body).fontSize,b=5,w=parseInt(k,10)*b+"px";$.style.minWidth=w,$.style.maxWidth=w}else $.style.width="100%";d($)}h(u,"setupImage"),setTimeout(()=>{$.complete&&u()}),$.addEventListener("error",u),$.addEventListener("load",u)})))}f=L.getBoundingClientRect(),E.attr("width",f.width),E.attr("height",f.height)}return r?c.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):c.attr("transform","translate(0, "+-f.height/2+")"),t.centerLabel&&c.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:o,bbox:f,halfPadding:_,label:c}},"labelHelper"),I=h((e,t)=>{const s=t.node().getBBox();e.width=s.width,e.height=s.height},"updateNodeBounds");function j(e,t,s,i){return e.insert("polygon",":first-child").attr("points",i.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+s/2+")")}h(j,"insertPolygonShape");var ar=h(async(e,t)=>{t.useHtmlLabels||z().flowchart.htmlLabels||(t.centerLabel=!0);const{shapeSvg:s,bbox:i,halfPadding:a}=await O(e,t,"node "+t.classes,!0);m.info("Classes = ",t.classes);const n=s.insert("rect",":first-child");return n.attr("rx",t.rx).attr("ry",t.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+t.padding).attr("height",i.height+t.padding),I(t,n),t.intersect=function(r){return C.rect(t,r)},s},"note"),jt=h(e=>e?" "+e:"","formatClass"),P=h((e,t)=>`${t||"node default"}${jt(e.classes)} ${jt(e.class)}`,"getClassesFromNode"),qt=h(async(e,t)=>{const{shapeSvg:s,bbox:i}=await O(e,t,P(t,void 0),!0),a=i.width+t.padding+(i.height+t.padding),n=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];m.info("Question main (Circle)");const r=j(s,a,a,n);return r.attr("style",t.style),I(t,r),t.intersect=function(o){return m.warn("Intersect called"),C.polygon(t,n,o)},s},"question"),sr=h((e,t)=>{const s=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return s.insert("polygon",":first-child").attr("points",i.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(a){return C.circle(t,14,a)},s},"choice"),nr=h(async(e,t)=>{const{shapeSvg:s,bbox:i}=await O(e,t,P(t,void 0),!0),a=i.height+t.padding,n=a/4,r=i.width+2*n+t.padding,o=[{x:n,y:0},{x:r-n,y:0},{x:r,y:-a/2},{x:r-n,y:-a},{x:n,y:-a},{x:0,y:-a/2}],c=j(s,r,a,o);return c.attr("style",t.style),I(t,c),t.intersect=function(p){return C.polygon(t,o,p)},s},"hexagon"),ir=h(async(e,t)=>{const{shapeSvg:s,bbox:i}=await O(e,t,void 0,!0),a=i.height+2*t.padding,n=a/2,r=i.width+2*n+t.padding,o=Ve(t.directions,i,t),c=j(s,r,a,o);return c.attr("style",t.style),I(t,c),t.intersect=function(p){return C.polygon(t,o,p)},s},"block_arrow"),or=h(async(e,t)=>{const{shapeSvg:s,bbox:i}=await O(e,t,P(t,void 0),!0),a=i.width+t.padding,n=i.height+t.padding,r=[{x:-n/2,y:0},{x:a,y:0},{x:a,y:-n},{x:-n/2,y:-n},{x:0,y:-n/2}];return j(s,a,n,r).attr("style",t.style),t.width=a+n,t.height=n,t.intersect=function(o){return C.polygon(t,r,o)},s},"rect_left_inv_arrow"),lr=h(async(e,t)=>{const{shapeSvg:s,bbox:i}=await O(e,t,P(t),!0),a=i.width+t.padding,n=i.height+t.padding,r=[{x:-2*n/6,y:0},{x:a-n/6,y:0},{x:a+2*n/6,y:-n},{x:n/6,y:-n}],o=j(s,a,n,r);return o.attr("style",t.style),I(t,o),t.intersect=function(c){return C.polygon(t,r,c)},s},"lean_right"),cr=h(async(e,t)=>{const{shapeSvg:s,bbox:i}=await O(e,t,P(t,void 0),!0),a=i.width+t.padding,n=i.height+t.padding,r=[{x:2*n/6,y:0},{x:a+n/6,y:0},{x:a-2*n/6,y:-n},{x:-n/6,y:-n}],o=j(s,a,n,r);return o.attr("style",t.style),I(t,o),t.intersect=function(c){return C.polygon(t,r,c)},s},"lean_left"),dr=h(async(e,t)=>{const{shapeSvg:s,bbox:i}=await O(e,t,P(t,void 0),!0),a=i.width+t.padding,n=i.height+t.padding,r=[{x:-2*n/6,y:0},{x:a+2*n/6,y:0},{x:a-n/6,y:-n},{x:n/6,y:-n}],o=j(s,a,n,r);return o.attr("style",t.style),I(t,o),t.intersect=function(c){return C.polygon(t,r,c)},s},"trapezoid"),hr=h(async(e,t)=>{const{shapeSvg:s,bbox:i}=await O(e,t,P(t,void 0),!0),a=i.width+t.padding,n=i.height+t.padding,r=[{x:n/6,y:0},{x:a-n/6,y:0},{x:a+2*n/6,y:-n},{x:-2*n/6,y:-n}],o=j(s,a,n,r);return o.attr("style",t.style),I(t,o),t.intersect=function(c){return C.polygon(t,r,c)},s},"inv_trapezoid"),gr=h(async(e,t)=>{const{shapeSvg:s,bbox:i}=await O(e,t,P(t,void 0),!0),a=i.width+t.padding,n=i.height+t.padding,r=[{x:0,y:0},{x:a+n/2,y:0},{x:a,y:-n/2},{x:a+n/2,y:-n},{x:0,y:-n}],o=j(s,a,n,r);return o.attr("style",t.style),I(t,o),t.intersect=function(c){return C.polygon(t,r,c)},s},"rect_right_inv_arrow"),yr=h(async(e,t)=>{const{shapeSvg:s,bbox:i}=await O(e,t,P(t,void 0),!0),a=i.width+t.padding,n=a/2,r=n/(2.5+a/50),o=i.height+r+t.padding,c="M 0,"+r+" a "+n+","+r+" 0,0,0 "+a+" 0 a "+n+","+r+" 0,0,0 "+-a+" 0 l 0,"+o+" a "+n+","+r+" 0,0,0 "+a+" 0 l 0,"+-o,p=s.attr("label-offset-y",r).insert("path",":first-child").attr("style",t.style).attr("d",c).attr("transform","translate("+-a/2+","+-(o/2+r)+")");return I(t,p),t.intersect=function(g){const x=C.rect(t,g),f=x.x-t.x;if(n!=0&&(Math.abs(f)<t.width/2||Math.abs(f)==t.width/2&&Math.abs(x.y-t.y)>t.height/2-r)){let _=r*r*(1-f*f/(n*n));_!=0&&(_=Math.sqrt(_)),_=r-_,g.y-t.y>0&&(_=-_),x.y+=_}return x},s},"cylinder"),pr=h(async(e,t)=>{const{shapeSvg:s,bbox:i,halfPadding:a}=await O(e,t,"node "+t.classes+" "+t.class,!0),n=s.insert("rect",":first-child"),r=t.positioned?t.width:i.width+t.padding,o=t.positioned?t.height:i.height+t.padding,c=t.positioned?-r/2:-i.width/2-a,p=t.positioned?-o/2:-i.height/2-a;if(n.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",p).attr("width",r).attr("height",o),t.props){const g=new Set(Object.keys(t.props));t.props.borders&&(lt(n,t.props.borders,r,o),g.delete("borders")),g.forEach(x=>{m.warn(`Unknown node property ${x}`)})}return I(t,n),t.intersect=function(g){return C.rect(t,g)},s},"rect"),ur=h(async(e,t)=>{const{shapeSvg:s,bbox:i,halfPadding:a}=await O(e,t,"node "+t.classes,!0),n=s.insert("rect",":first-child"),r=t.positioned?t.width:i.width+t.padding,o=t.positioned?t.height:i.height+t.padding,c=t.positioned?-r/2:-i.width/2-a,p=t.positioned?-o/2:-i.height/2-a;if(n.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",p).attr("width",r).attr("height",o),t.props){const g=new Set(Object.keys(t.props));t.props.borders&&(lt(n,t.props.borders,r,o),g.delete("borders")),g.forEach(x=>{m.warn(`Unknown node property ${x}`)})}return I(t,n),t.intersect=function(g){return C.rect(t,g)},s},"composite"),xr=h(async(e,t)=>{const{shapeSvg:s}=await O(e,t,"label",!0);m.trace("Classes = ",t.class);const i=s.insert("rect",":first-child");if(i.attr("width",0).attr("height",0),s.attr("class","label edgeLabel"),t.props){const a=new Set(Object.keys(t.props));t.props.borders&&(lt(i,t.props.borders,0,0),a.delete("borders")),a.forEach(n=>{m.warn(`Unknown node property ${n}`)})}return I(t,i),t.intersect=function(a){return C.rect(t,a)},s},"labelRect");function lt(e,t,s,i){const a=[],n=h(o=>{a.push(o,0)},"addBorder"),r=h(o=>{a.push(0,o)},"skipBorder");t.includes("t")?(m.debug("add top border"),n(s)):r(s),t.includes("r")?(m.debug("add right border"),n(i)):r(i),t.includes("b")?(m.debug("add bottom border"),n(s)):r(s),t.includes("l")?(m.debug("add left border"),n(i)):r(i),e.attr("stroke-dasharray",a.join(" "))}h(lt,"applyNodePropertyBorders");var br=h(async(e,t)=>{let s;s=t.classes?"node "+t.classes:"node default";const i=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=i.insert("rect",":first-child"),n=i.insert("line"),r=i.insert("g").attr("class","label"),o=t.labelText.flat?t.labelText.flat():t.labelText;let c="";c=typeof o=="object"?o[0]:o,m.info("Label text abc79",c,o,typeof o=="object");const p=r.node().appendChild(await X(c,t.labelStyle,!0,!0));let g={width:0,height:0};if(q(z().flowchart.htmlLabels)){const E=p.children[0],v=R(p);g=E.getBoundingClientRect(),v.attr("width",g.width),v.attr("height",g.height)}m.info("Text 2",o);const x=o.slice(1,o.length);let f=p.getBBox();const _=r.node().appendChild(await X(x.join?x.join("<br/>"):x,t.labelStyle,!0,!0));if(q(z().flowchart.htmlLabels)){const E=_.children[0],v=R(_);g=E.getBoundingClientRect(),v.attr("width",g.width),v.attr("height",g.height)}const L=t.padding/2;return R(_).attr("transform","translate( "+(g.width>f.width?0:(f.width-g.width)/2)+", "+(f.height+L+5)+")"),R(p).attr("transform","translate( "+(g.width<f.width?0:-(f.width-g.width)/2)+", 0)"),g=r.node().getBBox(),r.attr("transform","translate("+-g.width/2+", "+(-g.height/2-L+3)+")"),a.attr("class","outer title-state").attr("x",-g.width/2-L).attr("y",-g.height/2-L).attr("width",g.width+t.padding).attr("height",g.height+t.padding),n.attr("class","divider").attr("x1",-g.width/2-L).attr("x2",g.width/2+L).attr("y1",-g.height/2-L+f.height+L).attr("y2",-g.height/2-L+f.height+L),I(t,a),t.intersect=function(E){return C.rect(t,E)},i},"rectWithTitle"),fr=h(async(e,t)=>{const{shapeSvg:s,bbox:i}=await O(e,t,P(t,void 0),!0),a=i.height+t.padding,n=i.width+a/4+t.padding,r=s.insert("rect",":first-child").attr("style",t.style).attr("rx",a/2).attr("ry",a/2).attr("x",-n/2).attr("y",-a/2).attr("width",n).attr("height",a);return I(t,r),t.intersect=function(o){return C.rect(t,o)},s},"stadium"),mr=h(async(e,t)=>{const{shapeSvg:s,bbox:i,halfPadding:a}=await O(e,t,P(t,void 0),!0),n=s.insert("circle",":first-child");return n.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+a).attr("width",i.width+t.padding).attr("height",i.height+t.padding),m.info("Circle main"),I(t,n),t.intersect=function(r){return m.info("Circle intersect",t,i.width/2+a,r),C.circle(t,i.width/2+a,r)},s},"circle"),wr=h(async(e,t)=>{const{shapeSvg:s,bbox:i,halfPadding:a}=await O(e,t,P(t,void 0),!0),n=s.insert("g",":first-child"),r=n.insert("circle"),o=n.insert("circle");return n.attr("class",t.class),r.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+a+5).attr("width",i.width+t.padding+10).attr("height",i.height+t.padding+10),o.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+a).attr("width",i.width+t.padding).attr("height",i.height+t.padding),m.info("DoubleCircle main"),I(t,r),t.intersect=function(c){return m.info("DoubleCircle intersect",t,i.width/2+a+5,c),C.circle(t,i.width/2+a+5,c)},s},"doublecircle"),kr=h(async(e,t)=>{const{shapeSvg:s,bbox:i}=await O(e,t,P(t,void 0),!0),a=i.width+t.padding,n=i.height+t.padding,r=[{x:0,y:0},{x:a,y:0},{x:a,y:-n},{x:0,y:-n},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-n},{x:-8,y:-n},{x:-8,y:0}],o=j(s,a,n,r);return o.attr("style",t.style),I(t,o),t.intersect=function(c){return C.polygon(t,r,c)},s},"subroutine"),Lr=h((e,t)=>{const s=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=s.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),I(t,i),t.intersect=function(a){return C.circle(t,7,a)},s},"start"),Zt=h((e,t,s)=>{const i=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a=70,n=10;s==="LR"&&(a=10,n=70);const r=i.append("rect").attr("x",-1*a/2).attr("y",-1*n/2).attr("width",a).attr("height",n).attr("class","fork-join");return I(t,r),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(o){return C.rect(t,o)},i},"forkJoin"),Gt={rhombus:qt,composite:ur,question:qt,rect:pr,labelRect:xr,rectWithTitle:br,choice:sr,circle:mr,doublecircle:wr,stadium:fr,hexagon:nr,block_arrow:ir,rect_left_inv_arrow:or,lean_right:lr,lean_left:cr,trapezoid:dr,inv_trapezoid:hr,rect_right_inv_arrow:gr,cylinder:yr,start:Lr,end:h((e,t)=>{const s=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=s.insert("circle",":first-child"),a=s.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),i.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),I(t,a),t.intersect=function(n){return C.circle(t,7,n)},s},"end"),note:ar,subroutine:kr,fork:Zt,join:Zt,class_box:h(async(e,t)=>{var b;const s=t.padding/2;let i;i=t.classes?"node "+t.classes:"node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),n=a.insert("rect",":first-child"),r=a.insert("line"),o=a.insert("line");let c=0,p=4;const g=a.insert("g").attr("class","label");let x=0;const f=(b=t.classData.annotations)==null?void 0:b[0],_=t.classData.annotations[0]?"\xAB"+t.classData.annotations[0]+"\xBB":"",L=g.node().appendChild(await X(_,t.labelStyle,!0,!0));let E=L.getBBox();if(q(z().flowchart.htmlLabels)){const w=L.children[0],l=R(L);E=w.getBoundingClientRect(),l.attr("width",E.width),l.attr("height",E.height)}t.classData.annotations[0]&&(p+=E.height+4,c+=E.width);let v=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(z().flowchart.htmlLabels?v+="&lt;"+t.classData.type+"&gt;":v+="<"+t.classData.type+">");const N=g.node().appendChild(await X(v,t.labelStyle,!0,!0));R(N).attr("class","classTitle");let $=N.getBBox();if(q(z().flowchart.htmlLabels)){const w=N.children[0],l=R(N);$=w.getBoundingClientRect(),l.attr("width",$.width),l.attr("height",$.height)}p+=$.height+4,$.width>c&&(c=$.width);const d=[];t.classData.members.forEach(async w=>{const l=w.getDisplayDetails();let S=l.displayText;z().flowchart.htmlLabels&&(S=S.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const y=g.node().appendChild(await X(S,l.cssStyle?l.cssStyle:t.labelStyle,!0,!0));let D=y.getBBox();if(q(z().flowchart.htmlLabels)){const F=y.children[0],H=R(y);D=F.getBoundingClientRect(),H.attr("width",D.width),H.attr("height",D.height)}D.width>c&&(c=D.width),p+=D.height+4,d.push(y)}),p+=8;const u=[];if(t.classData.methods.forEach(async w=>{const l=w.getDisplayDetails();let S=l.displayText;z().flowchart.htmlLabels&&(S=S.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const y=g.node().appendChild(await X(S,l.cssStyle?l.cssStyle:t.labelStyle,!0,!0));let D=y.getBBox();if(q(z().flowchart.htmlLabels)){const F=y.children[0],H=R(y);D=F.getBoundingClientRect(),H.attr("width",D.width),H.attr("height",D.height)}D.width>c&&(c=D.width),p+=D.height+4,u.push(y)}),p+=8,f){let w=(c-E.width)/2;R(L).attr("transform","translate( "+(-1*c/2+w)+", "+-1*p/2+")"),x=E.height+4}let k=(c-$.width)/2;return R(N).attr("transform","translate( "+(-1*c/2+k)+", "+(-1*p/2+x)+")"),x+=$.height+4,r.attr("class","divider").attr("x1",-c/2-s).attr("x2",c/2+s).attr("y1",-p/2-s+8+x).attr("y2",-p/2-s+8+x),x+=8,d.forEach(w=>{R(w).attr("transform","translate( "+-c/2+", "+(-1*p/2+x+4)+")");const l=w==null?void 0:w.getBBox();x+=((l==null?void 0:l.height)??0)+4}),x+=8,o.attr("class","divider").attr("x1",-c/2-s).attr("x2",c/2+s).attr("y1",-p/2-s+8+x).attr("y2",-p/2-s+8+x),x+=8,u.forEach(w=>{R(w).attr("transform","translate( "+-c/2+", "+(-1*p/2+x)+")");const l=w==null?void 0:w.getBBox();x+=((l==null?void 0:l.height)??0)+4}),n.attr("style",t.style).attr("class","outer title-state").attr("x",-c/2-s).attr("y",-p/2-s).attr("width",c+t.padding).attr("height",p+t.padding),I(t,n),t.intersect=function(w){return C.rect(t,w)},a},"class_box")},ct={},Jt=h(async(e,t,s)=>{let i,a;if(t.link){let n;z().securityLevel==="sandbox"?n="_top":t.linkTarget&&(n=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",n),a=await Gt[t.shape](i,t,s)}else a=await Gt[t.shape](e,t,s),i=a;return t.tooltip&&a.attr("title",t.tooltip),t.class&&a.attr("class","node default "+t.class),ct[t.id]=i,t.haveCallback&&ct[t.id].attr("class",ct[t.id].attr("class")+" clickable"),i},"insertNode"),Sr=h(e=>{const t=ct[e.id];m.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const s=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+s-e.width/2)+", "+(e.y-e.height/2-8)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),s},"positionNode");function St(e,t,s=!1){var x,f,_;const i=e;let a="default";(((x=i==null?void 0:i.classes)==null?void 0:x.length)||0)>0&&(a=((i==null?void 0:i.classes)??[]).join(" ")),a+=" flowchart-label";let n,r=0,o="";switch(i.type){case"round":r=5,o="rect";break;case"composite":r=0,o="composite",n=0;break;case"square":case"group":default:o="rect";break;case"diamond":o="question";break;case"hexagon":o="hexagon";break;case"block_arrow":o="block_arrow";break;case"odd":case"rect_left_inv_arrow":o="rect_left_inv_arrow";break;case"lean_right":o="lean_right";break;case"lean_left":o="lean_left";break;case"trapezoid":o="trapezoid";break;case"inv_trapezoid":o="inv_trapezoid";break;case"circle":o="circle";break;case"ellipse":o="ellipse";break;case"stadium":o="stadium";break;case"subroutine":o="subroutine";break;case"cylinder":o="cylinder";break;case"doublecircle":o="doublecircle"}const c=ue((i==null?void 0:i.styles)??[]),p=i.label,g=i.size??{width:0,height:0,x:0,y:0};return{labelStyle:c.labelStyle,shape:o,labelText:p,rx:r,ry:r,class:a,style:c.style,id:i.id,directions:i.directions,width:g.width,height:g.height,x:g.x,y:g.y,positioned:s,intersect:void 0,type:i.type,padding:n??((_=(f=Q())==null?void 0:f.block)==null?void 0:_.padding)??0}}async function Vt(e,t,s){const i=St(t,0,!1);if(i.type==="group")return;const a=Q(),n=await Jt(e,i,{config:a}),r=n.node().getBBox(),o=s.getBlock(i.id);o.size={width:r.width,height:r.height,x:0,y:0,node:n},s.setBlock(o),n.remove()}async function Qt(e,t,s){const i=St(t,0,!0);if(s.getBlock(i.id).type!=="space"){const a=Q();await Jt(e,i,{config:a}),t.intersect=i==null?void 0:i.intersect,Sr(i)}}async function dt(e,t,s,i){for(const a of t)await i(e,a,s),a.children&&await dt(e,a.children,s,i)}async function te(e,t,s){await dt(e,t,s,Vt)}async function ee(e,t,s){await dt(e,t,s,Qt)}async function re(e,t,s,i,a){const n=new be({multigraph:!0,compound:!0});n.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const r of s)r.size&&n.setNode(r.id,{width:r.size.width,height:r.size.height,intersect:r.intersect});for(const r of t)if(r.start&&r.end){const o=i.getBlock(r.start),c=i.getBlock(r.end);if(o!=null&&o.size&&(c!=null&&c.size)){const p=o.size,g=c.size,x=[{x:p.x,y:p.y},{x:p.x+(g.x-p.x)/2,y:p.y+(g.y-p.y)/2},{x:g.x,y:g.y}];Ge(e,{v:r.start,w:r.end,name:r.id},{...r,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:x,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",n,a),r.label&&(await Ke(e,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:x,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),je({...r,x:x[1].x,y:x[1].y},{originalPath:x}))}}}h(St,"getNodeFromBlock"),h(Vt,"calculateBlockSize"),h(Qt,"insertBlockPositioned"),h(dt,"performOperations"),h(te,"calculateBlockSizes"),h(ee,"insertBlocks"),h(re,"insertEdges");var _r=h(function(e,t){return t.db.getClasses()},"getClasses"),Er={parser:ke,db:Me,renderer:{draw:h(async function(e,t,s,i){const{securityLevel:a,block:n}=Q(),r=i.db;let o;a==="sandbox"&&(o=R("#i"+t));const c=R(a==="sandbox"?o.nodes()[0].contentDocument.body:"body"),p=a==="sandbox"?c.select(`[id="${t}"]`):R(`[id="${t}"]`);Xe(p,["point","circle","cross"],i.type,t);const g=r.getBlocks(),x=r.getBlocksFlat(),f=r.getEdges(),_=p.insert("g").attr("class","block");await te(_,g,r);const L=At(r);if(await ee(_,g,r),await re(_,f,x,r,t),L){const E=L,v=Math.max(1,Math.round(E.width/E.height*.125)),N=E.height+v+10,$=E.width+10,{useMaxWidth:d}=n;oe(p,N,$,!!d),m.debug("Here Bounds",L,E),p.attr("viewBox",`${E.x-5} ${E.y-5} ${E.width+10} ${E.height+10}`)}},"draw"),getClasses:_r},styles:Pe};export{Er as diagram};
@@ -1,4 +1,4 @@
1
- var Ot,Tt;import{g as ke,d as Oe}from"./chunk-67H74DCK-BWX3D-qq.js";import{_ as f,s as Te,g as ve,a as Re,b as De,c as Dt,l as he,d as Ne,e as Pe,f as kt,h as de,i as Be,w as Me,j as Vt,k as ue}from"./mermaid-sbM5kvPX.js";import{s as Gt}from"./transform-B8bpuzxV.js";import"./index-DPzEQsyf.js";import"./step-BwsUM5iJ.js";import"./timer-BwIYMJWC.js";var Lt=function(){var e=f(function(m,O,x,b){for(x=x||{},b=m.length;b--;x[m[b]]=O);return x},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],a=[1,28],r=[1,63],n=[1,64],i=[1,65],d=[1,66],u=[1,67],p=[1,68],g=[1,69],w=[1,29],v=[1,30],R=[1,31],P=[1,32],X=[1,33],Y=[1,34],H=[1,35],q=[1,36],V=[1,37],G=[1,38],K=[1,39],J=[1,40],Z=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],rt=[1,47],st=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],dt=[1,54],ut=[1,55],pt=[1,56],yt=[1,57],ft=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Wt=[14,34,36,37,38,39,40,41,42,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],vt=[12,14,34,36,37,38,39,40,41,42,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],E=[1,82],S=[1,83],A=[1,84],C=[1,85],k=[12,14,42],ne=[12,14,33,42],Bt=[12,14,33,42,76,77,79,80],xt=[12,33],Qt=[34,36,37,38,39,40,41,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],$t={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:f(function(m,O,x,b,T,h,Rt){var y=h.length-1;switch(T){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[y-3]);break;case 19:b.setTitle(h[y].substring(6)),this.$=h[y].substring(6);break;case 20:b.setAccDescription(h[y].substring(15)),this.$=h[y].substring(15);break;case 21:this.$=h[y].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[y].trim(),b.setAccDescription(this.$);break;case 28:h[y].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[y]),this.$=h[y];break;case 29:h[y].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[y]),this.$=h[y];break;case 30:b.addPersonOrSystemBoundary(...h[y]),this.$=h[y];break;case 31:h[y].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[y]),this.$=h[y];break;case 32:b.addDeploymentNode("node",...h[y]),this.$=h[y];break;case 33:b.addDeploymentNode("nodeL",...h[y]),this.$=h[y];break;case 34:b.addDeploymentNode("nodeR",...h[y]),this.$=h[y];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[y]),this.$=h[y];break;case 40:b.addPersonOrSystem("external_person",...h[y]),this.$=h[y];break;case 41:b.addPersonOrSystem("system",...h[y]),this.$=h[y];break;case 42:b.addPersonOrSystem("system_db",...h[y]),this.$=h[y];break;case 43:b.addPersonOrSystem("system_queue",...h[y]),this.$=h[y];break;case 44:b.addPersonOrSystem("external_system",...h[y]),this.$=h[y];break;case 45:b.addPersonOrSystem("external_system_db",...h[y]),this.$=h[y];break;case 46:b.addPersonOrSystem("external_system_queue",...h[y]),this.$=h[y];break;case 47:b.addContainer("container",...h[y]),this.$=h[y];break;case 48:b.addContainer("container_db",...h[y]),this.$=h[y];break;case 49:b.addContainer("container_queue",...h[y]),this.$=h[y];break;case 50:b.addContainer("external_container",...h[y]),this.$=h[y];break;case 51:b.addContainer("external_container_db",...h[y]),this.$=h[y];break;case 52:b.addContainer("external_container_queue",...h[y]),this.$=h[y];break;case 53:b.addComponent("component",...h[y]),this.$=h[y];break;case 54:b.addComponent("component_db",...h[y]),this.$=h[y];break;case 55:b.addComponent("component_queue",...h[y]),this.$=h[y];break;case 56:b.addComponent("external_component",...h[y]),this.$=h[y];break;case 57:b.addComponent("external_component_db",...h[y]),this.$=h[y];break;case 58:b.addComponent("external_component_queue",...h[y]),this.$=h[y];break;case 60:b.addRel("rel",...h[y]),this.$=h[y];break;case 61:b.addRel("birel",...h[y]),this.$=h[y];break;case 62:b.addRel("rel_u",...h[y]),this.$=h[y];break;case 63:b.addRel("rel_d",...h[y]),this.$=h[y];break;case 64:b.addRel("rel_l",...h[y]),this.$=h[y];break;case 65:b.addRel("rel_r",...h[y]),this.$=h[y];break;case 66:b.addRel("rel_b",...h[y]),this.$=h[y];break;case 67:h[y].splice(0,1),b.addRel("rel",...h[y]),this.$=h[y];break;case 68:b.updateElStyle("update_el_style",...h[y]),this.$=h[y];break;case 69:b.updateRelStyle("update_rel_style",...h[y]),this.$=h[y];break;case 70:b.updateLayoutConfig("update_layout_config",...h[y]),this.$=h[y];break;case 71:this.$=[h[y]];break;case 72:h[y].unshift(h[y-1]),this.$=h[y];break;case 73:case 75:this.$=h[y].trim();break;case 74:let Et={};Et[h[y-1].trim()]=h[y].trim(),this.$=Et;break;case 76:this.$=""}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:d,39:u,40:p,41:g,43:23,44:w,45:v,46:R,47:P,48:X,49:Y,50:H,51:q,52:V,53:G,54:K,55:J,56:Z,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:dt,69:ut,70:pt,71:yt,72:ft,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:d,39:u,40:p,41:g,43:23,44:w,45:v,46:R,47:P,48:X,49:Y,50:H,51:q,52:V,53:G,54:K,55:J,56:Z,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:dt,69:ut,70:pt,71:yt,72:ft,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:d,39:u,40:p,41:g,43:23,44:w,45:v,46:R,47:P,48:X,49:Y,50:H,51:q,52:V,53:G,54:K,55:J,56:Z,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:dt,69:ut,70:pt,71:yt,72:ft,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:d,39:u,40:p,41:g,43:23,44:w,45:v,46:R,47:P,48:X,49:Y,50:H,51:q,52:V,53:G,54:K,55:J,56:Z,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:dt,69:ut,70:pt,71:yt,72:ft,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:d,39:u,40:p,41:g,43:23,44:w,45:v,46:R,47:P,48:X,49:Y,50:H,51:q,52:V,53:G,54:K,55:J,56:Z,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:dt,69:ut,70:pt,71:yt,72:ft,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:r,36:n,37:i,38:d,39:u,40:p,41:g,44:w,45:v,46:R,47:P,48:X,49:Y,50:H,51:q,52:V,53:G,54:K,55:J,56:Z,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:dt,69:ut,70:pt,71:yt,72:ft,73:gt,74:bt}),e(Ct,[2,14]),e(Wt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(vt,[2,19]),e(vt,[2,20]),{25:[1,78]},{27:[1,79]},e(vt,[2,23]),{35:80,75:81,76:E,77:S,79:A,80:C},{35:86,75:81,76:E,77:S,79:A,80:C},{35:87,75:81,76:E,77:S,79:A,80:C},{35:88,75:81,76:E,77:S,79:A,80:C},{35:89,75:81,76:E,77:S,79:A,80:C},{35:90,75:81,76:E,77:S,79:A,80:C},{35:91,75:81,76:E,77:S,79:A,80:C},{35:92,75:81,76:E,77:S,79:A,80:C},{35:93,75:81,76:E,77:S,79:A,80:C},{35:94,75:81,76:E,77:S,79:A,80:C},{35:95,75:81,76:E,77:S,79:A,80:C},{35:96,75:81,76:E,77:S,79:A,80:C},{35:97,75:81,76:E,77:S,79:A,80:C},{35:98,75:81,76:E,77:S,79:A,80:C},{35:99,75:81,76:E,77:S,79:A,80:C},{35:100,75:81,76:E,77:S,79:A,80:C},{35:101,75:81,76:E,77:S,79:A,80:C},{35:102,75:81,76:E,77:S,79:A,80:C},{35:103,75:81,76:E,77:S,79:A,80:C},{35:104,75:81,76:E,77:S,79:A,80:C},e(k,[2,59]),{35:105,75:81,76:E,77:S,79:A,80:C},{35:106,75:81,76:E,77:S,79:A,80:C},{35:107,75:81,76:E,77:S,79:A,80:C},{35:108,75:81,76:E,77:S,79:A,80:C},{35:109,75:81,76:E,77:S,79:A,80:C},{35:110,75:81,76:E,77:S,79:A,80:C},{35:111,75:81,76:E,77:S,79:A,80:C},{35:112,75:81,76:E,77:S,79:A,80:C},{35:113,75:81,76:E,77:S,79:A,80:C},{35:114,75:81,76:E,77:S,79:A,80:C},{35:115,75:81,76:E,77:S,79:A,80:C},{20:116,29:49,30:61,32:62,34:r,36:n,37:i,38:d,39:u,40:p,41:g,43:23,44:w,45:v,46:R,47:P,48:X,49:Y,50:H,51:q,52:V,53:G,54:K,55:J,56:Z,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:dt,69:ut,70:pt,71:yt,72:ft,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:E,77:S,79:A,80:C},{35:120,75:81,76:E,77:S,79:A,80:C},{35:121,75:81,76:E,77:S,79:A,80:C},{35:122,75:81,76:E,77:S,79:A,80:C},{35:123,75:81,76:E,77:S,79:A,80:C},{35:124,75:81,76:E,77:S,79:A,80:C},{35:125,75:81,76:E,77:S,79:A,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Wt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:a}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:a,34:r,36:n,37:i,38:d,39:u,40:p,41:g,44:w,45:v,46:R,47:P,48:X,49:Y,50:H,51:q,52:V,53:G,54:K,55:J,56:Z,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:dt,69:ut,70:pt,71:yt,72:ft,73:gt,74:bt}),e(vt,[2,21]),e(vt,[2,22]),e(k,[2,39]),e(ne,[2,71],{75:81,35:132,76:E,77:S,79:A,80:C}),e(Bt,[2,73]),{78:[1,133]},e(Bt,[2,75]),e(Bt,[2,76]),e(k,[2,40]),e(k,[2,41]),e(k,[2,42]),e(k,[2,43]),e(k,[2,44]),e(k,[2,45]),e(k,[2,46]),e(k,[2,47]),e(k,[2,48]),e(k,[2,49]),e(k,[2,50]),e(k,[2,51]),e(k,[2,52]),e(k,[2,53]),e(k,[2,54]),e(k,[2,55]),e(k,[2,56]),e(k,[2,57]),e(k,[2,58]),e(k,[2,60]),e(k,[2,61]),e(k,[2,62]),e(k,[2,63]),e(k,[2,64]),e(k,[2,65]),e(k,[2,66]),e(k,[2,67]),e(k,[2,68]),e(k,[2,69]),e(k,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(xt,[2,28]),e(xt,[2,29]),e(xt,[2,30]),e(xt,[2,31]),e(xt,[2,32]),e(xt,[2,33]),e(xt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Wt,[2,18]),e(Ct,[2,38]),e(ne,[2,72]),e(Bt,[2,74]),e(k,[2,24]),e(k,[2,35]),e(Qt,[2,25]),e(Qt,[2,26],{12:[1,138]}),e(Qt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:f(function(m,O){if(!O.recoverable){var x=new Error(m);throw x.hash=O,x}this.trace(m)},"parseError"),parse:f(function(m){var O=this,x=[0],b=[],T=[null],h=[],Rt=this.table,y="",Et=0,re=0,Ce=h.slice.call(arguments,1),D=Object.create(this.lexer),St={yy:{}};for(var Ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ht)&&(St.yy[Ht]=this.yy[Ht]);D.setInput(m,St.yy),St.yy.lexer=D,St.yy.parser=this,D.yylloc===void 0&&(D.yylloc={});var qt=D.yylloc;h.push(qt);var we=D.options&&D.options.ranges;function se(){var j;return typeof(j=b.pop()||D.lex()||1)!="number"&&(j instanceof Array&&(j=(b=j).pop()),j=O.symbols_[j]||j),j}typeof St.yy.parseError=="function"?this.parseError=St.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,f(function(j){x.length=x.length-2*j,T.length=T.length-j,h.length=h.length-j},"popStack"),f(se,"lex");for(var B,At,M,le,jt,Q,oe,It,wt={};;){if(At=x[x.length-1],this.defaultActions[At]?M=this.defaultActions[At]:(B==null&&(B=se()),M=Rt[At]&&Rt[At][B]),M===void 0||!M.length||!M[0]){var ce="";for(jt in It=[],Rt[At])this.terminals_[jt]&&jt>2&&It.push("'"+this.terminals_[jt]+"'");ce=D.showPosition?"Parse error on line "+(Et+1)+`:
1
+ var Ot,Tt;import{g as ke,d as Oe}from"./chunk-OMD6QJNC-CwDxph2q.js";import{_ as f,s as Te,g as ve,a as Re,b as De,c as Dt,l as he,d as Ne,e as Pe,f as kt,h as de,i as Be,w as Me,j as Vt,k as ue}from"./mermaid-D59lkToe.js";import{s as Gt}from"./transform-B8bpuzxV.js";import"./index-D4bXoNM3.js";import"./step-BwsUM5iJ.js";import"./timer-BwIYMJWC.js";var Lt=function(){var e=f(function(m,O,x,b){for(x=x||{},b=m.length;b--;x[m[b]]=O);return x},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],a=[1,28],r=[1,63],n=[1,64],i=[1,65],d=[1,66],u=[1,67],p=[1,68],g=[1,69],w=[1,29],v=[1,30],R=[1,31],P=[1,32],X=[1,33],Y=[1,34],H=[1,35],q=[1,36],V=[1,37],G=[1,38],K=[1,39],J=[1,40],Z=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],rt=[1,47],st=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],dt=[1,54],ut=[1,55],pt=[1,56],yt=[1,57],ft=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Wt=[14,34,36,37,38,39,40,41,42,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],vt=[12,14,34,36,37,38,39,40,41,42,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],E=[1,82],S=[1,83],A=[1,84],C=[1,85],k=[12,14,42],ne=[12,14,33,42],Bt=[12,14,33,42,76,77,79,80],xt=[12,33],Qt=[34,36,37,38,39,40,41,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],$t={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:f(function(m,O,x,b,T,h,Rt){var y=h.length-1;switch(T){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[y-3]);break;case 19:b.setTitle(h[y].substring(6)),this.$=h[y].substring(6);break;case 20:b.setAccDescription(h[y].substring(15)),this.$=h[y].substring(15);break;case 21:this.$=h[y].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[y].trim(),b.setAccDescription(this.$);break;case 28:h[y].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[y]),this.$=h[y];break;case 29:h[y].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[y]),this.$=h[y];break;case 30:b.addPersonOrSystemBoundary(...h[y]),this.$=h[y];break;case 31:h[y].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[y]),this.$=h[y];break;case 32:b.addDeploymentNode("node",...h[y]),this.$=h[y];break;case 33:b.addDeploymentNode("nodeL",...h[y]),this.$=h[y];break;case 34:b.addDeploymentNode("nodeR",...h[y]),this.$=h[y];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[y]),this.$=h[y];break;case 40:b.addPersonOrSystem("external_person",...h[y]),this.$=h[y];break;case 41:b.addPersonOrSystem("system",...h[y]),this.$=h[y];break;case 42:b.addPersonOrSystem("system_db",...h[y]),this.$=h[y];break;case 43:b.addPersonOrSystem("system_queue",...h[y]),this.$=h[y];break;case 44:b.addPersonOrSystem("external_system",...h[y]),this.$=h[y];break;case 45:b.addPersonOrSystem("external_system_db",...h[y]),this.$=h[y];break;case 46:b.addPersonOrSystem("external_system_queue",...h[y]),this.$=h[y];break;case 47:b.addContainer("container",...h[y]),this.$=h[y];break;case 48:b.addContainer("container_db",...h[y]),this.$=h[y];break;case 49:b.addContainer("container_queue",...h[y]),this.$=h[y];break;case 50:b.addContainer("external_container",...h[y]),this.$=h[y];break;case 51:b.addContainer("external_container_db",...h[y]),this.$=h[y];break;case 52:b.addContainer("external_container_queue",...h[y]),this.$=h[y];break;case 53:b.addComponent("component",...h[y]),this.$=h[y];break;case 54:b.addComponent("component_db",...h[y]),this.$=h[y];break;case 55:b.addComponent("component_queue",...h[y]),this.$=h[y];break;case 56:b.addComponent("external_component",...h[y]),this.$=h[y];break;case 57:b.addComponent("external_component_db",...h[y]),this.$=h[y];break;case 58:b.addComponent("external_component_queue",...h[y]),this.$=h[y];break;case 60:b.addRel("rel",...h[y]),this.$=h[y];break;case 61:b.addRel("birel",...h[y]),this.$=h[y];break;case 62:b.addRel("rel_u",...h[y]),this.$=h[y];break;case 63:b.addRel("rel_d",...h[y]),this.$=h[y];break;case 64:b.addRel("rel_l",...h[y]),this.$=h[y];break;case 65:b.addRel("rel_r",...h[y]),this.$=h[y];break;case 66:b.addRel("rel_b",...h[y]),this.$=h[y];break;case 67:h[y].splice(0,1),b.addRel("rel",...h[y]),this.$=h[y];break;case 68:b.updateElStyle("update_el_style",...h[y]),this.$=h[y];break;case 69:b.updateRelStyle("update_rel_style",...h[y]),this.$=h[y];break;case 70:b.updateLayoutConfig("update_layout_config",...h[y]),this.$=h[y];break;case 71:this.$=[h[y]];break;case 72:h[y].unshift(h[y-1]),this.$=h[y];break;case 73:case 75:this.$=h[y].trim();break;case 74:let Et={};Et[h[y-1].trim()]=h[y].trim(),this.$=Et;break;case 76:this.$=""}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:d,39:u,40:p,41:g,43:23,44:w,45:v,46:R,47:P,48:X,49:Y,50:H,51:q,52:V,53:G,54:K,55:J,56:Z,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:dt,69:ut,70:pt,71:yt,72:ft,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:d,39:u,40:p,41:g,43:23,44:w,45:v,46:R,47:P,48:X,49:Y,50:H,51:q,52:V,53:G,54:K,55:J,56:Z,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:dt,69:ut,70:pt,71:yt,72:ft,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:d,39:u,40:p,41:g,43:23,44:w,45:v,46:R,47:P,48:X,49:Y,50:H,51:q,52:V,53:G,54:K,55:J,56:Z,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:dt,69:ut,70:pt,71:yt,72:ft,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:d,39:u,40:p,41:g,43:23,44:w,45:v,46:R,47:P,48:X,49:Y,50:H,51:q,52:V,53:G,54:K,55:J,56:Z,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:dt,69:ut,70:pt,71:yt,72:ft,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:d,39:u,40:p,41:g,43:23,44:w,45:v,46:R,47:P,48:X,49:Y,50:H,51:q,52:V,53:G,54:K,55:J,56:Z,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:dt,69:ut,70:pt,71:yt,72:ft,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:r,36:n,37:i,38:d,39:u,40:p,41:g,44:w,45:v,46:R,47:P,48:X,49:Y,50:H,51:q,52:V,53:G,54:K,55:J,56:Z,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:dt,69:ut,70:pt,71:yt,72:ft,73:gt,74:bt}),e(Ct,[2,14]),e(Wt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(vt,[2,19]),e(vt,[2,20]),{25:[1,78]},{27:[1,79]},e(vt,[2,23]),{35:80,75:81,76:E,77:S,79:A,80:C},{35:86,75:81,76:E,77:S,79:A,80:C},{35:87,75:81,76:E,77:S,79:A,80:C},{35:88,75:81,76:E,77:S,79:A,80:C},{35:89,75:81,76:E,77:S,79:A,80:C},{35:90,75:81,76:E,77:S,79:A,80:C},{35:91,75:81,76:E,77:S,79:A,80:C},{35:92,75:81,76:E,77:S,79:A,80:C},{35:93,75:81,76:E,77:S,79:A,80:C},{35:94,75:81,76:E,77:S,79:A,80:C},{35:95,75:81,76:E,77:S,79:A,80:C},{35:96,75:81,76:E,77:S,79:A,80:C},{35:97,75:81,76:E,77:S,79:A,80:C},{35:98,75:81,76:E,77:S,79:A,80:C},{35:99,75:81,76:E,77:S,79:A,80:C},{35:100,75:81,76:E,77:S,79:A,80:C},{35:101,75:81,76:E,77:S,79:A,80:C},{35:102,75:81,76:E,77:S,79:A,80:C},{35:103,75:81,76:E,77:S,79:A,80:C},{35:104,75:81,76:E,77:S,79:A,80:C},e(k,[2,59]),{35:105,75:81,76:E,77:S,79:A,80:C},{35:106,75:81,76:E,77:S,79:A,80:C},{35:107,75:81,76:E,77:S,79:A,80:C},{35:108,75:81,76:E,77:S,79:A,80:C},{35:109,75:81,76:E,77:S,79:A,80:C},{35:110,75:81,76:E,77:S,79:A,80:C},{35:111,75:81,76:E,77:S,79:A,80:C},{35:112,75:81,76:E,77:S,79:A,80:C},{35:113,75:81,76:E,77:S,79:A,80:C},{35:114,75:81,76:E,77:S,79:A,80:C},{35:115,75:81,76:E,77:S,79:A,80:C},{20:116,29:49,30:61,32:62,34:r,36:n,37:i,38:d,39:u,40:p,41:g,43:23,44:w,45:v,46:R,47:P,48:X,49:Y,50:H,51:q,52:V,53:G,54:K,55:J,56:Z,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:dt,69:ut,70:pt,71:yt,72:ft,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:E,77:S,79:A,80:C},{35:120,75:81,76:E,77:S,79:A,80:C},{35:121,75:81,76:E,77:S,79:A,80:C},{35:122,75:81,76:E,77:S,79:A,80:C},{35:123,75:81,76:E,77:S,79:A,80:C},{35:124,75:81,76:E,77:S,79:A,80:C},{35:125,75:81,76:E,77:S,79:A,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Wt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:a}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:a,34:r,36:n,37:i,38:d,39:u,40:p,41:g,44:w,45:v,46:R,47:P,48:X,49:Y,50:H,51:q,52:V,53:G,54:K,55:J,56:Z,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:dt,69:ut,70:pt,71:yt,72:ft,73:gt,74:bt}),e(vt,[2,21]),e(vt,[2,22]),e(k,[2,39]),e(ne,[2,71],{75:81,35:132,76:E,77:S,79:A,80:C}),e(Bt,[2,73]),{78:[1,133]},e(Bt,[2,75]),e(Bt,[2,76]),e(k,[2,40]),e(k,[2,41]),e(k,[2,42]),e(k,[2,43]),e(k,[2,44]),e(k,[2,45]),e(k,[2,46]),e(k,[2,47]),e(k,[2,48]),e(k,[2,49]),e(k,[2,50]),e(k,[2,51]),e(k,[2,52]),e(k,[2,53]),e(k,[2,54]),e(k,[2,55]),e(k,[2,56]),e(k,[2,57]),e(k,[2,58]),e(k,[2,60]),e(k,[2,61]),e(k,[2,62]),e(k,[2,63]),e(k,[2,64]),e(k,[2,65]),e(k,[2,66]),e(k,[2,67]),e(k,[2,68]),e(k,[2,69]),e(k,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(xt,[2,28]),e(xt,[2,29]),e(xt,[2,30]),e(xt,[2,31]),e(xt,[2,32]),e(xt,[2,33]),e(xt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Wt,[2,18]),e(Ct,[2,38]),e(ne,[2,72]),e(Bt,[2,74]),e(k,[2,24]),e(k,[2,35]),e(Qt,[2,25]),e(Qt,[2,26],{12:[1,138]}),e(Qt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:f(function(m,O){if(!O.recoverable){var x=new Error(m);throw x.hash=O,x}this.trace(m)},"parseError"),parse:f(function(m){var O=this,x=[0],b=[],T=[null],h=[],Rt=this.table,y="",Et=0,re=0,Ce=h.slice.call(arguments,1),D=Object.create(this.lexer),St={yy:{}};for(var Ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ht)&&(St.yy[Ht]=this.yy[Ht]);D.setInput(m,St.yy),St.yy.lexer=D,St.yy.parser=this,D.yylloc===void 0&&(D.yylloc={});var qt=D.yylloc;h.push(qt);var we=D.options&&D.options.ranges;function se(){var j;return typeof(j=b.pop()||D.lex()||1)!="number"&&(j instanceof Array&&(j=(b=j).pop()),j=O.symbols_[j]||j),j}typeof St.yy.parseError=="function"?this.parseError=St.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,f(function(j){x.length=x.length-2*j,T.length=T.length-j,h.length=h.length-j},"popStack"),f(se,"lex");for(var B,At,M,le,jt,Q,oe,It,wt={};;){if(At=x[x.length-1],this.defaultActions[At]?M=this.defaultActions[At]:(B==null&&(B=se()),M=Rt[At]&&Rt[At][B]),M===void 0||!M.length||!M[0]){var ce="";for(jt in It=[],Rt[At])this.terminals_[jt]&&jt>2&&It.push("'"+this.terminals_[jt]+"'");ce=D.showPosition?"Parse error on line "+(Et+1)+`:
2
2
  `+D.showPosition()+`
3
3
  Expecting `+It.join(", ")+", got '"+(this.terminals_[B]||B)+"'":"Parse error on line "+(Et+1)+": Unexpected "+(B==1?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(ce,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:qt,expected:It})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+At+", token: "+B);switch(M[0]){case 1:x.push(B),T.push(D.yytext),h.push(D.yylloc),x.push(M[1]),B=null,re=D.yyleng,y=D.yytext,Et=D.yylineno,qt=D.yylloc;break;case 2:if(Q=this.productions_[M[1]][1],wt.$=T[T.length-Q],wt._$={first_line:h[h.length-(Q||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(Q||1)].first_column,last_column:h[h.length-1].last_column},we&&(wt._$.range=[h[h.length-(Q||1)].range[0],h[h.length-1].range[1]]),(le=this.performAction.apply(wt,[y,re,Et,St.yy,M[1],T,h].concat(Ce)))!==void 0)return le;Q&&(x=x.slice(0,-1*Q*2),T=T.slice(0,-1*Q),h=h.slice(0,-1*Q)),x.push(this.productions_[M[1]][0]),T.push(wt.$),h.push(wt._$),oe=Rt[x[x.length-2]][x[x.length-1]],x.push(oe);break;case 3:return!0}}return!0},"parse")},Ae=function(){return{EOF:1,parseError:f(function(m,O){if(!this.yy.parser)throw new Error(m);this.yy.parser.parseError(m,O)},"parseError"),setInput:f(function(m,O){return this.yy=O||this.yy||{},this._input=m,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:f(function(){var m=this._input[0];return this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m,m.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),m},"input"),unput:f(function(m){var O=m.length,x=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-O),this.offset-=O;var b=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),x.length-1&&(this.yylineno-=x.length-1);var T=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:x?(x.length===b.length?this.yylloc.first_column:0)+b[b.length-x.length].length-x[0].length:this.yylloc.first_column-O},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-O]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:f(function(m){this.unput(this.match.slice(m))},"less"),pastInput:f(function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var m=this.pastInput(),O=new Array(m.length+1).join("-");return m+this.upcomingInput()+`
@@ -0,0 +1 @@
1
+ import{U as s,C as o}from"./mermaid-D59lkToe.js";const n=(a,r)=>s.lang.round(o.parse(a)[r]);export{n as c};
@@ -1 +1 @@
1
- import{_ as l}from"./mermaid-sbM5kvPX.js";function s(c,e){var i,a,o;c.accDescr&&((i=e.setAccDescription)==null||i.call(e,c.accDescr)),c.accTitle&&((a=e.setAccTitle)==null||a.call(e,c.accTitle)),c.title&&((o=e.setDiagramTitle)==null||o.call(e,c.title))}l(s,"populateCommonDb");export{s as p};
1
+ import{_ as l}from"./mermaid-D59lkToe.js";function s(c,e){var i,a,o;c.accDescr&&((i=e.setAccDescription)==null||i.call(e,c.accDescr)),c.accTitle&&((a=e.setAccTitle)==null||a.call(e,c.accTitle)),c.title&&((o=e.setDiagramTitle)==null||o.call(e,c.title))}l(s,"populateCommonDb");export{s as p};
@@ -1 +1 @@
1
- var t;import{_ as s}from"./mermaid-sbM5kvPX.js";var r=(t=class{constructor(i){this.init=i,this.records=this.init()}reset(){this.records=this.init()}},s(t,"ImperativeState"),t);export{r as I};
1
+ var t;import{_ as s}from"./mermaid-D59lkToe.js";var r=(t=class{constructor(i){this.init=i,this.records=this.init()}reset(){this.records=this.init()}},s(t,"ImperativeState"),t);export{r as I};
@@ -1,4 +1,4 @@
1
- import{_ as n}from"./mermaid-sbM5kvPX.js";var e=n(()=>`
1
+ import{_ as n}from"./mermaid-D59lkToe.js";var e=n(()=>`
2
2
  /* Font Awesome icon styling - consolidated */
3
3
  .label-icon {
4
4
  display: inline-block;