abstra 3.23.11__py3-none-any.whl → 3.24.0__py3-none-any.whl

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 (268) hide show
  1. abstra/ai.py +2 -0
  2. abstra/cli.py +8 -3
  3. {abstra-3.23.11.dist-info → abstra-3.24.0.dist-info}/METADATA +2 -1
  4. {abstra-3.23.11.dist-info → abstra-3.24.0.dist-info}/RECORD +201 -191
  5. abstra_internals/consts/filepaths.py +1 -1
  6. abstra_internals/contracts_generated.py +5382 -5233
  7. abstra_internals/controllers/ai.py +23 -15
  8. abstra_internals/controllers/git.py +305 -0
  9. abstra_internals/controllers/main.py +10 -6
  10. abstra_internals/entities/forms/template.py +2 -2
  11. abstra_internals/environment.py +6 -0
  12. abstra_internals/interface/cli/deploy.py +1 -1
  13. abstra_internals/interface/sdk/ai.py +157 -19
  14. abstra_internals/repositories/git/__init__.py +38 -0
  15. abstra_internals/repositories/git/dulwich.py +1353 -0
  16. abstra_internals/repositories/git/git_test.py +1572 -0
  17. abstra_internals/repositories/git/native.py +578 -0
  18. abstra_internals/repositories/git/types.py +267 -0
  19. abstra_internals/repositories/linter/rules/env_in_bundle.py +5 -5
  20. abstra_internals/repositories/linter/rules/env_in_bundle_test.py +6 -6
  21. abstra_internals/repositories/linter/rules/venv_in_bundle.py +9 -16
  22. abstra_internals/server/blueprints/editor.py +4 -0
  23. abstra_internals/server/routes/ai.py +1 -18
  24. abstra_internals/server/routes/git.py +190 -0
  25. abstra_internals/server/routes/workspace.py +1 -1
  26. abstra_internals/services/file_watcher.py +32 -13
  27. abstra_internals/services/fs.py +8 -5
  28. abstra_internals/services/fs_test.py +4 -6
  29. abstra_internals/templates/__init__.py +0 -11
  30. abstra_statics/dist/assets/AbstraButton.vue_vue_type_script_setup_true_lang.eb8ccb64.js +2 -0
  31. abstra_statics/dist/assets/AbstraLogo.vue_vue_type_script_setup_true_lang.9f98292e.js +2 -0
  32. abstra_statics/dist/assets/ApiKeys.e975c4f3.js +2 -0
  33. abstra_statics/dist/assets/App.f62faff6.js +2 -0
  34. abstra_statics/dist/assets/App.vue_vue_type_style_index_0_lang.5aa45ac1.js +2 -0
  35. abstra_statics/dist/assets/BaseLayout.1ec2c96d.js +2 -0
  36. abstra_statics/dist/assets/Billing.60adc9fa.js +2 -0
  37. abstra_statics/dist/assets/{Breadcrumb.f11a16d0.js → Breadcrumb.26dec5f7.js} +2 -2
  38. abstra_statics/dist/assets/{Builds.2bf5dad8.js → Builds.f86210bc.js} +2 -2
  39. abstra_statics/dist/assets/{Card.6caecaa4.js → Card.6cfffb80.js} +2 -2
  40. abstra_statics/dist/assets/{CircularLoading.bc88c029.js → CircularLoading.a13d6a76.js} +2 -2
  41. abstra_statics/dist/assets/CloseCircleOutlined.30bc25a8.js +2 -0
  42. abstra_statics/dist/assets/{ConnectorsView.aeb00ce8.css → ConnectorsView.33c5380f.css} +1 -1
  43. abstra_statics/dist/assets/ConnectorsView.eb4c769f.js +2 -0
  44. abstra_statics/dist/assets/ConsoleOmniChat.vue_vue_type_script_setup_true_lang.8d2e4672.js +2 -0
  45. abstra_statics/dist/assets/ContentLayout.d03fee5b.js +2 -0
  46. abstra_statics/dist/assets/{CrudView.79588134.js → CrudView.c0824225.js} +2 -2
  47. abstra_statics/dist/assets/{DocsButton.vue_vue_type_script_setup_true_lang.6566ff97.js → DocsButton.vue_vue_type_script_setup_true_lang.3668aee4.js} +2 -2
  48. abstra_statics/dist/assets/{EditorLogin.e704b2ee.js → EditorLogin.46db248f.js} +2 -2
  49. abstra_statics/dist/assets/EditorsView.e72621fa.js +2 -0
  50. abstra_statics/dist/assets/EnvVars.f9f9d61f.js +2 -0
  51. abstra_statics/dist/assets/{Error.f378696f.js → Error.864f05b3.js} +2 -2
  52. abstra_statics/dist/assets/ExclamationCircleOutlined.a489b996.js +2 -0
  53. abstra_statics/dist/assets/{Files.06a52abd.js → Files.afe615e1.js} +2 -2
  54. abstra_statics/dist/assets/Form.556d0de2.js +2 -0
  55. abstra_statics/dist/assets/{FormRunner.2b75fd4d.js → FormRunner.7f56a8c6.js} +2 -2
  56. abstra_statics/dist/assets/Home.287d17f8.js +2 -0
  57. abstra_statics/dist/assets/Home.5b7e9c23.js +2 -0
  58. abstra_statics/dist/assets/{Live.08670b33.js → Live.50bacfea.js} +2 -2
  59. abstra_statics/dist/assets/LoadingContainer.ebace8de.js +2 -0
  60. abstra_statics/dist/assets/{LoadingOutlined.659d6aae.js → LoadingOutlined.9e949112.js} +2 -2
  61. abstra_statics/dist/assets/{Login.8491c4b7.js → Login.536a3067.js} +2 -2
  62. abstra_statics/dist/assets/Login.bec408c9.js +2 -0
  63. abstra_statics/dist/assets/{Login.vue_vue_type_script_setup_true_lang.eb94ecc3.js → Login.vue_vue_type_script_setup_true_lang.1c3f108d.js} +2 -2
  64. abstra_statics/dist/assets/{Logo.a32d36e7.js → Logo.82d6ab70.js} +2 -2
  65. abstra_statics/dist/assets/{Logs.030c8a19.js → Logs.f6135084.js} +2 -2
  66. abstra_statics/dist/assets/{LogsController.7e2c0c7a.js → LogsController.6b666816.js} +2 -2
  67. abstra_statics/dist/assets/Main.77b115f8.js +2 -0
  68. abstra_statics/dist/assets/{MockForm.8b56fd25.js → MockForm.deda9355.js} +2 -2
  69. abstra_statics/dist/assets/Navbar.4a6f2b09.js +2 -0
  70. abstra_statics/dist/assets/NewEditor.5f84de86.css +1 -0
  71. abstra_statics/dist/assets/NewEditor.e558e47d.js +8 -0
  72. abstra_statics/dist/assets/OidcLoginCallback.7f514b45.js +2 -0
  73. abstra_statics/dist/assets/OidcLogoutCallback.038813a1.js +2 -0
  74. abstra_statics/dist/assets/OmniChat.05ba8d8a.css +1 -0
  75. abstra_statics/dist/assets/OmniChat.60d98deb.js +6 -0
  76. abstra_statics/dist/assets/{OnboardingView.262e82cc.js → OnboardingView.9413ee50.js} +2 -2
  77. abstra_statics/dist/assets/{Organization.4f3ccb55.js → Organization.7203cc0b.js} +2 -2
  78. abstra_statics/dist/assets/Organizations.91220ca0.js +2 -0
  79. abstra_statics/dist/assets/{PhArrowCounterClockwise.vue.a1a917b9.js → PhArrowCounterClockwise.vue.8090d021.js} +2 -2
  80. abstra_statics/dist/assets/{PhArrowSquareOut.vue.eb4455ba.js → PhArrowSquareOut.vue.26582195.js} +2 -2
  81. abstra_statics/dist/assets/{PhBookBookmark.vue.7bb66888.js → PhBookBookmark.vue.5b7ab079.js} +2 -2
  82. abstra_statics/dist/assets/{PhChats.vue.88d84608.js → PhChats.vue.b5df7174.js} +2 -2
  83. abstra_statics/dist/assets/{PhClockCounterClockwise.vue.02d85ea5.js → PhClockCounterClockwise.vue.812311ad.js} +2 -2
  84. abstra_statics/dist/assets/{PhCopy.vue.5664181e.js → PhCopy.vue.59b0f1b4.js} +2 -2
  85. abstra_statics/dist/assets/{PhCopySimple.vue.beb69d1f.js → PhCopySimple.vue.d41d9160.js} +2 -2
  86. abstra_statics/dist/assets/{PhCube.vue.8de1132a.js → PhCube.vue.63ae7d32.js} +2 -2
  87. abstra_statics/dist/assets/PhDatabase.vue.edfcb96b.js +2 -0
  88. abstra_statics/dist/assets/{PhDotsThreeVertical.vue.9e306480.js → PhDotsThreeVertical.vue.ab4580a5.js} +2 -2
  89. abstra_statics/dist/assets/PhDownloadSimple.vue.c2eaaad1.js +2 -0
  90. abstra_statics/dist/assets/{PhFolderPlus.vue.658105d4.js → PhFolderPlus.vue.05ba4a5c.js} +2 -2
  91. abstra_statics/dist/assets/{PhGear.vue.68bce043.js → PhGear.vue.0e4a6135.js} +2 -2
  92. abstra_statics/dist/assets/{PhKey.vue.3f5192b6.js → PhKey.vue.b2c184d1.js} +2 -2
  93. abstra_statics/dist/assets/{PhPencil.vue.ee28fb6e.js → PhPencil.vue.2f2fe576.js} +2 -2
  94. abstra_statics/dist/assets/{PhPencilSimple.vue.148807f6.js → PhPencilSimple.vue.cc8620ae.js} +2 -2
  95. abstra_statics/dist/assets/{PhRocket.vue.7ba12859.js → PhRocket.vue.e397203c.js} +2 -2
  96. abstra_statics/dist/assets/{PhSignOut.vue.aa78b6eb.js → PhSignOut.vue.a271f14b.js} +2 -2
  97. abstra_statics/dist/assets/{PhSparkle.vue.7820be45.js → PhSparkle.vue.726defa2.js} +2 -2
  98. abstra_statics/dist/assets/{PhUserList.vue.04f21cbe.js → PhUserList.vue.6a29f16d.js} +2 -2
  99. abstra_statics/dist/assets/{PhUsersThree.vue.8b11b97d.js → PhUsersThree.vue.275d13ab.js} +2 -2
  100. abstra_statics/dist/assets/PhWarningCircle.vue.3b1aca1b.js +2 -0
  101. abstra_statics/dist/assets/{PhWebhooksLogo.vue.9e20d559.js → PhWebhooksLogo.vue.5e772aac.js} +2 -2
  102. abstra_statics/dist/assets/{PlayerConfigProvider.0915b29f.js → PlayerConfigProvider.e90a2b41.js} +2 -2
  103. abstra_statics/dist/assets/{PlayerNavbar.78cf73f2.js → PlayerNavbar.11ec1844.js} +2 -2
  104. abstra_statics/dist/assets/Project.c16740fb.js +2 -0
  105. abstra_statics/dist/assets/ProjectLogin.e7a6f444.js +2 -0
  106. abstra_statics/dist/assets/{ProjectSettings.f9bf9124.js → ProjectSettings.52c19693.js} +2 -2
  107. abstra_statics/dist/assets/{ProjectsView.407ea382.js → ProjectsView.22fa7a8e.js} +2 -2
  108. abstra_statics/dist/assets/{SaveButton.e70cd09e.js → SaveButton.719393d2.js} +2 -2
  109. abstra_statics/dist/assets/{ScrollArea.vue_vue_type_script_setup_true_lang.cf352882.js → ScrollArea.vue_vue_type_script_setup_true_lang.d4028954.js} +2 -2
  110. abstra_statics/dist/assets/{Sidebar.e69f49bd.css → Sidebar.29baeab0.css} +1 -1
  111. abstra_statics/dist/assets/{Sidebar.ce129494.js → Sidebar.5cb8e04e.js} +2 -2
  112. abstra_statics/dist/assets/Sql.23d80bad.js +5 -0
  113. abstra_statics/dist/assets/Sql.90e6e2ba.css +1 -0
  114. abstra_statics/dist/assets/Steps.8e5d201a.js +2 -0
  115. abstra_statics/dist/assets/TableCard.529112b9.css +1 -0
  116. abstra_statics/dist/assets/TableCard.59f95f8f.js +2 -0
  117. abstra_statics/dist/assets/TableEditor.5853a363.css +1 -0
  118. abstra_statics/dist/assets/TableEditor.8539f984.js +2 -0
  119. abstra_statics/dist/assets/Tables.44d953f7.js +2 -0
  120. abstra_statics/dist/assets/TablesDiagram.8e47383c.js +15 -0
  121. abstra_statics/dist/assets/TablesDiagram.a588e7ff.css +1 -0
  122. abstra_statics/dist/assets/TablesTabs.vue_vue_type_script_setup_true_lang.6866fb32.js +2 -0
  123. abstra_statics/dist/assets/{Tasks.c9ba3095.js → Tasks.09551b19.js} +2 -2
  124. abstra_statics/dist/assets/{UploadOutlined.c563b054.js → UploadOutlined.eab75eb0.js} +2 -2
  125. abstra_statics/dist/assets/View.5fd7ddf0.js +2 -0
  126. abstra_statics/dist/assets/{View.vue_vue_type_script_setup_true_lang.a00f21c8.js → View.vue_vue_type_script_setup_true_lang.a904f400.js} +2 -2
  127. abstra_statics/dist/assets/{Watermark.c71c105b.js → Watermark.ab3d818f.js} +2 -2
  128. abstra_statics/dist/assets/WebEditor.d6ec6392.js +2 -0
  129. abstra_statics/dist/assets/{WidgetPreview.8bd406f7.js → WidgetPreview.86b31dec.js} +2 -2
  130. abstra_statics/dist/assets/{ant-design.06b818ab.js → ant-design.a865486e.js} +2 -2
  131. abstra_statics/dist/assets/apiKey.72f497ca.js +2 -0
  132. abstra_statics/dist/assets/{asyncComputed.bfb7341c.js → asyncComputed.cf5282fc.js} +2 -2
  133. abstra_statics/dist/assets/{build.aef51d48.js → build.df2d55cc.js} +2 -2
  134. abstra_statics/dist/assets/colorHelpers.37d9932b.js +2 -0
  135. abstra_statics/dist/assets/console.2bf7f04d.js +17 -0
  136. abstra_statics/dist/assets/{constants.b75d9567.js → constants.7d38ec8b.js} +2 -2
  137. abstra_statics/dist/assets/contracts.generated.590b1102.js +2 -0
  138. abstra_statics/dist/assets/{cssMode.0aa24dcd.js → cssMode.7133c7cb.js} +2 -2
  139. abstra_statics/dist/assets/{datetime.46141396.js → datetime.8de2ff28.js} +2 -2
  140. abstra_statics/dist/assets/dayjs.f18bbbca.js +2 -0
  141. abstra_statics/dist/assets/editor.3a4714e3.js +2 -0
  142. abstra_statics/dist/assets/editor.main.9c635b9a.js +2 -0
  143. abstra_statics/dist/assets/fetch.89fd5b7b.js +2 -0
  144. abstra_statics/dist/assets/{folder.fe6adcd2.js → folder.d8e23009.js} +2 -2
  145. abstra_statics/dist/assets/{freemarker2.8bd96640.js → freemarker2.6698d1ea.js} +2 -2
  146. abstra_statics/dist/assets/{handlebars.e5dd9b19.js → handlebars.a6c42dc0.js} +2 -2
  147. abstra_statics/dist/assets/{html.7bcef916.js → html.493a5410.js} +2 -2
  148. abstra_statics/dist/assets/{htmlMode.ce91c230.js → htmlMode.a28b2fca.js} +2 -2
  149. abstra_statics/dist/assets/{index.fe015dd3.js → index.2af3391c.js} +2 -2
  150. abstra_statics/dist/assets/{index.57a61691.js → index.4176fe88.js} +2 -2
  151. abstra_statics/dist/assets/{index.16664500.js → index.4d20c159.js} +2 -2
  152. abstra_statics/dist/assets/{index.ee218f7a.js → index.5d6b1e62.js} +2 -2
  153. abstra_statics/dist/assets/{index.06cad1f2.js → index.79ce3bf1.js} +2 -2
  154. abstra_statics/dist/assets/{index.161ccee5.js → index.c34a405a.js} +2 -2
  155. abstra_statics/dist/assets/index.fb182bd1.js +2 -0
  156. abstra_statics/dist/assets/{index.005bab7f.js → index.fb49354b.js} +2 -2
  157. abstra_statics/dist/assets/{javascript.4d5c0a37.js → javascript.3a36cf17.js} +2 -2
  158. abstra_statics/dist/assets/{jsonMode.0942a255.js → jsonMode.bead6ac8.js} +2 -2
  159. abstra_statics/dist/assets/{jwt-decode.esm.e1e8e181.js → jwt-decode.esm.d4517a10.js} +8 -8
  160. abstra_statics/dist/assets/{linters.39cc198f.js → linters.2f3141cb.js} +2 -2
  161. abstra_statics/dist/assets/{liquid.884b015e.js → liquid.0c337fae.js} +3 -3
  162. abstra_statics/dist/assets/member.48d6f2cd.js +2 -0
  163. abstra_statics/dist/assets/{metadata.034775c8.js → metadata.c3aed6e1.js} +2 -2
  164. abstra_statics/dist/assets/omniChatStore.c53bcca2.js +8 -0
  165. abstra_statics/dist/assets/{organization.a29009bc.js → organization.928c9bef.js} +2 -2
  166. abstra_statics/dist/assets/player.d3aeafc5.js +2 -0
  167. abstra_statics/dist/assets/{plotly.min.df1e817c.js → plotly.min.7225d3a0.js} +2 -2
  168. abstra_statics/dist/assets/{polling.84bf96db.js → polling.82ee6b45.js} +2 -2
  169. abstra_statics/dist/assets/{project.a9ad86e9.js → project.619b7244.js} +2 -2
  170. abstra_statics/dist/assets/{python.17c791bf.js → python.05764499.js} +3 -3
  171. abstra_statics/dist/assets/{razor.4b071c3b.js → razor.81a45581.js} +2 -2
  172. abstra_statics/dist/assets/record.7f43486c.js +2 -0
  173. abstra_statics/dist/assets/{redirect.cd158e43.js → redirect.f028a879.js} +2 -2
  174. abstra_statics/dist/assets/repository.9534db4b.js +2 -0
  175. abstra_statics/dist/assets/repository.c15239ce.js +2 -0
  176. abstra_statics/dist/assets/router.262190ec.js +2 -0
  177. abstra_statics/dist/assets/router.424f7da9.js +18 -0
  178. abstra_statics/dist/assets/string.0acf5572.js +2 -0
  179. abstra_statics/dist/assets/{tables.928d4c4a.js → tables.1f68ec62.js} +2 -2
  180. abstra_statics/dist/assets/{tasksController.95334db5.js → tasksController.371896de.js} +2 -2
  181. abstra_statics/dist/assets/{toggleHighContrast.67a76682.js → toggleHighContrast.0d0e5662.js} +7 -7
  182. abstra_statics/dist/assets/{tsMode.bd4befb2.js → tsMode.6eadbf06.js} +2 -2
  183. abstra_statics/dist/assets/{typescript.b5722de7.js → typescript.1670e287.js} +2 -2
  184. abstra_statics/dist/assets/url.e8732f77.js +2 -0
  185. abstra_statics/dist/assets/{useCodebaseEvents.47e4fcfe.js → useCodebaseEvents.53dec1f2.js} +2 -2
  186. abstra_statics/dist/assets/useTables.4f034cf8.js +2 -0
  187. abstra_statics/dist/assets/userStore.31024da3.js +2 -0
  188. abstra_statics/dist/assets/uuid.bde15ce7.js +2 -0
  189. abstra_statics/dist/assets/vue-flow-background.818c7852.js +2 -0
  190. abstra_statics/dist/assets/vue-flow-core.1180ec83.js +22 -0
  191. abstra_statics/dist/assets/{vue-quill.esm-bundler.d6a7c536.js → vue-quill.esm-bundler.c4f04985.js} +2 -2
  192. abstra_statics/dist/assets/{workspaceStore.cca10750.js → workspaceStore.6244d03d.js} +2 -2
  193. abstra_statics/dist/assets/{xml.0a62ffce.js → xml.f2867af8.js} +3 -3
  194. abstra_statics/dist/assets/{yaml.1efc213f.js → yaml.5427bb1b.js} +3 -3
  195. abstra_statics/dist/console.html +14 -15
  196. abstra_statics/dist/editor.html +13 -13
  197. abstra_statics/dist/player.html +9 -9
  198. tests/e2e/test_crud_files.py +1 -0
  199. abstra_internals/templates/abstraignore +0 -8
  200. abstra_statics/dist/assets/AbstraButton.vue_vue_type_script_setup_true_lang.3fce0fbb.js +0 -2
  201. abstra_statics/dist/assets/AbstraLogo.vue_vue_type_script_setup_true_lang.4fb1f88a.js +0 -2
  202. abstra_statics/dist/assets/ApiKeys.56b97ced.js +0 -2
  203. abstra_statics/dist/assets/App.bd5ec032.js +0 -2
  204. abstra_statics/dist/assets/App.vue_vue_type_style_index_0_lang.79524273.js +0 -2
  205. abstra_statics/dist/assets/BaseLayout.ac22ef55.js +0 -2
  206. abstra_statics/dist/assets/Billing.2c39d133.js +0 -2
  207. abstra_statics/dist/assets/CloseCircleOutlined.12f63f77.js +0 -2
  208. abstra_statics/dist/assets/ConnectorsView.97a8c63b.js +0 -2
  209. abstra_statics/dist/assets/ConsoleOmniChat.vue_vue_type_script_setup_true_lang.48b29302.js +0 -2
  210. abstra_statics/dist/assets/ContentLayout.072b3790.js +0 -2
  211. abstra_statics/dist/assets/EditorsView.987a7eda.js +0 -2
  212. abstra_statics/dist/assets/EnvVars.c5e84d82.js +0 -2
  213. abstra_statics/dist/assets/ExclamationCircleOutlined.f9a25080.js +0 -2
  214. abstra_statics/dist/assets/Form.4633ab8e.js +0 -2
  215. abstra_statics/dist/assets/Home.a883da25.js +0 -2
  216. abstra_statics/dist/assets/Home.d122da63.js +0 -2
  217. abstra_statics/dist/assets/LoadingContainer.b11f052c.js +0 -2
  218. abstra_statics/dist/assets/Login.84d39327.js +0 -2
  219. abstra_statics/dist/assets/Main.70db8614.js +0 -2
  220. abstra_statics/dist/assets/Navbar.6acd9007.js +0 -2
  221. abstra_statics/dist/assets/NewEditor.15e29eac.js +0 -8
  222. abstra_statics/dist/assets/NewEditor.6dd8f03b.css +0 -1
  223. abstra_statics/dist/assets/OidcLoginCallback.b65a6f9f.js +0 -2
  224. abstra_statics/dist/assets/OidcLogoutCallback.dabd09cf.js +0 -2
  225. abstra_statics/dist/assets/OmniChat.078af315.css +0 -1
  226. abstra_statics/dist/assets/OmniChat.6ed96f8e.js +0 -6
  227. abstra_statics/dist/assets/Organizations.d90dd629.js +0 -2
  228. abstra_statics/dist/assets/PhDownloadSimple.vue.6192bb0e.js +0 -2
  229. abstra_statics/dist/assets/PhPencilSimpleLine.vue.af76e884.js +0 -2
  230. abstra_statics/dist/assets/Project.34c75b7c.js +0 -2
  231. abstra_statics/dist/assets/ProjectLogin.9b8cb3d1.js +0 -2
  232. abstra_statics/dist/assets/Sql.3cdc910a.css +0 -1
  233. abstra_statics/dist/assets/Sql.4e31662a.js +0 -5
  234. abstra_statics/dist/assets/Steps.4c850501.js +0 -2
  235. abstra_statics/dist/assets/TableEditor.1e680eaf.css +0 -1
  236. abstra_statics/dist/assets/TableEditor.e7371677.js +0 -2
  237. abstra_statics/dist/assets/Tables.f2c23e20.js +0 -2
  238. abstra_statics/dist/assets/TablesDiagram.1ec45dd9.css +0 -1
  239. abstra_statics/dist/assets/TablesDiagram.8297ec4b.js +0 -15
  240. abstra_statics/dist/assets/TablesTabs.vue_vue_type_script_setup_true_lang.ec94f9e7.js +0 -2
  241. abstra_statics/dist/assets/View.4c3c38ba.js +0 -2
  242. abstra_statics/dist/assets/WebEditor.4ef39590.js +0 -2
  243. abstra_statics/dist/assets/apiKey.e3aa9e16.js +0 -2
  244. abstra_statics/dist/assets/colorHelpers.e94da383.js +0 -2
  245. abstra_statics/dist/assets/console.86947afb.js +0 -25
  246. abstra_statics/dist/assets/contracts.generated.7508e893.js +0 -2
  247. abstra_statics/dist/assets/dayjs.b4dc8227.js +0 -2
  248. abstra_statics/dist/assets/editor.4f4b7594.js +0 -2
  249. abstra_statics/dist/assets/editor.main.340c0a2d.js +0 -2
  250. abstra_statics/dist/assets/fetch.cfa094a0.js +0 -2
  251. abstra_statics/dist/assets/index.a884598f.js +0 -2
  252. abstra_statics/dist/assets/index.eb8f01b7.js +0 -2
  253. abstra_statics/dist/assets/member.af05829c.js +0 -2
  254. abstra_statics/dist/assets/omniChatStore.19fcae1a.js +0 -8
  255. abstra_statics/dist/assets/player.b9e54e21.js +0 -2
  256. abstra_statics/dist/assets/record.06867f70.js +0 -2
  257. abstra_statics/dist/assets/repository.40cf87c6.js +0 -2
  258. abstra_statics/dist/assets/repository.ecf19994.js +0 -2
  259. abstra_statics/dist/assets/router.8ccbba96.js +0 -10
  260. abstra_statics/dist/assets/router.c00c99d7.js +0 -2
  261. abstra_statics/dist/assets/string.ea3b2597.js +0 -2
  262. abstra_statics/dist/assets/url.62ce842c.js +0 -2
  263. abstra_statics/dist/assets/userStore.51f1e2d0.js +0 -2
  264. abstra_statics/dist/assets/uuid.f4308f15.js +0 -2
  265. abstra_statics/dist/assets/vue-flow-background.03bf6b4b.js +0 -22
  266. {abstra-3.23.11.dist-info → abstra-3.24.0.dist-info}/WHEEL +0 -0
  267. {abstra-3.23.11.dist-info → abstra-3.24.0.dist-info}/entry_points.txt +0 -0
  268. {abstra-3.23.11.dist-info → abstra-3.24.0.dist-info}/top_level.txt +0 -0
@@ -1,22 +0,0 @@
1
- import{d as we,D as ge,am as Jt,eK as Fp,w as me,a4 as Kt,c as se,r as _e,bz as be,J as ct,eL as Sm,I as Gp,o as ce,a5 as ye,f as nt,b as Yu,a7 as Pe,u as Q,eM as Vp,eN as Un,at,eO as ve,dt as xm,eP as Hp,ea as Pt,eQ as Cm,e as Ke,a6 as ze,h as Oe,a as st,aR as Ot,al as wn,ae as Im,ed as Ku,i as Up,ec as vl,ew as Nm,aq as jp,eR as Tm,ei as pl,c1 as Rm,eS as Am,ef as qm,g as Mm,e6 as Pm,eD as Ht,K as Om,R as qn}from"./jwt-decode.esm.e1e8e181.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1e6b8ec4-b327-49dc-b255-dcc41a33a126",e._sentryDebugIdIdentifier="sentry-dbid-1e6b8ec4-b327-49dc-b255-dcc41a33a126")}catch{}})();function gl(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}function dr(e){return Vp()?(Un(e),!0):!1}function tt(e){return typeof e=="function"?e():Q(e)}const km=typeof window<"u"&&typeof document<"u",Dm=e=>typeof e<"u",$m=Object.prototype.toString,Bm=e=>$m.call(e)==="[object Object]",Lm=()=>{};function zm(e,t){function n(...r){return new Promise((i,o)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(i).catch(o)})}return n}const Yp=e=>e();function Fm(e=Yp){const t=_e(!0);function n(){t.value=!1}function r(){t.value=!0}const i=(...o)=>{t.value&&e(...o)};return{isActive:Om(t),pause:n,resume:r,eventFilter:i}}function Kl(e,t=!1,n="Timeout"){return new Promise((r,i)=>{setTimeout(t?()=>i(n):r,e)})}function Gm(e,t,n={}){const{eventFilter:r=Yp,...i}=n;return me(e,zm(r,t),i)}function Vt(e,t,n={}){const{eventFilter:r,...i}=n,{eventFilter:o,pause:a,resume:s,isActive:u}=Fm(r);return{stop:Gm(e,t,{...i,eventFilter:o}),pause:a,resume:s,isActive:u}}function Vm(e,t={}){if(!pl(e))return Rm(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const r in e.value)n[r]=Am(()=>({get(){return e.value[r]},set(i){var o;if((o=tt(t.replaceRef))!=null?o:!0)if(Array.isArray(e.value)){const s=[...e.value];s[r]=i,e.value=s}else{const s={...e.value,[r]:i};Object.setPrototypeOf(s,Object.getPrototypeOf(e.value)),e.value=s}else e.value[r]=i}}));return n}function Xu(e,t=!1){function n(d,{flush:f="sync",deep:h=!1,timeout:g,throwOnTimeout:v}={}){let y=null;const m=[new Promise(C=>{y=me(e,S=>{d(S)!==t&&(y==null||y(),C(S))},{flush:f,deep:h,immediate:!0})})];return g!=null&&m.push(Kl(g,v).then(()=>tt(e)).finally(()=>y==null?void 0:y())),Promise.race(m)}function r(d,f){if(!pl(d))return n(S=>S===d,f);const{flush:h="sync",deep:g=!1,timeout:v,throwOnTimeout:y}=f!=null?f:{};let w=null;const C=[new Promise(S=>{w=me([e,d],([P,M])=>{t!==(P===M)&&(w==null||w(),S(P))},{flush:h,deep:g,immediate:!0})})];return v!=null&&C.push(Kl(v,y).then(()=>tt(e)).finally(()=>(w==null||w(),tt(e)))),Promise.race(C)}function i(d){return n(f=>Boolean(f),d)}function o(d){return r(null,d)}function a(d){return r(void 0,d)}function s(d){return n(Number.isNaN,d)}function u(d,f){return n(h=>{const g=Array.from(h);return g.includes(d)||g.includes(tt(d))},f)}function c(d){return l(1,d)}function l(d=1,f){let h=-1;return n(()=>(h+=1,h>=d),f)}return Array.isArray(tt(e))?{toMatch:n,toContains:u,changed:c,changedTimes:l,get not(){return Xu(e,!t)}}:{toMatch:n,toBe:r,toBeTruthy:i,toBeNull:o,toBeNaN:s,toBeUndefined:a,changed:c,changedTimes:l,get not(){return Xu(e,!t)}}}function Wu(e){return Xu(e)}function Hm(e){var t;const n=tt(e);return(t=n==null?void 0:n.$el)!=null?t:n}const Kp=km?window:void 0;function Xp(...e){let t,n,r,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,i]=e,t=Kp):[t,n,r,i]=e,!t)return Lm;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],a=()=>{o.forEach(l=>l()),o.length=0},s=(l,d,f,h)=>(l.addEventListener(d,f,h),()=>l.removeEventListener(d,f,h)),u=me(()=>[Hm(t),tt(i)],([l,d])=>{if(a(),!l)return;const f=Bm(d)?{...d}:d;o.push(...n.flatMap(h=>r.map(g=>s(l,h,g,f))))},{immediate:!0,flush:"post"}),c=()=>{u(),a()};return dr(c),c}function Um(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Xl(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:i=Kp,eventName:o="keydown",passive:a=!1,dedupe:s=!1}=r,u=Um(t);return Xp(i,o,l=>{l.repeat&&tt(s)||u(l)&&n(l)},a)}function jm(e){return JSON.parse(JSON.stringify(e))}function Vr(e,t,n,r={}){var i,o,a;const{clone:s=!1,passive:u=!1,eventName:c,deep:l=!1,defaultValue:d,shouldEmit:f}=r,h=wn(),g=n||(h==null?void 0:h.emit)||((i=h==null?void 0:h.$emit)==null?void 0:i.bind(h))||((a=(o=h==null?void 0:h.proxy)==null?void 0:o.$emit)==null?void 0:a.bind(h==null?void 0:h.proxy));let v=c;t||(t="modelValue"),v=v||`update:${t.toString()}`;const y=C=>s?typeof s=="function"?s(C):jm(C):C,w=()=>Dm(e[t])?y(e[t]):d,m=C=>{f?f(C)&&g(v,C):g(v,C)};if(u){const C=w(),S=_e(C);let P=!1;return me(()=>e[t],M=>{P||(P=!0,S.value=y(M),at(()=>P=!1))}),me(S,M=>{!P&&(M!==e[t]||l)&&m(M)},{deep:l}),S}else return se({get(){return w()},set(C){m(C)}})}var Ym={value:()=>{}};function fr(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new jn(n)}function jn(e){this._=e}function Km(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}jn.prototype=fr.prototype={constructor:jn,on:function(e,t){var n=this._,r=Km(e+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(e=r[o]).type)&&(i=Xm(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=r[o]).type)n[i]=Wl(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Wl(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new jn(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};function Xm(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Wl(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Ym,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Zu="http://www.w3.org/1999/xhtml";const Zl={svg:"http://www.w3.org/2000/svg",xhtml:Zu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function hr(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Zl.hasOwnProperty(t)?{space:Zl[t],local:e}:e}function Wm(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Zu&&t.documentElement.namespaceURI===Zu?t.createElement(e):t.createElementNS(n,e)}}function Zm(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Wp(e){var t=hr(e);return(t.local?Zm:Wm)(t)}function Jm(){}function yl(e){return e==null?Jm:function(){return this.querySelector(e)}}function Qm(e){typeof e!="function"&&(e=yl(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=new Array(a),u,c,l=0;l<a;++l)(u=o[l])&&(c=e.call(u,u.__data__,l,o))&&("__data__"in u&&(c.__data__=u.__data__),s[l]=c);return new Me(r,this._parents)}function e_(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function t_(){return[]}function Zp(e){return e==null?t_:function(){return this.querySelectorAll(e)}}function n_(e){return function(){return e_(e.apply(this,arguments))}}function r_(e){typeof e=="function"?e=n_(e):e=Zp(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var a=t[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&(r.push(e.call(u,u.__data__,c,a)),i.push(u));return new Me(r,i)}function Jp(e){return function(){return this.matches(e)}}function Qp(e){return function(t){return t.matches(e)}}var i_=Array.prototype.find;function o_(e){return function(){return i_.call(this.children,e)}}function a_(){return this.firstElementChild}function s_(e){return this.select(e==null?a_:o_(typeof e=="function"?e:Qp(e)))}var u_=Array.prototype.filter;function l_(){return Array.from(this.children)}function c_(e){return function(){return u_.call(this.children,e)}}function d_(e){return this.selectAll(e==null?l_:c_(typeof e=="function"?e:Qp(e)))}function f_(e){typeof e!="function"&&(e=Jp(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&e.call(u,u.__data__,c,o)&&s.push(u);return new Me(r,this._parents)}function eg(e){return new Array(e.length)}function h_(){return new Me(this._enter||this._groups.map(eg),this._parents)}function Wn(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Wn.prototype={constructor:Wn,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function v_(e){return function(){return e}}function p_(e,t,n,r,i,o){for(var a=0,s,u=t.length,c=o.length;a<c;++a)(s=t[a])?(s.__data__=o[a],r[a]=s):n[a]=new Wn(e,o[a]);for(;a<u;++a)(s=t[a])&&(i[a]=s)}function g_(e,t,n,r,i,o,a){var s,u,c=new Map,l=t.length,d=o.length,f=new Array(l),h;for(s=0;s<l;++s)(u=t[s])&&(f[s]=h=a.call(u,u.__data__,s,t)+"",c.has(h)?i[s]=u:c.set(h,u));for(s=0;s<d;++s)h=a.call(e,o[s],s,o)+"",(u=c.get(h))?(r[s]=u,u.__data__=o[s],c.delete(h)):n[s]=new Wn(e,o[s]);for(s=0;s<l;++s)(u=t[s])&&c.get(f[s])===u&&(i[s]=u)}function y_(e){return e.__data__}function m_(e,t){if(!arguments.length)return Array.from(this,y_);var n=t?g_:p_,r=this._parents,i=this._groups;typeof e!="function"&&(e=v_(e));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),c=0;c<o;++c){var l=r[c],d=i[c],f=d.length,h=__(e.call(l,l&&l.__data__,c,r)),g=h.length,v=s[c]=new Array(g),y=a[c]=new Array(g),w=u[c]=new Array(f);n(l,d,v,y,w,h,t);for(var m=0,C=0,S,P;m<g;++m)if(S=v[m]){for(m>=C&&(C=m+1);!(P=y[C])&&++C<g;);S._next=P||null}}return a=new Me(a,r),a._enter=s,a._exit=u,a}function __(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function b_(){return new Me(this._exit||this._groups.map(eg),this._parents)}function w_(e,t,n){var r=this.enter(),i=this,o=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function E_(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var c=n[u],l=r[u],d=c.length,f=s[u]=new Array(d),h,g=0;g<d;++g)(h=c[g]||l[g])&&(f[g]=h);for(;u<i;++u)s[u]=n[u];return new Me(s,this._parents)}function S_(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function x_(e){e||(e=C_);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,u=i[o]=new Array(s),c,l=0;l<s;++l)(c=a[l])&&(u[l]=c);u.sort(t)}return new Me(i,this._parents).order()}function C_(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function I_(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function N_(){return Array.from(this)}function T_(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function R_(){let e=0;for(const t of this)++e;return e}function A_(){return!this.node()}function q_(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}function M_(e){return function(){this.removeAttribute(e)}}function P_(e){return function(){this.removeAttributeNS(e.space,e.local)}}function O_(e,t){return function(){this.setAttribute(e,t)}}function k_(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function D_(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function $_(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function B_(e,t){var n=hr(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?P_:M_:typeof t=="function"?n.local?$_:D_:n.local?k_:O_)(n,t))}function tg(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function L_(e){return function(){this.style.removeProperty(e)}}function z_(e,t,n){return function(){this.style.setProperty(e,t,n)}}function F_(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function G_(e,t,n){return arguments.length>1?this.each((t==null?L_:typeof t=="function"?F_:z_)(e,t,n==null?"":n)):Xt(this.node(),e)}function Xt(e,t){return e.style.getPropertyValue(t)||tg(e).getComputedStyle(e,null).getPropertyValue(t)}function V_(e){return function(){delete this[e]}}function H_(e,t){return function(){this[e]=t}}function U_(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function j_(e,t){return arguments.length>1?this.each((t==null?V_:typeof t=="function"?U_:H_)(e,t)):this.node()[e]}function ng(e){return e.trim().split(/^|\s+/)}function ml(e){return e.classList||new rg(e)}function rg(e){this._node=e,this._names=ng(e.getAttribute("class")||"")}rg.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function ig(e,t){for(var n=ml(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function og(e,t){for(var n=ml(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Y_(e){return function(){ig(this,e)}}function K_(e){return function(){og(this,e)}}function X_(e,t){return function(){(t.apply(this,arguments)?ig:og)(this,e)}}function W_(e,t){var n=ng(e+"");if(arguments.length<2){for(var r=ml(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?X_:t?Y_:K_)(n,t))}function Z_(){this.textContent=""}function J_(e){return function(){this.textContent=e}}function Q_(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function eb(e){return arguments.length?this.each(e==null?Z_:(typeof e=="function"?Q_:J_)(e)):this.node().textContent}function tb(){this.innerHTML=""}function nb(e){return function(){this.innerHTML=e}}function rb(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function ib(e){return arguments.length?this.each(e==null?tb:(typeof e=="function"?rb:nb)(e)):this.node().innerHTML}function ob(){this.nextSibling&&this.parentNode.appendChild(this)}function ab(){return this.each(ob)}function sb(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ub(){return this.each(sb)}function lb(e){var t=typeof e=="function"?e:Wp(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function cb(){return null}function db(e,t){var n=typeof e=="function"?e:Wp(e),r=t==null?cb:typeof t=="function"?t:yl(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function fb(){var e=this.parentNode;e&&e.removeChild(this)}function hb(){return this.each(fb)}function vb(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function pb(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function gb(e){return this.select(e?pb:vb)}function yb(e){return arguments.length?this.property("__data__",e):this.node().__data__}function mb(e){return function(t){e.call(this,t,this.__data__)}}function _b(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function bb(e){return function(){var t=this.__on;if(!!t){for(var n=0,r=-1,i=t.length,o;n<i;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++r]=o;++r?t.length=r:delete this.__on}}}function wb(e,t,n){return function(){var r=this.__on,i,o=mb(t);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=t;return}}this.addEventListener(e.type,o,n),i={type:e.type,name:e.name,value:t,listener:o,options:n},r?r.push(i):this.__on=[i]}}function Eb(e,t,n){var r=_b(e+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,c=s.length,l;u<c;++u)for(i=0,l=s[u];i<o;++i)if((a=r[i]).type===l.type&&a.name===l.name)return l.value}return}for(s=t?wb:bb,i=0;i<o;++i)this.each(s(r[i],t,n));return this}function ag(e,t,n){var r=tg(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Sb(e,t){return function(){return ag(this,e,t)}}function xb(e,t){return function(){return ag(this,e,t.apply(this,arguments))}}function Cb(e,t){return this.each((typeof t=="function"?xb:Sb)(e,t))}function*Ib(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var sg=[null];function Me(e,t){this._groups=e,this._parents=t}function En(){return new Me([[document.documentElement]],sg)}function Nb(){return this}Me.prototype=En.prototype={constructor:Me,select:Qm,selectAll:r_,selectChild:s_,selectChildren:d_,filter:f_,data:m_,enter:h_,exit:b_,join:w_,merge:E_,selection:Nb,order:S_,sort:x_,call:I_,nodes:N_,node:T_,size:R_,empty:A_,each:q_,attr:B_,style:G_,property:j_,classed:W_,text:eb,html:ib,raise:ab,lower:ub,append:lb,insert:db,remove:hb,clone:gb,datum:yb,on:Eb,dispatch:Cb,[Symbol.iterator]:Ib};function Be(e){return typeof e=="string"?new Me([[document.querySelector(e)]],[document.documentElement]):new Me([[e]],sg)}function Tb(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ue(e,t){if(e=Tb(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const Rb={passive:!1},pn={capture:!0,passive:!1};function Hr(e){e.stopImmediatePropagation()}function Ut(e){e.preventDefault(),e.stopImmediatePropagation()}function ug(e){var t=e.document.documentElement,n=Be(e).on("dragstart.drag",Ut,pn);"onselectstart"in t?n.on("selectstart.drag",Ut,pn):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function lg(e,t){var n=e.document.documentElement,r=Be(e).on("dragstart.drag",null);t&&(r.on("click.drag",Ut,pn),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Mn=e=>()=>e;function Ju(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:u,dy:c,dispatch:l}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:l}})}Ju.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Ab(e){return!e.ctrlKey&&!e.button}function qb(){return this.parentNode}function Mb(e,t){return t==null?{x:e.x,y:e.y}:t}function Pb(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ob(){var e=Ab,t=qb,n=Mb,r=Pb,i={},o=fr("start","drag","end"),a=0,s,u,c,l,d=0;function f(S){S.on("mousedown.drag",h).filter(r).on("touchstart.drag",y).on("touchmove.drag",w,Rb).on("touchend.drag touchcancel.drag",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(S,P){if(!(l||!e.call(this,S,P))){var M=C(this,t.call(this,S,P),S,P,"mouse");!M||(Be(S.view).on("mousemove.drag",g,pn).on("mouseup.drag",v,pn),ug(S.view),Hr(S),c=!1,s=S.clientX,u=S.clientY,M("start",S))}}function g(S){if(Ut(S),!c){var P=S.clientX-s,M=S.clientY-u;c=P*P+M*M>d}i.mouse("drag",S)}function v(S){Be(S.view).on("mousemove.drag mouseup.drag",null),lg(S.view,c),Ut(S),i.mouse("end",S)}function y(S,P){if(!!e.call(this,S,P)){var M=S.changedTouches,R=t.call(this,S,P),B=M.length,D,A;for(D=0;D<B;++D)(A=C(this,R,S,P,M[D].identifier,M[D]))&&(Hr(S),A("start",S,M[D]))}}function w(S){var P=S.changedTouches,M=P.length,R,B;for(R=0;R<M;++R)(B=i[P[R].identifier])&&(Ut(S),B("drag",S,P[R]))}function m(S){var P=S.changedTouches,M=P.length,R,B;for(l&&clearTimeout(l),l=setTimeout(function(){l=null},500),R=0;R<M;++R)(B=i[P[R].identifier])&&(Hr(S),B("end",S,P[R]))}function C(S,P,M,R,B,D){var A=o.copy(),b=Ue(D||M,P),G,W,E;if((E=n.call(S,new Ju("beforestart",{sourceEvent:M,target:f,identifier:B,active:a,x:b[0],y:b[1],dx:0,dy:0,dispatch:A}),R))!=null)return G=E.x-b[0]||0,W=E.y-b[1]||0,function T(N,k,$){var L=b,V;switch(N){case"start":i[B]=T,V=a++;break;case"end":delete i[B],--a;case"drag":b=Ue($||k,P),V=a;break}A.call(N,S,new Ju(N,{sourceEvent:k,subject:E,target:f,identifier:B,active:V,x:b[0]+G,y:b[1]+W,dx:b[0]-L[0],dy:b[1]-L[1],dispatch:A}),R)}}return f.filter=function(S){return arguments.length?(e=typeof S=="function"?S:Mn(!!S),f):e},f.container=function(S){return arguments.length?(t=typeof S=="function"?S:Mn(S),f):t},f.subject=function(S){return arguments.length?(n=typeof S=="function"?S:Mn(S),f):n},f.touchable=function(S){return arguments.length?(r=typeof S=="function"?S:Mn(!!S),f):r},f.on=function(){var S=o.on.apply(o,arguments);return S===o?f:S},f.clickDistance=function(S){return arguments.length?(d=(S=+S)*S,f):Math.sqrt(d)},f}function _l(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function cg(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Sn(){}var gn=.7,Zn=1/gn,jt="\\s*([+-]?\\d+)\\s*",yn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",kb=/^#([0-9a-f]{3,8})$/,Db=new RegExp(`^rgb\\(${jt},${jt},${jt}\\)$`),$b=new RegExp(`^rgb\\(${Xe},${Xe},${Xe}\\)$`),Bb=new RegExp(`^rgba\\(${jt},${jt},${jt},${yn}\\)$`),Lb=new RegExp(`^rgba\\(${Xe},${Xe},${Xe},${yn}\\)$`),zb=new RegExp(`^hsl\\(${yn},${Xe},${Xe}\\)$`),Fb=new RegExp(`^hsla\\(${yn},${Xe},${Xe},${yn}\\)$`),Jl={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};_l(Sn,mn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ql,formatHex:Ql,formatHex8:Gb,formatHsl:Vb,formatRgb:ec,toString:ec});function Ql(){return this.rgb().formatHex()}function Gb(){return this.rgb().formatHex8()}function Vb(){return dg(this).formatHsl()}function ec(){return this.rgb().formatRgb()}function mn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=kb.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?tc(t):n===3?new Re(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Pn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Pn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Db.exec(e))?new Re(t[1],t[2],t[3],1):(t=$b.exec(e))?new Re(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Bb.exec(e))?Pn(t[1],t[2],t[3],t[4]):(t=Lb.exec(e))?Pn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=zb.exec(e))?ic(t[1],t[2]/100,t[3]/100,1):(t=Fb.exec(e))?ic(t[1],t[2]/100,t[3]/100,t[4]):Jl.hasOwnProperty(e)?tc(Jl[e]):e==="transparent"?new Re(NaN,NaN,NaN,0):null}function tc(e){return new Re(e>>16&255,e>>8&255,e&255,1)}function Pn(e,t,n,r){return r<=0&&(e=t=n=NaN),new Re(e,t,n,r)}function Hb(e){return e instanceof Sn||(e=mn(e)),e?(e=e.rgb(),new Re(e.r,e.g,e.b,e.opacity)):new Re}function Qu(e,t,n,r){return arguments.length===1?Hb(e):new Re(e,t,n,r==null?1:r)}function Re(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}_l(Re,Qu,cg(Sn,{brighter(e){return e=e==null?Zn:Math.pow(Zn,e),new Re(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?gn:Math.pow(gn,e),new Re(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Re(qt(this.r),qt(this.g),qt(this.b),Jn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:nc,formatHex:nc,formatHex8:Ub,formatRgb:rc,toString:rc}));function nc(){return`#${Rt(this.r)}${Rt(this.g)}${Rt(this.b)}`}function Ub(){return`#${Rt(this.r)}${Rt(this.g)}${Rt(this.b)}${Rt((isNaN(this.opacity)?1:this.opacity)*255)}`}function rc(){const e=Jn(this.opacity);return`${e===1?"rgb(":"rgba("}${qt(this.r)}, ${qt(this.g)}, ${qt(this.b)}${e===1?")":`, ${e})`}`}function Jn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function qt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Rt(e){return e=qt(e),(e<16?"0":"")+e.toString(16)}function ic(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Le(e,t,n,r)}function dg(e){if(e instanceof Le)return new Le(e.h,e.s,e.l,e.opacity);if(e instanceof Sn||(e=mn(e)),!e)return new Le;if(e instanceof Le)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(t===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-t)/s+2:a=(t-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Le(a,s,u,e.opacity)}function jb(e,t,n,r){return arguments.length===1?dg(e):new Le(e,t,n,r==null?1:r)}function Le(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}_l(Le,jb,cg(Sn,{brighter(e){return e=e==null?Zn:Math.pow(Zn,e),new Le(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?gn:Math.pow(gn,e),new Le(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Re(Ur(e>=240?e-240:e+120,i,r),Ur(e,i,r),Ur(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Le(oc(this.h),On(this.s),On(this.l),Jn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Jn(this.opacity);return`${e===1?"hsl(":"hsla("}${oc(this.h)}, ${On(this.s)*100}%, ${On(this.l)*100}%${e===1?")":`, ${e})`}`}}));function oc(e){return e=(e||0)%360,e<0?e+360:e}function On(e){return Math.max(0,Math.min(1,e||0))}function Ur(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const fg=e=>()=>e;function Yb(e,t){return function(n){return e+n*t}}function Kb(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Xb(e){return(e=+e)==1?hg:function(t,n){return n-t?Kb(t,n,e):fg(isNaN(t)?n:t)}}function hg(e,t){var n=t-e;return n?Yb(e,n):fg(isNaN(e)?t:e)}const ac=function e(t){var n=Xb(t);function r(i,o){var a=n((i=Qu(i)).r,(o=Qu(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=hg(i.opacity,o.opacity);return function(l){return i.r=a(l),i.g=s(l),i.b=u(l),i.opacity=c(l),i+""}}return r.gamma=e,r}(1);function mt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var el=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,jr=new RegExp(el.source,"g");function Wb(e){return function(){return e}}function Zb(e){return function(t){return e(t)+""}}function Jb(e,t){var n=el.lastIndex=jr.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(e=e+"",t=t+"";(r=el.exec(e))&&(i=jr.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:mt(r,i)})),n=jr.lastIndex;return n<t.length&&(o=t.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?Zb(u[0].x):Wb(t):(t=u.length,function(c){for(var l=0,d;l<t;++l)s[(d=u[l]).i]=d.x(c);return s.join("")})}var sc=180/Math.PI,tl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function vg(e,t,n,r,i,o){var a,s,u;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(u=e*n+t*r)&&(n-=e*u,r-=t*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),e*r<t*n&&(e=-e,t=-t,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*sc,skewX:Math.atan(u)*sc,scaleX:a,scaleY:s}}var kn;function Qb(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?tl:vg(t.a,t.b,t.c,t.d,t.e,t.f)}function e0(e){return e==null||(kn||(kn=document.createElementNS("http://www.w3.org/2000/svg","g")),kn.setAttribute("transform",e),!(e=kn.transform.baseVal.consolidate()))?tl:(e=e.matrix,vg(e.a,e.b,e.c,e.d,e.e,e.f))}function pg(e,t,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,l,d,f,h,g){if(c!==d||l!==f){var v=h.push("translate(",null,t,null,n);g.push({i:v-4,x:mt(c,d)},{i:v-2,x:mt(l,f)})}else(d||f)&&h.push("translate("+d+t+f+n)}function a(c,l,d,f){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),f.push({i:d.push(i(d)+"rotate(",null,r)-2,x:mt(c,l)})):l&&d.push(i(d)+"rotate("+l+r)}function s(c,l,d,f){c!==l?f.push({i:d.push(i(d)+"skewX(",null,r)-2,x:mt(c,l)}):l&&d.push(i(d)+"skewX("+l+r)}function u(c,l,d,f,h,g){if(c!==d||l!==f){var v=h.push(i(h)+"scale(",null,",",null,")");g.push({i:v-4,x:mt(c,d)},{i:v-2,x:mt(l,f)})}else(d!==1||f!==1)&&h.push(i(h)+"scale("+d+","+f+")")}return function(c,l){var d=[],f=[];return c=e(c),l=e(l),o(c.translateX,c.translateY,l.translateX,l.translateY,d,f),a(c.rotate,l.rotate,d,f),s(c.skewX,l.skewX,d,f),u(c.scaleX,c.scaleY,l.scaleX,l.scaleY,d,f),c=l=null,function(h){for(var g=-1,v=f.length,y;++g<v;)d[(y=f[g]).i]=y.x(h);return d.join("")}}}var t0=pg(Qb,"px, ","px)","deg)"),n0=pg(e0,", ",")",")"),r0=1e-12;function uc(e){return((e=Math.exp(e))+1/e)/2}function i0(e){return((e=Math.exp(e))-1/e)/2}function o0(e){return((e=Math.exp(2*e))-1)/(e+1)}const a0=function e(t,n,r){function i(o,a){var s=o[0],u=o[1],c=o[2],l=a[0],d=a[1],f=a[2],h=l-s,g=d-u,v=h*h+g*g,y,w;if(v<r0)w=Math.log(f/c)/t,y=function(R){return[s+R*h,u+R*g,c*Math.exp(t*R*w)]};else{var m=Math.sqrt(v),C=(f*f-c*c+r*v)/(2*c*n*m),S=(f*f-c*c-r*v)/(2*f*n*m),P=Math.log(Math.sqrt(C*C+1)-C),M=Math.log(Math.sqrt(S*S+1)-S);w=(M-P)/t,y=function(R){var B=R*w,D=uc(P),A=c/(n*m)*(D*o0(t*B+P)-i0(P));return[s+A*h,u+A*g,c*D/uc(t*B+P)]}}return y.duration=w*1e3*t/Math.SQRT2,y}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,u=s*s;return e(a,s,u)},i}(Math.SQRT2,2,4);var Wt=0,sn=0,on=0,gg=1e3,Qn,un,er=0,kt=0,vr=0,_n=typeof performance=="object"&&performance.now?performance:Date,yg=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function bl(){return kt||(yg(s0),kt=_n.now()+vr)}function s0(){kt=0}function tr(){this._call=this._time=this._next=null}tr.prototype=mg.prototype={constructor:tr,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?bl():+n)+(t==null?0:+t),!this._next&&un!==this&&(un?un._next=this:Qn=this,un=this),this._call=e,this._time=n,nl()},stop:function(){this._call&&(this._call=null,this._time=1/0,nl())}};function mg(e,t,n){var r=new tr;return r.restart(e,t,n),r}function u0(){bl(),++Wt;for(var e=Qn,t;e;)(t=kt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Wt}function lc(){kt=(er=_n.now())+vr,Wt=sn=0;try{u0()}finally{Wt=0,c0(),kt=0}}function l0(){var e=_n.now(),t=e-er;t>gg&&(vr-=t,er=e)}function c0(){for(var e,t=Qn,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Qn=n);un=e,nl(r)}function nl(e){if(!Wt){sn&&(sn=clearTimeout(sn));var t=e-kt;t>24?(e<1/0&&(sn=setTimeout(lc,e-_n.now()-vr)),on&&(on=clearInterval(on))):(on||(er=_n.now(),on=setInterval(l0,gg)),Wt=1,yg(lc))}}function cc(e,t,n){var r=new tr;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var d0=fr("start","end","cancel","interrupt"),f0=[],_g=0,dc=1,rl=2,Yn=3,fc=4,il=5,Kn=6;function pr(e,t,n,r,i,o){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;h0(e,n,{name:t,index:r,group:i,on:d0,tween:f0,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:_g})}function wl(e,t){var n=Fe(e,t);if(n.state>_g)throw new Error("too late; already scheduled");return n}function We(e,t){var n=Fe(e,t);if(n.state>Yn)throw new Error("too late; already running");return n}function Fe(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function h0(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=mg(o,0,n.time);function o(c){n.state=dc,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var l,d,f,h;if(n.state!==dc)return u();for(l in r)if(h=r[l],h.name===n.name){if(h.state===Yn)return cc(a);h.state===fc?(h.state=Kn,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[l]):+l<t&&(h.state=Kn,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete r[l])}if(cc(function(){n.state===Yn&&(n.state=fc,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=rl,n.on.call("start",e,e.__data__,n.index,n.group),n.state===rl){for(n.state=Yn,i=new Array(f=n.tween.length),l=0,d=-1;l<f;++l)(h=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=h);i.length=d+1}}function s(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=il,1),d=-1,f=i.length;++d<f;)i[d].call(e,l);n.state===il&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=Kn,n.timer.stop(),delete r[t];for(var c in r)return;delete e.__transition}}function Xn(e,t){var n=e.__transition,r,i,o=!0,a;if(!!n){t=t==null?null:t+"";for(a in n){if((r=n[a]).name!==t){o=!1;continue}i=r.state>rl&&r.state<il,r.state=Kn,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}o&&delete e.__transition}}function v0(e){return this.each(function(){Xn(this,e)})}function p0(e,t){var n,r;return function(){var i=We(this,e),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===t){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function g0(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=We(this,e),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:t,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===t){i[u]=s;break}u===c&&i.push(s)}o.tween=i}}function y0(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Fe(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===e)return a.value;return null}return this.each((t==null?p0:g0)(n,e,t))}function El(e,t,n){var r=e._id;return e.each(function(){var i=We(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Fe(i,r).value[t]}}function bg(e,t){var n;return(typeof t=="number"?mt:t instanceof mn?ac:(n=mn(t))?(t=n,ac):Jb)(e,t)}function m0(e){return function(){this.removeAttribute(e)}}function _0(e){return function(){this.removeAttributeNS(e.space,e.local)}}function b0(e,t,n){var r,i=n+"",o;return function(){var a=this.getAttribute(e);return a===i?null:a===r?o:o=t(r=a,n)}}function w0(e,t,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?o:o=t(r=a,n)}}function E0(e,t,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=t(r=a,s)))}}function S0(e,t,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=t(r=a,s)))}}function x0(e,t){var n=hr(e),r=n==="transform"?n0:bg;return this.attrTween(e,typeof t=="function"?(n.local?S0:E0)(n,r,El(this,"attr."+e,t)):t==null?(n.local?_0:m0)(n):(n.local?w0:b0)(n,r,t))}function C0(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function I0(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function N0(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&I0(e,o)),n}return i._value=t,i}function T0(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&C0(e,o)),n}return i._value=t,i}function R0(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=hr(e);return this.tween(n,(r.local?N0:T0)(r,t))}function A0(e,t){return function(){wl(this,e).delay=+t.apply(this,arguments)}}function q0(e,t){return t=+t,function(){wl(this,e).delay=t}}function M0(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?A0:q0)(t,e)):Fe(this.node(),t).delay}function P0(e,t){return function(){We(this,e).duration=+t.apply(this,arguments)}}function O0(e,t){return t=+t,function(){We(this,e).duration=t}}function k0(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?P0:O0)(t,e)):Fe(this.node(),t).duration}function D0(e,t){if(typeof t!="function")throw new Error;return function(){We(this,e).ease=t}}function $0(e){var t=this._id;return arguments.length?this.each(D0(t,e)):Fe(this.node(),t).ease}function B0(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;We(this,e).ease=n}}function L0(e){if(typeof e!="function")throw new Error;return this.each(B0(this._id,e))}function z0(e){typeof e!="function"&&(e=Jp(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&e.call(u,u.__data__,c,o)&&s.push(u);return new ut(r,this._parents,this._name,this._id)}function F0(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u=t[s],c=n[s],l=u.length,d=a[s]=new Array(l),f,h=0;h<l;++h)(f=u[h]||c[h])&&(d[h]=f);for(;s<r;++s)a[s]=t[s];return new ut(a,this._parents,this._name,this._id)}function G0(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function V0(e,t,n){var r,i,o=G0(t)?wl:We;return function(){var a=o(this,e),s=a.on;s!==r&&(i=(r=s).copy()).on(t,n),a.on=i}}function H0(e,t){var n=this._id;return arguments.length<2?Fe(this.node(),n).on.on(e):this.each(V0(n,e,t))}function U0(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function j0(){return this.on("end.remove",U0(this._id))}function Y0(e){var t=this._name,n=this._id;typeof e!="function"&&(e=yl(e));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,c=o[a]=new Array(u),l,d,f=0;f<u;++f)(l=s[f])&&(d=e.call(l,l.__data__,f,s))&&("__data__"in l&&(d.__data__=l.__data__),c[f]=d,pr(c[f],t,n,f,c,Fe(l,n)));return new ut(o,this._parents,t,n)}function K0(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Zp(e));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],c=u.length,l,d=0;d<c;++d)if(l=u[d]){for(var f=e.call(l,l.__data__,d,u),h,g=Fe(l,n),v=0,y=f.length;v<y;++v)(h=f[v])&&pr(h,t,n,v,f,g);o.push(f),a.push(l)}return new ut(o,a,t,n)}var X0=En.prototype.constructor;function W0(){return new X0(this._groups,this._parents)}function Z0(e,t){var n,r,i;return function(){var o=Xt(this,e),a=(this.style.removeProperty(e),Xt(this,e));return o===a?null:o===n&&a===r?i:i=t(n=o,r=a)}}function wg(e){return function(){this.style.removeProperty(e)}}function J0(e,t,n){var r,i=n+"",o;return function(){var a=Xt(this,e);return a===i?null:a===r?o:o=t(r=a,n)}}function Q0(e,t,n){var r,i,o;return function(){var a=Xt(this,e),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(e),Xt(this,e))),a===u?null:a===r&&u===i?o:(i=u,o=t(r=a,s))}}function ew(e,t){var n,r,i,o="style."+t,a="end."+o,s;return function(){var u=We(this,e),c=u.on,l=u.value[o]==null?s||(s=wg(t)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function tw(e,t,n){var r=(e+="")=="transform"?t0:bg;return t==null?this.styleTween(e,Z0(e,r)).on("end.style."+e,wg(e)):typeof t=="function"?this.styleTween(e,Q0(e,r,El(this,"style."+e,t))).each(ew(this._id,e)):this.styleTween(e,J0(e,r,t),n).on("end.style."+e,null)}function nw(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function rw(e,t,n){var r,i;function o(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&nw(e,a,n)),r}return o._value=t,o}function iw(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,rw(e,t,n==null?"":n))}function ow(e){return function(){this.textContent=e}}function aw(e){return function(){var t=e(this);this.textContent=t==null?"":t}}function sw(e){return this.tween("text",typeof e=="function"?aw(El(this,"text",e)):ow(e==null?"":e+""))}function uw(e){return function(t){this.textContent=e.call(this,t)}}function lw(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&uw(i)),t}return r._value=e,r}function cw(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,lw(e))}function dw(){for(var e=this._name,t=this._id,n=Eg(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)if(u=a[c]){var l=Fe(u,t);pr(u,e,n,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new ut(r,this._parents,e,n)}function fw(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){--i===0&&o()}};n.each(function(){var c=We(this,r),l=c.on;l!==e&&(t=(e=l).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(u)),c.on=t}),i===0&&o()})}var hw=0;function ut(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Eg(){return++hw}var Qe=En.prototype;ut.prototype={constructor:ut,select:Y0,selectAll:K0,selectChild:Qe.selectChild,selectChildren:Qe.selectChildren,filter:z0,merge:F0,selection:W0,transition:dw,call:Qe.call,nodes:Qe.nodes,node:Qe.node,size:Qe.size,empty:Qe.empty,each:Qe.each,on:H0,attr:x0,attrTween:R0,style:tw,styleTween:iw,text:sw,textTween:cw,remove:j0,tween:y0,delay:M0,duration:k0,ease:$0,easeVarying:L0,end:fw,[Symbol.iterator]:Qe[Symbol.iterator]};function vw(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var pw={time:null,delay:0,duration:250,ease:vw};function gw(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function yw(e){var t,n;e instanceof ut?(t=e._id,e=e._name):(t=Eg(),(n=pw).time=bl(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&pr(u,e,t,c,a,n||gw(u,t));return new ut(r,this._parents,e,t)}En.prototype.interrupt=v0;En.prototype.transition=yw;const Dn=e=>()=>e;function mw(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function rt(e,t,n){this.k=e,this.x=t,this.y=n}rt.prototype={constructor:rt,scale:function(e){return e===1?this:new rt(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new rt(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Zt=new rt(1,0,0);rt.prototype;function Yr(e){e.stopImmediatePropagation()}function an(e){e.preventDefault(),e.stopImmediatePropagation()}function _w(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function bw(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function hc(){return this.__zoom||Zt}function ww(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Ew(){return navigator.maxTouchPoints||"ontouchstart"in this}function Sw(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function xw(){var e=_w,t=bw,n=Sw,r=ww,i=Ew,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=a0,c=fr("start","zoom","end"),l,d,f,h=500,g=150,v=0,y=10;function w(E){E.property("__zoom",hc).on("wheel.zoom",B,{passive:!1}).on("mousedown.zoom",D).on("dblclick.zoom",A).filter(i).on("touchstart.zoom",b).on("touchmove.zoom",G).on("touchend.zoom touchcancel.zoom",W).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(E,T,N,k){var $=E.selection?E.selection():E;$.property("__zoom",hc),E!==$?P(E,T,N,k):$.interrupt().each(function(){M(this,arguments).event(k).start().zoom(null,typeof T=="function"?T.apply(this,arguments):T).end()})},w.scaleBy=function(E,T,N,k){w.scaleTo(E,function(){var $=this.__zoom.k,L=typeof T=="function"?T.apply(this,arguments):T;return $*L},N,k)},w.scaleTo=function(E,T,N,k){w.transform(E,function(){var $=t.apply(this,arguments),L=this.__zoom,V=N==null?S($):typeof N=="function"?N.apply(this,arguments):N,F=L.invert(V),te=typeof T=="function"?T.apply(this,arguments):T;return n(C(m(L,te),V,F),$,a)},N,k)},w.translateBy=function(E,T,N,k){w.transform(E,function(){return n(this.__zoom.translate(typeof T=="function"?T.apply(this,arguments):T,typeof N=="function"?N.apply(this,arguments):N),t.apply(this,arguments),a)},null,k)},w.translateTo=function(E,T,N,k,$){w.transform(E,function(){var L=t.apply(this,arguments),V=this.__zoom,F=k==null?S(L):typeof k=="function"?k.apply(this,arguments):k;return n(Zt.translate(F[0],F[1]).scale(V.k).translate(typeof T=="function"?-T.apply(this,arguments):-T,typeof N=="function"?-N.apply(this,arguments):-N),L,a)},k,$)};function m(E,T){return T=Math.max(o[0],Math.min(o[1],T)),T===E.k?E:new rt(T,E.x,E.y)}function C(E,T,N){var k=T[0]-N[0]*E.k,$=T[1]-N[1]*E.k;return k===E.x&&$===E.y?E:new rt(E.k,k,$)}function S(E){return[(+E[0][0]+ +E[1][0])/2,(+E[0][1]+ +E[1][1])/2]}function P(E,T,N,k){E.on("start.zoom",function(){M(this,arguments).event(k).start()}).on("interrupt.zoom end.zoom",function(){M(this,arguments).event(k).end()}).tween("zoom",function(){var $=this,L=arguments,V=M($,L).event(k),F=t.apply($,L),te=N==null?S(F):typeof N=="function"?N.apply($,L):N,U=Math.max(F[1][0]-F[0][0],F[1][1]-F[0][1]),z=$.__zoom,X=typeof T=="function"?T.apply($,L):T,de=u(z.invert(te).concat(U/z.k),X.invert(te).concat(U/X.k));return function(le){if(le===1)le=X;else{var fe=de(le),re=U/fe[2];le=new rt(re,te[0]-fe[0]*re,te[1]-fe[1]*re)}V.zoom(null,le)}})}function M(E,T,N){return!N&&E.__zooming||new R(E,T)}function R(E,T){this.that=E,this.args=T,this.active=0,this.sourceEvent=null,this.extent=t.apply(E,T),this.taps=0}R.prototype={event:function(E){return E&&(this.sourceEvent=E),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(E,T){return this.mouse&&E!=="mouse"&&(this.mouse[1]=T.invert(this.mouse[0])),this.touch0&&E!=="touch"&&(this.touch0[1]=T.invert(this.touch0[0])),this.touch1&&E!=="touch"&&(this.touch1[1]=T.invert(this.touch1[0])),this.that.__zoom=T,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(E){var T=Be(this.that).datum();c.call(E,this.that,new mw(E,{sourceEvent:this.sourceEvent,target:w,type:E,transform:this.that.__zoom,dispatch:c}),T)}};function B(E,...T){if(!e.apply(this,arguments))return;var N=M(this,T).event(E),k=this.__zoom,$=Math.max(o[0],Math.min(o[1],k.k*Math.pow(2,r.apply(this,arguments)))),L=Ue(E);if(N.wheel)(N.mouse[0][0]!==L[0]||N.mouse[0][1]!==L[1])&&(N.mouse[1]=k.invert(N.mouse[0]=L)),clearTimeout(N.wheel);else{if(k.k===$)return;N.mouse=[L,k.invert(L)],Xn(this),N.start()}an(E),N.wheel=setTimeout(V,g),N.zoom("mouse",n(C(m(k,$),N.mouse[0],N.mouse[1]),N.extent,a));function V(){N.wheel=null,N.end()}}function D(E,...T){if(f||!e.apply(this,arguments))return;var N=E.currentTarget,k=M(this,T,!0).event(E),$=Be(E.view).on("mousemove.zoom",te,!0).on("mouseup.zoom",U,!0),L=Ue(E,N),V=E.clientX,F=E.clientY;ug(E.view),Yr(E),k.mouse=[L,this.__zoom.invert(L)],Xn(this),k.start();function te(z){if(an(z),!k.moved){var X=z.clientX-V,de=z.clientY-F;k.moved=X*X+de*de>v}k.event(z).zoom("mouse",n(C(k.that.__zoom,k.mouse[0]=Ue(z,N),k.mouse[1]),k.extent,a))}function U(z){$.on("mousemove.zoom mouseup.zoom",null),lg(z.view,k.moved),an(z),k.event(z).end()}}function A(E,...T){if(!!e.apply(this,arguments)){var N=this.__zoom,k=Ue(E.changedTouches?E.changedTouches[0]:E,this),$=N.invert(k),L=N.k*(E.shiftKey?.5:2),V=n(C(m(N,L),k,$),t.apply(this,T),a);an(E),s>0?Be(this).transition().duration(s).call(P,V,k,E):Be(this).call(w.transform,V,k,E)}}function b(E,...T){if(!!e.apply(this,arguments)){var N=E.touches,k=N.length,$=M(this,T,E.changedTouches.length===k).event(E),L,V,F,te;for(Yr(E),V=0;V<k;++V)F=N[V],te=Ue(F,this),te=[te,this.__zoom.invert(te),F.identifier],$.touch0?!$.touch1&&$.touch0[2]!==te[2]&&($.touch1=te,$.taps=0):($.touch0=te,L=!0,$.taps=1+!!l);l&&(l=clearTimeout(l)),L&&($.taps<2&&(d=te[0],l=setTimeout(function(){l=null},h)),Xn(this),$.start())}}function G(E,...T){if(!!this.__zooming){var N=M(this,T).event(E),k=E.changedTouches,$=k.length,L,V,F,te;for(an(E),L=0;L<$;++L)V=k[L],F=Ue(V,this),N.touch0&&N.touch0[2]===V.identifier?N.touch0[0]=F:N.touch1&&N.touch1[2]===V.identifier&&(N.touch1[0]=F);if(V=N.that.__zoom,N.touch1){var U=N.touch0[0],z=N.touch0[1],X=N.touch1[0],de=N.touch1[1],le=(le=X[0]-U[0])*le+(le=X[1]-U[1])*le,fe=(fe=de[0]-z[0])*fe+(fe=de[1]-z[1])*fe;V=m(V,Math.sqrt(le/fe)),F=[(U[0]+X[0])/2,(U[1]+X[1])/2],te=[(z[0]+de[0])/2,(z[1]+de[1])/2]}else if(N.touch0)F=N.touch0[0],te=N.touch0[1];else return;N.zoom("touch",n(C(V,F,te),N.extent,a))}}function W(E,...T){if(!!this.__zooming){var N=M(this,T).event(E),k=E.changedTouches,$=k.length,L,V;for(Yr(E),f&&clearTimeout(f),f=setTimeout(function(){f=null},h),L=0;L<$;++L)V=k[L],N.touch0&&N.touch0[2]===V.identifier?delete N.touch0:N.touch1&&N.touch1[2]===V.identifier&&delete N.touch1;if(N.touch1&&!N.touch0&&(N.touch0=N.touch1,delete N.touch1),N.touch0)N.touch0[1]=this.__zoom.invert(N.touch0[0]);else if(N.end(),N.taps===2&&(V=Ue(V,this),Math.hypot(d[0]-V[0],d[1]-V[1])<y)){var F=Be(this).on("dblclick.zoom");F&&F.apply(this,arguments)}}}return w.wheelDelta=function(E){return arguments.length?(r=typeof E=="function"?E:Dn(+E),w):r},w.filter=function(E){return arguments.length?(e=typeof E=="function"?E:Dn(!!E),w):e},w.touchable=function(E){return arguments.length?(i=typeof E=="function"?E:Dn(!!E),w):i},w.extent=function(E){return arguments.length?(t=typeof E=="function"?E:Dn([[+E[0][0],+E[0][1]],[+E[1][0],+E[1][1]]]),w):t},w.scaleExtent=function(E){return arguments.length?(o[0]=+E[0],o[1]=+E[1],w):[o[0],o[1]]},w.translateExtent=function(E){return arguments.length?(a[0][0]=+E[0][0],a[1][0]=+E[1][0],a[0][1]=+E[0][1],a[1][1]=+E[1][1],w):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},w.constrain=function(E){return arguments.length?(n=E,w):n},w.duration=function(E){return arguments.length?(s=+E,w):s},w.interpolate=function(E){return arguments.length?(u=E,w):u},w.on=function(){var E=c.on.apply(c,arguments);return E===c?w:E},w.clickDistance=function(E){return arguments.length?(v=(E=+E)*E,w):Math.sqrt(v)},w.tapDistance=function(E){return arguments.length?(y=+E,w):y},w}var J=(e=>(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(J||{}),Sl=(e=>(e.Partial="partial",e.Full="full",e))(Sl||{}),Nt=(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))(Nt||{}),Dt=(e=>(e.Strict="strict",e.Loose="loose",e))(Dt||{}),ol=(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(ol||{}),hn=(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(hn||{}),Cw=(e=>(e.TopLeft="top-left",e.TopCenter="top-center",e.TopRight="top-right",e.BottomLeft="bottom-left",e.BottomCenter="bottom-center",e.BottomRight="bottom-right",e))(Cw||{});function al(e){var t,n;const r=((n=(t=e.composedPath)==null?void 0:t.call(e))==null?void 0:n[0])||e.target,i=typeof(r==null?void 0:r.hasAttribute)=="function"?r.hasAttribute("contenteditable"):!1,o=typeof(r==null?void 0:r.closest)=="function"?r.closest(".nokey"):null;return["INPUT","SELECT","TEXTAREA"].includes(r==null?void 0:r.nodeName)||i||!!o}function Iw(e){return e.ctrlKey||e.metaKey||e.shiftKey}function vc(e,t,n,r){const i=t.split("+").map(o=>o.trim().toLowerCase());return i.length===1?e.toLowerCase()===t.toLowerCase():(r?n.delete(e.toLowerCase()):n.add(e.toLowerCase()),i.every((o,a)=>n.has(o)&&Array.from(n.values())[a]===i[a]))}function Nw(e,t){return n=>{if(!n.code&&!n.key)return!1;const r=Tw(n.code,e);return Array.isArray(e)?e.some(i=>vc(n[r],i,t,n.type==="keyup")):vc(n[r],e,t,n.type==="keyup")}}function Tw(e,t){return typeof t=="string"?e===t?"code":"key":t.includes(e)?"code":"key"}function vn(e,t){const n=be(()=>{var l;return(l=ve(t==null?void 0:t.actInsideInputWithModifier))!=null?l:!1}),r=be(()=>{var l;return(l=ve(t==null?void 0:t.target))!=null?l:window}),i=_e(ve(e)===!0);let o=!1;const a=new Set;let s=c(ve(e));me(()=>ve(e),(l,d)=>{typeof d=="boolean"&&typeof l!="boolean"&&u(),s=c(l)},{immediate:!0}),ct(()=>{Xp(window,["blur","contextmenu"],u)}),Xl((...l)=>s(...l),l=>{o=Iw(l),!((!o||o&&!n.value)&&al(l))&&(l.preventDefault(),i.value=!0)},{eventName:"keydown",target:r}),Xl((...l)=>s(...l),l=>{if(i.value){if((!o||o&&!n.value)&&al(l))return;u()}},{eventName:"keyup",target:r});function u(){o=!1,a.clear(),i.value=!1}function c(l){return l===null?(u(),()=>!1):typeof l=="boolean"?(u(),i.value=l,()=>!1):Array.isArray(l)||typeof l=="string"?Nw(l,a):l}return i}const Sg="vue-flow__node-desc",xg="vue-flow__edge-desc",Rw="vue-flow__aria-live",Cg=["Enter"," ","Escape"],Yt={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function sl(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function ul(e,t){const 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));return Math.ceil(n*r)}function gr(e){return{width:e.offsetWidth,height:e.offsetHeight}}function $t(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function Ig(e,t){return{x:$t(e.x,t[0][0],t[1][0]),y:$t(e.y,t[0][1],t[1][1])}}function pc(e){const t=e.getRootNode();return"elementFromPoint"in t?t:window.document}function St(e){return e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e}function Mt(e){return e&&typeof e=="object"&&"id"in e&&"position"in e&&!St(e)}function ln(e){return Mt(e)&&"computedPosition"in e}function $n(e){return!Number.isNaN(e)&&Number.isFinite(e)}function Aw(e){return $n(e.width)&&$n(e.height)&&$n(e.x)&&$n(e.y)}function qw(e,t,n){var i;const r={id:e.id.toString(),type:(i=e.type)!=null?i:"default",dimensions:Ht({width:0,height:0}),computedPosition:Ht({z:0,...e.position}),handleBounds:{source:[],target:[]},draggable:void 0,selectable:void 0,connectable:void 0,focusable:void 0,selected:!1,dragging:!1,resizing:!1,initialized:!1,isParent:!1,position:{x:0,y:0},data:xe(e.data)?e.data:{},events:Ht(xe(e.events)?e.events:{})};return Object.assign(t!=null?t:r,e,{id:e.id.toString(),parentNode:n})}function Ng(e,t,n){var a,s,u,c,l,d,f;var r,i;const o={id:e.id.toString(),type:(s=(a=e.type)!=null?a:t==null?void 0:t.type)!=null?s:"default",source:e.source.toString(),target:e.target.toString(),sourceHandle:(r=e.sourceHandle)==null?void 0:r.toString(),targetHandle:(i=e.targetHandle)==null?void 0:i.toString(),updatable:(u=e.updatable)!=null?u:n==null?void 0:n.updatable,selectable:(c=e.selectable)!=null?c:n==null?void 0:n.selectable,focusable:(l=e.focusable)!=null?l:n==null?void 0:n.focusable,data:xe(e.data)?e.data:{},events:Ht(xe(e.events)?e.events:{}),label:(d=e.label)!=null?d:"",interactionWidth:(f=e.interactionWidth)!=null?f:n==null?void 0:n.interactionWidth,...n!=null?n:{}};return Object.assign(t!=null?t:o,e,{id:e.id.toString()})}function Tg(e,t,n,r){const i=typeof e=="string"?e:e.id,o=new Set,a=r==="source"?"target":"source";for(const s of n)s[a]===i&&o.add(s[r]);return t.filter(s=>o.has(s.id))}function Mw(...e){if(e.length===3){const[o,a,s]=e;return Tg(o,a,s,"target")}const[t,n]=e,r=typeof t=="string"?t:t.id;return n.filter(o=>St(o)&&o.source===r).map(o=>n.find(a=>Mt(a)&&a.id===o.target))}function Pw(...e){if(e.length===3){const[o,a,s]=e;return Tg(o,a,s,"source")}const[t,n]=e,r=typeof t=="string"?t:t.id;return n.filter(o=>St(o)&&o.target===r).map(o=>n.find(a=>Mt(a)&&a.id===o.source))}function Rg({source:e,sourceHandle:t,target:n,targetHandle:r}){return`vueflow__edge-${e}${t!=null?t:""}-${n}${r!=null?r:""}`}function Ow(e,t){return t.some(n=>St(n)&&n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle))}function Ag({x:e,y:t},{x:n,y:r,zoom:i}){return{x:e*i+n,y:t*i+r}}function nr({x:e,y:t},{x:n,y:r,zoom:i},o=!1,[a,s]=[1,1]){const u={x:(e-n)/i,y:(t-r)/i};return o?{x:a*Math.round(u.x/a),y:s*Math.round(u.y/s)}:u}function qg(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}}function rr({x:e,y:t,width:n,height:r}){return{x:e,y:t,x2:e+n,y2:t+r}}function Mg({x:e,y:t,x2:n,y2:r}){return{x:e,y:t,width:n-e,height:r-t}}function CT(e,t){return Mg(qg(rr(e),rr(t)))}function Pg(e){let t={x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY,x2:Number.NEGATIVE_INFINITY,y2:Number.NEGATIVE_INFINITY};for(let n=0;n<e.length;n++){const r=e[n];t=qg(t,rr({...r.computedPosition,...r.dimensions}))}return Mg(t)}function Og(e,t,n={x:0,y:0,zoom:1},r=!1,i=!1){var s,u,c,l;const o={...nr(t,n),width:t.width/n.zoom,height:t.height/n.zoom},a=[];for(const d of e){const{dimensions:f,selectable:h=!0,hidden:g=!1}=d,v=(u=(s=f.width)!=null?s:d.width)!=null?u:null,y=(l=(c=f.height)!=null?c:d.height)!=null?l:null;if(i&&!h||g)continue;const w=ul(o,sl(d)),m=v===null||y===null,C=r&&w>0,S=(v!=null?v:0)*(y!=null?y:0);(m||C||w>=S||d.dragging)&&a.push(d)}return a}function kg(e,t){const n=new Set;if(typeof e=="string")n.add(e);else if(e.length>=1)for(const r of e)n.add(r.id);return t.filter(r=>n.has(r.source)||n.has(r.target))}function gc(e,t,n,r,i,o=.1,a={x:0,y:0}){var v,y;const s=t/(e.width*(1+o)),u=n/(e.height*(1+o)),c=Math.min(s,u),l=$t(c,r,i),d=e.x+e.width/2,f=e.y+e.height/2,h=t/2-d*l+((v=a.x)!=null?v:0),g=n/2-f*l+((y=a.y)!=null?y:0);return{x:h,y:g,zoom:l}}function kw(e,t){return{x:t.x+e.x,y:t.y+e.y,z:(e.z>t.z?e.z:t.z)+1}}function Dg(e,t){if(!e.parentNode)return!1;const n=t(e.parentNode);return n?n.selected?!0:Dg(n,t):!1}function bn(e,t){return typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`}function yc(e,t,n){return e<t?$t(Math.abs(e-t),1,t)/t:e>n?-$t(Math.abs(e-n),1,t)/t:0}function $g(e,t,n=15,r=40){const i=yc(e.x,r,t.width-r)*n,o=yc(e.y,r,t.height-r)*n;return[i,o]}function Kr(e,t){var n,r;if(t){const i=e.position.x+e.dimensions.width-t.dimensions.width,o=e.position.y+e.dimensions.height-t.dimensions.height;if(i>0||o>0||e.position.x<0||e.position.y<0){let a={};if(typeof t.style=="function"?a={...t.style(t)}:t.style&&(a={...t.style}),a.width=(n=a.width)!=null?n:`${t.dimensions.width}px`,a.height=(r=a.height)!=null?r:`${t.dimensions.height}px`,i>0)if(typeof a.width=="string"){const s=Number(a.width.replace("px",""));a.width=`${s+i}px`}else a.width+=i;if(o>0)if(typeof a.height=="string"){const s=Number(a.height.replace("px",""));a.height=`${s+o}px`}else a.height+=o;if(e.position.x<0){const s=Math.abs(e.position.x);if(t.position.x=t.position.x-s,typeof a.width=="string"){const u=Number(a.width.replace("px",""));a.width=`${u+s}px`}else a.width+=s;e.position.x=0}if(e.position.y<0){const s=Math.abs(e.position.y);if(t.position.y=t.position.y-s,typeof a.height=="string"){const u=Number(a.height.replace("px",""));a.height=`${u+s}px`}else a.height+=s;e.position.y=0}t.dimensions.width=Number(a.width.toString().replace("px","")),t.dimensions.height=Number(a.height.toString().replace("px","")),typeof t.style=="function"?t.style=s=>{const u=t.style;return{...u(s),...a}}:t.style={...t.style,...a}}}}function mc(e,t){var n,r;const i=e.filter(a=>a.type==="add"||a.type==="remove");for(const a of i)if(a.type==="add")t.findIndex(u=>u.id===a.item.id)===-1&&t.push(a.item);else if(a.type==="remove"){const s=t.findIndex(u=>u.id===a.id);s!==-1&&t.splice(s,1)}const o=t.map(a=>a.id);for(const a of t)for(const s of e)if(s.id===a.id)switch(s.type){case"select":a.selected=s.selected;break;case"position":if(ln(a)&&(typeof s.position<"u"&&(a.position=s.position),typeof s.dragging<"u"&&(a.dragging=s.dragging),a.expandParent&&a.parentNode)){const u=t[o.indexOf(a.parentNode)];u&&ln(u)&&Kr(a,u)}break;case"dimensions":if(ln(a)&&(typeof s.dimensions<"u"&&(a.dimensions=s.dimensions),typeof s.updateStyle<"u"&&(a.style={...a.style||{},width:`${(n=s.dimensions)==null?void 0:n.width}px`,height:`${(r=s.dimensions)==null?void 0:r.height}px`}),typeof s.resizing<"u"&&(a.resizing=s.resizing),a.expandParent&&a.parentNode)){const u=t[o.indexOf(a.parentNode)];u&&ln(u)&&(!!u.dimensions.width&&!!u.dimensions.height?Kr(a,u):at(()=>{Kr(a,u)}))}break}return t}function yt(e,t){return{id:e,type:"select",selected:t}}function _c(e){return{item:e,type:"add"}}function bc(e){return{id:e,type:"remove"}}function wc(e,t,n,r,i){return{id:e,source:t,target:n,sourceHandle:r||null,targetHandle:i||null,type:"remove"}}function _t(e,t=new Set,n=!1){const r=[];for(const[i,o]of e){const a=t.has(i);!(o.selected===void 0&&!a)&&o.selected!==a&&(n&&(o.selected=a),r.push(yt(o.id,a)))}return r}function H(e){const t=new Set;let n=!1;const r=()=>t.size>0;e&&(n=!0,t.add(e));const i=s=>{t.delete(s)};return{on:s=>{e&&n&&t.delete(e),t.add(s);const u=()=>{i(s),e&&n&&t.add(e)};return dr(u),{off:u}},off:i,trigger:s=>Promise.all(Array.from(t).map(u=>u(s))),hasListeners:r,fns:t}}function Ec(e,t,n){let r=e;do{if(r&&r.matches(t))return!0;if(r===n)return!1;r=r.parentElement}while(r);return!1}function Dw(e,t,n,r,i){var o,a;const s=[];for(const u of e)(u.selected||u.id===i)&&(!u.parentNode||!Dg(u,r))&&(u.draggable||t&&typeof u.draggable>"u")&&s.push(Ht({id:u.id,position:u.position||{x:0,y:0},distance:{x:n.x-((o=u.computedPosition)==null?void 0:o.x)||0,y:n.y-((a=u.computedPosition)==null?void 0:a.y)||0},from:u.computedPosition,extent:u.extent,parentNode:u.parentNode,dimensions:u.dimensions,expandParent:u.expandParent}));return s}function Xr({id:e,dragItems:t,findNode:n}){const r=[];for(const i of t){const o=n(i.id);o&&r.push(o)}return[e?r.find(i=>i.id===e):r[0],r]}function Bg(e){if(Array.isArray(e))switch(e.length){case 1:return[e[0],e[0],e[0],e[0]];case 2:return[e[0],e[1],e[0],e[1]];case 3:return[e[0],e[1],e[2],e[1]];case 4:return e;default:return[0,0,0,0]}return[e,e,e,e]}function $w(e,t,n){const[r,i,o,a]=typeof e!="string"?Bg(e.padding):[0,0,0,0];return n&&typeof n.computedPosition.x<"u"&&typeof n.computedPosition.y<"u"&&typeof n.dimensions.width<"u"&&typeof n.dimensions.height<"u"?[[n.computedPosition.x+a,n.computedPosition.y+r],[n.computedPosition.x+n.dimensions.width-i,n.computedPosition.y+n.dimensions.height-o]]:!1}function Bw(e,t,n,r){let i=e.extent||n;if((i==="parent"||!Array.isArray(i)&&(i==null?void 0:i.range)==="parent")&&!e.expandParent)if(e.parentNode&&r&&e.dimensions.width&&e.dimensions.height){const o=$w(i,e,r);o&&(i=o)}else t(new Ne(Ce.NODE_EXTENT_INVALID,e.id)),i=n;else if(Array.isArray(i)){const o=(r==null?void 0:r.computedPosition.x)||0,a=(r==null?void 0:r.computedPosition.y)||0;i=[[i[0][0]+o,i[0][1]+a],[i[1][0]+o,i[1][1]+a]]}else if(i!=="parent"&&(i==null?void 0:i.range)&&Array.isArray(i.range)){const[o,a,s,u]=Bg(i.padding),c=(r==null?void 0:r.computedPosition.x)||0,l=(r==null?void 0:r.computedPosition.y)||0;i=[[i.range[0][0]+c+u,i.range[0][1]+l+o],[i.range[1][0]+c-a,i.range[1][1]+l-s]]}return i==="parent"?[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]]:i}function Lw({width:e,height:t},n){return[n[0],[n[1][0]-(e||0),n[1][1]-(t||0)]]}function xl(e,t,n,r,i){const o=Lw(e.dimensions,Bw(e,n,r,i)),a=Ig(t,o);return{position:{x:a.x-((i==null?void 0:i.computedPosition.x)||0),y:a.y-((i==null?void 0:i.computedPosition.y)||0)},computedPosition:a}}function ir(e,t,n=J.Left){var u,c,l;const r=((u=t==null?void 0:t.x)!=null?u:0)+e.computedPosition.x,i=((c=t==null?void 0:t.y)!=null?c:0)+e.computedPosition.y,{width:o,height:a}=t!=null?t:Gw(e);switch((l=t==null?void 0:t.position)!=null?l:n){case J.Top:return{x:r+o/2,y:i};case J.Right:return{x:r+o,y:i+a/2};case J.Bottom:return{x:r+o/2,y:i+a};case J.Left:return{x:r,y:i+a/2}}}function Sc(e=[],t){return e.length&&(t?e.find(n=>n.id===t):e[0])||null}function zw({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:r,targetWidth:i,targetHeight:o,width:a,height:s,viewport:u}){const c={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+i),y2:Math.max(e.y+r,t.y+o)};c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const l=rr({x:(0-u.x)/u.zoom,y:(0-u.y)/u.zoom,width:a/u.zoom,height:s/u.zoom}),d=Math.max(0,Math.min(l.x2,c.x2)-Math.max(l.x,c.x)),f=Math.max(0,Math.min(l.y2,c.y2)-Math.max(l.y,c.y));return Math.ceil(d*f)>0}function Fw(e,t,n=!1){const r=typeof e.zIndex=="number";let i=r?e.zIndex:0;const o=t(e.source),a=t(e.target);return!o||!a?0:(n&&(i=r?e.zIndex:Math.max(o.computedPosition.z||0,a.computedPosition.z||0)),i)}var Ce=(e=>(e.MISSING_STYLES="MISSING_STYLES",e.MISSING_VIEWPORT_DIMENSIONS="MISSING_VIEWPORT_DIMENSIONS",e.NODE_INVALID="NODE_INVALID",e.NODE_NOT_FOUND="NODE_NOT_FOUND",e.NODE_MISSING_PARENT="NODE_MISSING_PARENT",e.NODE_TYPE_MISSING="NODE_TYPE_MISSING",e.NODE_EXTENT_INVALID="NODE_EXTENT_INVALID",e.EDGE_INVALID="EDGE_INVALID",e.EDGE_NOT_FOUND="EDGE_NOT_FOUND",e.EDGE_SOURCE_MISSING="EDGE_SOURCE_MISSING",e.EDGE_TARGET_MISSING="EDGE_TARGET_MISSING",e.EDGE_TYPE_MISSING="EDGE_TYPE_MISSING",e.EDGE_SOURCE_TARGET_SAME="EDGE_SOURCE_TARGET_SAME",e.EDGE_SOURCE_TARGET_MISSING="EDGE_SOURCE_TARGET_MISSING",e.EDGE_ORPHANED="EDGE_ORPHANED",e.USEVUEFLOW_OPTIONS="USEVUEFLOW_OPTIONS",e))(Ce||{});const xc={MISSING_STYLES:()=>"It seems that you haven't loaded the necessary styles. Please import '@vue-flow/core/dist/style.css' to ensure that the graph is rendered correctly",MISSING_VIEWPORT_DIMENSIONS:()=>"The Vue Flow parent container needs a width and a height to render the graph",NODE_INVALID:e=>`Node is invalid
2
- Node: ${e}`,NODE_NOT_FOUND:e=>`Node not found
3
- Node: ${e}`,NODE_MISSING_PARENT:(e,t)=>`Node is missing a parent
4
- Node: ${e}
5
- Parent: ${t}`,NODE_TYPE_MISSING:e=>`Node type is missing
6
- Type: ${e}`,NODE_EXTENT_INVALID:e=>`Only child nodes can use a parent extent
7
- Node: ${e}`,EDGE_INVALID:e=>`An edge needs a source and a target
8
- Edge: ${e}`,EDGE_SOURCE_MISSING:(e,t)=>`Edge source is missing
9
- Edge: ${e}
10
- Source: ${t}`,EDGE_TARGET_MISSING:(e,t)=>`Edge target is missing
11
- Edge: ${e}
12
- Target: ${t}`,EDGE_TYPE_MISSING:e=>`Edge type is missing
13
- Type: ${e}`,EDGE_SOURCE_TARGET_SAME:(e,t,n)=>`Edge source and target are the same
14
- Edge: ${e}
15
- Source: ${t}
16
- Target: ${n}`,EDGE_SOURCE_TARGET_MISSING:(e,t,n)=>`Edge source or target is missing
17
- Edge: ${e}
18
- Source: ${t}
19
- Target: ${n}`,EDGE_ORPHANED:e=>`Edge was orphaned (suddenly missing source or target) and has been removed
20
- Edge: ${e}`,EDGE_NOT_FOUND:e=>`Edge not found
21
- Edge: ${e}`,USEVUEFLOW_OPTIONS:()=>"The options parameter is deprecated and will be removed in the next major version. Please use the id parameter instead"};class Ne extends Error{constructor(t,...n){var r;super((r=xc[t])==null?void 0:r.call(xc,...n)),this.name="VueFlowError",this.code=t,this.args=n}}function Cl(e){return"clientX"in e}function wt(e,t){var s,u;var n,r;const i=Cl(e),o=i?e.clientX:(n=e.touches)==null?void 0:n[0].clientX,a=i?e.clientY:(r=e.touches)==null?void 0:r[0].clientY;return{x:o-((s=t==null?void 0:t.left)!=null?s:0),y:a-((u=t==null?void 0:t.top)!=null?u:0)}}const or=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Gw(e){var r,i,o,a;var t,n;return{width:(i=(r=(t=e.dimensions)==null?void 0:t.width)!=null?r:e.width)!=null?i:0,height:(a=(o=(n=e.dimensions)==null?void 0:n.height)!=null?o:e.height)!=null?a:0}}function Lg(){return{handleDomNode:null,isValid:!1,connection:{source:"",target:"",sourceHandle:null,targetHandle:null},endHandle:null}}function Wr(e){e==null||e.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function Cc(e,t,n,r){const i=[];for(const o of t[n]||[])if(`${e.id}-${o.id}-${n}`!==r){const{x:a,y:s}=ir(e,o);i.push({id:o.id||null,type:n,nodeId:e.id,x:a,y:s})}return i}function Vw(e,t,n,r,i,o){const{x:a,y:s}=wt(e),c=t.elementsFromPoint(a,s).find(g=>g.classList.contains("vue-flow__handle"));if(c){const g=c.getAttribute("data-nodeid");if(g){const v=Il(void 0,c),y=c.getAttribute("data-handleid"),w=o({nodeId:g,id:y,type:v});if(w){const m=i.find(C=>C.nodeId===g&&C.type===v&&C.id===y);return{handle:{id:y,type:v,nodeId:g,x:(m==null?void 0:m.x)||n.x,y:(m==null?void 0:m.y)||n.y},validHandleResult:w}}}}let l=[],d=Number.POSITIVE_INFINITY;for(const g of i){const v=Math.sqrt((g.x-n.x)**2+(g.y-n.y)**2);if(v<=r){const y=o(g);v<=d&&(v<d?l=[{handle:g,validHandleResult:y}]:v===d&&l.push({handle:g,validHandleResult:y}),d=v)}}if(!l.length)return{handle:null,validHandleResult:Lg()};if(l.length===1)return l[0];const f=l.some(({validHandleResult:g})=>g.isValid),h=l.some(({handle:g})=>g.type==="target");return l.find(({handle:g,validHandleResult:v})=>h?g.type==="target":f?v.isValid:!0)||l[0]}function Ic(e,t,n,r,i,o,a,s,u,c,l){const d=o==="target",f=s.querySelector(`.vue-flow__handle[data-id="${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`),{x:h,y:g}=wt(e),v=s.elementFromPoint(h,g),y=v!=null&&v.classList.contains("vue-flow__handle")?v:f,w=Lg();if(y){w.handleDomNode=y;const m=Il(void 0,y),C=y.getAttribute("data-nodeid"),S=y.getAttribute("data-handleid"),P=y.classList.contains("connectable"),M=y.classList.contains("connectableend"),R={source:d?C:r,sourceHandle:d?S:i,target:d?r:C,targetHandle:d?i:S};w.connection=R,P&&M&&(n===Dt.Strict?d&&m==="source"||!d&&m==="target":C!==r||S!==i)&&(w.isValid=a(R,{edges:u,nodes:c,sourceNode:l(R.source),targetNode:l(R.target)}),w.endHandle={nodeId:C,handleId:S,type:m,position:w.isValid?y.getAttribute("data-handlepos"):null})}return w}function Hw({nodes:e,nodeId:t,handleId:n,handleType:r}){const i=[];for(let o=0;o<e.length;o++){const a=e[o],{handleBounds:s}=a;let u=[],c=[];s&&(u=Cc(a,s,"source",`${t}-${n}-${r}`),c=Cc(a,s,"target",`${t}-${n}-${r}`)),i.push(...u,...c)}return i}function Il(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function Uw(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}const jw=["production","prod"];function yr(e,...t){zg()&&console.warn(`[Vue Flow]: ${e}`,...t)}function zg(){return!jw.includes("production")}function Nc(e,t,n,r){const i=t.querySelectorAll(`.vue-flow__handle${e}`);return Array.from(i).map(a=>{const s=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),position:a.getAttribute("data-handlepos"),x:(s.left-n.left)/r,y:(s.top-n.top)/r,...gr(a)}})}function ll(e,t,n,r,i,o=!1,a){i.value=!1,e.selected?(o||e.selected&&t)&&(r([e]),at(()=>{a.blur()})):n([e])}function xe(e){return typeof Q(e)<"u"}function Yw(e,t,n,r){var o;if(!e||!e.source||!e.target)return n(new Ne(Ce.EDGE_INVALID,(o=e==null?void 0:e.id)!=null?o:"[ID UNKNOWN]")),!1;let i;return St(e)?i=e:i={...e,id:Rg(e)},i=Ng(i,void 0,r),Ow(i,t)?!1:i}function Kw(e,t,n,r,i,o){if(!t.source||!t.target)return o(new Ne(Ce.EDGE_INVALID,e.id)),!1;const a=r(e.id);if(!a)return o(new Ne(Ce.EDGE_NOT_FOUND,e.id)),!1;const{id:s,...u}=e,c={...u,id:i?Rg(t):s,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return n.splice(n.indexOf(a),1,c),c}function Tc(e,t,n){const r={},i=[];for(let o=0;o<e.length;++o){const a=e[o];if(!Mt(a)){n(new Ne(Ce.NODE_INVALID,a==null?void 0:a.id)||`[ID UNKNOWN|INDEX ${o}]`);continue}const s=qw(a,t(a.id),a.parentNode);a.parentNode&&(r[a.parentNode]=!0),i[o]=s}for(const o of i){const a=t(o.parentNode)||i.find(s=>s.id===o.parentNode);o.parentNode&&!a&&n(new Ne(Ce.NODE_MISSING_PARENT,o.id,o.parentNode)),(o.parentNode||r[o.id])&&(r[o.id]&&(o.isParent=!0),a&&(a.isParent=!0))}return i}function Rc(e,t){e.clear();for(const n of t){const{id:r,source:i,target:o,sourceHandle:a=null,targetHandle:s=null}=n,u=`${i}-source-${a}`,c=`${o}-target-${s}`,l=e.get(u)||new Map,d=e.get(c)||new Map,f=Ht({edgeId:r,source:i,target:o,sourceHandle:a,targetHandle:s});e.set(u,l.set(`${o}-${s}`,f)),e.set(c,d.set(`${i}-${a}`,f))}}function Ac(e,t,n,r,i,o,a,s){const u=[];for(const c of e){const l=St(c)?c:Yw(c,s,i,o);if(!l)continue;const d=n(l.source),f=n(l.target);if(!d||!f){i(new Ne(Ce.EDGE_SOURCE_TARGET_MISSING,l.id,l.source,l.target));continue}if(!d){i(new Ne(Ce.EDGE_SOURCE_MISSING,l.id,l.source));continue}if(!f){i(new Ne(Ce.EDGE_TARGET_MISSING,l.id,l.target));continue}if(t&&!t(l,{edges:s,nodes:a,sourceNode:d,targetNode:f})){i(new Ne(Ce.EDGE_INVALID,l.id));continue}const h=r(l.id);u.push({...Ng(l,h,o),sourceNode:d,targetNode:f})}return u}const qc=Symbol("vueFlow"),Fg=Symbol("nodeId"),Gg=Symbol("nodeRef"),Xw=Symbol("edgeId"),Ww=Symbol("edgeRef"),mr=Symbol("slots");function Vg(e){const{vueFlowRef:t,snapToGrid:n,snapGrid:r,noDragClassName:i,nodes:o,nodeExtent:a,nodeDragThreshold:s,viewport:u,autoPanOnNodeDrag:c,autoPanSpeed:l,nodesDraggable:d,panBy:f,findNode:h,multiSelectionActive:g,nodesSelectionActive:v,selectNodesOnDrag:y,removeSelectedElements:w,addSelectedNodes:m,updateNodePositions:C,emits:S}=Ee(),{onStart:P,onDrag:M,onStop:R,onClick:B,el:D,disabled:A,id:b,selectable:G,dragHandle:W}=e,E=_e(!1);let T=[],N,k=null,$={x:void 0,y:void 0},L={x:0,y:0},V=null,F=!1,te=0,U=!1;const z=Qw(),X=({x:K,y:Z})=>{$={x:K,y:Z};let _=!1;if(T=T.map(p=>{const x={x:K-p.distance.x,y:Z-p.distance.y};n.value&&(x.x=r.value[0]*Math.round(x.x/r.value[0]),x.y=r.value[1]*Math.round(x.y/r.value[1]));const{computedPosition:I}=xl(p,x,S.error,a.value,p.parentNode?h(p.parentNode):void 0);return _=_||p.position.x!==I.x||p.position.y!==I.y,p.position=I,p}),!!_&&(C(T,!0,!0),E.value=!0,V)){const[p,x]=Xr({id:b,dragItems:T,findNode:h});M({event:V,node:p,nodes:x})}},de=()=>{var _,p;if(!k)return;const[K,Z]=$g(L,k,l.value);if(K!==0||Z!==0){const x={x:((_=$.x)!=null?_:0)-K/u.value.zoom,y:((p=$.y)!=null?p:0)-Z/u.value.zoom};f({x:K,y:Z})&&X(x)}te=requestAnimationFrame(de)},le=(K,Z)=>{F=!0;const _=h(b);!y.value&&!g.value&&_&&(_.selected||w()),_&&ve(G)&&y.value&&ll(_,g.value,m,w,v,!1,Z);const p=z(K);if($=p,T=Dw(o.value,d.value,p,h,b),T.length){const[x,I]=Xr({id:b,dragItems:T,findNode:h});P({event:K.sourceEvent,node:x,nodes:I})}},fe=(K,Z)=>{var _;K.sourceEvent.type==="touchmove"&&K.sourceEvent.touches.length>1||(s.value===0&&le(K,Z),$=z(K),k=((_=t.value)==null?void 0:_.getBoundingClientRect())||null,L=wt(K.sourceEvent,k))},re=(K,Z)=>{var p,x;const _=z(K);if(!U&&F&&c.value&&(U=!0,de()),!F){const I=_.xSnapped-((p=$.x)!=null?p:0),q=_.ySnapped-((x=$.y)!=null?x:0);Math.sqrt(I*I+q*q)>s.value&&le(K,Z)}($.x!==_.xSnapped||$.y!==_.ySnapped)&&T.length&&F&&(V=K.sourceEvent,L=wt(K.sourceEvent,k),X(_))},ae=K=>{var Z,_;if(!F){const p=z(K),x=p.xSnapped-((Z=$.x)!=null?Z:0),I=p.ySnapped-((_=$.y)!=null?_:0),q=Math.sqrt(x*x+I*I);q!==0&&q<=s.value&&(B==null||B(K.sourceEvent));return}if(E.value=!1,U=!1,F=!1,cancelAnimationFrame(te),T.length){C(T,!1,!1);const[p,x]=Xr({id:b,dragItems:T,findNode:h});R({event:K.sourceEvent,node:p,nodes:x})}};return me([()=>ve(A),D],([K,Z],_,p)=>{if(Z){const x=Be(Z);K||(N=Ob().on("start",I=>fe(I,Z)).on("drag",I=>re(I,Z)).on("end",I=>ae(I)).filter(I=>{const q=I.target,j=ve(W);return!I.button&&(!i.value||!Ec(q,`.${i.value}`,Z)&&(!j||Ec(q,j,Z)))}),x.call(N)),p(()=>{x.on(".drag",null),N&&(N.on("start",null),N.on("drag",null),N.on("end",null))})}}),E}function Zw(){return{doubleClick:H(),click:H(),mouseEnter:H(),mouseMove:H(),mouseLeave:H(),contextMenu:H(),updateStart:H(),update:H(),updateEnd:H()}}function Jw(e,t){const n=Zw();return n.doubleClick.on(r=>{var i,o;t.edgeDoubleClick(r),(o=(i=e.events)==null?void 0:i.doubleClick)==null||o.call(i,r)}),n.click.on(r=>{var i,o;t.edgeClick(r),(o=(i=e.events)==null?void 0:i.click)==null||o.call(i,r)}),n.mouseEnter.on(r=>{var i,o;t.edgeMouseEnter(r),(o=(i=e.events)==null?void 0:i.mouseEnter)==null||o.call(i,r)}),n.mouseMove.on(r=>{var i,o;t.edgeMouseMove(r),(o=(i=e.events)==null?void 0:i.mouseMove)==null||o.call(i,r)}),n.mouseLeave.on(r=>{var i,o;t.edgeMouseLeave(r),(o=(i=e.events)==null?void 0:i.mouseLeave)==null||o.call(i,r)}),n.contextMenu.on(r=>{var i,o;t.edgeContextMenu(r),(o=(i=e.events)==null?void 0:i.contextMenu)==null||o.call(i,r)}),n.updateStart.on(r=>{var i,o;t.edgeUpdateStart(r),(o=(i=e.events)==null?void 0:i.updateStart)==null||o.call(i,r)}),n.update.on(r=>{var i,o;t.edgeUpdate(r),(o=(i=e.events)==null?void 0:i.update)==null||o.call(i,r)}),n.updateEnd.on(r=>{var i,o;t.edgeUpdateEnd(r),(o=(i=e.events)==null?void 0:i.updateEnd)==null||o.call(i,r)}),Object.entries(n).reduce((r,[i,o])=>(r.emit[i]=o.trigger,r.on[i]=o.on,r),{emit:{},on:{}})}function Qw(){const{viewport:e,snapGrid:t,snapToGrid:n}=Ee();return({sourceEvent:r})=>{const i=r.touches?r.touches[0].clientX:r.clientX,o=r.touches?r.touches[0].clientY:r.clientY,a={x:(i-e.value.x)/e.value.zoom,y:(o-e.value.y)/e.value.zoom};return{xSnapped:n.value?t.value[0]*Math.round(a.x/t.value[0]):a.x,ySnapped:n.value?t.value[1]*Math.round(a.y/t.value[1]):a.y,...a}}}function Bn(){return!0}function Hg({handleId:e,nodeId:t,type:n,isValidConnection:r,edgeUpdaterType:i,onEdgeUpdate:o,onEdgeUpdateEnd:a}){const{vueFlowRef:s,connectionMode:u,connectionRadius:c,connectOnClick:l,connectionClickStartHandle:d,nodesConnectable:f,autoPanOnConnect:h,autoPanSpeed:g,findNode:v,panBy:y,startConnection:w,updateConnection:m,endConnection:C,emits:S,viewport:P,edges:M,nodes:R,isValidConnection:B}=Ee();let D=null,A=!1,b=null,G=null;function W(T){var N;const k=ve(n)==="target",$=Cl(T),L=pc(T.target);if($&&T.button===0||!$){let V=function(I){Z=wt(I,ae);const{handle:q,validHandleResult:j}=Vw(I,L,nr(Z,P.value,!1,[1,1]),c.value,p,Y=>Ic(I,Y,u.value,ve(t),ve(e),k?"target":"source",U,L,M.value,R.value,v));if(z=q,_||(x(),_=!0),D=j.connection,A=j.isValid,b=j.handleDomNode,!(A&&z&&(G==null?void 0:G.endHandle)&&j.endHandle&&G.endHandle.type===j.endHandle.type&&G.endHandle.nodeId===j.endHandle.nodeId&&G.endHandle.handleId===j.endHandle.handleId)){if(m(z&&A?Ag({x:z.x,y:z.y},P.value):Z,j.endHandle,Uw(!!z,A)),G=j,!z&&!A&&!b)return Wr(K);D&&D.source!==D.target&&b&&(Wr(K),K=b,b.classList.add("connecting","vue-flow__handle-connecting"),b.classList.toggle("valid",A),b.classList.toggle("vue-flow__handle-valid",A))}},F=function(I){(z||b)&&D&&A&&(o?o(I,D):S.connect(D)),S.connectEnd(I),i&&(a==null||a(I)),Wr(K),cancelAnimationFrame(X),C(I),_=!1,A=!1,D=null,b=null,L.removeEventListener("mousemove",V),L.removeEventListener("mouseup",F),L.removeEventListener("touchmove",V),L.removeEventListener("touchend",F)};const te=v(ve(t));let U=ve(r)||B.value||Bn;!U&&te&&(U=(k?te.isValidSourcePos:te.isValidTargetPos)||Bn);let z,X=0;const{x:de,y:le}=wt(T),fe=L==null?void 0:L.elementFromPoint(de,le),re=Il(ve(i),fe),ae=(N=s.value)==null?void 0:N.getBoundingClientRect();if(!ae||!re)return;let K,Z=wt(T,ae),_=!1;const p=Hw({nodes:R.value,nodeId:ve(t),handleId:ve(e),handleType:re}),x=()=>{if(!h.value)return;const[I,q]=$g(Z,ae,g.value);y({x:I,y:q}),X=requestAnimationFrame(x)};w({nodeId:ve(t),handleId:ve(e),type:re,position:(fe==null?void 0:fe.getAttribute("data-handlepos"))||J.Top},{x:de-ae.left,y:le-ae.top}),S.connectStart({event:T,nodeId:ve(t),handleId:ve(e),handleType:re}),L.addEventListener("mousemove",V),L.addEventListener("mouseup",F),L.addEventListener("touchmove",V),L.addEventListener("touchend",F)}}function E(T){if(!l.value)return;const N=ve(n)==="target";if(!d.value)S.clickConnectStart({event:T,nodeId:ve(t),handleId:ve(e)}),w({nodeId:ve(t),type:ve(n),handleId:ve(e)},void 0,!0);else{let k=ve(r)||B.value||Bn;const $=v(ve(t));if(!k&&$&&(k=(N?$.isValidSourcePos:$.isValidTargetPos)||Bn),$&&(typeof $.connectable>"u"?f.value:$.connectable)===!1)return;const L=pc(T.target),{connection:V,isValid:F}=Ic(T,{nodeId:ve(t),id:ve(e),type:ve(n)},u.value,d.value.nodeId,d.value.handleId||null,d.value.type,k,L,M.value,R.value,v),te=V.source===V.target;F&&!te&&S.connect(V),S.clickConnectEnd(T),C(T,!0)}}return{handlePointerDown:W,handleClick:E}}function e1(){return Jt(Fg,"")}function Ug(e){var s;const t=(s=e!=null?e:e1())!=null?s:"",n=Jt(Gg,_e(null)),{findNode:r,edges:i,emits:o}=Ee(),a=r(t);return a||o.error(new Ne(Ce.NODE_NOT_FOUND,t)),{id:t,nodeEl:n,node:a,parentNode:se(()=>r(a.parentNode)),connectedEdges:se(()=>kg([a],i.value))}}function t1(){return{doubleClick:H(),click:H(),mouseEnter:H(),mouseMove:H(),mouseLeave:H(),contextMenu:H(),dragStart:H(),drag:H(),dragStop:H()}}function n1(e,t){const n=t1();return n.doubleClick.on(r=>{var i,o;t.nodeDoubleClick(r),(o=(i=e.events)==null?void 0:i.doubleClick)==null||o.call(i,r)}),n.click.on(r=>{var i,o;t.nodeClick(r),(o=(i=e.events)==null?void 0:i.click)==null||o.call(i,r)}),n.mouseEnter.on(r=>{var i,o;t.nodeMouseEnter(r),(o=(i=e.events)==null?void 0:i.mouseEnter)==null||o.call(i,r)}),n.mouseMove.on(r=>{var i,o;t.nodeMouseMove(r),(o=(i=e.events)==null?void 0:i.mouseMove)==null||o.call(i,r)}),n.mouseLeave.on(r=>{var i,o;t.nodeMouseLeave(r),(o=(i=e.events)==null?void 0:i.mouseLeave)==null||o.call(i,r)}),n.contextMenu.on(r=>{var i,o;t.nodeContextMenu(r),(o=(i=e.events)==null?void 0:i.contextMenu)==null||o.call(i,r)}),n.dragStart.on(r=>{var i,o;t.nodeDragStart(r),(o=(i=e.events)==null?void 0:i.dragStart)==null||o.call(i,r)}),n.drag.on(r=>{var i,o;t.nodeDrag(r),(o=(i=e.events)==null?void 0:i.drag)==null||o.call(i,r)}),n.dragStop.on(r=>{var i,o;t.nodeDragStop(r),(o=(i=e.events)==null?void 0:i.dragStop)==null||o.call(i,r)}),Object.entries(n).reduce((r,[i,o])=>(r.emit[i]=o.trigger,r.on[i]=o.on,r),{emit:{},on:{}})}function jg(){const{getSelectedNodes:e,nodeExtent:t,updateNodePositions:n,findNode:r,snapGrid:i,snapToGrid:o,nodesDraggable:a,emits:s}=Ee();return(u,c=!1)=>{const l=o.value?i.value[0]:5,d=o.value?i.value[1]:5,f=c?4:1,h=u.x*l*f,g=u.y*d*f,v=[];for(const y of e.value)if(y.draggable||a&&typeof y.draggable>"u"){const w={x:y.computedPosition.x+h,y:y.computedPosition.y+g},{computedPosition:m}=xl(y,w,s.error,t.value,y.parentNode?r(y.parentNode):void 0);v.push({id:y.id,position:m,from:y.position,distance:{x:u.x,y:u.y},dimensions:y.dimensions})}n(v,!0,!1)}}const Zr=.1;function pt(){return yr("Viewport not initialized yet."),Promise.resolve(!1)}const r1={zoomIn:pt,zoomOut:pt,zoomTo:pt,fitView:pt,setCenter:pt,fitBounds:pt,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:pt,setTransform:pt,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function i1(e){function t(r,i){return new Promise(o=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.scaleBy(Jr(e.d3Selection,i,()=>{o(!0)}),r):o(!1)})}function n(r,i,o,a){return new Promise(s=>{const{x:u,y:c}=Ig({x:-r,y:-i},e.translateExtent),l=Zt.translate(-u,-c).scale(o);e.d3Selection&&e.d3Zoom?e.d3Zoom.transform(Jr(e.d3Selection,a,()=>{s(!0)}),l):s(!1)})}return se(()=>e.d3Zoom&&e.d3Selection&&e.dimensions.width&&e.dimensions.height?{viewportInitialized:!0,zoomIn:i=>t(1.2,i==null?void 0:i.duration),zoomOut:i=>t(1/1.2,i==null?void 0:i.duration),zoomTo:(i,o)=>new Promise(a=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.scaleTo(Jr(e.d3Selection,o==null?void 0:o.duration,()=>{a(!0)}),i):a(!1)}),setViewport:(i,o)=>n(i.x,i.y,i.zoom,o==null?void 0:o.duration),setTransform:(i,o)=>n(i.x,i.y,i.zoom,o==null?void 0:o.duration),getViewport:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),getTransform:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),fitView:(i={padding:Zr,includeHiddenNodes:!1,duration:0})=>{var f,h,g;var o,a;const s=[];for(const v of e.nodes)v.dimensions.width&&v.dimensions.height&&((i==null?void 0:i.includeHiddenNodes)||!v.hidden)&&(!((o=i.nodes)!=null&&o.length)||((a=i.nodes)==null?void 0:a.length)&&i.nodes.includes(v.id))&&s.push(v);if(!s.length)return Promise.resolve(!1);const u=Pg(s),{x:c,y:l,zoom:d}=gc(u,e.dimensions.width,e.dimensions.height,(f=i.minZoom)!=null?f:e.minZoom,(h=i.maxZoom)!=null?h:e.maxZoom,(g=i.padding)!=null?g:Zr,i.offset);return n(c,l,d,i==null?void 0:i.duration)},setCenter:(i,o,a)=>{const s=typeof(a==null?void 0:a.zoom)<"u"?a.zoom:e.maxZoom,u=e.dimensions.width/2-i*s,c=e.dimensions.height/2-o*s;return n(u,c,s,a==null?void 0:a.duration)},fitBounds:(i,o={padding:Zr})=>{const{x:a,y:s,zoom:u}=gc(i,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,o.padding);return n(a,s,u,o==null?void 0:o.duration)},project:i=>nr(i,e.viewport,e.snapToGrid,e.snapGrid),screenToFlowCoordinate:i=>{if(e.vueFlowRef){const{x:o,y:a}=e.vueFlowRef.getBoundingClientRect(),s={x:i.x-o,y:i.y-a};return nr(s,e.viewport,e.snapToGrid,e.snapGrid)}return{x:0,y:0}},flowToScreenCoordinate:i=>{if(e.vueFlowRef){const{x:o,y:a}=e.vueFlowRef.getBoundingClientRect(),s={x:i.x+o,y:i.y+a};return Ag(s,e.viewport)}return{x:0,y:0}}}:r1)}function Jr(e,t=0,n){return e.transition().duration(t).on("end",n)}function o1(e,t,n){const r=Fp(!0);return r.run(()=>{const i=()=>{r.run(()=>{let v,y,w=!!(n.nodes.value.length||n.edges.value.length);v=Vt([e.modelValue,()=>{var m,C;return(C=(m=e.modelValue)==null?void 0:m.value)==null?void 0:C.length}],([m])=>{m&&Array.isArray(m)&&(y==null||y.pause(),n.setElements(m),!y&&!w&&m.length?w=!0:y==null||y.resume())}),y=Vt([n.nodes,n.edges,()=>n.edges.value.length,()=>n.nodes.value.length],([m,C])=>{var S;((S=e.modelValue)==null?void 0:S.value)&&Array.isArray(e.modelValue.value)&&(v==null||v.pause(),e.modelValue.value=[...m,...C],at(()=>{v==null||v.resume()}))},{immediate:w}),Un(()=>{v==null||v.stop(),y==null||y.stop()})})},o=()=>{r.run(()=>{let v,y,w=!!n.nodes.value.length;v=Vt([e.nodes,()=>{var m,C;return(C=(m=e.nodes)==null?void 0:m.value)==null?void 0:C.length}],([m])=>{m&&Array.isArray(m)&&(y==null||y.pause(),n.setNodes(m),!y&&!w&&m.length?w=!0:y==null||y.resume())}),y=Vt([n.nodes,()=>n.nodes.value.length],([m])=>{var C;((C=e.nodes)==null?void 0:C.value)&&Array.isArray(e.nodes.value)&&(v==null||v.pause(),e.nodes.value=[...m],at(()=>{v==null||v.resume()}))},{immediate:w}),Un(()=>{v==null||v.stop(),y==null||y.stop()})})},a=()=>{r.run(()=>{let v,y,w=!!n.edges.value.length;v=Vt([e.edges,()=>{var m,C;return(C=(m=e.edges)==null?void 0:m.value)==null?void 0:C.length}],([m])=>{m&&Array.isArray(m)&&(y==null||y.pause(),n.setEdges(m),!y&&!w&&m.length?w=!0:y==null||y.resume())}),y=Vt([n.edges,()=>n.edges.value.length],([m])=>{var C;((C=e.edges)==null?void 0:C.value)&&Array.isArray(e.edges.value)&&(v==null||v.pause(),e.edges.value=[...m],at(()=>{v==null||v.resume()}))},{immediate:w}),Un(()=>{v==null||v.stop(),y==null||y.stop()})})},s=()=>{r.run(()=>{me(()=>t.maxZoom,()=>{t.maxZoom&&xe(t.maxZoom)&&n.setMaxZoom(t.maxZoom)},{immediate:!0})})},u=()=>{r.run(()=>{me(()=>t.minZoom,()=>{t.minZoom&&xe(t.minZoom)&&n.setMinZoom(t.minZoom)},{immediate:!0})})},c=()=>{r.run(()=>{me(()=>t.translateExtent,()=>{t.translateExtent&&xe(t.translateExtent)&&n.setTranslateExtent(t.translateExtent)},{immediate:!0})})},l=()=>{r.run(()=>{me(()=>t.nodeExtent,()=>{t.nodeExtent&&xe(t.nodeExtent)&&n.setNodeExtent(t.nodeExtent)},{immediate:!0})})},d=()=>{r.run(()=>{me(()=>t.applyDefault,()=>{xe(t.applyDefault)&&(n.applyDefault.value=t.applyDefault)},{immediate:!0})})},f=()=>{r.run(()=>{const v=async y=>{let w=y;typeof t.autoConnect=="function"&&(w=await t.autoConnect(y)),w!==!1&&n.addEdges([w])};me(()=>t.autoConnect,()=>{xe(t.autoConnect)&&(n.autoConnect.value=t.autoConnect)},{immediate:!0}),me(n.autoConnect,(y,w,m)=>{y?n.onConnect(v):n.hooks.value.connect.off(v),m(()=>{n.hooks.value.connect.off(v)})},{immediate:!0})})},h=()=>{const v=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const y of Object.keys(t)){const w=y;if(!v.includes(w)){const m=be(()=>t[w]),C=n[w];pl(C)&&r.run(()=>{me(m,S=>{xe(S)&&(C.value=S)},{immediate:!0})})}}};(()=>{i(),o(),a(),u(),s(),c(),l(),d(),f(),h()})()}),()=>r.stop()}function a1(){return{edgesChange:H(),nodesChange:H(),nodeDoubleClick:H(),nodeClick:H(),nodeMouseEnter:H(),nodeMouseMove:H(),nodeMouseLeave:H(),nodeContextMenu:H(),nodeDragStart:H(),nodeDrag:H(),nodeDragStop:H(),nodesInitialized:H(),miniMapNodeClick:H(),miniMapNodeDoubleClick:H(),miniMapNodeMouseEnter:H(),miniMapNodeMouseMove:H(),miniMapNodeMouseLeave:H(),connect:H(),connectStart:H(),connectEnd:H(),clickConnectStart:H(),clickConnectEnd:H(),paneReady:H(),init:H(),move:H(),moveStart:H(),moveEnd:H(),selectionDragStart:H(),selectionDrag:H(),selectionDragStop:H(),selectionContextMenu:H(),selectionStart:H(),selectionEnd:H(),viewportChangeStart:H(),viewportChange:H(),viewportChangeEnd:H(),paneScroll:H(),paneClick:H(),paneContextMenu:H(),paneMouseEnter:H(),paneMouseMove:H(),paneMouseLeave:H(),edgeContextMenu:H(),edgeMouseEnter:H(),edgeMouseMove:H(),edgeMouseLeave:H(),edgeDoubleClick:H(),edgeClick:H(),edgeUpdateStart:H(),edgeUpdate:H(),edgeUpdateEnd:H(),updateNodeInternals:H(),error:H(e=>yr(e.message))}}function s1(e,t){xm(()=>{for(const[n,r]of Object.entries(t.value)){const i=o=>{e(n,o)};r.fns.add(i),dr(()=>{r.off(i)})}})}function Yg(){return{vueFlowRef:null,viewportRef:null,nodes:[],edges:[],connectionLookup:new Map,nodeTypes:{},edgeTypes:{},initialized:!1,dimensions:{width:0,height:0},viewport:{x:0,y:0,zoom:1},d3Zoom:null,d3Selection:null,d3ZoomHandler:null,minZoom:.5,maxZoom:2,translateExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodeExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],selectionMode:Sl.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:hn.Free,paneClickDistance:0,panOnDrag:!0,edgeUpdaterRadius:10,onlyRenderVisibleElements:!1,defaultViewport:{x:0,y:0,zoom:1},nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,defaultMarkerColor:"#b1b1b7",connectionLineStyle:{},connectionLineType:null,connectionLineOptions:{type:Nt.Bezier,style:{}},connectionMode:Dt.Loose,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectionPosition:{x:Number.NaN,y:Number.NaN},connectionRadius:20,connectOnClick:!0,connectionStatus:null,isValidConnection:null,snapGrid:[15,15],snapToGrid:!1,edgesUpdatable:!1,edgesFocusable:!0,nodesFocusable:!0,nodesConnectable:!0,nodesDraggable:!0,nodeDragThreshold:1,elementsSelectable:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,selectionKeyCode:"Shift",multiSelectionKeyCode:or()?"Meta":"Control",zoomActivationKeyCode:or()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:a1(),applyDefault:!0,autoConnect:!1,fitViewOnInit:!1,fitViewOnInitDone:!1,noDragClassName:"nodrag",noWheelClassName:"nowheel",noPanClassName:"nopan",defaultEdgeOptions:void 0,elevateEdgesOnSelect:!1,elevateNodesOnSelect:!0,autoPanOnNodeDrag:!0,autoPanOnConnect:!0,autoPanSpeed:15,disableKeyboardA11y:!1,ariaLiveMessage:""}}const u1=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function l1(e,t,n){const r=i1(e),i=_=>{const p=_!=null?_:[];e.hooks.updateNodeInternals.trigger(p)},o=_=>Pw(_,e.nodes,e.edges),a=_=>Mw(_,e.nodes,e.edges),s=_=>kg(_,e.edges),u=_=>{if(!!_)return t.value.get(_)},c=_=>{if(!!_)return n.value.get(_)},l=(_,p,x)=>{var Y,O;var I,q;const j=[];for(const ee of _){const ie={id:ee.id,type:"position",dragging:x,from:ee.from};if(p&&(ie.position=ee.position,ee.parentNode)){const ne=u(ee.parentNode);ie.position={x:ie.position.x-((Y=(I=ne==null?void 0:ne.computedPosition)==null?void 0:I.x)!=null?Y:0),y:ie.position.y-((O=(q=ne==null?void 0:ne.computedPosition)==null?void 0:q.y)!=null?O:0)}}j.push(ie)}j!=null&&j.length&&e.hooks.nodesChange.trigger(j)},d=_=>{if(!e.vueFlowRef)return;const p=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!p)return;const x=window.getComputedStyle(p),{m22:I}=new window.DOMMatrixReadOnly(x.transform),q=[];for(let j=0;j<_.length;++j){const Y=_[j],O=u(Y.id);if(O){const ee=gr(Y.nodeElement);if(!!(ee.width&&ee.height&&(O.dimensions.width!==ee.width||O.dimensions.height!==ee.height||Y.forceUpdate))){const ne=Y.nodeElement.getBoundingClientRect();O.dimensions=ee,O.handleBounds.source=Nc(".source",Y.nodeElement,ne,I),O.handleBounds.target=Nc(".target",Y.nodeElement,ne,I),q.push({id:O.id,type:"dimensions",dimensions:ee})}}}!e.fitViewOnInitDone&&e.fitViewOnInit&&r.value.fitView().then(()=>{e.fitViewOnInitDone=!0}),q.length&&e.hooks.nodesChange.trigger(q)},f=(_,p)=>{const x=new Set,I=new Set;for(const Y of _)Mt(Y)?x.add(Y.id):St(Y)&&I.add(Y.id);const q=_t(t.value,x,!0),j=_t(n.value,I);if(e.multiSelectionActive){for(const Y of x)q.push(yt(Y,p));for(const Y of I)j.push(yt(Y,p))}q.length&&e.hooks.nodesChange.trigger(q),j.length&&e.hooks.edgesChange.trigger(j)},h=_=>{if(e.multiSelectionActive){const p=_.map(x=>yt(x.id,!0));e.hooks.nodesChange.trigger(p);return}e.hooks.nodesChange.trigger(_t(t.value,new Set(_.map(p=>p.id)),!0)),e.hooks.edgesChange.trigger(_t(n.value))},g=_=>{if(e.multiSelectionActive){const p=_.map(x=>yt(x.id,!0));e.hooks.edgesChange.trigger(p);return}e.hooks.edgesChange.trigger(_t(n.value,new Set(_.map(p=>p.id)))),e.hooks.nodesChange.trigger(_t(t.value,new Set,!0))},v=_=>{f(_,!0)},y=_=>{const x=(_||e.nodes).map(I=>(I.selected=!1,yt(I.id,!1)));e.hooks.nodesChange.trigger(x)},w=_=>{const x=(_||e.edges).map(I=>(I.selected=!1,yt(I.id,!1)));e.hooks.edgesChange.trigger(x)},m=_=>{if(!_||!_.length)return f([],!1);const p=_.reduce((x,I)=>{const q=yt(I.id,!1);return Mt(I)?x.nodes.push(q):x.edges.push(q),x},{nodes:[],edges:[]});p.nodes.length&&e.hooks.nodesChange.trigger(p.nodes),p.edges.length&&e.hooks.edgesChange.trigger(p.edges)},C=_=>{var p;(p=e.d3Zoom)==null||p.scaleExtent([_,e.maxZoom]),e.minZoom=_},S=_=>{var p;(p=e.d3Zoom)==null||p.scaleExtent([e.minZoom,_]),e.maxZoom=_},P=_=>{var p;(p=e.d3Zoom)==null||p.translateExtent(_),e.translateExtent=_},M=_=>{e.nodeExtent=_,i()},R=_=>{var p;(p=e.d3Zoom)==null||p.clickDistance(_)},B=_=>{e.nodesDraggable=_,e.nodesConnectable=_,e.elementsSelectable=_},D=_=>{const p=_ instanceof Function?_(e.nodes):_;!e.initialized&&!p.length||(e.nodes=Tc(p,u,e.hooks.error.trigger))},A=_=>{const p=_ instanceof Function?_(e.edges):_;if(!e.initialized&&!p.length)return;const x=Ac(p,e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);Rc(e.connectionLookup,x),e.edges=x},b=_=>{const p=_ instanceof Function?_([...e.nodes,...e.edges]):_;!e.initialized&&!p.length||(D(p.filter(Mt)),A(p.filter(St)))},G=_=>{let p=_ instanceof Function?_(e.nodes):_;p=Array.isArray(p)?p:[p];const x=Tc(p,u,e.hooks.error.trigger),I=[];for(const q of x)I.push(_c(q));I.length&&e.hooks.nodesChange.trigger(I)},W=_=>{let p=_ instanceof Function?_(e.edges):_;p=Array.isArray(p)?p:[p];const x=Ac(p,e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),I=[];for(const q of x)I.push(_c(q));I.length&&e.hooks.edgesChange.trigger(I)},E=(_,p=!0,x=!1)=>{const I=_ instanceof Function?_(e.nodes):_,q=Array.isArray(I)?I:[I],j=[],Y=[];function O(ie){const ne=s(ie);for(const he of ne)(!xe(he.deletable)||he.deletable)&&Y.push(wc(he.id,he.source,he.target,he.sourceHandle,he.targetHandle))}function ee(ie){const ne=[];for(const he of e.nodes)he.parentNode===ie&&ne.push(he);if(ne.length){for(const he of ne)j.push(bc(he.id));p&&O(ne);for(const he of ne)ee(he.id)}}for(const ie of q){const ne=typeof ie=="string"?u(ie):ie;!ne||xe(ne.deletable)&&!ne.deletable||(j.push(bc(ne.id)),p&&O([ne]),x&&ee(ne.id))}Y.length&&e.hooks.edgesChange.trigger(Y),j.length&&e.hooks.nodesChange.trigger(j)},T=_=>{const p=_ instanceof Function?_(e.edges):_,x=Array.isArray(p)?p:[p],I=[];for(const q of x){const j=typeof q=="string"?c(q):q;!j||xe(j.deletable)&&!j.deletable||I.push(wc(typeof q=="string"?q:q.id,j.source,j.target,j.sourceHandle,j.targetHandle))}e.hooks.edgesChange.trigger(I)},N=(_,p,x=!0)=>Kw(_,p,e.edges,c,x,e.hooks.error.trigger),k=(_,p,x={replace:!1})=>{const I=c(_);if(!I)return;const q=typeof p=="function"?p(I):p;I.data=x.replace?q:{...I.data,...q}},$=_=>mc(_,e.nodes),L=_=>{const p=mc(_,e.edges);return Rc(e.connectionLookup,p),p},V=(_,p,x={replace:!1})=>{const I=u(_);if(!I)return;const q=typeof p=="function"?p(I):p;x.replace?e.nodes.splice(e.nodes.indexOf(I),1,q):Object.assign(I,q)},F=(_,p,x={replace:!1})=>{const I=u(_);if(!I)return;const q=typeof p=="function"?p(I):p;I.data=x.replace?q:{...I.data,...q}},te=(_,p,x=!1)=>{x?e.connectionClickStartHandle=_:e.connectionStartHandle=_,e.connectionEndHandle=null,e.connectionStatus=null,p&&(e.connectionPosition=p)},U=(_,p=null,x=null)=>{e.connectionStartHandle&&(e.connectionPosition=_,e.connectionEndHandle=p,e.connectionStatus=x)},z=(_,p)=>{e.connectionPosition={x:Number.NaN,y:Number.NaN},e.connectionEndHandle=null,e.connectionStatus=null,p?e.connectionClickStartHandle=null:e.connectionStartHandle=null},X=_=>{const p=Aw(_),x=p?null:ln(_)?_:u(_.id);return!p&&!x?[null,null,p]:[p?_:sl(x),x,p]},de=(_,p=!0,x=e.nodes)=>{const[I,q,j]=X(_);if(!I)return[];const Y=[];for(const O of x||e.nodes){if(!j&&(O.id===q.id||!O.computedPosition))continue;const ee=sl(O),ie=ul(ee,I);(p&&ie>0||ie>=Number(I.width)*Number(I.height))&&Y.push(O)}return Y},le=(_,p,x=!0)=>{const[I]=X(_);if(!I)return!1;const q=ul(I,p);return x&&q>0||q>=Number(I.width)*Number(I.height)},fe=_=>{const{viewport:p,dimensions:x,d3Zoom:I,d3Selection:q,translateExtent:j}=e;if(!I||!q||!_.x&&!_.y)return!1;const Y=Zt.translate(p.x+_.x,p.y+_.y).scale(p.zoom),O=[[0,0],[x.width,x.height]],ee=I.constrain()(Y,O,j),ie=e.viewport.x!==ee.x||e.viewport.y!==ee.y||e.viewport.zoom!==ee.k;return I.transform(q,ee),ie},re=_=>{const p=_ instanceof Function?_(e):_,x=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];xe(p.defaultEdgeOptions)&&(e.defaultEdgeOptions=p.defaultEdgeOptions);const I=p.modelValue||p.nodes||p.edges?[]:void 0;I&&(p.modelValue&&I.push(...p.modelValue),p.nodes&&I.push(...p.nodes),p.edges&&I.push(...p.edges),b(I));const q=()=>{xe(p.maxZoom)&&S(p.maxZoom),xe(p.minZoom)&&C(p.minZoom),xe(p.translateExtent)&&P(p.translateExtent)};for(const j of Object.keys(p)){const Y=j,O=p[Y];![...u1,...x].includes(Y)&&xe(O)&&(e[Y]=O)}Wu(()=>e.d3Zoom).not.toBeNull().then(q),e.initialized||(e.initialized=!0)};return{updateNodePositions:l,updateNodeDimensions:d,setElements:b,setNodes:D,setEdges:A,addNodes:G,addEdges:W,removeNodes:E,removeEdges:T,findNode:u,findEdge:c,updateEdge:N,updateEdgeData:k,updateNode:V,updateNodeData:F,applyEdgeChanges:L,applyNodeChanges:$,addSelectedElements:v,addSelectedNodes:h,addSelectedEdges:g,setMinZoom:C,setMaxZoom:S,setTranslateExtent:P,setNodeExtent:M,setPaneClickDistance:R,removeSelectedElements:m,removeSelectedNodes:y,removeSelectedEdges:w,startConnection:te,updateConnection:U,endConnection:z,setInteractive:B,setState:re,getIntersectingNodes:de,getIncomers:o,getOutgoers:a,getConnectedEdges:s,isNodeIntersecting:le,panBy:fe,fitView:_=>r.value.fitView(_),zoomIn:_=>r.value.zoomIn(_),zoomOut:_=>r.value.zoomOut(_),zoomTo:(_,p)=>r.value.zoomTo(_,p),setViewport:(_,p)=>r.value.setViewport(_,p),setTransform:(_,p)=>r.value.setTransform(_,p),getViewport:()=>r.value.getViewport(),getTransform:()=>r.value.getTransform(),setCenter:(_,p,x)=>r.value.setCenter(_,p,x),fitBounds:(_,p)=>r.value.fitBounds(_,p),project:_=>r.value.project(_),screenToFlowCoordinate:_=>r.value.screenToFlowCoordinate(_),flowToScreenCoordinate:_=>r.value.flowToScreenCoordinate(_),toObject:()=>{const _=[],p=[];for(const x of e.nodes){const{computedPosition:I,handleBounds:q,selected:j,dimensions:Y,isParent:O,resizing:ee,dragging:ie,events:ne,...he}=x;_.push(he)}for(const x of e.edges){const{selected:I,sourceNode:q,targetNode:j,events:Y,...O}=x;p.push(O)}return JSON.parse(JSON.stringify({nodes:_,edges:p,position:[e.viewport.x,e.viewport.y],zoom:e.viewport.zoom,viewport:e.viewport}))},fromObject:_=>new Promise(p=>{const{nodes:x,edges:I,position:q,zoom:j,viewport:Y}=_;if(x&&D(x),I&&A(I),(Y==null?void 0:Y.x)&&(Y==null?void 0:Y.y)||q){const O=(Y==null?void 0:Y.x)||q[0],ee=(Y==null?void 0:Y.y)||q[1],ie=(Y==null?void 0:Y.zoom)||j||e.viewport.zoom;return Wu(()=>r.value.viewportInitialized).toBe(!0).then(()=>{r.value.setViewport({x:O,y:ee,zoom:ie}).then(()=>{p(!0)})})}else p(!0)}),updateNodeInternals:i,viewportHelper:r,$reset:()=>{var p,x,I;const _=Yg();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){const q=Zt.translate((p=_.defaultViewport.x)!=null?p:0,(x=_.defaultViewport.y)!=null?x:0).scale($t((I=_.defaultViewport.zoom)!=null?I:1,_.minZoom,_.maxZoom)),j=e.viewportRef.getBoundingClientRect(),Y=[[0,0],[j.width,j.height]],O=e.d3Zoom.constrain()(q,Y,_.translateExtent);e.d3Zoom.transform(e.d3Selection,O)}re(_)},$destroy:()=>{}}}const c1=["data-id","data-handleid","data-nodeid","data-handlepos"],d1={name:"Handle",compatConfig:{MODE:3}},ar=we({...d1,props:{id:{default:null},type:{},position:{default:()=>J.Top},isValidConnection:{type:Function},connectable:{type:[Boolean,Number,String,Function],default:void 0},connectableStart:{type:Boolean,default:!0},connectableEnd:{type:Boolean,default:!0}},setup(e,{expose:t}){const n=Hp(e,["position","connectable","connectableStart","connectableEnd","id"]),r=be(()=>{var A;return(A=n.type)!=null?A:"source"}),i=be(()=>{var A;return(A=n.isValidConnection)!=null?A:null}),{connectionStartHandle:o,connectionClickStartHandle:a,connectionEndHandle:s,vueFlowRef:u,nodesConnectable:c,noDragClassName:l,noPanClassName:d}=Ee(),{id:f,node:h,nodeEl:g,connectedEdges:v}=Ug(),y=_e(),w=be(()=>typeof e.connectableStart<"u"?e.connectableStart:!0),m=be(()=>typeof e.connectableEnd<"u"?e.connectableEnd:!0),C=be(()=>{var A,b,G,W,E,T;return((A=o.value)==null?void 0:A.nodeId)===f&&((b=o.value)==null?void 0:b.handleId)===e.id&&((G=o.value)==null?void 0:G.type)===r.value||((W=s.value)==null?void 0:W.nodeId)===f&&((E=s.value)==null?void 0:E.handleId)===e.id&&((T=s.value)==null?void 0:T.type)===r.value}),S=be(()=>{var A,b,G;return((A=a.value)==null?void 0:A.nodeId)===f&&((b=a.value)==null?void 0:b.handleId)===e.id&&((G=a.value)==null?void 0:G.type)===r.value}),{handlePointerDown:P,handleClick:M}=Hg({nodeId:f,handleId:e.id,isValidConnection:i,type:r}),R=se(()=>typeof e.connectable=="string"&&e.connectable==="single"?!v.value.some(A=>{const b=A[`${r.value}Handle`];return A[r.value]!==f?!1:b?b===e.id:!0}):typeof e.connectable=="number"?v.value.filter(A=>{const b=A[`${r.value}Handle`];return A[r.value]!==f?!1:b?b===e.id:!0}).length<e.connectable:typeof e.connectable=="function"?e.connectable(h,v.value):xe(e.connectable)?e.connectable:c.value);ct(()=>{var $;var A;if(!h.dimensions.width||!h.dimensions.height)return;const b=(A=h.handleBounds[r.value])==null?void 0:A.find(L=>L.id===e.id);if(!u.value||b)return;const G=u.value.querySelector(".vue-flow__transformationpane");if(!g.value||!y.value||!G||!e.id)return;const W=g.value.getBoundingClientRect(),E=y.value.getBoundingClientRect(),T=window.getComputedStyle(G),{m22:N}=new window.DOMMatrixReadOnly(T.transform),k={id:e.id,position:e.position,x:(E.left-W.left)/N,y:(E.top-W.top)/N,...gr(y.value)};h.handleBounds[r.value]=[...($=h.handleBounds[r.value])!=null?$:[],k]}),Gp(()=>{const A=h.handleBounds[r.value];A&&(h.handleBounds[r.value]=A.filter(b=>b.id!==e.id))});function B(A){const b=Cl(A);R.value&&w.value&&(b&&A.button===0||!b)&&P(A)}function D(A){!f||!a.value&&!w.value||R.value&&M(A)}return t({handleClick:M,handlePointerDown:P,onClick:D,onPointerDown:B}),(A,b)=>(ce(),ye("div",{ref_key:"handle",ref:y,"data-id":`${Q(f)}-${e.id}-${r.value}`,"data-handleid":e.id,"data-nodeid":Q(f),"data-handlepos":A.position,class:Pt(["vue-flow__handle",[`vue-flow__handle-${A.position}`,`vue-flow__handle-${e.id}`,Q(l),Q(d),r.value,{connectable:R.value,connecting:S.value,connectablestart:w.value,connectableend:m.value,connectionindicator:R.value&&(w.value&&!C.value||m.value&&C.value)}]]),onMousedown:B,onTouchstartPassive:B,onClick:D},[Pe(A.$slots,"default",{id:A.id})],42,c1))}}),_r=function({sourcePosition:e=J.Bottom,targetPosition:t=J.Top,label:n,connectable:r=!0,isValidTargetPos:i,isValidSourcePos:o,data:a}){const s=a.label||n;return[ge(ar,{type:"target",position:t,connectable:r,isValidConnection:i}),typeof s!="string"&&s?ge(s):ge("div",{innerHTML:s}),ge(ar,{type:"source",position:e,connectable:r,isValidConnection:o})]};_r.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable","data"];_r.inheritAttrs=!1;_r.compatConfig={MODE:3};const f1=_r,br=function({targetPosition:e=J.Top,label:t,connectable:n=!0,isValidTargetPos:r,data:i}){const o=i.label||t;return[ge(ar,{type:"target",position:e,connectable:n,isValidConnection:r}),typeof o!="string"&&o?ge(o):ge("div",{innerHTML:o})]};br.props=["targetPosition","label","isValidTargetPos","connectable","data"];br.inheritAttrs=!1;br.compatConfig={MODE:3};const h1=br,wr=function({sourcePosition:e=J.Bottom,label:t,connectable:n=!0,isValidSourcePos:r,data:i}){const o=i.label||t;return[typeof o!="string"&&o?ge(o):ge("div",{innerHTML:o}),ge(ar,{type:"source",position:e,connectable:n,isValidConnection:r})]};wr.props=["sourcePosition","label","isValidSourcePos","connectable","data"];wr.inheritAttrs=!1;wr.compatConfig={MODE:3};const v1=wr,p1=["transform"],g1=["width","height","x","y","rx","ry"],y1=["y"],m1={name:"EdgeText",compatConfig:{MODE:3}},_1=we({...m1,props:{x:{},y:{},label:{},labelStyle:{default:()=>({})},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:()=>({})},labelBgPadding:{default:()=>[2,4]},labelBgBorderRadius:{default:2}},setup(e){const t=_e({x:0,y:0,width:0,height:0}),n=_e(null),r=se(()=>`translate(${e.x-t.value.width/2} ${e.y-t.value.height/2})`);ct(i),me([()=>e.x,()=>e.y,n,()=>e.label],i);function i(){if(!n.value)return;const o=n.value.getBBox();(o.width!==t.value.width||o.height!==t.value.height)&&(t.value=o)}return(o,a)=>(ce(),ye("g",{transform:r.value,class:"vue-flow__edge-textwrapper"},[o.labelShowBg?(ce(),ye("rect",{key:0,class:"vue-flow__edge-textbg",width:`${t.value.width+2*o.labelBgPadding[0]}px`,height:`${t.value.height+2*o.labelBgPadding[1]}px`,x:-o.labelBgPadding[0],y:-o.labelBgPadding[1],style:ze(o.labelBgStyle),rx:o.labelBgBorderRadius,ry:o.labelBgBorderRadius},null,12,g1)):Oe("",!0),Ke("text",Pm(o.$attrs,{ref_key:"el",ref:n,class:"vue-flow__edge-text",y:t.value.height/2,dy:"0.3em",style:o.labelStyle}),[Pe(o.$slots,"default",{},()=>[typeof o.label!="string"?(ce(),st(qm(o.label),{key:0})):(ce(),ye(Ot,{key:1},[Mm(Ku(o.label),1)],64))])],16,y1)],8,p1))}}),b1=["id","d","marker-end","marker-start"],w1=["d","stroke-width"],E1={name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3}},Er=we({...E1,props:{id:{},labelX:{},labelY:{},path:{},label:{},markerStart:{},markerEnd:{},interactionWidth:{default:20},style:{},labelStyle:{},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{}},setup(e,{expose:t}){const n=Hp(e,["interactionWidth","labelShowBg"]),r=_e(null),i=_e(null),o=_e(null),a=Cm();return t({pathEl:r,interactionEl:i,labelEl:o}),(s,u)=>(ce(),ye(Ot,null,[Ke("path",{id:s.id,ref_key:"pathEl",ref:r,d:s.path,style:ze(n.style),class:Pt(["vue-flow__edge-path",Q(a).class]),"marker-end":s.markerEnd,"marker-start":s.markerStart},null,14,b1),s.interactionWidth?(ce(),ye("path",{key:0,ref_key:"interactionEl",ref:i,fill:"none",d:s.path,"stroke-width":s.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,w1)):Oe("",!0),s.label&&s.labelX&&s.labelY?(ce(),st(_1,{key:1,ref_key:"labelEl",ref:o,x:s.labelX,y:s.labelY,label:s.label,"label-show-bg":s.labelShowBg,"label-bg-style":s.labelBgStyle,"label-bg-padding":s.labelBgPadding,"label-bg-border-radius":s.labelBgBorderRadius,"label-style":s.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):Oe("",!0)],64))}});function Kg({sourceX:e,sourceY:t,targetX:n,targetY:r}){const i=Math.abs(n-e)/2,o=n<e?n+i:n-i,a=Math.abs(r-t)/2,s=r<t?r+a:r-a;return[o,s,i,a]}function Xg({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:o,targetControlX:a,targetControlY:s}){const u=e*.125+i*.375+a*.375+n*.125,c=t*.125+o*.375+s*.375+r*.125,l=Math.abs(u-e),d=Math.abs(c-t);return[u,c,l,d]}function Ln(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Mc({pos:e,x1:t,y1:n,x2:r,y2:i,c:o}){let a,s;switch(e){case J.Left:a=t-Ln(t-r,o),s=n;break;case J.Right:a=t+Ln(r-t,o),s=n;break;case J.Top:a=t,s=n-Ln(n-i,o);break;case J.Bottom:a=t,s=n+Ln(i-n,o);break}return[a,s]}function Wg(e){const{sourceX:t,sourceY:n,sourcePosition:r=J.Bottom,targetX:i,targetY:o,targetPosition:a=J.Top,curvature:s=.25}=e,[u,c]=Mc({pos:r,x1:t,y1:n,x2:i,y2:o,c:s}),[l,d]=Mc({pos:a,x1:i,y1:o,x2:t,y2:n,c:s}),[f,h,g,v]=Xg({sourceX:t,sourceY:n,targetX:i,targetY:o,sourceControlX:u,sourceControlY:c,targetControlX:l,targetControlY:d});return[`M${t},${n} C${u},${c} ${l},${d} ${i},${o}`,f,h,g,v]}function Pc({pos:e,x1:t,y1:n,x2:r,y2:i}){let o,a;switch(e){case J.Left:case J.Right:o=.5*(t+r),a=n;break;case J.Top:case J.Bottom:o=t,a=.5*(n+i);break}return[o,a]}function Zg(e){const{sourceX:t,sourceY:n,sourcePosition:r=J.Bottom,targetX:i,targetY:o,targetPosition:a=J.Top}=e,[s,u]=Pc({pos:r,x1:t,y1:n,x2:i,y2:o}),[c,l]=Pc({pos:a,x1:i,y1:o,x2:t,y2:n}),[d,f,h,g]=Xg({sourceX:t,sourceY:n,targetX:i,targetY:o,sourceControlX:s,sourceControlY:u,targetControlX:c,targetControlY:l});return[`M${t},${n} C${s},${u} ${c},${l} ${i},${o}`,d,f,h,g]}const Oc={[J.Left]:{x:-1,y:0},[J.Right]:{x:1,y:0},[J.Top]:{x:0,y:-1},[J.Bottom]:{x:0,y:1}};function S1({source:e,sourcePosition:t=J.Bottom,target:n}){return t===J.Left||t===J.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1}}function kc(e,t){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function x1({source:e,sourcePosition:t=J.Bottom,target:n,targetPosition:r=J.Top,center:i,offset:o}){var R,B;const a=Oc[t],s=Oc[r],u={x:e.x+a.x*o,y:e.y+a.y*o},c={x:n.x+s.x*o,y:n.y+s.y*o},l=S1({source:u,sourcePosition:t,target:c}),d=l.x!==0?"x":"y",f=l[d];let h,g,v;const y={x:0,y:0},w={x:0,y:0},[m,C,S,P]=Kg({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[d]*s[d]===-1){g=(R=i.x)!=null?R:m,v=(B=i.y)!=null?B:C;const D=[{x:g,y:u.y},{x:g,y:c.y}],A=[{x:u.x,y:v},{x:c.x,y:v}];a[d]===f?h=d==="x"?D:A:h=d==="x"?A:D}else{const D=[{x:u.x,y:c.y}],A=[{x:c.x,y:u.y}];if(d==="x"?h=a.x===f?A:D:h=a.y===f?D:A,t===r){const T=Math.abs(e[d]-n[d]);if(T<=o){const N=Math.min(o-1,o-T);a[d]===f?y[d]=(u[d]>e[d]?-1:1)*N:w[d]=(c[d]>n[d]?-1:1)*N}}if(t!==r){const T=d==="x"?"y":"x",N=a[d]===s[T],k=u[T]>c[T],$=u[T]<c[T];(a[d]===1&&(!N&&k||N&&$)||a[d]!==1&&(!N&&$||N&&k))&&(h=d==="x"?D:A)}const b={x:u.x+y.x,y:u.y+y.y},G={x:c.x+w.x,y:c.y+w.y},W=Math.max(Math.abs(b.x-h[0].x),Math.abs(G.x-h[0].x)),E=Math.max(Math.abs(b.y-h[0].y),Math.abs(G.y-h[0].y));W>=E?(g=(b.x+G.x)/2,v=h[0].y):(g=h[0].x,v=(b.y+G.y)/2)}return[[e,{x:u.x+y.x,y:u.y+y.y},...h,{x:c.x+w.x,y:c.y+w.y},n],g,v,S,P]}function C1(e,t,n,r){const i=Math.min(kc(e,t)/2,kc(t,n)/2,r),{x:o,y:a}=t;if(e.x===o&&o===n.x||e.y===a&&a===n.y)return`L${o} ${a}`;if(e.y===a){const c=e.x<n.x?-1:1,l=e.y<n.y?1:-1;return`L ${o+i*c},${a}Q ${o},${a} ${o},${a+i*l}`}const s=e.x<n.x?1:-1,u=e.y<n.y?-1:1;return`L ${o},${a+i*u}Q ${o},${a} ${o+i*s},${a}`}function cl(e){const{sourceX:t,sourceY:n,sourcePosition:r=J.Bottom,targetX:i,targetY:o,targetPosition:a=J.Top,borderRadius:s=5,centerX:u,centerY:c,offset:l=20}=e,[d,f,h,g,v]=x1({source:{x:t,y:n},sourcePosition:r,target:{x:i,y:o},targetPosition:a,center:{x:u,y:c},offset:l});return[d.reduce((w,m,C)=>{let S;return C>0&&C<d.length-1?S=C1(d[C-1],m,d[C+1],s):S=`${C===0?"M":"L"}${m.x} ${m.y}`,w+=S,w},""),f,h,g,v]}function I1(e){const{sourceX:t,sourceY:n,targetX:r,targetY:i}=e,[o,a,s,u]=Kg({sourceX:t,sourceY:n,targetX:r,targetY:i});return[`M ${t},${n}L ${r},${i}`,o,a,s,u]}const N1=we({name:"StraightEdge",props:["label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,r,i]=I1(e);return ge(Er,{path:n,labelX:r,labelY:i,...t,...e})}}}),T1=N1,R1=we({name:"SmoothStepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","borderRadius","markerEnd","markerStart","interactionWidth","offset"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{var o,a;const[n,r,i]=cl({...e,sourcePosition:(o=e.sourcePosition)!=null?o:J.Bottom,targetPosition:(a=e.targetPosition)!=null?a:J.Top});return ge(Er,{path:n,labelX:r,labelY:i,...t,...e})}}}),Jg=R1,A1=we({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(e,{attrs:t}){return()=>ge(Jg,{...e,...t,borderRadius:0})}}),q1=A1,M1=we({name:"BezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","curvature","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{var o,a;const[n,r,i]=Wg({...e,sourcePosition:(o=e.sourcePosition)!=null?o:J.Bottom,targetPosition:(a=e.targetPosition)!=null?a:J.Top});return ge(Er,{path:n,labelX:r,labelY:i,...t,...e})}}}),P1=M1,O1=we({name:"SimpleBezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{var o,a;const[n,r,i]=Zg({...e,sourcePosition:(o=e.sourcePosition)!=null?o:J.Bottom,targetPosition:(a=e.targetPosition)!=null?a:J.Top});return ge(Er,{path:n,labelX:r,labelY:i,...t,...e})}}}),k1=O1,D1={input:v1,default:f1,output:h1},$1={default:P1,straight:T1,step:q1,smoothstep:Jg,simplebezier:k1};function B1(e,t,n){const r=se(()=>v=>t.value.get(v)),i=se(()=>v=>n.value.get(v)),o=se(()=>{const v={...$1,...e.edgeTypes},y=Object.keys(v);for(const w of e.edges)w.type&&!y.includes(w.type)&&(v[w.type]=w.type);return v}),a=se(()=>{const v={...D1,...e.nodeTypes},y=Object.keys(v);for(const w of e.nodes)w.type&&!y.includes(w.type)&&(v[w.type]=w.type);return v}),s=se(()=>e.onlyRenderVisibleElements?Og(e.nodes,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):e.nodes),u=se(()=>{if(e.onlyRenderVisibleElements){const v=[];for(const y of e.edges){const w=t.value.get(y.source),m=t.value.get(y.target);zw({sourcePos:w.computedPosition||{x:0,y:0},targetPos:m.computedPosition||{x:0,y:0},sourceWidth:w.dimensions.width,sourceHeight:w.dimensions.height,targetWidth:m.dimensions.width,targetHeight:m.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})&&v.push(y)}return v}return e.edges}),c=se(()=>[...s.value,...u.value]),l=se(()=>{const v=[];for(const y of e.nodes)y.selected&&v.push(y);return v}),d=se(()=>{const v=[];for(const y of e.edges)y.selected&&v.push(y);return v}),f=se(()=>[...l.value,...d.value]),h=se(()=>{const v=[];for(const y of e.nodes)!!y.dimensions.width&&!!y.dimensions.height&&y.handleBounds!==void 0&&v.push(y);return v}),g=se(()=>s.value.length>0&&h.value.length===s.value.length);return{getNode:r,getEdge:i,getElements:c,getEdgeTypes:o,getNodeTypes:a,getEdges:u,getNodes:s,getSelectedElements:f,getSelectedNodes:l,getSelectedEdges:d,getNodesInitialized:h,areNodesInitialized:g}}class Tt{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){var i;var t;const n=(t=wn())==null?void 0:t.appContext.app,r=(i=n==null?void 0:n.config.globalProperties.$vueFlowStorage)!=null?i:Tt.instance;return Tt.instance=r!=null?r:new Tt,n&&(n.config.globalProperties.$vueFlowStorage=Tt.instance),Tt.instance}set(t,n){return this.flows.set(t,n)}get(t){return this.flows.get(t)}remove(t){return this.flows.delete(t)}create(t,n){const r=Yg(),i=Im(r),o={};for(const[f,h]of Object.entries(i.hooks)){const g=`on${f.charAt(0).toUpperCase()+f.slice(1)}`;o[g]=h.on}const a={};for(const[f,h]of Object.entries(i.hooks))a[f]=h.trigger;const s=se(()=>{const f=new Map;for(const h of i.nodes)f.set(h.id,h);return f}),u=se(()=>{const f=new Map;for(const h of i.edges)f.set(h.id,h);return f}),c=B1(i,s,u),l=l1(i,s,u);l.setState({...i,...n});const d={...o,...c,...l,...Vm(i),nodeLookup:s,edgeLookup:u,emits:a,id:t,vueFlowVersion:"1.39.3",$destroy:()=>{this.remove(t)}};return this.set(t,d),d}getId(){return`vue-flow-${this.currentId++}`}}function Ee(e){const t=Tt.getInstance(),n=Vp(),r=typeof e=="object",i=r?e:{id:e},o=i.id,a=o!=null?o:n==null?void 0:n.vueFlowId;let s;if(n){const u=Jt(qc,null);typeof u<"u"&&u!==null&&(!a||u.id===a)&&(s=u)}if(s||a&&(s=t.get(a)),!s||a&&s.id!==a){const u=o!=null?o:t.getId(),c=t.create(u,i);s=c,(n!=null?n:Fp(!0)).run(()=>{me(c.applyDefault,(d,f,h)=>{const g=y=>{c.applyNodeChanges(y)},v=y=>{c.applyEdgeChanges(y)};d?(c.onNodesChange(g),c.onEdgesChange(v)):(c.hooks.value.nodesChange.off(g),c.hooks.value.edgesChange.off(v)),h(()=>{c.hooks.value.nodesChange.off(g),c.hooks.value.edgesChange.off(v)})},{immediate:!0}),dr(()=>{if(s){const d=t.get(s.id);d?d.$destroy():yr(`No store instance found for id ${s.id} in storage.`)}})})}else r&&s.setState(i);if(n&&(Kt(qc,s),n.vueFlowId=s.id),r){const u=wn();(u==null?void 0:u.type.name)!=="VueFlow"&&s.emits.error(new Ne(Ce.USEVUEFLOW_OPTIONS))}return s}function L1(e){const{emits:t,dimensions:n}=Ee();let r;ct(()=>{const i=e.value,o=()=>{if(!i)return;const a=gr(i);(a.width===0||a.height===0)&&t.error(new Ne(Ce.MISSING_VIEWPORT_DIMENSIONS)),n.value={width:a.width||500,height:a.height||500}};o(),window.addEventListener("resize",o),i&&(r=new ResizeObserver(()=>o()),r.observe(i)),jp(()=>{window.removeEventListener("resize",o),r&&i&&r.unobserve(i)})})}const z1={name:"UserSelection",compatConfig:{MODE:3}},F1=we({...z1,props:{userSelectionRect:{}},setup(e){return(t,n)=>(ce(),ye("div",{class:"vue-flow__selection vue-flow__container",style:ze({width:`${t.userSelectionRect.width}px`,height:`${t.userSelectionRect.height}px`,transform:`translate(${t.userSelectionRect.x}px, ${t.userSelectionRect.y}px)`})},null,4))}}),G1=["tabIndex"],V1={name:"NodesSelection",compatConfig:{MODE:3}},H1=we({...V1,setup(e){const{emits:t,viewport:n,getSelectedNodes:r,noPanClassName:i,disableKeyboardA11y:o,userSelectionActive:a}=Ee(),s=jg(),u=_e(null),c=Vg({el:u,onStart(g){t.selectionDragStart(g)},onDrag(g){t.selectionDrag(g)},onStop(g){t.selectionDragStop(g)}});ct(()=>{var g;o.value||(g=u.value)==null||g.focus({preventScroll:!0})});const l=se(()=>Pg(r.value)),d=se(()=>({width:`${l.value.width}px`,height:`${l.value.height}px`,top:`${l.value.y}px`,left:`${l.value.x}px`}));function f(g){t.selectionContextMenu({event:g,nodes:r.value})}function h(g){o||Yt[g.key]&&s({x:Yt[g.key].x,y:Yt[g.key].y},g.shiftKey)}return(g,v)=>!Q(a)&&l.value.width&&l.value.height?(ce(),ye("div",{key:0,class:Pt(["vue-flow__nodesselection vue-flow__container",Q(i)]),style:ze({transform:`translate(${Q(n).x}px,${Q(n).y}px) scale(${Q(n).zoom})`})},[Ke("div",{ref_key:"el",ref:u,class:Pt([{dragging:Q(c)},"vue-flow__nodesselection-rect"]),style:ze(d.value),tabIndex:Q(o)?void 0:-1,onContextmenu:f,onKeydown:h},null,46,G1)],6)):Oe("",!0)}});function U1(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}const j1={name:"Pane",compatConfig:{MODE:3}},Y1=we({...j1,props:{isSelecting:{type:Boolean},selectionKeyPressed:{type:Boolean}},setup(e){const{vueFlowRef:t,nodes:n,viewport:r,emits:i,userSelectionActive:o,removeSelectedElements:a,panOnDrag:s,userSelectionRect:u,elementsSelectable:c,nodesSelectionActive:l,getSelectedEdges:d,getSelectedNodes:f,removeNodes:h,removeEdges:g,selectionMode:v,deleteKeyCode:y,multiSelectionKeyCode:w,multiSelectionActive:m,edgeLookup:C,nodeLookup:S}=Ee(),P=_e(null),M=_e(0),R=_e(0),B=_e(),D=_e(new Map),A=be(()=>c.value&&(e.isSelecting||o.value));let b=!1,G=!1;const W=vn(y,{actInsideInputWithModifier:!1}),E=vn(w);me(W,U=>{!U||(h(f.value),g(d.value),l.value=!1)}),me(E,U=>{m.value=U});function T(U,z){return X=>{X.target===z&&(U==null||U(X))}}function N(){o.value=!1,u.value=null,M.value=0,R.value=0}function k(U){if(b){b=!1;return}i.paneClick(U),a(),l.value=!1}function $(U){var z;if(Array.isArray(s.value)&&((z=s.value)==null?void 0:z.includes(2))){U.preventDefault();return}i.paneContextMenu(U)}function L(U){i.paneScroll(U)}function V(U){var z,X,de,le,fe;if(B.value=(z=t.value)==null?void 0:z.getBoundingClientRect(),!c.value||!e.isSelecting||U.button!==0||U.target!==P.value||!B.value)return;(de=(X=U.target)==null?void 0:X.setPointerCapture)==null||de.call(X,U.pointerId);const{x:re,y:ae}=U1(U,B.value);G=!0,b=!1,D.value=new Map;for(const[K,Z]of C.value)D.value.set(Z.source,((le=D.value.get(Z.source))==null?void 0:le.add(K))||new Set([K])),D.value.set(Z.target,((fe=D.value.get(Z.target))==null?void 0:fe.add(K))||new Set([K]));a(),u.value={width:0,height:0,startX:re,startY:ae,x:re,y:ae},o.value=!0,l.value=!1,i.selectionStart(U)}function F(U){if(!B.value||!u.value)return;b=!0;const{x:z,y:X}=wt(U,B.value),{startX:de=0,startY:le=0}=u.value,fe={startX:de,startY:le,x:z<de?z:de,y:X<le?X:le,width:Math.abs(z-de),height:Math.abs(X-le)},re=Og(n.value,fe,r.value,v.value===Sl.Partial,!0),ae=new Set,K=new Set;for(const Z of re){K.add(Z.id);const _=D.value.get(Z.id);if(_)for(const p of _)ae.add(p)}if(M.value!==K.size){M.value=K.size;const Z=_t(S.value,K,!0);i.nodesChange(Z)}if(R.value!==ae.size){R.value=ae.size;const Z=_t(C.value,ae);i.edgesChange(Z)}u.value=fe,o.value=!0,l.value=!1}function te(U){var z;U.button!==0||!G||((z=U.target)==null||z.releasePointerCapture(U.pointerId),!o.value&&u.value&&U.target===P.value&&k(U),M.value>0&&(l.value=!0),N(),i.selectionEnd(U),e.selectionKeyPressed&&(b=!1),G=!1)}return(U,z)=>(ce(),ye("div",{ref_key:"container",ref:P,class:Pt(["vue-flow__pane vue-flow__container",{selection:U.isSelecting}]),onClick:z[0]||(z[0]=X=>A.value?void 0:T(k,P.value)(X)),onContextmenu:z[1]||(z[1]=X=>T($,P.value)(X)),onWheelPassive:z[2]||(z[2]=X=>T(L,P.value)(X)),onPointerenter:z[3]||(z[3]=X=>A.value?void 0:Q(i).paneMouseEnter(X)),onPointerdown:z[4]||(z[4]=X=>A.value?V(X):Q(i).paneMouseMove(X)),onPointermove:z[5]||(z[5]=X=>A.value?F(X):Q(i).paneMouseMove(X)),onPointerup:z[6]||(z[6]=X=>A.value?te(X):void 0),onPointerleave:z[7]||(z[7]=X=>Q(i).paneMouseLeave(X))},[Pe(U.$slots,"default"),Q(o)&&Q(u)?(ce(),st(F1,{key:0,"user-selection-rect":Q(u)},null,8,["user-selection-rect"])):Oe("",!0),Q(l)&&Q(f).length?(ce(),st(H1,{key:1})):Oe("",!0)],34))}}),K1={name:"Transform",compatConfig:{MODE:3}},X1=we({...K1,setup(e){const{viewport:t,fitViewOnInit:n,fitViewOnInitDone:r}=Ee(),i=se(()=>n.value?!r.value:!1),o=se(()=>`translate(${t.value.x}px,${t.value.y}px) scale(${t.value.zoom})`);return(a,s)=>(ce(),ye("div",{class:"vue-flow__transformationpane vue-flow__container",style:ze({transform:o.value,opacity:i.value?0:void 0})},[Pe(a.$slots,"default")],4))}}),W1={name:"Viewport",compatConfig:{MODE:3}},Z1=we({...W1,setup(e){const{minZoom:t,maxZoom:n,defaultViewport:r,translateExtent:i,zoomActivationKeyCode:o,selectionKeyCode:a,panActivationKeyCode:s,panOnScroll:u,panOnScrollMode:c,panOnScrollSpeed:l,panOnDrag:d,zoomOnDoubleClick:f,zoomOnPinch:h,zoomOnScroll:g,preventScrolling:v,noWheelClassName:y,noPanClassName:w,emits:m,connectionStartHandle:C,userSelectionActive:S,paneDragging:P,d3Zoom:M,d3Selection:R,d3ZoomHandler:B,viewport:D,viewportRef:A,paneClickDistance:b}=Ee();L1(A);const G=_e(!1),W=_e(!1);let E=null,T=!1,N=0,k={x:0,y:0,zoom:0};const $=vn(s),L=vn(a),V=vn(o),F=be(()=>$.value||d.value),te=be(()=>$.value||u.value),U=be(()=>L.value||a.value===!0&&F.value!==!0);ct(()=>{var q,j,Y;if(!A.value){yr("Viewport element is missing");return}const re=A.value,ae=re.getBoundingClientRect(),K=xw().clickDistance(b.value).scaleExtent([t.value,n.value]).translateExtent(i.value),Z=Be(re).call(K),_=Z.on("wheel.zoom"),p=Zt.translate((q=r.value.x)!=null?q:0,(j=r.value.y)!=null?j:0).scale($t((Y=r.value.zoom)!=null?Y:1,t.value,n.value)),x=[[0,0],[ae.width,ae.height]],I=K.constrain()(p,x,i.value);K.transform(Z,I),K.wheelDelta(X),M.value=K,R.value=Z,B.value=_,D.value={x:I.x,y:I.y,zoom:I.k},K.on("start",O=>{var ee;if(!O.sourceEvent)return null;N=O.sourceEvent.button,G.value=!0;const ie=le(O.transform);((ee=O.sourceEvent)==null?void 0:ee.type)==="mousedown"&&(P.value=!0),k=ie,m.viewportChangeStart(ie),m.moveStart({event:O,flowTransform:ie})}),K.on("end",O=>{if(!O.sourceEvent)return null;if(G.value=!1,P.value=!1,z(F.value,N!=null?N:0)&&!T&&m.paneContextMenu(O.sourceEvent),T=!1,de(k,O.transform)){const ee=le(O.transform);k=ee,m.viewportChangeEnd(ee),m.moveEnd({event:O,flowTransform:ee})}}),K.filter(O=>{var ee,ie,ne;const he=V.value||g.value,Te=h.value&&O.ctrlKey,He=O.button;if((F.value===!0||Array.isArray(F.value)&&F.value.includes(1))&&He===1&&O.type==="mousedown"&&(((ee=O.target)==null?void 0:ee.closest(".vue-flow__node"))||((ie=O.target)==null?void 0:ie.closest(".vue-flow__edge"))))return!0;if(!F.value&&!he&&!te.value&&!f.value&&!h.value||S.value||!f.value&&O.type==="dblclick"||fe(O,y.value)&&O.type==="wheel"||fe(O,w.value)&&(O.type!=="wheel"||te.value&&O.type==="wheel"&&!V.value)||!h.value&&O.ctrlKey&&O.type==="wheel"||!he&&!te.value&&!Te&&O.type==="wheel")return!1;if(!h&&O.type==="touchstart"&&((ne=O.touches)==null?void 0:ne.length)>1)return O.preventDefault(),!1;if(!F.value&&(O.type==="mousedown"||O.type==="touchstart")||Array.isArray(F.value)&&!F.value.includes(He)&&(O.type==="mousedown"||O.type==="touchstart"))return!1;const ht=Array.isArray(F.value)&&F.value.includes(He)||!He||He<=1;return(!O.ctrlKey||O.type==="wheel")&&ht}),me([S,F],()=>{S.value&&!G.value?K.on("zoom",null):S.value||K.on("zoom",O=>{D.value={x:O.transform.x,y:O.transform.y,zoom:O.transform.k};const ee=le(O.transform);T=z(F.value,N!=null?N:0),m.viewportChange(ee),m.move({event:O,flowTransform:ee})})},{immediate:!0}),me([S,te,c,V,h,v,y],()=>{te.value&&!V.value&&!S.value?Z.on("wheel.zoom",O=>{if(fe(O,y.value))return!1;const ee=V.value||g.value,ie=h.value&&O.ctrlKey;if(!(!v.value||te.value||ee||ie))return!1;O.preventDefault(),O.stopImmediatePropagation();const he=Z.property("__zoom").k||1,Te=or();if(O.ctrlKey&&h.value&&Te){const Rn=Ue(O),Gr=X(O),An=he*2**Gr;K.scaleTo(Z,An,Rn,O);return}const He=O.deltaMode===1?20:1;let ht=c.value===hn.Vertical?0:O.deltaX*He,$e=c.value===hn.Horizontal?0:O.deltaY*He;!Te&&O.shiftKey&&c.value!==hn.Vertical&&!ht&&$e&&(ht=$e,$e=0),K.translateBy(Z,-(ht/he)*l.value,-($e/he)*l.value);const Je=le(Z.property("__zoom"));E&&clearTimeout(E),W.value?(m.move({event:O,flowTransform:Je}),m.viewportChange(Je),E=setTimeout(()=>{m.moveEnd({event:O,flowTransform:Je}),m.viewportChangeEnd(Je),W.value=!1},150)):(W.value=!0,m.moveStart({event:O,flowTransform:Je}),m.viewportChangeStart(Je))},{passive:!1}):typeof _<"u"&&Z.on("wheel.zoom",function(O,ee){const ie=!v.value&&O.type==="wheel"&&!O.ctrlKey,ne=V.value||g.value,he=h.value&&O.ctrlKey;if(!ne&&!u.value&&!he&&O.type==="wheel"||ie||fe(O,y.value))return null;O.preventDefault(),_.call(this,O,ee)},{passive:!1})},{immediate:!0})});function z(re,ae){return ae===2&&Array.isArray(re)&&re.includes(2)}function X(re){const ae=re.ctrlKey&&or()?10:1;return-re.deltaY*(re.deltaMode===1?.05:re.deltaMode?1:.002)*ae}function de(re,ae){return re.x!==ae.x&&!Number.isNaN(ae.x)||re.y!==ae.y&&!Number.isNaN(ae.y)||re.zoom!==ae.k&&!Number.isNaN(ae.k)}function le(re){return{x:re.x,y:re.y,zoom:re.k}}function fe(re,ae){return re.target.closest(`.${ae}`)}return(re,ae)=>(ce(),ye("div",{ref_key:"viewportRef",ref:A,class:"vue-flow__viewport vue-flow__container"},[nt(Y1,{"is-selecting":U.value,"selection-key-pressed":Q(L),class:Pt({connecting:!!Q(C),dragging:Q(P),draggable:F.value})},{default:Yu(()=>[nt(X1,null,{default:Yu(()=>[Pe(re.$slots,"default")]),_:3})]),_:3},8,["is-selecting","selection-key-pressed","class"])],512))}}),J1=["id"],Q1=["id"],eE=["id"],tE={name:"A11yDescriptions",compatConfig:{MODE:3}},nE=we({...tE,setup(e){const{id:t,disableKeyboardA11y:n,ariaLiveMessage:r}=Ee();return(i,o)=>(ce(),ye(Ot,null,[Ke("div",{id:`${Q(Sg)}-${Q(t)}`,style:{display:"none"}}," Press enter or space to select a node. "+Ku(Q(n)?"":"You can then use the arrow keys to move the node around.")+" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ",9,J1),Ke("div",{id:`${Q(xg)}-${Q(t)}`,style:{display:"none"}}," Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ",8,Q1),Q(n)?Oe("",!0):(ce(),ye("div",{key:0,id:`${Q(Rw)}-${Q(t)}`,"aria-live":"assertive","aria-atomic":"true",style:{position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(100%)"}},Ku(Q(r)),9,eE))],64))}});function rE(){const e=Ee();me(()=>e.viewportHelper.value.viewportInitialized,t=>{t&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}function iE(e,t,n){return n===J.Left?e-t:n===J.Right?e+t:e}function oE(e,t,n){return n===J.Top?e-t:n===J.Bottom?e+t:e}const Nl=function({radius:e=10,centerX:t=0,centerY:n=0,position:r=J.Top,type:i}){return ge("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${i}`,cx:iE(t,e,r),cy:oE(n,e,r),r:e,stroke:"transparent",fill:"transparent"})};Nl.props=["radius","centerX","centerY","position","type"];Nl.compatConfig={MODE:3};const Dc=Nl,aE=we({name:"Edge",compatConfig:{MODE:3},props:["id"],setup(e){const{id:t,addSelectedEdges:n,connectionMode:r,edgeUpdaterRadius:i,emits:o,nodesSelectionActive:a,noPanClassName:s,getEdgeTypes:u,removeSelectedEdges:c,findEdge:l,findNode:d,isValidConnection:f,multiSelectionActive:h,disableKeyboardA11y:g,elementsSelectable:v,edgesUpdatable:y,edgesFocusable:w}=Ee(),m=se(()=>l(e.id)),C=Jw(m.value,o),S=Jt(mr),P=wn(),M=_e(!1),R=_e(!1),B=_e(""),D=_e(null),A=_e("source"),b=_e(null),G=be(()=>typeof m.value.selectable>"u"?v.value:m.value.selectable),W=be(()=>typeof m.value.updatable>"u"?y.value:m.value.updatable),E=be(()=>typeof m.value.focusable>"u"?w.value:m.value.focusable);Kt(Xw,e.id),Kt(Ww,b);const T=se(()=>m.value.class instanceof Function?m.value.class(m.value):m.value.class),N=se(()=>m.value.style instanceof Function?m.value.style(m.value):m.value.style),k=se(()=>{var I;const _=m.value.type||"default",p=S==null?void 0:S[`edge-${_}`];if(p)return p;let x=(I=m.value.template)!=null?I:u.value[_];if(typeof x=="string"&&P){const q=Object.keys(P.appContext.components);q&&q.includes(_)&&(x=Up(_,!1))}return x&&typeof x!="string"?x:(o.error(new Ne(Ce.EDGE_TYPE_MISSING,x)),!1)}),{handlePointerDown:$}=Hg({nodeId:B,handleId:D,type:A,isValidConnection:f,edgeUpdaterType:A,onEdgeUpdate:F,onEdgeUpdateEnd:te});return()=>{const _=d(m.value.source),p=d(m.value.target),x="pathOptions"in m.value?m.value.pathOptions:{};if(!_&&!p)return o.error(new Ne(Ce.EDGE_SOURCE_TARGET_MISSING,m.value.id,m.value.source,m.value.target)),null;if(!_)return o.error(new Ne(Ce.EDGE_SOURCE_MISSING,m.value.id,m.value.source)),null;if(!p)return o.error(new Ne(Ce.EDGE_TARGET_MISSING,m.value.id,m.value.target)),null;if(!m.value||m.value.hidden||_.hidden||p.hidden)return null;let I;r.value===Dt.Strict?I=_.handleBounds.source:I=[..._.handleBounds.source||[],..._.handleBounds.target||[]];const q=Sc(I,m.value.sourceHandle);let j;r.value===Dt.Strict?j=p.handleBounds.target:j=[...p.handleBounds.target||[],...p.handleBounds.source||[]];const Y=Sc(j,m.value.targetHandle),O=(q==null?void 0:q.position)||J.Bottom,ee=(Y==null?void 0:Y.position)||J.Top,{x:ie,y:ne}=ir(_,q,O),{x:he,y:Te}=ir(p,Y,ee);return m.value.sourceX=ie,m.value.sourceY=ne,m.value.targetX=he,m.value.targetY=Te,ge("g",{ref:b,key:e.id,"data-id":e.id,class:["vue-flow__edge",`vue-flow__edge-${k.value===!1?"default":m.value.type||"default"}`,s.value,T.value,{updating:M.value,selected:m.value.selected,animated:m.value.animated,inactive:!G.value}],onClick:z,onContextmenu:X,onDblclick:de,onMouseenter:le,onMousemove:fe,onMouseleave:re,onKeyDown:E.value?Z:void 0,tabIndex:E.value?0:void 0,"aria-label":m.value.ariaLabel===null?void 0:m.value.ariaLabel||`Edge from ${m.value.source} to ${m.value.target}`,"aria-describedby":E.value?`${xg}-${t}`:void 0,role:E.value?"button":"img"},[R.value?null:ge(k.value===!1?u.value.default:k.value,{id:e.id,sourceNode:_,targetNode:p,source:m.value.source,target:m.value.target,type:m.value.type,updatable:W.value,selected:m.value.selected,animated:m.value.animated,label:m.value.label,labelStyle:m.value.labelStyle,labelShowBg:m.value.labelShowBg,labelBgStyle:m.value.labelBgStyle,labelBgPadding:m.value.labelBgPadding,labelBgBorderRadius:m.value.labelBgBorderRadius,data:m.value.data,events:{...m.value.events,...C.on},style:N.value,markerStart:`url('#${bn(m.value.markerStart,t)}')`,markerEnd:`url('#${bn(m.value.markerEnd,t)}')`,sourcePosition:O,targetPosition:ee,sourceX:ie,sourceY:ne,targetX:he,targetY:Te,sourceHandleId:m.value.sourceHandle,targetHandleId:m.value.targetHandle,interactionWidth:m.value.interactionWidth,...x}),[W.value==="source"||W.value===!0?[ge("g",{onMousedown:ae,onMouseenter:L,onMouseout:V},ge(Dc,{position:O,centerX:ie,centerY:ne,radius:i.value,type:"source","data-type":"source"}))]:null,W.value==="target"||W.value===!0?[ge("g",{onMousedown:K,onMouseenter:L,onMouseout:V},ge(Dc,{position:ee,centerX:he,centerY:Te,radius:i.value,type:"target","data-type":"target"}))]:null]])};function L(){M.value=!0}function V(){M.value=!1}function F(_,p){C.emit.update({event:_,edge:m.value,connection:p})}function te(_){C.emit.updateEnd({event:_,edge:m.value}),R.value=!1}function U(_,p){var x;_.button===0&&(R.value=!0,B.value=p?m.value.target:m.value.source,D.value=(x=p?m.value.targetHandle:m.value.sourceHandle)!=null?x:"",A.value=p?"target":"source",C.emit.updateStart({event:_,edge:m.value}),$(_))}function z(_){var p;const x={event:_,edge:m.value};G.value&&(a.value=!1,m.value.selected&&h.value?(c([m.value]),(p=b.value)==null||p.blur()):n([m.value])),C.emit.click(x)}function X(_){C.emit.contextMenu({event:_,edge:m.value})}function de(_){C.emit.doubleClick({event:_,edge:m.value})}function le(_){C.emit.mouseEnter({event:_,edge:m.value})}function fe(_){C.emit.mouseMove({event:_,edge:m.value})}function re(_){C.emit.mouseLeave({event:_,edge:m.value})}function ae(_){U(_,!0)}function K(_){U(_,!1)}function Z(_){var p;!g.value&&Cg.includes(_.key)&&G.value&&(_.key==="Escape"?((p=b.value)==null||p.blur(),c([l(e.id)])):n([l(e.id)]))}}}),sE=aE,uE={[J.Left]:J.Right,[J.Right]:J.Left,[J.Top]:J.Bottom,[J.Bottom]:J.Top},lE=we({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var e;const{id:t,connectionMode:n,connectionStartHandle:r,connectionEndHandle:i,connectionPosition:o,connectionLineType:a,connectionLineStyle:s,connectionLineOptions:u,connectionStatus:c,viewport:l,findNode:d}=Ee(),f=(e=Jt(mr))==null?void 0:e["connection-line"],h=se(()=>{var m;return d((m=r.value)==null?void 0:m.nodeId)}),g=se(()=>{var C;var m;return(C=d((m=i.value)==null?void 0:m.nodeId))!=null?C:null}),v=se(()=>({x:(o.value.x-l.value.x)/l.value.zoom,y:(o.value.y-l.value.y)/l.value.zoom})),y=se(()=>u.value.markerStart?`url(#${bn(u.value.markerStart,t)})`:""),w=se(()=>u.value.markerEnd?`url(#${bn(u.value.markerEnd,t)})`:"");return()=>{var L,V,F,te;var m,C,S,P;if(!h.value||!r.value)return null;const M=r.value.handleId,R=r.value.type,B=h.value.handleBounds;let D=B==null?void 0:B[R];if(n.value===Dt.Loose&&(D=D||(B==null?void 0:B[R==="source"?"target":"source"])),!D)return null;const A=(L=M?D.find(U=>U.id===M):D[0])!=null?L:null,b=(A==null?void 0:A.position)||J.Top,{x:G,y:W}=ir(h.value,A,b);let E=null;g.value&&((m=i.value)==null?void 0:m.handleId)&&(n.value===Dt.Strict?E=((C=g.value.handleBounds[R==="source"?"target":"source"])==null?void 0:C.find(U=>{var z;return U.id===((z=i.value)==null?void 0:z.handleId)}))||null:E=((S=[...g.value.handleBounds.source||[],...g.value.handleBounds.target||[]])==null?void 0:S.find(U=>{var z;return U.id===((z=i.value)==null?void 0:z.handleId)}))||null);const T=(V=(P=i.value)==null?void 0:P.position)!=null?V:b?uE[b]:null;if(!b||!T)return null;const N=(te=(F=a.value)!=null?F:u.value.type)!=null?te:Nt.Bezier;let k="";const $={sourceX:G,sourceY:W,sourcePosition:b,targetX:v.value.x,targetY:v.value.y,targetPosition:T};return N===Nt.Bezier?[k]=Wg($):N===Nt.Step?[k]=cl({...$,borderRadius:0}):N===Nt.SmoothStep?[k]=cl($):N===Nt.SimpleBezier?[k]=Zg($):k=`M${G},${W} ${v.value.x},${v.value.y}`,ge("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},ge("g",{class:"vue-flow__connection"},f?ge(f,{sourceX:G,sourceY:W,sourcePosition:b,targetX:v.value.x,targetY:v.value.y,targetPosition:T,sourceNode:h.value,sourceHandle:A,targetNode:g.value,targetHandle:E,markerEnd:w.value,markerStart:y.value,connectionStatus:c.value}):ge("path",{d:k,class:[u.value.class,c,"vue-flow__connection-path"],style:{...s.value,...u.value.style},"marker-end":w.value,"marker-start":y.value})))}}}),cE=lE,dE=["id","markerWidth","markerHeight","markerUnits","orient"],fE={name:"MarkerType",compatConfig:{MODE:3}},hE=we({...fE,props:{id:{},type:{},color:{default:"none"},width:{default:12.5},height:{default:12.5},markerUnits:{default:"strokeWidth"},orient:{default:"auto-start-reverse"},strokeWidth:{default:1}},setup(e){return(t,n)=>(ce(),ye("marker",{id:t.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:`${t.width}`,markerHeight:`${t.height}`,markerUnits:t.markerUnits,orient:t.orient},[t.type===Q(ol).ArrowClosed?(ce(),ye("polyline",{key:0,style:ze({stroke:t.color,fill:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",points:"-5,-4 0,0 -5,4 -5,-4"},null,4)):Oe("",!0),t.type===Q(ol).Arrow?(ce(),ye("polyline",{key:1,style:ze({stroke:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):Oe("",!0)],8,dE))}}),vE={class:"vue-flow__marker vue-flow__container"},pE={name:"MarkerDefinitions",compatConfig:{MODE:3}},gE=we({...pE,setup(e){const{id:t,edges:n,connectionLineOptions:r,defaultMarkerColor:i}=Ee(),o=se(()=>{const a=new Set,s=[],u=c=>{if(c){const l=bn(c,t);a.has(l)||(typeof c=="object"?s.push({...c,id:l,color:c.color||i.value}):s.push({id:l,color:i.value,type:c}),a.add(l))}};for(const c of[r.value.markerEnd,r.value.markerStart])u(c);for(const c of n.value)for(const l of[c.markerStart,c.markerEnd])u(l);return s.sort((c,l)=>c.id.localeCompare(l.id))});return(a,s)=>(ce(),ye("svg",vE,[Ke("defs",null,[(ce(!0),ye(Ot,null,vl(o.value,u=>(ce(),st(hE,{id:u.id,key:u.id,type:u.type,color:u.color,width:u.width,height:u.height,markerUnits:u.markerUnits,"stroke-width":u.strokeWidth,orient:u.orient},null,8,["id","type","color","width","height","markerUnits","stroke-width","orient"]))),128))])]))}}),yE={name:"Edges",compatConfig:{MODE:3}},mE=we({...yE,setup(e){const{findNode:t,getEdges:n,elevateEdgesOnSelect:r}=Ee();return(i,o)=>(ce(),ye(Ot,null,[nt(gE),(ce(!0),ye(Ot,null,vl(Q(n),a=>(ce(),ye("svg",{key:a.id,class:"vue-flow__edges vue-flow__container",style:ze({zIndex:Q(Fw)(a,Q(t),Q(r))})},[nt(Q(sE),{id:a.id},null,8,["id"])],4))),128)),nt(Q(cE))],64))}}),_E=we({name:"Node",compatConfig:{MODE:3},props:["id","resizeObserver"],setup(e){const{id:t,noPanClassName:n,selectNodesOnDrag:r,nodesSelectionActive:i,multiSelectionActive:o,emits:a,removeSelectedNodes:s,addSelectedNodes:u,updateNodeDimensions:c,onUpdateNodeInternals:l,getNodeTypes:d,nodeExtent:f,elevateNodesOnSelect:h,disableKeyboardA11y:g,ariaLiveMessage:v,snapToGrid:y,snapGrid:w,nodeDragThreshold:m,nodesDraggable:C,elementsSelectable:S,nodesConnectable:P,nodesFocusable:M}=Ee(),R=_e(null);Kt(Gg,R),Kt(Fg,e.id);const B=Jt(mr),D=wn(),A=jg(),{node:b,parentNode:G}=Ug(e.id),W=be(()=>typeof b.draggable>"u"?C.value:b.draggable),E=be(()=>typeof b.selectable>"u"?S.value:b.selectable),T=be(()=>typeof b.connectable>"u"?P.value:b.connectable),N=be(()=>typeof b.focusable>"u"?M.value:b.focusable),k=be(()=>!!b.dimensions.width&&!!b.dimensions.height),$=se(()=>{const p=b.type||"default",x=B==null?void 0:B[`node-${p}`];if(x)return x;let I=b.template||d.value[p];if(typeof I=="string"&&D){const q=Object.keys(D.appContext.components);q&&q.includes(p)&&(I=Up(p,!1))}return I&&typeof I!="string"?I:(a.error(new Ne(Ce.NODE_TYPE_MISSING,I)),!1)}),{emit:L,on:V}=n1(b,a),F=Vg({id:e.id,el:R,disabled:()=>!W.value,selectable:E,dragHandle:()=>b.dragHandle,onStart(p){L.dragStart(p)},onDrag(p){L.drag(p)},onStop(p){L.dragStop(p)},onClick(p){Z(p)}}),te=se(()=>b.class instanceof Function?b.class(b):b.class),U=se(()=>{const p=(b.style instanceof Function?b.style(b):b.style)||{},x=b.width instanceof Function?b.width(b):b.width,I=b.height instanceof Function?b.height(b):b.height;return x&&(p.width=typeof x=="string"?x:`${x}px`),I&&(p.height=typeof I=="string"?I:`${I}px`),p}),z=be(()=>{var p,x;return Number((x=(p=b.zIndex)!=null?p:U.value.zIndex)!=null?x:0)});return l(p=>{(p.includes(e.id)||!p.length)&&de()}),ct(()=>{me(()=>b.hidden,(p=!1,x,I)=>{!p&&R.value&&(e.resizeObserver.observe(R.value),I(()=>{R.value&&e.resizeObserver.unobserve(R.value)}))},{immediate:!0,flush:"post"})}),me([()=>b.type,()=>b.sourcePosition,()=>b.targetPosition],()=>{at(()=>{c([{id:e.id,nodeElement:R.value,forceUpdate:!0}])})}),me([()=>b.position.x,()=>b.position.y,()=>{var p;return(p=G.value)==null?void 0:p.computedPosition.x},()=>{var p;return(p=G.value)==null?void 0:p.computedPosition.y},()=>{var p;return(p=G.value)==null?void 0:p.computedPosition.z},z,()=>b.selected,()=>b.dimensions.height,()=>b.dimensions.width,()=>{var p;return(p=G.value)==null?void 0:p.dimensions.height},()=>{var p;return(p=G.value)==null?void 0:p.dimensions.width}],([p,x,I,q,j,Y])=>{const O={x:p,y:x,z:Y+(h.value&&b.selected?1e3:0)};typeof I<"u"&&typeof q<"u"?b.computedPosition=kw({x:I,y:q,z:j},O):b.computedPosition=O},{flush:"post",immediate:!0}),me([()=>b.extent,f],([p,x],[I,q])=>{(p!==I||x!==q)&&X()}),b.extent==="parent"||typeof b.extent=="object"&&"range"in b.extent&&b.extent.range==="parent"?Wu(()=>k).toBe(!0).then(X):X(),()=>{var p,x;return b.hidden?null:ge("div",{ref:R,"data-id":b.id,class:["vue-flow__node",`vue-flow__node-${$.value===!1?"default":b.type||"default"}`,{[n.value]:W.value,dragging:F==null?void 0:F.value,draggable:W.value,selected:b.selected,selectable:E.value,parent:b.isParent},te.value],style:{visibility:k.value?"visible":"hidden",zIndex:(p=b.computedPosition.z)!=null?p:z.value,transform:`translate(${b.computedPosition.x}px,${b.computedPosition.y}px)`,pointerEvents:E.value||W.value?"all":"none",...U.value},tabIndex:N.value?0:void 0,role:N.value?"button":void 0,"aria-describedby":g.value?void 0:`${Sg}-${t}`,"aria-label":b.ariaLabel,onMouseenter:le,onMousemove:fe,onMouseleave:re,onContextmenu:ae,onClick:Z,onDblclick:K,onKeydown:_},[ge($.value===!1?d.value.default:$.value,{id:b.id,type:b.type,data:b.data,events:{...b.events,...V},selected:b.selected,resizing:b.resizing,dragging:F.value,connectable:T.value,position:b.computedPosition,dimensions:b.dimensions,isValidTargetPos:b.isValidTargetPos,isValidSourcePos:b.isValidSourcePos,parent:b.parentNode,parentNodeId:b.parentNode,zIndex:(x=b.computedPosition.z)!=null?x:z.value,targetPosition:b.targetPosition,sourcePosition:b.sourcePosition,label:b.label,dragHandle:b.dragHandle,onUpdateNodeInternals:de})])};function X(){const p=b.computedPosition;y.value&&(p.x=w.value[0]*Math.round(p.x/w.value[0]),p.y=w.value[1]*Math.round(p.y/w.value[1]));const{computedPosition:x,position:I}=xl(b,p,a.error,f.value,G.value);(b.computedPosition.x!==x.x||b.computedPosition.y!==x.y)&&(b.computedPosition={...b.computedPosition,...x}),(b.position.x!==I.x||b.position.y!==I.y)&&(b.position=I)}function de(){R.value&&c([{id:e.id,nodeElement:R.value,forceUpdate:!0}])}function le(p){F!=null&&F.value||L.mouseEnter({event:p,node:b})}function fe(p){F!=null&&F.value||L.mouseMove({event:p,node:b})}function re(p){F!=null&&F.value||L.mouseLeave({event:p,node:b})}function ae(p){return L.contextMenu({event:p,node:b})}function K(p){return L.doubleClick({event:p,node:b})}function Z(p){E.value&&(!r.value||!W.value||m.value>0)&&ll(b,o.value,u,s,i,!1,R.value),L.click({event:p,node:b})}function _(p){if(!(al(p)||g.value))if(Cg.includes(p.key)&&E.value){const x=p.key==="Escape";ll(b,o.value,u,s,i,x,R.value)}else W.value&&b.selected&&Yt[p.key]&&(v.value=`Moved selected node ${p.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~b.position.x}, y: ${~~b.position.y}`,A({x:Yt[p.key].x,y:Yt[p.key].y},p.shiftKey))}}}),bE=_E,wE={height:"0",width:"0"},EE={name:"EdgeLabelRenderer",compatConfig:{MODE:3}},IT=we({...EE,setup(e){const{viewportRef:t}=Ee(),n=be(()=>{var r;return(r=t.value)==null?void 0:r.getElementsByClassName("vue-flow__edge-labels")[0]});return(r,i)=>(ce(),ye("svg",null,[(ce(),ye("foreignObject",wE,[(ce(),st(Nm,{to:n.value,disabled:!n.value},[Pe(r.$slots,"default")],8,["to","disabled"]))]))]))}});function SE(e={includeHiddenNodes:!1}){const{nodes:t}=Ee();return se(()=>{if(t.value.length===0)return!1;for(const n of t.value)if((e.includeHiddenNodes||!n.hidden)&&((n==null?void 0:n.handleBounds)===void 0||n.dimensions.width===0||n.dimensions.height===0))return!1;return!0})}const xE={class:"vue-flow__nodes vue-flow__container"},CE={name:"Nodes",compatConfig:{MODE:3}},IE=we({...CE,setup(e){const{getNodes:t,updateNodeDimensions:n,emits:r}=Ee(),i=SE(),o=_e();return me(i,a=>{a&&at(()=>{r.nodesInitialized(t.value)})},{immediate:!0}),ct(()=>{o.value=new ResizeObserver(a=>{const s=a.map(u=>({id:u.target.getAttribute("data-id"),nodeElement:u.target,forceUpdate:!0}));at(()=>n(s))})}),jp(()=>{var a;return(a=o.value)==null?void 0:a.disconnect()}),(a,s)=>(ce(),ye("div",xE,[o.value?(ce(!0),ye(Ot,{key:0},vl(Q(t),(u,c,l,d)=>{const f=[u.id];if(d&&d.key===u.id&&Tm(d,f))return d;const h=(ce(),st(Q(bE),{id:u.id,key:u.id,"resize-observer":o.value},null,8,["id","resize-observer"]));return h.memo=f,h},s,0),128)):Oe("",!0)]))}});function NE(){const{emits:e}=Ee();ct(()=>{if(zg()){const t=document.querySelector(".vue-flow__pane");t&&window.getComputedStyle(t).zIndex!=="1"&&e.error(new Ne(Ce.MISSING_STYLES))}})}const TE=Ke("div",{class:"vue-flow__edge-labels"},null,-1),RE={name:"VueFlow",compatConfig:{MODE:3}},NT=we({...RE,props:{id:{},modelValue:{},nodes:{},edges:{},edgeTypes:{},nodeTypes:{},connectionMode:{},connectionLineType:{},connectionLineStyle:{default:void 0},connectionLineOptions:{default:void 0},connectionRadius:{},isValidConnection:{type:[Function,null],default:void 0},deleteKeyCode:{default:void 0},selectionKeyCode:{default:void 0},multiSelectionKeyCode:{default:void 0},zoomActivationKeyCode:{default:void 0},panActivationKeyCode:{default:void 0},snapToGrid:{type:Boolean,default:void 0},snapGrid:{},onlyRenderVisibleElements:{type:Boolean,default:void 0},edgesUpdatable:{type:[Boolean,String],default:void 0},nodesDraggable:{type:Boolean,default:void 0},nodesConnectable:{type:Boolean,default:void 0},nodeDragThreshold:{},elementsSelectable:{type:Boolean,default:void 0},selectNodesOnDrag:{type:Boolean,default:void 0},panOnDrag:{type:[Boolean,Array],default:void 0},minZoom:{},maxZoom:{},defaultViewport:{},translateExtent:{},nodeExtent:{},defaultMarkerColor:{},zoomOnScroll:{type:Boolean,default:void 0},zoomOnPinch:{type:Boolean,default:void 0},panOnScroll:{type:Boolean,default:void 0},panOnScrollSpeed:{},panOnScrollMode:{},paneClickDistance:{},zoomOnDoubleClick:{type:Boolean,default:void 0},preventScrolling:{type:Boolean,default:void 0},selectionMode:{},edgeUpdaterRadius:{},fitViewOnInit:{type:Boolean,default:void 0},connectOnClick:{type:Boolean,default:void 0},applyDefault:{type:Boolean,default:void 0},autoConnect:{type:[Boolean,Function],default:void 0},noDragClassName:{},noWheelClassName:{},noPanClassName:{},defaultEdgeOptions:{},elevateEdgesOnSelect:{type:Boolean,default:void 0},elevateNodesOnSelect:{type:Boolean,default:void 0},disableKeyboardA11y:{type:Boolean,default:void 0},edgesFocusable:{type:Boolean,default:void 0},nodesFocusable:{type:Boolean,default:void 0},autoPanOnConnect:{type:Boolean,default:void 0},autoPanOnNodeDrag:{type:Boolean,default:void 0},autoPanSpeed:{}},emits:["nodesChange","edgesChange","nodesInitialized","miniMapNodeClick","miniMapNodeDoubleClick","miniMapNodeMouseEnter","miniMapNodeMouseMove","miniMapNodeMouseLeave","connect","connectStart","connectEnd","clickConnectStart","clickConnectEnd","moveStart","move","moveEnd","selectionDragStart","selectionDrag","selectionDragStop","selectionContextMenu","selectionStart","selectionEnd","viewportChangeStart","viewportChange","viewportChangeEnd","paneReady","init","paneScroll","paneClick","paneContextMenu","paneMouseEnter","paneMouseMove","paneMouseLeave","updateNodeInternals","error","edgeContextMenu","edgeMouseEnter","edgeMouseMove","edgeMouseLeave","edgeDoubleClick","edgeClick","edgeUpdateStart","edgeUpdate","edgeUpdateEnd","nodeDoubleClick","nodeClick","nodeMouseEnter","nodeMouseMove","nodeMouseLeave","nodeContextMenu","nodeDragStart","nodeDrag","nodeDragStop","update:modelValue","update:nodes","update:edges"],setup(e,{expose:t,emit:n}){const r=e,i=Sm(),o=Vr(r,"modelValue",n),a=Vr(r,"nodes",n),s=Vr(r,"edges",n),u=Ee(r),c=o1({modelValue:o,nodes:a,edges:s},r,u);return s1(n,u.hooks),rE(),NE(),Kt(mr,i),Gp(()=>{c()}),t(u),(l,d)=>(ce(),ye("div",{ref:Q(u).vueFlowRef,class:"vue-flow"},[nt(Z1,null,{default:Yu(()=>[nt(mE),TE,nt(IE),Pe(l.$slots,"zoom-pane")]),_:3}),Pe(l.$slots,"default"),nt(nE)],512))}}),AE={name:"Panel",compatConfig:{MODE:3}},TT=we({...AE,props:{position:{}},setup(e){const t=e,{userSelectionActive:n}=Ee(),r=se(()=>`${t.position}`.split("-"));return(i,o)=>(ce(),ye("div",{class:Pt(["vue-flow__panel",r.value]),style:ze({pointerEvents:Q(n)?"none":"all"})},[Pe(i.$slots,"default")],6))}});var Qr,$c;function qE(){if($c)return Qr;$c=1;function e(){this.__data__=[],this.size=0}return Qr=e,Qr}var ei,Bc;function Qt(){if(Bc)return ei;Bc=1;function e(t,n){return t===n||t!==t&&n!==n}return ei=e,ei}var ti,Lc;function Sr(){if(Lc)return ti;Lc=1;var e=Qt();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return ti=t,ti}var ni,zc;function ME(){if(zc)return ni;zc=1;var e=Sr(),t=Array.prototype,n=t.splice;function r(i){var o=this.__data__,a=e(o,i);if(a<0)return!1;var s=o.length-1;return a==s?o.pop():n.call(o,a,1),--this.size,!0}return ni=r,ni}var ri,Fc;function PE(){if(Fc)return ri;Fc=1;var e=Sr();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return ri=t,ri}var ii,Gc;function OE(){if(Gc)return ii;Gc=1;var e=Sr();function t(n){return e(this.__data__,n)>-1}return ii=t,ii}var oi,Vc;function kE(){if(Vc)return oi;Vc=1;var e=Sr();function t(n,r){var i=this.__data__,o=e(i,n);return o<0?(++this.size,i.push([n,r])):i[o][1]=r,this}return oi=t,oi}var ai,Hc;function xr(){if(Hc)return ai;Hc=1;var e=qE(),t=ME(),n=PE(),r=OE(),i=kE();function o(a){var s=-1,u=a==null?0:a.length;for(this.clear();++s<u;){var c=a[s];this.set(c[0],c[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,ai=o,ai}var si,Uc;function DE(){if(Uc)return si;Uc=1;var e=xr();function t(){this.__data__=new e,this.size=0}return si=t,si}var ui,jc;function $E(){if(jc)return ui;jc=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return ui=e,ui}var li,Yc;function BE(){if(Yc)return li;Yc=1;function e(t){return this.__data__.get(t)}return li=e,li}var ci,Kc;function LE(){if(Kc)return ci;Kc=1;function e(t){return this.__data__.has(t)}return ci=e,ci}var di,Xc;function Qg(){if(Xc)return di;Xc=1;var e=typeof qn=="object"&&qn&&qn.Object===Object&&qn;return di=e,di}var fi,Wc;function Ge(){if(Wc)return fi;Wc=1;var e=Qg(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return fi=n,fi}var hi,Zc;function en(){if(Zc)return hi;Zc=1;var e=Ge(),t=e.Symbol;return hi=t,hi}var vi,Jc;function zE(){if(Jc)return vi;Jc=1;var e=en(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function o(a){var s=n.call(a,i),u=a[i];try{a[i]=void 0;var c=!0}catch{}var l=r.call(a);return c&&(s?a[i]=u:delete a[i]),l}return vi=o,vi}var pi,Qc;function FE(){if(Qc)return pi;Qc=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return pi=n,pi}var gi,ed;function Bt(){if(ed)return gi;ed=1;var e=en(),t=zE(),n=FE(),r="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function a(s){return s==null?s===void 0?i:r:o&&o in Object(s)?t(s):n(s)}return gi=a,gi}var yi,td;function ke(){if(td)return yi;td=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return yi=e,yi}var mi,nd;function xn(){if(nd)return mi;nd=1;var e=Bt(),t=ke(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function a(s){if(!t(s))return!1;var u=e(s);return u==r||u==i||u==n||u==o}return mi=a,mi}var _i,rd;function GE(){if(rd)return _i;rd=1;var e=Ge(),t=e["__core-js_shared__"];return _i=t,_i}var bi,id;function VE(){if(id)return bi;id=1;var e=GE(),t=function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function n(r){return!!t&&t in r}return bi=n,bi}var wi,od;function ey(){if(od)return wi;od=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return wi=n,wi}var Ei,ad;function HE(){if(ad)return Ei;ad=1;var e=xn(),t=VE(),n=ke(),r=ey(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=Function.prototype,s=Object.prototype,u=a.toString,c=s.hasOwnProperty,l=RegExp("^"+u.call(c).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(f){if(!n(f)||t(f))return!1;var h=e(f)?l:o;return h.test(r(f))}return Ei=d,Ei}var Si,sd;function UE(){if(sd)return Si;sd=1;function e(t,n){return t==null?void 0:t[n]}return Si=e,Si}var xi,ud;function Lt(){if(ud)return xi;ud=1;var e=HE(),t=UE();function n(r,i){var o=t(r,i);return e(o)?o:void 0}return xi=n,xi}var Ci,ld;function Tl(){if(ld)return Ci;ld=1;var e=Lt(),t=Ge(),n=e(t,"Map");return Ci=n,Ci}var Ii,cd;function Cr(){if(cd)return Ii;cd=1;var e=Lt(),t=e(Object,"create");return Ii=t,Ii}var Ni,dd;function jE(){if(dd)return Ni;dd=1;var e=Cr();function t(){this.__data__=e?e(null):{},this.size=0}return Ni=t,Ni}var Ti,fd;function YE(){if(fd)return Ti;fd=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Ti=e,Ti}var Ri,hd;function KE(){if(hd)return Ri;hd=1;var e=Cr(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(o){var a=this.__data__;if(e){var s=a[o];return s===t?void 0:s}return r.call(a,o)?a[o]:void 0}return Ri=i,Ri}var Ai,vd;function XE(){if(vd)return Ai;vd=1;var e=Cr(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var o=this.__data__;return e?o[i]!==void 0:n.call(o,i)}return Ai=r,Ai}var qi,pd;function WE(){if(pd)return qi;pd=1;var e=Cr(),t="__lodash_hash_undefined__";function n(r,i){var o=this.__data__;return this.size+=this.has(r)?0:1,o[r]=e&&i===void 0?t:i,this}return qi=n,qi}var Mi,gd;function ZE(){if(gd)return Mi;gd=1;var e=jE(),t=YE(),n=KE(),r=XE(),i=WE();function o(a){var s=-1,u=a==null?0:a.length;for(this.clear();++s<u;){var c=a[s];this.set(c[0],c[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,Mi=o,Mi}var Pi,yd;function JE(){if(yd)return Pi;yd=1;var e=ZE(),t=xr(),n=Tl();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Pi=r,Pi}var Oi,md;function QE(){if(md)return Oi;md=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Oi=e,Oi}var ki,_d;function Ir(){if(_d)return ki;_d=1;var e=QE();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return ki=t,ki}var Di,bd;function eS(){if(bd)return Di;bd=1;var e=Ir();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return Di=t,Di}var $i,wd;function tS(){if(wd)return $i;wd=1;var e=Ir();function t(n){return e(this,n).get(n)}return $i=t,$i}var Bi,Ed;function nS(){if(Ed)return Bi;Ed=1;var e=Ir();function t(n){return e(this,n).has(n)}return Bi=t,Bi}var Li,Sd;function rS(){if(Sd)return Li;Sd=1;var e=Ir();function t(n,r){var i=e(this,n),o=i.size;return i.set(n,r),this.size+=i.size==o?0:1,this}return Li=t,Li}var zi,xd;function Rl(){if(xd)return zi;xd=1;var e=JE(),t=eS(),n=tS(),r=nS(),i=rS();function o(a){var s=-1,u=a==null?0:a.length;for(this.clear();++s<u;){var c=a[s];this.set(c[0],c[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,zi=o,zi}var Fi,Cd;function iS(){if(Cd)return Fi;Cd=1;var e=xr(),t=Tl(),n=Rl(),r=200;function i(o,a){var s=this.__data__;if(s instanceof e){var u=s.__data__;if(!t||u.length<r-1)return u.push([o,a]),this.size=++s.size,this;s=this.__data__=new n(u)}return s.set(o,a),this.size=s.size,this}return Fi=i,Fi}var Gi,Id;function Nr(){if(Id)return Gi;Id=1;var e=xr(),t=DE(),n=$E(),r=BE(),i=LE(),o=iS();function a(s){var u=this.__data__=new e(s);this.size=u.size}return a.prototype.clear=t,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=i,a.prototype.set=o,Gi=a,Gi}var Vi,Nd;function Al(){if(Nd)return Vi;Nd=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i&&n(t[r],r,t)!==!1;);return t}return Vi=e,Vi}var Hi,Td;function ty(){if(Td)return Hi;Td=1;var e=Lt(),t=function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}}();return Hi=t,Hi}var Ui,Rd;function Tr(){if(Rd)return Ui;Rd=1;var e=ty();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return Ui=t,Ui}var ji,Ad;function Rr(){if(Ad)return ji;Ad=1;var e=Tr(),t=Qt(),n=Object.prototype,r=n.hasOwnProperty;function i(o,a,s){var u=o[a];(!(r.call(o,a)&&t(u,s))||s===void 0&&!(a in o))&&e(o,a,s)}return ji=i,ji}var Yi,qd;function Cn(){if(qd)return Yi;qd=1;var e=Rr(),t=Tr();function n(r,i,o,a){var s=!o;o||(o={});for(var u=-1,c=i.length;++u<c;){var l=i[u],d=a?a(o[l],r[l],l,o,r):void 0;d===void 0&&(d=r[l]),s?t(o,l,d):e(o,l,d)}return o}return Yi=n,Yi}var Ki,Md;function oS(){if(Md)return Ki;Md=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return Ki=e,Ki}var Xi,Pd;function Ze(){if(Pd)return Xi;Pd=1;function e(t){return t!=null&&typeof t=="object"}return Xi=e,Xi}var Wi,Od;function aS(){if(Od)return Wi;Od=1;var e=Bt(),t=Ze(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return Wi=r,Wi}var Zi,kd;function In(){if(kd)return Zi;kd=1;var e=aS(),t=Ze(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,o=e(function(){return arguments}())?e:function(a){return t(a)&&r.call(a,"callee")&&!i.call(a,"callee")};return Zi=o,Zi}var Ji,Dd;function Ie(){if(Dd)return Ji;Dd=1;var e=Array.isArray;return Ji=e,Ji}var zn={exports:{}},Qi,$d;function sS(){if($d)return Qi;$d=1;function e(){return!1}return Qi=e,Qi}var Bd;function tn(){return Bd||(Bd=1,function(e,t){var n=Ge(),r=sS(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===i,s=a?n.Buffer:void 0,u=s?s.isBuffer:void 0,c=u||r;e.exports=c}(zn,zn.exports)),zn.exports}var eo,Ld;function Ar(){if(Ld)return eo;Ld=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var o=typeof r;return i=i==null?e:i,!!i&&(o=="number"||o!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return eo=n,eo}var to,zd;function ql(){if(zd)return to;zd=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return to=t,to}var no,Fd;function uS(){if(Fd)return no;Fd=1;var e=Bt(),t=ql(),n=Ze(),r="[object Arguments]",i="[object Array]",o="[object Boolean]",a="[object Date]",s="[object Error]",u="[object Function]",c="[object Map]",l="[object Number]",d="[object Object]",f="[object RegExp]",h="[object Set]",g="[object String]",v="[object WeakMap]",y="[object ArrayBuffer]",w="[object DataView]",m="[object Float32Array]",C="[object Float64Array]",S="[object Int8Array]",P="[object Int16Array]",M="[object Int32Array]",R="[object Uint8Array]",B="[object Uint8ClampedArray]",D="[object Uint16Array]",A="[object Uint32Array]",b={};b[m]=b[C]=b[S]=b[P]=b[M]=b[R]=b[B]=b[D]=b[A]=!0,b[r]=b[i]=b[y]=b[o]=b[w]=b[a]=b[s]=b[u]=b[c]=b[l]=b[d]=b[f]=b[h]=b[g]=b[v]=!1;function G(W){return n(W)&&t(W.length)&&!!b[e(W)]}return no=G,no}var ro,Gd;function qr(){if(Gd)return ro;Gd=1;function e(t){return function(n){return t(n)}}return ro=e,ro}var Fn={exports:{}},Vd;function Ml(){return Vd||(Vd=1,function(e,t){var n=Qg(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s}(Fn,Fn.exports)),Fn.exports}var io,Hd;function Nn(){if(Hd)return io;Hd=1;var e=uS(),t=qr(),n=Ml(),r=n&&n.isTypedArray,i=r?t(r):e;return io=i,io}var oo,Ud;function ny(){if(Ud)return oo;Ud=1;var e=oS(),t=In(),n=Ie(),r=tn(),i=Ar(),o=Nn(),a=Object.prototype,s=a.hasOwnProperty;function u(c,l){var d=n(c),f=!d&&t(c),h=!d&&!f&&r(c),g=!d&&!f&&!h&&o(c),v=d||f||h||g,y=v?e(c.length,String):[],w=y.length;for(var m in c)(l||s.call(c,m))&&!(v&&(m=="length"||h&&(m=="offset"||m=="parent")||g&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||i(m,w)))&&y.push(m);return y}return oo=u,oo}var ao,jd;function Mr(){if(jd)return ao;jd=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return ao=t,ao}var so,Yd;function ry(){if(Yd)return so;Yd=1;function e(t,n){return function(r){return t(n(r))}}return so=e,so}var uo,Kd;function lS(){if(Kd)return uo;Kd=1;var e=ry(),t=e(Object.keys,Object);return uo=t,uo}var lo,Xd;function Pl(){if(Xd)return lo;Xd=1;var e=Mr(),t=lS(),n=Object.prototype,r=n.hasOwnProperty;function i(o){if(!e(o))return t(o);var a=[];for(var s in Object(o))r.call(o,s)&&s!="constructor"&&a.push(s);return a}return lo=i,lo}var co,Wd;function dt(){if(Wd)return co;Wd=1;var e=xn(),t=ql();function n(r){return r!=null&&t(r.length)&&!e(r)}return co=n,co}var fo,Zd;function Ct(){if(Zd)return fo;Zd=1;var e=ny(),t=Pl(),n=dt();function r(i){return n(i)?e(i):t(i)}return fo=r,fo}var ho,Jd;function cS(){if(Jd)return ho;Jd=1;var e=Cn(),t=Ct();function n(r,i){return r&&e(i,t(i),r)}return ho=n,ho}var vo,Qd;function dS(){if(Qd)return vo;Qd=1;function e(t){var n=[];if(t!=null)for(var r in Object(t))n.push(r);return n}return vo=e,vo}var po,ef;function fS(){if(ef)return po;ef=1;var e=ke(),t=Mr(),n=dS(),r=Object.prototype,i=r.hasOwnProperty;function o(a){if(!e(a))return n(a);var s=t(a),u=[];for(var c in a)c=="constructor"&&(s||!i.call(a,c))||u.push(c);return u}return po=o,po}var go,tf;function zt(){if(tf)return go;tf=1;var e=ny(),t=fS(),n=dt();function r(i){return n(i)?e(i,!0):t(i)}return go=r,go}var yo,nf;function hS(){if(nf)return yo;nf=1;var e=Cn(),t=zt();function n(r,i){return r&&e(i,t(i),r)}return yo=n,yo}var Gn={exports:{}},rf;function iy(){return rf||(rf=1,function(e,t){var n=Ge(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o?n.Buffer:void 0,s=a?a.allocUnsafe:void 0;function u(c,l){if(l)return c.slice();var d=c.length,f=s?s(d):new c.constructor(d);return c.copy(f),f}e.exports=u}(Gn,Gn.exports)),Gn.exports}var mo,of;function oy(){if(of)return mo;of=1;function e(t,n){var r=-1,i=t.length;for(n||(n=Array(i));++r<i;)n[r]=t[r];return n}return mo=e,mo}var _o,af;function ay(){if(af)return _o;af=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,o=0,a=[];++r<i;){var s=t[r];n(s,r,t)&&(a[o++]=s)}return a}return _o=e,_o}var bo,sf;function sy(){if(sf)return bo;sf=1;function e(){return[]}return bo=e,bo}var wo,uf;function Ol(){if(uf)return wo;uf=1;var e=ay(),t=sy(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,o=i?function(a){return a==null?[]:(a=Object(a),e(i(a),function(s){return r.call(a,s)}))}:t;return wo=o,wo}var Eo,lf;function vS(){if(lf)return Eo;lf=1;var e=Cn(),t=Ol();function n(r,i){return e(r,t(r),i)}return Eo=n,Eo}var So,cf;function kl(){if(cf)return So;cf=1;function e(t,n){for(var r=-1,i=n.length,o=t.length;++r<i;)t[o+r]=n[r];return t}return So=e,So}var xo,df;function Pr(){if(df)return xo;df=1;var e=ry(),t=e(Object.getPrototypeOf,Object);return xo=t,xo}var Co,ff;function uy(){if(ff)return Co;ff=1;var e=kl(),t=Pr(),n=Ol(),r=sy(),i=Object.getOwnPropertySymbols,o=i?function(a){for(var s=[];a;)e(s,n(a)),a=t(a);return s}:r;return Co=o,Co}var Io,hf;function pS(){if(hf)return Io;hf=1;var e=Cn(),t=uy();function n(r,i){return e(r,t(r),i)}return Io=n,Io}var No,vf;function ly(){if(vf)return No;vf=1;var e=kl(),t=Ie();function n(r,i,o){var a=i(r);return t(r)?a:e(a,o(r))}return No=n,No}var To,pf;function cy(){if(pf)return To;pf=1;var e=ly(),t=Ol(),n=Ct();function r(i){return e(i,n,t)}return To=r,To}var Ro,gf;function gS(){if(gf)return Ro;gf=1;var e=ly(),t=uy(),n=zt();function r(i){return e(i,n,t)}return Ro=r,Ro}var Ao,yf;function yS(){if(yf)return Ao;yf=1;var e=Lt(),t=Ge(),n=e(t,"DataView");return Ao=n,Ao}var qo,mf;function mS(){if(mf)return qo;mf=1;var e=Lt(),t=Ge(),n=e(t,"Promise");return qo=n,qo}var Mo,_f;function dy(){if(_f)return Mo;_f=1;var e=Lt(),t=Ge(),n=e(t,"Set");return Mo=n,Mo}var Po,bf;function _S(){if(bf)return Po;bf=1;var e=Lt(),t=Ge(),n=e(t,"WeakMap");return Po=n,Po}var Oo,wf;function nn(){if(wf)return Oo;wf=1;var e=yS(),t=Tl(),n=mS(),r=dy(),i=_S(),o=Bt(),a=ey(),s="[object Map]",u="[object Object]",c="[object Promise]",l="[object Set]",d="[object WeakMap]",f="[object DataView]",h=a(e),g=a(t),v=a(n),y=a(r),w=a(i),m=o;return(e&&m(new e(new ArrayBuffer(1)))!=f||t&&m(new t)!=s||n&&m(n.resolve())!=c||r&&m(new r)!=l||i&&m(new i)!=d)&&(m=function(C){var S=o(C),P=S==u?C.constructor:void 0,M=P?a(P):"";if(M)switch(M){case h:return f;case g:return s;case v:return c;case y:return l;case w:return d}return S}),Oo=m,Oo}var ko,Ef;function bS(){if(Ef)return ko;Ef=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r){var i=r.length,o=new r.constructor(i);return i&&typeof r[0]=="string"&&t.call(r,"index")&&(o.index=r.index,o.input=r.input),o}return ko=n,ko}var Do,Sf;function fy(){if(Sf)return Do;Sf=1;var e=Ge(),t=e.Uint8Array;return Do=t,Do}var $o,xf;function Dl(){if(xf)return $o;xf=1;var e=fy();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return $o=t,$o}var Bo,Cf;function wS(){if(Cf)return Bo;Cf=1;var e=Dl();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.byteLength)}return Bo=t,Bo}var Lo,If;function ES(){if(If)return Lo;If=1;var e=/\w*$/;function t(n){var r=new n.constructor(n.source,e.exec(n));return r.lastIndex=n.lastIndex,r}return Lo=t,Lo}var zo,Nf;function SS(){if(Nf)return zo;Nf=1;var e=en(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;function r(i){return n?Object(n.call(i)):{}}return zo=r,zo}var Fo,Tf;function hy(){if(Tf)return Fo;Tf=1;var e=Dl();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.length)}return Fo=t,Fo}var Go,Rf;function xS(){if(Rf)return Go;Rf=1;var e=Dl(),t=wS(),n=ES(),r=SS(),i=hy(),o="[object Boolean]",a="[object Date]",s="[object Map]",u="[object Number]",c="[object RegExp]",l="[object Set]",d="[object String]",f="[object Symbol]",h="[object ArrayBuffer]",g="[object DataView]",v="[object Float32Array]",y="[object Float64Array]",w="[object Int8Array]",m="[object Int16Array]",C="[object Int32Array]",S="[object Uint8Array]",P="[object Uint8ClampedArray]",M="[object Uint16Array]",R="[object Uint32Array]";function B(D,A,b){var G=D.constructor;switch(A){case h:return e(D);case o:case a:return new G(+D);case g:return t(D,b);case v:case y:case w:case m:case C:case S:case P:case M:case R:return i(D,b);case s:return new G;case u:case d:return new G(D);case c:return n(D);case l:return new G;case f:return r(D)}}return Go=B,Go}var Vo,Af;function vy(){if(Af)return Vo;Af=1;var e=ke(),t=Object.create,n=function(){function r(){}return function(i){if(!e(i))return{};if(t)return t(i);r.prototype=i;var o=new r;return r.prototype=void 0,o}}();return Vo=n,Vo}var Ho,qf;function py(){if(qf)return Ho;qf=1;var e=vy(),t=Pr(),n=Mr();function r(i){return typeof i.constructor=="function"&&!n(i)?e(t(i)):{}}return Ho=r,Ho}var Uo,Mf;function CS(){if(Mf)return Uo;Mf=1;var e=nn(),t=Ze(),n="[object Map]";function r(i){return t(i)&&e(i)==n}return Uo=r,Uo}var jo,Pf;function IS(){if(Pf)return jo;Pf=1;var e=CS(),t=qr(),n=Ml(),r=n&&n.isMap,i=r?t(r):e;return jo=i,jo}var Yo,Of;function NS(){if(Of)return Yo;Of=1;var e=nn(),t=Ze(),n="[object Set]";function r(i){return t(i)&&e(i)==n}return Yo=r,Yo}var Ko,kf;function TS(){if(kf)return Ko;kf=1;var e=NS(),t=qr(),n=Ml(),r=n&&n.isSet,i=r?t(r):e;return Ko=i,Ko}var Xo,Df;function gy(){if(Df)return Xo;Df=1;var e=Nr(),t=Al(),n=Rr(),r=cS(),i=hS(),o=iy(),a=oy(),s=vS(),u=pS(),c=cy(),l=gS(),d=nn(),f=bS(),h=xS(),g=py(),v=Ie(),y=tn(),w=IS(),m=ke(),C=TS(),S=Ct(),P=zt(),M=1,R=2,B=4,D="[object Arguments]",A="[object Array]",b="[object Boolean]",G="[object Date]",W="[object Error]",E="[object Function]",T="[object GeneratorFunction]",N="[object Map]",k="[object Number]",$="[object Object]",L="[object RegExp]",V="[object Set]",F="[object String]",te="[object Symbol]",U="[object WeakMap]",z="[object ArrayBuffer]",X="[object DataView]",de="[object Float32Array]",le="[object Float64Array]",fe="[object Int8Array]",re="[object Int16Array]",ae="[object Int32Array]",K="[object Uint8Array]",Z="[object Uint8ClampedArray]",_="[object Uint16Array]",p="[object Uint32Array]",x={};x[D]=x[A]=x[z]=x[X]=x[b]=x[G]=x[de]=x[le]=x[fe]=x[re]=x[ae]=x[N]=x[k]=x[$]=x[L]=x[V]=x[F]=x[te]=x[K]=x[Z]=x[_]=x[p]=!0,x[W]=x[E]=x[U]=!1;function I(q,j,Y,O,ee,ie){var ne,he=j&M,Te=j&R,He=j&B;if(Y&&(ne=ee?Y(q,O,ee,ie):Y(q)),ne!==void 0)return ne;if(!m(q))return q;var ht=v(q);if(ht){if(ne=f(q),!he)return a(q,ne)}else{var $e=d(q),Je=$e==E||$e==T;if(y(q))return o(q,he);if($e==$||$e==D||Je&&!ee){if(ne=Te||Je?{}:g(q),!he)return Te?u(q,i(ne,q)):s(q,r(ne,q))}else{if(!x[$e])return ee?q:{};ne=h(q,$e,he)}}ie||(ie=new e);var Rn=ie.get(q);if(Rn)return Rn;ie.set(q,ne),C(q)?q.forEach(function(vt){ne.add(I(vt,j,Y,vt,q,ie))}):w(q)&&q.forEach(function(vt,It){ne.set(It,I(vt,j,Y,It,q,ie))});var Gr=He?Te?l:c:Te?P:S,An=ht?void 0:Gr(q);return t(An||q,function(vt,It){An&&(It=vt,vt=q[It]),n(ne,It,I(vt,j,Y,It,q,ie))}),ne}return Xo=I,Xo}var Wo,$f;function RS(){if($f)return Wo;$f=1;var e=gy(),t=4;function n(r){return e(r,t)}return Wo=n,Wo}var Zo,Bf;function $l(){if(Bf)return Zo;Bf=1;function e(t){return function(){return t}}return Zo=e,Zo}var Jo={exports:{}},Qo,Lf;function AS(){if(Lf)return Qo;Lf=1;function e(t){return function(n,r,i){for(var o=-1,a=Object(n),s=i(n),u=s.length;u--;){var c=s[t?u:++o];if(r(a[c],c,a)===!1)break}return n}}return Qo=e,Qo}var ea,zf;function Bl(){if(zf)return ea;zf=1;var e=AS(),t=e();return ea=t,ea}var ta,Ff;function Ll(){if(Ff)return ta;Ff=1;var e=Bl(),t=Ct();function n(r,i){return r&&e(r,i,t)}return ta=n,ta}var na,Gf;function qS(){if(Gf)return na;Gf=1;var e=dt();function t(n,r){return function(i,o){if(i==null)return i;if(!e(i))return n(i,o);for(var a=i.length,s=r?a:-1,u=Object(i);(r?s--:++s<a)&&o(u[s],s,u)!==!1;);return i}}return na=t,na}var ra,Vf;function Or(){if(Vf)return ra;Vf=1;var e=Ll(),t=qS(),n=t(e);return ra=n,ra}var ia,Hf;function Ft(){if(Hf)return ia;Hf=1;function e(t){return t}return ia=e,ia}var oa,Uf;function yy(){if(Uf)return oa;Uf=1;var e=Ft();function t(n){return typeof n=="function"?n:e}return oa=t,oa}var aa,jf;function my(){if(jf)return aa;jf=1;var e=Al(),t=Or(),n=yy(),r=Ie();function i(o,a){var s=r(o)?e:t;return s(o,n(a))}return aa=i,aa}var Yf;function _y(){return Yf||(Yf=1,function(e){e.exports=my()}(Jo)),Jo.exports}var sa,Kf;function MS(){if(Kf)return sa;Kf=1;var e=Or();function t(n,r){var i=[];return e(n,function(o,a,s){r(o,a,s)&&i.push(o)}),i}return sa=t,sa}var ua,Xf;function PS(){if(Xf)return ua;Xf=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return ua=t,ua}var la,Wf;function OS(){if(Wf)return la;Wf=1;function e(t){return this.__data__.has(t)}return la=e,la}var ca,Zf;function by(){if(Zf)return ca;Zf=1;var e=Rl(),t=PS(),n=OS();function r(i){var o=-1,a=i==null?0:i.length;for(this.__data__=new e;++o<a;)this.add(i[o])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,ca=r,ca}var da,Jf;function kS(){if(Jf)return da;Jf=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return da=e,da}var fa,Qf;function wy(){if(Qf)return fa;Qf=1;function e(t,n){return t.has(n)}return fa=e,fa}var ha,eh;function Ey(){if(eh)return ha;eh=1;var e=by(),t=kS(),n=wy(),r=1,i=2;function o(a,s,u,c,l,d){var f=u&r,h=a.length,g=s.length;if(h!=g&&!(f&&g>h))return!1;var v=d.get(a),y=d.get(s);if(v&&y)return v==s&&y==a;var w=-1,m=!0,C=u&i?new e:void 0;for(d.set(a,s),d.set(s,a);++w<h;){var S=a[w],P=s[w];if(c)var M=f?c(P,S,w,s,a,d):c(S,P,w,a,s,d);if(M!==void 0){if(M)continue;m=!1;break}if(C){if(!t(s,function(R,B){if(!n(C,B)&&(S===R||l(S,R,u,c,d)))return C.push(B)})){m=!1;break}}else if(!(S===P||l(S,P,u,c,d))){m=!1;break}}return d.delete(a),d.delete(s),m}return ha=o,ha}var va,th;function DS(){if(th)return va;th=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,o){r[++n]=[o,i]}),r}return va=e,va}var pa,nh;function zl(){if(nh)return pa;nh=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return pa=e,pa}var ga,rh;function $S(){if(rh)return ga;rh=1;var e=en(),t=fy(),n=Qt(),r=Ey(),i=DS(),o=zl(),a=1,s=2,u="[object Boolean]",c="[object Date]",l="[object Error]",d="[object Map]",f="[object Number]",h="[object RegExp]",g="[object Set]",v="[object String]",y="[object Symbol]",w="[object ArrayBuffer]",m="[object DataView]",C=e?e.prototype:void 0,S=C?C.valueOf:void 0;function P(M,R,B,D,A,b,G){switch(B){case m:if(M.byteLength!=R.byteLength||M.byteOffset!=R.byteOffset)return!1;M=M.buffer,R=R.buffer;case w:return!(M.byteLength!=R.byteLength||!b(new t(M),new t(R)));case u:case c:case f:return n(+M,+R);case l:return M.name==R.name&&M.message==R.message;case h:case v:return M==R+"";case d:var W=i;case g:var E=D&a;if(W||(W=o),M.size!=R.size&&!E)return!1;var T=G.get(M);if(T)return T==R;D|=s,G.set(M,R);var N=r(W(M),W(R),D,A,b,G);return G.delete(M),N;case y:if(S)return S.call(M)==S.call(R)}return!1}return ga=P,ga}var ya,ih;function BS(){if(ih)return ya;ih=1;var e=cy(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(o,a,s,u,c,l){var d=s&t,f=e(o),h=f.length,g=e(a),v=g.length;if(h!=v&&!d)return!1;for(var y=h;y--;){var w=f[y];if(!(d?w in a:r.call(a,w)))return!1}var m=l.get(o),C=l.get(a);if(m&&C)return m==a&&C==o;var S=!0;l.set(o,a),l.set(a,o);for(var P=d;++y<h;){w=f[y];var M=o[w],R=a[w];if(u)var B=d?u(R,M,w,a,o,l):u(M,R,w,o,a,l);if(!(B===void 0?M===R||c(M,R,s,u,l):B)){S=!1;break}P||(P=w=="constructor")}if(S&&!P){var D=o.constructor,A=a.constructor;D!=A&&"constructor"in o&&"constructor"in a&&!(typeof D=="function"&&D instanceof D&&typeof A=="function"&&A instanceof A)&&(S=!1)}return l.delete(o),l.delete(a),S}return ya=i,ya}var ma,oh;function LS(){if(oh)return ma;oh=1;var e=Nr(),t=Ey(),n=$S(),r=BS(),i=nn(),o=Ie(),a=tn(),s=Nn(),u=1,c="[object Arguments]",l="[object Array]",d="[object Object]",f=Object.prototype,h=f.hasOwnProperty;function g(v,y,w,m,C,S){var P=o(v),M=o(y),R=P?l:i(v),B=M?l:i(y);R=R==c?d:R,B=B==c?d:B;var D=R==d,A=B==d,b=R==B;if(b&&a(v)){if(!a(y))return!1;P=!0,D=!1}if(b&&!D)return S||(S=new e),P||s(v)?t(v,y,w,m,C,S):n(v,y,R,w,m,C,S);if(!(w&u)){var G=D&&h.call(v,"__wrapped__"),W=A&&h.call(y,"__wrapped__");if(G||W){var E=G?v.value():v,T=W?y.value():y;return S||(S=new e),C(E,T,w,m,S)}}return b?(S||(S=new e),r(v,y,w,m,C,S)):!1}return ma=g,ma}var _a,ah;function Sy(){if(ah)return _a;ah=1;var e=LS(),t=Ze();function n(r,i,o,a,s){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,o,a,n,s)}return _a=n,_a}var ba,sh;function zS(){if(sh)return ba;sh=1;var e=Nr(),t=Sy(),n=1,r=2;function i(o,a,s,u){var c=s.length,l=c,d=!u;if(o==null)return!l;for(o=Object(o);c--;){var f=s[c];if(d&&f[2]?f[1]!==o[f[0]]:!(f[0]in o))return!1}for(;++c<l;){f=s[c];var h=f[0],g=o[h],v=f[1];if(d&&f[2]){if(g===void 0&&!(h in o))return!1}else{var y=new e;if(u)var w=u(g,v,h,o,a,y);if(!(w===void 0?t(v,g,n|r,u,y):w))return!1}}return!0}return ba=i,ba}var wa,uh;function xy(){if(uh)return wa;uh=1;var e=ke();function t(n){return n===n&&!e(n)}return wa=t,wa}var Ea,lh;function FS(){if(lh)return Ea;lh=1;var e=xy(),t=Ct();function n(r){for(var i=t(r),o=i.length;o--;){var a=i[o],s=r[a];i[o]=[a,s,e(s)]}return i}return Ea=n,Ea}var Sa,ch;function Cy(){if(ch)return Sa;ch=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return Sa=e,Sa}var xa,dh;function GS(){if(dh)return xa;dh=1;var e=zS(),t=FS(),n=Cy();function r(i){var o=t(i);return o.length==1&&o[0][2]?n(o[0][0],o[0][1]):function(a){return a===i||e(a,i,o)}}return xa=r,xa}var Ca,fh;function rn(){if(fh)return Ca;fh=1;var e=Bt(),t=Ze(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return Ca=r,Ca}var Ia,hh;function Fl(){if(hh)return Ia;hh=1;var e=Ie(),t=rn(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(o,a){if(e(o))return!1;var s=typeof o;return s=="number"||s=="symbol"||s=="boolean"||o==null||t(o)?!0:r.test(o)||!n.test(o)||a!=null&&o in Object(a)}return Ia=i,Ia}var Na,vh;function VS(){if(vh)return Na;vh=1;var e=Rl(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var o=function(){var a=arguments,s=i?i.apply(this,a):a[0],u=o.cache;if(u.has(s))return u.get(s);var c=r.apply(this,a);return o.cache=u.set(s,c)||u,c};return o.cache=new(n.Cache||e),o}return n.Cache=e,Na=n,Na}var Ta,ph;function HS(){if(ph)return Ta;ph=1;var e=VS(),t=500;function n(r){var i=e(r,function(a){return o.size===t&&o.clear(),a}),o=i.cache;return i}return Ta=n,Ta}var Ra,gh;function US(){if(gh)return Ra;gh=1;var e=HS(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(t,function(a,s,u,c){o.push(u?c.replace(n,"$1"):s||a)}),o});return Ra=r,Ra}var Aa,yh;function kr(){if(yh)return Aa;yh=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,o=Array(i);++r<i;)o[r]=n(t[r],r,t);return o}return Aa=e,Aa}var qa,mh;function jS(){if(mh)return qa;mh=1;var e=en(),t=kr(),n=Ie(),r=rn(),i=1/0,o=e?e.prototype:void 0,a=o?o.toString:void 0;function s(u){if(typeof u=="string")return u;if(n(u))return t(u,s)+"";if(r(u))return a?a.call(u):"";var c=u+"";return c=="0"&&1/u==-i?"-0":c}return qa=s,qa}var Ma,_h;function Iy(){if(_h)return Ma;_h=1;var e=jS();function t(n){return n==null?"":e(n)}return Ma=t,Ma}var Pa,bh;function Dr(){if(bh)return Pa;bh=1;var e=Ie(),t=Fl(),n=US(),r=Iy();function i(o,a){return e(o)?o:t(o,a)?[o]:n(r(o))}return Pa=i,Pa}var Oa,wh;function Tn(){if(wh)return Oa;wh=1;var e=rn(),t=1/0;function n(r){if(typeof r=="string"||e(r))return r;var i=r+"";return i=="0"&&1/r==-t?"-0":i}return Oa=n,Oa}var ka,Eh;function $r(){if(Eh)return ka;Eh=1;var e=Dr(),t=Tn();function n(r,i){i=e(i,r);for(var o=0,a=i.length;r!=null&&o<a;)r=r[t(i[o++])];return o&&o==a?r:void 0}return ka=n,ka}var Da,Sh;function YS(){if(Sh)return Da;Sh=1;var e=$r();function t(n,r,i){var o=n==null?void 0:e(n,r);return o===void 0?i:o}return Da=t,Da}var $a,xh;function KS(){if(xh)return $a;xh=1;function e(t,n){return t!=null&&n in Object(t)}return $a=e,$a}var Ba,Ch;function Ny(){if(Ch)return Ba;Ch=1;var e=Dr(),t=In(),n=Ie(),r=Ar(),i=ql(),o=Tn();function a(s,u,c){u=e(u,s);for(var l=-1,d=u.length,f=!1;++l<d;){var h=o(u[l]);if(!(f=s!=null&&c(s,h)))break;s=s[h]}return f||++l!=d?f:(d=s==null?0:s.length,!!d&&i(d)&&r(h,d)&&(n(s)||t(s)))}return Ba=a,Ba}var La,Ih;function Ty(){if(Ih)return La;Ih=1;var e=KS(),t=Ny();function n(r,i){return r!=null&&t(r,i,e)}return La=n,La}var za,Nh;function XS(){if(Nh)return za;Nh=1;var e=Sy(),t=YS(),n=Ty(),r=Fl(),i=xy(),o=Cy(),a=Tn(),s=1,u=2;function c(l,d){return r(l)&&i(d)?o(a(l),d):function(f){var h=t(f,l);return h===void 0&&h===d?n(f,l):e(d,h,s|u)}}return za=c,za}var Fa,Th;function Ry(){if(Th)return Fa;Th=1;function e(t){return function(n){return n==null?void 0:n[t]}}return Fa=e,Fa}var Ga,Rh;function WS(){if(Rh)return Ga;Rh=1;var e=$r();function t(n){return function(r){return e(r,n)}}return Ga=t,Ga}var Va,Ah;function ZS(){if(Ah)return Va;Ah=1;var e=Ry(),t=WS(),n=Fl(),r=Tn();function i(o){return n(o)?e(r(o)):t(o)}return Va=i,Va}var Ha,qh;function ft(){if(qh)return Ha;qh=1;var e=GS(),t=XS(),n=Ft(),r=Ie(),i=ZS();function o(a){return typeof a=="function"?a:a==null?n:typeof a=="object"?r(a)?t(a[0],a[1]):e(a):i(a)}return Ha=o,Ha}var Ua,Mh;function Ay(){if(Mh)return Ua;Mh=1;var e=ay(),t=MS(),n=ft(),r=Ie();function i(o,a){var s=r(o)?e:t;return s(o,n(a,3))}return Ua=i,Ua}var ja,Ph;function JS(){if(Ph)return ja;Ph=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r,i){return r!=null&&t.call(r,i)}return ja=n,ja}var Ya,Oh;function qy(){if(Oh)return Ya;Oh=1;var e=JS(),t=Ny();function n(r,i){return r!=null&&t(r,i,e)}return Ya=n,Ya}var Ka,kh;function QS(){if(kh)return Ka;kh=1;var e=Pl(),t=nn(),n=In(),r=Ie(),i=dt(),o=tn(),a=Mr(),s=Nn(),u="[object Map]",c="[object Set]",l=Object.prototype,d=l.hasOwnProperty;function f(h){if(h==null)return!0;if(i(h)&&(r(h)||typeof h=="string"||typeof h.splice=="function"||o(h)||s(h)||n(h)))return!h.length;var g=t(h);if(g==u||g==c)return!h.size;if(a(h))return!e(h).length;for(var v in h)if(d.call(h,v))return!1;return!0}return Ka=f,Ka}var Xa,Dh;function My(){if(Dh)return Xa;Dh=1;function e(t){return t===void 0}return Xa=e,Xa}var Wa,$h;function Py(){if($h)return Wa;$h=1;var e=Or(),t=dt();function n(r,i){var o=-1,a=t(r)?Array(r.length):[];return e(r,function(s,u,c){a[++o]=i(s,u,c)}),a}return Wa=n,Wa}var Za,Bh;function Oy(){if(Bh)return Za;Bh=1;var e=kr(),t=ft(),n=Py(),r=Ie();function i(o,a){var s=r(o)?e:n;return s(o,t(a,3))}return Za=i,Za}var Ja,Lh;function ex(){if(Lh)return Ja;Lh=1;function e(t,n,r,i){var o=-1,a=t==null?0:t.length;for(i&&a&&(r=t[++o]);++o<a;)r=n(r,t[o],o,t);return r}return Ja=e,Ja}var Qa,zh;function tx(){if(zh)return Qa;zh=1;function e(t,n,r,i,o){return o(t,function(a,s,u){r=i?(i=!1,a):n(r,a,s,u)}),r}return Qa=e,Qa}var es,Fh;function ky(){if(Fh)return es;Fh=1;var e=ex(),t=Or(),n=ft(),r=tx(),i=Ie();function o(a,s,u){var c=i(a)?e:r,l=arguments.length<3;return c(a,n(s,4),u,l,t)}return es=o,es}var ts,Gh;function nx(){if(Gh)return ts;Gh=1;var e=Bt(),t=Ie(),n=Ze(),r="[object String]";function i(o){return typeof o=="string"||!t(o)&&n(o)&&e(o)==r}return ts=i,ts}var ns,Vh;function rx(){if(Vh)return ns;Vh=1;var e=Ry(),t=e("length");return ns=t,ns}var rs,Hh;function ix(){if(Hh)return rs;Hh=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,o="\\ufe0e\\ufe0f",a="\\u200d",s=RegExp("["+a+e+i+o+"]");function u(c){return s.test(c)}return rs=u,rs}var is,Uh;function ox(){if(Uh)return is;Uh=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,o="\\ufe0e\\ufe0f",a="["+e+"]",s="["+i+"]",u="\\ud83c[\\udffb-\\udfff]",c="(?:"+s+"|"+u+")",l="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",f="[\\ud800-\\udbff][\\udc00-\\udfff]",h="\\u200d",g=c+"?",v="["+o+"]?",y="(?:"+h+"(?:"+[l,d,f].join("|")+")"+v+g+")*",w=v+g+y,m="(?:"+[l+s+"?",s,d,f,a].join("|")+")",C=RegExp(u+"(?="+u+")|"+m+w,"g");function S(P){for(var M=C.lastIndex=0;C.test(P);)++M;return M}return is=S,is}var os,jh;function ax(){if(jh)return os;jh=1;var e=rx(),t=ix(),n=ox();function r(i){return t(i)?n(i):e(i)}return os=r,os}var as,Yh;function sx(){if(Yh)return as;Yh=1;var e=Pl(),t=nn(),n=dt(),r=nx(),i=ax(),o="[object Map]",a="[object Set]";function s(u){if(u==null)return 0;if(n(u))return r(u)?i(u):u.length;var c=t(u);return c==o||c==a?u.size:e(u).length}return as=s,as}var ss,Kh;function ux(){if(Kh)return ss;Kh=1;var e=Al(),t=vy(),n=Ll(),r=ft(),i=Pr(),o=Ie(),a=tn(),s=xn(),u=ke(),c=Nn();function l(d,f,h){var g=o(d),v=g||a(d)||c(d);if(f=r(f,4),h==null){var y=d&&d.constructor;v?h=g?new y:[]:u(d)?h=s(y)?t(i(d)):{}:h={}}return(v?e:n)(d,function(w,m,C){return f(h,w,m,C)}),h}return ss=l,ss}var us,Xh;function lx(){if(Xh)return us;Xh=1;var e=en(),t=In(),n=Ie(),r=e?e.isConcatSpreadable:void 0;function i(o){return n(o)||t(o)||!!(r&&o&&o[r])}return us=i,us}var ls,Wh;function Gl(){if(Wh)return ls;Wh=1;var e=kl(),t=lx();function n(r,i,o,a,s){var u=-1,c=r.length;for(o||(o=t),s||(s=[]);++u<c;){var l=r[u];i>0&&o(l)?i>1?n(l,i-1,o,a,s):e(s,l):a||(s[s.length]=l)}return s}return ls=n,ls}var cs,Zh;function cx(){if(Zh)return cs;Zh=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return cs=e,cs}var ds,Jh;function Dy(){if(Jh)return ds;Jh=1;var e=cx(),t=Math.max;function n(r,i,o){return i=t(i===void 0?r.length-1:i,0),function(){for(var a=arguments,s=-1,u=t(a.length-i,0),c=Array(u);++s<u;)c[s]=a[i+s];s=-1;for(var l=Array(i+1);++s<i;)l[s]=a[s];return l[i]=o(c),e(r,this,l)}}return ds=n,ds}var fs,Qh;function dx(){if(Qh)return fs;Qh=1;var e=$l(),t=ty(),n=Ft(),r=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:n;return fs=r,fs}var hs,ev;function fx(){if(ev)return hs;ev=1;var e=800,t=16,n=Date.now;function r(i){var o=0,a=0;return function(){var s=n(),u=t-(s-a);if(a=s,u>0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return hs=r,hs}var vs,tv;function $y(){if(tv)return vs;tv=1;var e=dx(),t=fx(),n=t(e);return vs=n,vs}var ps,nv;function Br(){if(nv)return ps;nv=1;var e=Ft(),t=Dy(),n=$y();function r(i,o){return n(t(i,o,e),i+"")}return ps=r,ps}var gs,rv;function By(){if(rv)return gs;rv=1;function e(t,n,r,i){for(var o=t.length,a=r+(i?1:-1);i?a--:++a<o;)if(n(t[a],a,t))return a;return-1}return gs=e,gs}var ys,iv;function hx(){if(iv)return ys;iv=1;function e(t){return t!==t}return ys=e,ys}var ms,ov;function vx(){if(ov)return ms;ov=1;function e(t,n,r){for(var i=r-1,o=t.length;++i<o;)if(t[i]===n)return i;return-1}return ms=e,ms}var _s,av;function px(){if(av)return _s;av=1;var e=By(),t=hx(),n=vx();function r(i,o,a){return o===o?n(i,o,a):e(i,t,a)}return _s=r,_s}var bs,sv;function gx(){if(sv)return bs;sv=1;var e=px();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return bs=t,bs}var ws,uv;function yx(){if(uv)return ws;uv=1;function e(t,n,r){for(var i=-1,o=t==null?0:t.length;++i<o;)if(r(n,t[i]))return!0;return!1}return ws=e,ws}var Es,lv;function mx(){if(lv)return Es;lv=1;function e(){}return Es=e,Es}var Ss,cv;function _x(){if(cv)return Ss;cv=1;var e=dy(),t=mx(),n=zl(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(o){return new e(o)}:t;return Ss=i,Ss}var xs,dv;function bx(){if(dv)return xs;dv=1;var e=by(),t=gx(),n=yx(),r=wy(),i=_x(),o=zl(),a=200;function s(u,c,l){var d=-1,f=t,h=u.length,g=!0,v=[],y=v;if(l)g=!1,f=n;else if(h>=a){var w=c?null:i(u);if(w)return o(w);g=!1,f=r,y=new e}else y=c?[]:v;e:for(;++d<h;){var m=u[d],C=c?c(m):m;if(m=l||m!==0?m:0,g&&C===C){for(var S=y.length;S--;)if(y[S]===C)continue e;c&&y.push(C),v.push(m)}else f(y,C,l)||(y!==v&&y.push(C),v.push(m))}return v}return xs=s,xs}var Cs,fv;function Ly(){if(fv)return Cs;fv=1;var e=dt(),t=Ze();function n(r){return t(r)&&e(r)}return Cs=n,Cs}var Is,hv;function wx(){if(hv)return Is;hv=1;var e=Gl(),t=Br(),n=bx(),r=Ly(),i=t(function(o){return n(e(o,1,r,!0))});return Is=i,Is}var Ns,vv;function Ex(){if(vv)return Ns;vv=1;var e=kr();function t(n,r){return e(r,function(i){return n[i]})}return Ns=t,Ns}var Ts,pv;function zy(){if(pv)return Ts;pv=1;var e=Ex(),t=Ct();function n(r){return r==null?[]:e(r,t(r))}return Ts=n,Ts}var Rs,gv;function De(){if(gv)return Rs;gv=1;var e;if(typeof gl=="function")try{e={clone:RS(),constant:$l(),each:_y(),filter:Ay(),has:qy(),isArray:Ie(),isEmpty:QS(),isFunction:xn(),isUndefined:My(),keys:Ct(),map:Oy(),reduce:ky(),size:sx(),transform:ux(),union:wx(),values:zy()}}catch{}return e||(e=window._),Rs=e,Rs}var As,yv;function Vl(){if(yv)return As;yv=1;var e=De();As=i;var t="\0",n="\0",r="";function i(l){this._isDirected=e.has(l,"directed")?l.directed:!0,this._isMultigraph=e.has(l,"multigraph")?l.multigraph:!1,this._isCompound=e.has(l,"compound")?l.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[n]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(l){return this._label=l,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(l){return e.isFunction(l)||(l=e.constant(l)),this._defaultNodeLabelFn=l,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return e.keys(this._nodes)},i.prototype.sources=function(){var l=this;return e.filter(this.nodes(),function(d){return e.isEmpty(l._in[d])})},i.prototype.sinks=function(){var l=this;return e.filter(this.nodes(),function(d){return e.isEmpty(l._out[d])})},i.prototype.setNodes=function(l,d){var f=arguments,h=this;return e.each(l,function(g){f.length>1?h.setNode(g,d):h.setNode(g)}),this},i.prototype.setNode=function(l,d){return e.has(this._nodes,l)?(arguments.length>1&&(this._nodes[l]=d),this):(this._nodes[l]=arguments.length>1?d:this._defaultNodeLabelFn(l),this._isCompound&&(this._parent[l]=n,this._children[l]={},this._children[n][l]=!0),this._in[l]={},this._preds[l]={},this._out[l]={},this._sucs[l]={},++this._nodeCount,this)},i.prototype.node=function(l){return this._nodes[l]},i.prototype.hasNode=function(l){return e.has(this._nodes,l)},i.prototype.removeNode=function(l){var d=this;if(e.has(this._nodes,l)){var f=function(h){d.removeEdge(d._edgeObjs[h])};delete this._nodes[l],this._isCompound&&(this._removeFromParentsChildList(l),delete this._parent[l],e.each(this.children(l),function(h){d.setParent(h)}),delete this._children[l]),e.each(e.keys(this._in[l]),f),delete this._in[l],delete this._preds[l],e.each(e.keys(this._out[l]),f),delete this._out[l],delete this._sucs[l],--this._nodeCount}return this},i.prototype.setParent=function(l,d){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(d))d=n;else{d+="";for(var f=d;!e.isUndefined(f);f=this.parent(f))if(f===l)throw new Error("Setting "+d+" as parent of "+l+" would create a cycle");this.setNode(d)}return this.setNode(l),this._removeFromParentsChildList(l),this._parent[l]=d,this._children[d][l]=!0,this},i.prototype._removeFromParentsChildList=function(l){delete this._children[this._parent[l]][l]},i.prototype.parent=function(l){if(this._isCompound){var d=this._parent[l];if(d!==n)return d}},i.prototype.children=function(l){if(e.isUndefined(l)&&(l=n),this._isCompound){var d=this._children[l];if(d)return e.keys(d)}else{if(l===n)return this.nodes();if(this.hasNode(l))return[]}},i.prototype.predecessors=function(l){var d=this._preds[l];if(d)return e.keys(d)},i.prototype.successors=function(l){var d=this._sucs[l];if(d)return e.keys(d)},i.prototype.neighbors=function(l){var d=this.predecessors(l);if(d)return e.union(d,this.successors(l))},i.prototype.isLeaf=function(l){var d;return this.isDirected()?d=this.successors(l):d=this.neighbors(l),d.length===0},i.prototype.filterNodes=function(l){var d=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});d.setGraph(this.graph());var f=this;e.each(this._nodes,function(v,y){l(y)&&d.setNode(y,v)}),e.each(this._edgeObjs,function(v){d.hasNode(v.v)&&d.hasNode(v.w)&&d.setEdge(v,f.edge(v))});var h={};function g(v){var y=f.parent(v);return y===void 0||d.hasNode(y)?(h[v]=y,y):y in h?h[y]:g(y)}return this._isCompound&&e.each(d.nodes(),function(v){d.setParent(v,g(v))}),d},i.prototype.setDefaultEdgeLabel=function(l){return e.isFunction(l)||(l=e.constant(l)),this._defaultEdgeLabelFn=l,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return e.values(this._edgeObjs)},i.prototype.setPath=function(l,d){var f=this,h=arguments;return e.reduce(l,function(g,v){return h.length>1?f.setEdge(g,v,d):f.setEdge(g,v),v}),this},i.prototype.setEdge=function(){var l,d,f,h,g=!1,v=arguments[0];typeof v=="object"&&v!==null&&"v"in v?(l=v.v,d=v.w,f=v.name,arguments.length===2&&(h=arguments[1],g=!0)):(l=v,d=arguments[1],f=arguments[3],arguments.length>2&&(h=arguments[2],g=!0)),l=""+l,d=""+d,e.isUndefined(f)||(f=""+f);var y=s(this._isDirected,l,d,f);if(e.has(this._edgeLabels,y))return g&&(this._edgeLabels[y]=h),this;if(!e.isUndefined(f)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(l),this.setNode(d),this._edgeLabels[y]=g?h:this._defaultEdgeLabelFn(l,d,f);var w=u(this._isDirected,l,d,f);return l=w.v,d=w.w,Object.freeze(w),this._edgeObjs[y]=w,o(this._preds[d],l),o(this._sucs[l],d),this._in[d][y]=w,this._out[l][y]=w,this._edgeCount++,this},i.prototype.edge=function(l,d,f){var h=arguments.length===1?c(this._isDirected,arguments[0]):s(this._isDirected,l,d,f);return this._edgeLabels[h]},i.prototype.hasEdge=function(l,d,f){var h=arguments.length===1?c(this._isDirected,arguments[0]):s(this._isDirected,l,d,f);return e.has(this._edgeLabels,h)},i.prototype.removeEdge=function(l,d,f){var h=arguments.length===1?c(this._isDirected,arguments[0]):s(this._isDirected,l,d,f),g=this._edgeObjs[h];return g&&(l=g.v,d=g.w,delete this._edgeLabels[h],delete this._edgeObjs[h],a(this._preds[d],l),a(this._sucs[l],d),delete this._in[d][h],delete this._out[l][h],this._edgeCount--),this},i.prototype.inEdges=function(l,d){var f=this._in[l];if(f){var h=e.values(f);return d?e.filter(h,function(g){return g.v===d}):h}},i.prototype.outEdges=function(l,d){var f=this._out[l];if(f){var h=e.values(f);return d?e.filter(h,function(g){return g.w===d}):h}},i.prototype.nodeEdges=function(l,d){var f=this.inEdges(l,d);if(f)return f.concat(this.outEdges(l,d))};function o(l,d){l[d]?l[d]++:l[d]=1}function a(l,d){--l[d]||delete l[d]}function s(l,d,f,h){var g=""+d,v=""+f;if(!l&&g>v){var y=g;g=v,v=y}return g+r+v+r+(e.isUndefined(h)?t:h)}function u(l,d,f,h){var g=""+d,v=""+f;if(!l&&g>v){var y=g;g=v,v=y}var w={v:g,w:v};return h&&(w.name=h),w}function c(l,d){return s(l,d.v,d.w,d.name)}return As}var qs,mv;function Sx(){return mv||(mv=1,qs="2.1.8"),qs}var Ms,_v;function xx(){return _v||(_v=1,Ms={Graph:Vl(),version:Sx()}),Ms}var Ps,bv;function Cx(){if(bv)return Ps;bv=1;var e=De(),t=Vl();Ps={write:n,read:o};function n(a){var s={options:{directed:a.isDirected(),multigraph:a.isMultigraph(),compound:a.isCompound()},nodes:r(a),edges:i(a)};return e.isUndefined(a.graph())||(s.value=e.clone(a.graph())),s}function r(a){return e.map(a.nodes(),function(s){var u=a.node(s),c=a.parent(s),l={v:s};return e.isUndefined(u)||(l.value=u),e.isUndefined(c)||(l.parent=c),l})}function i(a){return e.map(a.edges(),function(s){var u=a.edge(s),c={v:s.v,w:s.w};return e.isUndefined(s.name)||(c.name=s.name),e.isUndefined(u)||(c.value=u),c})}function o(a){var s=new t(a.options).setGraph(a.value);return e.each(a.nodes,function(u){s.setNode(u.v,u.value),u.parent&&s.setParent(u.v,u.parent)}),e.each(a.edges,function(u){s.setEdge({v:u.v,w:u.w,name:u.name},u.value)}),s}return Ps}var Os,wv;function Ix(){if(wv)return Os;wv=1;var e=De();Os=t;function t(n){var r={},i=[],o;function a(s){e.has(r,s)||(r[s]=!0,o.push(s),e.each(n.successors(s),a),e.each(n.predecessors(s),a))}return e.each(n.nodes(),function(s){o=[],a(s),o.length&&i.push(o)}),i}return Os}var ks,Ev;function Fy(){if(Ev)return ks;Ev=1;var e=De();ks=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(n){return n.key})},t.prototype.has=function(n){return e.has(this._keyIndices,n)},t.prototype.priority=function(n){var r=this._keyIndices[n];if(r!==void 0)return this._arr[r].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(n,r){var i=this._keyIndices;if(n=String(n),!e.has(i,n)){var o=this._arr,a=o.length;return i[n]=a,o.push({key:n,priority:r}),this._decrease(a),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key},t.prototype.decrease=function(n,r){var i=this._keyIndices[n];if(r>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[i].priority+" New: "+r);this._arr[i].priority=r,this._decrease(i)},t.prototype._heapify=function(n){var r=this._arr,i=2*n,o=i+1,a=n;i<r.length&&(a=r[i].priority<r[a].priority?i:a,o<r.length&&(a=r[o].priority<r[a].priority?o:a),a!==n&&(this._swap(n,a),this._heapify(a)))},t.prototype._decrease=function(n){for(var r=this._arr,i=r[n].priority,o;n!==0&&(o=n>>1,!(r[o].priority<i));)this._swap(n,o),n=o},t.prototype._swap=function(n,r){var i=this._arr,o=this._keyIndices,a=i[n],s=i[r];i[n]=s,i[r]=a,o[s.key]=n,o[a.key]=r},ks}var Ds,Sv;function Gy(){if(Sv)return Ds;Sv=1;var e=De(),t=Fy();Ds=r;var n=e.constant(1);function r(o,a,s,u){return i(o,String(a),s||n,u||function(c){return o.outEdges(c)})}function i(o,a,s,u){var c={},l=new t,d,f,h=function(g){var v=g.v!==d?g.v:g.w,y=c[v],w=s(g),m=f.distance+w;if(w<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+g+" Weight: "+w);m<y.distance&&(y.distance=m,y.predecessor=d,l.decrease(v,m))};for(o.nodes().forEach(function(g){var v=g===a?0:Number.POSITIVE_INFINITY;c[g]={distance:v},l.add(g,v)});l.size()>0&&(d=l.removeMin(),f=c[d],f.distance!==Number.POSITIVE_INFINITY);)u(d).forEach(h);return c}return Ds}var $s,xv;function Nx(){if(xv)return $s;xv=1;var e=Gy(),t=De();$s=n;function n(r,i,o){return t.transform(r.nodes(),function(a,s){a[s]=e(r,s,i,o)},{})}return $s}var Bs,Cv;function Vy(){if(Cv)return Bs;Cv=1;var e=De();Bs=t;function t(n){var r=0,i=[],o={},a=[];function s(u){var c=o[u]={onStack:!0,lowlink:r,index:r++};if(i.push(u),n.successors(u).forEach(function(f){e.has(o,f)?o[f].onStack&&(c.lowlink=Math.min(c.lowlink,o[f].index)):(s(f),c.lowlink=Math.min(c.lowlink,o[f].lowlink))}),c.lowlink===c.index){var l=[],d;do d=i.pop(),o[d].onStack=!1,l.push(d);while(u!==d);a.push(l)}}return n.nodes().forEach(function(u){e.has(o,u)||s(u)}),a}return Bs}var Ls,Iv;function Tx(){if(Iv)return Ls;Iv=1;var e=De(),t=Vy();Ls=n;function n(r){return e.filter(t(r),function(i){return i.length>1||i.length===1&&r.hasEdge(i[0],i[0])})}return Ls}var zs,Nv;function Rx(){if(Nv)return zs;Nv=1;var e=De();zs=n;var t=e.constant(1);function n(i,o,a){return r(i,o||t,a||function(s){return i.outEdges(s)})}function r(i,o,a){var s={},u=i.nodes();return u.forEach(function(c){s[c]={},s[c][c]={distance:0},u.forEach(function(l){c!==l&&(s[c][l]={distance:Number.POSITIVE_INFINITY})}),a(c).forEach(function(l){var d=l.v===c?l.w:l.v,f=o(l);s[c][d]={distance:f,predecessor:c}})}),u.forEach(function(c){var l=s[c];u.forEach(function(d){var f=s[d];u.forEach(function(h){var g=f[c],v=l[h],y=f[h],w=g.distance+v.distance;w<y.distance&&(y.distance=w,y.predecessor=v.predecessor)})})}),s}return zs}var Fs,Tv;function Hy(){if(Tv)return Fs;Tv=1;var e=De();Fs=t,t.CycleException=n;function t(r){var i={},o={},a=[];function s(u){if(e.has(o,u))throw new n;e.has(i,u)||(o[u]=!0,i[u]=!0,e.each(r.predecessors(u),s),delete o[u],a.push(u))}if(e.each(r.sinks(),s),e.size(i)!==r.nodeCount())throw new n;return a}function n(){}return n.prototype=new Error,Fs}var Gs,Rv;function Ax(){if(Rv)return Gs;Rv=1;var e=Hy();Gs=t;function t(n){try{e(n)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return Gs}var Vs,Av;function Uy(){if(Av)return Vs;Av=1;var e=De();Vs=t;function t(r,i,o){e.isArray(i)||(i=[i]);var a=(r.isDirected()?r.successors:r.neighbors).bind(r),s=[],u={};return e.each(i,function(c){if(!r.hasNode(c))throw new Error("Graph does not have node: "+c);n(r,c,o==="post",u,a,s)}),s}function n(r,i,o,a,s,u){e.has(a,i)||(a[i]=!0,o||u.push(i),e.each(s(i),function(c){n(r,c,o,a,s,u)}),o&&u.push(i))}return Vs}var Hs,qv;function qx(){if(qv)return Hs;qv=1;var e=Uy();Hs=t;function t(n,r){return e(n,r,"post")}return Hs}var Us,Mv;function Mx(){if(Mv)return Us;Mv=1;var e=Uy();Us=t;function t(n,r){return e(n,r,"pre")}return Us}var js,Pv;function Px(){if(Pv)return js;Pv=1;var e=De(),t=Vl(),n=Fy();js=r;function r(i,o){var a=new t,s={},u=new n,c;function l(f){var h=f.v===c?f.w:f.v,g=u.priority(h);if(g!==void 0){var v=o(f);v<g&&(s[h]=c,u.decrease(h,v))}}if(i.nodeCount()===0)return a;e.each(i.nodes(),function(f){u.add(f,Number.POSITIVE_INFINITY),a.setNode(f)}),u.decrease(i.nodes()[0],0);for(var d=!1;u.size()>0;){if(c=u.removeMin(),e.has(s,c))a.setEdge(c,s[c]);else{if(d)throw new Error("Input graph is not connected: "+i);d=!0}i.nodeEdges(c).forEach(l)}return a}return js}var Ys,Ov;function Ox(){return Ov||(Ov=1,Ys={components:Ix(),dijkstra:Gy(),dijkstraAll:Nx(),findCycles:Tx(),floydWarshall:Rx(),isAcyclic:Ax(),postorder:qx(),preorder:Mx(),prim:Px(),tarjan:Vy(),topsort:Hy()}),Ys}var Ks,kv;function kx(){if(kv)return Ks;kv=1;var e=xx();return Ks={Graph:e.Graph,json:Cx(),alg:Ox(),version:e.version},Ks}var sr;if(typeof gl=="function")try{sr=kx()}catch{}sr||(sr=window.graphlib);var Ve=sr,Xs,Dv;function Dx(){if(Dv)return Xs;Dv=1;var e=gy(),t=1,n=4;function r(i){return e(i,t|n)}return Xs=r,Xs}var Ws,$v;function Lr(){if($v)return Ws;$v=1;var e=Qt(),t=dt(),n=Ar(),r=ke();function i(o,a,s){if(!r(s))return!1;var u=typeof a;return(u=="number"?t(s)&&n(a,s.length):u=="string"&&a in s)?e(s[a],o):!1}return Ws=i,Ws}var Zs,Bv;function $x(){if(Bv)return Zs;Bv=1;var e=Br(),t=Qt(),n=Lr(),r=zt(),i=Object.prototype,o=i.hasOwnProperty,a=e(function(s,u){s=Object(s);var c=-1,l=u.length,d=l>2?u[2]:void 0;for(d&&n(u[0],u[1],d)&&(l=1);++c<l;)for(var f=u[c],h=r(f),g=-1,v=h.length;++g<v;){var y=h[g],w=s[y];(w===void 0||t(w,i[y])&&!o.call(s,y))&&(s[y]=f[y])}return s});return Zs=a,Zs}var Js,Lv;function Bx(){if(Lv)return Js;Lv=1;var e=ft(),t=dt(),n=Ct();function r(i){return function(o,a,s){var u=Object(o);if(!t(o)){var c=e(a,3);o=n(o),a=function(d){return c(u[d],d,u)}}var l=i(o,a,s);return l>-1?u[c?o[l]:l]:void 0}}return Js=r,Js}var Qs,zv;function Lx(){if(zv)return Qs;zv=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return Qs=t,Qs}var eu,Fv;function zx(){if(Fv)return eu;Fv=1;var e=Lx(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return eu=n,eu}var tu,Gv;function Fx(){if(Gv)return tu;Gv=1;var e=zx(),t=ke(),n=rn(),r=0/0,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt;function u(c){if(typeof c=="number")return c;if(n(c))return r;if(t(c)){var l=typeof c.valueOf=="function"?c.valueOf():c;c=t(l)?l+"":l}if(typeof c!="string")return c===0?c:+c;c=e(c);var d=o.test(c);return d||a.test(c)?s(c.slice(2),d?2:8):i.test(c)?r:+c}return tu=u,tu}var nu,Vv;function jy(){if(Vv)return nu;Vv=1;var e=Fx(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var o=i<0?-1:1;return o*n}return i===i?i:0}return nu=r,nu}var ru,Hv;function Gx(){if(Hv)return ru;Hv=1;var e=jy();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return ru=t,ru}var iu,Uv;function Vx(){if(Uv)return iu;Uv=1;var e=By(),t=ft(),n=Gx(),r=Math.max;function i(o,a,s){var u=o==null?0:o.length;if(!u)return-1;var c=s==null?0:n(s);return c<0&&(c=r(u+c,0)),e(o,t(a,3),c)}return iu=i,iu}var ou,jv;function Hx(){if(jv)return ou;jv=1;var e=Bx(),t=Vx(),n=e(t);return ou=n,ou}var au,Yv;function Yy(){if(Yv)return au;Yv=1;var e=Gl();function t(n){var r=n==null?0:n.length;return r?e(n,1):[]}return au=t,au}var su,Kv;function Ux(){if(Kv)return su;Kv=1;var e=Bl(),t=yy(),n=zt();function r(i,o){return i==null?i:e(i,t(o),n)}return su=r,su}var uu,Xv;function jx(){if(Xv)return uu;Xv=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return uu=e,uu}var lu,Wv;function Yx(){if(Wv)return lu;Wv=1;var e=Tr(),t=Ll(),n=ft();function r(i,o){var a={};return o=n(o,3),t(i,function(s,u,c){e(a,u,o(s,u,c))}),a}return lu=r,lu}var cu,Zv;function Hl(){if(Zv)return cu;Zv=1;var e=rn();function t(n,r,i){for(var o=-1,a=n.length;++o<a;){var s=n[o],u=r(s);if(u!=null&&(c===void 0?u===u&&!e(u):i(u,c)))var c=u,l=s}return l}return cu=t,cu}var du,Jv;function Kx(){if(Jv)return du;Jv=1;function e(t,n){return t>n}return du=e,du}var fu,Qv;function Xx(){if(Qv)return fu;Qv=1;var e=Hl(),t=Kx(),n=Ft();function r(i){return i&&i.length?e(i,n,t):void 0}return fu=r,fu}var hu,ep;function Ky(){if(ep)return hu;ep=1;var e=Tr(),t=Qt();function n(r,i,o){(o!==void 0&&!t(r[i],o)||o===void 0&&!(i in r))&&e(r,i,o)}return hu=n,hu}var vu,tp;function Wx(){if(tp)return vu;tp=1;var e=Bt(),t=Pr(),n=Ze(),r="[object Object]",i=Function.prototype,o=Object.prototype,a=i.toString,s=o.hasOwnProperty,u=a.call(Object);function c(l){if(!n(l)||e(l)!=r)return!1;var d=t(l);if(d===null)return!0;var f=s.call(d,"constructor")&&d.constructor;return typeof f=="function"&&f instanceof f&&a.call(f)==u}return vu=c,vu}var pu,np;function Xy(){if(np)return pu;np=1;function e(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}return pu=e,pu}var gu,rp;function Zx(){if(rp)return gu;rp=1;var e=Cn(),t=zt();function n(r){return e(r,t(r))}return gu=n,gu}var yu,ip;function Jx(){if(ip)return yu;ip=1;var e=Ky(),t=iy(),n=hy(),r=oy(),i=py(),o=In(),a=Ie(),s=Ly(),u=tn(),c=xn(),l=ke(),d=Wx(),f=Nn(),h=Xy(),g=Zx();function v(y,w,m,C,S,P,M){var R=h(y,m),B=h(w,m),D=M.get(B);if(D){e(y,m,D);return}var A=P?P(R,B,m+"",y,w,M):void 0,b=A===void 0;if(b){var G=a(B),W=!G&&u(B),E=!G&&!W&&f(B);A=B,G||W||E?a(R)?A=R:s(R)?A=r(R):W?(b=!1,A=t(B,!0)):E?(b=!1,A=n(B,!0)):A=[]:d(B)||o(B)?(A=R,o(R)?A=g(R):(!l(R)||c(R))&&(A=i(B))):b=!1}b&&(M.set(B,A),S(A,B,C,P,M),M.delete(B)),e(y,m,A)}return yu=v,yu}var mu,op;function Qx(){if(op)return mu;op=1;var e=Nr(),t=Ky(),n=Bl(),r=Jx(),i=ke(),o=zt(),a=Xy();function s(u,c,l,d,f){u!==c&&n(c,function(h,g){if(f||(f=new e),i(h))r(u,c,g,l,s,d,f);else{var v=d?d(a(u,g),h,g+"",u,c,f):void 0;v===void 0&&(v=h),t(u,g,v)}},o)}return mu=s,mu}var _u,ap;function eC(){if(ap)return _u;ap=1;var e=Br(),t=Lr();function n(r){return e(function(i,o){var a=-1,s=o.length,u=s>1?o[s-1]:void 0,c=s>2?o[2]:void 0;for(u=r.length>3&&typeof u=="function"?(s--,u):void 0,c&&t(o[0],o[1],c)&&(u=s<3?void 0:u,s=1),i=Object(i);++a<s;){var l=o[a];l&&r(i,l,a,u)}return i})}return _u=n,_u}var bu,sp;function tC(){if(sp)return bu;sp=1;var e=Qx(),t=eC(),n=t(function(r,i,o){e(r,i,o)});return bu=n,bu}var wu,up;function Wy(){if(up)return wu;up=1;function e(t,n){return t<n}return wu=e,wu}var Eu,lp;function nC(){if(lp)return Eu;lp=1;var e=Hl(),t=Wy(),n=Ft();function r(i){return i&&i.length?e(i,n,t):void 0}return Eu=r,Eu}var Su,cp;function rC(){if(cp)return Su;cp=1;var e=Hl(),t=ft(),n=Wy();function r(i,o){return i&&i.length?e(i,t(o,2),n):void 0}return Su=r,Su}var xu,dp;function iC(){if(dp)return xu;dp=1;var e=Ge(),t=function(){return e.Date.now()};return xu=t,xu}var Cu,fp;function oC(){if(fp)return Cu;fp=1;var e=Rr(),t=Dr(),n=Ar(),r=ke(),i=Tn();function o(a,s,u,c){if(!r(a))return a;s=t(s,a);for(var l=-1,d=s.length,f=d-1,h=a;h!=null&&++l<d;){var g=i(s[l]),v=u;if(g==="__proto__"||g==="constructor"||g==="prototype")return a;if(l!=f){var y=h[g];v=c?c(y,g,h):void 0,v===void 0&&(v=r(y)?y:n(s[l+1])?[]:{})}e(h,g,v),h=h[g]}return a}return Cu=o,Cu}var Iu,hp;function aC(){if(hp)return Iu;hp=1;var e=$r(),t=oC(),n=Dr();function r(i,o,a){for(var s=-1,u=o.length,c={};++s<u;){var l=o[s],d=e(i,l);a(d,l)&&t(c,n(l,i),d)}return c}return Iu=r,Iu}var Nu,vp;function sC(){if(vp)return Nu;vp=1;var e=aC(),t=Ty();function n(r,i){return e(r,i,function(o,a){return t(r,a)})}return Nu=n,Nu}var Tu,pp;function uC(){if(pp)return Tu;pp=1;var e=Yy(),t=Dy(),n=$y();function r(i){return n(t(i,void 0,e),i+"")}return Tu=r,Tu}var Ru,gp;function lC(){if(gp)return Ru;gp=1;var e=sC(),t=uC(),n=t(function(r,i){return r==null?{}:e(r,i)});return Ru=n,Ru}var Au,yp;function cC(){if(yp)return Au;yp=1;var e=Math.ceil,t=Math.max;function n(r,i,o,a){for(var s=-1,u=t(e((i-r)/(o||1)),0),c=Array(u);u--;)c[a?u:++s]=r,r+=o;return c}return Au=n,Au}var qu,mp;function dC(){if(mp)return qu;mp=1;var e=cC(),t=Lr(),n=jy();function r(i){return function(o,a,s){return s&&typeof s!="number"&&t(o,a,s)&&(a=s=void 0),o=n(o),a===void 0?(a=o,o=0):a=n(a),s=s===void 0?o<a?1:-1:n(s),e(o,a,s,i)}}return qu=r,qu}var Mu,_p;function fC(){if(_p)return Mu;_p=1;var e=dC(),t=e();return Mu=t,Mu}var Pu,bp;function hC(){if(bp)return Pu;bp=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return Pu=e,Pu}var Ou,wp;function vC(){if(wp)return Ou;wp=1;var e=rn();function t(n,r){if(n!==r){var i=n!==void 0,o=n===null,a=n===n,s=e(n),u=r!==void 0,c=r===null,l=r===r,d=e(r);if(!c&&!d&&!s&&n>r||s&&u&&l&&!c&&!d||o&&u&&l||!i&&l||!a)return 1;if(!o&&!s&&!d&&n<r||d&&i&&a&&!o&&!s||c&&i&&a||!u&&a||!l)return-1}return 0}return Ou=t,Ou}var ku,Ep;function pC(){if(Ep)return ku;Ep=1;var e=vC();function t(n,r,i){for(var o=-1,a=n.criteria,s=r.criteria,u=a.length,c=i.length;++o<u;){var l=e(a[o],s[o]);if(l){if(o>=c)return l;var d=i[o];return l*(d=="desc"?-1:1)}}return n.index-r.index}return ku=t,ku}var Du,Sp;function gC(){if(Sp)return Du;Sp=1;var e=kr(),t=$r(),n=ft(),r=Py(),i=hC(),o=qr(),a=pC(),s=Ft(),u=Ie();function c(l,d,f){d.length?d=e(d,function(v){return u(v)?function(y){return t(y,v.length===1?v[0]:v)}:v}):d=[s];var h=-1;d=e(d,o(n));var g=r(l,function(v,y,w){var m=e(d,function(C){return C(v)});return{criteria:m,index:++h,value:v}});return i(g,function(v,y){return a(v,y,f)})}return Du=c,Du}var $u,xp;function yC(){if(xp)return $u;xp=1;var e=Gl(),t=gC(),n=Br(),r=Lr(),i=n(function(o,a){if(o==null)return[];var s=a.length;return s>1&&r(o,a[0],a[1])?a=[]:s>2&&r(a[0],a[1],a[2])&&(a=[a[0]]),t(o,e(a,1),[])});return $u=i,$u}var Bu,Cp;function mC(){if(Cp)return Bu;Cp=1;var e=Iy(),t=0;function n(r){var i=++t;return e(r)+i}return Bu=n,Bu}var Lu,Ip;function _C(){if(Ip)return Lu;Ip=1;function e(t,n,r){for(var i=-1,o=t.length,a=n.length,s={};++i<o;){var u=i<a?n[i]:void 0;r(s,t[i],u)}return s}return Lu=e,Lu}var zu,Np;function bC(){if(Np)return zu;Np=1;var e=Rr(),t=_C();function n(r,i){return t(r||[],i||[],e)}return zu=n,zu}var ur;if(typeof gl=="function")try{ur={cloneDeep:Dx(),constant:$l(),defaults:$x(),each:_y(),filter:Ay(),find:Hx(),flatten:Yy(),forEach:my(),forIn:Ux(),has:qy(),isUndefined:My(),last:jx(),map:Oy(),mapValues:Yx(),max:Xx(),merge:tC(),min:nC(),minBy:rC(),now:iC(),pick:lC(),range:fC(),reduce:ky(),sortBy:yC(),uniqueId:mC(),values:zy(),zipObject:bC()}}catch{}ur||(ur=window._);var Se=ur,wC=zr;function zr(){var e={};e._next=e._prev=e,this._sentinel=e}zr.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return Zy(t),t};zr.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&Zy(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t};zr.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,EC)),n=n._prev;return"["+e.join(", ")+"]"};function Zy(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function EC(e,t){if(e!=="_next"&&e!=="_prev")return t}var it=Se,SC=Ve.Graph,xC=wC,CC=NC,IC=it.constant(1);function NC(e,t){if(e.nodeCount()<=1)return[];var n=RC(e,t||IC),r=TC(n.graph,n.buckets,n.zeroIdx);return it.flatten(it.map(r,function(i){return e.outEdges(i.v,i.w)}),!0)}function TC(e,t,n){for(var r=[],i=t[t.length-1],o=t[0],a;e.nodeCount();){for(;a=o.dequeue();)Fu(e,t,n,a);for(;a=i.dequeue();)Fu(e,t,n,a);if(e.nodeCount()){for(var s=t.length-2;s>0;--s)if(a=t[s].dequeue(),a){r=r.concat(Fu(e,t,n,a,!0));break}}}return r}function Fu(e,t,n,r,i){var o=i?[]:void 0;return it.forEach(e.inEdges(r.v),function(a){var s=e.edge(a),u=e.node(a.v);i&&o.push({v:a.v,w:a.w}),u.out-=s,dl(t,n,u)}),it.forEach(e.outEdges(r.v),function(a){var s=e.edge(a),u=a.w,c=e.node(u);c.in-=s,dl(t,n,c)}),e.removeNode(r.v),o}function RC(e,t){var n=new SC,r=0,i=0;it.forEach(e.nodes(),function(s){n.setNode(s,{v:s,in:0,out:0})}),it.forEach(e.edges(),function(s){var u=n.edge(s.v,s.w)||0,c=t(s),l=u+c;n.setEdge(s.v,s.w,l),i=Math.max(i,n.node(s.v).out+=c),r=Math.max(r,n.node(s.w).in+=c)});var o=it.range(i+r+3).map(function(){return new xC}),a=r+1;return it.forEach(n.nodes(),function(s){dl(o,a,n.node(s))}),{graph:n,buckets:o,zeroIdx:a}}function dl(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}var At=Se,AC=CC,qC={run:MC,undo:OC};function MC(e){var t=e.graph().acyclicer==="greedy"?AC(e,n(e)):PC(e);At.forEach(t,function(r){var i=e.edge(r);e.removeEdge(r),i.forwardName=r.name,i.reversed=!0,e.setEdge(r.w,r.v,i,At.uniqueId("rev"))});function n(r){return function(i){return r.edge(i).weight}}}function PC(e){var t=[],n={},r={};function i(o){At.has(r,o)||(r[o]=!0,n[o]=!0,At.forEach(e.outEdges(o),function(a){At.has(n,a.w)?t.push(a):i(a.w)}),delete n[o])}return At.forEach(e.nodes(),i),t}function OC(e){At.forEach(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}var pe=Se,Jy=Ve.Graph,Ae={addDummyNode:Qy,simplify:kC,asNonCompoundGraph:DC,successorWeights:$C,predecessorWeights:BC,intersectRect:LC,buildLayerMatrix:zC,normalizeRanks:FC,removeEmptyRanks:GC,addBorderNode:VC,maxRank:em,partition:HC,time:UC,notime:jC};function Qy(e,t,n,r){var i;do i=pe.uniqueId(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function kC(e){var t=new Jy().setGraph(e.graph());return pe.forEach(e.nodes(),function(n){t.setNode(n,e.node(n))}),pe.forEach(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function DC(e){var t=new Jy({multigraph:e.isMultigraph()}).setGraph(e.graph());return pe.forEach(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),pe.forEach(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function $C(e){var t=pe.map(e.nodes(),function(n){var r={};return pe.forEach(e.outEdges(n),function(i){r[i.w]=(r[i.w]||0)+e.edge(i).weight}),r});return pe.zipObject(e.nodes(),t)}function BC(e){var t=pe.map(e.nodes(),function(n){var r={};return pe.forEach(e.inEdges(n),function(i){r[i.v]=(r[i.v]||0)+e.edge(i).weight}),r});return pe.zipObject(e.nodes(),t)}function LC(e,t){var n=e.x,r=e.y,i=t.x-n,o=t.y-r,a=e.width/2,s=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var u,c;return Math.abs(o)*a>Math.abs(i)*s?(o<0&&(s=-s),u=s*i/o,c=s):(i<0&&(a=-a),u=a,c=a*o/i),{x:n+u,y:r+c}}function zC(e){var t=pe.map(pe.range(em(e)+1),function(){return[]});return pe.forEach(e.nodes(),function(n){var r=e.node(n),i=r.rank;pe.isUndefined(i)||(t[i][r.order]=n)}),t}function FC(e){var t=pe.min(pe.map(e.nodes(),function(n){return e.node(n).rank}));pe.forEach(e.nodes(),function(n){var r=e.node(n);pe.has(r,"rank")&&(r.rank-=t)})}function GC(e){var t=pe.min(pe.map(e.nodes(),function(o){return e.node(o).rank})),n=[];pe.forEach(e.nodes(),function(o){var a=e.node(o).rank-t;n[a]||(n[a]=[]),n[a].push(o)});var r=0,i=e.graph().nodeRankFactor;pe.forEach(n,function(o,a){pe.isUndefined(o)&&a%i!==0?--r:r&&pe.forEach(o,function(s){e.node(s).rank+=r})})}function VC(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),Qy(e,"border",i,t)}function em(e){return pe.max(pe.map(e.nodes(),function(t){var n=e.node(t).rank;if(!pe.isUndefined(n))return n}))}function HC(e,t){var n={lhs:[],rhs:[]};return pe.forEach(e,function(r){t(r)?n.lhs.push(r):n.rhs.push(r)}),n}function UC(e,t){var n=pe.now();try{return t()}finally{console.log(e+" time: "+(pe.now()-n)+"ms")}}function jC(e,t){return t()}var tm=Se,YC=Ae,KC={run:XC,undo:ZC};function XC(e){e.graph().dummyChains=[],tm.forEach(e.edges(),function(t){WC(e,t)})}function WC(e,t){var n=t.v,r=e.node(n).rank,i=t.w,o=e.node(i).rank,a=t.name,s=e.edge(t),u=s.labelRank;if(o!==r+1){e.removeEdge(t);var c,l,d;for(d=0,++r;r<o;++d,++r)s.points=[],l={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},c=YC.addDummyNode(e,"edge",l,"_d"),r===u&&(l.width=s.width,l.height=s.height,l.dummy="edge-label",l.labelpos=s.labelpos),e.setEdge(n,c,{weight:s.weight},a),d===0&&e.graph().dummyChains.push(c),n=c;e.setEdge(n,i,{weight:s.weight},a)}}function ZC(e){tm.forEach(e.graph().dummyChains,function(t){var n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy==="edge-label"&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}var Vn=Se,Fr={longestPath:JC,slack:QC};function JC(e){var t={};function n(r){var i=e.node(r);if(Vn.has(t,r))return i.rank;t[r]=!0;var o=Vn.min(Vn.map(e.outEdges(r),function(a){return n(a.w)-e.edge(a).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),i.rank=o}Vn.forEach(e.sources(),n)}function QC(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var lr=Se,eI=Ve.Graph,cr=Fr.slack,nm=tI;function tI(e){var t=new eI({directed:!1}),n=e.nodes()[0],r=e.nodeCount();t.setNode(n,{});for(var i,o;nI(t,e)<r;)i=rI(t,e),o=t.hasNode(i.v)?cr(e,i):-cr(e,i),iI(t,e,o);return t}function nI(e,t){function n(r){lr.forEach(t.nodeEdges(r),function(i){var o=i.v,a=r===o?i.w:o;!e.hasNode(a)&&!cr(t,i)&&(e.setNode(a,{}),e.setEdge(r,a,{}),n(a))})}return lr.forEach(e.nodes(),n),e.nodeCount()}function rI(e,t){return lr.minBy(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return cr(t,n)})}function iI(e,t,n){lr.forEach(e.nodes(),function(r){t.node(r).rank+=n})}var lt=Se,oI=nm,aI=Fr.slack,sI=Fr.longestPath,uI=Ve.alg.preorder,lI=Ve.alg.postorder,cI=Ae.simplify,dI=Gt;Gt.initLowLimValues=jl;Gt.initCutValues=Ul;Gt.calcCutValue=rm;Gt.leaveEdge=om;Gt.enterEdge=am;Gt.exchangeEdges=sm;function Gt(e){e=cI(e),sI(e);var t=oI(e);jl(t),Ul(t,e);for(var n,r;n=om(t);)r=am(t,e,n),sm(t,e,n,r)}function Ul(e,t){var n=lI(e,e.nodes());n=n.slice(0,n.length-1),lt.forEach(n,function(r){fI(e,t,r)})}function fI(e,t,n){var r=e.node(n),i=r.parent;e.edge(n,i).cutvalue=rm(e,t,n)}function rm(e,t,n){var r=e.node(n),i=r.parent,o=!0,a=t.edge(n,i),s=0;return a||(o=!1,a=t.edge(i,n)),s=a.weight,lt.forEach(t.nodeEdges(n),function(u){var c=u.v===n,l=c?u.w:u.v;if(l!==i){var d=c===o,f=t.edge(u).weight;if(s+=d?f:-f,vI(e,n,l)){var h=e.edge(n,l).cutvalue;s+=d?-h:h}}}),s}function jl(e,t){arguments.length<2&&(t=e.nodes()[0]),im(e,{},1,t)}function im(e,t,n,r,i){var o=n,a=e.node(r);return t[r]=!0,lt.forEach(e.neighbors(r),function(s){lt.has(t,s)||(n=im(e,t,n,s,r))}),a.low=o,a.lim=n++,i?a.parent=i:delete a.parent,n}function om(e){return lt.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function am(e,t,n){var r=n.v,i=n.w;t.hasEdge(r,i)||(r=n.w,i=n.v);var o=e.node(r),a=e.node(i),s=o,u=!1;o.lim>a.lim&&(s=a,u=!0);var c=lt.filter(t.edges(),function(l){return u===Tp(e,e.node(l.v),s)&&u!==Tp(e,e.node(l.w),s)});return lt.minBy(c,function(l){return aI(t,l)})}function sm(e,t,n,r){var i=n.v,o=n.w;e.removeEdge(i,o),e.setEdge(r.v,r.w,{}),jl(e),Ul(e,t),hI(e,t)}function hI(e,t){var n=lt.find(e.nodes(),function(i){return!t.node(i).parent}),r=uI(e,n);r=r.slice(1),lt.forEach(r,function(i){var o=e.node(i).parent,a=t.edge(i,o),s=!1;a||(a=t.edge(o,i),s=!0),t.node(i).rank=t.node(o).rank+(s?a.minlen:-a.minlen)})}function vI(e,t,n){return e.hasEdge(t,n)}function Tp(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var pI=Fr,um=pI.longestPath,gI=nm,yI=dI,mI=_I;function _I(e){switch(e.graph().ranker){case"network-simplex":Rp(e);break;case"tight-tree":wI(e);break;case"longest-path":bI(e);break;default:Rp(e)}}var bI=um;function wI(e){um(e),gI(e)}function Rp(e){yI(e)}var fl=Se,EI=SI;function SI(e){var t=CI(e);fl.forEach(e.graph().dummyChains,function(n){for(var r=e.node(n),i=r.edgeObj,o=xI(e,t,i.v,i.w),a=o.path,s=o.lca,u=0,c=a[u],l=!0;n!==i.w;){if(r=e.node(n),l){for(;(c=a[u])!==s&&e.node(c).maxRank<r.rank;)u++;c===s&&(l=!1)}if(!l){for(;u<a.length-1&&e.node(c=a[u+1]).minRank<=r.rank;)u++;c=a[u]}e.setParent(n,c),n=e.successors(n)[0]}})}function xI(e,t,n,r){var i=[],o=[],a=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),u,c;u=n;do u=e.parent(u),i.push(u);while(u&&(t[u].low>a||s>t[u].lim));for(c=u,u=r;(u=e.parent(u))!==c;)o.push(u);return{path:i.concat(o.reverse()),lca:c}}function CI(e){var t={},n=0;function r(i){var o=n;fl.forEach(e.children(i),r),t[i]={low:o,lim:n++}}return fl.forEach(e.children(),r),t}var ot=Se,hl=Ae,II={run:NI,cleanup:AI};function NI(e){var t=hl.addDummyNode(e,"root",{},"_root"),n=TI(e),r=ot.max(ot.values(n))-1,i=2*r+1;e.graph().nestingRoot=t,ot.forEach(e.edges(),function(a){e.edge(a).minlen*=i});var o=RI(e)+1;ot.forEach(e.children(),function(a){lm(e,t,i,o,r,n,a)}),e.graph().nodeRankFactor=i}function lm(e,t,n,r,i,o,a){var s=e.children(a);if(!s.length){a!==t&&e.setEdge(t,a,{weight:0,minlen:n});return}var u=hl.addBorderNode(e,"_bt"),c=hl.addBorderNode(e,"_bb"),l=e.node(a);e.setParent(u,a),l.borderTop=u,e.setParent(c,a),l.borderBottom=c,ot.forEach(s,function(d){lm(e,t,n,r,i,o,d);var f=e.node(d),h=f.borderTop?f.borderTop:d,g=f.borderBottom?f.borderBottom:d,v=f.borderTop?r:2*r,y=h!==g?1:i-o[a]+1;e.setEdge(u,h,{weight:v,minlen:y,nestingEdge:!0}),e.setEdge(g,c,{weight:v,minlen:y,nestingEdge:!0})}),e.parent(a)||e.setEdge(t,u,{weight:0,minlen:i+o[a]})}function TI(e){var t={};function n(r,i){var o=e.children(r);o&&o.length&&ot.forEach(o,function(a){n(a,i+1)}),t[r]=i}return ot.forEach(e.children(),function(r){n(r,1)}),t}function RI(e){return ot.reduce(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function AI(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,ot.forEach(e.edges(),function(n){var r=e.edge(n);r.nestingEdge&&e.removeEdge(n)})}var Gu=Se,qI=Ae,MI=PI;function PI(e){function t(n){var r=e.children(n),i=e.node(n);if(r.length&&Gu.forEach(r,t),Gu.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var o=i.minRank,a=i.maxRank+1;o<a;++o)Ap(e,"borderLeft","_bl",n,i,o),Ap(e,"borderRight","_br",n,i,o)}}Gu.forEach(e.children(),t)}function Ap(e,t,n,r,i,o){var a={width:0,height:0,rank:o,borderType:t},s=i[t][o-1],u=qI.addDummyNode(e,"border",a,n);i[t][o]=u,e.setParent(u,r),s&&e.setEdge(s,u,{weight:1})}var Ye=Se,OI={adjust:kI,undo:DI};function kI(e){var t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&cm(e)}function DI(e){var t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&$I(e),(t==="lr"||t==="rl")&&(BI(e),cm(e))}function cm(e){Ye.forEach(e.nodes(),function(t){qp(e.node(t))}),Ye.forEach(e.edges(),function(t){qp(e.edge(t))})}function qp(e){var t=e.width;e.width=e.height,e.height=t}function $I(e){Ye.forEach(e.nodes(),function(t){Vu(e.node(t))}),Ye.forEach(e.edges(),function(t){var n=e.edge(t);Ye.forEach(n.points,Vu),Ye.has(n,"y")&&Vu(n)})}function Vu(e){e.y=-e.y}function BI(e){Ye.forEach(e.nodes(),function(t){Hu(e.node(t))}),Ye.forEach(e.edges(),function(t){var n=e.edge(t);Ye.forEach(n.points,Hu),Ye.has(n,"x")&&Hu(n)})}function Hu(e){var t=e.x;e.x=e.y,e.y=t}var et=Se,LI=zI;function zI(e){var t={},n=et.filter(e.nodes(),function(s){return!e.children(s).length}),r=et.max(et.map(n,function(s){return e.node(s).rank})),i=et.map(et.range(r+1),function(){return[]});function o(s){if(!et.has(t,s)){t[s]=!0;var u=e.node(s);i[u.rank].push(s),et.forEach(e.successors(s),o)}}var a=et.sortBy(n,function(s){return e.node(s).rank});return et.forEach(a,o),i}var gt=Se,FI=GI;function GI(e,t){for(var n=0,r=1;r<t.length;++r)n+=VI(e,t[r-1],t[r]);return n}function VI(e,t,n){for(var r=gt.zipObject(n,gt.map(n,function(c,l){return l})),i=gt.flatten(gt.map(t,function(c){return gt.sortBy(gt.map(e.outEdges(c),function(l){return{pos:r[l.w],weight:e.edge(l).weight}}),"pos")}),!0),o=1;o<n.length;)o<<=1;var a=2*o-1;o-=1;var s=gt.map(new Array(a),function(){return 0}),u=0;return gt.forEach(i.forEach(function(c){var l=c.pos+o;s[l]+=c.weight;for(var d=0;l>0;)l%2&&(d+=s[l+1]),l=l-1>>1,s[l]+=c.weight;u+=c.weight*d})),u}var Mp=Se,HI=UI;function UI(e,t){return Mp.map(t,function(n){var r=e.inEdges(n);if(r.length){var i=Mp.reduce(r,function(o,a){var s=e.edge(a),u=e.node(a.v);return{sum:o.sum+s.weight*u.order,weight:o.weight+s.weight}},{sum:0,weight:0});return{v:n,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:n}})}var qe=Se,jI=YI;function YI(e,t){var n={};qe.forEach(e,function(i,o){var a=n[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};qe.isUndefined(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),qe.forEach(t.edges(),function(i){var o=n[i.v],a=n[i.w];!qe.isUndefined(o)&&!qe.isUndefined(a)&&(a.indegree++,o.out.push(n[i.w]))});var r=qe.filter(n,function(i){return!i.indegree});return KI(r)}function KI(e){var t=[];function n(o){return function(a){a.merged||(qe.isUndefined(a.barycenter)||qe.isUndefined(o.barycenter)||a.barycenter>=o.barycenter)&&XI(o,a)}}function r(o){return function(a){a.in.push(o),--a.indegree===0&&e.push(a)}}for(;e.length;){var i=e.pop();t.push(i),qe.forEach(i.in.reverse(),n(i)),qe.forEach(i.out,r(i))}return qe.map(qe.filter(t,function(o){return!o.merged}),function(o){return qe.pick(o,["vs","i","barycenter","weight"])})}function XI(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}var cn=Se,WI=Ae,ZI=JI;function JI(e,t){var n=WI.partition(e,function(l){return cn.has(l,"barycenter")}),r=n.lhs,i=cn.sortBy(n.rhs,function(l){return-l.i}),o=[],a=0,s=0,u=0;r.sort(QI(!!t)),u=Pp(o,i,u),cn.forEach(r,function(l){u+=l.vs.length,o.push(l.vs),a+=l.barycenter*l.weight,s+=l.weight,u=Pp(o,i,u)});var c={vs:cn.flatten(o,!0)};return s&&(c.barycenter=a/s,c.weight=s),c}function Pp(e,t,n){for(var r;t.length&&(r=cn.last(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}function QI(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}var bt=Se,eN=HI,tN=jI,nN=ZI,rN=dm;function dm(e,t,n,r){var i=e.children(t),o=e.node(t),a=o?o.borderLeft:void 0,s=o?o.borderRight:void 0,u={};a&&(i=bt.filter(i,function(g){return g!==a&&g!==s}));var c=eN(e,i);bt.forEach(c,function(g){if(e.children(g.v).length){var v=dm(e,g.v,n,r);u[g.v]=v,bt.has(v,"barycenter")&&oN(g,v)}});var l=tN(c,n);iN(l,u);var d=nN(l,r);if(a&&(d.vs=bt.flatten([a,d.vs,s],!0),e.predecessors(a).length)){var f=e.node(e.predecessors(a)[0]),h=e.node(e.predecessors(s)[0]);bt.has(d,"barycenter")||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+f.order+h.order)/(d.weight+2),d.weight+=2}return d}function iN(e,t){bt.forEach(e,function(n){n.vs=bt.flatten(n.vs.map(function(r){return t[r]?t[r].vs:r}),!0)})}function oN(e,t){bt.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var dn=Se,aN=Ve.Graph,sN=uN;function uN(e,t,n){var r=lN(e),i=new aN({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(function(o){return e.node(o)});return dn.forEach(e.nodes(),function(o){var a=e.node(o),s=e.parent(o);(a.rank===t||a.minRank<=t&&t<=a.maxRank)&&(i.setNode(o),i.setParent(o,s||r),dn.forEach(e[n](o),function(u){var c=u.v===o?u.w:u.v,l=i.edge(c,o),d=dn.isUndefined(l)?0:l.weight;i.setEdge(c,o,{weight:e.edge(u).weight+d})}),dn.has(a,"minRank")&&i.setNode(o,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]}))}),i}function lN(e){for(var t;e.hasNode(t=dn.uniqueId("_root")););return t}var cN=Se,dN=fN;function fN(e,t,n){var r={},i;cN.forEach(n,function(o){for(var a=e.parent(o),s,u;a;){if(s=e.parent(a),s?(u=r[s],r[s]=a):(u=i,i=a),u&&u!==a){t.setEdge(u,a);return}a=s}})}var Et=Se,hN=LI,vN=FI,pN=rN,gN=sN,yN=dN,mN=Ve.Graph,Op=Ae,_N=bN;function bN(e){var t=Op.maxRank(e),n=kp(e,Et.range(1,t+1),"inEdges"),r=kp(e,Et.range(t-1,-1,-1),"outEdges"),i=hN(e);Dp(e,i);for(var o=Number.POSITIVE_INFINITY,a,s=0,u=0;u<4;++s,++u){wN(s%2?n:r,s%4>=2),i=Op.buildLayerMatrix(e);var c=vN(e,i);c<o&&(u=0,a=Et.cloneDeep(i),o=c)}Dp(e,a)}function kp(e,t,n){return Et.map(t,function(r){return gN(e,r,n)})}function wN(e,t){var n=new mN;Et.forEach(e,function(r){var i=r.graph().root,o=pN(r,i,n,t);Et.forEach(o.vs,function(a,s){r.node(a).order=s}),yN(r,n,o.vs)})}function Dp(e,t){Et.forEach(t,function(n){Et.forEach(n,function(r,i){e.node(r).order=i})})}var oe=Se,EN=Ve.Graph,SN=Ae,xN={positionX:NN,findType1Conflicts:fm,findType2Conflicts:hm,addConflict:Yl,hasConflict:vm,verticalAlignment:pm,horizontalCompaction:gm,alignCoordinates:mm,findSmallestWidthAlignment:ym,balance:_m};function fm(e,t){var n={};function r(i,o){var a=0,s=0,u=i.length,c=oe.last(o);return oe.forEach(o,function(l,d){var f=CN(e,l),h=f?e.node(f).order:u;(f||l===c)&&(oe.forEach(o.slice(s,d+1),function(g){oe.forEach(e.predecessors(g),function(v){var y=e.node(v),w=y.order;(w<a||h<w)&&!(y.dummy&&e.node(g).dummy)&&Yl(n,v,g)})}),s=d+1,a=h)}),o}return oe.reduce(t,r),n}function hm(e,t){var n={};function r(o,a,s,u,c){var l;oe.forEach(oe.range(a,s),function(d){l=o[d],e.node(l).dummy&&oe.forEach(e.predecessors(l),function(f){var h=e.node(f);h.dummy&&(h.order<u||h.order>c)&&Yl(n,f,l)})})}function i(o,a){var s=-1,u,c=0;return oe.forEach(a,function(l,d){if(e.node(l).dummy==="border"){var f=e.predecessors(l);f.length&&(u=e.node(f[0]).order,r(a,c,d,s,u),c=d,s=u)}r(a,c,a.length,u,o.length)}),a}return oe.reduce(t,i),n}function CN(e,t){if(e.node(t).dummy)return oe.find(e.predecessors(t),function(n){return e.node(n).dummy})}function Yl(e,t,n){if(t>n){var r=t;t=n,n=r}var i=e[t];i||(e[t]=i={}),i[n]=!0}function vm(e,t,n){if(t>n){var r=t;t=n,n=r}return oe.has(e[t],n)}function pm(e,t,n,r){var i={},o={},a={};return oe.forEach(t,function(s){oe.forEach(s,function(u,c){i[u]=u,o[u]=u,a[u]=c})}),oe.forEach(t,function(s){var u=-1;oe.forEach(s,function(c){var l=r(c);if(l.length){l=oe.sortBy(l,function(v){return a[v]});for(var d=(l.length-1)/2,f=Math.floor(d),h=Math.ceil(d);f<=h;++f){var g=l[f];o[c]===c&&u<a[g]&&!vm(n,c,g)&&(o[g]=c,o[c]=i[c]=i[g],u=a[g])}}})}),{root:i,align:o}}function gm(e,t,n,r,i){var o={},a=IN(e,t,n,i),s=i?"borderLeft":"borderRight";function u(d,f){for(var h=a.nodes(),g=h.pop(),v={};g;)v[g]?d(g):(v[g]=!0,h.push(g),h=h.concat(f(g))),g=h.pop()}function c(d){o[d]=a.inEdges(d).reduce(function(f,h){return Math.max(f,o[h.v]+a.edge(h))},0)}function l(d){var f=a.outEdges(d).reduce(function(g,v){return Math.min(g,o[v.w]-a.edge(v))},Number.POSITIVE_INFINITY),h=e.node(d);f!==Number.POSITIVE_INFINITY&&h.borderType!==s&&(o[d]=Math.max(o[d],f))}return u(c,a.predecessors.bind(a)),u(l,a.successors.bind(a)),oe.forEach(r,function(d){o[d]=o[n[d]]}),o}function IN(e,t,n,r){var i=new EN,o=e.graph(),a=TN(o.nodesep,o.edgesep,r);return oe.forEach(t,function(s){var u;oe.forEach(s,function(c){var l=n[c];if(i.setNode(l),u){var d=n[u],f=i.edge(d,l);i.setEdge(d,l,Math.max(a(e,c,u),f||0))}u=c})}),i}function ym(e,t){return oe.minBy(oe.values(t),function(n){var r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return oe.forIn(n,function(o,a){var s=RN(e,a)/2;r=Math.max(o+s,r),i=Math.min(o-s,i)}),r-i})}function mm(e,t){var n=oe.values(t),r=oe.min(n),i=oe.max(n);oe.forEach(["u","d"],function(o){oe.forEach(["l","r"],function(a){var s=o+a,u=e[s],c;if(u!==t){var l=oe.values(u);c=a==="l"?r-oe.min(l):i-oe.max(l),c&&(e[s]=oe.mapValues(u,function(d){return d+c}))}})})}function _m(e,t){return oe.mapValues(e.ul,function(n,r){if(t)return e[t.toLowerCase()][r];var i=oe.sortBy(oe.map(e,r));return(i[1]+i[2])/2})}function NN(e){var t=SN.buildLayerMatrix(e),n=oe.merge(fm(e,t),hm(e,t)),r={},i;oe.forEach(["u","d"],function(a){i=a==="u"?t:oe.values(t).reverse(),oe.forEach(["l","r"],function(s){s==="r"&&(i=oe.map(i,function(d){return oe.values(d).reverse()}));var u=(a==="u"?e.predecessors:e.successors).bind(e),c=pm(e,i,n,u),l=gm(e,i,c.root,c.align,s==="r");s==="r"&&(l=oe.mapValues(l,function(d){return-d})),r[a+s]=l})});var o=ym(e,r);return mm(r,o),_m(r,e.graph().align)}function TN(e,t,n){return function(r,i,o){var a=r.node(i),s=r.node(o),u=0,c;if(u+=a.width/2,oe.has(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":c=-a.width/2;break;case"r":c=a.width/2;break}if(c&&(u+=n?c:-c),c=0,u+=(a.dummy?t:e)/2,u+=(s.dummy?t:e)/2,u+=s.width/2,oe.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":c=s.width/2;break;case"r":c=-s.width/2;break}return c&&(u+=n?c:-c),c=0,u}}function RN(e,t){return e.node(t).width}var fn=Se,bm=Ae,AN=xN.positionX,qN=MN;function MN(e){e=bm.asNonCompoundGraph(e),PN(e),fn.forEach(AN(e),function(t,n){e.node(n).x=t})}function PN(e){var t=bm.buildLayerMatrix(e),n=e.graph().ranksep,r=0;fn.forEach(t,function(i){var o=fn.max(fn.map(i,function(a){return e.node(a).height}));fn.forEach(i,function(a){e.node(a).y=r+o/2}),r+=o+n})}var ue=Se,$p=qC,Bp=KC,ON=mI,kN=Ae.normalizeRanks,DN=EI,$N=Ae.removeEmptyRanks,Lp=II,BN=MI,zp=OI,LN=_N,zN=qN,xt=Ae,FN=Ve.Graph,GN=VN;function VN(e,t){var n=t&&t.debugTiming?xt.time:xt.notime;n("layout",function(){var r=n(" buildLayoutGraph",function(){return eT(e)});n(" runLayout",function(){HN(r,n)}),n(" updateInputGraph",function(){UN(e,r)})})}function HN(e,t){t(" makeSpaceForEdgeLabels",function(){tT(e)}),t(" removeSelfEdges",function(){cT(e)}),t(" acyclic",function(){$p.run(e)}),t(" nestingGraph.run",function(){Lp.run(e)}),t(" rank",function(){ON(xt.asNonCompoundGraph(e))}),t(" injectEdgeLabelProxies",function(){nT(e)}),t(" removeEmptyRanks",function(){$N(e)}),t(" nestingGraph.cleanup",function(){Lp.cleanup(e)}),t(" normalizeRanks",function(){kN(e)}),t(" assignRankMinMax",function(){rT(e)}),t(" removeEdgeLabelProxies",function(){iT(e)}),t(" normalize.run",function(){Bp.run(e)}),t(" parentDummyChains",function(){DN(e)}),t(" addBorderSegments",function(){BN(e)}),t(" order",function(){LN(e)}),t(" insertSelfEdges",function(){dT(e)}),t(" adjustCoordinateSystem",function(){zp.adjust(e)}),t(" position",function(){zN(e)}),t(" positionSelfEdges",function(){fT(e)}),t(" removeBorderNodes",function(){lT(e)}),t(" normalize.undo",function(){Bp.undo(e)}),t(" fixupEdgeLabelCoords",function(){sT(e)}),t(" undoCoordinateSystem",function(){zp.undo(e)}),t(" translateGraph",function(){oT(e)}),t(" assignNodeIntersects",function(){aT(e)}),t(" reversePoints",function(){uT(e)}),t(" acyclic.undo",function(){$p.undo(e)})}function UN(e,t){ue.forEach(e.nodes(),function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))}),ue.forEach(e.edges(),function(n){var r=e.edge(n),i=t.edge(n);r.points=i.points,ue.has(i,"x")&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var jN=["nodesep","edgesep","ranksep","marginx","marginy"],YN={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},KN=["acyclicer","ranker","rankdir","align"],XN=["width","height"],WN={width:0,height:0},ZN=["minlen","weight","width","height","labeloffset"],JN={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},QN=["labelpos"];function eT(e){var t=new FN({multigraph:!0,compound:!0}),n=ju(e.graph());return t.setGraph(ue.merge({},YN,Uu(n,jN),ue.pick(n,KN))),ue.forEach(e.nodes(),function(r){var i=ju(e.node(r));t.setNode(r,ue.defaults(Uu(i,XN),WN)),t.setParent(r,e.parent(r))}),ue.forEach(e.edges(),function(r){var i=ju(e.edge(r));t.setEdge(r,ue.merge({},JN,Uu(i,ZN),ue.pick(i,QN)))}),t}function tT(e){var t=e.graph();t.ranksep/=2,ue.forEach(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function nT(e){ue.forEach(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),i=e.node(t.w),o={rank:(i.rank-r.rank)/2+r.rank,e:t};xt.addDummyNode(e,"edge-proxy",o,"_ep")}})}function rT(e){var t=0;ue.forEach(e.nodes(),function(n){var r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=ue.max(t,r.maxRank))}),e.graph().maxRank=t}function iT(e){ue.forEach(e.nodes(),function(t){var n=e.node(t);n.dummy==="edge-proxy"&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function oT(e){var t=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,i=0,o=e.graph(),a=o.marginx||0,s=o.marginy||0;function u(c){var l=c.x,d=c.y,f=c.width,h=c.height;t=Math.min(t,l-f/2),n=Math.max(n,l+f/2),r=Math.min(r,d-h/2),i=Math.max(i,d+h/2)}ue.forEach(e.nodes(),function(c){u(e.node(c))}),ue.forEach(e.edges(),function(c){var l=e.edge(c);ue.has(l,"x")&&u(l)}),t-=a,r-=s,ue.forEach(e.nodes(),function(c){var l=e.node(c);l.x-=t,l.y-=r}),ue.forEach(e.edges(),function(c){var l=e.edge(c);ue.forEach(l.points,function(d){d.x-=t,d.y-=r}),ue.has(l,"x")&&(l.x-=t),ue.has(l,"y")&&(l.y-=r)}),o.width=n-t+a,o.height=i-r+s}function aT(e){ue.forEach(e.edges(),function(t){var n=e.edge(t),r=e.node(t.v),i=e.node(t.w),o,a;n.points?(o=n.points[0],a=n.points[n.points.length-1]):(n.points=[],o=i,a=r),n.points.unshift(xt.intersectRect(r,o)),n.points.push(xt.intersectRect(i,a))})}function sT(e){ue.forEach(e.edges(),function(t){var n=e.edge(t);if(ue.has(n,"x"))switch((n.labelpos==="l"||n.labelpos==="r")&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}})}function uT(e){ue.forEach(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function lT(e){ue.forEach(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),o=e.node(ue.last(n.borderLeft)),a=e.node(ue.last(n.borderRight));n.width=Math.abs(a.x-o.x),n.height=Math.abs(i.y-r.y),n.x=o.x+n.width/2,n.y=r.y+n.height/2}}),ue.forEach(e.nodes(),function(t){e.node(t).dummy==="border"&&e.removeNode(t)})}function cT(e){ue.forEach(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function dT(e){var t=xt.buildLayerMatrix(e);ue.forEach(t,function(n){var r=0;ue.forEach(n,function(i,o){var a=e.node(i);a.order=o+r,ue.forEach(a.selfEdges,function(s){xt.addDummyNode(e,"selfedge",{width:s.label.width,height:s.label.height,rank:a.rank,order:o+ ++r,e:s.e,label:s.label},"_se")}),delete a.selfEdges})})}function fT(e){ue.forEach(e.nodes(),function(t){var n=e.node(t);if(n.dummy==="selfedge"){var r=e.node(n.e.v),i=r.x+r.width/2,o=r.y,a=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*a/3,y:o-s},{x:i+5*a/6,y:o-s},{x:i+a,y:o},{x:i+5*a/6,y:o+s},{x:i+2*a/3,y:o+s}],n.label.x=n.x,n.label.y=n.y}})}function Uu(e,t){return ue.mapValues(ue.pick(e,t),Number)}function ju(e){var t={};return ue.forEach(e,function(n,r){t[r.toLowerCase()]=n}),t}var Hn=Se,hT=Ae,vT=Ve.Graph,pT={debugOrdering:gT};function gT(e){var t=hT.buildLayerMatrix(e),n=new vT({compound:!0,multigraph:!0}).setGraph({});return Hn.forEach(e.nodes(),function(r){n.setNode(r,{label:r}),n.setParent(r,"layer"+e.node(r).rank)}),Hn.forEach(e.edges(),function(r){n.setEdge(r.v,r.w,{},r.name)}),Hn.forEach(t,function(r,i){var o="layer"+i;n.setNode(o,{rank:"same"}),Hn.reduce(r,function(a,s){return n.setEdge(a,s,{style:"invis"}),s})}),n}var yT="0.8.5",RT={graphlib:Ve,layout:GN,debug:pT,util:{time:Ae.time,notime:Ae.notime},version:yT},je=(e=>(e.Lines="lines",e.Dots="dots",e))(je||{});const wm=function({dimensions:e,size:t,color:n}){return ge("path",{stroke:n,"stroke-width":t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},Em=function({radius:e,color:t}){return ge("circle",{cx:e,cy:e,r:e,fill:t})};je.Lines+"",je.Dots+"";const mT={[je.Dots]:"#81818a",[je.Lines]:"#eee"},_T=["id","x","y","width","height","patternTransform"],bT={key:2,height:"100",width:"100"},wT=["fill"],ET=["x","y","fill"],ST={name:"Background",compatConfig:{MODE:3}},AT=we({...ST,props:{id:{},variant:{default:()=>je.Dots},gap:{default:20},size:{default:1},lineWidth:{default:1},patternColor:{},color:{},bgColor:{},height:{default:100},width:{default:100},x:{default:0},y:{default:0},offset:{default:2}},setup(e){const{id:t,viewport:n}=Ee(),r=se(()=>{const[a,s]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],u=[a*n.value.zoom||1,s*n.value.zoom||1],c=e.size*n.value.zoom,l=e.variant===je.Dots?[c/e.offset,c/e.offset]:[u[0]/e.offset,u[1]/e.offset];return{scaledGap:u,offset:l,size:c}}),i=be(()=>`pattern-${t}${e.id?`-${e.id}`:""}`),o=be(()=>e.color||e.patternColor||mT[e.variant||je.Dots]);return(a,s)=>(ce(),ye("svg",{class:"vue-flow__background vue-flow__container",style:ze({height:`${a.height>100?100:a.height}%`,width:`${a.width>100?100:a.width}%`})},[Pe(a.$slots,"pattern-container",{id:i.value},()=>[Ke("pattern",{id:i.value,x:Q(n).x%r.value.scaledGap[0],y:Q(n).y%r.value.scaledGap[1],width:r.value.scaledGap[0],height:r.value.scaledGap[1],patternTransform:`translate(-${r.value.offset[0]},-${r.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[Pe(a.$slots,"pattern",{},()=>[a.variant===Q(je).Lines?(ce(),st(Q(wm),{key:0,size:a.lineWidth,color:o.value,dimensions:r.value.scaledGap},null,8,["size","color","dimensions"])):a.variant===Q(je).Dots?(ce(),st(Q(Em),{key:1,color:o.value,radius:r.value.size/a.offset},null,8,["color","radius"])):Oe("",!0),a.bgColor?(ce(),ye("svg",bT,[Ke("rect",{width:"100%",height:"100%",fill:a.bgColor},null,8,wT)])):Oe("",!0)])],8,_T)]),Ke("rect",{x:a.x,y:a.y,width:"100%",height:"100%",fill:`url(#${i.value})`},null,8,ET),Pe(a.$slots,"default",{id:i.value})],4))}});export{ol as M,Fg as N,Cw as P,TT as _,Er as a,IT as b,J as c,RT as d,Pg as e,AT as f,I1 as g,NT as h,CT as i,kg as j,ar as k,Ee as u};
22
- //# sourceMappingURL=vue-flow-background.03bf6b4b.js.map