likec4 1.7.0 → 1.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (992) hide show
  1. package/dist/__app__/src/chunks/{index-nxRBtTOQ.js → index-CsouX5P7.js} +26 -61
  2. package/dist/__app__/src/chunks/{likec4-DiOy4PZ9.js → likec4-5Tyb70uB.js} +319 -816
  3. package/dist/__app__/src/chunks/{mantine-u17mT9KZ.js → mantine-l9Camp3k.js} +336 -686
  4. package/dist/__app__/src/chunks/{tanstack-router-Cg36mbgZ.js → tanstack-router-BgNzIYOs.js} +61 -127
  5. package/dist/__app__/src/main.js +12352 -5
  6. package/dist/__app__/src/style.css +1 -1
  7. package/dist/__app__/tsconfig.tsbuildinfo +1 -1
  8. package/dist/cli/index.mjs +31 -31
  9. package/icons/all.js +2 -2
  10. package/icons/aws/activate.js +7 -7
  11. package/icons/aws/alexa-for-business.js +7 -7
  12. package/icons/aws/amplify.js +7 -7
  13. package/icons/aws/apache-mxnet-on-aws.js +7 -7
  14. package/icons/aws/api-gateway.js +7 -7
  15. package/icons/aws/app-config.js +7 -7
  16. package/icons/aws/app-flow.js +7 -7
  17. package/icons/aws/app-mesh.js +7 -7
  18. package/icons/aws/app-runner.js +7 -7
  19. package/icons/aws/app-stream.js +7 -7
  20. package/icons/aws/app-sync.js +7 -7
  21. package/icons/aws/application-auto-scaling.js +7 -7
  22. package/icons/aws/application-composer.js +7 -7
  23. package/icons/aws/application-cost-profiler.js +7 -7
  24. package/icons/aws/application-discovery-service.js +7 -7
  25. package/icons/aws/application-migration-service.js +7 -7
  26. package/icons/aws/artifact.js +7 -7
  27. package/icons/aws/athena.js +7 -7
  28. package/icons/aws/audit-manager.js +7 -7
  29. package/icons/aws/augmented-ai-a2i.js +7 -7
  30. package/icons/aws/aurora.js +7 -7
  31. package/icons/aws/auto-scaling.js +7 -7
  32. package/icons/aws/backint-agent.js +7 -7
  33. package/icons/aws/backup.js +7 -7
  34. package/icons/aws/batch.js +7 -7
  35. package/icons/aws/billing-conductor.js +7 -7
  36. package/icons/aws/bottlerocket.js +7 -7
  37. package/icons/aws/braket.js +7 -7
  38. package/icons/aws/budgets.js +7 -7
  39. package/icons/aws/certificate-manager.js +7 -7
  40. package/icons/aws/chatbot.js +7 -7
  41. package/icons/aws/chime-sdk.js +7 -7
  42. package/icons/aws/chime-voice-connector.js +7 -7
  43. package/icons/aws/chime.js +7 -7
  44. package/icons/aws/clean-rooms.js +7 -7
  45. package/icons/aws/client-vpn.js +7 -7
  46. package/icons/aws/cloud-control-api.js +7 -7
  47. package/icons/aws/cloud-development-kit.js +7 -7
  48. package/icons/aws/cloud-directory.js +7 -7
  49. package/icons/aws/cloud-formation.js +7 -7
  50. package/icons/aws/cloud-front.js +7 -7
  51. package/icons/aws/cloud-hsm.js +7 -7
  52. package/icons/aws/cloud-map.js +7 -7
  53. package/icons/aws/cloud-search.js +7 -7
  54. package/icons/aws/cloud-shell.js +7 -7
  55. package/icons/aws/cloud-trail.js +7 -7
  56. package/icons/aws/cloud-wan.js +7 -7
  57. package/icons/aws/cloud-watch.js +7 -7
  58. package/icons/aws/cloud9.js +7 -7
  59. package/icons/aws/code-artifact.js +7 -7
  60. package/icons/aws/code-build.js +7 -7
  61. package/icons/aws/code-catalyst.js +7 -7
  62. package/icons/aws/code-commit.js +7 -7
  63. package/icons/aws/code-deploy.js +7 -7
  64. package/icons/aws/code-guru.js +7 -7
  65. package/icons/aws/code-pipeline.js +7 -7
  66. package/icons/aws/code-star.js +7 -7
  67. package/icons/aws/code-whisperer.js +7 -7
  68. package/icons/aws/cognito.js +7 -7
  69. package/icons/aws/command-line-interface.js +7 -7
  70. package/icons/aws/comprehend-medical.js +7 -7
  71. package/icons/aws/comprehend.js +7 -7
  72. package/icons/aws/compute-optimizer.js +7 -7
  73. package/icons/aws/config.js +7 -7
  74. package/icons/aws/connect.js +7 -7
  75. package/icons/aws/console-mobile-application.js +7 -7
  76. package/icons/aws/control-tower.js +7 -7
  77. package/icons/aws/corretto.js +7 -7
  78. package/icons/aws/cost-and-usage-report.js +7 -7
  79. package/icons/aws/cost-explorer.js +7 -7
  80. package/icons/aws/data-exchange.js +7 -7
  81. package/icons/aws/data-pipeline.js +7 -7
  82. package/icons/aws/data-sync.js +7 -7
  83. package/icons/aws/data-zone.js +7 -7
  84. package/icons/aws/database-migration-service.js +7 -7
  85. package/icons/aws/deep-composer.js +7 -7
  86. package/icons/aws/deep-learning-amis.js +7 -7
  87. package/icons/aws/deep-learning-containers.js +7 -7
  88. package/icons/aws/deep-lens.js +7 -7
  89. package/icons/aws/deep-racer.js +7 -7
  90. package/icons/aws/detective.js +7 -7
  91. package/icons/aws/dev-ops-guru.js +7 -7
  92. package/icons/aws/device-farm.js +7 -7
  93. package/icons/aws/direct-connect.js +7 -7
  94. package/icons/aws/directory-service.js +7 -7
  95. package/icons/aws/distro-for-open-telemetry.js +7 -7
  96. package/icons/aws/document-db.js +7 -7
  97. package/icons/aws/dynamo-db.js +7 -7
  98. package/icons/aws/ec2-auto-scaling.js +7 -7
  99. package/icons/aws/ec2-image-builder.js +7 -7
  100. package/icons/aws/ec2.js +7 -7
  101. package/icons/aws/ecs-anywhere.js +7 -7
  102. package/icons/aws/efs.js +7 -7
  103. package/icons/aws/eks-anywhere.js +7 -7
  104. package/icons/aws/eks-cloud.js +7 -7
  105. package/icons/aws/eks-distro.js +7 -7
  106. package/icons/aws/elasti-cache.js +7 -7
  107. package/icons/aws/elastic-beanstalk.js +7 -7
  108. package/icons/aws/elastic-block-store.js +7 -7
  109. package/icons/aws/elastic-container-registry.js +7 -7
  110. package/icons/aws/elastic-container-service.js +7 -7
  111. package/icons/aws/elastic-disaster-recovery.js +7 -7
  112. package/icons/aws/elastic-fabric-adapter.js +7 -7
  113. package/icons/aws/elastic-inference.js +7 -7
  114. package/icons/aws/elastic-kubernetes-service.js +7 -7
  115. package/icons/aws/elastic-load-balancing.js +7 -7
  116. package/icons/aws/elastic-transcoder.js +7 -7
  117. package/icons/aws/elemental-appliances-software.js +7 -7
  118. package/icons/aws/elemental-conductor.js +7 -7
  119. package/icons/aws/elemental-delta.js +7 -7
  120. package/icons/aws/elemental-link.js +7 -7
  121. package/icons/aws/elemental-live.js +7 -7
  122. package/icons/aws/elemental-media-connect.js +7 -7
  123. package/icons/aws/elemental-media-convert.js +7 -7
  124. package/icons/aws/elemental-media-live.js +7 -7
  125. package/icons/aws/elemental-media-package.js +7 -7
  126. package/icons/aws/elemental-media-store.js +7 -7
  127. package/icons/aws/elemental-media-tailor.js +7 -7
  128. package/icons/aws/elemental-server.js +7 -7
  129. package/icons/aws/emr.js +7 -7
  130. package/icons/aws/event-bridge.js +7 -7
  131. package/icons/aws/express-workflows.js +7 -7
  132. package/icons/aws/fargate.js +7 -7
  133. package/icons/aws/fault-injection-simulator.js +7 -7
  134. package/icons/aws/file-cache.js +7 -7
  135. package/icons/aws/fin-space.js +7 -7
  136. package/icons/aws/firewall-manager.js +7 -7
  137. package/icons/aws/forecast.js +7 -7
  138. package/icons/aws/fraud-detector.js +7 -7
  139. package/icons/aws/free-rtos.js +7 -7
  140. package/icons/aws/fsx-for-lustre.js +7 -7
  141. package/icons/aws/fsx-for-net-app-ontap.js +7 -7
  142. package/icons/aws/fsx-for-open-zfs.js +7 -7
  143. package/icons/aws/fsx-for-wfs.js +7 -7
  144. package/icons/aws/fsx.js +7 -7
  145. package/icons/aws/game-kit.js +7 -7
  146. package/icons/aws/game-lift.js +7 -7
  147. package/icons/aws/game-sparks.js +7 -7
  148. package/icons/aws/genomics-cli.js +7 -7
  149. package/icons/aws/global-accelerator.js +7 -7
  150. package/icons/aws/glue-data-brew.js +7 -7
  151. package/icons/aws/glue-elastic-views.js +7 -7
  152. package/icons/aws/glue.js +7 -7
  153. package/icons/aws/ground-station.js +7 -7
  154. package/icons/aws/guard-duty.js +7 -7
  155. package/icons/aws/health-lake.js +7 -7
  156. package/icons/aws/honeycode.js +7 -7
  157. package/icons/aws/iam-identity-center.js +7 -7
  158. package/icons/aws/identity-and-access-management.js +7 -7
  159. package/icons/aws/inspector.js +7 -7
  160. package/icons/aws/interactive-video-service.js +7 -7
  161. package/icons/aws/io-t-1-click.js +7 -7
  162. package/icons/aws/io-t-analytics.js +7 -7
  163. package/icons/aws/io-t-button.js +7 -7
  164. package/icons/aws/io-t-core.js +7 -7
  165. package/icons/aws/io-t-device-defender.js +7 -7
  166. package/icons/aws/io-t-device-management.js +7 -7
  167. package/icons/aws/io-t-edu-kit.js +7 -7
  168. package/icons/aws/io-t-events.js +7 -7
  169. package/icons/aws/io-t-express-link.js +7 -7
  170. package/icons/aws/io-t-fleet-wise.js +7 -7
  171. package/icons/aws/io-t-greengrass.js +7 -7
  172. package/icons/aws/io-t-robo-runner.js +7 -7
  173. package/icons/aws/io-t-site-wise.js +7 -7
  174. package/icons/aws/io-t-things-graph.js +7 -7
  175. package/icons/aws/io-t-twin-maker.js +6 -6
  176. package/icons/aws/iq.js +7 -7
  177. package/icons/aws/kendra.js +7 -7
  178. package/icons/aws/key-management-service.js +7 -7
  179. package/icons/aws/keyspaces.js +7 -7
  180. package/icons/aws/kinesis-data-analytics.js +7 -7
  181. package/icons/aws/kinesis-data-streams.js +7 -7
  182. package/icons/aws/kinesis-firehose.js +7 -7
  183. package/icons/aws/kinesis-video-streams.js +7 -7
  184. package/icons/aws/kinesis.js +7 -7
  185. package/icons/aws/lake-formation.js +7 -7
  186. package/icons/aws/lambda.js +7 -7
  187. package/icons/aws/launch-wizard.js +7 -7
  188. package/icons/aws/lex.js +7 -7
  189. package/icons/aws/license-manager.js +7 -7
  190. package/icons/aws/lightsail.js +7 -7
  191. package/icons/aws/local-zones.js +7 -7
  192. package/icons/aws/location-service.js +7 -7
  193. package/icons/aws/lookout-for-equipment.js +7 -7
  194. package/icons/aws/lookout-for-metrics.js +7 -7
  195. package/icons/aws/lookout-for-vision.js +7 -7
  196. package/icons/aws/lumberyard.js +7 -7
  197. package/icons/aws/macie.js +7 -7
  198. package/icons/aws/mainframe-modernization.js +7 -7
  199. package/icons/aws/managed-blockchain.js +7 -7
  200. package/icons/aws/managed-grafana.js +7 -7
  201. package/icons/aws/managed-service-for-prometheus.js +7 -7
  202. package/icons/aws/managed-services.js +7 -7
  203. package/icons/aws/managed-streaming-for-apache-kafka.js +7 -7
  204. package/icons/aws/managed-workflows-for-apache-airflow.js +7 -7
  205. package/icons/aws/management-console.js +7 -7
  206. package/icons/aws/marketplace-dark.js +3 -3
  207. package/icons/aws/marketplace-light.js +3 -3
  208. package/icons/aws/memory-db-for-redis.js +7 -7
  209. package/icons/aws/migration-evaluator.js +7 -7
  210. package/icons/aws/migration-hub.js +7 -7
  211. package/icons/aws/monitron.js +7 -7
  212. package/icons/aws/mq.js +7 -7
  213. package/icons/aws/neptune.js +7 -7
  214. package/icons/aws/network-firewall.js +7 -7
  215. package/icons/aws/neuron.js +7 -7
  216. package/icons/aws/nice-dcv.js +7 -7
  217. package/icons/aws/nice-engin-frame.js +7 -7
  218. package/icons/aws/nimble-studio.js +7 -7
  219. package/icons/aws/nitro-enclaves.js +7 -7
  220. package/icons/aws/omics.js +7 -7
  221. package/icons/aws/open-3d-engine.js +7 -7
  222. package/icons/aws/open-search-service.js +7 -7
  223. package/icons/aws/ops-works.js +7 -7
  224. package/icons/aws/organizations.js +7 -7
  225. package/icons/aws/outposts-family.js +7 -7
  226. package/icons/aws/outposts-rack.js +7 -7
  227. package/icons/aws/outposts-servers.js +7 -7
  228. package/icons/aws/panorama.js +7 -7
  229. package/icons/aws/parallel-cluster.js +7 -7
  230. package/icons/aws/personal-health-dashboard.js +7 -7
  231. package/icons/aws/personalize.js +7 -7
  232. package/icons/aws/pinpoint-apis.js +7 -7
  233. package/icons/aws/pinpoint.js +7 -7
  234. package/icons/aws/polly.js +7 -7
  235. package/icons/aws/private-5g.js +7 -7
  236. package/icons/aws/private-certificate-authority.js +9 -9
  237. package/icons/aws/private-link.js +7 -7
  238. package/icons/aws/professional-services.js +7 -7
  239. package/icons/aws/proton.js +7 -7
  240. package/icons/aws/quantum-ledger-database.js +7 -7
  241. package/icons/aws/quick-sight.js +7 -7
  242. package/icons/aws/rds-on-vmware.js +7 -7
  243. package/icons/aws/rds.js +7 -7
  244. package/icons/aws/re-post.js +7 -7
  245. package/icons/aws/red-hat-open-shift-service-on-aws.js +7 -7
  246. package/icons/aws/redshift.js +7 -7
  247. package/icons/aws/rekognition.js +7 -7
  248. package/icons/aws/reserved-instance-reporting.js +7 -7
  249. package/icons/aws/resilience-hub.js +7 -7
  250. package/icons/aws/resource-access-manager.js +7 -7
  251. package/icons/aws/resource-explorer.js +7 -7
  252. package/icons/aws/robo-maker.js +7 -7
  253. package/icons/aws/route-53.js +7 -7
  254. package/icons/aws/s3-on-outposts.js +7 -7
  255. package/icons/aws/sage-maker-ground-truth.js +7 -7
  256. package/icons/aws/sage-maker-studio-lab.js +7 -7
  257. package/icons/aws/sage-maker.js +7 -7
  258. package/icons/aws/savings-plans.js +7 -7
  259. package/icons/aws/secrets-manager.js +7 -7
  260. package/icons/aws/security-hub.js +7 -7
  261. package/icons/aws/security-lake.js +7 -7
  262. package/icons/aws/server-migration-service.js +7 -7
  263. package/icons/aws/serverless-application-repository.js +7 -7
  264. package/icons/aws/service-catalog.js +7 -7
  265. package/icons/aws/service-management-connector.js +9 -9
  266. package/icons/aws/shield.js +7 -7
  267. package/icons/aws/signer.js +7 -7
  268. package/icons/aws/sim-space-weaver.js +7 -7
  269. package/icons/aws/simple-email-service.js +7 -7
  270. package/icons/aws/simple-notification-service.js +7 -7
  271. package/icons/aws/simple-queue-service.js +7 -7
  272. package/icons/aws/simple-storage-service-glacier.js +7 -7
  273. package/icons/aws/simple-storage-service.js +7 -7
  274. package/icons/aws/site-to-site-vpn.js +7 -7
  275. package/icons/aws/snowball-edge.js +7 -7
  276. package/icons/aws/snowball.js +7 -7
  277. package/icons/aws/snowcone.js +7 -7
  278. package/icons/aws/snowmobile.js +7 -7
  279. package/icons/aws/step-functions.js +7 -7
  280. package/icons/aws/storage-gateway.js +7 -7
  281. package/icons/aws/sumerian.js +7 -7
  282. package/icons/aws/supply-chain.js +7 -7
  283. package/icons/aws/support.js +7 -7
  284. package/icons/aws/systems-manager.js +7 -7
  285. package/icons/aws/tensor-flow-on-aws.js +7 -7
  286. package/icons/aws/textract.js +7 -7
  287. package/icons/aws/thinkbox-deadline.js +7 -7
  288. package/icons/aws/thinkbox-frost.js +7 -7
  289. package/icons/aws/thinkbox-krakatoa.js +7 -7
  290. package/icons/aws/thinkbox-sequoia.js +7 -7
  291. package/icons/aws/thinkbox-stoke.js +7 -7
  292. package/icons/aws/thinkbox-xmesh.js +7 -7
  293. package/icons/aws/timestream.js +7 -7
  294. package/icons/aws/tools-and-sdks.js +7 -7
  295. package/icons/aws/torch-serve.js +7 -7
  296. package/icons/aws/training-certification.js +7 -7
  297. package/icons/aws/transcribe.js +7 -7
  298. package/icons/aws/transfer-family.js +7 -7
  299. package/icons/aws/transit-gateway.js +7 -7
  300. package/icons/aws/translate.js +7 -7
  301. package/icons/aws/trusted-advisor.js +7 -7
  302. package/icons/aws/verified-access.js +7 -7
  303. package/icons/aws/verified-permissions.js +7 -7
  304. package/icons/aws/virtual-private-cloud.js +7 -7
  305. package/icons/aws/vmware-cloud-on-aws.js +7 -7
  306. package/icons/aws/vpc-lattice.js +7 -7
  307. package/icons/aws/waf.js +7 -7
  308. package/icons/aws/wavelength.js +7 -7
  309. package/icons/aws/well-architected-tool.js +7 -7
  310. package/icons/aws/wickr.js +7 -7
  311. package/icons/aws/work-docs-sdk.js +7 -7
  312. package/icons/aws/work-docs.js +7 -7
  313. package/icons/aws/work-link.js +7 -7
  314. package/icons/aws/work-mail.js +7 -7
  315. package/icons/aws/work-spaces-family.js +7 -7
  316. package/icons/aws/x-ray.js +7 -7
  317. package/icons/gcp/access-context-manager.js +4 -4
  318. package/icons/gcp/administration.js +10 -10
  319. package/icons/gcp/advanced-agent-modeling.js +6 -6
  320. package/icons/gcp/advanced-solutions-lab.js +29 -29
  321. package/icons/gcp/agent-assist.js +1 -1
  322. package/icons/gcp/ai-hub.js +10 -10
  323. package/icons/gcp/ai-platform-unified.js +8 -8
  324. package/icons/gcp/ai-platform.js +3 -3
  325. package/icons/gcp/analytics-hub.js +4 -4
  326. package/icons/gcp/anthos-config-management.js +4 -4
  327. package/icons/gcp/anthos-service-mesh.js +1 -1
  328. package/icons/gcp/anthos.js +5 -5
  329. package/icons/gcp/api-analytics.js +7 -7
  330. package/icons/gcp/api-monetization.js +10 -10
  331. package/icons/gcp/api.js +5 -5
  332. package/icons/gcp/apigee-api-platform.js +6 -6
  333. package/icons/gcp/apigee-sense.js +4 -4
  334. package/icons/gcp/app-engine.js +7 -7
  335. package/icons/gcp/artifact-registry.js +15 -15
  336. package/icons/gcp/asset-inventory.js +6 -6
  337. package/icons/gcp/assured-workloads.js +8 -8
  338. package/icons/gcp/auto-ml-natural-language.js +3 -3
  339. package/icons/gcp/auto-ml-tables.js +6 -6
  340. package/icons/gcp/auto-ml-translation.js +6 -6
  341. package/icons/gcp/auto-ml-video-intelligence.js +6 -6
  342. package/icons/gcp/auto-ml-vision.js +5 -5
  343. package/icons/gcp/auto-ml.js +7 -7
  344. package/icons/gcp/bare-metal-solutions.js +4 -4
  345. package/icons/gcp/batch.js +1 -1
  346. package/icons/gcp/beyondcorp.js +1 -1
  347. package/icons/gcp/big-query.js +8 -8
  348. package/icons/gcp/bigtable.js +19 -19
  349. package/icons/gcp/billing.js +10 -10
  350. package/icons/gcp/binary-authorization.js +4 -4
  351. package/icons/gcp/catalog.js +6 -6
  352. package/icons/gcp/certificate-authority-service.js +4 -4
  353. package/icons/gcp/certificate-manager.js +4 -4
  354. package/icons/gcp/cloud-api-gateway.js +1 -1
  355. package/icons/gcp/cloud-apis.js +11 -11
  356. package/icons/gcp/cloud-armor.js +8 -8
  357. package/icons/gcp/cloud-asset-inventory.js +4 -4
  358. package/icons/gcp/cloud-audit-logs.js +11 -11
  359. package/icons/gcp/cloud-build.js +6 -6
  360. package/icons/gcp/cloud-cdn.js +15 -15
  361. package/icons/gcp/cloud-code.js +9 -9
  362. package/icons/gcp/cloud-composer.js +6 -6
  363. package/icons/gcp/cloud-data-fusion.js +8 -8
  364. package/icons/gcp/cloud-deploy.js +4 -4
  365. package/icons/gcp/cloud-deployment-manager.js +11 -11
  366. package/icons/gcp/cloud-dns.js +13 -13
  367. package/icons/gcp/cloud-domains.js +6 -6
  368. package/icons/gcp/cloud-ekm.js +1 -1
  369. package/icons/gcp/cloud-endpoints.js +10 -10
  370. package/icons/gcp/cloud-external-ip-addresses.js +3 -3
  371. package/icons/gcp/cloud-firewall-rules.js +3 -3
  372. package/icons/gcp/cloud-for-marketing.js +1 -1
  373. package/icons/gcp/cloud-functions.js +16 -16
  374. package/icons/gcp/cloud-generic.js +1 -1
  375. package/icons/gcp/cloud-gpu.js +5 -5
  376. package/icons/gcp/cloud-healthcare-api.js +12 -12
  377. package/icons/gcp/cloud-healthcare-marketplace.js +4 -4
  378. package/icons/gcp/cloud-hsm.js +7 -7
  379. package/icons/gcp/cloud-ids.js +6 -6
  380. package/icons/gcp/cloud-inference-api.js +9 -9
  381. package/icons/gcp/cloud-interconnect.js +8 -8
  382. package/icons/gcp/cloud-jobs-api.js +9 -9
  383. package/icons/gcp/cloud-load-balancing.js +13 -13
  384. package/icons/gcp/cloud-logging.js +11 -11
  385. package/icons/gcp/cloud-media-edge.js +17 -17
  386. package/icons/gcp/cloud-monitoring.js +7 -7
  387. package/icons/gcp/cloud-nat.js +6 -6
  388. package/icons/gcp/cloud-natural-language-api.js +10 -10
  389. package/icons/gcp/cloud-network.js +10 -10
  390. package/icons/gcp/cloud-ops.js +8 -8
  391. package/icons/gcp/cloud-optimization-ai-fleet-routing-api.js +4 -4
  392. package/icons/gcp/cloud-optimization-ai.js +4 -4
  393. package/icons/gcp/cloud-router.js +1 -1
  394. package/icons/gcp/cloud-routes.js +5 -5
  395. package/icons/gcp/cloud-run-for-anthos.js +3 -3
  396. package/icons/gcp/cloud-run.js +6 -6
  397. package/icons/gcp/cloud-scheduler.js +10 -10
  398. package/icons/gcp/cloud-security-scanner.js +9 -9
  399. package/icons/gcp/cloud-shell.js +4 -4
  400. package/icons/gcp/cloud-spanner.js +8 -8
  401. package/icons/gcp/cloud-sql.js +9 -9
  402. package/icons/gcp/cloud-storage.js +15 -15
  403. package/icons/gcp/cloud-tasks.js +18 -18
  404. package/icons/gcp/cloud-test-lab.js +8 -8
  405. package/icons/gcp/cloud-tpu.js +19 -19
  406. package/icons/gcp/cloud-translation-api.js +3 -3
  407. package/icons/gcp/cloud-vision-api.js +9 -9
  408. package/icons/gcp/cloud-vpn.js +10 -10
  409. package/icons/gcp/compute-engine.js +10 -10
  410. package/icons/gcp/configuration-management.js +4 -4
  411. package/icons/gcp/connectivity-test.js +1 -1
  412. package/icons/gcp/connectors.js +7 -7
  413. package/icons/gcp/contact-center-ai.js +1 -1
  414. package/icons/gcp/container-optimized-os.js +1 -1
  415. package/icons/gcp/container-registry.js +20 -20
  416. package/icons/gcp/data-catalog.js +6 -6
  417. package/icons/gcp/data-labeling.js +12 -12
  418. package/icons/gcp/data-layers.js +5 -5
  419. package/icons/gcp/data-loss-prevention-api.js +11 -11
  420. package/icons/gcp/data-qn-a.js +6 -6
  421. package/icons/gcp/data-studio.js +9 -9
  422. package/icons/gcp/data-transfer.js +5 -5
  423. package/icons/gcp/database-migration-service.js +4 -4
  424. package/icons/gcp/dataflow.js +13 -13
  425. package/icons/gcp/datalab.js +1 -1
  426. package/icons/gcp/dataplex.js +3 -3
  427. package/icons/gcp/datapol.js +14 -14
  428. package/icons/gcp/dataprep.js +6 -6
  429. package/icons/gcp/dataproc-metastore.js +1 -1
  430. package/icons/gcp/dataproc.js +12 -12
  431. package/icons/gcp/datashare.js +6 -6
  432. package/icons/gcp/datastore.js +32 -32
  433. package/icons/gcp/datastream.js +10 -10
  434. package/icons/gcp/debugger.js +7 -7
  435. package/icons/gcp/developer-portal.js +5 -5
  436. package/icons/gcp/dialogflow-cx.js +4 -4
  437. package/icons/gcp/dialogflow-insights.js +8 -8
  438. package/icons/gcp/dialogflow.js +3 -3
  439. package/icons/gcp/document-ai.js +8 -8
  440. package/icons/gcp/early-access-center.js +1 -1
  441. package/icons/gcp/error-reporting.js +7 -7
  442. package/icons/gcp/eventarc.js +5 -5
  443. package/icons/gcp/filestore.js +7 -7
  444. package/icons/gcp/financial-services-marketplace.js +9 -9
  445. package/icons/gcp/firestore.js +7 -7
  446. package/icons/gcp/fleet-engine.js +4 -4
  447. package/icons/gcp/free-trial.js +8 -8
  448. package/icons/gcp/game-servers.js +14 -14
  449. package/icons/gcp/gce-systems-management.js +1 -1
  450. package/icons/gcp/genomics.js +16 -16
  451. package/icons/gcp/gke-on-prem.js +6 -6
  452. package/icons/gcp/google-cloud-marketplace.js +8 -8
  453. package/icons/gcp/google-kubernetes-engine.js +10 -10
  454. package/icons/gcp/google-maps-platform.js +6 -6
  455. package/icons/gcp/healthcare-nlp-api.js +1 -1
  456. package/icons/gcp/home.js +7 -7
  457. package/icons/gcp/identity-and-access-management.js +3 -3
  458. package/icons/gcp/identity-aware-proxy.js +7 -7
  459. package/icons/gcp/identity-platform.js +7 -7
  460. package/icons/gcp/iot-core.js +3 -3
  461. package/icons/gcp/iot-edge.js +35 -35
  462. package/icons/gcp/key-access-justifications.js +11 -11
  463. package/icons/gcp/key-management-service.js +3 -3
  464. package/icons/gcp/kuberun.js +5 -5
  465. package/icons/gcp/launcher.js +11 -11
  466. package/icons/gcp/local-ssd.js +1 -1
  467. package/icons/gcp/looker.js +5 -5
  468. package/icons/gcp/managed-service-for-microsoft-active-directory.js +9 -9
  469. package/icons/gcp/media-translation-api.js +4 -4
  470. package/icons/gcp/memorystore.js +7 -7
  471. package/icons/gcp/migrate-for-anthos.js +1 -1
  472. package/icons/gcp/migrate-for-compute-engine.js +1 -1
  473. package/icons/gcp/my-cloud.js +6 -6
  474. package/icons/gcp/network-connectivity-center.js +23 -23
  475. package/icons/gcp/network-intelligence-center.js +1 -1
  476. package/icons/gcp/network-security.js +7 -7
  477. package/icons/gcp/network-tiers.js +10 -10
  478. package/icons/gcp/network-topology.js +1 -1
  479. package/icons/gcp/onboarding.js +8 -8
  480. package/icons/gcp/os-configuration-management.js +1 -1
  481. package/icons/gcp/os-inventory-management.js +3 -3
  482. package/icons/gcp/os-patch-management.js +1 -1
  483. package/icons/gcp/partner-interconnect.js +8 -8
  484. package/icons/gcp/partner-portal.js +4 -4
  485. package/icons/gcp/performance-dashboard.js +1 -1
  486. package/icons/gcp/permissions.js +5 -5
  487. package/icons/gcp/persistent-disk.js +4 -4
  488. package/icons/gcp/phishing-protection.js +10 -10
  489. package/icons/gcp/policy-analyzer.js +1 -1
  490. package/icons/gcp/premium-network-tier.js +6 -6
  491. package/icons/gcp/private-connectivity.js +6 -6
  492. package/icons/gcp/private-service-connect.js +9 -9
  493. package/icons/gcp/producer-portal.js +5 -5
  494. package/icons/gcp/profiler.js +8 -8
  495. package/icons/gcp/project.js +11 -11
  496. package/icons/gcp/pub-sub.js +19 -19
  497. package/icons/gcp/quantum-engine.js +7 -7
  498. package/icons/gcp/quotas.js +12 -12
  499. package/icons/gcp/real-world-insights.js +6 -6
  500. package/icons/gcp/recommendations-ai.js +16 -16
  501. package/icons/gcp/release-notes.js +1 -1
  502. package/icons/gcp/retail-api.js +4 -4
  503. package/icons/gcp/risk-manager.js +1 -1
  504. package/icons/gcp/runtime-config.js +12 -12
  505. package/icons/gcp/secret-manager.js +1 -1
  506. package/icons/gcp/security-command-center.js +5 -5
  507. package/icons/gcp/security-health-advisor.js +11 -11
  508. package/icons/gcp/security-key-enforcement.js +3 -3
  509. package/icons/gcp/security.js +4 -4
  510. package/icons/gcp/service-discovery.js +13 -13
  511. package/icons/gcp/speech-to-text.js +14 -14
  512. package/icons/gcp/stackdriver.js +4 -4
  513. package/icons/gcp/standard-network-tier.js +1 -1
  514. package/icons/gcp/stream-suite.js +4 -4
  515. package/icons/gcp/support.js +5 -5
  516. package/icons/gcp/tensorflow-enterprise.js +1 -1
  517. package/icons/gcp/text-to-speech.js +5 -5
  518. package/icons/gcp/tools-for-powershell.js +10 -10
  519. package/icons/gcp/trace.js +9 -9
  520. package/icons/gcp/traffic-director.js +11 -11
  521. package/icons/gcp/transfer-appliance.js +7 -7
  522. package/icons/gcp/transfer.js +1 -1
  523. package/icons/gcp/user-preferences.js +5 -5
  524. package/icons/gcp/vertex-ai.js +24 -24
  525. package/icons/gcp/video-intelligence-api.js +3 -3
  526. package/icons/gcp/virtual-private-cloud.js +12 -12
  527. package/icons/gcp/visual-inspection.js +4 -4
  528. package/icons/gcp/vmware-engine.js +1 -1
  529. package/icons/gcp/web-risk.js +11 -11
  530. package/icons/gcp/web-security-scanner.js +8 -8
  531. package/icons/gcp/workflows.js +12 -12
  532. package/icons/gcp/workload-identity-pool.js +5 -5
  533. package/icons/tech/aarch64.js +7 -7
  534. package/icons/tech/adobe-illustrator.js +1 -1
  535. package/icons/tech/adobe-photoshop.js +1 -1
  536. package/icons/tech/adobe-premiere-pro.js +4 -4
  537. package/icons/tech/adobe-xd.js +1 -1
  538. package/icons/tech/adonis-js.js +1 -1
  539. package/icons/tech/after-effects.js +4 -4
  540. package/icons/tech/airflow.js +10 -10
  541. package/icons/tech/akka.js +3 -3
  542. package/icons/tech/algolia.js +1 -1
  543. package/icons/tech/alpine-js.js +3 -3
  544. package/icons/tech/amazon-web-services.js +3 -3
  545. package/icons/tech/anaconda.js +1 -1
  546. package/icons/tech/android-studio.js +8 -8
  547. package/icons/tech/android.js +5 -5
  548. package/icons/tech/angular-js.js +6 -6
  549. package/icons/tech/angular.js +4 -4
  550. package/icons/tech/ansible.js +3 -3
  551. package/icons/tech/ant-design.js +21 -21
  552. package/icons/tech/apache.js +71 -71
  553. package/icons/tech/apl.js +3 -3
  554. package/icons/tech/appcelerator.js +1 -1
  555. package/icons/tech/apple-safari.js +10 -10
  556. package/icons/tech/apple.js +1 -1
  557. package/icons/tech/appwrite.js +3 -3
  558. package/icons/tech/arch-linux.js +3 -3
  559. package/icons/tech/arduino.js +3 -3
  560. package/icons/tech/argo-cd.js +31 -31
  561. package/icons/tech/astro.js +11 -11
  562. package/icons/tech/atom.js +1 -1
  563. package/icons/tech/autodesk-maya.js +41 -41
  564. package/icons/tech/autodesk-shot-grid.js +3 -3
  565. package/icons/tech/awk.js +15 -15
  566. package/icons/tech/azios.js +1 -1
  567. package/icons/tech/azure-devops.js +8 -8
  568. package/icons/tech/azure-sql-database.js +19 -19
  569. package/icons/tech/azure.js +18 -18
  570. package/icons/tech/babel.js +3 -3
  571. package/icons/tech/backbone-js.js +4 -4
  572. package/icons/tech/ballerina.js +1 -1
  573. package/icons/tech/bamboo.js +11 -11
  574. package/icons/tech/bash.js +4 -4
  575. package/icons/tech/behance.js +6 -6
  576. package/icons/tech/bitbucket.js +6 -6
  577. package/icons/tech/blender.js +3 -3
  578. package/icons/tech/bootstrap.js +18 -18
  579. package/icons/tech/bower.js +15 -15
  580. package/icons/tech/browserstack.js +11 -11
  581. package/icons/tech/bulma.js +1 -1
  582. package/icons/tech/bun.js +14 -14
  583. package/icons/tech/c.js +4 -4
  584. package/icons/tech/cairo-graphics.js +3 -3
  585. package/icons/tech/cake-php.js +1 -1
  586. package/icons/tech/canva.js +3 -3
  587. package/icons/tech/capacitor.js +7 -7
  588. package/icons/tech/cassandra.js +14 -14
  589. package/icons/tech/cent-os.js +10 -10
  590. package/icons/tech/chrome.js +35 -35
  591. package/icons/tech/circle-ci.js +1 -1
  592. package/icons/tech/clarity.js +5 -5
  593. package/icons/tech/clion.js +27 -27
  594. package/icons/tech/clojure-script.js +5 -5
  595. package/icons/tech/clojure.js +6 -6
  596. package/icons/tech/cloudflare-workers.js +34 -34
  597. package/icons/tech/cloudflare.js +4 -4
  598. package/icons/tech/cmake.js +5 -5
  599. package/icons/tech/code-igniter.js +1 -1
  600. package/icons/tech/code-pen.js +1 -1
  601. package/icons/tech/codeac.js +1 -1
  602. package/icons/tech/codecov.js +1 -1
  603. package/icons/tech/coffee-script.js +1 -1
  604. package/icons/tech/composer.js +32 -32
  605. package/icons/tech/confluence.js +12 -12
  606. package/icons/tech/consul.js +1 -1
  607. package/icons/tech/contao.js +1 -1
  608. package/icons/tech/corejs.js +1 -1
  609. package/icons/tech/cosmosdb.js +6 -6
  610. package/icons/tech/couchdb.js +1 -1
  611. package/icons/tech/cplusplus.js +5 -5
  612. package/icons/tech/crystal.js +1 -1
  613. package/icons/tech/csharp.js +4 -4
  614. package/icons/tech/css3.js +7 -7
  615. package/icons/tech/cucumber.js +1 -1
  616. package/icons/tech/cypress.js +3 -3
  617. package/icons/tech/d3js.js +25 -25
  618. package/icons/tech/dart.js +6 -6
  619. package/icons/tech/data-grip.js +31 -31
  620. package/icons/tech/data-spell.js +24 -24
  621. package/icons/tech/dbeaver.js +8 -8
  622. package/icons/tech/debian.js +1 -1
  623. package/icons/tech/deno.js +1 -1
  624. package/icons/tech/devicon.js +7 -7
  625. package/icons/tech/digital-ocean.js +3 -3
  626. package/icons/tech/discord-js.js +8 -8
  627. package/icons/tech/django-rest.js +5 -5
  628. package/icons/tech/django.js +3 -3
  629. package/icons/tech/docker.js +17 -17
  630. package/icons/tech/doctrine.js +3 -3
  631. package/icons/tech/dropwizard.js +19 -19
  632. package/icons/tech/drupal.js +8 -8
  633. package/icons/tech/eclipse-ceylon.js +7 -7
  634. package/icons/tech/eclipse-ide.js +17 -17
  635. package/icons/tech/eclipse-vert-x.js +3 -3
  636. package/icons/tech/elasticbeats.js +4 -4
  637. package/icons/tech/elasticsearch.js +4 -4
  638. package/icons/tech/electron.js +5 -5
  639. package/icons/tech/eleventy-11ty.js +3 -3
  640. package/icons/tech/elixir.js +32 -32
  641. package/icons/tech/elm.js +7 -7
  642. package/icons/tech/embedded-c.js +27 -27
  643. package/icons/tech/ember-js.js +3 -3
  644. package/icons/tech/envoy.js +4 -4
  645. package/icons/tech/erlang.js +1 -1
  646. package/icons/tech/eslint.js +3 -3
  647. package/icons/tech/express.js +1 -1
  648. package/icons/tech/facebook.js +3 -3
  649. package/icons/tech/fast-api.js +1 -1
  650. package/icons/tech/fastify.js +3 -3
  651. package/icons/tech/fauna.js +1 -1
  652. package/icons/tech/feathers.js +1 -1
  653. package/icons/tech/fedora.js +7 -7
  654. package/icons/tech/figma.js +6 -6
  655. package/icons/tech/file-zilla.js +5 -5
  656. package/icons/tech/firebase.js +1 -1
  657. package/icons/tech/firefox.js +332 -332
  658. package/icons/tech/flask.js +1 -1
  659. package/icons/tech/flutter.js +9 -9
  660. package/icons/tech/fortran.js +1 -1
  661. package/icons/tech/foundation.js +34 -34
  662. package/icons/tech/fsharp.js +4 -4
  663. package/icons/tech/gatling.js +1 -1
  664. package/icons/tech/gatsby.js +1 -1
  665. package/icons/tech/gazebo.js +5 -5
  666. package/icons/tech/gcc.js +8 -8
  667. package/icons/tech/gentoo.js +1 -1
  668. package/icons/tech/ghost.js +3 -3
  669. package/icons/tech/gimp.js +65 -65
  670. package/icons/tech/git.js +1 -1
  671. package/icons/tech/gitbook.js +1 -1
  672. package/icons/tech/github-actions.js +3 -3
  673. package/icons/tech/github-codespaces.js +15 -15
  674. package/icons/tech/github.js +3 -3
  675. package/icons/tech/gitlab.js +5 -5
  676. package/icons/tech/gitpod.js +5 -5
  677. package/icons/tech/gitter.js +1 -1
  678. package/icons/tech/gnu-emacs.js +1 -1
  679. package/icons/tech/go-land.js +30 -30
  680. package/icons/tech/go.js +36 -36
  681. package/icons/tech/godot-engine.js +8 -8
  682. package/icons/tech/google-cloud.js +5 -5
  683. package/icons/tech/google.js +6 -6
  684. package/icons/tech/gradle.js +1 -1
  685. package/icons/tech/grafana.js +5 -5
  686. package/icons/tech/grails.js +3 -3
  687. package/icons/tech/graphql.js +9 -9
  688. package/icons/tech/groovy.js +99 -99
  689. package/icons/tech/grunt-js.js +30 -30
  690. package/icons/tech/gulp-js.js +1 -1
  691. package/icons/tech/hadoop.js +6 -6
  692. package/icons/tech/handlebars.js +3 -3
  693. package/icons/tech/hardhat.js +23 -23
  694. package/icons/tech/harvester.js +4 -4
  695. package/icons/tech/hashicorp-vault.js +1 -1
  696. package/icons/tech/haskell.js +4 -4
  697. package/icons/tech/haxe.js +11 -11
  698. package/icons/tech/helm.js +1 -1
  699. package/icons/tech/heroku.js +1 -1
  700. package/icons/tech/hibernate.js +3 -3
  701. package/icons/tech/homebrew.js +6 -6
  702. package/icons/tech/html5.js +5 -5
  703. package/icons/tech/hugo.js +4 -4
  704. package/icons/tech/ibm-spss-statistics.js +3 -3
  705. package/icons/tech/ie10.js +1 -1
  706. package/icons/tech/ifttt.js +1 -1
  707. package/icons/tech/influxdb.js +1 -1
  708. package/icons/tech/inkscape.js +112 -112
  709. package/icons/tech/insomnia.js +7 -7
  710. package/icons/tech/intellij-idea.js +34 -34
  711. package/icons/tech/ionic.js +3 -3
  712. package/icons/tech/jaeger.js +18 -18
  713. package/icons/tech/jamstack.js +1 -1
  714. package/icons/tech/jasmine.js +4 -4
  715. package/icons/tech/java.js +6 -6
  716. package/icons/tech/javascript.js +3 -3
  717. package/icons/tech/jeet.js +29 -29
  718. package/icons/tech/jekyll.js +40 -40
  719. package/icons/tech/jenkins.js +18 -18
  720. package/icons/tech/jest.js +1 -1
  721. package/icons/tech/jetbrains.js +23 -23
  722. package/icons/tech/jira-align.js +12 -12
  723. package/icons/tech/jira.js +11 -11
  724. package/icons/tech/jquery.js +1 -1
  725. package/icons/tech/json.js +9 -9
  726. package/icons/tech/jule.js +1 -1
  727. package/icons/tech/julia.js +7 -7
  728. package/icons/tech/junit.js +3 -3
  729. package/icons/tech/jupyter.js +5 -5
  730. package/icons/tech/k3os.js +1 -1
  731. package/icons/tech/k3s.js +1 -1
  732. package/icons/tech/kafka.js +1 -1
  733. package/icons/tech/kaggle.js +1 -1
  734. package/icons/tech/karate.js +3 -3
  735. package/icons/tech/karma.js +3 -3
  736. package/icons/tech/keras.js +3 -3
  737. package/icons/tech/kibana.js +4 -4
  738. package/icons/tech/knex-js.js +1 -1
  739. package/icons/tech/knockout.js +1 -1
  740. package/icons/tech/kotlin.js +6 -6
  741. package/icons/tech/krakenjs.js +1 -1
  742. package/icons/tech/ktor.js +15 -15
  743. package/icons/tech/kubernetes.js +4 -4
  744. package/icons/tech/labview.js +4 -4
  745. package/icons/tech/laravel.js +1 -1
  746. package/icons/tech/latex.js +6 -6
  747. package/icons/tech/less-js.js +1 -1
  748. package/icons/tech/linkedin.js +3 -3
  749. package/icons/tech/linux.js +800 -800
  750. package/icons/tech/liquibase.js +1 -1
  751. package/icons/tech/livewire.js +9 -9
  752. package/icons/tech/llvm.js +6 -6
  753. package/icons/tech/logstash.js +4 -4
  754. package/icons/tech/lua.js +4 -4
  755. package/icons/tech/lumen.js +1 -1
  756. package/icons/tech/magento.js +1 -1
  757. package/icons/tech/markdown.js +3 -3
  758. package/icons/tech/material-ui.js +5 -5
  759. package/icons/tech/materialize.js +3 -3
  760. package/icons/tech/matlab.js +22 -22
  761. package/icons/tech/matplotlib.js +23 -23
  762. package/icons/tech/maven.js +138 -138
  763. package/icons/tech/meteor-js.js +1 -1
  764. package/icons/tech/microsoft-sql-server.js +1 -1
  765. package/icons/tech/minitab.js +8 -8
  766. package/icons/tech/mob-x.js +6 -6
  767. package/icons/tech/mocha.js +3 -3
  768. package/icons/tech/modx.js +5 -5
  769. package/icons/tech/moleculer.js +1 -1
  770. package/icons/tech/mongodb.js +17 -17
  771. package/icons/tech/mongoose-js.js +3 -3
  772. package/icons/tech/moodle.js +38 -38
  773. package/icons/tech/ms-dos.js +12 -12
  774. package/icons/tech/mysql.js +1 -1
  775. package/icons/tech/nano.js +1 -1
  776. package/icons/tech/nerog.js +24 -24
  777. package/icons/tech/nestjs.js +1 -1
  778. package/icons/tech/net-core.js +3 -3
  779. package/icons/tech/net.js +117 -117
  780. package/icons/tech/network-x.js +10 -10
  781. package/icons/tech/new4j.js +3 -3
  782. package/icons/tech/nextjs.js +1 -1
  783. package/icons/tech/nginx.js +1 -1
  784. package/icons/tech/nhibernate.js +3 -3
  785. package/icons/tech/nim.js +3 -3
  786. package/icons/tech/nimble.js +8 -8
  787. package/icons/tech/nix.js +3 -3
  788. package/icons/tech/nodejs.js +1 -1
  789. package/icons/tech/nodemon.js +3 -3
  790. package/icons/tech/nodewebkit.js +6 -6
  791. package/icons/tech/npm.js +1 -1
  792. package/icons/tech/nuget.js +1 -1
  793. package/icons/tech/num-py.js +3 -3
  794. package/icons/tech/nuxt-js.js +4 -4
  795. package/icons/tech/objective-c.js +3 -3
  796. package/icons/tech/ocaml.js +19 -19
  797. package/icons/tech/oh-my-zsh.js +5 -5
  798. package/icons/tech/okta.js +3 -3
  799. package/icons/tech/open-al.js +3 -3
  800. package/icons/tech/open-api.js +13 -13
  801. package/icons/tech/open-cl.js +6 -6
  802. package/icons/tech/open-cv.js +4 -4
  803. package/icons/tech/open-gl.js +5 -5
  804. package/icons/tech/open-stack.js +1 -1
  805. package/icons/tech/open-suse.js +3 -3
  806. package/icons/tech/open-telemetry.js +3 -3
  807. package/icons/tech/opera.js +11 -11
  808. package/icons/tech/oracle.js +1 -1
  809. package/icons/tech/p5js.js +1 -1
  810. package/icons/tech/packer.js +3 -3
  811. package/icons/tech/pandas.js +6 -6
  812. package/icons/tech/perl.js +3 -3
  813. package/icons/tech/pf-sense.js +1 -1
  814. package/icons/tech/phalcon.js +26 -26
  815. package/icons/tech/phoenix-framework.js +1 -1
  816. package/icons/tech/photon-engine.js +9 -9
  817. package/icons/tech/php-storm.js +28 -28
  818. package/icons/tech/php.js +14 -14
  819. package/icons/tech/playwrite.js +8 -8
  820. package/icons/tech/ploty.js +4 -4
  821. package/icons/tech/podman.js +24 -24
  822. package/icons/tech/polygon.js +3 -3
  823. package/icons/tech/portainer.js +6 -6
  824. package/icons/tech/postcss.js +4 -4
  825. package/icons/tech/postgresql.js +5 -5
  826. package/icons/tech/postman.js +4 -4
  827. package/icons/tech/powershell.js +14 -14
  828. package/icons/tech/processing.js +95 -95
  829. package/icons/tech/prometheus.js +1 -1
  830. package/icons/tech/protractor.js +1 -1
  831. package/icons/tech/purescript.js +1 -1
  832. package/icons/tech/putty.js +44 -44
  833. package/icons/tech/pycharm.js +52 -52
  834. package/icons/tech/pyscript.js +3 -3
  835. package/icons/tech/pytest.js +9 -9
  836. package/icons/tech/python-poetry.js +34 -34
  837. package/icons/tech/python.js +13 -13
  838. package/icons/tech/pytorch.js +3 -3
  839. package/icons/tech/qodana.js +19 -19
  840. package/icons/tech/qt.js +1 -1
  841. package/icons/tech/quarkus.js +11 -11
  842. package/icons/tech/quasar.js +3 -3
  843. package/icons/tech/qwik.js +4 -4
  844. package/icons/tech/r.js +10 -10
  845. package/icons/tech/rabbitmq.js +1 -1
  846. package/icons/tech/rancher.js +1 -1
  847. package/icons/tech/raspberrypi.js +4 -4
  848. package/icons/tech/reach.js +3 -3
  849. package/icons/tech/react-bootstrap.js +1 -1
  850. package/icons/tech/react.js +3 -3
  851. package/icons/tech/realm.js +9 -9
  852. package/icons/tech/red-cube-s-epic-compiler-thingy-programming-re-ct.js +5 -5
  853. package/icons/tech/redhat.js +4 -4
  854. package/icons/tech/redis.js +11 -11
  855. package/icons/tech/redux.js +1 -1
  856. package/icons/tech/ren-py.js +161 -161
  857. package/icons/tech/rider.js +17 -17
  858. package/icons/tech/robot-operating-system-ros.js +1 -1
  859. package/icons/tech/rocksdb.js +3 -3
  860. package/icons/tech/rollup-js.js +34 -34
  861. package/icons/tech/rspec.js +5 -5
  862. package/icons/tech/rstudio.js +4 -4
  863. package/icons/tech/ruby-mine.js +25 -25
  864. package/icons/tech/ruby-on-rails.js +1 -1
  865. package/icons/tech/ruby.js +117 -117
  866. package/icons/tech/rust.js +1 -1
  867. package/icons/tech/salesforce.js +4 -4
  868. package/icons/tech/sanity.js +4 -4
  869. package/icons/tech/sass.js +1 -1
  870. package/icons/tech/scala.js +3 -3
  871. package/icons/tech/scalingo.js +3 -3
  872. package/icons/tech/sdl.js +8 -8
  873. package/icons/tech/selenium.js +3 -3
  874. package/icons/tech/sema-software.js +1 -1
  875. package/icons/tech/sequelize.js +28 -28
  876. package/icons/tech/shopware.js +3 -3
  877. package/icons/tech/sketch.js +8 -8
  878. package/icons/tech/slack.js +5 -5
  879. package/icons/tech/socket-io.js +3 -3
  880. package/icons/tech/solid-js.js +24 -24
  881. package/icons/tech/solidity.js +7 -7
  882. package/icons/tech/sonarqube.js +1 -1
  883. package/icons/tech/sourcetree.js +1 -1
  884. package/icons/tech/spark.js +1 -1
  885. package/icons/tech/splunk.js +1 -1
  886. package/icons/tech/spring.js +1 -1
  887. package/icons/tech/sql-developer.js +7 -7
  888. package/icons/tech/sqlalchemy.js +3 -3
  889. package/icons/tech/sqlite.js +8 -8
  890. package/icons/tech/ssh.js +1 -1
  891. package/icons/tech/stackoverflow.js +3 -3
  892. package/icons/tech/stata.js +1 -1
  893. package/icons/tech/storybook.js +1 -1
  894. package/icons/tech/streamlit.js +4 -4
  895. package/icons/tech/stylus.js +3 -3
  896. package/icons/tech/subversion.js +1 -1
  897. package/icons/tech/svelte.js +3 -3
  898. package/icons/tech/swagger.js +3 -3
  899. package/icons/tech/swift.js +3 -3
  900. package/icons/tech/symfony.js +1 -1
  901. package/icons/tech/tailwind-css.js +1 -1
  902. package/icons/tech/tauri.js +5 -5
  903. package/icons/tech/tensorflow.js +1 -1
  904. package/icons/tech/terraform.js +4 -4
  905. package/icons/tech/tex.js +1 -1
  906. package/icons/tech/the-algorithms.js +1 -1
  907. package/icons/tech/three-js.js +5 -5
  908. package/icons/tech/titanium-sdk.js +1 -1
  909. package/icons/tech/tomcat.js +8 -8
  910. package/icons/tech/tortoise-git.js +6 -6
  911. package/icons/tech/tower.js +136 -136
  912. package/icons/tech/traefik-mesh.js +1 -1
  913. package/icons/tech/traefik-proxy.js +1 -1
  914. package/icons/tech/travis-ci.js +1 -1
  915. package/icons/tech/trello.js +1 -1
  916. package/icons/tech/twitter.js +1 -1
  917. package/icons/tech/typescript.js +3 -3
  918. package/icons/tech/typo3.js +1 -1
  919. package/icons/tech/ubuntu.js +1 -1
  920. package/icons/tech/uml.js +5 -5
  921. package/icons/tech/unity.js +4 -4
  922. package/icons/tech/unix.js +1 -1
  923. package/icons/tech/unreal-engine.js +3 -3
  924. package/icons/tech/uwsgi.js +8 -8
  925. package/icons/tech/v8.js +30 -30
  926. package/icons/tech/vagrant.js +3 -3
  927. package/icons/tech/vala.js +15 -15
  928. package/icons/tech/vercel.js +1 -1
  929. package/icons/tech/veutify.js +5 -5
  930. package/icons/tech/vim.js +34 -34
  931. package/icons/tech/visualstudio.js +1 -1
  932. package/icons/tech/vite.js +1 -1
  933. package/icons/tech/vitejs.js +11 -11
  934. package/icons/tech/vscode.js +28 -28
  935. package/icons/tech/vsphere.js +6 -6
  936. package/icons/tech/vue-storefront.js +4 -4
  937. package/icons/tech/vue.js +4 -4
  938. package/icons/tech/vyper.js +5 -5
  939. package/icons/tech/webassembly.js +1 -1
  940. package/icons/tech/webflow.js +1 -1
  941. package/icons/tech/weblate.js +14 -14
  942. package/icons/tech/webpack.js +3 -3
  943. package/icons/tech/webstorm.js +16 -16
  944. package/icons/tech/windows11.js +1 -1
  945. package/icons/tech/windows8.js +1 -1
  946. package/icons/tech/woo-commerce.js +4 -4
  947. package/icons/tech/wordpress.js +8 -8
  948. package/icons/tech/xamarin.js +1 -1
  949. package/icons/tech/xcode.js +248 -248
  950. package/icons/tech/xml.js +5 -5
  951. package/icons/tech/yaml.js +4 -4
  952. package/icons/tech/yarn.js +3 -3
  953. package/icons/tech/yii-framework.js +5 -5
  954. package/icons/tech/yuno-host.js +3 -3
  955. package/icons/tech/zend-framework.js +1 -1
  956. package/icons/tech/zig.js +10 -10
  957. package/package.json +9 -9
  958. package/dist/__app__/src/chunks/IconCopy-BoSoNPZ_.js +0 -21
  959. package/dist/__app__/src/chunks/LikeC4Diagram-DytrE8GE.js +0 -9769
  960. package/dist/__app__/src/chunks/StaticLikeC4Diagram-DdbjVDqf.js +0 -32
  961. package/dist/__app__/src/chunks/chunk-RAAYCPUM-CpeCcSnm.js +0 -13
  962. package/dist/__app__/src/chunks/chunk-SGAFZVQH-F2W_It6h.js +0 -8
  963. package/dist/__app__/src/chunks/const-DiwrD95Q.js +0 -6
  964. package/dist/__app__/src/chunks/createReactComponent-BWheWDGL.js +0 -64
  965. package/dist/__app__/src/chunks/index-BxglQLE6.js +0 -10
  966. package/dist/__app__/src/chunks/index-fBIC0lf6.js +0 -12
  967. package/dist/__app__/src/chunks/react-resizable-panels.browser.esm-BaxT8im_.js +0 -1528
  968. package/dist/__app__/src/components/ColorSchemeToggle.js +0 -38
  969. package/dist/__app__/src/components/CopyToClipboard.js +0 -17
  970. package/dist/__app__/src/components/NotFound.js +0 -40
  971. package/dist/__app__/src/components/sidebar/Drawer.js +0 -186
  972. package/dist/__app__/src/components/view-page/Header.js +0 -416
  973. package/dist/__app__/src/hooks.js +0 -16
  974. package/dist/__app__/src/routeTree.gen.js +0 -57
  975. package/dist/__app__/src/router.js +0 -26
  976. package/dist/__app__/src/routes/__root.js +0 -42
  977. package/dist/__app__/src/routes/embed._viewId.js +0 -45
  978. package/dist/__app__/src/routes/export._viewId.js +0 -60
  979. package/dist/__app__/src/routes/index.css.js +0 -7
  980. package/dist/__app__/src/routes/index.js +0 -89
  981. package/dist/__app__/src/routes/view._viewId.d2.js +0 -53
  982. package/dist/__app__/src/routes/view._viewId.dot.js +0 -58
  983. package/dist/__app__/src/routes/view._viewId.editor.js +0 -43
  984. package/dist/__app__/src/routes/view._viewId.index.js +0 -39
  985. package/dist/__app__/src/routes/view._viewId.js +0 -173
  986. package/dist/__app__/src/routes/view._viewId.mmd.js +0 -102
  987. package/dist/__app__/src/routes/view.css.js +0 -12
  988. package/dist/__app__/src/routes/view_viewId_.css.js +0 -7
  989. package/dist/__app__/src/routes/webcomponent._.js +0 -61
  990. package/dist/__app__/src/theme.js +0 -21
  991. /package/dist/__app__/src/{components/RenderIcon.js → icons.js} +0 -0
  992. /package/dist/__app__/src/{routes/-view-lazy-data.js → lazy-data.js} +0 -0
@@ -86,8 +86,7 @@ const namespaces = {
86
86
  };
87
87
  function namespace(name) {
88
88
  var prefix = name += "", i = prefix.indexOf(":");
89
- return i >= 0 && (prefix = name.slice(0, i)) !== "xmlns" && (name = name.slice(i + 1)), namespaces.hasOwnProperty(prefix) ? { space: namespaces[prefix],
90
- local: name } : name;
89
+ return i >= 0 && (prefix = name.slice(0, i)) !== "xmlns" && (name = name.slice(i + 1)), namespaces.hasOwnProperty(prefix) ? { space: namespaces[prefix], local: name } : name;
91
90
  }
92
91
  function creatorInherit(name) {
93
92
  return function() {
@@ -115,8 +114,7 @@ function selection_select(select2) {
115
114
  typeof select2 != "function" && (select2 = selector(select2));
116
115
  for (var groups = this._groups, m2 = groups.length, subgroups = new Array(m2), j = 0; j < m2; ++j)
117
116
  for (var group = groups[j], n2 = group.length, subgroup = subgroups[j] = new Array(n2), node, subnode, i = 0; i < n2; ++i)
118
- (node = group[i]) && (subnode = select2.call(node, node.__data__, i, group)) && ("__data__" in node && (subnode.__data__ = node.__data__), subgroup[i] =
119
- subnode);
117
+ (node = group[i]) && (subnode = select2.call(node, node.__data__, i, group)) && ("__data__" in node && (subnode.__data__ = node.__data__), subgroup[i] = subnode);
120
118
  return new Selection$1(subgroups, this._parents);
121
119
  }
122
120
  function array(x) {
@@ -221,11 +219,9 @@ function bindIndex(parent, group, enter, update, exit, data) {
221
219
  function bindKey(parent, group, enter, update, exit, data, key) {
222
220
  var i, node, nodeByKeyValue = /* @__PURE__ */ new Map(), groupLength = group.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue;
223
221
  for (i = 0; i < groupLength; ++i)
224
- (node = group[i]) && (keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + "", nodeByKeyValue.has(keyValue) ? exit[i] = node : nodeByKeyValue.
225
- set(keyValue, node));
222
+ (node = group[i]) && (keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + "", nodeByKeyValue.has(keyValue) ? exit[i] = node : nodeByKeyValue.set(keyValue, node));
226
223
  for (i = 0; i < dataLength; ++i)
227
- keyValue = key.call(parent, data[i], i, data) + "", (node = nodeByKeyValue.get(keyValue)) ? (update[i] = node, node.__data__ = data[i], nodeByKeyValue.
228
- delete(keyValue)) : enter[i] = new EnterNode(parent, data[i]);
224
+ keyValue = key.call(parent, data[i], i, data) + "", (node = nodeByKeyValue.get(keyValue)) ? (update[i] = node, node.__data__ = data[i], nodeByKeyValue.delete(keyValue)) : enter[i] = new EnterNode(parent, data[i]);
229
225
  for (i = 0; i < groupLength; ++i)
230
226
  (node = group[i]) && nodeByKeyValue.get(keyValues[i]) === node && (exit[i] = node);
231
227
  }
@@ -237,9 +233,7 @@ function selection_data(value, key) {
237
233
  var bind = key ? bindKey : bindIndex, parents = this._parents, groups = this._groups;
238
234
  typeof value != "function" && (value = constant$3(value));
239
235
  for (var m2 = groups.length, update = new Array(m2), enter = new Array(m2), exit = new Array(m2), j = 0; j < m2; ++j) {
240
- var parent = parents[j], group = groups[j], groupLength = group.length, data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),
241
- dataLength = data.length, enterGroup = enter[j] = new Array(dataLength), updateGroup = update[j] = new Array(dataLength), exitGroup = exit[j] = new Array(
242
- groupLength);
236
+ var parent = parents[j], group = groups[j], groupLength = group.length, data = arraylike(value.call(parent, parent && parent.__data__, j, parents)), dataLength = data.length, enterGroup = enter[j] = new Array(dataLength), updateGroup = update[j] = new Array(dataLength), exitGroup = exit[j] = new Array(groupLength);
243
237
  bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);
244
238
  for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0)
245
239
  if (previous = enterGroup[i0]) {
@@ -257,13 +251,10 @@ function selection_exit() {
257
251
  }
258
252
  function selection_join(onenter, onupdate, onexit) {
259
253
  var enter = this.enter(), update = this, exit = this.exit();
260
- return typeof onenter == "function" ? (enter = onenter(enter), enter && (enter = enter.selection())) : enter = enter.append(onenter + ""), onupdate !=
261
- null && (update = onupdate(update), update && (update = update.selection())), onexit == null ? exit.remove() : onexit(exit), enter && update ? enter.
262
- merge(update).order() : update;
254
+ return typeof onenter == "function" ? (enter = onenter(enter), enter && (enter = enter.selection())) : enter = enter.append(onenter + ""), onupdate != null && (update = onupdate(update), update && (update = update.selection())), onexit == null ? exit.remove() : onexit(exit), enter && update ? enter.merge(update).order() : update;
263
255
  }
264
256
  function selection_merge(context) {
265
- for (var selection2 = context.selection ? context.selection() : context, groups0 = this._groups, groups1 = selection2._groups, m0 = groups0.length, m1 = groups1.
266
- length, m2 = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m2; ++j)
257
+ for (var selection2 = context.selection ? context.selection() : context, groups0 = this._groups, groups1 = selection2._groups, m0 = groups0.length, m1 = groups1.length, m2 = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m2; ++j)
267
258
  for (var group0 = groups0[j], group1 = groups1[j], n2 = group0.length, merge = merges[j] = new Array(n2), node, i = 0; i < n2; ++i)
268
259
  (node = group0[i] || group1[i]) && (merge[i] = node);
269
260
  for (; j < m0; ++j)
@@ -358,8 +349,7 @@ function selection_attr(name, value) {
358
349
  var node = this.node();
359
350
  return fullname.local ? node.getAttributeNS(fullname.space, fullname.local) : node.getAttribute(fullname);
360
351
  }
361
- return this.each((value == null ? fullname.local ? attrRemoveNS$1 : attrRemove$1 : typeof value == "function" ? fullname.local ? attrFunctionNS$1 : attrFunction$1 :
362
- fullname.local ? attrConstantNS$1 : attrConstant$1)(fullname, value));
352
+ return this.each((value == null ? fullname.local ? attrRemoveNS$1 : attrRemove$1 : typeof value == "function" ? fullname.local ? attrFunctionNS$1 : attrFunction$1 : fullname.local ? attrConstantNS$1 : attrConstant$1)(fullname, value));
363
353
  }
364
354
  function defaultView(node) {
365
355
  return node.ownerDocument && node.ownerDocument.defaultView || node.document && node || node.defaultView;
@@ -381,8 +371,7 @@ function styleFunction$1(name, value, priority) {
381
371
  };
382
372
  }
383
373
  function selection_style(name, value, priority) {
384
- return arguments.length > 1 ? this.each((value == null ? styleRemove$1 : typeof value == "function" ? styleFunction$1 : styleConstant$1)(name, value,
385
- priority ?? "")) : styleValue(this.node(), name);
374
+ return arguments.length > 1 ? this.each((value == null ? styleRemove$1 : typeof value == "function" ? styleFunction$1 : styleConstant$1)(name, value, priority ?? "")) : styleValue(this.node(), name);
386
375
  }
387
376
  function styleValue(node, name) {
388
377
  return node.style.getPropertyValue(name) || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);
@@ -404,8 +393,7 @@ function propertyFunction(name, value) {
404
393
  };
405
394
  }
406
395
  function selection_property(name, value) {
407
- return arguments.length > 1 ? this.each((value == null ? propertyRemove : typeof value == "function" ? propertyFunction : propertyConstant)(name, value)) :
408
- this.node()[name];
396
+ return arguments.length > 1 ? this.each((value == null ? propertyRemove : typeof value == "function" ? propertyFunction : propertyConstant)(name, value)) : this.node()[name];
409
397
  }
410
398
  function classArray(string) {
411
399
  return string.trim().split(/^|\s+/);
@@ -473,8 +461,7 @@ function textFunction$1(value) {
473
461
  };
474
462
  }
475
463
  function selection_text(value) {
476
- return arguments.length ? this.each(value == null ? textRemove : (typeof value == "function" ? textFunction$1 : textConstant$1)(value)) : this.node().
477
- textContent;
464
+ return arguments.length ? this.each(value == null ? textRemove : (typeof value == "function" ? textFunction$1 : textConstant$1)(value)) : this.node().textContent;
478
465
  }
479
466
  function htmlRemove() {
480
467
  this.innerHTML = "";
@@ -515,8 +502,7 @@ function constantNull() {
515
502
  return null;
516
503
  }
517
504
  function selection_insert(name, before) {
518
- var create2 = typeof name == "function" ? name : creator(name), select2 = before == null ? constantNull : typeof before == "function" ? before : selector(
519
- before);
505
+ var create2 = typeof name == "function" ? name : creator(name), select2 = before == null ? constantNull : typeof before == "function" ? before : selector(before);
520
506
  return this.select(function() {
521
507
  return this.insertBefore(create2.apply(this, arguments), select2.apply(this, arguments) || null);
522
508
  });
@@ -558,8 +544,7 @@ function onRemove(typename) {
558
544
  var on = this.__on;
559
545
  if (on) {
560
546
  for (var j = 0, i = -1, m2 = on.length, o; j < m2; ++j)
561
- o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name ? this.removeEventListener(o.type, o.listener, o.options) :
562
- on[++i] = o;
547
+ o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name ? this.removeEventListener(o.type, o.listener, o.options) : on[++i] = o;
563
548
  ++i ? on.length = i : delete this.__on;
564
549
  }
565
550
  };
@@ -570,13 +555,11 @@ function onAdd(typename, value, options) {
570
555
  if (on) {
571
556
  for (var j = 0, m2 = on.length; j < m2; ++j)
572
557
  if ((o = on[j]).type === typename.type && o.name === typename.name) {
573
- this.removeEventListener(o.type, o.listener, o.options), this.addEventListener(o.type, o.listener = listener, o.options = options), o.value =
574
- value;
558
+ this.removeEventListener(o.type, o.listener, o.options), this.addEventListener(o.type, o.listener = listener, o.options = options), o.value = value;
575
559
  return;
576
560
  }
577
561
  }
578
- this.addEventListener(typename.type, listener, options), o = { type: typename.type, name: typename.name, value, listener, options }, on ? on.push(
579
- o) : this.__on = [o];
562
+ this.addEventListener(typename.type, listener, options), o = { type: typename.type, name: typename.name, value, listener, options }, on ? on.push(o) : this.__on = [o];
580
563
  };
581
564
  }
582
565
  function selection_on(typename, value, options) {
@@ -596,8 +579,7 @@ function selection_on(typename, value, options) {
596
579
  }
597
580
  function dispatchEvent(node, type, params) {
598
581
  var window2 = defaultView(node), event = window2.CustomEvent;
599
- typeof event == "function" ? event = new event(type, params) : (event = window2.document.createEvent("Event"), params ? (event.initEvent(type, params.
600
- bubbles, params.cancelable), event.detail = params.detail) : event.initEvent(type, !1, !1)), node.dispatchEvent(event);
582
+ typeof event == "function" ? event = new event(type, params) : (event = window2.document.createEvent("Event"), params ? (event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail) : event.initEvent(type, !1, !1)), node.dispatchEvent(event);
601
583
  }
602
584
  function dispatchConstant(type, params) {
603
585
  return function() {
@@ -666,8 +648,7 @@ Selection$1.prototype = selection.prototype = {
666
648
  [Symbol.iterator]: selection_iterator
667
649
  };
668
650
  function select(selector2) {
669
- return typeof selector2 == "string" ? new Selection$1([[document.querySelector(selector2)]], [document.documentElement]) : new Selection$1([[selector2]],
670
- root);
651
+ return typeof selector2 == "string" ? new Selection$1([[document.querySelector(selector2)]], [document.documentElement]) : new Selection$1([[selector2]], root);
671
652
  }
672
653
  function sourceEvent(event) {
673
654
  let sourceEvent2;
@@ -697,8 +678,7 @@ function noevent$1(event) {
697
678
  }
698
679
  function dragDisable(view) {
699
680
  var root2 = view.document.documentElement, selection2 = select(view).on("dragstart.drag", noevent$1, nonpassivecapture);
700
- "onselectstart" in root2 ? selection2.on("selectstart.drag", noevent$1, nonpassivecapture) : (root2.__noselect = root2.style.MozUserSelect, root2.style.
701
- MozUserSelect = "none");
681
+ "onselectstart" in root2 ? selection2.on("selectstart.drag", noevent$1, nonpassivecapture) : (root2.__noselect = root2.style.MozUserSelect, root2.style.MozUserSelect = "none");
702
682
  }
703
683
  function yesdrag(view, noclick) {
704
684
  var root2 = view.document.documentElement, selection2 = select(view).on("dragstart.drag", null);
@@ -750,17 +730,14 @@ function defaultTouchable$1() {
750
730
  return navigator.maxTouchPoints || "ontouchstart" in this;
751
731
  }
752
732
  function drag() {
753
- var filter2 = defaultFilter$1, container = defaultContainer, subject = defaultSubject, touchable = defaultTouchable$1, gestures = {}, listeners = dispatch(
754
- "start", "drag", "end"), active = 0, mousedownx, mousedowny, mousemoving, touchending, clickDistance2 = 0;
733
+ var filter2 = defaultFilter$1, container = defaultContainer, subject = defaultSubject, touchable = defaultTouchable$1, gestures = {}, listeners = dispatch("start", "drag", "end"), active = 0, mousedownx, mousedowny, mousemoving, touchending, clickDistance2 = 0;
755
734
  function drag2(selection2) {
756
- selection2.on("mousedown.drag", mousedowned).filter(touchable).on("touchstart.drag", touchstarted).on("touchmove.drag", touchmoved, nonpassive).on(
757
- "touchend.drag touchcancel.drag", touchended).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
735
+ selection2.on("mousedown.drag", mousedowned).filter(touchable).on("touchstart.drag", touchstarted).on("touchmove.drag", touchmoved, nonpassive).on("touchend.drag touchcancel.drag", touchended).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
758
736
  }
759
737
  function mousedowned(event, d) {
760
738
  if (!(touchending || !filter2.call(this, event, d))) {
761
739
  var gesture = beforestart(this, container.call(this, event, d), event, d, "mouse");
762
- gesture && (select(event.view).on("mousemove.drag", mousemoved, nonpassivecapture).on("mouseup.drag", mouseupped, nonpassivecapture), dragDisable(
763
- event.view), nopropagation$1(event), mousemoving = !1, mousedownx = event.clientX, mousedowny = event.clientY, gesture("start", event));
740
+ gesture && (select(event.view).on("mousemove.drag", mousemoved, nonpassivecapture).on("mouseup.drag", mouseupped, nonpassivecapture), dragDisable(event.view), nopropagation$1(event), mousemoving = !1, mousedownx = event.clientX, mousedowny = event.clientY, gesture("start", event));
764
741
  }
765
742
  }
766
743
  function mousemoved(event) {
@@ -861,11 +838,7 @@ function extend(parent, definition) {
861
838
  }
862
839
  function Color() {
863
840
  }
864
- var darker = 0.7, brighter = 1 / darker, reI = "\\s*([+-]?\\d+)\\s*", reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", reP = "\\s*([+-]?(?:\\d\
865
- *\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", reHex = /^#([0-9a-f]{3,8})$/, reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`), reRgbPercent = new RegExp(
866
- `^rgb\\(${reP},${reP},${reP}\\)$`), reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`), reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP}\
867
- ,${reP},${reN}\\)$`), reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`), reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`),
868
- named = {
841
+ var darker = 0.7, brighter = 1 / darker, reI = "\\s*([+-]?\\d+)\\s*", reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", reHex = /^#([0-9a-f]{3,8})$/, reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`), reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`), reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`), reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`), reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`), reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`), named = {
869
842
  aliceblue: 15792383,
870
843
  antiquewhite: 16444375,
871
844
  aqua: 65535,
@@ -1044,14 +1017,7 @@ function color_formatRgb() {
1044
1017
  }
1045
1018
  function color(format) {
1046
1019
  var m2, l2;
1047
- return format = (format + "").trim().toLowerCase(), (m2 = reHex.exec(format)) ? (l2 = m2[1].length, m2 = parseInt(m2[1], 16), l2 === 6 ? rgbn(m2) : l2 ===
1048
- 3 ? new Rgb(m2 >> 8 & 15 | m2 >> 4 & 240, m2 >> 4 & 15 | m2 & 240, (m2 & 15) << 4 | m2 & 15, 1) : l2 === 8 ? rgba(m2 >> 24 & 255, m2 >> 16 & 255, m2 >>
1049
- 8 & 255, (m2 & 255) / 255) : l2 === 4 ? rgba(m2 >> 12 & 15 | m2 >> 8 & 240, m2 >> 8 & 15 | m2 >> 4 & 240, m2 >> 4 & 15 | m2 & 240, ((m2 & 15) << 4 |
1050
- m2 & 15) / 255) : null) : (m2 = reRgbInteger.exec(format)) ? new Rgb(m2[1], m2[2], m2[3], 1) : (m2 = reRgbPercent.exec(format)) ? new Rgb(m2[1] * 255 /
1051
- 100, m2[2] * 255 / 100, m2[3] * 255 / 100, 1) : (m2 = reRgbaInteger.exec(format)) ? rgba(m2[1], m2[2], m2[3], m2[4]) : (m2 = reRgbaPercent.exec(format)) ?
1052
- rgba(m2[1] * 255 / 100, m2[2] * 255 / 100, m2[3] * 255 / 100, m2[4]) : (m2 = reHslPercent.exec(format)) ? hsla(m2[1], m2[2] / 100, m2[3] / 100, 1) :
1053
- (m2 = reHslaPercent.exec(format)) ? hsla(m2[1], m2[2] / 100, m2[3] / 100, m2[4]) : named.hasOwnProperty(format) ? rgbn(named[format]) : format === "\
1054
- transparent" ? new Rgb(NaN, NaN, NaN, 0) : null;
1020
+ return format = (format + "").trim().toLowerCase(), (m2 = reHex.exec(format)) ? (l2 = m2[1].length, m2 = parseInt(m2[1], 16), l2 === 6 ? rgbn(m2) : l2 === 3 ? new Rgb(m2 >> 8 & 15 | m2 >> 4 & 240, m2 >> 4 & 15 | m2 & 240, (m2 & 15) << 4 | m2 & 15, 1) : l2 === 8 ? rgba(m2 >> 24 & 255, m2 >> 16 & 255, m2 >> 8 & 255, (m2 & 255) / 255) : l2 === 4 ? rgba(m2 >> 12 & 15 | m2 >> 8 & 240, m2 >> 8 & 15 | m2 >> 4 & 240, m2 >> 4 & 15 | m2 & 240, ((m2 & 15) << 4 | m2 & 15) / 255) : null) : (m2 = reRgbInteger.exec(format)) ? new Rgb(m2[1], m2[2], m2[3], 1) : (m2 = reRgbPercent.exec(format)) ? new Rgb(m2[1] * 255 / 100, m2[2] * 255 / 100, m2[3] * 255 / 100, 1) : (m2 = reRgbaInteger.exec(format)) ? rgba(m2[1], m2[2], m2[3], m2[4]) : (m2 = reRgbaPercent.exec(format)) ? rgba(m2[1] * 255 / 100, m2[2] * 255 / 100, m2[3] * 255 / 100, m2[4]) : (m2 = reHslPercent.exec(format)) ? hsla(m2[1], m2[2] / 100, m2[3] / 100, 1) : (m2 = reHslaPercent.exec(format)) ? hsla(m2[1], m2[2] / 100, m2[3] / 100, m2[4]) : named.hasOwnProperty(format) ? rgbn(named[format]) : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null;
1055
1021
  }
1056
1022
  function rgbn(n2) {
1057
1023
  return new Rgb(n2 >> 16 & 255, n2 >> 8 & 255, n2 & 255, 1);
@@ -1082,8 +1048,7 @@ define(Rgb, rgb, extend(Color, {
1082
1048
  return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
1083
1049
  },
1084
1050
  displayable() {
1085
- return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <=
1086
- 1;
1051
+ return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
1087
1052
  },
1088
1053
  hex: rgb_formatHex,
1089
1054
  // Deprecated! Use color.formatHex.
@@ -1120,8 +1085,7 @@ function hslConvert(o) {
1120
1085
  if (o instanceof Hsl) return o;
1121
1086
  o = o.rgb();
1122
1087
  var r2 = o.r / 255, g = o.g / 255, b = o.b / 255, min = Math.min(r2, g, b), max = Math.max(r2, g, b), h2 = NaN, s = max - min, l2 = (max + min) / 2;
1123
- return s ? (r2 === max ? h2 = (g - b) / s + (g < b) * 6 : g === max ? h2 = (b - r2) / s + 2 : h2 = (r2 - g) / s + 4, s /= l2 < 0.5 ? max + min : 2 -
1124
- max - min, h2 *= 60) : s = l2 > 0 && l2 < 1 ? 0 : h2, new Hsl(h2, s, l2, o.opacity);
1088
+ return s ? (r2 === max ? h2 = (g - b) / s + (g < b) * 6 : g === max ? h2 = (b - r2) / s + 2 : h2 = (r2 - g) / s + 4, s /= l2 < 0.5 ? max + min : 2 - max - min, h2 *= 60) : s = l2 > 0 && l2 < 1 ? 0 : h2, new Hsl(h2, s, l2, o.opacity);
1125
1089
  }
1126
1090
  function hsl(h2, s, l2, opacity) {
1127
1091
  return arguments.length === 1 ? hslConvert(h2) : new Hsl(h2, s, l2, opacity ?? 1);
@@ -1137,8 +1101,7 @@ define(Hsl, hsl, extend(Color, {
1137
1101
  return k2 = k2 == null ? darker : Math.pow(darker, k2), new Hsl(this.h, this.s, this.l * k2, this.opacity);
1138
1102
  },
1139
1103
  rgb() {
1140
- var h2 = this.h % 360 + (this.h < 0) * 360, s = isNaN(h2) || isNaN(this.s) ? 0 : this.s, l2 = this.l, m2 = l2 + (l2 < 0.5 ? l2 : 1 - l2) * s, m1 = 2 *
1141
- l2 - m2;
1104
+ var h2 = this.h % 360 + (this.h < 0) * 360, s = isNaN(h2) || isNaN(this.s) ? 0 : this.s, l2 = this.l, m2 = l2 + (l2 < 0.5 ? l2 : 1 - l2) * s, m1 = 2 * l2 - m2;
1142
1105
  return new Rgb(
1143
1106
  hsl2rgb(h2 >= 240 ? h2 - 240 : h2 + 120, m1, m2),
1144
1107
  hsl2rgb(h2, m1, m2),
@@ -1189,8 +1152,7 @@ function nogamma(a, b) {
1189
1152
  const interpolateRgb = function rgbGamma(y) {
1190
1153
  var color2 = gamma(y);
1191
1154
  function rgb$1(start2, end) {
1192
- var r2 = color2((start2 = rgb(start2)).r, (end = rgb(end)).r), g = color2(start2.g, end.g), b = color2(start2.b, end.b), opacity = nogamma(start2.
1193
- opacity, end.opacity);
1155
+ var r2 = color2((start2 = rgb(start2)).r, (end = rgb(end)).r), g = color2(start2.g, end.g), b = color2(start2.b, end.b), opacity = nogamma(start2.opacity, end.opacity);
1194
1156
  return function(t2) {
1195
1157
  return start2.r = r2(t2), start2.g = g(t2), start2.b = b(t2), start2.opacity = opacity(t2), start2 + "";
1196
1158
  };
@@ -1216,8 +1178,7 @@ function one(b) {
1216
1178
  function interpolateString(a, b) {
1217
1179
  var bi = reA.lastIndex = reB.lastIndex = 0, am, bm, bs, i = -1, s = [], q2 = [];
1218
1180
  for (a = a + "", b = b + ""; (am = reA.exec(a)) && (bm = reB.exec(b)); )
1219
- (bs = bm.index) > bi && (bs = b.slice(bi, bs), s[i] ? s[i] += bs : s[++i] = bs), (am = am[0]) === (bm = bm[0]) ? s[i] ? s[i] += bm : s[++i] = bm :
1220
- (s[++i] = null, q2.push({ i, x: interpolateNumber(am, bm) })), bi = reB.lastIndex;
1181
+ (bs = bm.index) > bi && (bs = b.slice(bi, bs), s[i] ? s[i] += bs : s[++i] = bs), (am = am[0]) === (bm = bm[0]) ? s[i] ? s[i] += bm : s[++i] = bm : (s[++i] = null, q2.push({ i, x: interpolateNumber(am, bm) })), bi = reB.lastIndex;
1221
1182
  return bi < b.length && (bs = b.slice(bi), s[i] ? s[i] += bs : s[++i] = bs), s.length < 2 ? q2[0] ? one(q2[0].x) : zero(b) : (b = q2.length, function(t2) {
1222
1183
  for (var i2 = 0, o; i2 < b; ++i2) s[(o = q2[i2]).i] = o.x(t2);
1223
1184
  return s.join("");
@@ -1233,8 +1194,7 @@ var degrees = 180 / Math.PI, identity$2 = {
1233
1194
  };
1234
1195
  function decompose(a, b, c, d, e2, f) {
1235
1196
  var scaleX, scaleY, skewX;
1236
- return (scaleX = Math.sqrt(a * a + b * b)) && (a /= scaleX, b /= scaleX), (skewX = a * c + b * d) && (c -= a * skewX, d -= b * skewX), (scaleY = Math.
1237
- sqrt(c * c + d * d)) && (c /= scaleY, d /= scaleY, skewX /= scaleY), a * d < b * c && (a = -a, b = -b, skewX = -skewX, scaleX = -scaleX), {
1197
+ return (scaleX = Math.sqrt(a * a + b * b)) && (a /= scaleX, b /= scaleX), (skewX = a * c + b * d) && (c -= a * skewX, d -= b * skewX), (scaleY = Math.sqrt(c * c + d * d)) && (c /= scaleY, d /= scaleY, skewX /= scaleY), a * d < b * c && (a = -a, b = -b, skewX = -skewX, scaleX = -scaleX), {
1238
1198
  translateX: e2,
1239
1199
  translateY: f,
1240
1200
  rotate: Math.atan2(b, a) * degrees,
@@ -1249,9 +1209,7 @@ function parseCss(value) {
1249
1209
  return m2.isIdentity ? identity$2 : decompose(m2.a, m2.b, m2.c, m2.d, m2.e, m2.f);
1250
1210
  }
1251
1211
  function parseSvg(value) {
1252
- return value == null || (svgNode || (svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g")), svgNode.setAttribute("transform", value),
1253
- !(value = svgNode.transform.baseVal.consolidate())) ? identity$2 : (value = value.matrix, decompose(value.a, value.b, value.c, value.d, value.e, value.
1254
- f));
1212
+ return value == null || (svgNode || (svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g")), svgNode.setAttribute("transform", value), !(value = svgNode.transform.baseVal.consolidate())) ? identity$2 : (value = value.matrix, decompose(value.a, value.b, value.c, value.d, value.e, value.f));
1255
1213
  }
1256
1214
  function interpolateTransform(parse, pxComma, pxParen, degParen) {
1257
1215
  function pop(s) {
@@ -1264,8 +1222,7 @@ function interpolateTransform(parse, pxComma, pxParen, degParen) {
1264
1222
  } else (xb || yb) && s.push("translate(" + xb + pxComma + yb + pxParen);
1265
1223
  }
1266
1224
  function rotate(a, b, s, q2) {
1267
- a !== b ? (a - b > 180 ? b += 360 : b - a > 180 && (a += 360), q2.push({ i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: interpolateNumber(a,
1268
- b) })) : b && s.push(pop(s) + "rotate(" + b + degParen);
1225
+ a !== b ? (a - b > 180 ? b += 360 : b - a > 180 && (a += 360), q2.push({ i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: interpolateNumber(a, b) })) : b && s.push(pop(s) + "rotate(" + b + degParen);
1269
1226
  }
1270
1227
  function skewX(a, b, s, q2) {
1271
1228
  a !== b ? q2.push({ i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: interpolateNumber(a, b) }) : b && s.push(pop(s) + "skewX(" + b + degParen);
@@ -1278,15 +1235,13 @@ function interpolateTransform(parse, pxComma, pxParen, degParen) {
1278
1235
  }
1279
1236
  return function(a, b) {
1280
1237
  var s = [], q2 = [];
1281
- return a = parse(a), b = parse(b), translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q2), rotate(a.rotate, b.rotate, s, q2), skewX(
1282
- a.skewX, b.skewX, s, q2), scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q2), a = b = null, function(t2) {
1238
+ return a = parse(a), b = parse(b), translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q2), rotate(a.rotate, b.rotate, s, q2), skewX(a.skewX, b.skewX, s, q2), scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q2), a = b = null, function(t2) {
1283
1239
  for (var i = -1, n2 = q2.length, o; ++i < n2; ) s[(o = q2[i]).i] = o.x(t2);
1284
1240
  return s.join("");
1285
1241
  };
1286
1242
  };
1287
1243
  }
1288
- var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)"), interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")",
1289
- ")"), epsilon2 = 1e-12;
1244
+ var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)"), interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")"), epsilon2 = 1e-12;
1290
1245
  function cosh(x) {
1291
1246
  return ((x = Math.exp(x)) + 1 / x) / 2;
1292
1247
  }
@@ -1308,8 +1263,7 @@ const interpolateZoom = function zoomRho(rho, rho2, rho4) {
1308
1263
  ];
1309
1264
  };
1310
1265
  else {
1311
- var d1 = Math.sqrt(d2), b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),
1312
- r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);
1266
+ var d1 = Math.sqrt(d2), b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);
1313
1267
  S = (r1 - r0) / rho, i = function(t2) {
1314
1268
  var s = t2 * S, coshr0 = cosh(r0), u2 = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));
1315
1269
  return [
@@ -1326,9 +1280,7 @@ const interpolateZoom = function zoomRho(rho, rho2, rho4) {
1326
1280
  return zoomRho(_1, _2, _4);
1327
1281
  }, zoom2;
1328
1282
  }(Math.SQRT2, 2, 4);
1329
- var frame = 0, timeout$1 = 0, interval = 0, pokeDelay = 1e3, taskHead, taskTail, clockLast = 0, clockNow = 0, clockSkew = 0, clock = typeof performance ==
1330
- "object" && performance.now ? performance : Date, setFrame = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.
1331
- bind(window) : function(f) {
1283
+ var frame = 0, timeout$1 = 0, interval = 0, pokeDelay = 1e3, taskHead, taskTail, clockLast = 0, clockNow = 0, clockSkew = 0, clock = typeof performance == "object" && performance.now ? performance : Date, setFrame = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) {
1332
1284
  setTimeout(f, 17);
1333
1285
  };
1334
1286
  function now() {
@@ -1344,8 +1296,7 @@ Timer.prototype = timer.prototype = {
1344
1296
  constructor: Timer,
1345
1297
  restart: function(callback, delay, time) {
1346
1298
  if (typeof callback != "function") throw new TypeError("callback is not a function");
1347
- time = (time == null ? now() : +time) + (delay == null ? 0 : +delay), !this._next && taskTail !== this && (taskTail ? taskTail._next = this : taskHead =
1348
- this, taskTail = this), this._call = callback, this._time = time, sleep();
1299
+ time = (time == null ? now() : +time) + (delay == null ? 0 : +delay), !this._next && taskTail !== this && (taskTail ? taskTail._next = this : taskHead = this, taskTail = this), this._call = callback, this._time = time, sleep();
1349
1300
  },
1350
1301
  stop: function() {
1351
1302
  this._call && (this._call = null, this._time = 1 / 0, sleep());
@@ -1382,8 +1333,7 @@ function sleep(time) {
1382
1333
  if (!frame) {
1383
1334
  timeout$1 && (timeout$1 = clearTimeout(timeout$1));
1384
1335
  var delay = time - clockNow;
1385
- delay > 24 ? (time < 1 / 0 && (timeout$1 = setTimeout(wake, time - clock.now() - clockSkew)), interval && (interval = clearInterval(interval))) : (interval ||
1386
- (clockLast = clock.now(), interval = setInterval(poke, pokeDelay)), frame = 1, setFrame(wake));
1336
+ delay > 24 ? (time < 1 / 0 && (timeout$1 = setTimeout(wake, time - clock.now() - clockSkew)), interval && (interval = clearInterval(interval))) : (interval || (clockLast = clock.now(), interval = setInterval(poke, pokeDelay)), frame = 1, setFrame(wake));
1387
1337
  }
1388
1338
  }
1389
1339
  function timeout(callback, delay, time) {
@@ -1392,8 +1342,7 @@ function timeout(callback, delay, time) {
1392
1342
  t2.stop(), callback(elapsed + delay);
1393
1343
  }, delay, time), t2;
1394
1344
  }
1395
- var emptyOn = dispatch("start", "end", "cancel", "interrupt"), emptyTween = [], CREATED = 0, SCHEDULED = 1, STARTING = 2, STARTED = 3, RUNNING = 4, ENDING = 5,
1396
- ENDED = 6;
1345
+ var emptyOn = dispatch("start", "end", "cancel", "interrupt"), emptyTween = [], CREATED = 0, SCHEDULED = 1, STARTING = 2, STARTED = 3, RUNNING = 4, ENDING = 5, ENDED = 6;
1397
1346
  function schedule(node, name, id2, index2, group, timing) {
1398
1347
  var schedules = node.__transition;
1399
1348
  if (!schedules) node.__transition = {};
@@ -1441,8 +1390,7 @@ function create(node, id2, self) {
1441
1390
  for (i in schedules)
1442
1391
  if (o = schedules[i], o.name === self.name) {
1443
1392
  if (o.state === STARTED) return timeout(start2);
1444
- o.state === RUNNING ? (o.state = ENDED, o.timer.stop(), o.on.call("interrupt", node, node.__data__, o.index, o.group), delete schedules[i]) : +i <
1445
- id2 && (o.state = ENDED, o.timer.stop(), o.on.call("cancel", node, node.__data__, o.index, o.group), delete schedules[i]);
1393
+ o.state === RUNNING ? (o.state = ENDED, o.timer.stop(), o.on.call("interrupt", node, node.__data__, o.index, o.group), delete schedules[i]) : +i < id2 && (o.state = ENDED, o.timer.stop(), o.on.call("cancel", node, node.__data__, o.index, o.group), delete schedules[i]);
1446
1394
  }
1447
1395
  if (timeout(function() {
1448
1396
  self.state === STARTED && (self.state = RUNNING, self.timer.restart(tick, self.delay, self.time), tick(elapsed));
@@ -1453,8 +1401,7 @@ function create(node, id2, self) {
1453
1401
  }
1454
1402
  }
1455
1403
  function tick(elapsed) {
1456
- for (var t2 = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1), i = -1,
1457
- n2 = tween.length; ++i < n2; )
1404
+ for (var t2 = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1), i = -1, n2 = tween.length; ++i < n2; )
1458
1405
  tween[i].call(node, t2);
1459
1406
  self.state === ENDING && (self.on.call("end", node, node.__data__, self.index, self.group), stop());
1460
1407
  }
@@ -1473,8 +1420,7 @@ function interrupt(node, name) {
1473
1420
  empty2 = !1;
1474
1421
  continue;
1475
1422
  }
1476
- active = schedule2.state > STARTING && schedule2.state < ENDING, schedule2.state = ENDED, schedule2.timer.stop(), schedule2.on.call(active ? "in\
1477
- terrupt" : "cancel", node, node.__data__, schedule2.index, schedule2.group), delete schedules[i];
1423
+ active = schedule2.state > STARTING && schedule2.state < ENDING, schedule2.state = ENDED, schedule2.timer.stop(), schedule2.on.call(active ? "interrupt" : "cancel", node, node.__data__, schedule2.index, schedule2.group), delete schedules[i];
1478
1424
  }
1479
1425
  empty2 && delete node.__transition;
1480
1426
  }
@@ -1537,8 +1483,7 @@ function tweenValue(transition, name, value) {
1537
1483
  }
1538
1484
  function interpolate(a, b) {
1539
1485
  var c;
1540
- return (typeof b == "number" ? interpolateNumber : b instanceof color ? interpolateRgb : (c = color(b)) ? (b = c, interpolateRgb) : interpolateString)(
1541
- a, b);
1486
+ return (typeof b == "number" ? interpolateNumber : b instanceof color ? interpolateRgb : (c = color(b)) ? (b = c, interpolateRgb) : interpolateString)(a, b);
1542
1487
  }
1543
1488
  function attrRemove(name) {
1544
1489
  return function() {
@@ -1568,23 +1513,19 @@ function attrFunction(name, interpolate2, value) {
1568
1513
  var string00, string10, interpolate0;
1569
1514
  return function() {
1570
1515
  var string0, value1 = value(this), string1;
1571
- return value1 == null ? void this.removeAttribute(name) : (string0 = this.getAttribute(name), string1 = value1 + "", string0 === string1 ? null : string0 ===
1572
- string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1)));
1516
+ return value1 == null ? void this.removeAttribute(name) : (string0 = this.getAttribute(name), string1 = value1 + "", string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1)));
1573
1517
  };
1574
1518
  }
1575
1519
  function attrFunctionNS(fullname, interpolate2, value) {
1576
1520
  var string00, string10, interpolate0;
1577
1521
  return function() {
1578
1522
  var string0, value1 = value(this), string1;
1579
- return value1 == null ? void this.removeAttributeNS(fullname.space, fullname.local) : (string0 = this.getAttributeNS(fullname.space, fullname.local),
1580
- string1 = value1 + "", string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 =
1581
- interpolate2(string00 = string0, value1)));
1523
+ return value1 == null ? void this.removeAttributeNS(fullname.space, fullname.local) : (string0 = this.getAttributeNS(fullname.space, fullname.local), string1 = value1 + "", string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1)));
1582
1524
  };
1583
1525
  }
1584
1526
  function transition_attr(name, value) {
1585
1527
  var fullname = namespace(name), i = fullname === "transform" ? interpolateTransformSvg : interpolate;
1586
- return this.attrTween(name, typeof value == "function" ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, "attr." + name,
1587
- value)) : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname) : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));
1528
+ return this.attrTween(name, typeof value == "function" ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, "attr." + name, value)) : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname) : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));
1588
1529
  }
1589
1530
  function attrInterpolate(name, i) {
1590
1531
  return function(t2) {
@@ -1678,8 +1619,7 @@ function transition_filter(match) {
1678
1619
  }
1679
1620
  function transition_merge(transition) {
1680
1621
  if (transition._id !== this._id) throw new Error();
1681
- for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m2 = Math.min(m0, m1), merges = new Array(m0),
1682
- j = 0; j < m2; ++j)
1622
+ for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m2 = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m2; ++j)
1683
1623
  for (var group0 = groups0[j], group1 = groups1[j], n2 = group0.length, merge = merges[j] = new Array(n2), node, i = 0; i < n2; ++i)
1684
1624
  (node = group0[i] || group1[i]) && (merge[i] = node);
1685
1625
  for (; j < m0; ++j)
@@ -1718,8 +1658,7 @@ function transition_select(select2) {
1718
1658
  typeof select2 != "function" && (select2 = selector(select2));
1719
1659
  for (var groups = this._groups, m2 = groups.length, subgroups = new Array(m2), j = 0; j < m2; ++j)
1720
1660
  for (var group = groups[j], n2 = group.length, subgroup = subgroups[j] = new Array(n2), node, subnode, i = 0; i < n2; ++i)
1721
- (node = group[i]) && (subnode = select2.call(node, node.__data__, i, group)) && ("__data__" in node && (subnode.__data__ = node.__data__), subgroup[i] =
1722
- subnode, schedule(subgroup[i], name, id2, i, subgroup, get(node, id2)));
1661
+ (node = group[i]) && (subnode = select2.call(node, node.__data__, i, group)) && ("__data__" in node && (subnode.__data__ = node.__data__), subgroup[i] = subnode, schedule(subgroup[i], name, id2, i, subgroup, get(node, id2)));
1723
1662
  return new Transition(subgroups, this._parents, name, id2);
1724
1663
  }
1725
1664
  function transition_selectAll(select2) {
@@ -1742,8 +1681,7 @@ function styleNull(name, interpolate2) {
1742
1681
  var string00, string10, interpolate0;
1743
1682
  return function() {
1744
1683
  var string0 = styleValue(this, name), string1 = (this.style.removeProperty(name), styleValue(this, name));
1745
- return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, string10 =
1746
- string1);
1684
+ return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, string10 = string1);
1747
1685
  };
1748
1686
  }
1749
1687
  function styleRemove(name) {
@@ -1762,8 +1700,7 @@ function styleFunction(name, interpolate2, value) {
1762
1700
  var string00, string10, interpolate0;
1763
1701
  return function() {
1764
1702
  var string0 = styleValue(this, name), value1 = value(this), string1 = value1 + "";
1765
- return value1 == null && (string1 = value1 = (this.style.removeProperty(name), styleValue(this, name))), string0 === string1 ? null : string0 === string00 &&
1766
- string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1));
1703
+ return value1 == null && (string1 = value1 = (this.style.removeProperty(name), styleValue(this, name))), string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1));
1767
1704
  };
1768
1705
  }
1769
1706
  function styleMaybeRemove(id2, name) {
@@ -1775,9 +1712,7 @@ function styleMaybeRemove(id2, name) {
1775
1712
  }
1776
1713
  function transition_style(name, value, priority) {
1777
1714
  var i = (name += "") == "transform" ? interpolateTransformCss : interpolate;
1778
- return value == null ? this.styleTween(name, styleNull(name, i)).on("end.style." + name, styleRemove(name)) : typeof value == "function" ? this.styleTween(
1779
- name, styleFunction(name, i, tweenValue(this, "style." + name, value))).each(styleMaybeRemove(this._id, name)) : this.styleTween(name, styleConstant(
1780
- name, i, value), priority).on("end.style." + name, null);
1715
+ return value == null ? this.styleTween(name, styleNull(name, i)).on("end.style." + name, styleRemove(name)) : typeof value == "function" ? this.styleTween(name, styleFunction(name, i, tweenValue(this, "style." + name, value))).each(styleMaybeRemove(this._id, name)) : this.styleTween(name, styleConstant(name, i, value), priority).on("end.style." + name, null);
1781
1716
  }
1782
1717
  function styleInterpolate(name, i, priority) {
1783
1718
  return function(t2) {
@@ -1917,8 +1852,7 @@ function inherit(node, id2) {
1917
1852
  }
1918
1853
  function selection_transition(name) {
1919
1854
  var id2, timing;
1920
- name instanceof Transition ? (id2 = name._id, name = name._name) : (id2 = newId(), (timing = defaultTiming).time = now(), name = name == null ? null :
1921
- name + "");
1855
+ name instanceof Transition ? (id2 = name._id, name = name._name) : (id2 = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + "");
1922
1856
  for (var groups = this._groups, m2 = groups.length, j = 0; j < m2; ++j)
1923
1857
  for (var group = groups[j], n2 = group.length, node, i = 0; i < n2; ++i)
1924
1858
  (node = group[i]) && schedule(node, name, id2, i, group, timing || inherit(node, id2));
@@ -1997,8 +1931,7 @@ function defaultFilter(event) {
1997
1931
  }
1998
1932
  function defaultExtent() {
1999
1933
  var e2 = this;
2000
- return e2 instanceof SVGElement ? (e2 = e2.ownerSVGElement || e2, e2.hasAttribute("viewBox") ? (e2 = e2.viewBox.baseVal, [[e2.x, e2.y], [e2.x + e2.width,
2001
- e2.y + e2.height]]) : [[0, 0], [e2.width.baseVal.value, e2.height.baseVal.value]]) : [[0, 0], [e2.clientWidth, e2.clientHeight]];
1934
+ return e2 instanceof SVGElement ? (e2 = e2.ownerSVGElement || e2, e2.hasAttribute("viewBox") ? (e2 = e2.viewBox.baseVal, [[e2.x, e2.y], [e2.x + e2.width, e2.y + e2.height]]) : [[0, 0], [e2.width.baseVal.value, e2.height.baseVal.value]]) : [[0, 0], [e2.clientWidth, e2.clientHeight]];
2002
1935
  }
2003
1936
  function defaultTransform() {
2004
1937
  return this.__zoom || identity$1;
@@ -2010,26 +1943,20 @@ function defaultTouchable() {
2010
1943
  return navigator.maxTouchPoints || "ontouchstart" in this;
2011
1944
  }
2012
1945
  function defaultConstrain(transform2, extent, translateExtent) {
2013
- var dx0 = transform2.invertX(extent[0][0]) - translateExtent[0][0], dx1 = transform2.invertX(extent[1][0]) - translateExtent[1][0], dy0 = transform2.
2014
- invertY(extent[0][1]) - translateExtent[0][1], dy1 = transform2.invertY(extent[1][1]) - translateExtent[1][1];
1946
+ var dx0 = transform2.invertX(extent[0][0]) - translateExtent[0][0], dx1 = transform2.invertX(extent[1][0]) - translateExtent[1][0], dy0 = transform2.invertY(extent[0][1]) - translateExtent[0][1], dy1 = transform2.invertY(extent[1][1]) - translateExtent[1][1];
2015
1947
  return transform2.translate(
2016
1948
  dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1),
2017
1949
  dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1)
2018
1950
  );
2019
1951
  }
2020
1952
  function zoom() {
2021
- var filter2 = defaultFilter, extent = defaultExtent, constrain = defaultConstrain, wheelDelta2 = defaultWheelDelta, touchable = defaultTouchable, scaleExtent = [
2022
- 0, 1 / 0], translateExtent = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], duration = 250, interpolate2 = interpolateZoom, listeners = dispatch("start", "zoom",
2023
- "end"), touchstarting, touchfirst, touchending, touchDelay = 500, wheelDelay = 150, clickDistance2 = 0, tapDistance = 10;
1953
+ var filter2 = defaultFilter, extent = defaultExtent, constrain = defaultConstrain, wheelDelta2 = defaultWheelDelta, touchable = defaultTouchable, scaleExtent = [0, 1 / 0], translateExtent = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], duration = 250, interpolate2 = interpolateZoom, listeners = dispatch("start", "zoom", "end"), touchstarting, touchfirst, touchending, touchDelay = 500, wheelDelay = 150, clickDistance2 = 0, tapDistance = 10;
2024
1954
  function zoom2(selection2) {
2025
- selection2.property("__zoom", defaultTransform).on("wheel.zoom", wheeled, { passive: !1 }).on("mousedown.zoom", mousedowned).on("dblclick.zoom", dblclicked).
2026
- filter(touchable).on("touchstart.zoom", touchstarted).on("touchmove.zoom", touchmoved).on("touchend.zoom touchcancel.zoom", touchended).style("-we\
2027
- bkit-tap-highlight-color", "rgba(0,0,0,0)");
1955
+ selection2.property("__zoom", defaultTransform).on("wheel.zoom", wheeled, { passive: !1 }).on("mousedown.zoom", mousedowned).on("dblclick.zoom", dblclicked).filter(touchable).on("touchstart.zoom", touchstarted).on("touchmove.zoom", touchmoved).on("touchend.zoom touchcancel.zoom", touchended).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
2028
1956
  }
2029
1957
  zoom2.transform = function(collection, transform2, point, event) {
2030
1958
  var selection2 = collection.selection ? collection.selection() : collection;
2031
- selection2.property("__zoom", defaultTransform), collection !== selection2 ? schedule2(collection, transform2, point, event) : selection2.interrupt().
2032
- each(function() {
1959
+ selection2.property("__zoom", defaultTransform), collection !== selection2 ? schedule2(collection, transform2, point, event) : selection2.interrupt().each(function() {
2033
1960
  gesture(this, arguments).event(event).start().zoom(null, typeof transform2 == "function" ? transform2.apply(this, arguments) : transform2).end();
2034
1961
  });
2035
1962
  }, zoom2.scaleBy = function(selection2, k2, p2, event) {
@@ -2039,8 +1966,7 @@ bkit-tap-highlight-color", "rgba(0,0,0,0)");
2039
1966
  }, p2, event);
2040
1967
  }, zoom2.scaleTo = function(selection2, k2, p2, event) {
2041
1968
  zoom2.transform(selection2, function() {
2042
- var e2 = extent.apply(this, arguments), t0 = this.__zoom, p0 = p2 == null ? centroid(e2) : typeof p2 == "function" ? p2.apply(this, arguments) :
2043
- p2, p1 = t0.invert(p0), k1 = typeof k2 == "function" ? k2.apply(this, arguments) : k2;
1969
+ var e2 = extent.apply(this, arguments), t0 = this.__zoom, p0 = p2 == null ? centroid(e2) : typeof p2 == "function" ? p2.apply(this, arguments) : p2, p1 = t0.invert(p0), k1 = typeof k2 == "function" ? k2.apply(this, arguments) : k2;
2044
1970
  return constrain(translate(scale(t0, k1), p0, p1), e2, translateExtent);
2045
1971
  }, p2, event);
2046
1972
  }, zoom2.translateBy = function(selection2, x, y, event) {
@@ -2052,8 +1978,7 @@ bkit-tap-highlight-color", "rgba(0,0,0,0)");
2052
1978
  }, null, event);
2053
1979
  }, zoom2.translateTo = function(selection2, x, y, p2, event) {
2054
1980
  zoom2.transform(selection2, function() {
2055
- var e2 = extent.apply(this, arguments), t2 = this.__zoom, p0 = p2 == null ? centroid(e2) : typeof p2 == "function" ? p2.apply(this, arguments) :
2056
- p2;
1981
+ var e2 = extent.apply(this, arguments), t2 = this.__zoom, p0 = p2 == null ? centroid(e2) : typeof p2 == "function" ? p2.apply(this, arguments) : p2;
2057
1982
  return constrain(identity$1.translate(p0[0], p0[1]).scale(t2.k).translate(
2058
1983
  typeof x == "function" ? -x.apply(this, arguments) : -x,
2059
1984
  typeof y == "function" ? -y.apply(this, arguments) : -y
@@ -2061,8 +1986,7 @@ bkit-tap-highlight-color", "rgba(0,0,0,0)");
2061
1986
  }, p2, event);
2062
1987
  };
2063
1988
  function scale(transform2, k2) {
2064
- return k2 = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k2)), k2 === transform2.k ? transform2 : new Transform(k2, transform2.x, transform2.
2065
- y);
1989
+ return k2 = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k2)), k2 === transform2.k ? transform2 : new Transform(k2, transform2.x, transform2.y);
2066
1990
  }
2067
1991
  function translate(transform2, p0, p1) {
2068
1992
  var x = p0[0] - p1[0] * transform2.k, y = p0[1] - p1[1] * transform2.k;
@@ -2077,9 +2001,7 @@ bkit-tap-highlight-color", "rgba(0,0,0,0)");
2077
2001
  }).on("interrupt.zoom end.zoom", function() {
2078
2002
  gesture(this, arguments).event(event).end();
2079
2003
  }).tween("zoom", function() {
2080
- var that = this, args = arguments, g = gesture(that, args).event(event), e2 = extent.apply(that, args), p2 = point == null ? centroid(e2) : typeof point ==
2081
- "function" ? point.apply(that, args) : point, w2 = Math.max(e2[1][0] - e2[0][0], e2[1][1] - e2[0][1]), a = that.__zoom, b = typeof transform2 ==
2082
- "function" ? transform2.apply(that, args) : transform2, i = interpolate2(a.invert(p2).concat(w2 / a.k), b.invert(p2).concat(w2 / b.k));
2004
+ var that = this, args = arguments, g = gesture(that, args).event(event), e2 = extent.apply(that, args), p2 = point == null ? centroid(e2) : typeof point == "function" ? point.apply(that, args) : point, w2 = Math.max(e2[1][0] - e2[0][0], e2[1][1] - e2[0][1]), a = that.__zoom, b = typeof transform2 == "function" ? transform2.apply(that, args) : transform2, i = interpolate2(a.invert(p2).concat(w2 / a.k), b.invert(p2).concat(w2 / b.k));
2083
2005
  return function(t2) {
2084
2006
  if (t2 === 1) t2 = b;
2085
2007
  else {
@@ -2104,9 +2026,7 @@ bkit-tap-highlight-color", "rgba(0,0,0,0)");
2104
2026
  return ++this.active === 1 && (this.that.__zooming = this, this.emit("start")), this;
2105
2027
  },
2106
2028
  zoom: function(key, transform2) {
2107
- return this.mouse && key !== "mouse" && (this.mouse[1] = transform2.invert(this.mouse[0])), this.touch0 && key !== "touch" && (this.touch0[1] = transform2.
2108
- invert(this.touch0[0])), this.touch1 && key !== "touch" && (this.touch1[1] = transform2.invert(this.touch1[0])), this.that.__zoom = transform2, this.
2109
- emit("zoom"), this;
2029
+ return this.mouse && key !== "mouse" && (this.mouse[1] = transform2.invert(this.mouse[0])), this.touch0 && key !== "touch" && (this.touch0[1] = transform2.invert(this.touch0[0])), this.touch1 && key !== "touch" && (this.touch1[1] = transform2.invert(this.touch1[0])), this.that.__zoom = transform2, this.emit("zoom"), this;
2110
2030
  },
2111
2031
  end: function() {
2112
2032
  return --this.active === 0 && (delete this.that.__zooming, this.emit("end")), this;
@@ -2129,24 +2049,21 @@ bkit-tap-highlight-color", "rgba(0,0,0,0)");
2129
2049
  };
2130
2050
  function wheeled(event, ...args) {
2131
2051
  if (!filter2.apply(this, arguments)) return;
2132
- var g = gesture(this, args).event(event), t2 = this.__zoom, k2 = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t2.k * Math.pow(2, wheelDelta2.
2133
- apply(this, arguments)))), p2 = pointer(event);
2052
+ var g = gesture(this, args).event(event), t2 = this.__zoom, k2 = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t2.k * Math.pow(2, wheelDelta2.apply(this, arguments)))), p2 = pointer(event);
2134
2053
  if (g.wheel)
2135
2054
  (g.mouse[0][0] !== p2[0] || g.mouse[0][1] !== p2[1]) && (g.mouse[1] = t2.invert(g.mouse[0] = p2)), clearTimeout(g.wheel);
2136
2055
  else {
2137
2056
  if (t2.k === k2) return;
2138
2057
  g.mouse = [p2, t2.invert(p2)], interrupt(this), g.start();
2139
2058
  }
2140
- noevent(event), g.wheel = setTimeout(wheelidled, wheelDelay), g.zoom("mouse", constrain(translate(scale(t2, k2), g.mouse[0], g.mouse[1]), g.extent,
2141
- translateExtent));
2059
+ noevent(event), g.wheel = setTimeout(wheelidled, wheelDelay), g.zoom("mouse", constrain(translate(scale(t2, k2), g.mouse[0], g.mouse[1]), g.extent, translateExtent));
2142
2060
  function wheelidled() {
2143
2061
  g.wheel = null, g.end();
2144
2062
  }
2145
2063
  }
2146
2064
  function mousedowned(event, ...args) {
2147
2065
  if (touchending || !filter2.apply(this, arguments)) return;
2148
- var currentTarget = event.currentTarget, g = gesture(this, args, !0).event(event), v2 = select(event.view).on("mousemove.zoom", mousemoved, !0).on(
2149
- "mouseup.zoom", mouseupped, !0), p2 = pointer(event, currentTarget), x0 = event.clientX, y0 = event.clientY;
2066
+ var currentTarget = event.currentTarget, g = gesture(this, args, !0).event(event), v2 = select(event.view).on("mousemove.zoom", mousemoved, !0).on("mouseup.zoom", mouseupped, !0), p2 = pointer(event, currentTarget), x0 = event.clientX, y0 = event.clientY;
2150
2067
  dragDisable(event.view), nopropagation(event), g.mouse = [p2, this.__zoom.invert(p2)], interrupt(this), g.start();
2151
2068
  function mousemoved(event2) {
2152
2069
  if (noevent(event2), !g.moved) {
@@ -2161,18 +2078,15 @@ bkit-tap-highlight-color", "rgba(0,0,0,0)");
2161
2078
  }
2162
2079
  function dblclicked(event, ...args) {
2163
2080
  if (filter2.apply(this, arguments)) {
2164
- var t0 = this.__zoom, p0 = pointer(event.changedTouches ? event.changedTouches[0] : event, this), p1 = t0.invert(p0), k1 = t0.k * (event.shiftKey ?
2165
- 0.5 : 2), t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent);
2166
- noevent(event), duration > 0 ? select(this).transition().duration(duration).call(schedule2, t1, p0, event) : select(this).call(zoom2.transform, t1,
2167
- p0, event);
2081
+ var t0 = this.__zoom, p0 = pointer(event.changedTouches ? event.changedTouches[0] : event, this), p1 = t0.invert(p0), k1 = t0.k * (event.shiftKey ? 0.5 : 2), t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent);
2082
+ noevent(event), duration > 0 ? select(this).transition().duration(duration).call(schedule2, t1, p0, event) : select(this).call(zoom2.transform, t1, p0, event);
2168
2083
  }
2169
2084
  }
2170
2085
  function touchstarted(event, ...args) {
2171
2086
  if (filter2.apply(this, arguments)) {
2172
2087
  var touches = event.touches, n2 = touches.length, g = gesture(this, args, event.changedTouches.length === n2).event(event), started, i, t2, p2;
2173
2088
  for (nopropagation(event), i = 0; i < n2; ++i)
2174
- t2 = touches[i], p2 = pointer(t2, this), p2 = [p2, this.__zoom.invert(p2), t2.identifier], g.touch0 ? !g.touch1 && g.touch0[2] !== p2[2] && (g.
2175
- touch1 = p2, g.taps = 0) : (g.touch0 = p2, started = !0, g.taps = 1 + !!touchstarting);
2089
+ t2 = touches[i], p2 = pointer(t2, this), p2 = [p2, this.__zoom.invert(p2), t2.identifier], g.touch0 ? !g.touch1 && g.touch0[2] !== p2[2] && (g.touch1 = p2, g.taps = 0) : (g.touch0 = p2, started = !0, g.taps = 1 + !!touchstarting);
2176
2090
  touchstarting && (touchstarting = clearTimeout(touchstarting)), started && (g.taps < 2 && (touchfirst = p2[0], touchstarting = setTimeout(function() {
2177
2091
  touchstarting = null;
2178
2092
  }, touchDelay)), interrupt(this), g.start());
@@ -2182,11 +2096,9 @@ bkit-tap-highlight-color", "rgba(0,0,0,0)");
2182
2096
  if (this.__zooming) {
2183
2097
  var g = gesture(this, args).event(event), touches = event.changedTouches, n2 = touches.length, i, t2, p2, l2;
2184
2098
  for (noevent(event), i = 0; i < n2; ++i)
2185
- t2 = touches[i], p2 = pointer(t2, this), g.touch0 && g.touch0[2] === t2.identifier ? g.touch0[0] = p2 : g.touch1 && g.touch1[2] === t2.identifier &&
2186
- (g.touch1[0] = p2);
2099
+ t2 = touches[i], p2 = pointer(t2, this), g.touch0 && g.touch0[2] === t2.identifier ? g.touch0[0] = p2 : g.touch1 && g.touch1[2] === t2.identifier && (g.touch1[0] = p2);
2187
2100
  if (t2 = g.that.__zoom, g.touch1) {
2188
- var p0 = g.touch0[0], l0 = g.touch0[1], p1 = g.touch1[0], l1 = g.touch1[1], dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp, dl = (dl =
2189
- l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;
2101
+ var p0 = g.touch0[0], l0 = g.touch0[1], p1 = g.touch1[0], l1 = g.touch1[1], dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp, dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;
2190
2102
  t2 = scale(t2, Math.sqrt(dp / dl)), p2 = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2], l2 = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];
2191
2103
  } else if (g.touch0) p2 = g.touch0[0], l2 = g.touch0[1];
2192
2104
  else return;
@@ -2218,8 +2130,7 @@ bkit-tap-highlight-color", "rgba(0,0,0,0)");
2218
2130
  }, zoom2.scaleExtent = function(_) {
2219
2131
  return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom2) : [scaleExtent[0], scaleExtent[1]];
2220
2132
  }, zoom2.translateExtent = function(_) {
2221
- return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] =
2222
- +_[1][1], zoom2) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]];
2133
+ return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom2) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]];
2223
2134
  }, zoom2.constrain = function(_) {
2224
2135
  return arguments.length ? (constrain = _, zoom2) : constrain;
2225
2136
  }, zoom2.duration = function(_) {
@@ -2237,22 +2148,18 @@ bkit-tap-highlight-color", "rgba(0,0,0,0)");
2237
2148
  }
2238
2149
  const errorMessages = {
2239
2150
  error001: () => "[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",
2240
- error002: () => "It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes o\
2241
- utside of the component or memoize them.",
2151
+ 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.",
2242
2152
  error003: (nodeType) => `Node type "${nodeType}" not found. Using fallback type "default".`,
2243
2153
  error004: () => "The React Flow parent container needs a width and a height to render the graph.",
2244
2154
  error005: () => "Only child nodes can use a parent extent.",
2245
2155
  error006: () => "Can't create edge. An edge needs a source and a target.",
2246
2156
  error007: (id2) => `The old edge with id=${id2} does not exist.`,
2247
2157
  error009: (type) => `Marker type "${type}" doesn't exist.`,
2248
- error008: (handleType, { id: id2, sourceHandle, targetHandle }) => `Couldn't create edge for ${handleType} handle id: "${sourceHandle && targetHandle}\
2249
- ", edge id: ${id2}.`,
2158
+ error008: (handleType, { id: id2, sourceHandle, targetHandle }) => `Couldn't create edge for ${handleType} handle id: "${sourceHandle && targetHandle}", edge id: ${id2}.`,
2250
2159
  error010: () => "Handle: No node id found. Make sure to only use a Handle inside a custom Node.",
2251
2160
  error011: (edgeType) => `Edge type "${edgeType}" not found. Using fallback type "default".`,
2252
- error012: (id2) => `Node with id "${id2}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" \
2253
- handler is called.`,
2254
- error013: (lib = "react") => `It seems that you haven't loaded the styles. Please import '@xyflow/${lib}/dist/style.css' or base.css to make sure ev\
2255
- erything is working properly.`
2161
+ error012: (id2) => `Node with id "${id2}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,
2162
+ error013: (lib = "react") => `It seems that you haven't loaded the styles. Please import '@xyflow/${lib}/dist/style.css' or base.css to make sure everything is working properly.`
2256
2163
  }, infiniteExtent = [
2257
2164
  [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY],
2258
2165
  [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY]
@@ -2283,8 +2190,7 @@ const initialConnection = {
2283
2190
  };
2284
2191
  var ConnectionLineType;
2285
2192
  (function(ConnectionLineType2) {
2286
- ConnectionLineType2.Bezier = "default", ConnectionLineType2.Straight = "straight", ConnectionLineType2.Step = "step", ConnectionLineType2.SmoothStep =
2287
- "smoothstep", ConnectionLineType2.SimpleBezier = "simplebezier";
2193
+ ConnectionLineType2.Bezier = "default", ConnectionLineType2.Straight = "straight", ConnectionLineType2.Step = "step", ConnectionLineType2.SmoothStep = "smoothstep", ConnectionLineType2.SimpleBezier = "simplebezier";
2288
2194
  })(ConnectionLineType || (ConnectionLineType = {}));
2289
2195
  var MarkerType;
2290
2196
  (function(MarkerType2) {
@@ -2303,9 +2209,7 @@ const oppositePosition = {
2303
2209
  function getConnectionStatus(isValid) {
2304
2210
  return isValid === null ? null : isValid ? "valid" : "invalid";
2305
2211
  }
2306
- const isEdgeBase = (element) => "id" in element && "source" in element && "target" in element, isNodeBase = (element) => "id" in element && "position" in
2307
- element && !("source" in element) && !("target" in element), isInternalNodeBase = (element) => "id" in element && "internals" in element && !("source" in
2308
- element) && !("target" in element), getNodePositionWithOrigin = (node, nodeOrigin = [0, 0]) => {
2212
+ const isEdgeBase = (element) => "id" in element && "source" in element && "target" in element, isNodeBase = (element) => "id" in element && "position" in element && !("source" in element) && !("target" in element), isInternalNodeBase = (element) => "id" in element && "internals" in element && !("source" in element) && !("target" in element), getNodePositionWithOrigin = (node, nodeOrigin = [0, 0]) => {
2309
2213
  const { width, height } = getNodeDimensions(node), origin = node.origin ?? nodeOrigin, offsetX = width * origin[0], offsetY = height * origin[1];
2310
2214
  return {
2311
2215
  x: node.position.x - offsetX,
@@ -2328,12 +2232,10 @@ element) && !("target" in element), getNodePositionWithOrigin = (node, nodeOrigi
2328
2232
  height: rect.height / tScale
2329
2233
  }, visibleNodes = [];
2330
2234
  for (const [, node] of nodes) {
2331
- const { measured, selectable = !0, hidden = !1 } = node, width = measured.width ?? node.width ?? node.initialWidth ?? null, height = measured.height ??
2332
- node.height ?? node.initialHeight ?? null;
2235
+ const { measured, selectable = !0, hidden = !1 } = node, width = measured.width ?? node.width ?? node.initialWidth ?? null, height = measured.height ?? node.height ?? node.initialHeight ?? null;
2333
2236
  if (excludeNonSelectableNodes && !selectable || hidden)
2334
2237
  continue;
2335
- const overlappingArea = getOverlappingArea(paneRect, nodeToRect(node)), notInitialized = width === null || height === null, partiallyVisible = partially &&
2336
- overlappingArea > 0, area = (width ?? 0) * (height ?? 0);
2238
+ const overlappingArea = getOverlappingArea(paneRect, nodeToRect(node)), notInitialized = width === null || height === null, partiallyVisible = partially && overlappingArea > 0, area = (width ?? 0) * (height ?? 0);
2337
2239
  (notInitialized || partiallyVisible || overlappingArea >= area || node.dragging) && visibleNodes.push(node);
2338
2240
  }
2339
2241
  return visibleNodes;
@@ -2346,30 +2248,26 @@ element) && !("target" in element), getNodePositionWithOrigin = (node, nodeOrigi
2346
2248
  function getFitViewNodes(nodeLookup, options) {
2347
2249
  const fitViewNodes = /* @__PURE__ */ new Map(), optionNodeIds = options?.nodes ? new Set(options.nodes.map((node) => node.id)) : null;
2348
2250
  return nodeLookup.forEach((n2) => {
2349
- n2.measured.width && n2.measured.height && (options?.includeHiddenNodes || !n2.hidden) && (!optionNodeIds || optionNodeIds.has(n2.id)) && fitViewNodes.
2350
- set(n2.id, n2);
2251
+ n2.measured.width && n2.measured.height && (options?.includeHiddenNodes || !n2.hidden) && (!optionNodeIds || optionNodeIds.has(n2.id)) && fitViewNodes.set(n2.id, n2);
2351
2252
  }), fitViewNodes;
2352
2253
  }
2353
2254
  async function fitView({ nodes, width, height, panZoom, minZoom, maxZoom }, options) {
2354
2255
  if (nodes.size === 0)
2355
2256
  return Promise.resolve(!1);
2356
- const bounds = getInternalNodesBounds(nodes), viewport = getViewportForBounds(bounds, width, height, options?.minZoom ?? minZoom, options?.maxZoom ??
2357
- maxZoom, options?.padding ?? 0.1);
2257
+ const bounds = getInternalNodesBounds(nodes), viewport = getViewportForBounds(bounds, width, height, options?.minZoom ?? minZoom, options?.maxZoom ?? maxZoom, options?.padding ?? 0.1);
2358
2258
  return await panZoom.setViewport(viewport, { duration: options?.duration }), Promise.resolve(!0);
2359
2259
  }
2360
2260
  function clampNodeExtent(node, extent) {
2361
2261
  return !extent || extent === "parent" ? extent : [extent[0], [extent[1][0] - (node.measured?.width ?? 0), extent[1][1] - (node.measured?.height ?? 0)]];
2362
2262
  }
2363
2263
  function calculateNodePosition({ nodeId, nextPosition, nodeLookup, nodeOrigin = [0, 0], nodeExtent, onError }) {
2364
- const node = nodeLookup.get(nodeId), parentNode = node.parentId ? nodeLookup.get(node.parentId) : void 0, { x: parentX, y: parentY } = parentNode ? parentNode.
2365
- internals.positionAbsolute : { x: 0, y: 0 }, origin = node.origin ?? nodeOrigin;
2264
+ const node = nodeLookup.get(nodeId), parentNode = node.parentId ? nodeLookup.get(node.parentId) : void 0, { x: parentX, y: parentY } = parentNode ? parentNode.internals.positionAbsolute : { x: 0, y: 0 }, origin = node.origin ?? nodeOrigin;
2366
2265
  let currentExtent = clampNodeExtent(node, node.extent || nodeExtent);
2367
2266
  if (node.extent === "parent" && !node.expandParent)
2368
2267
  if (!parentNode)
2369
2268
  onError?.("005", errorMessages.error005());
2370
2269
  else {
2371
- const nodeWidth = node.measured.width, nodeHeight = node.measured.height, parentWidth = parentNode.measured.width, parentHeight = parentNode.measured.
2372
- height;
2270
+ const nodeWidth = node.measured.width, nodeHeight = node.measured.height, parentWidth = parentNode.measured.width, parentHeight = parentNode.measured.height;
2373
2271
  nodeWidth && nodeHeight && parentWidth && parentHeight && (currentExtent = [
2374
2272
  [parentX, parentY],
2375
2273
  [parentX + parentWidth - nodeWidth, parentY + parentHeight - nodeHeight]
@@ -2397,8 +2295,7 @@ async function getElementsToRemove({ nodesToRemove = [], edgesToRemove = [], nod
2397
2295
  const isIncluded = nodeIds.has(node.id), parentHit = !isIncluded && node.parentId && matchingNodes.find((n2) => n2.id === node.parentId);
2398
2296
  (isIncluded || parentHit) && matchingNodes.push(node);
2399
2297
  }
2400
- const edgeIds = new Set(edgesToRemove.map((edge) => edge.id)), deletableEdges = edges.filter((edge) => edge.deletable !== !1), matchingEdges = getConnectedEdges(
2401
- matchingNodes, deletableEdges);
2298
+ const edgeIds = new Set(edgesToRemove.map((edge) => edge.id)), deletableEdges = edges.filter((edge) => edge.deletable !== !1), matchingEdges = getConnectedEdges(matchingNodes, deletableEdges);
2402
2299
  for (const edge of deletableEdges)
2403
2300
  edgeIds.has(edge.id) && !matchingEdges.find((e2) => e2.id === edge.id) && matchingEdges.push(edge);
2404
2301
  if (!onBeforeDelete)
@@ -2410,16 +2307,13 @@ async function getElementsToRemove({ nodesToRemove = [], edgesToRemove = [], nod
2410
2307
  nodes: matchingNodes,
2411
2308
  edges: matchingEdges
2412
2309
  });
2413
- return typeof onBeforeDeleteResult == "boolean" ? onBeforeDeleteResult ? { edges: matchingEdges, nodes: matchingNodes } : { edges: [], nodes: [] } :
2414
- onBeforeDeleteResult;
2310
+ return typeof onBeforeDeleteResult == "boolean" ? onBeforeDeleteResult ? { edges: matchingEdges, nodes: matchingNodes } : { edges: [], nodes: [] } : onBeforeDeleteResult;
2415
2311
  }
2416
2312
  const clamp = (val, min = 0, max = 1) => Math.min(Math.max(val, min), max), clampPosition = (position = { x: 0, y: 0 }, extent) => ({
2417
2313
  x: clamp(position.x, extent[0][0], extent[1][0]),
2418
2314
  y: clamp(position.y, extent[0][1], extent[1][1])
2419
- }), calcAutoPanVelocity = (value, min, max) => value < min ? clamp(Math.abs(value - min), 1, min) / min : value > max ? -clamp(Math.abs(value - max), 1,
2420
- min) / min : 0, calcAutoPan = (pos, bounds, speed = 15, distance2 = 40) => {
2421
- const xMovement = calcAutoPanVelocity(pos.x, distance2, bounds.width - distance2) * speed, yMovement = calcAutoPanVelocity(pos.y, distance2, bounds.
2422
- height - distance2) * speed;
2315
+ }), calcAutoPanVelocity = (value, min, max) => value < min ? clamp(Math.abs(value - min), 1, min) / min : value > max ? -clamp(Math.abs(value - max), 1, min) / min : 0, calcAutoPan = (pos, bounds, speed = 15, distance2 = 40) => {
2316
+ const xMovement = calcAutoPanVelocity(pos.x, distance2, bounds.width - distance2) * speed, yMovement = calcAutoPanVelocity(pos.y, distance2, bounds.height - distance2) * speed;
2423
2317
  return [xMovement, yMovement];
2424
2318
  }, getBoundsOfBoxes = (box1, box2) => ({
2425
2319
  x: Math.min(box1.x, box2.x),
@@ -2453,11 +2347,9 @@ min) / min : 0, calcAutoPan = (pos, bounds, speed = 15, distance2 = 40) => {
2453
2347
  y2: y + (node.measured?.height ?? node.height ?? node.initialHeight ?? 0)
2454
2348
  };
2455
2349
  }, getBoundsOfRects = (rect1, rect2) => boxToRect(getBoundsOfBoxes(rectToBox(rect1), rectToBox(rect2))), getOverlappingArea = (rectA, rectB) => {
2456
- const xOverlap = Math.max(0, Math.min(rectA.x + rectA.width, rectB.x + rectB.width) - Math.max(rectA.x, rectB.x)), yOverlap = Math.max(0, Math.min(rectA.
2457
- y + rectA.height, rectB.y + rectB.height) - Math.max(rectA.y, rectB.y));
2350
+ const xOverlap = Math.max(0, Math.min(rectA.x + rectA.width, rectB.x + rectB.width) - Math.max(rectA.x, rectB.x)), yOverlap = Math.max(0, Math.min(rectA.y + rectA.height, rectB.y + rectB.height) - Math.max(rectA.y, rectB.y));
2458
2351
  return Math.ceil(xOverlap * yOverlap);
2459
- }, isRectObject = (obj) => isNumeric(obj.width) && isNumeric(obj.height) && isNumeric(obj.x) && isNumeric(obj.y), isNumeric = (n2) => !isNaN(n2) && isFinite(
2460
- n2), devWarn = (id2, message) => {
2352
+ }, isRectObject = (obj) => isNumeric(obj.width) && isNumeric(obj.height) && isNumeric(obj.x) && isNumeric(obj.y), isNumeric = (n2) => !isNaN(n2) && isFinite(n2), devWarn = (id2, message) => {
2461
2353
  }, snapPosition = (position, snapGrid = [1, 1]) => ({
2462
2354
  x: snapGrid[0] * Math.round(position.x / snapGrid[0]),
2463
2355
  y: snapGrid[1] * Math.round(position.y / snapGrid[1])
@@ -2471,9 +2363,7 @@ n2), devWarn = (id2, message) => {
2471
2363
  x: x * tScale + tx,
2472
2364
  y: y * tScale + ty
2473
2365
  }), getViewportForBounds = (bounds, width, height, minZoom, maxZoom, padding) => {
2474
- const xZoom = width / (bounds.width * (1 + padding)), yZoom = height / (bounds.height * (1 + padding)), zoom2 = Math.min(xZoom, yZoom), clampedZoom = clamp(
2475
- zoom2, minZoom, maxZoom), boundsCenterX = bounds.x + bounds.width / 2, boundsCenterY = bounds.y + bounds.height / 2, x = width / 2 - boundsCenterX *
2476
- clampedZoom, y = height / 2 - boundsCenterY * clampedZoom;
2366
+ const xZoom = width / (bounds.width * (1 + padding)), yZoom = height / (bounds.height * (1 + padding)), zoom2 = Math.min(xZoom, yZoom), clampedZoom = clamp(zoom2, minZoom, maxZoom), boundsCenterX = bounds.x + bounds.width / 2, boundsCenterY = bounds.y + bounds.height / 2, x = width / 2 - boundsCenterX * clampedZoom, y = height / 2 - boundsCenterY * clampedZoom;
2477
2367
  return { x, y, zoom: clampedZoom };
2478
2368
  }, isMacOs = () => typeof navigator < "u" && navigator?.userAgent?.indexOf("Mac") >= 0;
2479
2369
  function isCoordinateExtent(extent) {
@@ -2495,15 +2385,13 @@ function evaluateAbsolutePosition(position, dimensions = { width: 0, height: 0 }
2495
2385
  const parent = nodeLookup.get(nextParentId);
2496
2386
  if (nextParentId = parent?.parentId, parent) {
2497
2387
  const origin = parent.origin || nodeOrigin;
2498
- positionAbsolute.x += parent.internals.positionAbsolute.x - (dimensions.width ?? 0) * origin[0], positionAbsolute.y += parent.internals.positionAbsolute.
2499
- y - (dimensions.height ?? 0) * origin[1];
2388
+ positionAbsolute.x += parent.internals.positionAbsolute.x - (dimensions.width ?? 0) * origin[0], positionAbsolute.y += parent.internals.positionAbsolute.y - (dimensions.height ?? 0) * origin[1];
2500
2389
  }
2501
2390
  }
2502
2391
  return positionAbsolute;
2503
2392
  }
2504
2393
  function getPointerPosition(event, { snapGrid = [0, 0], snapToGrid = !1, transform: transform2 }) {
2505
- const { x, y } = getEventPosition(event), pointerPos = pointToRendererPoint({ x, y }, transform2), { x: xSnapped, y: ySnapped } = snapToGrid ? snapPosition(
2506
- pointerPos, snapGrid) : pointerPos;
2394
+ const { x, y } = getEventPosition(event), pointerPos = pointToRendererPoint({ x, y }, transform2), { x: xSnapped, y: ySnapped } = snapToGrid ? snapPosition(pointerPos, snapGrid) : pointerPos;
2507
2395
  return {
2508
2396
  xSnapped,
2509
2397
  ySnapped,
@@ -2519,8 +2407,7 @@ function isInputDOMNode(event) {
2519
2407
  return inputTags.includes(target?.nodeName) || target?.hasAttribute("contenteditable") || !!target?.closest(".nokey");
2520
2408
  }
2521
2409
  const isMouseEvent = (event) => "clientX" in event, getEventPosition = (event, bounds) => {
2522
- const isMouse = isMouseEvent(event), evtX = isMouse ? event.clientX : event.touches?.[0].clientX, evtY = isMouse ? event.clientY : event.touches?.[0].
2523
- clientY;
2410
+ const isMouse = isMouseEvent(event), evtX = isMouse ? event.clientX : event.touches?.[0].clientX, evtY = isMouse ? event.clientY : event.touches?.[0].clientY;
2524
2411
  return {
2525
2412
  x: evtX - (bounds?.left ?? 0),
2526
2413
  y: evtY - (bounds?.top ?? 0)
@@ -2541,8 +2428,7 @@ const isMouseEvent = (event) => "clientX" in event, getEventPosition = (event, b
2541
2428
  });
2542
2429
  };
2543
2430
  function getBezierEdgeCenter({ sourceX, sourceY, targetX, targetY, sourceControlX, sourceControlY, targetControlX, targetControlY }) {
2544
- const centerX = sourceX * 0.125 + sourceControlX * 0.375 + targetControlX * 0.375 + targetX * 0.125, centerY = sourceY * 0.125 + sourceControlY * 0.375 +
2545
- targetControlY * 0.375 + targetY * 0.125, offsetX = Math.abs(centerX - sourceX), offsetY = Math.abs(centerY - sourceY);
2431
+ const centerX = sourceX * 0.125 + sourceControlX * 0.375 + targetControlX * 0.375 + targetX * 0.125, centerY = sourceY * 0.125 + sourceControlY * 0.375 + targetControlY * 0.375 + targetY * 0.125, offsetX = Math.abs(centerX - sourceX), offsetY = Math.abs(centerY - sourceY);
2546
2432
  return [centerX, centerY, offsetX, offsetY];
2547
2433
  }
2548
2434
  function calculateControlOffset(distance2, curvature) {
@@ -2594,15 +2480,13 @@ function getBezierPath({ sourceX, sourceY, sourcePosition = Position.Bottom, tar
2594
2480
  ];
2595
2481
  }
2596
2482
  function getEdgeCenter({ sourceX, sourceY, targetX, targetY }) {
2597
- const xOffset = Math.abs(targetX - sourceX) / 2, centerX = targetX < sourceX ? targetX + xOffset : targetX - xOffset, yOffset = Math.abs(targetY - sourceY) /
2598
- 2, centerY = targetY < sourceY ? targetY + yOffset : targetY - yOffset;
2483
+ const xOffset = Math.abs(targetX - sourceX) / 2, centerX = targetX < sourceX ? targetX + xOffset : targetX - xOffset, yOffset = Math.abs(targetY - sourceY) / 2, centerY = targetY < sourceY ? targetY + yOffset : targetY - yOffset;
2599
2484
  return [centerX, centerY, xOffset, yOffset];
2600
2485
  }
2601
2486
  function getElevatedEdgeZIndex({ sourceNode, targetNode, selected: selected2 = !1, zIndex = 0, elevateOnSelect = !1 }) {
2602
2487
  if (!elevateOnSelect)
2603
2488
  return zIndex;
2604
- const edgeOrConnectedNodeSelected = selected2 || targetNode.selected || sourceNode.selected, selectedZIndex = Math.max(sourceNode.internals.z || 0, targetNode.
2605
- internals.z || 0, 1e3);
2489
+ const edgeOrConnectedNodeSelected = selected2 || targetNode.selected || sourceNode.selected, selectedZIndex = Math.max(sourceNode.internals.z || 0, targetNode.internals.z || 0, 1e3);
2606
2490
  return zIndex + (edgeOrConnectedNodeSelected ? selectedZIndex : 0);
2607
2491
  }
2608
2492
  function isEdgeVisible({ sourceNode, targetNode, width, height, transform: transform2 }) {
@@ -2616,17 +2500,14 @@ function isEdgeVisible({ sourceNode, targetNode, width, height, transform: trans
2616
2500
  };
2617
2501
  return getOverlappingArea(viewRect, boxToRect(edgeBox)) > 0;
2618
2502
  }
2619
- const getEdgeId = ({ source, sourceHandle, target, targetHandle }) => `xy-edge__${source}${sourceHandle || ""}-${target}${targetHandle || ""}`, connectionExists = (edge, edges) => edges.
2620
- some((el) => el.source === edge.source && el.target === edge.target && (el.sourceHandle === edge.sourceHandle || !el.sourceHandle && !edge.sourceHandle) &&
2621
- (el.targetHandle === edge.targetHandle || !el.targetHandle && !edge.targetHandle)), addEdge = (edgeParams, edges) => {
2503
+ const getEdgeId = ({ source, sourceHandle, target, targetHandle }) => `xy-edge__${source}${sourceHandle || ""}-${target}${targetHandle || ""}`, connectionExists = (edge, edges) => edges.some((el) => el.source === edge.source && el.target === edge.target && (el.sourceHandle === edge.sourceHandle || !el.sourceHandle && !edge.sourceHandle) && (el.targetHandle === edge.targetHandle || !el.targetHandle && !edge.targetHandle)), addEdge = (edgeParams, edges) => {
2622
2504
  if (!edgeParams.source || !edgeParams.target)
2623
2505
  return edges;
2624
2506
  let edge;
2625
2507
  return isEdgeBase(edgeParams) ? edge = { ...edgeParams } : edge = {
2626
2508
  ...edgeParams,
2627
2509
  id: getEdgeId(edgeParams)
2628
- }, connectionExists(edge, edges) ? edges : (edge.sourceHandle === null && delete edge.sourceHandle, edge.targetHandle === null && delete edge.targetHandle,
2629
- edges.concat(edge));
2510
+ }, connectionExists(edge, edges) ? edges : (edge.sourceHandle === null && delete edge.sourceHandle, edge.targetHandle === null && delete edge.targetHandle, edges.concat(edge));
2630
2511
  };
2631
2512
  function getStraightPath({ sourceX, sourceY, targetX, targetY }) {
2632
2513
  const [labelX, labelY, offsetX, offsetY] = getEdgeCenter({
@@ -2642,20 +2523,15 @@ const handleDirections = {
2642
2523
  [Position.Right]: { x: 1, y: 0 },
2643
2524
  [Position.Top]: { x: 0, y: -1 },
2644
2525
  [Position.Bottom]: { x: 0, y: 1 }
2645
- }, getDirection = ({ source, sourcePosition = Position.Bottom, target }) => sourcePosition === Position.Left || sourcePosition === Position.Right ? source.
2646
- x < target.x ? { x: 1, y: 0 } : { x: -1, y: 0 } : source.y < target.y ? { x: 0, y: 1 } : { x: 0, y: -1 }, distance = (a, b) => Math.sqrt(Math.pow(b.x -
2647
- a.x, 2) + Math.pow(b.y - a.y, 2));
2526
+ }, getDirection = ({ source, sourcePosition = Position.Bottom, target }) => sourcePosition === Position.Left || sourcePosition === Position.Right ? source.x < target.x ? { x: 1, y: 0 } : { x: -1, y: 0 } : source.y < target.y ? { x: 0, y: 1 } : { x: 0, y: -1 }, distance = (a, b) => Math.sqrt(Math.pow(b.x - a.x, 2) + Math.pow(b.y - a.y, 2));
2648
2527
  function getPoints({ source, sourcePosition = Position.Bottom, target, targetPosition = Position.Top, center, offset }) {
2649
- const sourceDir = handleDirections[sourcePosition], targetDir = handleDirections[targetPosition], sourceGapped = { x: source.x + sourceDir.x * offset,
2650
- y: source.y + sourceDir.y * offset }, targetGapped = { x: target.x + targetDir.x * offset, y: target.y + targetDir.y * offset }, dir = getDirection(
2651
- {
2528
+ const sourceDir = handleDirections[sourcePosition], targetDir = handleDirections[targetPosition], sourceGapped = { x: source.x + sourceDir.x * offset, y: source.y + sourceDir.y * offset }, targetGapped = { x: target.x + targetDir.x * offset, y: target.y + targetDir.y * offset }, dir = getDirection({
2652
2529
  source: sourceGapped,
2653
2530
  sourcePosition,
2654
2531
  target: targetGapped
2655
2532
  }), dirAccessor = dir.x !== 0 ? "x" : "y", currDir = dir[dirAccessor];
2656
2533
  let points = [], centerX, centerY;
2657
- const sourceGapOffset = { x: 0, y: 0 }, targetGapOffset = { x: 0, y: 0 }, [defaultCenterX, defaultCenterY, defaultOffsetX, defaultOffsetY] = getEdgeCenter(
2658
- {
2534
+ const sourceGapOffset = { x: 0, y: 0 }, targetGapOffset = { x: 0, y: 0 }, [defaultCenterX, defaultCenterY, defaultOffsetX, defaultOffsetY] = getEdgeCenter({
2659
2535
  sourceX: source.x,
2660
2536
  sourceY: source.y,
2661
2537
  targetX: target.x,
@@ -2670,30 +2546,22 @@ function getPoints({ source, sourcePosition = Position.Bottom, target, targetPos
2670
2546
  { x: sourceGapped.x, y: centerY },
2671
2547
  { x: targetGapped.x, y: centerY }
2672
2548
  ];
2673
- sourceDir[dirAccessor] === currDir ? points = dirAccessor === "x" ? verticalSplit : horizontalSplit : points = dirAccessor === "x" ? horizontalSplit :
2674
- verticalSplit;
2549
+ sourceDir[dirAccessor] === currDir ? points = dirAccessor === "x" ? verticalSplit : horizontalSplit : points = dirAccessor === "x" ? horizontalSplit : verticalSplit;
2675
2550
  } else {
2676
2551
  const sourceTarget = [{ x: sourceGapped.x, y: targetGapped.y }], targetSource = [{ x: targetGapped.x, y: sourceGapped.y }];
2677
- if (dirAccessor === "x" ? points = sourceDir.x === currDir ? targetSource : sourceTarget : points = sourceDir.y === currDir ? sourceTarget : targetSource,
2678
- sourcePosition === targetPosition) {
2552
+ if (dirAccessor === "x" ? points = sourceDir.x === currDir ? targetSource : sourceTarget : points = sourceDir.y === currDir ? sourceTarget : targetSource, sourcePosition === targetPosition) {
2679
2553
  const diff = Math.abs(source[dirAccessor] - target[dirAccessor]);
2680
2554
  if (diff <= offset) {
2681
2555
  const gapOffset = Math.min(offset - 1, offset - diff);
2682
- sourceDir[dirAccessor] === currDir ? sourceGapOffset[dirAccessor] = (sourceGapped[dirAccessor] > source[dirAccessor] ? -1 : 1) * gapOffset : targetGapOffset[dirAccessor] =
2683
- (targetGapped[dirAccessor] > target[dirAccessor] ? -1 : 1) * gapOffset;
2556
+ sourceDir[dirAccessor] === currDir ? sourceGapOffset[dirAccessor] = (sourceGapped[dirAccessor] > source[dirAccessor] ? -1 : 1) * gapOffset : targetGapOffset[dirAccessor] = (targetGapped[dirAccessor] > target[dirAccessor] ? -1 : 1) * gapOffset;
2684
2557
  }
2685
2558
  }
2686
2559
  if (sourcePosition !== targetPosition) {
2687
- const dirAccessorOpposite = dirAccessor === "x" ? "y" : "x", isSameDir = sourceDir[dirAccessor] === targetDir[dirAccessorOpposite], sourceGtTargetOppo = sourceGapped[dirAccessorOpposite] >
2688
- targetGapped[dirAccessorOpposite], sourceLtTargetOppo = sourceGapped[dirAccessorOpposite] < targetGapped[dirAccessorOpposite];
2689
- (sourceDir[dirAccessor] === 1 && (!isSameDir && sourceGtTargetOppo || isSameDir && sourceLtTargetOppo) || sourceDir[dirAccessor] !== 1 && (!isSameDir &&
2690
- sourceLtTargetOppo || isSameDir && sourceGtTargetOppo)) && (points = dirAccessor === "x" ? sourceTarget : targetSource);
2560
+ const dirAccessorOpposite = dirAccessor === "x" ? "y" : "x", isSameDir = sourceDir[dirAccessor] === targetDir[dirAccessorOpposite], sourceGtTargetOppo = sourceGapped[dirAccessorOpposite] > targetGapped[dirAccessorOpposite], sourceLtTargetOppo = sourceGapped[dirAccessorOpposite] < targetGapped[dirAccessorOpposite];
2561
+ (sourceDir[dirAccessor] === 1 && (!isSameDir && sourceGtTargetOppo || isSameDir && sourceLtTargetOppo) || sourceDir[dirAccessor] !== 1 && (!isSameDir && sourceLtTargetOppo || isSameDir && sourceGtTargetOppo)) && (points = dirAccessor === "x" ? sourceTarget : targetSource);
2691
2562
  }
2692
- const sourceGapPoint = { x: sourceGapped.x + sourceGapOffset.x, y: sourceGapped.y + sourceGapOffset.y }, targetGapPoint = { x: targetGapped.x + targetGapOffset.
2693
- x, y: targetGapped.y + targetGapOffset.y }, maxXDistance = Math.max(Math.abs(sourceGapPoint.x - points[0].x), Math.abs(targetGapPoint.x - points[0].
2694
- x)), maxYDistance = Math.max(Math.abs(sourceGapPoint.y - points[0].y), Math.abs(targetGapPoint.y - points[0].y));
2695
- maxXDistance >= maxYDistance ? (centerX = (sourceGapPoint.x + targetGapPoint.x) / 2, centerY = points[0].y) : (centerX = points[0].x, centerY = (sourceGapPoint.
2696
- y + targetGapPoint.y) / 2);
2563
+ const sourceGapPoint = { x: sourceGapped.x + sourceGapOffset.x, y: sourceGapped.y + sourceGapOffset.y }, targetGapPoint = { x: targetGapped.x + targetGapOffset.x, y: targetGapped.y + targetGapOffset.y }, maxXDistance = Math.max(Math.abs(sourceGapPoint.x - points[0].x), Math.abs(targetGapPoint.x - points[0].x)), maxYDistance = Math.max(Math.abs(sourceGapPoint.y - points[0].y), Math.abs(targetGapPoint.y - points[0].y));
2564
+ maxXDistance >= maxYDistance ? (centerX = (sourceGapPoint.x + targetGapPoint.x) / 2, centerY = points[0].y) : (centerX = points[0].x, centerY = (sourceGapPoint.y + targetGapPoint.y) / 2);
2697
2565
  }
2698
2566
  return [[
2699
2567
  source,
@@ -2714,8 +2582,7 @@ function getBend(a, b, c, size) {
2714
2582
  const xDir = a.x < c.x ? 1 : -1, yDir = a.y < c.y ? -1 : 1;
2715
2583
  return `L ${x},${y + bendSize * yDir}Q ${x},${y} ${x + bendSize * xDir},${y}`;
2716
2584
  }
2717
- function getSmoothStepPath({ sourceX, sourceY, sourcePosition = Position.Bottom, targetX, targetY, targetPosition = Position.Top, borderRadius = 5, centerX,
2718
- centerY, offset = 20 }) {
2585
+ function getSmoothStepPath({ sourceX, sourceY, sourcePosition = Position.Bottom, targetX, targetY, targetPosition = Position.Top, borderRadius = 5, centerX, centerY, offset = 20 }) {
2719
2586
  const [points, labelX, labelY, offsetX, offsetY] = getPoints({
2720
2587
  source: { x: sourceX, y: sourceY },
2721
2588
  sourcePosition,
@@ -2726,8 +2593,7 @@ centerY, offset = 20 }) {
2726
2593
  });
2727
2594
  return [points.reduce((res, p2, i) => {
2728
2595
  let segment = "";
2729
- return i > 0 && i < points.length - 1 ? segment = getBend(points[i - 1], p2, points[i + 1], borderRadius) : segment = `${i === 0 ? "M" : "L"}${p2.
2730
- x} ${p2.y}`, res += segment, res;
2596
+ return i > 0 && i < points.length - 1 ? segment = getBend(points[i - 1], p2, points[i + 1], borderRadius) : segment = `${i === 0 ? "M" : "L"}${p2.x} ${p2.y}`, res += segment, res;
2731
2597
  }, ""), labelX, labelY, offsetX, offsetY];
2732
2598
  }
2733
2599
  function isNodeInitialized(node) {
@@ -2737,11 +2603,9 @@ function getEdgePosition(params) {
2737
2603
  const { sourceNode, targetNode } = params;
2738
2604
  if (!isNodeInitialized(sourceNode) || !isNodeInitialized(targetNode))
2739
2605
  return null;
2740
- const sourceHandleBounds = sourceNode.internals.handleBounds || toHandleBounds(sourceNode.handles), targetHandleBounds = targetNode.internals.handleBounds ||
2741
- toHandleBounds(targetNode.handles), sourceHandle = getHandle(sourceHandleBounds?.source ?? [], params.sourceHandle), targetHandle = getHandle(
2606
+ const sourceHandleBounds = sourceNode.internals.handleBounds || toHandleBounds(sourceNode.handles), targetHandleBounds = targetNode.internals.handleBounds || toHandleBounds(targetNode.handles), sourceHandle = getHandle(sourceHandleBounds?.source ?? [], params.sourceHandle), targetHandle = getHandle(
2742
2607
  // when connection type is loose we can define all handles as sources and connect source -> source
2743
- params.connectionMode === ConnectionMode.Strict ? targetHandleBounds?.target ?? [] : (targetHandleBounds?.target ?? []).concat(targetHandleBounds?.
2744
- source ?? []),
2608
+ params.connectionMode === ConnectionMode.Strict ? targetHandleBounds?.target ?? [] : (targetHandleBounds?.target ?? []).concat(targetHandleBounds?.source ?? []),
2745
2609
  params.targetHandle
2746
2610
  );
2747
2611
  if (!sourceHandle || !targetHandle)
@@ -2750,8 +2614,7 @@ function getEdgePosition(params) {
2750
2614
  sourceHandle: params.sourceHandle,
2751
2615
  targetHandle: params.targetHandle
2752
2616
  })), null;
2753
- const sourcePosition = sourceHandle?.position || Position.Bottom, targetPosition = targetHandle?.position || Position.Top, source = getHandlePosition(
2754
- sourceNode, sourceHandle, sourcePosition), target = getHandlePosition(targetNode, targetHandle, targetPosition);
2617
+ const sourcePosition = sourceHandle?.position || Position.Bottom, targetPosition = targetHandle?.position || Position.Top, source = getHandlePosition(sourceNode, sourceHandle, sourcePosition), target = getHandlePosition(targetNode, targetHandle, targetPosition);
2755
2618
  return {
2756
2619
  sourceX: source.x,
2757
2620
  sourceY: source.y,
@@ -2766,16 +2629,14 @@ function toHandleBounds(handles) {
2766
2629
  return null;
2767
2630
  const source = [], target = [];
2768
2631
  for (const handle of handles)
2769
- handle.width = handle.width ?? 1, handle.height = handle.height ?? 1, handle.type === "source" ? source.push(handle) : handle.type === "target" &&
2770
- target.push(handle);
2632
+ handle.width = handle.width ?? 1, handle.height = handle.height ?? 1, handle.type === "source" ? source.push(handle) : handle.type === "target" && target.push(handle);
2771
2633
  return {
2772
2634
  source,
2773
2635
  target
2774
2636
  };
2775
2637
  }
2776
2638
  function getHandlePosition(node, handle, fallbackPosition = Position.Left, center = !1) {
2777
- const x = (handle?.x ?? 0) + node.internals.positionAbsolute.x, y = (handle?.y ?? 0) + node.internals.positionAbsolute.y, { width, height } = handle ??
2778
- getNodeDimensions(node);
2639
+ const x = (handle?.x ?? 0) + node.internals.positionAbsolute.x, y = (handle?.y ?? 0) + node.internals.positionAbsolute.y, { width, height } = handle ?? getNodeDimensions(node);
2779
2640
  if (center)
2780
2641
  return { x: x + width / 2, y: y + height / 2 };
2781
2642
  switch (handle?.position ?? fallbackPosition) {
@@ -2793,8 +2654,7 @@ function getHandle(bounds, handleId) {
2793
2654
  return bounds && (handleId ? bounds.find((d) => d.id === handleId) : bounds[0]) || null;
2794
2655
  }
2795
2656
  function getMarkerId(marker, id2) {
2796
- return marker ? typeof marker == "string" ? marker : `${id2 ? `${id2}__` : ""}${Object.keys(marker).sort().map((key) => `${key}=${marker[key]}`).join(
2797
- "&")}` : "";
2657
+ return marker ? typeof marker == "string" ? marker : `${id2 ? `${id2}__` : ""}${Object.keys(marker).sort().map((key) => `${key}=${marker[key]}`).join("&")}` : "";
2798
2658
  }
2799
2659
  function createMarkerIds(edges, { id: id2, defaultColor, defaultMarkerStart, defaultMarkerEnd }) {
2800
2660
  const ids = /* @__PURE__ */ new Set();
@@ -2849,8 +2709,7 @@ function updateChildPosition(node, nodeLookup, parentLookup, options) {
2849
2709
  }
2850
2710
  const childNodes = parentLookup.get(parentId);
2851
2711
  childNodes ? childNodes.set(node.id, node) : parentLookup.set(parentId, /* @__PURE__ */ new Map([[node.id, node]]));
2852
- const selectedNodeZ = options?.elevateNodesOnSelect ? 1e3 : 0, { x, y, z } = calculateChildXYZ(node, parentNode, _options.nodeOrigin, selectedNodeZ),
2853
- currPosition = node.internals.positionAbsolute, positionChanged = x !== currPosition.x || y !== currPosition.y;
2712
+ const selectedNodeZ = options?.elevateNodesOnSelect ? 1e3 : 0, { x, y, z } = calculateChildXYZ(node, parentNode, _options.nodeOrigin, selectedNodeZ), currPosition = node.internals.positionAbsolute, positionChanged = x !== currPosition.x || y !== currPosition.y;
2854
2713
  (positionChanged || z !== node.internals.z) && (node.internals = {
2855
2714
  ...node.internals,
2856
2715
  positionAbsolute: positionChanged ? { x, y } : currPosition,
@@ -2861,8 +2720,7 @@ function calculateZ(node, selectedNodeZ) {
2861
2720
  return (isNumeric(node.zIndex) ? node.zIndex : 0) + (node.selected ? selectedNodeZ : 0);
2862
2721
  }
2863
2722
  function calculateChildXYZ(childNode, parentNode, nodeOrigin, selectedNodeZ) {
2864
- const position = getNodePositionWithOrigin(childNode, nodeOrigin), childZ = calculateZ(childNode, selectedNodeZ), parentZ = parentNode.internals.z ??
2865
- 0;
2723
+ const position = getNodePositionWithOrigin(childNode, nodeOrigin), childZ = calculateZ(childNode, selectedNodeZ), parentZ = parentNode.internals.z ?? 0;
2866
2724
  return {
2867
2725
  x: parentNode.internals.positionAbsolute.x + position.x,
2868
2726
  y: parentNode.internals.positionAbsolute.y + position.y,
@@ -2879,11 +2737,7 @@ function handleExpandParent(children2, nodeLookup, parentLookup, nodeOrigin = [0
2879
2737
  parentExpansions.set(child.parentId, { expandedRect, parent });
2880
2738
  }
2881
2739
  return parentExpansions.size > 0 && parentExpansions.forEach(({ expandedRect, parent }, parentId) => {
2882
- const positionAbsolute = parent.internals.positionAbsolute, dimensions = getNodeDimensions(parent), origin = parent.origin ?? nodeOrigin, xChange = expandedRect.
2883
- x < positionAbsolute.x ? Math.round(Math.abs(positionAbsolute.x - expandedRect.x)) : 0, yChange = expandedRect.y < positionAbsolute.y ? Math.round(
2884
- Math.abs(positionAbsolute.y - expandedRect.y)) : 0, newWidth = Math.max(dimensions.width, Math.round(expandedRect.width)), newHeight = Math.max(dimensions.
2885
- height, Math.round(expandedRect.height)), widthChange = (newWidth - dimensions.width) * origin[0], heightChange = (newHeight - dimensions.height) *
2886
- origin[1];
2740
+ const positionAbsolute = parent.internals.positionAbsolute, dimensions = getNodeDimensions(parent), origin = parent.origin ?? nodeOrigin, xChange = expandedRect.x < positionAbsolute.x ? Math.round(Math.abs(positionAbsolute.x - expandedRect.x)) : 0, yChange = expandedRect.y < positionAbsolute.y ? Math.round(Math.abs(positionAbsolute.y - expandedRect.y)) : 0, newWidth = Math.max(dimensions.width, Math.round(expandedRect.width)), newHeight = Math.max(dimensions.height, Math.round(expandedRect.height)), widthChange = (newWidth - dimensions.width) * origin[0], heightChange = (newHeight - dimensions.height) * origin[1];
2887
2741
  (xChange > 0 || yChange > 0 || widthChange || heightChange) && (changes.push({
2888
2742
  id: parentId,
2889
2743
  type: "position",
@@ -2926,8 +2780,7 @@ function updateNodeInternals(updates, nodeLookup, parentLookup, domNode, nodeOri
2926
2780
  handleBounds: void 0
2927
2781
  }, updatedInternals = !0;
2928
2782
  else {
2929
- const dimensions = getDimensions(update.nodeElement), dimensionChanged = node.measured.width !== dimensions.width || node.measured.height !== dimensions.
2930
- height;
2783
+ const dimensions = getDimensions(update.nodeElement), dimensionChanged = node.measured.width !== dimensions.width || node.measured.height !== dimensions.height;
2931
2784
  if (!!(dimensions.width && dimensions.height && (dimensionChanged || !node.internals.handleBounds || update.force))) {
2932
2785
  const nodeBounds = update.nodeElement.getBoundingClientRect();
2933
2786
  node.measured = dimensions, node.internals = {
@@ -2937,8 +2790,7 @@ function updateNodeInternals(updates, nodeLookup, parentLookup, domNode, nodeOri
2937
2790
  source: getHandleBounds("source", update.nodeElement, nodeBounds, zoom2, node.id),
2938
2791
  target: getHandleBounds("target", update.nodeElement, nodeBounds, zoom2, node.id)
2939
2792
  }
2940
- }, node.parentId && updateChildPosition(node, nodeLookup, parentLookup, { nodeOrigin }), updatedInternals = !0, dimensionChanged && (changes.
2941
- push({
2793
+ }, node.parentId && updateChildPosition(node, nodeLookup, parentLookup, { nodeOrigin }), updatedInternals = !0, dimensionChanged && (changes.push({
2942
2794
  id: node.id,
2943
2795
  type: "dimensions",
2944
2796
  dimensions
@@ -2966,18 +2818,14 @@ async function panBy({ delta, panZoom, transform: transform2, translateExtent, w
2966
2818
  }, [
2967
2819
  [0, 0],
2968
2820
  [width, height]
2969
- ], translateExtent), transformChanged = !!nextViewport && (nextViewport.x !== transform2[0] || nextViewport.y !== transform2[1] || nextViewport.k !==
2970
- transform2[2]);
2821
+ ], translateExtent), transformChanged = !!nextViewport && (nextViewport.x !== transform2[0] || nextViewport.y !== transform2[1] || nextViewport.k !== transform2[2]);
2971
2822
  return Promise.resolve(transformChanged);
2972
2823
  }
2973
2824
  function updateConnectionLookup(connectionLookup, edgeLookup, edges) {
2974
2825
  connectionLookup.clear(), edgeLookup.clear();
2975
2826
  for (const edge of edges) {
2976
- const { source, target, sourceHandle = null, targetHandle = null } = edge, sourceKey = `${source}-source-${sourceHandle}`, targetKey = `${target}-\
2977
- target-${targetHandle}`, prevSource = connectionLookup.get(sourceKey) || /* @__PURE__ */ new Map(), prevTarget = connectionLookup.get(targetKey) || /* @__PURE__ */ new Map(),
2978
- connection = { edgeId: edge.id, source, target, sourceHandle, targetHandle };
2979
- edgeLookup.set(edge.id, edge), connectionLookup.set(sourceKey, prevSource.set(`${target}-${targetHandle}`, connection)), connectionLookup.set(targetKey,
2980
- prevTarget.set(`${source}-${sourceHandle}`, connection));
2827
+ const { source, target, sourceHandle = null, targetHandle = null } = edge, sourceKey = `${source}-source-${sourceHandle}`, targetKey = `${target}-target-${targetHandle}`, prevSource = connectionLookup.get(sourceKey) || /* @__PURE__ */ new Map(), prevTarget = connectionLookup.get(targetKey) || /* @__PURE__ */ new Map(), connection = { edgeId: edge.id, source, target, sourceHandle, targetHandle };
2828
+ edgeLookup.set(edge.id, edge), connectionLookup.set(sourceKey, prevSource.set(`${target}-${targetHandle}`, connection)), connectionLookup.set(targetKey, prevTarget.set(`${source}-${sourceHandle}`, connection));
2981
2829
  }
2982
2830
  }
2983
2831
  function shallowNodeData(a, b) {
@@ -3011,8 +2859,7 @@ function hasSelector(target, selector2, domNode) {
3011
2859
  function getDragItems(nodeLookup, nodesDraggable, mousePos, nodeId) {
3012
2860
  const dragItems = /* @__PURE__ */ new Map();
3013
2861
  for (const [id2, node] of nodeLookup)
3014
- if ((node.selected || node.id === nodeId) && (!node.parentId || !isParentSelected(node, nodeLookup)) && (node.draggable || nodesDraggable && typeof node.
3015
- draggable > "u")) {
2862
+ if ((node.selected || node.id === nodeId) && (!node.parentId || !isParentSelected(node, nodeLookup)) && (node.draggable || nodesDraggable && typeof node.draggable > "u")) {
3016
2863
  const internalNode = nodeLookup.get(id2);
3017
2864
  internalNode && dragItems.set(id2, {
3018
2865
  id: id2,
@@ -3059,8 +2906,7 @@ function getEventHandlerParams({ nodeId, dragItems, nodeLookup, dragging = !0 })
3059
2906
  ];
3060
2907
  }
3061
2908
  function XYDrag({ onNodeMouseDown, getStoreItems, onDragStart, onDrag, onDragStop }) {
3062
- let lastPos = { x: null, y: null }, autoPanId = 0, dragItems = /* @__PURE__ */ new Map(), autoPanStarted = !1, mousePosition = { x: 0, y: 0 }, containerBounds = null,
3063
- dragStarted = !1, d3Selection = null, abortDrag = !1;
2909
+ let lastPos = { x: null, y: null }, autoPanId = 0, dragItems = /* @__PURE__ */ new Map(), autoPanStarted = !1, mousePosition = { x: 0, y: 0 }, containerBounds = null, dragStarted = !1, d3Selection = null, abortDrag = !1;
3064
2910
  function update({ noDragClassName, handleSelector, domNode, isSelectable, nodeId, nodeClickDistance = 0 }) {
3065
2911
  d3Selection = select(domNode);
3066
2912
  function updateNodes({ x, y }, dragEvent) {
@@ -3079,9 +2925,7 @@ function XYDrag({ onNodeMouseDown, getStoreItems, onDragStart, onDrag, onDragSto
3079
2925
  [nodeExtent[1][0], nodeExtent[1][1]]
3080
2926
  ];
3081
2927
  if (dragItems.size > 1 && nodeExtent && !dragItem.extent) {
3082
- const { positionAbsolute: positionAbsolute2 } = dragItem.internals, x1 = positionAbsolute2.x - nodesBox.x + nodeExtent[0][0], x2 = positionAbsolute2.
3083
- x + dragItem.measured.width - nodesBox.x2 + nodeExtent[1][0], y1 = positionAbsolute2.y - nodesBox.y + nodeExtent[0][1], y2 = positionAbsolute2.
3084
- y + dragItem.measured.height - nodesBox.y2 + nodeExtent[1][1];
2928
+ const { positionAbsolute: positionAbsolute2 } = dragItem.internals, x1 = positionAbsolute2.x - nodesBox.x + nodeExtent[0][0], x2 = positionAbsolute2.x + dragItem.measured.width - nodesBox.x2 + nodeExtent[1][0], y1 = positionAbsolute2.y - nodesBox.y + nodeExtent[0][1], y2 = positionAbsolute2.y + dragItem.measured.height - nodesBox.y2 + nodeExtent[1][1];
3085
2929
  adjustedNodeExtent = [
3086
2930
  [x1, y1],
3087
2931
  [x2, y2]
@@ -3095,8 +2939,7 @@ function XYDrag({ onNodeMouseDown, getStoreItems, onDragStart, onDrag, onDragSto
3095
2939
  nodeOrigin,
3096
2940
  onError
3097
2941
  });
3098
- hasChange = hasChange || dragItem.position.x !== position.x || dragItem.position.y !== position.y, dragItem.position = position, dragItem.internals.
3099
- positionAbsolute = positionAbsolute;
2942
+ hasChange = hasChange || dragItem.position.x !== position.x || dragItem.position.y !== position.y, dragItem.position = position, dragItem.internals.positionAbsolute = positionAbsolute;
3100
2943
  }
3101
2944
  if (hasChange && (updateNodePositions(dragItems, !0), dragEvent && (onDrag || onNodeDrag || !nodeId && onSelectionDrag))) {
3102
2945
  const [currentNode, currentNodes] = getEventHandlerParams({
@@ -3104,49 +2947,39 @@ function XYDrag({ onNodeMouseDown, getStoreItems, onDragStart, onDrag, onDragSto
3104
2947
  dragItems,
3105
2948
  nodeLookup
3106
2949
  });
3107
- onDrag?.(dragEvent, dragItems, currentNode, currentNodes), onNodeDrag?.(dragEvent, currentNode, currentNodes), nodeId || onSelectionDrag?.(dragEvent,
3108
- currentNodes);
2950
+ onDrag?.(dragEvent, dragItems, currentNode, currentNodes), onNodeDrag?.(dragEvent, currentNode, currentNodes), nodeId || onSelectionDrag?.(dragEvent, currentNodes);
3109
2951
  }
3110
2952
  }
3111
2953
  async function autoPan() {
3112
2954
  if (!containerBounds)
3113
2955
  return;
3114
- const { transform: transform2, panBy: panBy2, autoPanSpeed } = getStoreItems(), [xMovement, yMovement] = calcAutoPan(mousePosition, containerBounds,
3115
- autoPanSpeed);
3116
- (xMovement !== 0 || yMovement !== 0) && (lastPos.x = (lastPos.x ?? 0) - xMovement / transform2[2], lastPos.y = (lastPos.y ?? 0) - yMovement / transform2[2],
3117
- await panBy2({ x: xMovement, y: yMovement }) && updateNodes(lastPos, null)), autoPanId = requestAnimationFrame(autoPan);
2956
+ const { transform: transform2, panBy: panBy2, autoPanSpeed } = getStoreItems(), [xMovement, yMovement] = calcAutoPan(mousePosition, containerBounds, autoPanSpeed);
2957
+ (xMovement !== 0 || yMovement !== 0) && (lastPos.x = (lastPos.x ?? 0) - xMovement / transform2[2], lastPos.y = (lastPos.y ?? 0) - yMovement / transform2[2], await panBy2({ x: xMovement, y: yMovement }) && updateNodes(lastPos, null)), autoPanId = requestAnimationFrame(autoPan);
3118
2958
  }
3119
2959
  function startDrag(event) {
3120
- const { nodeLookup, multiSelectionActive, nodesDraggable, transform: transform2, snapGrid, snapToGrid, selectNodesOnDrag, onNodeDragStart, onSelectionDragStart,
3121
- unselectNodesAndEdges } = getStoreItems();
3122
- dragStarted = !0, (!selectNodesOnDrag || !isSelectable) && !multiSelectionActive && nodeId && (nodeLookup.get(nodeId)?.selected || unselectNodesAndEdges()),
3123
- isSelectable && selectNodesOnDrag && nodeId && onNodeMouseDown?.(nodeId);
2960
+ const { nodeLookup, multiSelectionActive, nodesDraggable, transform: transform2, snapGrid, snapToGrid, selectNodesOnDrag, onNodeDragStart, onSelectionDragStart, unselectNodesAndEdges } = getStoreItems();
2961
+ dragStarted = !0, (!selectNodesOnDrag || !isSelectable) && !multiSelectionActive && nodeId && (nodeLookup.get(nodeId)?.selected || unselectNodesAndEdges()), isSelectable && selectNodesOnDrag && nodeId && onNodeMouseDown?.(nodeId);
3124
2962
  const pointerPos = getPointerPosition(event.sourceEvent, { transform: transform2, snapGrid, snapToGrid });
3125
- if (lastPos = pointerPos, dragItems = getDragItems(nodeLookup, nodesDraggable, pointerPos, nodeId), dragItems.size > 0 && (onDragStart || onNodeDragStart ||
3126
- !nodeId && onSelectionDragStart)) {
2963
+ if (lastPos = pointerPos, dragItems = getDragItems(nodeLookup, nodesDraggable, pointerPos, nodeId), dragItems.size > 0 && (onDragStart || onNodeDragStart || !nodeId && onSelectionDragStart)) {
3127
2964
  const [currentNode, currentNodes] = getEventHandlerParams({
3128
2965
  nodeId,
3129
2966
  dragItems,
3130
2967
  nodeLookup
3131
2968
  });
3132
- onDragStart?.(event.sourceEvent, dragItems, currentNode, currentNodes), onNodeDragStart?.(event.sourceEvent, currentNode, currentNodes), nodeId ||
3133
- onSelectionDragStart?.(event.sourceEvent, currentNodes);
2969
+ onDragStart?.(event.sourceEvent, dragItems, currentNode, currentNodes), onNodeDragStart?.(event.sourceEvent, currentNode, currentNodes), nodeId || onSelectionDragStart?.(event.sourceEvent, currentNodes);
3134
2970
  }
3135
2971
  }
3136
2972
  const d3DragInstance = drag().clickDistance(nodeClickDistance).on("start", (event) => {
3137
2973
  const { domNode: domNode2, nodeDragThreshold, transform: transform2, snapGrid, snapToGrid } = getStoreItems();
3138
- abortDrag = !1, nodeDragThreshold === 0 && startDrag(event), lastPos = getPointerPosition(event.sourceEvent, { transform: transform2, snapGrid, snapToGrid }),
3139
- containerBounds = domNode2?.getBoundingClientRect() || null, mousePosition = getEventPosition(event.sourceEvent, containerBounds);
2974
+ abortDrag = !1, nodeDragThreshold === 0 && startDrag(event), lastPos = getPointerPosition(event.sourceEvent, { transform: transform2, snapGrid, snapToGrid }), containerBounds = domNode2?.getBoundingClientRect() || null, mousePosition = getEventPosition(event.sourceEvent, containerBounds);
3140
2975
  }).on("drag", (event) => {
3141
- const { autoPanOnNodeDrag, transform: transform2, snapGrid, snapToGrid, nodeDragThreshold } = getStoreItems(), pointerPos = getPointerPosition(event.
3142
- sourceEvent, { transform: transform2, snapGrid, snapToGrid });
2976
+ const { autoPanOnNodeDrag, transform: transform2, snapGrid, snapToGrid, nodeDragThreshold } = getStoreItems(), pointerPos = getPointerPosition(event.sourceEvent, { transform: transform2, snapGrid, snapToGrid });
3143
2977
  if (event.sourceEvent.type === "touchmove" && event.sourceEvent.touches.length > 1 && (abortDrag = !0), !abortDrag) {
3144
2978
  if (!autoPanStarted && autoPanOnNodeDrag && dragStarted && (autoPanStarted = !0, autoPan()), !dragStarted) {
3145
2979
  const x = pointerPos.xSnapped - (lastPos.x ?? 0), y = pointerPos.ySnapped - (lastPos.y ?? 0);
3146
2980
  Math.sqrt(x * x + y * y) > nodeDragThreshold && startDrag(event);
3147
2981
  }
3148
- (lastPos.x !== pointerPos.xSnapped || lastPos.y !== pointerPos.ySnapped) && dragItems && dragStarted && (mousePosition = getEventPosition(event.
3149
- sourceEvent, containerBounds), updateNodes(pointerPos, event.sourceEvent));
2982
+ (lastPos.x !== pointerPos.xSnapped || lastPos.y !== pointerPos.ySnapped) && dragItems && dragStarted && (mousePosition = getEventPosition(event.sourceEvent, containerBounds), updateNodes(pointerPos, event.sourceEvent));
3150
2983
  }
3151
2984
  }).on("end", (event) => {
3152
2985
  if (!(!dragStarted || abortDrag) && (autoPanStarted = !1, dragStarted = !1, cancelAnimationFrame(autoPanId), dragItems.size > 0)) {
@@ -3158,14 +2991,12 @@ function XYDrag({ onNodeMouseDown, getStoreItems, onDragStart, onDrag, onDragSto
3158
2991
  nodeLookup,
3159
2992
  dragging: !1
3160
2993
  });
3161
- onDragStop?.(event.sourceEvent, dragItems, currentNode, currentNodes), onNodeDragStop?.(event.sourceEvent, currentNode, currentNodes), nodeId ||
3162
- onSelectionDragStop?.(event.sourceEvent, currentNodes);
2994
+ onDragStop?.(event.sourceEvent, dragItems, currentNode, currentNodes), onNodeDragStop?.(event.sourceEvent, currentNode, currentNodes), nodeId || onSelectionDragStop?.(event.sourceEvent, currentNodes);
3163
2995
  }
3164
2996
  }
3165
2997
  }).filter((event) => {
3166
2998
  const target = event.target;
3167
- return !event.button && (!noDragClassName || !hasSelector(target, `.${noDragClassName}`, domNode)) && (!handleSelector || hasSelector(target, handleSelector,
3168
- domNode));
2999
+ return !event.button && (!noDragClassName || !hasSelector(target, `.${noDragClassName}`, domNode)) && (!handleSelector || hasSelector(target, handleSelector, domNode));
3169
3000
  });
3170
3001
  d3Selection.call(d3DragInstance);
3171
3002
  }
@@ -3193,8 +3024,7 @@ function getClosestHandle(pos, connectionRadius, handleLookup) {
3193
3024
  let closestHandles = [], minDistance = 1 / 0;
3194
3025
  for (const handle of handleLookup.values()) {
3195
3026
  const distance2 = Math.sqrt(Math.pow(handle.x - pos.x, 2) + Math.pow(handle.y - pos.y, 2));
3196
- distance2 <= connectionRadius && (distance2 < minDistance ? closestHandles = [handle] : distance2 === minDistance && closestHandles.push(handle), minDistance =
3197
- distance2);
3027
+ distance2 <= connectionRadius && (distance2 < minDistance ? closestHandles = [handle] : distance2 === minDistance && closestHandles.push(handle), minDistance = distance2);
3198
3028
  }
3199
3029
  return closestHandles.length ? closestHandles.length === 1 ? closestHandles[0] : (
3200
3030
  // if multiple handles are layouted on top of each other we take the one with type = target because it's more likely that the user wants to connect to this one
@@ -3206,10 +3036,8 @@ function getHandleLookup({ nodeLookup, nodeId, handleId, handleType }) {
3206
3036
  let matchingHandle = null;
3207
3037
  for (const node of nodeLookup.values())
3208
3038
  if (node.internals.handleBounds) {
3209
- const [sourceHandles, excludedSource] = getHandles(node, node.internals.handleBounds, "source", currentHandle), [targetHandles, excludedTarget] = getHandles(
3210
- node, node.internals.handleBounds, "target", currentHandle);
3211
- matchingHandle = matchingHandle || (excludedSource ?? excludedTarget), [...sourceHandles, ...targetHandles].forEach((handle) => connectionHandles.
3212
- set(`${handle.nodeId}-${handle.type}-${handle.id}`, handle));
3039
+ const [sourceHandles, excludedSource] = getHandles(node, node.internals.handleBounds, "source", currentHandle), [targetHandles, excludedTarget] = getHandles(node, node.internals.handleBounds, "target", currentHandle);
3040
+ matchingHandle = matchingHandle || (excludedSource ?? excludedTarget), [...sourceHandles, ...targetHandles].forEach((handle) => connectionHandles.set(`${handle.nodeId}-${handle.type}-${handle.id}`, handle));
3213
3041
  }
3214
3042
  if (!matchingHandle) {
3215
3043
  const node = nodeLookup.get(nodeId);
@@ -3229,13 +3057,10 @@ function isConnectionValid(isInsideConnectionRadius, isHandleValid) {
3229
3057
  return isHandleValid ? isValid = !0 : isInsideConnectionRadius && !isHandleValid && (isValid = !1), isValid;
3230
3058
  }
3231
3059
  const alwaysValid = () => !0;
3232
- function onPointerDown(event, { connectionMode, connectionRadius, handleId, nodeId, edgeUpdaterType, isTarget, domNode, nodeLookup, lib, autoPanOnConnect,
3233
- flowId, panBy: panBy2, cancelConnection, onConnectStart, onConnect, onConnectEnd, isValidConnection = alwaysValid, onReconnectEnd, updateConnection, getTransform,
3234
- getFromHandle, autoPanSpeed }) {
3060
+ function onPointerDown(event, { connectionMode, connectionRadius, handleId, nodeId, edgeUpdaterType, isTarget, domNode, nodeLookup, lib, autoPanOnConnect, flowId, panBy: panBy2, cancelConnection, onConnectStart, onConnect, onConnectEnd, isValidConnection = alwaysValid, onReconnectEnd, updateConnection, getTransform, getFromHandle, autoPanSpeed }) {
3235
3061
  const doc = getHostForElement(event.target);
3236
3062
  let autoPanId = 0, closestHandle;
3237
- const { x, y } = getEventPosition(event), clickedHandle = doc?.elementFromPoint(x, y), handleType = getHandleType(edgeUpdaterType, clickedHandle), containerBounds = domNode?.
3238
- getBoundingClientRect();
3063
+ const { x, y } = getEventPosition(event), clickedHandle = doc?.elementFromPoint(x, y), handleType = getHandleType(edgeUpdaterType, clickedHandle), containerBounds = domNode?.getBoundingClientRect();
3239
3064
  if (!containerBounds || !handleType)
3240
3065
  return;
3241
3066
  let position = getEventPosition(event, containerBounds), autoPanStarted = !1, connection = null, isValid = !1, handleDomNode = null;
@@ -3277,8 +3102,7 @@ getFromHandle, autoPanSpeed }) {
3277
3102
  return;
3278
3103
  }
3279
3104
  const transform2 = getTransform();
3280
- position = getEventPosition(event2, containerBounds), closestHandle = getClosestHandle(pointToRendererPoint(position, transform2, !1, [1, 1]), connectionRadius,
3281
- handleLookup), autoPanStarted || (autoPan(), autoPanStarted = !0);
3105
+ position = getEventPosition(event2, containerBounds), closestHandle = getClosestHandle(pointToRendererPoint(position, transform2, !1, [1, 1]), connectionRadius, handleLookup), autoPanStarted || (autoPan(), autoPanStarted = !0);
3282
3106
  const result = isValidHandle(event2, {
3283
3107
  handle: closestHandle,
3284
3108
  connectionMode,
@@ -3301,31 +3125,22 @@ getFromHandle, autoPanSpeed }) {
3301
3125
  toPosition: isValid && result.toHandle ? result.toHandle.position : oppositePosition[fromHandle.position],
3302
3126
  toNode: result.toHandle ? nodeLookup.get(result.toHandle.nodeId) : null
3303
3127
  };
3304
- isValid && closestHandle && previousConnection.toHandle && newConnection2.toHandle && previousConnection.toHandle.type === newConnection2.toHandle.
3305
- type && previousConnection.toHandle.nodeId === newConnection2.toHandle.nodeId && previousConnection.toHandle.id === newConnection2.toHandle.id || (updateConnection(
3306
- newConnection2), previousConnection = newConnection2);
3128
+ isValid && closestHandle && previousConnection.toHandle && newConnection2.toHandle && previousConnection.toHandle.type === newConnection2.toHandle.type && previousConnection.toHandle.nodeId === newConnection2.toHandle.nodeId && previousConnection.toHandle.id === newConnection2.toHandle.id || (updateConnection(newConnection2), previousConnection = newConnection2);
3307
3129
  }
3308
3130
  function onPointerUp(event2) {
3309
- (closestHandle || handleDomNode) && connection && isValid && onConnect?.(connection), onConnectEnd?.(event2), edgeUpdaterType && onReconnectEnd?.(
3310
- event2), cancelConnection(), cancelAnimationFrame(autoPanId), autoPanStarted = !1, isValid = !1, connection = null, handleDomNode = null, doc.removeEventListener(
3311
- "mousemove", onPointerMove), doc.removeEventListener("mouseup", onPointerUp), doc.removeEventListener("touchmove", onPointerMove), doc.removeEventListener(
3312
- "touchend", onPointerUp);
3131
+ (closestHandle || handleDomNode) && connection && isValid && onConnect?.(connection), onConnectEnd?.(event2), edgeUpdaterType && onReconnectEnd?.(event2), cancelConnection(), cancelAnimationFrame(autoPanId), autoPanStarted = !1, isValid = !1, connection = null, handleDomNode = null, doc.removeEventListener("mousemove", onPointerMove), doc.removeEventListener("mouseup", onPointerUp), doc.removeEventListener("touchmove", onPointerMove), doc.removeEventListener("touchend", onPointerUp);
3313
3132
  }
3314
- doc.addEventListener("mousemove", onPointerMove), doc.addEventListener("mouseup", onPointerUp), doc.addEventListener("touchmove", onPointerMove), doc.
3315
- addEventListener("touchend", onPointerUp);
3133
+ doc.addEventListener("mousemove", onPointerMove), doc.addEventListener("mouseup", onPointerUp), doc.addEventListener("touchmove", onPointerMove), doc.addEventListener("touchend", onPointerUp);
3316
3134
  }
3317
3135
  function isValidHandle(event, { handle, connectionMode, fromNodeId, fromHandleId, fromType, doc, lib, flowId, isValidConnection = alwaysValid, handleLookup }) {
3318
- const isTarget = fromType === "target", handleDomNode = handle ? doc.querySelector(`.${lib}-flow__handle[data-id="${flowId}-${handle?.nodeId}-${handle?.
3319
- id}-${handle?.type}"]`) : null, { x, y } = getEventPosition(event), handleBelow = doc.elementFromPoint(x, y), handleToCheck = handleBelow?.classList.
3320
- contains(`${lib}-flow__handle`) ? handleBelow : handleDomNode, result = {
3136
+ const isTarget = fromType === "target", handleDomNode = handle ? doc.querySelector(`.${lib}-flow__handle[data-id="${flowId}-${handle?.nodeId}-${handle?.id}-${handle?.type}"]`) : null, { x, y } = getEventPosition(event), handleBelow = doc.elementFromPoint(x, y), handleToCheck = handleBelow?.classList.contains(`${lib}-flow__handle`) ? handleBelow : handleDomNode, result = {
3321
3137
  handleDomNode: handleToCheck,
3322
3138
  isValid: !1,
3323
3139
  connection: null,
3324
3140
  toHandle: null
3325
3141
  };
3326
3142
  if (handleToCheck) {
3327
- const handleType = getHandleType(void 0, handleToCheck), handleNodeId = handleToCheck.getAttribute("data-nodeid"), handleId = handleToCheck.getAttribute(
3328
- "data-handleid"), connectable = handleToCheck.classList.contains("connectable"), connectableEnd = handleToCheck.classList.contains("connectableend");
3143
+ const handleType = getHandleType(void 0, handleToCheck), handleNodeId = handleToCheck.getAttribute("data-nodeid"), handleId = handleToCheck.getAttribute("data-handleid"), connectable = handleToCheck.classList.contains("connectable"), connectableEnd = handleToCheck.classList.contains("connectableend");
3329
3144
  if (!handleNodeId)
3330
3145
  return result;
3331
3146
  const connection = {
@@ -3335,8 +3150,7 @@ function isValidHandle(event, { handle, connectionMode, fromNodeId, fromHandleId
3335
3150
  targetHandle: isTarget ? fromHandleId : handleId
3336
3151
  };
3337
3152
  result.connection = connection;
3338
- const isValid = connectable && connectableEnd && (connectionMode === ConnectionMode.Strict ? isTarget && handleType === "source" || !isTarget && handleType ===
3339
- "target" : handleNodeId !== fromNodeId || handleId !== fromHandleId);
3153
+ const isValid = connectable && connectableEnd && (connectionMode === ConnectionMode.Strict ? isTarget && handleType === "source" || !isTarget && handleType === "target" : handleNodeId !== fromNodeId || handleId !== fromHandleId);
3340
3154
  result.isValid = isValid && isValidConnection(connection);
3341
3155
  const toHandle = handleLookup?.get(`${handleNodeId}-${handleType}-${handleId}`);
3342
3156
  toHandle && (result.toHandle = {
@@ -3356,8 +3170,7 @@ function XYMinimap({ domNode, panZoom, getTransform, getViewScale }) {
3356
3170
  const transform2 = getTransform();
3357
3171
  if (event.sourceEvent.type !== "wheel" || !panZoom)
3358
3172
  return;
3359
- const pinchDelta = -event.sourceEvent.deltaY * (event.sourceEvent.deltaMode === 1 ? 0.05 : event.sourceEvent.deltaMode ? 1 : 2e-3) * zoomStep, nextZoom = transform2[2] *
3360
- Math.pow(2, pinchDelta);
3173
+ const pinchDelta = -event.sourceEvent.deltaY * (event.sourceEvent.deltaMode === 1 ? 0.05 : event.sourceEvent.deltaMode ? 1 : 2e-3) * zoomStep, nextZoom = transform2[2] * Math.pow(2, pinchDelta);
3361
3174
  panZoom.scaleTo(nextZoom);
3362
3175
  };
3363
3176
  let panStart = [0, 0];
@@ -3399,13 +3212,11 @@ function XYMinimap({ domNode, panZoom, getTransform, getViewScale }) {
3399
3212
  pointer
3400
3213
  };
3401
3214
  }
3402
- const viewChanged = (prevViewport, eventViewport) => prevViewport.x !== eventViewport.x || prevViewport.y !== eventViewport.y || prevViewport.zoom !==
3403
- eventViewport.k, transformToViewport = (transform2) => ({
3215
+ const viewChanged = (prevViewport, eventViewport) => prevViewport.x !== eventViewport.x || prevViewport.y !== eventViewport.y || prevViewport.zoom !== eventViewport.k, transformToViewport = (transform2) => ({
3404
3216
  x: transform2.x,
3405
3217
  y: transform2.y,
3406
3218
  zoom: transform2.k
3407
- }), viewportToTransform = ({ x, y, zoom: zoom2 }) => identity$1.translate(x, y).scale(zoom2), isWrappedWithClass = (event, className) => event.target.
3408
- closest(`.${className}`), isRightClickPan = (panOnDrag, usedButton) => usedButton === 2 && Array.isArray(panOnDrag) && panOnDrag.includes(2), getD3Transition = (selection2, duration = 0, onEnd = () => {
3219
+ }), viewportToTransform = ({ x, y, zoom: zoom2 }) => identity$1.translate(x, y).scale(zoom2), isWrappedWithClass = (event, className) => event.target.closest(`.${className}`), isRightClickPan = (panOnDrag, usedButton) => usedButton === 2 && Array.isArray(panOnDrag) && panOnDrag.includes(2), getD3Transition = (selection2, duration = 0, onEnd = () => {
3409
3220
  }) => {
3410
3221
  const hasDuration = typeof duration == "number" && duration > 0;
3411
3222
  return hasDuration || onEnd(), hasDuration ? selection2.transition().duration(duration).on("end", onEnd) : selection2;
@@ -3413,8 +3224,7 @@ closest(`.${className}`), isRightClickPan = (panOnDrag, usedButton) => usedButto
3413
3224
  const factor = event.ctrlKey && isMacOs() ? 10 : 1;
3414
3225
  return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 2e-3) * factor;
3415
3226
  };
3416
- function createPanOnScrollHandler({ zoomPanValues, noWheelClassName, d3Selection, d3Zoom, panOnScrollMode, panOnScrollSpeed, zoomOnPinch, onPanZoomStart,
3417
- onPanZoom, onPanZoomEnd }) {
3227
+ function createPanOnScrollHandler({ zoomPanValues, noWheelClassName, d3Selection, d3Zoom, panOnScrollMode, panOnScrollSpeed, zoomOnPinch, onPanZoomStart, onPanZoom, onPanZoomEnd }) {
3418
3228
  return (event) => {
3419
3229
  if (isWrappedWithClass(event, noWheelClassName))
3420
3230
  return !1;
@@ -3426,8 +3236,7 @@ onPanZoom, onPanZoomEnd }) {
3426
3236
  return;
3427
3237
  }
3428
3238
  const deltaNormalize = event.deltaMode === 1 ? 20 : 1;
3429
- let deltaX = panOnScrollMode === PanOnScrollMode.Vertical ? 0 : event.deltaX * deltaNormalize, deltaY = panOnScrollMode === PanOnScrollMode.Horizontal ?
3430
- 0 : event.deltaY * deltaNormalize;
3239
+ let deltaX = panOnScrollMode === PanOnScrollMode.Vertical ? 0 : event.deltaX * deltaNormalize, deltaY = panOnScrollMode === PanOnScrollMode.Horizontal ? 0 : event.deltaY * deltaNormalize;
3431
3240
  !isMacOs() && event.shiftKey && panOnScrollMode !== PanOnScrollMode.Vertical && (deltaX = event.deltaY * deltaNormalize, deltaY = 0), d3Zoom.translateBy(
3432
3241
  d3Selection,
3433
3242
  -(deltaX / currentZoom) * panOnScrollSpeed,
@@ -3436,8 +3245,7 @@ onPanZoom, onPanZoomEnd }) {
3436
3245
  { internal: !0 }
3437
3246
  );
3438
3247
  const nextViewport = transformToViewport(d3Selection.property("__zoom"));
3439
- clearTimeout(zoomPanValues.panScrollTimeout), zoomPanValues.isPanScrolling || (zoomPanValues.isPanScrolling = !0, onPanZoomStart?.(event, nextViewport)),
3440
- zoomPanValues.isPanScrolling && (onPanZoom?.(event, nextViewport), zoomPanValues.panScrollTimeout = setTimeout(() => {
3248
+ clearTimeout(zoomPanValues.panScrollTimeout), zoomPanValues.isPanScrolling || (zoomPanValues.isPanScrolling = !0, onPanZoomStart?.(event, nextViewport)), zoomPanValues.isPanScrolling && (onPanZoom?.(event, nextViewport), zoomPanValues.panScrollTimeout = setTimeout(() => {
3441
3249
  onPanZoomEnd?.(event, nextViewport), zoomPanValues.isPanScrolling = !1;
3442
3250
  }, 150));
3443
3251
  };
@@ -3454,22 +3262,17 @@ function createPanZoomStartHandler({ zoomPanValues, onDraggingChange, onPanZoomS
3454
3262
  if (event.sourceEvent?.internal)
3455
3263
  return;
3456
3264
  const viewport = transformToViewport(event.transform);
3457
- zoomPanValues.mouseButton = event.sourceEvent?.button || 0, zoomPanValues.isZoomingOrPanning = !0, zoomPanValues.prevViewport = viewport, event.sourceEvent?.
3458
- type === "mousedown" && onDraggingChange(!0), onPanZoomStart && onPanZoomStart?.(event.sourceEvent, viewport);
3265
+ zoomPanValues.mouseButton = event.sourceEvent?.button || 0, zoomPanValues.isZoomingOrPanning = !0, zoomPanValues.prevViewport = viewport, event.sourceEvent?.type === "mousedown" && onDraggingChange(!0), onPanZoomStart && onPanZoomStart?.(event.sourceEvent, viewport);
3459
3266
  };
3460
3267
  }
3461
3268
  function createPanZoomHandler({ zoomPanValues, panOnDrag, onPaneContextMenu, onTransformChange, onPanZoom }) {
3462
3269
  return (event) => {
3463
- zoomPanValues.usedRightMouseButton = !!(onPaneContextMenu && isRightClickPan(panOnDrag, zoomPanValues.mouseButton ?? 0)), event.sourceEvent?.sync ||
3464
- onTransformChange([event.transform.x, event.transform.y, event.transform.k]), onPanZoom && !event.sourceEvent?.internal && onPanZoom?.(event.sourceEvent,
3465
- transformToViewport(event.transform));
3270
+ zoomPanValues.usedRightMouseButton = !!(onPaneContextMenu && isRightClickPan(panOnDrag, zoomPanValues.mouseButton ?? 0)), event.sourceEvent?.sync || onTransformChange([event.transform.x, event.transform.y, event.transform.k]), onPanZoom && !event.sourceEvent?.internal && onPanZoom?.(event.sourceEvent, transformToViewport(event.transform));
3466
3271
  };
3467
3272
  }
3468
3273
  function createPanZoomEndHandler({ zoomPanValues, panOnDrag, panOnScroll, onDraggingChange, onPanZoomEnd, onPaneContextMenu }) {
3469
3274
  return (event) => {
3470
- if (!event.sourceEvent?.internal && (zoomPanValues.isZoomingOrPanning = !1, onPaneContextMenu && isRightClickPan(panOnDrag, zoomPanValues.mouseButton ??
3471
- 0) && !zoomPanValues.usedRightMouseButton && event.sourceEvent && onPaneContextMenu(event.sourceEvent), zoomPanValues.usedRightMouseButton = !1, onDraggingChange(
3472
- !1), onPanZoomEnd && viewChanged(zoomPanValues.prevViewport, event.transform))) {
3275
+ if (!event.sourceEvent?.internal && (zoomPanValues.isZoomingOrPanning = !1, onPaneContextMenu && isRightClickPan(panOnDrag, zoomPanValues.mouseButton ?? 0) && !zoomPanValues.usedRightMouseButton && event.sourceEvent && onPaneContextMenu(event.sourceEvent), zoomPanValues.usedRightMouseButton = !1, onDraggingChange(!1), onPanZoomEnd && viewChanged(zoomPanValues.prevViewport, event.transform))) {
3473
3276
  const viewport = transformToViewport(event.transform);
3474
3277
  zoomPanValues.prevViewport = viewport, clearTimeout(zoomPanValues.timerId), zoomPanValues.timerId = setTimeout(
3475
3278
  () => {
@@ -3481,28 +3284,22 @@ function createPanZoomEndHandler({ zoomPanValues, panOnDrag, panOnScroll, onDrag
3481
3284
  }
3482
3285
  };
3483
3286
  }
3484
- function createFilter({ zoomActivationKeyPressed, zoomOnScroll, zoomOnPinch, panOnDrag, panOnScroll, zoomOnDoubleClick, userSelectionActive, noWheelClassName,
3485
- noPanClassName, lib }) {
3287
+ function createFilter({ zoomActivationKeyPressed, zoomOnScroll, zoomOnPinch, panOnDrag, panOnScroll, zoomOnDoubleClick, userSelectionActive, noWheelClassName, noPanClassName, lib }) {
3486
3288
  return (event) => {
3487
3289
  const zoomScroll = zoomActivationKeyPressed || zoomOnScroll, pinchZoom = zoomOnPinch && event.ctrlKey;
3488
- if (event.button === 1 && event.type === "mousedown" && (isWrappedWithClass(event, `${lib}-flow__node`) || isWrappedWithClass(event, `${lib}-flow_\
3489
- _edge`)))
3290
+ if (event.button === 1 && event.type === "mousedown" && (isWrappedWithClass(event, `${lib}-flow__node`) || isWrappedWithClass(event, `${lib}-flow__edge`)))
3490
3291
  return !0;
3491
- if (!panOnDrag && !zoomScroll && !panOnScroll && !zoomOnDoubleClick && !zoomOnPinch || userSelectionActive || isWrappedWithClass(event, noWheelClassName) &&
3492
- event.type === "wheel" || isWrappedWithClass(event, noPanClassName) && (event.type !== "wheel" || panOnScroll && event.type === "wheel" && !zoomActivationKeyPressed) ||
3493
- !zoomOnPinch && event.ctrlKey && event.type === "wheel")
3292
+ if (!panOnDrag && !zoomScroll && !panOnScroll && !zoomOnDoubleClick && !zoomOnPinch || userSelectionActive || isWrappedWithClass(event, noWheelClassName) && event.type === "wheel" || isWrappedWithClass(event, noPanClassName) && (event.type !== "wheel" || panOnScroll && event.type === "wheel" && !zoomActivationKeyPressed) || !zoomOnPinch && event.ctrlKey && event.type === "wheel")
3494
3293
  return !1;
3495
3294
  if (!zoomOnPinch && event.type === "touchstart" && event.touches?.length > 1)
3496
3295
  return event.preventDefault(), !1;
3497
- if (!zoomScroll && !panOnScroll && !pinchZoom && event.type === "wheel" || !panOnDrag && (event.type === "mousedown" || event.type === "touchstart") ||
3498
- Array.isArray(panOnDrag) && !panOnDrag.includes(event.button) && event.type === "mousedown")
3296
+ if (!zoomScroll && !panOnScroll && !pinchZoom && event.type === "wheel" || !panOnDrag && (event.type === "mousedown" || event.type === "touchstart") || Array.isArray(panOnDrag) && !panOnDrag.includes(event.button) && event.type === "mousedown")
3499
3297
  return !1;
3500
3298
  const buttonAllowed = Array.isArray(panOnDrag) && panOnDrag.includes(event.button) || !event.button || event.button <= 1;
3501
3299
  return (!event.ctrlKey || event.type === "wheel") && buttonAllowed;
3502
3300
  };
3503
3301
  }
3504
- function XYPanZoom({ domNode, minZoom, maxZoom, paneClickDistance, translateExtent, viewport, onPanZoom, onPanZoomStart, onPanZoomEnd, onTransformChange,
3505
- onDraggingChange }) {
3302
+ function XYPanZoom({ domNode, minZoom, maxZoom, paneClickDistance, translateExtent, viewport, onPanZoom, onPanZoomStart, onPanZoomEnd, onTransformChange, onDraggingChange }) {
3506
3303
  const zoomPanValues = {
3507
3304
  isZoomingOrPanning: !1,
3508
3305
  usedRightMouseButton: !1,
@@ -3511,8 +3308,7 @@ onDraggingChange }) {
3511
3308
  timerId: void 0,
3512
3309
  panScrollTimeout: void 0,
3513
3310
  isPanScrolling: !1
3514
- }, bbox = domNode.getBoundingClientRect(), d3ZoomInstance = zoom().clickDistance(!isNumeric(paneClickDistance) || paneClickDistance < 0 ? 0 : paneClickDistance).
3515
- scaleExtent([minZoom, maxZoom]).translateExtent(translateExtent), d3Selection = select(domNode).call(d3ZoomInstance);
3311
+ }, bbox = domNode.getBoundingClientRect(), d3ZoomInstance = zoom().clickDistance(!isNumeric(paneClickDistance) || paneClickDistance < 0 ? 0 : paneClickDistance).scaleExtent([minZoom, maxZoom]).translateExtent(translateExtent), d3Selection = select(domNode).call(d3ZoomInstance);
3516
3312
  setViewportConstrained({
3517
3313
  x: viewport.x,
3518
3314
  y: viewport.y,
@@ -3528,8 +3324,7 @@ onDraggingChange }) {
3528
3324
  d3ZoomInstance?.transform(getD3Transition(d3Selection, options?.duration, () => resolve(!0)), transform2);
3529
3325
  }) : Promise.resolve(!1);
3530
3326
  }
3531
- function update({ noWheelClassName, noPanClassName, onPaneContextMenu, userSelectionActive, panOnScroll, panOnDrag, panOnScrollMode, panOnScrollSpeed,
3532
- preventScrolling, zoomOnPinch, zoomOnScroll, zoomOnDoubleClick, zoomActivationKeyPressed, lib }) {
3327
+ function update({ noWheelClassName, noPanClassName, onPaneContextMenu, userSelectionActive, panOnScroll, panOnDrag, panOnScrollMode, panOnScrollSpeed, preventScrolling, zoomOnPinch, zoomOnScroll, zoomOnDoubleClick, zoomActivationKeyPressed, lib }) {
3533
3328
  userSelectionActive && !zoomPanValues.isZoomingOrPanning && destroy();
3534
3329
  const wheelHandler = panOnScroll && !zoomActivationKeyPressed && !userSelectionActive ? createPanOnScrollHandler({
3535
3330
  zoomPanValues,
@@ -3600,8 +3395,7 @@ onDraggingChange }) {
3600
3395
  function syncViewport(viewport2) {
3601
3396
  if (d3Selection) {
3602
3397
  const nextTransform = viewportToTransform(viewport2), currentTransform = d3Selection.property("__zoom");
3603
- (currentTransform.k !== viewport2.zoom || currentTransform.x !== viewport2.x || currentTransform.y !== viewport2.y) && d3ZoomInstance?.transform(
3604
- d3Selection, nextTransform, null, { sync: !0 });
3398
+ (currentTransform.k !== viewport2.zoom || currentTransform.x !== viewport2.x || currentTransform.y !== viewport2.y) && d3ZoomInstance?.transform(d3Selection, nextTransform, null, { sync: !0 });
3605
3399
  }
3606
3400
  }
3607
3401
  function getViewport() {
@@ -3647,13 +3441,11 @@ var ResizeControlVariant;
3647
3441
  ResizeControlVariant2.Line = "line", ResizeControlVariant2.Handle = "handle";
3648
3442
  })(ResizeControlVariant || (ResizeControlVariant = {}));
3649
3443
  function getResizeDirection({ width, prevWidth, height, prevHeight, affectsX, affectsY }) {
3650
- const deltaWidth = width - prevWidth, deltaHeight = height - prevHeight, direction = [deltaWidth > 0 ? 1 : deltaWidth < 0 ? -1 : 0, deltaHeight > 0 ?
3651
- 1 : deltaHeight < 0 ? -1 : 0];
3444
+ const deltaWidth = width - prevWidth, deltaHeight = height - prevHeight, direction = [deltaWidth > 0 ? 1 : deltaWidth < 0 ? -1 : 0, deltaHeight > 0 ? 1 : deltaHeight < 0 ? -1 : 0];
3652
3445
  return deltaWidth && affectsX && (direction[0] = direction[0] * -1), deltaHeight && affectsY && (direction[1] = direction[1] * -1), direction;
3653
3446
  }
3654
3447
  function getControlDirection(controlPosition) {
3655
- const isHorizontal = controlPosition.includes("right") || controlPosition.includes("left"), isVertical = controlPosition.includes("bottom") || controlPosition.
3656
- includes("top"), affectsX = controlPosition.includes("left"), affectsY = controlPosition.includes("top");
3448
+ const isHorizontal = controlPosition.includes("right") || controlPosition.includes("left"), isVertical = controlPosition.includes("bottom") || controlPosition.includes("top"), affectsX = controlPosition.includes("left"), affectsY = controlPosition.includes("top");
3657
3449
  return {
3658
3450
  isHorizontal,
3659
3451
  isVertical,
@@ -3675,61 +3467,43 @@ function xor(a, b) {
3675
3467
  }
3676
3468
  function getDimensionsAfterResize(startValues, controlDirection, pointerPosition, boundaries, keepAspectRatio, nodeOrigin, extent, childExtent) {
3677
3469
  let { affectsX, affectsY } = controlDirection;
3678
- const { isHorizontal, isVertical } = controlDirection, isDiagonal = isHorizontal && isVertical, { xSnapped, ySnapped } = pointerPosition, { minWidth,
3679
- maxWidth, minHeight, maxHeight } = boundaries, { x: startX, y: startY, width: startWidth, height: startHeight, aspectRatio } = startValues;
3470
+ const { isHorizontal, isVertical } = controlDirection, isDiagonal = isHorizontal && isVertical, { xSnapped, ySnapped } = pointerPosition, { minWidth, maxWidth, minHeight, maxHeight } = boundaries, { x: startX, y: startY, width: startWidth, height: startHeight, aspectRatio } = startValues;
3680
3471
  let distX = Math.floor(isHorizontal ? xSnapped - startValues.pointerX : 0), distY = Math.floor(isVertical ? ySnapped - startValues.pointerY : 0);
3681
- const newWidth = startWidth + (affectsX ? -distX : distX), newHeight = startHeight + (affectsY ? -distY : distY), originOffsetX = -nodeOrigin[0] * startWidth,
3682
- originOffsetY = -nodeOrigin[1] * startHeight;
3472
+ const newWidth = startWidth + (affectsX ? -distX : distX), newHeight = startHeight + (affectsY ? -distY : distY), originOffsetX = -nodeOrigin[0] * startWidth, originOffsetY = -nodeOrigin[1] * startHeight;
3683
3473
  let clampX = getSizeClamp(newWidth, minWidth, maxWidth), clampY = getSizeClamp(newHeight, minHeight, maxHeight);
3684
3474
  if (extent) {
3685
3475
  let xExtentClamp = 0, yExtentClamp = 0;
3686
- affectsX && distX < 0 ? xExtentClamp = getLowerExtentClamp(startX + distX + originOffsetX, extent[0][0]) : !affectsX && distX > 0 && (xExtentClamp =
3687
- getUpperExtentClamp(startX + newWidth + originOffsetX, extent[1][0])), affectsY && distY < 0 ? yExtentClamp = getLowerExtentClamp(startY + distY +
3688
- originOffsetY, extent[0][1]) : !affectsY && distY > 0 && (yExtentClamp = getUpperExtentClamp(startY + newHeight + originOffsetY, extent[1][1])), clampX =
3689
- Math.max(clampX, xExtentClamp), clampY = Math.max(clampY, yExtentClamp);
3476
+ affectsX && distX < 0 ? xExtentClamp = getLowerExtentClamp(startX + distX + originOffsetX, extent[0][0]) : !affectsX && distX > 0 && (xExtentClamp = getUpperExtentClamp(startX + newWidth + originOffsetX, extent[1][0])), affectsY && distY < 0 ? yExtentClamp = getLowerExtentClamp(startY + distY + originOffsetY, extent[0][1]) : !affectsY && distY > 0 && (yExtentClamp = getUpperExtentClamp(startY + newHeight + originOffsetY, extent[1][1])), clampX = Math.max(clampX, xExtentClamp), clampY = Math.max(clampY, yExtentClamp);
3690
3477
  }
3691
3478
  if (childExtent) {
3692
3479
  let xExtentClamp = 0, yExtentClamp = 0;
3693
- affectsX && distX > 0 ? xExtentClamp = getUpperExtentClamp(startX + distX, childExtent[0][0]) : !affectsX && distX < 0 && (xExtentClamp = getLowerExtentClamp(
3694
- startX + newWidth, childExtent[1][0])), affectsY && distY > 0 ? yExtentClamp = getUpperExtentClamp(startY + distY, childExtent[0][1]) : !affectsY &&
3695
- distY < 0 && (yExtentClamp = getLowerExtentClamp(startY + newHeight, childExtent[1][1])), clampX = Math.max(clampX, xExtentClamp), clampY = Math.max(
3696
- clampY, yExtentClamp);
3480
+ affectsX && distX > 0 ? xExtentClamp = getUpperExtentClamp(startX + distX, childExtent[0][0]) : !affectsX && distX < 0 && (xExtentClamp = getLowerExtentClamp(startX + newWidth, childExtent[1][0])), affectsY && distY > 0 ? yExtentClamp = getUpperExtentClamp(startY + distY, childExtent[0][1]) : !affectsY && distY < 0 && (yExtentClamp = getLowerExtentClamp(startY + newHeight, childExtent[1][1])), clampX = Math.max(clampX, xExtentClamp), clampY = Math.max(clampY, yExtentClamp);
3697
3481
  }
3698
3482
  if (keepAspectRatio) {
3699
3483
  if (isHorizontal) {
3700
3484
  const aspectHeightClamp = getSizeClamp(newWidth / aspectRatio, minHeight, maxHeight) * aspectRatio;
3701
3485
  if (clampX = Math.max(clampX, aspectHeightClamp), extent) {
3702
3486
  let aspectExtentClamp = 0;
3703
- !affectsX && !affectsY || affectsX && !affectsY && isDiagonal ? aspectExtentClamp = getUpperExtentClamp(startY + originOffsetY + newWidth / aspectRatio,
3704
- extent[1][1]) * aspectRatio : aspectExtentClamp = getLowerExtentClamp(startY + originOffsetY + (affectsX ? distX : -distX) / aspectRatio, extent[0][1]) *
3705
- aspectRatio, clampX = Math.max(clampX, aspectExtentClamp);
3487
+ !affectsX && !affectsY || affectsX && !affectsY && isDiagonal ? aspectExtentClamp = getUpperExtentClamp(startY + originOffsetY + newWidth / aspectRatio, extent[1][1]) * aspectRatio : aspectExtentClamp = getLowerExtentClamp(startY + originOffsetY + (affectsX ? distX : -distX) / aspectRatio, extent[0][1]) * aspectRatio, clampX = Math.max(clampX, aspectExtentClamp);
3706
3488
  }
3707
3489
  if (childExtent) {
3708
3490
  let aspectExtentClamp = 0;
3709
- !affectsX && !affectsY || affectsX && !affectsY && isDiagonal ? aspectExtentClamp = getLowerExtentClamp(startY + newWidth / aspectRatio, childExtent[1][1]) *
3710
- aspectRatio : aspectExtentClamp = getUpperExtentClamp(startY + (affectsX ? distX : -distX) / aspectRatio, childExtent[0][1]) * aspectRatio, clampX =
3711
- Math.max(clampX, aspectExtentClamp);
3491
+ !affectsX && !affectsY || affectsX && !affectsY && isDiagonal ? aspectExtentClamp = getLowerExtentClamp(startY + newWidth / aspectRatio, childExtent[1][1]) * aspectRatio : aspectExtentClamp = getUpperExtentClamp(startY + (affectsX ? distX : -distX) / aspectRatio, childExtent[0][1]) * aspectRatio, clampX = Math.max(clampX, aspectExtentClamp);
3712
3492
  }
3713
3493
  }
3714
3494
  if (isVertical) {
3715
3495
  const aspectWidthClamp = getSizeClamp(newHeight * aspectRatio, minWidth, maxWidth) / aspectRatio;
3716
3496
  if (clampY = Math.max(clampY, aspectWidthClamp), extent) {
3717
3497
  let aspectExtentClamp = 0;
3718
- !affectsX && !affectsY || affectsY && !affectsX && isDiagonal ? aspectExtentClamp = getUpperExtentClamp(startX + newHeight * aspectRatio + originOffsetX,
3719
- extent[1][0]) / aspectRatio : aspectExtentClamp = getLowerExtentClamp(startX + (affectsY ? distY : -distY) * aspectRatio + originOffsetX, extent[0][0]) /
3720
- aspectRatio, clampY = Math.max(clampY, aspectExtentClamp);
3498
+ !affectsX && !affectsY || affectsY && !affectsX && isDiagonal ? aspectExtentClamp = getUpperExtentClamp(startX + newHeight * aspectRatio + originOffsetX, extent[1][0]) / aspectRatio : aspectExtentClamp = getLowerExtentClamp(startX + (affectsY ? distY : -distY) * aspectRatio + originOffsetX, extent[0][0]) / aspectRatio, clampY = Math.max(clampY, aspectExtentClamp);
3721
3499
  }
3722
3500
  if (childExtent) {
3723
3501
  let aspectExtentClamp = 0;
3724
- !affectsX && !affectsY || affectsY && !affectsX && isDiagonal ? aspectExtentClamp = getLowerExtentClamp(startX + newHeight * aspectRatio, childExtent[1][0]) /
3725
- aspectRatio : aspectExtentClamp = getUpperExtentClamp(startX + (affectsY ? distY : -distY) * aspectRatio, childExtent[0][0]) / aspectRatio, clampY =
3726
- Math.max(clampY, aspectExtentClamp);
3502
+ !affectsX && !affectsY || affectsY && !affectsX && isDiagonal ? aspectExtentClamp = getLowerExtentClamp(startX + newHeight * aspectRatio, childExtent[1][0]) / aspectRatio : aspectExtentClamp = getUpperExtentClamp(startX + (affectsY ? distY : -distY) * aspectRatio, childExtent[0][0]) / aspectRatio, clampY = Math.max(clampY, aspectExtentClamp);
3727
3503
  }
3728
3504
  }
3729
3505
  }
3730
- distY = distY + (distY < 0 ? clampY : -clampY), distX = distX + (distX < 0 ? clampX : -clampX), keepAspectRatio && (isDiagonal ? newWidth > newHeight *
3731
- aspectRatio ? distY = (xor(affectsX, affectsY) ? -distX : distX) / aspectRatio : distX = (xor(affectsX, affectsY) ? -distY : distY) * aspectRatio : isHorizontal ?
3732
- (distY = distX / aspectRatio, affectsY = affectsX) : (distX = distY * aspectRatio, affectsX = affectsY));
3506
+ distY = distY + (distY < 0 ? clampY : -clampY), distX = distX + (distX < 0 ? clampX : -clampX), keepAspectRatio && (isDiagonal ? newWidth > newHeight * aspectRatio ? distY = (xor(affectsX, affectsY) ? -distX : distX) / aspectRatio : distX = (xor(affectsX, affectsY) ? -distY : distY) * aspectRatio : isHorizontal ? (distY = distX / aspectRatio, affectsY = affectsX) : (distX = distY * aspectRatio, affectsX = affectsY));
3733
3507
  const x = affectsX ? startX + distX : startX, y = affectsY ? startY + distY : startY;
3734
3508
  return {
3735
3509
  width: startWidth + (affectsX ? -distX : distX),
@@ -3751,8 +3525,7 @@ function nodeToParentExtent(node) {
3751
3525
  ];
3752
3526
  }
3753
3527
  function nodeToChildExtent(child, parent, nodeOrigin) {
3754
- const x = parent.position.x + child.position.x, y = parent.position.y + child.position.y, width = child.measured.width ?? 0, height = child.measured.
3755
- height ?? 0, originOffsetX = nodeOrigin[0] * width, originOffsetY = nodeOrigin[1] * height;
3528
+ const x = parent.position.x + child.position.x, y = parent.position.y + child.position.y, width = child.measured.width ?? 0, height = child.measured.height ?? 0, originOffsetX = nodeOrigin[0] * width, originOffsetY = nodeOrigin[1] * height;
3756
3529
  return [
3757
3530
  [x - originOffsetX, y - originOffsetY],
3758
3531
  [x + width - originOffsetX, y + height - originOffsetY]
@@ -3779,8 +3552,7 @@ function XYResizer({ domNode, nodeId, getStoreItems, onChange, onEnd }) {
3779
3552
  pointerX: xSnapped,
3780
3553
  pointerY: ySnapped,
3781
3554
  aspectRatio: prevValues.width / prevValues.height
3782
- }, parentNode = void 0, node.parentId && (node.extent === "parent" || node.expandParent) && (parentNode = nodeLookup.get(node.parentId), parentExtent =
3783
- parentNode && node.extent === "parent" ? nodeToParentExtent(parentNode) : void 0), childNodes = [], childExtent = void 0;
3555
+ }, parentNode = void 0, node.parentId && (node.extent === "parent" || node.expandParent) && (parentNode = nodeLookup.get(node.parentId), parentExtent = parentNode && node.extent === "parent" ? nodeToParentExtent(parentNode) : void 0), childNodes = [], childExtent = void 0;
3784
3556
  for (const [childId, child] of nodeLookup)
3785
3557
  if (child.parentId === nodeId && (childNodes.push({
3786
3558
  id: childId,
@@ -3795,18 +3567,13 @@ function XYResizer({ domNode, nodeId, getStoreItems, onChange, onEnd }) {
3795
3567
  }
3796
3568
  onResizeStart?.(event, { ...prevValues });
3797
3569
  }).on("drag", (event) => {
3798
- const { transform: transform2, snapGrid, snapToGrid, nodeOrigin: storeNodeOrigin } = getStoreItems(), pointerPosition = getPointerPosition(event.
3799
- sourceEvent, { transform: transform2, snapGrid, snapToGrid }), childChanges = [];
3570
+ const { transform: transform2, snapGrid, snapToGrid, nodeOrigin: storeNodeOrigin } = getStoreItems(), pointerPosition = getPointerPosition(event.sourceEvent, { transform: transform2, snapGrid, snapToGrid }), childChanges = [];
3800
3571
  if (!node)
3801
3572
  return;
3802
- const { x: prevX, y: prevY, width: prevWidth, height: prevHeight } = prevValues, change = {}, nodeOrigin = node.origin ?? storeNodeOrigin, { width,
3803
- height, x, y } = getDimensionsAfterResize(startValues, controlDirection, pointerPosition, boundaries, keepAspectRatio, nodeOrigin, parentExtent,
3804
- childExtent), isWidthChange = width !== prevWidth, isHeightChange = height !== prevHeight, isXPosChange = x !== prevX && isWidthChange, isYPosChange = y !==
3805
- prevY && isHeightChange;
3573
+ const { x: prevX, y: prevY, width: prevWidth, height: prevHeight } = prevValues, change = {}, nodeOrigin = node.origin ?? storeNodeOrigin, { width, height, x, y } = getDimensionsAfterResize(startValues, controlDirection, pointerPosition, boundaries, keepAspectRatio, nodeOrigin, parentExtent, childExtent), isWidthChange = width !== prevWidth, isHeightChange = height !== prevHeight, isXPosChange = x !== prevX && isWidthChange, isYPosChange = y !== prevY && isHeightChange;
3806
3574
  if (!isXPosChange && !isYPosChange && !isWidthChange && !isHeightChange)
3807
3575
  return;
3808
- if ((isXPosChange || isYPosChange || nodeOrigin[0] === 1 || nodeOrigin[1] === 1) && (change.x = isXPosChange ? x : prevValues.x, change.y = isYPosChange ?
3809
- y : prevValues.y, prevValues.x = change.x, prevValues.y = change.y, childNodes.length > 0)) {
3576
+ if ((isXPosChange || isYPosChange || nodeOrigin[0] === 1 || nodeOrigin[1] === 1) && (change.x = isXPosChange ? x : prevValues.x, change.y = isYPosChange ? y : prevValues.y, prevValues.x = change.x, prevValues.y = change.y, childNodes.length > 0)) {
3810
3577
  const xChange = x - prevX, yChange = y - prevY;
3811
3578
  for (const childNode of childNodes)
3812
3579
  childNode.position = {
@@ -3814,8 +3581,7 @@ function XYResizer({ domNode, nodeId, getStoreItems, onChange, onEnd }) {
3814
3581
  y: childNode.position.y - yChange + nodeOrigin[1] * (height - prevHeight)
3815
3582
  }, childChanges.push(childNode);
3816
3583
  }
3817
- if ((isWidthChange || isHeightChange) && (change.width = isWidthChange ? width : prevValues.width, change.height = isHeightChange ? height : prevValues.
3818
- height, prevValues.width = change.width, prevValues.height = change.height), parentNode && node.expandParent) {
3584
+ if ((isWidthChange || isHeightChange) && (change.width = isWidthChange ? width : prevValues.width, change.height = isHeightChange ? height : prevValues.height, prevValues.width = change.width, prevValues.height = change.height), parentNode && node.expandParent) {
3819
3585
  const xLimit = nodeOrigin[0] * (change.width ?? 0);
3820
3586
  change.x && change.x < xLimit && (prevValues.x = xLimit, startValues.x = startValues.x - (change.x - xLimit));
3821
3587
  const yLimit = nodeOrigin[1] * (change.height ?? 0);
@@ -3940,19 +3706,15 @@ const createStoreImpl = (createState) => {
3940
3706
  const nextState = typeof partial == "function" ? partial(state) : partial;
3941
3707
  if (!Object.is(nextState, state)) {
3942
3708
  const previousState = state;
3943
- state = replace ?? (typeof nextState != "object" || nextState === null) ? nextState : Object.assign({}, state, nextState), listeners.forEach((listener) => listener(
3944
- state, previousState));
3709
+ state = replace ?? (typeof nextState != "object" || nextState === null) ? nextState : Object.assign({}, state, nextState), listeners.forEach((listener) => listener(state, previousState));
3945
3710
  }
3946
- }, getState = () => state, api = { setState, getState, getInitialState: () => initialState, subscribe: (listener) => (listeners.add(listener), () => listeners.
3947
- delete(listener)), destroy: () => {
3711
+ }, getState = () => state, api = { setState, getState, getInitialState: () => initialState, subscribe: (listener) => (listeners.add(listener), () => listeners.delete(listener)), destroy: () => {
3948
3712
  (define_import_meta_env_default ? "production" : void 0) !== "production" && console.warn(
3949
- "[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything w\
3950
- ill be garbage-collected if store is garbage-collected."
3713
+ "[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."
3951
3714
  ), listeners.clear();
3952
3715
  } }, initialState = state = createState(setState, getState, api);
3953
3716
  return api;
3954
- }, createStore$1 = (createState) => createState ? createStoreImpl(createState) : createStoreImpl, { useDebugValue } = React__default, { useSyncExternalStoreWithSelector } = useSyncExternalStoreExports,
3955
- identity = (arg) => arg;
3717
+ }, createStore$1 = (createState) => createState ? createStoreImpl(createState) : createStoreImpl, { useDebugValue } = React__default, { useSyncExternalStoreWithSelector } = useSyncExternalStoreExports, identity = (arg) => arg;
3956
3718
  function useStoreWithEqualityFn(api, selector2 = identity, equalityFn) {
3957
3719
  const slice = useSyncExternalStoreWithSelector(
3958
3720
  api.subscribe,
@@ -3964,8 +3726,7 @@ function useStoreWithEqualityFn(api, selector2 = identity, equalityFn) {
3964
3726
  return useDebugValue(slice), slice;
3965
3727
  }
3966
3728
  const createWithEqualityFnImpl = (createState, defaultEqualityFn) => {
3967
- const api = createStore$1(createState), useBoundStoreWithEqualityFn = (selector2, equalityFn = defaultEqualityFn) => useStoreWithEqualityFn(api, selector2,
3968
- equalityFn);
3729
+ const api = createStore$1(createState), useBoundStoreWithEqualityFn = (selector2, equalityFn = defaultEqualityFn) => useStoreWithEqualityFn(api, selector2, equalityFn);
3969
3730
  return Object.assign(useBoundStoreWithEqualityFn, api), useBoundStoreWithEqualityFn;
3970
3731
  }, createWithEqualityFn = (createState, defaultEqualityFn) => createState ? createWithEqualityFnImpl(createState, defaultEqualityFn) : createWithEqualityFnImpl;
3971
3732
  function shallow$1(objA, objB) {
@@ -4022,17 +3783,13 @@ const style = { display: "none" }, ariaLiveStyle = {
4022
3783
  overflow: "hidden",
4023
3784
  clip: "rect(0px, 0px, 0px, 0px)",
4024
3785
  clipPath: "inset(100%)"
4025
- }, ARIA_NODE_DESC_KEY = "react-flow__node-desc", ARIA_EDGE_DESC_KEY = "react-flow__edge-desc", ARIA_LIVE_MESSAGE = "react-flow__aria-live", selector$p = (s) => s.
4026
- ariaLiveMessage;
3786
+ }, ARIA_NODE_DESC_KEY = "react-flow__node-desc", ARIA_EDGE_DESC_KEY = "react-flow__edge-desc", ARIA_LIVE_MESSAGE = "react-flow__aria-live", selector$p = (s) => s.ariaLiveMessage;
4027
3787
  function AriaLiveMessage({ rfId }) {
4028
3788
  const ariaLiveMessage = useStore(selector$p);
4029
3789
  return jsx("div", { id: `${ARIA_LIVE_MESSAGE}-${rfId}`, "aria-live": "assertive", "aria-atomic": "true", style: ariaLiveStyle, children: ariaLiveMessage });
4030
3790
  }
4031
3791
  function A11yDescriptions({ rfId, disableKeyboardA11y }) {
4032
- return jsxs(Fragment, { children: [jsxs("div", { id: `${ARIA_NODE_DESC_KEY}-${rfId}`, style, children: ["Press enter or space to select a node.", !disableKeyboardA11y &&
4033
- "You can then use the arrow keys to move the node around.", " Press delete to remove it and escape to cancel.", " "] }), jsx("div", { id: `${ARIA_EDGE_DESC_KEY}\
4034
- -${rfId}`, style, children: "Press enter or space to select an edge. You can then press delete to remove it or escape to cancel." }), !disableKeyboardA11y &&
4035
- jsx(AriaLiveMessage, { rfId })] });
3792
+ return jsxs(Fragment, { children: [jsxs("div", { id: `${ARIA_NODE_DESC_KEY}-${rfId}`, style, children: ["Press enter or space to select a node.", !disableKeyboardA11y && "You can then use the arrow keys to move the node around.", " Press delete to remove it and escape to cancel.", " "] }), jsx("div", { id: `${ARIA_EDGE_DESC_KEY}-${rfId}`, style, children: "Press enter or space to select an edge. You can then press delete to remove it or escape to cancel." }), !disableKeyboardA11y && jsx(AriaLiveMessage, { rfId })] });
4036
3793
  }
4037
3794
  const selector$o = (s) => s.userSelectionActive ? "none" : "all";
4038
3795
  function Panel({ position = "top-left", children: children2, className, style: style2, ...rest }) {
@@ -4040,9 +3797,7 @@ function Panel({ position = "top-left", children: children2, className, style: s
4040
3797
  return jsx("div", { className: cc(["react-flow__panel", className, ...positionClasses]), style: { ...style2, pointerEvents }, ...rest, children: children2 });
4041
3798
  }
4042
3799
  function Attribution({ proOptions, position = "bottom-right" }) {
4043
- return proOptions?.hideAttribution ? null : jsx(Panel, { position, className: "react-flow__attribution", "data-message": "Please only hide this attr\
4044
- ibution when you are subscribed to React Flow Pro: https://pro.reactflow.dev", children: jsx("a", { href: "https://reactflow.dev", target: "_blank", rel: "\
4045
- noopener noreferrer", "aria-label": "React Flow attribution", children: "React Flow" }) });
3800
+ return proOptions?.hideAttribution ? null : jsx(Panel, { position, className: "react-flow__attribution", "data-message": "Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev", children: jsx("a", { href: "https://reactflow.dev", target: "_blank", rel: "noopener noreferrer", "aria-label": "React Flow attribution", children: "React Flow" }) });
4046
3801
  }
4047
3802
  const selector$n = (s) => {
4048
3803
  const selectedNodes = [], selectedEdges = [];
@@ -4147,8 +3902,7 @@ const defaultNodeOrigin = [0, 0], defaultViewport = { x: 0, y: 0, zoom: 1 }, rea
4147
3902
  paneClickDistance: 0
4148
3903
  };
4149
3904
  function StoreUpdater(props) {
4150
- const { setNodes, setEdges, setMinZoom, setMaxZoom, setTranslateExtent, setNodeExtent, reset, setDefaultNodesAndEdges, setPaneClickDistance } = useStore(
4151
- selector$m, shallow$1), store = useStoreApi();
3905
+ const { setNodes, setEdges, setMinZoom, setMaxZoom, setTranslateExtent, setNodeExtent, reset, setDefaultNodesAndEdges, setPaneClickDistance } = useStore(selector$m, shallow$1), store = useStoreApi();
4152
3906
  useEffect(() => (setDefaultNodesAndEdges(props.defaultNodes, props.defaultEdges), () => {
4153
3907
  previousFields.current = initPrevValues, reset();
4154
3908
  }), []);
@@ -4157,11 +3911,7 @@ function StoreUpdater(props) {
4157
3911
  () => {
4158
3912
  for (const fieldName of fieldsToTrack) {
4159
3913
  const fieldValue = props[fieldName], previousFieldValue = previousFields.current[fieldName];
4160
- fieldValue !== previousFieldValue && (typeof props[fieldName] > "u" || (fieldName === "nodes" ? setNodes(fieldValue) : fieldName === "edges" ?
4161
- setEdges(fieldValue) : fieldName === "minZoom" ? setMinZoom(fieldValue) : fieldName === "maxZoom" ? setMaxZoom(fieldValue) : fieldName === "tr\
4162
- anslateExtent" ? setTranslateExtent(fieldValue) : fieldName === "nodeExtent" ? setNodeExtent(fieldValue) : fieldName === "paneClickDistance" ? setPaneClickDistance(
4163
- fieldValue) : fieldName === "fitView" ? store.setState({ fitViewOnInit: fieldValue }) : fieldName === "fitViewOptions" ? store.setState({ fitViewOnInitOptions: fieldValue }) :
4164
- store.setState({ [fieldName]: fieldValue })));
3914
+ fieldValue !== previousFieldValue && (typeof props[fieldName] > "u" || (fieldName === "nodes" ? setNodes(fieldValue) : fieldName === "edges" ? setEdges(fieldValue) : fieldName === "minZoom" ? setMinZoom(fieldValue) : fieldName === "maxZoom" ? setMaxZoom(fieldValue) : fieldName === "translateExtent" ? setTranslateExtent(fieldValue) : fieldName === "nodeExtent" ? setNodeExtent(fieldValue) : fieldName === "paneClickDistance" ? setPaneClickDistance(fieldValue) : fieldName === "fitView" ? store.setState({ fitViewOnInit: fieldValue }) : fieldName === "fitViewOptions" ? store.setState({ fitViewOnInitOptions: fieldValue }) : store.setState({ [fieldName]: fieldValue })));
4165
3915
  }
4166
3916
  previousFields.current = props;
4167
3917
  },
@@ -4187,11 +3937,9 @@ function useColorModeClass(colorMode) {
4187
3937
  }
4188
3938
  const defaultDoc = typeof document < "u" ? document : null;
4189
3939
  function useKeyPress(keyCode = null, options = { target: defaultDoc, actInsideInputWithModifier: !0 }) {
4190
- const [keyPressed, setKeyPressed] = useState(!1), modifierPressed = useRef(!1), pressedKeys = useRef(/* @__PURE__ */ new Set([])), [keyCodes, keysToWatch] = useMemo(
4191
- () => {
3940
+ const [keyPressed, setKeyPressed] = useState(!1), modifierPressed = useRef(!1), pressedKeys = useRef(/* @__PURE__ */ new Set([])), [keyCodes, keysToWatch] = useMemo(() => {
4192
3941
  if (keyCode !== null) {
4193
- const keys = (Array.isArray(keyCode) ? keyCode : [keyCode]).filter((kc) => typeof kc == "string").map((kc) => kc.split("+")), keysFlat = keys.reduce(
4194
- (res, item) => res.concat(...item), []);
3942
+ const keys = (Array.isArray(keyCode) ? keyCode : [keyCode]).filter((kc) => typeof kc == "string").map((kc) => kc.split("+")), keysFlat = keys.reduce((res, item) => res.concat(...item), []);
4195
3943
  return [keys, keysFlat];
4196
3944
  }
4197
3945
  return [[], []];
@@ -4200,8 +3948,7 @@ function useKeyPress(keyCode = null, options = { target: defaultDoc, actInsideIn
4200
3948
  const target = options?.target || defaultDoc;
4201
3949
  if (keyCode !== null) {
4202
3950
  const downHandler = (event) => {
4203
- if (modifierPressed.current = event.ctrlKey || event.metaKey || event.shiftKey, (!modifierPressed.current || modifierPressed.current && !options.
4204
- actInsideInputWithModifier) && isInputDOMNode(event))
3951
+ if (modifierPressed.current = event.ctrlKey || event.metaKey || event.shiftKey, (!modifierPressed.current || modifierPressed.current && !options.actInsideInputWithModifier) && isInputDOMNode(event))
4205
3952
  return !1;
4206
3953
  const keyOrCode = useKeyOrCode(event.code, keysToWatch);
4207
3954
  pressedKeys.current.add(event[keyOrCode]), isMatchingKey(keyCodes, pressedKeys.current, !1) && (event.preventDefault(), setKeyPressed(!0));
@@ -4209,15 +3956,12 @@ function useKeyPress(keyCode = null, options = { target: defaultDoc, actInsideIn
4209
3956
  if ((!modifierPressed.current || modifierPressed.current && !options.actInsideInputWithModifier) && isInputDOMNode(event))
4210
3957
  return !1;
4211
3958
  const keyOrCode = useKeyOrCode(event.code, keysToWatch);
4212
- isMatchingKey(keyCodes, pressedKeys.current, !0) ? (setKeyPressed(!1), pressedKeys.current.clear()) : pressedKeys.current.delete(event[keyOrCode]),
4213
- event.key === "Meta" && pressedKeys.current.clear(), modifierPressed.current = !1;
3959
+ isMatchingKey(keyCodes, pressedKeys.current, !0) ? (setKeyPressed(!1), pressedKeys.current.clear()) : pressedKeys.current.delete(event[keyOrCode]), event.key === "Meta" && pressedKeys.current.clear(), modifierPressed.current = !1;
4214
3960
  }, resetHandler = () => {
4215
3961
  pressedKeys.current.clear(), setKeyPressed(!1);
4216
3962
  };
4217
- return target?.addEventListener("keydown", downHandler), target?.addEventListener("keyup", upHandler), window.addEventListener("blur", resetHandler),
4218
- window.addEventListener("contextmenu", resetHandler), () => {
4219
- target?.removeEventListener("keydown", downHandler), target?.removeEventListener("keyup", upHandler), window.removeEventListener("blur", resetHandler),
4220
- window.removeEventListener("contextmenu", resetHandler);
3963
+ return target?.addEventListener("keydown", downHandler), target?.addEventListener("keyup", upHandler), window.addEventListener("blur", resetHandler), window.addEventListener("contextmenu", resetHandler), () => {
3964
+ target?.removeEventListener("keydown", downHandler), target?.removeEventListener("keyup", upHandler), window.removeEventListener("blur", resetHandler), window.removeEventListener("contextmenu", resetHandler);
4221
3965
  };
4222
3966
  }
4223
3967
  }, [keyCode, setKeyPressed]), keyPressed;
@@ -4268,8 +4012,7 @@ const useViewportHelper = () => {
4268
4012
  }, options) : Promise.resolve(!1);
4269
4013
  },
4270
4014
  setCenter: async (x, y, options) => {
4271
- const { width, height, maxZoom, panZoom } = store.getState(), nextZoom = typeof options?.zoom < "u" ? options.zoom : maxZoom, centerX = width / 2 -
4272
- x * nextZoom, centerY = height / 2 - y * nextZoom;
4015
+ const { width, height, maxZoom, panZoom } = store.getState(), nextZoom = typeof options?.zoom < "u" ? options.zoom : maxZoom, centerX = width / 2 - x * nextZoom, centerY = height / 2 - y * nextZoom;
4273
4016
  return panZoom ? (await panZoom.setViewport({
4274
4017
  x: centerX,
4275
4018
  y: centerY,
@@ -4277,8 +4020,7 @@ const useViewportHelper = () => {
4277
4020
  }, { duration: options?.duration }), Promise.resolve(!0)) : Promise.resolve(!1);
4278
4021
  },
4279
4022
  fitBounds: async (bounds, options) => {
4280
- const { width, height, minZoom, maxZoom, panZoom } = store.getState(), viewport = getViewportForBounds(bounds, width, height, minZoom, maxZoom, options?.
4281
- padding ?? 0.1);
4023
+ const { width, height, minZoom, maxZoom, panZoom } = store.getState(), viewport = getViewportForBounds(bounds, width, height, minZoom, maxZoom, options?.padding ?? 0.1);
4282
4024
  return panZoom ? (await panZoom.setViewport(viewport, { duration: options?.duration }), Promise.resolve(!0)) : Promise.resolve(!1);
4283
4025
  },
4284
4026
  screenToFlowPosition: (clientPosition, options = { snapToGrid: !0 }) => {
@@ -4345,9 +4087,7 @@ function applyChange(change, element) {
4345
4087
  break;
4346
4088
  }
4347
4089
  case "dimensions": {
4348
- typeof change.dimensions < "u" && (element.measured ??= {}, element.measured.width = change.dimensions.width, element.measured.height = change.dimensions.
4349
- height, change.setAttributes && (element.width = change.dimensions.width, element.height = change.dimensions.height)), typeof change.resizing ==
4350
- "boolean" && (element.resizing = change.resizing);
4090
+ typeof change.dimensions < "u" && (element.measured ??= {}, element.measured.width = change.dimensions.width, element.measured.height = change.dimensions.height, change.setAttributes && (element.width = change.dimensions.width, element.height = change.dimensions.height)), typeof change.resizing == "boolean" && (element.resizing = change.resizing);
4351
4091
  break;
4352
4092
  }
4353
4093
  }
@@ -4369,8 +4109,7 @@ function getSelectionChanges(items, selectedIds = /* @__PURE__ */ new Set(), mut
4369
4109
  const changes = [];
4370
4110
  for (const [id2, item] of items) {
4371
4111
  const willBeSelected = selectedIds.has(id2);
4372
- !(item.selected === void 0 && !willBeSelected) && item.selected !== willBeSelected && (mutateItem && (item.selected = willBeSelected), changes.push(
4373
- createSelectionChange(item.id, willBeSelected)));
4112
+ !(item.selected === void 0 && !willBeSelected) && item.selected !== willBeSelected && (mutateItem && (item.selected = willBeSelected), changes.push(createSelectionChange(item.id, willBeSelected)));
4374
4113
  }
4375
4114
  return changes;
4376
4115
  }
@@ -4378,8 +4117,7 @@ function getElementsDiffChanges({ items = [], lookup }) {
4378
4117
  const changes = [], itemsLookup = new Map(items.map((item) => [item.id, item]));
4379
4118
  for (const item of items) {
4380
4119
  const lookupItem = lookup.get(item.id), storeItem = lookupItem?.internals?.userNode ?? lookupItem;
4381
- storeItem !== void 0 && storeItem !== item && changes.push({ id: item.id, item, type: "replace" }), storeItem === void 0 && changes.push({ item, type: "\
4382
- add" });
4120
+ storeItem !== void 0 && storeItem !== item && changes.push({ id: item.id, item, type: "replace" }), storeItem === void 0 && changes.push({ item, type: "add" });
4383
4121
  }
4384
4122
  for (const [id2] of lookup)
4385
4123
  itemsLookup.get(id2) === void 0 && changes.push({ id: id2, type: "remove" });
@@ -4450,15 +4188,13 @@ function useBatchContext() {
4450
4188
  }
4451
4189
  const selector$l = (s) => !!s.panZoom;
4452
4190
  function useReactFlow() {
4453
- const viewportHelper = useViewportHelper(), store = useStoreApi(), batchContext = useBatchContext(), viewportInitialized = useStore(selector$l), generalHelper = useMemo(
4454
- () => {
4191
+ const viewportHelper = useViewportHelper(), store = useStoreApi(), batchContext = useBatchContext(), viewportInitialized = useStore(selector$l), generalHelper = useMemo(() => {
4455
4192
  const getInternalNode = (id2) => store.getState().nodeLookup.get(id2), setNodes = (payload) => {
4456
4193
  batchContext.nodeQueue.push(payload);
4457
4194
  }, setEdges = (payload) => {
4458
4195
  batchContext.edgeQueue.push(payload);
4459
4196
  }, getNodeRect = (node) => {
4460
- const { nodeLookup, nodeOrigin } = store.getState(), nodeToUse = isNode(node) ? node : nodeLookup.get(node.id), position = nodeToUse.parentId ? evaluateAbsolutePosition(
4461
- nodeToUse.position, nodeToUse.measured, nodeToUse.parentId, nodeLookup, nodeOrigin) : nodeToUse.position, nodeWithPosition = {
4197
+ const { nodeLookup, nodeOrigin } = store.getState(), nodeToUse = isNode(node) ? node : nodeLookup.get(node.id), position = nodeToUse.parentId ? evaluateAbsolutePosition(nodeToUse.position, nodeToUse.measured, nodeToUse.parentId, nodeLookup, nodeOrigin) : nodeToUse.position, nodeWithPosition = {
4462
4198
  id: nodeToUse.id,
4463
4199
  position,
4464
4200
  width: nodeToUse.measured?.width ?? nodeToUse.width,
@@ -4515,8 +4251,7 @@ function useReactFlow() {
4515
4251
  };
4516
4252
  },
4517
4253
  deleteElements: async ({ nodes: nodesToRemove = [], edges: edgesToRemove = [] }) => {
4518
- const { nodes, edges, onNodesDelete, onEdgesDelete, triggerNodeChanges, triggerEdgeChanges, onDelete, onBeforeDelete } = store.getState(), { nodes: matchingNodes,
4519
- edges: matchingEdges } = await getElementsToRemove({
4254
+ const { nodes, edges, onNodesDelete, onEdgesDelete, triggerNodeChanges, triggerEdgeChanges, onDelete, onBeforeDelete } = store.getState(), { nodes: matchingNodes, edges: matchingEdges } = await getElementsToRemove({
4520
4255
  nodesToRemove,
4521
4256
  edgesToRemove,
4522
4257
  nodes,
@@ -4574,8 +4309,7 @@ function useReactFlow() {
4574
4309
  }
4575
4310
  const selected = (item) => item.selected, deleteKeyOptions = { actInsideInputWithModifier: !1 }, win$1 = typeof window < "u" ? window : void 0;
4576
4311
  function useGlobalKeyHandler({ deleteKeyCode, multiSelectionKeyCode }) {
4577
- const store = useStoreApi(), { deleteElements } = useReactFlow(), deleteKeyPressed = useKeyPress(deleteKeyCode, deleteKeyOptions), multiSelectionKeyPressed = useKeyPress(
4578
- multiSelectionKeyCode, { target: win$1 });
4312
+ const store = useStoreApi(), { deleteElements } = useReactFlow(), deleteKeyPressed = useKeyPress(deleteKeyCode, deleteKeyOptions), multiSelectionKeyPressed = useKeyPress(multiSelectionKeyCode, { target: win$1 });
4579
4313
  useEffect(() => {
4580
4314
  if (deleteKeyPressed) {
4581
4315
  const { edges, nodes } = store.getState();
@@ -4592,8 +4326,7 @@ function useResizeHandler(domNode) {
4592
4326
  if (!domNode.current)
4593
4327
  return !1;
4594
4328
  const size = getDimensions(domNode.current);
4595
- (size.height === 0 || size.width === 0) && store.getState().onError?.("004", errorMessages.error004()), store.setState({ width: size.width || 500,
4596
- height: size.height || 500 });
4329
+ (size.height === 0 || size.width === 0) && store.getState().onError?.("004", errorMessages.error004()), store.setState({ width: size.width || 500, height: size.height || 500 });
4597
4330
  };
4598
4331
  if (domNode.current) {
4599
4332
  updateDimensions(), window.addEventListener("resize", updateDimensions);
@@ -4614,11 +4347,8 @@ const containerStyle = {
4614
4347
  userSelectionActive: s.userSelectionActive,
4615
4348
  lib: s.lib
4616
4349
  });
4617
- function ZoomPane({ onPaneContextMenu, zoomOnScroll = !0, zoomOnPinch = !0, panOnScroll = !1, panOnScrollSpeed = 0.5, panOnScrollMode = PanOnScrollMode.
4618
- Free, zoomOnDoubleClick = !0, panOnDrag = !0, defaultViewport: defaultViewport2, translateExtent, minZoom, maxZoom, zoomActivationKeyCode, preventScrolling = !0,
4619
- children: children2, noWheelClassName, noPanClassName, onViewportChange, isControlledViewport, paneClickDistance }) {
4620
- const store = useStoreApi(), zoomPane = useRef(null), { userSelectionActive, lib } = useStore(selector$k, shallow$1), zoomActivationKeyPressed = useKeyPress(
4621
- zoomActivationKeyCode), panZoom = useRef();
4350
+ function ZoomPane({ onPaneContextMenu, zoomOnScroll = !0, zoomOnPinch = !0, panOnScroll = !1, panOnScrollSpeed = 0.5, panOnScrollMode = PanOnScrollMode.Free, zoomOnDoubleClick = !0, panOnDrag = !0, defaultViewport: defaultViewport2, translateExtent, minZoom, maxZoom, zoomActivationKeyCode, preventScrolling = !0, children: children2, noWheelClassName, noPanClassName, onViewportChange, isControlledViewport, paneClickDistance }) {
4351
+ const store = useStoreApi(), zoomPane = useRef(null), { userSelectionActive, lib } = useStore(selector$k, shallow$1), zoomActivationKeyPressed = useKeyPress(zoomActivationKeyCode), panZoom = useRef();
4622
4352
  return useResizeHandler(zoomPane), useEffect(() => {
4623
4353
  if (zoomPane.current) {
4624
4354
  panZoom.current = XYPanZoom({
@@ -4707,11 +4437,8 @@ const wrapHandler = (handler, containerRef) => (event) => {
4707
4437
  elementsSelectable: s.elementsSelectable,
4708
4438
  dragging: s.paneDragging
4709
4439
  });
4710
- function Pane({ isSelecting, selectionKeyPressed, selectionMode = SelectionMode.Full, panOnDrag, selectionOnDrag, onSelectionStart, onSelectionEnd, onPaneClick,
4711
- onPaneContextMenu, onPaneScroll, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, children: children2 }) {
4712
- const container = useRef(null), store = useStoreApi(), prevSelectedNodesCount = useRef(0), prevSelectedEdgesCount = useRef(0), containerBounds = useRef(),
4713
- edgeIdLookup = useRef(/* @__PURE__ */ new Map()), { userSelectionActive, elementsSelectable, dragging } = useStore(selector$i, shallow$1), hasActiveSelection = elementsSelectable &&
4714
- (isSelecting || userSelectionActive), selectionInProgress = useRef(!1), selectionStarted = useRef(!1), resetUserSelection = () => {
4440
+ function Pane({ isSelecting, selectionKeyPressed, selectionMode = SelectionMode.Full, panOnDrag, selectionOnDrag, onSelectionStart, onSelectionEnd, onPaneClick, onPaneContextMenu, onPaneScroll, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, children: children2 }) {
4441
+ const container = useRef(null), store = useStoreApi(), prevSelectedNodesCount = useRef(0), prevSelectedEdgesCount = useRef(0), containerBounds = useRef(), edgeIdLookup = useRef(/* @__PURE__ */ new Map()), { userSelectionActive, elementsSelectable, dragging } = useStore(selector$i, shallow$1), hasActiveSelection = elementsSelectable && (isSelecting || userSelectionActive), selectionInProgress = useRef(!1), selectionStarted = useRef(!1), resetUserSelection = () => {
4715
4442
  store.setState({ userSelectionActive: !1, userSelectionRect: null }), prevSelectedNodesCount.current = 0, prevSelectedEdgesCount.current = 0;
4716
4443
  }, onClick = (event) => {
4717
4444
  if (selectionInProgress.current) {
@@ -4727,13 +4454,11 @@ onPaneContextMenu, onPaneScroll, onPaneMouseEnter, onPaneMouseMove, onPaneMouseL
4727
4454
  onPaneContextMenu?.(event);
4728
4455
  }, onWheel = onPaneScroll ? (event) => onPaneScroll(event) : void 0, onPointerDown2 = (event) => {
4729
4456
  const { resetSelectedElements, domNode, edgeLookup } = store.getState();
4730
- if (containerBounds.current = domNode?.getBoundingClientRect(), event.target?.setPointerCapture?.(event.pointerId), !elementsSelectable || !isSelecting ||
4731
- event.button !== 0 || event.target !== container.current || !containerBounds.current)
4457
+ if (containerBounds.current = domNode?.getBoundingClientRect(), event.target?.setPointerCapture?.(event.pointerId), !elementsSelectable || !isSelecting || event.button !== 0 || event.target !== container.current || !containerBounds.current)
4732
4458
  return;
4733
4459
  selectionStarted.current = !0, selectionInProgress.current = !1, edgeIdLookup.current = /* @__PURE__ */ new Map();
4734
4460
  for (const [id2, edge] of edgeLookup)
4735
- edgeIdLookup.current.set(edge.source, edgeIdLookup.current.get(edge.source)?.add(id2) || /* @__PURE__ */ new Set([id2])), edgeIdLookup.current.set(
4736
- edge.target, edgeIdLookup.current.get(edge.target)?.add(id2) || /* @__PURE__ */ new Set([id2]));
4461
+ edgeIdLookup.current.set(edge.source, edgeIdLookup.current.get(edge.source)?.add(id2) || /* @__PURE__ */ new Set([id2])), edgeIdLookup.current.set(edge.target, edgeIdLookup.current.get(edge.target)?.add(id2) || /* @__PURE__ */ new Set([id2]));
4737
4462
  const { x, y } = getEventPosition(event.nativeEvent, containerBounds.current);
4738
4463
  resetSelectedElements(), store.setState({
4739
4464
  userSelectionRect: {
@@ -4757,8 +4482,7 @@ onPaneContextMenu, onPaneScroll, onPaneMouseEnter, onPaneMouseMove, onPaneMouseL
4757
4482
  y: mouseY < startY ? mouseY : startY,
4758
4483
  width: Math.abs(mouseX - startX),
4759
4484
  height: Math.abs(mouseY - startY)
4760
- }, selectedNodes = getNodesInside(nodeLookup, nextUserSelectRect, transform2, selectionMode === SelectionMode.Partial, !0), selectedEdgeIds = /* @__PURE__ */ new Set(),
4761
- selectedNodeIds = /* @__PURE__ */ new Set();
4485
+ }, selectedNodes = getNodesInside(nodeLookup, nextUserSelectRect, transform2, selectionMode === SelectionMode.Partial, !0), selectedEdgeIds = /* @__PURE__ */ new Set(), selectedNodeIds = /* @__PURE__ */ new Set();
4762
4486
  for (const selectedNode of selectedNodes) {
4763
4487
  selectedNodeIds.add(selectedNode.id);
4764
4488
  const edgeIds = edgeIdLookup.current.get(selectedNode.id);
@@ -4786,15 +4510,9 @@ onPaneContextMenu, onPaneScroll, onPaneMouseEnter, onPaneMouseMove, onPaneMouseL
4786
4510
  return;
4787
4511
  event.target?.releasePointerCapture?.(event.pointerId);
4788
4512
  const { userSelectionRect } = store.getState();
4789
- !userSelectionActive && userSelectionRect && event.target === container.current && onClick?.(event), prevSelectedNodesCount.current > 0 && store.setState(
4790
- { nodesSelectionActive: !0 }), resetUserSelection(), onSelectionEnd?.(event), (selectionKeyPressed || selectionOnDrag) && (selectionInProgress.current =
4791
- !1), selectionStarted.current = !1;
4513
+ !userSelectionActive && userSelectionRect && event.target === container.current && onClick?.(event), prevSelectedNodesCount.current > 0 && store.setState({ nodesSelectionActive: !0 }), resetUserSelection(), onSelectionEnd?.(event), (selectionKeyPressed || selectionOnDrag) && (selectionInProgress.current = !1), selectionStarted.current = !1;
4792
4514
  };
4793
- return jsxs("div", { className: cc(["react-flow__pane", { draggable: panOnDrag, dragging, selection: isSelecting }]), onClick: hasActiveSelection ? void 0 :
4794
- wrapHandler(onClick, container), onContextMenu: wrapHandler(onContextMenu, container), onWheel: wrapHandler(onWheel, container), onPointerEnter: hasActiveSelection ?
4795
- void 0 : onPaneMouseEnter, onPointerDown: hasActiveSelection ? onPointerDown2 : onPaneMouseMove, onPointerMove: hasActiveSelection ? onPointerMove :
4796
- onPaneMouseMove, onPointerUp: hasActiveSelection ? onPointerUp : void 0, onPointerLeave: onPaneMouseLeave, ref: container, style: containerStyle, children: [
4797
- children2, jsx(UserSelection, {})] });
4515
+ return jsxs("div", { className: cc(["react-flow__pane", { draggable: panOnDrag, dragging, selection: isSelecting }]), onClick: hasActiveSelection ? void 0 : wrapHandler(onClick, container), onContextMenu: wrapHandler(onContextMenu, container), onWheel: wrapHandler(onWheel, container), onPointerEnter: hasActiveSelection ? void 0 : onPaneMouseEnter, onPointerDown: hasActiveSelection ? onPointerDown2 : onPaneMouseMove, onPointerMove: hasActiveSelection ? onPointerMove : onPaneMouseMove, onPointerUp: hasActiveSelection ? onPointerUp : void 0, onPointerLeave: onPaneMouseLeave, ref: container, style: containerStyle, children: [children2, jsx(UserSelection, {})] });
4798
4516
  }
4799
4517
  function handleNodeClick({ id: id2, store, unselect = !1, nodeRef }) {
4800
4518
  const { addSelectedNodes, unselectNodesAndEdges, multiSelectionActive, nodeLookup, onError } = store.getState(), node = nodeLookup.get(id2);
@@ -4802,8 +4520,7 @@ function handleNodeClick({ id: id2, store, unselect = !1, nodeRef }) {
4802
4520
  onError?.("012", errorMessages.error012(id2));
4803
4521
  return;
4804
4522
  }
4805
- store.setState({ nodesSelectionActive: !1 }), node.selected ? (unselect || node.selected && multiSelectionActive) && (unselectNodesAndEdges({ nodes: [
4806
- node], edges: [] }), requestAnimationFrame(() => nodeRef?.current?.blur())) : addSelectedNodes([id2]);
4523
+ store.setState({ nodesSelectionActive: !1 }), node.selected ? (unselect || node.selected && multiSelectionActive) && (unselectNodesAndEdges({ nodes: [node], edges: [] }), requestAnimationFrame(() => nodeRef?.current?.blur())) : addSelectedNodes([id2]);
4807
4524
  }
4808
4525
  function useDrag({ nodeRef, disabled = !1, noDragClassName, handleSelector, nodeId, isSelectable, nodeClickDistance }) {
4809
4526
  const store = useStoreApi(), [dragging, setDragging] = useState(!1), xyDrag = useRef();
@@ -4844,9 +4561,7 @@ const selectedAndDraggable = (nodesDraggable) => (n2) => n2.selected && (n2.drag
4844
4561
  function useMoveSelectedNodes() {
4845
4562
  const store = useStoreApi();
4846
4563
  return useCallback((params) => {
4847
- const { nodeExtent, snapToGrid, snapGrid, nodesDraggable, onError, updateNodePositions, nodeLookup, nodeOrigin } = store.getState(), nodeUpdates = /* @__PURE__ */ new Map(),
4848
- isSelected = selectedAndDraggable(nodesDraggable), xVelo = snapToGrid ? snapGrid[0] : 5, yVelo = snapToGrid ? snapGrid[1] : 5, xDiff = params.direction.
4849
- x * xVelo * params.factor, yDiff = params.direction.y * yVelo * params.factor;
4564
+ const { nodeExtent, snapToGrid, snapGrid, nodesDraggable, onError, updateNodePositions, nodeLookup, nodeOrigin } = store.getState(), nodeUpdates = /* @__PURE__ */ new Map(), isSelected = selectedAndDraggable(nodesDraggable), xVelo = snapToGrid ? snapGrid[0] : 5, yVelo = snapToGrid ? snapGrid[1] : 5, xDiff = params.direction.x * xVelo * params.factor, yDiff = params.direction.y * yVelo * params.factor;
4850
4565
  for (const [, node] of nodeLookup) {
4851
4566
  if (!isSelected(node))
4852
4567
  continue;
@@ -4873,23 +4588,18 @@ const NodeIdContext = createContext(null), Provider = NodeIdContext.Provider, us
4873
4588
  noPanClassName: s.noPanClassName,
4874
4589
  rfId: s.rfId
4875
4590
  }), connectingSelector = (nodeId, handleId, type) => (state) => {
4876
- const { connectionClickStartHandle: clickHandle, connectionMode, connection } = state, { fromHandle, toHandle, isValid } = connection, connectingTo = toHandle?.
4877
- nodeId === nodeId && toHandle?.id === handleId && toHandle?.type === type;
4591
+ const { connectionClickStartHandle: clickHandle, connectionMode, connection } = state, { fromHandle, toHandle, isValid } = connection, connectingTo = toHandle?.nodeId === nodeId && toHandle?.id === handleId && toHandle?.type === type;
4878
4592
  return {
4879
4593
  connectingFrom: fromHandle?.nodeId === nodeId && fromHandle?.id === handleId && fromHandle?.type === type,
4880
4594
  connectingTo,
4881
4595
  clickConnecting: clickHandle?.nodeId === nodeId && clickHandle?.id === handleId && clickHandle?.type === type,
4882
- isPossibleEndHandle: connectionMode === ConnectionMode.Strict ? fromHandle?.type !== type : nodeId !== fromHandle?.nodeId || handleId !== fromHandle?.
4883
- id,
4596
+ isPossibleEndHandle: connectionMode === ConnectionMode.Strict ? fromHandle?.type !== type : nodeId !== fromHandle?.nodeId || handleId !== fromHandle?.id,
4884
4597
  connectionInProcess: !!fromHandle,
4885
4598
  valid: connectingTo && isValid
4886
4599
  };
4887
4600
  };
4888
- function HandleComponent({ type = "source", position = Position.Top, isValidConnection, isConnectable = !0, isConnectableStart = !0, isConnectableEnd = !0,
4889
- id: id2, onConnect, children: children2, className, onMouseDown, onTouchStart, ...rest }, ref) {
4890
- const handleId = id2 || null, isTarget = type === "target", store = useStoreApi(), nodeId = useNodeId(), { connectOnClick, noPanClassName, rfId } = useStore(
4891
- selector$h, shallow$1), { connectingFrom, connectingTo, clickConnecting, isPossibleEndHandle, connectionInProcess, valid } = useStore(connectingSelector(
4892
- nodeId, handleId, type), shallow$1);
4601
+ function HandleComponent({ type = "source", position = Position.Top, isValidConnection, isConnectable = !0, isConnectableStart = !0, isConnectableEnd = !0, id: id2, onConnect, children: children2, className, onMouseDown, onTouchStart, ...rest }, ref) {
4602
+ const handleId = id2 || null, isTarget = type === "target", store = useStoreApi(), nodeId = useNodeId(), { connectOnClick, noPanClassName, rfId } = useStore(selector$h, shallow$1), { connectingFrom, connectingTo, clickConnecting, isPossibleEndHandle, connectionInProcess, valid } = useStore(connectingSelector(nodeId, handleId, type), shallow$1);
4893
4603
  nodeId || store.getState().onError?.("010", errorMessages.error010());
4894
4604
  const onConnectExtended = (params) => {
4895
4605
  const { defaultEdgeOptions, onConnect: onConnectAction, hasDefaultEdges } = store.getState(), edgeParams = {
@@ -4932,16 +4642,14 @@ id: id2, onConnect, children: children2, className, onMouseDown, onTouchStart, .
4932
4642
  }
4933
4643
  isMouseTriggered ? onMouseDown?.(event) : onTouchStart?.(event);
4934
4644
  }, onClick = (event) => {
4935
- const { onClickConnectStart, onClickConnectEnd, connectionClickStartHandle, connectionMode, isValidConnection: isValidConnectionStore, lib, rfId: flowId } = store.
4936
- getState();
4645
+ const { onClickConnectStart, onClickConnectEnd, connectionClickStartHandle, connectionMode, isValidConnection: isValidConnectionStore, lib, rfId: flowId } = store.getState();
4937
4646
  if (!nodeId || !connectionClickStartHandle && !isConnectableStart)
4938
4647
  return;
4939
4648
  if (!connectionClickStartHandle) {
4940
4649
  onClickConnectStart?.(event.nativeEvent, { nodeId, handleId, handleType: type }), store.setState({ connectionClickStartHandle: { nodeId, type, id: handleId } });
4941
4650
  return;
4942
4651
  }
4943
- const doc = getHostForElement(event.target), isValidConnectionHandler = isValidConnection || isValidConnectionStore, { connection, isValid } = XYHandle.
4944
- isValid(event.nativeEvent, {
4652
+ const doc = getHostForElement(event.target), isValidConnectionHandler = isValidConnection || isValidConnectionStore, { connection, isValid } = XYHandle.isValid(event.nativeEvent, {
4945
4653
  handle: {
4946
4654
  nodeId,
4947
4655
  id: handleId,
@@ -4958,8 +4666,7 @@ id: id2, onConnect, children: children2, className, onMouseDown, onTouchStart, .
4958
4666
  });
4959
4667
  isValid && connection && onConnectExtended(connection), onClickConnectEnd?.(event), store.setState({ connectionClickStartHandle: null });
4960
4668
  };
4961
- return jsx("div", { "data-handleid": handleId, "data-nodeid": nodeId, "data-handlepos": position, "data-id": `${rfId}-${nodeId}-${handleId}-${type}`,
4962
- className: cc([
4669
+ return jsx("div", { "data-handleid": handleId, "data-nodeid": nodeId, "data-handlepos": position, "data-id": `${rfId}-${nodeId}-${handleId}-${type}`, className: cc([
4963
4670
  "react-flow__handle",
4964
4671
  `react-flow__handle-${position}`,
4965
4672
  "nodrag",
@@ -4986,8 +4693,7 @@ function InputNode({ data, isConnectable, sourcePosition = Position.Bottom }) {
4986
4693
  return jsxs(Fragment, { children: [data?.label, jsx(Handle, { type: "source", position: sourcePosition, isConnectable })] });
4987
4694
  }
4988
4695
  function DefaultNode({ data, isConnectable, targetPosition = Position.Top, sourcePosition = Position.Bottom }) {
4989
- return jsxs(Fragment, { children: [jsx(Handle, { type: "target", position: targetPosition, isConnectable }), data?.label, jsx(Handle, { type: "sourc\
4990
- e", position: sourcePosition, isConnectable })] });
4696
+ return jsxs(Fragment, { children: [jsx(Handle, { type: "target", position: targetPosition, isConnectable }), data?.label, jsx(Handle, { type: "source", position: sourcePosition, isConnectable })] });
4991
4697
  }
4992
4698
  function GroupNode() {
4993
4699
  return null;
@@ -5027,8 +4733,7 @@ const selector$g = (s) => {
5027
4733
  };
5028
4734
  };
5029
4735
  function NodesSelection({ onSelectionContextMenu, noPanClassName, disableKeyboardA11y }) {
5030
- const store = useStoreApi(), { width, height, transformString, userSelectionActive } = useStore(selector$g, shallow$1), moveSelectedNodes = useMoveSelectedNodes(),
5031
- nodeRef = useRef(null);
4736
+ const store = useStoreApi(), { width, height, transformString, userSelectionActive } = useStore(selector$g, shallow$1), moveSelectedNodes = useMoveSelectedNodes(), nodeRef = useRef(null);
5032
4737
  if (useEffect(() => {
5033
4738
  disableKeyboardA11y || nodeRef.current?.focus({
5034
4739
  preventScroll: !0
@@ -5048,31 +4753,18 @@ function NodesSelection({ onSelectionContextMenu, noPanClassName, disableKeyboar
5048
4753
  };
5049
4754
  return jsx("div", { className: cc(["react-flow__nodesselection", "react-flow__container", noPanClassName]), style: {
5050
4755
  transform: transformString
5051
- }, children: jsx("div", { ref: nodeRef, className: "react-flow__nodesselection-rect", onContextMenu, tabIndex: disableKeyboardA11y ? void 0 : -1, onKeyDown: disableKeyboardA11y ?
5052
- void 0 : onKeyDown, style: {
4756
+ }, children: jsx("div", { ref: nodeRef, className: "react-flow__nodesselection-rect", onContextMenu, tabIndex: disableKeyboardA11y ? void 0 : -1, onKeyDown: disableKeyboardA11y ? void 0 : onKeyDown, style: {
5053
4757
  width,
5054
4758
  height
5055
4759
  } }) });
5056
4760
  }
5057
4761
  const win = typeof window < "u" ? window : void 0, selector$f = (s) => ({ nodesSelectionActive: s.nodesSelectionActive, userSelectionActive: s.userSelectionActive });
5058
- function FlowRendererComponent({ children: children2, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneContextMenu, onPaneScroll,
5059
- paneClickDistance, deleteKeyCode, selectionKeyCode, selectionOnDrag, selectionMode, onSelectionStart, onSelectionEnd, multiSelectionKeyCode, panActivationKeyCode,
5060
- zoomActivationKeyCode, elementsSelectable, zoomOnScroll, zoomOnPinch, panOnScroll: _panOnScroll, panOnScrollSpeed, panOnScrollMode, zoomOnDoubleClick,
5061
- panOnDrag: _panOnDrag, defaultViewport: defaultViewport2, translateExtent, minZoom, maxZoom, preventScrolling, onSelectionContextMenu, noWheelClassName,
5062
- noPanClassName, disableKeyboardA11y, onViewportChange, isControlledViewport }) {
5063
- const { nodesSelectionActive, userSelectionActive } = useStore(selector$f), selectionKeyPressed = useKeyPress(selectionKeyCode, { target: win }), panActivationKeyPressed = useKeyPress(
5064
- panActivationKeyCode, { target: win }), panOnDrag = panActivationKeyPressed || _panOnDrag, panOnScroll = panActivationKeyPressed || _panOnScroll, _selectionOnDrag = selectionOnDrag &&
5065
- panOnDrag !== !0, isSelecting = selectionKeyPressed || userSelectionActive || _selectionOnDrag;
5066
- return useGlobalKeyHandler({ deleteKeyCode, multiSelectionKeyCode }), jsx(ZoomPane, { onPaneContextMenu, elementsSelectable, zoomOnScroll, zoomOnPinch,
5067
- panOnScroll, panOnScrollSpeed, panOnScrollMode, zoomOnDoubleClick, panOnDrag: !selectionKeyPressed && panOnDrag, defaultViewport: defaultViewport2, translateExtent,
5068
- minZoom, maxZoom, zoomActivationKeyCode, preventScrolling, noWheelClassName, noPanClassName, onViewportChange, isControlledViewport, paneClickDistance,
5069
- children: jsxs(Pane, { onSelectionStart, onSelectionEnd, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneContextMenu, onPaneScroll,
5070
- panOnDrag, isSelecting: !!isSelecting, selectionMode, selectionKeyPressed, selectionOnDrag: _selectionOnDrag, children: [children2, nodesSelectionActive &&
5071
- jsx(NodesSelection, { onSelectionContextMenu, noPanClassName, disableKeyboardA11y })] }) });
4762
+ function FlowRendererComponent({ children: children2, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneContextMenu, onPaneScroll, paneClickDistance, deleteKeyCode, selectionKeyCode, selectionOnDrag, selectionMode, onSelectionStart, onSelectionEnd, multiSelectionKeyCode, panActivationKeyCode, zoomActivationKeyCode, elementsSelectable, zoomOnScroll, zoomOnPinch, panOnScroll: _panOnScroll, panOnScrollSpeed, panOnScrollMode, zoomOnDoubleClick, panOnDrag: _panOnDrag, defaultViewport: defaultViewport2, translateExtent, minZoom, maxZoom, preventScrolling, onSelectionContextMenu, noWheelClassName, noPanClassName, disableKeyboardA11y, onViewportChange, isControlledViewport }) {
4763
+ const { nodesSelectionActive, userSelectionActive } = useStore(selector$f), selectionKeyPressed = useKeyPress(selectionKeyCode, { target: win }), panActivationKeyPressed = useKeyPress(panActivationKeyCode, { target: win }), panOnDrag = panActivationKeyPressed || _panOnDrag, panOnScroll = panActivationKeyPressed || _panOnScroll, _selectionOnDrag = selectionOnDrag && panOnDrag !== !0, isSelecting = selectionKeyPressed || userSelectionActive || _selectionOnDrag;
4764
+ return useGlobalKeyHandler({ deleteKeyCode, multiSelectionKeyCode }), jsx(ZoomPane, { onPaneContextMenu, elementsSelectable, zoomOnScroll, zoomOnPinch, panOnScroll, panOnScrollSpeed, panOnScrollMode, zoomOnDoubleClick, panOnDrag: !selectionKeyPressed && panOnDrag, defaultViewport: defaultViewport2, translateExtent, minZoom, maxZoom, zoomActivationKeyCode, preventScrolling, noWheelClassName, noPanClassName, onViewportChange, isControlledViewport, paneClickDistance, children: jsxs(Pane, { onSelectionStart, onSelectionEnd, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneContextMenu, onPaneScroll, panOnDrag, isSelecting: !!isSelecting, selectionMode, selectionKeyPressed, selectionOnDrag: _selectionOnDrag, children: [children2, nodesSelectionActive && jsx(NodesSelection, { onSelectionContextMenu, noPanClassName, disableKeyboardA11y })] }) });
5072
4765
  }
5073
4766
  FlowRendererComponent.displayName = "FlowRenderer";
5074
- const FlowRenderer = memo(FlowRendererComponent), selector$e = (onlyRenderVisible) => (s) => onlyRenderVisible ? getNodesInside(s.nodeLookup, { x: 0, y: 0,
5075
- width: s.width, height: s.height }, s.transform, !0).map((node) => node.id) : Array.from(s.nodeLookup.keys());
4767
+ const FlowRenderer = memo(FlowRendererComponent), selector$e = (onlyRenderVisible) => (s) => onlyRenderVisible ? getNodesInside(s.nodeLookup, { x: 0, y: 0, width: s.width, height: s.height }, s.transform, !0).map((node) => node.id) : Array.from(s.nodeLookup.keys());
5076
4768
  function useVisibleNodeIds(onlyRenderVisible) {
5077
4769
  return useStore(useCallback(selector$e(onlyRenderVisible), [onlyRenderVisible]), shallow$1);
5078
4770
  }
@@ -5094,25 +4786,19 @@ function useResizeObserver() {
5094
4786
  }, [resizeObserver]), resizeObserver;
5095
4787
  }
5096
4788
  function useNodeObserver({ node, nodeType, hasDimensions, resizeObserver }) {
5097
- const store = useStoreApi(), nodeRef = useRef(null), observedNode = useRef(null), prevSourcePosition = useRef(node.sourcePosition), prevTargetPosition = useRef(
5098
- node.targetPosition), prevType = useRef(nodeType), isInitialized = hasDimensions && !!node.internals.handleBounds;
4789
+ const store = useStoreApi(), nodeRef = useRef(null), observedNode = useRef(null), prevSourcePosition = useRef(node.sourcePosition), prevTargetPosition = useRef(node.targetPosition), prevType = useRef(nodeType), isInitialized = hasDimensions && !!node.internals.handleBounds;
5099
4790
  return useEffect(() => {
5100
- nodeRef.current && !node.hidden && (!isInitialized || observedNode.current !== nodeRef.current) && (observedNode.current && resizeObserver?.unobserve(
5101
- observedNode.current), resizeObserver?.observe(nodeRef.current), observedNode.current = nodeRef.current);
4791
+ nodeRef.current && !node.hidden && (!isInitialized || observedNode.current !== nodeRef.current) && (observedNode.current && resizeObserver?.unobserve(observedNode.current), resizeObserver?.observe(nodeRef.current), observedNode.current = nodeRef.current);
5102
4792
  }, [isInitialized, node.hidden]), useEffect(() => () => {
5103
4793
  observedNode.current && (resizeObserver?.unobserve(observedNode.current), observedNode.current = null);
5104
4794
  }, []), useEffect(() => {
5105
4795
  if (nodeRef.current) {
5106
- const typeChanged = prevType.current !== nodeType, sourcePosChanged = prevSourcePosition.current !== node.sourcePosition, targetPosChanged = prevTargetPosition.
5107
- current !== node.targetPosition;
5108
- (typeChanged || sourcePosChanged || targetPosChanged) && (prevType.current = nodeType, prevSourcePosition.current = node.sourcePosition, prevTargetPosition.
5109
- current = node.targetPosition, store.getState().updateNodeInternals(/* @__PURE__ */ new Map([[node.id, { id: node.id, nodeElement: nodeRef.current,
5110
- force: !0 }]])));
4796
+ const typeChanged = prevType.current !== nodeType, sourcePosChanged = prevSourcePosition.current !== node.sourcePosition, targetPosChanged = prevTargetPosition.current !== node.targetPosition;
4797
+ (typeChanged || sourcePosChanged || targetPosChanged) && (prevType.current = nodeType, prevSourcePosition.current = node.sourcePosition, prevTargetPosition.current = node.targetPosition, store.getState().updateNodeInternals(/* @__PURE__ */ new Map([[node.id, { id: node.id, nodeElement: nodeRef.current, force: !0 }]])));
5111
4798
  }
5112
4799
  }, [node.id, nodeType, node.sourcePosition, node.targetPosition]), nodeRef;
5113
4800
  }
5114
- function NodeWrapper({ id: id2, onClick, onMouseEnter, onMouseMove, onMouseLeave, onContextMenu, onDoubleClick, nodesDraggable, elementsSelectable, nodesConnectable,
5115
- nodesFocusable, resizeObserver, noDragClassName, noPanClassName, disableKeyboardA11y, rfId, nodeTypes, nodeExtent, nodeClickDistance, onError }) {
4801
+ function NodeWrapper({ id: id2, onClick, onMouseEnter, onMouseMove, onMouseLeave, onContextMenu, onDoubleClick, nodesDraggable, elementsSelectable, nodesConnectable, nodesFocusable, resizeObserver, noDragClassName, noPanClassName, disableKeyboardA11y, rfId, nodeTypes, nodeExtent, nodeClickDistance, onError }) {
5116
4802
  const { node, internals, isParent } = useStore((s) => {
5117
4803
  const node2 = s.nodeLookup.get(id2), isParent2 = s.parentLookup.has(id2);
5118
4804
  return {
@@ -5123,10 +4809,7 @@ nodesFocusable, resizeObserver, noDragClassName, noPanClassName, disableKeyboard
5123
4809
  }, shallow$1);
5124
4810
  let nodeType = node.type || "default", NodeComponent = nodeTypes?.[nodeType] || builtinNodeTypes[nodeType];
5125
4811
  NodeComponent === void 0 && (onError?.("003", errorMessages.error003(nodeType)), nodeType = "default", NodeComponent = builtinNodeTypes.default);
5126
- const isDraggable = !!(node.draggable || nodesDraggable && typeof node.draggable > "u"), isSelectable = !!(node.selectable || elementsSelectable && typeof node.
5127
- selectable > "u"), isConnectable = !!(node.connectable || nodesConnectable && typeof node.connectable > "u"), isFocusable = !!(node.focusable || nodesFocusable &&
5128
- typeof node.focusable > "u"), store = useStoreApi(), hasDimensions = nodeHasDimensions(node), nodeRef = useNodeObserver({ node, nodeType, hasDimensions,
5129
- resizeObserver }), dragging = useDrag({
4812
+ const isDraggable = !!(node.draggable || nodesDraggable && typeof node.draggable > "u"), isSelectable = !!(node.selectable || elementsSelectable && typeof node.selectable > "u"), isConnectable = !!(node.connectable || nodesConnectable && typeof node.connectable > "u"), isFocusable = !!(node.focusable || nodesFocusable && typeof node.focusable > "u"), store = useStoreApi(), hasDimensions = nodeHasDimensions(node), nodeRef = useNodeObserver({ node, nodeType, hasDimensions, resizeObserver }), dragging = useDrag({
5130
4813
  nodeRef,
5131
4814
  disabled: node.hidden || !isDraggable,
5132
4815
  noDragClassName,
@@ -5137,12 +4820,7 @@ nodesFocusable, resizeObserver, noDragClassName, noPanClassName, disableKeyboard
5137
4820
  }), moveSelectedNodes = useMoveSelectedNodes();
5138
4821
  if (node.hidden)
5139
4822
  return null;
5140
- const nodeDimensions = getNodeDimensions(node), inlineDimensions = getNodeInlineStyleDimensions(node), clampedPosition = nodeExtent ? clampPosition(
5141
- internals.positionAbsolute, nodeExtent) : internals.positionAbsolute, hasPointerEvents = isSelectable || isDraggable || onClick || onMouseEnter || onMouseMove ||
5142
- onMouseLeave, onMouseEnterHandler = onMouseEnter ? (event) => onMouseEnter(event, { ...internals.userNode }) : void 0, onMouseMoveHandler = onMouseMove ?
5143
- (event) => onMouseMove(event, { ...internals.userNode }) : void 0, onMouseLeaveHandler = onMouseLeave ? (event) => onMouseLeave(event, { ...internals.
5144
- userNode }) : void 0, onContextMenuHandler = onContextMenu ? (event) => onContextMenu(event, { ...internals.userNode }) : void 0, onDoubleClickHandler = onDoubleClick ?
5145
- (event) => onDoubleClick(event, { ...internals.userNode }) : void 0, onSelectNodeHandler = (event) => {
4823
+ const nodeDimensions = getNodeDimensions(node), inlineDimensions = getNodeInlineStyleDimensions(node), clampedPosition = nodeExtent ? clampPosition(internals.positionAbsolute, nodeExtent) : internals.positionAbsolute, hasPointerEvents = isSelectable || isDraggable || onClick || onMouseEnter || onMouseMove || onMouseLeave, onMouseEnterHandler = onMouseEnter ? (event) => onMouseEnter(event, { ...internals.userNode }) : void 0, onMouseMoveHandler = onMouseMove ? (event) => onMouseMove(event, { ...internals.userNode }) : void 0, onMouseLeaveHandler = onMouseLeave ? (event) => onMouseLeave(event, { ...internals.userNode }) : void 0, onContextMenuHandler = onContextMenu ? (event) => onContextMenu(event, { ...internals.userNode }) : void 0, onDoubleClickHandler = onDoubleClick ? (event) => onDoubleClick(event, { ...internals.userNode }) : void 0, onSelectNodeHandler = (event) => {
5146
4824
  const { selectNodesOnDrag, nodeDragThreshold } = store.getState();
5147
4825
  isSelectable && (!selectNodesOnDrag || !isDraggable || nodeDragThreshold > 0) && handleNodeClick({
5148
4826
  id: id2,
@@ -5160,8 +4838,7 @@ nodesFocusable, resizeObserver, noDragClassName, noPanClassName, disableKeyboard
5160
4838
  nodeRef
5161
4839
  });
5162
4840
  } else isDraggable && node.selected && Object.prototype.hasOwnProperty.call(arrowKeyDiffs, event.key) && (store.setState({
5163
- ariaLiveMessage: `Moved selected node ${event.key.replace("Arrow", "").toLowerCase()}. New position, x: ${~~clampedPosition.x}, y: ${~~clampedPosition.
5164
- y}`
4841
+ ariaLiveMessage: `Moved selected node ${event.key.replace("Arrow", "").toLowerCase()}. New position, x: ${~~clampedPosition.x}, y: ${~~clampedPosition.y}`
5165
4842
  }), moveSelectedNodes({
5166
4843
  direction: arrowKeyDiffs[event.key],
5167
4844
  factor: event.shiftKey ? 4 : 1
@@ -5189,13 +4866,7 @@ nodesFocusable, resizeObserver, noDragClassName, noPanClassName, disableKeyboard
5189
4866
  visibility: hasDimensions ? "visible" : "hidden",
5190
4867
  ...node.style,
5191
4868
  ...inlineDimensions
5192
- }, "data-id": id2, "data-testid": `rf__node-${id2}`, onMouseEnter: onMouseEnterHandler, onMouseMove: onMouseMoveHandler, onMouseLeave: onMouseLeaveHandler,
5193
- onContextMenu: onContextMenuHandler, onClick: onSelectNodeHandler, onDoubleClick: onDoubleClickHandler, onKeyDown: isFocusable ? onKeyDown : void 0,
5194
- tabIndex: isFocusable ? 0 : void 0, role: isFocusable ? "button" : void 0, "aria-describedby": disableKeyboardA11y ? void 0 : `${ARIA_NODE_DESC_KEY}\
5195
- -${rfId}`, "aria-label": node.ariaLabel, children: jsx(Provider, { value: id2, children: jsx(NodeComponent, { id: id2, data: node.data, type: nodeType,
5196
- positionAbsoluteX: clampedPosition.x, positionAbsoluteY: clampedPosition.y, selected: node.selected, selectable: isSelectable, draggable: isDraggable,
5197
- deletable: node.deletable ?? !0, isConnectable, sourcePosition: node.sourcePosition, targetPosition: node.targetPosition, dragging, dragHandle: node.
5198
- dragHandle, zIndex: internals.z, parentId: node.parentId, ...nodeDimensions }) }) });
4869
+ }, "data-id": id2, "data-testid": `rf__node-${id2}`, onMouseEnter: onMouseEnterHandler, onMouseMove: onMouseMoveHandler, onMouseLeave: onMouseLeaveHandler, onContextMenu: onContextMenuHandler, onClick: onSelectNodeHandler, onDoubleClick: onDoubleClickHandler, onKeyDown: isFocusable ? onKeyDown : void 0, tabIndex: isFocusable ? 0 : void 0, role: isFocusable ? "button" : void 0, "aria-describedby": disableKeyboardA11y ? void 0 : `${ARIA_NODE_DESC_KEY}-${rfId}`, "aria-label": node.ariaLabel, children: jsx(Provider, { value: id2, children: jsx(NodeComponent, { id: id2, data: node.data, type: nodeType, positionAbsoluteX: clampedPosition.x, positionAbsoluteY: clampedPosition.y, selected: node.selected, selectable: isSelectable, draggable: isDraggable, deletable: node.deletable ?? !0, isConnectable, sourcePosition: node.sourcePosition, targetPosition: node.targetPosition, dragging, dragHandle: node.dragHandle, zIndex: internals.z, parentId: node.parentId, ...nodeDimensions }) }) });
5199
4870
  }
5200
4871
  const selector$c = (s) => ({
5201
4872
  nodesDraggable: s.nodesDraggable,
@@ -5205,8 +4876,7 @@ const selector$c = (s) => ({
5205
4876
  onError: s.onError
5206
4877
  });
5207
4878
  function NodeRendererComponent(props) {
5208
- const { nodesDraggable, nodesConnectable, nodesFocusable, elementsSelectable, onError } = useStore(selector$c, shallow$1), nodeIds = useVisibleNodeIds(
5209
- props.onlyRenderVisibleElements), resizeObserver = useResizeObserver();
4879
+ const { nodesDraggable, nodesConnectable, nodesFocusable, elementsSelectable, onError } = useStore(selector$c, shallow$1), nodeIds = useVisibleNodeIds(props.onlyRenderVisibleElements), resizeObserver = useResizeObserver();
5210
4880
  return jsx("div", { className: "react-flow__nodes", style: containerStyle, children: nodeIds.map((nodeId) => (
5211
4881
  // The split of responsibilities between NodeRenderer and
5212
4882
  // NodeComponentWrapper may appear weird. However, it’s designed to
@@ -5231,10 +4901,7 @@ function NodeRendererComponent(props) {
5231
4901
  // moved into `NodeComponentWrapper`. This ensures they are
5232
4902
  // memorized – so if `NodeRenderer` *has* to rerender, it only
5233
4903
  // needs to regenerate the list of nodes, nothing else.
5234
- jsx(NodeWrapper, { id: nodeId, nodeTypes: props.nodeTypes, nodeExtent: props.nodeExtent, onClick: props.onNodeClick, onMouseEnter: props.onNodeMouseEnter,
5235
- onMouseMove: props.onNodeMouseMove, onMouseLeave: props.onNodeMouseLeave, onContextMenu: props.onNodeContextMenu, onDoubleClick: props.onNodeDoubleClick,
5236
- noDragClassName: props.noDragClassName, noPanClassName: props.noPanClassName, rfId: props.rfId, disableKeyboardA11y: props.disableKeyboardA11y, resizeObserver,
5237
- nodesDraggable, nodesConnectable, nodesFocusable, elementsSelectable, nodeClickDistance: props.nodeClickDistance, onError }, nodeId)
4904
+ jsx(NodeWrapper, { id: nodeId, nodeTypes: props.nodeTypes, nodeExtent: props.nodeExtent, onClick: props.onNodeClick, onMouseEnter: props.onNodeMouseEnter, onMouseMove: props.onNodeMouseMove, onMouseLeave: props.onNodeMouseLeave, onContextMenu: props.onNodeContextMenu, onDoubleClick: props.onNodeDoubleClick, noDragClassName: props.noDragClassName, noPanClassName: props.noPanClassName, rfId: props.rfId, disableKeyboardA11y: props.disableKeyboardA11y, resizeObserver, nodesDraggable, nodesConnectable, nodesFocusable, elementsSelectable, nodeClickDistance: props.nodeClickDistance, onError }, nodeId)
5238
4905
  )) });
5239
4906
  }
5240
4907
  NodeRendererComponent.displayName = "NodeRenderer";
@@ -5261,8 +4928,7 @@ function useVisibleEdgeIds(onlyRenderVisible) {
5261
4928
  const ArrowSymbol = ({ color: color2 = "none", strokeWidth = 1 }) => jsx("polyline", { style: {
5262
4929
  stroke: color2,
5263
4930
  strokeWidth
5264
- }, strokeLinecap: "round", strokeLinejoin: "round", fill: "none", points: "-5,-4 0,0 -5,4" }), ArrowClosedSymbol = ({ color: color2 = "none", strokeWidth = 1 }) => jsx(
5265
- "polyline", { style: {
4931
+ }, strokeLinecap: "round", strokeLinejoin: "round", fill: "none", points: "-5,-4 0,0 -5,4" }), ArrowClosedSymbol = ({ color: color2 = "none", strokeWidth = 1 }) => jsx("polyline", { style: {
5266
4932
  stroke: color2,
5267
4933
  fill: color2,
5268
4934
  strokeWidth
@@ -5272,13 +4938,11 @@ const ArrowSymbol = ({ color: color2 = "none", strokeWidth = 1 }) => jsx("polyli
5272
4938
  };
5273
4939
  function useMarkerSymbol(type) {
5274
4940
  const store = useStoreApi();
5275
- return useMemo(() => Object.prototype.hasOwnProperty.call(MarkerSymbols, type) ? MarkerSymbols[type] : (store.getState().onError?.("009", errorMessages.
5276
- error009(type)), null), [type]);
4941
+ return useMemo(() => Object.prototype.hasOwnProperty.call(MarkerSymbols, type) ? MarkerSymbols[type] : (store.getState().onError?.("009", errorMessages.error009(type)), null), [type]);
5277
4942
  }
5278
4943
  const Marker = ({ id: id2, type, color: color2, width = 12.5, height = 12.5, markerUnits = "strokeWidth", strokeWidth, orient = "auto-start-reverse" }) => {
5279
4944
  const Symbol2 = useMarkerSymbol(type);
5280
- return Symbol2 ? jsx("marker", { className: "react-flow__arrowhead", id: id2, markerWidth: `${width}`, markerHeight: `${height}`, viewBox: "-10 -10 \
5281
- 20 20", markerUnits, orient, refX: "0", refY: "0", children: jsx(Symbol2, { color: color2, strokeWidth }) }) : null;
4945
+ return Symbol2 ? jsx("marker", { className: "react-flow__arrowhead", id: id2, markerWidth: `${width}`, markerHeight: `${height}`, viewBox: "-10 -10 20 20", markerUnits, orient, refX: "0", refY: "0", children: jsx(Symbol2, { color: color2, strokeWidth }) }) : null;
5282
4946
  }, MarkerDefinitions = ({ defaultColor, rfId }) => {
5283
4947
  const edges = useStore((s) => s.edges), defaultEdgeOptions = useStore((s) => s.defaultEdgeOptions), markers = useMemo(() => createMarkerIds(edges, {
5284
4948
  id: rfId,
@@ -5286,16 +4950,12 @@ const Marker = ({ id: id2, type, color: color2, width = 12.5, height = 12.5, mar
5286
4950
  defaultMarkerStart: defaultEdgeOptions?.markerStart,
5287
4951
  defaultMarkerEnd: defaultEdgeOptions?.markerEnd
5288
4952
  }), [edges, defaultEdgeOptions, rfId, defaultColor]);
5289
- return markers.length ? jsx("svg", { className: "react-flow__marker", children: jsx("defs", { children: markers.map((marker) => jsx(Marker, { id: marker.
5290
- id, type: marker.type, color: marker.color, width: marker.width, height: marker.height, markerUnits: marker.markerUnits, strokeWidth: marker.strokeWidth,
5291
- orient: marker.orient }, marker.id)) }) }) : null;
4953
+ return markers.length ? jsx("svg", { className: "react-flow__marker", children: jsx("defs", { children: markers.map((marker) => jsx(Marker, { id: marker.id, type: marker.type, color: marker.color, width: marker.width, height: marker.height, markerUnits: marker.markerUnits, strokeWidth: marker.strokeWidth, orient: marker.orient }, marker.id)) }) }) : null;
5292
4954
  };
5293
4955
  MarkerDefinitions.displayName = "MarkerDefinitions";
5294
4956
  var MarkerDefinitions$1 = memo(MarkerDefinitions);
5295
- function EdgeTextComponent({ x, y, label, labelStyle = {}, labelShowBg = !0, labelBgStyle = {}, labelBgPadding = [2, 4], labelBgBorderRadius = 2, children: children2,
5296
- className, ...rest }) {
5297
- const [edgeTextBbox, setEdgeTextBbox] = useState({ x: 1, y: 0, width: 0, height: 0 }), edgeTextClasses = cc(["react-flow__edge-textwrapper", className]),
5298
- edgeTextRef = useRef(null);
4957
+ function EdgeTextComponent({ x, y, label, labelStyle = {}, labelShowBg = !0, labelBgStyle = {}, labelBgPadding = [2, 4], labelBgBorderRadius = 2, children: children2, className, ...rest }) {
4958
+ const [edgeTextBbox, setEdgeTextBbox] = useState({ x: 1, y: 0, width: 0, height: 0 }), edgeTextClasses = cc(["react-flow__edge-textwrapper", className]), edgeTextRef = useRef(null);
5299
4959
  return useEffect(() => {
5300
4960
  if (edgeTextRef.current) {
5301
4961
  const textBbox = edgeTextRef.current.getBBox();
@@ -5306,20 +4966,12 @@ className, ...rest }) {
5306
4966
  height: textBbox.height
5307
4967
  });
5308
4968
  }
5309
- }, [label]), typeof label > "u" || !label ? null : jsxs("g", { transform: `translate(${x - edgeTextBbox.width / 2} ${y - edgeTextBbox.height / 2})`,
5310
- className: edgeTextClasses, visibility: edgeTextBbox.width ? "visible" : "hidden", ...rest, children: [labelShowBg && jsx("rect", { width: edgeTextBbox.
5311
- width + 2 * labelBgPadding[0], x: -labelBgPadding[0], y: -labelBgPadding[1], height: edgeTextBbox.height + 2 * labelBgPadding[1], className: "react-\
5312
- flow__edge-textbg", style: labelBgStyle, rx: labelBgBorderRadius, ry: labelBgBorderRadius }), jsx("text", { className: "react-flow__edge-text", y: edgeTextBbox.
5313
- height / 2, dy: "0.3em", ref: edgeTextRef, style: labelStyle, children: label }), children2] });
4969
+ }, [label]), typeof label > "u" || !label ? null : jsxs("g", { transform: `translate(${x - edgeTextBbox.width / 2} ${y - edgeTextBbox.height / 2})`, className: edgeTextClasses, visibility: edgeTextBbox.width ? "visible" : "hidden", ...rest, children: [labelShowBg && jsx("rect", { width: edgeTextBbox.width + 2 * labelBgPadding[0], x: -labelBgPadding[0], y: -labelBgPadding[1], height: edgeTextBbox.height + 2 * labelBgPadding[1], className: "react-flow__edge-textbg", style: labelBgStyle, rx: labelBgBorderRadius, ry: labelBgBorderRadius }), jsx("text", { className: "react-flow__edge-text", y: edgeTextBbox.height / 2, dy: "0.3em", ref: edgeTextRef, style: labelStyle, children: label }), children2] });
5314
4970
  }
5315
4971
  EdgeTextComponent.displayName = "EdgeText";
5316
4972
  const EdgeText = memo(EdgeTextComponent);
5317
- function BaseEdge({ id: id2, path, labelX, labelY, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius, style: style2, markerEnd,
5318
- markerStart, className, interactionWidth = 20 }) {
5319
- return jsxs(Fragment, { children: [jsx("path", { id: id2, style: style2, d: path, fill: "none", className: cc(["react-flow__edge-path", className]),
5320
- markerEnd, markerStart }), interactionWidth && jsx("path", { d: path, fill: "none", strokeOpacity: 0, strokeWidth: interactionWidth, className: "rea\
5321
- ct-flow__edge-interaction" }), label && isNumeric(labelX) && isNumeric(labelY) ? jsx(EdgeText, { x: labelX, y: labelY, label, labelStyle, labelShowBg,
5322
- labelBgStyle, labelBgPadding, labelBgBorderRadius }) : null] });
4973
+ function BaseEdge({ id: id2, path, labelX, labelY, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius, style: style2, markerEnd, markerStart, className, interactionWidth = 20 }) {
4974
+ return jsxs(Fragment, { children: [jsx("path", { id: id2, style: style2, d: path, fill: "none", className: cc(["react-flow__edge-path", className]), markerEnd, markerStart }), interactionWidth && jsx("path", { d: path, fill: "none", strokeOpacity: 0, strokeWidth: interactionWidth, className: "react-flow__edge-interaction" }), label && isNumeric(labelX) && isNumeric(labelY) ? jsx(EdgeText, { x: labelX, y: labelY, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius }) : null] });
5323
4975
  }
5324
4976
  function getControl({ pos, x1, y1, x2, y2 }) {
5325
4977
  return pos === Position.Left || pos === Position.Right ? [0.5 * (x1 + x2), y1] : [x1, 0.5 * (y1 + y2)];
@@ -5356,8 +5008,7 @@ function getSimpleBezierPath({ sourceX, sourceY, sourcePosition = Position.Botto
5356
5008
  ];
5357
5009
  }
5358
5010
  function createSimpleBezierEdge(params) {
5359
- return memo(({ id: id2, sourceX, sourceY, targetX, targetY, sourcePosition = Position.Bottom, targetPosition = Position.Top, label, labelStyle, labelShowBg,
5360
- labelBgStyle, labelBgPadding, labelBgBorderRadius, style: style2, markerEnd, markerStart, interactionWidth }) => {
5011
+ return memo(({ id: id2, sourceX, sourceY, targetX, targetY, sourcePosition = Position.Bottom, targetPosition = Position.Top, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius, style: style2, markerEnd, markerStart, interactionWidth }) => {
5361
5012
  const [path, labelX, labelY] = getSimpleBezierPath({
5362
5013
  sourceX,
5363
5014
  sourceY,
@@ -5366,16 +5017,14 @@ function createSimpleBezierEdge(params) {
5366
5017
  targetY,
5367
5018
  targetPosition
5368
5019
  }), _id = params.isInternal ? void 0 : id2;
5369
- return jsx(BaseEdge, { id: _id, path, labelX, labelY, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius, style: style2,
5370
- markerEnd, markerStart, interactionWidth });
5020
+ return jsx(BaseEdge, { id: _id, path, labelX, labelY, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius, style: style2, markerEnd, markerStart, interactionWidth });
5371
5021
  });
5372
5022
  }
5373
5023
  const SimpleBezierEdge = createSimpleBezierEdge({ isInternal: !1 }), SimpleBezierEdgeInternal = createSimpleBezierEdge({ isInternal: !0 });
5374
5024
  SimpleBezierEdge.displayName = "SimpleBezierEdge";
5375
5025
  SimpleBezierEdgeInternal.displayName = "SimpleBezierEdgeInternal";
5376
5026
  function createSmoothStepEdge(params) {
5377
- return memo(({ id: id2, sourceX, sourceY, targetX, targetY, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius, style: style2,
5378
- sourcePosition = Position.Bottom, targetPosition = Position.Top, markerEnd, markerStart, pathOptions, interactionWidth }) => {
5027
+ return memo(({ id: id2, sourceX, sourceY, targetX, targetY, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius, style: style2, sourcePosition = Position.Bottom, targetPosition = Position.Top, markerEnd, markerStart, pathOptions, interactionWidth }) => {
5379
5028
  const [path, labelX, labelY] = getSmoothStepPath({
5380
5029
  sourceX,
5381
5030
  sourceY,
@@ -5386,8 +5035,7 @@ function createSmoothStepEdge(params) {
5386
5035
  borderRadius: pathOptions?.borderRadius,
5387
5036
  offset: pathOptions?.offset
5388
5037
  }), _id = params.isInternal ? void 0 : id2;
5389
- return jsx(BaseEdge, { id: _id, path, labelX, labelY, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius, style: style2,
5390
- markerEnd, markerStart, interactionWidth });
5038
+ return jsx(BaseEdge, { id: _id, path, labelX, labelY, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius, style: style2, markerEnd, markerStart, interactionWidth });
5391
5039
  });
5392
5040
  }
5393
5041
  const SmoothStepEdge = createSmoothStepEdge({ isInternal: !1 }), SmoothStepEdgeInternal = createSmoothStepEdge({ isInternal: !0 });
@@ -5396,27 +5044,23 @@ SmoothStepEdgeInternal.displayName = "SmoothStepEdgeInternal";
5396
5044
  function createStepEdge(params) {
5397
5045
  return memo(({ id: id2, ...props }) => {
5398
5046
  const _id = params.isInternal ? void 0 : id2;
5399
- return jsx(SmoothStepEdge, { ...props, id: _id, pathOptions: useMemo(() => ({ borderRadius: 0, offset: props.pathOptions?.offset }), [props.pathOptions?.
5400
- offset]) });
5047
+ return jsx(SmoothStepEdge, { ...props, id: _id, pathOptions: useMemo(() => ({ borderRadius: 0, offset: props.pathOptions?.offset }), [props.pathOptions?.offset]) });
5401
5048
  });
5402
5049
  }
5403
5050
  const StepEdge = createStepEdge({ isInternal: !1 }), StepEdgeInternal = createStepEdge({ isInternal: !0 });
5404
5051
  StepEdge.displayName = "StepEdge";
5405
5052
  StepEdgeInternal.displayName = "StepEdgeInternal";
5406
5053
  function createStraightEdge(params) {
5407
- return memo(({ id: id2, sourceX, sourceY, targetX, targetY, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius, style: style2,
5408
- markerEnd, markerStart, interactionWidth }) => {
5054
+ return memo(({ id: id2, sourceX, sourceY, targetX, targetY, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius, style: style2, markerEnd, markerStart, interactionWidth }) => {
5409
5055
  const [path, labelX, labelY] = getStraightPath({ sourceX, sourceY, targetX, targetY }), _id = params.isInternal ? void 0 : id2;
5410
- return jsx(BaseEdge, { id: _id, path, labelX, labelY, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius, style: style2,
5411
- markerEnd, markerStart, interactionWidth });
5056
+ return jsx(BaseEdge, { id: _id, path, labelX, labelY, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius, style: style2, markerEnd, markerStart, interactionWidth });
5412
5057
  });
5413
5058
  }
5414
5059
  const StraightEdge = createStraightEdge({ isInternal: !1 }), StraightEdgeInternal = createStraightEdge({ isInternal: !0 });
5415
5060
  StraightEdge.displayName = "StraightEdge";
5416
5061
  StraightEdgeInternal.displayName = "StraightEdgeInternal";
5417
5062
  function createBezierEdge(params) {
5418
- return memo(({ id: id2, sourceX, sourceY, targetX, targetY, sourcePosition = Position.Bottom, targetPosition = Position.Top, label, labelStyle, labelShowBg,
5419
- labelBgStyle, labelBgPadding, labelBgBorderRadius, style: style2, markerEnd, markerStart, pathOptions, interactionWidth }) => {
5063
+ return memo(({ id: id2, sourceX, sourceY, targetX, targetY, sourcePosition = Position.Bottom, targetPosition = Position.Top, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius, style: style2, markerEnd, markerStart, pathOptions, interactionWidth }) => {
5420
5064
  const [path, labelX, labelY] = getBezierPath({
5421
5065
  sourceX,
5422
5066
  sourceY,
@@ -5426,8 +5070,7 @@ function createBezierEdge(params) {
5426
5070
  targetPosition,
5427
5071
  curvature: pathOptions?.curvature
5428
5072
  }), _id = params.isInternal ? void 0 : id2;
5429
- return jsx(BaseEdge, { id: _id, path, labelX, labelY, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius, style: style2,
5430
- markerEnd, markerStart, interactionWidth });
5073
+ return jsx(BaseEdge, { id: _id, path, labelX, labelY, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius, style: style2, markerEnd, markerStart, interactionWidth });
5431
5074
  });
5432
5075
  }
5433
5076
  const BezierEdge = createBezierEdge({ isInternal: !1 }), BezierEdgeInternal = createBezierEdge({ isInternal: !0 });
@@ -5446,20 +5089,15 @@ const builtinEdgeTypes = {
5446
5089
  targetY: null,
5447
5090
  sourcePosition: null,
5448
5091
  targetPosition: null
5449
- }, shiftX = (x, shift, position) => position === Position.Left ? x - shift : position === Position.Right ? x + shift : x, shiftY = (y, shift, position) => position ===
5450
- Position.Top ? y - shift : position === Position.Bottom ? y + shift : y, EdgeUpdaterClassName = "react-flow__edgeupdater";
5092
+ }, shiftX = (x, shift, position) => position === Position.Left ? x - shift : position === Position.Right ? x + shift : x, shiftY = (y, shift, position) => position === Position.Top ? y - shift : position === Position.Bottom ? y + shift : y, EdgeUpdaterClassName = "react-flow__edgeupdater";
5451
5093
  function EdgeAnchor({ position, centerX, centerY, radius = 10, onMouseDown, onMouseEnter, onMouseOut, type }) {
5452
- return jsx("circle", { onMouseDown, onMouseEnter, onMouseOut, className: cc([EdgeUpdaterClassName, `${EdgeUpdaterClassName}-${type}`]), cx: shiftX(centerX,
5453
- radius, position), cy: shiftY(centerY, radius, position), r: radius, stroke: "transparent", fill: "transparent" });
5094
+ return jsx("circle", { onMouseDown, onMouseEnter, onMouseOut, className: cc([EdgeUpdaterClassName, `${EdgeUpdaterClassName}-${type}`]), cx: shiftX(centerX, radius, position), cy: shiftY(centerY, radius, position), r: radius, stroke: "transparent", fill: "transparent" });
5454
5095
  }
5455
- function EdgeUpdateAnchors({ isReconnectable, reconnectRadius, edge, targetHandleId, sourceHandleId, sourceX, sourceY, targetX, targetY, sourcePosition,
5456
- targetPosition, onReconnect, onReconnectStart, onReconnectEnd, setReconnecting, setUpdateHover }) {
5096
+ function EdgeUpdateAnchors({ isReconnectable, reconnectRadius, edge, targetHandleId, sourceHandleId, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, onReconnect, onReconnectStart, onReconnectEnd, setReconnecting, setUpdateHover }) {
5457
5097
  const store = useStoreApi(), handleEdgeUpdater = (event, isSourceHandle) => {
5458
5098
  if (event.button !== 0)
5459
5099
  return;
5460
- const { autoPanOnConnect, domNode, isValidConnection, connectionMode, connectionRadius, lib, onConnectStart, onConnectEnd, cancelConnection, nodeLookup,
5461
- rfId: flowId, panBy: panBy2, updateConnection } = store.getState(), nodeId = isSourceHandle ? edge.target : edge.source, handleId = (isSourceHandle ?
5462
- targetHandleId : sourceHandleId) || null, handleType = isSourceHandle ? "target" : "source", isTarget = isSourceHandle;
5100
+ const { autoPanOnConnect, domNode, isValidConnection, connectionMode, connectionRadius, lib, onConnectStart, onConnectEnd, cancelConnection, nodeLookup, rfId: flowId, panBy: panBy2, updateConnection } = store.getState(), nodeId = isSourceHandle ? edge.target : edge.source, handleId = (isSourceHandle ? targetHandleId : sourceHandleId) || null, handleType = isSourceHandle ? "target" : "source", isTarget = isSourceHandle;
5463
5101
  setReconnecting(!0), onReconnectStart?.(event, edge, handleType);
5464
5102
  const _onReconnectEnd = (evt) => {
5465
5103
  setReconnecting(!1), onReconnectEnd?.(evt, edge, handleType);
@@ -5487,25 +5125,16 @@ targetPosition, onReconnect, onReconnectStart, onReconnectEnd, setReconnecting,
5487
5125
  getTransform: () => store.getState().transform,
5488
5126
  getFromHandle: () => store.getState().connection.fromHandle
5489
5127
  });
5490
- }, onReconnectSourceMouseDown = (event) => handleEdgeUpdater(event, !0), onReconnectTargetMouseDown = (event) => handleEdgeUpdater(event, !1), onReconnectMouseEnter = () => setUpdateHover(
5491
- !0), onReconnectMouseOut = () => setUpdateHover(!1);
5492
- return jsxs(Fragment, { children: [(isReconnectable === "source" || isReconnectable === !0) && jsx(EdgeAnchor, { position: sourcePosition, centerX: sourceX,
5493
- centerY: sourceY, radius: reconnectRadius, onMouseDown: onReconnectSourceMouseDown, onMouseEnter: onReconnectMouseEnter, onMouseOut: onReconnectMouseOut,
5494
- type: "source" }), (isReconnectable === "target" || isReconnectable === !0) && jsx(EdgeAnchor, { position: targetPosition, centerX: targetX, centerY: targetY,
5495
- radius: reconnectRadius, onMouseDown: onReconnectTargetMouseDown, onMouseEnter: onReconnectMouseEnter, onMouseOut: onReconnectMouseOut, type: "targe\
5496
- t" })] });
5497
- }
5498
- function EdgeWrapper({ id: id2, edgesFocusable, edgesReconnectable, elementsSelectable, onClick, onDoubleClick, onContextMenu, onMouseEnter, onMouseMove,
5499
- onMouseLeave, reconnectRadius, onReconnect, onReconnectStart, onReconnectEnd, rfId, edgeTypes, noPanClassName, onError, disableKeyboardA11y }) {
5128
+ }, onReconnectSourceMouseDown = (event) => handleEdgeUpdater(event, !0), onReconnectTargetMouseDown = (event) => handleEdgeUpdater(event, !1), onReconnectMouseEnter = () => setUpdateHover(!0), onReconnectMouseOut = () => setUpdateHover(!1);
5129
+ return jsxs(Fragment, { children: [(isReconnectable === "source" || isReconnectable === !0) && jsx(EdgeAnchor, { position: sourcePosition, centerX: sourceX, centerY: sourceY, radius: reconnectRadius, onMouseDown: onReconnectSourceMouseDown, onMouseEnter: onReconnectMouseEnter, onMouseOut: onReconnectMouseOut, type: "source" }), (isReconnectable === "target" || isReconnectable === !0) && jsx(EdgeAnchor, { position: targetPosition, centerX: targetX, centerY: targetY, radius: reconnectRadius, onMouseDown: onReconnectTargetMouseDown, onMouseEnter: onReconnectMouseEnter, onMouseOut: onReconnectMouseOut, type: "target" })] });
5130
+ }
5131
+ function EdgeWrapper({ id: id2, edgesFocusable, edgesReconnectable, elementsSelectable, onClick, onDoubleClick, onContextMenu, onMouseEnter, onMouseMove, onMouseLeave, reconnectRadius, onReconnect, onReconnectStart, onReconnectEnd, rfId, edgeTypes, noPanClassName, onError, disableKeyboardA11y }) {
5500
5132
  let edge = useStore((s) => s.edgeLookup.get(id2));
5501
5133
  const defaultEdgeOptions = useStore((s) => s.defaultEdgeOptions);
5502
5134
  edge = defaultEdgeOptions ? { ...defaultEdgeOptions, ...edge } : edge;
5503
5135
  let edgeType = edge.type || "default", EdgeComponent = edgeTypes?.[edgeType] || builtinEdgeTypes[edgeType];
5504
5136
  EdgeComponent === void 0 && (onError?.("011", errorMessages.error011(edgeType)), edgeType = "default", EdgeComponent = builtinEdgeTypes.default);
5505
- const isFocusable = !!(edge.focusable || edgesFocusable && typeof edge.focusable > "u"), isReconnectable = typeof onReconnect < "u" && (edge.reconnectable ||
5506
- edgesReconnectable && typeof edge.reconnectable > "u"), isSelectable = !!(edge.selectable || elementsSelectable && typeof edge.selectable > "u"), edgeRef = useRef(
5507
- null), [updateHover, setUpdateHover] = useState(!1), [reconnecting, setReconnecting] = useState(!1), store = useStoreApi(), { zIndex, sourceX, sourceY,
5508
- targetX, targetY, sourcePosition, targetPosition } = useStore(useCallback((store2) => {
5137
+ const isFocusable = !!(edge.focusable || edgesFocusable && typeof edge.focusable > "u"), isReconnectable = typeof onReconnect < "u" && (edge.reconnectable || edgesReconnectable && typeof edge.reconnectable > "u"), isSelectable = !!(edge.selectable || elementsSelectable && typeof edge.selectable > "u"), edgeRef = useRef(null), [updateHover, setUpdateHover] = useState(!1), [reconnecting, setReconnecting] = useState(!1), store = useStoreApi(), { zIndex, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition } = useStore(useCallback((store2) => {
5509
5138
  const sourceNode = store2.nodeLookup.get(edge.source), targetNode = store2.nodeLookup.get(edge.target);
5510
5139
  if (!sourceNode || !targetNode)
5511
5140
  return {
@@ -5531,15 +5160,12 @@ onMouseLeave, reconnectRadius, onReconnect, onReconnectStart, onReconnectEnd, rf
5531
5160
  }),
5532
5161
  ...edgePosition || nullPosition
5533
5162
  };
5534
- }, [edge.source, edge.target, edge.sourceHandle, edge.targetHandle, edge.selected, edge.zIndex]), shallow$1), markerStartUrl = useMemo(() => edge.markerStart ?
5535
- `url('#${getMarkerId(edge.markerStart, rfId)}')` : void 0, [edge.markerStart, rfId]), markerEndUrl = useMemo(() => edge.markerEnd ? `url('#${getMarkerId(
5536
- edge.markerEnd, rfId)}')` : void 0, [edge.markerEnd, rfId]);
5163
+ }, [edge.source, edge.target, edge.sourceHandle, edge.targetHandle, edge.selected, edge.zIndex]), shallow$1), markerStartUrl = useMemo(() => edge.markerStart ? `url('#${getMarkerId(edge.markerStart, rfId)}')` : void 0, [edge.markerStart, rfId]), markerEndUrl = useMemo(() => edge.markerEnd ? `url('#${getMarkerId(edge.markerEnd, rfId)}')` : void 0, [edge.markerEnd, rfId]);
5537
5164
  if (edge.hidden || sourceX === null || sourceY === null || targetX === null || targetY === null)
5538
5165
  return null;
5539
5166
  const onEdgeClick = (event) => {
5540
5167
  const { addSelectedEdges, unselectNodesAndEdges, multiSelectionActive } = store.getState();
5541
- isSelectable && (store.setState({ nodesSelectionActive: !1 }), edge.selected && multiSelectionActive ? (unselectNodesAndEdges({ nodes: [], edges: [
5542
- edge] }), edgeRef.current?.blur()) : addSelectedEdges([id2])), onClick && onClick(event, edge);
5168
+ isSelectable && (store.setState({ nodesSelectionActive: !1 }), edge.selected && multiSelectionActive ? (unselectNodesAndEdges({ nodes: [], edges: [edge] }), edgeRef.current?.blur()) : addSelectedEdges([id2])), onClick && onClick(event, edge);
5543
5169
  }, onEdgeDoubleClick = onDoubleClick ? (event) => {
5544
5170
  onDoubleClick(event, { ...edge });
5545
5171
  } : void 0, onEdgeContextMenu = onContextMenu ? (event) => {
@@ -5568,17 +5194,7 @@ onMouseLeave, reconnectRadius, onReconnect, onReconnectStart, onReconnectEnd, rf
5568
5194
  updating: updateHover,
5569
5195
  selectable: isSelectable
5570
5196
  }
5571
- ]), onClick: onEdgeClick, onDoubleClick: onEdgeDoubleClick, onContextMenu: onEdgeContextMenu, onMouseEnter: onEdgeMouseEnter, onMouseMove: onEdgeMouseMove,
5572
- onMouseLeave: onEdgeMouseLeave, onKeyDown: isFocusable ? onKeyDown : void 0, tabIndex: isFocusable ? 0 : void 0, role: isFocusable ? "button" : "img",
5573
- "data-id": id2, "data-testid": `rf__edge-${id2}`, "aria-label": edge.ariaLabel === null ? void 0 : edge.ariaLabel || `Edge from ${edge.source} to ${edge.
5574
- target}`, "aria-describedby": isFocusable ? `${ARIA_EDGE_DESC_KEY}-${rfId}` : void 0, ref: edgeRef, children: [!reconnecting && jsx(EdgeComponent, {
5575
- id: id2, source: edge.source, target: edge.target, type: edge.type, selected: edge.selected, animated: edge.animated, selectable: isSelectable, deletable: edge.
5576
- deletable ?? !0, label: edge.label, labelStyle: edge.labelStyle, labelShowBg: edge.labelShowBg, labelBgStyle: edge.labelBgStyle, labelBgPadding: edge.
5577
- labelBgPadding, labelBgBorderRadius: edge.labelBgBorderRadius, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, data: edge.data, style: edge.
5578
- style, sourceHandleId: edge.sourceHandle, targetHandleId: edge.targetHandle, markerStart: markerStartUrl, markerEnd: markerEndUrl, pathOptions: "pat\
5579
- hOptions" in edge ? edge.pathOptions : void 0, interactionWidth: edge.interactionWidth }), isReconnectable && jsx(EdgeUpdateAnchors, { edge, isReconnectable,
5580
- reconnectRadius, onReconnect, onReconnectStart, onReconnectEnd, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, setUpdateHover, setReconnecting,
5581
- sourceHandleId: edge.sourceHandle, targetHandleId: edge.targetHandle })] }) });
5197
+ ]), onClick: onEdgeClick, onDoubleClick: onEdgeDoubleClick, onContextMenu: onEdgeContextMenu, onMouseEnter: onEdgeMouseEnter, onMouseMove: onEdgeMouseMove, onMouseLeave: onEdgeMouseLeave, onKeyDown: isFocusable ? onKeyDown : void 0, tabIndex: isFocusable ? 0 : void 0, role: isFocusable ? "button" : "img", "data-id": id2, "data-testid": `rf__edge-${id2}`, "aria-label": edge.ariaLabel === null ? void 0 : edge.ariaLabel || `Edge from ${edge.source} to ${edge.target}`, "aria-describedby": isFocusable ? `${ARIA_EDGE_DESC_KEY}-${rfId}` : void 0, ref: edgeRef, children: [!reconnecting && jsx(EdgeComponent, { id: id2, source: edge.source, target: edge.target, type: edge.type, selected: edge.selected, animated: edge.animated, selectable: isSelectable, deletable: edge.deletable ?? !0, label: edge.label, labelStyle: edge.labelStyle, labelShowBg: edge.labelShowBg, labelBgStyle: edge.labelBgStyle, labelBgPadding: edge.labelBgPadding, labelBgBorderRadius: edge.labelBgBorderRadius, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, data: edge.data, style: edge.style, sourceHandleId: edge.sourceHandle, targetHandleId: edge.targetHandle, markerStart: markerStartUrl, markerEnd: markerEndUrl, pathOptions: "pathOptions" in edge ? edge.pathOptions : void 0, interactionWidth: edge.interactionWidth }), isReconnectable && jsx(EdgeUpdateAnchors, { edge, isReconnectable, reconnectRadius, onReconnect, onReconnectStart, onReconnectEnd, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, setUpdateHover, setReconnecting, sourceHandleId: edge.sourceHandle, targetHandleId: edge.targetHandle })] }) });
5582
5198
  }
5583
5199
  const selector$b = (s) => ({
5584
5200
  width: s.width,
@@ -5589,13 +5205,9 @@ const selector$b = (s) => ({
5589
5205
  connectionMode: s.connectionMode,
5590
5206
  onError: s.onError
5591
5207
  });
5592
- function EdgeRendererComponent({ defaultMarkerColor, onlyRenderVisibleElements, rfId, edgeTypes, noPanClassName, onReconnect, onEdgeContextMenu, onEdgeMouseEnter,
5593
- onEdgeMouseMove, onEdgeMouseLeave, onEdgeClick, reconnectRadius, onEdgeDoubleClick, onReconnectStart, onReconnectEnd, disableKeyboardA11y }) {
5208
+ function EdgeRendererComponent({ defaultMarkerColor, onlyRenderVisibleElements, rfId, edgeTypes, noPanClassName, onReconnect, onEdgeContextMenu, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, onEdgeClick, reconnectRadius, onEdgeDoubleClick, onReconnectStart, onReconnectEnd, disableKeyboardA11y }) {
5594
5209
  const { edgesFocusable, edgesReconnectable, elementsSelectable, onError } = useStore(selector$b, shallow$1), edgeIds = useVisibleEdgeIds(onlyRenderVisibleElements);
5595
- return jsxs("div", { className: "react-flow__edges", children: [jsx(MarkerDefinitions$1, { defaultColor: defaultMarkerColor, rfId }), edgeIds.map((id2) => jsx(
5596
- EdgeWrapper, { id: id2, edgesFocusable, edgesReconnectable, elementsSelectable, noPanClassName, onReconnect, onContextMenu: onEdgeContextMenu, onMouseEnter: onEdgeMouseEnter,
5597
- onMouseMove: onEdgeMouseMove, onMouseLeave: onEdgeMouseLeave, onClick: onEdgeClick, reconnectRadius, onDoubleClick: onEdgeDoubleClick, onReconnectStart,
5598
- onReconnectEnd, rfId, onError, edgeTypes, disableKeyboardA11y }, id2))] });
5210
+ return jsxs("div", { className: "react-flow__edges", children: [jsx(MarkerDefinitions$1, { defaultColor: defaultMarkerColor, rfId }), edgeIds.map((id2) => jsx(EdgeWrapper, { id: id2, edgesFocusable, edgesReconnectable, elementsSelectable, noPanClassName, onReconnect, onContextMenu: onEdgeContextMenu, onMouseEnter: onEdgeMouseEnter, onMouseMove: onEdgeMouseMove, onMouseLeave: onEdgeMouseLeave, onClick: onEdgeClick, reconnectRadius, onDoubleClick: onEdgeDoubleClick, onReconnectStart, onReconnectEnd, rfId, onError, edgeTypes, disableKeyboardA11y }, id2))] });
5599
5211
  }
5600
5212
  EdgeRendererComponent.displayName = "EdgeRenderer";
5601
5213
  const EdgeRenderer = memo(EdgeRendererComponent), selector$a = (s) => `translate(${s.transform[0]}px,${s.transform[1]}px) scale(${s.transform[2]})`;
@@ -5629,17 +5241,14 @@ const selector$7 = (s) => ({
5629
5241
  });
5630
5242
  function ConnectionLineWrapper({ containerStyle: containerStyle2, style: style2, type, component }) {
5631
5243
  const { nodesConnectable, width, height, isValid, inProgress } = useStore(selector$7, shallow$1);
5632
- return !(width && nodesConnectable && inProgress) ? null : jsx("svg", { style: containerStyle2, width, height, className: "react-flow__connectionlin\
5633
- e react-flow__container", children: jsx("g", { className: cc(["react-flow__connection", getConnectionStatus(isValid)]), children: jsx(ConnectionLine, {
5634
- style: style2, type, CustomComponent: component, isValid }) }) });
5244
+ return !(width && nodesConnectable && inProgress) ? null : jsx("svg", { style: containerStyle2, width, height, className: "react-flow__connectionline react-flow__container", children: jsx("g", { className: cc(["react-flow__connection", getConnectionStatus(isValid)]), children: jsx(ConnectionLine, { style: style2, type, CustomComponent: component, isValid }) }) });
5635
5245
  }
5636
5246
  const ConnectionLine = ({ style: style2, type = ConnectionLineType.Bezier, CustomComponent, isValid }) => {
5637
5247
  const { inProgress, from, fromNode, fromHandle, fromPosition, to, toNode, toHandle, toPosition } = useConnection();
5638
5248
  if (!inProgress)
5639
5249
  return;
5640
5250
  if (CustomComponent)
5641
- return jsx(CustomComponent, { connectionLineType: type, connectionLineStyle: style2, fromNode, fromHandle, fromX: from.x, fromY: from.y, toX: to.x,
5642
- toY: to.y, fromPosition, toPosition, connectionStatus: getConnectionStatus(isValid), toNode, toHandle });
5251
+ return jsx(CustomComponent, { connectionLineType: type, connectionLineStyle: style2, fromNode, fromHandle, fromX: from.x, fromY: from.y, toX: to.x, toY: to.y, fromPosition, toPosition, connectionStatus: getConnectionStatus(isValid), toNode, toHandle });
5643
5252
  let path = "";
5644
5253
  const pathParams = {
5645
5254
  sourceX: from.x,
@@ -5680,31 +5289,12 @@ function useStylesLoadedWarning() {
5680
5289
  useStoreApi(), useRef(!1), useEffect(() => {
5681
5290
  }, []);
5682
5291
  }
5683
- function GraphViewComponent({ nodeTypes, edgeTypes, onInit, onNodeClick, onEdgeClick, onNodeDoubleClick, onEdgeDoubleClick, onNodeMouseEnter, onNodeMouseMove,
5684
- onNodeMouseLeave, onNodeContextMenu, onSelectionContextMenu, onSelectionStart, onSelectionEnd, connectionLineType, connectionLineStyle, connectionLineComponent,
5685
- connectionLineContainerStyle, selectionKeyCode, selectionOnDrag, selectionMode, multiSelectionKeyCode, panActivationKeyCode, zoomActivationKeyCode, deleteKeyCode,
5686
- onlyRenderVisibleElements, elementsSelectable, defaultViewport: defaultViewport2, translateExtent, minZoom, maxZoom, preventScrolling, defaultMarkerColor,
5687
- zoomOnScroll, zoomOnPinch, panOnScroll, panOnScrollSpeed, panOnScrollMode, zoomOnDoubleClick, panOnDrag, onPaneClick, onPaneMouseEnter, onPaneMouseMove,
5688
- onPaneMouseLeave, onPaneScroll, onPaneContextMenu, paneClickDistance, nodeClickDistance, onEdgeContextMenu, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave,
5689
- reconnectRadius, onReconnect, onReconnectStart, onReconnectEnd, noDragClassName, noWheelClassName, noPanClassName, disableKeyboardA11y, nodeExtent, rfId,
5690
- viewport, onViewportChange }) {
5691
- return useNodeOrEdgeTypesWarning(nodeTypes), useNodeOrEdgeTypesWarning(edgeTypes), useStylesLoadedWarning(), useOnInitHandler(onInit), useViewportSync(
5692
- viewport), jsx(FlowRenderer, { onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneContextMenu, onPaneScroll, paneClickDistance,
5693
- deleteKeyCode, selectionKeyCode, selectionOnDrag, selectionMode, onSelectionStart, onSelectionEnd, multiSelectionKeyCode, panActivationKeyCode, zoomActivationKeyCode,
5694
- elementsSelectable, zoomOnScroll, zoomOnPinch, zoomOnDoubleClick, panOnScroll, panOnScrollSpeed, panOnScrollMode, panOnDrag, defaultViewport: defaultViewport2,
5695
- translateExtent, minZoom, maxZoom, onSelectionContextMenu, preventScrolling, noDragClassName, noWheelClassName, noPanClassName, disableKeyboardA11y,
5696
- onViewportChange, isControlledViewport: !!viewport, children: jsxs(Viewport, { children: [jsx(EdgeRenderer, { edgeTypes, onEdgeClick, onEdgeDoubleClick,
5697
- onReconnect, onReconnectStart, onReconnectEnd, onlyRenderVisibleElements, onEdgeContextMenu, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, reconnectRadius,
5698
- defaultMarkerColor, noPanClassName, disableKeyboardA11y, rfId }), jsx(ConnectionLineWrapper, { style: connectionLineStyle, type: connectionLineType,
5699
- component: connectionLineComponent, containerStyle: connectionLineContainerStyle }), jsx("div", { className: "react-flow__edgelabel-renderer" }), jsx(
5700
- NodeRenderer, { nodeTypes, onNodeClick, onNodeDoubleClick, onNodeMouseEnter, onNodeMouseMove, onNodeMouseLeave, onNodeContextMenu, nodeClickDistance,
5701
- onlyRenderVisibleElements, noPanClassName, noDragClassName, disableKeyboardA11y, nodeExtent, rfId }), jsx("div", { className: "react-flow__viewport-\
5702
- portal" })] }) });
5292
+ function GraphViewComponent({ nodeTypes, edgeTypes, onInit, onNodeClick, onEdgeClick, onNodeDoubleClick, onEdgeDoubleClick, onNodeMouseEnter, onNodeMouseMove, onNodeMouseLeave, onNodeContextMenu, onSelectionContextMenu, onSelectionStart, onSelectionEnd, connectionLineType, connectionLineStyle, connectionLineComponent, connectionLineContainerStyle, selectionKeyCode, selectionOnDrag, selectionMode, multiSelectionKeyCode, panActivationKeyCode, zoomActivationKeyCode, deleteKeyCode, onlyRenderVisibleElements, elementsSelectable, defaultViewport: defaultViewport2, translateExtent, minZoom, maxZoom, preventScrolling, defaultMarkerColor, zoomOnScroll, zoomOnPinch, panOnScroll, panOnScrollSpeed, panOnScrollMode, zoomOnDoubleClick, panOnDrag, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneScroll, onPaneContextMenu, paneClickDistance, nodeClickDistance, onEdgeContextMenu, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, reconnectRadius, onReconnect, onReconnectStart, onReconnectEnd, noDragClassName, noWheelClassName, noPanClassName, disableKeyboardA11y, nodeExtent, rfId, viewport, onViewportChange }) {
5293
+ return useNodeOrEdgeTypesWarning(nodeTypes), useNodeOrEdgeTypesWarning(edgeTypes), useStylesLoadedWarning(), useOnInitHandler(onInit), useViewportSync(viewport), jsx(FlowRenderer, { onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneContextMenu, onPaneScroll, paneClickDistance, deleteKeyCode, selectionKeyCode, selectionOnDrag, selectionMode, onSelectionStart, onSelectionEnd, multiSelectionKeyCode, panActivationKeyCode, zoomActivationKeyCode, elementsSelectable, zoomOnScroll, zoomOnPinch, zoomOnDoubleClick, panOnScroll, panOnScrollSpeed, panOnScrollMode, panOnDrag, defaultViewport: defaultViewport2, translateExtent, minZoom, maxZoom, onSelectionContextMenu, preventScrolling, noDragClassName, noWheelClassName, noPanClassName, disableKeyboardA11y, onViewportChange, isControlledViewport: !!viewport, children: jsxs(Viewport, { children: [jsx(EdgeRenderer, { edgeTypes, onEdgeClick, onEdgeDoubleClick, onReconnect, onReconnectStart, onReconnectEnd, onlyRenderVisibleElements, onEdgeContextMenu, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, reconnectRadius, defaultMarkerColor, noPanClassName, disableKeyboardA11y, rfId }), jsx(ConnectionLineWrapper, { style: connectionLineStyle, type: connectionLineType, component: connectionLineComponent, containerStyle: connectionLineContainerStyle }), jsx("div", { className: "react-flow__edgelabel-renderer" }), jsx(NodeRenderer, { nodeTypes, onNodeClick, onNodeDoubleClick, onNodeMouseEnter, onNodeMouseMove, onNodeMouseLeave, onNodeContextMenu, nodeClickDistance, onlyRenderVisibleElements, noPanClassName, noDragClassName, disableKeyboardA11y, nodeExtent, rfId }), jsx("div", { className: "react-flow__viewport-portal" })] }) });
5703
5294
  }
5704
5295
  GraphViewComponent.displayName = "GraphView";
5705
5296
  const GraphView = memo(GraphViewComponent), getInitialState = ({ nodes, edges, defaultNodes, defaultEdges, width, height, fitView: fitView2, nodeOrigin } = {}) => {
5706
- const nodeLookup = /* @__PURE__ */ new Map(), parentLookup = /* @__PURE__ */ new Map(), connectionLookup = /* @__PURE__ */ new Map(), edgeLookup = /* @__PURE__ */ new Map(),
5707
- storeEdges = defaultEdges ?? edges ?? [], storeNodes = defaultNodes ?? nodes ?? [], storeNodeOrigin = nodeOrigin ?? [0, 0];
5297
+ const nodeLookup = /* @__PURE__ */ new Map(), parentLookup = /* @__PURE__ */ new Map(), connectionLookup = /* @__PURE__ */ new Map(), edgeLookup = /* @__PURE__ */ new Map(), storeEdges = defaultEdges ?? edges ?? [], storeNodes = defaultNodes ?? nodes ?? [], storeNodeOrigin = nodeOrigin ?? [0, 0];
5708
5298
  updateConnectionLookup(connectionLookup, edgeLookup, storeEdges), adoptUserNodes(storeNodes, nodeLookup, parentLookup, {
5709
5299
  nodeOrigin: storeNodeOrigin,
5710
5300
  elevateNodesOnSelect: !1
@@ -5798,8 +5388,7 @@ const GraphView = memo(GraphViewComponent), getInitialState = ({ nodes, edges, d
5798
5388
  // changes its dimensions, this function is called to measure the
5799
5389
  // new dimensions and update the nodes.
5800
5390
  updateNodeInternals: (updates) => {
5801
- const { triggerNodeChanges, nodeLookup, parentLookup, fitViewOnInit, fitViewDone, fitViewOnInitOptions, domNode, nodeOrigin: nodeOrigin2, debug, fitViewSync } = get2(),
5802
- { changes, updatedInternals } = updateNodeInternals(updates, nodeLookup, parentLookup, domNode, nodeOrigin2);
5391
+ const { triggerNodeChanges, nodeLookup, parentLookup, fitViewOnInit, fitViewDone, fitViewOnInitOptions, domNode, nodeOrigin: nodeOrigin2, debug, fitViewSync } = get2(), { changes, updatedInternals } = updateNodeInternals(updates, nodeLookup, parentLookup, domNode, nodeOrigin2);
5803
5392
  if (!updatedInternals)
5804
5393
  return;
5805
5394
  updateAbsolutePositions(nodeLookup, parentLookup, { nodeOrigin: nodeOrigin2 });
@@ -5807,8 +5396,7 @@ const GraphView = memo(GraphViewComponent), getInitialState = ({ nodes, edges, d
5807
5396
  !fitViewDone && fitViewOnInit && (nextFitViewDone = fitViewSync({
5808
5397
  ...fitViewOnInitOptions,
5809
5398
  nodes: fitViewOnInitOptions?.nodes
5810
- })), set2({ fitViewDone: nextFitViewDone }), changes?.length > 0 && (debug && console.log("React Flow: trigger node changes", changes), triggerNodeChanges?.(
5811
- changes));
5399
+ })), set2({ fitViewDone: nextFitViewDone }), changes?.length > 0 && (debug && console.log("React Flow: trigger node changes", changes), triggerNodeChanges?.(changes));
5812
5400
  },
5813
5401
  updateNodePositions: (nodeDragItems, dragging = !1) => {
5814
5402
  const parentExpandChildren = [], changes = [];
@@ -5830,8 +5418,7 @@ const GraphView = memo(GraphViewComponent), getInitialState = ({ nodes, edges, d
5830
5418
  }), change.position.x = Math.max(0, change.position.x), change.position.y = Math.max(0, change.position.y)), changes.push(change);
5831
5419
  }
5832
5420
  if (parentExpandChildren.length > 0) {
5833
- const { nodeLookup, parentLookup, nodeOrigin: nodeOrigin2 } = get2(), parentExpandChanges = handleExpandParent(parentExpandChildren, nodeLookup,
5834
- parentLookup, nodeOrigin2);
5421
+ const { nodeLookup, parentLookup, nodeOrigin: nodeOrigin2 } = get2(), parentExpandChanges = handleExpandParent(parentExpandChildren, nodeLookup, parentLookup, nodeOrigin2);
5835
5422
  changes.push(...parentExpandChanges);
5836
5423
  }
5837
5424
  get2().triggerNodeChanges(changes);
@@ -5872,13 +5459,10 @@ const GraphView = memo(GraphViewComponent), getInitialState = ({ nodes, edges, d
5872
5459
  triggerEdgeChanges(changedEdges);
5873
5460
  return;
5874
5461
  }
5875
- triggerEdgeChanges(getSelectionChanges(edgeLookup, /* @__PURE__ */ new Set([...selectedEdgeIds]))), triggerNodeChanges(getSelectionChanges(nodeLookup,
5876
- /* @__PURE__ */ new Set(), !0));
5462
+ triggerEdgeChanges(getSelectionChanges(edgeLookup, /* @__PURE__ */ new Set([...selectedEdgeIds]))), triggerNodeChanges(getSelectionChanges(nodeLookup, /* @__PURE__ */ new Set(), !0));
5877
5463
  },
5878
5464
  unselectNodesAndEdges: ({ nodes: nodes2, edges: edges2 } = {}) => {
5879
- const { edges: storeEdges, nodes: storeNodes, triggerNodeChanges, triggerEdgeChanges } = get2(), nodesToUnselect = nodes2 || storeNodes, edgesToUnselect = edges2 ||
5880
- storeEdges, nodeChanges = nodesToUnselect.map((n2) => (n2.selected = !1, createSelectionChange(n2.id, !1))), edgeChanges = edgesToUnselect.map((edge) => createSelectionChange(
5881
- edge.id, !1));
5465
+ const { edges: storeEdges, nodes: storeNodes, triggerNodeChanges, triggerEdgeChanges } = get2(), nodesToUnselect = nodes2 || storeNodes, edgesToUnselect = edges2 || storeEdges, nodeChanges = nodesToUnselect.map((n2) => (n2.selected = !1, createSelectionChange(n2.id, !1))), edgeChanges = edgesToUnselect.map((edge) => createSelectionChange(edge.id, !1));
5882
5466
  triggerNodeChanges(nodeChanges), triggerEdgeChanges(edgeChanges);
5883
5467
  },
5884
5468
  setMinZoom: (minZoom) => {
@@ -5896,9 +5480,7 @@ const GraphView = memo(GraphViewComponent), getInitialState = ({ nodes, edges, d
5896
5480
  get2().panZoom?.setClickDistance(clickDistance);
5897
5481
  },
5898
5482
  resetSelectedElements: () => {
5899
- const { edges: edges2, nodes: nodes2, triggerNodeChanges, triggerEdgeChanges } = get2(), nodeChanges = nodes2.reduce((res, node) => node.selected ?
5900
- [...res, createSelectionChange(node.id, !1)] : res, []), edgeChanges = edges2.reduce((res, edge) => edge.selected ? [...res, createSelectionChange(
5901
- edge.id, !1)] : res, []);
5483
+ const { edges: edges2, nodes: nodes2, triggerNodeChanges, triggerEdgeChanges } = get2(), nodeChanges = nodes2.reduce((res, node) => node.selected ? [...res, createSelectionChange(node.id, !1)] : res, []), edgeChanges = edges2.reduce((res, edge) => edge.selected ? [...res, createSelectionChange(edge.id, !1)] : res, []);
5902
5484
  triggerNodeChanges(nodeChanges), triggerEdgeChanges(edgeChanges);
5903
5485
  },
5904
5486
  setNodeExtent: (nodeExtent) => {
@@ -5961,8 +5543,7 @@ const GraphView = memo(GraphViewComponent), getInitialState = ({ nodes, edges, d
5961
5543
  },
5962
5544
  reset: () => set2({ ...getInitialState() })
5963
5545
  }), Object.is);
5964
- function ReactFlowProvider({ initialNodes: nodes, initialEdges: edges, defaultNodes, defaultEdges, initialWidth: width, initialHeight: height, fitView: fitView2,
5965
- nodeOrigin, children: children2 }) {
5546
+ function ReactFlowProvider({ initialNodes: nodes, initialEdges: edges, defaultNodes, defaultEdges, initialWidth: width, initialHeight: height, fitView: fitView2, nodeOrigin, children: children2 }) {
5966
5547
  const [store] = useState(() => createStore({
5967
5548
  nodes,
5968
5549
  edges,
@@ -5976,8 +5557,7 @@ nodeOrigin, children: children2 }) {
5976
5557
  return jsx(Provider$1, { value: store, children: jsx(BatchProvider, { children: children2 }) });
5977
5558
  }
5978
5559
  function Wrapper({ children: children2, nodes, edges, defaultNodes, defaultEdges, width, height, fitView: fitView2, nodeOrigin }) {
5979
- return useContext(StoreContext) ? jsx(Fragment, { children: children2 }) : jsx(ReactFlowProvider, { initialNodes: nodes, initialEdges: edges, defaultNodes,
5980
- defaultEdges, initialWidth: width, initialHeight: height, fitView: fitView2, nodeOrigin, children: children2 });
5560
+ return useContext(StoreContext) ? jsx(Fragment, { children: children2 }) : jsx(ReactFlowProvider, { initialNodes: nodes, initialEdges: edges, defaultNodes, defaultEdges, initialWidth: width, initialHeight: height, fitView: fitView2, nodeOrigin, children: children2 });
5981
5561
  }
5982
5562
  const wrapperStyle = {
5983
5563
  width: "100%",
@@ -5986,38 +5566,9 @@ const wrapperStyle = {
5986
5566
  position: "relative",
5987
5567
  zIndex: 0
5988
5568
  };
5989
- function ReactFlow({ nodes, edges, defaultNodes, defaultEdges, className, nodeTypes, edgeTypes, onNodeClick, onEdgeClick, onInit, onMove, onMoveStart,
5990
- onMoveEnd, onConnect, onConnectStart, onConnectEnd, onClickConnectStart, onClickConnectEnd, onNodeMouseEnter, onNodeMouseMove, onNodeMouseLeave, onNodeContextMenu,
5991
- onNodeDoubleClick, onNodeDragStart, onNodeDrag, onNodeDragStop, onNodesDelete, onEdgesDelete, onDelete, onSelectionChange, onSelectionDragStart, onSelectionDrag,
5992
- onSelectionDragStop, onSelectionContextMenu, onSelectionStart, onSelectionEnd, onBeforeDelete, connectionMode, connectionLineType = ConnectionLineType.
5993
- Bezier, connectionLineStyle, connectionLineComponent, connectionLineContainerStyle, deleteKeyCode = "Backspace", selectionKeyCode = "Shift", selectionOnDrag = !1,
5994
- selectionMode = SelectionMode.Full, panActivationKeyCode = "Space", multiSelectionKeyCode = isMacOs() ? "Meta" : "Control", zoomActivationKeyCode = isMacOs() ?
5995
- "Meta" : "Control", snapToGrid, snapGrid, onlyRenderVisibleElements = !1, selectNodesOnDrag, nodesDraggable, nodesConnectable, nodesFocusable, nodeOrigin = defaultNodeOrigin,
5996
- edgesFocusable, edgesReconnectable, elementsSelectable = !0, defaultViewport: defaultViewport$1 = defaultViewport, minZoom = 0.5, maxZoom = 2, translateExtent = infiniteExtent,
5997
- preventScrolling = !0, nodeExtent, defaultMarkerColor = "#b1b1b7", zoomOnScroll = !0, zoomOnPinch = !0, panOnScroll = !1, panOnScrollSpeed = 0.5, panOnScrollMode = PanOnScrollMode.
5998
- Free, zoomOnDoubleClick = !0, panOnDrag = !0, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneScroll, onPaneContextMenu, paneClickDistance = 0,
5999
- nodeClickDistance = 0, children: children2, onReconnect, onReconnectStart, onReconnectEnd, onEdgeContextMenu, onEdgeDoubleClick, onEdgeMouseEnter, onEdgeMouseMove,
6000
- onEdgeMouseLeave, reconnectRadius = 10, onNodesChange, onEdgesChange, noDragClassName = "nodrag", noWheelClassName = "nowheel", noPanClassName = "nopa\
6001
- n", fitView: fitView2, fitViewOptions, connectOnClick, attributionPosition, proOptions, defaultEdgeOptions, elevateNodesOnSelect, elevateEdgesOnSelect,
6002
- disableKeyboardA11y = !1, autoPanOnConnect, autoPanOnNodeDrag, autoPanSpeed, connectionRadius, isValidConnection, onError, style: style2, id: id2, nodeDragThreshold,
6003
- viewport, onViewportChange, width, height, colorMode = "light", debug, ...rest }, ref) {
5569
+ function ReactFlow({ nodes, edges, defaultNodes, defaultEdges, className, nodeTypes, edgeTypes, onNodeClick, onEdgeClick, onInit, onMove, onMoveStart, onMoveEnd, onConnect, onConnectStart, onConnectEnd, onClickConnectStart, onClickConnectEnd, onNodeMouseEnter, onNodeMouseMove, onNodeMouseLeave, onNodeContextMenu, onNodeDoubleClick, onNodeDragStart, onNodeDrag, onNodeDragStop, onNodesDelete, onEdgesDelete, onDelete, onSelectionChange, onSelectionDragStart, onSelectionDrag, onSelectionDragStop, onSelectionContextMenu, onSelectionStart, onSelectionEnd, onBeforeDelete, connectionMode, connectionLineType = ConnectionLineType.Bezier, connectionLineStyle, connectionLineComponent, connectionLineContainerStyle, deleteKeyCode = "Backspace", selectionKeyCode = "Shift", selectionOnDrag = !1, selectionMode = SelectionMode.Full, panActivationKeyCode = "Space", multiSelectionKeyCode = isMacOs() ? "Meta" : "Control", zoomActivationKeyCode = isMacOs() ? "Meta" : "Control", snapToGrid, snapGrid, onlyRenderVisibleElements = !1, selectNodesOnDrag, nodesDraggable, nodesConnectable, nodesFocusable, nodeOrigin = defaultNodeOrigin, edgesFocusable, edgesReconnectable, elementsSelectable = !0, defaultViewport: defaultViewport$1 = defaultViewport, minZoom = 0.5, maxZoom = 2, translateExtent = infiniteExtent, preventScrolling = !0, nodeExtent, defaultMarkerColor = "#b1b1b7", zoomOnScroll = !0, zoomOnPinch = !0, panOnScroll = !1, panOnScrollSpeed = 0.5, panOnScrollMode = PanOnScrollMode.Free, zoomOnDoubleClick = !0, panOnDrag = !0, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneScroll, onPaneContextMenu, paneClickDistance = 0, nodeClickDistance = 0, children: children2, onReconnect, onReconnectStart, onReconnectEnd, onEdgeContextMenu, onEdgeDoubleClick, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, reconnectRadius = 10, onNodesChange, onEdgesChange, noDragClassName = "nodrag", noWheelClassName = "nowheel", noPanClassName = "nopan", fitView: fitView2, fitViewOptions, connectOnClick, attributionPosition, proOptions, defaultEdgeOptions, elevateNodesOnSelect, elevateEdgesOnSelect, disableKeyboardA11y = !1, autoPanOnConnect, autoPanOnNodeDrag, autoPanSpeed, connectionRadius, isValidConnection, onError, style: style2, id: id2, nodeDragThreshold, viewport, onViewportChange, width, height, colorMode = "light", debug, ...rest }, ref) {
6004
5570
  const rfId = id2 || "1", colorModeClassName = useColorModeClass(colorMode);
6005
- return jsx("div", { ...rest, style: { ...style2, ...wrapperStyle }, ref, className: cc(["react-flow", className, colorModeClassName]), "data-testid": "\
6006
- rf__wrapper", id: id2, children: jsxs(Wrapper, { nodes, edges, width, height, fitView: fitView2, nodeOrigin, children: [jsx(GraphView, { onInit, onNodeClick,
6007
- onEdgeClick, onNodeMouseEnter, onNodeMouseMove, onNodeMouseLeave, onNodeContextMenu, onNodeDoubleClick, nodeTypes, edgeTypes, connectionLineType, connectionLineStyle,
6008
- connectionLineComponent, connectionLineContainerStyle, selectionKeyCode, selectionOnDrag, selectionMode, deleteKeyCode, multiSelectionKeyCode, panActivationKeyCode,
6009
- zoomActivationKeyCode, onlyRenderVisibleElements, defaultViewport: defaultViewport$1, translateExtent, minZoom, maxZoom, preventScrolling, zoomOnScroll,
6010
- zoomOnPinch, zoomOnDoubleClick, panOnScroll, panOnScrollSpeed, panOnScrollMode, panOnDrag, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave,
6011
- onPaneScroll, onPaneContextMenu, paneClickDistance, nodeClickDistance, onSelectionContextMenu, onSelectionStart, onSelectionEnd, onReconnect, onReconnectStart,
6012
- onReconnectEnd, onEdgeContextMenu, onEdgeDoubleClick, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, reconnectRadius, defaultMarkerColor, noDragClassName,
6013
- noWheelClassName, noPanClassName, rfId, disableKeyboardA11y, nodeExtent, viewport, onViewportChange }), jsx(StoreUpdater, { nodes, edges, defaultNodes,
6014
- defaultEdges, onConnect, onConnectStart, onConnectEnd, onClickConnectStart, onClickConnectEnd, nodesDraggable, nodesConnectable, nodesFocusable, edgesFocusable,
6015
- edgesReconnectable, elementsSelectable, elevateNodesOnSelect, elevateEdgesOnSelect, minZoom, maxZoom, nodeExtent, onNodesChange, onEdgesChange, snapToGrid,
6016
- snapGrid, connectionMode, translateExtent, connectOnClick, defaultEdgeOptions, fitView: fitView2, fitViewOptions, onNodesDelete, onEdgesDelete, onDelete,
6017
- onNodeDragStart, onNodeDrag, onNodeDragStop, onSelectionDrag, onSelectionDragStart, onSelectionDragStop, onMove, onMoveStart, onMoveEnd, noPanClassName,
6018
- nodeOrigin, rfId, autoPanOnConnect, autoPanOnNodeDrag, autoPanSpeed, onError, connectionRadius, isValidConnection, selectNodesOnDrag, nodeDragThreshold,
6019
- onBeforeDelete, paneClickDistance, debug }), jsx(SelectionListener, { onSelectionChange }), children2, jsx(Attribution, { proOptions, position: attributionPosition }),
6020
- jsx(A11yDescriptions, { rfId, disableKeyboardA11y })] }) });
5571
+ return jsx("div", { ...rest, style: { ...style2, ...wrapperStyle }, ref, className: cc(["react-flow", className, colorModeClassName]), "data-testid": "rf__wrapper", id: id2, children: jsxs(Wrapper, { nodes, edges, width, height, fitView: fitView2, nodeOrigin, children: [jsx(GraphView, { onInit, onNodeClick, onEdgeClick, onNodeMouseEnter, onNodeMouseMove, onNodeMouseLeave, onNodeContextMenu, onNodeDoubleClick, nodeTypes, edgeTypes, connectionLineType, connectionLineStyle, connectionLineComponent, connectionLineContainerStyle, selectionKeyCode, selectionOnDrag, selectionMode, deleteKeyCode, multiSelectionKeyCode, panActivationKeyCode, zoomActivationKeyCode, onlyRenderVisibleElements, defaultViewport: defaultViewport$1, translateExtent, minZoom, maxZoom, preventScrolling, zoomOnScroll, zoomOnPinch, zoomOnDoubleClick, panOnScroll, panOnScrollSpeed, panOnScrollMode, panOnDrag, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneScroll, onPaneContextMenu, paneClickDistance, nodeClickDistance, onSelectionContextMenu, onSelectionStart, onSelectionEnd, onReconnect, onReconnectStart, onReconnectEnd, onEdgeContextMenu, onEdgeDoubleClick, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, reconnectRadius, defaultMarkerColor, noDragClassName, noWheelClassName, noPanClassName, rfId, disableKeyboardA11y, nodeExtent, viewport, onViewportChange }), jsx(StoreUpdater, { nodes, edges, defaultNodes, defaultEdges, onConnect, onConnectStart, onConnectEnd, onClickConnectStart, onClickConnectEnd, nodesDraggable, nodesConnectable, nodesFocusable, edgesFocusable, edgesReconnectable, elementsSelectable, elevateNodesOnSelect, elevateEdgesOnSelect, minZoom, maxZoom, nodeExtent, onNodesChange, onEdgesChange, snapToGrid, snapGrid, connectionMode, translateExtent, connectOnClick, defaultEdgeOptions, fitView: fitView2, fitViewOptions, onNodesDelete, onEdgesDelete, onDelete, onNodeDragStart, onNodeDrag, onNodeDragStop, onSelectionDrag, onSelectionDragStart, onSelectionDragStop, onMove, onMoveStart, onMoveEnd, noPanClassName, nodeOrigin, rfId, autoPanOnConnect, autoPanOnNodeDrag, autoPanSpeed, onError, connectionRadius, isValidConnection, selectNodesOnDrag, nodeDragThreshold, onBeforeDelete, paneClickDistance, debug }), jsx(SelectionListener, { onSelectionChange }), children2, jsx(Attribution, { proOptions, position: attributionPosition }), jsx(A11yDescriptions, { rfId, disableKeyboardA11y })] }) });
6021
5572
  }
6022
5573
  var index = fixedForwardRef(ReactFlow);
6023
5574
  const selector$6 = (s) => s.domNode?.querySelector(".react-flow__edgelabel-renderer");
@@ -6060,8 +5611,7 @@ function useNodesData(nodeIds) {
6060
5611
  }, [nodeIds]), shallowNodeData);
6061
5612
  }
6062
5613
  function LinePattern({ dimensions, lineWidth, variant, className }) {
6063
- return jsx("path", { strokeWidth: lineWidth, d: `M${dimensions[0] / 2} 0 V${dimensions[1]} M0 ${dimensions[1] / 2} H${dimensions[0]}`, className: cc(
6064
- ["react-flow__background-pattern", variant, className]) });
5614
+ return jsx("path", { strokeWidth: lineWidth, d: `M${dimensions[0] / 2} 0 V${dimensions[1]} M0 ${dimensions[1] / 2} H${dimensions[0]}`, className: cc(["react-flow__background-pattern", variant, className]) });
6065
5615
  }
6066
5616
  function DotPattern({ radius, className }) {
6067
5617
  return jsx("circle", { cx: radius, cy: radius, r: radius, className: cc(["react-flow__background-pattern", "dots", className]) });
@@ -6090,46 +5640,30 @@ function BackgroundComponent({
6090
5640
  className,
6091
5641
  patternClassName
6092
5642
  }) {
6093
- const ref = useRef(null), { transform: transform2, patternId } = useStore(selector$3, shallow$1), patternSize = size || defaultSize[variant], isDots = variant ===
6094
- BackgroundVariant.Dots, isCross = variant === BackgroundVariant.Cross, gapXY = Array.isArray(gap) ? gap : [gap, gap], scaledGap = [gapXY[0] * transform2[2] ||
6095
- 1, gapXY[1] * transform2[2] || 1], scaledSize = patternSize * transform2[2], patternDimensions = isCross ? [scaledSize, scaledSize] : scaledGap, patternOffset = isDots ?
6096
- [scaledSize / offset, scaledSize / offset] : [patternDimensions[0] / offset, patternDimensions[1] / offset], _patternId = `${patternId}${id2 || ""}`;
5643
+ const ref = useRef(null), { transform: transform2, patternId } = useStore(selector$3, shallow$1), patternSize = size || defaultSize[variant], isDots = variant === BackgroundVariant.Dots, isCross = variant === BackgroundVariant.Cross, gapXY = Array.isArray(gap) ? gap : [gap, gap], scaledGap = [gapXY[0] * transform2[2] || 1, gapXY[1] * transform2[2] || 1], scaledSize = patternSize * transform2[2], patternDimensions = isCross ? [scaledSize, scaledSize] : scaledGap, patternOffset = isDots ? [scaledSize / offset, scaledSize / offset] : [patternDimensions[0] / offset, patternDimensions[1] / offset], _patternId = `${patternId}${id2 || ""}`;
6097
5644
  return jsxs("svg", { className: cc(["react-flow__background", className]), style: {
6098
5645
  ...style2,
6099
5646
  ...containerStyle,
6100
5647
  "--xy-background-color-props": bgColor,
6101
5648
  "--xy-background-pattern-color-props": color2
6102
- }, ref, "data-testid": "rf__background", children: [jsx("pattern", { id: _patternId, x: transform2[0] % scaledGap[0], y: transform2[1] % scaledGap[1],
6103
- width: scaledGap[0], height: scaledGap[1], patternUnits: "userSpaceOnUse", patternTransform: `translate(-${patternOffset[0]},-${patternOffset[1]})`,
6104
- children: isDots ? jsx(DotPattern, { radius: scaledSize / offset, className: patternClassName }) : jsx(LinePattern, { dimensions: patternDimensions,
6105
- lineWidth, variant, className: patternClassName }) }), jsx("rect", { x: "0", y: "0", width: "100%", height: "100%", fill: `url(#${_patternId})` })] });
5649
+ }, ref, "data-testid": "rf__background", children: [jsx("pattern", { id: _patternId, x: transform2[0] % scaledGap[0], y: transform2[1] % scaledGap[1], width: scaledGap[0], height: scaledGap[1], patternUnits: "userSpaceOnUse", patternTransform: `translate(-${patternOffset[0]},-${patternOffset[1]})`, children: isDots ? jsx(DotPattern, { radius: scaledSize / offset, className: patternClassName }) : jsx(LinePattern, { dimensions: patternDimensions, lineWidth, variant, className: patternClassName }) }), jsx("rect", { x: "0", y: "0", width: "100%", height: "100%", fill: `url(#${_patternId})` })] });
6106
5650
  }
6107
5651
  BackgroundComponent.displayName = "Background";
6108
5652
  const Background = memo(BackgroundComponent);
6109
5653
  function PlusIcon() {
6110
- return jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32", children: jsx("path", { d: "M32 18.133H18.133V32h-4.266V18.133H0v-4.2\
6111
- 66h13.867V0h4.266v13.867H32z" }) });
5654
+ return jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32", children: jsx("path", { d: "M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z" }) });
6112
5655
  }
6113
5656
  function MinusIcon() {
6114
5657
  return jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 5", children: jsx("path", { d: "M0 0h32v4.2H0z" }) });
6115
5658
  }
6116
5659
  function FitViewIcon() {
6117
- return jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 30", children: jsx("path", { d: "M3.692 4.63c0-.53.4-.938.939-.938h5.215V0\
6118
- H4.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 .5\
6119
- 32-.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.1\
6120
- 3 4.707 4.708 4.707h5.138V25.77H4.631z" }) });
5660
+ return jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 30", children: 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" }) });
6121
5661
  }
6122
5662
  function LockIcon() {
6123
- return jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 25 32", children: jsx("path", { d: "M21.333 10.667H19.81V7.619C19.81 3.429 16\
6124
- .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.7\
6125
- 14a3.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.\
6126
- 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" }) });
5663
+ return jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 25 32", children: 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" }) });
6127
5664
  }
6128
5665
  function UnlockIcon() {
6129
- return jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 25 32", children: jsx("path", { d: "M21.333 10.667H19.81V7.619C19.81 3.429 16\
6130
- .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\
6131
- .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.05\
6132
- 6 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z" }) });
5666
+ return jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 25 32", children: 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" }) });
6133
5667
  }
6134
5668
  function ControlButton({ children: children2, className, ...rest }) {
6135
5669
  return jsx("button", { type: "button", className: cc(["react-flow__controls-button", className]), ...rest, children: children2 });
@@ -6139,10 +5673,8 @@ const selector$2 = (s) => ({
6139
5673
  minZoomReached: s.transform[2] <= s.minZoom,
6140
5674
  maxZoomReached: s.transform[2] >= s.maxZoom
6141
5675
  });
6142
- function ControlsComponent({ style: style2, showZoom = !0, showFitView = !0, showInteractive = !0, fitViewOptions, onZoomIn, onZoomOut, onFitView, onInteractiveChange,
6143
- className, children: children2, position = "bottom-left", orientation = "vertical", "aria-label": ariaLabel = "React Flow controls" }) {
6144
- const store = useStoreApi(), { isInteractive, minZoomReached, maxZoomReached } = useStore(selector$2, shallow$1), { zoomIn, zoomOut, fitView: fitView2 } = useReactFlow(),
6145
- onZoomInHandler = () => {
5676
+ function ControlsComponent({ style: style2, showZoom = !0, showFitView = !0, showInteractive = !0, fitViewOptions, onZoomIn, onZoomOut, onFitView, onInteractiveChange, className, children: children2, position = "bottom-left", orientation = "vertical", "aria-label": ariaLabel = "React Flow controls" }) {
5677
+ const store = useStoreApi(), { isInteractive, minZoomReached, maxZoomReached } = useStore(selector$2, shallow$1), { zoomIn, zoomOut, fitView: fitView2 } = useReactFlow(), onZoomInHandler = () => {
6146
5678
  zoomIn(), onZoomIn?.();
6147
5679
  }, onZoomOutHandler = () => {
6148
5680
  zoomOut(), onZoomOut?.();
@@ -6155,28 +5687,19 @@ className, children: children2, position = "bottom-left", orientation = "vertica
6155
5687
  elementsSelectable: !isInteractive
6156
5688
  }), onInteractiveChange?.(!isInteractive);
6157
5689
  };
6158
- return jsxs(Panel, { className: cc(["react-flow__controls", orientation === "horizontal" ? "horizontal" : "vertical", className]), position, style: style2,
6159
- "data-testid": "rf__controls", "aria-label": ariaLabel, children: [showZoom && jsxs(Fragment, { children: [jsx(ControlButton, { onClick: onZoomInHandler,
6160
- className: "react-flow__controls-zoomin", title: "zoom in", "aria-label": "zoom in", disabled: maxZoomReached, children: jsx(PlusIcon, {}) }), jsx(ControlButton,
6161
- { onClick: onZoomOutHandler, className: "react-flow__controls-zoomout", title: "zoom out", "aria-label": "zoom out", disabled: minZoomReached, children: jsx(
6162
- MinusIcon, {}) })] }), showFitView && jsx(ControlButton, { className: "react-flow__controls-fitview", onClick: onFitViewHandler, title: "fit view", "\
6163
- aria-label": "fit view", children: jsx(FitViewIcon, {}) }), showInteractive && jsx(ControlButton, { className: "react-flow__controls-interactive", onClick: onToggleInteractivity,
6164
- title: "toggle interactivity", "aria-label": "toggle interactivity", children: isInteractive ? jsx(UnlockIcon, {}) : jsx(LockIcon, {}) }), children2] });
5690
+ return jsxs(Panel, { className: cc(["react-flow__controls", orientation === "horizontal" ? "horizontal" : "vertical", className]), position, style: style2, "data-testid": "rf__controls", "aria-label": ariaLabel, children: [showZoom && jsxs(Fragment, { children: [jsx(ControlButton, { onClick: onZoomInHandler, className: "react-flow__controls-zoomin", title: "zoom in", "aria-label": "zoom in", disabled: maxZoomReached, children: jsx(PlusIcon, {}) }), jsx(ControlButton, { onClick: onZoomOutHandler, className: "react-flow__controls-zoomout", title: "zoom out", "aria-label": "zoom out", disabled: minZoomReached, children: jsx(MinusIcon, {}) })] }), showFitView && jsx(ControlButton, { className: "react-flow__controls-fitview", onClick: onFitViewHandler, title: "fit view", "aria-label": "fit view", children: jsx(FitViewIcon, {}) }), showInteractive && jsx(ControlButton, { className: "react-flow__controls-interactive", onClick: onToggleInteractivity, title: "toggle interactivity", "aria-label": "toggle interactivity", children: isInteractive ? jsx(UnlockIcon, {}) : jsx(LockIcon, {}) }), children2] });
6165
5691
  }
6166
5692
  ControlsComponent.displayName = "Controls";
6167
5693
  const Controls = memo(ControlsComponent);
6168
- function MiniMapNodeComponent({ id: id2, x, y, width, height, style: style2, color: color2, strokeColor, strokeWidth, className, borderRadius, shapeRendering,
6169
- selected: selected2, onClick }) {
5694
+ function MiniMapNodeComponent({ id: id2, x, y, width, height, style: style2, color: color2, strokeColor, strokeWidth, className, borderRadius, shapeRendering, selected: selected2, onClick }) {
6170
5695
  const { background, backgroundColor } = style2 || {}, fill = color2 || background || backgroundColor;
6171
- return jsx("rect", { className: cc(["react-flow__minimap-node", { selected: selected2 }, className]), x, y, rx: borderRadius, ry: borderRadius, width,
6172
- height, style: {
5696
+ return jsx("rect", { className: cc(["react-flow__minimap-node", { selected: selected2 }, className]), x, y, rx: borderRadius, ry: borderRadius, width, height, style: {
6173
5697
  fill,
6174
5698
  stroke: strokeColor,
6175
5699
  strokeWidth
6176
5700
  }, shapeRendering, onClick: onClick ? (event) => onClick(event, id2) : void 0 });
6177
5701
  }
6178
- const MiniMapNode = memo(MiniMapNodeComponent), selectorNodeIds = (s) => s.nodes.map((node) => node.id), getAttrFunction = (func) => func instanceof Function ?
6179
- func : () => func;
5702
+ const MiniMapNode = memo(MiniMapNodeComponent), selectorNodeIds = (s) => s.nodes.map((node) => node.id), getAttrFunction = (func) => func instanceof Function ? func : () => func;
6180
5703
  function MiniMapNodes({
6181
5704
  nodeStrokeColor,
6182
5705
  nodeColor,
@@ -6188,20 +5711,17 @@ function MiniMapNodes({
6188
5711
  nodeComponent: NodeComponent = MiniMapNode,
6189
5712
  onClick
6190
5713
  }) {
6191
- const nodeIds = useStore(selectorNodeIds, shallow$1), nodeColorFunc = getAttrFunction(nodeColor), nodeStrokeColorFunc = getAttrFunction(nodeStrokeColor),
6192
- nodeClassNameFunc = getAttrFunction(nodeClassName), shapeRendering = typeof window > "u" || window.chrome ? "crispEdges" : "geometricPrecision";
5714
+ const nodeIds = useStore(selectorNodeIds, shallow$1), nodeColorFunc = getAttrFunction(nodeColor), nodeStrokeColorFunc = getAttrFunction(nodeStrokeColor), nodeClassNameFunc = getAttrFunction(nodeClassName), shapeRendering = typeof window > "u" || window.chrome ? "crispEdges" : "geometricPrecision";
6193
5715
  return jsx(Fragment, { children: nodeIds.map((nodeId) => (
6194
5716
  // The split of responsibilities between MiniMapNodes and
6195
5717
  // NodeComponentWrapper may appear weird. However, it’s designed to
6196
5718
  // minimize the cost of updates when individual nodes change.
6197
5719
  //
6198
5720
  // For more details, see a similar commit in `NodeRenderer/index.tsx`.
6199
- jsx(NodeComponentWrapper, { id: nodeId, nodeColorFunc, nodeStrokeColorFunc, nodeClassNameFunc, nodeBorderRadius, nodeStrokeWidth, NodeComponent, onClick,
6200
- shapeRendering }, nodeId)
5721
+ jsx(NodeComponentWrapper, { id: nodeId, nodeColorFunc, nodeStrokeColorFunc, nodeClassNameFunc, nodeBorderRadius, nodeStrokeWidth, NodeComponent, onClick, shapeRendering }, nodeId)
6201
5722
  )) });
6202
5723
  }
6203
- function NodeComponentWrapperInner({ id: id2, nodeColorFunc, nodeStrokeColorFunc, nodeClassNameFunc, nodeBorderRadius, nodeStrokeWidth, shapeRendering,
6204
- NodeComponent, onClick }) {
5724
+ function NodeComponentWrapperInner({ id: id2, nodeColorFunc, nodeStrokeColorFunc, nodeClassNameFunc, nodeBorderRadius, nodeStrokeWidth, shapeRendering, NodeComponent, onClick }) {
6205
5725
  const { node, x, y } = useStore((s) => {
6206
5726
  const node2 = s.nodeLookup.get(id2), { x: x2, y: y2 } = node2.internals.positionAbsolute;
6207
5727
  return {
@@ -6213,8 +5733,7 @@ NodeComponent, onClick }) {
6213
5733
  if (!node || node.hidden || !nodeHasDimensions(node))
6214
5734
  return null;
6215
5735
  const { width, height } = getNodeDimensions(node);
6216
- return jsx(NodeComponent, { x, y, width, height, style: node.style, selected: !!node.selected, className: nodeClassNameFunc(node), color: nodeColorFunc(
6217
- node), borderRadius: nodeBorderRadius, strokeColor: nodeStrokeColorFunc(node), strokeWidth: nodeStrokeWidth, shapeRendering, onClick, id: node.id });
5736
+ return jsx(NodeComponent, { x, y, width, height, style: node.style, selected: !!node.selected, className: nodeClassNameFunc(node), color: nodeColorFunc(node), borderRadius: nodeBorderRadius, strokeColor: nodeStrokeColorFunc(node), strokeWidth: nodeStrokeWidth, shapeRendering, onClick, id: node.id });
6218
5737
  }
6219
5738
  const NodeComponentWrapper = memo(NodeComponentWrapperInner);
6220
5739
  var MiniMapNodes$1 = memo(MiniMapNodes);
@@ -6260,12 +5779,7 @@ function MiniMapComponent({
6260
5779
  zoomStep = 10,
6261
5780
  offsetScale = 5
6262
5781
  }) {
6263
- const store = useStoreApi(), svg = useRef(null), { boundingRect, viewBB, rfId, panZoom, translateExtent, flowWidth, flowHeight } = useStore(selector$1,
6264
- shallow$1), elementWidth = style2?.width ?? defaultWidth, elementHeight = style2?.height ?? defaultHeight, scaledWidth = boundingRect.width / elementWidth,
6265
- scaledHeight = boundingRect.height / elementHeight, viewScale = Math.max(scaledWidth, scaledHeight), viewWidth = viewScale * elementWidth, viewHeight = viewScale *
6266
- elementHeight, offset = offsetScale * viewScale, x = boundingRect.x - (viewWidth - boundingRect.width) / 2 - offset, y = boundingRect.y - (viewHeight -
6267
- boundingRect.height) / 2 - offset, width = viewWidth + offset * 2, height = viewHeight + offset * 2, labelledBy = `${ARIA_LABEL_KEY}-${rfId}`, viewScaleRef = useRef(
6268
- 0), minimapInstance = useRef();
5782
+ const store = useStoreApi(), svg = useRef(null), { boundingRect, viewBB, rfId, panZoom, translateExtent, flowWidth, flowHeight } = useStore(selector$1, shallow$1), elementWidth = style2?.width ?? defaultWidth, elementHeight = style2?.height ?? defaultHeight, scaledWidth = boundingRect.width / elementWidth, scaledHeight = boundingRect.height / elementHeight, viewScale = Math.max(scaledWidth, scaledHeight), viewWidth = viewScale * elementWidth, viewHeight = viewScale * elementHeight, offset = offsetScale * viewScale, x = boundingRect.x - (viewWidth - boundingRect.width) / 2 - offset, y = boundingRect.y - (viewHeight - boundingRect.height) / 2 - offset, width = viewWidth + offset * 2, height = viewHeight + offset * 2, labelledBy = `${ARIA_LABEL_KEY}-${rfId}`, viewScaleRef = useRef(0), minimapInstance = useRef();
6269
5783
  viewScaleRef.current = viewScale, useEffect(() => {
6270
5784
  if (svg.current && panZoom)
6271
5785
  return minimapInstance.current = XYMinimap({
@@ -6303,20 +5817,13 @@ function MiniMapComponent({
6303
5817
  "--xy-minimap-node-background-color-props": typeof nodeColor == "string" ? nodeColor : void 0,
6304
5818
  "--xy-minimap-node-stroke-color-props": typeof nodeStrokeColor == "string" ? nodeStrokeColor : void 0,
6305
5819
  "--xy-minimap-node-stroke-width-props": typeof nodeStrokeWidth == "string" ? nodeStrokeWidth : void 0
6306
- }, className: cc(["react-flow__minimap", className]), "data-testid": "rf__minimap", children: jsxs("svg", { width: elementWidth, height: elementHeight,
6307
- viewBox: `${x} ${y} ${width} ${height}`, className: "react-flow__minimap-svg", role: "img", "aria-labelledby": labelledBy, ref: svg, onClick: onSvgClick,
6308
- children: [ariaLabel && jsx("title", { id: labelledBy, children: ariaLabel }), jsx(MiniMapNodes$1, { onClick: onSvgNodeClick, nodeColor, nodeStrokeColor,
6309
- nodeBorderRadius, nodeClassName, nodeStrokeWidth, nodeComponent }), jsx("path", { className: "react-flow__minimap-mask", d: `M${x - offset},${y - offset}\
6310
- h${width + offset * 2}v${height + offset * 2}h${-width - offset * 2}z
5820
+ }, className: cc(["react-flow__minimap", className]), "data-testid": "rf__minimap", children: jsxs("svg", { width: elementWidth, height: elementHeight, viewBox: `${x} ${y} ${width} ${height}`, className: "react-flow__minimap-svg", role: "img", "aria-labelledby": labelledBy, ref: svg, onClick: onSvgClick, children: [ariaLabel && jsx("title", { id: labelledBy, children: ariaLabel }), jsx(MiniMapNodes$1, { onClick: onSvgNodeClick, nodeColor, nodeStrokeColor, nodeBorderRadius, nodeClassName, nodeStrokeWidth, nodeComponent }), jsx("path", { className: "react-flow__minimap-mask", d: `M${x - offset},${y - offset}h${width + offset * 2}v${height + offset * 2}h${-width - offset * 2}z
6311
5821
  M${viewBB.x},${viewBB.y}h${viewBB.width}v${viewBB.height}h${-viewBB.width}z`, fillRule: "evenodd", pointerEvents: "none" })] }) });
6312
5822
  }
6313
5823
  MiniMapComponent.displayName = "MiniMap";
6314
5824
  memo(MiniMapComponent);
6315
- function ResizeControl({ nodeId, position, variant = ResizeControlVariant.Handle, className, style: style2 = {}, children: children2, color: color2, minWidth = 10,
6316
- minHeight = 10, maxWidth = Number.MAX_VALUE, maxHeight = Number.MAX_VALUE, keepAspectRatio = !1, shouldResize, onResizeStart, onResize, onResizeEnd }) {
6317
- const contextNodeId = useNodeId(), id2 = typeof nodeId == "string" ? nodeId : contextNodeId, store = useStoreApi(), resizeControlRef = useRef(null),
6318
- defaultPosition = variant === ResizeControlVariant.Line ? "right" : "bottom-right", controlPosition = position ?? defaultPosition, resizer = useRef(
6319
- null);
5825
+ function ResizeControl({ nodeId, position, variant = ResizeControlVariant.Handle, className, style: style2 = {}, children: children2, color: color2, minWidth = 10, minHeight = 10, maxWidth = Number.MAX_VALUE, maxHeight = Number.MAX_VALUE, keepAspectRatio = !1, shouldResize, onResizeStart, onResize, onResizeEnd }) {
5826
+ const contextNodeId = useNodeId(), id2 = typeof nodeId == "string" ? nodeId : contextNodeId, store = useStoreApi(), resizeControlRef = useRef(null), defaultPosition = variant === ResizeControlVariant.Line ? "right" : "bottom-right", controlPosition = position ?? defaultPosition, resizer = useRef(null);
6320
5827
  useEffect(() => {
6321
5828
  if (!(!resizeControlRef.current || !id2))
6322
5829
  return resizer.current || (resizer.current = XYResizer({
@@ -6333,8 +5840,7 @@ minHeight = 10, maxWidth = Number.MAX_VALUE, maxHeight = Number.MAX_VALUE, keepA
6333
5840
  };
6334
5841
  },
6335
5842
  onChange: (change, childChanges) => {
6336
- const { triggerNodeChanges, nodeLookup, parentLookup, nodeOrigin } = store.getState(), changes = [], nextPosition = { x: change.x, y: change.
6337
- y }, node = nodeLookup.get(id2);
5843
+ const { triggerNodeChanges, nodeLookup, parentLookup, nodeOrigin } = store.getState(), changes = [], nextPosition = { x: change.x, y: change.y }, node = nodeLookup.get(id2);
6338
5844
  if (node && node.expandParent && node.parentId) {
6339
5845
  const origin = node.origin ?? nodeOrigin, width = change.width ?? node.measured.width, height = change.height ?? node.measured.height, child = {
6340
5846
  id: node.id,
@@ -6348,8 +5854,7 @@ minHeight = 10, maxWidth = Number.MAX_VALUE, maxHeight = Number.MAX_VALUE, keepA
6348
5854
  }, { width, height }, node.parentId, nodeLookup, origin)
6349
5855
  }
6350
5856
  }, parentExpandChanges = handleExpandParent([child], nodeLookup, parentLookup, nodeOrigin);
6351
- changes.push(...parentExpandChanges), nextPosition.x = change.x ? Math.max(origin[0] * width, change.x) : void 0, nextPosition.y = change.
6352
- y ? Math.max(origin[1] * height, change.y) : void 0;
5857
+ changes.push(...parentExpandChanges), nextPosition.x = change.x ? Math.max(origin[0] * width, change.x) : void 0, nextPosition.y = change.y ? Math.max(origin[1] * height, change.y) : void 0;
6353
5858
  }
6354
5859
  if (nextPosition.x !== void 0 && nextPosition.y !== void 0) {
6355
5860
  const positionChange = {
@@ -6417,10 +5922,8 @@ minHeight = 10, maxWidth = Number.MAX_VALUE, maxHeight = Number.MAX_VALUE, keepA
6417
5922
  onResizeEnd,
6418
5923
  shouldResize
6419
5924
  ]);
6420
- const positionClassNames = controlPosition.split("-"), colorStyleProp = variant === ResizeControlVariant.Line ? "borderColor" : "backgroundColor", controlStyle = color2 ?
6421
- { ...style2, [colorStyleProp]: color2 } : style2;
6422
- return jsx("div", { className: cc(["react-flow__resize-control", "nodrag", ...positionClassNames, variant, className]), ref: resizeControlRef, style: controlStyle,
6423
- children: children2 });
5925
+ const positionClassNames = controlPosition.split("-"), colorStyleProp = variant === ResizeControlVariant.Line ? "borderColor" : "backgroundColor", controlStyle = color2 ? { ...style2, [colorStyleProp]: color2 } : style2;
5926
+ return jsx("div", { className: cc(["react-flow__resize-control", "nodrag", ...positionClassNames, variant, className]), ref: resizeControlRef, style: controlStyle, children: children2 });
6424
5927
  }
6425
5928
  memo(ResizeControl);
6426
5929
  export {