@loopstack/loopstack-studio 0.25.0 → 0.25.1

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 (1746) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +20 -0
  2. package/dist/api/auth.js +4 -2
  3. package/dist/api/client.js +9 -7
  4. package/dist/api/config.js +4 -2
  5. package/dist/api/dashboard.js +4 -2
  6. package/dist/api/documents.js +4 -2
  7. package/dist/api/index.js +21 -19
  8. package/dist/api/processor.js +4 -2
  9. package/dist/api/secrets.js +4 -2
  10. package/dist/api/workflows.js +4 -2
  11. package/dist/api/workspaces.js +4 -2
  12. package/dist/app/EnvironmentEmbedRoot.js +24 -31
  13. package/dist/components/ai-elements/code-block.js +53 -71
  14. package/dist/components/ai-elements/message.js +41 -82
  15. package/dist/components/ai-elements/prompt-input.js +162 -253
  16. package/dist/components/ai-elements/reasoning.js +78 -116
  17. package/dist/components/ai-elements/shimmer.js +23 -35
  18. package/dist/components/ai-elements/sources.js +29 -58
  19. package/dist/components/data-table/ConfirmDialog.js +14 -30
  20. package/dist/components/data-table/DataList.js +138 -198
  21. package/dist/components/data-table/DataTable.js +168 -234
  22. package/dist/components/data-table/DataTableBatchAction.js +18 -27
  23. package/dist/components/data-table/DataTableFilters.js +53 -78
  24. package/dist/components/data-table/DataTablePagination.js +72 -104
  25. package/dist/components/data-table/DataTableToolbar.js +53 -65
  26. package/dist/components/dynamic-form/ArrayController.js +85 -103
  27. package/dist/components/dynamic-form/CodeContent.js +28 -36
  28. package/dist/components/dynamic-form/Form.js +43 -56
  29. package/dist/components/dynamic-form/FormBody.js +12 -10
  30. package/dist/components/dynamic-form/FormElement.js +31 -41
  31. package/dist/components/dynamic-form/FormElementHeader.js +12 -20
  32. package/dist/components/dynamic-form/InputController.js +36 -38
  33. package/dist/components/dynamic-form/MarkdownContent.js +53 -74
  34. package/dist/components/dynamic-form/MermaidDiagram.js +22 -24
  35. package/dist/components/dynamic-form/ObjectController.js +24 -32
  36. package/dist/components/dynamic-form/fields/BaseFieldWrapper.js +35 -47
  37. package/dist/components/dynamic-form/fields/CheckboxField.js +39 -48
  38. package/dist/components/dynamic-form/fields/CodeViewField.js +42 -50
  39. package/dist/components/dynamic-form/fields/InputField.js +62 -90
  40. package/dist/components/dynamic-form/fields/MarkdownViewField.js +16 -19
  41. package/dist/components/dynamic-form/fields/RadioField.js +46 -62
  42. package/dist/components/dynamic-form/fields/SelectField.js +40 -58
  43. package/dist/components/dynamic-form/fields/SliderField.js +94 -100
  44. package/dist/components/dynamic-form/fields/SwitchField.js +42 -61
  45. package/dist/components/dynamic-form/fields/TextareaField.js +53 -72
  46. package/dist/components/dynamic-form/fields/utils/text-validation-utils.js +4 -2
  47. package/dist/components/dynamic-form/hooks/useArrayDefaultValue.js +6 -5
  48. package/dist/components/dynamic-form/hooks/useFieldConfig.js +19 -20
  49. package/dist/components/dynamic-form/hooks/useMergeParentKey.js +4 -2
  50. package/dist/components/dynamic-form/hooks/useSortPropertyNames.js +4 -2
  51. package/dist/components/feedback/ErrorAlert.js +11 -17
  52. package/dist/components/feedback/ErrorBoundary.js +16 -14
  53. package/dist/components/feedback/ErrorSnackbar.js +13 -30
  54. package/dist/components/feedback/LoadingCentered.js +15 -28
  55. package/dist/components/feedback/Snackbar.js +43 -44
  56. package/dist/components/feedback/index.js +5 -5
  57. package/dist/components/index.js +47 -47
  58. package/dist/components/layout/MainLayout.js +17 -25
  59. package/dist/components/layout/StudioSidebar.js +132 -202
  60. package/dist/components/lists/CustomListView.js +49 -74
  61. package/dist/components/lists/ListView.js +66 -102
  62. package/dist/components/loopstack-elements/link.js +65 -104
  63. package/dist/components/loopstack-elements/tool.js +70 -142
  64. package/dist/components/messages/CompletionMessagePaper.js +53 -85
  65. package/dist/components/page/PageBreadcrumbs.js +64 -83
  66. package/dist/components/ui/DiscordLogo.js +16 -22
  67. package/dist/components/ui/GoogleLogo.js +40 -44
  68. package/dist/components/ui/accordion.js +31 -52
  69. package/dist/components/ui/alert-dialog.js +59 -109
  70. package/dist/components/ui/alert.js +22 -36
  71. package/dist/components/ui/avatar.js +21 -35
  72. package/dist/components/ui/badge.js +13 -17
  73. package/dist/components/ui/breadcrumb.js +46 -82
  74. package/dist/components/ui/button-group.js +5 -5
  75. package/dist/components/ui/button.js +17 -21
  76. package/dist/components/ui/card.js +40 -74
  77. package/dist/components/ui/checkbox.js +17 -23
  78. package/dist/components/ui/collapsible.js +17 -25
  79. package/dist/components/ui/command.js +1 -2
  80. package/dist/components/ui/context-menu.js +32 -52
  81. package/dist/components/ui/dialog.js +62 -107
  82. package/dist/components/ui/drawer.js +54 -99
  83. package/dist/components/ui/dropdown-menu.js +91 -159
  84. package/dist/components/ui/hover-card.js +1 -2
  85. package/dist/components/ui/input-group.js +36 -56
  86. package/dist/components/ui/input.js +11 -15
  87. package/dist/components/ui/label.js +11 -15
  88. package/dist/components/ui/popover.js +25 -38
  89. package/dist/components/ui/radio-group.js +22 -33
  90. package/dist/components/ui/scroll-area.js +28 -43
  91. package/dist/components/ui/select.js +73 -134
  92. package/dist/components/ui/separator.js +13 -17
  93. package/dist/components/ui/sheet.js +60 -105
  94. package/dist/components/ui/sidebar.js +269 -451
  95. package/dist/components/ui/skeleton.js +10 -14
  96. package/dist/components/ui/slider.js +17 -15
  97. package/dist/components/ui/switch.js +15 -21
  98. package/dist/components/ui/table.js +46 -85
  99. package/dist/components/ui/tabs.js +26 -45
  100. package/dist/components/ui/textarea.js +10 -14
  101. package/dist/components/ui/tooltip.js +26 -41
  102. package/dist/components/ui-widgets/UiActions.js +30 -37
  103. package/dist/components/ui-widgets/UiWidget.js +34 -46
  104. package/dist/components/ui-widgets/widgets/AiPromptInput.js +28 -42
  105. package/dist/components/ui-widgets/widgets/ButtonFullWidth.js +16 -21
  106. package/dist/components/ui-widgets/widgets/SandboxRun.js +19 -26
  107. package/dist/components/ui-widgets/widgets/SubmitButton.js +15 -20
  108. package/dist/events/api-client-events.js +4 -2
  109. package/dist/events/sse-client-events.js +4 -2
  110. package/dist/features/code-explorer/CodeExplorer.js +1 -2
  111. package/dist/features/code-explorer/components/CodeExplorerTree.js +2 -2
  112. package/dist/features/code-explorer/components/CodeExplorerTreeNode.js +31 -29
  113. package/dist/features/code-explorer/components/FileContentViewer.js +108 -148
  114. package/dist/features/code-explorer/components/FileTabsBar.js +1 -2
  115. package/dist/features/code-explorer/components/FileTabsBarBase.js +134 -169
  116. package/dist/features/code-explorer/index.js +1 -1
  117. package/dist/features/code-explorer/providers/CodeExplorerProvider.js +4 -4
  118. package/dist/features/code-explorer/utils/fileIcons.js +41 -39
  119. package/dist/features/dashboard/Dashboard.js +79 -121
  120. package/dist/features/dashboard/RunItem.js +50 -68
  121. package/dist/features/dashboard/RunList.js +17 -28
  122. package/dist/features/debug/components/ConfigFlowViewer.js +49 -67
  123. package/dist/features/debug/components/WorkflowDebugHeader.js +30 -46
  124. package/dist/features/debug/components/WorkflowDebugLegend.js +56 -68
  125. package/dist/features/debug/components/WorkflowFlowViewer.js +76 -96
  126. package/dist/features/debug/components/workflow-flow/StateNode.js +73 -102
  127. package/dist/features/debug/components/workflow-flow/WorkflowGraph.js +35 -40
  128. package/dist/features/debug/components/workflow-flow/WorkflowTransitionEdge.js +61 -94
  129. package/dist/features/debug/index.js +3 -3
  130. package/dist/features/debug/lib/edge-paths.js +33 -31
  131. package/dist/features/debug/lib/flow-utils.js +147 -145
  132. package/dist/features/documents/DocumentRenderer.js +73 -77
  133. package/dist/features/documents/components/DocumentItem.js +21 -24
  134. package/dist/features/documents/components/DocumentList.js +39 -45
  135. package/dist/features/documents/components/DocumentMetadataPills.js +44 -59
  136. package/dist/features/documents/document-details/DocumentDetails.js +298 -413
  137. package/dist/features/documents/document-details/PromptDetails.js +105 -142
  138. package/dist/features/documents/index.js +4 -4
  139. package/dist/features/documents/renderers/AiMessage.js +39 -48
  140. package/dist/features/documents/renderers/AiMessageContent.js +108 -164
  141. package/dist/features/documents/renderers/ChoicesRenderer.js +77 -89
  142. package/dist/features/documents/renderers/ClaudeMessage.js +74 -91
  143. package/dist/features/documents/renderers/ConfirmPromptRenderer.js +44 -53
  144. package/dist/features/documents/renderers/DocumentDebugRenderer.js +26 -30
  145. package/dist/features/documents/renderers/DocumentFormRenderer.js +69 -85
  146. package/dist/features/documents/renderers/DocumentMessageRenderer.js +10 -9
  147. package/dist/features/documents/renderers/ErrorMessageRenderer.js +11 -13
  148. package/dist/features/documents/renderers/LinkMessageRenderer.js +15 -14
  149. package/dist/features/documents/renderers/MarkdownMessageRenderer.js +8 -10
  150. package/dist/features/documents/renderers/PlainMessageRenderer.js +7 -9
  151. package/dist/features/documents/renderers/SecretInputRenderer.js +37 -35
  152. package/dist/features/documents/renderers/TextPromptRenderer.js +45 -54
  153. package/dist/features/documents/renderers/useDocumentTransition.js +9 -7
  154. package/dist/features/health/LocalHealthCheck.js +54 -53
  155. package/dist/features/health/index.js +1 -1
  156. package/dist/features/oauth/OAuthCallbackPage.js +2 -2
  157. package/dist/features/oauth/OAuthPromptRenderer.js +148 -197
  158. package/dist/features/oauth/index.js +2 -2
  159. package/dist/features/oauth/useOAuthPopup.js +52 -71
  160. package/dist/features/runs/Runs.js +145 -187
  161. package/dist/features/workbench/Workbench.js +72 -98
  162. package/dist/features/workbench/WorkflowItem.js +49 -68
  163. package/dist/features/workbench/WorkflowList.js +51 -66
  164. package/dist/features/workbench/components/NewRunDialog.js +212 -309
  165. package/dist/features/workbench/components/RemoteFileTabsBar.js +18 -17
  166. package/dist/features/workbench/components/RemoteFileTree.js +54 -85
  167. package/dist/features/workbench/components/WorkbenchFilesPanel.js +52 -63
  168. package/dist/features/workbench/components/WorkbenchFloatingPanel.js +34 -51
  169. package/dist/features/workbench/components/WorkbenchFlowPanel.js +35 -44
  170. package/dist/features/workbench/components/WorkbenchIconSidebar.js +50 -68
  171. package/dist/features/workbench/components/WorkbenchPreviewPanel.js +51 -49
  172. package/dist/features/workbench/components/WorkbenchSecretsPanel.js +143 -172
  173. package/dist/features/workbench/components/WorkbenchSettingsModal.js +49 -60
  174. package/dist/features/workbench/components/WorkflowForms.js +17 -23
  175. package/dist/features/workbench/components/WorkflowHistoryItem.js +96 -122
  176. package/dist/features/workbench/components/WorkflowHistoryList.js +31 -54
  177. package/dist/features/workbench/components/buttons/WorkflowButtons.js +70 -99
  178. package/dist/features/workbench/hooks/useAutoScrollBottom.js +21 -25
  179. package/dist/features/workbench/hooks/useScrollToListItem.js +20 -21
  180. package/dist/features/workbench/hooks/useWorkflowData.js +31 -44
  181. package/dist/features/workbench/hooks/useWorkflowListState.js +13 -12
  182. package/dist/features/workbench/index.js +7 -7
  183. package/dist/features/workbench/providers/RemoteFileExplorerProvider.js +123 -138
  184. package/dist/features/workbench/providers/ScrollProvider.js +15 -19
  185. package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +76 -75
  186. package/dist/features/workspaces/Workspaces.js +161 -226
  187. package/dist/features/workspaces/components/CreateWorkspace.js +137 -194
  188. package/dist/features/workspaces/components/EnvironmentSlotSelector.js +27 -25
  189. package/dist/features/workspaces/components/ExecutionTimeline.js +143 -185
  190. package/dist/features/workspaces/components/NewWorkflowRunDialog.js +18 -26
  191. package/dist/features/workspaces/components/WorkflowRunForm.js +85 -133
  192. package/dist/features/workspaces/components/WorkspaceHomePage.js +59 -80
  193. package/dist/features/workspaces/components/workflow-form/ArgumentsView.js +52 -69
  194. package/dist/features/workspaces/components/workflow-form/HeaderSection.js +27 -41
  195. package/dist/features/workspaces/components/workflow-form/SelectionView.js +64 -103
  196. package/dist/features/workspaces/index.js +3 -3
  197. package/dist/frontend/studio/node_modules/lodash/_Symbol.js +9 -0
  198. package/dist/frontend/studio/node_modules/lodash/_baseGetTag.js +15 -0
  199. package/dist/frontend/studio/node_modules/lodash/_baseTrim.js +13 -0
  200. package/dist/frontend/studio/node_modules/lodash/_freeGlobal.js +8 -0
  201. package/dist/frontend/studio/node_modules/lodash/_getRawTag.js +19 -0
  202. package/dist/frontend/studio/node_modules/lodash/_objectToString.js +12 -0
  203. package/dist/frontend/studio/node_modules/lodash/_root.js +10 -0
  204. package/dist/frontend/studio/node_modules/lodash/_trimmedEndIndex.js +13 -0
  205. package/dist/{node_modules → frontend/studio/node_modules}/lodash/debounce.js +10 -8
  206. package/dist/frontend/studio/node_modules/lodash/isObject.js +12 -0
  207. package/dist/frontend/studio/node_modules/lodash/isObjectLike.js +11 -0
  208. package/dist/frontend/studio/node_modules/lodash/isSymbol.js +14 -0
  209. package/dist/frontend/studio/node_modules/lodash/now.js +12 -0
  210. package/dist/frontend/studio/node_modules/lodash/toNumber.js +24 -0
  211. package/dist/hooks/index.js +6 -6
  212. package/dist/hooks/query-keys.js +33 -31
  213. package/dist/hooks/use-mobile.js +12 -11
  214. package/dist/hooks/useApi.js +16 -14
  215. package/dist/hooks/useAuth.js +38 -53
  216. package/dist/hooks/useConfig.js +26 -37
  217. package/dist/hooks/useDashboard.js +12 -15
  218. package/dist/hooks/useDebounce.js +12 -11
  219. package/dist/hooks/useDocuments.js +23 -35
  220. package/dist/hooks/useFiles.js +1 -2
  221. package/dist/hooks/useProcessor.js +14 -17
  222. package/dist/hooks/useSecrets.js +45 -64
  223. package/dist/hooks/useWorkflows.js +109 -161
  224. package/dist/hooks/useWorkspaces.js +83 -123
  225. package/dist/index.d.ts +0 -1304
  226. package/dist/index.js +80 -80
  227. package/dist/lib/requireParam.js +4 -2
  228. package/dist/lib/utils.js +7 -5
  229. package/dist/loopstack-studio.css +1 -1
  230. package/dist/node_modules/@braintree/sanitize-url/dist/constants.js +6 -4
  231. package/dist/node_modules/@braintree/sanitize-url/dist/index.js +8 -6
  232. package/dist/node_modules/@chevrotain/gast/lib/src/helpers.js +19 -20
  233. package/dist/node_modules/@chevrotain/gast/lib/src/model.js +87 -88
  234. package/dist/node_modules/@chevrotain/gast/lib/src/visitor.js +16 -13
  235. package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/api.js +2 -2
  236. package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js +4 -2
  237. package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js +36 -34
  238. package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js +138 -110
  239. package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/utils.js +13 -11
  240. package/dist/node_modules/@chevrotain/utils/lib/src/print.js +5 -3
  241. package/dist/node_modules/@chevrotain/utils/lib/src/timer.js +4 -2
  242. package/dist/node_modules/@chevrotain/utils/lib/src/to-fast-properties.js +4 -2
  243. package/dist/node_modules/@dagrejs/dagre/dist/dagre.esm.js +1812 -1913
  244. package/dist/node_modules/@iconify/utils/lib/customisations/defaults.js +8 -6
  245. package/dist/node_modules/@iconify/utils/lib/icon/defaults.js +10 -8
  246. package/dist/node_modules/@iconify/utils/lib/icon/merge.js +8 -6
  247. package/dist/node_modules/@iconify/utils/lib/icon/name.js +8 -6
  248. package/dist/node_modules/@iconify/utils/lib/icon/transformations.js +4 -2
  249. package/dist/node_modules/@iconify/utils/lib/icon-set/get-icon.js +12 -10
  250. package/dist/node_modules/@iconify/utils/lib/icon-set/tree.js +4 -2
  251. package/dist/node_modules/@iconify/utils/lib/svg/build.js +20 -18
  252. package/dist/node_modules/@iconify/utils/lib/svg/defs.js +8 -6
  253. package/dist/node_modules/@iconify/utils/lib/svg/html.js +4 -2
  254. package/dist/node_modules/@iconify/utils/lib/svg/id.js +10 -8
  255. package/dist/node_modules/@iconify/utils/lib/svg/size.js +7 -5
  256. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/architecture-YZFGNWBL.js +3 -0
  257. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-2KRD3SAO.js +26 -0
  258. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-67CJDMHE.js +26 -0
  259. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-7N4EOEYR.js +38 -0
  260. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-AA7GKIK3.js +33 -0
  261. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-CIAEETIT.js +26 -0
  262. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FOC6F5B3.js +26 -0
  263. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-K5T4RW27.js +1208 -0
  264. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-KGLVRYIC.js +26 -0
  265. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-LIHQZDEY.js +67 -0
  266. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ORNJ4GCN.js +34 -0
  267. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/gitGraph-7Q5UKJZL.js +3 -0
  268. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-OMHHGYJF.js +3 -0
  269. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-4T2RLAQJ.js +3 -0
  270. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-ZZUOXDRM.js +3 -0
  271. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-PYXPWWZC.js +3 -0
  272. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treeView-SZITEDCU.js +3 -0
  273. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-W4RFUUIX.js +3 -0
  274. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/wardley-RL74JXVD.js +3 -0
  275. package/dist/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.js +59 -45
  276. package/dist/node_modules/@shikijs/core/dist/index.js +583 -1119
  277. package/dist/node_modules/@shikijs/engine-oniguruma/dist/index.js +163 -148
  278. package/dist/node_modules/@shikijs/engine-oniguruma/dist/wasm-inlined.js +4 -2
  279. package/dist/node_modules/@shikijs/langs/dist/abap.js +3 -2
  280. package/dist/node_modules/@shikijs/langs/dist/actionscript-3.js +3 -2
  281. package/dist/node_modules/@shikijs/langs/dist/ada.js +3 -2
  282. package/dist/node_modules/@shikijs/langs/dist/angular-expression.js +3 -2
  283. package/dist/node_modules/@shikijs/langs/dist/angular-html.js +15 -13
  284. package/dist/node_modules/@shikijs/langs/dist/angular-inline-style.js +5 -3
  285. package/dist/node_modules/@shikijs/langs/dist/angular-inline-template.js +9 -7
  286. package/dist/node_modules/@shikijs/langs/dist/angular-let-declaration.js +5 -3
  287. package/dist/node_modules/@shikijs/langs/dist/angular-template-blocks.js +9 -7
  288. package/dist/node_modules/@shikijs/langs/dist/angular-template.js +5 -3
  289. package/dist/node_modules/@shikijs/langs/dist/angular-ts.js +17 -15
  290. package/dist/node_modules/@shikijs/langs/dist/apache.js +3 -2
  291. package/dist/node_modules/@shikijs/langs/dist/apex.js +3 -2
  292. package/dist/node_modules/@shikijs/langs/dist/apl.js +15 -13
  293. package/dist/node_modules/@shikijs/langs/dist/applescript.js +3 -2
  294. package/dist/node_modules/@shikijs/langs/dist/ara.js +3 -2
  295. package/dist/node_modules/@shikijs/langs/dist/asciidoc.js +3 -2
  296. package/dist/node_modules/@shikijs/langs/dist/asm.js +3 -2
  297. package/dist/node_modules/@shikijs/langs/dist/astro.js +17 -15
  298. package/dist/node_modules/@shikijs/langs/dist/awk.js +3 -2
  299. package/dist/node_modules/@shikijs/langs/dist/ballerina.js +3 -2
  300. package/dist/node_modules/@shikijs/langs/dist/bat.js +3 -2
  301. package/dist/node_modules/@shikijs/langs/dist/beancount.js +3 -2
  302. package/dist/node_modules/@shikijs/langs/dist/berry.js +3 -2
  303. package/dist/node_modules/@shikijs/langs/dist/bibtex.js +3 -2
  304. package/dist/node_modules/@shikijs/langs/dist/bicep.js +3 -2
  305. package/dist/node_modules/@shikijs/langs/dist/bird2.js +3 -2
  306. package/dist/node_modules/@shikijs/langs/dist/blade.js +19 -17
  307. package/dist/node_modules/@shikijs/langs/dist/bsl.js +5 -3
  308. package/dist/node_modules/@shikijs/langs/dist/c.js +3 -2
  309. package/dist/node_modules/@shikijs/langs/dist/c3.js +3 -2
  310. package/dist/node_modules/@shikijs/langs/dist/cadence.js +3 -2
  311. package/dist/node_modules/@shikijs/langs/dist/cairo.js +5 -3
  312. package/dist/node_modules/@shikijs/langs/dist/clarity.js +3 -2
  313. package/dist/node_modules/@shikijs/langs/dist/clojure.js +3 -2
  314. package/dist/node_modules/@shikijs/langs/dist/cmake.js +3 -2
  315. package/dist/node_modules/@shikijs/langs/dist/cobol.js +9 -7
  316. package/dist/node_modules/@shikijs/langs/dist/codeowners.js +3 -2
  317. package/dist/node_modules/@shikijs/langs/dist/codeql.js +3 -2
  318. package/dist/node_modules/@shikijs/langs/dist/coffee.js +5 -3
  319. package/dist/node_modules/@shikijs/langs/dist/common-lisp.js +3 -2
  320. package/dist/node_modules/@shikijs/langs/dist/coq.js +3 -2
  321. package/dist/node_modules/@shikijs/langs/dist/cpp-macro.js +11 -9
  322. package/dist/node_modules/@shikijs/langs/dist/cpp.js +13 -11
  323. package/dist/node_modules/@shikijs/langs/dist/crystal.js +17 -15
  324. package/dist/node_modules/@shikijs/langs/dist/csharp.js +3 -2
  325. package/dist/node_modules/@shikijs/langs/dist/css.js +3 -2
  326. package/dist/node_modules/@shikijs/langs/dist/csv.js +3 -2
  327. package/dist/node_modules/@shikijs/langs/dist/cue.js +3 -2
  328. package/dist/node_modules/@shikijs/langs/dist/cypher.js +3 -2
  329. package/dist/node_modules/@shikijs/langs/dist/d.js +3 -2
  330. package/dist/node_modules/@shikijs/langs/dist/dart.js +3 -2
  331. package/dist/node_modules/@shikijs/langs/dist/dax.js +3 -2
  332. package/dist/node_modules/@shikijs/langs/dist/desktop.js +3 -2
  333. package/dist/node_modules/@shikijs/langs/dist/diff.js +3 -2
  334. package/dist/node_modules/@shikijs/langs/dist/docker.js +3 -2
  335. package/dist/node_modules/@shikijs/langs/dist/dotenv.js +3 -2
  336. package/dist/node_modules/@shikijs/langs/dist/dream-maker.js +3 -2
  337. package/dist/node_modules/@shikijs/langs/dist/edge.js +11 -9
  338. package/dist/node_modules/@shikijs/langs/dist/elixir.js +5 -3
  339. package/dist/node_modules/@shikijs/langs/dist/elm.js +5 -3
  340. package/dist/node_modules/@shikijs/langs/dist/emacs-lisp.js +3 -2
  341. package/dist/node_modules/@shikijs/langs/dist/erb.js +9 -7
  342. package/dist/node_modules/@shikijs/langs/dist/erlang.js +5 -3
  343. package/dist/node_modules/@shikijs/langs/dist/es-tag-css.js +11 -9
  344. package/dist/node_modules/@shikijs/langs/dist/es-tag-glsl.js +11 -9
  345. package/dist/node_modules/@shikijs/langs/dist/es-tag-html.js +11 -9
  346. package/dist/node_modules/@shikijs/langs/dist/es-tag-sql.js +9 -7
  347. package/dist/node_modules/@shikijs/langs/dist/es-tag-xml.js +5 -3
  348. package/dist/node_modules/@shikijs/langs/dist/fennel.js +3 -2
  349. package/dist/node_modules/@shikijs/langs/dist/fish.js +3 -2
  350. package/dist/node_modules/@shikijs/langs/dist/fluent.js +3 -2
  351. package/dist/node_modules/@shikijs/langs/dist/fortran-fixed-form.js +5 -3
  352. package/dist/node_modules/@shikijs/langs/dist/fortran-free-form.js +3 -2
  353. package/dist/node_modules/@shikijs/langs/dist/fsharp.js +5 -3
  354. package/dist/node_modules/@shikijs/langs/dist/gdresource.js +9 -7
  355. package/dist/node_modules/@shikijs/langs/dist/gdscript.js +3 -2
  356. package/dist/node_modules/@shikijs/langs/dist/gdshader.js +3 -2
  357. package/dist/node_modules/@shikijs/langs/dist/genie.js +3 -2
  358. package/dist/node_modules/@shikijs/langs/dist/gherkin.js +3 -2
  359. package/dist/node_modules/@shikijs/langs/dist/git-commit.js +5 -3
  360. package/dist/node_modules/@shikijs/langs/dist/git-rebase.js +5 -3
  361. package/dist/node_modules/@shikijs/langs/dist/gleam.js +3 -2
  362. package/dist/node_modules/@shikijs/langs/dist/glimmer-js.js +13 -11
  363. package/dist/node_modules/@shikijs/langs/dist/glimmer-ts.js +13 -11
  364. package/dist/node_modules/@shikijs/langs/dist/glsl.js +5 -3
  365. package/dist/node_modules/@shikijs/langs/dist/gn.js +3 -2
  366. package/dist/node_modules/@shikijs/langs/dist/gnuplot.js +3 -2
  367. package/dist/node_modules/@shikijs/langs/dist/go.js +3 -2
  368. package/dist/node_modules/@shikijs/langs/dist/graphql.js +13 -11
  369. package/dist/node_modules/@shikijs/langs/dist/groovy.js +3 -2
  370. package/dist/node_modules/@shikijs/langs/dist/hack.js +9 -7
  371. package/dist/node_modules/@shikijs/langs/dist/haml.js +9 -7
  372. package/dist/node_modules/@shikijs/langs/dist/handlebars.js +13 -11
  373. package/dist/node_modules/@shikijs/langs/dist/haskell.js +3 -2
  374. package/dist/node_modules/@shikijs/langs/dist/haxe.js +3 -2
  375. package/dist/node_modules/@shikijs/langs/dist/hcl.js +3 -2
  376. package/dist/node_modules/@shikijs/langs/dist/hjson.js +3 -2
  377. package/dist/node_modules/@shikijs/langs/dist/hlsl.js +3 -2
  378. package/dist/node_modules/@shikijs/langs/dist/html-derivative.js +5 -3
  379. package/dist/node_modules/@shikijs/langs/dist/html.js +9 -7
  380. package/dist/node_modules/@shikijs/langs/dist/http.js +13 -11
  381. package/dist/node_modules/@shikijs/langs/dist/hurl.js +11 -9
  382. package/dist/node_modules/@shikijs/langs/dist/hxml.js +5 -3
  383. package/dist/node_modules/@shikijs/langs/dist/hy.js +3 -2
  384. package/dist/node_modules/@shikijs/langs/dist/imba.js +3 -2
  385. package/dist/node_modules/@shikijs/langs/dist/ini.js +3 -2
  386. package/dist/node_modules/@shikijs/langs/dist/java.js +3 -2
  387. package/dist/node_modules/@shikijs/langs/dist/javascript.js +3 -2
  388. package/dist/node_modules/@shikijs/langs/dist/jinja-html.js +5 -3
  389. package/dist/node_modules/@shikijs/langs/dist/jinja.js +5 -3
  390. package/dist/node_modules/@shikijs/langs/dist/jison.js +5 -3
  391. package/dist/node_modules/@shikijs/langs/dist/json.js +3 -2
  392. package/dist/node_modules/@shikijs/langs/dist/json5.js +3 -2
  393. package/dist/node_modules/@shikijs/langs/dist/jsonc.js +3 -2
  394. package/dist/node_modules/@shikijs/langs/dist/jsonl.js +3 -2
  395. package/dist/node_modules/@shikijs/langs/dist/jsonnet.js +3 -2
  396. package/dist/node_modules/@shikijs/langs/dist/jssm.js +3 -2
  397. package/dist/node_modules/@shikijs/langs/dist/jsx.js +3 -2
  398. package/dist/node_modules/@shikijs/langs/dist/julia.js +15 -13
  399. package/dist/node_modules/@shikijs/langs/dist/just.js +17 -15
  400. package/dist/node_modules/@shikijs/langs/dist/kdl.js +3 -2
  401. package/dist/node_modules/@shikijs/langs/dist/kotlin.js +3 -2
  402. package/dist/node_modules/@shikijs/langs/dist/kusto.js +3 -2
  403. package/dist/node_modules/@shikijs/langs/dist/latex.js +5 -3
  404. package/dist/node_modules/@shikijs/langs/dist/lean.js +3 -2
  405. package/dist/node_modules/@shikijs/langs/dist/less.js +3 -2
  406. package/dist/node_modules/@shikijs/langs/dist/liquid.js +13 -11
  407. package/dist/node_modules/@shikijs/langs/dist/llvm.js +3 -2
  408. package/dist/node_modules/@shikijs/langs/dist/log.js +3 -2
  409. package/dist/node_modules/@shikijs/langs/dist/logo.js +3 -2
  410. package/dist/node_modules/@shikijs/langs/dist/lua.js +5 -3
  411. package/dist/node_modules/@shikijs/langs/dist/luau.js +3 -2
  412. package/dist/node_modules/@shikijs/langs/dist/make.js +3 -2
  413. package/dist/node_modules/@shikijs/langs/dist/markdown-nix.js +3 -2
  414. package/dist/node_modules/@shikijs/langs/dist/markdown-vue.js +3 -2
  415. package/dist/node_modules/@shikijs/langs/dist/markdown.js +3 -2
  416. package/dist/node_modules/@shikijs/langs/dist/marko.js +13 -11
  417. package/dist/node_modules/@shikijs/langs/dist/matlab.js +3 -2
  418. package/dist/node_modules/@shikijs/langs/dist/mdc.js +11 -9
  419. package/dist/node_modules/@shikijs/langs/dist/mdx.js +3 -2
  420. package/dist/node_modules/@shikijs/langs/dist/mermaid.js +3 -2
  421. package/dist/node_modules/@shikijs/langs/dist/mipsasm.js +3 -2
  422. package/dist/node_modules/@shikijs/langs/dist/mojo.js +3 -2
  423. package/dist/node_modules/@shikijs/langs/dist/moonbit.js +3 -2
  424. package/dist/node_modules/@shikijs/langs/dist/move.js +3 -2
  425. package/dist/node_modules/@shikijs/langs/dist/narrat.js +3 -2
  426. package/dist/node_modules/@shikijs/langs/dist/nextflow-groovy.js +3 -2
  427. package/dist/node_modules/@shikijs/langs/dist/nextflow.js +5 -3
  428. package/dist/node_modules/@shikijs/langs/dist/nginx.js +5 -3
  429. package/dist/node_modules/@shikijs/langs/dist/nim.js +19 -17
  430. package/dist/node_modules/@shikijs/langs/dist/nix.js +5 -3
  431. package/dist/node_modules/@shikijs/langs/dist/nushell.js +3 -2
  432. package/dist/node_modules/@shikijs/langs/dist/objective-c.js +3 -2
  433. package/dist/node_modules/@shikijs/langs/dist/objective-cpp.js +3 -2
  434. package/dist/node_modules/@shikijs/langs/dist/ocaml.js +3 -2
  435. package/dist/node_modules/@shikijs/langs/dist/odin.js +3 -2
  436. package/dist/node_modules/@shikijs/langs/dist/openscad.js +3 -2
  437. package/dist/node_modules/@shikijs/langs/dist/pascal.js +3 -2
  438. package/dist/node_modules/@shikijs/langs/dist/perl.js +15 -13
  439. package/dist/node_modules/@shikijs/langs/dist/php.js +17 -15
  440. package/dist/node_modules/@shikijs/langs/dist/pkl.js +3 -2
  441. package/dist/node_modules/@shikijs/langs/dist/plsql.js +3 -2
  442. package/dist/node_modules/@shikijs/langs/dist/po.js +3 -2
  443. package/dist/node_modules/@shikijs/langs/dist/polar.js +3 -2
  444. package/dist/node_modules/@shikijs/langs/dist/postcss.js +3 -2
  445. package/dist/node_modules/@shikijs/langs/dist/powerquery.js +3 -2
  446. package/dist/node_modules/@shikijs/langs/dist/powershell.js +3 -2
  447. package/dist/node_modules/@shikijs/langs/dist/prisma.js +3 -2
  448. package/dist/node_modules/@shikijs/langs/dist/prolog.js +3 -2
  449. package/dist/node_modules/@shikijs/langs/dist/proto.js +3 -2
  450. package/dist/node_modules/@shikijs/langs/dist/pug.js +11 -9
  451. package/dist/node_modules/@shikijs/langs/dist/puppet.js +3 -2
  452. package/dist/node_modules/@shikijs/langs/dist/purescript.js +3 -2
  453. package/dist/node_modules/@shikijs/langs/dist/python.js +3 -2
  454. package/dist/node_modules/@shikijs/langs/dist/qml.js +5 -3
  455. package/dist/node_modules/@shikijs/langs/dist/qmldir.js +3 -2
  456. package/dist/node_modules/@shikijs/langs/dist/qss.js +3 -2
  457. package/dist/node_modules/@shikijs/langs/dist/r.js +3 -2
  458. package/dist/node_modules/@shikijs/langs/dist/racket.js +3 -2
  459. package/dist/node_modules/@shikijs/langs/dist/raku.js +3 -2
  460. package/dist/node_modules/@shikijs/langs/dist/razor.js +9 -7
  461. package/dist/node_modules/@shikijs/langs/dist/reg.js +3 -2
  462. package/dist/node_modules/@shikijs/langs/dist/regexp.js +3 -2
  463. package/dist/node_modules/@shikijs/langs/dist/rel.js +3 -2
  464. package/dist/node_modules/@shikijs/langs/dist/riscv.js +3 -2
  465. package/dist/node_modules/@shikijs/langs/dist/ron.js +3 -2
  466. package/dist/node_modules/@shikijs/langs/dist/rosmsg.js +3 -2
  467. package/dist/node_modules/@shikijs/langs/dist/rst.js +21 -19
  468. package/dist/node_modules/@shikijs/langs/dist/ruby.js +29 -27
  469. package/dist/node_modules/@shikijs/langs/dist/rust.js +3 -2
  470. package/dist/node_modules/@shikijs/langs/dist/sas.js +5 -3
  471. package/dist/node_modules/@shikijs/langs/dist/sass.js +3 -2
  472. package/dist/node_modules/@shikijs/langs/dist/scala.js +3 -2
  473. package/dist/node_modules/@shikijs/langs/dist/scheme.js +3 -2
  474. package/dist/node_modules/@shikijs/langs/dist/scss.js +5 -3
  475. package/dist/node_modules/@shikijs/langs/dist/sdbl.js +3 -2
  476. package/dist/node_modules/@shikijs/langs/dist/shaderlab.js +5 -3
  477. package/dist/node_modules/@shikijs/langs/dist/shellscript.js +3 -2
  478. package/dist/node_modules/@shikijs/langs/dist/shellsession.js +5 -3
  479. package/dist/node_modules/@shikijs/langs/dist/smalltalk.js +3 -2
  480. package/dist/node_modules/@shikijs/langs/dist/solidity.js +3 -2
  481. package/dist/node_modules/@shikijs/langs/dist/soy.js +5 -3
  482. package/dist/node_modules/@shikijs/langs/dist/sparql.js +5 -3
  483. package/dist/node_modules/@shikijs/langs/dist/splunk.js +3 -2
  484. package/dist/node_modules/@shikijs/langs/dist/sql.js +3 -2
  485. package/dist/node_modules/@shikijs/langs/dist/ssh-config.js +3 -2
  486. package/dist/node_modules/@shikijs/langs/dist/stata.js +5 -3
  487. package/dist/node_modules/@shikijs/langs/dist/stylus.js +3 -2
  488. package/dist/node_modules/@shikijs/langs/dist/surrealql.js +5 -3
  489. package/dist/node_modules/@shikijs/langs/dist/svelte.js +13 -11
  490. package/dist/node_modules/@shikijs/langs/dist/swift.js +3 -2
  491. package/dist/node_modules/@shikijs/langs/dist/system-verilog.js +3 -2
  492. package/dist/node_modules/@shikijs/langs/dist/systemd.js +3 -2
  493. package/dist/node_modules/@shikijs/langs/dist/talonscript.js +3 -2
  494. package/dist/node_modules/@shikijs/langs/dist/tasl.js +3 -2
  495. package/dist/node_modules/@shikijs/langs/dist/tcl.js +3 -2
  496. package/dist/node_modules/@shikijs/langs/dist/templ.js +11 -9
  497. package/dist/node_modules/@shikijs/langs/dist/terraform.js +3 -2
  498. package/dist/node_modules/@shikijs/langs/dist/tex.js +5 -3
  499. package/dist/node_modules/@shikijs/langs/dist/toml.js +3 -2
  500. package/dist/node_modules/@shikijs/langs/dist/ts-tags.js +17 -15
  501. package/dist/node_modules/@shikijs/langs/dist/tsv.js +3 -2
  502. package/dist/node_modules/@shikijs/langs/dist/tsx.js +3 -2
  503. package/dist/node_modules/@shikijs/langs/dist/turtle.js +3 -2
  504. package/dist/node_modules/@shikijs/langs/dist/twig.js +17 -15
  505. package/dist/node_modules/@shikijs/langs/dist/typescript.js +3 -2
  506. package/dist/node_modules/@shikijs/langs/dist/typespec.js +3 -2
  507. package/dist/node_modules/@shikijs/langs/dist/typst.js +3 -2
  508. package/dist/node_modules/@shikijs/langs/dist/v.js +3 -2
  509. package/dist/node_modules/@shikijs/langs/dist/vala.js +3 -2
  510. package/dist/node_modules/@shikijs/langs/dist/vb.js +3 -2
  511. package/dist/node_modules/@shikijs/langs/dist/verilog.js +3 -2
  512. package/dist/node_modules/@shikijs/langs/dist/vhdl.js +3 -2
  513. package/dist/node_modules/@shikijs/langs/dist/viml.js +3 -2
  514. package/dist/node_modules/@shikijs/langs/dist/vue-directives.js +3 -2
  515. package/dist/node_modules/@shikijs/langs/dist/vue-html.js +5 -3
  516. package/dist/node_modules/@shikijs/langs/dist/vue-interpolations.js +3 -2
  517. package/dist/node_modules/@shikijs/langs/dist/vue-sfc-style-variable-injection.js +5 -3
  518. package/dist/node_modules/@shikijs/langs/dist/vue-vine.js +17 -15
  519. package/dist/node_modules/@shikijs/langs/dist/vue.js +25 -23
  520. package/dist/node_modules/@shikijs/langs/dist/vyper.js +3 -2
  521. package/dist/node_modules/@shikijs/langs/dist/wasm.js +3 -2
  522. package/dist/node_modules/@shikijs/langs/dist/wenyan.js +3 -2
  523. package/dist/node_modules/@shikijs/langs/dist/wgsl.js +3 -2
  524. package/dist/node_modules/@shikijs/langs/dist/wikitext.js +3 -2
  525. package/dist/node_modules/@shikijs/langs/dist/wit.js +3 -2
  526. package/dist/node_modules/@shikijs/langs/dist/wolfram.js +3 -2
  527. package/dist/node_modules/@shikijs/langs/dist/xml.js +5 -3
  528. package/dist/node_modules/@shikijs/langs/dist/xsl.js +5 -3
  529. package/dist/node_modules/@shikijs/langs/dist/yaml.js +3 -2
  530. package/dist/node_modules/@shikijs/langs/dist/zenscript.js +3 -2
  531. package/dist/node_modules/@shikijs/langs/dist/zig.js +3 -2
  532. package/dist/node_modules/@shikijs/primitive/dist/index.js +540 -0
  533. package/dist/node_modules/@shikijs/themes/dist/andromeeda.js +4 -2
  534. package/dist/node_modules/@shikijs/themes/dist/aurora-x.js +4 -2
  535. package/dist/node_modules/@shikijs/themes/dist/ayu-dark.js +4 -2
  536. package/dist/node_modules/@shikijs/themes/dist/ayu-light.js +4 -2
  537. package/dist/node_modules/@shikijs/themes/dist/ayu-mirage.js +4 -2
  538. package/dist/node_modules/@shikijs/themes/dist/catppuccin-frappe.js +4 -2
  539. package/dist/node_modules/@shikijs/themes/dist/catppuccin-latte.js +4 -2
  540. package/dist/node_modules/@shikijs/themes/dist/catppuccin-macchiato.js +4 -2
  541. package/dist/node_modules/@shikijs/themes/dist/catppuccin-mocha.js +4 -2
  542. package/dist/node_modules/@shikijs/themes/dist/dark-plus.js +4 -2
  543. package/dist/node_modules/@shikijs/themes/dist/dracula-soft.js +4 -2
  544. package/dist/node_modules/@shikijs/themes/dist/dracula.js +4 -2
  545. package/dist/node_modules/@shikijs/themes/dist/everforest-dark.js +4 -2
  546. package/dist/node_modules/@shikijs/themes/dist/everforest-light.js +4 -2
  547. package/dist/node_modules/@shikijs/themes/dist/github-dark-default.js +4 -2
  548. package/dist/node_modules/@shikijs/themes/dist/github-dark-dimmed.js +4 -2
  549. package/dist/node_modules/@shikijs/themes/dist/github-dark-high-contrast.js +4 -2
  550. package/dist/node_modules/@shikijs/themes/dist/github-dark.js +4 -2
  551. package/dist/node_modules/@shikijs/themes/dist/github-light-default.js +4 -2
  552. package/dist/node_modules/@shikijs/themes/dist/github-light-high-contrast.js +4 -2
  553. package/dist/node_modules/@shikijs/themes/dist/github-light.js +4 -2
  554. package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-hard.js +4 -2
  555. package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-medium.js +4 -2
  556. package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-soft.js +4 -2
  557. package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-hard.js +4 -2
  558. package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-medium.js +4 -2
  559. package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-soft.js +4 -2
  560. package/dist/node_modules/@shikijs/themes/dist/horizon-bright.js +4 -2
  561. package/dist/node_modules/@shikijs/themes/dist/horizon.js +4 -2
  562. package/dist/node_modules/@shikijs/themes/dist/houston.js +4 -2
  563. package/dist/node_modules/@shikijs/themes/dist/kanagawa-dragon.js +4 -2
  564. package/dist/node_modules/@shikijs/themes/dist/kanagawa-lotus.js +4 -2
  565. package/dist/node_modules/@shikijs/themes/dist/kanagawa-wave.js +4 -2
  566. package/dist/node_modules/@shikijs/themes/dist/laserwave.js +4 -2
  567. package/dist/node_modules/@shikijs/themes/dist/light-plus.js +4 -2
  568. package/dist/node_modules/@shikijs/themes/dist/material-theme-darker.js +4 -2
  569. package/dist/node_modules/@shikijs/themes/dist/material-theme-lighter.js +4 -2
  570. package/dist/node_modules/@shikijs/themes/dist/material-theme-ocean.js +4 -2
  571. package/dist/node_modules/@shikijs/themes/dist/material-theme-palenight.js +4 -2
  572. package/dist/node_modules/@shikijs/themes/dist/material-theme.js +4 -2
  573. package/dist/node_modules/@shikijs/themes/dist/min-dark.js +4 -2
  574. package/dist/node_modules/@shikijs/themes/dist/min-light.js +4 -2
  575. package/dist/node_modules/@shikijs/themes/dist/monokai.js +4 -2
  576. package/dist/node_modules/@shikijs/themes/dist/night-owl-light.js +4 -2
  577. package/dist/node_modules/@shikijs/themes/dist/night-owl.js +4 -2
  578. package/dist/node_modules/@shikijs/themes/dist/nord.js +4 -2
  579. package/dist/node_modules/@shikijs/themes/dist/one-dark-pro.js +4 -2
  580. package/dist/node_modules/@shikijs/themes/dist/one-light.js +4 -2
  581. package/dist/node_modules/@shikijs/themes/dist/plastic.js +4 -2
  582. package/dist/node_modules/@shikijs/themes/dist/poimandres.js +4 -2
  583. package/dist/node_modules/@shikijs/themes/dist/red.js +4 -2
  584. package/dist/node_modules/@shikijs/themes/dist/rose-pine-dawn.js +4 -2
  585. package/dist/node_modules/@shikijs/themes/dist/rose-pine-moon.js +4 -2
  586. package/dist/node_modules/@shikijs/themes/dist/rose-pine.js +4 -2
  587. package/dist/node_modules/@shikijs/themes/dist/slack-dark.js +4 -2
  588. package/dist/node_modules/@shikijs/themes/dist/slack-ochin.js +4 -2
  589. package/dist/node_modules/@shikijs/themes/dist/snazzy-light.js +4 -2
  590. package/dist/node_modules/@shikijs/themes/dist/solarized-dark.js +4 -2
  591. package/dist/node_modules/@shikijs/themes/dist/solarized-light.js +4 -2
  592. package/dist/node_modules/@shikijs/themes/dist/synthwave-84.js +4 -2
  593. package/dist/node_modules/@shikijs/themes/dist/tokyo-night.js +4 -2
  594. package/dist/node_modules/@shikijs/themes/dist/vesper.js +4 -2
  595. package/dist/node_modules/@shikijs/themes/dist/vitesse-black.js +4 -2
  596. package/dist/node_modules/@shikijs/themes/dist/vitesse-dark.js +4 -2
  597. package/dist/node_modules/@shikijs/themes/dist/vitesse-light.js +4 -2
  598. package/dist/node_modules/@shikijs/types/dist/index.js +4 -2
  599. package/dist/node_modules/@shikijs/vscode-textmate/dist/index.js +949 -947
  600. package/dist/node_modules/@ungap/structured-clone/esm/deserialize.js +30 -30
  601. package/dist/node_modules/@ungap/structured-clone/esm/index.js +6 -4
  602. package/dist/node_modules/@ungap/structured-clone/esm/serialize.js +64 -64
  603. package/dist/node_modules/@upsetjs/venn.js/build/venn.esm.js +905 -0
  604. package/dist/node_modules/@xyflow/react/dist/esm/index.js +904 -901
  605. package/dist/node_modules/@xyflow/system/dist/esm/index.js +1226 -1222
  606. package/dist/node_modules/bail/index.js +4 -2
  607. package/dist/node_modules/ccount/index.js +4 -2
  608. package/dist/node_modules/character-entities-html4/index.js +4 -2
  609. package/dist/node_modules/character-entities-legacy/index.js +4 -2
  610. package/dist/node_modules/chevrotain/lib/src/api.js +10 -10
  611. package/dist/node_modules/chevrotain/lib/src/lang/lang_extensions.js +6 -4
  612. package/dist/node_modules/chevrotain/lib/src/parse/constants.js +4 -2
  613. package/dist/node_modules/chevrotain/lib/src/parse/cst/cst.js +11 -9
  614. package/dist/node_modules/chevrotain/lib/src/parse/cst/cst_visitor.js +38 -45
  615. package/dist/node_modules/chevrotain/lib/src/parse/errors_public.js +35 -36
  616. package/dist/node_modules/chevrotain/lib/src/parse/exceptions_public.js +26 -25
  617. package/dist/node_modules/chevrotain/lib/src/parse/grammar/checks.js +204 -226
  618. package/dist/node_modules/chevrotain/lib/src/parse/grammar/first.js +18 -18
  619. package/dist/node_modules/chevrotain/lib/src/parse/grammar/follow.js +20 -19
  620. package/dist/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js +14 -13
  621. package/dist/node_modules/chevrotain/lib/src/parse/grammar/interpreter.js +195 -200
  622. package/dist/node_modules/chevrotain/lib/src/parse/grammar/keys.js +5 -4
  623. package/dist/node_modules/chevrotain/lib/src/parse/grammar/llk_lookahead.js +28 -28
  624. package/dist/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js +165 -170
  625. package/dist/node_modules/chevrotain/lib/src/parse/grammar/resolver.js +17 -17
  626. package/dist/node_modules/chevrotain/lib/src/parse/grammar/rest.js +50 -50
  627. package/dist/node_modules/chevrotain/lib/src/parse/parser/parser.js +76 -83
  628. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/error_handler.js +21 -21
  629. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/gast_recorder.js +117 -121
  630. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js +12 -6
  631. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js +51 -51
  632. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/perf_tracer.js +15 -14
  633. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_api.js +81 -80
  634. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js +229 -217
  635. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recoverable.js +87 -86
  636. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/tree_builder.js +36 -44
  637. package/dist/node_modules/chevrotain/lib/src/parse/parser/utils/apply_mixins.js +4 -2
  638. package/dist/node_modules/chevrotain/lib/src/scan/lexer.js +287 -309
  639. package/dist/node_modules/chevrotain/lib/src/scan/lexer_errors_public.js +4 -2
  640. package/dist/node_modules/chevrotain/lib/src/scan/lexer_public.js +115 -126
  641. package/dist/node_modules/chevrotain/lib/src/scan/reg_exp.js +73 -70
  642. package/dist/node_modules/chevrotain/lib/src/scan/reg_exp_parser.js +12 -10
  643. package/dist/node_modules/chevrotain/lib/src/scan/tokens.js +45 -54
  644. package/dist/node_modules/chevrotain/lib/src/scan/tokens_public.js +29 -30
  645. package/dist/node_modules/chevrotain-allstar/lib/all-star-lookahead.js +242 -240
  646. package/dist/node_modules/chevrotain-allstar/lib/atn.js +134 -133
  647. package/dist/node_modules/chevrotain-allstar/lib/dfa.js +11 -10
  648. package/dist/node_modules/chevrotain-allstar/lib/index.js +1 -1
  649. package/dist/node_modules/classcat/index.js +5 -3
  650. package/dist/node_modules/comma-separated-tokens/index.js +5 -3
  651. package/dist/node_modules/cose-base/cose-base.js +21 -21
  652. package/dist/node_modules/cytoscape/dist/cytoscape.esm.js +7935 -7935
  653. package/dist/node_modules/cytoscape-cose-bilkent/cytoscape-cose-bilkent.js +8 -6
  654. package/dist/node_modules/cytoscape-fcose/cytoscape-fcose.js +8 -6
  655. package/dist/node_modules/cytoscape-fcose/node_modules/cose-base/cose-base.js +20 -20
  656. package/dist/node_modules/cytoscape-fcose/node_modules/layout-base/layout-base.js +6 -4
  657. package/dist/node_modules/d3/src/index.js +95 -95
  658. package/dist/node_modules/d3-array/src/ascending.js +4 -2
  659. package/dist/node_modules/d3-array/src/bisect.js +8 -8
  660. package/dist/node_modules/d3-array/src/bisector.js +8 -6
  661. package/dist/node_modules/d3-array/src/descending.js +4 -2
  662. package/dist/node_modules/d3-array/src/max.js +4 -2
  663. package/dist/node_modules/d3-array/src/min.js +4 -2
  664. package/dist/node_modules/d3-array/src/number.js +4 -2
  665. package/dist/node_modules/d3-array/src/range.js +4 -2
  666. package/dist/node_modules/d3-array/src/ticks.js +13 -11
  667. package/dist/node_modules/d3-axis/src/axis.js +48 -46
  668. package/dist/node_modules/d3-axis/src/identity.js +4 -2
  669. package/dist/node_modules/d3-brush/src/brush.js +6 -4
  670. package/dist/node_modules/d3-color/src/color.js +86 -84
  671. package/dist/node_modules/d3-color/src/define.js +5 -3
  672. package/dist/node_modules/d3-color/src/lab.js +45 -43
  673. package/dist/node_modules/d3-color/src/math.js +4 -2
  674. package/dist/node_modules/d3-dispatch/src/dispatch.js +18 -17
  675. package/dist/node_modules/d3-drag/src/constant.js +4 -2
  676. package/dist/node_modules/d3-drag/src/drag.js +77 -75
  677. package/dist/node_modules/d3-drag/src/event.js +5 -3
  678. package/dist/node_modules/d3-drag/src/nodrag.js +11 -9
  679. package/dist/node_modules/d3-drag/src/noevent.js +6 -4
  680. package/dist/node_modules/d3-ease/src/cubic.js +4 -2
  681. package/dist/node_modules/d3-format/src/defaultLocale.js +8 -6
  682. package/dist/node_modules/d3-format/src/exponent.js +6 -4
  683. package/dist/node_modules/d3-format/src/formatDecimal.js +5 -3
  684. package/dist/node_modules/d3-format/src/formatGroup.js +4 -2
  685. package/dist/node_modules/d3-format/src/formatNumerals.js +4 -2
  686. package/dist/node_modules/d3-format/src/formatPrefixAuto.js +10 -8
  687. package/dist/node_modules/d3-format/src/formatRounded.js +6 -4
  688. package/dist/node_modules/d3-format/src/formatSpecifier.js +10 -8
  689. package/dist/node_modules/d3-format/src/formatTrim.js +4 -2
  690. package/dist/node_modules/d3-format/src/formatTypes.js +15 -13
  691. package/dist/node_modules/d3-format/src/identity.js +4 -2
  692. package/dist/node_modules/d3-format/src/locale.js +33 -31
  693. package/dist/node_modules/d3-format/src/precisionFixed.js +6 -4
  694. package/dist/node_modules/d3-format/src/precisionPrefix.js +6 -4
  695. package/dist/node_modules/d3-format/src/precisionRound.js +6 -4
  696. package/dist/node_modules/d3-hierarchy/src/accessors.js +4 -2
  697. package/dist/node_modules/d3-hierarchy/src/constant.js +5 -3
  698. package/dist/node_modules/d3-hierarchy/src/hierarchy/ancestors.js +4 -2
  699. package/dist/node_modules/d3-hierarchy/src/hierarchy/count.js +6 -4
  700. package/dist/node_modules/d3-hierarchy/src/hierarchy/descendants.js +4 -2
  701. package/dist/node_modules/d3-hierarchy/src/hierarchy/each.js +4 -2
  702. package/dist/node_modules/d3-hierarchy/src/hierarchy/eachAfter.js +4 -2
  703. package/dist/node_modules/d3-hierarchy/src/hierarchy/eachBefore.js +4 -2
  704. package/dist/node_modules/d3-hierarchy/src/hierarchy/find.js +4 -2
  705. package/dist/node_modules/d3-hierarchy/src/hierarchy/index.js +46 -44
  706. package/dist/node_modules/d3-hierarchy/src/hierarchy/iterator.js +4 -2
  707. package/dist/node_modules/d3-hierarchy/src/hierarchy/leaves.js +4 -2
  708. package/dist/node_modules/d3-hierarchy/src/hierarchy/links.js +4 -2
  709. package/dist/node_modules/d3-hierarchy/src/hierarchy/path.js +6 -4
  710. package/dist/node_modules/d3-hierarchy/src/hierarchy/sort.js +4 -2
  711. package/dist/node_modules/d3-hierarchy/src/hierarchy/sum.js +4 -2
  712. package/dist/node_modules/d3-hierarchy/src/treemap/dice.js +4 -2
  713. package/dist/node_modules/d3-hierarchy/src/treemap/index.js +16 -14
  714. package/dist/node_modules/d3-hierarchy/src/treemap/round.js +4 -2
  715. package/dist/node_modules/d3-hierarchy/src/treemap/slice.js +4 -2
  716. package/dist/node_modules/d3-hierarchy/src/treemap/squarify.js +11 -9
  717. package/dist/node_modules/d3-interpolate/src/array.js +6 -4
  718. package/dist/node_modules/d3-interpolate/src/basis.js +6 -4
  719. package/dist/node_modules/d3-interpolate/src/basisClosed.js +6 -4
  720. package/dist/node_modules/d3-interpolate/src/color.js +19 -17
  721. package/dist/node_modules/d3-interpolate/src/constant.js +4 -2
  722. package/dist/node_modules/d3-interpolate/src/date.js +4 -2
  723. package/dist/node_modules/d3-interpolate/src/hcl.js +8 -6
  724. package/dist/node_modules/d3-interpolate/src/number.js +4 -2
  725. package/dist/node_modules/d3-interpolate/src/numberArray.js +5 -3
  726. package/dist/node_modules/d3-interpolate/src/object.js +6 -4
  727. package/dist/node_modules/d3-interpolate/src/rgb.js +11 -9
  728. package/dist/node_modules/d3-interpolate/src/round.js +4 -2
  729. package/dist/node_modules/d3-interpolate/src/string.js +16 -14
  730. package/dist/node_modules/d3-interpolate/src/transform/decompose.js +7 -5
  731. package/dist/node_modules/d3-interpolate/src/transform/index.js +13 -11
  732. package/dist/node_modules/d3-interpolate/src/transform/parse.js +10 -8
  733. package/dist/node_modules/d3-interpolate/src/value.js +14 -12
  734. package/dist/node_modules/d3-interpolate/src/zoom.js +13 -11
  735. package/dist/node_modules/d3-path/src/path.js +16 -14
  736. package/dist/node_modules/d3-sankey/node_modules/d3-array/src/max.js +4 -2
  737. package/dist/node_modules/d3-sankey/node_modules/d3-array/src/min.js +4 -2
  738. package/dist/node_modules/d3-sankey/node_modules/d3-array/src/sum.js +4 -2
  739. package/dist/node_modules/d3-sankey/node_modules/d3-path/src/path.js +13 -12
  740. package/dist/node_modules/d3-sankey/node_modules/d3-shape/src/array.js +4 -2
  741. package/dist/node_modules/d3-sankey/node_modules/d3-shape/src/constant.js +4 -2
  742. package/dist/node_modules/d3-sankey/node_modules/d3-shape/src/link/index.js +19 -17
  743. package/dist/node_modules/d3-sankey/node_modules/d3-shape/src/point.js +5 -3
  744. package/dist/node_modules/d3-sankey/src/align.js +12 -10
  745. package/dist/node_modules/d3-sankey/src/constant.js +4 -2
  746. package/dist/node_modules/d3-sankey/src/sankey.js +170 -168
  747. package/dist/node_modules/d3-sankey/src/sankeyLinkHorizontal.js +8 -6
  748. package/dist/node_modules/d3-scale/src/band.js +11 -9
  749. package/dist/node_modules/d3-scale/src/constant.js +4 -2
  750. package/dist/node_modules/d3-scale/src/continuous.js +49 -47
  751. package/dist/node_modules/d3-scale/src/init.js +4 -2
  752. package/dist/node_modules/d3-scale/src/linear.js +15 -13
  753. package/dist/node_modules/d3-scale/src/nice.js +4 -2
  754. package/dist/node_modules/d3-scale/src/number.js +4 -2
  755. package/dist/node_modules/d3-scale/src/ordinal.js +18 -16
  756. package/dist/node_modules/d3-scale/src/tickFormat.js +16 -14
  757. package/dist/node_modules/d3-scale/src/time.js +36 -34
  758. package/dist/node_modules/d3-scale-chromatic/src/categorical/Tableau10.js +5 -3
  759. package/dist/node_modules/d3-scale-chromatic/src/colors.js +4 -2
  760. package/dist/node_modules/d3-selection/src/array.js +4 -2
  761. package/dist/node_modules/d3-selection/src/constant.js +4 -2
  762. package/dist/node_modules/d3-selection/src/creator.js +12 -10
  763. package/dist/node_modules/d3-selection/src/matcher.js +5 -3
  764. package/dist/node_modules/d3-selection/src/namespace.js +7 -5
  765. package/dist/node_modules/d3-selection/src/namespaces.js +5 -3
  766. package/dist/node_modules/d3-selection/src/pointer.js +6 -4
  767. package/dist/node_modules/d3-selection/src/select.js +6 -4
  768. package/dist/node_modules/d3-selection/src/selection/append.js +6 -4
  769. package/dist/node_modules/d3-selection/src/selection/attr.js +19 -17
  770. package/dist/node_modules/d3-selection/src/selection/call.js +4 -2
  771. package/dist/node_modules/d3-selection/src/selection/classed.js +25 -23
  772. package/dist/node_modules/d3-selection/src/selection/clone.js +7 -5
  773. package/dist/node_modules/d3-selection/src/selection/data.js +18 -16
  774. package/dist/node_modules/d3-selection/src/selection/datum.js +4 -2
  775. package/dist/node_modules/d3-selection/src/selection/dispatch.js +12 -10
  776. package/dist/node_modules/d3-selection/src/selection/each.js +4 -2
  777. package/dist/node_modules/d3-selection/src/selection/empty.js +4 -2
  778. package/dist/node_modules/d3-selection/src/selection/enter.js +13 -11
  779. package/dist/node_modules/d3-selection/src/selection/exit.js +7 -5
  780. package/dist/node_modules/d3-selection/src/selection/filter.js +8 -6
  781. package/dist/node_modules/d3-selection/src/selection/html.js +8 -6
  782. package/dist/node_modules/d3-selection/src/selection/index.js +80 -79
  783. package/dist/node_modules/d3-selection/src/selection/insert.js +8 -6
  784. package/dist/node_modules/d3-selection/src/selection/iterator.js +4 -2
  785. package/dist/node_modules/d3-selection/src/selection/join.js +4 -2
  786. package/dist/node_modules/d3-selection/src/selection/lower.js +6 -4
  787. package/dist/node_modules/d3-selection/src/selection/merge.js +6 -4
  788. package/dist/node_modules/d3-selection/src/selection/node.js +4 -2
  789. package/dist/node_modules/d3-selection/src/selection/nodes.js +4 -2
  790. package/dist/node_modules/d3-selection/src/selection/on.js +11 -9
  791. package/dist/node_modules/d3-selection/src/selection/order.js +4 -2
  792. package/dist/node_modules/d3-selection/src/selection/property.js +8 -6
  793. package/dist/node_modules/d3-selection/src/selection/raise.js +6 -4
  794. package/dist/node_modules/d3-selection/src/selection/remove.js +6 -4
  795. package/dist/node_modules/d3-selection/src/selection/select.js +8 -6
  796. package/dist/node_modules/d3-selection/src/selection/selectAll.js +11 -9
  797. package/dist/node_modules/d3-selection/src/selection/selectChild.js +10 -8
  798. package/dist/node_modules/d3-selection/src/selection/selectChildren.js +10 -8
  799. package/dist/node_modules/d3-selection/src/selection/size.js +4 -2
  800. package/dist/node_modules/d3-selection/src/selection/sort.js +8 -6
  801. package/dist/node_modules/d3-selection/src/selection/sparse.js +4 -2
  802. package/dist/node_modules/d3-selection/src/selection/style.js +14 -12
  803. package/dist/node_modules/d3-selection/src/selection/text.js +8 -6
  804. package/dist/node_modules/d3-selection/src/selector.js +6 -4
  805. package/dist/node_modules/d3-selection/src/selectorAll.js +6 -4
  806. package/dist/node_modules/d3-selection/src/sourceEvent.js +4 -2
  807. package/dist/node_modules/d3-selection/src/window.js +4 -2
  808. package/dist/node_modules/d3-shape/src/arc.js +38 -36
  809. package/dist/node_modules/d3-shape/src/array.js +3 -2
  810. package/dist/node_modules/d3-shape/src/constant.js +4 -2
  811. package/dist/node_modules/d3-shape/src/curve/basis.js +10 -8
  812. package/dist/node_modules/d3-shape/src/curve/basisClosed.js +18 -16
  813. package/dist/node_modules/d3-shape/src/curve/basisOpen.js +9 -7
  814. package/dist/node_modules/d3-shape/src/curve/bump.js +15 -13
  815. package/dist/node_modules/d3-shape/src/curve/bundle.js +9 -7
  816. package/dist/node_modules/d3-shape/src/curve/cardinal.js +10 -8
  817. package/dist/node_modules/d3-shape/src/curve/cardinalClosed.js +12 -10
  818. package/dist/node_modules/d3-shape/src/curve/cardinalOpen.js +9 -7
  819. package/dist/node_modules/d3-shape/src/curve/catmullRom.js +19 -17
  820. package/dist/node_modules/d3-shape/src/curve/catmullRomClosed.js +13 -11
  821. package/dist/node_modules/d3-shape/src/curve/catmullRomOpen.js +10 -8
  822. package/dist/node_modules/d3-shape/src/curve/linear.js +7 -5
  823. package/dist/node_modules/d3-shape/src/curve/linearClosed.js +12 -10
  824. package/dist/node_modules/d3-shape/src/curve/monotone.js +23 -21
  825. package/dist/node_modules/d3-shape/src/curve/natural.js +9 -7
  826. package/dist/node_modules/d3-shape/src/curve/step.js +19 -17
  827. package/dist/node_modules/d3-shape/src/descending.js +4 -2
  828. package/dist/node_modules/d3-shape/src/identity.js +4 -2
  829. package/dist/node_modules/d3-shape/src/line.js +19 -17
  830. package/dist/node_modules/d3-shape/src/math.js +8 -6
  831. package/dist/node_modules/d3-shape/src/noop.js +4 -2
  832. package/dist/node_modules/d3-shape/src/path.js +6 -4
  833. package/dist/node_modules/d3-shape/src/pie.js +15 -13
  834. package/dist/node_modules/d3-shape/src/point.js +5 -3
  835. package/dist/node_modules/d3-time/src/day.js +17 -15
  836. package/dist/node_modules/d3-time/src/duration.js +4 -2
  837. package/dist/node_modules/d3-time/src/hour.js +16 -14
  838. package/dist/node_modules/d3-time/src/interval.js +7 -5
  839. package/dist/node_modules/d3-time/src/millisecond.js +7 -5
  840. package/dist/node_modules/d3-time/src/minute.js +16 -14
  841. package/dist/node_modules/d3-time/src/month.js +14 -12
  842. package/dist/node_modules/d3-time/src/second.js +9 -7
  843. package/dist/node_modules/d3-time/src/ticks.js +66 -64
  844. package/dist/node_modules/d3-time/src/week.js +21 -19
  845. package/dist/node_modules/d3-time/src/year.js +10 -8
  846. package/dist/node_modules/d3-time-format/src/defaultLocale.js +8 -6
  847. package/dist/node_modules/d3-time-format/src/locale.js +346 -344
  848. package/dist/node_modules/d3-timer/src/timeout.js +6 -4
  849. package/dist/node_modules/d3-timer/src/timer.js +33 -31
  850. package/dist/node_modules/d3-transition/src/index.js +2 -2
  851. package/dist/node_modules/d3-transition/src/interrupt.js +4 -3
  852. package/dist/node_modules/d3-transition/src/selection/index.js +5 -4
  853. package/dist/node_modules/d3-transition/src/selection/interrupt.js +6 -4
  854. package/dist/node_modules/d3-transition/src/selection/transition.js +16 -14
  855. package/dist/node_modules/d3-transition/src/transition/attr.js +28 -26
  856. package/dist/node_modules/d3-transition/src/transition/attrTween.js +13 -11
  857. package/dist/node_modules/d3-transition/src/transition/delay.js +11 -9
  858. package/dist/node_modules/d3-transition/src/transition/duration.js +11 -9
  859. package/dist/node_modules/d3-transition/src/transition/ease.js +8 -6
  860. package/dist/node_modules/d3-transition/src/transition/easeVarying.js +8 -6
  861. package/dist/node_modules/d3-transition/src/transition/end.js +6 -4
  862. package/dist/node_modules/d3-transition/src/transition/filter.js +8 -6
  863. package/dist/node_modules/d3-transition/src/transition/index.js +63 -61
  864. package/dist/node_modules/d3-transition/src/transition/interpolate.js +9 -7
  865. package/dist/node_modules/d3-transition/src/transition/merge.js +6 -4
  866. package/dist/node_modules/d3-transition/src/transition/on.js +9 -7
  867. package/dist/node_modules/d3-transition/src/transition/remove.js +6 -4
  868. package/dist/node_modules/d3-transition/src/transition/schedule.js +20 -18
  869. package/dist/node_modules/d3-transition/src/transition/select.js +10 -8
  870. package/dist/node_modules/d3-transition/src/transition/selectAll.js +10 -8
  871. package/dist/node_modules/d3-transition/src/transition/selection.js +7 -5
  872. package/dist/node_modules/d3-transition/src/transition/style.js +21 -19
  873. package/dist/node_modules/d3-transition/src/transition/styleTween.js +8 -6
  874. package/dist/node_modules/d3-transition/src/transition/text.js +8 -6
  875. package/dist/node_modules/d3-transition/src/transition/textTween.js +8 -6
  876. package/dist/node_modules/d3-transition/src/transition/transition.js +10 -8
  877. package/dist/node_modules/d3-transition/src/transition/tween.js +14 -12
  878. package/dist/node_modules/d3-zoom/src/constant.js +4 -2
  879. package/dist/node_modules/d3-zoom/src/event.js +4 -2
  880. package/dist/node_modules/d3-zoom/src/index.js +2 -2
  881. package/dist/node_modules/d3-zoom/src/noevent.js +5 -3
  882. package/dist/node_modules/d3-zoom/src/transform.js +12 -10
  883. package/dist/node_modules/d3-zoom/src/zoom.js +116 -114
  884. package/dist/node_modules/dagre-d3-es/src/dagre/acyclic.js +14 -12
  885. package/dist/node_modules/dagre-d3-es/src/dagre/add-border-segments.js +11 -9
  886. package/dist/node_modules/dagre-d3-es/src/dagre/coordinate-system.js +36 -34
  887. package/dist/node_modules/dagre-d3-es/src/dagre/data/list.js +9 -7
  888. package/dist/node_modules/dagre-d3-es/src/dagre/greedy-fas.js +51 -49
  889. package/dist/node_modules/dagre-d3-es/src/dagre/index.js +2 -2
  890. package/dist/node_modules/dagre-d3-es/src/dagre/layout.js +165 -163
  891. package/dist/node_modules/dagre-d3-es/src/dagre/nesting-graph.js +45 -43
  892. package/dist/node_modules/dagre-d3-es/src/dagre/normalize.js +12 -10
  893. package/dist/node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js +6 -4
  894. package/dist/node_modules/dagre-d3-es/src/dagre/order/barycenter.js +8 -6
  895. package/dist/node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js +14 -12
  896. package/dist/node_modules/dagre-d3-es/src/dagre/order/cross-count.js +22 -20
  897. package/dist/node_modules/dagre-d3-es/src/dagre/order/index.js +36 -34
  898. package/dist/node_modules/dagre-d3-es/src/dagre/order/init-order.js +16 -14
  899. package/dist/node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js +32 -30
  900. package/dist/node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js +30 -28
  901. package/dist/node_modules/dagre-d3-es/src/dagre/order/sort.js +20 -18
  902. package/dist/node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js +12 -10
  903. package/dist/node_modules/dagre-d3-es/src/dagre/position/bk.js +150 -148
  904. package/dist/node_modules/dagre-d3-es/src/dagre/position/index.js +20 -18
  905. package/dist/node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js +19 -17
  906. package/dist/node_modules/dagre-d3-es/src/dagre/rank/index.js +16 -14
  907. package/dist/node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js +64 -63
  908. package/dist/node_modules/dagre-d3-es/src/dagre/rank/util.js +15 -13
  909. package/dist/node_modules/dagre-d3-es/src/dagre/util.js +84 -82
  910. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/dfs.js +15 -13
  911. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js +3 -2
  912. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js +3 -2
  913. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/index.js +3 -3
  914. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/postorder.js +6 -4
  915. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/preorder.js +6 -4
  916. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/topsort.js +13 -11
  917. package/dist/node_modules/dagre-d3-es/src/graphlib/graph.js +131 -129
  918. package/dist/node_modules/dagre-d3-es/src/graphlib/index.js +1 -1
  919. package/dist/node_modules/dagre-d3-es/src/graphlib/json.js +23 -21
  920. package/dist/node_modules/dayjs/dayjs.min.js +6 -4
  921. package/dist/node_modules/dayjs/plugin/advancedFormat.js +6 -4
  922. package/dist/node_modules/dayjs/plugin/customParseFormat.js +6 -4
  923. package/dist/node_modules/dayjs/plugin/duration.js +6 -4
  924. package/dist/node_modules/dayjs/plugin/isoWeek.js +6 -4
  925. package/dist/node_modules/decode-named-character-reference/index.dom.js +7 -5
  926. package/dist/node_modules/devlop/lib/default.js +4 -2
  927. package/dist/node_modules/dompurify/dist/purify.es.js +203 -201
  928. package/dist/node_modules/entities/dist/esm/decode-codepoint.js +6 -4
  929. package/dist/node_modules/entities/dist/esm/decode.js +87 -85
  930. package/dist/node_modules/entities/dist/esm/generated/decode-data-html.js +4 -2
  931. package/dist/node_modules/estree-util-is-identifier-name/lib/index.js +6 -4
  932. package/dist/node_modules/extend/index.js +9 -6
  933. package/dist/node_modules/hast-util-from-dom/lib/index.js +32 -30
  934. package/dist/node_modules/hast-util-from-html-isomorphic/lib/browser.js +10 -8
  935. package/dist/node_modules/hast-util-from-parse5/lib/index.js +82 -80
  936. package/dist/node_modules/hast-util-is-element/lib/index.js +17 -15
  937. package/dist/node_modules/hast-util-parse-selector/lib/index.js +7 -5
  938. package/dist/node_modules/hast-util-raw/lib/index.js +136 -134
  939. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/doctype.js +23 -21
  940. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/error-codes.js +5 -3
  941. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/foreign-content.js +89 -89
  942. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/html.js +250 -249
  943. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/token.js +6 -4
  944. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/unicode.js +14 -14
  945. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/index.js +4 -4
  946. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/formatting-element-list.js +17 -15
  947. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/index.js +1497 -1495
  948. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/open-element-stack.js +148 -146
  949. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/serializer/index.js +20 -19
  950. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/index.js +800 -798
  951. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/preprocessor.js +33 -31
  952. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tree-adapters/default.js +10 -8
  953. package/dist/node_modules/hast-util-sanitize/lib/index.js +106 -104
  954. package/dist/node_modules/hast-util-sanitize/lib/schema.js +12 -11
  955. package/dist/node_modules/hast-util-to-html/lib/handle/comment.js +9 -7
  956. package/dist/node_modules/hast-util-to-html/lib/handle/doctype.js +4 -2
  957. package/dist/node_modules/hast-util-to-html/lib/handle/element.js +25 -23
  958. package/dist/node_modules/hast-util-to-html/lib/handle/index.js +22 -21
  959. package/dist/node_modules/hast-util-to-html/lib/handle/raw.js +6 -4
  960. package/dist/node_modules/hast-util-to-html/lib/handle/root.js +4 -2
  961. package/dist/node_modules/hast-util-to-html/lib/handle/text.js +7 -5
  962. package/dist/node_modules/hast-util-to-html/lib/index.js +38 -36
  963. package/dist/node_modules/hast-util-to-html/lib/omission/closing.js +70 -68
  964. package/dist/node_modules/hast-util-to-html/lib/omission/omission.js +6 -4
  965. package/dist/node_modules/hast-util-to-html/lib/omission/opening.js +32 -30
  966. package/dist/node_modules/hast-util-to-html/lib/omission/util/siblings.js +10 -9
  967. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +192 -190
  968. package/dist/node_modules/hast-util-to-parse5/lib/index.js +71 -69
  969. package/dist/node_modules/hast-util-to-text/lib/index.js +61 -59
  970. package/dist/node_modules/hast-util-whitespace/lib/index.js +8 -6
  971. package/dist/node_modules/hastscript/lib/create-h.js +26 -24
  972. package/dist/node_modules/hastscript/lib/index.js +7 -5
  973. package/dist/node_modules/hastscript/lib/svg-case-sensitive-tag-names.js +4 -2
  974. package/dist/node_modules/html-url-attributes/lib/index.js +4 -2
  975. package/dist/node_modules/html-void-elements/index.js +4 -2
  976. package/dist/node_modules/inline-style-parser/cjs/index.js +6 -4
  977. package/dist/node_modules/internmap/src/index.js +22 -20
  978. package/dist/node_modules/katex/dist/katex.js +2914 -2873
  979. package/dist/node_modules/khroma/dist/channels/index.js +23 -21
  980. package/dist/node_modules/khroma/dist/channels/reusable.js +5 -3
  981. package/dist/node_modules/khroma/dist/channels/type.js +7 -5
  982. package/dist/node_modules/khroma/dist/color/hex.js +10 -8
  983. package/dist/node_modules/khroma/dist/color/hsl.js +19 -17
  984. package/dist/node_modules/khroma/dist/color/index.js +17 -15
  985. package/dist/node_modules/khroma/dist/color/keyword.js +10 -8
  986. package/dist/node_modules/khroma/dist/color/rgb.js +14 -12
  987. package/dist/node_modules/khroma/dist/constants.js +7 -5
  988. package/dist/node_modules/khroma/dist/methods/adjust.js +8 -6
  989. package/dist/node_modules/khroma/dist/methods/adjust_channel.js +8 -6
  990. package/dist/node_modules/khroma/dist/methods/change.js +9 -7
  991. package/dist/node_modules/khroma/dist/methods/channel.js +6 -4
  992. package/dist/node_modules/khroma/dist/methods/darken.js +5 -3
  993. package/dist/node_modules/khroma/dist/methods/invert.js +8 -6
  994. package/dist/node_modules/khroma/dist/methods/is_dark.js +5 -3
  995. package/dist/node_modules/khroma/dist/methods/is_light.js +5 -3
  996. package/dist/node_modules/khroma/dist/methods/lighten.js +5 -3
  997. package/dist/node_modules/khroma/dist/methods/luminance.js +8 -6
  998. package/dist/node_modules/khroma/dist/methods/mix.js +8 -6
  999. package/dist/node_modules/khroma/dist/methods/rgba.js +15 -13
  1000. package/dist/node_modules/khroma/dist/methods/transparentize.js +5 -0
  1001. package/dist/node_modules/khroma/dist/utils/channel.js +8 -6
  1002. package/dist/node_modules/khroma/dist/utils/index.js +10 -8
  1003. package/dist/node_modules/khroma/dist/utils/lang.js +4 -2
  1004. package/dist/node_modules/khroma/dist/utils/unit.js +4 -2
  1005. package/dist/node_modules/langium/lib/default-module.js +66 -64
  1006. package/dist/node_modules/langium/lib/dependency-injection.js +37 -39
  1007. package/dist/node_modules/langium/lib/documentation/comment-provider.js +7 -5
  1008. package/dist/node_modules/langium/lib/documentation/documentation-provider.js +8 -6
  1009. package/dist/node_modules/langium/lib/documentation/jsdoc.js +204 -202
  1010. package/dist/node_modules/langium/lib/languages/generated/ast.js +343 -534
  1011. package/dist/node_modules/langium/lib/languages/grammar-config.js +10 -8
  1012. package/dist/node_modules/langium/lib/parser/async-parser.js +4 -76
  1013. package/dist/node_modules/langium/lib/parser/completion-parser-builder.js +8 -6
  1014. package/dist/node_modules/langium/lib/parser/cst-node-builder.js +56 -54
  1015. package/dist/node_modules/langium/lib/parser/langium-parser-builder.js +9 -7
  1016. package/dist/node_modules/langium/lib/parser/langium-parser.js +190 -188
  1017. package/dist/node_modules/langium/lib/parser/lexer.js +25 -25
  1018. package/dist/node_modules/langium/lib/parser/parser-builder-base.js +204 -203
  1019. package/dist/node_modules/langium/lib/parser/token-builder.js +32 -30
  1020. package/dist/node_modules/langium/lib/parser/value-converter.js +17 -15
  1021. package/dist/node_modules/langium/lib/references/linker.js +104 -103
  1022. package/dist/node_modules/langium/lib/references/name-provider.js +9 -7
  1023. package/dist/node_modules/langium/lib/references/references.js +53 -51
  1024. package/dist/node_modules/langium/lib/references/scope-computation.js +14 -12
  1025. package/dist/node_modules/langium/lib/references/scope-provider.js +13 -11
  1026. package/dist/node_modules/langium/lib/references/scope.js +27 -56
  1027. package/dist/node_modules/langium/lib/serializer/hydrator.js +71 -69
  1028. package/dist/node_modules/langium/lib/serializer/json-serializer.js +23 -21
  1029. package/dist/node_modules/langium/lib/service-registry.js +7 -5
  1030. package/dist/node_modules/langium/lib/syntax-tree.js +33 -31
  1031. package/dist/node_modules/langium/lib/utils/ast-utils.js +77 -112
  1032. package/dist/node_modules/langium/lib/utils/caching.js +33 -42
  1033. package/dist/node_modules/langium/lib/utils/cancellation.js +7 -5
  1034. package/dist/node_modules/langium/lib/utils/collections.js +35 -33
  1035. package/dist/node_modules/langium/lib/utils/cst-utils.js +46 -161
  1036. package/dist/node_modules/langium/lib/utils/disposable.js +5 -3
  1037. package/dist/node_modules/langium/lib/utils/errors.js +8 -9
  1038. package/dist/node_modules/langium/lib/utils/event.js +7 -5
  1039. package/dist/node_modules/langium/lib/utils/grammar-loader.js +16 -14
  1040. package/dist/node_modules/langium/lib/utils/grammar-utils.js +172 -249
  1041. package/dist/node_modules/langium/lib/utils/promise-utils.js +18 -19
  1042. package/dist/node_modules/langium/lib/utils/regexp-utils.js +53 -76
  1043. package/dist/node_modules/langium/lib/utils/stream.js +155 -153
  1044. package/dist/node_modules/langium/lib/utils/uri-utils.js +14 -12
  1045. package/dist/node_modules/langium/lib/validation/document-validator.js +104 -103
  1046. package/dist/node_modules/langium/lib/validation/validation-registry.js +15 -14
  1047. package/dist/node_modules/langium/lib/workspace/ast-descriptions.js +19 -17
  1048. package/dist/node_modules/langium/lib/workspace/ast-node-locator.js +4 -2
  1049. package/dist/node_modules/langium/lib/workspace/configuration.js +7 -5
  1050. package/dist/node_modules/langium/lib/workspace/document-builder.js +131 -134
  1051. package/dist/node_modules/langium/lib/workspace/documents.js +85 -83
  1052. package/dist/node_modules/langium/lib/workspace/file-system-provider.js +5 -4
  1053. package/dist/node_modules/langium/lib/workspace/index-manager.js +16 -14
  1054. package/dist/node_modules/langium/lib/workspace/workspace-lock.js +11 -9
  1055. package/dist/node_modules/langium/lib/workspace/workspace-manager.js +35 -33
  1056. package/dist/node_modules/layout-base/layout-base.js +6 -4
  1057. package/dist/node_modules/lodash-es/_DataView.js +6 -4
  1058. package/dist/node_modules/lodash-es/_Hash.js +14 -13
  1059. package/dist/node_modules/lodash-es/_ListCache.js +14 -13
  1060. package/dist/node_modules/lodash-es/_Map.js +6 -4
  1061. package/dist/node_modules/lodash-es/_MapCache.js +14 -13
  1062. package/dist/node_modules/lodash-es/_Promise.js +6 -4
  1063. package/dist/node_modules/lodash-es/_Set.js +6 -4
  1064. package/dist/node_modules/lodash-es/_SetCache.js +10 -9
  1065. package/dist/node_modules/lodash-es/_Stack.js +12 -11
  1066. package/dist/node_modules/lodash-es/_Symbol.js +5 -3
  1067. package/dist/node_modules/lodash-es/_Uint8Array.js +5 -3
  1068. package/dist/node_modules/lodash-es/_WeakMap.js +6 -4
  1069. package/dist/node_modules/lodash-es/_apply.js +4 -3
  1070. package/dist/node_modules/lodash-es/_arrayEach.js +4 -3
  1071. package/dist/node_modules/lodash-es/_arrayFilter.js +4 -3
  1072. package/dist/node_modules/lodash-es/_arrayIncludes.js +6 -5
  1073. package/dist/node_modules/lodash-es/_arrayIncludesWith.js +4 -3
  1074. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +13 -12
  1075. package/dist/node_modules/lodash-es/_arrayMap.js +4 -3
  1076. package/dist/node_modules/lodash-es/_arrayPush.js +4 -3
  1077. package/dist/node_modules/lodash-es/_arrayReduce.js +4 -3
  1078. package/dist/node_modules/lodash-es/_arraySome.js +4 -3
  1079. package/dist/node_modules/lodash-es/_asciiSize.js +5 -3
  1080. package/dist/node_modules/lodash-es/_assignMergeValue.js +7 -6
  1081. package/dist/node_modules/lodash-es/_assignValue.js +8 -7
  1082. package/dist/node_modules/lodash-es/_assocIndexOf.js +6 -5
  1083. package/dist/node_modules/lodash-es/_baseAssign.js +7 -6
  1084. package/dist/node_modules/lodash-es/_baseAssignIn.js +7 -6
  1085. package/dist/node_modules/lodash-es/_baseAssignValue.js +6 -5
  1086. package/dist/node_modules/lodash-es/_baseClone.js +51 -50
  1087. package/dist/node_modules/lodash-es/_baseCreate.js +7 -5
  1088. package/dist/node_modules/lodash-es/_baseEach.js +6 -4
  1089. package/dist/node_modules/lodash-es/_baseExtremum.js +6 -5
  1090. package/dist/node_modules/lodash-es/_baseFilter.js +6 -5
  1091. package/dist/node_modules/lodash-es/_baseFindIndex.js +4 -3
  1092. package/dist/node_modules/lodash-es/_baseFlatten.js +8 -7
  1093. package/dist/node_modules/lodash-es/_baseFor.js +5 -3
  1094. package/dist/node_modules/lodash-es/_baseForOwn.js +7 -6
  1095. package/dist/node_modules/lodash-es/_baseGet.js +8 -7
  1096. package/dist/node_modules/lodash-es/_baseGetAllKeys.js +7 -6
  1097. package/dist/node_modules/lodash-es/_baseGetTag.js +9 -8
  1098. package/dist/node_modules/lodash-es/_baseGt.js +4 -3
  1099. package/dist/node_modules/lodash-es/_baseHas.js +6 -5
  1100. package/dist/node_modules/lodash-es/_baseHasIn.js +4 -3
  1101. package/dist/node_modules/lodash-es/_baseIndexOf.js +8 -7
  1102. package/dist/node_modules/lodash-es/_baseIsArguments.js +8 -7
  1103. package/dist/node_modules/lodash-es/_baseIsEqual.js +7 -6
  1104. package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +23 -22
  1105. package/dist/node_modules/lodash-es/_baseIsMap.js +8 -7
  1106. package/dist/node_modules/lodash-es/_baseIsMatch.js +9 -8
  1107. package/dist/node_modules/lodash-es/_baseIsNaN.js +4 -3
  1108. package/dist/node_modules/lodash-es/_baseIsNative.js +10 -9
  1109. package/dist/node_modules/lodash-es/_baseIsSet.js +8 -7
  1110. package/dist/node_modules/lodash-es/_baseIsTypedArray.js +10 -9
  1111. package/dist/node_modules/lodash-es/_baseIteratee.js +10 -9
  1112. package/dist/node_modules/lodash-es/_baseKeys.js +9 -8
  1113. package/dist/node_modules/lodash-es/_baseKeysIn.js +11 -10
  1114. package/dist/node_modules/lodash-es/_baseLt.js +4 -3
  1115. package/dist/node_modules/lodash-es/_baseMap.js +8 -7
  1116. package/dist/node_modules/lodash-es/_baseMatches.js +10 -9
  1117. package/dist/node_modules/lodash-es/_baseMatchesProperty.js +15 -14
  1118. package/dist/node_modules/lodash-es/_baseMerge.js +16 -15
  1119. package/dist/node_modules/lodash-es/_baseMergeDeep.js +24 -23
  1120. package/dist/node_modules/lodash-es/_baseOrderBy.js +23 -22
  1121. package/dist/node_modules/lodash-es/_basePick.js +8 -7
  1122. package/dist/node_modules/lodash-es/_basePickBy.js +9 -8
  1123. package/dist/node_modules/lodash-es/_baseProperty.js +4 -3
  1124. package/dist/node_modules/lodash-es/_basePropertyDeep.js +6 -5
  1125. package/dist/node_modules/lodash-es/_baseRange.js +6 -5
  1126. package/dist/node_modules/lodash-es/_baseReduce.js +4 -3
  1127. package/dist/node_modules/lodash-es/_baseRest.js +8 -7
  1128. package/dist/node_modules/lodash-es/_baseSet.js +14 -13
  1129. package/dist/node_modules/lodash-es/_baseSetToString.js +10 -8
  1130. package/dist/node_modules/lodash-es/_baseSortBy.js +4 -3
  1131. package/dist/node_modules/lodash-es/_baseTimes.js +4 -3
  1132. package/dist/node_modules/lodash-es/_baseToString.js +13 -12
  1133. package/dist/node_modules/lodash-es/_baseTrim.js +7 -6
  1134. package/dist/node_modules/lodash-es/_baseUnary.js +4 -3
  1135. package/dist/node_modules/lodash-es/_baseUniq.js +17 -16
  1136. package/dist/node_modules/lodash-es/_baseValues.js +6 -5
  1137. package/dist/node_modules/lodash-es/_baseZipObject.js +4 -3
  1138. package/dist/node_modules/lodash-es/_cacheHas.js +4 -3
  1139. package/dist/node_modules/lodash-es/_castFunction.js +6 -5
  1140. package/dist/node_modules/lodash-es/_castPath.js +9 -8
  1141. package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +6 -5
  1142. package/dist/node_modules/lodash-es/_cloneBuffer.js +9 -8
  1143. package/dist/node_modules/lodash-es/_cloneDataView.js +6 -5
  1144. package/dist/node_modules/lodash-es/_cloneRegExp.js +6 -5
  1145. package/dist/node_modules/lodash-es/_cloneSymbol.js +7 -6
  1146. package/dist/node_modules/lodash-es/_cloneTypedArray.js +6 -5
  1147. package/dist/node_modules/lodash-es/_compareAscending.js +6 -5
  1148. package/dist/node_modules/lodash-es/_compareMultiple.js +6 -5
  1149. package/dist/node_modules/lodash-es/_copyArray.js +4 -3
  1150. package/dist/node_modules/lodash-es/_copyObject.js +7 -6
  1151. package/dist/node_modules/lodash-es/_copySymbols.js +7 -6
  1152. package/dist/node_modules/lodash-es/_copySymbolsIn.js +7 -6
  1153. package/dist/node_modules/lodash-es/_coreJsData.js +5 -3
  1154. package/dist/node_modules/lodash-es/_createAssigner.js +8 -7
  1155. package/dist/node_modules/lodash-es/_createBaseEach.js +6 -5
  1156. package/dist/node_modules/lodash-es/_createBaseFor.js +4 -3
  1157. package/dist/node_modules/lodash-es/_createFind.js +10 -9
  1158. package/dist/node_modules/lodash-es/_createRange.js +8 -7
  1159. package/dist/node_modules/lodash-es/_createSet.js +9 -7
  1160. package/dist/node_modules/lodash-es/_defineProperty.js +6 -4
  1161. package/dist/node_modules/lodash-es/_equalArrays.js +12 -11
  1162. package/dist/node_modules/lodash-es/_equalByTag.js +29 -28
  1163. package/dist/node_modules/lodash-es/_equalObjects.js +9 -8
  1164. package/dist/node_modules/lodash-es/_flatRest.js +8 -7
  1165. package/dist/node_modules/lodash-es/_freeGlobal.js +4 -2
  1166. package/dist/node_modules/lodash-es/_getAllKeys.js +8 -7
  1167. package/dist/node_modules/lodash-es/_getAllKeysIn.js +8 -7
  1168. package/dist/node_modules/lodash-es/_getMapData.js +6 -5
  1169. package/dist/node_modules/lodash-es/_getMatchData.js +8 -7
  1170. package/dist/node_modules/lodash-es/_getNative.js +8 -7
  1171. package/dist/node_modules/lodash-es/_getPrototype.js +5 -3
  1172. package/dist/node_modules/lodash-es/_getRawTag.js +10 -9
  1173. package/dist/node_modules/lodash-es/_getSymbols.js +9 -7
  1174. package/dist/node_modules/lodash-es/_getSymbolsIn.js +10 -8
  1175. package/dist/node_modules/lodash-es/_getTag.js +21 -19
  1176. package/dist/node_modules/lodash-es/_getValue.js +4 -3
  1177. package/dist/node_modules/lodash-es/_hasPath.js +13 -12
  1178. package/dist/node_modules/lodash-es/_hasUnicode.js +6 -5
  1179. package/dist/node_modules/lodash-es/_hashClear.js +6 -5
  1180. package/dist/node_modules/lodash-es/_hashDelete.js +5 -4
  1181. package/dist/node_modules/lodash-es/_hashGet.js +9 -8
  1182. package/dist/node_modules/lodash-es/_hashHas.js +7 -6
  1183. package/dist/node_modules/lodash-es/_hashSet.js +7 -6
  1184. package/dist/node_modules/lodash-es/_initCloneArray.js +6 -5
  1185. package/dist/node_modules/lodash-es/_initCloneByTag.js +29 -28
  1186. package/dist/node_modules/lodash-es/_initCloneObject.js +8 -7
  1187. package/dist/node_modules/lodash-es/_isFlattenable.js +9 -8
  1188. package/dist/node_modules/lodash-es/_isIndex.js +6 -5
  1189. package/dist/node_modules/lodash-es/_isIterateeCall.js +10 -9
  1190. package/dist/node_modules/lodash-es/_isKey.js +9 -8
  1191. package/dist/node_modules/lodash-es/_isKeyable.js +4 -3
  1192. package/dist/node_modules/lodash-es/_isMasked.js +9 -8
  1193. package/dist/node_modules/lodash-es/_isPrototype.js +6 -5
  1194. package/dist/node_modules/lodash-es/_isStrictComparable.js +6 -5
  1195. package/dist/node_modules/lodash-es/_listCacheClear.js +4 -3
  1196. package/dist/node_modules/lodash-es/_listCacheDelete.js +8 -7
  1197. package/dist/node_modules/lodash-es/_listCacheGet.js +6 -5
  1198. package/dist/node_modules/lodash-es/_listCacheHas.js +6 -5
  1199. package/dist/node_modules/lodash-es/_listCacheSet.js +6 -5
  1200. package/dist/node_modules/lodash-es/_mapCacheClear.js +10 -9
  1201. package/dist/node_modules/lodash-es/_mapCacheDelete.js +7 -6
  1202. package/dist/node_modules/lodash-es/_mapCacheGet.js +6 -5
  1203. package/dist/node_modules/lodash-es/_mapCacheHas.js +6 -5
  1204. package/dist/node_modules/lodash-es/_mapCacheSet.js +6 -5
  1205. package/dist/node_modules/lodash-es/_mapToArray.js +4 -3
  1206. package/dist/node_modules/lodash-es/_matchesStrictComparable.js +4 -3
  1207. package/dist/node_modules/lodash-es/_memoizeCapped.js +8 -7
  1208. package/dist/node_modules/lodash-es/_nativeCreate.js +5 -3
  1209. package/dist/node_modules/lodash-es/_nativeKeys.js +5 -3
  1210. package/dist/node_modules/lodash-es/_nativeKeysIn.js +4 -3
  1211. package/dist/node_modules/lodash-es/_nodeUtil.js +6 -4
  1212. package/dist/node_modules/lodash-es/_objectToString.js +6 -5
  1213. package/dist/node_modules/lodash-es/_overArg.js +4 -3
  1214. package/dist/node_modules/lodash-es/_overRest.js +9 -8
  1215. package/dist/node_modules/lodash-es/_root.js +5 -3
  1216. package/dist/node_modules/lodash-es/_safeGet.js +4 -3
  1217. package/dist/node_modules/lodash-es/_setCacheAdd.js +6 -5
  1218. package/dist/node_modules/lodash-es/_setCacheHas.js +4 -3
  1219. package/dist/node_modules/lodash-es/_setToArray.js +4 -3
  1220. package/dist/node_modules/lodash-es/_setToString.js +6 -4
  1221. package/dist/node_modules/lodash-es/_shortOut.js +7 -6
  1222. package/dist/node_modules/lodash-es/_stackClear.js +6 -5
  1223. package/dist/node_modules/lodash-es/_stackDelete.js +4 -3
  1224. package/dist/node_modules/lodash-es/_stackGet.js +4 -3
  1225. package/dist/node_modules/lodash-es/_stackHas.js +4 -3
  1226. package/dist/node_modules/lodash-es/_stackSet.js +11 -10
  1227. package/dist/node_modules/lodash-es/_strictIndexOf.js +4 -3
  1228. package/dist/node_modules/lodash-es/_stringSize.js +8 -7
  1229. package/dist/node_modules/lodash-es/_stringToPath.js +7 -5
  1230. package/dist/node_modules/lodash-es/_toKey.js +8 -7
  1231. package/dist/node_modules/lodash-es/_toSource.js +8 -7
  1232. package/dist/node_modules/lodash-es/_trimmedEndIndex.js +6 -5
  1233. package/dist/node_modules/lodash-es/_unicodeSize.js +17 -16
  1234. package/dist/node_modules/lodash-es/clone.js +7 -6
  1235. package/dist/node_modules/lodash-es/cloneDeep.js +7 -6
  1236. package/dist/node_modules/lodash-es/constant.js +4 -3
  1237. package/dist/node_modules/lodash-es/defaults.js +13 -11
  1238. package/dist/node_modules/lodash-es/eq.js +4 -3
  1239. package/dist/node_modules/lodash-es/filter.js +9 -8
  1240. package/dist/node_modules/lodash-es/find.js +6 -4
  1241. package/dist/node_modules/lodash-es/findIndex.js +10 -9
  1242. package/dist/node_modules/lodash-es/flatMap.js +7 -6
  1243. package/dist/node_modules/lodash-es/flatten.js +6 -5
  1244. package/dist/node_modules/lodash-es/forEach.js +9 -8
  1245. package/dist/node_modules/lodash-es/forIn.js +8 -7
  1246. package/dist/node_modules/lodash-es/forOwn.js +7 -6
  1247. package/dist/node_modules/lodash-es/get.js +6 -5
  1248. package/dist/node_modules/lodash-es/has.js +7 -6
  1249. package/dist/node_modules/lodash-es/hasIn.js +7 -6
  1250. package/dist/node_modules/lodash-es/identity.js +4 -3
  1251. package/dist/node_modules/lodash-es/isArguments.js +8 -6
  1252. package/dist/node_modules/lodash-es/isArray.js +4 -2
  1253. package/dist/node_modules/lodash-es/isArrayLike.js +7 -6
  1254. package/dist/node_modules/lodash-es/isArrayLikeObject.js +7 -6
  1255. package/dist/node_modules/lodash-es/isBuffer.js +6 -4
  1256. package/dist/node_modules/lodash-es/isEmpty.js +18 -17
  1257. package/dist/node_modules/lodash-es/isFunction.js +10 -9
  1258. package/dist/node_modules/lodash-es/isLength.js +6 -5
  1259. package/dist/node_modules/lodash-es/isMap.js +7 -5
  1260. package/dist/node_modules/lodash-es/isObject.js +4 -3
  1261. package/dist/node_modules/lodash-es/isObjectLike.js +4 -3
  1262. package/dist/node_modules/lodash-es/isPlainObject.js +13 -12
  1263. package/dist/node_modules/lodash-es/isSet.js +7 -5
  1264. package/dist/node_modules/lodash-es/isString.js +9 -8
  1265. package/dist/node_modules/lodash-es/isSymbol.js +8 -7
  1266. package/dist/node_modules/lodash-es/isTypedArray.js +7 -5
  1267. package/dist/node_modules/lodash-es/isUndefined.js +4 -3
  1268. package/dist/node_modules/lodash-es/keys.js +8 -7
  1269. package/dist/node_modules/lodash-es/keysIn.js +8 -7
  1270. package/dist/node_modules/lodash-es/last.js +4 -3
  1271. package/dist/node_modules/lodash-es/map.js +9 -8
  1272. package/dist/node_modules/lodash-es/mapValues.js +9 -8
  1273. package/dist/node_modules/lodash-es/max.js +8 -7
  1274. package/dist/node_modules/lodash-es/memoize.js +9 -8
  1275. package/dist/node_modules/lodash-es/merge.js +7 -5
  1276. package/dist/node_modules/lodash-es/min.js +8 -7
  1277. package/dist/node_modules/lodash-es/minBy.js +8 -7
  1278. package/dist/node_modules/lodash-es/noop.js +4 -3
  1279. package/dist/node_modules/lodash-es/now.js +6 -4
  1280. package/dist/node_modules/lodash-es/pick.js +7 -5
  1281. package/dist/node_modules/lodash-es/property.js +9 -8
  1282. package/dist/node_modules/lodash-es/range.js +5 -3
  1283. package/dist/node_modules/lodash-es/reduce.js +11 -10
  1284. package/dist/node_modules/lodash-es/size.js +13 -12
  1285. package/dist/node_modules/lodash-es/sortBy.js +9 -7
  1286. package/dist/node_modules/lodash-es/stubArray.js +4 -3
  1287. package/dist/node_modules/lodash-es/stubFalse.js +4 -3
  1288. package/dist/node_modules/lodash-es/toFinite.js +7 -6
  1289. package/dist/node_modules/lodash-es/toInteger.js +6 -5
  1290. package/dist/node_modules/lodash-es/toNumber.js +14 -13
  1291. package/dist/node_modules/lodash-es/toPlainObject.js +7 -6
  1292. package/dist/node_modules/lodash-es/toString.js +6 -5
  1293. package/dist/node_modules/lodash-es/union.js +9 -7
  1294. package/dist/node_modules/lodash-es/uniqBy.js +7 -6
  1295. package/dist/node_modules/lodash-es/uniqueId.js +8 -7
  1296. package/dist/node_modules/lodash-es/values.js +7 -6
  1297. package/dist/node_modules/lodash-es/zipObject.js +7 -6
  1298. package/dist/node_modules/longest-streak/index.js +4 -2
  1299. package/dist/node_modules/markdown-table/index.js +11 -9
  1300. package/dist/node_modules/marked/lib/marked.esm.js +687 -685
  1301. package/dist/node_modules/mdast-util-find-and-replace/lib/index.js +14 -12
  1302. package/dist/node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp/index.js +4 -2
  1303. package/dist/node_modules/mdast-util-from-markdown/lib/index.js +182 -180
  1304. package/dist/node_modules/mdast-util-gfm/lib/index.js +20 -18
  1305. package/dist/node_modules/mdast-util-gfm-autolink-literal/lib/index.js +69 -67
  1306. package/dist/node_modules/mdast-util-gfm-footnote/lib/index.js +47 -45
  1307. package/dist/node_modules/mdast-util-gfm-strikethrough/lib/index.js +15 -13
  1308. package/dist/node_modules/mdast-util-gfm-table/lib/index.js +30 -28
  1309. package/dist/node_modules/mdast-util-gfm-task-list-item/lib/index.js +16 -14
  1310. package/dist/node_modules/mdast-util-math/lib/index.js +15 -13
  1311. package/dist/node_modules/mdast-util-phrasing/lib/index.js +5 -3
  1312. package/dist/node_modules/mdast-util-to-hast/lib/footer.js +11 -9
  1313. package/dist/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +4 -2
  1314. package/dist/node_modules/mdast-util-to-hast/lib/handlers/break.js +4 -2
  1315. package/dist/node_modules/mdast-util-to-hast/lib/handlers/code.js +4 -2
  1316. package/dist/node_modules/mdast-util-to-hast/lib/handlers/delete.js +4 -2
  1317. package/dist/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +4 -2
  1318. package/dist/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +6 -4
  1319. package/dist/node_modules/mdast-util-to-hast/lib/handlers/heading.js +4 -2
  1320. package/dist/node_modules/mdast-util-to-hast/lib/handlers/html.js +4 -2
  1321. package/dist/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +8 -6
  1322. package/dist/node_modules/mdast-util-to-hast/lib/handlers/image.js +6 -4
  1323. package/dist/node_modules/mdast-util-to-hast/lib/handlers/index.js +55 -53
  1324. package/dist/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +4 -2
  1325. package/dist/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +8 -6
  1326. package/dist/node_modules/mdast-util-to-hast/lib/handlers/link.js +6 -4
  1327. package/dist/node_modules/mdast-util-to-hast/lib/handlers/list-item.js +15 -13
  1328. package/dist/node_modules/mdast-util-to-hast/lib/handlers/list.js +4 -2
  1329. package/dist/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +4 -2
  1330. package/dist/node_modules/mdast-util-to-hast/lib/handlers/root.js +4 -2
  1331. package/dist/node_modules/mdast-util-to-hast/lib/handlers/strong.js +4 -2
  1332. package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +4 -2
  1333. package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-row.js +4 -2
  1334. package/dist/node_modules/mdast-util-to-hast/lib/handlers/table.js +6 -4
  1335. package/dist/node_modules/mdast-util-to-hast/lib/handlers/text.js +6 -4
  1336. package/dist/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +4 -2
  1337. package/dist/node_modules/mdast-util-to-hast/lib/index.js +8 -6
  1338. package/dist/node_modules/mdast-util-to-hast/lib/revert.js +4 -2
  1339. package/dist/node_modules/mdast-util-to-hast/lib/state.js +61 -59
  1340. package/dist/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js +6 -4
  1341. package/dist/node_modules/mdast-util-to-markdown/lib/handle/break.js +6 -4
  1342. package/dist/node_modules/mdast-util-to-markdown/lib/handle/code.js +18 -16
  1343. package/dist/node_modules/mdast-util-to-markdown/lib/handle/definition.js +6 -4
  1344. package/dist/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js +14 -12
  1345. package/dist/node_modules/mdast-util-to-markdown/lib/handle/heading.js +8 -6
  1346. package/dist/node_modules/mdast-util-to-markdown/lib/handle/html.js +6 -4
  1347. package/dist/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js +6 -4
  1348. package/dist/node_modules/mdast-util-to-markdown/lib/handle/image.js +8 -6
  1349. package/dist/node_modules/mdast-util-to-markdown/lib/handle/index.js +43 -41
  1350. package/dist/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js +7 -5
  1351. package/dist/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js +6 -4
  1352. package/dist/node_modules/mdast-util-to-markdown/lib/handle/link.js +11 -9
  1353. package/dist/node_modules/mdast-util-to-markdown/lib/handle/list-item.js +7 -5
  1354. package/dist/node_modules/mdast-util-to-markdown/lib/handle/list.js +12 -10
  1355. package/dist/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js +4 -2
  1356. package/dist/node_modules/mdast-util-to-markdown/lib/handle/root.js +6 -4
  1357. package/dist/node_modules/mdast-util-to-markdown/lib/handle/strong.js +14 -12
  1358. package/dist/node_modules/mdast-util-to-markdown/lib/handle/text.js +4 -2
  1359. package/dist/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js +7 -5
  1360. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js +4 -2
  1361. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js +6 -4
  1362. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js +4 -2
  1363. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js +4 -2
  1364. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-fence.js +4 -2
  1365. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js +4 -2
  1366. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-quote.js +4 -2
  1367. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js +4 -2
  1368. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule.js +4 -2
  1369. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-strong.js +4 -2
  1370. package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js +4 -2
  1371. package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-info.js +6 -4
  1372. package/dist/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js +4 -2
  1373. package/dist/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js +8 -7
  1374. package/dist/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js +6 -4
  1375. package/dist/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js +6 -4
  1376. package/dist/node_modules/mdast-util-to-string/lib/index.js +14 -12
  1377. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-Q4EWVU46.js +695 -0
  1378. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-DXYQGD6D.js +3038 -0
  1379. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{c4Diagram-YG6GDRKO.js → c4Diagram-AHTNJAMY.js} +581 -573
  1380. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-336JU56O.js +49 -0
  1381. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-426QAEUC.js +11 -0
  1382. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-4BX2VUAB.js +6 -4
  1383. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-B4BG7PRW.js → chunk-4TB4RGXK.js} +590 -444
  1384. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-55IACEB6.js +7 -5
  1385. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5FUZZQ4R.js +3640 -0
  1386. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5PVQY5BW.js +342 -0
  1387. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-AGHRB4JF.js +22 -20
  1388. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-BSJP7CBP.js +82 -0
  1389. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-EDXVE4YY.js +25 -0
  1390. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ENJZ2VHE.js +570 -0
  1391. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-FMBD7UC4.js +5 -3
  1392. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ICPOFSXX.js +2348 -0
  1393. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-OYMX7WX6.js +2014 -0
  1394. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QZHKN3VN.js +8 -4
  1395. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-U2HBQHQK.js +274 -0
  1396. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-X2U36JSP.js +67 -0
  1397. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-XPW4576I.js +1146 -0
  1398. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-YZCP3GAM.js +62 -0
  1399. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ZZ45TVLE.js +32 -0
  1400. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-6PBFFD2Q.js +29 -0
  1401. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-HSJHXN6E.js +29 -0
  1402. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/cose-bilkent-S5V4N54A.js +116 -114
  1403. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/dagre-KV5264BT.js +265 -0
  1404. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-5BDNPKRD.js +101 -0
  1405. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-G4DWMVQ6.js +284 -0
  1406. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-MMDJMWI5.js +213 -0
  1407. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-TYMM5635.js +133 -0
  1408. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{erDiagram-Q2GNP2WA.js → erDiagram-SMLLAGMA.js} +549 -445
  1409. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{flowDiagram-NV44I4VS.js → flowDiagram-DWJPFMVM.js} +1366 -1345
  1410. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-T4ZO3ILL.js +1720 -0
  1411. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-UUTBAWPF.js +730 -0
  1412. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-42DDH7IO.js +19 -0
  1413. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ishikawaDiagram-UXIWVN3A.js +718 -0
  1414. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-VCZTEJTY.js +885 -0
  1415. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{kanban-definition-3W4ZIXB7.js → kanban-definition-6JOO6SKY.js} +124 -118
  1416. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{mindmap-definition-VGOIOE7T.js → mindmap-definition-QFDTVHPH.js} +172 -122
  1417. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-DEJITSTG.js +119 -0
  1418. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{quadrantDiagram-AYHSOK5B.js → quadrantDiagram-34T5L4WZ.js} +279 -273
  1419. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{requirementDiagram-UZGBJVZJ.js → requirementDiagram-MS252O5E.js} +100 -66
  1420. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-XADWPNL6.js +529 -0
  1421. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-FGHM5R23.js +4159 -0
  1422. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-FHFEXIEX.js +222 -0
  1423. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-QKLJ7IA2.js +27 -0
  1424. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-GMOUNBTQ.js +1073 -0
  1425. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-DHZGUBPP.js +961 -0
  1426. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-NUSXRM2D.js +578 -0
  1427. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/xychartDiagram-5P7HB3ND.js +2000 -0
  1428. package/dist/node_modules/mermaid/dist/mermaid.core.js +492 -445
  1429. package/dist/node_modules/micromark/lib/constructs.js +80 -79
  1430. package/dist/node_modules/micromark/lib/create-tokenizer.js +14 -12
  1431. package/dist/node_modules/micromark/lib/initialize/content.js +9 -7
  1432. package/dist/node_modules/micromark/lib/initialize/document.js +15 -14
  1433. package/dist/node_modules/micromark/lib/initialize/flow.js +9 -7
  1434. package/dist/node_modules/micromark/lib/initialize/text.js +8 -6
  1435. package/dist/node_modules/micromark/lib/parse.js +20 -18
  1436. package/dist/node_modules/micromark/lib/postprocess.js +6 -4
  1437. package/dist/node_modules/micromark/lib/preprocess.js +6 -4
  1438. package/dist/node_modules/micromark-core-commonmark/lib/attention.js +20 -18
  1439. package/dist/node_modules/micromark-core-commonmark/lib/autolink.js +17 -15
  1440. package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js +11 -9
  1441. package/dist/node_modules/micromark-core-commonmark/lib/block-quote.js +15 -13
  1442. package/dist/node_modules/micromark-core-commonmark/lib/character-escape.js +8 -6
  1443. package/dist/node_modules/micromark-core-commonmark/lib/character-reference.js +16 -14
  1444. package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.js +22 -21
  1445. package/dist/node_modules/micromark-core-commonmark/lib/code-indented.js +16 -15
  1446. package/dist/node_modules/micromark-core-commonmark/lib/code-text.js +13 -11
  1447. package/dist/node_modules/micromark-core-commonmark/lib/content.js +18 -17
  1448. package/dist/node_modules/micromark-core-commonmark/lib/definition.js +30 -29
  1449. package/dist/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +8 -6
  1450. package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.js +15 -13
  1451. package/dist/node_modules/micromark-core-commonmark/lib/html-flow.js +68 -67
  1452. package/dist/node_modules/micromark-core-commonmark/lib/html-text.js +66 -64
  1453. package/dist/node_modules/micromark-core-commonmark/lib/label-end.js +112 -111
  1454. package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.js +8 -6
  1455. package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.js +8 -6
  1456. package/dist/node_modules/micromark-core-commonmark/lib/line-ending.js +8 -6
  1457. package/dist/node_modules/micromark-core-commonmark/lib/list.js +32 -31
  1458. package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.js +12 -10
  1459. package/dist/node_modules/micromark-core-commonmark/lib/thematic-break.js +11 -9
  1460. package/dist/node_modules/micromark-extension-gfm/index.js +16 -14
  1461. package/dist/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js +122 -120
  1462. package/dist/node_modules/micromark-extension-gfm-footnote/lib/syntax.js +33 -31
  1463. package/dist/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js +11 -9
  1464. package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.js +6 -4
  1465. package/dist/node_modules/micromark-extension-gfm-table/lib/infer.js +4 -2
  1466. package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.js +36 -34
  1467. package/dist/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js +20 -18
  1468. package/dist/node_modules/micromark-extension-math/lib/math-flow.js +21 -20
  1469. package/dist/node_modules/micromark-extension-math/lib/math-text.js +11 -9
  1470. package/dist/node_modules/micromark-extension-math/lib/syntax.js +8 -6
  1471. package/dist/node_modules/micromark-factory-destination/index.js +10 -8
  1472. package/dist/node_modules/micromark-factory-label/index.js +7 -5
  1473. package/dist/node_modules/micromark-factory-space/index.js +7 -5
  1474. package/dist/node_modules/micromark-factory-title/index.js +8 -6
  1475. package/dist/node_modules/micromark-factory-whitespace/index.js +7 -5
  1476. package/dist/node_modules/micromark-util-character/index.js +14 -12
  1477. package/dist/node_modules/micromark-util-chunked/index.js +6 -4
  1478. package/dist/node_modules/micromark-util-classify-character/index.js +7 -5
  1479. package/dist/node_modules/micromark-util-combine-extensions/index.js +13 -11
  1480. package/dist/node_modules/micromark-util-decode-numeric-character-reference/index.js +4 -2
  1481. package/dist/node_modules/micromark-util-decode-string/index.js +11 -9
  1482. package/dist/node_modules/micromark-util-html-tag-name/index.js +4 -2
  1483. package/dist/node_modules/micromark-util-normalize-identifier/index.js +4 -2
  1484. package/dist/node_modules/micromark-util-resolve-all/index.js +4 -2
  1485. package/dist/node_modules/micromark-util-sanitize-uri/index.js +6 -4
  1486. package/dist/node_modules/micromark-util-subtokenize/index.js +10 -8
  1487. package/dist/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +10 -8
  1488. package/dist/node_modules/motion/dist/es/react.js +2 -2
  1489. package/dist/node_modules/nanoid/index.browser.js +6 -4
  1490. package/dist/node_modules/nanoid/url-alphabet/index.js +4 -2
  1491. package/dist/node_modules/property-information/index.js +25 -23
  1492. package/dist/node_modules/property-information/lib/aria.js +41 -39
  1493. package/dist/node_modules/property-information/lib/find.js +18 -16
  1494. package/dist/node_modules/property-information/lib/hast-to-react.js +4 -2
  1495. package/dist/node_modules/property-information/lib/html.js +96 -94
  1496. package/dist/node_modules/property-information/lib/normalize.js +4 -2
  1497. package/dist/node_modules/property-information/lib/svg.js +79 -77
  1498. package/dist/node_modules/property-information/lib/util/case-insensitive-transform.js +6 -4
  1499. package/dist/node_modules/property-information/lib/util/case-sensitive-transform.js +4 -2
  1500. package/dist/node_modules/property-information/lib/util/create.js +10 -8
  1501. package/dist/node_modules/property-information/lib/util/defined-info.js +13 -11
  1502. package/dist/node_modules/property-information/lib/util/info.js +5 -3
  1503. package/dist/node_modules/property-information/lib/util/merge.js +6 -4
  1504. package/dist/node_modules/property-information/lib/util/schema.js +5 -3
  1505. package/dist/node_modules/property-information/lib/util/types.js +15 -14
  1506. package/dist/node_modules/property-information/lib/xlink.js +5 -3
  1507. package/dist/node_modules/property-information/lib/xml.js +5 -3
  1508. package/dist/node_modules/property-information/lib/xmlns.js +7 -5
  1509. package/dist/node_modules/rehype-harden/dist/index.js +47 -45
  1510. package/dist/node_modules/rehype-katex/lib/index.js +25 -23
  1511. package/dist/node_modules/rehype-raw/lib/index.js +6 -4
  1512. package/dist/node_modules/rehype-sanitize/lib/index.js +6 -4
  1513. package/dist/node_modules/remark-gfm/lib/index.js +9 -7
  1514. package/dist/node_modules/remark-math/lib/index.js +9 -7
  1515. package/dist/node_modules/remark-parse/lib/index.js +6 -4
  1516. package/dist/node_modules/remark-rehype/lib/index.js +7 -5
  1517. package/dist/node_modules/remend/dist/index.js +368 -297
  1518. package/dist/node_modules/roughjs/bundled/rough.esm.js +877 -875
  1519. package/dist/node_modules/shiki/dist/bundle-full.js +13 -11
  1520. package/dist/node_modules/shiki/dist/chunk-CtajNgzt.js +17 -0
  1521. package/dist/node_modules/shiki/dist/engine-oniguruma.js +7 -0
  1522. package/dist/node_modules/shiki/dist/{langs.js → langs-bundle-full-DfKZStlK.js} +8 -6
  1523. package/dist/node_modules/shiki/dist/themes.js +6 -4
  1524. package/dist/node_modules/shiki/dist/wasm.js +2 -2
  1525. package/dist/node_modules/space-separated-tokens/index.js +5 -3
  1526. package/dist/node_modules/streamdown/dist/chunk-BO2N2NFS.js +2500 -0
  1527. package/dist/node_modules/streamdown/dist/highlighted-body-OFNGDK62.js +37 -0
  1528. package/dist/node_modules/streamdown/dist/index.js +1 -1
  1529. package/dist/node_modules/streamdown/dist/mermaid-GHXKKRXX.js +3 -0
  1530. package/dist/node_modules/streamdown/node_modules/marked/lib/marked.esm.js +701 -699
  1531. package/dist/node_modules/stringify-entities/lib/constant/dangerous.js +4 -2
  1532. package/dist/node_modules/stringify-entities/lib/core.js +18 -16
  1533. package/dist/node_modules/stringify-entities/lib/index.js +7 -5
  1534. package/dist/node_modules/stringify-entities/lib/util/format-smart.js +10 -8
  1535. package/dist/node_modules/stringify-entities/lib/util/to-decimal.js +6 -4
  1536. package/dist/node_modules/stringify-entities/lib/util/to-hexadecimal.js +6 -4
  1537. package/dist/node_modules/stringify-entities/lib/util/to-named.js +14 -12
  1538. package/dist/node_modules/style-to-js/cjs/index.js +9 -7
  1539. package/dist/node_modules/style-to-js/cjs/utilities.js +6 -4
  1540. package/dist/node_modules/style-to-object/cjs/index.js +8 -6
  1541. package/dist/node_modules/stylis/src/Enum.js +4 -2
  1542. package/dist/node_modules/stylis/src/Parser.js +38 -36
  1543. package/dist/node_modules/stylis/src/Serializer.js +17 -15
  1544. package/dist/node_modules/stylis/src/Tokenizer.js +53 -51
  1545. package/dist/node_modules/stylis/src/Utility.js +17 -15
  1546. package/dist/node_modules/trim-lines/index.js +10 -8
  1547. package/dist/node_modules/trough/lib/index.js +6 -4
  1548. package/dist/node_modules/ts-dedent/esm/index.js +4 -2
  1549. package/dist/node_modules/unified/lib/callable-instance.js +4 -2
  1550. package/dist/node_modules/unified/lib/index.js +102 -101
  1551. package/dist/node_modules/unified/node_modules/is-plain-obj/index.js +4 -2
  1552. package/dist/node_modules/unist-util-find-after/lib/index.js +6 -4
  1553. package/dist/node_modules/unist-util-is/lib/index.js +31 -29
  1554. package/dist/node_modules/unist-util-position/lib/index.js +7 -5
  1555. package/dist/node_modules/unist-util-stringify-position/lib/index.js +10 -8
  1556. package/dist/node_modules/unist-util-visit/lib/index.js +6 -4
  1557. package/dist/node_modules/unist-util-visit-parents/lib/color.js +4 -2
  1558. package/dist/node_modules/unist-util-visit-parents/lib/index.js +21 -20
  1559. package/dist/node_modules/uuid/dist/esm-browser/native.js +3 -2
  1560. package/dist/node_modules/uuid/dist/esm-browser/rng.js +8 -6
  1561. package/dist/node_modules/uuid/dist/esm-browser/stringify.js +7 -5
  1562. package/dist/node_modules/uuid/dist/esm-browser/v4.js +10 -9
  1563. package/dist/node_modules/vaul/dist/index.js +276 -274
  1564. package/dist/node_modules/vfile/lib/index.js +44 -42
  1565. package/dist/node_modules/vfile/lib/minpath.browser.js +22 -20
  1566. package/dist/node_modules/vfile/lib/minproc.browser.js +5 -3
  1567. package/dist/node_modules/vfile/lib/minurl.browser.js +8 -6
  1568. package/dist/node_modules/vfile/lib/minurl.shared.js +4 -2
  1569. package/dist/node_modules/vfile-location/lib/index.js +7 -5
  1570. package/dist/node_modules/vfile-message/lib/index.js +7 -5
  1571. package/dist/node_modules/vscode-jsonrpc/browser.js +8 -6
  1572. package/dist/node_modules/vscode-jsonrpc/lib/browser/main.js +11 -9
  1573. package/dist/node_modules/vscode-jsonrpc/lib/browser/ril.js +8 -6
  1574. package/dist/node_modules/vscode-jsonrpc/lib/common/api.js +28 -26
  1575. package/dist/node_modules/vscode-jsonrpc/lib/common/cancellation.js +17 -15
  1576. package/dist/node_modules/vscode-jsonrpc/lib/common/connection.js +13 -11
  1577. package/dist/node_modules/vscode-jsonrpc/lib/common/disposable.js +6 -4
  1578. package/dist/node_modules/vscode-jsonrpc/lib/common/events.js +8 -6
  1579. package/dist/node_modules/vscode-jsonrpc/lib/common/is.js +6 -4
  1580. package/dist/node_modules/vscode-jsonrpc/lib/common/linkedMap.js +6 -4
  1581. package/dist/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js +6 -4
  1582. package/dist/node_modules/vscode-jsonrpc/lib/common/messageReader.js +11 -9
  1583. package/dist/node_modules/vscode-jsonrpc/lib/common/messageWriter.js +31 -29
  1584. package/dist/node_modules/vscode-jsonrpc/lib/common/messages.js +8 -6
  1585. package/dist/node_modules/vscode-jsonrpc/lib/common/ral.js +6 -4
  1586. package/dist/node_modules/vscode-jsonrpc/lib/common/semaphore.js +8 -6
  1587. package/dist/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +8 -6
  1588. package/dist/node_modules/vscode-languageserver-protocol/lib/browser/main.js +10 -8
  1589. package/dist/node_modules/vscode-languageserver-protocol/lib/common/api.js +23 -21
  1590. package/dist/node_modules/vscode-languageserver-protocol/lib/common/connection.js +8 -6
  1591. package/dist/node_modules/vscode-languageserver-protocol/lib/common/messages.js +8 -6
  1592. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js +8 -6
  1593. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js +8 -6
  1594. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js +8 -6
  1595. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js +8 -6
  1596. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js +14 -12
  1597. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js +8 -6
  1598. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js +8 -6
  1599. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js +8 -6
  1600. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js +8 -6
  1601. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js +8 -6
  1602. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js +8 -6
  1603. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.js +55 -53
  1604. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js +8 -6
  1605. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js +8 -6
  1606. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js +10 -8
  1607. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js +12 -10
  1608. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js +8 -6
  1609. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js +8 -6
  1610. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js +8 -6
  1611. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js +8 -6
  1612. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js +8 -6
  1613. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js +8 -6
  1614. package/dist/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js +6 -4
  1615. package/dist/node_modules/vscode-languageserver-textdocument/lib/esm/main.js +21 -19
  1616. package/dist/node_modules/vscode-languageserver-types/lib/esm/main.js +849 -847
  1617. package/dist/node_modules/vscode-uri/lib/esm/index.js +6 -4
  1618. package/dist/node_modules/web-namespaces/index.js +4 -2
  1619. package/dist/node_modules/zwitch/index.js +7 -5
  1620. package/dist/packages/contracts/dist/enums/index.js +14 -12
  1621. package/dist/packages/contracts/dist/enums/registry.enum.js +6 -4
  1622. package/dist/packages/contracts/dist/enums/sort-order.enum.js +6 -4
  1623. package/dist/packages/contracts/dist/enums/user-type.enum.js +6 -4
  1624. package/dist/packages/contracts/dist/enums/workflow-state.enum.js +6 -4
  1625. package/dist/pages/DashboardPage.js +55 -99
  1626. package/dist/pages/DebugPage.js +12 -17
  1627. package/dist/pages/DebugWorkflowDetailsPage.js +91 -119
  1628. package/dist/pages/DebugWorkflowsPage.js +39 -37
  1629. package/dist/pages/EmbedWorkbenchPage.js +48 -62
  1630. package/dist/pages/PreviewWorkbenchPage.js +243 -324
  1631. package/dist/pages/RunsListPage.js +44 -61
  1632. package/dist/pages/RunsPage.js +31 -48
  1633. package/dist/pages/StudioLandingPage.js +97 -132
  1634. package/dist/pages/WorkbenchPage.js +56 -86
  1635. package/dist/pages/WorkflowDebugPage.js +74 -110
  1636. package/dist/pages/WorkspacePage.js +72 -115
  1637. package/dist/pages/WorkspaceRunsPage.js +43 -70
  1638. package/dist/pages/WorkspacesPage.js +24 -35
  1639. package/dist/providers/ComponentOverridesProvider.js +9 -12
  1640. package/dist/providers/InvalidationEventsProvider.js +33 -35
  1641. package/dist/providers/QueryProvider.js +14 -18
  1642. package/dist/providers/SseProvider.js +28 -29
  1643. package/dist/providers/StudioProvider.js +14 -19
  1644. package/dist/routing/LocalRouter.js +6 -9
  1645. package/dist/services/createApiClient.js +7 -5
  1646. package/dist/services/eventEmitter.js +3 -2
  1647. package/dist/services/index.js +2 -2
  1648. package/dist/types/ai.types.js +7 -5
  1649. package/package.json +33 -33
  1650. package/dist/_virtual/rolldown_runtime.js +0 -20
  1651. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/architecture-7HQA4BMR.js +0 -3
  1652. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-4F5CHEZ2.js +0 -23
  1653. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-B2363JML.js +0 -60
  1654. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FRFDVMJY.js +0 -23
  1655. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-PL6DKKU2.js +0 -28
  1656. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-SJTYNZTY.js +0 -23
  1657. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-TCCFYFTB.js +0 -787
  1658. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-TQ3KTPDO.js +0 -23
  1659. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-UMXZTB3W.js +0 -30
  1660. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/gitGraph-G5XIXVHT.js +0 -3
  1661. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-VBDWY6EO.js +0 -3
  1662. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-DYOGHKS2.js +0 -3
  1663. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-VRWISCQL.js +0 -3
  1664. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-ZZBFDIW7.js +0 -3
  1665. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-GDKQZRPO.js +0 -3
  1666. package/dist/node_modules/@ungap/structured-clone/esm/types.js +0 -2
  1667. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/context_assist.js +0 -16
  1668. package/dist/node_modules/langium/lib/index.js +0 -182
  1669. package/dist/node_modules/langium/lib/parser/indentation-aware.js +0 -141
  1670. package/dist/node_modules/langium/lib/utils/index.js +0 -53
  1671. package/dist/node_modules/langium/lib/workspace/profiler.js +0 -89
  1672. package/dist/node_modules/lodash/_Symbol.js +0 -7
  1673. package/dist/node_modules/lodash/_baseGetTag.js +0 -13
  1674. package/dist/node_modules/lodash/_baseTrim.js +0 -11
  1675. package/dist/node_modules/lodash/_freeGlobal.js +0 -6
  1676. package/dist/node_modules/lodash/_getRawTag.js +0 -17
  1677. package/dist/node_modules/lodash/_objectToString.js +0 -10
  1678. package/dist/node_modules/lodash/_root.js +0 -8
  1679. package/dist/node_modules/lodash/_trimmedEndIndex.js +0 -11
  1680. package/dist/node_modules/lodash/isObject.js +0 -10
  1681. package/dist/node_modules/lodash/isObjectLike.js +0 -9
  1682. package/dist/node_modules/lodash/isSymbol.js +0 -12
  1683. package/dist/node_modules/lodash/now.js +0 -10
  1684. package/dist/node_modules/lodash/toNumber.js +0 -22
  1685. package/dist/node_modules/lodash-es/_arrayAggregator.js +0 -9
  1686. package/dist/node_modules/lodash-es/_arrayEvery.js +0 -6
  1687. package/dist/node_modules/lodash-es/_baseAggregator.js +0 -8
  1688. package/dist/node_modules/lodash-es/_baseDifference.js +0 -22
  1689. package/dist/node_modules/lodash-es/_baseEvery.js +0 -9
  1690. package/dist/node_modules/lodash-es/_baseIsRegExp.js +0 -8
  1691. package/dist/node_modules/lodash-es/_baseSlice.js +0 -8
  1692. package/dist/node_modules/lodash-es/_baseSome.js +0 -9
  1693. package/dist/node_modules/lodash-es/_createAggregator.js +0 -12
  1694. package/dist/node_modules/lodash-es/assign.js +0 -14
  1695. package/dist/node_modules/lodash-es/compact.js +0 -9
  1696. package/dist/node_modules/lodash-es/difference.js +0 -8
  1697. package/dist/node_modules/lodash-es/drop.js +0 -8
  1698. package/dist/node_modules/lodash-es/dropRight.js +0 -8
  1699. package/dist/node_modules/lodash-es/every.js +0 -11
  1700. package/dist/node_modules/lodash-es/groupBy.js +0 -6
  1701. package/dist/node_modules/lodash-es/head.js +0 -5
  1702. package/dist/node_modules/lodash-es/includes.js +0 -13
  1703. package/dist/node_modules/lodash-es/indexOf.js +0 -11
  1704. package/dist/node_modules/lodash-es/isRegExp.js +0 -5
  1705. package/dist/node_modules/lodash-es/negate.js +0 -16
  1706. package/dist/node_modules/lodash-es/pickBy.js +0 -15
  1707. package/dist/node_modules/lodash-es/reject.js +0 -10
  1708. package/dist/node_modules/lodash-es/some.js +0 -11
  1709. package/dist/node_modules/lodash-es/uniq.js +0 -6
  1710. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-VXUJARFQ.js +0 -673
  1711. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-VD42YOAC.js +0 -3010
  1712. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ABZYJK2D.js +0 -1547
  1713. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ATLVNIR6.js +0 -65
  1714. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-CVBHYZKI.js +0 -10
  1715. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-DI55MBZ5.js +0 -1994
  1716. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-DR5Q36YT.js +0 -135
  1717. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-EXTU4WIE.js +0 -9
  1718. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-HN2XXSSU.js +0 -74
  1719. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JA3XYJ7Z.js +0 -247
  1720. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JZLCHNYA.js +0 -3516
  1721. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-MI3HLSF2.js +0 -1140
  1722. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-N4CR4FBY.js +0 -39
  1723. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QN33PNHL.js +0 -23
  1724. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QXUST7PY.js +0 -497
  1725. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-S3R3BYOJ.js +0 -338
  1726. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-TZMSLE5B.js +0 -55
  1727. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-2ON5EDUG.js +0 -26
  1728. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-WZHVMYZB.js +0 -26
  1729. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/dagre-6UL2VRFP.js +0 -263
  1730. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-PSM6KHXK.js +0 -283
  1731. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-QEK2KX5R.js +0 -211
  1732. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-S2PKOQOG.js +0 -129
  1733. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-JELNMOA3.js +0 -1688
  1734. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-V2S2FVAM.js +0 -621
  1735. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-HS3SLOUP.js +0 -18
  1736. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-XKPGCS4Q.js +0 -883
  1737. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-ADFJNKIX.js +0 -117
  1738. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-TZEHDZUN.js +0 -519
  1739. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-WL72ISMW.js +0 -3560
  1740. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-FKZM4ZOC.js +0 -220
  1741. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-4FDKWEC3.js +0 -25
  1742. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-IT6M3QCI.js +0 -833
  1743. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/xychartDiagram-PRI3JC2R.js +0 -1975
  1744. package/dist/node_modules/streamdown/dist/chunk-RLXIAIE6.js +0 -2189
  1745. package/dist/node_modules/streamdown/dist/highlighted-body-B3W2YXNL.js +0 -33
  1746. package/dist/node_modules/streamdown/dist/mermaid-3ZIDBTTL.js +0 -3
@@ -1,12 +1,13 @@
1
- import select_default from "../../../../d3-selection/src/select.js";
2
- import pointer_default from "../../../../d3-selection/src/pointer.js";
3
- import drag_default from "../../../../d3-drag/src/drag.js";
4
- import value_default from "../../../../d3-interpolate/src/value.js";
5
- import zoom_default$1 from "../../../../d3-interpolate/src/zoom.js";
6
- import transform, { identity } from "../../../../d3-zoom/src/transform.js";
7
- import zoom_default from "../../../../d3-zoom/src/zoom.js";
1
+ import e from "../../../../d3-selection/src/select.js";
2
+ import t from "../../../../d3-selection/src/pointer.js";
3
+ import n from "../../../../d3-drag/src/drag.js";
4
+ import r from "../../../../d3-interpolate/src/value.js";
5
+ import i from "../../../../d3-interpolate/src/zoom.js";
6
+ import a, { identity as o } from "../../../../d3-zoom/src/transform.js";
7
+ import s from "../../../../d3-zoom/src/zoom.js";
8
8
  import "../../../../d3-zoom/src/index.js";
9
- var errorMessages = {
9
+ //#region ../../node_modules/@xyflow/system/dist/esm/index.js
10
+ var c = {
10
11
  error001: () => "[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",
11
12
  error002: () => "It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",
12
13
  error003: (e) => `Node type "${e}" not found. Using fallback type "default".`,
@@ -15,21 +16,21 @@ var errorMessages = {
15
16
  error006: () => "Can't create edge. An edge needs a source and a target.",
16
17
  error007: (e) => `The old edge with id=${e} does not exist.`,
17
18
  error009: (e) => `Marker type "${e}" doesn't exist.`,
18
- error008: (e, { id: s, sourceHandle: c, targetHandle: l }) => `Couldn't create edge for ${e} handle id: "${e === "source" ? c : l}", edge id: ${s}.`,
19
+ error008: (e, { id: t, sourceHandle: n, targetHandle: r }) => `Couldn't create edge for ${e} handle id: "${e === "source" ? n : r}", edge id: ${t}.`,
19
20
  error010: () => "Handle: No node id found. Make sure to only use a Handle inside a custom Node.",
20
21
  error011: (e) => `Edge type "${e}" not found. Using fallback type "default".`,
21
22
  error012: (e) => `Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,
22
23
  error013: (e = "react") => `It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,
23
24
  error014: () => "useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",
24
25
  error015: () => "It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."
25
- }, infiniteExtent = [[-Infinity, -Infinity], [Infinity, Infinity]], elementSelectionKeys = [
26
+ }, l = [[-Infinity, -Infinity], [Infinity, Infinity]], u = [
26
27
  "Enter",
27
28
  " ",
28
29
  "Escape"
29
- ], defaultAriaLabelConfig = {
30
+ ], d = {
30
31
  "node.a11yDescription.default": "Press enter or space to select a node. Press delete to remove it and escape to cancel.",
31
32
  "node.a11yDescription.keyboardDisabled": "Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.",
32
- "node.a11yDescription.ariaLiveMessage": ({ direction: e, x: s, y: c }) => `Moved selected node ${e}. New position, x: ${s}, y: ${c}`,
33
+ "node.a11yDescription.ariaLiveMessage": ({ direction: e, x: t, y: n }) => `Moved selected node ${e}. New position, x: ${t}, y: ${n}`,
33
34
  "edge.a11yDescription.default": "Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.",
34
35
  "controls.ariaLabel": "Control Panel",
35
36
  "controls.zoomIn.ariaLabel": "Zoom In",
@@ -38,19 +39,19 @@ var errorMessages = {
38
39
  "controls.interactive.ariaLabel": "Toggle Interactivity",
39
40
  "minimap.ariaLabel": "Mini Map",
40
41
  "handle.ariaLabel": "Handle"
41
- }, ConnectionMode;
42
+ }, f;
42
43
  (function(e) {
43
44
  e.Strict = "strict", e.Loose = "loose";
44
- })(ConnectionMode ||= {});
45
- var PanOnScrollMode;
45
+ })(f ||= {});
46
+ var p;
46
47
  (function(e) {
47
48
  e.Free = "free", e.Vertical = "vertical", e.Horizontal = "horizontal";
48
- })(PanOnScrollMode ||= {});
49
- var SelectionMode;
49
+ })(p ||= {});
50
+ var m;
50
51
  (function(e) {
51
52
  e.Partial = "partial", e.Full = "full";
52
- })(SelectionMode ||= {});
53
- var initialConnection = {
53
+ })(m ||= {});
54
+ var h = {
54
55
  inProgress: !1,
55
56
  isValid: null,
56
57
  from: null,
@@ -62,41 +63,41 @@ var initialConnection = {
62
63
  toPosition: null,
63
64
  toNode: null,
64
65
  pointer: null
65
- }, ConnectionLineType;
66
+ }, g;
66
67
  (function(e) {
67
68
  e.Bezier = "default", e.Straight = "straight", e.Step = "step", e.SmoothStep = "smoothstep", e.SimpleBezier = "simplebezier";
68
- })(ConnectionLineType ||= {});
69
- var MarkerType;
69
+ })(g ||= {});
70
+ var _;
70
71
  (function(e) {
71
72
  e.Arrow = "arrow", e.ArrowClosed = "arrowclosed";
72
- })(MarkerType ||= {});
73
- var Position;
73
+ })(_ ||= {});
74
+ var v;
74
75
  (function(e) {
75
76
  e.Left = "left", e.Top = "top", e.Right = "right", e.Bottom = "bottom";
76
- })(Position ||= {});
77
- var oppositePosition = {
78
- [Position.Left]: Position.Right,
79
- [Position.Right]: Position.Left,
80
- [Position.Top]: Position.Bottom,
81
- [Position.Bottom]: Position.Top
77
+ })(v ||= {});
78
+ var y = {
79
+ [v.Left]: v.Right,
80
+ [v.Right]: v.Left,
81
+ [v.Top]: v.Bottom,
82
+ [v.Bottom]: v.Top
82
83
  };
83
- function getConnectionStatus(e) {
84
+ function b(e) {
84
85
  return e === null ? null : e ? "valid" : "invalid";
85
86
  }
86
- var isEdgeBase = (e) => "id" in e && "source" in e && "target" in e, isNodeBase = (e) => "id" in e && "position" in e && !("source" in e) && !("target" in e), isInternalNodeBase = (e) => "id" in e && "internals" in e && !("source" in e) && !("target" in e), getNodePositionWithOrigin = (e, s = [0, 0]) => {
87
- let { width: c, height: l } = getNodeDimensions(e), u = e.origin ?? s, d = c * u[0], f = l * u[1];
87
+ var x = (e) => "id" in e && "source" in e && "target" in e, S = (e) => "id" in e && "position" in e && !("source" in e) && !("target" in e), C = (e) => "id" in e && "internals" in e && !("source" in e) && !("target" in e), w = (e, t = [0, 0]) => {
88
+ let { width: n, height: r } = J(e), i = e.origin ?? t, a = n * i[0], o = r * i[1];
88
89
  return {
89
- x: e.position.x - d,
90
- y: e.position.y - f
90
+ x: e.position.x - a,
91
+ y: e.position.y - o
91
92
  };
92
- }, getNodesBounds = (e, s = { nodeOrigin: [0, 0] }) => (process.env.NODE_ENV === "development" && !s.nodeLookup && console.warn("Please use `getNodesBounds` from `useReactFlow`/`useSvelteFlow` hook to ensure correct values for sub flows. If not possible, you have to provide a nodeLookup to support sub flows."), e.length === 0 ? {
93
+ }, T = (e, t = { nodeOrigin: [0, 0] }) => (process.env.NODE_ENV === "development" && !t.nodeLookup && console.warn("Please use `getNodesBounds` from `useReactFlow`/`useSvelteFlow` hook to ensure correct values for sub flows. If not possible, you have to provide a nodeLookup to support sub flows."), e.length === 0 ? {
93
94
  x: 0,
94
95
  y: 0,
95
96
  width: 0,
96
97
  height: 0
97
- } : boxToRect(e.reduce((e, c) => {
98
- let l = typeof c == "string", u = !s.nodeLookup && !l ? c : void 0;
99
- return s.nodeLookup && (u = l ? s.nodeLookup.get(c) : isInternalNodeBase(c) ? c : s.nodeLookup.get(c.id)), getBoundsOfBoxes(e, u ? nodeToBox(u, s.nodeOrigin) : {
98
+ } : R(e.reduce((e, n) => {
99
+ let r = typeof n == "string", i = !t.nodeLookup && !r ? n : void 0;
100
+ return t.nodeLookup && (i = r ? t.nodeLookup.get(n) : C(n) ? n : t.nodeLookup.get(n.id)), te(e, i ? ne(i, t.nodeOrigin) : {
100
101
  x: 0,
101
102
  y: 0,
102
103
  x2: 0,
@@ -107,201 +108,201 @@ var isEdgeBase = (e) => "id" in e && "source" in e && "target" in e, isNodeBase
107
108
  y: Infinity,
108
109
  x2: -Infinity,
109
110
  y2: -Infinity
110
- }))), getInternalNodesBounds = (e, s = {}) => {
111
- let c = {
111
+ }))), E = (e, t = {}) => {
112
+ let n = {
112
113
  x: Infinity,
113
114
  y: Infinity,
114
115
  x2: -Infinity,
115
116
  y2: -Infinity
116
- }, l = !1;
117
+ }, r = !1;
117
118
  return e.forEach((e) => {
118
- (s.filter === void 0 || s.filter(e)) && (c = getBoundsOfBoxes(c, nodeToBox(e)), l = !0);
119
- }), l ? boxToRect(c) : {
119
+ (t.filter === void 0 || t.filter(e)) && (n = te(n, ne(e)), r = !0);
120
+ }), r ? R(n) : {
120
121
  x: 0,
121
122
  y: 0,
122
123
  width: 0,
123
124
  height: 0
124
125
  };
125
- }, getNodesInside = (e, s, [c, l, u] = [
126
+ }, D = (e, t, [n, r, i] = [
126
127
  0,
127
128
  0,
128
129
  1
129
- ], d = !1, f = !1) => {
130
- let p = {
131
- ...pointToRendererPoint(s, [
132
- c,
133
- l,
134
- u
130
+ ], a = !1, o = !1) => {
131
+ let s = {
132
+ ...re(t, [
133
+ n,
134
+ r,
135
+ i
135
136
  ]),
136
- width: s.width / u,
137
- height: s.height / u
138
- }, m = [];
139
- for (let s of e.values()) {
140
- let { measured: e, selectable: c = !0, hidden: l = !1 } = s;
141
- if (f && !c || l) continue;
142
- let u = e.width ?? s.width ?? s.initialWidth ?? null, h = e.height ?? s.height ?? s.initialHeight ?? null, g = getOverlappingArea(p, nodeToRect(s)), _ = (u ?? 0) * (h ?? 0), v = d && g > 0;
143
- (!s.internals.handleBounds || v || g >= _ || s.dragging) && m.push(s);
137
+ width: t.width / i,
138
+ height: t.height / i
139
+ }, c = [];
140
+ for (let t of e.values()) {
141
+ let { measured: e, selectable: n = !0, hidden: r = !1 } = t;
142
+ if (o && !n || r) continue;
143
+ let i = e.width ?? t.width ?? t.initialWidth ?? null, l = e.height ?? t.height ?? t.initialHeight ?? null, u = V(s, z(t)), d = (i ?? 0) * (l ?? 0), f = a && u > 0;
144
+ (!t.internals.handleBounds || f || u >= d || t.dragging) && c.push(t);
144
145
  }
145
- return m;
146
- }, getConnectedEdges = (e, s) => {
147
- let c = /* @__PURE__ */ new Set();
146
+ return c;
147
+ }, O = (e, t) => {
148
+ let n = /* @__PURE__ */ new Set();
148
149
  return e.forEach((e) => {
149
- c.add(e.id);
150
- }), s.filter((e) => c.has(e.source) || c.has(e.target));
150
+ n.add(e.id);
151
+ }), t.filter((e) => n.has(e.source) || n.has(e.target));
151
152
  };
152
- function getFitViewNodes(e, s) {
153
- let c = /* @__PURE__ */ new Map(), l = s?.nodes ? new Set(s.nodes.map((e) => e.id)) : null;
153
+ function k(e, t) {
154
+ let n = /* @__PURE__ */ new Map(), r = t?.nodes ? new Set(t.nodes.map((e) => e.id)) : null;
154
155
  return e.forEach((e) => {
155
- e.measured.width && e.measured.height && (s?.includeHiddenNodes || !e.hidden) && (!l || l.has(e.id)) && c.set(e.id, e);
156
- }), c;
156
+ e.measured.width && e.measured.height && (t?.includeHiddenNodes || !e.hidden) && (!r || r.has(e.id)) && n.set(e.id, e);
157
+ }), n;
157
158
  }
158
- async function fitViewport({ nodes: e, width: s, height: c, panZoom: l, minZoom: u, maxZoom: d }, f) {
159
+ async function A({ nodes: e, width: t, height: n, panZoom: r, minZoom: i, maxZoom: a }, o) {
159
160
  if (e.size === 0) return Promise.resolve(!0);
160
- let p = getViewportForBounds(getInternalNodesBounds(getFitViewNodes(e, f)), s, c, f?.minZoom ?? u, f?.maxZoom ?? d, f?.padding ?? .1);
161
- return await l.setViewport(p, {
162
- duration: f?.duration,
163
- ease: f?.ease,
164
- interpolate: f?.interpolate
161
+ let s = se(E(k(e, o)), t, n, o?.minZoom ?? i, o?.maxZoom ?? a, o?.padding ?? .1);
162
+ return await r.setViewport(s, {
163
+ duration: o?.duration,
164
+ ease: o?.ease,
165
+ interpolate: o?.interpolate
165
166
  }), Promise.resolve(!0);
166
167
  }
167
- function calculateNodePosition({ nodeId: e, nextPosition: s, nodeLookup: c, nodeOrigin: l = [0, 0], nodeExtent: u, onError: d }) {
168
- let f = c.get(e), p = f.parentId ? c.get(f.parentId) : void 0, { x: h, y: g } = p ? p.internals.positionAbsolute : {
168
+ function j({ nodeId: e, nextPosition: t, nodeLookup: n, nodeOrigin: r = [0, 0], nodeExtent: i, onError: a }) {
169
+ let o = n.get(e), s = o.parentId ? n.get(o.parentId) : void 0, { x: l, y: u } = s ? s.internals.positionAbsolute : {
169
170
  x: 0,
170
171
  y: 0
171
- }, _ = f.origin ?? l, v = f.extent || u;
172
- if (f.extent === "parent" && !f.expandParent) if (!p) d?.("005", errorMessages.error005());
172
+ }, d = o.origin ?? r, f = o.extent || i;
173
+ if (o.extent === "parent" && !o.expandParent) if (!s) a?.("005", c.error005());
173
174
  else {
174
- let e = p.measured.width, s = p.measured.height;
175
- e && s && (v = [[h, g], [h + e, g + s]]);
175
+ let e = s.measured.width, t = s.measured.height;
176
+ e && t && (f = [[l, u], [l + e, u + t]]);
176
177
  }
177
- else p && isCoordinateExtent(f.extent) && (v = [[f.extent[0][0] + h, f.extent[0][1] + g], [f.extent[1][0] + h, f.extent[1][1] + g]]);
178
- let y = isCoordinateExtent(v) ? clampPosition(s, v, f.measured) : s;
179
- return (f.measured.width === void 0 || f.measured.height === void 0) && d?.("015", errorMessages.error015()), {
178
+ else s && q(o.extent) && (f = [[o.extent[0][0] + l, o.extent[0][1] + u], [o.extent[1][0] + l, o.extent[1][1] + u]]);
179
+ let p = q(f) ? P(t, f, o.measured) : t;
180
+ return (o.measured.width === void 0 || o.measured.height === void 0) && a?.("015", c.error015()), {
180
181
  position: {
181
- x: y.x - h + (f.measured.width ?? 0) * _[0],
182
- y: y.y - g + (f.measured.height ?? 0) * _[1]
182
+ x: p.x - l + (o.measured.width ?? 0) * d[0],
183
+ y: p.y - u + (o.measured.height ?? 0) * d[1]
183
184
  },
184
- positionAbsolute: y
185
+ positionAbsolute: p
185
186
  };
186
187
  }
187
- async function getElementsToRemove({ nodesToRemove: e = [], edgesToRemove: s = [], nodes: c, edges: l, onBeforeDelete: u }) {
188
- let d = new Set(e.map((e) => e.id)), f = [];
189
- for (let e of c) {
188
+ async function M({ nodesToRemove: e = [], edgesToRemove: t = [], nodes: n, edges: r, onBeforeDelete: i }) {
189
+ let a = new Set(e.map((e) => e.id)), o = [];
190
+ for (let e of n) {
190
191
  if (e.deletable === !1) continue;
191
- let s = d.has(e.id), c = !s && e.parentId && f.find((s) => s.id === e.parentId);
192
- (s || c) && f.push(e);
192
+ let t = a.has(e.id), n = !t && e.parentId && o.find((t) => t.id === e.parentId);
193
+ (t || n) && o.push(e);
193
194
  }
194
- let p = new Set(s.map((e) => e.id)), m = l.filter((e) => e.deletable !== !1), h = getConnectedEdges(f, m);
195
- for (let e of m) p.has(e.id) && !h.find((s) => s.id === e.id) && h.push(e);
196
- if (!u) return {
197
- edges: h,
198
- nodes: f
195
+ let s = new Set(t.map((e) => e.id)), c = r.filter((e) => e.deletable !== !1), l = O(o, c);
196
+ for (let e of c) s.has(e.id) && !l.find((t) => t.id === e.id) && l.push(e);
197
+ if (!i) return {
198
+ edges: l,
199
+ nodes: o
199
200
  };
200
- let g = await u({
201
- nodes: f,
202
- edges: h
201
+ let u = await i({
202
+ nodes: o,
203
+ edges: l
203
204
  });
204
- return typeof g == "boolean" ? g ? {
205
- edges: h,
206
- nodes: f
205
+ return typeof u == "boolean" ? u ? {
206
+ edges: l,
207
+ nodes: o
207
208
  } : {
208
209
  edges: [],
209
210
  nodes: []
210
- } : g;
211
+ } : u;
211
212
  }
212
- var clamp = (e, s = 0, c = 1) => Math.min(Math.max(e, s), c), clampPosition = (e = {
213
+ var N = (e, t = 0, n = 1) => Math.min(Math.max(e, t), n), P = (e = {
213
214
  x: 0,
214
215
  y: 0
215
- }, s, c) => ({
216
- x: clamp(e.x, s[0][0], s[1][0] - (c?.width ?? 0)),
217
- y: clamp(e.y, s[0][1], s[1][1] - (c?.height ?? 0))
216
+ }, t, n) => ({
217
+ x: N(e.x, t[0][0], t[1][0] - (n?.width ?? 0)),
218
+ y: N(e.y, t[0][1], t[1][1] - (n?.height ?? 0))
218
219
  });
219
- function clampPositionToParent(e, s, c) {
220
- let { width: l, height: u } = getNodeDimensions(c), { x: d, y: f } = c.internals.positionAbsolute;
221
- return clampPosition(e, [[d, f], [d + l, f + u]], s);
222
- }
223
- var calcAutoPanVelocity = (e, s, c) => e < s ? clamp(Math.abs(e - s), 1, s) / s : e > c ? -clamp(Math.abs(e - c), 1, s) / s : 0, calcAutoPan = (e, s, c = 15, l = 40) => [calcAutoPanVelocity(e.x, l, s.width - l) * c, calcAutoPanVelocity(e.y, l, s.height - l) * c], getBoundsOfBoxes = (e, s) => ({
224
- x: Math.min(e.x, s.x),
225
- y: Math.min(e.y, s.y),
226
- x2: Math.max(e.x2, s.x2),
227
- y2: Math.max(e.y2, s.y2)
228
- }), rectToBox = ({ x: e, y: s, width: c, height: l }) => ({
220
+ function F(e, t, n) {
221
+ let { width: r, height: i } = J(n), { x: a, y: o } = n.internals.positionAbsolute;
222
+ return P(e, [[a, o], [a + r, o + i]], t);
223
+ }
224
+ var I = (e, t, n) => e < t ? N(Math.abs(e - t), 1, t) / t : e > n ? -N(Math.abs(e - n), 1, t) / t : 0, ee = (e, t, n = 15, r = 40) => [I(e.x, r, t.width - r) * n, I(e.y, r, t.height - r) * n], te = (e, t) => ({
225
+ x: Math.min(e.x, t.x),
226
+ y: Math.min(e.y, t.y),
227
+ x2: Math.max(e.x2, t.x2),
228
+ y2: Math.max(e.y2, t.y2)
229
+ }), L = ({ x: e, y: t, width: n, height: r }) => ({
229
230
  x: e,
230
- y: s,
231
- x2: e + c,
232
- y2: s + l
233
- }), boxToRect = ({ x: e, y: s, x2: c, y2: l }) => ({
231
+ y: t,
232
+ x2: e + n,
233
+ y2: t + r
234
+ }), R = ({ x: e, y: t, x2: n, y2: r }) => ({
234
235
  x: e,
235
- y: s,
236
- width: c - e,
237
- height: l - s
238
- }), nodeToRect = (e, s = [0, 0]) => {
239
- let { x: c, y: l } = isInternalNodeBase(e) ? e.internals.positionAbsolute : getNodePositionWithOrigin(e, s);
236
+ y: t,
237
+ width: n - e,
238
+ height: r - t
239
+ }), z = (e, t = [0, 0]) => {
240
+ let { x: n, y: r } = C(e) ? e.internals.positionAbsolute : w(e, t);
240
241
  return {
241
- x: c,
242
- y: l,
242
+ x: n,
243
+ y: r,
243
244
  width: e.measured?.width ?? e.width ?? e.initialWidth ?? 0,
244
245
  height: e.measured?.height ?? e.height ?? e.initialHeight ?? 0
245
246
  };
246
- }, nodeToBox = (e, s = [0, 0]) => {
247
- let { x: c, y: l } = isInternalNodeBase(e) ? e.internals.positionAbsolute : getNodePositionWithOrigin(e, s);
247
+ }, ne = (e, t = [0, 0]) => {
248
+ let { x: n, y: r } = C(e) ? e.internals.positionAbsolute : w(e, t);
248
249
  return {
249
- x: c,
250
- y: l,
251
- x2: c + (e.measured?.width ?? e.width ?? e.initialWidth ?? 0),
252
- y2: l + (e.measured?.height ?? e.height ?? e.initialHeight ?? 0)
250
+ x: n,
251
+ y: r,
252
+ x2: n + (e.measured?.width ?? e.width ?? e.initialWidth ?? 0),
253
+ y2: r + (e.measured?.height ?? e.height ?? e.initialHeight ?? 0)
253
254
  };
254
- }, getBoundsOfRects = (e, s) => boxToRect(getBoundsOfBoxes(rectToBox(e), rectToBox(s))), getOverlappingArea = (e, s) => {
255
- let c = Math.max(0, Math.min(e.x + e.width, s.x + s.width) - Math.max(e.x, s.x)), l = Math.max(0, Math.min(e.y + e.height, s.y + s.height) - Math.max(e.y, s.y));
256
- return Math.ceil(c * l);
257
- }, isRectObject = (e) => isNumeric(e.width) && isNumeric(e.height) && isNumeric(e.x) && isNumeric(e.y), isNumeric = (e) => !isNaN(e) && isFinite(e), devWarn = (e, s) => {
258
- process.env.NODE_ENV === "development" && console.warn(`[React Flow]: ${s} Help: https://reactflow.dev/error#${e}`);
259
- }, snapPosition = (e, s = [1, 1]) => ({
260
- x: s[0] * Math.round(e.x / s[0]),
261
- y: s[1] * Math.round(e.y / s[1])
262
- }), pointToRendererPoint = ({ x: e, y: s }, [c, l, u], d = !1, f = [1, 1]) => {
263
- let p = {
264
- x: (e - c) / u,
265
- y: (s - l) / u
255
+ }, B = (e, t) => R(te(L(e), L(t))), V = (e, t) => {
256
+ let n = Math.max(0, Math.min(e.x + e.width, t.x + t.width) - Math.max(e.x, t.x)), r = Math.max(0, Math.min(e.y + e.height, t.y + t.height) - Math.max(e.y, t.y));
257
+ return Math.ceil(n * r);
258
+ }, H = (e) => U(e.width) && U(e.height) && U(e.x) && U(e.y), U = (e) => !isNaN(e) && isFinite(e), W = (e, t) => {
259
+ process.env.NODE_ENV === "development" && console.warn(`[React Flow]: ${t} Help: https://reactflow.dev/error#${e}`);
260
+ }, G = (e, t = [1, 1]) => ({
261
+ x: t[0] * Math.round(e.x / t[0]),
262
+ y: t[1] * Math.round(e.y / t[1])
263
+ }), re = ({ x: e, y: t }, [n, r, i], a = !1, o = [1, 1]) => {
264
+ let s = {
265
+ x: (e - n) / i,
266
+ y: (t - r) / i
266
267
  };
267
- return d ? snapPosition(p, f) : p;
268
- }, rendererPointToPoint = ({ x: e, y: s }, [c, l, u]) => ({
269
- x: e * u + c,
270
- y: s * u + l
268
+ return a ? G(s, o) : s;
269
+ }, ie = ({ x: e, y: t }, [n, r, i]) => ({
270
+ x: e * i + n,
271
+ y: t * i + r
271
272
  });
272
- function parsePadding(e, s) {
273
- if (typeof e == "number") return Math.floor((s - s / (1 + e)) * .5);
273
+ function K(e, t) {
274
+ if (typeof e == "number") return Math.floor((t - t / (1 + e)) * .5);
274
275
  if (typeof e == "string" && e.endsWith("px")) {
275
- let s = parseFloat(e);
276
- if (!Number.isNaN(s)) return Math.floor(s);
276
+ let t = parseFloat(e);
277
+ if (!Number.isNaN(t)) return Math.floor(t);
277
278
  }
278
279
  if (typeof e == "string" && e.endsWith("%")) {
279
- let c = parseFloat(e);
280
- if (!Number.isNaN(c)) return Math.floor(s * c * .01);
280
+ let n = parseFloat(e);
281
+ if (!Number.isNaN(n)) return Math.floor(t * n * .01);
281
282
  }
282
283
  return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`), 0;
283
284
  }
284
- function parsePaddings(e, s, c) {
285
+ function ae(e, t, n) {
285
286
  if (typeof e == "string" || typeof e == "number") {
286
- let l = parsePadding(e, c), u = parsePadding(e, s);
287
+ let r = K(e, n), i = K(e, t);
287
288
  return {
288
- top: l,
289
- right: u,
290
- bottom: l,
291
- left: u,
292
- x: u * 2,
293
- y: l * 2
289
+ top: r,
290
+ right: i,
291
+ bottom: r,
292
+ left: i,
293
+ x: i * 2,
294
+ y: r * 2
294
295
  };
295
296
  }
296
297
  if (typeof e == "object") {
297
- let l = parsePadding(e.top ?? e.y ?? 0, c), u = parsePadding(e.bottom ?? e.y ?? 0, c), d = parsePadding(e.left ?? e.x ?? 0, s), f = parsePadding(e.right ?? e.x ?? 0, s);
298
+ let r = K(e.top ?? e.y ?? 0, n), i = K(e.bottom ?? e.y ?? 0, n), a = K(e.left ?? e.x ?? 0, t), o = K(e.right ?? e.x ?? 0, t);
298
299
  return {
299
- top: l,
300
- right: f,
301
- bottom: u,
302
- left: d,
303
- x: d + f,
304
- y: l + u
300
+ top: r,
301
+ right: o,
302
+ bottom: i,
303
+ left: a,
304
+ x: a + o,
305
+ y: r + i
305
306
  };
306
307
  }
307
308
  return {
@@ -313,1195 +314,1197 @@ function parsePaddings(e, s, c) {
313
314
  y: 0
314
315
  };
315
316
  }
316
- function calculateAppliedPaddings(e, s, c, l, u, d) {
317
- let { x: f, y: p } = rendererPointToPoint(e, [
318
- s,
319
- c,
320
- l
321
- ]), { x: m, y: h } = rendererPointToPoint({
317
+ function oe(e, t, n, r, i, a) {
318
+ let { x: o, y: s } = ie(e, [
319
+ t,
320
+ n,
321
+ r
322
+ ]), { x: c, y: l } = ie({
322
323
  x: e.x + e.width,
323
324
  y: e.y + e.height
324
325
  }, [
325
- s,
326
- c,
327
- l
328
- ]), g = u - m, _ = d - h;
326
+ t,
327
+ n,
328
+ r
329
+ ]), u = i - c, d = a - l;
329
330
  return {
330
- left: Math.floor(f),
331
- top: Math.floor(p),
332
- right: Math.floor(g),
333
- bottom: Math.floor(_)
331
+ left: Math.floor(o),
332
+ top: Math.floor(s),
333
+ right: Math.floor(u),
334
+ bottom: Math.floor(d)
334
335
  };
335
336
  }
336
- var getViewportForBounds = (e, s, c, l, u, d) => {
337
- let f = parsePaddings(d, s, c), p = (s - f.x) / e.width, m = (c - f.y) / e.height, h = clamp(Math.min(p, m), l, u), g = e.x + e.width / 2, _ = e.y + e.height / 2, v = s / 2 - g * h, y = c / 2 - _ * h, b = calculateAppliedPaddings(e, v, y, h, s, c), x = {
338
- left: Math.min(b.left - f.left, 0),
339
- top: Math.min(b.top - f.top, 0),
340
- right: Math.min(b.right - f.right, 0),
341
- bottom: Math.min(b.bottom - f.bottom, 0)
337
+ var se = (e, t, n, r, i, a) => {
338
+ let o = ae(a, t, n), s = (t - o.x) / e.width, c = (n - o.y) / e.height, l = N(Math.min(s, c), r, i), u = e.x + e.width / 2, d = e.y + e.height / 2, f = t / 2 - u * l, p = n / 2 - d * l, m = oe(e, f, p, l, t, n), h = {
339
+ left: Math.min(m.left - o.left, 0),
340
+ top: Math.min(m.top - o.top, 0),
341
+ right: Math.min(m.right - o.right, 0),
342
+ bottom: Math.min(m.bottom - o.bottom, 0)
342
343
  };
343
344
  return {
344
- x: v - x.left + x.right,
345
- y: y - x.top + x.bottom,
346
- zoom: h
345
+ x: f - h.left + h.right,
346
+ y: p - h.top + h.bottom,
347
+ zoom: l
347
348
  };
348
- }, isMacOs = () => typeof navigator < "u" && navigator?.userAgent?.indexOf("Mac") >= 0;
349
- function isCoordinateExtent(e) {
349
+ }, ce = () => typeof navigator < "u" && navigator?.userAgent?.indexOf("Mac") >= 0;
350
+ function q(e) {
350
351
  return e != null && e !== "parent";
351
352
  }
352
- function getNodeDimensions(e) {
353
+ function J(e) {
353
354
  return {
354
355
  width: e.measured?.width ?? e.width ?? e.initialWidth ?? 0,
355
356
  height: e.measured?.height ?? e.height ?? e.initialHeight ?? 0
356
357
  };
357
358
  }
358
- function nodeHasDimensions(e) {
359
+ function le(e) {
359
360
  return (e.measured?.width ?? e.width ?? e.initialWidth) !== void 0 && (e.measured?.height ?? e.height ?? e.initialHeight) !== void 0;
360
361
  }
361
- function evaluateAbsolutePosition(e, s = {
362
+ function ue(e, t = {
362
363
  width: 0,
363
364
  height: 0
364
- }, c, l, u) {
365
- let d = { ...e }, f = l.get(c);
366
- if (f) {
367
- let e = f.origin || u;
368
- d.x += f.internals.positionAbsolute.x - (s.width ?? 0) * e[0], d.y += f.internals.positionAbsolute.y - (s.height ?? 0) * e[1];
365
+ }, n, r, i) {
366
+ let a = { ...e }, o = r.get(n);
367
+ if (o) {
368
+ let e = o.origin || i;
369
+ a.x += o.internals.positionAbsolute.x - (t.width ?? 0) * e[0], a.y += o.internals.positionAbsolute.y - (t.height ?? 0) * e[1];
369
370
  }
370
- return d;
371
+ return a;
371
372
  }
372
- function areSetsEqual(e, s) {
373
- if (e.size !== s.size) return !1;
374
- for (let c of e) if (!s.has(c)) return !1;
373
+ function de(e, t) {
374
+ if (e.size !== t.size) return !1;
375
+ for (let n of e) if (!t.has(n)) return !1;
375
376
  return !0;
376
377
  }
377
- function withResolvers() {
378
- let e, s;
378
+ function fe() {
379
+ let e, t;
379
380
  return {
380
- promise: new Promise((c, l) => {
381
- e = c, s = l;
381
+ promise: new Promise((n, r) => {
382
+ e = n, t = r;
382
383
  }),
383
384
  resolve: e,
384
- reject: s
385
+ reject: t
385
386
  };
386
387
  }
387
- function mergeAriaLabelConfig(e) {
388
+ function pe(e) {
388
389
  return {
389
- ...defaultAriaLabelConfig,
390
+ ...d,
390
391
  ...e || {}
391
392
  };
392
393
  }
393
- function getPointerPosition(e, { snapGrid: s = [0, 0], snapToGrid: c = !1, transform: l, containerBounds: u }) {
394
- let { x: d, y: f } = getEventPosition(e), p = pointToRendererPoint({
395
- x: d - (u?.left ?? 0),
396
- y: f - (u?.top ?? 0)
397
- }, l), { x: m, y: h } = c ? snapPosition(p, s) : p;
394
+ function me(e, { snapGrid: t = [0, 0], snapToGrid: n = !1, transform: r, containerBounds: i }) {
395
+ let { x: a, y: o } = Y(e), s = re({
396
+ x: a - (i?.left ?? 0),
397
+ y: o - (i?.top ?? 0)
398
+ }, r), { x: c, y: l } = n ? G(s, t) : s;
398
399
  return {
399
- xSnapped: m,
400
- ySnapped: h,
401
- ...p
400
+ xSnapped: c,
401
+ ySnapped: l,
402
+ ...s
402
403
  };
403
404
  }
404
- var getDimensions = (e) => ({
405
+ var he = (e) => ({
405
406
  width: e.offsetWidth,
406
407
  height: e.offsetHeight
407
- }), getHostForElement = (e) => e?.getRootNode?.() || window?.document, inputTags = [
408
+ }), ge = (e) => e?.getRootNode?.() || window?.document, _e = [
408
409
  "INPUT",
409
410
  "SELECT",
410
411
  "TEXTAREA"
411
412
  ];
412
- function isInputDOMNode(e) {
413
- let s = e.composedPath?.()?.[0] || e.target;
414
- return s?.nodeType === 1 ? inputTags.includes(s.nodeName) || s.hasAttribute("contenteditable") || !!s.closest(".nokey") : !1;
413
+ function ve(e) {
414
+ let t = e.composedPath?.()?.[0] || e.target;
415
+ return t?.nodeType === 1 ? _e.includes(t.nodeName) || t.hasAttribute("contenteditable") || !!t.closest(".nokey") : !1;
415
416
  }
416
- var isMouseEvent = (e) => "clientX" in e, getEventPosition = (e, s) => {
417
- let c = isMouseEvent(e), l = c ? e.clientX : e.touches?.[0].clientX, u = c ? e.clientY : e.touches?.[0].clientY;
417
+ var ye = (e) => "clientX" in e, Y = (e, t) => {
418
+ let n = ye(e), r = n ? e.clientX : e.touches?.[0].clientX, i = n ? e.clientY : e.touches?.[0].clientY;
418
419
  return {
419
- x: l - (s?.left ?? 0),
420
- y: u - (s?.top ?? 0)
420
+ x: r - (t?.left ?? 0),
421
+ y: i - (t?.top ?? 0)
421
422
  };
422
- }, getHandleBounds = (e, s, c, l, u) => {
423
- let d = s.querySelectorAll(`.${e}`);
424
- return !d || !d.length ? null : Array.from(d).map((s) => {
425
- let d = s.getBoundingClientRect();
423
+ }, be = (e, t, n, r, i) => {
424
+ let a = t.querySelectorAll(`.${e}`);
425
+ return !a || !a.length ? null : Array.from(a).map((t) => {
426
+ let a = t.getBoundingClientRect();
426
427
  return {
427
- id: s.getAttribute("data-handleid"),
428
+ id: t.getAttribute("data-handleid"),
428
429
  type: e,
429
- nodeId: u,
430
- position: s.getAttribute("data-handlepos"),
431
- x: (d.left - c.left) / l,
432
- y: (d.top - c.top) / l,
433
- ...getDimensions(s)
430
+ nodeId: i,
431
+ position: t.getAttribute("data-handlepos"),
432
+ x: (a.left - n.left) / r,
433
+ y: (a.top - n.top) / r,
434
+ ...he(t)
434
435
  };
435
436
  });
436
437
  };
437
- function getBezierEdgeCenter({ sourceX: e, sourceY: s, targetX: c, targetY: l, sourceControlX: u, sourceControlY: d, targetControlX: f, targetControlY: p }) {
438
- let m = e * .125 + u * .375 + f * .375 + c * .125, h = s * .125 + d * .375 + p * .375 + l * .125;
438
+ function xe({ sourceX: e, sourceY: t, targetX: n, targetY: r, sourceControlX: i, sourceControlY: a, targetControlX: o, targetControlY: s }) {
439
+ let c = e * .125 + i * .375 + o * .375 + n * .125, l = t * .125 + a * .375 + s * .375 + r * .125;
439
440
  return [
440
- m,
441
- h,
442
- Math.abs(m - e),
443
- Math.abs(h - s)
441
+ c,
442
+ l,
443
+ Math.abs(c - e),
444
+ Math.abs(l - t)
444
445
  ];
445
446
  }
446
- function calculateControlOffset(e, s) {
447
- return e >= 0 ? .5 * e : s * 25 * Math.sqrt(-e);
447
+ function Se(e, t) {
448
+ return e >= 0 ? .5 * e : t * 25 * Math.sqrt(-e);
448
449
  }
449
- function getControlWithCurvature({ pos: e, x1: s, y1: c, x2: l, y2: u, c: d }) {
450
+ function Ce({ pos: e, x1: t, y1: n, x2: r, y2: i, c: a }) {
450
451
  switch (e) {
451
- case Position.Left: return [s - calculateControlOffset(s - l, d), c];
452
- case Position.Right: return [s + calculateControlOffset(l - s, d), c];
453
- case Position.Top: return [s, c - calculateControlOffset(c - u, d)];
454
- case Position.Bottom: return [s, c + calculateControlOffset(u - c, d)];
452
+ case v.Left: return [t - Se(t - r, a), n];
453
+ case v.Right: return [t + Se(r - t, a), n];
454
+ case v.Top: return [t, n - Se(n - i, a)];
455
+ case v.Bottom: return [t, n + Se(i - n, a)];
455
456
  }
456
457
  }
457
- function getBezierPath({ sourceX: e, sourceY: s, sourcePosition: c = Position.Bottom, targetX: l, targetY: u, targetPosition: d = Position.Top, curvature: f = .25 }) {
458
- let [p, m] = getControlWithCurvature({
459
- pos: c,
458
+ function we({ sourceX: e, sourceY: t, sourcePosition: n = v.Bottom, targetX: r, targetY: i, targetPosition: a = v.Top, curvature: o = .25 }) {
459
+ let [s, c] = Ce({
460
+ pos: n,
460
461
  x1: e,
461
- y1: s,
462
- x2: l,
463
- y2: u,
464
- c: f
465
- }), [h, g] = getControlWithCurvature({
466
- pos: d,
467
- x1: l,
468
- y1: u,
462
+ y1: t,
463
+ x2: r,
464
+ y2: i,
465
+ c: o
466
+ }), [l, u] = Ce({
467
+ pos: a,
468
+ x1: r,
469
+ y1: i,
469
470
  x2: e,
470
- y2: s,
471
- c: f
472
- }), [_, v, y, b] = getBezierEdgeCenter({
471
+ y2: t,
472
+ c: o
473
+ }), [d, f, p, m] = xe({
473
474
  sourceX: e,
474
- sourceY: s,
475
- targetX: l,
476
- targetY: u,
477
- sourceControlX: p,
478
- sourceControlY: m,
479
- targetControlX: h,
480
- targetControlY: g
475
+ sourceY: t,
476
+ targetX: r,
477
+ targetY: i,
478
+ sourceControlX: s,
479
+ sourceControlY: c,
480
+ targetControlX: l,
481
+ targetControlY: u
481
482
  });
482
483
  return [
483
- `M${e},${s} C${p},${m} ${h},${g} ${l},${u}`,
484
- _,
485
- v,
486
- y,
487
- b
484
+ `M${e},${t} C${s},${c} ${l},${u} ${r},${i}`,
485
+ d,
486
+ f,
487
+ p,
488
+ m
488
489
  ];
489
490
  }
490
- function getEdgeCenter({ sourceX: e, sourceY: s, targetX: c, targetY: l }) {
491
- let u = Math.abs(c - e) / 2, d = c < e ? c + u : c - u, f = Math.abs(l - s) / 2;
491
+ function Te({ sourceX: e, sourceY: t, targetX: n, targetY: r }) {
492
+ let i = Math.abs(n - e) / 2, a = n < e ? n + i : n - i, o = Math.abs(r - t) / 2;
492
493
  return [
493
- d,
494
- l < s ? l + f : l - f,
495
- u,
496
- f
494
+ a,
495
+ r < t ? r + o : r - o,
496
+ i,
497
+ o
497
498
  ];
498
499
  }
499
- function getElevatedEdgeZIndex({ sourceNode: e, targetNode: s, selected: c = !1, zIndex: l = 0, elevateOnSelect: u = !1, zIndexMode: d = "basic" }) {
500
- return d === "manual" ? l : (u && c ? l + 1e3 : l) + Math.max(e.parentId || u && e.selected ? e.internals.z : 0, s.parentId || u && s.selected ? s.internals.z : 0);
501
- }
502
- function isEdgeVisible({ sourceNode: e, targetNode: s, width: c, height: l, transform: u }) {
503
- let d = getBoundsOfBoxes(nodeToBox(e), nodeToBox(s));
504
- return d.x === d.x2 && (d.x2 += 1), d.y === d.y2 && (d.y2 += 1), getOverlappingArea({
505
- x: -u[0] / u[2],
506
- y: -u[1] / u[2],
507
- width: c / u[2],
508
- height: l / u[2]
509
- }, boxToRect(d)) > 0;
510
- }
511
- var getEdgeId = ({ source: e, sourceHandle: s, target: c, targetHandle: l }) => `xy-edge__${e}${s || ""}-${c}${l || ""}`, connectionExists = (e, s) => s.some((s) => s.source === e.source && s.target === e.target && (s.sourceHandle === e.sourceHandle || !s.sourceHandle && !e.sourceHandle) && (s.targetHandle === e.targetHandle || !s.targetHandle && !e.targetHandle)), addEdge = (e, s, c = {}) => {
512
- if (!e.source || !e.target) return devWarn("006", errorMessages.error006()), s;
513
- let l = c.getEdgeId || getEdgeId, u;
514
- return u = isEdgeBase(e) ? { ...e } : {
500
+ function Ee({ sourceNode: e, targetNode: t, selected: n = !1, zIndex: r = 0, elevateOnSelect: i = !1, zIndexMode: a = "basic" }) {
501
+ return a === "manual" ? r : (i && n ? r + 1e3 : r) + Math.max(e.parentId || i && e.selected ? e.internals.z : 0, t.parentId || i && t.selected ? t.internals.z : 0);
502
+ }
503
+ function De({ sourceNode: e, targetNode: t, width: n, height: r, transform: i }) {
504
+ let a = te(ne(e), ne(t));
505
+ return a.x === a.x2 && (a.x2 += 1), a.y === a.y2 && (a.y2 += 1), V({
506
+ x: -i[0] / i[2],
507
+ y: -i[1] / i[2],
508
+ width: n / i[2],
509
+ height: r / i[2]
510
+ }, R(a)) > 0;
511
+ }
512
+ var Oe = ({ source: e, sourceHandle: t, target: n, targetHandle: r }) => `xy-edge__${e}${t || ""}-${n}${r || ""}`, ke = (e, t) => t.some((t) => t.source === e.source && t.target === e.target && (t.sourceHandle === e.sourceHandle || !t.sourceHandle && !e.sourceHandle) && (t.targetHandle === e.targetHandle || !t.targetHandle && !e.targetHandle)), Ae = (e, t, n = {}) => {
513
+ if (!e.source || !e.target) return W("006", c.error006()), t;
514
+ let r = n.getEdgeId || Oe, i;
515
+ return i = x(e) ? { ...e } : {
515
516
  ...e,
516
- id: l(e)
517
- }, connectionExists(u, s) ? s : (u.sourceHandle === null && delete u.sourceHandle, u.targetHandle === null && delete u.targetHandle, s.concat(u));
517
+ id: r(e)
518
+ }, ke(i, t) ? t : (i.sourceHandle === null && delete i.sourceHandle, i.targetHandle === null && delete i.targetHandle, t.concat(i));
518
519
  };
519
- function getStraightPath({ sourceX: e, sourceY: s, targetX: c, targetY: l }) {
520
- let [u, d, f, p] = getEdgeCenter({
520
+ function je({ sourceX: e, sourceY: t, targetX: n, targetY: r }) {
521
+ let [i, a, o, s] = Te({
521
522
  sourceX: e,
522
- sourceY: s,
523
- targetX: c,
524
- targetY: l
523
+ sourceY: t,
524
+ targetX: n,
525
+ targetY: r
525
526
  });
526
527
  return [
527
- `M ${e},${s}L ${c},${l}`,
528
- u,
529
- d,
530
- f,
531
- p
528
+ `M ${e},${t}L ${n},${r}`,
529
+ i,
530
+ a,
531
+ o,
532
+ s
532
533
  ];
533
534
  }
534
- var handleDirections = {
535
- [Position.Left]: {
535
+ var Me = {
536
+ [v.Left]: {
536
537
  x: -1,
537
538
  y: 0
538
539
  },
539
- [Position.Right]: {
540
+ [v.Right]: {
540
541
  x: 1,
541
542
  y: 0
542
543
  },
543
- [Position.Top]: {
544
+ [v.Top]: {
544
545
  x: 0,
545
546
  y: -1
546
547
  },
547
- [Position.Bottom]: {
548
+ [v.Bottom]: {
548
549
  x: 0,
549
550
  y: 1
550
551
  }
551
- }, getDirection = ({ source: e, sourcePosition: s = Position.Bottom, target: c }) => s === Position.Left || s === Position.Right ? e.x < c.x ? {
552
+ }, Ne = ({ source: e, sourcePosition: t = v.Bottom, target: n }) => t === v.Left || t === v.Right ? e.x < n.x ? {
552
553
  x: 1,
553
554
  y: 0
554
555
  } : {
555
556
  x: -1,
556
557
  y: 0
557
- } : e.y < c.y ? {
558
+ } : e.y < n.y ? {
558
559
  x: 0,
559
560
  y: 1
560
561
  } : {
561
562
  x: 0,
562
563
  y: -1
563
- }, distance = (e, s) => Math.sqrt((s.x - e.x) ** 2 + (s.y - e.y) ** 2);
564
- function getPoints({ source: e, sourcePosition: s = Position.Bottom, target: c, targetPosition: l = Position.Top, center: u, offset: d, stepPosition: f }) {
565
- let p = handleDirections[s], m = handleDirections[l], h = {
566
- x: e.x + p.x * d,
567
- y: e.y + p.y * d
568
- }, g = {
569
- x: c.x + m.x * d,
570
- y: c.y + m.y * d
571
- }, _ = getDirection({
572
- source: h,
573
- sourcePosition: s,
574
- target: g
575
- }), v = _.x === 0 ? "y" : "x", y = _[v], b = [], x, S, C = {
564
+ }, Pe = (e, t) => Math.sqrt((t.x - e.x) ** 2 + (t.y - e.y) ** 2);
565
+ function Fe({ source: e, sourcePosition: t = v.Bottom, target: n, targetPosition: r = v.Top, center: i, offset: a, stepPosition: o }) {
566
+ let s = Me[t], c = Me[r], l = {
567
+ x: e.x + s.x * a,
568
+ y: e.y + s.y * a
569
+ }, u = {
570
+ x: n.x + c.x * a,
571
+ y: n.y + c.y * a
572
+ }, d = Ne({
573
+ source: l,
574
+ sourcePosition: t,
575
+ target: u
576
+ }), f = d.x === 0 ? "y" : "x", p = d[f], m = [], h, g, _ = {
576
577
  x: 0,
577
578
  y: 0
578
- }, T = {
579
+ }, y = {
579
580
  x: 0,
580
581
  y: 0
581
- }, [, , E, D] = getEdgeCenter({
582
+ }, [, , b, x] = Te({
582
583
  sourceX: e.x,
583
584
  sourceY: e.y,
584
- targetX: c.x,
585
- targetY: c.y
585
+ targetX: n.x,
586
+ targetY: n.y
586
587
  });
587
- if (p[v] * m[v] === -1) {
588
- v === "x" ? (x = u.x ?? h.x + (g.x - h.x) * f, S = u.y ?? (h.y + g.y) / 2) : (x = u.x ?? (h.x + g.x) / 2, S = u.y ?? h.y + (g.y - h.y) * f);
588
+ if (s[f] * c[f] === -1) {
589
+ f === "x" ? (h = i.x ?? l.x + (u.x - l.x) * o, g = i.y ?? (l.y + u.y) / 2) : (h = i.x ?? (l.x + u.x) / 2, g = i.y ?? l.y + (u.y - l.y) * o);
589
590
  let e = [{
590
- x,
591
- y: h.y
591
+ x: h,
592
+ y: l.y
592
593
  }, {
593
- x,
594
- y: g.y
595
- }], s = [{
596
- x: h.x,
597
- y: S
594
+ x: h,
595
+ y: u.y
596
+ }], t = [{
597
+ x: l.x,
598
+ y: g
598
599
  }, {
599
- x: g.x,
600
- y: S
600
+ x: u.x,
601
+ y: g
601
602
  }];
602
- b = p[v] === y ? v === "x" ? e : s : v === "x" ? s : e;
603
+ m = s[f] === p ? f === "x" ? e : t : f === "x" ? t : e;
603
604
  } else {
604
- let u = [{
605
- x: h.x,
606
- y: g.y
607
- }], f = [{
608
- x: g.x,
609
- y: h.y
605
+ let i = [{
606
+ x: l.x,
607
+ y: u.y
608
+ }], o = [{
609
+ x: u.x,
610
+ y: l.y
610
611
  }];
611
- if (b = v === "x" ? p.x === y ? f : u : p.y === y ? u : f, s === l) {
612
- let s = Math.abs(e[v] - c[v]);
613
- if (s <= d) {
614
- let l = Math.min(d - 1, d - s);
615
- p[v] === y ? C[v] = (h[v] > e[v] ? -1 : 1) * l : T[v] = (g[v] > c[v] ? -1 : 1) * l;
612
+ if (m = f === "x" ? s.x === p ? o : i : s.y === p ? i : o, t === r) {
613
+ let t = Math.abs(e[f] - n[f]);
614
+ if (t <= a) {
615
+ let r = Math.min(a - 1, a - t);
616
+ s[f] === p ? _[f] = (l[f] > e[f] ? -1 : 1) * r : y[f] = (u[f] > n[f] ? -1 : 1) * r;
616
617
  }
617
618
  }
618
- if (s !== l) {
619
- let e = v === "x" ? "y" : "x", s = p[v] === m[e], c = h[e] > g[e], l = h[e] < g[e];
620
- (p[v] === 1 && (!s && c || s && l) || p[v] !== 1 && (!s && l || s && c)) && (b = v === "x" ? u : f);
619
+ if (t !== r) {
620
+ let e = f === "x" ? "y" : "x", t = s[f] === c[e], n = l[e] > u[e], r = l[e] < u[e];
621
+ (s[f] === 1 && (!t && n || t && r) || s[f] !== 1 && (!t && r || t && n)) && (m = f === "x" ? i : o);
621
622
  }
622
- let _ = {
623
- x: h.x + C.x,
624
- y: h.y + C.y
625
- }, w = {
626
- x: g.x + T.x,
627
- y: g.y + T.y
623
+ let d = {
624
+ x: l.x + _.x,
625
+ y: l.y + _.y
626
+ }, v = {
627
+ x: u.x + y.x,
628
+ y: u.y + y.y
628
629
  };
629
- Math.max(Math.abs(_.x - b[0].x), Math.abs(w.x - b[0].x)) >= Math.max(Math.abs(_.y - b[0].y), Math.abs(w.y - b[0].y)) ? (x = (_.x + w.x) / 2, S = b[0].y) : (x = b[0].x, S = (_.y + w.y) / 2);
630
+ Math.max(Math.abs(d.x - m[0].x), Math.abs(v.x - m[0].x)) >= Math.max(Math.abs(d.y - m[0].y), Math.abs(v.y - m[0].y)) ? (h = (d.x + v.x) / 2, g = m[0].y) : (h = m[0].x, g = (d.y + v.y) / 2);
630
631
  }
632
+ let S = {
633
+ x: l.x + _.x,
634
+ y: l.y + _.y
635
+ }, C = {
636
+ x: u.x + y.x,
637
+ y: u.y + y.y
638
+ };
631
639
  return [
632
640
  [
633
641
  e,
634
- {
635
- x: h.x + C.x,
636
- y: h.y + C.y
637
- },
638
- ...b,
639
- {
640
- x: g.x + T.x,
641
- y: g.y + T.y
642
- },
643
- c
642
+ ...S.x !== m[0].x || S.y !== m[0].y ? [S] : [],
643
+ ...m,
644
+ ...C.x !== m[m.length - 1].x || C.y !== m[m.length - 1].y ? [C] : [],
645
+ n
644
646
  ],
645
- x,
646
- S,
647
- E,
648
- D
647
+ h,
648
+ g,
649
+ b,
650
+ x
649
651
  ];
650
652
  }
651
- function getBend(e, s, c, l) {
652
- let u = Math.min(distance(e, s) / 2, distance(s, c) / 2, l), { x: d, y: f } = s;
653
- if (e.x === d && d === c.x || e.y === f && f === c.y) return `L${d} ${f}`;
654
- if (e.y === f) {
655
- let s = e.x < c.x ? -1 : 1, l = e.y < c.y ? 1 : -1;
656
- return `L ${d + u * s},${f}Q ${d},${f} ${d},${f + u * l}`;
653
+ function Ie(e, t, n, r) {
654
+ let i = Math.min(Pe(e, t) / 2, Pe(t, n) / 2, r), { x: a, y: o } = t;
655
+ if (e.x === a && a === n.x || e.y === o && o === n.y) return `L${a} ${o}`;
656
+ if (e.y === o) {
657
+ let t = e.x < n.x ? -1 : 1, r = e.y < n.y ? 1 : -1;
658
+ return `L ${a + i * t},${o}Q ${a},${o} ${a},${o + i * r}`;
657
659
  }
658
- let p = e.x < c.x ? 1 : -1;
659
- return `L ${d},${f + u * (e.y < c.y ? -1 : 1)}Q ${d},${f} ${d + u * p},${f}`;
660
+ let s = e.x < n.x ? 1 : -1;
661
+ return `L ${a},${o + i * (e.y < n.y ? -1 : 1)}Q ${a},${o} ${a + i * s},${o}`;
660
662
  }
661
- function getSmoothStepPath({ sourceX: e, sourceY: s, sourcePosition: c = Position.Bottom, targetX: l, targetY: u, targetPosition: d = Position.Top, borderRadius: f = 5, centerX: p, centerY: m, offset: h = 20, stepPosition: g = .5 }) {
662
- let [_, v, y, b, x] = getPoints({
663
+ function Le({ sourceX: e, sourceY: t, sourcePosition: n = v.Bottom, targetX: r, targetY: i, targetPosition: a = v.Top, borderRadius: o = 5, centerX: s, centerY: c, offset: l = 20, stepPosition: u = .5 }) {
664
+ let [d, f, p, m, h] = Fe({
663
665
  source: {
664
666
  x: e,
665
- y: s
667
+ y: t
666
668
  },
667
- sourcePosition: c,
669
+ sourcePosition: n,
668
670
  target: {
669
- x: l,
670
- y: u
671
+ x: r,
672
+ y: i
671
673
  },
672
- targetPosition: d,
674
+ targetPosition: a,
673
675
  center: {
674
- x: p,
675
- y: m
676
+ x: s,
677
+ y: c
676
678
  },
677
- offset: h,
678
- stepPosition: g
679
- });
680
- return [
681
- _.reduce((e, s, c) => {
682
- let l = "";
683
- return l = c > 0 && c < _.length - 1 ? getBend(_[c - 1], s, _[c + 1], f) : `${c === 0 ? "M" : "L"}${s.x} ${s.y}`, e += l, e;
684
- }, ""),
685
- v,
686
- y,
687
- b,
688
- x
679
+ offset: l,
680
+ stepPosition: u
681
+ }), g = `M${d[0].x} ${d[0].y}`;
682
+ for (let e = 1; e < d.length - 1; e++) g += Ie(d[e - 1], d[e], d[e + 1], o);
683
+ return g += `L${d[d.length - 1].x} ${d[d.length - 1].y}`, [
684
+ g,
685
+ f,
686
+ p,
687
+ m,
688
+ h
689
689
  ];
690
690
  }
691
- function isNodeInitialized(e) {
691
+ function Re(e) {
692
692
  return e && !!(e.internals.handleBounds || e.handles?.length) && !!(e.measured.width || e.width || e.initialWidth);
693
693
  }
694
- function getEdgePosition(e) {
695
- let { sourceNode: s, targetNode: c } = e;
696
- if (!isNodeInitialized(s) || !isNodeInitialized(c)) return null;
697
- let l = s.internals.handleBounds || toHandleBounds(s.handles), u = c.internals.handleBounds || toHandleBounds(c.handles), d = getHandle$1(l?.source ?? [], e.sourceHandle), f = getHandle$1(e.connectionMode === ConnectionMode.Strict ? u?.target ?? [] : (u?.target ?? []).concat(u?.source ?? []), e.targetHandle);
698
- if (!d || !f) return e.onError?.("008", errorMessages.error008(d ? "target" : "source", {
694
+ function ze(e) {
695
+ let { sourceNode: t, targetNode: n } = e;
696
+ if (!Re(t) || !Re(n)) return null;
697
+ let r = t.internals.handleBounds || Be(t.handles), i = n.internals.handleBounds || Be(n.handles), a = Ve(r?.source ?? [], e.sourceHandle), o = Ve(e.connectionMode === f.Strict ? i?.target ?? [] : (i?.target ?? []).concat(i?.source ?? []), e.targetHandle);
698
+ if (!a || !o) return e.onError?.("008", c.error008(a ? "target" : "source", {
699
699
  id: e.id,
700
700
  sourceHandle: e.sourceHandle,
701
701
  targetHandle: e.targetHandle
702
702
  })), null;
703
- let p = d?.position || Position.Bottom, h = f?.position || Position.Top, g = getHandlePosition(s, d, p), _ = getHandlePosition(c, f, h);
703
+ let s = a?.position || v.Bottom, l = o?.position || v.Top, u = X(t, a, s), d = X(n, o, l);
704
704
  return {
705
- sourceX: g.x,
706
- sourceY: g.y,
707
- targetX: _.x,
708
- targetY: _.y,
709
- sourcePosition: p,
710
- targetPosition: h
705
+ sourceX: u.x,
706
+ sourceY: u.y,
707
+ targetX: d.x,
708
+ targetY: d.y,
709
+ sourcePosition: s,
710
+ targetPosition: l
711
711
  };
712
712
  }
713
- function toHandleBounds(e) {
713
+ function Be(e) {
714
714
  if (!e) return null;
715
- let s = [], c = [];
716
- for (let l of e) l.width = l.width ?? 1, l.height = l.height ?? 1, l.type === "source" ? s.push(l) : l.type === "target" && c.push(l);
715
+ let t = [], n = [];
716
+ for (let r of e) r.width = r.width ?? 1, r.height = r.height ?? 1, r.type === "source" ? t.push(r) : r.type === "target" && n.push(r);
717
717
  return {
718
- source: s,
719
- target: c
718
+ source: t,
719
+ target: n
720
720
  };
721
721
  }
722
- function getHandlePosition(e, s, c = Position.Left, l = !1) {
723
- let u = (s?.x ?? 0) + e.internals.positionAbsolute.x, d = (s?.y ?? 0) + e.internals.positionAbsolute.y, { width: f, height: p } = s ?? getNodeDimensions(e);
724
- if (l) return {
725
- x: u + f / 2,
726
- y: d + p / 2
722
+ function X(e, t, n = v.Left, r = !1) {
723
+ let i = (t?.x ?? 0) + e.internals.positionAbsolute.x, a = (t?.y ?? 0) + e.internals.positionAbsolute.y, { width: o, height: s } = t ?? J(e);
724
+ if (r) return {
725
+ x: i + o / 2,
726
+ y: a + s / 2
727
727
  };
728
- switch (s?.position ?? c) {
729
- case Position.Top: return {
730
- x: u + f / 2,
731
- y: d
728
+ switch (t?.position ?? n) {
729
+ case v.Top: return {
730
+ x: i + o / 2,
731
+ y: a
732
732
  };
733
- case Position.Right: return {
734
- x: u + f,
735
- y: d + p / 2
733
+ case v.Right: return {
734
+ x: i + o,
735
+ y: a + s / 2
736
736
  };
737
- case Position.Bottom: return {
738
- x: u + f / 2,
739
- y: d + p
737
+ case v.Bottom: return {
738
+ x: i + o / 2,
739
+ y: a + s
740
740
  };
741
- case Position.Left: return {
742
- x: u,
743
- y: d + p / 2
741
+ case v.Left: return {
742
+ x: i,
743
+ y: a + s / 2
744
744
  };
745
745
  }
746
746
  }
747
- function getHandle$1(e, s) {
748
- return e && (s ? e.find((e) => e.id === s) : e[0]) || null;
749
- }
750
- function getMarkerId(e, s) {
751
- return e ? typeof e == "string" ? e : `${s ? `${s}__` : ""}${Object.keys(e).sort().map((s) => `${s}=${e[s]}`).join("&")}` : "";
752
- }
753
- function createMarkerIds(e, { id: s, defaultColor: c, defaultMarkerStart: l, defaultMarkerEnd: u }) {
754
- let d = /* @__PURE__ */ new Set();
755
- return e.reduce((e, f) => ([f.markerStart || l, f.markerEnd || u].forEach((l) => {
756
- if (l && typeof l == "object") {
757
- let u = getMarkerId(l, s);
758
- d.has(u) || (e.push({
759
- id: u,
760
- color: l.color || c,
761
- ...l
762
- }), d.add(u));
747
+ function Ve(e, t) {
748
+ return e && (t ? e.find((e) => e.id === t) : e[0]) || null;
749
+ }
750
+ function He(e, t) {
751
+ return e ? typeof e == "string" ? e : `${t ? `${t}__` : ""}${Object.keys(e).sort().map((t) => `${t}=${e[t]}`).join("&")}` : "";
752
+ }
753
+ function Ue(e, { id: t, defaultColor: n, defaultMarkerStart: r, defaultMarkerEnd: i }) {
754
+ let a = /* @__PURE__ */ new Set();
755
+ return e.reduce((e, o) => ([o.markerStart || r, o.markerEnd || i].forEach((r) => {
756
+ if (r && typeof r == "object") {
757
+ let i = He(r, t);
758
+ a.has(i) || (e.push({
759
+ id: i,
760
+ color: r.color || n,
761
+ ...r
762
+ }), a.add(i));
763
763
  }
764
- }), e), []).sort((e, s) => e.id.localeCompare(s.id));
764
+ }), e), []).sort((e, t) => e.id.localeCompare(t.id));
765
765
  }
766
- var SELECTED_NODE_Z = 1e3, ROOT_PARENT_Z_INCREMENT = 10, defaultOptions = {
766
+ var We = 1e3, Ge = 10, Ke = {
767
767
  nodeOrigin: [0, 0],
768
- nodeExtent: infiniteExtent,
768
+ nodeExtent: l,
769
769
  elevateNodesOnSelect: !0,
770
770
  zIndexMode: "basic",
771
771
  defaults: {}
772
- }, adoptUserNodesDefaultOptions = {
773
- ...defaultOptions,
772
+ }, qe = {
773
+ ...Ke,
774
774
  checkEquality: !0
775
775
  };
776
- function mergeObjects(e, s) {
777
- let c = { ...e };
778
- for (let e in s) s[e] !== void 0 && (c[e] = s[e]);
779
- return c;
780
- }
781
- function updateAbsolutePositions(e, s, c) {
782
- let l = mergeObjects(defaultOptions, c);
783
- for (let c of e.values()) if (c.parentId) updateChildNode(c, e, s, l);
776
+ function Je(e, t) {
777
+ let n = { ...e };
778
+ for (let e in t) t[e] !== void 0 && (n[e] = t[e]);
779
+ return n;
780
+ }
781
+ function Ye(e, t, n) {
782
+ let r = Je(Ke, n);
783
+ for (let n of e.values()) if (n.parentId) et(n, e, t, r);
784
784
  else {
785
- let e = clampPosition(getNodePositionWithOrigin(c, l.nodeOrigin), isCoordinateExtent(c.extent) ? c.extent : l.nodeExtent, getNodeDimensions(c));
786
- c.internals.positionAbsolute = e;
785
+ let e = P(w(n, r.nodeOrigin), q(n.extent) ? n.extent : r.nodeExtent, J(n));
786
+ n.internals.positionAbsolute = e;
787
787
  }
788
788
  }
789
- function parseHandles(e, s) {
790
- if (!e.handles) return e.measured ? s?.internals.handleBounds : void 0;
791
- let c = [], l = [];
792
- for (let s of e.handles) {
793
- let u = {
794
- id: s.id,
795
- width: s.width ?? 1,
796
- height: s.height ?? 1,
789
+ function Xe(e, t) {
790
+ if (!e.handles) return e.measured ? t?.internals.handleBounds : void 0;
791
+ let n = [], r = [];
792
+ for (let t of e.handles) {
793
+ let i = {
794
+ id: t.id,
795
+ width: t.width ?? 1,
796
+ height: t.height ?? 1,
797
797
  nodeId: e.id,
798
- x: s.x,
799
- y: s.y,
800
- position: s.position,
801
- type: s.type
798
+ x: t.x,
799
+ y: t.y,
800
+ position: t.position,
801
+ type: t.type
802
802
  };
803
- s.type === "source" ? c.push(u) : s.type === "target" && l.push(u);
803
+ t.type === "source" ? n.push(i) : t.type === "target" && r.push(i);
804
804
  }
805
805
  return {
806
- source: c,
807
- target: l
806
+ source: n,
807
+ target: r
808
808
  };
809
809
  }
810
- function isManualZIndexMode(e) {
810
+ function Ze(e) {
811
811
  return e === "manual";
812
812
  }
813
- function adoptUserNodes(e, s, c, l = {}) {
814
- let u = mergeObjects(adoptUserNodesDefaultOptions, l), d = { i: 0 }, f = new Map(s), p = u?.elevateNodesOnSelect && !isManualZIndexMode(u.zIndexMode) ? SELECTED_NODE_Z : 0, m = e.length > 0;
815
- s.clear(), c.clear();
816
- for (let h of e) {
817
- let e = f.get(h.id);
818
- if (u.checkEquality && h === e?.internals.userNode) s.set(h.id, e);
813
+ function Qe(e, t, n, r = {}) {
814
+ let i = Je(qe, r), a = { i: 0 }, o = new Map(t), s = i?.elevateNodesOnSelect && !Ze(i.zIndexMode) ? We : 0, c = e.length > 0, l = !1;
815
+ t.clear(), n.clear();
816
+ for (let u of e) {
817
+ let e = o.get(u.id);
818
+ if (i.checkEquality && u === e?.internals.userNode) t.set(u.id, e);
819
819
  else {
820
- let c = clampPosition(getNodePositionWithOrigin(h, u.nodeOrigin), isCoordinateExtent(h.extent) ? h.extent : u.nodeExtent, getNodeDimensions(h));
820
+ let n = P(w(u, i.nodeOrigin), q(u.extent) ? u.extent : i.nodeExtent, J(u));
821
821
  e = {
822
- ...u.defaults,
823
- ...h,
822
+ ...i.defaults,
823
+ ...u,
824
824
  measured: {
825
- width: h.measured?.width,
826
- height: h.measured?.height
825
+ width: u.measured?.width,
826
+ height: u.measured?.height
827
827
  },
828
828
  internals: {
829
- positionAbsolute: c,
830
- handleBounds: parseHandles(h, e),
831
- z: calculateZ(h, p, u.zIndexMode),
832
- userNode: h
829
+ positionAbsolute: n,
830
+ handleBounds: Xe(u, e),
831
+ z: tt(u, s, i.zIndexMode),
832
+ userNode: u
833
833
  }
834
- }, s.set(h.id, e);
834
+ }, t.set(u.id, e);
835
835
  }
836
- (e.measured === void 0 || e.measured.width === void 0 || e.measured.height === void 0) && !e.hidden && (m = !1), h.parentId && updateChildNode(e, s, c, l, d);
836
+ (e.measured === void 0 || e.measured.width === void 0 || e.measured.height === void 0) && !e.hidden && (c = !1), u.parentId && et(e, t, n, r, a), l ||= u.selected ?? !1;
837
837
  }
838
- return m;
838
+ return {
839
+ nodesInitialized: c,
840
+ hasSelectedNodes: l
841
+ };
839
842
  }
840
- function updateParentLookup(e, s) {
843
+ function $e(e, t) {
841
844
  if (!e.parentId) return;
842
- let c = s.get(e.parentId);
843
- c ? c.set(e.id, e) : s.set(e.parentId, new Map([[e.id, e]]));
845
+ let n = t.get(e.parentId);
846
+ n ? n.set(e.id, e) : t.set(e.parentId, new Map([[e.id, e]]));
844
847
  }
845
- function updateChildNode(e, s, c, l, u) {
846
- let { elevateNodesOnSelect: d, nodeOrigin: f, nodeExtent: p, zIndexMode: m } = mergeObjects(defaultOptions, l), h = e.parentId, g = s.get(h);
847
- if (!g) {
848
- console.warn(`Parent node ${h} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);
848
+ function et(e, t, n, r, i) {
849
+ let { elevateNodesOnSelect: a, nodeOrigin: o, nodeExtent: s, zIndexMode: c } = Je(Ke, r), l = e.parentId, u = t.get(l);
850
+ if (!u) {
851
+ console.warn(`Parent node ${l} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);
849
852
  return;
850
853
  }
851
- updateParentLookup(e, c), u && !g.parentId && g.internals.rootParentIndex === void 0 && m === "auto" && (g.internals.rootParentIndex = ++u.i, g.internals.z = g.internals.z + u.i * ROOT_PARENT_Z_INCREMENT), u && g.internals.rootParentIndex !== void 0 && (u.i = g.internals.rootParentIndex);
852
- let { x: _, y: v, z: y } = calculateChildXYZ(e, g, f, p, d && !isManualZIndexMode(m) ? SELECTED_NODE_Z : 0, m), { positionAbsolute: b } = e.internals, x = _ !== b.x || v !== b.y;
853
- (x || y !== e.internals.z) && s.set(e.id, {
854
+ $e(e, n), i && !u.parentId && u.internals.rootParentIndex === void 0 && c === "auto" && (u.internals.rootParentIndex = ++i.i, u.internals.z = u.internals.z + i.i * Ge), i && u.internals.rootParentIndex !== void 0 && (i.i = u.internals.rootParentIndex);
855
+ let { x: d, y: f, z: p } = nt(e, u, o, s, a && !Ze(c) ? We : 0, c), { positionAbsolute: m } = e.internals, h = d !== m.x || f !== m.y;
856
+ (h || p !== e.internals.z) && t.set(e.id, {
854
857
  ...e,
855
858
  internals: {
856
859
  ...e.internals,
857
- positionAbsolute: x ? {
858
- x: _,
859
- y: v
860
- } : b,
861
- z: y
860
+ positionAbsolute: h ? {
861
+ x: d,
862
+ y: f
863
+ } : m,
864
+ z: p
862
865
  }
863
866
  });
864
867
  }
865
- function calculateZ(e, s, c) {
866
- let l = isNumeric(e.zIndex) ? e.zIndex : 0;
867
- return isManualZIndexMode(c) ? l : l + (e.selected ? s : 0);
868
- }
869
- function calculateChildXYZ(e, s, c, l, u, d) {
870
- let { x: f, y: p } = s.internals.positionAbsolute, m = getNodeDimensions(e), h = getNodePositionWithOrigin(e, c), g = isCoordinateExtent(e.extent) ? clampPosition(h, e.extent, m) : h, _ = clampPosition({
871
- x: f + g.x,
872
- y: p + g.y
873
- }, l, m);
874
- e.extent === "parent" && (_ = clampPositionToParent(_, m, s));
875
- let v = calculateZ(e, u, d), y = s.internals.z ?? 0;
868
+ function tt(e, t, n) {
869
+ let r = U(e.zIndex) ? e.zIndex : 0;
870
+ return Ze(n) ? r : r + (e.selected ? t : 0);
871
+ }
872
+ function nt(e, t, n, r, i, a) {
873
+ let { x: o, y: s } = t.internals.positionAbsolute, c = J(e), l = w(e, n), u = q(e.extent) ? P(l, e.extent, c) : l, d = P({
874
+ x: o + u.x,
875
+ y: s + u.y
876
+ }, r, c);
877
+ e.extent === "parent" && (d = F(d, c, t));
878
+ let f = tt(e, i, a), p = t.internals.z ?? 0;
876
879
  return {
877
- x: _.x,
878
- y: _.y,
879
- z: y >= v ? y + 1 : v
880
+ x: d.x,
881
+ y: d.y,
882
+ z: p >= f ? p + 1 : f
880
883
  };
881
884
  }
882
- function handleExpandParent(e, s, c, l = [0, 0]) {
883
- let u = [], d = /* @__PURE__ */ new Map();
884
- for (let c of e) {
885
- let e = s.get(c.parentId);
885
+ function rt(e, t, n, r = [0, 0]) {
886
+ let i = [], a = /* @__PURE__ */ new Map();
887
+ for (let n of e) {
888
+ let e = t.get(n.parentId);
886
889
  if (!e) continue;
887
- let l = getBoundsOfRects(d.get(c.parentId)?.expandedRect ?? nodeToRect(e), c.rect);
888
- d.set(c.parentId, {
889
- expandedRect: l,
890
+ let r = B(a.get(n.parentId)?.expandedRect ?? z(e), n.rect);
891
+ a.set(n.parentId, {
892
+ expandedRect: r,
890
893
  parent: e
891
894
  });
892
895
  }
893
- return d.size > 0 && d.forEach(({ expandedRect: s, parent: d }, f) => {
894
- let p = d.internals.positionAbsolute, m = getNodeDimensions(d), h = d.origin ?? l, g = s.x < p.x ? Math.round(Math.abs(p.x - s.x)) : 0, _ = s.y < p.y ? Math.round(Math.abs(p.y - s.y)) : 0, v = Math.max(m.width, Math.round(s.width)), y = Math.max(m.height, Math.round(s.height)), b = (v - m.width) * h[0], x = (y - m.height) * h[1];
895
- (g > 0 || _ > 0 || b || x) && (u.push({
896
- id: f,
896
+ return a.size > 0 && a.forEach(({ expandedRect: t, parent: a }, o) => {
897
+ let s = a.internals.positionAbsolute, c = J(a), l = a.origin ?? r, u = t.x < s.x ? Math.round(Math.abs(s.x - t.x)) : 0, d = t.y < s.y ? Math.round(Math.abs(s.y - t.y)) : 0, f = Math.max(c.width, Math.round(t.width)), p = Math.max(c.height, Math.round(t.height)), m = (f - c.width) * l[0], h = (p - c.height) * l[1];
898
+ (u > 0 || d > 0 || m || h) && (i.push({
899
+ id: o,
897
900
  type: "position",
898
901
  position: {
899
- x: d.position.x - g + b,
900
- y: d.position.y - _ + x
902
+ x: a.position.x - u + m,
903
+ y: a.position.y - d + h
901
904
  }
902
- }), c.get(f)?.forEach((s) => {
903
- e.some((e) => e.id === s.id) || u.push({
904
- id: s.id,
905
+ }), n.get(o)?.forEach((t) => {
906
+ e.some((e) => e.id === t.id) || i.push({
907
+ id: t.id,
905
908
  type: "position",
906
909
  position: {
907
- x: s.position.x + g,
908
- y: s.position.y + _
910
+ x: t.position.x + u,
911
+ y: t.position.y + d
909
912
  }
910
913
  });
911
- })), (m.width < s.width || m.height < s.height || g || _) && u.push({
912
- id: f,
914
+ })), (c.width < t.width || c.height < t.height || u || d) && i.push({
915
+ id: o,
913
916
  type: "dimensions",
914
917
  setAttributes: !0,
915
918
  dimensions: {
916
- width: v + (g ? h[0] * g - b : 0),
917
- height: y + (_ ? h[1] * _ - x : 0)
919
+ width: f + (u ? l[0] * u - m : 0),
920
+ height: p + (d ? l[1] * d - h : 0)
918
921
  }
919
922
  });
920
- }), u;
923
+ }), i;
921
924
  }
922
- function updateNodeInternals(e, s, c, l, u, d, f) {
923
- let p = l?.querySelector(".xyflow__viewport"), m = !1;
924
- if (!p) return {
925
+ function it(e, t, n, r, i, a, o) {
926
+ let s = r?.querySelector(".xyflow__viewport"), c = !1;
927
+ if (!s) return {
925
928
  changes: [],
926
- updatedInternals: m
929
+ updatedInternals: c
927
930
  };
928
- let h = [], g = window.getComputedStyle(p), { m22: _ } = new window.DOMMatrixReadOnly(g.transform), v = [];
929
- for (let l of e.values()) {
930
- let e = s.get(l.id);
931
+ let l = [], u = window.getComputedStyle(s), { m22: d } = new window.DOMMatrixReadOnly(u.transform), f = [];
932
+ for (let r of e.values()) {
933
+ let e = t.get(r.id);
931
934
  if (!e) continue;
932
935
  if (e.hidden) {
933
- s.set(e.id, {
936
+ t.set(e.id, {
934
937
  ...e,
935
938
  internals: {
936
939
  ...e.internals,
937
940
  handleBounds: void 0
938
941
  }
939
- }), m = !0;
942
+ }), c = !0;
940
943
  continue;
941
944
  }
942
- let p = getDimensions(l.nodeElement), g = e.measured.width !== p.width || e.measured.height !== p.height;
943
- if (p.width && p.height && (g || !e.internals.handleBounds || l.force)) {
944
- let y = l.nodeElement.getBoundingClientRect(), b = isCoordinateExtent(e.extent) ? e.extent : d, { positionAbsolute: x } = e.internals;
945
- e.parentId && e.extent === "parent" ? x = clampPositionToParent(x, p, s.get(e.parentId)) : b && (x = clampPosition(x, b, p));
946
- let S = {
945
+ let s = he(r.nodeElement), u = e.measured.width !== s.width || e.measured.height !== s.height;
946
+ if (s.width && s.height && (u || !e.internals.handleBounds || r.force)) {
947
+ let p = r.nodeElement.getBoundingClientRect(), m = q(e.extent) ? e.extent : a, { positionAbsolute: h } = e.internals;
948
+ e.parentId && e.extent === "parent" ? h = F(h, s, t.get(e.parentId)) : m && (h = P(h, m, s));
949
+ let g = {
947
950
  ...e,
948
- measured: p,
951
+ measured: s,
949
952
  internals: {
950
953
  ...e.internals,
951
- positionAbsolute: x,
954
+ positionAbsolute: h,
952
955
  handleBounds: {
953
- source: getHandleBounds("source", l.nodeElement, y, _, e.id),
954
- target: getHandleBounds("target", l.nodeElement, y, _, e.id)
956
+ source: be("source", r.nodeElement, p, d, e.id),
957
+ target: be("target", r.nodeElement, p, d, e.id)
955
958
  }
956
959
  }
957
960
  };
958
- s.set(e.id, S), e.parentId && updateChildNode(S, s, c, {
959
- nodeOrigin: u,
960
- zIndexMode: f
961
- }), m = !0, g && (h.push({
961
+ t.set(e.id, g), e.parentId && et(g, t, n, {
962
+ nodeOrigin: i,
963
+ zIndexMode: o
964
+ }), c = !0, u && (l.push({
962
965
  id: e.id,
963
966
  type: "dimensions",
964
- dimensions: p
965
- }), e.expandParent && e.parentId && v.push({
967
+ dimensions: s
968
+ }), e.expandParent && e.parentId && f.push({
966
969
  id: e.id,
967
970
  parentId: e.parentId,
968
- rect: nodeToRect(S, u)
971
+ rect: z(g, i)
969
972
  }));
970
973
  }
971
974
  }
972
- if (v.length > 0) {
973
- let e = handleExpandParent(v, s, c, u);
974
- h.push(...e);
975
+ if (f.length > 0) {
976
+ let e = rt(f, t, n, i);
977
+ l.push(...e);
975
978
  }
976
979
  return {
977
- changes: h,
978
- updatedInternals: m
980
+ changes: l,
981
+ updatedInternals: c
979
982
  };
980
983
  }
981
- async function panBy({ delta: e, panZoom: s, transform: c, translateExtent: l, width: u, height: d }) {
982
- if (!s || !e.x && !e.y) return Promise.resolve(!1);
983
- let f = await s.setViewportConstrained({
984
- x: c[0] + e.x,
985
- y: c[1] + e.y,
986
- zoom: c[2]
987
- }, [[0, 0], [u, d]], l), p = !!f && (f.x !== c[0] || f.y !== c[1] || f.k !== c[2]);
988
- return Promise.resolve(p);
989
- }
990
- function addConnectionToLookup(e, s, c, l, u, d) {
991
- let f = u, p = l.get(f) || /* @__PURE__ */ new Map();
992
- l.set(f, p.set(c, s)), f = `${u}-${e}`;
993
- let m = l.get(f) || /* @__PURE__ */ new Map();
994
- if (l.set(f, m.set(c, s)), d) {
995
- f = `${u}-${e}-${d}`;
996
- let p = l.get(f) || /* @__PURE__ */ new Map();
997
- l.set(f, p.set(c, s));
984
+ async function at({ delta: e, panZoom: t, transform: n, translateExtent: r, width: i, height: a }) {
985
+ if (!t || !e.x && !e.y) return Promise.resolve(!1);
986
+ let o = await t.setViewportConstrained({
987
+ x: n[0] + e.x,
988
+ y: n[1] + e.y,
989
+ zoom: n[2]
990
+ }, [[0, 0], [i, a]], r), s = !!o && (o.x !== n[0] || o.y !== n[1] || o.k !== n[2]);
991
+ return Promise.resolve(s);
992
+ }
993
+ function ot(e, t, n, r, i, a) {
994
+ let o = i, s = r.get(o) || /* @__PURE__ */ new Map();
995
+ r.set(o, s.set(n, t)), o = `${i}-${e}`;
996
+ let c = r.get(o) || /* @__PURE__ */ new Map();
997
+ if (r.set(o, c.set(n, t)), a) {
998
+ o = `${i}-${e}-${a}`;
999
+ let s = r.get(o) || /* @__PURE__ */ new Map();
1000
+ r.set(o, s.set(n, t));
998
1001
  }
999
1002
  }
1000
- function updateConnectionLookup(e, s, c) {
1001
- e.clear(), s.clear();
1002
- for (let l of c) {
1003
- let { source: c, target: u, sourceHandle: d = null, targetHandle: f = null } = l, p = {
1004
- edgeId: l.id,
1005
- source: c,
1006
- target: u,
1007
- sourceHandle: d,
1008
- targetHandle: f
1009
- }, m = `${c}-${d}--${u}-${f}`;
1010
- addConnectionToLookup("source", p, `${u}-${f}--${c}-${d}`, e, c, d), addConnectionToLookup("target", p, m, e, u, f), s.set(l.id, l);
1003
+ function st(e, t, n) {
1004
+ e.clear(), t.clear();
1005
+ for (let r of n) {
1006
+ let { source: n, target: i, sourceHandle: a = null, targetHandle: o = null } = r, s = {
1007
+ edgeId: r.id,
1008
+ source: n,
1009
+ target: i,
1010
+ sourceHandle: a,
1011
+ targetHandle: o
1012
+ }, c = `${n}-${a}--${i}-${o}`;
1013
+ ot("source", s, `${i}-${o}--${n}-${a}`, e, n, a), ot("target", s, c, e, i, o), t.set(r.id, r);
1011
1014
  }
1012
1015
  }
1013
- function isParentSelected(e, s) {
1016
+ function ct(e, t) {
1014
1017
  if (!e.parentId) return !1;
1015
- let c = s.get(e.parentId);
1016
- return c ? c.selected ? !0 : isParentSelected(c, s) : !1;
1018
+ let n = t.get(e.parentId);
1019
+ return n ? n.selected ? !0 : ct(n, t) : !1;
1017
1020
  }
1018
- function hasSelector(e, s, c) {
1019
- let l = e;
1021
+ function lt(e, t, n) {
1022
+ let r = e;
1020
1023
  do {
1021
- if (l?.matches?.(s)) return !0;
1022
- if (l === c) return !1;
1023
- l = l?.parentElement;
1024
- } while (l);
1024
+ if (r?.matches?.(t)) return !0;
1025
+ if (r === n) return !1;
1026
+ r = r?.parentElement;
1027
+ } while (r);
1025
1028
  return !1;
1026
1029
  }
1027
- function getDragItems(e, s, c, l) {
1028
- let u = /* @__PURE__ */ new Map();
1029
- for (let [d, f] of e) if ((f.selected || f.id === l) && (!f.parentId || !isParentSelected(f, e)) && (f.draggable || s && f.draggable === void 0)) {
1030
- let s = e.get(d);
1031
- s && u.set(d, {
1032
- id: d,
1033
- position: s.position || {
1030
+ function ut(e, t, n, r) {
1031
+ let i = /* @__PURE__ */ new Map();
1032
+ for (let [a, o] of e) if ((o.selected || o.id === r) && (!o.parentId || !ct(o, e)) && (o.draggable || t && o.draggable === void 0)) {
1033
+ let t = e.get(a);
1034
+ t && i.set(a, {
1035
+ id: a,
1036
+ position: t.position || {
1034
1037
  x: 0,
1035
1038
  y: 0
1036
1039
  },
1037
1040
  distance: {
1038
- x: c.x - s.internals.positionAbsolute.x,
1039
- y: c.y - s.internals.positionAbsolute.y
1041
+ x: n.x - t.internals.positionAbsolute.x,
1042
+ y: n.y - t.internals.positionAbsolute.y
1040
1043
  },
1041
- extent: s.extent,
1042
- parentId: s.parentId,
1043
- origin: s.origin,
1044
- expandParent: s.expandParent,
1045
- internals: { positionAbsolute: s.internals.positionAbsolute || {
1044
+ extent: t.extent,
1045
+ parentId: t.parentId,
1046
+ origin: t.origin,
1047
+ expandParent: t.expandParent,
1048
+ internals: { positionAbsolute: t.internals.positionAbsolute || {
1046
1049
  x: 0,
1047
1050
  y: 0
1048
1051
  } },
1049
1052
  measured: {
1050
- width: s.measured.width ?? 0,
1051
- height: s.measured.height ?? 0
1053
+ width: t.measured.width ?? 0,
1054
+ height: t.measured.height ?? 0
1052
1055
  }
1053
1056
  });
1054
1057
  }
1055
- return u;
1056
- }
1057
- function getEventHandlerParams({ nodeId: e, dragItems: s, nodeLookup: c, dragging: l = !0 }) {
1058
- let u = [];
1059
- for (let [e, d] of s) {
1060
- let s = c.get(e)?.internals.userNode;
1061
- s && u.push({
1062
- ...s,
1063
- position: d.position,
1064
- dragging: l
1058
+ return i;
1059
+ }
1060
+ function dt({ nodeId: e, dragItems: t, nodeLookup: n, dragging: r = !0 }) {
1061
+ let i = [];
1062
+ for (let [e, a] of t) {
1063
+ let t = n.get(e)?.internals.userNode;
1064
+ t && i.push({
1065
+ ...t,
1066
+ position: a.position,
1067
+ dragging: r
1065
1068
  });
1066
1069
  }
1067
- if (!e) return [u[0], u];
1068
- let d = c.get(e)?.internals.userNode;
1069
- return [d ? {
1070
- ...d,
1071
- position: s.get(e)?.position || d.position,
1072
- dragging: l
1073
- } : u[0], u];
1074
- }
1075
- function calculateSnapOffset({ dragItems: e, snapGrid: s, x: c, y: l }) {
1076
- let u = e.values().next().value;
1077
- if (!u) return null;
1078
- let d = {
1079
- x: c - u.distance.x,
1080
- y: l - u.distance.y
1081
- }, f = snapPosition(d, s);
1070
+ if (!e) return [i[0], i];
1071
+ let a = n.get(e)?.internals.userNode;
1072
+ return [a ? {
1073
+ ...a,
1074
+ position: t.get(e)?.position || a.position,
1075
+ dragging: r
1076
+ } : i[0], i];
1077
+ }
1078
+ function ft({ dragItems: e, snapGrid: t, x: n, y: r }) {
1079
+ let i = e.values().next().value;
1080
+ if (!i) return null;
1081
+ let a = {
1082
+ x: n - i.distance.x,
1083
+ y: r - i.distance.y
1084
+ }, o = G(a, t);
1082
1085
  return {
1083
- x: f.x - d.x,
1084
- y: f.y - d.y
1086
+ x: o.x - a.x,
1087
+ y: o.y - a.y
1085
1088
  };
1086
1089
  }
1087
- function XYDrag({ onNodeMouseDown: s, getStoreItems: l, onDragStart: u, onDrag: d, onDragStop: f }) {
1088
- let p = {
1090
+ function pt({ onNodeMouseDown: t, getStoreItems: r, onDragStart: i, onDrag: a, onDragStop: o }) {
1091
+ let s = {
1089
1092
  x: null,
1090
1093
  y: null
1091
- }, m = 0, h = /* @__PURE__ */ new Map(), g = !1, _ = {
1094
+ }, c = 0, l = /* @__PURE__ */ new Map(), u = !1, d = {
1092
1095
  x: 0,
1093
1096
  y: 0
1094
- }, v = null, y = !1, b = null, x = !1, S = !1, C = null;
1095
- function w({ noDragClassName: w, handleSelector: T, domNode: E, isSelectable: D, nodeId: O, nodeClickDistance: k = 0 }) {
1096
- b = select_default(E);
1097
- function A({ x: e, y: s }) {
1098
- let { nodeLookup: c, nodeExtent: u, snapGrid: f, snapToGrid: m, nodeOrigin: g, onNodeDrag: _, onSelectionDrag: v, onError: y, updateNodePositions: b } = l();
1099
- p = {
1097
+ }, f = null, p = !1, m = null, h = !1, g = !1, _ = null;
1098
+ function v({ noDragClassName: v, handleSelector: y, domNode: b, isSelectable: x, nodeId: S, nodeClickDistance: C = 0 }) {
1099
+ m = e(b);
1100
+ function w({ x: e, y: t }) {
1101
+ let { nodeLookup: n, nodeExtent: i, snapGrid: o, snapToGrid: c, nodeOrigin: u, onNodeDrag: d, onSelectionDrag: f, onError: p, updateNodePositions: m } = r();
1102
+ s = {
1100
1103
  x: e,
1101
- y: s
1104
+ y: t
1102
1105
  };
1103
- let x = !1, w = h.size > 1, T = w && u ? rectToBox(getInternalNodesBounds(h)) : null, E = w && m ? calculateSnapOffset({
1104
- dragItems: h,
1105
- snapGrid: f,
1106
+ let h = !1, v = l.size > 1, y = v && i ? L(E(l)) : null, b = v && c ? ft({
1107
+ dragItems: l,
1108
+ snapGrid: o,
1106
1109
  x: e,
1107
- y: s
1110
+ y: t
1108
1111
  }) : null;
1109
- for (let [l, d] of h) {
1110
- if (!c.has(l)) continue;
1111
- let p = {
1112
- x: e - d.distance.x,
1113
- y: s - d.distance.y
1112
+ for (let [r, a] of l) {
1113
+ if (!n.has(r)) continue;
1114
+ let s = {
1115
+ x: e - a.distance.x,
1116
+ y: t - a.distance.y
1114
1117
  };
1115
- m && (p = E ? {
1116
- x: Math.round(p.x + E.x),
1117
- y: Math.round(p.y + E.y)
1118
- } : snapPosition(p, f));
1119
- let h = null;
1120
- if (w && u && !d.extent && T) {
1121
- let { positionAbsolute: e } = d.internals, s = e.x - T.x + u[0][0], c = e.x + d.measured.width - T.x2 + u[1][0], l = e.y - T.y + u[0][1], f = e.y + d.measured.height - T.y2 + u[1][1];
1122
- h = [[s, l], [c, f]];
1118
+ c && (s = b ? {
1119
+ x: Math.round(s.x + b.x),
1120
+ y: Math.round(s.y + b.y)
1121
+ } : G(s, o));
1122
+ let l = null;
1123
+ if (v && i && !a.extent && y) {
1124
+ let { positionAbsolute: e } = a.internals, t = e.x - y.x + i[0][0], n = e.x + a.measured.width - y.x2 + i[1][0], r = e.y - y.y + i[0][1], o = e.y + a.measured.height - y.y2 + i[1][1];
1125
+ l = [[t, r], [n, o]];
1123
1126
  }
1124
- let { position: _, positionAbsolute: v } = calculateNodePosition({
1125
- nodeId: l,
1126
- nextPosition: p,
1127
- nodeLookup: c,
1128
- nodeExtent: h || u,
1129
- nodeOrigin: g,
1130
- onError: y
1127
+ let { position: d, positionAbsolute: f } = j({
1128
+ nodeId: r,
1129
+ nextPosition: s,
1130
+ nodeLookup: n,
1131
+ nodeExtent: l || i,
1132
+ nodeOrigin: u,
1133
+ onError: p
1131
1134
  });
1132
- x = x || d.position.x !== _.x || d.position.y !== _.y, d.position = _, d.internals.positionAbsolute = v;
1135
+ h = h || a.position.x !== d.x || a.position.y !== d.y, a.position = d, a.internals.positionAbsolute = f;
1133
1136
  }
1134
- if (S ||= x, x && (b(h, !0), C && (d || _ || !O && v))) {
1135
- let [e, s] = getEventHandlerParams({
1136
- nodeId: O,
1137
- dragItems: h,
1138
- nodeLookup: c
1137
+ if (g ||= h, h && (m(l, !0), _ && (a || d || !S && f))) {
1138
+ let [e, t] = dt({
1139
+ nodeId: S,
1140
+ dragItems: l,
1141
+ nodeLookup: n
1139
1142
  });
1140
- d?.(C, h, e, s), _?.(C, e, s), O || v?.(C, s);
1143
+ a?.(_, l, e, t), d?.(_, e, t), S || f?.(_, t);
1141
1144
  }
1142
1145
  }
1143
- async function j() {
1144
- if (!v) return;
1145
- let { transform: e, panBy: s, autoPanSpeed: c, autoPanOnNodeDrag: u } = l();
1146
- if (!u) {
1147
- g = !1, cancelAnimationFrame(m);
1146
+ async function T() {
1147
+ if (!f) return;
1148
+ let { transform: e, panBy: t, autoPanSpeed: n, autoPanOnNodeDrag: i } = r();
1149
+ if (!i) {
1150
+ u = !1, cancelAnimationFrame(c);
1148
1151
  return;
1149
1152
  }
1150
- let [d, f] = calcAutoPan(_, v, c);
1151
- (d !== 0 || f !== 0) && (p.x = (p.x ?? 0) - d / e[2], p.y = (p.y ?? 0) - f / e[2], await s({
1152
- x: d,
1153
- y: f
1154
- }) && A(p)), m = requestAnimationFrame(j);
1153
+ let [a, o] = ee(d, f, n);
1154
+ (a !== 0 || o !== 0) && (s.x = (s.x ?? 0) - a / e[2], s.y = (s.y ?? 0) - o / e[2], await t({
1155
+ x: a,
1156
+ y: o
1157
+ }) && w(s)), c = requestAnimationFrame(T);
1155
1158
  }
1156
- function N(e) {
1157
- let { nodeLookup: c, multiSelectionActive: d, nodesDraggable: f, transform: m, snapGrid: g, snapToGrid: _, selectNodesOnDrag: b, onNodeDragStart: x, onSelectionDragStart: S, unselectNodesAndEdges: C } = l();
1158
- y = !0, (!b || !D) && !d && O && (c.get(O)?.selected || C()), D && b && O && s?.(O);
1159
- let w = getPointerPosition(e.sourceEvent, {
1160
- transform: m,
1161
- snapGrid: g,
1162
- snapToGrid: _,
1163
- containerBounds: v
1159
+ function D(e) {
1160
+ let { nodeLookup: n, multiSelectionActive: a, nodesDraggable: o, transform: c, snapGrid: u, snapToGrid: d, selectNodesOnDrag: m, onNodeDragStart: h, onSelectionDragStart: g, unselectNodesAndEdges: _ } = r();
1161
+ p = !0, (!m || !x) && !a && S && (n.get(S)?.selected || _()), x && m && S && t?.(S);
1162
+ let v = me(e.sourceEvent, {
1163
+ transform: c,
1164
+ snapGrid: u,
1165
+ snapToGrid: d,
1166
+ containerBounds: f
1164
1167
  });
1165
- if (p = w, h = getDragItems(c, f, w, O), h.size > 0 && (u || x || !O && S)) {
1166
- let [s, l] = getEventHandlerParams({
1167
- nodeId: O,
1168
- dragItems: h,
1169
- nodeLookup: c
1168
+ if (s = v, l = ut(n, o, v, S), l.size > 0 && (i || h || !S && g)) {
1169
+ let [t, r] = dt({
1170
+ nodeId: S,
1171
+ dragItems: l,
1172
+ nodeLookup: n
1170
1173
  });
1171
- u?.(e.sourceEvent, h, s, l), x?.(e.sourceEvent, s, l), O || S?.(e.sourceEvent, l);
1174
+ i?.(e.sourceEvent, l, t, r), h?.(e.sourceEvent, t, r), S || g?.(e.sourceEvent, r);
1172
1175
  }
1173
1176
  }
1174
- let P = drag_default().clickDistance(k).on("start", (e) => {
1175
- let { domNode: s, nodeDragThreshold: c, transform: u, snapGrid: d, snapToGrid: f } = l();
1176
- v = s?.getBoundingClientRect() || null, x = !1, S = !1, C = e.sourceEvent, c === 0 && N(e), p = getPointerPosition(e.sourceEvent, {
1177
- transform: u,
1178
- snapGrid: d,
1179
- snapToGrid: f,
1180
- containerBounds: v
1181
- }), _ = getEventPosition(e.sourceEvent, v);
1177
+ let O = n().clickDistance(C).on("start", (e) => {
1178
+ let { domNode: t, nodeDragThreshold: n, transform: i, snapGrid: a, snapToGrid: o } = r();
1179
+ f = t?.getBoundingClientRect() || null, h = !1, g = !1, _ = e.sourceEvent, n === 0 && D(e), s = me(e.sourceEvent, {
1180
+ transform: i,
1181
+ snapGrid: a,
1182
+ snapToGrid: o,
1183
+ containerBounds: f
1184
+ }), d = Y(e.sourceEvent, f);
1182
1185
  }).on("drag", (e) => {
1183
- let { autoPanOnNodeDrag: s, transform: c, snapGrid: u, snapToGrid: d, nodeDragThreshold: f, nodeLookup: m } = l(), b = getPointerPosition(e.sourceEvent, {
1184
- transform: c,
1185
- snapGrid: u,
1186
- snapToGrid: d,
1187
- containerBounds: v
1186
+ let { autoPanOnNodeDrag: t, transform: n, snapGrid: i, snapToGrid: a, nodeDragThreshold: o, nodeLookup: c } = r(), m = me(e.sourceEvent, {
1187
+ transform: n,
1188
+ snapGrid: i,
1189
+ snapToGrid: a,
1190
+ containerBounds: f
1188
1191
  });
1189
- if (C = e.sourceEvent, (e.sourceEvent.type === "touchmove" && e.sourceEvent.touches.length > 1 || O && !m.has(O)) && (x = !0), !x) {
1190
- if (!g && s && y && (g = !0, j()), !y) {
1191
- let s = getEventPosition(e.sourceEvent, v), c = s.x - _.x, l = s.y - _.y;
1192
- Math.sqrt(c * c + l * l) > f && N(e);
1192
+ if (_ = e.sourceEvent, (e.sourceEvent.type === "touchmove" && e.sourceEvent.touches.length > 1 || S && !c.has(S)) && (h = !0), !h) {
1193
+ if (!u && t && p && (u = !0, T()), !p) {
1194
+ let t = Y(e.sourceEvent, f), n = t.x - d.x, r = t.y - d.y;
1195
+ Math.sqrt(n * n + r * r) > o && D(e);
1193
1196
  }
1194
- (p.x !== b.xSnapped || p.y !== b.ySnapped) && h && y && (_ = getEventPosition(e.sourceEvent, v), A(b));
1197
+ (s.x !== m.xSnapped || s.y !== m.ySnapped) && l && p && (d = Y(e.sourceEvent, f), w(m));
1195
1198
  }
1196
1199
  }).on("end", (e) => {
1197
- if (!(!y || x) && (g = !1, y = !1, cancelAnimationFrame(m), h.size > 0)) {
1198
- let { nodeLookup: s, updateNodePositions: c, onNodeDragStop: u, onSelectionDragStop: d } = l();
1199
- if (S &&= (c(h, !1), !1), f || u || !O && d) {
1200
- let [c, l] = getEventHandlerParams({
1201
- nodeId: O,
1202
- dragItems: h,
1203
- nodeLookup: s,
1200
+ if (!(!p || h) && (u = !1, p = !1, cancelAnimationFrame(c), l.size > 0)) {
1201
+ let { nodeLookup: t, updateNodePositions: n, onNodeDragStop: i, onSelectionDragStop: a } = r();
1202
+ if (g &&= (n(l, !1), !1), o || i || !S && a) {
1203
+ let [n, r] = dt({
1204
+ nodeId: S,
1205
+ dragItems: l,
1206
+ nodeLookup: t,
1204
1207
  dragging: !1
1205
1208
  });
1206
- f?.(e.sourceEvent, h, c, l), u?.(e.sourceEvent, c, l), O || d?.(e.sourceEvent, l);
1209
+ o?.(e.sourceEvent, l, n, r), i?.(e.sourceEvent, n, r), S || a?.(e.sourceEvent, r);
1207
1210
  }
1208
1211
  }
1209
1212
  }).filter((e) => {
1210
- let s = e.target;
1211
- return !e.button && (!w || !hasSelector(s, `.${w}`, E)) && (!T || hasSelector(s, T, E));
1213
+ let t = e.target;
1214
+ return !e.button && (!v || !lt(t, `.${v}`, b)) && (!y || lt(t, y, b));
1212
1215
  });
1213
- b.call(P);
1216
+ m.call(O);
1214
1217
  }
1215
- function T() {
1216
- b?.on(".drag", null);
1218
+ function y() {
1219
+ m?.on(".drag", null);
1217
1220
  }
1218
1221
  return {
1219
- update: w,
1220
- destroy: T
1222
+ update: v,
1223
+ destroy: y
1221
1224
  };
1222
1225
  }
1223
- function getNodesWithinDistance(e, s, c) {
1224
- let l = [], u = {
1225
- x: e.x - c,
1226
- y: e.y - c,
1227
- width: c * 2,
1228
- height: c * 2
1226
+ function mt(e, t, n) {
1227
+ let r = [], i = {
1228
+ x: e.x - n,
1229
+ y: e.y - n,
1230
+ width: n * 2,
1231
+ height: n * 2
1229
1232
  };
1230
- for (let e of s.values()) getOverlappingArea(u, nodeToRect(e)) > 0 && l.push(e);
1231
- return l;
1232
- }
1233
- var ADDITIONAL_DISTANCE = 250;
1234
- function getClosestHandle(e, s, c, l) {
1235
- let u = [], d = Infinity, f = getNodesWithinDistance(e, c, s + ADDITIONAL_DISTANCE);
1236
- for (let c of f) {
1237
- let f = [...c.internals.handleBounds?.source ?? [], ...c.internals.handleBounds?.target ?? []];
1238
- for (let p of f) {
1239
- if (l.nodeId === p.nodeId && l.type === p.type && l.id === p.id) continue;
1240
- let { x: f, y: m } = getHandlePosition(c, p, p.position, !0), h = Math.sqrt((f - e.x) ** 2 + (m - e.y) ** 2);
1241
- h > s || (h < d ? (u = [{
1242
- ...p,
1243
- x: f,
1244
- y: m
1245
- }], d = h) : h === d && u.push({
1246
- ...p,
1247
- x: f,
1248
- y: m
1233
+ for (let e of t.values()) V(i, z(e)) > 0 && r.push(e);
1234
+ return r;
1235
+ }
1236
+ var ht = 250;
1237
+ function gt(e, t, n, r) {
1238
+ let i = [], a = Infinity, o = mt(e, n, t + ht);
1239
+ for (let n of o) {
1240
+ let o = [...n.internals.handleBounds?.source ?? [], ...n.internals.handleBounds?.target ?? []];
1241
+ for (let s of o) {
1242
+ if (r.nodeId === s.nodeId && r.type === s.type && r.id === s.id) continue;
1243
+ let { x: o, y: c } = X(n, s, s.position, !0), l = Math.sqrt((o - e.x) ** 2 + (c - e.y) ** 2);
1244
+ l > t || (l < a ? (i = [{
1245
+ ...s,
1246
+ x: o,
1247
+ y: c
1248
+ }], a = l) : l === a && i.push({
1249
+ ...s,
1250
+ x: o,
1251
+ y: c
1249
1252
  }));
1250
1253
  }
1251
1254
  }
1252
- if (!u.length) return null;
1253
- if (u.length > 1) {
1254
- let e = l.type === "source" ? "target" : "source";
1255
- return u.find((s) => s.type === e) ?? u[0];
1255
+ if (!i.length) return null;
1256
+ if (i.length > 1) {
1257
+ let e = r.type === "source" ? "target" : "source";
1258
+ return i.find((t) => t.type === e) ?? i[0];
1256
1259
  }
1257
- return u[0];
1258
- }
1259
- function getHandle(e, s, c, l, u, d = !1) {
1260
- let f = l.get(e);
1261
- if (!f) return null;
1262
- let p = u === "strict" ? f.internals.handleBounds?.[s] : [...f.internals.handleBounds?.source ?? [], ...f.internals.handleBounds?.target ?? []], m = (c ? p?.find((e) => e.id === c) : p?.[0]) ?? null;
1263
- return m && d ? {
1264
- ...m,
1265
- ...getHandlePosition(f, m, m.position, !0)
1266
- } : m;
1267
- }
1268
- function getHandleType(e, s) {
1269
- return e || (s?.classList.contains("target") ? "target" : s?.classList.contains("source") ? "source" : null);
1270
- }
1271
- function isConnectionValid(e, s) {
1272
- let c = null;
1273
- return s ? c = !0 : e && !s && (c = !1), c;
1274
- }
1275
- var alwaysValid = () => !0;
1276
- function onPointerDown(e, { connectionMode: s, connectionRadius: c, handleId: l, nodeId: u, edgeUpdaterType: d, isTarget: f, domNode: p, nodeLookup: m, lib: h, autoPanOnConnect: g, flowId: _, panBy: v, cancelConnection: y, onConnectStart: b, onConnect: x, onConnectEnd: S, isValidConnection: C = alwaysValid, onReconnectEnd: E, updateConnection: D, getTransform: O, getFromHandle: k, autoPanSpeed: A, dragThreshold: j = 1, handleDomNode: M }) {
1277
- let N = getHostForElement(e.target), P = 0, F, { x: I, y: L } = getEventPosition(e), R = getHandleType(d, M), z = p?.getBoundingClientRect(), B = !1;
1278
- if (!z || !R) return;
1279
- let V = getHandle(u, R, l, m, s);
1280
- if (!V) return;
1281
- let H = getEventPosition(e, z), U = !1, W = null, G = !1, K = null;
1282
- function q() {
1283
- if (!g || !z) return;
1284
- let [e, s] = calcAutoPan(H, z, A);
1285
- v({
1260
+ return i[0];
1261
+ }
1262
+ function _t(e, t, n, r, i, a = !1) {
1263
+ let o = r.get(e);
1264
+ if (!o) return null;
1265
+ let s = i === "strict" ? o.internals.handleBounds?.[t] : [...o.internals.handleBounds?.source ?? [], ...o.internals.handleBounds?.target ?? []], c = (n ? s?.find((e) => e.id === n) : s?.[0]) ?? null;
1266
+ return c && a ? {
1267
+ ...c,
1268
+ ...X(o, c, c.position, !0)
1269
+ } : c;
1270
+ }
1271
+ function vt(e, t) {
1272
+ return e || (t?.classList.contains("target") ? "target" : t?.classList.contains("source") ? "source" : null);
1273
+ }
1274
+ function yt(e, t) {
1275
+ let n = null;
1276
+ return t ? n = !0 : e && !t && (n = !1), n;
1277
+ }
1278
+ var bt = () => !0;
1279
+ function xt(e, { connectionMode: t, connectionRadius: n, handleId: r, nodeId: i, edgeUpdaterType: a, isTarget: o, domNode: s, nodeLookup: c, lib: l, autoPanOnConnect: u, flowId: d, panBy: f, cancelConnection: p, onConnectStart: m, onConnect: h, onConnectEnd: g, isValidConnection: _ = bt, onReconnectEnd: b, updateConnection: x, getTransform: S, getFromHandle: C, autoPanSpeed: w, dragThreshold: T = 1, handleDomNode: E }) {
1280
+ let D = ge(e.target), O = 0, k, { x: A, y: j } = Y(e), M = vt(a, E), N = s?.getBoundingClientRect(), P = !1;
1281
+ if (!N || !M) return;
1282
+ let F = _t(i, M, r, c, t);
1283
+ if (!F) return;
1284
+ let I = Y(e, N), te = !1, L = null, R = !1, z = null;
1285
+ function ne() {
1286
+ if (!u || !N) return;
1287
+ let [e, t] = ee(I, N, w);
1288
+ f({
1286
1289
  x: e,
1287
- y: s
1288
- }), P = requestAnimationFrame(q);
1290
+ y: t
1291
+ }), O = requestAnimationFrame(ne);
1289
1292
  }
1290
- let J = {
1291
- ...V,
1292
- nodeId: u,
1293
- type: R,
1294
- position: V.position
1295
- }, Y = m.get(u), X = {
1293
+ let B = {
1294
+ ...F,
1295
+ nodeId: i,
1296
+ type: M,
1297
+ position: F.position
1298
+ }, V = c.get(i), H = {
1296
1299
  inProgress: !0,
1297
1300
  isValid: null,
1298
- from: getHandlePosition(Y, J, Position.Left, !0),
1299
- fromHandle: J,
1300
- fromPosition: J.position,
1301
- fromNode: Y,
1302
- to: H,
1301
+ from: X(V, B, v.Left, !0),
1302
+ fromHandle: B,
1303
+ fromPosition: B.position,
1304
+ fromNode: V,
1305
+ to: I,
1303
1306
  toHandle: null,
1304
- toPosition: oppositePosition[J.position],
1307
+ toPosition: y[B.position],
1305
1308
  toNode: null,
1306
- pointer: H
1309
+ pointer: I
1307
1310
  };
1308
- function Z() {
1309
- B = !0, D(X), b?.(e, {
1310
- nodeId: u,
1311
- handleId: l,
1312
- handleType: R
1311
+ function U() {
1312
+ P = !0, x(H), m?.(e, {
1313
+ nodeId: i,
1314
+ handleId: r,
1315
+ handleType: M
1313
1316
  });
1314
1317
  }
1315
- j === 0 && Z();
1316
- function Q(e) {
1317
- if (!B) {
1318
- let { x: s, y: c } = getEventPosition(e), l = s - I, u = c - L;
1319
- if (!(l * l + u * u > j * j)) return;
1320
- Z();
1318
+ T === 0 && U();
1319
+ function W(e) {
1320
+ if (!P) {
1321
+ let { x: t, y: n } = Y(e), r = t - A, i = n - j;
1322
+ if (!(r * r + i * i > T * T)) return;
1323
+ U();
1321
1324
  }
1322
- if (!k() || !J) {
1323
- $(e);
1325
+ if (!C() || !B) {
1326
+ G(e);
1324
1327
  return;
1325
1328
  }
1326
- let d = O();
1327
- H = getEventPosition(e, z), F = getClosestHandle(pointToRendererPoint(H, d, !1, [1, 1]), c, m, J), U ||= (q(), !0);
1328
- let p = isValidHandle(e, {
1329
- handle: F,
1330
- connectionMode: s,
1331
- fromNodeId: u,
1332
- fromHandleId: l,
1333
- fromType: f ? "target" : "source",
1334
- isValidConnection: C,
1335
- doc: N,
1336
- lib: h,
1337
- flowId: _,
1338
- nodeLookup: m
1329
+ let a = S();
1330
+ I = Y(e, N), k = gt(re(I, a, !1, [1, 1]), n, c, B), te ||= (ne(), !0);
1331
+ let s = St(e, {
1332
+ handle: k,
1333
+ connectionMode: t,
1334
+ fromNodeId: i,
1335
+ fromHandleId: r,
1336
+ fromType: o ? "target" : "source",
1337
+ isValidConnection: _,
1338
+ doc: D,
1339
+ lib: l,
1340
+ flowId: d,
1341
+ nodeLookup: c
1339
1342
  });
1340
- K = p.handleDomNode, W = p.connection, G = isConnectionValid(!!F, p.isValid);
1341
- let g = m.get(u), v = g ? getHandlePosition(g, J, Position.Left, !0) : X.from, y = {
1342
- ...X,
1343
- from: v,
1344
- isValid: G,
1345
- to: p.toHandle && G ? rendererPointToPoint({
1346
- x: p.toHandle.x,
1347
- y: p.toHandle.y
1348
- }, d) : H,
1349
- toHandle: p.toHandle,
1350
- toPosition: G && p.toHandle ? p.toHandle.position : oppositePosition[J.position],
1351
- toNode: p.toHandle ? m.get(p.toHandle.nodeId) : null,
1352
- pointer: H
1343
+ z = s.handleDomNode, L = s.connection, R = yt(!!k, s.isValid);
1344
+ let u = c.get(i), f = u ? X(u, B, v.Left, !0) : H.from, p = {
1345
+ ...H,
1346
+ from: f,
1347
+ isValid: R,
1348
+ to: s.toHandle && R ? ie({
1349
+ x: s.toHandle.x,
1350
+ y: s.toHandle.y
1351
+ }, a) : I,
1352
+ toHandle: s.toHandle,
1353
+ toPosition: R && s.toHandle ? s.toHandle.position : y[B.position],
1354
+ toNode: s.toHandle ? c.get(s.toHandle.nodeId) : null,
1355
+ pointer: I
1353
1356
  };
1354
- D(y), X = y;
1357
+ x(p), H = p;
1355
1358
  }
1356
- function $(e) {
1359
+ function G(e) {
1357
1360
  if (!("touches" in e && e.touches.length > 0)) {
1358
- if (B) {
1359
- (F || K) && W && G && x?.(W);
1360
- let { inProgress: s, ...c } = X, l = {
1361
- ...c,
1362
- toPosition: X.toHandle ? X.toPosition : null
1361
+ if (P) {
1362
+ (k || z) && L && R && h?.(L);
1363
+ let { inProgress: t, ...n } = H, r = {
1364
+ ...n,
1365
+ toPosition: H.toHandle ? H.toPosition : null
1363
1366
  };
1364
- S?.(e, l), d && E?.(e, l);
1367
+ g?.(e, r), a && b?.(e, r);
1365
1368
  }
1366
- y(), cancelAnimationFrame(P), U = !1, G = !1, W = null, K = null, N.removeEventListener("mousemove", Q), N.removeEventListener("mouseup", $), N.removeEventListener("touchmove", Q), N.removeEventListener("touchend", $);
1369
+ p(), cancelAnimationFrame(O), te = !1, R = !1, L = null, z = null, D.removeEventListener("mousemove", W), D.removeEventListener("mouseup", G), D.removeEventListener("touchmove", W), D.removeEventListener("touchend", G);
1367
1370
  }
1368
1371
  }
1369
- N.addEventListener("mousemove", Q), N.addEventListener("mouseup", $), N.addEventListener("touchmove", Q), N.addEventListener("touchend", $);
1372
+ D.addEventListener("mousemove", W), D.addEventListener("mouseup", G), D.addEventListener("touchmove", W), D.addEventListener("touchend", G);
1370
1373
  }
1371
- function isValidHandle(e, { handle: s, connectionMode: c, fromNodeId: l, fromHandleId: u, fromType: d, doc: f, lib: p, flowId: m, isValidConnection: h = alwaysValid, nodeLookup: g }) {
1372
- let _ = d === "target", y = s ? f.querySelector(`.${p}-flow__handle[data-id="${m}-${s?.nodeId}-${s?.id}-${s?.type}"]`) : null, { x: b, y: x } = getEventPosition(e), S = f.elementFromPoint(b, x), C = S?.classList.contains(`${p}-flow__handle`) ? S : y, w = {
1373
- handleDomNode: C,
1374
+ function St(e, { handle: t, connectionMode: n, fromNodeId: r, fromHandleId: i, fromType: a, doc: o, lib: s, flowId: c, isValidConnection: l = bt, nodeLookup: u }) {
1375
+ let d = a === "target", p = t ? o.querySelector(`.${s}-flow__handle[data-id="${c}-${t?.nodeId}-${t?.id}-${t?.type}"]`) : null, { x: m, y: h } = Y(e), g = o.elementFromPoint(m, h), _ = g?.classList.contains(`${s}-flow__handle`) ? g : p, v = {
1376
+ handleDomNode: _,
1374
1377
  isValid: !1,
1375
1378
  connection: null,
1376
1379
  toHandle: null
1377
1380
  };
1378
- if (C) {
1379
- let e = getHandleType(void 0, C), s = C.getAttribute("data-nodeid"), d = C.getAttribute("data-handleid"), f = C.classList.contains("connectable"), p = C.classList.contains("connectableend");
1380
- if (!s || !e) return w;
1381
- let m = {
1382
- source: _ ? s : l,
1383
- sourceHandle: _ ? d : u,
1384
- target: _ ? l : s,
1385
- targetHandle: _ ? u : d
1381
+ if (_) {
1382
+ let e = vt(void 0, _), t = _.getAttribute("data-nodeid"), a = _.getAttribute("data-handleid"), o = _.classList.contains("connectable"), s = _.classList.contains("connectableend");
1383
+ if (!t || !e) return v;
1384
+ let c = {
1385
+ source: d ? t : r,
1386
+ sourceHandle: d ? a : i,
1387
+ target: d ? r : t,
1388
+ targetHandle: d ? i : a
1386
1389
  };
1387
- w.connection = m, w.isValid = f && p && (c === ConnectionMode.Strict ? _ && e === "source" || !_ && e === "target" : s !== l || d !== u) && h(m), w.toHandle = getHandle(s, e, d, g, c, !0);
1390
+ v.connection = c, v.isValid = o && s && (n === f.Strict ? d && e === "source" || !d && e === "target" : t !== r || a !== i) && l(c), v.toHandle = _t(t, e, a, u, n, !0);
1388
1391
  }
1389
- return w;
1392
+ return v;
1390
1393
  }
1391
- var XYHandle = {
1392
- onPointerDown,
1393
- isValid: isValidHandle
1394
+ var Ct = {
1395
+ onPointerDown: xt,
1396
+ isValid: St
1394
1397
  };
1395
- function XYMinimap({ domNode: c, panZoom: l, getTransform: u, getViewScale: d }) {
1396
- let f = select_default(c);
1397
- function m({ translateExtent: e, width: s, height: c, zoomStep: m = 1, pannable: h = !0, zoomable: g = !0, inversePan: _ = !1 }) {
1398
- let v = (e) => {
1399
- if (e.sourceEvent.type !== "wheel" || !l) return;
1400
- let s = u(), c = e.sourceEvent.ctrlKey && isMacOs() ? 10 : 1, d = -e.sourceEvent.deltaY * (e.sourceEvent.deltaMode === 1 ? .05 : e.sourceEvent.deltaMode ? 1 : .002) * m, f = s[2] * 2 ** (d * c);
1401
- l.scaleTo(f);
1402
- }, y = [0, 0], b = zoom_default().on("start", (e) => {
1403
- (e.sourceEvent.type === "mousedown" || e.sourceEvent.type === "touchstart") && (y = [e.sourceEvent.clientX ?? e.sourceEvent.touches[0].clientX, e.sourceEvent.clientY ?? e.sourceEvent.touches[0].clientY]);
1404
- }).on("zoom", h ? (f) => {
1405
- let p = u();
1406
- if (f.sourceEvent.type !== "mousemove" && f.sourceEvent.type !== "touchmove" || !l) return;
1407
- let m = [f.sourceEvent.clientX ?? f.sourceEvent.touches[0].clientX, f.sourceEvent.clientY ?? f.sourceEvent.touches[0].clientY], h = [m[0] - y[0], m[1] - y[1]];
1408
- y = m;
1409
- let g = d() * Math.max(p[2], Math.log(p[2])) * (_ ? -1 : 1), v = {
1410
- x: p[0] - h[0] * g,
1411
- y: p[1] - h[1] * g
1412
- }, b = [[0, 0], [s, c]];
1413
- l.setViewportConstrained({
1414
- x: v.x,
1415
- y: v.y,
1416
- zoom: p[2]
1417
- }, b, e);
1418
- } : null).on("zoom.wheel", g ? v : null);
1419
- f.call(b, {});
1398
+ function wt({ domNode: n, panZoom: r, getTransform: i, getViewScale: a }) {
1399
+ let o = e(n);
1400
+ function c({ translateExtent: e, width: t, height: n, zoomStep: c = 1, pannable: l = !0, zoomable: u = !0, inversePan: d = !1 }) {
1401
+ let f = (e) => {
1402
+ if (e.sourceEvent.type !== "wheel" || !r) return;
1403
+ let t = i(), n = e.sourceEvent.ctrlKey && ce() ? 10 : 1, a = -e.sourceEvent.deltaY * (e.sourceEvent.deltaMode === 1 ? .05 : e.sourceEvent.deltaMode ? 1 : .002) * c, o = t[2] * 2 ** (a * n);
1404
+ r.scaleTo(o);
1405
+ }, p = [0, 0], m = s().on("start", (e) => {
1406
+ (e.sourceEvent.type === "mousedown" || e.sourceEvent.type === "touchstart") && (p = [e.sourceEvent.clientX ?? e.sourceEvent.touches[0].clientX, e.sourceEvent.clientY ?? e.sourceEvent.touches[0].clientY]);
1407
+ }).on("zoom", l ? (o) => {
1408
+ let s = i();
1409
+ if (o.sourceEvent.type !== "mousemove" && o.sourceEvent.type !== "touchmove" || !r) return;
1410
+ let c = [o.sourceEvent.clientX ?? o.sourceEvent.touches[0].clientX, o.sourceEvent.clientY ?? o.sourceEvent.touches[0].clientY], l = [c[0] - p[0], c[1] - p[1]];
1411
+ p = c;
1412
+ let u = a() * Math.max(s[2], Math.log(s[2])) * (d ? -1 : 1), f = {
1413
+ x: s[0] - l[0] * u,
1414
+ y: s[1] - l[1] * u
1415
+ }, m = [[0, 0], [t, n]];
1416
+ r.setViewportConstrained({
1417
+ x: f.x,
1418
+ y: f.y,
1419
+ zoom: s[2]
1420
+ }, m, e);
1421
+ } : null).on("zoom.wheel", u ? f : null);
1422
+ o.call(m, {});
1420
1423
  }
1421
- function h() {
1422
- f.on("zoom", null);
1424
+ function l() {
1425
+ o.on("zoom", null);
1423
1426
  }
1424
1427
  return {
1425
- update: m,
1426
- destroy: h,
1427
- pointer: pointer_default
1428
+ update: c,
1429
+ destroy: l,
1430
+ pointer: t
1428
1431
  };
1429
1432
  }
1430
- var transformToViewport = (e) => ({
1433
+ var Tt = (e) => ({
1431
1434
  x: e.x,
1432
1435
  y: e.y,
1433
1436
  zoom: e.k
1434
- }), viewportToTransform = ({ x: e, y: s, zoom: c }) => identity.translate(e, s).scale(c), isWrappedWithClass = (e, s) => e.target.closest(`.${s}`), isRightClickPan = (e, s) => s === 2 && Array.isArray(e) && e.includes(2), defaultEase = (e) => ((e *= 2) <= 1 ? e * e * e : (e -= 2) * e * e + 2) / 2, getD3Transition = (e, s = 0, c = defaultEase, l = () => {}) => {
1435
- let u = typeof s == "number" && s > 0;
1436
- return u || l(), u ? e.transition().duration(s).ease(c).on("end", l) : e;
1437
- }, wheelDelta = (e) => {
1438
- let s = e.ctrlKey && isMacOs() ? 10 : 1;
1439
- return -e.deltaY * (e.deltaMode === 1 ? .05 : e.deltaMode ? 1 : .002) * s;
1437
+ }), Et = ({ x: e, y: t, zoom: n }) => o.translate(e, t).scale(n), Z = (e, t) => e.target.closest(`.${t}`), Dt = (e, t) => t === 2 && Array.isArray(e) && e.includes(2), Ot = (e) => ((e *= 2) <= 1 ? e * e * e : (e -= 2) * e * e + 2) / 2, kt = (e, t = 0, n = Ot, r = () => {}) => {
1438
+ let i = typeof t == "number" && t > 0;
1439
+ return i || r(), i ? e.transition().duration(t).ease(n).on("end", r) : e;
1440
+ }, At = (e) => {
1441
+ let t = e.ctrlKey && ce() ? 10 : 1;
1442
+ return -e.deltaY * (e.deltaMode === 1 ? .05 : e.deltaMode ? 1 : .002) * t;
1440
1443
  };
1441
- function createPanOnScrollHandler({ zoomPanValues: e, noWheelClassName: c, d3Selection: l, d3Zoom: u, panOnScrollMode: d, panOnScrollSpeed: f, zoomOnPinch: p, onPanZoomStart: m, onPanZoom: h, onPanZoomEnd: g }) {
1442
- return (_) => {
1443
- if (isWrappedWithClass(_, c)) return _.ctrlKey && _.preventDefault(), !1;
1444
- _.preventDefault(), _.stopImmediatePropagation();
1445
- let v = l.property("__zoom").k || 1;
1446
- if (_.ctrlKey && p) {
1447
- let e = pointer_default(_), c = v * 2 ** wheelDelta(_);
1448
- u.scaleTo(l, c, e, _);
1444
+ function jt({ zoomPanValues: e, noWheelClassName: n, d3Selection: r, d3Zoom: i, panOnScrollMode: a, panOnScrollSpeed: o, zoomOnPinch: s, onPanZoomStart: c, onPanZoom: l, onPanZoomEnd: u }) {
1445
+ return (d) => {
1446
+ if (Z(d, n)) return d.ctrlKey && d.preventDefault(), !1;
1447
+ d.preventDefault(), d.stopImmediatePropagation();
1448
+ let f = r.property("__zoom").k || 1;
1449
+ if (d.ctrlKey && s) {
1450
+ let e = t(d), n = f * 2 ** At(d);
1451
+ i.scaleTo(r, n, e, d);
1449
1452
  return;
1450
1453
  }
1451
- let b = _.deltaMode === 1 ? 20 : 1, x = d === PanOnScrollMode.Vertical ? 0 : _.deltaX * b, S = d === PanOnScrollMode.Horizontal ? 0 : _.deltaY * b;
1452
- !isMacOs() && _.shiftKey && d !== PanOnScrollMode.Vertical && (x = _.deltaY * b, S = 0), u.translateBy(l, -(x / v) * f, -(S / v) * f, { internal: !0 });
1453
- let C = transformToViewport(l.property("__zoom"));
1454
- clearTimeout(e.panScrollTimeout), e.isPanScrolling ? (h?.(_, C), e.panScrollTimeout = setTimeout(() => {
1455
- g?.(_, C), e.isPanScrolling = !1;
1456
- }, 150)) : (e.isPanScrolling = !0, m?.(_, C));
1454
+ let m = d.deltaMode === 1 ? 20 : 1, h = a === p.Vertical ? 0 : d.deltaX * m, g = a === p.Horizontal ? 0 : d.deltaY * m;
1455
+ !ce() && d.shiftKey && a !== p.Vertical && (h = d.deltaY * m, g = 0), i.translateBy(r, -(h / f) * o, -(g / f) * o, { internal: !0 });
1456
+ let _ = Tt(r.property("__zoom"));
1457
+ clearTimeout(e.panScrollTimeout), e.isPanScrolling ? (l?.(d, _), e.panScrollTimeout = setTimeout(() => {
1458
+ u?.(d, _), e.isPanScrolling = !1;
1459
+ }, 150)) : (e.isPanScrolling = !0, c?.(d, _));
1457
1460
  };
1458
1461
  }
1459
- function createZoomOnScrollHandler({ noWheelClassName: e, preventScrolling: s, d3ZoomHandler: c }) {
1460
- return function(l, u) {
1461
- let d = l.type === "wheel", f = !s && d && !l.ctrlKey, p = isWrappedWithClass(l, e);
1462
- if (l.ctrlKey && d && p && l.preventDefault(), f || p) return null;
1463
- l.preventDefault(), c.call(this, l, u);
1462
+ function Mt({ noWheelClassName: e, preventScrolling: t, d3ZoomHandler: n }) {
1463
+ return function(r, i) {
1464
+ let a = r.type === "wheel", o = !t && a && !r.ctrlKey, s = Z(r, e);
1465
+ if (r.ctrlKey && a && s && r.preventDefault(), o || s) return null;
1466
+ r.preventDefault(), n.call(this, r, i);
1464
1467
  };
1465
1468
  }
1466
- function createPanZoomStartHandler({ zoomPanValues: e, onDraggingChange: s, onPanZoomStart: c }) {
1467
- return (l) => {
1468
- if (l.sourceEvent?.internal) return;
1469
- let u = transformToViewport(l.transform);
1470
- e.mouseButton = l.sourceEvent?.button || 0, e.isZoomingOrPanning = !0, e.prevViewport = u, l.sourceEvent?.type === "mousedown" && s(!0), c && c?.(l.sourceEvent, u);
1469
+ function Nt({ zoomPanValues: e, onDraggingChange: t, onPanZoomStart: n }) {
1470
+ return (r) => {
1471
+ if (r.sourceEvent?.internal) return;
1472
+ let i = Tt(r.transform);
1473
+ e.mouseButton = r.sourceEvent?.button || 0, e.isZoomingOrPanning = !0, e.prevViewport = i, r.sourceEvent?.type === "mousedown" && t(!0), n && n?.(r.sourceEvent, i);
1471
1474
  };
1472
1475
  }
1473
- function createPanZoomHandler({ zoomPanValues: e, panOnDrag: s, onPaneContextMenu: c, onTransformChange: l, onPanZoom: u }) {
1474
- return (d) => {
1475
- e.usedRightMouseButton = !!(c && isRightClickPan(s, e.mouseButton ?? 0)), d.sourceEvent?.sync || l([
1476
- d.transform.x,
1477
- d.transform.y,
1478
- d.transform.k
1479
- ]), u && !d.sourceEvent?.internal && u?.(d.sourceEvent, transformToViewport(d.transform));
1476
+ function Pt({ zoomPanValues: e, panOnDrag: t, onPaneContextMenu: n, onTransformChange: r, onPanZoom: i }) {
1477
+ return (a) => {
1478
+ e.usedRightMouseButton = !!(n && Dt(t, e.mouseButton ?? 0)), a.sourceEvent?.sync || r([
1479
+ a.transform.x,
1480
+ a.transform.y,
1481
+ a.transform.k
1482
+ ]), i && !a.sourceEvent?.internal && i?.(a.sourceEvent, Tt(a.transform));
1480
1483
  };
1481
1484
  }
1482
- function createPanZoomEndHandler({ zoomPanValues: e, panOnDrag: s, panOnScroll: c, onDraggingChange: l, onPanZoomEnd: u, onPaneContextMenu: d }) {
1483
- return (f) => {
1484
- if (!f.sourceEvent?.internal && (e.isZoomingOrPanning = !1, d && isRightClickPan(s, e.mouseButton ?? 0) && !e.usedRightMouseButton && f.sourceEvent && d(f.sourceEvent), e.usedRightMouseButton = !1, l(!1), u)) {
1485
- let s = transformToViewport(f.transform);
1486
- e.prevViewport = s, clearTimeout(e.timerId), e.timerId = setTimeout(() => {
1487
- u?.(f.sourceEvent, s);
1488
- }, c ? 150 : 0);
1485
+ function Ft({ zoomPanValues: e, panOnDrag: t, panOnScroll: n, onDraggingChange: r, onPanZoomEnd: i, onPaneContextMenu: a }) {
1486
+ return (o) => {
1487
+ if (!o.sourceEvent?.internal && (e.isZoomingOrPanning = !1, a && Dt(t, e.mouseButton ?? 0) && !e.usedRightMouseButton && o.sourceEvent && a(o.sourceEvent), e.usedRightMouseButton = !1, r(!1), i)) {
1488
+ let t = Tt(o.transform);
1489
+ e.prevViewport = t, clearTimeout(e.timerId), e.timerId = setTimeout(() => {
1490
+ i?.(o.sourceEvent, t);
1491
+ }, n ? 150 : 0);
1489
1492
  }
1490
1493
  };
1491
1494
  }
1492
- function createFilter({ zoomActivationKeyPressed: e, zoomOnScroll: s, zoomOnPinch: c, panOnDrag: l, panOnScroll: u, zoomOnDoubleClick: d, userSelectionActive: f, noWheelClassName: p, noPanClassName: m, lib: h, connectionInProgress: g }) {
1493
- return (_) => {
1494
- let v = e || s, y = c && _.ctrlKey, b = _.type === "wheel";
1495
- if (_.button === 1 && _.type === "mousedown" && (isWrappedWithClass(_, `${h}-flow__node`) || isWrappedWithClass(_, `${h}-flow__edge`))) return !0;
1496
- if (!l && !v && !u && !d && !c || f || g && !b || isWrappedWithClass(_, p) && b || isWrappedWithClass(_, m) && (!b || u && b && !e) || !c && _.ctrlKey && b) return !1;
1497
- if (!c && _.type === "touchstart" && _.touches?.length > 1) return _.preventDefault(), !1;
1498
- if (!v && !u && !y && b || !l && (_.type === "mousedown" || _.type === "touchstart") || Array.isArray(l) && !l.includes(_.button) && _.type === "mousedown") return !1;
1499
- let x = Array.isArray(l) && l.includes(_.button) || !_.button || _.button <= 1;
1500
- return (!_.ctrlKey || b) && x;
1495
+ function It({ zoomActivationKeyPressed: e, zoomOnScroll: t, zoomOnPinch: n, panOnDrag: r, panOnScroll: i, zoomOnDoubleClick: a, userSelectionActive: o, noWheelClassName: s, noPanClassName: c, lib: l, connectionInProgress: u }) {
1496
+ return (d) => {
1497
+ let f = e || t, p = n && d.ctrlKey, m = d.type === "wheel";
1498
+ if (d.button === 1 && d.type === "mousedown" && (Z(d, `${l}-flow__node`) || Z(d, `${l}-flow__edge`))) return !0;
1499
+ if (!r && !f && !i && !a && !n || o || u && !m || Z(d, s) && m || Z(d, c) && (!m || i && m && !e) || !n && d.ctrlKey && m) return !1;
1500
+ if (!n && d.type === "touchstart" && d.touches?.length > 1) return d.preventDefault(), !1;
1501
+ if (!f && !i && !p && m || !r && (d.type === "mousedown" || d.type === "touchstart") || Array.isArray(r) && !r.includes(d.button) && d.type === "mousedown") return !1;
1502
+ let h = Array.isArray(r) && r.includes(d.button) || !d.button || d.button <= 1;
1503
+ return (!d.ctrlKey || m) && h;
1501
1504
  };
1502
1505
  }
1503
- function XYPanZoom({ domNode: s, minZoom: c, maxZoom: f, translateExtent: m, viewport: h, onPanZoom: g, onPanZoomStart: _, onPanZoomEnd: v, onDraggingChange: y }) {
1504
- let b = {
1506
+ function Lt({ domNode: t, minZoom: n, maxZoom: o, translateExtent: c, viewport: l, onPanZoom: u, onPanZoomStart: d, onPanZoomEnd: f, onDraggingChange: p }) {
1507
+ let m = {
1505
1508
  isZoomingOrPanning: !1,
1506
1509
  usedRightMouseButton: !1,
1507
1510
  prevViewport: {
@@ -1513,98 +1516,98 @@ function XYPanZoom({ domNode: s, minZoom: c, maxZoom: f, translateExtent: m, vie
1513
1516
  timerId: void 0,
1514
1517
  panScrollTimeout: void 0,
1515
1518
  isPanScrolling: !1
1516
- }, x = s.getBoundingClientRect(), S = zoom_default().scaleExtent([c, f]).translateExtent(m), C = select_default(s).call(S);
1517
- k({
1518
- x: h.x,
1519
- y: h.y,
1520
- zoom: clamp(h.zoom, c, f)
1521
- }, [[0, 0], [x.width, x.height]], m);
1522
- let w = C.on("wheel.zoom"), T = C.on("dblclick.zoom");
1523
- S.wheelDelta(wheelDelta);
1524
- function E(e, s) {
1525
- return C ? new Promise((c) => {
1526
- S?.interpolate(s?.interpolate === "linear" ? value_default : zoom_default$1).transform(getD3Transition(C, s?.duration, s?.ease, () => c(!0)), e);
1519
+ }, h = t.getBoundingClientRect(), g = s().scaleExtent([n, o]).translateExtent(c), _ = e(t).call(g);
1520
+ C({
1521
+ x: l.x,
1522
+ y: l.y,
1523
+ zoom: N(l.zoom, n, o)
1524
+ }, [[0, 0], [h.width, h.height]], c);
1525
+ let v = _.on("wheel.zoom"), y = _.on("dblclick.zoom");
1526
+ g.wheelDelta(At);
1527
+ function b(e, t) {
1528
+ return _ ? new Promise((n) => {
1529
+ g?.interpolate(t?.interpolate === "linear" ? r : i).transform(kt(_, t?.duration, t?.ease, () => n(!0)), e);
1527
1530
  }) : Promise.resolve(!1);
1528
1531
  }
1529
- function D({ noWheelClassName: e, noPanClassName: s, onPaneContextMenu: c, userSelectionActive: l, panOnScroll: u, panOnDrag: d, panOnScrollMode: f, panOnScrollSpeed: p, preventScrolling: m, zoomOnPinch: h, zoomOnScroll: x, zoomOnDoubleClick: E, zoomActivationKeyPressed: D, lib: k, onTransformChange: A, connectionInProgress: j, paneClickDistance: M, selectionOnDrag: N }) {
1530
- l && !b.isZoomingOrPanning && O();
1531
- let P = u && !D && !l;
1532
- S.clickDistance(N ? Infinity : !isNumeric(M) || M < 0 ? 0 : M);
1533
- let F = P ? createPanOnScrollHandler({
1534
- zoomPanValues: b,
1532
+ function x({ noWheelClassName: e, noPanClassName: t, onPaneContextMenu: n, userSelectionActive: r, panOnScroll: i, panOnDrag: a, panOnScrollMode: o, panOnScrollSpeed: s, preventScrolling: c, zoomOnPinch: l, zoomOnScroll: h, zoomOnDoubleClick: b, zoomActivationKeyPressed: x, lib: C, onTransformChange: w, connectionInProgress: T, paneClickDistance: E, selectionOnDrag: D }) {
1533
+ r && !m.isZoomingOrPanning && S();
1534
+ let O = i && !x && !r;
1535
+ g.clickDistance(D ? Infinity : !U(E) || E < 0 ? 0 : E);
1536
+ let k = O ? jt({
1537
+ zoomPanValues: m,
1535
1538
  noWheelClassName: e,
1536
- d3Selection: C,
1537
- d3Zoom: S,
1538
- panOnScrollMode: f,
1539
- panOnScrollSpeed: p,
1540
- zoomOnPinch: h,
1541
- onPanZoomStart: _,
1542
- onPanZoom: g,
1543
- onPanZoomEnd: v
1544
- }) : createZoomOnScrollHandler({
1539
+ d3Selection: _,
1540
+ d3Zoom: g,
1541
+ panOnScrollMode: o,
1542
+ panOnScrollSpeed: s,
1543
+ zoomOnPinch: l,
1544
+ onPanZoomStart: d,
1545
+ onPanZoom: u,
1546
+ onPanZoomEnd: f
1547
+ }) : Mt({
1545
1548
  noWheelClassName: e,
1546
- preventScrolling: m,
1547
- d3ZoomHandler: w
1549
+ preventScrolling: c,
1550
+ d3ZoomHandler: v
1548
1551
  });
1549
- if (C.on("wheel.zoom", F, { passive: !1 }), !l) {
1550
- let e = createPanZoomStartHandler({
1551
- zoomPanValues: b,
1552
- onDraggingChange: y,
1553
- onPanZoomStart: _
1552
+ if (_.on("wheel.zoom", k, { passive: !1 }), !r) {
1553
+ let e = Nt({
1554
+ zoomPanValues: m,
1555
+ onDraggingChange: p,
1556
+ onPanZoomStart: d
1554
1557
  });
1555
- S.on("start", e);
1556
- let s = createPanZoomHandler({
1557
- zoomPanValues: b,
1558
- panOnDrag: d,
1559
- onPaneContextMenu: !!c,
1560
- onPanZoom: g,
1561
- onTransformChange: A
1558
+ g.on("start", e);
1559
+ let t = Pt({
1560
+ zoomPanValues: m,
1561
+ panOnDrag: a,
1562
+ onPaneContextMenu: !!n,
1563
+ onPanZoom: u,
1564
+ onTransformChange: w
1562
1565
  });
1563
- S.on("zoom", s);
1564
- let l = createPanZoomEndHandler({
1565
- zoomPanValues: b,
1566
- panOnDrag: d,
1567
- panOnScroll: u,
1568
- onPaneContextMenu: c,
1569
- onPanZoomEnd: v,
1570
- onDraggingChange: y
1566
+ g.on("zoom", t);
1567
+ let r = Ft({
1568
+ zoomPanValues: m,
1569
+ panOnDrag: a,
1570
+ panOnScroll: i,
1571
+ onPaneContextMenu: n,
1572
+ onPanZoomEnd: f,
1573
+ onDraggingChange: p
1571
1574
  });
1572
- S.on("end", l);
1575
+ g.on("end", r);
1573
1576
  }
1574
- let I = createFilter({
1575
- zoomActivationKeyPressed: D,
1576
- panOnDrag: d,
1577
- zoomOnScroll: x,
1578
- panOnScroll: u,
1579
- zoomOnDoubleClick: E,
1580
- zoomOnPinch: h,
1581
- userSelectionActive: l,
1582
- noPanClassName: s,
1577
+ let A = It({
1578
+ zoomActivationKeyPressed: x,
1579
+ panOnDrag: a,
1580
+ zoomOnScroll: h,
1581
+ panOnScroll: i,
1582
+ zoomOnDoubleClick: b,
1583
+ zoomOnPinch: l,
1584
+ userSelectionActive: r,
1585
+ noPanClassName: t,
1583
1586
  noWheelClassName: e,
1584
- lib: k,
1585
- connectionInProgress: j
1587
+ lib: C,
1588
+ connectionInProgress: T
1586
1589
  });
1587
- S.filter(I), E ? C.on("dblclick.zoom", T) : C.on("dblclick.zoom", null);
1590
+ g.filter(A), b ? _.on("dblclick.zoom", y) : _.on("dblclick.zoom", null);
1588
1591
  }
1589
- function O() {
1590
- S.on("zoom", null);
1592
+ function S() {
1593
+ g.on("zoom", null);
1591
1594
  }
1592
- async function k(e, s, c) {
1593
- let l = viewportToTransform(e), u = S?.constrain()(l, s, c);
1594
- return u && await E(u), new Promise((e) => e(u));
1595
+ async function C(e, t, n) {
1596
+ let r = Et(e), i = g?.constrain()(r, t, n);
1597
+ return i && await b(i), new Promise((e) => e(i));
1595
1598
  }
1596
- async function A(e, s) {
1597
- let c = viewportToTransform(e);
1598
- return await E(c, s), new Promise((e) => e(c));
1599
+ async function w(e, t) {
1600
+ let n = Et(e);
1601
+ return await b(n, t), new Promise((e) => e(n));
1599
1602
  }
1600
- function j(e) {
1601
- if (C) {
1602
- let s = viewportToTransform(e), c = C.property("__zoom");
1603
- (c.k !== e.zoom || c.x !== e.x || c.y !== e.y) && S?.transform(C, s, null, { sync: !0 });
1603
+ function T(e) {
1604
+ if (_) {
1605
+ let t = Et(e), n = _.property("__zoom");
1606
+ (n.k !== e.zoom || n.x !== e.x || n.y !== e.y) && g?.transform(_, t, null, { sync: !0 });
1604
1607
  }
1605
1608
  }
1606
- function M() {
1607
- let e = C ? transform(C.node()) : {
1609
+ function E() {
1610
+ let e = _ ? a(_.node()) : {
1608
1611
  x: 0,
1609
1612
  y: 0,
1610
1613
  k: 1
@@ -1615,49 +1618,49 @@ function XYPanZoom({ domNode: s, minZoom: c, maxZoom: f, translateExtent: m, vie
1615
1618
  zoom: e.k
1616
1619
  };
1617
1620
  }
1618
- function N(e, s) {
1619
- return C ? new Promise((c) => {
1620
- S?.interpolate(s?.interpolate === "linear" ? value_default : zoom_default$1).scaleTo(getD3Transition(C, s?.duration, s?.ease, () => c(!0)), e);
1621
+ function D(e, t) {
1622
+ return _ ? new Promise((n) => {
1623
+ g?.interpolate(t?.interpolate === "linear" ? r : i).scaleTo(kt(_, t?.duration, t?.ease, () => n(!0)), e);
1621
1624
  }) : Promise.resolve(!1);
1622
1625
  }
1623
- function P(e, s) {
1624
- return C ? new Promise((c) => {
1625
- S?.interpolate(s?.interpolate === "linear" ? value_default : zoom_default$1).scaleBy(getD3Transition(C, s?.duration, s?.ease, () => c(!0)), e);
1626
+ function O(e, t) {
1627
+ return _ ? new Promise((n) => {
1628
+ g?.interpolate(t?.interpolate === "linear" ? r : i).scaleBy(kt(_, t?.duration, t?.ease, () => n(!0)), e);
1626
1629
  }) : Promise.resolve(!1);
1627
1630
  }
1628
- function F(e) {
1629
- S?.scaleExtent(e);
1631
+ function k(e) {
1632
+ g?.scaleExtent(e);
1630
1633
  }
1631
- function I(e) {
1632
- S?.translateExtent(e);
1634
+ function A(e) {
1635
+ g?.translateExtent(e);
1633
1636
  }
1634
- function L(e) {
1635
- let s = !isNumeric(e) || e < 0 ? 0 : e;
1636
- S?.clickDistance(s);
1637
+ function j(e) {
1638
+ let t = !U(e) || e < 0 ? 0 : e;
1639
+ g?.clickDistance(t);
1637
1640
  }
1638
1641
  return {
1639
- update: D,
1640
- destroy: O,
1641
- setViewport: A,
1642
- setViewportConstrained: k,
1643
- getViewport: M,
1644
- scaleTo: N,
1645
- scaleBy: P,
1646
- setScaleExtent: F,
1647
- setTranslateExtent: I,
1648
- syncViewport: j,
1649
- setClickDistance: L
1642
+ update: x,
1643
+ destroy: S,
1644
+ setViewport: w,
1645
+ setViewportConstrained: C,
1646
+ getViewport: E,
1647
+ scaleTo: D,
1648
+ scaleBy: O,
1649
+ setScaleExtent: k,
1650
+ setTranslateExtent: A,
1651
+ syncViewport: T,
1652
+ setClickDistance: j
1650
1653
  };
1651
1654
  }
1652
- var ResizeControlVariant;
1655
+ var Rt;
1653
1656
  (function(e) {
1654
1657
  e.Line = "line", e.Handle = "handle";
1655
- })(ResizeControlVariant ||= {});
1656
- function getResizeDirection({ width: e, prevWidth: s, height: c, prevHeight: l, affectsX: u, affectsY: d }) {
1657
- let f = e - s, p = c - l, m = [f > 0 ? 1 : f < 0 ? -1 : 0, p > 0 ? 1 : p < 0 ? -1 : 0];
1658
- return f && u && (m[0] *= -1), p && d && (m[1] *= -1), m;
1658
+ })(Rt ||= {});
1659
+ function zt({ width: e, prevWidth: t, height: n, prevHeight: r, affectsX: i, affectsY: a }) {
1660
+ let o = e - t, s = n - r, c = [o > 0 ? 1 : o < 0 ? -1 : 0, s > 0 ? 1 : s < 0 ? -1 : 0];
1661
+ return o && i && (c[0] *= -1), s && a && (c[1] *= -1), c;
1659
1662
  }
1660
- function getControlDirection(e) {
1663
+ function Bt(e) {
1661
1664
  return {
1662
1665
  isHorizontal: e.includes("right") || e.includes("left"),
1663
1666
  isVertical: e.includes("bottom") || e.includes("top"),
@@ -1665,82 +1668,82 @@ function getControlDirection(e) {
1665
1668
  affectsY: e.includes("top")
1666
1669
  };
1667
1670
  }
1668
- function getLowerExtentClamp(e, s) {
1669
- return Math.max(0, s - e);
1671
+ function Q(e, t) {
1672
+ return Math.max(0, t - e);
1670
1673
  }
1671
- function getUpperExtentClamp(e, s) {
1672
- return Math.max(0, e - s);
1674
+ function $(e, t) {
1675
+ return Math.max(0, e - t);
1673
1676
  }
1674
- function getSizeClamp(e, s, c) {
1675
- return Math.max(0, s - e, e - c);
1677
+ function Vt(e, t, n) {
1678
+ return Math.max(0, t - e, e - n);
1676
1679
  }
1677
- function xor(e, s) {
1678
- return e ? !s : s;
1680
+ function Ht(e, t) {
1681
+ return e ? !t : t;
1679
1682
  }
1680
- function getDimensionsAfterResize(e, s, c, l, u, d, f, p) {
1681
- let { affectsX: m, affectsY: h } = s, { isHorizontal: g, isVertical: _ } = s, v = g && _, { xSnapped: y, ySnapped: b } = c, { minWidth: x, maxWidth: S, minHeight: C, maxHeight: w } = l, { x: T, y: E, width: D, height: O, aspectRatio: k } = e, A = Math.floor(g ? y - e.pointerX : 0), j = Math.floor(_ ? b - e.pointerY : 0), M = D + (m ? -A : A), N = O + (h ? -j : j), P = -d[0] * D, F = -d[1] * O, I = getSizeClamp(M, x, S), L = getSizeClamp(N, C, w);
1682
- if (f) {
1683
- let e = 0, s = 0;
1684
- m && A < 0 ? e = getLowerExtentClamp(T + A + P, f[0][0]) : !m && A > 0 && (e = getUpperExtentClamp(T + M + P, f[1][0])), h && j < 0 ? s = getLowerExtentClamp(E + j + F, f[0][1]) : !h && j > 0 && (s = getUpperExtentClamp(E + N + F, f[1][1])), I = Math.max(I, e), L = Math.max(L, s);
1683
+ function Ut(e, t, n, r, i, a, o, s) {
1684
+ let { affectsX: c, affectsY: l } = t, { isHorizontal: u, isVertical: d } = t, f = u && d, { xSnapped: p, ySnapped: m } = n, { minWidth: h, maxWidth: g, minHeight: _, maxHeight: v } = r, { x: y, y: b, width: x, height: S, aspectRatio: C } = e, w = Math.floor(u ? p - e.pointerX : 0), T = Math.floor(d ? m - e.pointerY : 0), E = x + (c ? -w : w), D = S + (l ? -T : T), O = -a[0] * x, k = -a[1] * S, A = Vt(E, h, g), j = Vt(D, _, v);
1685
+ if (o) {
1686
+ let e = 0, t = 0;
1687
+ c && w < 0 ? e = Q(y + w + O, o[0][0]) : !c && w > 0 && (e = $(y + E + O, o[1][0])), l && T < 0 ? t = Q(b + T + k, o[0][1]) : !l && T > 0 && (t = $(b + D + k, o[1][1])), A = Math.max(A, e), j = Math.max(j, t);
1685
1688
  }
1686
- if (p) {
1687
- let e = 0, s = 0;
1688
- m && A > 0 ? e = getUpperExtentClamp(T + A, p[0][0]) : !m && A < 0 && (e = getLowerExtentClamp(T + M, p[1][0])), h && j > 0 ? s = getUpperExtentClamp(E + j, p[0][1]) : !h && j < 0 && (s = getLowerExtentClamp(E + N, p[1][1])), I = Math.max(I, e), L = Math.max(L, s);
1689
+ if (s) {
1690
+ let e = 0, t = 0;
1691
+ c && w > 0 ? e = $(y + w, s[0][0]) : !c && w < 0 && (e = Q(y + E, s[1][0])), l && T > 0 ? t = $(b + T, s[0][1]) : !l && T < 0 && (t = Q(b + D, s[1][1])), A = Math.max(A, e), j = Math.max(j, t);
1689
1692
  }
1690
- if (u) {
1691
- if (g) {
1692
- let e = getSizeClamp(M / k, C, w) * k;
1693
- if (I = Math.max(I, e), f) {
1693
+ if (i) {
1694
+ if (u) {
1695
+ let e = Vt(E / C, _, v) * C;
1696
+ if (A = Math.max(A, e), o) {
1694
1697
  let e = 0;
1695
- e = !m && !h || m && !h && v ? getUpperExtentClamp(E + F + M / k, f[1][1]) * k : getLowerExtentClamp(E + F + (m ? A : -A) / k, f[0][1]) * k, I = Math.max(I, e);
1698
+ e = !c && !l || c && !l && f ? $(b + k + E / C, o[1][1]) * C : Q(b + k + (c ? w : -w) / C, o[0][1]) * C, A = Math.max(A, e);
1696
1699
  }
1697
- if (p) {
1700
+ if (s) {
1698
1701
  let e = 0;
1699
- e = !m && !h || m && !h && v ? getLowerExtentClamp(E + M / k, p[1][1]) * k : getUpperExtentClamp(E + (m ? A : -A) / k, p[0][1]) * k, I = Math.max(I, e);
1702
+ e = !c && !l || c && !l && f ? Q(b + E / C, s[1][1]) * C : $(b + (c ? w : -w) / C, s[0][1]) * C, A = Math.max(A, e);
1700
1703
  }
1701
1704
  }
1702
- if (_) {
1703
- let e = getSizeClamp(N * k, x, S) / k;
1704
- if (L = Math.max(L, e), f) {
1705
+ if (d) {
1706
+ let e = Vt(D * C, h, g) / C;
1707
+ if (j = Math.max(j, e), o) {
1705
1708
  let e = 0;
1706
- e = !m && !h || h && !m && v ? getUpperExtentClamp(T + N * k + P, f[1][0]) / k : getLowerExtentClamp(T + (h ? j : -j) * k + P, f[0][0]) / k, L = Math.max(L, e);
1709
+ e = !c && !l || l && !c && f ? $(y + D * C + O, o[1][0]) / C : Q(y + (l ? T : -T) * C + O, o[0][0]) / C, j = Math.max(j, e);
1707
1710
  }
1708
- if (p) {
1711
+ if (s) {
1709
1712
  let e = 0;
1710
- e = !m && !h || h && !m && v ? getLowerExtentClamp(T + N * k, p[1][0]) / k : getUpperExtentClamp(T + (h ? j : -j) * k, p[0][0]) / k, L = Math.max(L, e);
1713
+ e = !c && !l || l && !c && f ? Q(y + D * C, s[1][0]) / C : $(y + (l ? T : -T) * C, s[0][0]) / C, j = Math.max(j, e);
1711
1714
  }
1712
1715
  }
1713
1716
  }
1714
- j += j < 0 ? L : -L, A += A < 0 ? I : -I, u && (v ? M > N * k ? j = (xor(m, h) ? -A : A) / k : A = (xor(m, h) ? -j : j) * k : g ? (j = A / k, h = m) : (A = j * k, m = h));
1715
- let R = m ? T + A : T, z = h ? E + j : E;
1717
+ T += T < 0 ? j : -j, w += w < 0 ? A : -A, i && (f ? E > D * C ? T = (Ht(c, l) ? -w : w) / C : w = (Ht(c, l) ? -T : T) * C : u ? (T = w / C, l = c) : (w = T * C, c = l));
1718
+ let M = c ? y + w : y, N = l ? b + T : b;
1716
1719
  return {
1717
- width: D + (m ? -A : A),
1718
- height: O + (h ? -j : j),
1719
- x: d[0] * A * (m ? -1 : 1) + R,
1720
- y: d[1] * j * (h ? -1 : 1) + z
1720
+ width: x + (c ? -w : w),
1721
+ height: S + (l ? -T : T),
1722
+ x: a[0] * w * (c ? -1 : 1) + M,
1723
+ y: a[1] * T * (l ? -1 : 1) + N
1721
1724
  };
1722
1725
  }
1723
- var initPrevValues = {
1726
+ var Wt = {
1724
1727
  width: 0,
1725
1728
  height: 0,
1726
1729
  x: 0,
1727
1730
  y: 0
1728
- }, initStartValues = {
1729
- ...initPrevValues,
1731
+ }, Gt = {
1732
+ ...Wt,
1730
1733
  pointerX: 0,
1731
1734
  pointerY: 0,
1732
1735
  aspectRatio: 1
1733
1736
  };
1734
- function nodeToParentExtent(e) {
1737
+ function Kt(e) {
1735
1738
  return [[0, 0], [e.measured.width, e.measured.height]];
1736
1739
  }
1737
- function nodeToChildExtent(e, s, c) {
1738
- let l = s.position.x + e.position.x, u = s.position.y + e.position.y, d = e.measured.width ?? 0, f = e.measured.height ?? 0, p = c[0] * d, m = c[1] * f;
1739
- return [[l - p, u - m], [l + d - p, u + f - m]];
1740
+ function qt(e, t, n) {
1741
+ let r = t.position.x + e.position.x, i = t.position.y + e.position.y, a = e.measured.width ?? 0, o = e.measured.height ?? 0, s = n[0] * a, c = n[1] * o;
1742
+ return [[r - s, i - c], [r + a - s, i + o - c]];
1740
1743
  }
1741
- function XYResizer({ domNode: s, nodeId: l, getStoreItems: u, onChange: d, onEnd: f }) {
1742
- let p = select_default(s), m = {
1743
- controlDirection: getControlDirection("bottom-right"),
1744
+ function Jt({ domNode: t, nodeId: r, getStoreItems: i, onChange: a, onEnd: o }) {
1745
+ let s = e(t), c = {
1746
+ controlDirection: Bt("bottom-right"),
1744
1747
  boundaries: {
1745
1748
  minWidth: 0,
1746
1749
  minHeight: 0,
@@ -1750,90 +1753,91 @@ function XYResizer({ domNode: s, nodeId: l, getStoreItems: u, onChange: d, onEnd
1750
1753
  resizeDirection: void 0,
1751
1754
  keepAspectRatio: !1
1752
1755
  };
1753
- function h({ controlPosition: e, boundaries: s, keepAspectRatio: h, resizeDirection: g, onResizeStart: _, onResize: v, onResizeEnd: y, shouldResize: b }) {
1754
- let x = { ...initPrevValues }, S = { ...initStartValues };
1755
- m = {
1756
- boundaries: s,
1757
- resizeDirection: g,
1758
- keepAspectRatio: h,
1759
- controlDirection: getControlDirection(e)
1756
+ function l({ controlPosition: e, boundaries: t, keepAspectRatio: l, resizeDirection: u, onResizeStart: d, onResize: f, onResizeEnd: p, shouldResize: m }) {
1757
+ let h = { ...Wt }, g = { ...Gt };
1758
+ c = {
1759
+ boundaries: t,
1760
+ resizeDirection: u,
1761
+ keepAspectRatio: l,
1762
+ controlDirection: Bt(e)
1760
1763
  };
1761
- let C, w = null, T = [], E, D, O, k = !1, A = drag_default().on("start", (e) => {
1762
- let { nodeLookup: s, transform: c, snapGrid: d, snapToGrid: f, nodeOrigin: p, paneDomNode: m } = u();
1763
- if (C = s.get(l), !C) return;
1764
- w = m?.getBoundingClientRect() ?? null;
1765
- let { xSnapped: h, ySnapped: g } = getPointerPosition(e.sourceEvent, {
1766
- transform: c,
1767
- snapGrid: d,
1768
- snapToGrid: f,
1769
- containerBounds: w
1764
+ let _, v = null, y = [], b, x, S, C = !1, w = n().on("start", (e) => {
1765
+ let { nodeLookup: t, transform: n, snapGrid: a, snapToGrid: o, nodeOrigin: s, paneDomNode: c } = i();
1766
+ if (_ = t.get(r), !_) return;
1767
+ v = c?.getBoundingClientRect() ?? null;
1768
+ let { xSnapped: l, ySnapped: u } = me(e.sourceEvent, {
1769
+ transform: n,
1770
+ snapGrid: a,
1771
+ snapToGrid: o,
1772
+ containerBounds: v
1770
1773
  });
1771
- x = {
1772
- width: C.measured.width ?? 0,
1773
- height: C.measured.height ?? 0,
1774
- x: C.position.x ?? 0,
1775
- y: C.position.y ?? 0
1776
- }, S = {
1777
- ...x,
1778
- pointerX: h,
1779
- pointerY: g,
1780
- aspectRatio: x.width / x.height
1781
- }, E = void 0, C.parentId && (C.extent === "parent" || C.expandParent) && (E = s.get(C.parentId), D = E && C.extent === "parent" ? nodeToParentExtent(E) : void 0), T = [], O = void 0;
1782
- for (let [e, c] of s) if (c.parentId === l && (T.push({
1774
+ h = {
1775
+ width: _.measured.width ?? 0,
1776
+ height: _.measured.height ?? 0,
1777
+ x: _.position.x ?? 0,
1778
+ y: _.position.y ?? 0
1779
+ }, g = {
1780
+ ...h,
1781
+ pointerX: l,
1782
+ pointerY: u,
1783
+ aspectRatio: h.width / h.height
1784
+ }, b = void 0, _.parentId && (_.extent === "parent" || _.expandParent) && (b = t.get(_.parentId), x = b && _.extent === "parent" ? Kt(b) : void 0), y = [], S = void 0;
1785
+ for (let [e, n] of t) if (n.parentId === r && (y.push({
1783
1786
  id: e,
1784
- position: { ...c.position },
1785
- extent: c.extent
1786
- }), c.extent === "parent" || c.expandParent)) {
1787
- let e = nodeToChildExtent(c, C, c.origin ?? p);
1788
- O = O ? [[Math.min(e[0][0], O[0][0]), Math.min(e[0][1], O[0][1])], [Math.max(e[1][0], O[1][0]), Math.max(e[1][1], O[1][1])]] : e;
1787
+ position: { ...n.position },
1788
+ extent: n.extent
1789
+ }), n.extent === "parent" || n.expandParent)) {
1790
+ let e = qt(n, _, n.origin ?? s);
1791
+ S = S ? [[Math.min(e[0][0], S[0][0]), Math.min(e[0][1], S[0][1])], [Math.max(e[1][0], S[1][0]), Math.max(e[1][1], S[1][1])]] : e;
1789
1792
  }
1790
- _?.(e, { ...x });
1793
+ d?.(e, { ...h });
1791
1794
  }).on("drag", (e) => {
1792
- let { transform: s, snapGrid: c, snapToGrid: l, nodeOrigin: f } = u(), p = getPointerPosition(e.sourceEvent, {
1793
- transform: s,
1794
- snapGrid: c,
1795
- snapToGrid: l,
1796
- containerBounds: w
1797
- }), h = [];
1798
- if (!C) return;
1799
- let { x: g, y: _, width: y, height: A } = x, j = {}, M = C.origin ?? f, { width: N, height: P, x: F, y: I } = getDimensionsAfterResize(S, m.controlDirection, p, m.boundaries, m.keepAspectRatio, M, D, O), L = N !== y, R = P !== A, z = F !== g && L, B = I !== _ && R;
1800
- if (!z && !B && !L && !R) return;
1801
- if ((z || B || M[0] === 1 || M[1] === 1) && (j.x = z ? F : x.x, j.y = B ? I : x.y, x.x = j.x, x.y = j.y, T.length > 0)) {
1802
- let e = F - g, s = I - _;
1803
- for (let c of T) c.position = {
1804
- x: c.position.x - e + M[0] * (N - y),
1805
- y: c.position.y - s + M[1] * (P - A)
1806
- }, h.push(c);
1795
+ let { transform: t, snapGrid: n, snapToGrid: r, nodeOrigin: o } = i(), s = me(e.sourceEvent, {
1796
+ transform: t,
1797
+ snapGrid: n,
1798
+ snapToGrid: r,
1799
+ containerBounds: v
1800
+ }), l = [];
1801
+ if (!_) return;
1802
+ let { x: u, y: d, width: p, height: w } = h, T = {}, E = _.origin ?? o, { width: D, height: O, x: k, y: A } = Ut(g, c.controlDirection, s, c.boundaries, c.keepAspectRatio, E, x, S), j = D !== p, M = O !== w, N = k !== u && j, P = A !== d && M;
1803
+ if (!N && !P && !j && !M) return;
1804
+ if ((N || P || E[0] === 1 || E[1] === 1) && (T.x = N ? k : h.x, T.y = P ? A : h.y, h.x = T.x, h.y = T.y, y.length > 0)) {
1805
+ let e = k - u, t = A - d;
1806
+ for (let n of y) n.position = {
1807
+ x: n.position.x - e + E[0] * (D - p),
1808
+ y: n.position.y - t + E[1] * (O - w)
1809
+ }, l.push(n);
1807
1810
  }
1808
- if ((L || R) && (j.width = L && (!m.resizeDirection || m.resizeDirection === "horizontal") ? N : x.width, j.height = R && (!m.resizeDirection || m.resizeDirection === "vertical") ? P : x.height, x.width = j.width, x.height = j.height), E && C.expandParent) {
1809
- let e = M[0] * (j.width ?? 0);
1810
- j.x && j.x < e && (x.x = e, S.x -= j.x - e);
1811
- let s = M[1] * (j.height ?? 0);
1812
- j.y && j.y < s && (x.y = s, S.y -= j.y - s);
1811
+ if ((j || M) && (T.width = j && (!c.resizeDirection || c.resizeDirection === "horizontal") ? D : h.width, T.height = M && (!c.resizeDirection || c.resizeDirection === "vertical") ? O : h.height, h.width = T.width, h.height = T.height), b && _.expandParent) {
1812
+ let e = E[0] * (T.width ?? 0);
1813
+ T.x && T.x < e && (h.x = e, g.x -= T.x - e);
1814
+ let t = E[1] * (T.height ?? 0);
1815
+ T.y && T.y < t && (h.y = t, g.y -= T.y - t);
1813
1816
  }
1814
- let V = getResizeDirection({
1815
- width: x.width,
1816
- prevWidth: y,
1817
- height: x.height,
1818
- prevHeight: A,
1819
- affectsX: m.controlDirection.affectsX,
1820
- affectsY: m.controlDirection.affectsY
1821
- }), H = {
1822
- ...x,
1823
- direction: V
1817
+ let F = zt({
1818
+ width: h.width,
1819
+ prevWidth: p,
1820
+ height: h.height,
1821
+ prevHeight: w,
1822
+ affectsX: c.controlDirection.affectsX,
1823
+ affectsY: c.controlDirection.affectsY
1824
+ }), I = {
1825
+ ...h,
1826
+ direction: F
1824
1827
  };
1825
- b?.(e, H) !== !1 && (k = !0, v?.(e, H), d(j, h));
1828
+ m?.(e, I) !== !1 && (C = !0, f?.(e, I), a(T, l));
1826
1829
  }).on("end", (e) => {
1827
- k &&= (y?.(e, { ...x }), f?.({ ...x }), !1);
1830
+ C &&= (p?.(e, { ...h }), o?.({ ...h }), !1);
1828
1831
  });
1829
- p.call(A);
1832
+ s.call(w);
1830
1833
  }
1831
- function g() {
1832
- p.on(".drag", null);
1834
+ function u() {
1835
+ s.on(".drag", null);
1833
1836
  }
1834
1837
  return {
1835
- update: h,
1836
- destroy: g
1838
+ update: l,
1839
+ destroy: u
1837
1840
  };
1838
1841
  }
1839
- export { ConnectionLineType, ConnectionMode, MarkerType, PanOnScrollMode, Position, ResizeControlVariant, SelectionMode, XYDrag, XYHandle, XYMinimap, XYPanZoom, XYResizer, addEdge, adoptUserNodes, areSetsEqual, calculateNodePosition, createMarkerIds, defaultAriaLabelConfig, devWarn, elementSelectionKeys, errorMessages, evaluateAbsolutePosition, fitViewport, getBezierEdgeCenter, getBezierPath, getBoundsOfRects, getConnectedEdges, getConnectionStatus, getDimensions, getEdgeCenter, getEdgePosition, getElementsToRemove, getElevatedEdgeZIndex, getEventPosition, getHandlePosition, getHostForElement, getInternalNodesBounds, getMarkerId, getNodeDimensions, getNodesBounds, getNodesInside, getOverlappingArea, getSmoothStepPath, getStraightPath, getViewportForBounds, handleExpandParent, infiniteExtent, initialConnection, isEdgeBase, isEdgeVisible, isInputDOMNode, isMacOs, isMouseEvent, isNodeBase, isNumeric, isRectObject, mergeAriaLabelConfig, nodeHasDimensions, nodeToRect, panBy, pointToRendererPoint, rendererPointToPoint, snapPosition, updateAbsolutePositions, updateConnectionLookup, updateNodeInternals, withResolvers };
1842
+ //#endregion
1843
+ export { g as ConnectionLineType, f as ConnectionMode, _ as MarkerType, p as PanOnScrollMode, v as Position, Rt as ResizeControlVariant, m as SelectionMode, pt as XYDrag, Ct as XYHandle, wt as XYMinimap, Lt as XYPanZoom, Jt as XYResizer, Ae as addEdge, Qe as adoptUserNodes, de as areSetsEqual, j as calculateNodePosition, Ue as createMarkerIds, d as defaultAriaLabelConfig, W as devWarn, u as elementSelectionKeys, c as errorMessages, ue as evaluateAbsolutePosition, A as fitViewport, xe as getBezierEdgeCenter, we as getBezierPath, B as getBoundsOfRects, O as getConnectedEdges, b as getConnectionStatus, he as getDimensions, Te as getEdgeCenter, ze as getEdgePosition, M as getElementsToRemove, Ee as getElevatedEdgeZIndex, Y as getEventPosition, X as getHandlePosition, ge as getHostForElement, E as getInternalNodesBounds, He as getMarkerId, J as getNodeDimensions, T as getNodesBounds, D as getNodesInside, V as getOverlappingArea, Le as getSmoothStepPath, je as getStraightPath, se as getViewportForBounds, rt as handleExpandParent, l as infiniteExtent, h as initialConnection, x as isEdgeBase, De as isEdgeVisible, ve as isInputDOMNode, ce as isMacOs, ye as isMouseEvent, S as isNodeBase, U as isNumeric, H as isRectObject, pe as mergeAriaLabelConfig, le as nodeHasDimensions, z as nodeToRect, at as panBy, re as pointToRendererPoint, ie as rendererPointToPoint, G as snapPosition, Ye as updateAbsolutePositions, st as updateConnectionLookup, it as updateNodeInternals, fe as withResolvers };