solace-agent-mesh 1.6.3__py3-none-any.whl → 1.7.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.

Potentially problematic release.


This version of solace-agent-mesh might be problematic. Click here for more details.

Files changed (244) hide show
  1. solace_agent_mesh/agent/adk/adk_llm.txt +12 -18
  2. solace_agent_mesh/agent/adk/artifacts/artifacts_llm.txt +1 -1
  3. solace_agent_mesh/agent/adk/callbacks.py +138 -20
  4. solace_agent_mesh/agent/adk/embed_resolving_mcp_toolset.py +2 -0
  5. solace_agent_mesh/agent/adk/models/lite_llm.py +38 -5
  6. solace_agent_mesh/agent/adk/models/models_llm.txt +82 -35
  7. solace_agent_mesh/agent/adk/runner.py +9 -0
  8. solace_agent_mesh/agent/adk/stream_parser.py +6 -1
  9. solace_agent_mesh/agent/adk/tool_wrapper.py +3 -0
  10. solace_agent_mesh/agent/agent_llm.txt +61 -70
  11. solace_agent_mesh/agent/protocol/event_handlers.py +29 -1
  12. solace_agent_mesh/agent/protocol/protocol_llm.txt +1 -1
  13. solace_agent_mesh/agent/proxies/a2a/a2a_llm.txt +190 -0
  14. solace_agent_mesh/agent/proxies/base/base_llm.txt +148 -0
  15. solace_agent_mesh/agent/proxies/proxies_llm.txt +283 -0
  16. solace_agent_mesh/agent/sac/app.py +22 -0
  17. solace_agent_mesh/agent/sac/component.py +76 -40
  18. solace_agent_mesh/agent/sac/sac_llm.txt +1 -1
  19. solace_agent_mesh/agent/sac/task_execution_context.py +21 -0
  20. solace_agent_mesh/agent/testing/testing_llm.txt +2 -1
  21. solace_agent_mesh/agent/tools/builtin_artifact_tools.py +13 -148
  22. solace_agent_mesh/agent/tools/dynamic_tool.py +2 -0
  23. solace_agent_mesh/agent/tools/tools_llm.txt +93 -80
  24. solace_agent_mesh/agent/tools/tools_llm_detail.txt +3 -2
  25. solace_agent_mesh/agent/utils/artifact_helpers.py +4 -0
  26. solace_agent_mesh/agent/utils/utils_llm.txt +16 -2
  27. solace_agent_mesh/assets/docs/404.html +3 -3
  28. solace_agent_mesh/assets/docs/assets/js/05749d90.c70b2be9.js +1 -0
  29. solace_agent_mesh/assets/docs/assets/js/15ba94aa.92fea363.js +1 -0
  30. solace_agent_mesh/assets/docs/assets/js/15e40e79.36003774.js +1 -0
  31. solace_agent_mesh/assets/docs/assets/js/2987107d.a80604f9.js +1 -0
  32. solace_agent_mesh/assets/docs/assets/js/3ac1795d.e4870a49.js +1 -0
  33. solace_agent_mesh/assets/docs/assets/js/3ff0015d.b63ee53a.js +1 -0
  34. solace_agent_mesh/assets/docs/assets/js/547e15cc.2f7790c1.js +1 -0
  35. solace_agent_mesh/assets/docs/assets/js/5c2bd65f.45b32c2b.js +1 -0
  36. solace_agent_mesh/assets/docs/assets/js/631738c7.fa471607.js +1 -0
  37. solace_agent_mesh/assets/docs/assets/js/64195356.c498c4d0.js +1 -0
  38. solace_agent_mesh/assets/docs/assets/js/6a520c9d.b6e3f2ce.js +1 -0
  39. solace_agent_mesh/assets/docs/assets/js/6ad8f0bd.a5b36a60.js +1 -0
  40. solace_agent_mesh/assets/docs/assets/js/71da7b71.374b9d54.js +1 -0
  41. solace_agent_mesh/assets/docs/assets/js/8024126c.fa0e7186.js +1 -0
  42. solace_agent_mesh/assets/docs/assets/js/8b032486.91a91afc.js +1 -0
  43. solace_agent_mesh/assets/docs/assets/js/94e8668d.09ed9234.js +1 -0
  44. solace_agent_mesh/assets/docs/assets/js/{ab9708a8.3e6dd091.js → ab9708a8.245ae0ef.js} +1 -1
  45. solace_agent_mesh/assets/docs/assets/js/ad87452a.9d73dad6.js +1 -0
  46. solace_agent_mesh/assets/docs/assets/js/cbe2e9ea.f902fad8.js +1 -0
  47. solace_agent_mesh/assets/docs/assets/js/da0b5bad.b62f7b08.js +1 -0
  48. solace_agent_mesh/assets/docs/assets/js/db5d6442.3daf1696.js +1 -0
  49. solace_agent_mesh/assets/docs/assets/js/dd817ffc.c37a755e.js +1 -0
  50. solace_agent_mesh/assets/docs/assets/js/dd81e2b8.b682e9c2.js +1 -0
  51. solace_agent_mesh/assets/docs/assets/js/de915948.44a432bc.js +1 -0
  52. solace_agent_mesh/assets/docs/assets/js/e04b235d.c9c50c7b.js +1 -0
  53. solace_agent_mesh/assets/docs/assets/js/e3d9abda.d11c67a7.js +1 -0
  54. solace_agent_mesh/assets/docs/assets/js/{e6f9706b.e74a984d.js → e6f9706b.045d0fa1.js} +1 -1
  55. solace_agent_mesh/assets/docs/assets/js/e92d0134.3bda61dd.js +1 -0
  56. solace_agent_mesh/assets/docs/assets/js/f284c35a.5099c51e.js +1 -0
  57. solace_agent_mesh/assets/docs/assets/js/ff4d71f2.74710fc1.js +1 -0
  58. solace_agent_mesh/assets/docs/assets/js/main.e6488e8b.js +2 -0
  59. solace_agent_mesh/assets/docs/assets/js/runtime~main.d9606d6a.js +1 -0
  60. solace_agent_mesh/assets/docs/docs/documentation/components/agents/index.html +4 -4
  61. solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/artifact-management/index.html +4 -4
  62. solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/audio-tools/index.html +4 -4
  63. solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/data-analysis-tools/index.html +4 -4
  64. solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/embeds/index.html +18 -4
  65. solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/index.html +4 -4
  66. solace_agent_mesh/assets/docs/docs/documentation/components/cli/index.html +4 -4
  67. solace_agent_mesh/assets/docs/docs/documentation/components/gateways/index.html +5 -5
  68. solace_agent_mesh/assets/docs/docs/documentation/components/index.html +4 -4
  69. solace_agent_mesh/assets/docs/docs/documentation/components/orchestrator/index.html +4 -4
  70. solace_agent_mesh/assets/docs/docs/documentation/components/plugins/index.html +4 -4
  71. solace_agent_mesh/assets/docs/docs/documentation/components/projects/index.html +196 -0
  72. solace_agent_mesh/assets/docs/docs/documentation/components/proxies/index.html +4 -4
  73. solace_agent_mesh/assets/docs/docs/documentation/deploying/debugging/index.html +5 -5
  74. solace_agent_mesh/assets/docs/docs/documentation/deploying/deployment-options/index.html +6 -7
  75. solace_agent_mesh/assets/docs/docs/documentation/deploying/index.html +4 -4
  76. solace_agent_mesh/assets/docs/docs/documentation/deploying/kubernetes-deployment/index.html +47 -0
  77. solace_agent_mesh/assets/docs/docs/documentation/deploying/logging/index.html +4 -4
  78. solace_agent_mesh/assets/docs/docs/documentation/deploying/observability/index.html +4 -4
  79. solace_agent_mesh/assets/docs/docs/documentation/developing/create-agents/index.html +4 -4
  80. solace_agent_mesh/assets/docs/docs/documentation/developing/create-gateways/index.html +160 -169
  81. solace_agent_mesh/assets/docs/docs/documentation/developing/creating-python-tools/index.html +4 -4
  82. solace_agent_mesh/assets/docs/docs/documentation/developing/creating-service-providers/index.html +4 -4
  83. solace_agent_mesh/assets/docs/docs/documentation/developing/evaluations/index.html +4 -4
  84. solace_agent_mesh/assets/docs/docs/documentation/developing/index.html +4 -4
  85. solace_agent_mesh/assets/docs/docs/documentation/developing/structure/index.html +4 -4
  86. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/bedrock-agents/index.html +4 -4
  87. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/custom-agent/index.html +5 -5
  88. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/event-mesh-gateway/index.html +4 -4
  89. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/mcp-integration/index.html +4 -4
  90. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/mongodb-integration/index.html +4 -4
  91. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/rag-integration/index.html +4 -4
  92. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/rest-gateway/index.html +4 -4
  93. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/slack-integration/index.html +4 -4
  94. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/sql-database/index.html +4 -4
  95. solace_agent_mesh/assets/docs/docs/documentation/enterprise/agent-builder/index.html +59 -0
  96. solace_agent_mesh/assets/docs/docs/documentation/enterprise/connectors/index.html +62 -0
  97. solace_agent_mesh/assets/docs/docs/documentation/enterprise/index.html +10 -6
  98. solace_agent_mesh/assets/docs/docs/documentation/enterprise/installation/index.html +4 -4
  99. solace_agent_mesh/assets/docs/docs/documentation/enterprise/rbac-setup-guide/index.html +4 -4
  100. solace_agent_mesh/assets/docs/docs/documentation/enterprise/secure-user-delegated-access/index.html +440 -0
  101. solace_agent_mesh/assets/docs/docs/documentation/enterprise/single-sign-on/index.html +27 -4
  102. solace_agent_mesh/assets/docs/docs/documentation/enterprise/wheel-installation/index.html +62 -0
  103. solace_agent_mesh/assets/docs/docs/documentation/getting-started/architecture/index.html +4 -4
  104. solace_agent_mesh/assets/docs/docs/documentation/getting-started/index.html +5 -4
  105. solace_agent_mesh/assets/docs/docs/documentation/getting-started/introduction/index.html +3 -3
  106. solace_agent_mesh/assets/docs/docs/documentation/getting-started/try-agent-mesh/index.html +3 -3
  107. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/artifact-storage/index.html +290 -0
  108. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/configurations/index.html +9 -9
  109. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/index.html +4 -4
  110. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/installation/index.html +4 -4
  111. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/large_language_models/index.html +4 -4
  112. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/run-project/index.html +4 -4
  113. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/session-storage/index.html +251 -0
  114. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/user-feedback/index.html +88 -0
  115. solace_agent_mesh/assets/docs/docs/documentation/migrations/a2a-upgrade/a2a-gateway-upgrade-to-0.3.0/index.html +3 -3
  116. solace_agent_mesh/assets/docs/docs/documentation/migrations/a2a-upgrade/a2a-technical-migration-map/index.html +3 -3
  117. solace_agent_mesh/assets/docs/lunr-index-1762189824009.json +1 -0
  118. solace_agent_mesh/assets/docs/lunr-index.json +1 -1
  119. solace_agent_mesh/assets/docs/search-doc-1762189824009.json +1 -0
  120. solace_agent_mesh/assets/docs/search-doc.json +1 -1
  121. solace_agent_mesh/assets/docs/sitemap.xml +1 -1
  122. solace_agent_mesh/cli/__init__.py +1 -1
  123. solace_agent_mesh/cli/commands/docs_cmd.py +4 -1
  124. solace_agent_mesh/cli/commands/init_cmd/orchestrator_step.py +1 -1
  125. solace_agent_mesh/client/webui/frontend/static/assets/{authCallback-D4_RMYRh.js → authCallback-tcIFZLis.js} +1 -1
  126. solace_agent_mesh/client/webui/frontend/static/assets/{client-UZ3qU6Bq.js → client-CRYdKo2Q.js} +3 -3
  127. solace_agent_mesh/client/webui/frontend/static/assets/main-CojeY_1w.css +1 -0
  128. solace_agent_mesh/client/webui/frontend/static/assets/main-ILja9MCG.js +353 -0
  129. solace_agent_mesh/client/webui/frontend/static/assets/vendor-CINwxvwV.js +470 -0
  130. solace_agent_mesh/client/webui/frontend/static/auth-callback.html +3 -3
  131. solace_agent_mesh/client/webui/frontend/static/index.html +4 -4
  132. solace_agent_mesh/common/a2a/a2a_llm.txt +13 -20
  133. solace_agent_mesh/common/a2a/protocol.py +5 -0
  134. solace_agent_mesh/common/a2a/types.py +1 -0
  135. solace_agent_mesh/common/a2a_spec/a2a_spec_llm.txt +49 -11
  136. solace_agent_mesh/common/a2a_spec/schemas/artifact_creation_progress.json +23 -6
  137. solace_agent_mesh/common/a2a_spec/schemas/feedback_event.json +51 -0
  138. solace_agent_mesh/common/a2a_spec/schemas/schemas_llm.txt +26 -9
  139. solace_agent_mesh/common/common_llm.txt +13 -34
  140. solace_agent_mesh/common/data_parts.py +20 -4
  141. solace_agent_mesh/common/middleware/middleware_llm.txt +1 -1
  142. solace_agent_mesh/common/sac/sac_llm.txt +1 -1
  143. solace_agent_mesh/common/sam_events/sam_events_llm.txt +1 -1
  144. solace_agent_mesh/common/services/employee_service.py +1 -1
  145. solace_agent_mesh/common/services/providers/providers_llm.txt +3 -2
  146. solace_agent_mesh/common/services/services_llm.txt +9 -4
  147. solace_agent_mesh/common/utils/embeds/constants.py +1 -0
  148. solace_agent_mesh/common/utils/embeds/embeds_llm.txt +1 -1
  149. solace_agent_mesh/common/utils/embeds/modifiers.py +2 -1
  150. solace_agent_mesh/common/utils/embeds/resolver.py +58 -6
  151. solace_agent_mesh/common/utils/embeds/types.py +8 -0
  152. solace_agent_mesh/common/utils/utils_llm.txt +5 -6
  153. solace_agent_mesh/core_a2a/core_a2a_llm.txt +1 -1
  154. solace_agent_mesh/gateway/adapter/__init__.py +1 -0
  155. solace_agent_mesh/gateway/adapter/base.py +143 -0
  156. solace_agent_mesh/gateway/adapter/types.py +221 -0
  157. solace_agent_mesh/gateway/base/app.py +29 -2
  158. solace_agent_mesh/gateway/base/base_llm.txt +10 -8
  159. solace_agent_mesh/gateway/base/component.py +573 -142
  160. solace_agent_mesh/gateway/gateway_llm.txt +55 -59
  161. solace_agent_mesh/gateway/generic/__init__.py +1 -0
  162. solace_agent_mesh/gateway/generic/app.py +50 -0
  163. solace_agent_mesh/gateway/generic/component.py +650 -0
  164. solace_agent_mesh/gateway/http_sse/alembic/alembic_llm.txt +99 -49
  165. solace_agent_mesh/gateway/http_sse/alembic/versions/20251023_add_fulltext_search_indexes.py +92 -0
  166. solace_agent_mesh/gateway/http_sse/alembic/versions/20251023_add_project_users_table.py +72 -0
  167. solace_agent_mesh/gateway/http_sse/alembic/versions/20251023_add_soft_delete_and_search.py +150 -0
  168. solace_agent_mesh/gateway/http_sse/alembic/versions/20251024_add_default_agent_to_projects.py +26 -0
  169. solace_agent_mesh/gateway/http_sse/alembic/versions/20251024_add_projects_table.py +135 -0
  170. solace_agent_mesh/gateway/http_sse/alembic/versions/versions_llm.txt +26 -20
  171. solace_agent_mesh/gateway/http_sse/app.py +0 -14
  172. solace_agent_mesh/gateway/http_sse/component.py +17 -56
  173. solace_agent_mesh/gateway/http_sse/components/components_llm.txt +1 -1
  174. solace_agent_mesh/gateway/http_sse/dependencies.py +21 -3
  175. solace_agent_mesh/gateway/http_sse/http_sse_llm.txt +8 -8
  176. solace_agent_mesh/gateway/http_sse/main.py +23 -5
  177. solace_agent_mesh/gateway/http_sse/repository/__init__.py +19 -1
  178. solace_agent_mesh/gateway/http_sse/repository/entities/entities_llm.txt +56 -98
  179. solace_agent_mesh/gateway/http_sse/repository/entities/project.py +81 -0
  180. solace_agent_mesh/gateway/http_sse/repository/entities/project_user.py +47 -0
  181. solace_agent_mesh/gateway/http_sse/repository/entities/session.py +23 -1
  182. solace_agent_mesh/gateway/http_sse/repository/feedback_repository.py +47 -0
  183. solace_agent_mesh/gateway/http_sse/repository/interfaces.py +112 -4
  184. solace_agent_mesh/gateway/http_sse/repository/models/__init__.py +9 -1
  185. solace_agent_mesh/gateway/http_sse/repository/models/models_llm.txt +51 -60
  186. solace_agent_mesh/gateway/http_sse/repository/models/project_model.py +51 -0
  187. solace_agent_mesh/gateway/http_sse/repository/models/project_user_model.py +75 -0
  188. solace_agent_mesh/gateway/http_sse/repository/models/session_model.py +7 -1
  189. solace_agent_mesh/gateway/http_sse/repository/project_repository.py +172 -0
  190. solace_agent_mesh/gateway/http_sse/repository/project_user_repository.py +186 -0
  191. solace_agent_mesh/gateway/http_sse/repository/repository_llm.txt +125 -157
  192. solace_agent_mesh/gateway/http_sse/repository/session_repository.py +269 -8
  193. solace_agent_mesh/gateway/http_sse/routers/artifacts.py +143 -51
  194. solace_agent_mesh/gateway/http_sse/routers/config.py +69 -0
  195. solace_agent_mesh/gateway/http_sse/routers/dto/dto_llm.txt +198 -94
  196. solace_agent_mesh/gateway/http_sse/routers/dto/requests/project_requests.py +48 -0
  197. solace_agent_mesh/gateway/http_sse/routers/dto/requests/requests_llm.txt +68 -18
  198. solace_agent_mesh/gateway/http_sse/routers/dto/requests/session_requests.py +13 -0
  199. solace_agent_mesh/gateway/http_sse/routers/dto/responses/project_responses.py +30 -0
  200. solace_agent_mesh/gateway/http_sse/routers/dto/responses/responses_llm.txt +51 -35
  201. solace_agent_mesh/gateway/http_sse/routers/dto/responses/session_responses.py +2 -0
  202. solace_agent_mesh/gateway/http_sse/routers/feedback.py +133 -2
  203. solace_agent_mesh/gateway/http_sse/routers/projects.py +542 -0
  204. solace_agent_mesh/gateway/http_sse/routers/routers_llm.txt +9 -11
  205. solace_agent_mesh/gateway/http_sse/routers/sessions.py +154 -3
  206. solace_agent_mesh/gateway/http_sse/routers/tasks.py +296 -4
  207. solace_agent_mesh/gateway/http_sse/services/project_service.py +403 -0
  208. solace_agent_mesh/gateway/http_sse/services/services_llm.txt +16 -10
  209. solace_agent_mesh/gateway/http_sse/services/session_service.py +178 -6
  210. solace_agent_mesh/gateway/http_sse/shared/exception_handlers.py +2 -3
  211. solace_agent_mesh/gateway/http_sse/shared/shared_llm.txt +48 -14
  212. solace_agent_mesh/solace_agent_mesh_llm.txt +1 -1
  213. {solace_agent_mesh-1.6.3.dist-info → solace_agent_mesh-1.7.0.dist-info}/METADATA +3 -5
  214. {solace_agent_mesh-1.6.3.dist-info → solace_agent_mesh-1.7.0.dist-info}/RECORD +218 -175
  215. solace_agent_mesh/assets/docs/assets/js/15ba94aa.932dd2db.js +0 -1
  216. solace_agent_mesh/assets/docs/assets/js/3ac1795d.76654dd9.js +0 -1
  217. solace_agent_mesh/assets/docs/assets/js/3ff0015d.2be20244.js +0 -1
  218. solace_agent_mesh/assets/docs/assets/js/547e15cc.2cbb060a.js +0 -1
  219. solace_agent_mesh/assets/docs/assets/js/5c2bd65f.eda4bcb2.js +0 -1
  220. solace_agent_mesh/assets/docs/assets/js/631738c7.7c4594c9.js +0 -1
  221. solace_agent_mesh/assets/docs/assets/js/6a520c9d.ba015d81.js +0 -1
  222. solace_agent_mesh/assets/docs/assets/js/6ad8f0bd.f4b15f3b.js +0 -1
  223. solace_agent_mesh/assets/docs/assets/js/71da7b71.ddbdfbe2.js +0 -1
  224. solace_agent_mesh/assets/docs/assets/js/8024126c.56e59919.js +0 -1
  225. solace_agent_mesh/assets/docs/assets/js/94e8668d.3b883666.js +0 -1
  226. solace_agent_mesh/assets/docs/assets/js/da0b5bad.d08a9466.js +0 -1
  227. solace_agent_mesh/assets/docs/assets/js/dd817ffc.0aa9630a.js +0 -1
  228. solace_agent_mesh/assets/docs/assets/js/dd81e2b8.d590bc9e.js +0 -1
  229. solace_agent_mesh/assets/docs/assets/js/de915948.27d6b065.js +0 -1
  230. solace_agent_mesh/assets/docs/assets/js/e3d9abda.6b9493d0.js +0 -1
  231. solace_agent_mesh/assets/docs/assets/js/e92d0134.4f395c6b.js +0 -1
  232. solace_agent_mesh/assets/docs/assets/js/f284c35a.720d2ef2.js +0 -1
  233. solace_agent_mesh/assets/docs/assets/js/ff4d71f2.15b02f97.js +0 -1
  234. solace_agent_mesh/assets/docs/assets/js/main.ed05b14d.js +0 -2
  235. solace_agent_mesh/assets/docs/assets/js/runtime~main.a8a75e0b.js +0 -1
  236. solace_agent_mesh/assets/docs/lunr-index-1761744323675.json +0 -1
  237. solace_agent_mesh/assets/docs/search-doc-1761744323675.json +0 -1
  238. solace_agent_mesh/client/webui/frontend/static/assets/main--3yJYl7S.css +0 -1
  239. solace_agent_mesh/client/webui/frontend/static/assets/main-DojKHS49.js +0 -342
  240. solace_agent_mesh/client/webui/frontend/static/assets/vendor-DSqhjwq_.js +0 -405
  241. /solace_agent_mesh/assets/docs/assets/js/{main.ed05b14d.js.LICENSE.txt → main.e6488e8b.js.LICENSE.txt} +0 -0
  242. {solace_agent_mesh-1.6.3.dist-info → solace_agent_mesh-1.7.0.dist-info}/WHEEL +0 -0
  243. {solace_agent_mesh-1.6.3.dist-info → solace_agent_mesh-1.7.0.dist-info}/entry_points.txt +0 -0
  244. {solace_agent_mesh-1.6.3.dist-info → solace_agent_mesh-1.7.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,470 @@
1
+ var Zc=Object.defineProperty;var Qc=(e,t,n)=>t in e?Zc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var we=(e,t,n)=>Qc(e,typeof t!="symbol"?t+"":t,n);function Jc(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Zr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bi={exports:{}},En={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Ho;function eu(){if(Ho)return En;Ho=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var s=null;if(o!==void 0&&(s=""+o),i.key!==void 0&&(s=""+i.key),"key"in i){o={};for(var l in i)l!=="key"&&(o[l]=i[l])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:s,ref:i!==void 0?i:null,props:o}}return En.Fragment=t,En.jsx=n,En.jsxs=n,En}var Vo;function tu(){return Vo||(Vo=1,bi.exports=eu()),bi.exports}var E=tu(),ki={exports:{}},oe={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Bo;function nu(){if(Bo)return oe;Bo=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),a=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),f=Symbol.iterator;function d(x){return x===null||typeof x!="object"?null:(x=f&&x[f]||x["@@iterator"],typeof x=="function"?x:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,m={};function v(x,T,L){this.props=x,this.context=T,this.refs=m,this.updater=L||h}v.prototype.isReactComponent={},v.prototype.setState=function(x,T){if(typeof x!="object"&&typeof x!="function"&&x!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,x,T,"setState")},v.prototype.forceUpdate=function(x){this.updater.enqueueForceUpdate(this,x,"forceUpdate")};function w(){}w.prototype=v.prototype;function C(x,T,L){this.props=x,this.context=T,this.refs=m,this.updater=L||h}var y=C.prototype=new w;y.constructor=C,g(y,v.prototype),y.isPureReactComponent=!0;var _=Array.isArray,p={H:null,A:null,T:null,S:null,V:null},k=Object.prototype.hasOwnProperty;function S(x,T,L,V,B,Y){return L=Y.ref,{$$typeof:e,type:x,key:T,ref:L!==void 0?L:null,props:Y}}function N(x,T){return S(x.type,T,void 0,void 0,void 0,x.props)}function M(x){return typeof x=="object"&&x!==null&&x.$$typeof===e}function H(x){var T={"=":"=0",":":"=2"};return"$"+x.replace(/[=:]/g,function(L){return T[L]})}var I=/\/+/g;function z(x,T){return typeof x=="object"&&x!==null&&x.key!=null?H(""+x.key):T.toString(36)}function O(){}function b(x){switch(x.status){case"fulfilled":return x.value;case"rejected":throw x.reason;default:switch(typeof x.status=="string"?x.then(O,O):(x.status="pending",x.then(function(T){x.status==="pending"&&(x.status="fulfilled",x.value=T)},function(T){x.status==="pending"&&(x.status="rejected",x.reason=T)})),x.status){case"fulfilled":return x.value;case"rejected":throw x.reason}}throw x}function R(x,T,L,V,B){var Y=typeof x;(Y==="undefined"||Y==="boolean")&&(x=null);var F=!1;if(x===null)F=!0;else switch(Y){case"bigint":case"string":case"number":F=!0;break;case"object":switch(x.$$typeof){case e:case t:F=!0;break;case u:return F=x._init,R(F(x._payload),T,L,V,B)}}if(F)return B=B(x),F=V===""?"."+z(x,0):V,_(B)?(L="",F!=null&&(L=F.replace(I,"$&/")+"/"),R(B,T,L,"",function(K){return K})):B!=null&&(M(B)&&(B=N(B,L+(B.key==null||x&&x.key===B.key?"":(""+B.key).replace(I,"$&/")+"/")+F)),T.push(B)),1;F=0;var X=V===""?".":V+":";if(_(x))for(var q=0;q<x.length;q++)V=x[q],Y=X+z(V,q),F+=R(V,T,L,Y,B);else if(q=d(x),typeof q=="function")for(x=q.call(x),q=0;!(V=x.next()).done;)V=V.value,Y=X+z(V,q++),F+=R(V,T,L,Y,B);else if(Y==="object"){if(typeof x.then=="function")return R(b(x),T,L,V,B);throw T=String(x),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys(x).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.")}return F}function j(x,T,L){if(x==null)return x;var V=[],B=0;return R(x,V,"","",function(Y){return T.call(L,Y,B++)}),V}function D(x){if(x._status===-1){var T=x._result;T=T(),T.then(function(L){(x._status===0||x._status===-1)&&(x._status=1,x._result=L)},function(L){(x._status===0||x._status===-1)&&(x._status=2,x._result=L)}),x._status===-1&&(x._status=0,x._result=T)}if(x._status===1)return x._result.default;throw x._result}var $=typeof reportError=="function"?reportError:function(x){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var T=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof x=="object"&&x!==null&&typeof x.message=="string"?String(x.message):String(x),error:x});if(!window.dispatchEvent(T))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",x);return}console.error(x)};function P(){}return oe.Children={map:j,forEach:function(x,T,L){j(x,function(){T.apply(this,arguments)},L)},count:function(x){var T=0;return j(x,function(){T++}),T},toArray:function(x){return j(x,function(T){return T})||[]},only:function(x){if(!M(x))throw Error("React.Children.only expected to receive a single React element child.");return x}},oe.Component=v,oe.Fragment=n,oe.Profiler=i,oe.PureComponent=C,oe.StrictMode=r,oe.Suspense=c,oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=p,oe.__COMPILER_RUNTIME={__proto__:null,c:function(x){return p.H.useMemoCache(x)}},oe.cache=function(x){return function(){return x.apply(null,arguments)}},oe.cloneElement=function(x,T,L){if(x==null)throw Error("The argument must be a React element, but you passed "+x+".");var V=g({},x.props),B=x.key,Y=void 0;if(T!=null)for(F in T.ref!==void 0&&(Y=void 0),T.key!==void 0&&(B=""+T.key),T)!k.call(T,F)||F==="key"||F==="__self"||F==="__source"||F==="ref"&&T.ref===void 0||(V[F]=T[F]);var F=arguments.length-2;if(F===1)V.children=L;else if(1<F){for(var X=Array(F),q=0;q<F;q++)X[q]=arguments[q+2];V.children=X}return S(x.type,B,void 0,void 0,Y,V)},oe.createContext=function(x){return x={$$typeof:s,_currentValue:x,_currentValue2:x,_threadCount:0,Provider:null,Consumer:null},x.Provider=x,x.Consumer={$$typeof:o,_context:x},x},oe.createElement=function(x,T,L){var V,B={},Y=null;if(T!=null)for(V in T.key!==void 0&&(Y=""+T.key),T)k.call(T,V)&&V!=="key"&&V!=="__self"&&V!=="__source"&&(B[V]=T[V]);var F=arguments.length-2;if(F===1)B.children=L;else if(1<F){for(var X=Array(F),q=0;q<F;q++)X[q]=arguments[q+2];B.children=X}if(x&&x.defaultProps)for(V in F=x.defaultProps,F)B[V]===void 0&&(B[V]=F[V]);return S(x,Y,void 0,void 0,null,B)},oe.createRef=function(){return{current:null}},oe.forwardRef=function(x){return{$$typeof:l,render:x}},oe.isValidElement=M,oe.lazy=function(x){return{$$typeof:u,_payload:{_status:-1,_result:x},_init:D}},oe.memo=function(x,T){return{$$typeof:a,type:x,compare:T===void 0?null:T}},oe.startTransition=function(x){var T=p.T,L={};p.T=L;try{var V=x(),B=p.S;B!==null&&B(L,V),typeof V=="object"&&V!==null&&typeof V.then=="function"&&V.then(P,$)}catch(Y){$(Y)}finally{p.T=T}},oe.unstable_useCacheRefresh=function(){return p.H.useCacheRefresh()},oe.use=function(x){return p.H.use(x)},oe.useActionState=function(x,T,L){return p.H.useActionState(x,T,L)},oe.useCallback=function(x,T){return p.H.useCallback(x,T)},oe.useContext=function(x){return p.H.useContext(x)},oe.useDebugValue=function(){},oe.useDeferredValue=function(x,T){return p.H.useDeferredValue(x,T)},oe.useEffect=function(x,T,L){var V=p.H;if(typeof L=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return V.useEffect(x,T)},oe.useId=function(){return p.H.useId()},oe.useImperativeHandle=function(x,T,L){return p.H.useImperativeHandle(x,T,L)},oe.useInsertionEffect=function(x,T){return p.H.useInsertionEffect(x,T)},oe.useLayoutEffect=function(x,T){return p.H.useLayoutEffect(x,T)},oe.useMemo=function(x,T){return p.H.useMemo(x,T)},oe.useOptimistic=function(x,T){return p.H.useOptimistic(x,T)},oe.useReducer=function(x,T,L){return p.H.useReducer(x,T,L)},oe.useRef=function(x){return p.H.useRef(x)},oe.useState=function(x){return p.H.useState(x)},oe.useSyncExternalStore=function(x,T,L){return p.H.useSyncExternalStore(x,T,L)},oe.useTransition=function(){return p.H.useTransition()},oe.version="19.1.0",oe}var Fo;function mn(){return Fo||(Fo=1,ki.exports=nu()),ki.exports}var A=mn();const Aa=Zr(A),tv=Jc({__proto__:null,default:Aa},[A]);var _i={exports:{}},Re={};/**
18
+ * @license React
19
+ * react-dom.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var qo;function ru(){if(qo)return Re;qo=1;var e=mn();function t(c){var a="https://react.dev/errors/"+c;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)a+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+c+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(c,a,u){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:f==null?null:""+f,children:c,containerInfo:a,implementation:u}}var s=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(c,a){if(c==="font")return"";if(typeof a=="string")return a==="use-credentials"?a:""}return Re.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Re.createPortal=function(c,a){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)throw Error(t(299));return o(c,a,null,u)},Re.flushSync=function(c){var a=s.T,u=r.p;try{if(s.T=null,r.p=2,c)return c()}finally{s.T=a,r.p=u,r.d.f()}},Re.preconnect=function(c,a){typeof c=="string"&&(a?(a=a.crossOrigin,a=typeof a=="string"?a==="use-credentials"?a:"":void 0):a=null,r.d.C(c,a))},Re.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},Re.preinit=function(c,a){if(typeof c=="string"&&a&&typeof a.as=="string"){var u=a.as,f=l(u,a.crossOrigin),d=typeof a.integrity=="string"?a.integrity:void 0,h=typeof a.fetchPriority=="string"?a.fetchPriority:void 0;u==="style"?r.d.S(c,typeof a.precedence=="string"?a.precedence:void 0,{crossOrigin:f,integrity:d,fetchPriority:h}):u==="script"&&r.d.X(c,{crossOrigin:f,integrity:d,fetchPriority:h,nonce:typeof a.nonce=="string"?a.nonce:void 0})}},Re.preinitModule=function(c,a){if(typeof c=="string")if(typeof a=="object"&&a!==null){if(a.as==null||a.as==="script"){var u=l(a.as,a.crossOrigin);r.d.M(c,{crossOrigin:u,integrity:typeof a.integrity=="string"?a.integrity:void 0,nonce:typeof a.nonce=="string"?a.nonce:void 0})}}else a==null&&r.d.M(c)},Re.preload=function(c,a){if(typeof c=="string"&&typeof a=="object"&&a!==null&&typeof a.as=="string"){var u=a.as,f=l(u,a.crossOrigin);r.d.L(c,u,{crossOrigin:f,integrity:typeof a.integrity=="string"?a.integrity:void 0,nonce:typeof a.nonce=="string"?a.nonce:void 0,type:typeof a.type=="string"?a.type:void 0,fetchPriority:typeof a.fetchPriority=="string"?a.fetchPriority:void 0,referrerPolicy:typeof a.referrerPolicy=="string"?a.referrerPolicy:void 0,imageSrcSet:typeof a.imageSrcSet=="string"?a.imageSrcSet:void 0,imageSizes:typeof a.imageSizes=="string"?a.imageSizes:void 0,media:typeof a.media=="string"?a.media:void 0})}},Re.preloadModule=function(c,a){if(typeof c=="string")if(a){var u=l(a.as,a.crossOrigin);r.d.m(c,{as:typeof a.as=="string"&&a.as!=="script"?a.as:void 0,crossOrigin:u,integrity:typeof a.integrity=="string"?a.integrity:void 0})}else r.d.m(c)},Re.requestFormReset=function(c){r.d.r(c)},Re.unstable_batchedUpdates=function(c,a){return c(a)},Re.useFormState=function(c,a,u){return s.H.useFormState(c,a,u)},Re.useFormStatus=function(){return s.H.useHostTransitionStatus()},Re.version="19.1.0",Re}var Yo;function iu(){if(Yo)return _i.exports;Yo=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),_i.exports=ru(),_i.exports}var ou=iu();const nv=Zr(ou);function Ra(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ra(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function rv(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ra(e))&&(r&&(r+=" "),r+=t);return r}/**
26
+ * @license lucide-react v0.511.0 - ISC
27
+ *
28
+ * This source code is licensed under the ISC license.
29
+ * See the LICENSE file in the root directory of this source tree.
30
+ */const su=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),au=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Xo=e=>{const t=au(e);return t.charAt(0).toUpperCase()+t.slice(1)},ja=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),lu=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
31
+ * @license lucide-react v0.511.0 - ISC
32
+ *
33
+ * This source code is licensed under the ISC license.
34
+ * See the LICENSE file in the root directory of this source tree.
35
+ */var cu={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
36
+ * @license lucide-react v0.511.0 - ISC
37
+ *
38
+ * This source code is licensed under the ISC license.
39
+ * See the LICENSE file in the root directory of this source tree.
40
+ */const uu=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:s,...l},c)=>A.createElement("svg",{ref:c,...cu,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ja("lucide",i),...!o&&!lu(l)&&{"aria-hidden":"true"},...l},[...s.map(([a,u])=>A.createElement(a,u)),...Array.isArray(o)?o:[o]]));/**
41
+ * @license lucide-react v0.511.0 - ISC
42
+ *
43
+ * This source code is licensed under the ISC license.
44
+ * See the LICENSE file in the root directory of this source tree.
45
+ */const G=(e,t)=>{const n=A.forwardRef(({className:r,...i},o)=>A.createElement(uu,{ref:o,iconNode:t,className:ja(`lucide-${su(Xo(e))}`,`lucide-${e}`,r),...i}));return n.displayName=Xo(e),n};/**
46
+ * @license lucide-react v0.511.0 - ISC
47
+ *
48
+ * This source code is licensed under the ISC license.
49
+ * See the LICENSE file in the root directory of this source tree.
50
+ */const du=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],iv=G("archive",du);/**
51
+ * @license lucide-react v0.511.0 - ISC
52
+ *
53
+ * This source code is licensed under the ISC license.
54
+ * See the LICENSE file in the root directory of this source tree.
55
+ */const fu=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],ov=G("arrow-down",fu);/**
56
+ * @license lucide-react v0.511.0 - ISC
57
+ *
58
+ * This source code is licensed under the ISC license.
59
+ * See the LICENSE file in the root directory of this source tree.
60
+ */const hu=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],sv=G("arrow-left",hu);/**
61
+ * @license lucide-react v0.511.0 - ISC
62
+ *
63
+ * This source code is licensed under the ISC license.
64
+ * See the LICENSE file in the root directory of this source tree.
65
+ */const pu=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]],av=G("ban",pu);/**
66
+ * @license lucide-react v0.511.0 - ISC
67
+ *
68
+ * This source code is licensed under the ISC license.
69
+ * See the LICENSE file in the root directory of this source tree.
70
+ */const gu=[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]],lv=G("book",gu);/**
71
+ * @license lucide-react v0.511.0 - ISC
72
+ *
73
+ * This source code is licensed under the ISC license.
74
+ * See the LICENSE file in the root directory of this source tree.
75
+ */const mu=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],cv=G("bot",mu);/**
76
+ * @license lucide-react v0.511.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const yu=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],uv=G("box",yu);/**
81
+ * @license lucide-react v0.511.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */const vu=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],dv=G("calendar",vu);/**
86
+ * @license lucide-react v0.511.0 - ISC
87
+ *
88
+ * This source code is licensed under the ISC license.
89
+ * See the LICENSE file in the root directory of this source tree.
90
+ */const xu=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],fv=G("check",xu);/**
91
+ * @license lucide-react v0.511.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */const wu=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],hv=G("chevron-down",wu);/**
96
+ * @license lucide-react v0.511.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */const bu=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],pv=G("chevron-right",bu);/**
101
+ * @license lucide-react v0.511.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const ku=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],gv=G("chevron-up",ku);/**
106
+ * @license lucide-react v0.511.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const _u=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],mv=G("circle-alert",_u);/**
111
+ * @license lucide-react v0.511.0 - ISC
112
+ *
113
+ * This source code is licensed under the ISC license.
114
+ * See the LICENSE file in the root directory of this source tree.
115
+ */const Eu=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],yv=G("circle-check-big",Eu);/**
116
+ * @license lucide-react v0.511.0 - ISC
117
+ *
118
+ * This source code is licensed under the ISC license.
119
+ * See the LICENSE file in the root directory of this source tree.
120
+ */const Su=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],vv=G("circle-x",Su);/**
121
+ * @license lucide-react v0.511.0 - ISC
122
+ *
123
+ * This source code is licensed under the ISC license.
124
+ * See the LICENSE file in the root directory of this source tree.
125
+ */const Cu=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],xv=G("code",Cu);/**
126
+ * @license lucide-react v0.511.0 - ISC
127
+ *
128
+ * This source code is licensed under the ISC license.
129
+ * See the LICENSE file in the root directory of this source tree.
130
+ */const Nu=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],wv=G("download",Nu);/**
131
+ * @license lucide-react v0.511.0 - ISC
132
+ *
133
+ * This source code is licensed under the ISC license.
134
+ * See the LICENSE file in the root directory of this source tree.
135
+ */const Tu=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],bv=G("ellipsis-vertical",Tu);/**
136
+ * @license lucide-react v0.511.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */const Au=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],kv=G("ellipsis",Au);/**
141
+ * @license lucide-react v0.511.0 - ISC
142
+ *
143
+ * This source code is licensed under the ISC license.
144
+ * See the LICENSE file in the root directory of this source tree.
145
+ */const Ru=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],_v=G("eye",Ru);/**
146
+ * @license lucide-react v0.511.0 - ISC
147
+ *
148
+ * This source code is licensed under the ISC license.
149
+ * See the LICENSE file in the root directory of this source tree.
150
+ */const ju=[["path",{d:"M17.5 22h.5a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"rslqgf"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 19a2 2 0 1 1 4 0v1a2 2 0 1 1-4 0v-4a6 6 0 0 1 12 0v4a2 2 0 1 1-4 0v-1a2 2 0 1 1 4 0",key:"9f7x3i"}]],Ev=G("file-audio",ju);/**
151
+ * @license lucide-react v0.511.0 - ISC
152
+ *
153
+ * This source code is licensed under the ISC license.
154
+ * See the LICENSE file in the root directory of this source tree.
155
+ */const Mu=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],Sv=G("file-code",Mu);/**
156
+ * @license lucide-react v0.511.0 - ISC
157
+ *
158
+ * This source code is licensed under the ISC license.
159
+ * See the LICENSE file in the root directory of this source tree.
160
+ */const Du=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]],Cv=G("file-image",Du);/**
161
+ * @license lucide-react v0.511.0 - ISC
162
+ *
163
+ * This source code is licensed under the ISC license.
164
+ * See the LICENSE file in the root directory of this source tree.
165
+ */const Pu=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],Nv=G("file-json",Pu);/**
166
+ * @license lucide-react v0.511.0 - ISC
167
+ *
168
+ * This source code is licensed under the ISC license.
169
+ * See the LICENSE file in the root directory of this source tree.
170
+ */const Ou=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]],Tv=G("file-spreadsheet",Ou);/**
171
+ * @license lucide-react v0.511.0 - ISC
172
+ *
173
+ * This source code is licensed under the ISC license.
174
+ * See the LICENSE file in the root directory of this source tree.
175
+ */const Iu=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Av=G("file-text",Iu);/**
176
+ * @license lucide-react v0.511.0 - ISC
177
+ *
178
+ * This source code is licensed under the ISC license.
179
+ * See the LICENSE file in the root directory of this source tree.
180
+ */const $u=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m10 11 5 3-5 3v-6Z",key:"7ntvm4"}]],Rv=G("file-video",$u);/**
181
+ * @license lucide-react v0.511.0 - ISC
182
+ *
183
+ * This source code is licensed under the ISC license.
184
+ * See the LICENSE file in the root directory of this source tree.
185
+ */const Lu=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],jv=G("file",Lu);/**
186
+ * @license lucide-react v0.511.0 - ISC
187
+ *
188
+ * This source code is licensed under the ISC license.
189
+ * See the LICENSE file in the root directory of this source tree.
190
+ */const zu=[["path",{d:"M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1",key:"fm4g5t"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m9 16 3-3-3-3",key:"6m91ic"}]],Mv=G("folder-input",zu);/**
191
+ * @license lucide-react v0.511.0 - ISC
192
+ *
193
+ * This source code is licensed under the ISC license.
194
+ * See the LICENSE file in the root directory of this source tree.
195
+ */const Hu=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],Dv=G("folder-open",Hu);/**
196
+ * @license lucide-react v0.511.0 - ISC
197
+ *
198
+ * This source code is licensed under the ISC license.
199
+ * See the LICENSE file in the root directory of this source tree.
200
+ */const Vu=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],Pv=G("git-merge",Vu);/**
201
+ * @license lucide-react v0.511.0 - ISC
202
+ *
203
+ * This source code is licensed under the ISC license.
204
+ * See the LICENSE file in the root directory of this source tree.
205
+ */const Bu=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],Ov=G("grid-3x3",Bu);/**
206
+ * @license lucide-react v0.511.0 - ISC
207
+ *
208
+ * This source code is licensed under the ISC license.
209
+ * See the LICENSE file in the root directory of this source tree.
210
+ */const Fu=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],Iv=G("hard-drive",Fu);/**
211
+ * @license lucide-react v0.511.0 - ISC
212
+ *
213
+ * This source code is licensed under the ISC license.
214
+ * See the LICENSE file in the root directory of this source tree.
215
+ */const qu=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],$v=G("info",qu);/**
216
+ * @license lucide-react v0.511.0 - ISC
217
+ *
218
+ * This source code is licensed under the ISC license.
219
+ * See the LICENSE file in the root directory of this source tree.
220
+ */const Yu=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],Lv=G("key",Yu);/**
221
+ * @license lucide-react v0.511.0 - ISC
222
+ *
223
+ * This source code is licensed under the ISC license.
224
+ * See the LICENSE file in the root directory of this source tree.
225
+ */const Xu=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],zv=G("link",Xu);/**
226
+ * @license lucide-react v0.511.0 - ISC
227
+ *
228
+ * This source code is licensed under the ISC license.
229
+ * See the LICENSE file in the root directory of this source tree.
230
+ */const Uu=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Hv=G("loader-circle",Uu);/**
231
+ * @license lucide-react v0.511.0 - ISC
232
+ *
233
+ * This source code is licensed under the ISC license.
234
+ * See the LICENSE file in the root directory of this source tree.
235
+ */const Gu=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],Vv=G("message-circle",Gu);/**
236
+ * @license lucide-react v0.511.0 - ISC
237
+ *
238
+ * This source code is licensed under the ISC license.
239
+ * See the LICENSE file in the root directory of this source tree.
240
+ */const Wu=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],Bv=G("message-square",Wu);/**
241
+ * @license lucide-react v0.511.0 - ISC
242
+ *
243
+ * This source code is licensed under the ISC license.
244
+ * See the LICENSE file in the root directory of this source tree.
245
+ */const Ku=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],Fv=G("network",Ku);/**
246
+ * @license lucide-react v0.511.0 - ISC
247
+ *
248
+ * This source code is licensed under the ISC license.
249
+ * See the LICENSE file in the root directory of this source tree.
250
+ */const Zu=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],qv=G("panel-left",Zu);/**
251
+ * @license lucide-react v0.511.0 - ISC
252
+ *
253
+ * This source code is licensed under the ISC license.
254
+ * See the LICENSE file in the root directory of this source tree.
255
+ */const Qu=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],Yv=G("panel-right",Qu);/**
256
+ * @license lucide-react v0.511.0 - ISC
257
+ *
258
+ * This source code is licensed under the ISC license.
259
+ * See the LICENSE file in the root directory of this source tree.
260
+ */const Ju=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]],Xv=G("panels-top-left",Ju);/**
261
+ * @license lucide-react v0.511.0 - ISC
262
+ *
263
+ * This source code is licensed under the ISC license.
264
+ * See the LICENSE file in the root directory of this source tree.
265
+ */const ed=[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]],Uv=G("paperclip",ed);/**
266
+ * @license lucide-react v0.511.0 - ISC
267
+ *
268
+ * This source code is licensed under the ISC license.
269
+ * See the LICENSE file in the root directory of this source tree.
270
+ */const td=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Gv=G("pencil",td);/**
271
+ * @license lucide-react v0.511.0 - ISC
272
+ *
273
+ * This source code is licensed under the ISC license.
274
+ * See the LICENSE file in the root directory of this source tree.
275
+ */const nd=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Wv=G("plus",nd);/**
276
+ * @license lucide-react v0.511.0 - ISC
277
+ *
278
+ * This source code is licensed under the ISC license.
279
+ * See the LICENSE file in the root directory of this source tree.
280
+ */const rd=[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]],Kv=G("presentation",rd);/**
281
+ * @license lucide-react v0.511.0 - ISC
282
+ *
283
+ * This source code is licensed under the ISC license.
284
+ * See the LICENSE file in the root directory of this source tree.
285
+ */const id=[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]],Zv=G("refresh-ccw",id);/**
286
+ * @license lucide-react v0.511.0 - ISC
287
+ *
288
+ * This source code is licensed under the ISC license.
289
+ * See the LICENSE file in the root directory of this source tree.
290
+ */const od=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Qv=G("refresh-cw",od);/**
291
+ * @license lucide-react v0.511.0 - ISC
292
+ *
293
+ * This source code is licensed under the ISC license.
294
+ * See the LICENSE file in the root directory of this source tree.
295
+ */const sd=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Jv=G("save",sd);/**
296
+ * @license lucide-react v0.511.0 - ISC
297
+ *
298
+ * This source code is licensed under the ISC license.
299
+ * See the LICENSE file in the root directory of this source tree.
300
+ */const ad=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ex=G("search",ad);/**
301
+ * @license lucide-react v0.511.0 - ISC
302
+ *
303
+ * This source code is licensed under the ISC license.
304
+ * See the LICENSE file in the root directory of this source tree.
305
+ */const ld=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],tx=G("send",ld);/**
306
+ * @license lucide-react v0.511.0 - ISC
307
+ *
308
+ * This source code is licensed under the ISC license.
309
+ * See the LICENSE file in the root directory of this source tree.
310
+ */const cd=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],nx=G("settings",cd);/**
311
+ * @license lucide-react v0.511.0 - ISC
312
+ *
313
+ * This source code is licensed under the ISC license.
314
+ * See the LICENSE file in the root directory of this source tree.
315
+ */const ud=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],rx=G("share-2",ud);/**
316
+ * @license lucide-react v0.511.0 - ISC
317
+ *
318
+ * This source code is licensed under the ISC license.
319
+ * See the LICENSE file in the root directory of this source tree.
320
+ */const dd=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],ix=G("square-pen",dd);/**
321
+ * @license lucide-react v0.511.0 - ISC
322
+ *
323
+ * This source code is licensed under the ISC license.
324
+ * See the LICENSE file in the root directory of this source tree.
325
+ */const fd=[["path",{d:"M12 8a2.83 2.83 0 0 0 4 4 4 4 0 1 1-4-4",key:"1fu5g2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.9 4.9 1.4 1.4",key:"b9915j"}],["path",{d:"m17.7 17.7 1.4 1.4",key:"qc3ed3"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.3 17.7-1.4 1.4",key:"5gca6"}],["path",{d:"m19.1 4.9-1.4 1.4",key:"wpu9u6"}]],ox=G("sun-moon",fd);/**
326
+ * @license lucide-react v0.511.0 - ISC
327
+ *
328
+ * This source code is licensed under the ISC license.
329
+ * See the LICENSE file in the root directory of this source tree.
330
+ */const hd=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],sx=G("terminal",hd);/**
331
+ * @license lucide-react v0.511.0 - ISC
332
+ *
333
+ * This source code is licensed under the ISC license.
334
+ * See the LICENSE file in the root directory of this source tree.
335
+ */const pd=[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]],ax=G("thumbs-down",pd);/**
336
+ * @license lucide-react v0.511.0 - ISC
337
+ *
338
+ * This source code is licensed under the ISC license.
339
+ * See the LICENSE file in the root directory of this source tree.
340
+ */const gd=[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]],lx=G("thumbs-up",gd);/**
341
+ * @license lucide-react v0.511.0 - ISC
342
+ *
343
+ * This source code is licensed under the ISC license.
344
+ * See the LICENSE file in the root directory of this source tree.
345
+ */const md=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],cx=G("trash-2",md);/**
346
+ * @license lucide-react v0.511.0 - ISC
347
+ *
348
+ * This source code is licensed under the ISC license.
349
+ * See the LICENSE file in the root directory of this source tree.
350
+ */const yd=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]],ux=G("trash",yd);/**
351
+ * @license lucide-react v0.511.0 - ISC
352
+ *
353
+ * This source code is licensed under the ISC license.
354
+ * See the LICENSE file in the root directory of this source tree.
355
+ */const vd=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],dx=G("triangle-alert",vd);/**
356
+ * @license lucide-react v0.511.0 - ISC
357
+ *
358
+ * This source code is licensed under the ISC license.
359
+ * See the LICENSE file in the root directory of this source tree.
360
+ */const xd=[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]],fx=G("type",xd);/**
361
+ * @license lucide-react v0.511.0 - ISC
362
+ *
363
+ * This source code is licensed under the ISC license.
364
+ * See the LICENSE file in the root directory of this source tree.
365
+ */const wd=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],hx=G("upload",wd);/**
366
+ * @license lucide-react v0.511.0 - ISC
367
+ *
368
+ * This source code is licensed under the ISC license.
369
+ * See the LICENSE file in the root directory of this source tree.
370
+ */const bd=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],px=G("user",bd);/**
371
+ * @license lucide-react v0.511.0 - ISC
372
+ *
373
+ * This source code is licensed under the ISC license.
374
+ * See the LICENSE file in the root directory of this source tree.
375
+ */const kd=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],gx=G("x",kd);/**
376
+ * @license lucide-react v0.511.0 - ISC
377
+ *
378
+ * This source code is licensed under the ISC license.
379
+ * See the LICENSE file in the root directory of this source tree.
380
+ */const _d=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]],mx=G("wrench",_d);/**
381
+ * @license lucide-react v0.511.0 - ISC
382
+ *
383
+ * This source code is licensed under the ISC license.
384
+ * See the LICENSE file in the root directory of this source tree.
385
+ */const Ed=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],yx=G("zap",Ed);var Ei={exports:{}},Si={};/**
386
+ * @license React
387
+ * use-sync-external-store-shim.production.js
388
+ *
389
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
390
+ *
391
+ * This source code is licensed under the MIT license found in the
392
+ * LICENSE file in the root directory of this source tree.
393
+ */var Uo;function Sd(){if(Uo)return Si;Uo=1;var e=mn();function t(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,s=e.useDebugValue;function l(f,d){var h=d(),g=r({inst:{value:h,getSnapshot:d}}),m=g[0].inst,v=g[1];return o(function(){m.value=h,m.getSnapshot=d,c(m)&&v({inst:m})},[f,h,d]),i(function(){return c(m)&&v({inst:m}),f(function(){c(m)&&v({inst:m})})},[f]),s(h),h}function c(f){var d=f.getSnapshot;f=f.value;try{var h=d();return!n(f,h)}catch{return!0}}function a(f,d){return d()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?a:l;return Si.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Si}var Go;function Cd(){return Go||(Go=1,Ei.exports=Sd()),Ei.exports}function co(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ft=co();function Ma(e){Ft=e}var Hn={exec:()=>null};function ye(e,t=""){let n=typeof e=="string"?e:e.source;const r={replace:(i,o)=>{let s=typeof o=="string"?o:o.source;return s=s.replace(Me.caret,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,t)};return r}var Me={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Nd=/^(?:[ \t]*(?:\n|$))+/,Td=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ad=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Qn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Rd=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,uo=/(?:[*+-]|\d{1,9}[.)])/,Da=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Pa=ye(Da).replace(/bull/g,uo).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),jd=ye(Da).replace(/bull/g,uo).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),fo=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Md=/^[^\n]+/,ho=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Dd=ye(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ho).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Pd=ye(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,uo).getRegex(),Qr="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",po=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Od=ye("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",po).replace("tag",Qr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Oa=ye(fo).replace("hr",Qn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qr).getRegex(),Id=ye(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Oa).getRegex(),go={blockquote:Id,code:Td,def:Dd,fences:Ad,heading:Rd,hr:Qn,html:Od,lheading:Pa,list:Pd,newline:Nd,paragraph:Oa,table:Hn,text:Md},Wo=ye("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Qn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qr).getRegex(),$d={...go,lheading:jd,table:Wo,paragraph:ye(fo).replace("hr",Qn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Wo).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qr).getRegex()},Ld={...go,html:ye(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",po).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Hn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ye(fo).replace("hr",Qn).replace("heading",` *#{1,6} *[^
394
+ ]`).replace("lheading",Pa).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},zd=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Hd=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ia=/^( {2,}|\\)\n(?!\s*$)/,Vd=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Jr=/[\p{P}\p{S}]/u,mo=/[\s\p{P}\p{S}]/u,$a=/[^\s\p{P}\p{S}]/u,Bd=ye(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,mo).getRegex(),La=/(?!~)[\p{P}\p{S}]/u,Fd=/(?!~)[\s\p{P}\p{S}]/u,qd=/(?:[^\s\p{P}\p{S}]|~)/u,Yd=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,za=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Xd=ye(za,"u").replace(/punct/g,Jr).getRegex(),Ud=ye(za,"u").replace(/punct/g,La).getRegex(),Ha="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Gd=ye(Ha,"gu").replace(/notPunctSpace/g,$a).replace(/punctSpace/g,mo).replace(/punct/g,Jr).getRegex(),Wd=ye(Ha,"gu").replace(/notPunctSpace/g,qd).replace(/punctSpace/g,Fd).replace(/punct/g,La).getRegex(),Kd=ye("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,$a).replace(/punctSpace/g,mo).replace(/punct/g,Jr).getRegex(),Zd=ye(/\\(punct)/,"gu").replace(/punct/g,Jr).getRegex(),Qd=ye(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Jd=ye(po).replace("(?:-->|$)","-->").getRegex(),ef=ye("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Jd).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Pr=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,tf=ye(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Pr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Va=ye(/^!?\[(label)\]\[(ref)\]/).replace("label",Pr).replace("ref",ho).getRegex(),Ba=ye(/^!?\[(ref)\](?:\[\])?/).replace("ref",ho).getRegex(),nf=ye("reflink|nolink(?!\\()","g").replace("reflink",Va).replace("nolink",Ba).getRegex(),yo={_backpedal:Hn,anyPunctuation:Zd,autolink:Qd,blockSkip:Yd,br:Ia,code:Hd,del:Hn,emStrongLDelim:Xd,emStrongRDelimAst:Gd,emStrongRDelimUnd:Kd,escape:zd,link:tf,nolink:Ba,punctuation:Bd,reflink:Va,reflinkSearch:nf,tag:ef,text:Vd,url:Hn},rf={...yo,link:ye(/^!?\[(label)\]\((.*?)\)/).replace("label",Pr).getRegex(),reflink:ye(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Pr).getRegex()},Bi={...yo,emStrongRDelimAst:Wd,emStrongLDelim:Ud,url:ye(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},of={...Bi,br:ye(Ia).replace("{2,}","*").getRegex(),text:ye(Bi.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},gr={normal:go,gfm:$d,pedantic:Ld},Sn={normal:yo,gfm:Bi,breaks:of,pedantic:rf},sf={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ko=e=>sf[e];function rt(e,t){if(t){if(Me.escapeTest.test(e))return e.replace(Me.escapeReplace,Ko)}else if(Me.escapeTestNoEncode.test(e))return e.replace(Me.escapeReplaceNoEncode,Ko);return e}function Zo(e){try{e=encodeURI(e).replace(Me.percentDecode,"%")}catch{return null}return e}function Qo(e,t){var o;const n=e.replace(Me.findPipe,(s,l,c)=>{let a=!1,u=l;for(;--u>=0&&c[u]==="\\";)a=!a;return a?"|":" |"}),r=n.split(Me.splitPipe);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!((o=r.at(-1))!=null&&o.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(Me.slashPipe,"|");return r}function Cn(e,t,n){const r=e.length;if(r===0)return"";let i=0;for(;i<r&&e.charAt(r-i-1)===t;)i++;return e.slice(0,r-i)}function af(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Jo(e,t,n,r,i){const o=t.href,s=t.title||null,l=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;const c={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:s,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,c}function lf(e,t,n){const r=e.match(n.other.indentCodeCompensation);if(r===null)return t;const i=r[1];return t.split(`
395
+ `).map(o=>{const s=o.match(n.other.beginningSpace);if(s===null)return o;const[l]=s;return l.length>=i.length?o.slice(i.length):o}).join(`
396
+ `)}var Or=class{constructor(e){we(this,"options");we(this,"rules");we(this,"lexer");this.options=e||Ft}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Cn(n,`
397
+ `)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],r=lf(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){const r=Cn(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Cn(t[0],`
398
+ `)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let n=Cn(t[0],`
399
+ `).split(`
400
+ `),r="",i="";const o=[];for(;n.length>0;){let s=!1;const l=[];let c;for(c=0;c<n.length;c++)if(this.rules.other.blockquoteStart.test(n[c]))l.push(n[c]),s=!0;else if(!s)l.push(n[c]);else break;n=n.slice(c);const a=l.join(`
401
+ `),u=a.replace(this.rules.other.blockquoteSetextReplace,`
402
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
403
+ ${a}`:a,i=i?`${i}
404
+ ${u}`:u;const f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=f,n.length===0)break;const d=o.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){const h=d,g=h.raw+`
405
+ `+n.join(`
406
+ `),m=this.blockquote(g);o[o.length-1]=m,r=r.substring(0,r.length-h.raw.length)+m.raw,i=i.substring(0,i.length-h.text.length)+m.text;break}else if((d==null?void 0:d.type)==="list"){const h=d,g=h.raw+`
407
+ `+n.join(`
408
+ `),m=this.list(g);o[o.length-1]=m,r=r.substring(0,r.length-d.raw.length)+m.raw,i=i.substring(0,i.length-h.raw.length)+m.raw,n=g.substring(o.at(-1).raw.length).split(`
409
+ `);continue}}return{type:"blockquote",raw:r,tokens:o,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const o=this.rules.other.listItemRegex(n);let s=!1;for(;e;){let c=!1,a="",u="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;a=t[0],e=e.substring(a.length);let f=t[2].split(`
410
+ `,1)[0].replace(this.rules.other.listReplaceTabs,w=>" ".repeat(3*w.length)),d=e.split(`
411
+ `,1)[0],h=!f.trim(),g=0;if(this.options.pedantic?(g=2,u=f.trimStart()):h?g=t[1].length+1:(g=t[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,u=f.slice(g),g+=t[1].length),h&&this.rules.other.blankLine.test(d)&&(a+=d+`
412
+ `,e=e.substring(d.length+1),c=!0),!c){const w=this.rules.other.nextBulletRegex(g),C=this.rules.other.hrRegex(g),y=this.rules.other.fencesBeginRegex(g),_=this.rules.other.headingBeginRegex(g),p=this.rules.other.htmlBeginRegex(g);for(;e;){const k=e.split(`
413
+ `,1)[0];let S;if(d=k,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),S=d):S=d.replace(this.rules.other.tabCharGlobal," "),y.test(d)||_.test(d)||p.test(d)||w.test(d)||C.test(d))break;if(S.search(this.rules.other.nonSpaceChar)>=g||!d.trim())u+=`
414
+ `+S.slice(g);else{if(h||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||y.test(f)||_.test(f)||C.test(f))break;u+=`
415
+ `+d}!h&&!d.trim()&&(h=!0),a+=k+`
416
+ `,e=e.substring(k.length+1),f=S.slice(g)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(a)&&(s=!0));let m=null,v;this.options.gfm&&(m=this.rules.other.listIsTask.exec(u),m&&(v=m[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:a,task:!!m,checked:v,loose:!1,text:u,tokens:[]}),i.raw+=a}const l=i.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let c=0;c<i.items.length;c++)if(this.lexer.state.top=!1,i.items[c].tokens=this.lexer.blockTokens(i.items[c].text,[]),!i.loose){const a=i.items[c].tokens.filter(f=>f.type==="space"),u=a.length>0&&a.some(f=>this.rules.other.anyLine.test(f.raw));i.loose=u}if(i.loose)for(let c=0;c<i.items.length;c++)i.items[c].loose=!0;return i}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:i}}}table(e){var s;const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const n=Qo(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(s=t[3])!=null&&s.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
417
+ `):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const l of r)this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<n.length;l++)o.header.push({text:n[l],tokens:this.lexer.inline(n[l]),header:!0,align:o.align[l]});for(const l of i)o.rows.push(Qo(l,o.header.length).map((c,a)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:o.align[a]})));return o}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const n=t[1].charAt(t[1].length-1)===`
418
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;const o=Cn(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{const o=af(t[2],"()");if(o===-2)return;if(o>-1){const l=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){const o=this.rules.other.pedanticHrefTitle.exec(r);o&&(r=o[1],i=o[3])}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),Jo(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[r.toLowerCase()];if(!i){const o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return Jo(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const o=[...r[0]].length-1;let s,l,c=o,a=0;const u=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+o);(r=u.exec(t))!=null;){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(l=[...s].length,r[3]||r[4]){c+=l;continue}else if((r[5]||r[6])&&o%3&&!((o+l)%3)){a+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+a);const f=[...r[0]][0].length,d=e.slice(0,o+r.index+f+l);if(Math.min(o,l)%2){const g=d.slice(1,-1);return{type:"em",raw:d,text:g,tokens:this.lexer.inlineTokens(g)}}const h=d.slice(2,-2);return{type:"strong",raw:d,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," ");const r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let r,i;if(t[2]==="@")r=t[0],i="mailto:"+r;else{let o;do o=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(o!==t[0]);r=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},pt=class Fi{constructor(t){we(this,"tokens");we(this,"options");we(this,"state");we(this,"tokenizer");we(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ft,this.options.tokenizer=this.options.tokenizer||new Or,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={other:Me,block:gr.normal,inline:Sn.normal};this.options.pedantic?(n.block=gr.pedantic,n.inline=Sn.pedantic):this.options.gfm&&(n.block=gr.gfm,this.options.breaks?n.inline=Sn.breaks:n.inline=Sn.gfm),this.tokenizer.rules=n}static get rules(){return{block:gr,inline:Sn}}static lex(t,n){return new Fi(n).lex(t)}static lexInline(t,n){return new Fi(n).inlineTokens(t)}lex(t){t=t.replace(Me.carriageReturn,`
419
+ `),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){const r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){var i,o,s;for(this.options.pedantic&&(t=t.replace(Me.tabCharGlobal," ").replace(Me.spaceLine,""));t;){let l;if((o=(i=this.options.extensions)==null?void 0:i.block)!=null&&o.some(a=>(l=a.call({lexer:this},t,n))?(t=t.substring(l.raw.length),n.push(l),!0):!1))continue;if(l=this.tokenizer.space(t)){t=t.substring(l.raw.length);const a=n.at(-1);l.raw.length===1&&a!==void 0?a.raw+=`
420
+ `:n.push(l);continue}if(l=this.tokenizer.code(t)){t=t.substring(l.raw.length);const a=n.at(-1);(a==null?void 0:a.type)==="paragraph"||(a==null?void 0:a.type)==="text"?(a.raw+=`
421
+ `+l.raw,a.text+=`
422
+ `+l.text,this.inlineQueue.at(-1).src=a.text):n.push(l);continue}if(l=this.tokenizer.fences(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.heading(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.hr(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.blockquote(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.list(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.html(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.def(t)){t=t.substring(l.raw.length);const a=n.at(-1);(a==null?void 0:a.type)==="paragraph"||(a==null?void 0:a.type)==="text"?(a.raw+=`
423
+ `+l.raw,a.text+=`
424
+ `+l.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title});continue}if(l=this.tokenizer.table(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.lheading(t)){t=t.substring(l.raw.length),n.push(l);continue}let c=t;if((s=this.options.extensions)!=null&&s.startBlock){let a=1/0;const u=t.slice(1);let f;this.options.extensions.startBlock.forEach(d=>{f=d.call({lexer:this},u),typeof f=="number"&&f>=0&&(a=Math.min(a,f))}),a<1/0&&a>=0&&(c=t.substring(0,a+1))}if(this.state.top&&(l=this.tokenizer.paragraph(c))){const a=n.at(-1);r&&(a==null?void 0:a.type)==="paragraph"?(a.raw+=`
425
+ `+l.raw,a.text+=`
426
+ `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(l),r=c.length!==t.length,t=t.substring(l.raw.length);continue}if(l=this.tokenizer.text(t)){t=t.substring(l.raw.length);const a=n.at(-1);(a==null?void 0:a.type)==="text"?(a.raw+=`
427
+ `+l.raw,a.text+=`
428
+ `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(l);continue}if(t){const a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var l,c,a;let r=t,i=null;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)u.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let o=!1,s="";for(;t;){o||(s=""),o=!1;let u;if((c=(l=this.options.extensions)==null?void 0:l.inline)!=null&&c.some(d=>(u=d.call({lexer:this},t,n))?(t=t.substring(u.raw.length),n.push(u),!0):!1))continue;if(u=this.tokenizer.escape(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.tag(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.link(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(u.raw.length);const d=n.at(-1);u.type==="text"&&(d==null?void 0:d.type)==="text"?(d.raw+=u.raw,d.text+=u.text):n.push(u);continue}if(u=this.tokenizer.emStrong(t,r,s)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.codespan(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.br(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.del(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.autolink(t)){t=t.substring(u.raw.length),n.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(t))){t=t.substring(u.raw.length),n.push(u);continue}let f=t;if((a=this.options.extensions)!=null&&a.startInline){let d=1/0;const h=t.slice(1);let g;this.options.extensions.startInline.forEach(m=>{g=m.call({lexer:this},h),typeof g=="number"&&g>=0&&(d=Math.min(d,g))}),d<1/0&&d>=0&&(f=t.substring(0,d+1))}if(u=this.tokenizer.inlineText(f)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(s=u.raw.slice(-1)),o=!0;const d=n.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=u.raw,d.text+=u.text):n.push(u);continue}if(t){const d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return n}},Ir=class{constructor(e){we(this,"options");we(this,"parser");this.options=e||Ft}space(e){return""}code({text:e,lang:t,escaped:n}){var o;const r=(o=(t||"").match(Me.notSpaceStart))==null?void 0:o[0],i=e.replace(Me.endingNewline,"")+`
429
+ `;return r?'<pre><code class="language-'+rt(r)+'">'+(n?i:rt(i,!0))+`</code></pre>
430
+ `:"<pre><code>"+(n?i:rt(i,!0))+`</code></pre>
431
+ `}blockquote({tokens:e}){return`<blockquote>
432
+ ${this.parser.parse(e)}</blockquote>
433
+ `}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
434
+ `}hr(e){return`<hr>
435
+ `}list(e){const t=e.ordered,n=e.start;let r="";for(let s=0;s<e.items.length;s++){const l=e.items[s];r+=this.listitem(l)}const i=t?"ol":"ul",o=t&&n!==1?' start="'+n+'"':"";return"<"+i+o+`>
436
+ `+r+"</"+i+`>
437
+ `}listitem(e){var n;let t="";if(e.task){const r=this.checkbox({checked:!!e.checked});e.loose?((n=e.tokens[0])==null?void 0:n.type)==="paragraph"?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=r+" "+rt(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):t+=r+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
438
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
439
+ `}table(e){let t="",n="";for(let i=0;i<e.header.length;i++)n+=this.tablecell(e.header[i]);t+=this.tablerow({text:n});let r="";for(let i=0;i<e.rows.length;i++){const o=e.rows[i];n="";for(let s=0;s<o.length;s++)n+=this.tablecell(o[s]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
440
+ <thead>
441
+ `+t+`</thead>
442
+ `+r+`</table>
443
+ `}tablerow({text:e}){return`<tr>
444
+ ${e}</tr>
445
+ `}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
446
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${rt(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){const r=this.parser.parseInline(n),i=Zo(e);if(i===null)return r;e=i;let o='<a href="'+e+'"';return t&&(o+=' title="'+rt(t)+'"'),o+=">"+r+"</a>",o}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));const i=Zo(e);if(i===null)return rt(n);e=i;let o=`<img src="${e}" alt="${n}"`;return t&&(o+=` title="${rt(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:rt(e.text)}},vo=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},gt=class qi{constructor(t){we(this,"options");we(this,"renderer");we(this,"textRenderer");this.options=t||Ft,this.options.renderer=this.options.renderer||new Ir,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new vo}static parse(t,n){return new qi(n).parse(t)}static parseInline(t,n){return new qi(n).parseInline(t)}parse(t,n=!0){var i,o;let r="";for(let s=0;s<t.length;s++){const l=t[s];if((o=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&o[l.type]){const a=l,u=this.options.extensions.renderers[a.type].call({parser:this},a);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){r+=u||"";continue}}const c=l;switch(c.type){case"space":{r+=this.renderer.space(c);continue}case"hr":{r+=this.renderer.hr(c);continue}case"heading":{r+=this.renderer.heading(c);continue}case"code":{r+=this.renderer.code(c);continue}case"table":{r+=this.renderer.table(c);continue}case"blockquote":{r+=this.renderer.blockquote(c);continue}case"list":{r+=this.renderer.list(c);continue}case"html":{r+=this.renderer.html(c);continue}case"paragraph":{r+=this.renderer.paragraph(c);continue}case"text":{let a=c,u=this.renderer.text(a);for(;s+1<t.length&&t[s+1].type==="text";)a=t[++s],u+=`
447
+ `+this.renderer.text(a);n?r+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):r+=u;continue}default:{const a='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return r}parseInline(t,n=this.renderer){var i,o;let r="";for(let s=0;s<t.length;s++){const l=t[s];if((o=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&o[l.type]){const a=this.options.extensions.renderers[l.type].call({parser:this},l);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){r+=a||"";continue}}const c=l;switch(c.type){case"escape":{r+=n.text(c);break}case"html":{r+=n.html(c);break}case"link":{r+=n.link(c);break}case"image":{r+=n.image(c);break}case"strong":{r+=n.strong(c);break}case"em":{r+=n.em(c);break}case"codespan":{r+=n.codespan(c);break}case"br":{r+=n.br(c);break}case"del":{r+=n.del(c);break}case"text":{r+=n.text(c);break}default:{const a='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return r}},Vi,Nr=(Vi=class{constructor(e){we(this,"options");we(this,"block");this.options=e||Ft}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?pt.lex:pt.lexInline}provideParser(){return this.block?gt.parse:gt.parseInline}},we(Vi,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Vi),cf=class{constructor(...e){we(this,"defaults",co());we(this,"options",this.setOptions);we(this,"parse",this.parseMarkdown(!0));we(this,"parseInline",this.parseMarkdown(!1));we(this,"Parser",gt);we(this,"Renderer",Ir);we(this,"TextRenderer",vo);we(this,"Lexer",pt);we(this,"Tokenizer",Or);we(this,"Hooks",Nr);this.use(...e)}walkTokens(e,t){var r,i;let n=[];for(const o of e)switch(n=n.concat(t.call(this,o)),o.type){case"table":{const s=o;for(const l of s.header)n=n.concat(this.walkTokens(l.tokens,t));for(const l of s.rows)for(const c of l)n=n.concat(this.walkTokens(c.tokens,t));break}case"list":{const s=o;n=n.concat(this.walkTokens(s.items,t));break}default:{const s=o;(i=(r=this.defaults.extensions)==null?void 0:r.childTokens)!=null&&i[s.type]?this.defaults.extensions.childTokens[s.type].forEach(l=>{const c=s[l].flat(1/0);n=n.concat(this.walkTokens(c,t))}):s.tokens&&(n=n.concat(this.walkTokens(s.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{const r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const o=t.renderers[i.name];o?t.renderers[i.name]=function(...s){let l=i.renderer.apply(this,s);return l===!1&&(l=o.apply(this,s)),l}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=t[i.level];o?o.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),r.extensions=t),n.renderer){const i=this.defaults.renderer||new Ir(this.defaults);for(const o in n.renderer){if(!(o in i))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const s=o,l=n.renderer[s],c=i[s];i[s]=(...a)=>{let u=l.apply(i,a);return u===!1&&(u=c.apply(i,a)),u||""}}r.renderer=i}if(n.tokenizer){const i=this.defaults.tokenizer||new Or(this.defaults);for(const o in n.tokenizer){if(!(o in i))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const s=o,l=n.tokenizer[s],c=i[s];i[s]=(...a)=>{let u=l.apply(i,a);return u===!1&&(u=c.apply(i,a)),u}}r.tokenizer=i}if(n.hooks){const i=this.defaults.hooks||new Nr;for(const o in n.hooks){if(!(o in i))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const s=o,l=n.hooks[s],c=i[s];Nr.passThroughHooks.has(o)?i[s]=a=>{if(this.defaults.async)return Promise.resolve(l.call(i,a)).then(f=>c.call(i,f));const u=l.call(i,a);return c.call(i,u)}:i[s]=(...a)=>{let u=l.apply(i,a);return u===!1&&(u=c.apply(i,a)),u}}r.hooks=i}if(n.walkTokens){const i=this.defaults.walkTokens,o=n.walkTokens;r.walkTokens=function(s){let l=[];return l.push(o.call(this,s)),i&&(l=l.concat(i.call(this,s))),l}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return pt.lex(e,t??this.defaults)}parser(e,t){return gt.parse(e,t??this.defaults)}parseMarkdown(e){return(n,r)=>{const i={...r},o={...this.defaults,...i},s=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&i.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const l=o.hooks?o.hooks.provideLexer():e?pt.lex:pt.lexInline,c=o.hooks?o.hooks.provideParser():e?gt.parse:gt.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(n):n).then(a=>l(a,o)).then(a=>o.hooks?o.hooks.processAllTokens(a):a).then(a=>o.walkTokens?Promise.all(this.walkTokens(a,o.walkTokens)).then(()=>a):a).then(a=>c(a,o)).then(a=>o.hooks?o.hooks.postprocess(a):a).catch(s);try{o.hooks&&(n=o.hooks.preprocess(n));let a=l(n,o);o.hooks&&(a=o.hooks.processAllTokens(a)),o.walkTokens&&this.walkTokens(a,o.walkTokens);let u=c(a,o);return o.hooks&&(u=o.hooks.postprocess(u)),u}catch(a){return s(a)}}}onError(e,t){return n=>{if(n.message+=`
448
+ Please report this to https://github.com/markedjs/marked.`,e){const r="<p>An error occurred:</p><pre>"+rt(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}},Lt=new cf;function xe(e,t){return Lt.parse(e,t)}xe.options=xe.setOptions=function(e){return Lt.setOptions(e),xe.defaults=Lt.defaults,Ma(xe.defaults),xe};xe.getDefaults=co;xe.defaults=Ft;xe.use=function(...e){return Lt.use(...e),xe.defaults=Lt.defaults,Ma(xe.defaults),xe};xe.walkTokens=function(e,t){return Lt.walkTokens(e,t)};xe.parseInline=Lt.parseInline;xe.Parser=gt;xe.parser=gt.parse;xe.Renderer=Ir;xe.TextRenderer=vo;xe.Lexer=pt;xe.lexer=pt.lex;xe.Tokenizer=Or;xe.Hooks=Nr;xe.parse=xe;xe.options;xe.setOptions;xe.use;xe.walkTokens;xe.parseInline;gt.parse;pt.lex;var Nn={},Kt={},mr={},Tt={},At={},Ci={},es;function Fa(){return es||(es=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var t;(function(r){r.Root="root",r.Text="text",r.Directive="directive",r.Comment="comment",r.Script="script",r.Style="style",r.Tag="tag",r.CDATA="cdata",r.Doctype="doctype"})(t=e.ElementType||(e.ElementType={}));function n(r){return r.type===t.Tag||r.type===t.Script||r.type===t.Style}e.isTag=n,e.Root=t.Root,e.Text=t.Text,e.Directive=t.Directive,e.Comment=t.Comment,e.Script=t.Script,e.Style=t.Style,e.Tag=t.Tag,e.CDATA=t.CDATA,e.Doctype=t.Doctype}(Ci)),Ci}var se={},ts;function ns(){if(ts)return se;ts=1;var e=se&&se.__extends||function(){var p=function(k,S){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,M){N.__proto__=M}||function(N,M){for(var H in M)Object.prototype.hasOwnProperty.call(M,H)&&(N[H]=M[H])},p(k,S)};return function(k,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");p(k,S);function N(){this.constructor=k}k.prototype=S===null?Object.create(S):(N.prototype=S.prototype,new N)}}(),t=se&&se.__assign||function(){return t=Object.assign||function(p){for(var k,S=1,N=arguments.length;S<N;S++){k=arguments[S];for(var M in k)Object.prototype.hasOwnProperty.call(k,M)&&(p[M]=k[M])}return p},t.apply(this,arguments)};Object.defineProperty(se,"__esModule",{value:!0}),se.cloneNode=se.hasChildren=se.isDocument=se.isDirective=se.isComment=se.isText=se.isCDATA=se.isTag=se.Element=se.Document=se.CDATA=se.NodeWithChildren=se.ProcessingInstruction=se.Comment=se.Text=se.DataNode=se.Node=void 0;var n=Fa(),r=function(){function p(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(p.prototype,"parentNode",{get:function(){return this.parent},set:function(k){this.parent=k},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"previousSibling",{get:function(){return this.prev},set:function(k){this.prev=k},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"nextSibling",{get:function(){return this.next},set:function(k){this.next=k},enumerable:!1,configurable:!0}),p.prototype.cloneNode=function(k){return k===void 0&&(k=!1),y(this,k)},p}();se.Node=r;var i=function(p){e(k,p);function k(S){var N=p.call(this)||this;return N.data=S,N}return Object.defineProperty(k.prototype,"nodeValue",{get:function(){return this.data},set:function(S){this.data=S},enumerable:!1,configurable:!0}),k}(r);se.DataNode=i;var o=function(p){e(k,p);function k(){var S=p!==null&&p.apply(this,arguments)||this;return S.type=n.ElementType.Text,S}return Object.defineProperty(k.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),k}(i);se.Text=o;var s=function(p){e(k,p);function k(){var S=p!==null&&p.apply(this,arguments)||this;return S.type=n.ElementType.Comment,S}return Object.defineProperty(k.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),k}(i);se.Comment=s;var l=function(p){e(k,p);function k(S,N){var M=p.call(this,N)||this;return M.name=S,M.type=n.ElementType.Directive,M}return Object.defineProperty(k.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),k}(i);se.ProcessingInstruction=l;var c=function(p){e(k,p);function k(S){var N=p.call(this)||this;return N.children=S,N}return Object.defineProperty(k.prototype,"firstChild",{get:function(){var S;return(S=this.children[0])!==null&&S!==void 0?S:null},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"childNodes",{get:function(){return this.children},set:function(S){this.children=S},enumerable:!1,configurable:!0}),k}(r);se.NodeWithChildren=c;var a=function(p){e(k,p);function k(){var S=p!==null&&p.apply(this,arguments)||this;return S.type=n.ElementType.CDATA,S}return Object.defineProperty(k.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),k}(c);se.CDATA=a;var u=function(p){e(k,p);function k(){var S=p!==null&&p.apply(this,arguments)||this;return S.type=n.ElementType.Root,S}return Object.defineProperty(k.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),k}(c);se.Document=u;var f=function(p){e(k,p);function k(S,N,M,H){M===void 0&&(M=[]),H===void 0&&(H=S==="script"?n.ElementType.Script:S==="style"?n.ElementType.Style:n.ElementType.Tag);var I=p.call(this,M)||this;return I.name=S,I.attribs=N,I.type=H,I}return Object.defineProperty(k.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"tagName",{get:function(){return this.name},set:function(S){this.name=S},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"attributes",{get:function(){var S=this;return Object.keys(this.attribs).map(function(N){var M,H;return{name:N,value:S.attribs[N],namespace:(M=S["x-attribsNamespace"])===null||M===void 0?void 0:M[N],prefix:(H=S["x-attribsPrefix"])===null||H===void 0?void 0:H[N]}})},enumerable:!1,configurable:!0}),k}(c);se.Element=f;function d(p){return(0,n.isTag)(p)}se.isTag=d;function h(p){return p.type===n.ElementType.CDATA}se.isCDATA=h;function g(p){return p.type===n.ElementType.Text}se.isText=g;function m(p){return p.type===n.ElementType.Comment}se.isComment=m;function v(p){return p.type===n.ElementType.Directive}se.isDirective=v;function w(p){return p.type===n.ElementType.Root}se.isDocument=w;function C(p){return Object.prototype.hasOwnProperty.call(p,"children")}se.hasChildren=C;function y(p,k){k===void 0&&(k=!1);var S;if(g(p))S=new o(p.data);else if(m(p))S=new s(p.data);else if(d(p)){var N=k?_(p.children):[],M=new f(p.name,t({},p.attribs),N);N.forEach(function(O){return O.parent=M}),p.namespace!=null&&(M.namespace=p.namespace),p["x-attribsNamespace"]&&(M["x-attribsNamespace"]=t({},p["x-attribsNamespace"])),p["x-attribsPrefix"]&&(M["x-attribsPrefix"]=t({},p["x-attribsPrefix"])),S=M}else if(h(p)){var N=k?_(p.children):[],H=new a(N);N.forEach(function(b){return b.parent=H}),S=H}else if(w(p)){var N=k?_(p.children):[],I=new u(N);N.forEach(function(b){return b.parent=I}),p["x-mode"]&&(I["x-mode"]=p["x-mode"]),S=I}else if(v(p)){var z=new l(p.name,p.data);p["x-name"]!=null&&(z["x-name"]=p["x-name"],z["x-publicId"]=p["x-publicId"],z["x-systemId"]=p["x-systemId"]),S=z}else throw new Error("Not implemented yet: ".concat(p.type));return S.startIndex=p.startIndex,S.endIndex=p.endIndex,p.sourceCodeLocation!=null&&(S.sourceCodeLocation=p.sourceCodeLocation),S}se.cloneNode=y;function _(p){for(var k=p.map(function(N){return y(N,!0)}),S=1;S<k.length;S++)k[S].prev=k[S-1],k[S-1].next=k[S];return k}return se}var rs;function qa(){return rs||(rs=1,function(e){var t=At&&At.__createBinding||(Object.create?function(l,c,a,u){u===void 0&&(u=a);var f=Object.getOwnPropertyDescriptor(c,a);(!f||("get"in f?!c.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return c[a]}}),Object.defineProperty(l,u,f)}:function(l,c,a,u){u===void 0&&(u=a),l[u]=c[a]}),n=At&&At.__exportStar||function(l,c){for(var a in l)a!=="default"&&!Object.prototype.hasOwnProperty.call(c,a)&&t(c,l,a)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var r=Fa(),i=ns();n(ns(),e);var o={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function l(c,a,u){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof a=="function"&&(u=a,a=o),typeof c=="object"&&(a=c,c=void 0),this.callback=c??null,this.options=a??o,this.elementCB=u??null}return l.prototype.onparserinit=function(c){this.parser=c},l.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},l.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},l.prototype.onerror=function(c){this.handleCallback(c)},l.prototype.onclosetag=function(){this.lastNode=null;var c=this.tagStack.pop();this.options.withEndIndices&&(c.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(c)},l.prototype.onopentag=function(c,a){var u=this.options.xmlMode?r.ElementType.Tag:void 0,f=new i.Element(c,a,void 0,u);this.addNode(f),this.tagStack.push(f)},l.prototype.ontext=function(c){var a=this.lastNode;if(a&&a.type===r.ElementType.Text)a.data+=c,this.options.withEndIndices&&(a.endIndex=this.parser.endIndex);else{var u=new i.Text(c);this.addNode(u),this.lastNode=u}},l.prototype.oncomment=function(c){if(this.lastNode&&this.lastNode.type===r.ElementType.Comment){this.lastNode.data+=c;return}var a=new i.Comment(c);this.addNode(a),this.lastNode=a},l.prototype.oncommentend=function(){this.lastNode=null},l.prototype.oncdatastart=function(){var c=new i.Text(""),a=new i.CDATA([c]);this.addNode(a),c.parent=a,this.lastNode=c},l.prototype.oncdataend=function(){this.lastNode=null},l.prototype.onprocessinginstruction=function(c,a){var u=new i.ProcessingInstruction(c,a);this.addNode(u)},l.prototype.handleCallback=function(c){if(typeof this.callback=="function")this.callback(c,this.dom);else if(c)throw c},l.prototype.addNode=function(c){var a=this.tagStack[this.tagStack.length-1],u=a.children[a.children.length-1];this.options.withStartIndices&&(c.startIndex=this.parser.startIndex),this.options.withEndIndices&&(c.endIndex=this.parser.endIndex),a.children.push(c),u&&(c.prev=u,u.next=c),c.parent=a,this.lastNode=null},l}();e.DomHandler=s,e.default=s}(At)),At}var Ni={},is;function uf(){return is||(is=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=e.CARRIAGE_RETURN_PLACEHOLDER=e.CARRIAGE_RETURN_REGEX=e.CARRIAGE_RETURN=e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES=void 0,e.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES.reduce(function(t,n){return t[n.toLowerCase()]=n,t},{}),e.CARRIAGE_RETURN="\r",e.CARRIAGE_RETURN_REGEX=new RegExp(e.CARRIAGE_RETURN,"g"),e.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(),"__"),e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(e.CARRIAGE_RETURN_PLACEHOLDER,"g")}(Ni)),Ni}var os;function Ya(){if(os)return Tt;os=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.formatAttributes=r,Tt.escapeSpecialCharacters=o,Tt.revertEscapedCharacters=s,Tt.formatDOM=l;var e=qa(),t=uf();function n(c){return t.CASE_SENSITIVE_TAG_NAMES_MAP[c]}function r(c){for(var a={},u=0,f=c.length;u<f;u++){var d=c[u];a[d.name]=d.value}return a}function i(c){c=c.toLowerCase();var a=n(c);return a||c}function o(c){return c.replace(t.CARRIAGE_RETURN_REGEX,t.CARRIAGE_RETURN_PLACEHOLDER)}function s(c){return c.replace(t.CARRIAGE_RETURN_PLACEHOLDER_REGEX,t.CARRIAGE_RETURN)}function l(c,a,u){a===void 0&&(a=null);for(var f=[],d,h=0,g=c.length;h<g;h++){var m=c[h];switch(m.nodeType){case 1:{var v=i(m.nodeName);d=new e.Element(v,r(m.attributes)),d.children=l(v==="template"?m.content.childNodes:m.childNodes,d);break}case 3:d=new e.Text(s(m.nodeValue));break;case 8:d=new e.Comment(m.nodeValue);break;default:continue}var w=f[h-1]||null;w&&(w.next=d),d.parent=a,d.prev=w,d.next=null,f.push(d)}return u&&(d=new e.ProcessingInstruction(u.substring(0,u.indexOf(" ")).toLowerCase(),u),d.next=f[0]||null,d.parent=a,f.unshift(d),f[1]&&(f[1].prev=f[0])),f}return Tt}var ss;function df(){if(ss)return mr;ss=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.default=m;var e=Ya(),t="html",n="head",r="body",i=/<([a-zA-Z]+[0-9]?)/,o=/<head[^]*>/i,s=/<body[^]*>/i,l=function(v,w){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(v,w){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},a=typeof window=="object"&&window.DOMParser;if(typeof a=="function"){var u=new a,f="text/html";c=function(v,w){return w&&(v="<".concat(w,">").concat(v,"</").concat(w,">")),u.parseFromString(v,f)},l=c}if(typeof document=="object"&&document.implementation){var d=document.implementation.createHTMLDocument();l=function(v,w){if(w){var C=d.documentElement.querySelector(w);return C&&(C.innerHTML=v),d}return d.documentElement.innerHTML=v,d}}var h=typeof document=="object"&&document.createElement("template"),g;h&&h.content&&(g=function(v){return h.innerHTML=v,h.content.childNodes});function m(v){var w,C;v=(0,e.escapeSpecialCharacters)(v);var y=v.match(i),_=y&&y[1]?y[1].toLowerCase():"";switch(_){case t:{var p=c(v);if(!o.test(v)){var k=p.querySelector(n);(w=k==null?void 0:k.parentNode)===null||w===void 0||w.removeChild(k)}if(!s.test(v)){var k=p.querySelector(r);(C=k==null?void 0:k.parentNode)===null||C===void 0||C.removeChild(k)}return p.querySelectorAll(t)}case n:case r:{var S=l(v).querySelectorAll(_);return s.test(v)&&o.test(v)?S[0].parentNode.childNodes:S}default:{if(g)return g(v);var k=l(v,r).querySelector(r);return k.childNodes}}}return mr}var as;function ff(){if(as)return Kt;as=1;var e=Kt&&Kt.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.default=i;var t=e(df()),n=Ya(),r=/<(![a-zA-Z\s]+)>/;function i(o){if(typeof o!="string")throw new TypeError("First argument must be a string");if(!o)return[];var s=o.match(r),l=s?s[1]:void 0;return(0,n.formatDOM)((0,t.default)(o),null,l)}return Kt}var yr={},Ke={},Tn={},ls;function hf(){if(ls)return Tn;ls=1;var e=0;Tn.SAME=e;var t=1;return Tn.CAMELCASE=t,Tn.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1},Tn}var cs;function pf(){if(cs)return Ke;cs=1;const e=0,t=1,n=2,r=3,i=4,o=5,s=6;function l(p){return a.hasOwnProperty(p)?a[p]:null}function c(p,k,S,N,M,H,I){this.acceptsBooleans=k===n||k===r||k===i,this.attributeName=N,this.attributeNamespace=M,this.mustUseProperty=S,this.propertyName=p,this.type=k,this.sanitizeURL=H,this.removeEmptyString=I}const a={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(p=>{a[p]=new c(p,e,!1,p,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([p,k])=>{a[p]=new c(p,t,!1,k,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(p=>{a[p]=new c(p,n,!1,p.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(p=>{a[p]=new c(p,n,!1,p,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(p=>{a[p]=new c(p,r,!1,p.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(p=>{a[p]=new c(p,r,!0,p,null,!1,!1)}),["capture","download"].forEach(p=>{a[p]=new c(p,i,!1,p,null,!1,!1)}),["cols","rows","size","span"].forEach(p=>{a[p]=new c(p,s,!1,p,null,!1,!1)}),["rowSpan","start"].forEach(p=>{a[p]=new c(p,o,!1,p.toLowerCase(),null,!1,!1)});const f=/[\-\:]([a-z])/g,d=p=>p[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(p=>{const k=p.replace(f,d);a[k]=new c(k,t,!1,p,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(p=>{const k=p.replace(f,d);a[k]=new c(k,t,!1,p,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(p=>{const k=p.replace(f,d);a[k]=new c(k,t,!1,p,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(p=>{a[p]=new c(p,t,!1,p.toLowerCase(),null,!1,!1)});const h="xlinkHref";a[h]=new c("xlinkHref",t,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(p=>{a[p]=new c(p,t,!1,p.toLowerCase(),null,!0,!0)});const{CAMELCASE:g,SAME:m,possibleStandardNames:v}=hf(),C=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",y=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+C+"]*$")),_=Object.keys(v).reduce((p,k)=>{const S=v[k];return S===m?p[k]=k:S===g?p[k.toLowerCase()]=k:p[k]=S,p},{});return Ke.BOOLEAN=r,Ke.BOOLEANISH_STRING=n,Ke.NUMERIC=o,Ke.OVERLOADED_BOOLEAN=i,Ke.POSITIVE_NUMERIC=s,Ke.RESERVED=e,Ke.STRING=t,Ke.getPropertyInfo=l,Ke.isCustomAttribute=y,Ke.possibleStandardNames=_,Ke}var An={},Zt={},Ti,us;function gf(){if(us)return Ti;us=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,c=`
449
+ `,a="/",u="*",f="",d="comment",h="declaration";Ti=function(m,v){if(typeof m!="string")throw new TypeError("First argument must be a string");if(!m)return[];v=v||{};var w=1,C=1;function y(O){var b=O.match(t);b&&(w+=b.length);var R=O.lastIndexOf(c);C=~R?O.length-R:C+O.length}function _(){var O={line:w,column:C};return function(b){return b.position=new p(O),N(),b}}function p(O){this.start=O,this.end={line:w,column:C},this.source=v.source}p.prototype.content=m;function k(O){var b=new Error(v.source+":"+w+":"+C+": "+O);if(b.reason=O,b.filename=v.source,b.line=w,b.column=C,b.source=m,!v.silent)throw b}function S(O){var b=O.exec(m);if(b){var R=b[0];return y(R),m=m.slice(R.length),b}}function N(){S(n)}function M(O){var b;for(O=O||[];b=H();)b!==!1&&O.push(b);return O}function H(){var O=_();if(!(a!=m.charAt(0)||u!=m.charAt(1))){for(var b=2;f!=m.charAt(b)&&(u!=m.charAt(b)||a!=m.charAt(b+1));)++b;if(b+=2,f===m.charAt(b-1))return k("End of comment missing");var R=m.slice(2,b-2);return C+=2,y(R),m=m.slice(b),C+=2,O({type:d,comment:R})}}function I(){var O=_(),b=S(r);if(b){if(H(),!S(i))return k("property missing ':'");var R=S(o),j=O({type:h,property:g(b[0].replace(e,f)),value:R?g(R[0].replace(e,f)):f});return S(s),j}}function z(){var O=[];M(O);for(var b;b=I();)b!==!1&&(O.push(b),M(O));return O}return N(),z()};function g(m){return m?m.replace(l,f):f}return Ti}var ds;function mf(){if(ds)return Zt;ds=1;var e=Zt&&Zt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.default=n;var t=e(gf());function n(r,i){var o=null;if(!r||typeof r!="string")return o;var s=(0,t.default)(r),l=typeof i=="function";return s.forEach(function(c){if(c.type==="declaration"){var a=c.property,u=c.value;l?i(a,u,c):u&&(o=o||{},o[a]=u)}}),o}return Zt}var Rn={},fs;function yf(){if(fs)return Rn;fs=1,Object.defineProperty(Rn,"__esModule",{value:!0}),Rn.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(a){return!a||n.test(a)||e.test(a)},s=function(a,u){return u.toUpperCase()},l=function(a,u){return"".concat(u,"-")},c=function(a,u){return u===void 0&&(u={}),o(a)?a:(a=a.toLowerCase(),u.reactCompat?a=a.replace(i,l):a=a.replace(r,l),a.replace(t,s))};return Rn.camelCase=c,Rn}var jn,hs;function vf(){if(hs)return jn;hs=1;var e=jn&&jn.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(mf()),n=yf();function r(i,o){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(l,c){l&&c&&(s[(0,n.camelCase)(l,o)]=c)}),s}return r.default=r,jn=r,jn}var ps;function Xa(){return ps||(ps=1,function(e){var t=An&&An.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),e.returnFirstArg=e.canTextBeChildOfNode=e.ELEMENTS_WITH_NO_TEXT_CHILDREN=e.PRESERVE_CUSTOM_ATTRIBUTES=void 0,e.isCustomComponent=o,e.setStyleProp=l;var n=mn(),r=t(vf()),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function o(u,f){return u.includes("-")?!i.has(u):!!(f&&typeof f.is=="string")}var s={reactCompat:!0};function l(u,f){if(typeof u=="string"){if(!u.trim()){f.style={};return}try{f.style=(0,r.default)(u,s)}catch{f.style={}}}}e.PRESERVE_CUSTOM_ATTRIBUTES=Number(n.version.split(".")[0])>=16,e.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var c=function(u){return!e.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(u.name)};e.canTextBeChildOfNode=c;var a=function(u){return u};e.returnFirstArg=a}(An)),An}var gs;function Ua(){if(gs)return yr;gs=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.default=o;var e=pf(),t=Xa(),n=["checked","value"],r=["input","select","textarea"],i={reset:!0,submit:!0};function o(l,c){l===void 0&&(l={});var a={},u=!!(l.type&&i[l.type]);for(var f in l){var d=l[f];if((0,e.isCustomAttribute)(f)){a[f]=d;continue}var h=f.toLowerCase(),g=s(h);if(g){var m=(0,e.getPropertyInfo)(g);switch(n.includes(g)&&r.includes(c)&&!u&&(g=s("default"+h)),a[g]=d,m&&m.type){case e.BOOLEAN:a[g]=!0;break;case e.OVERLOADED_BOOLEAN:d===""&&(a[g]=!0);break}continue}t.PRESERVE_CUSTOM_ATTRIBUTES&&(a[f]=d)}return(0,t.setStyleProp)(l.style,a),a}function s(l){return e.possibleStandardNames[l]}return yr}var Qt={},ms;function xf(){if(ms)return Qt;ms=1;var e=Qt&&Qt.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.default=o;var t=mn(),n=e(Ua()),r=Xa(),i={cloneElement:t.cloneElement,createElement:t.createElement,isValidElement:t.isValidElement};function o(l,c){c===void 0&&(c={});for(var a=[],u=typeof c.replace=="function",f=c.transform||r.returnFirstArg,d=c.library||i,h=d.cloneElement,g=d.createElement,m=d.isValidElement,v=l.length,w=0;w<v;w++){var C=l[w];if(u){var y=c.replace(C,w);if(m(y)){v>1&&(y=h(y,{key:y.key||w})),a.push(f(y,C,w));continue}}if(C.type==="text"){var _=!C.data.trim().length;if(_&&C.parent&&!(0,r.canTextBeChildOfNode)(C.parent)||c.trim&&_)continue;a.push(f(C.data,C,w));continue}var p=C,k={};s(p)?((0,r.setStyleProp)(p.attribs.style,p.attribs),k=p.attribs):p.attribs&&(k=(0,n.default)(p.attribs,p.name));var S=void 0;switch(C.type){case"script":case"style":C.children[0]&&(k.dangerouslySetInnerHTML={__html:C.children[0].data});break;case"tag":C.name==="textarea"&&C.children[0]?k.defaultValue=C.children[0].data:C.children&&C.children.length&&(S=o(C.children,c));break;default:continue}v>1&&(k.key=w),a.push(f(g(C.name,k,S),C,w))}return a.length===1?a[0]:a}function s(l){return r.PRESERVE_CUSTOM_ATTRIBUTES&&l.type==="tag"&&(0,r.isCustomComponent)(l.name,l.attribs)}return Qt}var ys;function wf(){return ys||(ys=1,function(e){var t=Nn&&Nn.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0,e.default=l;var n=t(ff());e.htmlToDOM=n.default;var r=t(Ua());e.attributesToProps=r.default;var i=t(xf());e.domToReact=i.default;var o=qa();Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return o.Comment}}),Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return o.Element}}),Object.defineProperty(e,"ProcessingInstruction",{enumerable:!0,get:function(){return o.ProcessingInstruction}}),Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return o.Text}});var s={lowerCaseAttributeNames:!1};function l(c,a){if(typeof c!="string")throw new TypeError("First argument must be a string");return c?(0,i.default)((0,n.default)(c,(a==null?void 0:a.htmlparser2)||s),a):[]}}(Nn)),Nn}var bf=wf();const vs=Zr(bf),vx=vs.default||vs;function Se(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=Se(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var kf={value:()=>{}};function ei(){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 Tr(n)}function Tr(e){this._=e}function _f(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}})}Tr.prototype=ei.prototype={constructor:Tr,on:function(e,t){var n=this._,r=_f(e+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o<s;)if((i=(e=r[o]).type)&&(i=Ef(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<s;)if(i=(e=r[o]).type)n[i]=xs(n[i],e.name,t);else if(t==null)for(i in n)n[i]=xs(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 Tr(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 Ef(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function xs(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=kf,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Yi="http://www.w3.org/1999/xhtml";const ws={svg:"http://www.w3.org/2000/svg",xhtml:Yi,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ti(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),ws.hasOwnProperty(t)?{space:ws[t],local:e}:e}function Sf(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Yi&&t.documentElement.namespaceURI===Yi?t.createElement(e):t.createElementNS(n,e)}}function Cf(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Ga(e){var t=ti(e);return(t.local?Cf:Sf)(t)}function Nf(){}function xo(e){return e==null?Nf:function(){return this.querySelector(e)}}function Tf(e){typeof e!="function"&&(e=xo(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],s=o.length,l=r[i]=new Array(s),c,a,u=0;u<s;++u)(c=o[u])&&(a=e.call(c,c.__data__,u,o))&&("__data__"in c&&(a.__data__=c.__data__),l[u]=a);return new qe(r,this._parents)}function Af(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Rf(){return[]}function Wa(e){return e==null?Rf:function(){return this.querySelectorAll(e)}}function jf(e){return function(){return Af(e.apply(this,arguments))}}function Mf(e){typeof e=="function"?e=jf(e):e=Wa(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var s=t[o],l=s.length,c,a=0;a<l;++a)(c=s[a])&&(r.push(e.call(c,c.__data__,a,s)),i.push(c));return new qe(r,i)}function Ka(e){return function(){return this.matches(e)}}function Za(e){return function(t){return t.matches(e)}}var Df=Array.prototype.find;function Pf(e){return function(){return Df.call(this.children,e)}}function Of(){return this.firstElementChild}function If(e){return this.select(e==null?Of:Pf(typeof e=="function"?e:Za(e)))}var $f=Array.prototype.filter;function Lf(){return Array.from(this.children)}function zf(e){return function(){return $f.call(this.children,e)}}function Hf(e){return this.selectAll(e==null?Lf:zf(typeof e=="function"?e:Za(e)))}function Vf(e){typeof e!="function"&&(e=Ka(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],s=o.length,l=r[i]=[],c,a=0;a<s;++a)(c=o[a])&&e.call(c,c.__data__,a,o)&&l.push(c);return new qe(r,this._parents)}function Qa(e){return new Array(e.length)}function Bf(){return new qe(this._enter||this._groups.map(Qa),this._parents)}function $r(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}$r.prototype={constructor:$r,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 Ff(e){return function(){return e}}function qf(e,t,n,r,i,o){for(var s=0,l,c=t.length,a=o.length;s<a;++s)(l=t[s])?(l.__data__=o[s],r[s]=l):n[s]=new $r(e,o[s]);for(;s<c;++s)(l=t[s])&&(i[s]=l)}function Yf(e,t,n,r,i,o,s){var l,c,a=new Map,u=t.length,f=o.length,d=new Array(u),h;for(l=0;l<u;++l)(c=t[l])&&(d[l]=h=s.call(c,c.__data__,l,t)+"",a.has(h)?i[l]=c:a.set(h,c));for(l=0;l<f;++l)h=s.call(e,o[l],l,o)+"",(c=a.get(h))?(r[l]=c,c.__data__=o[l],a.delete(h)):n[l]=new $r(e,o[l]);for(l=0;l<u;++l)(c=t[l])&&a.get(d[l])===c&&(i[l]=c)}function Xf(e){return e.__data__}function Uf(e,t){if(!arguments.length)return Array.from(this,Xf);var n=t?Yf:qf,r=this._parents,i=this._groups;typeof e!="function"&&(e=Ff(e));for(var o=i.length,s=new Array(o),l=new Array(o),c=new Array(o),a=0;a<o;++a){var u=r[a],f=i[a],d=f.length,h=Gf(e.call(u,u&&u.__data__,a,r)),g=h.length,m=l[a]=new Array(g),v=s[a]=new Array(g),w=c[a]=new Array(d);n(u,f,m,v,w,h,t);for(var C=0,y=0,_,p;C<g;++C)if(_=m[C]){for(C>=y&&(y=C+1);!(p=v[y])&&++y<g;);_._next=p||null}}return s=new qe(s,r),s._enter=l,s._exit=c,s}function Gf(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Wf(){return new qe(this._exit||this._groups.map(Qa),this._parents)}function Kf(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 Zf(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,o=r.length,s=Math.min(i,o),l=new Array(i),c=0;c<s;++c)for(var a=n[c],u=r[c],f=a.length,d=l[c]=new Array(f),h,g=0;g<f;++g)(h=a[g]||u[g])&&(d[g]=h);for(;c<i;++c)l[c]=n[c];return new qe(l,this._parents)}function Qf(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,o=r[i],s;--i>=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function Jf(e){e||(e=eh);function t(f,d){return f&&d?e(f.__data__,d.__data__):!f-!d}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var s=n[o],l=s.length,c=i[o]=new Array(l),a,u=0;u<l;++u)(a=s[u])&&(c[u]=a);c.sort(t)}return new qe(i,this._parents).order()}function eh(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function th(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function nh(){return Array.from(this)}function rh(){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 s=r[i];if(s)return s}return null}function ih(){let e=0;for(const t of this)++e;return e}function oh(){return!this.node()}function sh(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,s=i.length,l;o<s;++o)(l=i[o])&&e.call(l,l.__data__,o,i);return this}function ah(e){return function(){this.removeAttribute(e)}}function lh(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ch(e,t){return function(){this.setAttribute(e,t)}}function uh(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function dh(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function fh(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 hh(e,t){var n=ti(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?lh:ah:typeof t=="function"?n.local?fh:dh:n.local?uh:ch)(n,t))}function Ja(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function ph(e){return function(){this.style.removeProperty(e)}}function gh(e,t,n){return function(){this.style.setProperty(e,t,n)}}function mh(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function yh(e,t,n){return arguments.length>1?this.each((t==null?ph:typeof t=="function"?mh:gh)(e,t,n??"")):sn(this.node(),e)}function sn(e,t){return e.style.getPropertyValue(t)||Ja(e).getComputedStyle(e,null).getPropertyValue(t)}function vh(e){return function(){delete this[e]}}function xh(e,t){return function(){this[e]=t}}function wh(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function bh(e,t){return arguments.length>1?this.each((t==null?vh:typeof t=="function"?wh:xh)(e,t)):this.node()[e]}function el(e){return e.trim().split(/^|\s+/)}function wo(e){return e.classList||new tl(e)}function tl(e){this._node=e,this._names=el(e.getAttribute("class")||"")}tl.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 nl(e,t){for(var n=wo(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function rl(e,t){for(var n=wo(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function kh(e){return function(){nl(this,e)}}function _h(e){return function(){rl(this,e)}}function Eh(e,t){return function(){(t.apply(this,arguments)?nl:rl)(this,e)}}function Sh(e,t){var n=el(e+"");if(arguments.length<2){for(var r=wo(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Eh:t?kh:_h)(n,t))}function Ch(){this.textContent=""}function Nh(e){return function(){this.textContent=e}}function Th(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Ah(e){return arguments.length?this.each(e==null?Ch:(typeof e=="function"?Th:Nh)(e)):this.node().textContent}function Rh(){this.innerHTML=""}function jh(e){return function(){this.innerHTML=e}}function Mh(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Dh(e){return arguments.length?this.each(e==null?Rh:(typeof e=="function"?Mh:jh)(e)):this.node().innerHTML}function Ph(){this.nextSibling&&this.parentNode.appendChild(this)}function Oh(){return this.each(Ph)}function Ih(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function $h(){return this.each(Ih)}function Lh(e){var t=typeof e=="function"?e:Ga(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function zh(){return null}function Hh(e,t){var n=typeof e=="function"?e:Ga(e),r=t==null?zh:typeof t=="function"?t:xo(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Vh(){var e=this.parentNode;e&&e.removeChild(this)}function Bh(){return this.each(Vh)}function Fh(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function qh(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Yh(e){return this.select(e?qh:Fh)}function Xh(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Uh(e){return function(t){e.call(this,t,this.__data__)}}function Gh(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 Wh(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 Kh(e,t,n){return function(){var r=this.__on,i,o=Uh(t);if(r){for(var s=0,l=r.length;s<l;++s)if((i=r[s]).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 Zh(e,t,n){var r=Gh(e+""),i,o=r.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,a=l.length,u;c<a;++c)for(i=0,u=l[c];i<o;++i)if((s=r[i]).type===u.type&&s.name===u.name)return u.value}return}for(l=t?Kh:Wh,i=0;i<o;++i)this.each(l(r[i],t,n));return this}function il(e,t,n){var r=Ja(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 Qh(e,t){return function(){return il(this,e,t)}}function Jh(e,t){return function(){return il(this,e,t.apply(this,arguments))}}function ep(e,t){return this.each((typeof t=="function"?Jh:Qh)(e,t))}function*tp(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length,s;i<o;++i)(s=r[i])&&(yield s)}var ol=[null];function qe(e,t){this._groups=e,this._parents=t}function Jn(){return new qe([[document.documentElement]],ol)}function np(){return this}qe.prototype=Jn.prototype={constructor:qe,select:Tf,selectAll:Mf,selectChild:If,selectChildren:Hf,filter:Vf,data:Uf,enter:Bf,exit:Wf,join:Kf,merge:Zf,selection:np,order:Qf,sort:Jf,call:th,nodes:nh,node:rh,size:ih,empty:oh,each:sh,attr:hh,style:yh,property:bh,classed:Sh,text:Ah,html:Dh,raise:Oh,lower:$h,append:Lh,insert:Hh,remove:Bh,clone:Yh,datum:Xh,on:Zh,dispatch:ep,[Symbol.iterator]:tp};function Fe(e){return typeof e=="string"?new qe([[document.querySelector(e)]],[document.documentElement]):new qe([[e]],ol)}function rp(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Qe(e,t){if(e=rp(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 ip={passive:!1},Fn={capture:!0,passive:!1};function Ai(e){e.stopImmediatePropagation()}function rn(e){e.preventDefault(),e.stopImmediatePropagation()}function sl(e){var t=e.document.documentElement,n=Fe(e).on("dragstart.drag",rn,Fn);"onselectstart"in t?n.on("selectstart.drag",rn,Fn):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function al(e,t){var n=e.document.documentElement,r=Fe(e).on("dragstart.drag",null);t&&(r.on("click.drag",rn,Fn),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 vr=e=>()=>e;function Xi(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:o,x:s,y:l,dx:c,dy:a,dispatch:u}){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:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:a,enumerable:!0,configurable:!0},_:{value:u}})}Xi.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function op(e){return!e.ctrlKey&&!e.button}function sp(){return this.parentNode}function ap(e,t){return t??{x:e.x,y:e.y}}function lp(){return navigator.maxTouchPoints||"ontouchstart"in this}function ll(){var e=op,t=sp,n=ap,r=lp,i={},o=ei("start","drag","end"),s=0,l,c,a,u,f=0;function d(_){_.on("mousedown.drag",h).filter(r).on("touchstart.drag",v).on("touchmove.drag",w,ip).on("touchend.drag touchcancel.drag",C).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(_,p){if(!(u||!e.call(this,_,p))){var k=y(this,t.call(this,_,p),_,p,"mouse");k&&(Fe(_.view).on("mousemove.drag",g,Fn).on("mouseup.drag",m,Fn),sl(_.view),Ai(_),a=!1,l=_.clientX,c=_.clientY,k("start",_))}}function g(_){if(rn(_),!a){var p=_.clientX-l,k=_.clientY-c;a=p*p+k*k>f}i.mouse("drag",_)}function m(_){Fe(_.view).on("mousemove.drag mouseup.drag",null),al(_.view,a),rn(_),i.mouse("end",_)}function v(_,p){if(e.call(this,_,p)){var k=_.changedTouches,S=t.call(this,_,p),N=k.length,M,H;for(M=0;M<N;++M)(H=y(this,S,_,p,k[M].identifier,k[M]))&&(Ai(_),H("start",_,k[M]))}}function w(_){var p=_.changedTouches,k=p.length,S,N;for(S=0;S<k;++S)(N=i[p[S].identifier])&&(rn(_),N("drag",_,p[S]))}function C(_){var p=_.changedTouches,k=p.length,S,N;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),S=0;S<k;++S)(N=i[p[S].identifier])&&(Ai(_),N("end",_,p[S]))}function y(_,p,k,S,N,M){var H=o.copy(),I=Qe(M||k,p),z,O,b;if((b=n.call(_,new Xi("beforestart",{sourceEvent:k,target:d,identifier:N,active:s,x:I[0],y:I[1],dx:0,dy:0,dispatch:H}),S))!=null)return z=b.x-I[0]||0,O=b.y-I[1]||0,function R(j,D,$){var P=I,x;switch(j){case"start":i[N]=R,x=s++;break;case"end":delete i[N],--s;case"drag":I=Qe($||D,p),x=s;break}H.call(j,_,new Xi(j,{sourceEvent:D,subject:b,target:d,identifier:N,active:x,x:I[0]+z,y:I[1]+O,dx:I[0]-P[0],dy:I[1]-P[1],dispatch:H}),S)}}return d.filter=function(_){return arguments.length?(e=typeof _=="function"?_:vr(!!_),d):e},d.container=function(_){return arguments.length?(t=typeof _=="function"?_:vr(_),d):t},d.subject=function(_){return arguments.length?(n=typeof _=="function"?_:vr(_),d):n},d.touchable=function(_){return arguments.length?(r=typeof _=="function"?_:vr(!!_),d):r},d.on=function(){var _=o.on.apply(o,arguments);return _===o?d:_},d.clickDistance=function(_){return arguments.length?(f=(_=+_)*_,d):Math.sqrt(f)},d}function bo(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function cl(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function er(){}var qn=.7,Lr=1/qn,on="\\s*([+-]?\\d+)\\s*",Yn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",st="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",cp=/^#([0-9a-f]{3,8})$/,up=new RegExp(`^rgb\\(${on},${on},${on}\\)$`),dp=new RegExp(`^rgb\\(${st},${st},${st}\\)$`),fp=new RegExp(`^rgba\\(${on},${on},${on},${Yn}\\)$`),hp=new RegExp(`^rgba\\(${st},${st},${st},${Yn}\\)$`),pp=new RegExp(`^hsl\\(${Yn},${st},${st}\\)$`),gp=new RegExp(`^hsla\\(${Yn},${st},${st},${Yn}\\)$`),bs={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};bo(er,zt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ks,formatHex:ks,formatHex8:mp,formatHsl:yp,formatRgb:_s,toString:_s});function ks(){return this.rgb().formatHex()}function mp(){return this.rgb().formatHex8()}function yp(){return ul(this).formatHsl()}function _s(){return this.rgb().formatRgb()}function zt(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=cp.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Es(t):n===3?new Le(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?xr(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?xr(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=up.exec(e))?new Le(t[1],t[2],t[3],1):(t=dp.exec(e))?new Le(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=fp.exec(e))?xr(t[1],t[2],t[3],t[4]):(t=hp.exec(e))?xr(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=pp.exec(e))?Ns(t[1],t[2]/100,t[3]/100,1):(t=gp.exec(e))?Ns(t[1],t[2]/100,t[3]/100,t[4]):bs.hasOwnProperty(e)?Es(bs[e]):e==="transparent"?new Le(NaN,NaN,NaN,0):null}function Es(e){return new Le(e>>16&255,e>>8&255,e&255,1)}function xr(e,t,n,r){return r<=0&&(e=t=n=NaN),new Le(e,t,n,r)}function vp(e){return e instanceof er||(e=zt(e)),e?(e=e.rgb(),new Le(e.r,e.g,e.b,e.opacity)):new Le}function Ui(e,t,n,r){return arguments.length===1?vp(e):new Le(e,t,n,r??1)}function Le(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}bo(Le,Ui,cl(er,{brighter(e){return e=e==null?Lr:Math.pow(Lr,e),new Le(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?qn:Math.pow(qn,e),new Le(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Le(It(this.r),It(this.g),It(this.b),zr(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:Ss,formatHex:Ss,formatHex8:xp,formatRgb:Cs,toString:Cs}));function Ss(){return`#${Mt(this.r)}${Mt(this.g)}${Mt(this.b)}`}function xp(){return`#${Mt(this.r)}${Mt(this.g)}${Mt(this.b)}${Mt((isNaN(this.opacity)?1:this.opacity)*255)}`}function Cs(){const e=zr(this.opacity);return`${e===1?"rgb(":"rgba("}${It(this.r)}, ${It(this.g)}, ${It(this.b)}${e===1?")":`, ${e})`}`}function zr(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function It(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Mt(e){return e=It(e),(e<16?"0":"")+e.toString(16)}function Ns(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Je(e,t,n,r)}function ul(e){if(e instanceof Je)return new Je(e.h,e.s,e.l,e.opacity);if(e instanceof er||(e=zt(e)),!e)return new Je;if(e instanceof Je)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),s=NaN,l=o-i,c=(o+i)/2;return l?(t===o?s=(n-r)/l+(n<r)*6:n===o?s=(r-t)/l+2:s=(t-n)/l+4,l/=c<.5?o+i:2-o-i,s*=60):l=c>0&&c<1?0:s,new Je(s,l,c,e.opacity)}function wp(e,t,n,r){return arguments.length===1?ul(e):new Je(e,t,n,r??1)}function Je(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}bo(Je,wp,cl(er,{brighter(e){return e=e==null?Lr:Math.pow(Lr,e),new Je(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?qn:Math.pow(qn,e),new Je(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 Le(Ri(e>=240?e-240:e+120,i,r),Ri(e,i,r),Ri(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Je(Ts(this.h),wr(this.s),wr(this.l),zr(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=zr(this.opacity);return`${e===1?"hsl(":"hsla("}${Ts(this.h)}, ${wr(this.s)*100}%, ${wr(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Ts(e){return e=(e||0)%360,e<0?e+360:e}function wr(e){return Math.max(0,Math.min(1,e||0))}function Ri(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 ko=e=>()=>e;function bp(e,t){return function(n){return e+n*t}}function kp(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 _p(e){return(e=+e)==1?dl:function(t,n){return n-t?kp(t,n,e):ko(isNaN(t)?n:t)}}function dl(e,t){var n=t-e;return n?bp(e,n):ko(isNaN(e)?t:e)}const Hr=function e(t){var n=_p(t);function r(i,o){var s=n((i=Ui(i)).r,(o=Ui(o)).r),l=n(i.g,o.g),c=n(i.b,o.b),a=dl(i.opacity,o.opacity);return function(u){return i.r=s(u),i.g=l(u),i.b=c(u),i.opacity=a(u),i+""}}return r.gamma=e,r}(1);function Ep(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function Sp(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Cp(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),s;for(s=0;s<r;++s)i[s]=Vn(e[s],t[s]);for(;s<n;++s)o[s]=t[s];return function(l){for(s=0;s<r;++s)o[s]=i[s](l);return o}}function Np(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function it(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Tp(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Vn(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Gi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ji=new RegExp(Gi.source,"g");function Ap(e){return function(){return e}}function Rp(e){return function(t){return e(t)+""}}function fl(e,t){var n=Gi.lastIndex=ji.lastIndex=0,r,i,o,s=-1,l=[],c=[];for(e=e+"",t=t+"";(r=Gi.exec(e))&&(i=ji.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),l[s]?l[s]+=o:l[++s]=o),(r=r[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,c.push({i:s,x:it(r,i)})),n=ji.lastIndex;return n<t.length&&(o=t.slice(n),l[s]?l[s]+=o:l[++s]=o),l.length<2?c[0]?Rp(c[0].x):Ap(t):(t=c.length,function(a){for(var u=0,f;u<t;++u)l[(f=c[u]).i]=f.x(a);return l.join("")})}function Vn(e,t){var n=typeof t,r;return t==null||n==="boolean"?ko(t):(n==="number"?it:n==="string"?(r=zt(t))?(t=r,Hr):fl:t instanceof zt?Hr:t instanceof Date?Np:Sp(t)?Ep:Array.isArray(t)?Cp:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Tp:it)(e,t)}var As=180/Math.PI,Wi={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function hl(e,t,n,r,i,o){var s,l,c;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,c/=l),e*r<t*n&&(e=-e,t=-t,c=-c,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*As,skewX:Math.atan(c)*As,scaleX:s,scaleY:l}}var br;function jp(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Wi:hl(t.a,t.b,t.c,t.d,t.e,t.f)}function Mp(e){return e==null||(br||(br=document.createElementNS("http://www.w3.org/2000/svg","g")),br.setAttribute("transform",e),!(e=br.transform.baseVal.consolidate()))?Wi:(e=e.matrix,hl(e.a,e.b,e.c,e.d,e.e,e.f))}function pl(e,t,n,r){function i(a){return a.length?a.pop()+" ":""}function o(a,u,f,d,h,g){if(a!==f||u!==d){var m=h.push("translate(",null,t,null,n);g.push({i:m-4,x:it(a,f)},{i:m-2,x:it(u,d)})}else(f||d)&&h.push("translate("+f+t+d+n)}function s(a,u,f,d){a!==u?(a-u>180?u+=360:u-a>180&&(a+=360),d.push({i:f.push(i(f)+"rotate(",null,r)-2,x:it(a,u)})):u&&f.push(i(f)+"rotate("+u+r)}function l(a,u,f,d){a!==u?d.push({i:f.push(i(f)+"skewX(",null,r)-2,x:it(a,u)}):u&&f.push(i(f)+"skewX("+u+r)}function c(a,u,f,d,h,g){if(a!==f||u!==d){var m=h.push(i(h)+"scale(",null,",",null,")");g.push({i:m-4,x:it(a,f)},{i:m-2,x:it(u,d)})}else(f!==1||d!==1)&&h.push(i(h)+"scale("+f+","+d+")")}return function(a,u){var f=[],d=[];return a=e(a),u=e(u),o(a.translateX,a.translateY,u.translateX,u.translateY,f,d),s(a.rotate,u.rotate,f,d),l(a.skewX,u.skewX,f,d),c(a.scaleX,a.scaleY,u.scaleX,u.scaleY,f,d),a=u=null,function(h){for(var g=-1,m=d.length,v;++g<m;)f[(v=d[g]).i]=v.x(h);return f.join("")}}}var Dp=pl(jp,"px, ","px)","deg)"),Pp=pl(Mp,", ",")",")"),Op=1e-12;function Rs(e){return((e=Math.exp(e))+1/e)/2}function Ip(e){return((e=Math.exp(e))-1/e)/2}function $p(e){return((e=Math.exp(2*e))-1)/(e+1)}const Ar=function e(t,n,r){function i(o,s){var l=o[0],c=o[1],a=o[2],u=s[0],f=s[1],d=s[2],h=u-l,g=f-c,m=h*h+g*g,v,w;if(m<Op)w=Math.log(d/a)/t,v=function(S){return[l+S*h,c+S*g,a*Math.exp(t*S*w)]};else{var C=Math.sqrt(m),y=(d*d-a*a+r*m)/(2*a*n*C),_=(d*d-a*a-r*m)/(2*d*n*C),p=Math.log(Math.sqrt(y*y+1)-y),k=Math.log(Math.sqrt(_*_+1)-_);w=(k-p)/t,v=function(S){var N=S*w,M=Rs(p),H=a/(n*C)*(M*$p(t*N+p)-Ip(p));return[l+H*h,c+H*g,a*M/Rs(t*N+p)]}}return v.duration=w*1e3*t/Math.SQRT2,v}return i.rho=function(o){var s=Math.max(.001,+o),l=s*s,c=l*l;return e(s,l,c)},i}(Math.SQRT2,2,4);var an=0,$n=0,Mn=0,gl=1e3,Vr,Ln,Br=0,Ht=0,ni=0,Xn=typeof performance=="object"&&performance.now?performance:Date,ml=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function _o(){return Ht||(ml(Lp),Ht=Xn.now()+ni)}function Lp(){Ht=0}function Fr(){this._call=this._time=this._next=null}Fr.prototype=yl.prototype={constructor:Fr,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?_o():+n)+(t==null?0:+t),!this._next&&Ln!==this&&(Ln?Ln._next=this:Vr=this,Ln=this),this._call=e,this._time=n,Ki()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ki())}};function yl(e,t,n){var r=new Fr;return r.restart(e,t,n),r}function zp(){_o(),++an;for(var e=Vr,t;e;)(t=Ht-e._time)>=0&&e._call.call(void 0,t),e=e._next;--an}function js(){Ht=(Br=Xn.now())+ni,an=$n=0;try{zp()}finally{an=0,Vp(),Ht=0}}function Hp(){var e=Xn.now(),t=e-Br;t>gl&&(ni-=t,Br=e)}function Vp(){for(var e,t=Vr,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:Vr=n);Ln=e,Ki(r)}function Ki(e){if(!an){$n&&($n=clearTimeout($n));var t=e-Ht;t>24?(e<1/0&&($n=setTimeout(js,e-Xn.now()-ni)),Mn&&(Mn=clearInterval(Mn))):(Mn||(Br=Xn.now(),Mn=setInterval(Hp,gl)),an=1,ml(js))}}function Ms(e,t,n){var r=new Fr;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var Bp=ei("start","end","cancel","interrupt"),Fp=[],vl=0,Ds=1,Zi=2,Rr=3,Ps=4,Qi=5,jr=6;function ri(e,t,n,r,i,o){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;qp(e,n,{name:t,index:r,group:i,on:Bp,tween:Fp,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:vl})}function Eo(e,t){var n=tt(e,t);if(n.state>vl)throw new Error("too late; already scheduled");return n}function lt(e,t){var n=tt(e,t);if(n.state>Rr)throw new Error("too late; already running");return n}function tt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function qp(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=yl(o,0,n.time);function o(a){n.state=Ds,n.timer.restart(s,n.delay,n.time),n.delay<=a&&s(a-n.delay)}function s(a){var u,f,d,h;if(n.state!==Ds)return c();for(u in r)if(h=r[u],h.name===n.name){if(h.state===Rr)return Ms(s);h.state===Ps?(h.state=jr,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[u]):+u<t&&(h.state=jr,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete r[u])}if(Ms(function(){n.state===Rr&&(n.state=Ps,n.timer.restart(l,n.delay,n.time),l(a))}),n.state=Zi,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Zi){for(n.state=Rr,i=new Array(d=n.tween.length),u=0,f=-1;u<d;++u)(h=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(i[++f]=h);i.length=f+1}}function l(a){for(var u=a<n.duration?n.ease.call(null,a/n.duration):(n.timer.restart(c),n.state=Qi,1),f=-1,d=i.length;++f<d;)i[f].call(e,u);n.state===Qi&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=jr,n.timer.stop(),delete r[t];for(var a in r)return;delete e.__transition}}function Mr(e,t){var n=e.__transition,r,i,o=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){o=!1;continue}i=r.state>Zi&&r.state<Qi,r.state=jr,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}o&&delete e.__transition}}function Yp(e){return this.each(function(){Mr(this,e)})}function Xp(e,t){var n,r;return function(){var i=lt(this,e),o=i.tween;if(o!==n){r=n=o;for(var s=0,l=r.length;s<l;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}i.tween=r}}function Up(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=lt(this,e),s=o.tween;if(s!==r){i=(r=s).slice();for(var l={name:t,value:n},c=0,a=i.length;c<a;++c)if(i[c].name===t){i[c]=l;break}c===a&&i.push(l)}o.tween=i}}function Gp(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=tt(this.node(),n).tween,i=0,o=r.length,s;i<o;++i)if((s=r[i]).name===e)return s.value;return null}return this.each((t==null?Xp:Up)(n,e,t))}function So(e,t,n){var r=e._id;return e.each(function(){var i=lt(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return tt(i,r).value[t]}}function xl(e,t){var n;return(typeof t=="number"?it:t instanceof zt?Hr:(n=zt(t))?(t=n,Hr):fl)(e,t)}function Wp(e){return function(){this.removeAttribute(e)}}function Kp(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Zp(e,t,n){var r,i=n+"",o;return function(){var s=this.getAttribute(e);return s===i?null:s===r?o:o=t(r=s,n)}}function Qp(e,t,n){var r,i=n+"",o;return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===r?o:o=t(r=s,n)}}function Jp(e,t,n){var r,i,o;return function(){var s,l=n(this),c;return l==null?void this.removeAttribute(e):(s=this.getAttribute(e),c=l+"",s===c?null:s===r&&c===i?o:(i=c,o=t(r=s,l)))}}function eg(e,t,n){var r,i,o;return function(){var s,l=n(this),c;return l==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),c=l+"",s===c?null:s===r&&c===i?o:(i=c,o=t(r=s,l)))}}function tg(e,t){var n=ti(e),r=n==="transform"?Pp:xl;return this.attrTween(e,typeof t=="function"?(n.local?eg:Jp)(n,r,So(this,"attr."+e,t)):t==null?(n.local?Kp:Wp)(n):(n.local?Qp:Zp)(n,r,t))}function ng(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function rg(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function ig(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&rg(e,o)),n}return i._value=t,i}function og(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&ng(e,o)),n}return i._value=t,i}function sg(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=ti(e);return this.tween(n,(r.local?ig:og)(r,t))}function ag(e,t){return function(){Eo(this,e).delay=+t.apply(this,arguments)}}function lg(e,t){return t=+t,function(){Eo(this,e).delay=t}}function cg(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ag:lg)(t,e)):tt(this.node(),t).delay}function ug(e,t){return function(){lt(this,e).duration=+t.apply(this,arguments)}}function dg(e,t){return t=+t,function(){lt(this,e).duration=t}}function fg(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ug:dg)(t,e)):tt(this.node(),t).duration}function hg(e,t){if(typeof t!="function")throw new Error;return function(){lt(this,e).ease=t}}function pg(e){var t=this._id;return arguments.length?this.each(hg(t,e)):tt(this.node(),t).ease}function gg(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;lt(this,e).ease=n}}function mg(e){if(typeof e!="function")throw new Error;return this.each(gg(this._id,e))}function yg(e){typeof e!="function"&&(e=Ka(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],s=o.length,l=r[i]=[],c,a=0;a<s;++a)(c=o[a])&&e.call(c,c.__data__,a,o)&&l.push(c);return new yt(r,this._parents,this._name,this._id)}function vg(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),s=new Array(r),l=0;l<o;++l)for(var c=t[l],a=n[l],u=c.length,f=s[l]=new Array(u),d,h=0;h<u;++h)(d=c[h]||a[h])&&(f[h]=d);for(;l<r;++l)s[l]=t[l];return new yt(s,this._parents,this._name,this._id)}function xg(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 wg(e,t,n){var r,i,o=xg(t)?Eo:lt;return function(){var s=o(this,e),l=s.on;l!==r&&(i=(r=l).copy()).on(t,n),s.on=i}}function bg(e,t){var n=this._id;return arguments.length<2?tt(this.node(),n).on.on(e):this.each(wg(n,e,t))}function kg(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function _g(){return this.on("end.remove",kg(this._id))}function Eg(e){var t=this._name,n=this._id;typeof e!="function"&&(e=xo(e));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var l=r[s],c=l.length,a=o[s]=new Array(c),u,f,d=0;d<c;++d)(u=l[d])&&(f=e.call(u,u.__data__,d,l))&&("__data__"in u&&(f.__data__=u.__data__),a[d]=f,ri(a[d],t,n,d,a,tt(u,n)));return new yt(o,this._parents,t,n)}function Sg(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Wa(e));for(var r=this._groups,i=r.length,o=[],s=[],l=0;l<i;++l)for(var c=r[l],a=c.length,u,f=0;f<a;++f)if(u=c[f]){for(var d=e.call(u,u.__data__,f,c),h,g=tt(u,n),m=0,v=d.length;m<v;++m)(h=d[m])&&ri(h,t,n,m,d,g);o.push(d),s.push(u)}return new yt(o,s,t,n)}var Cg=Jn.prototype.constructor;function Ng(){return new Cg(this._groups,this._parents)}function Tg(e,t){var n,r,i;return function(){var o=sn(this,e),s=(this.style.removeProperty(e),sn(this,e));return o===s?null:o===n&&s===r?i:i=t(n=o,r=s)}}function wl(e){return function(){this.style.removeProperty(e)}}function Ag(e,t,n){var r,i=n+"",o;return function(){var s=sn(this,e);return s===i?null:s===r?o:o=t(r=s,n)}}function Rg(e,t,n){var r,i,o;return function(){var s=sn(this,e),l=n(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(e),sn(this,e))),s===c?null:s===r&&c===i?o:(i=c,o=t(r=s,l))}}function jg(e,t){var n,r,i,o="style."+t,s="end."+o,l;return function(){var c=lt(this,e),a=c.on,u=c.value[o]==null?l||(l=wl(t)):void 0;(a!==n||i!==u)&&(r=(n=a).copy()).on(s,i=u),c.on=r}}function Mg(e,t,n){var r=(e+="")=="transform"?Dp:xl;return t==null?this.styleTween(e,Tg(e,r)).on("end.style."+e,wl(e)):typeof t=="function"?this.styleTween(e,Rg(e,r,So(this,"style."+e,t))).each(jg(this._id,e)):this.styleTween(e,Ag(e,r,t),n).on("end.style."+e,null)}function Dg(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Pg(e,t,n){var r,i;function o(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&Dg(e,s,n)),r}return o._value=t,o}function Og(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,Pg(e,t,n??""))}function Ig(e){return function(){this.textContent=e}}function $g(e){return function(){var t=e(this);this.textContent=t??""}}function Lg(e){return this.tween("text",typeof e=="function"?$g(So(this,"text",e)):Ig(e==null?"":e+""))}function zg(e){return function(t){this.textContent=e.call(this,t)}}function Hg(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&zg(i)),t}return r._value=e,r}function Vg(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,Hg(e))}function Bg(){for(var e=this._name,t=this._id,n=bl(),r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],l=s.length,c,a=0;a<l;++a)if(c=s[a]){var u=tt(c,t);ri(c,e,n,a,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new yt(r,this._parents,e,n)}function Fg(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(o,s){var l={value:s},c={value:function(){--i===0&&o()}};n.each(function(){var a=lt(this,r),u=a.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(c)),a.on=t}),i===0&&o()})}var qg=0;function yt(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function bl(){return++qg}var ht=Jn.prototype;yt.prototype={constructor:yt,select:Eg,selectAll:Sg,selectChild:ht.selectChild,selectChildren:ht.selectChildren,filter:yg,merge:vg,selection:Ng,transition:Bg,call:ht.call,nodes:ht.nodes,node:ht.node,size:ht.size,empty:ht.empty,each:ht.each,on:bg,attr:tg,attrTween:sg,style:Mg,styleTween:Og,text:Lg,textTween:Vg,remove:_g,tween:Gp,delay:cg,duration:fg,ease:pg,easeVarying:mg,end:Fg,[Symbol.iterator]:ht[Symbol.iterator]};function Yg(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Xg={time:null,delay:0,duration:250,ease:Yg};function Ug(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 Gg(e){var t,n;e instanceof yt?(t=e._id,e=e._name):(t=bl(),(n=Xg).time=_o(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],l=s.length,c,a=0;a<l;++a)(c=s[a])&&ri(c,e,t,a,s,n||Ug(c,t));return new yt(r,this._parents,e,t)}Jn.prototype.interrupt=Yp;Jn.prototype.transition=Gg;const kr=e=>()=>e;function Wg(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 mt(e,t,n){this.k=e,this.x=t,this.y=n}mt.prototype={constructor:mt,scale:function(e){return e===1?this:new mt(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new mt(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 ii=new mt(1,0,0);kl.prototype=mt.prototype;function kl(e){for(;!e.__zoom;)if(!(e=e.parentNode))return ii;return e.__zoom}function Mi(e){e.stopImmediatePropagation()}function Dn(e){e.preventDefault(),e.stopImmediatePropagation()}function Kg(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Zg(){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 Os(){return this.__zoom||ii}function Qg(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Jg(){return navigator.maxTouchPoints||"ontouchstart"in this}function e0(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],s=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function _l(){var e=Kg,t=Zg,n=e0,r=Qg,i=Jg,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,c=Ar,a=ei("start","zoom","end"),u,f,d,h=500,g=150,m=0,v=10;function w(b){b.property("__zoom",Os).on("wheel.zoom",N,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",H).filter(i).on("touchstart.zoom",I).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",O).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(b,R,j,D){var $=b.selection?b.selection():b;$.property("__zoom",Os),b!==$?p(b,R,j,D):$.interrupt().each(function(){k(this,arguments).event(D).start().zoom(null,typeof R=="function"?R.apply(this,arguments):R).end()})},w.scaleBy=function(b,R,j,D){w.scaleTo(b,function(){var $=this.__zoom.k,P=typeof R=="function"?R.apply(this,arguments):R;return $*P},j,D)},w.scaleTo=function(b,R,j,D){w.transform(b,function(){var $=t.apply(this,arguments),P=this.__zoom,x=j==null?_($):typeof j=="function"?j.apply(this,arguments):j,T=P.invert(x),L=typeof R=="function"?R.apply(this,arguments):R;return n(y(C(P,L),x,T),$,s)},j,D)},w.translateBy=function(b,R,j,D){w.transform(b,function(){return n(this.__zoom.translate(typeof R=="function"?R.apply(this,arguments):R,typeof j=="function"?j.apply(this,arguments):j),t.apply(this,arguments),s)},null,D)},w.translateTo=function(b,R,j,D,$){w.transform(b,function(){var P=t.apply(this,arguments),x=this.__zoom,T=D==null?_(P):typeof D=="function"?D.apply(this,arguments):D;return n(ii.translate(T[0],T[1]).scale(x.k).translate(typeof R=="function"?-R.apply(this,arguments):-R,typeof j=="function"?-j.apply(this,arguments):-j),P,s)},D,$)};function C(b,R){return R=Math.max(o[0],Math.min(o[1],R)),R===b.k?b:new mt(R,b.x,b.y)}function y(b,R,j){var D=R[0]-j[0]*b.k,$=R[1]-j[1]*b.k;return D===b.x&&$===b.y?b:new mt(b.k,D,$)}function _(b){return[(+b[0][0]+ +b[1][0])/2,(+b[0][1]+ +b[1][1])/2]}function p(b,R,j,D){b.on("start.zoom",function(){k(this,arguments).event(D).start()}).on("interrupt.zoom end.zoom",function(){k(this,arguments).event(D).end()}).tween("zoom",function(){var $=this,P=arguments,x=k($,P).event(D),T=t.apply($,P),L=j==null?_(T):typeof j=="function"?j.apply($,P):j,V=Math.max(T[1][0]-T[0][0],T[1][1]-T[0][1]),B=$.__zoom,Y=typeof R=="function"?R.apply($,P):R,F=c(B.invert(L).concat(V/B.k),Y.invert(L).concat(V/Y.k));return function(X){if(X===1)X=Y;else{var q=F(X),K=V/q[2];X=new mt(K,L[0]-q[0]*K,L[1]-q[1]*K)}x.zoom(null,X)}})}function k(b,R,j){return!j&&b.__zooming||new S(b,R)}function S(b,R){this.that=b,this.args=R,this.active=0,this.sourceEvent=null,this.extent=t.apply(b,R),this.taps=0}S.prototype={event:function(b){return b&&(this.sourceEvent=b),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(b,R){return this.mouse&&b!=="mouse"&&(this.mouse[1]=R.invert(this.mouse[0])),this.touch0&&b!=="touch"&&(this.touch0[1]=R.invert(this.touch0[0])),this.touch1&&b!=="touch"&&(this.touch1[1]=R.invert(this.touch1[0])),this.that.__zoom=R,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(b){var R=Fe(this.that).datum();a.call(b,this.that,new Wg(b,{sourceEvent:this.sourceEvent,target:w,transform:this.that.__zoom,dispatch:a}),R)}};function N(b,...R){if(!e.apply(this,arguments))return;var j=k(this,R).event(b),D=this.__zoom,$=Math.max(o[0],Math.min(o[1],D.k*Math.pow(2,r.apply(this,arguments)))),P=Qe(b);if(j.wheel)(j.mouse[0][0]!==P[0]||j.mouse[0][1]!==P[1])&&(j.mouse[1]=D.invert(j.mouse[0]=P)),clearTimeout(j.wheel);else{if(D.k===$)return;j.mouse=[P,D.invert(P)],Mr(this),j.start()}Dn(b),j.wheel=setTimeout(x,g),j.zoom("mouse",n(y(C(D,$),j.mouse[0],j.mouse[1]),j.extent,s));function x(){j.wheel=null,j.end()}}function M(b,...R){if(d||!e.apply(this,arguments))return;var j=b.currentTarget,D=k(this,R,!0).event(b),$=Fe(b.view).on("mousemove.zoom",L,!0).on("mouseup.zoom",V,!0),P=Qe(b,j),x=b.clientX,T=b.clientY;sl(b.view),Mi(b),D.mouse=[P,this.__zoom.invert(P)],Mr(this),D.start();function L(B){if(Dn(B),!D.moved){var Y=B.clientX-x,F=B.clientY-T;D.moved=Y*Y+F*F>m}D.event(B).zoom("mouse",n(y(D.that.__zoom,D.mouse[0]=Qe(B,j),D.mouse[1]),D.extent,s))}function V(B){$.on("mousemove.zoom mouseup.zoom",null),al(B.view,D.moved),Dn(B),D.event(B).end()}}function H(b,...R){if(e.apply(this,arguments)){var j=this.__zoom,D=Qe(b.changedTouches?b.changedTouches[0]:b,this),$=j.invert(D),P=j.k*(b.shiftKey?.5:2),x=n(y(C(j,P),D,$),t.apply(this,R),s);Dn(b),l>0?Fe(this).transition().duration(l).call(p,x,D,b):Fe(this).call(w.transform,x,D,b)}}function I(b,...R){if(e.apply(this,arguments)){var j=b.touches,D=j.length,$=k(this,R,b.changedTouches.length===D).event(b),P,x,T,L;for(Mi(b),x=0;x<D;++x)T=j[x],L=Qe(T,this),L=[L,this.__zoom.invert(L),T.identifier],$.touch0?!$.touch1&&$.touch0[2]!==L[2]&&($.touch1=L,$.taps=0):($.touch0=L,P=!0,$.taps=1+!!u);u&&(u=clearTimeout(u)),P&&($.taps<2&&(f=L[0],u=setTimeout(function(){u=null},h)),Mr(this),$.start())}}function z(b,...R){if(this.__zooming){var j=k(this,R).event(b),D=b.changedTouches,$=D.length,P,x,T,L;for(Dn(b),P=0;P<$;++P)x=D[P],T=Qe(x,this),j.touch0&&j.touch0[2]===x.identifier?j.touch0[0]=T:j.touch1&&j.touch1[2]===x.identifier&&(j.touch1[0]=T);if(x=j.that.__zoom,j.touch1){var V=j.touch0[0],B=j.touch0[1],Y=j.touch1[0],F=j.touch1[1],X=(X=Y[0]-V[0])*X+(X=Y[1]-V[1])*X,q=(q=F[0]-B[0])*q+(q=F[1]-B[1])*q;x=C(x,Math.sqrt(X/q)),T=[(V[0]+Y[0])/2,(V[1]+Y[1])/2],L=[(B[0]+F[0])/2,(B[1]+F[1])/2]}else if(j.touch0)T=j.touch0[0],L=j.touch0[1];else return;j.zoom("touch",n(y(x,T,L),j.extent,s))}}function O(b,...R){if(this.__zooming){var j=k(this,R).event(b),D=b.changedTouches,$=D.length,P,x;for(Mi(b),d&&clearTimeout(d),d=setTimeout(function(){d=null},h),P=0;P<$;++P)x=D[P],j.touch0&&j.touch0[2]===x.identifier?delete j.touch0:j.touch1&&j.touch1[2]===x.identifier&&delete j.touch1;if(j.touch1&&!j.touch0&&(j.touch0=j.touch1,delete j.touch1),j.touch0)j.touch0[1]=this.__zoom.invert(j.touch0[0]);else if(j.end(),j.taps===2&&(x=Qe(x,this),Math.hypot(f[0]-x[0],f[1]-x[1])<v)){var T=Fe(this).on("dblclick.zoom");T&&T.apply(this,arguments)}}}return w.wheelDelta=function(b){return arguments.length?(r=typeof b=="function"?b:kr(+b),w):r},w.filter=function(b){return arguments.length?(e=typeof b=="function"?b:kr(!!b),w):e},w.touchable=function(b){return arguments.length?(i=typeof b=="function"?b:kr(!!b),w):i},w.extent=function(b){return arguments.length?(t=typeof b=="function"?b:kr([[+b[0][0],+b[0][1]],[+b[1][0],+b[1][1]]]),w):t},w.scaleExtent=function(b){return arguments.length?(o[0]=+b[0],o[1]=+b[1],w):[o[0],o[1]]},w.translateExtent=function(b){return arguments.length?(s[0][0]=+b[0][0],s[1][0]=+b[1][0],s[0][1]=+b[0][1],s[1][1]=+b[1][1],w):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},w.constrain=function(b){return arguments.length?(n=b,w):n},w.duration=function(b){return arguments.length?(l=+b,w):l},w.interpolate=function(b){return arguments.length?(c=b,w):c},w.on=function(){var b=a.on.apply(a,arguments);return b===a?w:b},w.clickDistance=function(b){return arguments.length?(m=(b=+b)*b,w):Math.sqrt(m)},w.tapDistance=function(b){return arguments.length?(v=+b,w):v},w}const at={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},Un=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],El=["Enter"," ","Escape"],Sl={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var ln;(function(e){e.Strict="strict",e.Loose="loose"})(ln||(ln={}));var $t;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})($t||($t={}));var Gn;(function(e){e.Partial="partial",e.Full="full"})(Gn||(Gn={}));const Cl={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null};var Et;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Et||(Et={}));var qr;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(qr||(qr={}));var te;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(te||(te={}));const Is={[te.Left]:te.Right,[te.Right]:te.Left,[te.Top]:te.Bottom,[te.Bottom]:te.Top};function Nl(e){return e===null?null:e?"valid":"invalid"}const Tl=e=>"id"in e&&"source"in e&&"target"in e,t0=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Co=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),tr=(e,t=[0,0])=>{const{width:n,height:r}=vt(e),i=e.origin??t,o=n*i[0],s=r*i[1];return{x:e.position.x-o,y:e.position.y-s}},n0=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,i)=>{const o=typeof i=="string";let s=!t.nodeLookup&&!o?i:void 0;t.nodeLookup&&(s=o?t.nodeLookup.get(i):Co(i)?i:t.nodeLookup.get(i.id));const l=s?Yr(s,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return oi(r,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return si(n)},nr=(e,t={})=>{if(e.size===0)return{x:0,y:0,width:0,height:0};let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0};return e.forEach(r=>{if(t.filter===void 0||t.filter(r)){const i=Yr(r);n=oi(n,i)}}),si(n)},No=(e,t,[n,r,i]=[0,0,1],o=!1,s=!1)=>{const l={...rr(t,[n,r,i]),width:t.width/i,height:t.height/i},c=[];for(const a of e.values()){const{measured:u,selectable:f=!0,hidden:d=!1}=a;if(s&&!f||d)continue;const h=u.width??a.width??a.initialWidth??null,g=u.height??a.height??a.initialHeight??null,m=Wn(l,un(a)),v=(h??0)*(g??0),w=o&&m>0;(!a.internals.handleBounds||w||m>=v||a.dragging)&&c.push(a)}return c},r0=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function i0(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!i.hidden)&&(!r||r.has(i.id))&&n.set(i.id,i)}),n}async function o0({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:o},s){if(e.size===0)return Promise.resolve(!0);const l=i0(e,s),c=nr(l),a=To(c,t,n,(s==null?void 0:s.minZoom)??i,(s==null?void 0:s.maxZoom)??o,(s==null?void 0:s.padding)??.1);return await r.setViewport(a,{duration:s==null?void 0:s.duration,ease:s==null?void 0:s.ease,interpolate:s==null?void 0:s.interpolate}),Promise.resolve(!0)}function Al({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:o}){const s=n.get(e),l=s.parentId?n.get(s.parentId):void 0,{x:c,y:a}=l?l.internals.positionAbsolute:{x:0,y:0},u=s.origin??r;let f=i;if(s.extent==="parent"&&!s.expandParent)if(!l)o==null||o("005",at.error005());else{const h=l.measured.width,g=l.measured.height;h&&g&&(f=[[c,a],[c+h,a+g]])}else l&&dn(s.extent)&&(f=[[s.extent[0][0]+c,s.extent[0][1]+a],[s.extent[1][0]+c,s.extent[1][1]+a]]);const d=dn(f)?Vt(t,f,s.measured):t;return(s.measured.width===void 0||s.measured.height===void 0)&&(o==null||o("015",at.error015())),{position:{x:d.x-c+(s.measured.width??0)*u[0],y:d.y-a+(s.measured.height??0)*u[1]},positionAbsolute:d}}async function s0({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){const o=new Set(e.map(d=>d.id)),s=[];for(const d of n){if(d.deletable===!1)continue;const h=o.has(d.id),g=!h&&d.parentId&&s.find(m=>m.id===d.parentId);(h||g)&&s.push(d)}const l=new Set(t.map(d=>d.id)),c=r.filter(d=>d.deletable!==!1),u=r0(s,c);for(const d of c)l.has(d.id)&&!u.find(g=>g.id===d.id)&&u.push(d);if(!i)return{edges:u,nodes:s};const f=await i({nodes:s,edges:u});return typeof f=="boolean"?f?{edges:u,nodes:s}:{edges:[],nodes:[]}:f}const cn=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Vt=(e={x:0,y:0},t,n)=>({x:cn(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:cn(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function Rl(e,t,n){const{width:r,height:i}=vt(n),{x:o,y:s}=n.internals.positionAbsolute;return Vt(e,[[o,s],[o+r,s+i]],t)}const $s=(e,t,n)=>e<t?cn(Math.abs(e-t),1,t)/t:e>n?-cn(Math.abs(e-n),1,t)/t:0,jl=(e,t,n=15,r=40)=>{const i=$s(e.x,r,t.width-r)*n,o=$s(e.y,r,t.height-r)*n;return[i,o]},oi=(e,t)=>({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)}),Ji=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),si=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),un=(e,t=[0,0])=>{var i,o;const{x:n,y:r}=Co(e)?e.internals.positionAbsolute:tr(e,t);return{x:n,y:r,width:((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0,height:((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0}},Yr=(e,t=[0,0])=>{var i,o;const{x:n,y:r}=Co(e)?e.internals.positionAbsolute:tr(e,t);return{x:n,y:r,x2:n+(((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0),y2:r+(((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0)}},Ml=(e,t)=>si(oi(Ji(e),Ji(t))),Wn=(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)},Ls=e=>et(e.width)&&et(e.height)&&et(e.x)&&et(e.y),et=e=>!isNaN(e)&&isFinite(e),a0=(e,t)=>{},ai=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),rr=({x:e,y:t},[n,r,i],o=!1,s=[1,1])=>{const l={x:(e-n)/i,y:(t-r)/i};return o?ai(l,s):l},Xr=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function Jt(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function l0(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=Jt(e,n),i=Jt(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e=="object"){const r=Jt(e.top??e.y??0,n),i=Jt(e.bottom??e.y??0,n),o=Jt(e.left??e.x??0,t),s=Jt(e.right??e.x??0,t);return{top:r,right:s,bottom:i,left:o,x:o+s,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function c0(e,t,n,r,i,o){const{x:s,y:l}=Xr(e,[t,n,r]),{x:c,y:a}=Xr({x:e.x+e.width,y:e.y+e.height},[t,n,r]),u=i-c,f=o-a;return{left:Math.floor(s),top:Math.floor(l),right:Math.floor(u),bottom:Math.floor(f)}}const To=(e,t,n,r,i,o)=>{const s=l0(o,t,n),l=(t-s.x)/e.width,c=(n-s.y)/e.height,a=Math.min(l,c),u=cn(a,r,i),f=e.x+e.width/2,d=e.y+e.height/2,h=t/2-f*u,g=n/2-d*u,m=c0(e,h,g,u,t,n),v={left:Math.min(m.left-s.left,0),top:Math.min(m.top-s.top,0),right:Math.min(m.right-s.right,0),bottom:Math.min(m.bottom-s.bottom,0)};return{x:h-v.left+v.right,y:g-v.top+v.bottom,zoom:u}},Ur=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function dn(e){return e!==void 0&&e!=="parent"}function vt(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function Dl(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function Pl(e,t={width:0,height:0},n,r,i){const o={...e},s=r.get(n);if(s){const l=s.origin||i;o.x+=s.internals.positionAbsolute.x-(t.width??0)*l[0],o.y+=s.internals.positionAbsolute.y-(t.height??0)*l[1]}return o}function zs(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function u0(){let e,t;return{promise:new Promise((r,i)=>{e=r,t=i}),resolve:e,reject:t}}function d0(e){return{...Sl,...e||{}}}function Bn(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){const{x:o,y:s}=ot(e),l=rr({x:o-((i==null?void 0:i.left)??0),y:s-((i==null?void 0:i.top)??0)},r),{x:c,y:a}=n?ai(l,t):l;return{xSnapped:c,ySnapped:a,...l}}const Ao=e=>({width:e.offsetWidth,height:e.offsetHeight}),Ol=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},f0=["INPUT","SELECT","TEXTAREA"];function Il(e){var r,i;const t=((i=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:i[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:f0.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const $l=e=>"clientX"in e,ot=(e,t)=>{var o,s;const n=$l(e),r=n?e.clientX:(o=e.touches)==null?void 0:o[0].clientX,i=n?e.clientY:(s=e.touches)==null?void 0:s[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:i-((t==null?void 0:t.top)??0)}},Hs=(e,t,n,r,i)=>{const o=t.querySelectorAll(`.${e}`);return!o||!o.length?null:Array.from(o).map(s=>{const l=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:e,nodeId:i,position:s.getAttribute("data-handlepos"),x:(l.left-n.left)/r,y:(l.top-n.top)/r,...Ao(s)}})};function Ll({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:o,targetControlX:s,targetControlY:l}){const c=e*.125+i*.375+s*.375+n*.125,a=t*.125+o*.375+l*.375+r*.125,u=Math.abs(c-e),f=Math.abs(a-t);return[c,a,u,f]}function _r(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Vs({pos:e,x1:t,y1:n,x2:r,y2:i,c:o}){switch(e){case te.Left:return[t-_r(t-r,o),n];case te.Right:return[t+_r(r-t,o),n];case te.Top:return[t,n-_r(n-i,o)];case te.Bottom:return[t,n+_r(i-n,o)]}}function zl({sourceX:e,sourceY:t,sourcePosition:n=te.Bottom,targetX:r,targetY:i,targetPosition:o=te.Top,curvature:s=.25}){const[l,c]=Vs({pos:n,x1:e,y1:t,x2:r,y2:i,c:s}),[a,u]=Vs({pos:o,x1:r,y1:i,x2:e,y2:t,c:s}),[f,d,h,g]=Ll({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:l,sourceControlY:c,targetControlX:a,targetControlY:u});return[`M${e},${t} C${l},${c} ${a},${u} ${r},${i}`,f,d,h,g]}function Hl({sourceX:e,sourceY:t,targetX:n,targetY:r}){const i=Math.abs(n-e)/2,o=n<e?n+i:n-i,s=Math.abs(r-t)/2,l=r<t?r+s:r-s;return[o,l,i,s]}function h0({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r,elevateOnSelect:i=!1}){if(r!==void 0)return r;const o=i&&n?1e3:0,s=Math.max(e.parentId?e.internals.z:0,t.parentId?t.internals.z:0);return o+s}function p0({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){const o=oi(Yr(e),Yr(t));o.x===o.x2&&(o.x2+=1),o.y===o.y2&&(o.y2+=1);const s={x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]};return Wn(s,si(o))>0}const g0=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,m0=(e,t)=>t.some(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)),y0=(e,t)=>{if(!e.source||!e.target)return t;let n;return Tl(e)?n={...e}:n={...e,id:g0(e)},m0(n,t)?t:(n.sourceHandle===null&&delete n.sourceHandle,n.targetHandle===null&&delete n.targetHandle,t.concat(n))};function Vl({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,o,s,l]=Hl({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,o,s,l]}const Bs={[te.Left]:{x:-1,y:0},[te.Right]:{x:1,y:0},[te.Top]:{x:0,y:-1},[te.Bottom]:{x:0,y:1}},v0=({source:e,sourcePosition:t=te.Bottom,target:n})=>t===te.Left||t===te.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},Fs=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function x0({source:e,sourcePosition:t=te.Bottom,target:n,targetPosition:r=te.Top,center:i,offset:o}){const s=Bs[t],l=Bs[r],c={x:e.x+s.x*o,y:e.y+s.y*o},a={x:n.x+l.x*o,y:n.y+l.y*o},u=v0({source:c,sourcePosition:t,target:a}),f=u.x!==0?"x":"y",d=u[f];let h=[],g,m;const v={x:0,y:0},w={x:0,y:0},[C,y,_,p]=Hl({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(s[f]*l[f]===-1){g=i.x??C,m=i.y??y;const S=[{x:g,y:c.y},{x:g,y:a.y}],N=[{x:c.x,y:m},{x:a.x,y:m}];s[f]===d?h=f==="x"?S:N:h=f==="x"?N:S}else{const S=[{x:c.x,y:a.y}],N=[{x:a.x,y:c.y}];if(f==="x"?h=s.x===d?N:S:h=s.y===d?S:N,t===r){const O=Math.abs(e[f]-n[f]);if(O<=o){const b=Math.min(o-1,o-O);s[f]===d?v[f]=(c[f]>e[f]?-1:1)*b:w[f]=(a[f]>n[f]?-1:1)*b}}if(t!==r){const O=f==="x"?"y":"x",b=s[f]===l[O],R=c[O]>a[O],j=c[O]<a[O];(s[f]===1&&(!b&&R||b&&j)||s[f]!==1&&(!b&&j||b&&R))&&(h=f==="x"?S:N)}const M={x:c.x+v.x,y:c.y+v.y},H={x:a.x+w.x,y:a.y+w.y},I=Math.max(Math.abs(M.x-h[0].x),Math.abs(H.x-h[0].x)),z=Math.max(Math.abs(M.y-h[0].y),Math.abs(H.y-h[0].y));I>=z?(g=(M.x+H.x)/2,m=h[0].y):(g=h[0].x,m=(M.y+H.y)/2)}return[[e,{x:c.x+v.x,y:c.y+v.y},...h,{x:a.x+w.x,y:a.y+w.y},n],g,m,_,p]}function w0(e,t,n,r){const i=Math.min(Fs(e,t)/2,Fs(t,n)/2,r),{x:o,y:s}=t;if(e.x===o&&o===n.x||e.y===s&&s===n.y)return`L${o} ${s}`;if(e.y===s){const a=e.x<n.x?-1:1,u=e.y<n.y?1:-1;return`L ${o+i*a},${s}Q ${o},${s} ${o},${s+i*u}`}const l=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${o},${s+i*c}Q ${o},${s} ${o+i*l},${s}`}function eo({sourceX:e,sourceY:t,sourcePosition:n=te.Bottom,targetX:r,targetY:i,targetPosition:o=te.Top,borderRadius:s=5,centerX:l,centerY:c,offset:a=20}){const[u,f,d,h,g]=x0({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:o,center:{x:l,y:c},offset:a});return[u.reduce((v,w,C)=>{let y="";return C>0&&C<u.length-1?y=w0(u[C-1],w,u[C+1],s):y=`${C===0?"M":"L"}${w.x} ${w.y}`,v+=y,v},""),f,d,h,g]}function qs(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function b0(e){var f;const{sourceNode:t,targetNode:n}=e;if(!qs(t)||!qs(n))return null;const r=t.internals.handleBounds||Ys(t.handles),i=n.internals.handleBounds||Ys(n.handles),o=Xs((r==null?void 0:r.source)??[],e.sourceHandle),s=Xs(e.connectionMode===ln.Strict?(i==null?void 0:i.target)??[]:((i==null?void 0:i.target)??[]).concat((i==null?void 0:i.source)??[]),e.targetHandle);if(!o||!s)return(f=e.onError)==null||f.call(e,"008",at.error008(o?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(o==null?void 0:o.position)||te.Bottom,c=(s==null?void 0:s.position)||te.Top,a=Kn(t,o,l),u=Kn(n,s,c);return{sourceX:a.x,sourceY:a.y,targetX:u.x,targetY:u.y,sourcePosition:l,targetPosition:c}}function Ys(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function Kn(e,t,n=te.Left,r=!1){const i=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,o=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:s,height:l}=t??vt(e);if(r)return{x:i+s/2,y:o+l/2};switch((t==null?void 0:t.position)??n){case te.Top:return{x:i+s/2,y:o};case te.Right:return{x:i+s,y:o+l/2};case te.Bottom:return{x:i+s/2,y:o+l};case te.Left:return{x:i,y:o+l/2}}}function Xs(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function to(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function k0(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){const o=new Set;return e.reduce((s,l)=>([l.markerStart||r,l.markerEnd||i].forEach(c=>{if(c&&typeof c=="object"){const a=to(c,t);o.has(a)||(s.push({id:a,color:c.color||n,...c}),o.add(a))}}),s),[]).sort((s,l)=>s.id.localeCompare(l.id))}const Ro={nodeOrigin:[0,0],nodeExtent:Un,elevateNodesOnSelect:!0,defaults:{}},_0={...Ro,checkEquality:!0};function jo(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function E0(e,t,n){const r=jo(Ro,n);for(const i of e.values())if(i.parentId)Mo(i,e,t,r);else{const o=tr(i,r.nodeOrigin),s=dn(i.extent)?i.extent:r.nodeExtent,l=Vt(o,s,vt(i));i.internals.positionAbsolute=l}}function no(e,t,n,r){var c,a;const i=jo(_0,r);let o=e.length>0;const s=new Map(t),l=i!=null&&i.elevateNodesOnSelect?1e3:0;t.clear(),n.clear();for(const u of e){let f=s.get(u.id);if(i.checkEquality&&u===(f==null?void 0:f.internals.userNode))t.set(u.id,f);else{const d=tr(u,i.nodeOrigin),h=dn(u.extent)?u.extent:i.nodeExtent,g=Vt(d,h,vt(u));f={...i.defaults,...u,measured:{width:(c=u.measured)==null?void 0:c.width,height:(a=u.measured)==null?void 0:a.height},internals:{positionAbsolute:g,handleBounds:u.measured?f==null?void 0:f.internals.handleBounds:void 0,z:Bl(u,l),userNode:u}},t.set(u.id,f)}(f.measured===void 0||f.measured.width===void 0||f.measured.height===void 0)&&!f.hidden&&(o=!1),u.parentId&&Mo(f,t,n,r)}return o}function S0(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Mo(e,t,n,r){const{elevateNodesOnSelect:i,nodeOrigin:o,nodeExtent:s}=jo(Ro,r),l=e.parentId,c=t.get(l);if(!c){console.warn(`Parent node ${l} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}S0(e,n);const a=i?1e3:0,{x:u,y:f,z:d}=C0(e,c,o,s,a),{positionAbsolute:h}=e.internals,g=u!==h.x||f!==h.y;(g||d!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:g?{x:u,y:f}:h,z:d}})}function Bl(e,t){return(et(e.zIndex)?e.zIndex:0)+(e.selected?t:0)}function C0(e,t,n,r,i){const{x:o,y:s}=t.internals.positionAbsolute,l=vt(e),c=tr(e,n),a=dn(e.extent)?Vt(c,e.extent,l):c;let u=Vt({x:o+a.x,y:s+a.y},r,l);e.extent==="parent"&&(u=Rl(u,l,t));const f=Bl(e,i),d=t.internals.z??0;return{x:u.x,y:u.y,z:d>=f?d+1:f}}function Do(e,t,n,r=[0,0]){var s;const i=[],o=new Map;for(const l of e){const c=t.get(l.parentId);if(!c)continue;const a=((s=o.get(l.parentId))==null?void 0:s.expandedRect)??un(c),u=Ml(a,l.rect);o.set(l.parentId,{expandedRect:u,parent:c})}return o.size>0&&o.forEach(({expandedRect:l,parent:c},a)=>{var y;const u=c.internals.positionAbsolute,f=vt(c),d=c.origin??r,h=l.x<u.x?Math.round(Math.abs(u.x-l.x)):0,g=l.y<u.y?Math.round(Math.abs(u.y-l.y)):0,m=Math.max(f.width,Math.round(l.width)),v=Math.max(f.height,Math.round(l.height)),w=(m-f.width)*d[0],C=(v-f.height)*d[1];(h>0||g>0||w||C)&&(i.push({id:a,type:"position",position:{x:c.position.x-h+w,y:c.position.y-g+C}}),(y=n.get(a))==null||y.forEach(_=>{e.some(p=>p.id===_.id)||i.push({id:_.id,type:"position",position:{x:_.position.x+h,y:_.position.y+g}})})),(f.width<l.width||f.height<l.height||h||g)&&i.push({id:a,type:"dimensions",setAttributes:!0,dimensions:{width:m+(h?d[0]*h-w:0),height:v+(g?d[1]*g-C:0)}})}),i}function N0(e,t,n,r,i,o){const s=r==null?void 0:r.querySelector(".xyflow__viewport");let l=!1;if(!s)return{changes:[],updatedInternals:l};const c=[],a=window.getComputedStyle(s),{m22:u}=new window.DOMMatrixReadOnly(a.transform),f=[];for(const d of e.values()){const h=t.get(d.id);if(!h)continue;if(h.hidden){t.set(h.id,{...h,internals:{...h.internals,handleBounds:void 0}}),l=!0;continue}const g=Ao(d.nodeElement),m=h.measured.width!==g.width||h.measured.height!==g.height;if(!!(g.width&&g.height&&(m||!h.internals.handleBounds||d.force))){const w=d.nodeElement.getBoundingClientRect(),C=dn(h.extent)?h.extent:o;let{positionAbsolute:y}=h.internals;h.parentId&&h.extent==="parent"?y=Rl(y,g,t.get(h.parentId)):C&&(y=Vt(y,C,g));const _={...h,measured:g,internals:{...h.internals,positionAbsolute:y,handleBounds:{source:Hs("source",d.nodeElement,w,u,h.id),target:Hs("target",d.nodeElement,w,u,h.id)}}};t.set(h.id,_),h.parentId&&Mo(_,t,n,{nodeOrigin:i}),l=!0,m&&(c.push({id:h.id,type:"dimensions",dimensions:g}),h.expandParent&&h.parentId&&f.push({id:h.id,parentId:h.parentId,rect:un(_,i)}))}}if(f.length>0){const d=Do(f,t,n,i);c.push(...d)}return{changes:c,updatedInternals:l}}async function T0({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:o}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const s=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,o]],r),l=!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2]);return Promise.resolve(l)}function Us(e,t,n,r,i,o){let s=i;const l=r.get(s)||new Map;r.set(s,l.set(n,t)),s=`${i}-${e}`;const c=r.get(s)||new Map;if(r.set(s,c.set(n,t)),o){s=`${i}-${e}-${o}`;const a=r.get(s)||new Map;r.set(s,a.set(n,t))}}function Fl(e,t,n){e.clear(),t.clear();for(const r of n){const{source:i,target:o,sourceHandle:s=null,targetHandle:l=null}=r,c={edgeId:r.id,source:i,target:o,sourceHandle:s,targetHandle:l},a=`${i}-${s}--${o}-${l}`,u=`${o}-${l}--${i}-${s}`;Us("source",c,u,e,i,s),Us("target",c,a,e,o,l),t.set(r.id,r)}}function ql(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:ql(n,t):!1}function Gs(e,t,n){var i;let r=e;do{if((i=r==null?void 0:r.matches)!=null&&i.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function A0(e,t,n,r){const i=new Map;for(const[o,s]of e)if((s.selected||s.id===r)&&(!s.parentId||!ql(s,e))&&(s.draggable||t&&typeof s.draggable>"u")){const l=e.get(o);l&&i.set(o,{id:o,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return i}function Di({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var s,l,c;const i=[];for(const[a,u]of t){const f=(s=n.get(a))==null?void 0:s.internals.userNode;f&&i.push({...f,position:u.position,dragging:r})}if(!e)return[i[0],i];const o=(l=n.get(e))==null?void 0:l.internals.userNode;return[o?{...o,position:((c=t.get(e))==null?void 0:c.position)||o.position,dragging:r}:i[0],i]}function R0({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let o={x:null,y:null},s=0,l=new Map,c=!1,a={x:0,y:0},u=null,f=!1,d=null,h=!1,g=!1;function m({noDragClassName:w,handleSelector:C,domNode:y,isSelectable:_,nodeId:p,nodeClickDistance:k=0}){d=Fe(y);function S({x:I,y:z},O){const{nodeLookup:b,nodeExtent:R,snapGrid:j,snapToGrid:D,nodeOrigin:$,onNodeDrag:P,onSelectionDrag:x,onError:T,updateNodePositions:L}=t();o={x:I,y:z};let V=!1,B={x:0,y:0,x2:0,y2:0};if(l.size>1&&R){const Y=nr(l);B=Ji(Y)}for(const[Y,F]of l){if(!b.has(Y))continue;let X={x:I-F.distance.x,y:z-F.distance.y};D&&(X=ai(X,j));let q=[[R[0][0],R[0][1]],[R[1][0],R[1][1]]];if(l.size>1&&R&&!F.extent){const{positionAbsolute:ie}=F.internals,W=ie.x-B.x+R[0][0],Q=ie.x+F.measured.width-B.x2+R[1][0],Z=ie.y-B.y+R[0][1],le=ie.y+F.measured.height-B.y2+R[1][1];q=[[W,Z],[Q,le]]}const{position:K,positionAbsolute:ae}=Al({nodeId:Y,nextPosition:X,nodeLookup:b,nodeExtent:q,nodeOrigin:$,onError:T});V=V||F.position.x!==K.x||F.position.y!==K.y,F.position=K,F.internals.positionAbsolute=ae}if(g=g||V,!!V&&(L(l,!0),O&&(r||P||!p&&x))){const[Y,F]=Di({nodeId:p,dragItems:l,nodeLookup:b});r==null||r(O,l,Y,F),P==null||P(O,Y,F),p||x==null||x(O,F)}}async function N(){if(!u)return;const{transform:I,panBy:z,autoPanSpeed:O,autoPanOnNodeDrag:b}=t();if(!b){c=!1,cancelAnimationFrame(s);return}const[R,j]=jl(a,u,O);(R!==0||j!==0)&&(o.x=(o.x??0)-R/I[2],o.y=(o.y??0)-j/I[2],await z({x:R,y:j})&&S(o,null)),s=requestAnimationFrame(N)}function M(I){var V;const{nodeLookup:z,multiSelectionActive:O,nodesDraggable:b,transform:R,snapGrid:j,snapToGrid:D,selectNodesOnDrag:$,onNodeDragStart:P,onSelectionDragStart:x,unselectNodesAndEdges:T}=t();f=!0,(!$||!_)&&!O&&p&&((V=z.get(p))!=null&&V.selected||T()),_&&$&&p&&(e==null||e(p));const L=Bn(I.sourceEvent,{transform:R,snapGrid:j,snapToGrid:D,containerBounds:u});if(o=L,l=A0(z,b,L,p),l.size>0&&(n||P||!p&&x)){const[B,Y]=Di({nodeId:p,dragItems:l,nodeLookup:z});n==null||n(I.sourceEvent,l,B,Y),P==null||P(I.sourceEvent,B,Y),p||x==null||x(I.sourceEvent,Y)}}const H=ll().clickDistance(k).on("start",I=>{const{domNode:z,nodeDragThreshold:O,transform:b,snapGrid:R,snapToGrid:j}=t();u=(z==null?void 0:z.getBoundingClientRect())||null,h=!1,g=!1,O===0&&M(I),o=Bn(I.sourceEvent,{transform:b,snapGrid:R,snapToGrid:j,containerBounds:u}),a=ot(I.sourceEvent,u)}).on("drag",I=>{const{autoPanOnNodeDrag:z,transform:O,snapGrid:b,snapToGrid:R,nodeDragThreshold:j,nodeLookup:D}=t(),$=Bn(I.sourceEvent,{transform:O,snapGrid:b,snapToGrid:R,containerBounds:u});if((I.sourceEvent.type==="touchmove"&&I.sourceEvent.touches.length>1||p&&!D.has(p))&&(h=!0),!h){if(!c&&z&&f&&(c=!0,N()),!f){const P=$.xSnapped-(o.x??0),x=$.ySnapped-(o.y??0);Math.sqrt(P*P+x*x)>j&&M(I)}(o.x!==$.xSnapped||o.y!==$.ySnapped)&&l&&f&&(a=ot(I.sourceEvent,u),S($,I.sourceEvent))}}).on("end",I=>{if(!(!f||h)&&(c=!1,f=!1,cancelAnimationFrame(s),l.size>0)){const{nodeLookup:z,updateNodePositions:O,onNodeDragStop:b,onSelectionDragStop:R}=t();if(g&&(O(l,!1),g=!1),i||b||!p&&R){const[j,D]=Di({nodeId:p,dragItems:l,nodeLookup:z,dragging:!1});i==null||i(I.sourceEvent,l,j,D),b==null||b(I.sourceEvent,j,D),p||R==null||R(I.sourceEvent,D)}}}).filter(I=>{const z=I.target;return!I.button&&(!w||!Gs(z,`.${w}`,y))&&(!C||Gs(z,C,y))});d.call(H)}function v(){d==null||d.on(".drag",null)}return{update:m,destroy:v}}function j0(e,t,n){const r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const o of t.values())Wn(i,un(o))>0&&r.push(o);return r}const M0=250;function D0(e,t,n,r){var l,c;let i=[],o=1/0;const s=j0(e,n,t+M0);for(const a of s){const u=[...((l=a.internals.handleBounds)==null?void 0:l.source)??[],...((c=a.internals.handleBounds)==null?void 0:c.target)??[]];for(const f of u){if(r.nodeId===f.nodeId&&r.type===f.type&&r.id===f.id)continue;const{x:d,y:h}=Kn(a,f,f.position,!0),g=Math.sqrt(Math.pow(d-e.x,2)+Math.pow(h-e.y,2));g>t||(g<o?(i=[{...f,x:d,y:h}],o=g):g===o&&i.push({...f,x:d,y:h}))}}if(!i.length)return null;if(i.length>1){const a=r.type==="source"?"target":"source";return i.find(u=>u.type===a)??i[0]}return i[0]}function Yl(e,t,n,r,i,o=!1){var a,u,f;const s=r.get(e);if(!s)return null;const l=i==="strict"?(a=s.internals.handleBounds)==null?void 0:a[t]:[...((u=s.internals.handleBounds)==null?void 0:u.source)??[],...((f=s.internals.handleBounds)==null?void 0:f.target)??[]],c=(n?l==null?void 0:l.find(d=>d.id===n):l==null?void 0:l[0])??null;return c&&o?{...c,...Kn(s,c,c.position,!0)}:c}function Xl(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function P0(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const Ul=()=>!0;function O0(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:o,isTarget:s,domNode:l,nodeLookup:c,lib:a,autoPanOnConnect:u,flowId:f,panBy:d,cancelConnection:h,onConnectStart:g,onConnect:m,onConnectEnd:v,isValidConnection:w=Ul,onReconnectEnd:C,updateConnection:y,getTransform:_,getFromHandle:p,autoPanSpeed:k,dragThreshold:S=1}){const N=Ol(e.target);let M=0,H;const{x:I,y:z}=ot(e),O=N==null?void 0:N.elementFromPoint(I,z),b=Xl(o,O),R=l==null?void 0:l.getBoundingClientRect();let j=!1;if(!R||!b)return;const D=Yl(i,b,r,c,t);if(!D)return;let $=ot(e,R),P=!1,x=null,T=!1,L=null;function V(){if(!u||!R)return;const[ie,W]=jl($,R,k);d({x:ie,y:W}),M=requestAnimationFrame(V)}const B={...D,nodeId:i,type:b,position:D.position},Y=c.get(i);let X={inProgress:!0,isValid:null,from:Kn(Y,B,te.Left,!0),fromHandle:B,fromPosition:B.position,fromNode:Y,to:$,toHandle:null,toPosition:Is[B.position],toNode:null};function q(){j=!0,y(X),g==null||g(e,{nodeId:i,handleId:r,handleType:b})}S===0&&q();function K(ie){if(!j){const{x:le,y:J}=ot(ie),fe=le-I,be=J-z;if(!(fe*fe+be*be>S*S))return;q()}if(!p()||!B){ae(ie);return}const W=_();$=ot(ie,R),H=D0(rr($,W,!1,[1,1]),n,c,B),P||(V(),P=!0);const Q=Gl(ie,{handle:H,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:s?"target":"source",isValidConnection:w,doc:N,lib:a,flowId:f,nodeLookup:c});L=Q.handleDomNode,x=Q.connection,T=P0(!!H,Q.isValid);const Z={...X,isValid:T,to:Q.toHandle&&T?Xr({x:Q.toHandle.x,y:Q.toHandle.y},W):$,toHandle:Q.toHandle,toPosition:T&&Q.toHandle?Q.toHandle.position:Is[B.position],toNode:Q.toHandle?c.get(Q.toHandle.nodeId):null};T&&H&&X.toHandle&&Z.toHandle&&X.toHandle.type===Z.toHandle.type&&X.toHandle.nodeId===Z.toHandle.nodeId&&X.toHandle.id===Z.toHandle.id&&X.to.x===Z.to.x&&X.to.y===Z.to.y||(y(Z),X=Z)}function ae(ie){if(j){(H||L)&&x&&T&&(m==null||m(x));const{inProgress:W,...Q}=X,Z={...Q,toPosition:X.toHandle?X.toPosition:null};v==null||v(ie,Z),o&&(C==null||C(ie,Z))}h(),cancelAnimationFrame(M),P=!1,T=!1,x=null,L=null,N.removeEventListener("mousemove",K),N.removeEventListener("mouseup",ae),N.removeEventListener("touchmove",K),N.removeEventListener("touchend",ae)}N.addEventListener("mousemove",K),N.addEventListener("mouseup",ae),N.addEventListener("touchmove",K),N.addEventListener("touchend",ae)}function Gl(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:o,doc:s,lib:l,flowId:c,isValidConnection:a=Ul,nodeLookup:u}){const f=o==="target",d=t?s.querySelector(`.${l}-flow__handle[data-id="${c}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:h,y:g}=ot(e),m=s.elementFromPoint(h,g),v=m!=null&&m.classList.contains(`${l}-flow__handle`)?m:d,w={handleDomNode:v,isValid:!1,connection:null,toHandle:null};if(v){const C=Xl(void 0,v),y=v.getAttribute("data-nodeid"),_=v.getAttribute("data-handleid"),p=v.classList.contains("connectable"),k=v.classList.contains("connectableend");if(!y||!C)return w;const S={source:f?y:r,sourceHandle:f?_:i,target:f?r:y,targetHandle:f?i:_};w.connection=S;const M=p&&k&&(n===ln.Strict?f&&C==="source"||!f&&C==="target":y!==r||_!==i);w.isValid=M&&a(S),w.toHandle=Yl(y,C,_,u,n,!0)}return w}const ro={onPointerDown:O0,isValid:Gl};function I0({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const i=Fe(e);function o({translateExtent:l,width:c,height:a,zoomStep:u=10,pannable:f=!0,zoomable:d=!0,inversePan:h=!1}){const g=y=>{const _=n();if(y.sourceEvent.type!=="wheel"||!t)return;const p=-y.sourceEvent.deltaY*(y.sourceEvent.deltaMode===1?.05:y.sourceEvent.deltaMode?1:.002)*u,k=_[2]*Math.pow(2,p);t.scaleTo(k)};let m=[0,0];const v=y=>{(y.sourceEvent.type==="mousedown"||y.sourceEvent.type==="touchstart")&&(m=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY])},w=y=>{const _=n();if(y.sourceEvent.type!=="mousemove"&&y.sourceEvent.type!=="touchmove"||!t)return;const p=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY],k=[p[0]-m[0],p[1]-m[1]];m=p;const S=r()*Math.max(_[2],Math.log(_[2]))*(h?-1:1),N={x:_[0]-k[0]*S,y:_[1]-k[1]*S},M=[[0,0],[c,a]];t.setViewportConstrained({x:N.x,y:N.y,zoom:_[2]},M,l)},C=_l().on("start",v).on("zoom",f?w:null).on("zoom.wheel",d?g:null);i.call(C,{})}function s(){i.on("zoom",null)}return{update:o,destroy:s,pointer:Qe}}const $0=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,li=e=>({x:e.x,y:e.y,zoom:e.k}),Pi=({x:e,y:t,zoom:n})=>ii.translate(e,t).scale(n),tn=(e,t)=>e.target.closest(`.${t}`),Wl=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),L0=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Oi=(e,t=0,n=L0,r=()=>{})=>{const i=typeof t=="number"&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on("end",r):e},Kl=e=>{const t=e.ctrlKey&&Ur()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function z0({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:o,zoomOnPinch:s,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:a}){return u=>{if(tn(u,t))return!1;u.preventDefault(),u.stopImmediatePropagation();const f=n.property("__zoom").k||1;if(u.ctrlKey&&s){const v=Qe(u),w=Kl(u),C=f*Math.pow(2,w);r.scaleTo(n,C,v,u);return}const d=u.deltaMode===1?20:1;let h=i===$t.Vertical?0:u.deltaX*d,g=i===$t.Horizontal?0:u.deltaY*d;!Ur()&&u.shiftKey&&i!==$t.Vertical&&(h=u.deltaY*d,g=0),r.translateBy(n,-(h/f)*o,-(g/f)*o,{internal:!0});const m=li(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling||(e.isPanScrolling=!0,l==null||l(u,m)),e.isPanScrolling&&(c==null||c(u,m),e.panScrollTimeout=setTimeout(()=>{a==null||a(u,m),e.isPanScrolling=!1},150))}}function H0({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){const o=r.type==="wheel",s=!t&&o&&!r.ctrlKey,l=tn(r,e);if(r.ctrlKey&&o&&l&&r.preventDefault(),s||l)return null;r.preventDefault(),n.call(this,r,i)}}function V0({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var o,s,l;if((o=r.sourceEvent)!=null&&o.internal)return;const i=li(r.transform);e.mouseButton=((s=r.sourceEvent)==null?void 0:s.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=i,((l=r.sourceEvent)==null?void 0:l.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,i))}}function B0({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return o=>{var s,l;e.usedRightMouseButton=!!(n&&Wl(t,e.mouseButton??0)),(s=o.sourceEvent)!=null&&s.sync||r([o.transform.x,o.transform.y,o.transform.k]),i&&!((l=o.sourceEvent)!=null&&l.internal)&&(i==null||i(o.sourceEvent,li(o.transform)))}}function F0({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:o}){return s=>{var l;if(!((l=s.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,o&&Wl(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&o(s.sourceEvent),e.usedRightMouseButton=!1,r(!1),i&&$0(e.prevViewport,s.transform))){const c=li(s.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i==null||i(s.sourceEvent,c)},n?150:0)}}}function q0({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:o,userSelectionActive:s,noWheelClassName:l,noPanClassName:c,lib:a}){return u=>{var g;const f=e||t,d=n&&u.ctrlKey;if(u.button===1&&u.type==="mousedown"&&(tn(u,`${a}-flow__node`)||tn(u,`${a}-flow__edge`)))return!0;if(!r&&!f&&!i&&!o&&!n||s||tn(u,l)&&u.type==="wheel"||tn(u,c)&&(u.type!=="wheel"||i&&u.type==="wheel"&&!e)||!n&&u.ctrlKey&&u.type==="wheel")return!1;if(!n&&u.type==="touchstart"&&((g=u.touches)==null?void 0:g.length)>1)return u.preventDefault(),!1;if(!f&&!i&&!d&&u.type==="wheel"||!r&&(u.type==="mousedown"||u.type==="touchstart")||Array.isArray(r)&&!r.includes(u.button)&&u.type==="mousedown")return!1;const h=Array.isArray(r)&&r.includes(u.button)||!u.button||u.button<=1;return(!u.ctrlKey||u.type==="wheel")&&h}}function Y0({domNode:e,minZoom:t,maxZoom:n,paneClickDistance:r,translateExtent:i,viewport:o,onPanZoom:s,onPanZoomStart:l,onPanZoomEnd:c,onDraggingChange:a}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},f=e.getBoundingClientRect(),d=_l().clickDistance(!et(r)||r<0?0:r).scaleExtent([t,n]).translateExtent(i),h=Fe(e).call(d);y({x:o.x,y:o.y,zoom:cn(o.zoom,t,n)},[[0,0],[f.width,f.height]],i);const g=h.on("wheel.zoom"),m=h.on("dblclick.zoom");d.wheelDelta(Kl);function v(z,O){return h?new Promise(b=>{d==null||d.interpolate((O==null?void 0:O.interpolate)==="linear"?Vn:Ar).transform(Oi(h,O==null?void 0:O.duration,O==null?void 0:O.ease,()=>b(!0)),z)}):Promise.resolve(!1)}function w({noWheelClassName:z,noPanClassName:O,onPaneContextMenu:b,userSelectionActive:R,panOnScroll:j,panOnDrag:D,panOnScrollMode:$,panOnScrollSpeed:P,preventScrolling:x,zoomOnPinch:T,zoomOnScroll:L,zoomOnDoubleClick:V,zoomActivationKeyPressed:B,lib:Y,onTransformChange:F}){R&&!u.isZoomingOrPanning&&C();const q=j&&!B&&!R?z0({zoomPanValues:u,noWheelClassName:z,d3Selection:h,d3Zoom:d,panOnScrollMode:$,panOnScrollSpeed:P,zoomOnPinch:T,onPanZoomStart:l,onPanZoom:s,onPanZoomEnd:c}):H0({noWheelClassName:z,preventScrolling:x,d3ZoomHandler:g});if(h.on("wheel.zoom",q,{passive:!1}),!R){const ae=V0({zoomPanValues:u,onDraggingChange:a,onPanZoomStart:l});d.on("start",ae);const ie=B0({zoomPanValues:u,panOnDrag:D,onPaneContextMenu:!!b,onPanZoom:s,onTransformChange:F});d.on("zoom",ie);const W=F0({zoomPanValues:u,panOnDrag:D,panOnScroll:j,onPaneContextMenu:b,onPanZoomEnd:c,onDraggingChange:a});d.on("end",W)}const K=q0({zoomActivationKeyPressed:B,panOnDrag:D,zoomOnScroll:L,panOnScroll:j,zoomOnDoubleClick:V,zoomOnPinch:T,userSelectionActive:R,noPanClassName:O,noWheelClassName:z,lib:Y});d.filter(K),V?h.on("dblclick.zoom",m):h.on("dblclick.zoom",null)}function C(){d.on("zoom",null)}async function y(z,O,b){const R=Pi(z),j=d==null?void 0:d.constrain()(R,O,b);return j&&await v(j),new Promise(D=>D(j))}async function _(z,O){const b=Pi(z);return await v(b,O),new Promise(R=>R(b))}function p(z){if(h){const O=Pi(z),b=h.property("__zoom");(b.k!==z.zoom||b.x!==z.x||b.y!==z.y)&&(d==null||d.transform(h,O,null,{sync:!0}))}}function k(){const z=h?kl(h.node()):{x:0,y:0,k:1};return{x:z.x,y:z.y,zoom:z.k}}function S(z,O){return h?new Promise(b=>{d==null||d.interpolate((O==null?void 0:O.interpolate)==="linear"?Vn:Ar).scaleTo(Oi(h,O==null?void 0:O.duration,O==null?void 0:O.ease,()=>b(!0)),z)}):Promise.resolve(!1)}function N(z,O){return h?new Promise(b=>{d==null||d.interpolate((O==null?void 0:O.interpolate)==="linear"?Vn:Ar).scaleBy(Oi(h,O==null?void 0:O.duration,O==null?void 0:O.ease,()=>b(!0)),z)}):Promise.resolve(!1)}function M(z){d==null||d.scaleExtent(z)}function H(z){d==null||d.translateExtent(z)}function I(z){const O=!et(z)||z<0?0:z;d==null||d.clickDistance(O)}return{update:w,destroy:C,setViewport:_,setViewportConstrained:y,getViewport:k,scaleTo:S,scaleBy:N,setScaleExtent:M,setTranslateExtent:H,syncViewport:p,setClickDistance:I}}var fn;(function(e){e.Line="line",e.Handle="handle"})(fn||(fn={}));function X0({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:o}){const s=e-t,l=n-r,c=[s>0?1:s<0?-1:0,l>0?1:l<0?-1:0];return s&&i&&(c[0]=c[0]*-1),l&&o&&(c[1]=c[1]*-1),c}function U0(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),i=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:i}}function kt(e,t){return Math.max(0,t-e)}function _t(e,t){return Math.max(0,e-t)}function Er(e,t,n){return Math.max(0,t-e,e-n)}function Ws(e,t){return e?!t:t}function G0(e,t,n,r,i,o,s,l){let{affectsX:c,affectsY:a}=t;const{isHorizontal:u,isVertical:f}=t,d=u&&f,{xSnapped:h,ySnapped:g}=n,{minWidth:m,maxWidth:v,minHeight:w,maxHeight:C}=r,{x:y,y:_,width:p,height:k,aspectRatio:S}=e;let N=Math.floor(u?h-e.pointerX:0),M=Math.floor(f?g-e.pointerY:0);const H=p+(c?-N:N),I=k+(a?-M:M),z=-o[0]*p,O=-o[1]*k;let b=Er(H,m,v),R=Er(I,w,C);if(s){let $=0,P=0;c&&N<0?$=kt(y+N+z,s[0][0]):!c&&N>0&&($=_t(y+H+z,s[1][0])),a&&M<0?P=kt(_+M+O,s[0][1]):!a&&M>0&&(P=_t(_+I+O,s[1][1])),b=Math.max(b,$),R=Math.max(R,P)}if(l){let $=0,P=0;c&&N>0?$=_t(y+N,l[0][0]):!c&&N<0&&($=kt(y+H,l[1][0])),a&&M>0?P=_t(_+M,l[0][1]):!a&&M<0&&(P=kt(_+I,l[1][1])),b=Math.max(b,$),R=Math.max(R,P)}if(i){if(u){const $=Er(H/S,w,C)*S;if(b=Math.max(b,$),s){let P=0;!c&&!a||c&&!a&&d?P=_t(_+O+H/S,s[1][1])*S:P=kt(_+O+(c?N:-N)/S,s[0][1])*S,b=Math.max(b,P)}if(l){let P=0;!c&&!a||c&&!a&&d?P=kt(_+H/S,l[1][1])*S:P=_t(_+(c?N:-N)/S,l[0][1])*S,b=Math.max(b,P)}}if(f){const $=Er(I*S,m,v)/S;if(R=Math.max(R,$),s){let P=0;!c&&!a||a&&!c&&d?P=_t(y+I*S+z,s[1][0])/S:P=kt(y+(a?M:-M)*S+z,s[0][0])/S,R=Math.max(R,P)}if(l){let P=0;!c&&!a||a&&!c&&d?P=kt(y+I*S,l[1][0])/S:P=_t(y+(a?M:-M)*S,l[0][0])/S,R=Math.max(R,P)}}}M=M+(M<0?R:-R),N=N+(N<0?b:-b),i&&(d?H>I*S?M=(Ws(c,a)?-N:N)/S:N=(Ws(c,a)?-M:M)*S:u?(M=N/S,a=c):(N=M*S,c=a));const j=c?y+N:y,D=a?_+M:_;return{width:p+(c?-N:N),height:k+(a?-M:M),x:o[0]*N*(c?-1:1)+j,y:o[1]*M*(a?-1:1)+D}}const Zl={width:0,height:0,x:0,y:0},W0={...Zl,pointerX:0,pointerY:0,aspectRatio:1};function K0(e){return[[0,0],[e.measured.width,e.measured.height]]}function Z0(e,t,n){const r=t.position.x+e.position.x,i=t.position.y+e.position.y,o=e.measured.width??0,s=e.measured.height??0,l=n[0]*o,c=n[1]*s;return[[r-l,i-c],[r+o-l,i+s-c]]}function Q0({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){const o=Fe(e);function s({controlPosition:c,boundaries:a,keepAspectRatio:u,resizeDirection:f,onResizeStart:d,onResize:h,onResizeEnd:g,shouldResize:m}){let v={...Zl},w={...W0};const C=U0(c);let y,_=null,p=[],k,S,N;const M=ll().on("start",H=>{const{nodeLookup:I,transform:z,snapGrid:O,snapToGrid:b,nodeOrigin:R,paneDomNode:j}=n();if(y=I.get(t),!y)return;_=(j==null?void 0:j.getBoundingClientRect())??null;const{xSnapped:D,ySnapped:$}=Bn(H.sourceEvent,{transform:z,snapGrid:O,snapToGrid:b,containerBounds:_});v={width:y.measured.width??0,height:y.measured.height??0,x:y.position.x??0,y:y.position.y??0},w={...v,pointerX:D,pointerY:$,aspectRatio:v.width/v.height},k=void 0,y.parentId&&(y.extent==="parent"||y.expandParent)&&(k=I.get(y.parentId),S=k&&y.extent==="parent"?K0(k):void 0),p=[],N=void 0;for(const[P,x]of I)if(x.parentId===t&&(p.push({id:P,position:{...x.position},extent:x.extent}),x.extent==="parent"||x.expandParent)){const T=Z0(x,y,x.origin??R);N?N=[[Math.min(T[0][0],N[0][0]),Math.min(T[0][1],N[0][1])],[Math.max(T[1][0],N[1][0]),Math.max(T[1][1],N[1][1])]]:N=T}d==null||d(H,{...v})}).on("drag",H=>{const{transform:I,snapGrid:z,snapToGrid:O,nodeOrigin:b}=n(),R=Bn(H.sourceEvent,{transform:I,snapGrid:z,snapToGrid:O,containerBounds:_}),j=[];if(!y)return;const{x:D,y:$,width:P,height:x}=v,T={},L=y.origin??b,{width:V,height:B,x:Y,y:F}=G0(w,C,R,a,u,L,S,N),X=V!==P,q=B!==x,K=Y!==D&&X,ae=F!==$&&q;if(!K&&!ae&&!X&&!q)return;if((K||ae||L[0]===1||L[1]===1)&&(T.x=K?Y:v.x,T.y=ae?F:v.y,v.x=T.x,v.y=T.y,p.length>0)){const Z=Y-D,le=F-$;for(const J of p)J.position={x:J.position.x-Z+L[0]*(V-P),y:J.position.y-le+L[1]*(B-x)},j.push(J)}if((X||q)&&(T.width=X&&(!f||f==="horizontal")?V:v.width,T.height=q&&(!f||f==="vertical")?B:v.height,v.width=T.width,v.height=T.height),k&&y.expandParent){const Z=L[0]*(T.width??0);T.x&&T.x<Z&&(v.x=Z,w.x=w.x-(T.x-Z));const le=L[1]*(T.height??0);T.y&&T.y<le&&(v.y=le,w.y=w.y-(T.y-le))}const ie=X0({width:v.width,prevWidth:P,height:v.height,prevHeight:x,affectsX:C.affectsX,affectsY:C.affectsY}),W={...v,direction:ie};(m==null?void 0:m(H,W))!==!1&&(h==null||h(H,W),r(T,j))}).on("end",H=>{g==null||g(H,{...v}),i==null||i({...v})});o.call(M)}function l(){o.on(".drag",null)}return{update:s,destroy:l}}var Ii={exports:{}},$i={};/**
450
+ * @license React
451
+ * use-sync-external-store-shim/with-selector.production.js
452
+ *
453
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
454
+ *
455
+ * This source code is licensed under the MIT license found in the
456
+ * LICENSE file in the root directory of this source tree.
457
+ */var Ks;function J0(){if(Ks)return $i;Ks=1;var e=mn(),t=Cd();function n(a,u){return a===u&&(a!==0||1/a===1/u)||a!==a&&u!==u}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,s=e.useEffect,l=e.useMemo,c=e.useDebugValue;return $i.useSyncExternalStoreWithSelector=function(a,u,f,d,h){var g=o(null);if(g.current===null){var m={hasValue:!1,value:null};g.current=m}else m=g.current;g=l(function(){function w(k){if(!C){if(C=!0,y=k,k=d(k),h!==void 0&&m.hasValue){var S=m.value;if(h(S,k))return _=S}return _=k}if(S=_,r(y,k))return S;var N=d(k);return h!==void 0&&h(S,N)?(y=k,S):(y=k,_=N)}var C=!1,y,_,p=f===void 0?null:f;return[function(){return w(u())},p===null?void 0:function(){return w(p())}]},[u,f,d,h]);var v=i(a,g[0],g[1]);return s(function(){m.hasValue=!0,m.value=v},[v]),c(v),v},$i}var Zs;function em(){return Zs||(Zs=1,Ii.exports=J0()),Ii.exports}var tm=em();const nm=Zr(tm),rm={},Qs=e=>{let t;const n=new Set,r=(u,f)=>{const d=typeof u=="function"?u(t):u;if(!Object.is(d,t)){const h=t;t=f??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(g=>g(t,h))}},i=()=>t,c={setState:r,getState:i,getInitialState:()=>a,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(rm?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},a=t=e(r,i,c);return c},im=e=>e?Qs(e):Qs,{useDebugValue:om}=Aa,{useSyncExternalStoreWithSelector:sm}=nm,am=e=>e;function Ql(e,t=am,n){const r=sm(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return om(r),r}const Js=(e,t)=>{const n=im(e),r=(i,o=t)=>Ql(n,i,o);return Object.assign(r,n),r},lm=(e,t)=>e?Js(e,t):Js;function _e(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const ci=A.createContext(null),cm=ci.Provider,Jl=at.error001();function de(e,t){const n=A.useContext(ci);if(n===null)throw new Error(Jl);return Ql(n,e,t)}function ke(){const e=A.useContext(ci);if(e===null)throw new Error(Jl);return A.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const ea={display:"none"},um={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},ec="react-flow__node-desc",tc="react-flow__edge-desc",dm="react-flow__aria-live",fm=e=>e.ariaLiveMessage,hm=e=>e.ariaLabelConfig;function pm({rfId:e}){const t=de(fm);return E.jsx("div",{id:`${dm}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:um,children:t})}function gm({rfId:e,disableKeyboardA11y:t}){const n=de(hm);return E.jsxs(E.Fragment,{children:[E.jsx("div",{id:`${ec}-${e}`,style:ea,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),E.jsx("div",{id:`${tc}-${e}`,style:ea,children:n["edge.a11yDescription.default"]}),!t&&E.jsx(pm,{rfId:e})]})}const ui=A.forwardRef(({position:e="top-left",children:t,className:n,style:r,...i},o)=>{const s=`${e}`.split("-");return E.jsx("div",{className:Se(["react-flow__panel",n,...s]),style:r,ref:o,...i,children:t})});ui.displayName="Panel";function mm({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:E.jsx(ui,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:E.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const ym=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},Sr=e=>e.id;function vm(e,t){return _e(e.selectedNodes.map(Sr),t.selectedNodes.map(Sr))&&_e(e.selectedEdges.map(Sr),t.selectedEdges.map(Sr))}function xm({onSelectionChange:e}){const t=ke(),{selectedNodes:n,selectedEdges:r}=de(ym,vm);return A.useEffect(()=>{const i={nodes:n,edges:r};e==null||e(i),t.getState().onSelectionChangeHandlers.forEach(o=>o(i))},[n,r,e]),null}const wm=e=>!!e.onSelectionChangeHandlers;function bm({onSelectionChange:e}){const t=de(wm);return e||t?E.jsx(xm,{onSelectionChange:e}):null}const nc=[0,0],km={x:0,y:0,zoom:1},_m=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","paneClickDistance","ariaLabelConfig"],ta=[..._m,"rfId"],Em=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setPaneClickDistance:e.setPaneClickDistance}),na={translateExtent:Un,nodeOrigin:nc,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1",paneClickDistance:0};function Sm(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:o,setNodeExtent:s,reset:l,setDefaultNodesAndEdges:c,setPaneClickDistance:a}=de(Em,_e),u=ke();A.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{f.current=na,l()}),[]);const f=A.useRef(na);return A.useEffect(()=>{for(const d of ta){const h=e[d],g=f.current[d];h!==g&&(typeof e[d]>"u"||(d==="nodes"?t(h):d==="edges"?n(h):d==="minZoom"?r(h):d==="maxZoom"?i(h):d==="translateExtent"?o(h):d==="nodeExtent"?s(h):d==="paneClickDistance"?a(h):d==="ariaLabelConfig"?u.setState({ariaLabelConfig:d0(h)}):d==="fitView"?u.setState({fitViewQueued:h}):d==="fitViewOptions"?u.setState({fitViewOptions:h}):u.setState({[d]:h})))}f.current=e},ta.map(d=>e[d])),null}function ra(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function Cm(e){var r;const[t,n]=A.useState(e==="system"?null:e);return A.useEffect(()=>{if(e!=="system"){n(e);return}const i=ra(),o=()=>n(i!=null&&i.matches?"dark":"light");return o(),i==null||i.addEventListener("change",o),()=>{i==null||i.removeEventListener("change",o)}},[e]),t!==null?t:(r=ra())!=null&&r.matches?"dark":"light"}const ia=typeof document<"u"?document:null;function Zn(e=null,t={target:ia,actInsideInputWithModifier:!0}){const[n,r]=A.useState(!1),i=A.useRef(!1),o=A.useRef(new Set([])),[s,l]=A.useMemo(()=>{if(e!==null){const a=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace("+",`
458
+ `).replace(`
459
+
460
+ `,`
461
+ +`).split(`
462
+ `)),u=a.reduce((f,d)=>f.concat(...d),[]);return[a,u]}return[[],[]]},[e]);return A.useEffect(()=>{const c=(t==null?void 0:t.target)??ia,a=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const u=h=>{var v,w;if(i.current=h.ctrlKey||h.metaKey||h.shiftKey||h.altKey,(!i.current||i.current&&!a)&&Il(h))return!1;const m=sa(h.code,l);if(o.current.add(h[m]),oa(s,o.current,!1)){const C=((w=(v=h.composedPath)==null?void 0:v.call(h))==null?void 0:w[0])||h.target,y=(C==null?void 0:C.nodeName)==="BUTTON"||(C==null?void 0:C.nodeName)==="A";t.preventDefault!==!1&&(i.current||!y)&&h.preventDefault(),r(!0)}},f=h=>{const g=sa(h.code,l);oa(s,o.current,!0)?(r(!1),o.current.clear()):o.current.delete(h[g]),h.key==="Meta"&&o.current.clear(),i.current=!1},d=()=>{o.current.clear(),r(!1)};return c==null||c.addEventListener("keydown",u),c==null||c.addEventListener("keyup",f),window.addEventListener("blur",d),window.addEventListener("contextmenu",d),()=>{c==null||c.removeEventListener("keydown",u),c==null||c.removeEventListener("keyup",f),window.removeEventListener("blur",d),window.removeEventListener("contextmenu",d)}}},[e,r]),n}function oa(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(i=>t.has(i)))}function sa(e,t){return t.includes(e)?"code":"key"}const Nm=()=>{const e=ke();return A.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,{duration:n==null?void 0:n.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,i,o],panZoom:s}=e.getState();return s?(await s.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??o},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:i,minZoom:o,maxZoom:s,panZoom:l}=e.getState(),c=To(t,r,i,o,s,(n==null?void 0:n.padding)??.1);return l?(await l.setViewport(c,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:i,snapToGrid:o,domNode:s}=e.getState();if(!s)return t;const{x:l,y:c}=s.getBoundingClientRect(),a={x:t.x-l,y:t.y-c},u=n.snapGrid??i,f=n.snapToGrid??o;return rr(a,r,f,u)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:i,y:o}=r.getBoundingClientRect(),s=Xr(t,n);return{x:s.x+i,y:s.y+o}}}),[])};function rc(e,t){const n=[],r=new Map,i=[];for(const o of e)if(o.type==="add"){i.push(o);continue}else if(o.type==="remove"||o.type==="replace")r.set(o.id,[o]);else{const s=r.get(o.id);s?s.push(o):r.set(o.id,[o])}for(const o of t){const s=r.get(o.id);if(!s){n.push(o);continue}if(s[0].type==="remove")continue;if(s[0].type==="replace"){n.push({...s[0].item});continue}const l={...o};for(const c of s)Tm(c,l);n.push(l)}return i.length&&i.forEach(o=>{o.index!==void 0?n.splice(o.index,0,{...o.item}):n.push({...o.item})}),n}function Tm(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured??(t.measured={}),t.measured.width=e.dimensions.width,t.measured.height=e.dimensions.height,e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function ic(e,t){return rc(e,t)}function oc(e,t){return rc(e,t)}function jt(e,t){return{id:e,type:"select",selected:t}}function nn(e,t=new Set,n=!1){const r=[];for(const[i,o]of e){const s=t.has(i);!(o.selected===void 0&&!s)&&o.selected!==s&&(n&&(o.selected=s),r.push(jt(o.id,s)))}return r}function aa({items:e=[],lookup:t}){var i;const n=[],r=new Map(e.map(o=>[o.id,o]));for(const[o,s]of e.entries()){const l=t.get(s.id),c=((i=l==null?void 0:l.internals)==null?void 0:i.userNode)??l;c!==void 0&&c!==s&&n.push({id:s.id,item:s,type:"replace"}),c===void 0&&n.push({item:s,type:"add",index:o})}for(const[o]of t)r.get(o)===void 0&&n.push({id:o,type:"remove"});return n}function la(e){return{id:e.id,type:"remove"}}const ca=e=>t0(e),Am=e=>Tl(e);function sc(e){return A.forwardRef(e)}const Rm=typeof window<"u"?A.useLayoutEffect:A.useEffect;function ua(e){const[t,n]=A.useState(BigInt(0)),[r]=A.useState(()=>jm(()=>n(i=>i+BigInt(1))));return Rm(()=>{const i=r.get();i.length&&(e(i),r.reset())},[t]),r}function jm(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const ac=A.createContext(null);function Mm({children:e}){const t=ke(),n=A.useCallback(l=>{const{nodes:c=[],setNodes:a,hasDefaultNodes:u,onNodesChange:f,nodeLookup:d,fitViewQueued:h}=t.getState();let g=c;for(const v of l)g=typeof v=="function"?v(g):v;const m=aa({items:g,lookup:d});u&&a(g),m.length>0?f==null||f(m):h&&window.requestAnimationFrame(()=>{const{fitViewQueued:v,nodes:w,setNodes:C}=t.getState();v&&C(w)})},[]),r=ua(n),i=A.useCallback(l=>{const{edges:c=[],setEdges:a,hasDefaultEdges:u,onEdgesChange:f,edgeLookup:d}=t.getState();let h=c;for(const g of l)h=typeof g=="function"?g(h):g;u?a(h):f&&f(aa({items:h,lookup:d}))},[]),o=ua(i),s=A.useMemo(()=>({nodeQueue:r,edgeQueue:o}),[]);return E.jsx(ac.Provider,{value:s,children:e})}function Dm(){const e=A.useContext(ac);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const Pm=e=>!!e.panZoom;function Po(){const e=Nm(),t=ke(),n=Dm(),r=de(Pm),i=A.useMemo(()=>{const o=f=>t.getState().nodeLookup.get(f),s=f=>{n.nodeQueue.push(f)},l=f=>{n.edgeQueue.push(f)},c=f=>{var w,C;const{nodeLookup:d,nodeOrigin:h}=t.getState(),g=ca(f)?f:d.get(f.id),m=g.parentId?Pl(g.position,g.measured,g.parentId,d,h):g.position,v={...g,position:m,width:((w=g.measured)==null?void 0:w.width)??g.width,height:((C=g.measured)==null?void 0:C.height)??g.height};return un(v)},a=(f,d,h={replace:!1})=>{s(g=>g.map(m=>{if(m.id===f){const v=typeof d=="function"?d(m):d;return h.replace&&ca(v)?v:{...m,...v}}return m}))},u=(f,d,h={replace:!1})=>{l(g=>g.map(m=>{if(m.id===f){const v=typeof d=="function"?d(m):d;return h.replace&&Am(v)?v:{...m,...v}}return m}))};return{getNodes:()=>t.getState().nodes.map(f=>({...f})),getNode:f=>{var d;return(d=o(f))==null?void 0:d.internals.userNode},getInternalNode:o,getEdges:()=>{const{edges:f=[]}=t.getState();return f.map(d=>({...d}))},getEdge:f=>t.getState().edgeLookup.get(f),setNodes:s,setEdges:l,addNodes:f=>{const d=Array.isArray(f)?f:[f];n.nodeQueue.push(h=>[...h,...d])},addEdges:f=>{const d=Array.isArray(f)?f:[f];n.edgeQueue.push(h=>[...h,...d])},toObject:()=>{const{nodes:f=[],edges:d=[],transform:h}=t.getState(),[g,m,v]=h;return{nodes:f.map(w=>({...w})),edges:d.map(w=>({...w})),viewport:{x:g,y:m,zoom:v}}},deleteElements:async({nodes:f=[],edges:d=[]})=>{const{nodes:h,edges:g,onNodesDelete:m,onEdgesDelete:v,triggerNodeChanges:w,triggerEdgeChanges:C,onDelete:y,onBeforeDelete:_}=t.getState(),{nodes:p,edges:k}=await s0({nodesToRemove:f,edgesToRemove:d,nodes:h,edges:g,onBeforeDelete:_}),S=k.length>0,N=p.length>0;if(S){const M=k.map(la);v==null||v(k),C(M)}if(N){const M=p.map(la);m==null||m(p),w(M)}return(N||S)&&(y==null||y({nodes:p,edges:k})),{deletedNodes:p,deletedEdges:k}},getIntersectingNodes:(f,d=!0,h)=>{const g=Ls(f),m=g?f:c(f),v=h!==void 0;return m?(h||t.getState().nodes).filter(w=>{const C=t.getState().nodeLookup.get(w.id);if(C&&!g&&(w.id===f.id||!C.internals.positionAbsolute))return!1;const y=un(v?w:C),_=Wn(y,m);return d&&_>0||_>=m.width*m.height}):[]},isNodeIntersecting:(f,d,h=!0)=>{const m=Ls(f)?f:c(f);if(!m)return!1;const v=Wn(m,d);return h&&v>0||v>=m.width*m.height},updateNode:a,updateNodeData:(f,d,h={replace:!1})=>{a(f,g=>{const m=typeof d=="function"?d(g):d;return h.replace?{...g,data:m}:{...g,data:{...g.data,...m}}},h)},updateEdge:u,updateEdgeData:(f,d,h={replace:!1})=>{u(f,g=>{const m=typeof d=="function"?d(g):d;return h.replace?{...g,data:m}:{...g,data:{...g.data,...m}}},h)},getNodesBounds:f=>{const{nodeLookup:d,nodeOrigin:h}=t.getState();return n0(f,{nodeLookup:d,nodeOrigin:h})},getHandleConnections:({type:f,id:d,nodeId:h})=>{var g;return Array.from(((g=t.getState().connectionLookup.get(`${h}-${f}${d?`-${d}`:""}`))==null?void 0:g.values())??[])},getNodeConnections:({type:f,handleId:d,nodeId:h})=>{var g;return Array.from(((g=t.getState().connectionLookup.get(`${h}${f?d?`-${f}-${d}`:`-${f}`:""}`))==null?void 0:g.values())??[])},fitView:async f=>{const d=t.getState().fitViewResolver??u0();return t.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:d}),n.nodeQueue.push(h=>[...h]),d.promise}}},[]);return A.useMemo(()=>({...i,...e,viewportInitialized:r}),[r])}const da=e=>e.selected,Om=typeof window<"u"?window:void 0;function Im({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=ke(),{deleteElements:r}=Po(),i=Zn(e,{actInsideInputWithModifier:!1}),o=Zn(t,{target:Om});A.useEffect(()=>{if(i){const{edges:s,nodes:l}=n.getState();r({nodes:l.filter(da),edges:s.filter(da)}),n.setState({nodesSelectionActive:!1})}},[i]),A.useEffect(()=>{n.setState({multiSelectionActive:o})},[o])}function $m(e){const t=ke();A.useEffect(()=>{const n=()=>{var i,o;if(!e.current)return!1;const r=Ao(e.current);(r.height===0||r.width===0)&&((o=(i=t.getState()).onError)==null||o.call(i,"004",at.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const di={position:"absolute",width:"100%",height:"100%",top:0,left:0},Lm=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib});function zm({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:i=.5,panOnScrollMode:o=$t.Free,zoomOnDoubleClick:s=!0,panOnDrag:l=!0,defaultViewport:c,translateExtent:a,minZoom:u,maxZoom:f,zoomActivationKeyCode:d,preventScrolling:h=!0,children:g,noWheelClassName:m,noPanClassName:v,onViewportChange:w,isControlledViewport:C,paneClickDistance:y}){const _=ke(),p=A.useRef(null),{userSelectionActive:k,lib:S}=de(Lm,_e),N=Zn(d),M=A.useRef();$m(p);const H=A.useCallback(I=>{w==null||w({x:I[0],y:I[1],zoom:I[2]}),C||_.setState({transform:I})},[w,C]);return A.useEffect(()=>{if(p.current){M.current=Y0({domNode:p.current,minZoom:u,maxZoom:f,translateExtent:a,viewport:c,paneClickDistance:y,onDraggingChange:b=>_.setState({paneDragging:b}),onPanZoomStart:(b,R)=>{const{onViewportChangeStart:j,onMoveStart:D}=_.getState();D==null||D(b,R),j==null||j(R)},onPanZoom:(b,R)=>{const{onViewportChange:j,onMove:D}=_.getState();D==null||D(b,R),j==null||j(R)},onPanZoomEnd:(b,R)=>{const{onViewportChangeEnd:j,onMoveEnd:D}=_.getState();D==null||D(b,R),j==null||j(R)}});const{x:I,y:z,zoom:O}=M.current.getViewport();return _.setState({panZoom:M.current,transform:[I,z,O],domNode:p.current.closest(".react-flow")}),()=>{var b;(b=M.current)==null||b.destroy()}}},[]),A.useEffect(()=>{var I;(I=M.current)==null||I.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:i,panOnScrollMode:o,zoomOnDoubleClick:s,panOnDrag:l,zoomActivationKeyPressed:N,preventScrolling:h,noPanClassName:v,userSelectionActive:k,noWheelClassName:m,lib:S,onTransformChange:H})},[e,t,n,r,i,o,s,l,N,h,v,k,m,S,H]),E.jsx("div",{className:"react-flow__renderer",ref:p,style:di,children:g})}const Hm=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Vm(){const{userSelectionActive:e,userSelectionRect:t}=de(Hm,_e);return e&&t?E.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const Li=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},Bm=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function Fm({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Gn.Full,panOnDrag:r,selectionOnDrag:i,onSelectionStart:o,onSelectionEnd:s,onPaneClick:l,onPaneContextMenu:c,onPaneScroll:a,onPaneMouseEnter:u,onPaneMouseMove:f,onPaneMouseLeave:d,children:h}){const g=ke(),{userSelectionActive:m,elementsSelectable:v,dragging:w,connectionInProgress:C}=de(Bm,_e),y=v&&(e||m),_=A.useRef(null),p=A.useRef(),k=A.useRef(new Set),S=A.useRef(new Set),N=A.useRef(!1),M=A.useRef(!1),H=D=>{if(N.current||C){N.current=!1;return}l==null||l(D),g.getState().resetSelectedElements(),g.setState({nodesSelectionActive:!1})},I=D=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){D.preventDefault();return}c==null||c(D)},z=a?D=>a(D):void 0,O=D=>{var L,V;const{resetSelectedElements:$,domNode:P}=g.getState();if(p.current=P==null?void 0:P.getBoundingClientRect(),!v||!e||D.button!==0||D.target!==_.current||!p.current)return;(V=(L=D.target)==null?void 0:L.setPointerCapture)==null||V.call(L,D.pointerId),M.current=!0,N.current=!1;const{x,y:T}=ot(D.nativeEvent,p.current);$(),g.setState({userSelectionRect:{width:0,height:0,startX:x,startY:T,x,y:T}}),o==null||o(D)},b=D=>{const{userSelectionRect:$,transform:P,nodeLookup:x,edgeLookup:T,connectionLookup:L,triggerNodeChanges:V,triggerEdgeChanges:B,defaultEdgeOptions:Y}=g.getState();if(!p.current||!$)return;N.current=!0;const{x:F,y:X}=ot(D.nativeEvent,p.current),{startX:q,startY:K}=$,ae={startX:q,startY:K,x:F<q?F:q,y:X<K?X:K,width:Math.abs(F-q),height:Math.abs(X-K)},ie=k.current,W=S.current;k.current=new Set(No(x,ae,P,n===Gn.Partial,!0).map(Z=>Z.id)),S.current=new Set;const Q=(Y==null?void 0:Y.selectable)??!0;for(const Z of k.current){const le=L.get(Z);if(le)for(const{edgeId:J}of le.values()){const fe=T.get(J);fe&&(fe.selectable??Q)&&S.current.add(J)}}if(!zs(ie,k.current)){const Z=nn(x,k.current,!0);V(Z)}if(!zs(W,S.current)){const Z=nn(T,S.current);B(Z)}g.setState({userSelectionRect:ae,userSelectionActive:!0,nodesSelectionActive:!1})},R=D=>{var P,x;if(D.button!==0||!M.current)return;(x=(P=D.target)==null?void 0:P.releasePointerCapture)==null||x.call(P,D.pointerId);const{userSelectionRect:$}=g.getState();!m&&$&&D.target===_.current&&(H==null||H(D)),g.setState({userSelectionActive:!1,userSelectionRect:null,nodesSelectionActive:k.current.size>0}),s==null||s(D),(t||i)&&(N.current=!1),M.current=!1},j=r===!0||Array.isArray(r)&&r.includes(0);return E.jsxs("div",{className:Se(["react-flow__pane",{draggable:j,dragging:w,selection:e}]),onClick:y?void 0:Li(H,_),onContextMenu:Li(I,_),onWheel:Li(z,_),onPointerEnter:y?void 0:u,onPointerDown:y?O:f,onPointerMove:y?b:f,onPointerUp:y?R:void 0,onPointerLeave:d,ref:_,style:di,children:[h,E.jsx(Vm,{})]})}function io({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:i,unselectNodesAndEdges:o,multiSelectionActive:s,nodeLookup:l,onError:c}=t.getState(),a=l.get(e);if(!a){c==null||c("012",at.error012(e));return}t.setState({nodesSelectionActive:!1}),a.selected?(n||a.selected&&s)&&(o({nodes:[a],edges:[]}),requestAnimationFrame(()=>{var u;return(u=r==null?void 0:r.current)==null?void 0:u.blur()})):i([e])}function lc({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:o,nodeClickDistance:s}){const l=ke(),[c,a]=A.useState(!1),u=A.useRef();return A.useEffect(()=>{u.current=R0({getStoreItems:()=>l.getState(),onNodeMouseDown:f=>{io({id:f,store:l,nodeRef:e})},onDragStart:()=>{a(!0)},onDragStop:()=>{a(!1)}})},[]),A.useEffect(()=>{var f,d;if(t)(f=u.current)==null||f.destroy();else if(e.current)return(d=u.current)==null||d.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:o,nodeId:i,nodeClickDistance:s}),()=>{var h;(h=u.current)==null||h.destroy()}},[n,r,t,o,e,i]),c}const qm=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function cc(){const e=ke();return A.useCallback(n=>{const{nodeExtent:r,snapToGrid:i,snapGrid:o,nodesDraggable:s,onError:l,updateNodePositions:c,nodeLookup:a,nodeOrigin:u}=e.getState(),f=new Map,d=qm(s),h=i?o[0]:5,g=i?o[1]:5,m=n.direction.x*h*n.factor,v=n.direction.y*g*n.factor;for(const[,w]of a){if(!d(w))continue;let C={x:w.internals.positionAbsolute.x+m,y:w.internals.positionAbsolute.y+v};i&&(C=ai(C,o));const{position:y,positionAbsolute:_}=Al({nodeId:w.id,nextPosition:C,nodeLookup:a,nodeExtent:r,nodeOrigin:u,onError:l});w.position=y,w.internals.positionAbsolute=_,f.set(w.id,w)}c(f)},[])}const Oo=A.createContext(null),Ym=Oo.Provider;Oo.Consumer;const uc=()=>A.useContext(Oo),Xm=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),Um=(e,t,n)=>r=>{const{connectionClickStartHandle:i,connectionMode:o,connection:s}=r,{fromHandle:l,toHandle:c,isValid:a}=s,u=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===t&&(c==null?void 0:c.type)===n;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n,connectingTo:u,clickConnecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.id)===t&&(i==null?void 0:i.type)===n,isPossibleEndHandle:o===ln.Strict?(l==null?void 0:l.type)!==n:e!==(l==null?void 0:l.nodeId)||t!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!i,valid:u&&a}};function Gm({type:e="source",position:t=te.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:o=!0,id:s,onConnect:l,children:c,className:a,onMouseDown:u,onTouchStart:f,...d},h){var R,j;const g=s||null,m=e==="target",v=ke(),w=uc(),{connectOnClick:C,noPanClassName:y,rfId:_}=de(Xm,_e),{connectingFrom:p,connectingTo:k,clickConnecting:S,isPossibleEndHandle:N,connectionInProcess:M,clickConnectionInProcess:H,valid:I}=de(Um(w,g,e),_e);w||(j=(R=v.getState()).onError)==null||j.call(R,"010",at.error010());const z=D=>{const{defaultEdgeOptions:$,onConnect:P,hasDefaultEdges:x}=v.getState(),T={...$,...D};if(x){const{edges:L,setEdges:V}=v.getState();V(y0(T,L))}P==null||P(T),l==null||l(T)},O=D=>{if(!w)return;const $=$l(D.nativeEvent);if(i&&($&&D.button===0||!$)){const P=v.getState();ro.onPointerDown(D.nativeEvent,{autoPanOnConnect:P.autoPanOnConnect,connectionMode:P.connectionMode,connectionRadius:P.connectionRadius,domNode:P.domNode,nodeLookup:P.nodeLookup,lib:P.lib,isTarget:m,handleId:g,nodeId:w,flowId:P.rfId,panBy:P.panBy,cancelConnection:P.cancelConnection,onConnectStart:P.onConnectStart,onConnectEnd:P.onConnectEnd,updateConnection:P.updateConnection,onConnect:z,isValidConnection:n||P.isValidConnection,getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,autoPanSpeed:P.autoPanSpeed,dragThreshold:P.connectionDragThreshold})}$?u==null||u(D):f==null||f(D)},b=D=>{const{onClickConnectStart:$,onClickConnectEnd:P,connectionClickStartHandle:x,connectionMode:T,isValidConnection:L,lib:V,rfId:B,nodeLookup:Y,connection:F}=v.getState();if(!w||!x&&!i)return;if(!x){$==null||$(D.nativeEvent,{nodeId:w,handleId:g,handleType:e}),v.setState({connectionClickStartHandle:{nodeId:w,type:e,id:g}});return}const X=Ol(D.target),q=n||L,{connection:K,isValid:ae}=ro.isValid(D.nativeEvent,{handle:{nodeId:w,id:g,type:e},connectionMode:T,fromNodeId:x.nodeId,fromHandleId:x.id||null,fromType:x.type,isValidConnection:q,flowId:B,doc:X,lib:V,nodeLookup:Y});ae&&K&&z(K);const ie=structuredClone(F);delete ie.inProgress,ie.toPosition=ie.toHandle?ie.toHandle.position:null,P==null||P(D,ie),v.setState({connectionClickStartHandle:null})};return E.jsx("div",{"data-handleid":g,"data-nodeid":w,"data-handlepos":t,"data-id":`${_}-${w}-${g}-${e}`,className:Se(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",y,a,{source:!m,target:m,connectable:r,connectablestart:i,connectableend:o,clickconnecting:S,connectingfrom:p,connectingto:k,valid:I,connectionindicator:r&&(!M||N)&&(M||H?o:i)}]),onMouseDown:O,onTouchStart:O,onClick:C?b:void 0,ref:h,...d,children:c})}const Gr=A.memo(sc(Gm));function Wm({data:e,isConnectable:t,sourcePosition:n=te.Bottom}){return E.jsxs(E.Fragment,{children:[e==null?void 0:e.label,E.jsx(Gr,{type:"source",position:n,isConnectable:t})]})}function Km({data:e,isConnectable:t,targetPosition:n=te.Top,sourcePosition:r=te.Bottom}){return E.jsxs(E.Fragment,{children:[E.jsx(Gr,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,E.jsx(Gr,{type:"source",position:r,isConnectable:t})]})}function Zm(){return null}function Qm({data:e,isConnectable:t,targetPosition:n=te.Top}){return E.jsxs(E.Fragment,{children:[E.jsx(Gr,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Wr={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},fa={input:Wm,default:Km,output:Qm,group:Zm};function Jm(e){var t,n,r,i;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((i=e.style)==null?void 0:i.height)}}const ey=e=>{const{width:t,height:n,x:r,y:i}=nr(e.nodeLookup,{filter:o=>!!o.selected});return{width:et(t)?t:null,height:et(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function ty({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=ke(),{width:i,height:o,transformString:s,userSelectionActive:l}=de(ey,_e),c=cc(),a=A.useRef(null);if(A.useEffect(()=>{var d;n||(d=a.current)==null||d.focus({preventScroll:!0})},[n]),lc({nodeRef:a}),l||!i||!o)return null;const u=e?d=>{const h=r.getState().nodes.filter(g=>g.selected);e(d,h)}:void 0,f=d=>{Object.prototype.hasOwnProperty.call(Wr,d.key)&&(d.preventDefault(),c({direction:Wr[d.key],factor:d.shiftKey?4:1}))};return E.jsx("div",{className:Se(["react-flow__nodesselection","react-flow__container",t]),style:{transform:s},children:E.jsx("div",{ref:a,className:"react-flow__nodesselection-rect",onContextMenu:u,tabIndex:n?void 0:-1,onKeyDown:n?void 0:f,style:{width:i,height:o}})})}const ha=typeof window<"u"?window:void 0,ny=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function dc({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:s,paneClickDistance:l,deleteKeyCode:c,selectionKeyCode:a,selectionOnDrag:u,selectionMode:f,onSelectionStart:d,onSelectionEnd:h,multiSelectionKeyCode:g,panActivationKeyCode:m,zoomActivationKeyCode:v,elementsSelectable:w,zoomOnScroll:C,zoomOnPinch:y,panOnScroll:_,panOnScrollSpeed:p,panOnScrollMode:k,zoomOnDoubleClick:S,panOnDrag:N,defaultViewport:M,translateExtent:H,minZoom:I,maxZoom:z,preventScrolling:O,onSelectionContextMenu:b,noWheelClassName:R,noPanClassName:j,disableKeyboardA11y:D,onViewportChange:$,isControlledViewport:P}){const{nodesSelectionActive:x,userSelectionActive:T}=de(ny),L=Zn(a,{target:ha}),V=Zn(m,{target:ha}),B=V||N,Y=V||_,F=u&&B!==!0,X=L||T||F;return Im({deleteKeyCode:c,multiSelectionKeyCode:g}),E.jsx(zm,{onPaneContextMenu:o,elementsSelectable:w,zoomOnScroll:C,zoomOnPinch:y,panOnScroll:Y,panOnScrollSpeed:p,panOnScrollMode:k,zoomOnDoubleClick:S,panOnDrag:!L&&B,defaultViewport:M,translateExtent:H,minZoom:I,maxZoom:z,zoomActivationKeyCode:v,preventScrolling:O,noWheelClassName:R,noPanClassName:j,onViewportChange:$,isControlledViewport:P,paneClickDistance:l,children:E.jsxs(Fm,{onSelectionStart:d,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:s,panOnDrag:B,isSelecting:!!X,selectionMode:f,selectionKeyPressed:L,selectionOnDrag:F,children:[e,x&&E.jsx(ty,{onSelectionContextMenu:b,noPanClassName:j,disableKeyboardA11y:D})]})})}dc.displayName="FlowRenderer";const ry=A.memo(dc),iy=e=>t=>e?No(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function oy(e){return de(A.useCallback(iy(e),[e]),_e)}const sy=e=>e.updateNodeInternals;function ay(){const e=de(sy),[t]=A.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(i=>{const o=i.target.getAttribute("data-id");r.set(o,{id:o,nodeElement:i.target,force:!0})}),e(r)}));return A.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function ly({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const i=ke(),o=A.useRef(null),s=A.useRef(null),l=A.useRef(e.sourcePosition),c=A.useRef(e.targetPosition),a=A.useRef(t),u=n&&!!e.internals.handleBounds;return A.useEffect(()=>{o.current&&!e.hidden&&(!u||s.current!==o.current)&&(s.current&&(r==null||r.unobserve(s.current)),r==null||r.observe(o.current),s.current=o.current)},[u,e.hidden]),A.useEffect(()=>()=>{s.current&&(r==null||r.unobserve(s.current),s.current=null)},[]),A.useEffect(()=>{if(o.current){const f=a.current!==t,d=l.current!==e.sourcePosition,h=c.current!==e.targetPosition;(f||d||h)&&(a.current=t,l.current=e.sourcePosition,c.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:o.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),o}function cy({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:o,onDoubleClick:s,nodesDraggable:l,elementsSelectable:c,nodesConnectable:a,nodesFocusable:u,resizeObserver:f,noDragClassName:d,noPanClassName:h,disableKeyboardA11y:g,rfId:m,nodeTypes:v,nodeClickDistance:w,onError:C}){const{node:y,internals:_,isParent:p}=de(q=>{const K=q.nodeLookup.get(e),ae=q.parentLookup.has(e);return{node:K,internals:K.internals,isParent:ae}},_e);let k=y.type||"default",S=(v==null?void 0:v[k])||fa[k];S===void 0&&(C==null||C("003",at.error003(k)),k="default",S=fa.default);const N=!!(y.draggable||l&&typeof y.draggable>"u"),M=!!(y.selectable||c&&typeof y.selectable>"u"),H=!!(y.connectable||a&&typeof y.connectable>"u"),I=!!(y.focusable||u&&typeof y.focusable>"u"),z=ke(),O=Dl(y),b=ly({node:y,nodeType:k,hasDimensions:O,resizeObserver:f}),R=lc({nodeRef:b,disabled:y.hidden||!N,noDragClassName:d,handleSelector:y.dragHandle,nodeId:e,isSelectable:M,nodeClickDistance:w}),j=cc();if(y.hidden)return null;const D=vt(y),$=Jm(y),P=M||N||t||n||r||i,x=n?q=>n(q,{..._.userNode}):void 0,T=r?q=>r(q,{..._.userNode}):void 0,L=i?q=>i(q,{..._.userNode}):void 0,V=o?q=>o(q,{..._.userNode}):void 0,B=s?q=>s(q,{..._.userNode}):void 0,Y=q=>{const{selectNodesOnDrag:K,nodeDragThreshold:ae}=z.getState();M&&(!K||!N||ae>0)&&io({id:e,store:z,nodeRef:b}),t&&t(q,{..._.userNode})},F=q=>{if(!(Il(q.nativeEvent)||g)){if(El.includes(q.key)&&M){const K=q.key==="Escape";io({id:e,store:z,unselect:K,nodeRef:b})}else if(N&&y.selected&&Object.prototype.hasOwnProperty.call(Wr,q.key)){q.preventDefault();const{ariaLabelConfig:K}=z.getState();z.setState({ariaLiveMessage:K["node.a11yDescription.ariaLiveMessage"]({direction:q.key.replace("Arrow","").toLowerCase(),x:~~_.positionAbsolute.x,y:~~_.positionAbsolute.y})}),j({direction:Wr[q.key],factor:q.shiftKey?4:1})}}},X=()=>{var Z;if(g||!((Z=b.current)!=null&&Z.matches(":focus-visible")))return;const{transform:q,width:K,height:ae,autoPanOnNodeFocus:ie,setCenter:W}=z.getState();if(!ie)return;No(new Map([[e,y]]),{x:0,y:0,width:K,height:ae},q,!0).length>0||W(y.position.x+D.width/2,y.position.y+D.height/2,{zoom:q[2]})};return E.jsx("div",{className:Se(["react-flow__node",`react-flow__node-${k}`,{[h]:N},y.className,{selected:y.selected,selectable:M,parent:p,draggable:N,dragging:R}]),ref:b,style:{zIndex:_.z,transform:`translate(${_.positionAbsolute.x}px,${_.positionAbsolute.y}px)`,pointerEvents:P?"all":"none",visibility:O?"visible":"hidden",...y.style,...$},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:x,onMouseMove:T,onMouseLeave:L,onContextMenu:V,onClick:Y,onDoubleClick:B,onKeyDown:I?F:void 0,tabIndex:I?0:void 0,onFocus:I?X:void 0,role:y.ariaRole??(I?"group":void 0),"aria-roledescription":"node","aria-describedby":g?void 0:`${ec}-${m}`,"aria-label":y.ariaLabel,...y.domAttributes,children:E.jsx(Ym,{value:e,children:E.jsx(S,{id:e,data:y.data,type:k,positionAbsoluteX:_.positionAbsolute.x,positionAbsoluteY:_.positionAbsolute.y,selected:y.selected??!1,selectable:M,draggable:N,deletable:y.deletable??!0,isConnectable:H,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:R,dragHandle:y.dragHandle,zIndex:_.z,parentId:y.parentId,...D})})})}const uy=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function fc(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,onError:o}=de(uy,_e),s=oy(e.onlyRenderVisibleElements),l=ay();return E.jsx("div",{className:"react-flow__nodes",style:di,children:s.map(c=>E.jsx(cy,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:o},c))})}fc.displayName="NodeRenderer";const dy=A.memo(fc);function fy(e){return de(A.useCallback(n=>{if(!e)return n.edges.map(i=>i.id);const r=[];if(n.width&&n.height)for(const i of n.edges){const o=n.nodeLookup.get(i.source),s=n.nodeLookup.get(i.target);o&&s&&p0({sourceNode:o,targetNode:s,width:n.width,height:n.height,transform:n.transform})&&r.push(i.id)}return r},[e]),_e)}const hy=({color:e="none",strokeWidth:t=1})=>E.jsx("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),py=({color:e="none",strokeWidth:t=1})=>E.jsx("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),pa={[qr.Arrow]:hy,[qr.ArrowClosed]:py};function gy(e){const t=ke();return A.useMemo(()=>{var i,o;return Object.prototype.hasOwnProperty.call(pa,e)?pa[e]:((o=(i=t.getState()).onError)==null||o.call(i,"009",at.error009(e)),null)},[e])}const my=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:o="strokeWidth",strokeWidth:s,orient:l="auto-start-reverse"})=>{const c=gy(t);return c?E.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:o,orient:l,refX:"0",refY:"0",children:E.jsx(c,{color:n,strokeWidth:s})}):null},hc=({defaultColor:e,rfId:t})=>{const n=de(o=>o.edges),r=de(o=>o.defaultEdgeOptions),i=A.useMemo(()=>k0(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return i.length?E.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:E.jsx("defs",{children:i.map(o=>E.jsx(my,{id:o.id,type:o.type,color:o.color,width:o.width,height:o.height,markerUnits:o.markerUnits,strokeWidth:o.strokeWidth,orient:o.orient},o.id))})}):null};hc.displayName="MarkerDefinitions";var yy=A.memo(hc);function pc({x:e,y:t,label:n,labelStyle:r,labelShowBg:i=!0,labelBgStyle:o,labelBgPadding:s=[2,4],labelBgBorderRadius:l=2,children:c,className:a,...u}){const[f,d]=A.useState({x:1,y:0,width:0,height:0}),h=Se(["react-flow__edge-textwrapper",a]),g=A.useRef(null);return A.useEffect(()=>{if(g.current){const m=g.current.getBBox();d({x:m.x,y:m.y,width:m.width,height:m.height})}},[n]),n?E.jsxs("g",{transform:`translate(${e-f.width/2} ${t-f.height/2})`,className:h,visibility:f.width?"visible":"hidden",...u,children:[i&&E.jsx("rect",{width:f.width+2*s[0],x:-s[0],y:-s[1],height:f.height+2*s[1],className:"react-flow__edge-textbg",style:o,rx:l,ry:l}),E.jsx("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:g,style:r,children:n}),c]}):null}pc.displayName="EdgeText";const vy=A.memo(pc);function fi({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:o,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:c,interactionWidth:a=20,...u}){return E.jsxs(E.Fragment,{children:[E.jsx("path",{...u,d:e,fill:"none",className:Se(["react-flow__edge-path",u.className])}),a&&E.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:a,className:"react-flow__edge-interaction"}),r&&et(t)&&et(n)?E.jsx(vy,{x:t,y:n,label:r,labelStyle:i,labelShowBg:o,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:c}):null]})}function ga({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===te.Left||e===te.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function gc({sourceX:e,sourceY:t,sourcePosition:n=te.Bottom,targetX:r,targetY:i,targetPosition:o=te.Top}){const[s,l]=ga({pos:n,x1:e,y1:t,x2:r,y2:i}),[c,a]=ga({pos:o,x1:r,y1:i,x2:e,y2:t}),[u,f,d,h]=Ll({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:l,targetControlX:c,targetControlY:a});return[`M${e},${t} C${s},${l} ${c},${a} ${r},${i}`,u,f,d,h]}function mc(e){return A.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,sourcePosition:s,targetPosition:l,label:c,labelStyle:a,labelShowBg:u,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:g,markerEnd:m,markerStart:v,interactionWidth:w})=>{const[C,y,_]=gc({sourceX:n,sourceY:r,sourcePosition:s,targetX:i,targetY:o,targetPosition:l}),p=e.isInternal?void 0:t;return E.jsx(fi,{id:p,path:C,labelX:y,labelY:_,label:c,labelStyle:a,labelShowBg:u,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:g,markerEnd:m,markerStart:v,interactionWidth:w})})}const xy=mc({isInternal:!1}),yc=mc({isInternal:!0});xy.displayName="SimpleBezierEdge";yc.displayName="SimpleBezierEdgeInternal";function vc(e){return A.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:a,labelBgPadding:u,labelBgBorderRadius:f,style:d,sourcePosition:h=te.Bottom,targetPosition:g=te.Top,markerEnd:m,markerStart:v,pathOptions:w,interactionWidth:C})=>{const[y,_,p]=eo({sourceX:n,sourceY:r,sourcePosition:h,targetX:i,targetY:o,targetPosition:g,borderRadius:w==null?void 0:w.borderRadius,offset:w==null?void 0:w.offset}),k=e.isInternal?void 0:t;return E.jsx(fi,{id:k,path:y,labelX:_,labelY:p,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:a,labelBgPadding:u,labelBgBorderRadius:f,style:d,markerEnd:m,markerStart:v,interactionWidth:C})})}const xc=vc({isInternal:!1}),wc=vc({isInternal:!0});xc.displayName="SmoothStepEdge";wc.displayName="SmoothStepEdgeInternal";function bc(e){return A.memo(({id:t,...n})=>{var i;const r=e.isInternal?void 0:t;return E.jsx(xc,{...n,id:r,pathOptions:A.useMemo(()=>{var o;return{borderRadius:0,offset:(o=n.pathOptions)==null?void 0:o.offset}},[(i=n.pathOptions)==null?void 0:i.offset])})})}const wy=bc({isInternal:!1}),kc=bc({isInternal:!0});wy.displayName="StepEdge";kc.displayName="StepEdgeInternal";function _c(e){return A.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:a,labelBgPadding:u,labelBgBorderRadius:f,style:d,markerEnd:h,markerStart:g,interactionWidth:m})=>{const[v,w,C]=Vl({sourceX:n,sourceY:r,targetX:i,targetY:o}),y=e.isInternal?void 0:t;return E.jsx(fi,{id:y,path:v,labelX:w,labelY:C,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:a,labelBgPadding:u,labelBgBorderRadius:f,style:d,markerEnd:h,markerStart:g,interactionWidth:m})})}const by=_c({isInternal:!1}),Ec=_c({isInternal:!0});by.displayName="StraightEdge";Ec.displayName="StraightEdgeInternal";function Sc(e){return A.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,sourcePosition:s=te.Bottom,targetPosition:l=te.Top,label:c,labelStyle:a,labelShowBg:u,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:g,markerEnd:m,markerStart:v,pathOptions:w,interactionWidth:C})=>{const[y,_,p]=zl({sourceX:n,sourceY:r,sourcePosition:s,targetX:i,targetY:o,targetPosition:l,curvature:w==null?void 0:w.curvature}),k=e.isInternal?void 0:t;return E.jsx(fi,{id:k,path:y,labelX:_,labelY:p,label:c,labelStyle:a,labelShowBg:u,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:g,markerEnd:m,markerStart:v,interactionWidth:C})})}const ky=Sc({isInternal:!1}),Cc=Sc({isInternal:!0});ky.displayName="BezierEdge";Cc.displayName="BezierEdgeInternal";const ma={default:Cc,straight:Ec,step:kc,smoothstep:wc,simplebezier:yc},ya={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},_y=(e,t,n)=>n===te.Left?e-t:n===te.Right?e+t:e,Ey=(e,t,n)=>n===te.Top?e-t:n===te.Bottom?e+t:e,va="react-flow__edgeupdater";function xa({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:o,onMouseOut:s,type:l}){return E.jsx("circle",{onMouseDown:i,onMouseEnter:o,onMouseOut:s,className:Se([va,`${va}-${l}`]),cx:_y(t,r,e),cy:Ey(n,r,e),r,stroke:"transparent",fill:"transparent"})}function Sy({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:o,targetY:s,sourcePosition:l,targetPosition:c,onReconnect:a,onReconnectStart:u,onReconnectEnd:f,setReconnecting:d,setUpdateHover:h}){const g=ke(),m=(_,p)=>{if(_.button!==0)return;const{autoPanOnConnect:k,domNode:S,isValidConnection:N,connectionMode:M,connectionRadius:H,lib:I,onConnectStart:z,onConnectEnd:O,cancelConnection:b,nodeLookup:R,rfId:j,panBy:D,updateConnection:$}=g.getState(),P=p.type==="target",x=(V,B)=>{d(!1),f==null||f(V,n,p.type,B)},T=V=>a==null?void 0:a(n,V),L=(V,B)=>{d(!0),u==null||u(_,n,p.type),z==null||z(V,B)};ro.onPointerDown(_.nativeEvent,{autoPanOnConnect:k,connectionMode:M,connectionRadius:H,domNode:S,handleId:p.id,nodeId:p.nodeId,nodeLookup:R,isTarget:P,edgeUpdaterType:p.type,lib:I,flowId:j,cancelConnection:b,panBy:D,isValidConnection:N,onConnect:T,onConnectStart:L,onConnectEnd:O,onReconnectEnd:x,updateConnection:$,getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,dragThreshold:g.getState().connectionDragThreshold})},v=_=>m(_,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),w=_=>m(_,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),C=()=>h(!0),y=()=>h(!1);return E.jsxs(E.Fragment,{children:[(e===!0||e==="source")&&E.jsx(xa,{position:l,centerX:r,centerY:i,radius:t,onMouseDown:v,onMouseEnter:C,onMouseOut:y,type:"source"}),(e===!0||e==="target")&&E.jsx(xa,{position:c,centerX:o,centerY:s,radius:t,onMouseDown:w,onMouseEnter:C,onMouseOut:y,type:"target"})]})}function Cy({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:o,onContextMenu:s,onMouseEnter:l,onMouseMove:c,onMouseLeave:a,reconnectRadius:u,onReconnect:f,onReconnectStart:d,onReconnectEnd:h,rfId:g,edgeTypes:m,noPanClassName:v,onError:w,disableKeyboardA11y:C}){let y=de(W=>W.edgeLookup.get(e));const _=de(W=>W.defaultEdgeOptions);y=_?{..._,...y}:y;let p=y.type||"default",k=(m==null?void 0:m[p])||ma[p];k===void 0&&(w==null||w("011",at.error011(p)),p="default",k=ma.default);const S=!!(y.focusable||t&&typeof y.focusable>"u"),N=typeof f<"u"&&(y.reconnectable||n&&typeof y.reconnectable>"u"),M=!!(y.selectable||r&&typeof y.selectable>"u"),H=A.useRef(null),[I,z]=A.useState(!1),[O,b]=A.useState(!1),R=ke(),{zIndex:j,sourceX:D,sourceY:$,targetX:P,targetY:x,sourcePosition:T,targetPosition:L}=de(A.useCallback(W=>{const Q=W.nodeLookup.get(y.source),Z=W.nodeLookup.get(y.target);if(!Q||!Z)return{zIndex:y.zIndex,...ya};const le=b0({id:e,sourceNode:Q,targetNode:Z,sourceHandle:y.sourceHandle||null,targetHandle:y.targetHandle||null,connectionMode:W.connectionMode,onError:w});return{zIndex:h0({selected:y.selected,zIndex:y.zIndex,sourceNode:Q,targetNode:Z,elevateOnSelect:W.elevateEdgesOnSelect}),...le||ya}},[y.source,y.target,y.sourceHandle,y.targetHandle,y.selected,y.zIndex]),_e),V=A.useMemo(()=>y.markerStart?`url('#${to(y.markerStart,g)}')`:void 0,[y.markerStart,g]),B=A.useMemo(()=>y.markerEnd?`url('#${to(y.markerEnd,g)}')`:void 0,[y.markerEnd,g]);if(y.hidden||D===null||$===null||P===null||x===null)return null;const Y=W=>{var J;const{addSelectedEdges:Q,unselectNodesAndEdges:Z,multiSelectionActive:le}=R.getState();M&&(R.setState({nodesSelectionActive:!1}),y.selected&&le?(Z({nodes:[],edges:[y]}),(J=H.current)==null||J.blur()):Q([e])),i&&i(W,y)},F=o?W=>{o(W,{...y})}:void 0,X=s?W=>{s(W,{...y})}:void 0,q=l?W=>{l(W,{...y})}:void 0,K=c?W=>{c(W,{...y})}:void 0,ae=a?W=>{a(W,{...y})}:void 0,ie=W=>{var Q;if(!C&&El.includes(W.key)&&M){const{unselectNodesAndEdges:Z,addSelectedEdges:le}=R.getState();W.key==="Escape"?((Q=H.current)==null||Q.blur(),Z({edges:[y]})):le([e])}};return E.jsx("svg",{style:{zIndex:j},children:E.jsxs("g",{className:Se(["react-flow__edge",`react-flow__edge-${p}`,y.className,v,{selected:y.selected,animated:y.animated,inactive:!M&&!i,updating:I,selectable:M}]),onClick:Y,onDoubleClick:F,onContextMenu:X,onMouseEnter:q,onMouseMove:K,onMouseLeave:ae,onKeyDown:S?ie:void 0,tabIndex:S?0:void 0,role:y.ariaRole??(S?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":y.ariaLabel===null?void 0:y.ariaLabel||`Edge from ${y.source} to ${y.target}`,"aria-describedby":S?`${tc}-${g}`:void 0,ref:H,...y.domAttributes,children:[!O&&E.jsx(k,{id:e,source:y.source,target:y.target,type:y.type,selected:y.selected,animated:y.animated,selectable:M,deletable:y.deletable??!0,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,sourceX:D,sourceY:$,targetX:P,targetY:x,sourcePosition:T,targetPosition:L,data:y.data,style:y.style,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerStart:V,markerEnd:B,pathOptions:"pathOptions"in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth}),N&&E.jsx(Sy,{edge:y,isReconnectable:N,reconnectRadius:u,onReconnect:f,onReconnectStart:d,onReconnectEnd:h,sourceX:D,sourceY:$,targetX:P,targetY:x,sourcePosition:T,targetPosition:L,setUpdateHover:z,setReconnecting:b})]})})}const Ny=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function Nc({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:o,onEdgeContextMenu:s,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:a,onEdgeClick:u,reconnectRadius:f,onEdgeDoubleClick:d,onReconnectStart:h,onReconnectEnd:g,disableKeyboardA11y:m}){const{edgesFocusable:v,edgesReconnectable:w,elementsSelectable:C,onError:y}=de(Ny,_e),_=fy(t);return E.jsxs("div",{className:"react-flow__edges",children:[E.jsx(yy,{defaultColor:e,rfId:n}),_.map(p=>E.jsx(Cy,{id:p,edgesFocusable:v,edgesReconnectable:w,elementsSelectable:C,noPanClassName:i,onReconnect:o,onContextMenu:s,onMouseEnter:l,onMouseMove:c,onMouseLeave:a,onClick:u,reconnectRadius:f,onDoubleClick:d,onReconnectStart:h,onReconnectEnd:g,rfId:n,onError:y,edgeTypes:r,disableKeyboardA11y:m},p))]})}Nc.displayName="EdgeRenderer";const Ty=A.memo(Nc),Ay=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function Ry({children:e}){const t=de(Ay);return E.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function jy(e){const t=Po(),n=A.useRef(!1);A.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const My=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function Dy(e){const t=de(My),n=ke();return A.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function Py(e){return e.connection.inProgress?{...e.connection,to:rr(e.connection.to,e.transform)}:{...e.connection}}function Oy(e){return Py}function Iy(e){const t=Oy();return de(t,_e)}const $y=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function Ly({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:i,width:o,height:s,isValid:l,inProgress:c}=de($y,_e);return!(o&&i&&c)?null:E.jsx("svg",{style:e,width:o,height:s,className:"react-flow__connectionline react-flow__container",children:E.jsx("g",{className:Se(["react-flow__connection",Nl(l)]),children:E.jsx(Tc,{style:t,type:n,CustomComponent:r,isValid:l})})})}const Tc=({style:e,type:t=Et.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:i,from:o,fromNode:s,fromHandle:l,fromPosition:c,to:a,toNode:u,toHandle:f,toPosition:d}=Iy();if(!i)return;if(n)return E.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:s,fromHandle:l,fromX:o.x,fromY:o.y,toX:a.x,toY:a.y,fromPosition:c,toPosition:d,connectionStatus:Nl(r),toNode:u,toHandle:f});let h="";const g={sourceX:o.x,sourceY:o.y,sourcePosition:c,targetX:a.x,targetY:a.y,targetPosition:d};switch(t){case Et.Bezier:[h]=zl(g);break;case Et.SimpleBezier:[h]=gc(g);break;case Et.Step:[h]=eo({...g,borderRadius:0});break;case Et.SmoothStep:[h]=eo(g);break;default:[h]=Vl(g)}return E.jsx("path",{d:h,fill:"none",className:"react-flow__connection-path",style:e})};Tc.displayName="ConnectionLine";const zy={};function wa(e=zy){A.useRef(e),ke(),A.useEffect(()=>{},[e])}function Hy(){ke(),A.useRef(!1),A.useEffect(()=>{},[])}function Ac({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:o,onEdgeDoubleClick:s,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:a,onNodeContextMenu:u,onSelectionContextMenu:f,onSelectionStart:d,onSelectionEnd:h,connectionLineType:g,connectionLineStyle:m,connectionLineComponent:v,connectionLineContainerStyle:w,selectionKeyCode:C,selectionOnDrag:y,selectionMode:_,multiSelectionKeyCode:p,panActivationKeyCode:k,zoomActivationKeyCode:S,deleteKeyCode:N,onlyRenderVisibleElements:M,elementsSelectable:H,defaultViewport:I,translateExtent:z,minZoom:O,maxZoom:b,preventScrolling:R,defaultMarkerColor:j,zoomOnScroll:D,zoomOnPinch:$,panOnScroll:P,panOnScrollSpeed:x,panOnScrollMode:T,zoomOnDoubleClick:L,panOnDrag:V,onPaneClick:B,onPaneMouseEnter:Y,onPaneMouseMove:F,onPaneMouseLeave:X,onPaneScroll:q,onPaneContextMenu:K,paneClickDistance:ae,nodeClickDistance:ie,onEdgeContextMenu:W,onEdgeMouseEnter:Q,onEdgeMouseMove:Z,onEdgeMouseLeave:le,reconnectRadius:J,onReconnect:fe,onReconnectStart:be,onReconnectEnd:ze,noDragClassName:je,noWheelClassName:He,noPanClassName:De,disableKeyboardA11y:Ye,nodeExtent:Ze,rfId:Xe,viewport:Ee,onViewportChange:Ve}){return wa(e),wa(t),Hy(),jy(n),Dy(Ee),E.jsx(ry,{onPaneClick:B,onPaneMouseEnter:Y,onPaneMouseMove:F,onPaneMouseLeave:X,onPaneContextMenu:K,onPaneScroll:q,paneClickDistance:ae,deleteKeyCode:N,selectionKeyCode:C,selectionOnDrag:y,selectionMode:_,onSelectionStart:d,onSelectionEnd:h,multiSelectionKeyCode:p,panActivationKeyCode:k,zoomActivationKeyCode:S,elementsSelectable:H,zoomOnScroll:D,zoomOnPinch:$,zoomOnDoubleClick:L,panOnScroll:P,panOnScrollSpeed:x,panOnScrollMode:T,panOnDrag:V,defaultViewport:I,translateExtent:z,minZoom:O,maxZoom:b,onSelectionContextMenu:f,preventScrolling:R,noDragClassName:je,noWheelClassName:He,noPanClassName:De,disableKeyboardA11y:Ye,onViewportChange:Ve,isControlledViewport:!!Ee,children:E.jsxs(Ry,{children:[E.jsx(Ty,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:s,onReconnect:fe,onReconnectStart:be,onReconnectEnd:ze,onlyRenderVisibleElements:M,onEdgeContextMenu:W,onEdgeMouseEnter:Q,onEdgeMouseMove:Z,onEdgeMouseLeave:le,reconnectRadius:J,defaultMarkerColor:j,noPanClassName:De,disableKeyboardA11y:Ye,rfId:Xe}),E.jsx(Ly,{style:m,type:g,component:v,containerStyle:w}),E.jsx("div",{className:"react-flow__edgelabel-renderer"}),E.jsx(dy,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:o,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:a,onNodeContextMenu:u,nodeClickDistance:ie,onlyRenderVisibleElements:M,noPanClassName:De,noDragClassName:je,disableKeyboardA11y:Ye,nodeExtent:Ze,rfId:Xe}),E.jsx("div",{className:"react-flow__viewport-portal"})]})})}Ac.displayName="GraphView";const Vy=A.memo(Ac),ba=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:o,fitView:s,fitViewOptions:l,minZoom:c=.5,maxZoom:a=2,nodeOrigin:u,nodeExtent:f}={})=>{const d=new Map,h=new Map,g=new Map,m=new Map,v=r??t??[],w=n??e??[],C=u??[0,0],y=f??Un;Fl(g,m,v);const _=no(w,d,h,{nodeOrigin:C,nodeExtent:y,elevateNodesOnSelect:!1});let p=[0,0,1];if(s&&i&&o){const k=nr(d,{filter:H=>!!((H.width||H.initialWidth)&&(H.height||H.initialHeight))}),{x:S,y:N,zoom:M}=To(k,i,o,c,a,(l==null?void 0:l.padding)??.1);p=[S,N,M]}return{rfId:"1",width:0,height:0,transform:p,nodes:w,nodesInitialized:_,nodeLookup:d,parentLookup:h,edges:v,edgeLookup:m,connectionLookup:g,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:a,translateExtent:Un,nodeExtent:y,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:ln.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:C,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!1,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:s??!1,fitViewOptions:l,fitViewResolver:null,connection:{...Cl},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:a0,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Sl}},By=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:o,fitView:s,fitViewOptions:l,minZoom:c,maxZoom:a,nodeOrigin:u,nodeExtent:f})=>lm((d,h)=>{async function g(){const{nodeLookup:m,panZoom:v,fitViewOptions:w,fitViewResolver:C,width:y,height:_,minZoom:p,maxZoom:k}=h();v&&(await o0({nodes:m,width:y,height:_,panZoom:v,minZoom:p,maxZoom:k},w),C==null||C.resolve(!0),d({fitViewResolver:null}))}return{...ba({nodes:e,edges:t,width:i,height:o,fitView:s,fitViewOptions:l,minZoom:c,maxZoom:a,nodeOrigin:u,nodeExtent:f,defaultNodes:n,defaultEdges:r}),setNodes:m=>{const{nodeLookup:v,parentLookup:w,nodeOrigin:C,elevateNodesOnSelect:y,fitViewQueued:_}=h(),p=no(m,v,w,{nodeOrigin:C,nodeExtent:f,elevateNodesOnSelect:y,checkEquality:!0});_&&p?(g(),d({nodes:m,nodesInitialized:p,fitViewQueued:!1,fitViewOptions:void 0})):d({nodes:m,nodesInitialized:p})},setEdges:m=>{const{connectionLookup:v,edgeLookup:w}=h();Fl(v,w,m),d({edges:m})},setDefaultNodesAndEdges:(m,v)=>{if(m){const{setNodes:w}=h();w(m),d({hasDefaultNodes:!0})}if(v){const{setEdges:w}=h();w(v),d({hasDefaultEdges:!0})}},updateNodeInternals:m=>{const{triggerNodeChanges:v,nodeLookup:w,parentLookup:C,domNode:y,nodeOrigin:_,nodeExtent:p,debug:k,fitViewQueued:S}=h(),{changes:N,updatedInternals:M}=N0(m,w,C,y,_,p);M&&(E0(w,C,{nodeOrigin:_,nodeExtent:p}),S?(g(),d({fitViewQueued:!1,fitViewOptions:void 0})):d({}),(N==null?void 0:N.length)>0&&(k&&console.log("React Flow: trigger node changes",N),v==null||v(N)))},updateNodePositions:(m,v=!1)=>{const w=[],C=[],{nodeLookup:y,triggerNodeChanges:_}=h();for(const[p,k]of m){const S=y.get(p),N=!!(S!=null&&S.expandParent&&(S!=null&&S.parentId)&&(k!=null&&k.position)),M={id:p,type:"position",position:N?{x:Math.max(0,k.position.x),y:Math.max(0,k.position.y)}:k.position,dragging:v};N&&S.parentId&&w.push({id:p,parentId:S.parentId,rect:{...k.internals.positionAbsolute,width:k.measured.width??0,height:k.measured.height??0}}),C.push(M)}if(w.length>0){const{parentLookup:p,nodeOrigin:k}=h(),S=Do(w,y,p,k);C.push(...S)}_(C)},triggerNodeChanges:m=>{const{onNodesChange:v,setNodes:w,nodes:C,hasDefaultNodes:y,debug:_}=h();if(m!=null&&m.length){if(y){const p=ic(m,C);w(p)}_&&console.log("React Flow: trigger node changes",m),v==null||v(m)}},triggerEdgeChanges:m=>{const{onEdgesChange:v,setEdges:w,edges:C,hasDefaultEdges:y,debug:_}=h();if(m!=null&&m.length){if(y){const p=oc(m,C);w(p)}_&&console.log("React Flow: trigger edge changes",m),v==null||v(m)}},addSelectedNodes:m=>{const{multiSelectionActive:v,edgeLookup:w,nodeLookup:C,triggerNodeChanges:y,triggerEdgeChanges:_}=h();if(v){const p=m.map(k=>jt(k,!0));y(p);return}y(nn(C,new Set([...m]),!0)),_(nn(w))},addSelectedEdges:m=>{const{multiSelectionActive:v,edgeLookup:w,nodeLookup:C,triggerNodeChanges:y,triggerEdgeChanges:_}=h();if(v){const p=m.map(k=>jt(k,!0));_(p);return}_(nn(w,new Set([...m]))),y(nn(C,new Set,!0))},unselectNodesAndEdges:({nodes:m,edges:v}={})=>{const{edges:w,nodes:C,nodeLookup:y,triggerNodeChanges:_,triggerEdgeChanges:p}=h(),k=m||C,S=v||w,N=k.map(H=>{const I=y.get(H.id);return I&&(I.selected=!1),jt(H.id,!1)}),M=S.map(H=>jt(H.id,!1));_(N),p(M)},setMinZoom:m=>{const{panZoom:v,maxZoom:w}=h();v==null||v.setScaleExtent([m,w]),d({minZoom:m})},setMaxZoom:m=>{const{panZoom:v,minZoom:w}=h();v==null||v.setScaleExtent([w,m]),d({maxZoom:m})},setTranslateExtent:m=>{var v;(v=h().panZoom)==null||v.setTranslateExtent(m),d({translateExtent:m})},setPaneClickDistance:m=>{var v;(v=h().panZoom)==null||v.setClickDistance(m)},resetSelectedElements:()=>{const{edges:m,nodes:v,triggerNodeChanges:w,triggerEdgeChanges:C,elementsSelectable:y}=h();if(!y)return;const _=v.reduce((k,S)=>S.selected?[...k,jt(S.id,!1)]:k,[]),p=m.reduce((k,S)=>S.selected?[...k,jt(S.id,!1)]:k,[]);w(_),C(p)},setNodeExtent:m=>{const{nodes:v,nodeLookup:w,parentLookup:C,nodeOrigin:y,elevateNodesOnSelect:_,nodeExtent:p}=h();m[0][0]===p[0][0]&&m[0][1]===p[0][1]&&m[1][0]===p[1][0]&&m[1][1]===p[1][1]||(no(v,w,C,{nodeOrigin:y,nodeExtent:m,elevateNodesOnSelect:_,checkEquality:!1}),d({nodeExtent:m}))},panBy:m=>{const{transform:v,width:w,height:C,panZoom:y,translateExtent:_}=h();return T0({delta:m,panZoom:y,transform:v,translateExtent:_,width:w,height:C})},setCenter:async(m,v,w)=>{const{width:C,height:y,maxZoom:_,panZoom:p}=h();if(!p)return Promise.resolve(!1);const k=typeof(w==null?void 0:w.zoom)<"u"?w.zoom:_;return await p.setViewport({x:C/2-m*k,y:y/2-v*k,zoom:k},{duration:w==null?void 0:w.duration,ease:w==null?void 0:w.ease,interpolate:w==null?void 0:w.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{d({connection:{...Cl}})},updateConnection:m=>{d({connection:m})},reset:()=>d({...ba()})}},Object.is);function Fy({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:o,initialMinZoom:s,initialMaxZoom:l,initialFitViewOptions:c,fitView:a,nodeOrigin:u,nodeExtent:f,children:d}){const[h]=A.useState(()=>By({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:o,fitView:a,minZoom:s,maxZoom:l,fitViewOptions:c,nodeOrigin:u,nodeExtent:f}));return E.jsx(cm,{value:h,children:E.jsx(Mm,{children:d})})}function qy({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:o,height:s,fitView:l,fitViewOptions:c,minZoom:a,maxZoom:u,nodeOrigin:f,nodeExtent:d}){return A.useContext(ci)?E.jsx(E.Fragment,{children:e}):E.jsx(Fy,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:o,initialHeight:s,fitView:l,initialFitViewOptions:c,initialMinZoom:a,initialMaxZoom:u,nodeOrigin:f,nodeExtent:d,children:e})}const Yy={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function Xy({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:o,edgeTypes:s,onNodeClick:l,onEdgeClick:c,onInit:a,onMove:u,onMoveStart:f,onMoveEnd:d,onConnect:h,onConnectStart:g,onConnectEnd:m,onClickConnectStart:v,onClickConnectEnd:w,onNodeMouseEnter:C,onNodeMouseMove:y,onNodeMouseLeave:_,onNodeContextMenu:p,onNodeDoubleClick:k,onNodeDragStart:S,onNodeDrag:N,onNodeDragStop:M,onNodesDelete:H,onEdgesDelete:I,onDelete:z,onSelectionChange:O,onSelectionDragStart:b,onSelectionDrag:R,onSelectionDragStop:j,onSelectionContextMenu:D,onSelectionStart:$,onSelectionEnd:P,onBeforeDelete:x,connectionMode:T,connectionLineType:L=Et.Bezier,connectionLineStyle:V,connectionLineComponent:B,connectionLineContainerStyle:Y,deleteKeyCode:F="Backspace",selectionKeyCode:X="Shift",selectionOnDrag:q=!1,selectionMode:K=Gn.Full,panActivationKeyCode:ae="Space",multiSelectionKeyCode:ie=Ur()?"Meta":"Control",zoomActivationKeyCode:W=Ur()?"Meta":"Control",snapToGrid:Q,snapGrid:Z,onlyRenderVisibleElements:le=!1,selectNodesOnDrag:J,nodesDraggable:fe,autoPanOnNodeFocus:be,nodesConnectable:ze,nodesFocusable:je,nodeOrigin:He=nc,edgesFocusable:De,edgesReconnectable:Ye,elementsSelectable:Ze=!0,defaultViewport:Xe=km,minZoom:Ee=.5,maxZoom:Ve=2,translateExtent:Ue=Un,preventScrolling:Pe=!0,nodeExtent:nt,defaultMarkerColor:Ge="#b1b1b7",zoomOnScroll:Oe=!0,zoomOnPinch:xt=!0,panOnScroll:Ie=!1,panOnScrollSpeed:Ce=.5,panOnScrollMode:ut=$t.Free,zoomOnDoubleClick:re=!0,panOnDrag:ne=!0,onPaneClick:ce,onPaneMouseEnter:pe,onPaneMouseMove:ue,onPaneMouseLeave:he,onPaneScroll:U,onPaneContextMenu:ge,paneClickDistance:me=0,nodeClickDistance:Ne=0,children:Ae,onReconnect:Te,onReconnectStart:dt,onReconnectEnd:ft,onEdgeContextMenu:Yt,onEdgeDoubleClick:wt,onEdgeMouseEnter:yn,onEdgeMouseMove:ir,onEdgeMouseLeave:Xt,reconnectRadius:Ut=10,onNodesChange:hi,onEdgesChange:Ct,noDragClassName:or="nodrag",noWheelClassName:pi="nowheel",noPanClassName:sr="nopan",fitView:ar,fitViewOptions:Gt,connectOnClick:lr,attributionPosition:vn,proOptions:cr,defaultEdgeOptions:gi,elevateNodesOnSelect:ur,elevateEdgesOnSelect:dr,disableKeyboardA11y:xn=!1,autoPanOnConnect:ee,autoPanOnNodeDrag:ve,autoPanSpeed:Be,connectionRadius:$e,isValidConnection:We,onError:mi,style:Wt,id:Nt,nodeDragThreshold:yi,connectionDragThreshold:wn,viewport:bn,onViewportChange:fr,width:hr,height:vi,colorMode:xi="light",debug:kn,onScroll:bt,ariaLabelConfig:_n,...pr},Gc){const wi=Nt||"1",Wc=Cm(xi),Kc=A.useCallback(zo=>{zo.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),bt==null||bt(zo)},[bt]);return E.jsx("div",{"data-testid":"rf__wrapper",...pr,onScroll:Kc,style:{...Wt,...Yy},ref:Gc,className:Se(["react-flow",i,Wc]),id:Nt,role:"application",children:E.jsxs(qy,{nodes:e,edges:t,width:hr,height:vi,fitView:ar,fitViewOptions:Gt,minZoom:Ee,maxZoom:Ve,nodeOrigin:He,nodeExtent:nt,children:[E.jsx(Vy,{onInit:a,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:C,onNodeMouseMove:y,onNodeMouseLeave:_,onNodeContextMenu:p,onNodeDoubleClick:k,nodeTypes:o,edgeTypes:s,connectionLineType:L,connectionLineStyle:V,connectionLineComponent:B,connectionLineContainerStyle:Y,selectionKeyCode:X,selectionOnDrag:q,selectionMode:K,deleteKeyCode:F,multiSelectionKeyCode:ie,panActivationKeyCode:ae,zoomActivationKeyCode:W,onlyRenderVisibleElements:le,defaultViewport:Xe,translateExtent:Ue,minZoom:Ee,maxZoom:Ve,preventScrolling:Pe,zoomOnScroll:Oe,zoomOnPinch:xt,zoomOnDoubleClick:re,panOnScroll:Ie,panOnScrollSpeed:Ce,panOnScrollMode:ut,panOnDrag:ne,onPaneClick:ce,onPaneMouseEnter:pe,onPaneMouseMove:ue,onPaneMouseLeave:he,onPaneScroll:U,onPaneContextMenu:ge,paneClickDistance:me,nodeClickDistance:Ne,onSelectionContextMenu:D,onSelectionStart:$,onSelectionEnd:P,onReconnect:Te,onReconnectStart:dt,onReconnectEnd:ft,onEdgeContextMenu:Yt,onEdgeDoubleClick:wt,onEdgeMouseEnter:yn,onEdgeMouseMove:ir,onEdgeMouseLeave:Xt,reconnectRadius:Ut,defaultMarkerColor:Ge,noDragClassName:or,noWheelClassName:pi,noPanClassName:sr,rfId:wi,disableKeyboardA11y:xn,nodeExtent:nt,viewport:bn,onViewportChange:fr}),E.jsx(Sm,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:h,onConnectStart:g,onConnectEnd:m,onClickConnectStart:v,onClickConnectEnd:w,nodesDraggable:fe,autoPanOnNodeFocus:be,nodesConnectable:ze,nodesFocusable:je,edgesFocusable:De,edgesReconnectable:Ye,elementsSelectable:Ze,elevateNodesOnSelect:ur,elevateEdgesOnSelect:dr,minZoom:Ee,maxZoom:Ve,nodeExtent:nt,onNodesChange:hi,onEdgesChange:Ct,snapToGrid:Q,snapGrid:Z,connectionMode:T,translateExtent:Ue,connectOnClick:lr,defaultEdgeOptions:gi,fitView:ar,fitViewOptions:Gt,onNodesDelete:H,onEdgesDelete:I,onDelete:z,onNodeDragStart:S,onNodeDrag:N,onNodeDragStop:M,onSelectionDrag:R,onSelectionDragStart:b,onSelectionDragStop:j,onMove:u,onMoveStart:f,onMoveEnd:d,noPanClassName:sr,nodeOrigin:He,rfId:wi,autoPanOnConnect:ee,autoPanOnNodeDrag:ve,autoPanSpeed:Be,onError:mi,connectionRadius:$e,isValidConnection:We,selectNodesOnDrag:J,nodeDragThreshold:yi,connectionDragThreshold:wn,onBeforeDelete:x,paneClickDistance:me,debug:kn,ariaLabelConfig:_n}),E.jsx(bm,{onSelectionChange:O}),Ae,E.jsx(mm,{proOptions:cr,position:vn}),E.jsx(gm,{rfId:wi,disableKeyboardA11y:xn})]})})}var xx=sc(Xy);function wx(e){const[t,n]=A.useState(e),r=A.useCallback(i=>n(o=>ic(i,o)),[]);return[t,n,r]}function bx(e){const[t,n]=A.useState(e),r=A.useCallback(i=>n(o=>oc(i,o)),[]);return[t,n,r]}function Uy({dimensions:e,lineWidth:t,variant:n,className:r}){return E.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Se(["react-flow__background-pattern",n,r])})}function Gy({radius:e,className:t}){return E.jsx("circle",{cx:e,cy:e,r:e,className:Se(["react-flow__background-pattern","dots",t])})}var St;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(St||(St={}));const Wy={[St.Dots]:1,[St.Lines]:1,[St.Cross]:6},Ky=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Rc({id:e,variant:t=St.Dots,gap:n=20,size:r,lineWidth:i=1,offset:o=0,color:s,bgColor:l,style:c,className:a,patternClassName:u}){const f=A.useRef(null),{transform:d,patternId:h}=de(Ky,_e),g=r||Wy[t],m=t===St.Dots,v=t===St.Cross,w=Array.isArray(n)?n:[n,n],C=[w[0]*d[2]||1,w[1]*d[2]||1],y=g*d[2],_=Array.isArray(o)?o:[o,o],p=v?[y,y]:C,k=[_[0]*d[2]||1+p[0]/2,_[1]*d[2]||1+p[1]/2],S=`${h}${e||""}`;return E.jsxs("svg",{className:Se(["react-flow__background",a]),style:{...c,...di,"--xy-background-color-props":l,"--xy-background-pattern-color-props":s},ref:f,"data-testid":"rf__background",children:[E.jsx("pattern",{id:S,x:d[0]%C[0],y:d[1]%C[1],width:C[0],height:C[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${k[0]},-${k[1]})`,children:m?E.jsx(Gy,{radius:y/2,className:u}):E.jsx(Uy,{dimensions:p,lineWidth:i,variant:t,className:u})}),E.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${S})`})]})}Rc.displayName="Background";const kx=A.memo(Rc);function Zy(){return E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:E.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function Qy(){return E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:E.jsx("path",{d:"M0 0h32v4.2H0z"})})}function Jy(){return E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:E.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function e1(){return E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:E.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function t1(){return E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:E.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Cr({children:e,className:t,...n}){return E.jsx("button",{type:"button",className:Se(["react-flow__controls-button",t]),...n,children:e})}const n1=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function jc({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:o,onZoomOut:s,onFitView:l,onInteractiveChange:c,className:a,children:u,position:f="bottom-left",orientation:d="vertical","aria-label":h}){const g=ke(),{isInteractive:m,minZoomReached:v,maxZoomReached:w,ariaLabelConfig:C}=de(n1,_e),{zoomIn:y,zoomOut:_,fitView:p}=Po(),k=()=>{y(),o==null||o()},S=()=>{_(),s==null||s()},N=()=>{p(i),l==null||l()},M=()=>{g.setState({nodesDraggable:!m,nodesConnectable:!m,elementsSelectable:!m}),c==null||c(!m)},H=d==="horizontal"?"horizontal":"vertical";return E.jsxs(ui,{className:Se(["react-flow__controls",H,a]),position:f,style:e,"data-testid":"rf__controls","aria-label":h??C["controls.ariaLabel"],children:[t&&E.jsxs(E.Fragment,{children:[E.jsx(Cr,{onClick:k,className:"react-flow__controls-zoomin",title:C["controls.zoomIn.ariaLabel"],"aria-label":C["controls.zoomIn.ariaLabel"],disabled:w,children:E.jsx(Zy,{})}),E.jsx(Cr,{onClick:S,className:"react-flow__controls-zoomout",title:C["controls.zoomOut.ariaLabel"],"aria-label":C["controls.zoomOut.ariaLabel"],disabled:v,children:E.jsx(Qy,{})})]}),n&&E.jsx(Cr,{className:"react-flow__controls-fitview",onClick:N,title:C["controls.fitView.ariaLabel"],"aria-label":C["controls.fitView.ariaLabel"],children:E.jsx(Jy,{})}),r&&E.jsx(Cr,{className:"react-flow__controls-interactive",onClick:M,title:C["controls.interactive.ariaLabel"],"aria-label":C["controls.interactive.ariaLabel"],children:m?E.jsx(t1,{}):E.jsx(e1,{})}),u]})}jc.displayName="Controls";const _x=A.memo(jc);function r1({id:e,x:t,y:n,width:r,height:i,style:o,color:s,strokeColor:l,strokeWidth:c,className:a,borderRadius:u,shapeRendering:f,selected:d,onClick:h}){const{background:g,backgroundColor:m}=o||{},v=s||g||m;return E.jsx("rect",{className:Se(["react-flow__minimap-node",{selected:d},a]),x:t,y:n,rx:u,ry:u,width:r,height:i,style:{fill:v,stroke:l,strokeWidth:c},shapeRendering:f,onClick:h?w=>h(w,e):void 0})}const i1=A.memo(r1),o1=e=>e.nodes.map(t=>t.id),zi=e=>e instanceof Function?e:()=>e;function s1({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:o=i1,onClick:s}){const l=de(o1,_e),c=zi(t),a=zi(e),u=zi(n),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return E.jsx(E.Fragment,{children:l.map(d=>E.jsx(l1,{id:d,nodeColorFunc:c,nodeStrokeColorFunc:a,nodeClassNameFunc:u,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:o,onClick:s,shapeRendering:f},d))})}function a1({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:o,shapeRendering:s,NodeComponent:l,onClick:c}){const{node:a,x:u,y:f,width:d,height:h}=de(g=>{const{internals:m}=g.nodeLookup.get(e),v=m.userNode,{x:w,y:C}=m.positionAbsolute,{width:y,height:_}=vt(v);return{node:v,x:w,y:C,width:y,height:_}},_e);return!a||a.hidden||!Dl(a)?null:E.jsx(l,{x:u,y:f,width:d,height:h,style:a.style,selected:!!a.selected,className:r(a),color:t(a),borderRadius:i,strokeColor:n(a),strokeWidth:o,shapeRendering:s,onClick:c,id:a.id})}const l1=A.memo(a1);var c1=A.memo(s1);const u1=200,d1=150,f1=e=>!e.hidden,h1=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?Ml(nr(e.nodeLookup,{filter:f1}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},p1="react-flow__minimap-desc";function Mc({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i="",nodeBorderRadius:o=5,nodeStrokeWidth:s,nodeComponent:l,bgColor:c,maskColor:a,maskStrokeColor:u,maskStrokeWidth:f,position:d="bottom-right",onClick:h,onNodeClick:g,pannable:m=!1,zoomable:v=!1,ariaLabel:w,inversePan:C,zoomStep:y=10,offsetScale:_=5}){const p=ke(),k=A.useRef(null),{boundingRect:S,viewBB:N,rfId:M,panZoom:H,translateExtent:I,flowWidth:z,flowHeight:O,ariaLabelConfig:b}=de(h1,_e),R=(e==null?void 0:e.width)??u1,j=(e==null?void 0:e.height)??d1,D=S.width/R,$=S.height/j,P=Math.max(D,$),x=P*R,T=P*j,L=_*P,V=S.x-(x-S.width)/2-L,B=S.y-(T-S.height)/2-L,Y=x+L*2,F=T+L*2,X=`${p1}-${M}`,q=A.useRef(0),K=A.useRef();q.current=P,A.useEffect(()=>{if(k.current&&H)return K.current=I0({domNode:k.current,panZoom:H,getTransform:()=>p.getState().transform,getViewScale:()=>q.current}),()=>{var Q;(Q=K.current)==null||Q.destroy()}},[H]),A.useEffect(()=>{var Q;(Q=K.current)==null||Q.update({translateExtent:I,width:z,height:O,inversePan:C,pannable:m,zoomStep:y,zoomable:v})},[m,v,C,y,I,z,O]);const ae=h?Q=>{var J;const[Z,le]=((J=K.current)==null?void 0:J.pointer(Q))||[0,0];h(Q,{x:Z,y:le})}:void 0,ie=g?A.useCallback((Q,Z)=>{const le=p.getState().nodeLookup.get(Z).internals.userNode;g(Q,le)},[]):void 0,W=w??b["minimap.ariaLabel"];return E.jsx(ui,{position:d,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof a=="string"?a:void 0,"--xy-minimap-mask-stroke-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-width-props":typeof f=="number"?f*P:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof s=="number"?s:void 0},className:Se(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:E.jsxs("svg",{width:R,height:j,viewBox:`${V} ${B} ${Y} ${F}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":X,ref:k,onClick:ae,children:[W&&E.jsx("title",{id:X,children:W}),E.jsx(c1,{onClick:ie,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:o,nodeClassName:i,nodeStrokeWidth:s,nodeComponent:l}),E.jsx("path",{className:"react-flow__minimap-mask",d:`M${V-L},${B-L}h${Y+L*2}v${F+L*2}h${-Y-L*2}z
463
+ M${N.x},${N.y}h${N.width}v${N.height}h${-N.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Mc.displayName="MiniMap";A.memo(Mc);const g1=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,m1={[fn.Line]:"right",[fn.Handle]:"bottom-right"};function y1({nodeId:e,position:t,variant:n=fn.Handle,className:r,style:i=void 0,children:o,color:s,minWidth:l=10,minHeight:c=10,maxWidth:a=Number.MAX_VALUE,maxHeight:u=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:d,autoScale:h=!0,shouldResize:g,onResizeStart:m,onResize:v,onResizeEnd:w}){const C=uc(),y=typeof e=="string"?e:C,_=ke(),p=A.useRef(null),k=n===fn.Handle,S=de(A.useCallback(g1(k&&h),[k,h]),_e),N=A.useRef(null),M=t??m1[n];A.useEffect(()=>{if(!(!p.current||!y))return N.current||(N.current=Q0({domNode:p.current,nodeId:y,getStoreItems:()=>{const{nodeLookup:I,transform:z,snapGrid:O,snapToGrid:b,nodeOrigin:R,domNode:j}=_.getState();return{nodeLookup:I,transform:z,snapGrid:O,snapToGrid:b,nodeOrigin:R,paneDomNode:j}},onChange:(I,z)=>{const{triggerNodeChanges:O,nodeLookup:b,parentLookup:R,nodeOrigin:j}=_.getState(),D=[],$={x:I.x,y:I.y},P=b.get(y);if(P&&P.expandParent&&P.parentId){const x=P.origin??j,T=I.width??P.measured.width??0,L=I.height??P.measured.height??0,V={id:P.id,parentId:P.parentId,rect:{width:T,height:L,...Pl({x:I.x??P.position.x,y:I.y??P.position.y},{width:T,height:L},P.parentId,b,x)}},B=Do([V],b,R,j);D.push(...B),$.x=I.x?Math.max(x[0]*T,I.x):void 0,$.y=I.y?Math.max(x[1]*L,I.y):void 0}if($.x!==void 0&&$.y!==void 0){const x={id:y,type:"position",position:{...$}};D.push(x)}if(I.width!==void 0&&I.height!==void 0){const T={id:y,type:"dimensions",resizing:!0,setAttributes:d?d==="horizontal"?"width":"height":!0,dimensions:{width:I.width,height:I.height}};D.push(T)}for(const x of z){const T={...x,type:"position"};D.push(T)}O(D)},onEnd:({width:I,height:z})=>{const O={id:y,type:"dimensions",resizing:!1,dimensions:{width:I,height:z}};_.getState().triggerNodeChanges([O])}})),N.current.update({controlPosition:M,boundaries:{minWidth:l,minHeight:c,maxWidth:a,maxHeight:u},keepAspectRatio:f,resizeDirection:d,onResizeStart:m,onResize:v,onResizeEnd:w,shouldResize:g}),()=>{var I;(I=N.current)==null||I.destroy()}},[M,l,c,a,u,f,m,v,w,g]);const H=M.split("-");return E.jsx("div",{className:Se(["react-flow__resize-control","nodrag",...H,n,r]),ref:p,style:{...i,scale:S,...s&&{[k?"backgroundColor":"borderColor"]:s}},children:o})}A.memo(y1);const Dt=(e,t,n,r,i)=>{if(!r)throw new Error(i??`Invalid property path: ${t}
464
+ Couldn't access "${n}" in ${JSON.stringify(e)}`)},ka=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Dr=e=>Array.isArray(e),Dc=(e,t)=>e.filter((n,r)=>r!==t),v1=(e,t,n,r={})=>{const{remove:i=!1,createNew:o=!0,noError:s=!1}=r,l=e,c=typeof(a=t)=="string"?a:typeof a=="number"?String(a):a.reduce((d,h)=>typeof h=="number"?`${d}[${h}]`:d===""?h:`${d}.${h}`,"");var a;const u=Object.assign(Object.assign({},r),{remove:i,createNew:o,noError:s,fullData:l,fullPath:c}),f=Array.isArray(t)?t:(d=>Array.isArray(d)?d:d.split(/(\.|\[\d+\])/).filter(h=>h!=="."&&h!=="").map(h=>{const g=/\[(\d+)\]/.exec(h);return g?Number(g[1]):h}).flat())(t).filter(d=>d!=="");return Dr(e)&&i&&f.length===1?Dc(e,f[0]):zn(e,f,n,u)},zn=(e,t,n,r)=>{const i=ka(e)?Object.assign({},e):null,o=Dr(e)?[...e]:null;if(t.length===0)return e;if(!i&&!o)throw new Error("Can't assign property -- invalid input object");const{createNew:s,remove:l,noError:c,fullData:a,fullPath:u}=r,f=t[0];if(o&&typeof f=="string")return o.map(m=>zn(m,t,n,r));if(t.length===1){if(i&&typeof f=="string"){const m=x1(i,f,n,r);return m??i}return o&&typeof f=="number"?(w1(o,f,n,r),o):(Dt(a,u,f,c),e)}const d=i||o||[];if(l&&t.length===2&&typeof t[1]=="number"){const m=d[f],v=t[1];return Dr(m)?d[f]=Dc(m,v):Dt(a,u,f,c,"Trying to remove an indexed item from an object that is not an array"),d}const h=t.slice(1);if(f in e){if(g=d[f],!Dr(g)&&!ka(g)){if(!s)return Dt(a,u,f,c),d;d[f]={}}return d[f]=zn(d[f],h,n,r),d}var g;if(s){const m=typeof h[0]=="number"?[]:{};if(i)return d[f]=m,d[f]=zn(d[f],h,n,r),d;if(o&&Array.isArray(d)){d.push(m);const v=d.length-1;return d[v]=zn(d[v],h,n,r),d}}return Dt(a,u,f,c),d},x1=(e,t,n,r)=>{const{remove:i,createNew:o,noError:s,insertAfter:l,insertBefore:c,fullData:a,fullPath:u}=r;if(c!==void 0||l!==void 0){const d=Object.entries(e);let h=1/0;return h=typeof c=="number"?c:typeof l=="number"?l:d.findIndex(([g,m])=>g===(c??l)),l&&h++,d.splice(h,0,[t,n]),Object.fromEntries(d)}const f=t in e;i?f?delete e[t]:Dt(a,u,t,s):o||f?e[t]=n:Dt(a,u,t,s)},w1=(e,t,n,r)=>{const{noError:i,fullData:o,fullPath:s,createNew:l,insert:c}=r;c&&e.splice(t,0,n),t in e?e[t]=n:l?e.push(n):Dt(o,s,t,i)},hn=(e,t,n)=>{const r=Array.isArray(t)?t:b1(t);if(r.length===0)return e;const i=r[0];if(Array.isArray(e)&&typeof i!="number")return e.map(s=>hn(s,r));if(typeof e!="object"||e===null||!(i in e))return k1(e,i);const o=e[i];return r.length===1?o:hn(o,r.slice(1))},b1=e=>e.split(/(\.|\[\d+\])/).filter(t=>t!=="."&&t!=="").map(t=>{const n=/\[(\d+)\]/.exec(t);return n?Number(n[1]):t}).flat(),k1=(e,t,n)=>{throw new Error(`Unable to extract object property
465
+ Looking for property: ${t}
466
+ In object: ${JSON.stringify(e)}`)};function Pc(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function en(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(a){try{c(r.next(a))}catch(u){o(u)}}function l(a){try{c(r.throw(a))}catch(u){o(u)}}function c(a){var u;a.done?i(a.value):(u=a.value,u instanceof n?u:new n(function(f){f(u)})).then(s,l)}c((r=r.apply(e,[])).next())})}const Oc=({className:e,name:t,value:n,setValue:r,handleKeyPress:i,styles:o,textAreaRef:s})=>{if(typeof n!="string")return null;const l=n.slice(-1)===`
467
+ `?n+".":n;return E.jsxs("div",{style:{display:"grid"},children:[E.jsx("textarea",{id:`${t}_textarea`,ref:s,style:Object.assign({height:"auto",gridArea:"1 / 1 / 2 / 2",overflowY:"auto",whiteSpace:"pre-wrap"},o),rows:1,className:e,name:`${t}_textarea`,value:n,onChange:c=>r(c.target.value),autoFocus:!0,onFocus:c=>{n.length<40&&c.target.select()},onKeyDown:i}),E.jsx("span",{className:e,style:Object.assign({visibility:"hidden",height:"auto",gridArea:"1 / 1 / 2 / 2",color:"red",opacity:.9,whiteSpace:"pre-wrap",overflowY:"auto",border:"1px solid transparent"},o),children:l})]})},pn=e=>e!==null&&typeof e=="object",Ic=(e,t,n,r="")=>{if(!n&&!r)return!0;switch(e){case"collection":if(n){if(n(t,r))return!0;if(!oo(r,t,n))return!1}if(!n&&r&&!oo(r,t))return!1;break;case"value":if(n&&!n(t,r)||!n&&r&&!gn(t,r))return!1}return!0},oo=(e="",t,n=gn)=>{const r=t.value;return Object.entries(r).some(([i,o])=>{const s=[...t.path,i],l=Object.assign(Object.assign({},t),{key:i,path:s,level:t.level+1,value:o,size:s.length,parentData:r});return pn(o)?oo(e,l,n):n(l,e)})},gn=(e,t="")=>{const{value:n}=e;if(n===null&&"null".includes(t.toLowerCase()))return!0;switch(typeof n){case"string":return n.toLowerCase().includes(t.toLowerCase());case"number":return!!String(n).includes(t);case"boolean":return n?"true".includes(t.toLowerCase())||t==="1":"false".includes(t.toLowerCase())||t==="0";default:return!1}},_a=({key:e,path:t},n="")=>!!gn({value:e},n)||!!t.some(r=>gn({value:r},n)),qt=(e,t)=>(t??"")+e.map(n=>n===""?"\0":n).join("."),Io=e=>e.shiftKey?"Shift":e.metaKey?"Meta":e.ctrlKey?"Control":e.altKey?"Alt":void 0,_1=(e,t,n)=>{const r=e.key,i=Io(e);if(Array.isArray(t))return!!i&&t.includes(i);const{key:o,modifier:s}=t;return(n!=="stringLineBreak"||r!=="Enter"||i!=="Shift"||o!=="Enter"||!(s!=null&&s.includes("Shift")))&&r===o&&(s===i||Array.isArray(s)&&s.includes(i))},Rt={key:"Enter"},Ea={confirm:Rt,cancel:{key:"Escape"},objectConfirm:Object.assign(Object.assign({},Rt),{modifier:["Meta","Shift","Control"]}),objectLineBreak:Rt,stringConfirm:Rt,stringLineBreak:Object.assign(Object.assign({},Rt),{modifier:["Shift"]}),numberConfirm:Rt,numberUp:{key:"ArrowUp"},numberDown:{key:"ArrowDown"},tabForward:{key:"Tab"},tabBack:{key:"Tab",modifier:"Shift"},booleanConfirm:Rt,booleanToggle:{key:" "},clipboardModifier:["Meta","Control"],collapseModifier:["Alt"]},Pt=(e,t,n="next",r)=>{const i=t.slice(0,t.length-1),o=t.slice(-1)[0];if(o===void 0)return null;const s=hn(e,i),l=E1(s);Array.isArray(s)||r(l,({key:u,value:f})=>[u,f]);const c=l.findIndex(u=>u.key===o),a=l[c+(n==="next"?1:-1)];return a?pn(a.value)?Object.keys(a.value).length===0?Pt(e,[...i,a.key],n,r):$c(e,[...i,a.key],n,r):[...i,a.key]:i.length===0?null:Pt(e,i,n,r)},$c=(e,t,n="next",r)=>{const i=hn(e,t);if(!pn(i))return t;const o=Array.isArray(i)?i.map((l,c)=>c):Object.keys(i);r(o,l=>[l,i]);const s=n==="next"?o[0]:o[o.length-1];return $c(e,[...t,s],n,r)},E1=e=>Array.isArray(e)?e.map((t,n)=>({index:n,value:t,key:n})):Object.entries(e).map(([t,n],r)=>({key:t,value:n,index:r})),Lc=(e,t)=>{var n,r,i,o;const s=e.current,l=(n=s==null?void 0:s.selectionStart)!==null&&n!==void 0?n:1/0,c=(r=s==null?void 0:s.selectionEnd)!==null&&r!==void 0?r:1/0,a=((i=s==null?void 0:s.textContent)===null||i===void 0?void 0:i.slice(0,l))+t+((o=s==null?void 0:s.textContent)===null||o===void 0?void 0:o.slice(c));return s.value=a,s==null||s.setSelectionRange(l+1,l+1),a},so=e=>{if(e!==zc){if(Array.isArray(e))return e.map(t=>so(t));if(e&&typeof e=="object")for(const t in e)e[t]=so(e[t]);return e}},zc="__​undefined__",$o={displayName:"Default",fragments:{edit:"rgb(42, 161, 152)"},styles:{container:{backgroundColor:"#f6f6f6",fontFamily:"monospace"},collection:{},collectionInner:{},collectionElement:{},dropZone:{},property:"#292929",bracket:{color:"rgb(0, 43, 54)",fontWeight:"bold"},itemCount:{color:"rgba(0, 0, 0, 0.3)",fontStyle:"italic"},string:"rgb(203, 75, 22)",number:"rgb(38, 139, 210)",boolean:"green",null:{color:"rgb(220, 50, 47)",fontVariant:"small-caps",fontWeight:"bold"},input:["#292929"],inputHighlight:"#b3d8ff",error:{fontSize:"0.8em",color:"red",fontWeight:"bold"},iconCollection:"rgb(0, 43, 54)",iconEdit:"edit",iconDelete:"rgb(203, 75, 22)",iconAdd:"edit",iconCopy:"rgb(38, 139, 210)",iconOk:"green",iconCancel:"rgb(203, 75, 22)"}},Hc=A.createContext({getStyles:()=>({}),icons:{}}),S1=({theme:e=$o,icons:t={},docRoot:n,children:r})=>{const i=C1(e,n);return E.jsx(Hc.Provider,{value:{getStyles:(o,s)=>typeof i[o]=="function"?i[o](s):i[o],icons:t},children:r})},ct=()=>A.useContext(Hc),C1=(e,t)=>{var n,r,i,o;const s={},l=(Array.isArray(e)?e:[e]).map(u=>N1(u)?Hi({fragments:{},styles:u},s):Hi(u,s)),c=Hi($o,{});Object.keys(c).forEach(u=>{const f=u;l.forEach(d=>{d[f]&&(c[f]=Object.assign(Object.assign({},c[f]),d[f]))})});const a=Object.assign({},c);return Object.entries(s).forEach(([u,f])=>{const d=u;a[d]=h=>{const g=f(h)||{};return Object.assign(Object.assign({},c[d]),g)}}),typeof(a==null?void 0:a.inputHighlight)!="function"&&(!((n=a==null?void 0:a.inputHighlight)===null||n===void 0)&&n.backgroundColor)&&t.style.setProperty("--jer-highlight-color",(r=a==null?void 0:a.inputHighlight)===null||r===void 0?void 0:r.backgroundColor),typeof(a==null?void 0:a.iconCopy)!="function"&&(!((i=a==null?void 0:a.iconCopy)===null||i===void 0)&&i.color)&&t.style.setProperty("--jer-icon-copy-color",(o=a==null?void 0:a.iconCopy)===null||o===void 0?void 0:o.color),a},Hi=(e,t)=>{const{fragments:n,styles:r}=e,i={};return Object.entries(r).forEach(([o,s])=>{const l=(Array.isArray(s)?s:[s]).reduce((c,a)=>{var u,f;if(typeof a=="function")return t[o]=a,Object.assign({},c);if(typeof a=="string"){const d=(u=n==null?void 0:n[a])!==null&&u!==void 0?u:a;return typeof d=="string"?Object.assign(Object.assign({},c),{[(f=T1[o])!==null&&f!==void 0?f:"color"]:d}):Object.assign(Object.assign({},c),d)}return Object.assign(Object.assign({},c),a)},{});i[o]=l}),i},N1=e=>!("styles"in e),T1={container:"backgroundColor",collection:"backgroundColor",collectionInner:"backgroundColor",collectionElement:"backgroundColor",dropZone:"borderColor",inputHighlight:"backgroundColor"},Vc=A.createContext(null),A1=({children:e,onEditEvent:t,onCollapse:n})=>{const[r,i]=A.useState(null),[o,s]=A.useState(null),[l,c]=A.useState(null),[a,u]=A.useState({path:null,pathString:null}),f=A.useRef(null),d=A.useRef("next"),h=A.useRef(null);return E.jsx(Vc.Provider,{value:{collapseState:r,setCollapseState:g=>{i(g),n&&g!==null&&(Array.isArray(g)?g.forEach(m=>n(m)):n(g)),g!==null&&setTimeout(()=>i(null),2e3)},getMatchingCollapseState:g=>{if(Array.isArray(r)){for(const m of r)if(Sa(g,m))return m;return null}return Sa(g,r)?r:null},currentlyEditingElement:o,setCurrentlyEditingElement:(g,m)=>{const v=typeof g=="string"||g===null?g:qt(g,m==="key"?"key_":void 0);o!==null&&v!==null&&f.current!==null&&f.current(),s(v),t&&t(g,m==="key"),f.current=typeof m=="function"?m:null},areChildrenBeingEdited:g=>o!==null&&o.includes(g),previouslyEditedElement:h.current,setPreviouslyEditedElement:g=>{h.current=g},tabDirection:d.current,setTabDirection:g=>{d.current=g},previousValue:l,setPreviousValue:c,dragSource:a,setDragSource:u},children:e})},Bt=()=>{const e=A.useContext(Vc);if(!e)throw new Error("Missing Context Provider");return e},Sa=(e,t)=>{if(t===null)return!1;if(!t.includeChildren)return t.path.every((n,r)=>e[r]===n)&&t.path.length===e.length;for(const[n,r]of t.path.entries())if(r!==e[n])return!1;return!0},ao="**INVALID_FUNCTION**",R1=({nodeData:e,showStringQuotes:t=!0,stringTruncate:n=200,pathString:r,canEdit:i,setIsEditing:o,styles:s,translate:l,value:c,TextWrapper:a=({children:u})=>u})=>{const u=c??e.value,[f,d]=A.useState(!1),h=t?'"':"",g=u.length>n,m=()=>{i?o(!0):d(!f)};return E.jsxs("div",{id:`${r}_display`,onDoubleClick:m,onClick:v=>{(v.getModifierState("Control")||v.getModifierState("Meta"))&&m()},className:"jer-value-string",style:s,children:[h,g?E.jsxs(E.Fragment,f?{children:[E.jsx(a,{children:E.jsxs("span",{children:[u,h]})}),E.jsxs("span",{className:"jer-string-expansion jer-show-less",onClick:()=>d(!1),children:[" ",l("SHOW_LESS",e)]})]}:{children:[E.jsxs(a,{children:[E.jsx("span",{children:u.slice(0,n-2).trimEnd()})," "]}),E.jsx("span",{className:"jer-string-expansion jer-ellipsis",onClick:()=>d(!0),children:"..."}),h]}):E.jsx(a,{children:`${u}${h}`})]})},j1=({styles:e,pathString:t,value:n,setValue:r,handleEdit:i,handleKeyboard:o,keyboardCommon:s})=>{const l=A.useRef(null);return E.jsx(Oc,{className:"jer-input-text",textAreaRef:l,name:t,value:n,setValue:r,handleKeyPress:c=>{o(c,Object.assign({stringConfirm:i,stringLineBreak:()=>{const a=Lc(l,`
468
+ `);r(a)}},s))},styles:e})},M1=e=>{var{isEditing:t,path:n,enumType:r}=e,i=Pc(e,["isEditing","path","enumType"]);const{getStyles:o}=ct(),s=qt(n),{value:l,setValue:c,nodeData:a,handleEdit:u,handleKeyboard:f,keyboardCommon:d}=i;return t&&r?E.jsxs("div",{className:"jer-select jer-select-enums",children:[E.jsx("select",{name:`${s}-value-select`,className:"jer-select-inner",onChange:h=>c(h.target.value),value:l,autoFocus:!0,onKeyDown:h=>{f(h,Object.assign({stringConfirm:u},d))},children:r.values.map(h=>E.jsx("option",{value:h,children:h},h))}),E.jsx("span",{className:"focus"})]}):t?E.jsx(j1,Object.assign({styles:o("input",a),pathString:s},i,{setValue:i.setValue})):E.jsx(R1,Object.assign({pathString:s,styles:o("string",a)},i))},D1=({value:e,setValue:t,isEditing:n,path:r,setIsEditing:i,handleEdit:o,nodeData:s,handleKeyboard:l,keyboardCommon:c})=>{const{getStyles:a}=ct();return n?E.jsx("input",{className:"jer-input-number",type:"text",name:qt(r),value:e,onChange:u=>t(u.target.value.replace(/[^0-9.-]/g,"")),autoFocus:!0,onFocus:u=>setTimeout(()=>u.target.select(),10),onKeyDown:u=>l(u,Object.assign({numberConfirm:o,numberUp:()=>t(Number(e)+1),numberDown:()=>t(Number(e)-1)},c)),style:Object.assign({width:String(e).length/1.5+2+"em"},a("input",s))}):E.jsx("span",{onDoubleClick:()=>i(!0),className:"jer-value-number",style:a("number",s),children:e})},P1=({value:e,setValue:t,isEditing:n,path:r,setIsEditing:i,handleEdit:o,nodeData:s,handleKeyboard:l,keyboardCommon:c})=>{const{getStyles:a}=ct();return typeof e!="boolean"?null:n?E.jsx("input",{className:"jer-input-boolean",type:"checkbox",name:qt(r),checked:e,onChange:()=>t(!e),onKeyDown:u=>{u.key===" "&&u.preventDefault(),l(u,Object.assign({booleanConfirm:o,booleanToggle:()=>t(!e)},c))},autoFocus:!0}):E.jsx("span",{onDoubleClick:()=>i(!0),className:"jer-value-boolean",style:a("boolean",s),children:String(e)})},O1=(e,t)=>{const n=A.useRef(void 0),r=A.useRef(t);A.useEffect(()=>{r.current=t},[t]);const i=o=>{r.current(o)};A.useEffect(()=>{if(window.clearTimeout(n.current),e)return n.current=window.setTimeout(()=>{window.addEventListener("keydown",i)},100),()=>{window.clearTimeout(n.current),window.removeEventListener("keydown",i)}},[e])},I1=({value:e,isEditing:t,setIsEditing:n,handleEdit:r,nodeData:i,handleKeyboard:o,keyboardCommon:s})=>{const{getStyles:l}=ct();return O1(t,c=>o(c,Object.assign({confirm:r},s))),E.jsx("div",{onDoubleClick:()=>n(!0),className:"jer-value-null",style:l("null",i),children:String(e)})},$1=({value:e})=>{let t="Error!";switch(typeof e){case"string":e===ao&&(t="Function");break;case"undefined":t="Undefined";break;case"symbol":t="Symbol"}return E.jsx("span",{className:"jer-value-invalid",children:t})},L1=({size:e,style:t,className:n})=>E.jsxs("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:e,height:e,className:n,style:t,children:[E.jsx("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4z"}),E.jsx("path",{d:"M12 2C6.486 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.514 2 12 2zm0 18c-4.411 0-8-3.589-8-8s3.589-8 8-8 8 3.589 8 8-3.589 8-8 8z"})]}),z1=({size:e,style:t,className:n})=>E.jsxs("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:e,height:e,className:n,style:t,transform:"translate(0, 0.5)",children:[E.jsx("path",{d:"M7 17.013l4.413-.015 9.632-9.54c.378-.378.586-.88.586-1.414s-.208-1.036-.586-1.414l-1.586-1.586c-.756-.756-2.075-.752-2.825-.003L7 12.583v4.43zM18.045 4.458l1.589 1.583-1.597 1.582-1.586-1.585 1.594-1.58zM9 13.417l6.03-5.973 1.586 1.586-6.029 5.971L9 15.006v-1.589z"}),E.jsx("path",{d:"M5 21h14c1.103 0 2-.897 2-2v-8.668l-2 2V19H8.158c-.026 0-.053.01-.079.01-.033 0-.066-.009-.1-.01H5V5h6.847l2-2H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2z"})]}),H1=({size:e,style:t,className:n})=>E.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:e,height:e,className:n,style:t,children:E.jsx("path",{d:"M6 19a2 2 0 002 2h8a2 2 0 002-2V7H6v12m2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12M15.5 4l-1-1h-5l-1 1H5v2h14V4h-3.5z"})}),V1=({size:e,style:t,className:n})=>E.jsxs("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",width:e,height:e,className:n,style:t,children:[E.jsx("path",{d:"M9 2 H15 A1 1 0 0 1 16 3 V5 A1 1 0 0 1 15 6 H9 A1 1 0 0 1 8 5 V3 A1 1 0 0 1 9 2 z"}),E.jsx("path",{d:"M8 4H6a2 2 0 00-2 2v14a2 2 0 002 2h12a2 2 0 002-2v-2M16 4h2a2 2 0 012 2v4M21 14H11"}),E.jsx("path",{d:"M15 10l-4 4 4 4"})]}),B1=({size:e,style:t,className:n})=>E.jsxs("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",width:e,height:e,className:n,style:t,children:[E.jsx("path",{d:"M22 11.08V12a10 10 0 11-5.93-9.14"}),E.jsx("path",{d:"M22 4L12 14.01l-3-3"})]}),F1=({size:e,style:t,className:n})=>E.jsx("svg",{baseProfile:"tiny",viewBox:"0 0 24 24",fill:"currentColor",width:e,height:e,className:n,style:t,children:E.jsx("path",{d:"M12 4c-4.411 0-8 3.589-8 8s3.589 8 8 8 8-3.589 8-8-3.589-8-8-8zm-5 8c0-.832.224-1.604.584-2.295l6.711 6.711A4.943 4.943 0 0112 17c-2.757 0-5-2.243-5-5zm9.416 2.295L9.705 7.584A4.943 4.943 0 0112 7c2.757 0 5 2.243 5 5 0 .832-.224 1.604-.584 2.295z"})}),q1=({size:e,style:t,className:n})=>E.jsx("svg",{viewBox:"0 0 512 512",fill:"currentColor",width:e,height:e,className:n,style:t,children:E.jsx("path",{d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"})}),Ot=({name:e,nodeData:t})=>{var n,r,i,o,s,l,c;const{getStyles:a,icons:u}=ct(),f={size:"1.4em",className:"jer-icon"};switch(e){case"add":return(n=u==null?void 0:u.add)!==null&&n!==void 0?n:E.jsx(L1,Object.assign({},f,{style:a("iconAdd",t)}));case"edit":return(r=u==null?void 0:u.edit)!==null&&r!==void 0?r:E.jsx(z1,Object.assign({},f,{style:a("iconEdit",t)}));case"delete":return(i=u==null?void 0:u.delete)!==null&&i!==void 0?i:E.jsx(H1,Object.assign({},f,{style:a("iconDelete",t),size:"1.45em"}));case"copy":return(o=u==null?void 0:u.copy)!==null&&o!==void 0?o:E.jsx(V1,Object.assign({},f,{style:a("iconCopy",t),size:"1.2em"}));case"ok":return(s=u==null?void 0:u.ok)!==null&&s!==void 0?s:E.jsx(B1,Object.assign({},f,{style:Object.assign({fontSize:"90%"},a("iconOk",t))}));case"cancel":return(l=u==null?void 0:u.cancel)!==null&&l!==void 0?l:E.jsx(F1,Object.assign({},f,{style:Object.assign({fontSize:"130%"},a("iconCancel",t))}));case"chevron":return(c=u==null?void 0:u.chevron)!==null&&c!==void 0?c:E.jsx(q1,{size:"1em",style:a("iconCollection",t)});default:return E.jsx(E.Fragment,{})}},Bc=({startEdit:e,handleDelete:t,handleAdd:n,enableClipboard:r,type:i,customButtons:o,nodeData:s,translate:l,keyboardControls:c,handleKeyboard:a,editConfirmRef:u,getNewKeyOptions:f,jsonStringify:d})=>{const{getStyles:h}=ct(),g=l("KEY_NEW",s),[m,v]=A.useState(g),[w,C]=A.useState(!1),{key:y,path:_,value:p}=s,k=Array.isArray(w),S=N=>{var M;if(!N)return void C(!1);const H=Object.keys(hn(s.fullData,_)),I=f?(M=f(s))===null||M===void 0?void 0:M.filter(z=>!H.includes(z)):null;I&&v(""),C(I==null||I)};return E.jsxs("div",{className:"jer-edit-buttons",style:{opacity:w?1:void 0},onClick:N=>N.stopPropagation(),children:[r&&E.jsx("div",{onClick:N=>{var M;N.stopPropagation();let H,I,z="value",O="",b=null;if(r){const R=Io(N);if(R&&c.clipboardModifier.includes(R)?(H=Y1(_),O=H,z="path"):(H=p,O=typeof H=="object"?d(p):String(H)),!navigator.clipboard)return void(typeof r=="function"&&r({success:!1,value:H,stringValue:O,path:_,key:y,type:z,errorMessage:"Can't access clipboard API"}));(M=navigator.clipboard)===null||M===void 0||M.writeText(O).then(()=>I=!0).catch(j=>{I=!1,b=j.message}).finally(()=>{typeof r=="function"&&r({success:I,errorMessage:b,value:H,stringValue:O,path:_,key:y,type:z})})}},className:"jer-copy-pulse",children:E.jsx(Ot,{name:"copy",nodeData:s})}),e&&E.jsx("div",{onClick:e,children:E.jsx(Ot,{name:"edit",nodeData:s})}),t&&E.jsx("div",{onClick:t,children:E.jsx(Ot,{name:"delete",nodeData:s})}),n&&E.jsx("div",{onClick:()=>{i==="object"?S(!0):n("")},children:E.jsx(Ot,{name:"add",nodeData:s})}),o==null?void 0:o.map(({Element:N,onClick:M},H)=>E.jsx("div",{onClick:I=>M&&M(s,I),children:E.jsx(N,{nodeData:s})},H)),w&&n&&i==="object"&&E.jsxs(E.Fragment,{children:[k?E.jsxs("div",{className:"jer-select jer-select-keys",children:[E.jsxs("select",{name:"new-key-select",className:"jer-select-inner",onChange:N=>{n(N.target.value),S(!1)},defaultValue:"",autoFocus:!0,onKeyDown:N=>{a(N,{cancel:()=>S(!1)})},children:[E.jsx("option",{value:"",disabled:!0,children:w.length>0?l("KEY_SELECT",s):l("NO_KEY_OPTIONS",s)}),w.map(N=>E.jsx("option",{value:N,children:N},N))]}),E.jsx("span",{className:"focus"})]}):E.jsx("input",{className:"jer-input-new-key",type:"text",name:"new-object-key",value:m,onChange:N=>v(N.target.value),autoFocus:!0,onFocus:N=>N.target.select(),onKeyDown:N=>{a(N,{stringConfirm:()=>{n&&(S(!1),n(m),v(g))},cancel:()=>{S(!1),v(g)}})},style:h("input",s)}),E.jsx(Lo,{onOk:()=>{k&&!m||(S(!1),n(m))},onCancel:()=>{S(!1)},nodeData:s,editConfirmRef:u,hideOk:k})]})]})},Lo=({onOk:e,onCancel:t,nodeData:n,editConfirmRef:r,hideOk:i=!1})=>E.jsxs("div",{className:"jer-confirm-buttons",children:[!i&&E.jsx("div",{onClick:e,ref:r,children:E.jsx(Ot,{name:"ok",nodeData:n})}),E.jsx("div",{onClick:t,children:E.jsx(Ot,{name:"cancel",nodeData:n})})]}),Y1=e=>e.reduce((t,n)=>typeof n=="number"?`${t}[${n}]`:t===""?n:`${t}.${n}`,""),X1=["string","number","boolean","null","object","array"],Fc=({props:e,collapsed:t})=>{const{data:n,nodeData:r,parentData:i,onEdit:o,onError:s,showErrorMessages:l,restrictEditFilter:c,restrictDeleteFilter:a,restrictAddFilter:u,restrictDragFilter:f,translate:d,errorMessageTimeout:h}=e,{currentlyEditingElement:g,setCurrentlyEditingElement:m}=Bt(),[v,w]=A.useState(null),C=Object.assign(Object.assign({},r),{collapsed:t}),{path:y,key:_,size:p}=C,k=qt(y),S=!c(C),N=!a(C),M=!u(C),H=!f(C)&&N&&g===null,I=$=>{l&&(w($),setTimeout(()=>w(null),h)),console.warn("Error",$)},z=A.useCallback(($,P)=>{I($.message),s&&s({currentData:C.fullData,errorValue:P,currentValue:n,name:_,path:y,error:$})},[s,l]),O=g===k,b=g===`key_${k}`,R=typeof y.slice(-1)[0]=="number",j={isEditing:O,isEditingKey:b,isArray:R,canEditKey:i!==null&&S&&M&&N&&!R},D=_===""&&y.length>0?d("EMPTY_STRING",C):null;return{pathString:k,nodeData:C,path:y,name:_,size:p,canEdit:S,canDelete:N,canAdd:M,canDrag:H,error:v,showError:I,onError:z,setError:w,handleEditKey:$=>{if(m(null),_===$||!i)return;const P=y.slice(0,-1);if(Object.keys(i).includes($))return void z({code:"KEY_EXISTS",message:d("ERROR_KEY_EXISTS",C)},$);const x=Object.fromEntries(Object.entries(i).map(([T,L])=>T===_?[$,L]:[T,L]));o(x,P).then(T=>{T&&z({code:"UPDATE_ERROR",message:T},$)})},derivedValues:j,emptyStringKey:D}},qc=({canDrag:e,canDragOnto:t,path:n,nodeData:r,onMove:i,onError:o,translate:s})=>{const{getStyles:l}=ct(),{dragSource:c,setDragSource:a}=Bt(),[u,f]=A.useState(!1),d=qt(n),h=A.useMemo(()=>e?{onDragStart:w=>{w.stopPropagation(),a({path:n,pathString:d})},onDragEnd:w=>{w.stopPropagation(),a({path:null,pathString:null})}}:{},[e,d]),g=A.useMemo(()=>w=>t?{onDragOver:C=>{C.stopPropagation(),C.preventDefault()},onDrop:C=>{C.stopPropagation(),v(w),a({path:null,pathString:null}),f(!1)},onDragEnter:C=>{var y;C.stopPropagation(),d.startsWith((y=c.pathString)!==null&&y!==void 0?y:"")||f(w)},onDragExit:C=>{C.stopPropagation(),f(!1)}}:{},[c,t,d]),m=A.useMemo(()=>t&&c.pathString!==null?E.jsx("div",Object.assign({className:"jer-drop-target-bottom",style:{height:"50%",position:"absolute",width:"100%",top:"50%",zIndex:n.length}},g("below"))):null,[c,t,n.length]),v=w=>{var C,y;const _=(C=c.path)===null||C===void 0?void 0:C.slice(-1)[0],p=(y=c.path)===null||y===void 0?void 0:y.slice(0,-1).join("."),k=n.slice(0,-1).join(""),{parentData:S}=r;typeof _=="string"&&S&&!Array.isArray(S)&&Object.keys(S).includes(_)&&_ in S&&p!==k?o({code:"KEY_EXISTS",message:s("ERROR_KEY_EXISTS",r)},_):i(c.path,n,w).then(N=>{N&&o({code:"UPDATE_ERROR",message:N},r.value)})};return{dragSourceProps:h,getDropTargetProps:g,BottomDropTarget:m,DropTargetPadding:({position:w,nodeData:C})=>u===w?E.jsx("div",{className:"jer-drag-n-drop-padding",style:l("dropZone",C)}):null,handleDrop:v}},U1=(e,t,n,r)=>{var i,o,s;if(!t.current)return 0;const l=parseInt((i=getComputedStyle(n.current).getPropertyValue("line-height"))!==null&&i!==void 0?i:"16px"),c=((s=(o=t.current)===null||o===void 0?void 0:o.offsetWidth)!==null&&s!==void 0?s:0)/(.5*l),a=r(e).replace(/\\n/g,`
469
+ `).split(`
470
+ `).map(u=>Math.ceil(u.length/c)).reduce((u,f)=>u+f,0)*l;return Math.min(a+30,window.innerHeight-50)},Kr=({isEditingKey:e,canEditKey:t,pathString:n,path:r,name:i,handleKeyboard:o,handleEditKey:s,handleCancel:l,handleClick:c,keyValueArray:a,styles:u,getNextOrPrevious:f,emptyStringKey:d})=>{const{setCurrentlyEditingElement:h}=Bt();return e?E.jsx("input",{className:"jer-input-text jer-key-edit",type:"text",name:n,defaultValue:i,autoFocus:!0,onFocus:g=>g.target.select(),onKeyDown:g=>o(g,{stringConfirm:()=>s(g.target.value),cancel:l,tabForward:()=>{if(s(g.target.value),a){const m=a==null?void 0:a[0][0];h(m?[...r,m]:f("next"))}else h(r)},tabBack:()=>{s(g.target.value),h(f("prev"))}}),style:{width:String(i).length/1.5+.5+"em"}}):E.jsxs("span",{className:"jer-key-text",style:Object.assign(Object.assign({},u),{minWidth:`${Math.min(String(i).length+1,5)}ch`,flexShrink:i.length>10?1:0}),onDoubleClick:()=>t&&h(r,"key"),onClick:c,children:[d?E.jsx("span",{className:"jer-empty-string",children:d}):i,i!==""||d?E.jsx("span",{className:"jer-key-colon",children:":"}):null]})},Yc=e=>{const{data:t,parentData:n,onEdit:r,onDelete:i,onChange:o,onMove:s,enableClipboard:l,canDragOnto:c,restrictTypeSelection:a,searchFilter:u,searchText:f,showLabel:d,stringTruncate:h,showStringQuotes:g,indent:m,translate:v,customNodeDefinitions:w,customNodeData:C,handleKeyboard:y,keyboardControls:_,sort:p,editConfirmRef:k,jsonStringify:S}=e,{getStyles:N}=ct(),{setCurrentlyEditingElement:M,setCollapseState:H,previouslyEditedElement:I,setPreviouslyEditedElement:z,tabDirection:O,setTabDirection:b,previousValue:R,setPreviousValue:j}=Bt(),[D,$]=A.useState(typeof t=="function"?ao:t),{pathString:P,nodeData:x,path:T,name:L,canEdit:V,canDelete:B,canDrag:Y,error:F,onError:X,handleEditKey:q,emptyStringKey:K,derivedValues:ae}=Fc({props:e}),{dragSourceProps:ie,getDropTargetProps:W,BottomDropTarget:Q,DropTargetPadding:Z}=qc({canDrag:Y,canDragOnto:c,path:T,nodeData:x,onMove:s,onError:X,translate:v}),[le,J]=A.useState(lo(t,C)),fe=A.useCallback(U=>{if(!o)return void $(U);const ge=o({currentData:x.fullData,newValue:U,currentValue:D,name:L,path:T});$(ge)},[o]);A.useEffect(()=>{$(typeof t=="function"?ao:t),J(lo(t,C))},[t,F]);const{CustomNode:be,customNodeProps:ze,hideKey:je,showEditTools:He=!0,showOnEdit:De,showOnView:Ye,passOriginalNode:Ze}=C,Xe=[...X1,...w.filter(({showInTypesSelector:U=!1,name:ge})=>U&&!!ge).map(({name:U})=>U)],Ee=A.useMemo(()=>{if(typeof a=="boolean")return a?[]:Xe;if(Array.isArray(a))return a;const U=a(x);return typeof U=="boolean"?U?[]:Xe:U},[x,a]),[Ve,Ue]=A.useState(((U,ge)=>{var me;if(typeof U!="string")return null;const Ne=ge.filter(Ae=>Ae instanceof Object&&Ae.enum&&Ae.values.includes(U)&&Ae.matchPriority);return Ne.sort((Ae,Te)=>{var dt,ft;return((dt=Te.matchPriority)!==null&&dt!==void 0?dt:0)-((ft=Ae.matchPriority)!==null&&ft!==void 0?ft:0)}),(me=Ne[0])!==null&&me!==void 0?me:null})(D,Ee)),{isEditing:Pe}=ae,nt=Ic("value",x,u,f);if(Pe&&(!nt||!V)){const U=Pt(x.fullData,T,O,p);M(U||I)}if(!nt)return null;const Ge=U=>{let ge;if(M(null),j(null),U===void 0||(me=>me&&typeof me=="object"&&"type"in me&&"target"in me&&"preventDefault"in me&&typeof me.preventDefault=="function")(U))switch(le){case"object":ge={[v("DEFAULT_NEW_KEY",x)]:D};break;case"array":ge=D??[];break;case"number":{const me=Number(D);ge=isNaN(me)?0:me;break}default:ge=D}else ge=U;r(ge,T).then(me=>{me&&X({code:"UPDATE_ERROR",message:me},ge)})},Oe=()=>{M(null),R===null?($(t),j(null)):r(R,T)},{isEditingKey:xt,canEditKey:Ie}=ae,Ce=!Pe&&F,ut=Pe&&Ee.length>1,re=(le!=="invalid"||be)&&!F&&He,ne=d&&!je,ce=be&&(Pe&&De||!Pe&&Ye),pe={value:D,parentData:n,setValue:fe,isEditing:Pe,canEdit:V,setIsEditing:V?()=>M(T):()=>{},handleEdit:Ge,handleCancel:Oe,path:T,stringTruncate:h,showStringQuotes:g,nodeData:x,enumType:Ve,translate:v,handleKeyboard:y,keyboardCommon:{cancel:Oe,tabForward:()=>{b("next"),z(P);const U=Pt(x.fullData,T,"next",p);U&&(Ge(),M(U))},tabBack:()=>{b("prev"),z(P);const U=Pt(x.fullData,T,"prev",p);U&&(Ge(),M(U))}}},ue={canEditKey:Ie,isEditingKey:xt,pathString:P,path:T,name:L,handleKeyboard:y,handleEditKey:q,handleCancel:Oe,styles:N("property",x),getNextOrPrevious:U=>Pt(x.fullData,T,U,p),emptyStringKey:K},he=ce?E.jsx(be,Object.assign({},e,{value:D,customNodeProps:ze,setValue:fe,handleEdit:Ge,handleCancel:Oe,handleKeyPress:U=>y(U,{stringConfirm:Ge,cancel:Oe}),isEditing:Pe,setIsEditing:()=>M(T),getStyles:N,originalNode:Ze?Ca(t,pe):void 0,originalNodeKey:Ze?E.jsx(Kr,Object.assign({},ue)):void 0,canEdit:V,keyboardCommon:pe.keyboardCommon,onError:X})):Ca(t,pe);return E.jsxs("div",Object.assign({className:"jer-component jer-value-component",style:{marginLeft:m/2+"em",position:"relative"},draggable:Y},ie,W("above"),{children:[Q,E.jsx(Z,{position:"above",nodeData:x}),E.jsxs("div",{className:"jer-value-main-row",style:{flexWrap:L.length>10?"wrap":"nowrap"},children:[ne&&E.jsx(Kr,Object.assign({},ue)),E.jsxs("div",{className:"jer-value-and-buttons",children:[E.jsx("div",{className:"jer-input-component",children:he}),Pe?E.jsx(Lo,{onOk:Ge,onCancel:Oe,nodeData:x,editConfirmRef:k}):re&&E.jsx(Bc,{startEdit:V?()=>{j(R),M(T,Oe)}:void 0,handleDelete:B?()=>{i(D,T).then(U=>{U&&X({code:"DELETE_ERROR",message:U},D)})}:void 0,enableClipboard:l,translate:v,customButtons:e.customButtons,nodeData:x,handleKeyboard:y,keyboardControls:_,editConfirmRef:k,jsonStringify:S}),ut&&E.jsxs("div",{className:"jer-select jer-select-types",children:[E.jsx("select",{name:`${L}-type-select`,className:"jer-select-inner",onChange:U=>(ge=>{const me=w.find(Te=>Te.name===ge);if(me)return r(me.defaultValue,T),J(ge),Ue(null),M(null),void H({path:T,collapsed:!1,includeChildren:!1});const Ne=Ee.find(Te=>Te instanceof Object&&Te.enum===ge);if(Ne)return typeof D=="string"&&Ne.values.includes(D)||r(Ne.values[0],T).then(Te=>{Te&&(X({code:"UPDATE_ERROR",message:Te},Ae),M(null))}),void Ue(Ne);const Ae=G1(D,ge,v("DEFAULT_NEW_KEY",x),C!=null&&C.CustomNode?v("DEFAULT_STRING",x):void 0);r(Ae,T).then(Te=>{Te?(X({code:"UPDATE_ERROR",message:Te},Ae),M(null)):Ue(null)})})(U.target.value),value:Ve?Ve.enum:le,children:Ee.map(U=>U instanceof Object&&"enum"in U?E.jsx("option",{value:U.enum,children:U.enum},U.enum):E.jsx("option",{value:U,children:U},U))}),E.jsx("span",{className:"focus"})]}),Ce&&E.jsx("span",{className:"jer-error-slug",style:N("error",x),children:F})]})]}),E.jsx(Z,{position:"below",nodeData:x})]}))},lo=(e,t)=>t!=null&&t.CustomNode&&(t!=null&&t.name)&&t.showInTypesSelector?t.name:typeof e=="string"?"string":typeof e=="number"?"number":typeof e=="boolean"?"boolean":e===null?"null":"invalid",Ca=(e,t)=>{const n=lo(e),{value:r}=t;switch(n){case"string":return E.jsx(M1,Object.assign({},t,{value:r}));case"number":return E.jsx(D1,Object.assign({},t,{value:r}));case"boolean":return E.jsx(P1,Object.assign({},t,{value:r}));case"null":return E.jsx(I1,Object.assign({},t));default:return E.jsx($1,Object.assign({},t))}},G1=(e,t,n,r)=>{switch(t){case"string":return r??String(e);case"number":{const i=Number(e);return isNaN(i)?0:i}case"boolean":return!!e;case"null":return null;case"object":return{[n]:e};case"array":return[e];default:return String(e)}},Xc=(e=[],t)=>{const n=e.filter(({condition:g})=>g(t));if(n.length===0)return{};const r=n[0],{element:i,wrapperElement:o,customNodeProps:s,wrapperProps:l,hideKey:c=!1,showEditTools:a=!0,showOnEdit:u=!1,showOnView:f=!0,showCollectionWrapper:d=!0}=r,h=Pc(r,["element","wrapperElement","customNodeProps","wrapperProps","hideKey","showEditTools","showOnEdit","showOnView","showCollectionWrapper"]);return Object.assign({CustomNode:i,CustomWrapper:o,customNodeProps:s,wrapperProps:l,hideKey:c,showEditTools:a,showOnEdit:u,showOnView:f,showCollectionWrapper:d},h)},Uc=e=>{const{getStyles:t}=ct(),{collapseState:n,setCollapseState:r,getMatchingCollapseState:i,currentlyEditingElement:o,setCurrentlyEditingElement:s,areChildrenBeingEdited:l,previousValue:c,setPreviousValue:a}=Bt(),{mainContainerRef:u,data:f,nodeData:d,parentData:h,showCollectionCount:g,onEdit:m,onAdd:v,onDelete:w,canDragOnto:C,collapseFilter:y,collapseAnimationTime:_,onMove:p,enableClipboard:k,searchFilter:S,searchText:N,indent:M,sort:H,showArrayIndices:I,defaultValue:z,newKeyOptions:O,translate:b,customNodeDefinitions:R,customNodeData:j,jsonParse:D,jsonStringify:$,TextEditor:P,keyboardControls:x,handleKeyboard:T,insertAtTop:L,onCollapse:V,editConfirmRef:B,collapseClickZones:Y}=e,[F,X]=A.useState($(f)),q=y(d),{contentRef:K,isAnimating:ae,maxHeight:ie,collapsed:W,animateCollapse:Q,cssTransitionValue:Z}=((ee,ve,Be,$e,We)=>{const[mi,Wt]=A.useState(Be?0:void 0),[Nt,yi]=A.useState(Be),wn=A.useRef(!1),bn=A.useRef(null),fr=A.useRef(0),hr=A.useRef(0),vi=ve/1e3+"s",xi=A.useCallback(kn=>{var bt,_n;if(Nt!==kn){switch(window.clearTimeout(hr.current),wn.current=!0,kn){case!0:{const pr=(_n=(bt=bn.current)===null||bt===void 0?void 0:bt.offsetHeight)!==null&&_n!==void 0?_n:0;fr.current=pr,Wt(pr),setTimeout(()=>{Wt(0)},5);break}case!1:Wt(fr.current||U1(ee,bn,$e,We))}yi(!Nt),hr.current=window.setTimeout(()=>{wn.current=!1,kn||Wt(void 0)},ve)}},[ve,Nt,ee,$e,We]);return{contentRef:bn,isAnimating:wn.current,animateCollapse:xi,maxHeight:mi,collapsed:Nt,cssTransitionValue:vi}})(f,_,q,u,$),{pathString:le,nodeData:J,path:fe,name:be,size:ze,canEdit:je,canDelete:He,canAdd:De,canDrag:Ye,error:Ze,setError:Xe,onError:Ee,handleEditKey:Ve,emptyStringKey:Ue,derivedValues:Pe}=Fc({props:e,collapsed:W}),{dragSourceProps:nt,getDropTargetProps:Ge,BottomDropTarget:Oe,DropTargetPadding:xt}=qc({canDrag:Ye,canDragOnto:C,path:fe,nodeData:J,onMove:p,onError:Ee,translate:b}),Ie=A.useRef(!q),{isEditing:Ce,isEditingKey:ut,isArray:re,canEditKey:ne}=Pe;A.useEffect(()=>{X($(f))},[f,$]),A.useEffect(()=>{const ee=y(J)&&!Ce;Ie.current=!ee,Q(ee)},[y]),A.useEffect(()=>{if(n!==null){const ee=i(fe);ee&&(Ie.current=!0,Q(ee.collapsed))}},[n]);const ce=A.useRef(null),pe=A.useCallback((ee,ve)=>{if(typeof z!="function")return z;const Be=z(ee,ve);return Be!==void 0?Be:null},[z]),ue=A.useCallback(ee=>O?typeof O!="function"?O:O(ee):null,[O]),{CustomNode:he,customNodeProps:U,CustomWrapper:ge,wrapperProps:me={},hideKey:Ne,showEditTools:Ae=!0,showOnEdit:Te,showOnView:dt,showCollectionWrapper:ft=!0}=j,Yt=l(le);if(Yt&&W&&Q(!1),!(Ic("collection",J,S,N)||J.level===0)&&!Yt)return null;const wt=Array.isArray(f)?"array":"object",yn=wt==="array"?{open:"[",close:"]"}:{open:"{",close:"}"},ir=ee=>{if(ee.key!=="Tab"||ee.getModifierState("Shift"))T(ee,{objectConfirm:Ut,cancel:Ct});else{ee.preventDefault();const ve=Lc(ce," ");X(ve)}},Xt=ee=>{ee.stopPropagation();const ve=Io(ee);if(ve&&x.collapseModifier.includes(ve))return Ie.current=!0,void r({collapsed:!W,path:fe,includeChildren:!0});o&&o.includes(le)||(Ie.current=!0,r(null),V&&V({path:fe,collapsed:!W,includeChildren:!1}),Q(!W))},Ut=()=>{try{const ee=D(F);if(s(null),a(null),Xe(null),$(ee)===$(f))return;m(ee,fe).then(ve=>{ve&&Ee({code:"UPDATE_ERROR",message:ve},ee)})}catch{Ee({code:"INVALID_JSON",message:b("ERROR_INVALID_JSON",J)},F)}},hi=fe.length>0?()=>{w(f,fe).then(ee=>{ee&&Ee({code:"DELETE_ERROR",message:ee},f)})}:void 0,Ct=()=>{s(null),c===null?(Xe(null),X($(f)),a(null)):m(c,fe)},or=g==="when-closed"?W:g,pi=!Ce&&Ae,sr=(I||!re)&&!Ne&&be!==void 0,ar=he&&(Ce&&Te||!Ce&&dt),Gt=Object.entries(f).map(([ee,ve])=>[wt==="array"?Number(ee):ee,ve]);wt==="object"&&H(Gt,ee=>ee);const lr=Ie.current?Ce?E.jsxs("div",{className:"jer-collection-text-edit",children:[P?E.jsx(P,{value:F,onChange:X,onKeyDown:ee=>T(ee,{objectConfirm:Ut,cancel:Ct})}):E.jsx(Oc,{textAreaRef:ce,className:"jer-collection-text-area",name:le,value:F,setValue:X,handleKeyPress:ir,styles:t("input",J)}),E.jsx("div",{className:"jer-collection-input-button-row",children:E.jsx(Lo,{onOk:Ut,onCancel:Ct,nodeData:J,editConfirmRef:B})})]}):Gt.map(([ee,ve],Be)=>{const $e={key:ee,value:ve,path:[...fe,ee],level:fe.length+1,index:Be,size:pn(ve)?Object.keys(ve).length:null,parentData:f,fullData:J.fullData},We=Xc(R,$e);return E.jsx("div",{className:"jer-collection-element",style:t("collectionElement",$e),children:pn(ve)&&!(We!=null&&We.renderCollectionAsValue)?E.jsx(Uc,Object.assign({},e,{data:ve,parentData:f,nodeData:$e,showCollectionCount:g,canDragOnto:je,customNodeData:We}),ee):E.jsx(Yc,Object.assign({},e,{data:ve,parentData:f,nodeData:$e,canDragOnto:je,showLabel:wt==="object"||I,customNodeData:We}),ee)},ee)}):null,vn=!!ft&&W&&!Yt;vn||(Ie.current=!0);const cr=Object.assign(Object.assign({},e),{data:f,value:f,parentData:h,nodeData:J,setValue:ee=>en(void 0,void 0,void 0,function*(){return yield m(ee,fe)}),handleEdit:Ut,handleCancel:Ct,handleKeyPress:ir,isEditing:Ce,setIsEditing:()=>s(fe),getStyles:t,canDragOnto:je,canEdit:je,keyboardCommon:{},onError:Ee}),gi=ar?E.jsx(he,Object.assign({customNodeProps:U},cr,{children:lr})):lr,ur=pi&&E.jsx(Bc,{startEdit:je?()=>{Ie.current=!0,a(null),s(fe)}:void 0,handleAdd:De?ee=>{Q(!1);const ve=pe(J,ee);if(wt==="array"){const Be=L.array?0:f.length,$e=L.array?{insert:!0}:{};v(ve,[...fe,Be],$e).then(We=>{We&&Ee({code:"ADD_ERROR",message:We},ve)})}else if(ee in f)Ee({code:"KEY_EXISTS",message:b("ERROR_KEY_EXISTS",J)},ee);else{const Be=L.object?{insertBefore:0}:{};v(ve,[...fe,ee],Be).then($e=>{$e&&Ee({code:"ADD_ERROR",message:$e},ve)})}}:void 0,handleDelete:He?hi:void 0,enableClipboard:k,type:wt,nodeData:J,translate:b,customButtons:e.customButtons,keyboardControls:x,handleKeyboard:T,getNewKeyOptions:ue,editConfirmRef:B,jsonStringify:$}),dr={canEditKey:ne,isEditingKey:ut,pathString:le,path:fe,name:be,handleKeyboard:T,handleEditKey:Ve,handleCancel:Ct,keyValueArray:Gt,styles:t("property",J),getNextOrPrevious:ee=>Pt(J.fullData,fe,ee,H),handleClick:Y.includes("property")?Xt:ee=>ee.stopPropagation(),emptyStringKey:Ue},xn=E.jsxs("div",Object.assign({className:"jer-component jer-collection-component",style:Object.assign(Object.assign({marginLeft:(fe.length===0?0:M/2)+"em"},t("collection",J)),{position:"relative"}),draggable:Ye},nt,Ge("above"),{children:[E.jsx("div",{className:"jer-clickzone",style:{width:M/2+1+"em",zIndex:10+2*J.level},onClick:Y.includes("left")?Xt:void 0}),!Ce&&Oe,E.jsx(xt,{position:"above",nodeData:J}),ft?E.jsxs("div",{className:"jer-collection-header-row",style:{position:"relative"},onClick:Y.includes("header")?Xt:void 0,children:[E.jsxs("div",{className:"jer-collection-name",children:[E.jsx("div",{className:"jer-collapse-icon jer-accordion-icon"+(W?" jer-rotate-90":""),style:{zIndex:11+2*J.level,transition:Z},onClick:Xt,children:E.jsx(Ot,{name:"chevron",rotate:W,nodeData:J})}),sr&&E.jsx(Kr,Object.assign({},dr)),!Ce&&E.jsx("span",{className:"jer-brackets jer-bracket-open",style:t("bracket",J),children:yn.open})]}),!Ce&&or&&E.jsx("div",{className:"jer-collection-item-count"+(or?" jer-visible":" jer-hidden"),style:Object.assign(Object.assign({},t("itemCount",J)),{transition:Z}),children:ze===1?b("ITEM_SINGLE",Object.assign(Object.assign({},J),{size:1}),1):b("ITEMS_MULTIPLE",J,ze)}),E.jsx("div",{className:"jer-brackets"+(vn?" jer-visible":" jer-hidden"),style:Object.assign(Object.assign({},t("bracket",J)),{transition:Z}),children:yn.close}),ur]}):Ne?E.jsx(E.Fragment,{}):E.jsxs("div",{className:"jer-collection-header-row",style:{position:"relative"},children:[E.jsx(Kr,Object.assign({},dr)),ur]}),E.jsxs("div",{className:"jer-collection-inner",style:Object.assign(Object.assign({overflowY:vn||ae?"clip":"visible",maxHeight:Yt?void 0:ie},t("collectionInner",J)),{transition:Z}),ref:K,children:[gi,E.jsx("div",{className:Ce?"jer-collection-error-row":"jer-collection-error-row-edit",children:Ze&&E.jsx("span",{className:"jer-error-slug",style:t("error",J),children:Ze})}),!Ce&&ft&&E.jsx("div",{className:"jer-brackets jer-bracket-outside",style:Object.assign(Object.assign({},t("bracket",J)),{marginLeft:(M<3?-1:M<6?-.5:0)+"em"}),children:yn.close})]}),E.jsx(xt,{position:"below",nodeData:J})]}));return ge?E.jsx(ge,Object.assign({customNodeProps:me},cr,{children:xn})):xn},W1={ITEM_SINGLE:"{{count}} item",ITEMS_MULTIPLE:"{{count}} items",KEY_NEW:"Enter new key",KEY_SELECT:"Select key",NO_KEY_OPTIONS:"No key options",ERROR_KEY_EXISTS:"Key already exists",ERROR_INVALID_JSON:"Invalid JSON",ERROR_UPDATE:"Update unsuccessful",ERROR_DELETE:"Delete unsuccessful",ERROR_ADD:"Adding node unsuccessful",DEFAULT_STRING:"New data!",DEFAULT_NEW_KEY:"key",SHOW_LESS:"(Show less)",EMPTY_STRING:"<empty string>"},K1=(e,t)=>(n,r,i)=>((o,s,l,c,a)=>{if(s[c]){const f=s[c](l);if(f!==null)return f}const u=c in o?o[c]:W1[c];return a===void 0?u:u==null?void 0:u.replace("{{count}}",String(a))})(e,t,r,n,i);var Na=[],Pn=[];(function(e,t){if(e&&typeof document<"u"){var n,r=t.prepend===!0?"prepend":"append",i=t.singleTag===!0,o=typeof t.container=="string"?document.querySelector(t.container):document.getElementsByTagName("head")[0];if(i){var s=Na.indexOf(o);s===-1&&(s=Na.push(o)-1,Pn[s]={}),n=Pn[s]&&Pn[s][r]?Pn[s][r]:Pn[s][r]=l()}else n=l();e.charCodeAt(0)===65279&&(e=e.substring(1)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(document.createTextNode(e))}function l(){var c=document.createElement("style");if(c.setAttribute("type","text/css"),t.attributes)for(var a=Object.keys(t.attributes),u=0;u<a.length;u++)c.setAttribute(a[u],t.attributes[a[u]]);var f=r==="prepend"?"afterbegin":"beforeend";return o.insertAdjacentElement(f,c),c}})(':root{--jer-select-border:#b6b6b6;--jer-select-focus:#777;--jer-select-arrow:#777;--jer-form-border:1px solid #ededf0;--jer-form-border-focus:1px solid #e2e2e2;--jer-highlight-color:#b3d8ff}.jer-visible{opacity:1}.jer-hidden{opacity:0}.jer-select select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:none;color:#000;cursor:inherit;font-family:inherit;font-size:.8em;line-height:inherit;margin:0;outline:none;padding:0 1em 0 0;z-index:1}select::-ms-expand{display:none}.jer-select{align-items:center;background-color:#fff;background-image:linear-gradient(0deg,#f9f9f9,#fff 33%);border:1px solid var(--jer-select-border);border-radius:.25em;cursor:pointer;display:grid;grid-template-areas:"select";line-height:1.1;max-width:15ch;min-width:12ch;padding:.25em .5em;position:relative}.jer-select select,.jer-select:after{grid-area:select}.jer-select:not(.jer-select--multiple):after{background-color:var(--jer-select-arrow);clip-path:polygon(100% 0,0 0,50% 100%);content:"";height:.5em;justify-self:end;width:.8em}select:focus+.focus{border:1px solid var(--jer-select-focus);border-radius:inherit;bottom:-1px;left:-1px;position:absolute;right:-1px;top:-1px}.jer-select-inner{text-overflow:ellipsis;width:100%}.jer-editor-container{border-radius:.5em;font-size:16px;line-height:1;padding:1em 1em 1em 2em;position:relative;text-align:left}.jer-editor-container textarea{border:var(--jer-form-border);border-radius:.3em;color:var(--jer-input-color);outline:none}.jer-editor-container textarea:focus{border:var(--jer-form-border-focus)}.jer-editor-container input{border:var(--jer-form-border);border-radius:.3em;font-family:inherit;outline:none}.jer-editor-container input:focus{border:var(--jer-form-border-focus)}.jer-editor-container ::selection{background-color:var(--jer-highlight-color)}.jer-collection-header-row,.jer-value-main-row{align-items:center;display:flex;gap:.3em;min-height:1.7em}.jer-collection-header-row{display:flex;flex-wrap:wrap}.jer-collapse-icon{left:-1.2em;position:absolute;top:.35em}.jer-collection-inner{position:relative}.jer-collection-text-edit{align-items:flex-start;display:flex;flex-direction:column;gap:.3em;line-height:1.1em}.jer-collection-text-area{font-family:inherit;font-size:.85em;max-height:40em;overflow:hidden;padding:.2em .5em 0;resize:both}.jer-collection-input-button-row{display:flex;font-size:150%;justify-content:flex-end;margin-top:.4em;width:100%}.jer-collection-error-row{bottom:.5em;position:absolute}.jer-error-slug{margin-left:1em}.jer-value-component{position:relative}.jer-value-main-row{display:flex;gap:0}.jer-value-and-buttons{align-items:center;display:flex;justify-content:flex-start;padding-left:.5em}.jer-value-error-row{position:absolute}.jer-value-string{line-height:1.3em;overflow-wrap:anywhere;white-space:pre-wrap;word-break:break-word}.jer-string-expansion{cursor:pointer;filter:saturate(50%);opacity:.6}.jer-show-less{font-size:80%}.jer-hyperlink{text-decoration:underline}.jer-input-text{font-family:inherit;font-size:.9em;height:1.4em;line-height:1.2em;margin:0;min-width:6em;overflow:hidden;padding:.25em .5em .2em;resize:none}.jer-input-boolean{margin-left:.3em;margin-right:.3em;transform:scale(1.5)}.jer-key-text{line-height:1.1em;white-space:pre-wrap;word-break:break-word}.jer-key-edit{font-size:inherit;font-size:.9em;padding:0 .3em}.jer-value-invalid{font-style:italic;opacity:.5}.jer-input-number{font-size:90%;min-width:3em}.jer-confirm-buttons,.jer-edit-buttons{align-items:center;cursor:pointer;display:flex;height:1em}.jer-input-buttons{gap:.4em}.jer-edit-buttons{gap:.4em;margin-left:.5em;opacity:0}.jer-confirm-buttons{gap:.2em;margin-left:.4em}.jer-edit-buttons:hover{opacity:1;position:relative}.jer-collection-header-row:hover>.jer-edit-buttons,.jer-value-and-buttons:hover>.jer-edit-buttons,.jer-value-main-row:hover>.jer-edit-buttons{opacity:1}.jer-copy-pulse{position:relative;transition:.3s}.jer-copy-pulse:hover{opacity:.85;transform:scale(1.2);transition:.3s}.jer-copy-pulse:after{border-radius:50%;box-shadow:0 0 15px 5px var(--jer-icon-copy-color);content:"";display:block;height:100%;left:0;opacity:0;position:absolute;top:0;transition:all .5s;width:100%}.jer-copy-pulse:active:after{border-radius:4em;box-shadow:0 0 0 0 var(--jer-icon-copy-color);left:0;opacity:1;position:absolute;top:0;transition:0s}.jer-copy-pulse:active{top:.07em}.jer-rotate-90{transform:rotate(-90deg)}.jer-icon:hover{opacity:.85;transform:scale(1.2);transition:.3s}.jer-empty-string{font-size:90%;font-style:italic}.jer-drag-n-drop-padding{border:1px dashed #e0e0e0;border-radius:.3em;height:.5em}.jer-clickzone{height:calc(100% - .8em);left:-1em;position:absolute;top:1.2em}',{});const Z1=({data:e,setData:t,rootName:n="root",onUpdate:r=()=>{},onEdit:i=r,onDelete:o=r,onAdd:s=r,onChange:l,onError:c,showErrorMessages:a=!0,enableClipboard:u=!0,indent:f=2,collapse:d=!1,collapseAnimationTime:h=300,showCollectionCount:g=!0,restrictEdit:m=!1,restrictDelete:v=!1,restrictAdd:w=!1,restrictTypeSelection:C=!1,restrictDrag:y=!0,viewOnly:_,searchFilter:p,searchText:k,searchDebounceTime:S=350,keySort:N=!1,showArrayIndices:M=!0,showStringQuotes:H=!0,defaultValue:I=null,newKeyOptions:z,minWidth:O=250,maxWidth:b="min(600px, 90vw)",rootFontSize:R,stringTruncate:j=250,translations:D={},className:$,id:P,customText:x={},customNodeDefinitions:T=[],customButtons:L=[],jsonParse:V=JSON.parse,jsonStringify:B=(W,Q)=>JSON.stringify(W,Q,2),TextEditor:Y,errorMessageTimeout:F=2500,keyboardControls:X={},externalTriggers:q,insertAtTop:K=!1,onCollapse:ae,collapseClickZones:ie=["header","left"]})=>{const{getStyles:W}=ct(),{setCurrentlyEditingElement:Q}=Bt(),Z=A.useMemo(()=>In(d),[d]),le=A.useMemo(()=>K1(D,x),[D,x]),[J,fe]=A.useState(k),[be,ze]=(({setData:re,data:ne})=>{const[ce,pe]=A.useState(re?void 0:ne),ue=A.useCallback(he=>{re?re(he):pe(he)},[re]);return A.useEffect(()=>{re||pe(ne)},[ne]),[re?ne:ce,ue]})({setData:t,data:e}),je=A.useRef(null);A.useEffect(()=>{Q(null);const re=setTimeout(()=>fe(k),S);return()=>clearTimeout(re)},[k,S]);const He={key:n,path:[],level:0,index:0,value:be,size:typeof be=="object"&&be!==null?Object.keys(be).length:1,parentData:null,fullData:be},De=(re,ne)=>en(void 0,void 0,void 0,function*(){const ce=yield re(ne);if(ce===!0||ce===void 0)return void ze(ne.newData);const pe=J1(ce)?ce:["error",ce],[ue,he]=pe;if(ue==="error")return ze(ne.currentData),he===!1?le("ERROR_UPDATE",He):String(he);ze(he)}),Ye=A.useMemo(()=>In(m,_),[m,_]),Ze=A.useMemo(()=>In(v,_),[v,_]),Xe=A.useMemo(()=>In(w,_),[w,_]),Ee=A.useMemo(()=>In(y,_),[y,_]),Ve=A.useMemo(()=>Q1(p),[p]),Ue=A.useMemo(()=>(re=>{const ne=Object.assign({},Ea);for(const ce of Object.keys(Ea)){const pe=ce;if(re[pe]){const ue=re[pe],he=["clipboardModifier","collapseModifier"].includes(ce)?Array.isArray(ue)?ue:[ue]:typeof ue=="string"?{key:ue}:ue;ne[pe]=he,["stringConfirm","numberConfirm","booleanConfirm"].forEach(U=>{!re[U]&&re.confirm&&(ne[U]=ne.confirm)})}}return ne})(X),[X]),Pe=A.useCallback((re,ne)=>((ce,pe,ue)=>{const he=Object.entries(pe);for(const[U,ge]of he)if(_1(ue,ce[U],U)){ue.preventDefault(),ge();break}})(Ue,ne,re),[Ue]),nt=A.useMemo(()=>{const re=Ta(T,"stringifyReplacer");return ne=>B(ne,re)},[T,B]),Ge=A.useMemo(()=>{const re=Ta(T,"parseReviver");return ne=>{const ce=V(ne,re);return so(ce)}},[T,V]),Oe=A.useRef(null);((re,ne)=>{const{setCurrentlyEditingElement:ce,currentlyEditingElement:pe,setCollapseState:ue}=Bt();A.useEffect(()=>{if(!re)return;const{collapse:he,edit:U}=re;he&&ue(he);const ge=!(U!=null&&U.path)||qt(U.path)===pe;switch(U==null?void 0:U.action){case"accept":ge&&(ne.current&&ne.current.click(),ce(null));break;case"cancel":ge&&ce(null);break;default:U!=null&&U.path&&ce(U.path)}},[re])})(q,Oe);const xt=A.useCallback((re,ne)=>{N!==!1&&(typeof N!="function"?re.sort((ce,pe)=>{const ue=ne(ce)[0],he=ne(pe)[0];return ue<he?-1:ue>he?1:0}):re.sort((ce,pe)=>N(ne(ce),ne(pe))))},[N]),Ie=Xc(T,He),Ce={mainContainerRef:je,name:n,nodeData:He,onEdit:(re,ne)=>en(void 0,void 0,void 0,function*(){const{currentData:ce,newData:pe,currentValue:ue,newValue:he}=On(be,ne,re,"update");if(ue!==he)return yield De(i,{currentData:ce,newData:pe,currentValue:ue,newValue:he,name:ne.slice(-1)[0],path:ne})}),onDelete:(re,ne)=>en(void 0,void 0,void 0,function*(){const{currentData:ce,newData:pe,currentValue:ue,newValue:he}=On(be,ne,re,"delete");return yield De(o,{currentData:ce,newData:pe,currentValue:ue,newValue:he,name:ne.slice(-1)[0],path:ne})}),onAdd:(re,ne,ce)=>en(void 0,void 0,void 0,function*(){const{currentData:pe,newData:ue,currentValue:he,newValue:U}=On(be,ne,re,"add",ce);return yield De(s,{currentData:pe,newData:ue,currentValue:he,newValue:U,name:ne.slice(-1)[0],path:ne})}),onChange:l,onError:c,showErrorMessages:a,onMove:(re,ne,ce)=>en(void 0,void 0,void 0,function*(){if(re===null)return;const{currentData:pe,newData:ue,currentValue:he}=On(be,re,"","delete"),U=re.slice(-1)[0],ge=ne.slice(0,-1),me=ne.slice(-1)[0];let Ne=typeof me=="number"?ce==="above"?me:me+1:typeof U=="number"?`arr_${U}`:U;re.slice(0,-1).join(".")===ne.slice(0,-1).join(".")&&typeof U=="number"&&typeof Ne=="number"&&U<Ne&&(Ne-=1);const Ae=typeof Ne=="number"?{insert:!0}:ce==="above"?{insertBefore:me}:{insertAfter:me},{newData:Te,newValue:dt}=On(ue,[...ge,Ne],he,"add",Ae);return yield De(i,{currentData:pe,newData:Te,currentValue:he,newValue:dt,name:ne.slice(-1)[0],path:ne})}),showCollectionCount:g,collapseFilter:Z,collapseAnimationTime:h,restrictEditFilter:Ye,restrictDeleteFilter:Ze,restrictAddFilter:Xe,restrictTypeSelection:C,restrictDragFilter:Ee,canDragOnto:!1,searchFilter:Ve,searchText:J,enableClipboard:u,keySort:N,sort:xt,showArrayIndices:M,showStringQuotes:H,indent:f,defaultValue:I,newKeyOptions:z,stringTruncate:j,translate:le,customNodeDefinitions:T,customNodeData:Ie,customButtons:L,parentData:null,jsonParse:Ge,jsonStringify:nt,TextEditor:Y,errorMessageTimeout:F,handleKeyboard:Pe,keyboardControls:Ue,insertAtTop:{object:K===!0||K==="object",array:K===!0||K==="array"},onCollapse:ae,editConfirmRef:Oe,collapseClickZones:ie},ut=Object.assign(Object.assign({},W("container",He)),{minWidth:O,maxWidth:b});return ut.fontSize=R??ut.fontSize,E.jsx("div",{id:P,ref:je,className:`jer-editor-container ${$??""}`,style:ut,children:pn(be)&&!Ie.renderCollectionAsValue?E.jsx(Uc,Object.assign({data:be},Ce)):E.jsx(Yc,Object.assign({data:be,showLabel:!0},Ce))})},Ex=e=>{var t;const[n,r]=A.useState();return A.useEffect(()=>{const i=document.documentElement;r(i)},[]),n?E.jsx(S1,{theme:(t=e.theme)!==null&&t!==void 0?t:$o,icons:e.icons,docRoot:n,children:E.jsx(A1,{onEditEvent:e.onEditEvent,onCollapse:e.onCollapse,children:E.jsx(Z1,Object.assign({},e))})}):null},On=(e,t,n,r,i={})=>{if(t.length===0)return{currentData:e,newData:n,currentValue:e,newValue:n};const o=Object.assign({remove:r==="delete"},i),s=r!=="add"?hn(e,t):void 0;return{currentData:e,newData:v1(e,t,n,o),currentValue:s,newValue:r!=="delete"?n:void 0}},In=(e,t)=>t?()=>!0:typeof e=="boolean"?()=>e:typeof e=="number"?({level:n})=>n>=e:e,Q1=e=>{if(e!==void 0)return e==="value"?gn:e==="key"?_a:e==="all"?(t,n)=>gn(t,n)||_a(t,n):e},J1=e=>Array.isArray(e)&&e.length===2&&["error","value"].includes(e[0]),Ta=(e,t)=>{const n=t==="stringifyReplacer"?[r=>r===void 0?zc:r]:[];if(n.push(...e.map(r=>r[t]).filter(r=>!!r)),n.length!==0)return(r,i)=>{let o=i;for(const s of n)o=s(o);return o}};export{Xv as $,ov as A,av as B,hv as C,wv as D,bv as E,jv as F,ux as G,cv as H,$v as I,Pv as J,Lv as K,Hv as L,lv as M,Fv as N,zv as O,Uv as P,uv as Q,tv as R,tx as S,dx as T,Ov as U,lx as V,mx as W,gx as X,ax as Y,ex as Z,kv as _,ou as a,Gv as a0,Mv as a1,cx as a2,Vv as a3,Zv as a4,sv as a5,Yv as a6,Qv as a7,ix as a8,qv as a9,hx as aA,mn as aB,iu as aC,zl as aa,Gr as ab,te as ac,Bv as ad,Iv as ae,rx as af,sx as ag,yx as ah,vv as ai,px as aj,Fy as ak,wx as al,bx as am,Po as an,xx as ao,kx as ap,_x as aq,ui as ar,qr as as,ox as at,Dv as au,pv as av,Ex as aw,Jv as ax,Wv as ay,dv as az,nv as b,rv as c,Nv as d,Tv as e,Av as f,Sv as g,Ev as h,Cv as i,E as j,Aa as k,fv as l,gv as m,mv as n,xe as o,vx as p,bf as q,A as r,yv as s,_v as t,xv as u,Rv as v,iv as w,Kv as x,nx as y,fx as z};